/*! For license information please see main.04280d52.js.LICENSE.txt */
(()=>{var e={3803:(e,t,n)=>{"use strict";n.d(t,{A:()=>oe});var r=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(r){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)})),this.tags=[],this.ctr=0},e}(),o=Math.abs,i=String.fromCharCode,a=Object.assign;function s(e){return e.trim()}function l(e,t,n){return e.replace(t,n)}function c(e,t){return e.indexOf(t)}function u(e,t){return 0|e.charCodeAt(t)}function d(e,t,n){return e.slice(t,n)}function h(e){return e.length}function p(e){return e.length}function f(e,t){return t.push(e),e}var g=1,m=1,v=0,y=0,x=0,b="";function w(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:g,column:m,length:a,return:""}}function S(e,t){return a(w("",null,null,"",null,null,0),e,{length:-e.length},t)}function _(){return x=y>0?u(b,--y):0,m--,10===x&&(m=1,g--),x}function A(){return x=y<v?u(b,y++):0,m++,10===x&&(m=1,g++),x}function k(){return u(b,y)}function C(){return y}function M(e,t){return d(b,e,t)}function I(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function T(e){return g=m=1,v=h(b=e),y=0,[]}function D(e){return b="",e}function j(e){return s(M(y-1,R(91===e?e+2:40===e?e+1:e)))}function P(e){for(;(x=k())&&x<33;)A();return I(e)>2||I(x)>3?"":" "}function L(e,t){for(;--t&&A()&&!(x<48||x>102||x>57&&x<65||x>70&&x<97););return M(e,C()+(t<6&&32==k()&&32==A()))}function R(e){for(;A();)switch(x){case e:return y;case 34:case 39:34!==e&&39!==e&&R(x);break;case 40:41===e&&R(e);break;case 92:A()}return y}function E(e,t){for(;A()&&e+x!==57&&(e+x!==84||47!==k()););return"/*"+M(t,y-1)+"*"+i(47===e?e:A())}function N(e){for(;!I(k());)A();return M(e,y)}var O="-ms-",z="-moz-",B="-webkit-",F="comm",V="rule",W="decl",H="@keyframes";function G(e,t){for(var n="",r=p(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function U(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case W:return e.return=e.return||e.value;case F:return"";case H:return e.return=e.value+"{"+G(e.children,r)+"}";case V:e.value=e.props.join(",")}return h(n=G(e.children,r))?e.return=e.value+"{"+n+"}":""}function X(e){return D(Y("",null,null,null,[""],e=T(e),0,[0],e))}function Y(e,t,n,r,o,a,s,d,p){for(var g=0,m=0,v=s,y=0,x=0,b=0,w=1,S=1,M=1,I=0,T="",D=o,R=a,O=r,z=T;S;)switch(b=I,I=A()){case 40:if(108!=b&&58==u(z,v-1)){-1!=c(z+=l(j(I),"&","&\f"),"&\f")&&(M=-1);break}case 34:case 39:case 91:z+=j(I);break;case 9:case 10:case 13:case 32:z+=P(b);break;case 92:z+=L(C()-1,7);continue;case 47:switch(k()){case 42:case 47:f(Z(E(A(),C()),t,n),p);break;default:z+="/"}break;case 123*w:d[g++]=h(z)*M;case 125*w:case 59:case 0:switch(I){case 0:case 125:S=0;case 59+m:-1==M&&(z=l(z,/\f/g,"")),x>0&&h(z)-v&&f(x>32?K(z+";",r,n,v-1):K(l(z," ","")+";",r,n,v-2),p);break;case 59:z+=";";default:if(f(O=q(z,t,n,g,m,o,d,T,D=[],R=[],v),a),123===I)if(0===m)Y(z,t,O,O,D,a,v,d,R);else switch(99===y&&110===u(z,3)?100:y){case 100:case 108:case 109:case 115:Y(e,O,O,r&&f(q(e,O,O,0,0,o,d,T,o,D=[],v),R),o,R,v,d,r?D:R);break;default:Y(z,O,O,O,[""],R,0,d,R)}}g=m=x=0,w=M=1,T=z="",v=s;break;case 58:v=1+h(z),x=b;default:if(w<1)if(123==I)--w;else if(125==I&&0==w++&&125==_())continue;switch(z+=i(I),I*w){case 38:M=m>0?1:(z+="\f",-1);break;case 44:d[g++]=(h(z)-1)*M,M=1;break;case 64:45===k()&&(z+=j(A())),y=k(),m=v=h(T=z+=N(C())),I++;break;case 45:45===b&&2==h(z)&&(w=0)}}return a}function q(e,t,n,r,i,a,c,u,h,f,g){for(var m=i-1,v=0===i?a:[""],y=p(v),x=0,b=0,S=0;x<r;++x)for(var _=0,A=d(e,m+1,m=o(b=c[x])),k=e;_<y;++_)(k=s(b>0?v[_]+" "+A:l(A,/&\f/g,v[_])))&&(h[S++]=k);return w(e,t,n,0===i?V:u,h,f,g)}function Z(e,t,n){return w(e,t,n,F,i(x),d(e,2,-2),0)}function K(e,t,n,r){return w(e,t,n,W,d(e,0,r),d(e,r+1,-1),r)}var $=function(e,t,n){for(var r=0,o=0;r=o,o=k(),38===r&&12===o&&(t[n]=1),!I(o);)A();return M(e,y)},Q=function(e,t){return D(function(e,t){var n=-1,r=44;do{switch(I(r)){case 0:38===r&&12===k()&&(t[n]=1),e[n]+=$(y-1,t,n);break;case 2:e[n]+=j(r);break;case 4:if(44===r){e[++n]=58===k()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=i(r)}}while(r=A());return e}(T(e),t))},J=new WeakMap,ee=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||J.get(n))&&!r){J.set(e,!0);for(var o=[],i=Q(t,o),a=n.props,s=0,l=0;s<i.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=o[s]?i[s].replace(/&\f/g,a[c]):a[c]+" "+i[s]}}},te=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function ne(e,t){switch(function(e,t){return 45^u(e,0)?(((t<<2^u(e,0))<<2^u(e,1))<<2^u(e,2))<<2^u(e,3):0}(e,t)){case 5103:return B+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return B+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return B+e+z+e+O+e+e;case 6828:case 4268:return B+e+O+e+e;case 6165:return B+e+O+"flex-"+e+e;case 5187:return B+e+l(e,/(\w+).+(:[^]+)/,B+"box-$1$2"+O+"flex-$1$2")+e;case 5443:return B+e+O+"flex-item-"+l(e,/flex-|-self/,"")+e;case 4675:return B+e+O+"flex-line-pack"+l(e,/align-content|flex-|-self/,"")+e;case 5548:return B+e+O+l(e,"shrink","negative")+e;case 5292:return B+e+O+l(e,"basis","preferred-size")+e;case 6060:return B+"box-"+l(e,"-grow","")+B+e+O+l(e,"grow","positive")+e;case 4554:return B+l(e,/([^-])(transform)/g,"$1"+B+"$2")+e;case 6187:return l(l(l(e,/(zoom-|grab)/,B+"$1"),/(image-set)/,B+"$1"),e,"")+e;case 5495:case 3959:return l(e,/(image-set\([^]*)/,B+"$1$`$1");case 4968:return l(l(e,/(.+:)(flex-)?(.*)/,B+"box-pack:$3"+O+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+B+e+e;case 4095:case 3583:case 4068:case 2532:return l(e,/(.+)-inline(.+)/,B+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(h(e)-1-t>6)switch(u(e,t+1)){case 109:if(45!==u(e,t+4))break;case 102:return l(e,/(.+:)(.+)-([^]+)/,"$1"+B+"$2-$3$1"+z+(108==u(e,t+3)?"$3":"$2-$3"))+e;case 115:return~c(e,"stretch")?ne(l(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==u(e,t+1))break;case 6444:switch(u(e,h(e)-3-(~c(e,"!important")&&10))){case 107:return l(e,":",":"+B)+e;case 101:return l(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+B+(45===u(e,14)?"inline-":"")+"box$3$1"+B+"$2$3$1"+O+"$2box$3")+e}break;case 5936:switch(u(e,t+11)){case 114:return B+e+O+l(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return B+e+O+l(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return B+e+O+l(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return B+e+O+e+e}return e}var re=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case W:e.return=ne(e.value,e.length);break;case H:return G([S(e,{value:l(e.value,"@","@"+B)})],r);case V:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return G([S(e,{props:[l(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return G([S(e,{props:[l(t,/:(plac\w+)/,":"+B+"input-$1")]}),S(e,{props:[l(t,/:(plac\w+)/,":-moz-$1")]}),S(e,{props:[l(t,/:(plac\w+)/,O+"input-$1")]})],r)}return""}))}}],oe=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var o,i,a=e.stylisPlugins||re,s={},l=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)s[t[n]]=!0;l.push(e)}));var c,u,d=[U,(u=function(e){c.insert(e)},function(e){e.root||(e=e.return)&&u(e)})],h=function(e){var t=p(e);return function(n,r,o,i){for(var a="",s=0;s<t;s++)a+=e[s](n,r,o,i)||"";return a}}([ee,te].concat(a,d));i=function(e,t,n,r){c=n,G(X(e?e+"{"+t.styles+"}":t.styles),h),r&&(f.inserted[t.name]=!0)};var f={key:t,sheet:new r({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:i};return f.sheet.hydrate(l),f}},918:(e,t,n)=>{"use strict";function r(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}n.d(t,{A:()=>r})},4575:(e,t,n)=>{"use strict";n.d(t,{C:()=>a,T:()=>l,w:()=>s});var r=n(5043),o=n(3803),i=(n(6598),n(9436),r.createContext("undefined"!==typeof HTMLElement?(0,o.A)({key:"css"}):null)),a=i.Provider,s=function(e){return(0,r.forwardRef)((function(t,n){var o=(0,r.useContext)(i);return e(t,o,n)}))},l=r.createContext({})},3290:(e,t,n)=>{"use strict";n.d(t,{AH:()=>c,i7:()=>u,mL:()=>l});var r=n(4575),o=n(5043),i=n(1722),a=n(9436),s=n(6598),l=(n(3803),n(219),(0,r.w)((function(e,t){var n=e.styles,l=(0,s.J)([n],void 0,o.useContext(r.T)),c=o.useRef();return(0,a.i)((function(){var e=t.key+"-global",n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),r=!1,o=document.querySelector('style[data-emotion="'+e+" "+l.name+'"]');return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),null!==o&&(r=!0,o.setAttribute("data-emotion",e),n.hydrate([o])),c.current=[n,r],function(){n.flush()}}),[t]),(0,a.i)((function(){var e=c.current,n=e[0];if(e[1])e[1]=!1;else{if(void 0!==l.next&&(0,i.sk)(t,l.next,!0),n.tags.length){var r=n.tags[n.tags.length-1].nextElementSibling;n.before=r,n.flush()}t.insert("",l,n,!1)}}),[t,l.name]),null})));function c(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,s.J)(t)}var u=function(){var e=c.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}},6598:(e,t,n)=>{"use strict";n.d(t,{J:()=>m});var r={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},o=n(918),i=!1,a=/[A-Z]|^ms/g,s=/_EMO_([^_]+?)_([^]*?)_EMO_/g,l=function(e){return 45===e.charCodeAt(1)},c=function(e){return null!=e&&"boolean"!==typeof e},u=(0,o.A)((function(e){return l(e)?e:e.replace(a,"-$&").toLowerCase()})),d=function(e,t){switch(e){case"animation":case"animationName":if("string"===typeof t)return t.replace(s,(function(e,t,n){return f={name:t,styles:n,next:f},t}))}return 1===r[e]||l(e)||"number"!==typeof t||0===t?t:t+"px"},h="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function p(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return f={name:o.name,styles:o.styles,next:f},o.name;var a=n;if(void 0!==a.styles){var s=a.next;if(void 0!==s)for(;void 0!==s;)f={name:s.name,styles:s.styles,next:f},s=s.next;return a.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=p(e,t,n[o])+";";else for(var a in n){var s=n[a];if("object"!==typeof s){var l=s;null!=t&&void 0!==t[l]?r+=a+"{"+t[l]+"}":c(l)&&(r+=u(a)+":"+d(a,l)+";")}else{if("NO_COMPONENT_SELECTOR"===a&&i)throw new Error(h);if(!Array.isArray(s)||"string"!==typeof s[0]||null!=t&&void 0!==t[s[0]]){var f=p(e,t,s);switch(a){case"animation":case"animationName":r+=u(a)+":"+f+";";break;default:r+=a+"{"+f+"}"}}else for(var g=0;g<s.length;g++)c(s[g])&&(r+=u(a)+":"+d(a,s[g])+";")}}return r}(e,t,n);case"function":if(void 0!==e){var l=f,g=n(e);return f=l,p(e,t,g)}}var m=n;if(null==t)return m;var v=t[m];return void 0!==v?v:m}var f,g=/label:\s*([^\s;\n{]+)\s*(;|$)/g;function m(e,t,n){if(1===e.length&&"object"===typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";f=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=p(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++){if(o+=p(n,t,e[a]),r)o+=i[a]}g.lastIndex=0;for(var s,l="";null!==(s=g.exec(o));)l+="-"+s[1];var c=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:c,styles:o,next:f}}},9436:(e,t,n)=>{"use strict";var r;n.d(t,{i:()=>s,s:()=>a});var o=n(5043),i=!!(r||(r=n.t(o,2))).useInsertionEffect&&(r||(r=n.t(o,2))).useInsertionEffect,a=i||function(e){return e()},s=i||o.useLayoutEffect},1722:(e,t,n)=>{"use strict";n.d(t,{Rk:()=>r,SF:()=>o,sk:()=>i});function r(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var o=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},i=function(e,t,n){o(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+r:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}}},6502:(e,t,n)=>{"use strict";var r=n(4994);t.A=void 0;var o=r(n(39)),i=n(579);t.A=(0,o.default)((0,i.jsx)("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward")},5382:(e,t,n)=>{"use strict";var r=n(4994);t.A=void 0;var o=r(n(39)),i=n(579);t.A=(0,o.default)((0,i.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check")},155:(e,t,n)=>{"use strict";var r=n(4994);t.A=void 0;var o=r(n(39)),i=n(579);t.A=(0,o.default)((0,i.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear")},5473:(e,t,n)=>{"use strict";var r=n(4994);t.A=void 0;var o=r(n(39)),i=n(579);t.A=(0,o.default)((0,i.jsx)("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess")},1337:(e,t,n)=>{"use strict";var r=n(4994);t.A=void 0;var o=r(n(39)),i=n(579);t.A=(0,o.default)((0,i.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore")},1702:(e,t,n)=>{"use strict";var r=n(4994);t.A=void 0;var o=r(n(39)),i=n(579);t.A=(0,o.default)((0,i.jsx)("path",{d:"m17 7-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4z"}),"Logout")},9611:(e,t,n)=>{"use strict";var r=n(4994);t.A=void 0;var o=r(n(39)),i=n(579);t.A=(0,o.default)((0,i.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu")},2177:(e,t,n)=>{"use strict";var r=n(4994);t.A=void 0;var o=r(n(39)),i=n(579);t.A=(0,o.default)((0,i.jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"Person")},39:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r.createSvgIcon}});var r=n(6772)},6431:(e,t,n)=>{"use strict";n.d(t,{b:()=>s});var r=n(5043),o=n(3030);n(579);const i=r.createContext(void 0);function a(e){let{props:t,name:n}=e;return function(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const i=t.components[n];return i.defaultProps?(0,o.A)(i.defaultProps,r):i.styleOverrides||i.variants?r:(0,o.A)(i,r)}({props:t,name:n,theme:{components:r.useContext(i)}})}function s(e){return a(e)}},5881:(e,t)=>{"use strict";var n,r=Symbol.for("react.element"),o=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen");function v(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case i:case s:case a:case h:case p:return e;default:switch(e=e&&e.$$typeof){case u:case c:case d:case g:case f:case l:return e;default:return t}}case o:return t}}}n=Symbol.for("react.module.reference")},805:(e,t,n)=>{"use strict";n(5881)},7344:(e,t,n)=>{"use strict";n.d(t,{A:()=>R});var r=n(8168),o=n(8587),i=n(7868),a=n(9172),s=n(7758),l=n(8812),c=n(8280);var u=n(7266);const d={black:"#000",white:"#fff"},h={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},p={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},f={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},g={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},m={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},v={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},y={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},x=["mode","contrastThreshold","tonalOffset"],b={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:d.white,default:d.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},w={text:{primary:d.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:d.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function S(e,t,n,r){const o=r.light||r,i=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,u.a)(e.main,o):"dark"===t&&(e.dark=(0,u.e$)(e.main,i)))}function _(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:s=.2}=e,l=(0,o.A)(e,x),c=e.primary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:m[200],light:m[50],dark:m[400]}:{main:m[700],light:m[400],dark:m[800]}}(t),_=e.secondary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:p[200],light:p[50],dark:p[400]}:{main:p[500],light:p[300],dark:p[700]}}(t),A=e.error||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:f[500],light:f[300],dark:f[700]}:{main:f[700],light:f[400],dark:f[800]}}(t),k=e.info||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:v[400],light:v[300],dark:v[700]}:{main:v[700],light:v[500],dark:v[900]}}(t),C=e.success||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:y[400],light:y[300],dark:y[700]}:{main:y[800],light:y[500],dark:y[900]}}(t),M=e.warning||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:g[400],light:g[300],dark:g[700]}:{main:"#ed6c02",light:g[500],dark:g[900]}}(t);function I(e){return(0,u.eM)(e,w.text.primary)>=n?w.text.primary:b.text.primary}const T=e=>{let{color:t,name:n,mainShade:o=500,lightShade:a=300,darkShade:l=700}=e;if(t=(0,r.A)({},t),!t.main&&t[o]&&(t.main=t[o]),!t.hasOwnProperty("main"))throw new Error((0,i.A)(11,n?" (".concat(n,")"):"",o));if("string"!==typeof t.main)throw new Error((0,i.A)(12,n?" (".concat(n,")"):"",JSON.stringify(t.main)));return S(t,"light",a,s),S(t,"dark",l,s),t.contrastText||(t.contrastText=I(t.main)),t},D={dark:w,light:b};return(0,a.A)((0,r.A)({common:(0,r.A)({},d),mode:t,primary:T({color:c,name:"primary"}),secondary:T({color:_,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:T({color:A,name:"error"}),warning:T({color:M,name:"warning"}),info:T({color:k,name:"info"}),success:T({color:C,name:"success"}),grey:h,contrastThreshold:n,getContrastText:I,augmentColor:T,tonalOffset:s},D[t]),l)}const A=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];const k={textTransform:"uppercase"},C='"Roboto", "Helvetica", "Arial", sans-serif';function M(e,t){const n="function"===typeof t?t(e):t,{fontFamily:i=C,fontSize:s=14,fontWeightLight:l=300,fontWeightRegular:c=400,fontWeightMedium:u=500,fontWeightBold:d=700,htmlFontSize:h=16,allVariants:p,pxToRem:f}=n,g=(0,o.A)(n,A);const m=s/14,v=f||(e=>"".concat(e/h*m,"rem")),y=(e,t,n,o,a)=>{return(0,r.A)({fontFamily:i,fontWeight:e,fontSize:v(t),lineHeight:n},i===C?{letterSpacing:"".concat((s=o/t,Math.round(1e5*s)/1e5),"em")}:{},a,p);var s},x={h1:y(l,96,1.167,-1.5),h2:y(l,60,1.2,-.5),h3:y(c,48,1.167,0),h4:y(c,34,1.235,.25),h5:y(c,24,1.334,0),h6:y(u,20,1.6,.15),subtitle1:y(c,16,1.75,.15),subtitle2:y(u,14,1.57,.1),body1:y(c,16,1.5,.15),body2:y(c,14,1.43,.15),button:y(u,14,1.75,.4,k),caption:y(c,12,1.66,.4),overline:y(c,12,2.66,1,k),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return(0,a.A)((0,r.A)({htmlFontSize:h,pxToRem:v,fontFamily:i,fontSize:s,fontWeightLight:l,fontWeightRegular:c,fontWeightMedium:u,fontWeightBold:d},x),g,{clone:!1})}function I(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}const T=["none",I(0,2,1,-1,0,1,1,0,0,1,3,0),I(0,3,1,-2,0,2,2,0,0,1,5,0),I(0,3,3,-2,0,3,4,0,0,1,8,0),I(0,2,4,-1,0,4,5,0,0,1,10,0),I(0,3,5,-1,0,5,8,0,0,1,14,0),I(0,3,5,-1,0,6,10,0,0,1,18,0),I(0,4,5,-2,0,7,10,1,0,2,16,1),I(0,5,5,-3,0,8,10,1,0,3,14,2),I(0,5,6,-3,0,9,12,1,0,3,16,2),I(0,6,6,-3,0,10,14,1,0,4,18,3),I(0,6,7,-4,0,11,15,1,0,4,20,3),I(0,7,8,-4,0,12,17,2,0,5,22,4),I(0,7,8,-4,0,13,19,2,0,5,24,4),I(0,7,9,-4,0,14,21,2,0,5,26,4),I(0,8,9,-5,0,15,22,2,0,6,28,5),I(0,8,10,-5,0,16,24,2,0,6,30,5),I(0,8,11,-5,0,17,26,2,0,6,32,5),I(0,9,11,-5,0,18,28,2,0,7,34,6),I(0,9,12,-6,0,19,29,2,0,7,36,6),I(0,10,13,-6,0,20,31,3,0,8,38,7),I(0,10,13,-6,0,21,33,3,0,8,40,7),I(0,10,14,-6,0,22,35,3,0,8,42,7),I(0,11,14,-7,0,23,36,3,0,9,44,8),I(0,11,15,-7,0,24,38,3,0,9,46,8)];var D=n(4318);const j={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},P=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function L(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{mixins:t={},palette:n={},transitions:u={},typography:d={}}=e,h=(0,o.A)(e,P);if(e.vars)throw new Error((0,i.A)(18));const p=_(n),f=(0,c.A)(e);let g=(0,a.A)(f,{mixins:(m=f.breakpoints,v=t,(0,r.A)({toolbar:{minHeight:56,[m.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[m.up("sm")]:{minHeight:64}}},v)),palette:p,shadows:T.slice(),typography:M(p,d),transitions:(0,D.Ay)(u),zIndex:(0,r.A)({},j)});var m,v;g=(0,a.A)(g,h);for(var y=arguments.length,x=new Array(y>1?y-1:0),b=1;b<y;b++)x[b-1]=arguments[b];return g=x.reduce(((e,t)=>(0,a.A)(e,t)),g),g.unstable_sxConfig=(0,r.A)({},s.A,null==h?void 0:h.unstable_sxConfig),g.unstable_sx=function(e){return(0,l.A)({sx:e,theme:this})},g}const R=L},4318:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>u,p0:()=>s});var r=n(8587),o=n(8168);const i=["duration","easing","delay"],a={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},s={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function l(e){return"".concat(Math.round(e),"ms")}function c(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function u(e){const t=(0,o.A)({},a,e.easing),n=(0,o.A)({},s,e.duration);return(0,o.A)({getAutoHeightDuration:c,create:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{duration:a=n.standard,easing:s=t.easeInOut,delay:c=0}=o;(0,r.A)(o,i);return(Array.isArray(e)?e:[e]).map((e=>"".concat(e," ").concat("string"===typeof a?a:l(a)," ").concat(s," ").concat("string"===typeof c?c:l(c)))).join(",")}},e,{easing:t,duration:n})}},5170:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=(0,n(7344).A)()},3375:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r="$$material"},1475:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(7123);const o=e=>(0,r.A)(e)&&"classes"!==e},7123:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}},4535:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>s});var r=n(8052),o=n(5170),i=n(3375),a=n(1475);const s=(0,r.Ay)({themeId:i.A,defaultTheme:o.A,rootShouldForwardProp:a.A})},6803:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(7598).A},6593:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(2456).A},9662:(e,t,n)=>{"use strict";n.d(t,{A:()=>x});var r=n(8168),o=n(5043),i=n(8587),a=n(8387),s=n(8610),l=n(6803),c=n(6431),u=n(4535),d=n(2532),h=n(2372);function p(e){return(0,h.Ay)("MuiSvgIcon",e)}(0,d.A)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var f=n(579);const g=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],m=(0,u.Ay)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t["color".concat((0,l.A)(n.color))],t["fontSize".concat((0,l.A)(n.fontSize))]]}})((e=>{let{theme:t,ownerState:n}=e;var r,o,i,a,s,l,c,u,d,h,p,f,g;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:n.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:null==(r=t.transitions)||null==(o=r.create)?void 0:o.call(r,"fill",{duration:null==(i=t.transitions)||null==(i=i.duration)?void 0:i.shorter}),fontSize:{inherit:"inherit",small:(null==(a=t.typography)||null==(s=a.pxToRem)?void 0:s.call(a,20))||"1.25rem",medium:(null==(l=t.typography)||null==(c=l.pxToRem)?void 0:c.call(l,24))||"1.5rem",large:(null==(u=t.typography)||null==(d=u.pxToRem)?void 0:d.call(u,35))||"2.1875rem"}[n.fontSize],color:null!=(h=null==(p=(t.vars||t).palette)||null==(p=p[n.color])?void 0:p.main)?h:{action:null==(f=(t.vars||t).palette)||null==(f=f.action)?void 0:f.active,disabled:null==(g=(t.vars||t).palette)||null==(g=g.action)?void 0:g.disabled,inherit:void 0}[n.color]}})),v=o.forwardRef((function(e,t){const n=(0,c.b)({props:e,name:"MuiSvgIcon"}),{children:u,className:d,color:h="inherit",component:v="svg",fontSize:y="medium",htmlColor:x,inheritViewBox:b=!1,titleAccess:w,viewBox:S="0 0 24 24"}=n,_=(0,i.A)(n,g),A=o.isValidElement(u)&&"svg"===u.type,k=(0,r.A)({},n,{color:h,component:v,fontSize:y,instanceFontSize:e.fontSize,inheritViewBox:b,viewBox:S,hasSvgAsChild:A}),C={};b||(C.viewBox=S);const M=(e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root","inherit"!==t&&"color".concat((0,l.A)(t)),"fontSize".concat((0,l.A)(n))]};return(0,s.A)(o,p,r)})(k);return(0,f.jsxs)(m,(0,r.A)({as:v,className:(0,a.A)(M.root,d),focusable:"false",color:x,"aria-hidden":!w||void 0,role:w?"img":void 0,ref:t},C,_,A&&u.props,{ownerState:k,children:[A?u.props.children:u,w?(0,f.jsx)("title",{children:w}):null]}))}));v.muiName="SvgIcon";const y=v;function x(e,t){function n(n,o){return(0,f.jsx)(y,(0,r.A)({"data-testid":"".concat(t,"Icon"),ref:o},n,{children:e}))}return n.muiName=y.muiName,o.memo(o.forwardRef(n))}},950:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(3468).A},6772:(e,t,n)=>{"use strict";n.r(t),n.d(t,{capitalize:()=>o.A,createChainedFunction:()=>i.A,createSvgIcon:()=>a.A,debounce:()=>s.A,deprecatedPropType:()=>l,isMuiElement:()=>c.A,ownerDocument:()=>u.A,ownerWindow:()=>d.A,requirePropFactory:()=>h,setRef:()=>p,unstable_ClassNameGenerator:()=>w,unstable_useEnhancedEffect:()=>f.A,unstable_useId:()=>g.A,unsupportedProp:()=>m,useControlled:()=>v.A,useEventCallback:()=>y.A,useForkRef:()=>x.A,useIsFocusVisible:()=>b.A});var r=n(9386),o=n(6803),i=n(6593),a=n(9662),s=n(950);const l=function(e,t){return()=>null};var c=n(7328),u=n(2427),d=n(6078);n(8168);const h=function(e,t){return()=>null};const p=n(6564).A;var f=n(5013),g=n(5879);const m=function(e,t,n,r,o){return null};var v=n(4516),y=n(3319),x=n(5849),b=n(7844);const w={configure:e=>{r.A.configure(e)}}},7328:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(5043);const o=function(e,t){var n,o;return r.isValidElement(e)&&-1!==t.indexOf(null!=(n=e.type.muiName)?n:null==(o=e.type)||null==(o=o._payload)||null==(o=o.value)?void 0:o.muiName)}},2427:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(1668).A},6078:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(3940).A},4516:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(1052).A},5013:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(4440).A},3319:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(1782).A},5849:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(3462).A},5879:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(5844).A},7844:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(9640).A},869:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});n(5043);var r=n(3290),o=n(579);function i(e){const{styles:t,defaultTheme:n={}}=e,i="function"===typeof t?e=>{return t(void 0===(r=e)||null===r||0===Object.keys(r).length?n:e);var r}:t;return(0,o.jsx)(r.mL,{styles:i})}},3174:(e,t,n)=>{"use strict";n.r(t),n.d(t,{GlobalStyles:()=>_.A,StyledEngineProvider:()=>S,ThemeContext:()=>l.T,css:()=>y.AH,default:()=>A,internal_processStyles:()=>k,keyframes:()=>y.i7});var r=n(8168),o=n(5043),i=n(918),a=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,s=(0,i.A)((function(e){return a.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),l=n(4575),c=n(1722),u=n(6598),d=n(9436),h=s,p=function(e){return"theme"!==e},f=function(e){return"string"===typeof e&&e.charCodeAt(0)>96?h:p},g=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!==typeof r&&n&&(r=e.__emotion_forwardProp),r},m=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return(0,c.SF)(t,n,r),(0,d.s)((function(){return(0,c.sk)(t,n,r)})),null},v=function e(t,n){var i,a,s=t.__emotion_real===t,d=s&&t.__emotion_base||t;void 0!==n&&(i=n.label,a=n.target);var h=g(t,n,s),p=h||f(d),v=!p("as");return function(){var y=arguments,x=s&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==i&&x.push("label:"+i+";"),null==y[0]||void 0===y[0].raw)x.push.apply(x,y);else{x.push(y[0][0]);for(var b=y.length,w=1;w<b;w++)x.push(y[w],y[0][w])}var S=(0,l.w)((function(e,t,n){var r=v&&e.as||d,i="",s=[],g=e;if(null==e.theme){for(var y in g={},e)g[y]=e[y];g.theme=o.useContext(l.T)}"string"===typeof e.className?i=(0,c.Rk)(t.registered,s,e.className):null!=e.className&&(i=e.className+" ");var b=(0,u.J)(x.concat(s),t.registered,g);i+=t.key+"-"+b.name,void 0!==a&&(i+=" "+a);var w=v&&void 0===h?f(r):p,S={};for(var _ in e)v&&"as"===_||w(_)&&(S[_]=e[_]);return S.className=i,n&&(S.ref=n),o.createElement(o.Fragment,null,o.createElement(m,{cache:t,serialized:b,isStringTag:"string"===typeof r}),o.createElement(r,S))}));return S.displayName=void 0!==i?i:"Styled("+("string"===typeof d?d:d.displayName||d.name||"Component")+")",S.defaultProps=t.defaultProps,S.__emotion_real=S,S.__emotion_base=d,S.__emotion_styles=x,S.__emotion_forwardProp=h,Object.defineProperty(S,"toString",{value:function(){return"."+a}}),S.withComponent=function(t,o){return e(t,(0,r.A)({},n,o,{shouldForwardProp:g(S,o,!0)})).apply(void 0,x)},S}}.bind();["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){v[e]=v(e)}));var y=n(3290),x=n(3803),b=n(579);let w;function S(e){const{injectFirst:t,children:n}=e;return t&&w?(0,b.jsx)(l.C,{value:w,children:n}):n}"object"===typeof document&&(w=(0,x.A)({key:"css",prepend:!0}));var _=n(869);function A(e,t){return v(e,t)}const k=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}},7266:(e,t,n)=>{"use strict";var r=n(4994);t.X4=p,t.e$=f,t.tL=m,t.eM=function(e,t){const n=h(e),r=h(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)},t.a=g;var o=r(n(457)),i=r(n(6531));function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return(0,i.default)(e,t,n)}function s(e){e=e.slice(1);const t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map((e=>e+e))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", "),")"):""}function l(e){if(e.type)return e;if("#"===e.charAt(0))return l(s(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error((0,o.default)(9,e));let r,i=e.substring(t+1,e.length-1);if("color"===n){if(i=i.split(" "),r=i.shift(),4===i.length&&"/"===i[3].charAt(0)&&(i[3]=i[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(r))throw new Error((0,o.default)(10,r))}else i=i.split(",");return i=i.map((e=>parseFloat(e))),{type:n,values:i,colorSpace:r}}const c=e=>{const t=l(e);return t.values.slice(0,3).map(((e,n)=>-1!==t.type.indexOf("hsl")&&0!==n?"".concat(e,"%"):e)).join(" ")};function u(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(r[1]="".concat(r[1],"%"),r[2]="".concat(r[2],"%")),r=-1!==t.indexOf("color")?"".concat(n," ").concat(r.join(" ")):"".concat(r.join(", ")),"".concat(t,"(").concat(r,")")}function d(e){e=l(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return o-i*Math.max(Math.min(t-3,9-t,1),-1)};let s="rgb";const c=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",c.push(t[3])),u({type:s,values:c})}function h(e){let t="hsl"===(e=l(e)).type||"hsla"===e.type?l(d(e)).values:e.values;return t=t.map((t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function p(e,t){return e=l(e),t=a(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]="/".concat(t):e.values[3]=t,u(e)}function f(e,t){if(e=l(e),t=a(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return u(e)}function g(e,t){if(e=l(e),t=a(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return u(e)}function m(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return h(e)>.5?f(e,t):g(e,t)}},8052:(e,t,n)=>{"use strict";var r=n(4994);t.Ay=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n=g,rootShouldForwardProp:r=f,slotShouldForwardProp:l=f}=e,u=e=>(0,c.default)((0,o.default)({},e,{theme:v((0,o.default)({},e,{defaultTheme:n,themeId:t}))}));return u.__mui_systemSx=!0,function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,a.internal_processStyles)(e,(e=>e.filter((e=>!(null!=e&&e.__mui_systemSx)))));const{name:d,slot:p,skipVariantsResolver:g,skipSx:b,overridesResolver:w=y(m(p))}=c,S=(0,i.default)(c,h),_=void 0!==g?g:p&&"Root"!==p&&"root"!==p||!1,A=b||!1;let k=f;"Root"===p||"root"===p?k=r:p?k=l:function(e){return"string"===typeof e&&e.charCodeAt(0)>96}(e)&&(k=void 0);const C=(0,a.default)(e,(0,o.default)({shouldForwardProp:k,label:undefined},S)),M=e=>"function"===typeof e&&e.__emotion_real!==e||(0,s.isPlainObject)(e)?r=>x(e,(0,o.default)({},r,{theme:v({theme:r.theme,defaultTheme:n,themeId:t})})):e,I=function(r){let i=M(r);for(var a=arguments.length,s=new Array(a>1?a-1:0),l=1;l<a;l++)s[l-1]=arguments[l];const c=s?s.map(M):[];d&&w&&c.push((e=>{const r=v((0,o.default)({},e,{defaultTheme:n,themeId:t}));if(!r.components||!r.components[d]||!r.components[d].styleOverrides)return null;const i=r.components[d].styleOverrides,a={};return Object.entries(i).forEach((t=>{let[n,i]=t;a[n]=x(i,(0,o.default)({},e,{theme:r}))})),w(e,a)})),d&&!_&&c.push((e=>{var r;const i=v((0,o.default)({},e,{defaultTheme:n,themeId:t}));return x({variants:null==i||null==(r=i.components)||null==(r=r[d])?void 0:r.variants},(0,o.default)({},e,{theme:i}))})),A||c.push(u);const h=c.length-s.length;if(Array.isArray(r)&&h>0){const e=new Array(h).fill("");i=[...r,...e],i.raw=[...r.raw,...e]}const p=C(i,...c);return e.muiName&&(p.muiName=e.muiName),p};return C.withConfig&&(I.withConfig=C.withConfig),I}};var o=r(n(4634)),i=r(n(4893)),a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(n(3174)),s=n(9482),l=(r(n(7918)),r(n(3382)),r(n(4989))),c=r(n(3234));const u=["ownerState"],d=["variants"],h=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function f(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}const g=(0,l.default)(),m=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function v(e){let{defaultTheme:t,theme:n,themeId:r}=e;return o=n,0===Object.keys(o).length?t:n[r]||n;var o}function y(e){return e?(t,n)=>n[e]:null}function x(e,t){let{ownerState:n}=t,r=(0,i.default)(t,u);const a="function"===typeof e?e((0,o.default)({ownerState:n},r)):e;if(Array.isArray(a))return a.flatMap((e=>x(e,(0,o.default)({ownerState:n},r))));if(a&&"object"===typeof a&&Array.isArray(a.variants)){const{variants:e=[]}=a;let t=(0,i.default)(a,d);return e.forEach((e=>{let i=!0;"function"===typeof e.props?i=e.props((0,o.default)({ownerState:n},r,n)):Object.keys(e.props).forEach((t=>{(null==n?void 0:n[t])!==e.props[t]&&r[t]!==e.props[t]&&(i=!1)})),i&&(Array.isArray(t)||(t=[t]),t.push("function"===typeof e.style?e.style((0,o.default)({ownerState:n},r,n)):e.style))})),t}return a}},9751:(e,t,n)=>{"use strict";n.d(t,{EU:()=>s,NI:()=>a,iZ:()=>c,kW:()=>u,vf:()=>l,zu:()=>o});var r=n(9172);const o={xs:0,sm:600,md:900,lg:1200,xl:1536},i={keys:["xs","sm","md","lg","xl"],up:e=>"@media (min-width:".concat(o[e],"px)")};function a(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||i;return t.reduce(((r,o,i)=>(r[e.up(e.keys[i])]=n(t[i]),r)),{})}if("object"===typeof t){const e=r.breakpoints||i;return Object.keys(t).reduce(((r,i)=>{if(-1!==Object.keys(e.values||o).indexOf(i)){r[e.up(i)]=n(t[i],i)}else{const e=i;r[e]=t[e]}return r}),{})}return n(t)}function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;return(null==(t=e.keys)?void 0:t.reduce(((t,n)=>(t[e.up(n)]={},t)),{}))||{}}function l(e,t){return e.reduce(((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}function c(e){const t=s(e);for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];const a=[t,...o].reduce(((e,t)=>(0,r.A)(e,t)),{});return l(Object.keys(t),a)}function u(e){let{values:t,breakpoints:n,base:r}=e;const o=r||function(e,t){if("object"!==typeof e)return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach(((t,r)=>{r<e.length&&(n[t]=!0)})):r.forEach((t=>{null!=e[t]&&(n[t]=!0)})),n}(t,n),i=Object.keys(o);if(0===i.length)return t;let a;return i.reduce(((e,n,r)=>(Array.isArray(t)?(e[n]=null!=t[r]?t[r]:t[a],a=r):"object"===typeof t?(e[n]=null!=t[n]?t[n]:t[a],a=n):e[n]=t,e)),{})}},9703:(e,t,n)=>{"use strict";function r(e,t){const n=this;if(n.vars&&"function"===typeof n.getColorSchemeSelector){const r=n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)");return{[r]:t}}return n.palette.mode===e?t:{}}n.d(t,{A:()=>r})},4853:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(8587),o=n(8168);const i=["values","unit","step"],a=e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>(0,o.A)({},e,{[t.key]:t.val})),{})};function s(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:s=5}=e,l=(0,r.A)(e,i),c=a(t),u=Object.keys(c);function d(e){const r="number"===typeof t[e]?t[e]:e;return"@media (min-width:".concat(r).concat(n,")")}function h(e){const r="number"===typeof t[e]?t[e]:e;return"@media (max-width:".concat(r-s/100).concat(n,")")}function p(e,r){const o=u.indexOf(r);return"@media (min-width:".concat("number"===typeof t[e]?t[e]:e).concat(n,") and ")+"(max-width:".concat((-1!==o&&"number"===typeof t[u[o]]?t[u[o]]:r)-s/100).concat(n,")")}return(0,o.A)({keys:u,values:c,up:d,down:h,between:p,only:function(e){return u.indexOf(e)+1<u.length?p(e,u[u.indexOf(e)+1]):d(e)},not:function(e){const t=u.indexOf(e);return 0===t?d(u[1]):t===u.length-1?h(u[t]):p(e,u[u.indexOf(e)+1]).replace("@media","@media not all and")},unit:n},l)}},8280:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var r=n(8168),o=n(8587),i=n(9172),a=n(4853);const s={borderRadius:4};var l=n(8604);var c=n(8812),u=n(7758),d=n(9703);const h=["breakpoints","palette","spacing","shape"];const p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{breakpoints:t={},palette:n={},spacing:p,shape:f={}}=e,g=(0,o.A)(e,h),m=(0,a.A)(t),v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;const t=(0,l.LX)({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(0===n.length?[1]:n).map((e=>{const n=t(e);return"number"===typeof n?"".concat(n,"px"):n})).join(" ")};return n.mui=!0,n}(p);let y=(0,i.A)({breakpoints:m,direction:"ltr",components:{},palette:(0,r.A)({mode:"light"},n),spacing:v,shape:(0,r.A)({},s,f)},g);y.applyStyles=d.A;for(var x=arguments.length,b=new Array(x>1?x-1:0),w=1;w<x;w++)b[w-1]=arguments[w];return y=b.reduce(((e,t)=>(0,i.A)(e,t)),y),y.unstable_sxConfig=(0,r.A)({},u.A,null==g?void 0:g.unstable_sxConfig),y.unstable_sx=function(e){return(0,c.A)({sx:e,theme:this})},y}},4989:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.A,private_createBreakpoints:()=>o.A,unstable_applyStyles:()=>i.A});var r=n(8280),o=n(4853),i=n(9703)},3815:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(9172);const o=function(e,t){return t?(0,r.A)(e,t,{clone:!1}):e}},8604:(e,t,n)=>{"use strict";n.d(t,{LX:()=>f,MA:()=>p,_W:()=>g,Lc:()=>y,Ms:()=>x});var r=n(9751),o=n(7162),i=n(3815);const a={m:"margin",p:"padding"},s={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},l={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},c=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}((e=>{if(e.length>2){if(!l[e])return[e];e=l[e]}const[t,n]=e.split(""),r=a[t],o=s[n]||"";return Array.isArray(o)?o.map((e=>r+e)):[r+o]})),u=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],d=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],h=[...u,...d];function p(e,t,n,r){var i;const a=null!=(i=(0,o.Yn)(e,t,!1))?i:n;return"number"===typeof a?e=>"string"===typeof e?e:a*e:Array.isArray(a)?e=>"string"===typeof e?e:a[e]:"function"===typeof a?a:()=>{}}function f(e){return p(e,"spacing",8)}function g(e,t){if("string"===typeof t||null==t)return t;const n=e(Math.abs(t));return t>=0?n:"number"===typeof n?-n:"-".concat(n)}function m(e,t,n,o){if(-1===t.indexOf(n))return null;const i=function(e,t){return n=>e.reduce(((e,r)=>(e[r]=g(t,n),e)),{})}(c(n),o),a=e[n];return(0,r.NI)(e,a,i)}function v(e,t){const n=f(e.theme);return Object.keys(e).map((r=>m(e,t,r,n))).reduce(i.A,{})}function y(e){return v(e,u)}function x(e){return v(e,d)}function b(e){return v(e,h)}y.propTypes={},y.filterProps=u,x.propTypes={},x.filterProps=d,b.propTypes={},b.filterProps=h},7162:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>s,BO:()=>a,Yn:()=>i});var r=n(7598),o=n(9751);function i(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!t||"string"!==typeof t)return null;if(e&&e.vars&&n){const n="vars.".concat(t).split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=n)return n}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function a(e,t,n){let r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;return r="function"===typeof e?e(n):Array.isArray(e)?e[n]||o:i(e,n)||o,t&&(r=t(r,o,e)),r}const s=function(e){const{prop:t,cssProperty:n=e.prop,themeKey:s,transform:l}=e,c=e=>{if(null==e[t])return null;const c=e[t],u=i(e.theme,s)||{};return(0,o.NI)(e,c,(e=>{let o=a(u,l,e);return e===o&&"string"===typeof e&&(o=a(u,l,"".concat(t).concat("default"===e?"":(0,r.A)(e)),e)),!1===n?o:{[n]:o}}))};return c.propTypes={},c.filterProps=[t],c}},7758:(e,t,n)=>{"use strict";n.d(t,{A:()=>R});var r=n(8604),o=n(7162),i=n(3815);const a=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t.reduce(((e,t)=>(t.filterProps.forEach((n=>{e[n]=t})),e)),{}),o=e=>Object.keys(e).reduce(((t,n)=>r[n]?(0,i.A)(t,r[n](e)):t),{});return o.propTypes={},o.filterProps=t.reduce(((e,t)=>e.concat(t.filterProps)),[]),o};var s=n(9751);function l(e){return"number"!==typeof e?e:"".concat(e,"px solid")}function c(e,t){return(0,o.Ay)({prop:e,themeKey:"borders",transform:t})}const u=c("border",l),d=c("borderTop",l),h=c("borderRight",l),p=c("borderBottom",l),f=c("borderLeft",l),g=c("borderColor"),m=c("borderTopColor"),v=c("borderRightColor"),y=c("borderBottomColor"),x=c("borderLeftColor"),b=c("outline",l),w=c("outlineColor"),S=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=(0,r.MA)(e.theme,"shape.borderRadius",4,"borderRadius"),n=e=>({borderRadius:(0,r._W)(t,e)});return(0,s.NI)(e,e.borderRadius,n)}return null};S.propTypes={},S.filterProps=["borderRadius"];a(u,d,h,p,f,g,m,v,y,x,S,b,w);const _=e=>{if(void 0!==e.gap&&null!==e.gap){const t=(0,r.MA)(e.theme,"spacing",8,"gap"),n=e=>({gap:(0,r._W)(t,e)});return(0,s.NI)(e,e.gap,n)}return null};_.propTypes={},_.filterProps=["gap"];const A=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=(0,r.MA)(e.theme,"spacing",8,"columnGap"),n=e=>({columnGap:(0,r._W)(t,e)});return(0,s.NI)(e,e.columnGap,n)}return null};A.propTypes={},A.filterProps=["columnGap"];const k=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=(0,r.MA)(e.theme,"spacing",8,"rowGap"),n=e=>({rowGap:(0,r._W)(t,e)});return(0,s.NI)(e,e.rowGap,n)}return null};k.propTypes={},k.filterProps=["rowGap"];a(_,A,k,(0,o.Ay)({prop:"gridColumn"}),(0,o.Ay)({prop:"gridRow"}),(0,o.Ay)({prop:"gridAutoFlow"}),(0,o.Ay)({prop:"gridAutoColumns"}),(0,o.Ay)({prop:"gridAutoRows"}),(0,o.Ay)({prop:"gridTemplateColumns"}),(0,o.Ay)({prop:"gridTemplateRows"}),(0,o.Ay)({prop:"gridTemplateAreas"}),(0,o.Ay)({prop:"gridArea"}));function C(e,t){return"grey"===t?t:e}a((0,o.Ay)({prop:"color",themeKey:"palette",transform:C}),(0,o.Ay)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:C}),(0,o.Ay)({prop:"backgroundColor",themeKey:"palette",transform:C}));function M(e){return e<=1&&0!==e?"".concat(100*e,"%"):e}const I=(0,o.Ay)({prop:"width",transform:M}),T=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var n,r;const o=(null==(n=e.theme)||null==(n=n.breakpoints)||null==(n=n.values)?void 0:n[t])||s.zu[t];return o?"px"!==(null==(r=e.theme)||null==(r=r.breakpoints)?void 0:r.unit)?{maxWidth:"".concat(o).concat(e.theme.breakpoints.unit)}:{maxWidth:o}:{maxWidth:M(t)}};return(0,s.NI)(e,e.maxWidth,t)}return null};T.filterProps=["maxWidth"];const D=(0,o.Ay)({prop:"minWidth",transform:M}),j=(0,o.Ay)({prop:"height",transform:M}),P=(0,o.Ay)({prop:"maxHeight",transform:M}),L=(0,o.Ay)({prop:"minHeight",transform:M}),R=((0,o.Ay)({prop:"size",cssProperty:"width",transform:M}),(0,o.Ay)({prop:"size",cssProperty:"height",transform:M}),a(I,T,D,j,P,L,(0,o.Ay)({prop:"boxSizing"})),{border:{themeKey:"borders",transform:l},borderTop:{themeKey:"borders",transform:l},borderRight:{themeKey:"borders",transform:l},borderBottom:{themeKey:"borders",transform:l},borderLeft:{themeKey:"borders",transform:l},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:l},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:S},color:{themeKey:"palette",transform:C},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:C},backgroundColor:{themeKey:"palette",transform:C},p:{style:r.Ms},pt:{style:r.Ms},pr:{style:r.Ms},pb:{style:r.Ms},pl:{style:r.Ms},px:{style:r.Ms},py:{style:r.Ms},padding:{style:r.Ms},paddingTop:{style:r.Ms},paddingRight:{style:r.Ms},paddingBottom:{style:r.Ms},paddingLeft:{style:r.Ms},paddingX:{style:r.Ms},paddingY:{style:r.Ms},paddingInline:{style:r.Ms},paddingInlineStart:{style:r.Ms},paddingInlineEnd:{style:r.Ms},paddingBlock:{style:r.Ms},paddingBlockStart:{style:r.Ms},paddingBlockEnd:{style:r.Ms},m:{style:r.Lc},mt:{style:r.Lc},mr:{style:r.Lc},mb:{style:r.Lc},ml:{style:r.Lc},mx:{style:r.Lc},my:{style:r.Lc},margin:{style:r.Lc},marginTop:{style:r.Lc},marginRight:{style:r.Lc},marginBottom:{style:r.Lc},marginLeft:{style:r.Lc},marginX:{style:r.Lc},marginY:{style:r.Lc},marginInline:{style:r.Lc},marginInlineStart:{style:r.Lc},marginInlineEnd:{style:r.Lc},marginBlock:{style:r.Lc},marginBlockStart:{style:r.Lc},marginBlockEnd:{style:r.Lc},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:_},rowGap:{style:k},columnGap:{style:A},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:M},maxWidth:{style:T},minWidth:{transform:M},height:{transform:M},maxHeight:{transform:M},minHeight:{transform:M},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}})},8698:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(8168),o=n(8587),i=n(9172),a=n(7758);const s=["sx"],l=e=>{var t,n;const r={systemProps:{},otherProps:{}},o=null!=(t=null==e||null==(n=e.theme)?void 0:n.unstable_sxConfig)?t:a.A;return Object.keys(e).forEach((t=>{o[t]?r.systemProps[t]=e[t]:r.otherProps[t]=e[t]})),r};function c(e){const{sx:t}=e,n=(0,o.A)(e,s),{systemProps:a,otherProps:c}=l(n);let u;return u=Array.isArray(t)?[a,...t]:"function"===typeof t?function(){const e=t(...arguments);return(0,i.Q)(e)?(0,r.A)({},a,e):a}:(0,r.A)({},a,t),(0,r.A)({},c,{sx:u})}},3234:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.A,extendSxProp:()=>o.A,unstable_createStyleFunctionSx:()=>r.k,unstable_defaultSxConfig:()=>i.A});var r=n(8812),o=n(8698),i=n(7758)},8812:(e,t,n)=>{"use strict";n.d(t,{A:()=>u,k:()=>l});var r=n(7598),o=n(3815),i=n(7162),a=n(9751),s=n(7758);function l(){function e(e,t,n,o){const s={[e]:t,theme:n},l=o[e];if(!l)return{[e]:t};const{cssProperty:c=e,themeKey:u,transform:d,style:h}=l;if(null==t)return null;if("typography"===u&&"inherit"===t)return{[e]:t};const p=(0,i.Yn)(n,u)||{};if(h)return h(s);return(0,a.NI)(s,t,(t=>{let n=(0,i.BO)(p,d,t);return t===n&&"string"===typeof t&&(n=(0,i.BO)(p,d,"".concat(e).concat("default"===t?"":(0,r.A)(t)),t)),!1===c?n:{[c]:n}}))}return function t(n){var r;const{sx:i,theme:l={}}=n||{};if(!i)return null;const c=null!=(r=l.unstable_sxConfig)?r:s.A;function u(n){let r=n;if("function"===typeof n)r=n(l);else if("object"!==typeof n)return n;if(!r)return null;const i=(0,a.EU)(l.breakpoints),s=Object.keys(i);let u=i;return Object.keys(r).forEach((n=>{const i=(s=r[n],d=l,"function"===typeof s?s(d):s);var s,d;if(null!==i&&void 0!==i)if("object"===typeof i)if(c[n])u=(0,o.A)(u,e(n,i,l,c));else{const e=(0,a.NI)({theme:l},i,(e=>({[n]:e})));!function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t.reduce(((e,t)=>e.concat(Object.keys(t))),[]),o=new Set(r);return t.every((e=>o.size===Object.keys(e).length))}(e,i)?u=(0,o.A)(u,e):u[n]=t({sx:i,theme:l})}else u=(0,o.A)(u,e(n,i,l,c))})),(0,a.vf)(s,u)}return Array.isArray(i)?i.map(u):u(i)}}const c=l();c.filterProps=["sx"];const u=c},9386:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const r=e=>e,o=(()=>{let e=r;return{configure(t){e=t},generate:t=>e(t),reset(){e=r}}})()},7598:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(7868);function o(e){if("string"!==typeof e)throw new Error((0,r.A)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},7918:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.A});var r=n(7598)},1188:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MIN_SAFE_INTEGER,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.MAX_SAFE_INTEGER;return Math.max(t,Math.min(e,n))}},6531:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.A});var r=n(1188)},8610:(e,t,n)=>{"use strict";function r(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const r={};return Object.keys(e).forEach((o=>{r[o]=e[o].reduce(((e,r)=>{if(r){const o=t(r);""!==o&&e.push(o),n&&n[r]&&e.push(n[r])}return e}),[]).join(" ")})),r}n.d(t,{A:()=>r})},2456:(e,t,n)=>{"use strict";function r(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(((e,t)=>null==t?e:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];e.apply(this,r),t.apply(this,r)}),(()=>{}))}n.d(t,{A:()=>r})},3468:(e,t,n)=>{"use strict";function r(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];clearTimeout(t),t=setTimeout((()=>{e.apply(this,o)}),n)}return r.clear=()=>{clearTimeout(t)},r}n.d(t,{A:()=>r})},9172:(e,t,n)=>{"use strict";n.d(t,{A:()=>a,Q:()=>o});var r=n(8168);function o(e){if("object"!==typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function i(e){if(!o(e))return e;const t={};return Object.keys(e).forEach((n=>{t[n]=i(e[n])})),t}function a(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0};const s=n.clone?(0,r.A)({},e):e;return o(e)&&o(t)&&Object.keys(t).forEach((r=>{o(t[r])&&Object.prototype.hasOwnProperty.call(e,r)&&o(e[r])?s[r]=a(e[r],t[r],n):n.clone?s[r]=o(t[r])?i(t[r]):t[r]:s[r]=t[r]})),s}},9482:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.A,isPlainObject:()=>r.Q});var r=n(9172)},7868:(e,t,n)=>{"use strict";function r(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}n.d(t,{A:()=>r})},457:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.A});var r=n(7868)},2372:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>i});var r=n(9386);const o={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function i(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui";const i=o[t];return i?"".concat(n,"-").concat(i):"".concat(r.A.generate(e),"-").concat(t)}},2532:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(2372);function o(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui";const o={};return t.forEach((t=>{o[t]=(0,r.Ay)(e,t,n)})),o}},3382:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l,getFunctionName:()=>i});var r=n(9565);const o=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function i(e){const t="".concat(e).match(o);return t&&t[1]||""}function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.displayName||e.name||i(e)||t}function s(e,t,n){const r=a(t);return e.displayName||(""!==r?"".concat(n,"(").concat(r,")"):n)}function l(e){if(null!=e){if("string"===typeof e)return e;if("function"===typeof e)return a(e,"Component");if("object"===typeof e)switch(e.$$typeof){case r.ForwardRef:return s(e,e.render,"ForwardRef");case r.Memo:return s(e,e.type,"memo");default:return}}}},1668:(e,t,n)=>{"use strict";function r(e){return e&&e.ownerDocument||document}n.d(t,{A:()=>r})},3940:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(1668);function o(e){return(0,r.A)(e).defaultView||window}},3030:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(8168);function o(e,t){const n=(0,r.A)({},t);return Object.keys(e).forEach((i=>{if(i.toString().match(/^(components|slots)$/))n[i]=(0,r.A)({},e[i],n[i]);else if(i.toString().match(/^(componentsProps|slotProps)$/)){const a=e[i]||{},s=t[i];n[i]={},s&&Object.keys(s)?a&&Object.keys(a)?(n[i]=(0,r.A)({},s),Object.keys(a).forEach((e=>{n[i][e]=o(a[e],s[e])}))):n[i]=s:n[i]=a}else void 0===n[i]&&(n[i]=e[i])})),n}},6564:(e,t,n)=>{"use strict";function r(e,t){"function"===typeof e?e(t):e&&(e.current=t)}n.d(t,{A:()=>r})},1052:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(5043);function o(e){let{controlled:t,default:n,name:o,state:i="value"}=e;const{current:a}=r.useRef(void 0!==t),[s,l]=r.useState(n);return[a?t:s,r.useCallback((e=>{a||l(e)}),[])]}},4440:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(5043);const o="undefined"!==typeof window?r.useLayoutEffect:r.useEffect},1782:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(5043),o=n(4440);const i=function(e){const t=r.useRef(e);return(0,o.A)((()=>{t.current=e})),r.useRef((function(){return(0,t.current)(...arguments)})).current}},3462:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(5043),o=n(6564);function i(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.useMemo((()=>t.every((e=>null==e))?null:e=>{t.forEach((t=>{(0,o.A)(t,e)}))}),t)}},5844:(e,t,n)=>{"use strict";var r;n.d(t,{A:()=>s});var o=n(5043);let i=0;const a=(r||(r=n.t(o,2)))["useId".toString()];function s(e){if(void 0!==a){const t=a();return null!=e?e:t}return function(e){const[t,n]=o.useState(e),r=e||t;return o.useEffect((()=>{null==t&&(i+=1,n("mui-".concat(i)))}),[t]),r}(e)}},9640:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var r=n(5043),o=n(9303);let i=!0,a=!1;const s=new o.E,l={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function c(e){e.metaKey||e.altKey||e.ctrlKey||(i=!0)}function u(){i=!1}function d(){"hidden"===this.visibilityState&&a&&(i=!0)}function h(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(n){}return i||function(e){const{type:t,tagName:n}=e;return!("INPUT"!==n||!l[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}function p(){const e=r.useCallback((e=>{var t;null!=e&&((t=e.ownerDocument).addEventListener("keydown",c,!0),t.addEventListener("mousedown",u,!0),t.addEventListener("pointerdown",u,!0),t.addEventListener("touchstart",u,!0),t.addEventListener("visibilitychange",d,!0))}),[]),t=r.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!h(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(a=!0,s.start(100,(()=>{a=!1})),t.current=!1,!0)},ref:e}}},9303:(e,t,n)=>{"use strict";n.d(t,{E:()=>a,A:()=>s});var r=n(5043);const o={};const i=[];class a{constructor(){this.currentId=null,this.clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new a}start(e,t){this.clear(),this.currentId=setTimeout((()=>{this.currentId=null,t()}),e)}}function s(){const e=function(e,t){const n=r.useRef(o);return n.current===o&&(n.current=e(t)),n}(a.create).current;var t;return t=e.disposeEffect,r.useEffect(t,i),e}},8609:(e,t)=>{"use strict";var n,r=Symbol.for("react.element"),o=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen");function v(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case i:case s:case a:case h:case p:return e;default:switch(e=e&&e.$$typeof){case u:case c:case d:case g:case f:case l:return e;default:return t}}case o:return t}}}n=Symbol.for("react.module.reference"),t.ForwardRef=d,t.Memo=f},9565:(e,t,n)=>{"use strict";e.exports=n(8609)},219:(e,t,n)=>{"use strict";var r=n(3763),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(f){var o=p(n);o&&o!==f&&e(t,o,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=l(t),g=l(n),m=0;m<a.length;++m){var v=a[m];if(!i[v]&&(!r||!r[v])&&(!g||!g[v])&&(!s||!s[v])){var y=h(n,v);try{c(t,v,y)}catch(x){}}}}return t}},4983:(e,t)=>{"use strict";var n="function"===typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,h=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,f=n?Symbol.for("react.suspense_list"):60120,g=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,x=n?Symbol.for("react.responder"):60118,b=n?Symbol.for("react.scope"):60119;function w(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case i:case s:case a:case p:return e;default:switch(e=e&&e.$$typeof){case c:case h:case m:case g:case l:return e;default:return t}}case o:return t}}}function S(e){return w(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=h,t.Fragment=i,t.Lazy=m,t.Memo=g,t.Portal=o,t.Profiler=s,t.StrictMode=a,t.Suspense=p,t.isAsyncMode=function(e){return S(e)||w(e)===u},t.isConcurrentMode=S,t.isContextConsumer=function(e){return w(e)===c},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===h},t.isFragment=function(e){return w(e)===i},t.isLazy=function(e){return w(e)===m},t.isMemo=function(e){return w(e)===g},t.isPortal=function(e){return w(e)===o},t.isProfiler=function(e){return w(e)===s},t.isStrictMode=function(e){return w(e)===a},t.isSuspense=function(e){return w(e)===p},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===i||e===d||e===s||e===a||e===p||e===f||"object"===typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===g||e.$$typeof===l||e.$$typeof===c||e.$$typeof===h||e.$$typeof===y||e.$$typeof===x||e.$$typeof===b||e.$$typeof===v)},t.typeOf=w},3763:(e,t,n)=>{"use strict";e.exports=n(4983)},1497:(e,t,n)=>{"use strict";var r=n(3218);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},5173:(e,t,n)=>{e.exports=n(1497)()},3218:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},2730:(e,t,n)=>{"use strict";var r=n(5043),o=n(8853);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,s={};function l(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(s[e]=t,e=0;e<t.length;e++)a.add(t[e])}var u=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),d=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},f={};function g(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var m={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){m[e]=new g(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];m[t]=new g(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){m[e]=new g(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){m[e]=new g(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){m[e]=new g(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){m[e]=new g(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){m[e]=new g(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){m[e]=new g(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){m[e]=new g(e,5,!1,e.toLowerCase(),null,!1,!1)}));var v=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}function x(e,t,n,r){var o=m.hasOwnProperty(t)?m[t]:null;(null!==o?0!==o.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!d.call(f,e)||!d.call(p,e)&&(h.test(e)?f[e]=!0:(p[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(v,y);m[t]=new g(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(v,y);m[t]=new g(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(v,y);m[t]=new g(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){m[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)})),m.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){m[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)}));var b=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.element"),S=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),M=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),P=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var L=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var R=Symbol.iterator;function E(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=R&&e[R]||e["@@iterator"])?e:null}var N,O=Object.assign;function z(e){if(void 0===N)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);N=t&&t[1]||""}return"\n"+N+e}var B=!1;function F(e,t){if(!e||B)return"";B=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&"string"===typeof c.stack){for(var o=c.stack.split("\n"),i=r.stack.split("\n"),a=o.length-1,s=i.length-1;1<=a&&0<=s&&o[a]!==i[s];)s--;for(;1<=a&&0<=s;a--,s--)if(o[a]!==i[s]){if(1!==a||1!==s)do{if(a--,0>--s||o[a]!==i[s]){var l="\n"+o[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=a&&0<=s);break}}}finally{B=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?z(e):""}function V(e){switch(e.tag){case 5:return z(e.type);case 16:return z("Lazy");case 13:return z("Suspense");case 19:return z("SuspenseList");case 0:case 2:case 15:return e=F(e.type,!1);case 11:return e=F(e.type.render,!1);case 1:return e=F(e.type,!0);default:return""}}function W(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case _:return"Fragment";case S:return"Portal";case k:return"Profiler";case A:return"StrictMode";case T:return"Suspense";case D:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case M:return(e.displayName||"Context")+".Consumer";case C:return(e._context.displayName||"Context")+".Provider";case I:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case j:return null!==(t=e.displayName||null)?t:W(e.type)||"Memo";case P:t=e._payload,e=e._init;try{return W(e(t))}catch(n){}}return null}function H(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return W(t);case 8:return t===A?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t}return null}function G(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function U(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function X(e){e._valueTracker||(e._valueTracker=function(e){var t=U(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Y(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=U(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function q(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Z(e,t){var n=t.checked;return O({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function K(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=G(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function $(e,t){null!=(t=t.checked)&&x(e,"checked",t,!1)}function Q(e,t){$(e,t);var n=G(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,G(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function J(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&q(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+G(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(i(91));return O({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function oe(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(i(92));if(te(n)){if(1<n.length)throw Error(i(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:G(n)}}function ie(e,t){var n=G(t.value),r=G(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ae(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function se(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?se(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ce,ue,de=(ue=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ce=ce||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ce.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ue(e,t)}))}:ue);function he(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var pe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},fe=["Webkit","ms","Moz","O"];function ge(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||pe.hasOwnProperty(e)&&pe[e]?(""+t).trim():t+"px"}function me(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=ge(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(pe).forEach((function(e){fe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pe[t]=pe[e]}))}));var ve=O({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ye(e,t){if(t){if(ve[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(i(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(i(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(i(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(i(62))}}function xe(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var be=null;function we(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Se=null,_e=null,Ae=null;function ke(e){if(e=bo(e)){if("function"!==typeof Se)throw Error(i(280));var t=e.stateNode;t&&(t=So(t),Se(e.stateNode,e.type,t))}}function Ce(e){_e?Ae?Ae.push(e):Ae=[e]:_e=e}function Me(){if(_e){var e=_e,t=Ae;if(Ae=_e=null,ke(e),t)for(e=0;e<t.length;e++)ke(t[e])}}function Ie(e,t){return e(t)}function Te(){}var De=!1;function je(e,t,n){if(De)return e(t,n);De=!0;try{return Ie(e,t,n)}finally{De=!1,(null!==_e||null!==Ae)&&(Te(),Me())}}function Pe(e,t){var n=e.stateNode;if(null===n)return null;var r=So(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(i(231,t,typeof n));return n}var Le=!1;if(u)try{var Re={};Object.defineProperty(Re,"passive",{get:function(){Le=!0}}),window.addEventListener("test",Re,Re),window.removeEventListener("test",Re,Re)}catch(ue){Le=!1}function Ee(e,t,n,r,o,i,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var Ne=!1,Oe=null,ze=!1,Be=null,Fe={onError:function(e){Ne=!0,Oe=e}};function Ve(e,t,n,r,o,i,a,s,l){Ne=!1,Oe=null,Ee.apply(Fe,arguments)}function We(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function He(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Ge(e){if(We(e)!==e)throw Error(i(188))}function Ue(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=We(e)))throw Error(i(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var a=o.alternate;if(null===a){if(null!==(r=o.return)){n=r;continue}break}if(o.child===a.child){for(a=o.child;a;){if(a===n)return Ge(o),e;if(a===r)return Ge(o),t;a=a.sibling}throw Error(i(188))}if(n.return!==r.return)n=o,r=a;else{for(var s=!1,l=o.child;l;){if(l===n){s=!0,n=o,r=a;break}if(l===r){s=!0,r=o,n=a;break}l=l.sibling}if(!s){for(l=a.child;l;){if(l===n){s=!0,n=a,r=o;break}if(l===r){s=!0,r=a,n=o;break}l=l.sibling}if(!s)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(3!==n.tag)throw Error(i(188));return n.stateNode.current===n?e:t}(e))?Xe(e):null}function Xe(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Xe(e);if(null!==t)return t;e=e.sibling}return null}var Ye=o.unstable_scheduleCallback,qe=o.unstable_cancelCallback,Ze=o.unstable_shouldYield,Ke=o.unstable_requestPaint,$e=o.unstable_now,Qe=o.unstable_getCurrentPriorityLevel,Je=o.unstable_ImmediatePriority,et=o.unstable_UserBlockingPriority,tt=o.unstable_NormalPriority,nt=o.unstable_LowPriority,rt=o.unstable_IdlePriority,ot=null,it=null;var at=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(st(e)/lt|0)|0},st=Math.log,lt=Math.LN2;var ct=64,ut=4194304;function dt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ht(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~o;0!==s?r=dt(s):0!==(i&=a)&&(r=dt(i))}else 0!==(a=n&~o)?r=dt(a):0!==i&&(r=dt(i));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&o)&&((o=r&-r)>=(i=t&-t)||16===o&&0!==(4194240&i)))return t;if(0!==(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-at(t)),r|=e[n],t&=~o;return r}function pt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function ft(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function gt(){var e=ct;return 0===(4194240&(ct<<=1))&&(ct=64),e}function mt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function vt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-at(t)]=n}function yt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-at(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var xt=0;function bt(e){return 1<(e&=-e)?4<e?0!==(268435455&e)?16:536870912:4:1}var wt,St,_t,At,kt,Ct=!1,Mt=[],It=null,Tt=null,Dt=null,jt=new Map,Pt=new Map,Lt=[],Rt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Et(e,t){switch(e){case"focusin":case"focusout":It=null;break;case"dragenter":case"dragleave":Tt=null;break;case"mouseover":case"mouseout":Dt=null;break;case"pointerover":case"pointerout":jt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pt.delete(t.pointerId)}}function Nt(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},null!==t&&(null!==(t=bo(t))&&St(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function Ot(e){var t=xo(e.target);if(null!==t){var n=We(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=He(n)))return e.blockedOn=t,void kt(e.priority,(function(){_t(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function zt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Zt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=bo(n))&&St(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);be=r,n.target.dispatchEvent(r),be=null,t.shift()}return!0}function Bt(e,t,n){zt(e)&&n.delete(t)}function Ft(){Ct=!1,null!==It&&zt(It)&&(It=null),null!==Tt&&zt(Tt)&&(Tt=null),null!==Dt&&zt(Dt)&&(Dt=null),jt.forEach(Bt),Pt.forEach(Bt)}function Vt(e,t){e.blockedOn===t&&(e.blockedOn=null,Ct||(Ct=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Ft)))}function Wt(e){function t(t){return Vt(t,e)}if(0<Mt.length){Vt(Mt[0],e);for(var n=1;n<Mt.length;n++){var r=Mt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==It&&Vt(It,e),null!==Tt&&Vt(Tt,e),null!==Dt&&Vt(Dt,e),jt.forEach(t),Pt.forEach(t),n=0;n<Lt.length;n++)(r=Lt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Lt.length&&null===(n=Lt[0]).blockedOn;)Ot(n),null===n.blockedOn&&Lt.shift()}var Ht=b.ReactCurrentBatchConfig,Gt=!0;function Ut(e,t,n,r){var o=xt,i=Ht.transition;Ht.transition=null;try{xt=1,Yt(e,t,n,r)}finally{xt=o,Ht.transition=i}}function Xt(e,t,n,r){var o=xt,i=Ht.transition;Ht.transition=null;try{xt=4,Yt(e,t,n,r)}finally{xt=o,Ht.transition=i}}function Yt(e,t,n,r){if(Gt){var o=Zt(e,t,n,r);if(null===o)Gr(e,t,r,qt,n),Et(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return It=Nt(It,e,t,n,r,o),!0;case"dragenter":return Tt=Nt(Tt,e,t,n,r,o),!0;case"mouseover":return Dt=Nt(Dt,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return jt.set(i,Nt(jt.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Pt.set(i,Nt(Pt.get(i)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(Et(e,r),4&t&&-1<Rt.indexOf(e)){for(;null!==o;){var i=bo(o);if(null!==i&&wt(i),null===(i=Zt(e,t,n,r))&&Gr(e,t,r,qt,n),i===o)break;o=i}null!==o&&r.stopPropagation()}else Gr(e,t,r,null,n)}}var qt=null;function Zt(e,t,n,r){if(qt=null,null!==(e=xo(e=we(r))))if(null===(t=We(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=He(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return qt=e,null}function Kt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Qe()){case Je:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var $t=null,Qt=null,Jt=null;function en(){if(Jt)return Jt;var e,t,n=Qt,r=n.length,o="value"in $t?$t.value:$t.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return Jt=o.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function on(e){function t(t,n,r,o,i){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(o):o[a]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return O(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var an,sn,ln,cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},un=on(cn),dn=O({},cn,{view:0,detail:0}),hn=on(dn),pn=O({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:kn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ln&&(ln&&"mousemove"===e.type?(an=e.screenX-ln.screenX,sn=e.screenY-ln.screenY):sn=an=0,ln=e),an)},movementY:function(e){return"movementY"in e?e.movementY:sn}}),fn=on(pn),gn=on(O({},pn,{dataTransfer:0})),mn=on(O({},dn,{relatedTarget:0})),vn=on(O({},cn,{animationName:0,elapsedTime:0,pseudoElement:0})),yn=O({},cn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),xn=on(yn),bn=on(O({},cn,{data:0})),wn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},_n={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function An(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=_n[e])&&!!t[e]}function kn(){return An}var Cn=O({},dn,{key:function(e){if(e.key){var t=wn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Sn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:kn,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Mn=on(Cn),In=on(O({},pn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Tn=on(O({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:kn})),Dn=on(O({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),jn=O({},pn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Pn=on(jn),Ln=[9,13,27,32],Rn=u&&"CompositionEvent"in window,En=null;u&&"documentMode"in document&&(En=document.documentMode);var Nn=u&&"TextEvent"in window&&!En,On=u&&(!Rn||En&&8<En&&11>=En),zn=String.fromCharCode(32),Bn=!1;function Fn(e,t){switch(e){case"keyup":return-1!==Ln.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Wn=!1;var Hn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Gn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Hn[e.type]:"textarea"===t}function Un(e,t,n,r){Ce(r),0<(t=Xr(t,"onChange")).length&&(n=new un("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Xn=null,Yn=null;function qn(e){zr(e,0)}function Zn(e){if(Y(wo(e)))return e}function Kn(e,t){if("change"===e)return t}var $n=!1;if(u){var Qn;if(u){var Jn="oninput"in document;if(!Jn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Jn="function"===typeof er.oninput}Qn=Jn}else Qn=!1;$n=Qn&&(!document.documentMode||9<document.documentMode)}function tr(){Xn&&(Xn.detachEvent("onpropertychange",nr),Yn=Xn=null)}function nr(e){if("value"===e.propertyName&&Zn(Yn)){var t=[];Un(t,Yn,e,we(e)),je(qn,t)}}function rr(e,t,n){"focusin"===e?(tr(),Yn=n,(Xn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function or(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Zn(Yn)}function ir(e,t){if("click"===e)return Zn(t)}function ar(e,t){if("input"===e||"change"===e)return Zn(t)}var sr="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t};function lr(e,t){if(sr(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!d.call(t,o)||!sr(e[o],t[o]))return!1}return!0}function cr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ur(e,t){var n,r=cr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=cr(r)}}function dr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function hr(){for(var e=window,t=q();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=q((e=t.contentWindow).document)}return t}function pr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function fr(e){var t=hr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dr(n.ownerDocument.documentElement,n)){if(null!==r&&pr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=void 0===r.end?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=ur(n,i);var a=ur(n,r);o&&a&&(1!==e.rangeCount||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"===typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var gr=u&&"documentMode"in document&&11>=document.documentMode,mr=null,vr=null,yr=null,xr=!1;function br(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;xr||null==mr||mr!==q(r)||("selectionStart"in(r=mr)&&pr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},yr&&lr(yr,r)||(yr=r,0<(r=Xr(vr,"onSelect")).length&&(t=new un("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=mr)))}function wr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Sr={animationend:wr("Animation","AnimationEnd"),animationiteration:wr("Animation","AnimationIteration"),animationstart:wr("Animation","AnimationStart"),transitionend:wr("Transition","TransitionEnd")},_r={},Ar={};function kr(e){if(_r[e])return _r[e];if(!Sr[e])return e;var t,n=Sr[e];for(t in n)if(n.hasOwnProperty(t)&&t in Ar)return _r[e]=n[t];return e}u&&(Ar=document.createElement("div").style,"AnimationEvent"in window||(delete Sr.animationend.animation,delete Sr.animationiteration.animation,delete Sr.animationstart.animation),"TransitionEvent"in window||delete Sr.transitionend.transition);var Cr=kr("animationend"),Mr=kr("animationiteration"),Ir=kr("animationstart"),Tr=kr("transitionend"),Dr=new Map,jr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Pr(e,t){Dr.set(e,t),l(t,[e])}for(var Lr=0;Lr<jr.length;Lr++){var Rr=jr[Lr];Pr(Rr.toLowerCase(),"on"+(Rr[0].toUpperCase()+Rr.slice(1)))}Pr(Cr,"onAnimationEnd"),Pr(Mr,"onAnimationIteration"),Pr(Ir,"onAnimationStart"),Pr("dblclick","onDoubleClick"),Pr("focusin","onFocus"),Pr("focusout","onBlur"),Pr(Tr,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Er="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Nr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Er));function Or(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,a,s,l,c){if(Ve.apply(this,arguments),Ne){if(!Ne)throw Error(i(198));var u=Oe;Ne=!1,Oe=null,ze||(ze=!0,Be=u)}}(r,t,void 0,e),e.currentTarget=null}function zr(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==i&&o.isPropagationStopped())break e;Or(o,s,c),i=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,c=s.currentTarget,s=s.listener,l!==i&&o.isPropagationStopped())break e;Or(o,s,c),i=l}}}if(ze)throw e=Be,ze=!1,Be=null,e}function Br(e,t){var n=t[mo];void 0===n&&(n=t[mo]=new Set);var r=e+"__bubble";n.has(r)||(Hr(t,e,2,!1),n.add(r))}function Fr(e,t,n){var r=0;t&&(r|=4),Hr(n,e,r,t)}var Vr="_reactListening"+Math.random().toString(36).slice(2);function Wr(e){if(!e[Vr]){e[Vr]=!0,a.forEach((function(t){"selectionchange"!==t&&(Nr.has(t)||Fr(t,!1,e),Fr(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Vr]||(t[Vr]=!0,Fr("selectionchange",!1,t))}}function Hr(e,t,n,r){switch(Kt(t)){case 1:var o=Ut;break;case 4:o=Xt;break;default:o=Yt}n=o.bind(null,t,n,e),o=void 0,!Le||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Gr(e,t,n,r,o){var i=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===o||8===s.nodeType&&s.parentNode===o)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===o||8===l.nodeType&&l.parentNode===o))return;a=a.return}for(;null!==s;){if(null===(a=xo(s)))return;if(5===(l=a.tag)||6===l){r=i=a;continue e}s=s.parentNode}}r=r.return}je((function(){var r=i,o=we(n),a=[];e:{var s=Dr.get(e);if(void 0!==s){var l=un,c=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":l=Mn;break;case"focusin":c="focus",l=mn;break;case"focusout":c="blur",l=mn;break;case"beforeblur":case"afterblur":l=mn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=fn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=gn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Tn;break;case Cr:case Mr:case Ir:l=vn;break;case Tr:l=Dn;break;case"scroll":l=hn;break;case"wheel":l=Pn;break;case"copy":case"cut":case"paste":l=xn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=In}var u=0!==(4&t),d=!u&&"scroll"===e,h=u?null!==s?s+"Capture":null:s;u=[];for(var p,f=r;null!==f;){var g=(p=f).stateNode;if(5===p.tag&&null!==g&&(p=g,null!==h&&(null!=(g=Pe(f,h))&&u.push(Ur(f,g,p)))),d)break;f=f.return}0<u.length&&(s=new l(s,c,null,n,o),a.push({event:s,listeners:u}))}}if(0===(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===be||!(c=n.relatedTarget||n.fromElement)||!xo(c)&&!c[go])&&(l||s)&&(s=o.window===o?o:(s=o.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?xo(c):null)&&(c!==(d=We(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=fn,g="onMouseLeave",h="onMouseEnter",f="mouse","pointerout"!==e&&"pointerover"!==e||(u=In,g="onPointerLeave",h="onPointerEnter",f="pointer"),d=null==l?s:wo(l),p=null==c?s:wo(c),(s=new u(g,f+"leave",l,n,o)).target=d,s.relatedTarget=p,g=null,xo(o)===r&&((u=new u(h,f+"enter",c,n,o)).target=p,u.relatedTarget=d,g=u),d=g,l&&c)e:{for(h=c,f=0,p=u=l;p;p=Yr(p))f++;for(p=0,g=h;g;g=Yr(g))p++;for(;0<f-p;)u=Yr(u),f--;for(;0<p-f;)h=Yr(h),p--;for(;f--;){if(u===h||null!==h&&u===h.alternate)break e;u=Yr(u),h=Yr(h)}u=null}else u=null;null!==l&&qr(a,s,l,u,!1),null!==c&&null!==d&&qr(a,d,c,u,!0)}if("select"===(l=(s=r?wo(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var m=Kn;else if(Gn(s))if($n)m=ar;else{m=or;var v=rr}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(m=ir);switch(m&&(m=m(e,r))?Un(a,m,n,o):(v&&v(e,s,r),"focusout"===e&&(v=s._wrapperState)&&v.controlled&&"number"===s.type&&ee(s,"number",s.value)),v=r?wo(r):window,e){case"focusin":(Gn(v)||"true"===v.contentEditable)&&(mr=v,vr=r,yr=null);break;case"focusout":yr=vr=mr=null;break;case"mousedown":xr=!0;break;case"contextmenu":case"mouseup":case"dragend":xr=!1,br(a,n,o);break;case"selectionchange":if(gr)break;case"keydown":case"keyup":br(a,n,o)}var y;if(Rn)e:{switch(e){case"compositionstart":var x="onCompositionStart";break e;case"compositionend":x="onCompositionEnd";break e;case"compositionupdate":x="onCompositionUpdate";break e}x=void 0}else Wn?Fn(e,n)&&(x="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(x="onCompositionStart");x&&(On&&"ko"!==n.locale&&(Wn||"onCompositionStart"!==x?"onCompositionEnd"===x&&Wn&&(y=en()):(Qt="value"in($t=o)?$t.value:$t.textContent,Wn=!0)),0<(v=Xr(r,x)).length&&(x=new bn(x,e,null,n,o),a.push({event:x,listeners:v}),y?x.data=y:null!==(y=Vn(n))&&(x.data=y))),(y=Nn?function(e,t){switch(e){case"compositionend":return Vn(t);case"keypress":return 32!==t.which?null:(Bn=!0,zn);case"textInput":return(e=t.data)===zn&&Bn?null:e;default:return null}}(e,n):function(e,t){if(Wn)return"compositionend"===e||!Rn&&Fn(e,t)?(e=en(),Jt=Qt=$t=null,Wn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return On&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Xr(r,"onBeforeInput")).length&&(o=new bn("onBeforeInput","beforeinput",null,n,o),a.push({event:o,listeners:r}),o.data=y))}zr(a,t)}))}function Ur(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Xr(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,i=o.stateNode;5===o.tag&&null!==i&&(o=i,null!=(i=Pe(e,n))&&r.unshift(Ur(e,i,o)),null!=(i=Pe(e,t))&&r.push(Ur(e,i,o))),e=e.return}return r}function Yr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function qr(e,t,n,r,o){for(var i=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==c&&(s=c,o?null!=(l=Pe(n,i))&&a.unshift(Ur(n,l,s)):o||null!=(l=Pe(n,i))&&a.push(Ur(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var Zr=/\r\n?/g,Kr=/\u0000|\uFFFD/g;function $r(e){return("string"===typeof e?e:""+e).replace(Zr,"\n").replace(Kr,"")}function Qr(e,t,n){if(t=$r(t),$r(e)!==t&&n)throw Error(i(425))}function Jr(){}var eo=null,to=null;function no(e,t){return"textarea"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ro="function"===typeof setTimeout?setTimeout:void 0,oo="function"===typeof clearTimeout?clearTimeout:void 0,io="function"===typeof Promise?Promise:void 0,ao="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof io?function(e){return io.resolve(null).then(e).catch(so)}:ro;function so(e){setTimeout((function(){throw e}))}function lo(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)){if(0===r)return e.removeChild(o),void Wt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=o}while(n);Wt(t)}function co(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function uo(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var ho=Math.random().toString(36).slice(2),po="__reactFiber$"+ho,fo="__reactProps$"+ho,go="__reactContainer$"+ho,mo="__reactEvents$"+ho,vo="__reactListeners$"+ho,yo="__reactHandles$"+ho;function xo(e){var t=e[po];if(t)return t;for(var n=e.parentNode;n;){if(t=n[go]||n[po]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=uo(e);null!==e;){if(n=e[po])return n;e=uo(e)}return t}n=(e=n).parentNode}return null}function bo(e){return!(e=e[po]||e[go])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function wo(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(i(33))}function So(e){return e[fo]||null}var _o=[],Ao=-1;function ko(e){return{current:e}}function Co(e){0>Ao||(e.current=_o[Ao],_o[Ao]=null,Ao--)}function Mo(e,t){Ao++,_o[Ao]=e.current,e.current=t}var Io={},To=ko(Io),Do=ko(!1),jo=Io;function Po(e,t){var n=e.type.contextTypes;if(!n)return Io;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Lo(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Ro(){Co(Do),Co(To)}function Eo(e,t,n){if(To.current!==Io)throw Error(i(168));Mo(To,t),Mo(Do,n)}function No(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in t))throw Error(i(108,H(e)||"Unknown",o));return O({},n,r)}function Oo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Io,jo=To.current,Mo(To,e),Mo(Do,Do.current),!0}function zo(e,t,n){var r=e.stateNode;if(!r)throw Error(i(169));n?(e=No(e,t,jo),r.__reactInternalMemoizedMergedChildContext=e,Co(Do),Co(To),Mo(To,e)):Co(Do),Mo(Do,n)}var Bo=null,Fo=!1,Vo=!1;function Wo(e){null===Bo?Bo=[e]:Bo.push(e)}function Ho(){if(!Vo&&null!==Bo){Vo=!0;var e=0,t=xt;try{var n=Bo;for(xt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Bo=null,Fo=!1}catch(o){throw null!==Bo&&(Bo=Bo.slice(e+1)),Ye(Je,Ho),o}finally{xt=t,Vo=!1}}return null}var Go=[],Uo=0,Xo=null,Yo=0,qo=[],Zo=0,Ko=null,$o=1,Qo="";function Jo(e,t){Go[Uo++]=Yo,Go[Uo++]=Xo,Xo=e,Yo=t}function ei(e,t,n){qo[Zo++]=$o,qo[Zo++]=Qo,qo[Zo++]=Ko,Ko=e;var r=$o;e=Qo;var o=32-at(r)-1;r&=~(1<<o),n+=1;var i=32-at(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32),r>>=a,o-=a,$o=1<<32-at(t)+o|n<<o|r,Qo=i+e}else $o=1<<i|n<<o|r,Qo=e}function ti(e){null!==e.return&&(Jo(e,1),ei(e,1,0))}function ni(e){for(;e===Xo;)Xo=Go[--Uo],Go[Uo]=null,Yo=Go[--Uo],Go[Uo]=null;for(;e===Ko;)Ko=qo[--Zo],qo[Zo]=null,Qo=qo[--Zo],qo[Zo]=null,$o=qo[--Zo],qo[Zo]=null}var ri=null,oi=null,ii=!1,ai=null;function si(e,t){var n=jc(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function li(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,ri=e,oi=co(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,ri=e,oi=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Ko?{id:$o,overflow:Qo}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=jc(18,null,null,0)).stateNode=t,n.return=e,e.child=n,ri=e,oi=null,!0);default:return!1}}function ci(e){return 0!==(1&e.mode)&&0===(128&e.flags)}function ui(e){if(ii){var t=oi;if(t){var n=t;if(!li(e,t)){if(ci(e))throw Error(i(418));t=co(n.nextSibling);var r=ri;t&&li(e,t)?si(r,n):(e.flags=-4097&e.flags|2,ii=!1,ri=e)}}else{if(ci(e))throw Error(i(418));e.flags=-4097&e.flags|2,ii=!1,ri=e}}}function di(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;ri=e}function hi(e){if(e!==ri)return!1;if(!ii)return di(e),ii=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!no(e.type,e.memoizedProps)),t&&(t=oi)){if(ci(e))throw pi(),Error(i(418));for(;t;)si(e,t),t=co(t.nextSibling)}if(di(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(i(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){oi=co(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}oi=null}}else oi=ri?co(e.stateNode.nextSibling):null;return!0}function pi(){for(var e=oi;e;)e=co(e.nextSibling)}function fi(){oi=ri=null,ii=!1}function gi(e){null===ai?ai=[e]:ai.push(e)}var mi=b.ReactCurrentBatchConfig;function vi(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(i(309));var r=n.stateNode}if(!r)throw Error(i(147,e));var o=r,a=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=o.refs;null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!==typeof e)throw Error(i(284));if(!n._owner)throw Error(i(290,e))}return e}function yi(e,t){throw e=Object.prototype.toString.call(t),Error(i(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function xi(e){return(0,e._init)(e._payload)}function bi(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Lc(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Oc(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function c(e,t,n,r){var i=n.type;return i===_?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===i||"object"===typeof i&&null!==i&&i.$$typeof===P&&xi(i)===t.type)?((r=o(t,n.props)).ref=vi(e,t,n),r.return=e,r):((r=Rc(n.type,n.key,n.props,null,e.mode,r)).ref=vi(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=zc(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function d(e,t,n,r,i){return null===t||7!==t.tag?((t=Ec(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function h(e,t,n){if("string"===typeof t&&""!==t||"number"===typeof t)return(t=Oc(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case w:return(n=Rc(t.type,t.key,t.props,null,e.mode,n)).ref=vi(e,null,t),n.return=e,n;case S:return(t=zc(t,e.mode,n)).return=e,t;case P:return h(e,(0,t._init)(t._payload),n)}if(te(t)||E(t))return(t=Ec(t,e.mode,n,null)).return=e,t;yi(e,t)}return null}function p(e,t,n,r){var o=null!==t?t.key:null;if("string"===typeof n&&""!==n||"number"===typeof n)return null!==o?null:l(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case w:return n.key===o?c(e,t,n,r):null;case S:return n.key===o?u(e,t,n,r):null;case P:return p(e,t,(o=n._init)(n._payload),r)}if(te(n)||E(n))return null!==o?null:d(e,t,n,r,null);yi(e,n)}return null}function f(e,t,n,r,o){if("string"===typeof r&&""!==r||"number"===typeof r)return l(t,e=e.get(n)||null,""+r,o);if("object"===typeof r&&null!==r){switch(r.$$typeof){case w:return c(t,e=e.get(null===r.key?n:r.key)||null,r,o);case S:return u(t,e=e.get(null===r.key?n:r.key)||null,r,o);case P:return f(e,t,n,(0,r._init)(r._payload),o)}if(te(r)||E(r))return d(t,e=e.get(n)||null,r,o,null);yi(t,r)}return null}function g(o,i,s,l){for(var c=null,u=null,d=i,g=i=0,m=null;null!==d&&g<s.length;g++){d.index>g?(m=d,d=null):m=d.sibling;var v=p(o,d,s[g],l);if(null===v){null===d&&(d=m);break}e&&d&&null===v.alternate&&t(o,d),i=a(v,i,g),null===u?c=v:u.sibling=v,u=v,d=m}if(g===s.length)return n(o,d),ii&&Jo(o,g),c;if(null===d){for(;g<s.length;g++)null!==(d=h(o,s[g],l))&&(i=a(d,i,g),null===u?c=d:u.sibling=d,u=d);return ii&&Jo(o,g),c}for(d=r(o,d);g<s.length;g++)null!==(m=f(d,o,g,s[g],l))&&(e&&null!==m.alternate&&d.delete(null===m.key?g:m.key),i=a(m,i,g),null===u?c=m:u.sibling=m,u=m);return e&&d.forEach((function(e){return t(o,e)})),ii&&Jo(o,g),c}function m(o,s,l,c){var u=E(l);if("function"!==typeof u)throw Error(i(150));if(null==(l=u.call(l)))throw Error(i(151));for(var d=u=null,g=s,m=s=0,v=null,y=l.next();null!==g&&!y.done;m++,y=l.next()){g.index>m?(v=g,g=null):v=g.sibling;var x=p(o,g,y.value,c);if(null===x){null===g&&(g=v);break}e&&g&&null===x.alternate&&t(o,g),s=a(x,s,m),null===d?u=x:d.sibling=x,d=x,g=v}if(y.done)return n(o,g),ii&&Jo(o,m),u;if(null===g){for(;!y.done;m++,y=l.next())null!==(y=h(o,y.value,c))&&(s=a(y,s,m),null===d?u=y:d.sibling=y,d=y);return ii&&Jo(o,m),u}for(g=r(o,g);!y.done;m++,y=l.next())null!==(y=f(g,o,m,y.value,c))&&(e&&null!==y.alternate&&g.delete(null===y.key?m:y.key),s=a(y,s,m),null===d?u=y:d.sibling=y,d=y);return e&&g.forEach((function(e){return t(o,e)})),ii&&Jo(o,m),u}return function e(r,i,a,l){if("object"===typeof a&&null!==a&&a.type===_&&null===a.key&&(a=a.props.children),"object"===typeof a&&null!==a){switch(a.$$typeof){case w:e:{for(var c=a.key,u=i;null!==u;){if(u.key===c){if((c=a.type)===_){if(7===u.tag){n(r,u.sibling),(i=o(u,a.props.children)).return=r,r=i;break e}}else if(u.elementType===c||"object"===typeof c&&null!==c&&c.$$typeof===P&&xi(c)===u.type){n(r,u.sibling),(i=o(u,a.props)).ref=vi(r,u,a),i.return=r,r=i;break e}n(r,u);break}t(r,u),u=u.sibling}a.type===_?((i=Ec(a.props.children,r.mode,l,a.key)).return=r,r=i):((l=Rc(a.type,a.key,a.props,null,r.mode,l)).ref=vi(r,i,a),l.return=r,r=l)}return s(r);case S:e:{for(u=a.key;null!==i;){if(i.key===u){if(4===i.tag&&i.stateNode.containerInfo===a.containerInfo&&i.stateNode.implementation===a.implementation){n(r,i.sibling),(i=o(i,a.children||[])).return=r,r=i;break e}n(r,i);break}t(r,i),i=i.sibling}(i=zc(a,r.mode,l)).return=r,r=i}return s(r);case P:return e(r,i,(u=a._init)(a._payload),l)}if(te(a))return g(r,i,a,l);if(E(a))return m(r,i,a,l);yi(r,a)}return"string"===typeof a&&""!==a||"number"===typeof a?(a=""+a,null!==i&&6===i.tag?(n(r,i.sibling),(i=o(i,a)).return=r,r=i):(n(r,i),(i=Oc(a,r.mode,l)).return=r,r=i),s(r)):n(r,i)}}var wi=bi(!0),Si=bi(!1),_i=ko(null),Ai=null,ki=null,Ci=null;function Mi(){Ci=ki=Ai=null}function Ii(e){var t=_i.current;Co(_i),e._currentValue=t}function Ti(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Di(e,t){Ai=e,Ci=ki=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(xs=!0),e.firstContext=null)}function ji(e){var t=e._currentValue;if(Ci!==e)if(e={context:e,memoizedValue:t,next:null},null===ki){if(null===Ai)throw Error(i(308));ki=e,Ai.dependencies={lanes:0,firstContext:e}}else ki=ki.next=e;return t}var Pi=null;function Li(e){null===Pi?Pi=[e]:Pi.push(e)}function Ri(e,t,n,r){var o=t.interleaved;return null===o?(n.next=n,Li(t)):(n.next=o.next,o.next=n),t.interleaved=n,Ei(e,r)}function Ei(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Ni=!1;function Oi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function zi(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Bi(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Fi(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!==(2&Il)){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Ei(e,n)}return null===(o=r.interleaved)?(t.next=t,Li(r)):(t.next=o.next,o.next=t),r.interleaved=t,Ei(e,n)}function Vi(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}function Wi(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,i=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===i?o=i=a:i=i.next=a,n=n.next}while(null!==n);null===i?o=i=t:i=i.next=t}else o=i=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Hi(e,t,n,r){var o=e.updateQueue;Ni=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,s=o.shared.pending;if(null!==s){o.shared.pending=null;var l=s,c=l.next;l.next=null,null===a?i=c:a.next=c,a=l;var u=e.alternate;null!==u&&((s=(u=u.updateQueue).lastBaseUpdate)!==a&&(null===s?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l))}if(null!==i){var d=o.baseState;for(a=0,u=c=l=null,s=i;;){var h=s.lane,p=s.eventTime;if((r&h)===h){null!==u&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var f=e,g=s;switch(h=t,p=n,g.tag){case 1:if("function"===typeof(f=g.payload)){d=f.call(p,d,h);break e}d=f;break e;case 3:f.flags=-65537&f.flags|128;case 0:if(null===(h="function"===typeof(f=g.payload)?f.call(p,d,h):f)||void 0===h)break e;d=O({},d,h);break e;case 2:Ni=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(h=o.effects)?o.effects=[s]:h.push(s))}else p={eventTime:p,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===u?(c=u=p,l=d):u=u.next=p,a|=h;if(null===(s=s.next)){if(null===(s=o.shared.pending))break;s=(h=s).next,h.next=null,o.lastBaseUpdate=h,o.shared.pending=null}}if(null===u&&(l=d),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,null!==(t=o.shared.interleaved)){o=t;do{a|=o.lane,o=o.next}while(o!==t)}else null===i&&(o.shared.lanes=0);Nl|=a,e.lanes=a,e.memoizedState=d}}function Gi(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!==typeof o)throw Error(i(191,o));o.call(r)}}}var Ui={},Xi=ko(Ui),Yi=ko(Ui),qi=ko(Ui);function Zi(e){if(e===Ui)throw Error(i(174));return e}function Ki(e,t){switch(Mo(qi,t),Mo(Yi,e),Mo(Xi,Ui),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:le(null,"");break;default:t=le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Co(Xi),Mo(Xi,t)}function $i(){Co(Xi),Co(Yi),Co(qi)}function Qi(e){Zi(qi.current);var t=Zi(Xi.current),n=le(t,e.type);t!==n&&(Mo(Yi,e),Mo(Xi,n))}function Ji(e){Yi.current===e&&(Co(Xi),Co(Yi))}var ea=ko(0);function ta(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var na=[];function ra(){for(var e=0;e<na.length;e++)na[e]._workInProgressVersionPrimary=null;na.length=0}var oa=b.ReactCurrentDispatcher,ia=b.ReactCurrentBatchConfig,aa=0,sa=null,la=null,ca=null,ua=!1,da=!1,ha=0,pa=0;function fa(){throw Error(i(321))}function ga(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!sr(e[n],t[n]))return!1;return!0}function ma(e,t,n,r,o,a){if(aa=a,sa=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,oa.current=null===e||null===e.memoizedState?Ja:es,e=n(r,o),da){a=0;do{if(da=!1,ha=0,25<=a)throw Error(i(301));a+=1,ca=la=null,t.updateQueue=null,oa.current=ts,e=n(r,o)}while(da)}if(oa.current=Qa,t=null!==la&&null!==la.next,aa=0,ca=la=sa=null,ua=!1,t)throw Error(i(300));return e}function va(){var e=0!==ha;return ha=0,e}function ya(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ca?sa.memoizedState=ca=e:ca=ca.next=e,ca}function xa(){if(null===la){var e=sa.alternate;e=null!==e?e.memoizedState:null}else e=la.next;var t=null===ca?sa.memoizedState:ca.next;if(null!==t)ca=t,la=e;else{if(null===e)throw Error(i(310));e={memoizedState:(la=e).memoizedState,baseState:la.baseState,baseQueue:la.baseQueue,queue:la.queue,next:null},null===ca?sa.memoizedState=ca=e:ca=ca.next=e}return ca}function ba(e,t){return"function"===typeof t?t(e):t}function wa(e){var t=xa(),n=t.queue;if(null===n)throw Error(i(311));n.lastRenderedReducer=e;var r=la,o=r.baseQueue,a=n.pending;if(null!==a){if(null!==o){var s=o.next;o.next=a.next,a.next=s}r.baseQueue=o=a,n.pending=null}if(null!==o){a=o.next,r=r.baseState;var l=s=null,c=null,u=a;do{var d=u.lane;if((aa&d)===d)null!==c&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===c?(l=c=h,s=r):c=c.next=h,sa.lanes|=d,Nl|=d}u=u.next}while(null!==u&&u!==a);null===c?s=r:c.next=l,sr(r,t.memoizedState)||(xs=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=c,n.lastRenderedState=r}if(null!==(e=n.interleaved)){o=e;do{a=o.lane,sa.lanes|=a,Nl|=a,o=o.next}while(o!==e)}else null===o&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Sa(e){var t=xa(),n=t.queue;if(null===n)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,a=t.memoizedState;if(null!==o){n.pending=null;var s=o=o.next;do{a=e(a,s.action),s=s.next}while(s!==o);sr(a,t.memoizedState)||(xs=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function _a(){}function Aa(e,t){var n=sa,r=xa(),o=t(),a=!sr(r.memoizedState,o);if(a&&(r.memoizedState=o,xs=!0),r=r.queue,Na(Ma.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||null!==ca&&1&ca.memoizedState.tag){if(n.flags|=2048,ja(9,Ca.bind(null,n,r,o,t),void 0,null),null===Tl)throw Error(i(349));0!==(30&aa)||ka(n,t,o)}return o}function ka(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=sa.updateQueue)?(t={lastEffect:null,stores:null},sa.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Ca(e,t,n,r){t.value=n,t.getSnapshot=r,Ia(t)&&Ta(e)}function Ma(e,t,n){return n((function(){Ia(t)&&Ta(e)}))}function Ia(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!sr(e,n)}catch(r){return!0}}function Ta(e){var t=Ei(e,1);null!==t&&nc(t,e,1,-1)}function Da(e){var t=ya();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:e},t.queue=e,e=e.dispatch=qa.bind(null,sa,e),[t.memoizedState,e]}function ja(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=sa.updateQueue)?(t={lastEffect:null,stores:null},sa.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Pa(){return xa().memoizedState}function La(e,t,n,r){var o=ya();sa.flags|=e,o.memoizedState=ja(1|t,n,void 0,void 0===r?null:r)}function Ra(e,t,n,r){var o=xa();r=void 0===r?null:r;var i=void 0;if(null!==la){var a=la.memoizedState;if(i=a.destroy,null!==r&&ga(r,a.deps))return void(o.memoizedState=ja(t,n,i,r))}sa.flags|=e,o.memoizedState=ja(1|t,n,i,r)}function Ea(e,t){return La(8390656,8,e,t)}function Na(e,t){return Ra(2048,8,e,t)}function Oa(e,t){return Ra(4,2,e,t)}function za(e,t){return Ra(4,4,e,t)}function Ba(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Fa(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Ra(4,4,Ba.bind(null,t,e),n)}function Va(){}function Wa(e,t){var n=xa();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ga(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ha(e,t){var n=xa();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ga(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ga(e,t,n){return 0===(21&aa)?(e.baseState&&(e.baseState=!1,xs=!0),e.memoizedState=n):(sr(n,t)||(n=gt(),sa.lanes|=n,Nl|=n,e.baseState=!0),t)}function Ua(e,t){var n=xt;xt=0!==n&&4>n?n:4,e(!0);var r=ia.transition;ia.transition={};try{e(!1),t()}finally{xt=n,ia.transition=r}}function Xa(){return xa().memoizedState}function Ya(e,t,n){var r=tc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Za(e))Ka(t,n);else if(null!==(n=Ri(e,t,n,r))){nc(n,e,r,ec()),$a(n,t,r)}}function qa(e,t,n){var r=tc(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Za(e))Ka(t,o);else{var i=e.alternate;if(0===e.lanes&&(null===i||0===i.lanes)&&null!==(i=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=i(a,n);if(o.hasEagerState=!0,o.eagerState=s,sr(s,a)){var l=t.interleaved;return null===l?(o.next=o,Li(t)):(o.next=l.next,l.next=o),void(t.interleaved=o)}}catch(c){}null!==(n=Ri(e,t,o,r))&&(nc(n,e,r,o=ec()),$a(n,t,r))}}function Za(e){var t=e.alternate;return e===sa||null!==t&&t===sa}function Ka(e,t){da=ua=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function $a(e,t,n){if(0!==(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}var Qa={readContext:ji,useCallback:fa,useContext:fa,useEffect:fa,useImperativeHandle:fa,useInsertionEffect:fa,useLayoutEffect:fa,useMemo:fa,useReducer:fa,useRef:fa,useState:fa,useDebugValue:fa,useDeferredValue:fa,useTransition:fa,useMutableSource:fa,useSyncExternalStore:fa,useId:fa,unstable_isNewReconciler:!1},Ja={readContext:ji,useCallback:function(e,t){return ya().memoizedState=[e,void 0===t?null:t],e},useContext:ji,useEffect:Ea,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,La(4194308,4,Ba.bind(null,t,e),n)},useLayoutEffect:function(e,t){return La(4194308,4,e,t)},useInsertionEffect:function(e,t){return La(4,2,e,t)},useMemo:function(e,t){var n=ya();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ya();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Ya.bind(null,sa,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},ya().memoizedState=e},useState:Da,useDebugValue:Va,useDeferredValue:function(e){return ya().memoizedState=e},useTransition:function(){var e=Da(!1),t=e[0];return e=Ua.bind(null,e[1]),ya().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=sa,o=ya();if(ii){if(void 0===n)throw Error(i(407));n=n()}else{if(n=t(),null===Tl)throw Error(i(349));0!==(30&aa)||ka(r,t,n)}o.memoizedState=n;var a={value:n,getSnapshot:t};return o.queue=a,Ea(Ma.bind(null,r,a,e),[e]),r.flags|=2048,ja(9,Ca.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=ya(),t=Tl.identifierPrefix;if(ii){var n=Qo;t=":"+t+"R"+(n=($o&~(1<<32-at($o)-1)).toString(32)+n),0<(n=ha++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=pa++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},es={readContext:ji,useCallback:Wa,useContext:ji,useEffect:Na,useImperativeHandle:Fa,useInsertionEffect:Oa,useLayoutEffect:za,useMemo:Ha,useReducer:wa,useRef:Pa,useState:function(){return wa(ba)},useDebugValue:Va,useDeferredValue:function(e){return Ga(xa(),la.memoizedState,e)},useTransition:function(){return[wa(ba)[0],xa().memoizedState]},useMutableSource:_a,useSyncExternalStore:Aa,useId:Xa,unstable_isNewReconciler:!1},ts={readContext:ji,useCallback:Wa,useContext:ji,useEffect:Na,useImperativeHandle:Fa,useInsertionEffect:Oa,useLayoutEffect:za,useMemo:Ha,useReducer:Sa,useRef:Pa,useState:function(){return Sa(ba)},useDebugValue:Va,useDeferredValue:function(e){var t=xa();return null===la?t.memoizedState=e:Ga(t,la.memoizedState,e)},useTransition:function(){return[Sa(ba)[0],xa().memoizedState]},useMutableSource:_a,useSyncExternalStore:Aa,useId:Xa,unstable_isNewReconciler:!1};function ns(e,t){if(e&&e.defaultProps){for(var n in t=O({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function rs(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:O({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var os={isMounted:function(e){return!!(e=e._reactInternals)&&We(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ec(),o=tc(e),i=Bi(r,o);i.payload=t,void 0!==n&&null!==n&&(i.callback=n),null!==(t=Fi(e,i,o))&&(nc(t,e,o,r),Vi(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ec(),o=tc(e),i=Bi(r,o);i.tag=1,i.payload=t,void 0!==n&&null!==n&&(i.callback=n),null!==(t=Fi(e,i,o))&&(nc(t,e,o,r),Vi(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ec(),r=tc(e),o=Bi(n,r);o.tag=2,void 0!==t&&null!==t&&(o.callback=t),null!==(t=Fi(e,o,r))&&(nc(t,e,r,n),Vi(t,e,r))}};function is(e,t,n,r,o,i,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!lr(n,r)||!lr(o,i))}function as(e,t,n){var r=!1,o=Io,i=t.contextType;return"object"===typeof i&&null!==i?i=ji(i):(o=Lo(t)?jo:To.current,i=(r=null!==(r=t.contextTypes)&&void 0!==r)?Po(e,o):Io),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=os,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function ss(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&os.enqueueReplaceState(t,t.state,null)}function ls(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Oi(e);var i=t.contextType;"object"===typeof i&&null!==i?o.context=ji(i):(i=Lo(t)?jo:To.current,o.context=Po(e,i)),o.state=e.memoizedState,"function"===typeof(i=t.getDerivedStateFromProps)&&(rs(e,t,i,n),o.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof o.getSnapshotBeforeUpdate||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||(t=o.state,"function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&os.enqueueReplaceState(o,o.state,null),Hi(e,n,o,r),o.state=e.memoizedState),"function"===typeof o.componentDidMount&&(e.flags|=4194308)}function cs(e,t){try{var n="",r=t;do{n+=V(r),r=r.return}while(r);var o=n}catch(i){o="\nError generating stack: "+i.message+"\n"+i.stack}return{value:e,source:t,stack:o,digest:null}}function us(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function ds(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var hs="function"===typeof WeakMap?WeakMap:Map;function ps(e,t,n){(n=Bi(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Gl||(Gl=!0,Ul=r),ds(0,t)},n}function fs(e,t,n){(n=Bi(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){ds(0,t)}}var i=e.stateNode;return null!==i&&"function"===typeof i.componentDidCatch&&(n.callback=function(){ds(0,t),"function"!==typeof r&&(null===Xl?Xl=new Set([this]):Xl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function gs(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new hs;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=kc.bind(null,e,t,n),t.then(e,e))}function ms(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function vs(e,t,n,r,o){return 0===(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Bi(-1,1)).tag=2,Fi(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var ys=b.ReactCurrentOwner,xs=!1;function bs(e,t,n,r){t.child=null===e?Si(t,null,n,r):wi(t,e.child,n,r)}function ws(e,t,n,r,o){n=n.render;var i=t.ref;return Di(t,o),r=ma(e,t,n,r,i,o),n=va(),null===e||xs?(ii&&n&&ti(t),t.flags|=1,bs(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Gs(e,t,o))}function Ss(e,t,n,r,o){if(null===e){var i=n.type;return"function"!==typeof i||Pc(i)||void 0!==i.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Rc(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,_s(e,t,i,r,o))}if(i=e.child,0===(e.lanes&o)){var a=i.memoizedProps;if((n=null!==(n=n.compare)?n:lr)(a,r)&&e.ref===t.ref)return Gs(e,t,o)}return t.flags|=1,(e=Lc(i,r)).ref=t.ref,e.return=t,t.child=e}function _s(e,t,n,r,o){if(null!==e){var i=e.memoizedProps;if(lr(i,r)&&e.ref===t.ref){if(xs=!1,t.pendingProps=r=i,0===(e.lanes&o))return t.lanes=e.lanes,Gs(e,t,o);0!==(131072&e.flags)&&(xs=!0)}}return Cs(e,t,n,r,o)}function As(e,t,n){var r=t.pendingProps,o=r.children,i=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0===(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Mo(Ll,Pl),Pl|=n;else{if(0===(1073741824&n))return e=null!==i?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Mo(Ll,Pl),Pl|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==i?i.baseLanes:n,Mo(Ll,Pl),Pl|=r}else null!==i?(r=i.baseLanes|n,t.memoizedState=null):r=n,Mo(Ll,Pl),Pl|=r;return bs(e,t,o,n),t.child}function ks(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Cs(e,t,n,r,o){var i=Lo(n)?jo:To.current;return i=Po(t,i),Di(t,o),n=ma(e,t,n,r,i,o),r=va(),null===e||xs?(ii&&r&&ti(t),t.flags|=1,bs(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Gs(e,t,o))}function Ms(e,t,n,r,o){if(Lo(n)){var i=!0;Oo(t)}else i=!1;if(Di(t,o),null===t.stateNode)Hs(e,t),as(t,n,r),ls(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;"object"===typeof c&&null!==c?c=ji(c):c=Po(t,c=Lo(n)?jo:To.current);var u=n.getDerivedStateFromProps,d="function"===typeof u||"function"===typeof a.getSnapshotBeforeUpdate;d||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||l!==c)&&ss(t,a,r,c),Ni=!1;var h=t.memoizedState;a.state=h,Hi(t,r,a,o),l=t.memoizedState,s!==r||h!==l||Do.current||Ni?("function"===typeof u&&(rs(t,n,u,r),l=t.memoizedState),(s=Ni||is(t,n,s,r,h,l,c))?(d||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.flags|=4194308)):("function"===typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=s):("function"===typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,zi(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:ns(t.type,s),a.props=c,d=t.pendingProps,h=a.context,"object"===typeof(l=n.contextType)&&null!==l?l=ji(l):l=Po(t,l=Lo(n)?jo:To.current);var p=n.getDerivedStateFromProps;(u="function"===typeof p||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==d||h!==l)&&ss(t,a,r,l),Ni=!1,h=t.memoizedState,a.state=h,Hi(t,r,a,o);var f=t.memoizedState;s!==d||h!==f||Do.current||Ni?("function"===typeof p&&(rs(t,n,p,r),f=t.memoizedState),(c=Ni||is(t,n,c,r,h,f,l)||!1)?(u||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,f,l),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,f,l)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=f),a.props=r,a.state=f,a.context=l,r=c):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Is(e,t,n,r,i,o)}function Is(e,t,n,r,o,i){ks(e,t);var a=0!==(128&t.flags);if(!r&&!a)return o&&zo(t,n,!1),Gs(e,t,i);r=t.stateNode,ys.current=t;var s=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=wi(t,e.child,null,i),t.child=wi(t,null,s,i)):bs(e,t,s,i),t.memoizedState=r.state,o&&zo(t,n,!0),t.child}function Ts(e){var t=e.stateNode;t.pendingContext?Eo(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Eo(0,t.context,!1),Ki(e,t.containerInfo)}function Ds(e,t,n,r,o){return fi(),gi(o),t.flags|=256,bs(e,t,n,r),t.child}var js,Ps,Ls,Rs,Es={dehydrated:null,treeContext:null,retryLane:0};function Ns(e){return{baseLanes:e,cachePool:null,transitions:null}}function Os(e,t,n){var r,o=t.pendingProps,a=ea.current,s=!1,l=0!==(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!==(2&a)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),Mo(ea,1&a),null===e)return ui(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0===(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(l=o.children,e=o.fallback,s?(o=t.mode,s=t.child,l={mode:"hidden",children:l},0===(1&o)&&null!==s?(s.childLanes=0,s.pendingProps=l):s=Nc(l,o,0,null),e=Ec(e,o,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Ns(n),t.memoizedState=Es,e):zs(t,l));if(null!==(a=e.memoizedState)&&null!==(r=a.dehydrated))return function(e,t,n,r,o,a,s){if(n)return 256&t.flags?(t.flags&=-257,Bs(e,t,s,r=us(Error(i(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=r.fallback,o=t.mode,r=Nc({mode:"visible",children:r.children},o,0,null),(a=Ec(a,o,s,null)).flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,0!==(1&t.mode)&&wi(t,e.child,null,s),t.child.memoizedState=Ns(s),t.memoizedState=Es,a);if(0===(1&t.mode))return Bs(e,t,s,null);if("$!"===o.data){if(r=o.nextSibling&&o.nextSibling.dataset)var l=r.dgst;return r=l,Bs(e,t,s,r=us(a=Error(i(419)),r,void 0))}if(l=0!==(s&e.childLanes),xs||l){if(null!==(r=Tl)){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=0!==(o&(r.suspendedLanes|s))?0:o)&&o!==a.retryLane&&(a.retryLane=o,Ei(e,o),nc(r,e,o,-1))}return gc(),Bs(e,t,s,r=us(Error(i(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=Mc.bind(null,e),o._reactRetry=t,null):(e=a.treeContext,oi=co(o.nextSibling),ri=t,ii=!0,ai=null,null!==e&&(qo[Zo++]=$o,qo[Zo++]=Qo,qo[Zo++]=Ko,$o=e.id,Qo=e.overflow,Ko=t),t=zs(t,r.children),t.flags|=4096,t)}(e,t,l,o,r,a,n);if(s){s=o.fallback,l=t.mode,r=(a=e.child).sibling;var c={mode:"hidden",children:o.children};return 0===(1&l)&&t.child!==a?((o=t.child).childLanes=0,o.pendingProps=c,t.deletions=null):(o=Lc(a,c)).subtreeFlags=14680064&a.subtreeFlags,null!==r?s=Lc(r,s):(s=Ec(s,l,n,null)).flags|=2,s.return=t,o.return=t,o.sibling=s,t.child=o,o=s,s=t.child,l=null===(l=e.child.memoizedState)?Ns(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~n,t.memoizedState=Es,o}return e=(s=e.child).sibling,o=Lc(s,{mode:"visible",children:o.children}),0===(1&t.mode)&&(o.lanes=n),o.return=t,o.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=o,t.memoizedState=null,o}function zs(e,t){return(t=Nc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Bs(e,t,n,r){return null!==r&&gi(r),wi(t,e.child,null,n),(e=zs(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Fs(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Ti(e.return,t,n)}function Vs(e,t,n,r,o){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function Ws(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(bs(e,t,r.children,n),0!==(2&(r=ea.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Fs(e,n,t);else if(19===e.tag)Fs(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Mo(ea,r),0===(1&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===ta(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Vs(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===ta(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Vs(t,!0,n,null,i);break;case"together":Vs(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Hs(e,t){0===(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Gs(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Nl|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(i(153));if(null!==t.child){for(n=Lc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Lc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Us(e,t){if(!ii)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Xs(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=14680064&o.subtreeFlags,r|=14680064&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ys(e,t,n){var r=t.pendingProps;switch(ni(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xs(t),null;case 1:case 17:return Lo(t.type)&&Ro(),Xs(t),null;case 3:return r=t.stateNode,$i(),Co(Do),Co(To),ra(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(hi(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,null!==ai&&(ac(ai),ai=null))),Ps(e,t),Xs(t),null;case 5:Ji(t);var o=Zi(qi.current);if(n=t.type,null!==e&&null!=t.stateNode)Ls(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(i(166));return Xs(t),null}if(e=Zi(Xi.current),hi(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[po]=t,r[fo]=a,e=0!==(1&t.mode),n){case"dialog":Br("cancel",r),Br("close",r);break;case"iframe":case"object":case"embed":Br("load",r);break;case"video":case"audio":for(o=0;o<Er.length;o++)Br(Er[o],r);break;case"source":Br("error",r);break;case"img":case"image":case"link":Br("error",r),Br("load",r);break;case"details":Br("toggle",r);break;case"input":K(r,a),Br("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Br("invalid",r);break;case"textarea":oe(r,a),Br("invalid",r)}for(var l in ye(n,a),o=null,a)if(a.hasOwnProperty(l)){var c=a[l];"children"===l?"string"===typeof c?r.textContent!==c&&(!0!==a.suppressHydrationWarning&&Qr(r.textContent,c,e),o=["children",c]):"number"===typeof c&&r.textContent!==""+c&&(!0!==a.suppressHydrationWarning&&Qr(r.textContent,c,e),o=["children",""+c]):s.hasOwnProperty(l)&&null!=c&&"onScroll"===l&&Br("scroll",r)}switch(n){case"input":X(r),J(r,a,!0);break;case"textarea":X(r),ae(r);break;case"select":case"option":break;default:"function"===typeof a.onClick&&(r.onclick=Jr)}r=o,t.updateQueue=r,null!==r&&(t.flags|=4)}else{l=9===o.nodeType?o:o.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=se(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[po]=t,e[fo]=r,js(e,t,!1,!1),t.stateNode=e;e:{switch(l=xe(n,r),n){case"dialog":Br("cancel",e),Br("close",e),o=r;break;case"iframe":case"object":case"embed":Br("load",e),o=r;break;case"video":case"audio":for(o=0;o<Er.length;o++)Br(Er[o],e);o=r;break;case"source":Br("error",e),o=r;break;case"img":case"image":case"link":Br("error",e),Br("load",e),o=r;break;case"details":Br("toggle",e),o=r;break;case"input":K(e,r),o=Z(e,r),Br("invalid",e);break;case"option":default:o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=O({},r,{value:void 0}),Br("invalid",e);break;case"textarea":oe(e,r),o=re(e,r),Br("invalid",e)}for(a in ye(n,o),c=o)if(c.hasOwnProperty(a)){var u=c[a];"style"===a?me(e,u):"dangerouslySetInnerHTML"===a?null!=(u=u?u.__html:void 0)&&de(e,u):"children"===a?"string"===typeof u?("textarea"!==n||""!==u)&&he(e,u):"number"===typeof u&&he(e,""+u):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(s.hasOwnProperty(a)?null!=u&&"onScroll"===a&&Br("scroll",e):null!=u&&x(e,a,u,l))}switch(n){case"input":X(e),J(e,r,!1);break;case"textarea":X(e),ae(e);break;case"option":null!=r.value&&e.setAttribute("value",""+G(r.value));break;case"select":e.multiple=!!r.multiple,null!=(a=r.value)?ne(e,!!r.multiple,a,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof o.onClick&&(e.onclick=Jr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Xs(t),null;case 6:if(e&&null!=t.stateNode)Rs(e,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(i(166));if(n=Zi(qi.current),Zi(Xi.current),hi(t)){if(r=t.stateNode,n=t.memoizedProps,r[po]=t,(a=r.nodeValue!==n)&&null!==(e=ri))switch(e.tag){case 3:Qr(r.nodeValue,n,0!==(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Qr(r.nodeValue,n,0!==(1&e.mode))}a&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[po]=t,t.stateNode=r}return Xs(t),null;case 13:if(Co(ea),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ii&&null!==oi&&0!==(1&t.mode)&&0===(128&t.flags))pi(),fi(),t.flags|=98560,a=!1;else if(a=hi(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(i(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(i(317));a[po]=t}else fi(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Xs(t),a=!1}else null!==ai&&(ac(ai),ai=null),a=!0;if(!a)return 65536&t.flags?t:null}return 0!==(128&t.flags)?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!==(1&t.mode)&&(null===e||0!==(1&ea.current)?0===Rl&&(Rl=3):gc())),null!==t.updateQueue&&(t.flags|=4),Xs(t),null);case 4:return $i(),Ps(e,t),null===e&&Wr(t.stateNode.containerInfo),Xs(t),null;case 10:return Ii(t.type._context),Xs(t),null;case 19:if(Co(ea),null===(a=t.memoizedState))return Xs(t),null;if(r=0!==(128&t.flags),null===(l=a.rendering))if(r)Us(a,!1);else{if(0!==Rl||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(l=ta(e))){for(t.flags|=128,Us(a,!1),null!==(r=l.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(a=n).flags&=14680066,null===(l=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=l.childLanes,a.lanes=l.lanes,a.child=l.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=l.memoizedProps,a.memoizedState=l.memoizedState,a.updateQueue=l.updateQueue,a.type=l.type,e=l.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Mo(ea,1&ea.current|2),t.child}e=e.sibling}null!==a.tail&&$e()>Wl&&(t.flags|=128,r=!0,Us(a,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ta(l))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Us(a,!0),null===a.tail&&"hidden"===a.tailMode&&!l.alternate&&!ii)return Xs(t),null}else 2*$e()-a.renderingStartTime>Wl&&1073741824!==n&&(t.flags|=128,r=!0,Us(a,!1),t.lanes=4194304);a.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=a.last)?n.sibling=l:t.child=l,a.last=l)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=$e(),t.sibling=null,n=ea.current,Mo(ea,r?1&n|2:1&n),t):(Xs(t),null);case 22:case 23:return dc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!==(1&t.mode)?0!==(1073741824&Pl)&&(Xs(t),6&t.subtreeFlags&&(t.flags|=8192)):Xs(t),null;case 24:case 25:return null}throw Error(i(156,t.tag))}function qs(e,t){switch(ni(t),t.tag){case 1:return Lo(t.type)&&Ro(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return $i(),Co(Do),Co(To),ra(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Ji(t),null;case 13:if(Co(ea),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(i(340));fi()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Co(ea),null;case 4:return $i(),null;case 10:return Ii(t.type._context),null;case 22:case 23:return dc(),null;default:return null}}js=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ps=function(){},Ls=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Zi(Xi.current);var i,a=null;switch(n){case"input":o=Z(e,o),r=Z(e,r),a=[];break;case"select":o=O({},o,{value:void 0}),r=O({},r,{value:void 0}),a=[];break;case"textarea":o=re(e,o),r=re(e,r),a=[];break;default:"function"!==typeof o.onClick&&"function"===typeof r.onClick&&(e.onclick=Jr)}for(u in ye(n,r),n=null,o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&null!=o[u])if("style"===u){var l=o[u];for(i in l)l.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(s.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in r){var c=r[u];if(l=null!=o?o[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(null!=c||null!=l))if("style"===u)if(l){for(i in l)!l.hasOwnProperty(i)||c&&c.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in c)c.hasOwnProperty(i)&&l[i]!==c[i]&&(n||(n={}),n[i]=c[i])}else n||(a||(a=[]),a.push(u,n)),n=c;else"dangerouslySetInnerHTML"===u?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(a=a||[]).push(u,c)):"children"===u?"string"!==typeof c&&"number"!==typeof c||(a=a||[]).push(u,""+c):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(s.hasOwnProperty(u)?(null!=c&&"onScroll"===u&&Br("scroll",e),a||l===c||(a=[])):(a=a||[]).push(u,c))}n&&(a=a||[]).push("style",n);var u=a;(t.updateQueue=u)&&(t.flags|=4)}},Rs=function(e,t,n,r){n!==r&&(t.flags|=4)};var Zs=!1,Ks=!1,$s="function"===typeof WeakSet?WeakSet:Set,Qs=null;function Js(e,t){var n=e.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(r){Ac(e,t,r)}else n.current=null}function el(e,t,n){try{n()}catch(r){Ac(e,t,r)}}var tl=!1;function nl(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,void 0!==i&&el(t,n,i)}o=o.next}while(o!==r)}}function rl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ol(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"===typeof t?t(e):t.current=e}}function il(e){var t=e.alternate;null!==t&&(e.alternate=null,il(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[po],delete t[fo],delete t[mo],delete t[vo],delete t[yo])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function al(e){return 5===e.tag||3===e.tag||4===e.tag}function sl(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||al(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ll(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Jr));else if(4!==r&&null!==(e=e.child))for(ll(e,t,n),e=e.sibling;null!==e;)ll(e,t,n),e=e.sibling}function cl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(cl(e,t,n),e=e.sibling;null!==e;)cl(e,t,n),e=e.sibling}var ul=null,dl=!1;function hl(e,t,n){for(n=n.child;null!==n;)pl(e,t,n),n=n.sibling}function pl(e,t,n){if(it&&"function"===typeof it.onCommitFiberUnmount)try{it.onCommitFiberUnmount(ot,n)}catch(s){}switch(n.tag){case 5:Ks||Js(n,t);case 6:var r=ul,o=dl;ul=null,hl(e,t,n),dl=o,null!==(ul=r)&&(dl?(e=ul,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):ul.removeChild(n.stateNode));break;case 18:null!==ul&&(dl?(e=ul,n=n.stateNode,8===e.nodeType?lo(e.parentNode,n):1===e.nodeType&&lo(e,n),Wt(e)):lo(ul,n.stateNode));break;case 4:r=ul,o=dl,ul=n.stateNode.containerInfo,dl=!0,hl(e,t,n),ul=r,dl=o;break;case 0:case 11:case 14:case 15:if(!Ks&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,void 0!==a&&(0!==(2&i)||0!==(4&i))&&el(n,t,a),o=o.next}while(o!==r)}hl(e,t,n);break;case 1:if(!Ks&&(Js(n,t),"function"===typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Ac(n,t,s)}hl(e,t,n);break;case 21:hl(e,t,n);break;case 22:1&n.mode?(Ks=(r=Ks)||null!==n.memoizedState,hl(e,t,n),Ks=r):hl(e,t,n);break;default:hl(e,t,n)}}function fl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new $s),t.forEach((function(t){var r=Ic.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function gl(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var o=n[r];try{var a=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 5:ul=l.stateNode,dl=!1;break e;case 3:case 4:ul=l.stateNode.containerInfo,dl=!0;break e}l=l.return}if(null===ul)throw Error(i(160));pl(a,s,o),ul=null,dl=!1;var c=o.alternate;null!==c&&(c.return=null),o.return=null}catch(u){Ac(o,t,u)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)ml(t,e),t=t.sibling}function ml(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(gl(t,e),vl(e),4&r){try{nl(3,e,e.return),rl(3,e)}catch(m){Ac(e,e.return,m)}try{nl(5,e,e.return)}catch(m){Ac(e,e.return,m)}}break;case 1:gl(t,e),vl(e),512&r&&null!==n&&Js(n,n.return);break;case 5:if(gl(t,e),vl(e),512&r&&null!==n&&Js(n,n.return),32&e.flags){var o=e.stateNode;try{he(o,"")}catch(m){Ac(e,e.return,m)}}if(4&r&&null!=(o=e.stateNode)){var a=e.memoizedProps,s=null!==n?n.memoizedProps:a,l=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===l&&"radio"===a.type&&null!=a.name&&$(o,a),xe(l,s);var u=xe(l,a);for(s=0;s<c.length;s+=2){var d=c[s],h=c[s+1];"style"===d?me(o,h):"dangerouslySetInnerHTML"===d?de(o,h):"children"===d?he(o,h):x(o,d,h,u)}switch(l){case"input":Q(o,a);break;case"textarea":ie(o,a);break;case"select":var p=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!a.multiple;var f=a.value;null!=f?ne(o,!!a.multiple,f,!1):p!==!!a.multiple&&(null!=a.defaultValue?ne(o,!!a.multiple,a.defaultValue,!0):ne(o,!!a.multiple,a.multiple?[]:"",!1))}o[fo]=a}catch(m){Ac(e,e.return,m)}}break;case 6:if(gl(t,e),vl(e),4&r){if(null===e.stateNode)throw Error(i(162));o=e.stateNode,a=e.memoizedProps;try{o.nodeValue=a}catch(m){Ac(e,e.return,m)}}break;case 3:if(gl(t,e),vl(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Wt(t.containerInfo)}catch(m){Ac(e,e.return,m)}break;case 4:default:gl(t,e),vl(e);break;case 13:gl(t,e),vl(e),8192&(o=e.child).flags&&(a=null!==o.memoizedState,o.stateNode.isHidden=a,!a||null!==o.alternate&&null!==o.alternate.memoizedState||(Vl=$e())),4&r&&fl(e);break;case 22:if(d=null!==n&&null!==n.memoizedState,1&e.mode?(Ks=(u=Ks)||d,gl(t,e),Ks=u):gl(t,e),vl(e),8192&r){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!d&&0!==(1&e.mode))for(Qs=e,d=e.child;null!==d;){for(h=Qs=d;null!==Qs;){switch(f=(p=Qs).child,p.tag){case 0:case 11:case 14:case 15:nl(4,p,p.return);break;case 1:Js(p,p.return);var g=p.stateNode;if("function"===typeof g.componentWillUnmount){r=p,n=p.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(m){Ac(r,n,m)}}break;case 5:Js(p,p.return);break;case 22:if(null!==p.memoizedState){wl(h);continue}}null!==f?(f.return=p,Qs=f):wl(h)}d=d.sibling}e:for(d=null,h=e;;){if(5===h.tag){if(null===d){d=h;try{o=h.stateNode,u?"function"===typeof(a=o.style).setProperty?a.setProperty("display","none","important"):a.display="none":(l=h.stateNode,s=void 0!==(c=h.memoizedProps.style)&&null!==c&&c.hasOwnProperty("display")?c.display:null,l.style.display=ge("display",s))}catch(m){Ac(e,e.return,m)}}}else if(6===h.tag){if(null===d)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(m){Ac(e,e.return,m)}}else if((22!==h.tag&&23!==h.tag||null===h.memoizedState||h===e)&&null!==h.child){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;null===h.sibling;){if(null===h.return||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:gl(t,e),vl(e),4&r&&fl(e);case 21:}}function vl(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(al(n)){var r=n;break e}n=n.return}throw Error(i(160))}switch(r.tag){case 5:var o=r.stateNode;32&r.flags&&(he(o,""),r.flags&=-33),cl(e,sl(e),o);break;case 3:case 4:var a=r.stateNode.containerInfo;ll(e,sl(e),a);break;default:throw Error(i(161))}}catch(s){Ac(e,e.return,s)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function yl(e,t,n){Qs=e,xl(e,t,n)}function xl(e,t,n){for(var r=0!==(1&e.mode);null!==Qs;){var o=Qs,i=o.child;if(22===o.tag&&r){var a=null!==o.memoizedState||Zs;if(!a){var s=o.alternate,l=null!==s&&null!==s.memoizedState||Ks;s=Zs;var c=Ks;if(Zs=a,(Ks=l)&&!c)for(Qs=o;null!==Qs;)l=(a=Qs).child,22===a.tag&&null!==a.memoizedState?Sl(o):null!==l?(l.return=a,Qs=l):Sl(o);for(;null!==i;)Qs=i,xl(i,t,n),i=i.sibling;Qs=o,Zs=s,Ks=c}bl(e)}else 0!==(8772&o.subtreeFlags)&&null!==i?(i.return=o,Qs=i):bl(e)}}function bl(e){for(;null!==Qs;){var t=Qs;if(0!==(8772&t.flags)){var n=t.alternate;try{if(0!==(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Ks||rl(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Ks)if(null===n)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:ns(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&Gi(t,a,r);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Gi(t,s,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var d=u.memoizedState;if(null!==d){var h=d.dehydrated;null!==h&&Wt(h)}}}break;default:throw Error(i(163))}Ks||512&t.flags&&ol(t)}catch(p){Ac(t,t.return,p)}}if(t===e){Qs=null;break}if(null!==(n=t.sibling)){n.return=t.return,Qs=n;break}Qs=t.return}}function wl(e){for(;null!==Qs;){var t=Qs;if(t===e){Qs=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Qs=n;break}Qs=t.return}}function Sl(e){for(;null!==Qs;){var t=Qs;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{rl(4,t)}catch(l){Ac(t,n,l)}break;case 1:var r=t.stateNode;if("function"===typeof r.componentDidMount){var o=t.return;try{r.componentDidMount()}catch(l){Ac(t,o,l)}}var i=t.return;try{ol(t)}catch(l){Ac(t,i,l)}break;case 5:var a=t.return;try{ol(t)}catch(l){Ac(t,a,l)}}}catch(l){Ac(t,t.return,l)}if(t===e){Qs=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Qs=s;break}Qs=t.return}}var _l,Al=Math.ceil,kl=b.ReactCurrentDispatcher,Cl=b.ReactCurrentOwner,Ml=b.ReactCurrentBatchConfig,Il=0,Tl=null,Dl=null,jl=0,Pl=0,Ll=ko(0),Rl=0,El=null,Nl=0,Ol=0,zl=0,Bl=null,Fl=null,Vl=0,Wl=1/0,Hl=null,Gl=!1,Ul=null,Xl=null,Yl=!1,ql=null,Zl=0,Kl=0,$l=null,Ql=-1,Jl=0;function ec(){return 0!==(6&Il)?$e():-1!==Ql?Ql:Ql=$e()}function tc(e){return 0===(1&e.mode)?1:0!==(2&Il)&&0!==jl?jl&-jl:null!==mi.transition?(0===Jl&&(Jl=gt()),Jl):0!==(e=xt)?e:e=void 0===(e=window.event)?16:Kt(e.type)}function nc(e,t,n,r){if(50<Kl)throw Kl=0,$l=null,Error(i(185));vt(e,n,r),0!==(2&Il)&&e===Tl||(e===Tl&&(0===(2&Il)&&(Ol|=n),4===Rl&&sc(e,jl)),rc(e,r),1===n&&0===Il&&0===(1&t.mode)&&(Wl=$e()+500,Fo&&Ho()))}function rc(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-at(i),s=1<<a,l=o[a];-1===l?0!==(s&n)&&0===(s&r)||(o[a]=pt(s,t)):l<=t&&(e.expiredLanes|=s),i&=~s}}(e,t);var r=ht(e,e===Tl?jl:0);if(0===r)null!==n&&qe(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&qe(n),1===t)0===e.tag?function(e){Fo=!0,Wo(e)}(lc.bind(null,e)):Wo(lc.bind(null,e)),ao((function(){0===(6&Il)&&Ho()})),n=null;else{switch(bt(r)){case 1:n=Je;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Tc(n,oc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function oc(e,t){if(Ql=-1,Jl=0,0!==(6&Il))throw Error(i(327));var n=e.callbackNode;if(Sc()&&e.callbackNode!==n)return null;var r=ht(e,e===Tl?jl:0);if(0===r)return null;if(0!==(30&r)||0!==(r&e.expiredLanes)||t)t=mc(e,r);else{t=r;var o=Il;Il|=2;var a=fc();for(Tl===e&&jl===t||(Hl=null,Wl=$e()+500,hc(e,t));;)try{yc();break}catch(l){pc(e,l)}Mi(),kl.current=a,Il=o,null!==Dl?t=0:(Tl=null,jl=0,t=Rl)}if(0!==t){if(2===t&&(0!==(o=ft(e))&&(r=o,t=ic(e,o))),1===t)throw n=El,hc(e,0),sc(e,r),rc(e,$e()),n;if(6===t)sc(e,r);else{if(o=e.current.alternate,0===(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!sr(i(),o))return!1}catch(s){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)&&(2===(t=mc(e,r))&&(0!==(a=ft(e))&&(r=a,t=ic(e,a))),1===t))throw n=El,hc(e,0),sc(e,r),rc(e,$e()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(i(345));case 2:case 5:wc(e,Fl,Hl);break;case 3:if(sc(e,r),(130023424&r)===r&&10<(t=Vl+500-$e())){if(0!==ht(e,0))break;if(((o=e.suspendedLanes)&r)!==r){ec(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=ro(wc.bind(null,e,Fl,Hl),t);break}wc(e,Fl,Hl);break;case 4:if(sc(e,r),(4194240&r)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-at(r);a=1<<s,(s=t[s])>o&&(o=s),r&=~a}if(r=o,10<(r=(120>(r=$e()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Al(r/1960))-r)){e.timeoutHandle=ro(wc.bind(null,e,Fl,Hl),r);break}wc(e,Fl,Hl);break;default:throw Error(i(329))}}}return rc(e,$e()),e.callbackNode===n?oc.bind(null,e):null}function ic(e,t){var n=Bl;return e.current.memoizedState.isDehydrated&&(hc(e,t).flags|=256),2!==(e=mc(e,t))&&(t=Fl,Fl=n,null!==t&&ac(t)),e}function ac(e){null===Fl?Fl=e:Fl.push.apply(Fl,e)}function sc(e,t){for(t&=~zl,t&=~Ol,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-at(t),r=1<<n;e[n]=-1,t&=~r}}function lc(e){if(0!==(6&Il))throw Error(i(327));Sc();var t=ht(e,0);if(0===(1&t))return rc(e,$e()),null;var n=mc(e,t);if(0!==e.tag&&2===n){var r=ft(e);0!==r&&(t=r,n=ic(e,r))}if(1===n)throw n=El,hc(e,0),sc(e,t),rc(e,$e()),n;if(6===n)throw Error(i(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,wc(e,Fl,Hl),rc(e,$e()),null}function cc(e,t){var n=Il;Il|=1;try{return e(t)}finally{0===(Il=n)&&(Wl=$e()+500,Fo&&Ho())}}function uc(e){null!==ql&&0===ql.tag&&0===(6&Il)&&Sc();var t=Il;Il|=1;var n=Ml.transition,r=xt;try{if(Ml.transition=null,xt=1,e)return e()}finally{xt=r,Ml.transition=n,0===(6&(Il=t))&&Ho()}}function dc(){Pl=Ll.current,Co(Ll)}function hc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,oo(n)),null!==Dl)for(n=Dl.return;null!==n;){var r=n;switch(ni(r),r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&Ro();break;case 3:$i(),Co(Do),Co(To),ra();break;case 5:Ji(r);break;case 4:$i();break;case 13:case 19:Co(ea);break;case 10:Ii(r.type._context);break;case 22:case 23:dc()}n=n.return}if(Tl=e,Dl=e=Lc(e.current,null),jl=Pl=t,Rl=0,El=null,zl=Ol=Nl=0,Fl=Bl=null,null!==Pi){for(t=0;t<Pi.length;t++)if(null!==(r=(n=Pi[t]).interleaved)){n.interleaved=null;var o=r.next,i=n.pending;if(null!==i){var a=i.next;i.next=o,r.next=a}n.pending=r}Pi=null}return e}function pc(e,t){for(;;){var n=Dl;try{if(Mi(),oa.current=Qa,ua){for(var r=sa.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}ua=!1}if(aa=0,ca=la=sa=null,da=!1,ha=0,Cl.current=null,null===n||null===n.return){Rl=1,El=t,Dl=null;break}e:{var a=e,s=n.return,l=n,c=t;if(t=jl,l.flags|=32768,null!==c&&"object"===typeof c&&"function"===typeof c.then){var u=c,d=l,h=d.tag;if(0===(1&d.mode)&&(0===h||11===h||15===h)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var f=ms(s);if(null!==f){f.flags&=-257,vs(f,s,l,0,t),1&f.mode&&gs(a,u,t),c=u;var g=(t=f).updateQueue;if(null===g){var m=new Set;m.add(c),t.updateQueue=m}else g.add(c);break e}if(0===(1&t)){gs(a,u,t),gc();break e}c=Error(i(426))}else if(ii&&1&l.mode){var v=ms(s);if(null!==v){0===(65536&v.flags)&&(v.flags|=256),vs(v,s,l,0,t),gi(cs(c,l));break e}}a=c=cs(c,l),4!==Rl&&(Rl=2),null===Bl?Bl=[a]:Bl.push(a),a=s;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,Wi(a,ps(0,c,t));break e;case 1:l=c;var y=a.type,x=a.stateNode;if(0===(128&a.flags)&&("function"===typeof y.getDerivedStateFromError||null!==x&&"function"===typeof x.componentDidCatch&&(null===Xl||!Xl.has(x)))){a.flags|=65536,t&=-t,a.lanes|=t,Wi(a,fs(a,l,t));break e}}a=a.return}while(null!==a)}bc(n)}catch(b){t=b,Dl===n&&null!==n&&(Dl=n=n.return);continue}break}}function fc(){var e=kl.current;return kl.current=Qa,null===e?Qa:e}function gc(){0!==Rl&&3!==Rl&&2!==Rl||(Rl=4),null===Tl||0===(268435455&Nl)&&0===(268435455&Ol)||sc(Tl,jl)}function mc(e,t){var n=Il;Il|=2;var r=fc();for(Tl===e&&jl===t||(Hl=null,hc(e,t));;)try{vc();break}catch(o){pc(e,o)}if(Mi(),Il=n,kl.current=r,null!==Dl)throw Error(i(261));return Tl=null,jl=0,Rl}function vc(){for(;null!==Dl;)xc(Dl)}function yc(){for(;null!==Dl&&!Ze();)xc(Dl)}function xc(e){var t=_l(e.alternate,e,Pl);e.memoizedProps=e.pendingProps,null===t?bc(e):Dl=t,Cl.current=null}function bc(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(32768&t.flags)){if(null!==(n=Ys(n,t,Pl)))return void(Dl=n)}else{if(null!==(n=qs(n,t)))return n.flags&=32767,void(Dl=n);if(null===e)return Rl=6,void(Dl=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Dl=t);Dl=t=e}while(null!==t);0===Rl&&(Rl=5)}function wc(e,t,n){var r=xt,o=Ml.transition;try{Ml.transition=null,xt=1,function(e,t,n,r){do{Sc()}while(null!==ql);if(0!==(6&Il))throw Error(i(327));n=e.finishedWork;var o=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(i(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-at(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}(e,a),e===Tl&&(Dl=Tl=null,jl=0),0===(2064&n.subtreeFlags)&&0===(2064&n.flags)||Yl||(Yl=!0,Tc(tt,(function(){return Sc(),null}))),a=0!==(15990&n.flags),0!==(15990&n.subtreeFlags)||a){a=Ml.transition,Ml.transition=null;var s=xt;xt=1;var l=Il;Il|=4,Cl.current=null,function(e,t){if(eo=Gt,pr(e=hr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var o=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch(w){n=null;break e}var s=0,l=-1,c=-1,u=0,d=0,h=e,p=null;t:for(;;){for(var f;h!==n||0!==o&&3!==h.nodeType||(l=s+o),h!==a||0!==r&&3!==h.nodeType||(c=s+r),3===h.nodeType&&(s+=h.nodeValue.length),null!==(f=h.firstChild);)p=h,h=f;for(;;){if(h===e)break t;if(p===n&&++u===o&&(l=s),p===a&&++d===r&&(c=s),null!==(f=h.nextSibling))break;p=(h=p).parentNode}h=f}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(to={focusedElem:e,selectionRange:n},Gt=!1,Qs=t;null!==Qs;)if(e=(t=Qs).child,0!==(1028&t.subtreeFlags)&&null!==e)e.return=t,Qs=e;else for(;null!==Qs;){t=Qs;try{var g=t.alternate;if(0!==(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==g){var m=g.memoizedProps,v=g.memoizedState,y=t.stateNode,x=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:ns(t.type,m),v);y.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error(i(163))}}catch(w){Ac(t,t.return,w)}if(null!==(e=t.sibling)){e.return=t.return,Qs=e;break}Qs=t.return}g=tl,tl=!1}(e,n),ml(n,e),fr(to),Gt=!!eo,to=eo=null,e.current=n,yl(n,e,o),Ke(),Il=l,xt=s,Ml.transition=a}else e.current=n;if(Yl&&(Yl=!1,ql=e,Zl=o),a=e.pendingLanes,0===a&&(Xl=null),function(e){if(it&&"function"===typeof it.onCommitFiberRoot)try{it.onCommitFiberRoot(ot,e,void 0,128===(128&e.current.flags))}catch(t){}}(n.stateNode),rc(e,$e()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Gl)throw Gl=!1,e=Ul,Ul=null,e;0!==(1&Zl)&&0!==e.tag&&Sc(),a=e.pendingLanes,0!==(1&a)?e===$l?Kl++:(Kl=0,$l=e):Kl=0,Ho()}(e,t,n,r)}finally{Ml.transition=o,xt=r}return null}function Sc(){if(null!==ql){var e=bt(Zl),t=Ml.transition,n=xt;try{if(Ml.transition=null,xt=16>e?16:e,null===ql)var r=!1;else{if(e=ql,ql=null,Zl=0,0!==(6&Il))throw Error(i(331));var o=Il;for(Il|=4,Qs=e.current;null!==Qs;){var a=Qs,s=a.child;if(0!==(16&Qs.flags)){var l=a.deletions;if(null!==l){for(var c=0;c<l.length;c++){var u=l[c];for(Qs=u;null!==Qs;){var d=Qs;switch(d.tag){case 0:case 11:case 15:nl(8,d,a)}var h=d.child;if(null!==h)h.return=d,Qs=h;else for(;null!==Qs;){var p=(d=Qs).sibling,f=d.return;if(il(d),d===u){Qs=null;break}if(null!==p){p.return=f,Qs=p;break}Qs=f}}}var g=a.alternate;if(null!==g){var m=g.child;if(null!==m){g.child=null;do{var v=m.sibling;m.sibling=null,m=v}while(null!==m)}}Qs=a}}if(0!==(2064&a.subtreeFlags)&&null!==s)s.return=a,Qs=s;else e:for(;null!==Qs;){if(0!==(2048&(a=Qs).flags))switch(a.tag){case 0:case 11:case 15:nl(9,a,a.return)}var y=a.sibling;if(null!==y){y.return=a.return,Qs=y;break e}Qs=a.return}}var x=e.current;for(Qs=x;null!==Qs;){var b=(s=Qs).child;if(0!==(2064&s.subtreeFlags)&&null!==b)b.return=s,Qs=b;else e:for(s=x;null!==Qs;){if(0!==(2048&(l=Qs).flags))try{switch(l.tag){case 0:case 11:case 15:rl(9,l)}}catch(S){Ac(l,l.return,S)}if(l===s){Qs=null;break e}var w=l.sibling;if(null!==w){w.return=l.return,Qs=w;break e}Qs=l.return}}if(Il=o,Ho(),it&&"function"===typeof it.onPostCommitFiberRoot)try{it.onPostCommitFiberRoot(ot,e)}catch(S){}r=!0}return r}finally{xt=n,Ml.transition=t}}return!1}function _c(e,t,n){e=Fi(e,t=ps(0,t=cs(n,t),1),1),t=ec(),null!==e&&(vt(e,1,t),rc(e,t))}function Ac(e,t,n){if(3===e.tag)_c(e,e,n);else for(;null!==t;){if(3===t.tag){_c(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Xl||!Xl.has(r))){t=Fi(t,e=fs(t,e=cs(n,e),1),1),e=ec(),null!==t&&(vt(t,1,e),rc(t,e));break}}t=t.return}}function kc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=ec(),e.pingedLanes|=e.suspendedLanes&n,Tl===e&&(jl&n)===n&&(4===Rl||3===Rl&&(130023424&jl)===jl&&500>$e()-Vl?hc(e,0):zl|=n),rc(e,t)}function Cc(e,t){0===t&&(0===(1&e.mode)?t=1:(t=ut,0===(130023424&(ut<<=1))&&(ut=4194304)));var n=ec();null!==(e=Ei(e,t))&&(vt(e,t,n),rc(e,n))}function Mc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Cc(e,n)}function Ic(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(i(314))}null!==r&&r.delete(t),Cc(e,n)}function Tc(e,t){return Ye(e,t)}function Dc(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function jc(e,t,n,r){return new Dc(e,t,n,r)}function Pc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Lc(e,t){var n=e.alternate;return null===n?((n=jc(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Rc(e,t,n,r,o,a){var s=2;if(r=e,"function"===typeof e)Pc(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case _:return Ec(n.children,o,a,t);case A:s=8,o|=8;break;case k:return(e=jc(12,n,t,2|o)).elementType=k,e.lanes=a,e;case T:return(e=jc(13,n,t,o)).elementType=T,e.lanes=a,e;case D:return(e=jc(19,n,t,o)).elementType=D,e.lanes=a,e;case L:return Nc(n,o,a,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case C:s=10;break e;case M:s=9;break e;case I:s=11;break e;case j:s=14;break e;case P:s=16,r=null;break e}throw Error(i(130,null==e?e:typeof e,""))}return(t=jc(s,n,t,o)).elementType=e,t.type=r,t.lanes=a,t}function Ec(e,t,n,r){return(e=jc(7,e,r,t)).lanes=n,e}function Nc(e,t,n,r){return(e=jc(22,e,r,t)).elementType=L,e.lanes=n,e.stateNode={isHidden:!1},e}function Oc(e,t,n){return(e=jc(6,e,null,t)).lanes=n,e}function zc(e,t,n){return(t=jc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Bc(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=mt(0),this.expirationTimes=mt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mt(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Fc(e,t,n,r,o,i,a,s,l){return e=new Bc(e,t,n,s,l),1===t?(t=1,!0===i&&(t|=8)):t=0,i=jc(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Oi(i),e}function Vc(e){if(!e)return Io;e:{if(We(e=e._reactInternals)!==e||1!==e.tag)throw Error(i(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Lo(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(i(171))}if(1===e.tag){var n=e.type;if(Lo(n))return No(e,n,t)}return t}function Wc(e,t,n,r,o,i,a,s,l){return(e=Fc(n,r,!0,e,0,i,0,s,l)).context=Vc(null),n=e.current,(i=Bi(r=ec(),o=tc(n))).callback=void 0!==t&&null!==t?t:null,Fi(n,i,o),e.current.lanes=o,vt(e,o,r),rc(e,r),e}function Hc(e,t,n,r){var o=t.current,i=ec(),a=tc(o);return n=Vc(n),null===t.context?t.context=n:t.pendingContext=n,(t=Bi(i,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Fi(o,t,a))&&(nc(e,o,a,i),Vi(e,o,a)),a}function Gc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Uc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Xc(e,t){Uc(e,t),(e=e.alternate)&&Uc(e,t)}_l=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Do.current)xs=!0;else{if(0===(e.lanes&n)&&0===(128&t.flags))return xs=!1,function(e,t,n){switch(t.tag){case 3:Ts(t),fi();break;case 5:Qi(t);break;case 1:Lo(t.type)&&Oo(t);break;case 4:Ki(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Mo(_i,r._currentValue),r._currentValue=o;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Mo(ea,1&ea.current),t.flags|=128,null):0!==(n&t.child.childLanes)?Os(e,t,n):(Mo(ea,1&ea.current),null!==(e=Gs(e,t,n))?e.sibling:null);Mo(ea,1&ea.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(128&e.flags)){if(r)return Ws(e,t,n);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),Mo(ea,ea.current),r)break;return null;case 22:case 23:return t.lanes=0,As(e,t,n)}return Gs(e,t,n)}(e,t,n);xs=0!==(131072&e.flags)}else xs=!1,ii&&0!==(1048576&t.flags)&&ei(t,Yo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Hs(e,t),e=t.pendingProps;var o=Po(t,To.current);Di(t,n),o=ma(null,t,r,e,o,n);var a=va();return t.flags|=1,"object"===typeof o&&null!==o&&"function"===typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Lo(r)?(a=!0,Oo(t)):a=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,Oi(t),o.updater=os,t.stateNode=o,o._reactInternals=t,ls(t,r,e,n),t=Is(null,t,r,!0,a,n)):(t.tag=0,ii&&a&&ti(t),bs(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Hs(e,t),e=t.pendingProps,r=(o=r._init)(r._payload),t.type=r,o=t.tag=function(e){if("function"===typeof e)return Pc(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===I)return 11;if(e===j)return 14}return 2}(r),e=ns(r,e),o){case 0:t=Cs(null,t,r,e,n);break e;case 1:t=Ms(null,t,r,e,n);break e;case 11:t=ws(null,t,r,e,n);break e;case 14:t=Ss(null,t,r,ns(r.type,e),n);break e}throw Error(i(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,Cs(e,t,r,o=t.elementType===r?o:ns(r,o),n);case 1:return r=t.type,o=t.pendingProps,Ms(e,t,r,o=t.elementType===r?o:ns(r,o),n);case 3:e:{if(Ts(t),null===e)throw Error(i(387));r=t.pendingProps,o=(a=t.memoizedState).element,zi(e,t),Hi(t,r,null,n);var s=t.memoizedState;if(r=s.element,a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=Ds(e,t,r,n,o=cs(Error(i(423)),t));break e}if(r!==o){t=Ds(e,t,r,n,o=cs(Error(i(424)),t));break e}for(oi=co(t.stateNode.containerInfo.firstChild),ri=t,ii=!0,ai=null,n=Si(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(fi(),r===o){t=Gs(e,t,n);break e}bs(e,t,r,n)}t=t.child}return t;case 5:return Qi(t),null===e&&ui(t),r=t.type,o=t.pendingProps,a=null!==e?e.memoizedProps:null,s=o.children,no(r,o)?s=null:null!==a&&no(r,a)&&(t.flags|=32),ks(e,t),bs(e,t,s,n),t.child;case 6:return null===e&&ui(t),null;case 13:return Os(e,t,n);case 4:return Ki(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=wi(t,null,r,n):bs(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,ws(e,t,r,o=t.elementType===r?o:ns(r,o),n);case 7:return bs(e,t,t.pendingProps,n),t.child;case 8:case 12:return bs(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,a=t.memoizedProps,s=o.value,Mo(_i,r._currentValue),r._currentValue=s,null!==a)if(sr(a.value,s)){if(a.children===o.children&&!Do.current){t=Gs(e,t,n);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var l=a.dependencies;if(null!==l){s=a.child;for(var c=l.firstContext;null!==c;){if(c.context===r){if(1===a.tag){(c=Bi(-1,n&-n)).tag=2;var u=a.updateQueue;if(null!==u){var d=(u=u.shared).pending;null===d?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}a.lanes|=n,null!==(c=a.alternate)&&(c.lanes|=n),Ti(a.return,n,t),l.lanes|=n;break}c=c.next}}else if(10===a.tag)s=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(s=a.return))throw Error(i(341));s.lanes|=n,null!==(l=s.alternate)&&(l.lanes|=n),Ti(s,n,t),s=a.sibling}else s=a.child;if(null!==s)s.return=a;else for(s=a;null!==s;){if(s===t){s=null;break}if(null!==(a=s.sibling)){a.return=s.return,s=a;break}s=s.return}a=s}bs(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Di(t,n),r=r(o=ji(o)),t.flags|=1,bs(e,t,r,n),t.child;case 14:return o=ns(r=t.type,t.pendingProps),Ss(e,t,r,o=ns(r.type,o),n);case 15:return _s(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ns(r,o),Hs(e,t),t.tag=1,Lo(r)?(e=!0,Oo(t)):e=!1,Di(t,n),as(t,r,o),ls(t,r,o,n),Is(null,t,r,!0,e,n);case 19:return Ws(e,t,n);case 22:return As(e,t,n)}throw Error(i(156,t.tag))};var Yc="function"===typeof reportError?reportError:function(e){console.error(e)};function qc(e){this._internalRoot=e}function Zc(e){this._internalRoot=e}function Kc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function $c(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Qc(){}function Jc(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i;if("function"===typeof o){var s=o;o=function(){var e=Gc(a);s.call(e)}}Hc(t,a,e,o)}else a=function(e,t,n,r,o){if(o){if("function"===typeof r){var i=r;r=function(){var e=Gc(a);i.call(e)}}var a=Wc(t,r,e,0,null,!1,0,"",Qc);return e._reactRootContainer=a,e[go]=a.current,Wr(8===e.nodeType?e.parentNode:e),uc(),a}for(;o=e.lastChild;)e.removeChild(o);if("function"===typeof r){var s=r;r=function(){var e=Gc(l);s.call(e)}}var l=Fc(e,0,!1,null,0,!1,0,"",Qc);return e._reactRootContainer=l,e[go]=l.current,Wr(8===e.nodeType?e.parentNode:e),uc((function(){Hc(t,l,n,r)})),l}(n,t,e,o,r);return Gc(a)}Zc.prototype.render=qc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(i(409));Hc(e,t,null,null)},Zc.prototype.unmount=qc.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;uc((function(){Hc(null,e,null,null)})),t[go]=null}},Zc.prototype.unstable_scheduleHydration=function(e){if(e){var t=At();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Lt.length&&0!==t&&t<Lt[n].priority;n++);Lt.splice(n,0,e),0===n&&Ot(e)}},wt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=dt(t.pendingLanes);0!==n&&(yt(t,1|n),rc(t,$e()),0===(6&Il)&&(Wl=$e()+500,Ho()))}break;case 13:uc((function(){var t=Ei(e,1);if(null!==t){var n=ec();nc(t,e,1,n)}})),Xc(e,1)}},St=function(e){if(13===e.tag){var t=Ei(e,134217728);if(null!==t)nc(t,e,134217728,ec());Xc(e,134217728)}},_t=function(e){if(13===e.tag){var t=tc(e),n=Ei(e,t);if(null!==n)nc(n,e,t,ec());Xc(e,t)}},At=function(){return xt},kt=function(e,t){var n=xt;try{return xt=e,t()}finally{xt=n}},Se=function(e,t,n){switch(t){case"input":if(Q(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=So(r);if(!o)throw Error(i(90));Y(r),Q(r,o)}}}break;case"textarea":ie(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Ie=cc,Te=uc;var eu={usingClientEntryPoint:!1,Events:[bo,wo,So,Ce,Me,cc]},tu={findFiberByHostInstance:xo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},nu={bundleType:tu.bundleType,version:tu.version,rendererPackageName:tu.rendererPackageName,rendererConfig:tu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:b.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ue(e))?null:e.stateNode},findFiberByHostInstance:tu.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var ru=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ru.isDisabled&&ru.supportsFiber)try{ot=ru.inject(nu),it=ru}catch(ue){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=eu,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Kc(t))throw Error(i(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:S,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Kc(e))throw Error(i(299));var n=!1,r="",o=Yc;return null!==t&&void 0!==t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=Fc(e,1,!1,null,0,n,0,r,o),e[go]=t.current,Wr(8===e.nodeType?e.parentNode:e),new qc(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(i(188));throw e=Object.keys(e).join(","),Error(i(268,e))}return e=null===(e=Ue(t))?null:e.stateNode},t.flushSync=function(e){return uc(e)},t.hydrate=function(e,t,n){if(!$c(t))throw Error(i(200));return Jc(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Kc(e))throw Error(i(405));var r=null!=n&&n.hydratedSources||null,o=!1,a="",s=Yc;if(null!==n&&void 0!==n&&(!0===n.unstable_strictMode&&(o=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError)),t=Wc(t,null,e,1,null!=n?n:null,o,0,a,s),e[go]=t.current,Wr(e),r)for(e=0;e<r.length;e++)o=(o=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Zc(t)},t.render=function(e,t,n){if(!$c(t))throw Error(i(200));return Jc(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!$c(e))throw Error(i(40));return!!e._reactRootContainer&&(uc((function(){Jc(null,null,e,!1,(function(){e._reactRootContainer=null,e[go]=null}))})),!0)},t.unstable_batchedUpdates=cc,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!$c(n))throw Error(i(200));if(null==e||void 0===e._reactInternals)throw Error(i(38));return Jc(e,t,n,!1,r)},t.version="18.3.1-next-f1338f8080-20240426"},4391:(e,t,n)=>{"use strict";var r=n(7950);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},7950:(e,t,n)=>{"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(2730)},1153:(e,t,n)=>{"use strict";var r=n(5043),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,i={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!l.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:i,_owner:s.current}}t.Fragment=i,t.jsx=c,t.jsxs=c},4202:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.iterator;var f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,m={};function v(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||f}function y(){}function x(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||f}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=v.prototype;var b=x.prototype=new y;b.constructor=x,g(b,v.prototype),b.isPureReactComponent=!0;var w=Array.isArray,S=Object.prototype.hasOwnProperty,_={current:null},A={key:!0,ref:!0,__self:!0,__source:!0};function k(e,t,r){var o,i={},a=null,s=null;if(null!=t)for(o in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)S.call(t,o)&&!A.hasOwnProperty(o)&&(i[o]=t[o]);var l=arguments.length-2;if(1===l)i.children=r;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}if(e&&e.defaultProps)for(o in l=e.defaultProps)void 0===i[o]&&(i[o]=l[o]);return{$$typeof:n,type:e,key:a,ref:s,props:i,_owner:_.current}}function C(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}var M=/\/+/g;function I(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function T(e,t,o,i,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l=!1;if(null===e)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case n:case r:l=!0}}if(l)return a=a(l=e),e=""===i?"."+I(l,0):i,w(a)?(o="",null!=e&&(o=e.replace(M,"$&/")+"/"),T(a,t,o,"",(function(e){return e}))):null!=a&&(C(a)&&(a=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,o+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(M,"$&/")+"/")+e)),t.push(a)),1;if(l=0,i=""===i?".":i+":",w(e))for(var c=0;c<e.length;c++){var u=i+I(s=e[c],c);l+=T(s,t,o,u,a)}else if(u=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=p&&e[p]||e["@@iterator"])?e:null}(e),"function"===typeof u)for(e=u.call(e),c=0;!(s=e.next()).done;)l+=T(s=s.value,t,o,u=i+I(s,c++),a);else if("object"===s)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function D(e,t,n){if(null==e)return e;var r=[],o=0;return T(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function j(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var P={current:null},L={transition:null},R={ReactCurrentDispatcher:P,ReactCurrentBatchConfig:L,ReactCurrentOwner:_};function E(){throw Error("act(...) is not supported in production builds of React.")}t.Children={map:D,forEach:function(e,t,n){D(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return D(e,(function(){t++})),t},toArray:function(e){return D(e,(function(e){return e}))||[]},only:function(e){if(!C(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=v,t.Fragment=o,t.Profiler=a,t.PureComponent=x,t.StrictMode=i,t.Suspense=u,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=R,t.act=E,t.cloneElement=function(e,t,r){if(null===e||void 0===e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=g({},e.props),i=e.key,a=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,s=_.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)S.call(t,c)&&!A.hasOwnProperty(c)&&(o[c]=void 0===t[c]&&void 0!==l?l[c]:t[c])}var c=arguments.length-2;if(1===c)o.children=r;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];o.children=l}return{$$typeof:n,type:e.type,key:i,ref:a,props:o,_owner:s}},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},t.createElement=k,t.createFactory=function(e){var t=k.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=C,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:j}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=L.transition;L.transition={};try{e()}finally{L.transition=t}},t.unstable_act=E,t.useCallback=function(e,t){return P.current.useCallback(e,t)},t.useContext=function(e){return P.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return P.current.useDeferredValue(e)},t.useEffect=function(e,t){return P.current.useEffect(e,t)},t.useId=function(){return P.current.useId()},t.useImperativeHandle=function(e,t,n){return P.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return P.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return P.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return P.current.useMemo(e,t)},t.useReducer=function(e,t,n){return P.current.useReducer(e,t,n)},t.useRef=function(e){return P.current.useRef(e)},t.useState=function(e){return P.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return P.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return P.current.useTransition()},t.version="18.3.1"},5043:(e,t,n)=>{"use strict";e.exports=n(4202)},579:(e,t,n)=>{"use strict";e.exports=n(1153)},7234:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<i(o,t)))break e;e[r]=t,e[n]=o,n=r}}function r(e){return 0===e.length?null:e[0]}function o(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,a=o>>>1;r<a;){var s=2*(r+1)-1,l=e[s],c=s+1,u=e[c];if(0>i(l,n))c<o&&0>i(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else{if(!(c<o&&0>i(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var c=[],u=[],d=1,h=null,p=3,f=!1,g=!1,m=!1,v="function"===typeof setTimeout?setTimeout:null,y="function"===typeof clearTimeout?clearTimeout:null,x="undefined"!==typeof setImmediate?setImmediate:null;function b(e){for(var t=r(u);null!==t;){if(null===t.callback)o(u);else{if(!(t.startTime<=e))break;o(u),t.sortIndex=t.expirationTime,n(c,t)}t=r(u)}}function w(e){if(m=!1,b(e),!g)if(null!==r(c))g=!0,L(S);else{var t=r(u);null!==t&&R(w,t.startTime-e)}}function S(e,n){g=!1,m&&(m=!1,y(C),C=-1),f=!0;var i=p;try{for(b(n),h=r(c);null!==h&&(!(h.expirationTime>n)||e&&!T());){var a=h.callback;if("function"===typeof a){h.callback=null,p=h.priorityLevel;var s=a(h.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?h.callback=s:h===r(c)&&o(c),b(n)}else o(c);h=r(c)}if(null!==h)var l=!0;else{var d=r(u);null!==d&&R(w,d.startTime-n),l=!1}return l}finally{h=null,p=i,f=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var _,A=!1,k=null,C=-1,M=5,I=-1;function T(){return!(t.unstable_now()-I<M)}function D(){if(null!==k){var e=t.unstable_now();I=e;var n=!0;try{n=k(!0,e)}finally{n?_():(A=!1,k=null)}}else A=!1}if("function"===typeof x)_=function(){x(D)};else if("undefined"!==typeof MessageChannel){var j=new MessageChannel,P=j.port2;j.port1.onmessage=D,_=function(){P.postMessage(null)}}else _=function(){v(D,0)};function L(e){k=e,A||(A=!0,_())}function R(e,n){C=v((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){g||f||(g=!0,L(S))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return r(c)},t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=p;p=e;try{return t()}finally{p=n}},t.unstable_scheduleCallback=function(e,o,i){var a=t.unstable_now();switch("object"===typeof i&&null!==i?i="number"===typeof(i=i.delay)&&0<i?a+i:a:i=a,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:d++,callback:o,priorityLevel:e,startTime:i,expirationTime:s=i+s,sortIndex:-1},i>a?(e.sortIndex=i,n(u,e),null===r(c)&&e===r(u)&&(m?(y(C),C=-1):m=!0,R(w,i-a))):(e.sortIndex=s,n(c,e),g||f||(g=!0,L(S))),e},t.unstable_shouldYield=T,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},8853:(e,t,n)=>{"use strict";e.exports=n(7234)},4634:e=>{function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4994:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},4893:e=>{e.exports=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n},e.exports.__esModule=!0,e.exports.default=e.exports},8139:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,i(n)))}return e}function i(e){if("string"===typeof e||"number"===typeof e)return e;if("object"!==typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=a(t,n));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},8168:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(null,arguments)}n.d(t,{A:()=>r})},8587:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}n.d(t,{A:()=>r})},8387:(e,t,n)=>{"use strict";function r(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=r(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}n.d(t,{A:()=>o});const o=function(){for(var e,t,n=0,o="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=r(e))&&(o&&(o+=" "),o+=t);return o}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.m=e,n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"===typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"===typeof r.then)return r}var i=Object.create(null);n.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&o&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>r[e]));return a.default=()=>r,n.d(i,a),i}})(),n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,r)=>(n.f[r](e,t),t)),[])),n.u=e=>"static/js/"+e+".c2b2afdb.chunk.js",n.miniCssF=e=>{},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="front:";n.l=(r,o,i,a)=>{if(e[r])e[r].push(o);else{var s,l;if(void 0!==i)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var d=c[u];if(d.getAttribute("src")==r||d.getAttribute("data-webpack")==t+i){s=d;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,n.nc&&s.setAttribute("nonce",n.nc),s.setAttribute("data-webpack",t+i),s.src=r),e[r]=[o];var h=(t,n)=>{s.onerror=s.onload=null,clearTimeout(p);var o=e[r];if(delete e[r],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach((e=>e(n))),t)return t(n)},p=setTimeout(h.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=h.bind(null,s.onerror),s.onload=h.bind(null,s.onload),l&&document.head.appendChild(s)}}})(),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="/",(()=>{var e={792:0};n.f.j=(t,r)=>{var o=n.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{var i=new Promise(((n,r)=>o=e[t]=[n,r]));r.push(o[2]=i);var a=n.p+n.u(t),s=new Error;n.l(a,(r=>{if(n.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var i=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+i+": "+a+")",s.name="ChunkLoadError",s.type=i,s.request=a,o[1](s)}}),"chunk-"+t,t)}};var t=(t,r)=>{var o,i,a=r[0],s=r[1],l=r[2],c=0;if(a.some((t=>0!==e[t]))){for(o in s)n.o(s,o)&&(n.m[o]=s[o]);if(l)l(n)}for(t&&t(r);c<a.length;c++)i=a[c],n.o(e,i)&&e[i]&&e[i][0](),e[i]=0},r=self.webpackChunkfront=self.webpackChunkfront||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),(()=>{"use strict";var e={};n.r(e),n.d(e,{Arc:()=>hC,BezierCurve:()=>cC,BoundingRect:()=>Dh,Circle:()=>kk,CompoundPath:()=>fC,Ellipse:()=>Ik,Group:()=>Fg,Image:()=>Ny,IncrementalDisplayable:()=>CC,Line:()=>oC,LinearGradient:()=>mC,OrientedBoundingRect:()=>_C,Path:()=>Ty,Point:()=>bh,Polygon:()=>$k,Polyline:()=>eC,RadialGradient:()=>vC,Rect:()=>Gy,Ring:()=>Yk,Sector:()=>Gk,Text:()=>ax,applyTransform:()=>GC,clipPointsByRect:()=>qC,clipRectByRect:()=>ZC,createIcon:()=>KC,extendPath:()=>PC,extendShape:()=>DC,getShapeClass:()=>RC,getTransform:()=>HC,groupTransition:()=>YC,initProps:()=>fb,isElementRemoved:()=>gb,lineLineIntersect:()=>QC,linePolygonIntersect:()=>$C,makeImage:()=>NC,makePath:()=>EC,mergePath:()=>zC,registerShape:()=>LC,removeElement:()=>mb,removeElementWithFadeOut:()=>yb,resizePath:()=>BC,setTooltipConfig:()=>eM,subPixelOptimize:()=>WC,subPixelOptimizeLine:()=>FC,subPixelOptimizeRect:()=>VC,transformDirection:()=>UC,traverseElements:()=>nM,updateProps:()=>pb});var t,r=n(5043),o=n.t(r,2),i=n(4391);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(t||(t={}));const s="popstate";function l(e){return void 0===e&&(e={}),g((function(e,t){let{pathname:n,search:r,hash:o}=e.location;return h("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"===typeof t?t:p(t)}),null,e)}function c(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}function u(e,t){if(!e){"undefined"!==typeof console&&console.warn(t);try{throw new Error(t)}catch(Bk){}}}function d(e,t){return{usr:e.state,key:e.key,idx:t}}function h(e,t,n,r){return void 0===n&&(n=null),a({pathname:"string"===typeof e?e:e.pathname,search:"",hash:""},"string"===typeof t?f(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function p(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function f(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function g(e,n,r,o){void 0===o&&(o={});let{window:i=document.defaultView,v5Compat:l=!1}=o,u=i.history,f=t.Pop,g=null,m=v();function v(){return(u.state||{idx:null}).idx}function y(){f=t.Pop;let e=v(),n=null==e?null:e-m;m=e,g&&g({action:f,location:b.location,delta:n})}function x(e){let t="null"!==i.location.origin?i.location.origin:i.location.href,n="string"===typeof e?e:p(e);return n=n.replace(/ $/,"%20"),c(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==m&&(m=0,u.replaceState(a({},u.state,{idx:m}),""));let b={get action(){return f},get location(){return e(i,u)},listen(e){if(g)throw new Error("A history only accepts one active listener");return i.addEventListener(s,y),g=e,()=>{i.removeEventListener(s,y),g=null}},createHref:e=>n(i,e),createURL:x,encodeLocation(e){let t=x(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,n){f=t.Push;let o=h(b.location,e,n);r&&r(o,e),m=v()+1;let a=d(o,m),s=b.createHref(o);try{u.pushState(a,"",s)}catch(c){if(c instanceof DOMException&&"DataCloneError"===c.name)throw c;i.location.assign(s)}l&&g&&g({action:f,location:b.location,delta:1})},replace:function(e,n){f=t.Replace;let o=h(b.location,e,n);r&&r(o,e),m=v();let i=d(o,m),a=b.createHref(o);u.replaceState(i,"",a),l&&g&&g({action:f,location:b.location,delta:0})},go:e=>u.go(e)};return b}var m;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(m||(m={}));const v=new Set(["lazy","caseSensitive","path","id","index","children"]);function y(e,t,n,r){return void 0===n&&(n=[]),void 0===r&&(r={}),e.map(((e,o)=>{let i=[...n,String(o)],s="string"===typeof e.id?e.id:i.join("-");if(c(!0!==e.index||!e.children,"Cannot specify children on an index route"),c(!r[s],'Found a route id collision on id "'+s+"\".  Route id's must be globally unique within Data Router usages"),function(e){return!0===e.index}(e)){let n=a({},e,t(e),{id:s});return r[s]=n,n}{let n=a({},e,t(e),{id:s,children:void 0});return r[s]=n,e.children&&(n.children=y(e.children,t,i,r)),n}}))}function x(e,t,n){return void 0===n&&(n="/"),b(e,t,n,!1)}function b(e,t,n,r){let o=R(("string"===typeof t?f(t):t).pathname||"/",n);if(null==o)return null;let i=w(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(i);let a=null;for(let s=0;null==a&&s<i.length;++s){let e=L(o);a=j(i[s],e,r)}return a}function w(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r="");let o=(e,o,i)=>{let a={relativePath:void 0===i?e.path||"":i,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};a.relativePath.startsWith("/")&&(c(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),a.relativePath=a.relativePath.slice(r.length));let s=B([r,a.relativePath]),l=n.concat(a);e.children&&e.children.length>0&&(c(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),w(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:D(s,e.index),routesMeta:l})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of S(e.path))o(e,t,r);else o(e,t)})),t}function S(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===r.length)return o?[i,""]:[i];let a=S(r.join("/")),s=[];return s.push(...a.map((e=>""===e?i:[i,e].join("/")))),o&&s.push(...a),s.map((t=>e.startsWith("/")&&""===t?"/":t))}const _=/^:[\w-]+$/,A=3,k=2,C=1,M=10,I=-2,T=e=>"*"===e;function D(e,t){let n=e.split("/"),r=n.length;return n.some(T)&&(r+=I),t&&(r+=k),n.filter((e=>!T(e))).reduce(((e,t)=>e+(_.test(t)?A:""===t?C:M)),r)}function j(e,t,n){void 0===n&&(n=!1);let{routesMeta:r}=e,o={},i="/",a=[];for(let s=0;s<r.length;++s){let e=r[s],l=s===r.length-1,c="/"===i?t:t.slice(i.length)||"/",u=P({path:e.relativePath,caseSensitive:e.caseSensitive,end:l},c),d=e.route;if(!u&&l&&n&&!r[r.length-1].route.index&&(u=P({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},c)),!u)return null;Object.assign(o,u.params),a.push({params:o,pathname:B([i,u.pathname]),pathnameBase:F(B([i,u.pathnameBase])),route:d}),"/"!==u.pathnameBase&&(i=B([i,u.pathnameBase]))}return a}function P(e,t){"string"===typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);u("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))");let i=new RegExp(o,t?void 0:"i");return[i,r]}(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:r.reduce(((e,t,n)=>{let{paramName:r,isOptional:o}=t;if("*"===r){let e=s[n]||"";a=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const l=s[n];return e[r]=o&&!l?void 0:(l||"").replace(/%2F/g,"/"),e}),{}),pathname:i,pathnameBase:a,pattern:e}}function L(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return u(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function R(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function E(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"].  Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function N(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function O(e,t){let n=N(e);return t?n.map(((e,t)=>t===n.length-1?e.pathname:e.pathnameBase)):n.map((e=>e.pathnameBase))}function z(e,t,n,r){let o;void 0===r&&(r=!1),"string"===typeof e?o=f(e):(o=a({},e),c(!o.pathname||!o.pathname.includes("?"),E("?","pathname","search",o)),c(!o.pathname||!o.pathname.includes("#"),E("#","pathname","hash",o)),c(!o.search||!o.search.includes("#"),E("#","search","hash",o)));let i,s=""===e||""===o.pathname,l=s?"/":o.pathname;if(null==l)i=n;else{let e=t.length-1;if(!r&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}i=e>=0?t[e]:"/"}let u=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:o=""}="string"===typeof e?f(e):e,i=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:i,search:V(r),hash:W(o)}}(o,i),d=l&&"/"!==l&&l.endsWith("/"),h=(s||"."===l)&&n.endsWith("/");return u.pathname.endsWith("/")||!d&&!h||(u.pathname+="/"),u}const B=e=>e.join("/").replace(/\/\/+/g,"/"),F=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),V=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",W=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;class H{constructor(e,t,n,r){void 0===r&&(r=!1),this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function G(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}const U=["post","put","patch","delete"],X=new Set(U),Y=["get",...U],q=new Set(Y),Z=new Set([301,302,303,307,308]),K=new Set([307,308]),$={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Q={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},J={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},ee=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,te=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)}),ne="remix-router-transitions";function re(e){const n=e.window?e.window:"undefined"!==typeof window?window:void 0,r="undefined"!==typeof n&&"undefined"!==typeof n.document&&"undefined"!==typeof n.document.createElement,o=!r;let i;if(c(e.routes.length>0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let t=e.detectErrorBoundary;i=e=>({hasErrorBoundary:t(e)})}else i=te;let s,l,d,p={},f=y(e.routes,i,void 0,p),g=e.basename||"/",v=e.unstable_dataStrategy||pe,w=e.unstable_patchRoutesOnMiss,S=a({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,unstable_skipActionErrorRevalidation:!1},e.future),_=null,A=new Set,k=null,C=null,M=null,I=null!=e.hydrationData,T=x(f,e.history.location,g),D=null;if(null==T&&!w){let t=Me(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=Ce(f);T=n,D={[r.id]:t}}if(T&&w){ct(T,f,e.history.location.pathname).active&&(T=null)}if(T)if(T.some((e=>e.route.lazy)))l=!1;else if(T.some((e=>e.route.loader)))if(S.v7_partialHydration){let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null,r=e=>!e.route.loader||("function"!==typeof e.route.loader||!0!==e.route.loader.hydrate)&&(t&&void 0!==t[e.route.id]||n&&void 0!==n[e.route.id]);if(n){let e=T.findIndex((e=>void 0!==n[e.route.id]));l=T.slice(0,e+1).every(r)}else l=T.every(r)}else l=null!=e.hydrationData;else l=!0;else l=!1,T=[];let j,P={historyAction:e.history.action,location:e.history.location,matches:T,initialized:l,navigation:$,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||D,fetchers:new Map,blockers:new Map},L=t.Pop,E=!1,N=!1,O=new Map,z=null,B=!1,F=!1,V=[],W=[],H=new Map,U=0,X=-1,Y=new Map,q=new Set,Z=new Map,re=new Map,ae=new Set,le=new Map,ce=new Map,he=new Map,xe=!1;function be(e,t){void 0===t&&(t={}),P=a({},P,e);let n=[],r=[];S.v7_fetcherPersist&&P.fetchers.forEach(((e,t)=>{"idle"===e.state&&(ae.has(t)?r.push(t):n.push(t))})),[...A].forEach((e=>e(P,{deletedFetchers:r,unstable_viewTransitionOpts:t.viewTransitionOpts,unstable_flushSync:!0===t.flushSync}))),S.v7_fetcherPersist&&(n.forEach((e=>P.fetchers.delete(e))),r.forEach((e=>Ke(e))))}function we(n,r,o){var i,l;let c,{flushSync:u}=void 0===o?{}:o,d=null!=P.actionData&&null!=P.navigation.formMethod&&Ne(P.navigation.formMethod)&&"loading"===P.navigation.state&&!0!==(null==(i=n.state)?void 0:i._isRedirect);c=r.actionData?Object.keys(r.actionData).length>0?r.actionData:null:d?P.actionData:null;let h=r.loaderData?_e(P.loaderData,r.loaderData,r.matches||[],r.errors):P.loaderData,p=P.blockers;p.size>0&&(p=new Map(p),p.forEach(((e,t)=>p.set(t,J))));let g,m=!0===E||null!=P.navigation.formMethod&&Ne(P.navigation.formMethod)&&!0!==(null==(l=n.state)?void 0:l._isRedirect);if(s&&(f=s,s=void 0),B||L===t.Pop||(L===t.Push?e.history.push(n,n.state):L===t.Replace&&e.history.replace(n,n.state)),L===t.Pop){let e=O.get(P.location.pathname);e&&e.has(n.pathname)?g={currentLocation:P.location,nextLocation:n}:O.has(n.pathname)&&(g={currentLocation:n,nextLocation:P.location})}else if(N){let e=O.get(P.location.pathname);e?e.add(n.pathname):(e=new Set([n.pathname]),O.set(P.location.pathname,e)),g={currentLocation:P.location,nextLocation:n}}be(a({},r,{actionData:c,loaderData:h,historyAction:L,location:n,initialized:!0,navigation:$,revalidation:"idle",restoreScrollPosition:lt(n,r.matches||P.matches),preventScrollReset:m,blockers:p}),{viewTransitionOpts:g,flushSync:!0===u}),L=t.Pop,E=!1,N=!1,B=!1,F=!1,V=[],W=[]}async function Te(n,r,o){j&&j.abort(),j=null,L=n,B=!0===(o&&o.startUninterruptedRevalidation),function(e,t){if(k&&M){let n=st(e,t);k[n]=M()}}(P.location,P.matches),E=!0===(o&&o.preventScrollReset),N=!0===(o&&o.enableViewTransition);let i=s||f,l=o&&o.overrideNavigation,c=x(i,r,g),u=!0===(o&&o.flushSync),d=ct(c,i,r.pathname);if(d.active&&d.matches&&(c=d.matches),!c){let{error:e,notFoundMatches:t,route:n}=ot(r.pathname);return void we(r,{matches:t,loaderData:{},errors:{[n.id]:e}},{flushSync:u})}if(P.initialized&&!F&&function(e,t){if(e.pathname!==t.pathname||e.search!==t.search)return!1;if(""===e.hash)return""!==t.hash;if(e.hash===t.hash)return!0;if(""!==t.hash)return!0;return!1}(P.location,r)&&!(o&&o.submission&&Ne(o.submission.formMethod)))return void we(r,{matches:c},{flushSync:u});j=new AbortController;let h,p=ye(e.history,r,j.signal,o&&o.submission);if(o&&o.pendingError)h=[ke(c).route.id,{type:m.error,error:o.pendingError}];else if(o&&o.submission&&Ne(o.submission.formMethod)){let n=await async function(e,n,r,o,i,a){void 0===a&&(a={});Xe();let s,l=function(e,t){let n={state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text};return n}(n,r);if(be({navigation:l},{flushSync:!0===a.flushSync}),i){let t=await ut(o,n.pathname,e.signal);if("aborted"===t.type)return{shortCircuited:!0};if("error"===t.type){let{error:e,notFoundMatches:r,route:o}=it(n.pathname,t);return{matches:r,pendingActionResult:[o.id,{type:m.error,error:e}]}}if(!t.matches){let{notFoundMatches:e,error:t,route:r}=ot(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:m.error,error:t}]}}o=t.matches}let c=Fe(o,n);if(c.route.action||c.route.lazy){if(s=(await Be("action",e,[c],o))[0],e.signal.aborted)return{shortCircuited:!0}}else s={type:m.error,error:Me(405,{method:e.method,pathname:n.pathname,routeId:c.route.id})};if(Le(s)){let t;if(a&&null!=a.replace)t=a.replace;else{t=ve(s.response.headers.get("Location"),new URL(e.url),g)===P.location.pathname+P.location.search}return await Ee(e,s,{submission:r,replace:t}),{shortCircuited:!0}}if(je(s))throw Me(400,{type:"defer-action"});if(Pe(s)){let e=ke(o,c.route.id);return!0!==(a&&a.replace)&&(L=t.Push),{matches:o,pendingActionResult:[e.route.id,s]}}return{matches:o,pendingActionResult:[c.route.id,s]}}(p,r,o.submission,c,d.active,{replace:o.replace,flushSync:u});if(n.shortCircuited)return;if(n.pendingActionResult){let[e,t]=n.pendingActionResult;if(Pe(t)&&G(t.error)&&404===t.error.status)return j=null,void we(r,{matches:n.matches,loaderData:{},errors:{[e]:t.error}})}c=n.matches||c,h=n.pendingActionResult,l=We(r,o.submission),u=!1,d.active=!1,p=ye(e.history,p.url,p.signal)}let{shortCircuited:v,matches:y,loaderData:b,errors:w}=await async function(t,n,r,o,i,l,c,u,d,h,p){let m=i||We(n,l),v=l||c||Ve(m),y=!B&&(!S.v7_partialHydration||!d);if(o){if(y){let e=Re(p);be(a({navigation:m},void 0!==e?{actionData:e}:{}),{flushSync:h})}let e=await ut(r,n.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){let{error:t,notFoundMatches:r,route:o}=it(n.pathname,e);return{matches:r,loaderData:{},errors:{[o.id]:t}}}if(!e.matches){let{error:e,notFoundMatches:t,route:r}=ot(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}r=e.matches}let x=s||f,[b,w]=se(e.history,P,r,v,n,S.v7_partialHydration&&!0===d,S.unstable_skipActionErrorRevalidation,F,V,W,ae,Z,q,x,g,p);if(at((e=>!(r&&r.some((t=>t.route.id===e)))||b&&b.some((t=>t.route.id===e)))),X=++U,0===b.length&&0===w.length){let e=Je();return we(n,a({matches:r,loaderData:{},errors:p&&Pe(p[1])?{[p[0]]:p[1].error}:null},Ae(p),e?{fetchers:new Map(P.fetchers)}:{}),{flushSync:h}),{shortCircuited:!0}}if(y){let e={};if(!o){e.navigation=m;let t=Re(p);void 0!==t&&(e.actionData=t)}w.length>0&&(e.fetchers=function(e){return e.forEach((e=>{let t=P.fetchers.get(e.key),n=He(void 0,t?t.data:void 0);P.fetchers.set(e.key,n)})),new Map(P.fetchers)}(w)),be(e,{flushSync:h})}w.forEach((e=>{H.has(e.key)&&$e(e.key),e.controller&&H.set(e.key,e.controller)}));let _=()=>w.forEach((e=>$e(e.key)));j&&j.signal.addEventListener("abort",_);let{loaderResults:A,fetcherResults:k}=await Ue(P.matches,r,b,w,t);if(t.signal.aborted)return{shortCircuited:!0};j&&j.signal.removeEventListener("abort",_);w.forEach((e=>H.delete(e.key)));let C=Ie([...A,...k]);if(C){if(C.idx>=b.length){let e=w[C.idx-b.length].key;q.add(e)}return await Ee(t,C.result,{replace:u}),{shortCircuited:!0}}let{loaderData:M,errors:I}=Se(P,r,b,A,p,w,k,le);le.forEach(((e,t)=>{e.subscribe((n=>{(n||e.done)&&le.delete(t)}))})),S.v7_partialHydration&&d&&P.errors&&Object.entries(P.errors).filter((e=>{let[t]=e;return!b.some((e=>e.route.id===t))})).forEach((e=>{let[t,n]=e;I=Object.assign(I||{},{[t]:n})}));let T=Je(),D=et(X),L=T||D||w.length>0;return a({matches:r,loaderData:M,errors:I},L?{fetchers:new Map(P.fetchers)}:{})}(p,r,c,d.active,l,o&&o.submission,o&&o.fetcherSubmission,o&&o.replace,o&&!0===o.initialHydration,u,h);v||(j=null,we(r,a({matches:y||c},Ae(h),{loaderData:b,errors:w})))}function Re(e){return e&&!Pe(e[1])?{[e[0]]:e[1].data}:P.actionData?0===Object.keys(P.actionData).length?null:P.actionData:void 0}async function Ee(o,i,s){let{submission:l,fetcherSubmission:u,replace:d}=void 0===s?{}:s;i.response.headers.has("X-Remix-Revalidate")&&(F=!0);let p=i.response.headers.get("Location");c(p,"Expected a Location header on the redirect Response"),p=ve(p,new URL(o.url),g);let f=h(P.location,p,{_isRedirect:!0});if(r){let t=!1;if(i.response.headers.has("X-Remix-Reload-Document"))t=!0;else if(ee.test(p)){const r=e.history.createURL(p);t=r.origin!==n.location.origin||null==R(r.pathname,g)}if(t)return void(d?n.location.replace(p):n.location.assign(p))}j=null;let m=!0===d?t.Replace:t.Push,{formMethod:v,formAction:y,formEncType:x}=P.navigation;!l&&!u&&v&&y&&x&&(l=Ve(P.navigation));let b=l||u;if(K.has(i.response.status)&&b&&Ne(b.formMethod))await Te(m,f,{submission:a({},b,{formAction:p}),preventScrollReset:E});else{let e=We(f,l);await Te(m,f,{overrideNavigation:e,fetcherSubmission:u,preventScrollReset:E})}}async function Be(e,t,n,r){try{let o=await fe(v,e,t,n,r,p,i);return await Promise.all(o.map(((e,o)=>{if(De(e)){let i=e.result;return{type:m.redirect,response:me(i,t,n[o].route.id,r,g,S.v7_relativeSplatPath)}}return ge(e)})))}catch(Bk){return n.map((()=>({type:m.error,error:Bk})))}}async function Ue(t,n,r,o,i){let[a,...s]=await Promise.all([r.length?Be("loader",i,r,n):[],...o.map((t=>{if(t.matches&&t.match&&t.controller){return Be("loader",ye(e.history,t.path,t.controller.signal),[t.match],t.matches).then((e=>e[0]))}return Promise.resolve({type:m.error,error:Me(404,{pathname:t.path})})}))]);return await Promise.all([Oe(t,r,a,a.map((()=>i.signal)),!1,P.loaderData),Oe(t,o.map((e=>e.match)),s,o.map((e=>e.controller?e.controller.signal:null)),!0)]),{loaderResults:a,fetcherResults:s}}function Xe(){F=!0,V.push(...at()),Z.forEach(((e,t)=>{H.has(t)&&(W.push(t),$e(t))}))}function Ye(e,t,n){void 0===n&&(n={}),P.fetchers.set(e,t),be({fetchers:new Map(P.fetchers)},{flushSync:!0===(n&&n.flushSync)})}function qe(e,t,n,r){void 0===r&&(r={});let o=ke(P.matches,t);Ke(e),be({errors:{[o.route.id]:n},fetchers:new Map(P.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function Ze(e){return S.v7_fetcherPersist&&(re.set(e,(re.get(e)||0)+1),ae.has(e)&&ae.delete(e)),P.fetchers.get(e)||Q}function Ke(e){let t=P.fetchers.get(e);!H.has(e)||t&&"loading"===t.state&&Y.has(e)||$e(e),Z.delete(e),Y.delete(e),q.delete(e),ae.delete(e),P.fetchers.delete(e)}function $e(e){let t=H.get(e);c(t,"Expected fetch controller: "+e),t.abort(),H.delete(e)}function Qe(e){for(let t of e){let e=Ge(Ze(t).data);P.fetchers.set(t,e)}}function Je(){let e=[],t=!1;for(let n of q){let r=P.fetchers.get(n);c(r,"Expected fetcher: "+n),"loading"===r.state&&(q.delete(n),e.push(n),t=!0)}return Qe(e),t}function et(e){let t=[];for(let[n,r]of Y)if(r<e){let e=P.fetchers.get(n);c(e,"Expected fetcher: "+n),"loading"===e.state&&($e(n),Y.delete(n),t.push(n))}return Qe(t),t.length>0}function tt(e){P.blockers.delete(e),ce.delete(e)}function nt(e,t){let n=P.blockers.get(e)||J;c("unblocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"proceeding"===t.state||"blocked"===n.state&&"unblocked"===t.state||"proceeding"===n.state&&"unblocked"===t.state,"Invalid blocker state transition: "+n.state+" -> "+t.state);let r=new Map(P.blockers);r.set(e,t),be({blockers:r})}function rt(e){let{currentLocation:t,nextLocation:n,historyAction:r}=e;if(0===ce.size)return;ce.size>1&&u(!1,"A router only supports one blocker at a time");let o=Array.from(ce.entries()),[i,a]=o[o.length-1],s=P.blockers.get(i);return s&&"proceeding"===s.state?void 0:a({currentLocation:t,nextLocation:n,historyAction:r})?i:void 0}function ot(e){let t=Me(404,{pathname:e}),n=s||f,{matches:r,route:o}=Ce(n);return at(),{notFoundMatches:r,route:o,error:t}}function it(e,t){let n=t.partialMatches,r=n[n.length-1].route;return{notFoundMatches:n,route:r,error:Me(400,{type:"route-discovery",routeId:r.id,pathname:e,message:null!=t.error&&"message"in t.error?t.error:String(t.error)})}}function at(e){let t=[];return le.forEach(((n,r)=>{e&&!e(r)||(n.cancel(),t.push(r),le.delete(r))})),t}function st(e,t){if(C){let n=C(e,t.map((e=>function(e,t){let{route:n,pathname:r,params:o}=e;return{id:n.id,pathname:r,params:o,data:t[n.id],handle:n.handle}}(e,P.loaderData))));return n||e.key}return e.key}function lt(e,t){if(k){let n=st(e,t),r=k[n];if("number"===typeof r)return r}return null}function ct(e,t,n){if(w){if(!e){return{active:!0,matches:b(t,n,g,!0)||[]}}{let r=e[e.length-1].route;if(r.path&&("*"===r.path||r.path.endsWith("/*"))){return{active:!0,matches:b(t,n,g,!0)}}}}return{active:!1,matches:null}}async function ut(e,t,n){let r=e,o=r.length>0?r[r.length-1].route:null;for(;;){let e=null==s,a=s||f;try{await ue(w,t,r,a,p,i,he,n)}catch(Bk){return{type:"error",error:Bk,partialMatches:r}}finally{e&&(f=[...f])}if(n.aborted)return{type:"aborted"};let l=x(a,t,g),c=!1;if(l){let e=l[l.length-1].route;if(e.index)return{type:"success",matches:l};if(e.path&&e.path.length>0){if("*"!==e.path)return{type:"success",matches:l};c=!0}}let u=b(a,t,g,!0);if(!u||r.map((e=>e.route.id)).join("-")===u.map((e=>e.route.id)).join("-"))return{type:"success",matches:c?l:null};if(r=u,o=r[r.length-1].route,"*"===o.path)return{type:"success",matches:r}}}return d={get basename(){return g},get future(){return S},get state(){return P},get routes(){return f},get window(){return n},initialize:function(){if(_=e.history.listen((t=>{let{action:n,location:r,delta:o}=t;if(xe)return void(xe=!1);u(0===ce.size||null!=o,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs.  This can also happen if you are using createHashRouter and the user manually changes the URL.");let i=rt({currentLocation:P.location,nextLocation:r,historyAction:n});return i&&null!=o?(xe=!0,e.history.go(-1*o),void nt(i,{state:"blocked",location:r,proceed(){nt(i,{state:"proceeding",proceed:void 0,reset:void 0,location:r}),e.history.go(o)},reset(){let e=new Map(P.blockers);e.set(i,J),be({blockers:e})}})):Te(n,r)})),r){!function(e,t){try{let n=e.sessionStorage.getItem(ne);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch(Bk){}}(n,O);let e=()=>function(e,t){if(t.size>0){let r={};for(let[e,n]of t)r[e]=[...n];try{e.sessionStorage.setItem(ne,JSON.stringify(r))}catch(n){u(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}(n,O);n.addEventListener("pagehide",e),z=()=>n.removeEventListener("pagehide",e)}return P.initialized||Te(t.Pop,P.location,{initialHydration:!0}),d},subscribe:function(e){return A.add(e),()=>A.delete(e)},enableScrollRestoration:function(e,t,n){if(k=e,M=t,C=n||null,!I&&P.navigation===$){I=!0;let e=lt(P.location,P.matches);null!=e&&be({restoreScrollPosition:e})}return()=>{k=null,M=null,C=null}},navigate:async function n(r,o){if("number"===typeof r)return void e.history.go(r);let i=oe(P.location,P.matches,g,S.v7_prependBasename,r,S.v7_relativeSplatPath,null==o?void 0:o.fromRouteId,null==o?void 0:o.relative),{path:s,submission:l,error:c}=ie(S.v7_normalizeFormMethod,!1,i,o),u=P.location,d=h(P.location,s,o&&o.state);d=a({},d,e.history.encodeLocation(d));let p=o&&null!=o.replace?o.replace:void 0,f=t.Push;!0===p?f=t.Replace:!1===p||null!=l&&Ne(l.formMethod)&&l.formAction===P.location.pathname+P.location.search&&(f=t.Replace);let m=o&&"preventScrollReset"in o?!0===o.preventScrollReset:void 0,v=!0===(o&&o.unstable_flushSync),y=rt({currentLocation:u,nextLocation:d,historyAction:f});if(!y)return await Te(f,d,{submission:l,pendingError:c,preventScrollReset:m,replace:o&&o.replace,enableViewTransition:o&&o.unstable_viewTransition,flushSync:v});nt(y,{state:"blocked",location:d,proceed(){nt(y,{state:"proceeding",proceed:void 0,reset:void 0,location:d}),n(r,o)},reset(){let e=new Map(P.blockers);e.set(y,J),be({blockers:e})}})},fetch:function(t,n,r,i){if(o)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");H.has(t)&&$e(t);let a=!0===(i&&i.unstable_flushSync),l=s||f,u=oe(P.location,P.matches,g,S.v7_prependBasename,r,S.v7_relativeSplatPath,n,null==i?void 0:i.relative),d=x(l,u,g),h=ct(d,l,u);if(h.active&&h.matches&&(d=h.matches),!d)return void qe(t,n,Me(404,{pathname:u}),{flushSync:a});let{path:p,submission:m,error:v}=ie(S.v7_normalizeFormMethod,!0,u,i);if(v)return void qe(t,n,v,{flushSync:a});let y=Fe(d,p);E=!0===(i&&i.preventScrollReset),m&&Ne(m.formMethod)?async function(t,n,r,o,i,a,l,u){function d(e){if(!e.route.action&&!e.route.lazy){let e=Me(405,{method:u.formMethod,pathname:r,routeId:n});return qe(t,n,e,{flushSync:l}),!0}return!1}if(Xe(),Z.delete(t),!a&&d(o))return;let h=P.fetchers.get(t);Ye(t,function(e,t){let n={state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0};return n}(u,h),{flushSync:l});let p=new AbortController,m=ye(e.history,r,p.signal,u);if(a){let e=await ut(i,r,m.signal);if("aborted"===e.type)return;if("error"===e.type){let{error:o}=it(r,e);return void qe(t,n,o,{flushSync:l})}if(!e.matches)return void qe(t,n,Me(404,{pathname:r}),{flushSync:l});if(d(o=Fe(i=e.matches,r)))return}H.set(t,p);let v=U,y=await Be("action",m,[o],i),b=y[0];if(m.signal.aborted)return void(H.get(t)===p&&H.delete(t));if(S.v7_fetcherPersist&&ae.has(t)){if(Le(b)||Pe(b))return void Ye(t,Ge(void 0))}else{if(Le(b))return H.delete(t),X>v?void Ye(t,Ge(void 0)):(q.add(t),Ye(t,He(u)),Ee(m,b,{fetcherSubmission:u}));if(Pe(b))return void qe(t,n,b.error)}if(je(b))throw Me(400,{type:"defer-action"});let w=P.navigation.location||P.location,_=ye(e.history,w,p.signal),A=s||f,k="idle"!==P.navigation.state?x(A,P.navigation.location,g):P.matches;c(k,"Didn't find any matches after fetcher action");let C=++U;Y.set(t,C);let M=He(u,b.data);P.fetchers.set(t,M);let[I,T]=se(e.history,P,k,u,w,!1,S.unstable_skipActionErrorRevalidation,F,V,W,ae,Z,q,A,g,[o.route.id,b]);T.filter((e=>e.key!==t)).forEach((e=>{let t=e.key,n=P.fetchers.get(t),r=He(void 0,n?n.data:void 0);P.fetchers.set(t,r),H.has(t)&&$e(t),e.controller&&H.set(t,e.controller)})),be({fetchers:new Map(P.fetchers)});let D=()=>T.forEach((e=>$e(e.key)));p.signal.addEventListener("abort",D);let{loaderResults:R,fetcherResults:E}=await Ue(P.matches,k,I,T,_);if(p.signal.aborted)return;p.signal.removeEventListener("abort",D),Y.delete(t),H.delete(t),T.forEach((e=>H.delete(e.key)));let N=Ie([...R,...E]);if(N){if(N.idx>=I.length){let e=T[N.idx-I.length].key;q.add(e)}return Ee(_,N.result)}let{loaderData:O,errors:z}=Se(P,P.matches,I,R,void 0,T,E,le);if(P.fetchers.has(t)){let e=Ge(b.data);P.fetchers.set(t,e)}et(C),"loading"===P.navigation.state&&C>X?(c(L,"Expected pending action"),j&&j.abort(),we(P.navigation.location,{matches:k,loaderData:O,errors:z,fetchers:new Map(P.fetchers)})):(be({errors:z,loaderData:_e(P.loaderData,O,k,z),fetchers:new Map(P.fetchers)}),F=!1)}(t,n,p,y,d,h.active,a,m):(Z.set(t,{routeId:n,path:p}),async function(t,n,r,o,i,a,s,l){let u=P.fetchers.get(t);Ye(t,He(l,u?u.data:void 0),{flushSync:s});let d=new AbortController,h=ye(e.history,r,d.signal);if(a){let e=await ut(i,r,h.signal);if("aborted"===e.type)return;if("error"===e.type){let{error:o}=it(r,e);return void qe(t,n,o,{flushSync:s})}if(!e.matches)return void qe(t,n,Me(404,{pathname:r}),{flushSync:s});o=Fe(i=e.matches,r)}H.set(t,d);let p=U,f=await Be("loader",h,[o],i),g=f[0];je(g)&&(g=await ze(g,h.signal,!0)||g);H.get(t)===d&&H.delete(t);if(h.signal.aborted)return;if(ae.has(t))return void Ye(t,Ge(void 0));if(Le(g))return X>p?void Ye(t,Ge(void 0)):(q.add(t),void await Ee(h,g));if(Pe(g))return void qe(t,n,g.error);c(!je(g),"Unhandled fetcher deferred data"),Ye(t,Ge(g.data))}(t,n,p,y,d,h.active,a,m))},revalidate:function(){Xe(),be({revalidation:"loading"}),"submitting"!==P.navigation.state&&("idle"!==P.navigation.state?Te(L||P.historyAction,P.navigation.location,{overrideNavigation:P.navigation}):Te(P.historyAction,P.location,{startUninterruptedRevalidation:!0}))},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Ze,deleteFetcher:function(e){if(S.v7_fetcherPersist){let t=(re.get(e)||0)-1;t<=0?(re.delete(e),ae.add(e)):re.set(e,t)}else Ke(e);be({fetchers:new Map(P.fetchers)})},dispose:function(){_&&_(),z&&z(),A.clear(),j&&j.abort(),P.fetchers.forEach(((e,t)=>Ke(t))),P.blockers.forEach(((e,t)=>tt(t)))},getBlocker:function(e,t){let n=P.blockers.get(e)||J;return ce.get(e)!==t&&ce.set(e,t),n},deleteBlocker:tt,patchRoutes:function(e,t){let n=null==s;de(e,t,s||f,p,i),n&&(f=[...f],be({}))},_internalFetchControllers:H,_internalActiveDeferreds:le,_internalSetRoutes:function(e){p={},s=y(e,i,void 0,p)}},d}Symbol("deferred");function oe(e,t,n,r,o,i,a,s){let l,c;if(a){l=[];for(let e of t)if(l.push(e),e.route.id===a){c=e;break}}else l=t,c=t[t.length-1];let u=z(o||".",O(l,i),R(e.pathname,n)||e.pathname,"path"===s);return null==o&&(u.search=e.search,u.hash=e.hash),null!=o&&""!==o&&"."!==o||!c||!c.route.index||Be(u.search)||(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r&&"/"!==n&&(u.pathname="/"===u.pathname?n:B([n,u.pathname])),p(u)}function ie(e,t,n,r){if(!r||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(r))return{path:n};if(r.formMethod&&!Ee(r.formMethod))return{path:n,error:Me(405,{method:r.formMethod})};let o,i,a=()=>({path:n,error:Me(400,{type:"invalid-body"})}),s=r.formMethod||"get",l=e?s.toUpperCase():s.toLowerCase(),u=Te(n);if(void 0!==r.body){if("text/plain"===r.formEncType){if(!Ne(l))return a();let e="string"===typeof r.body?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce(((e,t)=>{let[n,r]=t;return""+e+n+"="+r+"\n"}),""):String(r.body);return{path:n,submission:{formMethod:l,formAction:u,formEncType:r.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===r.formEncType){if(!Ne(l))return a();try{let e="string"===typeof r.body?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:l,formAction:u,formEncType:r.formEncType,formData:void 0,json:e,text:void 0}}}catch(Bk){return a()}}}if(c("function"===typeof FormData,"FormData is not available in this environment"),r.formData)o=xe(r.formData),i=r.formData;else if(r.body instanceof FormData)o=xe(r.body),i=r.body;else if(r.body instanceof URLSearchParams)o=r.body,i=be(o);else if(null==r.body)o=new URLSearchParams,i=new FormData;else try{o=new URLSearchParams(r.body),i=be(o)}catch(Bk){return a()}let d={formMethod:l,formAction:u,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:i,json:void 0,text:void 0};if(Ne(d.formMethod))return{path:n,submission:d};let h=f(n);return t&&h.search&&Be(h.search)&&o.append("index",""),h.search="?"+o,{path:p(h),submission:d}}function ae(e,t){let n=e;if(t){let r=e.findIndex((e=>e.route.id===t));r>=0&&(n=e.slice(0,r))}return n}function se(e,t,n,r,o,i,s,l,c,u,d,h,p,f,g,m){let v=m?Pe(m[1])?m[1].error:m[1].data:void 0,y=e.createURL(t.location),b=e.createURL(o),w=m&&Pe(m[1])?m[0]:void 0,S=w?ae(n,w):n,_=m?m[1].statusCode:void 0,A=s&&_&&_>=400,k=S.filter(((e,n)=>{let{route:o}=e;if(o.lazy)return!0;if(null==o.loader)return!1;if(i)return!("function"===typeof o.loader&&!o.loader.hydrate)||void 0===t.loaderData[o.id]&&(!t.errors||void 0===t.errors[o.id]);if(function(e,t,n){let r=!t||n.route.id!==t.route.id,o=void 0===e[n.route.id];return r||o}(t.loaderData,t.matches[n],e)||c.some((t=>t===e.route.id)))return!0;let s=t.matches[n],u=e;return ce(e,a({currentUrl:y,currentParams:s.params,nextUrl:b,nextParams:u.params},r,{actionResult:v,unstable_actionStatus:_,defaultShouldRevalidate:!A&&(l||y.pathname+y.search===b.pathname+b.search||y.search!==b.search||le(s,u))}))})),C=[];return h.forEach(((e,o)=>{if(i||!n.some((t=>t.route.id===e.routeId))||d.has(o))return;let s=x(f,e.path,g);if(!s)return void C.push({key:o,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});let c=t.fetchers.get(o),h=Fe(s,e.path),m=!1;m=!p.has(o)&&(!!u.includes(o)||(c&&"idle"!==c.state&&void 0===c.data?l:ce(h,a({currentUrl:y,currentParams:t.matches[t.matches.length-1].params,nextUrl:b,nextParams:n[n.length-1].params},r,{actionResult:v,unstable_actionStatus:_,defaultShouldRevalidate:!A&&l})))),m&&C.push({key:o,routeId:e.routeId,path:e.path,matches:s,match:h,controller:new AbortController})})),[k,C]}function le(e,t){let n=e.route.path;return e.pathname!==t.pathname||null!=n&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function ce(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if("boolean"===typeof n)return n}return t.defaultShouldRevalidate}async function ue(e,t,n,r,o,i,a,s){let l=[t,...n.map((e=>e.route.id))].join("-");try{let u=a.get(l);u||(u=e({path:t,matches:n,patch:(e,t)=>{s.aborted||de(e,t,r,o,i)}}),a.set(l,u)),u&&("object"===typeof(c=u)&&null!=c&&"then"in c)&&await u}finally{a.delete(l)}var c}function de(e,t,n,r,o){if(e){var i;let n=r[e];c(n,"No route found to patch children into: routeId = "+e);let a=y(t,o,[e,"patch",String((null==(i=n.children)?void 0:i.length)||"0")],r);n.children?n.children.push(...a):n.children=a}else{let e=y(t,o,["patch",String(n.length||"0")],r);n.push(...e)}}async function he(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let o=n[e.id];c(o,"No route found in manifest");let i={};for(let a in r){let e=void 0!==o[a]&&"hasErrorBoundary"!==a;u(!e,'Route "'+o.id+'" has a static property "'+a+'" defined but its lazy function is also returning a value for this property. The lazy route property "'+a+'" will be ignored.'),e||v.has(a)||(i[a]=r[a])}Object.assign(o,i),Object.assign(o,a({},t(o),{lazy:void 0}))}function pe(e){return Promise.all(e.matches.map((e=>e.resolve())))}async function fe(e,t,n,r,o,i,s,l){let u=r.reduce(((e,t)=>e.add(t.route.id)),new Set),d=new Set,h=await e({matches:o.map((e=>{let r=u.has(e.route.id);return a({},e,{shouldLoad:r,resolve:o=>(d.add(e.route.id),r?async function(e,t,n,r,o,i,a){let s,l,u=r=>{let o,s=new Promise(((e,t)=>o=t));l=()=>o(),t.signal.addEventListener("abort",l);let c,u=o=>"function"!==typeof r?Promise.reject(new Error('You cannot call the handler for a route which defines a boolean "'+e+'" [routeId: '+n.route.id+"]")):r({request:t,params:n.params,context:a},...void 0!==o?[o]:[]);return c=i?i((e=>u(e))):(async()=>{try{return{type:"data",result:await u()}}catch(Bk){return{type:"error",result:Bk}}})(),Promise.race([c,s])};try{let i=n.route[e];if(n.route.lazy)if(i){let e,[t]=await Promise.all([u(i).catch((t=>{e=t})),he(n.route,o,r)]);if(void 0!==e)throw e;s=t}else{if(await he(n.route,o,r),i=n.route[e],!i){if("action"===e){let e=new URL(t.url),r=e.pathname+e.search;throw Me(405,{method:t.method,pathname:r,routeId:n.route.id})}return{type:m.data,result:void 0}}s=await u(i)}else{if(!i){let e=new URL(t.url);throw Me(404,{pathname:e.pathname+e.search})}s=await u(i)}c(void 0!==s.result,"You defined "+("action"===e?"an action":"a loader")+' for route "'+n.route.id+"\" but didn't return anything from your `"+e+"` function. Please return a value or `null`.")}catch(Bk){return{type:m.error,result:Bk}}finally{l&&t.signal.removeEventListener("abort",l)}return s}(t,n,e,i,s,o,l):Promise.resolve({type:m.data,result:void 0}))})})),request:n,params:o[0].params,context:l});return o.forEach((e=>c(d.has(e.route.id),'`match.resolve()` was not called for route id "'+e.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.'))),h.filter(((e,t)=>u.has(o[t].route.id)))}async function ge(e){let{result:t,type:n,status:r}=e;if(Re(t)){let e;try{let n=t.headers.get("Content-Type");e=n&&/\bapplication\/json\b/.test(n)?null==t.body?null:await t.json():await t.text()}catch(Bk){return{type:m.error,error:Bk}}return n===m.error?{type:m.error,error:new H(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:m.data,data:e,statusCode:t.status,headers:t.headers}}return n===m.error?{type:m.error,error:t,statusCode:G(t)?t.status:r}:function(e){let t=e;return t&&"object"===typeof t&&"object"===typeof t.data&&"function"===typeof t.subscribe&&"function"===typeof t.cancel&&"function"===typeof t.resolveData}(t)?{type:m.deferred,deferredData:t,statusCode:null==(o=t.init)?void 0:o.status,headers:(null==(i=t.init)?void 0:i.headers)&&new Headers(t.init.headers)}:{type:m.data,data:t,statusCode:r};var o,i}function me(e,t,n,r,o,i){let a=e.headers.get("Location");if(c(a,"Redirects returned/thrown from loaders/actions must have a Location header"),!ee.test(a)){let s=r.slice(0,r.findIndex((e=>e.route.id===n))+1);a=oe(new URL(t.url),s,o,!0,a,i),e.headers.set("Location",a)}return e}function ve(e,t,n){if(ee.test(e)){let r=e,o=r.startsWith("//")?new URL(t.protocol+r):new URL(r),i=null!=R(o.pathname,n);if(o.origin===t.origin&&i)return o.pathname+o.search+o.hash}return e}function ye(e,t,n,r){let o=e.createURL(Te(t)).toString(),i={signal:n};if(r&&Ne(r.formMethod)){let{formMethod:e,formEncType:t}=r;i.method=e.toUpperCase(),"application/json"===t?(i.headers=new Headers({"Content-Type":t}),i.body=JSON.stringify(r.json)):"text/plain"===t?i.body=r.text:"application/x-www-form-urlencoded"===t&&r.formData?i.body=xe(r.formData):i.body=r.formData}return new Request(o,i)}function xe(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,"string"===typeof r?r:r.name);return t}function be(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function we(e,t,n,r,o,i){let a,s={},l=null,u=!1,d={},h=r&&Pe(r[1])?r[1].error:void 0;return n.forEach(((n,r)=>{let p=t[r].route.id;if(c(!Le(n),"Cannot handle redirect results in processLoaderData"),Pe(n)){let t=n.error;if(void 0!==h&&(t=h,h=void 0),l=l||{},i)l[p]=t;else{let n=ke(e,p);null==l[n.route.id]&&(l[n.route.id]=t)}s[p]=void 0,u||(u=!0,a=G(n.error)?n.error.status:500),n.headers&&(d[p]=n.headers)}else je(n)?(o.set(p,n.deferredData),s[p]=n.deferredData.data,null==n.statusCode||200===n.statusCode||u||(a=n.statusCode),n.headers&&(d[p]=n.headers)):(s[p]=n.data,n.statusCode&&200!==n.statusCode&&!u&&(a=n.statusCode),n.headers&&(d[p]=n.headers))})),void 0!==h&&r&&(l={[r[0]]:h},s[r[0]]=void 0),{loaderData:s,errors:l,statusCode:a||200,loaderHeaders:d}}function Se(e,t,n,r,o,i,s,l){let{loaderData:u,errors:d}=we(t,n,r,o,l,!1);for(let h=0;h<i.length;h++){let{key:t,match:n,controller:r}=i[h];c(void 0!==s&&void 0!==s[h],"Did not find corresponding fetcher result");let o=s[h];if(!r||!r.signal.aborted)if(Pe(o)){let r=ke(e.matches,null==n?void 0:n.route.id);d&&d[r.route.id]||(d=a({},d,{[r.route.id]:o.error})),e.fetchers.delete(t)}else if(Le(o))c(!1,"Unhandled fetcher revalidation redirect");else if(je(o))c(!1,"Unhandled fetcher deferred data");else{let n=Ge(o.data);e.fetchers.set(t,n)}}return{loaderData:u,errors:d}}function _e(e,t,n,r){let o=a({},t);for(let i of n){let n=i.route.id;if(t.hasOwnProperty(n)?void 0!==t[n]&&(o[n]=t[n]):void 0!==e[n]&&i.route.loader&&(o[n]=e[n]),r&&r.hasOwnProperty(n))break}return o}function Ae(e){return e?Pe(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function ke(e,t){let n=t?e.slice(0,e.findIndex((e=>e.route.id===t))+1):[...e];return n.reverse().find((e=>!0===e.route.hasErrorBoundary))||e[0]}function Ce(e){let t=1===e.length?e[0]:e.find((e=>e.index||!e.path||"/"===e.path))||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Me(e,t){let{pathname:n,routeId:r,method:o,type:i,message:a}=void 0===t?{}:t,s="Unknown Server Error",l="Unknown @remix-run/router error";return 400===e?(s="Bad Request","route-discovery"===i?l='Unable to match URL "'+n+'" - the `children()` function for route `'+r+"` threw the following error:\n"+a:o&&n&&r?l="You made a "+o+' request to "'+n+'" but did not provide a `loader` for route "'+r+'", so there is no way to handle the request.':"defer-action"===i?l="defer() is not supported in actions":"invalid-body"===i&&(l="Unable to encode submission body")):403===e?(s="Forbidden",l='Route "'+r+'" does not match URL "'+n+'"'):404===e?(s="Not Found",l='No route matches URL "'+n+'"'):405===e&&(s="Method Not Allowed",o&&n&&r?l="You made a "+o.toUpperCase()+' request to "'+n+'" but did not provide an `action` for route "'+r+'", so there is no way to handle the request.':o&&(l='Invalid request method "'+o.toUpperCase()+'"')),new H(e||500,s,new Error(l),!0)}function Ie(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(Le(n))return{result:n,idx:t}}}function Te(e){return p(a({},"string"===typeof e?f(e):e,{hash:""}))}function De(e){return Re(e.result)&&Z.has(e.result.status)}function je(e){return e.type===m.deferred}function Pe(e){return e.type===m.error}function Le(e){return(e&&e.type)===m.redirect}function Re(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"object"===typeof e.headers&&"undefined"!==typeof e.body}function Ee(e){return q.has(e.toLowerCase())}function Ne(e){return X.has(e.toLowerCase())}async function Oe(e,t,n,r,o,i){for(let a=0;a<n.length;a++){let s=n[a],l=t[a];if(!l)continue;let u=e.find((e=>e.route.id===l.route.id)),d=null!=u&&!le(u,l)&&void 0!==(i&&i[l.route.id]);if(je(s)&&(o||d)){let e=r[a];c(e,"Expected an AbortSignal for revalidating fetcher deferred result"),await ze(s,e,o).then((e=>{e&&(n[a]=e||n[a])}))}}}async function ze(e,t,n){if(void 0===n&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:m.data,data:e.deferredData.unwrappedData}}catch(Bk){return{type:m.error,error:Bk}}return{type:m.data,data:e.deferredData.data}}}function Be(e){return new URLSearchParams(e).getAll("index").some((e=>""===e))}function Fe(e,t){let n="string"===typeof t?f(t).search:t.search;if(e[e.length-1].route.index&&Be(n||""))return e[e.length-1];let r=N(e);return r[r.length-1]}function Ve(e){let{formMethod:t,formAction:n,formEncType:r,text:o,formData:i,json:a}=e;if(t&&n&&r)return null!=o?{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:o}:null!=i?{formMethod:t,formAction:n,formEncType:r,formData:i,json:void 0,text:void 0}:void 0!==a?{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:a,text:void 0}:void 0}function We(e,t){if(t){return{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}return{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function He(e,t){if(e){return{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}}return{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Ge(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Ue(){return Ue=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ue.apply(this,arguments)}const Xe=r.createContext(null);const Ye=r.createContext(null);const qe=r.createContext(null);const Ze=r.createContext(null);const Ke=r.createContext({outlet:null,matches:[],isDataRoute:!1});const $e=r.createContext(null);function Qe(){return null!=r.useContext(Ze)}function Je(){return Qe()||c(!1),r.useContext(Ze).location}function et(e){r.useContext(qe).static||r.useLayoutEffect(e)}function tt(){let{isDataRoute:e}=r.useContext(Ke);return e?function(){let{router:e}=pt(dt.UseNavigateStable),t=gt(ht.UseNavigateStable),n=r.useRef(!1);et((()=>{n.current=!0}));let o=r.useCallback((function(r,o){void 0===o&&(o={}),n.current&&("number"===typeof r?e.navigate(r):e.navigate(r,Ue({fromRouteId:t},o)))}),[e,t]);return o}():function(){Qe()||c(!1);let e=r.useContext(Xe),{basename:t,future:n,navigator:o}=r.useContext(qe),{matches:i}=r.useContext(Ke),{pathname:a}=Je(),s=JSON.stringify(O(i,n.v7_relativeSplatPath)),l=r.useRef(!1);et((()=>{l.current=!0}));let u=r.useCallback((function(n,r){if(void 0===r&&(r={}),!l.current)return;if("number"===typeof n)return void o.go(n);let i=z(n,JSON.parse(s),a,"path"===r.relative);null==e&&"/"!==t&&(i.pathname="/"===i.pathname?t:B([t,i.pathname])),(r.replace?o.replace:o.push)(i,r.state,r)}),[t,o,s,a,e]);return u}()}const nt=r.createContext(null);function rt(){let{matches:e}=r.useContext(Ke),t=e[e.length-1];return t?t.params:{}}function ot(e,t){let{relative:n}=void 0===t?{}:t,{future:o}=r.useContext(qe),{matches:i}=r.useContext(Ke),{pathname:a}=Je(),s=JSON.stringify(O(i,o.v7_relativeSplatPath));return r.useMemo((()=>z(e,JSON.parse(s),a,"path"===n)),[e,s,a,n])}function it(e,n,o,i){Qe()||c(!1);let{navigator:a}=r.useContext(qe),{matches:s}=r.useContext(Ke),l=s[s.length-1],u=l?l.params:{},d=(l&&l.pathname,l?l.pathnameBase:"/");l&&l.route;let h,p=Je();if(n){var g;let e="string"===typeof n?f(n):n;"/"===d||(null==(g=e.pathname)?void 0:g.startsWith(d))||c(!1),h=e}else h=p;let m=h.pathname||"/",v=m;if("/"!==d){let e=d.replace(/^\//,"").split("/");v="/"+m.replace(/^\//,"").split("/").slice(e.length).join("/")}let y=x(e,{pathname:v});let b=ut(y&&y.map((e=>Object.assign({},e,{params:Object.assign({},u,e.params),pathname:B([d,a.encodeLocation?a.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?d:B([d,a.encodeLocation?a.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),s,o,i);return n&&b?r.createElement(Ze.Provider,{value:{location:Ue({pathname:"/",search:"",hash:"",state:null,key:"default"},h),navigationType:t.Pop}},b):b}function at(){let e=function(){var e;let t=r.useContext($e),n=ft(ht.UseRouteError),o=gt(ht.UseRouteError);if(void 0!==t)return t;return null==(e=n.errors)?void 0:e[o]}(),t=G(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:o};return r.createElement(r.Fragment,null,r.createElement("h2",null,"Unexpected Application Error!"),r.createElement("h3",{style:{fontStyle:"italic"}},t),n?r.createElement("pre",{style:i},n):null,null)}const st=r.createElement(at,null);class lt extends r.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?r.createElement(Ke.Provider,{value:this.props.routeContext},r.createElement($e.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ct(e){let{routeContext:t,match:n,children:o}=e,i=r.useContext(Xe);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),r.createElement(Ke.Provider,{value:t},o)}function ut(e,t,n,o){var i;if(void 0===t&&(t=[]),void 0===n&&(n=null),void 0===o&&(o=null),null==e){var a;if(null==(a=n)||!a.errors)return null;e=n.matches}let s=e,l=null==(i=n)?void 0:i.errors;if(null!=l){let e=s.findIndex((e=>e.route.id&&void 0!==(null==l?void 0:l[e.route.id])));e>=0||c(!1),s=s.slice(0,Math.min(s.length,e+1))}let u=!1,d=-1;if(n&&o&&o.v7_partialHydration)for(let r=0;r<s.length;r++){let e=s[r];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(d=r),e.route.id){let{loaderData:t,errors:r}=n,o=e.route.loader&&void 0===t[e.route.id]&&(!r||void 0===r[e.route.id]);if(e.route.lazy||o){u=!0,s=d>=0?s.slice(0,d+1):[s[0]];break}}}return s.reduceRight(((e,o,i)=>{let a,c=!1,h=null,p=null;var f;n&&(a=l&&o.route.id?l[o.route.id]:void 0,h=o.route.errorElement||st,u&&(d<0&&0===i?(f="route-fallback",!1||mt[f]||(mt[f]=!0),c=!0,p=null):d===i&&(c=!0,p=o.route.hydrateFallbackElement||null)));let g=t.concat(s.slice(0,i+1)),m=()=>{let t;return t=a?h:c?p:o.route.Component?r.createElement(o.route.Component,null):o.route.element?o.route.element:e,r.createElement(ct,{match:o,routeContext:{outlet:e,matches:g,isDataRoute:null!=n},children:t})};return n&&(o.route.ErrorBoundary||o.route.errorElement||0===i)?r.createElement(lt,{location:n.location,revalidation:n.revalidation,component:h,error:a,children:m(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):m()}),null)}var dt=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(dt||{}),ht=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(ht||{});function pt(e){let t=r.useContext(Xe);return t||c(!1),t}function ft(e){let t=r.useContext(Ye);return t||c(!1),t}function gt(e){let t=function(e){let t=r.useContext(Ke);return t||c(!1),t}(),n=t.matches[t.matches.length-1];return n.route.id||c(!1),n.route.id}const mt={};o.startTransition;function vt(e){return function(e){let t=r.useContext(Ke).outlet;return t?r.createElement(nt.Provider,{value:e},t):t}(e.context)}function yt(e){c(!1)}function xt(e){let{basename:n="/",children:o=null,location:i,navigationType:a=t.Pop,navigator:s,static:l=!1,future:u}=e;Qe()&&c(!1);let d=n.replace(/^\/*/,"/"),h=r.useMemo((()=>({basename:d,navigator:s,static:l,future:Ue({v7_relativeSplatPath:!1},u)})),[d,u,s,l]);"string"===typeof i&&(i=f(i));let{pathname:p="/",search:g="",hash:m="",state:v=null,key:y="default"}=i,x=r.useMemo((()=>{let e=R(p,d);return null==e?null:{location:{pathname:e,search:g,hash:m,state:v,key:y},navigationType:a}}),[d,p,g,m,v,y,a]);return null==x?null:r.createElement(qe.Provider,{value:h},r.createElement(Ze.Provider,{children:o,value:x}))}new Promise((()=>{}));r.Component;function bt(e,t){void 0===t&&(t=[]);let n=[];return r.Children.forEach(e,((e,o)=>{if(!r.isValidElement(e))return;let i=[...t,o];if(e.type===r.Fragment)return void n.push.apply(n,bt(e.props.children,i));e.type!==yt&&c(!1),e.props.index&&e.props.children&&c(!1);let a={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=bt(e.props.children,i)),n.push(a)})),n}function wt(e){let t={hasErrorBoundary:null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&Object.assign(t,{element:r.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:r.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:r.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}var St=n(7950),_t=n.t(St,2);function At(){return At=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},At.apply(this,arguments)}function kt(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function Ct(e){return void 0===e&&(e=""),new URLSearchParams("string"===typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map((e=>[n,e])):[[n,r]])}),[]))}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const Mt=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],It=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"];try{window.__reactRouterVersion="6"}catch(Bk){}function Tt(){var e;let t=null==(e=window)?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=At({},t,{errors:Dt(t.errors)})),t}function Dt(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,o]of t)if(o&&"RouteErrorResponse"===o.__type)n[r]=new H(o.status,o.statusText,o.data,!0===o.internal);else if(o&&"Error"===o.__type){if(o.__subType){let e=window[o.__subType];if("function"===typeof e)try{let t=new e(o.message);t.stack="",n[r]=t}catch(Bk){}}if(null==n[r]){let e=new Error(o.message);e.stack="",n[r]=e}}else n[r]=o;return n}const jt=r.createContext({isTransitioning:!1});const Pt=r.createContext(new Map);const Lt=o.startTransition,Rt=_t.flushSync;o.useId;function Et(e){Rt?Rt(e):e()}class Nt{constructor(){this.status="pending",this.promise=new Promise(((e,t)=>{this.resolve=t=>{"pending"===this.status&&(this.status="resolved",e(t))},this.reject=e=>{"pending"===this.status&&(this.status="rejected",t(e))}}))}}function Ot(e){let{fallbackElement:t,router:n,future:o}=e,[i,a]=r.useState(n.state),[s,l]=r.useState(),[c,u]=r.useState({isTransitioning:!1}),[d,h]=r.useState(),[p,f]=r.useState(),[g,m]=r.useState(),v=r.useRef(new Map),{v7_startTransition:y}=o||{},x=r.useCallback((e=>{y?function(e){Lt?Lt(e):e()}(e):e()}),[y]),b=r.useCallback(((e,t)=>{let{deletedFetchers:r,unstable_flushSync:o,unstable_viewTransitionOpts:i}=t;r.forEach((e=>v.current.delete(e))),e.fetchers.forEach(((e,t)=>{void 0!==e.data&&v.current.set(t,e.data)}));let s=null==n.window||null==n.window.document||"function"!==typeof n.window.document.startViewTransition;if(i&&!s){if(o){Et((()=>{p&&(d&&d.resolve(),p.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:i.currentLocation,nextLocation:i.nextLocation})}));let t=n.window.document.startViewTransition((()=>{Et((()=>a(e)))}));return t.finished.finally((()=>{Et((()=>{h(void 0),f(void 0),l(void 0),u({isTransitioning:!1})}))})),void Et((()=>f(t)))}p?(d&&d.resolve(),p.skipTransition(),m({state:e,currentLocation:i.currentLocation,nextLocation:i.nextLocation})):(l(e),u({isTransitioning:!0,flushSync:!1,currentLocation:i.currentLocation,nextLocation:i.nextLocation}))}else o?Et((()=>a(e))):x((()=>a(e)))}),[n.window,p,d,v,x]);r.useLayoutEffect((()=>n.subscribe(b)),[n,b]),r.useEffect((()=>{c.isTransitioning&&!c.flushSync&&h(new Nt)}),[c]),r.useEffect((()=>{if(d&&s&&n.window){let e=s,t=d.promise,r=n.window.document.startViewTransition((async()=>{x((()=>a(e))),await t}));r.finished.finally((()=>{h(void 0),f(void 0),l(void 0),u({isTransitioning:!1})})),f(r)}}),[x,s,d,n.window]),r.useEffect((()=>{d&&s&&i.location.key===s.location.key&&d.resolve()}),[d,p,i.location,s]),r.useEffect((()=>{!c.isTransitioning&&g&&(l(g.state),u({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}),m(void 0))}),[c.isTransitioning,g]),r.useEffect((()=>{}),[]);let w=r.useMemo((()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:e=>n.navigate(e),push:(e,t,r)=>n.navigate(e,{state:t,preventScrollReset:null==r?void 0:r.preventScrollReset}),replace:(e,t,r)=>n.navigate(e,{replace:!0,state:t,preventScrollReset:null==r?void 0:r.preventScrollReset})})),[n]),S=n.basename||"/",_=r.useMemo((()=>({router:n,navigator:w,static:!1,basename:S})),[n,w,S]);return r.createElement(r.Fragment,null,r.createElement(Xe.Provider,{value:_},r.createElement(Ye.Provider,{value:i},r.createElement(Pt.Provider,{value:v.current},r.createElement(jt.Provider,{value:c},r.createElement(xt,{basename:S,location:i.location,navigationType:i.historyAction,navigator:w,future:{v7_relativeSplatPath:n.future.v7_relativeSplatPath}},i.initialized||n.future.v7_partialHydration?r.createElement(zt,{routes:n.routes,future:n.future,state:i}):t))))),null)}function zt(e){let{routes:t,future:n,state:r}=e;return it(t,void 0,r,n)}const Bt="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement,Ft=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Vt=r.forwardRef((function(e,t){let n,{onClick:o,relative:i,reloadDocument:a,replace:s,state:l,target:u,to:d,preventScrollReset:h,unstable_viewTransition:f}=e,g=kt(e,Mt),{basename:m}=r.useContext(qe),v=!1;if("string"===typeof d&&Ft.test(d)&&(n=d,Bt))try{let e=new URL(window.location.href),t=d.startsWith("//")?new URL(e.protocol+d):new URL(d),n=R(t.pathname,m);t.origin===e.origin&&null!=n?d=n+t.search+t.hash:v=!0}catch(Bk){}let y=function(e,t){let{relative:n}=void 0===t?{}:t;Qe()||c(!1);let{basename:o,navigator:i}=r.useContext(qe),{hash:a,pathname:s,search:l}=ot(e,{relative:n}),u=s;return"/"!==o&&(u="/"===s?o:B([o,s])),i.createHref({pathname:u,search:l,hash:a})}(d,{relative:i}),x=function(e,t){let{target:n,replace:o,state:i,preventScrollReset:a,relative:s,unstable_viewTransition:l}=void 0===t?{}:t,c=tt(),u=Je(),d=ot(e,{relative:s});return r.useCallback((t=>{if(function(e,t){return 0===e.button&&(!t||"_self"===t)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)}(t,n)){t.preventDefault();let n=void 0!==o?o:p(u)===p(d);c(e,{replace:n,state:i,preventScrollReset:a,relative:s,unstable_viewTransition:l})}}),[u,c,d,o,i,n,e,a,s,l])}(d,{replace:s,state:l,target:u,preventScrollReset:h,relative:i,unstable_viewTransition:f});return r.createElement("a",At({},g,{href:n||y,onClick:v||a?o:function(e){o&&o(e),e.defaultPrevented||x(e)},ref:t,target:u}))}));const Wt=r.forwardRef((function(e,t){let{"aria-current":n="page",caseSensitive:o=!1,className:i="",end:a=!1,style:s,to:l,unstable_viewTransition:u,children:d}=e,h=kt(e,It),p=ot(l,{relative:h.relative}),f=Je(),g=r.useContext(Ye),{navigator:m,basename:v}=r.useContext(qe),y=null!=g&&function(e,t){void 0===t&&(t={});let n=r.useContext(jt);null==n&&c(!1);let{basename:o}=Ut(Ht.useViewTransitionState),i=ot(e,{relative:t.relative});if(!n.isTransitioning)return!1;let a=R(n.currentLocation.pathname,o)||n.currentLocation.pathname,s=R(n.nextLocation.pathname,o)||n.nextLocation.pathname;return null!=P(i.pathname,s)||null!=P(i.pathname,a)}(p)&&!0===u,x=m.encodeLocation?m.encodeLocation(p).pathname:p.pathname,b=f.pathname,w=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;o||(b=b.toLowerCase(),w=w?w.toLowerCase():null,x=x.toLowerCase()),w&&v&&(w=R(w,v)||w);const S="/"!==x&&x.endsWith("/")?x.length-1:x.length;let _,A=b===x||!a&&b.startsWith(x)&&"/"===b.charAt(S),k=null!=w&&(w===x||!a&&w.startsWith(x)&&"/"===w.charAt(x.length)),C={isActive:A,isPending:k,isTransitioning:y},M=A?n:void 0;_="function"===typeof i?i(C):[i,A?"active":null,k?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let I="function"===typeof s?s(C):s;return r.createElement(Vt,At({},h,{"aria-current":M,className:_,ref:t,style:I,to:l,unstable_viewTransition:u}),"function"===typeof d?d(C):d)}));var Ht,Gt;function Ut(e){let t=r.useContext(Xe);return t||c(!1),t}function Xt(e){let t=r.useRef(Ct(e)),n=r.useRef(!1),o=Je(),i=r.useMemo((()=>function(e,t){let n=Ct(e);return t&&t.forEach(((e,r)=>{n.has(r)||t.getAll(r).forEach((e=>{n.append(r,e)}))})),n}(o.search,n.current?null:t.current)),[o.search]),a=tt(),s=r.useCallback(((e,t)=>{const r=Ct("function"===typeof e?e(i):e);n.current=!0,a("?"+r,t)}),[a,i]);return[i,s]}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ht||(Ht={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Gt||(Gt={}));var Yt=n(8587),qt=n(8168),Zt=n(8387),Kt=n(2372),$t=n(8610),Qt=n(7598),Jt=n(3030);function en(e){const{theme:t,name:n,props:r}=e;return t&&t.components&&t.components[n]&&t.components[n].defaultProps?(0,Jt.A)(t.components[n].defaultProps,r):r}var tn=n(8280),nn=n(4575);const rn=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=r.useContext(nn.T);return t&&(n=t,0!==Object.keys(n).length)?t:e;var n},on=(0,tn.A)();const an=function(){return rn(arguments.length>0&&void 0!==arguments[0]?arguments[0]:on)};function sn(e){let{props:t,name:n,defaultTheme:r,themeId:o}=e,i=an(r);o&&(i=i[o]||i);return en({theme:i,name:n,props:t})}var ln=n(3174),cn=n(9172),un=n(8812);const dn=["ownerState"],hn=["variants"],pn=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function fn(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}const gn=(0,tn.A)(),mn=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function vn(e){let{defaultTheme:t,theme:n,themeId:r}=e;return o=n,0===Object.keys(o).length?t:n[r]||n;var o}function yn(e){return e?(t,n)=>n[e]:null}function xn(e,t){let{ownerState:n}=t,r=(0,Yt.A)(t,dn);const o="function"===typeof e?e((0,qt.A)({ownerState:n},r)):e;if(Array.isArray(o))return o.flatMap((e=>xn(e,(0,qt.A)({ownerState:n},r))));if(o&&"object"===typeof o&&Array.isArray(o.variants)){const{variants:e=[]}=o;let t=(0,Yt.A)(o,hn);return e.forEach((e=>{let o=!0;"function"===typeof e.props?o=e.props((0,qt.A)({ownerState:n},r,n)):Object.keys(e.props).forEach((t=>{(null==n?void 0:n[t])!==e.props[t]&&r[t]!==e.props[t]&&(o=!1)})),o&&(Array.isArray(t)||(t=[t]),t.push("function"===typeof e.style?e.style((0,qt.A)({ownerState:n},r,n)):e.style))})),t}return o}const bn=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n=gn,rootShouldForwardProp:r=fn,slotShouldForwardProp:o=fn}=e,i=e=>(0,un.A)((0,qt.A)({},e,{theme:vn((0,qt.A)({},e,{defaultTheme:n,themeId:t}))}));return i.__mui_systemSx=!0,function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,ln.internal_processStyles)(e,(e=>e.filter((e=>!(null!=e&&e.__mui_systemSx)))));const{name:s,slot:l,skipVariantsResolver:c,skipSx:u,overridesResolver:d=yn(mn(l))}=a,h=(0,Yt.A)(a,pn),p=void 0!==c?c:l&&"Root"!==l&&"root"!==l||!1,f=u||!1;let g=fn;"Root"===l||"root"===l?g=r:l?g=o:function(e){return"string"===typeof e&&e.charCodeAt(0)>96}(e)&&(g=void 0);const m=(0,ln.default)(e,(0,qt.A)({shouldForwardProp:g,label:undefined},h)),v=e=>"function"===typeof e&&e.__emotion_real!==e||(0,cn.Q)(e)?r=>xn(e,(0,qt.A)({},r,{theme:vn({theme:r.theme,defaultTheme:n,themeId:t})})):e,y=function(r){let o=v(r);for(var a=arguments.length,l=new Array(a>1?a-1:0),c=1;c<a;c++)l[c-1]=arguments[c];const u=l?l.map(v):[];s&&d&&u.push((e=>{const r=vn((0,qt.A)({},e,{defaultTheme:n,themeId:t}));if(!r.components||!r.components[s]||!r.components[s].styleOverrides)return null;const o=r.components[s].styleOverrides,i={};return Object.entries(o).forEach((t=>{let[n,o]=t;i[n]=xn(o,(0,qt.A)({},e,{theme:r}))})),d(e,i)})),s&&!p&&u.push((e=>{var r;const o=vn((0,qt.A)({},e,{defaultTheme:n,themeId:t}));return xn({variants:null==o||null==(r=o.components)||null==(r=r[s])?void 0:r.variants},(0,qt.A)({},e,{theme:o}))})),f||u.push(i);const h=u.length-l.length;if(Array.isArray(r)&&h>0){const e=new Array(h).fill("");o=[...r,...e],o.raw=[...r.raw,...e]}const g=m(o,...u);return e.muiName&&(g.muiName=e.muiName),g};return m.withConfig&&(y.withConfig=m.withConfig),y}}(),wn=bn;var Sn=n(579);const _n=["className","component","disableGutters","fixed","maxWidth","classes"],An=(0,tn.A)(),kn=wn("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["maxWidth".concat((0,Qt.A)(String(n.maxWidth)))],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),Cn=e=>sn({props:e,name:"MuiContainer",defaultTheme:An});var Mn=n(6803),In=n(4535),Tn=n(6431);const Dn=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createStyledComponent:t=kn,useThemeProps:n=Cn,componentName:o="MuiContainer"}=e,i=t((e=>{let{theme:t,ownerState:n}=e;return(0,qt.A)({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!n.disableGutters&&{paddingLeft:t.spacing(2),paddingRight:t.spacing(2),[t.breakpoints.up("sm")]:{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}})}),(e=>{let{theme:t,ownerState:n}=e;return n.fixed&&Object.keys(t.breakpoints.values).reduce(((e,n)=>{const r=n,o=t.breakpoints.values[r];return 0!==o&&(e[t.breakpoints.up(r)]={maxWidth:"".concat(o).concat(t.breakpoints.unit)}),e}),{})}),(e=>{let{theme:t,ownerState:n}=e;return(0,qt.A)({},"xs"===n.maxWidth&&{[t.breakpoints.up("xs")]:{maxWidth:Math.max(t.breakpoints.values.xs,444)}},n.maxWidth&&"xs"!==n.maxWidth&&{[t.breakpoints.up(n.maxWidth)]:{maxWidth:"".concat(t.breakpoints.values[n.maxWidth]).concat(t.breakpoints.unit)}})})),a=r.forwardRef((function(e,t){const r=n(e),{className:a,component:s="div",disableGutters:l=!1,fixed:c=!1,maxWidth:u="lg"}=r,d=(0,Yt.A)(r,_n),h=(0,qt.A)({},r,{component:s,disableGutters:l,fixed:c,maxWidth:u}),p=((e,t)=>{const{classes:n,fixed:r,disableGutters:o,maxWidth:i}=e,a={root:["root",i&&"maxWidth".concat((0,Qt.A)(String(i))),r&&"fixed",o&&"disableGutters"]};return(0,$t.A)(a,(e=>(0,Kt.Ay)(t,e)),n)})(h,o);return(0,Sn.jsx)(i,(0,qt.A)({as:s,ownerState:h,className:(0,Zt.A)(p.root,a),ref:t},d))}));return a}({createStyledComponent:(0,In.Ay)("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["maxWidth".concat((0,Mn.A)(String(n.maxWidth)))],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),useThemeProps:e=>(0,Tn.b)({props:e,name:"MuiContainer"})}),jn=Dn;var Pn=n(5844),Ln=n(7868);const Rn=function(e){return"string"===typeof e};var En=n(3462),Nn=n(3940),On=n(4440),zn=n(3468);const Bn=["onChange","maxRows","minRows","style","value"];function Fn(e){return parseInt(e,10)||0}const Vn={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};const Wn=r.forwardRef((function(e,t){const{onChange:n,maxRows:o,minRows:i=1,style:a,value:s}=e,l=(0,Yt.A)(e,Bn),{current:c}=r.useRef(null!=s),u=r.useRef(null),d=(0,En.A)(t,u),h=r.useRef(null),p=r.useRef(null),f=r.useCallback((()=>{const t=u.current,n=(0,Nn.A)(t).getComputedStyle(t);if("0px"===n.width)return{outerHeightStyle:0,overflowing:!1};const r=p.current;r.style.width=n.width,r.value=t.value||e.placeholder||"x","\n"===r.value.slice(-1)&&(r.value+=" ");const a=n.boxSizing,s=Fn(n.paddingBottom)+Fn(n.paddingTop),l=Fn(n.borderBottomWidth)+Fn(n.borderTopWidth),c=r.scrollHeight;r.value="x";const d=r.scrollHeight;let h=c;i&&(h=Math.max(Number(i)*d,h)),o&&(h=Math.min(Number(o)*d,h)),h=Math.max(h,d);return{outerHeightStyle:h+("border-box"===a?s+l:0),overflowing:Math.abs(h-c)<=1}}),[o,i,e.placeholder]),g=r.useCallback((()=>{const e=f();if(void 0===(t=e)||null===t||0===Object.keys(t).length||0===t.outerHeightStyle&&!t.overflowing)return;var t;const n=e.outerHeightStyle,r=u.current;h.current!==n&&(h.current=n,r.style.height="".concat(n,"px")),r.style.overflow=e.overflowing?"hidden":""}),[f]);(0,On.A)((()=>{const e=()=>{g()};let t;const n=(0,zn.A)(e),r=u.current,o=(0,Nn.A)(r);let i;return o.addEventListener("resize",n),"undefined"!==typeof ResizeObserver&&(i=new ResizeObserver(e),i.observe(r)),()=>{n.clear(),cancelAnimationFrame(t),o.removeEventListener("resize",n),i&&i.disconnect()}}),[f,g]),(0,On.A)((()=>{g()}));return(0,Sn.jsxs)(r.Fragment,{children:[(0,Sn.jsx)("textarea",(0,qt.A)({value:s,onChange:e=>{c||g(),n&&n(e)},ref:d,rows:i,style:a},l)),(0,Sn.jsx)("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:p,tabIndex:-1,style:(0,qt.A)({},Vn,a,{paddingTop:0,paddingBottom:0})})]})})),Hn=Wn;function Gn(e){let{props:t,states:n,muiFormControl:r}=e;return n.reduce(((e,n)=>(e[n]=t[n],r&&"undefined"===typeof t[n]&&(e[n]=r[n]),e)),{})}const Un=r.createContext(void 0);function Xn(){return r.useContext(Un)}var Yn=n(5849),qn=n(5013),Zn=n(869);const Kn=function(e){let{styles:t,themeId:n,defaultTheme:r={}}=e;const o=an(r),i="function"===typeof t?t(n&&o[n]||o):t;return(0,Sn.jsx)(Zn.A,{styles:i})};var $n=n(5170),Qn=n(3375);const Jn=function(e){return(0,Sn.jsx)(Kn,(0,qt.A)({},e,{defaultTheme:$n.A,themeId:Qn.A}))};function er(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function tr(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(er(e.value)&&""!==e.value||t&&er(e.defaultValue)&&""!==e.defaultValue)}var nr=n(2532);function rr(e){return(0,Kt.Ay)("MuiInputBase",e)}const or=(0,nr.A)("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),ir=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],ar=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,"small"===n.size&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t["color".concat((0,Mn.A)(n.color))],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},sr=(e,t)=>{const{ownerState:n}=e;return[t.input,"small"===n.size&&t.inputSizeSmall,n.multiline&&t.inputMultiline,"search"===n.type&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},lr=(0,In.Ay)("div",{name:"MuiInputBase",slot:"Root",overridesResolver:ar})((e=>{let{theme:t,ownerState:n}=e;return(0,qt.A)({},t.typography.body1,{color:(t.vars||t).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",["&.".concat(or.disabled)]:{color:(t.vars||t).palette.text.disabled,cursor:"default"}},n.multiline&&(0,qt.A)({padding:"4px 0 5px"},"small"===n.size&&{paddingTop:1}),n.fullWidth&&{width:"100%"})})),cr=(0,In.Ay)("input",{name:"MuiInputBase",slot:"Input",overridesResolver:sr})((e=>{let{theme:t,ownerState:n}=e;const r="light"===t.palette.mode,o=(0,qt.A)({color:"currentColor"},t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5},{transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})}),i={opacity:"0 !important"},a=t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5};return(0,qt.A)({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&:-ms-input-placeholder":o,"&::-ms-input-placeholder":o,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},["label[data-shrink=false] + .".concat(or.formControl," &")]:{"&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus::-webkit-input-placeholder":a,"&:focus::-moz-placeholder":a,"&:focus:-ms-input-placeholder":a,"&:focus::-ms-input-placeholder":a},["&.".concat(or.disabled)]:{opacity:1,WebkitTextFillColor:(t.vars||t).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},"small"===n.size&&{paddingTop:1},n.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},"search"===n.type&&{MozAppearance:"textfield"})})),ur=(0,Sn.jsx)(Jn,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),dr=r.forwardRef((function(e,t){var n;const o=(0,Tn.b)({props:e,name:"MuiInputBase"}),{"aria-describedby":i,autoComplete:a,autoFocus:s,className:l,components:c={},componentsProps:u={},defaultValue:d,disabled:h,disableInjectingGlobalStyles:p,endAdornment:f,fullWidth:g=!1,id:m,inputComponent:v="input",inputProps:y={},inputRef:x,maxRows:b,minRows:w,multiline:S=!1,name:_,onBlur:A,onChange:k,onClick:C,onFocus:M,onKeyDown:I,onKeyUp:T,placeholder:D,readOnly:j,renderSuffix:P,rows:L,slotProps:R={},slots:E={},startAdornment:N,type:O="text",value:z}=o,B=(0,Yt.A)(o,ir),F=null!=y.value?y.value:z,{current:V}=r.useRef(null!=F),W=r.useRef(),H=r.useCallback((e=>{0}),[]),G=(0,Yn.A)(W,x,y.ref,H),[U,X]=r.useState(!1),Y=Xn();const q=Gn({props:o,muiFormControl:Y,states:["color","disabled","error","hiddenLabel","size","required","filled"]});q.focused=Y?Y.focused:U,r.useEffect((()=>{!Y&&h&&U&&(X(!1),A&&A())}),[Y,h,U,A]);const Z=Y&&Y.onFilled,K=Y&&Y.onEmpty,$=r.useCallback((e=>{tr(e)?Z&&Z():K&&K()}),[Z,K]);(0,qn.A)((()=>{V&&$({value:F})}),[F,$,V]);r.useEffect((()=>{$(W.current)}),[]);let Q=v,J=y;S&&"input"===Q&&(J=L?(0,qt.A)({type:void 0,minRows:L,maxRows:L},J):(0,qt.A)({type:void 0,maxRows:b,minRows:w},J),Q=Hn);r.useEffect((()=>{Y&&Y.setAdornedStart(Boolean(N))}),[Y,N]);const ee=(0,qt.A)({},o,{color:q.color||"primary",disabled:q.disabled,endAdornment:f,error:q.error,focused:q.focused,formControl:Y,fullWidth:g,hiddenLabel:q.hiddenLabel,multiline:S,size:q.size,startAdornment:N,type:O}),te=(e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:a,formControl:s,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:d,size:h,startAdornment:p,type:f}=e,g={root:["root","color".concat((0,Mn.A)(n)),r&&"disabled",o&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",h&&"medium"!==h&&"size".concat((0,Mn.A)(h)),u&&"multiline",p&&"adornedStart",i&&"adornedEnd",c&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled","search"===f&&"inputTypeSearch",u&&"inputMultiline","small"===h&&"inputSizeSmall",c&&"inputHiddenLabel",p&&"inputAdornedStart",i&&"inputAdornedEnd",d&&"readOnly"]};return(0,$t.A)(g,rr,t)})(ee),ne=E.root||c.Root||lr,re=R.root||u.root||{},oe=E.input||c.Input||cr;return J=(0,qt.A)({},J,null!=(n=R.input)?n:u.input),(0,Sn.jsxs)(r.Fragment,{children:[!p&&ur,(0,Sn.jsxs)(ne,(0,qt.A)({},re,!Rn(ne)&&{ownerState:(0,qt.A)({},ee,re.ownerState)},{ref:t,onClick:e=>{W.current&&e.currentTarget===e.target&&W.current.focus(),C&&C(e)}},B,{className:(0,Zt.A)(te.root,re.className,l,j&&"MuiInputBase-readOnly"),children:[N,(0,Sn.jsx)(Un.Provider,{value:null,children:(0,Sn.jsx)(oe,(0,qt.A)({ownerState:ee,"aria-invalid":q.error,"aria-describedby":i,autoComplete:a,autoFocus:s,defaultValue:d,disabled:q.disabled,id:m,onAnimationStart:e=>{$("mui-auto-fill-cancel"===e.animationName?W.current:{value:"x"})},name:_,placeholder:D,readOnly:j,required:q.required,rows:L,value:F,onKeyDown:I,onKeyUp:T,type:O},J,!Rn(oe)&&{as:Q,ownerState:(0,qt.A)({},ee,J.ownerState)},{ref:G,className:(0,Zt.A)(te.input,J.className,j&&"MuiInputBase-readOnly"),onBlur:e=>{A&&A(e),y.onBlur&&y.onBlur(e),Y&&Y.onBlur?Y.onBlur(e):X(!1)},onChange:function(e){if(!V){const t=e.target||W.current;if(null==t)throw new Error((0,Ln.A)(1));$({value:t.value})}for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];y.onChange&&y.onChange(e,...n),k&&k(e,...n)},onFocus:e=>{q.disabled?e.stopPropagation():(M&&M(e),y.onFocus&&y.onFocus(e),Y&&Y.onFocus?Y.onFocus(e):X(!0))}}))}),f,P?P((0,qt.A)({},q,{startAdornment:N})):null]}))]})})),hr=dr;var pr=n(1475);function fr(e){return(0,Kt.Ay)("MuiInput",e)}const gr=(0,qt.A)({},or,(0,nr.A)("MuiInput",["root","underline","input"])),mr=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],vr=(0,In.Ay)(lr,{shouldForwardProp:e=>(0,pr.A)(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...ar(e,t),!n.disableUnderline&&t.underline]}})((e=>{let{theme:t,ownerState:n}=e;let r="light"===t.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(r="rgba(".concat(t.vars.palette.common.onBackgroundChannel," / ").concat(t.vars.opacity.inputUnderline,")")),(0,qt.A)({position:"relative"},n.formControl&&{"label + &":{marginTop:16}},!n.disableUnderline&&{"&::after":{borderBottom:"2px solid ".concat((t.vars||t).palette[n.color].main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},["&.".concat(gr.focused,":after")]:{transform:"scaleX(1) translateX(0)"},["&.".concat(gr.error)]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:"1px solid ".concat(r),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},["&:hover:not(.".concat(gr.disabled,", .").concat(gr.error,"):before")]:{borderBottom:"2px solid ".concat((t.vars||t).palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(r)}},["&.".concat(gr.disabled,":before")]:{borderBottomStyle:"dotted"}})})),yr=(0,In.Ay)(cr,{name:"MuiInput",slot:"Input",overridesResolver:sr})({}),xr=r.forwardRef((function(e,t){var n,r,o,i;const a=(0,Tn.b)({props:e,name:"MuiInput"}),{disableUnderline:s,components:l={},componentsProps:c,fullWidth:u=!1,inputComponent:d="input",multiline:h=!1,slotProps:p,slots:f={},type:g="text"}=a,m=(0,Yt.A)(a,mr),v=(e=>{const{classes:t,disableUnderline:n}=e,r={root:["root",!n&&"underline"],input:["input"]},o=(0,$t.A)(r,fr,t);return(0,qt.A)({},t,o)})(a),y={root:{ownerState:{disableUnderline:s}}},x=(null!=p?p:c)?(0,cn.A)(null!=p?p:c,y):y,b=null!=(n=null!=(r=f.root)?r:l.Root)?n:vr,w=null!=(o=null!=(i=f.input)?i:l.Input)?o:yr;return(0,Sn.jsx)(hr,(0,qt.A)({slots:{root:b,input:w},slotProps:x,fullWidth:u,inputComponent:d,multiline:h,ref:t,type:g},m,{classes:v}))}));xr.muiName="Input";const br=xr;function wr(e){return(0,Kt.Ay)("MuiFilledInput",e)}const Sr=(0,qt.A)({},or,(0,nr.A)("MuiFilledInput",["root","underline","input"])),_r=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],Ar=(0,In.Ay)(lr,{shouldForwardProp:e=>(0,pr.A)(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...ar(e,t),!n.disableUnderline&&t.underline]}})((e=>{let{theme:t,ownerState:n}=e;var r;const o="light"===t.palette.mode,i=o?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",a=o?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",s=o?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",l=o?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return(0,qt.A)({position:"relative",backgroundColor:t.vars?t.vars.palette.FilledInput.bg:a,borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:t.vars?t.vars.palette.FilledInput.hoverBg:s,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:a}},["&.".concat(Sr.focused)]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:a},["&.".concat(Sr.disabled)]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:l}},!n.disableUnderline&&{"&::after":{borderBottom:"2px solid ".concat(null==(r=(t.vars||t).palette[n.color||"primary"])?void 0:r.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},["&.".concat(Sr.focused,":after")]:{transform:"scaleX(1) translateX(0)"},["&.".concat(Sr.error)]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:"1px solid ".concat(t.vars?"rgba(".concat(t.vars.palette.common.onBackgroundChannel," / ").concat(t.vars.opacity.inputUnderline,")"):i),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},["&:hover:not(.".concat(Sr.disabled,", .").concat(Sr.error,"):before")]:{borderBottom:"1px solid ".concat((t.vars||t).palette.text.primary)},["&.".concat(Sr.disabled,":before")]:{borderBottomStyle:"dotted"}},n.startAdornment&&{paddingLeft:12},n.endAdornment&&{paddingRight:12},n.multiline&&(0,qt.A)({padding:"25px 12px 8px"},"small"===n.size&&{paddingTop:21,paddingBottom:4},n.hiddenLabel&&{paddingTop:16,paddingBottom:17},n.hiddenLabel&&"small"===n.size&&{paddingTop:8,paddingBottom:9}))})),kr=(0,In.Ay)(cr,{name:"MuiFilledInput",slot:"Input",overridesResolver:sr})((e=>{let{theme:t,ownerState:n}=e;return(0,qt.A)({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===t.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===t.palette.mode?null:"#fff",caretColor:"light"===t.palette.mode?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===n.size&&{paddingTop:21,paddingBottom:4},n.hiddenLabel&&{paddingTop:16,paddingBottom:17},n.startAdornment&&{paddingLeft:0},n.endAdornment&&{paddingRight:0},n.hiddenLabel&&"small"===n.size&&{paddingTop:8,paddingBottom:9},n.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})})),Cr=r.forwardRef((function(e,t){var n,r,o,i;const a=(0,Tn.b)({props:e,name:"MuiFilledInput"}),{components:s={},componentsProps:l,fullWidth:c=!1,inputComponent:u="input",multiline:d=!1,slotProps:h,slots:p={},type:f="text"}=a,g=(0,Yt.A)(a,_r),m=(0,qt.A)({},a,{fullWidth:c,inputComponent:u,multiline:d,type:f}),v=(e=>{const{classes:t,disableUnderline:n}=e,r={root:["root",!n&&"underline"],input:["input"]},o=(0,$t.A)(r,wr,t);return(0,qt.A)({},t,o)})(a),y={root:{ownerState:m},input:{ownerState:m}},x=(null!=h?h:l)?(0,cn.A)(y,null!=h?h:l):y,b=null!=(n=null!=(r=p.root)?r:s.Root)?n:Ar,w=null!=(o=null!=(i=p.input)?i:s.Input)?o:kr;return(0,Sn.jsx)(hr,(0,qt.A)({slots:{root:b,input:w},componentsProps:x,fullWidth:c,inputComponent:u,multiline:d,ref:t,type:f},g,{classes:v}))}));Cr.muiName="Input";const Mr=Cr;var Ir;const Tr=["children","classes","className","label","notched"],Dr=(0,In.Ay)("fieldset",{shouldForwardProp:pr.A})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),jr=(0,In.Ay)("legend",{shouldForwardProp:pr.A})((e=>{let{ownerState:t,theme:n}=e;return(0,qt.A)({float:"unset",width:"auto",overflow:"hidden"},!t.withLabel&&{padding:0,lineHeight:"11px",transition:n.transitions.create("width",{duration:150,easing:n.transitions.easing.easeOut})},t.withLabel&&(0,qt.A)({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:n.transitions.create("max-width",{duration:50,easing:n.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},t.notched&&{maxWidth:"100%",transition:n.transitions.create("max-width",{duration:100,easing:n.transitions.easing.easeOut,delay:50})}))}));function Pr(e){return(0,Kt.Ay)("MuiOutlinedInput",e)}const Lr=(0,qt.A)({},or,(0,nr.A)("MuiOutlinedInput",["root","notchedOutline","input"])),Rr=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],Er=(0,In.Ay)(lr,{shouldForwardProp:e=>(0,pr.A)(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:ar})((e=>{let{theme:t,ownerState:n}=e;const r="light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return(0,qt.A)({position:"relative",borderRadius:(t.vars||t).shape.borderRadius,["&:hover .".concat(Lr.notchedOutline)]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{["&:hover .".concat(Lr.notchedOutline)]:{borderColor:t.vars?"rgba(".concat(t.vars.palette.common.onBackgroundChannel," / 0.23)"):r}},["&.".concat(Lr.focused," .").concat(Lr.notchedOutline)]:{borderColor:(t.vars||t).palette[n.color].main,borderWidth:2},["&.".concat(Lr.error," .").concat(Lr.notchedOutline)]:{borderColor:(t.vars||t).palette.error.main},["&.".concat(Lr.disabled," .").concat(Lr.notchedOutline)]:{borderColor:(t.vars||t).palette.action.disabled}},n.startAdornment&&{paddingLeft:14},n.endAdornment&&{paddingRight:14},n.multiline&&(0,qt.A)({padding:"16.5px 14px"},"small"===n.size&&{padding:"8.5px 14px"}))})),Nr=(0,In.Ay)((function(e){const{className:t,label:n,notched:r}=e,o=(0,Yt.A)(e,Tr),i=null!=n&&""!==n,a=(0,qt.A)({},e,{notched:r,withLabel:i});return(0,Sn.jsx)(Dr,(0,qt.A)({"aria-hidden":!0,className:t,ownerState:a},o,{children:(0,Sn.jsx)(jr,{ownerState:a,children:i?(0,Sn.jsx)("span",{children:n}):Ir||(Ir=(0,Sn.jsx)("span",{className:"notranslate",children:"\u200b"}))})}))}),{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})((e=>{let{theme:t}=e;const n="light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:t.vars?"rgba(".concat(t.vars.palette.common.onBackgroundChannel," / 0.23)"):n}})),Or=(0,In.Ay)(cr,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:sr})((e=>{let{theme:t,ownerState:n}=e;return(0,qt.A)({padding:"16.5px 14px"},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===t.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===t.palette.mode?null:"#fff",caretColor:"light"===t.palette.mode?null:"#fff",borderRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===n.size&&{padding:"8.5px 14px"},n.multiline&&{padding:0},n.startAdornment&&{paddingLeft:0},n.endAdornment&&{paddingRight:0})})),zr=r.forwardRef((function(e,t){var n,o,i,a,s;const l=(0,Tn.b)({props:e,name:"MuiOutlinedInput"}),{components:c={},fullWidth:u=!1,inputComponent:d="input",label:h,multiline:p=!1,notched:f,slots:g={},type:m="text"}=l,v=(0,Yt.A)(l,Rr),y=(e=>{const{classes:t}=e,n=(0,$t.A)({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Pr,t);return(0,qt.A)({},t,n)})(l),x=Xn(),b=Gn({props:l,muiFormControl:x,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),w=(0,qt.A)({},l,{color:b.color||"primary",disabled:b.disabled,error:b.error,focused:b.focused,formControl:x,fullWidth:u,hiddenLabel:b.hiddenLabel,multiline:p,size:b.size,type:m}),S=null!=(n=null!=(o=g.root)?o:c.Root)?n:Er,_=null!=(i=null!=(a=g.input)?a:c.Input)?i:Or;return(0,Sn.jsx)(hr,(0,qt.A)({slots:{root:S,input:_},renderSuffix:e=>(0,Sn.jsx)(Nr,{ownerState:w,className:y.notchedOutline,label:null!=h&&""!==h&&b.required?s||(s=(0,Sn.jsxs)(r.Fragment,{children:[h,"\u2009","*"]})):h,notched:"undefined"!==typeof f?f:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:u,inputComponent:d,multiline:p,ref:t,type:m},v,{classes:(0,qt.A)({},y,{notchedOutline:null})}))}));zr.muiName="Input";const Br=zr;function Fr(e){return(0,Kt.Ay)("MuiFormLabel",e)}const Vr=(0,nr.A)("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),Wr=["children","className","color","component","disabled","error","filled","focused","required"],Hr=(0,In.Ay)("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return(0,qt.A)({},t.root,"secondary"===n.color&&t.colorSecondary,n.filled&&t.filled)}})((e=>{let{theme:t,ownerState:n}=e;return(0,qt.A)({color:(t.vars||t).palette.text.secondary},t.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",["&.".concat(Vr.focused)]:{color:(t.vars||t).palette[n.color].main},["&.".concat(Vr.disabled)]:{color:(t.vars||t).palette.text.disabled},["&.".concat(Vr.error)]:{color:(t.vars||t).palette.error.main}})})),Gr=(0,In.Ay)("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})((e=>{let{theme:t}=e;return{["&.".concat(Vr.error)]:{color:(t.vars||t).palette.error.main}}})),Ur=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiFormLabel"}),{children:r,className:o,component:i="label"}=n,a=(0,Yt.A)(n,Wr),s=Gn({props:n,muiFormControl:Xn(),states:["color","required","focused","disabled","error","filled"]}),l=(0,qt.A)({},n,{color:s.color||"primary",component:i,disabled:s.disabled,error:s.error,filled:s.filled,focused:s.focused,required:s.required}),c=(e=>{const{classes:t,color:n,focused:r,disabled:o,error:i,filled:a,required:s}=e,l={root:["root","color".concat((0,Mn.A)(n)),o&&"disabled",i&&"error",a&&"filled",r&&"focused",s&&"required"],asterisk:["asterisk",i&&"error"]};return(0,$t.A)(l,Fr,t)})(l);return(0,Sn.jsxs)(Hr,(0,qt.A)({as:i,ownerState:l,className:(0,Zt.A)(c.root,o),ref:t},a,{children:[r,s.required&&(0,Sn.jsxs)(Gr,{ownerState:l,"aria-hidden":!0,className:c.asterisk,children:["\u2009","*"]})]}))})),Xr=Ur;function Yr(e){return(0,Kt.Ay)("MuiInputLabel",e)}(0,nr.A)("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const qr=["disableAnimation","margin","shrink","variant","className"],Zr=(0,In.Ay)(Xr,{shouldForwardProp:e=>(0,pr.A)(e)||"classes"===e,name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(Vr.asterisk)]:t.asterisk},t.root,n.formControl&&t.formControl,"small"===n.size&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,qt.A)({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},n.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},"small"===n.size&&{transform:"translate(0, 17px) scale(1)"},n.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!n.disableAnimation&&{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})},"filled"===n.variant&&(0,qt.A)({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===n.size&&{transform:"translate(12px, 13px) scale(1)"},n.shrink&&(0,qt.A)({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},"small"===n.size&&{transform:"translate(12px, 4px) scale(0.75)"})),"outlined"===n.variant&&(0,qt.A)({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===n.size&&{transform:"translate(14px, 9px) scale(1)"},n.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))})),Kr=r.forwardRef((function(e,t){const n=(0,Tn.b)({name:"MuiInputLabel",props:e}),{disableAnimation:r=!1,shrink:o,className:i}=n,a=(0,Yt.A)(n,qr),s=Xn();let l=o;"undefined"===typeof l&&s&&(l=s.filled||s.focused||s.adornedStart);const c=Gn({props:n,muiFormControl:s,states:["size","variant","required","focused"]}),u=(0,qt.A)({},n,{disableAnimation:r,formControl:s,shrink:l,size:c.size,variant:c.variant,required:c.required,focused:c.focused}),d=(e=>{const{classes:t,formControl:n,size:r,shrink:o,disableAnimation:i,variant:a,required:s}=e,l={root:["root",n&&"formControl",!i&&"animated",o&&"shrink",r&&"normal"!==r&&"size".concat((0,Mn.A)(r)),a],asterisk:[s&&"asterisk"]},c=(0,$t.A)(l,Yr,t);return(0,qt.A)({},t,c)})(u);return(0,Sn.jsx)(Zr,(0,qt.A)({"data-shrink":l,ownerState:u,ref:t,className:(0,Zt.A)(d.root,i)},a,{classes:d}))})),$r=Kr;var Qr=n(7328);function Jr(e){return(0,Kt.Ay)("MuiFormControl",e)}(0,nr.A)("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const eo=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],to=(0,In.Ay)("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return(0,qt.A)({},t.root,t["margin".concat((0,Mn.A)(n.margin))],n.fullWidth&&t.fullWidth)}})((e=>{let{ownerState:t}=e;return(0,qt.A)({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},"normal"===t.margin&&{marginTop:16,marginBottom:8},"dense"===t.margin&&{marginTop:8,marginBottom:4},t.fullWidth&&{width:"100%"})})),no=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiFormControl"}),{children:o,className:i,color:a="primary",component:s="div",disabled:l=!1,error:c=!1,focused:u,fullWidth:d=!1,hiddenLabel:h=!1,margin:p="none",required:f=!1,size:g="medium",variant:m="outlined"}=n,v=(0,Yt.A)(n,eo),y=(0,qt.A)({},n,{color:a,component:s,disabled:l,error:c,fullWidth:d,hiddenLabel:h,margin:p,required:f,size:g,variant:m}),x=(e=>{const{classes:t,margin:n,fullWidth:r}=e,o={root:["root","none"!==n&&"margin".concat((0,Mn.A)(n)),r&&"fullWidth"]};return(0,$t.A)(o,Jr,t)})(y),[b,w]=r.useState((()=>{let e=!1;return o&&r.Children.forEach(o,(t=>{if(!(0,Qr.A)(t,["Input","Select"]))return;const n=(0,Qr.A)(t,["Select"])?t.props.input:t;n&&n.props.startAdornment&&(e=!0)})),e})),[S,_]=r.useState((()=>{let e=!1;return o&&r.Children.forEach(o,(t=>{(0,Qr.A)(t,["Input","Select"])&&(tr(t.props,!0)||tr(t.props.inputProps,!0))&&(e=!0)})),e})),[A,k]=r.useState(!1);l&&A&&k(!1);const C=void 0===u||l?A:u;let M;const I=r.useMemo((()=>({adornedStart:b,setAdornedStart:w,color:a,disabled:l,error:c,filled:S,focused:C,fullWidth:d,hiddenLabel:h,size:g,onBlur:()=>{k(!1)},onEmpty:()=>{_(!1)},onFilled:()=>{_(!0)},onFocus:()=>{k(!0)},registerEffect:M,required:f,variant:m})),[b,a,l,c,S,C,d,h,M,f,g,m]);return(0,Sn.jsx)(Un.Provider,{value:I,children:(0,Sn.jsx)(to,(0,qt.A)({as:s,ownerState:y,className:(0,Zt.A)(x.root,i),ref:t},v,{children:o}))})})),ro=no;function oo(e){return(0,Kt.Ay)("MuiFormHelperText",e)}const io=(0,nr.A)("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var ao;const so=["children","className","component","disabled","error","filled","focused","margin","required","variant"],lo=(0,In.Ay)("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t["size".concat((0,Mn.A)(n.size))],n.contained&&t.contained,n.filled&&t.filled]}})((e=>{let{theme:t,ownerState:n}=e;return(0,qt.A)({color:(t.vars||t).palette.text.secondary},t.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,["&.".concat(io.disabled)]:{color:(t.vars||t).palette.text.disabled},["&.".concat(io.error)]:{color:(t.vars||t).palette.error.main}},"small"===n.size&&{marginTop:4},n.contained&&{marginLeft:14,marginRight:14})})),co=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiFormHelperText"}),{children:r,className:o,component:i="p"}=n,a=(0,Yt.A)(n,so),s=Gn({props:n,muiFormControl:Xn(),states:["variant","size","disabled","error","filled","focused","required"]}),l=(0,qt.A)({},n,{component:i,contained:"filled"===s.variant||"outlined"===s.variant,variant:s.variant,size:s.size,disabled:s.disabled,error:s.error,filled:s.filled,focused:s.focused,required:s.required}),c=(e=>{const{classes:t,contained:n,size:r,disabled:o,error:i,filled:a,focused:s,required:l}=e,c={root:["root",o&&"disabled",i&&"error",r&&"size".concat((0,Mn.A)(r)),n&&"contained",s&&"focused",a&&"filled",l&&"required"]};return(0,$t.A)(c,oo,t)})(l);return(0,Sn.jsx)(lo,(0,qt.A)({as:i,ownerState:l,className:(0,Zt.A)(c.root,o),ref:t},a,{children:" "===r?ao||(ao=(0,Sn.jsx)("span",{className:"notranslate",children:"\u200b"})):r}))})),uo=co;n(805);var ho=n(2427);const po=r.createContext();const fo=()=>{const e=r.useContext(po);return null!=e&&e};const go=function(e,t,n){return void 0===e||Rn(e)?t:(0,qt.A)({},t,{ownerState:(0,qt.A)({},t.ownerState,n)})};const mo=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(void 0===e)return{};const n={};return Object.keys(e).filter((n=>n.match(/^on[A-Z]/)&&"function"===typeof e[n]&&!t.includes(n))).forEach((t=>{n[t]=e[t]})),n};const vo=function(e){if(void 0===e)return{};const t={};return Object.keys(e).filter((t=>!(t.match(/^on[A-Z]/)&&"function"===typeof e[t]))).forEach((n=>{t[n]=e[n]})),t};const yo=function(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const e=(0,Zt.A)(null==n?void 0:n.className,i,null==o?void 0:o.className,null==r?void 0:r.className),t=(0,qt.A)({},null==n?void 0:n.style,null==o?void 0:o.style,null==r?void 0:r.style),a=(0,qt.A)({},n,o,r);return e.length>0&&(a.className=e),Object.keys(t).length>0&&(a.style=t),{props:a,internalRef:void 0}}const a=mo((0,qt.A)({},o,r)),s=vo(r),l=vo(o),c=t(a),u=(0,Zt.A)(null==c?void 0:c.className,null==n?void 0:n.className,i,null==o?void 0:o.className,null==r?void 0:r.className),d=(0,qt.A)({},null==c?void 0:c.style,null==n?void 0:n.style,null==o?void 0:o.style,null==r?void 0:r.style),h=(0,qt.A)({},c,n,l,s);return u.length>0&&(h.className=u),Object.keys(d).length>0&&(h.style=d),{props:h,internalRef:c.ref}};const xo=function(e,t,n){return"function"===typeof e?e(t,n):e},bo=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];const wo=function(e){var t;const{elementType:n,externalSlotProps:r,ownerState:o,skipResolvingSlotProps:i=!1}=e,a=(0,Yt.A)(e,bo),s=i?{}:xo(r,o),{props:l,internalRef:c}=yo((0,qt.A)({},a,{externalSlotProps:s})),u=(0,En.A)(c,null==s?void 0:s.ref,null==(t=e.additionalProps)?void 0:t.ref);return go(n,(0,qt.A)({},l,{ref:u}),o)};const So=r.createContext({});function _o(e){return(0,Kt.Ay)("MuiList",e)}(0,nr.A)("MuiList",["root","padding","dense","subheader"]);const Ao=["children","className","component","dense","disablePadding","subheader"],ko=(0,In.Ay)("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})((e=>{let{ownerState:t}=e;return(0,qt.A)({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})})),Co=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiList"}),{children:o,className:i,component:a="ul",dense:s=!1,disablePadding:l=!1,subheader:c}=n,u=(0,Yt.A)(n,Ao),d=r.useMemo((()=>({dense:s})),[s]),h=(0,qt.A)({},n,{component:a,dense:s,disablePadding:l}),p=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e,i={root:["root",!n&&"padding",r&&"dense",o&&"subheader"]};return(0,$t.A)(i,_o,t)})(h);return(0,Sn.jsx)(So.Provider,{value:d,children:(0,Sn.jsxs)(ko,(0,qt.A)({as:a,className:(0,Zt.A)(p.root,i),ref:t,ownerState:h},u,{children:[c,o]}))})})),Mo=Co;function Io(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}const To=Io,Do=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function jo(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function Po(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function Lo(e,t){if(void 0===t)return!0;let n=e.innerText;return void 0===n&&(n=e.textContent),n=n.trim().toLowerCase(),0!==n.length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function Ro(e,t,n,r,o,i){let a=!1,s=o(e,t,!!t&&n);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const t=!r&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&Lo(s,i)&&!t)return s.focus(),!0;s=o(e,s,n)}return!1}const Eo=r.forwardRef((function(e,t){const{actions:n,autoFocus:o=!1,autoFocusItem:i=!1,children:a,className:s,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:d="selectedMenu"}=e,h=(0,Yt.A)(e,Do),p=r.useRef(null),f=r.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});(0,qn.A)((()=>{o&&p.current.focus()}),[o]),r.useImperativeHandle(n,(()=>({adjustStyleForScrollbar:(e,t)=>{let{direction:n}=t;const r=!p.current.style.width;if(e.clientHeight<p.current.clientHeight&&r){const t="".concat(To((0,ho.A)(e)),"px");p.current.style["rtl"===n?"paddingLeft":"paddingRight"]=t,p.current.style.width="calc(100% + ".concat(t,")")}return p.current}})),[]);const g=(0,Yn.A)(p,t);let m=-1;r.Children.forEach(a,((e,t)=>{r.isValidElement(e)?(e.props.disabled||("selectedMenu"===d&&e.props.selected||-1===m)&&(m=t),m===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(m+=1,m>=a.length&&(m=-1))):m===t&&(m+=1,m>=a.length&&(m=-1))}));const v=r.Children.map(a,((e,t)=>{if(t===m){const t={};return i&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===d&&(t.tabIndex=0),r.cloneElement(e,t)}return e}));return(0,Sn.jsx)(Mo,(0,qt.A)({role:"menu",ref:g,className:s,onKeyDown:e=>{const t=p.current,n=e.key,r=(0,ho.A)(t).activeElement;if("ArrowDown"===n)e.preventDefault(),Ro(t,r,c,l,jo);else if("ArrowUp"===n)e.preventDefault(),Ro(t,r,c,l,Po);else if("Home"===n)e.preventDefault(),Ro(t,null,c,l,jo);else if("End"===n)e.preventDefault(),Ro(t,null,c,l,Po);else if(1===n.length){const o=f.current,i=n.toLowerCase(),a=performance.now();o.keys.length>0&&(a-o.lastTime>500?(o.keys=[],o.repeating=!0,o.previousKeyMatched=!0):o.repeating&&i!==o.keys[0]&&(o.repeating=!1)),o.lastTime=a,o.keys.push(i);const s=r&&!o.repeating&&Lo(r,o);o.previousKeyMatched&&(s||Ro(t,r,!1,l,jo,o))?e.preventDefault():o.previousKeyMatched=!1}u&&u(e)},tabIndex:o?0:-1},h,{children:v}))})),No=Eo;var Oo=n(950),zo=n(6078),Bo=n(9303);function Fo(e,t){return Fo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Fo(e,t)}function Vo(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Fo(e,t)}const Wo=!1,Ho=r.createContext(null);var Go="unmounted",Uo="exited",Xo="entering",Yo="entered",qo="exiting",Zo=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,i=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o=Uo,r.appearStatus=Xo):o=Yo:o=t.unmountOnExit||t.mountOnEnter?Go:Uo,r.state={status:o},r.nextCallback=null,r}Vo(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Go?{status:Uo}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==Xo&&n!==Yo&&(t=Xo):n!==Xo&&n!==Yo||(t=qo)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!==typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===Xo){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:St.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Uo&&this.setState({status:Go})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[St.findDOMNode(this),r],i=o[0],a=o[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||Wo?this.safeSetState({status:Yo},(function(){t.props.onEntered(i)})):(this.props.onEnter(i,a),this.safeSetState({status:Xo},(function(){t.props.onEntering(i,a),t.onTransitionEnd(l,(function(){t.safeSetState({status:Yo},(function(){t.props.onEntered(i,a)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:St.findDOMNode(this);t&&!Wo?(this.props.onExit(r),this.safeSetState({status:qo},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:Uo},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:Uo},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:St.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=o[0],a=o[1];this.props.addEndListener(i,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===Go)return null;var t=this.props,n=t.children,o=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,(0,Yt.A)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return r.createElement(Ho.Provider,{value:null},"function"===typeof n?n(e,o):r.cloneElement(r.Children.only(n),o))},t}(r.Component);function Ko(){}Zo.contextType=Ho,Zo.propTypes={},Zo.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ko,onEntering:Ko,onEntered:Ko,onExit:Ko,onExiting:Ko,onExited:Ko},Zo.UNMOUNTED=Go,Zo.EXITED=Uo,Zo.ENTERING=Xo,Zo.ENTERED=Yo,Zo.EXITING=qo;const $o=Zo;function Qo(){const e=an($n.A);return e[Qn.A]||e}const Jo=e=>e.scrollTop;function ei(e,t){var n,r;const{timeout:o,easing:i,style:a={}}=e;return{duration:null!=(n=a.transitionDuration)?n:"number"===typeof o?o:o[t.mode]||0,easing:null!=(r=a.transitionTimingFunction)?r:"object"===typeof i?i[t.mode]:i,delay:a.transitionDelay}}const ti=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function ni(e){return"scale(".concat(e,", ").concat(e**2,")")}const ri={entering:{opacity:1,transform:ni(1)},entered:{opacity:1,transform:"none"}},oi="undefined"!==typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),ii=r.forwardRef((function(e,t){const{addEndListener:n,appear:o=!0,children:i,easing:a,in:s,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:h,onExiting:p,style:f,timeout:g="auto",TransitionComponent:m=$o}=e,v=(0,Yt.A)(e,ti),y=(0,Bo.A)(),x=r.useRef(),b=Qo(),w=r.useRef(null),S=(0,Yn.A)(w,i.ref,t),_=e=>t=>{if(e){const n=w.current;void 0===t?e(n):e(n,t)}},A=_(u),k=_(((e,t)=>{Jo(e);const{duration:n,delay:r,easing:o}=ei({style:f,timeout:g,easing:a},{mode:"enter"});let i;"auto"===g?(i=b.transitions.getAutoHeightDuration(e.clientHeight),x.current=i):i=n,e.style.transition=[b.transitions.create("opacity",{duration:i,delay:r}),b.transitions.create("transform",{duration:oi?i:.666*i,delay:r,easing:o})].join(","),l&&l(e,t)})),C=_(c),M=_(p),I=_((e=>{const{duration:t,delay:n,easing:r}=ei({style:f,timeout:g,easing:a},{mode:"exit"});let o;"auto"===g?(o=b.transitions.getAutoHeightDuration(e.clientHeight),x.current=o):o=t,e.style.transition=[b.transitions.create("opacity",{duration:o,delay:n}),b.transitions.create("transform",{duration:oi?o:.666*o,delay:oi?n:n||.333*o,easing:r})].join(","),e.style.opacity=0,e.style.transform=ni(.75),d&&d(e)})),T=_(h);return(0,Sn.jsx)(m,(0,qt.A)({appear:o,in:s,nodeRef:w,onEnter:k,onEntered:C,onEntering:A,onExit:I,onExited:T,onExiting:M,addEndListener:e=>{"auto"===g&&y.start(x.current||0,e),n&&n(w.current,e)},timeout:"auto"===g?null:g},v,{children:(e,t)=>r.cloneElement(i,(0,qt.A)({style:(0,qt.A)({opacity:0,transform:ni(.75),visibility:"exited"!==e||s?void 0:"hidden"},ri[e],f,i.props.style),ref:S},t))}))}));ii.muiSupportAuto=!0;const ai=ii;var si=n(1668);const li=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function ci(e){const t=[],n=[];return Array.from(e.querySelectorAll(li)).forEach(((e,r)=>{const o=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==o&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector('input[type="radio"]'.concat(t));let n=t('[name="'.concat(e.name,'"]:checked'));return n||(n=t('[name="'.concat(e.name,'"]'))),n!==e}(e))}(e)&&(0===o?t.push(e):n.push({documentOrder:r,tabIndex:o,node:e}))})),n.sort(((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex)).map((e=>e.node)).concat(t)}function ui(){return!0}const di=function(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:o=!1,disableRestoreFocus:i=!1,getTabbable:a=ci,isEnabled:s=ui,open:l}=e,c=r.useRef(!1),u=r.useRef(null),d=r.useRef(null),h=r.useRef(null),p=r.useRef(null),f=r.useRef(!1),g=r.useRef(null),m=(0,En.A)(t.ref,g),v=r.useRef(null);r.useEffect((()=>{l&&g.current&&(f.current=!n)}),[n,l]),r.useEffect((()=>{if(!l||!g.current)return;const e=(0,si.A)(g.current);return g.current.contains(e.activeElement)||(g.current.hasAttribute("tabIndex")||g.current.setAttribute("tabIndex","-1"),f.current&&g.current.focus()),()=>{i||(h.current&&h.current.focus&&(c.current=!0,h.current.focus()),h.current=null)}}),[l]),r.useEffect((()=>{if(!l||!g.current)return;const e=(0,si.A)(g.current),t=t=>{v.current=t,!o&&s()&&"Tab"===t.key&&e.activeElement===g.current&&t.shiftKey&&(c.current=!0,d.current&&d.current.focus())},n=()=>{const t=g.current;if(null===t)return;if(!e.hasFocus()||!s()||c.current)return void(c.current=!1);if(t.contains(e.activeElement))return;if(o&&e.activeElement!==u.current&&e.activeElement!==d.current)return;if(e.activeElement!==p.current)p.current=null;else if(null!==p.current)return;if(!f.current)return;let n=[];if(e.activeElement!==u.current&&e.activeElement!==d.current||(n=a(g.current)),n.length>0){var r,i;const e=Boolean((null==(r=v.current)?void 0:r.shiftKey)&&"Tab"===(null==(i=v.current)?void 0:i.key)),t=n[0],o=n[n.length-1];"string"!==typeof t&&"string"!==typeof o&&(e?o.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const r=setInterval((()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()}),50);return()=>{clearInterval(r),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}}),[n,o,i,s,l,a]);const y=e=>{null===h.current&&(h.current=e.relatedTarget),f.current=!0};return(0,Sn.jsxs)(r.Fragment,{children:[(0,Sn.jsx)("div",{tabIndex:l?0:-1,onFocus:y,ref:u,"data-testid":"sentinelStart"}),r.cloneElement(t,{ref:m,onFocus:e=>{null===h.current&&(h.current=e.relatedTarget),f.current=!0,p.current=e.target;const n=t.props.onFocus;n&&n(e)}}),(0,Sn.jsx)("div",{tabIndex:l?0:-1,onFocus:y,ref:d,"data-testid":"sentinelEnd"})]})};var hi=n(6564);const pi=r.forwardRef((function(e,t){const{children:n,container:o,disablePortal:i=!1}=e,[a,s]=r.useState(null),l=(0,En.A)(r.isValidElement(n)?n.ref:null,t);if((0,On.A)((()=>{i||s(function(e){return"function"===typeof e?e():e}(o)||document.body)}),[o,i]),(0,On.A)((()=>{if(a&&!i)return(0,hi.A)(t,a),()=>{(0,hi.A)(t,null)}}),[t,a,i]),i){if(r.isValidElement(n)){const e={ref:l};return r.cloneElement(n,e)}return(0,Sn.jsx)(r.Fragment,{children:n})}return(0,Sn.jsx)(r.Fragment,{children:a?St.createPortal(n,a):a})})),fi=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],gi={entering:{opacity:1},entered:{opacity:1}},mi=r.forwardRef((function(e,t){const n=Qo(),o={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:s,easing:l,in:c,onEnter:u,onEntered:d,onEntering:h,onExit:p,onExited:f,onExiting:g,style:m,timeout:v=o,TransitionComponent:y=$o}=e,x=(0,Yt.A)(e,fi),b=r.useRef(null),w=(0,Yn.A)(b,s.ref,t),S=e=>t=>{if(e){const n=b.current;void 0===t?e(n):e(n,t)}},_=S(h),A=S(((e,t)=>{Jo(e);const r=ei({style:m,timeout:v,easing:l},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),u&&u(e,t)})),k=S(d),C=S(g),M=S((e=>{const t=ei({style:m,timeout:v,easing:l},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),p&&p(e)})),I=S(f);return(0,Sn.jsx)(y,(0,qt.A)({appear:a,in:c,nodeRef:b,onEnter:A,onEntered:k,onEntering:_,onExit:M,onExited:I,onExiting:C,addEndListener:e=>{i&&i(b.current,e)},timeout:v},x,{children:(e,t)=>r.cloneElement(s,(0,qt.A)({style:(0,qt.A)({opacity:0,visibility:"exited"!==e||c?void 0:"hidden"},gi[e],m,s.props.style),ref:w},t))}))})),vi=mi;function yi(e){return(0,Kt.Ay)("MuiBackdrop",e)}(0,nr.A)("MuiBackdrop",["root","invisible"]);const xi=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],bi=(0,In.Ay)("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})((e=>{let{ownerState:t}=e;return(0,qt.A)({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},t.invisible&&{backgroundColor:"transparent"})})),wi=r.forwardRef((function(e,t){var n,r,o;const i=(0,Tn.b)({props:e,name:"MuiBackdrop"}),{children:a,className:s,component:l="div",components:c={},componentsProps:u={},invisible:d=!1,open:h,slotProps:p={},slots:f={},TransitionComponent:g=vi,transitionDuration:m}=i,v=(0,Yt.A)(i,xi),y=(0,qt.A)({},i,{component:l,invisible:d}),x=(e=>{const{classes:t,invisible:n}=e,r={root:["root",n&&"invisible"]};return(0,$t.A)(r,yi,t)})(y),b=null!=(n=p.root)?n:u.root;return(0,Sn.jsx)(g,(0,qt.A)({in:h,timeout:m},v,{children:(0,Sn.jsx)(bi,(0,qt.A)({"aria-hidden":!0},b,{as:null!=(r=null!=(o=f.root)?o:c.Root)?r:l,className:(0,Zt.A)(x.root,s,null==b?void 0:b.className),ownerState:(0,qt.A)({},y,null==b?void 0:b.ownerState),classes:x,ref:t,children:a}))}))})),Si=wi;var _i=n(1782),Ai=n(2456);function ki(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Ci(e){return parseInt((0,Nn.A)(e).getComputedStyle(e).paddingRight,10)||0}function Mi(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,(e=>{const t=-1===i.indexOf(e),n=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&ki(e,o)}))}function Ii(e,t){let n=-1;return e.some(((e,r)=>!!t(e)&&(n=r,!0))),n}function Ti(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=(0,si.A)(e);return t.body===e?(0,Nn.A)(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=Io((0,si.A)(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight="".concat(Ci(r)+e,"px");const t=(0,si.A)(r).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight="".concat(Ci(t)+e,"px")}))}let e;if(r.parentNode instanceof DocumentFragment)e=(0,si.A)(r).body;else{const t=r.parentElement,n=(0,Nn.A)(r);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach((e=>{let{value:t,el:n,property:r}=e;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}const Di=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&ki(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,(e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);Mi(t,e.mount,e.modalRef,r,!0);const o=Ii(this.containers,(e=>e.container===t));return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=Ii(this.containers,(t=>-1!==t.modals.indexOf(e))),r=this.containers[n];r.restore||(r.restore=Ti(r,t))}remove(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=this.modals.indexOf(e);if(-1===n)return n;const r=Ii(this.containers,(t=>-1!==t.modals.indexOf(e))),o=this.containers[r];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(n,1),0===o.modals.length)o.restore&&o.restore(),e.modalRef&&ki(e.modalRef,t),Mi(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=o.modals[o.modals.length-1];e.modalRef&&ki(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};const ji=function(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:o=!1,manager:i=Di,closeAfterTransition:a=!1,onTransitionEnter:s,onTransitionExited:l,children:c,onClose:u,open:d,rootRef:h}=e,p=r.useRef({}),f=r.useRef(null),g=r.useRef(null),m=(0,En.A)(g,h),[v,y]=r.useState(!d),x=function(e){return!!e&&e.props.hasOwnProperty("in")}(c);let b=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(b=!1);const w=()=>(p.current.modalRef=g.current,p.current.mount=f.current,p.current),S=()=>{i.mount(w(),{disableScrollLock:o}),g.current&&(g.current.scrollTop=0)},_=(0,_i.A)((()=>{const e=function(e){return"function"===typeof e?e():e}(t)||(0,si.A)(f.current).body;i.add(w(),e),g.current&&S()})),A=r.useCallback((()=>i.isTopModal(w())),[i]),k=(0,_i.A)((e=>{f.current=e,e&&(d&&A()?S():g.current&&ki(g.current,b))})),C=r.useCallback((()=>{i.remove(w(),b)}),[b,i]);r.useEffect((()=>()=>{C()}),[C]),r.useEffect((()=>{d?_():x&&a||C()}),[d,C,x,a,_]);const M=e=>t=>{var r;null==(r=e.onKeyDown)||r.call(e,t),"Escape"===t.key&&229!==t.which&&A()&&(n||(t.stopPropagation(),u&&u(t,"escapeKeyDown")))},I=e=>t=>{var n;null==(n=e.onClick)||n.call(e,t),t.target===t.currentTarget&&u&&u(t,"backdropClick")};return{getRootProps:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=mo(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r=(0,qt.A)({},n,t);return(0,qt.A)({role:"presentation"},r,{onKeyDown:M(r),ref:m})},getBackdropProps:function(){const e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,qt.A)({"aria-hidden":!0},e,{onClick:I(e),open:d})},getTransitionProps:()=>({onEnter:(0,Ai.A)((()=>{y(!1),s&&s()}),null==c?void 0:c.props.onEnter),onExited:(0,Ai.A)((()=>{y(!0),l&&l(),a&&C()}),null==c?void 0:c.props.onExited)}),rootRef:m,portalRef:k,isTopModal:A,exited:v,hasTransition:x}};function Pi(e){return(0,Kt.Ay)("MuiModal",e)}(0,nr.A)("MuiModal",["root","hidden","backdrop"]);const Li=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],Ri=(0,In.Ay)("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})((e=>{let{theme:t,ownerState:n}=e;return(0,qt.A)({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!n.open&&n.exited&&{visibility:"hidden"})})),Ei=(0,In.Ay)(Si,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),Ni=r.forwardRef((function(e,t){var n,o,i,a,s,l;const c=(0,Tn.b)({name:"MuiModal",props:e}),{BackdropComponent:u=Ei,BackdropProps:d,className:h,closeAfterTransition:p=!1,children:f,container:g,component:m,components:v={},componentsProps:y={},disableAutoFocus:x=!1,disableEnforceFocus:b=!1,disableEscapeKeyDown:w=!1,disablePortal:S=!1,disableRestoreFocus:_=!1,disableScrollLock:A=!1,hideBackdrop:k=!1,keepMounted:C=!1,onBackdropClick:M,open:I,slotProps:T,slots:D}=c,j=(0,Yt.A)(c,Li),P=(0,qt.A)({},c,{closeAfterTransition:p,disableAutoFocus:x,disableEnforceFocus:b,disableEscapeKeyDown:w,disablePortal:S,disableRestoreFocus:_,disableScrollLock:A,hideBackdrop:k,keepMounted:C}),{getRootProps:L,getBackdropProps:R,getTransitionProps:E,portalRef:N,isTopModal:O,exited:z,hasTransition:B}=ji((0,qt.A)({},P,{rootRef:t})),F=(0,qt.A)({},P,{exited:z}),V=(e=>{const{open:t,exited:n,classes:r}=e,o={root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]};return(0,$t.A)(o,Pi,r)})(F),W={};if(void 0===f.props.tabIndex&&(W.tabIndex="-1"),B){const{onEnter:e,onExited:t}=E();W.onEnter=e,W.onExited=t}const H=null!=(n=null!=(o=null==D?void 0:D.root)?o:v.Root)?n:Ri,G=null!=(i=null!=(a=null==D?void 0:D.backdrop)?a:v.Backdrop)?i:u,U=null!=(s=null==T?void 0:T.root)?s:y.root,X=null!=(l=null==T?void 0:T.backdrop)?l:y.backdrop,Y=wo({elementType:H,externalSlotProps:U,externalForwardedProps:j,getSlotProps:L,additionalProps:{ref:t,as:m},ownerState:F,className:(0,Zt.A)(h,null==U?void 0:U.className,null==V?void 0:V.root,!F.open&&F.exited&&(null==V?void 0:V.hidden))}),q=wo({elementType:G,externalSlotProps:X,additionalProps:d,getSlotProps:e=>R((0,qt.A)({},e,{onClick:t=>{M&&M(t),null!=e&&e.onClick&&e.onClick(t)}})),className:(0,Zt.A)(null==X?void 0:X.className,null==d?void 0:d.className,null==V?void 0:V.backdrop),ownerState:F});return C||I||B&&!z?(0,Sn.jsx)(pi,{ref:N,container:g,disablePortal:S,children:(0,Sn.jsxs)(H,(0,qt.A)({},Y,{children:[!k&&u?(0,Sn.jsx)(G,(0,qt.A)({},q)):null,(0,Sn.jsx)(di,{disableEnforceFocus:b,disableAutoFocus:x,disableRestoreFocus:_,isEnabled:O,open:I,children:r.cloneElement(f,W)})]}))}):null})),Oi=Ni;var zi=n(7266);const Bi=e=>{let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,(t/100).toFixed(2)};function Fi(e){return(0,Kt.Ay)("MuiPaper",e)}(0,nr.A)("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const Vi=["className","component","elevation","square","variant"],Wi=(0,In.Ay)("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t["elevation".concat(n.elevation)]]}})((e=>{let{theme:t,ownerState:n}=e;var r;return(0,qt.A)({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow")},!n.square&&{borderRadius:t.shape.borderRadius},"outlined"===n.variant&&{border:"1px solid ".concat((t.vars||t).palette.divider)},"elevation"===n.variant&&(0,qt.A)({boxShadow:(t.vars||t).shadows[n.elevation]},!t.vars&&"dark"===t.palette.mode&&{backgroundImage:"linear-gradient(".concat((0,zi.X4)("#fff",Bi(n.elevation)),", ").concat((0,zi.X4)("#fff",Bi(n.elevation)),")")},t.vars&&{backgroundImage:null==(r=t.vars.overlays)?void 0:r[n.elevation]}))})),Hi=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiPaper"}),{className:r,component:o="div",elevation:i=1,square:a=!1,variant:s="elevation"}=n,l=(0,Yt.A)(n,Vi),c=(0,qt.A)({},n,{component:o,elevation:i,square:a,variant:s}),u=(e=>{const{square:t,elevation:n,variant:r,classes:o}=e,i={root:["root",r,!t&&"rounded","elevation"===r&&"elevation".concat(n)]};return(0,$t.A)(i,Fi,o)})(c);return(0,Sn.jsx)(Wi,(0,qt.A)({as:o,ownerState:c,className:(0,Zt.A)(u.root,r),ref:t},l))})),Gi=Hi;function Ui(e){return(0,Kt.Ay)("MuiPopover",e)}(0,nr.A)("MuiPopover",["root","paper"]);const Xi=["onEntering"],Yi=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],qi=["slotProps"];function Zi(e,t){let n=0;return"number"===typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function Ki(e,t){let n=0;return"number"===typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function $i(e){return[e.horizontal,e.vertical].map((e=>"number"===typeof e?"".concat(e,"px"):e)).join(" ")}function Qi(e){return"function"===typeof e?e():e}const Ji=(0,In.Ay)(Oi,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),ea=(0,In.Ay)(Gi,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),ta=r.forwardRef((function(e,t){var n,o,i;const a=(0,Tn.b)({props:e,name:"MuiPopover"}),{action:s,anchorEl:l,anchorOrigin:c={vertical:"top",horizontal:"left"},anchorPosition:u,anchorReference:d="anchorEl",children:h,className:p,container:f,elevation:g=8,marginThreshold:m=16,open:v,PaperProps:y={},slots:x,slotProps:b,transformOrigin:w={vertical:"top",horizontal:"left"},TransitionComponent:S=ai,transitionDuration:_="auto",TransitionProps:{onEntering:A}={},disableScrollLock:k=!1}=a,C=(0,Yt.A)(a.TransitionProps,Xi),M=(0,Yt.A)(a,Yi),I=null!=(n=null==b?void 0:b.paper)?n:y,T=r.useRef(),D=(0,Yn.A)(T,I.ref),j=(0,qt.A)({},a,{anchorOrigin:c,anchorReference:d,elevation:g,marginThreshold:m,externalPaperSlotProps:I,transformOrigin:w,TransitionComponent:S,transitionDuration:_,TransitionProps:C}),P=(e=>{const{classes:t}=e;return(0,$t.A)({root:["root"],paper:["paper"]},Ui,t)})(j),L=r.useCallback((()=>{if("anchorPosition"===d)return u;const e=Qi(l),t=(e&&1===e.nodeType?e:(0,ho.A)(T.current).body).getBoundingClientRect();return{top:t.top+Zi(t,c.vertical),left:t.left+Ki(t,c.horizontal)}}),[l,c.horizontal,c.vertical,u,d]),R=r.useCallback((e=>({vertical:Zi(e,w.vertical),horizontal:Ki(e,w.horizontal)})),[w.horizontal,w.vertical]),E=r.useCallback((e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=R(t);if("none"===d)return{top:null,left:null,transformOrigin:$i(n)};const r=L();let o=r.top-n.vertical,i=r.left-n.horizontal;const a=o+t.height,s=i+t.width,c=(0,zo.A)(Qi(l)),u=c.innerHeight-m,h=c.innerWidth-m;if(null!==m&&o<m){const e=o-m;o-=e,n.vertical+=e}else if(null!==m&&a>u){const e=a-u;o-=e,n.vertical+=e}if(null!==m&&i<m){const e=i-m;i-=e,n.horizontal+=e}else if(s>h){const e=s-h;i-=e,n.horizontal+=e}return{top:"".concat(Math.round(o),"px"),left:"".concat(Math.round(i),"px"),transformOrigin:$i(n)}}),[l,d,L,R,m]),[N,O]=r.useState(v),z=r.useCallback((()=>{const e=T.current;if(!e)return;const t=E(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,O(!0)}),[E]);r.useEffect((()=>(k&&window.addEventListener("scroll",z),()=>window.removeEventListener("scroll",z))),[l,k,z]);r.useEffect((()=>{v&&z()})),r.useImperativeHandle(s,(()=>v?{updatePosition:()=>{z()}}:null),[v,z]),r.useEffect((()=>{if(!v)return;const e=(0,Oo.A)((()=>{z()})),t=(0,zo.A)(l);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[l,v,z]);let B=_;"auto"!==_||S.muiSupportAuto||(B=void 0);const F=f||(l?(0,ho.A)(Qi(l)).body:void 0),V=null!=(o=null==x?void 0:x.root)?o:Ji,W=null!=(i=null==x?void 0:x.paper)?i:ea,H=wo({elementType:W,externalSlotProps:(0,qt.A)({},I,{style:N?I.style:(0,qt.A)({},I.style,{opacity:0})}),additionalProps:{elevation:g,ref:D},ownerState:j,className:(0,Zt.A)(P.paper,null==I?void 0:I.className)}),G=wo({elementType:V,externalSlotProps:(null==b?void 0:b.root)||{},externalForwardedProps:M,additionalProps:{ref:t,slotProps:{backdrop:{invisible:!0}},container:F,open:v},ownerState:j,className:(0,Zt.A)(P.root,p)}),{slotProps:U}=G,X=(0,Yt.A)(G,qi);return(0,Sn.jsx)(V,(0,qt.A)({},X,!Rn(V)&&{slotProps:U,disableScrollLock:k},{children:(0,Sn.jsx)(S,(0,qt.A)({appear:!0,in:v,onEntering:(e,t)=>{A&&A(e,t),z()},onExited:()=>{O(!1)},timeout:B},C,{children:(0,Sn.jsx)(W,(0,qt.A)({},H,{children:h}))}))}))})),na=ta;function ra(e){return(0,Kt.Ay)("MuiMenu",e)}(0,nr.A)("MuiMenu",["root","paper","list"]);const oa=["onEntering"],ia=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],aa={vertical:"top",horizontal:"right"},sa={vertical:"top",horizontal:"left"},la=(0,In.Ay)(na,{shouldForwardProp:e=>(0,pr.A)(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),ca=(0,In.Ay)(ea,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),ua=(0,In.Ay)(No,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),da=r.forwardRef((function(e,t){var n,o;const i=(0,Tn.b)({props:e,name:"MuiMenu"}),{autoFocus:a=!0,children:s,className:l,disableAutoFocusItem:c=!1,MenuListProps:u={},onClose:d,open:h,PaperProps:p={},PopoverClasses:f,transitionDuration:g="auto",TransitionProps:{onEntering:m}={},variant:v="selectedMenu",slots:y={},slotProps:x={}}=i,b=(0,Yt.A)(i.TransitionProps,oa),w=(0,Yt.A)(i,ia),S=fo(),_=(0,qt.A)({},i,{autoFocus:a,disableAutoFocusItem:c,MenuListProps:u,onEntering:m,PaperProps:p,transitionDuration:g,TransitionProps:b,variant:v}),A=(e=>{const{classes:t}=e;return(0,$t.A)({root:["root"],paper:["paper"],list:["list"]},ra,t)})(_),k=a&&!c&&h,C=r.useRef(null);let M=-1;r.Children.map(s,((e,t)=>{r.isValidElement(e)&&(e.props.disabled||("selectedMenu"===v&&e.props.selected||-1===M)&&(M=t))}));const I=null!=(n=y.paper)?n:ca,T=null!=(o=x.paper)?o:p,D=wo({elementType:y.root,externalSlotProps:x.root,ownerState:_,className:[A.root,l]}),j=wo({elementType:I,externalSlotProps:T,ownerState:_,className:A.paper});return(0,Sn.jsx)(la,(0,qt.A)({onClose:d,anchorOrigin:{vertical:"bottom",horizontal:S?"right":"left"},transformOrigin:S?aa:sa,slots:{paper:I,root:y.root},slotProps:{root:D,paper:j},open:h,ref:t,transitionDuration:g,TransitionProps:(0,qt.A)({onEntering:(e,t)=>{C.current&&C.current.adjustStyleForScrollbar(e,{direction:S?"rtl":"ltr"}),m&&m(e,t)}},b),ownerState:_},w,{classes:f,children:(0,Sn.jsx)(ua,(0,qt.A)({onKeyDown:e=>{"Tab"===e.key&&(e.preventDefault(),d&&d(e,"tabKeyDown"))},actions:C,autoFocus:a&&(-1===M||c),autoFocusItem:k,variant:v},u,{className:(0,Zt.A)(A.list,u.className),children:s}))}))})),ha=da;function pa(e){return(0,Kt.Ay)("MuiNativeSelect",e)}const fa=(0,nr.A)("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),ga=["className","disabled","error","IconComponent","inputRef","variant"],ma=e=>{let{ownerState:t,theme:n}=e;return(0,qt.A)({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":(0,qt.A)({},n.vars?{backgroundColor:"rgba(".concat(n.vars.palette.common.onBackgroundChannel," / 0.05)")}:{backgroundColor:"light"===n.palette.mode?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},["&.".concat(fa.disabled)]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(n.vars||n).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},"filled"===t.variant&&{"&&&":{paddingRight:32}},"outlined"===t.variant&&{borderRadius:(n.vars||n).shape.borderRadius,"&:focus":{borderRadius:(n.vars||n).shape.borderRadius},"&&&":{paddingRight:32}})},va=(0,In.Ay)("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:pr.A,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{["&.".concat(fa.multiple)]:t.multiple}]}})(ma),ya=e=>{let{ownerState:t,theme:n}=e;return(0,qt.A)({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(n.vars||n).palette.action.active,["&.".concat(fa.disabled)]:{color:(n.vars||n).palette.action.disabled}},t.open&&{transform:"rotate(180deg)"},"filled"===t.variant&&{right:7},"outlined"===t.variant&&{right:7})},xa=(0,In.Ay)("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t["icon".concat((0,Mn.A)(n.variant))],n.open&&t.iconOpen]}})(ya),ba=r.forwardRef((function(e,t){const{className:n,disabled:o,error:i,IconComponent:a,inputRef:s,variant:l="standard"}=e,c=(0,Yt.A)(e,ga),u=(0,qt.A)({},e,{disabled:o,variant:l,error:i}),d=(e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e,s={select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon","icon".concat((0,Mn.A)(n)),i&&"iconOpen",r&&"disabled"]};return(0,$t.A)(s,pa,t)})(u);return(0,Sn.jsxs)(r.Fragment,{children:[(0,Sn.jsx)(va,(0,qt.A)({ownerState:u,className:(0,Zt.A)(d.select,n),disabled:o,ref:s||t},c)),e.multiple?null:(0,Sn.jsx)(xa,{as:a,ownerState:u,className:d.icon})]})})),wa=ba;var Sa=n(7123),_a=n(4516);function Aa(e){return(0,Kt.Ay)("MuiSelect",e)}const ka=(0,nr.A)("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var Ca;const Ma=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],Ia=(0,In.Ay)("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["&.".concat(ka.select)]:t.select},{["&.".concat(ka.select)]:t[n.variant]},{["&.".concat(ka.error)]:t.error},{["&.".concat(ka.multiple)]:t.multiple}]}})(ma,{["&.".concat(ka.select)]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),Ta=(0,In.Ay)("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t["icon".concat((0,Mn.A)(n.variant))],n.open&&t.iconOpen]}})(ya),Da=(0,In.Ay)("input",{shouldForwardProp:e=>(0,Sa.A)(e)&&"classes"!==e,name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function ja(e,t){return"object"===typeof t&&null!==t?e===t:String(e)===String(t)}function Pa(e){return null==e||"string"===typeof e&&!e.trim()}const La=r.forwardRef((function(e,t){var n;const{"aria-describedby":o,"aria-label":i,autoFocus:a,autoWidth:s,children:l,className:c,defaultOpen:u,defaultValue:d,disabled:h,displayEmpty:p,error:f=!1,IconComponent:g,inputRef:m,labelId:v,MenuProps:y={},multiple:x,name:b,onBlur:w,onChange:S,onClose:_,onFocus:A,onOpen:k,open:C,readOnly:M,renderValue:I,SelectDisplayProps:T={},tabIndex:D,value:j,variant:P="standard"}=e,L=(0,Yt.A)(e,Ma),[R,E]=(0,_a.A)({controlled:j,default:d,name:"Select"}),[N,O]=(0,_a.A)({controlled:C,default:u,name:"Select"}),z=r.useRef(null),B=r.useRef(null),[F,V]=r.useState(null),{current:W}=r.useRef(null!=C),[H,G]=r.useState(),U=(0,Yn.A)(t,m),X=r.useCallback((e=>{B.current=e,e&&V(e)}),[]),Y=null==F?void 0:F.parentNode;r.useImperativeHandle(U,(()=>({focus:()=>{B.current.focus()},node:z.current,value:R})),[R]),r.useEffect((()=>{u&&N&&F&&!W&&(G(s?null:Y.clientWidth),B.current.focus())}),[F,s]),r.useEffect((()=>{a&&B.current.focus()}),[a]),r.useEffect((()=>{if(!v)return;const e=(0,ho.A)(B.current).getElementById(v);if(e){const t=()=>{getSelection().isCollapsed&&B.current.focus()};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}}),[v]);const q=(e,t)=>{e?k&&k(t):_&&_(t),W||(G(s?null:Y.clientWidth),O(e))},Z=r.Children.toArray(l),K=e=>t=>{let n;if(t.currentTarget.hasAttribute("tabindex")){if(x){n=Array.isArray(R)?R.slice():[];const t=R.indexOf(e.props.value);-1===t?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),R!==n&&(E(n),S)){const r=t.nativeEvent||t,o=new r.constructor(r.type,r);Object.defineProperty(o,"target",{writable:!0,value:{value:n,name:b}}),S(o,e)}x||q(!1,t)}},$=null!==F&&N;let Q,J;delete L["aria-invalid"];const ee=[];let te=!1,ne=!1;(tr({value:R})||p)&&(I?Q=I(R):te=!0);const re=Z.map((e=>{if(!r.isValidElement(e))return null;let t;if(x){if(!Array.isArray(R))throw new Error((0,Ln.A)(2));t=R.some((t=>ja(t,e.props.value))),t&&te&&ee.push(e.props.children)}else t=ja(R,e.props.value),t&&te&&(J=e.props.children);return t&&(ne=!0),r.cloneElement(e,{"aria-selected":t?"true":"false",onClick:K(e),onKeyUp:t=>{" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})}));te&&(Q=x?0===ee.length?null:ee.reduce(((e,t,n)=>(e.push(t),n<ee.length-1&&e.push(", "),e)),[]):J);let oe,ie=H;!s&&W&&F&&(ie=Y.clientWidth),oe="undefined"!==typeof D?D:h?null:0;const ae=T.id||(b?"mui-component-select-".concat(b):void 0),se=(0,qt.A)({},e,{variant:P,value:R,open:$,error:f}),le=(e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e,s={select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon","icon".concat((0,Mn.A)(n)),i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return(0,$t.A)(s,Aa,t)})(se),ce=(0,qt.A)({},y.PaperProps,null==(n=y.slotProps)?void 0:n.paper),ue=(0,Pn.A)();return(0,Sn.jsxs)(r.Fragment,{children:[(0,Sn.jsx)(Ia,(0,qt.A)({ref:X,tabIndex:oe,role:"combobox","aria-controls":ue,"aria-disabled":h?"true":void 0,"aria-expanded":$?"true":"false","aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[v,ae].filter(Boolean).join(" ")||void 0,"aria-describedby":o,onKeyDown:e=>{if(!M){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),q(!0,e))}},onMouseDown:h||M?null:e=>{0===e.button&&(e.preventDefault(),B.current.focus(),q(!0,e))},onBlur:e=>{!$&&w&&(Object.defineProperty(e,"target",{writable:!0,value:{value:R,name:b}}),w(e))},onFocus:A},T,{ownerState:se,className:(0,Zt.A)(T.className,le.select,c),id:ae,children:Pa(Q)?Ca||(Ca=(0,Sn.jsx)("span",{className:"notranslate",children:"\u200b"})):Q})),(0,Sn.jsx)(Da,(0,qt.A)({"aria-invalid":f,value:Array.isArray(R)?R.join(","):R,name:b,ref:z,"aria-hidden":!0,onChange:e=>{const t=Z.find((t=>t.props.value===e.target.value));void 0!==t&&(E(t.props.value),S&&S(e,t))},tabIndex:-1,disabled:h,className:le.nativeInput,autoFocus:a,ownerState:se},L)),(0,Sn.jsx)(Ta,{as:g,className:le.icon,ownerState:se}),(0,Sn.jsx)(ha,(0,qt.A)({id:"menu-".concat(b||""),anchorEl:Y,open:$,onClose:e=>{q(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},y,{MenuListProps:(0,qt.A)({"aria-labelledby":v,role:"listbox","aria-multiselectable":x?"true":void 0,disableListWrap:!0,id:ue},y.MenuListProps),slotProps:(0,qt.A)({},y.slotProps,{paper:(0,qt.A)({},ce,{style:(0,qt.A)({minWidth:ie},null!=ce?ce.style:null)})}),children:re}))]})})),Ra=La;var Ea=n(9662);const Na=(0,Ea.A)((0,Sn.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),Oa=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],za=["root"],Ba={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>(0,pr.A)(e)&&"variant"!==e,slot:"Root"},Fa=(0,In.Ay)(br,Ba)(""),Va=(0,In.Ay)(Br,Ba)(""),Wa=(0,In.Ay)(Mr,Ba)(""),Ha=r.forwardRef((function(e,t){const n=(0,Tn.b)({name:"MuiSelect",props:e}),{autoWidth:o=!1,children:i,classes:a={},className:s,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=Na,id:d,input:h,inputProps:p,label:f,labelId:g,MenuProps:m,multiple:v=!1,native:y=!1,onClose:x,onOpen:b,open:w,renderValue:S,SelectDisplayProps:_,variant:A="outlined"}=n,k=(0,Yt.A)(n,Oa),C=y?wa:Ra,M=Gn({props:n,muiFormControl:Xn(),states:["variant","error"]}),I=M.variant||A,T=(0,qt.A)({},n,{variant:I,classes:a}),D=(e=>{const{classes:t}=e;return t})(T),j=(0,Yt.A)(D,za),P=h||{standard:(0,Sn.jsx)(Fa,{ownerState:T}),outlined:(0,Sn.jsx)(Va,{label:f,ownerState:T}),filled:(0,Sn.jsx)(Wa,{ownerState:T})}[I],L=(0,Yn.A)(t,P.ref);return(0,Sn.jsx)(r.Fragment,{children:r.cloneElement(P,(0,qt.A)({inputComponent:C,inputProps:(0,qt.A)({children:i,error:M.error,IconComponent:u,variant:I,type:void 0,multiple:v},y?{id:d}:{autoWidth:o,defaultOpen:l,displayEmpty:c,labelId:g,MenuProps:m,onClose:x,onOpen:b,open:w,renderValue:S,SelectDisplayProps:(0,qt.A)({id:d},_)},p,{classes:p?(0,cn.A)(j,p.classes):j},h?h.props.inputProps:{})},(v&&y||c)&&"outlined"===I?{notched:!0}:{},{ref:L,className:(0,Zt.A)(P.props.className,s,D.root)},!h&&{variant:I},k))})}));Ha.muiName="Select";const Ga=Ha;function Ua(e){return(0,Kt.Ay)("MuiTextField",e)}(0,nr.A)("MuiTextField",["root"]);const Xa=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],Ya={standard:br,filled:Mr,outlined:Br},qa=(0,In.Ay)(ro,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Za=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiTextField"}),{autoComplete:r,autoFocus:o=!1,children:i,className:a,color:s="primary",defaultValue:l,disabled:c=!1,error:u=!1,FormHelperTextProps:d,fullWidth:h=!1,helperText:p,id:f,InputLabelProps:g,inputProps:m,InputProps:v,inputRef:y,label:x,maxRows:b,minRows:w,multiline:S=!1,name:_,onBlur:A,onChange:k,onFocus:C,placeholder:M,required:I=!1,rows:T,select:D=!1,SelectProps:j,type:P,value:L,variant:R="outlined"}=n,E=(0,Yt.A)(n,Xa),N=(0,qt.A)({},n,{autoFocus:o,color:s,disabled:c,error:u,fullWidth:h,multiline:S,required:I,select:D,variant:R}),O=(e=>{const{classes:t}=e;return(0,$t.A)({root:["root"]},Ua,t)})(N);const z={};"outlined"===R&&(g&&"undefined"!==typeof g.shrink&&(z.notched=g.shrink),z.label=x),D&&(j&&j.native||(z.id=void 0),z["aria-describedby"]=void 0);const B=(0,Pn.A)(f),F=p&&B?"".concat(B,"-helper-text"):void 0,V=x&&B?"".concat(B,"-label"):void 0,W=Ya[R],H=(0,Sn.jsx)(W,(0,qt.A)({"aria-describedby":F,autoComplete:r,autoFocus:o,defaultValue:l,fullWidth:h,multiline:S,name:_,rows:T,maxRows:b,minRows:w,type:P,value:L,id:B,inputRef:y,onBlur:A,onChange:k,onFocus:C,placeholder:M,inputProps:m},z,v));return(0,Sn.jsxs)(qa,(0,qt.A)({className:(0,Zt.A)(O.root,a),disabled:c,error:u,fullWidth:h,ref:t,required:I,color:s,variant:R,ownerState:N},E,{children:[null!=x&&""!==x&&(0,Sn.jsx)($r,(0,qt.A)({htmlFor:B,id:V},g,{children:x})),D?(0,Sn.jsx)(Ga,(0,qt.A)({"aria-describedby":F,id:B,labelId:V,value:L,input:H},j,{children:i})):H,p&&(0,Sn.jsx)(uo,(0,qt.A)({id:F},d,{children:p}))]}))})),Ka=Za;var $a=n(3319),Qa=n(7844);function Ja(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function es(e,t){var n=Object.create(null);return e&&r.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)})),n}function ts(e,t,n){return null!=n[t]?n[t]:e.props[t]}function ns(e,t,n){var o=es(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var a in e)a in t?i.length&&(o[a]=i,i=[]):i.push(a);var s={};for(var l in t){if(o[l])for(r=0;r<o[l].length;r++){var c=o[l][r];s[o[l][r]]=n(c)}s[l]=n(l)}for(r=0;r<i.length;r++)s[i[r]]=n(i[r]);return s}(t,o);return Object.keys(i).forEach((function(a){var s=i[a];if((0,r.isValidElement)(s)){var l=a in t,c=a in o,u=t[a],d=(0,r.isValidElement)(u)&&!u.props.in;!c||l&&!d?c||!l||d?c&&l&&(0,r.isValidElement)(u)&&(i[a]=(0,r.cloneElement)(s,{onExited:n.bind(null,s),in:u.props.in,exit:ts(s,"exit",e),enter:ts(s,"enter",e)})):i[a]=(0,r.cloneElement)(s,{in:!1}):i[a]=(0,r.cloneElement)(s,{onExited:n.bind(null,s),in:!0,exit:ts(s,"exit",e),enter:ts(s,"enter",e)})}})),i}var rs=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},os=function(e){function t(t,n){var r,o=(r=e.call(this,t,n)||this).handleExited.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r));return r.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},r}Vo(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,o,i=t.children,a=t.handleExited;return{children:t.firstRender?(n=e,o=a,es(n.children,(function(e){return(0,r.cloneElement)(e,{onExited:o.bind(null,e),in:!0,appear:ts(e,"appear",n),enter:ts(e,"enter",n),exit:ts(e,"exit",n)})}))):ns(e,i,a),firstRender:!1}},n.handleExited=function(e,t){var n=es(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=(0,qt.A)({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,o=(0,Yt.A)(e,["component","childFactory"]),i=this.state.contextValue,a=rs(this.state.children).map(n);return delete o.appear,delete o.enter,delete o.exit,null===t?r.createElement(Ho.Provider,{value:i},a):r.createElement(Ho.Provider,{value:i},r.createElement(t,o,a))},t}(r.Component);os.propTypes={},os.defaultProps={component:"div",childFactory:function(e){return e}};const is=os;var as=n(3290);const ss=function(e){const{className:t,classes:n,pulsate:o=!1,rippleX:i,rippleY:a,rippleSize:s,in:l,onExited:c,timeout:u}=e,[d,h]=r.useState(!1),p=(0,Zt.A)(t,n.ripple,n.rippleVisible,o&&n.ripplePulsate),f={width:s,height:s,top:-s/2+a,left:-s/2+i},g=(0,Zt.A)(n.child,d&&n.childLeaving,o&&n.childPulsate);return l||d||h(!0),r.useEffect((()=>{if(!l&&null!=c){const e=setTimeout(c,u);return()=>{clearTimeout(e)}}}),[c,l,u]),(0,Sn.jsx)("span",{className:p,style:f,children:(0,Sn.jsx)("span",{className:g})})};const ls=(0,nr.A)("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]);var cs,us,ds,hs;const ps=["center","classes","className"];let fs,gs,ms,vs;const ys=(0,as.i7)(fs||(fs=cs||(cs=Ja(["\n  0% {\n    transform: scale(0);\n    opacity: 0.1;\n  }\n\n  100% {\n    transform: scale(1);\n    opacity: 0.3;\n  }\n"])))),xs=(0,as.i7)(gs||(gs=us||(us=Ja(["\n  0% {\n    opacity: 1;\n  }\n\n  100% {\n    opacity: 0;\n  }\n"])))),bs=(0,as.i7)(ms||(ms=ds||(ds=Ja(["\n  0% {\n    transform: scale(1);\n  }\n\n  50% {\n    transform: scale(0.92);\n  }\n\n  100% {\n    transform: scale(1);\n  }\n"])))),ws=(0,In.Ay)("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Ss=(0,In.Ay)(ss,{name:"MuiTouchRipple",slot:"Ripple"})(vs||(vs=hs||(hs=Ja(["\n  opacity: 0;\n  position: absolute;\n\n  &."," {\n    opacity: 0.3;\n    transform: scale(1);\n    animation-name: ",";\n    animation-duration: ","ms;\n    animation-timing-function: ",";\n  }\n\n  &."," {\n    animation-duration: ","ms;\n  }\n\n  & ."," {\n    opacity: 1;\n    display: block;\n    width: 100%;\n    height: 100%;\n    border-radius: 50%;\n    background-color: currentColor;\n  }\n\n  & ."," {\n    opacity: 0;\n    animation-name: ",";\n    animation-duration: ","ms;\n    animation-timing-function: ",";\n  }\n\n  & ."," {\n    position: absolute;\n    /* @noflip */\n    left: 0px;\n    top: 0;\n    animation-name: ",";\n    animation-duration: 2500ms;\n    animation-timing-function: ",";\n    animation-iteration-count: infinite;\n    animation-delay: 200ms;\n  }\n"]))),ls.rippleVisible,ys,550,(e=>{let{theme:t}=e;return t.transitions.easing.easeInOut}),ls.ripplePulsate,(e=>{let{theme:t}=e;return t.transitions.duration.shorter}),ls.child,ls.childLeaving,xs,550,(e=>{let{theme:t}=e;return t.transitions.easing.easeInOut}),ls.childPulsate,bs,(e=>{let{theme:t}=e;return t.transitions.easing.easeInOut})),_s=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:a}=n,s=(0,Yt.A)(n,ps),[l,c]=r.useState([]),u=r.useRef(0),d=r.useRef(null);r.useEffect((()=>{d.current&&(d.current(),d.current=null)}),[l]);const h=r.useRef(!1),p=(0,Bo.A)(),f=r.useRef(null),g=r.useRef(null),m=r.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:o,cb:a}=e;c((e=>[...e,(0,Sn.jsx)(Ss,{classes:{ripple:(0,Zt.A)(i.ripple,ls.ripple),rippleVisible:(0,Zt.A)(i.rippleVisible,ls.rippleVisible),ripplePulsate:(0,Zt.A)(i.ripplePulsate,ls.ripplePulsate),child:(0,Zt.A)(i.child,ls.child),childLeaving:(0,Zt.A)(i.childLeaving,ls.childLeaving),childPulsate:(0,Zt.A)(i.childPulsate,ls.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o},u.current)])),u.current+=1,d.current=a}),[i]),v=r.useCallback((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{};const{pulsate:r=!1,center:i=o||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&h.current)return void(h.current=!1);"touchstart"===(null==e?void 0:e.type)&&(h.current=!0);const s=a?null:g.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,d;if(i||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(i)d=Math.sqrt((2*l.width**2+l.height**2)/3),d%2===0&&(d+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;d=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===f.current&&(f.current=()=>{m({pulsate:r,rippleX:c,rippleY:u,rippleSize:d,cb:n})},p.start(80,(()=>{f.current&&(f.current(),f.current=null)}))):m({pulsate:r,rippleX:c,rippleY:u,rippleSize:d,cb:n})}),[o,m,p]),y=r.useCallback((()=>{v({},{pulsate:!0})}),[v]),x=r.useCallback(((e,t)=>{if(p.clear(),"touchend"===(null==e?void 0:e.type)&&f.current)return f.current(),f.current=null,void p.start(0,(()=>{x(e,t)}));f.current=null,c((e=>e.length>0?e.slice(1):e)),d.current=t}),[p]);return r.useImperativeHandle(t,(()=>({pulsate:y,start:v,stop:x})),[y,v,x]),(0,Sn.jsx)(ws,(0,qt.A)({className:(0,Zt.A)(ls.root,i.root,a),ref:g},s,{children:(0,Sn.jsx)(is,{component:null,exit:!0,children:l})}))})),As=_s;function ks(e){return(0,Kt.Ay)("MuiButtonBase",e)}const Cs=(0,nr.A)("MuiButtonBase",["root","disabled","focusVisible"]),Ms=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],Is=(0,In.Ay)("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},["&.".concat(Cs.disabled)]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Ts=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:a,className:s,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:h=!1,LinkComponent:p="a",onBlur:f,onClick:g,onContextMenu:m,onDragLeave:v,onFocus:y,onFocusVisible:x,onKeyDown:b,onKeyUp:w,onMouseDown:S,onMouseLeave:_,onMouseUp:A,onTouchEnd:k,onTouchMove:C,onTouchStart:M,tabIndex:I=0,TouchRippleProps:T,touchRippleRef:D,type:j}=n,P=(0,Yt.A)(n,Ms),L=r.useRef(null),R=r.useRef(null),E=(0,Yn.A)(R,D),{isFocusVisibleRef:N,onFocus:O,onBlur:z,ref:B}=(0,Qa.A)(),[F,V]=r.useState(!1);c&&F&&V(!1),r.useImperativeHandle(o,(()=>({focusVisible:()=>{V(!0),L.current.focus()}})),[]);const[W,H]=r.useState(!1);r.useEffect((()=>{H(!0)}),[]);const G=W&&!u&&!c;function U(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d;return(0,$a.A)((r=>{t&&t(r);return!n&&R.current&&R.current[e](r),!0}))}r.useEffect((()=>{F&&h&&!u&&W&&R.current.pulsate()}),[u,h,F,W]);const X=U("start",S),Y=U("stop",m),q=U("stop",v),Z=U("stop",A),K=U("stop",(e=>{F&&e.preventDefault(),_&&_(e)})),$=U("start",M),Q=U("stop",k),J=U("stop",C),ee=U("stop",(e=>{z(e),!1===N.current&&V(!1),f&&f(e)}),!1),te=(0,$a.A)((e=>{L.current||(L.current=e.currentTarget),O(e),!0===N.current&&(V(!0),x&&x(e)),y&&y(e)})),ne=()=>{const e=L.current;return l&&"button"!==l&&!("A"===e.tagName&&e.href)},re=r.useRef(!1),oe=(0,$a.A)((e=>{h&&!re.current&&F&&R.current&&" "===e.key&&(re.current=!0,R.current.stop(e,(()=>{R.current.start(e)}))),e.target===e.currentTarget&&ne()&&" "===e.key&&e.preventDefault(),b&&b(e),e.target===e.currentTarget&&ne()&&"Enter"===e.key&&!c&&(e.preventDefault(),g&&g(e))})),ie=(0,$a.A)((e=>{h&&" "===e.key&&R.current&&F&&!e.defaultPrevented&&(re.current=!1,R.current.stop(e,(()=>{R.current.pulsate(e)}))),w&&w(e),g&&e.target===e.currentTarget&&ne()&&" "===e.key&&!e.defaultPrevented&&g(e)}));let ae=l;"button"===ae&&(P.href||P.to)&&(ae=p);const se={};"button"===ae?(se.type=void 0===j?"button":j,se.disabled=c):(P.href||P.to||(se.role="button"),c&&(se["aria-disabled"]=c));const le=(0,Yn.A)(t,B,L);const ce=(0,qt.A)({},n,{centerRipple:i,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:h,tabIndex:I,focusVisible:F}),ue=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i={root:["root",t&&"disabled",n&&"focusVisible"]},a=(0,$t.A)(i,ks,o);return n&&r&&(a.root+=" ".concat(r)),a})(ce);return(0,Sn.jsxs)(Is,(0,qt.A)({as:ae,className:(0,Zt.A)(ue.root,s),ownerState:ce,onBlur:ee,onClick:g,onContextMenu:Y,onFocus:te,onKeyDown:oe,onKeyUp:ie,onMouseDown:X,onMouseLeave:K,onMouseUp:Z,onDragLeave:q,onTouchEnd:Q,onTouchMove:J,onTouchStart:$,ref:le,tabIndex:c?-1:I,type:j},se,P,{children:[a,G?(0,Sn.jsx)(As,(0,qt.A)({ref:E,center:i},T)):null]}))})),Ds=Ts;function js(e){return(0,Kt.Ay)("MuiButton",e)}const Ps=(0,nr.A)("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]);const Ls=r.createContext({});const Rs=r.createContext(void 0),Es=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],Ns=e=>(0,qt.A)({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),Os=(0,In.Ay)(Ds,{shouldForwardProp:e=>(0,pr.A)(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["".concat(n.variant).concat((0,Mn.A)(n.color))],t["size".concat((0,Mn.A)(n.size))],t["".concat(n.variant,"Size").concat((0,Mn.A)(n.size))],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})((e=>{let{theme:t,ownerState:n}=e;var r,o;const i="light"===t.palette.mode?t.palette.grey[300]:t.palette.grey[800],a="light"===t.palette.mode?t.palette.grey.A100:t.palette.grey[700];return(0,qt.A)({},t.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":(0,qt.A)({textDecoration:"none",backgroundColor:t.vars?"rgba(".concat(t.vars.palette.text.primaryChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,zi.X4)(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===n.variant&&"inherit"!==n.color&&{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,zi.X4)(t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===n.variant&&"inherit"!==n.color&&{border:"1px solid ".concat((t.vars||t).palette[n.color].main),backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,zi.X4)(t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===n.variant&&{backgroundColor:t.vars?t.vars.palette.Button.inheritContainedHoverBg:a,boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2],backgroundColor:(t.vars||t).palette.grey[300]}},"contained"===n.variant&&"inherit"!==n.color&&{backgroundColor:(t.vars||t).palette[n.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[n.color].main}}),"&:active":(0,qt.A)({},"contained"===n.variant&&{boxShadow:(t.vars||t).shadows[8]}),["&.".concat(Ps.focusVisible)]:(0,qt.A)({},"contained"===n.variant&&{boxShadow:(t.vars||t).shadows[6]}),["&.".concat(Ps.disabled)]:(0,qt.A)({color:(t.vars||t).palette.action.disabled},"outlined"===n.variant&&{border:"1px solid ".concat((t.vars||t).palette.action.disabledBackground)},"contained"===n.variant&&{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground})},"text"===n.variant&&{padding:"6px 8px"},"text"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].main},"outlined"===n.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].main,border:t.vars?"1px solid rgba(".concat(t.vars.palette[n.color].mainChannel," / 0.5)"):"1px solid ".concat((0,zi.X4)(t.palette[n.color].main,.5))},"contained"===n.variant&&{color:t.vars?t.vars.palette.text.primary:null==(r=(o=t.palette).getContrastText)?void 0:r.call(o,t.palette.grey[300]),backgroundColor:t.vars?t.vars.palette.Button.inheritContainedBg:i,boxShadow:(t.vars||t).shadows[2]},"contained"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].contrastText,backgroundColor:(t.vars||t).palette[n.color].main},"inherit"===n.color&&{color:"inherit",borderColor:"currentColor"},"small"===n.size&&"text"===n.variant&&{padding:"4px 5px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"text"===n.variant&&{padding:"8px 11px",fontSize:t.typography.pxToRem(15)},"small"===n.size&&"outlined"===n.variant&&{padding:"3px 9px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"outlined"===n.variant&&{padding:"7px 21px",fontSize:t.typography.pxToRem(15)},"small"===n.size&&"contained"===n.variant&&{padding:"4px 10px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"contained"===n.variant&&{padding:"8px 22px",fontSize:t.typography.pxToRem(15)},n.fullWidth&&{width:"100%"})}),(e=>{let{ownerState:t}=e;return t.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},["&.".concat(Ps.focusVisible)]:{boxShadow:"none"},"&:active":{boxShadow:"none"},["&.".concat(Ps.disabled)]:{boxShadow:"none"}}})),zs=(0,In.Ay)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t["iconSize".concat((0,Mn.A)(n.size))]]}})((e=>{let{ownerState:t}=e;return(0,qt.A)({display:"inherit",marginRight:8,marginLeft:-4},"small"===t.size&&{marginLeft:-2},Ns(t))})),Bs=(0,In.Ay)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t["iconSize".concat((0,Mn.A)(n.size))]]}})((e=>{let{ownerState:t}=e;return(0,qt.A)({display:"inherit",marginRight:-4,marginLeft:8},"small"===t.size&&{marginRight:-2},Ns(t))})),Fs=r.forwardRef((function(e,t){const n=r.useContext(Ls),o=r.useContext(Rs),i=(0,Jt.A)(n,e),a=(0,Tn.b)({props:i,name:"MuiButton"}),{children:s,color:l="primary",component:c="button",className:u,disabled:d=!1,disableElevation:h=!1,disableFocusRipple:p=!1,endIcon:f,focusVisibleClassName:g,fullWidth:m=!1,size:v="medium",startIcon:y,type:x,variant:b="text"}=a,w=(0,Yt.A)(a,Es),S=(0,qt.A)({},a,{color:l,component:c,disabled:d,disableElevation:h,disableFocusRipple:p,fullWidth:m,size:v,type:x,variant:b}),_=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,classes:a}=e,s={root:["root",i,"".concat(i).concat((0,Mn.A)(t)),"size".concat((0,Mn.A)(o)),"".concat(i,"Size").concat((0,Mn.A)(o)),"color".concat((0,Mn.A)(t)),n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon","iconSize".concat((0,Mn.A)(o))],endIcon:["icon","endIcon","iconSize".concat((0,Mn.A)(o))]},l=(0,$t.A)(s,js,a);return(0,qt.A)({},a,l)})(S),A=y&&(0,Sn.jsx)(zs,{className:_.startIcon,ownerState:S,children:y}),k=f&&(0,Sn.jsx)(Bs,{className:_.endIcon,ownerState:S,children:f}),C=o||"";return(0,Sn.jsxs)(Os,(0,qt.A)({ownerState:S,className:(0,Zt.A)(n.className,_.root,u,C),component:c,disabled:d,focusRipple:!p,focusVisibleClassName:(0,Zt.A)(_.focusVisible,g),ref:t,type:x},w,{classes:_,children:[A,s,k]}))})),Vs=Fs,Ws=new Set(["double sell buy"]);function Hs(e,t){var n,r;const o=e.isSell?(null===(n=e.sellSignal)||void 0===n?void 0:n.timestamp)||0:e.buySignal.timestamp,i=t.isSell?(null===(r=t.sellSignal)||void 0===r?void 0:r.timestamp)||0:t.buySignal.timestamp;return o!==i?o-i:e.isSell!==t.isSell?e.isSell?-1:1:-e.price+t.price}function Gs(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=arguments.length>5?arguments[5]:void 0,a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,s=arguments.length>8&&void 0!==arguments[8]&&arguments[8];if(0===n)return[e,[]];var l=t[0];const c=t[1],u=new Map,d=[];var h=null;const p=new Map,f=[],g=e.sort(Hs).map((e=>({...e}))).filter((e=>{const t=Math.floor(e.buySignal.timestamp/Ks);if(l<=0)return!1;if(null!=i&&!i.has(t))return!1;var g;const m=e.symbol+e.buySignal.strategy+e.buySignal.timestamp,v=Qs(e.symbol),y=null!=a?a:el(v),x=!0!==e.reverse&&e.price<Js?0:y;if(e.isSell){const n=!0===e.reverse?-1:1,r=u.get(m);if(null!=r){const o=r[0];r[2]-=e.volume,g=0,0===r[2]?(g=r[1],r[1]-=g):(g=v?Math.floor(e.volume*o):100*Math.floor(e.volume*o/100),r[1]-=g);const i=(e.price*n-x)*g;l+=i,e.volume=g,0===d.length||d[d.length-1][0]<t?d.push([t,i]):d[d.length-1][1]+=i;const a=(n*(e.price-e.buyPrice)-x)*g;if(r[4]+=a,0===r[1]){const e=r[3]>0?r[4]/r[3]:0,n=f.length;0===n||f[n-1][0]<t?f.push([t,e]):f[n-1][1]+=e}else console.log("no zero");return!0}}else{const i=!0===e.reverse?-1:1,a=e.buySignal.strategy+e.buySignal.timestamp;var b=n;if(o){const t=e.buySignal.extra;null!=t&&"betPercent"in t&&(b*=t.betPercent)}if(r&&d.length>1){const e=d.length,t=d[e-1],n=d[e-2];t[1]>0&&n[1]>0?b/=2:t[1]<0&&n[1]<0&&(b=Math.min(1,2*b))}var w=l*b/100;if(c&&(w/=Math.log10(l/1e4)),null!=h&&h[0]===a&&l>h[1]&&(w=h[1]),g=v?Math.floor(w/e.price):100*Math.floor(w/e.price/100),null!=h&&h[0]===a){const t=e.symbol.length;if(t>9){var S=null;if(s){const e=Array.from(p.values());if(e.length>0){g=e[0][1]}}else S=p.get(e.symbol[t-9]);null!=S&&([g]=S)}}if(g>0){const n=g/e.volume,r=e.price*i*g;u.set(m,[n,g,e.volume,Math.abs(r),0]),e.volume=g,l-=r,0===d.length||d[d.length-1][0]<t?d.push([t,-r]):d[d.length-1][1]-=r,null!=h&&h[0]===a||(p.clear(),h=[a,w,g]);const o=e.symbol.length;if(o>9){const t=e.symbol[o-9];p.has(t)||p.set(e.symbol[o-9],[g,e.volume])}return!0}}return!1}));return[g,f]}function Us(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=arguments.length>6&&void 0!==arguments[6]&&arguments[6],s=arguments.length>7&&void 0!==arguments[7]&&arguments[7];const l=Gs(e,[t,!1],n,r,o,null,a,null,s);if(i){return Gs(e,[t,!1],n,r,o,new Set(l[1].filter((e=>e[1]>0)).map((e=>e[0]))),a,null,s)[0]}return l[0]}function Xs(e,t){var n=0,r=0;const o=[];for(;n<e.length&&r<t.length;){const i=e[n],a=t[r];i[0]===a[0]?(o.push([i[0],[...a[1],...i[1]]]),n++,r++):i[0]<a[0]?(o.push(i),n++):(o.push([a[0],a[1]]),r++)}for(;n<e.length;)o.push(e[n++]);for(;r<t.length;){const e=t[r];o.push([e[0],e[1]]),r++}return o}const Ys="manual buy";function qs(e){const t=new Map,n=[];return e.forEach((e=>{const n=e.runner,r=e.symbol.startsWith("O:")?100:1,o=t.get(n),i=0===e.side?e.qty*r*e.buyPrice:0,a=0===e.side?e.qty*r*(e.price-e.buyPrice):0,s=(1===e.side?1:-1)*e.qty;if(null==o){const r=n.split(":");t.set(n,[[i,a,s,parseFloat(r[r.length-3])],[e]])}else o[0][0]+=i,o[0][1]+=a,o[0][2]+=s,o[1].push(e)})),t.forEach(((e,t)=>{const[r,o,i,a]=e[0];0===i&&n.push([[r,o,a],e[1]])})),n.sort(((e,t)=>t[0][2]-e[0][2])),n}const Zs="(min-width: 800px)",Ks=864e5;function $s(e,t){const n=t/390,r=e*(.5556+.4444*n)*(t>20?1:(80+t)/100)/n;return!(arguments.length>2&&void 0!==arguments[2])||arguments[2]?r/1e7:r}function Qs(e){return!e.startsWith("O:")}const Js=.06;function el(e){return e?.01:1.4/100}function tl(e,t,n){return e>0&&t>0?1e3*n/e/t:0}function nl(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const o=[],i=e.length;if(i>0){var a=e[0],s=t(a);const d=Yl(null!=r?r:t(e[0])),h=null!=r?r:d+378e5;var l=d-198e5,c=1;if(s<l){for(var u=0;u<i;){const n=e[u];if(t(n)>=l){s=t(a=n),c=u+1;break}u++}u===i&&(c=u)}for(;l<s;)o.push(n(a,l)),l+=6e4;for(l=s;l<=h;){const a=e[c-1],s=c<i?e[c]:null;if(null==s||l<t(s))o.push(n(a,l));else if(o.push(s),c++,null!=r&&l>=r)break;l+=6e4}return o}return e}function rl(e,t){return nl(e,(e=>e.t),((e,t)=>({o:e.o,c:e.o,h:e.o,l:e.o,t:t,v:0,vw:e.o})),t&&e.length>0?e[e.length-1].t:null)}function ol(e){return"string"===typeof e?e:e+""}function il(){try{const e=localStorage.getItem("token");if(null!=e){const t=e.split("@"),n=JSON.parse(atob(t[0]));if("level"in n&&"expireAt"in n){const e=n.expireAt;if((new Date).getTime()/1e3<e){return n.level}}}}catch(Bk){}return-1}const al="isWide";function sl(){document.cookie="authorization=",localStorage.removeItem("token")}function ll(e){if("now2"in e)return e.now2;{const t=Object.entries(e);if(t.length>0){const e=function(e){if("number"===typeof e)return e;if("object"===typeof e&&"c"in e)return e.c;return 0}(t[0][1]);return e}return null}}const cl=.001;function ul(e){var t=null;return e.map((e=>{const n=Math.floor(e.t/Ks);return(null==t||t[0]<n)&&(t=[n,Yl(e.t),0]),e.t>=t[1]&&e.t<t[1]+234e5?(t[2]+=e.v,$s(t[2],Math.floor((e.t-t[1])/6e4)+1,!1)):0}))}const dl=new Map;function hl(e){const t=new Date(e+"-04:00");if(!isNaN(t.getDay())){const e=t.getTime();return Zl(e)?e:e+36e5}return null}function pl(e,t,n){const r=e.length;return r>t?e.slice(0,t):r<t?e.concat(Array.from({length:r-t}).map((e=>n()))):e}function fl(e,t){return t.reduce(((e,t)=>{if(null!=e){if(t in e){const n=e[t];return"object"===typeof n?n:null}return null}return null}),e)}async function gl(e,t,n){const r=new URLSearchParams;r.set("command",e),r.set("params",t);const o="".concat(xl,"/task?").concat(r.toString()),i=await Cl(o,n);return i}async function ml(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const o=e.split(":"),i={taskId:e,strategy:o[o.length-1],subtype:"api clean",extra:{percent:n,symbol:t}},a=await gl("clean_position",JSON.stringify(i),r);if("err"in a)return!1;if("s"in a)return!0===a.s;{const e=fl(a,["d","data"]);return null!=e&&"s"in e&&!0===e.s}}async function vl(e){return new Promise(((t,n)=>setTimeout((()=>t(1)),e)))}const yl=new class{constructor(){this.callbacks=new Map,this.uid=0}addCallBack(e){this.uid++;const t="u-"+this.uid;return this.callbacks.set(t,e),t}removeCallback(e){this.callbacks.has(e)&&this.callbacks.delete(e)}notifyCallbacks(){Array.from(this.callbacks.values()).forEach((e=>{e()}))}},xl="",bl=window.location.host,wl=!1;function Sl(e){if(wl){const t=localStorage.getItem("token");if(null!=t)return e.search("\\?")>-1?e+"&token="+t:"".concat(e,"?token=").concat(t)}return e}async function _l(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"day",i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null;const a="".concat(xl,"/historyData?symbol=").concat(e,"&startDate=").concat(t,"&endDate=").concat(n,"&num=").concat(r,"&unit=").concat(o),s=await Cl(a,i);if("err"in s)return s;{const t=s;return e.startsWith("I:")?{...t,results:t.results.map((e=>({...e,v:1})))}:t}}async function Al(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;var r;const o=Sl(e);return r=null==t?{signal:n,method:"GET"}:{signal:n,method:"POST",body:t},await fetch(o,r).then((t=>{const n=t.status;return n>=200&&n<300?t.json().catch((t=>(console.error("error decode json:".concat(t,",url:").concat(e)),{err:ol(t)}))):n>401?(yl.notifyCallbacks(),{err:"unauthorized"}):{err:"status code error:"+n}})).catch((t=>(t instanceof DOMException||console.error("fetch data error:".concat(t,",url:").concat(e),t),{err:ol(t)})))}async function kl(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return await Al(e,t,n)}async function Cl(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return await Al(e,null,t)}const Ml=new Intl.DateTimeFormat("en-US",{timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"});function Il(e){const t=e.length;if(t>17&&("C"===e[t-9]||"P"===e[t-9])){const n=e.substring(2,t-15),r=e.substring(t-15,t-9);return[n,"20"+r.substring(0,2)+"-"+r.substring(2,4)+"-"+r.substring(4)]}return null}async function Tl(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=new URLSearchParams;r.set("date",e),r.set("task",t),r.set("analysis","1");const o="".concat(xl,"/signals?").concat(r.toString()),i=await Cl(o,n);return i}async function Dl(e,t){const n=Il(e);if(null!=n){const[r,o]=n,i=await _l(r,t,o,1,"minute");if("err"in i)return i;{const n=await _l(e,t,o,1,"minute"),r=await async function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r="".concat(xl,"/optionCache?contract=").concat(e,"&startDate=").concat(t);return await Cl(r,n)}(e,t);return"err"in n?n:{stock:i,option:n,cacheOption:"err"in r?{results:[]}:r}}}return{err:"invalid option contract:"+e}}function jl(e,t){for(var n=0;n<e.length;n++)if(e[n]<t[n].length)return!1;return!0}function Pl(){const e=[],t=[],n=[];for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];o.forEach((n=>{e.push(0),t.push([])}));const a=10*(new Date).getTime();for(;!jl(e,o);){for(var s=a,l=0;l<e.length;l++){const t=o[l],n=e[l];n<t.length&&t[n][0]<s&&(s=t[n][0])}for(n.push(s),l=0;l<e.length;l++){const n=o[l],r=e[l];r<n.length&&n[r][0]===s?(t[l].push(n[r][1]),e[l]++):t[l].push("-")}}return[n,t]}function Ll(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;const n=e.toString();for(var r=n,o=0;o<t-n.length;o++)r="0"+r;return r}const Rl=["\u5468\u65e5","\u5468\u4e00","\u5468\u4e8c","\u5468\u4e09","\u5468\u56db","\u5468\u4e94","\u5468\u516d"];function El(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const o=null==e?(new Date).getTime():e,i=new Date(o),a=n?" "+Ll(r?i.getUTCHours():i.getHours())+":"+Ll(r?i.getUTCMinutes():i.getMinutes())+":"+Ll(r?i.getUTCSeconds():i.getSeconds()):"";return"".concat(r?i.getUTCFullYear():i.getFullYear(),"-").concat(Ll((r?i.getUTCMonth():i.getMonth())+1),"-").concat(Ll(r?i.getUTCDate():i.getDate()))+(t?" "+Rl[r?i.getUTCDay():i.getDay()]:"")+a}function Nl(e){const t=[],n=new Map;return e.forEach((e=>{var t;if(null==e.buySignal.symbol||0===e.buySignal.symbol.length){const t=Il(e.symbol);e.buySignal.symbol=t[0]}let r=e.buySignal.symbol+e.buySignal.strategy+e.buySignal.timestamp;n.has(r)||n.set(r,[]),null===(t=n.get(r))||void 0===t||t.push(e)})),Array.from(n.keys()).forEach((e=>{const r=n.get(e);if(null!=r&&r.length>0){const e=r[0].buySignal;t.push([e,r.sort(((e,t)=>e.symbol===t.symbol?e.timestamp-t.timestamp:e.symbol>t.symbol?1:e.symbol<t.symbol?-1:0))])}})),t}async function Ol(e,t,n,r,o,i){let a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,l=arguments.length>8&&void 0!==arguments[8]&&arguments[8];if("new"===e){if(null==r||null==i)return!1}else if("update"===e&&null==r&&null==i&&null==a)return!1;const c=Object.entries({stocks:[t],buyAlgorithm:n,sellAlgorithm:o}),u=[];null!=r&&u.push(["buyParams",r]),null!=i&&u.push(["sellParams",i]),u.push(["sellParamsEnd",a]);const d=Object.fromEntries(c.concat(u)),h=l?"task":"controlSubmit",p="".concat(xl,"/").concat(h);var f;f=null!=s?{command:e,params:d,name:"".concat(t,"-").concat(n),taskId:s}:{command:e,params:d,name:"".concat(t,"-").concat(n)};const g=await kl(p,JSON.stringify(f));if("err"in g)return!1;if("status"in g){return"ok"===g.status}return!1}(new Date).getTime();async function zl(e){const t="".concat(xl,"/config?type=stock&command=list");return await Cl(t,e)}async function Bl(e){const t="".concat(xl,"/config?type=strategy&command=list");return await Cl(t,e)}async function Fl(e,t){const n="".concat(xl,"/backtest?command=get&uid=").concat(e),r=await Cl(n,t);return"err"in r?r:"data"in r?r.data:{err:"data not found"}}async function Vl(e,t,n){const r=await Fl(e,n);if("err"in r)return r;if(!t)return[r.positions,[],[],null];const o=r.config.configs[0].stocks[0],i=await ac(e,o,r.config.startDate,r.config.endDate,n);if("err"in i)return i;var a=null;return null!=r.filterData&&(a=new Map,r.filterData.forEach((e=>{var t;const n=Math.floor(e[2]/Xl),r="".concat(n,"-").concat(e[1],"-").concat(e[0]);null===(t=a)||void 0===t||t.set(r,e[3])}))),[r.positions,r.positionsFake||[],i,a]}const Wl="@Color";function Hl(e){const t=[];return e.forEach((e=>{var n;if(e.isSell){const t=e.sellSignal;if(n="".concat(Wl,"3red@@sell"),null!=t){const e=t.subtype;e.search("acumulate clean;")>-1?n="".concat(Wl,"0purple@@acumulate sell"):e.search("event-peek-increase\\(2\\)")>-1?n="".concat(Wl,"0orange@@sparse event sell"):e.search("clean position when predict result is 0")>-1?n="".concat(Wl,"2blue@@xkk sell"):e.search("density new sell")>-1?n="".concat(Wl,"1yellow@@density new sell"):e.search("dense-event happened")>-1&&(n="".concat(Wl,"1brown@@dense event sell"))}}else{var r=0;const t=e.buySignal.extra;null!=t&&"iv"in t&&(r=t.iv.toFixed(4));var o=0;const a=Il(e.symbol);if(null!=a){const t=e.timestamp,n=new Date(a[1]).getTime();o=Math.floor((n-t)/Xl)+1}var i;i="C"===e.symbol[e.symbol.length-9]?"green":"blue",i=e.buySignal.subtype.search("realtime reverse buy")?"dark"+i:"light"+i,n="".concat(Wl,"3").concat(i,"@@(symbol:").concat(e.symbol,",iv:").concat(r,",days:").concat(o,")buy")}const a=6e4*Math.floor(e.timestamp/6e4);0===t.length||t[t.length-1][0]<a?t.push([a,[n]]):t[t.length-1][1].push(n)})),t}async function Gl(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;var n;n=null!=t&&t.length>0?{configs:e.configs,name:e.name,desc:e.desc,dates:t,startDate:t[0],endDate:t[t.length-1]}:{startDate:e.startDate,endDate:e.endDate,configs:e.configs,name:e.name,desc:e.desc};const r="".concat(xl,"/backtestSubmit"),o=await kl(r,JSON.stringify(n));return!("err"in o)&&("status"in o&&"ok"===o.status)}const Ul=new Map,Xl=864e5;function Yl(e){return Math.floor(e/Xl)*Xl+(Zl(e)?0:36e5)+468e5+18e5}function ql(e){return Math.floor(e/Xl)*Xl+(Zl(e)?0:36e5)+72e6}function Zl(e){const t=El(e),n=t.slice(0,4),r=t.slice(5),o=Ul.get(n);if(null!=o){const[e,t]=o;return r>e&&r<t}{const e=new Date(n+"-03-01"),t=e.getUTCDay(),o=new Date(n+"-11-01"),i=o.getUTCDay(),a=El(e.getTime()+(14-t)%14*864e5).slice(5),s=El(o.getTime()+(7-i)%7*864e5).slice(5);return Ul.set(n,[a,s]),r>a&&r<s}}function Kl(e){return El(e-36e5*(Zl(e)?4:5),!1,!0)}function $l(e){const t=new Map;return Object.keys(e).forEach((n=>{t.set(n,e[n])})),t}async function Ql(e,t){const n="".concat(xl,"/position_new?command=zvPositions&aid=").concat(e),r=await Cl(n,t);return"err"in r?r:"d"in r?r.d:{err:"fail to get data by key:d"}}async function Jl(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=new URLSearchParams;r.set("command","accounts"),null!=e&&r.set("aid",e),n&&r.set("group","1");const o="".concat(xl,"/position_new?").concat(r.toString()),i=await Cl(o,t);return"err"in i?i:"d"in i?i.d:{err:"fail to get data by key:d"}}async function ec(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=new URLSearchParams;o.set("command","positions"),o.set("accountId",e),null!=t&&o.set("runner",t),r&&o.set("isMain","true");const i="".concat(xl,"/position_new?").concat(o.toString()),a=await Cl(i,n);return"err"in a?a:"d"in a?a.d:{err:"fail to get data by key:d"}}async function tc(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=new URLSearchParams;o.set("command","trades"),null!=e&&o.set("accountId",e),null!=t&&o.set("orderId",t),r&&o.set("isMain","true");const i="".concat(xl,"/position_new?").concat(o.toString()),a=await Cl(i,n);return"err"in a?a:"d"in a?a.d:{err:"fail to get data by key:d"}}async function nc(e,t,n,r,o){const i=new URLSearchParams;i.set("command","update_account");const a={symbol:e,strategy:t,totalMoney:n,betPercent:r,desc:o};i.set("params",JSON.stringify(a));const s="".concat(xl,"/task?").concat(i.toString());return!("err"in await Cl(s))}async function rc(e,t,n,r,o){const i="".concat(xl,"/position_new?startDate=").concat(n,"&endDate=").concat(r,"&aid=").concat(e,"&tp=").concat(t,"&command=profit_history"),a=await Cl(i,o);if("err"in a)return a;if("d"in a&&"t"in a){return a}return{err:"data not found"}}async function oc(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=new URLSearchParams;n.set("command","analysis_data"),n.set("uid",e);const r="".concat(xl,"/backtest?").concat(n.toString()),o=await Cl(r,t);return o}async function ic(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null;const a=new URLSearchParams;a.set("symbol",t),a.set("startDate",r),a.set("endDate",o),a.set("strategy",n),a.set("command","signals"),a.set("uid",e);const s="".concat(xl,"/backtest?").concat(a.toString()),l=await Cl(s,i);return"err"in l?l:Array.isArray(l)?l.map((e=>({...e,extra:JSON.parse(e.extra)}))):{err:"wrong type"}}async function ac(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;const i=await ic(e,t,"bigtradedensity",n,r,o);if("err"in i)return i;{const a=await ic(e,t,"limitreversetime",n,r,o);return"err"in a?a:[["density",new Set(i.map((e=>Math.floor(e.timestamp/Xl))))],["reverse",new Set(a.map((e=>Math.floor(e.timestamp/Xl))))]]}}async function sc(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,a=arguments.length>6&&void 0!==arguments[6]&&arguments[6];const s=new URLSearchParams;var l;s.set("symbol",e),s.set("command","qqqPosition"),s.set("strategy",t),s.set("startDate",r),s.set("endDate",o),l=a?"position_new":"position";const c=await Cl("".concat(xl,"/").concat(l,"?").concat(s.toString()),i);if("err"in c)return c;if("d"in c){const t=c.d,o=await async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const i=new URLSearchParams;i.set("stock",e),o&&i.set("obj","1"),null!=n&&i.set("strategy",n),null!=r&&i.set("date",r);const a="".concat(xl,"/signals?").concat(i.toString());return await Cl(a,t)}(e,i,n,r,!0);if("err"in o)return o;return[t,o.map((e=>({...e,extra:JSON.parse(e.extra)})))]}return{err:"no key:d found"}}async function lc(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;const i=new URLSearchParams;i.set("uid",e),i.set("command","manualsell"),i.set("symbol",t),n?i.set("percent",r+""):i.set("volume",r+"");const a="".concat(xl,"/control?").concat(i.toString()),s=await Cl(a,o);return!("err"in s)&&("timeout"in s&&!s.timeout)}async function cc(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t="".concat(xl,"/control?command=list2"),n=await Cl(t,e);if("err"in n)return n;if("r"in n){const e=n;return null==e.r.result?{err:"empty result"}:e.r.result}return{err:"no key named:r"}}async function uc(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t="".concat(xl,"/position_new?command=realAccounts"),n=await Cl(t,e);return"err"in n?n:"d"in n?n.d:{err:"no key named:d"}}async function dc(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=new URLSearchParams;r.set("uid",e),r.set("command","updatemanualsell"),r.set("params",JSON.stringify(t));const o="".concat(xl,"/control?").concat(r.toString()),i=await Cl(o,n);return!("err"in i)&&("timeout"in i&&!i.timeout)}async function hc(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n="".concat(xl,"/control?command=get2&uid=").concat(e),r=await Cl(n,t);if("err"in r)return r;if("result"in r){const e=r.result;return null!=e&&"params"in e?e.params:{err:"result is null or no key named: params"}}return{err:"no key named result"}}async function pc(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r="".concat(xl,"/control?command=synclog&symbol=").concat(e,"&strategy=").concat(t),o=await Cl(r,n);return"err"in o?o:"r"in o?o.r:{err:"no key named:r found"}}async function fc(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const o=arguments.length>4&&void 0!==arguments[4]&&arguments[4]?"&5min=1":"",i="".concat(xl,"/qqqAggWithVol?startDate=").concat(e,"&endDate=").concat(t).concat(o,"&symbol=").concat(n),a=await Cl(i,r);return"err"in a?a:"results"in a?a.results:{err:"no key named:r found"}}async function gc(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null;const a=new URLSearchParams;a.set("command","onekey"),a.set("symbol",t),a.set("sub",e),r?a.set("group",n):a.set("strategy",n),null===o||void 0===o||o.forEach((e=>a.set(e[0],e[1])));const s="".concat(xl,"/control?").concat(a.toString()),l=await Cl(s,i);if(!("err"in l)&&"s"in l){const e=l.s;if("boolean"===typeof e)return e}return!1}async function mc(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const o=null!=e?"strategy=".concat(e):"group=".concat(vc),i=t?"percent":"volume",a="".concat(xl,"/control?command=onekeysell&").concat(o,"&").concat(i,"=").concat(n),s=await Cl(a,r);if(!("err"in s)&&"s"in s){const e=s.s;if("boolean"===typeof e)return e}return!1}const vc="g_big_volume";async function yc(e,t){const n=new URLSearchParams;n.set("command",e),t.forEach((e=>{n.set(e[0],e[1])}));const r="".concat(xl,"/position_new?").concat(n.toString()),o=await Cl(r);if("err"in o)return o;if("s"in o){const e=o.s;if(e)return e;if("d"in o){const e=o.d;if(null!=e)return{err:e}}return!1}return{err:"fail to get data by key:s"}}async function xc(e,t){const n="".concat(xl,"/position_new?command=accountgroup&mainId=").concat(e),r=await Cl(n,t);return"err"in r?r:"d"in r?r.d:{err:"fail to get data by key:d"}}async function bc(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=new URLSearchParams;n.set("command","blockConfig"),n.set("desc",e.desc),n.set("value",JSON.stringify(e.value)),null!=e.rowid?(n.set("rowid",e.rowid+""),n.set("sub","update")):(n.set("name",e.name),n.set("config",e.config),n.set("sub","insert"));const r="".concat(xl,"/control?").concat(n.toString()),o=await Cl(r,t);return!("err"in o)&&("status"in o&&!0===o.status)}async function wc(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n="".concat(xl,"/qqqVolData?dt=").concat(e,"&dayIv=1"),r=await Cl(n,t);return r}async function Sc(e,t){const n=(new Date).getTime(),r=El(n-5*Xl),o=El(n);for(var i=3;i-- >0;){const n=await _l(e,r,o,1,"day",t);if(!("err"in n)){const e=n.results;if(e.length>0){const t=e[e.length-1];if(El(t.t)!==o)return t.c;if(e.length>1){return e[e.length-2].c}}}await vl(500)}return null}async function _c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=new URLSearchParams;var r,o=null,i=null;"string"===typeof e?(r="summary",o=e):null==e?r="list_date":(r=e[2],o=e[0],i=e[1]),n.set("command",r),null!=o&&("quote"===r?n.set("startTime",o):n.set("date",o)),null!=i&&n.set("contract",i);const a="".concat(xl,"/net_flow?").concat(n.toString()),s=await Cl(a,t);return"err"in s?s:"d"in s?s.d:{err:"data not found"}}async function Ac(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t="".concat(xl,"/task?command=list"),n=await Cl(t,e);if("err"in n)return n;if("d"in n){const e=n.d;if("object"===typeof e&&null!=e&&"data"in e)return e.data}return{err:"data not found"}}const kc="username",Cc="password";function Mc(e){let{loginCB:t}=e;const[n,o]=(0,r.useState)(localStorage.getItem(kc)||""),[i,a]=(0,r.useState)(localStorage.getItem(Cc)||"");return(0,Sn.jsx)("main",{children:(0,Sn.jsx)(jn,{maxWidth:"xl",children:(0,Sn.jsxs)("div",{className:"Container",children:[(0,Sn.jsx)("img",{src:"/riches-booster-640.jpg",alt:"riches booster",style:{width:"640px",aspectRatio:"4/3"}}),(0,Sn.jsx)(Ka,{required:!0,id:"filled-required",onChange:e=>{o(e.target.value)},label:"User Name",defaultValue:n,variant:"filled"}),(0,Sn.jsx)(Ka,{id:"filled-password-input",label:"Password",type:"password",autoComplete:"current-password",defaultValue:i,onChange:e=>a(e.target.value),variant:"filled"}),(0,Sn.jsx)("br",{}),(0,Sn.jsx)(Vs,{variant:"contained",onClick:()=>{n.length>0&&i.length>0&&async function(e,t){const n="".concat(xl,"/login"),r={user:e,password:t},o=await Al(n,JSON.stringify(r));if("userLevel"in o){const e=o.userLevel;if("token"in o){const e=o.token;localStorage.setItem("token",e)}return e}return 1}(n,i).then((e=>{e>0&&(localStorage.setItem(kc,n),localStorage.setItem(Cc,i),t())}))},children:"\u767b\u5f55"})]})})})}function Ic(e){return(0,Kt.Ay)("MuiButtonGroup",e)}const Tc=(0,nr.A)("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","firstButton","fullWidth","vertical","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary","lastButton","middleButton"]),Dc=["children","className","color","component","disabled","disableElevation","disableFocusRipple","disableRipple","fullWidth","orientation","size","variant"],jc=(0,In.Ay)("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(Tc.grouped)]:t.grouped},{["& .".concat(Tc.grouped)]:t["grouped".concat((0,Mn.A)(n.orientation))]},{["& .".concat(Tc.grouped)]:t["grouped".concat((0,Mn.A)(n.variant))]},{["& .".concat(Tc.grouped)]:t["grouped".concat((0,Mn.A)(n.variant)).concat((0,Mn.A)(n.orientation))]},{["& .".concat(Tc.grouped)]:t["grouped".concat((0,Mn.A)(n.variant)).concat((0,Mn.A)(n.color))]},{["& .".concat(Tc.firstButton)]:t.firstButton},{["& .".concat(Tc.lastButton)]:t.lastButton},{["& .".concat(Tc.middleButton)]:t.middleButton},t.root,t[n.variant],!0===n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,"vertical"===n.orientation&&t.vertical]}})((e=>{let{theme:t,ownerState:n}=e;return(0,qt.A)({display:"inline-flex",borderRadius:(t.vars||t).shape.borderRadius},"contained"===n.variant&&{boxShadow:(t.vars||t).shadows[2]},n.disableElevation&&{boxShadow:"none"},n.fullWidth&&{width:"100%"},"vertical"===n.orientation&&{flexDirection:"column"},{["& .".concat(Tc.grouped)]:(0,qt.A)({minWidth:40,"&:hover":(0,qt.A)({},"contained"===n.variant&&{boxShadow:"none"})},"contained"===n.variant&&{boxShadow:"none"}),["& .".concat(Tc.firstButton,",& .").concat(Tc.middleButton)]:(0,qt.A)({},"horizontal"===n.orientation&&{borderTopRightRadius:0,borderBottomRightRadius:0},"vertical"===n.orientation&&{borderBottomRightRadius:0,borderBottomLeftRadius:0},"text"===n.variant&&"horizontal"===n.orientation&&{borderRight:t.vars?"1px solid rgba(".concat(t.vars.palette.common.onBackgroundChannel," / 0.23)"):"1px solid ".concat("light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),["&.".concat(Tc.disabled)]:{borderRight:"1px solid ".concat((t.vars||t).palette.action.disabled)}},"text"===n.variant&&"vertical"===n.orientation&&{borderBottom:t.vars?"1px solid rgba(".concat(t.vars.palette.common.onBackgroundChannel," / 0.23)"):"1px solid ".concat("light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),["&.".concat(Tc.disabled)]:{borderBottom:"1px solid ".concat((t.vars||t).palette.action.disabled)}},"text"===n.variant&&"inherit"!==n.color&&{borderColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / 0.5)"):(0,zi.X4)(t.palette[n.color].main,.5)},"outlined"===n.variant&&"horizontal"===n.orientation&&{borderRightColor:"transparent"},"outlined"===n.variant&&"vertical"===n.orientation&&{borderBottomColor:"transparent"},"contained"===n.variant&&"horizontal"===n.orientation&&{borderRight:"1px solid ".concat((t.vars||t).palette.grey[400]),["&.".concat(Tc.disabled)]:{borderRight:"1px solid ".concat((t.vars||t).palette.action.disabled)}},"contained"===n.variant&&"vertical"===n.orientation&&{borderBottom:"1px solid ".concat((t.vars||t).palette.grey[400]),["&.".concat(Tc.disabled)]:{borderBottom:"1px solid ".concat((t.vars||t).palette.action.disabled)}},"contained"===n.variant&&"inherit"!==n.color&&{borderColor:(t.vars||t).palette[n.color].dark},{"&:hover":(0,qt.A)({},"outlined"===n.variant&&"horizontal"===n.orientation&&{borderRightColor:"currentColor"},"outlined"===n.variant&&"vertical"===n.orientation&&{borderBottomColor:"currentColor"})}),["& .".concat(Tc.lastButton,",& .").concat(Tc.middleButton)]:(0,qt.A)({},"horizontal"===n.orientation&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},"vertical"===n.orientation&&{borderTopRightRadius:0,borderTopLeftRadius:0},"outlined"===n.variant&&"horizontal"===n.orientation&&{marginLeft:-1},"outlined"===n.variant&&"vertical"===n.orientation&&{marginTop:-1})})})),Pc=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiButtonGroup"}),{children:o,className:i,color:a="primary",component:s="div",disabled:l=!1,disableElevation:c=!1,disableFocusRipple:u=!1,disableRipple:d=!1,fullWidth:h=!1,orientation:p="horizontal",size:f="medium",variant:g="outlined"}=n,m=(0,Yt.A)(n,Dc),v=(0,qt.A)({},n,{color:a,component:s,disabled:l,disableElevation:c,disableFocusRipple:u,disableRipple:d,fullWidth:h,orientation:p,size:f,variant:g}),y=(e=>{const{classes:t,color:n,disabled:r,disableElevation:o,fullWidth:i,orientation:a,variant:s}=e,l={root:["root",s,"vertical"===a&&"vertical",i&&"fullWidth",o&&"disableElevation"],grouped:["grouped","grouped".concat((0,Mn.A)(a)),"grouped".concat((0,Mn.A)(s)),"grouped".concat((0,Mn.A)(s)).concat((0,Mn.A)(a)),"grouped".concat((0,Mn.A)(s)).concat((0,Mn.A)(n)),r&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return(0,$t.A)(l,Ic,t)})(v),x=r.useMemo((()=>({className:y.grouped,color:a,disabled:l,disableElevation:c,disableFocusRipple:u,disableRipple:d,fullWidth:h,size:f,variant:g})),[a,l,c,u,d,h,f,g,y.grouped]),b=function(e){return r.Children.toArray(e).filter((e=>r.isValidElement(e)))}(o),w=b.length,S=e=>{const t=0===e,n=e===w-1;return t&&n?"":t?y.firstButton:n?y.lastButton:y.middleButton};return(0,Sn.jsx)(jc,(0,qt.A)({as:s,role:"group",className:(0,Zt.A)(y.root,i),ref:t,ownerState:v},m,{children:(0,Sn.jsx)(Ls.Provider,{value:x,children:b.map(((e,t)=>(0,Sn.jsx)(Rs.Provider,{value:S(t),children:e},t)))})}))})),Lc=Pc;function Rc(e){return(0,Kt.Ay)("MuiCircularProgress",e)}(0,nr.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var Ec,Nc,Oc,zc;const Bc=["className","color","disableShrink","size","style","thickness","value","variant"];let Fc,Vc,Wc,Hc;const Gc=44,Uc=(0,as.i7)(Fc||(Fc=Ec||(Ec=Ja(["\n  0% {\n    transform: rotate(0deg);\n  }\n\n  100% {\n    transform: rotate(360deg);\n  }\n"])))),Xc=(0,as.i7)(Vc||(Vc=Nc||(Nc=Ja(["\n  0% {\n    stroke-dasharray: 1px, 200px;\n    stroke-dashoffset: 0;\n  }\n\n  50% {\n    stroke-dasharray: 100px, 200px;\n    stroke-dashoffset: -15px;\n  }\n\n  100% {\n    stroke-dasharray: 100px, 200px;\n    stroke-dashoffset: -125px;\n  }\n"])))),Yc=(0,In.Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["color".concat((0,Mn.A)(n.color))]]}})((e=>{let{ownerState:t,theme:n}=e;return(0,qt.A)({display:"inline-block"},"determinate"===t.variant&&{transition:n.transitions.create("transform")},"inherit"!==t.color&&{color:(n.vars||n).palette[t.color].main})}),(e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&(0,as.AH)(Wc||(Wc=Oc||(Oc=Ja(["\n      animation: "," 1.4s linear infinite;\n    "]))),Uc)})),qc=(0,In.Ay)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),Zc=(0,In.Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t["circle".concat((0,Mn.A)(n.variant))],n.disableShrink&&t.circleDisableShrink]}})((e=>{let{ownerState:t,theme:n}=e;return(0,qt.A)({stroke:"currentColor"},"determinate"===t.variant&&{transition:n.transitions.create("stroke-dashoffset")},"indeterminate"===t.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})}),(e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&!t.disableShrink&&(0,as.AH)(Hc||(Hc=zc||(zc=Ja(["\n      animation: "," 1.4s ease-in-out infinite;\n    "]))),Xc)})),Kc=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiCircularProgress"}),{className:r,color:o="primary",disableShrink:i=!1,size:a=40,style:s,thickness:l=3.6,value:c=0,variant:u="indeterminate"}=n,d=(0,Yt.A)(n,Bc),h=(0,qt.A)({},n,{color:o,disableShrink:i,size:a,thickness:l,value:c,variant:u}),p=(e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e,i={root:["root",n,"color".concat((0,Mn.A)(r))],svg:["svg"],circle:["circle","circle".concat((0,Mn.A)(n)),o&&"circleDisableShrink"]};return(0,$t.A)(i,Rc,t)})(h),f={},g={},m={};if("determinate"===u){const e=2*Math.PI*((Gc-l)/2);f.strokeDasharray=e.toFixed(3),m["aria-valuenow"]=Math.round(c),f.strokeDashoffset="".concat(((100-c)/100*e).toFixed(3),"px"),g.transform="rotate(-90deg)"}return(0,Sn.jsx)(Yc,(0,qt.A)({className:(0,Zt.A)(p.root,r),style:(0,qt.A)({width:a,height:a},g,s),ownerState:h,ref:t,role:"progressbar"},m,d,{children:(0,Sn.jsx)(qc,{className:p.svg,ownerState:h,viewBox:"".concat(22," ").concat(22," ").concat(Gc," ").concat(Gc),children:(0,Sn.jsx)(Zc,{className:p.circle,style:f,ownerState:h,cx:Gc,cy:Gc,r:(Gc-l)/2,fill:"none",strokeWidth:l})})}))})),$c=Kc;function Qc(e){const[t,n]=(0,r.useState)(null),{getter:o,interval:i,debugKey:a,onLoad:s}=e,l=(0,r.useCallback)((()=>{null!=s&&s()}),[s]),[c]=(0,r.useState)(new AbortController),[u,d]=(0,r.useState)(0);return console.log("debug LoadableContentAsyncNew,key:"+a),(0,r.useEffect)((()=>{null==t||"err"in t||l()}),[t]),(0,r.useEffect)((()=>{if((null==i||i>3e3)&&o(c.signal).then((e=>{c.signal.aborted||n(e)})),null!=i){const e=setInterval((()=>{o(c.signal).then((e=>{c.signal.aborted||n(e)}))}),i);return()=>{clearInterval(e)}}}),[o,c,i,u]),(0,r.useEffect)((()=>()=>{c.abort()}),[c]),null==t?(0,Sn.jsx)($c,{}):"err"in t?(0,Sn.jsxs)("div",{children:[(0,Sn.jsxs)("p",{children:["Error:",ol(t.err)]}),(0,Sn.jsx)("button",{onClick:()=>{n(null),d((e=>e+1))},children:"Refresh"})]}):e.cvt(t)}const Jc=864e5,eu=[1,2,3,4],tu="IronCondor buy";var nu=function(e,t){return nu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},nu(e,t)};function ru(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}nu(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}Object.create;Object.create;var ou=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},iu=new function(){this.browser=new ou,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow="undefined"!==typeof window};"object"===typeof wx&&"function"===typeof wx.getSystemInfoSync?(iu.wxa=!0,iu.touchEventsSupported=!0):"undefined"===typeof document&&"undefined"!==typeof self?iu.worker=!0:"undefined"===typeof navigator||0===navigator.userAgent.indexOf("Node.js")?(iu.node=!0,iu.svgSupported=!0):function(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),o=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),i=e.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(e);r&&(n.firefox=!0,n.version=r[1]);o&&(n.ie=!0,n.version=o[1]);i&&(n.edge=!0,n.version=i[1],n.newEdge=+i[1].split(".")[0]>18);a&&(n.weChat=!0);t.svgSupported="undefined"!==typeof SVGRect,t.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,t.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported="undefined"!==typeof document;var s=document.documentElement.style;t.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}(navigator.userAgent,iu);const au=iu;var su=12,lu="sans-serif",cu=su+"px "+lu;var uu=function(e){var t={};if("undefined"===typeof JSON)return t;for(var n=0;n<e.length;n++){var r=String.fromCharCode(n+32),o=(e.charCodeAt(n)-20)/100;t[r]=o}return t}("007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N"),du={createCanvas:function(){return"undefined"!==typeof document&&document.createElement("canvas")},measureText:function(){var e,t;return function(n,r){if(!e){var o=du.createCanvas();e=o&&o.getContext("2d")}if(e)return t!==r&&(t=e.font=r||cu),e.measureText(n);n=n||"";var i=/((?:\d+)?\.?\d*)px/.exec(r=r||cu),a=i&&+i[1]||su,s=0;if(r.indexOf("mono")>=0)s=a*n.length;else for(var l=0;l<n.length;l++){var c=uu[n[l]];s+=null==c?a:c*a}return{width:s}}}(),loadImage:function(e,t,n){var r=new Image;return r.onload=t,r.onerror=n,r.src=e,r}};var hu=Nu(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],(function(e,t){return e["[object "+t+"]"]=!0,e}),{}),pu=Nu(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],(function(e,t){return e["[object "+t+"Array]"]=!0,e}),{}),fu=Object.prototype.toString,gu=Array.prototype,mu=gu.forEach,vu=gu.filter,yu=gu.slice,xu=gu.map,bu=function(){}.constructor,wu=bu?bu.prototype:null,Su="__proto__",_u=2311;function Au(){return _u++}function ku(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];"undefined"!==typeof console&&console.error.apply(console,e)}function Cu(e){if(null==e||"object"!==typeof e)return e;var t=e,n=fu.call(e);if("[object Array]"===n){if(!sd(e)){t=[];for(var r=0,o=e.length;r<o;r++)t[r]=Cu(e[r])}}else if(pu[n]){if(!sd(e)){var i=e.constructor;if(i.from)t=i.from(e);else{t=new i(e.length);for(r=0,o=e.length;r<o;r++)t[r]=e[r]}}}else if(!hu[n]&&!sd(e)&&!Zu(e))for(var a in t={},e)e.hasOwnProperty(a)&&a!==Su&&(t[a]=Cu(e[a]));return t}function Mu(e,t,n){if(!Xu(t)||!Xu(e))return n?Cu(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==Su){var o=e[r],i=t[r];!Xu(i)||!Xu(o)||Vu(i)||Vu(o)||Zu(i)||Zu(o)||Yu(i)||Yu(o)||sd(i)||sd(o)?!n&&r in e||(e[r]=Cu(t[r])):Mu(o,i,n)}return e}function Iu(e,t){for(var n=e[0],r=1,o=e.length;r<o;r++)n=Mu(n,e[r],t);return n}function Tu(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==Su&&(e[n]=t[n]);return e}function Du(e,t,n){for(var r=zu(t),o=0;o<r.length;o++){var i=r[o];(n?null!=t[i]:null==e[i])&&(e[i]=t[i])}return e}du.createCanvas;function ju(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n}return-1}function Pu(e,t,n){if(e="prototype"in e?e.prototype:e,t="prototype"in t?t.prototype:t,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(t),o=0;o<r.length;o++){var i=r[o];"constructor"!==i&&(n?null!=t[i]:null==e[i])&&(e[i]=t[i])}else Du(e,t,n)}function Lu(e){return!!e&&("string"!==typeof e&&"number"===typeof e.length)}function Ru(e,t,n){if(e&&t)if(e.forEach&&e.forEach===mu)e.forEach(t,n);else if(e.length===+e.length)for(var r=0,o=e.length;r<o;r++)t.call(n,e[r],r,e);else for(var i in e)e.hasOwnProperty(i)&&t.call(n,e[i],i,e)}function Eu(e,t,n){if(!e)return[];if(!t)return td(e);if(e.map&&e.map===xu)return e.map(t,n);for(var r=[],o=0,i=e.length;o<i;o++)r.push(t.call(n,e[o],o,e));return r}function Nu(e,t,n,r){if(e&&t){for(var o=0,i=e.length;o<i;o++)n=t.call(r,n,e[o],o,e);return n}}function Ou(e,t,n){if(!e)return[];if(!t)return td(e);if(e.filter&&e.filter===vu)return e.filter(t,n);for(var r=[],o=0,i=e.length;o<i;o++)t.call(n,e[o],o,e)&&r.push(e[o]);return r}function zu(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}var Bu=wu&&Wu(wu.bind)?wu.call.bind(wu.bind):function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return function(){return e.apply(t,n.concat(yu.call(arguments)))}};function Fu(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){return e.apply(this,t.concat(yu.call(arguments)))}}function Vu(e){return Array.isArray?Array.isArray(e):"[object Array]"===fu.call(e)}function Wu(e){return"function"===typeof e}function Hu(e){return"string"===typeof e}function Gu(e){return"[object String]"===fu.call(e)}function Uu(e){return"number"===typeof e}function Xu(e){var t=typeof e;return"function"===t||!!e&&"object"===t}function Yu(e){return!!hu[fu.call(e)]}function qu(e){return!!pu[fu.call(e)]}function Zu(e){return"object"===typeof e&&"number"===typeof e.nodeType&&"object"===typeof e.ownerDocument}function Ku(e){return null!=e.colorStops}function $u(e){return e!==e}function Qu(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e.length;n<r;n++)if(null!=e[n])return e[n]}function Ju(e,t){return null!=e?e:t}function ed(e,t,n){return null!=e?e:null!=t?t:n}function td(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return yu.apply(e,t)}function nd(e){if("number"===typeof e)return[e,e,e,e];var t=e.length;return 2===t?[e[0],e[1],e[0],e[1]]:3===t?[e[0],e[1],e[2],e[1]]:e}function rd(e,t){if(!e)throw new Error(t)}function od(e){return null==e?null:"function"===typeof e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var id="__ec_primitive__";function ad(e){e[id]=!0}function sd(e){return e[id]}var ld=function(){function e(){this.data={}}return e.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},e.prototype.has=function(e){return this.data.hasOwnProperty(e)},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){return this.data[e]=t,this},e.prototype.keys=function(){return zu(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),cd="function"===typeof Map;var ud=function(){function e(t){var n=Vu(t);this.data=cd?new Map:new ld;var r=this;function o(e,t){n?r.set(e,t):r.set(t,e)}t instanceof e?t.each(o):t&&Ru(t,o)}return e.prototype.hasKey=function(e){return this.data.has(e)},e.prototype.get=function(e){return this.data.get(e)},e.prototype.set=function(e,t){return this.data.set(e,t),t},e.prototype.each=function(e,t){this.data.forEach((function(n,r){e.call(t,n,r)}))},e.prototype.keys=function(){var e=this.data.keys();return cd?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function dd(e){return new ud(e)}function hd(e,t){for(var n=new e.constructor(e.length+t.length),r=0;r<e.length;r++)n[r]=e[r];var o=e.length;for(r=0;r<t.length;r++)n[r+o]=t[r];return n}function pd(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&Tu(n,t),n}function fd(e){var t=e.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function gd(e,t){return e.hasOwnProperty(t)}function md(){}var vd=180/Math.PI,yd=function(e,t){return yd=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},yd(e,t)};function xd(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}yd(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}Object.create;Object.create;function bd(e,t){return null==e&&(e=0),null==t&&(t=0),[e,t]}function wd(e,t){return e[0]=t[0],e[1]=t[1],e}function Sd(e){return[e[0],e[1]]}function _d(e,t,n){return e[0]=t,e[1]=n,e}function Ad(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function kd(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e}function Cd(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function Md(e){return Math.sqrt(Id(e))}function Id(e){return e[0]*e[0]+e[1]*e[1]}function Td(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function Dd(e,t){var n=Md(t);return 0===n?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function jd(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var Pd=jd;var Ld=function(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])};function Rd(e,t,n,r){return e[0]=t[0]+r*(n[0]-t[0]),e[1]=t[1]+r*(n[1]-t[1]),e}function Ed(e,t,n){var r=t[0],o=t[1];return e[0]=n[0]*r+n[2]*o+n[4],e[1]=n[1]*r+n[3]*o+n[5],e}function Nd(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function Od(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var zd=function(e,t){this.target=e,this.topTarget=t&&t.topTarget},Bd=function(){function e(e){this.handler=e,e.on("mousedown",this._dragStart,this),e.on("mousemove",this._drag,this),e.on("mouseup",this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new zd(t,e),"dragstart",e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,o=n-this._x,i=r-this._y;this._x=n,this._y=r,t.drift(o,i,e),this.handler.dispatchToElement(new zd(t,e),"drag",e.event);var a=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=a,t!==a&&(s&&a!==s&&this.handler.dispatchToElement(new zd(s,e),"dragleave",e.event),a&&a!==s&&this.handler.dispatchToElement(new zd(a,e),"dragenter",e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new zd(t,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new zd(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},e}();const Fd=Bd;var Vd=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||(this._$handlers={});var o=this._$handlers;if("function"===typeof t&&(r=n,n=t,t=null),!n||!e)return this;var i=this._$eventProcessor;null!=t&&i&&i.normalizeQuery&&(t=i.normalizeQuery(t)),o[e]||(o[e]=[]);for(var a=0;a<o[e].length;a++)if(o[e][a].h===n)return this;var s={h:n,query:t,ctx:r||this,callAtLast:n.zrEventfulCallAtLast},l=o[e].length-1,c=o[e][l];return c&&c.callAtLast?o[e].splice(l,0,s):o[e].push(s),this},e.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},e.prototype.off=function(e,t){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var r=[],o=0,i=n[e].length;o<i;o++)n[e][o].h!==t&&r.push(n[e][o]);n[e]=r}n[e]&&0===n[e].length&&delete n[e]}else delete n[e];return this},e.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var r=this._$handlers[e],o=this._$eventProcessor;if(r)for(var i=t.length,a=r.length,s=0;s<a;s++){var l=r[s];if(!o||!o.filter||null==l.query||o.filter(e,l.query))switch(i){case 0:l.h.call(l.ctx);break;case 1:l.h.call(l.ctx,t[0]);break;case 2:l.h.call(l.ctx,t[0],t[1]);break;default:l.h.apply(l.ctx,t)}}return o&&o.afterTrigger&&o.afterTrigger(e),this},e.prototype.triggerWithContext=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var r=this._$handlers[e],o=this._$eventProcessor;if(r)for(var i=t.length,a=t[i-1],s=r.length,l=0;l<s;l++){var c=r[l];if(!o||!o.filter||null==c.query||o.filter(e,c.query))switch(i){case 0:c.h.call(a);break;case 1:c.h.call(a,t[0]);break;case 2:c.h.call(a,t[0],t[1]);break;default:c.h.apply(a,t.slice(1,i-1))}}return o&&o.afterTrigger&&o.afterTrigger(e),this},e}();const Wd=Vd;var Hd=Math.log(2);function Gd(e,t,n,r,o,i){var a=r+"-"+o,s=e.length;if(i.hasOwnProperty(a))return i[a];if(1===t){var l=Math.round(Math.log((1<<s)-1&~o)/Hd);return e[n][l]}for(var c=r|1<<n,u=n+1;r&1<<u;)u++;for(var d=0,h=0,p=0;h<s;h++){var f=1<<h;f&o||(d+=(p%2?-1:1)*e[n][h]*Gd(e,t-1,u,c,o|f,i),p++)}return i[a]=d,d}function Ud(e,t){var n=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],r={},o=Gd(n,8,0,0,0,r);if(0!==o){for(var i=[],a=0;a<8;a++)for(var s=0;s<8;s++)null==i[s]&&(i[s]=0),i[s]+=((a+s)%2?-1:1)*Gd(n,7,0===a?1:0,1<<a,1<<s,r)/o*t[a];return function(e,t,n){var r=t*i[6]+n*i[7]+1;e[0]=(t*i[0]+n*i[1]+i[2])/r,e[1]=(t*i[3]+n*i[4]+i[5])/r}}}var Xd="___zrEVENTSAVED",Yd=[];function qd(e,t,n,r,o){if(t.getBoundingClientRect&&au.domSupported&&!Zd(t)){var i=t[Xd]||(t[Xd]={}),a=function(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var r=["left","right"],o=["top","bottom"],i=0;i<4;i++){var a=document.createElement("div"),s=i%2,l=(i>>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",r[s]+":0",o[l]+":0",r[1-s]+":auto",o[1-l]+":auto",""].join("!important;"),e.appendChild(a),n.push(a)}return n}(t,i),s=function(e,t,n){for(var r=n?"invTrans":"trans",o=t[r],i=t.srcCoords,a=[],s=[],l=!0,c=0;c<4;c++){var u=e[c].getBoundingClientRect(),d=2*c,h=u.left,p=u.top;a.push(h,p),l=l&&i&&h===i[d]&&p===i[d+1],s.push(e[c].offsetLeft,e[c].offsetTop)}return l&&o?o:(t.srcCoords=a,t[r]=n?Ud(s,a):Ud(a,s))}(a,i,o);if(s)return s(e,n,r),!0}return!1}function Zd(e){return"CANVAS"===e.nodeName.toUpperCase()}var Kd=/([&<>"'])/g,$d={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Qd(e){return null==e?"":(e+"").replace(Kd,(function(e,t){return $d[t]}))}var Jd=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,eh=[],th=au.browser.firefox&&+au.browser.version.split(".")[0]<39;function nh(e,t,n,r){return n=n||{},r?rh(e,t,n):th&&null!=t.layerX&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):null!=t.offsetX?(n.zrX=t.offsetX,n.zrY=t.offsetY):rh(e,t,n),n}function rh(e,t,n){if(au.domSupported&&e.getBoundingClientRect){var r=t.clientX,o=t.clientY;if(Zd(e)){var i=e.getBoundingClientRect();return n.zrX=r-i.left,void(n.zrY=o-i.top)}if(qd(eh,e,r,o))return n.zrX=eh[0],void(n.zrY=eh[1])}n.zrX=n.zrY=0}function oh(e){return e||window.event}function ih(e,t,n){if(null!=(t=oh(t)).zrX)return t;var r=t.type;if(r&&r.indexOf("touch")>=0){var o="touchend"!==r?t.targetTouches[0]:t.changedTouches[0];o&&nh(e,o,t,n)}else{nh(e,t,t,n);var i=function(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(null==n||null==r)return t;return 3*(0!==r?Math.abs(r):Math.abs(n))*(r>0?-1:r<0?1:n>0?-1:1)}(t);t.zrDelta=i?i/120:-(t.detail||0)/3}var a=t.button;return null==t.which&&void 0!==a&&Jd.test(t.type)&&(t.which=1&a?1:2&a?3:4&a?2:0),t}function ah(e,t,n,r){e.addEventListener(t,n,r)}var sh=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function lh(e){return 2===e.which||3===e.which}var ch=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var o={points:[],touches:[],target:t,event:e},i=0,a=r.length;i<a;i++){var s=r[i],l=nh(n,s,{});o.points.push([l.zrX,l.zrY]),o.touches.push(s)}this._track.push(o)}},e.prototype._recognize=function(e){for(var t in dh)if(dh.hasOwnProperty(t)){var n=dh[t](this._track,e);if(n)return n}},e}();function uh(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}var dh={pinch:function(e,t){var n=e.length;if(n){var r,o=(e[n-1]||{}).points,i=(e[n-2]||{}).points||o;if(i&&i.length>1&&o&&o.length>1){var a=uh(o)/uh(i);!isFinite(a)&&(a=1),t.pinchScale=a;var s=[((r=o)[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2];return t.pinchX=s[0],t.pinchY=s[1],{type:"pinch",target:e[0].target,event:t}}}}};function hh(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function ph(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function fh(e,t,n){var r=t[0]*n[0]+t[2]*n[1],o=t[1]*n[0]+t[3]*n[1],i=t[0]*n[2]+t[2]*n[3],a=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],l=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=o,e[2]=i,e[3]=a,e[4]=s,e[5]=l,e}function gh(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function mh(e,t,n,r){void 0===r&&(r=[0,0]);var o=t[0],i=t[2],a=t[4],s=t[1],l=t[3],c=t[5],u=Math.sin(n),d=Math.cos(n);return e[0]=o*d+s*u,e[1]=-o*u+s*d,e[2]=i*d+l*u,e[3]=-i*u+d*l,e[4]=d*(a-r[0])+u*(c-r[1])+r[0],e[5]=d*(c-r[1])-u*(a-r[0])+r[1],e}function vh(e,t,n){var r=n[0],o=n[1];return e[0]=t[0]*r,e[1]=t[1]*o,e[2]=t[2]*r,e[3]=t[3]*o,e[4]=t[4]*r,e[5]=t[5]*o,e}function yh(e,t){var n=t[0],r=t[2],o=t[4],i=t[1],a=t[3],s=t[5],l=n*a-i*r;return l?(l=1/l,e[0]=a*l,e[1]=-i*l,e[2]=-r*l,e[3]=n*l,e[4]=(r*s-a*o)*l,e[5]=(i*o-n*s)*l,e):null}var xh=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.lerp=function(e,t,n,r){var o=1-r;e.x=o*t.x+r*n.x,e.y=o*t.y+r*n.y},e}();const bh=xh;var wh=Math.min,Sh=Math.max,_h=new bh,Ah=new bh,kh=new bh,Ch=new bh,Mh=new bh,Ih=new bh,Th=function(){function e(e,t,n,r){n<0&&(e+=n,n=-n),r<0&&(t+=r,r=-r),this.x=e,this.y=t,this.width=n,this.height=r}return e.prototype.union=function(e){var t=wh(e.x,this.x),n=wh(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Sh(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=Sh(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){var t=this,n=e.width/t.width,r=e.height/t.height,o=[1,0,0,1,0,0];return gh(o,o,[-t.x,-t.y]),vh(o,o,[n,r]),gh(o,o,[e.x,e.y]),o},e.prototype.intersect=function(t,n){if(!t)return!1;t instanceof e||(t=e.create(t));var r=this,o=r.x,i=r.x+r.width,a=r.y,s=r.y+r.height,l=t.x,c=t.x+t.width,u=t.y,d=t.y+t.height,h=!(i<l||c<o||s<u||d<a);if(n){var p=1/0,f=0,g=Math.abs(i-l),m=Math.abs(c-o),v=Math.abs(s-u),y=Math.abs(d-a),x=Math.min(g,m),b=Math.min(v,y);i<l||c<o?x>f&&(f=x,g<m?bh.set(Ih,-g,0):bh.set(Ih,m,0)):x<p&&(p=x,g<m?bh.set(Mh,g,0):bh.set(Mh,-m,0)),s<u||d<a?b>f&&(f=b,v<y?bh.set(Ih,0,-v):bh.set(Ih,0,y)):x<p&&(p=x,v<y?bh.set(Mh,0,v):bh.set(Mh,0,-y))}return n&&bh.copy(n,h?Mh:Ih),h},e.prototype.contain=function(e,t){var n=this;return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return 0===this.width||0===this.height},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},e.applyTransform=function(t,n,r){if(r){if(r[1]<1e-5&&r[1]>-1e-5&&r[2]<1e-5&&r[2]>-1e-5){var o=r[0],i=r[3],a=r[4],s=r[5];return t.x=n.x*o+a,t.y=n.y*i+s,t.width=n.width*o,t.height=n.height*i,t.width<0&&(t.x+=t.width,t.width=-t.width),void(t.height<0&&(t.y+=t.height,t.height=-t.height))}_h.x=kh.x=n.x,_h.y=Ch.y=n.y,Ah.x=Ch.x=n.x+n.width,Ah.y=kh.y=n.y+n.height,_h.transform(r),Ch.transform(r),Ah.transform(r),kh.transform(r),t.x=wh(_h.x,Ah.x,kh.x,Ch.x),t.y=wh(_h.y,Ah.y,kh.y,Ch.y);var l=Sh(_h.x,Ah.x,kh.x,Ch.x),c=Sh(_h.y,Ah.y,kh.y,Ch.y);t.width=l-t.x,t.height=c-t.y}else t!==n&&e.copy(t,n)},e}();const Dh=Th;var jh="silent";function Ph(){sh(this.event)}var Lh=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handler=null,t}return xd(t,e),t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Wd),Rh=function(e,t){this.x=e,this.y=t},Eh=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Nh=new Dh(0,0,0,0),Oh=function(e){function t(t,n,r,o,i){var a=e.call(this)||this;return a._hovered=new Rh(0,0),a.storage=t,a.painter=n,a.painterRoot=o,a._pointerSize=i,r=r||new Lh,a.proxy=null,a.setHandlerProxy(r),a._draggingMgr=new Fd(a),a}return xd(t,e),t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(Ru(Eh,(function(t){e.on&&e.on(t,this[t],this)}),this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=Fh(this,t,n),o=this._hovered,i=o.target;i&&!i.__zr&&(i=(o=this.findHover(o.x,o.y)).target);var a=this._hovered=r?new Rh(t,n):this.findHover(t,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),i&&s!==i&&this.dispatchToElement(o,"mouseout",e),this.dispatchToElement(a,"mousemove",e),s&&s!==i&&this.dispatchToElement(a,"mouseover",e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;"only_globalout"!==t&&this.dispatchToElement(this._hovered,"mouseout",e),"no_globalout"!==t&&this.trigger("globalout",{type:"globalout",event:e})},t.prototype.resize=function(){this._hovered=new Rh(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){var r=(e=e||{}).target;if(!r||!r.silent){for(var o="on"+t,i=function(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:Ph}}(t,e,n);r&&(r[o]&&(i.cancelBubble=!!r[o].call(r,i)),r.trigger(t,i),r=r.__hostTarget?r.__hostTarget:r.parent,!i.cancelBubble););i.cancelBubble||(this.trigger(t,i),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer((function(e){"function"===typeof e[o]&&e[o].call(e,i),e.trigger&&e.trigger(t,i)})))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),o=new Rh(e,t);if(Bh(r,o,e,t,n),this._pointerSize&&!o.target){for(var i=[],a=this._pointerSize,s=a/2,l=new Dh(e-s,t-s,a,a),c=r.length-1;c>=0;c--){var u=r[c];u===n||u.ignore||u.ignoreCoarsePointer||u.parent&&u.parent.ignoreCoarsePointer||(Nh.copy(u.getBoundingRect()),u.transform&&Nh.applyTransform(u.transform),Nh.intersect(l)&&i.push(u))}if(i.length)for(var d=Math.PI/12,h=2*Math.PI,p=0;p<s;p+=4)for(var f=0;f<h;f+=d){if(Bh(i,o,e+p*Math.cos(f),t+p*Math.sin(f),n),o.target)return o}}return o},t.prototype.processGesture=function(e,t){this._gestureMgr||(this._gestureMgr=new ch);var n=this._gestureMgr;"start"===t&&n.clear();var r=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if("end"===t&&n.clear(),r){var o=r.type;e.gestureEvent=o;var i=new Rh;i.target=r.target,this.dispatchToElement(i,o,r.event)}},t}(Wd);function zh(e,t,n){if(e[e.rectHover?"rectContain":"contain"](t,n)){for(var r=e,o=void 0,i=!1;r;){if(r.ignoreClip&&(i=!0),!i){var a=r.getClipPath();if(a&&!a.contain(t,n))return!1}r.silent&&(o=!0);var s=r.__hostTarget;r=s||r.parent}return!o||jh}return!1}function Bh(e,t,n,r,o){for(var i=e.length-1;i>=0;i--){var a=e[i],s=void 0;if(a!==o&&!a.ignore&&(s=zh(a,n,r))&&(!t.topTarget&&(t.topTarget=a),s!==jh)){t.target=a;break}}}function Fh(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}Ru(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(e){Oh.prototype[e]=function(t){var n,r,o=t.zrX,i=t.zrY,a=Fh(this,o,i);if("mouseup"===e&&a||(r=(n=this.findHover(o,i)).target),"mousedown"===e)this._downEl=r,this._downPoint=[t.zrX,t.zrY],this._upEl=r;else if("mouseup"===e)this._upEl=r;else if("click"===e){if(this._downEl!==this._upEl||!this._downPoint||Pd(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,e,t)}}));const Vh=Oh;var Wh=32,Hh=7;function Gh(e,t,n,r){var o=t+1;if(o===n)return 1;if(r(e[o++],e[t])<0){for(;o<n&&r(e[o],e[o-1])<0;)o++;!function(e,t,n){n--;for(;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}(e,t,o)}else for(;o<n&&r(e[o],e[o-1])>=0;)o++;return o-t}function Uh(e,t,n,r,o){for(r===t&&r++;r<n;r++){for(var i,a=e[r],s=t,l=r;s<l;)o(a,e[i=s+l>>>1])<0?l=i:s=i+1;var c=r-s;switch(c){case 3:e[s+3]=e[s+2];case 2:e[s+2]=e[s+1];case 1:e[s+1]=e[s];break;default:for(;c>0;)e[s+c]=e[s+c-1],c--}e[s]=a}}function Xh(e,t,n,r,o,i){var a=0,s=0,l=1;if(i(e,t[n+o])>0){for(s=r-o;l<s&&i(e,t[n+o+l])>0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=o,l+=o}else{for(s=o+1;l<s&&i(e,t[n+o-l])<=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var c=a;a=o-l,l=o-c}for(a++;a<l;){var u=a+(l-a>>>1);i(e,t[n+u])>0?a=u+1:l=u}return l}function Yh(e,t,n,r,o,i){var a=0,s=0,l=1;if(i(e,t[n+o])<0){for(s=o+1;l<s&&i(e,t[n+o-l])<0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var c=a;a=o-l,l=o-c}else{for(s=r-o;l<s&&i(e,t[n+o+l])>=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=o,l+=o}for(a++;a<l;){var u=a+(l-a>>>1);i(e,t[n+u])<0?l=u:a=u+1}return l}function qh(e,t){var n,r,o=Hh,i=0,a=[];function s(s){var l=n[s],c=r[s],u=n[s+1],d=r[s+1];r[s]=c+d,s===i-3&&(n[s+1]=n[s+2],r[s+1]=r[s+2]),i--;var h=Yh(e[u],e,l,c,0,t);l+=h,0!==(c-=h)&&0!==(d=Xh(e[l+c-1],e,u,d,d-1,t))&&(c<=d?function(n,r,i,s){var l=0;for(l=0;l<r;l++)a[l]=e[n+l];var c=0,u=i,d=n;if(e[d++]=e[u++],0===--s){for(l=0;l<r;l++)e[d+l]=a[c+l];return}if(1===r){for(l=0;l<s;l++)e[d+l]=e[u+l];return void(e[d+s]=a[c])}var h,p,f,g=o;for(;;){h=0,p=0,f=!1;do{if(t(e[u],a[c])<0){if(e[d++]=e[u++],p++,h=0,0===--s){f=!0;break}}else if(e[d++]=a[c++],h++,p=0,1===--r){f=!0;break}}while((h|p)<g);if(f)break;do{if(0!==(h=Yh(e[u],a,c,r,0,t))){for(l=0;l<h;l++)e[d+l]=a[c+l];if(d+=h,c+=h,(r-=h)<=1){f=!0;break}}if(e[d++]=e[u++],0===--s){f=!0;break}if(0!==(p=Xh(a[c],e,u,s,0,t))){for(l=0;l<p;l++)e[d+l]=e[u+l];if(d+=p,u+=p,0===(s-=p)){f=!0;break}}if(e[d++]=a[c++],1===--r){f=!0;break}g--}while(h>=Hh||p>=Hh);if(f)break;g<0&&(g=0),g+=2}if((o=g)<1&&(o=1),1===r){for(l=0;l<s;l++)e[d+l]=e[u+l];e[d+s]=a[c]}else{if(0===r)throw new Error;for(l=0;l<r;l++)e[d+l]=a[c+l]}}(l,c,u,d):function(n,r,i,s){var l=0;for(l=0;l<s;l++)a[l]=e[i+l];var c=n+r-1,u=s-1,d=i+s-1,h=0,p=0;if(e[d--]=e[c--],0===--r){for(h=d-(s-1),l=0;l<s;l++)e[h+l]=a[l];return}if(1===s){for(p=(d-=r)+1,h=(c-=r)+1,l=r-1;l>=0;l--)e[p+l]=e[h+l];return void(e[d]=a[u])}var f=o;for(;;){var g=0,m=0,v=!1;do{if(t(a[u],e[c])<0){if(e[d--]=e[c--],g++,m=0,0===--r){v=!0;break}}else if(e[d--]=a[u--],m++,g=0,1===--s){v=!0;break}}while((g|m)<f);if(v)break;do{if(0!==(g=r-Yh(a[u],e,n,r,r-1,t))){for(r-=g,p=(d-=g)+1,h=(c-=g)+1,l=g-1;l>=0;l--)e[p+l]=e[h+l];if(0===r){v=!0;break}}if(e[d--]=a[u--],1===--s){v=!0;break}if(0!==(m=s-Xh(e[c],a,0,s,s-1,t))){for(s-=m,p=(d-=m)+1,h=(u-=m)+1,l=0;l<m;l++)e[p+l]=a[h+l];if(s<=1){v=!0;break}}if(e[d--]=e[c--],0===--r){v=!0;break}f--}while(g>=Hh||m>=Hh);if(v)break;f<0&&(f=0),f+=2}(o=f)<1&&(o=1);if(1===s){for(p=(d-=r)+1,h=(c-=r)+1,l=r-1;l>=0;l--)e[p+l]=e[h+l];e[d]=a[u]}else{if(0===s)throw new Error;for(h=d-(s-1),l=0;l<s;l++)e[h+l]=a[l]}}(l,c,u,d))}return n=[],r=[],{mergeRuns:function(){for(;i>1;){var e=i-2;if(e>=1&&r[e-1]<=r[e]+r[e+1]||e>=2&&r[e-2]<=r[e]+r[e-1])r[e-1]<r[e+1]&&e--;else if(r[e]>r[e+1])break;s(e)}},forceMergeRuns:function(){for(;i>1;){var e=i-2;e>0&&r[e-1]<r[e+1]&&e--,s(e)}},pushRun:function(e,t){n[i]=e,r[i]=t,i+=1}}}function Zh(e,t,n,r){n||(n=0),r||(r=e.length);var o=r-n;if(!(o<2)){var i=0;if(o<Wh)Uh(e,n,r,n+(i=Gh(e,n,r,t)),t);else{var a=qh(e,t),s=function(e){for(var t=0;e>=Wh;)t|=1&e,e>>=1;return e+t}(o);do{if((i=Gh(e,n,r,t))<s){var l=o;l>s&&(l=s),Uh(e,n,n+l,n+i,t),i=l}a.pushRun(n,i),a.mergeRuns(),o-=i,n+=i}while(0!==o);a.forceMergeRuns()}}}var Kh=1,$h=4,Qh=!1;function Jh(){Qh||(Qh=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function ep(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var tp=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=ep}return e.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},e.prototype.getDisplayList=function(e,t){t=t||!1;var n=this._displayList;return!e&&n.length||this.updateDisplayList(t),n},e.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,r=0,o=t.length;r<o;r++)this._updateAndAddDisplayable(t[r],null,e);n.length=this._displayListLen,Zh(n,ep)},e.prototype._updateAndAddDisplayable=function(e,t,n){if(!e.ignore||n){e.beforeUpdate(),e.update(),e.afterUpdate();var r=e.getClipPath();if(e.ignoreClip)t=null;else if(r){t=t?t.slice():[];for(var o=r,i=e;o;)o.parent=i,o.updateTransform(),t.push(o),i=o,o=o.getClipPath()}if(e.childrenRef){for(var a=e.childrenRef(),s=0;s<a.length;s++){var l=a[s];e.__dirty&&(l.__dirty|=Kh),this._updateAndAddDisplayable(l,t,n)}e.__dirty=0}else{var c=e;t&&t.length?c.__clipPaths=t:c.__clipPaths&&c.__clipPaths.length>0&&(c.__clipPaths=[]),isNaN(c.z)&&(Jh(),c.z=0),isNaN(c.z2)&&(Jh(),c.z2=0),isNaN(c.zlevel)&&(Jh(),c.zlevel=0),this._displayList[this._displayListLen++]=c}var u=e.getDecalElement&&e.getDecalElement();u&&this._updateAndAddDisplayable(u,t,n);var d=e.getTextGuideLine();d&&this._updateAndAddDisplayable(d,t,n);var h=e.getTextContent();h&&this._updateAndAddDisplayable(h,t,n)}},e.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},e.prototype.delRoot=function(e){if(e instanceof Array)for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);else{var r=ju(this._roots,e);r>=0&&this._roots.splice(r,1)}},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}();const np=tp;const rp=au.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};var op={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return.5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return 0===e?0:Math.pow(1024,e-1)},exponentialOut:function(e){return 1===e?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4))},elasticOut:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/.4)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*-.5:n*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-op.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?.5*op.bounceIn(2*e):.5*op.bounceOut(2*e-1)+.5}};const ip=op;var ap=Math.pow,sp=Math.sqrt,lp=1e-8,cp=1e-4,up=sp(3),dp=1/3,hp=bd(),pp=bd(),fp=bd();function gp(e){return e>-lp&&e<lp}function mp(e){return e>lp||e<-lp}function vp(e,t,n,r,o){var i=1-o;return i*i*(i*e+3*o*t)+o*o*(o*r+3*i*n)}function yp(e,t,n,r,o){var i=1-o;return 3*(((t-e)*i+2*(n-t)*o)*i+(r-n)*o*o)}function xp(e,t,n,r,o,i){var a=r+3*(t-n)-e,s=3*(n-2*t+e),l=3*(t-e),c=e-o,u=s*s-3*a*l,d=s*l-9*a*c,h=l*l-3*s*c,p=0;if(gp(u)&&gp(d)){if(gp(s))i[0]=0;else(A=-l/s)>=0&&A<=1&&(i[p++]=A)}else{var f=d*d-4*u*h;if(gp(f)){var g=d/u,m=-g/2;(A=-s/a+g)>=0&&A<=1&&(i[p++]=A),m>=0&&m<=1&&(i[p++]=m)}else if(f>0){var v=sp(f),y=u*s+1.5*a*(-d+v),x=u*s+1.5*a*(-d-v);(A=(-s-((y=y<0?-ap(-y,dp):ap(y,dp))+(x=x<0?-ap(-x,dp):ap(x,dp))))/(3*a))>=0&&A<=1&&(i[p++]=A)}else{var b=(2*u*s-3*a*d)/(2*sp(u*u*u)),w=Math.acos(b)/3,S=sp(u),_=Math.cos(w),A=(-s-2*S*_)/(3*a),k=(m=(-s+S*(_+up*Math.sin(w)))/(3*a),(-s+S*(_-up*Math.sin(w)))/(3*a));A>=0&&A<=1&&(i[p++]=A),m>=0&&m<=1&&(i[p++]=m),k>=0&&k<=1&&(i[p++]=k)}}return p}function bp(e,t,n,r,o){var i=6*n-12*t+6*e,a=9*t+3*r-3*e-9*n,s=3*t-3*e,l=0;if(gp(a)){if(mp(i))(u=-s/i)>=0&&u<=1&&(o[l++]=u)}else{var c=i*i-4*a*s;if(gp(c))o[0]=-i/(2*a);else if(c>0){var u,d=sp(c),h=(-i-d)/(2*a);(u=(-i+d)/(2*a))>=0&&u<=1&&(o[l++]=u),h>=0&&h<=1&&(o[l++]=h)}}return l}function wp(e,t,n,r,o,i){var a=(t-e)*o+e,s=(n-t)*o+t,l=(r-n)*o+n,c=(s-a)*o+a,u=(l-s)*o+s,d=(u-c)*o+c;i[0]=e,i[1]=a,i[2]=c,i[3]=d,i[4]=d,i[5]=u,i[6]=l,i[7]=r}function Sp(e,t,n,r,o,i,a,s,l,c,u){var d,h,p,f,g,m=.005,v=1/0;hp[0]=l,hp[1]=c;for(var y=0;y<1;y+=.05)pp[0]=vp(e,n,o,a,y),pp[1]=vp(t,r,i,s,y),(f=Ld(hp,pp))<v&&(d=y,v=f);v=1/0;for(var x=0;x<32&&!(m<cp);x++)h=d-m,p=d+m,pp[0]=vp(e,n,o,a,h),pp[1]=vp(t,r,i,s,h),f=Ld(pp,hp),h>=0&&f<v?(d=h,v=f):(fp[0]=vp(e,n,o,a,p),fp[1]=vp(t,r,i,s,p),g=Ld(fp,hp),p<=1&&g<v?(d=p,v=g):m*=.5);return u&&(u[0]=vp(e,n,o,a,d),u[1]=vp(t,r,i,s,d)),sp(v)}function _p(e,t,n,r,o,i,a,s,l){for(var c=e,u=t,d=0,h=1/l,p=1;p<=l;p++){var f=p*h,g=vp(e,n,o,a,f),m=vp(t,r,i,s,f),v=g-c,y=m-u;d+=Math.sqrt(v*v+y*y),c=g,u=m}return d}function Ap(e,t,n,r){var o=1-r;return o*(o*e+2*r*t)+r*r*n}function kp(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function Cp(e,t,n){var r=e+n-2*t;return 0===r?.5:(e-t)/r}function Mp(e,t,n,r,o){var i=(t-e)*r+e,a=(n-t)*r+t,s=(a-i)*r+i;o[0]=e,o[1]=i,o[2]=s,o[3]=s,o[4]=a,o[5]=n}function Ip(e,t,n,r,o,i,a,s,l){var c,u=.005,d=1/0;hp[0]=a,hp[1]=s;for(var h=0;h<1;h+=.05){pp[0]=Ap(e,n,o,h),pp[1]=Ap(t,r,i,h),(m=Ld(hp,pp))<d&&(c=h,d=m)}d=1/0;for(var p=0;p<32&&!(u<cp);p++){var f=c-u,g=c+u;pp[0]=Ap(e,n,o,f),pp[1]=Ap(t,r,i,f);var m=Ld(pp,hp);if(f>=0&&m<d)c=f,d=m;else{fp[0]=Ap(e,n,o,g),fp[1]=Ap(t,r,i,g);var v=Ld(fp,hp);g<=1&&v<d?(c=g,d=v):u*=.5}}return l&&(l[0]=Ap(e,n,o,c),l[1]=Ap(t,r,i,c)),sp(d)}function Tp(e,t,n,r,o,i,a){for(var s=e,l=t,c=0,u=1/a,d=1;d<=a;d++){var h=d*u,p=Ap(e,n,o,h),f=Ap(t,r,i,h),g=p-s,m=f-l;c+=Math.sqrt(g*g+m*m),s=p,l=f}return c}var Dp=/cubic-bezier\(([0-9,\.e ]+)\)/;function jp(e){var t=e&&Dp.exec(e);if(t){var n=t[1].split(","),r=+od(n[0]),o=+od(n[1]),i=+od(n[2]),a=+od(n[3]);if(isNaN(r+o+i+a))return;var s=[];return function(e){return e<=0?0:e>=1?1:xp(0,r,i,1,e,s)&&vp(0,o,a,1,s[0])}}}const Pp=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||md,this.ondestroy=e.ondestroy||md,this.onrestart=e.onrestart||md,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),!this._paused){var n=this._life,r=e-this._startTime-this._pausedTime,o=r/n;o<0&&(o=0),o=Math.min(o,1);var i=this.easingFunc,a=i?i(o):o;if(this.onframe(a),1===o){if(!this.loop)return!0;var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=t},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=Wu(e)?e:ip[e]||jp(e)},e}();var Lp=function(e){this.value=e},Rp=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new Lp(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),Ep=function(){function e(e){this._list=new Rp,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,o=null;if(null==r[e]){var i=n.len(),a=this._lastRemovedEntry;if(i>=this._maxSize&&i>0){var s=n.head;n.remove(s),delete r[s.key],o=s.value,this._lastRemovedEntry=s}a?a.value=t:a=new Lp(t),a.key=e,n.insertEntry(a),r[e]=a}return o},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(null!=t)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}();const Np=Ep;var Op={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 zp(e){return(e=Math.round(e))<0?0:e>255?255:e}function Bp(e){return e<0?0:e>1?1:e}function Fp(e){var t=e;return t.length&&"%"===t.charAt(t.length-1)?zp(parseFloat(t)/100*255):zp(parseInt(t,10))}function Vp(e){var t=e;return t.length&&"%"===t.charAt(t.length-1)?Bp(parseFloat(t)/100):Bp(parseFloat(t))}function Wp(e,t,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function Hp(e,t,n){return e+(t-e)*n}function Gp(e,t,n,r,o){return e[0]=t,e[1]=n,e[2]=r,e[3]=o,e}function Up(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Xp=new Np(20),Yp=null;function qp(e,t){Yp&&Up(Yp,t),Yp=Xp.put(e,Yp||t.slice())}function Zp(e,t){if(e){t=t||[];var n=Xp.get(e);if(n)return Up(t,n);var r=(e+="").replace(/ /g,"").toLowerCase();if(r in Op)return Up(t,Op[r]),qp(e,t),t;var o,i=r.length;if("#"===r.charAt(0))return 4===i||5===i?(o=parseInt(r.slice(1,4),16))>=0&&o<=4095?(Gp(t,(3840&o)>>4|(3840&o)>>8,240&o|(240&o)>>4,15&o|(15&o)<<4,5===i?parseInt(r.slice(4),16)/15:1),qp(e,t),t):void Gp(t,0,0,0,1):7===i||9===i?(o=parseInt(r.slice(1,7),16))>=0&&o<=16777215?(Gp(t,(16711680&o)>>16,(65280&o)>>8,255&o,9===i?parseInt(r.slice(7),16)/255:1),qp(e,t),t):void Gp(t,0,0,0,1):void 0;var a=r.indexOf("("),s=r.indexOf(")");if(-1!==a&&s+1===i){var l=r.substr(0,a),c=r.substr(a+1,s-(a+1)).split(","),u=1;switch(l){case"rgba":if(4!==c.length)return 3===c.length?Gp(t,+c[0],+c[1],+c[2],1):Gp(t,0,0,0,1);u=Vp(c.pop());case"rgb":return c.length>=3?(Gp(t,Fp(c[0]),Fp(c[1]),Fp(c[2]),3===c.length?u:Vp(c[3])),qp(e,t),t):void Gp(t,0,0,0,1);case"hsla":return 4!==c.length?void Gp(t,0,0,0,1):(c[3]=Vp(c[3]),Kp(c,t),qp(e,t),t);case"hsl":return 3!==c.length?void Gp(t,0,0,0,1):(Kp(c,t),qp(e,t),t);default:return}}Gp(t,0,0,0,1)}}function Kp(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=Vp(e[1]),o=Vp(e[2]),i=o<=.5?o*(r+1):o+r-o*r,a=2*o-i;return Gp(t=t||[],zp(255*Wp(a,i,n+1/3)),zp(255*Wp(a,i,n)),zp(255*Wp(a,i,n-1/3)),1),4===e.length&&(t[3]=e[3]),t}function $p(e,t){var n=Zp(e);if(n){for(var r=0;r<3;r++)n[r]=t<0?n[r]*(1-t)|0:(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return nf(n,4===n.length?"rgba":"rgb")}}function Qp(e,t,n){if(t&&t.length&&e>=0&&e<=1){n=n||[];var r=e*(t.length-1),o=Math.floor(r),i=Math.ceil(r),a=t[o],s=t[i],l=r-o;return n[0]=zp(Hp(a[0],s[0],l)),n[1]=zp(Hp(a[1],s[1],l)),n[2]=zp(Hp(a[2],s[2],l)),n[3]=Bp(Hp(a[3],s[3],l)),n}}function Jp(e,t,n){if(t&&t.length&&e>=0&&e<=1){var r=e*(t.length-1),o=Math.floor(r),i=Math.ceil(r),a=Zp(t[o]),s=Zp(t[i]),l=r-o,c=nf([zp(Hp(a[0],s[0],l)),zp(Hp(a[1],s[1],l)),zp(Hp(a[2],s[2],l)),Bp(Hp(a[3],s[3],l))],"rgba");return n?{color:c,leftIndex:o,rightIndex:i,value:r}:c}}function ef(e,t,n,r){var o=Zp(e);if(e)return o=function(e){if(e){var t,n,r=e[0]/255,o=e[1]/255,i=e[2]/255,a=Math.min(r,o,i),s=Math.max(r,o,i),l=s-a,c=(s+a)/2;if(0===l)t=0,n=0;else{n=c<.5?l/(s+a):l/(2-s-a);var u=((s-r)/6+l/2)/l,d=((s-o)/6+l/2)/l,h=((s-i)/6+l/2)/l;r===s?t=h-d:o===s?t=1/3+u-h:i===s&&(t=2/3+d-u),t<0&&(t+=1),t>1&&(t-=1)}var p=[360*t,n,c];return null!=e[3]&&p.push(e[3]),p}}(o),null!=t&&(o[0]=function(e){return(e=Math.round(e))<0?0:e>360?360:e}(t)),null!=n&&(o[1]=Vp(n)),null!=r&&(o[2]=Vp(r)),nf(Kp(o),"rgba")}function tf(e,t){var n=Zp(e);if(n&&null!=t)return n[3]=Bp(t),nf(n,"rgba")}function nf(e,t){if(e&&e.length){var n=e[0]+","+e[1]+","+e[2];return"rgba"!==t&&"hsva"!==t&&"hsla"!==t||(n+=","+e[3]),t+"("+n+")"}}function rf(e,t){var n=Zp(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var of=new Np(100);function af(e){if(Hu(e)){var t=of.get(e);return t||(t=$p(e,-.1),of.put(e,t)),t}if(Ku(e)){var n=Tu({},e);return n.colorStops=Eu(e.colorStops,(function(e){return{offset:e.offset,color:$p(e.color,-.1)}})),n}return e}var sf=Math.round;function lf(e){var t;if(e&&"transparent"!==e){if("string"===typeof e&&e.indexOf("rgba")>-1){var n=Zp(e);n&&(e="rgb("+n[0]+","+n[1]+","+n[2]+")",t=n[3])}}else e="none";return{color:e,opacity:null==t?1:t}}var cf=1e-4;function uf(e){return e<cf&&e>-cf}function df(e){return sf(1e3*e)/1e3}function hf(e){return sf(1e4*e)/1e4}var pf={left:"start",right:"end",center:"middle",middle:"middle"};function ff(e){return e&&!!e.image}function gf(e){return ff(e)||function(e){return e&&!!e.svgElement}(e)}function mf(e){return"linear"===e.type}function vf(e){return"radial"===e.type}function yf(e){return e&&("linear"===e.type||"radial"===e.type)}function xf(e){return"url(#"+e+")"}function bf(e){var t=e.getGlobalScale(),n=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function wf(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*vd,o=Ju(e.scaleX,1),i=Ju(e.scaleY,1),a=e.skewX||0,s=e.skewY||0,l=[];return(t||n)&&l.push("translate("+t+"px,"+n+"px)"),r&&l.push("rotate("+r+")"),1===o&&1===i||l.push("scale("+o+","+i+")"),(a||s)&&l.push("skew("+sf(a*vd)+"deg, "+sf(s*vd)+"deg)"),l.join(" ")}var Sf=au.hasGlobalWindow&&Wu(window.btoa)?function(e){return window.btoa(unescape(encodeURIComponent(e)))}:"undefined"!==typeof Buffer?function(e){return Buffer.from(e).toString("base64")}:function(e){return null},_f=Array.prototype.slice;function Af(e,t,n){return(t-e)*n+e}function kf(e,t,n,r){for(var o=t.length,i=0;i<o;i++)e[i]=Af(t[i],n[i],r);return e}function Cf(e,t,n,r){for(var o=t.length,i=0;i<o;i++)e[i]=t[i]+n[i]*r;return e}function Mf(e,t,n,r){for(var o=t.length,i=o&&t[0].length,a=0;a<o;a++){e[a]||(e[a]=[]);for(var s=0;s<i;s++)e[a][s]=t[a][s]+n[a][s]*r}return e}function If(e,t){for(var n=e.length,r=t.length,o=n>r?t:e,i=Math.min(n,r),a=o[i-1]||{color:[0,0,0,0],offset:0},s=i;s<Math.max(n,r);s++)o.push({offset:a.offset,color:a.color.slice()})}function Tf(e,t,n){var r=e,o=t;if(r.push&&o.push){var i=r.length,a=o.length;if(i!==a)if(i>a)r.length=a;else for(var s=i;s<a;s++)r.push(1===n?o[s]:_f.call(o[s]));var l=r[0]&&r[0].length;for(s=0;s<r.length;s++)if(1===n)isNaN(r[s])&&(r[s]=o[s]);else for(var c=0;c<l;c++)isNaN(r[s][c])&&(r[s][c]=o[s][c])}}function Df(e){if(Lu(e)){var t=e.length;if(Lu(e[0])){for(var n=[],r=0;r<t;r++)n.push(_f.call(e[r]));return n}return _f.call(e)}return e}function jf(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=null==e[3]?1:e[3],"rgba("+e.join(",")+")"}function Pf(e){return 4===e||5===e}function Lf(e){return 1===e||2===e}var Rf=[0,0,0,0],Ef=function(){function e(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return e.prototype.isFinished=function(){return this._finished},e.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},e.prototype.needsAnimate=function(){return this.keyframes.length>=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,o=r.length,i=!1,a=6,s=t;if(Lu(t)){var l=function(e){return Lu(e&&e[0])?2:1}(t);a=l,(1===l&&!Uu(t[0])||2===l&&!Uu(t[0][0]))&&(i=!0)}else if(Uu(t)&&!$u(t))a=0;else if(Hu(t))if(isNaN(+t)){var c=Zp(t);c&&(s=c,a=3)}else a=0;else if(Ku(t)){var u=Tu({},s);u.colorStops=Eu(t.colorStops,(function(e){return{offset:e.offset,color:Zp(e.color)}})),mf(t)?a=4:vf(t)&&(a=5),s=u}0===o?this.valType=a:a===this.valType&&6!==a||(i=!0),this.discrete=this.discrete||i;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=Wu(n)?n:ip[n]||jp(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort((function(e,t){return e.time-t.time}));for(var r=this.valType,o=n.length,i=n[o-1],a=this.discrete,s=Lf(r),l=Pf(r),c=0;c<o;c++){var u=n[c],d=u.value,h=i.value;u.percent=u.time/e,a||(s&&c!==o-1?Tf(d,h,r):l&&If(d.colorStops,h.colorStops))}if(!a&&5!==r&&t&&this.needsAnimate()&&t.needsAnimate()&&r===t.valType&&!t._finished){this._additiveTrack=t;var p=n[0].value;for(c=0;c<o;c++)0===r?n[c].additiveValue=n[c].value-p:3===r?n[c].additiveValue=Cf([],n[c].value,p,-1):Lf(r)&&(n[c].additiveValue=1===r?Cf([],n[c].value,p,-1):Mf([],n[c].value,p,-1))}},e.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n,r,o,i=null!=this._additiveTrack,a=i?"additiveValue":"value",s=this.valType,l=this.keyframes,c=l.length,u=this.propName,d=3===s,h=this._lastFr,p=Math.min;if(1===c)r=o=l[0];else{if(t<0)n=0;else if(t<this._lastFrP){for(n=p(h+1,c-1);n>=0&&!(l[n].percent<=t);n--);n=p(n,c-2)}else{for(n=h;n<c&&!(l[n].percent>t);n++);n=p(n-1,c-2)}o=l[n+1],r=l[n]}if(r&&o){this._lastFr=n,this._lastFrP=t;var f=o.percent-r.percent,g=0===f?1:p((t-r.percent)/f,1);o.easingFunc&&(g=o.easingFunc(g));var m=i?this._additiveValue:d?Rf:e[u];if(!Lf(s)&&!d||m||(m=this._additiveValue=[]),this.discrete)e[u]=g<1?r.rawValue:o.rawValue;else if(Lf(s))1===s?kf(m,r[a],o[a],g):function(e,t,n,r){for(var o=t.length,i=o&&t[0].length,a=0;a<o;a++){e[a]||(e[a]=[]);for(var s=0;s<i;s++)e[a][s]=Af(t[a][s],n[a][s],r)}}(m,r[a],o[a],g);else if(Pf(s)){var v=r[a],y=o[a],x=4===s;e[u]={type:x?"linear":"radial",x:Af(v.x,y.x,g),y:Af(v.y,y.y,g),colorStops:Eu(v.colorStops,(function(e,t){var n=y.colorStops[t];return{offset:Af(e.offset,n.offset,g),color:jf(kf([],e.color,n.color,g))}})),global:y.global},x?(e[u].x2=Af(v.x2,y.x2,g),e[u].y2=Af(v.y2,y.y2,g)):e[u].r=Af(v.r,y.r,g)}else if(d)kf(m,r[a],o[a],g),i||(e[u]=jf(m));else{var b=Af(r[a],o[a],g);i?this._additiveValue=b:e[u]=b}i&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;0===t?e[n]=e[n]+r:3===t?(Zp(e[n],Rf),Cf(Rf,Rf,r,1),e[n]=jf(Rf)):1===t?Cf(e[n],e[n],r,1):2===t&&Mf(e[n],e[n],r,1)},e}(),Nf=function(){function e(e,t,n,r){this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r?ku("Can' use additive animation on looped animation."):(this._additiveAnimators=r,this._allowDiscrete=n)}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,zu(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var o=this._tracks,i=0;i<n.length;i++){var a=n[i],s=o[a];if(!s){s=o[a]=new Ef(a);var l=void 0,c=this._getAdditiveTrack(a);if(c){var u=c.keyframes,d=u[u.length-1];l=d&&d.value,3===c.valType&&l&&(l=jf(l))}else l=this._target[a];if(null==l)continue;e>0&&s.addKeyframe(0,Df(l),r),this._trackKeys.push(a)}s.addKeyframe(e,Df(t[a]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n<t;n++)e[n].call(this)},e.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var n=0;n<t.length;n++)t[n].call(this)},e.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},e.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var r=0;r<n.length;r++){var o=n[r].getTrack(e);o&&(t=o)}return t},e.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,o=0;o<this._trackKeys.length;o++){var i=this._trackKeys[o],a=this._tracks[i],s=this._getAdditiveTrack(i),l=a.keyframes,c=l.length;if(a.prepare(r,s),a.needsAnimate())if(!this._allowDiscrete&&a.discrete){var u=l[c-1];u&&(t._target[a.propName]=u.rawValue),a.setFinished()}else n.push(a)}if(n.length||this._force){var d=new Pp({life:r,loop:this._loop,delay:this._delay||0,onframe:function(e){t._started=2;var r=t._additiveAnimators;if(r){for(var o=!1,i=0;i<r.length;i++)if(r[i]._clip){o=!0;break}o||(t._additiveAnimators=null)}for(i=0;i<n.length;i++)n[i].step(t._target,e);var a=t._onframeCbs;if(a)for(i=0;i<a.length;i++)a[i](t._target,e)},ondestroy:function(){t._doneCallback()}});this._clip=d,this.animation&&this.animation.addClip(d),e&&d.setEasing(e)}else this._doneCallback();return this}},e.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},e.prototype.delay=function(e){return this._delay=e,this},e.prototype.during=function(e){return e&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(e)),this},e.prototype.done=function(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this},e.prototype.aborted=function(e){return e&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(e)),this},e.prototype.getClip=function(){return this._clip},e.prototype.getTrack=function(e){return this._tracks[e]},e.prototype.getTracks=function(){var e=this;return Eu(this._trackKeys,(function(t){return e._tracks[t]}))},e.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,r=this._trackKeys,o=0;o<e.length;o++){var i=n[e[o]];i&&!i.isFinished()&&(t?i.step(this._target,1):1===this._started&&i.step(this._target,0),i.setFinished())}var a=!0;for(o=0;o<r.length;o++)if(!n[r[o]].isFinished()){a=!1;break}return a&&this._abortedCallback(),a},e.prototype.saveTo=function(e,t,n){if(e){t=t||this._trackKeys;for(var r=0;r<t.length;r++){var o=t[r],i=this._tracks[o];if(i&&!i.isFinished()){var a=i.keyframes,s=a[n?0:a.length-1];s&&(e[o]=Df(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t=t||zu(e);for(var n=0;n<t.length;n++){var r=t[n],o=this._tracks[r];if(o){var i=o.keyframes;if(i.length>1){var a=i.pop();o.addKeyframe(a.time,e[r]),o.prepare(this._maxTime,o.getAdditiveTrack())}}}},e}();const Of=Nf;function zf(){return(new Date).getTime()}var Bf=function(e){function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t=t||{},n.stage=t.stage||{},n}return xd(t,e),t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=zf()-this._pausedTime,n=t-this._time,r=this._head;r;){var o=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=o):r=o}this._time=t,e||(this.trigger("frame",n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0,rp((function t(){e._running&&(rp(t),!e._paused&&e.update())}))},t.prototype.start=function(){this._running||(this._time=zf(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=zf(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=zf()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return null==this._head},t.prototype.animate=function(e,t){t=t||{},this.start();var n=new Of(e,t.loop);return this.addAnimator(n),n},t}(Wd);const Ff=Bf;var Vf=au.domSupported,Wf=function(){var e=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:["touchstart","touchend","touchmove"],pointer:Eu(e,(function(e){var n=e.replace("mouse","pointer");return t.hasOwnProperty(n)?n:e}))}}(),Hf=["mousemove","mouseup"],Gf=["pointermove","pointerup"],Uf=!1;function Xf(e){var t=e.pointerType;return"pen"===t||"touch"===t}function Yf(e){e&&(e.zrByTouch=!0)}function qf(e,t){for(var n=t,r=!1;n&&9!==n.nodeType&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var Zf=function(e,t){this.stopPropagation=md,this.stopImmediatePropagation=md,this.preventDefault=md,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY},Kf={mousedown:function(e){e=ih(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=ih(this.dom,e);var t=this.__mayPointerCapture;!t||e.zrX===t[0]&&e.zrY===t[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",e)},mouseup:function(e){e=ih(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){qf(this,(e=ih(this.dom,e)).toElement||e.relatedTarget)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){Uf=!0,e=ih(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){Uf||(e=ih(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){Yf(e=ih(this.dom,e)),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),Kf.mousemove.call(this,e),Kf.mousedown.call(this,e)},touchmove:function(e){Yf(e=ih(this.dom,e)),this.handler.processGesture(e,"change"),Kf.mousemove.call(this,e)},touchend:function(e){Yf(e=ih(this.dom,e)),this.handler.processGesture(e,"end"),Kf.mouseup.call(this,e),+new Date-+this.__lastTouchMoment<300&&Kf.click.call(this,e)},pointerdown:function(e){Kf.mousedown.call(this,e)},pointermove:function(e){Xf(e)||Kf.mousemove.call(this,e)},pointerup:function(e){Kf.mouseup.call(this,e)},pointerout:function(e){Xf(e)||Kf.mouseout.call(this,e)}};Ru(["click","dblclick","contextmenu"],(function(e){Kf[e]=function(t){t=ih(this.dom,t),this.trigger(e,t)}}));var $f={pointermove:function(e){Xf(e)||$f.mousemove.call(this,e)},pointerup:function(e){$f.mouseup.call(this,e)},mousemove:function(e){this.trigger("mousemove",e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",e),t&&(e.zrEventControl="only_globalout",this.trigger("mouseout",e))}};function Qf(e,t){var n=t.domHandlers;au.pointerEventsSupported?Ru(Wf.pointer,(function(r){eg(t,r,(function(t){n[r].call(e,t)}))})):(au.touchEventsSupported&&Ru(Wf.touch,(function(r){eg(t,r,(function(o){n[r].call(e,o),function(e){e.touching=!0,null!=e.touchTimer&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout((function(){e.touching=!1,e.touchTimer=null}),700)}(t)}))})),Ru(Wf.mouse,(function(r){eg(t,r,(function(o){o=oh(o),t.touching||n[r].call(e,o)}))})))}function Jf(e,t){function n(n){eg(t,n,(function(r){r=oh(r),qf(e,r.target)||(r=function(e,t){return ih(e.dom,new Zf(e,t),!0)}(e,r),t.domHandlers[n].call(e,r))}),{capture:!0})}au.pointerEventsSupported?Ru(Gf,n):au.touchEventsSupported||Ru(Hf,n)}function eg(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,ah(e.domTarget,t,n,r)}function tg(e){var t,n,r,o,i=e.mounted;for(var a in i)i.hasOwnProperty(a)&&(t=e.domTarget,n=a,r=i[a],o=e.listenerOpts[a],t.removeEventListener(n,r,o));e.mounted={}}var ng=function(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t};const rg=function(e){function t(t,n){var r=e.call(this)||this;return r.__pointerCapturing=!1,r.dom=t,r.painterRoot=n,r._localHandlerScope=new ng(t,Kf),Vf&&(r._globalHandlerScope=new ng(document,$f)),Qf(r,r._localHandlerScope),r}return xd(t,e),t.prototype.dispose=function(){tg(this._localHandlerScope),Vf&&tg(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||"default")},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,Vf&&+this.__pointerCapturing^+e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?Jf(this,t):tg(t)}},t}(Wd);var og=1;au.hasGlobalWindow&&(og=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var ig=og,ag="#333",sg="#ccc",lg=hh,cg=5e-5;function ug(e){return e>cg||e<-5e-5}var dg=[],hg=[],pg=[1,0,0,1,0,0],fg=Math.abs,gg=function(){function e(){}return e.prototype.getLocalTransform=function(t){return e.getLocalTransform(this,t)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return ug(this.rotation)||ug(this.x)||ug(this.y)||ug(this.scaleX-1)||ug(this.scaleY-1)||ug(this.skewX)||ug(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;t||e?(n=n||[1,0,0,1,0,0],t?this.getLocalTransform(n):lg(n),e&&(t?fh(n,e,n):ph(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)):n&&(lg(n),this.invTransform=null)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(null!=t&&1!==t){this.getGlobalScale(dg);var n=dg[0]<0?-1:1,r=dg[1]<0?-1:1,o=((dg[0]-n)*t+n)/dg[0]||0,i=((dg[1]-r)*t+r)/dg[1]||0;e[0]*=o,e[1]*=o,e[2]*=i,e[3]*=i}this.invTransform=this.invTransform||[1,0,0,1,0,0],yh(this.invTransform,e)},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),o=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(o),t=Math.sqrt(t),this.skewX=o,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||[1,0,0,1,0,0],fh(hg,e.invTransform,t),t=hg);var n=this.originX,r=this.originY;(n||r)&&(pg[4]=n,pg[5]=r,fh(hg,t,pg),hg[4]-=n,hg[5]-=r,t=hg),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&Ed(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&Ed(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&fg(e[0]-1)>1e-10&&fg(e[3]-1)>1e-10?Math.sqrt(fg(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){vg(this,e)},e.getLocalTransform=function(e,t){t=t||[];var n=e.originX||0,r=e.originY||0,o=e.scaleX,i=e.scaleY,a=e.anchorX,s=e.anchorY,l=e.rotation||0,c=e.x,u=e.y,d=e.skewX?Math.tan(e.skewX):0,h=e.skewY?Math.tan(-e.skewY):0;if(n||r||a||s){var p=n+a,f=r+s;t[4]=-p*o-d*f*i,t[5]=-f*i-h*p*o}else t[4]=t[5]=0;return t[0]=o,t[3]=i,t[1]=h*o,t[2]=d*i,l&&mh(t,t,l),t[4]+=n+c,t[5]+=r+u,t},e.initDefaultProps=function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0}(),e}(),mg=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function vg(e,t){for(var n=0;n<mg.length;n++){var r=mg[n];e[r]=t[r]}}const yg=gg;var xg={};function bg(e,t){var n=xg[t=t||cu];n||(n=xg[t]=new Np(500));var r=n.get(e);return null==r&&(r=du.measureText(e,t).width,n.put(e,r)),r}function wg(e,t,n,r){var o=bg(e,t),i=kg(t),a=_g(0,o,n),s=Ag(0,i,r);return new Dh(a,s,o,i)}function Sg(e,t,n,r){var o=((e||"")+"").split("\n");if(1===o.length)return wg(o[0],t,n,r);for(var i=new Dh(0,0,0,0),a=0;a<o.length;a++){var s=wg(o[a],t,n,r);0===a?i.copy(s):i.union(s)}return i}function _g(e,t,n){return"right"===n?e-=t:"center"===n&&(e-=t/2),e}function Ag(e,t,n){return"middle"===n?e-=t/2:"bottom"===n&&(e-=t),e}function kg(e){return bg("\u56fd",e)}function Cg(e,t){return"string"===typeof e?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function Mg(e,t,n){var r=t.position||"inside",o=null!=t.distance?t.distance:5,i=n.height,a=n.width,s=i/2,l=n.x,c=n.y,u="left",d="top";if(r instanceof Array)l+=Cg(r[0],n.width),c+=Cg(r[1],n.height),u=null,d=null;else switch(r){case"left":l-=o,c+=s,u="right",d="middle";break;case"right":l+=o+a,c+=s,d="middle";break;case"top":l+=a/2,c-=o,u="center",d="bottom";break;case"bottom":l+=a/2,c+=i+o,u="center";break;case"inside":l+=a/2,c+=s,u="center",d="middle";break;case"insideLeft":l+=o,c+=s,d="middle";break;case"insideRight":l+=a-o,c+=s,u="right",d="middle";break;case"insideTop":l+=a/2,c+=o,u="center";break;case"insideBottom":l+=a/2,c+=i-o,u="center",d="bottom";break;case"insideTopLeft":l+=o,c+=o;break;case"insideTopRight":l+=a-o,c+=o,u="right";break;case"insideBottomLeft":l+=o,c+=i-o,d="bottom";break;case"insideBottomRight":l+=a-o,c+=i-o,u="right",d="bottom"}return(e=e||{}).x=l,e.y=c,e.align=u,e.verticalAlign=d,e}var Ig="__zr_normal__",Tg=mg.concat(["ignore"]),Dg=Nu(mg,(function(e,t){return e[t]=!0,e}),{ignore:!1}),jg={},Pg=new Dh(0,0,0,0),Lg=function(){function e(e){this.id=Au(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return e.prototype._init=function(e){this.attr(e)},e.prototype.drift=function(e,t,n){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0}var r=this.transform;r||(r=this.transform=[1,0,0,1,0,0]),r[4]+=e,r[5]+=t,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,r=n.local,o=t.innerTransformable,i=void 0,a=void 0,s=!1;o.parent=r?this:null;var l=!1;if(o.copyTransform(t),null!=n.position){var c=Pg;n.layoutRect?c.copy(n.layoutRect):c.copy(this.getBoundingRect()),r||c.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(jg,n,c):Mg(jg,n,c),o.x=jg.x,o.y=jg.y,i=jg.align,a=jg.verticalAlign;var u=n.origin;if(u&&null!=n.rotation){var d=void 0,h=void 0;"center"===u?(d=.5*c.width,h=.5*c.height):(d=Cg(u[0],c.width),h=Cg(u[1],c.height)),l=!0,o.originX=-o.x+d+(r?0:c.x),o.originY=-o.y+h+(r?0:c.y)}}null!=n.rotation&&(o.rotation=n.rotation);var p=n.offset;p&&(o.x+=p[0],o.y+=p[1],l||(o.originX=-p[0],o.originY=-p[1]));var f=null==n.inside?"string"===typeof n.position&&n.position.indexOf("inside")>=0:n.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),m=void 0,v=void 0,y=void 0;f&&this.canBeInsideText()?(m=n.insideFill,v=n.insideStroke,null!=m&&"auto"!==m||(m=this.getInsideTextFill()),null!=v&&"auto"!==v||(v=this.getInsideTextStroke(m),y=!0)):(m=n.outsideFill,v=n.outsideStroke,null!=m&&"auto"!==m||(m=this.getOutsideFill()),null!=v&&"auto"!==v||(v=this.getOutsideStroke(m),y=!0)),(m=m||"#000")===g.fill&&v===g.stroke&&y===g.autoStroke&&i===g.align&&a===g.verticalAlign||(s=!0,g.fill=m,g.stroke=v,g.autoStroke=y,g.align=i,g.verticalAlign=a,t.setDefaultTextStyle(g)),t.__dirty|=Kh,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return"#fff"},e.prototype.getInsideTextStroke=function(e){return"#000"},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?sg:ag},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n="string"===typeof t&&Zp(t);n||(n=[255,255,255,1]);for(var r=n[3],o=this.__zr.isDarkMode(),i=0;i<3;i++)n[i]=n[i]*r+(o?0:255)*(1-r);return n[3]=1,nf(n,"rgba")},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){"textConfig"===e?this.setTextConfig(t):"textContent"===e?this.setTextContent(t):"clipPath"===e?this.setClipPath(t):"extra"===e?(this.extra=this.extra||{},Tu(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if("string"===typeof e)this.attrKV(e,t);else if(Xu(e))for(var n=zu(e),r=0;r<n.length;r++){var o=n[r];this.attrKV(o,e[o])}return this.markRedraw(),this},e.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,n=0;n<this.animators.length;n++){var r=this.animators[n],o=r.__fromStateTransition;if(!(r.getLoop()||o&&o!==Ig)){var i=r.targetName,a=i?t[i]:t;r.saveTo(a)}}},e.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||(t=this._normalState={}),e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,Tg)},e.prototype._savePrimaryToNormal=function(e,t,n){for(var r=0;r<n.length;r++){var o=n[r];null==e[o]||o in t||(t[o]=this[o])}},e.prototype.hasState=function(){return this.currentStates.length>0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(Ig,!1,e)},e.prototype.useState=function(e,t,n,r){var o=e===Ig;if(this.hasState()||!o){var i=this.currentStates,a=this.stateTransition;if(!(ju(i,e)>=0)||!t&&1!==i.length){var s;if(this.stateProxy&&!o&&(s=this.stateProxy(e)),s||(s=this.states&&this.states[e]),s||o){o||this.saveCurrentToNormalState(s);var l=!!(s&&s.hoverLayer||r);l&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,s,this._normalState,t,!n&&!this.__inHover&&a&&a.duration>0,a);var c=this._textContent,u=this._textGuide;return c&&c.useState(e,t,n,l),u&&u.useState(e,t,n,l),o?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Kh),s}ku("State "+e+" not exists.")}}},e.prototype.useStates=function(e,t,n){if(e.length){var r=[],o=this.currentStates,i=e.length,a=i===o.length;if(a)for(var s=0;s<i;s++)if(e[s]!==o[s]){a=!1;break}if(a)return;for(s=0;s<i;s++){var l=e[s],c=void 0;this.stateProxy&&(c=this.stateProxy(l,e)),c||(c=this.states[l]),c&&r.push(c)}var u=r[i-1],d=!!(u&&u.hoverLayer||n);d&&this._toggleHoverLayerFlag(!0);var h=this._mergeStates(r),p=this.stateTransition;this.saveCurrentToNormalState(h),this._applyStateObj(e.join(","),h,this._normalState,!1,!t&&!this.__inHover&&p&&p.duration>0,p);var f=this._textContent,g=this._textGuide;f&&f.useStates(e,t,d),g&&g.useStates(e,t,d),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!d&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Kh)}else this.clearStates()},e.prototype.isSilent=function(){for(var e=this.silent,t=this.parent;!e&&t;){if(t.silent){e=!0;break}t=t.parent}return e},e.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},e.prototype.removeState=function(e){var t=ju(this.currentStates,e);if(t>=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),o=ju(r,e),i=ju(r,t)>=0;o>=0?i?r.splice(o,1):r[o]=t:n&&!i&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t,n={},r=0;r<e.length;r++){var o=e[r];Tu(n,o),o.textConfig&&Tu(t=t||{},o.textConfig)}return t&&(n.textConfig=t),n},e.prototype._applyStateObj=function(e,t,n,r,o,i){var a=!(t&&r);t&&t.textConfig?(this.textConfig=Tu({},r?this.textConfig:n.textConfig),Tu(this.textConfig,t.textConfig)):a&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},l=!1,c=0;c<Tg.length;c++){var u=Tg[c],d=o&&Dg[u];t&&null!=t[u]?d?(l=!0,s[u]=t[u]):this[u]=t[u]:a&&null!=n[u]&&(d?(l=!0,s[u]=n[u]):this[u]=n[u])}if(!o)for(c=0;c<this.animators.length;c++){var h=this.animators[c],p=h.targetName;h.getLoop()||h.__changeFinalValue(p?(t||n)[p]:t||n)}l&&this._transitionState(e,s,i)},e.prototype._attachComponent=function(e){if((!e.__zr||e.__hostTarget)&&e!==this){var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this}},e.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},e.prototype.getClipPath=function(){return this._clipPath},e.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},e.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},e.prototype.getTextContent=function(){return this._textContent},e.prototype.setTextContent=function(e){var t=this._textContent;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new yg,this._attachComponent(e),this._textContent=e,this.markRedraw())},e.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),Tu(this.textConfig,e),this.markRedraw()},e.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},e.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},e.prototype.getTextGuideLine=function(){return this._textGuide},e.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},e.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},e.prototype.markRedraw=function(){this.__dirty|=Kh;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},e.prototype.dirty=function(){this.markRedraw()},e.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var t=this._textContent,n=this._textGuide;t&&(t.__inHover=e),n&&(n.__inHover=e)},e.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},e.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},e.prototype.animate=function(e,t,n){var r=e?this[e]:this;var o=new Of(r,t,n);return e&&(o.targetName=e),this.addAnimator(o,e),o},e.prototype.addAnimator=function(e,t){var n=this.__zr,r=this;e.during((function(){r.updateDuringAnimation(t)})).done((function(){var t=r.animators,n=ju(t,e);n>=0&&t.splice(n,1)})),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,o=[],i=0;i<r;i++){var a=n[i];e&&e!==a.scope?o.push(a):a.stop(t)}return this.animators=o,this},e.prototype.animateTo=function(e,t,n){Rg(this,e,t,n)},e.prototype.animateFrom=function(e,t,n){Rg(this,e,t,n,!0)},e.prototype._transitionState=function(e,t,n,r){for(var o=Rg(this,t,n,r),i=0;i<o.length;i++)o[i].__fromStateTransition=e},e.prototype.getBoundingRect=function(){return null},e.prototype.getPaintRect=function(){return null},e.initDefaultProps=function(){var t=e.prototype;t.type="element",t.name="",t.ignore=t.silent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=t.__inHover=!1,t.__dirty=Kh;function n(e,n,r,o){function i(e,t){Object.defineProperty(t,0,{get:function(){return e[r]},set:function(t){e[r]=t}}),Object.defineProperty(t,1,{get:function(){return e[o]},set:function(t){e[o]=t}})}Object.defineProperty(t,e,{get:function(){this[n]||i(this,this[n]=[]);return this[n]},set:function(e){this[r]=e[0],this[o]=e[1],this[n]=e,i(this,e)}})}Object.defineProperty&&(n("position","_legacyPos","x","y"),n("scale","_legacyScale","scaleX","scaleY"),n("origin","_legacyOrigin","originX","originY"))}(),e}();function Rg(e,t,n,r,o){var i=[];Og(e,"",e,t,n=n||{},r,i,o);var a=i.length,s=!1,l=n.done,c=n.aborted,u=function(){s=!0,--a<=0&&(s?l&&l():c&&c())},d=function(){--a<=0&&(s?l&&l():c&&c())};a||l&&l(),i.length>0&&n.during&&i[0].during((function(e,t){n.during(t)}));for(var h=0;h<i.length;h++){var p=i[h];u&&p.done(u),d&&p.aborted(d),n.force&&p.duration(n.duration),p.start(n.easing)}return i}function Eg(e,t,n){for(var r=0;r<n;r++)e[r]=t[r]}function Ng(e,t,n){if(Lu(t[n]))if(Lu(e[n])||(e[n]=[]),qu(t[n])){var r=t[n].length;e[n].length!==r&&(e[n]=new t[n].constructor(r),Eg(e[n],t[n],r))}else{var o=t[n],i=e[n],a=o.length;if(Lu(o[0]))for(var s=o[0].length,l=0;l<a;l++)i[l]?Eg(i[l],o[l],s):i[l]=Array.prototype.slice.call(o[l]);else Eg(i,o,a);i.length=o.length}else e[n]=t[n]}function Og(e,t,n,r,o,i,a,s){for(var l=zu(r),c=o.duration,u=o.delay,d=o.additive,h=o.setToFinal,p=!Xu(i),f=e.animators,g=[],m=0;m<l.length;m++){var v=l[m],y=r[v];if(null!=y&&null!=n[v]&&(p||i[v]))if(!Xu(y)||Lu(y)||Ku(y))g.push(v);else{if(t){s||(n[v]=y,e.updateDuringAnimation(t));continue}Og(e,v,n[v],y,o,i&&i[v],a,s)}else s||(n[v]=y,e.updateDuringAnimation(t),g.push(v))}var x=g.length;if(!d&&x)for(var b=0;b<f.length;b++){if((S=f[b]).targetName===t)if(S.stopTracks(g)){var w=ju(f,S);f.splice(w,1)}}if(o.force||(g=Ou(g,(function(e){return t=r[e],o=n[e],!(t===o||Lu(t)&&Lu(o)&&function(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}(t,o));var t,o})),x=g.length),x>0||o.force&&!a.length){var S,_=void 0,A=void 0,k=void 0;if(s){A={},h&&(_={});for(b=0;b<x;b++){A[v=g[b]]=n[v],h?_[v]=r[v]:n[v]=r[v]}}else if(h){k={};for(b=0;b<x;b++){k[v=g[b]]=Df(n[v]),Ng(n,r,v)}}(S=new Of(n,!1,!1,d?Ou(f,(function(e){return e.targetName===t})):null)).targetName=t,o.scope&&(S.scope=o.scope),h&&_&&S.whenWithKeys(0,_,g),k&&S.whenWithKeys(0,k,g),S.whenWithKeys(null==c?500:c,s?A:r,g).delay(u||0),e.addAnimator(S,t),a.push(S)}}Pu(Lg,Wd),Pu(Lg,yg);const zg=Lg;var Bg=function(e){function t(t){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return xd(t,e),t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var t=this._children,n=0;n<t.length;n++)if(t[n].name===e)return t[n]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(e){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),this},t.prototype.addBefore=function(e,t){if(e&&e!==this&&e.parent!==this&&t&&t.parent===this){var n=this._children,r=n.indexOf(t);r>=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=ju(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var o=this.__zr;o&&r.removeSelfFromZr(o),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=ju(n,e);return r<0||(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh()),this},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;n<e.length;n++){var r=e[n];t&&r.removeSelfFromZr(t),r.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,t){for(var n=this._children,r=0;r<n.length;r++){var o=n[r];e.call(t,o,r)}return this},t.prototype.traverse=function(e,t){for(var n=0;n<this._children.length;n++){var r=this._children[n],o=e.call(t,r);r.isGroup&&!o&&r.traverse(e,t)}return this},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++){this._children[n].addSelfToZr(t)}},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++){this._children[n].removeSelfFromZr(t)}},t.prototype.getBoundingRect=function(e){for(var t=new Dh(0,0,0,0),n=e||this._children,r=[],o=null,i=0;i<n.length;i++){var a=n[i];if(!a.ignore&&!a.invisible){var s=a.getBoundingRect(),l=a.getLocalTransform(r);l?(Dh.applyTransform(t,s,l),(o=o||t.clone()).union(t)):(o=o||s.clone()).union(s)}}return o||t},t}(zg);Bg.prototype.type="group";const Fg=Bg;var Vg={},Wg={};var Hg,Gg=function(){function e(e,t,n){var r=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=t,this.id=e;var o=new np,i=n.renderer||"canvas";Vg[i]||(i=zu(Vg)[0]),n.useDirtyRect=null!=n.useDirtyRect&&n.useDirtyRect;var a=new Vg[i](t,o,n,e),s=n.ssr||a.ssrOnly;this.storage=o,this.painter=a;var l,c=au.node||au.worker||s?null:new rg(a.getViewportRoot(),a.root),u=n.useCoarsePointer;(null==u||"auto"===u?au.touchEventsSupported:!!u)&&(l=Ju(n.pointerSize,44)),this.handler=new Vh(o,a,c,a.root,l),this.animation=new Ff({stage:{update:s?null:function(){return r._flush(!0)}}}),s||this.animation.start()}return e.prototype.add=function(e){!this._disposed&&e&&(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},e.prototype.remove=function(e){!this._disposed&&e&&(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},e.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=function(e){if(!e)return!1;if("string"===typeof e)return rf(e,1)<.4;if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,o=0;o<r;o++)n+=rf(t[o].color,1);return(n/=r)<.4}return!1}(e))},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(e){this._darkMode=e},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(e){this._disposed||(e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},e.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},e.prototype.flush=function(){this._disposed||this._flush(!1)},e.prototype._flush=function(e){var t,n=zf();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var r=zf();t?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:r-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover())},e.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof Fg&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},e.prototype.dispose=function(){var e;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,e=this.id,delete Wg[e])},e}();function Ug(e,t){var n=new Gg(Au(),e,t);return Wg[n.id]=n,n}var Xg=1e-4,Yg=20;function qg(e,t,n,r){var o=t[0],i=t[1],a=n[0],s=n[1],l=i-o,c=s-a;if(0===l)return 0===c?a:(a+s)/2;if(r)if(l>0){if(e<=o)return a;if(e>=i)return s}else{if(e>=o)return a;if(e<=i)return s}else{if(e===o)return a;if(e===i)return s}return(e-o)/l*c+a}function Zg(e,t){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%"}return Hu(e)?(n=e,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):null==e?NaN:+e;var n}function Kg(e,t,n){return null==t&&(t=10),t=Math.min(Math.max(0,t),Yg),e=(+e).toFixed(t),n?e:+e}function $g(e){return e.sort((function(e,t){return e-t})),e}function Qg(e){if(e=+e,isNaN(e))return 0;if(e>1e-14)for(var t=1,n=0;n<15;n++,t*=10)if(Math.round(e*t)/t===e)return n;return function(e){var t=e.toString().toLowerCase(),n=t.indexOf("e"),r=n>0?+t.slice(n+1):0,o=n>0?n:t.length,i=t.indexOf("."),a=i<0?0:o-1-i;return Math.max(0,a-r)}(e)}function Jg(e,t){var n=Math.log,r=Math.LN10,o=Math.floor(n(e[1]-e[0])/r),i=Math.round(n(Math.abs(t[1]-t[0]))/r),a=Math.min(Math.max(-o+i,0),20);return isFinite(a)?a:20}function em(e,t){var n=Nu(e,(function(e,t){return e+(isNaN(t)?0:t)}),0);if(0===n)return[];for(var r=Math.pow(10,t),o=Eu(e,(function(e){return(isNaN(e)?0:e)/n*r*100})),i=100*r,a=Eu(o,(function(e){return Math.floor(e)})),s=Nu(a,(function(e,t){return e+t}),0),l=Eu(o,(function(e,t){return e-a[t]}));s<i;){for(var c=Number.NEGATIVE_INFINITY,u=null,d=0,h=l.length;d<h;++d)l[d]>c&&(c=l[d],u=d);++a[u],l[u]=0,++s}return Eu(a,(function(e){return e/r}))}function tm(e,t){var n=Math.max(Qg(e),Qg(t)),r=e+t;return n>Yg?r:Kg(r,n)}var nm=9007199254740991;function rm(e){var t=2*Math.PI;return(e%t+t)%t}function om(e){return e>-Xg&&e<Xg}var im=/^(?:(\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 am(e){if(e instanceof Date)return e;if(Hu(e)){var t=im.exec(e);if(!t)return new Date(NaN);if(t[8]){var n=+t[4]||0;return"Z"!==t[8].toUpperCase()&&(n-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}return new Date(+t[1],+(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}return null==e?new Date(NaN):new Date(Math.round(e))}function sm(e){if(0===e)return 0;var t=Math.floor(Math.log(e)/Math.LN10);return e/Math.pow(10,t)>=10&&t++,t}function lm(e,t){var n=sm(e),r=Math.pow(10,n),o=e/r;return e=(t?o<1.5?1:o<2.5?2:o<4?3:o<7?5:10:o<1?1:o<2?2:o<3?3:o<5?5:10)*r,n>=-20?+e.toFixed(n<0?-n:0):e}function cm(e,t){var n=(e.length-1)*t+1,r=Math.floor(n),o=+e[r-1],i=n-r;return i?o+i*(e[r]-o):o}function um(e){e.sort((function(e,t){return s(e,t,0)?-1:1}));for(var t=-1/0,n=1,r=0;r<e.length;){for(var o=e[r].interval,i=e[r].close,a=0;a<2;a++)o[a]<=t&&(o[a]=t,i[a]=a?1:1-n),t=o[a],n=i[a];o[0]===o[1]&&i[0]*i[1]!==1?e.splice(r,1):r++}return e;function s(e,t,n){return e.interval[n]<t.interval[n]||e.interval[n]===t.interval[n]&&(e.close[n]-t.close[n]===(n?-1:1)||!n&&s(e,t,1))}}function dm(e){var t=parseFloat(e);return t==e&&(0!==t||!Hu(e)||e.indexOf("x")<=0)?t:NaN}function hm(e){return!isNaN(dm(e))}function pm(){return Math.round(9*Math.random())}function fm(e,t){return 0===t?e:fm(t,e%t)}function gm(e,t){return null==e?t:null==t?e:e*t/fm(e,t)}function mm(e,t,n){return(t-e)*n+e}var vm="series\0",ym="\0_ec_\0";function xm(e){return e instanceof Array?e:null==e?[]:[e]}function bm(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var r=0,o=n.length;r<o;r++){var i=n[r];!e.emphasis[t].hasOwnProperty(i)&&e[t].hasOwnProperty(i)&&(e.emphasis[t][i]=e[t][i])}}}var wm=["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 Sm(e){return!Xu(e)||Vu(e)||e instanceof Date?e:e.value}function _m(e){return Xu(e)&&!(e instanceof Array)}function Am(e,t,n){var r="normalMerge"===n,o="replaceMerge"===n,i="replaceAll"===n;e=e||[],t=(t||[]).slice();var a=dd();Ru(t,(function(e,n){Xu(e)||(t[n]=null)}));var s=function(e,t,n){var r=[];if("replaceAll"===n)return r;for(var o=0;o<e.length;o++){var i=e[o];i&&null!=i.id&&t.set(i.id,o),r.push({existing:"replaceMerge"===n||Tm(i)?null:i,newOption:null,keyInfo:null,brandNew:null})}return r}(e,a,n);return(r||o)&&function(e,t,n,r){Ru(r,(function(o,i){if(o&&null!=o.id){var a=Cm(o.id),s=n.get(a);if(null!=s){var l=e[s];rd(!l.newOption,'Duplicated option on id "'+a+'".'),l.newOption=o,l.existing=t[s],r[i]=null}}}))}(s,e,a,t),r&&function(e,t){Ru(t,(function(n,r){if(n&&null!=n.name)for(var o=0;o<e.length;o++){var i=e[o].existing;if(!e[o].newOption&&i&&(null==i.id||null==n.id)&&!Tm(n)&&!Tm(i)&&km("name",i,n))return e[o].newOption=n,void(t[r]=null)}}))}(s,t),r||o?function(e,t,n){Ru(t,(function(t){if(t){for(var r,o=0;(r=e[o])&&(r.newOption||Tm(r.existing)||r.existing&&null!=t.id&&!km("id",t,r.existing));)o++;r?(r.newOption=t,r.brandNew=n):e.push({newOption:t,brandNew:n,existing:null,keyInfo:null}),o++}}))}(s,t,o):i&&function(e,t){Ru(t,(function(t){e.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})}))}(s,t),function(e){var t=dd();Ru(e,(function(e){var n=e.existing;n&&t.set(n.id,e)})),Ru(e,(function(e){var n=e.newOption;rd(!n||null==n.id||!t.get(n.id)||t.get(n.id)===e,"id duplicates: "+(n&&n.id)),n&&null!=n.id&&t.set(n.id,e),!e.keyInfo&&(e.keyInfo={})})),Ru(e,(function(e,n){var r=e.existing,o=e.newOption,i=e.keyInfo;if(Xu(o)){if(i.name=null!=o.name?Cm(o.name):r?r.name:vm+n,r)i.id=Cm(r.id);else if(null!=o.id)i.id=Cm(o.id);else{var a=0;do{i.id="\0"+i.name+"\0"+a++}while(t.get(i.id))}t.set(i.id,e)}}))}(s),s}function km(e,t,n){var r=Mm(t[e],null),o=Mm(n[e],null);return null!=r&&null!=o&&r===o}function Cm(e){return Mm(e,"")}function Mm(e,t){return null==e?t:Hu(e)?e:Uu(e)||Gu(e)?e+"":t}function Im(e){var t=e.name;return!(!t||!t.indexOf(vm))}function Tm(e){return e&&null!=e.id&&0===Cm(e.id).indexOf(ym)}function Dm(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?Vu(t.dataIndex)?Eu(t.dataIndex,(function(t){return e.indexOfRawIndex(t)})):e.indexOfRawIndex(t.dataIndex):null!=t.name?Vu(t.name)?Eu(t.name,(function(t){return e.indexOfName(t)})):e.indexOfName(t.name):void 0}function jm(){var e="__ec_inner_"+Pm++;return function(t){return t[e]||(t[e]={})}}var Pm=pm();function Lm(e,t,n){var r=Rm(t,n),o=r.mainTypeSpecified,i=r.queryOptionMap,a=r.others,s=n?n.defaultMainType:null;return!o&&s&&i.set(s,{}),i.each((function(t,r){var o=Om(e,r,t,{useDefault:s===r,enableAll:!n||null==n.enableAll||n.enableAll,enableNone:!n||null==n.enableNone||n.enableNone});a[r+"Models"]=o.models,a[r+"Model"]=o.models[0]})),a}function Rm(e,t){var n;if(Hu(e)){var r={};r[e+"Index"]=0,n=r}else n=e;var o=dd(),i={},a=!1;return Ru(n,(function(e,n){if("dataIndex"!==n&&"dataIndexInside"!==n){var r=n.match(/^(\w+)(Index|Id|Name)$/)||[],s=r[1],l=(r[2]||"").toLowerCase();if(s&&l&&!(t&&t.includeMainTypes&&ju(t.includeMainTypes,s)<0))a=a||!!s,(o.get(s)||o.set(s,{}))[l]=e}else i[n]=e})),{mainTypeSpecified:a,queryOptionMap:o,others:i}}var Em={useDefault:!0,enableAll:!1,enableNone:!1},Nm={useDefault:!1,enableAll:!0,enableNone:!0};function Om(e,t,n,r){r=r||Em;var o=n.index,i=n.id,a=n.name,s={models:null,specified:null!=o||null!=i||null!=a};if(!s.specified){var l=void 0;return s.models=r.useDefault&&(l=e.getComponent(t))?[l]:[],s}return"none"===o||!1===o?(rd(r.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):("all"===o&&(rd(r.enableAll,'`"all"` is not a valid value on index option.'),o=i=a=null),s.models=e.queryComponents({mainType:t,index:o,id:i,name:a}),s)}function zm(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}function Bm(e,t){var n=dd(),r=[];return Ru(e,(function(e){var o=t(e);(n.get(o)||(r.push(o),n.set(o,[]))).push(e)})),{keys:r,buckets:n}}function Fm(e,t,n,r,o){var i=null==t||"auto"===t;if(null==r)return r;if(Uu(r))return Kg(f=mm(n||0,r,o),i?Math.max(Qg(n||0),Qg(r)):t);if(Hu(r))return o<1?n:r;for(var a=[],s=n,l=r,c=Math.max(s?s.length:0,l.length),u=0;u<c;++u){var d=e.getDimensionInfo(u);if(d&&"ordinal"===d.type)a[u]=(o<1&&s?s:l)[u];else{var h=s&&s[u]?s[u]:0,p=l[u],f=mm(h,p,o);a[u]=Kg(f,i?Math.max(Qg(h),Qg(p)):t)}}return a}var Vm=".",Wm="___EC__COMPONENT__CONTAINER___",Hm="___EC__EXTENDED_CLASS___";function Gm(e){var t={main:"",sub:""};if(e){var n=e.split(Vm);t.main=n[0]||"",t.sub=n[1]||""}return t}function Um(e,t){e.$constructor=e,e.extend=function(e){var t,n,r=this;return Wu(n=r)&&/^class\s/.test(Function.prototype.toString.call(n))?t=function(e){function t(){return e.apply(this,arguments)||this}return ru(t,e),t}(r):(t=function(){(e.$constructor||r).apply(this,arguments)},function(e,t){var n=e.prototype;function r(){}for(var o in r.prototype=t.prototype,e.prototype=new r,n)n.hasOwnProperty(o)&&(e.prototype[o]=n[o]);e.prototype.constructor=e,e.superClass=t}(t,this)),Tu(t.prototype,e),t[Hm]=!0,t.extend=this.extend,t.superCall=qm,t.superApply=Zm,t.superClass=r,t}}function Xm(e,t){e.extend=t.extend}var Ym=Math.round(10*Math.random());function qm(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return this.superClass.prototype[t].apply(e,n)}function Zm(e,t,n){return this.superClass.prototype[t].apply(e,n)}function Km(e){var t={};e.registerClass=function(e){var n,r=e.type||e.prototype.type;if(r){rd(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(n=r),'componentType "'+n+'" illegal'),e.prototype.type=r;var o=Gm(r);if(o.sub){if(o.sub!==Wm){var i=function(e){var n=t[e.main];n&&n[Wm]||((n=t[e.main]={})[Wm]=!0);return n}(o);i[o.sub]=e}}else t[o.main]=e}return e},e.getClass=function(e,n,r){var o=t[e];if(o&&o[Wm]&&(o=n?o[n]:null),r&&!o)throw new Error(n?"Component "+e+"."+(n||"")+" is used but not imported.":e+".type should be specified.");return o},e.getClassesByMainType=function(e){var n=Gm(e),r=[],o=t[n.main];return o&&o[Wm]?Ru(o,(function(e,t){t!==Wm&&r.push(e)})):r.push(o),r},e.hasClass=function(e){var n=Gm(e);return!!t[n.main]},e.getAllClassMainTypes=function(){var e=[];return Ru(t,(function(t,n){e.push(n)})),e},e.hasSubTypes=function(e){var n=Gm(e),r=t[n.main];return r&&r[Wm]}}function $m(e,t){for(var n=0;n<e.length;n++)e[n][1]||(e[n][1]=e[n][0]);return t=t||!1,function(n,r,o){for(var i={},a=0;a<e.length;a++){var s=e[a][1];if(!(r&&ju(r,s)>=0||o&&ju(o,s)<0)){var l=n.getShallow(s,t);null!=l&&(i[e[a][0]]=l)}}return i}}var Qm=$m([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Jm=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return Qm(this,e,t)},e}(),ev=new Np(50);function tv(e){if("string"===typeof e){var t=ev.get(e);return t&&t.image}return e}function nv(e,t,n,r,o){if(e){if("string"===typeof e){if(t&&t.__zrImageSrc===e||!n)return t;var i=ev.get(e),a={hostEl:n,cb:r,cbPayload:o};return i?!ov(t=i.image)&&i.pending.push(a):((t=du.loadImage(e,rv,rv)).__zrImageSrc=e,ev.put(e,t.__cachedImgObj={image:t,pending:[a]})),t}return e}return t}function rv(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var n=e.pending[t],r=n.cb;r&&r(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function ov(e){return e&&e.width&&e.height}var iv=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function av(e,t,n,r,o){if(!t)return"";var i=(e+"").split("\n");o=sv(t,n,r,o);for(var a=0,s=i.length;a<s;a++)i[a]=lv(i[a],o);return i.join("\n")}function sv(e,t,n,r){var o=Tu({},r=r||{});o.font=t,n=Ju(n,"..."),o.maxIterations=Ju(r.maxIterations,2);var i=o.minChar=Ju(r.minChar,0);o.cnCharWidth=bg("\u56fd",t);var a=o.ascCharWidth=bg("a",t);o.placeholder=Ju(r.placeholder,"");for(var s=e=Math.max(0,e-1),l=0;l<i&&s>=a;l++)s-=a;var c=bg(n,t);return c>s&&(n="",c=0),s=e-c,o.ellipsis=n,o.ellipsisWidth=c,o.contentWidth=s,o.containerWidth=e,o}function lv(e,t){var n=t.containerWidth,r=t.font,o=t.contentWidth;if(!n)return"";var i=bg(e,r);if(i<=n)return e;for(var a=0;;a++){if(i<=o||a>=t.maxIterations){e+=t.ellipsis;break}var s=0===a?cv(e,o,t.ascCharWidth,t.cnCharWidth):i>0?Math.floor(e.length*o/i):0;i=bg(e=e.substr(0,s),r)}return""===e&&(e=t.placeholder),e}function cv(e,t,n,r){for(var o=0,i=0,a=e.length;i<a&&o<t;i++){var s=e.charCodeAt(i);o+=0<=s&&s<=127?n:r}return i}var uv=function(){},dv=function(e){this.tokens=[],e&&(this.tokens=e)},hv=function(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[]};function pv(e,t,n,r,o){var i,a,s=""===t,l=o&&n.rich[o]||{},c=e.lines,u=l.font||n.font,d=!1;if(r){var h=l.padding,p=h?h[1]+h[3]:0;if(null!=l.width&&"auto"!==l.width){var f=Cg(l.width,r.width)+p;c.length>0&&f+r.accumWidth>r.width&&(i=t.split("\n"),d=!0),r.accumWidth=f}else{var g=mv(t,u,r.width,r.breakAll,r.accumWidth);r.accumWidth=g.accumWidth+p,a=g.linesWidths,i=g.lines}}else i=t.split("\n");for(var m=0;m<i.length;m++){var v=i[m],y=new uv;if(y.styleName=o,y.text=v,y.isLineHolder=!v&&!s,"number"===typeof l.width?y.width=l.width:y.width=a?a[m]:bg(v,u),m||d)c.push(new dv([y]));else{var x=(c[c.length-1]||(c[0]=new dv)).tokens,b=x.length;1===b&&x[0].isLineHolder?x[0]=y:(v||!b||s)&&x.push(y)}}}var fv=Nu(",&?/;] ".split(""),(function(e,t){return e[t]=!0,e}),{});function gv(e){return!function(e){var t=e.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}(e)||!!fv[e]}function mv(e,t,n,r,o){for(var i=[],a=[],s="",l="",c=0,u=0,d=0;d<e.length;d++){var h=e.charAt(d);if("\n"!==h){var p=bg(h,t),f=!r&&!gv(h);(i.length?u+p>n:o+u+p>n)?u?(s||l)&&(f?(s||(s=l,l="",u=c=0),i.push(s),a.push(u-c),l+=h,s="",u=c+=p):(l&&(s+=l,l="",c=0),i.push(s),a.push(u),s=h,u=p)):f?(i.push(l),a.push(c),l=h,c=p):(i.push(h),a.push(p)):(u+=p,f?(l+=h,c+=p):(l&&(s+=l,l="",c=0),s+=h))}else l&&(s+=l,u+=c),i.push(s),a.push(u),s="",l="",c=0,u=0}return i.length||s||(s=e,l="",c=0),l&&(s+=l),s&&(i.push(s),a.push(u)),1===i.length&&(u+=o),{accumWidth:u,lines:i,linesWidths:a}}var vv="__zr_style_"+Math.round(10*Math.random()),yv={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},xv={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};yv[vv]=!0;var bv=["z","z2","invisible"],wv=["invisible"],Sv=function(e){function t(t){return e.call(this,t)||this}return xd(t,e),t.prototype._init=function(t){for(var n=zu(t),r=0;r<n.length;r++){var o=n[r];"style"===o?this.useStyle(t[o]):e.prototype.attrKV.call(this,o,t[o])}this.style||this.useStyle({})},t.prototype.beforeBrush=function(){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(e,t,n,r){var o=this.transform;if(this.ignore||this.invisible||0===this.style.opacity||this.culling&&function(e,t,n){_v.copy(e.getBoundingRect()),e.transform&&_v.applyTransform(e.transform);return Av.width=t,Av.height=n,!_v.intersect(Av)}(this,e,t)||o&&!o[0]&&!o[3])return!1;if(n&&this.__clipPaths)for(var i=0;i<this.__clipPaths.length;++i)if(this.__clipPaths[i].isZeroArea())return!1;if(r&&this.parent)for(var a=this.parent;a;){if(a.ignore)return!1;a=a.parent}return!0},t.prototype.contain=function(e,t){return this.rectContain(e,t)},t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.rectContain=function(e,t){var n=this.transformCoordToLocal(e,t);return this.getBoundingRect().contain(n[0],n[1])},t.prototype.getPaintRect=function(){var e=this._paintRect;if(!this._paintRect||this.__dirty){var t=this.transform,n=this.getBoundingRect(),r=this.style,o=r.shadowBlur||0,i=r.shadowOffsetX||0,a=r.shadowOffsetY||0;e=this._paintRect||(this._paintRect=new Dh(0,0,0,0)),t?Dh.applyTransform(e,n,t):e.copy(n),(o||i||a)&&(e.width+=2*o+Math.abs(i),e.height+=2*o+Math.abs(a),e.x=Math.min(e.x,e.x+i-o),e.y=Math.min(e.y,e.y+a-o));var s=this.dirtyRectTolerance;e.isZero()||(e.x=Math.floor(e.x-s),e.y=Math.floor(e.y-s),e.width=Math.ceil(e.width+1+2*s),e.height=Math.ceil(e.height+1+2*s))}return e},t.prototype.setPrevPaintRect=function(e){e?(this._prevPaintRect=this._prevPaintRect||new Dh(0,0,0,0),this._prevPaintRect.copy(e)):this._prevPaintRect=null},t.prototype.getPrevPaintRect=function(){return this._prevPaintRect},t.prototype.animateStyle=function(e){return this.animate("style",e)},t.prototype.updateDuringAnimation=function(e){"style"===e?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(t,n){"style"!==t?e.prototype.attrKV.call(this,t,n):this.style?this.setStyle(n):this.useStyle(n)},t.prototype.setStyle=function(e,t){return"string"===typeof e?this.style[e]=t:Tu(this.style,e),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=2,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(2&this.__dirty)},t.prototype.styleUpdated=function(){this.__dirty&=-3},t.prototype.createStyle=function(e){return pd(yv,e)},t.prototype.useStyle=function(e){e[vv]||(e=this.createStyle(e)),this.__inHover?this.__hoverStyle=e:this.style=e,this.dirtyStyle()},t.prototype.isStyleObject=function(e){return e[vv]},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,n,bv)},t.prototype._applyStateObj=function(t,n,r,o,i,a){e.prototype._applyStateObj.call(this,t,n,r,o,i,a);var s,l=!(n&&o);if(n&&n.style?i?o?s=n.style:(s=this._mergeStyle(this.createStyle(),r.style),this._mergeStyle(s,n.style)):(s=this._mergeStyle(this.createStyle(),o?this.style:r.style),this._mergeStyle(s,n.style)):l&&(s=r.style),s)if(i){var c=this.style;if(this.style=this.createStyle(l?{}:c),l)for(var u=zu(c),d=0;d<u.length;d++){(p=u[d])in s&&(s[p]=s[p],this.style[p]=c[p])}var h=zu(s);for(d=0;d<h.length;d++){var p=h[d];this.style[p]=this.style[p]}this._transitionState(t,{style:s},a,this.getAnimationStyleProps())}else this.useStyle(s);var f=this.__inHover?wv:bv;for(d=0;d<f.length;d++){p=f[d];n&&null!=n[p]?this[p]=n[p]:l&&null!=r[p]&&(this[p]=r[p])}},t.prototype._mergeStates=function(t){for(var n,r=e.prototype._mergeStates.call(this,t),o=0;o<t.length;o++){var i=t[o];i.style&&(n=n||{},this._mergeStyle(n,i.style))}return n&&(r.style=n),r},t.prototype._mergeStyle=function(e,t){return Tu(e,t),e},t.prototype.getAnimationStyleProps=function(){return xv},t.initDefaultProps=function(){var e=t.prototype;e.type="displayable",e.invisible=!1,e.z=0,e.z2=0,e.zlevel=0,e.culling=!1,e.cursor="pointer",e.rectHover=!1,e.incremental=!1,e._rect=null,e.dirtyRectTolerance=0,e.__dirty=2|Kh}(),t}(zg),_v=new Dh(0,0,0,0),Av=new Dh(0,0,0,0);const kv=Sv;var Cv=Math.min,Mv=Math.max,Iv=Math.sin,Tv=Math.cos,Dv=2*Math.PI,jv=bd(),Pv=bd(),Lv=bd();function Rv(e,t,n){if(0!==e.length){for(var r=e[0],o=r[0],i=r[0],a=r[1],s=r[1],l=1;l<e.length;l++)r=e[l],o=Cv(o,r[0]),i=Mv(i,r[0]),a=Cv(a,r[1]),s=Mv(s,r[1]);t[0]=o,t[1]=a,n[0]=i,n[1]=s}}function Ev(e,t,n,r,o,i){o[0]=Cv(e,n),o[1]=Cv(t,r),i[0]=Mv(e,n),i[1]=Mv(t,r)}var Nv=[],Ov=[];function zv(e,t,n,r,o,i,a,s,l,c){var u=bp,d=vp,h=u(e,n,o,a,Nv);l[0]=1/0,l[1]=1/0,c[0]=-1/0,c[1]=-1/0;for(var p=0;p<h;p++){var f=d(e,n,o,a,Nv[p]);l[0]=Cv(f,l[0]),c[0]=Mv(f,c[0])}h=u(t,r,i,s,Ov);for(p=0;p<h;p++){var g=d(t,r,i,s,Ov[p]);l[1]=Cv(g,l[1]),c[1]=Mv(g,c[1])}l[0]=Cv(e,l[0]),c[0]=Mv(e,c[0]),l[0]=Cv(a,l[0]),c[0]=Mv(a,c[0]),l[1]=Cv(t,l[1]),c[1]=Mv(t,c[1]),l[1]=Cv(s,l[1]),c[1]=Mv(s,c[1])}function Bv(e,t,n,r,o,i,a,s){var l=Cp,c=Ap,u=Mv(Cv(l(e,n,o),1),0),d=Mv(Cv(l(t,r,i),1),0),h=c(e,n,o,u),p=c(t,r,i,d);a[0]=Cv(e,o,h),a[1]=Cv(t,i,p),s[0]=Mv(e,o,h),s[1]=Mv(t,i,p)}function Fv(e,t,n,r,o,i,a,s,l){var c=Nd,u=Od,d=Math.abs(o-i);if(d%Dv<1e-4&&d>1e-4)return s[0]=e-n,s[1]=t-r,l[0]=e+n,void(l[1]=t+r);if(jv[0]=Tv(o)*n+e,jv[1]=Iv(o)*r+t,Pv[0]=Tv(i)*n+e,Pv[1]=Iv(i)*r+t,c(s,jv,Pv),u(l,jv,Pv),(o%=Dv)<0&&(o+=Dv),(i%=Dv)<0&&(i+=Dv),o>i&&!a?i+=Dv:o<i&&a&&(o+=Dv),a){var h=i;i=o,o=h}for(var p=0;p<i;p+=Math.PI/2)p>o&&(Lv[0]=Tv(p)*n+e,Lv[1]=Iv(p)*r+t,c(s,Lv,s),u(l,Lv,l))}var Vv={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Wv=[],Hv=[],Gv=[],Uv=[],Xv=[],Yv=[],qv=Math.min,Zv=Math.max,Kv=Math.cos,$v=Math.sin,Qv=Math.abs,Jv=Math.PI,ey=2*Jv,ty="undefined"!==typeof Float32Array,ny=[];function ry(e){return Math.round(e/Jv*1e8)/1e8%2*Jv}function oy(e,t){var n=ry(e[0]);n<0&&(n+=ey);var r=n-e[0],o=e[1];o+=r,!t&&o-n>=ey?o=n+ey:t&&n-o>=ey?o=n-ey:!t&&n>o?o=n+(ey-ry(n-o)):t&&n<o&&(o=n-(ey-ry(o-n))),e[0]=n,e[1]=o}var iy=function(){function e(e){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,e&&(this._saveData=!1),this._saveData&&(this.data=[])}return e.prototype.increaseVersion=function(){this._version++},e.prototype.getVersion=function(){return this._version},e.prototype.setScale=function(e,t,n){(n=n||0)>0&&(this._ux=Qv(n/ig/e)||0,this._uy=Qv(n/ig/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Vv.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=Qv(e-this._xi),r=Qv(t-this._yi),o=n>this._ux||r>this._uy;if(this.addData(Vv.L,e,t),this._ctx&&o&&this._ctx.lineTo(e,t),o)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var i=n*n+r*r;i>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=i)}return this},e.prototype.bezierCurveTo=function(e,t,n,r,o,i){return this._drawPendingPt(),this.addData(Vv.C,e,t,n,r,o,i),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,o,i),this._xi=o,this._yi=i,this},e.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(Vv.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},e.prototype.arc=function(e,t,n,r,o,i){this._drawPendingPt(),ny[0]=r,ny[1]=o,oy(ny,i),r=ny[0];var a=(o=ny[1])-r;return this.addData(Vv.A,e,t,n,n,r,a,0,i?0:1),this._ctx&&this._ctx.arc(e,t,n,r,o,i),this._xi=Kv(o)*n+e,this._yi=$v(o)*n+t,this},e.prototype.arcTo=function(e,t,n,r,o){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,o),this},e.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(Vv.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Vv.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){var t=e.length;this.data&&this.data.length===t||!ty||(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t},e.prototype.appendPath=function(e){e instanceof Array||(e=[e]);for(var t=e.length,n=0,r=this._len,o=0;o<t;o++)n+=e[o].len();ty&&this.data instanceof Float32Array&&(this.data=new Float32Array(r+n));for(o=0;o<t;o++)for(var i=e[o].data,a=0;a<i.length;a++)this.data[r++]=i[a];this._len=r},e.prototype.addData=function(e,t,n,r,o,i,a,s,l){if(this._saveData){var c=this.data;this._len+arguments.length>c.length&&(this._expandData(),c=this.data);for(var u=0;u<arguments.length;u++)c[this._len++]=arguments[u]}},e.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},e.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,ty&&this._len>11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){Gv[0]=Gv[1]=Xv[0]=Xv[1]=Number.MAX_VALUE,Uv[0]=Uv[1]=Yv[0]=Yv[1]=-Number.MAX_VALUE;var e,t=this.data,n=0,r=0,o=0,i=0;for(e=0;e<this._len;){var a=t[e++],s=1===e;switch(s&&(o=n=t[e],i=r=t[e+1]),a){case Vv.M:n=o=t[e++],r=i=t[e++],Xv[0]=o,Xv[1]=i,Yv[0]=o,Yv[1]=i;break;case Vv.L:Ev(n,r,t[e],t[e+1],Xv,Yv),n=t[e++],r=t[e++];break;case Vv.C:zv(n,r,t[e++],t[e++],t[e++],t[e++],t[e],t[e+1],Xv,Yv),n=t[e++],r=t[e++];break;case Vv.Q:Bv(n,r,t[e++],t[e++],t[e],t[e+1],Xv,Yv),n=t[e++],r=t[e++];break;case Vv.A:var l=t[e++],c=t[e++],u=t[e++],d=t[e++],h=t[e++],p=t[e++]+h;e+=1;var f=!t[e++];s&&(o=Kv(h)*u+l,i=$v(h)*d+c),Fv(l,c,u,d,h,p,f,Xv,Yv),n=Kv(p)*u+l,r=$v(p)*d+c;break;case Vv.R:Ev(o=n=t[e++],i=r=t[e++],o+t[e++],i+t[e++],Xv,Yv);break;case Vv.Z:n=o,r=i}Nd(Gv,Gv,Xv),Od(Uv,Uv,Yv)}return 0===e&&(Gv[0]=Gv[1]=Uv[0]=Uv[1]=0),new Dh(Gv[0],Gv[1],Uv[0]-Gv[0],Uv[1]-Gv[1])},e.prototype._calculateLength=function(){var e=this.data,t=this._len,n=this._ux,r=this._uy,o=0,i=0,a=0,s=0;this._pathSegLen||(this._pathSegLen=[]);for(var l=this._pathSegLen,c=0,u=0,d=0;d<t;){var h=e[d++],p=1===d;p&&(a=o=e[d],s=i=e[d+1]);var f=-1;switch(h){case Vv.M:o=a=e[d++],i=s=e[d++];break;case Vv.L:var g=e[d++],m=(x=e[d++])-i;(Qv(T=g-o)>n||Qv(m)>r||d===t-1)&&(f=Math.sqrt(T*T+m*m),o=g,i=x);break;case Vv.C:var v=e[d++],y=e[d++],x=(g=e[d++],e[d++]),b=e[d++],w=e[d++];f=_p(o,i,v,y,g,x,b,w,10),o=b,i=w;break;case Vv.Q:f=Tp(o,i,v=e[d++],y=e[d++],g=e[d++],x=e[d++],10),o=g,i=x;break;case Vv.A:var S=e[d++],_=e[d++],A=e[d++],k=e[d++],C=e[d++],M=e[d++],I=M+C;d+=1,p&&(a=Kv(C)*A+S,s=$v(C)*k+_),f=Zv(A,k)*qv(ey,Math.abs(M)),o=Kv(I)*A+S,i=$v(I)*k+_;break;case Vv.R:a=o=e[d++],s=i=e[d++],f=2*e[d++]+2*e[d++];break;case Vv.Z:var T=a-o;m=s-i;f=Math.sqrt(T*T+m*m),o=a,i=s}f>=0&&(l[u++]=f,c+=f)}return this._pathLen=c,c},e.prototype.rebuildPath=function(e,t){var n,r,o,i,a,s,l,c,u,d,h=this.data,p=this._ux,f=this._uy,g=this._len,m=t<1,v=0,y=0,x=0;if(!m||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,c=t*this._pathLen))e:for(var b=0;b<g;){var w=h[b++],S=1===b;switch(S&&(n=o=h[b],r=i=h[b+1]),w!==Vv.L&&x>0&&(e.lineTo(u,d),x=0),w){case Vv.M:n=o=h[b++],r=i=h[b++],e.moveTo(o,i);break;case Vv.L:a=h[b++],s=h[b++];var _=Qv(a-o),A=Qv(s-i);if(_>p||A>f){if(m){if(v+(q=l[y++])>c){var k=(c-v)/q;e.lineTo(o*(1-k)+a*k,i*(1-k)+s*k);break e}v+=q}e.lineTo(a,s),o=a,i=s,x=0}else{var C=_*_+A*A;C>x&&(u=a,d=s,x=C)}break;case Vv.C:var M=h[b++],I=h[b++],T=h[b++],D=h[b++],j=h[b++],P=h[b++];if(m){if(v+(q=l[y++])>c){wp(o,M,T,j,k=(c-v)/q,Wv),wp(i,I,D,P,k,Hv),e.bezierCurveTo(Wv[1],Hv[1],Wv[2],Hv[2],Wv[3],Hv[3]);break e}v+=q}e.bezierCurveTo(M,I,T,D,j,P),o=j,i=P;break;case Vv.Q:M=h[b++],I=h[b++],T=h[b++],D=h[b++];if(m){if(v+(q=l[y++])>c){Mp(o,M,T,k=(c-v)/q,Wv),Mp(i,I,D,k,Hv),e.quadraticCurveTo(Wv[1],Hv[1],Wv[2],Hv[2]);break e}v+=q}e.quadraticCurveTo(M,I,T,D),o=T,i=D;break;case Vv.A:var L=h[b++],R=h[b++],E=h[b++],N=h[b++],O=h[b++],z=h[b++],B=h[b++],F=!h[b++],V=E>N?E:N,W=Qv(E-N)>.001,H=O+z,G=!1;if(m)v+(q=l[y++])>c&&(H=O+z*(c-v)/q,G=!0),v+=q;if(W&&e.ellipse?e.ellipse(L,R,E,N,B,O,H,F):e.arc(L,R,V,O,H,F),G)break e;S&&(n=Kv(O)*E+L,r=$v(O)*N+R),o=Kv(H)*E+L,i=$v(H)*N+R;break;case Vv.R:n=o=h[b],r=i=h[b+1],a=h[b++],s=h[b++];var U=h[b++],X=h[b++];if(m){if(v+(q=l[y++])>c){var Y=c-v;e.moveTo(a,s),e.lineTo(a+qv(Y,U),s),(Y-=U)>0&&e.lineTo(a+U,s+qv(Y,X)),(Y-=X)>0&&e.lineTo(a+Zv(U-Y,0),s+X),(Y-=U)>0&&e.lineTo(a,s+Zv(X-Y,0));break e}v+=q}e.rect(a,s,U,X);break;case Vv.Z:if(m){var q;if(v+(q=l[y++])>c){k=(c-v)/q;e.lineTo(o*(1-k)+n*k,i*(1-k)+r*k);break e}v+=q}e.closePath(),o=n,i=r}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.CMD=Vv,e.initDefaultProps=function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),e}();const ay=iy;function sy(e,t,n,r,o,i,a){if(0===o)return!1;var s=o,l=0;if(a>t+s&&a>r+s||a<t-s&&a<r-s||i>e+s&&i>n+s||i<e-s&&i<n-s)return!1;if(e===n)return Math.abs(i-e)<=s/2;var c=(l=(t-r)/(e-n))*i-a+(e*r-n*t)/(e-n);return c*c/(l*l+1)<=s/2*s/2}function ly(e,t,n,r,o,i,a,s,l,c,u){if(0===l)return!1;var d=l;return!(u>t+d&&u>r+d&&u>i+d&&u>s+d||u<t-d&&u<r-d&&u<i-d&&u<s-d||c>e+d&&c>n+d&&c>o+d&&c>a+d||c<e-d&&c<n-d&&c<o-d&&c<a-d)&&Sp(e,t,n,r,o,i,a,s,c,u,null)<=d/2}function cy(e,t,n,r,o,i,a,s,l){if(0===a)return!1;var c=a;return!(l>t+c&&l>r+c&&l>i+c||l<t-c&&l<r-c&&l<i-c||s>e+c&&s>n+c&&s>o+c||s<e-c&&s<n-c&&s<o-c)&&Ip(e,t,n,r,o,i,s,l,null)<=c/2}var uy=2*Math.PI;function dy(e){return(e%=uy)<0&&(e+=uy),e}var hy=2*Math.PI;function py(e,t,n,r,o,i,a,s,l){if(0===a)return!1;var c=a;s-=e,l-=t;var u=Math.sqrt(s*s+l*l);if(u-c>n||u+c<n)return!1;if(Math.abs(r-o)%hy<1e-4)return!0;if(i){var d=r;r=dy(o),o=dy(d)}else r=dy(r),o=dy(o);r>o&&(o+=hy);var h=Math.atan2(l,s);return h<0&&(h+=hy),h>=r&&h<=o||h+hy>=r&&h+hy<=o}function fy(e,t,n,r,o,i){if(i>t&&i>r||i<t&&i<r)return 0;if(r===t)return 0;var a=(i-t)/(r-t),s=r<t?1:-1;1!==a&&0!==a||(s=r<t?.5:-.5);var l=a*(n-e)+e;return l===o?1/0:l>o?s:0}var gy=ay.CMD,my=2*Math.PI,vy=1e-4;var yy=[-1,-1,-1],xy=[-1,-1];function by(){var e=xy[0];xy[0]=xy[1],xy[1]=e}function wy(e,t,n,r,o,i,a,s,l,c){if(c>t&&c>r&&c>i&&c>s||c<t&&c<r&&c<i&&c<s)return 0;var u=xp(t,r,i,s,c,yy);if(0===u)return 0;for(var d=0,h=-1,p=void 0,f=void 0,g=0;g<u;g++){var m=yy[g],v=0===m||1===m?.5:1;vp(e,n,o,a,m)<l||(h<0&&(h=bp(t,r,i,s,xy),xy[1]<xy[0]&&h>1&&by(),p=vp(t,r,i,s,xy[0]),h>1&&(f=vp(t,r,i,s,xy[1]))),2===h?m<xy[0]?d+=p<t?v:-v:m<xy[1]?d+=f<p?v:-v:d+=s<f?v:-v:m<xy[0]?d+=p<t?v:-v:d+=s<p?v:-v)}return d}function Sy(e,t,n,r,o,i,a,s){if(s>t&&s>r&&s>i||s<t&&s<r&&s<i)return 0;var l=function(e,t,n,r,o){var i=e-2*t+n,a=2*(t-e),s=e-r,l=0;if(gp(i))mp(a)&&(u=-s/a)>=0&&u<=1&&(o[l++]=u);else{var c=a*a-4*i*s;if(gp(c))(u=-a/(2*i))>=0&&u<=1&&(o[l++]=u);else if(c>0){var u,d=sp(c),h=(-a-d)/(2*i);(u=(-a+d)/(2*i))>=0&&u<=1&&(o[l++]=u),h>=0&&h<=1&&(o[l++]=h)}}return l}(t,r,i,s,yy);if(0===l)return 0;var c=Cp(t,r,i);if(c>=0&&c<=1){for(var u=0,d=Ap(t,r,i,c),h=0;h<l;h++){var p=0===yy[h]||1===yy[h]?.5:1;Ap(e,n,o,yy[h])<a||(yy[h]<c?u+=d<t?p:-p:u+=i<d?p:-p)}return u}p=0===yy[0]||1===yy[0]?.5:1;return Ap(e,n,o,yy[0])<a?0:i<t?p:-p}function _y(e,t,n,r,o,i,a,s){if((s-=t)>n||s<-n)return 0;var l=Math.sqrt(n*n-s*s);yy[0]=-l,yy[1]=l;var c=Math.abs(r-o);if(c<1e-4)return 0;if(c>=my-1e-4){r=0,o=my;var u=i?1:-1;return a>=yy[0]+e&&a<=yy[1]+e?u:0}if(r>o){var d=r;r=o,o=d}r<0&&(r+=my,o+=my);for(var h=0,p=0;p<2;p++){var f=yy[p];if(f+e>a){var g=Math.atan2(s,f);u=i?1:-1;g<0&&(g=my+g),(g>=r&&g<=o||g+my>=r&&g+my<=o)&&(g>Math.PI/2&&g<1.5*Math.PI&&(u=-u),h+=u)}}return h}function Ay(e,t,n,r,o){for(var i,a,s,l,c=e.data,u=e.len(),d=0,h=0,p=0,f=0,g=0,m=0;m<u;){var v=c[m++],y=1===m;switch(v===gy.M&&m>1&&(n||(d+=fy(h,p,f,g,r,o))),y&&(f=h=c[m],g=p=c[m+1]),v){case gy.M:h=f=c[m++],p=g=c[m++];break;case gy.L:if(n){if(sy(h,p,c[m],c[m+1],t,r,o))return!0}else d+=fy(h,p,c[m],c[m+1],r,o)||0;h=c[m++],p=c[m++];break;case gy.C:if(n){if(ly(h,p,c[m++],c[m++],c[m++],c[m++],c[m],c[m+1],t,r,o))return!0}else d+=wy(h,p,c[m++],c[m++],c[m++],c[m++],c[m],c[m+1],r,o)||0;h=c[m++],p=c[m++];break;case gy.Q:if(n){if(cy(h,p,c[m++],c[m++],c[m],c[m+1],t,r,o))return!0}else d+=Sy(h,p,c[m++],c[m++],c[m],c[m+1],r,o)||0;h=c[m++],p=c[m++];break;case gy.A:var x=c[m++],b=c[m++],w=c[m++],S=c[m++],_=c[m++],A=c[m++];m+=1;var k=!!(1-c[m++]);i=Math.cos(_)*w+x,a=Math.sin(_)*S+b,y?(f=i,g=a):d+=fy(h,p,i,a,r,o);var C=(r-x)*S/w+x;if(n){if(py(x,b,S,_,_+A,k,t,C,o))return!0}else d+=_y(x,b,S,_,_+A,k,C,o);h=Math.cos(_+A)*w+x,p=Math.sin(_+A)*S+b;break;case gy.R:if(f=h=c[m++],g=p=c[m++],i=f+c[m++],a=g+c[m++],n){if(sy(f,g,i,g,t,r,o)||sy(i,g,i,a,t,r,o)||sy(i,a,f,a,t,r,o)||sy(f,a,f,g,t,r,o))return!0}else d+=fy(i,g,i,a,r,o),d+=fy(f,a,f,g,r,o);break;case gy.Z:if(n){if(sy(h,p,f,g,t,r,o))return!0}else d+=fy(h,p,f,g,r,o);h=f,p=g}}return n||(s=p,l=g,Math.abs(s-l)<vy)||(d+=fy(h,p,f,g,r,o)||0),0!==d}var ky=Du({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},yv),Cy={style:Du({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},xv.style)},My=mg.concat(["invisible","culling","z","z2","zlevel","parent"]),Iy=function(e){function t(t){return e.call(this,t)||this}return xd(t,e),t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var o=this._decalEl=this._decalEl||new t;o.buildPath===t.prototype.buildPath&&(o.buildPath=function(e){n.buildPath(e,n.shape)}),o.silent=!0;var i=o.style;for(var a in r)i[a]!==r[a]&&(i[a]=r[a]);i.fill=r.fill?r.decal:null,i.decal=null,i.shadowColor=null,r.strokeFirst&&(i.stroke=null);for(var s=0;s<My.length;++s)o[My[s]]=this[My[s]];o.__dirty|=Kh}else this._decalEl&&(this._decalEl=null)},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(t){var n=zu(t);this.shape=this.getDefaultShape();var r=this.getDefaultStyle();r&&this.useStyle(r);for(var o=0;o<n.length;o++){var i=n[o],a=t[i];"style"===i?this.style?Tu(this.style,a):this.useStyle(a):"shape"===i?Tu(this.shape,a):e.prototype.attrKV.call(this,i,a)}this.style||this.useStyle({})},t.prototype.getDefaultStyle=function(){return null},t.prototype.getDefaultShape=function(){return{}},t.prototype.canBeInsideText=function(){return this.hasFill()},t.prototype.getInsideTextFill=function(){var e=this.style.fill;if("none"!==e){if(Hu(e)){var t=rf(e,0);return t>.5?ag:t>.2?"#eee":sg}if(e)return sg}return ag},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(Hu(t)){var n=this.__zr;if(!(!n||!n.isDarkMode())===rf(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=~$h},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new ay(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(null==t||"none"===t||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var o=this.path;(r||this.__dirty&$h)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),e=o.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var i=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||n){i.copy(e);var a=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;s=Math.max(s,null==l?4:l)}a>1e-10&&(i.width+=s/a,i.height+=s/a,i.x-=s/a/2,i.y-=s/a/2)}return i}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),o=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var i=this.path;if(this.hasStroke()){var a=o.lineWidth,s=o.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),function(e,t,n,r){return Ay(e,t,!0,n,r)}(i,a/s,e,t)))return!0}if(this.hasFill())return function(e,t,n){return Ay(e,0,!1,t,n)}(i,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=$h,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate("shape",e)},t.prototype.updateDuringAnimation=function(e){"style"===e?this.dirtyStyle():"shape"===e?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,n){"shape"===t?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||(n=this.shape={}),"string"===typeof e?n[e]=t:Tu(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&$h)},t.prototype.createStyle=function(e){return pd(ky,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=Tu({},this.shape))},t.prototype._applyStateObj=function(t,n,r,o,i,a){e.prototype._applyStateObj.call(this,t,n,r,o,i,a);var s,l=!(n&&o);if(n&&n.shape?i?o?s=n.shape:(s=Tu({},r.shape),Tu(s,n.shape)):(s=Tu({},o?this.shape:r.shape),Tu(s,n.shape)):l&&(s=r.shape),s)if(i){this.shape=Tu({},this.shape);for(var c={},u=zu(s),d=0;d<u.length;d++){var h=u[d];"object"===typeof s[h]?this.shape[h]=s[h]:c[h]=s[h]}this._transitionState(t,{shape:c},a)}else this.shape=s,this.dirtyShape()},t.prototype._mergeStates=function(t){for(var n,r=e.prototype._mergeStates.call(this,t),o=0;o<t.length;o++){var i=t[o];i.shape&&(n=n||{},this._mergeStyle(n,i.shape))}return n&&(r.shape=n),r},t.prototype.getAnimationStyleProps=function(){return Cy},t.prototype.isZeroArea=function(){return!1},t.extend=function(e){var n=function(t){function n(n){var r=t.call(this,n)||this;return e.init&&e.init.call(r,n),r}return xd(n,t),n.prototype.getDefaultStyle=function(){return Cu(e.style)},n.prototype.getDefaultShape=function(){return Cu(e.shape)},n}(t);for(var r in e)"function"===typeof e[r]&&(n.prototype[r]=e[r]);return n},t.initDefaultProps=function(){var e=t.prototype;e.type="path",e.strokeContainThreshold=5,e.segmentIgnoreThreshold=0,e.subPixelOptimize=!1,e.autoBatch=!1,e.__dirty=2|Kh|$h}(),t}(kv);const Ty=Iy;var Dy=Du({strokeFirst:!0,font:cu,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},ky),jy=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xd(t,e),t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return null!=t&&"none"!==t&&e.lineWidth>0},t.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},t.prototype.createStyle=function(e){return pd(Dy,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){var e=this.style;if(!this._rect){var t=e.text;null!=t?t+="":t="";var n=Sg(t,e.font,e.textAlign,e.textBaseline);if(n.x+=e.x||0,n.y+=e.y||0,this.hasStroke()){var r=e.lineWidth;n.x-=r/2,n.y-=r/2,n.width+=r,n.height+=r}this._rect=n}return this._rect},t.initDefaultProps=void(t.prototype.dirtyRectTolerance=10),t}(kv);jy.prototype.type="tspan";const Py=jy;var Ly=Du({x:0,y:0},yv),Ry={style:Du({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},xv.style)};var Ey=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xd(t,e),t.prototype.createStyle=function(e){return pd(Ly,e)},t.prototype._getSize=function(e){var t=this.style,n=t[e];if(null!=n)return n;var r,o=(r=t.image)&&"string"!==typeof r&&r.width&&r.height?t.image:this.__image;if(!o)return 0;var i="width"===e?"height":"width",a=t[i];return null==a?o[e]:o[e]/o[i]*a},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return Ry},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new Dh(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t}(kv);Ey.prototype.type="image";const Ny=Ey;var Oy=Math.round;function zy(e,t,n){if(t){var r=t.x1,o=t.x2,i=t.y1,a=t.y2;e.x1=r,e.x2=o,e.y1=i,e.y2=a;var s=n&&n.lineWidth;return s?(Oy(2*r)===Oy(2*o)&&(e.x1=e.x2=Fy(r,s,!0)),Oy(2*i)===Oy(2*a)&&(e.y1=e.y2=Fy(i,s,!0)),e):e}}function By(e,t,n){if(t){var r=t.x,o=t.y,i=t.width,a=t.height;e.x=r,e.y=o,e.width=i,e.height=a;var s=n&&n.lineWidth;return s?(e.x=Fy(r,s,!0),e.y=Fy(o,s,!0),e.width=Math.max(Fy(r+i,s,!1)-e.x,0===i?0:1),e.height=Math.max(Fy(o+a,s,!1)-e.y,0===a?0:1),e):e}}function Fy(e,t,n){if(!t)return e;var r=Oy(2*e);return(r+Oy(t))%2===0?r/2:(r+(n?1:-1))/2}var Vy=function(){this.x=0,this.y=0,this.width=0,this.height=0},Wy={},Hy=function(e){function t(t){return e.call(this,t)||this}return xd(t,e),t.prototype.getDefaultShape=function(){return new Vy},t.prototype.buildPath=function(e,t){var n,r,o,i;if(this.subPixelOptimize){var a=By(Wy,t,this.style);n=a.x,r=a.y,o=a.width,i=a.height,a.r=t.r,t=a}else n=t.x,r=t.y,o=t.width,i=t.height;t.r?function(e,t){var n,r,o,i,a,s=t.x,l=t.y,c=t.width,u=t.height,d=t.r;c<0&&(s+=c,c=-c),u<0&&(l+=u,u=-u),"number"===typeof d?n=r=o=i=d:d instanceof Array?1===d.length?n=r=o=i=d[0]:2===d.length?(n=o=d[0],r=i=d[1]):3===d.length?(n=d[0],r=i=d[1],o=d[2]):(n=d[0],r=d[1],o=d[2],i=d[3]):n=r=o=i=0,n+r>c&&(n*=c/(a=n+r),r*=c/a),o+i>c&&(o*=c/(a=o+i),i*=c/a),r+o>u&&(r*=u/(a=r+o),o*=u/a),n+i>u&&(n*=u/(a=n+i),i*=u/a),e.moveTo(s+n,l),e.lineTo(s+c-r,l),0!==r&&e.arc(s+c-r,l+r,r,-Math.PI/2,0),e.lineTo(s+c,l+u-o),0!==o&&e.arc(s+c-o,l+u-o,o,0,Math.PI/2),e.lineTo(s+i,l+u),0!==i&&e.arc(s+i,l+u-i,i,Math.PI/2,Math.PI),e.lineTo(s,l+n),0!==n&&e.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}(e,t):e.rect(n,r,o,i)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(Ty);Hy.prototype.type="rect";const Gy=Hy;var Uy={fill:"#000"},Xy={style:Du({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},xv.style)},Yy=function(e){function t(t){var n=e.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=Uy,n.attr(t),n}return xd(t,e),t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var n=this._children[t];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}},t.prototype.updateTransform=function(){var t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):e.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(t){var n=this.innerTransformable;return n?n.getLocalTransform(t):e.prototype.getLocalTransform.call(this,t)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),e.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){this._childCursor=0,function(e){ex(e),Ru(e.rich,ex)}(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=t},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},t.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var e=new Dh(0,0,0,0),t=this._children,n=[],r=null,o=0;o<t.length;o++){var i=t[o],a=i.getBoundingRect(),s=i.getLocalTransform(n);s?(e.copy(a),e.applyTransform(s),(r=r||e.clone()).union(e)):(r=r||a.clone()).union(a)}this._rect=r||e}return this._rect},t.prototype.setDefaultTextStyle=function(e){this._defaultStyle=e||Uy},t.prototype.setTextContent=function(e){0},t.prototype._mergeStyle=function(e,t){if(!t)return e;var n=t.rich,r=e.rich||n&&{};return Tu(e,t),n&&r?(this._mergeRich(r,n),e.rich=r):r&&(e.rich=r),e},t.prototype._mergeRich=function(e,t){for(var n=zu(t),r=0;r<n.length;r++){var o=n[r];e[o]=e[o]||{},Tu(e[o],t[o])}},t.prototype.getAnimationStyleProps=function(){return Xy},t.prototype._getOrCreateChild=function(e){var t=this._children[this._childCursor];return t&&t instanceof e||(t=new e),this._children[this._childCursor++]=t,t.__zr=this.__zr,t.parent=this,t},t.prototype._updatePlainTexts=function(){var e=this.style,t=e.font||cu,n=e.padding,r=function(e,t){null!=e&&(e+="");var n,r=t.overflow,o=t.padding,i=t.font,a="truncate"===r,s=kg(i),l=Ju(t.lineHeight,s),c=!!t.backgroundColor,u="truncate"===t.lineOverflow,d=t.width,h=(n=null==d||"break"!==r&&"breakAll"!==r?e?e.split("\n"):[]:e?mv(e,t.font,d,"breakAll"===r,0).lines:[]).length*l,p=Ju(t.height,h);if(h>p&&u){var f=Math.floor(p/l);n=n.slice(0,f)}if(e&&a&&null!=d)for(var g=sv(d,i,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),m=0;m<n.length;m++)n[m]=lv(n[m],g);var v=p,y=0;for(m=0;m<n.length;m++)y=Math.max(bg(n[m],i),y);null==d&&(d=y);var x=y;return o&&(v+=o[0]+o[2],x+=o[1]+o[3],d+=o[1]+o[3]),c&&(x=d),{lines:n,height:p,outerWidth:x,outerHeight:v,lineHeight:l,calculatedLineHeight:s,contentWidth:y,contentHeight:h,width:d}}(ox(e),e),o=ix(e),i=!!e.backgroundColor,a=r.outerHeight,s=r.outerWidth,l=r.contentWidth,c=r.lines,u=r.lineHeight,d=this._defaultStyle,h=e.x||0,p=e.y||0,f=e.align||d.align||"left",g=e.verticalAlign||d.verticalAlign||"top",m=h,v=Ag(p,r.contentHeight,g);if(o||n){var y=_g(h,s,f),x=Ag(p,a,g);o&&this._renderBackground(e,e,y,x,s,a)}v+=u/2,n&&(m=rx(h,f,n),"top"===g?v+=n[0]:"bottom"===g&&(v-=n[2]));for(var b=0,w=!1,S=(nx("fill"in e?e.fill:(w=!0,d.fill))),_=(tx("stroke"in e?e.stroke:i||d.autoStroke&&!w?null:(b=2,d.stroke))),A=e.textShadowBlur>0,k=null!=e.width&&("truncate"===e.overflow||"break"===e.overflow||"breakAll"===e.overflow),C=r.calculatedLineHeight,M=0;M<c.length;M++){var I=this._getOrCreateChild(Py),T=I.createStyle();I.useStyle(T),T.text=c[M],T.x=m,T.y=v,f&&(T.textAlign=f),T.textBaseline="middle",T.opacity=e.opacity,T.strokeFirst=!0,A&&(T.shadowBlur=e.textShadowBlur||0,T.shadowColor=e.textShadowColor||"transparent",T.shadowOffsetX=e.textShadowOffsetX||0,T.shadowOffsetY=e.textShadowOffsetY||0),T.stroke=_,T.fill=S,_&&(T.lineWidth=e.lineWidth||b,T.lineDash=e.lineDash,T.lineDashOffset=e.lineDashOffset||0),T.font=t,Qy(T,e),v+=u,k&&I.setBoundingRect(new Dh(_g(T.x,e.width,T.textAlign),Ag(T.y,C,T.textBaseline),l,C))}},t.prototype._updateRichTexts=function(){var e=this.style,t=function(e,t){var n=new hv;if(null!=e&&(e+=""),!e)return n;for(var r,o=t.width,i=t.height,a=t.overflow,s="break"!==a&&"breakAll"!==a||null==o?null:{width:o,accumWidth:0,breakAll:"breakAll"===a},l=iv.lastIndex=0;null!=(r=iv.exec(e));){var c=r.index;c>l&&pv(n,e.substring(l,c),t,s),pv(n,r[2],t,s,r[1]),l=iv.lastIndex}l<e.length&&pv(n,e.substring(l,e.length),t,s);var u=[],d=0,h=0,p=t.padding,f="truncate"===a,g="truncate"===t.lineOverflow;function m(e,t,n){e.width=t,e.lineHeight=n,d+=n,h=Math.max(h,t)}e:for(var v=0;v<n.lines.length;v++){for(var y=n.lines[v],x=0,b=0,w=0;w<y.tokens.length;w++){var S=(P=y.tokens[w]).styleName&&t.rich[P.styleName]||{},_=P.textPadding=S.padding,A=_?_[1]+_[3]:0,k=P.font=S.font||t.font;P.contentHeight=kg(k);var C=Ju(S.height,P.contentHeight);if(P.innerHeight=C,_&&(C+=_[0]+_[2]),P.height=C,P.lineHeight=ed(S.lineHeight,t.lineHeight,C),P.align=S&&S.align||t.align,P.verticalAlign=S&&S.verticalAlign||"middle",g&&null!=i&&d+P.lineHeight>i){w>0?(y.tokens=y.tokens.slice(0,w),m(y,b,x),n.lines=n.lines.slice(0,v+1)):n.lines=n.lines.slice(0,v);break e}var M=S.width,I=null==M||"auto"===M;if("string"===typeof M&&"%"===M.charAt(M.length-1))P.percentWidth=M,u.push(P),P.contentWidth=bg(P.text,k);else{if(I){var T=S.backgroundColor,D=T&&T.image;D&&ov(D=tv(D))&&(P.width=Math.max(P.width,D.width*C/D.height))}var j=f&&null!=o?o-b:null;null!=j&&j<P.width?!I||j<A?(P.text="",P.width=P.contentWidth=0):(P.text=av(P.text,j-A,k,t.ellipsis,{minChar:t.truncateMinChar}),P.width=P.contentWidth=bg(P.text,k)):P.contentWidth=bg(P.text,k)}P.width+=A,b+=P.width,S&&(x=Math.max(x,P.lineHeight))}m(y,b,x)}for(n.outerWidth=n.width=Ju(o,h),n.outerHeight=n.height=Ju(i,d),n.contentHeight=d,n.contentWidth=h,p&&(n.outerWidth+=p[1]+p[3],n.outerHeight+=p[0]+p[2]),v=0;v<u.length;v++){var P,L=(P=u[v]).percentWidth;P.width=parseInt(L,10)/100*n.width}return n}(ox(e),e),n=t.width,r=t.outerWidth,o=t.outerHeight,i=e.padding,a=e.x||0,s=e.y||0,l=this._defaultStyle,c=e.align||l.align,u=e.verticalAlign||l.verticalAlign,d=_g(a,r,c),h=Ag(s,o,u),p=d,f=h;i&&(p+=i[3],f+=i[0]);var g=p+n;ix(e)&&this._renderBackground(e,e,d,h,r,o);for(var m=!!e.backgroundColor,v=0;v<t.lines.length;v++){for(var y=t.lines[v],x=y.tokens,b=x.length,w=y.lineHeight,S=y.width,_=0,A=p,k=g,C=b-1,M=void 0;_<b&&(!(M=x[_]).align||"left"===M.align);)this._placeToken(M,e,w,f,A,"left",m),S-=M.width,A+=M.width,_++;for(;C>=0&&"right"===(M=x[C]).align;)this._placeToken(M,e,w,f,k,"right",m),S-=M.width,k-=M.width,C--;for(A+=(n-(A-p)-(g-k)-S)/2;_<=C;)M=x[_],this._placeToken(M,e,w,f,A+M.width/2,"center",m),A+=M.width,_++;f+=w}},t.prototype._placeToken=function(e,t,n,r,o,i,a){var s=t.rich[e.styleName]||{};s.text=e.text;var l=e.verticalAlign,c=r+n/2;"top"===l?c=r+e.height/2:"bottom"===l&&(c=r+n-e.height/2),!e.isLineHolder&&ix(s)&&this._renderBackground(s,t,"right"===i?o-e.width:"center"===i?o-e.width/2:o,c-e.height/2,e.width,e.height);var u=!!s.backgroundColor,d=e.textPadding;d&&(o=rx(o,i,d),c-=e.height/2-d[0]-e.innerHeight/2);var h=this._getOrCreateChild(Py),p=h.createStyle();h.useStyle(p);var f=this._defaultStyle,g=!1,m=0,v=nx("fill"in s?s.fill:"fill"in t?t.fill:(g=!0,f.fill)),y=tx("stroke"in s?s.stroke:"stroke"in t?t.stroke:u||a||f.autoStroke&&!g?null:(m=2,f.stroke)),x=s.textShadowBlur>0||t.textShadowBlur>0;p.text=e.text,p.x=o,p.y=c,x&&(p.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,p.shadowColor=s.textShadowColor||t.textShadowColor||"transparent",p.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),p.textAlign=i,p.textBaseline="middle",p.font=e.font||cu,p.opacity=ed(s.opacity,t.opacity,1),Qy(p,s),y&&(p.lineWidth=ed(s.lineWidth,t.lineWidth,m),p.lineDash=Ju(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=y),v&&(p.fill=v);var b=e.contentWidth,w=e.contentHeight;h.setBoundingRect(new Dh(_g(p.x,b,p.textAlign),Ag(p.y,w,p.textBaseline),b,w))},t.prototype._renderBackground=function(e,t,n,r,o,i){var a,s,l,c=e.backgroundColor,u=e.borderWidth,d=e.borderColor,h=c&&c.image,p=c&&!h,f=e.borderRadius,g=this;if(p||e.lineHeight||u&&d){(a=this._getOrCreateChild(Gy)).useStyle(a.createStyle()),a.style.fill=null;var m=a.shape;m.x=n,m.y=r,m.width=o,m.height=i,m.r=f,a.dirtyShape()}if(p)(l=a.style).fill=c||null,l.fillOpacity=Ju(e.fillOpacity,1);else if(h){(s=this._getOrCreateChild(Ny)).onload=function(){g.dirtyStyle()};var v=s.style;v.image=c.image,v.x=n,v.y=r,v.width=o,v.height=i}u&&d&&((l=a.style).lineWidth=u,l.stroke=d,l.strokeOpacity=Ju(e.strokeOpacity,1),l.lineDash=e.borderDash,l.lineDashOffset=e.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(l.strokeFirst=!0,l.lineWidth*=2));var y=(a||s).style;y.shadowBlur=e.shadowBlur||0,y.shadowColor=e.shadowColor||"transparent",y.shadowOffsetX=e.shadowOffsetX||0,y.shadowOffsetY=e.shadowOffsetY||0,y.opacity=ed(e.opacity,t.opacity,1)},t.makeFont=function(e){var t="";return Jy(e)&&(t=[e.fontStyle,e.fontWeight,$y(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),t&&od(t)||e.textFont||e.font},t}(kv),qy={left:!0,right:1,center:1},Zy={top:1,bottom:1,middle:1},Ky=["fontStyle","fontWeight","fontSize","fontFamily"];function $y(e){return"string"!==typeof e||-1===e.indexOf("px")&&-1===e.indexOf("rem")&&-1===e.indexOf("em")?isNaN(+e)?su+"px":e+"px":e}function Qy(e,t){for(var n=0;n<Ky.length;n++){var r=Ky[n],o=t[r];null!=o&&(e[r]=o)}}function Jy(e){return null!=e.fontSize||e.fontFamily||e.fontWeight}function ex(e){if(e){e.font=Yy.makeFont(e);var t=e.align;"middle"===t&&(t="center"),e.align=null==t||qy[t]?t:"left";var n=e.verticalAlign;"center"===n&&(n="middle"),e.verticalAlign=null==n||Zy[n]?n:"top",e.padding&&(e.padding=nd(e.padding))}}function tx(e,t){return null==e||t<=0||"transparent"===e||"none"===e?null:e.image||e.colorStops?"#000":e}function nx(e){return null==e||"none"===e?null:e.image||e.colorStops?"#000":e}function rx(e,t,n){return"right"===t?e-n[1]:"center"===t?e+n[3]/2-n[1]/2:e+n[3]}function ox(e){var t=e.text;return null!=t&&(t+=""),t}function ix(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}const ax=Yy;var sx=jm(),lx=function(e,t,n,r){if(r){var o=sx(r);o.dataIndex=n,o.dataType=t,o.seriesIndex=e,o.ssrType="chart","group"===r.type&&r.traverse((function(r){var o=sx(r);o.seriesIndex=e,o.dataIndex=n,o.dataType=t,o.ssrType="chart"}))}},cx=1,ux={},dx=jm(),hx=jm(),px=0,fx=1,gx=2,mx=["emphasis","blur","select"],vx=["normal","emphasis","blur","select"],yx=10,xx=9,bx="highlight",Sx="downplay",_x="select",Ax="unselect",kx="toggleSelect";function Cx(e){return null!=e&&"none"!==e}function Mx(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function Ix(e){Mx(e,"emphasis",gx)}function Tx(e){e.hoverState===gx&&Mx(e,"normal",px)}function Dx(e){Mx(e,"blur",fx)}function jx(e){e.hoverState===fx&&Mx(e,"normal",px)}function Px(e){e.selected=!0}function Lx(e){e.selected=!1}function Rx(e,t,n){t(e,n)}function Ex(e,t,n){Rx(e,t,n),e.isGroup&&e.traverse((function(e){Rx(e,t,n)}))}function Nx(e,t){switch(t){case"emphasis":e.hoverState=gx;break;case"normal":e.hoverState=px;break;case"blur":e.hoverState=fx;break;case"select":e.selected=!0}}function Ox(e,t){var n=this.states[e];if(this.style){if("emphasis"===e)return function(e,t,n,r){var o=n&&ju(n,"select")>=0,i=!1;if(e instanceof Ty){var a=dx(e),s=o&&a.selectFill||a.normalFill,l=o&&a.selectStroke||a.normalStroke;if(Cx(s)||Cx(l)){var c=(r=r||{}).style||{};"inherit"===c.fill?(i=!0,r=Tu({},r),(c=Tu({},c)).fill=s):!Cx(c.fill)&&Cx(s)?(i=!0,r=Tu({},r),(c=Tu({},c)).fill=af(s)):!Cx(c.stroke)&&Cx(l)&&(i||(r=Tu({},r),c=Tu({},c)),c.stroke=af(l)),r.style=c}}if(r&&null==r.z2){i||(r=Tu({},r));var u=e.z2EmphasisLift;r.z2=e.z2+(null!=u?u:yx)}return r}(this,0,t,n);if("blur"===e)return function(e,t,n){var r=ju(e.currentStates,t)>=0,o=e.style.opacity,i=r?null:function(e,t,n,r){for(var o=e.style,i={},a=0;a<t.length;a++){var s=t[a],l=o[s];i[s]=null==l?r&&r[s]:l}for(a=0;a<e.animators.length;a++){var c=e.animators[a];c.__fromStateTransition&&c.__fromStateTransition.indexOf(n)<0&&"style"===c.targetName&&c.saveTo(i,t)}return i}(e,["opacity"],t,{opacity:1}),a=(n=n||{}).style||{};return null==a.opacity&&(n=Tu({},n),a=Tu({opacity:r?o:.1*i.opacity},a),n.style=a),n}(this,e,n);if("select"===e)return function(e,t,n){if(n&&null==n.z2){n=Tu({},n);var r=e.z2SelectLift;n.z2=e.z2+(null!=r?r:xx)}return n}(this,0,n)}return n}function zx(e){e.stateProxy=Ox;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=Ox),n&&(n.stateProxy=Ox)}function Bx(e,t){!Yx(e,t)&&!e.__highByOuter&&Ex(e,Ix)}function Fx(e,t){!Yx(e,t)&&!e.__highByOuter&&Ex(e,Tx)}function Vx(e,t){e.__highByOuter|=1<<(t||0),Ex(e,Ix)}function Wx(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&Ex(e,Tx)}function Hx(e){Ex(e,Dx)}function Gx(e){Ex(e,jx)}function Ux(e){Ex(e,Px)}function Xx(e){Ex(e,Lx)}function Yx(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function qx(e){var t=e.getModel(),n=[],r=[];t.eachComponent((function(t,o){var i=hx(o),a="series"===t,s=a?e.getViewOfSeriesModel(o):e.getViewOfComponentModel(o);!a&&r.push(s),i.isBlured&&(s.group.traverse((function(e){jx(e)})),a&&n.push(o)),i.isBlured=!1})),Ru(r,(function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)}))}function Zx(e,t,n,r){var o=r.getModel();function i(e,t){for(var n=0;n<t.length;n++){var r=e.getItemGraphicEl(t[n]);r&&Gx(r)}}if(n=n||"coordinateSystem",null!=e&&t&&"none"!==t){var a=o.getSeriesByIndex(e),s=a.coordinateSystem;s&&s.master&&(s=s.master);var l=[];o.eachSeries((function(e){var o=a===e,c=e.coordinateSystem;if(c&&c.master&&(c=c.master),!("series"===n&&!o||"coordinateSystem"===n&&!(c&&s?c===s:o)||"series"===t&&o)){if(r.getViewOfSeriesModel(e).group.traverse((function(e){e.__highByOuter&&o&&"self"===t||Dx(e)})),Lu(t))i(e.getData(),t);else if(Xu(t))for(var u=zu(t),d=0;d<u.length;d++)i(e.getData(u[d]),t[u[d]]);l.push(e),hx(e).isBlured=!0}})),o.eachComponent((function(e,t){if("series"!==e){var n=r.getViewOfComponentModel(t);n&&n.toggleBlurSeries&&n.toggleBlurSeries(l,!0,o)}}))}}function Kx(e,t,n){if(null!=e&&null!=t){var r=n.getModel().getComponent(e,t);if(r){hx(r).isBlured=!0;var o=n.getViewOfComponentModel(r);o&&o.focusBlurEnabled&&o.group.traverse((function(e){Dx(e)}))}}}function $x(e,t,n,r){var o={focusSelf:!1,dispatchers:null};if(null==e||"series"===e||null==t||null==n)return o;var i=r.getModel().getComponent(e,t);if(!i)return o;var a=r.getViewOfComponentModel(i);if(!a||!a.findHighDownDispatchers)return o;for(var s,l=a.findHighDownDispatchers(n),c=0;c<l.length;c++)if("self"===sx(l[c]).focus){s=!0;break}return{focusSelf:s,dispatchers:l}}function Qx(e){Ru(e.getAllData(),(function(t){var n=t.data,r=t.type;n.eachItemGraphicEl((function(t,n){e.isSelected(n,r)?Ux(t):Xx(t)}))}))}function Jx(e){var t=[];return e.eachSeries((function(e){Ru(e.getAllData(),(function(n){n.data;var r=n.type,o=e.getSelectedDataIndices();if(o.length>0){var i={dataIndex:o,seriesIndex:e.seriesIndex};null!=r&&(i.dataType=r),t.push(i)}}))})),t}function eb(e,t,n){ab(e,!0),Ex(e,zx),nb(e,t,n)}function tb(e,t,n,r){r?function(e){ab(e,!1)}(e):eb(e,t,n)}function nb(e,t,n){var r=sx(e);null!=t?(r.focus=t,r.blurScope=n):r.focus&&(r.focus=null)}var rb=["emphasis","blur","select"],ob={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function ib(e,t,n,r){n=n||"itemStyle";for(var o=0;o<rb.length;o++){var i=rb[o],a=t.getModel([i,n]);e.ensureState(i).style=r?r(a):a[ob[n]]()}}function ab(e,t){var n=!1===t,r=e;e.highDownSilentOnTouch&&(r.__highDownSilentOnTouch=e.highDownSilentOnTouch),n&&!r.__highDownDispatcher||(r.__highByOuter=r.__highByOuter||0,r.__highDownDispatcher=!n)}function sb(e){return!(!e||!e.__highDownDispatcher)}function lb(e){var t=e.type;return t===_x||t===Ax||t===kx}function cb(e){var t=e.type;return t===bx||t===Sx}var ub=jm();function db(e,t,n,r,o){var i;if(t&&t.ecModel){var a=t.ecModel.getUpdatePayload();i=a&&a.animation}var s="update"===e;if(t&&t.isAnimationEnabled()){var l=void 0,c=void 0,u=void 0;return r?(l=Ju(r.duration,200),c=Ju(r.easing,"cubicOut"),u=0):(l=t.getShallow(s?"animationDurationUpdate":"animationDuration"),c=t.getShallow(s?"animationEasingUpdate":"animationEasing"),u=t.getShallow(s?"animationDelayUpdate":"animationDelay")),i&&(null!=i.duration&&(l=i.duration),null!=i.easing&&(c=i.easing),null!=i.delay&&(u=i.delay)),Wu(u)&&(u=u(n,o)),Wu(l)&&(l=l(n)),{duration:l||0,delay:u,easing:c}}return null}function hb(e,t,n,r,o,i,a){var s,l=!1;Wu(o)?(a=i,i=o,o=null):Xu(o)&&(i=o.cb,a=o.during,l=o.isFrom,s=o.removeOpt,o=o.dataIndex);var c="leave"===e;c||t.stopAnimation("leave");var u=db(e,r,o,c?s||{}:null,r&&r.getAnimationDelayParams?r.getAnimationDelayParams(t,o):null);if(u&&u.duration>0){var d={duration:u.duration,delay:u.delay||0,easing:u.easing,done:i,force:!!i||!!a,setToFinal:!c,scope:e,during:a};l?t.animateFrom(n,d):t.animateTo(n,d)}else t.stopAnimation(),!l&&t.attr(n),a&&a(1),i&&i()}function pb(e,t,n,r,o,i){hb("update",e,t,n,r,o,i)}function fb(e,t,n,r,o,i){hb("enter",e,t,n,r,o,i)}function gb(e){if(!e.__zr)return!0;for(var t=0;t<e.animators.length;t++){if("leave"===e.animators[t].scope)return!0}return!1}function mb(e,t,n,r,o,i){gb(e)||hb("leave",e,t,n,r,o,i)}function vb(e,t,n,r){e.removeTextContent(),e.removeTextGuideLine(),mb(e,{style:{opacity:0}},t,n,r)}function yb(e,t,n){function r(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse((function(e){e.isGroup||vb(e,t,n,r)})):vb(e,t,n,r)}function xb(e){ub(e).oldStyle=e.style}var bb={};function wb(e,t){for(var n=0;n<mx.length;n++){var r=mx[n],o=t[r],i=e.ensureState(r);i.style=i.style||{},i.style.text=o}var a=e.currentStates.slice();e.clearStates(!0),e.setStyle({text:t.normal}),e.useStates(a,!0)}function Sb(e,t,n){var r,o=e.labelFetcher,i=e.labelDataIndex,a=e.labelDimIndex,s=t.normal;o&&(r=o.getFormattedLabel(i,"normal",null,a,s&&s.get("formatter"),null!=n?{interpolatedValue:n}:null)),null==r&&(r=Wu(e.defaultText)?e.defaultText(i,e,n):e.defaultText);for(var l={normal:r},c=0;c<mx.length;c++){var u=mx[c],d=t[u];l[u]=Ju(o?o.getFormattedLabel(i,u,null,a,d&&d.get("formatter")):null,r)}return l}function _b(e,t,n,r){n=n||bb;for(var o=e instanceof ax,i=!1,a=0;a<vx.length;a++){if((h=t[vx[a]])&&h.getShallow("show")){i=!0;break}}var s=o?e:e.getTextContent();if(i){o||(s||(s=new ax,e.setTextContent(s)),e.stateProxy&&(s.stateProxy=e.stateProxy));var l=Sb(n,t),c=t.normal,u=!!c.getShallow("show"),d=kb(c,r&&r.normal,n,!1,!o);d.text=l.normal,o||e.setTextConfig(Cb(c,n,!1));for(a=0;a<mx.length;a++){var h,p=mx[a];if(h=t[p]){var f=s.ensureState(p),g=!!Ju(h.getShallow("show"),u);if(g!==u&&(f.ignore=!g),f.style=kb(h,r&&r[p],n,!0,!o),f.style.text=l[p],!o)e.ensureState(p).textConfig=Cb(h,n,!0)}}s.silent=!!c.getShallow("silent"),null!=s.style.x&&(d.x=s.style.x),null!=s.style.y&&(d.y=s.style.y),s.ignore=!u,s.useStyle(d),s.dirty(),n.enableTextSetter&&(Pb(s).setLabelText=function(e){var r=Sb(n,t,e);wb(s,r)})}else s&&(s.ignore=!0);e.dirty()}function Ab(e,t){t=t||"label";for(var n={normal:e.getModel(t)},r=0;r<mx.length;r++){var o=mx[r];n[o]=e.getModel([o,t])}return n}function kb(e,t,n,r,o){var i={};return function(e,t,n,r,o){n=n||bb;var i,a=t.ecModel,s=a&&a.option.textStyle,l=function(e){var t;for(;e&&e!==e.ecModel;){var n=(e.option||bb).rich;if(n){t=t||{};for(var r=zu(n),o=0;o<r.length;o++){t[r[o]]=1}}e=e.parentModel}return t}(t);if(l)for(var c in i={},l)if(l.hasOwnProperty(c)){var u=t.getModel(["rich",c]);Db(i[c]={},u,s,n,r,o,!1,!0)}i&&(e.rich=i);var d=t.get("overflow");d&&(e.overflow=d);var h=t.get("minMargin");null!=h&&(e.margin=h);Db(e,t,s,n,r,o,!0,!1)}(i,e,n,r,o),t&&Tu(i,t),i}function Cb(e,t,n){t=t||{};var r,o={},i=e.getShallow("rotate"),a=Ju(e.getShallow("distance"),n?null:5),s=e.getShallow("offset");return"outside"===(r=e.getShallow("position")||(n?null:"inside"))&&(r=t.defaultOutsidePosition||"top"),null!=r&&(o.position=r),null!=s&&(o.offset=s),null!=i&&(i*=Math.PI/180,o.rotation=i),null!=a&&(o.distance=a),o.outsideFill="inherit"===e.get("color")?t.inheritColor||null:"auto",o}var Mb=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],Ib=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],Tb=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function Db(e,t,n,r,o,i,a,s){n=!o&&n||bb;var l=r&&r.inheritColor,c=t.getShallow("color"),u=t.getShallow("textBorderColor"),d=Ju(t.getShallow("opacity"),n.opacity);"inherit"!==c&&"auto"!==c||(c=l||null),"inherit"!==u&&"auto"!==u||(u=l||null),i||(c=c||n.color,u=u||n.textBorderColor),null!=c&&(e.fill=c),null!=u&&(e.stroke=u);var h=Ju(t.getShallow("textBorderWidth"),n.textBorderWidth);null!=h&&(e.lineWidth=h);var p=Ju(t.getShallow("textBorderType"),n.textBorderType);null!=p&&(e.lineDash=p);var f=Ju(t.getShallow("textBorderDashOffset"),n.textBorderDashOffset);null!=f&&(e.lineDashOffset=f),o||null!=d||s||(d=r&&r.defaultOpacity),null!=d&&(e.opacity=d),o||i||null==e.fill&&r.inheritColor&&(e.fill=r.inheritColor);for(var g=0;g<Mb.length;g++){var m=Mb[g];null!=(y=Ju(t.getShallow(m),n[m]))&&(e[m]=y)}for(g=0;g<Ib.length;g++){m=Ib[g];null!=(y=t.getShallow(m))&&(e[m]=y)}if(null==e.verticalAlign){var v=t.getShallow("baseline");null!=v&&(e.verticalAlign=v)}if(!a||!r.disableBox){for(g=0;g<Tb.length;g++){var y;m=Tb[g];null!=(y=t.getShallow(m))&&(e[m]=y)}var x=t.getShallow("borderType");null!=x&&(e.borderDash=x),"auto"!==e.backgroundColor&&"inherit"!==e.backgroundColor||!l||(e.backgroundColor=l),"auto"!==e.borderColor&&"inherit"!==e.borderColor||!l||(e.borderColor=l)}}function jb(e,t){var n=t&&t.getModel("textStyle");return od([e.fontStyle||n&&n.getShallow("fontStyle")||"",e.fontWeight||n&&n.getShallow("fontWeight")||"",(e.fontSize||n&&n.getShallow("fontSize")||12)+"px",e.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "))}var Pb=jm();function Lb(e,t,n,r){if(e){var o=Pb(e);o.prevValue=o.value,o.value=n;var i=t.normal;o.valueAnimation=i.get("valueAnimation"),o.valueAnimation&&(o.precision=i.get("precision"),o.defaultInterpolatedText=r,o.statesModels=t)}}function Rb(e,t,n,r,o){var i=Pb(e);if(i.valueAnimation&&i.prevValue!==i.value){var a=i.defaultInterpolatedText,s=Ju(i.interpolatedValue,i.prevValue),l=i.value;e.percent=0,(null==i.prevValue?fb:pb)(e,{percent:1},r,t,null,(function(r){var c=Fm(n,i.precision,s,l,r);i.interpolatedValue=1===r?null:c;var u=Sb({labelDataIndex:t,labelFetcher:o,defaultText:a?a(c):c+""},i.statesModels,c);wb(e,u)}))}}var Eb=["textStyle","color"],Nb=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],Ob=new ax,zb=function(){function e(){}return e.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(Eb):null)},e.prototype.getFont=function(){return jb({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},e.prototype.getTextRect=function(e){for(var t={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<Nb.length;n++)t[Nb[n]]=this.getShallow(Nb[n]);return Ob.useStyle(t),Ob.update(),Ob.getBoundingRect()},e}();const Bb=zb;var Fb=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],Vb=$m(Fb),Wb=function(){function e(){}return e.prototype.getLineStyle=function(e){return Vb(this,e)},e}(),Hb=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],Gb=$m(Hb),Ub=function(){function e(){}return e.prototype.getItemStyle=function(e,t){return Gb(this,e,t)},e}(),Xb=function(){function e(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}return e.prototype.init=function(e,t,n){for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o]},e.prototype.mergeOption=function(e,t){Mu(this.option,e,!0)},e.prototype.get=function(e,t){return null==e?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)},e.prototype.getShallow=function(e,t){var n=this.option,r=null==n?n:n[e];if(null==r&&!t){var o=this.parentModel;o&&(r=o.getShallow(e))}return r},e.prototype.getModel=function(t,n){var r=null!=t,o=r?this.parsePath(t):null;return new e(r?this._doGet(o):this.option,n=n||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(o)),this.ecModel)},e.prototype.isEmpty=function(){return null==this.option},e.prototype.restoreData=function(){},e.prototype.clone=function(){return new(0,this.constructor)(Cu(this.option))},e.prototype.parsePath=function(e){return"string"===typeof e?e.split("."):e},e.prototype.resolveParentPath=function(e){return e},e.prototype.isAnimationEnabled=function(){if(!au.node&&this.option){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},e.prototype._doGet=function(e,t){var n=this.option;if(!e)return n;for(var r=0;r<e.length&&(!e[r]||null!=(n=n&&"object"===typeof n?n[e[r]]:null));r++);return null==n&&t&&(n=t._doGet(this.resolveParentPath(e),t.parentModel)),n},e}();Um(Xb),function(e){var t=["__\0is_clz",Ym++].join("_");e.prototype[t]=!0,e.isInstance=function(e){return!(!e||!e[t])}}(Xb),Pu(Xb,Wb),Pu(Xb,Ub),Pu(Xb,Jm),Pu(Xb,Bb);const Yb=Xb;var qb=Math.round(10*Math.random());function Zb(e){return[e||"",qb++].join("_")}function Kb(e,t){return Mu(Mu({},e,!0),t,!0)}var $b="ZH",Qb="EN",Jb=Qb,ew={},tw={},nw=au.domSupported&&(document.documentElement.lang||navigator.language||navigator.browserLanguage||Jb).toUpperCase().indexOf($b)>-1?$b:Jb;function rw(e,t){e=e.toUpperCase(),tw[e]=new Yb(t),ew[e]=t}function ow(e){return tw[e]}rw(Qb,{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:". "}}}}),rw($b,{time:{month:["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"],monthAbbr:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],dayOfWeek:["\u661f\u671f\u65e5","\u661f\u671f\u4e00","\u661f\u671f\u4e8c","\u661f\u671f\u4e09","\u661f\u671f\u56db","\u661f\u671f\u4e94","\u661f\u671f\u516d"],dayOfWeekAbbr:["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"]},legend:{selector:{all:"\u5168\u9009",inverse:"\u53cd\u9009"}},toolbox:{brush:{title:{rect:"\u77e9\u5f62\u9009\u62e9",polygon:"\u5708\u9009",lineX:"\u6a2a\u5411\u9009\u62e9",lineY:"\u7eb5\u5411\u9009\u62e9",keep:"\u4fdd\u6301\u9009\u62e9",clear:"\u6e05\u9664\u9009\u62e9"}},dataView:{title:"\u6570\u636e\u89c6\u56fe",lang:["\u6570\u636e\u89c6\u56fe","\u5173\u95ed","\u5237\u65b0"]},dataZoom:{title:{zoom:"\u533a\u57df\u7f29\u653e",back:"\u533a\u57df\u7f29\u653e\u8fd8\u539f"}},magicType:{title:{line:"\u5207\u6362\u4e3a\u6298\u7ebf\u56fe",bar:"\u5207\u6362\u4e3a\u67f1\u72b6\u56fe",stack:"\u5207\u6362\u4e3a\u5806\u53e0",tiled:"\u5207\u6362\u4e3a\u5e73\u94fa"}},restore:{title:"\u8fd8\u539f"},saveAsImage:{title:"\u4fdd\u5b58\u4e3a\u56fe\u7247",lang:["\u53f3\u952e\u53e6\u5b58\u4e3a\u56fe\u7247"]}},series:{typeNames:{pie:"\u997c\u56fe",bar:"\u67f1\u72b6\u56fe",line:"\u6298\u7ebf\u56fe",scatter:"\u6563\u70b9\u56fe",effectScatter:"\u6d9f\u6f2a\u6563\u70b9\u56fe",radar:"\u96f7\u8fbe\u56fe",tree:"\u6811\u56fe",treemap:"\u77e9\u5f62\u6811\u56fe",boxplot:"\u7bb1\u578b\u56fe",candlestick:"K\u7ebf\u56fe",k:"K\u7ebf\u56fe",heatmap:"\u70ed\u529b\u56fe",map:"\u5730\u56fe",parallel:"\u5e73\u884c\u5750\u6807\u56fe",lines:"\u7ebf\u56fe",graph:"\u5173\u7cfb\u56fe",sankey:"\u6851\u57fa\u56fe",funnel:"\u6f0f\u6597\u56fe",gauge:"\u4eea\u8868\u76d8\u56fe",pictorialBar:"\u8c61\u5f62\u67f1\u56fe",themeRiver:"\u4e3b\u9898\u6cb3\u6d41\u56fe",sunburst:"\u65ed\u65e5\u56fe",custom:"\u81ea\u5b9a\u4e49\u56fe\u8868",chart:"\u56fe\u8868"}},aria:{general:{withTitle:"\u8fd9\u662f\u4e00\u4e2a\u5173\u4e8e\u201c{title}\u201d\u7684\u56fe\u8868\u3002",withoutTitle:"\u8fd9\u662f\u4e00\u4e2a\u56fe\u8868\uff0c"},series:{single:{prefix:"",withName:"\u56fe\u8868\u7c7b\u578b\u662f{seriesType}\uff0c\u8868\u793a{seriesName}\u3002",withoutName:"\u56fe\u8868\u7c7b\u578b\u662f{seriesType}\u3002"},multiple:{prefix:"\u5b83\u7531{seriesCount}\u4e2a\u56fe\u8868\u7cfb\u5217\u7ec4\u6210\u3002",withName:"\u7b2c{seriesId}\u4e2a\u7cfb\u5217\u662f\u4e00\u4e2a\u8868\u793a{seriesName}\u7684{seriesType}\uff0c",withoutName:"\u7b2c{seriesId}\u4e2a\u7cfb\u5217\u662f\u4e00\u4e2a{seriesType}\uff0c",separator:{middle:"\uff1b",end:"\u3002"}}},data:{allData:"\u5176\u6570\u636e\u662f\u2014\u2014",partialData:"\u5176\u4e2d\uff0c\u524d{displayCnt}\u9879\u662f\u2014\u2014",withName:"{name}\u7684\u6570\u636e\u662f{value}",withoutName:"{value}",separator:{middle:"\uff0c",end:""}}}});var iw=1e3,aw=60*iw,sw=60*aw,lw=24*sw,cw=365*lw,uw={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},dw="{yyyy}-{MM}-{dd}",hw={year:"{yyyy}",month:"{yyyy}-{MM}",day:dw,hour:dw+" "+uw.hour,minute:dw+" "+uw.minute,second:dw+" "+uw.second,millisecond:uw.none},pw=["year","month","day","hour","minute","second","millisecond"],fw=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function gw(e,t){return"0000".substr(0,t-(e+="").length)+e}function mw(e){switch(e){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return e}}function vw(e){return e===mw(e)}function yw(e,t,n,r){var o=am(e),i=o[ww(n)](),a=o[Sw(n)]()+1,s=Math.floor((a-1)/3)+1,l=o[_w(n)](),c=o["get"+(n?"UTC":"")+"Day"](),u=o[Aw(n)](),d=(u-1)%12+1,h=o[kw(n)](),p=o[Cw(n)](),f=o[Mw(n)](),g=u>=12?"pm":"am",m=g.toUpperCase(),v=(r instanceof Yb?r:ow(r||nw)||tw[Jb]).getModel("time"),y=v.get("month"),x=v.get("monthAbbr"),b=v.get("dayOfWeek"),w=v.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,g+"").replace(/{A}/g,m+"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,gw(i%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,y[a-1]).replace(/{MMM}/g,x[a-1]).replace(/{MM}/g,gw(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,gw(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,b[c]).replace(/{ee}/g,w[c]).replace(/{e}/g,c+"").replace(/{HH}/g,gw(u,2)).replace(/{H}/g,u+"").replace(/{hh}/g,gw(d+"",2)).replace(/{h}/g,d+"").replace(/{mm}/g,gw(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,gw(p,2)).replace(/{s}/g,p+"").replace(/{SSS}/g,gw(f,3)).replace(/{S}/g,f+"")}function xw(e,t){var n=am(e),r=n[Sw(t)]()+1,o=n[_w(t)](),i=n[Aw(t)](),a=n[kw(t)](),s=n[Cw(t)](),l=0===n[Mw(t)](),c=l&&0===s,u=c&&0===a,d=u&&0===i,h=d&&1===o;return h&&1===r?"year":h?"month":d?"day":u?"hour":c?"minute":l?"second":"millisecond"}function bw(e,t,n){var r=Uu(e)?am(e):e;switch(t=t||xw(e,n)){case"year":return r[ww(n)]();case"half-year":return r[Sw(n)]()>=6?1:0;case"quarter":return Math.floor((r[Sw(n)]()+1)/4);case"month":return r[Sw(n)]();case"day":return r[_w(n)]();case"half-day":return r[Aw(n)]()/24;case"hour":return r[Aw(n)]();case"minute":return r[kw(n)]();case"second":return r[Cw(n)]();case"millisecond":return r[Mw(n)]()}}function ww(e){return e?"getUTCFullYear":"getFullYear"}function Sw(e){return e?"getUTCMonth":"getMonth"}function _w(e){return e?"getUTCDate":"getDate"}function Aw(e){return e?"getUTCHours":"getHours"}function kw(e){return e?"getUTCMinutes":"getMinutes"}function Cw(e){return e?"getUTCSeconds":"getSeconds"}function Mw(e){return e?"getUTCMilliseconds":"getMilliseconds"}function Iw(e){return e?"setUTCFullYear":"setFullYear"}function Tw(e){return e?"setUTCMonth":"setMonth"}function Dw(e){return e?"setUTCDate":"setDate"}function jw(e){return e?"setUTCHours":"setHours"}function Pw(e){return e?"setUTCMinutes":"setMinutes"}function Lw(e){return e?"setUTCSeconds":"setSeconds"}function Rw(e){return e?"setUTCMilliseconds":"setMilliseconds"}function Ew(e){if(!hm(e))return Hu(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function Nw(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,(function(e,t){return t.toUpperCase()})),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var Ow=nd;function zw(e,t,n){function r(e){return e&&od(e)?e:"-"}function o(e){return!(null==e||isNaN(e)||!isFinite(e))}var i="time"===t,a=e instanceof Date;if(i||a){var s=i?am(e):e;if(!isNaN(+s))return yw(s,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===t)return Gu(e)?r(e):Uu(e)&&o(e)?e+"":"-";var l=dm(e);return o(l)?Ew(l):Gu(e)?r(e):"boolean"===typeof e?e+"":"-"}var Bw=["a","b","c","d","e","f","g"],Fw=function(e,t){return"{"+e+(null==t?"":t)+"}"};function Vw(e,t,n){Vu(t)||(t=[t]);var r=t.length;if(!r)return"";for(var o=t[0].$vars||[],i=0;i<o.length;i++){var a=Bw[i];e=e.replace(Fw(a),Fw(a,0))}for(var s=0;s<r;s++)for(var l=0;l<o.length;l++){var c=t[s][o[l]];e=e.replace(Fw(Bw[l],s),n?Qd(c):c)}return e}function Ww(e,t){return t=t||"transparent",Hu(e)?e:Xu(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function Hw(e,t){if("_blank"===t||"blank"===t){var n=window.open();n.opener=null,n.location.href=e}else window.open(e,t)}var Gw=Ru,Uw=["left","right","top","bottom","width","height"],Xw=[["width","left","right"],["height","top","bottom"]];function Yw(e,t,n,r,o){var i=0,a=0;null==r&&(r=1/0),null==o&&(o=1/0);var s=0;t.eachChild((function(l,c){var u,d,h=l.getBoundingRect(),p=t.childAt(c+1),f=p&&p.getBoundingRect();if("horizontal"===e){var g=h.width+(f?-f.x+h.x:0);(u=i+g)>r||l.newline?(i=0,u=g,a+=s+n,s=h.height):s=Math.max(s,h.height)}else{var m=h.height+(f?-f.y+h.y:0);(d=a+m)>o||l.newline?(i+=s+n,a=0,d=m,s=h.width):s=Math.max(s,h.width)}l.newline||(l.x=i,l.y=a,l.markRedraw(),"horizontal"===e?i=u+n:a=d+n)}))}var qw=Yw;Fu(Yw,"vertical"),Fu(Yw,"horizontal");function Zw(e,t,n){n=Ow(n||0);var r=t.width,o=t.height,i=Zg(e.left,r),a=Zg(e.top,o),s=Zg(e.right,r),l=Zg(e.bottom,o),c=Zg(e.width,r),u=Zg(e.height,o),d=n[2]+n[0],h=n[1]+n[3],p=e.aspect;switch(isNaN(c)&&(c=r-s-h-i),isNaN(u)&&(u=o-l-d-a),null!=p&&(isNaN(c)&&isNaN(u)&&(p>r/o?c=.8*r:u=.8*o),isNaN(c)&&(c=p*u),isNaN(u)&&(u=c/p)),isNaN(i)&&(i=r-s-c-h),isNaN(a)&&(a=o-l-u-d),e.left||e.right){case"center":i=r/2-c/2-n[3];break;case"right":i=r-c-h}switch(e.top||e.bottom){case"middle":case"center":a=o/2-u/2-n[0];break;case"bottom":a=o-u-d}i=i||0,a=a||0,isNaN(c)&&(c=r-h-i-(s||0)),isNaN(u)&&(u=o-d-a-(l||0));var f=new Dh(i+n[3],a+n[0],c,u);return f.margin=n,f}function Kw(e,t,n,r,o,i){var a,s=!o||!o.hv||o.hv[0],l=!o||!o.hv||o.hv[1],c=o&&o.boundingMode||"all";if((i=i||e).x=e.x,i.y=e.y,!s&&!l)return!1;if("raw"===c)a="group"===e.type?new Dh(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(a=e.getBoundingRect(),e.needLocalTransform()){var u=e.getLocalTransform();(a=a.clone()).applyTransform(u)}var d=Zw(Du({width:a.width,height:a.height},t),n,r),h=s?d.x-a.x:0,p=l?d.y-a.y:0;return"raw"===c?(i.x=h,i.y=p):(i.x+=h,i.y+=p),i===e&&e.markRedraw(),!0}function $w(e){var t=e.layoutMode||e.constructor.layoutMode;return Xu(t)?t:t?{type:t}:null}function Qw(e,t,n){var r=n&&n.ignoreSize;!Vu(r)&&(r=[r,r]);var o=a(Xw[0],0),i=a(Xw[1],1);function a(n,o){var i={},a=0,c={},u=0;if(Gw(n,(function(t){c[t]=e[t]})),Gw(n,(function(e){s(t,e)&&(i[e]=c[e]=t[e]),l(i,e)&&a++,l(c,e)&&u++})),r[o])return l(t,n[1])?c[n[2]]=null:l(t,n[2])&&(c[n[1]]=null),c;if(2!==u&&a){if(a>=2)return i;for(var d=0;d<n.length;d++){var h=n[d];if(!s(i,h)&&s(e,h)){i[h]=e[h];break}}return i}return c}function s(e,t){return e.hasOwnProperty(t)}function l(e,t){return null!=e[t]&&"auto"!==e[t]}function c(e,t,n){Gw(e,(function(e){t[e]=n[e]}))}c(Xw[0],e,o),c(Xw[1],e,i)}function Jw(e){return eS({},e)}function eS(e,t){return t&&e&&Gw(Uw,(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e}var tS=jm(),nS=function(e){function t(t,n,r){var o=e.call(this,t,n,r)||this;return o.uid=Zb("ec_cpt_model"),o}return ru(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=$w(this),r=n?Jw(e):{};Mu(e,t.getTheme().get(this.mainType)),Mu(e,this.getDefaultOption()),n&&Qw(e,r,n)},t.prototype.mergeOption=function(e,t){Mu(this.option,e,!0);var n=$w(this);n&&Qw(this.option,e,n)},t.prototype.optionUpdated=function(e,t){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!function(e){return!(!e||!e[Hm])}(e))return e.defaultOption;var t=tS(this);if(!t.defaultOption){for(var n=[],r=e;r;){var o=r.prototype.defaultOption;o&&n.push(o),r=r.superClass}for(var i={},a=n.length-1;a>=0;a--)i=Mu(i,n[a],!0);t.defaultOption=i}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+"Index",r=e+"Id";return Om(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){var e=this;return{left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")}},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type="component",e.id="",e.name="",e.mainType="",e.subType="",e.componentIndex=0}(),t}(Yb);Xm(nS,Yb),Km(nS),function(e){var t={};e.registerSubTypeDefaulter=function(e,n){var r=Gm(e);t[r.main]=n},e.determineSubType=function(n,r){var o=r.type;if(!o){var i=Gm(n).main;e.hasSubTypes(n)&&t[i]&&(o=t[i](r))}return o}}(nS),function(e,t){function n(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}e.topologicalTravel=function(e,r,o,i){if(e.length){var a=function(e){var r={},o=[];return Ru(e,(function(i){var a=n(r,i),s=function(e,t){var n=[];return Ru(e,(function(e){ju(t,e)>=0&&n.push(e)})),n}(a.originalDeps=t(i),e);a.entryCount=s.length,0===a.entryCount&&o.push(i),Ru(s,(function(e){ju(a.predecessor,e)<0&&a.predecessor.push(e);var t=n(r,e);ju(t.successor,e)<0&&t.successor.push(i)}))})),{graph:r,noEntryList:o}}(r),s=a.graph,l=a.noEntryList,c={};for(Ru(e,(function(e){c[e]=!0}));l.length;){var u=l.pop(),d=s[u],h=!!c[u];h&&(o.call(i,u,d.originalDeps.slice()),delete c[u]),Ru(d.successor,h?f:p)}Ru(c,(function(){throw new Error("")}))}function p(e){s[e].entryCount--,0===s[e].entryCount&&l.push(e)}function f(e){c[e]=!0,p(e)}}}(nS,(function(e){var t=[];Ru(nS.getClassesByMainType(e),(function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])})),t=Eu(t,(function(e){return Gm(e).main})),"dataset"!==e&&ju(t,"dataset")<=0&&t.unshift("dataset");return t}));const rS=nS;var oS="";"undefined"!==typeof navigator&&(oS=navigator.platform||"");var iS="rgba(0, 0, 0, 0.2)";const aS={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:iS,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:iS,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:iS,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:iS,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:iS,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:iS,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:oS.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 sS=dd(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),lS="original",cS="arrayRows",uS="objectRows",dS="keyedColumns",hS="typedArray",pS="unknown",fS="column",gS="row",mS={Must:1,Might:2,Not:3},vS=jm();function yS(e,t,n){var r={},o=bS(t);if(!o||!e)return r;var i,a,s=[],l=[],c=t.ecModel,u=vS(c).datasetMap,d=o.uid+"_"+n.seriesLayoutBy;Ru(e=e.slice(),(function(t,n){var o=Xu(t)?t:e[n]={name:t};"ordinal"===o.type&&null==i&&(i=n,a=f(o)),r[o.name]=[]}));var h=u.get(d)||u.set(d,{categoryWayDim:a,valueWayDim:0});function p(e,t,n){for(var r=0;r<n;r++)e.push(t+r)}function f(e){var t=e.dimsDef;return t?t.length:1}return Ru(e,(function(e,t){var n=e.name,o=f(e);if(null==i){var a=h.valueWayDim;p(r[n],a,o),p(l,a,o),h.valueWayDim+=o}else if(i===t)p(r[n],0,o),p(s,0,o);else{a=h.categoryWayDim;p(r[n],a,o),p(l,a,o),h.categoryWayDim+=o}})),s.length&&(r.itemName=s),l.length&&(r.seriesName=l),r}function xS(e,t,n){var r={};if(!bS(e))return r;var o,i=t.sourceFormat,a=t.dimensionsDefine;i!==uS&&i!==dS||Ru(a,(function(e,t){"name"===(Xu(e)?e.name:e)&&(o=t)}));var s=function(){for(var e={},r={},s=[],l=0,c=Math.min(5,n);l<c;l++){var u=SS(t.data,i,t.seriesLayoutBy,a,t.startIndex,l);s.push(u);var d=u===mS.Not;if(d&&null==e.v&&l!==o&&(e.v=l),(null==e.n||e.n===e.v||!d&&s[e.n]===mS.Not)&&(e.n=l),h(e)&&s[e.n]!==mS.Not)return e;d||(u===mS.Might&&null==r.v&&l!==o&&(r.v=l),null!=r.n&&r.n!==r.v||(r.n=l))}function h(e){return null!=e.v&&null!=e.n}return h(e)?e:h(r)?r:null}();if(s){r.value=[s.v];var l=null!=o?o:s.n;r.itemName=[l],r.seriesName=[l]}return r}function bS(e){if(!e.get("data",!0))return Om(e.ecModel,"dataset",{index:e.get("datasetIndex",!0),id:e.get("datasetId",!0)},Em).models[0]}function wS(e,t){return SS(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}function SS(e,t,n,r,o,i){var a,s,l;if(qu(e))return mS.Not;if(r){var c=r[i];Xu(c)?(s=c.name,l=c.type):Hu(c)&&(s=c)}if(null!=l)return"ordinal"===l?mS.Must:mS.Not;if(t===cS){var u=e;if(n===gS){for(var d=u[i],h=0;h<(d||[]).length&&h<5;h++)if(null!=(a=x(d[o+h])))return a}else for(h=0;h<u.length&&h<5;h++){var p=u[o+h];if(p&&null!=(a=x(p[i])))return a}}else if(t===uS){var f=e;if(!s)return mS.Not;for(h=0;h<f.length&&h<5;h++){if((v=f[h])&&null!=(a=x(v[s])))return a}}else if(t===dS){var g=e;if(!s)return mS.Not;if(!(d=g[s])||qu(d))return mS.Not;for(h=0;h<d.length&&h<5;h++)if(null!=(a=x(d[h])))return a}else if(t===lS){var m=e;for(h=0;h<m.length&&h<5;h++){var v,y=Sm(v=m[h]);if(!Vu(y))return mS.Not;if(null!=(a=x(y[i])))return a}}function x(e){var t=Hu(e);return null!=e&&Number.isFinite(Number(e))&&""!==e?t?mS.Might:mS.Not:t&&"-"!==e?mS.Must:void 0}return mS.Not}var _S=dd();var AS,kS,CS,MS=jm(),IS=jm(),TS=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var r=xm(this.get("color",!0)),o=this.get("colorLayer",!0);return jS(this,MS,r,o,e,t,n)},e.prototype.clearColorPalette=function(){!function(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}(this,MS)},e}();function DS(e,t,n,r){var o=xm(e.get(["aria","decal","decals"]));return jS(e,IS,o,null,t,n,r)}function jS(e,t,n,r,o,i,a){var s=t(i=i||e),l=s.paletteIdx||0,c=s.paletteNameMap=s.paletteNameMap||{};if(c.hasOwnProperty(o))return c[o];var u=null!=a&&r?function(e,t){for(var n=e.length,r=0;r<n;r++)if(e[r].length>t)return e[r];return e[n-1]}(r,a):n;if((u=u||n)&&u.length){var d=u[l];return o&&(c[o]=d),s.paletteIdx=(l+1)%u.length,d}}var PS="\0_ec_inner";var LS=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ru(t,e),t.prototype.init=function(e,t,n,r,o,i){r=r||{},this.option=null,this._theme=new Yb(r),this._locale=new Yb(o),this._optionManager=i},t.prototype.setOption=function(e,t,n){var r=NS(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)},t.prototype.resetOption=function(e,t){return this._resetOption(e,NS(t))},t.prototype._resetOption=function(e,t){var n=!1,r=this._optionManager;if(!e||"recreate"===e){var o=r.mountOption("recreate"===e);0,this.option&&"recreate"!==e?(this.restoreData(),this._mergeOption(o,t)):CS(this,o),n=!0}if("timeline"!==e&&"media"!==e||this.restoreData(),!e||"recreate"===e||"timeline"===e){var i=r.getTimelineOption(this);i&&(n=!0,this._mergeOption(i,t))}if(!e||"recreate"===e||"media"===e){var a=r.getMediaOption(this);a.length&&Ru(a,(function(e){n=!0,this._mergeOption(e,t)}),this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,t){var n=this.option,r=this._componentsMap,o=this._componentsCount,i=[],a=dd(),s=t&&t.replaceMergeMainTypeMap;vS(this).datasetMap=dd(),Ru(e,(function(e,t){null!=e&&(rS.hasClass(t)?t&&(i.push(t),a.set(t,!0)):n[t]=null==n[t]?Cu(e):Mu(n[t],e,!0))})),s&&s.each((function(e,t){rS.hasClass(t)&&!a.get(t)&&(i.push(t),a.set(t,!0))})),rS.topologicalTravel(i,rS.getAllClassMainTypes(),(function(t){var i=function(e,t,n){var r=_S.get(t);if(!r)return n;var o=r(e);return o?n.concat(o):n}(this,t,xm(e[t])),a=r.get(t),l=a?s&&s.get(t)?"replaceMerge":"normalMerge":"replaceAll",c=Am(a,i,l);(function(e,t,n){Ru(e,(function(e){var r=e.newOption;Xu(r)&&(e.keyInfo.mainType=t,e.keyInfo.subType=function(e,t,n,r){return t.type?t.type:n?n.subType:r.determineSubType(e,t)}(t,r,e.existing,n))}))})(c,t,rS),n[t]=null,r.set(t,null),o.set(t,0);var u,d=[],h=[],p=0;Ru(c,(function(e,n){var r=e.existing,o=e.newOption;if(o){var i="series"===t,a=rS.getClass(t,e.keyInfo.subType,!i);if(!a)return;if("tooltip"===t){if(u)return void 0;u=!0}if(r&&r.constructor===a)r.name=e.keyInfo.name,r.mergeOption(o,this),r.optionUpdated(o,!1);else{var s=Tu({componentIndex:n},e.keyInfo);Tu(r=new a(o,this,this,s),s),e.brandNew&&(r.__requireNewView=!0),r.init(o,this,this),r.optionUpdated(null,!0)}}else r&&(r.mergeOption({},this),r.optionUpdated({},!1));r?(d.push(r.option),h.push(r),p++):(d.push(void 0),h.push(void 0))}),this),n[t]=d,r.set(t,h),o.set(t,p),"series"===t&&AS(this)}),this),this._seriesIndices||AS(this)},t.prototype.getOption=function(){var e=Cu(this.option);return Ru(e,(function(t,n){if(rS.hasClass(n)){for(var r=xm(t),o=r.length,i=!1,a=o-1;a>=0;a--)r[a]&&!Tm(r[a])?i=!0:(r[a]=null,!i&&o--);r.length=o,e[n]=r}})),delete e[PS],e},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(null==t)for(var o=0;o<n.length;o++)if(n[o])return n[o]}},t.prototype.queryComponents=function(e){var t=e.mainType;if(!t)return[];var n,r=e.index,o=e.id,i=e.name,a=this._componentsMap.get(t);return a&&a.length?(null!=r?(n=[],Ru(xm(r),(function(e){a[e]&&n.push(a[e])}))):n=null!=o?RS("id",o,a):null!=i?RS("name",i,a):Ou(a,(function(e){return!!e})),ES(n,e)):[]},t.prototype.findComponents=function(e){var t,n=e.query,r=e.mainType,o=function(e){var t=r+"Index",n=r+"Id",o=r+"Name";return!e||null==e[t]&&null==e[n]&&null==e[o]?null:{mainType:r,index:e[t],id:e[n],name:e[o]}}(n),i=o?this.queryComponents(o):Ou(this._componentsMap.get(r),(function(e){return!!e}));return t=ES(i,e),e.filter?Ou(t,e.filter):t},t.prototype.eachComponent=function(e,t,n){var r=this._componentsMap;if(Wu(e)){var o=t,i=e;r.each((function(e,t){for(var n=0;e&&n<e.length;n++){var r=e[n];r&&i.call(o,t,r,r.componentIndex)}}))}else for(var a=Hu(e)?r.get(e):Xu(e)?this.findComponents(e):null,s=0;a&&s<a.length;s++){var l=a[s];l&&t.call(n,l,l.componentIndex)}},t.prototype.getSeriesByName=function(e){var t=Mm(e,null);return Ou(this._componentsMap.get("series"),(function(e){return!!e&&null!=t&&e.name===t}))},t.prototype.getSeriesByIndex=function(e){return this._componentsMap.get("series")[e]},t.prototype.getSeriesByType=function(e){return Ou(this._componentsMap.get("series"),(function(t){return!!t&&t.subType===e}))},t.prototype.getSeries=function(){return Ou(this._componentsMap.get("series"),(function(e){return!!e}))},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(e,t){kS(this),Ru(this._seriesIndices,(function(n){var r=this._componentsMap.get("series")[n];e.call(t,r,n)}),this)},t.prototype.eachRawSeries=function(e,t){Ru(this._componentsMap.get("series"),(function(n){n&&e.call(t,n,n.componentIndex)}))},t.prototype.eachSeriesByType=function(e,t,n){kS(this),Ru(this._seriesIndices,(function(r){var o=this._componentsMap.get("series")[r];o.subType===e&&t.call(n,o,r)}),this)},t.prototype.eachRawSeriesByType=function(e,t,n){return Ru(this.getSeriesByType(e),t,n)},t.prototype.isSeriesFiltered=function(e){return kS(this),null==this._seriesIndicesMap.get(e.componentIndex)},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,t){kS(this);var n=[];Ru(this._seriesIndices,(function(r){var o=this._componentsMap.get("series")[r];e.call(t,o,r)&&n.push(r)}),this),this._seriesIndices=n,this._seriesIndicesMap=dd(n)},t.prototype.restoreData=function(e){AS(this);var t=this._componentsMap,n=[];t.each((function(e,t){rS.hasClass(t)&&n.push(t)})),rS.topologicalTravel(n,rS.getAllClassMainTypes(),(function(n){Ru(t.get(n),(function(t){!t||"series"===n&&function(e,t){if(t){var n=t.seriesIndex,r=t.seriesId,o=t.seriesName;return null!=n&&e.componentIndex!==n||null!=r&&e.id!==r||null!=o&&e.name!==o}}(t,e)||t.restoreData()}))}))},t.internalField=(AS=function(e){var t=e._seriesIndices=[];Ru(e._componentsMap.get("series"),(function(e){e&&t.push(e.componentIndex)})),e._seriesIndicesMap=dd(t)},kS=function(e){},void(CS=function(e,t){e.option={},e.option[PS]=1,e._componentsMap=dd({series:[]}),e._componentsCount=dd();var n=t.aria;Xu(n)&&null==n.enabled&&(n.enabled=!0),function(e,t){var n=e.color&&!e.colorLayer;Ru(t,(function(t,r){"colorLayer"===r&&n||rS.hasClass(r)||("object"===typeof t?e[r]=e[r]?Mu(e[r],t,!1):Cu(t):null==e[r]&&(e[r]=t))}))}(t,e._theme.option),Mu(t,aS,!1),e._mergeOption(t,null)})),t}(Yb);function RS(e,t,n){if(Vu(t)){var r=dd();return Ru(t,(function(e){null!=e&&(null!=Mm(e,null)&&r.set(e,!0))})),Ou(n,(function(t){return t&&r.get(t[e])}))}var o=Mm(t,null);return Ou(n,(function(t){return t&&null!=o&&t[e]===o}))}function ES(e,t){return t.hasOwnProperty("subType")?Ou(e,(function(e){return e&&e.subType===t.subType})):e}function NS(e){var t=dd();return e&&Ru(xm(e.replaceMerge),(function(e){t.set(e,!0)})),{replaceMergeMainTypeMap:t}}Pu(LS,TS);const OS=LS;var zS=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"];const BS=function(e){Ru(zS,(function(t){this[t]=Bu(e[t],e)}),this)};var FS={},VS=function(){function e(){this._coordinateSystems=[]}return e.prototype.create=function(e,t){var n=[];Ru(FS,(function(r,o){var i=r.create(e,t);n=n.concat(i||[])})),this._coordinateSystems=n},e.prototype.update=function(e,t){Ru(this._coordinateSystems,(function(n){n.update&&n.update(e,t)}))},e.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},e.register=function(e,t){FS[e]=t},e.get=function(e){return FS[e]},e}();const WS=VS;var HS=/^(min|max)?(.+)$/,GS=function(){function e(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return e.prototype.setOption=function(e,t,n){e&&(Ru(xm(e.series),(function(e){e&&e.data&&qu(e.data)&&ad(e.data)})),Ru(xm(e.dataset),(function(e){e&&e.source&&qu(e.source)&&ad(e.source)}))),e=Cu(e);var r=this._optionBackup,o=function(e,t,n){var r,o,i=[],a=e.baseOption,s=e.timeline,l=e.options,c=e.media,u=!!e.media,d=!!(l||s||a&&a.timeline);a?(o=a).timeline||(o.timeline=s):((d||u)&&(e.options=e.media=null),o=e);u&&Vu(c)&&Ru(c,(function(e){e&&e.option&&(e.query?i.push(e):r||(r=e))}));function h(e){Ru(t,(function(t){t(e,n)}))}return h(o),Ru(l,(function(e){return h(e)})),Ru(i,(function(e){return h(e.option)})),{baseOption:o,timelineOptions:l||[],mediaDefault:r,mediaList:i}}(e,t,!r);this._newBaseOption=o.baseOption,r?(o.timelineOptions.length&&(r.timelineOptions=o.timelineOptions),o.mediaList.length&&(r.mediaList=o.mediaList),o.mediaDefault&&(r.mediaDefault=o.mediaDefault)):this._optionBackup=o},e.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],Cu(e?t.baseOption:this._newBaseOption)},e.prototype.getTimelineOption=function(e){var t,n=this._timelineOptions;if(n.length){var r=e.getComponent("timeline");r&&(t=Cu(n[r.getCurrentIndex()]))}return t},e.prototype.getMediaOption=function(e){var t,n,r=this._api.getWidth(),o=this._api.getHeight(),i=this._mediaList,a=this._mediaDefault,s=[],l=[];if(!i.length&&!a)return l;for(var c=0,u=i.length;c<u;c++)US(i[c].query,r,o)&&s.push(c);return!s.length&&a&&(s=[-1]),s.length&&(t=s,n=this._currentMediaIndices,t.join(",")!==n.join(","))&&(l=Eu(s,(function(e){return Cu(-1===e?a.option:i[e].option)}))),this._currentMediaIndices=s,l},e}();function US(e,t,n){var r={width:t,height:n,aspectratio:t/n},o=!0;return Ru(e,(function(e,t){var n=t.match(HS);if(n&&n[1]&&n[2]){var i=n[1],a=n[2].toLowerCase();(function(e,t,n){return"min"===n?e>=t:"max"===n?e<=t:e===t})(r[a],e,i)||(o=!1)}})),o}const XS=GS;var YS=Ru,qS=Xu,ZS=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function KS(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=ZS.length;n<r;n++){var o=ZS[n],i=t.normal,a=t.emphasis;i&&i[o]&&(e[o]=e[o]||{},e[o].normal?Mu(e[o].normal,i[o]):e[o].normal=i[o],i[o]=null),a&&a[o]&&(e[o]=e[o]||{},e[o].emphasis?Mu(e[o].emphasis,a[o]):e[o].emphasis=a[o],a[o]=null)}}function $S(e,t,n){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var r=e[t].normal,o=e[t].emphasis;r&&(n?(e[t].normal=e[t].emphasis=null,Du(e[t],r)):e[t]=r),o&&(e.emphasis=e.emphasis||{},e.emphasis[t]=o,o.focus&&(e.emphasis.focus=o.focus),o.blurScope&&(e.emphasis.blurScope=o.blurScope))}}function QS(e){$S(e,"itemStyle"),$S(e,"lineStyle"),$S(e,"areaStyle"),$S(e,"label"),$S(e,"labelLine"),$S(e,"upperLabel"),$S(e,"edgeLabel")}function JS(e,t){var n=qS(e)&&e[t],r=qS(n)&&n.textStyle;if(r){0;for(var o=0,i=wm.length;o<i;o++){var a=wm[o];r.hasOwnProperty(a)&&(n[a]=r[a])}}}function e_(e){e&&(QS(e),JS(e,"label"),e.emphasis&&JS(e.emphasis,"label"))}function t_(e){return Vu(e)?e:e?[e]:[]}function n_(e){return(Vu(e)?e[0]:e)||{}}function r_(e,t){YS(t_(e.series),(function(e){qS(e)&&function(e){if(qS(e)){KS(e),QS(e),JS(e,"label"),JS(e,"upperLabel"),JS(e,"edgeLabel"),e.emphasis&&(JS(e.emphasis,"label"),JS(e.emphasis,"upperLabel"),JS(e.emphasis,"edgeLabel"));var t=e.markPoint;t&&(KS(t),e_(t));var n=e.markLine;n&&(KS(n),e_(n));var r=e.markArea;r&&e_(r);var o=e.data;if("graph"===e.type){o=o||e.nodes;var i=e.links||e.edges;if(i&&!qu(i))for(var a=0;a<i.length;a++)e_(i[a]);Ru(e.categories,(function(e){QS(e)}))}if(o&&!qu(o))for(a=0;a<o.length;a++)e_(o[a]);if((t=e.markPoint)&&t.data){var s=t.data;for(a=0;a<s.length;a++)e_(s[a])}if((n=e.markLine)&&n.data){var l=n.data;for(a=0;a<l.length;a++)Vu(l[a])?(e_(l[a][0]),e_(l[a][1])):e_(l[a])}"gauge"===e.type?(JS(e,"axisLabel"),JS(e,"title"),JS(e,"detail")):"treemap"===e.type?($S(e.breadcrumb,"itemStyle"),Ru(e.levels,(function(e){QS(e)}))):"tree"===e.type&&QS(e.leaves)}}(e)}));var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),YS(n,(function(t){YS(t_(e[t]),(function(e){e&&(JS(e,"axisLabel"),JS(e.axisPointer,"label"))}))})),YS(t_(e.parallel),(function(e){var t=e&&e.parallelAxisDefault;JS(t,"axisLabel"),JS(t&&t.axisPointer,"label")})),YS(t_(e.calendar),(function(e){$S(e,"itemStyle"),JS(e,"dayLabel"),JS(e,"monthLabel"),JS(e,"yearLabel")})),YS(t_(e.radar),(function(e){JS(e,"name"),e.name&&null==e.axisName&&(e.axisName=e.name,delete e.name),null!=e.nameGap&&null==e.axisNameGap&&(e.axisNameGap=e.nameGap,delete e.nameGap)})),YS(t_(e.geo),(function(e){qS(e)&&(e_(e),YS(t_(e.regions),(function(e){e_(e)})))})),YS(t_(e.timeline),(function(e){e_(e),$S(e,"label"),$S(e,"itemStyle"),$S(e,"controlStyle",!0);var t=e.data;Vu(t)&&Ru(t,(function(e){Xu(e)&&($S(e,"label"),$S(e,"itemStyle"))}))})),YS(t_(e.toolbox),(function(e){$S(e,"iconStyle"),YS(e.feature,(function(e){$S(e,"iconStyle")}))})),JS(n_(e.axisPointer),"label"),JS(n_(e.tooltip).axisPointer,"label")}function o_(e){e&&Ru(i_,(function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])}))}var i_=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],a_=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],s_=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function l_(e){var t=e&&e.itemStyle;if(t)for(var n=0;n<s_.length;n++){var r=s_[n][1],o=s_[n][0];null!=t[r]&&(t[o]=t[r])}}function c_(e){e&&"edge"===e.alignTo&&null!=e.margin&&null==e.edgeDistance&&(e.edgeDistance=e.margin)}function u_(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay)}function d_(e,t){if(e)for(var n=0;n<e.length;n++)t(e[n]),e[n]&&d_(e[n].children,t)}function h_(e,t){r_(e,t),e.series=xm(e.series),Ru(e.series,(function(e){if(Xu(e)){var t=e.type;if("line"===t)null!=e.clipOverflow&&(e.clip=e.clipOverflow);else if("pie"===t||"gauge"===t){if(null!=e.clockWise&&(e.clockwise=e.clockWise),c_(e.label),(o=e.data)&&!qu(o))for(var n=0;n<o.length;n++)c_(o[n]);null!=e.hoverOffset&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(e.emphasis.scaleSize=e.hoverOffset))}else if("gauge"===t){var r=function(e,t){for(var n=t.split(","),r=e,o=0;o<n.length&&null!=(r=r&&r[n[o]]);o++);return r}(e,"pointer.color");null!=r&&function(e,t,n,r){for(var o,i=t.split(","),a=e,s=0;s<i.length-1;s++)null==a[o=i[s]]&&(a[o]={}),a=a[o];(r||null==a[i[s]])&&(a[i[s]]=n)}(e,"itemStyle.color",r)}else if("bar"===t){var o;if(l_(e),l_(e.backgroundStyle),l_(e.emphasis),(o=e.data)&&!qu(o))for(n=0;n<o.length;n++)"object"===typeof o[n]&&(l_(o[n]),l_(o[n]&&o[n].emphasis))}else if("sunburst"===t){var i=e.highlightPolicy;i&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=i)),u_(e),d_(e.data,u_)}else"graph"===t||"sankey"===t?function(e){e&&null!=e.focusNodeAdjacency&&(e.emphasis=e.emphasis||{},null==e.emphasis.focus&&(e.emphasis.focus="adjacency"))}(e):"map"===t&&(e.mapType&&!e.map&&(e.map=e.mapType),e.mapLocation&&Du(e,e.mapLocation));null!=e.hoverAnimation&&(e.emphasis=e.emphasis||{},e.emphasis&&null==e.emphasis.scale&&(e.emphasis.scale=e.hoverAnimation)),o_(e)}})),e.dataRange&&(e.visualMap=e.dataRange),Ru(a_,(function(t){var n=e[t];n&&(Vu(n)||(n=[n]),Ru(n,(function(e){o_(e)})))}))}function p_(e){Ru(e,(function(t,n){var r=[],o=[NaN,NaN],i=[t.stackResultDimension,t.stackedOverDimension],a=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";a.modify(i,(function(i,c,u){var d,h,p=a.get(t.stackedDimension,u);if(isNaN(p))return o;s?h=a.getRawIndex(u):d=a.get(t.stackedByDimension,u);for(var f=NaN,g=n-1;g>=0;g--){var m=e[g];if(s||(h=m.data.rawIndexOf(m.stackedByDimension,d)),h>=0){var v=m.data.getByRawIndex(m.stackResultDimension,h);if("all"===l||"positive"===l&&v>0||"negative"===l&&v<0||"samesign"===l&&p>=0&&v>0||"samesign"===l&&p<=0&&v<0){p=tm(p,v),f=v;break}}}return r[0]=p,r[1]=f,r}))}))}var f_,g_,m_,v_,y_,x_=function(e){this.data=e.data||(e.sourceFormat===dS?{}:[]),this.sourceFormat=e.sourceFormat||pS,this.seriesLayoutBy=e.seriesLayoutBy||fS,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;n<t.length;n++){var r=t[n];null==r.type&&wS(this,n)===mS.Must&&(r.type="ordinal")}};function b_(e){return e instanceof x_}function w_(e,t,n){n=n||__(e);var r=t.seriesLayoutBy,o=function(e,t,n,r,o){var i,a;if(!e)return{dimensionsDefine:A_(o),startIndex:a,dimensionsDetectedCount:i};if(t===cS){var s=e;"auto"===r||null==r?k_((function(e){null!=e&&"-"!==e&&(Hu(e)?null==a&&(a=1):a=0)}),n,s,10):a=Uu(r)?r:r?1:0,o||1!==a||(o=[],k_((function(e,t){o[t]=null!=e?e+"":""}),n,s,1/0)),i=o?o.length:n===gS?s.length:s[0]?s[0].length:null}else if(t===uS)o||(o=function(e){var t,n=0;for(;n<e.length&&!(t=e[n++]););if(t)return zu(t)}(e));else if(t===dS)o||(o=[],Ru(e,(function(e,t){o.push(t)})));else if(t===lS){var l=Sm(e[0]);i=Vu(l)&&l.length||1}return{startIndex:a,dimensionsDefine:A_(o),dimensionsDetectedCount:i}}(e,n,r,t.sourceHeader,t.dimensions);return new x_({data:e,sourceFormat:n,seriesLayoutBy:r,dimensionsDefine:o.dimensionsDefine,startIndex:o.startIndex,dimensionsDetectedCount:o.dimensionsDetectedCount,metaRawOption:Cu(t)})}function S_(e){return new x_({data:e,sourceFormat:qu(e)?hS:lS})}function __(e){var t=pS;if(qu(e))t=hS;else if(Vu(e)){0===e.length&&(t=cS);for(var n=0,r=e.length;n<r;n++){var o=e[n];if(null!=o){if(Vu(o)||qu(o)){t=cS;break}if(Xu(o)){t=uS;break}}}}else if(Xu(e))for(var i in e)if(gd(e,i)&&Lu(e[i])){t=dS;break}return t}function A_(e){if(e){var t=dd();return Eu(e,(function(e,n){var r={name:(e=Xu(e)?e:{name:e}).name,displayName:e.displayName,type:e.type};if(null==r.name)return r;r.name+="",null==r.displayName&&(r.displayName=r.name);var o=t.get(r.name);return o?r.name+="-"+o.count++:t.set(r.name,{count:1}),r}))}}function k_(e,t,n,r){if(t===gS)for(var o=0;o<n.length&&o<r;o++)e(n[o]?n[o][0]:null,o);else{var i=n[0]||[];for(o=0;o<i.length&&o<r;o++)e(i[o],o)}}function C_(e){var t=e.sourceFormat;return t===uS||t===dS}var M_=function(){function e(e,t){var n=b_(e)?e:S_(e);this._source=n;var r=this._data=n.data;n.sourceFormat===hS&&(this._offset=0,this._dimSize=t,this._data=r),y_(this,r,n)}return e.prototype.getSource=function(){return this._source},e.prototype.count=function(){return 0},e.prototype.getItem=function(e,t){},e.prototype.appendData=function(e){},e.prototype.clean=function(){},e.protoInitialize=function(){var t=e.prototype;t.pure=!1,t.persistent=!0}(),e.internalField=function(){var e;y_=function(e,o,i){var a=i.sourceFormat,s=i.seriesLayoutBy,l=i.startIndex,c=i.dimensionsDefine;if(Tu(e,v_[O_(a,s)]),a===hS)e.getItem=t,e.count=r,e.fillStorage=n;else{var u=D_(a,s);e.getItem=Bu(u,null,o,l,c);var d=L_(a,s);e.count=Bu(d,null,o,l,c)}};var t=function(e,t){e-=this._offset,t=t||[];for(var n=this._data,r=this._dimSize,o=r*e,i=0;i<r;i++)t[i]=n[o+i];return t},n=function(e,t,n,r){for(var o=this._data,i=this._dimSize,a=0;a<i;a++){for(var s=r[a],l=null==s[0]?1/0:s[0],c=null==s[1]?-1/0:s[1],u=t-e,d=n[a],h=0;h<u;h++){var p=o[h*i+a];d[e+h]=p,p<l&&(l=p),p>c&&(c=p)}s[0]=l,s[1]=c}},r=function(){return this._data?this._data.length/this._dimSize:0};function o(e){for(var t=0;t<e.length;t++)this._data.push(e[t])}(e={})[cS+"_"+fS]={pure:!0,appendData:o},e[cS+"_"+gS]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[uS]={pure:!0,appendData:o},e[dS]={pure:!0,appendData:function(e){var t=this._data;Ru(e,(function(e,n){for(var r=t[n]||(t[n]=[]),o=0;o<(e||[]).length;o++)r.push(e[o])}))}},e[lS]={appendData:o},e[hS]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},v_=e}(),e}(),I_=function(e,t,n,r){return e[r]},T_=((f_={})[cS+"_"+fS]=function(e,t,n,r){return e[r+t]},f_[cS+"_"+gS]=function(e,t,n,r,o){r+=t;for(var i=o||[],a=e,s=0;s<a.length;s++){var l=a[s];i[s]=l?l[r]:null}return i},f_[uS]=I_,f_[dS]=function(e,t,n,r,o){for(var i=o||[],a=0;a<n.length;a++){0;var s=e[n[a].name];i[a]=s?s[r]:null}return i},f_[lS]=I_,f_);function D_(e,t){return T_[O_(e,t)]}var j_=function(e,t,n){return e.length},P_=((g_={})[cS+"_"+fS]=function(e,t,n){return Math.max(0,e.length-t)},g_[cS+"_"+gS]=function(e,t,n){var r=e[0];return r?Math.max(0,r.length-t):0},g_[uS]=j_,g_[dS]=function(e,t,n){var r=e[n[0].name];return r?r.length:0},g_[lS]=j_,g_);function L_(e,t){return P_[O_(e,t)]}var R_=function(e,t,n){return e[t]},E_=((m_={})[cS]=R_,m_[uS]=function(e,t,n){return e[n]},m_[dS]=R_,m_[lS]=function(e,t,n){var r=Sm(e);return r instanceof Array?r[t]:r},m_[hS]=R_,m_);function N_(e){return E_[e]}function O_(e,t){return e===cS?e+"_"+t:e}function z_(e,t,n){if(e){var r=e.getRawDataItem(t);if(null!=r){var o=e.getStore(),i=o.getSource().sourceFormat;if(null!=n){var a=e.getDimensionIndex(n),s=o.getDimensionProperty(a);return N_(i)(r,a,s)}var l=r;return i===lS&&(l=Sm(r)),l}}}var B_=/\{@(.+?)\}/g,F_=function(){function e(){}return e.prototype.getDataParams=function(e,t){var n=this.getData(t),r=this.getRawValue(e,t),o=n.getRawIndex(e),i=n.getName(e),a=n.getRawDataItem(e),s=n.getItemVisual(e,"style"),l=s&&s[n.getItemVisual(e,"drawType")||"fill"],c=s&&s.stroke,u=this.mainType,d="series"===u,h=n.userOutput&&n.userOutput.get();return{componentType:u,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:i,dataIndex:o,data:a,dataType:t,value:r,color:l,borderColor:c,dimensionNames:h?h.fullDimensions:null,encode:h?h.encode:null,$vars:["seriesName","name","value"]}},e.prototype.getFormattedLabel=function(e,t,n,r,o,i){t=t||"normal";var a=this.getData(n),s=this.getDataParams(e,n);(i&&(s.value=i.interpolatedValue),null!=r&&Vu(s.value)&&(s.value=s.value[r]),o)||(o=a.getItemModel(e).get("normal"===t?["label","formatter"]:[t,"label","formatter"]));return Wu(o)?(s.status=t,s.dimensionIndex=r,o(s)):Hu(o)?Vw(o,s).replace(B_,(function(t,n){var r=n.length,o=n;"["===o.charAt(0)&&"]"===o.charAt(r-1)&&(o=+o.slice(1,r-1));var s=z_(a,e,o);if(i&&Vu(i.interpolatedValue)){var l=a.getDimensionIndex(o);l>=0&&(s=i.interpolatedValue[l])}return null!=s?s+"":""})):void 0},e.prototype.getRawValue=function(e,t){return z_(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function V_(e){var t,n;return Xu(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function W_(e){return new H_(e)}var H_=function(){function e(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t,n=this._upstream,r=e&&e.skip;if(this._dirty&&n){var o=this.context;o.data=o.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!r&&(t=this._plan(this.context));var i,a=u(this._modBy),s=this._modDataCount||0,l=u(e&&e.modBy),c=e&&e.modDataCount||0;function u(e){return!(e>=1)&&(e=1),e}a===l&&s===c||(t="reset"),(this._dirty||"reset"===t)&&(this._dirty=!1,i=this._doReset(r)),this._modBy=l,this._modDataCount=c;var d=e&&e.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var h=this._dueIndex,p=Math.min(null!=d?this._dueIndex+d:1/0,this._dueEnd);if(!r&&(i||h<p)){var f=this._progress;if(Vu(f))for(var g=0;g<f.length;g++)this._doProgress(f[g],h,p,l,c);else this._doProgress(f,h,p,l,c)}this._dueIndex=p;var m=null!=this._settedOutputEnd?this._settedOutputEnd:p;0,this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()},e.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},e.prototype._doProgress=function(e,t,n,r,o){G_.reset(t,n,r,o),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:G_.next},this.context)},e.prototype._doReset=function(e){var t,n;this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null,!e&&this._reset&&((t=this._reset(this.context))&&t.progress&&(n=t.forceFirstProgress,t=t.progress),Vu(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var r=this._downstream;return r&&r.dirty(),n},e.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},e.prototype.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},e.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},e.prototype.getUpstream=function(){return this._upstream},e.prototype.getDownstream=function(){return this._downstream},e.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},e}(),G_=function(){var e,t,n,r,o,i={reset:function(l,c,u,d){t=l,e=c,n=u,r=d,o=Math.ceil(r/n),i.next=n>1&&r>0?s:a}};return i;function a(){return t<e?t++:null}function s(){var i=t%o*n+Math.ceil(t/o),a=t>=e?null:i<r?i:t;return t++,a}}();"undefined"!==typeof console&&console.warn&&console.log;function U_(e){0}function X_(e){throw new Error(e)}function Y_(e,t){var n=t&&t.type;return"ordinal"===n?e:("time"!==n||Uu(e)||null==e||"-"===e||(e=+am(e)),null==e||""===e?NaN:Number(e))}var q_=dd({number:function(e){return parseFloat(e)},time:function(e){return+am(e)},trim:function(e){return Hu(e)?od(e):e}});function Z_(e){return q_.get(e)}var K_={lt:function(e,t){return e<t},lte:function(e,t){return e<=t},gt:function(e,t){return e>t},gte:function(e,t){return e>=t}},$_=function(){function e(e,t){if(!Uu(t)){0,X_("")}this._opFn=K_[e],this._rvalFloat=dm(t)}return e.prototype.evaluate=function(e){return Uu(e)?this._opFn(e,this._rvalFloat):this._opFn(dm(e),this._rvalFloat)},e}(),Q_=function(){function e(e,t){var n="desc"===e;this._resultLT=n?1:-1,null==t&&(t=n?"min":"max"),this._incomparable="min"===t?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=Uu(e)?e:dm(e),r=Uu(t)?t:dm(t),o=isNaN(n),i=isNaN(r);if(o&&(n=this._incomparable),i&&(r=this._incomparable),o&&i){var a=Hu(e),s=Hu(t);a&&(n=s?e:0),s&&(r=a?t:0)}return n<r?this._resultLT:n>r?-this._resultLT:0},e}(),J_=function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=dm(t)}return e.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n===this._rvalTypeof||"number"!==n&&"number"!==this._rvalTypeof||(t=dm(e)===this._rvalFloat)}return this._isEQ?t:!t},e}();function eA(e,t){return"eq"===e||"ne"===e?new J_("eq"===e,t):gd(K_,e)?new $_(e,t):null}var tA=function(){function e(){}return e.prototype.getRawData=function(){throw new Error("not supported")},e.prototype.getRawDataItem=function(e){throw new Error("not supported")},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(e){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(e,t){},e.prototype.retrieveValueFromItem=function(e,t){},e.prototype.convertValue=function(e,t){return Y_(e,t)},e}();function nA(e){if(!lA(e.sourceFormat)){0,X_("")}return e.data}function rA(e){var t=e.sourceFormat,n=e.data;if(!lA(t)){0,X_("")}if(t===cS){for(var r=[],o=0,i=n.length;o<i;o++)r.push(n[o].slice());return r}if(t===uS){for(r=[],o=0,i=n.length;o<i;o++)r.push(Tu({},n[o]));return r}}function oA(e,t,n){if(null!=n)return Uu(n)||!isNaN(n)&&!gd(t,n)?e[n]:gd(t,n)?t[n]:void 0}function iA(e){return Cu(e)}var aA=dd();function sA(e,t,n,r){t.length||X_(""),Xu(e)||X_("");var o=e.type,i=aA.get(o);i||X_("");var a=Eu(t,(function(e){return function(e,t){var n=new tA,r=e.data,o=n.sourceFormat=e.sourceFormat,i=e.startIndex;e.seriesLayoutBy!==fS&&X_("");var a=[],s={},l=e.dimensionsDefine;if(l)Ru(l,(function(e,t){var n=e.name,r={index:t,name:n,displayName:e.displayName};a.push(r),null!=n&&(gd(s,n)&&X_(""),s[n]=r)}));else for(var c=0;c<e.dimensionsDetectedCount;c++)a.push({index:c});var u=D_(o,fS);t.__isBuiltIn&&(n.getRawDataItem=function(e){return u(r,i,a,e)},n.getRawData=Bu(nA,null,e)),n.cloneRawData=Bu(rA,null,e);var d=L_(o,fS);n.count=Bu(d,null,r,i,a);var h=N_(o);n.retrieveValue=function(e,t){var n=u(r,i,a,e);return p(n,t)};var p=n.retrieveValueFromItem=function(e,t){if(null!=e){var n=a[t];return n?h(e,t,n.name):void 0}};return n.getDimensionInfo=Bu(oA,null,a,s),n.cloneAllDimensionInfo=Bu(iA,null,a),n}(e,i)}));return Eu(xm(i.transform({upstream:a[0],upstreamList:a,config:Cu(e.config)})),(function(e,n){var r;Xu(e)||X_(""),e.data||X_(""),lA(__(e.data))||X_("");var o=t[0];if(o&&0===n&&!e.dimensions){var i=o.startIndex;i&&(e.data=o.data.slice(0,i).concat(e.data)),r={seriesLayoutBy:fS,sourceHeader:i,dimensions:o.metaRawOption.dimensions}}else r={seriesLayoutBy:fS,sourceHeader:0,dimensions:e.dimensions};return w_(e.data,r,null)}))}function lA(e){return e===cS||e===uS}var cA,uA="undefined",dA=typeof Uint32Array===uA?Array:Uint32Array,hA=typeof Uint16Array===uA?Array:Uint16Array,pA=typeof Int32Array===uA?Array:Int32Array,fA=typeof Float64Array===uA?Array:Float64Array,gA={float:fA,int:pA,ordinal:Array,number:Array,time:fA};function mA(e){return e>65535?dA:hA}function vA(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function yA(e,t,n,r,o){var i=gA[n||"float"];if(o){var a=e[t],s=a&&a.length;if(s!==r){for(var l=new i(r),c=0;c<s;c++)l[c]=a[c];e[t]=l}}else e[t]=new i(r)}var xA=function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=dd()}return e.prototype.initData=function(e,t,n){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var r=e.getSource(),o=this.defaultDimValueGetter=cA[r.sourceFormat];this._dimValueGetter=n||o,this._rawExtent=[];C_(r);this._dimensions=Eu(t,(function(e){return{type:e.type,property:e.property}})),this._initDataFromProvider(0,e.count())},e.prototype.getProvider=function(){return this._provider},e.prototype.getSource=function(){return this._provider.getSource()},e.prototype.ensureCalculationDimension=function(e,t){var n=this._calcDimNameToIdx,r=this._dimensions,o=n.get(e);if(null!=o){if(r[o].type===t)return o}else o=r.length;return r[o]={type:t},n.set(e,o),this._chunks[o]=new gA[t||"float"](this._rawCount),this._rawExtent[o]=[1/0,-1/0],o},e.prototype.collectOrdinalMeta=function(e,t){var n=this._chunks[e],r=this._dimensions[e],o=this._rawExtent,i=r.ordinalOffset||0,a=n.length;0===i&&(o[e]=[1/0,-1/0]);for(var s=o[e],l=i;l<a;l++){var c=n[l]=t.parseAndCollect(n[l]);isNaN(c)||(s[0]=Math.min(c,s[0]),s[1]=Math.max(c,s[1]))}r.ordinalMeta=t,r.ordinalOffset=a,r.type="ordinal"},e.prototype.getOrdinalMeta=function(e){return this._dimensions[e].ordinalMeta},e.prototype.getDimensionProperty=function(e){var t=this._dimensions[e];return t&&t.property},e.prototype.appendData=function(e){var t=this._provider,n=this.count();t.appendData(e);var r=t.count();return t.persistent||(r+=n),n<r&&this._initDataFromProvider(n,r,!0),[n,r]},e.prototype.appendValues=function(e,t){for(var n=this._chunks,r=this._dimensions,o=r.length,i=this._rawExtent,a=this.count(),s=a+Math.max(e.length,t||0),l=0;l<o;l++){yA(n,l,(p=r[l]).type,s,!0)}for(var c=[],u=a;u<s;u++)for(var d=u-a,h=0;h<o;h++){var p=r[h],f=cA.arrayRows.call(this,e[d]||c,p.property,d,h);n[h][u]=f;var g=i[h];f<g[0]&&(g[0]=f),f>g[1]&&(g[1]=f)}return this._rawCount=this._count=s,{start:a,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,o=this._chunks,i=this._dimensions,a=i.length,s=this._rawExtent,l=Eu(i,(function(e){return e.property})),c=0;c<a;c++){var u=i[c];s[c]||(s[c]=[1/0,-1/0]),yA(o,c,u.type,t,n)}if(r.fillStorage)r.fillStorage(e,t,o,s);else for(var d=[],h=e;h<t;h++){d=r.getItem(h,d);for(var p=0;p<a;p++){var f=o[p],g=this._dimValueGetter(d,l[p],h,p);f[h]=g;var m=s[p];g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var n=this._chunks[e];return n?n[this.getRawIndex(t)]:NaN},e.prototype.getValues=function(e,t){var n=[],r=[];if(null==t){t=e,e=[];for(var o=0;o<this._dimensions.length;o++)r.push(o)}else r=e;o=0;for(var i=r.length;o<i;o++)n.push(this.get(r[o],t));return n},e.prototype.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var n=this._chunks[e];return n?n[t]:NaN},e.prototype.getSum=function(e){var t=0;if(this._chunks[e])for(var n=0,r=this.count();n<r;n++){var o=this.get(e,n);isNaN(o)||(t+=o)}return t},e.prototype.getMedian=function(e){var t=[];this.each([e],(function(e){isNaN(e)||t.push(e)}));var n=t.sort((function(e,t){return e-t})),r=this.count();return 0===r?0:r%2===1?n[(r-1)/2]:(n[r/2]+n[r/2-1])/2},e.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(null!=n&&n<this._count&&n===e)return e;for(var r=0,o=this._count-1;r<=o;){var i=(r+o)/2|0;if(t[i]<e)r=i+1;else{if(!(t[i]>e))return i;o=i-1}}return-1},e.prototype.indicesOfNearest=function(e,t,n){var r=this._chunks[e],o=[];if(!r)return o;null==n&&(n=1/0);for(var i=1/0,a=-1,s=0,l=0,c=this.count();l<c;l++){var u=t-r[this.getRawIndex(l)],d=Math.abs(u);d<=n&&((d<i||d===i&&u>=0&&a<0)&&(i=d,a=u,s=0),u===a&&(o[s++]=l))}return o.length=s,o},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var o=0;o<r;o++)e[o]=t[o]}else e=new n(t.buffer,0,r)}else{e=new(n=mA(this._rawCount))(this.count());for(o=0;o<e.length;o++)e[o]=o}return e},e.prototype.filter=function(e,t){if(!this._count)return this;for(var n=this.clone(),r=n.count(),o=new(mA(n._rawCount))(r),i=[],a=e.length,s=0,l=e[0],c=n._chunks,u=0;u<r;u++){var d=void 0,h=n.getRawIndex(u);if(0===a)d=t(u);else if(1===a){d=t(c[l][h],u)}else{for(var p=0;p<a;p++)i[p]=c[e[p]][h];i[p]=u,d=t.apply(null,i)}d&&(o[s++]=h)}return s<r&&(n._indices=o),n._count=s,n._extent=[],n._updateGetRawIdx(),n},e.prototype.selectRange=function(e){var t=this.clone(),n=t._count;if(!n)return this;var r=zu(e),o=r.length;if(!o)return this;var i=t.count(),a=new(mA(t._rawCount))(i),s=0,l=r[0],c=e[l][0],u=e[l][1],d=t._chunks,h=!1;if(!t._indices){var p=0;if(1===o){for(var f=d[r[0]],g=0;g<n;g++){((x=f[g])>=c&&x<=u||isNaN(x))&&(a[s++]=p),p++}h=!0}else if(2===o){f=d[r[0]];var m=d[r[1]],v=e[r[1]][0],y=e[r[1]][1];for(g=0;g<n;g++){var x=f[g],b=m[g];(x>=c&&x<=u||isNaN(x))&&(b>=v&&b<=y||isNaN(b))&&(a[s++]=p),p++}h=!0}}if(!h)if(1===o)for(g=0;g<i;g++){var w=t.getRawIndex(g);((x=d[r[0]][w])>=c&&x<=u||isNaN(x))&&(a[s++]=w)}else for(g=0;g<i;g++){for(var S=!0,_=(w=t.getRawIndex(g),0);_<o;_++){var A=r[_];((x=d[A][w])<e[A][0]||x>e[A][1])&&(S=!1)}S&&(a[s++]=t.getRawIndex(g))}return s<i&&(t._indices=a),t._count=s,t._extent=[],t._updateGetRawIdx(),t},e.prototype.map=function(e,t){var n=this.clone(e);return this._updateDims(n,e,t),n},e.prototype.modify=function(e,t){this._updateDims(this,e,t)},e.prototype._updateDims=function(e,t,n){for(var r=e._chunks,o=[],i=t.length,a=e.count(),s=[],l=e._rawExtent,c=0;c<t.length;c++)l[t[c]]=[1/0,-1/0];for(var u=0;u<a;u++){for(var d=e.getRawIndex(u),h=0;h<i;h++)s[h]=r[t[h]][d];s[i]=u;var p=n&&n.apply(null,s);if(null!=p){"object"!==typeof p&&(o[0]=p,p=o);for(c=0;c<p.length;c++){var f=t[c],g=p[c],m=l[f],v=r[f];v&&(v[d]=g),g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}}},e.prototype.lttbDownSample=function(e,t){var n,r,o,i=this.clone([e],!0),a=i._chunks[e],s=this.count(),l=0,c=Math.floor(1/t),u=this.getRawIndex(0),d=new(mA(this._rawCount))(Math.min(2*(Math.ceil(s/c)+2),s));d[l++]=u;for(var h=1;h<s-1;h+=c){for(var p=Math.min(h+c,s-1),f=Math.min(h+2*c,s),g=(f+p)/2,m=0,v=p;v<f;v++){var y=a[k=this.getRawIndex(v)];isNaN(y)||(m+=y)}m/=f-p;var x=h,b=Math.min(h+c,s),w=h-1,S=a[u];n=-1,o=x;var _=-1,A=0;for(v=x;v<b;v++){var k;y=a[k=this.getRawIndex(v)];isNaN(y)?(A++,_<0&&(_=k)):(r=Math.abs((w-g)*(y-S)-(w-v)*(m-S)))>n&&(n=r,o=k)}A>0&&A<b-x&&(d[l++]=Math.min(_,o),o=Math.max(_,o)),d[l++]=o,u=o}return d[l++]=this.getRawIndex(s-1),i._count=l,i._indices=d,i.getRawIndex=this._getRawIdx,i},e.prototype.downSample=function(e,t,n,r){for(var o=this.clone([e],!0),i=o._chunks,a=[],s=Math.floor(1/t),l=i[e],c=this.count(),u=o._rawExtent[e]=[1/0,-1/0],d=new(mA(this._rawCount))(Math.ceil(c/s)),h=0,p=0;p<c;p+=s){s>c-p&&(s=c-p,a.length=s);for(var f=0;f<s;f++){var g=this.getRawIndex(p+f);a[f]=l[g]}var m=n(a),v=this.getRawIndex(Math.min(p+r(a,m)||0,c-1));l[v]=m,m<u[0]&&(u[0]=m),m>u[1]&&(u[1]=m),d[h++]=v}return o._count=h,o._indices=d,o._updateGetRawIdx(),o},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,o=0,i=this.count();o<i;o++){var a=this.getRawIndex(o);switch(n){case 0:t(o);break;case 1:t(r[e[0]][a],o);break;case 2:t(r[e[0]][a],r[e[1]][a],o);break;default:for(var s=0,l=[];s<n;s++)l[s]=r[e[s]][a];l[s]=o,t.apply(null,l)}}},e.prototype.getDataExtent=function(e){var t=this._chunks[e],n=[1/0,-1/0];if(!t)return n;var r,o=this.count();if(!this._indices)return this._rawExtent[e].slice();if(r=this._extent[e])return r.slice();for(var i=(r=n)[0],a=r[1],s=0;s<o;s++){var l=t[this.getRawIndex(s)];l<i&&(i=l),l>a&&(a=l)}return r=[i,a],this._extent[e]=r,r},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,o=0;o<r.length;o++)n.push(r[o][t]);return n},e.prototype.clone=function(t,n){var r=new e,o=this._chunks,i=t&&Nu(t,(function(e,t){return e[t]=!0,e}),{});if(i)for(var a=0;a<o.length;a++)r._chunks[a]=i[a]?vA(o[a]):o[a];else r._chunks=o;return this._copyCommonProps(r),n||(r._indices=this._cloneIndices()),r._updateGetRawIdx(),r},e.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=Cu(this._extent),e._rawExtent=Cu(this._rawExtent)},e.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,t=void 0;if(e===Array){var n=this._indices.length;t=new e(n);for(var r=0;r<n;r++)t[r]=this._indices[r]}else t=new e(this._indices);return t}return null},e.prototype._getRawIdxIdentity=function(e){return e},e.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,r){return Y_(e[r],this._dimensions[r])}cA={arrayRows:e,objectRows:function(e,t,n,r){return Y_(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var o=e&&(null==e.value?e:e.value);return Y_(o instanceof Array?o[r]:o,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}();const bA=xA;var wA=function(){function e(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e,t,n=this._sourceHost,r=this._getUpstreamSourceManagers(),o=!!r.length;if(_A(n)){var i=n,a=void 0,s=void 0,l=void 0;if(o){var c=r[0];c.prepareSource(),a=(l=c.getSource()).data,s=l.sourceFormat,t=[c._getVersionSign()]}else s=qu(a=i.get("data",!0))?hS:lS,t=[];var u=this._getSourceMetaRawOption()||{},d=l&&l.metaRawOption||{},h=Ju(u.seriesLayoutBy,d.seriesLayoutBy)||null,p=Ju(u.sourceHeader,d.sourceHeader),f=Ju(u.dimensions,d.dimensions);e=h!==d.seriesLayoutBy||!!p!==!!d.sourceHeader||f?[w_(a,{seriesLayoutBy:h,sourceHeader:p,dimensions:f},s)]:[]}else{var g=n;if(o){var m=this._applyTransform(r);e=m.sourceList,t=m.upstreamSignList}else{e=[w_(g.get("source",!0),this._getSourceMetaRawOption(),null)],t=[]}}this._setLocalSource(e,t)},e.prototype._applyTransform=function(e){var t,n=this._sourceHost,r=n.get("transform",!0),o=n.get("fromTransformResult",!0);if(null!=o){1!==e.length&&AA("")}var i,a=[],s=[];return Ru(e,(function(e){e.prepareSource();var t=e.getSource(o||0);null==o||t||AA(""),a.push(t),s.push(e._getVersionSign())})),r?t=function(e,t,n){var r=xm(e),o=r.length;o||X_("");for(var i=0,a=o;i<a;i++)t=sA(r[i],t),i!==a-1&&(t.length=Math.max(t.length,1));return t}(r,a,n.componentIndex):null!=o&&(t=[(i=a[0],new x_({data:i.data,sourceFormat:i.sourceFormat,seriesLayoutBy:i.seriesLayoutBy,dimensionsDefine:Cu(i.dimensionsDefine),startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount}))]),{sourceList:t,upstreamSignList:s}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t<e.length;t++){var n=e[t];if(n._isDirty()||this._upstreamSignList[t]!==n._getVersionSign())return!0}},e.prototype.getSource=function(e){e=e||0;var t=this._sourceList[e];if(!t){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(e)}return t},e.prototype.getSharedDataStore=function(e){var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},e.prototype._innerGetDataStore=function(e,t,n){var r=this._storeList,o=r[0];o||(o=r[0]={});var i=o[n];if(!i){var a=this._getUpstreamSourceManagers()[0];_A(this._sourceHost)&&a?i=a._innerGetDataStore(e,t,n):(i=new bA).initData(new M_(t,e.length),e),o[n]=i}return i},e.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(_A(e)){var t=bS(e);return t?[t.getSourceManager()]:[]}return Eu(function(e){return e.get("transform",!0)||e.get("fromTransformResult",!0)?Om(e.ecModel,"dataset",{index:e.get("fromDatasetIndex",!0),id:e.get("fromDatasetId",!0)},Em).models:[]}(e),(function(e){return e.getSourceManager()}))},e.prototype._getSourceMetaRawOption=function(){var e,t,n,r=this._sourceHost;if(_A(r))e=r.get("seriesLayoutBy",!0),t=r.get("sourceHeader",!0),n=r.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var o=r;e=o.get("seriesLayoutBy",!0),t=o.get("sourceHeader",!0),n=o.get("dimensions",!0)}return{seriesLayoutBy:e,sourceHeader:t,dimensions:n}},e}();function SA(e){e.option.transform&&ad(e.option.transform)}function _A(e){return"series"===e.mainType}function AA(e){throw new Error(e)}var kA="line-height:1";function CA(e,t){var n=e.color||"#6e7079",r=e.fontSize||12,o=e.fontWeight||"400",i=e.color||"#464646",a=e.fontSize||14,s=e.fontWeight||"900";return"html"===t?{nameStyle:"font-size:"+Qd(r+"")+"px;color:"+Qd(n)+";font-weight:"+Qd(o+""),valueStyle:"font-size:"+Qd(a+"")+"px;color:"+Qd(i)+";font-weight:"+Qd(s+"")}:{nameStyle:{fontSize:r,fill:n,fontWeight:o},valueStyle:{fontSize:a,fill:i,fontWeight:s}}}var MA=[0,10,20,30],IA=["","\n","\n\n","\n\n\n"];function TA(e,t){return t.type=e,t}function DA(e){return"section"===e.type}function jA(e){return DA(e)?LA:RA}function PA(e){if(DA(e)){var t=0,n=e.blocks.length,r=n>1||n>0&&!e.noHeader;return Ru(e.blocks,(function(e){var n=PA(e);n>=t&&(t=n+ +(r&&(!n||DA(e)&&!e.noHeader)))})),t}return 0}function LA(e,t,n,r){var o,i=t.noHeader,a=(o=PA(t),{html:MA[o],richText:IA[o]}),s=[],l=t.blocks||[];rd(!l||Vu(l)),l=l||[];var c=e.orderMode;if(t.sortBlocks&&c){l=l.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(gd(u,c)){var d=new Q_(u[c],null);l.sort((function(e,t){return d.evaluate(e.sortParam,t.sortParam)}))}else"seriesDesc"===c&&l.reverse()}Ru(l,(function(n,o){var i=t.valueFormatter,l=jA(n)(i?Tu(Tu({},e),{valueFormatter:i}):e,n,o>0?a.html:0,r);null!=l&&s.push(l)}));var h="richText"===e.renderMode?s.join(a.richText):NA(s.join(""),i?n:a.html);if(i)return h;var p=zw(t.header,"ordinal",e.useUTC),f=CA(r,e.renderMode).nameStyle;return"richText"===e.renderMode?OA(e,p,f)+a.richText+h:NA('<div style="'+f+";"+kA+';">'+Qd(p)+"</div>"+h,n)}function RA(e,t,n,r){var o=e.renderMode,i=t.noName,a=t.noValue,s=!t.markerType,l=t.name,c=e.useUTC,u=t.valueFormatter||e.valueFormatter||function(e){return Eu(e=Vu(e)?e:[e],(function(e,t){return zw(e,Vu(p)?p[t]:p,c)}))};if(!i||!a){var d=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",o),h=i?"":zw(l,"ordinal",c),p=t.valueType,f=a?[]:u(t.value,t.dataIndex),g=!s||!i,m=!s&&i,v=CA(r,o),y=v.nameStyle,x=v.valueStyle;return"richText"===o?(s?"":d)+(i?"":OA(e,h,y))+(a?"":function(e,t,n,r,o){var i=[o],a=r?10:20;return n&&i.push({padding:[0,0,0,a],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(Vu(t)?t.join("  "):t,i)}(e,f,g,m,x)):NA((s?"":d)+(i?"":function(e,t,n){return'<span style="'+n+";"+(t?"margin-left:2px":"")+'">'+Qd(e)+"</span>"}(h,!s,y))+(a?"":function(e,t,n,r){var o=n?"10px":"20px",i=t?"float:right;margin-left:"+o:"";return e=Vu(e)?e:[e],'<span style="'+i+";"+r+'">'+Eu(e,(function(e){return Qd(e)})).join("&nbsp;&nbsp;")+"</span>"}(f,g,m,x)),n)}}function EA(e,t,n,r,o,i){if(e)return jA(e)({useUTC:o,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,i)}function NA(e,t){return'<div style="'+("margin: "+t+"px 0 0")+";"+kA+';">'+e+'<div style="clear:both"></div></div>'}function OA(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function zA(e,t){return Ww(e.getData().getItemVisual(t,"style")[e.visualDrawType])}function BA(e,t){var n=e.get("padding");return null!=n?n:"richText"===t?[8,10]:10}var FA=function(){function e(){this.richTextStyles={},this._nextStyleNameId=pm()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r="richText"===n?this._generateStyleName():null,o=function(e,t){var n=Hu(e)?{color:e,extraCssText:t}:e||{},r=n.color,o=n.type;t=n.extraCssText;var i=n.renderMode||"html";return r?"html"===i?"subItem"===o?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Qd(r)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+Qd(r)+";"+(t||"")+'"></span>':{renderMode:i,content:"{"+(n.markerId||"markerX")+"|}  ",style:"subItem"===o?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:""}({color:t,type:e,renderMode:n,markerId:r});return Hu(o)?o:(this.richTextStyles[r]=o.style,o.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};Vu(t)?Ru(t,(function(e){return Tu(n,e)})):Tu(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,"{"+r+"|"+e+"}"},e}();function VA(e){var t,n,r,o,i=e.series,a=e.dataIndex,s=e.multipleSeries,l=i.getData(),c=l.mapDimensionsAll("defaultedTooltip"),u=c.length,d=i.getRawValue(a),h=Vu(d),p=zA(i,a);if(u>1||h&&!u){var f=function(e,t,n,r,o){var i=t.getData(),a=Nu(e,(function(e,t,n){var r=i.getDimensionInfo(n);return e||r&&!1!==r.tooltip&&null!=r.displayName}),!1),s=[],l=[],c=[];function u(e,t){var n=i.getDimensionInfo(t);n&&!1!==n.otherDims.tooltip&&(a?c.push(TA("nameValue",{markerType:"subItem",markerColor:o,name:n.displayName,value:e,valueType:n.type})):(s.push(e),l.push(n.type)))}return r.length?Ru(r,(function(e){u(z_(i,n,e),e)})):Ru(e,u),{inlineValues:s,inlineValueTypes:l,blocks:c}}(d,i,a,c,p);t=f.inlineValues,n=f.inlineValueTypes,r=f.blocks,o=f.inlineValues[0]}else if(u){var g=l.getDimensionInfo(c[0]);o=t=z_(l,a,c[0]),n=g.type}else o=t=h?d[0]:d;var m=Im(i),v=m&&i.name||"",y=l.getName(a),x=s?v:y;return TA("section",{header:v,noHeader:s||!m,sortParam:o,blocks:[TA("nameValue",{markerType:"item",markerColor:p,name:x,noName:!od(x),value:t,valueType:n,dataIndex:a})].concat(r||[])})}var WA=jm();function HA(e,t){return e.getName(t)||e.getId(t)}var GA="__universalTransitionEnabled",UA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return ru(t,e),t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=W_({count:YA,reset:qA}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(WA(this).sourceManager=new wA(this)).prepareSource();var r=this.getInitialData(e,n);KA(r,this),this.dataTask.context.data=r,WA(this).dataBeforeProcessed=r,XA(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=$w(this),r=n?Jw(e):{},o=this.subType;rS.hasClass(o)&&(o+="Series"),Mu(e,t.getTheme().get(this.subType)),Mu(e,this.getDefaultOption()),bm(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&Qw(e,r,n)},t.prototype.mergeOption=function(e,t){e=Mu(this.option,e,!0),this.fillDataTextStyle(e.data);var n=$w(this);n&&Qw(this.option,e,n);var r=WA(this).sourceManager;r.dirty(),r.prepareSource();var o=this.getInitialData(e,t);KA(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,WA(this).dataBeforeProcessed=o,XA(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(e){if(e&&!qu(e))for(var t=["show"],n=0;n<e.length;n++)e[n]&&e[n].label&&bm(e[n],"label",t)},t.prototype.getInitialData=function(e,t){},t.prototype.appendData=function(e){this.getRawData().appendData(e.data)},t.prototype.getData=function(e){var t=QA(this);if(t){var n=t.context.data;return null!=e&&n.getLinkedData?n.getLinkedData(e):n}return WA(this).data},t.prototype.getAllData=function(){var e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]},t.prototype.setData=function(e){var t=QA(this);if(t){var n=t.context;n.outputData=e,t!==this.dataTask&&(n.data=e)}WA(this).data=e},t.prototype.getEncode=function(){var e=this.get("encode",!0);if(e)return dd(e)},t.prototype.getSourceManager=function(){return WA(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return WA(this).dataBeforeProcessed},t.prototype.getColorBy=function(){return this.get("colorBy")||"series"},t.prototype.isColorBySeries=function(){return"series"===this.getColorBy()},t.prototype.getBaseAxis=function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},t.prototype.formatTooltip=function(e,t,n){return VA({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(au.node&&(!e||!e.ssr))return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,o=TS.prototype.getColorFromPalette.call(this,e,t,n);return o||(o=r.getColorFromPalette(e,t,n)),o},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,o=this.getData(t);if("series"===r||"all"===n)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var i=0;i<e.length;i++){var a=HA(o,e[i]);n[a]=!1,this._selectedDataIndicesMap[a]=-1}}},t.prototype.toggleSelect=function(e,t){for(var n=[],r=0;r<e.length;r++)n[0]=e[r],this.isSelected(e[r],t)?this.unselect(n,t):this.select(n,t)},t.prototype.getSelectedDataIndices=function(){if("all"===this.option.selectedMap)return[].slice.call(this.getData().getIndices());for(var e=this._selectedDataIndicesMap,t=zu(e),n=[],r=0;r<t.length;r++){var o=e[t[r]];o>=0&&n.push(o)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return("all"===n||n[HA(r,e)])&&!r.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[GA])return!0;var e=this.option.universalTransition;return!!e&&(!0===e||e&&e.enabled)},t.prototype._innerSelect=function(e,t){var n,r,o=this.option,i=o.selectedMode,a=t.length;if(i&&a)if("series"===i)o.selectedMap="all";else if("multiple"===i){Xu(o.selectedMap)||(o.selectedMap={});for(var s=o.selectedMap,l=0;l<a;l++){var c=t[l];s[d=HA(e,c)]=!0,this._selectedDataIndicesMap[d]=e.getRawIndex(c)}}else if("single"===i||!0===i){var u=t[a-1],d=HA(e,u);o.selectedMap=((n={})[d]=!0,n),this._selectedDataIndicesMap=((r={})[d]=e.getRawIndex(u),r)}},t.prototype._initSelectedMapFromData=function(e){if(!this.option.selectedMap){var t=[];e.hasItemOption&&e.each((function(n){var r=e.getRawDataItem(n);r&&r.selected&&t.push(n)})),t.length>0&&this._innerSelect(e,t)}},t.registerClass=function(e){return rS.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type="series.__base__",e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol="circle",e.visualStyleAccessPath="itemStyle",e.visualDrawType="fill"}(),t}(rS);function XA(e){var t=e.name;Im(e)||(e.name=function(e){var t=e.getRawData(),n=t.mapDimensionsAll("seriesName"),r=[];return Ru(n,(function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)})),r.join(" ")}(e)||t)}function YA(e){return e.model.getRawData().count()}function qA(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),ZA}function ZA(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function KA(e,t){Ru(hd(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),(function(n){e.wrapMethod(n,Fu($A,t))}))}function $A(e,t){var n=QA(e);return n&&n.setOutputEnd((t||this).count()),t}function QA(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var o=r.agentStubMap;o&&(r=o.get(e.uid))}return r}}Pu(UA,F_),Pu(UA,TS),Xm(UA,rS);const JA=UA;var ek=function(){function e(){this.group=new Fg,this.uid=Zb("viewComponent")}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();Um(ek),Km(ek);const tk=ek;function nk(){var e=jm();return function(t){var n=e(t),r=t.pipelineContext,o=!!n.large,i=!!n.progressiveRender,a=n.large=!(!r||!r.large),s=n.progressiveRender=!(!r||!r.progressiveRender);return!(o===a&&i===s)&&"reset"}}var rk=ay.CMD,ok=[[],[],[]],ik=Math.sqrt,ak=Math.atan2;function sk(e,t){if(t){var n,r,o,i,a,s,l=e.data,c=e.len(),u=rk.M,d=rk.C,h=rk.L,p=rk.R,f=rk.A,g=rk.Q;for(o=0,i=0;o<c;){switch(n=l[o++],i=o,r=0,n){case u:case h:r=1;break;case d:r=3;break;case g:r=2;break;case f:var m=t[4],v=t[5],y=ik(t[0]*t[0]+t[1]*t[1]),x=ik(t[2]*t[2]+t[3]*t[3]),b=ak(-t[1]/x,t[0]/y);l[o]*=y,l[o++]+=m,l[o]*=x,l[o++]+=v,l[o++]*=y,l[o++]*=x,l[o++]+=b,l[o++]+=b,i=o+=2;break;case p:s[0]=l[o++],s[1]=l[o++],Ed(s,s,t),l[i++]=s[0],l[i++]=s[1],s[0]+=l[o++],s[1]+=l[o++],Ed(s,s,t),l[i++]=s[0],l[i++]=s[1]}for(a=0;a<r;a++){var w=ok[a];w[0]=l[o++],w[1]=l[o++],Ed(w,w,t),l[i++]=w[0],l[i++]=w[1]}}e.increaseVersion()}}var lk=Math.sqrt,ck=Math.sin,uk=Math.cos,dk=Math.PI;function hk(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function pk(e,t){return(e[0]*t[0]+e[1]*t[1])/(hk(e)*hk(t))}function fk(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(pk(e,t))}function gk(e,t,n,r,o,i,a,s,l,c,u){var d=l*(dk/180),h=uk(d)*(e-n)/2+ck(d)*(t-r)/2,p=-1*ck(d)*(e-n)/2+uk(d)*(t-r)/2,f=h*h/(a*a)+p*p/(s*s);f>1&&(a*=lk(f),s*=lk(f));var g=(o===i?-1:1)*lk((a*a*(s*s)-a*a*(p*p)-s*s*(h*h))/(a*a*(p*p)+s*s*(h*h)))||0,m=g*a*p/s,v=g*-s*h/a,y=(e+n)/2+uk(d)*m-ck(d)*v,x=(t+r)/2+ck(d)*m+uk(d)*v,b=fk([1,0],[(h-m)/a,(p-v)/s]),w=[(h-m)/a,(p-v)/s],S=[(-1*h-m)/a,(-1*p-v)/s],_=fk(w,S);if(pk(w,S)<=-1&&(_=dk),pk(w,S)>=1&&(_=0),_<0){var A=Math.round(_/dk*1e6)/1e6;_=2*dk+A%2*dk}u.addData(c,y,x,a,s,b,_,d,i)}var mk=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,vk=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var yk=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xd(t,e),t.prototype.applyTransform=function(e){},t}(Ty);function xk(e){return null!=e.setData}function bk(e,t){var n=function(e){var t=new ay;if(!e)return t;var n,r=0,o=0,i=r,a=o,s=ay.CMD,l=e.match(mk);if(!l)return t;for(var c=0;c<l.length;c++){for(var u=l[c],d=u.charAt(0),h=void 0,p=u.match(vk)||[],f=p.length,g=0;g<f;g++)p[g]=parseFloat(p[g]);for(var m=0;m<f;){var v=void 0,y=void 0,x=void 0,b=void 0,w=void 0,S=void 0,_=void 0,A=r,k=o,C=void 0,M=void 0;switch(d){case"l":r+=p[m++],o+=p[m++],h=s.L,t.addData(h,r,o);break;case"L":r=p[m++],o=p[m++],h=s.L,t.addData(h,r,o);break;case"m":r+=p[m++],o+=p[m++],h=s.M,t.addData(h,r,o),i=r,a=o,d="l";break;case"M":r=p[m++],o=p[m++],h=s.M,t.addData(h,r,o),i=r,a=o,d="L";break;case"h":r+=p[m++],h=s.L,t.addData(h,r,o);break;case"H":r=p[m++],h=s.L,t.addData(h,r,o);break;case"v":o+=p[m++],h=s.L,t.addData(h,r,o);break;case"V":o=p[m++],h=s.L,t.addData(h,r,o);break;case"C":h=s.C,t.addData(h,p[m++],p[m++],p[m++],p[m++],p[m++],p[m++]),r=p[m-2],o=p[m-1];break;case"c":h=s.C,t.addData(h,p[m++]+r,p[m++]+o,p[m++]+r,p[m++]+o,p[m++]+r,p[m++]+o),r+=p[m-2],o+=p[m-1];break;case"S":v=r,y=o,C=t.len(),M=t.data,n===s.C&&(v+=r-M[C-4],y+=o-M[C-3]),h=s.C,A=p[m++],k=p[m++],r=p[m++],o=p[m++],t.addData(h,v,y,A,k,r,o);break;case"s":v=r,y=o,C=t.len(),M=t.data,n===s.C&&(v+=r-M[C-4],y+=o-M[C-3]),h=s.C,A=r+p[m++],k=o+p[m++],r+=p[m++],o+=p[m++],t.addData(h,v,y,A,k,r,o);break;case"Q":A=p[m++],k=p[m++],r=p[m++],o=p[m++],h=s.Q,t.addData(h,A,k,r,o);break;case"q":A=p[m++]+r,k=p[m++]+o,r+=p[m++],o+=p[m++],h=s.Q,t.addData(h,A,k,r,o);break;case"T":v=r,y=o,C=t.len(),M=t.data,n===s.Q&&(v+=r-M[C-4],y+=o-M[C-3]),r=p[m++],o=p[m++],h=s.Q,t.addData(h,v,y,r,o);break;case"t":v=r,y=o,C=t.len(),M=t.data,n===s.Q&&(v+=r-M[C-4],y+=o-M[C-3]),r+=p[m++],o+=p[m++],h=s.Q,t.addData(h,v,y,r,o);break;case"A":x=p[m++],b=p[m++],w=p[m++],S=p[m++],_=p[m++],gk(A=r,k=o,r=p[m++],o=p[m++],S,_,x,b,w,h=s.A,t);break;case"a":x=p[m++],b=p[m++],w=p[m++],S=p[m++],_=p[m++],gk(A=r,k=o,r+=p[m++],o+=p[m++],S,_,x,b,w,h=s.A,t)}}"z"!==d&&"Z"!==d||(h=s.Z,t.addData(h),r=i,o=a),n=h}return t.toStatic(),t}(e),r=Tu({},t);return r.buildPath=function(e){if(xk(e)){e.setData(n.data),(t=e.getContext())&&e.rebuildPath(t,1)}else{var t=e;n.rebuildPath(t,1)}},r.applyTransform=function(e){sk(n,e),this.dirtyShape()},r}function wk(e,t){return new yk(bk(e,t))}function Sk(e,t){t=t||{};var n=new Ty;return e.shape&&n.setShape(e.shape),n.setStyle(e.style),t.bakeTransform?sk(n.path,e.getComputedTransform()):t.toLocal?n.setLocalTransform(e.getComputedTransform()):n.copyTransform(e),n.buildPath=e.buildPath,n.applyTransform=n.applyTransform,n.z=e.z,n.z2=e.z2,n.zlevel=e.zlevel,n}var _k=function(){this.cx=0,this.cy=0,this.r=0},Ak=function(e){function t(t){return e.call(this,t)||this}return xd(t,e),t.prototype.getDefaultShape=function(){return new _k},t.prototype.buildPath=function(e,t){e.moveTo(t.cx+t.r,t.cy),e.arc(t.cx,t.cy,t.r,0,2*Math.PI)},t}(Ty);Ak.prototype.type="circle";const kk=Ak;var Ck=function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0},Mk=function(e){function t(t){return e.call(this,t)||this}return xd(t,e),t.prototype.getDefaultShape=function(){return new Ck},t.prototype.buildPath=function(e,t){var n=.5522848,r=t.cx,o=t.cy,i=t.rx,a=t.ry,s=i*n,l=a*n;e.moveTo(r-i,o),e.bezierCurveTo(r-i,o-l,r-s,o-a,r,o-a),e.bezierCurveTo(r+s,o-a,r+i,o-l,r+i,o),e.bezierCurveTo(r+i,o+l,r+s,o+a,r,o+a),e.bezierCurveTo(r-s,o+a,r-i,o+l,r-i,o),e.closePath()},t}(Ty);Mk.prototype.type="ellipse";const Ik=Mk;var Tk=Math.PI,Dk=2*Tk,jk=Math.sin,Pk=Math.cos,Lk=Math.acos,Rk=Math.atan2,Ek=Math.abs,Nk=Math.sqrt,Ok=Math.max,zk=Math.min,Bk=1e-4;function Fk(e,t,n,r,o,i,a){var s=e-n,l=t-r,c=(a?i:-i)/Nk(s*s+l*l),u=c*l,d=-c*s,h=e+u,p=t+d,f=n+u,g=r+d,m=(h+f)/2,v=(p+g)/2,y=f-h,x=g-p,b=y*y+x*x,w=o-i,S=h*g-f*p,_=(x<0?-1:1)*Nk(Ok(0,w*w*b-S*S)),A=(S*x-y*_)/b,k=(-S*y-x*_)/b,C=(S*x+y*_)/b,M=(-S*y+x*_)/b,I=A-m,T=k-v,D=C-m,j=M-v;return I*I+T*T>D*D+j*j&&(A=C,k=M),{cx:A,cy:k,x0:-u,y0:-d,x1:A*(o/w-1),y1:k*(o/w-1)}}function Vk(e,t){var n,r=Ok(t.r,0),o=Ok(t.r0||0,0),i=r>0;if(i||o>0){if(i||(r=o,o=0),o>r){var a=r;r=o,o=a}var s=t.startAngle,l=t.endAngle;if(!isNaN(s)&&!isNaN(l)){var c=t.cx,u=t.cy,d=!!t.clockwise,h=Ek(l-s),p=h>Dk&&h%Dk;if(p>Bk&&(h=p),r>Bk)if(h>Dk-Bk)e.moveTo(c+r*Pk(s),u+r*jk(s)),e.arc(c,u,r,s,l,!d),o>Bk&&(e.moveTo(c+o*Pk(l),u+o*jk(l)),e.arc(c,u,o,l,s,d));else{var f=void 0,g=void 0,m=void 0,v=void 0,y=void 0,x=void 0,b=void 0,w=void 0,S=void 0,_=void 0,A=void 0,k=void 0,C=void 0,M=void 0,I=void 0,T=void 0,D=r*Pk(s),j=r*jk(s),P=o*Pk(l),L=o*jk(l),R=h>Bk;if(R){var E=t.cornerRadius;E&&(n=function(e){var t;if(Vu(e)){var n=e.length;if(!n)return e;t=1===n?[e[0],e[0],0,0]:2===n?[e[0],e[0],e[1],e[1]]:3===n?e.concat(e[2]):e}else t=[e,e,e,e];return t}(E),f=n[0],g=n[1],m=n[2],v=n[3]);var N=Ek(r-o)/2;if(y=zk(N,m),x=zk(N,v),b=zk(N,f),w=zk(N,g),A=S=Ok(y,x),k=_=Ok(b,w),(S>Bk||_>Bk)&&(C=r*Pk(l),M=r*jk(l),I=o*Pk(s),T=o*jk(s),h<Tk)){var O=function(e,t,n,r,o,i,a,s){var l=n-e,c=r-t,u=a-o,d=s-i,h=d*l-u*c;if(!(h*h<Bk))return[e+(h=(u*(t-i)-d*(e-o))/h)*l,t+h*c]}(D,j,I,T,C,M,P,L);if(O){var z=D-O[0],B=j-O[1],F=C-O[0],V=M-O[1],W=1/jk(Lk((z*F+B*V)/(Nk(z*z+B*B)*Nk(F*F+V*V)))/2),H=Nk(O[0]*O[0]+O[1]*O[1]);A=zk(S,(r-H)/(W+1)),k=zk(_,(o-H)/(W-1))}}}if(R)if(A>Bk){var G=zk(m,A),U=zk(v,A),X=Fk(I,T,D,j,r,G,d),Y=Fk(C,M,P,L,r,U,d);e.moveTo(c+X.cx+X.x0,u+X.cy+X.y0),A<S&&G===U?e.arc(c+X.cx,u+X.cy,A,Rk(X.y0,X.x0),Rk(Y.y0,Y.x0),!d):(G>0&&e.arc(c+X.cx,u+X.cy,G,Rk(X.y0,X.x0),Rk(X.y1,X.x1),!d),e.arc(c,u,r,Rk(X.cy+X.y1,X.cx+X.x1),Rk(Y.cy+Y.y1,Y.cx+Y.x1),!d),U>0&&e.arc(c+Y.cx,u+Y.cy,U,Rk(Y.y1,Y.x1),Rk(Y.y0,Y.x0),!d))}else e.moveTo(c+D,u+j),e.arc(c,u,r,s,l,!d);else e.moveTo(c+D,u+j);if(o>Bk&&R)if(k>Bk){G=zk(f,k),X=Fk(P,L,C,M,o,-(U=zk(g,k)),d),Y=Fk(D,j,I,T,o,-G,d);e.lineTo(c+X.cx+X.x0,u+X.cy+X.y0),k<_&&G===U?e.arc(c+X.cx,u+X.cy,k,Rk(X.y0,X.x0),Rk(Y.y0,Y.x0),!d):(U>0&&e.arc(c+X.cx,u+X.cy,U,Rk(X.y0,X.x0),Rk(X.y1,X.x1),!d),e.arc(c,u,o,Rk(X.cy+X.y1,X.cx+X.x1),Rk(Y.cy+Y.y1,Y.cx+Y.x1),d),G>0&&e.arc(c+Y.cx,u+Y.cy,G,Rk(Y.y1,Y.x1),Rk(Y.y0,Y.x0),!d))}else e.lineTo(c+P,u+L),e.arc(c,u,o,l,s,d);else e.lineTo(c+P,u+L)}else e.moveTo(c,u);e.closePath()}}}var Wk=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0},Hk=function(e){function t(t){return e.call(this,t)||this}return xd(t,e),t.prototype.getDefaultShape=function(){return new Wk},t.prototype.buildPath=function(e,t){Vk(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(Ty);Hk.prototype.type="sector";const Gk=Hk;var Uk=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},Xk=function(e){function t(t){return e.call(this,t)||this}return xd(t,e),t.prototype.getDefaultShape=function(){return new Uk},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,o=2*Math.PI;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,o,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,o,!0)},t}(Ty);Xk.prototype.type="ring";const Yk=Xk;function qk(e,t,n){var r=t.smooth,o=t.points;if(o&&o.length>=2){if(r){var i=function(e,t,n,r){var o,i,a,s,l=[],c=[],u=[],d=[];if(r){a=[1/0,1/0],s=[-1/0,-1/0];for(var h=0,p=e.length;h<p;h++)Nd(a,a,e[h]),Od(s,s,e[h]);Nd(a,a,r[0]),Od(s,s,r[1])}for(h=0,p=e.length;h<p;h++){var f=e[h];if(n)o=e[h?h-1:p-1],i=e[(h+1)%p];else{if(0===h||h===p-1){l.push(Sd(e[h]));continue}o=e[h-1],i=e[h+1]}Cd(c,i,o),Td(c,c,t);var g=jd(f,o),m=jd(f,i),v=g+m;0!==v&&(g/=v,m/=v),Td(u,c,-g),Td(d,c,m);var y=Ad([],f,u),x=Ad([],f,d);r&&(Od(y,y,a),Nd(y,y,s),Od(x,x,a),Nd(x,x,s)),l.push(y),l.push(x)}return n&&l.push(l.shift()),l}(o,r,n,t.smoothConstraint);e.moveTo(o[0][0],o[0][1]);for(var a=o.length,s=0;s<(n?a:a-1);s++){var l=i[2*s],c=i[2*s+1],u=o[(s+1)%a];e.bezierCurveTo(l[0],l[1],c[0],c[1],u[0],u[1])}}else{e.moveTo(o[0][0],o[0][1]);s=1;for(var d=o.length;s<d;s++)e.lineTo(o[s][0],o[s][1])}n&&e.closePath()}}var Zk=function(){this.points=null,this.smooth=0,this.smoothConstraint=null},Kk=function(e){function t(t){return e.call(this,t)||this}return xd(t,e),t.prototype.getDefaultShape=function(){return new Zk},t.prototype.buildPath=function(e,t){qk(e,t,!0)},t}(Ty);Kk.prototype.type="polygon";const $k=Kk;var Qk=function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null},Jk=function(e){function t(t){return e.call(this,t)||this}return xd(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Qk},t.prototype.buildPath=function(e,t){qk(e,t,!1)},t}(Ty);Jk.prototype.type="polyline";const eC=Jk;var tC={},nC=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1},rC=function(e){function t(t){return e.call(this,t)||this}return xd(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new nC},t.prototype.buildPath=function(e,t){var n,r,o,i;if(this.subPixelOptimize){var a=zy(tC,t,this.style);n=a.x1,r=a.y1,o=a.x2,i=a.y2}else n=t.x1,r=t.y1,o=t.x2,i=t.y2;var s=t.percent;0!==s&&(e.moveTo(n,r),s<1&&(o=n*(1-s)+o*s,i=r*(1-s)+i*s),e.lineTo(o,i))},t.prototype.pointAt=function(e){var t=this.shape;return[t.x1*(1-e)+t.x2*e,t.y1*(1-e)+t.y2*e]},t}(Ty);rC.prototype.type="line";const oC=rC;var iC=[],aC=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1};function sC(e,t,n){var r=e.cpx2,o=e.cpy2;return null!=r||null!=o?[(n?yp:vp)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?yp:vp)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?kp:Ap)(e.x1,e.cpx1,e.x2,t),(n?kp:Ap)(e.y1,e.cpy1,e.y2,t)]}var lC=function(e){function t(t){return e.call(this,t)||this}return xd(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new aC},t.prototype.buildPath=function(e,t){var n=t.x1,r=t.y1,o=t.x2,i=t.y2,a=t.cpx1,s=t.cpy1,l=t.cpx2,c=t.cpy2,u=t.percent;0!==u&&(e.moveTo(n,r),null==l||null==c?(u<1&&(Mp(n,a,o,u,iC),a=iC[1],o=iC[2],Mp(r,s,i,u,iC),s=iC[1],i=iC[2]),e.quadraticCurveTo(a,s,o,i)):(u<1&&(wp(n,a,l,o,u,iC),a=iC[1],l=iC[2],o=iC[3],wp(r,s,c,i,u,iC),s=iC[1],c=iC[2],i=iC[3]),e.bezierCurveTo(a,s,l,c,o,i)))},t.prototype.pointAt=function(e){return sC(this.shape,e,!1)},t.prototype.tangentAt=function(e){var t=sC(this.shape,e,!0);return Dd(t,t)},t}(Ty);lC.prototype.type="bezier-curve";const cC=lC;var uC=function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},dC=function(e){function t(t){return e.call(this,t)||this}return xd(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new uC},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,o=Math.max(t.r,0),i=t.startAngle,a=t.endAngle,s=t.clockwise,l=Math.cos(i),c=Math.sin(i);e.moveTo(l*o+n,c*o+r),e.arc(n,r,o,i,a,!s)},t}(Ty);dC.prototype.type="arc";const hC=dC;var pC=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="compound",t}return xd(t,e),t.prototype._updatePathDirty=function(){for(var e=this.shape.paths,t=this.shapeChanged(),n=0;n<e.length;n++)t=t||e[n].shapeChanged();t&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var e=this.shape.paths||[],t=this.getGlobalScale(),n=0;n<e.length;n++)e[n].path||e[n].createPathProxy(),e[n].path.setScale(t[0],t[1],e[n].segmentIgnoreThreshold)},t.prototype.buildPath=function(e,t){for(var n=t.paths||[],r=0;r<n.length;r++)n[r].buildPath(e,n[r].shape,!0)},t.prototype.afterBrush=function(){for(var e=this.shape.paths||[],t=0;t<e.length;t++)e[t].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),Ty.prototype.getBoundingRect.call(this)},t}(Ty);const fC=pC;const gC=function(){function e(e){this.colorStops=e||[]}return e.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},e}();const mC=function(e){function t(t,n,r,o,i,a){var s=e.call(this,i)||this;return s.x=null==t?0:t,s.y=null==n?0:n,s.x2=null==r?1:r,s.y2=null==o?0:o,s.type="linear",s.global=a||!1,s}return xd(t,e),t}(gC);const vC=function(e){function t(t,n,r,o,i){var a=e.call(this,o)||this;return a.x=null==t?.5:t,a.y=null==n?.5:n,a.r=null==r?.5:r,a.type="radial",a.global=i||!1,a}return xd(t,e),t}(gC);var yC=[0,0],xC=[0,0],bC=new bh,wC=new bh,SC=function(){function e(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new bh;for(n=0;n<2;n++)this._axes[n]=new bh;e&&this.fromBoundingRect(e,t)}return e.prototype.fromBoundingRect=function(e,t){var n=this._corners,r=this._axes,o=e.x,i=e.y,a=o+e.width,s=i+e.height;if(n[0].set(o,i),n[1].set(a,i),n[2].set(a,s),n[3].set(o,s),t)for(var l=0;l<4;l++)n[l].transform(t);bh.sub(r[0],n[1],n[0]),bh.sub(r[1],n[3],n[0]),r[0].normalize(),r[1].normalize();for(l=0;l<2;l++)this._origin[l]=r[l].dot(n[0])},e.prototype.intersect=function(e,t){var n=!0,r=!t;return bC.set(1/0,1/0),wC.set(0,0),!this._intersectCheckOneSide(this,e,bC,wC,r,1)&&(n=!1,r)||!this._intersectCheckOneSide(e,this,bC,wC,r,-1)&&(n=!1,r)||r||bh.copy(t,n?bC:wC),n},e.prototype._intersectCheckOneSide=function(e,t,n,r,o,i){for(var a=!0,s=0;s<2;s++){var l=this._axes[s];if(this._getProjMinMaxOnAxis(s,e._corners,yC),this._getProjMinMaxOnAxis(s,t._corners,xC),yC[1]<xC[0]||yC[0]>xC[1]){if(a=!1,o)return a;var c=Math.abs(xC[0]-yC[1]),u=Math.abs(yC[0]-xC[1]);Math.min(c,u)>r.len()&&(c<u?bh.scale(r,l,-c*i):bh.scale(r,l,u*i))}else if(n){c=Math.abs(xC[0]-yC[1]),u=Math.abs(yC[0]-xC[1]);Math.min(c,u)<n.len()&&(c<u?bh.scale(n,l,c*i):bh.scale(n,l,-u*i))}}return a},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var r=this._axes[e],o=this._origin,i=t[0].dot(r)+o[e],a=i,s=i,l=1;l<t.length;l++){var c=t[l].dot(r)+o[e];a=Math.min(c,a),s=Math.max(c,s)}n[0]=a,n[1]=s},e}();const _C=SC;var AC=[],kC=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.notClear=!0,t.incremental=!0,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}return xd(t,e),t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.useStyle=function(){this.style={}},t.prototype.getCursor=function(){return this._cursor},t.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},t.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},t.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},t.prototype.addDisplayable=function(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.markRedraw()},t.prototype.addDisplayables=function(e,t){t=t||!1;for(var n=0;n<e.length;n++)this.addDisplayable(e[n],t)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.prototype.eachPendingDisplayable=function(e){for(var t=this._cursor;t<this._displayables.length;t++)e&&e(this._displayables[t]);for(t=0;t<this._temporaryDisplayables.length;t++)e&&e(this._temporaryDisplayables[t])},t.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){(t=this._displayables[e]).parent=this,t.update(),t.parent=null}for(e=0;e<this._temporaryDisplayables.length;e++){var t;(t=this._temporaryDisplayables[e]).parent=this,t.update(),t.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new Dh(1/0,1/0,-1/0,-1/0),t=0;t<this._displayables.length;t++){var n=this._displayables[t],r=n.getBoundingRect().clone();n.needLocalTransform()&&r.applyTransform(n.getLocalTransform(AC)),e.union(r)}this._rect=e}return this._rect},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t);if(this.getBoundingRect().contain(n[0],n[1]))for(var r=0;r<this._displayables.length;r++){if(this._displayables[r].contain(e,t))return!0}return!1},t}(kv);const CC=kC;var MC=Math.max,IC=Math.min,TC={};function DC(e){return Ty.extend(e)}var jC=function(e,t){var n=bk(e,t);return function(e){function t(t){var r=e.call(this,t)||this;return r.applyTransform=n.applyTransform,r.buildPath=n.buildPath,r}return xd(t,e),t}(yk)};function PC(e,t){return jC(e,t)}function LC(e,t){TC[e]=t}function RC(e){if(TC.hasOwnProperty(e))return TC[e]}function EC(e,t,n,r){var o=wk(e,t);return n&&("center"===r&&(n=OC(n,o.getBoundingRect())),BC(o,n)),o}function NC(e,t,n){var r=new Ny({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if("center"===n){var o={width:e.width,height:e.height};r.setStyle(OC(t,o))}}});return r}function OC(e,t){var n,r=t.width/t.height,o=e.height*r;return n=o<=e.width?e.height:(o=e.width)/r,{x:e.x+e.width/2-o/2,y:e.y+e.height/2-n/2,width:o,height:n}}var zC=function(e,t){for(var n=[],r=e.length,o=0;o<r;o++){var i=e[o];n.push(i.getUpdatedPathProxy(!0))}var a=new Ty(t);return a.createPathProxy(),a.buildPath=function(e){if(xk(e)){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t,1)}},a};function BC(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function FC(e,t){return zy(e,e,{lineWidth:t}),e}function VC(e){return By(e.shape,e.shape,e.style),e}var WC=Fy;function HC(e,t){for(var n=hh([]);e&&e!==t;)fh(n,e.getLocalTransform(),n),e=e.parent;return n}function GC(e,t,n){return t&&!Lu(t)&&(t=yg.getLocalTransform(t)),n&&(t=yh([],t)),Ed([],e,t)}function UC(e,t,n){var r=0===t[4]||0===t[5]||0===t[0]?1:Math.abs(2*t[4]/t[0]),o=0===t[4]||0===t[5]||0===t[2]?1:Math.abs(2*t[4]/t[2]),i=["left"===e?-r:"right"===e?r:0,"top"===e?-o:"bottom"===e?o:0];return i=GC(i,t,n),Math.abs(i[0])>Math.abs(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function XC(e){return!e.isGroup}function YC(e,t,n){if(e&&t){var r=function(e){var t={};return e.traverse((function(e){XC(e)&&e.anid&&(t[e.anid]=e)})),t}(e);t.traverse((function(e){if(XC(e)&&e.anid){var t=r[e.anid];if(t){var i=o(e);e.attr(o(t)),pb(e,i,n,sx(e).dataIndex)}}}))}function o(e){var t={x:e.x,y:e.y,rotation:e.rotation};return function(e){return null!=e.shape}(e)&&(t.shape=Tu({},e.shape)),t}}function qC(e,t){return Eu(e,(function(e){var n=e[0];n=MC(n,t.x),n=IC(n,t.x+t.width);var r=e[1];return r=MC(r,t.y),[n,r=IC(r,t.y+t.height)]}))}function ZC(e,t){var n=MC(e.x,t.x),r=IC(e.x+e.width,t.x+t.width),o=MC(e.y,t.y),i=IC(e.y+e.height,t.y+t.height);if(r>=n&&i>=o)return{x:n,y:o,width:r-n,height:i-o}}function KC(e,t,n){var r=Tu({rectHover:!0},t),o=r.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},e)return 0===e.indexOf("image://")?(o.image=e.slice(8),Du(o,n),new Ny(r)):EC(e.replace("path://",""),r,n,"center")}function $C(e,t,n,r,o){for(var i=0,a=o[o.length-1];i<o.length;i++){var s=o[i];if(QC(e,t,n,r,s[0],s[1],a[0],a[1]))return!0;a=s}}function QC(e,t,n,r,o,i,a,s){var l,c=n-e,u=r-t,d=a-o,h=s-i,p=JC(d,h,c,u);if((l=p)<=1e-6&&l>=-1e-6)return!1;var f=e-o,g=t-i,m=JC(f,g,c,u)/p;if(m<0||m>1)return!1;var v=JC(f,g,d,h)/p;return!(v<0||v>1)}function JC(e,t,n,r){return e*r-n*t}function eM(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,o=Hu(t)?{formatter:t}:t,i=n.mainType,a=n.componentIndex,s={componentType:i,name:r,$vars:["name"]};s[i+"Index"]=a;var l=e.formatterParamsExtra;l&&Ru(zu(l),(function(e){gd(s,e)||(s[e]=l[e],s.$vars.push(e))}));var c=sx(e.el);c.componentMainType=i,c.componentIndex=a,c.tooltipConfig={name:r,option:Du({content:r,encodeHTMLContent:!0,formatterParams:s},o)}}function tM(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function nM(e,t){if(e)if(Vu(e))for(var n=0;n<e.length;n++)tM(e[n],t);else tM(e,t)}LC("circle",kk),LC("ellipse",Ik),LC("sector",Gk),LC("ring",Yk),LC("polygon",$k),LC("polyline",eC),LC("rect",Gy),LC("line",oC),LC("bezierCurve",cC),LC("arc",hC);var rM=jm(),oM=nk(),iM=function(){function e(){this.group=new Fg,this.uid=Zb("viewChart"),this.renderTask=W_({plan:lM,reset:cM}),this.renderTask.context={view:this}}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){0},e.prototype.highlight=function(e,t,n,r){var o=e.getData(r&&r.dataType);o&&sM(o,r,"emphasis")},e.prototype.downplay=function(e,t,n,r){var o=e.getData(r&&r.dataType);o&&sM(o,r,"normal")},e.prototype.remove=function(e,t){this.group.removeAll()},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateLayout=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateVisual=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.eachRendered=function(e){nM(this.group,e)},e.markUpdateMethod=function(e,t){rM(e).updateMethod=t},e.protoInitialize=void(e.prototype.type="chart"),e}();function aM(e,t,n){e&&sb(e)&&("emphasis"===t?Vx:Wx)(e,n)}function sM(e,t,n){var r=Dm(e,t),o=t&&null!=t.highlightKey?function(e){var t=ux[e];return null==t&&cx<=32&&(t=ux[e]=cx++),t}(t.highlightKey):null;null!=r?Ru(xm(r),(function(t){aM(e.getItemGraphicEl(t),n,o)})):e.eachItemGraphicEl((function(e){aM(e,n,o)}))}function lM(e){return oM(e.model)}function cM(e){var t=e.model,n=e.ecModel,r=e.api,o=e.payload,i=t.pipelineContext.progressiveRender,a=e.view,s=o&&rM(o).updateMethod,l=i?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](t,n,r,o),uM[l]}Um(iM),Km(iM);var uM={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}};const dM=iM;var hM="\0__throttleOriginMethod",pM="\0__throttleRate",fM="\0__throttleType";function gM(e,t,n){var r,o,i,a,s,l=0,c=0,u=null;function d(){c=(new Date).getTime(),u=null,e.apply(i,a||[])}t=t||0;var h=function(){for(var e=[],h=0;h<arguments.length;h++)e[h]=arguments[h];r=(new Date).getTime(),i=this,a=e;var p=s||t,f=s||n;s=null,o=r-(f?l:c)-p,clearTimeout(u),f?u=setTimeout(d,p):o>=0?d():u=setTimeout(d,-o),l=r};return h.clear=function(){u&&(clearTimeout(u),u=null)},h.debounceNextCall=function(e){s=e},h}function mM(e,t,n,r){var o=e[t];if(o){var i=o[hM]||o,a=o[fM];if(o[pM]!==n||a!==r){if(null==n||!r)return e[t]=i;(o=e[t]=gM(i,n,"debounce"===r))[hM]=i,o[fM]=r,o[pM]=n}return o}}function vM(e,t){var n=e[t];n&&n[hM]&&(n.clear&&n.clear(),e[t]=n[hM])}var yM=jm(),xM={itemStyle:$m(Hb,!0),lineStyle:$m(Fb,!0)},bM={lineStyle:"stroke",itemStyle:"fill"};function wM(e,t){var n=e.visualStyleMapper||xM[t];return n||(console.warn("Unknown style type '"+t+"'."),xM.itemStyle)}function SM(e,t){var n=e.visualDrawType||bM[t];return n||(console.warn("Unknown style type '"+t+"'."),"fill")}var _M={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",o=e.getModel(r),i=wM(e,r)(o),a=o.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=SM(e,r),l=i[s],c=Wu(l)?l:null,u="auto"===i.fill||"auto"===i.stroke;if(!i[s]||c||u){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());i[s]||(i[s]=d,n.setVisual("colorFromPalette",!0)),i.fill="auto"===i.fill||Wu(i.fill)?d:i.fill,i.stroke="auto"===i.stroke||Wu(i.stroke)?d:i.stroke}if(n.setVisual("style",i),n.setVisual("drawType",s),!t.isSeriesFiltered(e)&&c)return n.setVisual("colorFromPalette",!1),{dataEach:function(t,n){var r=e.getDataParams(n),o=Tu({},i);o[s]=c(r),t.setItemVisual(n,"style",o)}}}},AM=new Yb,kM={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData&&!t.isSeriesFiltered(e)){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",o=wM(e,r),i=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){AM.option=n[r];var a=o(AM);Tu(e.ensureUniqueItemVisual(t,"style"),a),AM.option.decal&&(e.setItemVisual(t,"decal",AM.option.decal),AM.option.decal.dirty=!0),i in a&&e.setItemVisual(t,"colorFromPalette",!1)}}:null}}}},CM={performRawSeries:!0,overallReset:function(e){var t=dd();e.eachSeries((function(e){var n=e.getColorBy();if(!e.isColorBySeries()){var r=e.type+"-"+n,o=t.get(r);o||(o={},t.set(r,o)),yM(e).scope=o}})),e.eachSeries((function(t){if(!t.isColorBySeries()&&!e.isSeriesFiltered(t)){var n=t.getRawData(),r={},o=t.getData(),i=yM(t).scope,a=t.visualStyleAccessPath||"itemStyle",s=SM(t,a);o.each((function(e){var t=o.getRawIndex(e);r[t]=e})),n.each((function(e){var a=r[e];if(o.getItemVisual(a,"colorFromPalette")){var l=o.ensureUniqueItemVisual(a,"style"),c=n.getName(e)||e+"",u=n.count();l[s]=t.getColorFromPalette(c,i,u)}}))}}))}},MM=Math.PI;var IM=function(){function e(e,t,n,r){this._stageTaskMap=dd(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each((function(e){var t=e.overallTask;t&&t.dirty()}))},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,o=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,i=r&&r.modDataCount;return{step:o,modBy:null!=i?Math.ceil(i/o):null,modDataCount:i}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),r=e.getData().count(),o=n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,i=e.get("large")&&r>=e.get("largeThreshold"),a="mod"===e.get("progressiveChunkMode")?r:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:a,large:i}},e.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=dd();e.eachSeries((function(e){var r=e.getProgressive(),o=e.uid;n.set(o,{id:o,head:null,tail:null,threshold:e.getProgressiveThreshold(),progressiveEnabled:r&&!(e.preventIncremental&&e.preventIncremental()),blockIndex:-1,step:Math.round(r||700),count:0}),t._pipe(e,e.dataTask)}))},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;Ru(this._allHandlers,(function(r){var o=e.get(r.uid)||e.set(r.uid,{});rd(!(r.reset&&r.overallReset),""),r.reset&&this._createSeriesStageTask(r,o,t,n),r.overallReset&&this._createOverallStageTask(r,o,t,n)}),this)},e.prototype.prepareView=function(e,t,n,r){var o=e.renderTask,i=o.context;i.model=t,i.ecModel=n,i.api=r,o.__block=!e.incrementalPrepareRender,this._pipe(t,o)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r=r||{};var o=!1,i=this;function a(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}Ru(e,(function(e,s){if(!r.visualType||r.visualType===e.visualType){var l=i._stageTaskMap.get(e.uid),c=l.seriesTaskMap,u=l.overallTask;if(u){var d,h=u.agentStubMap;h.each((function(e){a(r,e)&&(e.dirty(),d=!0)})),d&&u.dirty(),i.updatePayload(u,n);var p=i.getPerformArgs(u,r.block);h.each((function(e){e.perform(p)})),u.perform(p)&&(o=!0)}else c&&c.each((function(s,l){a(r,s)&&s.dirty();var c=i.getPerformArgs(s,r.block);c.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),i.updatePayload(s,n),s.perform(c)&&(o=!0)}))}})),this.unfinished=o||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries((function(e){t=e.dataTask.perform()||t})),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each((function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)}))},e.prototype.updatePayload=function(e,t){"remain"!==t&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var o=this,i=t.seriesTaskMap,a=t.seriesTaskMap=dd(),s=e.seriesType,l=e.getTargetSeries;function c(t){var s=t.uid,l=a.set(s,i&&i.get(s)||W_({plan:LM,reset:RM,count:OM}));l.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:o},o._pipe(t,l)}e.createOnAllSeries?n.eachRawSeries(c):s?n.eachRawSeriesByType(s,c):l&&l(n,r).each(c)},e.prototype._createOverallStageTask=function(e,t,n,r){var o=this,i=t.overallTask=t.overallTask||W_({reset:TM});i.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:o};var a=i.agentStubMap,s=i.agentStubMap=dd(),l=e.seriesType,c=e.getTargetSeries,u=!0,d=!1;function h(e){var t=e.uid,n=s.set(t,a&&a.get(t)||(d=!0,W_({reset:DM,onDirty:PM})));n.context={model:e,overallProgress:u},n.agent=i,n.__block=u,o._pipe(e,n)}rd(!e.createOnAllSeries,""),l?n.eachRawSeriesByType(l,h):c?c(n,r).each(h):(u=!1,Ru(n.getSeries(),h)),d&&i.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return Wu(e)&&(e={overallReset:e,seriesType:zM(e)}),e.uid=Zb("stageHandler"),t&&(e.visualType=t),e},e}();function TM(e){e.overallReset(e.ecModel,e.api,e.payload)}function DM(e){return e.overallProgress&&jM}function jM(){this.agent.dirty(),this.getDownstream().dirty()}function PM(){this.agent&&this.agent.dirty()}function LM(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function RM(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=xm(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?Eu(t,(function(e,t){return NM(t)})):EM}var EM=NM(0);function NM(e){return function(t,n){var r=n.data,o=n.resetDefines[e];if(o&&o.dataEach)for(var i=t.start;i<t.end;i++)o.dataEach(r,i);else o&&o.progress&&o.progress(t,r)}}function OM(e){return e.data.count()}function zM(e){BM=null;try{e(FM,VM)}catch(Bk){}return BM}var BM,FM={},VM={};function WM(e,t){for(var n in t.prototype)e[n]=md}WM(FM,OS),WM(VM,BS),FM.eachSeriesByType=FM.eachRawSeriesByType=function(e){BM=e},FM.eachComponent=function(e){"series"===e.mainType&&e.subType&&(BM=e.subType)};const HM=IM;var GM=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"];const UM={color:GM,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],GM]};var XM="#B9B8CE",YM="#100C2A",qM=function(){return{axisLine:{lineStyle:{color:XM}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},ZM=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],KM={darkMode:!0,color:ZM,backgroundColor:YM,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:XM}},textStyle:{color:XM},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:XM}},dataZoom:{borderColor:"#71708A",textStyle:{color:XM},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:XM}},timeline:{lineStyle:{color:XM},label:{color:XM},controlStyle:{color:XM,borderColor:XM}},calendar:{itemStyle:{color:YM},dayLabel:{color:XM},monthLabel:{color:XM},yearLabel:{color:XM}},timeAxis:qM(),logAxis:qM(),valueAxis:qM(),categoryAxis:qM(),line:{symbol:"circle"},graph:{color:ZM},gauge:{title:{color:XM},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:XM},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};KM.categoryAxis.splitLine.show=!1;const $M=KM;var QM=function(){function e(){}return e.prototype.normalizeQuery=function(e){var t={},n={},r={};if(Hu(e)){var o=Gm(e);t.mainType=o.main||null,t.subType=o.sub||null}else{var i=["Index","Name","Id"],a={name:1,dataIndex:1,dataType:1};Ru(e,(function(e,o){for(var s=!1,l=0;l<i.length;l++){var c=i[l],u=o.lastIndexOf(c);if(u>0&&u===o.length-c.length){var d=o.slice(0,u);"data"!==d&&(t.mainType=d,t[c.toLowerCase()]=e,s=!0)}}a.hasOwnProperty(o)&&(n[o]=e,s=!0),s||(r[o]=e)}))}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,o=n.packedEvent,i=n.model,a=n.view;if(!i||!a)return!0;var s=t.cptQuery,l=t.dataQuery;return c(s,i,"mainType")&&c(s,i,"subType")&&c(s,i,"index","componentIndex")&&c(s,i,"name")&&c(s,i,"id")&&c(l,o,"name")&&c(l,o,"dataIndex")&&c(l,o,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(e,t.otherQuery,r,o));function c(e,t,n,r){return null==e[n]||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),JM=["symbol","symbolSize","symbolRotate","symbolOffset"],eI=JM.concat(["symbolKeepAspect"]),tI={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual("legendIcon",e.legendIcon),e.hasSymbolVisual){for(var r={},o={},i=!1,a=0;a<JM.length;a++){var s=JM[a],l=e.get(s);Wu(l)?(i=!0,o[s]=l):r[s]=l}if(r.symbol=r.symbol||e.defaultSymbol,n.setVisual(Tu({legendIcon:e.legendIcon||r.symbol,symbolKeepAspect:e.get("symbolKeepAspect")},r)),!t.isSeriesFiltered(e)){var c=zu(o);return{dataEach:i?function(t,n){for(var r=e.getRawValue(n),i=e.getDataParams(n),a=0;a<c.length;a++){var s=c[a];t.setItemVisual(n,s,o[s](r,i))}}:null}}}}},nI={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(e.hasSymbolVisual&&!t.isSeriesFiltered(e))return{dataEach:e.getData().hasItemOption?function(e,t){for(var n=e.getItemModel(t),r=0;r<eI.length;r++){var o=eI[r],i=n.getShallow(o,!0);null!=i&&e.setItemVisual(t,o,i)}}:null}}};function rI(e,t,n){switch(n){case"color":return e.getItemVisual(t,"style")[e.getVisual("drawType")];case"opacity":return e.getItemVisual(t,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getItemVisual(t,n)}}function oI(e,t){switch(t){case"color":return e.getVisual("style")[e.getVisual("drawType")];case"opacity":return e.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getVisual(t)}}function iI(e,t,n,r){switch(n){case"color":e.ensureUniqueItemVisual(t,"style")[e.getVisual("drawType")]=r,e.setItemVisual(t,"colorFromPalette",!1);break;case"opacity":e.ensureUniqueItemVisual(t,"style").opacity=r;break;case"symbol":case"symbolSize":case"liftZ":e.setItemVisual(t,n,r)}}function aI(e,t){function n(t,n){var r=[];return t.eachComponent({mainType:"series",subType:e,query:n},(function(e){r.push(e.seriesIndex)})),r}Ru([[e+"ToggleSelect","toggleSelect"],[e+"Select","select"],[e+"UnSelect","unselect"]],(function(e){t(e[0],(function(t,r,o){t=Tu({},t),o.dispatchAction(Tu(t,{type:e[1],seriesIndex:n(r,t)}))}))}))}function sI(e,t,n,r,o){var i=e+t;n.isSilent(i)||r.eachComponent({mainType:"series",subType:"pie"},(function(e){for(var t=e.seriesIndex,r=e.option.selectedMap,a=o.selected,s=0;s<a.length;s++)if(a[s].seriesIndex===t){var l=e.getData(),c=Dm(l,o.fromActionPayload);n.trigger(i,{type:i,seriesId:e.id,name:Vu(c)?l.getName(c[0]):l.getName(c),selected:Hu(r)?r:Tu({},r)})}}))}function lI(e,t,n){for(var r;e&&(!t(e)||(r=e,!n));)e=e.__hostTarget||e.parent;return r}var cI=Math.round(9*Math.random()),uI="function"===typeof Object.defineProperty;const dI=function(){function e(){this._id="__ec_inner_"+cI++}return e.prototype.get=function(e){return this._guard(e)[this._id]},e.prototype.set=function(e,t){var n=this._guard(e);return uI?Object.defineProperty(n,this._id,{value:t,enumerable:!1,configurable:!0}):n[this._id]=t,this},e.prototype.delete=function(e){return!!this.has(e)&&(delete this._guard(e)[this._id],!0)},e.prototype.has=function(e){return!!this._guard(e)[this._id]},e.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},e}();var hI=Ty.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,o=t.width/2,i=t.height/2;e.moveTo(n,r-i),e.lineTo(n+o,r+i),e.lineTo(n-o,r+i),e.closePath()}}),pI=Ty.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,o=t.width/2,i=t.height/2;e.moveTo(n,r-i),e.lineTo(n+o,r),e.lineTo(n,r+i),e.lineTo(n-o,r),e.closePath()}}),fI=Ty.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,r=t.y,o=t.width/5*3,i=Math.max(o,t.height),a=o/2,s=a*a/(i-a),l=r-i+a+s,c=Math.asin(s/a),u=Math.cos(c)*a,d=Math.sin(c),h=Math.cos(c),p=.6*a,f=.7*a;e.moveTo(n-u,l+s),e.arc(n,l,a,Math.PI-c,2*Math.PI+c),e.bezierCurveTo(n+u-d*p,l+s+h*p,n,r-f,n,r),e.bezierCurveTo(n,r-f,n-u+d*p,l+s+h*p,n-u,l+s),e.closePath()}}),gI=Ty.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,r=t.width,o=t.x,i=t.y,a=r/3*2;e.moveTo(o,i),e.lineTo(o+a,i+n),e.lineTo(o,i+n/4*3),e.lineTo(o-a,i+n),e.lineTo(o,i),e.closePath()}}),mI={line:function(e,t,n,r,o){o.x1=e,o.y1=t+r/2,o.x2=e+n,o.y2=t+r/2},rect:function(e,t,n,r,o){o.x=e,o.y=t,o.width=n,o.height=r},roundRect:function(e,t,n,r,o){o.x=e,o.y=t,o.width=n,o.height=r,o.r=Math.min(n,r)/4},square:function(e,t,n,r,o){var i=Math.min(n,r);o.x=e,o.y=t,o.width=i,o.height=i},circle:function(e,t,n,r,o){o.cx=e+n/2,o.cy=t+r/2,o.r=Math.min(n,r)/2},diamond:function(e,t,n,r,o){o.cx=e+n/2,o.cy=t+r/2,o.width=n,o.height=r},pin:function(e,t,n,r,o){o.x=e+n/2,o.y=t+r/2,o.width=n,o.height=r},arrow:function(e,t,n,r,o){o.x=e+n/2,o.y=t+r/2,o.width=n,o.height=r},triangle:function(e,t,n,r,o){o.cx=e+n/2,o.cy=t+r/2,o.width=n,o.height=r}},vI={};Ru({line:oC,rect:Gy,roundRect:Gy,square:Gy,circle:kk,diamond:pI,pin:fI,arrow:gI,triangle:hI},(function(e,t){vI[t]=new e}));var yI=Ty.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=Mg(e,t,n),o=this.shape;return o&&"pin"===o.symbolType&&"inside"===t.position&&(r.y=n.y+.4*n.height),r},buildPath:function(e,t,n){var r=t.symbolType;if("none"!==r){var o=vI[r];o||(o=vI[r="rect"]),mI[r](t.x,t.y,t.width,t.height,o.shape),o.buildPath(e,o.shape,n)}}});function xI(e,t){if("image"!==this.type){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||"#fff",n.lineWidth=2):"line"===this.shape.symbolType?n.stroke=e:n.fill=e,this.markRedraw()}}function bI(e,t,n,r,o,i,a){var s,l=0===e.indexOf("empty");return l&&(e=e.substr(5,1).toLowerCase()+e.substr(6)),(s=0===e.indexOf("image://")?NC(e.slice(8),new Dh(t,n,r,o),a?"center":"cover"):0===e.indexOf("path://")?EC(e.slice(7),{},new Dh(t,n,r,o),a?"center":"cover"):new yI({shape:{symbolType:e,x:t,y:n,width:r,height:o}})).__isEmptyBrush=l,s.setColor=xI,i&&s.setColor(i),s}function wI(e){return Vu(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function SI(e,t){if(null!=e)return Vu(e)||(e=[e,e]),[Zg(e[0],t[0])||0,Zg(Ju(e[1],e[0]),t[1])||0]}function _I(e){return isFinite(e)}function AI(e,t,n){for(var r="radial"===t.type?function(e,t,n){var r=n.width,o=n.height,i=Math.min(r,o),a=null==t.x?.5:t.x,s=null==t.y?.5:t.y,l=null==t.r?.5:t.r;return t.global||(a=a*r+n.x,s=s*o+n.y,l*=i),a=_I(a)?a:.5,s=_I(s)?s:.5,l=l>=0&&_I(l)?l:.5,e.createRadialGradient(a,s,0,a,s,l)}(e,t,n):function(e,t,n){var r=null==t.x?0:t.x,o=null==t.x2?1:t.x2,i=null==t.y?0:t.y,a=null==t.y2?0:t.y2;return t.global||(r=r*n.width+n.x,o=o*n.width+n.x,i=i*n.height+n.y,a=a*n.height+n.y),r=_I(r)?r:0,o=_I(o)?o:1,i=_I(i)?i:0,a=_I(a)?a:0,e.createLinearGradient(r,i,o,a)}(e,t,n),o=t.colorStops,i=0;i<o.length;i++)r.addColorStop(o[i].offset,o[i].color);return r}function kI(e){return parseInt(e,10)}function CI(e,t,n){var r=["width","height"][t],o=["clientWidth","clientHeight"][t],i=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=n[r]&&"auto"!==n[r])return parseFloat(n[r]);var s=document.defaultView.getComputedStyle(e);return(e[o]||kI(s[r])||kI(e.style[r]))-(kI(s[i])||0)-(kI(s[a])||0)|0}function MI(e){var t,n,r=e.style,o=r.lineDash&&r.lineWidth>0&&(t=r.lineDash,n=r.lineWidth,t&&"solid"!==t&&n>0?"dashed"===t?[4*n,2*n]:"dotted"===t?[n]:Uu(t)?[t]:Vu(t)?t:null:null),i=r.lineDashOffset;if(o){var a=r.strokeNoScale&&e.getLineScale?e.getLineScale():1;a&&1!==a&&(o=Eu(o,(function(e){return e/a})),i/=a)}return[o,i]}var II=new ay(!0);function TI(e){var t=e.stroke;return!(null==t||"none"===t||!(e.lineWidth>0))}function DI(e){return"string"===typeof e&&"none"!==e}function jI(e){var t=e.fill;return null!=t&&"none"!==t}function PI(e,t){if(null!=t.fillOpacity&&1!==t.fillOpacity){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function LI(e,t){if(null!=t.strokeOpacity&&1!==t.strokeOpacity){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function RI(e,t,n){var r=nv(t.image,t.__image,n);if(ov(r)){var o=e.createPattern(r,t.repeat||"repeat");if("function"===typeof DOMMatrix&&o&&o.setTransform){var i=new DOMMatrix;i.translateSelf(t.x||0,t.y||0),i.rotateSelf(0,0,(t.rotation||0)*vd),i.scaleSelf(t.scaleX||1,t.scaleY||1),o.setTransform(i)}return o}}var EI=["shadowBlur","shadowOffsetX","shadowOffsetY"],NI=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function OI(e,t,n,r,o){var i=!1;if(!r&&t===(n=n||{}))return!1;if(r||t.opacity!==n.opacity){GI(e,o),i=!0;var a=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(a)?yv.opacity:a}(r||t.blend!==n.blend)&&(i||(GI(e,o),i=!0),e.globalCompositeOperation=t.blend||yv.blend);for(var s=0;s<EI.length;s++){var l=EI[s];(r||t[l]!==n[l])&&(i||(GI(e,o),i=!0),e[l]=e.dpr*(t[l]||0))}return(r||t.shadowColor!==n.shadowColor)&&(i||(GI(e,o),i=!0),e.shadowColor=t.shadowColor||yv.shadowColor),i}function zI(e,t,n,r,o){var i=UI(t,o.inHover),a=r?null:n&&UI(n,o.inHover)||{};if(i===a)return!1;var s=OI(e,i,a,r,o);if((r||i.fill!==a.fill)&&(s||(GI(e,o),s=!0),DI(i.fill)&&(e.fillStyle=i.fill)),(r||i.stroke!==a.stroke)&&(s||(GI(e,o),s=!0),DI(i.stroke)&&(e.strokeStyle=i.stroke)),(r||i.opacity!==a.opacity)&&(s||(GI(e,o),s=!0),e.globalAlpha=null==i.opacity?1:i.opacity),t.hasStroke()){var l=i.lineWidth/(i.strokeNoScale&&t.getLineScale?t.getLineScale():1);e.lineWidth!==l&&(s||(GI(e,o),s=!0),e.lineWidth=l)}for(var c=0;c<NI.length;c++){var u=NI[c],d=u[0];(r||i[d]!==a[d])&&(s||(GI(e,o),s=!0),e[d]=i[d]||u[1])}return s}function BI(e,t){var n=t.transform,r=e.dpr||1;n?e.setTransform(r*n[0],r*n[1],r*n[2],r*n[3],r*n[4],r*n[5]):e.setTransform(r,0,0,r,0,0)}var FI=1,VI=2,WI=3,HI=4;function GI(e,t){t.batchFill&&e.fill(),t.batchStroke&&e.stroke(),t.batchFill="",t.batchStroke=""}function UI(e,t){return t&&e.__hoverStyle||e.style}function XI(e,t){YI(e,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function YI(e,t,n,r){var o=t.transform;if(!t.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1))return t.__dirty&=~Kh,void(t.__isRendered=!1);var i=t.__clipPaths,a=n.prevElClipPaths,s=!1,l=!1;if(a&&!function(e,t){if(e===t||!e&&!t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}(i,a)||(a&&a.length&&(GI(e,n),e.restore(),l=s=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),i&&i.length&&(GI(e,n),e.save(),function(e,t,n){for(var r=!1,o=0;o<e.length;o++){var i=e[o];r=r||i.isZeroArea(),BI(t,i),t.beginPath(),i.buildPath(t,i.shape),t.clip()}n.allClipped=r}(i,e,n),s=!0),n.prevElClipPaths=i),n.allClipped)t.__isRendered=!1;else{t.beforeBrush&&t.beforeBrush(),t.innerBeforeBrush();var c=n.prevEl;c||(l=s=!0);var u,d,h=t instanceof Ty&&t.autoBatch&&function(e){var t=jI(e),n=TI(e);return!(e.lineDash||!(+t^+n)||t&&"string"!==typeof e.fill||n&&"string"!==typeof e.stroke||e.strokePercent<1||e.strokeOpacity<1||e.fillOpacity<1)}(t.style);s||(u=o,d=c.transform,u&&d?u[0]!==d[0]||u[1]!==d[1]||u[2]!==d[2]||u[3]!==d[3]||u[4]!==d[4]||u[5]!==d[5]:u||d)?(GI(e,n),BI(e,t)):h||GI(e,n);var p=UI(t,n.inHover);t instanceof Ty?(n.lastDrawType!==FI&&(l=!0,n.lastDrawType=FI),zI(e,t,c,l,n),h&&(n.batchFill||n.batchStroke)||e.beginPath(),function(e,t,n,r){var o,i=TI(n),a=jI(n),s=n.strokePercent,l=s<1,c=!t.path;t.silent&&!l||!c||t.createPathProxy();var u=t.path||II,d=t.__dirty;if(!r){var h=n.fill,p=n.stroke,f=a&&!!h.colorStops,g=i&&!!p.colorStops,m=a&&!!h.image,v=i&&!!p.image,y=void 0,x=void 0,b=void 0,w=void 0,S=void 0;(f||g)&&(S=t.getBoundingRect()),f&&(y=d?AI(e,h,S):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(x=d?AI(e,p,S):t.__canvasStrokeGradient,t.__canvasStrokeGradient=x),m&&(b=d||!t.__canvasFillPattern?RI(e,h,t):t.__canvasFillPattern,t.__canvasFillPattern=b),v&&(w=d||!t.__canvasStrokePattern?RI(e,p,t):t.__canvasStrokePattern,t.__canvasStrokePattern=b),f?e.fillStyle=y:m&&(b?e.fillStyle=b:a=!1),g?e.strokeStyle=x:v&&(w?e.strokeStyle=w:i=!1)}var _,A,k=t.getGlobalScale();u.setScale(k[0],k[1],t.segmentIgnoreThreshold),e.setLineDash&&n.lineDash&&(_=(o=MI(t))[0],A=o[1]);var C=!0;(c||d&$h)&&(u.setDPR(e.dpr),l?u.setContext(null):(u.setContext(e),C=!1),u.reset(),t.buildPath(u,t.shape,r),u.toStatic(),t.pathUpdated()),C&&u.rebuildPath(e,l?s:1),_&&(e.setLineDash(_),e.lineDashOffset=A),r||(n.strokeFirst?(i&&LI(e,n),a&&PI(e,n)):(a&&PI(e,n),i&&LI(e,n))),_&&e.setLineDash([])}(e,t,p,h),h&&(n.batchFill=p.fill||"",n.batchStroke=p.stroke||"")):t instanceof Py?(n.lastDrawType!==WI&&(l=!0,n.lastDrawType=WI),zI(e,t,c,l,n),function(e,t,n){var r,o=n.text;if(null!=o&&(o+=""),o){e.font=n.font||cu,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var i=void 0,a=void 0;e.setLineDash&&n.lineDash&&(i=(r=MI(t))[0],a=r[1]),i&&(e.setLineDash(i),e.lineDashOffset=a),n.strokeFirst?(TI(n)&&e.strokeText(o,n.x,n.y),jI(n)&&e.fillText(o,n.x,n.y)):(jI(n)&&e.fillText(o,n.x,n.y),TI(n)&&e.strokeText(o,n.x,n.y)),i&&e.setLineDash([])}}(e,t,p)):t instanceof Ny?(n.lastDrawType!==VI&&(l=!0,n.lastDrawType=VI),function(e,t,n,r,o){OI(e,UI(t,o.inHover),n&&UI(n,o.inHover),r,o)}(e,t,c,l,n),function(e,t,n){var r=t.__image=nv(n.image,t.__image,t,t.onload);if(r&&ov(r)){var o=n.x||0,i=n.y||0,a=t.getWidth(),s=t.getHeight(),l=r.width/r.height;if(null==a&&null!=s?a=s*l:null==s&&null!=a?s=a/l:null==a&&null==s&&(a=r.width,s=r.height),n.sWidth&&n.sHeight){var c=n.sx||0,u=n.sy||0;e.drawImage(r,c,u,n.sWidth,n.sHeight,o,i,a,s)}else if(n.sx&&n.sy){var d=a-(c=n.sx),h=s-(u=n.sy);e.drawImage(r,c,u,d,h,o,i,a,s)}else e.drawImage(r,o,i,a,s)}}(e,t,p)):t.getTemporalDisplayables&&(n.lastDrawType!==HI&&(l=!0,n.lastDrawType=HI),function(e,t,n){var r=t.getDisplayables(),o=t.getTemporalDisplayables();e.save();var i,a,s={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover};for(i=t.getCursor(),a=r.length;i<a;i++){(u=r[i]).beforeBrush&&u.beforeBrush(),u.innerBeforeBrush(),YI(e,u,s,i===a-1),u.innerAfterBrush(),u.afterBrush&&u.afterBrush(),s.prevEl=u}for(var l=0,c=o.length;l<c;l++){var u;(u=o[l]).beforeBrush&&u.beforeBrush(),u.innerBeforeBrush(),YI(e,u,s,l===c-1),u.innerAfterBrush(),u.afterBrush&&u.afterBrush(),s.prevEl=u}t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}(e,t,n)),h&&r&&GI(e,n),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),n.prevEl=t,t.__dirty=0,t.__isRendered=!0}}var qI=new dI,ZI=new Np(100),KI=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function $I(e,t){if("none"===e)return null;var n=t.getDevicePixelRatio(),r=t.getZr(),o="svg"===r.painter.type;e.dirty&&qI.delete(e);var i=qI.get(e);if(i)return i;var a=Du(e,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});"none"===a.backgroundColor&&(a.backgroundColor=null);var s={repeat:"repeat"};return function(e){for(var t,i=[n],s=!0,l=0;l<KI.length;++l){var c=a[KI[l]];if(null!=c&&!Vu(c)&&!Hu(c)&&!Uu(c)&&"boolean"!==typeof c){s=!1;break}i.push(c)}if(s){t=i.join(",")+(o?"-svg":"");var u=ZI.get(t);u&&(o?e.svgElement=u:e.image=u)}var d,h=JI(a.dashArrayX),p=function(e){if(!e||"object"===typeof e&&0===e.length)return[0,0];if(Uu(e)){var t=Math.ceil(e);return[t,t]}var n=Eu(e,(function(e){return Math.ceil(e)}));return e.length%2?n.concat(n):n}(a.dashArrayY),f=QI(a.symbol),g=(b=h,Eu(b,(function(e){return eT(e)}))),m=eT(p),v=!o&&du.createCanvas(),y=o&&{tag:"g",attrs:{},key:"dcl",children:[]},x=function(){for(var e=1,t=0,n=g.length;t<n;++t)e=gm(e,g[t]);var r=1;for(t=0,n=f.length;t<n;++t)r=gm(r,f[t].length);e*=r;var o=m*g.length*f.length;0;return{width:Math.max(1,Math.min(e,a.maxTileWidth)),height:Math.max(1,Math.min(o,a.maxTileHeight))}}();var b;v&&(v.width=x.width*n,v.height=x.height*n,d=v.getContext("2d"));(function(){d&&(d.clearRect(0,0,v.width,v.height),a.backgroundColor&&(d.fillStyle=a.backgroundColor,d.fillRect(0,0,v.width,v.height)));for(var e=0,t=0;t<p.length;++t)e+=p[t];if(e<=0)return;var i=-m,s=0,l=0,c=0;for(;i<x.height;){if(s%2===0){for(var u=l/2%f.length,g=0,b=0,w=0;g<2*x.width;){var S=0;for(t=0;t<h[c].length;++t)S+=h[c][t];if(S<=0)break;if(b%2===0){var _=.5*(1-a.symbolSize),A=g+h[c][b]*_,k=i+p[s]*_,C=h[c][b]*a.symbolSize,M=p[s]*a.symbolSize,I=w/2%f[u].length;T(A,k,C,M,f[u][I])}g+=h[c][b],++w,++b===h[c].length&&(b=0)}++c===h.length&&(c=0)}i+=p[s],++l,++s===p.length&&(s=0)}function T(e,t,i,s,l){var c=o?1:n,u=bI(l,e*c,t*c,i*c,s*c,a.color,a.symbolKeepAspect);if(o){var h=r.painter.renderOneToVNode(u);h&&y.children.push(h)}else XI(d,u)}})(),s&&ZI.put(t,v||y);e.image=v,e.svgElement=y,e.svgWidth=x.width,e.svgHeight=x.height}(s),s.rotation=a.rotation,s.scaleX=s.scaleY=o?1:1/n,qI.set(e,s),e.dirty=!1,s}function QI(e){if(!e||0===e.length)return[["rect"]];if(Hu(e))return[[e]];for(var t=!0,n=0;n<e.length;++n)if(!Hu(e[n])){t=!1;break}if(t)return QI([e]);var r=[];for(n=0;n<e.length;++n)Hu(e[n])?r.push([e[n]]):r.push(e[n]);return r}function JI(e){if(!e||0===e.length)return[[0,0]];if(Uu(e))return[[o=Math.ceil(e),o]];for(var t=!0,n=0;n<e.length;++n)if(!Uu(e[n])){t=!1;break}if(t)return JI([e]);var r=[];for(n=0;n<e.length;++n)if(Uu(e[n])){var o=Math.ceil(e[n]);r.push([o,o])}else{(o=Eu(e[n],(function(e){return Math.ceil(e)}))).length%2===1?r.push(o.concat(o)):r.push(o)}return r}function eT(e){for(var t=0,n=0;n<e.length;++n)t+=e[n];return e.length%2===1?2*t:t}const tT=new Wd;var nT={};var rT=2e3,oT=4500,iT={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:rT,CHART:3e3,POST_CHART_LAYOUT:4600,COMPONENT:4e3,BRUSH:5e3,CHART_ITEM:oT,ARIA:6e3,DECAL:7e3}},aT="__flagInMainProcess",sT="__pendingUpdate",lT="__needsUpdateStatus",cT=/^[a-zA-Z0-9_]+$/,uT="__connectUpdateStatus";function dT(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(!this.isDisposed())return pT(this,e,t);OT(this.id)}}function hT(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return pT(this,e,t)}}function pT(e,t,n){return n[0]=n[0]&&n[0].toLowerCase(),Wd.prototype[t].apply(e,n)}var fT,gT,mT,vT,yT,xT,bT,wT,ST,_T,AT,kT,CT,MT,IT,TT,DT,jT,PT=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ru(t,e),t}(Wd),LT=PT.prototype;LT.on=hT("on"),LT.off=hT("off");var RT=function(e){function t(t,n,r){var o=e.call(this,new QM)||this;o._chartsViews=[],o._chartsMap={},o._componentsViews=[],o._componentsMap={},o._pendingActions=[],r=r||{},Hu(n)&&(n=HT[n]),o._dom=t;r.ssr&&(Hg=function(e){var t=sx(e),n=t.dataIndex;if(null!=n){var r=dd();return r.set("series_index",t.seriesIndex),r.set("data_index",n),t.ssrType&&r.set("ssr_type",t.ssrType),r}});var i=o._zr=Ug(t,{renderer:r.renderer||"canvas",devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height,ssr:r.ssr,useDirtyRect:Ju(r.useDirtyRect,!1),useCoarsePointer:Ju(r.useCoarsePointer,"auto"),pointerSize:r.pointerSize});o._ssr=r.ssr,o._throttledZrFlush=gM(Bu(i.flush,i),17),(n=Cu(n))&&h_(n,!0),o._theme=n,o._locale=function(e){if(Hu(e)){var t=ew[e.toUpperCase()]||{};return e===$b||e===Qb?Cu(t):Mu(Cu(t),Cu(ew[Jb]),!1)}return Mu(Cu(e),Cu(ew[Jb]),!1)}(r.locale||nw),o._coordSysMgr=new WS;var a=o._api=IT(o);function s(e,t){return e.__prio-t.__prio}return Zh(WT,s),Zh(FT,s),o._scheduler=new HM(o,a,FT,WT),o._messageCenter=new PT,o._initEvents(),o.resize=Bu(o.resize,o),i.animation.on("frame",o._onframe,o),_T(i,o),AT(i,o),ad(o),o}return ru(t,e),t.prototype._onframe=function(){if(!this._disposed){jT(this);var e=this._scheduler;if(this[sT]){var t=this[sT].silent;this[aT]=!0;try{fT(this),vT.update.call(this,null,this[sT].updateParams)}catch(Bk){throw this[aT]=!1,this[sT]=null,Bk}this._zr.flush(),this[aT]=!1,this[sT]=null,wT.call(this,t),ST.call(this,t)}else if(e.unfinished){var n=1,r=this._model,o=this._api;e.unfinished=!1;do{var i=+new Date;e.performSeriesTasks(r),e.performDataProcessorTasks(r),xT(this,r),e.performVisualTasks(r),MT(this,this._model,o,"remain",{}),n-=+new Date-i}while(n>0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[aT])if(this._disposed)OT(this.id);else{var r,o,i;if(Xu(t)&&(n=t.lazyUpdate,r=t.silent,o=t.replaceMerge,i=t.transition,t=t.notMerge),this[aT]=!0,!this._model||t){var a=new XS(this._api),s=this._theme,l=this._model=new OS;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,a)}this._model.setOption(e,{replaceMerge:o},VT);var c={seriesTransition:i,optionChanged:!0};if(n)this[sT]={silent:r,updateParams:c},this[aT]=!1,this.getZr().wakeUp();else{try{fT(this),vT.update.call(this,null,c)}catch(Bk){throw this[sT]=null,this[aT]=!1,Bk}this._ssr||this._zr.flush(),this[sT]=null,this[aT]=!1,wT.call(this,r),ST.call(this,r)}}},t.prototype.setTheme=function(){U_()},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||au.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e=e||{},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e=e||{},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){if(au.svgSupported){var e=this._zr;return Ru(e.storage.getDisplayList(),(function(e){e.stopAnimation(null,!0)})),e.painter.toDataURL()}},t.prototype.getDataURL=function(e){if(!this._disposed){var t=(e=e||{}).excludeComponents,n=this._model,r=[],o=this;Ru(t,(function(e){n.eachComponent({mainType:e},(function(e){var t=o._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)}))}));var i="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return Ru(r,(function(e){e.group.ignore=!1})),i}OT(this.id)},t.prototype.getConnectedDataURL=function(e){if(!this._disposed){var t="svg"===e.type,n=this.group,r=Math.min,o=Math.max,i=1/0;if(XT[n]){var a=i,s=i,l=-1/0,c=-1/0,u=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();Ru(UT,(function(i,d){if(i.group===n){var h=t?i.getZr().painter.getSvgDom().innerHTML:i.renderToCanvas(Cu(e)),p=i.getDom().getBoundingClientRect();a=r(p.left,a),s=r(p.top,s),l=o(p.right,l),c=o(p.bottom,c),u.push({dom:h,left:p.left,top:p.top})}}));var h=(l*=d)-(a*=d),p=(c*=d)-(s*=d),f=du.createCanvas(),g=Ug(f,{renderer:t?"svg":"canvas"});if(g.resize({width:h,height:p}),t){var m="";return Ru(u,(function(e){var t=e.left-a,n=e.top-s;m+='<g transform="translate('+t+","+n+')">'+e.dom+"</g>"})),g.painter.getSvgRoot().innerHTML=m,e.connectedBackgroundColor&&g.painter.setBackgroundColor(e.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}return e.connectedBackgroundColor&&g.add(new Gy({shape:{x:0,y:0,width:h,height:p},style:{fill:e.connectedBackgroundColor}})),Ru(u,(function(e){var t=new Ny({style:{x:e.left*d-a,y:e.top*d-s,image:e.dom}});g.add(t)})),g.refreshImmediately(),f.toDataURL("image/"+(e&&e.type||"png"))}return this.getDataURL(e)}OT(this.id)},t.prototype.convertToPixel=function(e,t){return yT(this,"convertToPixel",e,t)},t.prototype.convertFromPixel=function(e,t){return yT(this,"convertFromPixel",e,t)},t.prototype.containPixel=function(e,t){var n;if(!this._disposed)return Ru(Lm(this._model,e),(function(e,r){r.indexOf("Models")>=0&&Ru(e,(function(e){var o=e.coordinateSystem;if(o&&o.containPoint)n=n||!!o.containPoint(t);else if("seriesModels"===r){var i=this._chartsMap[e.__viewId];i&&i.containPoint&&(n=n||i.containPoint(t,e))}else 0}),this)}),this),!!n;OT(this.id)},t.prototype.getVisual=function(e,t){var n=Lm(this._model,e,{defaultMainType:"series"});var r=n.seriesModel.getData(),o=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?r.indexOfRawIndex(n.dataIndex):null;return null!=o?rI(r,o,t):oI(r,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e,t,n,r=this;Ru(NT,(function(e){var t=function(t){var n,o=r.getModel(),i=t.target;if("globalout"===e?n={}:i&&lI(i,(function(e){var t=sx(e);if(t&&null!=t.dataIndex){var r=t.dataModel||o.getSeriesByIndex(t.seriesIndex);return n=r&&r.getDataParams(t.dataIndex,t.dataType,i)||{},!0}if(t.eventData)return n=Tu({},t.eventData),!0}),!0),n){var a=n.componentType,s=n.componentIndex;"markLine"!==a&&"markPoint"!==a&&"markArea"!==a||(a="series",s=n.seriesIndex);var l=a&&null!=s&&o.getComponent(a,s),c=l&&r["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];0,n.event=t,n.type=e,r._$eventProcessor.eventInfo={targetEl:i,packedEvent:n,model:l,view:c},r.trigger(e,n)}};t.zrEventfulCallAtLast=!0,r._zr.on(e,t,r)})),Ru(BT,(function(e,t){r._messageCenter.on(t,(function(e){this.trigger(t,e)}),r)})),Ru(["selectchanged"],(function(e){r._messageCenter.on(e,(function(t){this.trigger(e,t)}),r)})),e=this._messageCenter,t=this,n=this._api,e.on("selectchanged",(function(e){var r=n.getModel();e.isFromClick?(sI("map","selectchanged",t,r,e),sI("pie","selectchanged",t,r,e)):"select"===e.fromAction?(sI("map","selected",t,r,e),sI("pie","selected",t,r,e)):"unselect"===e.fromAction&&(sI("map","unselected",t,r,e),sI("pie","unselected",t,r,e))}))},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){this._disposed?OT(this.id):this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed)OT(this.id);else{this._disposed=!0,this.getDom()&&zm(this.getDom(),qT,"");var e=this,t=e._api,n=e._model;Ru(e._componentsViews,(function(e){e.dispose(n,t)})),Ru(e._chartsViews,(function(e){e.dispose(n,t)})),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete UT[e.id]}},t.prototype.resize=function(e){if(!this[aT])if(this._disposed)OT(this.id);else{this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption("media"),r=e&&e.silent;this[sT]&&(null==r&&(r=this[sT].silent),n=!0,this[sT]=null),this[aT]=!0;try{n&&fT(this),vT.update.call(this,{type:"resize",animation:Tu({duration:0},e&&e.animation)})}catch(Bk){throw this[aT]=!1,Bk}this[aT]=!1,wT.call(this,r),ST.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed)OT(this.id);else if(Xu(e)&&(t=e,e=""),e=e||"default",this.hideLoading(),GT[e]){var n=GT[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){this._disposed?OT(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},t.prototype.makeActionFromEvent=function(e){var t=Tu({},e);return t.type=BT[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed)OT(this.id);else if(Xu(t)||(t={silent:!!t}),zT[e.type]&&this._model)if(this[aT])this._pendingActions.push(e);else{var n=t.silent;bT.call(this,e,n);var r=t.flush;r?this._zr.flush():!1!==r&&au.browser.weChat&&this._throttledZrFlush(),wT.call(this,n),ST.call(this,n)}},t.prototype.updateLabelLayout=function(){tT.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed)OT(this.id);else{var t=e.seriesIndex;0,this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},t.internalField=function(){function e(e){e.clearColorPalette(),e.eachSeries((function(e){e.clearColorPalette()}))}function t(e){for(var t=[],n=e.currentStates,r=0;r<n.length;r++){var o=n[r];"emphasis"!==o&&"blur"!==o&&"select"!==o&&t.push(o)}e.selected&&e.states.select&&t.push("select"),e.hoverState===gx&&e.states.emphasis?t.push("emphasis"):e.hoverState===fx&&e.states.blur&&t.push("blur"),e.useStates(t)}function n(e,t){if(!e.preventAutoZ){var n=e.get("z")||0,o=e.get("zlevel")||0;t.eachRendered((function(e){return r(e,n,o,-1/0),!0}))}}function r(e,t,n,o){var i=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var s=e.childrenRef(),l=0;l<s.length;l++)o=Math.max(r(s[l],t,n,o),o);else e.z=t,e.zlevel=n,o=Math.max(e.z2,o);if(i&&(i.z=t,i.zlevel=n,isFinite(o)&&(i.z2=o+2)),a){var c=e.textGuideLineConfig;a.z=t,a.zlevel=n,isFinite(o)&&(a.z2=o+(c&&c.showAbove?1:-1))}return o}function o(e,t){t.eachRendered((function(e){if(!gb(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&(e.stateTransition=null),t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&(e.prevStates=null)}}))}function i(e,n){var r=e.getModel("stateAnimation"),o=e.isAnimationEnabled(),i=r.get("duration"),a=i>0?{duration:i,delay:r.get("delay"),easing:r.get("easing")}:null;n.eachRendered((function(e){if(e.states&&e.states.emphasis){if(gb(e))return;if(e instanceof Ty&&function(e){var t=dx(e);t.normalFill=e.style.fill,t.normalStroke=e.style.stroke;var n=e.states.select||{};t.selectFill=n.style&&n.style.fill||null,t.selectStroke=n.style&&n.style.stroke||null}(e),e.__dirty){var n=e.prevStates;n&&e.useStates(n)}if(o){e.stateTransition=a;var r=e.getTextContent(),i=e.getTextGuideLine();r&&(r.stateTransition=a),i&&(i.stateTransition=a)}e.__dirty&&t(e)}}))}fT=function(e){var t=e._scheduler;t.restorePipelines(e._model),t.prepareStageTasks(),gT(e,!0),gT(e,!1),t.plan()},gT=function(e,t){for(var n=e._model,r=e._scheduler,o=t?e._componentsViews:e._chartsViews,i=t?e._componentsMap:e._chartsMap,a=e._zr,s=e._api,l=0;l<o.length;l++)o[l].__alive=!1;function c(e){var l=e.__requireNewView;e.__requireNewView=!1;var c="_ec_"+e.id+"_"+e.type,u=!l&&i[c];if(!u){var d=Gm(e.type);0,(u=new(t?tk.getClass(d.main,d.sub):dM.getClass(d.sub))).init(n,s),i[c]=u,o.push(u),a.add(u.group)}e.__viewId=u.__id=c,u.__alive=!0,u.__model=e,u.group.__ecComponentInfo={mainType:e.mainType,index:e.componentIndex},!t&&r.prepareView(u,e,n,s)}t?n.eachComponent((function(e,t){"series"!==e&&c(t)})):n.eachSeries(c);for(l=0;l<o.length;){var u=o[l];u.__alive?l++:(!t&&u.renderTask.dispose(),a.remove(u.group),u.dispose(n,s),o.splice(l,1),i[u.__id]===u&&delete i[u.__id],u.__id=u.group.__ecComponentInfo=null)}},mT=function(e,t,n,r,o){var i=e._model;if(i.setUpdatePayload(n),r){var a={};a[r+"Id"]=n[r+"Id"],a[r+"Index"]=n[r+"Index"],a[r+"Name"]=n[r+"Name"];var s={mainType:r,query:a};o&&(s.subType=o);var l,c=n.excludeSeriesId;null!=c&&(l=dd(),Ru(xm(c),(function(e){var t=Mm(e,null);null!=t&&l.set(t,!0)}))),i&&i.eachComponent(s,(function(t){if(!(l&&null!=l.get(t.id)))if(cb(n))if(t instanceof JA)n.type!==bx||n.notBlur||t.get(["emphasis","disabled"])||function(e,t,n){var r=e.seriesIndex,o=e.getData(t.dataType);if(o){var i=Dm(o,t);i=(Vu(i)?i[0]:i)||0;var a=o.getItemGraphicEl(i);if(!a)for(var s=o.count(),l=0;!a&&l<s;)a=o.getItemGraphicEl(l++);if(a){var c=sx(a);Zx(r,c.focus,c.blurScope,n)}else{var u=e.get(["emphasis","focus"]),d=e.get(["emphasis","blurScope"]);null!=u&&Zx(r,u,d,n)}}}(t,n,e._api);else{var r=$x(t.mainType,t.componentIndex,n.name,e._api),o=r.focusSelf,i=r.dispatchers;n.type===bx&&o&&!n.notBlur&&Kx(t.mainType,t.componentIndex,e._api),i&&Ru(i,(function(e){n.type===bx?Vx(e):Wx(e)}))}else lb(n)&&t instanceof JA&&(!function(e,t,n){if(lb(t)){var r=t.dataType,o=Dm(e.getData(r),t);Vu(o)||(o=[o]),e[t.type===kx?"toggleSelect":t.type===_x?"select":"unselect"](o,r)}}(t,n,e._api),Qx(t),DT(e))}),e),i&&i.eachComponent(s,(function(t){l&&null!=l.get(t.id)||u(e["series"===r?"_chartsMap":"_componentsMap"][t.__viewId])}),e)}else Ru([].concat(e._componentsViews).concat(e._chartsViews),u);function u(r){r&&r.__alive&&r[t]&&r[t](r.__model,i,e._api,n)}},vT={prepareAndUpdate:function(e){fT(this),vT.update.call(this,e,{optionChanged:null!=e.newOption})},update:function(t,n){var r=this._model,o=this._api,i=this._zr,a=this._coordSysMgr,s=this._scheduler;if(r){r.setUpdatePayload(t),s.restoreData(r,t),s.performSeriesTasks(r),a.create(r,o),s.performDataProcessorTasks(r,t),xT(this,r),a.update(r,o),e(r),s.performVisualTasks(r,t),kT(this,r,o,t,n);var l=r.get("backgroundColor")||"transparent",c=r.get("darkMode");i.setBackgroundColor(l),null!=c&&"auto"!==c&&i.setDarkMode(c),tT.trigger("afterupdate",r,o)}},updateTransform:function(t){var n=this,r=this._model,o=this._api;if(r){r.setUpdatePayload(t);var i=[];r.eachComponent((function(e,a){if("series"!==e){var s=n.getViewOfComponentModel(a);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(a,r,o,t);l&&l.update&&i.push(s)}else i.push(s)}}));var a=dd();r.eachSeries((function(e){var i=n._chartsMap[e.__viewId];if(i.updateTransform){var s=i.updateTransform(e,r,o,t);s&&s.update&&a.set(e.uid,1)}else a.set(e.uid,1)})),e(r),this._scheduler.performVisualTasks(r,t,{setDirty:!0,dirtyMap:a}),MT(this,r,o,t,{},a),tT.trigger("afterupdate",r,o)}},updateView:function(t){var n=this._model;n&&(n.setUpdatePayload(t),dM.markUpdateMethod(t,"updateView"),e(n),this._scheduler.performVisualTasks(n,t,{setDirty:!0}),kT(this,n,this._api,t,{}),tT.trigger("afterupdate",n,this._api))},updateVisual:function(t){var n=this,r=this._model;r&&(r.setUpdatePayload(t),r.eachSeries((function(e){e.getData().clearAllVisual()})),dM.markUpdateMethod(t,"updateVisual"),e(r),this._scheduler.performVisualTasks(r,t,{visualType:"visual",setDirty:!0}),r.eachComponent((function(e,o){if("series"!==e){var i=n.getViewOfComponentModel(o);i&&i.__alive&&i.updateVisual(o,r,n._api,t)}})),r.eachSeries((function(e){n._chartsMap[e.__viewId].updateVisual(e,r,n._api,t)})),tT.trigger("afterupdate",r,this._api))},updateLayout:function(e){vT.update.call(this,e)}},yT=function(e,t,n,r){if(e._disposed)OT(e.id);else{for(var o,i=e._model,a=e._coordSysMgr.getCoordinateSystems(),s=Lm(i,n),l=0;l<a.length;l++){var c=a[l];if(c[t]&&null!=(o=c[t](i,s,r)))return o}0}},xT=function(e,t){var n=e._chartsMap,r=e._scheduler;t.eachSeries((function(e){r.updateStreamModes(e,n[e.__viewId])}))},bT=function(e,t){var n=this,r=this.getModel(),o=e.type,i=e.escapeConnect,a=zT[o],s=a.actionInfo,l=(s.update||"update").split(":"),c=l.pop(),u=null!=l[0]&&Gm(l[0]);this[aT]=!0;var d=[e],h=!1;e.batch&&(h=!0,d=Eu(e.batch,(function(t){return(t=Du(Tu({},t),e)).batch=null,t})));var p,f=[],g=lb(e),m=cb(e);if(m&&qx(this._api),Ru(d,(function(t){if((p=(p=a.action(t,n._model,n._api))||Tu({},t)).type=s.event||p.type,f.push(p),m){var r=Rm(e),o=r.queryOptionMap,i=r.mainTypeSpecified?o.keys()[0]:"series";mT(n,c,t,i),DT(n)}else g?(mT(n,c,t,"series"),DT(n)):u&&mT(n,c,t,u.main,u.sub)})),"none"!==c&&!m&&!g&&!u)try{this[sT]?(fT(this),vT.update.call(this,e),this[sT]=null):vT[c].call(this,e)}catch(Bk){throw this[aT]=!1,Bk}if(p=h?{type:s.event||o,escapeConnect:i,batch:f}:f[0],this[aT]=!1,!t){var v=this._messageCenter;if(v.trigger(p.type,p),g){var y={type:"selectchanged",escapeConnect:i,selected:Jx(r),isFromClick:e.isFromClick||!1,fromAction:e.type,fromActionPayload:e};v.trigger(y.type,y)}}},wT=function(e){for(var t=this._pendingActions;t.length;){var n=t.shift();bT.call(this,n,e)}},ST=function(e){!e&&this.trigger("updated")},_T=function(e,t){e.on("rendered",(function(n){t.trigger("rendered",n),!e.animation.isFinished()||t[sT]||t._scheduler.unfinished||t._pendingActions.length||t.trigger("finished")}))},AT=function(e,t){e.on("mouseover",(function(e){var n=lI(e.target,sb);n&&(!function(e,t,n){var r=sx(e),o=$x(r.componentMainType,r.componentIndex,r.componentHighDownName,n),i=o.dispatchers,a=o.focusSelf;i?(a&&Kx(r.componentMainType,r.componentIndex,n),Ru(i,(function(e){return Bx(e,t)}))):(Zx(r.seriesIndex,r.focus,r.blurScope,n),"self"===r.focus&&Kx(r.componentMainType,r.componentIndex,n),Bx(e,t))}(n,e,t._api),DT(t))})).on("mouseout",(function(e){var n=lI(e.target,sb);n&&(!function(e,t,n){qx(n);var r=sx(e),o=$x(r.componentMainType,r.componentIndex,r.componentHighDownName,n).dispatchers;o?Ru(o,(function(e){return Fx(e,t)})):Fx(e,t)}(n,e,t._api),DT(t))})).on("click",(function(e){var n=lI(e.target,(function(e){return null!=sx(e).dataIndex}),!0);if(n){var r=n.selected?"unselect":"select",o=sx(n);t._api.dispatchAction({type:r,dataType:o.dataType,dataIndexInside:o.dataIndex,seriesIndex:o.seriesIndex,isFromClick:!0})}}))},kT=function(e,t,n,r,o){!function(e){var t=[],n=[],r=!1;if(e.eachComponent((function(e,o){var i=o.get("zlevel")||0,a=o.get("z")||0,s=o.getZLevelKey();r=r||!!s,("series"===e?n:t).push({zlevel:i,z:a,idx:o.componentIndex,type:e,key:s})})),r){var o,i,a=t.concat(n);Zh(a,(function(e,t){return e.zlevel===t.zlevel?e.z-t.z:e.zlevel-t.zlevel})),Ru(a,(function(t){var n=e.getComponent(t.type,t.idx),r=t.zlevel,a=t.key;null!=o&&(r=Math.max(o,r)),a?(r===o&&a!==i&&r++,i=a):i&&(r===o&&r++,i=""),o=r,n.setZLevel(r)}))}}(t),CT(e,t,n,r,o),Ru(e._chartsViews,(function(e){e.__alive=!1})),MT(e,t,n,r,o),Ru(e._chartsViews,(function(e){e.__alive||e.remove(t,n)}))},CT=function(e,t,r,a,s,l){Ru(l||e._componentsViews,(function(e){var s=e.__model;o(s,e),e.render(s,t,r,a),n(s,e),i(s,e)}))},MT=function(e,t,r,a,s,l){var c=e._scheduler;s=Tu(s||{},{updatedSeries:t.getSeries()}),tT.trigger("series:beforeupdate",t,r,s);var u=!1;t.eachSeries((function(t){var n=e._chartsMap[t.__viewId];n.__alive=!0;var r=n.renderTask;c.updatePayload(r,a),o(t,n),l&&l.get(t.uid)&&r.dirty(),r.perform(c.getPerformArgs(r))&&(u=!0),n.group.silent=!!t.get("silent"),function(e,t){var n=e.get("blendMode")||null;t.eachRendered((function(e){e.isGroup||(e.style.blend=n)}))}(t,n),Qx(t)})),c.unfinished=u||c.unfinished,tT.trigger("series:layoutlabels",t,r,s),tT.trigger("series:transition",t,r,s),t.eachSeries((function(t){var r=e._chartsMap[t.__viewId];n(t,r),i(t,r)})),function(e,t){var n=e._zr,r=n.storage,o=0;r.traverse((function(e){e.isGroup||o++})),o>t.get("hoverLayerThreshold")&&!au.node&&!au.worker&&t.eachSeries((function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered((function(e){e.states.emphasis&&(e.states.emphasis.hoverLayer=!0)}))}}))}(e,t),tT.trigger("series:afterupdate",t,r,s)},DT=function(e){e[lT]=!0,e.getZr().wakeUp()},jT=function(e){e[lT]&&(e.getZr().storage.traverse((function(e){gb(e)||t(e)})),e[lT]=!1)},IT=function(e){return new(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return ru(n,t),n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(null!=n)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){Vx(t,n),DT(e)},n.prototype.leaveEmphasis=function(t,n){Wx(t,n),DT(e)},n.prototype.enterBlur=function(t){Hx(t),DT(e)},n.prototype.leaveBlur=function(t){Gx(t),DT(e)},n.prototype.enterSelect=function(t){Ux(t),DT(e)},n.prototype.leaveSelect=function(t){Xx(t),DT(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n}(BS))(e)},TT=function(e){function t(e,t){for(var n=0;n<e.length;n++){e[n][uT]=t}}Ru(BT,(function(n,r){e._messageCenter.on(r,(function(n){if(XT[e.group]&&0!==e[uT]){if(n&&n.escapeConnect)return;var r=e.makeActionFromEvent(n),o=[];Ru(UT,(function(t){t!==e&&t.group===e.group&&o.push(t)})),t(o,0),Ru(o,(function(e){1!==e[uT]&&e.dispatchAction(r)})),t(o,2)}}))}))}}(),t}(Wd),ET=RT.prototype;ET.on=dT("on"),ET.off=dT("off"),ET.one=function(e,t,n){var r=this;U_(),this.on.call(this,e,(function n(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];t&&t.apply&&t.apply(this,o),r.off(e,n)}),n)};var NT=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function OT(e){0}var zT={},BT={},FT=[],VT=[],WT=[],HT={},GT={},UT={},XT={},YT=+new Date-0,qT=(new Date,"_echarts_instance_");function ZT(e,t,n){var r=!(n&&n.ssr);if(r){0;var o=KT(e);if(o)return o;0}var i=new RT(e,t,n);return i.id="ec_"+YT++,UT[i.id]=i,r&&zm(e,qT,i.id),TT(i),tT.trigger("afterinit",i),i}function KT(e){return UT[function(e,t){return e.getAttribute?e.getAttribute(t):e[t]}(e,qT)]}function $T(e,t){HT[e]=t}function QT(e){ju(VT,e)<0&&VT.push(e)}function JT(e,t){oD(FT,e,t,2e3)}function eD(e,t){tT.on(e,t)}function tD(e,t,n){Wu(t)&&(n=t,t="");var r=Xu(e)?e.type:[e,e={event:t}][0];e.event=(e.event||r).toLowerCase(),t=e.event,BT[t]||(rd(cT.test(r)&&cT.test(t)),zT[r]||(zT[r]={action:n,actionInfo:e}),BT[t]=r)}function nD(e,t){oD(WT,e,t,3e3,"visual")}var rD=[];function oD(e,t,n,r,o){if((Wu(t)||Xu(t))&&(n=t,t=r),!(ju(rD,n)>=0)){rD.push(n);var i=HM.wrapStageHandler(n,o);i.__prio=t,i.__raw=n,e.push(i)}}function iD(e,t){GT[e]=t}var aD=function(e){var t=(e=Cu(e)).type;t||X_("");var n=t.split(":");2!==n.length&&X_("");var r=!1;"echarts"===n[0]&&(t=n[1],r=!0),e.__isBuiltIn=r,aA.set(t,e)};nD(rT,_M),nD(oT,kM),nD(oT,CM),nD(rT,tI),nD(oT,nI),nD(7e3,(function(e,t){e.eachRawSeries((function(n){if(!e.isSeriesFiltered(n)){var r=n.getData();r.hasItemVisual()&&r.each((function(e){var n=r.getItemVisual(e,"decal");n&&(r.ensureUniqueItemVisual(e,"style").decal=$I(n,t))}));var o=r.getVisual("decal");if(o)r.getVisual("style").decal=$I(o,t)}}))})),QT(h_),JT(900,(function(e){var t=dd();e.eachSeries((function(e){var n=e.get("stack");if(n){var r=t.get(n)||t.set(n,[]),o=e.getData(),i={stackResultDimension:o.getCalculationInfo("stackResultDimension"),stackedOverDimension:o.getCalculationInfo("stackedOverDimension"),stackedDimension:o.getCalculationInfo("stackedDimension"),stackedByDimension:o.getCalculationInfo("stackedByDimension"),isStackedByIndex:o.getCalculationInfo("isStackedByIndex"),data:o,seriesModel:e};if(!i.stackedDimension||!i.isStackedByIndex&&!i.stackedByDimension)return;r.length&&o.setCalculationInfo("stackedOnSeries",r[r.length-1].seriesModel),r.push(i)}})),t.each(p_)})),iD("default",(function(e,t){Du(t=t||{},{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Fg,r=new Gy({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var o,i=new ax({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new Gy({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});return n.add(a),t.showSpinner&&((o=new hC({shape:{startAngle:-MM/2,endAngle:-MM/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*MM/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:3*MM/2}).delay(300).start("circularInOut"),n.add(o)),n.resize=function(){var n=i.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,l=(e.getWidth()-2*s-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),c=e.getHeight()/2;t.showSpinner&&o.setShape({cx:l,cy:c}),a.setShape({x:l-s,y:c-s,width:2*s,height:2*s}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n})),tD({type:bx,event:bx,update:bx},md),tD({type:Sx,event:Sx,update:Sx},md),tD({type:_x,event:_x,update:_x},md),tD({type:Ax,event:Ax,update:Ax},md),tD({type:kx,event:kx,update:kx},md),$T("light",UM),$T("dark",$M);var sD=[],lD={registerPreprocessor:QT,registerProcessor:JT,registerPostInit:function(e){eD("afterinit",e)},registerPostUpdate:function(e){eD("afterupdate",e)},registerUpdateLifecycle:eD,registerAction:tD,registerCoordinateSystem:function(e,t){WS.register(e,t)},registerLayout:function(e,t){oD(WT,e,t,1e3,"layout")},registerVisual:nD,registerTransform:aD,registerLoading:iD,registerMap:function(e,t,n){var r=nT["registerMap"];r&&r(e,t,n)},registerImpl:function(e,t){nT[e]=t},PRIORITY:iT,ComponentModel:rS,ComponentView:tk,SeriesModel:JA,ChartView:dM,registerComponentModel:function(e){rS.registerClass(e)},registerComponentView:function(e){tk.registerClass(e)},registerSeriesModel:function(e){JA.registerClass(e)},registerChartView:function(e){dM.registerClass(e)},registerSubTypeDefaulter:function(e,t){rS.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){var n;n=t,Vg[e]=n}};function cD(e){Vu(e)?Ru(e,(function(e){cD(e)})):ju(sD,e)>=0||(sD.push(e),Wu(e)&&(e={install:e}),e.install(lD))}var uD=2*Math.PI,dD=ay.CMD,hD=["top","right","bottom","left"];function pD(e,t,n,r,o){var i=n.width,a=n.height;switch(e){case"top":r.set(n.x+i/2,n.y-t),o.set(0,-1);break;case"bottom":r.set(n.x+i/2,n.y+a+t),o.set(0,1);break;case"left":r.set(n.x-t,n.y+a/2),o.set(-1,0);break;case"right":r.set(n.x+i+t,n.y+a/2),o.set(1,0)}}function fD(e,t,n,r,o,i,a,s,l){a-=e,s-=t;var c=Math.sqrt(a*a+s*s),u=(a/=c)*n+e,d=(s/=c)*n+t;if(Math.abs(r-o)%uD<1e-4)return l[0]=u,l[1]=d,c-n;if(i){var h=r;r=dy(o),o=dy(h)}else r=dy(r),o=dy(o);r>o&&(o+=uD);var p=Math.atan2(s,a);if(p<0&&(p+=uD),p>=r&&p<=o||p+uD>=r&&p+uD<=o)return l[0]=u,l[1]=d,c-n;var f=n*Math.cos(r)+e,g=n*Math.sin(r)+t,m=n*Math.cos(o)+e,v=n*Math.sin(o)+t,y=(f-a)*(f-a)+(g-s)*(g-s),x=(m-a)*(m-a)+(v-s)*(v-s);return y<x?(l[0]=f,l[1]=g,Math.sqrt(y)):(l[0]=m,l[1]=v,Math.sqrt(x))}function gD(e,t,n,r,o,i,a,s){var l=o-e,c=i-t,u=n-e,d=r-t,h=Math.sqrt(u*u+d*d),p=(l*(u/=h)+c*(d/=h))/h;s&&(p=Math.min(Math.max(p,0),1)),p*=h;var f=a[0]=e+p*u,g=a[1]=t+p*d;return Math.sqrt((f-o)*(f-o)+(g-i)*(g-i))}function mD(e,t,n,r,o,i,a){n<0&&(e+=n,n=-n),r<0&&(t+=r,r=-r);var s=e+n,l=t+r,c=a[0]=Math.min(Math.max(o,e),s),u=a[1]=Math.min(Math.max(i,t),l);return Math.sqrt((c-o)*(c-o)+(u-i)*(u-i))}var vD=[];function yD(e,t,n){var r=mD(t.x,t.y,t.width,t.height,e.x,e.y,vD);return n.set(vD[0],vD[1]),r}function xD(e,t,n){for(var r,o,i=0,a=0,s=0,l=0,c=1/0,u=t.data,d=e.x,h=e.y,p=0;p<u.length;){var f=u[p++];1===p&&(s=i=u[p],l=a=u[p+1]);var g=c;switch(f){case dD.M:i=s=u[p++],a=l=u[p++];break;case dD.L:g=gD(i,a,u[p],u[p+1],d,h,vD,!0),i=u[p++],a=u[p++];break;case dD.C:g=Sp(i,a,u[p++],u[p++],u[p++],u[p++],u[p],u[p+1],d,h,vD),i=u[p++],a=u[p++];break;case dD.Q:g=Ip(i,a,u[p++],u[p++],u[p],u[p+1],d,h,vD),i=u[p++],a=u[p++];break;case dD.A:var m=u[p++],v=u[p++],y=u[p++],x=u[p++],b=u[p++],w=u[p++];p+=1;var S=!!(1-u[p++]);r=Math.cos(b)*y+m,o=Math.sin(b)*x+v,p<=1&&(s=r,l=o),g=fD(m,v,x,b,b+w,S,(d-m)*x/y+m,h,vD),i=Math.cos(b+w)*y+m,a=Math.sin(b+w)*x+v;break;case dD.R:g=mD(s=i=u[p++],l=a=u[p++],u[p++],u[p++],d,h,vD);break;case dD.Z:g=gD(i,a,s,l,d,h,vD,!0),i=s,a=l}g<c&&(c=g,n.set(vD[0],vD[1]))}return c}var bD=new bh,wD=new bh,SD=new bh,_D=new bh,AD=new bh;function kD(e,t){if(e){var n=e.getTextGuideLine(),r=e.getTextContent();if(r&&n){var o=e.textGuideLineConfig||{},i=[[0,0],[0,0],[0,0]],a=o.candidates||hD,s=r.getBoundingRect().clone();s.applyTransform(r.getComputedTransform());var l=1/0,c=o.anchor,u=e.getComputedTransform(),d=u&&yh([],u),h=t.get("length2")||0;c&&SD.copy(c);for(var p=0;p<a.length;p++){pD(a[p],0,s,bD,_D),bh.scaleAndAdd(wD,bD,_D,h),wD.transform(d);var f=e.getBoundingRect(),g=c?c.distance(wD):e instanceof Ty?xD(wD,e.path,SD):yD(wD,f,SD);g<l&&(l=g,wD.transform(u),SD.transform(u),SD.toArray(i[0]),wD.toArray(i[1]),bD.toArray(i[2]))}ID(i,t.get("minTurnAngle")),n.setShape({points:i})}}}var CD=[],MD=new bh;function ID(e,t){if(t<=180&&t>0){t=t/180*Math.PI,bD.fromArray(e[0]),wD.fromArray(e[1]),SD.fromArray(e[2]),bh.sub(_D,bD,wD),bh.sub(AD,SD,wD);var n=_D.len(),r=AD.len();if(!(n<.001||r<.001)){_D.scale(1/n),AD.scale(1/r);var o=_D.dot(AD);if(Math.cos(t)<o){var i=gD(wD.x,wD.y,SD.x,SD.y,bD.x,bD.y,CD,!1);MD.fromArray(CD),MD.scaleAndAdd(AD,i/Math.tan(Math.PI-t));var a=SD.x!==wD.x?(MD.x-wD.x)/(SD.x-wD.x):(MD.y-wD.y)/(SD.y-wD.y);if(isNaN(a))return;a<0?bh.copy(MD,wD):a>1&&bh.copy(MD,SD),MD.toArray(e[1])}}}}function TD(e,t,n){if(n<=180&&n>0){n=n/180*Math.PI,bD.fromArray(e[0]),wD.fromArray(e[1]),SD.fromArray(e[2]),bh.sub(_D,wD,bD),bh.sub(AD,SD,wD);var r=_D.len(),o=AD.len();if(!(r<.001||o<.001))if(_D.scale(1/r),AD.scale(1/o),_D.dot(t)<Math.cos(n)){var i=gD(wD.x,wD.y,SD.x,SD.y,bD.x,bD.y,CD,!1);MD.fromArray(CD);var a=Math.PI/2,s=a+Math.acos(AD.dot(t))-n;if(s>=a)bh.copy(MD,SD);else{MD.scaleAndAdd(AD,i/Math.tan(Math.PI/2-s));var l=SD.x!==wD.x?(MD.x-wD.x)/(SD.x-wD.x):(MD.y-wD.y)/(SD.y-wD.y);if(isNaN(l))return;l<0?bh.copy(MD,wD):l>1&&bh.copy(MD,SD)}MD.toArray(e[1])}}}function DD(e,t,n,r){var o="normal"===n,i=o?e:e.ensureState(n);i.ignore=t;var a=r.get("smooth");a&&!0===a&&(a=.3),i.shape=i.shape||{},a>0&&(i.shape.smooth=a);var s=r.getModel("lineStyle").getLineStyle();o?e.useStyle(s):i.style=s}function jD(e,t){var n=t.smooth,r=t.points;if(r)if(e.moveTo(r[0][0],r[0][1]),n>0&&r.length>=3){var o=Pd(r[0],r[1]),i=Pd(r[1],r[2]);if(!o||!i)return e.lineTo(r[1][0],r[1][1]),void e.lineTo(r[2][0],r[2][1]);var a=Math.min(o,i)*n,s=Rd([],r[1],r[0],a/o),l=Rd([],r[1],r[2],a/i),c=Rd([],s,l,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],c[0],c[1]),e.bezierCurveTo(l[0],l[1],l[0],l[1],r[2][0],r[2][1])}else for(var u=1;u<r.length;u++)e.lineTo(r[u][0],r[u][1])}function PD(e,t,n){var r=e.getTextGuideLine(),o=e.getTextContent();if(o){for(var i=t.normal,a=i.get("show"),s=o.ignore,l=0;l<vx.length;l++){var c=vx[l],u=t[c],d="normal"===c;if(u){var h=u.get("show");if((d?s:Ju(o.states[c]&&o.states[c].ignore,s))||!Ju(h,a)){var p=d?r:r&&r.states[c];p&&(p.ignore=!0),r&&DD(r,!0,c,u);continue}r||(r=new eC,e.setTextGuideLine(r),d||!s&&a||DD(r,!0,"normal",t.normal),e.stateProxy&&(r.stateProxy=e.stateProxy)),DD(r,!1,c,u)}}if(r){Du(r.style,n),r.style.fill=null;var f=i.get("showAbove");(e.textGuideLineConfig=e.textGuideLineConfig||{}).showAbove=f||!1,r.buildPath=jD}}else r&&e.removeTextGuideLine()}function LD(e,t){t=t||"labelLine";for(var n={normal:e.getModel(t)},r=0;r<mx.length;r++){var o=mx[r];n[o]=e.getModel([o,t])}return n}function RD(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];if(!r.defaultAttr.ignore){var o=r.label,i=o.getComputedTransform(),a=o.getBoundingRect(),s=!i||i[1]<1e-5&&i[2]<1e-5,l=o.style.margin||0,c=a.clone();c.applyTransform(i),c.x-=l/2,c.y-=l/2,c.width+=l,c.height+=l;var u=s?new _C(a,i):null;t.push({label:o,labelLine:r.labelLine,rect:c,localRect:a,obb:u,priority:r.priority,defaultAttr:r.defaultAttr,layoutOption:r.computedLayoutOption,axisAligned:s,transform:i})}}return t}function ED(e,t,n,r,o,i){var a=e.length;if(!(a<2)){e.sort((function(e,n){return e.rect[t]-n.rect[t]}));for(var s,l=0,c=!1,u=[],d=0,h=0;h<a;h++){var p=e[h],f=p.rect;(s=f[t]-l)<0&&(f[t]-=s,p.label[t]-=s,c=!0);var g=Math.max(-s,0);u.push(g),d+=g,l=f[t]+f[n]}d>0&&i&&S(-d/a,0,a);var m,v,y=e[0],x=e[a-1];return b(),m<0&&_(-m,.8),v<0&&_(v,.8),b(),w(m,v,1),w(v,m,-1),b(),m<0&&A(-m),v<0&&A(v),c}function b(){m=y.rect[t]-r,v=o-x.rect[t]-x.rect[n]}function w(e,t,n){if(e<0){var r=Math.min(t,-e);if(r>0){S(r*n,0,a);var o=r+e;o<0&&_(-o*n,1)}else _(-e*n,1)}}function S(n,r,o){0!==n&&(c=!0);for(var i=r;i<o;i++){var a=e[i];a.rect[t]+=n,a.label[t]+=n}}function _(r,o){for(var i=[],s=0,l=1;l<a;l++){var c=e[l-1].rect,u=Math.max(e[l].rect[t]-c[t]-c[n],0);i.push(u),s+=u}if(s){var d=Math.min(Math.abs(r)/s,o);if(r>0)for(l=0;l<a-1;l++){S(i[l]*d,0,l+1)}else for(l=a-1;l>0;l--){S(-(i[l-1]*d),l,a)}}}function A(e){var t=e<0?-1:1;e=Math.abs(e);for(var n=Math.ceil(e/(a-1)),r=0;r<a-1;r++)if(t>0?S(n,0,r+1):S(-n,a-r-1,a),(e-=n)<=0)return}}function ND(e,t,n,r){return ED(e,"y","height",t,n,r)}function OD(e){var t=[];e.sort((function(e,t){return t.priority-e.priority}));var n=new Dh(0,0,0,0);function r(e){if(!e.ignore){var t=e.ensureState("emphasis");null==t.ignore&&(t.ignore=!1)}e.ignore=!0}for(var o=0;o<e.length;o++){var i=e[o],a=i.axisAligned,s=i.localRect,l=i.transform,c=i.label,u=i.labelLine;n.copy(i.rect),n.width-=.1,n.height-=.1,n.x+=.05,n.y+=.05;for(var d=i.obb,h=!1,p=0;p<t.length;p++){var f=t[p];if(n.intersect(f.rect)){if(a&&f.axisAligned){h=!0;break}if(f.obb||(f.obb=new _C(f.localRect,f.transform)),d||(d=new _C(s,l)),d.intersect(f.obb)){h=!0;break}}}h?(r(c),u&&r(u)):(c.attr("ignore",i.defaultAttr.ignore),u&&u.attr("ignore",i.defaultAttr.labelGuideIgnore),t.push(i))}}function zD(e){if(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].slice());return t}}function BD(e,t){var n=e.label,r=t&&t.getTextGuideLine();return{dataIndex:e.dataIndex,dataType:e.dataType,seriesIndex:e.seriesModel.seriesIndex,text:e.label.style.text,rect:e.hostRect,labelRect:e.rect,align:n.style.align,verticalAlign:n.style.verticalAlign,labelLinePoints:zD(r&&r.shape.points)}}var FD=["align","verticalAlign","width","height","fontSize"],VD=new yg,WD=jm(),HD=jm();function GD(e,t,n){for(var r=0;r<n.length;r++){var o=n[r];null!=t[o]&&(e[o]=t[o])}}var UD=["x","y","rotation"],XD=function(){function e(){this._labelList=[],this._chartViewList=[]}return e.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},e.prototype._addLabel=function(e,t,n,r,o){var i=r.style,a=r.__hostTarget.textConfig||{},s=r.getComputedTransform(),l=r.getBoundingRect().plain();Dh.applyTransform(l,l,s),s?VD.setLocalTransform(s):(VD.x=VD.y=VD.rotation=VD.originX=VD.originY=0,VD.scaleX=VD.scaleY=1),VD.rotation=dy(VD.rotation);var c,u=r.__hostTarget;if(u){c=u.getBoundingRect().plain();var d=u.getComputedTransform();Dh.applyTransform(c,c,d)}var h=c&&u.getTextGuideLine();this._labelList.push({label:r,labelLine:h,seriesModel:n,dataIndex:e,dataType:t,layoutOption:o,computedLayoutOption:null,rect:l,hostRect:c,priority:c?c.width*c.height:0,defaultAttr:{ignore:r.ignore,labelGuideIgnore:h&&h.ignore,x:VD.x,y:VD.y,scaleX:VD.scaleX,scaleY:VD.scaleY,rotation:VD.rotation,style:{x:i.x,y:i.y,align:i.align,verticalAlign:i.verticalAlign,width:i.width,height:i.height,fontSize:i.fontSize},cursor:r.cursor,attachedPos:a.position,attachedRot:a.rotation}})},e.prototype.addLabelsOfSeries=function(e){var t=this;this._chartViewList.push(e);var n=e.__model,r=n.get("labelLayout");(Wu(r)||zu(r).length)&&e.group.traverse((function(e){if(e.ignore)return!0;var o=e.getTextContent(),i=sx(e);o&&!o.disableLabelLayout&&t._addLabel(i.dataIndex,i.dataType,n,o,r)}))},e.prototype.updateLayoutConfig=function(e){var t=e.getWidth(),n=e.getHeight();function r(e,t){return function(){kD(e,t)}}for(var o=0;o<this._labelList.length;o++){var i=this._labelList[o],a=i.label,s=a.__hostTarget,l=i.defaultAttr,c=void 0;c=(c=Wu(i.layoutOption)?i.layoutOption(BD(i,s)):i.layoutOption)||{},i.computedLayoutOption=c;var u=Math.PI/180;s&&s.setTextConfig({local:!1,position:null!=c.x||null!=c.y?null:l.attachedPos,rotation:null!=c.rotate?c.rotate*u:l.attachedRot,offset:[c.dx||0,c.dy||0]});var d=!1;if(null!=c.x?(a.x=Zg(c.x,t),a.setStyle("x",0),d=!0):(a.x=l.x,a.setStyle("x",l.style.x)),null!=c.y?(a.y=Zg(c.y,n),a.setStyle("y",0),d=!0):(a.y=l.y,a.setStyle("y",l.style.y)),c.labelLinePoints){var h=s.getTextGuideLine();h&&(h.setShape({points:c.labelLinePoints}),d=!1)}WD(a).needsUpdateLabelLine=d,a.rotation=null!=c.rotate?c.rotate*u:l.rotation,a.scaleX=l.scaleX,a.scaleY=l.scaleY;for(var p=0;p<FD.length;p++){var f=FD[p];a.setStyle(f,null!=c[f]?c[f]:l.style[f])}if(c.draggable){if(a.draggable=!0,a.cursor="move",s){var g=i.seriesModel;if(null!=i.dataIndex)g=i.seriesModel.getData(i.dataType).getItemModel(i.dataIndex);a.on("drag",r(s,g.getModel("labelLine")))}}else a.off("drag"),a.cursor=l.cursor}},e.prototype.layout=function(e){var t,n=e.getWidth(),r=e.getHeight(),o=RD(this._labelList),i=Ou(o,(function(e){return"shiftX"===e.layoutOption.moveOverlap})),a=Ou(o,(function(e){return"shiftY"===e.layoutOption.moveOverlap}));ED(i,"x","width",0,n,t),ND(a,0,r),OD(Ou(o,(function(e){return e.layoutOption.hideOverlap})))},e.prototype.processLabelsOverall=function(){var e=this;Ru(this._chartViewList,(function(t){var n=t.__model,r=t.ignoreLabelLineUpdate,o=n.isAnimationEnabled();t.group.traverse((function(t){if(t.ignore&&!t.forceLabelAnimation)return!0;var i=!r,a=t.getTextContent();!i&&a&&(i=WD(a).needsUpdateLabelLine),i&&e._updateLabelLine(t,n),o&&e._animateLabels(t,n)}))}))},e.prototype._updateLabelLine=function(e,t){var n=e.getTextContent(),r=sx(e),o=r.dataIndex;if(n&&null!=o){var i=t.getData(r.dataType),a=i.getItemModel(o),s={},l=i.getItemVisual(o,"style");if(l){var c=i.getVisual("drawType");s.stroke=l[c]}var u=a.getModel("labelLine");PD(e,LD(a),s),kD(e,u)}},e.prototype._animateLabels=function(e,t){var n=e.getTextContent(),r=e.getTextGuideLine();if(n&&(e.forceLabelAnimation||!n.ignore&&!n.invisible&&!e.disableLabelAnimation&&!gb(e))){var o=(p=WD(n)).oldLayout,i=sx(e),a=i.dataIndex,s={x:n.x,y:n.y,rotation:n.rotation},l=t.getData(i.dataType);if(o){n.attr(o);var c=e.prevStates;c&&(ju(c,"select")>=0&&n.attr(p.oldLayoutSelect),ju(c,"emphasis")>=0&&n.attr(p.oldLayoutEmphasis)),pb(n,s,t,a)}else if(n.attr(s),!Pb(n).valueAnimation){var u=Ju(n.style.opacity,1);n.style.opacity=0,fb(n,{style:{opacity:u}},t,a)}if(p.oldLayout=s,n.states.select){var d=p.oldLayoutSelect={};GD(d,s,UD),GD(d,n.states.select,UD)}if(n.states.emphasis){var h=p.oldLayoutEmphasis={};GD(h,s,UD),GD(h,n.states.emphasis,UD)}Rb(n,a,l,t,t)}if(r&&!r.ignore&&!r.invisible){o=(p=HD(r)).oldLayout;var p,f={points:r.shape.points};o?(r.attr({shape:o}),pb(r,{shape:f},t)):(r.setShape(f),r.style.strokePercent=0,fb(r,{style:{strokePercent:1}},t)),p.oldLayout=f}},e}();const YD=XD;var qD=jm();function ZD(e){e.registerUpdateLifecycle("series:beforeupdate",(function(e,t,n){var r=qD(t).labelManager;r||(r=qD(t).labelManager=new YD),r.clearLabels()})),e.registerUpdateLifecycle("series:layoutlabels",(function(e,t,n){var r=qD(t).labelManager;n.updatedSeries.forEach((function(e){r.addLabelsOfSeries(t.getViewOfSeriesModel(e))})),r.updateLayoutConfig(t),r.layout(t),r.processLabelsOverall()}))}function KD(e,t,n){var r=du.createCanvas(),o=t.getWidth(),i=t.getHeight(),a=r.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=o+"px",a.height=i+"px",r.setAttribute("data-zr-dom-id",e)),r.width=o*n,r.height=i*n,r}cD(ZD);var $D=function(e){function t(t,n,r){var o,i=e.call(this)||this;i.motionBlur=!1,i.lastFrameAlpha=.7,i.dpr=1,i.virtual=!1,i.config={},i.incremental=!1,i.zlevel=0,i.maxRepaintRectCount=5,i.__dirty=!0,i.__firstTimePaint=!0,i.__used=!1,i.__drawIndex=0,i.__startIndex=0,i.__endIndex=0,i.__prevStartIndex=null,i.__prevEndIndex=null,r=r||ig,"string"===typeof t?o=KD(t,n,r):Xu(t)&&(t=(o=t).id),i.id=t,i.dom=o;var a=o.style;return a&&(fd(o),o.onselectstart=function(){return!1},a.padding="0",a.margin="0",a.borderWidth="0"),i.painter=n,i.dpr=r,i}return xd(t,e),t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=KD("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),1!==e&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,t,n,r){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o,i=[],a=this.maxRepaintRectCount,s=!1,l=new Dh(0,0,0,0);function c(e){if(e.isFinite()&&!e.isZero())if(0===i.length){(t=new Dh(0,0,0,0)).copy(e),i.push(t)}else{for(var t,n=!1,r=1/0,o=0,c=0;c<i.length;++c){var u=i[c];if(u.intersect(e)){var d=new Dh(0,0,0,0);d.copy(u),d.union(e),i[c]=d,n=!0;break}if(s){l.copy(e),l.union(u);var h=e.width*e.height,p=u.width*u.height,f=l.width*l.height-h-p;f<r&&(r=f,o=c)}}if(s&&(i[o].union(e),n=!0),!n)(t=new Dh(0,0,0,0)).copy(e),i.push(t);s||(s=i.length>=a)}}for(var u=this.__startIndex;u<this.__endIndex;++u){if(p=e[u]){var d=p.shouldBePainted(n,r,!0,!0);(f=p.__isRendered&&(p.__dirty&Kh||!d)?p.getPrevPaintRect():null)&&c(f);var h=d&&(p.__dirty&Kh||!p.__isRendered)?p.getPaintRect():null;h&&c(h)}}for(u=this.__prevStartIndex;u<this.__prevEndIndex;++u){var p,f;d=(p=t[u])&&p.shouldBePainted(n,r,!0,!0);if(p&&(!d||!p.__zr)&&p.__isRendered)(f=p.getPrevPaintRect())&&c(f)}do{o=!1;for(u=0;u<i.length;)if(i[u].isZero())i.splice(u,1);else{for(var g=u+1;g<i.length;)i[u].intersect(i[g])?(o=!0,i[u].union(i[g]),i.splice(g,1)):g++;u++}}while(o);return this._paintRects=i,i},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,t){var n=this.dpr,r=this.dom,o=r.style,i=this.domBack;o&&(o.width=e+"px",o.height=t+"px"),r.width=e*n,r.height=t*n,i&&(i.width=e*n,i.height=t*n,1!==n&&this.ctxBack.scale(n,n))},t.prototype.clear=function(e,t,n){var r=this.dom,o=this.ctx,i=r.width,a=r.height;t=t||this.clearColor;var s=this.motionBlur&&!e,l=this.lastFrameAlpha,c=this.dpr,u=this;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(r,0,0,i/c,a/c));var d=this.domBack;function h(e,n,r,i){if(o.clearRect(e,n,r,i),t&&"transparent"!==t){var a=void 0;if(Ku(t))a=(t.global||t.__width===r&&t.__height===i)&&t.__canvasGradient||AI(o,t,{x:0,y:0,width:r,height:i}),t.__canvasGradient=a,t.__width=r,t.__height=i;else null!=t.image&&(t.scaleX=t.scaleX||c,t.scaleY=t.scaleY||c,a=RI(o,t,{dirty:function(){u.setUnpainted(),u.painter.refresh()}}));o.save(),o.fillStyle=a||t,o.fillRect(e,n,r,i),o.restore()}s&&(o.save(),o.globalAlpha=l,o.drawImage(d,e,n,r,i),o.restore())}!n||s?h(0,0,i,a):n.length&&Ru(n,(function(e){h(e.x*c,e.y*c,e.width*c,e.height*c)}))},t}(Wd);const QD=$D;var JD=1e5,ej=314159,tj=.01;var nj=function(){function e(e,t,n,r){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var o=!e.nodeName||"CANVAS"===e.nodeName.toUpperCase();this._opts=n=Tu({},n||{}),this.dpr=n.devicePixelRatio||ig,this._singleCanvas=o,this.root=e,e.style&&(fd(e),e.innerHTML=""),this.storage=t;var i=this._zlevelList;this._prevDisplayList=[];var a=this._layers;if(o){var s=e,l=s.width,c=s.height;null!=n.width&&(l=n.width),null!=n.height&&(c=n.height),this.dpr=n.devicePixelRatio||1,s.width=l*this.dpr,s.height=c*this.dpr,this._width=l,this._height=c;var u=new QD(s,this,this.dpr);u.__builtin__=!0,u.initContext(),a[314159]=u,u.zlevel=ej,i.push(ej),this._domRoot=e}else{this._width=CI(e,0,n),this._height=CI(e,1,n);var d=this._domRoot=function(e,t){var n=document.createElement("div");return n.style.cssText=["position:relative","width:"+e+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",n}(this._width,this._height);e.appendChild(d)}}return e.prototype.getType=function(){return"canvas"},e.prototype.isSingleCanvas=function(){return this._singleCanvas},e.prototype.getViewportRoot=function(){return this._domRoot},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.refresh=function(e){var t=this.storage.getDisplayList(!0),n=this._prevDisplayList,r=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,n,e,this._redrawId);for(var o=0;o<r.length;o++){var i=r[o],a=this._layers[i];if(!a.__builtin__&&a.refresh){var s=0===o?this._backgroundColor:null;a.refresh(s)}}return this._opts.useDirtyRect&&(this._prevDisplayList=t.slice()),this},e.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},e.prototype._paintHoverList=function(e){var t=e.length,n=this._hoverlayer;if(n&&n.clear(),t){for(var r,o={inHover:!0,viewWidth:this._width,viewHeight:this._height},i=0;i<t;i++){var a=e[i];a.__inHover&&(n||(n=this._hoverlayer=this.getLayer(JD)),r||(r=n.ctx).save(),YI(r,a,o,i===t-1))}r&&r.restore()}},e.prototype.getHoverLayer=function(){return this.getLayer(JD)},e.prototype.paintOne=function(e,t){XI(e,t)},e.prototype._paintList=function(e,t,n,r){if(this._redrawId===r){n=n||!1,this._updateLayerStatus(e);var o=this._doPaintList(e,t,n),i=o.finished,a=o.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),a&&this._paintHoverList(e),i)this.eachLayer((function(e){e.afterBrush&&e.afterBrush()}));else{var s=this;rp((function(){s._paintList(e,t,n,r)}))}}},e.prototype._compositeManually=function(){var e=this.getLayer(ej).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),this.eachBuiltinLayer((function(r){r.virtual&&e.drawImage(r.dom,0,0,t,n)}))},e.prototype._doPaintList=function(e,t,n){for(var r=this,o=[],i=this._opts.useDirtyRect,a=0;a<this._zlevelList.length;a++){var s=this._zlevelList[a],l=this._layers[s];l.__builtin__&&l!==this._hoverlayer&&(l.__dirty||n)&&o.push(l)}for(var c=!0,u=!1,d=function(a){var s,l=o[a],d=l.ctx,p=i&&l.createRepaintRects(e,t,h._width,h._height),f=n?l.__startIndex:l.__drawIndex,g=!n&&l.incremental&&Date.now,m=g&&Date.now(),v=l.zlevel===h._zlevelList[0]?h._backgroundColor:null;if(l.__startIndex===l.__endIndex)l.clear(!1,v,p);else if(f===l.__startIndex){var y=e[f];y.incremental&&y.notClear&&!n||l.clear(!1,v,p)}-1===f&&(console.error("For some unknown reason. drawIndex is -1"),f=l.__startIndex);var x=function(t){var n={inHover:!1,allClipped:!1,prevEl:null,viewWidth:r._width,viewHeight:r._height};for(s=f;s<l.__endIndex;s++){var o=e[s];if(o.__inHover&&(u=!0),r._doPaintEl(o,l,i,t,n,s===l.__endIndex-1),g)if(Date.now()-m>15)break}n.prevElClipPaths&&d.restore()};if(p)if(0===p.length)s=l.__endIndex;else for(var b=h.dpr,w=0;w<p.length;++w){var S=p[w];d.save(),d.beginPath(),d.rect(S.x*b,S.y*b,S.width*b,S.height*b),d.clip(),x(S),d.restore()}else d.save(),x(),d.restore();l.__drawIndex=s,l.__drawIndex<l.__endIndex&&(c=!1)},h=this,p=0;p<o.length;p++)d(p);return au.wxa&&Ru(this._layers,(function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()})),{finished:c,needsRefreshHover:u}},e.prototype._doPaintEl=function(e,t,n,r,o,i){var a=t.ctx;if(n){var s=e.getPaintRect();(!r||s&&s.intersect(r))&&(YI(a,e,o,i),e.setPrevPaintRect(s))}else YI(a,e,o,i)},e.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=ej);var n=this._layers[e];return n||((n=new QD("zr_"+e,this,this.dpr)).zlevel=e,n.__builtin__=!0,this._layerConfig[e]?Mu(n,this._layerConfig[e],!0):this._layerConfig[e-tj]&&Mu(n,this._layerConfig[e-tj],!0),t&&(n.virtual=t),this.insertLayer(e,n),n.initContext()),n},e.prototype.insertLayer=function(e,t){var n=this._layers,r=this._zlevelList,o=r.length,i=this._domRoot,a=null,s=-1;if(!n[e]&&function(e){return!!e&&(!!e.__builtin__||"function"===typeof e.resize&&"function"===typeof e.refresh)}(t)){if(o>0&&e>r[0]){for(s=0;s<o-1&&!(r[s]<e&&r[s+1]>e);s++);a=n[r[s]]}if(r.splice(s+1,0,e),n[e]=t,!t.virtual)if(a){var l=a.dom;l.nextSibling?i.insertBefore(t.dom,l.nextSibling):i.appendChild(t.dom)}else i.firstChild?i.insertBefore(t.dom,i.firstChild):i.appendChild(t.dom);t.painter||(t.painter=this)}},e.prototype.eachLayer=function(e,t){for(var n=this._zlevelList,r=0;r<n.length;r++){var o=n[r];e.call(t,this._layers[o],o)}},e.prototype.eachBuiltinLayer=function(e,t){for(var n=this._zlevelList,r=0;r<n.length;r++){var o=n[r],i=this._layers[o];i.__builtin__&&e.call(t,i,o)}},e.prototype.eachOtherLayer=function(e,t){for(var n=this._zlevelList,r=0;r<n.length;r++){var o=n[r],i=this._layers[o];i.__builtin__||e.call(t,i,o)}},e.prototype.getLayers=function(){return this._layers},e.prototype._updateLayerStatus=function(e){function t(e){i&&(i.__endIndex!==e&&(i.__dirty=!0),i.__endIndex=e)}if(this.eachBuiltinLayer((function(e,t){e.__dirty=e.__used=!1})),this._singleCanvas)for(var n=1;n<e.length;n++){if((s=e[n]).zlevel!==e[n-1].zlevel||s.incremental){this._needsManuallyCompositing=!0;break}}var r,o,i=null,a=0;for(o=0;o<e.length;o++){var s,l=(s=e[o]).zlevel,c=void 0;r!==l&&(r=l,a=0),s.incremental?((c=this.getLayer(l+.001,this._needsManuallyCompositing)).incremental=!0,a=1):c=this.getLayer(l+(a>0?tj:0),this._needsManuallyCompositing),c.__builtin__||ku("ZLevel "+l+" has been used by unkown layer "+c.id),c!==i&&(c.__used=!0,c.__startIndex!==o&&(c.__dirty=!0),c.__startIndex=o,c.incremental?c.__drawIndex=-1:c.__drawIndex=o,t(o),i=c),s.__dirty&Kh&&!s.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=o))}t(o),this.eachBuiltinLayer((function(e,t){!e.__used&&e.getElementCount()>0&&(e.__dirty=!0,e.__startIndex=e.__endIndex=e.__drawIndex=0),e.__dirty&&e.__drawIndex<0&&(e.__drawIndex=e.__startIndex)}))},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(e){e.clear()},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e,Ru(this._layers,(function(e){e.setUnpainted()}))},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?Mu(n[e],t,!0):n[e]=t;for(var r=0;r<this._zlevelList.length;r++){var o=this._zlevelList[r];if(o===e||o===e+tj)Mu(this._layers[o],n[e],!0)}}},e.prototype.delLayer=function(e){var t=this._layers,n=this._zlevelList,r=t[e];r&&(r.dom.parentNode.removeChild(r.dom),delete t[e],n.splice(ju(n,e),1))},e.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var r=this._opts,o=this.root;if(null!=e&&(r.width=e),null!=t&&(r.height=t),e=CI(o,0,r),t=CI(o,1,r),n.style.display="",this._width!==e||t!==this._height){for(var i in n.style.width=e+"px",n.style.height=t+"px",this._layers)this._layers.hasOwnProperty(i)&&this._layers[i].resize(e,t);this.refresh(!0)}this._width=e,this._height=t}else{if(null==e||null==t)return;this._width=e,this._height=t,this.getLayer(ej).resize(e,t)}return this},e.prototype.clearLayer=function(e){var t=this._layers[e];t&&t.clear()},e.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},e.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[314159].dom;var t=new QD("image",this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var n=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var r=t.dom.width,o=t.dom.height;this.eachLayer((function(e){e.__builtin__?n.drawImage(e.dom,0,0,r,o):e.renderToCanvas&&(n.save(),e.renderToCanvas(n),n.restore())}))}else for(var i={inHover:!1,viewWidth:this._width,viewHeight:this._height},a=this.storage.getDisplayList(!0),s=0,l=a.length;s<l;s++){var c=a[s];YI(n,c,i,s===l-1)}return t.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}();const rj=nj;var oj=Math.sin,ij=Math.cos,aj=Math.PI,sj=2*Math.PI,lj=180/aj,cj=function(){function e(){}return e.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},e.prototype.moveTo=function(e,t){this._add("M",e,t)},e.prototype.lineTo=function(e,t){this._add("L",e,t)},e.prototype.bezierCurveTo=function(e,t,n,r,o,i){this._add("C",e,t,n,r,o,i)},e.prototype.quadraticCurveTo=function(e,t,n,r){this._add("Q",e,t,n,r)},e.prototype.arc=function(e,t,n,r,o,i){this.ellipse(e,t,n,n,0,r,o,i)},e.prototype.ellipse=function(e,t,n,r,o,i,a,s){var l=a-i,c=!s,u=Math.abs(l),d=uf(u-sj)||(c?l>=sj:-l>=sj),h=l>0?l%sj:l%sj+sj,p=!1;p=!!d||!uf(u)&&h>=aj===!!c;var f=e+n*ij(i),g=t+r*oj(i);this._start&&this._add("M",f,g);var m=Math.round(o*lj);if(d){var v=1/this._p,y=(c?1:-1)*(sj-v);this._add("A",n,r,m,1,+c,e+n*ij(i+y),t+r*oj(i+y)),v>.01&&this._add("A",n,r,m,0,+c,f,g)}else{var x=e+n*ij(a),b=t+r*oj(a);this._add("A",n,r,m,+p,+c,x,b)}},e.prototype.rect=function(e,t,n,r){this._add("M",e,t),this._add("l",n,0),this._add("l",0,r),this._add("l",-n,0),this._add("Z")},e.prototype.closePath=function(){this._d.length>0&&this._add("Z")},e.prototype._add=function(e,t,n,r,o,i,a,s,l){for(var c=[],u=this._p,d=1;d<arguments.length;d++){var h=arguments[d];if(isNaN(h))return void(this._invalid=!0);c.push(Math.round(h*u)/u)}this._d.push(e+c.join(" ")),this._start="Z"===e},e.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},e.prototype.getStr=function(){return this._str},e}();const uj=cj;var dj="none",hj=Math.round;var pj=["lineCap","miterLimit","lineJoin"],fj=Eu(pj,(function(e){return"stroke-"+e.toLowerCase()}));function gj(e,t,n,r){var o=null==t.opacity?1:t.opacity;if(n instanceof Ny)e("opacity",o);else{if(function(e){var t=e.fill;return null!=t&&t!==dj}(t)){var i=lf(t.fill);e("fill",i.color);var a=null!=t.fillOpacity?t.fillOpacity*i.opacity*o:i.opacity*o;(r||a<1)&&e("fill-opacity",a)}else e("fill",dj);if(function(e){var t=e.stroke;return null!=t&&t!==dj}(t)){var s=lf(t.stroke);e("stroke",s.color);var l=t.strokeNoScale?n.getLineScale():1,c=l?(t.lineWidth||0)/l:0,u=null!=t.strokeOpacity?t.strokeOpacity*s.opacity*o:s.opacity*o,d=t.strokeFirst;if((r||1!==c)&&e("stroke-width",c),(r||d)&&e("paint-order",d?"stroke":"fill"),(r||u<1)&&e("stroke-opacity",u),t.lineDash){var h=MI(n),p=h[0],f=h[1];p&&(f=hj(f||0),e("stroke-dasharray",p.join(",")),(f||r)&&e("stroke-dashoffset",f))}else r&&e("stroke-dasharray",dj);for(var g=0;g<pj.length;g++){var m=pj[g];if(r||t[m]!==ky[m]){var v=t[m]||ky[m];v&&e(fj[g],v)}}}else r&&e("stroke",dj)}}var mj="http://www.w3.org/2000/svg",vj="http://www.w3.org/1999/xlink",yj="http://www.w3.org/2000/xmlns/",xj="http://www.w3.org/XML/1998/namespace",bj="ecmeta_";function wj(e){return document.createElementNS(mj,e)}function Sj(e,t,n,r,o){return{tag:e,attrs:n||{},children:r,text:o,key:t}}function _j(e,t){var n=(t=t||{}).newline?"\n":"";return function e(t){var r=t.children,o=t.tag,i=t.attrs,a=t.text;return function(e,t){var n=[];if(t)for(var r in t){var o=t[r],i=r;!1!==o&&(!0!==o&&null!=o&&(i+='="'+o+'"'),n.push(i))}return"<"+e+" "+n.join(" ")+">"}(o,i)+("style"!==o?Qd(a):a||"")+(r?""+n+Eu(r,(function(t){return e(t)})).join(n)+n:"")+("</"+o+">")}(e)}function Aj(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function kj(e,t,n,r){return Sj("svg","root",{width:e,height:t,xmlns:mj,"xmlns:xlink":vj,version:"1.1",baseProfile:"full",viewBox:!!r&&"0 0 "+e+" "+t},n)}var Cj=0;function Mj(){return Cj++}var Ij={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},Tj="transform-origin";function Dj(e,t,n){var r=Tu({},e.shape);Tu(r,t),e.buildPath(n,r);var o=new uj;return o.reset(bf(e)),n.rebuildPath(o,1),o.generateStr(),o.getStr()}function jj(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[Tj]=n+"px "+r+"px")}var Pj={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function Lj(e,t){var n=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function Rj(e){return Hu(e)?Ij[e]?"cubic-bezier("+Ij[e]+")":jp(e)?e:"":""}function Ej(e,t,n,r){var o=e.animators,i=o.length,a=[];if(e instanceof fC){var s=function(e,t,n){var r,o,i=e.shape.paths,a={};if(Ru(i,(function(e){var t=Aj(n.zrId);t.animation=!0,Ej(e,{},t,!0);var i=t.cssAnims,s=t.cssNodes,l=zu(i),c=l.length;if(c){var u=i[o=l[c-1]];for(var d in u){var h=u[d];a[d]=a[d]||{d:""},a[d].d+=h.d||""}for(var p in s){var f=s[p].animation;f.indexOf(o)>=0&&(r=f)}}})),r){t.d=!1;var s=Lj(a,n);return r.replace(o,s)}}(e,t,n);if(s)a.push(s);else if(!i)return}else if(!i)return;for(var l={},c=0;c<i;c++){var u=o[c],d=[u.getMaxTime()/1e3+"s"],h=Rj(u.getClip().easing),p=u.getDelay();h?d.push(h):d.push("linear"),p&&d.push(p/1e3+"s"),u.getLoop()&&d.push("infinite");var f=d.join(" ");l[f]=l[f]||[f,[]],l[f][1].push(u)}function g(o){var i,a=o[1],s=a.length,l={},c={},u={},d="animation-timing-function";function h(e,t,n){for(var r=e.getTracks(),o=e.getMaxTime(),i=0;i<r.length;i++){var a=r[i];if(a.needsAnimate()){var s=a.keyframes,l=a.propName;if(n&&(l=n(l)),l)for(var c=0;c<s.length;c++){var u=s[c],h=Math.round(u.time/o*100)+"%",p=Rj(u.easing),f=u.rawValue;(Hu(f)||Uu(f))&&(t[h]=t[h]||{},t[h][l]=u.rawValue,p&&(t[h][d]=p))}}}}for(var p=0;p<s;p++){(_=(S=a[p]).targetName)?"shape"===_&&h(S,c):!r&&h(S,l)}for(var f in l){var g={};vg(g,e),Tu(g,l[f]);var m=wf(g),v=l[f][d];u[f]=m?{transform:m}:{},jj(u[f],g),v&&(u[f][d]=v)}var y=!0;for(var f in c){u[f]=u[f]||{};var x=!i;v=c[f][d];x&&(i=new ay);var b=i.len();i.reset(),u[f].d=Dj(e,c[f],i);var w=i.len();if(!x&&b!==w){y=!1;break}v&&(u[f][d]=v)}if(!y)for(var f in u)delete u[f].d;if(!r)for(p=0;p<s;p++){var S,_;"style"===(_=(S=a[p]).targetName)&&h(S,u,(function(e){return Pj[e]}))}var A,k=zu(u),C=!0;for(p=1;p<k.length;p++){var M=k[p-1],I=k[p];if(u[M][Tj]!==u[I][Tj]){C=!1;break}A=u[M][Tj]}if(C&&A){for(var f in u)u[f][Tj]&&delete u[f][Tj];t[Tj]=A}if(Ou(k,(function(e){return zu(u[e]).length>0})).length)return Lj(u,n)+" "+o[0]+" both"}for(var m in l){(s=g(l[m]))&&a.push(s)}if(a.length){var v=n.zrId+"-cls-"+Mj();n.cssNodes["."+v]={animation:a.join(",")},t.class=v}}function Nj(e,t,n,r){var o=JSON.stringify(e),i=n.cssStyleCache[o];i||(i=n.zrId+"-cls-"+Mj(),n.cssStyleCache[o]=i,n.cssNodes["."+i+(r?":hover":"")]=e),t.class=t.class?t.class+" "+i:i}var Oj=Math.round;function zj(e){return e&&Hu(e.src)}function Bj(e){return e&&Wu(e.toDataURL)}function Fj(e,t,n,r){gj((function(o,i){var a="fill"===o||"stroke"===o;a&&yf(i)?Zj(t,e,o,r):a&&gf(i)?Kj(n,e,o,r):e[o]=a&&"none"===i?"transparent":i}),t,n,!1),function(e,t,n){var r=e.style;if(function(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}(r)){var o=function(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(",")}(e),i=n.shadowCache,a=i[o];if(!a){var s=e.getGlobalScale(),l=s[0],c=s[1];if(!l||!c)return;var u=r.shadowOffsetX||0,d=r.shadowOffsetY||0,h=r.shadowBlur,p=lf(r.shadowColor),f=p.opacity,g=p.color,m=h/2/l+" "+h/2/c;a=n.zrId+"-s"+n.shadowIdx++,n.defs[a]=Sj("filter",a,{id:a,x:"-100%",y:"-100%",width:"300%",height:"300%"},[Sj("feDropShadow","",{dx:u/l,dy:d/c,stdDeviation:m,"flood-color":g,"flood-opacity":f})]),i[o]=a}t.filter=xf(a)}}(n,e,r)}function Vj(e,t){var n=function(e){if("function"===typeof Hg)return Hg(e)}(t);n&&(n.each((function(t,n){null!=t&&(e[(bj+n).toLowerCase()]=t+"")})),t.isSilent()&&(e[bj+"silent"]="true"))}function Wj(e){return uf(e[0]-1)&&uf(e[1])&&uf(e[2])&&uf(e[3]-1)}function Hj(e,t,n){if(t&&(!function(e){return uf(e[4])&&uf(e[5])}(t)||!Wj(t))){var r=n?10:1e4;e.transform=Wj(t)?"translate("+Oj(t[4]*r)/r+" "+Oj(t[5]*r)/r+")":function(e){return"matrix("+df(e[0])+","+df(e[1])+","+df(e[2])+","+df(e[3])+","+hf(e[4])+","+hf(e[5])+")"}(t)}}function Gj(e,t,n){for(var r=e.points,o=[],i=0;i<r.length;i++)o.push(Oj(r[i][0]*n)/n),o.push(Oj(r[i][1]*n)/n);t.points=o.join(" ")}function Uj(e){return!e.smooth}var Xj={circle:[function(e){var t=Eu(e,(function(e){return"string"===typeof e?[e,e]:e}));return function(e,n,r){for(var o=0;o<t.length;o++){var i=t[o],a=e[i[0]];null!=a&&(n[i[1]]=Oj(a*r)/r)}}}(["cx","cy","r"])],polyline:[Gj,Uj],polygon:[Gj,Uj]};function Yj(e,t){var n=e.style,r=e.shape,o=Xj[e.type],i={},a=t.animation,s="path",l=e.style.strokePercent,c=t.compress&&bf(e)||4;if(!o||t.willUpdate||o[1]&&!o[1](r)||a&&function(e){for(var t=e.animators,n=0;n<t.length;n++)if("shape"===t[n].targetName)return!0;return!1}(e)||l<1){var u=!e.path||e.shapeChanged();e.path||e.createPathProxy();var d=e.path;u&&(d.beginPath(),e.buildPath(d,e.shape),e.pathUpdated());var h=d.getVersion(),p=e,f=p.__svgPathBuilder;p.__svgPathVersion===h&&f&&l===p.__svgPathStrokePercent||(f||(f=p.__svgPathBuilder=new uj),f.reset(c),d.rebuildPath(f,l),f.generateStr(),p.__svgPathVersion=h,p.__svgPathStrokePercent=l),i.d=f.getStr()}else{s=e.type;var g=Math.pow(10,c);o[0](r,i,g)}return Hj(i,e.transform),Fj(i,n,e,t),Vj(i,e),t.animation&&Ej(e,i,t),t.emphasis&&function(e,t,n){if(!e.ignore)if(e.isSilent())Nj(c={"pointer-events":"none"},t,n,!0);else{var r=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},o=r.fill;if(!o){var i=e.style&&e.style.fill,a=e.states.select&&e.states.select.style&&e.states.select.style.fill,s=e.currentStates.indexOf("select")>=0&&a||i;s&&(o=af(s))}var l=r.lineWidth;l&&(l/=!r.strokeNoScale&&e.transform?e.transform[0]:1);var c={cursor:"pointer"};o&&(c.fill=o),r.stroke&&(c.stroke=r.stroke),l&&(c["stroke-width"]=l),Nj(c,t,n,!0)}}(e,i,t),Sj(s,e.id+"",i)}function qj(e,t){return e instanceof Ty?Yj(e,t):e instanceof Ny?function(e,t){var n=e.style,r=n.image;if(r&&!Hu(r)&&(zj(r)?r=r.src:Bj(r)&&(r=r.toDataURL())),r){var o=n.x||0,i=n.y||0,a={href:r,width:n.width,height:n.height};return o&&(a.x=o),i&&(a.y=i),Hj(a,e.transform),Fj(a,n,e,t),Vj(a,e),t.animation&&Ej(e,a,t),Sj("image",e.id+"",a)}}(e,t):e instanceof Py?function(e,t){var n=e.style,r=n.text;if(null!=r&&(r+=""),r&&!isNaN(n.x)&&!isNaN(n.y)){var o=n.font||cu,i=n.x||0,a=function(e,t,n){return"top"===n?e+=t/2:"bottom"===n&&(e-=t/2),e}(n.y||0,kg(o),n.textBaseline),s={"dominant-baseline":"central","text-anchor":pf[n.textAlign]||n.textAlign};if(Jy(n)){var l="",c=n.fontStyle,u=$y(n.fontSize);if(!parseFloat(u))return;var d=n.fontFamily||lu,h=n.fontWeight;l+="font-size:"+u+";font-family:"+d+";",c&&"normal"!==c&&(l+="font-style:"+c+";"),h&&"normal"!==h&&(l+="font-weight:"+h+";"),s.style=l}else s.style="font: "+o;return r.match(/\s/)&&(s["xml:space"]="preserve"),i&&(s.x=i),a&&(s.y=a),Hj(s,e.transform),Fj(s,n,e,t),Vj(s,e),t.animation&&Ej(e,s,t),Sj("text",e.id+"",s,void 0,r)}}(e,t):void 0}function Zj(e,t,n,r){var o,i=e[n],a={gradientUnits:i.global?"userSpaceOnUse":"objectBoundingBox"};if(mf(i))o="linearGradient",a.x1=i.x,a.y1=i.y,a.x2=i.x2,a.y2=i.y2;else{if(!vf(i))return void 0;o="radialGradient",a.cx=Ju(i.x,.5),a.cy=Ju(i.y,.5),a.r=Ju(i.r,.5)}for(var s=i.colorStops,l=[],c=0,u=s.length;c<u;++c){var d=100*hf(s[c].offset)+"%",h=lf(s[c].color),p=h.color,f=h.opacity,g={offset:d};g["stop-color"]=p,f<1&&(g["stop-opacity"]=f),l.push(Sj("stop",c+"",g))}var m=_j(Sj(o,"",a,l)),v=r.gradientCache,y=v[m];y||(y=r.zrId+"-g"+r.gradientIdx++,v[m]=y,a.id=y,r.defs[y]=Sj(o,y,a,l)),t[n]=xf(y)}function Kj(e,t,n,r){var o,i=e.style[n],a=e.getBoundingRect(),s={},l=i.repeat,c="no-repeat"===l,u="repeat-x"===l,d="repeat-y"===l;if(ff(i)){var h=i.imageWidth,p=i.imageHeight,f=void 0,g=i.image;if(Hu(g)?f=g:zj(g)?f=g.src:Bj(g)&&(f=g.toDataURL()),"undefined"===typeof Image){var m="Image width/height must been given explictly in svg-ssr renderer.";rd(h,m),rd(p,m)}else if(null==h||null==p){var v=function(e,t){if(e){var n=e.elm,r=h||t.width,o=p||t.height;"pattern"===e.tag&&(u?(o=1,r/=a.width):d&&(r=1,o/=a.height)),e.attrs.width=r,e.attrs.height=o,n&&(n.setAttribute("width",r),n.setAttribute("height",o))}},y=nv(f,null,e,(function(e){c||v(S,e),v(o,e)}));y&&y.width&&y.height&&(h=h||y.width,p=p||y.height)}o=Sj("image","img",{href:f,width:h,height:p}),s.width=h,s.height=p}else i.svgElement&&(o=Cu(i.svgElement),s.width=i.svgWidth,s.height=i.svgHeight);if(o){var x,b;c?x=b=1:u?(b=1,x=s.width/a.width):d?(x=1,b=s.height/a.height):s.patternUnits="userSpaceOnUse",null==x||isNaN(x)||(s.width=x),null==b||isNaN(b)||(s.height=b);var w=wf(i);w&&(s.patternTransform=w);var S=Sj("pattern","",s,[o]),_=_j(S),A=r.patternCache,k=A[_];k||(k=r.zrId+"-p"+r.patternIdx++,A[_]=k,s.id=k,S=r.defs[k]=Sj("pattern",k,s,[o])),t[n]=xf(k)}}function $j(e,t,n){var r=n.clipPathCache,o=n.defs,i=r[e.id];if(!i){var a={id:i=n.zrId+"-c"+n.clipPathIdx++};r[e.id]=i,o[i]=Sj("clipPath",i,a,[Yj(e,n)])}t["clip-path"]=xf(i)}function Qj(e){return document.createTextNode(e)}function Jj(e,t,n){e.insertBefore(t,n)}function eP(e,t){e.removeChild(t)}function tP(e,t){e.appendChild(t)}function nP(e){return e.parentNode}function rP(e){return e.nextSibling}function oP(e,t){e.textContent=t}var iP=58,aP=120,sP=Sj("","");function lP(e){return void 0===e}function cP(e){return void 0!==e}function uP(e,t,n){for(var r={},o=t;o<=n;++o){var i=e[o].key;void 0!==i&&(r[i]=o)}return r}function dP(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function hP(e){var t,n=e.children,r=e.tag;if(cP(r)){var o=e.elm=wj(r);if(gP(sP,e),Vu(n))for(t=0;t<n.length;++t){var i=n[t];null!=i&&tP(o,hP(i))}else cP(e.text)&&!Xu(e.text)&&tP(o,Qj(e.text))}else e.elm=Qj(e.text);return e.elm}function pP(e,t,n,r,o){for(;r<=o;++r){var i=n[r];null!=i&&Jj(e,hP(i),t)}}function fP(e,t,n,r){for(;n<=r;++n){var o=t[n];if(null!=o)if(cP(o.tag))eP(nP(o.elm),o.elm);else eP(e,o.elm)}}function gP(e,t){var n,r=t.elm,o=e&&e.attrs||{},i=t.attrs||{};if(o!==i){for(n in i){var a=i[n];o[n]!==a&&(!0===a?r.setAttribute(n,""):!1===a?r.removeAttribute(n):"style"===n?r.style.cssText=a:n.charCodeAt(0)!==aP?r.setAttribute(n,a):"xmlns:xlink"===n||"xmlns"===n?r.setAttributeNS(yj,n,a):n.charCodeAt(3)===iP?r.setAttributeNS(xj,n,a):n.charCodeAt(5)===iP?r.setAttributeNS(vj,n,a):r.setAttribute(n,a))}for(n in o)n in i||r.removeAttribute(n)}}function mP(e,t){var n=t.elm=e.elm,r=e.children,o=t.children;e!==t&&(gP(e,t),lP(t.text)?cP(r)&&cP(o)?r!==o&&function(e,t,n){for(var r,o,i,a=0,s=0,l=t.length-1,c=t[0],u=t[l],d=n.length-1,h=n[0],p=n[d];a<=l&&s<=d;)null==c?c=t[++a]:null==u?u=t[--l]:null==h?h=n[++s]:null==p?p=n[--d]:dP(c,h)?(mP(c,h),c=t[++a],h=n[++s]):dP(u,p)?(mP(u,p),u=t[--l],p=n[--d]):dP(c,p)?(mP(c,p),Jj(e,c.elm,rP(u.elm)),c=t[++a],p=n[--d]):dP(u,h)?(mP(u,h),Jj(e,u.elm,c.elm),u=t[--l],h=n[++s]):(lP(r)&&(r=uP(t,a,l)),lP(o=r[h.key])||(i=t[o]).tag!==h.tag?Jj(e,hP(h),c.elm):(mP(i,h),t[o]=void 0,Jj(e,i.elm,c.elm)),h=n[++s]);(a<=l||s<=d)&&(a>l?pP(e,null==n[d+1]?null:n[d+1].elm,n,s,d):fP(e,t,a,l))}(n,r,o):cP(o)?(cP(e.text)&&oP(n,""),pP(n,null,o,0,o.length-1)):cP(r)?fP(n,r,0,r.length-1):cP(e.text)&&oP(n,""):e.text!==t.text&&(cP(r)&&fP(n,r,0,r.length-1),oP(n,t.text)))}var vP=0,yP=function(){function e(e,t,n){if(this.type="svg",this.refreshHover=function(){0},this.configLayer=function(){0},this.storage=t,this._opts=n=Tu({},n),this.root=e,this._id="zr"+vP++,this._oldVNode=kj(n.width,n.height),e&&!n.ssr){var r=this._viewport=document.createElement("div");r.style.cssText="position:relative;overflow:hidden";var o=this._svgDom=this._oldVNode.elm=wj("svg");gP(null,this._oldVNode),r.appendChild(o),e.appendChild(r)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",function(e,t){if(dP(e,t))mP(e,t);else{var n=e.elm,r=nP(n);hP(t),null!==r&&(Jj(r,t.elm,rP(n)),fP(r,[e],0,0))}}(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return qj(e,Aj(this._id))},e.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,o=Aj(this._id);o.animation=e.animation,o.willUpdate=e.willUpdate,o.compress=e.compress,o.emphasis=e.emphasis;var i=[],a=this._bgVNode=function(e,t,n,r){var o;if(n&&"none"!==n)if(o=Sj("rect","bg",{width:e,height:t,x:"0",y:"0"}),yf(n))Zj({fill:n},o.attrs,"fill",r);else if(gf(n))Kj({style:{fill:n},dirty:md,getBoundingRect:function(){return{width:e,height:t}}},o.attrs,"fill",r);else{var i=lf(n),a=i.color,s=i.opacity;o.attrs.fill=a,s<1&&(o.attrs["fill-opacity"]=s)}return o}(n,r,this._backgroundColor,o);a&&i.push(a);var s=e.compress?null:this._mainVNode=Sj("g","main",{},[]);this._paintList(t,o,s?s.children:i),s&&i.push(s);var l=Eu(zu(o.defs),(function(e){return o.defs[e]}));if(l.length&&i.push(Sj("defs","defs",{},l)),e.animation){var c=function(e,t,n){var r=(n=n||{}).newline?"\n":"",o=" {"+r,i=r+"}",a=Eu(zu(e),(function(t){return t+o+Eu(zu(e[t]),(function(n){return n+":"+e[t][n]+";"})).join(r)+i})).join(r),s=Eu(zu(t),(function(e){return"@keyframes "+e+o+Eu(zu(t[e]),(function(n){return n+o+Eu(zu(t[e][n]),(function(r){var o=t[e][n][r];return"d"===r&&(o='path("'+o+'")'),r+":"+o+";"})).join(r)+i})).join(r)+i})).join(r);return a||s?["<![CDATA[",a,s,"]]>"].join(r):""}(o.cssNodes,o.cssAnims,{newline:!0});if(c){var u=Sj("style","stl",{},[],c);i.push(u)}}return kj(n,r,i,e.useViewBox)},e.prototype.renderToString=function(e){return e=e||{},_j(this.renderToVNode({animation:Ju(e.cssAnimation,!0),emphasis:Ju(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Ju(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var r,o,i=e.length,a=[],s=0,l=0,c=0;c<i;c++){var u=e[c];if(!u.invisible){var d=u.__clipPaths,h=d&&d.length||0,p=o&&o.length||0,f=void 0;for(f=Math.max(h-1,p-1);f>=0&&(!d||!o||d[f]!==o[f]);f--);for(var g=p-1;g>f;g--)r=a[--s-1];for(var m=f+1;m<h;m++){var v={};$j(d[m],v,t);var y=Sj("g","clip-g-"+l++,v,[]);(r?r.children:n).push(y),a[s++]=y,r=y}o=d;var x=qj(u,t);x&&(r?r.children:n).push(x)}}},e.prototype.resize=function(e,t){var n=this._opts,r=this.root,o=this._viewport;if(null!=e&&(n.width=e),null!=t&&(n.height=t),r&&o&&(o.style.display="none",e=CI(r,0,n),t=CI(r,1,n),o.style.display=""),this._width!==e||this._height!==t){if(this._width=e,this._height=t,o){var i=o.style;i.width=e+"px",i.height=t+"px"}if(gf(this._backgroundColor))this.refresh();else{var a=this._svgDom;a&&(a.setAttribute("width",e),a.setAttribute("height",t));var s=this._bgVNode&&this._bgVNode.elm;s&&(s.setAttribute("width",e),s.setAttribute("height",t))}}},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},e.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},e.prototype.toDataURL=function(e){var t=this.renderToString(),n="data:image/svg+xml;";return e?(t=Sf(t))&&n+"base64,"+t:n+"charset=UTF-8,"+encodeURIComponent(t)},e}();const xP=yP;function bP(e){return null==e?0:e.length||1}function wP(e){return e}var SP=function(){function e(e,t,n,r,o,i){this._old=e,this._new=t,this._oldKeyGetter=n||wP,this._newKeyGetter=r||wP,this.context=o,this._diffModeMultiple="multiple"===i}return e.prototype.add=function(e){return this._add=e,this},e.prototype.update=function(e){return this._update=e,this},e.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},e.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},e.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},e.prototype.remove=function(e){return this._remove=e,this},e.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},e.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},r=new Array(e.length),o=new Array(t.length);this._initIndexMap(e,null,r,"_oldKeyGetter"),this._initIndexMap(t,n,o,"_newKeyGetter");for(var i=0;i<e.length;i++){var a=r[i],s=n[a],l=bP(s);if(l>1){var c=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(c,i)}else 1===l?(n[a]=null,this._update&&this._update(s,i)):this._remove&&this._remove(i)}this._performRestAdd(o,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},o=[],i=[];this._initIndexMap(e,n,o,"_oldKeyGetter"),this._initIndexMap(t,r,i,"_newKeyGetter");for(var a=0;a<o.length;a++){var s=o[a],l=n[s],c=r[s],u=bP(l),d=bP(c);if(u>1&&1===d)this._updateManyToOne&&this._updateManyToOne(c,l),r[s]=null;else if(1===u&&d>1)this._updateOneToMany&&this._updateOneToMany(c,l),r[s]=null;else if(1===u&&1===d)this._update&&this._update(c,l),r[s]=null;else if(u>1&&d>1)this._updateManyToMany&&this._updateManyToMany(c,l),r[s]=null;else if(u>1)for(var h=0;h<u;h++)this._remove&&this._remove(l[h]);else this._remove&&this._remove(l)}this._performRestAdd(i,r)},e.prototype._performRestAdd=function(e,t){for(var n=0;n<e.length;n++){var r=e[n],o=t[r],i=bP(o);if(i>1)for(var a=0;a<i;a++)this._add&&this._add(o[a]);else 1===i&&this._add&&this._add(o);t[r]=null}},e.prototype._initIndexMap=function(e,t,n,r){for(var o=this._diffModeMultiple,i=0;i<e.length;i++){var a="_ec_"+this[r](e[i],i);if(o||(n[i]=a),t){var s=t[a],l=bP(s);0===l?(t[a]=i,o&&n.push(a)):1===l?t[a]=[s,i]:s.push(i)}}},e}();const _P=SP;var AP=function(){function e(e,t){this._encode=e,this._schema=t}return e.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},e.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},e}();function kP(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}function CP(e){return"category"===e?"ordinal":"time"===e?"time":"float"}const MP=function(e){this.otherDims={},null!=e&&Tu(this,e)};var IP=jm(),TP={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},DP=function(){function e(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=LP(this.source)))},e.prototype.getSourceDimensionIndex=function(e){return Ju(this._dimNameMap.get(e),-1)},e.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},e.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=C_(this.source),n=!RP(e),r="",o=[],i=0,a=0;i<e;i++){var s=void 0,l=void 0,c=void 0,u=this.dimensions[a];if(u&&u.storeDimIndex===i)s=t?u.name:null,l=u.type,c=u.ordinalMeta,a++;else{var d=this.getSourceDimension(i);d&&(s=t?d.name:null,l=d.type)}o.push({property:s,type:l,ordinalMeta:c}),!t||null==s||u&&u.isCalculationCoord||(r+=n?s.replace(/\`/g,"`1").replace(/\$/g,"`2"):s),r+="$",r+=TP[l]||"f",c&&(r+=c.uid),r+="$"}var h=this.source;return{dimensions:o,hash:[h.seriesLayoutBy,h.startIndex,r].join("$$")}},e.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,n=0;t<this._fullDimCount;t++){var r=void 0,o=this.dimensions[n];if(o&&o.storeDimIndex===t)o.isCalculationCoord||(r=o.name),n++;else{var i=this.getSourceDimension(t);i&&(r=i.name)}e.push(r)}return e},e.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},e}();function jP(e){return e instanceof DP}function PP(e){for(var t=dd(),n=0;n<(e||[]).length;n++){var r=e[n],o=Xu(r)?r.name:r;null!=o&&null==t.get(o)&&t.set(o,n)}return t}function LP(e){var t=IP(e);return t.dimNameMap||(t.dimNameMap=PP(e.dimensionsDefine))}function RP(e){return e>30}var EP,NP,OP,zP,BP,FP,VP,WP=Xu,HP=Eu,GP="undefined"===typeof Int32Array?Array:Int32Array,UP=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],XP=["_approximateExtent"],YP=function(){function e(e,t){var n;this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var r=!1;jP(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n=n||["x","y"];for(var o={},i=[],a={},s=!1,l={},c=0;c<n.length;c++){var u=n[c],d=Hu(u)?new MP({name:u}):u instanceof MP?u:new MP(u),h=d.name;d.type=d.type||"float",d.coordDim||(d.coordDim=h,d.coordDimIndex=0);var p=d.otherDims=d.otherDims||{};i.push(h),o[h]=d,null!=l[h]&&(s=!0),d.createInvertedIndices&&(a[h]=[]),0===p.itemName&&(this._nameDimIdx=c),0===p.itemId&&(this._idDimIdx=c),r&&(d.storeDimIndex=c)}if(this.dimensions=i,this._dimInfos=o,this._initGetDimensionInfo(s),this.hostModel=t,this._invertedIndicesMap=a,this._dimOmitted){var f=this._dimIdxToName=dd();Ru(i,(function(e){f.set(o[e].storeDimIndex,e)}))}}return e.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(null==t)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var n=this._dimIdxToName.get(t);if(null!=n)return n;var r=this._schema.getSourceDimension(t);return r?r.name:void 0},e.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(null!=t)return t;if(null==e)return-1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},e.prototype._recognizeDimIndex=function(e){if(Uu(e)||null!=e&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},e.prototype._getStoreDimIndex=function(e){return this.getDimensionIndex(e)},e.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},e.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(e){return t.hasOwnProperty(e)?t[e]:void 0}:function(e){return t[e]}},e.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},e.prototype.mapDimension=function(e,t){var n=this._dimSummary;if(null==t)return n.encodeFirstDimNotExtra[e];var r=n.encode[e];return r?r[t]:null},e.prototype.mapDimensionsAll=function(e){return(this._dimSummary.encode[e]||[]).slice()},e.prototype.getStore=function(){return this._store},e.prototype.initData=function(e,t,n){var r,o=this;if(e instanceof bA&&(r=e),!r){var i=this.dimensions,a=b_(e)||Lu(e)?new M_(e,i.length):e;r=new bA;var s=HP(i,(function(e){return{type:o._dimInfos[e].type,property:e}}));r.initData(a,s,n)}this._store=r,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,r.count()),this._dimSummary=function(e,t){var n={},r=n.encode={},o=dd(),i=[],a=[],s={};Ru(e.dimensions,(function(t){var n,l=e.getDimensionInfo(t),c=l.coordDim;if(c){var u=l.coordDimIndex;kP(r,c)[u]=t,l.isExtraCoord||(o.set(c,1),"ordinal"!==(n=l.type)&&"time"!==n&&(i[0]=t),kP(s,c)[u]=e.getDimensionIndex(l.name)),l.defaultTooltip&&a.push(t)}sS.each((function(e,t){var n=kP(r,t),o=l.otherDims[t];null!=o&&!1!==o&&(n[o]=l.name)}))}));var l=[],c={};o.each((function(e,t){var n=r[t];c[t]=n[0],l=l.concat(n)})),n.dataDimsOnCoord=l,n.dataDimIndicesOnCoord=Eu(l,(function(t){return e.getDimensionInfo(t).storeDimIndex})),n.encodeFirstDimNotExtra=c;var u=r.label;u&&u.length&&(i=u.slice());var d=r.tooltip;return d&&d.length?a=d.slice():a.length||(a=i.slice()),r.defaultedLabel=i,r.defaultedTooltip=a,n.userOutput=new AP(s,t),n}(this,this._schema),this.userOutput=this._dimSummary.userOutput},e.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},e.prototype.appendValues=function(e,t){var n=this._store.appendValues(e,t.length),r=n.start,o=n.end,i=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var a=r;a<o;a++){var s=a-r;this._nameList[a]=t[s],i&&VP(this,a)}},e.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,n=0;n<t.length;n++){var r=this._dimInfos[t[n]];r.ordinalMeta&&e.collectOrdinalMeta(r.storeDimIndex,r.ordinalMeta)}},e.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return null==this._idDimIdx&&e.getSource().sourceFormat!==hS&&!e.fillStorage},e.prototype._doInit=function(e,t){if(!(e>=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,o=this._idList;if(n.getSource().sourceFormat===lS&&!n.pure)for(var i=[],a=e;a<t;a++){var s=n.getItem(a,i);if(!this.hasItemOption&&_m(s)&&(this.hasItemOption=!0),s){var l=s.name;null==r[a]&&null!=l&&(r[a]=Mm(l,null));var c=s.id;null==o[a]&&null!=c&&(o[a]=Mm(c,null))}}if(this._shouldMakeIdFromName())for(a=e;a<t;a++)VP(this,a);EP(this)}},e.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},e.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},e.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},e.prototype.setCalculationInfo=function(e,t){WP(e)?Tu(this._calculationInfo,e):this._calculationInfo[e]=t},e.prototype.getName=function(e){var t=this.getRawIndex(e),n=this._nameList[t];return null==n&&null!=this._nameDimIdx&&(n=OP(this,this._nameDimIdx,t)),null==n&&(n=""),n},e.prototype._getCategory=function(e,t){var n=this._store.get(e,t),r=this._store.getOrdinalMeta(e);return r?r.categories[n]:n},e.prototype.getId=function(e){return NP(this,this.getRawIndex(e))},e.prototype.count=function(){return this._store.count()},e.prototype.get=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.get(r.storeDimIndex,t)},e.prototype.getByRawIndex=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.getByRawIndex(r.storeDimIndex,t)},e.prototype.getIndices=function(){return this._store.getIndices()},e.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},e.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},e.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},e.prototype.getValues=function(e,t){var n=this,r=this._store;return Vu(e)?r.getValues(HP(e,(function(e){return n._getStoreDimIndex(e)})),t):r.getValues(e)},e.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,n=0,r=t.length;n<r;n++)if(isNaN(this._store.get(t[n],e)))return!1;return!0},e.prototype.indexOfName=function(e){for(var t=0,n=this._store.count();t<n;t++)if(this.getName(t)===e)return t;return-1},e.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},e.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},e.prototype.rawIndexOf=function(e,t){var n=(e&&this._invertedIndicesMap[e])[t];return null==n||isNaN(n)?-1:n},e.prototype.indicesOfNearest=function(e,t,n){return this._store.indicesOfNearest(this._getStoreDimIndex(e),t,n)},e.prototype.each=function(e,t,n){Wu(e)&&(n=t,t=e,e=[]);var r=n||this,o=HP(zP(e),this._getStoreDimIndex,this);this._store.each(o,r?Bu(t,r):t)},e.prototype.filterSelf=function(e,t,n){Wu(e)&&(n=t,t=e,e=[]);var r=n||this,o=HP(zP(e),this._getStoreDimIndex,this);return this._store=this._store.filter(o,r?Bu(t,r):t),this},e.prototype.selectRange=function(e){var t=this,n={},r=zu(e),o=[];return Ru(r,(function(r){var i=t._getStoreDimIndex(r);n[i]=e[r],o.push(i)})),this._store=this._store.selectRange(n),this},e.prototype.mapArray=function(e,t,n){Wu(e)&&(n=t,t=e,e=[]),n=n||this;var r=[];return this.each(e,(function(){r.push(t&&t.apply(this,arguments))}),n),r},e.prototype.map=function(e,t,n,r){var o=n||r||this,i=HP(zP(e),this._getStoreDimIndex,this),a=FP(this);return a._store=this._store.map(i,o?Bu(t,o):t),a},e.prototype.modify=function(e,t,n,r){var o=n||r||this;var i=HP(zP(e),this._getStoreDimIndex,this);this._store.modify(i,o?Bu(t,o):t)},e.prototype.downSample=function(e,t,n,r){var o=FP(this);return o._store=this._store.downSample(this._getStoreDimIndex(e),t,n,r),o},e.prototype.lttbDownSample=function(e,t){var n=FP(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),n},e.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},e.prototype.getItemModel=function(e){var t=this.hostModel,n=this.getRawDataItem(e);return new Yb(n,t,t&&t.ecModel)},e.prototype.diff=function(e){var t=this;return new _P(e?e.getStore().getIndices():[],this.getStore().getIndices(),(function(t){return NP(e,t)}),(function(e){return NP(t,e)}))},e.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},e.prototype.setVisual=function(e,t){this._visual=this._visual||{},WP(e)?Tu(this._visual,e):this._visual[e]=t},e.prototype.getItemVisual=function(e,t){var n=this._itemVisuals[e],r=n&&n[t];return null==r?this.getVisual(t):r},e.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||(r=n[e]={});var o=r[t];return null==o&&(Vu(o=this.getVisual(t))?o=o.slice():WP(o)&&(o=Tu({},o)),r[t]=o),o},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,WP(t)?Tu(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){WP(e)?Tu(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?Tu(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){var n=this.hostModel&&this.hostModel.seriesIndex;lx(n,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){Ru(this._graphicEls,(function(n,r){n&&e&&e.call(t,n,r)}))},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:HP(this.dimensions,this._getDimInfo,this),this.hostModel)),BP(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];Wu(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(td(arguments)))})},e.internalField=(EP=function(e){var t=e._invertedIndicesMap;Ru(t,(function(n,r){var o=e._dimInfos[r],i=o.ordinalMeta,a=e._store;if(i){n=t[r]=new GP(i.categories.length);for(var s=0;s<n.length;s++)n[s]=-1;for(s=0;s<a.count();s++)n[a.get(o.storeDimIndex,s)]=s}}))},OP=function(e,t,n){return Mm(e._getCategory(t,n),null)},NP=function(e,t){var n=e._idList[t];return null==n&&null!=e._idDimIdx&&(n=OP(e,e._idDimIdx,t)),null==n&&(n="e\0\0"+t),n},zP=function(e){return Vu(e)||(e=null!=e?[e]:[]),e},FP=function(t){var n=new e(t._schema?t._schema:HP(t.dimensions,t._getDimInfo,t),t.hostModel);return BP(n,t),n},BP=function(e,t){Ru(UP.concat(t.__wrappedMethods||[]),(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e.__wrappedMethods=t.__wrappedMethods,Ru(XP,(function(n){e[n]=Cu(t[n])})),e._calculationInfo=Tu({},t._calculationInfo)},void(VP=function(e,t){var n=e._nameList,r=e._idList,o=e._nameDimIdx,i=e._idDimIdx,a=n[t],s=r[t];if(null==a&&null!=o&&(n[t]=a=OP(e,o,t)),null==s&&null!=i&&(r[t]=s=OP(e,i,t)),null==s&&null!=a){var l=e._nameRepeatCount,c=l[a]=(l[a]||0)+1;s=a,c>1&&(s+="__ec__"+c),r[t]=s}})),e}();const qP=YP;function ZP(e,t){b_(e)||(e=S_(e));var n=(t=t||{}).coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],o=dd(),i=[],a=function(e,t,n,r){var o=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return Ru(t,(function(e){var t;Xu(e)&&(t=e.dimsDef)&&(o=Math.max(o,t.length))})),o}(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&RP(a),l=r===e.dimensionsDefine,c=l?LP(e):PP(r),u=t.encodeDefine;!u&&t.encodeDefaulter&&(u=t.encodeDefaulter(e,a));for(var d=dd(u),h=new pA(a),p=0;p<h.length;p++)h[p]=-1;function f(e){var t=h[e];if(t<0){var n=r[e],o=Xu(n)?n:{name:n},a=new MP,s=o.name;null!=s&&null!=c.get(s)&&(a.name=a.displayName=s),null!=o.type&&(a.type=o.type),null!=o.displayName&&(a.displayName=o.displayName);var l=i.length;return h[e]=l,a.storeDimIndex=e,i.push(a),a}return i[t]}if(!s)for(p=0;p<a;p++)f(p);d.each((function(e,t){var n=xm(e).slice();if(1===n.length&&!Hu(n[0])&&n[0]<0)d.set(t,!1);else{var r=d.set(t,[]);Ru(n,(function(e,n){var o=Hu(e)?c.get(e):e;null!=o&&o<a&&(r[n]=o,m(f(o),t,n))}))}}));var g=0;function m(e,t,n){null!=sS.get(t)?e.otherDims[t]=n:(e.coordDim=t,e.coordDimIndex=n,o.set(t,!0))}Ru(n,(function(e){var t,n,r,o;if(Hu(e))t=e,o={};else{t=(o=e).name;var i=o.ordinalMeta;o.ordinalMeta=null,(o=Tu({},o)).ordinalMeta=i,n=o.dimsDef,r=o.otherDims,o.name=o.coordDim=o.coordDimIndex=o.dimsDef=o.otherDims=null}var s=d.get(t);if(!1!==s){if(!(s=xm(s)).length)for(var c=0;c<(n&&n.length||1);c++){for(;g<a&&null!=f(g).coordDim;)g++;g<a&&s.push(g++)}Ru(s,(function(e,i){var a=f(e);if(l&&null!=o.type&&(a.type=o.type),m(Du(a,o),t,i),null==a.name&&n){var s=n[i];!Xu(s)&&(s={name:s}),a.name=a.displayName=s.name,a.defaultTooltip=s.defaultTooltip}r&&Du(a.otherDims,r)}))}}));var v=t.generateCoord,y=t.generateCoordCount,x=null!=y;y=v?y||1:0;var b=v||"value";function w(e){null==e.name&&(e.name=e.coordDim)}if(s)Ru(i,(function(e){w(e)})),i.sort((function(e,t){return e.storeDimIndex-t.storeDimIndex}));else for(var S=0;S<a;S++){var _=f(S);null==_.coordDim&&(_.coordDim=KP(b,o,x),_.coordDimIndex=0,(!v||y<=0)&&(_.isExtraCoord=!0),y--),w(_),null!=_.type||wS(e,S)!==mS.Must&&(!_.isExtraCoord||null==_.otherDims.itemName&&null==_.otherDims.seriesName)||(_.type="ordinal")}return function(e){for(var t=dd(),n=0;n<e.length;n++){var r=e[n],o=r.name,i=t.get(o)||0;i>0&&(r.name=o+(i-1)),i++,t.set(o,i)}}(i),new DP({source:e,dimensions:i,fullDimensionCount:a,dimensionOmitted:s})}function KP(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var $P=function(e){this.coordSysDims=[],this.axisMap=dd(),this.categoryAxisMap=dd(),this.coordSysName=e};var QP={cartesian2d:function(e,t,n,r){var o=e.getReferringComponents("xAxis",Em).models[0],i=e.getReferringComponents("yAxis",Em).models[0];t.coordSysDims=["x","y"],n.set("x",o),n.set("y",i),JP(o)&&(r.set("x",o),t.firstCategoryDimIndex=0),JP(i)&&(r.set("y",i),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,n,r){var o=e.getReferringComponents("singleAxis",Em).models[0];t.coordSysDims=["single"],n.set("single",o),JP(o)&&(r.set("single",o),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var o=e.getReferringComponents("polar",Em).models[0],i=o.findAxisModel("radiusAxis"),a=o.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],n.set("radius",i),n.set("angle",a),JP(i)&&(r.set("radius",i),t.firstCategoryDimIndex=0),JP(a)&&(r.set("angle",a),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},geo:function(e,t,n,r){t.coordSysDims=["lng","lat"]},parallel:function(e,t,n,r){var o=e.ecModel,i=o.getComponent("parallel",e.get("parallelIndex")),a=t.coordSysDims=i.dimensions.slice();Ru(i.parallelAxisIndex,(function(e,i){var s=o.getComponent("parallelAxis",e),l=a[i];n.set(l,s),JP(s)&&(r.set(l,s),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=i))}))}};function JP(e){return"category"===e.get("type")}function eL(e,t,n){var r,o,i,a=(n=n||{}).byIndex,s=n.stackedCoordDimension;!function(e){return!jP(e.schema)}(t)?(o=t.schema,r=o.dimensions,i=t.store):r=t;var l,c,u,d,h=!(!e||!e.get("stack"));if(Ru(r,(function(e,t){Hu(e)&&(r[t]=e={name:e}),h&&!e.isExtraCoord&&(a||l||!e.ordinalMeta||(l=e),c||"ordinal"===e.type||"time"===e.type||s&&s!==e.coordDim||(c=e))})),!c||a||l||(a=!0),c){u="__\0ecstackresult_"+e.id,d="__\0ecstackedover_"+e.id,l&&(l.createInvertedIndices=!0);var p=c.coordDim,f=c.type,g=0;Ru(r,(function(e){e.coordDim===p&&g++}));var m={name:u,coordDim:p,coordDimIndex:g,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length},v={name:d,coordDim:d,coordDimIndex:g+1,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length+1};o?(i&&(m.storeDimIndex=i.ensureCalculationDimension(d,f),v.storeDimIndex=i.ensureCalculationDimension(u,f)),o.appendCalculationDimension(m),o.appendCalculationDimension(v)):(r.push(m),r.push(v))}return{stackedDimension:c&&c.name,stackedByDimension:l&&l.name,isStackedByIndex:a,stackedOverDimension:d,stackResultDimension:u}}function tL(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function nL(e,t){return tL(e,t)?e.getCalculationInfo("stackResultDimension"):t}const rL=function(e,t,n){n=n||{};var r,o=t.getSourceManager(),i=!1;e?(i=!0,r=S_(e)):i=(r=o.getSource()).sourceFormat===lS;var a=function(e){var t=e.get("coordinateSystem"),n=new $P(t),r=QP[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}(t),s=function(e,t){var n,r=e.get("coordinateSystem"),o=WS.get(r);return t&&t.coordSysDims&&(n=Eu(t.coordSysDims,(function(e){var n={name:e},r=t.axisMap.get(e);if(r){var o=r.get("type");n.type=CP(o)}return n}))),n||(n=o&&(o.getDimensionsInfo?o.getDimensionsInfo():o.dimensions.slice())||["x","y"]),n}(t,a),l=n.useEncodeDefaulter,c=Wu(l)?l:l?Fu(yS,s,t):null,u=ZP(r,{coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:c,canOmitUnusedDimensions:!i}),d=function(e,t,n){var r,o;return n&&Ru(e,(function(e,i){var a=e.coordDim,s=n.categoryAxisMap.get(a);s&&(null==r&&(r=i),e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),null!=e.otherDims.itemName&&(o=!0)})),o||null==r||(e[r].otherDims.itemName=0),r}(u.dimensions,n.createInvertedIndices,a),h=i?null:o.getSharedDataStore(u),p=eL(t,{schema:u,store:h}),f=new qP(u,t);f.setCalculationInfo(p);var g=null!=d&&function(e){if(e.sourceFormat===lS){var t=function(e){var t=0;for(;t<e.length&&null==e[t];)t++;return e[t]}(e.data||[]);return!Vu(Sm(t))}}(r)?function(e,t,n,r){return r===d?n:this.defaultDimValueGetter(e,t,n,r)}:null;return f.hasItemOption=!1,f.initData(i?r:h,null,g),f};var oL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return ru(t,e),t.prototype.getInitialData=function(e){return rL(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new Fg,n=bI("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(n),n.setStyle(e.lineStyle);var r=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),i="none"===r?"circle":r,a=.8*e.itemHeight,s=bI(i,(e.itemWidth-a)/2,(e.itemHeight-a)/2,a,a,e.itemStyle.fill);t.add(s),s.setStyle(e.itemStyle);var l="inherit"===e.iconRotate?o:e.iconRotate||0;return s.rotation=l*Math.PI/180,s.setOrigin([e.itemWidth/2,e.itemHeight/2]),i.indexOf("empty")>-1&&(s.style.stroke=s.style.fill,s.style.fill="#fff",s.style.lineWidth=2),t},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t}(JA);const iL=oL;function aL(e,t){var n=e.mapDimensionsAll("defaultedLabel"),r=n.length;if(1===r){var o=z_(e,t,n[0]);return null!=o?o+"":null}if(r){for(var i=[],a=0;a<n.length;a++)i.push(z_(e,t,n[a]));return i.join(" ")}}function sL(e,t){var n=e.mapDimensionsAll("defaultedLabel");if(!Vu(t))return t+"";for(var r=[],o=0;o<n.length;o++){var i=e.getDimensionIndex(n[o]);i>=0&&r.push(t[i])}return r.join(" ")}var lL=function(e){function t(t,n,r,o){var i=e.call(this)||this;return i.updateData(t,n,r,o),i}return ru(t,e),t.prototype._createSymbol=function(e,t,n,r,o){this.removeAll();var i=bI(e,-1,-1,2,2,null,o);i.attr({z2:100,culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),i.drift=cL,this._symbolType=e,this.add(i)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Vx(this.childAt(0))},t.prototype.downplay=function(){Wx(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?"move":n.cursor},t.prototype.updateData=function(e,n,r,o){this.silent=!1;var i=e.getItemVisual(n,"symbol")||"circle",a=e.hostModel,s=t.getSymbolSize(e,n),l=i!==this._symbolType,c=o&&o.disableAnimation;if(l){var u=e.getItemVisual(n,"symbolKeepAspect");this._createSymbol(i,e,n,s,u)}else{(h=this.childAt(0)).silent=!1;var d={scaleX:s[0]/2,scaleY:s[1]/2};c?h.attr(d):pb(h,d,a,n),xb(h)}if(this._updateCommon(e,n,s,r,o),l){var h=this.childAt(0);if(!c){d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,fb(h,d,a,n)}}c&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,t,n,r,o){var i,a,s,l,c,u,d,h,p,f=this.childAt(0),g=e.hostModel;if(r&&(i=r.emphasisItemStyle,a=r.blurItemStyle,s=r.selectItemStyle,l=r.focus,c=r.blurScope,d=r.labelStatesModels,h=r.hoverScale,p=r.cursorStyle,u=r.emphasisDisabled),!r||e.hasItemOption){var m=r&&r.itemModel?r.itemModel:e.getItemModel(t),v=m.getModel("emphasis");i=v.getModel("itemStyle").getItemStyle(),s=m.getModel(["select","itemStyle"]).getItemStyle(),a=m.getModel(["blur","itemStyle"]).getItemStyle(),l=v.get("focus"),c=v.get("blurScope"),u=v.get("disabled"),d=Ab(m),h=v.getShallow("scale"),p=m.getShallow("cursor")}var y=e.getItemVisual(t,"symbolRotate");f.attr("rotation",(y||0)*Math.PI/180||0);var x=SI(e.getItemVisual(t,"symbolOffset"),n);x&&(f.x=x[0],f.y=x[1]),p&&f.attr("cursor",p);var b=e.getItemVisual(t,"style"),w=b.fill;if(f instanceof Ny){var S=f.style;f.useStyle(Tu({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},b))}else f.__isEmptyBrush?f.useStyle(Tu({},b)):f.useStyle(b),f.style.decal=null,f.setColor(w,o&&o.symbolInnerColor),f.style.strokeNoScale=!0;var _=e.getItemVisual(t,"liftZ"),A=this._z2;null!=_?null==A&&(this._z2=f.z2,f.z2+=_):null!=A&&(f.z2=A,this._z2=null);var k=o&&o.useNameLabel;_b(f,d,{labelFetcher:g,labelDataIndex:t,defaultText:function(t){return k?e.getName(t):aL(e,t)},inheritColor:w,defaultOpacity:b.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var C=f.ensureState("emphasis");C.style=i,f.ensureState("select").style=s,f.ensureState("blur").style=a;var M=null==h||!0===h?Math.max(1.1,3/this._sizeY):isFinite(h)&&h>0?+h:1;C.scaleX=this._sizeX*M,C.scaleY=this._sizeY*M,this.setSymbolScale(1),tb(this,l,c,u)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),o=sx(this).dataIndex,i=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var a=r.getTextContent();a&&mb(a,{style:{opacity:0}},t,{dataIndex:o,removeOpt:i,cb:function(){r.removeTextContent()}})}else r.removeTextContent();mb(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:o,cb:e,removeOpt:i})},t.getSymbolSize=function(e,t){return wI(e.getItemVisual(t,"symbolSize"))},t}(Fg);function cL(e,t){this.parent.drift(e,t)}const uL=lL;function dL(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r.isIgnore&&r.isIgnore(n))&&!(r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&"none"!==e.getItemVisual(n,"symbol")}function hL(e){return null==e||Xu(e)||(e={isIgnore:e}),e||{}}function pL(e){var t=e.hostModel,n=t.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:Ab(t),cursorStyle:t.get("cursor")}}const fL=function(){function e(e){this.group=new Fg,this._SymbolCtor=e||uL}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=hL(t);var n=this.group,r=e.hostModel,o=this._data,i=this._SymbolCtor,a=t.disableAnimation,s=pL(e),l={disableAnimation:a},c=t.getSymbolPoint||function(t){return e.getItemLayout(t)};o||n.removeAll(),e.diff(o).add((function(r){var o=c(r);if(dL(e,o,r,t)){var a=new i(e,r,s,l);a.setPosition(o),e.setItemGraphicEl(r,a),n.add(a)}})).update((function(u,d){var h=o.getItemGraphicEl(d),p=c(u);if(dL(e,p,u,t)){var f=e.getItemVisual(u,"symbol")||"circle",g=h&&h.getSymbolType&&h.getSymbolType();if(!h||g&&g!==f)n.remove(h),(h=new i(e,u,s,l)).setPosition(p);else{h.updateData(e,u,s,l);var m={x:p[0],y:p[1]};a?h.attr(m):pb(h,m,r)}n.add(h),e.setItemGraphicEl(u,h)}else n.remove(h)})).remove((function(e){var t=o.getItemGraphicEl(e);t&&t.fadeOut((function(){n.remove(t)}),r)})).execute(),this._getSymbolPoint=c,this._data=e},e.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl((function(t,n){var r=e._getSymbolPoint(n);t.setPosition(r),t.markRedraw()}))},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=pL(e),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){function r(e){e.isGroup||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],n=hL(n);for(var o=e.start;o<e.end;o++){var i=t.getItemLayout(o);if(dL(t,i,o,n)){var a=new this._SymbolCtor(t,o,this._seriesScope);a.traverse(r),a.setPosition(i),this.group.add(a),t.setItemGraphicEl(o,a),this._progressiveEls.push(a)}}},e.prototype.eachRendered=function(e){nM(this._progressiveEls||this.group,e)},e.prototype.remove=function(e){var t=this.group,n=this._data;n&&e?n.eachItemGraphicEl((function(e){e.fadeOut((function(){t.remove(e)}),n.hostModel)})):t.removeAll()},e}();function gL(e,t,n){var r=e.getBaseAxis(),o=e.getOtherAxis(r),i=function(e,t){var n=0,r=e.scale.getExtent();"start"===t?n=r[0]:"end"===t?n=r[1]:Uu(t)&&!isNaN(t)?n=t:r[0]>0?n=r[0]:r[1]<0&&(n=r[1]);return n}(o,n),a=r.dim,s=o.dim,l=t.mapDimension(s),c=t.mapDimension(a),u="x"===s||"radius"===s?1:0,d=Eu(e.dimensions,(function(e){return t.mapDimension(e)})),h=!1,p=t.getCalculationInfo("stackResultDimension");return tL(t,d[0])&&(h=!0,d[0]=p),tL(t,d[1])&&(h=!0,d[1]=p),{dataDimsForPoint:d,valueStart:i,valueAxisDim:s,baseAxisDim:a,stacked:!!h,valueDim:l,baseDim:c,baseDataOffset:u,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function mL(e,t,n,r){var o=NaN;e.stacked&&(o=n.get(n.getCalculationInfo("stackedOverDimension"),r)),isNaN(o)&&(o=e.valueStart);var i=e.baseDataOffset,a=[];return a[i]=n.get(e.baseDim,r),a[1-i]=o,t.dataToPoint(a)}var vL="undefined"!==typeof Float32Array,yL=vL?Float32Array:Array;function xL(e){return Vu(e)?vL?new Float32Array(e):e:new yL(e)}var bL=Math.min,wL=Math.max;function SL(e,t){return isNaN(e)||isNaN(t)}function _L(e,t,n,r,o,i,a,s,l){for(var c,u,d,h,p,f,g=n,m=0;m<r;m++){var v=t[2*g],y=t[2*g+1];if(g>=o||g<0)break;if(SL(v,y)){if(l){g+=i;continue}break}if(g===n)e[i>0?"moveTo":"lineTo"](v,y),d=v,h=y;else{var x=v-c,b=y-u;if(x*x+b*b<.5){g+=i;continue}if(a>0){for(var w=g+i,S=t[2*w],_=t[2*w+1];S===v&&_===y&&m<r;)m++,g+=i,S=t[2*(w+=i)],_=t[2*w+1],x=(v=t[2*g])-c,b=(y=t[2*g+1])-u;var A=m+1;if(l)for(;SL(S,_)&&A<r;)A++,S=t[2*(w+=i)],_=t[2*w+1];var k=.5,C=0,M=0,I=void 0,T=void 0;if(A>=r||SL(S,_))p=v,f=y;else{C=S-c,M=_-u;var D=v-c,j=S-v,P=y-u,L=_-y,R=void 0,E=void 0;if("x"===s){var N=C>0?1:-1;p=v-N*(R=Math.abs(D))*a,f=y,I=v+N*(E=Math.abs(j))*a,T=y}else if("y"===s){var O=M>0?1:-1;p=v,f=y-O*(R=Math.abs(P))*a,I=v,T=y+O*(E=Math.abs(L))*a}else R=Math.sqrt(D*D+P*P),p=v-C*a*(1-(k=(E=Math.sqrt(j*j+L*L))/(E+R))),f=y-M*a*(1-k),T=y+M*a*k,I=bL(I=v+C*a*k,wL(S,v)),T=bL(T,wL(_,y)),I=wL(I,bL(S,v)),f=y-(M=(T=wL(T,bL(_,y)))-y)*R/E,p=bL(p=v-(C=I-v)*R/E,wL(c,v)),f=bL(f,wL(u,y)),I=v+(C=v-(p=wL(p,bL(c,v))))*E/R,T=y+(M=y-(f=wL(f,bL(u,y))))*E/R}e.bezierCurveTo(d,h,p,f,v,y),d=I,h=T}else e.lineTo(v,y)}c=v,u=y,g+=i}return m}var AL=function(){this.smooth=0,this.smoothConstraint=!0},kL=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polyline",n}return ru(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new AL},t.prototype.buildPath=function(e,t){var n=t.points,r=0,o=n.length/2;if(t.connectNulls){for(;o>0&&SL(n[2*o-2],n[2*o-1]);o--);for(;r<o&&SL(n[2*r],n[2*r+1]);r++);}for(;r<o;)r+=_L(e,n,r,o,o,1,t.smooth,t.smoothMonotone,t.connectNulls)+1},t.prototype.getPointOn=function(e,t){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n,r,o=this.path.data,i=ay.CMD,a="x"===t,s=[],l=0;l<o.length;){var c=void 0,u=void 0,d=void 0,h=void 0,p=void 0,f=void 0,g=void 0;switch(o[l++]){case i.M:n=o[l++],r=o[l++];break;case i.L:if(c=o[l++],u=o[l++],(g=a?(e-n)/(c-n):(e-r)/(u-r))<=1&&g>=0){var m=a?(u-r)*g+r:(c-n)*g+n;return a?[e,m]:[m,e]}n=c,r=u;break;case i.C:c=o[l++],u=o[l++],d=o[l++],h=o[l++],p=o[l++],f=o[l++];var v=a?xp(n,c,d,p,e,s):xp(r,u,h,f,e,s);if(v>0)for(var y=0;y<v;y++){var x=s[y];if(x<=1&&x>=0){m=a?vp(r,u,h,f,x):vp(n,c,d,p,x);return a?[e,m]:[m,e]}}n=p,r=f}}},t}(Ty),CL=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ru(t,e),t}(AL),ML=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polygon",n}return ru(t,e),t.prototype.getDefaultShape=function(){return new CL},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,o=0,i=n.length/2,a=t.smoothMonotone;if(t.connectNulls){for(;i>0&&SL(n[2*i-2],n[2*i-1]);i--);for(;o<i&&SL(n[2*o],n[2*o+1]);o++);}for(;o<i;){var s=_L(e,n,o,i,i,1,t.smooth,a,t.connectNulls);_L(e,r,o+s-1,s,i,-1,t.stackedOnSmooth,a,t.connectNulls),o+=s+1,e.closePath()}},t}(Ty);function IL(e,t,n,r,o){var i=e.getArea(),a=i.x,s=i.y,l=i.width,c=i.height,u=n.get(["lineStyle","width"])||2;a-=u/2,s-=u/2,l+=u,c+=u,l=Math.ceil(l),a!==Math.floor(a)&&(a=Math.floor(a),l++);var d=new Gy({shape:{x:a,y:s,width:l,height:c}});if(t){var h=e.getBaseAxis(),p=h.isHorizontal(),f=h.inverse;p?(f&&(d.shape.x+=l),d.shape.width=0):(f||(d.shape.y+=c),d.shape.height=0);var g=Wu(o)?function(e){o(e,d)}:null;fb(d,{shape:{width:l,height:c,x:a,y:s}},n,null,r,g)}return d}function TL(e,t,n){var r=e.getArea(),o=Kg(r.r0,1),i=Kg(r.r,1),a=new Gk({shape:{cx:Kg(e.cx,1),cy:Kg(e.cy,1),r0:o,r:i,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});t&&("angle"===e.getBaseAxis().dim?a.shape.endAngle=r.startAngle:a.shape.r=o,fb(a,{shape:{endAngle:r.endAngle,r:i}},n));return a}function DL(e,t,n,r,o){return e?"polar"===e.type?TL(e,t,n):"cartesian2d"===e.type?IL(e,t,n,r,o):null:null}function jL(e,t){return e.type===t}function PL(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}function LL(e){for(var t=1/0,n=1/0,r=-1/0,o=-1/0,i=0;i<e.length;){var a=e[i++],s=e[i++];isNaN(a)||(t=Math.min(a,t),r=Math.max(a,r)),isNaN(s)||(n=Math.min(s,n),o=Math.max(s,o))}return[[t,n],[r,o]]}function RL(e,t){var n=LL(e),r=n[0],o=n[1],i=LL(t),a=i[0],s=i[1];return Math.max(Math.abs(r[0]-a[0]),Math.abs(r[1]-a[1]),Math.abs(o[0]-s[0]),Math.abs(o[1]-s[1]))}function EL(e){return Uu(e)?e:e?.5:0}function NL(e,t,n,r){var o=t.getBaseAxis(),i="x"===o.dim||"radius"===o.dim?0:1,a=[],s=0,l=[],c=[],u=[],d=[];if(r){for(s=0;s<e.length;s+=2)isNaN(e[s])||isNaN(e[s+1])||d.push(e[s],e[s+1]);e=d}for(s=0;s<e.length-2;s+=2)switch(u[0]=e[s+2],u[1]=e[s+3],c[0]=e[s],c[1]=e[s+1],a.push(c[0],c[1]),n){case"end":l[i]=u[i],l[1-i]=c[1-i],a.push(l[0],l[1]);break;case"middle":var h=(c[i]+u[i])/2,p=[];l[i]=p[i]=h,l[1-i]=c[1-i],p[1-i]=u[1-i],a.push(l[0],l[1]),a.push(p[0],p[1]);break;default:l[i]=c[i],l[1-i]=u[1-i],a.push(l[0],l[1])}return a.push(e[s++],e[s++]),a}function OL(e,t,n){var r=e.getVisual("visualMeta");if(r&&r.length&&e.count()&&"cartesian2d"===t.type){for(var o,i,a=r.length-1;a>=0;a--){var s=e.getDimensionInfo(r[a].dimension);if("x"===(o=s&&s.coordDim)||"y"===o){i=r[a];break}}if(i){var l=t.getAxis(o),c=Eu(i.stops,(function(e){return{coord:l.toGlobalCoord(l.dataToCoord(e.value)),color:e.color}})),u=c.length,d=i.outerColors.slice();u&&c[0].coord>c[u-1].coord&&(c.reverse(),d.reverse());var h=function(e,t){var n,r,o=[],i=e.length;function a(e,t,n){var r=e.coord;return{coord:n,color:Jp((n-r)/(t.coord-r),[e.color,t.color])}}for(var s=0;s<i;s++){var l=e[s],c=l.coord;if(c<0)n=l;else{if(c>t){r?o.push(a(r,l,t)):n&&o.push(a(n,l,0),a(n,l,t));break}n&&(o.push(a(n,l,0)),n=null),o.push(l),r=l}}return o}(c,"x"===o?n.getWidth():n.getHeight()),p=h.length;if(!p&&u)return c[0].coord<0?d[1]?d[1]:c[u-1].color:d[0]?d[0]:c[0].color;var f=h[0].coord-10,g=h[p-1].coord+10,m=g-f;if(m<.001)return"transparent";Ru(h,(function(e){e.offset=(e.coord-f)/m})),h.push({offset:p?h[p-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:p?h[0].offset:.5,color:d[0]||"transparent"});var v=new mC(0,0,0,0,h,!0);return v[o]=f,v[o+"2"]=g,v}}}function zL(e,t,n){var r=e.get("showAllSymbol"),o="auto"===r;if(!r||o){var i=n.getAxesByScale("ordinal")[0];if(i&&(!o||!function(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var o=t.count(),i=Math.max(1,Math.round(o/5)),a=0;a<o;a+=i)if(1.5*uL.getSymbolSize(t,a)[e.isHorizontal()?1:0]>r)return!1;return!0}(i,t))){var a=t.mapDimension(i.dim),s={};return Ru(i.getViewLabels(),(function(e){var t=i.scale.getRawOrdinalNumber(e.tickValue);s[t]=1})),function(e){return!s.hasOwnProperty(t.get(a,e))}}}}function BL(e,t){return[e[2*t],e[2*t+1]]}function FL(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t<mx.length;t++)if(e.get([mx[t],"endLabel","show"]))return!0;return!1}function VL(e,t,n,r){if(jL(t,"cartesian2d")){var o=r.getModel("endLabel"),i=o.get("valueAnimation"),a=r.getData(),s={lastFrameIndex:0},l=FL(r)?function(n,r){e._endLabelOnDuring(n,r,a,s,i,o,t)}:null,c=t.getBaseAxis().isHorizontal(),u=IL(t,n,r,(function(){var t=e._endLabel;t&&n&&null!=s.originalX&&t.attr({x:s.originalX,y:s.originalY})}),l);if(!r.get("clip",!0)){var d=u.shape,h=Math.max(d.width,d.height);c?(d.y-=h,d.height+=2*h):(d.x-=h,d.width+=2*h)}return l&&l(1,u),u}return TL(t,n,r)}var WL=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ru(t,e),t.prototype.init=function(){var e=new Fg,t=new fL;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e},t.prototype.render=function(e,t,n){var r=this,o=e.coordinateSystem,i=this.group,a=e.getData(),s=e.getModel("lineStyle"),l=e.getModel("areaStyle"),c=a.getLayout("points")||[],u="polar"===o.type,d=this._coordSys,h=this._symbolDraw,p=this._polyline,f=this._polygon,g=this._lineGroup,m=!t.ssr&&e.get("animation"),v=!l.isEmpty(),y=l.get("origin"),x=gL(o,a,y),b=v&&function(e,t,n){if(!n.valueDim)return[];for(var r=t.count(),o=xL(2*r),i=0;i<r;i++){var a=mL(n,e,t,i);o[2*i]=a[0],o[2*i+1]=a[1]}return o}(o,a,x),w=e.get("showSymbol"),S=e.get("connectNulls"),_=w&&!u&&zL(e,a,o),A=this._data;A&&A.eachItemGraphicEl((function(e,t){e.__temp&&(i.remove(e),A.setItemGraphicEl(t,null))})),w||h.remove(),i.add(g);var k,C=!u&&e.get("step");o&&o.getArea&&e.get("clip",!0)&&(null!=(k=o.getArea()).width?(k.x-=.1,k.y-=.1,k.width+=.2,k.height+=.2):k.r0&&(k.r0-=.5,k.r+=.5)),this._clipShapeForSymbol=k;var M=OL(a,o,n)||a.getVisual("style")[a.getVisual("drawType")];if(p&&d.type===o.type&&C===this._step){v&&!f?f=this._newPolygon(c,b):f&&!v&&(g.remove(f),f=this._polygon=null),u||this._initOrUpdateEndLabel(e,o,Ww(M));var I=g.getClipPath();if(I)fb(I,{shape:VL(this,o,!1,e).shape},e);else g.setClipPath(VL(this,o,!0,e));w&&h.updateData(a,{isIgnore:_,clipShape:k,disableAnimation:!0,getSymbolPoint:function(e){return[c[2*e],c[2*e+1]]}}),PL(this._stackedOnPoints,b)&&PL(this._points,c)||(m?this._doUpdateAnimation(a,b,o,n,C,y,S):(C&&(c=NL(c,o,C,S),b&&(b=NL(b,o,C,S))),p.setShape({points:c}),f&&f.setShape({points:c,stackedOnPoints:b})))}else w&&h.updateData(a,{isIgnore:_,clipShape:k,disableAnimation:!0,getSymbolPoint:function(e){return[c[2*e],c[2*e+1]]}}),m&&this._initSymbolLabelAnimation(a,o,k),C&&(c=NL(c,o,C,S),b&&(b=NL(b,o,C,S))),p=this._newPolyline(c),v?f=this._newPolygon(c,b):f&&(g.remove(f),f=this._polygon=null),u||this._initOrUpdateEndLabel(e,o,Ww(M)),g.setClipPath(VL(this,o,!0,e));var T=e.getModel("emphasis"),D=T.get("focus"),j=T.get("blurScope"),P=T.get("disabled");(p.useStyle(Du(s.getLineStyle(),{fill:"none",stroke:M,lineJoin:"bevel"})),ib(p,e,"lineStyle"),p.style.lineWidth>0&&"bolder"===e.get(["emphasis","lineStyle","width"]))&&(p.getState("emphasis").style.lineWidth=+p.style.lineWidth+1);sx(p).seriesIndex=e.seriesIndex,tb(p,D,j,P);var L=EL(e.get("smooth")),R=e.get("smoothMonotone");if(p.setShape({smooth:L,smoothMonotone:R,connectNulls:S}),f){var E=a.getCalculationInfo("stackedOnSeries"),N=0;f.useStyle(Du(l.getAreaStyle(),{fill:M,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),E&&(N=EL(E.get("smooth"))),f.setShape({smooth:L,stackedOnSmooth:N,smoothMonotone:R,connectNulls:S}),ib(f,e,"areaStyle"),sx(f).seriesIndex=e.seriesIndex,tb(f,D,j,P)}var O=function(e){r._changePolyState(e)};a.eachItemGraphicEl((function(e){e&&(e.onHoverStateChange=O)})),this._polyline.onHoverStateChange=O,this._data=a,this._coordSys=o,this._stackedOnPoints=b,this._points=c,this._step=C,this._valueOrigin=y,e.get("triggerLineEvent")&&(this.packEventData(e,p),f&&this.packEventData(e,f))},t.prototype.packEventData=function(e,t){sx(t).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,t,n,r){var o=e.getData(),i=Dm(o,r);if(this._changePolyState("emphasis"),!(i instanceof Array)&&null!=i&&i>=0){var a=o.getLayout("points"),s=o.getItemGraphicEl(i);if(!s){var l=a[2*i],c=a[2*i+1];if(isNaN(l)||isNaN(c))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,c))return;var u=e.get("zlevel")||0,d=e.get("z")||0;(s=new uL(o,i)).x=l,s.y=c,s.setZ(u,d);var h=s.getSymbolPath().getTextContent();h&&(h.zlevel=u,h.z=d,h.z2=this._polyline.z2+1),s.__temp=!0,o.setItemGraphicEl(i,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else dM.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var o=e.getData(),i=Dm(o,r);if(this._changePolyState("normal"),null!=i&&i>=0){var a=o.getItemGraphicEl(i);a&&(a.__temp?(o.setItemGraphicEl(i,null),this.group.remove(a)):a.downplay())}else dM.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;Nx(this._polyline,e),t&&Nx(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new kL({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new ML({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,o,i=t.getBaseAxis(),a=i.inverse;"cartesian2d"===t.type?(r=i.isHorizontal(),o=!1):"polar"===t.type&&(r="angle"===i.dim,o=!0);var s=e.hostModel,l=s.get("animationDuration");Wu(l)&&(l=l(null));var c=s.get("animationDelay")||0,u=Wu(c)?c(null):c;e.eachItemGraphicEl((function(e,i){var s=e;if(s){var d=[e.x,e.y],h=void 0,p=void 0,f=void 0;if(n)if(o){var g=n,m=t.pointToCoord(d);r?(h=g.startAngle,p=g.endAngle,f=-m[1]/180*Math.PI):(h=g.r0,p=g.r,f=m[0])}else{var v=n;r?(h=v.x,p=v.x+v.width,f=e.x):(h=v.y+v.height,p=v.y,f=e.y)}var y=p===h?0:(f-h)/(p-h);a&&(y=1-y);var x=Wu(c)?c(i):l*y+u,b=s.getSymbolPath(),w=b.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:x}),w&&w.animateFrom({style:{opacity:0}},{duration:300,delay:x}),b.disableLabelAnimation=!0}}))},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel("endLabel");if(FL(e)){var o=e.getData(),i=this._polyline,a=o.getLayout("points");if(!a)return i.removeTextContent(),void(this._endLabel=null);var s=this._endLabel;s||((s=this._endLabel=new ax({z2:200})).ignoreClip=!0,i.setTextContent(this._endLabel),i.disableLabelAnimation=!0);var l=function(e){for(var t,n,r=e.length/2;r>0&&(t=e[2*r-2],n=e[2*r-1],isNaN(t)||isNaN(n));r--);return r-1}(a);l>=0&&(_b(i,Ab(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:l,defaultText:function(e,t,n){return null!=n?sL(o,n):aL(o,e)},enableTextSetter:!0},function(e,t){var n=t.getBaseAxis(),r=n.isHorizontal(),o=n.inverse,i=r?o?"right":"left":"center",a=r?"middle":o?"top":"bottom";return{normal:{align:e.get("align")||i,verticalAlign:e.get("verticalAlign")||a}}}(r,t)),i.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,t,n,r,o,i,a){var s=this._endLabel,l=this._polyline;if(s){e<1&&null==r.originalX&&(r.originalX=s.x,r.originalY=s.y);var c=n.getLayout("points"),u=n.hostModel,d=u.get("connectNulls"),h=i.get("precision"),p=i.get("distance")||0,f=a.getBaseAxis(),g=f.isHorizontal(),m=f.inverse,v=t.shape,y=m?g?v.x:v.y+v.height:g?v.x+v.width:v.y,x=(g?p:0)*(m?-1:1),b=(g?0:-p)*(m?-1:1),w=g?"x":"y",S=function(e,t,n){for(var r,o,i=e.length/2,a="x"===n?0:1,s=0,l=-1,c=0;c<i;c++)if(o=e[2*c+a],!isNaN(o)&&!isNaN(e[2*c+1-a]))if(0!==c){if(r<=t&&o>=t||r>=t&&o<=t){l=c;break}s=c,r=o}else r=o;return{range:[s,l],t:(t-r)/(o-r)}}(c,y,w),_=S.range,A=_[1]-_[0],k=void 0;if(A>=1){if(A>1&&!d){var C=BL(c,_[0]);s.attr({x:C[0]+x,y:C[1]+b}),o&&(k=u.getRawValue(_[0]))}else{(C=l.getPointOn(y,w))&&s.attr({x:C[0]+x,y:C[1]+b});var M=u.getRawValue(_[0]),I=u.getRawValue(_[1]);o&&(k=Fm(n,h,M,I,S.t))}r.lastFrameIndex=_[0]}else{var T=1===e||r.lastFrameIndex>0?_[0]:0;C=BL(c,T);o&&(k=u.getRawValue(T)),s.attr({x:C[0]+x,y:C[1]+b})}if(o){var D=Pb(s);"function"===typeof D.setLabelText&&D.setLabelText(k)}}},t.prototype._doUpdateAnimation=function(e,t,n,r,o,i,a){var s=this._polyline,l=this._polygon,c=e.hostModel,u=function(e,t,n,r,o,i,a,s){for(var l=function(e,t){var n=[];return t.diff(e).add((function(e){n.push({cmd:"+",idx:e})})).update((function(e,t){n.push({cmd:"=",idx:t,idx1:e})})).remove((function(e){n.push({cmd:"-",idx:e})})).execute(),n}(e,t),c=[],u=[],d=[],h=[],p=[],f=[],g=[],m=gL(o,t,a),v=e.getLayout("points")||[],y=t.getLayout("points")||[],x=0;x<l.length;x++){var b=l[x],w=!0,S=void 0,_=void 0;switch(b.cmd){case"=":S=2*b.idx,_=2*b.idx1;var A=v[S],k=v[S+1],C=y[_],M=y[_+1];(isNaN(A)||isNaN(k))&&(A=C,k=M),c.push(A,k),u.push(C,M),d.push(n[S],n[S+1]),h.push(r[_],r[_+1]),g.push(t.getRawIndex(b.idx1));break;case"+":var I=b.idx,T=m.dataDimsForPoint,D=o.dataToPoint([t.get(T[0],I),t.get(T[1],I)]);_=2*I,c.push(D[0],D[1]),u.push(y[_],y[_+1]);var j=mL(m,o,t,I);d.push(j[0],j[1]),h.push(r[_],r[_+1]),g.push(t.getRawIndex(I));break;case"-":w=!1}w&&(p.push(b),f.push(f.length))}f.sort((function(e,t){return g[e]-g[t]}));var P=c.length,L=xL(P),R=xL(P),E=xL(P),N=xL(P),O=[];for(x=0;x<f.length;x++){var z=f[x],B=2*x,F=2*z;L[B]=c[F],L[B+1]=c[F+1],R[B]=u[F],R[B+1]=u[F+1],E[B]=d[F],E[B+1]=d[F+1],N[B]=h[F],N[B+1]=h[F+1],O[x]=p[z]}return{current:L,next:R,stackedOnCurrent:E,stackedOnNext:N,status:O}}(this._data,e,this._stackedOnPoints,t,this._coordSys,0,this._valueOrigin),d=u.current,h=u.stackedOnCurrent,p=u.next,f=u.stackedOnNext;if(o&&(d=NL(u.current,n,o,a),h=NL(u.stackedOnCurrent,n,o,a),p=NL(u.next,n,o,a),f=NL(u.stackedOnNext,n,o,a)),RL(d,p)>3e3||l&&RL(h,f)>3e3)return s.stopAnimation(),s.setShape({points:p}),void(l&&(l.stopAnimation(),l.setShape({points:p,stackedOnPoints:f})));s.shape.__points=u.current,s.shape.points=d;var g={shape:{points:p}};u.current!==d&&(g.shape.__points=u.next),s.stopAnimation(),pb(s,g,c),l&&(l.setShape({points:d,stackedOnPoints:h}),l.stopAnimation(),pb(l,{shape:{stackedOnPoints:f}},c),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var m=[],v=u.status,y=0;y<v.length;y++){if("="===v[y].cmd){var x=e.getItemGraphicEl(v[y].idx1);x&&m.push({el:x,ptIdx:y})}}s.animators&&s.animators.length&&s.animators[0].during((function(){l&&l.dirtyShape();for(var e=s.shape.__points,t=0;t<m.length;t++){var n=m[t].el,r=2*m[t].ptIdx;n.x=e[r],n.y=e[r+1],n.markRedraw()}}))},t.prototype.remove=function(e){var t=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl((function(e,r){e.__temp&&(t.remove(e),n.setItemGraphicEl(r,null))})),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type="line",t}(dM);const HL=WL;function GL(e,t){return{seriesType:e,plan:nk(),reset:function(e){var n=e.getData(),r=e.coordinateSystem,o=e.pipelineContext,i=t||o.large;if(r){var a=Eu(r.dimensions,(function(e){return n.mapDimension(e)})).slice(0,2),s=a.length,l=n.getCalculationInfo("stackResultDimension");tL(n,a[0])&&(a[0]=l),tL(n,a[1])&&(a[1]=l);var c=n.getStore(),u=n.getDimensionIndex(a[0]),d=n.getDimensionIndex(a[1]);return s&&{progress:function(e,t){for(var n=e.end-e.start,o=i&&xL(n*s),a=[],l=[],h=e.start,p=0;h<e.end;h++){var f=void 0;if(1===s){var g=c.get(u,h);f=r.dataToPoint(g,null,l)}else a[0]=c.get(u,h),a[1]=c.get(d,h),f=r.dataToPoint(a,null,l);i?(o[p++]=f[0],o[p++]=f[1]):t.setItemLayout(h,f.slice())}i&&t.setLayout("points",o)}}}}}}var UL={average:function(e){for(var t=0,n=0,r=0;r<e.length;r++)isNaN(e[r])||(t+=e[r],n++);return 0===n?NaN:t/n},sum:function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n]||0;return t},max:function(e){for(var t=-1/0,n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n<e.length;n++)e[n]<t&&(t=e[n]);return isFinite(t)?t:NaN},minmax:function(e){for(var t=-1/0,n=-1/0,r=0;r<e.length;r++){var o=e[r],i=Math.abs(o);i>t&&(t=i,n=o)}return isFinite(n)?n:NaN},nearest:function(e){return e[0]}},XL=function(e){return Math.round(e.length/2)};function YL(e){return{seriesType:e,reset:function(e,t,n){var r=e.getData(),o=e.get("sampling"),i=e.coordinateSystem,a=r.count();if(a>10&&"cartesian2d"===i.type&&o){var s=i.getBaseAxis(),l=i.getOtherAxis(s),c=s.getExtent(),u=n.getDevicePixelRatio(),d=Math.abs(c[1]-c[0])*(u||1),h=Math.round(a/d);if(isFinite(h)&&h>1){"lttb"===o&&e.setData(r.lttbDownSample(r.mapDimension(l.dim),1/h));var p=void 0;Hu(o)?p=UL[o]:Wu(o)&&(p=o),p&&e.setData(r.downSample(r.mapDimension(l.dim),1/h,p,XL))}}}}}var qL="__ec_stack_";function ZL(e){return e.get("stack")||qL+e.seriesIndex}function KL(e){return e.dim+e.index}function $L(e,t){var n=[];return t.eachSeriesByType(e,(function(e){nR(e)&&n.push(e)})),n}function QL(e){var t=function(e){var t={};Ru(e,(function(e){var n=e.coordinateSystem.getBaseAxis();if("time"===n.type||"value"===n.type)for(var r=e.getData(),o=n.dim+"_"+n.index,i=r.getDimensionIndex(r.mapDimension(n.dim)),a=r.getStore(),s=0,l=a.count();s<l;++s){var c=a.get(i,s);t[o]?t[o].push(c):t[o]=[c]}}));var n={};for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];if(o){o.sort((function(e,t){return e-t}));for(var i=null,a=1;a<o.length;++a){var s=o[a]-o[a-1];s>0&&(i=null===i?s:Math.min(i,s))}n[r]=i}}return n}(e),n=[];return Ru(e,(function(e){var r,o=e.coordinateSystem.getBaseAxis(),i=o.getExtent();if("category"===o.type)r=o.getBandWidth();else if("value"===o.type||"time"===o.type){var a=o.dim+"_"+o.index,s=t[a],l=Math.abs(i[1]-i[0]),c=o.scale.getExtent(),u=Math.abs(c[1]-c[0]);r=s?l/u*s:l}else{var d=e.getData();r=Math.abs(i[1]-i[0])/d.count()}var h=Zg(e.get("barWidth"),r),p=Zg(e.get("barMaxWidth"),r),f=Zg(e.get("barMinWidth")||(rR(e)?.5:1),r),g=e.get("barGap"),m=e.get("barCategoryGap");n.push({bandWidth:r,barWidth:h,barMaxWidth:p,barMinWidth:f,barGap:g,barCategoryGap:m,axisKey:KL(o),stackId:ZL(e)})})),JL(n)}function JL(e){var t={};Ru(e,(function(e,n){var r=e.axisKey,o=e.bandWidth,i=t[r]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=i.stacks;t[r]=i;var s=e.stackId;a[s]||i.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=e.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(i.remainedWidth,l),i.remainedWidth-=l);var c=e.barMaxWidth;c&&(a[s].maxWidth=c);var u=e.barMinWidth;u&&(a[s].minWidth=u);var d=e.barGap;null!=d&&(i.gap=d);var h=e.barCategoryGap;null!=h&&(i.categoryGap=h)}));var n={};return Ru(t,(function(e,t){n[t]={};var r=e.stacks,o=e.bandWidth,i=e.categoryGap;if(null==i){var a=zu(r).length;i=Math.max(35-4*a,15)+"%"}var s=Zg(i,o),l=Zg(e.gap,1),c=e.remainedWidth,u=e.autoWidthCount,d=(c-s)/(u+(u-1)*l);d=Math.max(d,0),Ru(r,(function(e){var t=e.maxWidth,n=e.minWidth;if(e.width){r=e.width;t&&(r=Math.min(r,t)),n&&(r=Math.max(r,n)),e.width=r,c-=r+l*r,u--}else{var r=d;t&&t<r&&(r=Math.min(t,c)),n&&n>r&&(r=n),r!==d&&(e.width=r,c-=r+l*r,u--)}})),d=(c-s)/(u+(u-1)*l),d=Math.max(d,0);var h,p=0;Ru(r,(function(e,t){e.width||(e.width=d),h=e,p+=e.width*(1+l)})),h&&(p-=h.width*l);var f=-p/2;Ru(r,(function(e,r){n[t][r]=n[t][r]||{bandWidth:o,offset:f,width:e.width},f+=e.width*(1+l)}))})),n}function eR(e,t){var n=$L(e,t),r=QL(n);Ru(n,(function(e){var t=e.getData(),n=e.coordinateSystem.getBaseAxis(),o=ZL(e),i=r[KL(n)][o],a=i.offset,s=i.width;t.setLayout({bandWidth:i.bandWidth,offset:a,size:s})}))}function tR(e){return{seriesType:e,plan:nk(),reset:function(e){if(nR(e)){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),o=n.getOtherAxis(r),i=t.getDimensionIndex(t.mapDimension(o.dim)),a=t.getDimensionIndex(t.mapDimension(r.dim)),s=e.get("showBackground",!0),l=t.mapDimension(o.dim),c=t.getCalculationInfo("stackResultDimension"),u=tL(t,l)&&!!t.getCalculationInfo("stackedOnSeries"),d=o.isHorizontal(),h=function(e,t){var n=t.model.get("startValue");n||(n=0);return t.toGlobalCoord(t.dataToCoord("log"===t.type?n>0?n:1:n))}(0,o),p=rR(e),f=e.get("barMinHeight")||0,g=c&&t.getDimensionIndex(c),m=t.getLayout("size"),v=t.getLayout("offset");return{progress:function(e,t){for(var r,o=e.count,l=p&&xL(3*o),c=p&&s&&xL(3*o),y=p&&xL(o),x=n.master.getRect(),b=d?x.width:x.height,w=t.getStore(),S=0;null!=(r=e.next());){var _=w.get(u?g:i,r),A=w.get(a,r),k=h,C=void 0;u&&(C=+_-w.get(i,r));var M=void 0,I=void 0,T=void 0,D=void 0;if(d){var j=n.dataToPoint([_,A]);if(u)k=n.dataToPoint([C,A])[0];M=k,I=j[1]+v,T=j[0]-k,D=m,Math.abs(T)<f&&(T=(T<0?-1:1)*f)}else{j=n.dataToPoint([A,_]);if(u)k=n.dataToPoint([A,C])[1];M=j[0]+v,I=k,T=m,D=j[1]-k,Math.abs(D)<f&&(D=(D<=0?-1:1)*f)}p?(l[S]=M,l[S+1]=I,l[S+2]=d?T:D,c&&(c[S]=d?x.x:M,c[S+1]=d?I:x.y,c[S+2]=b),y[r]=r):t.setItemLayout(r,{x:M,y:I,width:T,height:D}),S+=3}p&&t.setLayout({largePoints:l,largeDataIndices:y,largeBackgroundPoints:c,valueAxisHorizontal:d})}}}}}}function nR(e){return e.coordinateSystem&&"cartesian2d"===e.coordinateSystem.type}function rR(e){return e.pipelineContext&&e.pipelineContext.large}var oR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.getInitialData=function(e,t){return rL(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,t,n){var r=this.coordinateSystem;if(r&&r.clampData){var o=r.clampData(e),i=r.dataToPoint(o);if(n)Ru(r.getAxes(),(function(e,n){if("category"===e.type&&null!=t){var r=e.getTicksCoords(),a=e.getTickModel().get("alignWithLabel"),s=o[n],l="x1"===t[n]||"y1"===t[n];if(l&&!a&&(s+=1),r.length<2)return;if(2===r.length)return void(i[n]=e.toGlobalCoord(e.getExtent()[l?1:0]));for(var c=void 0,u=void 0,d=1,h=0;h<r.length;h++){var p=r[h].coord,f=h===r.length-1?r[h-1].tickValue+d:r[h].tickValue;if(f===s){u=p;break}if(f<s)c=p;else if(null!=c&&f>s){u=(p+c)/2;break}1===h&&(d=f-r[0].tickValue)}null==u&&(c?c&&(u=r[r.length-1].coord):u=r[0].coord),i[n]=e.toGlobalCoord(u)}}));else{var a=this.getData(),s=a.getLayout("offset"),l=a.getLayout("size"),c=r.getBaseAxis().isHorizontal()?0:1;i[c]+=s+l/2}return i}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},t}(JA);JA.registerClass(oR);const iR=oR;const aR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.getInitialData=function(){return rL(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),t=this.get("largeThreshold");return t>e&&(e=t),e},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=Kb(iR.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),t}(iR);var sR=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},lR=function(e){function t(t){var n=e.call(this,t)||this;return n.type="sausage",n}return ru(t,e),t.prototype.getDefaultShape=function(){return new sR},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,o=Math.max(t.r0||0,0),i=Math.max(t.r,0),a=.5*(i-o),s=o+a,l=t.startAngle,c=t.endAngle,u=t.clockwise,d=2*Math.PI,h=u?c-l<d:l-c<d;h||(l=c-(u?d:-d));var p=Math.cos(l),f=Math.sin(l),g=Math.cos(c),m=Math.sin(c);h?(e.moveTo(p*o+n,f*o+r),e.arc(p*s+n,f*s+r,a,-Math.PI+l,l,!u)):e.moveTo(p*i+n,f*i+r),e.arc(n,r,i,l,c,!u),e.arc(g*s+n,m*s+r,a,c-2*Math.PI,c-Math.PI,!u),0!==o&&e.arc(n,r,o,c,l,u)},t}(Ty);const cR=lR;function uR(e,t,n){return t*Math.sin(e)*(n?-1:1)}function dR(e,t,n){return t*Math.cos(e)*(n?1:-1)}function hR(e,t,n){var r=e.get("borderRadius");if(null==r)return n?{cornerRadius:0}:null;Vu(r)||(r=[r,r,r,r]);var o=Math.abs(t.r||0-t.r0||0);return{cornerRadius:Eu(r,(function(e){return Cg(e,o)}))}}var pR=Math.max,fR=Math.min;var gR=function(e){function t(){var n=e.call(this)||this;return n.type=t.type,n._isFirstFrame=!0,n}return ru(t,e),t.prototype.render=function(e,t,n,r){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var o=e.get("coordinateSystem");("cartesian2d"===o||"polar"===o)&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n,r))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,t){this._progressiveEls=[],this._incrementalRenderLarge(e,t)},t.prototype.eachRendered=function(e){nM(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;null!=this._isLargeDraw&&t===this._isLargeDraw||(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e,t,n,r){var o,i=this.group,a=e.getData(),s=this._data,l=e.coordinateSystem,c=l.getBaseAxis();"cartesian2d"===l.type?o=c.isHorizontal():"polar"===l.type&&(o="angle"===c.dim);var u=e.isAnimationEnabled()?e:null,d=function(e,t){var n=e.get("realtimeSort",!0),r=t.getBaseAxis();0;if(n&&"category"===r.type&&"cartesian2d"===t.type)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}(e,l);d&&this._enableRealtimeSort(d,a,n);var h=e.get("clip",!0)||d,p=function(e,t){var n=e.getArea&&e.getArea();if(jL(e,"cartesian2d")){var r=e.getBaseAxis();if("category"!==r.type||!r.onBand){var o=t.getLayout("bandWidth");r.isHorizontal()?(n.x-=o,n.width+=2*o):(n.y-=o,n.height+=2*o)}}return n}(l,a);i.removeClipPath();var f=e.get("roundCap",!0),g=e.get("showBackground",!0),m=e.getModel("backgroundStyle"),v=m.get("borderRadius")||0,y=[],x=this._backgroundEls,b=r&&r.isInitSort,w=r&&"changeAxisOrder"===r.type;function S(e){var t=_R[l.type](a,e),n=function(e,t,n){var r="polar"===e.type?Gk:Gy;return new r({shape:DR(t,n,e),silent:!0,z2:0})}(l,o,t);return n.useStyle(m.getItemStyle()),"cartesian2d"===l.type?n.setShape("r",v):n.setShape("cornerRadius",v),y[e]=n,n}a.diff(s).add((function(t){var n=a.getItemModel(t),r=_R[l.type](a,t,n);if(g&&S(t),a.hasValue(t)&&SR[l.type](r)){var s=!1;h&&(s=mR[l.type](p,r));var m=vR[l.type](e,a,t,r,o,u,c.model,!1,f);d&&(m.forceLabelAnimation=!0),kR(m,a,t,n,r,e,o,"polar"===l.type),b?m.attr({shape:r}):d?yR(d,u,m,r,t,o,!1,!1):fb(m,{shape:r},e,t),a.setItemGraphicEl(t,m),i.add(m),m.ignore=s}})).update((function(t,n){var r=a.getItemModel(t),_=_R[l.type](a,t,r);if(g){var A=void 0;0===x.length?A=S(n):((A=x[n]).useStyle(m.getItemStyle()),"cartesian2d"===l.type?A.setShape("r",v):A.setShape("cornerRadius",v),y[t]=A);var k=_R[l.type](a,t);pb(A,{shape:DR(o,k,l)},u,t)}var C=s.getItemGraphicEl(n);if(a.hasValue(t)&&SR[l.type](_)){var M=!1;if(h&&(M=mR[l.type](p,_))&&i.remove(C),C?xb(C):C=vR[l.type](e,a,t,_,o,u,c.model,!!C,f),d&&(C.forceLabelAnimation=!0),w){var I=C.getTextContent();if(I){var T=Pb(I);null!=T.prevValue&&(T.prevValue=T.value)}}else kR(C,a,t,r,_,e,o,"polar"===l.type);b?C.attr({shape:_}):d?yR(d,u,C,_,t,o,!0,w):pb(C,{shape:_},e,t,null),a.setItemGraphicEl(t,C),C.ignore=M,i.add(C)}else i.remove(C)})).remove((function(t){var n=s.getItemGraphicEl(t);n&&yb(n,e,t)})).execute();var _=this._backgroundGroup||(this._backgroundGroup=new Fg);_.removeAll();for(var A=0;A<y.length;++A)_.add(y[A]);i.add(_),this._backgroundEls=y,this._data=a},t.prototype._renderLarge=function(e,t,n){this._clear(),IR(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),IR(t,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var t=e.get("clip",!0)&&DL(e.coordinateSystem,!1,e),n=this.group;t?n.setClipPath(t):n.removeClipPath()},t.prototype._enableRealtimeSort=function(e,t,n){var r=this;if(t.count()){var o=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(t,e,n),this._isFirstFrame=!1;else{var i=function(e){var n=t.getItemGraphicEl(e),r=n&&n.shape;return r&&Math.abs(o.isHorizontal()?r.height:r.width)||0};this._onRendered=function(){r._updateSortWithinSameData(t,i,o,n)},n.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(e,t,n){var r=[];return e.each(e.mapDimension(t.dim),(function(e,t){var o=n(t);o=null==o?NaN:o,r.push({dataIndex:t,mappedValue:o,ordinalNumber:e})})),r.sort((function(e,t){return t.mappedValue-e.mappedValue})),{ordinalNumbers:Eu(r,(function(e){return e.ordinalNumber}))}},t.prototype._isOrderChangedWithinSameData=function(e,t,n){for(var r=n.scale,o=e.mapDimension(n.dim),i=Number.MAX_VALUE,a=0,s=r.getOrdinalMeta().categories.length;a<s;++a){var l=e.rawIndexOf(o,r.getRawOrdinalNumber(a)),c=l<0?Number.MIN_VALUE:t(e.indexOfRawIndex(l));if(c>i)return!0;i=c}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),o=Math.max(0,r[0]),i=Math.min(r[1],n.getOrdinalMeta().categories.length-1);o<=i;++o)if(e.ordinalNumbers[o]!==n.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var o=this._dataSort(e,n,t);this._isOrderDifferentInView(o,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,o=this._dataSort(e,r,(function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)}));n.dispatchAction({type:"changeAxisOrder",componentType:r.dim+"Axis",isInitSort:!0,axisId:r.index,sortInfo:o})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(t){yb(t,e,sx(t).dataIndex)}))):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(dM),mR={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var o=e.x+e.width,i=e.y+e.height,a=pR(t.x,e.x),s=fR(t.x+t.width,o),l=pR(t.y,e.y),c=fR(t.y+t.height,i),u=s<a,d=c<l;return t.x=u&&a>o?s:a,t.y=d&&l>i?c:l,t.width=u?0:s-a,t.height=d?0:c-l,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),u||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var o=fR(t.r,e.r),i=pR(t.r0,e.r0);t.r=o,t.r0=i;var a=o-i<0;if(n<0){r=t.r;t.r=t.r0,t.r0=r}return a}},vR={cartesian2d:function(e,t,n,r,o,i,a,s,l){var c=new Gy({shape:Tu({},r),z2:1});(c.__dataIndex=n,c.name="item",i)&&(c.shape[o?"height":"width"]=0);return c},polar:function(e,t,n,r,o,i,a,s,l){var c=!o&&l?cR:Gk,u=new c({shape:r,z2:1});u.name="item";var d=AR(o);if(u.calculateTextPosition=function(e,t){var n=(t=t||{}).isRoundCap;return function(t,r,o){var i=r.position;if(!i||i instanceof Array)return Mg(t,r,o);var a=e(i),s=null!=r.distance?r.distance:5,l=this.shape,c=l.cx,u=l.cy,d=l.r,h=l.r0,p=(d+h)/2,f=l.startAngle,g=l.endAngle,m=(f+g)/2,v=n?Math.abs(d-h)/2:0,y=Math.cos,x=Math.sin,b=c+d*y(f),w=u+d*x(f),S="left",_="top";switch(a){case"startArc":b=c+(h-s)*y(m),w=u+(h-s)*x(m),S="center",_="top";break;case"insideStartArc":b=c+(h+s)*y(m),w=u+(h+s)*x(m),S="center",_="bottom";break;case"startAngle":b=c+p*y(f)+uR(f,s+v,!1),w=u+p*x(f)+dR(f,s+v,!1),S="right",_="middle";break;case"insideStartAngle":b=c+p*y(f)+uR(f,-s+v,!1),w=u+p*x(f)+dR(f,-s+v,!1),S="left",_="middle";break;case"middle":b=c+p*y(m),w=u+p*x(m),S="center",_="middle";break;case"endArc":b=c+(d+s)*y(m),w=u+(d+s)*x(m),S="center",_="bottom";break;case"insideEndArc":b=c+(d-s)*y(m),w=u+(d-s)*x(m),S="center",_="top";break;case"endAngle":b=c+p*y(g)+uR(g,s+v,!0),w=u+p*x(g)+dR(g,s+v,!0),S="left",_="middle";break;case"insideEndAngle":b=c+p*y(g)+uR(g,-s+v,!0),w=u+p*x(g)+dR(g,-s+v,!0),S="right",_="middle";break;default:return Mg(t,r,o)}return(t=t||{}).x=b,t.y=w,t.align=S,t.verticalAlign=_,t}}(d,{isRoundCap:c===cR}),i){var h=o?"r":"endAngle",p={};u.shape[h]=o?r.r0:r.startAngle,p[h]=r[h],(s?pb:fb)(u,{shape:p},i)}return u}};function yR(e,t,n,r,o,i,a,s){var l,c;i?(c={x:r.x,width:r.width},l={y:r.y,height:r.height}):(c={y:r.y,height:r.height},l={x:r.x,width:r.width}),s||(a?pb:fb)(n,{shape:l},t,o,null),(a?pb:fb)(n,{shape:c},t?e.baseAxis.model:null,o)}function xR(e,t){for(var n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return!0;return!1}var bR=["x","y","width","height"],wR=["cx","cy","r","startAngle","endAngle"],SR={cartesian2d:function(e){return!xR(e,bR)},polar:function(e){return!xR(e,wR)}},_R={cartesian2d:function(e,t,n){var r=e.getItemLayout(t),o=n?function(e,t){var n=e.get(["itemStyle","borderColor"]);if(!n||"none"===n)return 0;var r=e.get(["itemStyle","borderWidth"])||0,o=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),i=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,o,i)}(n,r):0,i=r.width>0?1:-1,a=r.height>0?1:-1;return{x:r.x+i*o/2,y:r.y+a*o/2,width:r.width-i*o,height:r.height-a*o}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function AR(e){return function(e){var t=e?"Arc":"Angle";return function(e){switch(e){case"start":case"insideStart":case"end":case"insideEnd":return e+t;default:return e}}}(e)}function kR(e,t,n,r,o,i,a,s){var l=t.getItemVisual(n,"style");if(s){if(!i.get("roundCap")){var c=e.shape;Tu(c,hR(r.getModel("itemStyle"),c,!0)),e.setShape(c)}}else{var u=r.get(["itemStyle","borderRadius"])||0;e.setShape("r",u)}e.useStyle(l);var d=r.getShallow("cursor");d&&e.attr("cursor",d);var h=s?a?o.r>=o.r0?"endArc":"startArc":o.endAngle>=o.startAngle?"endAngle":"startAngle":a?o.height>=0?"bottom":"top":o.width>=0?"right":"left",p=Ab(r);_b(e,p,{labelFetcher:i,labelDataIndex:n,defaultText:aL(i.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:h});var f=e.getTextContent();if(s&&f){var g=r.get(["label","position"]);e.textConfig.inside="middle"===g||null,function(e,t,n,r){if(Uu(r))e.setTextConfig({rotation:r});else if(Vu(t))e.setTextConfig({rotation:0});else{var o,i=e.shape,a=i.clockwise?i.startAngle:i.endAngle,s=i.clockwise?i.endAngle:i.startAngle,l=(a+s)/2,c=n(t);switch(c){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":o=l;break;case"startAngle":case"insideStartAngle":o=a;break;case"endAngle":case"insideEndAngle":o=s;break;default:return void e.setTextConfig({rotation:0})}var u=1.5*Math.PI-o;"middle"===c&&u>Math.PI/2&&u<1.5*Math.PI&&(u-=Math.PI),e.setTextConfig({rotation:u})}}(e,"outside"===g?h:g,AR(a),r.get(["label","rotate"]))}Lb(f,p,i.getRawValue(n),(function(e){return sL(t,e)}));var m=r.getModel(["emphasis"]);tb(e,m.get("focus"),m.get("blurScope"),m.get("disabled")),ib(e,r),function(e){return null!=e.startAngle&&null!=e.endAngle&&e.startAngle===e.endAngle}(o)&&(e.style.fill="none",e.style.stroke="none",Ru(e.states,(function(e){e.style&&(e.style.fill=e.style.stroke="none")})))}var CR=function(){},MR=function(e){function t(t){var n=e.call(this,t)||this;return n.type="largeBar",n}return ru(t,e),t.prototype.getDefaultShape=function(){return new CR},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,o=1-this.baseDimIdx,i=[],a=[],s=this.barWidth,l=0;l<n.length;l+=3)a[r]=s,a[o]=n[l+2],i[r]=n[l+r],i[o]=n[l+o],e.rect(i[0],i[1],a[0],a[1])},t}(Ty);function IR(e,t,n,r){var o=e.getData(),i=o.getLayout("valueAxisHorizontal")?1:0,a=o.getLayout("largeDataIndices"),s=o.getLayout("size"),l=e.getModel("backgroundStyle"),c=o.getLayout("largeBackgroundPoints");if(c){var u=new MR({shape:{points:c},incremental:!!r,silent:!0,z2:0});u.baseDimIdx=i,u.largeDataIndices=a,u.barWidth=s,u.useStyle(l.getItemStyle()),t.add(u),n&&n.push(u)}var d=new MR({shape:{points:o.getLayout("largePoints")},incremental:!!r,ignoreCoarsePointer:!0,z2:1});d.baseDimIdx=i,d.largeDataIndices=a,d.barWidth=s,t.add(d),d.useStyle(o.getVisual("style")),sx(d).seriesIndex=e.seriesIndex,e.get("silent")||(d.on("mousedown",TR),d.on("mousemove",TR)),n&&n.push(d)}var TR=gM((function(e){var t=function(e,t,n){for(var r=e.baseDimIdx,o=1-r,i=e.shape.points,a=e.largeDataIndices,s=[],l=[],c=e.barWidth,u=0,d=i.length/3;u<d;u++){var h=3*u;if(l[r]=c,l[o]=i[h+2],s[r]=i[h+r],s[o]=i[h+o],l[o]<0&&(s[o]+=l[o],l[o]=-l[o]),t>=s[0]&&t<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return a[u]}return-1}(this,e.offsetX,e.offsetY);sx(this).dataIndex=t>=0?t:null}),30,!1);function DR(e,t,n){if(jL(n,"cartesian2d")){var r=t,o=n.getArea();return{x:e?r.x:o.x,y:e?o.y:r.y,width:e?r.width:o.width,height:e?o.height:r.height}}var i=t;return{cx:(o=n.getArea()).cx,cy:o.cy,r0:e?o.r0:i.r0,r:e?o.r:i.r,startAngle:e?i.startAngle:0,endAngle:e?i.endAngle:2*Math.PI}}const jR=gR;var PR=2*Math.PI,LR=Math.PI/180;function RR(e,t){return Zw(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function ER(e,t){var n=RR(e,t),r=e.get("center"),o=e.get("radius");Vu(o)||(o=[0,o]);var i,a,s=Zg(n.width,t.getWidth()),l=Zg(n.height,t.getHeight()),c=Math.min(s,l),u=Zg(o[0],c/2),d=Zg(o[1],c/2),h=e.coordinateSystem;if(h){var p=h.dataToPoint(r);i=p[0]||0,a=p[1]||0}else Vu(r)||(r=[r,r]),i=Zg(r[0],s)+n.x,a=Zg(r[1],l)+n.y;return{cx:i,cy:a,r0:u,r:d}}function NR(e,t,n){t.eachSeriesByType(e,(function(e){var t=e.getData(),r=t.mapDimension("value"),o=RR(e,n),i=ER(e,n),a=i.cx,s=i.cy,l=i.r,c=i.r0,u=-e.get("startAngle")*LR,d=e.get("endAngle"),h=e.get("padAngle")*LR;d="auto"===d?u-PR:-d*LR;var p=e.get("minAngle")*LR+h,f=0;t.each(r,(function(e){!isNaN(e)&&f++}));var g=t.getSum(r),m=Math.PI/(g||f)*2,v=e.get("clockwise"),y=e.get("roseType"),x=e.get("stillShowZeroSum"),b=t.getDataExtent(r);b[0]=0;var w=v?1:-1,S=[u,d],_=w*h/2;oy(S,!v),u=S[0],d=S[1];var A=OR(e);A.startAngle=u,A.endAngle=d,A.clockwise=v;var k=Math.abs(d-u),C=k,M=0,I=u;if(t.setLayout({viewRect:o,r:l}),t.each(r,(function(e,n){var r;if(isNaN(e))t.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:v,cx:a,cy:s,r0:c,r:y?NaN:l});else{(r="area"!==y?0===g&&x?m:e*m:k/f)<p?(r=p,C-=p):M+=e;var o=I+w*r,i=0,u=0;h>r?u=i=I+w*r/2:(i=I+_,u=o-_),t.setItemLayout(n,{angle:r,startAngle:i,endAngle:u,clockwise:v,cx:a,cy:s,r0:c,r:y?qg(e,b,[c,l]):l}),I=o}})),C<PR&&f)if(C<=.001){var T=k/f;t.each(r,(function(e,n){if(!isNaN(e)){var r=t.getItemLayout(n);r.angle=T;var o=0,i=0;T<h?i=o=u+w*(n+.5)*T:(o=u+w*n*T+_,i=u+w*(n+1)*T-_),r.startAngle=o,r.endAngle=i}}))}else m=C/M,I=u,t.each(r,(function(e,n){if(!isNaN(e)){var r=t.getItemLayout(n),o=r.angle===p?p:e*m,i=0,a=0;o<h?a=i=I+w*o/2:(i=I+_,a=I+w*o-_),r.startAngle=i,r.endAngle=a,I+=w*o}}))}))}var OR=jm();function zR(e){return{seriesType:e,reset:function(e,t){var n=t.findComponents({mainType:"legend"});if(n&&n.length){var r=e.getData();r.filterSelf((function(e){for(var t=r.getName(e),o=0;o<n.length;o++)if(!n[o].isSelected(t))return!1;return!0}))}}}}var BR=Math.PI/180;function FR(e,t,n,r,o,i,a,s,l,c){if(!(e.length<2)){for(var u=e.length,d=0;d<u;d++)if("outer"===e[d].position&&"labelLine"===e[d].labelAlignTo){var h=e[d].label.x-c;e[d].linePoints[1][0]+=h,e[d].label.x=c}ND(e,l,l+a)&&function(e){for(var i={list:[],maxY:0},a={list:[],maxY:0},s=0;s<e.length;s++)if("none"===e[s].labelAlignTo){var l=e[s],c=l.label.y>n?a:i,u=Math.abs(l.label.y-n);if(u>=c.maxY){var d=l.label.x-t-l.len2*o,h=r+l.len,f=Math.abs(d)<h?Math.sqrt(u*u/(1-d*d/h/h)):h;c.rB=f,c.maxY=u}c.list.push(l)}p(i),p(a)}(e)}function p(e){for(var i=e.rB,a=i*i,s=0;s<e.list.length;s++){var l=e.list[s],c=Math.abs(l.label.y-n),u=r+l.len,d=u*u,h=Math.sqrt((1-Math.abs(c*c/a))*d),p=t+(h+l.len2)*o,f=p-l.label.x;VR(l,l.targetTextWidth-f*o,!0),l.label.x=p}}}function VR(e,t,n){if(void 0===n&&(n=!1),null==e.labelStyleWidth){var r=e.label,o=r.style,i=e.rect,a=o.backgroundColor,s=o.padding,l=s?s[1]+s[3]:0,c=o.overflow,u=i.width+(a?0:l);if(t<u||n){var d=i.height;if(c&&c.match("break")){r.setStyle("backgroundColor",null),r.setStyle("width",t-l);var h=r.getBoundingRect();r.setStyle("width",Math.ceil(h.width)),r.setStyle("backgroundColor",a)}else{var p=t-l,f=t<u?p:n?p>e.unconstrainedWidth?null:p:null;r.setStyle("width",f)}var g=r.getBoundingRect();i.width=g.width;var m=(r.style.margin||0)+2.1;i.height=g.height+m,i.y-=(i.height-d)/2}}}function WR(e){return"center"===e.position}function HR(e){var t,n,r=e.getData(),o=[],i=!1,a=(e.get("minShowLabelAngle")||0)*BR,s=r.getLayout("viewRect"),l=r.getLayout("r"),c=s.width,u=s.x,d=s.y,h=s.height;function p(e){e.ignore=!0}r.each((function(e){var s=r.getItemGraphicEl(e),d=s.shape,h=s.getTextContent(),f=s.getTextGuideLine(),g=r.getItemModel(e),m=g.getModel("label"),v=m.get("position")||g.get(["emphasis","label","position"]),y=m.get("distanceToLabelLine"),x=m.get("alignTo"),b=Zg(m.get("edgeDistance"),c),w=m.get("bleedMargin"),S=g.getModel("labelLine"),_=S.get("length");_=Zg(_,c);var A=S.get("length2");if(A=Zg(A,c),Math.abs(d.endAngle-d.startAngle)<a)return Ru(h.states,p),h.ignore=!0,void(f&&(Ru(f.states,p),f.ignore=!0));if(function(e){if(!e.ignore)return!0;for(var t in e.states)if(!1===e.states[t].ignore)return!0;return!1}(h)){var k,C,M,I,T=(d.startAngle+d.endAngle)/2,D=Math.cos(T),j=Math.sin(T);t=d.cx,n=d.cy;var P="inside"===v||"inner"===v;if("center"===v)k=d.cx,C=d.cy,I="center";else{var L=(P?(d.r+d.r0)/2*D:d.r*D)+t,R=(P?(d.r+d.r0)/2*j:d.r*j)+n;if(k=L+3*D,C=R+3*j,!P){var E=L+D*(_+l-d.r),N=R+j*(_+l-d.r),O=E+(D<0?-1:1)*A;k="edge"===x?D<0?u+b:u+c-b:O+(D<0?-y:y),C=N,M=[[L,R],[E,N],[O,N]]}I=P?"center":"edge"===x?D>0?"right":"left":D>0?"left":"right"}var z=Math.PI,B=0,F=m.get("rotate");if(Uu(F))B=F*(z/180);else if("center"===v)B=0;else if("radial"===F||!0===F){B=D<0?-T+z:-T}else if("tangential"===F&&"outside"!==v&&"outer"!==v){var V=Math.atan2(D,j);V<0&&(V=2*z+V),j>0&&(V=z+V),B=V-z}if(i=!!B,h.x=k,h.y=C,h.rotation=B,h.setStyle({verticalAlign:"middle"}),P){h.setStyle({align:I});var W=h.states.select;W&&(W.x+=h.x,W.y+=h.y)}else{var H=h.getBoundingRect().clone();H.applyTransform(h.getComputedTransform());var G=(h.style.margin||0)+2.1;H.y-=G/2,H.height+=G,o.push({label:h,labelLine:f,position:v,len:_,len2:A,minTurnAngle:S.get("minTurnAngle"),maxSurfaceAngle:S.get("maxSurfaceAngle"),surfaceNormal:new bh(D,j),linePoints:M,textAlign:I,labelDistance:y,labelAlignTo:x,edgeDistance:b,bleedMargin:w,rect:H,unconstrainedWidth:H.width,labelStyleWidth:h.style.width})}s.setTextConfig({inside:P})}})),!i&&e.get("avoidLabelOverlap")&&function(e,t,n,r,o,i,a,s){for(var l=[],c=[],u=Number.MAX_VALUE,d=-Number.MAX_VALUE,h=0;h<e.length;h++){var p=e[h].label;WR(e[h])||(p.x<t?(u=Math.min(u,p.x),l.push(e[h])):(d=Math.max(d,p.x),c.push(e[h])))}for(h=0;h<e.length;h++)if(!WR(m=e[h])&&m.linePoints){if(null!=m.labelStyleWidth)continue;p=m.label;var f=m.linePoints,g=void 0;g="edge"===m.labelAlignTo?p.x<t?f[2][0]-m.labelDistance-a-m.edgeDistance:a+o-m.edgeDistance-f[2][0]-m.labelDistance:"labelLine"===m.labelAlignTo?p.x<t?u-a-m.bleedMargin:a+o-d-m.bleedMargin:p.x<t?p.x-a-m.bleedMargin:a+o-p.x-m.bleedMargin,m.targetTextWidth=g,VR(m,g)}for(FR(c,t,n,r,1,0,i,0,s,d),FR(l,t,n,r,-1,0,i,0,s,u),h=0;h<e.length;h++){var m;if(!WR(m=e[h])&&m.linePoints){p=m.label,f=m.linePoints;var v="edge"===m.labelAlignTo,y=p.style.padding,x=y?y[1]+y[3]:0,b=p.style.backgroundColor?0:x,w=m.rect.width+b,S=f[1][0]-f[2][0];v?p.x<t?f[2][0]=a+m.edgeDistance+w+m.labelDistance:f[2][0]=a+o-m.edgeDistance-w-m.labelDistance:(p.x<t?f[2][0]=p.x+m.labelDistance:f[2][0]=p.x-m.labelDistance,f[1][0]=f[2][0]+S),f[1][1]=f[2][1]=p.y}}}(o,t,n,l,c,h,u,d);for(var f=0;f<o.length;f++){var g=o[f],m=g.label,v=g.labelLine,y=isNaN(m.x)||isNaN(m.y);if(m){m.setStyle({align:g.textAlign}),y&&(Ru(m.states,p),m.ignore=!0);var x=m.states.select;x&&(x.x+=m.x,x.y+=m.y)}if(v){var b=g.linePoints;y||!b?(Ru(v.states,p),v.ignore=!0):(ID(b,g.minTurnAngle),TD(b,g.surfaceNormal,g.maxSurfaceAngle),v.setShape({points:b}),m.__hostTarget.textGuideLineConfig={anchor:new bh(b[0][0],b[0][1])})}}}var GR=function(e){function t(t,n,r){var o=e.call(this)||this;o.z2=2;var i=new ax;return o.setTextContent(i),o.updateData(t,n,r,!0),o}return ru(t,e),t.prototype.updateData=function(e,t,n,r){var o=this,i=e.hostModel,a=e.getItemModel(t),s=a.getModel("emphasis"),l=e.getItemLayout(t),c=Tu(hR(a.getModel("itemStyle"),l,!0),l);if(isNaN(c.startAngle))o.setShape(c);else{if(r){o.setShape(c);var u=i.getShallow("animationType");i.ecModel.ssr?(fb(o,{scaleX:0,scaleY:0},i,{dataIndex:t,isFrom:!0}),o.originX=c.cx,o.originY=c.cy):"scale"===u?(o.shape.r=l.r0,fb(o,{shape:{r:l.r}},i,t)):null!=n?(o.setShape({startAngle:n,endAngle:n}),fb(o,{shape:{startAngle:l.startAngle,endAngle:l.endAngle}},i,t)):(o.shape.endAngle=l.startAngle,pb(o,{shape:{endAngle:l.endAngle}},i,t))}else xb(o),pb(o,{shape:c},i,t);o.useStyle(e.getItemVisual(t,"style")),ib(o,a);var d=(l.startAngle+l.endAngle)/2,h=i.get("selectedOffset"),p=Math.cos(d)*h,f=Math.sin(d)*h,g=a.getShallow("cursor");g&&o.attr("cursor",g),this._updateLabel(i,e,t),o.ensureState("emphasis").shape=Tu({r:l.r+(s.get("scale")&&s.get("scaleSize")||0)},hR(s.getModel("itemStyle"),l)),Tu(o.ensureState("select"),{x:p,y:f,shape:hR(a.getModel(["select","itemStyle"]),l)}),Tu(o.ensureState("blur"),{shape:hR(a.getModel(["blur","itemStyle"]),l)});var m=o.getTextGuideLine(),v=o.getTextContent();m&&Tu(m.ensureState("select"),{x:p,y:f}),Tu(v.ensureState("select"),{x:p,y:f}),tb(this,s.get("focus"),s.get("blurScope"),s.get("disabled"))}},t.prototype._updateLabel=function(e,t,n){var r=this,o=t.getItemModel(n),i=o.getModel("labelLine"),a=t.getItemVisual(n,"style"),s=a&&a.fill,l=a&&a.opacity;_b(r,Ab(o),{labelFetcher:t.hostModel,labelDataIndex:n,inheritColor:s,defaultOpacity:l,defaultText:e.getFormattedLabel(n,"normal")||t.getName(n)});var c=r.getTextContent();r.setTextConfig({position:null,rotation:null}),c.attr({z2:10});var u=e.get(["label","position"]);if("outside"!==u&&"outer"!==u)r.removeTextGuideLine();else{var d=this.getTextGuideLine();d||(d=new eC,this.setTextGuideLine(d)),PD(this,LD(o),{stroke:s,opacity:ed(i.get(["lineStyle","opacity"]),l,1)})}},t}(Gk);const UR=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ignoreLabelLineUpdate=!0,t}return ru(t,e),t.prototype.render=function(e,t,n,r){var o,i=e.getData(),a=this._data,s=this.group;if(!a&&i.count()>0){for(var l=i.getItemLayout(0),c=1;isNaN(l&&l.startAngle)&&c<i.count();++c)l=i.getItemLayout(c);l&&(o=l.startAngle)}if(this._emptyCircleSector&&s.remove(this._emptyCircleSector),0===i.count()&&e.get("showEmptyCircle")){var u=OR(e),d=new Gk({shape:Tu(ER(e,n),u)});d.useStyle(e.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=d,s.add(d)}i.diff(a).add((function(e){var t=new GR(i,e,o);i.setItemGraphicEl(e,t),s.add(t)})).update((function(e,t){var n=a.getItemGraphicEl(t);n.updateData(i,e,o),n.off("click"),s.add(n),i.setItemGraphicEl(e,n)})).remove((function(t){yb(a.getItemGraphicEl(t),e,t)})).execute(),HR(e),"expansion"!==e.get("animationTypeUpdate")&&(this._data=i)},t.prototype.dispose=function(){},t.prototype.containPoint=function(e,t){var n=t.getData().getItemLayout(0);if(n){var r=e[0]-n.cx,o=e[1]-n.cy,i=Math.sqrt(r*r+o*o);return i<=n.r&&i>=n.r0}},t.type="pie",t}(dM);function XR(e,t,n){t=Vu(t)&&{coordDimensions:t}||Tu({encodeDefine:e.getEncode()},t);var r=e.getSource(),o=ZP(r,t).dimensions,i=new qP(o,e);return i.initData(r,n),i}var YR=function(){function e(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return e.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},e.prototype.containName=function(e){return this._getRawData().indexOfName(e)>=0},e.prototype.indexOfName=function(e){return this._getDataWithEncodedVisual().indexOfName(e)},e.prototype.getItemVisual=function(e,t){return this._getDataWithEncodedVisual().getItemVisual(e,t)},e}();const qR=YR;var ZR=jm();const KR=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ru(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new qR(Bu(this.getData,this),Bu(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return XR(this,{coordDimensions:["value"],encodeDefaulter:Fu(xS,this)})},t.prototype.getDataParams=function(t){var n=this.getData(),r=ZR(n),o=r.seats;if(!o){var i=[];n.each(n.mapDimension("value"),(function(e){i.push(e)})),o=r.seats=em(i,n.hostModel.get("percentPrecision"))}var a=e.prototype.getDataParams.call(this,t);return a.percent=o[t]||0,a.$vars.push("percent"),a},t.prototype._defaultLabelLine=function(e){bm(e,"labelLine",["show"]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.type="series.pie",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,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%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,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"},t}(JA);const $R=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return ru(t,e),t.prototype.getInitialData=function(e,t){return rL(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var e=this.option.progressive;return null==e?this.option.large?5e3:this.get("progressive"):e},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?1e4:this.get("progressiveThreshold"):e},t.prototype.brushSelector=function(e,t,n){return n.point(t.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},t}(JA);var QR=function(){},JR=function(e){function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return ru(t,e),t.prototype.getDefaultShape=function(){return new QR},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(e,t){var n,r=t.points,o=t.size,i=this.symbolProxy,a=i.shape,s=e.getContext?e.getContext():e,l=s&&o[0]<4,c=this.softClipShape;if(l)this._ctx=s;else{for(this._ctx=null,n=this._off;n<r.length;){var u=r[n++],d=r[n++];isNaN(u)||isNaN(d)||(c&&!c.contain(u,d)||(a.x=u-o[0]/2,a.y=d-o[1]/2,a.width=o[0],a.height=o[1],i.buildPath(e,a,!0)))}this.incremental&&(this._off=n,this.notClear=!0)}},t.prototype.afterBrush=function(){var e,t=this.shape,n=t.points,r=t.size,o=this._ctx,i=this.softClipShape;if(o){for(e=this._off;e<n.length;){var a=n[e++],s=n[e++];isNaN(a)||isNaN(s)||(i&&!i.contain(a,s)||o.fillRect(a-r[0]/2,s-r[1]/2,r[0],r[1]))}this.incremental&&(this._off=e,this.notClear=!0)}},t.prototype.findDataIndex=function(e,t){for(var n=this.shape,r=n.points,o=n.size,i=Math.max(o[0],4),a=Math.max(o[1],4),s=r.length/2-1;s>=0;s--){var l=2*s,c=r[l]-i/2,u=r[l+1]-a/2;if(e>=c&&t>=u&&e<=c+i&&t<=u+a)return s}return-1},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect();return e=n[0],t=n[1],r.contain(e,t)?(this.hoverDataIdx=this.findDataIndex(e,t))>=0:(this.hoverDataIdx=-1,!1)},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape,n=t.points,r=t.size,o=r[0],i=r[1],a=1/0,s=1/0,l=-1/0,c=-1/0,u=0;u<n.length;){var d=n[u++],h=n[u++];a=Math.min(d,a),l=Math.max(d,l),s=Math.min(h,s),c=Math.max(h,c)}e=this._rect=new Dh(a-o/2,s-i/2,l-a+o,c-s+i)}return e},t}(Ty),eE=function(){function e(){this.group=new Fg}return e.prototype.updateData=function(e,t){this._clear();var n=this._create();n.setShape({points:e.getLayout("points")}),this._setCommon(n,e,t)},e.prototype.updateLayout=function(e){var t=e.getLayout("points");this.group.eachChild((function(e){if(null!=e.startIndex){var n=2*(e.endIndex-e.startIndex),r=4*e.startIndex*2;t=new Float32Array(t.buffer,r,n)}e.setShape("points",t),e.reset()}))},e.prototype.incrementalPrepareUpdate=function(e){this._clear()},e.prototype.incrementalUpdate=function(e,t,n){var r=this._newAdded[0],o=t.getLayout("points"),i=r&&r.shape.points;if(i&&i.length<2e4){var a=i.length,s=new Float32Array(a+o.length);s.set(i),s.set(o,a),r.endIndex=e.end,r.setShape({points:s})}else{this._newAdded=[];var l=this._create();l.startIndex=e.start,l.endIndex=e.end,l.incremental=!0,l.setShape({points:o}),this._setCommon(l,t,n)}},e.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},e.prototype._create=function(){var e=new JR({cursor:"default"});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e},e.prototype._setCommon=function(e,t,n){var r=t.hostModel;n=n||{};var o=t.getVisual("symbolSize");e.setShape("size",o instanceof Array?o:[o,o]),e.softClipShape=n.clipShape||null,e.symbolProxy=bI(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var i=e.shape.size[0]<4;e.useStyle(r.getModel("itemStyle").getItemStyle(i?["color","shadowBlur","shadowColor"]:["color"]));var a=t.getVisual("style"),s=a&&a.fill;s&&e.setColor(s);var l=sx(e);l.seriesIndex=r.seriesIndex,e.on("mousemove",(function(t){l.dataIndex=null;var n=e.hoverDataIdx;n>=0&&(l.dataIndex=n+(e.startIndex||0))}))},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}();const tE=eE;const nE=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.render=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).updateData(r,{clipShape:this._getClipShape(e)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).incrementalPrepareUpdate(r),this._finished=!1},t.prototype.incrementalRender=function(e,t,n){this._symbolDraw.incrementalUpdate(e,t.getData(),{clipShape:this._getClipShape(t)}),this._finished=e.end===t.getData().count()},t.prototype.updateTransform=function(e,t,n){var r=e.getData();if(this.group.dirty(),!this._finished||r.count()>1e4)return{update:!0};var o=GL("").reset(e,t,n);o.progress&&o.progress({start:0,end:r.count(),count:r.count()},r),this._symbolDraw.updateLayout(r)},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._getClipShape=function(e){if(e.get("clip",!0)){var t=e.coordinateSystem;return t&&t.getArea&&t.getArea(.1)}},t.prototype._updateSymbolDraw=function(e,t){var n=this._symbolDraw,r=t.pipelineContext.large;return n&&r===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=r?new tE:new fL,this._isLargeDraw=r,this.group.removeAll()),this.group.add(n.group),n},t.prototype.remove=function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t}(dM);const rE=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ru(t,e),t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},t}(rS);var oE=function(){function e(){}return e.prototype.getNeedCrossZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),iE=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ru(t,e),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Em).models[0]},t.type="cartesian2dAxis",t}(rS);Pu(iE,oE);var aE={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},sE=Mu({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},aE),lE=Mu({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},aE);const cE={category:sE,value:lE,time:Mu({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},lE),log:Du({logBase:10},lE)};var uE=0;function dE(e){return Xu(e)&&null!=e.value?e.value:e+""}const hE=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++uE}return e.createByAxisModel=function(t){var n=t.option,r=n.data,o=r&&Eu(r,dE);return new e({categories:o,needCollect:!o,deduplication:!1!==n.dedplication})},e.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},e.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!Hu(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var r=this._getOrCreateMap();return null==(t=r.get(e))&&(n?(t=this.categories.length,this.categories[t]=e,r.set(e,t)):t=NaN),t},e.prototype._getOrCreateMap=function(){return this._map||(this._map=dd(this.categories))},e}();var pE={value:1,category:1,time:1,log:1};function fE(e,t,n,r){Ru(pE,(function(o,i){var a=Mu(Mu({},cE[i],!0),r,!0),s=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t+"Axis."+i,n}return ru(n,e),n.prototype.mergeDefaultAndTheme=function(e,t){var n=$w(this),r=n?Jw(e):{};Mu(e,t.getTheme().get(i+"Axis")),Mu(e,this.getDefaultOption()),e.type=gE(e),n&&Qw(e,r,n)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=hE.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if("category"===t.type)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.type=t+"Axis."+i,n.defaultOption=a,n}(n);e.registerComponentModel(s)})),e.registerSubTypeDefaulter(t+"Axis",gE)}function gE(e){return e.type||(e.data?"category":"value")}var mE=function(){function e(e){this._setting=e||{},this._extent=[1/0,-1/0]}return e.prototype.getSetting=function(e){return this._setting[e]},e.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1])},e.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t)},e.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(e){this._isBlank=e},e}();Km(mE);const vE=mE;function yE(e){return"interval"===e.type||"log"===e.type}function xE(e,t,n,r){var o={},i=e[1]-e[0],a=o.interval=lm(i/t,!0);null!=n&&a<n&&(a=o.interval=n),null!=r&&a>r&&(a=o.interval=r);var s=o.intervalPrecision=wE(a);return function(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),SE(e,0,t),SE(e,1,t),e[0]>e[1]&&(e[0]=e[1])}(o.niceTickExtent=[Kg(Math.ceil(e[0]/a)*a,s),Kg(Math.floor(e[1]/a)*a,s)],e),o}function bE(e){var t=Math.pow(10,sm(e)),n=e/t;return n?2===n?n=3:3===n?n=5:n*=2:n=1,Kg(n*t)}function wE(e){return Qg(e)+2}function SE(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function _E(e,t){return e>=t[0]&&e<=t[1]}function AE(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function kE(e,t){return e*(t[1]-t[0])+t[0]}var CE=function(e){function t(t){var n=e.call(this,t)||this;n.type="ordinal";var r=n.getSetting("ordinalMeta");return r||(r=new hE({})),Vu(r)&&(r=new hE({categories:Eu(r,(function(e){return Xu(e)?e.value:e}))})),n._ordinalMeta=r,n._extent=n.getSetting("extent")||[0,r.categories.length-1],n}return ru(t,e),t.prototype.parse=function(e){return null==e?NaN:Hu(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return _E(e=this.parse(e),this._extent)&&null!=this._ordinalMeta.categories[e]},t.prototype.normalize=function(e){return AE(e=this._getTickNumber(this.parse(e)),this._extent)},t.prototype.scale=function(e){return e=Math.round(kE(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],t=this._extent,n=t[0];n<=t[1];)e.push({value:n}),n++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(null!=e){for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],o=0,i=this._ordinalMeta.categories.length,a=Math.min(i,t.length);o<a;++o){var s=t[o];n[o]=s,r[s]=o}for(var l=0;o<i;++o){for(;null!=r[l];)l++;n.push(l),r[l]=o}}else this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null},t.prototype._getTickNumber=function(e){var t=this._ticksByOrdinalNumber;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getRawOrdinalNumber=function(e){var t=this._ordinalNumbersByTick;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getLabel=function(e){if(!this.isBlank()){var t=this.getRawOrdinalNumber(e.value),n=this._ordinalMeta.categories[t];return null==n?"":n+""}},t.prototype.count=function(){return this._extent[1]-this._extent[0]+1},t.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},t.prototype.isInExtentRange=function(e){return e=this._getTickNumber(e),this._extent[0]<=e&&this._extent[1]>=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(vE);vE.registerClass(CE);const ME=CE;var IE=Kg,TE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return ru(t,e),t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return _E(e,this._extent)},t.prototype.normalize=function(e){return AE(e,this._extent)},t.prototype.scale=function(e){return kE(e,this._extent)},t.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=parseFloat(e)),isNaN(t)||(n[1]=parseFloat(t))},t.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1]),this.setExtent(t[0],t[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=wE(e)},t.prototype.getTicks=function(e){var t=this._interval,n=this._extent,r=this._niceExtent,o=this._intervalPrecision,i=[];if(!t)return i;n[0]<r[0]&&(e?i.push({value:IE(r[0]-t,o)}):i.push({value:n[0]}));for(var a=r[0];a<=r[1]&&(i.push({value:a}),(a=IE(a+t,o))!==i[i.length-1].value);)if(i.length>1e4)return[];var s=i.length?i[i.length-1].value:r[1];return n[1]>s&&(e?i.push({value:IE(s+t,o)}):i.push({value:n[1]})),i},t.prototype.getMinorTicks=function(e){for(var t=this.getTicks(!0),n=[],r=this.getExtent(),o=1;o<t.length;o++){for(var i=t[o],a=t[o-1],s=0,l=[],c=(i.value-a.value)/e;s<e-1;){var u=IE(a.value+(s+1)*c);u>r[0]&&u<r[1]&&l.push(u),s++}n.push(l)}return n},t.prototype.getLabel=function(e,t){if(null==e)return"";var n=t&&t.precision;return null==n?n=Qg(e.value)||0:"auto"===n&&(n=this._intervalPrecision),Ew(IE(e.value,n,!0))},t.prototype.calcNiceTicks=function(e,t,n){e=e||5;var r=this._extent,o=r[1]-r[0];if(isFinite(o)){o<0&&(o=-o,r.reverse());var i=xE(r,e,t,n);this._intervalPrecision=i.intervalPrecision,this._interval=i.interval,this._niceExtent=i.niceTickExtent}},t.prototype.calcNiceExtent=function(e){var t=this._extent;if(t[0]===t[1])if(0!==t[0]){var n=Math.abs(t[0]);e.fixMax||(t[1]+=n/2),t[0]-=n/2}else t[1]=1;var r=t[1]-t[0];isFinite(r)||(t[0]=0,t[1]=1),this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval);var o=this._interval;e.fixMin||(t[0]=IE(Math.floor(t[0]/o)*o)),e.fixMax||(t[1]=IE(Math.ceil(t[1]/o)*o))},t.prototype.setNiceExtent=function(e,t){this._niceExtent=[e,t]},t.type="interval",t}(vE);vE.registerClass(TE);const DE=TE;var jE=function(e){function t(t){var n=e.call(this,t)||this;return n.type="time",n}return ru(t,e),t.prototype.getLabel=function(e){var t=this.getSetting("useUTC");return yw(e.value,hw[function(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(mw(this._minLevelUnit))]||hw.second,t,this.getSetting("locale"))},t.prototype.getFormattedLabel=function(e,t,n){var r=this.getSetting("useUTC");return function(e,t,n,r,o){var i=null;if(Hu(n))i=n;else if(Wu(n))i=n(e.value,t,{level:e.level});else{var a=Tu({},uw);if(e.level>0)for(var s=0;s<pw.length;++s)a[pw[s]]="{primary|"+a[pw[s]]+"}";var l=n?!1===n.inherit?n:Du(n,a):a,c=xw(e.value,o);if(l[c])i=l[c];else if(l.inherit){for(s=fw.indexOf(c)-1;s>=0;--s)if(l[c]){i=l[c];break}i=i||a.none}if(Vu(i)){var u=null==e.level?0:e.level>=0?e.level:i.length+e.level;i=i[u=Math.min(u,i.length-1)]}}return yw(new Date(e.value),i,o,r)}(e,t,n,this.getSetting("locale"),r)},t.prototype.getTicks=function(){var e=this._interval,t=this._extent,n=[];if(!e)return n;n.push({value:t[0],level:0});var r=this.getSetting("useUTC"),o=function(e,t,n,r){var o=1e4,i=fw,a=0;function s(e,t,n,o,i,a,s){for(var l=new Date(t),c=t,u=l[o]();c<n&&c<=r[1];)s.push({value:c}),u+=e,l[i](u),c=l.getTime();s.push({value:c,notAdd:!0})}function l(e,o,i){var a=[],l=!o.length;if(!function(e,t,n,r){var o=am(t),i=am(n),a=function(e){return bw(o,e,r)===bw(i,e,r)},s=function(){return a("year")},l=function(){return s()&&a("month")},c=function(){return l()&&a("day")},u=function(){return c()&&a("hour")},d=function(){return u()&&a("minute")},h=function(){return d()&&a("second")},p=function(){return h()&&a("millisecond")};switch(e){case"year":return s();case"month":return l();case"day":return c();case"hour":return u();case"minute":return d();case"second":return h();case"millisecond":return p()}}(mw(e),r[0],r[1],n)){l&&(o=[{value:zE(new Date(r[0]),e,n)},{value:r[1]}]);for(var c=0;c<o.length-1;c++){var u=o[c].value,d=o[c+1].value;if(u!==d){var h=void 0,p=void 0,f=void 0,g=!1;switch(e){case"year":h=Math.max(1,Math.round(t/lw/365)),p=ww(n),f=Iw(n);break;case"half-year":case"quarter":case"month":h=RE(t),p=Sw(n),f=Tw(n);break;case"week":case"half-week":case"day":h=LE(t,31),p=_w(n),f=Dw(n),g=!0;break;case"half-day":case"quarter-day":case"hour":h=EE(t),p=Aw(n),f=jw(n);break;case"minute":h=NE(t,!0),p=kw(n),f=Pw(n);break;case"second":h=NE(t,!1),p=Cw(n),f=Lw(n);break;case"millisecond":h=OE(t),p=Mw(n),f=Rw(n)}s(h,u,d,p,f,g,a),"year"===e&&i.length>1&&0===c&&i.unshift({value:i[0].value-h})}}for(c=0;c<a.length;c++)i.push(a[c]);return a}}for(var c=[],u=[],d=0,h=0,p=0;p<i.length&&a++<o;++p){var f=mw(i[p]);if(vw(i[p]))if(l(i[p],c[c.length-1]||[],u),f!==(i[p+1]?mw(i[p+1]):null)){if(u.length){h=d,u.sort((function(e,t){return e.value-t.value}));for(var g=[],m=0;m<u.length;++m){var v=u[m].value;0!==m&&u[m-1].value===v||(g.push(u[m]),v>=r[0]&&v<=r[1]&&d++)}var y=(r[1]-r[0])/t;if(d>1.5*y&&h>y/1.5)break;if(c.push(g),d>y||e===i[p])break}u=[]}}0;var x=Ou(Eu(c,(function(e){return Ou(e,(function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd}))})),(function(e){return e.length>0})),b=[],w=x.length-1;for(p=0;p<x.length;++p)for(var S=x[p],_=0;_<S.length;++_)b.push({value:S[_].value,level:w-p});b.sort((function(e,t){return e.value-t.value}));var A=[];for(p=0;p<b.length;++p)0!==p&&b[p].value===b[p-1].value||A.push(b[p]);return A}(this._minLevelUnit,this._approxInterval,r,t);return(n=n.concat(o)).push({value:t[1],level:0}),n},t.prototype.calcNiceExtent=function(e){var t=this._extent;if(t[0]===t[1]&&(t[0]-=lw,t[1]+=lw),t[1]===-1/0&&t[0]===1/0){var n=new Date;t[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),t[0]=t[1]-lw}this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval)},t.prototype.calcNiceTicks=function(e,t,n){e=e||10;var r=this._extent,o=r[1]-r[0];this._approxInterval=o/e,null!=t&&this._approxInterval<t&&(this._approxInterval=t),null!=n&&this._approxInterval>n&&(this._approxInterval=n);var i=PE.length,a=Math.min(function(e,t,n,r){for(;n<r;){var o=n+r>>>1;e[o][1]<t?n=o+1:r=o}return n}(PE,this._approxInterval,0,i),i-1);this._interval=PE[a][1],this._minLevelUnit=PE[Math.max(a-1,0)][0]},t.prototype.parse=function(e){return Uu(e)?e:+am(e)},t.prototype.contain=function(e){return _E(this.parse(e),this._extent)},t.prototype.normalize=function(e){return AE(this.parse(e),this._extent)},t.prototype.scale=function(e){return kE(e,this._extent)},t.type="time",t}(DE),PE=[["second",iw],["minute",aw],["hour",sw],["quarter-day",6*sw],["half-day",12*sw],["day",1.2*lw],["half-week",3.5*lw],["week",7*lw],["month",31*lw],["quarter",95*lw],["half-year",cw/2],["year",cw]];function LE(e,t){return(e/=lw)>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function RE(e){return(e/=30*lw)>6?6:e>3?3:e>2?2:1}function EE(e){return(e/=sw)>12?12:e>6?6:e>3.5?4:e>2?2:1}function NE(e,t){return(e/=t?aw:iw)>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function OE(e){return lm(e,!0)}function zE(e,t,n){var r=new Date(e);switch(mw(t)){case"year":case"month":r[Tw(n)](0);case"day":r[Dw(n)](1);case"hour":r[jw(n)](0);case"minute":r[Pw(n)](0);case"second":r[Lw(n)](0),r[Rw(n)](0)}return r.getTime()}vE.registerClass(jE);const BE=jE;var FE=vE.prototype,VE=DE.prototype,WE=Kg,HE=Math.floor,GE=Math.ceil,UE=Math.pow,XE=Math.log,YE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new DE,t._interval=0,t}return ru(t,e),t.prototype.getTicks=function(e){var t=this._originalScale,n=this._extent,r=t.getExtent();return Eu(VE.getTicks.call(this,e),(function(e){var t=e.value,o=Kg(UE(this.base,t));return o=t===n[0]&&this._fixMin?ZE(o,r[0]):o,{value:o=t===n[1]&&this._fixMax?ZE(o,r[1]):o}}),this)},t.prototype.setExtent=function(e,t){var n=XE(this.base);e=XE(Math.max(0,e))/n,t=XE(Math.max(0,t))/n,VE.setExtent.call(this,e,t)},t.prototype.getExtent=function(){var e=this.base,t=FE.getExtent.call(this);t[0]=UE(e,t[0]),t[1]=UE(e,t[1]);var n=this._originalScale.getExtent();return this._fixMin&&(t[0]=ZE(t[0],n[0])),this._fixMax&&(t[1]=ZE(t[1],n[1])),t},t.prototype.unionExtent=function(e){this._originalScale.unionExtent(e);var t=this.base;e[0]=XE(e[0])/XE(t),e[1]=XE(e[1])/XE(t),FE.unionExtent.call(this,e)},t.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},t.prototype.calcNiceTicks=function(e){e=e||10;var t=this._extent,n=t[1]-t[0];if(!(n===1/0||n<=0)){var r,o=(r=n,Math.pow(10,sm(r)));for(e/n*o<=.5&&(o*=10);!isNaN(o)&&Math.abs(o)<1&&Math.abs(o)>0;)o*=10;var i=[Kg(GE(t[0]/o)*o),Kg(HE(t[1]/o)*o)];this._interval=o,this._niceExtent=i}},t.prototype.calcNiceExtent=function(e){VE.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return _E(e=XE(e)/XE(this.base),this._extent)},t.prototype.normalize=function(e){return AE(e=XE(e)/XE(this.base),this._extent)},t.prototype.scale=function(e){return e=kE(e,this._extent),UE(this.base,e)},t.type="log",t}(vE),qE=YE.prototype;function ZE(e,t){return WE(e,Qg(t))}qE.getMinorTicks=VE.getMinorTicks,qE.getLabel=VE.getLabel,vE.registerClass(YE);const KE=YE;var $E=function(){function e(e,t,n){this._prepareParams(e,t,n)}return e.prototype._prepareParams=function(e,t,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var r=this._isOrdinal="ordinal"===e.type;this._needCrossZero="interval"===e.type&&t.getNeedCrossZero&&t.getNeedCrossZero();var o=t.get("min",!0);null==o&&(o=t.get("startValue",!0));var i=this._modelMinRaw=o;Wu(i)?this._modelMinNum=tN(e,i({min:n[0],max:n[1]})):"dataMin"!==i&&(this._modelMinNum=tN(e,i));var a=this._modelMaxRaw=t.get("max",!0);if(Wu(a)?this._modelMaxNum=tN(e,a({min:n[0],max:n[1]})):"dataMax"!==a&&(this._modelMaxNum=tN(e,a)),r)this._axisDataLen=t.getCategories().length;else{var s=t.get("boundaryGap"),l=Vu(s)?s:[s||0,s||0];"boolean"===typeof l[0]||"boolean"===typeof l[1]?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[Cg(l[0],1),Cg(l[1],1)]}},e.prototype.calculate=function(){var e=this._isOrdinal,t=this._dataMin,n=this._dataMax,r=this._axisDataLen,o=this._boundaryGapInner,i=e?null:n-t||Math.abs(t),a="dataMin"===this._modelMinRaw?t:this._modelMinNum,s="dataMax"===this._modelMaxRaw?n:this._modelMaxNum,l=null!=a,c=null!=s;null==a&&(a=e?r?0:NaN:t-o[0]*i),null==s&&(s=e?r?r-1:NaN:n+o[1]*i),(null==a||!isFinite(a))&&(a=NaN),(null==s||!isFinite(s))&&(s=NaN);var u=$u(a)||$u(s)||e&&!r;this._needCrossZero&&(a>0&&s>0&&!l&&(a=0),a<0&&s<0&&!c&&(s=0));var d=this._determinedMin,h=this._determinedMax;return null!=d&&(a=d,l=!0),null!=h&&(s=h,c=!0),{min:a,max:s,minFixed:l,maxFixed:c,isBlank:u}},e.prototype.modifyDataMinMax=function(e,t){this[JE[e]]=t},e.prototype.setDeterminedMinMax=function(e,t){this[QE[e]]=t},e.prototype.freeze=function(){this.frozen=!0},e}(),QE={min:"_determinedMin",max:"_determinedMax"},JE={min:"_dataMin",max:"_dataMax"};function eN(e,t,n){var r=e.rawExtentInfo;return r||(r=new $E(e,t,n),e.rawExtentInfo=r,r)}function tN(e,t){return null==t?null:$u(t)?NaN:e.parse(t)}function nN(e,t){var n=e.type,r=eN(e,t,e.getExtent()).calculate();e.setBlank(r.isBlank);var o=r.min,i=r.max,a=t.ecModel;if(a&&"time"===n){var s=$L("bar",a),l=!1;if(Ru(s,(function(e){l=l||e.getBaseAxis()===t.axis})),l){var c=QL(s),u=function(e,t,n,r){var o=n.axis.getExtent(),i=o[1]-o[0],a=function(e,t,n){if(e&&t){var r=e[KL(t)];return null!=r&&null!=n?r[ZL(n)]:r}}(r,n.axis);if(void 0===a)return{min:e,max:t};var s=1/0;Ru(a,(function(e){s=Math.min(e.offset,s)}));var l=-1/0;Ru(a,(function(e){l=Math.max(e.offset+e.width,l)})),s=Math.abs(s),l=Math.abs(l);var c=s+l,u=t-e,d=u/(1-(s+l)/i)-u;return t+=d*(l/c),e-=d*(s/c),{min:e,max:t}}(o,i,t,c);o=u.min,i=u.max}}return{extent:[o,i],fixMin:r.minFixed,fixMax:r.maxFixed}}function rN(e,t){var n=t,r=nN(e,n),o=r.extent,i=n.get("splitNumber");e instanceof KE&&(e.base=n.get("logBase"));var a=e.type,s=n.get("interval"),l="interval"===a||"time"===a;e.setExtent(o[0],o[1]),e.calcNiceExtent({splitNumber:i,fixMin:r.fixMin,fixMax:r.fixMax,minInterval:l?n.get("minInterval"):null,maxInterval:l?n.get("maxInterval"):null}),null!=s&&e.setInterval&&e.setInterval(s)}function oN(e,t){if(t=t||e.get("type"))switch(t){case"category":return new ME({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new BE({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(vE.getClass(t)||DE)}}function iN(e){var t,n,r=e.getLabelModel().get("formatter"),o="category"===e.type?e.scale.getExtent()[0]:null;return"time"===e.scale.type?(n=r,function(t,r){return e.scale.getFormattedLabel(t,r,n)}):Hu(r)?function(t){return function(n){var r=e.scale.getLabel(n);return t.replace("{value}",null!=r?r:"")}}(r):Wu(r)?(t=r,function(n,r){return null!=o&&(r=n.value-o),t(aN(e,n),r,null!=n.level?{level:n.level}:null)}):function(t){return e.scale.getLabel(t)}}function aN(e,t){return"category"===e.type?e.scale.getLabel(t):t.value}function sN(e,t){var n=t*Math.PI/180,r=e.width,o=e.height,i=r*Math.abs(Math.cos(n))+Math.abs(o*Math.sin(n)),a=r*Math.abs(Math.sin(n))+Math.abs(o*Math.cos(n));return new Dh(e.x,e.y,i,a)}function lN(e){var t=e.get("interval");return null==t?"auto":t}function cN(e){return"category"===e.type&&0===lN(e.getLabelModel())}function uN(e,t){var n={};return Ru(e.mapDimensionsAll(t),(function(t){n[nL(e,t)]=!0})),zu(n)}var dN=function(){function e(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return Eu(this._dimList,(function(e){return this._axes[e]}),this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),Ou(this.getAxes(),(function(t){return t.scale.type===e}))},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}();var hN=["x","y"];function pN(e){return"interval"===e.type||"time"===e.type}var fN=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=hN,t}return ru(t,e),t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,t=this.getAxis("y").scale;if(pN(e)&&pN(t)){var n=e.getExtent(),r=t.getExtent(),o=this.dataToPoint([n[0],r[0]]),i=this.dataToPoint([n[1],r[1]]),a=n[1]-n[0],s=r[1]-r[0];if(a&&s){var l=(i[0]-o[0])/a,c=(i[1]-o[1])/s,u=o[0]-n[0]*l,d=o[1]-r[0]*c,h=this._transform=[l,0,0,c,u,d];this._invTransform=yh([],h)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var t=this.getAxis("x"),n=this.getAxis("y");return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),o=this.getArea(),i=new Dh(n[0],n[1],r[0]-n[0],r[1]-n[1]);return o.intersect(i)},t.prototype.dataToPoint=function(e,t,n){n=n||[];var r=e[0],o=e[1];if(this._transform&&null!=r&&isFinite(r)&&null!=o&&isFinite(o))return Ed(n,e,this._transform);var i=this.getAxis("x"),a=this.getAxis("y");return n[0]=i.toGlobalCoord(i.dataToCoord(r,t)),n[1]=a.toGlobalCoord(a.dataToCoord(o,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis("x").scale,r=this.getAxis("y").scale,o=n.getExtent(),i=r.getExtent(),a=n.parse(e[0]),s=r.parse(e[1]);return(t=t||[])[0]=Math.min(Math.max(Math.min(o[0],o[1]),a),Math.max(o[0],o[1])),t[1]=Math.min(Math.max(Math.min(i[0],i[1]),s),Math.max(i[0],i[1])),t},t.prototype.pointToData=function(e,t){var n=[];if(this._invTransform)return Ed(n,e,this._invTransform);var r=this.getAxis("x"),o=this.getAxis("y");return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=o.coordToData(o.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis("x"===e.dim?"y":"x")},t.prototype.getArea=function(e){e=e||0;var t=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),r=Math.min(t[0],t[1])-e,o=Math.min(n[0],n[1])-e,i=Math.max(t[0],t[1])-r+e,a=Math.max(n[0],n[1])-o+e;return new Dh(r,o,i,a)},t}(dN);const gN=fN;var mN=jm();function vN(e,t){var n=Eu(t,(function(t){return e.scale.parse(t)}));return"time"===e.type&&n.length>0&&(n.sort(),n.unshift(n[0]),n.push(n[n.length-1])),n}function yN(e){var t=e.getLabelModel().get("customValues");if(t){var n=iN(e);return{labels:vN(e,t).map((function(t){var r={value:t};return{formattedLabel:n(r),rawLabel:e.scale.getLabel(r),tickValue:t}}))}}return"category"===e.type?function(e){var t=e.getLabelModel(),n=bN(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(e):function(e){var t=e.scale.getTicks(),n=iN(e);return{labels:Eu(t,(function(t,r){return{level:t.level,formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tickValue:t.value}}))}}(e)}function xN(e,t){var n=e.getTickModel().get("customValues");return n?{ticks:vN(e,n)}:"category"===e.type?function(e,t){var n,r,o=wN(e,"ticks"),i=lN(t),a=SN(o,i);if(a)return a;t.get("show")&&!e.scale.isBlank()||(n=[]);if(Wu(i))n=kN(e,i,!0);else if("auto"===i){var s=bN(e,e.getLabelModel());r=s.labelCategoryInterval,n=Eu(s.labels,(function(e){return e.tickValue}))}else n=AN(e,r=i,!0);return _N(o,i,{ticks:n,tickCategoryInterval:r})}(e,t):{ticks:Eu(e.scale.getTicks(),(function(e){return e.value}))}}function bN(e,t){var n,r,o=wN(e,"labels"),i=lN(t),a=SN(o,i);return a||(Wu(i)?n=kN(e,i):(r="auto"===i?function(e){var t=mN(e).autoInterval;return null!=t?t:mN(e).autoInterval=e.calculateCategoryInterval()}(e):i,n=AN(e,r)),_N(o,i,{labels:n,labelCategoryInterval:r}))}function wN(e,t){return mN(e)[t]||(mN(e)[t]=[])}function SN(e,t){for(var n=0;n<e.length;n++)if(e[n].key===t)return e[n].value}function _N(e,t,n){return e.push({key:t,value:n}),n}function AN(e,t,n){var r=iN(e),o=e.scale,i=o.getExtent(),a=e.getLabelModel(),s=[],l=Math.max((t||0)+1,1),c=i[0],u=o.count();0!==c&&l>1&&u/l>2&&(c=Math.round(Math.ceil(c/l)*l));var d=cN(e),h=a.get("showMinLabel")||d,p=a.get("showMaxLabel")||d;h&&c!==i[0]&&g(i[0]);for(var f=c;f<=i[1];f+=l)g(f);function g(e){var t={value:e};s.push(n?e:{formattedLabel:r(t),rawLabel:o.getLabel(t),tickValue:e})}return p&&f-l!==i[1]&&g(i[1]),s}function kN(e,t,n){var r=e.scale,o=iN(e),i=[];return Ru(r.getTicks(),(function(e){var a=r.getLabel(e),s=e.value;t(e.value,a)&&i.push(n?s:{formattedLabel:o(e),rawLabel:a,tickValue:s})})),i}var CN=[0,1],MN=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(e)},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(e){return Jg(e||this.scale.getExtent(),this._extent)},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this._extent,r=this.scale;return e=r.normalize(e),this.onBand&&"ordinal"===r.type&&IN(n=n.slice(),r.count()),qg(e,CN,n,t)},e.prototype.coordToData=function(e,t){var n=this._extent,r=this.scale;this.onBand&&"ordinal"===r.type&&IN(n=n.slice(),r.count());var o=qg(e,n,CN,t);return this.scale.scale(o)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){var t=(e=e||{}).tickModel||this.getTickModel(),n=Eu(xN(this,t).ticks,(function(e){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(e):e),tickValue:e}}),this);return function(e,t,n,r){var o=t.length;if(!e.onBand||n||!o)return;var i,a,s=e.getExtent();if(1===o)t[0].coord=s[0],i=t[1]={coord:s[1]};else{var l=t[o-1].tickValue-t[0].tickValue,c=(t[o-1].coord-t[0].coord)/l;Ru(t,(function(e){e.coord-=c/2})),a=1+e.scale.getExtent()[1]-t[o-1].tickValue,i={coord:t[o-1].coord+c*a},t.push(i)}var u=s[0]>s[1];d(t[0].coord,s[0])&&(r?t[0].coord=s[0]:t.shift());r&&d(s[0],t[0].coord)&&t.unshift({coord:s[0]});d(s[1],i.coord)&&(r?i.coord=s[1]:t.pop());r&&d(i.coord,s[1])&&t.push({coord:s[1]});function d(e,t){return e=Kg(e),t=Kg(t),u?e>t:e<t}}(this,n,t.get("alignWithLabel"),e.clamp),n},e.prototype.getMinorTicksCoords=function(){if("ordinal"===this.scale.type)return[];var e=this.model.getModel("minorTick").get("splitNumber");return e>0&&e<100||(e=5),Eu(this.scale.getMinorTicks(e),(function(e){return Eu(e,(function(e){return{coord:this.dataToCoord(e),tickValue:e}}),this)}),this)},e.prototype.getViewLabels=function(){return yN(this).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+(this.onBand?1:0);0===n&&(n=1);var r=Math.abs(e[1]-e[0]);return Math.abs(r)/n},e.prototype.calculateCategoryInterval=function(){return function(e){var t=function(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}(e),n=iN(e),r=(t.axisRotate-t.labelRotate)/180*Math.PI,o=e.scale,i=o.getExtent(),a=o.count();if(i[1]-i[0]<1)return 0;var s=1;a>40&&(s=Math.max(1,Math.floor(a/40)));for(var l=i[0],c=e.dataToCoord(l+1)-e.dataToCoord(l),u=Math.abs(c*Math.cos(r)),d=Math.abs(c*Math.sin(r)),h=0,p=0;l<=i[1];l+=s){var f,g,m=Sg(n({value:l}),t.font,"center","top");f=1.3*m.width,g=1.3*m.height,h=Math.max(h,f,7),p=Math.max(p,g,7)}var v=h/u,y=p/d;isNaN(v)&&(v=1/0),isNaN(y)&&(y=1/0);var x=Math.max(0,Math.floor(Math.min(v,y))),b=mN(e.model),w=e.getExtent(),S=b.lastAutoInterval,_=b.lastTickCount;return null!=S&&null!=_&&Math.abs(S-x)<=1&&Math.abs(_-a)<=1&&S>x&&b.axisExtent0===w[0]&&b.axisExtent1===w[1]?x=S:(b.lastTickCount=a,b.lastAutoInterval=x,b.axisExtent0=w[0],b.axisExtent1=w[1]),x}(this)},e}();function IN(e,t){var n=(e[1]-e[0])/t/2;e[0]+=n,e[1]-=n}const TN=MN;var DN=function(e){function t(t,n,r,o,i){var a=e.call(this,t,n,r)||this;return a.index=0,a.type=o||"value",a.position=i||"bottom",a}return ru(t,e),t.prototype.isHorizontal=function(){var e=this.position;return"top"===e||"bottom"===e},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e["x"===this.dim?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if("category"!==this.type)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(TN);const jN=DN;function PN(e,t,n){n=n||{};var r=e.coordinateSystem,o=t.axis,i={},a=o.getAxesOnZeroOf()[0],s=o.position,l=a?"onZero":s,c=o.dim,u=r.getRect(),d=[u.x,u.x+u.width,u.y,u.y+u.height],h={left:0,right:1,top:0,bottom:1,onZero:2},p=t.get("offset")||0,f="x"===c?[d[2]-p,d[3]+p]:[d[0]-p,d[1]+p];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));f[h.onZero]=Math.max(Math.min(g,f[1]),f[0])}i.position=["y"===c?f[h[l]]:d[0],"x"===c?f[h[l]]:d[3]],i.rotation=Math.PI/2*("x"===c?0:1);i.labelDirection=i.tickDirection=i.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],i.labelOffset=a?f[h[s]]-f[h.onZero]:0,t.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),Qu(n.labelInside,t.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var m=t.get(["axisLabel","rotate"]);return i.labelRotate="top"===l?-m:m,i.z2=1,i}function LN(e){return"cartesian2d"===e.get("coordinateSystem")}function RN(e){var t={xAxisModel:null,yAxisModel:null};return Ru(t,(function(n,r){var o=r.replace(/Model$/,""),i=e.getReferringComponents(o,Em).models[0];t[r]=i})),t}var EN=Math.log;function NN(e,t,n){var r=DE.prototype,o=r.getTicks.call(n),i=r.getTicks.call(n,!0),a=o.length-1,s=r.getInterval.call(n),l=nN(e,t),c=l.extent,u=l.fixMin,d=l.fixMax;if("log"===e.type){var h=EN(e.base);c=[EN(c[0])/h,EN(c[1])/h]}e.setExtent(c[0],c[1]),e.calcNiceExtent({splitNumber:a,fixMin:u,fixMax:d});var p=r.getExtent.call(e);u&&(c[0]=p[0]),d&&(c[1]=p[1]);var f=r.getInterval.call(e),g=c[0],m=c[1];if(u&&d)f=(m-g)/a;else if(u)for(m=c[0]+f*a;m<c[1]&&isFinite(m)&&isFinite(c[1]);)f=bE(f),m=c[0]+f*a;else if(d)for(g=c[1]-f*a;g>c[0]&&isFinite(g)&&isFinite(c[0]);)f=bE(f),g=c[1]-f*a;else{e.getTicks().length-1>a&&(f=bE(f));var v=f*a;(g=Kg((m=Math.ceil(c[1]/f)*f)-v))<0&&c[0]>=0?(g=0,m=Kg(v)):m>0&&c[1]<=0&&(m=0,g=-Kg(v))}var y=(o[0].value-i[0].value)/s,x=(o[a].value-i[a].value)/s;r.setExtent.call(e,g+f*y,m+f*x),r.setInterval.call(e,f),(y||x)&&r.setNiceExtent.call(e,g+f,m-f)}var ON=function(){function e(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=hN,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;function r(e){var t,n=zu(e),r=n.length;if(r){for(var o=[],i=r-1;i>=0;i--){var a=e[+n[i]],s=a.model,l=a.scale;yE(l)&&s.get("alignTicks")&&null==s.get("interval")?o.push(a):(rN(l,s),yE(l)&&(t=a))}o.length&&(t||rN((t=o.pop()).scale,t.model),Ru(o,(function(e){NN(e.scale,e.model,t.scale)})))}}this._updateScale(e,this.model),r(n.x),r(n.y);var o={};Ru(n.x,(function(e){BN(n,"y",e,o)})),Ru(n.y,(function(e){BN(n,"x",e,o)})),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=e.getBoxLayoutParams(),o=!n&&e.get("containLabel"),i=Zw(r,{width:t.getWidth(),height:t.getHeight()});this._rect=i;var a=this._axesList;function s(){Ru(a,(function(e){var t=e.isHorizontal(),n=t?[0,i.width]:[0,i.height],r=e.inverse?1:0;e.setExtent(n[r],n[1-r]),function(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord="x"===e.dim?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord="x"===e.dim?function(e){return e-t}:function(e){return r-e+t}}(e,t?i.x:i.y)}))}s(),o&&(Ru(a,(function(e){if(!e.model.get(["axisLabel","inside"])){var t=function(e){var t=e.model,n=e.scale;if(t.get(["axisLabel","show"])&&!n.isBlank()){var r,o,i=n.getExtent();o=n instanceof ME?n.count():(r=n.getTicks()).length;var a,s=e.getLabelModel(),l=iN(e),c=1;o>40&&(c=Math.ceil(o/40));for(var u=0;u<o;u+=c){var d=l(r?r[u]:{value:i[0]+u},u),h=sN(s.getTextRect(d),s.get("rotate")||0);a?a.union(h):a=h}return a}}(e);if(t){var n=e.isHorizontal()?"height":"width",r=e.model.get(["axisLabel","margin"]);i[n]-=t[n]+r,"top"===e.position?i.y+=t.height+r:"left"===e.position&&(i.x+=t.width+r)}}})),s()),Ru(this._coordsList,(function(e){e.calcAffineTransform()}))},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(null!=n)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(null!=e&&null!=t){var n="x"+e+"y"+t;return this._coordsMap[n]}Xu(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,o=this._coordsList;r<o.length;r++)if(o[r].getAxis("x").index===e||o[r].getAxis("y").index===t)return o[r]},e.prototype.getCartesians=function(){return this._coordsList.slice()},e.prototype.convertToPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.dataToPoint(n):r.axis?r.axis.toGlobalCoord(r.axis.dataToCoord(n)):null},e.prototype.convertFromPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.pointToData(n):r.axis?r.axis.coordToData(r.axis.toLocalCoord(n)):null},e.prototype._findConvertTarget=function(e){var t,n,r=e.seriesModel,o=e.xAxisModel||r&&r.getReferringComponents("xAxis",Em).models[0],i=e.yAxisModel||r&&r.getReferringComponents("yAxis",Em).models[0],a=e.gridModel,s=this._coordsList;if(r)ju(s,t=r.coordinateSystem)<0&&(t=null);else if(o&&i)t=this.getCartesian(o.componentIndex,i.componentIndex);else if(o)n=this.getAxis("x",o.componentIndex);else if(i)n=this.getAxis("y",i.componentIndex);else if(a){a.coordinateSystem===this&&(t=this._coordsList[0])}return{cartesian:t,axis:n}},e.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},e.prototype._initCartesian=function(e,t,n){var r=this,o=this,i={left:!1,right:!1,top:!1,bottom:!1},a={x:{},y:{}},s={x:0,y:0};if(t.eachComponent("xAxis",l("x"),this),t.eachComponent("yAxis",l("y"),this),!s.x||!s.y)return this._axesMap={},void(this._axesList=[]);function l(t){return function(n,r){if(zN(n,e)){var l=n.get("position");"x"===t?"top"!==l&&"bottom"!==l&&(l=i.bottom?"top":"bottom"):"left"!==l&&"right"!==l&&(l=i.left?"right":"left"),i[l]=!0;var c=new jN(t,oN(n),[0,0],n.get("type"),l),u="category"===c.type;c.onBand=u&&n.get("boundaryGap"),c.inverse=n.get("inverse"),n.axis=c,c.model=n,c.grid=o,c.index=r,o._axesList.push(c),a[t][r]=c,s[t]++}}}this._axesMap=a,Ru(a.x,(function(t,n){Ru(a.y,(function(o,i){var a="x"+n+"y"+i,s=new gN(a);s.master=r,s.model=e,r._coordsMap[a]=s,r._coordsList.push(s),s.addAxis(t),s.addAxis(o)}))}))},e.prototype._updateScale=function(e,t){function n(e,t){Ru(uN(e,t.dim),(function(n){t.scale.unionExtentFromData(e,n)}))}Ru(this._axesList,(function(e){if(e.scale.setExtent(1/0,-1/0),"category"===e.type){var t=e.model.get("categorySortInfo");e.scale.setSortInfo(t)}})),e.eachSeries((function(e){if(LN(e)){var r=RN(e),o=r.xAxisModel,i=r.yAxisModel;if(!zN(o,t)||!zN(i,t))return;var a=this.getCartesian(o.componentIndex,i.componentIndex),s=e.getData(),l=a.getAxis("x"),c=a.getAxis("y");n(s,l),n(s,c)}}),this)},e.prototype.getTooltipAxes=function(e){var t=[],n=[];return Ru(this.getCartesians(),(function(r){var o=null!=e&&"auto"!==e?r.getAxis(e):r.getBaseAxis(),i=r.getOtherAxis(o);ju(t,o)<0&&t.push(o),ju(n,i)<0&&n.push(i)})),{baseAxes:t,otherAxes:n}},e.create=function(t,n){var r=[];return t.eachComponent("grid",(function(o,i){var a=new e(o,t,n);a.name="grid_"+i,a.resize(o,n,!0),o.coordinateSystem=a,r.push(a)})),t.eachSeries((function(e){if(LN(e)){var t=RN(e),n=t.xAxisModel,r=t.yAxisModel;0;var o=n.getCoordSysModel().coordinateSystem;e.coordinateSystem=o.getCartesian(n.componentIndex,r.componentIndex)}})),r},e.dimensions=hN,e}();function zN(e,t){return e.getCoordSysModel()===t}function BN(e,t,n,r){n.getAxesOnZeroOf=function(){return o?[o]:[]};var o,i=e[t],a=n.model,s=a.get(["axisLine","onZero"]),l=a.get(["axisLine","onZeroAxisIndex"]);if(s){if(null!=l)FN(i[l])&&(o=i[l]);else for(var c in i)if(i.hasOwnProperty(c)&&FN(i[c])&&!r[u(i[c])]){o=i[c];break}o&&(r[u(o)]=!0)}function u(e){return e.dim+"_"+e.index}}function FN(e){return e&&"category"!==e.type&&"time"!==e.type&&function(e){var t=e.scale.getExtent(),n=t[0],r=t[1];return!(n>0&&r>0||n<0&&r<0)}(e)}const VN=ON;var WN=Math.PI,HN=function(){function e(e,t){this.group=new Fg,this.opt=t,this.axisModel=e,Du(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new Fg({x:t.position[0],y:t.position[1],rotation:t.rotation});n.updateTransform(),this._transformGroup=n}return e.prototype.hasBuilder=function(e){return!!GN[e]},e.prototype.add=function(e){GN[e](this.opt,this.axisModel,this.group,this._transformGroup)},e.prototype.getGroup=function(){return this.group},e.innerTextLayout=function(e,t,n){var r,o,i=rm(t-e);return om(i)?(o=n>0?"top":"bottom",r="center"):om(i-WN)?(o=n>0?"bottom":"top",r="center"):(o="middle",r=i>0&&i<WN?n>0?"right":"left":n>0?"left":"right"),{rotation:i,textAlign:r,textVerticalAlign:o}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},e}(),GN={axisLine:function(e,t,n,r){var o=t.get(["axisLine","show"]);if("auto"===o&&e.handleAutoShown&&(o=e.handleAutoShown("axisLine")),o){var i=t.axis.getExtent(),a=r.transform,s=[i[0],0],l=[i[1],0],c=s[0]>l[0];a&&(Ed(s,s,a),Ed(l,l,a));var u=Tu({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),d=new oC({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:u,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1});FC(d.shape,d.style.lineWidth),d.anid="line",n.add(d);var h=t.get(["axisLine","symbol"]);if(null!=h){var p=t.get(["axisLine","symbolSize"]);Hu(h)&&(h=[h,h]),(Hu(p)||Uu(p))&&(p=[p,p]);var f=SI(t.get(["axisLine","symbolOffset"])||0,p),g=p[0],m=p[1];Ru([{rotate:e.rotation+Math.PI/2,offset:f[0],r:0},{rotate:e.rotation-Math.PI/2,offset:f[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],(function(t,r){if("none"!==h[r]&&null!=h[r]){var o=bI(h[r],-g/2,-m/2,g,m,u.stroke,!0),i=t.r+t.offset,a=c?l:s;o.attr({rotation:t.rotate,x:a[0]+i*Math.cos(e.rotation),y:a[1]-i*Math.sin(e.rotation),silent:!0,z2:11}),n.add(o)}}))}}},axisTickLabel:function(e,t,n,r){var o=function(e,t,n,r){var o=n.axis,i=n.getModel("axisTick"),a=i.get("show");"auto"===a&&r.handleAutoShown&&(a=r.handleAutoShown("axisTick"));if(!a||o.scale.isBlank())return;for(var s=i.getModel("lineStyle"),l=r.tickDirection*i.get("length"),c=qN(o.getTicksCoords(),t.transform,l,Du(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),u=0;u<c.length;u++)e.add(c[u]);return c}(n,r,t,e),i=function(e,t,n,r){var o=n.axis,i=Qu(r.axisLabelShow,n.get(["axisLabel","show"]));if(!i||o.scale.isBlank())return;var a=n.getModel("axisLabel"),s=a.get("margin"),l=o.getViewLabels(),c=(Qu(r.labelRotate,a.get("rotate"))||0)*WN/180,u=HN.innerTextLayout(r.rotation,c,r.labelDirection),d=n.getCategories&&n.getCategories(!0),h=[],p=HN.isLabelSilent(n),f=n.get("triggerEvent");return Ru(l,(function(i,c){var g="ordinal"===o.scale.type?o.scale.getRawOrdinalNumber(i.tickValue):i.tickValue,m=i.formattedLabel,v=i.rawLabel,y=a;if(d&&d[g]){var x=d[g];Xu(x)&&x.textStyle&&(y=new Yb(x.textStyle,a,n.ecModel))}var b=y.getTextColor()||n.get(["axisLine","lineStyle","color"]),w=o.dataToCoord(g),S=y.getShallow("align",!0)||u.textAlign,_=Ju(y.getShallow("alignMinLabel",!0),S),A=Ju(y.getShallow("alignMaxLabel",!0),S),k=y.getShallow("verticalAlign",!0)||y.getShallow("baseline",!0)||u.textVerticalAlign,C=Ju(y.getShallow("verticalAlignMinLabel",!0),k),M=Ju(y.getShallow("verticalAlignMaxLabel",!0),k),I=new ax({x:w,y:r.labelOffset+r.labelDirection*s,rotation:u.rotation,silent:p,z2:10+(i.level||0),style:kb(y,{text:m,align:0===c?_:c===l.length-1?A:S,verticalAlign:0===c?C:c===l.length-1?M:k,fill:Wu(b)?b("category"===o.type?v:"value"===o.type?g+"":g,c):b})});if(I.anid="label_"+g,f){var T=HN.makeAxisEventDataBase(n);T.targetType="axisLabel",T.value=v,T.tickIndex=c,"category"===o.type&&(T.dataIndex=g),sx(I).eventData=T}t.add(I),I.updateTransform(),h.push(I),e.add(I),I.decomposeTransform()})),h}(n,r,t,e);(function(e,t,n){if(cN(e.axis))return;var r=e.get(["axisLabel","showMinLabel"]),o=e.get(["axisLabel","showMaxLabel"]);t=t||[],n=n||[];var i=t[0],a=t[1],s=t[t.length-1],l=t[t.length-2],c=n[0],u=n[1],d=n[n.length-1],h=n[n.length-2];!1===r?(UN(i),UN(c)):XN(i,a)&&(r?(UN(a),UN(u)):(UN(i),UN(c)));!1===o?(UN(s),UN(d)):XN(l,s)&&(o?(UN(l),UN(h)):(UN(s),UN(d)))}(t,i,o),function(e,t,n,r){var o=n.axis,i=n.getModel("minorTick");if(!i.get("show")||o.scale.isBlank())return;var a=o.getMinorTicksCoords();if(!a.length)return;for(var s=i.getModel("lineStyle"),l=r*i.get("length"),c=Du(s.getLineStyle(),Du(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),u=0;u<a.length;u++)for(var d=qN(a[u],t.transform,l,c,"minorticks_"+u),h=0;h<d.length;h++)e.add(d[h])}(n,r,t,e.tickDirection),t.get(["axisLabel","hideOverlap"]))&&OD(RD(Eu(i,(function(e){return{label:e,priority:e.z2,defaultAttr:{ignore:e.ignore}}}))))},axisName:function(e,t,n,r){var o=Qu(e.axisName,t.get("name"));if(o){var i,a,s=t.get("nameLocation"),l=e.nameDirection,c=t.getModel("nameTextStyle"),u=t.get("nameGap")||0,d=t.axis.getExtent(),h=d[0]>d[1]?-1:1,p=["start"===s?d[0]-h*u:"end"===s?d[1]+h*u:(d[0]+d[1])/2,YN(s)?e.labelOffset+l*u:0],f=t.get("nameRotate");null!=f&&(f=f*WN/180),YN(s)?i=HN.innerTextLayout(e.rotation,null!=f?f:e.rotation,l):(i=function(e,t,n,r){var o,i,a=rm(n-e),s=r[0]>r[1],l="start"===t&&!s||"start"!==t&&s;om(a-WN/2)?(i=l?"bottom":"top",o="center"):om(a-1.5*WN)?(i=l?"top":"bottom",o="center"):(i="middle",o=a<1.5*WN&&a>WN/2?l?"left":"right":l?"right":"left");return{rotation:a,textAlign:o,textVerticalAlign:i}}(e.rotation,s,f||0,d),null!=(a=e.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(i.rotation)),!isFinite(a)&&(a=null)));var g=c.getFont(),m=t.get("nameTruncate",!0)||{},v=m.ellipsis,y=Qu(e.nameTruncateMaxWidth,m.maxWidth,a),x=new ax({x:p[0],y:p[1],rotation:i.rotation,silent:HN.isLabelSilent(t),style:kb(c,{text:o,font:g,overflow:"truncate",width:y,ellipsis:v,fill:c.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:c.get("align")||i.textAlign,verticalAlign:c.get("verticalAlign")||i.textVerticalAlign}),z2:1});if(eM({el:x,componentModel:t,itemName:o}),x.__fullText=o,x.anid="name",t.get("triggerEvent")){var b=HN.makeAxisEventDataBase(t);b.targetType="axisName",b.name=o,sx(x).eventData=b}r.add(x),x.updateTransform(),n.add(x),x.decomposeTransform()}}};function UN(e){e&&(e.ignore=!0)}function XN(e,t){var n=e&&e.getBoundingRect().clone(),r=t&&t.getBoundingRect().clone();if(n&&r){var o=hh([]);return mh(o,o,-e.rotation),n.applyTransform(fh([],o,e.getLocalTransform())),r.applyTransform(fh([],o,t.getLocalTransform())),n.intersect(r)}}function YN(e){return"middle"===e||"center"===e}function qN(e,t,n,r,o){for(var i=[],a=[],s=[],l=0;l<e.length;l++){var c=e[l].coord;a[0]=c,a[1]=0,s[0]=c,s[1]=n,t&&(Ed(a,a,t),Ed(s,s,t));var u=new oC({shape:{x1:a[0],y1:a[1],x2:s[0],y2:s[1]},style:r,z2:2,autoBatch:!0,silent:!0});FC(u.shape,u.style.lineWidth),u.anid=o+"_"+e[l].tickValue,i.push(u)}return i}const ZN=HN;function KN(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(e,t,n){var r=t.getComponent("tooltip"),o=t.getComponent("axisPointer"),i=o.get("link",!0)||[],a=[];Ru(n.getCoordinateSystems(),(function(n){if(n.axisPointerEnabled){var s=eO(n.model),l=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var c=n.model.getModel("tooltip",r);if(Ru(n.getAxes(),Fu(p,!1,null)),n.getTooltipAxes&&r&&c.get("show")){var u="axis"===c.get("trigger"),d="cross"===c.get(["axisPointer","type"]),h=n.getTooltipAxes(c.get(["axisPointer","axis"]));(u||d)&&Ru(h.baseAxes,Fu(p,!d||"cross",u)),d&&Ru(h.otherAxes,Fu(p,"cross",!1))}}function p(r,s,u){var d=u.model.getModel("axisPointer",o),h=d.get("show");if(h&&("auto"!==h||r||JN(d))){null==s&&(s=d.get("triggerTooltip")),d=r?function(e,t,n,r,o,i){var a=t.getModel("axisPointer"),s={};Ru(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(e){s[e]=Cu(a.get(e))})),s.snap="category"!==e.type&&!!i,"cross"===a.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===o){var c=a.get(["label","show"]);if(l.show=null==c||c,!i){var u=s.lineStyle=a.get("crossStyle");u&&Du(l,u.textStyle)}}return e.model.getModel("axisPointer",new Yb(s,n,r))}(u,c,o,t,r,s):d;var p=d.get("snap"),f=d.get("triggerEmphasis"),g=eO(u.model),m=s||p||"category"===u.type,v=e.axesInfo[g]={key:g,axis:u,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:f,involveSeries:m,snap:p,useHandle:JN(d),seriesModels:[],linkGroup:null};l[g]=v,e.seriesInvolved=e.seriesInvolved||m;var y=function(e,t){for(var n=t.model,r=t.dim,o=0;o<e.length;o++){var i=e[o]||{};if($N(i[r+"AxisId"],n.id)||$N(i[r+"AxisIndex"],n.componentIndex)||$N(i[r+"AxisName"],n.name))return o}}(i,u);if(null!=y){var x=a[y]||(a[y]={axesInfo:{}});x.axesInfo[g]=v,x.mapper=i[y].mapper,v.linkGroup=x}}}}))}(n,e,t),n.seriesInvolved&&function(e,t){t.eachSeries((function(t){var n=t.coordinateSystem,r=t.get(["tooltip","trigger"],!0),o=t.get(["tooltip","show"],!0);n&&"none"!==r&&!1!==r&&"item"!==r&&!1!==o&&!1!==t.get(["axisPointer","show"],!0)&&Ru(e.coordSysAxesInfo[eO(n.model)],(function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),null==e.seriesDataCount&&(e.seriesDataCount=0),e.seriesDataCount+=t.getData().count())}))}))}(n,e),n}function $N(e,t){return"all"===e||Vu(e)&&ju(e,t)>=0||e===t}function QN(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[eO(e)]}function JN(e){return!!e.get(["handle","show"])}function eO(e){return e.type+"||"+e.id}var tO={},nO=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.render=function(t,n,r,o){this.axisPointerClass&&function(e){var t=QN(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,o=n.option,i=n.get("status"),a=n.get("value");null!=a&&(a=r.parse(a));var s=JN(n);null==i&&(o.status=s?"show":"hide");var l=r.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a<l[0]&&(a=l[0]),o.value=a,s&&(o.status=t.axis.scale.isBlank()?"hide":"show")}}(t),e.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,r,!0)},t.prototype.updateAxisPointer=function(e,t,n,r){this._doUpdateAxisPointerClass(e,n,!1)},t.prototype.remove=function(e,t){var n=this._axisPointer;n&&n.remove(t)},t.prototype.dispose=function(t,n){this._disposeAxisPointer(n),e.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(e,n,r){var o=t.getAxisPointerClass(this.axisPointerClass);if(o){var i=function(e){var t=QN(e);return t&&t.axisPointerModel}(e);i?(this._axisPointer||(this._axisPointer=new o)).render(e,i,n,r):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,t){tO[e]=t},t.getAxisPointerClass=function(e){return e&&tO[e]},t.type="axis",t}(tk);const rO=nO;var oO=jm();function iO(e,t,n,r){var o=n.axis;if(!o.scale.isBlank()){var i=n.getModel("splitArea"),a=i.getModel("areaStyle"),s=a.get("color"),l=r.coordinateSystem.getRect(),c=o.getTicksCoords({tickModel:i,clamp:!0});if(c.length){var u=s.length,d=oO(e).splitAreaColors,h=dd(),p=0;if(d)for(var f=0;f<c.length;f++){var g=d.get(c[f].tickValue);if(null!=g){p=(g+(u-1)*f)%u;break}}var m=o.toGlobalCoord(c[0].coord),v=a.getAreaStyle();s=Vu(s)?s:[s];for(f=1;f<c.length;f++){var y=o.toGlobalCoord(c[f].coord),x=void 0,b=void 0,w=void 0,S=void 0;o.isHorizontal()?(x=m,b=l.y,w=y-x,S=l.height,m=x+w):(x=l.x,b=m,w=l.width,m=b+(S=y-b));var _=c[f-1].tickValue;null!=_&&h.set(_,p),t.add(new Gy({anid:null!=_?"area_"+_:null,shape:{x:x,y:b,width:w,height:S},style:Du({fill:s[p]},v),autoBatch:!0,silent:!0})),p=(p+1)%u}oO(e).splitAreaColors=h}}}function aO(e){oO(e).splitAreaColors=null}var sO=["axisLine","axisTickLabel","axisName"],lO=["splitArea","splitLine","minorSplitLine"],cO=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="CartesianAxisPointer",n}return ru(t,e),t.prototype.render=function(t,n,r,o){this.group.removeAll();var i=this._axisGroup;if(this._axisGroup=new Fg,this.group.add(this._axisGroup),t.get("show")){var a=t.getCoordSysModel(),s=PN(a,t),l=new ZN(t,Tu({handleAutoShown:function(e){for(var n=a.coordinateSystem.getCartesians(),r=0;r<n.length;r++)if(yE(n[r].getOtherAxis(t.axis).scale))return!0;return!1}},s));Ru(sO,l.add,l),this._axisGroup.add(l.getGroup()),Ru(lO,(function(e){t.get([e,"show"])&&uO[e](this,this._axisGroup,t,a)}),this),o&&"changeAxisOrder"===o.type&&o.isInitSort||YC(i,this._axisGroup,t),e.prototype.render.call(this,t,n,r,o)}},t.prototype.remove=function(){aO(this)},t.type="cartesianAxis",t}(rO),uO={splitLine:function(e,t,n,r){var o=n.axis;if(!o.scale.isBlank()){var i=n.getModel("splitLine"),a=i.getModel("lineStyle"),s=a.get("color");s=Vu(s)?s:[s];for(var l=r.coordinateSystem.getRect(),c=o.isHorizontal(),u=0,d=o.getTicksCoords({tickModel:i}),h=[],p=[],f=a.getLineStyle(),g=0;g<d.length;g++){var m=o.toGlobalCoord(d[g].coord);c?(h[0]=m,h[1]=l.y,p[0]=m,p[1]=l.y+l.height):(h[0]=l.x,h[1]=m,p[0]=l.x+l.width,p[1]=m);var v=u++%s.length,y=d[g].tickValue,x=new oC({anid:null!=y?"line_"+d[g].tickValue:null,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:p[0],y2:p[1]},style:Du({stroke:s[v]},f),silent:!0});FC(x.shape,f.lineWidth),t.add(x)}}},minorSplitLine:function(e,t,n,r){var o=n.axis,i=n.getModel("minorSplitLine").getModel("lineStyle"),a=r.coordinateSystem.getRect(),s=o.isHorizontal(),l=o.getMinorTicksCoords();if(l.length)for(var c=[],u=[],d=i.getLineStyle(),h=0;h<l.length;h++)for(var p=0;p<l[h].length;p++){var f=o.toGlobalCoord(l[h][p].coord);s?(c[0]=f,c[1]=a.y,u[0]=f,u[1]=a.y+a.height):(c[0]=a.x,c[1]=f,u[0]=a.x+a.width,u[1]=f);var g=new oC({anid:"minor_line_"+l[h][p].tickValue,autoBatch:!0,shape:{x1:c[0],y1:c[1],x2:u[0],y2:u[1]},style:d,silent:!0});FC(g.shape,d.lineWidth),t.add(g)}},splitArea:function(e,t,n,r){iO(e,t,n,r)}},dO=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.type="xAxis",t}(cO),hO=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=dO.type,t}return ru(t,e),t.type="yAxis",t}(cO);var pO=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="grid",t}return ru(t,e),t.prototype.render=function(e,t){this.group.removeAll(),e.get("show")&&this.group.add(new Gy({shape:e.coordinateSystem.getRect(),style:Du({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t}(tk),fO={offset:0};function gO(e){e.registerComponentView(pO),e.registerComponentModel(rE),e.registerCoordinateSystem("cartesian2d",VN),fE(e,"x",iE,fO),fE(e,"y",iE,fO),e.registerComponentView(dO),e.registerComponentView(hO),e.registerPreprocessor((function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})}))}function mO(e){e.eachSeriesByType("radar",(function(e){var t=e.getData(),n=[],r=e.coordinateSystem;if(r){var o=r.getIndicatorAxes();Ru(o,(function(e,i){t.each(t.mapDimension(o[i].dim),(function(e,t){n[t]=n[t]||[];var o=r.dataToPoint(e,i);n[t][i]=vO(o)?o:yO(r)}))})),t.each((function(e){var o=function(e,t,n){if(e&&t)for(var r=0,o=e.length;r<o;r++)if(t.call(n,e[r],r,e))return e[r]}(n[e],(function(e){return vO(e)}))||yO(r);n[e].push(o.slice()),t.setItemLayout(e,n[e])}))}}))}function vO(e){return!isNaN(e[0])&&!isNaN(e[1])}function yO(e){return[e.cx,e.cy]}function xO(e){var t=e.polar;if(t){Vu(t)||(t=[t]);var n=[];Ru(t,(function(t,r){t.indicator?(t.type&&!t.shape&&(t.shape=t.type),e.radar=e.radar||[],Vu(e.radar)||(e.radar=[e.radar]),e.radar.push(t)):n.push(t)})),e.polar=n}Ru(e.series,(function(e){e&&"radar"===e.type&&e.polarIndex&&(e.radarIndex=e.polarIndex)}))}var bO=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=n.type,e}return ru(n,t),n.prototype.render=function(t,n,r){var o=t.coordinateSystem,i=this.group,a=t.getData(),s=this._data;function l(e,t){var n=e.getItemVisual(t,"symbol")||"circle";if("none"!==n){var r=wI(e.getItemVisual(t,"symbolSize")),o=bI(n,-1,-1,2,2),i=e.getItemVisual(t,"symbolRotate")||0;return o.attr({style:{strokeNoScale:!0},z2:100,scaleX:r[0]/2,scaleY:r[1]/2,rotation:i*Math.PI/180||0}),o}}function c(n,r,o,i,a,s){o.removeAll();for(var c=0;c<r.length-1;c++){var u=l(i,a);u&&(u.__dimIdx=c,n[c]?(u.setPosition(n[c]),e[s?"initProps":"updateProps"](u,{x:r[c][0],y:r[c][1]},t,a)):u.setPosition(r[c]),o.add(u))}}function u(e){return Eu(e,(function(e){return[o.cx,o.cy]}))}a.diff(s).add((function(e){var n=a.getItemLayout(e);if(n){var r=new $k,o=new eC,i={shape:{points:n}};r.shape.points=u(n),o.shape.points=u(n),fb(r,i,t,e),fb(o,i,t,e);var s=new Fg,l=new Fg;s.add(o),s.add(r),s.add(l),c(o.shape.points,n,l,a,e,!0),a.setItemGraphicEl(e,s)}})).update((function(e,n){var r=s.getItemGraphicEl(n),o=r.childAt(0),i=r.childAt(1),l=r.childAt(2),u={shape:{points:a.getItemLayout(e)}};u.shape.points&&(c(o.shape.points,u.shape.points,l,a,e,!1),xb(i),xb(o),pb(o,u,t),pb(i,u,t),a.setItemGraphicEl(e,r))})).remove((function(e){i.remove(s.getItemGraphicEl(e))})).execute(),a.eachItemGraphicEl((function(e,t){var n=a.getItemModel(t),r=e.childAt(0),o=e.childAt(1),s=e.childAt(2),l=a.getItemVisual(t,"style"),c=l.fill;i.add(e),r.useStyle(Du(n.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:c})),ib(r,n,"lineStyle"),ib(o,n,"areaStyle");var u=n.getModel("areaStyle"),d=u.isEmpty()&&u.parentModel.isEmpty();o.ignore=d,Ru(["emphasis","select","blur"],(function(e){var t=n.getModel([e,"areaStyle"]),r=t.isEmpty()&&t.parentModel.isEmpty();o.ensureState(e).ignore=r&&d})),o.useStyle(Du(u.getAreaStyle(),{fill:c,opacity:.7,decal:l.decal}));var h=n.getModel("emphasis"),p=h.getModel("itemStyle").getItemStyle();s.eachChild((function(e){if(e instanceof Ny){var r=e.style;e.useStyle(Tu({image:r.image,x:r.x,y:r.y,width:r.width,height:r.height},l))}else e.useStyle(l),e.setColor(c),e.style.strokeNoScale=!0;e.ensureState("emphasis").style=Cu(p);var o=a.getStore().get(a.getDimensionIndex(e.__dimIdx),t);(null==o||isNaN(o))&&(o=""),_b(e,Ab(n),{labelFetcher:a.hostModel,labelDataIndex:t,labelDimIndex:e.__dimIdx,defaultText:o,inheritColor:c,defaultOpacity:l.opacity})})),tb(e,h.get("focus"),h.get("blurScope"),h.get("disabled"))})),this._data=a},n.prototype.remove=function(){this.group.removeAll(),this._data=null},n.type="radar",n}(dM);const wO=bO;var SO=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return ru(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new qR(Bu(this.getData,this),Bu(this.getRawData,this))},t.prototype.getInitialData=function(e,t){return XR(this,{generateCoord:"indicator_",generateCoordCount:1/0})},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),o=this.coordinateSystem.getIndicatorAxes(),i=this.getData().getName(e),a=""===i?this.name:i,s=zA(this,e);return TA("section",{header:a,sortBlocks:!0,blocks:Eu(o,(function(t){var n=r.get(r.mapDimension(t.dim),e);return TA("nameValue",{markerType:"subItem",markerColor:s,name:t.name,value:n,sortParam:n})}))})},t.prototype.getTooltipPosition=function(e){if(null!=e)for(var t=this.getData(),n=this.coordinateSystem,r=t.getValues(Eu(n.dimensions,(function(e){return t.mapDimension(e)})),e),o=0,i=r.length;o<i;o++)if(!isNaN(r[o])){var a=n.getIndicatorAxes();return n.coordToPoint(a[o].dataToCoord(r[o]),o)}},t.type="series.radar",t.dependencies=["radar"],t.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},t}(JA);const _O=SO;var AO=cE.value;function kO(e,t){return Du({show:t},e)}var CO=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.optionUpdated=function(){var e=this.get("boundaryGap"),t=this.get("splitNumber"),n=this.get("scale"),r=this.get("axisLine"),o=this.get("axisTick"),i=this.get("axisLabel"),a=this.get("axisName"),s=this.get(["axisName","show"]),l=this.get(["axisName","formatter"]),c=this.get("axisNameGap"),u=this.get("triggerEvent"),d=Eu(this.get("indicator")||[],(function(d){null!=d.max&&d.max>0&&!d.min?d.min=0:null!=d.min&&d.min<0&&!d.max&&(d.max=0);var h=a;null!=d.color&&(h=Du({color:d.color},a));var p=Mu(Cu(d),{boundaryGap:e,splitNumber:t,scale:n,axisLine:r,axisTick:o,axisLabel:i,name:d.text,showName:s,nameLocation:"end",nameGap:c,nameTextStyle:h,triggerEvent:u},!1);if(Hu(l)){var f=p.name;p.name=l.replace("{value}",null!=f?f:"")}else Wu(l)&&(p.name=l(p.name,p));var g=new Yb(p,null,this.ecModel);return Pu(g,oE.prototype),g.mainType="radar",g.componentIndex=this.componentIndex,g}),this);this._indicatorModels=d},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type="radar",t.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:Mu({lineStyle:{color:"#bbb"}},AO.axisLine),axisLabel:kO(AO.axisLabel,!1),axisTick:kO(AO.axisTick,!1),splitLine:kO(AO.splitLine,!0),splitArea:kO(AO.splitArea,!0),indicator:[]},t}(rS);const MO=CO;var IO=["axisLine","axisTickLabel","axisName"],TO=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.render=function(e,t,n){this.group.removeAll(),this._buildAxes(e),this._buildSplitLineAndArea(e)},t.prototype._buildAxes=function(e){var t=e.coordinateSystem;Ru(Eu(t.getIndicatorAxes(),(function(e){var n=e.model.get("showName")?e.name:"";return new ZN(e.model,{axisName:n,position:[t.cx,t.cy],rotation:e.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})})),(function(e){Ru(IO,e.add,e),this.group.add(e.getGroup())}),this)},t.prototype._buildSplitLineAndArea=function(e){var t=e.coordinateSystem,n=t.getIndicatorAxes();if(n.length){var r=e.get("shape"),o=e.getModel("splitLine"),i=e.getModel("splitArea"),a=o.getModel("lineStyle"),s=i.getModel("areaStyle"),l=o.get("show"),c=i.get("show"),u=a.get("color"),d=s.get("color"),h=Vu(u)?u:[u],p=Vu(d)?d:[d],f=[],g=[];if("circle"===r)for(var m=n[0].getTicksCoords(),v=t.cx,y=t.cy,x=0;x<m.length;x++){if(l)f[M(f,h,x)].push(new kk({shape:{cx:v,cy:y,r:m[x].coord}}));if(c&&x<m.length-1)g[M(g,p,x)].push(new Yk({shape:{cx:v,cy:y,r0:m[x].coord,r:m[x+1].coord}}))}else{var b,w=Eu(n,(function(e,n){var r=e.getTicksCoords();return b=null==b?r.length-1:Math.min(r.length-1,b),Eu(r,(function(e){return t.coordToPoint(e.coord,n)}))})),S=[];for(x=0;x<=b;x++){for(var _=[],A=0;A<n.length;A++)_.push(w[A][x]);if(_[0]&&_.push(_[0].slice()),l)f[M(f,h,x)].push(new eC({shape:{points:_}}));if(c&&S)g[M(g,p,x-1)].push(new $k({shape:{points:_.concat(S)}}));S=_.slice().reverse()}}var k=a.getLineStyle(),C=s.getAreaStyle();Ru(g,(function(e,t){this.group.add(zC(e,{style:Du({stroke:"none",fill:p[t%p.length]},C),silent:!0}))}),this),Ru(f,(function(e,t){this.group.add(zC(e,{style:Du({fill:"none",stroke:h[t%h.length]},k),silent:!0}))}),this)}function M(e,t,n){var r=n%t.length;return e[r]=e[r]||[],r}},t.type="radar",t}(tk);const DO=TO;var jO=function(e){function t(t,n,r){var o=e.call(this,t,n,r)||this;return o.type="value",o.angle=0,o.name="",o}return ru(t,e),t}(TN);const PO=jO;var LO=function(){function e(e,t,n){this.dimensions=[],this._model=e,this._indicatorAxes=Eu(e.getIndicatorModels(),(function(e,t){var n="indicator_"+t,r=new PO(n,new DE);return r.name=e.get("name"),r.model=e,e.axis=r,this.dimensions.push(n),r}),this),this.resize(e,n)}return e.prototype.getIndicatorAxes=function(){return this._indicatorAxes},e.prototype.dataToPoint=function(e,t){var n=this._indicatorAxes[t];return this.coordToPoint(n.dataToCoord(e),t)},e.prototype.coordToPoint=function(e,t){var n=this._indicatorAxes[t].angle;return[this.cx+e*Math.cos(n),this.cy-e*Math.sin(n)]},e.prototype.pointToData=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,r=Math.sqrt(t*t+n*n);t/=r,n/=r;for(var o,i=Math.atan2(-n,t),a=1/0,s=-1,l=0;l<this._indicatorAxes.length;l++){var c=this._indicatorAxes[l],u=Math.abs(i-c.angle);u<a&&(o=c,s=l,a=u)}return[s,+(o&&o.coordToData(r))]},e.prototype.resize=function(e,t){var n=e.get("center"),r=t.getWidth(),o=t.getHeight(),i=Math.min(r,o)/2;this.cx=Zg(n[0],r),this.cy=Zg(n[1],o),this.startAngle=e.get("startAngle")*Math.PI/180;var a=e.get("radius");(Hu(a)||Uu(a))&&(a=[0,a]),this.r0=Zg(a[0],i),this.r=Zg(a[1],i),Ru(this._indicatorAxes,(function(e,t){e.setExtent(this.r0,this.r);var n=this.startAngle+t*Math.PI*2/this._indicatorAxes.length;n=Math.atan2(Math.sin(n),Math.cos(n)),e.angle=n}),this)},e.prototype.update=function(e,t){var n=this._indicatorAxes,r=this._model;Ru(n,(function(e){e.scale.setExtent(1/0,-1/0)})),e.eachSeriesByType("radar",(function(t,o){if("radar"===t.get("coordinateSystem")&&e.getComponent("radar",t.get("radarIndex"))===r){var i=t.getData();Ru(n,(function(e){e.scale.unionExtentFromData(i,i.mapDimension(e.dim))}))}}),this);var o=r.get("splitNumber"),i=new DE;i.setExtent(0,o),i.setInterval(1),Ru(n,(function(e,t){NN(e.scale,e.model,i)}))},e.prototype.convertToPixel=function(e,t,n){return console.warn("Not implemented."),null},e.prototype.convertFromPixel=function(e,t,n){return console.warn("Not implemented."),null},e.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},e.create=function(t,n){var r=[];return t.eachComponent("radar",(function(o){var i=new e(o,t,n);r.push(i),o.coordinateSystem=i})),t.eachSeriesByType("radar",(function(e){"radar"===e.get("coordinateSystem")&&(e.coordinateSystem=r[e.get("radarIndex")||0])})),r},e.dimensions=[],e}();const RO=LO;function EO(e){e.registerCoordinateSystem("radar",RO),e.registerComponentModel(MO),e.registerComponentView(DO),e.registerVisual({seriesType:"radar",reset:function(e){var t=e.getData();t.each((function(e){t.setItemVisual(e,"legendIcon","roundRect")})),t.setVisual("legendIcon","roundRect")}})}var NO="\0_ec_interaction_mutex";function OO(e,t){return!!zO(e)[t]}function zO(e){return e[NO]||(e[NO]={})}tD({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},md);var BO=function(e){function t(t){var n=e.call(this)||this;n._zr=t;var r=Bu(n._mousedownHandler,n),o=Bu(n._mousemoveHandler,n),i=Bu(n._mouseupHandler,n),a=Bu(n._mousewheelHandler,n),s=Bu(n._pinchHandler,n);return n.enable=function(e,n){this.disable(),this._opt=Du(Cu(n)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==e&&(e=!0),!0!==e&&"move"!==e&&"pan"!==e||(t.on("mousedown",r),t.on("mousemove",o),t.on("mouseup",i)),!0!==e&&"scale"!==e&&"zoom"!==e||(t.on("mousewheel",a),t.on("pinch",s))},n.disable=function(){t.off("mousedown",r),t.off("mousemove",o),t.off("mouseup",i),t.off("mousewheel",a),t.off("pinch",s)},n}return ru(t,e),t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype.setPointerChecker=function(e){this.pointerChecker=e},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!lh(e)){for(var t=e.target;t;){if(t.draggable)return;t=t.__hostTarget||t.parent}var n=e.offsetX,r=e.offsetY;this.pointerChecker&&this.pointerChecker(e,n,r)&&(this._x=n,this._y=r,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){if(this._dragging&&WO("moveOnMouseMove",e,this._opt)&&"pinch"!==e.gestureEvent&&!OO(this._zr,"globalPan")){var t=e.offsetX,n=e.offsetY,r=this._x,o=this._y,i=t-r,a=n-o;this._x=t,this._y=n,this._opt.preventDefaultMouseMove&&sh(e.event),VO(this,"pan","moveOnMouseMove",e,{dx:i,dy:a,oldX:r,oldY:o,newX:t,newY:n,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){lh(e)||(this._dragging=!1)},t.prototype._mousewheelHandler=function(e){var t=WO("zoomOnMouseWheel",e,this._opt),n=WO("moveOnMouseWheel",e,this._opt),r=e.wheelDelta,o=Math.abs(r),i=e.offsetX,a=e.offsetY;if(0!==r&&(t||n)){if(t){var s=o>3?1.4:o>1?1.2:1.1;FO(this,"zoom","zoomOnMouseWheel",e,{scale:r>0?s:1/s,originX:i,originY:a,isAvailableBehavior:null})}if(n){var l=Math.abs(r);FO(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:(r>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:i,originY:a,isAvailableBehavior:null})}}},t.prototype._pinchHandler=function(e){OO(this._zr,"globalPan")||FO(this,"zoom",null,e,{scale:e.pinchScale>1?1.1:1/1.1,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})},t}(Wd);function FO(e,t,n,r,o){e.pointerChecker&&e.pointerChecker(r,o.originX,o.originY)&&(sh(r.event),VO(e,t,n,r,o))}function VO(e,t,n,r,o){o.isAvailableBehavior=Bu(WO,null,n,r),e.trigger(t,o)}function WO(e,t,n){var r=n[e];return!e||r&&(!Hu(r)||t.event[r+"Key"])}const HO=BO;function GO(e,t,n){var r=e.target;r.x+=t,r.y+=n,r.dirty()}function UO(e,t,n,r){var o=e.target,i=e.zoomLimit,a=e.zoom=e.zoom||1;if(a*=t,i){var s=i.min||0,l=i.max||1/0;a=Math.max(Math.min(l,a),s)}var c=a/e.zoom;e.zoom=a,o.x-=(n-o.x)*(c-1),o.y-=(r-o.y)*(c-1),o.scaleX*=c,o.scaleY*=c,o.dirty()}var XO,YO={axisPointer:1,tooltip:1,brush:1};function qO(e,t,n){var r=t.getComponentByElement(e.topTarget),o=r&&r.coordinateSystem;return r&&r!==n&&!YO.hasOwnProperty(r.mainType)&&o&&o.model!==n}function ZO(e){Hu(e)&&(e=(new DOMParser).parseFromString(e,"text/xml"));var t=e;for(9===t.nodeType&&(t=t.firstChild);"svg"!==t.nodeName.toLowerCase()||1!==t.nodeType;)t=t.nextSibling;return t}var KO={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},$O=zu(KO),QO={"alignment-baseline":"textBaseline","stop-color":"stopColor"},JO=zu(QO),ez=function(){function e(){this._defs={},this._root=null}return e.prototype.parse=function(e,t){t=t||{};var n=ZO(e);this._defsUsePending=[];var r=new Fg;this._root=r;var o=[],i=n.getAttribute("viewBox")||"",a=parseFloat(n.getAttribute("width")||t.width),s=parseFloat(n.getAttribute("height")||t.height);isNaN(a)&&(a=null),isNaN(s)&&(s=null),az(n,r,null,!0,!1);for(var l,c,u=n.firstChild;u;)this._parseNode(u,r,o,null,!1,!1),u=u.nextSibling;if(function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r[0].style[r[1]]=e[r[2]]}}(this._defs,this._defsUsePending),this._defsUsePending=[],i){var d=uz(i);d.length>=4&&(l={x:parseFloat(d[0]||0),y:parseFloat(d[1]||0),width:parseFloat(d[2]),height:parseFloat(d[3])})}if(l&&null!=a&&null!=s&&(c=gz(l,{x:0,y:0,width:a,height:s}),!t.ignoreViewBox)){var h=r;(r=new Fg).add(h),h.scaleX=h.scaleY=c.scale,h.x=c.x,h.y=c.y}return t.ignoreRootClip||null==a||null==s||r.setClipPath(new Gy({shape:{x:0,y:0,width:a,height:s}})),{root:r,width:a,height:s,viewBoxRect:l,viewBoxTransform:c,named:o}},e.prototype._parseNode=function(e,t,n,r,o,i){var a,s=e.nodeName.toLowerCase(),l=r;if("defs"===s&&(o=!0),"text"===s&&(i=!0),"defs"===s||"switch"===s)a=t;else{if(!o){var c=XO[s];if(c&&gd(XO,s)){a=c.call(this,e,t);var u=e.getAttribute("name");if(u){var d={name:u,namedFrom:null,svgNodeTagLower:s,el:a};n.push(d),"g"===s&&(l=d)}else r&&n.push({name:r.name,namedFrom:r,svgNodeTagLower:s,el:a});t.add(a)}}var h=tz[s];if(h&&gd(tz,s)){var p=h.call(this,e),f=e.getAttribute("id");f&&(this._defs[f]=p)}}if(a&&a.isGroup)for(var g=e.firstChild;g;)1===g.nodeType?this._parseNode(g,a,n,l,o,i):3===g.nodeType&&i&&this._parseText(g,a),g=g.nextSibling},e.prototype._parseText=function(e,t){var n=new Py({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});oz(t,n),az(e,n,this._defsUsePending,!1,!1),function(e,t){var n=t.__selfStyle;if(n){var r=n.textBaseline,o=r;r&&"auto"!==r?"baseline"===r?o="alphabetic":"before-edge"===r||"text-before-edge"===r?o="top":"after-edge"===r||"text-after-edge"===r?o="bottom":"central"!==r&&"mathematical"!==r||(o="middle"):o="alphabetic",e.style.textBaseline=o}var i=t.__inheritedStyle;if(i){var a=i.textAlign,s=a;a&&("middle"===a&&(s="center"),e.style.textAlign=s)}}(n,t);var r=n.style,o=r.fontSize;o&&o<9&&(r.fontSize=9,n.scaleX*=o/9,n.scaleY*=o/9);var i=(r.fontSize||r.fontFamily)&&[r.fontStyle,r.fontWeight,(r.fontSize||12)+"px",r.fontFamily||"sans-serif"].join(" ");r.font=i;var a=n.getBoundingRect();return this._textX+=a.width,t.add(n),n},e.internalField=void(XO={g:function(e,t){var n=new Fg;return oz(t,n),az(e,n,this._defsUsePending,!1,!1),n},rect:function(e,t){var n=new Gy;return oz(t,n),az(e,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(e,t){var n=new kk;return oz(t,n),az(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),n.silent=!0,n},line:function(e,t){var n=new oC;return oz(t,n),az(e,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(e,t){var n=new Ik;return oz(t,n),az(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(e,t){var n,r=e.getAttribute("points");r&&(n=iz(r));var o=new $k({shape:{points:n||[]},silent:!0});return oz(t,o),az(e,o,this._defsUsePending,!1,!1),o},polyline:function(e,t){var n,r=e.getAttribute("points");r&&(n=iz(r));var o=new eC({shape:{points:n||[]},silent:!0});return oz(t,o),az(e,o,this._defsUsePending,!1,!1),o},image:function(e,t){var n=new Ny;return oz(t,n),az(e,n,this._defsUsePending,!1,!1),n.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),n.silent=!0,n},text:function(e,t){var n=e.getAttribute("x")||"0",r=e.getAttribute("y")||"0",o=e.getAttribute("dx")||"0",i=e.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(o),this._textY=parseFloat(r)+parseFloat(i);var a=new Fg;return oz(t,a),az(e,a,this._defsUsePending,!1,!0),a},tspan:function(e,t){var n=e.getAttribute("x"),r=e.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=r&&(this._textY=parseFloat(r));var o=e.getAttribute("dx")||"0",i=e.getAttribute("dy")||"0",a=new Fg;return oz(t,a),az(e,a,this._defsUsePending,!1,!0),this._textX+=parseFloat(o),this._textY+=parseFloat(i),a},path:function(e,t){var n=wk(e.getAttribute("d")||"");return oz(t,n),az(e,n,this._defsUsePending,!1,!1),n.silent=!0,n}}),e}(),tz={lineargradient:function(e){var t=parseInt(e.getAttribute("x1")||"0",10),n=parseInt(e.getAttribute("y1")||"0",10),r=parseInt(e.getAttribute("x2")||"10",10),o=parseInt(e.getAttribute("y2")||"0",10),i=new mC(t,n,r,o);return nz(e,i),rz(e,i),i},radialgradient:function(e){var t=parseInt(e.getAttribute("cx")||"0",10),n=parseInt(e.getAttribute("cy")||"0",10),r=parseInt(e.getAttribute("r")||"0",10),o=new vC(t,n,r);return nz(e,o),rz(e,o),o}};function nz(e,t){"userSpaceOnUse"===e.getAttribute("gradientUnits")&&(t.global=!0)}function rz(e,t){for(var n=e.firstChild;n;){if(1===n.nodeType&&"stop"===n.nodeName.toLocaleLowerCase()){var r=n.getAttribute("offset"),o=void 0;o=r&&r.indexOf("%")>0?parseInt(r,10)/100:r?parseFloat(r):0;var i={};fz(n,i,i);var a=i.stopColor||n.getAttribute("stop-color")||"#000000";t.colorStops.push({offset:o,color:a})}n=n.nextSibling}}function oz(e,t){e&&e.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),Du(t.__inheritedStyle,e.__inheritedStyle))}function iz(e){for(var t=uz(e),n=[],r=0;r<t.length;r+=2){var o=parseFloat(t[r]),i=parseFloat(t[r+1]);n.push([o,i])}return n}function az(e,t,n,r,o){var i=t,a=i.__inheritedStyle=i.__inheritedStyle||{},s={};1===e.nodeType&&(function(e,t){var n=e.getAttribute("transform");if(n){n=n.replace(/,/g," ");var r=[],o=null;n.replace(dz,(function(e,t,n){return r.push(t,n),""}));for(var i=r.length-1;i>0;i-=2){var a=r[i],s=r[i-1],l=uz(a);switch(o=o||[1,0,0,1,0,0],s){case"translate":gh(o,o,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":vh(o,o,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":mh(o,o,-parseFloat(l[0])*hz,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":fh(o,[1,0,Math.tan(parseFloat(l[0])*hz),1,0,0],o);break;case"skewY":fh(o,[1,Math.tan(parseFloat(l[0])*hz),0,1,0,0],o);break;case"matrix":o[0]=parseFloat(l[0]),o[1]=parseFloat(l[1]),o[2]=parseFloat(l[2]),o[3]=parseFloat(l[3]),o[4]=parseFloat(l[4]),o[5]=parseFloat(l[5])}}t.setLocalTransform(o)}}(e,t),fz(e,a,s),r||function(e,t,n){for(var r=0;r<$O.length;r++){var o=$O[r];null!=(i=e.getAttribute(o))&&(t[KO[o]]=i)}for(r=0;r<JO.length;r++){var i;o=JO[r];null!=(i=e.getAttribute(o))&&(n[QO[o]]=i)}}(e,a,s)),i.style=i.style||{},null!=a.fill&&(i.style.fill=lz(i,"fill",a.fill,n)),null!=a.stroke&&(i.style.stroke=lz(i,"stroke",a.stroke,n)),Ru(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],(function(e){null!=a[e]&&(i.style[e]=parseFloat(a[e]))})),Ru(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],(function(e){null!=a[e]&&(i.style[e]=a[e])})),o&&(i.__selfStyle=s),a.lineDash&&(i.style.lineDash=Eu(uz(a.lineDash),(function(e){return parseFloat(e)}))),"hidden"!==a.visibility&&"collapse"!==a.visibility||(i.invisible=!0),"none"===a.display&&(i.ignore=!0)}var sz=/^url\(\s*#(.*?)\)/;function lz(e,t,n,r){var o=n&&n.match(sz);if(!o)return"none"===n&&(n=null),n;var i=od(o[1]);r.push([e,t,i])}var cz=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function uz(e){return e.match(cz)||[]}var dz=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,hz=Math.PI/180;var pz=/([^\s:;]+)\s*:\s*([^:;]+)/g;function fz(e,t,n){var r,o=e.getAttribute("style");if(o)for(pz.lastIndex=0;null!=(r=pz.exec(o));){var i=r[1],a=gd(KO,i)?KO[i]:null;a&&(t[a]=r[2]);var s=gd(QO,i)?QO[i]:null;s&&(n[s]=r[2])}}function gz(e,t){var n=t.width/e.width,r=t.height/e.height,o=Math.min(n,r);return{scale:o,x:-(e.x+e.width/2)*o+(t.x+t.width/2),y:-(e.y+e.height/2)*o+(t.y+t.height/2)}}var mz=1e-8;function vz(e,t){return Math.abs(e-t)<mz}function yz(e,t,n){var r=0,o=e[0];if(!o)return!1;for(var i=1;i<e.length;i++){var a=e[i];r+=fy(o[0],o[1],a[0],a[1],t,n),o=a}var s=e[0];return vz(o[0],s[0])&&vz(o[1],s[1])||(r+=fy(o[0],o[1],s[0],s[1],t,n)),0!==r}var xz=[];function bz(e,t){for(var n=0;n<e.length;n++)Ed(e[n],e[n],t)}function wz(e,t,n,r){for(var o=0;o<e.length;o++){var i=e[o];r&&(i=r.project(i)),i&&isFinite(i[0])&&isFinite(i[1])&&(Nd(t,t,i),Od(n,n,i))}}var Sz=function(){function e(e){this.name=e}return e.prototype.setCenter=function(e){this._center=e},e.prototype.getCenter=function(){var e=this._center;return e||(e=this._center=this.calcCenter()),e},e}(),_z=function(e,t){this.type="polygon",this.exterior=e,this.interiors=t},Az=function(e){this.type="linestring",this.points=e},kz=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.type="geoJSON",o.geometries=n,o._center=r&&[r[0],r[1]],o}return ru(t,e),t.prototype.calcCenter=function(){for(var e,t=this.geometries,n=0,r=0;r<t.length;r++){var o=t[r],i=o.exterior,a=i&&i.length;a>n&&(e=o,n=a)}if(e)return function(e){for(var t=0,n=0,r=0,o=e.length,i=e[o-1][0],a=e[o-1][1],s=0;s<o;s++){var l=e[s][0],c=e[s][1],u=i*c-l*a;t+=u,n+=(i+l)*u,r+=(a+c)*u,i=l,a=c}return t?[n/t/3,r/t/3,t]:[e[0][0]||0,e[0][1]||0]}(e.exterior);var s=this.getBoundingRect();return[s.x+s.width/2,s.y+s.height/2]},t.prototype.getBoundingRect=function(e){var t=this._rect;if(t&&!e)return t;var n=[1/0,1/0],r=[-1/0,-1/0];return Ru(this.geometries,(function(t){"polygon"===t.type?wz(t.exterior,n,r,e):Ru(t.points,(function(t){wz(t,n,r,e)}))})),isFinite(n[0])&&isFinite(n[1])&&isFinite(r[0])&&isFinite(r[1])||(n[0]=n[1]=r[0]=r[1]=0),t=new Dh(n[0],n[1],r[0]-n[0],r[1]-n[1]),e||(this._rect=t),t},t.prototype.contain=function(e){var t=this.getBoundingRect(),n=this.geometries;if(!t.contain(e[0],e[1]))return!1;e:for(var r=0,o=n.length;r<o;r++){var i=n[r];if("polygon"===i.type){var a=i.exterior,s=i.interiors;if(yz(a,e[0],e[1])){for(var l=0;l<(s?s.length:0);l++)if(yz(s[l],e[0],e[1]))continue e;return!0}}}return!1},t.prototype.transformTo=function(e,t,n,r){var o=this.getBoundingRect(),i=o.width/o.height;n?r||(r=n/i):n=i*r;for(var a=new Dh(e,t,n,r),s=o.calculateTransform(a),l=this.geometries,c=0;c<l.length;c++){var u=l[c];"polygon"===u.type?(bz(u.exterior,s),Ru(u.interiors,(function(e){bz(e,s)}))):Ru(u.points,(function(e){bz(e,s)}))}(o=this._rect).copy(a),this._center=[o.x+o.width/2,o.y+o.height/2]},t.prototype.cloneShallow=function(e){null==e&&(e=this.name);var n=new t(e,this.geometries,this._center);return n._rect=this._rect,n.transformTo=null,n},t}(Sz),Cz=function(e){function t(t,n){var r=e.call(this,t)||this;return r.type="geoSVG",r._elOnlyForCalculate=n,r}return ru(t,e),t.prototype.calcCenter=function(){for(var e=this._elOnlyForCalculate,t=e.getBoundingRect(),n=[t.x+t.width/2,t.y+t.height/2],r=hh(xz),o=e;o&&!o.isGeoSVGGraphicRoot;)fh(r,o.getLocalTransform(),r),o=o.parent;return yh(r,r),Ed(n,n,r),n},t}(Sz),Mz=dd(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),Iz=function(){function e(e,t){this.type="geoSVG",this._usedGraphicMap=dd(),this._freedGraphics=[],this._mapName=e,this._parsedXML=ZO(t)}return e.prototype.load=function(){var e=this._firstGraphic;if(!e){e=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(e),this._boundingRect=this._firstGraphic.boundingRect.clone();var t=function(e){var t=[],n=dd();return Ru(e,(function(e){if(null==e.namedFrom){var r=new Cz(e.name,e.el);t.push(r),n.set(e.name,r)}})),{regions:t,regionsMap:n}}(e.named),n=t.regions,r=t.regionsMap;this._regions=n,this._regionsMap=r}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},e.prototype._buildGraphic=function(e){var t,n,r,o;try{rd(null!=(n=(t=e&&(r=e,o={ignoreViewBox:!0,ignoreRootClip:!0},(new ez).parse(r,o))||{}).root))}catch(Bk){throw new Error("Invalid svg format\n"+Bk.message)}var i=new Fg;i.add(n),i.isGeoSVGGraphicRoot=!0;var a=t.width,s=t.height,l=t.viewBoxRect,c=this._boundingRect;if(!c){var u=void 0,d=void 0,h=void 0,p=void 0;if(null!=a?(u=0,h=a):l&&(u=l.x,h=l.width),null!=s?(d=0,p=s):l&&(d=l.y,p=l.height),null==u||null==d){var f=n.getBoundingRect();null==u&&(u=f.x,h=f.width),null==d&&(d=f.y,p=f.height)}c=this._boundingRect=new Dh(u,d,h,p)}if(l){var g=gz(l,c);n.scaleX=n.scaleY=g.scale,n.x=g.x,n.y=g.y}i.setClipPath(new Gy({shape:c.plain()}));var m=[];return Ru(t.named,(function(e){var t;null!=Mz.get(e.svgNodeTagLower)&&(m.push(e),(t=e.el).silent=!1,t.isGroup&&t.traverse((function(e){e.silent=!1})))})),{root:i,boundingRect:c,named:m}},e.prototype.useGraphic=function(e){var t=this._usedGraphicMap,n=t.get(e);return n||(n=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),t.set(e,n),n)},e.prototype.freeGraphic=function(e){var t=this._usedGraphicMap,n=t.get(e);n&&(t.removeKey(e),this._freedGraphics.push(n))},e}();function Tz(e,t,n){for(var r=0;r<e.length;r++)e[r]=Dz(e[r],t[r],n)}function Dz(e,t,n){for(var r=[],o=t[0],i=t[1],a=0;a<e.length;a+=2){var s=e.charCodeAt(a)-64,l=e.charCodeAt(a+1)-64;s=s>>1^-(1&s),l=l>>1^-(1&l),o=s+=o,i=l+=i,r.push([s/n,l/n])}return r}function jz(e,t){return e=function(e){if(!e.UTF8Encoding)return e;var t=e,n=t.UTF8Scale;return null==n&&(n=1024),Ru(t.features,(function(e){var t=e.geometry,r=t.encodeOffsets,o=t.coordinates;if(r)switch(t.type){case"LineString":t.coordinates=Dz(o,r,n);break;case"Polygon":case"MultiLineString":Tz(o,r,n);break;case"MultiPolygon":Ru(o,(function(e,t){return Tz(e,r[t],n)}))}})),t.UTF8Encoding=!1,t}(e),Eu(Ou(e.features,(function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0})),(function(e){var n=e.properties,r=e.geometry,o=[];switch(r.type){case"Polygon":var i=r.coordinates;o.push(new _z(i[0],i.slice(1)));break;case"MultiPolygon":Ru(r.coordinates,(function(e){e[0]&&o.push(new _z(e[0],e.slice(1)))}));break;case"LineString":o.push(new Az([r.coordinates]));break;case"MultiLineString":o.push(new Az(r.coordinates))}var a=new kz(n[t||"name"],o,n.cp);return a.properties=n,a}))}for(var Pz=[126,25],Lz="\u5357\u6d77\u8bf8\u5c9b",Rz=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],Ez=0;Ez<Rz.length;Ez++)for(var Nz=0;Nz<Rz[Ez].length;Nz++)Rz[Ez][Nz][0]/=10.5,Rz[Ez][Nz][1]/=-14,Rz[Ez][Nz][0]+=Pz[0],Rz[Ez][Nz][1]+=Pz[1];var Oz={"\u5357\u6d77\u8bf8\u5c9b":[32,80],"\u5e7f\u4e1c":[0,-10],"\u9999\u6e2f":[10,5],"\u6fb3\u95e8":[-10,10],"\u5929\u6d25":[5,5]};var zz=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];var Bz=function(){function e(e,t,n){var r;this.type="geoJSON",this._parsedMap=dd(),this._mapName=e,this._specialAreas=n,this._geoJSON=Hu(r=t)?"undefined"!==typeof JSON&&JSON.parse?JSON.parse(r):new Function("return ("+r+");")():r}return e.prototype.load=function(e,t){t=t||"name";var n=this._parsedMap.get(t);if(!n){var r=this._parseToRegions(t);n=this._parsedMap.set(t,{regions:r,boundingRect:Fz(r)})}var o=dd(),i=[];return Ru(n.regions,(function(t){var n=t.name;e&&gd(e,n)&&(t=t.cloneShallow(n=e[n])),i.push(t),o.set(n,t)})),{regions:i,boundingRect:n.boundingRect||new Dh(0,0,0,0),regionsMap:o}},e.prototype._parseToRegions=function(e){var t,n=this._mapName,r=this._geoJSON;try{t=r?jz(r,e):[]}catch(Bk){throw new Error("Invalid geoJson format\n"+Bk.message)}return function(e,t){if("china"===e){for(var n=0;n<t.length;n++)if(t[n].name===Lz)return;t.push(new kz(Lz,Eu(Rz,(function(e){return{type:"polygon",exterior:e}})),Pz))}}(n,t),Ru(t,(function(e){var t=e.name;!function(e,t){if("china"===e){var n=Oz[t.name];if(n){var r=t.getCenter();r[0]+=n[0]/10.5,r[1]+=-n[1]/14,t.setCenter(r)}}}(n,e),function(e,t){"china"===e&&"\u53f0\u6e7e"===t.name&&t.geometries.push({type:"polygon",exterior:zz[0]})}(n,e);var r=this._specialAreas&&this._specialAreas[t];r&&e.transformTo(r.left,r.top,r.width,r.height)}),this),t},e.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},e}();function Fz(e){for(var t,n=0;n<e.length;n++){var r=e[n].getBoundingRect();(t=t||r.clone()).union(r)}return t}var Vz=dd();const Wz={registerMap:function(e,t,n){if(t.svg){var r=new Iz(e,t.svg);Vz.set(e,r)}else{var o=t.geoJson||t.geoJSON;o&&!t.features?n=t.specialAreas:o=t;r=new Bz(e,o,n);Vz.set(e,r)}},getGeoResource:function(e){return Vz.get(e)},getMapForUser:function(e){var t=Vz.get(e);return t&&"geoJSON"===t.type&&t.getMapForUser()},load:function(e,t,n){var r=Vz.get(e);if(r)return r.load(t,n)}};var Hz=["rect","circle","line","ellipse","polygon","polyline","path"],Gz=dd(Hz),Uz=dd(Hz.concat(["g"])),Xz=dd(Hz.concat(["g"])),Yz=jm();function qz(e){var t=e.getItemStyle(),n=e.get("areaColor");return null!=n&&(t.fill=n),t}function Zz(e){var t=e.style;t&&(t.stroke=t.stroke||t.fill,t.fill=null)}var Kz=function(){function e(e){var t=new Fg;this.uid=Zb("ec_map_draw"),this._controller=new HO(e.getZr()),this._controllerHost={target:t},this.group=t,t.add(this._regionsGroup=new Fg),t.add(this._svgGroup=new Fg)}return e.prototype.draw=function(e,t,n,r,o){var i="geo"===e.mainType,a=e.getData&&e.getData();i&&t.eachComponent({mainType:"series",subType:"map"},(function(t){a||t.getHostGeoModel()!==e||(a=t.getData())}));var s=e.coordinateSystem,l=this._regionsGroup,c=this.group,u=s.getTransformInfo(),d=u.raw,h=u.roam;!l.childAt(0)||o?(c.x=h.x,c.y=h.y,c.scaleX=h.scaleX,c.scaleY=h.scaleY,c.dirty()):pb(c,h,e);var p=a&&a.getVisual("visualMeta")&&a.getVisual("visualMeta").length>0,f={api:n,geo:s,mapOrGeoModel:e,data:a,isVisualEncodedByVisualMap:p,isGeo:i,transformInfoRaw:d};"geoJSON"===s.resourceType?this._buildGeoJSON(f):"geoSVG"===s.resourceType&&this._buildSVG(f),this._updateController(e,t,n),this._updateMapSelectHandler(e,l,n,r)},e.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=dd(),n=dd(),r=this._regionsGroup,o=e.transformInfoRaw,i=e.mapOrGeoModel,a=e.data,s=e.geo.projection,l=s&&s.stream;function c(e,t){return t&&(e=t(e)),e&&[e[0]*o.scaleX+o.x,e[1]*o.scaleY+o.y]}function u(e){for(var t=[],n=!l&&s&&s.project,r=0;r<e.length;++r){var o=c(e[r],n);o&&t.push(o)}return t}function d(e){return{shape:{points:u(e)}}}r.removeAll(),Ru(e.geo.regions,(function(o){var u=o.name,h=t.get(u),p=n.get(u)||{},f=p.dataIdx,g=p.regionModel;h||(h=t.set(u,new Fg),r.add(h),f=a?a.indexOfName(u):null,g=e.isGeo?i.getRegionModel(u):a?a.getItemModel(f):null,n.set(u,{dataIdx:f,regionModel:g}));var m=[],v=[];Ru(o.geometries,(function(e){if("polygon"===e.type){var t=[e.exterior].concat(e.interiors||[]);l&&(t=nB(t,l)),Ru(t,(function(e){m.push(new $k(d(e)))}))}else{var n=e.points;l&&(n=nB(n,l,!0)),Ru(n,(function(e){v.push(new eC(d(e)))}))}}));var y=c(o.getCenter(),s&&s.project);function x(t,n){if(t.length){var r=new fC({culling:!0,segmentIgnoreThreshold:1,shape:{paths:t}});h.add(r),$z(e,r,f,g),Qz(e,r,u,g,i,f,y),n&&(Zz(r),Ru(r.states,Zz))}}x(m),x(v,!0)})),t.each((function(t,r){var o=n.get(r),a=o.dataIdx,s=o.regionModel;Jz(e,t,r,s,i,a),eB(e,t,r,s,i),tB(e,t,r,s,i)}),this)},e.prototype._buildSVG=function(e){var t=e.geo.map,n=e.transformInfoRaw;this._svgGroup.x=n.x,this._svgGroup.y=n.y,this._svgGroup.scaleX=n.scaleX,this._svgGroup.scaleY=n.scaleY,this._svgResourceChanged(t)&&(this._freeSVG(),this._useSVG(t));var r=this._svgDispatcherMap=dd(),o=!1;Ru(this._svgGraphicRecord.named,(function(t){var n=t.name,i=e.mapOrGeoModel,a=e.data,s=t.svgNodeTagLower,l=t.el,c=a?a.indexOfName(n):null,u=i.getRegionModel(n);(null!=Gz.get(s)&&l instanceof kv&&$z(e,l,c,u),l instanceof kv&&(l.culling=!0),l.z2EmphasisLift=0,t.namedFrom)||(null!=Xz.get(s)&&Qz(e,l,n,u,i,c,null),Jz(e,l,n,u,i,c),eB(e,l,n,u,i),null!=Uz.get(s)&&("self"===tB(e,l,n,u,i)&&(o=!0),(r.get(n)||r.set(n,[])).push(l)))}),this),this._enableBlurEntireSVG(o,e)},e.prototype._enableBlurEntireSVG=function(e,t){if(e&&t.isGeo){var n=t.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle().opacity;this._svgGraphicRecord.root.traverse((function(e){if(!e.isGroup){zx(e);var t=e.ensureState("blur").style||{};null==t.opacity&&null!=n&&(t.opacity=n),e.ensureState("emphasis")}}))}},e.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},e.prototype.findHighDownDispatchers=function(e,t){if(null==e)return[];var n=t.coordinateSystem;if("geoJSON"===n.resourceType){var r=this._regionsGroupByName;if(r){var o=r.get(e);return o?[o]:[]}}else if("geoSVG"===n.resourceType)return this._svgDispatcherMap&&this._svgDispatcherMap.get(e)||[]},e.prototype._svgResourceChanged=function(e){return this._svgMapName!==e},e.prototype._useSVG=function(e){var t=Wz.getGeoResource(e);if(t&&"geoSVG"===t.type){var n=t.useGraphic(this.uid);this._svgGroup.add(n.root),this._svgGraphicRecord=n,this._svgMapName=e}},e.prototype._freeSVG=function(){var e=this._svgMapName;if(null!=e){var t=Wz.getGeoResource(e);t&&"geoSVG"===t.type&&t.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},e.prototype._updateController=function(e,t,n){var r=e.coordinateSystem,o=this._controller,i=this._controllerHost;i.zoomLimit=e.get("scaleLimit"),i.zoom=r.getZoom(),o.enable(e.get("roam")||!1);var a=e.mainType;function s(){var t={type:"geoRoam",componentType:a};return t[a+"Id"]=e.id,t}o.off("pan").on("pan",(function(e){this._mouseDownFlag=!1,GO(i,e.dx,e.dy),n.dispatchAction(Tu(s(),{dx:e.dx,dy:e.dy,animation:{duration:0}}))}),this),o.off("zoom").on("zoom",(function(e){this._mouseDownFlag=!1,UO(i,e.scale,e.originX,e.originY),n.dispatchAction(Tu(s(),{totalZoom:i.zoom,zoom:e.scale,originX:e.originX,originY:e.originY,animation:{duration:0}}))}),this),o.setPointerChecker((function(t,o,i){return r.containPoint([o,i])&&!qO(t,n,e)}))},e.prototype.resetForLabelLayout=function(){this.group.traverse((function(e){var t=e.getTextContent();t&&(t.ignore=Yz(t).ignore)}))},e.prototype._updateMapSelectHandler=function(e,t,n,r){var o=this;t.off("mousedown"),t.off("click"),e.get("selectedMode")&&(t.on("mousedown",(function(){o._mouseDownFlag=!0})),t.on("click",(function(e){o._mouseDownFlag&&(o._mouseDownFlag=!1)})))},e}();function $z(e,t,n,r){var o=r.getModel("itemStyle"),i=r.getModel(["emphasis","itemStyle"]),a=r.getModel(["blur","itemStyle"]),s=r.getModel(["select","itemStyle"]),l=qz(o),c=qz(i),u=qz(s),d=qz(a),h=e.data;if(h){var p=h.getItemVisual(n,"style"),f=h.getItemVisual(n,"decal");e.isVisualEncodedByVisualMap&&p.fill&&(l.fill=p.fill),f&&(l.decal=$I(f,e.api))}t.setStyle(l),t.style.strokeNoScale=!0,t.ensureState("emphasis").style=c,t.ensureState("select").style=u,t.ensureState("blur").style=d,zx(t)}function Qz(e,t,n,r,o,i,a){var s=e.data,l=e.isGeo,c=s&&isNaN(s.get(s.mapDimension("value"),i)),u=s&&s.getItemLayout(i);if(l||c||u&&u.showLabel){var d=l?n:i,h=void 0;(!s||i>=0)&&(h=o);var p=a?{normal:{align:"center",verticalAlign:"middle"}}:null;_b(t,Ab(r),{labelFetcher:h,labelDataIndex:d,defaultText:n},p);var f=t.getTextContent();if(f&&(Yz(f).ignore=f.ignore,t.textConfig&&a)){var g=t.getBoundingRect().clone();t.textConfig.layoutRect=g,t.textConfig.position=[(a[0]-g.x)/g.width*100+"%",(a[1]-g.y)/g.height*100+"%"]}t.disableLabelAnimation=!0}else t.removeTextContent(),t.removeTextConfig(),t.disableLabelAnimation=null}function Jz(e,t,n,r,o,i){e.data?e.data.setItemGraphicEl(i,t):sx(t).eventData={componentType:"geo",componentIndex:o.componentIndex,geoIndex:o.componentIndex,name:n,region:r&&r.option||{}}}function eB(e,t,n,r,o){e.data||eM({el:t,componentModel:o,itemName:n,itemTooltipOption:r.get("tooltip")})}function tB(e,t,n,r,o){t.highDownSilentOnTouch=!!o.get("selectedMode");var i=r.getModel("emphasis"),a=i.get("focus");return tb(t,a,i.get("blurScope"),i.get("disabled")),e.isGeo&&function(e,t,n){var r=sx(e);r.componentMainType=t.mainType,r.componentIndex=t.componentIndex,r.componentHighDownName=n}(t,o,n),a}function nB(e,t,n){var r,o=[];function i(){r=[]}function a(){r.length&&(o.push(r),r=[])}var s=t({polygonStart:i,polygonEnd:a,lineStart:i,lineEnd:a,point:function(e,t){isFinite(e)&&isFinite(t)&&r.push([e,t])},sphere:function(){}});return!n&&s.polygonStart(),Ru(e,(function(e){s.lineStart();for(var t=0;t<e.length;t++)s.point(e[t][0],e[t][1]);s.lineEnd()})),!n&&s.polygonEnd(),o}const rB=Kz;var oB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.render=function(e,t,n,r){if(!r||"mapToggleSelect"!==r.type||r.from!==this.uid){var o=this.group;if(o.removeAll(),!e.getHostGeoModel()){if(this._mapDraw&&r&&"geoRoam"===r.type&&this._mapDraw.resetForLabelLayout(),r&&"geoRoam"===r.type&&"series"===r.componentType&&r.seriesId===e.id)(i=this._mapDraw)&&o.add(i.group);else if(e.needsDrawMap){var i=this._mapDraw||new rB(n);o.add(i.group),i.draw(e,t,n,this,r),this._mapDraw=i}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;e.get("showLegendSymbol")&&t.getComponent("legend")&&this._renderSymbols(e,t,n)}}},t.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},t.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},t.prototype._renderSymbols=function(e,t,n){var r=e.originalData,o=this.group;r.each(r.mapDimension("value"),(function(t,n){if(!isNaN(t)){var i=r.getItemLayout(n);if(i&&i.point){var a=i.point,s=i.offset,l=new kk({style:{fill:e.getData().getVisual("style").fill},shape:{cx:a[0]+9*s,cy:a[1],r:3},silent:!0,z2:8+(s?0:yx+1)});if(!s){var c=e.mainSeries.getData(),u=r.getName(n),d=c.indexOfName(u),h=r.getItemModel(n),p=h.getModel("label"),f=c.getItemGraphicEl(d);_b(l,Ab(h),{labelFetcher:{getFormattedLabel:function(t,n){return e.getFormattedLabel(d,n)}},defaultText:u}),l.disableLabelAnimation=!0,p.get("position")||l.setTextConfig({position:"bottom"}),f.onHoverStateChange=function(e){Nx(l,e)}}o.add(l)}}}))},t.type="map",t}(dM);const iB=oB;var aB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.needsDrawMap=!1,n.seriesGroup=[],n.getTooltipPosition=function(e){if(null!=e){var t=this.getData().getName(e),n=this.coordinateSystem,r=n.getRegion(t);return r&&n.dataToPoint(r.getCenter())}},n}return ru(t,e),t.prototype.getInitialData=function(e){for(var t=XR(this,{coordDimensions:["value"],encodeDefaulter:Fu(xS,this)}),n=dd(),r=[],o=0,i=t.count();o<i;o++){var a=t.getName(o);n.set(a,!0)}return Ru(Wz.load(this.getMapType(),this.option.nameMap,this.option.nameProperty).regions,(function(e){var t=e.name;n.get(t)||r.push(t)})),t.appendValues([],r),t},t.prototype.getHostGeoModel=function(){var e=this.option.geoIndex;return null!=e?this.ecModel.getComponent("geo",e):null},t.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},t.prototype.getRawValue=function(e){var t=this.getData();return t.get(t.mapDimension("value"),e)},t.prototype.getRegionModel=function(e){var t=this.getData();return t.getItemModel(t.indexOfName(e))},t.prototype.formatTooltip=function(e,t,n){for(var r=this.getData(),o=this.getRawValue(e),i=r.getName(e),a=this.seriesGroup,s=[],l=0;l<a.length;l++){var c=a[l].originalData.indexOfName(i),u=r.mapDimension("value");isNaN(a[l].originalData.get(u,c))||s.push(a[l].name)}return TA("section",{header:s.join(", "),noHeader:!s.length,blocks:[TA("nameValue",{name:i,value:o})]})},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.getLegendIcon=function(e){var t=e.icon||"roundRect",n=bI(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill);return n.setStyle(e.itemStyle),n.style.stroke="none",t.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},t.type="series.map",t.dependencies=["geo"],t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},t}(JA);const sB=aB;function lB(e){var t={};e.eachSeriesByType("map",(function(e){var n=e.getHostGeoModel(),r=n?"o"+n.id:"i"+e.getMapType();(t[r]=t[r]||[]).push(e)})),Ru(t,(function(e,t){for(var n=function(e,t){var n={};return Ru(e,(function(e){e.each(e.mapDimension("value"),(function(t,r){var o="ec-"+e.getName(r);n[o]=n[o]||[],isNaN(t)||n[o].push(t)}))})),e[0].map(e[0].mapDimension("value"),(function(r,o){for(var i="ec-"+e[0].getName(o),a=0,s=1/0,l=-1/0,c=n[i].length,u=0;u<c;u++)s=Math.min(s,n[i][u]),l=Math.max(l,n[i][u]),a+=n[i][u];return 0===c?NaN:"min"===t?s:"max"===t?l:"average"===t?a/c:a}))}(Eu(e,(function(e){return e.getData()})),e[0].get("mapValueCalculation")),r=0;r<e.length;r++)e[r].originalData=e[r].getData();for(r=0;r<e.length;r++)e[r].seriesGroup=e,e[r].needsDrawMap=0===r&&!e[r].getHostGeoModel(),e[r].setData(n.cloneShallow()),e[r].mainSeries=e[0]}))}function cB(e){var t={};e.eachSeriesByType("map",(function(n){var r=n.getMapType();if(!n.getHostGeoModel()&&!t[r]){var o={};Ru(n.seriesGroup,(function(t){var n=t.coordinateSystem,r=t.originalData;t.get("showLegendSymbol")&&e.getComponent("legend")&&r.each(r.mapDimension("value"),(function(e,t){var i=r.getName(t),a=n.getRegion(i);if(a&&!isNaN(e)){var s=o[i]||0,l=n.dataToPoint(a.getCenter());o[i]=s+1,r.setItemLayout(t,{point:l,offset:s})}}))}));var i=n.getData();i.each((function(e){var t=i.getName(e),n=i.getItemLayout(e)||{};n.showLabel=!o[t],i.setItemLayout(e,n)})),t[r]=!0}}))}var uB=Ed,dB=function(e){function t(t){var n=e.call(this)||this;return n.type="view",n.dimensions=["x","y"],n._roamTransformable=new yg,n._rawTransformable=new yg,n.name=t,n}return ru(t,e),t.prototype.setBoundingRect=function(e,t,n,r){return this._rect=new Dh(e,t,n,r),this._rect},t.prototype.getBoundingRect=function(){return this._rect},t.prototype.setViewRect=function(e,t,n,r){this._transformTo(e,t,n,r),this._viewRect=new Dh(e,t,n,r)},t.prototype._transformTo=function(e,t,n,r){var o=this.getBoundingRect(),i=this._rawTransformable;i.transform=o.calculateTransform(new Dh(e,t,n,r));var a=i.parent;i.parent=null,i.decomposeTransform(),i.parent=a,this._updateTransform()},t.prototype.setCenter=function(e,t){e&&(this._center=[Zg(e[0],t.getWidth()),Zg(e[1],t.getHeight())],this._updateCenterAndZoom())},t.prototype.setZoom=function(e){e=e||1;var t=this.zoomLimit;t&&(null!=t.max&&(e=Math.min(t.max,e)),null!=t.min&&(e=Math.max(t.min,e))),this._zoom=e,this._updateCenterAndZoom()},t.prototype.getDefaultCenter=function(){var e=this.getBoundingRect();return[e.x+e.width/2,e.y+e.height/2]},t.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},t.prototype.getZoom=function(){return this._zoom||1},t.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},t.prototype._updateCenterAndZoom=function(){var e=this._rawTransformable.getLocalTransform(),t=this._roamTransformable,n=this.getDefaultCenter(),r=this.getCenter(),o=this.getZoom();r=Ed([],r,e),n=Ed([],n,e),t.originX=r[0],t.originY=r[1],t.x=n[0]-r[0],t.y=n[1]-r[1],t.scaleX=t.scaleY=o,this._updateTransform()},t.prototype._updateTransform=function(){var e=this._roamTransformable,t=this._rawTransformable;t.parent=e,e.updateTransform(),t.updateTransform(),ph(this.transform||(this.transform=[]),t.transform||[1,0,0,1,0,0]),this._rawTransform=t.getLocalTransform(),this.invTransform=this.invTransform||[],yh(this.invTransform,this.transform),this.decomposeTransform()},t.prototype.getTransformInfo=function(){var e=this._rawTransformable,t=this._roamTransformable,n=new yg;return n.transform=t.transform,n.decomposeTransform(),{roam:{x:n.x,y:n.y,scaleX:n.scaleX,scaleY:n.scaleY},raw:{x:e.x,y:e.y,scaleX:e.scaleX,scaleY:e.scaleY}}},t.prototype.getViewRect=function(){return this._viewRect},t.prototype.getViewRectAfterRoam=function(){var e=this.getBoundingRect().clone();return e.applyTransform(this.transform),e},t.prototype.dataToPoint=function(e,t,n){var r=t?this._rawTransform:this.transform;return n=n||[],r?uB(n,e,r):wd(n,e)},t.prototype.pointToData=function(e){var t=this.invTransform;return t?uB([],e,t):[e[0],e[1]]},t.prototype.convertToPixel=function(e,t,n){var r=hB(t);return r===this?r.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,t,n){var r=hB(t);return r===this?r.pointToData(n):null},t.prototype.containPoint=function(e){return this.getViewRectAfterRoam().contain(e[0],e[1])},t.dimensions=["x","y"],t}(yg);function hB(e){var t=e.seriesModel;return t?t.coordinateSystem:null}const pB=dB;var fB={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},gB=["lng","lat"],mB=function(e){function t(t,n,r){var o=e.call(this,t)||this;o.dimensions=gB,o.type="geo",o._nameCoordMap=dd(),o.map=n;var i,a=r.projection,s=Wz.load(n,r.nameMap,r.nameProperty),l=Wz.getGeoResource(n),c=(o.resourceType=l?l.type:null,o.regions=s.regions),u=fB[l.type];if(o._regionsMap=s.regionsMap,o.regions=s.regions,o.projection=a,a)for(var d=0;d<c.length;d++){var h=c[d].getBoundingRect(a);(i=i||h.clone()).union(h)}else i=s.boundingRect;return o.setBoundingRect(i.x,i.y,i.width,i.height),o.aspectScale=a?1:Ju(r.aspectScale,u.aspectScale),o._invertLongitute=!a&&u.invertLongitute,o}return ru(t,e),t.prototype._transformTo=function(e,t,n,r){var o=this.getBoundingRect(),i=this._invertLongitute;o=o.clone(),i&&(o.y=-o.y-o.height);var a=this._rawTransformable;a.transform=o.calculateTransform(new Dh(e,t,n,r));var s=a.parent;a.parent=null,a.decomposeTransform(),a.parent=s,i&&(a.scaleY=-a.scaleY),this._updateTransform()},t.prototype.getRegion=function(e){return this._regionsMap.get(e)},t.prototype.getRegionByCoord=function(e){for(var t=this.regions,n=0;n<t.length;n++){var r=t[n];if("geoJSON"===r.type&&r.contain(e))return t[n]}},t.prototype.addGeoCoord=function(e,t){this._nameCoordMap.set(e,t)},t.prototype.getGeoCoord=function(e){var t=this._regionsMap.get(e);return this._nameCoordMap.get(e)||t&&t.getCenter()},t.prototype.dataToPoint=function(e,t,n){if(Hu(e)&&(e=this.getGeoCoord(e)),e){var r=this.projection;return r&&(e=r.project(e)),e&&this.projectedToPoint(e,t,n)}},t.prototype.pointToData=function(e){var t=this.projection;return t&&(e=t.unproject(e)),e&&this.pointToProjected(e)},t.prototype.pointToProjected=function(t){return e.prototype.pointToData.call(this,t)},t.prototype.projectedToPoint=function(t,n,r){return e.prototype.dataToPoint.call(this,t,n,r)},t.prototype.convertToPixel=function(e,t,n){var r=vB(t);return r===this?r.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,t,n){var r=vB(t);return r===this?r.pointToData(n):null},t}(pB);function vB(e){var t=e.geoModel,n=e.seriesModel;return t?t.coordinateSystem:n?n.coordinateSystem||(n.getReferringComponents("geo",Em).models[0]||{}).coordinateSystem:null}Pu(mB,pB);const yB=mB;function xB(e,t){var n=e.get("boundingCoords");if(null!=n){var r=n[0],o=n[1];if(isFinite(r[0])&&isFinite(r[1])&&isFinite(o[0])&&isFinite(o[1])){var i=this.projection;if(i){var a=r[0],s=r[1],l=o[0],c=o[1];r=[1/0,1/0],o=[-1/0,-1/0];var u=function(e,t,n,a){for(var s=n-e,l=a-t,c=0;c<=100;c++){var u=c/100,d=i.project([e+s*u,t+l*u]);Nd(r,r,d),Od(o,o,d)}};u(a,s,l,s),u(l,s,l,c),u(l,c,a,c),u(a,c,l,s)}this.setBoundingRect(r[0],r[1],o[0]-r[0],o[1]-r[1])}else 0}var d,h,p,f=this.getBoundingRect(),g=e.get("layoutCenter"),m=e.get("layoutSize"),v=t.getWidth(),y=t.getHeight(),x=f.width/f.height*this.aspectScale,b=!1;if(g&&m&&(d=[Zg(g[0],v),Zg(g[1],y)],h=Zg(m,Math.min(v,y)),isNaN(d[0])||isNaN(d[1])||isNaN(h)||(b=!0)),b)p={},x>1?(p.width=h,p.height=h/x):(p.height=h,p.width=h*x),p.y=d[1]-p.height/2,p.x=d[0]-p.width/2;else{var w=e.getBoxLayoutParams();w.aspect=x,p=Zw(w,{width:v,height:y})}this.setViewRect(p.x,p.y,p.width,p.height),this.setCenter(e.get("center"),t),this.setZoom(e.get("zoom"))}var bB=function(){function e(){this.dimensions=gB}return e.prototype.create=function(e,t){var n=[];function r(e){return{nameProperty:e.get("nameProperty"),aspectScale:e.get("aspectScale"),projection:e.get("projection")}}e.eachComponent("geo",(function(e,o){var i=e.get("map"),a=new yB(i+o,i,Tu({nameMap:e.get("nameMap")},r(e)));a.zoomLimit=e.get("scaleLimit"),n.push(a),e.coordinateSystem=a,a.model=e,a.resize=xB,a.resize(e,t)})),e.eachSeries((function(e){if("geo"===e.get("coordinateSystem")){var t=e.get("geoIndex")||0;e.coordinateSystem=n[t]}}));var o={};return e.eachSeriesByType("map",(function(e){if(!e.getHostGeoModel()){var t=e.getMapType();o[t]=o[t]||[],o[t].push(e)}})),Ru(o,(function(e,o){var i=Eu(e,(function(e){return e.get("nameMap")})),a=new yB(o,o,Tu({nameMap:Iu(i)},r(e[0])));a.zoomLimit=Qu.apply(null,Eu(e,(function(e){return e.get("scaleLimit")}))),n.push(a),a.resize=xB,a.resize(e[0],t),Ru(e,(function(e){e.coordinateSystem=a,function(e,t){Ru(t.get("geoCoord"),(function(t,n){e.addGeoCoord(n,t)}))}(a,e)}))})),n},e.prototype.getFilledRegions=function(e,t,n,r){for(var o=(e||[]).slice(),i=dd(),a=0;a<o.length;a++)i.set(o[a].name,o[a]);return Ru(Wz.load(t,n,r).regions,(function(e){var t=e.name;!i.get(t)&&o.push({name:t})})),o},e}();const wB=new bB;var SB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.init=function(e,t,n){var r=Wz.getGeoResource(e.map);if(r&&"geoJSON"===r.type){var o=e.itemStyle=e.itemStyle||{};"color"in o||(o.color="#eee")}this.mergeDefaultAndTheme(e,n),bm(e,"label",["show"])},t.prototype.optionUpdated=function(){var e=this,t=this.option;t.regions=wB.getFilledRegions(t.regions,t.map,t.nameMap,t.nameProperty);var n={};this._optionModelMap=Nu(t.regions||[],(function(t,r){var o=r.name;return o&&(t.set(o,new Yb(r,e,e.ecModel)),r.selected&&(n[o]=!0)),t}),dd()),t.selectedMap||(t.selectedMap=n)},t.prototype.getRegionModel=function(e){return this._optionModelMap.get(e)||new Yb(null,this,this.ecModel)},t.prototype.getFormattedLabel=function(e,t){var n=this.getRegionModel(e),r="normal"===t?n.get(["label","formatter"]):n.get(["emphasis","label","formatter"]),o={name:e};return Wu(r)?(o.status=t,r(o)):Hu(r)?r.replace("{a}",null!=e?e:""):void 0},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.select=function(e){var t=this.option,n=t.selectedMode;n&&("multiple"!==n&&(t.selectedMap=null),(t.selectedMap||(t.selectedMap={}))[e]=!0)},t.prototype.unSelect=function(e){var t=this.option.selectedMap;t&&(t[e]=!1)},t.prototype.toggleSelected=function(e){this[this.isSelected(e)?"unSelect":"select"](e)},t.prototype.isSelected=function(e){var t=this.option.selectedMap;return!(!t||!t[e])},t.type="geo",t.layoutMode="box",t.defaultOption={z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},t}(rS);const _B=SB;function AB(e,t){return e.pointToProjected?e.pointToProjected(t):e.pointToData(t)}function kB(e,t,n,r){var o=e.getZoom(),i=e.getCenter(),a=t.zoom,s=e.projectedToPoint?e.projectedToPoint(i):e.dataToPoint(i);if(null!=t.dx&&null!=t.dy&&(s[0]-=t.dx,s[1]-=t.dy,e.setCenter(AB(e,s),r)),null!=a){if(n){var l=n.min||0,c=n.max||1/0;a=Math.max(Math.min(o*a,c),l)/o}e.scaleX*=a,e.scaleY*=a;var u=(t.originX-e.x)*(a-1),d=(t.originY-e.y)*(a-1);e.x-=u,e.y-=d,e.updateTransform(),e.setCenter(AB(e,s),r),e.setZoom(a*o)}return{center:e.getCenter(),zoom:e.getZoom()}}var CB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.focusBlurEnabled=!0,n}return ru(t,e),t.prototype.init=function(e,t){this._api=t},t.prototype.render=function(e,t,n,r){if(this._model=e,!e.get("show"))return this._mapDraw&&this._mapDraw.remove(),void(this._mapDraw=null);this._mapDraw||(this._mapDraw=new rB(n));var o=this._mapDraw;o.draw(e,t,n,this,r),o.group.on("click",this._handleRegionClick,this),o.group.silent=e.get("silent"),this.group.add(o.group),this.updateSelectStatus(e,t,n)},t.prototype._handleRegionClick=function(e){var t;lI(e.target,(function(e){return null!=(t=sx(e).eventData)}),!0),t&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:t.name})},t.prototype.updateSelectStatus=function(e,t,n){var r=this;this._mapDraw.group.traverse((function(e){var t=sx(e).eventData;if(t)return r._model.isSelected(t.name)?n.enterSelect(e):n.leaveSelect(e),!0}))},t.prototype.findHighDownDispatchers=function(e){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(e,this._model)},t.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},t.type="geo",t}(tk);const MB=CB;function IB(e,t,n){Wz.registerMap(e,t,n)}function TB(e){function t(t,n){n.update="geo:updateSelectStatus",e.registerAction(n,(function(e,n){var r={},o=[];return n.eachComponent({mainType:"geo",query:e},(function(n){n[t](e.name),Ru(n.coordinateSystem.regions,(function(e){r[e.name]=n.isSelected(e.name)||!1}));var i=[];Ru(r,(function(e,t){r[t]&&i.push(t)})),o.push({geoIndex:n.componentIndex,name:i})})),{selected:r,allSelected:o,name:e.name}}))}e.registerCoordinateSystem("geo",wB),e.registerComponentModel(_B),e.registerComponentView(MB),e.registerImpl("registerMap",IB),e.registerImpl("getMap",(function(e){return Wz.getMapForUser(e)})),t("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),t("select",{type:"geoSelect",event:"geoselected"}),t("unSelect",{type:"geoUnSelect",event:"geounselected"}),e.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},(function(e,t,n){var r=e.componentType||"series";t.eachComponent({mainType:r,query:e},(function(t){var o=t.coordinateSystem;if("geo"===o.type){var i=kB(o,e,t.get("scaleLimit"),n);t.setCenter&&t.setCenter(i.center),t.setZoom&&t.setZoom(i.zoom),"series"===r&&Ru(t.seriesGroup,(function(e){e.setCenter(i.center),e.setZoom(i.zoom)}))}}))}))}function DB(e,t){var n=e.isExpand?e.children:[],r=e.parentNode.children,o=e.hierNode.i?r[e.hierNode.i-1]:null;if(n.length){!function(e){var t=e.children,n=t.length,r=0,o=0;for(;--n>=0;){var i=t[n];i.hierNode.prelim+=r,i.hierNode.modifier+=r,o+=i.hierNode.change,r+=i.hierNode.shift+o}}(e);var i=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;o?(e.hierNode.prelim=o.hierNode.prelim+t(e,o),e.hierNode.modifier=e.hierNode.prelim-i):e.hierNode.prelim=i}else o&&(e.hierNode.prelim=o.hierNode.prelim+t(e,o));e.parentNode.hierNode.defaultAncestor=function(e,t,n,r){if(t){for(var o=e,i=e,a=i.parentNode.children[0],s=t,l=o.hierNode.modifier,c=i.hierNode.modifier,u=a.hierNode.modifier,d=s.hierNode.modifier;s=RB(s),i=EB(i),s&&i;){o=RB(o),a=EB(a),o.hierNode.ancestor=e;var h=s.hierNode.prelim+d-i.hierNode.prelim-c+r(s,i);h>0&&(OB(NB(s,e,n),e,h),c+=h,l+=h),d+=s.hierNode.modifier,c+=i.hierNode.modifier,l+=o.hierNode.modifier,u+=a.hierNode.modifier}s&&!RB(o)&&(o.hierNode.thread=s,o.hierNode.modifier+=d-l),i&&!EB(a)&&(a.hierNode.thread=i,a.hierNode.modifier+=c-u,n=e)}return n}(e,o,e.parentNode.hierNode.defaultAncestor||r[0],t)}function jB(e){var t=e.hierNode.prelim+e.parentNode.hierNode.modifier;e.setLayout({x:t},!0),e.hierNode.modifier+=e.parentNode.hierNode.modifier}function PB(e){return arguments.length?e:zB}function LB(e,t){return e-=Math.PI/2,{x:t*Math.cos(e),y:t*Math.sin(e)}}function RB(e){var t=e.children;return t.length&&e.isExpand?t[t.length-1]:e.hierNode.thread}function EB(e){var t=e.children;return t.length&&e.isExpand?t[0]:e.hierNode.thread}function NB(e,t,n){return e.hierNode.ancestor.parentNode===t.parentNode?e.hierNode.ancestor:n}function OB(e,t,n){var r=n/(t.hierNode.i-e.hierNode.i);t.hierNode.change-=r,t.hierNode.shift+=n,t.hierNode.modifier+=n,t.hierNode.prelim+=n,e.hierNode.change+=r}function zB(e,t){return e.parentNode===t.parentNode?1:2}var BB=function(){this.parentPoint=[],this.childPoints=[]},FB=function(e){function t(t){return e.call(this,t)||this}return ru(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new BB},t.prototype.buildPath=function(e,t){var n=t.childPoints,r=n.length,o=t.parentPoint,i=n[0],a=n[r-1];if(1===r)return e.moveTo(o[0],o[1]),void e.lineTo(i[0],i[1]);var s=t.orient,l="TB"===s||"BT"===s?0:1,c=1-l,u=Zg(t.forkPosition,1),d=[];d[l]=o[l],d[c]=o[c]+(a[c]-o[c])*u,e.moveTo(o[0],o[1]),e.lineTo(d[0],d[1]),e.moveTo(i[0],i[1]),d[l]=i[l],e.lineTo(d[0],d[1]),d[l]=a[l],e.lineTo(d[0],d[1]),e.lineTo(a[0],a[1]);for(var h=1;h<r-1;h++){var p=n[h];e.moveTo(p[0],p[1]),d[l]=p[l],e.lineTo(d[0],d[1])}},t}(Ty),VB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._mainGroup=new Fg,n}return ru(t,e),t.prototype.init=function(e,t){this._controller=new HO(t.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},t.prototype.render=function(e,t,n){var r=e.getData(),o=e.layoutInfo,i=this._mainGroup;"radial"===e.get("layout")?(i.x=o.x+o.width/2,i.y=o.y+o.height/2):(i.x=o.x,i.y=o.y),this._updateViewCoordSys(e,n),this._updateController(e,t,n);var a=this._data;r.diff(a).add((function(t){WB(r,t)&&HB(r,t,null,i,e)})).update((function(t,n){var o=a.getItemGraphicEl(n);WB(r,t)?HB(r,t,o,i,e):o&&XB(a,n,o,i,e)})).remove((function(t){var n=a.getItemGraphicEl(t);n&&XB(a,t,n,i,e)})).execute(),this._nodeScaleRatio=e.get("nodeScaleRatio"),this._updateNodeAndLinkScale(e),!0===e.get("expandAndCollapse")&&r.eachItemGraphicEl((function(t,r){t.off("click").on("click",(function(){n.dispatchAction({type:"treeExpandAndCollapse",seriesId:e.id,dataIndex:r})}))})),this._data=r},t.prototype._updateViewCoordSys=function(e,t){var n=e.getData(),r=[];n.each((function(e){var t=n.getItemLayout(e);!t||isNaN(t.x)||isNaN(t.y)||r.push([+t.x,+t.y])}));var o=[],i=[];Rv(r,o,i);var a=this._min,s=this._max;i[0]-o[0]===0&&(o[0]=a?a[0]:o[0]-1,i[0]=s?s[0]:i[0]+1),i[1]-o[1]===0&&(o[1]=a?a[1]:o[1]-1,i[1]=s?s[1]:i[1]+1);var l=e.coordinateSystem=new pB;l.zoomLimit=e.get("scaleLimit"),l.setBoundingRect(o[0],o[1],i[0]-o[0],i[1]-o[1]),l.setCenter(e.get("center"),t),l.setZoom(e.get("zoom")),this.group.attr({x:l.x,y:l.y,scaleX:l.scaleX,scaleY:l.scaleY}),this._min=o,this._max=i},t.prototype._updateController=function(e,t,n){var r=this,o=this._controller,i=this._controllerHost,a=this.group;o.setPointerChecker((function(t,r,o){var i=a.getBoundingRect();return i.applyTransform(a.transform),i.contain(r,o)&&!qO(t,n,e)})),o.enable(e.get("roam")),i.zoomLimit=e.get("scaleLimit"),i.zoom=e.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",(function(t){GO(i,t.dx,t.dy),n.dispatchAction({seriesId:e.id,type:"treeRoam",dx:t.dx,dy:t.dy})})).on("zoom",(function(t){UO(i,t.scale,t.originX,t.originY),n.dispatchAction({seriesId:e.id,type:"treeRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),r._updateNodeAndLinkScale(e),n.updateLabelLayout()}))},t.prototype._updateNodeAndLinkScale=function(e){var t=e.getData(),n=this._getNodeGlobalScale(e);t.eachItemGraphicEl((function(e,t){e.setSymbolScale(n)}))},t.prototype._getNodeGlobalScale=function(e){var t=e.coordinateSystem;if("view"!==t.type)return 1;var n=this._nodeScaleRatio,r=t.scaleX||1;return((t.getZoom()-1)*n+1)/r},t.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},t.type="tree",t}(dM);function WB(e,t){var n=e.getItemLayout(t);return n&&!isNaN(n.x)&&!isNaN(n.y)}function HB(e,t,n,r,o){var i=!n,a=e.tree.getNodeByDataIndex(t),s=a.getModel(),l=a.getVisual("style").fill,c=!1===a.isExpand&&0!==a.children.length?l:"#fff",u=e.tree.root,d=a.parentNode===u?a:a.parentNode||a,h=e.getItemGraphicEl(d.dataIndex),p=d.getLayout(),f=h?{x:h.__oldX,y:h.__oldY,rawX:h.__radialOldRawX,rawY:h.__radialOldRawY}:p,g=a.getLayout();i?((n=new uL(e,t,null,{symbolInnerColor:c,useNameLabel:!0})).x=f.x,n.y=f.y):n.updateData(e,t,null,{symbolInnerColor:c,useNameLabel:!0}),n.__radialOldRawX=n.__radialRawX,n.__radialOldRawY=n.__radialRawY,n.__radialRawX=g.rawX,n.__radialRawY=g.rawY,r.add(n),e.setItemGraphicEl(t,n),n.__oldX=n.x,n.__oldY=n.y,pb(n,{x:g.x,y:g.y},o);var m=n.getSymbolPath();if("radial"===o.get("layout")){var v=u.children[0],y=v.getLayout(),x=v.children.length,b=void 0,w=void 0;if(g.x===y.x&&!0===a.isExpand&&v.children.length){var S={x:(v.children[0].getLayout().x+v.children[x-1].getLayout().x)/2,y:(v.children[0].getLayout().y+v.children[x-1].getLayout().y)/2};(b=Math.atan2(S.y-y.y,S.x-y.x))<0&&(b=2*Math.PI+b),(w=S.x<y.x)&&(b-=Math.PI)}else(b=Math.atan2(g.y-y.y,g.x-y.x))<0&&(b=2*Math.PI+b),0===a.children.length||0!==a.children.length&&!1===a.isExpand?(w=g.x<y.x)&&(b-=Math.PI):(w=g.x>y.x)||(b-=Math.PI);var _=w?"left":"right",A=s.getModel("label"),k=A.get("rotate"),C=k*(Math.PI/180),M=m.getTextContent();M&&(m.setTextConfig({position:A.get("position")||_,rotation:null==k?-b:C,origin:"center"}),M.setStyle("verticalAlign","middle"))}var I=s.get(["emphasis","focus"]),T="relative"===I?hd(a.getAncestorsIndices(),a.getDescendantIndices()):"ancestor"===I?a.getAncestorsIndices():"descendant"===I?a.getDescendantIndices():null;T&&(sx(n).focus=T),function(e,t,n,r,o,i,a,s){var l=t.getModel(),c=e.get("edgeShape"),u=e.get("layout"),d=e.getOrient(),h=e.get(["lineStyle","curveness"]),p=e.get("edgeForkPosition"),f=l.getModel("lineStyle").getLineStyle(),g=r.__edge;if("curve"===c)t.parentNode&&t.parentNode!==n&&(g||(g=r.__edge=new cC({shape:YB(u,d,h,o,o)})),pb(g,{shape:YB(u,d,h,i,a)},e));else if("polyline"===c)if("orthogonal"===u){if(t!==n&&t.children&&0!==t.children.length&&!0===t.isExpand){for(var m=t.children,v=[],y=0;y<m.length;y++){var x=m[y].getLayout();v.push([x.x,x.y])}g||(g=r.__edge=new FB({shape:{parentPoint:[a.x,a.y],childPoints:[[a.x,a.y]],orient:d,forkPosition:p}})),pb(g,{shape:{parentPoint:[a.x,a.y],childPoints:v}},e)}}else 0;g&&("polyline"!==c||t.isExpand)&&(g.useStyle(Du({strokeNoScale:!0,fill:null},f)),ib(g,l,"lineStyle"),zx(g),s.add(g))}(o,a,u,n,f,p,g,r),n.__edge&&(n.onHoverStateChange=function(t){if("blur"!==t){var r=a.parentNode&&e.getItemGraphicEl(a.parentNode.dataIndex);r&&r.hoverState===fx||Nx(n.__edge,t)}})}function GB(e,t,n,r,o){var i=UB(t.tree.root,e),a=i.source,s=i.sourceLayout,l=t.getItemGraphicEl(e.dataIndex);if(l){var c=t.getItemGraphicEl(a.dataIndex).__edge,u=l.__edge||(!1===a.isExpand||1===a.children.length?c:void 0),d=r.get("edgeShape"),h=r.get("layout"),p=r.get("orient"),f=r.get(["lineStyle","curveness"]);u&&("curve"===d?mb(u,{shape:YB(h,p,f,s,s),style:{opacity:0}},r,{cb:function(){n.remove(u)},removeOpt:o}):"polyline"===d&&"orthogonal"===r.get("layout")&&mb(u,{shape:{parentPoint:[s.x,s.y],childPoints:[[s.x,s.y]]},style:{opacity:0}},r,{cb:function(){n.remove(u)},removeOpt:o}))}}function UB(e,t){for(var n,r=t.parentNode===e?t:t.parentNode||t;null==(n=r.getLayout());)r=r.parentNode===e?r:r.parentNode||r;return{source:r,sourceLayout:n}}function XB(e,t,n,r,o){var i=e.tree.getNodeByDataIndex(t),a=UB(e.tree.root,i).sourceLayout,s={duration:o.get("animationDurationUpdate"),easing:o.get("animationEasingUpdate")};mb(n,{x:a.x+1,y:a.y+1},o,{cb:function(){r.remove(n),e.setItemGraphicEl(t,null)},removeOpt:s}),n.fadeOut(null,e.hostModel,{fadeLabel:!0,animation:s}),i.children.forEach((function(t){GB(t,e,r,o,s)})),GB(i,e,r,o,s)}function YB(e,t,n,r,o){var i,a,s,l,c,u,d,h;if("radial"===e){c=r.rawX,d=r.rawY,u=o.rawX,h=o.rawY;var p=LB(c,d),f=LB(c,d+(h-d)*n),g=LB(u,h+(d-h)*n),m=LB(u,h);return{x1:p.x||0,y1:p.y||0,x2:m.x||0,y2:m.y||0,cpx1:f.x||0,cpy1:f.y||0,cpx2:g.x||0,cpy2:g.y||0}}return c=r.x,d=r.y,u=o.x,h=o.y,"LR"!==t&&"RL"!==t||(i=c+(u-c)*n,a=d,s=u+(c-u)*n,l=h),"TB"!==t&&"BT"!==t||(i=c,a=d+(h-d)*n,s=u,l=h+(d-h)*n),{x1:c,y1:d,x2:u,y2:h,cpx1:i,cpy1:a,cpx2:s,cpy2:l}}const qB=VB;var ZB=jm();function KB(e,t){if(ZB(r=this).mainData===r){var n=Tu({},ZB(this).datas);n[this.dataType]=t,tF(t,n,e)}else nF(t,this.dataType,ZB(this).mainData,e);var r;return t}function $B(e,t){return e.struct&&e.struct.update(),t}function QB(e,t){return Ru(ZB(t).datas,(function(n,r){n!==t&&nF(n.cloneShallow(),r,t,e)})),t}function JB(e){var t=ZB(this).mainData;return null==e||null==t?t:ZB(t).datas[e]}function eF(){var e=ZB(this).mainData;return null==e?[{data:e}]:Eu(zu(ZB(e).datas),(function(t){return{type:t,data:ZB(e).datas[t]}}))}function tF(e,t,n){ZB(e).datas={},Ru(t,(function(t,r){nF(t,r,e,n)}))}function nF(e,t,n,r){ZB(n).datas[t]=e,ZB(e).mainData=n,e.dataType=t,r.struct&&(e[r.structAttr]=r.struct,r.struct[r.datasAttr[t]]=e),e.getLinkedData=JB,e.getLinkedDataAll=eF}const rF=function(e){var t=e.mainData,n=e.datas;n||(n={main:t},e.datasAttr={main:"data"}),e.datas=e.mainData=null,tF(t,n,e),Ru(n,(function(n){Ru(t.TRANSFERABLE_METHODS,(function(t){n.wrapMethod(t,Fu(KB,e))}))})),t.wrapMethod("cloneShallow",Fu(QB,e)),Ru(t.CHANGABLE_METHODS,(function(n){t.wrapMethod(n,Fu($B,e))})),rd(n[t.dataType]===t)};var oF=function(){function e(e,t){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=e||"",this.hostTree=t}return e.prototype.isRemoved=function(){return this.dataIndex<0},e.prototype.eachNode=function(e,t,n){Wu(e)&&(n=t,t=e,e=null),Hu(e=e||{})&&(e={order:e});var r,o=e.order||"preorder",i=this[e.attr||"children"];"preorder"===o&&(r=t.call(n,this));for(var a=0;!r&&a<i.length;a++)i[a].eachNode(e,t,n);"postorder"===o&&t.call(n,this)},e.prototype.updateDepthAndHeight=function(e){var t=0;this.depth=e;for(var n=0;n<this.children.length;n++){var r=this.children[n];r.updateDepthAndHeight(e+1),r.height>t&&(t=r.height)}this.height=t+1},e.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,r=n.length;t<r;t++){var o=n[t].getNodeById(e);if(o)return o}},e.prototype.contains=function(e){if(e===this)return!0;for(var t=0,n=this.children,r=n.length;t<r;t++){var o=n[t].contains(e);if(o)return o}},e.prototype.getAncestors=function(e){for(var t=[],n=e?this:this.parentNode;n;)t.push(n),n=n.parentNode;return t.reverse(),t},e.prototype.getAncestorsIndices=function(){for(var e=[],t=this;t;)e.push(t.dataIndex),t=t.parentNode;return e.reverse(),e},e.prototype.getDescendantIndices=function(){var e=[];return this.eachNode((function(t){e.push(t.dataIndex)})),e},e.prototype.getValue=function(e){var t=this.hostTree.data;return t.getStore().get(t.getDimensionIndex(e||"value"),this.dataIndex)},e.prototype.setLayout=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},e.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(e)},e.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},e.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},e.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},e.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},e.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},e.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t<e.length;++t)if(e[t]===this)return t;return-1}return-1},e.prototype.isAncestorOf=function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},e.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},e}(),iF=function(){function e(e){this.type="tree",this._nodes=[],this.hostModel=e}return e.prototype.eachNode=function(e,t,n){this.root.eachNode(e,t,n)},e.prototype.getNodeByDataIndex=function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},e.prototype.getNodeById=function(e){return this.root.getNodeById(e)},e.prototype.update=function(){for(var e=this.data,t=this._nodes,n=0,r=t.length;n<r;n++)t[n].dataIndex=-1;for(n=0,r=e.count();n<r;n++)t[e.getRawIndex(n)].dataIndex=n},e.prototype.clearLayouts=function(){this.data.clearItemLayouts()},e.createTree=function(t,n,r){var o=new e(n),i=[],a=1;!function e(t,n){var r=t.value;a=Math.max(a,Vu(r)?r.length:1),i.push(t);var s=new oF(Mm(t.name,""),o);n?function(e,t){var n=t.children;if(e.parentNode===t)return;n.push(e),e.parentNode=t}(s,n):o.root=s,o._nodes.push(s);var l=t.children;if(l)for(var c=0;c<l.length;c++)e(l[c],s)}(t),o.root.updateDepthAndHeight(0);var s=ZP(i,{coordDimensions:["value"],dimensionsCount:a}).dimensions,l=new qP(s,n);return l.initData(i),r&&r(l),rF({mainData:l,struct:o,structAttr:"tree"}),o.update(),o},e}();const aF=iF;function sF(e,t,n){if(e&&ju(t,e.type)>=0){var r=n.getData().tree.root,o=e.targetNode;if(Hu(o)&&(o=r.getNodeById(o)),o&&r.contains(o))return{node:o};var i=e.targetNodeId;if(null!=i&&(o=r.getNodeById(i)))return{node:o}}}function lF(e){for(var t=[];e;)(e=e.parentNode)&&t.push(e);return t.reverse()}function cF(e,t){return ju(lF(e),t)>=0}function uF(e,t){for(var n=[];e;){var r=e.dataIndex;n.push({name:e.name,dataIndex:r,value:t.getRawValue(r)}),e=e.parentNode}return n.reverse(),n}var dF=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return ru(t,e),t.prototype.getInitialData=function(e){var t={name:e.name,children:e.data},n=e.leaves||{},r=new Yb(n,this,this.ecModel),o=aF.createTree(t,this,(function(e){e.wrapMethod("getItemModel",(function(e,t){var n=o.getNodeByDataIndex(t);return n&&n.children.length&&n.isExpand||(e.parentModel=r),e}))}));var i=0;o.eachNode("preorder",(function(e){e.depth>i&&(i=e.depth)}));var a=e.expandAndCollapse&&e.initialTreeDepth>=0?e.initialTreeDepth:i;return o.root.eachNode("preorder",(function(e){var t=e.hostTree.data.getRawDataItem(e.dataIndex);e.isExpand=t&&null!=t.collapsed?!t.collapsed:e.depth<=a})),o.data},t.prototype.getOrient=function(){var e=this.get("orient");return"horizontal"===e?e="LR":"vertical"===e&&(e="TB"),e},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.formatTooltip=function(e,t,n){for(var r=this.getData().tree,o=r.root.children[0],i=r.getNodeByDataIndex(e),a=i.getValue(),s=i.name;i&&i!==o;)s=i.parentNode.name+"."+s,i=i.parentNode;return TA("nameValue",{name:s,value:a,noValue:isNaN(a)||null==a})},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=uF(r,this),n.collapsed=!r.isExpand,n},t.type="series.tree",t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},t}(JA);const hF=dF;function pF(e,t){for(var n,r=[e];n=r.pop();)if(t(n),n.isExpand){var o=n.children;if(o.length)for(var i=o.length-1;i>=0;i--)r.push(o[i])}}function fF(e,t){e.eachSeriesByType("tree",(function(e){!function(e,t){var n=function(e,t){return Zw(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,t);e.layoutInfo=n;var r=e.get("layout"),o=0,i=0,a=null;"radial"===r?(o=2*Math.PI,i=Math.min(n.height,n.width)/2,a=PB((function(e,t){return(e.parentNode===t.parentNode?1:2)/e.depth}))):(o=n.width,i=n.height,a=PB());var s=e.getData().tree.root,l=s.children[0];if(l){!function(e){var t=e;t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var n,r,o=[t];n=o.pop();)if(r=n.children,n.isExpand&&r.length)for(var i=r.length-1;i>=0;i--){var a=r[i];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:i,thread:null},o.push(a)}}(s),function(e,t,n){for(var r,o=[e],i=[];r=o.pop();)if(i.push(r),r.isExpand){var a=r.children;if(a.length)for(var s=0;s<a.length;s++)o.push(a[s])}for(;r=i.pop();)t(r,n)}(l,DB,a),s.hierNode.modifier=-l.hierNode.prelim,pF(l,jB);var c=l,u=l,d=l;pF(l,(function(e){var t=e.getLayout().x;t<c.getLayout().x&&(c=e),t>u.getLayout().x&&(u=e),e.depth>d.depth&&(d=e)}));var h=c===u?1:a(c,u)/2,p=h-c.getLayout().x,f=0,g=0,m=0,v=0;if("radial"===r)f=o/(u.getLayout().x+h+p),g=i/(d.depth-1||1),pF(l,(function(e){m=(e.getLayout().x+p)*f,v=(e.depth-1)*g;var t=LB(m,v);e.setLayout({x:t.x,y:t.y,rawX:m,rawY:v},!0)}));else{var y=e.getOrient();"RL"===y||"LR"===y?(g=i/(u.getLayout().x+h+p),f=o/(d.depth-1||1),pF(l,(function(e){v=(e.getLayout().x+p)*g,m="LR"===y?(e.depth-1)*f:o-(e.depth-1)*f,e.setLayout({x:m,y:v},!0)}))):"TB"!==y&&"BT"!==y||(f=o/(u.getLayout().x+h+p),g=i/(d.depth-1||1),pF(l,(function(e){m=(e.getLayout().x+p)*f,v="TB"===y?(e.depth-1)*g:i-(e.depth-1)*g,e.setLayout({x:m,y:v},!0)})))}}}(e,t)}))}function gF(e){e.eachSeriesByType("tree",(function(e){var t=e.getData();t.tree.eachNode((function(e){var n=e.getModel().getModel("itemStyle").getItemStyle();Tu(t.ensureUniqueItemVisual(e.dataIndex,"style"),n)}))}))}var mF=["treemapZoomToNode","treemapRender","treemapMove"];function vF(e){var t=e.getData().tree,n={};t.eachNode((function(t){for(var r=t;r&&r.depth>1;)r=r.parentNode;var o=DS(e.ecModel,r.name||r.dataIndex+"",n);t.setVisual("decal",o)}))}var yF=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.preventUsingHoverLayer=!0,n}return ru(t,e),t.prototype.getInitialData=function(e,t){var n={name:e.name,children:e.data};xF(n);var r=e.levels||[],o=this.designatedVisualItemStyle={},i=new Yb({itemStyle:o},this,t);r=e.levels=function(e,t){var n,r,o=xm(t.get("color")),i=xm(t.get(["aria","decal","decals"]));if(!o)return;e=e||[],Ru(e,(function(e){var t=new Yb(e),o=t.get("color"),i=t.get("decal");(t.get(["itemStyle","color"])||o&&"none"!==o)&&(n=!0),(t.get(["itemStyle","decal"])||i&&"none"!==i)&&(r=!0)}));var a=e[0]||(e[0]={});n||(a.color=o.slice());!r&&i&&(a.decal=i.slice());return e}(r,t);var a=Eu(r||[],(function(e){return new Yb(e,i,t)}),this),s=aF.createTree(n,this,(function(e){e.wrapMethod("getItemModel",(function(e,t){var n=s.getNodeByDataIndex(t),r=n?a[n.depth]:null;return e.parentModel=r||i,e}))}));return s.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),o=this.getRawValue(e);return TA("nameValue",{name:r.getName(e),value:o})},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=uF(r,this),n.treePathInfo=n.treeAncestors,n},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},Tu(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var t=this._idIndexMap;t||(t=this._idIndexMap=dd(),this._idIndexMapCount=0);var n=t.get(e);return null==n&&t.set(e,n=this._idIndexMapCount++),n},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;e&&(e===t||t.contains(e))||(this._viewRoot=t)},t.prototype.enableAriaDecal=function(){vF(this)},t.type="series.treemap",t.layoutMode="box",t.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"\u25b6",zoomToNodeRatio:.1024,scaleLimit:null,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},t}(JA);function xF(e){var t=0;Ru(e.children,(function(e){xF(e);var n=e.value;Vu(n)&&(n=n[0]),t+=n}));var n=e.value;Vu(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=t),n<0&&(n=0),Vu(e.value)?e.value[0]=n:e.value=n}const bF=yF;var wF=function(){function e(e){this.group=new Fg,e.add(this.group)}return e.prototype.render=function(e,t,n,r){var o=e.getModel("breadcrumb"),i=this.group;if(i.removeAll(),o.get("show")&&n){var a=o.getModel("itemStyle"),s=o.getModel("emphasis"),l=a.getModel("textStyle"),c=s.getModel(["itemStyle","textStyle"]),u={pos:{left:o.get("left"),right:o.get("right"),top:o.get("top"),bottom:o.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:o.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,u,l),this._renderContent(e,u,a,s,l,c,r),Kw(i,u.pos,u.box)}},e.prototype._prepare=function(e,t,n){for(var r=e;r;r=r.parentNode){var o=Mm(r.getModel().get("name"),""),i=n.getTextRect(o),a=Math.max(i.width+16,t.emptyItemWidth);t.totalWidth+=a+8,t.renderList.push({node:r,text:o,width:a})}},e.prototype._renderContent=function(e,t,n,r,o,i,a){for(var s=0,l=t.emptyItemWidth,c=e.get(["breadcrumb","height"]),u=function(e,t,n){var r=t.width,o=t.height,i=Zg(e.left,r),a=Zg(e.top,o),s=Zg(e.right,r),l=Zg(e.bottom,o);return(isNaN(i)||isNaN(parseFloat(e.left)))&&(i=0),(isNaN(s)||isNaN(parseFloat(e.right)))&&(s=r),(isNaN(a)||isNaN(parseFloat(e.top)))&&(a=0),(isNaN(l)||isNaN(parseFloat(e.bottom)))&&(l=o),n=Ow(n||0),{width:Math.max(s-i-n[1]-n[3],0),height:Math.max(l-a-n[0]-n[2],0)}}(t.pos,t.box),d=t.totalWidth,h=t.renderList,p=r.getModel("itemStyle").getItemStyle(),f=h.length-1;f>=0;f--){var g=h[f],m=g.node,v=g.width,y=g.text;d>u.width&&(d-=v-l,v=l,y=null);var x=new $k({shape:{points:SF(s,0,v,c,f===h.length-1,0===f)},style:Du(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new ax({style:kb(o,{text:y})}),textConfig:{position:"inside"},z2:1e4*yx,onclick:Fu(a,m)});x.disableLabelAnimation=!0,x.getTextContent().ensureState("emphasis").style=kb(i,{text:y}),x.ensureState("emphasis").style=p,tb(x,r.get("focus"),r.get("blurScope"),r.get("disabled")),this.group.add(x),_F(x,e,m),s+=v+8}},e.prototype.remove=function(){this.group.removeAll()},e}();function SF(e,t,n,r,o,i){var a=[[o?e:e-5,t],[e+n,t],[e+n,t+r],[o?e:e-5,t+r]];return!i&&a.splice(2,0,[e+n+5,t+r/2]),!o&&a.push([e,t+r/2]),a}function _F(e,t,n){sx(e).eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&uF(n,t)}}const AF=wF;var kF=function(){function e(){this._storage=[],this._elExistsMap={}}return e.prototype.add=function(e,t,n,r,o){return!this._elExistsMap[e.id]&&(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:n,delay:r,easing:o}),!0)},e.prototype.finished=function(e){return this._finishedCallback=e,this},e.prototype.start=function(){for(var e=this,t=this._storage.length,n=function(){--t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},r=0,o=this._storage.length;r<o;r++){var i=this._storage[r];i.el.animateTo(i.target,{duration:i.duration,delay:i.delay,easing:i.easing,setToFinal:!0,done:n,aborted:n})}return this},e}();var CF=Fg,MF=Gy,IF="label",TF="upperLabel",DF=10*yx,jF=2*yx,PF=3*yx,LF=$m([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),RF=function(e){var t=LF(e);return t.stroke=t.fill=t.lineWidth=null,t},EF=jm(),NF=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._state="ready",n._storage={nodeGroup:[],background:[],content:[]},n}return ru(t,e),t.prototype.render=function(e,t,n,r){if(!(ju(t.findComponents({mainType:"series",subType:"treemap",query:r}),e)<0)){this.seriesModel=e,this.api=n,this.ecModel=t;var o=sF(r,["treemapZoomToNode","treemapRootToNode"],e),i=r&&r.type,a=e.layoutInfo,s=!this._oldTree,l=this._storage,c="treemapRootToNode"===i&&o&&l?{rootNodeGroup:l.nodeGroup[o.node.getRawIndex()],direction:r.direction}:null,u=this._giveContainerGroup(a),d=e.get("animation"),h=this._doRender(u,e,c);!d||s||i&&"treemapZoomToNode"!==i&&"treemapRootToNode"!==i?h.renderFinally():this._doAnimation(u,h,e,c),this._resetController(n),this._renderBreadcrumb(e,n,o)}},t.prototype._giveContainerGroup=function(e){var t=this._containerGroup;return t||(t=this._containerGroup=new CF,this._initEvents(t),this.group.add(t)),t.x=e.x,t.y=e.y,t},t.prototype._doRender=function(e,t,n){var r=t.getData().tree,o=this._oldTree,i={nodeGroup:[],background:[],content:[]},a={nodeGroup:[],background:[],content:[]},s=this._storage,l=[];function c(e,r,o,c){return function(e,t,n,r,o,i,a,s,l,c){if(!a)return;var u=a.getLayout(),d=e.getData(),h=a.getModel();if(d.setItemGraphicEl(a.dataIndex,null),!u||!u.isInView)return;var p=u.width,f=u.height,g=u.borderWidth,m=u.invisible,v=a.getRawIndex(),y=s&&s.getRawIndex(),x=a.viewChildren,b=u.upperHeight,w=x&&x.length,S=h.getModel("itemStyle"),_=h.getModel(["emphasis","itemStyle"]),A=h.getModel(["blur","itemStyle"]),k=h.getModel(["select","itemStyle"]),C=S.get("borderRadius")||0,M=F("nodeGroup",CF);if(!M)return;if(l.add(M),M.x=u.x||0,M.y=u.y||0,M.markRedraw(),EF(M).nodeWidth=p,EF(M).nodeHeight=f,u.isAboveViewRoot)return M;var I=F("background",MF,c,jF);I&&E(M,I,w&&u.upperLabelHeight);var T=h.getModel("emphasis"),D=T.get("focus"),j=T.get("blurScope"),P=T.get("disabled"),L="ancestor"===D?a.getAncestorsIndices():"descendant"===D?a.getDescendantIndices():D;if(w)sb(M)&&ab(M,!1),I&&(ab(I,!P),d.setItemGraphicEl(a.dataIndex,I),nb(I,L,j));else{var R=F("content",MF,c,PF);R&&N(M,R),I.disableMorphing=!0,I&&sb(I)&&ab(I,!1),ab(M,!P),d.setItemGraphicEl(a.dataIndex,M),nb(M,L,j)}return M;function E(t,n,r){var o=sx(n);if(o.dataIndex=a.dataIndex,o.seriesIndex=e.seriesIndex,n.setShape({x:0,y:0,width:p,height:f,r:C}),m)O(n);else{n.invisible=!1;var i=a.getVisual("style"),s=i.stroke,l=RF(S);l.fill=s;var c=LF(_);c.fill=_.get("borderColor");var u=LF(A);u.fill=A.get("borderColor");var d=LF(k);if(d.fill=k.get("borderColor"),r){var h=p-2*g;z(n,s,i.opacity,{x:g,y:0,width:h,height:b})}else n.removeTextContent();n.setStyle(l),n.ensureState("emphasis").style=c,n.ensureState("blur").style=u,n.ensureState("select").style=d,zx(n)}t.add(n)}function N(t,n){var r=sx(n);r.dataIndex=a.dataIndex,r.seriesIndex=e.seriesIndex;var o=Math.max(p-2*g,0),i=Math.max(f-2*g,0);if(n.culling=!0,n.setShape({x:g,y:g,width:o,height:i,r:C}),m)O(n);else{n.invisible=!1;var s=a.getVisual("style"),l=s.fill,c=RF(S);c.fill=l,c.decal=s.decal;var u=LF(_),d=LF(A),h=LF(k);z(n,l,s.opacity,null),n.setStyle(c),n.ensureState("emphasis").style=u,n.ensureState("blur").style=d,n.ensureState("select").style=h,zx(n)}t.add(n)}function O(e){!e.invisible&&i.push(e)}function z(t,n,r,o){var i=h.getModel(o?TF:IF),s=Mm(h.get("name"),null),l=i.getShallow("show");_b(t,Ab(h,o?TF:IF),{defaultText:l?s:null,inheritColor:n,defaultOpacity:r,labelFetcher:e,labelDataIndex:a.dataIndex});var c=t.getTextContent();if(c){var d=c.style,p=nd(d.padding||0);o&&(t.setTextConfig({layoutRect:o}),c.disableLabelLayout=!0),c.beforeUpdate=function(){var e=Math.max((o?o.width:t.shape.width)-p[1]-p[3],0),n=Math.max((o?o.height:t.shape.height)-p[0]-p[2],0);d.width===e&&d.height===n||c.setStyle({width:e,height:n})},d.truncateMinChar=2,d.lineOverflow="truncate",B(d,o,u);var f=c.getState("emphasis");B(f?f.style:null,o,u)}}function B(t,n,r){var o=t?t.text:null;if(!n&&r.isLeafRoot&&null!=o){var i=e.get("drillDownIcon",!0);t.text=i?i+" "+o:o}}function F(e,r,i,a){var s=null!=y&&n[e][y],l=o[e];return s?(n[e][y]=null,V(l,s)):m||((s=new r)instanceof kv&&(s.z2=function(e,t){return e*DF+t}(i,a)),W(l,s)),t[e][v]=s}function V(e,t){var n=e[v]={};t instanceof CF?(n.oldX=t.x,n.oldY=t.y):n.oldShape=Tu({},t.shape)}function W(e,t){var n=e[v]={},i=a.parentNode,s=t instanceof Fg;if(i&&(!r||"drillDown"===r.direction)){var l=0,c=0,u=o.background[i.getRawIndex()];!r&&u&&u.oldShape&&(l=u.oldShape.width,c=u.oldShape.height),s?(n.oldX=0,n.oldY=c):n.oldShape={x:l,y:c,width:0,height:0}}n.fadein=!s}}(t,a,s,n,i,l,e,r,o,c)}!function e(t,n,r,o,i){o?(n=t,Ru(t,(function(e,t){!e.isRemoved()&&s(t,t)}))):new _P(n,t,a,a).add(s).update(s).remove(Fu(s,null)).execute();function a(e){return e.getId()}function s(a,s){var l=null!=a?t[a]:null,u=null!=s?n[s]:null,d=c(l,u,r,i);d&&e(l&&l.viewChildren||[],u&&u.viewChildren||[],d,o,i+1)}}(r.root?[r.root]:[],o&&o.root?[o.root]:[],e,r===o||!o,0);var u=function(e){var t={nodeGroup:[],background:[],content:[]};return e&&Ru(e,(function(e,n){var r=t[n];Ru(e,(function(e){e&&(r.push(e),EF(e).willDelete=!0)}))})),t}(s);if(this._oldTree=r,this._storage=a,this._controllerHost){var d=this.seriesModel.layoutInfo,h=r.root.getLayout();h.width===d.width&&h.height===d.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:i,willDeleteEls:u,renderFinally:function(){Ru(u,(function(e){Ru(e,(function(e){e.parent&&e.parent.remove(e)}))})),Ru(l,(function(e){e.invisible=!0,e.dirty()}))}}},t.prototype._doAnimation=function(e,t,n,r){var o=n.get("animationDurationUpdate"),i=n.get("animationEasing"),a=(Wu(o)?0:o)||0,s=(Wu(i)?null:i)||"cubicOut",l=new kF;Ru(t.willDeleteEls,(function(e,t){Ru(e,(function(e,n){if(!e.invisible){var o,i=e.parent,c=EF(i);if(r&&"drillDown"===r.direction)o=i===r.rootNodeGroup?{shape:{x:0,y:0,width:c.nodeWidth,height:c.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var u=0,d=0;c.willDelete||(u=c.nodeWidth/2,d=c.nodeHeight/2),o="nodeGroup"===t?{x:u,y:d,style:{opacity:0}}:{shape:{x:u,y:d,width:0,height:0},style:{opacity:0}}}o&&l.add(e,o,a,0,s)}}))})),Ru(this._storage,(function(e,n){Ru(e,(function(e,r){var o=t.lastsForAnimation[n][r],i={};o&&(e instanceof Fg?null!=o.oldX&&(i.x=e.x,i.y=e.y,e.x=o.oldX,e.y=o.oldY):(o.oldShape&&(i.shape=Tu({},e.shape),e.setShape(o.oldShape)),o.fadein?(e.setStyle("opacity",0),i.style={opacity:1}):1!==e.style.opacity&&(i.style={opacity:1})),l.add(e,i,a,0,s))}))}),this),this._state="animating",l.finished(Bu((function(){this._state="ready",t.renderFinally()}),this)).start()},t.prototype._resetController=function(e){var t=this._controller,n=this._controllerHost;n||(this._controllerHost={target:this.group},n=this._controllerHost),t||((t=this._controller=new HO(e.getZr())).enable(this.seriesModel.get("roam")),n.zoomLimit=this.seriesModel.get("scaleLimit"),n.zoom=this.seriesModel.get("zoom"),t.on("pan",Bu(this._onPan,this)),t.on("zoom",Bu(this._onZoom,this)));var r=new Dh(0,0,e.getWidth(),e.getHeight());t.setPointerChecker((function(e,t,n){return r.contain(t,n)}))},t.prototype._clearController=function(){var e=this._controller;this._controllerHost=null,e&&(e.dispose(),e=null)},t.prototype._onPan=function(e){if("animating"!==this._state&&(Math.abs(e.dx)>3||Math.abs(e.dy)>3)){var t=this.seriesModel.getData().tree.root;if(!t)return;var n=t.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+e.dx,y:n.y+e.dy,width:n.width,height:n.height}})}},t.prototype._onZoom=function(e){var t=e.originX,n=e.originY,r=e.scale;if("animating"!==this._state){var o=this.seriesModel.getData().tree.root;if(!o)return;var i=o.getLayout();if(!i)return;var a,s=new Dh(i.x,i.y,i.width,i.height),l=this._controllerHost;a=l.zoomLimit;var c=l.zoom=l.zoom||1;if(c*=r,a){var u=a.min||0,d=a.max||1/0;c=Math.max(Math.min(d,c),u)}var h=c/l.zoom;l.zoom=c;var p=this.seriesModel.layoutInfo,f=[1,0,0,1,0,0];gh(f,f,[-(t-=p.x),-(n-=p.y)]),vh(f,f,[h,h]),gh(f,f,[t,n]),s.applyTransform(f),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},t.prototype._initEvents=function(e){var t=this;e.on("click",(function(e){if("ready"===t._state){var n=t.seriesModel.get("nodeClick",!0);if(n){var r=t.findTarget(e.offsetX,e.offsetY);if(r){var o=r.node;if(o.getLayout().isLeafRoot)t._rootToNode(r);else if("zoomToNode"===n)t._zoomToNode(r);else if("link"===n){var i=o.hostTree.data.getItemModel(o.dataIndex),a=i.get("link",!0),s=i.get("target",!0)||"blank";a&&Hw(a,s)}}}}}),this)},t.prototype._renderBreadcrumb=function(e,t,n){var r=this;n||(n=null!=e.get("leafDepth",!0)?{node:e.getViewRoot()}:this.findTarget(t.getWidth()/2,t.getHeight()/2))||(n={node:e.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new AF(this.group))).render(e,t,n.node,(function(t){"animating"!==r._state&&(cF(e.getViewRoot(),t)?r._rootToNode({node:t}):r._zoomToNode({node:t}))}))},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(e){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype._rootToNode=function(e){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype.findTarget=function(e,t){var n;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},(function(r){var o=this._storage.background[r.getRawIndex()];if(o){var i=o.transformCoordToLocal(e,t),a=o.shape;if(!(a.x<=i[0]&&i[0]<=a.x+a.width&&a.y<=i[1]&&i[1]<=a.y+a.height))return!1;n={node:r,offsetX:i[0],offsetY:i[1]}}}),this),n},t.type="treemap",t}(dM);const OF=NF;var zF=Ru,BF=Xu,FF=-1,VF=function(){function e(t){var n=t.mappingMethod,r=t.type,o=this.option=Cu(t);this.type=r,this.mappingMethod=n,this._normalizeData=$F[n];var i=e.visualHandlers[r];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._normalizedToVisual=i._normalizedToVisual[n],"piecewise"===n?(WF(o),function(e){var t=e.pieceList;e.hasSpecialVisual=!1,Ru(t,(function(t,n){t.originIndex=n,null!=t.visual&&(e.hasSpecialVisual=!0)}))}(o)):"category"===n?o.categories?function(e){var t=e.categories,n=e.categoryMap={},r=e.visual;if(zF(t,(function(e,t){n[e]=t})),!Vu(r)){var o=[];Xu(r)?zF(r,(function(e,t){var r=n[t];o[null!=r?r:FF]=e})):o[FF]=r,r=KF(e,o)}for(var i=t.length-1;i>=0;i--)null==r[i]&&(delete n[t[i]],t.pop())}(o):WF(o,!0):(rd("linear"!==n||o.dataExtent),WF(o))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return Bu(this._normalizeData,this)},e.listVisualTypes=function(){return zu(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){Xu(e)?Ru(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var o,i=Vu(t)?[]:Xu(t)?{}:(o=!0,null);return e.eachVisual(t,(function(e,t){var a=n.call(r,e,t);o?i=a:i[t]=a})),i},e.retrieveVisuals=function(t){var n,r={};return t&&zF(e.visualHandlers,(function(e,o){t.hasOwnProperty(o)&&(r[o]=t[o],n=!0)})),n?r:null},e.prepareVisualTypes=function(e){if(Vu(e))e=e.slice();else{if(!BF(e))return[];var t=[];zF(e,(function(e,n){t.push(n)})),e=t}return e.sort((function(e,t){return"color"===t&&"color"!==e&&0===e.indexOf("color")?1:-1})),e},e.dependsOn=function(e,t){return"color"===t?!(!e||0!==e.indexOf(t)):e===t},e.findPieceIndex=function(e,t,n){for(var r,o=1/0,i=0,a=t.length;i<a;i++){var s=t[i].value;if(null!=s){if(s===e||Hu(s)&&s===e+"")return i;n&&d(s,i)}}for(i=0,a=t.length;i<a;i++){var l=t[i],c=l.interval,u=l.close;if(c){if(c[0]===-1/0){if(QF(u[1],e,c[1]))return i}else if(c[1]===1/0){if(QF(u[0],c[0],e))return i}else if(QF(u[0],c[0],e)&&QF(u[1],e,c[1]))return i;n&&d(c[0],i),n&&d(c[1],i)}}if(n)return e===1/0?t.length-1:e===-1/0?0:r;function d(t,n){var i=Math.abs(t-e);i<o&&(o=i,r=n)}},e.visualHandlers={color:{applyVisual:UF("color"),getColorMapper:function(){var e=this.option;return Bu("category"===e.mappingMethod?function(e,t){return!t&&(e=this._normalizeData(e)),XF.call(this,e)}:function(t,n,r){var o=!!r;return!n&&(t=this._normalizeData(t)),r=Qp(t,e.parsedVisual,r),o?r:nf(r,"rgba")},this)},_normalizedToVisual:{linear:function(e){return nf(Qp(e,this.option.parsedVisual),"rgba")},category:XF,piecewise:function(e,t){var n=ZF.call(this,t);return null==n&&(n=nf(Qp(e,this.option.parsedVisual),"rgba")),n},fixed:YF}},colorHue:HF((function(e,t){return ef(e,t)})),colorSaturation:HF((function(e,t){return ef(e,null,t)})),colorLightness:HF((function(e,t){return ef(e,null,null,t)})),colorAlpha:HF((function(e,t){return tf(e,t)})),decal:{applyVisual:UF("decal"),_normalizedToVisual:{linear:null,category:XF,piecewise:null,fixed:null}},opacity:{applyVisual:UF("opacity"),_normalizedToVisual:qF([0,1])},liftZ:{applyVisual:UF("liftZ"),_normalizedToVisual:{linear:YF,category:YF,piecewise:YF,fixed:YF}},symbol:{applyVisual:function(e,t,n){n("symbol",this.mapValueToVisual(e))},_normalizedToVisual:{linear:GF,category:XF,piecewise:function(e,t){var n=ZF.call(this,t);return null==n&&(n=GF.call(this,e)),n},fixed:YF}},symbolSize:{applyVisual:UF("symbolSize"),_normalizedToVisual:qF([0,1])}},e}();function WF(e,t){var n=e.visual,r=[];Xu(n)?zF(n,(function(e){r.push(e)})):null!=n&&r.push(n);t||1!==r.length||{color:1,symbol:1}.hasOwnProperty(e.type)||(r[1]=r[0]),KF(e,r)}function HF(e){return{applyVisual:function(t,n,r){var o=this.mapValueToVisual(t);r("color",e(n("color"),o))},_normalizedToVisual:qF([0,1])}}function GF(e){var t=this.option.visual;return t[Math.round(qg(e,[0,1],[0,t.length-1],!0))]||{}}function UF(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function XF(e){var t=this.option.visual;return t[this.option.loop&&e!==FF?e%t.length:e]}function YF(){return this.option.visual[0]}function qF(e){return{linear:function(t){return qg(t,e,this.option.visual,!0)},category:XF,piecewise:function(t,n){var r=ZF.call(this,n);return null==r&&(r=qg(t,e,this.option.visual,!0)),r},fixed:YF}}function ZF(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[VF.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function KF(e,t){return e.visual=t,"color"===e.type&&(e.parsedVisual=Eu(t,(function(e){var t=Zp(e);return t||[0,0,0,1]}))),t}var $F={linear:function(e){return qg(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=VF.findPieceIndex(e,t,!0);if(null!=n)return qg(n,[0,t.length-1],[0,1],!0)},category:function(e){var t=this.option.categories?this.option.categoryMap[e]:e;return null==t?FF:t},fixed:md};function QF(e,t,n){return e?t<=n:t<n}const JF=VF;var eV=jm();const tV={seriesType:"treemap",reset:function(e){var t=e.getData().tree.root;t.isRemoved()||nV(t,{},e.getViewRoot().getAncestors(),e)}};function nV(e,t,n,r){var o=e.getModel(),i=e.getLayout(),a=e.hostTree.data;if(i&&!i.invisible&&i.isInView){var s,l=o.getModel("itemStyle"),c=function(e,t,n){var r=Tu({},t),o=n.designatedVisualItemStyle;return Ru(["color","colorAlpha","colorSaturation"],(function(n){o[n]=t[n];var i=e.get(n);o[n]=null,null!=i&&(r[n]=i)})),r}(l,t,r),u=a.ensureUniqueItemVisual(e.dataIndex,"style"),d=l.get("borderColor"),h=l.get("borderColorSaturation");null!=h&&(d=function(e,t){return null!=t?ef(t,null,null,e):null}(h,s=rV(c))),u.stroke=d;var p=e.viewChildren;if(p&&p.length){var f=function(e,t,n,r,o,i){if(!i||!i.length)return;var a=iV(t,"color")||null!=o.color&&"none"!==o.color&&(iV(t,"colorAlpha")||iV(t,"colorSaturation"));if(!a)return;var s=t.get("visualMin"),l=t.get("visualMax"),c=n.dataExtent.slice();null!=s&&s<c[0]&&(c[0]=s),null!=l&&l>c[1]&&(c[1]=l);var u=t.get("colorMappingBy"),d={type:a.name,dataExtent:c,visual:a.range};"color"!==d.type||"index"!==u&&"id"!==u?d.mappingMethod="linear":(d.mappingMethod="category",d.loop=!0);var h=new JF(d);return eV(h).drColorMappingBy=u,h}(0,o,i,0,c,p);Ru(p,(function(e,t){if(e.depth>=n.length||e===n[e.depth]){var i=function(e,t,n,r,o,i){var a=Tu({},t);if(o){var s=o.type,l="color"===s&&eV(o).drColorMappingBy,c="index"===l?r:"id"===l?i.mapIdToIndex(n.getId()):n.getValue(e.get("visualDimension"));a[s]=o.mapValueToVisual(c)}return a}(o,c,e,t,f,r);nV(e,i,n,r)}}))}else s=rV(c),u.fill=s}}function rV(e){var t=oV(e,"color");if(t){var n=oV(e,"colorAlpha"),r=oV(e,"colorSaturation");return r&&(t=ef(t,null,null,r)),n&&(t=tf(t,n)),t}}function oV(e,t){var n=e[t];if(null!=n&&"none"!==n)return n}function iV(e,t){var n=e.get(t);return Vu(n)&&n.length?{name:t,range:n}:null}var aV=Math.max,sV=Math.min,lV=Qu,cV=Ru,uV=["itemStyle","borderWidth"],dV=["itemStyle","gapWidth"],hV=["upperLabel","show"],pV=["upperLabel","height"];const fV={seriesType:"treemap",reset:function(e,t,n,r){var o=n.getWidth(),i=n.getHeight(),a=e.option,s=Zw(e.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),l=a.size||[],c=Zg(lV(s.width,l[0]),o),u=Zg(lV(s.height,l[1]),i),d=r&&r.type,h=sF(r,["treemapZoomToNode","treemapRootToNode"],e),p="treemapRender"===d||"treemapMove"===d?r.rootRect:null,f=e.getViewRoot(),g=lF(f);if("treemapMove"!==d){var m="treemapZoomToNode"===d?function(e,t,n,r,o){var i,a=(t||{}).node,s=[r,o];if(!a||a===n)return s;var l=r*o,c=l*e.option.zoomToNodeRatio;for(;i=a.parentNode;){for(var u=0,d=i.children,h=0,p=d.length;h<p;h++)u+=d[h].getValue();var f=a.getValue();if(0===f)return s;c*=u/f;var g=i.getModel(),m=g.get(uV);(c+=4*m*m+(3*m+Math.max(m,xV(g)))*Math.pow(c,.5))>nm&&(c=nm),a=i}c<l&&(c=l);var v=Math.pow(c/l,.5);return[r*v,o*v]}(e,h,f,c,u):p?[p.width,p.height]:[c,u],v=a.sort;v&&"asc"!==v&&"desc"!==v&&(v="desc");var y={squareRatio:a.squareRatio,sort:v,leafDepth:a.leafDepth};f.hostTree.clearLayouts();var x={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};f.setLayout(x),gV(f,y,!1,0),x=f.getLayout(),cV(g,(function(e,t){var n=(g[t+1]||f).getValue();e.setLayout(Tu({dataExtent:[n,n],borderWidth:0,upperHeight:0},x))}))}var b=e.getData().tree.root;b.setLayout(function(e,t,n){if(t)return{x:t.x,y:t.y};var r={x:0,y:0};if(!n)return r;var o=n.node,i=o.getLayout();if(!i)return r;var a=[i.width/2,i.height/2],s=o;for(;s;){var l=s.getLayout();a[0]+=l.x,a[1]+=l.y,s=s.parentNode}return{x:e.width/2-a[0],y:e.height/2-a[1]}}(s,p,h),!0),e.setLayoutInfo(s),yV(b,new Dh(-s.x,-s.y,o,i),g,f,0)}};function gV(e,t,n,r){var o,i;if(!e.isRemoved()){var a=e.getLayout();o=a.width,i=a.height;var s=e.getModel(),l=s.get(uV),c=s.get(dV)/2,u=xV(s),d=Math.max(l,u),h=l-c,p=d-c;e.setLayout({borderWidth:l,upperHeight:d,upperLabelHeight:u},!0);var f=(o=aV(o-2*h,0))*(i=aV(i-h-p,0)),g=function(e,t,n,r,o,i){var a=e.children||[],s=r.sort;"asc"!==s&&"desc"!==s&&(s=null);var l=null!=r.leafDepth&&r.leafDepth<=i;if(o&&!l)return e.viewChildren=[];a=Ou(a,(function(e){return!e.isRemoved()})),function(e,t){t&&e.sort((function(e,n){var r="asc"===t?e.getValue()-n.getValue():n.getValue()-e.getValue();return 0===r?"asc"===t?e.dataIndex-n.dataIndex:n.dataIndex-e.dataIndex:r}))}(a,s);var c=function(e,t,n){for(var r=0,o=0,i=t.length;o<i;o++)r+=t[o].getValue();var a,s=e.get("visualDimension");t&&t.length?"value"===s&&n?(a=[t[t.length-1].getValue(),t[0].getValue()],"asc"===n&&a.reverse()):(a=[1/0,-1/0],cV(t,(function(e){var t=e.getValue(s);t<a[0]&&(a[0]=t),t>a[1]&&(a[1]=t)}))):a=[NaN,NaN];return{sum:r,dataExtent:a}}(t,a,s);if(0===c.sum)return e.viewChildren=[];if(c.sum=function(e,t,n,r,o){if(!r)return n;for(var i=e.get("visibleMin"),a=o.length,s=a,l=a-1;l>=0;l--){var c=o["asc"===r?a-l-1:l].getValue();c/n*t<i&&(s=l,n-=c)}return"asc"===r?o.splice(0,a-s):o.splice(s,a-s),n}(t,n,c.sum,s,a),0===c.sum)return e.viewChildren=[];for(var u=0,d=a.length;u<d;u++){var h=a[u].getValue()/c.sum*n;a[u].setLayout({area:h})}l&&(a.length&&e.setLayout({isLeafRoot:!0},!0),a.length=0);return e.viewChildren=a,e.setLayout({dataExtent:c.dataExtent},!0),a}(e,s,f,t,n,r);if(g.length){var m={x:h,y:p,width:o,height:i},v=sV(o,i),y=1/0,x=[];x.area=0;for(var b=0,w=g.length;b<w;){var S=g[b];x.push(S),x.area+=S.getLayout().area;var _=mV(x,v,t.squareRatio);_<=y?(b++,y=_):(x.area-=x.pop().getLayout().area,vV(x,v,m,c,!1),v=sV(m.width,m.height),x.length=x.area=0,y=1/0)}if(x.length&&vV(x,v,m,c,!0),!n){var A=s.get("childrenVisibleMin");null!=A&&f<A&&(n=!0)}for(b=0,w=g.length;b<w;b++)gV(g[b],t,n,r+1)}}}function mV(e,t,n){for(var r=0,o=1/0,i=0,a=void 0,s=e.length;i<s;i++)(a=e[i].getLayout().area)&&(a<o&&(o=a),a>r&&(r=a));var l=e.area*e.area,c=t*t*n;return l?aV(c*r/l,l/(c*o)):1/0}function vV(e,t,n,r,o){var i=t===n.width?0:1,a=1-i,s=["x","y"],l=["width","height"],c=n[s[i]],u=t?e.area/t:0;(o||u>n[l[a]])&&(u=n[l[a]]);for(var d=0,h=e.length;d<h;d++){var p=e[d],f={},g=u?p.getLayout().area/u:0,m=f[l[a]]=aV(u-2*r,0),v=n[s[i]]+n[l[i]]-c,y=d===h-1||v<g?v:g,x=f[l[i]]=aV(y-2*r,0);f[s[a]]=n[s[a]]+sV(r,m/2),f[s[i]]=c+sV(r,x/2),c+=y,p.setLayout(f,!0)}n[s[a]]+=u,n[l[a]]-=u}function yV(e,t,n,r,o){var i=e.getLayout(),a=n[o],s=a&&a===e;if(!(a&&!s||o===n.length&&e!==r)){e.setLayout({isInView:!0,invisible:!s&&!t.intersect(i),isAboveViewRoot:s},!0);var l=new Dh(t.x-i.x,t.y-i.y,t.width,t.height);cV(e.viewChildren||[],(function(e){yV(e,l,n,r,o+1)}))}}function xV(e){return e.get(hV)?e.get(pV):0}function bV(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.eachSeriesByType("graph",(function(e){var n=e.getCategoriesData(),r=e.getGraph().data,o=n.mapArray(n.getName);r.filterSelf((function(e){var n=r.getItemModel(e).getShallow("category");if(null!=n){Uu(n)&&(n=o[n]);for(var i=0;i<t.length;i++)if(!t[i].isSelected(n))return!1}return!0}))}))}function wV(e){var t={};e.eachSeriesByType("graph",(function(e){var n=e.getCategoriesData(),r=e.getData(),o={};n.each((function(r){var i=n.getName(r);o["ec-"+i]=r;var a=n.getItemModel(r),s=a.getModel("itemStyle").getItemStyle();s.fill||(s.fill=e.getColorFromPalette(i,t)),n.setItemVisual(r,"style",s);for(var l=["symbol","symbolSize","symbolKeepAspect"],c=0;c<l.length;c++){var u=a.getShallow(l[c],!0);null!=u&&n.setItemVisual(r,l[c],u)}})),n.count()&&r.each((function(e){var t=r.getItemModel(e).getShallow("category");if(null!=t){Hu(t)&&(t=o["ec-"+t]);var i=n.getItemVisual(t,"style");Tu(r.ensureUniqueItemVisual(e,"style"),i);for(var a=["symbol","symbolSize","symbolKeepAspect"],s=0;s<a.length;s++)r.setItemVisual(e,a[s],n.getItemVisual(t,a[s]))}}))}))}function SV(e){return e instanceof Array||(e=[e,e]),e}function _V(e){e.eachSeriesByType("graph",(function(e){var t=e.getGraph(),n=e.getEdgeData(),r=SV(e.get("edgeSymbol")),o=SV(e.get("edgeSymbolSize"));n.setVisual("fromSymbol",r&&r[0]),n.setVisual("toSymbol",r&&r[1]),n.setVisual("fromSymbolSize",o&&o[0]),n.setVisual("toSymbolSize",o&&o[1]),n.setVisual("style",e.getModel("lineStyle").getLineStyle()),n.each((function(e){var r=n.getItemModel(e),o=t.getEdgeByIndex(e),i=SV(r.getShallow("symbol",!0)),a=SV(r.getShallow("symbolSize",!0)),s=r.getModel("lineStyle").getLineStyle(),l=n.ensureUniqueItemVisual(e,"style");switch(Tu(l,s),l.stroke){case"source":var c=o.node1.getVisual("style");l.stroke=c&&c.fill;break;case"target":c=o.node2.getVisual("style");l.stroke=c&&c.fill}i[0]&&o.setVisual("fromSymbol",i[0]),i[1]&&o.setVisual("toSymbol",i[1]),a[0]&&o.setVisual("fromSymbolSize",a[0]),a[1]&&o.setVisual("toSymbolSize",a[1])}))}))}var AV="--\x3e",kV=function(e){return e.get("autoCurveness")||null},CV=function(e,t){var n=kV(e),r=20,o=[];if(Uu(n))r=n;else if(Vu(n))return void(e.__curvenessList=n);t>r&&(r=t);var i=r%2?r+2:r+3;o=[];for(var a=0;a<i;a++)o.push((a%2?a+1:a)/10*(a%2?-1:1));e.__curvenessList=o},MV=function(e,t,n){var r=[e.id,e.dataIndex].join("."),o=[t.id,t.dataIndex].join(".");return[n.uid,r,o].join(AV)},IV=function(e){var t=e.split(AV);return[t[0],t[2],t[1]].join(AV)},TV=function(e,t){var n=MV(e.node1,e.node2,t);return t.__edgeMap[n]},DV=function(e,t){return jV(MV(e.node1,e.node2,t),t)+jV(MV(e.node2,e.node1,t),t)},jV=function(e,t){var n=t.__edgeMap;return n[e]?n[e].length:0};function PV(e,t,n,r){var o=kV(t),i=Vu(o);if(!o)return null;var a=TV(e,t);if(!a)return null;for(var s=-1,l=0;l<a.length;l++)if(a[l]===n){s=l;break}var c=DV(e,t);CV(t,c),e.lineStyle=e.lineStyle||{};var u=MV(e.node1,e.node2,t),d=t.__curvenessList,h=i||c%2?0:1;if(a.isForward)return d[h+s];var p=IV(u),f=jV(p,t),g=d[s+f+h];return r?i?o&&0===o[0]?(f+h)%2?g:-g:((f%2?0:1)+h)%2?g:-g:(f+h)%2?g:-g:d[s+f+h]}function LV(e){var t=e.coordinateSystem;if(!t||"view"===t.type){var n=e.getGraph();n.eachNode((function(e){var t=e.getModel();e.setLayout([+t.get("x"),+t.get("y")])})),RV(n,e)}}function RV(e,t){e.eachEdge((function(e,n){var r=ed(e.getModel().get(["lineStyle","curveness"]),-PV(e,t,n,!0),0),o=Sd(e.node1.getLayout()),i=Sd(e.node2.getLayout()),a=[o,i];+r&&a.push([(o[0]+i[0])/2-(o[1]-i[1])*r,(o[1]+i[1])/2-(i[0]-o[0])*r]),e.setLayout(a)}))}function EV(e,t){e.eachSeriesByType("graph",(function(e){var t=e.get("layout"),n=e.coordinateSystem;if(n&&"view"!==n.type){var r=e.getData(),o=[];Ru(n.dimensions,(function(e){o=o.concat(r.mapDimensionsAll(e))}));for(var i=0;i<r.count();i++){for(var a=[],s=!1,l=0;l<o.length;l++){var c=r.get(o[l],i);isNaN(c)||(s=!0),a.push(c)}s?r.setItemLayout(i,n.dataToPoint(a)):r.setItemLayout(i,[NaN,NaN])}RV(r.graph,e)}else t&&"none"!==t||LV(e)}))}function NV(e){var t=e.coordinateSystem;if("view"!==t.type)return 1;var n=e.option.nodeScaleRatio,r=t.scaleX;return((t.getZoom()-1)*n+1)/r}function OV(e){var t=e.getVisual("symbolSize");return t instanceof Array&&(t=(t[0]+t[1])/2),+t}var zV=Math.PI,BV=[];function FV(e,t,n,r){var o=e.coordinateSystem;if(!o||"view"===o.type){var i=o.getBoundingRect(),a=e.getData(),s=a.graph,l=i.width/2+i.x,c=i.height/2+i.y,u=Math.min(i.width,i.height)/2,d=a.count();if(a.setLayout({cx:l,cy:c}),d){if(n){var h=o.pointToData(r),p=h[0],f=h[1],g=[p-l,f-c];Dd(g,g),Td(g,g,u),n.setLayout([l+g[0],c+g[1]],!0),WV(n,e.get(["circular","rotateLabel"]),l,c)}VV[t](e,s,a,u,l,c,d),s.eachEdge((function(t,n){var r,o=ed(t.getModel().get(["lineStyle","curveness"]),PV(t,e,n),0),i=Sd(t.node1.getLayout()),a=Sd(t.node2.getLayout()),s=(i[0]+a[0])/2,u=(i[1]+a[1])/2;+o&&(r=[l*(o*=3)+s*(1-o),c*o+u*(1-o)]),t.setLayout([i,a,r])}))}}}var VV={value:function(e,t,n,r,o,i,a){var s=0,l=n.getSum("value"),c=2*Math.PI/(l||a);t.eachNode((function(e){var t=e.getValue("value"),n=c*(l?t:1)/2;s+=n,e.setLayout([r*Math.cos(s)+o,r*Math.sin(s)+i]),s+=n}))},symbolSize:function(e,t,n,r,o,i,a){var s=0;BV.length=a;var l=NV(e);t.eachNode((function(e){var t=OV(e);isNaN(t)&&(t=2),t<0&&(t=0),t*=l;var n=Math.asin(t/2/r);isNaN(n)&&(n=zV/2),BV[e.dataIndex]=n,s+=2*n}));var c=(2*zV-s)/a/2,u=0;t.eachNode((function(e){var t=c+BV[e.dataIndex];u+=t,(!e.getLayout()||!e.getLayout().fixed)&&e.setLayout([r*Math.cos(u)+o,r*Math.sin(u)+i]),u+=t}))}};function WV(e,t,n,r){var o=e.getGraphicEl();if(o){var i=e.getModel().get(["label","rotate"])||0,a=o.getSymbolPath();if(t){var s=e.getLayout(),l=Math.atan2(s[1]-r,s[0]-n);l<0&&(l=2*Math.PI+l);var c=s[0]<n;c&&(l-=Math.PI);var u=c?"left":"right";a.setTextConfig({rotation:-l,position:u,origin:"center"});var d=a.ensureState("emphasis");Tu(d.textConfig||(d.textConfig={}),{position:u})}else a.setTextConfig({rotation:i*=Math.PI/180})}}function HV(e){e.eachSeriesByType("graph",(function(e){"circular"===e.get("layout")&&FV(e,"symbolSize")}))}var GV=kd;function UV(e){e.eachSeriesByType("graph",(function(e){var t=e.coordinateSystem;if(!t||"view"===t.type)if("force"===e.get("layout")){var n=e.preservedPoints||{},r=e.getGraph(),o=r.data,i=r.edgeData,a=e.getModel("force"),s=a.get("initLayout");e.preservedPoints?o.each((function(e){var t=o.getId(e);o.setItemLayout(e,n[t]||[NaN,NaN])})):s&&"none"!==s?"circular"===s&&FV(e,"value"):LV(e);var l=o.getDataExtent("value"),c=i.getDataExtent("value"),u=a.get("repulsion"),d=a.get("edgeLength"),h=Vu(u)?u:[u,u],p=Vu(d)?d:[d,d];p=[p[1],p[0]];var f=o.mapArray("value",(function(e,t){var n=o.getItemLayout(t),r=qg(e,l,h);return isNaN(r)&&(r=(h[0]+h[1])/2),{w:r,rep:r,fixed:o.getItemModel(t).get("fixed"),p:!n||isNaN(n[0])||isNaN(n[1])?null:n}})),g=i.mapArray("value",(function(t,n){var o=r.getEdgeByIndex(n),i=qg(t,c,p);isNaN(i)&&(i=(p[0]+p[1])/2);var a=o.getModel(),s=ed(o.getModel().get(["lineStyle","curveness"]),-PV(o,e,n,!0),0);return{n1:f[o.node1.dataIndex],n2:f[o.node2.dataIndex],d:i,curveness:s,ignoreForceLayout:a.get("ignoreForceLayout")}})),m=t.getBoundingRect(),v=function(e,t,n){for(var r=e,o=t,i=n.rect,a=i.width,s=i.height,l=[i.x+a/2,i.y+s/2],c=null==n.gravity?.1:n.gravity,u=0;u<r.length;u++){var d=r[u];d.p||(d.p=bd(a*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),d.pp=Sd(d.p),d.edges=null}var h,p,f=null==n.friction?.6:n.friction,g=f;return{warmUp:function(){g=.8*f},setFixed:function(e){r[e].fixed=!0},setUnfixed:function(e){r[e].fixed=!1},beforeStep:function(e){h=e},afterStep:function(e){p=e},step:function(e){h&&h(r,o);for(var t=[],n=r.length,i=0;i<o.length;i++){var a=o[i];if(!a.ignoreForceLayout){var s=a.n1;Cd(t,(m=a.n2).p,s.p);var u=Md(t)-a.d,d=m.w/(s.w+m.w);isNaN(d)&&(d=0),Dd(t,t),!s.fixed&&GV(s.p,s.p,t,d*u*g),!m.fixed&&GV(m.p,m.p,t,-(1-d)*u*g)}}for(i=0;i<n;i++)(x=r[i]).fixed||(Cd(t,l,x.p),GV(x.p,x.p,t,c*g));for(i=0;i<n;i++){s=r[i];for(var f=i+1;f<n;f++){var m;Cd(t,(m=r[f]).p,s.p),0===(u=Md(t))&&(_d(t,Math.random()-.5,Math.random()-.5),u=1);var v=(s.rep+m.rep)/u/u;!s.fixed&&GV(s.pp,s.pp,t,v),!m.fixed&&GV(m.pp,m.pp,t,-v)}}var y=[];for(i=0;i<n;i++){var x;(x=r[i]).fixed||(Cd(y,x.p,x.pp),GV(x.p,x.p,y,g),wd(x.pp,x.p))}var b=(g*=.992)<.01;p&&p(r,o,b),e&&e(b)}}}(f,g,{rect:m,gravity:a.get("gravity"),friction:a.get("friction")});v.beforeStep((function(e,t){for(var n=0,o=e.length;n<o;n++)e[n].fixed&&wd(e[n].p,r.getNodeByIndex(n).getLayout())})),v.afterStep((function(e,t,i){for(var a=0,s=e.length;a<s;a++)e[a].fixed||r.getNodeByIndex(a).setLayout(e[a].p),n[o.getId(a)]=e[a].p;for(a=0,s=t.length;a<s;a++){var l=t[a],c=r.getEdgeByIndex(a),u=l.n1.p,d=l.n2.p,h=c.getLayout();(h=h?h.slice():[])[0]=h[0]||[],h[1]=h[1]||[],wd(h[0],u),wd(h[1],d),+l.curveness&&(h[2]=[(u[0]+d[0])/2-(u[1]-d[1])*l.curveness,(u[1]+d[1])/2-(d[0]-u[0])*l.curveness]),c.setLayout(h)}})),e.forceLayout=v,e.preservedPoints=n,v.step()}else e.forceLayout=null}))}function XV(e,t){var n=[];return e.eachSeriesByType("graph",(function(e){var r=e.get("coordinateSystem");if(!r||"view"===r){var o=e.getData(),i=[],a=[];Rv(o.mapArray((function(e){var t=o.getItemModel(e);return[+t.get("x"),+t.get("y")]})),i,a),a[0]-i[0]===0&&(a[0]+=1,i[0]-=1),a[1]-i[1]===0&&(a[1]+=1,i[1]-=1);var s=(a[0]-i[0])/(a[1]-i[1]),l=function(e,t,n){return Zw(Tu(e.getBoxLayoutParams(),{aspect:n}),{width:t.getWidth(),height:t.getHeight()})}(e,t,s);isNaN(s)&&(i=[l.x,l.y],a=[l.x+l.width,l.y+l.height]);var c=a[0]-i[0],u=a[1]-i[1],d=l.width,h=l.height,p=e.coordinateSystem=new pB;p.zoomLimit=e.get("scaleLimit"),p.setBoundingRect(i[0],i[1],c,u),p.setViewRect(l.x,l.y,d,h),p.setCenter(e.get("center"),t),p.setZoom(e.get("zoom")),n.push(p)}})),n}var YV=oC.prototype,qV=cC.prototype,ZV=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1};!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}ru(t,e)}(ZV);function KV(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}const $V=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-line",n}return ru(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new ZV},t.prototype.buildPath=function(e,t){KV(t)?YV.buildPath.call(this,e,t):qV.buildPath.call(this,e,t)},t.prototype.pointAt=function(e){return KV(this.shape)?YV.pointAt.call(this,e):qV.pointAt.call(this,e)},t.prototype.tangentAt=function(e){var t=this.shape,n=KV(t)?[t.x2-t.x1,t.y2-t.y1]:qV.tangentAt.call(this,e);return Dd(n,n)},t}(Ty);var QV=["fromSymbol","toSymbol"];function JV(e){return"_"+e+"Type"}function eW(e,t,n){var r=t.getItemVisual(n,e);if(!r||"none"===r)return r;var o=t.getItemVisual(n,e+"Size"),i=t.getItemVisual(n,e+"Rotate"),a=t.getItemVisual(n,e+"Offset"),s=t.getItemVisual(n,e+"KeepAspect"),l=wI(o);return r+l+SI(a||0,l)+(i||"")+(s||"")}function tW(e,t,n){var r=t.getItemVisual(n,e);if(r&&"none"!==r){var o=t.getItemVisual(n,e+"Size"),i=t.getItemVisual(n,e+"Rotate"),a=t.getItemVisual(n,e+"Offset"),s=t.getItemVisual(n,e+"KeepAspect"),l=wI(o),c=SI(a||0,l),u=bI(r,-l[0]/2+c[0],-l[1]/2+c[1],l[0],l[1],null,s);return u.__specifiedRotation=null==i||isNaN(i)?void 0:+i*Math.PI/180||0,u.name=e,u}}function nW(e,t){e.x1=t[0][0],e.y1=t[0][1],e.x2=t[1][0],e.y2=t[1][1],e.percent=1;var n=t[2];n?(e.cpx1=n[0],e.cpy1=n[1]):(e.cpx1=NaN,e.cpy1=NaN)}var rW=function(e){function t(t,n,r){var o=e.call(this)||this;return o._createLine(t,n,r),o}return ru(t,e),t.prototype._createLine=function(e,t,n){var r=e.hostModel,o=function(e){var t=new $V({name:"line",subPixelOptimize:!0});return nW(t.shape,e),t}(e.getItemLayout(t));o.shape.percent=0,fb(o,{shape:{percent:1}},r,t),this.add(o),Ru(QV,(function(n){var r=tW(n,e,t);this.add(r),this[JV(n)]=eW(n,e,t)}),this),this._updateCommonStl(e,t,n)},t.prototype.updateData=function(e,t,n){var r=e.hostModel,o=this.childOfName("line"),i=e.getItemLayout(t),a={shape:{}};nW(a.shape,i),pb(o,a,r,t),Ru(QV,(function(n){var r=eW(n,e,t),o=JV(n);if(this[o]!==r){this.remove(this.childOfName(n));var i=tW(n,e,t);this.add(i)}this[o]=r}),this),this._updateCommonStl(e,t,n)},t.prototype.getLinePath=function(){return this.childAt(0)},t.prototype._updateCommonStl=function(e,t,n){var r=e.hostModel,o=this.childOfName("line"),i=n&&n.emphasisLineStyle,a=n&&n.blurLineStyle,s=n&&n.selectLineStyle,l=n&&n.labelStatesModels,c=n&&n.emphasisDisabled,u=n&&n.focus,d=n&&n.blurScope;if(!n||e.hasItemOption){var h=e.getItemModel(t),p=h.getModel("emphasis");i=p.getModel("lineStyle").getLineStyle(),a=h.getModel(["blur","lineStyle"]).getLineStyle(),s=h.getModel(["select","lineStyle"]).getLineStyle(),c=p.get("disabled"),u=p.get("focus"),d=p.get("blurScope"),l=Ab(h)}var f=e.getItemVisual(t,"style"),g=f.stroke;o.useStyle(f),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=i,o.ensureState("blur").style=a,o.ensureState("select").style=s,Ru(QV,(function(e){var t=this.childOfName(e);if(t){t.setColor(g),t.style.opacity=f.opacity;for(var n=0;n<mx.length;n++){var r=mx[n],i=o.getState(r);if(i){var a=i.style||{},s=t.ensureState(r),l=s.style||(s.style={});null!=a.stroke&&(l[t.__isEmptyBrush?"stroke":"fill"]=a.stroke),null!=a.opacity&&(l.opacity=a.opacity)}}t.markRedraw()}}),this);var m=r.getRawValue(t);_b(this,l,{labelDataIndex:t,labelFetcher:{getFormattedLabel:function(t,n){return r.getFormattedLabel(t,n,e.dataType)}},inheritColor:g||"#000",defaultOpacity:f.opacity,defaultText:(null==m?e.getName(t):isFinite(m)?Kg(m):m)+""});var v=this.getTextContent();if(v){var y=l.normal;v.__align=v.style.align,v.__verticalAlign=v.style.verticalAlign,v.__position=y.get("position")||"middle";var x=y.get("distance");Vu(x)||(x=[x,x]),v.__labelDistance=x}this.setTextConfig({position:null,local:!0,inside:!1}),tb(this,u,d,c)},t.prototype.highlight=function(){Vx(this)},t.prototype.downplay=function(){Wx(this)},t.prototype.updateLayout=function(e,t){this.setLinePoints(e.getItemLayout(t))},t.prototype.setLinePoints=function(e){var t=this.childOfName("line");nW(t.shape,e),t.dirty()},t.prototype.beforeUpdate=function(){var e=this,t=e.childOfName("fromSymbol"),n=e.childOfName("toSymbol"),r=e.getTextContent();if(t||n||r&&!r.ignore){for(var o=1,i=this.parent;i;)i.scaleX&&(o/=i.scaleX),i=i.parent;var a=e.childOfName("line");if(this.__dirty||a.__dirty){var s=a.shape.percent,l=a.pointAt(0),c=a.pointAt(s),u=Cd([],c,l);if(Dd(u,u),t&&(t.setPosition(l),_(t,0),t.scaleX=t.scaleY=o*s,t.markRedraw()),n&&(n.setPosition(c),_(n,1),n.scaleX=n.scaleY=o*s,n.markRedraw()),r&&!r.ignore){r.x=r.y=0,r.originX=r.originY=0;var d=void 0,h=void 0,p=r.__labelDistance,f=p[0]*o,g=p[1]*o,m=s/2,v=a.tangentAt(m),y=[v[1],-v[0]],x=a.pointAt(m);y[1]>0&&(y[0]=-y[0],y[1]=-y[1]);var b=v[0]<0?-1:1;if("start"!==r.__position&&"end"!==r.__position){var w=-Math.atan2(v[1],v[0]);c[0]<l[0]&&(w=Math.PI+w),r.rotation=w}var S=void 0;switch(r.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":S=-g,h="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":S=g,h="top";break;default:S=0,h="middle"}switch(r.__position){case"end":r.x=u[0]*f+c[0],r.y=u[1]*g+c[1],d=u[0]>.8?"left":u[0]<-.8?"right":"center",h=u[1]>.8?"top":u[1]<-.8?"bottom":"middle";break;case"start":r.x=-u[0]*f+l[0],r.y=-u[1]*g+l[1],d=u[0]>.8?"right":u[0]<-.8?"left":"center",h=u[1]>.8?"bottom":u[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":r.x=f*b+l[0],r.y=l[1]+S,d=v[0]<0?"right":"left",r.originX=-f*b,r.originY=-S;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":r.x=x[0],r.y=x[1]+S,d="center",r.originY=-S;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":r.x=-f*b+c[0],r.y=c[1]+S,d=v[0]>=0?"right":"left",r.originX=f*b,r.originY=-S}r.scaleX=r.scaleY=o,r.setStyle({verticalAlign:r.__verticalAlign||h,align:r.__align||d})}}}function _(e,t){var n=e.__specifiedRotation;if(null==n){var r=a.tangentAt(t);e.attr("rotation",(1===t?-1:1)*Math.PI/2-Math.atan2(r[1],r[0]))}else e.attr("rotation",n)}},t}(Fg);const oW=rW;function iW(e){var t=e.hostModel,n=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:n.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:n.get("disabled"),blurScope:n.get("blurScope"),focus:n.get("focus"),labelStatesModels:Ab(t)}}function aW(e){return isNaN(e[0])||isNaN(e[1])}function sW(e){return e&&!aW(e[0])&&!aW(e[1])}const lW=function(){function e(e){this.group=new Fg,this._LineCtor=e||oW}return e.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,r=n.group,o=n._lineData;n._lineData=e,o||r.removeAll();var i=iW(e);e.diff(o).add((function(n){t._doAdd(e,n,i)})).update((function(n,r){t._doUpdate(o,e,r,n,i)})).remove((function(e){r.remove(o.getItemGraphicEl(e))})).execute()},e.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl((function(t,n){t.updateLayout(e,n)}),this)},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=iW(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t){function n(e){e.isGroup||function(e){return e.animators&&e.animators.length>0}(e)||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[];for(var r=e.start;r<e.end;r++){if(sW(t.getItemLayout(r))){var o=new this._LineCtor(t,r,this._seriesScope);o.traverse(n),this.group.add(o),t.setItemGraphicEl(r,o),this._progressiveEls.push(o)}}},e.prototype.remove=function(){this.group.removeAll()},e.prototype.eachRendered=function(e){nM(this._progressiveEls||this.group,e)},e.prototype._doAdd=function(e,t,n){if(sW(e.getItemLayout(t))){var r=new this._LineCtor(e,t,n);e.setItemGraphicEl(t,r),this.group.add(r)}},e.prototype._doUpdate=function(e,t,n,r,o){var i=e.getItemGraphicEl(n);sW(t.getItemLayout(r))?(i?i.updateData(t,r,o):i=new this._LineCtor(t,r,o),t.setItemGraphicEl(r,i),this.group.add(i)):this.group.remove(i)},e}();var cW=[],uW=[],dW=[],hW=Ap,pW=Ld,fW=Math.abs;function gW(e,t,n){for(var r,o=e[0],i=e[1],a=e[2],s=1/0,l=n*n,c=.1,u=.1;u<=.9;u+=.1){cW[0]=hW(o[0],i[0],a[0],u),cW[1]=hW(o[1],i[1],a[1],u),(p=fW(pW(cW,t)-l))<s&&(s=p,r=u)}for(var d=0;d<32;d++){var h=r+c;uW[0]=hW(o[0],i[0],a[0],r),uW[1]=hW(o[1],i[1],a[1],r),dW[0]=hW(o[0],i[0],a[0],h),dW[1]=hW(o[1],i[1],a[1],h);var p=pW(uW,t)-l;if(fW(p)<.01)break;var f=pW(dW,t)-l;c/=2,p<0?f>=0?r+=c:r-=c:f>=0?r-=c:r+=c}return r}function mW(e,t){var n=[],r=Mp,o=[[],[],[]],i=[[],[]],a=[];t/=2,e.eachEdge((function(e,s){var l=e.getLayout(),c=e.getVisual("fromSymbol"),u=e.getVisual("toSymbol");l.__original||(l.__original=[Sd(l[0]),Sd(l[1])],l[2]&&l.__original.push(Sd(l[2])));var d=l.__original;if(null!=l[2]){if(wd(o[0],d[0]),wd(o[1],d[2]),wd(o[2],d[1]),c&&"none"!==c){var h=OV(e.node1),p=gW(o,d[0],h*t);r(o[0][0],o[1][0],o[2][0],p,n),o[0][0]=n[3],o[1][0]=n[4],r(o[0][1],o[1][1],o[2][1],p,n),o[0][1]=n[3],o[1][1]=n[4]}if(u&&"none"!==u){h=OV(e.node2),p=gW(o,d[1],h*t);r(o[0][0],o[1][0],o[2][0],p,n),o[1][0]=n[1],o[2][0]=n[2],r(o[0][1],o[1][1],o[2][1],p,n),o[1][1]=n[1],o[2][1]=n[2]}wd(l[0],o[0]),wd(l[1],o[2]),wd(l[2],o[1])}else{if(wd(i[0],d[0]),wd(i[1],d[1]),Cd(a,i[1],i[0]),Dd(a,a),c&&"none"!==c){h=OV(e.node1);kd(i[0],i[0],a,h*t)}if(u&&"none"!==u){h=OV(e.node2);kd(i[1],i[1],a,-h*t)}wd(l[0],i[0]),wd(l[1],i[1])}}))}function vW(e){return"view"===e.type}var yW=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.init=function(e,t){var n=new fL,r=new lW,o=this.group;this._controller=new HO(t.getZr()),this._controllerHost={target:o},o.add(n.group),o.add(r.group),this._symbolDraw=n,this._lineDraw=r,this._firstRender=!0},t.prototype.render=function(e,t,n){var r=this,o=e.coordinateSystem;this._model=e;var i=this._symbolDraw,a=this._lineDraw,s=this.group;if(vW(o)){var l={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?s.attr(l):pb(s,l,e)}mW(e.getGraph(),NV(e));var c=e.getData();i.updateData(c);var u=e.getEdgeData();a.updateData(u),this._updateNodeAndLinkScale(),this._updateController(e,t,n),clearTimeout(this._layoutTimeout);var d=e.forceLayout,h=e.get(["force","layoutAnimation"]);d&&this._startForceLayoutIteration(d,h);var p=e.get("layout");c.graph.eachNode((function(t){var n=t.dataIndex,o=t.getGraphicEl(),i=t.getModel();if(o){o.off("drag").off("dragend");var a=i.get("draggable");a&&o.on("drag",(function(i){switch(p){case"force":d.warmUp(),!r._layouting&&r._startForceLayoutIteration(d,h),d.setFixed(n),c.setItemLayout(n,[o.x,o.y]);break;case"circular":c.setItemLayout(n,[o.x,o.y]),t.setLayout({fixed:!0},!0),FV(e,"symbolSize",t,[i.offsetX,i.offsetY]),r.updateLayout(e);break;default:c.setItemLayout(n,[o.x,o.y]),RV(e.getGraph(),e),r.updateLayout(e)}})).on("dragend",(function(){d&&d.setUnfixed(n)})),o.setDraggable(a,!!i.get("cursor")),"adjacency"===i.get(["emphasis","focus"])&&(sx(o).focus=t.getAdjacentDataIndices())}})),c.graph.eachEdge((function(e){var t=e.getGraphicEl(),n=e.getModel().get(["emphasis","focus"]);t&&"adjacency"===n&&(sx(t).focus={edge:[e.dataIndex],node:[e.node1.dataIndex,e.node2.dataIndex]})}));var f="circular"===e.get("layout")&&e.get(["circular","rotateLabel"]),g=c.getLayout("cx"),m=c.getLayout("cy");c.graph.eachNode((function(e){WV(e,f,g,m)})),this._firstRender=!1},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._startForceLayoutIteration=function(e,t){var n=this;!function r(){e.step((function(e){n.updateLayout(n._model),(n._layouting=!e)&&(t?n._layoutTimeout=setTimeout(r,16):r())}))}()},t.prototype._updateController=function(e,t,n){var r=this,o=this._controller,i=this._controllerHost,a=this.group;o.setPointerChecker((function(t,r,o){var i=a.getBoundingRect();return i.applyTransform(a.transform),i.contain(r,o)&&!qO(t,n,e)})),vW(e.coordinateSystem)?(o.enable(e.get("roam")),i.zoomLimit=e.get("scaleLimit"),i.zoom=e.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",(function(t){GO(i,t.dx,t.dy),n.dispatchAction({seriesId:e.id,type:"graphRoam",dx:t.dx,dy:t.dy})})).on("zoom",(function(t){UO(i,t.scale,t.originX,t.originY),n.dispatchAction({seriesId:e.id,type:"graphRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),r._updateNodeAndLinkScale(),mW(e.getGraph(),NV(e)),r._lineDraw.updateLayout(),n.updateLabelLayout()}))):o.disable()},t.prototype._updateNodeAndLinkScale=function(){var e=this._model,t=e.getData(),n=NV(e);t.eachItemGraphicEl((function(e,t){e&&e.setSymbolScale(n)}))},t.prototype.updateLayout=function(e){mW(e.getGraph(),NV(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},t.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},t.type="graph",t}(dM);const xW=yW;function bW(e){return"_EC_"+e}var wW=function(){function e(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return e.prototype.isDirected=function(){return this._directed},e.prototype.addNode=function(e,t){e=null==e?""+t:""+e;var n=this._nodesMap;if(!n[bW(e)]){var r=new SW(e,t);return r.hostGraph=this,this.nodes.push(r),n[bW(e)]=r,r}},e.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},e.prototype.getNodeById=function(e){return this._nodesMap[bW(e)]},e.prototype.addEdge=function(e,t,n){var r=this._nodesMap,o=this._edgesMap;if(Uu(e)&&(e=this.nodes[e]),Uu(t)&&(t=this.nodes[t]),e instanceof SW||(e=r[bW(e)]),t instanceof SW||(t=r[bW(t)]),e&&t){var i=e.id+"-"+t.id,a=new _W(e,t,n);return a.hostGraph=this,this._directed&&(e.outEdges.push(a),t.inEdges.push(a)),e.edges.push(a),e!==t&&t.edges.push(a),this.edges.push(a),o[i]=a,a}},e.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},e.prototype.getEdge=function(e,t){e instanceof SW&&(e=e.id),t instanceof SW&&(t=t.id);var n=this._edgesMap;return this._directed?n[e+"-"+t]:n[e+"-"+t]||n[t+"-"+e]},e.prototype.eachNode=function(e,t){for(var n=this.nodes,r=n.length,o=0;o<r;o++)n[o].dataIndex>=0&&e.call(t,n[o],o)},e.prototype.eachEdge=function(e,t){for(var n=this.edges,r=n.length,o=0;o<r;o++)n[o].dataIndex>=0&&n[o].node1.dataIndex>=0&&n[o].node2.dataIndex>=0&&e.call(t,n[o],o)},e.prototype.breadthFirstTraverse=function(e,t,n,r){if(t instanceof SW||(t=this._nodesMap[bW(t)]),t){for(var o="out"===n?"outEdges":"in"===n?"inEdges":"edges",i=0;i<this.nodes.length;i++)this.nodes[i].__visited=!1;if(!e.call(r,t,null))for(var a=[t];a.length;){var s=a.shift(),l=s[o];for(i=0;i<l.length;i++){var c=l[i],u=c.node1===s?c.node2:c.node1;if(!u.__visited){if(e.call(r,u,s))return;a.push(u),u.__visited=!0}}}}},e.prototype.update=function(){for(var e=this.data,t=this.edgeData,n=this.nodes,r=this.edges,o=0,i=n.length;o<i;o++)n[o].dataIndex=-1;for(o=0,i=e.count();o<i;o++)n[e.getRawIndex(o)].dataIndex=o;t.filterSelf((function(e){var n=r[t.getRawIndex(e)];return n.node1.dataIndex>=0&&n.node2.dataIndex>=0}));for(o=0,i=r.length;o<i;o++)r[o].dataIndex=-1;for(o=0,i=t.count();o<i;o++)r[t.getRawIndex(o)].dataIndex=o},e.prototype.clone=function(){for(var t=new e(this._directed),n=this.nodes,r=this.edges,o=0;o<n.length;o++)t.addNode(n[o].id,n[o].dataIndex);for(o=0;o<r.length;o++){var i=r[o];t.addEdge(i.node1.id,i.node2.id,i.dataIndex)}return t},e}(),SW=function(){function e(e,t){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=null==e?"":e,this.dataIndex=null==t?-1:t}return e.prototype.degree=function(){return this.edges.length},e.prototype.inDegree=function(){return this.inEdges.length},e.prototype.outDegree=function(){return this.outEdges.length},e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(e)},e.prototype.getAdjacentDataIndices=function(){for(var e={edge:[],node:[]},t=0;t<this.edges.length;t++){var n=this.edges[t];n.dataIndex<0||(e.edge.push(n.dataIndex),e.node.push(n.node1.dataIndex,n.node2.dataIndex))}return e},e.prototype.getTrajectoryDataIndices=function(){for(var e=dd(),t=dd(),n=0;n<this.edges.length;n++){var r=this.edges[n];if(!(r.dataIndex<0)){e.set(r.dataIndex,!0);for(var o=[r.node1],i=[r.node2],a=0;a<o.length;){var s=o[a];a++,t.set(s.dataIndex,!0);for(var l=0;l<s.inEdges.length;l++)e.set(s.inEdges[l].dataIndex,!0),o.push(s.inEdges[l].node1)}for(a=0;a<i.length;){var c=i[a];a++,t.set(c.dataIndex,!0);for(l=0;l<c.outEdges.length;l++)e.set(c.outEdges[l].dataIndex,!0),i.push(c.outEdges[l].node2)}}}return{edge:e.keys(),node:t.keys()}},e}(),_W=function(){function e(e,t,n){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=null==n?-1:n}return e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(e)},e.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},e.prototype.getTrajectoryDataIndices=function(){var e=dd(),t=dd();e.set(this.dataIndex,!0);for(var n=[this.node1],r=[this.node2],o=0;o<n.length;){var i=n[o];o++,t.set(i.dataIndex,!0);for(var a=0;a<i.inEdges.length;a++)e.set(i.inEdges[a].dataIndex,!0),n.push(i.inEdges[a].node1)}for(o=0;o<r.length;){var s=r[o];o++,t.set(s.dataIndex,!0);for(a=0;a<s.outEdges.length;a++)e.set(s.outEdges[a].dataIndex,!0),r.push(s.outEdges[a].node2)}return{edge:e.keys(),node:t.keys()}},e}();function AW(e,t){return{getValue:function(n){var r=this[e][t];return r.getStore().get(r.getDimensionIndex(n||"value"),this.dataIndex)},setVisual:function(n,r){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,n,r)},getVisual:function(n){return this[e][t].getItemVisual(this.dataIndex,n)},setLayout:function(n,r){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,n,r)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}Pu(SW,AW("hostGraph","data")),Pu(_W,AW("hostGraph","edgeData"));const kW=wW;function CW(e,t,n,r,o){for(var i=new kW(r),a=0;a<e.length;a++)i.addNode(Qu(e[a].id,e[a].name,a),a);var s=[],l=[],c=0;for(a=0;a<t.length;a++){var u=t[a],d=u.source,h=u.target;i.addEdge(d,h,c)&&(l.push(u),s.push(Qu(Mm(u.id,null),d+" > "+h)),c++)}var p,f=n.get("coordinateSystem");if("cartesian2d"===f||"polar"===f)p=rL(e,n);else{var g=WS.get(f),m=g&&g.dimensions||[];ju(m,"value")<0&&m.concat(["value"]);var v=ZP(e,{coordDimensions:m,encodeDefine:n.getEncode()}).dimensions;(p=new qP(v,n)).initData(e)}var y=new qP(["value"],n);return y.initData(l,s),o&&o(p,y),rF({mainData:p,struct:i,structAttr:"graph",datas:{node:p,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}var MW=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return ru(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments);var n=this;function r(){return n._categoriesData}this.legendVisualProvider=new qR(r,r),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},t.prototype.mergeDefaultAndTheme=function(t){e.prototype.mergeDefaultAndTheme.apply(this,arguments),bm(t,"edgeLabel",["show"])},t.prototype.getInitialData=function(e,t){var n,r=e.edges||e.links||[],o=e.data||e.nodes||[],i=this;if(o&&r){kV(n=this)&&(n.__curvenessList=[],n.__edgeMap={},CV(n));var a=CW(o,r,this,!0,(function(e,t){e.wrapMethod("getItemModel",(function(e){var t=i._categoriesModels[e.getShallow("category")];return t&&(t.parentModel=e.parentModel,e.parentModel=t),e}));var n=Yb.prototype.getModel;function r(e,t){var r=n.call(this,e,t);return r.resolveParentPath=o,r}function o(e){if(e&&("label"===e[0]||"label"===e[1])){var t=e.slice();return"label"===e[0]?t[0]="edgeLabel":"label"===e[1]&&(t[1]="edgeLabel"),t}return e}t.wrapMethod("getItemModel",(function(e){return e.resolveParentPath=o,e.getModel=r,e}))}));return Ru(a.edges,(function(e){!function(e,t,n,r){if(kV(n)){var o=MV(e,t,n),i=n.__edgeMap,a=i[IV(o)];i[o]&&!a?i[o].isForward=!0:a&&i[o]&&(a.isForward=!0,i[o].isForward=!1),i[o]=i[o]||[],i[o].push(r)}}(e.node1,e.node2,this,e.dataIndex)}),this),a.data}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.getCategoriesData=function(){return this._categoriesData},t.prototype.formatTooltip=function(e,t,n){if("edge"===n){var r=this.getData(),o=this.getDataParams(e,n),i=r.graph.getEdgeByIndex(e),a=r.getName(i.node1.dataIndex),s=r.getName(i.node2.dataIndex),l=[];return null!=a&&l.push(a),null!=s&&l.push(s),TA("nameValue",{name:l.join(" > "),value:o.value,noValue:null==o.value})}return VA({series:this,dataIndex:e,multipleSeries:t})},t.prototype._updateCategoriesData=function(){var e=Eu(this.option.categories||[],(function(e){return null!=e.value?e:Tu({value:0},e)})),t=new qP(["value"],this);t.initData(e),this._categoriesData=t,this._categoriesModels=t.mapArray((function(e){return t.getItemModel(e)}))},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.isAnimationEnabled=function(){return e.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutAnimation"]))},t.type="series.graph",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},t}(JA);const IW=MW;var TW={type:"graphRoam",event:"graphRoam",update:"none"};var DW=function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0},jW=function(e){function t(t){var n=e.call(this,t)||this;return n.type="pointer",n}return ru(t,e),t.prototype.getDefaultShape=function(){return new DW},t.prototype.buildPath=function(e,t){var n=Math.cos,r=Math.sin,o=t.r,i=t.width,a=t.angle,s=t.x-n(a)*i*(i>=o/3?1:2),l=t.y-r(a)*i*(i>=o/3?1:2);a=t.angle-Math.PI/2,e.moveTo(s,l),e.lineTo(t.x+n(a)*i,t.y+r(a)*i),e.lineTo(t.x+n(t.angle)*o,t.y+r(t.angle)*o),e.lineTo(t.x-n(a)*i,t.y-r(a)*i),e.lineTo(s,l)},t}(Ty);const PW=jW;function LW(e,t){var n=null==e?"":e+"";return t&&(Hu(t)?n=t.replace("{value}",n):Wu(t)&&(n=t(e))),n}var RW=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.render=function(e,t,n){this.group.removeAll();var r=e.get(["axisLine","lineStyle","color"]),o=function(e,t){var n=e.get("center"),r=t.getWidth(),o=t.getHeight(),i=Math.min(r,o);return{cx:Zg(n[0],t.getWidth()),cy:Zg(n[1],t.getHeight()),r:Zg(e.get("radius"),i/2)}}(e,n);this._renderMain(e,t,n,r,o),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,t,n,r,o){var i=this.group,a=e.get("clockwise"),s=-e.get("startAngle")/180*Math.PI,l=-e.get("endAngle")/180*Math.PI,c=e.getModel("axisLine"),u=c.get("roundCap")?cR:Gk,d=c.get("show"),h=c.getModel("lineStyle"),p=h.get("width"),f=[s,l];oy(f,!a);for(var g=(l=f[1])-(s=f[0]),m=s,v=[],y=0;d&&y<r.length;y++){var x=new u({shape:{startAngle:m,endAngle:l=s+g*Math.min(Math.max(r[y][0],0),1),cx:o.cx,cy:o.cy,clockwise:a,r0:o.r-p,r:o.r},silent:!0});x.setStyle({fill:r[y][1]}),x.setStyle(h.getLineStyle(["color","width"])),v.push(x),m=l}v.reverse(),Ru(v,(function(e){return i.add(e)}));var b=function(e){if(e<=0)return r[0][1];var t;for(t=0;t<r.length;t++)if(r[t][0]>=e&&(0===t?0:r[t-1][0])<e)return r[t][1];return r[t-1][1]};this._renderTicks(e,t,n,b,o,s,l,a,p),this._renderTitleAndDetail(e,t,n,b,o),this._renderAnchor(e,o),this._renderPointer(e,t,n,b,o,s,l,a,p)},t.prototype._renderTicks=function(e,t,n,r,o,i,a,s,l){for(var c,u,d=this.group,h=o.cx,p=o.cy,f=o.r,g=+e.get("min"),m=+e.get("max"),v=e.getModel("splitLine"),y=e.getModel("axisTick"),x=e.getModel("axisLabel"),b=e.get("splitNumber"),w=y.get("splitNumber"),S=Zg(v.get("length"),f),_=Zg(y.get("length"),f),A=i,k=(a-i)/b,C=k/w,M=v.getModel("lineStyle").getLineStyle(),I=y.getModel("lineStyle").getLineStyle(),T=v.get("distance"),D=0;D<=b;D++){if(c=Math.cos(A),u=Math.sin(A),v.get("show")){var j=new oC({shape:{x1:c*(f-(P=T?T+l:l))+h,y1:u*(f-P)+p,x2:c*(f-S-P)+h,y2:u*(f-S-P)+p},style:M,silent:!0});"auto"===M.stroke&&j.setStyle({stroke:r(D/b)}),d.add(j)}if(x.get("show")){var P=x.get("distance")+T,L=LW(Kg(D/b*(m-g)+g),x.get("formatter")),R=r(D/b),E=c*(f-S-P)+h,N=u*(f-S-P)+p,O=x.get("rotate"),z=0;"radial"===O?(z=-A+2*Math.PI)>Math.PI/2&&(z+=Math.PI):"tangential"===O?z=-A-Math.PI/2:Uu(O)&&(z=O*Math.PI/180),0===z?d.add(new ax({style:kb(x,{text:L,x:E,y:N,verticalAlign:u<-.8?"top":u>.8?"bottom":"middle",align:c<-.4?"left":c>.4?"right":"center"},{inheritColor:R}),silent:!0})):d.add(new ax({style:kb(x,{text:L,x:E,y:N,verticalAlign:"middle",align:"center"},{inheritColor:R}),silent:!0,originX:E,originY:N,rotation:z}))}if(y.get("show")&&D!==b){P=(P=y.get("distance"))?P+l:l;for(var B=0;B<=w;B++){c=Math.cos(A),u=Math.sin(A);var F=new oC({shape:{x1:c*(f-P)+h,y1:u*(f-P)+p,x2:c*(f-_-P)+h,y2:u*(f-_-P)+p},silent:!0,style:I});"auto"===I.stroke&&F.setStyle({stroke:r((D+B/w)/b)}),d.add(F),A+=C}A-=C}else A+=k}},t.prototype._renderPointer=function(e,t,n,r,o,i,a,s,l){var c=this.group,u=this._data,d=this._progressEls,h=[],p=e.get(["pointer","show"]),f=e.getModel("progress"),g=f.get("show"),m=e.getData(),v=m.mapDimension("value"),y=+e.get("min"),x=+e.get("max"),b=[y,x],w=[i,a];function S(t,n){var r,i=m.getItemModel(t).getModel("pointer"),a=Zg(i.get("width"),o.r),s=Zg(i.get("length"),o.r),l=e.get(["pointer","icon"]),c=i.get("offsetCenter"),u=Zg(c[0],o.r),d=Zg(c[1],o.r),h=i.get("keepAspect");return(r=l?bI(l,u-a/2,d-s,a,s,null,h):new PW({shape:{angle:-Math.PI/2,width:a,r:s,x:u,y:d}})).rotation=-(n+Math.PI/2),r.x=o.cx,r.y=o.cy,r}function _(e,t){var n=f.get("roundCap")?cR:Gk,r=f.get("overlap"),a=r?f.get("width"):l/m.count(),c=r?o.r-a:o.r-(e+1)*a,u=r?o.r:o.r-e*a,d=new n({shape:{startAngle:i,endAngle:t,cx:o.cx,cy:o.cy,clockwise:s,r0:c,r:u}});return r&&(d.z2=x-m.get(v,e)%x),d}(g||p)&&(m.diff(u).add((function(t){var n=m.get(v,t);if(p){var r=S(t,i);fb(r,{rotation:-((isNaN(+n)?w[0]:qg(n,b,w,!0))+Math.PI/2)},e),c.add(r),m.setItemGraphicEl(t,r)}if(g){var o=_(t,i),a=f.get("clip");fb(o,{shape:{endAngle:qg(n,b,w,a)}},e),c.add(o),lx(e.seriesIndex,m.dataType,t,o),h[t]=o}})).update((function(t,n){var r=m.get(v,t);if(p){var o=u.getItemGraphicEl(n),a=o?o.rotation:i,s=S(t,a);s.rotation=a,pb(s,{rotation:-((isNaN(+r)?w[0]:qg(r,b,w,!0))+Math.PI/2)},e),c.add(s),m.setItemGraphicEl(t,s)}if(g){var l=d[n],y=_(t,l?l.shape.endAngle:i),x=f.get("clip");pb(y,{shape:{endAngle:qg(r,b,w,x)}},e),c.add(y),lx(e.seriesIndex,m.dataType,t,y),h[t]=y}})).execute(),m.each((function(e){var t=m.getItemModel(e),n=t.getModel("emphasis"),o=n.get("focus"),i=n.get("blurScope"),a=n.get("disabled");if(p){var s=m.getItemGraphicEl(e),l=m.getItemVisual(e,"style"),c=l.fill;if(s instanceof Ny){var u=s.style;s.useStyle(Tu({image:u.image,x:u.x,y:u.y,width:u.width,height:u.height},l))}else s.useStyle(l),"pointer"!==s.type&&s.setColor(c);s.setStyle(t.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===s.style.fill&&s.setStyle("fill",r(qg(m.get(v,e),b,[0,1],!0))),s.z2EmphasisLift=0,ib(s,t),tb(s,o,i,a)}if(g){var d=h[e];d.useStyle(m.getItemVisual(e,"style")),d.setStyle(t.getModel(["progress","itemStyle"]).getItemStyle()),d.z2EmphasisLift=0,ib(d,t),tb(d,o,i,a)}})),this._progressEls=h)},t.prototype._renderAnchor=function(e,t){var n=e.getModel("anchor");if(n.get("show")){var r=n.get("size"),o=n.get("icon"),i=n.get("offsetCenter"),a=n.get("keepAspect"),s=bI(o,t.cx-r/2+Zg(i[0],t.r),t.cy-r/2+Zg(i[1],t.r),r,r,null,a);s.z2=n.get("showAbove")?1:0,s.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(s)}},t.prototype._renderTitleAndDetail=function(e,t,n,r,o){var i=this,a=e.getData(),s=a.mapDimension("value"),l=+e.get("min"),c=+e.get("max"),u=new Fg,d=[],h=[],p=e.isAnimationEnabled(),f=e.get(["pointer","showAbove"]);a.diff(this._data).add((function(e){d[e]=new ax({silent:!0}),h[e]=new ax({silent:!0})})).update((function(e,t){d[e]=i._titleEls[t],h[e]=i._detailEls[t]})).execute(),a.each((function(t){var n=a.getItemModel(t),i=a.get(s,t),g=new Fg,m=r(qg(i,[l,c],[0,1],!0)),v=n.getModel("title");if(v.get("show")){var y=v.get("offsetCenter"),x=o.cx+Zg(y[0],o.r),b=o.cy+Zg(y[1],o.r);(I=d[t]).attr({z2:f?0:2,style:kb(v,{x:x,y:b,text:a.getName(t),align:"center",verticalAlign:"middle"},{inheritColor:m})}),g.add(I)}var w=n.getModel("detail");if(w.get("show")){var S=w.get("offsetCenter"),_=o.cx+Zg(S[0],o.r),A=o.cy+Zg(S[1],o.r),k=Zg(w.get("width"),o.r),C=Zg(w.get("height"),o.r),M=e.get(["progress","show"])?a.getItemVisual(t,"style").fill:m,I=h[t],T=w.get("formatter");I.attr({z2:f?0:2,style:kb(w,{x:_,y:A,text:LW(i,T),width:isNaN(k)?null:k,height:isNaN(C)?null:C,align:"center",verticalAlign:"middle"},{inheritColor:M})}),Lb(I,{normal:w},i,(function(e){return LW(e,T)})),p&&Rb(I,t,a,e,{getFormattedLabel:function(e,t,n,r,o,a){return LW(a?a.interpolatedValue:i,T)}}),g.add(I)}u.add(g)})),this.group.add(u),this._titleEls=d,this._detailEls=h},t.type="gauge",t}(dM);const EW=RW;const NW=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath="itemStyle",n}return ru(t,e),t.prototype.getInitialData=function(e,t){return XR(this,["value"])},t.type="series.gauge",t.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},t}(JA);var OW=["itemStyle","opacity"],zW=function(e){function t(t,n){var r=e.call(this)||this,o=r,i=new eC,a=new ax;return o.setTextContent(a),r.setTextGuideLine(i),r.updateData(t,n,!0),r}return ru(t,e),t.prototype.updateData=function(e,t,n){var r=this,o=e.hostModel,i=e.getItemModel(t),a=e.getItemLayout(t),s=i.getModel("emphasis"),l=i.get(OW);l=null==l?1:l,n||xb(r),r.useStyle(e.getItemVisual(t,"style")),r.style.lineJoin="round",n?(r.setShape({points:a.points}),r.style.opacity=0,fb(r,{style:{opacity:l}},o,t)):pb(r,{style:{opacity:l},shape:{points:a.points}},o,t),ib(r,i),this._updateLabel(e,t),tb(this,s.get("focus"),s.get("blurScope"),s.get("disabled"))},t.prototype._updateLabel=function(e,t){var n=this,r=this.getTextGuideLine(),o=n.getTextContent(),i=e.hostModel,a=e.getItemModel(t),s=e.getItemLayout(t).label,l=e.getItemVisual(t,"style"),c=l.fill;_b(o,Ab(a),{labelFetcher:e.hostModel,labelDataIndex:t,defaultOpacity:l.opacity,defaultText:e.getName(t)},{normal:{align:s.textAlign,verticalAlign:s.verticalAlign}}),n.setTextConfig({local:!0,inside:!!s.inside,insideStroke:c,outsideFill:c});var u=s.linePoints;r.setShape({points:u}),n.textGuideLineConfig={anchor:u?new bh(u[0][0],u[0][1]):null},pb(o,{style:{x:s.x,y:s.y}},i,t),o.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),PD(n,LD(a),{stroke:c})},t}($k);const BW=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.ignoreLabelLineUpdate=!0,n}return ru(t,e),t.prototype.render=function(e,t,n){var r=e.getData(),o=this._data,i=this.group;r.diff(o).add((function(e){var t=new zW(r,e);r.setItemGraphicEl(e,t),i.add(t)})).update((function(e,t){var n=o.getItemGraphicEl(t);n.updateData(r,e),i.add(n),r.setItemGraphicEl(e,n)})).remove((function(t){yb(o.getItemGraphicEl(t),e,t)})).execute(),this._data=r},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type="funnel",t}(dM);var FW=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new qR(Bu(this.getData,this),Bu(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.getInitialData=function(e,t){return XR(this,{coordDimensions:["value"],encodeDefaulter:Fu(xS,this)})},t.prototype._defaultLabelLine=function(e){bm(e,"labelLine",["show"]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.prototype.getDataParams=function(t){var n=this.getData(),r=e.prototype.getDataParams.call(this,t),o=n.mapDimension("value"),i=n.getSum(o);return r.percent=i?+(n.get(o,t)/i*100).toFixed(2):0,r.$vars.push("percent"),r},t.type="series.funnel",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},t}(JA);const VW=FW;function WW(e,t){e.eachSeriesByType("funnel",(function(e){var n=e.getData(),r=n.mapDimension("value"),o=e.get("sort"),i=function(e,t){return Zw(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,t),a=e.get("orient"),s=i.width,l=i.height,c=function(e,t){for(var n=e.mapDimension("value"),r=e.mapArray(n,(function(e){return e})),o=[],i="ascending"===t,a=0,s=e.count();a<s;a++)o[a]=a;return Wu(t)?o.sort(t):"none"!==t&&o.sort((function(e,t){return i?r[e]-r[t]:r[t]-r[e]})),o}(n,o),u=i.x,d=i.y,h="horizontal"===a?[Zg(e.get("minSize"),l),Zg(e.get("maxSize"),l)]:[Zg(e.get("minSize"),s),Zg(e.get("maxSize"),s)],p=n.getDataExtent(r),f=e.get("min"),g=e.get("max");null==f&&(f=Math.min(p[0],0)),null==g&&(g=p[1]);var m=e.get("funnelAlign"),v=e.get("gap"),y=(("horizontal"===a?s:l)-v*(n.count()-1))/n.count(),x=function(e,t){if("horizontal"===a){var o=qg(n.get(r,e)||0,[f,g],h,!0),i=void 0;switch(m){case"top":i=d;break;case"center":i=d+(l-o)/2;break;case"bottom":i=d+(l-o)}return[[t,i],[t,i+o]]}var c,p=qg(n.get(r,e)||0,[f,g],h,!0);switch(m){case"left":c=u;break;case"center":c=u+(s-p)/2;break;case"right":c=u+s-p}return[[c,t],[c+p,t]]};"ascending"===o&&(y=-y,v=-v,"horizontal"===a?u+=s:d+=l,c=c.reverse());for(var b=0;b<c.length;b++){var w=c[b],S=c[b+1],_=n.getItemModel(w);if("horizontal"===a){var A=_.get(["itemStyle","width"]);null==A?A=y:(A=Zg(A,s),"ascending"===o&&(A=-A));var k=x(w,u),C=x(S,u+A);u+=A+v,n.setItemLayout(w,{points:k.concat(C.slice().reverse())})}else{var M=_.get(["itemStyle","height"]);null==M?M=y:(M=Zg(M,l),"ascending"===o&&(M=-M));k=x(w,d),C=x(S,d+M);d+=M+v,n.setItemLayout(w,{points:k.concat(C.slice().reverse())})}}!function(e){var t=e.hostModel.get("orient");e.each((function(n){var r,o,i,a,s=e.getItemModel(n),l=s.getModel("label").get("position"),c=s.getModel("labelLine"),u=e.getItemLayout(n),d=u.points,h="inner"===l||"inside"===l||"center"===l||"insideLeft"===l||"insideRight"===l;if(h)"insideLeft"===l?(o=(d[0][0]+d[3][0])/2+5,i=(d[0][1]+d[3][1])/2,r="left"):"insideRight"===l?(o=(d[1][0]+d[2][0])/2-5,i=(d[1][1]+d[2][1])/2,r="right"):(o=(d[0][0]+d[1][0]+d[2][0]+d[3][0])/4,i=(d[0][1]+d[1][1]+d[2][1]+d[3][1])/4,r="center"),a=[[o,i],[o,i]];else{var p=void 0,f=void 0,g=void 0,m=void 0,v=c.get("length");"left"===l?(p=(d[3][0]+d[0][0])/2,f=(d[3][1]+d[0][1])/2,o=(g=p-v)-5,r="right"):"right"===l?(p=(d[1][0]+d[2][0])/2,f=(d[1][1]+d[2][1])/2,o=(g=p+v)+5,r="left"):"top"===l?(p=(d[3][0]+d[0][0])/2,i=(m=(f=(d[3][1]+d[0][1])/2)-v)-5,r="center"):"bottom"===l?(p=(d[1][0]+d[2][0])/2,i=(m=(f=(d[1][1]+d[2][1])/2)+v)+5,r="center"):"rightTop"===l?(p="horizontal"===t?d[3][0]:d[1][0],f="horizontal"===t?d[3][1]:d[1][1],"horizontal"===t?(i=(m=f-v)-5,r="center"):(o=(g=p+v)+5,r="top")):"rightBottom"===l?(p=d[2][0],f=d[2][1],"horizontal"===t?(i=(m=f+v)+5,r="center"):(o=(g=p+v)+5,r="bottom")):"leftTop"===l?(p=d[0][0],f="horizontal"===t?d[0][1]:d[1][1],"horizontal"===t?(i=(m=f-v)-5,r="center"):(o=(g=p-v)-5,r="right")):"leftBottom"===l?(p="horizontal"===t?d[1][0]:d[3][0],f="horizontal"===t?d[1][1]:d[2][1],"horizontal"===t?(i=(m=f+v)+5,r="center"):(o=(g=p-v)-5,r="right")):(p=(d[1][0]+d[2][0])/2,f=(d[1][1]+d[2][1])/2,"horizontal"===t?(i=(m=f+v)+5,r="center"):(o=(g=p+v)+5,r="left")),"horizontal"===t?o=g=p:i=m=f,a=[[p,f],[g,m]]}u.label={linePoints:a,x:o,y:i,verticalAlign:"middle",textAlign:r,inside:h}}))}(n)}))}var HW=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._dataGroup=new Fg,n._initialized=!1,n}return ru(t,e),t.prototype.init=function(){this.group.add(this._dataGroup)},t.prototype.render=function(e,t,n,r){this._progressiveEls=null;var o=this._dataGroup,i=e.getData(),a=this._data,s=e.coordinateSystem,l=s.dimensions,c=XW(e);if(i.diff(a).add((function(e){YW(UW(i,o,e,l,s),i,e,c)})).update((function(t,n){var r=a.getItemGraphicEl(n),o=GW(i,t,l,s);i.setItemGraphicEl(t,r),pb(r,{shape:{points:o}},e,t),xb(r),YW(r,i,t,c)})).remove((function(e){var t=a.getItemGraphicEl(e);o.remove(t)})).execute(),!this._initialized){this._initialized=!0;var u=function(e,t,n){var r=e.model,o=e.getRect(),i=new Gy({shape:{x:o.x,y:o.y,width:o.width,height:o.height}}),a="horizontal"===r.get("layout")?"width":"height";return i.setShape(a,0),fb(i,{shape:{width:o.width,height:o.height}},t,n),i}(s,e,(function(){setTimeout((function(){o.removeClipPath()}))}));o.setClipPath(u)}this._data=i},t.prototype.incrementalPrepareRender=function(e,t,n){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},t.prototype.incrementalRender=function(e,t,n){for(var r=t.getData(),o=t.coordinateSystem,i=o.dimensions,a=XW(t),s=this._progressiveEls=[],l=e.start;l<e.end;l++){var c=UW(r,this._dataGroup,l,i,o);c.incremental=!0,YW(c,r,l,a),s.push(c)}},t.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},t.type="parallel",t}(dM);function GW(e,t,n,r){for(var o,i=[],a=0;a<n.length;a++){var s=n[a],l=e.get(e.mapDimension(s),t);o=l,("category"===r.getAxis(s).type?null==o:null==o||isNaN(o))||i.push(r.dataToPoint(l,s))}return i}function UW(e,t,n,r,o){var i=GW(e,n,r,o),a=new eC({shape:{points:i},z2:10});return t.add(a),e.setItemGraphicEl(n,a),a}function XW(e){var t=e.get("smooth",!0);return!0===t&&(t=.3),$u(t=dm(t))&&(t=0),{smooth:t}}function YW(e,t,n,r){e.useStyle(t.getItemVisual(n,"style")),e.style.fill=null,e.setShape("smooth",r.smooth);var o=t.getItemModel(n),i=o.getModel("emphasis");ib(e,o,"lineStyle"),tb(e,i.get("focus"),i.get("blurScope"),i.get("disabled"))}const qW=HW;function ZW(e){var t=e.ecModel.getComponent("parallel",e.get("parallelIndex"));if(t){var n={};return Ru(t.dimensions,(function(e){var t=+e.replace("dim","");n[e]=t})),n}}const KW=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath="lineStyle",n.visualDrawType="stroke",n}return ru(t,e),t.prototype.getInitialData=function(e,t){return rL(null,this,{useEncodeDefaulter:Bu(ZW,null,this)})},t.prototype.getRawIndicesByActiveState=function(e){var t=this.coordinateSystem,n=this.getData(),r=[];return t.eachActiveState(n,(function(t,o){e===t&&r.push(n.getRawIndex(o))})),r},t.type="series.parallel",t.dependencies=["parallel"],t.defaultOption={z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"},t}(JA);var $W=["lineStyle","opacity"];const QW={seriesType:"parallel",reset:function(e,t){var n=e.coordinateSystem,r={normal:e.get(["lineStyle","opacity"]),active:e.get("activeOpacity"),inactive:e.get("inactiveOpacity")};return{progress:function(e,t){n.eachActiveState(t,(function(e,n){var o=r[e];if("normal"===e&&t.hasItemOption){var i=t.getItemModel(n).get($W,!0);null!=i&&(o=i)}t.ensureUniqueItemVisual(n,"style").opacity=o}),e.start,e.end)}}}};function JW(e){!function(e){if(e.parallel)return;var t=!1;Ru(e.series,(function(e){e&&"parallel"===e.type&&(t=!0)})),t&&(e.parallel=[{}])}(e),function(e){var t=xm(e.parallelAxis);Ru(t,(function(t){if(Xu(t)){var n=t.parallelIndex||0,r=xm(e.parallel)[n];r&&r.parallelAxisDefault&&Mu(t,r.parallelAxisDefault,!1)}}))}(e)}var eH=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.render=function(e,t,n){this._model=e,this._api=n,this._handlers||(this._handlers={},Ru(tH,(function(e,t){n.getZr().on(t,this._handlers[t]=Bu(e,this))}),this)),mM(this,"_throttledDispatchExpand",e.get("axisExpandRate"),"fixRate")},t.prototype.dispose=function(e,t){vM(this,"_throttledDispatchExpand"),Ru(this._handlers,(function(e,n){t.getZr().off(n,e)})),this._handlers=null},t.prototype._throttledDispatchExpand=function(e){this._dispatchExpand(e)},t.prototype._dispatchExpand=function(e){e&&this._api.dispatchAction(Tu({type:"parallelAxisExpand"},e))},t.type="parallel",t}(tk),tH={mousedown:function(e){nH(this,"click")&&(this._mouseDownPoint=[e.offsetX,e.offsetY])},mouseup:function(e){var t=this._mouseDownPoint;if(nH(this,"click")&&t){var n=[e.offsetX,e.offsetY];if(Math.pow(t[0]-n[0],2)+Math.pow(t[1]-n[1],2)>5)return;var r=this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]);"none"!==r.behavior&&this._dispatchExpand({axisExpandWindow:r.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(e){if(!this._mouseDownPoint&&nH(this,"mousemove")){var t=this._model,n=t.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]),r=n.behavior;"jump"===r&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===r?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===r?null:{duration:0}})}}};function nH(e,t){var n=e._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===t}const rH=eH;const oH=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.init=function(){e.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(e){var t=this.option;e&&Mu(t,e,!0),this._initDimensions()},t.prototype.contains=function(e,t){var n=e.get("parallelIndex");return null!=n&&t.getComponent("parallel",n)===this},t.prototype.setAxisExpand=function(e){Ru(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],(function(t){e.hasOwnProperty(t)&&(this.option[t]=e[t])}),this)},t.prototype._initDimensions=function(){var e=this.dimensions=[],t=this.parallelAxisIndex=[];Ru(Ou(this.ecModel.queryComponents({mainType:"parallelAxis"}),(function(e){return(e.get("parallelIndex")||0)===this.componentIndex}),this),(function(n){e.push("dim"+n.get("dim")),t.push(n.componentIndex)}))},t.type="parallel",t.dependencies=["parallelAxis"],t.layoutMode="box",t.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},t}(rS);var iH=function(e){function t(t,n,r,o,i){var a=e.call(this,t,n,r)||this;return a.type=o||"value",a.axisIndex=i,a}return ru(t,e),t.prototype.isHorizontal=function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")},t}(TN);const aH=iH;function sH(e,t,n,r,o,i){e=e||0;var a=n[1]-n[0];if(null!=o&&(o=cH(o,[0,a])),null!=i&&(i=Math.max(i,null!=o?o:0)),"all"===r){var s=Math.abs(t[1]-t[0]);s=cH(s,[0,a]),o=i=cH(s,[o,i]),r=0}t[0]=cH(t[0],n),t[1]=cH(t[1],n);var l=lH(t,r);t[r]+=e;var c,u=o||0,d=n.slice();return l.sign<0?d[0]+=u:d[1]-=u,t[r]=cH(t[r],d),c=lH(t,r),null!=o&&(c.sign!==l.sign||c.span<o)&&(t[1-r]=t[r]+l.sign*o),c=lH(t,r),null!=i&&c.span>i&&(t[1-r]=t[r]+c.sign*i),t}function lH(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function cH(e,t){return Math.min(null!=t[1]?t[1]:1/0,Math.max(null!=t[0]?t[0]:-1/0,e))}var uH=Ru,dH=Math.min,hH=Math.max,pH=Math.floor,fH=Math.ceil,gH=Kg,mH=Math.PI,vH=function(){function e(e,t,n){this.type="parallel",this._axesMap=dd(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,n)}return e.prototype._init=function(e,t,n){var r=e.dimensions,o=e.parallelAxisIndex;uH(r,(function(e,n){var r=o[n],i=t.getComponent("parallelAxis",r),a=this._axesMap.set(e,new aH(e,oN(i),[0,0],i.get("type"),r)),s="category"===a.type;a.onBand=s&&i.get("boundaryGap"),a.inverse=i.get("inverse"),i.axis=a,a.model=i,a.coordinateSystem=i.coordinateSystem=this}),this)},e.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},e.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),n=t.axisBase,r=t.layoutBase,o=t.pixelDimIndex,i=e[1-o],a=e[o];return i>=n&&i<=n+t.axisLength&&a>=r&&a<=r+t.layoutLength},e.prototype.getModel=function(){return this._model},e.prototype._updateAxesFromSeries=function(e,t){t.eachSeries((function(n){if(e.contains(n,t)){var r=n.getData();uH(this.dimensions,(function(e){var t=this._axesMap.get(e);t.scale.unionExtentFromData(r,r.mapDimension(e)),rN(t.scale,t.model)}),this)}}),this)},e.prototype.resize=function(e,t){this._rect=Zw(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},e.prototype.getRect=function(){return this._rect},e.prototype._makeLayoutInfo=function(){var e,t=this._model,n=this._rect,r=["x","y"],o=["width","height"],i=t.get("layout"),a="horizontal"===i?0:1,s=n[o[a]],l=[0,s],c=this.dimensions.length,u=yH(t.get("axisExpandWidth"),l),d=yH(t.get("axisExpandCount")||0,[0,c]),h=t.get("axisExpandable")&&c>3&&c>d&&d>1&&u>0&&s>0,p=t.get("axisExpandWindow");p?(e=yH(p[1]-p[0],l),p[1]=p[0]+e):(e=yH(u*(d-1),l),(p=[u*(t.get("axisExpandCenter")||pH(c/2))-e/2])[1]=p[0]+e);var f=(s-e)/(c-d);f<3&&(f=0);var g=[pH(gH(p[0]/u,1))+1,fH(gH(p[1]/u,1))-1],m=f/u*p[0];return{layout:i,pixelDimIndex:a,layoutBase:n[r[a]],layoutLength:s,axisBase:n[r[1-a]],axisLength:n[o[1-a]],axisExpandable:h,axisExpandWidth:u,axisCollapseWidth:f,axisExpandWindow:p,axisCount:c,winInnerIndices:g,axisExpandWindow0Pos:m}},e.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,n=this.dimensions,r=this._makeLayoutInfo(),o=r.layout;t.each((function(e){var t=[0,r.axisLength],n=e.inverse?1:0;e.setExtent(t[n],t[1-n])})),uH(n,(function(t,n){var i=(r.axisExpandable?bH:xH)(n,r),a={horizontal:{x:i.position,y:r.axisLength},vertical:{x:0,y:i.position}},s={horizontal:mH/2,vertical:0},l=[a[o].x+e.x,a[o].y+e.y],c=s[o],u=[1,0,0,1,0,0];mh(u,u,c),gh(u,u,l),this._axesLayout[t]={position:l,rotation:c,transform:u,axisNameAvailableWidth:i.axisNameAvailableWidth,axisLabelShow:i.axisLabelShow,nameTruncateMaxWidth:i.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}}),this)},e.prototype.getAxis=function(e){return this._axesMap.get(e)},e.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},e.prototype.eachActiveState=function(e,t,n,r){null==n&&(n=0),null==r&&(r=e.count());var o=this._axesMap,i=this.dimensions,a=[],s=[];Ru(i,(function(t){a.push(e.mapDimension(t)),s.push(o.get(t).model)}));for(var l=this.hasAxisBrushed(),c=n;c<r;c++){var u=void 0;if(l){u="active";for(var d=e.getValues(a,c),h=0,p=i.length;h<p;h++){if("inactive"===s[h].getActiveState(d[h])){u="inactive";break}}}else u="normal";t(u,c)}},e.prototype.hasAxisBrushed=function(){for(var e=this.dimensions,t=this._axesMap,n=!1,r=0,o=e.length;r<o;r++)"normal"!==t.get(e[r]).model.getActiveState()&&(n=!0);return n},e.prototype.axisCoordToPoint=function(e,t){return GC([e,0],this._axesLayout[t].transform)},e.prototype.getAxisLayout=function(e){return Cu(this._axesLayout[e])},e.prototype.getSlidedAxisExpandWindow=function(e){var t=this._makeLayoutInfo(),n=t.pixelDimIndex,r=t.axisExpandWindow.slice(),o=r[1]-r[0],i=[0,t.axisExpandWidth*(t.axisCount-1)];if(!this.containPoint(e))return{behavior:"none",axisExpandWindow:r};var a,s=e[n]-t.layoutBase-t.axisExpandWindow0Pos,l="slide",c=t.axisCollapseWidth,u=this._model.get("axisExpandSlideTriggerArea"),d=null!=u[0];if(c)d&&c&&s<o*u[0]?(l="jump",a=s-o*u[2]):d&&c&&s>o*(1-u[0])?(l="jump",a=s-o*(1-u[2])):(a=s-o*u[1])>=0&&(a=s-o*(1-u[1]))<=0&&(a=0),(a*=t.axisExpandWidth/c)?sH(a,r,i,"all"):l="none";else{var h=r[1]-r[0];(r=[hH(0,i[1]*s/h-h/2)])[1]=dH(i[1],r[0]+h),r[0]=r[1]-h}return{axisExpandWindow:r,behavior:l}},e}();function yH(e,t){return dH(hH(e,t[0]),t[1])}function xH(e,t){var n=t.layoutLength/(t.axisCount-1);return{position:n*e,axisNameAvailableWidth:n,axisLabelShow:!0}}function bH(e,t){var n,r,o=t.layoutLength,i=t.axisExpandWidth,a=t.axisCount,s=t.axisCollapseWidth,l=t.winInnerIndices,c=s,u=!1;return e<l[0]?(n=e*s,r=s):e<=l[1]?(n=t.axisExpandWindow0Pos+e*i-t.axisExpandWindow[0],c=i,u=!0):(n=o-(a-1-e)*s,r=s),{position:n,axisNameAvailableWidth:c,axisLabelShow:u,nameTruncateMaxWidth:r}}const wH=vH;const SH={create:function(e,t){var n=[];return e.eachComponent("parallel",(function(r,o){var i=new wH(r,e,t);i.name="parallel_"+o,i.resize(r,t),r.coordinateSystem=i,i.model=r,n.push(i)})),e.eachSeries((function(e){if("parallel"===e.get("coordinateSystem")){var t=e.getReferringComponents("parallel",Em).models[0];e.coordinateSystem=t.coordinateSystem}})),n}};var _H=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.activeIntervals=[],n}return ru(t,e),t.prototype.getAreaSelectStyle=function(){return $m([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},t.prototype.setActiveIntervals=function(e){var t=this.activeIntervals=Cu(e);if(t)for(var n=t.length-1;n>=0;n--)$g(t[n])},t.prototype.getActiveState=function(e){var t=this.activeIntervals;if(!t.length)return"normal";if(null==e||isNaN(+e))return"inactive";if(1===t.length){var n=t[0];if(n[0]<=e&&e<=n[1])return"active"}else for(var r=0,o=t.length;r<o;r++)if(t[r][0]<=e&&e<=t[r][1])return"active";return"inactive"},t}(rS);Pu(_H,oE);const AH=_H;var kH=!0,CH=Math.min,MH=Math.max,IH=Math.pow,TH=1e4,DH=6,jH=6,PH="globalPan",LH={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},RH={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},EH={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},NH=0,OH=function(e){function t(t){var n=e.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=t,n.group=new Fg,n._uid="brushController_"+NH++,Ru(uG,(function(e,t){this._handlers[t]=Bu(e,this)}),n),n}return ru(t,e),t.prototype.enableBrush=function(e){return this._brushType&&this._doDisableBrush(),e.brushType&&this._doEnableBrush(e),this},t.prototype._doEnableBrush=function(e){var t=this._zr;this._enableGlobalPan||function(e,t,n){zO(e)[t]=n}(t,PH,this._uid),Ru(this._handlers,(function(e,n){t.on(n,e)})),this._brushType=e.brushType,this._brushOption=Mu(Cu(EH),e,!0)},t.prototype._doDisableBrush=function(){var e=this._zr;!function(e,t,n){var r=zO(e);r[t]===n&&(r[t]=null)}(e,PH,this._uid),Ru(this._handlers,(function(t,n){e.off(n,t)})),this._brushType=this._brushOption=null},t.prototype.setPanels=function(e){if(e&&e.length){var t=this._panels={};Ru(e,(function(e){t[e.panelId]=Cu(e)}))}else this._panels=null;return this},t.prototype.mount=function(e){e=e||{},this._enableGlobalPan=e.enableGlobalPan;var t=this.group;return this._zr.add(t),t.attr({x:e.x||0,y:e.y||0,rotation:e.rotation||0,scaleX:e.scaleX||1,scaleY:e.scaleY||1}),this._transform=t.getLocalTransform(),this},t.prototype.updateCovers=function(e){e=Eu(e,(function(e){return Mu(Cu(EH),e,!0)}));var t="\0-brush-index-",n=this._covers,r=this._covers=[],o=this,i=this._creatingCover;return new _P(n,e,(function(e,t){return a(e.__brushOption,t)}),a).add(s).update(s).remove((function(e){n[e]!==i&&o.group.remove(n[e])})).execute(),this;function a(e,n){return(null!=e.id?e.id:t+n)+"-"+e.brushType}function s(t,a){var s=e[t];if(null!=a&&n[a]===i)r[t]=n[a];else{var l=r[t]=null!=a?(n[a].__brushOption=s,n[a]):BH(o,zH(o,s));WH(o,l)}}},t.prototype.unmount=function(){return this.enableBrush(!1),XH(this),this._zr.remove(this.group),this},t.prototype.dispose=function(){this.unmount(),this.off()},t}(Wd);function zH(e,t){var n=hG[t.brushType].createCover(e,t);return n.__brushOption=t,VH(n,t),e.group.add(n),n}function BH(e,t){var n=HH(t);return n.endCreating&&(n.endCreating(e,t),VH(t,t.__brushOption)),t}function FH(e,t){var n=t.__brushOption;HH(t).updateCoverShape(e,t,n.range,n)}function VH(e,t){var n=t.z;null==n&&(n=TH),e.traverse((function(e){e.z=n,e.z2=n}))}function WH(e,t){HH(t).updateCommon(e,t),FH(e,t)}function HH(e){return hG[e.__brushOption.brushType]}function GH(e,t,n){var r,o=e._panels;if(!o)return kH;var i=e._transform;return Ru(o,(function(e){e.isTargetByCursor(t,n,i)&&(r=e)})),r}function UH(e,t){var n=e._panels;if(!n)return kH;var r=t.__brushOption.panelId;return null!=r?n[r]:kH}function XH(e){var t=e._covers,n=t.length;return Ru(t,(function(t){e.group.remove(t)}),e),t.length=0,!!n}function YH(e,t){var n=Eu(e._covers,(function(e){var t=e.__brushOption,n=Cu(t.range);return{brushType:t.brushType,panelId:t.panelId,range:n}}));e.trigger("brush",{areas:n,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function qH(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function ZH(e,t,n,r){var o=new Fg;return o.add(new Gy({name:"main",style:JH(n),silent:!0,draggable:!0,cursor:"move",drift:Fu(nG,e,t,o,["n","s","w","e"]),ondragend:Fu(YH,t,{isEnd:!0})})),Ru(r,(function(n){o.add(new Gy({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Fu(nG,e,t,o,n),ondragend:Fu(YH,t,{isEnd:!0})}))})),o}function KH(e,t,n,r){var o=r.brushStyle.lineWidth||0,i=MH(o,jH),a=n[0][0],s=n[1][0],l=a-o/2,c=s-o/2,u=n[0][1],d=n[1][1],h=u-i+o/2,p=d-i+o/2,f=u-a,g=d-s,m=f+o,v=g+o;QH(e,t,"main",a,s,f,g),r.transformable&&(QH(e,t,"w",l,c,i,v),QH(e,t,"e",h,c,i,v),QH(e,t,"n",l,c,m,i),QH(e,t,"s",l,p,m,i),QH(e,t,"nw",l,c,i,i),QH(e,t,"ne",h,c,i,i),QH(e,t,"sw",l,p,i,i),QH(e,t,"se",h,p,i,i))}function $H(e,t){var n=t.__brushOption,r=n.transformable,o=t.childAt(0);o.useStyle(JH(n)),o.attr({silent:!r,cursor:r?"move":"default"}),Ru([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],(function(n){var o=t.childOfName(n.join("")),i=1===n.length?tG(e,n[0]):function(e,t){var n=[tG(e,t[0]),tG(e,t[1])];return("e"===n[0]||"w"===n[0])&&n.reverse(),n.join("")}(e,n);o&&o.attr({silent:!r,invisible:!r,cursor:r?RH[i]+"-resize":null})}))}function QH(e,t,n,r,o,i,a){var s=t.childOfName(n);s&&s.setShape(function(e){var t=CH(e[0][0],e[1][0]),n=CH(e[0][1],e[1][1]),r=MH(e[0][0],e[1][0]),o=MH(e[0][1],e[1][1]);return{x:t,y:n,width:r-t,height:o-n}}(iG(e,t,[[r,o],[r+i,o+a]])))}function JH(e){return Du({strokeNoScale:!0},e.brushStyle)}function eG(e,t,n,r){var o=[CH(e,n),CH(t,r)],i=[MH(e,n),MH(t,r)];return[[o[0],i[0]],[o[1],i[1]]]}function tG(e,t){var n=UC({w:"left",e:"right",n:"top",s:"bottom"}[t],function(e){return HC(e.group)}(e));return{left:"w",right:"e",top:"n",bottom:"s"}[n]}function nG(e,t,n,r,o,i){var a=n.__brushOption,s=e.toRectRange(a.range),l=oG(t,o,i);Ru(r,(function(e){var t=LH[e];s[t[0]][t[1]]+=l[t[0]]})),a.range=e.fromRectRange(eG(s[0][0],s[1][0],s[0][1],s[1][1])),WH(t,n),YH(t,{isEnd:!1})}function rG(e,t,n,r){var o=t.__brushOption.range,i=oG(e,n,r);Ru(o,(function(e){e[0]+=i[0],e[1]+=i[1]})),WH(e,t),YH(e,{isEnd:!1})}function oG(e,t,n){var r=e.group,o=r.transformCoordToLocal(t,n),i=r.transformCoordToLocal(0,0);return[o[0]-i[0],o[1]-i[1]]}function iG(e,t,n){var r=UH(e,t);return r&&r!==kH?r.clipPath(n,e._transform):Cu(n)}function aG(e){var t=e.event;t.preventDefault&&t.preventDefault()}function sG(e,t,n){return e.childOfName("main").contain(t,n)}function lG(e,t,n,r){var o,i=e._creatingCover,a=e._creatingPanel,s=e._brushOption;if(e._track.push(n.slice()),function(e){var t=e._track;if(!t.length)return!1;var n=t[t.length-1],r=t[0],o=n[0]-r[0],i=n[1]-r[1];return IH(o*o+i*i,.5)>DH}(e)||i){if(a&&!i){"single"===s.brushMode&&XH(e);var l=Cu(s);l.brushType=cG(l.brushType,a),l.panelId=a===kH?null:a.panelId,i=e._creatingCover=zH(e,l),e._covers.push(i)}if(i){var c=hG[cG(e._brushType,a)];i.__brushOption.range=c.getCreatingRange(iG(e,i,e._track)),r&&(BH(e,i),c.updateCommon(e,i)),FH(e,i),o={isEnd:r}}}else r&&"single"===s.brushMode&&s.removeOnClick&&GH(e,t,n)&&XH(e)&&(o={isEnd:r,removeOnClick:!0});return o}function cG(e,t){return"auto"===e?t.defaultBrushType:e}var uG={mousedown:function(e){if(this._dragging)dG(this,e);else if(!e.target||!e.target.draggable){aG(e);var t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null,(this._creatingPanel=GH(this,e,t))&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(e){var t=e.offsetX,n=e.offsetY,r=this.group.transformCoordToLocal(t,n);if(function(e,t,n){if(e._brushType&&!function(e,t,n){var r=e._zr;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}(e,t.offsetX,t.offsetY)){var r=e._zr,o=e._covers,i=GH(e,t,n);if(!e._dragging)for(var a=0;a<o.length;a++){var s=o[a].__brushOption;if(i&&(i===kH||s.panelId===i.panelId)&&hG[s.brushType].contain(o[a],n[0],n[1]))return}i&&r.setCursorStyle("crosshair")}}(this,e,r),this._dragging){aG(e);var o=lG(this,e,r,!1);o&&YH(this,o)}},mouseup:function(e){dG(this,e)}};function dG(e,t){if(e._dragging){aG(t);var n=t.offsetX,r=t.offsetY,o=e.group.transformCoordToLocal(n,r),i=lG(e,t,o,!0);e._dragging=!1,e._track=[],e._creatingCover=null,i&&YH(e,i)}}var hG={lineX:pG(0),lineY:pG(1),rect:{createCover:function(e,t){function n(e){return e}return ZH({toRectRange:n,fromRectRange:n},e,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(e){var t=qH(e);return eG(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,n,r){KH(e,t,n,r)},updateCommon:$H,contain:sG},polygon:{createCover:function(e,t){var n=new Fg;return n.add(new eC({name:"main",style:JH(t),silent:!0})),n},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new $k({name:"main",draggable:!0,drift:Fu(rG,e,t),ondragend:Fu(YH,e,{isEnd:!0})}))},updateCoverShape:function(e,t,n,r){t.childAt(0).setShape({points:iG(e,t,n)})},updateCommon:$H,contain:sG}};function pG(e){return{createCover:function(t,n){return ZH({toRectRange:function(t){var n=[t,[0,100]];return e&&n.reverse(),n},fromRectRange:function(t){return t[e]}},t,n,[[["w"],["e"]],[["n"],["s"]]][e])},getCreatingRange:function(t){var n=qH(t);return[CH(n[0][e],n[1][e]),MH(n[0][e],n[1][e])]},updateCoverShape:function(t,n,r,o){var i,a=UH(t,n);if(a!==kH&&a.getLinearBrushOtherExtent)i=a.getLinearBrushOtherExtent(e);else{var s=t._zr;i=[0,[s.getWidth(),s.getHeight()][1-e]]}var l=[r,i];e&&l.reverse(),KH(t,n,l,o)},updateCommon:$H,contain:sG}}const fG=OH;function gG(e){return e=yG(e),function(t){return qC(t,e)}}function mG(e,t){return e=yG(e),function(n){var r=null!=t?t:n,o=r?e.width:e.height,i=r?e.x:e.y;return[i,i+(o||0)]}}function vG(e,t,n){var r=yG(e);return function(e,o){return r.contain(o[0],o[1])&&!qO(e,t,n)}}function yG(e){return Dh.create(e)}var xG=["axisLine","axisTickLabel","axisName"],bG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.init=function(t,n){e.prototype.init.apply(this,arguments),(this._brushController=new fG(n.getZr())).on("brush",Bu(this._onBrush,this))},t.prototype.render=function(e,t,n,r){if(!function(e,t,n){return n&&"axisAreaSelect"===n.type&&t.findComponents({mainType:"parallelAxis",query:n})[0]===e}(e,t,r)){this.axisModel=e,this.api=n,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Fg,this.group.add(this._axisGroup),e.get("show")){var i=function(e,t){return t.getComponent("parallel",e.get("parallelIndex"))}(e,t),a=i.coordinateSystem,s=e.getAreaSelectStyle(),l=s.width,c=e.axis.dim,u=Tu({strokeContainThreshold:l},a.getAxisLayout(c)),d=new ZN(e,u);Ru(xG,d.add,d),this._axisGroup.add(d.getGroup()),this._refreshBrushController(u,s,e,i,l,n),YC(o,this._axisGroup,e)}}},t.prototype._refreshBrushController=function(e,t,n,r,o,i){var a=n.axis.getExtent(),s=a[1]-a[0],l=Math.min(30,.1*Math.abs(s)),c=Dh.create({x:a[0],y:-o/2,width:s,height:o});c.x-=l,c.width+=2*l,this._brushController.mount({enableGlobalPan:!0,rotation:e.rotation,x:e.position[0],y:e.position[1]}).setPanels([{panelId:"pl",clipPath:gG(c),isTargetByCursor:vG(c,i,r),getLinearBrushOtherExtent:mG(c,0)}]).enableBrush({brushType:"lineX",brushStyle:t,removeOnClick:!0}).updateCovers(function(e){var t=e.axis;return Eu(e.activeIntervals,(function(e){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(e[0],!0),t.dataToCoord(e[1],!0)]}}))}(n))},t.prototype._onBrush=function(e){var t=e.areas,n=this.axisModel,r=n.axis,o=Eu(t,(function(e){return[r.coordToData(e.range[0],!0),r.coordToData(e.range[1],!0)]}));(!n.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:o})},t.prototype.dispose=function(){this._brushController.dispose()},t.type="parallelAxis",t}(tk);const wG=bG;var SG={type:"axisAreaSelect",event:"axisAreaSelected"};var _G={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function AG(e){e.registerComponentView(rH),e.registerComponentModel(oH),e.registerCoordinateSystem("parallel",SH),e.registerPreprocessor(JW),e.registerComponentModel(AH),e.registerComponentView(wG),fE(e,"parallel",AH,_G),function(e){e.registerAction(SG,(function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},(function(t){t.axis.model.setActiveIntervals(e.intervals)}))})),e.registerAction("parallelAxisExpand",(function(e,t){t.eachComponent({mainType:"parallel",query:e},(function(t){t.setAxisExpand(e)}))}))}(e)}var kG=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0},CG=function(e){function t(t){return e.call(this,t)||this}return ru(t,e),t.prototype.getDefaultShape=function(){return new kG},t.prototype.buildPath=function(e,t){var n=t.extent;e.moveTo(t.x1,t.y1),e.bezierCurveTo(t.cpx1,t.cpy1,t.cpx2,t.cpy2,t.x2,t.y2),"vertical"===t.orient?(e.lineTo(t.x2+n,t.y2),e.bezierCurveTo(t.cpx2+n,t.cpy2,t.cpx1+n,t.cpy1,t.x1+n,t.y1)):(e.lineTo(t.x2,t.y2+n),e.bezierCurveTo(t.cpx2,t.cpy2+n,t.cpx1,t.cpy1+n,t.x1,t.y1+n)),e.closePath()},t.prototype.highlight=function(){Vx(this)},t.prototype.downplay=function(){Wx(this)},t}(Ty),MG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._focusAdjacencyDisabled=!1,n}return ru(t,e),t.prototype.render=function(e,t,n){var r=this,o=e.getGraph(),i=this.group,a=e.layoutInfo,s=a.width,l=a.height,c=e.getData(),u=e.getData("edge"),d=e.get("orient");this._model=e,i.removeAll(),i.x=a.x,i.y=a.y,o.eachEdge((function(t){var n=new CG,r=sx(n);r.dataIndex=t.dataIndex,r.seriesIndex=e.seriesIndex,r.dataType="edge";var o,a,c,h,p,f,g,m,v=t.getModel(),y=v.getModel("lineStyle"),x=y.get("curveness"),b=t.node1.getLayout(),w=t.node1.getModel(),S=w.get("localX"),_=w.get("localY"),A=t.node2.getLayout(),k=t.node2.getModel(),C=k.get("localX"),M=k.get("localY"),I=t.getLayout();n.shape.extent=Math.max(1,I.dy),n.shape.orient=d,"vertical"===d?(o=(null!=S?S*s:b.x)+I.sy,a=(null!=_?_*l:b.y)+b.dy,c=(null!=C?C*s:A.x)+I.ty,p=o,f=a*(1-x)+(h=null!=M?M*l:A.y)*x,g=c,m=a*x+h*(1-x)):(o=(null!=S?S*s:b.x)+b.dx,a=(null!=_?_*l:b.y)+I.sy,p=o*(1-x)+(c=null!=C?C*s:A.x)*x,f=a,g=o*x+c*(1-x),m=h=(null!=M?M*l:A.y)+I.ty),n.setShape({x1:o,y1:a,x2:c,y2:h,cpx1:p,cpy1:f,cpx2:g,cpy2:m}),n.useStyle(y.getItemStyle()),IG(n.style,d,t);var T=""+v.get("value"),D=Ab(v,"edgeLabel");_b(n,D,{labelFetcher:{getFormattedLabel:function(t,n,r,o,i,a){return e.getFormattedLabel(t,n,"edge",o,ed(i,D.normal&&D.normal.get("formatter"),T),a)}},labelDataIndex:t.dataIndex,defaultText:T}),n.setTextConfig({position:"inside"});var j=v.getModel("emphasis");ib(n,v,"lineStyle",(function(e){var n=e.getItemStyle();return IG(n,d,t),n})),i.add(n),u.setItemGraphicEl(t.dataIndex,n);var P=j.get("focus");tb(n,"adjacency"===P?t.getAdjacentDataIndices():"trajectory"===P?t.getTrajectoryDataIndices():P,j.get("blurScope"),j.get("disabled"))})),o.eachNode((function(t){var n=t.getLayout(),r=t.getModel(),o=r.get("localX"),a=r.get("localY"),u=r.getModel("emphasis"),d=r.get(["itemStyle","borderRadius"])||0,h=new Gy({shape:{x:null!=o?o*s:n.x,y:null!=a?a*l:n.y,width:n.dx,height:n.dy,r:d},style:r.getModel("itemStyle").getItemStyle(),z2:10});_b(h,Ab(r),{labelFetcher:{getFormattedLabel:function(t,n){return e.getFormattedLabel(t,n,"node")}},labelDataIndex:t.dataIndex,defaultText:t.id}),h.disableLabelAnimation=!0,h.setStyle("fill",t.getVisual("color")),h.setStyle("decal",t.getVisual("style").decal),ib(h,r),i.add(h),c.setItemGraphicEl(t.dataIndex,h),sx(h).dataType="node";var p=u.get("focus");tb(h,"adjacency"===p?t.getAdjacentDataIndices():"trajectory"===p?t.getTrajectoryDataIndices():p,u.get("blurScope"),u.get("disabled"))})),c.eachItemGraphicEl((function(t,o){c.getItemModel(o).get("draggable")&&(t.drift=function(t,i){r._focusAdjacencyDisabled=!0,this.shape.x+=t,this.shape.y+=i,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:e.id,dataIndex:c.getRawIndex(o),localX:this.shape.x/s,localY:this.shape.y/l})},t.ondragend=function(){r._focusAdjacencyDisabled=!1},t.draggable=!0,t.cursor="move")})),!this._data&&e.isAnimationEnabled()&&i.setClipPath(function(e,t,n){var r=new Gy({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return fb(r,{shape:{width:e.width+20}},t,n),r}(i.getBoundingRect(),e,(function(){i.removeClipPath()}))),this._data=e.getData()},t.prototype.dispose=function(){},t.type="sankey",t}(dM);function IG(e,t,n){switch(e.fill){case"source":e.fill=n.node1.getVisual("color"),e.decal=n.node1.getVisual("style").decal;break;case"target":e.fill=n.node2.getVisual("color"),e.decal=n.node2.getVisual("style").decal;break;case"gradient":var r=n.node1.getVisual("color"),o=n.node2.getVisual("color");Hu(r)&&Hu(o)&&(e.fill=new mC(0,0,+("horizontal"===t),+("vertical"===t),[{color:r,offset:0},{color:o,offset:1}]))}}const TG=MG;var DG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.getInitialData=function(e,t){var n=e.edges||e.links,r=e.data||e.nodes,o=e.levels;this.levelModels=[];for(var i=this.levelModels,a=0;a<o.length;a++)null!=o[a].depth&&o[a].depth>=0&&(i[o[a].depth]=new Yb(o[a],this,t));if(r&&n){var s=CW(r,n,this,!0,(function(e,t){e.wrapMethod("getItemModel",(function(e,t){var n=e.parentModel,r=n.getData().getItemLayout(t);if(r){var o=r.depth,i=n.levelModels[o];i&&(e.parentModel=i)}return e})),t.wrapMethod("getItemModel",(function(e,t){var n=e.parentModel,r=n.getGraph().getEdgeByIndex(t).node1.getLayout();if(r){var o=r.depth,i=n.levelModels[o];i&&(e.parentModel=i)}return e}))}));return s.data}},t.prototype.setNodePosition=function(e,t){var n=(this.option.data||this.option.nodes)[e];n.localX=t[0],n.localY=t[1]},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,t,n){function r(e){return isNaN(e)||null==e}if("edge"===n){var o=this.getDataParams(e,n),i=o.data,a=o.value;return TA("nameValue",{name:i.source+" -- "+i.target,value:a,noValue:r(a)})}var s=this.getGraph().getNodeByIndex(e).getLayout().value,l=this.getDataParams(e,n).data.name;return TA("nameValue",{name:null!=l?l+"":null,value:s,noValue:r(s)})},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(t,n){var r=e.prototype.getDataParams.call(this,t,n);if(null==r.value&&"node"===n){var o=this.getGraph().getNodeByIndex(t).getLayout().value;r.value=o}return r},t.type="series.sankey",t.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},t}(JA);const jG=DG;function PG(e,t){e.eachSeriesByType("sankey",(function(e){var n=e.get("nodeWidth"),r=e.get("nodeGap"),o=function(e,t){return Zw(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,t);e.layoutInfo=o;var i=o.width,a=o.height,s=e.getGraph(),l=s.nodes,c=s.edges;!function(e){Ru(e,(function(e){var t=WG(e.outEdges,VG),n=WG(e.inEdges,VG),r=e.getValue()||0,o=Math.max(t,n,r);e.setLayout({value:o},!0)}))}(l),function(e,t,n,r,o,i,a,s,l){(function(e,t,n,r,o,i,a){for(var s=[],l=[],c=[],u=[],d=0,h=0;h<t.length;h++)s[h]=1;for(h=0;h<e.length;h++)l[h]=e[h].inEdges.length,0===l[h]&&c.push(e[h]);var p=-1;for(;c.length;){for(var f=0;f<c.length;f++){var g=c[f],m=g.hostGraph.data.getRawDataItem(g.dataIndex),v=null!=m.depth&&m.depth>=0;v&&m.depth>p&&(p=m.depth),g.setLayout({depth:v?m.depth:d},!0),"vertical"===i?g.setLayout({dy:n},!0):g.setLayout({dx:n},!0);for(var y=0;y<g.outEdges.length;y++){var x=g.outEdges[y];s[t.indexOf(x)]=0;var b=x.node2;0===--l[e.indexOf(b)]&&u.indexOf(b)<0&&u.push(b)}}++d,c=u,u=[]}for(h=0;h<s.length;h++)if(1===s[h])throw new Error("Sankey is a DAG, the original data has cycle!");var w=p>d-1?p:d-1;a&&"left"!==a&&function(e,t,n,r){if("right"===t){for(var o=[],i=e,a=0;i.length;){for(var s=0;s<i.length;s++){var l=i[s];l.setLayout({skNodeHeight:a},!0);for(var c=0;c<l.inEdges.length;c++){var u=l.inEdges[c];o.indexOf(u.node1)<0&&o.push(u.node1)}}i=o,o=[],++a}Ru(e,(function(e){LG(e)||e.setLayout({depth:Math.max(0,r-e.getLayout().skNodeHeight)},!0)}))}else"justify"===t&&function(e,t){Ru(e,(function(e){LG(e)||e.outEdges.length||e.setLayout({depth:t},!0)}))}(e,r)}(e,a,0,w);var S="vertical"===i?(o-n)/w:(r-n)/w;!function(e,t,n){Ru(e,(function(e){var r=e.getLayout().depth*t;"vertical"===n?e.setLayout({y:r},!0):e.setLayout({x:r},!0)}))}(e,S,i)})(e,t,n,o,i,s,l),function(e,t,n,r,o,i,a){var s=function(e,t){var n=[],r="vertical"===t?"y":"x",o=Bm(e,(function(e){return e.getLayout()[r]}));return o.keys.sort((function(e,t){return e-t})),Ru(o.keys,(function(e){n.push(o.buckets.get(e))})),n}(e,a);(function(e,t,n,r,o,i){var a=1/0;Ru(e,(function(e){var t=e.length,s=0;Ru(e,(function(e){s+=e.getLayout().value}));var l="vertical"===i?(r-(t-1)*o)/s:(n-(t-1)*o)/s;l<a&&(a=l)})),Ru(e,(function(e){Ru(e,(function(e,t){var n=e.getLayout().value*a;"vertical"===i?(e.setLayout({x:t},!0),e.setLayout({dx:n},!0)):(e.setLayout({y:t},!0),e.setLayout({dy:n},!0))}))})),Ru(t,(function(e){var t=+e.getValue()*a;e.setLayout({dy:t},!0)}))})(s,t,n,r,o,a),RG(s,o,n,r,a);for(var l=1;i>0;i--)EG(s,l*=.99,a),RG(s,o,n,r,a),HG(s,l,a),RG(s,o,n,r,a)}(e,t,i,o,r,a,s),function(e,t){var n="vertical"===t?"x":"y";Ru(e,(function(e){e.outEdges.sort((function(e,t){return e.node2.getLayout()[n]-t.node2.getLayout()[n]})),e.inEdges.sort((function(e,t){return e.node1.getLayout()[n]-t.node1.getLayout()[n]}))})),Ru(e,(function(e){var t=0,n=0;Ru(e.outEdges,(function(e){e.setLayout({sy:t},!0),t+=e.getLayout().dy})),Ru(e.inEdges,(function(e){e.setLayout({ty:n},!0),n+=e.getLayout().dy}))}))}(e,s)}(l,c,n,r,i,a,0!==Ou(l,(function(e){return 0===e.getLayout().value})).length?0:e.get("layoutIterations"),e.get("orient"),e.get("nodeAlign"))}))}function LG(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return null!=t.depth&&t.depth>=0}function RG(e,t,n,r,o){var i="vertical"===o?"x":"y";Ru(e,(function(e){var a,s,l;e.sort((function(e,t){return e.getLayout()[i]-t.getLayout()[i]}));for(var c=0,u=e.length,d="vertical"===o?"dx":"dy",h=0;h<u;h++)(l=c-(s=e[h]).getLayout()[i])>0&&(a=s.getLayout()[i]+l,"vertical"===o?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),c=s.getLayout()[i]+s.getLayout()[d]+t;if((l=c-t-("vertical"===o?r:n))>0){a=s.getLayout()[i]-l,"vertical"===o?s.setLayout({x:a},!0):s.setLayout({y:a},!0),c=a;for(h=u-2;h>=0;--h)(l=(s=e[h]).getLayout()[i]+s.getLayout()[d]+t-c)>0&&(a=s.getLayout()[i]-l,"vertical"===o?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),c=s.getLayout()[i]}}))}function EG(e,t,n){Ru(e.slice().reverse(),(function(e){Ru(e,(function(e){if(e.outEdges.length){var r=WG(e.outEdges,NG,n)/WG(e.outEdges,VG);if(isNaN(r)){var o=e.outEdges.length;r=o?WG(e.outEdges,OG,n)/o:0}if("vertical"===n){var i=e.getLayout().x+(r-FG(e,n))*t;e.setLayout({x:i},!0)}else{var a=e.getLayout().y+(r-FG(e,n))*t;e.setLayout({y:a},!0)}}}))}))}function NG(e,t){return FG(e.node2,t)*e.getValue()}function OG(e,t){return FG(e.node2,t)}function zG(e,t){return FG(e.node1,t)*e.getValue()}function BG(e,t){return FG(e.node1,t)}function FG(e,t){return"vertical"===t?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function VG(e){return e.getValue()}function WG(e,t,n){for(var r=0,o=e.length,i=-1;++i<o;){var a=+t(e[i],n);isNaN(a)||(r+=a)}return r}function HG(e,t,n){Ru(e,(function(e){Ru(e,(function(e){if(e.inEdges.length){var r=WG(e.inEdges,zG,n)/WG(e.inEdges,VG);if(isNaN(r)){var o=e.inEdges.length;r=o?WG(e.inEdges,BG,n)/o:0}if("vertical"===n){var i=e.getLayout().x+(r-FG(e,n))*t;e.setLayout({x:i},!0)}else{var a=e.getLayout().y+(r-FG(e,n))*t;e.setLayout({y:a},!0)}}}))}))}function GG(e){e.eachSeriesByType("sankey",(function(e){var t=e.getGraph(),n=t.nodes,r=t.edges;if(n.length){var o=1/0,i=-1/0;Ru(n,(function(e){var t=e.getLayout().value;t<o&&(o=t),t>i&&(i=t)})),Ru(n,(function(t){var n=new JF({type:"color",mappingMethod:"linear",dataExtent:[o,i],visual:e.get("color")}).mapValueToVisual(t.getLayout().value),r=t.getModel().get(["itemStyle","color"]);null!=r?(t.setVisual("color",r),t.setVisual("style",{fill:r})):(t.setVisual("color",n),t.setVisual("style",{fill:n}))}))}r.length&&Ru(r,(function(e){var t=e.getModel().get("lineStyle");e.setVisual("style",t)}))}))}var UG=function(){function e(){}return e.prototype.getInitialData=function(e,t){var n,r,o=t.getComponent("xAxis",this.get("xAxisIndex")),i=t.getComponent("yAxis",this.get("yAxisIndex")),a=o.get("type"),s=i.get("type");"category"===a?(e.layout="horizontal",n=o.getOrdinalMeta(),r=!0):"category"===s?(e.layout="vertical",n=i.getOrdinalMeta(),r=!0):e.layout=e.layout||"horizontal";var l=["x","y"],c="horizontal"===e.layout?0:1,u=this._baseAxisDim=l[c],d=l[1-c],h=[o,i],p=h[c].get("type"),f=h[1-c].get("type"),g=e.data;if(g&&r){var m=[];Ru(g,(function(e,t){var n;Vu(e)?(n=e.slice(),e.unshift(t)):Vu(e.value)?((n=Tu({},e)).value=n.value.slice(),e.value.unshift(t)):n=e,m.push(n)})),e.data=m}var v=this.defaultValueDimensions,y=[{name:u,type:CP(p),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:d,type:CP(f),dimsDef:v.slice()}];return XR(this,{coordDimensions:y,dimensionsCount:v.length+1,encodeDefaulter:Fu(yS,y,this)})},e.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},e}(),XG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],n.visualDrawType="stroke",n}return ru(t,e),t.type="series.boxplot",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},t}(JA);Pu(XG,UG,!0);const YG=XG;var qG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.render=function(e,t,n){var r=e.getData(),o=this.group,i=this._data;this._data||o.removeAll();var a="horizontal"===e.get("layout")?1:0;r.diff(i).add((function(e){if(r.hasValue(e)){var t=$G(r.getItemLayout(e),r,e,a,!0);r.setItemGraphicEl(e,t),o.add(t)}})).update((function(e,t){var n=i.getItemGraphicEl(t);if(r.hasValue(e)){var s=r.getItemLayout(e);n?(xb(n),QG(s,n,r,e)):n=$G(s,r,e,a),o.add(n),r.setItemGraphicEl(e,n)}else o.remove(n)})).remove((function(e){var t=i.getItemGraphicEl(e);t&&o.remove(t)})).execute(),this._data=r},t.prototype.remove=function(e){var t=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl((function(e){e&&t.remove(e)}))},t.type="boxplot",t}(dM),ZG=function(){},KG=function(e){function t(t){var n=e.call(this,t)||this;return n.type="boxplotBoxPath",n}return ru(t,e),t.prototype.getDefaultShape=function(){return new ZG},t.prototype.buildPath=function(e,t){var n=t.points,r=0;for(e.moveTo(n[r][0],n[r][1]),r++;r<4;r++)e.lineTo(n[r][0],n[r][1]);for(e.closePath();r<n.length;r++)e.moveTo(n[r][0],n[r][1]),r++,e.lineTo(n[r][0],n[r][1])},t}(Ty);function $G(e,t,n,r,o){var i=e.ends,a=new KG({shape:{points:o?JG(i,r,e):i}});return QG(e,a,t,n,o),a}function QG(t,n,r,o,i){var a=r.hostModel;(0,e[i?"initProps":"updateProps"])(n,{shape:{points:t.ends}},a,o),n.useStyle(r.getItemVisual(o,"style")),n.style.strokeNoScale=!0,n.z2=100;var s=r.getItemModel(o),l=s.getModel("emphasis");ib(n,s),tb(n,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function JG(e,t,n){return Eu(e,(function(e){return(e=e.slice())[t]=n.initBaseline,e}))}const eU=qG;var tU=Ru;function nU(e){var t=function(e){var t=[],n=[];return e.eachSeriesByType("boxplot",(function(e){var r=e.getBaseAxis(),o=ju(n,r);o<0&&(o=n.length,n[o]=r,t[o]={axis:r,seriesModels:[]}),t[o].seriesModels.push(e)})),t}(e);tU(t,(function(e){var t=e.seriesModels;t.length&&(!function(e){var t,n=e.axis,r=e.seriesModels,o=r.length,i=e.boxWidthList=[],a=e.boxOffsetList=[],s=[];if("category"===n.type)t=n.getBandWidth();else{var l=0;tU(r,(function(e){l=Math.max(l,e.getData().count())}));var c=n.getExtent();t=Math.abs(c[1]-c[0])/l}tU(r,(function(e){var n=e.get("boxWidth");Vu(n)||(n=[n,n]),s.push([Zg(n[0],t)||0,Zg(n[1],t)||0])}));var u=.8*t-2,d=u/o*.3,h=(u-d*(o-1))/o,p=h/2-u/2;tU(r,(function(e,t){a.push(p),p+=d+h,i.push(Math.min(Math.max(h,s[t][0]),s[t][1]))}))}(e),tU(t,(function(t,n){!function(e,t,n){var r=e.coordinateSystem,o=e.getData(),i=n/2,a="horizontal"===e.get("layout")?0:1,s=1-a,l=["x","y"],c=o.mapDimension(l[a]),u=o.mapDimensionsAll(l[s]);if(null==c||u.length<5)return;for(var d=0;d<o.count();d++){var h=o.get(c,d),p=x(h,u[2],d),f=x(h,u[0],d),g=x(h,u[1],d),m=x(h,u[3],d),v=x(h,u[4],d),y=[];b(y,g,!1),b(y,m,!0),y.push(f,g,v,m),w(y,f),w(y,v),w(y,p),o.setItemLayout(d,{initBaseline:p[s],ends:y})}function x(e,n,i){var l,c=o.get(n,i),u=[];return u[a]=e,u[s]=c,isNaN(e)||isNaN(c)?l=[NaN,NaN]:(l=r.dataToPoint(u))[a]+=t,l}function b(e,t,n){var r=t.slice(),o=t.slice();r[a]+=i,o[a]-=i,n?e.push(r,o):e.push(o,r)}function w(e,t){var n=t.slice(),r=t.slice();n[a]-=i,r[a]+=i,e.push(n,r)}}(t,e.boxOffsetList[n],e.boxWidthList[n])})))}))}var rU={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==cS){0,X_("")}var n=function(e,t){for(var n=[],r=[],o=(t=t||{}).boundIQR,i="none"===o||0===o,a=0;a<e.length;a++){var s=$g(e[a].slice()),l=cm(s,.25),c=cm(s,.5),u=cm(s,.75),d=s[0],h=s[s.length-1],p=(null==o?1.5:o)*(u-l),f=i?d:Math.max(d,l-p),g=i?h:Math.min(h,u+p),m=t.itemNameFormatter,v=Wu(m)?m({value:a}):Hu(m)?m.replace("{value}",a+""):a+"";n.push([v,f,l,c,u,g]);for(var y=0;y<s.length;y++){var x=s[y];if(x<f||x>g){var b=[v,x];r.push(b)}}}return{boxData:n,outliers:r}}(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};var oU=["color","borderColor"],iU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.render=function(e,t,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},t.prototype.incrementalPrepareRender=function(e,t,n){this._clear(),this._updateDrawMode(e)},t.prototype.incrementalRender=function(e,t,n,r){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(e,t):this._incrementalRenderNormal(e,t)},t.prototype.eachRendered=function(e){nM(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;null!=this._isLargeDraw&&t===this._isLargeDraw||(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e){var t=e.getData(),n=this._data,r=this.group,o=t.getLayout("isSimpleBox"),i=e.get("clip",!0),a=e.coordinateSystem,s=a.getArea&&a.getArea();this._data||r.removeAll(),t.diff(n).add((function(n){if(t.hasValue(n)){var a=t.getItemLayout(n);if(i&&cU(s,a))return;var l=lU(a,n,!0);fb(l,{shape:{points:a.ends}},e,n),uU(l,t,n,o),r.add(l),t.setItemGraphicEl(n,l)}})).update((function(a,l){var c=n.getItemGraphicEl(l);if(t.hasValue(a)){var u=t.getItemLayout(a);i&&cU(s,u)?r.remove(c):(c?(pb(c,{shape:{points:u.ends}},e,a),xb(c)):c=lU(u,a),uU(c,t,a,o),r.add(c),t.setItemGraphicEl(a,c))}else r.remove(c)})).remove((function(e){var t=n.getItemGraphicEl(e);t&&r.remove(t)})).execute(),this._data=t},t.prototype._renderLarge=function(e){this._clear(),fU(e,this.group);var t=e.get("clip",!0)?DL(e.coordinateSystem,!1,e):null;t?this.group.setClipPath(t):this.group.removeClipPath()},t.prototype._incrementalRenderNormal=function(e,t){for(var n,r=t.getData(),o=r.getLayout("isSimpleBox");null!=(n=e.next());){var i=lU(r.getItemLayout(n),n);uU(i,r,n,o),i.incremental=!0,this.group.add(i),this._progressiveEls.push(i)}},t.prototype._incrementalRenderLarge=function(e,t){fU(t,this.group,this._progressiveEls,!0)},t.prototype.remove=function(e){this._clear()},t.prototype._clear=function(){this.group.removeAll(),this._data=null},t.type="candlestick",t}(dM),aU=function(){},sU=function(e){function t(t){var n=e.call(this,t)||this;return n.type="normalCandlestickBox",n}return ru(t,e),t.prototype.getDefaultShape=function(){return new aU},t.prototype.buildPath=function(e,t){var n=t.points;this.__simpleBox?(e.moveTo(n[4][0],n[4][1]),e.lineTo(n[6][0],n[6][1])):(e.moveTo(n[0][0],n[0][1]),e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]),e.lineTo(n[3][0],n[3][1]),e.closePath(),e.moveTo(n[4][0],n[4][1]),e.lineTo(n[5][0],n[5][1]),e.moveTo(n[6][0],n[6][1]),e.lineTo(n[7][0],n[7][1]))},t}(Ty);function lU(e,t,n){var r=e.ends;return new sU({shape:{points:n?dU(r,e):r},z2:100})}function cU(e,t){for(var n=!0,r=0;r<t.ends.length;r++)if(e.contain(t.ends[r][0],t.ends[r][1])){n=!1;break}return n}function uU(e,t,n,r){var o=t.getItemModel(n);e.useStyle(t.getItemVisual(n,"style")),e.style.strokeNoScale=!0,e.__simpleBox=r,ib(e,o)}function dU(e,t){return Eu(e,(function(e){return(e=e.slice())[1]=t.initBaseline,e}))}var hU=function(){},pU=function(e){function t(t){var n=e.call(this,t)||this;return n.type="largeCandlestickBox",n}return ru(t,e),t.prototype.getDefaultShape=function(){return new hU},t.prototype.buildPath=function(e,t){for(var n=t.points,r=0;r<n.length;)if(this.__sign===n[r++]){var o=n[r++];e.moveTo(o,n[r++]),e.lineTo(o,n[r++])}else r+=3},t}(Ty);function fU(e,t,n,r){var o=e.getData(),i=o.getLayout("largePoints"),a=new pU({shape:{points:i},__sign:1,ignoreCoarsePointer:!0});t.add(a);var s=new pU({shape:{points:i},__sign:-1,ignoreCoarsePointer:!0});t.add(s);var l=new pU({shape:{points:i},__sign:0,ignoreCoarsePointer:!0});t.add(l),gU(1,a,e,o),gU(-1,s,e,o),gU(0,l,e,o),r&&(a.incremental=!0,s.incremental=!0),n&&n.push(a,s)}function gU(e,t,n,r){var o=n.get(["itemStyle",e>0?"borderColor":"borderColor0"])||n.get(["itemStyle",e>0?"color":"color0"]);0===e&&(o=n.get(["itemStyle","borderColorDoji"]));var i=n.getModel("itemStyle").getItemStyle(oU);t.useStyle(i),t.style.fill=null,t.style.stroke=o}const mU=iU;var vU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],n}return ru(t,e),t.prototype.getShadowDim=function(){return"open"},t.prototype.brushSelector=function(e,t,n){var r=t.getItemLayout(e);return r&&n.rect(r.brushRect)},t.type="series.candlestick",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},t}(JA);Pu(vU,UG,!0);const yU=vU;function xU(e){e&&Vu(e.series)&&Ru(e.series,(function(e){Xu(e)&&"k"===e.type&&(e.type="candlestick")}))}var bU=["itemStyle","borderColor"],wU=["itemStyle","borderColor0"],SU=["itemStyle","borderColorDoji"],_U=["itemStyle","color"],AU=["itemStyle","color0"],kU={seriesType:"candlestick",plan:nk(),performRawSeries:!0,reset:function(e,t){function n(e,t){return t.get(e>0?_U:AU)}function r(e,t){return t.get(0===e?SU:e>0?bU:wU)}if(!t.isSeriesFiltered(e))return!e.pipelineContext.large&&{progress:function(e,t){for(var o;null!=(o=e.next());){var i=t.getItemModel(o),a=t.getItemLayout(o).sign,s=i.getItemStyle();s.fill=n(a,i),s.stroke=r(a,i)||s.fill,Tu(t.ensureUniqueItemVisual(o,"style"),s)}}}}};const CU=kU;var MU={seriesType:"candlestick",plan:nk(),reset:function(e){var t=e.coordinateSystem,n=e.getData(),r=function(e,t){var n,r=e.getBaseAxis(),o="category"===r.type?r.getBandWidth():(n=r.getExtent(),Math.abs(n[1]-n[0])/t.count()),i=Zg(Ju(e.get("barMaxWidth"),o),o),a=Zg(Ju(e.get("barMinWidth"),1),o),s=e.get("barWidth");return null!=s?Zg(s,o):Math.max(Math.min(o/2,i),a)}(e,n),o=["x","y"],i=n.getDimensionIndex(n.mapDimension(o[0])),a=Eu(n.mapDimensionsAll(o[1]),n.getDimensionIndex,n),s=a[0],l=a[1],c=a[2],u=a[3];if(n.setLayout({candleWidth:r,isSimpleBox:r<=1.3}),!(i<0||a.length<4))return{progress:e.pipelineContext.large?function(n,r){var o,a,d=xL(4*n.count),h=0,p=[],f=[],g=r.getStore(),m=!!e.get(["itemStyle","borderColorDoji"]);for(;null!=(a=n.next());){var v=g.get(i,a),y=g.get(s,a),x=g.get(l,a),b=g.get(c,a),w=g.get(u,a);isNaN(v)||isNaN(b)||isNaN(w)?(d[h++]=NaN,h+=3):(d[h++]=IU(g,a,y,x,l,m),p[0]=v,p[1]=b,o=t.dataToPoint(p,null,f),d[h++]=o?o[0]:NaN,d[h++]=o?o[1]:NaN,p[1]=w,o=t.dataToPoint(p,null,f),d[h++]=o?o[1]:NaN)}r.setLayout("largePoints",d)}:function(e,n){var o,a=n.getStore();for(;null!=(o=e.next());){var d=a.get(i,o),h=a.get(s,o),p=a.get(l,o),f=a.get(c,o),g=a.get(u,o),m=Math.min(h,p),v=Math.max(h,p),y=A(m,d),x=A(v,d),b=A(f,d),w=A(g,d),S=[];k(S,x,0),k(S,y,1),S.push(M(w),M(x),M(b),M(y));var _=!!n.getItemModel(o).get(["itemStyle","borderColorDoji"]);n.setItemLayout(o,{sign:IU(a,o,h,p,l,_),initBaseline:h>p?x[1]:y[1],ends:S,brushRect:C(f,g,d)})}function A(e,n){var r=[];return r[0]=n,r[1]=e,isNaN(n)||isNaN(e)?[NaN,NaN]:t.dataToPoint(r)}function k(e,t,n){var o=t.slice(),i=t.slice();o[0]=WC(o[0]+r/2,1,!1),i[0]=WC(i[0]-r/2,1,!0),n?e.push(o,i):e.push(i,o)}function C(e,t,n){var o=A(e,n),i=A(t,n);return o[0]-=r/2,i[0]-=r/2,{x:o[0],y:o[1],width:r,height:i[1]-o[1]}}function M(e){return e[0]=WC(e[0],1),e}}}}};function IU(e,t,n,r,o,i){return n>r?-1:n<r?1:i?0:t>0?e.get(o,t-1)<=r?1:-1:1}const TU=MU;function DU(e,t){var n=t.rippleEffectColor||t.color;e.eachChild((function(e){e.attr({z:t.z,zlevel:t.zlevel,style:{stroke:"stroke"===t.brushType?n:null,fill:"fill"===t.brushType?n:null}})}))}var jU=function(e){function t(t,n){var r=e.call(this)||this,o=new uL(t,n),i=new Fg;return r.add(o),r.add(i),r.updateData(t,n),r}return ru(t,e),t.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},t.prototype.startEffectAnimation=function(e){for(var t=e.symbolType,n=e.color,r=e.rippleNumber,o=this.childAt(1),i=0;i<r;i++){var a=bI(t,-1,-1,2,2,n);a.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var s=-i/r*e.period+e.effectOffset;a.animate("",!0).when(e.period,{scaleX:e.rippleScale/2,scaleY:e.rippleScale/2}).delay(s).start(),a.animateStyle(!0).when(e.period,{opacity:0}).delay(s).start(),o.add(a)}DU(o,e)},t.prototype.updateEffectAnimation=function(e){for(var t=this._effectCfg,n=this.childAt(1),r=["symbolType","period","rippleScale","rippleNumber"],o=0;o<r.length;o++){var i=r[o];if(t[i]!==e[i])return this.stopEffectAnimation(),void this.startEffectAnimation(e)}DU(n,e)},t.prototype.highlight=function(){Vx(this)},t.prototype.downplay=function(){Wx(this)},t.prototype.getSymbolType=function(){var e=this.childAt(0);return e&&e.getSymbolType()},t.prototype.updateData=function(e,t){var n=this,r=e.hostModel;this.childAt(0).updateData(e,t);var o=this.childAt(1),i=e.getItemModel(t),a=e.getItemVisual(t,"symbol"),s=wI(e.getItemVisual(t,"symbolSize")),l=e.getItemVisual(t,"style"),c=l&&l.fill,u=i.getModel("emphasis");o.setScale(s),o.traverse((function(e){e.setStyle("fill",c)}));var d=SI(e.getItemVisual(t,"symbolOffset"),s);d&&(o.x=d[0],o.y=d[1]);var h=e.getItemVisual(t,"symbolRotate");o.rotation=(h||0)*Math.PI/180||0;var p={};p.showEffectOn=r.get("showEffectOn"),p.rippleScale=i.get(["rippleEffect","scale"]),p.brushType=i.get(["rippleEffect","brushType"]),p.period=1e3*i.get(["rippleEffect","period"]),p.effectOffset=t/e.count(),p.z=r.getShallow("z")||0,p.zlevel=r.getShallow("zlevel")||0,p.symbolType=a,p.color=c,p.rippleEffectColor=i.get(["rippleEffect","color"]),p.rippleNumber=i.get(["rippleEffect","number"]),"render"===p.showEffectOn?(this._effectCfg?this.updateEffectAnimation(p):this.startEffectAnimation(p),this._effectCfg=p):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(e){"emphasis"===e?"render"!==p.showEffectOn&&n.startEffectAnimation(p):"normal"===e&&"render"!==p.showEffectOn&&n.stopEffectAnimation()}),this._effectCfg=p,tb(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype.fadeOut=function(e){e&&e()},t}(Fg);const PU=jU;const LU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.init=function(){this._symbolDraw=new fL(PU)},t.prototype.render=function(e,t,n){var r=e.getData(),o=this._symbolDraw;o.updateData(r,{clipShape:this._getClipShape(e)}),this.group.add(o.group)},t.prototype._getClipShape=function(e){var t=e.coordinateSystem,n=t&&t.getArea&&t.getArea();return e.get("clip",!0)?n:null},t.prototype.updateTransform=function(e,t,n){var r=e.getData();this.group.dirty();var o=GL("").reset(e,t,n);o.progress&&o.progress({start:0,end:r.count(),count:r.count()},r),this._symbolDraw.updateLayout()},t.prototype._updateGroupTransform=function(e){var t=e.coordinateSystem;t&&t.getRoamTransform&&(this.group.transform=function(e){var t=[1,0,0,1,0,0];return ph(t,e),t}(t.getRoamTransform()),this.group.decomposeTransform())},t.prototype.remove=function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0)},t.type="effectScatter",t}(dM);const RU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return ru(t,e),t.prototype.getInitialData=function(e,t){return rL(null,this,{useEncodeDefaulter:!0})},t.prototype.brushSelector=function(e,t,n){return n.point(t.getItemLayout(e))},t.type="series.effectScatter",t.dependencies=["grid","polar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",clip:!0,rippleEffect:{period:4,scale:2.5,brushType:"fill",number:3},universalTransition:{divideShape:"clone"},symbolSize:10},t}(JA);var EU=function(e){function t(t,n,r){var o=e.call(this)||this;return o.add(o.createLine(t,n,r)),o._updateEffectSymbol(t,n),o}return ru(t,e),t.prototype.createLine=function(e,t,n){return new oW(e,t,n)},t.prototype._updateEffectSymbol=function(e,t){var n=e.getItemModel(t).getModel("effect"),r=n.get("symbolSize"),o=n.get("symbol");Vu(r)||(r=[r,r]);var i=e.getItemVisual(t,"style"),a=n.get("color")||i&&i.stroke,s=this.childAt(1);this._symbolType!==o&&(this.remove(s),(s=bI(o,-.5,-.5,1,1,a)).z2=100,s.culling=!0,this.add(s)),s&&(s.setStyle("shadowColor",a),s.setStyle(n.getItemStyle(["color"])),s.scaleX=r[0],s.scaleY=r[1],s.setColor(a),this._symbolType=o,this._symbolScale=r,this._updateEffectAnimation(e,n,t))},t.prototype._updateEffectAnimation=function(e,t,n){var r=this.childAt(1);if(r){var o=e.getItemLayout(n),i=1e3*t.get("period"),a=t.get("loop"),s=t.get("roundTrip"),l=t.get("constantSpeed"),c=Qu(t.get("delay"),(function(t){return t/e.count()*i/3}));if(r.ignore=!0,this._updateAnimationPoints(r,o),l>0&&(i=this._getLineLength(r)/l*1e3),i!==this._period||a!==this._loop||s!==this._roundTrip){r.stopAnimation();var u=void 0;u=Wu(c)?c(n):c,r.__t>0&&(u=-i*r.__t),this._animateSymbol(r,i,u,a,s)}this._period=i,this._loop=a,this._roundTrip=s}},t.prototype._animateSymbol=function(e,t,n,r,o){if(t>0){e.__t=0;var i=this,a=e.animate("",r).when(o?2*t:t,{__t:o?2:1}).delay(n).during((function(){i._updateSymbolPosition(e)}));r||a.done((function(){i.remove(e)})),a.start()}},t.prototype._getLineLength=function(e){return Pd(e.__p1,e.__cp1)+Pd(e.__cp1,e.__p2)},t.prototype._updateAnimationPoints=function(e,t){e.__p1=t[0],e.__p2=t[1],e.__cp1=t[2]||[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]},t.prototype.updateData=function(e,t,n){this.childAt(0).updateData(e,t,n),this._updateEffectSymbol(e,t)},t.prototype._updateSymbolPosition=function(e){var t=e.__p1,n=e.__p2,r=e.__cp1,o=e.__t<1?e.__t:2-e.__t,i=[e.x,e.y],a=i.slice(),s=Ap,l=kp;i[0]=s(t[0],r[0],n[0],o),i[1]=s(t[1],r[1],n[1],o);var c=e.__t<1?l(t[0],r[0],n[0],o):l(n[0],r[0],t[0],1-o),u=e.__t<1?l(t[1],r[1],n[1],o):l(n[1],r[1],t[1],1-o);e.rotation=-Math.atan2(u,c)-Math.PI/2,"line"!==this._symbolType&&"rect"!==this._symbolType&&"roundRect"!==this._symbolType||(void 0!==e.__lastT&&e.__lastT<e.__t?(e.scaleY=1.05*Pd(a,i),1===o&&(i[0]=a[0]+(i[0]-a[0])/2,i[1]=a[1]+(i[1]-a[1])/2)):1===e.__lastT?e.scaleY=2*Pd(t,i):e.scaleY=this._symbolScale[1]),e.__lastT=e.__t,e.ignore=!1,e.x=i[0],e.y=i[1]},t.prototype.updateLayout=function(e,t){this.childAt(0).updateLayout(e,t);var n=e.getItemModel(t).getModel("effect");this._updateEffectAnimation(e,n,t)},t}(Fg);const NU=EU;var OU=function(e){function t(t,n,r){var o=e.call(this)||this;return o._createPolyline(t,n,r),o}return ru(t,e),t.prototype._createPolyline=function(e,t,n){var r=e.getItemLayout(t),o=new eC({shape:{points:r}});this.add(o),this._updateCommonStl(e,t,n)},t.prototype.updateData=function(e,t,n){var r=e.hostModel;pb(this.childAt(0),{shape:{points:e.getItemLayout(t)}},r,t),this._updateCommonStl(e,t,n)},t.prototype._updateCommonStl=function(e,t,n){var r=this.childAt(0),o=e.getItemModel(t),i=n&&n.emphasisLineStyle,a=n&&n.focus,s=n&&n.blurScope,l=n&&n.emphasisDisabled;if(!n||e.hasItemOption){var c=o.getModel("emphasis");i=c.getModel("lineStyle").getLineStyle(),l=c.get("disabled"),a=c.get("focus"),s=c.get("blurScope")}r.useStyle(e.getItemVisual(t,"style")),r.style.fill=null,r.style.strokeNoScale=!0,r.ensureState("emphasis").style=i,tb(this,a,s,l)},t.prototype.updateLayout=function(e,t){this.childAt(0).setShape("points",e.getItemLayout(t))},t}(Fg);const zU=OU;var BU=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._lastFrame=0,t._lastFramePercent=0,t}return ru(t,e),t.prototype.createLine=function(e,t,n){return new zU(e,t,n)},t.prototype._updateAnimationPoints=function(e,t){this._points=t;for(var n=[0],r=0,o=1;o<t.length;o++){var i=t[o-1],a=t[o];r+=Pd(i,a),n.push(r)}if(0!==r){for(o=0;o<n.length;o++)n[o]/=r;this._offsets=n,this._length=r}else this._length=0},t.prototype._getLineLength=function(){return this._length},t.prototype._updateSymbolPosition=function(e){var t=e.__t<1?e.__t:2-e.__t,n=this._points,r=this._offsets,o=n.length;if(r){var i,a=this._lastFrame;if(t<this._lastFramePercent){for(i=Math.min(a+1,o-1);i>=0&&!(r[i]<=t);i--);i=Math.min(i,o-2)}else{for(i=a;i<o&&!(r[i]>t);i++);i=Math.min(i-1,o-2)}var s=(t-r[i])/(r[i+1]-r[i]),l=n[i],c=n[i+1];e.x=l[0]*(1-s)+s*c[0],e.y=l[1]*(1-s)+s*c[1];var u=e.__t<1?c[0]-l[0]:l[0]-c[0],d=e.__t<1?c[1]-l[1]:l[1]-c[1];e.rotation=-Math.atan2(d,u)-Math.PI/2,this._lastFrame=i,this._lastFramePercent=t,e.ignore=!1}},t}(NU);const FU=BU;var VU=function(){this.polyline=!1,this.curveness=0,this.segs=[]},WU=function(e){function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return ru(t,e),t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new VU},t.prototype.buildPath=function(e,t){var n,r=t.segs,o=t.curveness;if(t.polyline)for(n=this._off;n<r.length;){var i=r[n++];if(i>0){e.moveTo(r[n++],r[n++]);for(var a=1;a<i;a++)e.lineTo(r[n++],r[n++])}}else for(n=this._off;n<r.length;){var s=r[n++],l=r[n++],c=r[n++],u=r[n++];if(e.moveTo(s,l),o>0){var d=(s+c)/2-(l-u)*o,h=(l+u)/2-(c-s)*o;e.quadraticCurveTo(d,h,c,u)}else e.lineTo(c,u)}this.incremental&&(this._off=n,this.notClear=!0)},t.prototype.findDataIndex=function(e,t){var n=this.shape,r=n.segs,o=n.curveness,i=this.style.lineWidth;if(n.polyline)for(var a=0,s=0;s<r.length;){var l=r[s++];if(l>0)for(var c=r[s++],u=r[s++],d=1;d<l;d++){if(sy(c,u,h=r[s++],p=r[s++],i,e,t))return a}a++}else for(a=0,s=0;s<r.length;){c=r[s++],u=r[s++];var h=r[s++],p=r[s++];if(o>0){if(cy(c,u,(c+h)/2-(u-p)*o,(u+p)/2-(h-c)*o,h,p,i,e,t))return a}else if(sy(c,u,h,p,i,e,t))return a;a++}return-1},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect();return e=n[0],t=n[1],r.contain(e,t)?(this.hoverDataIdx=this.findDataIndex(e,t))>=0:(this.hoverDataIdx=-1,!1)},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape.segs,n=1/0,r=1/0,o=-1/0,i=-1/0,a=0;a<t.length;){var s=t[a++],l=t[a++];n=Math.min(s,n),o=Math.max(s,o),r=Math.min(l,r),i=Math.max(l,i)}e=this._rect=new Dh(n,r,o,i)}return e},t}(Ty),HU=function(){function e(){this.group=new Fg}return e.prototype.updateData=function(e){this._clear();var t=this._create();t.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(t,e)},e.prototype.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clear()},e.prototype.incrementalUpdate=function(e,t){var n=this._newAdded[0],r=t.getLayout("linesPoints"),o=n&&n.shape.segs;if(o&&o.length<2e4){var i=o.length,a=new Float32Array(i+r.length);a.set(o),a.set(r,i),n.setShape({segs:a})}else{this._newAdded=[];var s=this._create();s.incremental=!0,s.setShape({segs:r}),this._setCommon(s,t),s.__startIndex=e.start}},e.prototype.remove=function(){this._clear()},e.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},e.prototype._create=function(){var e=new WU({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(e),this.group.add(e),e},e.prototype._setCommon=function(e,t,n){var r=t.hostModel;e.setShape({polyline:r.get("polyline"),curveness:r.get(["lineStyle","curveness"])}),e.useStyle(r.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var o=t.getVisual("style");o&&o.stroke&&e.setStyle("stroke",o.stroke),e.setStyle("fill",null);var i=sx(e);i.seriesIndex=r.seriesIndex,e.on("mousemove",(function(t){i.dataIndex=null;var n=e.hoverDataIdx;n>0&&(i.dataIndex=n+e.__startIndex)}))},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}();const GU=HU;var UU={seriesType:"lines",plan:nk(),reset:function(e){var t=e.coordinateSystem;if(t){var n=e.get("polyline"),r=e.pipelineContext.large;return{progress:function(o,i){var a=[];if(r){var s=void 0,l=o.end-o.start;if(n){for(var c=0,u=o.start;u<o.end;u++)c+=e.getLineCoordsCount(u);s=new Float32Array(l+2*c)}else s=new Float32Array(4*l);var d=0,h=[];for(u=o.start;u<o.end;u++){var p=e.getLineCoords(u,a);n&&(s[d++]=p);for(var f=0;f<p;f++)h=t.dataToPoint(a[f],!1,h),s[d++]=h[0],s[d++]=h[1]}i.setLayout("linesPoints",s)}else for(u=o.start;u<o.end;u++){var g=i.getItemModel(u),m=(p=e.getLineCoords(u,a),[]);if(n)for(var v=0;v<p;v++)m.push(t.dataToPoint(a[v]));else{m[0]=t.dataToPoint(a[0]),m[1]=t.dataToPoint(a[1]);var y=g.get(["lineStyle","curveness"]);+y&&(m[2]=[(m[0][0]+m[1][0])/2-(m[0][1]-m[1][1])*y,(m[0][1]+m[1][1])/2-(m[1][0]-m[0][0])*y])}i.setItemLayout(u,m)}}}}}};const XU=UU;const YU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.render=function(e,t,n){var r=e.getData(),o=this._updateLineDraw(r,e),i=e.get("zlevel"),a=e.get(["effect","trailLength"]),s=n.getZr(),l="svg"===s.painter.getType();l||s.painter.getLayer(i).clear(!0),null==this._lastZlevel||l||s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(e)&&a>0&&(l||s.configLayer(i,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(a/10+.9,1),0)})),o.updateData(r);var c=e.get("clip",!0)&&DL(e.coordinateSystem,!1,e);c?this.group.setClipPath(c):this.group.removeClipPath(),this._lastZlevel=i,this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,n){var r=e.getData();this._updateLineDraw(r,e).incrementalPrepareUpdate(r),this._clearLayer(n),this._finished=!1},t.prototype.incrementalRender=function(e,t,n){this._lineDraw.incrementalUpdate(e,t.getData()),this._finished=e.end===t.getData().count()},t.prototype.eachRendered=function(e){this._lineDraw&&this._lineDraw.eachRendered(e)},t.prototype.updateTransform=function(e,t,n){var r=e.getData(),o=e.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var i=XU.reset(e,t,n);i.progress&&i.progress({start:0,end:r.count(),count:r.count()},r),this._lineDraw.updateLayout(),this._clearLayer(n)},t.prototype._updateLineDraw=function(e,t){var n=this._lineDraw,r=this._showEffect(t),o=!!t.get("polyline"),i=t.pipelineContext.large;return n&&r===this._hasEffet&&o===this._isPolyline&&i===this._isLargeDraw||(n&&n.remove(),n=this._lineDraw=i?new GU:new lW(o?r?FU:zU:r?NU:oW),this._hasEffet=r,this._isPolyline=o,this._isLargeDraw=i),this.group.add(n.group),n},t.prototype._showEffect=function(e){return!!e.get(["effect","show"])},t.prototype._clearLayer=function(e){var t=e.getZr();"svg"===t.painter.getType()||null==this._lastZlevel||t.painter.getLayer(this._lastZlevel).clear(!0)},t.prototype.remove=function(e,t){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(t)},t.prototype.dispose=function(e,t){this.remove(e,t)},t.type="lines",t}(dM);var qU="undefined"===typeof Uint32Array?Array:Uint32Array,ZU="undefined"===typeof Float64Array?Array:Float64Array;function KU(e){var t=e.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(e.data=Eu(t,(function(e){var t={coords:[e[0].coord,e[1].coord]};return e[0].name&&(t.fromName=e[0].name),e[1].name&&(t.toName=e[1].name),Iu([t,e[0],e[1]])})))}var $U=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath="lineStyle",n.visualDrawType="stroke",n}return ru(t,e),t.prototype.init=function(t){t.data=t.data||[],KU(t);var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count)),e.prototype.init.apply(this,arguments)},t.prototype.mergeOption=function(t){if(KU(t),t.data){var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count))}e.prototype.mergeOption.apply(this,arguments)},t.prototype.appendData=function(e){var t=this._processFlatCoordsArray(e.data);t.flatCoords&&(this._flatCoords?(this._flatCoords=hd(this._flatCoords,t.flatCoords),this._flatCoordsOffset=hd(this._flatCoordsOffset,t.flatCoordsOffset)):(this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset),e.data=new Float32Array(t.count)),this.getRawData().appendData(e.data)},t.prototype._getCoordsFromItemModel=function(e){var t=this.getData().getItemModel(e);return t.option instanceof Array?t.option:t.getShallow("coords")},t.prototype.getLineCoordsCount=function(e){return this._flatCoordsOffset?this._flatCoordsOffset[2*e+1]:this._getCoordsFromItemModel(e).length},t.prototype.getLineCoords=function(e,t){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[2*e],r=this._flatCoordsOffset[2*e+1],o=0;o<r;o++)t[o]=t[o]||[],t[o][0]=this._flatCoords[n+2*o],t[o][1]=this._flatCoords[n+2*o+1];return r}var i=this._getCoordsFromItemModel(e);for(o=0;o<i.length;o++)t[o]=t[o]||[],t[o][0]=i[o][0],t[o][1]=i[o][1];return i.length},t.prototype._processFlatCoordsArray=function(e){var t=0;if(this._flatCoords&&(t=this._flatCoords.length),Uu(e[0])){for(var n=e.length,r=new qU(n),o=new ZU(n),i=0,a=0,s=0,l=0;l<n;){s++;var c=e[l++];r[a++]=i+t,r[a++]=c;for(var u=0;u<c;u++){var d=e[l++],h=e[l++];o[i++]=d,o[i++]=h}}return{flatCoordsOffset:new Uint32Array(r.buffer,0,a),flatCoords:o,count:s}}return{flatCoordsOffset:null,flatCoords:null,count:e.length}},t.prototype.getInitialData=function(e,t){var n=new qP(["value"],this);return n.hasItemOption=!1,n.initData(e.data,[],(function(e,t,r,o){if(e instanceof Array)return NaN;n.hasItemOption=!0;var i=e.value;return null!=i?i instanceof Array?i[o]:i:void 0})),n},t.prototype.formatTooltip=function(e,t,n){var r=this.getData().getItemModel(e),o=r.get("name");if(o)return o;var i=r.get("fromName"),a=r.get("toName"),s=[];return null!=i&&s.push(i),null!=a&&s.push(a),TA("nameValue",{name:s.join(" > ")})},t.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},t.prototype.getProgressive=function(){var e=this.option.progressive;return null==e?this.option.large?1e4:this.get("progressive"):e},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?2e4:this.get("progressiveThreshold"):e},t.prototype.getZLevelKey=function(){var e=this.getModel("effect"),t=e.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:e.get("show")&&t>0?t+"":""},t.type="series.lines",t.dependencies=["grid","polar","geo","calendar"],t.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},t}(JA);const QU=$U;function JU(e){return e instanceof Array||(e=[e,e]),e}const eX={seriesType:"lines",reset:function(e){var t=JU(e.get("symbol")),n=JU(e.get("symbolSize")),r=e.getData();return r.setVisual("fromSymbol",t&&t[0]),r.setVisual("toSymbol",t&&t[1]),r.setVisual("fromSymbolSize",n&&n[0]),r.setVisual("toSymbolSize",n&&n[1]),{dataEach:r.hasItemOption?function(e,t){var n=e.getItemModel(t),r=JU(n.getShallow("symbol",!0)),o=JU(n.getShallow("symbolSize",!0));r[0]&&e.setItemVisual(t,"fromSymbol",r[0]),r[1]&&e.setItemVisual(t,"toSymbol",r[1]),o[0]&&e.setItemVisual(t,"fromSymbolSize",o[0]),o[1]&&e.setItemVisual(t,"toSymbolSize",o[1])}:null}}};var tX=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=du.createCanvas();this.canvas=e}return e.prototype.update=function(e,t,n,r,o,i){var a=this._getBrush(),s=this._getGradient(o,"inRange"),l=this._getGradient(o,"outOfRange"),c=this.pointSize+this.blurSize,u=this.canvas,d=u.getContext("2d"),h=e.length;u.width=t,u.height=n;for(var p=0;p<h;++p){var f=e[p],g=f[0],m=f[1],v=r(f[2]);d.globalAlpha=v,d.drawImage(a,g-c,m-c)}if(!u.width||!u.height)return u;for(var y=d.getImageData(0,0,u.width,u.height),x=y.data,b=0,w=x.length,S=this.minOpacity,_=this.maxOpacity-S;b<w;){v=x[b+3]/256;var A=4*Math.floor(255*v);if(v>0){var k=i(v)?s:l;v>0&&(v=v*_+S),x[b++]=k[A],x[b++]=k[A+1],x[b++]=k[A+2],x[b++]=k[A+3]*v*256}else b+=4}return d.putImageData(y,0,0),u},e.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=du.createCanvas()),t=this.pointSize+this.blurSize,n=2*t;e.width=n,e.height=n;var r=e.getContext("2d");return r.clearRect(0,0,n,n),r.shadowOffsetX=n,r.shadowBlur=this.blurSize,r.shadowColor="#000",r.beginPath(),r.arc(-t,t,this.pointSize,0,2*Math.PI,!0),r.closePath(),r.fill(),e},e.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,r=n[t]||(n[t]=new Uint8ClampedArray(1024)),o=[0,0,0,0],i=0,a=0;a<256;a++)e[t](a/255,!0,o),r[i++]=o[0],r[i++]=o[1],r[i++]=o[2],r[i++]=o[3];return r},e}();const nX=tX;function rX(e){var t=e.dimensions;return"lng"===t[0]&&"lat"===t[1]}var oX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.render=function(e,t,n){var r;t.eachComponent("visualMap",(function(t){t.eachTargetSeries((function(n){n===e&&(r=t)}))})),this._progressiveEls=null,this.group.removeAll();var o=e.coordinateSystem;"cartesian2d"===o.type||"calendar"===o.type?this._renderOnCartesianAndCalendar(e,n,0,e.getData().count()):rX(o)&&this._renderOnGeo(o,e,r,n)},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll()},t.prototype.incrementalRender=function(e,t,n,r){var o=t.coordinateSystem;o&&(rX(o)?this.render(t,n,r):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(t,r,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){nM(this._progressiveEls||this.group,e)},t.prototype._renderOnCartesianAndCalendar=function(e,t,n,r,o){var i,a,s,l,c=e.coordinateSystem,u=jL(c,"cartesian2d");if(u){var d=c.getAxis("x"),h=c.getAxis("y");0,i=d.getBandWidth()+.5,a=h.getBandWidth()+.5,s=d.scale.getExtent(),l=h.scale.getExtent()}for(var p=this.group,f=e.getData(),g=e.getModel(["emphasis","itemStyle"]).getItemStyle(),m=e.getModel(["blur","itemStyle"]).getItemStyle(),v=e.getModel(["select","itemStyle"]).getItemStyle(),y=e.get(["itemStyle","borderRadius"]),x=Ab(e),b=e.getModel("emphasis"),w=b.get("focus"),S=b.get("blurScope"),_=b.get("disabled"),A=u?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],k=n;k<r;k++){var C=void 0,M=f.getItemVisual(k,"style");if(u){var I=f.get(A[0],k),T=f.get(A[1],k);if(isNaN(f.get(A[2],k))||isNaN(I)||isNaN(T)||I<s[0]||I>s[1]||T<l[0]||T>l[1])continue;var D=c.dataToPoint([I,T]);C=new Gy({shape:{x:D[0]-i/2,y:D[1]-a/2,width:i,height:a},style:M})}else{if(isNaN(f.get(A[1],k)))continue;C=new Gy({z2:1,shape:c.dataToRect([f.get(A[0],k)]).contentShape,style:M})}if(f.hasItemOption){var j=f.getItemModel(k),P=j.getModel("emphasis");g=P.getModel("itemStyle").getItemStyle(),m=j.getModel(["blur","itemStyle"]).getItemStyle(),v=j.getModel(["select","itemStyle"]).getItemStyle(),y=j.get(["itemStyle","borderRadius"]),w=P.get("focus"),S=P.get("blurScope"),_=P.get("disabled"),x=Ab(j)}C.shape.r=y;var L=e.getRawValue(k),R="-";L&&null!=L[2]&&(R=L[2]+""),_b(C,x,{labelFetcher:e,labelDataIndex:k,defaultOpacity:M.opacity,defaultText:R}),C.ensureState("emphasis").style=g,C.ensureState("blur").style=m,C.ensureState("select").style=v,tb(C,w,S,_),C.incremental=o,o&&(C.states.emphasis.hoverLayer=!0),p.add(C),f.setItemGraphicEl(k,C),this._progressiveEls&&this._progressiveEls.push(C)}},t.prototype._renderOnGeo=function(e,t,n,r){var o=n.targetVisuals.inRange,i=n.targetVisuals.outOfRange,a=t.getData(),s=this._hmLayer||this._hmLayer||new nX;s.blurSize=t.get("blurSize"),s.pointSize=t.get("pointSize"),s.minOpacity=t.get("minOpacity"),s.maxOpacity=t.get("maxOpacity");var l=e.getViewRect().clone(),c=e.getRoamTransform();l.applyTransform(c);var u=Math.max(l.x,0),d=Math.max(l.y,0),h=Math.min(l.width+l.x,r.getWidth()),p=Math.min(l.height+l.y,r.getHeight()),f=h-u,g=p-d,m=[a.mapDimension("lng"),a.mapDimension("lat"),a.mapDimension("value")],v=a.mapArray(m,(function(t,n,r){var o=e.dataToPoint([t,n]);return o[0]-=u,o[1]-=d,o.push(r),o})),y=n.getExtent(),x="visualMap.continuous"===n.type?function(e,t){var n=e[1]-e[0];return t=[(t[0]-e[0])/n,(t[1]-e[0])/n],function(e){return e>=t[0]&&e<=t[1]}}(y,n.option.range):function(e,t,n){var r=e[1]-e[0],o=(t=Eu(t,(function(t){return{interval:[(t.interval[0]-e[0])/r,(t.interval[1]-e[0])/r]}}))).length,i=0;return function(e){var r;for(r=i;r<o;r++)if((a=t[r].interval)[0]<=e&&e<=a[1]){i=r;break}if(r===o)for(r=i-1;r>=0;r--){var a;if((a=t[r].interval)[0]<=e&&e<=a[1]){i=r;break}}return r>=0&&r<o&&n[r]}}(y,n.getPieceList(),n.option.selected);s.update(v,f,g,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:i.color.getColorMapper()},x);var b=new Ny({style:{width:f,height:g,x:u,y:d,image:s.canvas},silent:!0});this.group.add(b)},t.type="heatmap",t}(dM);const iX=oX;const aX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.getInitialData=function(e,t){return rL(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var e=WS.get(this.get("coordinateSystem"));if(e&&e.dimensions)return"lng"===e.dimensions[0]&&"lat"===e.dimensions[1]},t.type="series.heatmap",t.dependencies=["grid","geo","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},t}(JA);var sX=["itemStyle","borderWidth"],lX=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],cX=new kk,uX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.render=function(e,t,n){var r=this.group,o=e.getData(),i=this._data,a=e.coordinateSystem,s=a.getBaseAxis().isHorizontal(),l=a.master.getRect(),c={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:e,coordSys:a,coordSysExtent:[[l.x,l.x+l.width],[l.y,l.y+l.height]],isHorizontal:s,valueDim:lX[+s],categoryDim:lX[1-+s]};o.diff(i).add((function(e){if(o.hasValue(e)){var t=yX(o,e),n=dX(o,e,t,c),i=wX(o,c,n);o.setItemGraphicEl(e,i),r.add(i),CX(i,c,n)}})).update((function(e,t){var n=i.getItemGraphicEl(t);if(o.hasValue(e)){var a=yX(o,e),s=dX(o,e,a,c),l=_X(o,s);n&&l!==n.__pictorialShapeStr&&(r.remove(n),o.setItemGraphicEl(e,null),n=null),n?function(e,t,n){var r=n.animationModel,o=n.dataIndex,i=e.__pictorialBundle;pb(i,{x:n.bundlePosition[0],y:n.bundlePosition[1]},r,o),n.symbolRepeat?fX(e,t,n,!0):gX(e,t,n,!0);mX(e,n,!0),vX(e,t,n,!0)}(n,c,s):n=wX(o,c,s,!0),o.setItemGraphicEl(e,n),n.__pictorialSymbolMeta=s,r.add(n),CX(n,c,s)}else r.remove(n)})).remove((function(e){var t=i.getItemGraphicEl(e);t&&SX(i,e,t.__pictorialSymbolMeta.animationModel,t)})).execute();var u=e.get("clip",!0)?DL(e.coordinateSystem,!1,e):null;return u?r.setClipPath(u):r.removeClipPath(),this._data=o,this.group},t.prototype.remove=function(e,t){var n=this.group,r=this._data;e.get("animation")?r&&r.eachItemGraphicEl((function(t){SX(r,sx(t).dataIndex,e,t)})):n.removeAll()},t.type="pictorialBar",t}(dM);function dX(e,t,n,r){var o=e.getItemLayout(t),i=n.get("symbolRepeat"),a=n.get("symbolClip"),s=n.get("symbolPosition")||"start",l=(n.get("symbolRotate")||0)*Math.PI/180||0,c=n.get("symbolPatternSize")||2,u=n.isAnimationEnabled(),d={dataIndex:t,layout:o,itemModel:n,symbolType:e.getItemVisual(t,"symbol")||"circle",style:e.getItemVisual(t,"style"),symbolClip:a,symbolRepeat:i,symbolRepeatDirection:n.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:l,animationModel:u?n:null,hoverScale:u&&n.get(["emphasis","scale"]),z2:n.getShallow("z",!0)||0};!function(e,t,n,r,o){var i,a=r.valueDim,s=e.get("symbolBoundingData"),l=r.coordSys.getOtherAxis(r.coordSys.getBaseAxis()),c=l.toGlobalCoord(l.dataToCoord(0)),u=1-+(n[a.wh]<=0);if(Vu(s)){var d=[hX(l,s[0])-c,hX(l,s[1])-c];d[1]<d[0]&&d.reverse(),i=d[u]}else i=null!=s?hX(l,s)-c:t?r.coordSysExtent[a.index][u]-c:n[a.wh];o.boundingLength=i,t&&(o.repeatCutLength=n[a.wh]);o.pxSign=i>0?1:-1}(n,i,o,r,d),function(e,t,n,r,o,i,a,s,l,c){var u,d=l.valueDim,h=l.categoryDim,p=Math.abs(n[h.wh]),f=e.getItemVisual(t,"symbolSize");u=Vu(f)?f.slice():null==f?["100%","100%"]:[f,f];u[h.index]=Zg(u[h.index],p),u[d.index]=Zg(u[d.index],r?p:Math.abs(i)),c.symbolSize=u;var g=c.symbolScale=[u[0]/s,u[1]/s];g[d.index]*=(l.isHorizontal?-1:1)*a}(e,t,o,i,0,d.boundingLength,d.pxSign,c,r,d),function(e,t,n,r,o){var i=e.get(sX)||0;i&&(cX.attr({scaleX:t[0],scaleY:t[1],rotation:n}),cX.updateTransform(),i/=cX.getLineScale(),i*=t[r.valueDim.index]);o.valueLineWidth=i||0}(n,d.symbolScale,l,r,d);var h=d.symbolSize,p=SI(n.get("symbolOffset"),h);return function(e,t,n,r,o,i,a,s,l,c,u,d){var h=u.categoryDim,p=u.valueDim,f=d.pxSign,g=Math.max(t[p.index]+s,0),m=g;if(r){var v=Math.abs(l),y=Qu(e.get("symbolMargin"),"15%")+"",x=!1;y.lastIndexOf("!")===y.length-1&&(x=!0,y=y.slice(0,y.length-1));var b=Zg(y,t[p.index]),w=Math.max(g+2*b,0),S=x?0:2*b,_=hm(r),A=_?r:MX((v+S)/w);w=g+2*(b=(v-A*g)/2/(x?A:Math.max(A-1,1))),S=x?0:2*b,_||"fixed"===r||(A=c?MX((Math.abs(c)+S)/w):0),m=A*w-S,d.repeatTimes=A,d.symbolMargin=b}var k=f*(m/2),C=d.pathPosition=[];C[h.index]=n[h.wh]/2,C[p.index]="start"===a?k:"end"===a?l-k:l/2,i&&(C[0]+=i[0],C[1]+=i[1]);var M=d.bundlePosition=[];M[h.index]=n[h.xy],M[p.index]=n[p.xy];var I=d.barRectShape=Tu({},n);I[p.wh]=f*Math.max(Math.abs(n[p.wh]),Math.abs(C[p.index]+k)),I[h.wh]=n[h.wh];var T=d.clipShape={};T[h.xy]=-n[h.xy],T[h.wh]=u.ecSize[h.wh],T[p.xy]=0,T[p.wh]=n[p.wh]}(n,h,o,i,0,p,s,d.valueLineWidth,d.boundingLength,d.repeatCutLength,r,d),d}function hX(e,t){return e.toGlobalCoord(e.dataToCoord(e.scale.parse(t)))}function pX(e){var t=e.symbolPatternSize,n=bI(e.symbolType,-t/2,-t/2,t,t);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function fX(e,t,n,r){var o=e.__pictorialBundle,i=n.symbolSize,a=n.valueLineWidth,s=n.pathPosition,l=t.valueDim,c=n.repeatTimes||0,u=0,d=i[t.valueDim.index]+a+2*n.symbolMargin;for(AX(e,(function(e){e.__pictorialAnimationIndex=u,e.__pictorialRepeatTimes=c,u<c?kX(e,null,f(u),n,r):kX(e,null,{scaleX:0,scaleY:0},n,r,(function(){o.remove(e)})),u++}));u<c;u++){var h=pX(n);h.__pictorialAnimationIndex=u,h.__pictorialRepeatTimes=c,o.add(h);var p=f(u);kX(h,{x:p.x,y:p.y,scaleX:0,scaleY:0},{scaleX:p.scaleX,scaleY:p.scaleY,rotation:p.rotation},n,r)}function f(e){var t=s.slice(),r=n.pxSign,o=e;return("start"===n.symbolRepeatDirection?r>0:r<0)&&(o=c-1-e),t[l.index]=d*(o-c/2+.5)+s[l.index],{x:t[0],y:t[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation}}}function gX(e,t,n,r){var o=e.__pictorialBundle,i=e.__pictorialMainPath;i?kX(i,null,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation},n,r):(i=e.__pictorialMainPath=pX(n),o.add(i),kX(i,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:0,scaleY:0,rotation:n.rotation},{scaleX:n.symbolScale[0],scaleY:n.symbolScale[1]},n,r))}function mX(e,t,n){var r=Tu({},t.barRectShape),o=e.__pictorialBarRect;o?kX(o,null,{shape:r},t,n):((o=e.__pictorialBarRect=new Gy({z2:2,shape:r,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}})).disableMorphing=!0,e.add(o))}function vX(t,n,r,o){if(r.symbolClip){var i=t.__pictorialClipPath,a=Tu({},r.clipShape),s=n.valueDim,l=r.animationModel,c=r.dataIndex;if(i)pb(i,{shape:a},l,c);else{a[s.wh]=0,i=new Gy({shape:a}),t.__pictorialBundle.setClipPath(i),t.__pictorialClipPath=i;var u={};u[s.wh]=r.clipShape[s.wh],e[o?"updateProps":"initProps"](i,{shape:u},l,c)}}}function yX(e,t){var n=e.getItemModel(t);return n.getAnimationDelayParams=xX,n.isAnimationEnabled=bX,n}function xX(e){return{index:e.__pictorialAnimationIndex,count:e.__pictorialRepeatTimes}}function bX(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function wX(e,t,n,r){var o=new Fg,i=new Fg;return o.add(i),o.__pictorialBundle=i,i.x=n.bundlePosition[0],i.y=n.bundlePosition[1],n.symbolRepeat?fX(o,t,n):gX(o,0,n),mX(o,n,r),vX(o,t,n,r),o.__pictorialShapeStr=_X(e,n),o.__pictorialSymbolMeta=n,o}function SX(e,t,n,r){var o=r.__pictorialBarRect;o&&o.removeTextContent();var i=[];AX(r,(function(e){i.push(e)})),r.__pictorialMainPath&&i.push(r.__pictorialMainPath),r.__pictorialClipPath&&(n=null),Ru(i,(function(e){mb(e,{scaleX:0,scaleY:0},n,t,(function(){r.parent&&r.parent.remove(r)}))})),e.setItemGraphicEl(t,null)}function _X(e,t){return[e.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function AX(e,t,n){Ru(e.__pictorialBundle.children(),(function(r){r!==e.__pictorialBarRect&&t.call(n,r)}))}function kX(t,n,r,o,i,a){n&&t.attr(n),o.symbolClip&&!i?r&&t.attr(r):r&&e[i?"updateProps":"initProps"](t,r,o.animationModel,o.dataIndex,a)}function CX(e,t,n){var r=n.dataIndex,o=n.itemModel,i=o.getModel("emphasis"),a=i.getModel("itemStyle").getItemStyle(),s=o.getModel(["blur","itemStyle"]).getItemStyle(),l=o.getModel(["select","itemStyle"]).getItemStyle(),c=o.getShallow("cursor"),u=i.get("focus"),d=i.get("blurScope"),h=i.get("scale");AX(e,(function(e){if(e instanceof Ny){var t=e.style;e.useStyle(Tu({image:t.image,x:t.x,y:t.y,width:t.width,height:t.height},n.style))}else e.useStyle(n.style);var r=e.ensureState("emphasis");r.style=a,h&&(r.scaleX=1.1*e.scaleX,r.scaleY=1.1*e.scaleY),e.ensureState("blur").style=s,e.ensureState("select").style=l,c&&(e.cursor=c),e.z2=n.z2}));var p=t.valueDim.posDesc[+(n.boundingLength>0)],f=e.__pictorialBarRect;f.ignoreClip=!0,_b(f,Ab(o),{labelFetcher:t.seriesModel,labelDataIndex:r,defaultText:aL(t.seriesModel.getData(),r),inheritColor:n.style.fill,defaultOpacity:n.style.opacity,defaultOutsidePosition:p}),tb(e,u,d,i.get("disabled"))}function MX(e){var t=Math.round(e);return Math.abs(e-t)<1e-4?t:Math.ceil(e)}const IX=uX;const TX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n.defaultSymbol="roundRect",n}return ru(t,e),t.prototype.getInitialData=function(t){return t.stack=null,e.prototype.getInitialData.apply(this,arguments)},t.type="series.pictorialBar",t.dependencies=["grid"],t.defaultOption=Kb(iR.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),t}(iR);var DX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._layers=[],n}return ru(t,e),t.prototype.render=function(e,t,n){var r=e.getData(),o=this,i=this.group,a=e.getLayerSeries(),s=r.getLayout("layoutInfo"),l=s.rect,c=s.boundaryGap;function u(e){return e.name}i.x=0,i.y=l.y+c[0];var d=new _P(this._layersSeries||[],a,u,u),h=[];function p(t,n,s){var l=o._layers;if("remove"!==t){for(var c,u,d=[],p=[],f=a[n].indices,g=0;g<f.length;g++){var m=r.getItemLayout(f[g]),v=m.x,y=m.y0,x=m.y;d.push(v,y),p.push(v,y+x),c=r.getItemVisual(f[g],"style")}var b=r.getItemLayout(f[0]),w=e.getModel("label").get("margin"),S=e.getModel("emphasis");if("add"===t){var _=h[n]=new Fg;u=new ML({shape:{points:d,stackedOnPoints:p,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),_.add(u),i.add(_),e.isAnimationEnabled()&&u.setClipPath(function(e,t,n){var r=new Gy({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return fb(r,{shape:{x:e.x-50,width:e.width+100,height:e.height+20}},t,n),r}(u.getBoundingRect(),e,(function(){u.removeClipPath()})))}else{_=l[s];u=_.childAt(0),i.add(_),h[n]=_,pb(u,{shape:{points:d,stackedOnPoints:p}},e),xb(u)}_b(u,Ab(e),{labelDataIndex:f[g-1],defaultText:r.getName(f[g-1]),inheritColor:c.fill},{normal:{verticalAlign:"middle"}}),u.setTextConfig({position:null,local:!0});var A=u.getTextContent();A&&(A.x=b.x-w,A.y=b.y0+b.y/2),u.useStyle(c),r.setItemGraphicEl(n,u),ib(u,e),tb(u,S.get("focus"),S.get("blurScope"),S.get("disabled"))}else i.remove(l[n])}d.add(Bu(p,this,"add")).update(Bu(p,this,"update")).remove(Bu(p,this,"remove")).execute(),this._layersSeries=a,this._layers=h},t.type="themeRiver",t}(dM);const jX=DX;var PX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new qR(Bu(this.getData,this),Bu(this.getRawData,this))},t.prototype.fixData=function(e){var t=e.length,n={},r=Bm(e,(function(e){return n.hasOwnProperty(e[0]+"")||(n[e[0]+""]=-1),e[2]})),o=[];r.buckets.each((function(e,t){o.push({name:t,dataList:e})}));for(var i=o.length,a=0;a<i;++a){for(var s=o[a].name,l=0;l<o[a].dataList.length;++l){var c=o[a].dataList[l][0]+"";n[c]=a}for(var c in n)n.hasOwnProperty(c)&&n[c]!==a&&(n[c]=a,e[t]=[c,0,s],t++)}return e},t.prototype.getInitialData=function(e,t){for(var n=this.getReferringComponents("singleAxis",Em).models[0].get("type"),r=Ou(e.data,(function(e){return void 0!==e[2]})),o=this.fixData(r||[]),i=[],a=this.nameMap=dd(),s=0,l=0;l<o.length;++l)i.push(o[l][2]),a.get(o[l][2])||(a.set(o[l][2],s),s++);var c=ZP(o,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:CP(n)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,u=new qP(c,this);return u.initData(o),u},t.prototype.getLayerSeries=function(){for(var e=this.getData(),t=e.count(),n=[],r=0;r<t;++r)n[r]=r;var o=e.mapDimension("single"),i=Bm(n,(function(t){return e.get("name",t)})),a=[];return i.buckets.each((function(t,n){t.sort((function(t,n){return e.get(o,t)-e.get(o,n)})),a.push({name:n,indices:t})})),a},t.prototype.getAxisTooltipData=function(e,t,n){Vu(e)||(e=e?[e]:[]);for(var r,o=this.getData(),i=this.getLayerSeries(),a=[],s=i.length,l=0;l<s;++l){for(var c=Number.MAX_VALUE,u=-1,d=i[l].indices.length,h=0;h<d;++h){var p=o.get(e[0],i[l].indices[h]),f=Math.abs(p-t);f<=c&&(r=p,c=f,u=i[l].indices[h])}a.push(u)}return{dataIndices:a,nestestValue:r}},t.prototype.formatTooltip=function(e,t,n){var r=this.getData();return TA("nameValue",{name:r.getName(e),value:r.get(r.mapDimension("value"),e)})},t.type="series.themeRiver",t.dependencies=["singleAxis"],t.defaultOption={z:2,colorBy:"data",coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},t}(JA);const LX=PX;function RX(e,t){e.eachSeriesByType("themeRiver",(function(e){var t=e.getData(),n=e.coordinateSystem,r={},o=n.getRect();r.rect=o;var i=e.get("boundaryGap"),a=n.getAxis();(r.boundaryGap=i,"horizontal"===a.orient)?(i[0]=Zg(i[0],o.height),i[1]=Zg(i[1],o.height),EX(t,e,o.height-i[0]-i[1])):(i[0]=Zg(i[0],o.width),i[1]=Zg(i[1],o.width),EX(t,e,o.width-i[0]-i[1]));t.setLayout("layoutInfo",r)}))}function EX(e,t,n){if(e.count())for(var r,o=t.coordinateSystem,i=t.getLayerSeries(),a=e.mapDimension("single"),s=e.mapDimension("value"),l=Eu(i,(function(t){return Eu(t.indices,(function(t){var n=o.dataToPoint(e.get(a,t));return n[1]=e.get(s,t),n}))})),c=function(e){for(var t=e.length,n=e[0].length,r=[],o=[],i=0,a=0;a<n;++a){for(var s=0,l=0;l<t;++l)s+=e[l][a][1];s>i&&(i=s),r.push(s)}for(var c=0;c<n;++c)o[c]=(i-r[c])/2;i=0;for(var u=0;u<n;++u){var d=r[u]+o[u];d>i&&(i=d)}return{y0:o,max:i}}(l),u=c.y0,d=n/c.max,h=i.length,p=i[0].indices.length,f=0;f<p;++f){r=u[f]*d,e.setItemLayout(i[0].indices[f],{layerIndex:0,x:l[0][f][0],y0:r,y:l[0][f][1]*d});for(var g=1;g<h;++g)r+=l[g-1][f][1]*d,e.setItemLayout(i[g].indices[f],{layerIndex:g,x:l[g][f][0],y0:r,y:l[g][f][1]*d})}}var NX=function(e){function t(t,n,r,o){var i=e.call(this)||this;i.z2=2,i.textConfig={inside:!0},sx(i).seriesIndex=n.seriesIndex;var a=new ax({z2:4,silent:t.getModel().get(["label","silent"])});return i.setTextContent(a),i.updateData(!0,t,n,r,o),i}return ru(t,e),t.prototype.updateData=function(e,t,n,r,o){this.node=t,t.piece=this,n=n||this._seriesModel,r=r||this._ecModel;var i=this;sx(i).dataIndex=t.dataIndex;var a=t.getModel(),s=a.getModel("emphasis"),l=t.getLayout(),c=Tu({},l);c.label=null;var u=t.getVisual("style");u.lineJoin="bevel";var d=t.getVisual("decal");d&&(u.decal=$I(d,o));var h=hR(a.getModel("itemStyle"),c,!0);Tu(c,h),Ru(mx,(function(e){var t=i.ensureState(e),n=a.getModel([e,"itemStyle"]);t.style=n.getItemStyle();var r=hR(n,c);r&&(t.shape=r)})),e?(i.setShape(c),i.shape.r=l.r0,fb(i,{shape:{r:l.r}},n,t.dataIndex)):(pb(i,{shape:c},n),xb(i)),i.useStyle(u),this._updateLabel(n);var p=a.getShallow("cursor");p&&i.attr("cursor",p),this._seriesModel=n||this._seriesModel,this._ecModel=r||this._ecModel;var f=s.get("focus");tb(this,"ancestor"===f?t.getAncestorsIndices():"descendant"===f?t.getDescendantIndices():f,s.get("blurScope"),s.get("disabled"))},t.prototype._updateLabel=function(e){var t=this,n=this.node.getModel(),r=n.getModel("label"),o=this.node.getLayout(),i=o.endAngle-o.startAngle,a=(o.startAngle+o.endAngle)/2,s=Math.cos(a),l=Math.sin(a),c=this,u=c.getTextContent(),d=this.node.dataIndex,h=r.get("minAngle")/180*Math.PI,p=r.get("show")&&!(null!=h&&Math.abs(i)<h);function f(e,t){var n=e.get(t);return null==n?r.get(t):n}u.ignore=!p,Ru(vx,(function(r){var h="normal"===r?n.getModel("label"):n.getModel([r,"label"]),p="normal"===r,g=p?u:u.ensureState(r),m=e.getFormattedLabel(d,r);p&&(m=m||t.node.name),g.style=kb(h,{},null,"normal"!==r,!0),m&&(g.style.text=m);var v=h.get("show");null==v||p||(g.ignore=!v);var y,x=f(h,"position"),b=p?c:c.states[r],w=b.style.fill;b.textConfig={outsideFill:"inherit"===h.get("color")?w:null,inside:"outside"!==x};var S=f(h,"distance")||0,_=f(h,"align"),A=f(h,"rotate"),k=.5*Math.PI,C=1.5*Math.PI,M=dy("tangential"===A?Math.PI/2-a:a),I=M>k&&!om(M-k)&&M<C;"outside"===x?(y=o.r+S,_=I?"right":"left"):_&&"center"!==_?"left"===_?(y=o.r0+S,_=I?"right":"left"):"right"===_&&(y=o.r-S,_=I?"left":"right"):(y=i===2*Math.PI&&0===o.r0?0:(o.r+o.r0)/2,_="center"),g.style.align=_,g.style.verticalAlign=f(h,"verticalAlign")||"middle",g.x=y*s+o.cx,g.y=y*l+o.cy;var T=0;"radial"===A?T=dy(-a)+(I?Math.PI:0):"tangential"===A?T=dy(Math.PI/2-a)+(I?Math.PI:0):Uu(A)&&(T=A*Math.PI/180),g.rotation=dy(T)})),u.dirtyStyle()},t}(Gk);const OX=NX;var zX="sunburstRootToNode",BX="sunburstHighlight",FX="sunburstUnhighlight";var VX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.render=function(e,t,n,r){var o=this;this.seriesModel=e,this.api=n,this.ecModel=t;var i=e.getData(),a=i.tree.root,s=e.getViewRoot(),l=this.group,c=e.get("renderLabelForZeroData"),u=[];s.eachNode((function(e){u.push(e)}));var d=this._oldChildren||[];!function(r,o){if(0===r.length&&0===o.length)return;function s(e){return e.getId()}function u(s,u){!function(r,o){c||!r||r.getValue()||(r=null);if(r!==a&&o!==a)if(o&&o.piece)r?(o.piece.updateData(!1,r,e,t,n),i.setItemGraphicEl(r.dataIndex,o.piece)):function(e){if(!e)return;e.piece&&(l.remove(e.piece),e.piece=null)}(o);else if(r){var s=new OX(r,e,t,n);l.add(s),i.setItemGraphicEl(r.dataIndex,s)}}(null==s?null:r[s],null==u?null:o[u])}new _P(o,r,s,s).add(u).update(u).remove(Fu(u,null)).execute()}(u,d),function(r,i){i.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,r,e,t,n):(o.virtualPiece=new OX(r,e,t,n),l.add(o.virtualPiece)),i.piece.off("click"),o.virtualPiece.on("click",(function(e){o._rootToNode(i.parentNode)}))):o.virtualPiece&&(l.remove(o.virtualPiece),o.virtualPiece=null)}(a,s),this._initEvents(),this._oldChildren=u},t.prototype._initEvents=function(){var e=this;this.group.off("click"),this.group.on("click",(function(t){var n=!1;e.seriesModel.getViewRoot().eachNode((function(r){if(!n&&r.piece&&r.piece===t.target){var o=r.getModel().get("nodeClick");if("rootToNode"===o)e._rootToNode(r);else if("link"===o){var i=r.getModel(),a=i.get("link");if(a)Hw(a,i.get("target",!0)||"_blank")}n=!0}}))}))},t.prototype._rootToNode=function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:zX,from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},t.prototype.containPoint=function(e,t){var n=t.getData().getItemLayout(0);if(n){var r=e[0]-n.cx,o=e[1]-n.cy,i=Math.sqrt(r*r+o*o);return i<=n.r&&i>=n.r0}},t.type="sunburst",t}(dM);const WX=VX;var HX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.ignoreStyleOnData=!0,n}return ru(t,e),t.prototype.getInitialData=function(e,t){var n={name:e.name,children:e.data};GX(n);var r=this._levelModels=Eu(e.levels||[],(function(e){return new Yb(e,this,t)}),this),o=aF.createTree(n,this,(function(e){e.wrapMethod("getItemModel",(function(e,t){var n=o.getNodeByDataIndex(t),i=r[n.depth];return i&&(e.parentModel=i),e}))}));return o.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(t);return n.treePathInfo=uF(r,this),n},t.prototype.getLevelModel=function(e){return this._levelModels&&this._levelModels[e.depth]},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;e&&(e===t||t.contains(e))||(this._viewRoot=t)},t.prototype.enableAriaDecal=function(){vF(this)},t.type="series.sunburst",t.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},t}(JA);function GX(e){var t=0;Ru(e.children,(function(e){GX(e);var n=e.value;Vu(n)&&(n=n[0]),t+=n}));var n=e.value;Vu(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=t),n<0&&(n=0),Vu(e.value)?e.value[0]=n:e.value=n}const UX=HX;var XX=Math.PI/180;function YX(e,t,n){t.eachSeriesByType(e,(function(e){var t=e.get("center"),r=e.get("radius");Vu(r)||(r=[0,r]),Vu(t)||(t=[t,t]);var o=n.getWidth(),i=n.getHeight(),a=Math.min(o,i),s=Zg(t[0],o),l=Zg(t[1],i),c=Zg(r[0],a/2),u=Zg(r[1],a/2),d=-e.get("startAngle")*XX,h=e.get("minAngle")*XX,p=e.getData().tree.root,f=e.getViewRoot(),g=f.depth,m=e.get("sort");null!=m&&qX(f,m);var v=0;Ru(f.children,(function(e){!isNaN(e.getValue())&&v++}));var y=f.getValue(),x=Math.PI/(y||v)*2,b=f.depth>0,w=f.height-(b?-1:1),S=(u-c)/(w||1),_=e.get("clockwise"),A=e.get("stillShowZeroSum"),k=_?1:-1,C=function(t,n){if(t){var r=n;if(t!==p){var o=t.getValue(),i=0===y&&A?x:o*x;i<h&&(i=h),r=n+k*i;var u=t.depth-g-(b?-1:1),d=c+S*u,f=c+S*(u+1),m=e.getLevelModel(t);if(m){var v=m.get("r0",!0),w=m.get("r",!0),M=m.get("radius",!0);null!=M&&(v=M[0],w=M[1]),null!=v&&(d=Zg(v,a/2)),null!=w&&(f=Zg(w,a/2))}t.setLayout({angle:i,startAngle:n,endAngle:r,clockwise:_,cx:s,cy:l,r0:d,r:f})}if(t.children&&t.children.length){var I=0;Ru(t.children,(function(e){I+=C(e,n+I)}))}return r-n}};if(b){var M=c,I=c+S,T=2*Math.PI;p.setLayout({angle:T,startAngle:d,endAngle:d+T,clockwise:_,cx:s,cy:l,r0:M,r:I})}C(f,d)}))}function qX(e,t){var n=e.children||[];e.children=function(e,t){if(Wu(t)){var n=Eu(e,(function(e,t){var n=e.getValue();return{params:{depth:e.depth,height:e.height,dataIndex:e.dataIndex,getValue:function(){return n}},index:t}}));return n.sort((function(e,n){return t(e.params,n.params)})),Eu(n,(function(t){return e[t.index]}))}var r="asc"===t;return e.sort((function(e,t){var n=(e.getValue()-t.getValue())*(r?1:-1);return 0===n?(e.dataIndex-t.dataIndex)*(r?-1:1):n}))}(n,t),n.length&&Ru(e.children,(function(e){qX(e,t)}))}function ZX(e){var t={};e.eachSeriesByType("sunburst",(function(e){var n=e.getData(),r=n.tree;r.eachNode((function(o){var i=o.getModel().getModel("itemStyle").getItemStyle();i.fill||(i.fill=function(e,n,r){for(var o=e;o&&o.depth>1;)o=o.parentNode;var i=n.getColorFromPalette(o.name||o.dataIndex+"",t);return e.depth>1&&Hu(i)&&(i=$p(i,(e.depth-1)/(r-1)*.5)),i}(o,e,r.root.height)),Tu(n.ensureUniqueItemVisual(o.dataIndex,"style"),i)}))}))}var KX={color:"fill",borderColor:"stroke"},$X={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},QX=jm();const JX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},t.prototype.getInitialData=function(e,t){return rL(null,this)},t.prototype.getDataParams=function(t,n,r){var o=e.prototype.getDataParams.call(this,t,n);return r&&(o.info=QX(r).info),o},t.type="series.custom",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},t}(JA);function eY(e,t){return t=t||[0,0],Eu(["x","y"],(function(n,r){var o=this.getAxis(n),i=t[r],a=e[r]/2;return"category"===o.type?o.getBandWidth():Math.abs(o.dataToCoord(i-a)-o.dataToCoord(i+a))}),this)}function tY(e,t){return t=t||[0,0],Eu([0,1],(function(n){var r=t[n],o=e[n]/2,i=[],a=[];return i[n]=r-o,a[n]=r+o,i[1-n]=a[1-n]=t[1-n],Math.abs(this.dataToPoint(i)[n]-this.dataToPoint(a)[n])}),this)}function nY(e,t){var n=this.getAxis(),r=t instanceof Array?t[0]:t,o=(e instanceof Array?e[0]:e)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(r-o)-n.dataToCoord(r+o))}function rY(e,t){return t=t||[0,0],Eu(["Radius","Angle"],(function(n,r){var o=this["get"+n+"Axis"](),i=t[r],a=e[r]/2,s="category"===o.type?o.getBandWidth():Math.abs(o.dataToCoord(i-a)-o.dataToCoord(i+a));return"Angle"===n&&(s=s*Math.PI/180),s}),this)}function oY(e,t,n,r){return e&&(e.legacy||!1!==e.legacy&&!n&&!r&&"tspan"!==t&&("text"===t||gd(e,"text")))}function iY(e,t,n){var r,o,i,a=e;if("text"===t)i=a;else{i={},gd(a,"text")&&(i.text=a.text),gd(a,"rich")&&(i.rich=a.rich),gd(a,"textFill")&&(i.fill=a.textFill),gd(a,"textStroke")&&(i.stroke=a.textStroke),gd(a,"fontFamily")&&(i.fontFamily=a.fontFamily),gd(a,"fontSize")&&(i.fontSize=a.fontSize),gd(a,"fontStyle")&&(i.fontStyle=a.fontStyle),gd(a,"fontWeight")&&(i.fontWeight=a.fontWeight),o={type:"text",style:i,silent:!0},r={};var s=gd(a,"textPosition");n?r.position=s?a.textPosition:"inside":s&&(r.position=a.textPosition),gd(a,"textPosition")&&(r.position=a.textPosition),gd(a,"textOffset")&&(r.offset=a.textOffset),gd(a,"textRotation")&&(r.rotation=a.textRotation),gd(a,"textDistance")&&(r.distance=a.textDistance)}return aY(i,e),Ru(i.rich,(function(e){aY(e,e)})),{textConfig:r,textContent:o}}function aY(e,t){t&&(t.font=t.textFont||t.font,gd(t,"textStrokeWidth")&&(e.lineWidth=t.textStrokeWidth),gd(t,"textAlign")&&(e.align=t.textAlign),gd(t,"textVerticalAlign")&&(e.verticalAlign=t.textVerticalAlign),gd(t,"textLineHeight")&&(e.lineHeight=t.textLineHeight),gd(t,"textWidth")&&(e.width=t.textWidth),gd(t,"textHeight")&&(e.height=t.textHeight),gd(t,"textBackgroundColor")&&(e.backgroundColor=t.textBackgroundColor),gd(t,"textPadding")&&(e.padding=t.textPadding),gd(t,"textBorderColor")&&(e.borderColor=t.textBorderColor),gd(t,"textBorderWidth")&&(e.borderWidth=t.textBorderWidth),gd(t,"textBorderRadius")&&(e.borderRadius=t.textBorderRadius),gd(t,"textBoxShadowColor")&&(e.shadowColor=t.textBoxShadowColor),gd(t,"textBoxShadowBlur")&&(e.shadowBlur=t.textBoxShadowBlur),gd(t,"textBoxShadowOffsetX")&&(e.shadowOffsetX=t.textBoxShadowOffsetX),gd(t,"textBoxShadowOffsetY")&&(e.shadowOffsetY=t.textBoxShadowOffsetY))}function sY(e,t,n){var r=e;r.textPosition=r.textPosition||n.position||"inside",null!=n.offset&&(r.textOffset=n.offset),null!=n.rotation&&(r.textRotation=n.rotation),null!=n.distance&&(r.textDistance=n.distance);var o=r.textPosition.indexOf("inside")>=0,i=e.fill||"#000";lY(r,t);var a=null==r.textFill;return o?a&&(r.textFill=n.insideFill||"#fff",!r.textStroke&&n.insideStroke&&(r.textStroke=n.insideStroke),!r.textStroke&&(r.textStroke=i),null==r.textStrokeWidth&&(r.textStrokeWidth=2)):(a&&(r.textFill=e.fill||n.outsideFill||"#000"),!r.textStroke&&n.outsideStroke&&(r.textStroke=n.outsideStroke)),r.text=t.text,r.rich=t.rich,Ru(t.rich,(function(e){lY(e,e)})),r}function lY(e,t){t&&(gd(t,"fill")&&(e.textFill=t.fill),gd(t,"stroke")&&(e.textStroke=t.fill),gd(t,"lineWidth")&&(e.textStrokeWidth=t.lineWidth),gd(t,"font")&&(e.font=t.font),gd(t,"fontStyle")&&(e.fontStyle=t.fontStyle),gd(t,"fontWeight")&&(e.fontWeight=t.fontWeight),gd(t,"fontSize")&&(e.fontSize=t.fontSize),gd(t,"fontFamily")&&(e.fontFamily=t.fontFamily),gd(t,"align")&&(e.textAlign=t.align),gd(t,"verticalAlign")&&(e.textVerticalAlign=t.verticalAlign),gd(t,"lineHeight")&&(e.textLineHeight=t.lineHeight),gd(t,"width")&&(e.textWidth=t.width),gd(t,"height")&&(e.textHeight=t.height),gd(t,"backgroundColor")&&(e.textBackgroundColor=t.backgroundColor),gd(t,"padding")&&(e.textPadding=t.padding),gd(t,"borderColor")&&(e.textBorderColor=t.borderColor),gd(t,"borderWidth")&&(e.textBorderWidth=t.borderWidth),gd(t,"borderRadius")&&(e.textBorderRadius=t.borderRadius),gd(t,"shadowColor")&&(e.textBoxShadowColor=t.shadowColor),gd(t,"shadowBlur")&&(e.textBoxShadowBlur=t.shadowBlur),gd(t,"shadowOffsetX")&&(e.textBoxShadowOffsetX=t.shadowOffsetX),gd(t,"shadowOffsetY")&&(e.textBoxShadowOffsetY=t.shadowOffsetY),gd(t,"textShadowColor")&&(e.textShadowColor=t.textShadowColor),gd(t,"textShadowBlur")&&(e.textShadowBlur=t.textShadowBlur),gd(t,"textShadowOffsetX")&&(e.textShadowOffsetX=t.textShadowOffsetX),gd(t,"textShadowOffsetY")&&(e.textShadowOffsetY=t.textShadowOffsetY))}var cY={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},uY=zu(cY),dY=(Nu(mg,(function(e,t){return e[t]=1,e}),{}),mg.join(", "),["","style","shape","extra"]),hY=jm();function pY(e,t,n,r,o){var i=e+"Animation",a=db(e,r,o)||{},s=hY(t).userDuring;return a.duration>0&&(a.during=s?Bu(bY,{el:t,userDuring:s}):null,a.setToFinal=!0,a.scope=e),Tu(a,n[i]),a}function fY(e,t,n,r){var o=(r=r||{}).dataIndex,i=r.isInit,a=r.clearStyle,s=n.isAnimationEnabled(),l=hY(e),c=t.style;l.userDuring=t.during;var u={},d={};if(function(e,t,n){for(var r=0;r<uY.length;r++){var o=uY[r],i=cY[o],a=t[o];a&&(n[i[0]]=a[0],n[i[1]]=a[1])}for(r=0;r<mg.length;r++){var s=mg[r];null!=t[s]&&(n[s]=t[s])}}(0,t,d),SY("shape",t,d),SY("extra",t,d),!i&&s&&(function(e,t,n){for(var r=t.transition,o=vY(r)?mg:xm(r||[]),i=0;i<o.length;i++){var a=o[i];if("style"!==a&&"shape"!==a&&"extra"!==a){var s=e[a];0,n[a]=s}}}(e,t,u),wY("shape",e,t,u),wY("extra",e,t,u),function(e,t,n,r){if(!n)return;var o,i=e.style;if(i){var a=n.transition,s=t.transition;if(a&&!vY(a)){var l=xm(a);!o&&(o=r.style={});for(var c=0;c<l.length;c++){var u=i[f=l[c]];o[f]=u}}else if(e.getAnimationStyleProps&&(vY(s)||vY(a)||ju(s,"style")>=0)){var d=e.getAnimationStyleProps(),h=d?d.style:null;if(h){!o&&(o=r.style={});var p=zu(n);for(c=0;c<p.length;c++){var f;if(h[f=p[c]]){u=i[f];o[f]=u}}}}}}(e,t,c,u)),d.style=c,function(e,t,n){var r=t.style;if(!e.isGroup&&r){if(n){e.useStyle({});for(var o=e.animators,i=0;i<o.length;i++){var a=o[i];"style"===a.targetName&&a.changeTarget(e.style)}}e.setStyle(r)}t&&(t.style=null,t&&e.attr(t),t.style=r)}(e,d,a),function(e,t){gd(t,"silent")&&(e.silent=t.silent),gd(t,"ignore")&&(e.ignore=t.ignore),e instanceof kv&&gd(t,"invisible")&&(e.invisible=t.invisible);e instanceof Ty&&gd(t,"autoBatch")&&(e.autoBatch=t.autoBatch)}(e,t),s)if(i){var h={};Ru(dY,(function(e){var n=e?t[e]:t;n&&n.enterFrom&&(e&&(h[e]=h[e]||{}),Tu(e?h[e]:h,n.enterFrom))}));var p=pY("enter",e,t,n,o);p.duration>0&&e.animateFrom(h,p)}else!function(e,t,n,r,o){if(o){var i=pY("update",e,t,r,n);i.duration>0&&e.animateFrom(o,i)}}(e,t,o||0,n,u);gY(e,t),c?e.dirty():e.markRedraw()}function gY(e,t){for(var n=hY(e).leaveToProps,r=0;r<dY.length;r++){var o=dY[r],i=o?t[o]:t;i&&i.leaveTo&&(n||(n=hY(e).leaveToProps={}),o&&(n[o]=n[o]||{}),Tu(o?n[o]:n,i.leaveTo))}}function mY(e,t,n,r){if(e){var o=e.parent,i=hY(e).leaveToProps;if(i){var a=pY("update",e,t,n,0);a.done=function(){o.remove(e),r&&r()},e.animateTo(i,a)}else o.remove(e),r&&r()}}function vY(e){return"all"===e}var yY={},xY={setTransform:function(e,t){return yY.el[e]=t,this},getTransform:function(e){return yY.el[e]},setShape:function(e,t){var n=yY.el;return(n.shape||(n.shape={}))[e]=t,n.dirtyShape&&n.dirtyShape(),this},getShape:function(e){var t=yY.el.shape;if(t)return t[e]},setStyle:function(e,t){var n=yY.el,r=n.style;return r&&(r[e]=t,n.dirtyStyle&&n.dirtyStyle()),this},getStyle:function(e){var t=yY.el.style;if(t)return t[e]},setExtra:function(e,t){return(yY.el.extra||(yY.el.extra={}))[e]=t,this},getExtra:function(e){var t=yY.el.extra;if(t)return t[e]}};function bY(){var e=this,t=e.el;if(t){var n=hY(t).userDuring,r=e.userDuring;n===r?(yY.el=t,r(xY)):e.el=e.userDuring=null}}function wY(e,t,n,r){var o=n[e];if(o){var i,a=t[e];if(a){var s=n.transition,l=o.transition;if(l)if(!i&&(i=r[e]={}),vY(l))Tu(i,a);else for(var c=xm(l),u=0;u<c.length;u++){var d=a[p=c[u]];i[p]=d}else if(vY(s)||ju(s,e)>=0){!i&&(i=r[e]={});var h=zu(a);for(u=0;u<h.length;u++){var p;d=a[p=h[u]];_Y(o[p],d)&&(i[p]=d)}}}}}function SY(e,t,n){var r=t[e];if(r)for(var o=n[e]={},i=zu(r),a=0;a<i.length;a++){var s=i[a];o[s]=Df(r[s])}}function _Y(e,t){return Lu(e)?e!==t:null!=e&&isFinite(e)}var AY=jm(),kY=["percent","easing","shape","style","extra"];function CY(e){e.stopAnimation("keyframe"),e.attr(AY(e))}function MY(e,t,n){if(n.isAnimationEnabled()&&t)if(Vu(t))Ru(t,(function(t){MY(e,t,n)}));else{var r=t.keyframes,o=t.duration;if(n&&null==o){var i=db("enter",n,0);o=i&&i.duration}if(r&&o){var a=AY(e);Ru(dY,(function(n){if(!n||e[n]){var i;r.sort((function(e,t){return e.percent-t.percent})),Ru(r,(function(r){var s=e.animators,l=n?r[n]:r;if(l){var c=zu(l);if(n||(c=Ou(c,(function(e){return ju(kY,e)<0}))),c.length){i||((i=e.animate(n,t.loop,!0)).scope="keyframe");for(var u=0;u<s.length;u++)s[u]!==i&&s[u].targetName===i.targetName&&s[u].stopTracks(c);n&&(a[n]=a[n]||{});var d=n?a[n]:a;Ru(c,(function(t){d[t]=((n?e[n]:e)||{})[t]})),i.whenWithKeys(o*r.percent,l,c,r.easing)}}})),i&&i.delay(t.delay||0).duration(o).start(t.easing)}}))}}}var IY="emphasis",TY="normal",DY="blur",jY="select",PY=[TY,IY,DY,jY],LY={normal:["itemStyle"],emphasis:[IY,"itemStyle"],blur:[DY,"itemStyle"],select:[jY,"itemStyle"]},RY={normal:["label"],emphasis:[IY,"label"],blur:[DY,"label"],select:[jY,"label"]},EY=["x","y"],NY="e\0\0",OY={normal:{},emphasis:{},blur:{},select:{}},zY={cartesian2d:function(e){var t=e.master.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:Bu(eY,e)}}},geo:function(e){var t=e.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:e.getZoom()},api:{coord:function(t){return e.dataToPoint(t)},size:Bu(tY,e)}}},single:function(e){var t=e.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:Bu(nY,e)}}},polar:function(e){var t=e.getRadiusAxis(),n=e.getAngleAxis(),r=t.getExtent();return r[0]>r[1]&&r.reverse(),{coordSys:{type:"polar",cx:e.cx,cy:e.cy,r:r[1],r0:r[0]},api:{coord:function(r){var o=t.dataToRadius(r[0]),i=n.dataToAngle(r[1]),a=e.coordToPoint([o,i]);return a.push(o,i*Math.PI/180),a},size:Bu(rY,e)}}},calendar:function(e){var t=e.getRect(),n=e.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(t,n){return e.dataToPoint(t,n)}}}}};function BY(e){return e instanceof Ty}function FY(e){return e instanceof kv}const VY=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.render=function(e,t,n,r){this._progressiveEls=null;var o=this._data,i=e.getData(),a=this.group,s=XY(e,i,t,n);o||a.removeAll(),i.diff(o).add((function(t){qY(n,null,t,s(t,r),e,a,i)})).remove((function(t){var n=o.getItemGraphicEl(t);n&&mY(n,QX(n).option,e)})).update((function(t,l){var c=o.getItemGraphicEl(l);qY(n,c,t,s(t,r),e,a,i)})).execute();var l=e.get("clip",!0)?DL(e.coordinateSystem,!1,e):null;l?a.setClipPath(l):a.removeClipPath(),this._data=i},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll(),this._data=null},t.prototype.incrementalRender=function(e,t,n,r,o){var i=t.getData(),a=XY(t,i,n,r),s=this._progressiveEls=[];function l(e){e.isGroup||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}for(var c=e.start;c<e.end;c++){var u=qY(null,null,c,a(c,o),t,this.group,i);u&&(u.traverse(l),s.push(u))}},t.prototype.eachRendered=function(e){nM(this._progressiveEls||this.group,e)},t.prototype.filterForExposedEvent=function(e,t,n,r){var o=t.element;if(null==o||n.name===o)return!0;for(;(n=n.__hostTarget||n.parent)&&n!==this.group;)if(n.name===o)return!0;return!1},t.type="custom",t}(dM);function WY(e){var t,n=e.type;if("path"===n){var r=e.shape,o=null!=r.width&&null!=r.height?{x:r.x||0,y:r.y||0,width:r.width,height:r.height}:null,i=oq(r);t=EC(i,null,o,r.layout||"center"),QX(t).customPathData=i}else if("image"===n)t=new Ny({}),QX(t).customImagePath=e.style.image;else if("text"===n)t=new ax({});else if("group"===n)t=new Fg;else{if("compoundPath"===n)throw new Error('"compoundPath" is not supported yet.');var a=RC(n);if(!a){0,X_("")}t=new a}return QX(t).customGraphicType=n,t.name=e.name,t.z2EmphasisLift=1,t.z2SelectLift=1,t}function HY(e,t,n,r,o,i,a){CY(t);var s=o&&o.normal.cfg;s&&t.setTextConfig(s),r&&null==r.transition&&(r.transition=EY);var l=r&&r.style;if(l){if("text"===t.type){var c=l;gd(c,"textFill")&&(c.fill=c.textFill),gd(c,"textStroke")&&(c.stroke=c.textStroke)}var u=void 0,d=BY(t)?l.decal:null;e&&d&&(d.dirty=!0,u=$I(d,e)),l.__decalPattern=u}FY(t)&&(l&&(u=l.__decalPattern)&&(l.decal=u));fY(t,r,i,{dataIndex:n,isInit:a,clearStyle:!0}),MY(t,r.keyframeAnimation,i)}function GY(e,t,n,r,o){var i=t.isGroup?null:t,a=o&&o[e].cfg;if(i){var s=i.ensureState(e);if(!1===r){var l=i.getState(e);l&&(l.style=null)}else s.style=r||null;a&&(s.textConfig=a),zx(i)}}function UY(e,t,n){var r=n===TY,o=r?t:QY(t,n),i=o?o.z2:null;null!=i&&((r?e:e.ensureState(n)).z2=i||0)}function XY(e,t,n,r){var o=e.get("renderItem"),i=e.coordinateSystem,a={};i&&(a=i.prepareCustoms?i.prepareCustoms(i):zY[i.type](i));for(var s,l,c=Du({getWidth:r.getWidth,getHeight:r.getHeight,getZr:r.getZr,getDevicePixelRatio:r.getDevicePixelRatio,value:function(e,n){return null==n&&(n=s),t.getStore().get(t.getDimensionIndex(e||0),n)},style:function(n,r){0;null==r&&(r=s);var o=t.getItemVisual(r,"style"),i=o&&o.fill,a=o&&o.opacity,l=y(r,TY).getItemStyle();null!=i&&(l.fill=i),null!=a&&(l.opacity=a);var c={inheritColor:Hu(i)?i:"#000"},u=x(r,TY),d=kb(u,null,c,!1,!0);d.text=u.getShallow("show")?Ju(e.getFormattedLabel(r,TY),aL(t,r)):null;var h=Cb(u,c,!1);return w(n,l),l=sY(l,d,h),n&&b(l,n),l.legacy=!0,l},ordinalRawValue:function(e,n){null==n&&(n=s),e=e||0;var r=t.getDimensionInfo(e);if(!r){var o=t.getDimensionIndex(e);return o>=0?t.getStore().get(o,n):void 0}var i=t.get(r.name,n),a=r&&r.ordinalMeta;return a?a.categories[i]:i},styleEmphasis:function(n,r){0;null==r&&(r=s);var o=y(r,IY).getItemStyle(),i=x(r,IY),a=kb(i,null,null,!0,!0);a.text=i.getShallow("show")?ed(e.getFormattedLabel(r,IY),e.getFormattedLabel(r,TY),aL(t,r)):null;var l=Cb(i,null,!0);return w(n,o),o=sY(o,a,l),n&&b(o,n),o.legacy=!0,o},visual:function(e,n){if(null==n&&(n=s),gd(KX,e)){var r=t.getItemVisual(n,"style");return r?r[KX[e]]:null}if(gd($X,e))return t.getItemVisual(n,e)},barLayout:function(e){if("cartesian2d"===i.type){return function(e){var t=[],n=e.axis,r="axis0";if("category"===n.type){for(var o=n.getBandWidth(),i=0;i<e.count;i++)t.push(Du({bandWidth:o,axisKey:r,stackId:qL+i},e));var a=JL(t),s=[];for(i=0;i<e.count;i++){var l=a[r][qL+i];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}(Du({axis:i.getBaseAxis()},e))}},currentSeriesIndices:function(){return n.getCurrentSeriesIndices()},font:function(e){return jb(e,n)}},a.api||{}),u={context:{},seriesId:e.id,seriesName:e.name,seriesIndex:e.seriesIndex,coordSys:a.coordSys,dataInsideLength:t.count(),encode:YY(e.getData())},d={},h={},p={},f={},g=0;g<PY.length;g++){var m=PY[g];p[m]=e.getModel(LY[m]),f[m]=e.getModel(RY[m])}function v(e){return e===s?l||(l=t.getItemModel(e)):t.getItemModel(e)}function y(e,n){return t.hasItemOption?e===s?d[n]||(d[n]=v(e).getModel(LY[n])):v(e).getModel(LY[n]):p[n]}function x(e,n){return t.hasItemOption?e===s?h[n]||(h[n]=v(e).getModel(RY[n])):v(e).getModel(RY[n]):f[n]}return function(e,n){return s=e,l=null,d={},h={},o&&o(Du({dataIndexInside:e,dataIndex:t.getRawIndex(e),actionType:n?n.type:null},u),c)};function b(e,t){for(var n in t)gd(t,n)&&(e[n]=t[n])}function w(e,t){e&&(e.textFill&&(t.textFill=e.textFill),e.textPosition&&(t.textPosition=e.textPosition))}}function YY(e){var t={};return Ru(e.dimensions,(function(n){var r=e.getDimensionInfo(n);if(!r.isExtraCoord){var o=r.coordDim;(t[o]=t[o]||[])[r.coordDimIndex]=e.getDimensionIndex(n)}})),t}function qY(e,t,n,r,o,i,a){if(r){var s=ZY(e,t,n,r,o,i);return s&&a.setItemGraphicEl(n,s),s&&tb(s,r.focus,r.blurScope,r.emphasisDisabled),s}i.remove(t)}function ZY(e,t,n,r,o,i){var a=-1,s=t;t&&KY(t,r,o)&&(a=ju(i.childrenRef(),t),t=null);var l,c,u=!t,d=t;d?d.clearStates():(d=WY(r),s&&(l=s,(c=d).copyTransform(l),FY(c)&&FY(l)&&(c.setStyle(l.style),c.z=l.z,c.z2=l.z2,c.zlevel=l.zlevel,c.invisible=l.invisible,c.ignore=l.ignore,BY(c)&&BY(l)&&c.setShape(l.shape)))),!1===r.morph?d.disableMorphing=!0:d.disableMorphing&&(d.disableMorphing=!1),OY.normal.cfg=OY.normal.conOpt=OY.emphasis.cfg=OY.emphasis.conOpt=OY.blur.cfg=OY.blur.conOpt=OY.select.cfg=OY.select.conOpt=null,OY.isLegacy=!1,function(e,t,n,r,o,i){if(e.isGroup)return;$Y(n,null,i),$Y(n,IY,i);var a=i.normal.conOpt,s=i.emphasis.conOpt,l=i.blur.conOpt,c=i.select.conOpt;if(null!=a||null!=s||null!=c||null!=l){var u=e.getTextContent();if(!1===a)u&&e.removeTextContent();else{a=i.normal.conOpt=a||{type:"text"},u?u.clearStates():(u=WY(a),e.setTextContent(u)),HY(null,u,t,a,null,r,o);for(var d=a&&a.style,h=0;h<PY.length;h++){var p=PY[h];if(p!==TY){var f=i[p].conOpt;GY(p,u,0,JY(a,f,p),null)}}d?u.dirty():u.markRedraw()}}}(d,n,r,o,u,OY),function(e,t,n,r,o){var i=n.clipPath;if(!1===i)e&&e.getClipPath()&&e.removeClipPath();else if(i){var a=e.getClipPath();a&&KY(a,i,r)&&(a=null),a||(a=WY(i),e.setClipPath(a)),HY(null,a,t,i,null,r,o)}}(d,n,r,o,u),HY(e,d,n,r,OY,o,u),gd(r,"info")&&(QX(d).info=r.info);for(var h=0;h<PY.length;h++){var p=PY[h];if(p!==TY){var f=QY(r,p);GY(p,d,0,JY(r,f,p),OY)}}return function(e,t,n){if(!e.isGroup){var r=e,o=n.currentZ,i=n.currentZLevel;r.z=o,r.zlevel=i;var a=t.z2;null!=a&&(r.z2=a||0);for(var s=0;s<PY.length;s++)UY(r,t,PY[s])}}(d,r,o),"group"===r.type&&function(e,t,n,r,o){var i=r.children,a=i?i.length:0,s=r.$mergeChildren,l="byName"===s||r.diffChildrenByName,c=!1===s;if(!a&&!l&&!c)return;if(l)return u={api:e,oldChildren:t.children()||[],newChildren:i||[],dataIndex:n,seriesModel:o,group:t},void new _P(u.oldChildren,u.newChildren,tq,tq,u).add(nq).update(nq).remove(rq).execute();var u;c&&t.removeAll();for(var d=0;d<a;d++){var h=i[d],p=t.childAt(d);h?(null==h.ignore&&(h.ignore=!1),ZY(e,p,n,h,o,t)):p.ignore=!0}for(var f=t.childCount()-1;f>=d;f--){var g=t.childAt(f);eq(t,g,o)}}(e,d,n,r,o),a>=0?i.replaceAt(d,a):i.add(d),d}function KY(e,t,n){var r,o=QX(e),i=t.type,a=t.shape,s=t.style;return n.isUniversalTransitionEnabled()||null!=i&&i!==o.customGraphicType||"path"===i&&((r=a)&&(gd(r,"pathData")||gd(r,"d")))&&oq(a)!==o.customPathData||"image"===i&&gd(s,"image")&&s.image!==o.customImagePath}function $Y(e,t,n){var r=t?QY(e,t):e,o=t?JY(e,r,IY):e.style,i=e.type,a=r?r.textConfig:null,s=e.textContent,l=s?t?QY(s,t):s:null;if(o&&(n.isLegacy||oY(o,i,!!a,!!l))){n.isLegacy=!0;var c=iY(o,i,!t);!a&&c.textConfig&&(a=c.textConfig),!l&&c.textContent&&(l=c.textContent)}if(!t&&l){var u=l;!u.type&&(u.type="text")}var d=t?n[t]:n.normal;d.cfg=a,d.conOpt=l}function QY(e,t){return t?e?e[t]:null:e}function JY(e,t,n){var r=t&&t.style;return null==r&&n===IY&&e&&(r=e.styleEmphasis),r}function eq(e,t,n){t&&mY(t,QX(e).option,n)}function tq(e,t){var n=e&&e.name;return null!=n?n:NY+t}function nq(e,t){var n=this.context,r=null!=e?n.newChildren[e]:null,o=null!=t?n.oldChildren[t]:null;ZY(n.api,o,n.dataIndex,r,n.seriesModel,n.group)}function rq(e){var t=this.context,n=t.oldChildren[e];n&&mY(n,QX(n).option,t.seriesModel)}function oq(e){return e&&(e.pathData||e.d)}var iq=jm(),aq=Cu,sq=Bu,lq=function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(e,t,n,r){var o=t.get("value"),i=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,r||this._lastValue!==o||this._lastStatus!==i){this._lastValue=o,this._lastStatus=i;var a=this._group,s=this._handle;if(!i||"hide"===i)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var l={};this.makeElOption(l,o,e,t,n);var c=l.graphicKey;c!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=c;var u=this._moveAnimation=this.determineAnimation(e,t);if(a){var d=Fu(cq,t,u);this.updatePointerEl(a,l,d),this.updateLabelEl(a,l,d,t)}else a=this._group=new Fg,this.createPointerEl(a,l,e,t),this.createLabelEl(a,l,e,t),n.getZr().add(a);pq(a,t,!0),this._renderHandle(o)}},t.prototype.remove=function(e){this.clear(e)},t.prototype.dispose=function(e){this.clear(e)},t.prototype.determineAnimation=function(e,t){var n=t.get("animation"),r=e.axis,o="category"===r.type,i=t.get("snap");if(!i&&!o)return!1;if("auto"===n||null==n){var a=this.animationThreshold;if(o&&r.getBandWidth()>a)return!0;if(i){var s=QN(e).seriesDataCount,l=r.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},t.prototype.makeElOption=function(e,t,n,r,o){},t.prototype.createPointerEl=function(t,n,r,o){var i=n.pointer;if(i){var a=iq(t).pointerEl=new e[i.type](aq(n.pointer));t.add(a)}},t.prototype.createLabelEl=function(e,t,n,r){if(t.label){var o=iq(e).labelEl=new ax(aq(t.label));e.add(o),dq(o,r)}},t.prototype.updatePointerEl=function(e,t,n){var r=iq(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},t.prototype.updateLabelEl=function(e,t,n,r){var o=iq(e).labelEl;o&&(o.setStyle(t.label.style),n(o,{x:t.label.x,y:t.label.y}),dq(o,r))},t.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t,n=this._axisPointerModel,r=this._api.getZr(),o=this._handle,i=n.getModel("handle"),a=n.get("status");if(!i.get("show")||!a||"hide"===a)return o&&r.remove(o),void(this._handle=null);this._handle||(t=!0,o=this._handle=KC(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(e){sh(e.event)},onmousedown:sq(this._onHandleDragMove,this,0,0),drift:sq(this._onHandleDragMove,this),ondragend:sq(this._onHandleDragEnd,this)}),r.add(o)),pq(o,n,!1),o.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=i.get("size");Vu(s)||(s=[s,s]),o.scaleX=s[0]/2,o.scaleY=s[1]/2,mM(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,t)}},t.prototype._moveHandleToValue=function(e,t){cq(this._axisPointerModel,!t&&this._moveAnimation,this._handle,hq(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(hq(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(hq(r)),iq(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),vM(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(e,t,n){return{x:e[n=n||0],y:e[1-n],width:t[n],height:t[1-n]}},t}();function cq(e,t,n,r){uq(iq(n).lastProp,r)||(iq(n).lastProp=r,t?pb(n,r,e):(n.stopAnimation(),n.attr(r)))}function uq(e,t){if(Xu(e)&&Xu(t)){var n=!0;return Ru(t,(function(t,r){n=n&&uq(e[r],t)})),!!n}return e===t}function dq(e,t){e[t.get(["label","show"])?"show":"hide"]()}function hq(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function pq(e,t,n){var r=t.get("z"),o=t.get("zlevel");e&&e.traverse((function(e){"group"!==e.type&&(null!=r&&(e.z=r),null!=o&&(e.zlevel=o),e.silent=n)}))}const fq=lq;function gq(e){var t,n=e.get("type"),r=e.getModel(n+"Style");return"line"===n?(t=r.getLineStyle()).fill=null:"shadow"===n&&((t=r.getAreaStyle()).stroke=null),t}function mq(e,t,n,r,o){var i=vq(n.get("value"),t.axis,t.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),a=n.getModel("label"),s=Ow(a.get("padding")||0),l=a.getFont(),c=Sg(i,l),u=o.position,d=c.width+s[1]+s[3],h=c.height+s[0]+s[2],p=o.align;"right"===p&&(u[0]-=d),"center"===p&&(u[0]-=d/2);var f=o.verticalAlign;"bottom"===f&&(u[1]-=h),"middle"===f&&(u[1]-=h/2),function(e,t,n,r){var o=r.getWidth(),i=r.getHeight();e[0]=Math.min(e[0]+t,o)-t,e[1]=Math.min(e[1]+n,i)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}(u,d,h,r);var g=a.get("backgroundColor");g&&"auto"!==g||(g=t.get(["axisLine","lineStyle","color"])),e.label={x:u[0],y:u[1],style:kb(a,{text:i,font:l,fill:a.getTextColor(),padding:s,backgroundColor:g}),z2:10}}function vq(e,t,n,r,o){e=t.scale.parse(e);var i=t.scale.getLabel({value:e},{precision:o.precision}),a=o.formatter;if(a){var s={value:aN(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};Ru(r,(function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,o=t&&t.getDataParams(r);o&&s.seriesData.push(o)})),Hu(a)?i=a.replace("{value}",i):Wu(a)&&(i=a(s))}return i}function yq(e,t,n){var r=[1,0,0,1,0,0];return mh(r,r,n.rotation),gh(r,r,n.position),GC([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function xq(e,t,n,r,o,i){var a=ZN.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=o.get(["label","margin"]),mq(t,r,o,i,{position:yq(r.axis,e,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function bq(e,t,n){return{x1:e[n=n||0],y1:e[1-n],x2:t[n],y2:t[1-n]}}function wq(e,t,n){return{x:e[n=n||0],y:e[1-n],width:t[n],height:t[1-n]}}function Sq(e,t,n,r,o,i){return{cx:e,cy:t,r0:n,r:r,startAngle:o,endAngle:i,clockwise:!0}}var _q=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ru(t,e),t.prototype.makeElOption=function(e,t,n,r,o){var i=n.axis,a=i.grid,s=r.get("type"),l=Aq(a,i).getOtherAxis(i).getGlobalExtent(),c=i.toGlobalCoord(i.dataToCoord(t,!0));if(s&&"none"!==s){var u=gq(r),d=kq[s](i,c,l);d.style=u,e.graphicKey=d.type,e.pointer=d}xq(t,e,PN(a.model,n),n,r,o)},t.prototype.getHandleTransform=function(e,t,n){var r=PN(t.axis.grid.model,t,{labelInside:!1});r.labelMargin=n.get(["handle","margin"]);var o=yq(t.axis,e,r);return{x:o[0],y:o[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var o=n.axis,i=o.grid,a=o.getGlobalExtent(!0),s=Aq(i,o).getOtherAxis(o).getGlobalExtent(),l="x"===o.dim?0:1,c=[e.x,e.y];c[l]+=t[l],c[l]=Math.min(a[1],c[l]),c[l]=Math.max(a[0],c[l]);var u=(s[1]+s[0])/2,d=[u,u];d[l]=c[l];return{x:c[0],y:c[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},t}(fq);function Aq(e,t){var n={};return n[t.dim+"AxisIndex"]=t.index,e.getCartesian(n)}var kq={line:function(e,t,n){return{type:"Line",subPixelOptimize:!0,shape:bq([t,n[0]],[t,n[1]],Cq(e))}},shadow:function(e,t,n){var r=Math.max(1,e.getBandWidth()),o=n[1]-n[0];return{type:"Rect",shape:wq([t-r/2,n[0]],[r,o],Cq(e))}}};function Cq(e){return"x"===e.dim?0:1}const Mq=_q;const Iq=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},t}(rS);var Tq=jm(),Dq=Ru;function jq(e,t,n){if(!au.node){var r=t.getZr();Tq(r).records||(Tq(r).records={}),function(e,t){if(Tq(e).initialized)return;function n(n,r){e.on(n,(function(n){var o=function(e){var t={showTip:[],hideTip:[]},n=function(r){var o=t[r.type];o?o.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}(t);Dq(Tq(e).records,(function(e){e&&r(e,n,o.dispatchAction)})),function(e,t){var n,r=e.showTip.length,o=e.hideTip.length;r?n=e.showTip[r-1]:o&&(n=e.hideTip[o-1]);n&&(n.dispatchAction=null,t.dispatchAction(n))}(o.pendings,t)}))}Tq(e).initialized=!0,n("click",Fu(Lq,"click")),n("mousemove",Fu(Lq,"mousemove")),n("globalout",Pq)}(r,t),(Tq(r).records[e]||(Tq(r).records[e]={})).handler=n}}function Pq(e,t,n){e.handler("leave",null,n)}function Lq(e,t,n,r){t.handler(e,n,r)}function Rq(e,t){if(!au.node){var n=t.getZr();(Tq(n).records||{})[e]&&(Tq(n).records[e]=null)}}var Eq=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.render=function(e,t,n){var r=t.getComponent("tooltip"),o=e.get("triggerOn")||r&&r.get("triggerOn")||"mousemove|click";jq("axisPointer",n,(function(e,t,n){"none"!==o&&("leave"===e||o.indexOf(e)>=0)&&n({type:"updateAxisPointer",currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})}))},t.prototype.remove=function(e,t){Rq("axisPointer",t)},t.prototype.dispose=function(e,t){Rq("axisPointer",t)},t.type="axisPointer",t}(tk);const Nq=Eq;function Oq(e,t){var n,r=[],o=e.seriesIndex;if(null==o||!(n=t.getSeriesByIndex(o)))return{point:[]};var i=n.getData(),a=Dm(i,e);if(null==a||a<0||Vu(a))return{point:[]};var s=i.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)r=n.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)if(e.isStacked){var c=l.getBaseAxis(),u=l.getOtherAxis(c).dim,d=c.dim,h="x"===u||"radius"===u?1:0,p=i.mapDimension(d),f=[];f[h]=i.get(p,a),f[1-h]=i.get(i.getCalculationInfo("stackResultDimension"),a),r=l.dataToPoint(f)||[]}else r=l.dataToPoint(i.getValues(Eu(l.dimensions,(function(e){return i.mapDimension(e)})),a))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),r=[g.x+g.width/2,g.y+g.height/2]}return{point:r,el:s}}var zq=jm();function Bq(e,t,n){var r=e.currTrigger,o=[e.x,e.y],i=e,a=e.dispatchAction||Bu(n.dispatchAction,n),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){Gq(o)&&(o=Oq({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},t).point);var l=Gq(o),c=i.axesInfo,u=s.axesInfo,d="leave"===r||Gq(o),h={},p={},f={list:[],map:{}},g={showPointer:Fu(Vq,p),showTooltip:Fu(Wq,f)};Ru(s.coordSysMap,(function(e,t){var n=l||e.containPoint(o);Ru(s.coordSysAxesInfo[t],(function(e,t){var r=e.axis,i=function(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}(c,e);if(!d&&n&&(!c||i)){var a=i&&i.value;null!=a||l||(a=r.pointToData(o)),null!=a&&Fq(e,a,g,!1,h)}}))}));var m={};return Ru(u,(function(e,t){var n=e.linkGroup;n&&!p[t]&&Ru(n.axesInfo,(function(t,r){var o=p[r];if(t!==e&&o){var i=o.value;n.mapper&&(i=e.axis.scale.parse(n.mapper(i,Hq(t),Hq(e)))),m[e.key]=i}}))})),Ru(m,(function(e,t){Fq(u[t],e,g,!0,h)})),function(e,t,n){var r=n.axesInfo=[];Ru(t,(function(t,n){var o=t.axisPointerModel.option,i=e[n];i?(!t.useHandle&&(o.status="show"),o.value=i.value,o.seriesDataIndices=(i.payloadBatch||[]).slice()):!t.useHandle&&(o.status="hide"),"show"===o.status&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:o.value})}))}(p,u,h),function(e,t,n,r){if(Gq(t)||!e.list.length)return void r({type:"hideTip"});var o=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:o.dataIndexInside,dataIndex:o.dataIndex,seriesIndex:o.seriesIndex,dataByCoordSys:e.list})}(f,o,e,a),function(e,t,n){var r=n.getZr(),o="axisPointerLastHighlights",i=zq(r)[o]||{},a=zq(r)[o]={};Ru(e,(function(e,t){var n=e.axisPointerModel.option;"show"===n.status&&e.triggerEmphasis&&Ru(n.seriesDataIndices,(function(e){var t=e.seriesIndex+" | "+e.dataIndex;a[t]=e}))}));var s=[],l=[];Ru(i,(function(e,t){!a[t]&&l.push(e)})),Ru(a,(function(e,t){!i[t]&&s.push(e)})),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}(u,0,n),h}}function Fq(e,t,n,r,o){var i=e.axis;if(!i.scale.isBlank()&&i.containData(t))if(e.involveSeries){var a=function(e,t){var n=t.axis,r=n.dim,o=e,i=[],a=Number.MAX_VALUE,s=-1;return Ru(t.seriesModels,(function(t,l){var c,u,d=t.getData().mapDimensionsAll(r);if(t.getAxisTooltipData){var h=t.getAxisTooltipData(d,e,n);u=h.dataIndices,c=h.nestestValue}else{if(!(u=t.getData().indicesOfNearest(d[0],e,"category"===n.type?.5:null)).length)return;c=t.getData().get(d[0],u[0])}if(null!=c&&isFinite(c)){var p=e-c,f=Math.abs(p);f<=a&&((f<a||p>=0&&s<0)&&(a=f,s=p,o=c,i.length=0),Ru(u,(function(e){i.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})})))}})),{payloadBatch:i,snapToValue:o}}(t,e),s=a.payloadBatch,l=a.snapToValue;s[0]&&null==o.seriesIndex&&Tu(o,s[0]),!r&&e.snap&&i.containData(l)&&null!=l&&(t=l),n.showPointer(e,t,s),n.showTooltip(e,a,l)}else n.showPointer(e,t)}function Vq(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function Wq(e,t,n,r){var o=n.payloadBatch,i=t.axis,a=i.model,s=t.axisPointerModel;if(t.triggerTooltip&&o.length){var l=t.coordSys.model,c=eO(l),u=e.map[c];u||(u=e.map[c]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},e.list.push(u)),u.dataByAxis.push({axisDim:i.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:r,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:o.slice()})}}function Hq(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+"AxisIndex"]=t.componentIndex,n.axisName=n[r+"AxisName"]=t.name,n.axisId=n[r+"AxisId"]=t.id,n}function Gq(e){return!e||null==e[0]||isNaN(e[0])||null==e[1]||isNaN(e[1])}function Uq(e){rO.registerAxisPointerClass("CartesianAxisPointer",Mq),e.registerComponentModel(Iq),e.registerComponentView(Nq),e.registerPreprocessor((function(e){if(e){(!e.axisPointer||0===e.axisPointer.length)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!Vu(t)&&(e.axisPointer.link=[t])}})),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,(function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=KN(e,t)})),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},Bq)}var Xq=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ru(t,e),t.prototype.makeElOption=function(e,t,n,r,o){var i=n.axis;"angle"===i.dim&&(this.animationThreshold=Math.PI/18);var a=i.polar,s=a.getOtherAxis(i).getExtent(),l=i.dataToCoord(t),c=r.get("type");if(c&&"none"!==c){var u=gq(r),d=Yq[c](i,a,l,s);d.style=u,e.graphicKey=d.type,e.pointer=d}var h=function(e,t,n,r,o){var i=t.axis,a=i.dataToCoord(e),s=r.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,c,u,d=r.getRadiusAxis().getExtent();if("radius"===i.dim){var h=[1,0,0,1,0,0];mh(h,h,s),gh(h,h,[r.cx,r.cy]),l=GC([a,-o],h);var p=t.getModel("axisLabel").get("rotate")||0,f=ZN.innerTextLayout(s,p*Math.PI/180,-1);c=f.textAlign,u=f.textVerticalAlign}else{var g=d[1];l=r.coordToPoint([g+o,a]);var m=r.cx,v=r.cy;c=Math.abs(l[0]-m)/g<.3?"center":l[0]>m?"left":"right",u=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:c,verticalAlign:u}}(t,n,0,a,r.get(["label","margin"]));mq(e,n,r,o,h)},t}(fq);var Yq={line:function(e,t,n,r){return"angle"===e.dim?{type:"Line",shape:bq(t.coordToPoint([r[0],n]),t.coordToPoint([r[1],n]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r:n}}},shadow:function(e,t,n,r){var o=Math.max(1,e.getBandWidth()),i=Math.PI/180;return"angle"===e.dim?{type:"Sector",shape:Sq(t.cx,t.cy,r[0],r[1],(-n-o/2)*i,(o/2-n)*i)}:{type:"Sector",shape:Sq(t.cx,t.cy,n-o/2,n+o/2,0,2*Math.PI)}}};const qq=Xq;const Zq=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.findAxisModel=function(e){var t;return this.ecModel.eachComponent(e,(function(e){e.getCoordSysModel()===this&&(t=e)}),this),t},t.type="polar",t.dependencies=["radiusAxis","angleAxis"],t.defaultOption={z:0,center:["50%","50%"],radius:"80%"},t}(rS);var Kq=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ru(t,e),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Em).models[0]},t.type="polarAxis",t}(rS);Pu(Kq,oE);var $q=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.type="angleAxis",t}(Kq),Qq=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.type="radiusAxis",t}(Kq),Jq=function(e){function t(t,n){return e.call(this,"radius",t,n)||this}return ru(t,e),t.prototype.pointToData=function(e,t){return this.polar.pointToData(e,t)["radius"===this.dim?0:1]},t}(TN);Jq.prototype.dataToRadius=TN.prototype.dataToCoord,Jq.prototype.radiusToData=TN.prototype.coordToData;const eZ=Jq;var tZ=jm(),nZ=function(e){function t(t,n){return e.call(this,"angle",t,n||[0,360])||this}return ru(t,e),t.prototype.pointToData=function(e,t){return this.polar.pointToData(e,t)["radius"===this.dim?0:1]},t.prototype.calculateCategoryInterval=function(){var e=this,t=e.getLabelModel(),n=e.scale,r=n.getExtent(),o=n.count();if(r[1]-r[0]<1)return 0;var i=r[0],a=e.dataToCoord(i+1)-e.dataToCoord(i),s=Math.abs(a),l=Sg(null==i?"":i+"",t.getFont(),"center","top"),c=Math.max(l.height,7)/s;isNaN(c)&&(c=1/0);var u=Math.max(0,Math.floor(c)),d=tZ(e.model),h=d.lastAutoInterval,p=d.lastTickCount;return null!=h&&null!=p&&Math.abs(h-u)<=1&&Math.abs(p-o)<=1&&h>u?u=h:(d.lastTickCount=o,d.lastAutoInterval=u),u},t}(TN);nZ.prototype.dataToAngle=TN.prototype.dataToCoord,nZ.prototype.angleToData=TN.prototype.coordToData;const rZ=nZ;var oZ=["radius","angle"],iZ=function(){function e(e){this.dimensions=oZ,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new eZ,this._angleAxis=new rZ,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return e.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},e.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},e.prototype.getAxis=function(e){return this["_"+e+"Axis"]},e.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},e.prototype.getAxesByScale=function(e){var t=[],n=this._angleAxis,r=this._radiusAxis;return n.scale.type===e&&t.push(n),r.scale.type===e&&t.push(r),t},e.prototype.getAngleAxis=function(){return this._angleAxis},e.prototype.getRadiusAxis=function(){return this._radiusAxis},e.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},e.prototype.getTooltipAxes=function(e){var t=null!=e&&"auto"!==e?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},e.prototype.dataToPoint=function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},e.prototype.pointToData=function(e,t){var n=this.pointToCoord(e);return[this._radiusAxis.radiusToData(n[0],t),this._angleAxis.angleToData(n[1],t)]},e.prototype.pointToCoord=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,r=this.getAngleAxis(),o=r.getExtent(),i=Math.min(o[0],o[1]),a=Math.max(o[0],o[1]);r.inverse?i=a-360:a=i+360;var s=Math.sqrt(t*t+n*n);t/=s,n/=s;for(var l=Math.atan2(-n,t)/Math.PI*180,c=l<i?1:-1;l<i||l>a;)l+=360*c;return[s,l]},e.prototype.coordToPoint=function(e){var t=e[0],n=e[1]/180*Math.PI;return[Math.cos(n)*t+this.cx,-Math.sin(n)*t+this.cy]},e.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis().getExtent().slice();t[0]>t[1]&&t.reverse();var n=e.getExtent(),r=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:t[0],r:t[1],startAngle:-n[0]*r,endAngle:-n[1]*r,clockwise:e.inverse,contain:function(e,t){var n=e-this.cx,r=t-this.cy,o=n*n+r*r-1e-4,i=this.r,a=this.r0;return o<=i*i&&o>=a*a}}},e.prototype.convertToPixel=function(e,t,n){return aZ(t)===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(e,t,n){return aZ(t)===this?this.pointToData(n):null},e}();function aZ(e){var t=e.seriesModel,n=e.polarModel;return n&&n.coordinateSystem||t&&t.coordinateSystem}const sZ=iZ;function lZ(e,t){var n=this,r=n.getAngleAxis(),o=n.getRadiusAxis();if(r.scale.setExtent(1/0,-1/0),o.scale.setExtent(1/0,-1/0),e.eachSeries((function(e){if(e.coordinateSystem===n){var t=e.getData();Ru(uN(t,"radius"),(function(e){o.scale.unionExtentFromData(t,e)})),Ru(uN(t,"angle"),(function(e){r.scale.unionExtentFromData(t,e)}))}})),rN(r.scale,r.model),rN(o.scale,o.model),"category"===r.type&&!r.onBand){var i=r.getExtent(),a=360/r.scale.count();r.inverse?i[1]+=a:i[1]-=a,r.setExtent(i[0],i[1])}}function cZ(e,t){var n;if(e.type=t.get("type"),e.scale=oN(t),e.onBand=t.get("boundaryGap")&&"category"===e.type,e.inverse=t.get("inverse"),function(e){return"angleAxis"===e.mainType}(t)){e.inverse=e.inverse!==t.get("clockwise");var r=t.get("startAngle"),o=null!==(n=t.get("endAngle"))&&void 0!==n?n:r+(e.inverse?-360:360);e.setExtent(r,o)}t.axis=e,e.model=t}var uZ={dimensions:oZ,create:function(e,t){var n=[];return e.eachComponent("polar",(function(e,r){var o=new sZ(r+"");o.update=lZ;var i=o.getRadiusAxis(),a=o.getAngleAxis(),s=e.findAxisModel("radiusAxis"),l=e.findAxisModel("angleAxis");cZ(i,s),cZ(a,l),function(e,t,n){var r=t.get("center"),o=n.getWidth(),i=n.getHeight();e.cx=Zg(r[0],o),e.cy=Zg(r[1],i);var a=e.getRadiusAxis(),s=Math.min(o,i)/2,l=t.get("radius");null==l?l=[0,"100%"]:Vu(l)||(l=[0,l]);var c=[Zg(l[0],s),Zg(l[1],s)];a.inverse?a.setExtent(c[1],c[0]):a.setExtent(c[0],c[1])}(o,e,t),n.push(o),e.coordinateSystem=o,o.model=e})),e.eachSeries((function(e){if("polar"===e.get("coordinateSystem")){var t=e.getReferringComponents("polar",Em).models[0];0,e.coordinateSystem=t.coordinateSystem}})),n}};const dZ=uZ;var hZ=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function pZ(e,t,n){t[1]>t[0]&&(t=t.slice().reverse());var r=e.coordToPoint([t[0],n]),o=e.coordToPoint([t[1],n]);return{x1:r[0],y1:r[1],x2:o[0],y2:o[1]}}function fZ(e){return e.getRadiusAxis().inverse?0:1}function gZ(e){var t=e[0],n=e[e.length-1];t&&n&&Math.abs(Math.abs(t.coord-n.coord)-360)<1e-4&&e.pop()}var mZ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="PolarAxisPointer",n}return ru(t,e),t.prototype.render=function(e,t){if(this.group.removeAll(),e.get("show")){var n=e.axis,r=n.polar,o=r.getRadiusAxis().getExtent(),i=n.getTicksCoords(),a=n.getMinorTicksCoords(),s=Eu(n.getViewLabels(),(function(e){e=Cu(e);var t=n.scale,r="ordinal"===t.type?t.getRawOrdinalNumber(e.tickValue):e.tickValue;return e.coord=n.dataToCoord(r),e}));gZ(s),gZ(i),Ru(hZ,(function(t){!e.get([t,"show"])||n.scale.isBlank()&&"axisLine"!==t||vZ[t](this.group,e,r,i,a,o,s)}),this)}},t.type="angleAxis",t}(rO),vZ={axisLine:function(t,n,r,o,i,a){var s,l=n.getModel(["axisLine","lineStyle"]),c=r.getAngleAxis(),u=Math.PI/180,d=c.getExtent(),h=fZ(r),p=h?0:1,f=360===Math.abs(d[1]-d[0])?"Circle":"Arc";(s=0===a[p]?new e[f]({shape:{cx:r.cx,cy:r.cy,r:a[h],startAngle:-d[0]*u,endAngle:-d[1]*u,clockwise:c.inverse},style:l.getLineStyle(),z2:1,silent:!0}):new Yk({shape:{cx:r.cx,cy:r.cy,r:a[h],r0:a[p]},style:l.getLineStyle(),z2:1,silent:!0})).style.fill=null,t.add(s)},axisTick:function(e,t,n,r,o,i){var a=t.getModel("axisTick"),s=(a.get("inside")?-1:1)*a.get("length"),l=i[fZ(n)],c=Eu(r,(function(e){return new oC({shape:pZ(n,[l,l+s],e.coord)})}));e.add(zC(c,{style:Du(a.getModel("lineStyle").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})}))},minorTick:function(e,t,n,r,o,i){if(o.length){for(var a=t.getModel("axisTick"),s=t.getModel("minorTick"),l=(a.get("inside")?-1:1)*s.get("length"),c=i[fZ(n)],u=[],d=0;d<o.length;d++)for(var h=0;h<o[d].length;h++)u.push(new oC({shape:pZ(n,[c,c+l],o[d][h].coord)}));e.add(zC(u,{style:Du(s.getModel("lineStyle").getLineStyle(),Du(a.getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(e,t,n,r,o,i,a){var s=t.getCategories(!0),l=t.getModel("axisLabel"),c=l.get("margin"),u=t.get("triggerEvent");Ru(a,(function(r,o){var a=l,d=r.tickValue,h=i[fZ(n)],p=n.coordToPoint([h+c,r.coord]),f=n.cx,g=n.cy,m=Math.abs(p[0]-f)/h<.3?"center":p[0]>f?"left":"right",v=Math.abs(p[1]-g)/h<.3?"middle":p[1]>g?"top":"bottom";if(s&&s[d]){var y=s[d];Xu(y)&&y.textStyle&&(a=new Yb(y.textStyle,l,l.ecModel))}var x=new ax({silent:ZN.isLabelSilent(t),style:kb(a,{x:p[0],y:p[1],fill:a.getTextColor()||t.get(["axisLine","lineStyle","color"]),text:r.formattedLabel,align:m,verticalAlign:v})});if(e.add(x),u){var b=ZN.makeAxisEventDataBase(t);b.targetType="axisLabel",b.value=r.rawLabel,sx(x).eventData=b}}),this)},splitLine:function(e,t,n,r,o,i){var a=t.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var c=[],u=0;u<r.length;u++){var d=l++%s.length;c[d]=c[d]||[],c[d].push(new oC({shape:pZ(n,i,r[u].coord)}))}for(u=0;u<c.length;u++)e.add(zC(c[u],{style:Du({stroke:s[u%s.length]},a.getLineStyle()),silent:!0,z:t.get("z")}))},minorSplitLine:function(e,t,n,r,o,i){if(o.length){for(var a=t.getModel("minorSplitLine").getModel("lineStyle"),s=[],l=0;l<o.length;l++)for(var c=0;c<o[l].length;c++)s.push(new oC({shape:pZ(n,i,o[l][c].coord)}));e.add(zC(s,{style:a.getLineStyle(),silent:!0,z:t.get("z")}))}},splitArea:function(e,t,n,r,o,i){if(r.length){var a=t.getModel("splitArea").getModel("areaStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var c=[],u=Math.PI/180,d=-r[0].coord*u,h=Math.min(i[0],i[1]),p=Math.max(i[0],i[1]),f=t.get("clockwise"),g=1,m=r.length;g<=m;g++){var v=g===m?r[0].coord:r[g].coord,y=l++%s.length;c[y]=c[y]||[],c[y].push(new Gk({shape:{cx:n.cx,cy:n.cy,r0:h,r:p,startAngle:d,endAngle:-v*u,clockwise:f},silent:!0})),d=-v*u}for(g=0;g<c.length;g++)e.add(zC(c[g],{style:Du({fill:s[g%s.length]},a.getAreaStyle()),silent:!0}))}}};const yZ=mZ;var xZ=["axisLine","axisTickLabel","axisName"],bZ=["splitLine","splitArea","minorSplitLine"],wZ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="PolarAxisPointer",n}return ru(t,e),t.prototype.render=function(e,t){if(this.group.removeAll(),e.get("show")){var n=this._axisGroup,r=this._axisGroup=new Fg;this.group.add(r);var o=e.axis,i=o.polar,a=i.getAngleAxis(),s=o.getTicksCoords(),l=o.getMinorTicksCoords(),c=a.getExtent()[0],u=o.getExtent(),d=function(e,t,n){return{position:[e.cx,e.cy],rotation:n/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:t.getModel("axisLabel").get("rotate"),z2:1}}(i,e,c),h=new ZN(e,d);Ru(xZ,h.add,h),r.add(h.getGroup()),YC(n,r,e),Ru(bZ,(function(t){e.get([t,"show"])&&!o.scale.isBlank()&&SZ[t](this.group,e,i,c,u,s,l)}),this)}},t.type="radiusAxis",t}(rO),SZ={splitLine:function(t,n,r,o,i,a){var s=n.getModel("splitLine").getModel("lineStyle"),l=s.get("color"),c=0,u=r.getAngleAxis(),d=Math.PI/180,h=u.getExtent(),p=360===Math.abs(h[1]-h[0])?"Circle":"Arc";l=l instanceof Array?l:[l];for(var f=[],g=0;g<a.length;g++){var m=c++%l.length;f[m]=f[m]||[],f[m].push(new e[p]({shape:{cx:r.cx,cy:r.cy,r:Math.max(a[g].coord,0),startAngle:-h[0]*d,endAngle:-h[1]*d,clockwise:u.inverse}}))}for(g=0;g<f.length;g++)t.add(zC(f[g],{style:Du({stroke:l[g%l.length],fill:null},s.getLineStyle()),silent:!0}))},minorSplitLine:function(e,t,n,r,o,i,a){if(a.length){for(var s=t.getModel("minorSplitLine").getModel("lineStyle"),l=[],c=0;c<a.length;c++)for(var u=0;u<a[c].length;u++)l.push(new kk({shape:{cx:n.cx,cy:n.cy,r:a[c][u].coord}}));e.add(zC(l,{style:Du({fill:null},s.getLineStyle()),silent:!0}))}},splitArea:function(e,t,n,r,o,i){if(i.length){var a=t.getModel("splitArea").getModel("areaStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var c=[],u=i[0].coord,d=1;d<i.length;d++){var h=l++%s.length;c[h]=c[h]||[],c[h].push(new Gk({shape:{cx:n.cx,cy:n.cy,r0:u,r:i[d].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),u=i[d].coord}for(d=0;d<c.length;d++)e.add(zC(c[d],{style:Du({fill:s[d%s.length]},a.getAreaStyle()),silent:!0}))}}};const _Z=wZ;function AZ(e){return e.get("stack")||"__ec_stack_"+e.seriesIndex}function kZ(e,t){return t.dim+e.model.componentIndex}const CZ=function(e,t,n){var r={},o=function(e){var t={};Ru(e,(function(e,n){var r=e.getData(),o=e.coordinateSystem,i=o.getBaseAxis(),a=kZ(o,i),s=i.getExtent(),l="category"===i.type?i.getBandWidth():Math.abs(s[1]-s[0])/r.count(),c=t[a]||{bandWidth:l,remainedWidth:l,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},u=c.stacks;t[a]=c;var d=AZ(e);u[d]||c.autoWidthCount++,u[d]=u[d]||{width:0,maxWidth:0};var h=Zg(e.get("barWidth"),l),p=Zg(e.get("barMaxWidth"),l),f=e.get("barGap"),g=e.get("barCategoryGap");h&&!u[d].width&&(h=Math.min(c.remainedWidth,h),u[d].width=h,c.remainedWidth-=h),p&&(u[d].maxWidth=p),null!=f&&(c.gap=f),null!=g&&(c.categoryGap=g)}));var n={};return Ru(t,(function(e,t){n[t]={};var r=e.stacks,o=e.bandWidth,i=Zg(e.categoryGap,o),a=Zg(e.gap,1),s=e.remainedWidth,l=e.autoWidthCount,c=(s-i)/(l+(l-1)*a);c=Math.max(c,0),Ru(r,(function(e,t){var n=e.maxWidth;n&&n<c&&(n=Math.min(n,s),e.width&&(n=Math.min(n,e.width)),s-=n,e.width=n,l--)})),c=(s-i)/(l+(l-1)*a),c=Math.max(c,0);var u,d=0;Ru(r,(function(e,t){e.width||(e.width=c),u=e,d+=e.width*(1+a)})),u&&(d-=u.width*a);var h=-d/2;Ru(r,(function(e,r){n[t][r]=n[t][r]||{offset:h,width:e.width},h+=e.width*(1+a)}))})),n}(Ou(t.getSeriesByType(e),(function(e){return!t.isSeriesFiltered(e)&&e.coordinateSystem&&"polar"===e.coordinateSystem.type})));t.eachSeriesByType(e,(function(e){if("polar"===e.coordinateSystem.type){var t=e.getData(),n=e.coordinateSystem,i=n.getBaseAxis(),a=kZ(n,i),s=AZ(e),l=o[a][s],c=l.offset,u=l.width,d=n.getOtherAxis(i),h=e.coordinateSystem.cx,p=e.coordinateSystem.cy,f=e.get("barMinHeight")||0,g=e.get("barMinAngle")||0;r[s]=r[s]||[];for(var m=t.mapDimension(d.dim),v=t.mapDimension(i.dim),y=tL(t,m),x="radius"!==i.dim||!e.get("roundCap",!0),b=d.model.get("startValue"),w=d.dataToCoord(b||0),S=0,_=t.count();S<_;S++){var A=t.get(m,S),k=t.get(v,S),C=A>=0?"p":"n",M=w;y&&(r[s][k]||(r[s][k]={p:w,n:w}),M=r[s][k][C]);var I=void 0,T=void 0,D=void 0,j=void 0;if("radius"===d.dim){var P=d.dataToCoord(A)-w,L=i.dataToCoord(k);Math.abs(P)<f&&(P=(P<0?-1:1)*f),I=M,T=M+P,j=(D=L-c)-u,y&&(r[s][k][C]=T)}else{var R=d.dataToCoord(A,x)-w,E=i.dataToCoord(k);Math.abs(R)<g&&(R=(R<0?-1:1)*g),T=(I=E+c)+u,D=M,j=M+R,y&&(r[s][k][C]=j)}t.setItemLayout(S,{cx:h,cy:p,r0:I,r:T,startAngle:-D*Math.PI/180,endAngle:-j*Math.PI/180,clockwise:D>=j})}}}))};var MZ={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},IZ={splitNumber:5},TZ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.type="polar",t}(tk);function DZ(e,t){t=t||{};var n=e.coordinateSystem,r=e.axis,o={},i=r.position,a=r.orient,s=n.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],c={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};o.position=["vertical"===a?c.vertical[i]:l[0],"horizontal"===a?c.horizontal[i]:l[3]];o.rotation=Math.PI/2*{horizontal:0,vertical:1}[a];o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,right:1,left:-1}[i],e.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),Qu(t.labelInside,e.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var u=t.rotate;return null==u&&(u=e.get(["axisLabel","rotate"])),o.labelRotation="top"===i?-u:u,o.z2=1,o}var jZ=["axisLine","axisTickLabel","axisName"],PZ=["splitArea","splitLine"],LZ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="SingleAxisPointer",n}return ru(t,e),t.prototype.render=function(t,n,r,o){var i=this.group;i.removeAll();var a=this._axisGroup;this._axisGroup=new Fg;var s=DZ(t),l=new ZN(t,s);Ru(jZ,l.add,l),i.add(this._axisGroup),i.add(l.getGroup()),Ru(PZ,(function(e){t.get([e,"show"])&&RZ[e](this,this.group,this._axisGroup,t)}),this),YC(a,this._axisGroup,t),e.prototype.render.call(this,t,n,r,o)},t.prototype.remove=function(){aO(this)},t.type="singleAxis",t}(rO),RZ={splitLine:function(e,t,n,r){var o=r.axis;if(!o.scale.isBlank()){var i=r.getModel("splitLine"),a=i.getModel("lineStyle"),s=a.get("color");s=s instanceof Array?s:[s];for(var l=a.get("width"),c=r.coordinateSystem.getRect(),u=o.isHorizontal(),d=[],h=0,p=o.getTicksCoords({tickModel:i}),f=[],g=[],m=0;m<p.length;++m){var v=o.toGlobalCoord(p[m].coord);u?(f[0]=v,f[1]=c.y,g[0]=v,g[1]=c.y+c.height):(f[0]=c.x,f[1]=v,g[0]=c.x+c.width,g[1]=v);var y=new oC({shape:{x1:f[0],y1:f[1],x2:g[0],y2:g[1]},silent:!0});FC(y.shape,l);var x=h++%s.length;d[x]=d[x]||[],d[x].push(y)}var b=a.getLineStyle(["color"]);for(m=0;m<d.length;++m)t.add(zC(d[m],{style:Du({stroke:s[m%s.length]},b),silent:!0}))}},splitArea:function(e,t,n,r){iO(e,n,r,r)}};const EZ=LZ;var NZ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.getCoordSysModel=function(){return this},t.type="singleAxis",t.layoutMode="box",t.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}},t}(rS);Pu(NZ,oE.prototype);const OZ=NZ;var zZ=function(e){function t(t,n,r,o,i){var a=e.call(this,t,n,r)||this;return a.type=o||"value",a.position=i||"bottom",a}return ru(t,e),t.prototype.isHorizontal=function(){var e=this.position;return"top"===e||"bottom"===e},t.prototype.pointToData=function(e,t){return this.coordinateSystem.pointToData(e)[0]},t}(TN);const BZ=zZ;var FZ=["single"],VZ=function(){function e(e,t,n){this.type="single",this.dimension="single",this.dimensions=FZ,this.axisPointerEnabled=!0,this.model=e,this._init(e,t,n)}return e.prototype._init=function(e,t,n){var r=this.dimension,o=new BZ(r,oN(e),[0,0],e.get("type"),e.get("position")),i="category"===o.type;o.onBand=i&&e.get("boundaryGap"),o.inverse=e.get("inverse"),o.orient=e.get("orient"),e.axis=o,o.model=e,o.coordinateSystem=this,this._axis=o},e.prototype.update=function(e,t){e.eachSeries((function(e){if(e.coordinateSystem===this){var t=e.getData();Ru(t.mapDimensionsAll(this.dimension),(function(e){this._axis.scale.unionExtentFromData(t,e)}),this),rN(this._axis.scale,this._axis.model)}}),this)},e.prototype.resize=function(e,t){this._rect=Zw({left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")},{width:t.getWidth(),height:t.getHeight()}),this._adjustAxis()},e.prototype.getRect=function(){return this._rect},e.prototype._adjustAxis=function(){var e=this._rect,t=this._axis,n=t.isHorizontal(),r=n?[0,e.width]:[0,e.height],o=t.inverse?1:0;t.setExtent(r[o],r[1-o]),this._updateAxisTransform(t,n?e.x:e.y)},e.prototype._updateAxisTransform=function(e,t){var n=e.getExtent(),r=n[0]+n[1],o=e.isHorizontal();e.toGlobalCoord=o?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord=o?function(e){return e-t}:function(e){return r-e+t}},e.prototype.getAxis=function(){return this._axis},e.prototype.getBaseAxis=function(){return this._axis},e.prototype.getAxes=function(){return[this._axis]},e.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},e.prototype.containPoint=function(e){var t=this.getRect(),n=this.getAxis();return"horizontal"===n.orient?n.contain(n.toLocalCoord(e[0]))&&e[1]>=t.y&&e[1]<=t.y+t.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},e.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e["horizontal"===t.orient?0:1]))]},e.prototype.dataToPoint=function(e){var t=this.getAxis(),n=this.getRect(),r=[],o="horizontal"===t.orient?0:1;return e instanceof Array&&(e=e[0]),r[o]=t.toGlobalCoord(t.dataToCoord(+e)),r[1-o]=0===o?n.y+n.height/2:n.x+n.width/2,r},e.prototype.convertToPixel=function(e,t,n){return WZ(t)===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(e,t,n){return WZ(t)===this?this.pointToData(n):null},e}();function WZ(e){var t=e.seriesModel,n=e.singleAxisModel;return n&&n.coordinateSystem||t&&t.coordinateSystem}const HZ=VZ;const GZ={create:function(e,t){var n=[];return e.eachComponent("singleAxis",(function(r,o){var i=new HZ(r,e,t);i.name="single_"+o,i.resize(r,t),r.coordinateSystem=i,n.push(i)})),e.eachSeries((function(e){if("singleAxis"===e.get("coordinateSystem")){var t=e.getReferringComponents("singleAxis",Em).models[0];e.coordinateSystem=t&&t.coordinateSystem}})),n},dimensions:FZ};var UZ=["x","y"],XZ=["width","height"],YZ=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ru(t,e),t.prototype.makeElOption=function(e,t,n,r,o){var i=n.axis,a=i.coordinateSystem,s=KZ(a,1-ZZ(i)),l=a.dataToPoint(t)[0],c=r.get("type");if(c&&"none"!==c){var u=gq(r),d=qZ[c](i,l,s);d.style=u,e.graphicKey=d.type,e.pointer=d}xq(t,e,DZ(n),n,r,o)},t.prototype.getHandleTransform=function(e,t,n){var r=DZ(t,{labelInside:!1});r.labelMargin=n.get(["handle","margin"]);var o=yq(t.axis,e,r);return{x:o[0],y:o[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var o=n.axis,i=o.coordinateSystem,a=ZZ(o),s=KZ(i,a),l=[e.x,e.y];l[a]+=t[a],l[a]=Math.min(s[1],l[a]),l[a]=Math.max(s[0],l[a]);var c=KZ(i,1-a),u=(c[1]+c[0])/2,d=[u,u];return d[a]=l[a],{x:l[0],y:l[1],rotation:e.rotation,cursorPoint:d,tooltipOption:{verticalAlign:"middle"}}},t}(fq),qZ={line:function(e,t,n){return{type:"Line",subPixelOptimize:!0,shape:bq([t,n[0]],[t,n[1]],ZZ(e))}},shadow:function(e,t,n){var r=e.getBandWidth(),o=n[1]-n[0];return{type:"Rect",shape:wq([t-r/2,n[0]],[r,o],ZZ(e))}}};function ZZ(e){return e.isHorizontal()?0:1}function KZ(e,t){var n=e.getRect();return[n[UZ[t]],n[UZ[t]]+n[XZ[t]]]}const $Z=YZ;var QZ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.type="single",t}(tk);function JZ(e,t){var n,r=e.cellSize;1===(n=Vu(r)?r:e.cellSize=[r,r]).length&&(n[1]=n[0]);var o=Eu([0,1],(function(e){return function(e,t){return null!=e[Xw[t][0]]||null!=e[Xw[t][1]]&&null!=e[Xw[t][2]]}(t,e)&&(n[e]="auto"),null!=n[e]&&"auto"!==n[e]}));Qw(e,t,{type:"box",ignoreSize:o})}const eK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.init=function(t,n,r){var o=Jw(t);e.prototype.init.apply(this,arguments),JZ(t,o)},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),JZ(this.option,t)},t.prototype.getCellSize=function(){return this.option.cellSize},t.type="calendar",t.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},t}(rS);var tK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.render=function(e,t,n){var r=this.group;r.removeAll();var o=e.coordinateSystem,i=o.getRangeInfo(),a=o.getOrient(),s=t.getLocaleModel();this._renderDayRect(e,i,r),this._renderLines(e,i,a,r),this._renderYearText(e,i,a,r),this._renderMonthText(e,s,a,r),this._renderWeekText(e,s,i,a,r)},t.prototype._renderDayRect=function(e,t,n){for(var r=e.coordinateSystem,o=e.getModel("itemStyle").getItemStyle(),i=r.getCellWidth(),a=r.getCellHeight(),s=t.start.time;s<=t.end.time;s=r.getNextNDay(s,1).time){var l=r.dataToRect([s],!1).tl,c=new Gy({shape:{x:l[0],y:l[1],width:i,height:a},cursor:"default",style:o});n.add(c)}},t.prototype._renderLines=function(e,t,n,r){var o=this,i=e.coordinateSystem,a=e.getModel(["splitLine","lineStyle"]).getLineStyle(),s=e.get(["splitLine","show"]),l=a.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var c=t.start,u=0;c.time<=t.end.time;u++){h(c.formatedDate),0===u&&(c=i.getDateInfo(t.start.y+"-"+t.start.m));var d=c.date;d.setMonth(d.getMonth()+1),c=i.getDateInfo(d)}function h(t){o._firstDayOfMonth.push(i.getDateInfo(t)),o._firstDayPoints.push(i.dataToRect([t],!1).tl);var l=o._getLinePointsOfOneWeek(e,t,n);o._tlpoints.push(l[0]),o._blpoints.push(l[l.length-1]),s&&o._drawSplitline(l,a,r)}h(i.getNextNDay(t.end.time,1).formatedDate),s&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,l,n),a,r),s&&this._drawSplitline(o._getEdgesPoints(o._blpoints,l,n),a,r)},t.prototype._getEdgesPoints=function(e,t,n){var r=[e[0].slice(),e[e.length-1].slice()],o="horizontal"===n?0:1;return r[0][o]=r[0][o]-t/2,r[1][o]=r[1][o]+t/2,r},t.prototype._drawSplitline=function(e,t,n){var r=new eC({z2:20,shape:{points:e},style:t});n.add(r)},t.prototype._getLinePointsOfOneWeek=function(e,t,n){for(var r=e.coordinateSystem,o=r.getDateInfo(t),i=[],a=0;a<7;a++){var s=r.getNextNDay(o.time,a),l=r.dataToRect([s.time],!1);i[2*s.day]=l.tl,i[2*s.day+1]=l["horizontal"===n?"bl":"tr"]}return i},t.prototype._formatterLabel=function(e,t){return Hu(e)&&e?(n=e,Ru(t,(function(e,t){n=n.replace("{"+t+"}",r?Qd(e):e)})),n):Wu(e)?e(t):t.nameMap;var n,r},t.prototype._yearTextPositionControl=function(e,t,n,r,o){var i=t[0],a=t[1],s=["center","bottom"];"bottom"===r?(a+=o,s=["center","top"]):"left"===r?i-=o:"right"===r?(i+=o,s=["center","top"]):a-=o;var l=0;return"left"!==r&&"right"!==r||(l=Math.PI/2),{rotation:l,x:i,y:a,style:{align:s[0],verticalAlign:s[1]}}},t.prototype._renderYearText=function(e,t,n,r){var o=e.getModel("yearLabel");if(o.get("show")){var i=o.get("margin"),a=o.get("position");a||(a="horizontal"!==n?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,c=(s[0][1]+s[1][1])/2,u="horizontal"===n?0:1,d={top:[l,s[u][1]],bottom:[l,s[1-u][1]],left:[s[1-u][0],c],right:[s[u][0],c]},h=t.start.y;+t.end.y>+t.start.y&&(h=h+"-"+t.end.y);var p=o.get("formatter"),f={start:t.start.y,end:t.end.y,nameMap:h},g=this._formatterLabel(p,f),m=new ax({z2:30,style:kb(o,{text:g})});m.attr(this._yearTextPositionControl(m,d[a],n,a,i)),r.add(m)}},t.prototype._monthTextPositionControl=function(e,t,n,r,o){var i="left",a="top",s=e[0],l=e[1];return"horizontal"===n?(l+=o,t&&(i="center"),"start"===r&&(a="bottom")):(s+=o,t&&(a="middle"),"start"===r&&(i="right")),{x:s,y:l,align:i,verticalAlign:a}},t.prototype._renderMonthText=function(e,t,n,r){var o=e.getModel("monthLabel");if(o.get("show")){var i=o.get("nameMap"),a=o.get("margin"),s=o.get("position"),l=o.get("align"),c=[this._tlpoints,this._blpoints];i&&!Hu(i)||(i&&(t=ow(i)||t),i=t.get(["time","monthAbbr"])||[]);var u="start"===s?0:1,d="horizontal"===n?0:1;a="start"===s?-a:a;for(var h="center"===l,p=0;p<c[u].length-1;p++){var f=c[u][p].slice(),g=this._firstDayOfMonth[p];if(h){var m=this._firstDayPoints[p];f[d]=(m[d]+c[0][p+1][d])/2}var v=o.get("formatter"),y=i[+g.m-1],x={yyyy:g.y,yy:(g.y+"").slice(2),MM:g.m,M:+g.m,nameMap:y},b=this._formatterLabel(v,x),w=new ax({z2:30,style:Tu(kb(o,{text:b}),this._monthTextPositionControl(f,h,n,s,a))});r.add(w)}}},t.prototype._weekTextPositionControl=function(e,t,n,r,o){var i="center",a="middle",s=e[0],l=e[1],c="start"===n;return"horizontal"===t?(s=s+r+(c?1:-1)*o[0]/2,i=c?"right":"left"):(l=l+r+(c?1:-1)*o[1]/2,a=c?"bottom":"top"),{x:s,y:l,align:i,verticalAlign:a}},t.prototype._renderWeekText=function(e,t,n,r,o){var i=e.getModel("dayLabel");if(i.get("show")){var a=e.coordinateSystem,s=i.get("position"),l=i.get("nameMap"),c=i.get("margin"),u=a.getFirstDayOfWeek();if(!l||Hu(l))l&&(t=ow(l)||t),l=t.get(["time","dayOfWeekShort"])||Eu(t.get(["time","dayOfWeekAbbr"]),(function(e){return e[0]}));var d=a.getNextNDay(n.end.time,7-n.lweek).time,h=[a.getCellWidth(),a.getCellHeight()];c=Zg(c,Math.min(h[1],h[0])),"start"===s&&(d=a.getNextNDay(n.start.time,-(7+n.fweek)).time,c=-c);for(var p=0;p<7;p++){var f,g=a.getNextNDay(d,p),m=a.dataToRect([g.time],!1).center;f=Math.abs((p+u)%7);var v=new ax({z2:30,style:Tu(kb(i,{text:l[f]}),this._weekTextPositionControl(m,r,s,c,h))});o.add(v)}}},t.type="calendar",t}(tk);const nK=tK;var rK=864e5,oK=function(){function e(t,n,r){this.type="calendar",this.dimensions=e.dimensions,this.getDimensionsInfo=e.getDimensionsInfo,this._model=t}return e.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},e.prototype.getRangeInfo=function(){return this._rangeInfo},e.prototype.getModel=function(){return this._model},e.prototype.getRect=function(){return this._rect},e.prototype.getCellWidth=function(){return this._sw},e.prototype.getCellHeight=function(){return this._sh},e.prototype.getOrient=function(){return this._orient},e.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},e.prototype.getDateInfo=function(e){var t=(e=am(e)).getFullYear(),n=e.getMonth()+1,r=n<10?"0"+n:""+n,o=e.getDate(),i=o<10?"0"+o:""+o,a=e.getDay();return{y:t+"",m:r,d:i,day:a=Math.abs((a+7-this.getFirstDayOfWeek())%7),time:e.getTime(),formatedDate:t+"-"+r+"-"+i,date:e}},e.prototype.getNextNDay=function(e,t){return 0===(t=t||0)||(e=new Date(this.getDateInfo(e).time)).setDate(e.getDate()+t),this.getDateInfo(e)},e.prototype.update=function(e,t){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,r=["width","height"],o=this._model.getCellSize().slice(),i=this._model.getBoxLayoutParams(),a="horizontal"===this._orient?[n,7]:[7,n];Ru([0,1],(function(e){c(o,e)&&(i[r[e]]=o[e]*a[e])}));var s={width:t.getWidth(),height:t.getHeight()},l=this._rect=Zw(i,s);function c(e,t){return null!=e[t]&&"auto"!==e[t]}Ru([0,1],(function(e){c(o,e)||(o[e]=l[r[e]]/a[e])})),this._sw=o[0],this._sh=o[1]},e.prototype.dataToPoint=function(e,t){Vu(e)&&(e=e[0]),null==t&&(t=!0);var n=this.getDateInfo(e),r=this._rangeInfo,o=n.formatedDate;if(t&&!(n.time>=r.start.time&&n.time<r.end.time+rK))return[NaN,NaN];var i=n.day,a=this._getRangeInfo([r.start.time,o]).nthWeek;return"vertical"===this._orient?[this._rect.x+i*this._sw+this._sw/2,this._rect.y+a*this._sh+this._sh/2]:[this._rect.x+a*this._sw+this._sw/2,this._rect.y+i*this._sh+this._sh/2]},e.prototype.pointToData=function(e){var t=this.pointToDate(e);return t&&t.time},e.prototype.dataToRect=function(e,t){var n=this.dataToPoint(e,t);return{contentShape:{x:n[0]-(this._sw-this._lineWidth)/2,y:n[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:n,tl:[n[0]-this._sw/2,n[1]-this._sh/2],tr:[n[0]+this._sw/2,n[1]-this._sh/2],br:[n[0]+this._sw/2,n[1]+this._sh/2],bl:[n[0]-this._sw/2,n[1]+this._sh/2]}},e.prototype.pointToDate=function(e){var t=Math.floor((e[0]-this._rect.x)/this._sw)+1,n=Math.floor((e[1]-this._rect.y)/this._sh)+1,r=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(n,t-1,r):this._getDateByWeeksAndDay(t,n-1,r)},e.prototype.convertToPixel=function(e,t,n){var r=iK(t);return r===this?r.dataToPoint(n):null},e.prototype.convertFromPixel=function(e,t,n){var r=iK(t);return r===this?r.pointToData(n):null},e.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},e.prototype._initRangeOption=function(){var e,t=this._model.get("range");if(Vu(t)&&1===t.length&&(t=t[0]),Vu(t))e=t;else{var n=t.toString();if(/^\d{4}$/.test(n)&&(e=[n+"-01-01",n+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(n)){var r=this.getDateInfo(n),o=r.date;o.setMonth(o.getMonth()+1);var i=this.getNextNDay(o,-1);e=[r.formatedDate,i.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(n)&&(e=[n,n])}if(!e)return t;var a=this._getRangeInfo(e);return a.start.time>a.end.time&&e.reverse(),e},e.prototype._getRangeInfo=function(e){var t,n=[this.getDateInfo(e[0]),this.getDateInfo(e[1])];n[0].time>n[1].time&&(t=!0,n.reverse());var r=Math.floor(n[1].time/rK)-Math.floor(n[0].time/rK)+1,o=new Date(n[0].time),i=o.getDate(),a=n[1].date.getDate();o.setDate(i+r-1);var s=o.getDate();if(s!==a)for(var l=o.getTime()-n[1].time>0?1:-1;(s=o.getDate())!==a&&(o.getTime()-n[1].time)*l>0;)r-=l,o.setDate(s-l);var c=Math.floor((r+n[0].day+6)/7),u=t?1-c:c-1;return t&&n.reverse(),{range:[n[0].formatedDate,n[1].formatedDate],start:n[0],end:n[1],allDay:r,weeks:c,nthWeek:u,fweek:n[0].day,lweek:n[1].day}},e.prototype._getDateByWeeksAndDay=function(e,t,n){var r=this._getRangeInfo(n);if(e>r.weeks||0===e&&t<r.fweek||e===r.weeks&&t>r.lweek)return null;var o=7*(e-1)-r.fweek+t,i=new Date(r.start.time);return i.setDate(+r.start.d+o),this.getDateInfo(i)},e.create=function(t,n){var r=[];return t.eachComponent("calendar",(function(o){var i=new e(o,t,n);r.push(i),o.coordinateSystem=i})),t.eachSeries((function(e){"calendar"===e.get("coordinateSystem")&&(e.coordinateSystem=r[e.get("calendarIndex")||0])})),r},e.dimensions=["time","value"],e}();function iK(e){var t=e.calendarModel,n=e.seriesModel;return t?t.coordinateSystem:n?n.coordinateSystem:null}const aK=oK;function sK(e,t){var n;return Ru(t,(function(t){null!=e[t]&&"auto"!==e[t]&&(n=!0)})),n}var lK=["transition","enterFrom","leaveTo"],cK=lK.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function uK(e,t,n){if(n&&(!e[n]&&t[n]&&(e[n]={}),e=e[n],t=t[n]),e&&t)for(var r=n?lK:cK,o=0;o<r.length;o++){var i=r[o];null==e[i]&&null!=t[i]&&(e[i]=t[i])}}var dK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.preventAutoZ=!0,n}return ru(t,e),t.prototype.mergeOption=function(t,n){var r=this.option.elements;this.option.elements=null,e.prototype.mergeOption.call(this,t,n),this.option.elements=r},t.prototype.optionUpdated=function(e,t){var n=this.option,r=(t?n:e).elements,o=n.elements=t?[]:n.elements,i=[];this._flatten(r,i,null);var a=Am(o,i,"normalMerge"),s=this._elOptionsToUpdate=[];Ru(a,(function(e,t){var n=e.newOption;n&&(s.push(n),function(e,t){var n=e.existing;if(t.id=e.keyInfo.id,!t.type&&n&&(t.type=n.type),null==t.parentId){var r=t.parentOption;r?t.parentId=r.id:n&&(t.parentId=n.parentId)}t.parentOption=null}(e,n),function(e,t,n){var r=Tu({},n),o=e[t],i=n.$action||"merge";"merge"===i?o?(Mu(o,r,!0),Qw(o,r,{ignoreSize:!0}),eS(n,o),uK(n,o),uK(n,o,"shape"),uK(n,o,"style"),uK(n,o,"extra"),n.clipPath=o.clipPath):e[t]=r:"replace"===i?e[t]=r:"remove"===i&&o&&(e[t]=null)}(o,t,n),function(e,t){if(e&&(e.hv=t.hv=[sK(t,["left","right"]),sK(t,["top","bottom"])],"group"===e.type)){var n=e,r=t;null==n.width&&(n.width=r.width=0),null==n.height&&(n.height=r.height=0)}}(o[t],n))}),this),n.elements=Ou(o,(function(e){return e&&delete e.$action,null!=e}))},t.prototype._flatten=function(e,t,n){Ru(e,(function(e){if(e){n&&(e.parentOption=n),t.push(e);var r=e.children;r&&r.length&&this._flatten(r,t,e),delete e.children}}),this)},t.prototype.useElOptionsToUpdate=function(){var e=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,e},t.type="graphic",t.defaultOption={elements:[]},t}(rS),hK={path:null,compoundPath:null,group:Fg,image:Ny,text:ax},pK=jm(),fK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.init=function(){this._elMap=dd()},t.prototype.render=function(e,t,n){e!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=e,this._updateElements(e),this._relocate(e,n)},t.prototype._updateElements=function(e){var t=e.useElOptionsToUpdate();if(t){var n=this._elMap,r=this.group,o=e.get("z"),i=e.get("zlevel");Ru(t,(function(t){var a=Mm(t.id,null),s=null!=a?n.get(a):null,l=Mm(t.parentId,null),c=null!=l?n.get(l):r,u=t.type,d=t.style;"text"===u&&d&&t.hv&&t.hv[1]&&(d.textVerticalAlign=d.textBaseline=d.verticalAlign=d.align=null);var h=t.textContent,p=t.textConfig;if(d&&oY(d,u,!!p,!!h)){var f=iY(d,u,!0);!p&&f.textConfig&&(p=t.textConfig=f.textConfig),!h&&f.textContent&&(h=f.textContent)}var g=function(e){return e=Tu({},e),Ru(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(Uw),(function(t){delete e[t]})),e}(t);var m=t.$action||"merge",v="merge"===m,y="replace"===m;if(v){var x=s;(C=!s)?x=mK(a,c,t.type,n):(x&&(pK(x).isNew=!1),CY(x)),x&&(fY(x,g,e,{isInit:C}),yK(x,t,o,i))}else if(y){vK(s,t,n,e);var b=mK(a,c,t.type,n);b&&(fY(b,g,e,{isInit:!0}),yK(b,t,o,i))}else"remove"===m&&(gY(s,t),vK(s,t,n,e));var w=n.get(a);if(w&&h)if(v){var S=w.getTextContent();S?S.attr(h):w.setTextContent(new ax(h))}else y&&w.setTextContent(new ax(h));if(w){var _=t.clipPath;if(_){var A=_.type,k=void 0,C=!1;if(v){var M=w.getClipPath();k=(C=!M||pK(M).type!==A)?gK(A):M}else y&&(C=!0,k=gK(A));w.setClipPath(k),fY(k,_,e,{isInit:C}),MY(k,_.keyframeAnimation,e)}var I=pK(w);w.setTextConfig(p),I.option=t,function(e,t,n){var r=sx(e).eventData;e.silent||e.ignore||r||(r=sx(e).eventData={componentType:"graphic",componentIndex:t.componentIndex,name:e.name});r&&(r.info=n.info)}(w,e,t),eM({el:w,componentModel:e,itemName:w.name,itemTooltipOption:t.tooltip}),MY(w,t.keyframeAnimation,e)}}))}},t.prototype._relocate=function(e,t){for(var n=e.option.elements,r=this.group,o=this._elMap,i=t.getWidth(),a=t.getHeight(),s=["x","y"],l=0;l<n.length;l++){if((f=null!=(p=Mm((h=n[l]).id,null))?o.get(p):null)&&f.isGroup){var c=(g=f.parent)===r,u=pK(f),d=pK(g);u.width=Zg(u.option.width,c?i:d.width)||0,u.height=Zg(u.option.height,c?a:d.height)||0}}for(l=n.length-1;l>=0;l--){var h,p,f;if(f=null!=(p=Mm((h=n[l]).id,null))?o.get(p):null){var g=f.parent,m=(d=pK(g),{}),v=Kw(f,h,g===r?{width:i,height:a}:{width:d.width,height:d.height},null,{hv:h.hv,boundingMode:h.bounding},m);if(!pK(f).isNew&&v){for(var y=h.transition,x={},b=0;b<s.length;b++){var w=s[b],S=m[w];y&&(vY(y)||ju(y,w)>=0)?x[w]=S:f[w]=S}pb(f,x,e,0)}else f.attr(m)}}},t.prototype._clear=function(){var e=this,t=this._elMap;t.each((function(n){vK(n,pK(n).option,t,e._lastGraphicModel)})),this._elMap=dd()},t.prototype.dispose=function(){this._clear()},t.type="graphic",t}(tk);function gK(e){var t=new(gd(hK,e)?hK[e]:RC(e))({});return pK(t).type=e,t}function mK(e,t,n,r){var o=gK(n);return t.add(o),r.set(e,o),pK(o).id=e,pK(o).isNew=!0,o}function vK(e,t,n,r){e&&e.parent&&("group"===e.type&&e.traverse((function(e){vK(e,t,n,r)})),mY(e,t,r),n.removeKey(pK(e).id))}function yK(e,t,n,r){e.isGroup||Ru([["cursor",kv.prototype.cursor],["zlevel",r||0],["z",n||0],["z2",0]],(function(n){var r=n[0];gd(t,r)?e[r]=Ju(t[r],n[1]):null==e[r]&&(e[r]=n[1])})),Ru(zu(t),(function(n){if(0===n.indexOf("on")){var r=t[n];e[n]=Wu(r)?r:null}})),gd(t,"draggable")&&(e.draggable=t.draggable),null!=t.name&&(e.name=t.name),null!=t.id&&(e.id=t.id)}var xK=["x","y","radius","angle","single"],bK=["cartesian2d","polar","singleAxis"];function wK(e){return e+"Axis"}function SK(e,t){var n,r=dd(),o=[],i=dd();e.eachComponent({mainType:"dataZoom",query:t},(function(e){i.get(e.uid)||s(e)}));do{n=!1,e.eachComponent("dataZoom",a)}while(n);function a(e){!i.get(e.uid)&&function(e){var t=!1;return e.eachTargetAxis((function(e,n){var o=r.get(e);o&&o[n]&&(t=!0)})),t}(e)&&(s(e),n=!0)}function s(e){i.set(e.uid,!0),o.push(e),e.eachTargetAxis((function(e,t){(r.get(e)||r.set(e,[]))[t]=!0}))}return o}function _K(e){var t=e.ecModel,n={infoList:[],infoMap:dd()};return e.eachTargetAxis((function(e,r){var o=t.getComponent(wK(e),r);if(o){var i=o.getCoordSysModel();if(i){var a=i.uid,s=n.infoMap.get(a);s||(s={model:i,axisModels:[]},n.infoList.push(s),n.infoMap.set(a,s)),s.axisModels.push(o)}}})),n}var AK=function(){function e(){this.indexList=[],this.indexMap=[]}return e.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},e}(),kK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return ru(t,e),t.prototype.init=function(e,t,n){var r=CK(e);this.settledOption=r,this.mergeDefaultAndTheme(e,n),this._doInit(r)},t.prototype.mergeOption=function(e){var t=CK(e);Mu(this.option,e,!0),Mu(this.settledOption,t,!0),this._doInit(t)},t.prototype._doInit=function(e){var t=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;Ru([["start","startValue"],["end","endValue"]],(function(e,r){"value"===this._rangePropMode[r]&&(t[e[0]]=n[e[0]]=null)}),this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),t=this._targetAxisInfoMap=dd();this._fillSpecifiedTargetAxis(t)?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(t,this._orient)),this._noTarget=!0,t.each((function(e){e.indexList.length&&(this._noTarget=!1)}),this)},t.prototype._fillSpecifiedTargetAxis=function(e){var t=!1;return Ru(xK,(function(n){var r=this.getReferringComponents(wK(n),Nm);if(r.specified){t=!0;var o=new AK;Ru(r.models,(function(e){o.add(e.componentIndex)})),e.set(n,o)}}),this),t},t.prototype._fillAutoTargetAxisByOrient=function(e,t){var n=this.ecModel,r=!0;if(r){var o="vertical"===t?"y":"x";i(n.findComponents({mainType:o+"Axis"}),o)}r&&i(n.findComponents({mainType:"singleAxis",filter:function(e){return e.get("orient",!0)===t}}),"single");function i(t,n){var o=t[0];if(o){var i=new AK;if(i.add(o.componentIndex),e.set(n,i),r=!1,"x"===n||"y"===n){var a=o.getReferringComponents("grid",Em).models[0];a&&Ru(t,(function(e){o.componentIndex!==e.componentIndex&&a===e.getReferringComponents("grid",Em).models[0]&&i.add(e.componentIndex)}))}}}r&&Ru(xK,(function(t){if(r){var o=n.findComponents({mainType:wK(t),filter:function(e){return"category"===e.get("type",!0)}});if(o[0]){var i=new AK;i.add(o[0].componentIndex),e.set(t,i),r=!1}}}),this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis((function(t){!e&&(e=t)}),this),"y"===e?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var t=this.ecModel.option;this.option.throttle=t.animation&&t.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var t=this._rangePropMode,n=this.get("rangeMode");Ru([["start","startValue"],["end","endValue"]],(function(r,o){var i=null!=e[r[0]],a=null!=e[r[1]];i&&!a?t[o]="percent":!i&&a?t[o]="value":n?t[o]=n[o]:i&&(t[o]="percent")}))},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis((function(t,n){null==e&&(e=this.ecModel.getComponent(wK(t),n))}),this),e},t.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each((function(n,r){Ru(n.indexList,(function(n){e.call(t,r,n)}))}))},t.prototype.getAxisProxy=function(e,t){var n=this.getAxisModel(e,t);if(n)return n.__dzAxisProxy},t.prototype.getAxisModel=function(e,t){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[t])return this.ecModel.getComponent(wK(e),t)},t.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;Ru([["start","startValue"],["end","endValue"]],(function(r){null==e[r[0]]&&null==e[r[1]]||(t[r[0]]=n[r[0]]=e[r[0]],t[r[1]]=n[r[1]]=e[r[1]])}),this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var t=this.option;Ru(["start","startValue","end","endValue"],(function(n){t[n]=e[n]}))},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,t){if(null!=e||null!=t)return this.getAxisProxy(e,t).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var t,n=this._targetAxisInfoMap.keys(),r=0;r<n.length;r++)for(var o=n[r],i=this._targetAxisInfoMap.get(o),a=0;a<i.indexList.length;a++){var s=this.getAxisProxy(o,i.indexList[a]);if(s.hostedBy(this))return s;t||(t=s)}return t},t.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},t.prototype.getOrient=function(){return this._orient},t.type="dataZoom",t.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],t.defaultOption={z:4,filterMode:"filter",start:0,end:100},t}(rS);function CK(e){var t={};return Ru(["start","end","startValue","endValue","throttle"],(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t}const MK=kK;const IK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.type="dataZoom.select",t}(MK);const TK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.render=function(e,t,n,r){this.dataZoomModel=e,this.ecModel=t,this.api=n},t.type="dataZoom",t}(tk);const DK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.type="dataZoom.select",t}(TK);var jK=Ru,PK=$g,LK=function(){function e(e,t,n,r){this._dimName=e,this._axisIndex=t,this.ecModel=r,this._dataZoomModel=n}return e.prototype.hostedBy=function(e){return this._dataZoomModel===e},e.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},e.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},e.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries((function(t){if(function(e){var t=e.get("coordinateSystem");return ju(bK,t)>=0}(t)){var n=wK(this._dimName),r=t.getReferringComponents(n,Em).models[0];r&&this._axisIndex===r.componentIndex&&e.push(t)}}),this),e},e.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},e.prototype.getMinMaxSpan=function(){return Cu(this._minMaxSpan)},e.prototype.calculateDataWindow=function(e){var t,n=this._dataExtent,r=this.getAxisModel().axis.scale,o=this._dataZoomModel.getRangePropMode(),i=[0,100],a=[],s=[];jK(["start","end"],(function(l,c){var u=e[l],d=e[l+"Value"];"percent"===o[c]?(null==u&&(u=i[c]),d=r.parse(qg(u,i,n))):(t=!0,u=qg(d=null==d?n[c]:r.parse(d),n,i)),s[c]=null==d||isNaN(d)?n[c]:d,a[c]=null==u||isNaN(u)?i[c]:u})),PK(s),PK(a);var l=this._minMaxSpan;function c(e,t,n,o,i){var a=i?"Span":"ValueSpan";sH(0,e,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)t[s]=qg(e[s],n,o,!0),i&&(t[s]=r.parse(t[s]))}return t?c(s,a,n,i,!1):c(a,s,i,n,!0),{valueWindow:s,percentWindow:a}},e.prototype.reset=function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=function(e,t,n){var r=[1/0,-1/0];jK(n,(function(e){!function(e,t,n){t&&Ru(uN(t,n),(function(n){var r=t.getApproximateExtent(n);r[0]<e[0]&&(e[0]=r[0]),r[1]>e[1]&&(e[1]=r[1])}))}(r,e.getData(),t)}));var o=e.getAxisModel(),i=eN(o.axis.scale,o,r).calculate();return[i.min,i.max]}(this,this._dimName,t),this._updateMinMaxSpan();var n=this.calculateDataWindow(e.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},e.prototype.filterData=function(e,t){if(e===this._dataZoomModel){var n=this._dimName,r=this.getTargetSeriesModels(),o=e.get("filterMode"),i=this._valueWindow;"none"!==o&&jK(r,(function(e){var t=e.getData(),r=t.mapDimensionsAll(n);if(r.length){if("weakFilter"===o){var a=t.getStore(),s=Eu(r,(function(e){return t.getDimensionIndex(e)}),t);t.filterSelf((function(e){for(var t,n,o,l=0;l<r.length;l++){var c=a.get(s[l],e),u=!isNaN(c),d=c<i[0],h=c>i[1];if(u&&!d&&!h)return!0;u&&(o=!0),d&&(t=!0),h&&(n=!0)}return o&&t&&n}))}else jK(r,(function(n){if("empty"===o)e.setData(t=t.map(n,(function(e){return function(e){return e>=i[0]&&e<=i[1]}(e)?e:NaN})));else{var r={};r[n]=i,t.selectRange(r)}}));jK(r,(function(e){t.setApproximateExtent(i,e)}))}}))}},e.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;jK(["min","max"],(function(r){var o=t.get(r+"Span"),i=t.get(r+"ValueSpan");null!=i&&(i=this.getAxisModel().axis.scale.parse(i)),null!=i?o=qg(n[0]+i,n,[0,100],!0):null!=o&&(i=qg(o,[0,100],n,!0)-n[0]),e[r+"Span"]=o,e[r+"ValueSpan"]=i}),this)},e.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,n=this._valueWindow;if(t){var r=Jg(n,[0,500]);r=Math.min(r,20);var o=e.axis.scale.rawExtentInfo;0!==t[0]&&o.setDeterminedMinMax("min",+n[0].toFixed(r)),100!==t[1]&&o.setDeterminedMinMax("max",+n[1].toFixed(r)),o.freeze()}},e}();const RK=LK;const EK={getTargetSeries:function(e){function t(t){e.eachComponent("dataZoom",(function(n){n.eachTargetAxis((function(r,o){var i=e.getComponent(wK(r),o);t(r,o,i,n)}))}))}t((function(e,t,n,r){n.__dzAxisProxy=null}));var n=[];t((function(t,r,o,i){o.__dzAxisProxy||(o.__dzAxisProxy=new RK(t,r,i,e),n.push(o.__dzAxisProxy))}));var r=dd();return Ru(n,(function(e){Ru(e.getTargetSeriesModels(),(function(e){r.set(e.uid,e)}))})),r},overallReset:function(e,t){e.eachComponent("dataZoom",(function(e){e.eachTargetAxis((function(t,n){e.getAxisProxy(t,n).reset(e)})),e.eachTargetAxis((function(n,r){e.getAxisProxy(n,r).filterData(e,t)}))})),e.eachComponent("dataZoom",(function(e){var t=e.findRepresentativeAxisProxy();if(t){var n=t.getDataPercentWindow(),r=t.getDataValueWindow();e.setCalculatedRange({start:n[0],end:n[1],startValue:r[0],endValue:r[1]})}}))}};var NK=!1;function OK(e){NK||(NK=!0,e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,EK),function(e){e.registerAction("dataZoom",(function(e,t){Ru(SK(t,e),(function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})}))}))}(e),e.registerSubTypeDefaulter("dataZoom",(function(){return"slider"})))}function zK(e){e.registerComponentModel(IK),e.registerComponentView(DK),OK(e)}var BK=function(){},FK={};function VK(e,t){FK[e]=t}function WK(e){return FK[e]}const HK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.optionUpdated=function(){e.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;Ru(this.option.feature,(function(e,n){var r=WK(n);r&&(r.getDefaultOption&&(r.defaultOption=r.getDefaultOption(t)),Mu(e,r.defaultOption))}))},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},t}(rS);function GK(e,t){var n=Ow(t.get("padding")),r=t.getItemStyle(["color","opacity"]);return r.fill=t.get("backgroundColor"),e=new Gy({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get("borderRadius")},style:r,silent:!0,z2:-1})}var UK=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ru(t,e),t.prototype.render=function(e,t,n,r){var o=this.group;if(o.removeAll(),e.get("show")){var i=+e.get("itemSize"),a="vertical"===e.get("orient"),s=e.get("feature")||{},l=this._features||(this._features={}),c=[];Ru(s,(function(e,t){c.push(t)})),new _P(this._featureNames||[],c).add(u).update(u).remove(Fu(u,null)).execute(),this._featureNames=c,function(e,t,n){var r=t.getBoxLayoutParams(),o=t.get("padding"),i={width:n.getWidth(),height:n.getHeight()},a=Zw(r,i,o);qw(t.get("orient"),e,t.get("itemGap"),a.width,a.height),Kw(e,r,i,o)}(o,e,n),o.add(GK(o.getBoundingRect(),e)),a||o.eachChild((function(e){var t=e.__title,r=e.ensureState("emphasis"),a=r.textConfig||(r.textConfig={}),s=e.getTextContent(),l=s&&s.ensureState("emphasis");if(l&&!Wu(l)&&t){var c=l.style||(l.style={}),u=Sg(t,ax.makeFont(c)),d=e.x+o.x,h=!1;e.y+o.y+i+u.height>n.getHeight()&&(a.position="top",h=!0);var p=h?-5-u.height:i+10;d+u.width/2>n.getWidth()?(a.position=["100%",p],c.align="right"):d-u.width/2<0&&(a.position=[0,p],c.align="left")}}))}function u(u,d){var h,p=c[u],f=c[d],g=s[p],m=new Yb(g,e,e.ecModel);if(r&&null!=r.newTitle&&r.featureName===p&&(g.title=r.newTitle),p&&!f){if(function(e){return 0===e.indexOf("my")}(p))h={onclick:m.option.onclick,featureName:p};else{var v=WK(p);if(!v)return;h=new v}l[p]=h}else if(!(h=l[f]))return;h.uid=Zb("toolbox-feature"),h.model=m,h.ecModel=t,h.api=n;var y=h instanceof BK;p||!f?!m.get("show")||y&&h.unusable?y&&h.remove&&h.remove(t,n):(!function(r,s,l){var c,u,d=r.getModel("iconStyle"),h=r.getModel(["emphasis","iconStyle"]),p=s instanceof BK&&s.getIcons?s.getIcons():r.get("icon"),f=r.get("title")||{};Hu(p)?(c={})[l]=p:c=p;Hu(f)?(u={})[l]=f:u=f;var g=r.iconPaths={};Ru(c,(function(l,c){var p=KC(l,{},{x:-i/2,y:-i/2,width:i,height:i});p.setStyle(d.getItemStyle()),p.ensureState("emphasis").style=h.getItemStyle();var f=new ax({style:{text:u[c],align:h.get("textAlign"),borderRadius:h.get("textBorderRadius"),padding:h.get("textPadding"),fill:null,font:jb({fontStyle:h.get("textFontStyle"),fontFamily:h.get("textFontFamily"),fontSize:h.get("textFontSize"),fontWeight:h.get("textFontWeight")},t)},ignore:!0});p.setTextContent(f),eM({el:p,componentModel:e,itemName:c,formatterParamsExtra:{title:u[c]}}),p.__title=u[c],p.on("mouseover",(function(){var t=h.getItemStyle(),r=a?null==e.get("right")&&"right"!==e.get("left")?"right":"left":null==e.get("bottom")&&"bottom"!==e.get("top")?"bottom":"top";f.setStyle({fill:h.get("textFill")||t.fill||t.stroke||"#000",backgroundColor:h.get("textBackgroundColor")}),p.setTextConfig({position:h.get("textPosition")||r}),f.ignore=!e.get("showTitle"),n.enterEmphasis(this)})).on("mouseout",(function(){"emphasis"!==r.get(["iconStatus",c])&&n.leaveEmphasis(this),f.hide()})),("emphasis"===r.get(["iconStatus",c])?Vx:Wx)(p),o.add(p),p.on("click",Bu(s.onclick,s,t,n,c)),g[c]=p}))}(m,h,p),m.setIconStatus=function(e,t){var n=this.option,r=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[e]=t,r[e]&&("emphasis"===t?Vx:Wx)(r[e])},h instanceof BK&&h.render&&h.render(m,t,n,r)):y&&h.dispose&&h.dispose(t,n)}},t.prototype.updateView=function(e,t,n,r){Ru(this._features,(function(e){e instanceof BK&&e.updateView&&e.updateView(e.model,t,n,r)}))},t.prototype.remove=function(e,t){Ru(this._features,(function(n){n instanceof BK&&n.remove&&n.remove(e,t)})),this.group.removeAll()},t.prototype.dispose=function(e,t){Ru(this._features,(function(n){n instanceof BK&&n.dispose&&n.dispose(e,t)}))},t.type="toolbox",t}(tk);const XK=UK;const YK=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ru(t,e),t.prototype.onclick=function(e,t){var n=this.model,r=n.get("name")||e.get("title.0.text")||"echarts",o="svg"===t.getZr().painter.getType(),i=o?"svg":n.get("type",!0)||"png",a=t.getConnectedDataURL({type:i,backgroundColor:n.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),s=au.browser;if("function"!==typeof MouseEvent||!s.newEdge&&(s.ie||s.edge))if(window.navigator.msSaveOrOpenBlob||o){var l=a.split(","),c=l[0].indexOf("base64")>-1,u=o?decodeURIComponent(l[1]):l[1];c&&(u=window.atob(u));var d=r+"."+i;if(window.navigator.msSaveOrOpenBlob){for(var h=u.length,p=new Uint8Array(h);h--;)p[h]=u.charCodeAt(h);var f=new Blob([p]);window.navigator.msSaveOrOpenBlob(f,d)}else{var g=document.createElement("iframe");document.body.appendChild(g);var m=g.contentWindow,v=m.document;v.open("image/svg+xml","replace"),v.write(u),v.close(),m.focus(),v.execCommand("SaveAs",!0,d),document.body.removeChild(g)}}else{var y=n.get("lang"),x='<body style="margin:0;"><img src="'+a+'" style="max-width:100%;" title="'+(y&&y[0]||"")+'" /></body>',b=window.open();b.document.write(x),b.document.title=r}else{var w=document.createElement("a");w.download=r+"."+i,w.target="_blank",w.href=a;var S=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});w.dispatchEvent(S)}},t.getDefaultOption=function(e){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:e.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:e.getLocaleModel().get(["toolbox","saveAsImage","lang"])}},t}(BK);var qK="__ec_magicType_stack__",ZK=[["line","bar"],["stack"]],KK=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ru(t,e),t.prototype.getIcons=function(){var e=this.model,t=e.get("icon"),n={};return Ru(e.get("type"),(function(e){t[e]&&(n[e]=t[e])})),n},t.getDefaultOption=function(e){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:e.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},t.prototype.onclick=function(e,t,n){var r=this.model,o=r.get(["seriesIndex",n]);if($K[n]){var i,a={series:[]};Ru(ZK,(function(e){ju(e,n)>=0&&Ru(e,(function(e){r.setIconStatus(e,"normal")}))})),r.setIconStatus(n,"emphasis"),e.eachComponent({mainType:"series",query:null==o?null:{seriesIndex:o}},(function(e){var t=e.subType,o=e.id,i=$K[n](t,o,e,r);i&&(Du(i,e.option),a.series.push(i));var s=e.coordinateSystem;if(s&&"cartesian2d"===s.type&&("line"===n||"bar"===n)){var l=s.getAxesByScale("ordinal")[0];if(l){var c=l.dim+"Axis",u=e.getReferringComponents(c,Em).models[0].componentIndex;a[c]=a[c]||[];for(var d=0;d<=u;d++)a[c][u]=a[c][u]||{};a[c][u].boundaryGap="bar"===n}}}));var s=n;"stack"===n&&(i=Mu({stack:r.option.title.tiled,tiled:r.option.title.stack},r.option.title),"emphasis"!==r.get(["iconStatus",n])&&(s="tiled")),t.dispatchAction({type:"changeMagicType",currentType:s,newOption:a,newTitle:i,featureName:"magicType"})}},t}(BK),$K={line:function(e,t,n,r){if("bar"===e)return Mu({id:t,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},r.get(["option","line"])||{},!0)},bar:function(e,t,n,r){if("line"===e)return Mu({id:t,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},r.get(["option","bar"])||{},!0)},stack:function(e,t,n,r){var o=n.get("stack")===qK;if("line"===e||"bar"===e)return r.setIconStatus("stack",o?"normal":"emphasis"),Mu({id:t,stack:o?"":qK},r.get(["option","stack"])||{},!0)}};tD({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(e,t){t.mergeOption(e.newOption)}));const QK=KK;var JK=new Array(60).join("-"),e$="\t";function t$(e){var t=[];return Ru(e,(function(e,n){var r=e.categoryAxis,o=e.valueAxis.dim,i=[" "].concat(Eu(e.series,(function(e){return e.name}))),a=[r.model.getCategories()];Ru(e.series,(function(e){var t=e.getRawData();a.push(e.getRawData().mapArray(t.mapDimension(o),(function(e){return e})))}));for(var s=[i.join(e$)],l=0;l<a[0].length;l++){for(var c=[],u=0;u<a.length;u++)c.push(a[u][l]);s.push(c.join(e$))}t.push(s.join("\n"))})),t.join("\n\n"+JK+"\n\n")}function n$(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var r$=new RegExp("["+e$+"]+","g");function o$(e,t){var n=e.split(new RegExp("\n*"+JK+"\n*","g")),r={series:[]};return Ru(n,(function(e,n){if(function(e){if(e.slice(0,e.indexOf("\n")).indexOf(e$)>=0)return!0}(e)){var o=function(e){for(var t=e.split(/\n+/g),n=[],r=Eu(n$(t.shift()).split(r$),(function(e){return{name:e,data:[]}})),o=0;o<t.length;o++){var i=n$(t[o]).split(r$);n.push(i.shift());for(var a=0;a<i.length;a++)r[a]&&(r[a].data[o]=i[a])}return{series:r,categories:n}}(e),i=t[n],a=i.axisDim+"Axis";i&&(r[a]=r[a]||[],r[a][i.axisIndex]={data:o.categories},r.series=r.series.concat(o.series))}else{o=function(e){for(var t=e.split(/\n+/g),n=n$(t.shift()),r=[],o=0;o<t.length;o++){var i=n$(t[o]);if(i){var a=i.split(r$),s="",l=void 0,c=!1;isNaN(a[0])?(c=!0,s=a[0],a=a.slice(1),r[o]={name:s,value:[]},l=r[o].value):l=r[o]=[];for(var u=0;u<a.length;u++)l.push(+a[u]);1===l.length&&(c?r[o].value=l[0]:r[o]=l[0])}}return{name:n,data:r}}(e);r.series.push(o)}})),r}var i$=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ru(t,e),t.prototype.onclick=function(e,t){setTimeout((function(){t.dispatchAction({type:"hideTip"})}));var n=t.getDom(),r=this.model;this._dom&&n.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",o.style.backgroundColor=r.get("backgroundColor")||"#fff";var i=document.createElement("h4"),a=r.get("lang")||[];i.innerHTML=a[0]||r.get("title"),i.style.cssText="margin:10px 20px",i.style.color=r.get("textColor");var s=document.createElement("div"),l=document.createElement("textarea");s.style.cssText="overflow:auto";var c=r.get("optionToContent"),u=r.get("contentToOption"),d=function(e){var t,n=function(e){var t={},n=[],r=[];return e.eachRawSeries((function(e){var o=e.coordinateSystem;if(!o||"cartesian2d"!==o.type&&"polar"!==o.type)n.push(e);else{var i=o.getBaseAxis();if("category"===i.type){var a=i.dim+"_"+i.index;t[a]||(t[a]={categoryAxis:i,valueAxis:o.getOtherAxis(i),series:[]},r.push({axisDim:i.dim,axisIndex:i.index})),t[a].series.push(e)}else n.push(e)}})),{seriesGroupByCategoryAxis:t,other:n,meta:r}}(e);return{value:Ou([t$(n.seriesGroupByCategoryAxis),(t=n.other,Eu(t,(function(e){var t=e.getRawData(),n=[e.name],r=[];return t.each(t.dimensions,(function(){for(var e=arguments.length,o=arguments[e-1],i=t.getName(o),a=0;a<e-1;a++)r[a]=arguments[a];n.push((i?i+e$:"")+r.join(e$))})),n.join("\n")})).join("\n\n"+JK+"\n\n"))],(function(e){return!!e.replace(/[\n\t\s]/g,"")})).join("\n\n"+JK+"\n\n"),meta:n.meta}}(e);if(Wu(c)){var h=c(t.getOption());Hu(h)?s.innerHTML=h:Zu(h)&&s.appendChild(h)}else{l.readOnly=r.get("readOnly");var p=l.style;p.cssText="display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none",p.color=r.get("textColor"),p.borderColor=r.get("textareaBorderColor"),p.backgroundColor=r.get("textareaColor"),l.value=d.value,s.appendChild(l)}var f=d.meta,g=document.createElement("div");g.style.cssText="position:absolute;bottom:5px;left:0;right:0";var m="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",v=document.createElement("div"),y=document.createElement("div");m+=";background-color:"+r.get("buttonColor"),m+=";color:"+r.get("buttonTextColor");var x=this;function b(){n.removeChild(o),x._dom=null}ah(v,"click",b),ah(y,"click",(function(){if(null==u&&null!=c||null!=u&&null==c)b();else{var e;try{e=Wu(u)?u(s,t.getOption()):o$(l.value,f)}catch(Bk){throw b(),new Error("Data view format error "+Bk)}e&&t.dispatchAction({type:"changeDataView",newOption:e}),b()}})),v.innerHTML=a[1],y.innerHTML=a[2],y.style.cssText=v.style.cssText=m,!r.get("readOnly")&&g.appendChild(y),g.appendChild(v),o.appendChild(i),o.appendChild(s),o.appendChild(g),s.style.height=n.clientHeight-80+"px",n.appendChild(o),this._dom=o},t.prototype.remove=function(e,t){this._dom&&t.getDom().removeChild(this._dom)},t.prototype.dispose=function(e,t){this.remove(e,t)},t.getDefaultOption=function(e){return{show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:e.getLocaleModel().get(["toolbox","dataView","title"]),lang:e.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"}},t}(BK);function a$(e,t){return Eu(e,(function(e,n){var r=t&&t[n];if(Xu(r)&&!Vu(r)){Xu(e)&&!Vu(e)||(e={value:e});var o=null!=r.name&&null==e.name;return e=Du(e,r),o&&delete e.name,e}return e}))}tD({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},(function(e,t){var n=[];Ru(e.newOption.series,(function(e){var r=t.getSeriesByName(e.name)[0];if(r){var o=r.get("data");n.push({name:e.name,data:a$(e.data,o)})}else n.push(Tu({type:"scatter"},e))})),t.mergeOption(Du({series:n},e.newOption))}));const s$=i$;var l$=Ru,c$=jm();function u$(e){var t=c$(e);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var d$=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ru(t,e),t.prototype.onclick=function(e,t){!function(e){c$(e).snapshots=null}(e),t.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(e){return{show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:e.getLocaleModel().get(["toolbox","restore","title"])}},t}(BK);tD({type:"restore",event:"restore",update:"prepareAndUpdate"},(function(e,t){t.resetOption("recreate")}));const h$=d$;var p$=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],f$=function(){function e(e,t,n){var r=this;this._targetInfoList=[];var o=m$(t,e);Ru(v$,(function(e,t){(!n||!n.include||ju(n.include,t)>=0)&&e(o,r._targetInfoList)}))}return e.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,(function(e,t,n){if((e.coordRanges||(e.coordRanges=[])).push(t),!e.coordRange){e.coordRange=t;var r=b$[e.brushType](0,n,t);e.__rangeOffset={offset:S$[e.brushType](r.values,e.range,[1,1]),xyMinMax:r.xyMinMax}}})),e},e.prototype.matchOutputRanges=function(e,t,n){Ru(e,(function(e){var r=this.findTargetInfo(e,t);r&&!0!==r&&Ru(r.coordSyses,(function(r){var o=b$[e.brushType](1,r,e.range,!0);n(e,o.values,r,t)}))}),this)},e.prototype.setInputRanges=function(e,t){Ru(e,(function(e){var n=this.findTargetInfo(e,t);if(e.range=e.range||[],n&&!0!==n){e.panelId=n.panelId;var r=b$[e.brushType](0,n.coordSys,e.coordRange),o=e.__rangeOffset;e.range=o?S$[e.brushType](r.values,o.offset,function(e,t){var n=A$(e),r=A$(t),o=[n[0]/r[0],n[1]/r[1]];return isNaN(o[0])&&(o[0]=1),isNaN(o[1])&&(o[1]=1),o}(r.xyMinMax,o.xyMinMax)):r.values}}),this)},e.prototype.makePanelOpts=function(e,t){return Eu(this._targetInfoList,(function(n){var r=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:gG(r),isTargetByCursor:vG(r,e,n.coordSysModel),getLinearBrushOtherExtent:mG(r)}}))},e.prototype.controlSeries=function(e,t,n){var r=this.findTargetInfo(e,n);return!0===r||r&&ju(r.coordSyses,t.coordinateSystem)>=0},e.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,r=m$(t,e),o=0;o<n.length;o++){var i=n[o],a=e.panelId;if(a){if(i.panelId===a)return i}else for(var s=0;s<y$.length;s++)if(y$[s](r,i))return i}return!0},e}();function g$(e){return e[0]>e[1]&&e.reverse(),e}function m$(e,t){return Lm(e,t,{includeMainTypes:p$})}var v$={grid:function(e,t){var n=e.xAxisModels,r=e.yAxisModels,o=e.gridModels,i=dd(),a={},s={};(n||r||o)&&(Ru(n,(function(e){var t=e.axis.grid.model;i.set(t.id,t),a[t.id]=!0})),Ru(r,(function(e){var t=e.axis.grid.model;i.set(t.id,t),s[t.id]=!0})),Ru(o,(function(e){i.set(e.id,e),a[e.id]=!0,s[e.id]=!0})),i.each((function(e){var o=e.coordinateSystem,i=[];Ru(o.getCartesians(),(function(e,t){(ju(n,e.getAxis("x").model)>=0||ju(r,e.getAxis("y").model)>=0)&&i.push(e)})),t.push({panelId:"grid--"+e.id,gridModel:e,coordSysModel:e,coordSys:i[0],coordSyses:i,getPanelRect:x$.grid,xAxisDeclared:a[e.id],yAxisDeclared:s[e.id]})})))},geo:function(e,t){Ru(e.geoModels,(function(e){var n=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:x$.geo})}))}},y$=[function(e,t){var n=e.xAxisModel,r=e.yAxisModel,o=e.gridModel;return!o&&n&&(o=n.axis.grid.model),!o&&r&&(o=r.axis.grid.model),o&&o===t.gridModel},function(e,t){var n=e.geoModel;return n&&n===t.geoModel}],x$={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(HC(e)),t}},b$={lineX:Fu(w$,0),lineY:Fu(w$,1),rect:function(e,t,n,r){var o=e?t.pointToData([n[0][0],n[1][0]],r):t.dataToPoint([n[0][0],n[1][0]],r),i=e?t.pointToData([n[0][1],n[1][1]],r):t.dataToPoint([n[0][1],n[1][1]],r),a=[g$([o[0],i[0]]),g$([o[1],i[1]])];return{values:a,xyMinMax:a}},polygon:function(e,t,n,r){var o=[[1/0,-1/0],[1/0,-1/0]];return{values:Eu(n,(function(n){var i=e?t.pointToData(n,r):t.dataToPoint(n,r);return o[0][0]=Math.min(o[0][0],i[0]),o[1][0]=Math.min(o[1][0],i[1]),o[0][1]=Math.max(o[0][1],i[0]),o[1][1]=Math.max(o[1][1],i[1]),i})),xyMinMax:o}}};function w$(e,t,n,r){var o=n.getAxis(["x","y"][e]),i=g$(Eu([0,1],(function(e){return t?o.coordToData(o.toLocalCoord(r[e]),!0):o.toGlobalCoord(o.dataToCoord(r[e]))}))),a=[];return a[e]=i,a[1-e]=[NaN,NaN],{values:i,xyMinMax:a}}var S$={lineX:Fu(_$,0),lineY:Fu(_$,1),rect:function(e,t,n){return[[e[0][0]-n[0]*t[0][0],e[0][1]-n[0]*t[0][1]],[e[1][0]-n[1]*t[1][0],e[1][1]-n[1]*t[1][1]]]},polygon:function(e,t,n){return Eu(e,(function(e,r){return[e[0]-n[0]*t[r][0],e[1]-n[1]*t[r][1]]}))}};function _$(e,t,n,r){return[t[0]-r[e]*n[0],t[1]-r[e]*n[1]]}function A$(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}const k$=f$;var C$,M$,I$=Ru,T$=ym+"toolbox-dataZoom_",D$=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ru(t,e),t.prototype.render=function(e,t,n,r){this._brushController||(this._brushController=new fG(n.getZr()),this._brushController.on("brush",Bu(this._onBrush,this)).mount()),function(e,t,n,r,o){var i=n._isZoomActive;r&&"takeGlobalCursor"===r.type&&(i="dataZoomSelect"===r.key&&r.dataZoomSelectActive);n._isZoomActive=i,e.setIconStatus("zoom",i?"emphasis":"normal");var a=new k$(P$(e),t,{include:["grid"]}),s=a.makePanelOpts(o,(function(e){return e.xAxisDeclared&&!e.yAxisDeclared?"lineX":!e.xAxisDeclared&&e.yAxisDeclared?"lineY":"rect"}));n._brushController.setPanels(s).enableBrush(!(!i||!s.length)&&{brushType:"auto",brushStyle:e.getModel("brushStyle").getItemStyle()})}(e,t,this,r,n),function(e,t){e.setIconStatus("back",function(e){return u$(e).length}(t)>1?"emphasis":"normal")}(e,t)},t.prototype.onclick=function(e,t,n){j$[n].call(this)},t.prototype.remove=function(e,t){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(e,t){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var t=e.areas;if(e.isEnd&&t.length){var n={},r=this.ecModel;this._brushController.updateCovers([]),new k$(P$(this.model),r,{include:["grid"]}).matchOutputRanges(t,r,(function(e,t,n){if("cartesian2d"===n.type){var r=e.brushType;"rect"===r?(o("x",n,t[0]),o("y",n,t[1])):o({lineX:"x",lineY:"y"}[r],n,t)}})),function(e,t){var n=u$(e);l$(t,(function(t,r){for(var o=n.length-1;o>=0&&!n[o][r];o--);if(o<0){var i=e.queryComponents({mainType:"dataZoom",subType:"select",id:r})[0];if(i){var a=i.getPercentRange();n[0][r]={dataZoomId:r,start:a[0],end:a[1]}}}})),n.push(t)}(r,n),this._dispatchZoomAction(n)}function o(e,t,o){var i=t.getAxis(e),a=i.model,s=function(e,t,n){var r;return n.eachComponent({mainType:"dataZoom",subType:"select"},(function(n){n.getAxisModel(e,t.componentIndex)&&(r=n)})),r}(e,a,r),l=s.findRepresentativeAxisProxy(a).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(o=sH(0,o.slice(),i.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(n[s.id]={dataZoomId:s.id,startValue:o[0],endValue:o[1]})}},t.prototype._dispatchZoomAction=function(e){var t=[];I$(e,(function(e,n){t.push(Cu(e))})),t.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:t})},t.getDefaultOption=function(e){return{show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:e.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},t}(BK),j$={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(function(e){var t=u$(e),n=t[t.length-1];t.length>1&&t.pop();var r={};return l$(n,(function(e,n){for(var o=t.length-1;o>=0;o--)if(e=t[o][n]){r[n]=e;break}})),r}(this.ecModel))}};function P$(e){var t={xAxisIndex:e.get("xAxisIndex",!0),yAxisIndex:e.get("yAxisIndex",!0),xAxisId:e.get("xAxisId",!0),yAxisId:e.get("yAxisId",!0)};return null==t.xAxisIndex&&null==t.xAxisId&&(t.xAxisIndex="all"),null==t.yAxisIndex&&null==t.yAxisId&&(t.yAxisIndex="all"),t}C$="dataZoom",M$=function(e){var t=e.getComponent("toolbox",0),n=["feature","dataZoom"];if(t&&null!=t.get(n)){var r=t.getModel(n),o=[],i=Lm(e,P$(r));return I$(i.xAxisModels,(function(e){return a(e,"xAxis","xAxisIndex")})),I$(i.yAxisModels,(function(e){return a(e,"yAxis","yAxisIndex")})),o}function a(e,t,n){var i=e.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:r.get("filterMode",!0)||"filter",id:T$+t+i};a[n]=i,o.push(a)}},rd(null==_S.get(C$)&&M$),_S.set(C$,M$);const L$=D$;const R$=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},t}(rS);function E$(e){var t=e.get("confine");return null!=t?!!t:"richText"===e.get("renderMode")}function N$(e){if(au.domSupported)for(var t=document.documentElement.style,n=0,r=e.length;n<r;n++)if(e[n]in t)return e[n]}var O$=N$(["transform","webkitTransform","OTransform","MozTransform","msTransform"]);function z$(e,t){if(!e)return t;t=Nw(t,!0);var n=e.indexOf(t);return(e=-1===n?t:"-"+e.slice(0,n)+"-"+t).toLowerCase()}var B$=z$(N$(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),"transition"),F$=z$(O$,"transform"),V$="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(au.transform3dSupported?"will-change:transform;":"");function W$(e,t,n){var r=e.toFixed(0)+"px",o=t.toFixed(0)+"px";if(!au.transformSupported)return n?"top:"+o+";left:"+r+";":[["top",o],["left",r]];var i=au.transform3dSupported,a="translate"+(i?"3d":"")+"("+r+","+o+(i?",0":"")+")";return n?"top:0;left:0;"+F$+":"+a+";":[["top",0],["left",0],[O$,a]]}function H$(e,t,n){var r=[],o=e.get("transitionDuration"),i=e.get("backgroundColor"),a=e.get("shadowBlur"),s=e.get("shadowColor"),l=e.get("shadowOffsetX"),c=e.get("shadowOffsetY"),u=e.getModel("textStyle"),d=BA(e,"html"),h=l+"px "+c+"px "+a+"px "+s;return r.push("box-shadow:"+h),t&&o&&r.push(function(e,t){var n="cubic-bezier(0.23,1,0.32,1)",r=" "+e/2+"s "+n,o="opacity"+r+",visibility"+r;return t||(r=" "+e+"s "+n,o+=au.transformSupported?","+F$+r:",left"+r+",top"+r),B$+":"+o}(o,n)),i&&r.push("background-color:"+i),Ru(["width","color","radius"],(function(t){var n="border-"+t,o=Nw(n),i=e.get(o);null!=i&&r.push(n+":"+i+("color"===t?"":"px"))})),r.push(function(e){var t=[],n=e.get("fontSize"),r=e.getTextColor();r&&t.push("color:"+r),t.push("font:"+e.getFont()),n&&t.push("line-height:"+Math.round(3*n/2)+"px");var o=e.get("textShadowColor"),i=e.get("textShadowBlur")||0,a=e.get("textShadowOffsetX")||0,s=e.get("textShadowOffsetY")||0;return o&&i&&t.push("text-shadow:"+a+"px "+s+"px "+i+"px "+o),Ru(["decoration","align"],(function(n){var r=e.get(n);r&&t.push("text-"+n+":"+r)})),t.join(";")}(u)),null!=d&&r.push("padding:"+Ow(d).join("px ")+"px"),r.join(";")+";"}function G$(e,t,n,r,o){var i=t&&t.painter;if(n){var a=i&&i.getViewportRoot();a&&function(e,t,n,r,o){qd(Yd,t,r,o,!0)&&qd(e,n,Yd[0],Yd[1])}(e,a,n,r,o)}else{e[0]=r,e[1]=o;var s=i&&i.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var U$=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,au.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),o=t.appendTo,i=o&&(Hu(o)?document.querySelector(o):Zu(o)?o:Wu(o)&&o(e.getDom()));G$(this._styleCoord,r,i,e.getWidth()/2,e.getHeight()/2),(i||e.getDom()).appendChild(n),this._api=e,this._container=i;var a=this;n.onmouseenter=function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0},n.onmousemove=function(e){if(e=e||window.event,!a._enterable){var t=r.handler;ih(r.painter.getViewportRoot(),e,!0),t.dispatch("mousemove",e)}},n.onmouseleave=function(){a._inContent=!1,a._enterable&&a._show&&a.hideLater(a._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=function(e,t){var n=e.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(e);return n?t?n[t]:n:null}(t,"position"),r=t.style;"absolute"!==r.position&&"absolute"!==n&&(r.position="relative")}var o=e.get("alwaysShowContent");o&&this._moveIfResized(),this._alwaysShowContent=o,this.el.className=e.get("className")||""},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,o=this._styleCoord;n.innerHTML?r.cssText=V$+H$(e,!this._firstShow,this._longHide)+W$(o[0],o[1],!0)+"border-color:"+Ww(t)+";"+(e.get("extraCssText")||"")+";pointer-events:"+(this._enterable?"auto":"none"):r.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,o){var i=this.el;if(null!=e){var a="";if(Hu(o)&&"item"===n.get("trigger")&&!E$(n)&&(a=function(e,t,n){if(!Hu(n)||"inside"===n)return"";var r=e.get("backgroundColor"),o=e.get("borderWidth");t=Ww(t);var i,a,s="left"===(i=n)?"right":"right"===i?"left":"top"===i?"bottom":"top",l=Math.max(1.5*Math.round(o),6),c="",u=F$+":";ju(["left","right"],s)>-1?(c+="top:50%",u+="translateY(-50%) rotate("+(a="left"===s?-225:-45)+"deg)"):(c+="left:50%",u+="translateX(-50%) rotate("+(a="top"===s?225:45)+"deg)");var d=a*Math.PI/180,h=l+o,p=h*Math.abs(Math.cos(d))+h*Math.abs(Math.sin(d)),f=t+" solid "+o+"px;";return'<div style="'+["position:absolute;width:"+l+"px;height:"+l+"px;z-index:-1;",(c+=";"+s+":-"+Math.round(100*((p-Math.SQRT2*o)/2+Math.SQRT2*o-(p-h)/2))/100+"px")+";"+u+";","border-bottom:"+f,"border-right:"+f,"background-color:"+r+";"].join("")+'"></div>'}(n,r,o)),Hu(e))i.innerHTML=e+a;else if(e){i.innerHTML="",Vu(e)||(e=[e]);for(var s=0;s<e.length;s++)Zu(e[s])&&e[s].parentNode!==i&&i.appendChild(e[s]);if(a&&i.childNodes.length){var l=document.createElement("div");l.innerHTML=a,i.appendChild(l)}}}else i.innerHTML=""},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el;return[e.offsetWidth,e.offsetHeight]},e.prototype.moveTo=function(e,t){var n=this._styleCoord;if(G$(n,this._zr,this._container,e,t),null!=n[0]&&null!=n[1]){var r=this.el.style;Ru(W$(n[0],n[1]),(function(e){r[e[0]]=e[1]}))}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){var e=this,t=this.el.style;t.visibility="hidden",t.opacity="0",au.transform3dSupported&&(t.willChange=""),this._show=!1,this._longHideTimeout=setTimeout((function(){return e._longHide=!0}),500)},e.prototype.hideLater=function(e){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(Bu(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this.el.parentNode;e&&e.removeChild(this.el),this.el=this._container=null},e}();const X$=U$;var Y$=function(){function e(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),K$(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return e.prototype.update=function(e){var t=e.get("alwaysShowContent");t&&this._moveIfResized(),this._alwaysShowContent=t},e.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},e.prototype.setContent=function(e,t,n,r,o){var i=this;Xu(e)&&X_(""),this.el&&this._zr.remove(this.el);var a=n.getModel("textStyle");this.el=new ax({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:r,textShadowColor:a.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:BA(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),Ru(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],(function(e){i.el.style[e]=n.get(e)})),Ru(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],(function(e){i.el.style[e]=a.get(e)||0})),this._zr.add(this.el);var s=this;this.el.on("mouseover",(function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0})),this.el.on("mouseout",(function(){s._enterable&&s._show&&s.hideLater(s._hideDelay),s._inContent=!1}))},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),n=Z$(e.style);return[t.width+n.left+n.right,t.height+n.top+n.bottom]},e.prototype.moveTo=function(e,t){var n=this.el;if(n){var r=this._styleCoord;K$(r,this._zr,e,t),e=r[0],t=r[1];var o=n.style,i=q$(o.borderWidth||0),a=Z$(o);n.x=e+i+a.left,n.y=t+i+a.top,n.markRedraw()}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},e.prototype.hideLater=function(e){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(Bu(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}();function q$(e){return Math.max(0,e)}function Z$(e){var t=q$(e.shadowBlur||0),n=q$(e.shadowOffsetX||0),r=q$(e.shadowOffsetY||0);return{left:q$(t-n),right:q$(t+n),top:q$(t-r),bottom:q$(t+r)}}function K$(e,t,n,r){e[0]=n,e[1]=r,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}const $$=Y$;var Q$=new Gy({shape:{x:-1,y:-1,width:2,height:2}}),J$=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.init=function(e,t){if(!au.node&&t.getDom()){var n,r=e.getComponent("tooltip"),o=this._renderMode="auto"===(n=r.get("renderMode"))?au.domSupported?"html":"richText":n||"html";this._tooltipContent="richText"===o?new $$(t):new X$(t,{appendTo:r.get("appendToBody",!0)?"body":r.get("appendTo",!0)})}},t.prototype.render=function(e,t,n){if(!au.node&&n.getDom()){this.group.removeAll(),this._tooltipModel=e,this._ecModel=t,this._api=n;var r=this._tooltipContent;r.update(e),r.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow(),"richText"!==this._renderMode&&e.get("transitionDuration")?mM(this,"_updatePosition",50,"fixRate"):vM(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel.get("triggerOn");jq("itemTooltip",this._api,Bu((function(t,n,r){"none"!==e&&(e.indexOf(t)>=0?this._tryShow(n,r):"leave"===t&&this._hide(r))}),this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==r&&"click"!==r){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&o.manuallyShowTip(e,t,n,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})}))}},t.prototype.manuallyShowTip=function(e,t,n,r){if(r.from!==this.uid&&!au.node&&n.getDom()){var o=tQ(r,n);this._ticket="";var i=r.dataByCoordSys,a=function(e,t,n){var r=Rm(e).queryOptionMap,o=r.keys()[0];if(!o||"series"===o)return;var i=Om(t,o,r.get(o),{useDefault:!1,enableAll:!1,enableNone:!1}),a=i.models[0];if(!a)return;var s,l=n.getViewOfComponentModel(a);if(l.group.traverse((function(t){var n=sx(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0})),s)return{componentMainType:o,componentIndex:a.componentIndex,el:s}}(r,t,n);if(a){var s=a.el.getBoundingRect().clone();s.applyTransform(a.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:a.el,position:r.position,positionDefault:"bottom"},o)}else if(r.tooltip&&null!=r.x&&null!=r.y){var l=Q$;l.x=r.x,l.y=r.y,l.update(),sx(l).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:l},o)}else if(i)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:i,tooltipOption:r.tooltipOption},o);else if(null!=r.seriesIndex){if(this._manuallyAxisShowTip(e,t,n,r))return;var c=Oq(r,t),u=c.point[0],d=c.point[1];null!=u&&null!=d&&this._tryShow({offsetX:u,offsetY:d,target:c.el,position:r.position,positionDefault:"bottom"},o)}else null!=r.x&&null!=r.y&&(n.dispatchAction({type:"updateAxisPointer",x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},o))}},t.prototype.manuallyHideTip=function(e,t,n,r){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,r.from!==this.uid&&this._hide(tQ(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var o=r.seriesIndex,i=r.dataIndex,a=t.getComponent("axisPointer").coordSysAxesInfo;if(null!=o&&null!=i&&null!=a){var s=t.getSeriesByIndex(o);if(s)if("axis"===eQ([s.getData().getItemModel(i),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:i,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){var o,i;if("legend"===sx(n).ssrType)return;this._lastDataByCoordSys=null,lI(n,(function(e){return null!=sx(e).dataIndex?(o=e,!0):null!=sx(e).tooltipConfig?(i=e,!0):void 0}),!0),o?this._showSeriesItemTooltip(e,o,t):i?this._showComponentItemTooltip(e,i,t):this._hide(t)}else this._lastDataByCoordSys=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get("showDelay");t=Bu(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,o=[t.offsetX,t.offsetY],i=eQ([t.tooltipOption],r),a=this._renderMode,s=[],l=TA("section",{blocks:[],noHeader:!0}),c=[],u=new FA;Ru(e,(function(e){Ru(e.dataByAxis,(function(e){var t=n.getComponent(e.axisDim+"Axis",e.axisIndex),o=e.value;if(t&&null!=o){var i=vq(o,t.axis,n,e.seriesDataIndices,e.valueLabelOpt),d=TA("section",{header:i,noHeader:!od(i),sortBlocks:!0,blocks:[]});l.blocks.push(d),Ru(e.seriesDataIndices,(function(l){var h=n.getSeriesByIndex(l.seriesIndex),p=l.dataIndexInside,f=h.getDataParams(p);if(!(f.dataIndex<0)){f.axisDim=e.axisDim,f.axisIndex=e.axisIndex,f.axisType=e.axisType,f.axisId=e.axisId,f.axisValue=aN(t.axis,{value:o}),f.axisValueLabel=i,f.marker=u.makeTooltipMarker("item",Ww(f.color),a);var g=V_(h.formatTooltip(p,!0,null)),m=g.frag;if(m){var v=eQ([h],r).get("valueFormatter");d.blocks.push(v?Tu({valueFormatter:v},m):m)}g.text&&c.push(g.text),s.push(f)}}))}}))})),l.blocks.reverse(),c.reverse();var d=t.position,h=i.get("order"),p=EA(l,u,a,h,n.get("useUTC"),i.get("textStyle"));p&&c.unshift(p);var f="richText"===a?"\n\n":"<br/>",g=c.join(f);this._showOrMove(i,(function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(i,d,o[0],o[1],this._tooltipContent,s):this._showTooltipContent(i,g,s,Math.random()+"",o[0],o[1],d,null,u)}))},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,o=sx(t),i=o.seriesIndex,a=r.getSeriesByIndex(i),s=o.dataModel||a,l=o.dataIndex,c=o.dataType,u=s.getData(c),d=this._renderMode,h=e.positionDefault,p=eQ([u.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,h?{position:h}:null),f=p.get("trigger");if(null==f||"item"===f){var g=s.getDataParams(l,c),m=new FA;g.marker=m.makeTooltipMarker("item",Ww(g.color),d);var v=V_(s.formatTooltip(l,!1,c)),y=p.get("order"),x=p.get("valueFormatter"),b=v.frag,w=b?EA(x?Tu({valueFormatter:x},b):b,m,d,y,r.get("useUTC"),p.get("textStyle")):v.text,S="item_"+s.name+"_"+l;this._showOrMove(p,(function(){this._showTooltipContent(p,w,g,S,e.offsetX,e.offsetY,e.position,e.target,m)})),n({type:"showTip",dataIndexInside:l,dataIndex:u.getRawIndex(l),seriesIndex:i,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r="html"===this._renderMode,o=sx(t),i=o.tooltipConfig.option||{},a=i.encodeHTMLContent;if(Hu(i)){i={content:i,formatter:i},a=!0}a&&r&&i.content&&((i=Cu(i)).content=Qd(i.content));var s=[i],l=this._ecModel.getComponent(o.componentMainType,o.componentIndex);l&&s.push(l),s.push({formatter:i.content});var c=e.positionDefault,u=eQ(s,this._tooltipModel,c?{position:c}:null),d=u.get("content"),h=Math.random()+"",p=new FA;this._showOrMove(u,(function(){var n=Cu(u.get("formatterParams")||{});this._showTooltipContent(u,d,n,h,e.offsetX,e.offsetY,e.position,t,p)})),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,o,i,a,s,l){if(this._ticket="",e.get("showContent")&&e.get("show")){var c=this._tooltipContent;c.setEnterable(e.get("enterable"));var u=e.get("formatter");a=a||e.get("position");var d=t,h=this._getNearestPoint([o,i],n,e.get("trigger"),e.get("borderColor")).color;if(u)if(Hu(u)){var p=e.ecModel.get("useUTC"),f=Vu(n)?n[0]:n;d=u,f&&f.axisType&&f.axisType.indexOf("time")>=0&&(d=yw(f.axisValue,d,p)),d=Vw(d,n,!0)}else if(Wu(u)){var g=Bu((function(t,r){t===this._ticket&&(c.setContent(r,l,e,h,a),this._updatePosition(e,a,o,i,c,n,s))}),this);this._ticket=r,d=u(n,r,g)}else d=u;c.setContent(d,l,e,h,a),c.show(e,h),this._updatePosition(e,a,o,i,c,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r){return"axis"===n||Vu(t)?{color:r||("html"===this._renderMode?"#fff":"none")}:Vu(t)?void 0:{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,o,i,a){var s=this._api.getWidth(),l=this._api.getHeight();t=t||e.get("position");var c=o.getSize(),u=e.get("align"),d=e.get("verticalAlign"),h=a&&a.getBoundingRect().clone();if(a&&h.applyTransform(a.transform),Wu(t)&&(t=t([n,r],i,o.el,h,{viewSize:[s,l],contentSize:c.slice()})),Vu(t))n=Zg(t[0],s),r=Zg(t[1],l);else if(Xu(t)){var p=t;p.width=c[0],p.height=c[1];var f=Zw(p,{width:s,height:l});n=f.x,r=f.y,u=null,d=null}else if(Hu(t)&&a){var g=function(e,t,n,r){var o=n[0],i=n[1],a=Math.ceil(Math.SQRT2*r)+8,s=0,l=0,c=t.width,u=t.height;switch(e){case"inside":s=t.x+c/2-o/2,l=t.y+u/2-i/2;break;case"top":s=t.x+c/2-o/2,l=t.y-i-a;break;case"bottom":s=t.x+c/2-o/2,l=t.y+u+a;break;case"left":s=t.x-o-a,l=t.y+u/2-i/2;break;case"right":s=t.x+c+a,l=t.y+u/2-i/2}return[s,l]}(t,h,c,e.get("borderWidth"));n=g[0],r=g[1]}else{g=function(e,t,n,r,o,i,a){var s=n.getSize(),l=s[0],c=s[1];null!=i&&(e+l+i+2>r?e-=l+i:e+=i);null!=a&&(t+c+a>o?t-=c+a:t+=a);return[e,t]}(n,r,o,s,l,u?null:20,d?null:20);n=g[0],r=g[1]}if(u&&(n-=nQ(u)?c[0]/2:"right"===u?c[0]:0),d&&(r-=nQ(d)?c[1]/2:"bottom"===d?c[1]:0),E$(e)){g=function(e,t,n,r,o){var i=n.getSize(),a=i[0],s=i[1];return e=Math.min(e+a,r)-a,t=Math.min(t+s,o)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}(n,r,o,s,l);n=g[0],r=g[1]}o.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,o=!!n&&n.length===e.length;return o&&Ru(n,(function(n,i){var a=n.dataByAxis||[],s=(e[i]||{}).dataByAxis||[];(o=o&&a.length===s.length)&&Ru(a,(function(e,n){var i=s[n]||{},a=e.seriesDataIndices||[],l=i.seriesDataIndices||[];(o=o&&e.value===i.value&&e.axisType===i.axisType&&e.axisId===i.axisId&&a.length===l.length)&&Ru(a,(function(e,t){var n=l[t];o=o&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex})),r&&Ru(e.seriesDataIndices,(function(e){var n=e.seriesIndex,i=t[n],a=r[n];i&&a&&a.data!==i.data&&(o=!1)}))}))})),this._lastDataByCoordSys=e,this._cbParamsList=t,!!o},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,t){!au.node&&t.getDom()&&(vM(this,"_updatePosition"),this._tooltipContent.dispose(),Rq("itemTooltip",t))},t.type="tooltip",t}(tk);function eQ(e,t,n){var r,o=t.ecModel;n?(r=new Yb(n,o,o),r=new Yb(t.option,r,o)):r=t;for(var i=e.length-1;i>=0;i--){var a=e[i];a&&(a instanceof Yb&&(a=a.get("tooltip",!0)),Hu(a)&&(a={formatter:a}),a&&(r=new Yb(a,r,o)))}return r}function tQ(e,t){return e.dispatchAction||Bu(t.dispatchAction,t)}function nQ(e){return"center"===e||"middle"===e}const rQ=J$;var oQ=["rect","polygon","keep","clear"];function iQ(e,t){var n=xm(e?e.brush:[]);if(n.length){var r=[];Ru(n,(function(e){var t=e.hasOwnProperty("toolbox")?e.toolbox:[];t instanceof Array&&(r=r.concat(t))}));var o=e&&e.toolbox;Vu(o)&&(o=o[0]),o||(o={feature:{}},e.toolbox=[o]);var i=o.feature||(o.feature={}),a=i.brush||(i.brush={}),s=a.type||(a.type=[]);s.push.apply(s,r),function(e){var t={};Ru(e,(function(e){t[e]=1})),e.length=0,Ru(t,(function(t,n){e.push(n)}))}(s),t&&!s.length&&s.push.apply(s,oQ)}}var aQ=Ru;function sQ(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!0}function lQ(e,t,n){var r={};return aQ(t,(function(t){var o=r[t]=function(){var e=function(){};return e.prototype.__hidden=e.prototype,new e}();aQ(e[t],(function(e,r){if(JF.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),o[r]=new JF(i),"opacity"===r&&((i=Cu(i)).type="colorAlpha",o.__hidden.__alphaForOpacity=new JF(i))}}))})),r}function cQ(e,t,n){var r;Ru(n,(function(e){t.hasOwnProperty(e)&&sQ(t[e])&&(r=!0)})),r&&Ru(n,(function(n){t.hasOwnProperty(n)&&sQ(t[n])?e[n]=Cu(t[n]):delete e[n]}))}var uQ={lineX:dQ(0),lineY:dQ(1),rect:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])},rect:function(e,t,n){return e&&n.boundingRect.intersect(e)}},polygon:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])&&yz(n.range,e[0],e[1])},rect:function(e,t,n){var r=n.range;if(!e||r.length<=1)return!1;var o=e.x,i=e.y,a=e.width,s=e.height,l=r[0];return!!(yz(r,o,i)||yz(r,o+a,i)||yz(r,o,i+s)||yz(r,o+a,i+s)||Dh.create(e).contain(l[0],l[1])||$C(o,i,o+a,i,r)||$C(o,i,o,i+s,r)||$C(o+a,i,o+a,i+s,r)||$C(o,i+s,o+a,i+s,r))||void 0}}};function dQ(e){var t=["x","y"],n=["width","height"];return{point:function(t,n,r){if(t){var o=r.range;return hQ(t[e],o)}},rect:function(r,o,i){if(r){var a=i.range,s=[r[t[e]],r[t[e]]+r[n[e]]];return s[1]<s[0]&&s.reverse(),hQ(s[0],a)||hQ(s[1],a)||hQ(a[0],s)||hQ(a[1],s)}}}}function hQ(e,t){return t[0]<=e&&e<=t[1]}var pQ=["inBrush","outOfBrush"],fQ="__ecBrushSelect",gQ="__ecInBrushSelectEvent";function mQ(e){e.eachComponent({mainType:"brush"},(function(t){(t.brushTargetManager=new k$(t.option,e)).setInputRanges(t.areas,e)}))}function vQ(e,t,n){var r,o,i=[];e.eachComponent({mainType:"brush"},(function(e){n&&"takeGlobalCursor"===n.type&&e.setBrushOption("brush"===n.key?n.brushOption:{brushType:!1})})),mQ(e),e.eachComponent({mainType:"brush"},(function(t,n){var a={brushId:t.id,brushIndex:n,brushName:t.name,areas:Cu(t.areas),selected:[]};i.push(a);var s=t.option,l=s.brushLink,c=[],u=[],d=[],h=!1;n||(r=s.throttleType,o=s.throttleDelay);var p=Eu(t.areas,(function(e){var t=bQ[e.brushType],n=Du({boundingRect:t?t(e):void 0},e);return n.selectors=function(e){var t=e.brushType,n={point:function(r){return uQ[t].point(r,n,e)},rect:function(r){return uQ[t].rect(r,n,e)}};return n}(n),n})),f=lQ(t.option,pQ,(function(e){e.mappingMethod="fixed"}));function g(e){return"all"===l||!!c[e]}function m(e){return!!e.length}Vu(l)&&Ru(l,(function(e){c[e]=1})),e.eachSeries((function(n,r){var o=d[r]=[];"parallel"===n.subType?function(e,t){var n=e.coordinateSystem;h=h||n.hasAxisBrushed(),g(t)&&n.eachActiveState(e.getData(),(function(e,t){"active"===e&&(u[t]=1)}))}(n,r):function(n,r,o){if(!n.brushSelector||function(e,t){var n=e.option.seriesIndex;return null!=n&&"all"!==n&&(Vu(n)?ju(n,t)<0:t!==n)}(t,r))return;if(Ru(p,(function(r){t.brushTargetManager.controlSeries(r,n,e)&&o.push(r),h=h||m(o)})),g(r)&&m(o)){var i=n.getData();i.each((function(e){xQ(n,o,i,e)&&(u[e]=1)}))}}(n,r,o)})),e.eachSeries((function(e,t){var n={seriesId:e.id,seriesIndex:t,seriesName:e.name,dataIndex:[]};a.selected.push(n);var r=d[t],o=e.getData(),i=g(t)?function(e){return u[e]?(n.dataIndex.push(o.getRawIndex(e)),"inBrush"):"outOfBrush"}:function(t){return xQ(e,r,o,t)?(n.dataIndex.push(o.getRawIndex(t)),"inBrush"):"outOfBrush"};(g(t)?h:m(r))&&function(e,t,n,r,o,i){var a,s={};function l(e){return rI(n,a,e)}function c(e,t){iI(n,a,e,t)}function u(e,u){a=null==i?e:u;var d=n.getRawDataItem(a);if(!d||!1!==d.visualMap)for(var h=r.call(o,e),p=t[h],f=s[h],g=0,m=f.length;g<m;g++){var v=f[g];p[v]&&p[v].applyVisual(e,l,c)}}Ru(e,(function(e){var n=JF.prepareVisualTypes(t[e]);s[e]=n})),null==i?n.each(u):n.each([i],u)}(pQ,f,o,i)}))})),function(e,t,n,r,o){if(!o)return;var i=e.getZr();if(i[gQ])return;i[fQ]||(i[fQ]=yQ);var a=mM(i,fQ,n,t);a(e,r)}(t,r,o,i,n)}function yQ(e,t){if(!e.isDisposed()){var n=e.getZr();n[gQ]=!0,e.dispatchAction({type:"brushSelect",batch:t}),n[gQ]=!1}}function xQ(e,t,n,r){for(var o=0,i=t.length;o<i;o++){var a=t[o];if(e.brushSelector(r,n,a.selectors,a))return!0}}var bQ={rect:function(e){return wQ(e.range)},polygon:function(e){for(var t,n=e.range,r=0,o=n.length;r<o;r++){t=t||[[1/0,-1/0],[1/0,-1/0]];var i=n[r];i[0]<t[0][0]&&(t[0][0]=i[0]),i[0]>t[0][1]&&(t[0][1]=i[0]),i[1]<t[1][0]&&(t[1][0]=i[1]),i[1]>t[1][1]&&(t[1][1]=i[1])}return t&&wQ(t)}};function wQ(e){return new Dh(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}const SQ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.init=function(e,t){this.ecModel=e,this.api=t,this.model,(this._brushController=new fG(t.getZr())).on("brush",Bu(this._onBrush,this)).mount()},t.prototype.render=function(e,t,n,r){this.model=e,this._updateController(e,t,n,r)},t.prototype.updateTransform=function(e,t,n,r){mQ(t),this._updateController(e,t,n,r)},t.prototype.updateVisual=function(e,t,n,r){this.updateTransform(e,t,n,r)},t.prototype.updateView=function(e,t,n,r){this._updateController(e,t,n,r)},t.prototype._updateController=function(e,t,n,r){(!r||r.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(n)).enableBrush(e.brushOption).updateCovers(e.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(e){var t=this.model.id,n=this.model.brushTargetManager.setOutputRanges(e.areas,this.ecModel);(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:t,areas:Cu(n),$from:t}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:t,areas:Cu(n),$from:t})},t.type="brush",t}(tk);function _Q(e,t){return Mu({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new Yb(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}const AQ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.areas=[],n.brushOption={},n}return ru(t,e),t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&cQ(n,e,["inBrush","outOfBrush"]);var r=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:"#ddd"},r.hasOwnProperty("liftZ")||(r.liftZ=5)},t.prototype.setAreas=function(e){e&&(this.areas=Eu(e,(function(e){return _Q(this.option,e)}),this))},t.prototype.setBrushOption=function(e){this.brushOption=_Q(this.option,e),this.brushType=this.brushOption.brushType},t.type="brush",t.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],t.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},t}(rS);var kQ=["rect","polygon","lineX","lineY","keep","clear"];const CQ=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ru(t,e),t.prototype.render=function(e,t,n){var r,o,i;t.eachComponent({mainType:"brush"},(function(e){r=e.brushType,o=e.brushOption.brushMode||"single",i=i||!!e.areas.length})),this._brushType=r,this._brushMode=o,Ru(e.get("type",!0),(function(t){e.setIconStatus(t,("keep"===t?"multiple"===o:"clear"===t?i:t===r)?"emphasis":"normal")}))},t.prototype.updateView=function(e,t,n){this.render(e,t,n)},t.prototype.getIcons=function(){var e=this.model,t=e.get("icon",!0),n={};return Ru(e.get("type",!0),(function(e){t[e]&&(n[e]=t[e])})),n},t.prototype.onclick=function(e,t,n){var r=this._brushType,o=this._brushMode;"clear"===n?(t.dispatchAction({type:"axisAreaSelect",intervals:[]}),t.dispatchAction({type:"brush",command:"clear",areas:[]})):t.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?r:r!==n&&n,brushMode:"keep"===n?"multiple"===o?"single":"multiple":o}})},t.getDefaultOption=function(e){return{show:!0,type:kQ.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:e.getLocaleModel().get(["toolbox","brush","title"])}},t}(BK);var MQ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:"box",ignoreSize:!0},n}return ru(t,e),t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},t}(rS),IQ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.render=function(e,t,n){if(this.group.removeAll(),e.get("show")){var r=this.group,o=e.getModel("textStyle"),i=e.getModel("subtextStyle"),a=e.get("textAlign"),s=Ju(e.get("textBaseline"),e.get("textVerticalAlign")),l=new ax({style:kb(o,{text:e.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),c=l.getBoundingRect(),u=e.get("subtext"),d=new ax({style:kb(i,{text:u,fill:i.getTextColor(),y:c.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),h=e.get("link"),p=e.get("sublink"),f=e.get("triggerEvent",!0);l.silent=!h&&!f,d.silent=!p&&!f,h&&l.on("click",(function(){Hw(h,"_"+e.get("target"))})),p&&d.on("click",(function(){Hw(p,"_"+e.get("subtarget"))})),sx(l).eventData=sx(d).eventData=f?{componentType:"title",componentIndex:e.componentIndex}:null,r.add(l),u&&r.add(d);var g=r.getBoundingRect(),m=e.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=Zw(m,{width:n.getWidth(),height:n.getHeight()},e.get("padding"));a||("middle"===(a=e.get("left")||e.get("right"))&&(a="center"),"right"===a?v.x+=v.width:"center"===a&&(v.x+=v.width/2)),s||("center"===(s=e.get("top")||e.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),r.x=v.x,r.y=v.y,r.markRedraw();var y={align:a,verticalAlign:s};l.setStyle(y),d.setStyle(y),g=r.getBoundingRect();var x=v.margin,b=e.getItemStyle(["color","opacity"]);b.fill=e.get("backgroundColor");var w=new Gy({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:e.get("borderRadius")},style:b,subPixelOptimize:!0,silent:!0});r.add(w)}},t.type="title",t}(tk);var TQ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode="box",n}return ru(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),this._initData()},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),this._initData()},t.prototype.setCurrentIndex=function(e){null==e&&(e=this.option.currentIndex);var t=this._data.count();this.option.loop?e=(e%t+t)%t:(e>=t&&(e=t-1),e<0&&(e=0)),this.option.currentIndex=e},t.prototype.getCurrentIndex=function(){return this.option.currentIndex},t.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},t.prototype.setPlayState=function(e){this.option.autoPlay=!!e},t.prototype.getPlayState=function(){return!!this.option.autoPlay},t.prototype._initData=function(){var e,t=this.option,n=t.data||[],r=t.axisType,o=this._names=[];"category"===r?(e=[],Ru(n,(function(t,n){var r,i=Mm(Sm(t),"");Xu(t)?(r=Cu(t)).value=n:r=n,e.push(r),o.push(i)}))):e=n;var i={category:"ordinal",time:"time",value:"number"}[r]||"number";(this._data=new qP([{name:"value",type:i}],this)).initData(e,o)},t.prototype.getData=function(){return this._data},t.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},t.type="timeline",t.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},t}(rS);const DQ=TQ;var jQ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.type="timeline.slider",t.defaultOption=Kb(DQ.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),t}(DQ);Pu(jQ,F_.prototype);const PQ=jQ;const LQ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.type="timeline",t}(tk);var RQ=function(e){function t(t,n,r,o){var i=e.call(this,t,n,r)||this;return i.type=o||"value",i}return ru(t,e),t.prototype.getLabelModel=function(){return this.model.getModel("label")},t.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},t}(TN);const EQ=RQ;var NQ=Math.PI,OQ=jm(),zQ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.init=function(e,t){this.api=t},t.prototype.render=function(e,t,n){if(this.model=e,this.api=n,this.ecModel=t,this.group.removeAll(),e.get("show",!0)){var r=this._layout(e,n),o=this._createGroup("_mainGroup"),i=this._createGroup("_labelGroup"),a=this._axis=this._createAxis(r,e);e.formatTooltip=function(e){return TA("nameValue",{noName:!0,value:a.scale.getLabel({value:e})})},Ru(["AxisLine","AxisTick","Control","CurrentPointer"],(function(t){this["_render"+t](r,o,a,e)}),this),this._renderAxisLabel(r,i,a,e),this._position(r,e)}this._doPlayStop(),this._updateTicksStatus()},t.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},t.prototype.dispose=function(){this._clearTimer()},t.prototype._layout=function(e,t){var n,r,o,i,a=e.get(["label","position"]),s=e.get("orient"),l=function(e,t){return Zw(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()},e.get("padding"))}(e,t),c={horizontal:"center",vertical:(n=null==a||"auto"===a?"horizontal"===s?l.y+l.height/2<t.getHeight()/2?"-":"+":l.x+l.width/2<t.getWidth()/2?"+":"-":Hu(a)?{horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[s][a]:a)>=0||"+"===n?"left":"right"},u={horizontal:n>=0||"+"===n?"top":"bottom",vertical:"middle"},d={horizontal:0,vertical:NQ/2},h="vertical"===s?l.height:l.width,p=e.getModel("controlStyle"),f=p.get("show",!0),g=f?p.get("itemSize"):0,m=f?p.get("itemGap"):0,v=g+m,y=e.get(["label","rotate"])||0;y=y*NQ/180;var x=p.get("position",!0),b=f&&p.get("showPlayBtn",!0),w=f&&p.get("showPrevBtn",!0),S=f&&p.get("showNextBtn",!0),_=0,A=h;"left"===x||"bottom"===x?(b&&(r=[0,0],_+=v),w&&(o=[_,0],_+=v),S&&(i=[A-g,0],A-=v)):(b&&(r=[A-g,0],A-=v),w&&(o=[0,0],_+=v),S&&(i=[A-g,0],A-=v));var k=[_,A];return e.get("inverse")&&k.reverse(),{viewRect:l,mainLength:h,orient:s,rotation:d[s],labelRotation:y,labelPosOpt:n,labelAlign:e.get(["label","align"])||c[s],labelBaseline:e.get(["label","verticalAlign"])||e.get(["label","baseline"])||u[s],playPosition:r,prevBtnPosition:o,nextBtnPosition:i,axisExtent:k,controlSize:g,controlGap:m}},t.prototype._position=function(e,t){var n=this._mainGroup,r=this._labelGroup,o=e.viewRect;if("vertical"===e.orient){var i=[1,0,0,1,0,0],a=o.x,s=o.y+o.height;gh(i,i,[-a,-s]),mh(i,i,-NQ/2),gh(i,i,[a,s]),(o=o.clone()).applyTransform(i)}var l=m(o),c=m(n.getBoundingRect()),u=m(r.getBoundingRect()),d=[n.x,n.y],h=[r.x,r.y];h[0]=d[0]=l[0][0];var p,f=e.labelPosOpt;null==f||Hu(f)?(v(d,c,l,1,p="+"===f?0:1),v(h,u,l,1,1-p)):(v(d,c,l,1,p=f>=0?0:1),h[1]=d[1]+f);function g(e){e.originX=l[0][0]-e.x,e.originY=l[1][0]-e.y}function m(e){return[[e.x,e.x+e.width],[e.y,e.y+e.height]]}function v(e,t,n,r,o){e[r]+=n[r][o]-t[r][o]}n.setPosition(d),r.setPosition(h),n.rotation=r.rotation=e.rotation,g(n),g(r)},t.prototype._createAxis=function(e,t){var n=t.getData(),r=t.get("axisType"),o=function(e,t){if(t=t||e.get("type"),t)switch(t){case"category":return new ME({ordinalMeta:e.getCategories(),extent:[1/0,-1/0]});case"time":return new BE({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new DE}}(t,r);o.getTicks=function(){return n.mapArray(["value"],(function(e){return{value:e}}))};var i=n.getDataExtent("value");o.setExtent(i[0],i[1]),o.calcNiceTicks();var a=new EQ("value",o,e.axisExtent,r);return a.model=t,a},t.prototype._createGroup=function(e){var t=this[e]=new Fg;return this.group.add(t),t},t.prototype._renderAxisLine=function(e,t,n,r){var o=n.getExtent();if(r.get(["lineStyle","show"])){var i=new oC({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:Tu({lineCap:"round"},r.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});t.add(i);var a=this._progressLine=new oC({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:Du({lineCap:"round",lineWidth:i.style.lineWidth},r.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});t.add(a)}},t.prototype._renderAxisTick=function(e,t,n,r){var o=this,i=r.getData(),a=n.scale.getTicks();this._tickSymbols=[],Ru(a,(function(e){var a=n.dataToCoord(e.value),s=i.getItemModel(e.value),l=s.getModel("itemStyle"),c=s.getModel(["emphasis","itemStyle"]),u=s.getModel(["progress","itemStyle"]),d={x:a,y:0,onclick:Bu(o._changeTimeline,o,e.value)},h=BQ(s,l,t,d);h.ensureState("emphasis").style=c.getItemStyle(),h.ensureState("progress").style=u.getItemStyle(),eb(h);var p=sx(h);s.get("tooltip")?(p.dataIndex=e.value,p.dataModel=r):p.dataIndex=p.dataModel=null,o._tickSymbols.push(h)}))},t.prototype._renderAxisLabel=function(e,t,n,r){var o=this;if(n.getLabelModel().get("show")){var i=r.getData(),a=n.getViewLabels();this._tickLabels=[],Ru(a,(function(r){var a=r.tickValue,s=i.getItemModel(a),l=s.getModel("label"),c=s.getModel(["emphasis","label"]),u=s.getModel(["progress","label"]),d=n.dataToCoord(r.tickValue),h=new ax({x:d,y:0,rotation:e.labelRotation-e.rotation,onclick:Bu(o._changeTimeline,o,a),silent:!1,style:kb(l,{text:r.formattedLabel,align:e.labelAlign,verticalAlign:e.labelBaseline})});h.ensureState("emphasis").style=kb(c),h.ensureState("progress").style=kb(u),t.add(h),eb(h),OQ(h).dataIndex=a,o._tickLabels.push(h)}))}},t.prototype._renderControl=function(e,t,n,r){var o=e.controlSize,i=e.rotation,a=r.getModel("controlStyle").getItemStyle(),s=r.getModel(["emphasis","controlStyle"]).getItemStyle(),l=r.getPlayState(),c=r.get("inverse",!0);function u(e,n,l,c){if(e){var u=Cg(Ju(r.get(["controlStyle",n+"BtnSize"]),o),o),d=function(e,t,n,r){var o=r.style,i=KC(e.get(["controlStyle",t]),r||{},new Dh(n[0],n[1],n[2],n[3]));o&&i.setStyle(o);return i}(r,n+"Icon",[0,-u/2,u,u],{x:e[0],y:e[1],originX:o/2,originY:0,rotation:c?-i:0,rectHover:!0,style:a,onclick:l});d.ensureState("emphasis").style=s,t.add(d),eb(d)}}u(e.nextBtnPosition,"next",Bu(this._changeTimeline,this,c?"-":"+")),u(e.prevBtnPosition,"prev",Bu(this._changeTimeline,this,c?"+":"-")),u(e.playPosition,l?"stop":"play",Bu(this._handlePlayClick,this,!l),!0)},t.prototype._renderCurrentPointer=function(e,t,n,r){var o=r.getData(),i=r.getCurrentIndex(),a=o.getItemModel(i).getModel("checkpointStyle"),s=this,l={onCreate:function(e){e.draggable=!0,e.drift=Bu(s._handlePointerDrag,s),e.ondragend=Bu(s._handlePointerDragend,s),FQ(e,s._progressLine,i,n,r,!0)},onUpdate:function(e){FQ(e,s._progressLine,i,n,r)}};this._currentPointer=BQ(a,a,this._mainGroup,{},this._currentPointer,l)},t.prototype._handlePlayClick=function(e){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:e,from:this.uid})},t.prototype._handlePointerDrag=function(e,t,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},t.prototype._handlePointerDragend=function(e){this._pointerChangeTimeline([e.offsetX,e.offsetY],!0)},t.prototype._pointerChangeTimeline=function(e,t){var n=this._toAxisCoord(e)[0],r=$g(this._axis.getExtent().slice());n>r[1]&&(n=r[1]),n<r[0]&&(n=r[0]),this._currentPointer.x=n,this._currentPointer.markRedraw();var o=this._progressLine;o&&(o.shape.x2=n,o.dirty());var i=this._findNearestTick(n),a=this.model;(t||i!==a.getCurrentIndex()&&a.get("realtime"))&&this._changeTimeline(i)},t.prototype._doPlayStop=function(){var e=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout((function(){var t=e.model;e._changeTimeline(t.getCurrentIndex()+(t.get("rewind",!0)?-1:1))}),this.model.get("playInterval")))},t.prototype._toAxisCoord=function(e){return GC(e,this._mainGroup.getLocalTransform(),!0)},t.prototype._findNearestTick=function(e){var t,n=this.model.getData(),r=1/0,o=this._axis;return n.each(["value"],(function(n,i){var a=o.dataToCoord(n),s=Math.abs(a-e);s<r&&(r=s,t=i)})),t},t.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},t.prototype._changeTimeline=function(e){var t=this.model.getCurrentIndex();"+"===e?e=t+1:"-"===e&&(e=t-1),this.api.dispatchAction({type:"timelineChange",currentIndex:e,from:this.uid})},t.prototype._updateTicksStatus=function(){var e=this.model.getCurrentIndex(),t=this._tickSymbols,n=this._tickLabels;if(t)for(var r=0;r<t.length;r++)t&&t[r]&&t[r].toggleState("progress",r<e);if(n)for(r=0;r<n.length;r++)n&&n[r]&&n[r].toggleState("progress",OQ(n[r]).dataIndex<=e)},t.type="timeline.slider",t}(LQ);function BQ(e,t,n,r,o,i){var a=t.get("color");o?(o.setColor(a),n.add(o),i&&i.onUpdate(o)):((o=bI(e.get("symbol"),-1,-1,2,2,a)).setStyle("strokeNoScale",!0),n.add(o),i&&i.onCreate(o));var s=t.getItemStyle(["color"]);o.setStyle(s),r=Mu({rectHover:!0,z2:100},r,!0);var l=wI(e.get("symbolSize"));r.scaleX=l[0]/2,r.scaleY=l[1]/2;var c=SI(e.get("symbolOffset"),l);c&&(r.x=(r.x||0)+c[0],r.y=(r.y||0)+c[1]);var u=e.get("symbolRotate");return r.rotation=(u||0)*Math.PI/180||0,o.attr(r),o.updateTransform(),o}function FQ(e,t,n,r,o,i){if(!e.dragging){var a=o.getModel("checkpointStyle"),s=r.dataToCoord(o.getData().get("value",n));if(i||!a.get("animation",!0))e.attr({x:s,y:0}),t&&t.attr({shape:{x2:s}});else{var l={duration:a.get("animationDuration",!0),easing:a.get("animationEasing",!0)};e.stopAnimation(null,!0),e.animateTo({x:s,y:0},l),t&&t.animateTo({shape:{x2:s}},l)}}}const VQ=zQ;function WQ(e){var t=e&&e.timeline;Vu(t)||(t=t?[t]:[]),Ru(t,(function(e){e&&function(e){var t=e.type,n={number:"value",time:"time"};n[t]&&(e.axisType=n[t],delete e.type);if(HQ(e),GQ(e,"controlPosition")){var r=e.controlStyle||(e.controlStyle={});GQ(r,"position")||(r.position=e.controlPosition),"none"!==r.position||GQ(r,"show")||(r.show=!1,delete r.position),delete e.controlPosition}Ru(e.data||[],(function(e){Xu(e)&&!Vu(e)&&(!GQ(e,"value")&&GQ(e,"name")&&(e.value=e.name),HQ(e))}))}(e)}))}function HQ(e){var t=e.itemStyle||(e.itemStyle={}),n=t.emphasis||(t.emphasis={}),r=e.label||e.label||{},o=r.normal||(r.normal={}),i={normal:1,emphasis:1};Ru(r,(function(e,t){i[t]||GQ(o,t)||(o[t]=e)})),n.label&&!GQ(r,"emphasis")&&(r.emphasis=n.label,delete n.label)}function GQ(e,t){return e.hasOwnProperty(t)}function UQ(e,t){if(!e)return!1;for(var n=Vu(e)?e:[e],r=0;r<n.length;r++)if(n[r]&&n[r][t])return!0;return!1}function XQ(e){bm(e,"label",["show"])}var YQ=jm(),qQ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.createdBySelf=!1,n}return ru(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),this._mergeOption(e,n,!1,!0)},t.prototype.isAnimationEnabled=function(){if(au.node)return!1;var e=this.__hostSeries;return this.getShallow("animation")&&e&&e.isAnimationEnabled()},t.prototype.mergeOption=function(e,t){this._mergeOption(e,t,!1,!1)},t.prototype._mergeOption=function(e,t,n,r){var o=this.mainType;n||t.eachSeries((function(e){var n=e.get(this.mainType,!0),i=YQ(e)[o];n&&n.data?(i?i._mergeOption(n,t,!0):(r&&XQ(n),Ru(n.data,(function(e){e instanceof Array?(XQ(e[0]),XQ(e[1])):XQ(e)})),Tu(i=this.createMarkerModelFromSeries(n,this,t),{mainType:this.mainType,seriesIndex:e.seriesIndex,name:e.name,createdBySelf:!0}),i.__hostSeries=e),YQ(e)[o]=i):YQ(e)[o]=null}),this)},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),o=this.getRawValue(e),i=r.getName(e);return TA("section",{header:this.name,blocks:[TA("nameValue",{name:i,value:o,noName:!i,noValue:null==o})]})},t.prototype.getData=function(){return this._data},t.prototype.setData=function(e){this._data=e},t.prototype.getDataParams=function(e,t){var n=F_.prototype.getDataParams.call(this,e,t),r=this.__hostSeries;return r&&(n.seriesId=r.id,n.seriesName=r.name,n.seriesType=r.subType),n},t.getMarkerModelFromSeries=function(e,t){return YQ(e)[t]},t.type="marker",t.dependencies=["series","grid","polar","geo"],t}(rS);Pu(qQ,F_.prototype);const ZQ=qQ;const KQ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type="markPoint",t.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},t}(ZQ);function $Q(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}function QQ(e,t,n,r,o,i){var a=[],s=tL(t,r)?t.getCalculationInfo("stackResultDimension"):r,l=oJ(t,s,e),c=t.indicesOfNearest(s,l)[0];a[o]=t.get(n,c),a[i]=t.get(s,c);var u=t.get(r,c),d=Qg(t.get(r,c));return(d=Math.min(d,20))>=0&&(a[i]=+a[i].toFixed(d)),[a,u]}var JQ={min:Fu(QQ,"min"),max:Fu(QQ,"max"),average:Fu(QQ,"average"),median:Fu(QQ,"median")};function eJ(e,t){if(t){var n=e.getData(),r=e.coordinateSystem,o=r&&r.dimensions;if(!function(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}(t)&&!Vu(t.coord)&&Vu(o)){var i=tJ(t,n,r,e);if((t=Cu(t)).type&&JQ[t.type]&&i.baseAxis&&i.valueAxis){var a=ju(o,i.baseAxis.dim),s=ju(o,i.valueAxis.dim),l=JQ[t.type](n,i.baseDataDim,i.valueDataDim,a,s);t.coord=l[0],t.value=l[1]}else t.coord=[null!=t.xAxis?t.xAxis:t.radiusAxis,null!=t.yAxis?t.yAxis:t.angleAxis]}if(null!=t.coord&&Vu(o))for(var c=t.coord,u=0;u<2;u++)JQ[c[u]]&&(c[u]=oJ(n,n.mapDimension(o[u]),c[u]));else t.coord=[];return t}}function tJ(e,t,n,r){var o={};return null!=e.valueIndex||null!=e.valueDim?(o.valueDataDim=null!=e.valueIndex?t.getDimension(e.valueIndex):e.valueDim,o.valueAxis=n.getAxis(function(e,t){var n=e.getData().getDimensionInfo(t);return n&&n.coordDim}(r,o.valueDataDim)),o.baseAxis=n.getOtherAxis(o.valueAxis),o.baseDataDim=t.mapDimension(o.baseAxis.dim)):(o.baseAxis=r.getBaseAxis(),o.valueAxis=n.getOtherAxis(o.baseAxis),o.baseDataDim=t.mapDimension(o.baseAxis.dim),o.valueDataDim=t.mapDimension(o.valueAxis.dim)),o}function nJ(e,t){return!(e&&e.containData&&t.coord&&!$Q(t))||e.containData(t.coord)}function rJ(e,t){return e?function(e,n,r,o){return Y_(o<2?e.coord&&e.coord[o]:e.value,t[o])}:function(e,n,r,o){return Y_(e.value,t[o])}}function oJ(e,t,n){if("average"===n){var r=0,o=0;return e.each(t,(function(e,t){isNaN(e)||(r+=e,o++)})),r/o}return"median"===n?e.getMedian(t):e.getDataExtent(t)["max"===n?1:0]}var iJ=jm();const aJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.init=function(){this.markerGroupMap=dd()},t.prototype.render=function(e,t,n){var r=this,o=this.markerGroupMap;o.each((function(e){iJ(e).keep=!1})),t.eachSeries((function(e){var o=ZQ.getMarkerModelFromSeries(e,r.type);o&&r.renderSeries(e,o,t,n)})),o.each((function(e){!iJ(e).keep&&r.group.remove(e.group)}))},t.prototype.markKeep=function(e){iJ(e).keep=!0},t.prototype.toggleBlurSeries=function(e,t){var n=this;Ru(e,(function(e){var r=ZQ.getMarkerModelFromSeries(e,n.type);r&&r.getData().eachItemGraphicEl((function(e){e&&(t?Hx(e):Gx(e))}))}))},t.type="marker",t}(tk);function sJ(e,t,n){var r=t.coordinateSystem;e.each((function(o){var i,a=e.getItemModel(o),s=Zg(a.get("x"),n.getWidth()),l=Zg(a.get("y"),n.getHeight());if(isNaN(s)||isNaN(l)){if(t.getMarkerPosition)i=t.getMarkerPosition(e.getValues(e.dimensions,o));else if(r){var c=e.get(r.dimensions[0],o),u=e.get(r.dimensions[1],o);i=r.dataToPoint([c,u])}}else i=[s,l];isNaN(s)||(i[0]=s),isNaN(l)||(i[1]=l),e.setItemLayout(o,i)}))}var lJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries((function(e){var t=ZQ.getMarkerModelFromSeries(e,"markPoint");t&&(sJ(t.getData(),e,n),this.markerGroupMap.get(e.id).updateLayout())}),this)},t.prototype.renderSeries=function(e,t,n,r){var o=e.coordinateSystem,i=e.id,a=e.getData(),s=this.markerGroupMap,l=s.get(i)||s.set(i,new fL),c=function(e,t,n){var r;r=e?Eu(e&&e.dimensions,(function(e){return Tu(Tu({},t.getData().getDimensionInfo(t.getData().mapDimension(e))||{}),{name:e,ordinalMeta:null})})):[{name:"value",type:"float"}];var o=new qP(r,n),i=Eu(n.get("data"),Fu(eJ,t));e&&(i=Ou(i,Fu(nJ,e)));var a=rJ(!!e,r);return o.initData(i,null,a),o}(o,e,t);t.setData(c),sJ(t.getData(),e,r),c.each((function(e){var n=c.getItemModel(e),r=n.getShallow("symbol"),o=n.getShallow("symbolSize"),i=n.getShallow("symbolRotate"),s=n.getShallow("symbolOffset"),l=n.getShallow("symbolKeepAspect");if(Wu(r)||Wu(o)||Wu(i)||Wu(s)){var u=t.getRawValue(e),d=t.getDataParams(e);Wu(r)&&(r=r(u,d)),Wu(o)&&(o=o(u,d)),Wu(i)&&(i=i(u,d)),Wu(s)&&(s=s(u,d))}var h=n.getModel("itemStyle").getItemStyle(),p=oI(a,"color");h.fill||(h.fill=p),c.setItemVisual(e,{symbol:r,symbolSize:o,symbolRotate:i,symbolOffset:s,symbolKeepAspect:l,style:h})})),l.updateData(c),this.group.add(l.group),c.eachItemGraphicEl((function(e){e.traverse((function(e){sx(e).dataModel=t}))})),this.markKeep(l),l.group.silent=t.get("silent")||e.get("silent")},t.type="markPoint",t}(aJ);const cJ=lJ;const uJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type="markLine",t.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},t}(ZQ);var dJ=jm(),hJ=function(e,t,n,r){var o,i=e.getData();if(Vu(r))o=r;else{var a=r.type;if("min"===a||"max"===a||"average"===a||"median"===a||null!=r.xAxis||null!=r.yAxis){var s=void 0,l=void 0;if(null!=r.yAxis||null!=r.xAxis)s=t.getAxis(null!=r.yAxis?"y":"x"),l=Qu(r.yAxis,r.xAxis);else{var c=tJ(r,i,t,e);s=c.valueAxis,l=oJ(i,nL(i,c.valueDataDim),a)}var u="x"===s.dim?0:1,d=1-u,h=Cu(r),p={coord:[]};h.type=null,h.coord=[],h.coord[d]=-1/0,p.coord[d]=1/0;var f=n.get("precision");f>=0&&Uu(l)&&(l=+l.toFixed(Math.min(f,20))),h.coord[u]=p.coord[u]=l,o=[h,p,{type:a,valueIndex:r.valueIndex,value:l}]}else o=[]}var g=[eJ(e,o[0]),eJ(e,o[1]),Tu({},o[2])];return g[2].type=g[2].type||null,Mu(g[2],g[0]),Mu(g[2],g[1]),g};function pJ(e){return!isNaN(e)&&!isFinite(e)}function fJ(e,t,n,r){var o=1-e,i=r.dimensions[e];return pJ(t[o])&&pJ(n[o])&&t[e]===n[e]&&r.getAxis(i).containData(t[e])}function gJ(e,t){if("cartesian2d"===e.type){var n=t[0].coord,r=t[1].coord;if(n&&r&&(fJ(1,n,r,e)||fJ(0,n,r,e)))return!0}return nJ(e,t[0])&&nJ(e,t[1])}function mJ(e,t,n,r,o){var i,a=r.coordinateSystem,s=e.getItemModel(t),l=Zg(s.get("x"),o.getWidth()),c=Zg(s.get("y"),o.getHeight());if(isNaN(l)||isNaN(c)){if(r.getMarkerPosition)i=r.getMarkerPosition(e.getValues(e.dimensions,t));else{var u=a.dimensions,d=e.get(u[0],t),h=e.get(u[1],t);i=a.dataToPoint([d,h])}if(jL(a,"cartesian2d")){var p=a.getAxis("x"),f=a.getAxis("y");u=a.dimensions;pJ(e.get(u[0],t))?i[0]=p.toGlobalCoord(p.getExtent()[n?0:1]):pJ(e.get(u[1],t))&&(i[1]=f.toGlobalCoord(f.getExtent()[n?0:1]))}isNaN(l)||(i[0]=l),isNaN(c)||(i[1]=c)}else i=[l,c];e.setItemLayout(t,i)}var vJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries((function(e){var t=ZQ.getMarkerModelFromSeries(e,"markLine");if(t){var r=t.getData(),o=dJ(t).from,i=dJ(t).to;o.each((function(t){mJ(o,t,!0,e,n),mJ(i,t,!1,e,n)})),r.each((function(e){r.setItemLayout(e,[o.getItemLayout(e),i.getItemLayout(e)])})),this.markerGroupMap.get(e.id).updateLayout()}}),this)},t.prototype.renderSeries=function(e,t,n,r){var o=e.coordinateSystem,i=e.id,a=e.getData(),s=this.markerGroupMap,l=s.get(i)||s.set(i,new lW);this.group.add(l.group);var c=function(e,t,n){var r;r=e?Eu(e&&e.dimensions,(function(e){return Tu(Tu({},t.getData().getDimensionInfo(t.getData().mapDimension(e))||{}),{name:e,ordinalMeta:null})})):[{name:"value",type:"float"}];var o=new qP(r,n),i=new qP(r,n),a=new qP([],n),s=Eu(n.get("data"),Fu(hJ,t,e,n));e&&(s=Ou(s,Fu(gJ,e)));var l=rJ(!!e,r);return o.initData(Eu(s,(function(e){return e[0]})),null,l),i.initData(Eu(s,(function(e){return e[1]})),null,l),a.initData(Eu(s,(function(e){return e[2]}))),a.hasItemOption=!0,{from:o,to:i,line:a}}(o,e,t),u=c.from,d=c.to,h=c.line;dJ(t).from=u,dJ(t).to=d,t.setData(h);var p=t.get("symbol"),f=t.get("symbolSize"),g=t.get("symbolRotate"),m=t.get("symbolOffset");function v(t,n,o){var i=t.getItemModel(n);mJ(t,n,o,e,r);var s=i.getModel("itemStyle").getItemStyle();null==s.fill&&(s.fill=oI(a,"color")),t.setItemVisual(n,{symbolKeepAspect:i.get("symbolKeepAspect"),symbolOffset:Ju(i.get("symbolOffset",!0),m[o?0:1]),symbolRotate:Ju(i.get("symbolRotate",!0),g[o?0:1]),symbolSize:Ju(i.get("symbolSize"),f[o?0:1]),symbol:Ju(i.get("symbol",!0),p[o?0:1]),style:s})}Vu(p)||(p=[p,p]),Vu(f)||(f=[f,f]),Vu(g)||(g=[g,g]),Vu(m)||(m=[m,m]),c.from.each((function(e){v(u,e,!0),v(d,e,!1)})),h.each((function(e){var t=h.getItemModel(e).getModel("lineStyle").getLineStyle();h.setItemLayout(e,[u.getItemLayout(e),d.getItemLayout(e)]),null==t.stroke&&(t.stroke=u.getItemVisual(e,"style").fill),h.setItemVisual(e,{fromSymbolKeepAspect:u.getItemVisual(e,"symbolKeepAspect"),fromSymbolOffset:u.getItemVisual(e,"symbolOffset"),fromSymbolRotate:u.getItemVisual(e,"symbolRotate"),fromSymbolSize:u.getItemVisual(e,"symbolSize"),fromSymbol:u.getItemVisual(e,"symbol"),toSymbolKeepAspect:d.getItemVisual(e,"symbolKeepAspect"),toSymbolOffset:d.getItemVisual(e,"symbolOffset"),toSymbolRotate:d.getItemVisual(e,"symbolRotate"),toSymbolSize:d.getItemVisual(e,"symbolSize"),toSymbol:d.getItemVisual(e,"symbol"),style:t})})),l.updateData(h),c.line.eachItemGraphicEl((function(e){sx(e).dataModel=t,e.traverse((function(e){sx(e).dataModel=t}))})),this.markKeep(l),l.group.silent=t.get("silent")||e.get("silent")},t.type="markLine",t}(aJ);const yJ=vJ;const xJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type="markArea",t.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},t}(ZQ);var bJ=jm(),wJ=function(e,t,n,r){var o=r[0],i=r[1];if(o&&i){var a=eJ(e,o),s=eJ(e,i),l=a.coord,c=s.coord;l[0]=Qu(l[0],-1/0),l[1]=Qu(l[1],-1/0),c[0]=Qu(c[0],1/0),c[1]=Qu(c[1],1/0);var u=Iu([{},a,s]);return u.coord=[a.coord,s.coord],u.x0=a.x,u.y0=a.y,u.x1=s.x,u.y1=s.y,u}};function SJ(e){return!isNaN(e)&&!isFinite(e)}function _J(e,t,n,r){var o=1-e;return SJ(t[o])&&SJ(n[o])}function AJ(e,t){var n=t.coord[0],r=t.coord[1],o={coord:n,x:t.x0,y:t.y0},i={coord:r,x:t.x1,y:t.y1};return jL(e,"cartesian2d")?!(!n||!r||!_J(1,n,r)&&!_J(0,n,r))||function(e,t,n){return!(e&&e.containZone&&t.coord&&n.coord&&!$Q(t)&&!$Q(n))||e.containZone(t.coord,n.coord)}(e,o,i):nJ(e,o)||nJ(e,i)}function kJ(e,t,n,r,o){var i,a=r.coordinateSystem,s=e.getItemModel(t),l=Zg(s.get(n[0]),o.getWidth()),c=Zg(s.get(n[1]),o.getHeight());if(isNaN(l)||isNaN(c)){if(r.getMarkerPosition){var u=e.getValues(["x0","y0"],t),d=e.getValues(["x1","y1"],t),h=a.clampData(u),p=a.clampData(d),f=[];"x0"===n[0]?f[0]=h[0]>p[0]?d[0]:u[0]:f[0]=h[0]>p[0]?u[0]:d[0],"y0"===n[1]?f[1]=h[1]>p[1]?d[1]:u[1]:f[1]=h[1]>p[1]?u[1]:d[1],i=r.getMarkerPosition(f,n,!0)}else{var g=[y=e.get(n[0],t),x=e.get(n[1],t)];a.clampData&&a.clampData(g,g),i=a.dataToPoint(g,!0)}if(jL(a,"cartesian2d")){var m=a.getAxis("x"),v=a.getAxis("y"),y=e.get(n[0],t),x=e.get(n[1],t);SJ(y)?i[0]=m.toGlobalCoord(m.getExtent()["x0"===n[0]?0:1]):SJ(x)&&(i[1]=v.toGlobalCoord(v.getExtent()["y0"===n[1]?0:1]))}isNaN(l)||(i[0]=l),isNaN(c)||(i[1]=c)}else i=[l,c];return i}var CJ=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],MJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries((function(e){var t=ZQ.getMarkerModelFromSeries(e,"markArea");if(t){var r=t.getData();r.each((function(t){var o=Eu(CJ,(function(o){return kJ(r,t,o,e,n)}));r.setItemLayout(t,o),r.getItemGraphicEl(t).setShape("points",o)}))}}),this)},t.prototype.renderSeries=function(e,t,n,r){var o=e.coordinateSystem,i=e.id,a=e.getData(),s=this.markerGroupMap,l=s.get(i)||s.set(i,{group:new Fg});this.group.add(l.group),this.markKeep(l);var c=function(e,t,n){var r,o,i=["x0","y0","x1","y1"];if(e){var a=Eu(e&&e.dimensions,(function(e){var n=t.getData();return Tu(Tu({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})}));o=Eu(i,(function(e,t){return{name:e,type:a[t%2].type}})),r=new qP(o,n)}else r=new qP(o=[{name:"value",type:"float"}],n);var s=Eu(n.get("data"),Fu(wJ,t,e,n));e&&(s=Ou(s,Fu(AJ,e)));var l=e?function(e,t,n,r){return Y_(e.coord[Math.floor(r/2)][r%2],o[r])}:function(e,t,n,r){return Y_(e.value,o[r])};return r.initData(s,null,l),r.hasItemOption=!0,r}(o,e,t);t.setData(c),c.each((function(t){var n=Eu(CJ,(function(n){return kJ(c,t,n,e,r)})),i=o.getAxis("x").scale,s=o.getAxis("y").scale,l=i.getExtent(),u=s.getExtent(),d=[i.parse(c.get("x0",t)),i.parse(c.get("x1",t))],h=[s.parse(c.get("y0",t)),s.parse(c.get("y1",t))];$g(d),$g(h);var p=!!(l[0]>d[1]||l[1]<d[0]||u[0]>h[1]||u[1]<h[0]);c.setItemLayout(t,{points:n,allClipped:p});var f=c.getItemModel(t).getModel("itemStyle").getItemStyle(),g=oI(a,"color");f.fill||(f.fill=g,Hu(f.fill)&&(f.fill=tf(f.fill,.4))),f.stroke||(f.stroke=g),c.setItemVisual(t,"style",f)})),c.diff(bJ(l).data).add((function(e){var t=c.getItemLayout(e);if(!t.allClipped){var n=new $k({shape:{points:t.points}});c.setItemGraphicEl(e,n),l.group.add(n)}})).update((function(e,n){var r=bJ(l).data.getItemGraphicEl(n),o=c.getItemLayout(e);o.allClipped?r&&l.group.remove(r):(r?pb(r,{shape:{points:o.points}},t,e):r=new $k({shape:{points:o.points}}),c.setItemGraphicEl(e,r),l.group.add(r))})).remove((function(e){var t=bJ(l).data.getItemGraphicEl(e);l.group.remove(t)})).execute(),c.eachItemGraphicEl((function(e,n){var r=c.getItemModel(n),o=c.getItemVisual(n,"style");e.useStyle(c.getItemVisual(n,"style")),_b(e,Ab(r),{labelFetcher:t,labelDataIndex:n,defaultText:c.getName(n)||"",inheritColor:Hu(o.fill)?tf(o.fill,1):"#000"}),ib(e,r),tb(e,null,null,r.get(["emphasis","disabled"])),sx(e).dataModel=t})),bJ(l).data=c,l.group.silent=t.get("silent")||e.get("silent")},t.type="markArea",t}(aJ);const IJ=MJ;var TJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:"box",ignoreSize:!0},n}return ru(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;!0===t&&(t=e.selector=["all","inverse"]),Vu(t)&&Ru(t,(function(e,r){Hu(e)&&(e={type:e}),t[r]=Mu(e,function(e,t){return"all"===t?{type:"all",title:e.getLocaleModel().get(["legend","selector","all"])}:"inverse"===t?{type:"inverse",title:e.getLocaleModel().get(["legend","selector","inverse"])}:void 0}(n,e.type))}))},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&"single"===this.get("selectedMode")){for(var t=!1,n=0;n<e.length;n++){var r=e[n].get("name");if(this.isSelected(r)){this.select(r),t=!0;break}}!t&&this.select(e[0].get("name"))}},t.prototype._updateData=function(e){var t=[],n=[];e.eachRawSeries((function(r){var o,i=r.name;if(n.push(i),r.legendVisualProvider){var a=r.legendVisualProvider.getAllNames();e.isSeriesFiltered(r)||(n=n.concat(a)),a.length?t=t.concat(a):o=!0}else o=!0;o&&Im(r)&&t.push(r.name)})),this._availableNames=n;var r=this.get("data")||t,o=dd(),i=Eu(r,(function(e){return(Hu(e)||Uu(e))&&(e={name:e}),o.get(e.name)?null:(o.set(e.name,!0),new Yb(e,this,this.ecModel))}),this);this._data=Ou(i,(function(e){return!!e}))},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var t=this.option.selected;"single"===this.get("selectedMode")&&Ru(this._data,(function(e){t[e.get("name")]=!1}));t[e]=!0},t.prototype.unSelect=function(e){"single"!==this.get("selectedMode")&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var t=this.option.selected;t.hasOwnProperty(e)||(t[e]=!0),this[t[e]?"unSelect":"select"](e)},t.prototype.allSelect=function(){var e=this._data,t=this.option.selected;Ru(e,(function(e){t[e.get("name",!0)]=!0}))},t.prototype.inverseSelect=function(){var e=this._data,t=this.option.selected;Ru(e,(function(e){var n=e.get("name",!0);t.hasOwnProperty(n)||(t[n]=!0),t[n]=!t[n]}))},t.prototype.isSelected=function(e){var t=this.option.selected;return!(t.hasOwnProperty(e)&&!t[e])&&ju(this._availableNames,e)>=0},t.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},t}(rS);const DJ=TJ;var jJ=Fu,PJ=Ru,LJ=Fg,RJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return ru(t,e),t.prototype.init=function(){this.group.add(this._contentGroup=new LJ),this.group.add(this._selectorGroup=new LJ),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get("show",!0)){var o=e.get("align"),i=e.get("orient");o&&"auto"!==o||(o="right"===e.get("left")&&"vertical"===i?"right":"left");var a=e.get("selector",!0),s=e.get("selectorPosition",!0);!a||s&&"auto"!==s||(s="horizontal"===i?"end":"start"),this.renderInner(o,e,t,n,a,i,s);var l=e.getBoxLayoutParams(),c={width:n.getWidth(),height:n.getHeight()},u=e.get("padding"),d=Zw(l,c,u),h=this.layoutInner(e,o,d,r,a,s),p=Zw(Du({width:h.width,height:h.height},l),c,u);this.group.x=p.x-h.x,this.group.y=p.y-h.y,this.group.markRedraw(),this.group.add(this._backgroundEl=GK(h,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,o,i,a){var s=this.getContentGroup(),l=dd(),c=t.get("selectedMode"),u=[];n.eachRawSeries((function(e){!e.get("legendHoverLink")&&u.push(e.id)})),PJ(t.getData(),(function(o,i){var a=o.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var d=new LJ;return d.newline=!0,void s.add(d)}var h=n.getSeriesByName(a)[0];if(!l.get(a)){if(h){var p=h.getData(),f=p.getVisual("legendLineStyle")||{},g=p.getVisual("legendIcon"),m=p.getVisual("style"),v=this._createItem(h,a,i,o,t,e,f,m,g,c,r);v.on("click",jJ(EJ,a,null,r,u)).on("mouseover",jJ(OJ,h.name,null,r,u)).on("mouseout",jJ(zJ,h.name,null,r,u)),n.ssr&&v.eachChild((function(e){var t=sx(e);t.seriesIndex=h.seriesIndex,t.dataIndex=i,t.ssrType="legend"})),l.set(a,!0)}else n.eachRawSeries((function(s){if(!l.get(a)&&s.legendVisualProvider){var d=s.legendVisualProvider;if(!d.containName(a))return;var h=d.indexOfName(a),p=d.getItemVisual(h,"style"),f=d.getItemVisual(h,"legendIcon"),g=Zp(p.fill);g&&0===g[3]&&(g[3]=.2,p=Tu(Tu({},p),{fill:nf(g,"rgba")}));var m=this._createItem(s,a,i,o,t,e,{},p,f,c,r);m.on("click",jJ(EJ,null,a,r,u)).on("mouseover",jJ(OJ,null,a,r,u)).on("mouseout",jJ(zJ,null,a,r,u)),n.ssr&&m.eachChild((function(e){var t=sx(e);t.seriesIndex=s.seriesIndex,t.dataIndex=i,t.ssrType="legend"})),l.set(a,!0)}}),this);0}}),this),o&&this._createSelector(o,t,r,i,a)},t.prototype._createSelector=function(e,t,n,r,o){var i=this.getSelectorGroup();PJ(e,(function(e){var r=e.type,o=new ax({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===r?"legendAllSelect":"legendInverseSelect"})}});i.add(o),_b(o,{normal:t.getModel("selectorLabel"),emphasis:t.getModel(["emphasis","selectorLabel"])},{defaultText:e.title}),eb(o)}))},t.prototype._createItem=function(e,t,n,r,o,i,a,s,l,c,u){var d=e.visualDrawType,h=o.get("itemWidth"),p=o.get("itemHeight"),f=o.isSelected(t),g=r.get("symbolRotate"),m=r.get("symbolKeepAspect"),v=r.get("icon"),y=function(e,t,n,r,o,i,a){function s(e,t){"auto"===e.lineWidth&&(e.lineWidth=t.lineWidth>0?2:0),PJ(e,(function(n,r){"inherit"===e[r]&&(e[r]=t[r])}))}var l=t.getModel("itemStyle"),c=l.getItemStyle(),u=0===e.lastIndexOf("empty",0)?"fill":"stroke",d=l.getShallow("decal");c.decal=d&&"inherit"!==d?$I(d,a):r.decal,"inherit"===c.fill&&(c.fill=r[o]);"inherit"===c.stroke&&(c.stroke=r[u]);"inherit"===c.opacity&&(c.opacity=("fill"===o?r:n).opacity);s(c,r);var h=t.getModel("lineStyle"),p=h.getLineStyle();if(s(p,n),"auto"===c.fill&&(c.fill=r.fill),"auto"===c.stroke&&(c.stroke=r.fill),"auto"===p.stroke&&(p.stroke=r.fill),!i){var f=t.get("inactiveBorderWidth"),g=c[u];c.lineWidth="auto"===f?r.lineWidth>0&&g?2:0:c.lineWidth,c.fill=t.get("inactiveColor"),c.stroke=t.get("inactiveBorderColor"),p.stroke=h.get("inactiveColor"),p.lineWidth=h.get("inactiveWidth")}return{itemStyle:c,lineStyle:p}}(l=v||l||"roundRect",r,a,s,d,f,u),x=new LJ,b=r.getModel("textStyle");if(!Wu(e.getLegendIcon)||v&&"inherit"!==v){var w="inherit"===v&&e.getData().getVisual("symbol")?"inherit"===g?e.getData().getVisual("symbolRotate"):g:0;x.add(function(e){var t=e.icon||"roundRect",n=bI(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2);return n}({itemWidth:h,itemHeight:p,icon:l,iconRotate:w,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:m}))}else x.add(e.getLegendIcon({itemWidth:h,itemHeight:p,icon:l,iconRotate:g,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:m}));var S="left"===i?h+5:-5,_=i,A=o.get("formatter"),k=t;Hu(A)&&A?k=A.replace("{name}",null!=t?t:""):Wu(A)&&(k=A(t));var C=f?b.getTextColor():r.get("inactiveColor");x.add(new ax({style:kb(b,{text:k,x:S,y:p/2,fill:C,align:_,verticalAlign:"middle"},{inheritColor:C})}));var M=new Gy({shape:x.getBoundingRect(),style:{fill:"transparent"}}),I=r.getModel("tooltip");return I.get("show")&&eM({el:M,componentModel:o,itemName:t,itemTooltipOption:I.option}),x.add(M),x.eachChild((function(e){e.silent=!0})),M.silent=!c,this.getContentGroup().add(x),eb(x),x.__legendDataIndex=n,x},t.prototype.layoutInner=function(e,t,n,r,o,i){var a=this.getContentGroup(),s=this.getSelectorGroup();qw(e.get("orient"),a,e.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),c=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),o){qw("horizontal",s,e.get("selectorItemGap",!0));var u=s.getBoundingRect(),d=[-u.x,-u.y],h=e.get("selectorButtonGap",!0),p=e.getOrient().index,f=0===p?"width":"height",g=0===p?"height":"width",m=0===p?"y":"x";"end"===i?d[p]+=l[f]+h:c[p]+=u[f]+h,d[1-p]+=l[g]/2-u[g]/2,s.x=d[0],s.y=d[1],a.x=c[0],a.y=c[1];var v={x:0,y:0};return v[f]=l[f]+h+u[f],v[g]=Math.max(l[g],u[g]),v[m]=Math.min(0,u[m]+d[1-p]),v}return a.x=c[0],a.y=c[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(tk);function EJ(e,t,n,r){zJ(e,t,n,r),n.dispatchAction({type:"legendToggleSelect",name:null!=e?e:t}),OJ(e,t,n,r)}function NJ(e){for(var t,n=e.getZr().storage.getDisplayList(),r=0,o=n.length;r<o&&!(t=n[r].states.emphasis);)r++;return t&&t.hoverLayer}function OJ(e,t,n,r){NJ(n)||n.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:r})}function zJ(e,t,n,r){NJ(n)||n.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:r})}const BJ=RJ;function FJ(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.filterSeries((function(e){for(var n=0;n<t.length;n++)if(!t[n].isSelected(e.name))return!1;return!0}))}function VJ(e,t,n){var r,o={},i="toggleSelected"===e;return n.eachComponent("legend",(function(n){i&&null!=r?n[r?"select":"unSelect"](t.name):"allSelect"===e||"inverseSelect"===e?n[e]():(n[e](t.name),r=n.isSelected(t.name)),Ru(n.getData(),(function(e){var t=e.get("name");if("\n"!==t&&""!==t){var r=n.isSelected(t);o.hasOwnProperty(t)?o[t]=o[t]&&r:o[t]=r}}))})),"allSelect"===e||"inverseSelect"===e?{selected:o}:{name:t.name,selected:o}}function WJ(e){e.registerComponentModel(DJ),e.registerComponentView(BJ),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,FJ),e.registerSubTypeDefaulter("legend",(function(){return"plain"})),function(e){e.registerAction("legendToggleSelect","legendselectchanged",Fu(VJ,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",Fu(VJ,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",Fu(VJ,"inverseSelect")),e.registerAction("legendSelect","legendselected",Fu(VJ,"select")),e.registerAction("legendUnSelect","legendunselected",Fu(VJ,"unSelect"))}(e)}function HJ(e,t,n){var r=[1,1];r[e.getOrient().index]=0,Qw(t,n,{type:"box",ignoreSize:!!r})}const GJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(t,n,r){var o=Jw(t);e.prototype.init.call(this,t,n,r),HJ(this,t,o)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),HJ(this,this.option,t)},t.type="legend.scroll",t.defaultOption=Kb(DJ.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),t}(DJ);var UJ=Fg,XJ=["width","height"],YJ=["x","y"],qJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!0,n._currentIndex=0,n}return ru(t,e),t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new UJ),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new UJ)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(t,n,r,o,i,a,s){var l=this;e.prototype.renderInner.call(this,t,n,r,o,i,a,s);var c=this._controllerGroup,u=n.get("pageIconSize",!0),d=Vu(u)?u:[u,u];p("pagePrev",0);var h=n.getModel("pageTextStyle");function p(e,t){var r=e+"DataIndex",i=KC(n.get("pageIcons",!0)[n.getOrient().name][t],{onclick:Bu(l._pageGo,l,r,n,o)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});i.name=e,c.add(i)}c.add(new ax({name:"pageText",style:{text:"xx/xx",fill:h.getTextColor(),font:h.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),p("pageNext",1)},t.prototype.layoutInner=function(e,t,n,r,o,i){var a=this.getSelectorGroup(),s=e.getOrient().index,l=XJ[s],c=YJ[s],u=XJ[1-s],d=YJ[1-s];o&&qw("horizontal",a,e.get("selectorItemGap",!0));var h=e.get("selectorButtonGap",!0),p=a.getBoundingRect(),f=[-p.x,-p.y],g=Cu(n);o&&(g[l]=n[l]-p[l]-h);var m=this._layoutContentAndController(e,r,g,s,l,u,d,c);if(o){if("end"===i)f[s]+=m[l]+h;else{var v=p[l]+h;f[s]-=v,m[c]-=v}m[l]+=p[l]+h,f[1-s]+=m[d]+m[u]/2-p[u]/2,m[u]=Math.max(m[u],p[u]),m[d]=Math.min(m[d],p[d]+f[1-s]),a.x=f[0],a.y=f[1],a.markRedraw()}return m},t.prototype._layoutContentAndController=function(e,t,n,r,o,i,a,s){var l=this.getContentGroup(),c=this._containerGroup,u=this._controllerGroup;qw(e.get("orient"),l,e.get("itemGap"),r?n.width:null,r?null:n.height),qw("horizontal",u,e.get("pageButtonItemGap",!0));var d=l.getBoundingRect(),h=u.getBoundingRect(),p=this._showController=d[o]>n[o],f=[-d.x,-d.y];t||(f[r]=l[s]);var g=[0,0],m=[-h.x,-h.y],v=Ju(e.get("pageButtonGap",!0),e.get("itemGap",!0));p&&("end"===e.get("pageButtonPosition",!0)?m[r]+=n[o]-h[o]:g[r]+=h[o]+v);m[1-r]+=d[i]/2-h[i]/2,l.setPosition(f),c.setPosition(g),u.setPosition(m);var y={x:0,y:0};if(y[o]=p?n[o]:d[o],y[i]=Math.max(d[i],h[i]),y[a]=Math.min(0,h[a]+m[1-r]),c.__rectSize=n[o],p){var x={x:0,y:0};x[o]=Math.max(n[o]-h[o]-v,0),x[i]=y[i],c.setClipPath(new Gy({shape:x})),c.__rectSize=x[o]}else u.eachChild((function(e){e.attr({invisible:!0,silent:!0})}));var b=this._getPageInfo(e);return null!=b.pageIndex&&pb(l,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),y},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];null!=r&&n.dispatchAction({type:"legendScroll",scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;Ru(["pagePrev","pageNext"],(function(r){var o=null!=t[r+"DataIndex"],i=n.childOfName(r);i&&(i.setStyle("fill",o?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),i.cursor=o?"pointer":"default")}));var r=n.childOfName("pageText"),o=e.get("pageFormatter"),i=t.pageIndex,a=null!=i?i+1:0,s=t.pageCount;r&&o&&r.setStyle("text",Hu(o)?o.replace("{current}",null==a?"":a+"").replace("{total}",null==s?"":s+""):o({current:a,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get("scrollDataIndex",!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,o=e.getOrient().index,i=XJ[o],a=YJ[o],s=this._findTargetItemIndex(t),l=n.children(),c=l[s],u=l.length,d=u?1:0,h={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return h;var p=y(c);h.contentPosition[o]=-p.s;for(var f=s+1,g=p,m=p,v=null;f<=u;++f)(!(v=y(l[f]))&&m.e>g.s+r||v&&!x(v,g.s))&&(g=m.i>g.i?m:v)&&(null==h.pageNextDataIndex&&(h.pageNextDataIndex=g.i),++h.pageCount),m=v;for(f=s-1,g=p,m=p,v=null;f>=-1;--f)(v=y(l[f]))&&x(m,v.s)||!(g.i<m.i)||(m=g,null==h.pagePrevDataIndex&&(h.pagePrevDataIndex=g.i),++h.pageCount,++h.pageIndex),g=v;return h;function y(e){if(e){var t=e.getBoundingRect(),n=t[a]+e[a];return{s:n,e:n+t[i],i:e.__legendDataIndex}}}function x(e,t){return e.e>=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){return this._showController?(this.getContentGroup().eachChild((function(r,o){var i=r.__legendDataIndex;null==n&&null!=i&&(n=o),i===e&&(t=o)})),null!=t?t:n):0;var t,n},t.type="legend.scroll",t}(BJ);const ZJ=qJ;function KJ(e){cD(WJ),e.registerComponentModel(GJ),e.registerComponentView(ZJ),function(e){e.registerAction("legendScroll","legendscroll",(function(e,t){var n=e.scrollDataIndex;null!=n&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},(function(e){e.setScrollDataIndex(n)}))}))}(e)}const $J=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.type="dataZoom.inside",t.defaultOption=Kb(MK.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(MK);var QJ=jm();function JJ(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function e0(e,t){e.isDisposed()||e.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function t0(e,t,n,r){return e.coordinateSystem.containPoint([n,r])}function n0(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,(function(e,t){var n=QJ(t),r=n.coordSysRecordMap||(n.coordSysRecordMap=dd());r.each((function(e){e.dataZoomInfoMap=null})),e.eachComponent({mainType:"dataZoom",subType:"inside"},(function(e){Ru(_K(e).infoList,(function(n){var o=n.model.uid,i=r.get(o)||r.set(o,function(e,t){var n={model:t,containsPoint:Fu(t0,t),dispatchAction:Fu(e0,e),dataZoomInfoMap:null,controller:null},r=n.controller=new HO(e.getZr());return Ru(["pan","zoom","scrollMove"],(function(e){r.on(e,(function(t){var r=[];n.dataZoomInfoMap.each((function(o){if(t.isAvailableBehavior(o.model.option)){var i=(o.getRange||{})[e],a=i&&i(o.dzReferCoordSysInfo,n.model.mainType,n.controller,t);!o.model.get("disabled",!0)&&a&&r.push({dataZoomId:o.model.id,start:a[0],end:a[1]})}})),r.length&&n.dispatchAction(r)}))})),n}(t,n.model));(i.dataZoomInfoMap||(i.dataZoomInfoMap=dd())).set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})}))})),r.each((function(e){var t,n=e.controller,o=e.dataZoomInfoMap;if(o){var i=o.keys()[0];null!=i&&(t=o.get(i))}if(t){var a=function(e){var t,n="type_",r={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0;return e.each((function(e){var i=e.model,a=!i.get("disabled",!0)&&(!i.get("zoomLock",!0)||"move");r[n+a]>r[n+t]&&(t=a),o=o&&i.get("preventDefaultMouseMove",!0)})),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o}}}(o);n.enable(a.controlType,a.opt),n.setPointerChecker(e.containsPoint),mM(e,"dispatchAction",t.model.get("throttle",!0),"fixRate")}else JJ(r,e)}))}))}var r0=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return ru(t,e),t.prototype.render=function(t,n,r){e.prototype.render.apply(this,arguments),t.noTarget()?this._clear():(this.range=t.getPercentRange(),function(e,t,n){QJ(e).coordSysRecordMap.each((function(e){var r=e.dataZoomInfoMap.get(t.uid);r&&(r.getRange=n)}))}(r,t,{pan:Bu(o0.pan,this),zoom:Bu(o0.zoom,this),scrollMove:Bu(o0.scrollMove,this)}))},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){!function(e,t){for(var n=QJ(e).coordSysRecordMap,r=n.keys(),o=0;o<r.length;o++){var i=r[o],a=n.get(i),s=a.dataZoomInfoMap;if(s){var l=t.uid;s.get(l)&&(s.removeKey(l),s.keys().length||JJ(n,a))}}}(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(TK),o0={zoom:function(e,t,n,r){var o=this.range,i=o.slice(),a=e.axisModels[0];if(a){var s=a0[t](null,[r.originX,r.originY],a,n,e),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(i[1]-i[0])+i[0],c=Math.max(1/r.scale,0);i[0]=(i[0]-l)*c+l,i[1]=(i[1]-l)*c+l;var u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return sH(0,i,[0,100],0,u.minSpan,u.maxSpan),this.range=i,o[0]!==i[0]||o[1]!==i[1]?i:void 0}},pan:i0((function(e,t,n,r,o,i){var a=a0[r]([i.oldX,i.oldY],[i.newX,i.newY],t,o,n);return a.signal*(e[1]-e[0])*a.pixel/a.pixelLength})),scrollMove:i0((function(e,t,n,r,o,i){return a0[r]([0,0],[i.scrollDelta,i.scrollDelta],t,o,n).signal*(e[1]-e[0])*i.scrollDelta}))};function i0(e){return function(t,n,r,o){var i=this.range,a=i.slice(),s=t.axisModels[0];if(s)return sH(e(a,s,t,n,r,o),a,[0,100],"all"),this.range=a,i[0]!==a[0]||i[1]!==a[1]?a:void 0}}var a0={grid:function(e,t,n,r,o){var i=n.axis,a={},s=o.model.coordinateSystem.getRect();return e=e||[0,0],"x"===i.dim?(a.pixel=t[0]-e[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=i.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=i.inverse?-1:1),a},polar:function(e,t,n,r,o){var i=n.axis,a={},s=o.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),c=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),"radiusAxis"===n.mainType?(a.pixel=t[0]-e[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=i.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=c[1]-c[0],a.pixelStart=c[0],a.signal=i.inverse?-1:1),a},singleAxis:function(e,t,n,r,o){var i=n.axis,a=o.model.coordinateSystem.getRect(),s={};return e=e||[0,0],"horizontal"===i.orient?(s.pixel=t[0]-e[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=i.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=i.inverse?-1:1),s}};const s0=r0;function l0(e){OK(e),e.registerComponentModel($J),e.registerComponentView(s0),n0(e)}const c0=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=Kb(MK.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),t}(MK);var u0=Gy,d0="horizontal",h0="vertical",p0=["line","bar","candlestick","scatter"],f0={easing:"cubicOut",duration:100,delay:0},g0=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return ru(t,e),t.prototype.init=function(e,t){this.api=t,this._onBrush=Bu(this._onBrush,this),this._onBrushEnd=Bu(this._onBrushEnd,this)},t.prototype.render=function(t,n,r,o){if(e.prototype.render.apply(this,arguments),mM(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),!1!==t.get("show")){if(t.noTarget())return this._clear(),void this.group.removeAll();o&&"dataZoom"===o.type&&o.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){vM(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var t=this._displayables.sliderGroup=new Fg;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,t=this.api,n=e.get("brushSelect")?7:0,r=this._findCoordRect(),o={width:t.getWidth(),height:t.getHeight()},i=this._orient===d0?{right:o.width-r.x-r.width,top:o.height-30-7-n,width:r.width,height:30}:{right:7,top:r.y,width:30,height:r.height},a=Jw(e.option);Ru(["right","top","width","height"],(function(e){"ph"===a[e]&&(a[e]=i[e])}));var s=Zw(a,o);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===h0&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,t=this._location,n=this._orient,r=this.dataZoomModel.getFirstTargetAxisModel(),o=r&&r.get("inverse"),i=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;i.attr(n!==d0||o?n===d0&&o?{scaleY:a?1:-1,scaleX:-1}:n!==h0||o?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=e.getBoundingRect([i]);e.x=t.x-s.x,e.y=t.y-s.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.sliderGroup,r=e.get("brushSelect");n.add(new u0({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var o=new u0({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:"transparent"},z2:0,onclick:Bu(this._onClickPanel,this)}),i=this.api.getZr();r?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",i.on("mousemove",this._onBrush),i.on("mouseup",this._onBrushEnd)):(i.off("mousemove",this._onBrush),i.off("mouseup",this._onBrushEnd)),n.add(o)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],e){var t=this._size,n=this._shadowSize||[],r=e.series,o=r.getRawData(),i=r.getShadowDim&&r.getShadowDim(),a=i&&o.getDimensionInfo(i)?r.getShadowDim():e.otherDim;if(null!=a){var s=this._shadowPolygonPts,l=this._shadowPolylinePts;if(o!==this._shadowData||a!==this._shadowDim||t[0]!==n[0]||t[1]!==n[1]){var c=o.getDataExtent(a),u=.3*(c[1]-c[0]);c=[c[0]-u,c[1]+u];var d,h=[0,t[1]],p=[0,t[0]],f=[[t[0],0],[0,0]],g=[],m=p[1]/(o.count()-1),v=0,y=Math.round(o.count()/t[0]);o.each([a],(function(e,t){if(y>0&&t%y)v+=m;else{var n=null==e||isNaN(e)||""===e,r=n?0:qg(e,c,h,!0);n&&!d&&t?(f.push([f[f.length-1][0],0]),g.push([g[g.length-1][0],0])):!n&&d&&(f.push([v,0]),g.push([v,0])),f.push([v,r]),g.push([v,r]),v+=m,d=n}})),s=this._shadowPolygonPts=f,l=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=a,this._shadowSize=[t[0],t[1]];for(var x=this.dataZoomModel,b=0;b<3;b++){var w=S(1===b);this._displayables.sliderGroup.add(w),this._displayables.dataShadowSegs.push(w)}}}function S(e){var t=x.getModel(e?"selectedDataBackground":"dataBackground"),n=new Fg,r=new $k({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),o=new eC({shape:{points:l},segmentIgnoreThreshold:1,style:t.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(r),n.add(o),n}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,t=e.get("showDataShadow");if(!1!==t){var n,r=this.ecModel;return e.eachTargetAxis((function(o,i){Ru(e.getAxisProxy(o,i).getTargetSeriesModels(),(function(e){if(!n&&!(!0!==t&&ju(p0,e.get("type"))<0)){var a,s=r.getComponent(wK(o),i).axis,l=function(e){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[e]}(o),c=e.coordinateSystem;null!=l&&c.getOtherAxis&&(a=c.getOtherAxis(s).inverse),l=e.getData().mapDimension(l),n={thisAxis:s,series:e,thisDim:o,otherDim:l,otherAxisInverse:a}}}),this)}),this),n}},t.prototype._renderHandle=function(){var e=this.group,t=this._displayables,n=t.handles=[null,null],r=t.handleLabels=[null,null],o=this._displayables.sliderGroup,i=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,c=a.get("brushSelect"),u=t.filler=new u0({silent:c,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});o.add(u),o.add(new u0({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:i[0],height:i[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),Ru([0,1],(function(t){var i=a.get("handleIcon");!vI[i]&&i.indexOf("path://")<0&&i.indexOf("image://")<0&&(i="path://"+i);var s=bI(i,-1,0,2,2,null,!0);s.attr({cursor:m0(this._orient),draggable:!0,drift:Bu(this._onDragMove,this,t),ondragend:Bu(this._onDragEnd,this),onmouseover:Bu(this._showDataInfo,this,!0),onmouseout:Bu(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),c=a.get("handleSize");this._handleHeight=Zg(c,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),eb(s);var u=a.get("handleColor");null!=u&&(s.style.fill=u),o.add(n[t]=s);var d=a.getModel("textStyle");e.add(r[t]=new ax({silent:!0,invisible:!0,style:kb(d,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:d.getTextColor(),font:d.getFont()}),z2:10}))}),this);var d=u;if(c){var h=Zg(a.get("moveHandleSize"),i[1]),p=t.moveHandle=new Gy({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:i[1]-.5,height:h}}),f=.8*h,g=t.moveHandleIcon=bI(a.get("moveHandleIcon"),-f/2,-f/2,f,f,"#fff",!0);g.silent=!0,g.y=i[1]+h/2-.5,p.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(i[1]/2,Math.max(h,10));(d=t.moveZone=new Gy({invisible:!0,shape:{y:i[1]-m,height:h+m}})).on("mouseover",(function(){s.enterEmphasis(p)})).on("mouseout",(function(){s.leaveEmphasis(p)})),o.add(p),o.add(g),o.add(d)}d.attr({draggable:!0,cursor:m0(this._orient),drift:Bu(this._onDragMove,this,"all"),ondragstart:Bu(this._showDataInfo,this,!0),ondragend:Bu(this._onDragEnd,this),onmouseover:Bu(this._showDataInfo,this,!0),onmouseout:Bu(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[qg(e[0],[0,100],t,!0),qg(e[1],[0,100],t,!0)]},t.prototype._updateInterval=function(e,t){var n=this.dataZoomModel,r=this._handleEnds,o=this._getViewExtent(),i=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];sH(t,r,o,n.get("zoomLock")?"all":e,null!=i.minSpan?qg(i.minSpan,a,o,!0):null,null!=i.maxSpan?qg(i.maxSpan,a,o,!0):null);var s=this._range,l=this._range=$g([qg(r[0],o,a,!0),qg(r[1],o,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},t.prototype._updateView=function(e){var t=this._displayables,n=this._handleEnds,r=$g(n.slice()),o=this._size;Ru([0,1],(function(e){var r=t.handles[e],i=this._handleHeight;r.attr({scaleX:i/2,scaleY:i/2,x:n[e]+(e?-1:1),y:o[1]/2-i/2})}),this),t.filler.setShape({x:r[0],y:0,width:r[1]-r[0],height:o[1]});var i={x:r[0],width:r[1]-r[0]};t.moveHandle&&(t.moveHandle.setShape(i),t.moveZone.setShape(i),t.moveZone.getBoundingRect(),t.moveHandleIcon&&t.moveHandleIcon.attr("x",i.x+i.width/2));for(var a=t.dataShadowSegs,s=[0,r[0],r[1],o[0]],l=0;l<a.length;l++){var c=a[l],u=c.getClipPath();u||(u=new Gy,c.setClipPath(u)),u.setShape({x:s[l],y:0,width:s[l+1]-s[l],height:o[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){var t=this.dataZoomModel,n=this._displayables,r=n.handleLabels,o=this._orient,i=["",""];if(t.get("showDetail")){var a=t.findRepresentativeAxisProxy();if(a){var s=a.getAxisModel().axis,l=this._range,c=e?a.calculateDataWindow({start:l[0],end:l[1]}).valueWindow:a.getDataValueWindow();i=[this._formatLabel(c[0],s),this._formatLabel(c[1],s)]}}var u=$g(this._handleEnds.slice());function d(e){var t=HC(n.handles[e].parent,this.group),a=UC(0===e?"right":"left",t),s=this._handleWidth/2+5,l=GC([u[e]+(0===e?-s:s),this._size[1]/2],t);r[e].setStyle({x:l[0],y:l[1],verticalAlign:o===d0?"middle":a,align:o===d0?a:"center",text:i[e]})}d.call(this,0),d.call(this,1)},t.prototype._formatLabel=function(e,t){var n=this.dataZoomModel,r=n.get("labelFormatter"),o=n.get("labelPrecision");null!=o&&"auto"!==o||(o=t.getPixelPrecision());var i=null==e||isNaN(e)?"":"category"===t.type||"time"===t.type?t.scale.getLabel({value:Math.round(e)}):e.toFixed(Math.min(o,20));return Wu(r)?r(e,i):Hu(r)?r.replace("{value}",i):i},t.prototype._showDataInfo=function(e){e=this._dragging||e;var t=this._displayables,n=t.handleLabels;n[0].attr("invisible",!e),n[1].attr("invisible",!e),t.moveHandle&&this.api[e?"enterEmphasis":"leaveEmphasis"](t.moveHandle,1)},t.prototype._onDragMove=function(e,t,n,r){this._dragging=!0,sh(r.event);var o=GC([t,n],this._displayables.sliderGroup.getLocalTransform(),!0),i=this._updateInterval(e,o[0]),a=this.dataZoomModel.get("realtime");this._updateView(!a),i&&a&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1),!this.dataZoomModel.get("realtime")&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(e){var t=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(n[0]<0||n[0]>t[0]||n[1]<0||n[1]>t[1])){var r=this._handleEnds,o=(r[0]+r[1])/2,i=this._updateInterval("all",n[0]-o);this._updateView(),i&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var t=e.offsetX,n=e.offsetY;this._brushStart=new bh(t,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var t=this._displayables.brushRect;if(this._brushing=!1,t){t.attr("ignore",!0);var n=t.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var r=this._getViewExtent(),o=[0,100];this._range=$g([qg(n.x,r,o,!0),qg(n.x+n.width,r,o,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(sh(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,t){var n=this._displayables,r=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new u0({silent:!0,style:r.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var i=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(e,t),l=a.transformCoordToLocal(i.x,i.y),c=this._size;s[0]=Math.max(Math.min(c[0],s[0]),0),o.setShape({x:l[0],y:0,width:s[0]-l[0],height:c[1]})},t.prototype._dispatchZoomAction=function(e){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?f0:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=_K(this.dataZoomModel).infoList;if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var r=this.api.getWidth(),o=this.api.getHeight();e={x:.2*r,y:.2*o,width:.6*r,height:.6*o}}return e},t.type="dataZoom.slider",t}(TK);function m0(e){return"vertical"===e?"ns-resize":"ew-resize"}const v0=g0;function y0(e){e.registerComponentModel(c0),e.registerComponentView(v0),OK(e)}var x0={get:function(e,t,n){var r=Cu((b0[e]||{})[t]);return n&&Vu(r)?r[r.length-1]:r}},b0={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}};const w0=x0;var S0=JF.mapVisual,_0=JF.eachVisual,A0=Vu,k0=Ru,C0=$g,M0=qg,I0=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=["inRange","outOfRange"],n.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],n.layoutMode={type:"box",ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return ru(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&cQ(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=Bu(e,this),this.controllerVisuals=lQ(this.option.controller,t,e),this.targetVisuals=lQ(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this.option.seriesIndex,t=[];return null==e||"all"===e?this.ecModel.eachSeries((function(e,n){t.push(n)})):t=xm(e),t},t.prototype.eachTargetSeries=function(e,t){Ru(this.getTargetSeriesIndices(),(function(n){var r=this.ecModel.getSeriesByIndex(n);r&&e.call(t,r)}),this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries((function(n){n===e&&(t=!0)})),t},t.prototype.formatValueText=function(e,t,n){var r,o=this.option,i=o.precision,a=this.dataBound,s=o.formatter;n=n||["<",">"],Vu(e)&&(e=e.slice(),r=!0);var l=t?e:r?[c(e[0]),c(e[1])]:c(e);return Hu(s)?s.replace("{value}",r?l[0]:l).replace("{value2}",r?l[1]:l):Wu(s)?r?s(e[0],e[1]):s(e):r?e[0]===a[0]?n[0]+" "+l[1]:e[1]===a[1]?n[1]+" "+l[0]:l[0]+" - "+l[1]:l;function c(e){return e===a[0]?"min":e===a[1]?"max":(+e).toFixed(Math.min(i,20))}},t.prototype.resetExtent=function(){var e=this.option,t=C0([e.min,e.max]);this._dataExtent=t},t.prototype.getDataDimensionIndex=function(e){var t=this.option.dimension;if(null!=t)return e.getDimensionIndex(t);for(var n=e.dimensions,r=n.length-1;r>=0;r--){var o=n[r],i=e.getDimensionInfo(o);if(!i.isCalculationCoord)return i.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||(t.target={}),o=t.controller||(t.controller={});Mu(r,n),Mu(o,n);var i=this.isCategory();function a(n){A0(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get("gradientColor")}}a.call(this,r),a.call(this,o),function(e,t,n){var r=e[t],o=e[n];r&&!o&&(o=e[n]={},k0(r,(function(e,t){if(JF.isValidType(t)){var n=w0.get(t,"inactive",i);null!=n&&(o[t]=n,"color"!==t||o.hasOwnProperty("opacity")||o.hasOwnProperty("colorAlpha")||(o.opacity=[0,0]))}})))}.call(this,r,"inRange","outOfRange"),function(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get("inactiveColor"),o=this.getItemSymbol()||"roundRect";k0(this.stateList,(function(a){var s=this.itemSize,l=e[a];l||(l=e[a]={color:i?r:[r]}),null==l.symbol&&(l.symbol=t&&Cu(t)||(i?o:[o])),null==l.symbolSize&&(l.symbolSize=n&&Cu(n)||(i?s[0]:[s[0],s[0]])),l.symbol=S0(l.symbol,(function(e){return"none"===e?o:e}));var c=l.symbolSize;if(null!=c){var u=-1/0;_0(c,(function(e){e>u&&(u=e)})),l.symbolSize=S0(c,(function(e){return M0(e,[0,u],[0,s[0]],!0)}))}}),this)}.call(this,o)},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type="visualMap",t.dependencies=["series"],t.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},t}(rS);const T0=I0;var D0=[20,140],j0=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual((function(e){e.mappingMethod="linear",e.dataExtent=this.getExtent()})),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(null==t[0]||isNaN(t[0]))&&(t[0]=D0[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=D0[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):Vu(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),Ru(this.stateList,(function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)}),this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=$g((this.get("range")||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]<e[0]&&(t[0]=e[0]),t[1]<e[0]&&(t[1]=e[0]),t},t.prototype.getValueState=function(e){var t=this.option.range,n=this.getExtent();return(t[0]<=n[0]||t[0]<=e)&&(t[1]>=n[1]||e<=t[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries((function(n){var r=[],o=n.getData();o.each(this.getDataDimensionIndex(o),(function(t,n){e[0]<=t&&t<=e[1]&&r.push(n)}),this),t.push({seriesId:n.id,dataIndex:r})}),this),t},t.prototype.getVisualMeta=function(e){var t=P0(this,"outOfRange",this.getExtent()),n=P0(this,"inRange",this.option.range.slice()),r=[];function o(t,n){r.push({value:t,color:e(t,n)})}for(var i=0,a=0,s=n.length,l=t.length;a<l&&(!n.length||t[a]<=n[0]);a++)t[a]<n[i]&&o(t[a],"outOfRange");for(var c=1;i<s;i++,c=0)c&&r.length&&o(n[i],"outOfRange"),o(n[i],"inRange");for(c=1;a<l;a++)(!n.length||n[n.length-1]<t[a])&&(c&&(r.length&&o(r[r.length-1].value,"outOfRange"),c=0),o(t[a],"outOfRange"));var u=r.length;return{stops:r,outerColors:[u?r[0].color:"transparent",u?r[u-1].color:"transparent"]}},t.type="visualMap.continuous",t.defaultOption=Kb(T0.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),t}(T0);function P0(e,t,n){if(n[0]===n[1])return n.slice();for(var r=(n[1]-n[0])/200,o=n[0],i=[],a=0;a<=200&&o<n[1];a++)i.push(o),o+=r;return i.push(n[1]),i}const L0=j0;const R0=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.autoPositionValues={left:1,right:1,top:1,bottom:1},n}return ru(t,e),t.prototype.init=function(e,t){this.ecModel=e,this.api=t},t.prototype.render=function(e,t,n,r){this.visualMapModel=e,!1!==e.get("show")?this.doRender(e,t,n,r):this.group.removeAll()},t.prototype.renderBackground=function(e){var t=this.visualMapModel,n=Ow(t.get("padding")||0),r=e.getBoundingRect();e.add(new Gy({z2:-1,silent:!0,shape:{x:r.x-n[3],y:r.y-n[0],width:r.width+n[3]+n[1],height:r.height+n[0]+n[2]},style:{fill:t.get("backgroundColor"),stroke:t.get("borderColor"),lineWidth:t.get("borderWidth")}}))},t.prototype.getControllerVisual=function(e,t,n){var r=(n=n||{}).forceState,o=this.visualMapModel,i={};if("color"===t){var a=o.get("contentColor");i.color=a}function s(e){return i[e]}function l(e,t){i[e]=t}var c=o.controllerVisuals[r||o.getValueState(e)];return Ru(JF.prepareVisualTypes(c),(function(r){var o=c[r];n.convertOpacityToAlpha&&"opacity"===r&&(r="colorAlpha",o=c.__alphaForOpacity),JF.dependsOn(r,t)&&o&&o.applyVisual(e,s,l)})),i[t]},t.prototype.positionGroup=function(e){var t=this.visualMapModel,n=this.api;Kw(e,t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})},t.prototype.doRender=function(e,t,n,r){},t.type="visualMap",t}(tk);var E0=[["left","right","width"],["top","bottom","height"]];function N0(e,t,n){var r=e.option,o=r.align;if(null!=o&&"auto"!==o)return o;for(var i={width:t.getWidth(),height:t.getHeight()},a="horizontal"===r.orient?1:0,s=E0[a],l=[0,null,10],c={},u=0;u<3;u++)c[E0[1-a][u]]=l[u],c[s[u]]=2===u?n[0]:r[s[u]];var d=[["x","width",3],["y","height",0]][a],h=Zw(c,i,r.padding);return s[(h.margin[d[2]]||0)+h[d[0]]+.5*h[d[1]]<.5*i[d[1]]?0:1]}function O0(e,t){return Ru(e||[],(function(e){null!=e.dataIndex&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey="visualMap"+(t?t.componentIndex:"")})),e}var z0=qg,B0=Ru,F0=Math.min,V0=Math.max,W0=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._shapes={},n._dataInterval=[],n._handleEnds=[],n._hoverLinkDataIndices=[],n}return ru(t,e),t.prototype.init=function(t,n){e.prototype.init.call(this,t,n),this._hoverLinkFromSeriesMouseOver=Bu(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=Bu(this._hideIndicator,this)},t.prototype.doRender=function(e,t,n,r){r&&"selectDataRange"===r.type&&r.from===this.uid||this._buildView()},t.prototype._buildView=function(){this.group.removeAll();var e=this.visualMapModel,t=this.group;this._orient=e.get("orient"),this._useHandle=e.get("calculable"),this._resetInterval(),this._renderBar(t);var n=e.get("text");this._renderEndsText(t,n,0),this._renderEndsText(t,n,1),this._updateView(!0),this.renderBackground(t),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(t)},t.prototype._renderEndsText=function(e,t,n){if(t){var r=t[1-n];r=null!=r?r+"":"";var o=this.visualMapModel,i=o.get("textGap"),a=o.itemSize,s=this._shapes.mainGroup,l=this._applyTransform([a[0]/2,0===n?-i:a[1]+i],s),c=this._applyTransform(0===n?"bottom":"top",s),u=this._orient,d=this.visualMapModel.textStyleModel;this.group.add(new ax({style:kb(d,{x:l[0],y:l[1],verticalAlign:"horizontal"===u?"middle":c,align:"horizontal"===u?c:"center",text:r})}))}},t.prototype._renderBar=function(e){var t=this.visualMapModel,n=this._shapes,r=t.itemSize,o=this._orient,i=this._useHandle,a=N0(t,this.api,r),s=n.mainGroup=this._createBarGroup(a),l=new Fg;s.add(l),l.add(n.outOfRange=H0()),l.add(n.inRange=H0(null,i?U0(this._orient):null,Bu(this._dragHandle,this,"all",!1),Bu(this._dragHandle,this,"all",!0))),l.setClipPath(new Gy({shape:{x:0,y:0,width:r[0],height:r[1],r:3}}));var c=t.textStyleModel.getTextRect("\u56fd"),u=V0(c.width,c.height);i&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(t,s,0,r,u,o),this._createHandle(t,s,1,r,u,o)),this._createIndicator(t,s,r,u,o),e.add(s)},t.prototype._createHandle=function(e,t,n,r,o,i){var a=Bu(this._dragHandle,this,n,!1),s=Bu(this._dragHandle,this,n,!0),l=Cg(e.get("handleSize"),r[0]),c=bI(e.get("handleIcon"),-l/2,-l/2,l,l,null,!0),u=U0(this._orient);c.attr({cursor:u,draggable:!0,drift:a,ondragend:s,onmousemove:function(e){sh(e.event)}}),c.x=r[0]/2,c.useStyle(e.getModel("handleStyle").getItemStyle()),c.setStyle({strokeNoScale:!0,strokeFirst:!0}),c.style.lineWidth*=2,c.ensureState("emphasis").style=e.getModel(["emphasis","handleStyle"]).getItemStyle(),ab(c,!0),t.add(c);var d=this.visualMapModel.textStyleModel,h=new ax({cursor:u,draggable:!0,drift:a,onmousemove:function(e){sh(e.event)},ondragend:s,style:kb(d,{x:0,y:0,text:""})});h.ensureState("blur").style={opacity:.1},h.stateTransition={duration:200},this.group.add(h);var p=[l,0],f=this._shapes;f.handleThumbs[n]=c,f.handleLabelPoints[n]=p,f.handleLabels[n]=h},t.prototype._createIndicator=function(e,t,n,r,o){var i=Cg(e.get("indicatorSize"),n[0]),a=bI(e.get("indicatorIcon"),-i/2,-i/2,i,i,null,!0);a.attr({cursor:"move",invisible:!0,silent:!0,x:n[0]/2});var s=e.getModel("indicatorStyle").getItemStyle();if(a instanceof Ny){var l=a.style;a.useStyle(Tu({image:l.image,x:l.x,y:l.y,width:l.width,height:l.height},s))}else a.useStyle(s);t.add(a);var c=this.visualMapModel.textStyleModel,u=new ax({silent:!0,invisible:!0,style:kb(c,{x:0,y:0,text:""})});this.group.add(u);var d=[("horizontal"===o?r/2:6)+n[0]/2,0],h=this._shapes;h.indicator=a,h.indicatorLabel=u,h.indicatorLabelPoint=d,this._firstShowIndicator=!0},t.prototype._dragHandle=function(e,t,n,r){if(this._useHandle){if(this._dragging=!t,!t){var o=this._applyTransform([n,r],this._shapes.mainGroup,!0);this._updateInterval(e,o[1]),this._hideIndicator(),this._updateView()}t===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),t?!this._hovering&&this._clearHoverLinkToSeries():G0(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},t.prototype._resetInterval=function(){var e=this.visualMapModel,t=this._dataInterval=e.getSelected(),n=e.getExtent(),r=[0,e.itemSize[1]];this._handleEnds=[z0(t[0],n,r,!0),z0(t[1],n,r,!0)]},t.prototype._updateInterval=function(e,t){t=t||0;var n=this.visualMapModel,r=this._handleEnds,o=[0,n.itemSize[1]];sH(t,r,o,e,0);var i=n.getExtent();this._dataInterval=[z0(r[0],o,i,!0),z0(r[1],o,i,!0)]},t.prototype._updateView=function(e){var t=this.visualMapModel,n=t.getExtent(),r=this._shapes,o=[0,t.itemSize[1]],i=e?o:this._handleEnds,a=this._createBarVisual(this._dataInterval,n,i,"inRange"),s=this._createBarVisual(n,n,o,"outOfRange");r.inRange.setStyle({fill:a.barColor}).setShape("points",a.barPoints),r.outOfRange.setStyle({fill:s.barColor}).setShape("points",s.barPoints),this._updateHandle(i,a)},t.prototype._createBarVisual=function(e,t,n,r){var o={forceState:r,convertOpacityToAlpha:!0},i=this._makeColorGradient(e,o),a=[this.getControllerVisual(e[0],"symbolSize",o),this.getControllerVisual(e[1],"symbolSize",o)],s=this._createBarPoints(n,a);return{barColor:new mC(0,0,0,1,i),barPoints:s,handlesColor:[i[0].color,i[i.length-1].color]}},t.prototype._makeColorGradient=function(e,t){var n=[],r=(e[1]-e[0])/100;n.push({color:this.getControllerVisual(e[0],"color",t),offset:0});for(var o=1;o<100;o++){var i=e[0]+r*o;if(i>e[1])break;n.push({color:this.getControllerVisual(i,"color",t),offset:o/100})}return n.push({color:this.getControllerVisual(e[1],"color",t),offset:1}),n},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get("inverse");return new Fg("horizontal"!==t||n?"horizontal"===t&&n?{scaleX:"bottom"===e?-1:1,rotation:-Math.PI/2}:"vertical"!==t||n?{scaleX:"left"===e?1:-1}:{scaleX:"left"===e?1:-1,scaleY:-1}:{scaleX:"bottom"===e?1:-1,rotation:Math.PI/2})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,o=n.handleThumbs,i=n.handleLabels,a=r.itemSize,s=r.getExtent();B0([0,1],(function(l){var c=o[l];c.setStyle("fill",t.handlesColor[l]),c.y=e[l];var u=z0(e[l],[0,a[1]],s,!0),d=this.getControllerVisual(u,"symbolSize");c.scaleX=c.scaleY=d/a[0],c.x=a[0]-d/2;var h=GC(n.handleLabelPoints[l],HC(c,this.group));i[l].setStyle({x:h[0],y:h[1],text:r.formatValueText(this._dataInterval[l]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",n.mainGroup):"center"})}),this)}},t.prototype._showIndicator=function(e,t,n,r){var o=this.visualMapModel,i=o.getExtent(),a=o.itemSize,s=[0,a[1]],l=this._shapes,c=l.indicator;if(c){c.attr("invisible",!1);var u=this.getControllerVisual(e,"color",{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,"symbolSize"),h=z0(e,i,s,!0),p=a[0]-d/2,f={x:c.x,y:c.y};c.y=h,c.x=p;var g=GC(l.indicatorLabelPoint,HC(c,this.group)),m=l.indicatorLabel;m.attr("invisible",!1);var v=this._applyTransform("left",l.mainGroup),y="horizontal"===this._orient;m.setStyle({text:(n||"")+o.formatValueText(t),verticalAlign:y?v:"middle",align:y?"center":v});var x={x:p,y:h,style:{fill:u}},b={style:{x:g[0],y:g[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var w={duration:100,easing:"cubicInOut",additive:!0};c.x=f.x,c.y=f.y,c.animateTo(x,w),m.animateTo(b,w)}else c.attr(x),m.attr(b);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var _=0;_<S.length;_++)this.api.enterBlur(S[_])}},t.prototype._enableHoverLinkToSeries=function(){var e=this;this._shapes.mainGroup.on("mousemove",(function(t){if(e._hovering=!0,!e._dragging){var n=e.visualMapModel.itemSize,r=e._applyTransform([t.offsetX,t.offsetY],e._shapes.mainGroup,!0,!0);r[1]=F0(V0(0,r[1]),n[1]),e._doHoverLinkToSeries(r[1],0<=r[0]&&r[0]<=n[0])}})).on("mouseout",(function(){e._hovering=!1,!e._dragging&&e._clearHoverLinkToSeries()}))},t.prototype._enableHoverLinkFromSeries=function(){var e=this.api.getZr();this.visualMapModel.option.hoverLink?(e.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),e.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},t.prototype._doHoverLinkToSeries=function(e,t){var n=this.visualMapModel,r=n.itemSize;if(n.option.hoverLink){var o=[0,r[1]],i=n.getExtent();e=F0(V0(o[0],e),o[1]);var a=function(e,t,n){var r=6,o=e.get("hoverLinkDataSize");o&&(r=z0(o,t,n,!0)/2);return r}(n,i,o),s=[e-a,e+a],l=z0(e,o,i,!0),c=[z0(s[0],o,i,!0),z0(s[1],o,i,!0)];s[0]<o[0]&&(c[0]=-1/0),s[1]>o[1]&&(c[1]=1/0),t&&(c[0]===-1/0?this._showIndicator(l,c[1],"< ",a):c[1]===1/0?this._showIndicator(l,c[0],"> ",a):this._showIndicator(l,l,"\u2248 ",a));var u=this._hoverLinkDataIndices,d=[];(t||G0(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(c));var h=function(e,t){var n={},r={};return o(e||[],n),o(t||[],r,n),[i(n),i(r)];function o(e,t,n){for(var r=0,o=e.length;r<o;r++){var i=Mm(e[r].seriesId,null);if(null==i)return;for(var a=xm(e[r].dataIndex),s=n&&n[i],l=0,c=a.length;l<c;l++){var u=a[l];s&&s[u]?s[u]=null:(t[i]||(t[i]={}))[u]=1}}}function i(e,t){var n=[];for(var r in e)if(e.hasOwnProperty(r)&&null!=e[r])if(t)n.push(+r);else{var o=i(e[r],!0);o.length&&n.push({seriesId:r,dataIndex:o})}return n}}(u,d);this._dispatchHighDown("downplay",O0(h[0],n)),this._dispatchHighDown("highlight",O0(h[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var t;if(lI(e.target,(function(e){var n=sx(e);if(null!=n.dataIndex)return t=n,!0}),!0),t){var n=this.ecModel.getSeriesByIndex(t.seriesIndex),r=this.visualMapModel;if(r.isTargetSeries(n)){var o=n.getData(t.dataType),i=o.getStore().get(r.getDataDimensionIndex(o),t.dataIndex);isNaN(i)||this._showIndicator(i,i)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.indicatorLabel.attr("invisible",!0);var t=this._shapes.handleLabels;if(t)for(var n=0;n<t.length;n++)this.api.leaveBlur(t[n])},t.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var e=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",O0(e,this.visualMapModel)),e.length=0},t.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var e=this.api.getZr();e.off("mouseover",this._hoverLinkFromSeriesMouseOver),e.off("mouseout",this._hideIndicator)},t.prototype._applyTransform=function(e,t,n,r){var o=HC(t,r?null:this.group);return Vu(e)?GC(e,o,n):UC(e,o,n)},t.prototype._dispatchHighDown=function(e,t){t&&t.length&&this.api.dispatchAction({type:e,batch:t})},t.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},t.type="visualMap.continuous",t}(R0);function H0(e,t,n,r){return new $k({shape:{points:e},draggable:!!n,cursor:t,drift:n,onmousemove:function(e){sh(e.event)},ondragend:r})}function G0(e){var t=e.get("hoverLinkOnHandle");return!!(null==t?e.get("realtime"):t)}function U0(e){return"vertical"===e?"ns-resize":"ew-resize"}const X0=W0;var Y0={type:"selectDataRange",event:"dataRangeSelected",update:"update"},q0=function(e,t){t.eachComponent({mainType:"visualMap",query:e},(function(t){t.setSelected(e.selected)}))},Z0=[{createOnAllSeries:!0,reset:function(e,t){var n=[];return t.eachComponent("visualMap",(function(t){var r=e.pipelineContext;!t.isTargetSeries(e)||r&&r.large||n.push(function(e,t,n,r){var o={};return Ru(e,(function(e){var n=JF.prepareVisualTypes(t[e]);o[e]=n})),{progress:function(e,i){var a,s;function l(e){return rI(i,s,e)}function c(e,t){iI(i,s,e,t)}null!=r&&(a=i.getDimensionIndex(r));for(var u=i.getStore();null!=(s=e.next());){var d=i.getRawDataItem(s);if(!d||!1!==d.visualMap)for(var h=null!=r?u.get(a,s):s,p=n(h),f=t[p],g=o[p],m=0,v=g.length;m<v;m++){var y=g[m];f[y]&&f[y].applyVisual(h,l,c)}}}}}(t.stateList,t.targetVisuals,Bu(t.getValueState,t),t.getDataDimensionIndex(e.getData())))})),n}},{createOnAllSeries:!0,reset:function(e,t){var n=e.getData(),r=[];t.eachComponent("visualMap",(function(t){if(t.isTargetSeries(e)){var o=t.getVisualMeta(Bu(K0,null,e,t))||{stops:[],outerColors:[]},i=t.getDataDimensionIndex(n);i>=0&&(o.dimension=i,r.push(o))}})),e.getData().setVisual("visualMeta",r)}}];function K0(e,t,n,r){for(var o=t.targetVisuals[r],i=JF.prepareVisualTypes(o),a={color:oI(e.getData(),"color")},s=0,l=i.length;s<l;s++){var c=i[s],u=o["opacity"===c?"__alphaForOpacity":c];u&&u.applyVisual(n,d,h)}return a.color;function d(e){return a[e]}function h(e,t){a[e]=t}}var $0=Ru;function Q0(e){var t=e&&e.visualMap;Vu(t)||(t=t?[t]:[]),$0(t,(function(e){if(e){J0(e,"splitList")&&!J0(e,"pieces")&&(e.pieces=e.splitList,delete e.splitList);var t=e.pieces;t&&Vu(t)&&$0(t,(function(e){Xu(e)&&(J0(e,"start")&&!J0(e,"min")&&(e.min=e.start),J0(e,"end")&&!J0(e,"max")&&(e.max=e.end))}))}}))}function J0(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}var e1=!1;function t1(e){e1||(e1=!0,e.registerSubTypeDefaulter("visualMap",(function(e){return e.categories||(e.pieces?e.pieces.length>0:e.splitNumber>0)&&!e.calculable?"piecewise":"continuous"})),e.registerAction(Y0,q0),Ru(Z0,(function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)})),e.registerPreprocessor(Q0))}function n1(e){e.registerComponentModel(L0),e.registerComponentView(X0),t1(e)}var r1=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return ru(t,e),t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],o1[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var o=this.option.categories;this.resetVisual((function(e,t){"categories"===r?(e.mappingMethod="category",e.categories=Cu(o)):(e.dataExtent=this.getExtent(),e.mappingMethod="piecewise",e.pieceList=Eu(this._pieceList,(function(e){return e=Cu(e),"inRange"!==t&&(e.visual=null),e})))}))},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=JF.listVisualTypes(),o=this.isCategory();function i(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}Ru(t.pieces,(function(e){Ru(r,(function(t){e.hasOwnProperty(t)&&(n[t]=1)}))})),Ru(n,(function(e,n){var r=!1;Ru(this.stateList,(function(e){r=r||i(t,e,n)||i(t.target,e,n)}),this),!r&&Ru(this.stateList,(function(e){(t[e]||(t[e]={}))[n]=w0.get(n,"inRange"===e?"active":"inactive",o)}))}),this),e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,o=(t?n:e).selected||{};if(n.selected=o,Ru(r,(function(e,t){var n=this.getSelectedMapKey(e);o.hasOwnProperty(n)||(o[n]=!0)}),this),"single"===n.selectedMode){var i=!1;Ru(r,(function(e,t){var n=this.getSelectedMapKey(e);o[n]&&(i?o[n]=!1:i=!0)}),this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(e){return"categories"===this._mode?e.value+"":e.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(e){this.option.selected=Cu(e)},t.prototype.getValueState=function(e){var t=JF.findPieceIndex(e,this._pieceList);return null!=t&&this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries((function(r){var o=[],i=r.getData();i.each(this.getDataDimensionIndex(i),(function(t,r){JF.findPieceIndex(t,n)===e&&o.push(r)}),this),t.push({seriesId:r.id,dataIndex:o})}),this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(null!=e.value)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(!this.isCategory()){var t=[],n=["",""],r=this,o=this._pieceList.slice();if(o.length){var i=o[0].interval[0];i!==-1/0&&o.unshift({interval:[-1/0,i]}),(i=o[o.length-1].interval[1])!==1/0&&o.push({interval:[i,1/0]})}else o.push({interval:[-1/0,1/0]});var a=-1/0;return Ru(o,(function(e){var t=e.interval;t&&(t[0]>a&&s([a,t[0]],"outOfRange"),s(t.slice()),a=t[1])}),this),{stops:t,outerColors:n}}function s(o,i){var a=r.getRepresentValue({interval:o});i||(i=r.getValueState(a));var s=e(a,i);o[0]===-1/0?n[0]=s:o[1]===1/0?n[1]=s:t.push({value:o[0],color:s},{value:o[1],color:s})}},t.type="visualMap.piecewise",t.defaultOption=Kb(T0.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),t}(T0),o1={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),o=t.splitNumber;o=Math.max(parseInt(o,10),1),t.splitNumber=o;for(var i=(r[1]-r[0])/o;+i.toFixed(n)!==i&&n<5;)n++;t.precision=n,i=+i.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var a=0,s=r[0];a<o;s+=i,a++){var l=a===o-1?r[1]:s+i;e.push({interval:[s,l],close:[1,1]})}t.maxOpen&&e.push({interval:[r[1],1/0],close:[0,0]}),um(e),Ru(e,(function(e,t){e.index=t,e.text=this.formatValueText(e.interval)}),this)},categories:function(e){var t=this.option;Ru(t.categories,(function(t){e.push({text:this.formatValueText(t,!0),value:t})}),this),i1(t,e)},pieces:function(e){var t=this.option;Ru(t.pieces,(function(t,n){Xu(t)||(t={value:t});var r={text:"",index:n};if(null!=t.label&&(r.text=t.label),t.hasOwnProperty("value")){var o=r.value=t.value;r.interval=[o,o],r.close=[1,1]}else{for(var i=r.interval=[],a=r.close=[0,0],s=[1,0,1],l=[-1/0,1/0],c=[],u=0;u<2;u++){for(var d=[["gte","gt","min"],["lte","lt","max"]][u],h=0;h<3&&null==i[u];h++)i[u]=t[d[h]],a[u]=s[h],c[u]=2===h;null==i[u]&&(i[u]=l[u])}c[0]&&i[1]===1/0&&(a[0]=0),c[1]&&i[0]===-1/0&&(a[1]=0),i[0]===i[1]&&a[0]&&a[1]&&(r.value=i[0])}r.visual=JF.retrieveVisuals(t),e.push(r)}),this),i1(t,e),um(e),Ru(e,(function(e){var t=e.close,n=[["<","\u2264"][t[1]],[">","\u2265"][t[0]]];e.text=e.text||this.formatValueText(null!=e.value?e.value:e.interval,!1,n)}),this)}};function i1(e,t){var n=e.inverse;("vertical"===e.orient?!n:n)&&t.reverse()}const a1=r1;const s1=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return ru(t,e),t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get("textGap"),r=t.textStyleModel,o=r.getFont(),i=r.getTextColor(),a=this._getItemAlign(),s=t.itemSize,l=this._getViewData(),c=l.endsText,u=Qu(t.get("showLabel",!0),!c);c&&this._renderEndsText(e,c[0],s,u,a),Ru(l.viewPieceList,(function(r){var l=r.piece,c=new Fg;c.onclick=Bu(this._onItemClick,this,l),this._enableHoverLink(c,r.indexInModelPieceList);var d=t.getRepresentValue(l);if(this._createItemSymbol(c,d,[0,0,s[0],s[1]]),u){var h=this.visualMapModel.getValueState(d);c.add(new ax({style:{x:"right"===a?-n:s[0]+n,y:s[1]/2,text:l.text,verticalAlign:"middle",align:a,font:o,fill:i,opacity:"outOfRange"===h?.5:1}}))}e.add(c)}),this),c&&this._renderEndsText(e,c[1],s,u,a),qw(t.get("orient"),e,t.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on("mouseover",(function(){return r("highlight")})).on("mouseout",(function(){return r("downplay")}));var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:O0(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if("vertical"===t.orient)return N0(e,this.api,e.itemSize);var n=t.align;return n&&"auto"!==n||(n="left"),n},t.prototype._renderEndsText=function(e,t,n,r,o){if(t){var i=new Fg,a=this.visualMapModel.textStyleModel;i.add(new ax({style:kb(a,{x:r?"right"===o?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:r?o:"center",text:t})})),e.add(i)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=Eu(e.getPieceList(),(function(e,t){return{piece:e,indexInModelPieceList:t}})),n=e.get("text"),r=e.get("orient"),o=e.get("inverse");return("horizontal"===r?o:!o)?t.reverse():n&&(n=n.slice().reverse()),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n){e.add(bI(this.getControllerVisual(t,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(t,"color")))},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=n.selectedMode;if(r){var o=Cu(n.selected),i=t.getSelectedMapKey(e);"single"===r||!0===r?(o[i]=!0,Ru(o,(function(e,t){o[t]=t===i}))):o[i]=!o[i],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},t.type="visualMap.piecewise",t}(R0);function l1(e){e.registerComponentModel(a1),e.registerComponentView(s1),t1(e)}var c1={label:{enabled:!0},decal:{show:!1}},u1=jm(),d1={};function h1(e,t){var n=e.getModel("aria");if(n.get("enabled")){var r=Cu(c1);Mu(r.label,e.getLocaleModel().get("aria"),!1),Mu(n.option,r,!1),function(){if(n.getModel("decal").get("show")){var t=dd();e.eachSeries((function(e){if(!e.isColorBySeries()){var n=t.get(e.type);n||(n={},t.set(e.type,n)),u1(e).scope=n}})),e.eachRawSeries((function(t){if(!e.isSeriesFiltered(t))if(Wu(t.enableAriaDecal))t.enableAriaDecal();else{var n=t.getData();if(t.isColorBySeries()){var r=DS(t.ecModel,t.name,d1,e.getSeriesCount()),o=n.getVisual("decal");n.setVisual("decal",c(o,r))}else{var i=t.getRawData(),a={},s=u1(t).scope;n.each((function(e){var t=n.getRawIndex(e);a[t]=e}));var l=i.count();i.each((function(e){var r=a[e],o=i.getName(e)||e+"",u=DS(t.ecModel,o,s,l),d=n.getItemVisual(r,"decal");n.setItemVisual(r,"decal",c(d,u))}))}}function c(e,t){var n=e?Tu(Tu({},t),e):t;return n.dirty=!0,n}}))}}(),function(){var r=t.getZr().dom;if(!r)return;var a=e.getLocaleModel().get("aria"),s=n.getModel("label");if(s.option=Du(s.option,a),!s.get("enabled"))return;if(s.get("description"))return void r.setAttribute("aria-label",s.get("description"));var l,c=e.getSeriesCount(),u=s.get(["data","maxCount"])||10,d=s.get(["series","maxCount"])||10,h=Math.min(c,d);if(c<1)return;var p=function(){var t=e.get("title");t&&t.length&&(t=t[0]);return t&&t.text}();l=p?o(s.get(["general","withTitle"]),{title:p}):s.get(["general","withoutTitle"]);var f=[];l+=o(c>1?s.get(["series","multiple","prefix"]):s.get(["series","single","prefix"]),{seriesCount:c}),e.eachSeries((function(e,t){if(t<h){var n=void 0,r=e.get("name")?"withName":"withoutName";n=o(n=c>1?s.get(["series","multiple",r]):s.get(["series","single",r]),{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:i(e.subType)});var a=e.getData();if(a.count()>u)n+=o(s.get(["data","partialData"]),{displayCnt:u});else n+=s.get(["data","allData"]);for(var l=s.get(["data","separator","middle"]),d=s.get(["data","separator","end"]),p=[],g=0;g<a.count();g++)if(g<u){var m=a.getName(g),v=a.getValues(g),y=s.get(["data",m?"withName":"withoutName"]);p.push(o(y,{name:m,value:v.join(l)}))}n+=p.join(l)+d,f.push(n)}}));var g=s.getModel(["series","multiple","separator"]),m=g.get("middle"),v=g.get("end");l+=f.join(m)+v,r.setAttribute("aria-label",l)}()}function o(e,t){if(!Hu(e))return e;var n=e;return Ru(t,(function(e,t){n=n.replace(new RegExp("\\{\\s*"+t+"\\s*\\}","g"),e)})),n}function i(t){var n=e.getLocaleModel().get(["series","typeNames"]);return n[t]||n.chart}}function p1(e){if(e&&e.aria){var t=e.aria;null!=t.show&&(t.enabled=t.show),t.label=t.label||{},Ru(["description","general","series","data"],(function(e){null!=t[e]&&(t.label[e]=t[e])}))}}var f1={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},g1=function(){function e(e){var t;if(null==(this._condVal=Hu(e)?new RegExp(e):(t=e,"[object RegExp]"===fu.call(t)?e:null))){0,X_("")}}return e.prototype.evaluate=function(e){var t=typeof e;return Hu(t)?this._condVal.test(e):!!Uu(t)&&this._condVal.test(e+"")},e}(),m1=function(){function e(){}return e.prototype.evaluate=function(){return this.value},e}(),v1=function(){function e(){}return e.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(!e[t].evaluate())return!1;return!0},e}(),y1=function(){function e(){}return e.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(e[t].evaluate())return!0;return!1},e}(),x1=function(){function e(){}return e.prototype.evaluate=function(){return!this.child.evaluate()},e}(),b1=function(){function e(){}return e.prototype.evaluate=function(){for(var e=!!this.valueParser,t=(0,this.getValue)(this.valueGetterParam),n=e?this.valueParser(t):null,r=0;r<this.subCondList.length;r++)if(!this.subCondList[r].evaluate(e?n:t))return!1;return!0},e}();function w1(e,t){if(!0===e||!1===e){var n=new m1;return n.value=e,n}return _1(e)||X_(""),e.and?S1("and",e,t):e.or?S1("or",e,t):e.not?function(e,t){var n=e.not,r="";0;_1(n)||X_(r);var o=new x1;o.child=w1(n,t),o.child||X_(r);return o}(e,t):function(e,t){for(var n="",r=t.prepareGetValue(e),o=[],i=zu(e),a=e.parser,s=a?Z_(a):null,l=0;l<i.length;l++){var c=i[l];if("parser"!==c&&!t.valueGetterAttrMap.get(c)){var u=gd(f1,c)?f1[c]:c,d=e[c],h=s?s(d):d,p=eA(u,h)||"reg"===u&&new g1(h);p||X_(n),o.push(p)}}o.length||X_(n);var f=new b1;return f.valueGetterParam=r,f.valueParser=s,f.getValue=t.getValue,f.subCondList=o,f}(e,t)}function S1(e,t,n){var r=t[e];Vu(r)||X_(""),r.length||X_("");var o="and"===e?new v1:new y1;return o.children=Eu(r,(function(e){return w1(e,n)})),o.children.length||X_(""),o}function _1(e){return Xu(e)&&!Lu(e)}var A1=function(){function e(e,t){this._cond=w1(e,t)}return e.prototype.evaluate=function(){return this._cond.evaluate()},e}();var k1={type:"echarts:filter",transform:function(e){for(var t,n,r,o=e.upstream,i=(n=e.config,r={valueGetterAttrMap:dd({dimension:!0}),prepareGetValue:function(e){var t=e.dimension;gd(e,"dimension")||X_("");var n=o.getDimensionInfo(t);return n||X_(""),{dimIdx:n.index}},getValue:function(e){return o.retrieveValueFromItem(t,e.dimIdx)}},new A1(n,r)),a=[],s=0,l=o.count();s<l;s++)t=o.getRawDataItem(s),i.evaluate()&&a.push(t);return{data:a}}};var C1={type:"echarts:sort",transform:function(e){var t=e.upstream,n=e.config,r="",o=xm(n);o.length||X_(r);var i=[];Ru(o,(function(e){var n=e.dimension,o=e.order,a=e.parser,s=e.incomparable;if(null==n&&X_(r),"asc"!==o&&"desc"!==o&&X_(r),s&&"min"!==s&&"max"!==s){0,X_("")}if("asc"!==o&&"desc"!==o){0,X_("")}var l=t.getDimensionInfo(n);l||X_(r);var c=a?Z_(a):null;a&&!c&&X_(r),i.push({dimIdx:l.index,parser:c,comparator:new Q_(o,s)})}));var a=t.sourceFormat;a!==cS&&a!==uS&&X_(r);for(var s=[],l=0,c=t.count();l<c;l++)s.push(t.getRawDataItem(l));return s.sort((function(e,n){for(var r=0;r<i.length;r++){var o=i[r],a=t.retrieveValueFromItem(e,o.dimIdx),s=t.retrieveValueFromItem(n,o.dimIdx);o.parser&&(a=o.parser(a),s=o.parser(s));var l=o.comparator.evaluate(a,s);if(0!==l)return l}return 0})),{data:s}}};var M1=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataset",t}return ru(t,e),t.prototype.init=function(t,n,r){e.prototype.init.call(this,t,n,r),this._sourceManager=new wA(this),SA(this)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),SA(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type="dataset",t.defaultOption={seriesLayoutBy:fS},t}(rS),I1=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataset",t}return ru(t,e),t.type="dataset",t}(tk);var T1=ay.CMD;function D1(e,t){return Math.abs(e-t)<1e-5}function j1(e){var t,n,r,o,i,a=e.data,s=e.len(),l=[],c=0,u=0,d=0,h=0;function p(e,n){t&&t.length>2&&l.push(t),t=[e,n]}function f(e,n,r,o){D1(e,r)&&D1(n,o)||t.push(e,n,r,o,r,o)}function g(e,n,r,o,i,a){var s=Math.abs(n-e),l=4*Math.tan(s/4)/3,c=n<e?-1:1,u=Math.cos(e),d=Math.sin(e),h=Math.cos(n),p=Math.sin(n),f=u*i+r,g=d*a+o,m=h*i+r,v=p*a+o,y=i*l*c,x=a*l*c;t.push(f-y*d,g+x*u,m+y*p,v-x*h,m,v)}for(var m=0;m<s;){var v=a[m++],y=1===m;switch(y&&(d=c=a[m],h=u=a[m+1],v!==T1.L&&v!==T1.C&&v!==T1.Q||(t=[d,h])),v){case T1.M:c=d=a[m++],u=h=a[m++],p(d,h);break;case T1.L:f(c,u,n=a[m++],r=a[m++]),c=n,u=r;break;case T1.C:t.push(a[m++],a[m++],a[m++],a[m++],c=a[m++],u=a[m++]);break;case T1.Q:n=a[m++],r=a[m++],o=a[m++],i=a[m++],t.push(c+2/3*(n-c),u+2/3*(r-u),o+2/3*(n-o),i+2/3*(r-i),o,i),c=o,u=i;break;case T1.A:var x=a[m++],b=a[m++],w=a[m++],S=a[m++],_=a[m++],A=a[m++]+_;m+=1;var k=!a[m++];n=Math.cos(_)*w+x,r=Math.sin(_)*S+b,y?p(d=n,h=r):f(c,u,n,r),c=Math.cos(A)*w+x,u=Math.sin(A)*S+b;for(var C=(k?-1:1)*Math.PI/2,M=_;k?M>A:M<A;M+=C){g(M,k?Math.max(M+C,A):Math.min(M+C,A),x,b,w,S)}break;case T1.R:d=c=a[m++],h=u=a[m++],n=d+a[m++],r=h+a[m++],p(n,h),f(n,h,n,r),f(n,r,d,r),f(d,r,d,h),f(d,h,n,h);break;case T1.Z:t&&f(c,u,d,h),c=d,u=h}}return t&&t.length>2&&l.push(t),l}function P1(e,t,n,r,o,i,a,s,l,c){if(D1(e,n)&&D1(t,r)&&D1(o,a)&&D1(i,s))l.push(a,s);else{var u=2/c,d=u*u,h=a-e,p=s-t,f=Math.sqrt(h*h+p*p);h/=f,p/=f;var g=n-e,m=r-t,v=o-a,y=i-s,x=g*g+m*m,b=v*v+y*y;if(x<d&&b<d)l.push(a,s);else{var w=h*g+p*m,S=-h*v-p*y;if(x-w*w<d&&w>=0&&b-S*S<d&&S>=0)l.push(a,s);else{var _=[],A=[];wp(e,n,o,a,.5,_),wp(t,r,i,s,.5,A),P1(_[0],A[0],_[1],A[1],_[2],A[2],_[3],A[3],l,c),P1(_[4],A[4],_[5],A[5],_[6],A[6],_[7],A[7],l,c)}}}}function L1(e,t,n){var r=e[t],o=e[1-t],i=Math.abs(r/o),a=Math.ceil(Math.sqrt(i*n)),s=Math.floor(n/a);0===s&&(s=1,a=n);for(var l=[],c=0;c<a;c++)l.push(s);var u=n-a*s;if(u>0)for(c=0;c<u;c++)l[c%a]+=1;return l}function R1(e,t,n){for(var r=e.r0,o=e.r,i=e.startAngle,a=e.endAngle,s=Math.abs(a-i),l=s*o,c=o-r,u=l>Math.abs(c),d=L1([l,c],u?0:1,t),h=(u?s:c)/d.length,p=0;p<d.length;p++)for(var f=(u?c:s)/d[p],g=0;g<d[p];g++){var m={};u?(m.startAngle=i+h*p,m.endAngle=i+h*(p+1),m.r0=r+f*g,m.r=r+f*(g+1)):(m.startAngle=i+f*g,m.endAngle=i+f*(g+1),m.r0=r+h*p,m.r=r+h*(p+1)),m.clockwise=e.clockwise,m.cx=e.cx,m.cy=e.cy,n.push(m)}}function E1(e,t,n,r){return e*r-n*t}function N1(e,t,n,r,o,i,a,s){var l=n-e,c=r-t,u=a-o,d=s-i,h=E1(u,d,l,c);if(Math.abs(h)<1e-6)return null;var p=E1(e-o,t-i,u,d)/h;return p<0||p>1?null:new bh(p*l+e,p*c+t)}function O1(e,t,n){var r=new bh;bh.sub(r,n,t),r.normalize();var o=new bh;return bh.sub(o,e,t),o.dot(r)}function z1(e,t){var n=e[e.length-1];n&&n[0]===t[0]&&n[1]===t[1]||e.push(t)}function B1(e){var t=e.points,n=[],r=[];Rv(t,n,r);var o=new Dh(n[0],n[1],r[0]-n[0],r[1]-n[1]),i=o.width,a=o.height,s=o.x,l=o.y,c=new bh,u=new bh;return i>a?(c.x=u.x=s+i/2,c.y=l,u.y=l+a):(c.y=u.y=l+a/2,c.x=s,u.x=s+i),function(e,t,n){for(var r=e.length,o=[],i=0;i<r;i++){var a=e[i],s=e[(i+1)%r],l=N1(a[0],a[1],s[0],s[1],t.x,t.y,n.x,n.y);l&&o.push({projPt:O1(l,t,n),pt:l,idx:i})}if(o.length<2)return[{points:e},{points:e}];o.sort((function(e,t){return e.projPt-t.projPt}));var c=o[0],u=o[o.length-1];if(u.idx<c.idx){var d=c;c=u,u=d}var h=[c.pt.x,c.pt.y],p=[u.pt.x,u.pt.y],f=[h],g=[p];for(i=c.idx+1;i<=u.idx;i++)z1(f,e[i].slice());for(z1(f,p),z1(f,h),i=u.idx+1;i<=c.idx+r;i++)z1(g,e[i%r].slice());return z1(g,h),z1(g,p),[{points:f},{points:g}]}(t,c,u)}function F1(e,t,n,r){if(1===n)r.push(t);else{var o=Math.floor(n/2),i=e(t);F1(e,i[0],o,r),F1(e,i[1],n-o,r)}return r}function V1(e,t){var n,r=[],o=e.shape;switch(e.type){case"rect":!function(e,t,n){for(var r=e.width,o=e.height,i=r>o,a=L1([r,o],i?0:1,t),s=i?"width":"height",l=i?"height":"width",c=i?"x":"y",u=i?"y":"x",d=e[s]/a.length,h=0;h<a.length;h++)for(var p=e[l]/a[h],f=0;f<a[h];f++){var g={};g[c]=h*d,g[u]=f*p,g[s]=d,g[l]=p,g.x+=e.x,g.y+=e.y,n.push(g)}}(o,t,r),n=Gy;break;case"sector":R1(o,t,r),n=Gk;break;case"circle":R1({r0:0,r:o.r,startAngle:0,endAngle:2*Math.PI,cx:o.cx,cy:o.cy},t,r),n=Gk;break;default:var i=e.getComputedTransform(),a=i?Math.sqrt(Math.max(i[0]*i[0]+i[1]*i[1],i[2]*i[2]+i[3]*i[3])):1,s=Eu(function(e,t){var n=j1(e),r=[];t=t||1;for(var o=0;o<n.length;o++){var i=n[o],a=[],s=i[0],l=i[1];a.push(s,l);for(var c=2;c<i.length;){var u=i[c++],d=i[c++],h=i[c++],p=i[c++],f=i[c++],g=i[c++];P1(s,l,u,d,h,p,f,g,a,t),s=f,l=g}r.push(a)}return r}(e.getUpdatedPathProxy(),a),(function(e){return function(e){for(var t=[],n=0;n<e.length;)t.push([e[n++],e[n++]]);return t}(e)})),l=s.length;if(0===l)F1(B1,{points:s[0]},t,r);else if(l===t)for(var c=0;c<l;c++)r.push({points:s[c]});else{var u=0,d=Eu(s,(function(e){var t=[],n=[];Rv(e,t,n);var r=(n[1]-t[1])*(n[0]-t[0]);return u+=r,{poly:e,area:r}}));d.sort((function(e,t){return t.area-e.area}));var h=t;for(c=0;c<l;c++){var p=d[c];if(h<=0)break;var f=c===l-1?h:Math.ceil(p.area/u*t);f<0||(F1(B1,{points:p.poly},f,r),h-=f)}}n=$k}if(!n)return function(e,t){for(var n=[],r=0;r<t;r++)n.push(Sk(e));return n}(e,t);var g,m,v=[];for(c=0;c<r.length;c++){var y=new n;y.setShape(r[c]),g=e,(m=y).setStyle(g.style),m.z=g.z,m.z2=g.z2,m.zlevel=g.zlevel,v.push(y)}return v}function W1(e,t){var n=e.length,r=t.length;if(n===r)return[e,t];for(var o=[],i=[],a=n<r?e:t,s=Math.min(n,r),l=Math.abs(r-n)/6,c=(s-2)/6,u=Math.ceil(l/c)+1,d=[a[0],a[1]],h=l,p=2;p<s;){var f=a[p-2],g=a[p-1],m=a[p++],v=a[p++],y=a[p++],x=a[p++],b=a[p++],w=a[p++];if(h<=0)d.push(m,v,y,x,b,w);else{for(var S=Math.min(h,u-1)+1,_=1;_<=S;_++){var A=_/S;wp(f,m,y,b,A,o),wp(g,v,x,w,A,i),f=o[3],g=i[3],d.push(o[1],i[1],o[2],i[2],f,g),m=o[5],v=i[5],y=o[6],x=i[6]}h-=S-1}}return a===e?[d,t]:[e,d]}function H1(e,t){for(var n=e.length,r=e[n-2],o=e[n-1],i=[],a=0;a<t.length;)i[a++]=r,i[a++]=o;return i}function G1(e){for(var t=0,n=0,r=0,o=e.length,i=0,a=o-2;i<o;a=i,i+=2){var s=e[a],l=e[a+1],c=e[i],u=e[i+1],d=s*u-c*l;t+=d,n+=(s+c)*d,r+=(l+u)*d}return 0===t?[e[0]||0,e[1]||0]:[n/t/3,r/t/3,t]}function U1(e,t,n,r){for(var o=(e.length-2)/6,i=1/0,a=0,s=e.length,l=s-2,c=0;c<o;c++){for(var u=6*c,d=0,h=0;h<s;h+=2){var p=0===h?u:(u+h-2)%l+2,f=e[p]-n[0],g=e[p+1]-n[1],m=t[h]-r[0]-f,v=t[h+1]-r[1]-g;d+=m*m+v*v}d<i&&(i=d,a=c)}return a}function X1(e){for(var t=[],n=e.length,r=0;r<n;r+=2)t[r]=e[n-r-2],t[r+1]=e[n-r-1];return t}function Y1(e){return e.__isCombineMorphing}var q1="__mOriginal_";function Z1(e,t,n){var r=q1+t,o=e[r]||e[t];e[r]||(e[r]=e[t]);var i=n.replace,a=n.after,s=n.before;e[t]=function(){var e,t=arguments;return s&&s.apply(this,t),e=i?i.apply(this,t):o.apply(this,t),a&&a.apply(this,t),e}}function K1(e,t){var n=q1+t;e[n]&&(e[t]=e[n],e[n]=null)}function $1(e,t){for(var n=0;n<e.length;n++)for(var r=e[n],o=0;o<r.length;){var i=r[o],a=r[o+1];r[o++]=t[0]*i+t[2]*a+t[4],r[o++]=t[1]*i+t[3]*a+t[5]}}function Q1(e,t){var n=e.getUpdatedPathProxy(),r=t.getUpdatedPathProxy(),o=function(e,t){for(var n,r,o,i=[],a=[],s=0;s<Math.max(e.length,t.length);s++){var l=e[s],c=t[s],u=void 0,d=void 0;l?c?(r=u=(n=W1(l,c))[0],o=d=n[1]):(d=H1(o||l,l),u=l):(u=H1(r||c,c),d=c),i.push(u),a.push(d)}return[i,a]}(j1(n),j1(r)),i=o[0],a=o[1],s=e.getComputedTransform(),l=t.getComputedTransform();s&&$1(i,s),l&&$1(a,l),Z1(t,"updateTransform",{replace:function(){this.transform=null}}),t.transform=null;var c=function(e,t,n,r){for(var o,i=[],a=0;a<e.length;a++){var s=e[a],l=t[a],c=G1(s),u=G1(l);null==o&&(o=c[2]<0!==u[2]<0);var d=[],h=[],p=0,f=1/0,g=[],m=s.length;o&&(s=X1(s));for(var v=6*U1(s,l,c,u),y=m-2,x=0;x<y;x+=2){var b=(v+x)%y+2;d[x+2]=s[b]-c[0],d[x+3]=s[b+1]-c[1]}if(d[0]=s[v]-c[0],d[1]=s[v+1]-c[1],n>0)for(var w=r/n,S=-r/2;S<=r/2;S+=w){var _=Math.sin(S),A=Math.cos(S),k=0;for(x=0;x<s.length;x+=2){var C=d[x],M=d[x+1],I=l[x]-u[0],T=l[x+1]-u[1],D=I*A-T*_,j=I*_+T*A;g[x]=D,g[x+1]=j;var P=D-C,L=j-M;k+=P*P+L*L}if(k<f){f=k,p=S;for(var R=0;R<g.length;R++)h[R]=g[R]}}else for(var E=0;E<m;E+=2)h[E]=l[E]-u[0],h[E+1]=l[E+1]-u[1];i.push({from:d,to:h,fromCp:c,toCp:u,rotation:-p})}return i}(i,a,10,Math.PI),u=[];Z1(t,"buildPath",{replace:function(e){for(var n=t.__morphT,r=1-n,o=[],i=0;i<c.length;i++){var a=c[i],s=a.from,l=a.to,d=a.rotation*n,h=a.fromCp,p=a.toCp,f=Math.sin(d),g=Math.cos(d);Rd(o,h,p,n);for(var m=0;m<s.length;m+=2){var v=s[m],y=s[m+1],x=v*r+(_=l[m])*n,b=y*r+(A=l[m+1])*n;u[m]=x*g-b*f+o[0],u[m+1]=x*f+b*g+o[1]}var w=u[0],S=u[1];e.moveTo(w,S);for(m=2;m<s.length;){var _=u[m++],A=u[m++],k=u[m++],C=u[m++],M=u[m++],I=u[m++];w===_&&S===A&&k===M&&C===I?e.lineTo(M,I):e.bezierCurveTo(_,A,k,C,M,I),w=M,S=I}}}})}function J1(e,t,n){if(!e||!t)return t;var r=n.done,o=n.during;return Q1(e,t),t.__morphT=0,t.animateTo({__morphT:1},Du({during:function(e){t.dirtyShape(),o&&o(e)},done:function(){K1(t,"buildPath"),K1(t,"updateTransform"),t.__morphT=-1,t.createPathProxy(),t.dirtyShape(),r&&r()}},n)),t}function e2(e,t,n,r,o,i){e=o===n?0:Math.round(32767*(e-n)/(o-n)),t=i===r?0:Math.round(32767*(t-r)/(i-r));for(var a,s=0,l=32768;l>0;l/=2){var c=0,u=0;(e&l)>0&&(c=1),(t&l)>0&&(u=1),s+=l*l*(3*c^u),0===u&&(1===c&&(e=l-1-e,t=l-1-t),a=e,e=t,t=a)}return s}function t2(e){var t=1/0,n=1/0,r=-1/0,o=-1/0,i=Eu(e,(function(e){var i=e.getBoundingRect(),a=e.getComputedTransform(),s=i.x+i.width/2+(a?a[4]:0),l=i.y+i.height/2+(a?a[5]:0);return t=Math.min(s,t),n=Math.min(l,n),r=Math.max(s,r),o=Math.max(l,o),[s,l]}));return Eu(i,(function(i,a){return{cp:i,z:e2(i[0],i[1],t,n,r,o),path:e[a]}})).sort((function(e,t){return e.z-t.z})).map((function(e){return e.path}))}function n2(e){return V1(e.path,e.count)}function r2(e){return Vu(e[0])}function o2(e,t){for(var n=[],r=e.length,o=0;o<r;o++)n.push({one:e[o],many:[]});for(o=0;o<t.length;o++){var i=t[o].length,a=void 0;for(a=0;a<i;a++)n[a%r].many.push(t[o][a])}var s=0;for(o=r-1;o>=0;o--)if(!n[o].many.length){var l=n[s].many;if(l.length<=1){if(!s)return n;s=0}i=l.length;var c=Math.ceil(i/2);n[o].many=l.slice(c,i),n[s].many=l.slice(0,c),s++}return n}var i2={clone:function(e){for(var t=[],n=1-Math.pow(1-e.path.style.opacity,1/e.count),r=0;r<e.count;r++){var o=Sk(e.path);o.setStyle("opacity",n),t.push(o)}return t},split:null};function a2(e,t,n,r,o,i){if(e.length&&t.length){var a=db("update",r,o);if(a&&a.duration>0){var s,l,c=r.getModel("universalTransition").get("delay"),u=Object.assign({setToFinal:!0},a);r2(e)&&(s=e,l=t),r2(t)&&(s=t,l=e);for(var d=s?s===e:e.length>t.length,h=s?o2(l,s):o2(d?t:e,[d?e:t]),p=0,f=0;f<h.length;f++)p+=h[f].many.length;var g=0;for(f=0;f<h.length;f++)m(h[f],d,g,p),g+=h[f].many.length}}function m(e,t,r,o,a){var s=e.many,l=e.one;if(1!==s.length||a)for(var d=Du({dividePath:i2[n],individualDelay:c&&function(e,t,n,i){return c(e+r,o)}},u),h=t?function(e,t,n){var r=[];!function e(t){for(var n=0;n<t.length;n++){var o=t[n];Y1(o)?e(o.childrenRef()):o instanceof Ty&&r.push(o)}}(e);var o=r.length;if(!o)return{fromIndividuals:[],toIndividuals:[],count:0};var i=(n.dividePath||n2)({path:t,count:o});if(i.length!==o)return console.error("Invalid morphing: unmatched splitted path"),{fromIndividuals:[],toIndividuals:[],count:0};r=t2(r),i=t2(i);for(var a=n.done,s=n.during,l=n.individualDelay,c=new yg,u=0;u<o;u++){var d=r[u],h=i[u];h.parent=t,h.copyTransform(c),l||Q1(d,h)}function p(e){for(var t=0;t<i.length;t++)i[t].addSelfToZr(e)}function f(){t.__isCombineMorphing=!1,t.__morphT=-1,t.childrenRef=null,K1(t,"addSelfToZr"),K1(t,"removeSelfFromZr")}t.__isCombineMorphing=!0,t.childrenRef=function(){return i},Z1(t,"addSelfToZr",{after:function(e){p(e)}}),Z1(t,"removeSelfFromZr",{after:function(e){for(var t=0;t<i.length;t++)i[t].removeSelfFromZr(e)}});var g=i.length;if(l){var m=g,v=function(){0===--m&&(f(),a&&a())};for(u=0;u<g;u++){var y=l?Du({delay:(n.delay||0)+l(u,g,r[u],i[u]),done:v},n):n;J1(r[u],i[u],y)}}else t.__morphT=0,t.animateTo({__morphT:1},Du({during:function(e){for(var n=0;n<g;n++){var r=i[n];r.__morphT=t.__morphT,r.dirtyShape()}s&&s(e)},done:function(){f();for(var t=0;t<e.length;t++)K1(e[t],"updateTransform");a&&a()}},n));return t.__zr&&p(t.__zr),{fromIndividuals:r,toIndividuals:i,count:g}}(s,l,d):function(e,t,n){var r=t.length,o=[],i=n.dividePath||n2;if(Y1(e)){!function e(t){for(var n=0;n<t.length;n++){var r=t[n];Y1(r)?e(r.childrenRef()):r instanceof Ty&&o.push(r)}}(e.childrenRef());var a=o.length;if(a<r)for(var s=0,l=a;l<r;l++)o.push(Sk(o[s++%a]));o.length=r}else{o=i({path:e,count:r});var c=e.getComputedTransform();for(l=0;l<o.length;l++)o[l].setLocalTransform(c);if(o.length!==r)return console.error("Invalid morphing: unmatched splitted path"),{fromIndividuals:[],toIndividuals:[],count:0}}o=t2(o),t=t2(t);var u=n.individualDelay;for(l=0;l<r;l++){var d=u?Du({delay:(n.delay||0)+u(l,r,o[l],t[l])},n):n;J1(o[l],t[l],d)}return{fromIndividuals:o,toIndividuals:t,count:t.length}}(l,s,d),p=h.fromIndividuals,f=h.toIndividuals,g=p.length,v=0;v<g;v++){y=c?Du({delay:c(v,g)},u):u;i(p[v],f[v],t?s[v]:e.one,t?e.one:s[v],y)}else{var y,x=t?s[0]:l,b=t?l:s[0];if(Y1(x))m({many:[x],one:b},!0,r,o,!0);else J1(x,b,y=c?Du({delay:c(r,o)},u):u),i(x,b,x,b,y)}}}function s2(e){if(!e)return[];if(Vu(e)){for(var t=[],n=0;n<e.length;n++)t.push(s2(e[n]));return t}var r=[];return e.traverse((function(e){e instanceof Ty&&!e.disableMorphing&&!e.invisible&&!e.ignore&&r.push(e)})),r}var l2=1e4,c2=0,u2=1,d2=2,h2=jm();function p2(e,t,n,r){var o=function(e,t){for(var n=e.dimensions,r=0;r<n.length;r++){var o=e.getDimensionInfo(n[r]);if(o&&0===o.otherDims[t])return n[r]}}(e,r?"itemChildGroupId":"itemGroupId");if(o){var i=function(e,t,n){var r=e.getDimensionInfo(n),o=r&&r.ordinalMeta;if(r){var i=e.get(r.name,t);return o&&o.categories[i]||i+""}}(e,t,o);return i}var a=e.getRawDataItem(t),s=r?"childGroupId":"groupId";return a&&a[s]?a[s]+"":r?void 0:n||e.getId(t)}function f2(e){var t=[];return Ru(e,(function(e){var n=e.data,r=e.dataGroupId;if(!(n.count()>l2))for(var o=n.getIndices(),i=0;i<o.length;i++)t.push({data:n,groupId:p2(n,i,r,!1),childGroupId:p2(n,i,r,!0),divide:e.divide,dataIndex:i})})),t}function g2(e,t,n){e.traverse((function(e){e instanceof Ty&&fb(e,{style:{opacity:0}},t,{dataIndex:n,isFrom:!0})}))}function m2(e){if(e.parent){var t=e.getComputedTransform();e.setLocalTransform(t),e.parent.remove(e)}}function v2(e){e.stopAnimation(),e.isGroup&&e.traverse((function(e){e.stopAnimation()}))}function y2(e,t,n){var r=db("update",n,t);r&&e.traverse((function(e){if(e instanceof kv){var t=function(e){return ub(e).oldStyle}(e);t&&e.animateFrom({style:t},r)}}))}function x2(e,t,n){var r=f2(e),o=f2(t);function i(e,t,n,r,o){(n||e)&&t.animateFrom({style:n&&n!==e?Tu(Tu({},n.style),e.style):e.style},o)}var a=!1,s=c2,l=dd(),c=dd();r.forEach((function(e){e.groupId&&l.set(e.groupId,!0),e.childGroupId&&c.set(e.childGroupId,!0)}));for(var u=0;u<o.length;u++){var d=o[u].groupId;if(c.get(d)){s=u2;break}var h=o[u].childGroupId;if(h&&l.get(h)){s=d2;break}}function p(e,t){return function(n){var r=n.data,o=n.dataIndex;return t?r.getId(o):e?s===u2?n.childGroupId:n.groupId:s===d2?n.childGroupId:n.groupId}}var f=function(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++){var o=e[r],i=t[r];if(o.data.getId(o.dataIndex)!==i.data.getId(i.dataIndex))return!1}return!0}(r,o),g={};if(!f)for(u=0;u<o.length;u++){var m=o[u],v=m.data.getItemGraphicEl(m.dataIndex);v&&(g[v.id]=!0)}function y(e,t){var n=r[t],s=o[e],l=s.data.hostModel,c=n.data.getItemGraphicEl(n.dataIndex),u=s.data.getItemGraphicEl(s.dataIndex);c!==u?c&&g[c.id]||u&&(v2(u),c?(v2(c),m2(c),a=!0,a2(s2(c),s2(u),s.divide,l,e,i)):g2(u,l,e)):u&&y2(u,s.dataIndex,l)}new _P(r,o,p(!0,f),p(!1,f),null,"multiple").update(y).updateManyToOne((function(e,t){var n=o[e],s=n.data,l=s.hostModel,c=s.getItemGraphicEl(n.dataIndex),u=Ou(Eu(t,(function(e){return r[e].data.getItemGraphicEl(r[e].dataIndex)})),(function(e){return e&&e!==c&&!g[e.id]}));c&&(v2(c),u.length?(Ru(u,(function(e){v2(e),m2(e)})),a=!0,a2(s2(u),s2(c),n.divide,l,e,i)):g2(c,l,n.dataIndex))})).updateOneToMany((function(e,t){var n=r[t],s=n.data.getItemGraphicEl(n.dataIndex);if(!s||!g[s.id]){var l=Ou(Eu(e,(function(e){return o[e].data.getItemGraphicEl(o[e].dataIndex)})),(function(e){return e&&e!==s})),c=o[e[0]].data.hostModel;l.length&&(Ru(l,(function(e){return v2(e)})),s?(v2(s),m2(s),a=!0,a2(s2(s),s2(l),n.divide,c,e[0],i)):Ru(l,(function(t){return g2(t,c,e[0])})))}})).updateManyToMany((function(e,t){new _P(t,e,(function(e){return r[e].data.getId(r[e].dataIndex)}),(function(e){return o[e].data.getId(o[e].dataIndex)})).update((function(n,r){y(e[n],t[r])})).execute()})).execute(),a&&Ru(t,(function(e){var t=e.data.hostModel,r=t&&n.getViewOfSeriesModel(t),o=db("update",t,0);r&&t.isAnimationEnabled()&&o&&o.duration>0&&r.group.traverse((function(e){e instanceof Ty&&!e.animators.length&&e.animateFrom({style:{opacity:0}},o)}))}))}function b2(e){var t=e.getModel("universalTransition").get("seriesKey");return t||e.id}function w2(e){return Vu(e)?e.sort().join(","):e}function S2(e){if(e.hostModel)return e.hostModel.getModel("universalTransition").get("divideShape")}function _2(e,t){var n=dd(),r=dd(),o=dd();return Ru(e.oldSeries,(function(t,n){var i=e.oldDataGroupIds[n],a=e.oldData[n],s=b2(t),l=w2(s);r.set(l,{dataGroupId:i,data:a}),Vu(s)&&Ru(s,(function(e){o.set(e,{key:l,dataGroupId:i,data:a})}))})),Ru(t.updatedSeries,(function(e){if(e.isUniversalTransitionEnabled()&&e.isAnimationEnabled()){var t=e.get("dataGroupId"),i=e.getData(),a=b2(e),s=w2(a),l=r.get(s);if(l)n.set(s,{oldSeries:[{dataGroupId:l.dataGroupId,divide:S2(l.data),data:l.data}],newSeries:[{dataGroupId:t,divide:S2(i),data:i}]});else if(Vu(a)){0;var c=[];Ru(a,(function(e){var t=r.get(e);t.data&&c.push({dataGroupId:t.dataGroupId,divide:S2(t.data),data:t.data})})),c.length&&n.set(s,{oldSeries:c,newSeries:[{dataGroupId:t,data:i,divide:S2(i)}]})}else{var u=o.get(a);if(u){var d=n.get(u.key);d||(d={oldSeries:[{dataGroupId:u.dataGroupId,data:u.data,divide:S2(u.data)}],newSeries:[]},n.set(u.key,d)),d.newSeries.push({dataGroupId:t,data:i,divide:S2(i)})}}}})),n}function A2(e,t){for(var n=0;n<e.length;n++){if(null!=t.seriesIndex&&t.seriesIndex===e[n].seriesIndex||null!=t.seriesId&&t.seriesId===e[n].id)return n}}cD([function(e){e.registerPainter("canvas",rj)}]),cD([function(e){e.registerPainter("svg",xP)}]),cD([function(e){e.registerChartView(HL),e.registerSeriesModel(iL),e.registerLayout(GL("line",!0)),e.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,YL("line"))},function(e){e.registerChartView(jR),e.registerSeriesModel(aR),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Fu(eR,"bar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,tR("bar")),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,YL("bar")),e.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},(function(e,t){var n=e.componentType||"series";t.eachComponent({mainType:n,query:e},(function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)}))}))},function(e){e.registerChartView(UR),e.registerSeriesModel(KR),aI("pie",e.registerAction),e.registerLayout(Fu(NR,"pie")),e.registerProcessor(zR("pie")),e.registerProcessor(function(e){return{seriesType:e,reset:function(e,t){var n=e.getData();n.filterSelf((function(e){var t=n.mapDimension("value"),r=n.get(t,e);return!(Uu(r)&&!isNaN(r)&&r<0)}))}}}("pie"))},function(e){cD(gO),e.registerSeriesModel($R),e.registerChartView(nE),e.registerLayout(GL("scatter"))},function(e){cD(EO),e.registerChartView(wO),e.registerSeriesModel(_O),e.registerLayout(mO),e.registerProcessor(zR("radar")),e.registerPreprocessor(xO)},function(e){cD(TB),e.registerChartView(iB),e.registerSeriesModel(sB),e.registerLayout(cB),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,lB),aI("map",e.registerAction)},function(e){e.registerChartView(qB),e.registerSeriesModel(hF),e.registerLayout(fF),e.registerVisual(gF),function(e){e.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},(function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},(function(t){var n=e.dataIndex,r=t.getData().tree.getNodeByDataIndex(n);r.isExpand=!r.isExpand}))})),e.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},(function(e,t,n){t.eachComponent({mainType:"series",subType:"tree",query:e},(function(t){var r=kB(t.coordinateSystem,e,void 0,n);t.setCenter&&t.setCenter(r.center),t.setZoom&&t.setZoom(r.zoom)}))}))}(e)},function(e){e.registerSeriesModel(bF),e.registerChartView(OF),e.registerVisual(tV),e.registerLayout(fV),function(e){for(var t=0;t<mF.length;t++)e.registerAction({type:mF[t],update:"updateView"},md);e.registerAction({type:"treemapRootToNode",update:"updateView"},(function(e,t){t.eachComponent({mainType:"series",subType:"treemap",query:e},(function(t,n){var r=sF(e,["treemapZoomToNode","treemapRootToNode"],t);if(r){var o=t.getViewRoot();o&&(e.direction=cF(o,r.node)?"rollUp":"drillDown"),t.resetViewRoot(r.node)}}))}))}(e)},function(e){e.registerChartView(xW),e.registerSeriesModel(IW),e.registerProcessor(bV),e.registerVisual(wV),e.registerVisual(_V),e.registerLayout(EV),e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,HV),e.registerLayout(UV),e.registerCoordinateSystem("graphView",{dimensions:pB.dimensions,create:XV}),e.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},md),e.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},md),e.registerAction(TW,(function(e,t,n){t.eachComponent({mainType:"series",query:e},(function(t){var r=kB(t.coordinateSystem,e,void 0,n);t.setCenter&&t.setCenter(r.center),t.setZoom&&t.setZoom(r.zoom)}))}))},function(e){e.registerChartView(EW),e.registerSeriesModel(NW)},function(e){e.registerChartView(BW),e.registerSeriesModel(VW),e.registerLayout(WW),e.registerProcessor(zR("funnel"))},function(e){cD(AG),e.registerChartView(qW),e.registerSeriesModel(KW),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,QW)},function(e){e.registerChartView(TG),e.registerSeriesModel(jG),e.registerLayout(PG),e.registerVisual(GG),e.registerAction({type:"dragNode",event:"dragnode",update:"update"},(function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},(function(t){t.setNodePosition(e.dataIndex,[e.localX,e.localY])}))}))},function(e){e.registerSeriesModel(YG),e.registerChartView(eU),e.registerLayout(nU),e.registerTransform(rU)},function(e){e.registerChartView(mU),e.registerSeriesModel(yU),e.registerPreprocessor(xU),e.registerVisual(CU),e.registerLayout(TU)},function(e){e.registerChartView(LU),e.registerSeriesModel(RU),e.registerLayout(GL("effectScatter"))},function(e){e.registerChartView(YU),e.registerSeriesModel(QU),e.registerLayout(XU),e.registerVisual(eX)},function(e){e.registerChartView(iX),e.registerSeriesModel(aX)},function(e){e.registerChartView(IX),e.registerSeriesModel(TX),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Fu(eR,"pictorialBar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,tR("pictorialBar"))},function(e){e.registerChartView(jX),e.registerSeriesModel(LX),e.registerLayout(RX),e.registerProcessor(zR("themeRiver"))},function(e){e.registerChartView(WX),e.registerSeriesModel(UX),e.registerLayout(Fu(YX,"sunburst")),e.registerProcessor(Fu(zR,"sunburst")),e.registerVisual(ZX),function(e){e.registerAction({type:zX,update:"updateView"},(function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},(function(t,n){var r=sF(e,[zX],t);if(r){var o=t.getViewRoot();o&&(e.direction=cF(o,r.node)?"rollUp":"drillDown"),t.resetViewRoot(r.node)}}))})),e.registerAction({type:BX,update:"none"},(function(e,t,n){e=Tu({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},(function(t){var n=sF(e,[BX],t);n&&(e.dataIndex=n.node.dataIndex)})),n.dispatchAction(Tu(e,{type:"highlight"}))})),e.registerAction({type:FX,update:"updateView"},(function(e,t,n){e=Tu({},e),n.dispatchAction(Tu(e,{type:"downplay"}))}))}(e)},function(e){e.registerChartView(VY),e.registerSeriesModel(JX)}]),cD((function(e){cD(gO),cD(Uq)})),cD((function(e){cD(Uq),rO.registerAxisPointerClass("PolarAxisPointer",qq),e.registerCoordinateSystem("polar",dZ),e.registerComponentModel(Zq),e.registerComponentView(TZ),fE(e,"angle",$q,MZ),fE(e,"radius",Qq,IZ),e.registerComponentView(yZ),e.registerComponentView(_Z),e.registerLayout(Fu(CZ,"bar"))})),cD(TB),cD((function(e){cD(Uq),rO.registerAxisPointerClass("SingleAxisPointer",$Z),e.registerComponentView(QZ),e.registerComponentView(EZ),e.registerComponentModel(OZ),fE(e,"single",OZ,OZ.defaultOption),e.registerCoordinateSystem("single",GZ)})),cD(AG),cD((function(e){e.registerComponentModel(eK),e.registerComponentView(nK),e.registerCoordinateSystem("calendar",aK)})),cD((function(e){e.registerComponentModel(dK),e.registerComponentView(fK),e.registerPreprocessor((function(e){var t=e.graphic;Vu(t)?t[0]&&t[0].elements?e.graphic=[e.graphic[0]]:e.graphic=[{elements:t}]:t&&!t.elements&&(e.graphic=[{elements:[t]}])}))})),cD((function(e){e.registerComponentModel(HK),e.registerComponentView(XK),VK("saveAsImage",YK),VK("magicType",QK),VK("dataView",s$),VK("dataZoom",L$),VK("restore",h$),cD(zK)})),cD((function(e){cD(Uq),e.registerComponentModel(R$),e.registerComponentView(rQ),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},md),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},md)})),cD(Uq),cD((function(e){e.registerComponentView(SQ),e.registerComponentModel(AQ),e.registerPreprocessor(iQ),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,vQ),e.registerAction({type:"brush",event:"brush",update:"updateVisual"},(function(e,t){t.eachComponent({mainType:"brush",query:e},(function(t){t.setAreas(e.areas)}))})),e.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},md),e.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},md),VK("brush",CQ)})),cD((function(e){e.registerComponentModel(MQ),e.registerComponentView(IQ)})),cD((function(e){e.registerComponentModel(PQ),e.registerComponentView(VQ),e.registerSubTypeDefaulter("timeline",(function(){return"slider"})),function(e){e.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},(function(e,t,n){var r=t.getComponent("timeline");return r&&null!=e.currentIndex&&(r.setCurrentIndex(e.currentIndex),!r.get("loop",!0)&&r.isIndexMax()&&r.getPlayState()&&(r.setPlayState(!1),n.dispatchAction({type:"timelinePlayChange",playState:!1,from:e.from}))),t.resetOption("timeline",{replaceMerge:r.get("replaceMerge",!0)}),Du({currentIndex:r.option.currentIndex},e)})),e.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},(function(e,t){var n=t.getComponent("timeline");n&&null!=e.playState&&n.setPlayState(e.playState)}))}(e),e.registerPreprocessor(WQ)})),cD((function(e){e.registerComponentModel(KQ),e.registerComponentView(cJ),e.registerPreprocessor((function(e){UQ(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})}))})),cD((function(e){e.registerComponentModel(uJ),e.registerComponentView(yJ),e.registerPreprocessor((function(e){UQ(e.series,"markLine")&&(e.markLine=e.markLine||{})}))})),cD((function(e){e.registerComponentModel(xJ),e.registerComponentView(IJ),e.registerPreprocessor((function(e){UQ(e.series,"markArea")&&(e.markArea=e.markArea||{})}))})),cD((function(e){cD(WJ),cD(KJ)})),cD((function(e){cD(l0),cD(y0)})),cD(l0),cD(y0),cD((function(e){cD(n1),cD(l1)})),cD(n1),cD(l1),cD((function(e){e.registerPreprocessor(p1),e.registerVisual(e.PRIORITY.VISUAL.ARIA,h1)})),cD((function(e){e.registerTransform(k1),e.registerTransform(C1)})),cD((function(e){e.registerComponentModel(M1),e.registerComponentView(I1)})),cD((function(e){e.registerUpdateLifecycle("series:beforeupdate",(function(e,t,n){Ru(xm(n.seriesTransition),(function(e){Ru(xm(e.to),(function(e){for(var t=n.updatedSeries,r=0;r<t.length;r++)(null!=e.seriesIndex&&e.seriesIndex===t[r].seriesIndex||null!=e.seriesId&&e.seriesId===t[r].id)&&(t[r][GA]=!0)}))}))})),e.registerUpdateLifecycle("series:transition",(function(e,t,n){var r=h2(t);if(r.oldSeries&&n.updatedSeries&&n.optionChanged){var o=n.seriesTransition;if(o)Ru(xm(o),(function(e){!function(e,t,n,r){var o=[],i=[];Ru(xm(e.from),(function(e){var n=A2(t.oldSeries,e);n>=0&&o.push({dataGroupId:t.oldDataGroupIds[n],data:t.oldData[n],divide:S2(t.oldData[n]),groupIdDim:e.dimension})})),Ru(xm(e.to),(function(e){var r=A2(n.updatedSeries,e);if(r>=0){var o=n.updatedSeries[r].getData();i.push({dataGroupId:t.oldDataGroupIds[r],data:o,divide:S2(o),groupIdDim:e.dimension})}})),o.length>0&&i.length>0&&x2(o,i,r)}(e,r,n,t)}));else{var i=_2(r,n);Ru(i.keys(),(function(e){var n=i.get(e);x2(n.oldSeries,n.newSeries,t)}))}Ru(n.updatedSeries,(function(e){e[GA]&&(e[GA]=!1)}))}for(var a=e.getSeries(),s=r.oldSeries=[],l=r.oldDataGroupIds=[],c=r.oldData=[],u=0;u<a.length;u++){var d=a[u].getData();d.count()<l2&&(s.push(a[u]),l.push(a[u].get("dataGroupId")),c.push(d))}}))})),cD(ZD);const k2="@Color",C2="@TITLE",M2="#00da3c",I2="#ec0000";function T2(e){const t=e.filter((e=>"string"!==typeof e||!e.startsWith(C2))).map((e=>"string"===typeof e?e.startsWith(k2)?e.split("@@")[1]:e:e.map((e=>{if(e.startsWith(k2))return e.split("@@")[1];if(e.startsWith("O:")&&e.length>9){const t=e[e.length-9];if("C"===t||"P"===t)return""}return e})).join("<br/>"))),n=e.filter((e=>"string"!==typeof e)).map((e=>e[1]));var r="black";const o=e.flatMap((e=>"string"===typeof e?e.startsWith(k2)?[e]:[]:e.map((e=>e.startsWith(k2)?e:null)).filter((e=>null!=e)))).filter((e=>"string"===typeof e&&e.startsWith(k2))).sort().map((e=>e.substring(k2.length+1).split("@@")[0]));if(o.length>0)r=o[0];else if(e.filter((e=>"string"===typeof e&&e.endsWith(" buy"))).length>0)r="green";else{const t=null!=e.find((e=>"string"!==typeof e&&null!=e.find((e=>{if(e.startsWith("O:")&&e.length>9){if("C"===e[e.length-9])return!0}return!1})))),n=null!=e.find((e=>"string"!==typeof e&&null!=e.find((e=>{if(e.startsWith("O:")&&e.length>9){if("P"===e[e.length-9])return!0}return!1}))));t&&n?r="#20b2aa":(t&&(r="black"),n&&(r="#cdcdb4"))}var i="s";const a=e.filter((e=>"string"===typeof e&&e.startsWith(C2)));return a.length>0&&(i=a[0].substring(C2.length)),[t,r,i,n.find((e=>!0))]}function D2(e){const t=e.reduce(((e,t)=>e+t),0);var n=4;return e.map((e=>{const r=Math.floor(92*e/t),o={top:"".concat(n,"%"),height:"".concat(r,"%")};return n+=r,o}))}function j2(e,t,n,r,o){return L2(e,o,{y1:t,y2:r,kCandleLines:n,markPointsMp:(arguments.length>5&&void 0!==arguments[5]?arguments[5]:null)||void 0,markArea:arguments.length>8&&void 0!==arguments[8]?arguments[8]:void 0},arguments.length>6&&void 0!==arguments[6]&&arguments[6],arguments.length>7&&void 0!==arguments[7]?arguments[7]:null)}const P2=[0,100];function L2(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];const i=(arguments.length>4&&void 0!==arguments[4]?arguments[4]:null)||P2;var a,s;const l=t.flatMap((e=>e.filter((e=>3===e.length&&"boolean"===typeof e[2])).map((e=>[e[0],e[1]])))),c=o?{formatter:function(e){if(e instanceof Array){if(null==n){const t=e.sort(((e,t)=>e.componentIndex-t.componentIndex)),n=t[0].dataIndex;return["Date: "+t[0].name+'<hr size=1 style="margin: 3px 0">',...t.map((e=>{var t;return"".concat(e.seriesName,":").concat(null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.toLocaleString(),"<br/>")})),...l.map((e=>"".concat(e[0],":").concat(e[1][n],"<br/>")))].join("")}{const o=n.y1[0].length||1,[i,a,...s]=e.sort(((e,t)=>e.componentIndex-t.componentIndex)),l=i.data;if(l instanceof Array&&l.length>4){const e=l[0];var t=l[1];l.length>5&&"number"===typeof l[5]?t=l[5]:e>0&&(t=n.y1[e-1][1]);const c=l[1],u=l[2],d=l[3],h=l[4],p=((u-t)/t*100).toFixed(2)+"%",f=((u-c)/c*100).toFixed(2)+"%",g=((h-d)/d*100).toFixed(2)+"%";var r="";return l.length>o+1&&(r="Signals: "+l[o+1].join(",").replaceAll("@@@","<br/>")+"<br/>"),["Date: "+i.name+'<hr size=1 style="margin: 3px 0">',"Open: "+l[1]+"<br/>","Close: "+u+"<br/>","Lowest: "+d+"<br/>","Highest: "+h+"<br/>","Change: "+g+"|"+p+"|"+f+"<br/>",a.seriesName+": "+a.data+"<br/>",...s.map((e=>{var t;return'<span style="background-color: '.concat(e.color,';width:10px;height:10px;display:inline-block;margin-right:5px;"></span>').concat(e.seriesName,":").concat(null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.toLocaleString(),"<br/>")})),r].join("")}}}return""}}:{};if(null!=n){var u;a=[2.5,1,...t.map((e=>1))];const r=function(e,t){let n=[];for(let r=0,o=t.length;r<o;r++){if(r<e){n.push("-");continue}let o=0;for(let n=0;n<e;n++)o+=+t[r-n][1];n.push((o/e).toFixed(2))}return n}(5,n.y1),o={itemStyle:{borderColor:"rgba(255, 173, 177, 0.4)",borderWidth:3,color:"transparent"},data:null===(u=n.markArea)||void 0===u?void 0:u.map((e=>e[2]?[{name:e[3],xAxis:e[0]},{name:e[3],xAxis:e[1]}]:[{name:e[3],coord:[e[0],"min"]},{name:e[3],coord:[e[1],"max"]}]))},i=n.kCandleLines.map((e=>{const t=e.length>2?"string"===typeof e[2]?{lineStyle:{width:1,color:e[2]}}:e[2]:{lineStyle:{width:1}};return{name:e[0],type:"line",data:e[1],smooth:!0,showSymbol:!1,...t}})),l=[];if(null!=n.markPointsMp)for(var d=0;d<e.length;d++){const t=n.markPointsMp.get(e[d]);if(null!=t){const[r,o,i,a]=T2(t);n.y1[d]=[...n.y1[d],r],l.push({name:"buy point",coord:[e[d],n.y1[d][3],a||1],value:i,itemStyle:{color:o}})}}s=[{name:"K-Line",type:"candlestick",data:n.y1,itemStyle:{color:M2,color0:I2,borderColor:void 0,borderColor0:void 0},markPoint:{data:l},markArea:o},{name:"MA5",type:"line",data:r,smooth:!0,showSymbol:!1,lineStyle:{width:1,color:"gray"}},...n.y2.map((e=>({name:e[0],type:"bar",xAxisIndex:1,yAxisIndex:1,data:e[1]}))),...i]}else a=t.map((e=>1)),s=[];const h=t.flatMap(((e,t)=>e.filter((e=>e.length<3||"boolean"!==typeof e[2])).map((e=>({name:e[0],type:"line",smooth:!0,xAxisIndex:null!=n?2+t:t,yAxisIndex:null!=n?2+t:t,data:e[1],...e.length>2&&"boolean"!==typeof e[2]?{markPoint:{data:e[2]}}:{}})))));return{animation:!1,tooltip:{trigger:"axis",...c,axisPointer:{type:"cross"},triggerOn:r?"click":"mousemove",borderWidth:1,borderColor:"#ccc",padding:10,textStyle:{color:"#000"},position:function(e,t,n,r,o){const i=e[0]>o.viewSize[0]/2?"left":"right";return{top:10,[i]:30}}},grid:D2(a),axisPointer:{link:[{xAxisIndex:"all"}],label:{backgroundColor:"#777"}},xAxis:[...a.map(((t,n)=>({type:"category",gridIndex:n,data:e,boundaryGap:!1,axisLine:{onZero:!1},axisTick:{show:0===n},splitLine:{show:!1},axisLabel:{show:0===n},min:"dataMin",max:"dataMax"})))],yAxis:[...a.map(((e,t)=>0===t?{scale:!0,splitArea:{show:!0}}:{scale:!0,gridIndex:t,splitNumber:1+t,axisLabel:{show:!0},axisLine:{show:!1},axisTick:{show:!1},splitLine:{show:!1},splitArea:{show:!0}}))],dataZoom:[{type:"inside",xAxisIndex:a.map(((e,t)=>t)),start:i[0],end:i[1]}],series:[...s,...h]}}class R2{constructor(){this.socket=void 0,this.subscribeMap=void 0,this.subscribeMsg=void 0,this.callBackMap=void 0,this.snapShotMap=void 0,this.count=void 0,this.readyListenerMap=void 0,this.endPromise=void 0,this.resolver=void 0,this.end=!1,this.pendingSubscribeMsgs=void 0,this.socket=null,this.resolver=null,this.endPromise=new Promise(((e,t)=>{this.resolver=e})),this.subscribeMap=new Map,this.callBackMap=new Map,this.snapShotMap=new Map,this.readyListenerMap=new Map,this.subscribeMsg=new Map,this.count=100,this.pendingSubscribeMsgs=[]}close(){this.end=!0,null!=this.resolver&&this.resolver(1),null!=this.socket&&1===this.socket.readyState&&this.socket.close(),this.subscribeMap.clear(),this.callBackMap.clear(),this.pendingSubscribeMsgs.splice(0,this.pendingSubscribeMsgs.length),this.subscribeMsg.clear()}async ensureConnect(){for(var e=null,t=null;!this.end;){if(null==this.socket||3===this.socket.readyState){const n=new WebSocket(Sl("wss://".concat(bl,"/ws")));n.addEventListener("message",(e=>this.messageCallBack(e))),t=new Promise(((t,n)=>{e=t})),n.addEventListener("close",(()=>{null!=e&&e(1)})),n.addEventListener("error",(e=>{console.log("ws got error:",e)})),n.addEventListener("open",(e=>{if(this.pendingSubscribeMsgs.length>0)for(;this.pendingSubscribeMsgs.length>0;){const e=this.pendingSubscribeMsgs.splice(0,1);e.length>0&&n.send(e[0])}else Array.from(this.subscribeMsg.values()).forEach((e=>{n.send(e)}))})),this.socket=n}null!=t?await Promise.any([this.endPromise,t]):await Promise.any([this.endPromise,vl(5e3)])}}sendMessage(e){null!=this.socket&&1===this.socket.readyState?this.socket.send(e):this.pendingSubscribeMsgs.push(e)}getUid(){return this.count++,"u-".concat(this.count)}registerReadyListener(e){const t=this.getUid();return this.readyListenerMap.set(t,e),t}unregisterReadyListener(e){this.readyListenerMap.has(e)&&this.readyListenerMap.delete(e)}messageCallBack(e){try{const t=JSON.parse(e.data);if("data"in t&&"target"in t){const e=t,n=e.target,r=this.subscribeMap.get(n);null!=r&&Array.from(r).forEach((t=>{const n=this.callBackMap.get(t);null!=n&&n[0](e)}))}}catch(Bk){}}subscribe(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;var o;const i="".concat(e,"@").concat(t);if("string"===typeof n){o=n;const e=this.callBackMap.get(o),t=this.subscribeMap.get(i);if(null==t){const e=new Set;e.add(o),this.subscribeMap.set(i,e)}else t.add(o);null!=e&&e[1].add(i)}else if(o=this.getUid(),!this.callBackMap.has(o)){const a=new Set;a.add(i);const s=this.subscribeMap.get(i);if(null==s){const n=new Set;n.add(o),this.subscribeMap.set(i,n);const a={subscribe:!0,[e]:t,...r||{}},s=JSON.stringify(a);this.subscribeMsg.set(i,s),this.sendMessage(s)}else s.add(o);this.callBackMap.set(o,[n,a])}return o}unsubscribe(e,t,n){const r="".concat(e,"@").concat(t),o=this.subscribeMap.get(r),i=this.callBackMap.get(n);if(null!=o&&o.has(n)&&(o.delete(n),0===o.size)){this.subscribeMap.delete(r),this.subscribeMsg.has(r)&&this.subscribeMsg.delete(r);const n={subscribe:!1,[e]:t};this.sendMessage(JSON.stringify(n))}null!=i&&i[1].has(r)&&(i[1].delete(r),0===i[1].size&&this.callBackMap.delete(n))}}function E2(e,t,n,o,i){const[a,s]=r.useState((()=>i&&n?n(e).matches:o?o(e).matches:t));return(0,On.A)((()=>{let t=!0;if(!n)return;const r=n(e),o=()=>{t&&s(r.matches)};return o(),r.addListener(o),()=>{t=!1,r.removeListener(o)}}),[e,n]),a}const N2=o.useSyncExternalStore;function O2(e,t,n,o,i){const a=r.useCallback((()=>t),[t]),s=r.useMemo((()=>{if(i&&n)return()=>n(e).matches;if(null!==o){const{matches:t}=o(e);return()=>t}return a}),[a,e,o,i,n]),[l,c]=r.useMemo((()=>{if(null===n)return[a,()=>()=>{}];const t=n(e);return[()=>t.matches,e=>(t.addListener(e),()=>{t.removeListener(e)})]}),[a,n,e]);return N2(c,l,s)}const z2=(0,r.createContext)(null);function B2(e){const[t]=(0,r.useState)((()=>new R2));return(0,r.useEffect)((()=>(t.ensureConnect(),()=>{t.close()})),[t]),(0,Sn.jsx)(z2.Provider,{value:t,children:e.children})}const F2=(0,r.createContext)(null);function V2(e){const[t,n]=(0,r.useState)(il()),[o,i]=(0,r.useState)(0),[a,s]=(0,r.useState)("1"===localStorage.getItem(al));return(0,r.useEffect)((()=>{n(il())}),[o]),(0,r.useEffect)((()=>{const e=yl.addCallBack((()=>{n(il())}));return()=>{yl.removeCallback(e)}}),[]),(0,Sn.jsx)(F2.Provider,{value:{userLevel:t,updateUserLevel:()=>i((e=>e+1)),enableSelect:a,updateSelect:e=>{var t;s(e),t=e,localStorage.setItem(al,(t?1:0)+"")}},children:e.child})}function W2(){const e=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=rn(),r="undefined"!==typeof window&&"undefined"!==typeof window.matchMedia,{defaultMatches:o=!1,matchMedia:i=(r?window.matchMedia:null),ssrMatchMedia:a=null,noSsr:s=!1}=en({name:"MuiUseMediaQuery",props:t,theme:n});let l="function"===typeof e?e(n):e;return l=l.replace(/^@media( ?)/m,""),(void 0!==N2?O2:E2)(l,o,i,a,s)}(Zs),t=(0,r.useContext)(F2);return null==t?e:!t.enableSelect||e}function H2(e){const{data2:t,isDayCandle:n,clickDay:o,isRealtime:i}=e,[a,s]=(0,r.useState)(null),l=W2(),c=(0,r.useRef)(null),[u,d]=(0,r.useState)([0,100]);return(0,r.useEffect)((()=>{if(null!=c.current)if(null==a)s(ZT(c.current));else{var e;null==a?(e=ZT(c.current),s(e)):e=a;const h=t.results,p=h.map((e=>n?Ml.format(e.t):El(e.t,!0))),f=n&&null!=t.prevClose?h.map((e=>[e.o,e.c,e.l,e.h,t.prevClose])):h.map((e=>[e.o,e.c,e.l,e.h])),g=h.map((e=>e.v));var r;if(n&&!0!==i)r=[["volume rank",h.map((e=>null!=e.vr?e.vr:0))]];else if(n)r=[["volume rank",h.map((e=>null!=e.vr?e.vr:0))]];else{const e=[],t=[],n=[],o=[];h.map((r=>{const i=r.preVolume||0,a=r.v2||0,s=r.v;t.push(e.reduce(((e,t)=>t[0]>i?e+1:e),0)+1),n.push(e.reduce(((e,t)=>t[1]>a?e+1:e),0)+1),o.push(e.reduce(((e,t)=>t[2]>s?e+1:e),0)+1),e.push([i,a,s]),e.length>9&&e.splice(0,1)})),r=[["preVolume rank",t],["first hour volume rank",n],["day volume rank",o]]}const m=j2(p,f,[],[["volume",g]],[r],null,!l,u);e.setOption(m),n||e.on("click",(e=>{"series"===e.componentType&&"candlestick"===e.componentSubType&&null!=o&&o(e.name.slice(0,10))})),e.on("datazoom",(e=>{if(null!=e&&"object"===typeof e)if("start"in e&&"end"in e){const t=e;d([t.start,t.end])}else if("batch"in e){const t=e.batch;if(Array.isArray(t)){const e=t;if(e.length>0){const t=e[0];if("start"in t&&"end"in t){const e=t;d([e.start,e.end])}}}}}))}}),[t,a,n,l,o,i,u]),(0,Sn.jsx)("div",{ref:c,style:{width:"100%",height:"100%"}})}function G2(e){const{symbol:t,startDate:n,endDate:o,clickDay:i}=e,a=n===o,s=(0,r.useCallback)((async e=>await _l(t,n,o,1,a?"minute":"day",e)),[t,n,o,a]),l="".concat(t,"-").concat(n,"-").concat(o);return(0,Sn.jsx)(Qc,{getter:s,debugKey:l,cvt:e=>(0,Sn.jsx)(H2,{data2:e,isDayCandle:a,clickDay:i},l)})}function U2(e){const{symbol:t,updateInfo:n}=e,[o,i]=(0,r.useState)([]),[a,s]=(0,r.useState)(null),l=(0,r.useContext)(z2);return(0,r.useEffect)((()=>{if(null==a){const e=new AbortController,n=e.signal;return async function(e,t){const n=(new Date).getTime(),r=El(n-5*Jc),o=El(n);for(var i=20;i-- >0;){const n=await _l(e,r,o,1,"day",t);if(!("err"in n)){const e=n.results;if(e.length>0){const t=e[e.length-1];if(El(t.t)!==o)return t.c;if(e.length>1)return e[e.length-2].c}}await vl(500)}return null}(t,n).then((e=>{n.aborted||null==e||s(e)})),()=>{e.abort()}}}),[a,t]),(0,r.useEffect)((()=>{const e=new Map,n=null===l||void 0===l?void 0:l.subscribe("symbol",t,(t=>{"reset"===t.command&&e.clear(),Object.entries(t.data).forEach((t=>{const n=t[1];e.set(t[0],n)})),i(Array.from(e.values()).sort(((e,t)=>e.t-t.t)))}),{needHistory:!0});return()=>{null!=n&&(null===l||void 0===l||l.unsubscribe("symbol",t,n))}}),[l,t]),(0,r.useEffect)((()=>{if(o.length>0&&null!=a){const e=o[o.length-1],t=e.c;n([t,t/a-1,e.t])}}),[o,a,n]),(0,Sn.jsx)(H2,{data2:{results:o,prevClose:a},isDayCandle:!0,isRealtime:!0})}function X2(e){const[t,n]=(0,r.useState)(El()),[o,i]=(0,r.useState)([0,0,0]);return(0,Sn.jsxs)("div",{style:{width:"100%",marginTop:"2rem",marginBottom:"1rem"},children:[(0,Sn.jsx)("div",{children:(0,Sn.jsx)("h3",{children:(0,Sn.jsx)(Vt,{to:"/stock/".concat(e.symbol),children:e.symbol})})}),(0,Sn.jsxs)("div",{style:{width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap"},children:[(0,Sn.jsxs)("div",{children:[(0,Sn.jsxs)("h4",{children:["\u6700\u65b0:",(0,Sn.jsx)("span",{style:{padding:"1rem",color:o[1]>=0?"green":"red"},children:(100*o[1]).toFixed(2)+"%"}),o[0].toFixed(2)+"$"]}),(0,Sn.jsxs)("p",{children:[(0,Sn.jsx)("span",{style:{color:"lightgrey"},children:"updated: "}),Kl(o[2])]})]}),null!=e.tags&&(0,Sn.jsx)(Lc,{children:e.tags.map((t=>(0,Sn.jsx)(Vs,{onClick:()=>{t.startsWith("level ")||null==e.handleClickTag||e.handleClickTag(t)},color:"success",variant:"outlined",children:t},t)))}),!!e.events&&e.events.length>0&&(0,Sn.jsx)("div",{children:e.events.map((e=>(0,Sn.jsxs)("p",{style:{margin:"0",color:"high"===e.level?"red":"medium"===e.level?"yellow":"green"},children:[e.name,": ",El(e.timestamp)]})))}),(0,Sn.jsxs)(Lc,{children:[(0,Sn.jsx)(Vs,{color:"success",variant:"today"!==t&&"history"!==t?"contained":"outlined",onClick:e=>{n((e=>El()))},children:"Day"}),(0,Sn.jsx)(Vs,{color:"success",variant:"today"===t?"contained":"outlined",onClick:e=>{n((e=>"today"!==e?"today":e))},children:"Today"}),(0,Sn.jsx)(Vs,{color:"success",variant:"history"===t?"contained":"outlined",onClick:e=>{n((e=>"history"!==e?"history":e))},children:"History"})]})]}),(0,Sn.jsxs)("div",{className:"CS-Container",children:[(0,Sn.jsx)("div",{className:"CS-Item",style:{aspectRatio:"4/3"},children:(0,Sn.jsx)(G2,{clickDay:e=>n(e),startDate:e.startDate,endDate:e.endDate,symbol:e.symbol})}),(0,Sn.jsx)("div",{className:"CS-Item",children:!0===e.marketOpen&&t===El()?(0,Sn.jsx)(U2,{symbol:e.symbol,updateInfo:i}):(0,Sn.jsx)(G2,{startDate:t,endDate:t,symbol:e.symbol})})]})]})}function Y2(){const[e]=Xt(),t=tt(),n=e.get("path");return(0,r.useEffect)((()=>{null!=n&&(e.delete("path"),t(n+"?"+e.toString()))})),null!=n?(0,Sn.jsx)("p",{children:"Cound not be here"}):(0,Sn.jsx)(K2,{})}function q2(e){return e.isBig?(0,Sn.jsx)(Lc,{children:e.children}):(0,Sn.jsx)(Sn.Fragment,{children:e.children})}function Z2(e){const{d:t,marketOpen2:n}=e,o=W2(),[i,a]=(0,r.useState)({level:4}),s=[],l=e=>a((t=>({...t,tag:e})));t.forEach((e=>{e.tags.forEach((e=>{s.indexOf(e)<0&&s.push(e)}))}));const c=(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsx)(Vs,{color:"success",variant:null==i.tag?"contained":"outlined",onClick:()=>{a((e=>null!=e.level?{level:e.level}:{}))},children:"All"}),s.map((e=>(0,Sn.jsx)(Vs,{onClick:()=>a((t=>({...t,tag:e}))),color:"success",variant:i.tag===e?"contained":"outlined",children:e},e)))]}),u=(new Date).getTime(),d=El(u-5184e6),h=El(u);return(0,Sn.jsxs)("main",{className:"MainPage",children:[(0,Sn.jsx)("h2",{children:"Main Page"}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"Level: "}),(0,Sn.jsxs)("select",{value:i.level||"all",onChange:e=>{a((t=>"all"===e.target.value?null==t.tag?{}:{tag:t.tag}:{...t,level:parseInt(e.target.value)}))},children:[(0,Sn.jsx)("option",{value:"all",children:"all"},"all"),eu.map((e=>(0,Sn.jsx)("option",{value:e,children:e},e)))]}),(0,Sn.jsx)("span",{children:"tags:"}),(0,Sn.jsx)(q2,{children:c,isBig:o}),(0,Sn.jsx)("input",{value:i.query,onChange:e=>a((t=>({...t,query:e.target.value})))})]}),null!=n&&t.filter((e=>!(null!=i.query&&!e.stock.toLocaleLowerCase().startsWith(i.query.toLocaleLowerCase()))&&((null==i.level||i.level===e.level)&&!(null!=i.tag&&e.tags.indexOf(i.tag)<0)))).map((e=>(0,Sn.jsx)(X2,{marketOpen:n,tags:e.tags.concat("level "+e.level),symbol:e.stock,startDate:d,endDate:h,events:e.events,handleClickTag:l},e.stock)))]})}function K2(){const e=(0,r.useCallback)((async e=>{const t=await zl(e);if("err"in t)return t;{const n=1===await async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=await Cl("".concat(xl,"/marketStatus"),e);if(!("err"in t)&&"exchanges"in t)return"closed"!==t.exchanges.nyse?1:0;return-1}(e);return[t,n]}}),[]),t=(0,r.useCallback)((e=>(0,Sn.jsx)(Z2,{d:e[0],marketOpen2:e[1]})),[]);return(0,Sn.jsx)(Qc,{getter:e,cvt:t,debugKey:"main"},"main")}const $2=864e5,Q2=(0,Ea.A)((0,Sn.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function J2(e){return(0,Kt.Ay)("MuiChip",e)}const e5=(0,nr.A)("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),t5=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],n5=(0,In.Ay)("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:o,clickable:i,onDelete:a,size:s,variant:l}=n;return[{["& .".concat(e5.avatar)]:t.avatar},{["& .".concat(e5.avatar)]:t["avatar".concat((0,Mn.A)(s))]},{["& .".concat(e5.avatar)]:t["avatarColor".concat((0,Mn.A)(r))]},{["& .".concat(e5.icon)]:t.icon},{["& .".concat(e5.icon)]:t["icon".concat((0,Mn.A)(s))]},{["& .".concat(e5.icon)]:t["iconColor".concat((0,Mn.A)(o))]},{["& .".concat(e5.deleteIcon)]:t.deleteIcon},{["& .".concat(e5.deleteIcon)]:t["deleteIcon".concat((0,Mn.A)(s))]},{["& .".concat(e5.deleteIcon)]:t["deleteIconColor".concat((0,Mn.A)(r))]},{["& .".concat(e5.deleteIcon)]:t["deleteIcon".concat((0,Mn.A)(l),"Color").concat((0,Mn.A)(r))]},t.root,t["size".concat((0,Mn.A)(s))],t["color".concat((0,Mn.A)(r))],i&&t.clickable,i&&"default"!==r&&t["clickableColor".concat((0,Mn.A)(r),")")],a&&t.deletable,a&&"default"!==r&&t["deletableColor".concat((0,Mn.A)(r))],t[l],t["".concat(l).concat((0,Mn.A)(r))]]}})((e=>{let{theme:t,ownerState:n}=e;const r="light"===t.palette.mode?t.palette.grey[700]:t.palette.grey[300];return(0,qt.A)({maxWidth:"100%",fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(t.vars||t).palette.text.primary,backgroundColor:(t.vars||t).palette.action.selected,borderRadius:16,whiteSpace:"nowrap",transition:t.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",["&.".concat(e5.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},["& .".concat(e5.avatar)]:{marginLeft:5,marginRight:-6,width:24,height:24,color:t.vars?t.vars.palette.Chip.defaultAvatarColor:r,fontSize:t.typography.pxToRem(12)},["& .".concat(e5.avatarColorPrimary)]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.dark},["& .".concat(e5.avatarColorSecondary)]:{color:(t.vars||t).palette.secondary.contrastText,backgroundColor:(t.vars||t).palette.secondary.dark},["& .".concat(e5.avatarSmall)]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:t.typography.pxToRem(10)},["& .".concat(e5.icon)]:(0,qt.A)({marginLeft:5,marginRight:-6},"small"===n.size&&{fontSize:18,marginLeft:4,marginRight:-4},n.iconColor===n.color&&(0,qt.A)({color:t.vars?t.vars.palette.Chip.defaultIconColor:r},"default"!==n.color&&{color:"inherit"})),["& .".concat(e5.deleteIcon)]:(0,qt.A)({WebkitTapHighlightColor:"transparent",color:t.vars?"rgba(".concat(t.vars.palette.text.primaryChannel," / 0.26)"):(0,zi.X4)(t.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:t.vars?"rgba(".concat(t.vars.palette.text.primaryChannel," / 0.4)"):(0,zi.X4)(t.palette.text.primary,.4)}},"small"===n.size&&{fontSize:16,marginRight:4,marginLeft:-4},"default"!==n.color&&{color:t.vars?"rgba(".concat(t.vars.palette[n.color].contrastTextChannel," / 0.7)"):(0,zi.X4)(t.palette[n.color].contrastText,.7),"&:hover, &:active":{color:(t.vars||t).palette[n.color].contrastText}})},"small"===n.size&&{height:24},"default"!==n.color&&{backgroundColor:(t.vars||t).palette[n.color].main,color:(t.vars||t).palette[n.color].contrastText},n.onDelete&&{["&.".concat(e5.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.selectedChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,zi.X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},n.onDelete&&"default"!==n.color&&{["&.".concat(e5.focusVisible)]:{backgroundColor:(t.vars||t).palette[n.color].dark}})}),(e=>{let{theme:t,ownerState:n}=e;return(0,qt.A)({},n.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.selectedChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,zi.X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)},["&.".concat(e5.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.selectedChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,zi.X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)},"&:active":{boxShadow:(t.vars||t).shadows[1]}},n.clickable&&"default"!==n.color&&{["&:hover, &.".concat(e5.focusVisible)]:{backgroundColor:(t.vars||t).palette[n.color].dark}})}),(e=>{let{theme:t,ownerState:n}=e;return(0,qt.A)({},"outlined"===n.variant&&{backgroundColor:"transparent",border:t.vars?"1px solid ".concat(t.vars.palette.Chip.defaultBorder):"1px solid ".concat("light"===t.palette.mode?t.palette.grey[400]:t.palette.grey[700]),["&.".concat(e5.clickable,":hover")]:{backgroundColor:(t.vars||t).palette.action.hover},["&.".concat(e5.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["& .".concat(e5.avatar)]:{marginLeft:4},["& .".concat(e5.avatarSmall)]:{marginLeft:2},["& .".concat(e5.icon)]:{marginLeft:4},["& .".concat(e5.iconSmall)]:{marginLeft:2},["& .".concat(e5.deleteIcon)]:{marginRight:5},["& .".concat(e5.deleteIconSmall)]:{marginRight:3}},"outlined"===n.variant&&"default"!==n.color&&{color:(t.vars||t).palette[n.color].main,border:"1px solid ".concat(t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / 0.7)"):(0,zi.X4)(t.palette[n.color].main,.7)),["&.".concat(e5.clickable,":hover")]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,zi.X4)(t.palette[n.color].main,t.palette.action.hoverOpacity)},["&.".concat(e5.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.focusOpacity,")"):(0,zi.X4)(t.palette[n.color].main,t.palette.action.focusOpacity)},["& .".concat(e5.deleteIcon)]:{color:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / 0.7)"):(0,zi.X4)(t.palette[n.color].main,.7),"&:hover, &:active":{color:(t.vars||t).palette[n.color].main}}})})),r5=(0,In.Ay)("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t["label".concat((0,Mn.A)(r))]]}})((e=>{let{ownerState:t}=e;return(0,qt.A)({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},"outlined"===t.variant&&{paddingLeft:11,paddingRight:11},"small"===t.size&&{paddingLeft:8,paddingRight:8},"small"===t.size&&"outlined"===t.variant&&{paddingLeft:7,paddingRight:7})}));function o5(e){return"Backspace"===e.key||"Delete"===e.key}const i5=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiChip"}),{avatar:o,className:i,clickable:a,color:s="default",component:l,deleteIcon:c,disabled:u=!1,icon:d,label:h,onClick:p,onDelete:f,onKeyDown:g,onKeyUp:m,size:v="medium",variant:y="filled",tabIndex:x,skipFocusWhenDisabled:b=!1}=n,w=(0,Yt.A)(n,t5),S=r.useRef(null),_=(0,Yn.A)(S,t),A=e=>{e.stopPropagation(),f&&f(e)},k=!(!1===a||!p)||a,C=k||f?Ds:l||"div",M=(0,qt.A)({},n,{component:C,disabled:u,size:v,color:s,iconColor:r.isValidElement(d)&&d.props.color||s,onDelete:!!f,clickable:k,variant:y}),I=(e=>{const{classes:t,disabled:n,size:r,color:o,iconColor:i,onDelete:a,clickable:s,variant:l}=e,c={root:["root",l,n&&"disabled","size".concat((0,Mn.A)(r)),"color".concat((0,Mn.A)(o)),s&&"clickable",s&&"clickableColor".concat((0,Mn.A)(o)),a&&"deletable",a&&"deletableColor".concat((0,Mn.A)(o)),"".concat(l).concat((0,Mn.A)(o))],label:["label","label".concat((0,Mn.A)(r))],avatar:["avatar","avatar".concat((0,Mn.A)(r)),"avatarColor".concat((0,Mn.A)(o))],icon:["icon","icon".concat((0,Mn.A)(r)),"iconColor".concat((0,Mn.A)(i))],deleteIcon:["deleteIcon","deleteIcon".concat((0,Mn.A)(r)),"deleteIconColor".concat((0,Mn.A)(o)),"deleteIcon".concat((0,Mn.A)(l),"Color").concat((0,Mn.A)(o))]};return(0,$t.A)(c,J2,t)})(M),T=C===Ds?(0,qt.A)({component:l||"div",focusVisibleClassName:I.focusVisible},f&&{disableRipple:!0}):{};let D=null;f&&(D=c&&r.isValidElement(c)?r.cloneElement(c,{className:(0,Zt.A)(c.props.className,I.deleteIcon),onClick:A}):(0,Sn.jsx)(Q2,{className:(0,Zt.A)(I.deleteIcon),onClick:A}));let j=null;o&&r.isValidElement(o)&&(j=r.cloneElement(o,{className:(0,Zt.A)(I.avatar,o.props.className)}));let P=null;return d&&r.isValidElement(d)&&(P=r.cloneElement(d,{className:(0,Zt.A)(I.icon,d.props.className)})),(0,Sn.jsxs)(n5,(0,qt.A)({as:C,className:(0,Zt.A)(I.root,i),disabled:!(!k||!u)||void 0,onClick:p,onKeyDown:e=>{e.currentTarget===e.target&&o5(e)&&e.preventDefault(),g&&g(e)},onKeyUp:e=>{e.currentTarget===e.target&&(f&&o5(e)?f(e):"Escape"===e.key&&S.current&&S.current.blur()),m&&m(e)},ref:_,tabIndex:b&&u?-1:x,ownerState:M},T,w,{children:[j||P,(0,Sn.jsx)(r5,{className:(0,Zt.A)(I.label),ownerState:M,children:h}),D]}))})),a5=i5;async function s5(e){const t=await Jl(null,e);if("err"in t)return t;{const n=await cc(e);return"err"in n?n:[n,t]}}function l5(e){const{data:[t,n],update:o}=e,i=[...t,...n.filter((e=>0===e.account.length&&e.strategy===Ys)).map((e=>"stock:".concat(e.symbol,"-").concat(e.rowid,"-").concat(e.strategy)))],[a,s]=(0,r.useState)(i.length>0?i.find((e=>e.search("energy buy")>-1))||i[0]:""),[l,c]=(0,r.useState)(null),u=(0,r.useCallback)((async e=>{const t=a.split("-");if(t.length>1){const r=n.find((e=>e.rowid+""===t[1]));if(null!=r){if(0===r.account.length){const t=await xc(r.rowid,e);if("err"in t)return t;{const e=t.flatMap((e=>{const t=n.find((t=>t.rowid===e.subId));return null!=t?[t]:[]}));return e.length>0&&(o([r.rowid+"",e[0]]),c(e[0])),e}}return o([r.rowid+"",r]),c(r),[r]}return{err:"fail to find account"}}return{err:"illegal task name!"}}),[a,n,o]);return(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("select",{value:a,onChange:e=>s(e.target.value),children:i.map((e=>(0,Sn.jsx)("option",{value:e,children:e},e)))}),(0,Sn.jsx)(Qc,{getter:u,cvt:e=>(0,Sn.jsx)("select",{value:(null===l||void 0===l?void 0:l.rowid)||"",onChange:t=>{const n=e.find((e=>e.rowid===parseInt(t.target.value)));if(null!=n){c(n);const e=a.split("-");e.length>1&&o([e[1],n])}},children:e.map((e=>(0,Sn.jsx)("option",{value:e.rowid,children:"".concat(e.rowid,"-").concat(e.account,"-").concat(e.strategy,"-").concat(e.desc)},e.rowid)))})})]})}function c5(){const e=(0,r.useCallback)((async e=>await uc(e)),[]);return(0,Sn.jsx)(Qc,{getter:e,cvt:e=>(0,Sn.jsx)("div",{style:{marginBottom:20},children:e.filter((e=>null==e.isVirtual||0===e.isVirtual)).map((e=>{const t=e.position;var n,r=e.name,o=!1;null!=t&&(o=!0,r=null!=e.optionNum&&null!=e.optionValue?"".concat(r,"<").concat(e.optionNum,"><").concat(e.optionValue.toLocaleString(),"><").concat((null===(n=e.margin)||void 0===n?void 0:n.toLocaleString())||"0",">"):r+"|"+t.toLocaleString());const i=e.EquityWithLoanValue,a=e.MaintMarginReq,s=e.balance;if(null!=i&&null!=a&&null!=s){const e=s>0?(i-a)/s:0;r="".concat(r,"<Cushion:").concat((100*e).toLocaleString(),"%(").concat(i.toLocaleString(),"|").concat(a.toLocaleString(),"|").concat(s.toLocaleString(),")>")}return(0,Sn.jsx)(a5,{label:r,variant:"outlined",color:o?"success":"error"})}))}),interval:2e4})}var u5=n(4318);function d5(e){return(0,Kt.Ay)("MuiCollapse",e)}(0,nr.A)("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const h5=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],p5=(0,In.Ay)("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],"entered"===n.state&&t.entered,"exited"===n.state&&!n.in&&"0px"===n.collapsedSize&&t.hidden]}})((e=>{let{theme:t,ownerState:n}=e;return(0,qt.A)({height:0,overflow:"hidden",transition:t.transitions.create("height")},"horizontal"===n.orientation&&{height:"auto",width:0,transition:t.transitions.create("width")},"entered"===n.state&&(0,qt.A)({height:"auto",overflow:"visible"},"horizontal"===n.orientation&&{width:"auto"}),"exited"===n.state&&!n.in&&"0px"===n.collapsedSize&&{visibility:"hidden"})})),f5=(0,In.Ay)("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})((e=>{let{ownerState:t}=e;return(0,qt.A)({display:"flex",width:"100%"},"horizontal"===t.orientation&&{width:"auto",height:"100%"})})),g5=(0,In.Ay)("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})((e=>{let{ownerState:t}=e;return(0,qt.A)({width:"100%"},"horizontal"===t.orientation&&{width:"auto",height:"100%"})})),m5=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiCollapse"}),{addEndListener:o,children:i,className:a,collapsedSize:s="0px",component:l,easing:c,in:u,onEnter:d,onEntered:h,onEntering:p,onExit:f,onExited:g,onExiting:m,orientation:v="vertical",style:y,timeout:x=u5.p0.standard,TransitionComponent:b=$o}=n,w=(0,Yt.A)(n,h5),S=(0,qt.A)({},n,{orientation:v,collapsedSize:s}),_=(e=>{const{orientation:t,classes:n}=e,r={root:["root","".concat(t)],entered:["entered"],hidden:["hidden"],wrapper:["wrapper","".concat(t)],wrapperInner:["wrapperInner","".concat(t)]};return(0,$t.A)(r,d5,n)})(S),A=Qo(),k=(0,Bo.A)(),C=r.useRef(null),M=r.useRef(),I="number"===typeof s?"".concat(s,"px"):s,T="horizontal"===v,D=T?"width":"height",j=r.useRef(null),P=(0,Yn.A)(t,j),L=e=>t=>{if(e){const n=j.current;void 0===t?e(n):e(n,t)}},R=()=>C.current?C.current[T?"clientWidth":"clientHeight"]:0,E=L(((e,t)=>{C.current&&T&&(C.current.style.position="absolute"),e.style[D]=I,d&&d(e,t)})),N=L(((e,t)=>{const n=R();C.current&&T&&(C.current.style.position="");const{duration:r,easing:o}=ei({style:y,timeout:x,easing:c},{mode:"enter"});if("auto"===x){const t=A.transitions.getAutoHeightDuration(n);e.style.transitionDuration="".concat(t,"ms"),M.current=t}else e.style.transitionDuration="string"===typeof r?r:"".concat(r,"ms");e.style[D]="".concat(n,"px"),e.style.transitionTimingFunction=o,p&&p(e,t)})),O=L(((e,t)=>{e.style[D]="auto",h&&h(e,t)})),z=L((e=>{e.style[D]="".concat(R(),"px"),f&&f(e)})),B=L(g),F=L((e=>{const t=R(),{duration:n,easing:r}=ei({style:y,timeout:x,easing:c},{mode:"exit"});if("auto"===x){const n=A.transitions.getAutoHeightDuration(t);e.style.transitionDuration="".concat(n,"ms"),M.current=n}else e.style.transitionDuration="string"===typeof n?n:"".concat(n,"ms");e.style[D]=I,e.style.transitionTimingFunction=r,m&&m(e)}));return(0,Sn.jsx)(b,(0,qt.A)({in:u,onEnter:E,onEntered:O,onEntering:N,onExit:z,onExited:B,onExiting:F,addEndListener:e=>{"auto"===x&&k.start(M.current||0,e),o&&o(j.current,e)},nodeRef:j,timeout:"auto"===x?null:x},w,{children:(e,t)=>(0,Sn.jsx)(p5,(0,qt.A)({as:l,className:(0,Zt.A)(_.root,a,{entered:_.entered,exited:!u&&"0px"===I&&_.hidden}[e]),style:(0,qt.A)({[T?"minWidth":"minHeight"]:I},y),ref:P},t,{ownerState:(0,qt.A)({},S,{state:e}),children:(0,Sn.jsx)(f5,{ownerState:(0,qt.A)({},S,{state:e}),className:_.wrapper,ref:C,children:(0,Sn.jsx)(g5,{ownerState:(0,qt.A)({},S,{state:e}),className:_.wrapperInner,children:i})})}))}))}));m5.muiSupportAuto=!0;const v5=m5;const y5=r.createContext({}),x5=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],b5=["component","slots","slotProps"],w5=["component"];function S5(e){return(0,Kt.Ay)("MuiAccordion",e)}const _5=(0,nr.A)("MuiAccordion",["root","rounded","expanded","disabled","gutters","region"]),A5=["children","className","defaultExpanded","disabled","disableGutters","expanded","onChange","square","slots","slotProps","TransitionComponent","TransitionProps"],k5=(0,In.Ay)(Gi,{name:"MuiAccordion",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(_5.region)]:t.region},t.root,!n.square&&t.rounded,!n.disableGutters&&t.gutters]}})((e=>{let{theme:t}=e;const n={duration:t.transitions.duration.shortest};return{position:"relative",transition:t.transitions.create(["margin"],n),overflowAnchor:"none","&::before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(t.vars||t).palette.divider,transition:t.transitions.create(["opacity","background-color"],n)},"&:first-of-type":{"&::before":{display:"none"}},["&.".concat(_5.expanded)]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},["&.".concat(_5.disabled)]:{backgroundColor:(t.vars||t).palette.action.disabledBackground}}}),(e=>{let{theme:t}=e;return{variants:[{props:e=>!e.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(t.vars||t).shape.borderRadius,borderBottomRightRadius:(t.vars||t).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:e=>!e.disableGutters,style:{["&.".concat(_5.expanded)]:{margin:"16px 0"}}}]}})),C5=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiAccordion"}),{children:o,className:i,defaultExpanded:a=!1,disabled:s=!1,disableGutters:l=!1,expanded:c,onChange:u,square:d=!1,slots:h={},slotProps:p={},TransitionComponent:f,TransitionProps:g}=n,m=(0,Yt.A)(n,A5),[v,y]=(0,_a.A)({controlled:c,default:a,name:"Accordion",state:"expanded"}),x=r.useCallback((e=>{y(!v),u&&u(e,!v)}),[v,u,y]),[b,...w]=r.Children.toArray(o),S=r.useMemo((()=>({expanded:v,disabled:s,disableGutters:l,toggle:x})),[v,s,l,x]),_=(0,qt.A)({},n,{square:d,disabled:s,disableGutters:l,expanded:v}),A=(e=>{const{classes:t,square:n,expanded:r,disabled:o,disableGutters:i}=e,a={root:["root",!n&&"rounded",r&&"expanded",o&&"disabled",!i&&"gutters"],region:["region"]};return(0,$t.A)(a,S5,t)})(_),k=(0,qt.A)({transition:f},h),C=(0,qt.A)({transition:g},p),[M,I]=function(e,t){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,getSlotOwnerState:a,internalForwardedProps:s}=t,l=(0,Yt.A)(t,x5),{component:c,slots:u={[e]:void 0},slotProps:d={[e]:void 0}}=i,h=(0,Yt.A)(i,b5),p=u[e]||r,f=xo(d[e],o),g=yo((0,qt.A)({className:n},l,{externalForwardedProps:"root"===e?h:void 0,externalSlotProps:f})),{props:{component:m},internalRef:v}=g,y=(0,Yt.A)(g.props,w5),x=(0,En.A)(v,null==f?void 0:f.ref,t.ref),b=a?a(y):{},w=(0,qt.A)({},o,b),S="root"===e?m||c:m,_=go(p,(0,qt.A)({},"root"===e&&!c&&!u[e]&&s,"root"!==e&&!u[e]&&s,y,S&&{as:S},{ref:x}),w);return Object.keys(b).forEach((e=>{delete _[e]})),[p,_]}("transition",{elementType:v5,externalForwardedProps:{slots:k,slotProps:C},ownerState:_});return(0,Sn.jsxs)(k5,(0,qt.A)({className:(0,Zt.A)(A.root,i),ref:t,ownerState:_,square:d},m,{children:[(0,Sn.jsx)(y5.Provider,{value:S,children:b}),(0,Sn.jsx)(M,(0,qt.A)({in:v,timeout:"auto"},I,{children:(0,Sn.jsx)("div",{"aria-labelledby":b.props.id,id:b.props["aria-controls"],role:"region",className:A.region,children:w})}))]}))})),M5=C5;function I5(e){return(0,Kt.Ay)("MuiAccordionSummary",e)}const T5=(0,nr.A)("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]),D5=["children","className","expandIcon","focusVisibleClassName","onClick"],j5=(0,In.Ay)(Ds,{name:"MuiAccordionSummary",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t}=e;const n={duration:t.transitions.duration.shortest};return{display:"flex",minHeight:48,padding:t.spacing(0,2),transition:t.transitions.create(["min-height","background-color"],n),["&.".concat(T5.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat(T5.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity},["&:hover:not(.".concat(T5.disabled,")")]:{cursor:"pointer"},variants:[{props:e=>!e.disableGutters,style:{["&.".concat(T5.expanded)]:{minHeight:64}}}]}})),P5=(0,In.Ay)("div",{name:"MuiAccordionSummary",slot:"Content",overridesResolver:(e,t)=>t.content})((e=>{let{theme:t}=e;return{display:"flex",flexGrow:1,margin:"12px 0",variants:[{props:e=>!e.disableGutters,style:{transition:t.transitions.create(["margin"],{duration:t.transitions.duration.shortest}),["&.".concat(T5.expanded)]:{margin:"20px 0"}}}]}})),L5=(0,In.Ay)("div",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper",overridesResolver:(e,t)=>t.expandIconWrapper})((e=>{let{theme:t}=e;return{display:"flex",color:(t.vars||t).palette.action.active,transform:"rotate(0deg)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shortest}),["&.".concat(T5.expanded)]:{transform:"rotate(180deg)"}}})),R5=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiAccordionSummary"}),{children:o,className:i,expandIcon:a,focusVisibleClassName:s,onClick:l}=n,c=(0,Yt.A)(n,D5),{disabled:u=!1,disableGutters:d,expanded:h,toggle:p}=r.useContext(y5),f=(0,qt.A)({},n,{expanded:h,disabled:u,disableGutters:d}),g=(e=>{const{classes:t,expanded:n,disabled:r,disableGutters:o}=e,i={root:["root",n&&"expanded",r&&"disabled",!o&&"gutters"],focusVisible:["focusVisible"],content:["content",n&&"expanded",!o&&"contentGutters"],expandIconWrapper:["expandIconWrapper",n&&"expanded"]};return(0,$t.A)(i,I5,t)})(f);return(0,Sn.jsxs)(j5,(0,qt.A)({focusRipple:!1,disableRipple:!0,disabled:u,component:"div","aria-expanded":h,className:(0,Zt.A)(g.root,i),focusVisibleClassName:(0,Zt.A)(g.focusVisible,s),onClick:e=>{p&&p(e),l&&l(e)},ref:t,ownerState:f},c,{children:[(0,Sn.jsx)(P5,{className:g.content,ownerState:f,children:o}),a&&(0,Sn.jsx)(L5,{className:g.expandIconWrapper,ownerState:f,children:a})]}))})),E5=R5;function N5(e){return(0,Kt.Ay)("MuiIconButton",e)}const O5=(0,nr.A)("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),z5=["edge","children","className","color","disabled","disableFocusRipple","size"],B5=(0,In.Ay)(Ds,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t["color".concat((0,Mn.A)(n.color))],n.edge&&t["edge".concat((0,Mn.A)(n.edge))],t["size".concat((0,Mn.A)(n.size))]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,qt.A)({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest})},!n.disableRipple&&{"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.activeChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,zi.X4)(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===n.edge&&{marginLeft:"small"===n.size?-3:-12},"end"===n.edge&&{marginRight:"small"===n.size?-3:-12})}),(e=>{let{theme:t,ownerState:n}=e;var r;const o=null==(r=(t.vars||t).palette)?void 0:r[n.color];return(0,qt.A)({},"inherit"===n.color&&{color:"inherit"},"inherit"!==n.color&&"default"!==n.color&&(0,qt.A)({color:null==o?void 0:o.main},!n.disableRipple&&{"&:hover":(0,qt.A)({},o&&{backgroundColor:t.vars?"rgba(".concat(o.mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,zi.X4)(o.main,t.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),"small"===n.size&&{padding:5,fontSize:t.typography.pxToRem(18)},"large"===n.size&&{padding:12,fontSize:t.typography.pxToRem(28)},{["&.".concat(O5.disabled)]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled}})})),F5=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiIconButton"}),{edge:r=!1,children:o,className:i,color:a="default",disabled:s=!1,disableFocusRipple:l=!1,size:c="medium"}=n,u=(0,Yt.A)(n,z5),d=(0,qt.A)({},n,{edge:r,color:a,disabled:s,disableFocusRipple:l,size:c}),h=(e=>{const{classes:t,disabled:n,color:r,edge:o,size:i}=e,a={root:["root",n&&"disabled","default"!==r&&"color".concat((0,Mn.A)(r)),o&&"edge".concat((0,Mn.A)(o)),"size".concat((0,Mn.A)(i))]};return(0,$t.A)(a,N5,t)})(d);return(0,Sn.jsx)(B5,(0,qt.A)({className:(0,Zt.A)(h.root,i),centerRipple:!0,focusRipple:!l,disabled:s,ref:t},u,{ownerState:d,children:o}))})),V5=F5;function W5(e){return(0,Kt.Ay)("PrivateSwitchBase",e)}(0,nr.A)("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const H5=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],G5=(0,In.Ay)(Ds)((e=>{let{ownerState:t}=e;return(0,qt.A)({padding:9,borderRadius:"50%"},"start"===t.edge&&{marginLeft:"small"===t.size?-3:-12},"end"===t.edge&&{marginRight:"small"===t.size?-3:-12})})),U5=(0,In.Ay)("input",{shouldForwardProp:pr.A})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),X5=r.forwardRef((function(e,t){const{autoFocus:n,checked:r,checkedIcon:o,className:i,defaultChecked:a,disabled:s,disableFocusRipple:l=!1,edge:c=!1,icon:u,id:d,inputProps:h,inputRef:p,name:f,onBlur:g,onChange:m,onFocus:v,readOnly:y,required:x=!1,tabIndex:b,type:w,value:S}=e,_=(0,Yt.A)(e,H5),[A,k]=(0,_a.A)({controlled:r,default:Boolean(a),name:"SwitchBase",state:"checked"}),C=Xn();let M=s;C&&"undefined"===typeof M&&(M=C.disabled);const I="checkbox"===w||"radio"===w,T=(0,qt.A)({},e,{checked:A,disabled:M,disableFocusRipple:l,edge:c}),D=(e=>{const{classes:t,checked:n,disabled:r,edge:o}=e,i={root:["root",n&&"checked",r&&"disabled",o&&"edge".concat((0,Mn.A)(o))],input:["input"]};return(0,$t.A)(i,W5,t)})(T);return(0,Sn.jsxs)(G5,(0,qt.A)({component:"span",className:(0,Zt.A)(D.root,i),centerRipple:!0,focusRipple:!l,disabled:M,tabIndex:null,role:void 0,onFocus:e=>{v&&v(e),C&&C.onFocus&&C.onFocus(e)},onBlur:e=>{g&&g(e),C&&C.onBlur&&C.onBlur(e)},ownerState:T,ref:t},_,{children:[(0,Sn.jsx)(U5,(0,qt.A)({autoFocus:n,checked:r,defaultChecked:a,className:D.input,disabled:M,id:I?d:void 0,name:f,onChange:e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;k(t),m&&m(e,t)},readOnly:y,ref:p,required:x,ownerState:T,tabIndex:b,type:w},"checkbox"===w&&void 0===S?{}:{value:S},h)),A?o:u]}))})),Y5=X5;function q5(e){return(0,Kt.Ay)("MuiSwitch",e)}const Z5=(0,nr.A)("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),K5=["className","color","edge","size","sx"],$5=(0,In.Ay)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t["edge".concat((0,Mn.A)(n.edge))],t["size".concat((0,Mn.A)(n.size))]]}})({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,["& .".concat(Z5.thumb)]:{width:16,height:16},["& .".concat(Z5.switchBase)]:{padding:4,["&.".concat(Z5.checked)]:{transform:"translateX(16px)"}}}}]}),Q5=(0,In.Ay)(Y5,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{["& .".concat(Z5.input)]:t.input},"default"!==n.color&&t["color".concat((0,Mn.A)(n.color))]]}})((e=>{let{theme:t}=e;return{position:"absolute",top:0,left:0,zIndex:1,color:t.vars?t.vars.palette.Switch.defaultColor:"".concat("light"===t.palette.mode?t.palette.common.white:t.palette.grey[300]),transition:t.transitions.create(["left","transform"],{duration:t.transitions.duration.shortest}),["&.".concat(Z5.checked)]:{transform:"translateX(20px)"},["&.".concat(Z5.disabled)]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:"".concat("light"===t.palette.mode?t.palette.grey[100]:t.palette.grey[600])},["&.".concat(Z5.checked," + .").concat(Z5.track)]:{opacity:.5},["&.".concat(Z5.disabled," + .").concat(Z5.track)]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:"".concat("light"===t.palette.mode?.12:.2)},["& .".concat(Z5.input)]:{left:"-100%",width:"300%"}}}),(e=>{let{theme:t}=e;return{"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.activeChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,zi.X4)(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(t.palette).filter((e=>{let[,t]=e;return t.main&&t.light})).map((e=>{let[n]=e;return{props:{color:n},style:{["&.".concat(Z5.checked)]:{color:(t.vars||t).palette[n].main,"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,zi.X4)(t.palette[n].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(Z5.disabled)]:{color:t.vars?t.vars.palette.Switch["".concat(n,"DisabledColor")]:"".concat("light"===t.palette.mode?(0,zi.a)(t.palette[n].main,.62):(0,zi.e$)(t.palette[n].main,.55))}},["&.".concat(Z5.checked," + .").concat(Z5.track)]:{backgroundColor:(t.vars||t).palette[n].main}}}}))]}})),J5=(0,In.Ay)("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})((e=>{let{theme:t}=e;return{height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}),backgroundColor:t.vars?t.vars.palette.common.onBackground:"".concat("light"===t.palette.mode?t.palette.common.black:t.palette.common.white),opacity:t.vars?t.vars.opacity.switchTrack:"".concat("light"===t.palette.mode?.38:.3)}})),e3=(0,In.Ay)("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})((e=>{let{theme:t}=e;return{boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}})),t3=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiSwitch"}),{className:r,color:o="primary",edge:i=!1,size:a="medium",sx:s}=n,l=(0,Yt.A)(n,K5),c=(0,qt.A)({},n,{color:o,edge:i,size:a}),u=(e=>{const{classes:t,edge:n,size:r,color:o,checked:i,disabled:a}=e,s={root:["root",n&&"edge".concat((0,Mn.A)(n)),"size".concat((0,Mn.A)(r))],switchBase:["switchBase","color".concat((0,Mn.A)(o)),i&&"checked",a&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},l=(0,$t.A)(s,q5,t);return(0,qt.A)({},t,l)})(c),d=(0,Sn.jsx)(e3,{className:u.thumb,ownerState:c});return(0,Sn.jsxs)($5,{className:(0,Zt.A)(u.root,r),sx:s,ownerState:c,children:[(0,Sn.jsx)(Q5,(0,qt.A)({type:"checkbox",icon:d,checkedIcon:d,ref:t,ownerState:c},l,{classes:(0,qt.A)({},u,{root:u.switchBase})})),(0,Sn.jsx)(J5,{className:u.track,ownerState:c})]})})),n3=t3;function r3(e){return(0,Kt.Ay)("MuiAccordionDetails",e)}(0,nr.A)("MuiAccordionDetails",["root"]);const o3=["className"],i3=(0,In.Ay)("div",{name:"MuiAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t}=e;return{padding:t.spacing(1,2,2)}})),a3=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiAccordionDetails"}),{className:r}=n,o=(0,Yt.A)(n,o3),i=n,a=(e=>{const{classes:t}=e;return(0,$t.A)({root:["root"]},r3,t)})(i);return(0,Sn.jsx)(i3,(0,qt.A)({className:(0,Zt.A)(a.root,r),ref:t,ownerState:i},o))})),s3=a3;function l3(e){const[t,n]=(0,r.useState)(null),[o,i]=(0,r.useState)([0,100]),a=W2(),s=(0,r.useRef)(null),l=(0,r.useCallback)(((t,n)=>{const r=e.clickDay;null!=r&&r(t,n)}),[e.clickDay]),c=(0,r.useCallback)((t=>{const n=e.clickPoint;null!=n&&n(t)}),[e.clickPoint]),{historyData:u,isDay:d,symbol:h,preClose:p,signals:f,lines:g,extraLines:m,volumeLines:v}=e;return(0,r.useEffect)((()=>{if(null!=s.current)if(null==t){const t=ZT(s.current);t.on("click",(e=>{if("markPoint"===e.componentType){const t=e.data.coord;3===t.length&&"string"===typeof t[2]&&c(t[2])}if("series"===e.componentType&&"candlestick"===e.componentSubType){var t=0;t=e.dataIndex>0&&u.length>=e.dataIndex?u[e.dataIndex-1].c:e.data[1],l(e.name.slice(0,10),t)}})),t.on("datazoom",(t=>{if(null!=t&&"object"===typeof t)if("start"in t&&"end"in t){const n=t;(e.setZoomRange||i)([n.start,n.end])}else if("batch"in t){const n=t.batch;if(Array.isArray(n)){const t=n;if(t.length>0){const n=t[0];if("start"in n&&"end"in n){const t=n;(e.setZoomRange||i)([t.start,t.end])}}}}})),n(t)}else{const n=u;if(null!=n&&n.length>0){const i=n.map((e=>d?Ml.format(e.t):El(e.t,!0))),s=d&&null!=p?n.map((e=>[e.o,e.c,e.l,e.h,p])):n.map((e=>[e.o,e.c,e.l,e.h])),l=n.map((e=>e.v)),c=new Map;f.forEach((e=>{const t=d?Ml.format(e[0]):El(e[0],!0);c.set(t,e[1].map((e=>{const t=e.match(/O:\w+\d{6}[CP]\d{8}/g);return null!=t?[e,t[0]]:e})))}));var r=null;if(d){const e=n[0].t;r=[Ml.format(Yl(e)),Ml.format(ql(e))]}const u=j2(i,s,[],null!=v?v:[["volume",l]],null!=m?m:[],c,!a,e.zoomRange||o,null!=r?[[r[0],r[1],!0,"market open"]]:void 0);t.setOption(u)}}else n(null)}),[u,f,t,a,d,l,c,p,h,o,e.zoomRange,e.setZoomRange,g,m,v]),(0,Sn.jsx)("div",{ref:s,style:{width:"100%",height:"100%"}})}function c3(e){const{symbol:t,startDate:n,endDate:o,signals:i,zoomRange:a,setZoomRange:s,clickDay:l,unit2:c}=e,u=n===o,d=(0,r.useCallback)((async e=>{const r=null!=c?c:u?"minute":"day";return await _l(t,n,o,1,r,e)}),[t,n,o,u]);return(0,Sn.jsx)(Qc,{getter:d,cvt:e=>(0,Sn.jsx)(l3,{symbol:t,isDay:u,clickDay:l,historyData:!u||null!=c&&"minute"!==c?e.results:rl(e.results,!1),preClose:e.prevClose||void 0,zoomRange:a,setZoomRange:s,signals:i})})}function u3(e){const{symbol:t,startDate:n,endDate:o,signals:i,zoomRange:a,setZoomRange:s,load:l}=e,c=n===o,u=(0,r.useCallback)((async e=>{const r=c?"minute":"day";return await _l(t,n,o,1,r,e)}),[t,n,o,c]);return l?(0,Sn.jsx)(Qc,{getter:u,cvt:e=>(0,Sn.jsx)(l3,{symbol:t,isDay:c,historyData:rl(e.results,!1),preClose:e.prevClose||void 0,zoomRange:a,setZoomRange:s,signals:i})}):(0,Sn.jsx)($c,{})}function d3(e,t){return t.map((t=>t.map((t=>{const[n,r]=t;return[n,e.map((e=>{const t=Math.floor(e.t/$2)+"";return t in r?r[t]:0}))]}))))}function h3(e){const{startDate:t,endDate:n,symbol:o,signals:i,aggData:a,taskId:s}=e,l=(0,r.useCallback)((async e=>{if(null!=a){if(null!=s){const t=await oc(s,e);if(!("err"in t)){const e=d3(a,t);return[a,e]}}return[a,[]]}if(null!=s){const r=fc(t,n,o,e),i=oc(s,e),[a,l]=await Promise.all([r,i]);if("err"in a||"err"in l)return"err"in a?a:l;return[a,d3(a,l)]}{const r=await fc(t,n,o,e);return"err"in r?r:[r,[]]}}),[t,n,o,a,s]);return(0,Sn.jsx)(Qc,{getter:l,cvt:t=>{const n=[],[r,a]=t,s=r.map((e=>e.vol2||[0,0])),l=s.map((e=>e[0])),c=s.map((e=>e[1]));n.push([["vol(09:30)",l],["vol(15:40)",c]]);var u=[];const d=r.map((e=>e.v)),h=r.map((e=>e.v2||0));u=h.find((e=>e<1))?[["volume",d]]:!0===e.withEstimateVolume?[["first hour",h],["day",d],["estimate",h.map((e=>1e7*$s(e,60)))]]:[["first hour",h],["day",d]];const p=(!0===e.withOtherRank?[["rank(9:35)","v_5"],["rank(9:40)","v_10"],["rank(10:00)","v_30"],["rank(10:30)","v2"],["rank(11:00)","v_90"],["rank(11:30)","v_120"],["rank(day)","v"]]:[["rank(first hour)","v2"],["rank(day)","v"]]).map((e=>[e[0],e[1],[]])),f=[];r.forEach((e=>{const t=p.map(((t,n)=>{const r=e[t[1]]||0,o=f.reduce(((e,t)=>t[n]>r?e+1:e),1);return p[n][2].push(o),r}));f.push(t),f.length>9&&f.shift()}));const g=p.map((e=>[e[0],e[2]]));if(n.push(g),e.withOtherRank){var m=[];m.push(["all(09:40)",r.map((e=>{if(null!=e.energy&&null!=e.money){const t=e.v_10||0;return tl(e.money.m_10,t,e.energy.all_10)}return 0}))]),m.push(["all(10:00)",r.map((e=>{if(null!=e.energy&&null!=e.money){const t=e.v_30||0;return tl(e.money.m_30,t,e.energy.all_30)}return 0}))]),m.push(["all(10:30)",r.map((e=>{if(null!=e.energy&&null!=e.money){const t=e.v2||0;return tl(e.money.m_60,t,e.energy.all_60)}return 0}))]),m.push(["all(11:00)",r.map((e=>{if(null!=e.energy&&null!=e.money){const t=e.v_90||0;return tl(e.money.m_90,t,e.energy.all_90)}return 0}))]),m.push(["all(11:30)",r.map((e=>{if(null!=e.energy&&null!=e.money){const t=e.v_120||0;return tl(e.money.m_120,t,e.energy.all_120)}return 0}))]),n.push(m)}return(0,Sn.jsx)(l3,{isDay:!1,historyData:r,clickDay:e.clickDay,signals:i||[],symbol:o,volumeLines:u,extraLines:[...n,...a]})}})}var p3=n(1337);function f3(e){const t=e.updateCB,n=e.filter,[o,i]=(0,r.useState)(!1);return(0,Sn.jsx)("div",{children:(0,Sn.jsxs)(M5,{expanded:o,children:[(0,Sn.jsx)(E5,{expandIcon:(0,Sn.jsx)(V5,{onClick:e=>{i((e=>!e))},children:(0,Sn.jsx)(p3.A,{})}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"Alpha:"}),(0,Sn.jsx)("input",{type:"number",value:n.alpha,onChange:e=>{const n=parseFloat(e.target.value);isNaN(n)||t((e=>({...e,alpha:n})))}}),(0,Sn.jsx)("span",{children:"Total:"}),(0,Sn.jsx)("input",{type:"number",value:n.total,onChange:e=>{const n=parseFloat(e.target.value);isNaN(n)||t((e=>({...e,total:n})))}}),(0,Sn.jsx)("span",{children:"\u5408\u7ea6\u65b9\u5411:"}),(0,Sn.jsxs)("select",{value:null!=n.isCall?n.isCall?"1":"2":"0",onChange:e=>{const n=e.target.value,r="0"===n?void 0:"1"===n;t((e=>({...e,isCall:r})))},children:[(0,Sn.jsx)("option",{value:"0",children:"Call+Put"}),(0,Sn.jsx)("option",{value:"1",children:"Call"}),(0,Sn.jsx)("option",{value:"2",children:"Put"})]}),(0,Sn.jsx)("span",{children:"\u662f\u5426\u662f\u5927\u5355\u4ea4\u6613:"}),(0,Sn.jsx)(n3,{checked:null!=n.isBigTrade&&n.isBigTrade,onChange:e=>{t((t=>({...t,isBigTrade:e.target.checked})))}})]})}),(0,Sn.jsxs)(s3,{children:[(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"Score Low:"}),(0,Sn.jsx)("input",{type:"number",value:n.scoreLow,onChange:e=>{const n=parseFloat(e.target.value);isNaN(n)||t((e=>({...e,scoreLow:n})))}}),(0,Sn.jsx)("span",{children:"Score High:"}),(0,Sn.jsx)("input",{type:"number",value:n.scoreHigh,onChange:e=>{const n=parseFloat(e.target.value);isNaN(n)||t((e=>({...e,scoreHigh:n})))}})]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"Hour Score Low:"}),(0,Sn.jsx)("input",{type:"number",value:n.hourScoreLow,onChange:e=>{const n=parseFloat(e.target.value);isNaN(n)||t((e=>({...e,hourScoreLow:n})))}}),(0,Sn.jsx)("span",{children:"Hour Score High:"}),(0,Sn.jsx)("input",{type:"number",value:n.hourScoreHigh,onChange:e=>{const n=parseFloat(e.target.value);isNaN(n)||t((e=>({...e,hourScoreHigh:n})))}})]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u6700\u9ad8\u5408\u7ea6\u4ef7\u683c:"}),(0,Sn.jsx)("input",{type:"number",value:n.priceHigh||8,onChange:e=>{const n=parseFloat(e.target.value);isNaN(n)||t((e=>({...e,priceHigh:n})))}}),(0,Sn.jsx)("span",{children:"\u672b\u65e5\u5408\u7ea6:"}),(0,Sn.jsxs)("select",{value:null!=n.isEndDay?n.isEndDay?"1":"2":"0",onChange:e=>{const n=e.target.value,r="0"===n?void 0:"1"===n;t((e=>({...e,isEndDay:r})))},children:[(0,Sn.jsx)("option",{value:"0",children:"\u5168\u90e8\u5c55\u793a"}),(0,Sn.jsx)("option",{value:"1",children:"\u53ea\u5c55\u793a\u672b\u65e5"}),(0,Sn.jsx)("option",{value:"2",children:"\u53ea\u5c55\u793a\u975e\u672b\u65e5"})]})]})]})]})})}function g3(e,t,n){return n.filter((n=>{const r=n.extra,o=e.isBigTrade;if(null!=o)if(o){if("trade"!==r.type)return!1}else if(null!=r.type&&"agg"!==r.type)return!1;if(r.alpha<e.alpha)return!1;if(e.hourScoreHigh>e.hourScoreLow){if(!(r.hourScore>=e.hourScoreLow&&r.hourScore<=e.hourScoreHigh))return!1}else if(!(r.hourScore>=e.hourScoreLow||r.hourScore<=e.hourScoreHigh))return!1;if(e.scoreHigh>e.scoreLow){if(!(r.score>=e.scoreLow&&r.score<=e.scoreHigh))return!1}else if(!(r.score>=e.scoreLow||r.score<=e.scoreHigh))return!1;if(null!=e.isCall){if("C"===r.contract[r.contract.length-9]!==e.isCall)return!1}if(r.total<e.total)return!1;if(null!=e.priceHigh&&r.price>e.priceHigh)return!1;if(null!=e.isEndDay){const n=r.contract.length,o=r.contract.substring(n-15,n-9),i=t.replaceAll("-","").substring(2);if(e.isEndDay){if(i!==o)return!1}else if(i===o)return!1}return!0}))}function m3(e,t,n){return n.filter((n=>{if(!0===e.isBigTrade)return!1;if(n.alpha<e.alpha)return!1;if(e.hourScoreHigh>e.hourScoreLow){if(!(n.hourScore>=e.hourScoreLow&&n.hourScore<=e.hourScoreHigh))return!1}else if(!(n.hourScore>=e.hourScoreLow||n.hourScore<=e.hourScoreHigh))return!1;if(e.scoreHigh>e.scoreLow){if(!(n.score>=e.scoreLow&&n.score<=e.scoreHigh))return!1}else if(!(n.score>=e.scoreLow||n.score<=e.scoreHigh))return!1;if(null!=e.isCall){if("C"===n.contract[n.contract.length-9]!==e.isCall)return!1}if(n.tradeMoney<e.total)return!1;if(null!=e.priceHigh&&n.price>e.priceHigh)return!1;if(null!=e.isEndDay){const r=n.contract.length,o=n.contract.substring(r-15,r-9),i=t.replaceAll("-","").substring(2);if(e.isEndDay){if(i!==o)return!1}else if(i===o)return!1}return!0}))}function v3(e){return(0,Kt.Ay)("MuiDivider",e)}const y3=(0,nr.A)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),x3=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],b3=(0,In.Ay)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,"vertical"===n.orientation&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&"vertical"===n.orientation&&t.withChildrenVertical,"right"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignRight,"left"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignLeft]}})((e=>{let{theme:t,ownerState:n}=e;return(0,qt.A)({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin"},n.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},n.light&&{borderColor:t.vars?"rgba(".concat(t.vars.palette.dividerChannel," / 0.08)"):(0,zi.X4)(t.palette.divider,.08)},"inset"===n.variant&&{marginLeft:72},"middle"===n.variant&&"horizontal"===n.orientation&&{marginLeft:t.spacing(2),marginRight:t.spacing(2)},"middle"===n.variant&&"vertical"===n.orientation&&{marginTop:t.spacing(1),marginBottom:t.spacing(1)},"vertical"===n.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},n.flexItem&&{alignSelf:"stretch",height:"auto"})}),(e=>{let{ownerState:t}=e;return(0,qt.A)({},t.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}})}),(e=>{let{theme:t,ownerState:n}=e;return(0,qt.A)({},n.children&&"vertical"!==n.orientation&&{"&::before, &::after":{width:"100%",borderTop:"thin solid ".concat((t.vars||t).palette.divider),borderTopStyle:"inherit"}})}),(e=>{let{theme:t,ownerState:n}=e;return(0,qt.A)({},n.children&&"vertical"===n.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:"thin solid ".concat((t.vars||t).palette.divider),borderLeftStyle:"inherit"}})}),(e=>{let{ownerState:t}=e;return(0,qt.A)({},"right"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})})),w3=(0,In.Ay)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})((e=>{let{theme:t,ownerState:n}=e;return(0,qt.A)({display:"inline-block",paddingLeft:"calc(".concat(t.spacing(1)," * 1.2)"),paddingRight:"calc(".concat(t.spacing(1)," * 1.2)")},"vertical"===n.orientation&&{paddingTop:"calc(".concat(t.spacing(1)," * 1.2)"),paddingBottom:"calc(".concat(t.spacing(1)," * 1.2)")})})),S3=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiDivider"}),{absolute:r=!1,children:o,className:i,component:a=(o?"div":"hr"),flexItem:s=!1,light:l=!1,orientation:c="horizontal",role:u=("hr"!==a?"separator":void 0),textAlign:d="center",variant:h="fullWidth"}=n,p=(0,Yt.A)(n,x3),f=(0,qt.A)({},n,{absolute:r,component:a,flexItem:s,light:l,orientation:c,role:u,textAlign:d,variant:h}),g=(e=>{const{absolute:t,children:n,classes:r,flexItem:o,light:i,orientation:a,textAlign:s,variant:l}=e,c={root:["root",t&&"absolute",l,i&&"light","vertical"===a&&"vertical",o&&"flexItem",n&&"withChildren",n&&"vertical"===a&&"withChildrenVertical","right"===s&&"vertical"!==a&&"textAlignRight","left"===s&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]};return(0,$t.A)(c,v3,r)})(f);return(0,Sn.jsx)(b3,(0,qt.A)({as:a,className:(0,Zt.A)(g.root,i),role:u,ref:t,ownerState:f},p,{children:o?(0,Sn.jsx)(w3,{className:g.wrapper,ownerState:f,children:o}):null}))}));S3.muiSkipListHighlight=!0;const _3=S3;function A3(e){return(0,Kt.Ay)("MuiFormGroup",e)}(0,nr.A)("MuiFormGroup",["root","row","error"]);const k3=["className","row"],C3=(0,In.Ay)("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.row&&t.row]}})((e=>{let{ownerState:t}=e;return(0,qt.A)({display:"flex",flexDirection:"column",flexWrap:"wrap"},t.row&&{flexDirection:"row"})})),M3=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiFormGroup"}),{className:r,row:o=!1}=n,i=(0,Yt.A)(n,k3),a=Gn({props:n,muiFormControl:Xn(),states:["error"]}),s=(0,qt.A)({},n,{row:o,error:a.error}),l=(e=>{const{classes:t,row:n,error:r}=e,o={root:["root",n&&"row",r&&"error"]};return(0,$t.A)(o,A3,t)})(s);return(0,Sn.jsx)(C3,(0,qt.A)({className:(0,Zt.A)(l.root,r),ownerState:s,ref:t},i))})),I3=M3;function T3(e){return(0,Kt.Ay)("MuiRadioGroup",e)}(0,nr.A)("MuiRadioGroup",["root","row","error"]);const D3=r.createContext(void 0);var j3=n(5879);const P3=["actions","children","className","defaultValue","name","onChange","value"],L3=r.forwardRef((function(e,t){const{actions:n,children:o,className:i,defaultValue:a,name:s,onChange:l,value:c}=e,u=(0,Yt.A)(e,P3),d=r.useRef(null),h=(e=>{const{classes:t,row:n,error:r}=e,o={root:["root",n&&"row",r&&"error"]};return(0,$t.A)(o,T3,t)})(e),[p,f]=(0,_a.A)({controlled:c,default:a,name:"RadioGroup"});r.useImperativeHandle(n,(()=>({focus:()=>{let e=d.current.querySelector("input:not(:disabled):checked");e||(e=d.current.querySelector("input:not(:disabled)")),e&&e.focus()}})),[]);const g=(0,Yn.A)(t,d),m=(0,j3.A)(s),v=r.useMemo((()=>({name:m,onChange(e){f(e.target.value),l&&l(e,e.target.value)},value:p})),[m,l,f,p]);return(0,Sn.jsx)(D3.Provider,{value:v,children:(0,Sn.jsx)(I3,(0,qt.A)({role:"radiogroup",ref:g,className:(0,Zt.A)(h.root,i)},u,{children:o}))})})),R3=L3;var E3=n(8698),N3=n(9751),O3=n(8604);const z3=["component","direction","spacing","divider","children","className","useFlexGap"],B3=(0,tn.A)(),F3=wn("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function V3(e){return sn({props:e,name:"MuiStack",defaultTheme:B3})}function W3(e,t){const n=r.Children.toArray(e).filter(Boolean);return n.reduce(((e,o,i)=>(e.push(o),i<n.length-1&&e.push(r.cloneElement(t,{key:"separator-".concat(i)})),e)),[])}const H3=e=>{let{ownerState:t,theme:n}=e,r=(0,qt.A)({display:"flex",flexDirection:"column"},(0,N3.NI)({theme:n},(0,N3.kW)({values:t.direction,breakpoints:n.breakpoints.values}),(e=>({flexDirection:e}))));if(t.spacing){const e=(0,O3.LX)(n),o=Object.keys(n.breakpoints.values).reduce(((e,n)=>(("object"===typeof t.spacing&&null!=t.spacing[n]||"object"===typeof t.direction&&null!=t.direction[n])&&(e[n]=!0),e)),{}),i=(0,N3.kW)({values:t.direction,base:o}),a=(0,N3.kW)({values:t.spacing,base:o});"object"===typeof i&&Object.keys(i).forEach(((e,t,n)=>{if(!i[e]){const r=t>0?i[n[t-1]]:"column";i[e]=r}}));const s=(n,r)=>{return t.useFlexGap?{gap:(0,O3._W)(e,n)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{["margin".concat((o=r?i[r]:t.direction,{row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"}[o]))]:(0,O3._W)(e,n)}};var o};r=(0,cn.A)(r,(0,N3.NI)({theme:n},a,s))}return r=(0,N3.iZ)(n.breakpoints,r),r};const G3=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createStyledComponent:t=F3,useThemeProps:n=V3,componentName:o="MuiStack"}=e,i=t(H3),a=r.forwardRef((function(e,t){const r=n(e),a=(0,E3.A)(r),{component:s="div",direction:l="column",spacing:c=0,divider:u,children:d,className:h,useFlexGap:p=!1}=a,f=(0,Yt.A)(a,z3),g={direction:l,spacing:c,useFlexGap:p},m=(0,$t.A)({root:["root"]},(e=>(0,Kt.Ay)(o,e)),{});return(0,Sn.jsx)(i,(0,qt.A)({as:s,ownerState:g,ref:t,className:(0,Zt.A)(m.root,h)},f,{children:u?W3(d,u):d}))}));return a}({createStyledComponent:(0,In.Ay)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>(0,Tn.b)({props:e,name:"MuiStack"})}),U3=G3;function X3(e){return(0,Kt.Ay)("MuiTypography",e)}(0,nr.A)("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Y3=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],q3=(0,In.Ay)("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t["align".concat((0,Mn.A)(n.align))],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})((e=>{let{theme:t,ownerState:n}=e;return(0,qt.A)({margin:0},"inherit"===n.variant&&{font:"inherit"},"inherit"!==n.variant&&t.typography[n.variant],"inherit"!==n.align&&{textAlign:n.align},n.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n.gutterBottom&&{marginBottom:"0.35em"},n.paragraph&&{marginBottom:16})})),Z3={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},K3={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},$3=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiTypography"}),r=(e=>K3[e]||e)(n.color),o=(0,E3.A)((0,qt.A)({},n,{color:r})),{align:i="inherit",className:a,component:s,gutterBottom:l=!1,noWrap:c=!1,paragraph:u=!1,variant:d="body1",variantMapping:h=Z3}=o,p=(0,Yt.A)(o,Y3),f=(0,qt.A)({},o,{align:i,color:r,className:a,component:s,gutterBottom:l,noWrap:c,paragraph:u,variant:d,variantMapping:h}),g=s||(u?"p":h[d]||Z3[d])||"span",m=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e,s={root:["root",i,"inherit"!==e.align&&"align".concat((0,Mn.A)(t)),n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return(0,$t.A)(s,X3,a)})(f);return(0,Sn.jsx)(q3,(0,qt.A)({as:g,ref:t,ownerState:f,className:(0,Zt.A)(m.root,a)},p))})),Q3=$3;function J3(e){return(0,Kt.Ay)("MuiFormControlLabel",e)}const e4=(0,nr.A)("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),t4=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],n4=(0,In.Ay)("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(e4.label)]:t.label},t.root,t["labelPlacement".concat((0,Mn.A)(n.labelPlacement))]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,qt.A)({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,["&.".concat(e4.disabled)]:{cursor:"default"}},"start"===n.labelPlacement&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},"top"===n.labelPlacement&&{flexDirection:"column-reverse",marginLeft:16},"bottom"===n.labelPlacement&&{flexDirection:"column",marginLeft:16},{["& .".concat(e4.label)]:{["&.".concat(e4.disabled)]:{color:(t.vars||t).palette.text.disabled}}})})),r4=(0,In.Ay)("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})((e=>{let{theme:t}=e;return{["&.".concat(e4.error)]:{color:(t.vars||t).palette.error.main}}})),o4=r.forwardRef((function(e,t){var n,o;const i=(0,Tn.b)({props:e,name:"MuiFormControlLabel"}),{className:a,componentsProps:s={},control:l,disabled:c,disableTypography:u,label:d,labelPlacement:h="end",required:p,slotProps:f={}}=i,g=(0,Yt.A)(i,t4),m=Xn(),v=null!=(n=null!=c?c:l.props.disabled)?n:null==m?void 0:m.disabled,y=null!=p?p:l.props.required,x={disabled:v,required:y};["checked","name","onChange","value","inputRef"].forEach((e=>{"undefined"===typeof l.props[e]&&"undefined"!==typeof i[e]&&(x[e]=i[e])}));const b=Gn({props:i,muiFormControl:m,states:["error"]}),w=(0,qt.A)({},i,{disabled:v,labelPlacement:h,required:y,error:b.error}),S=(e=>{const{classes:t,disabled:n,labelPlacement:r,error:o,required:i}=e,a={root:["root",n&&"disabled","labelPlacement".concat((0,Mn.A)(r)),o&&"error",i&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",o&&"error"]};return(0,$t.A)(a,J3,t)})(w),_=null!=(o=f.typography)?o:s.typography;let A=d;return null==A||A.type===Q3||u||(A=(0,Sn.jsx)(Q3,(0,qt.A)({component:"span"},_,{className:(0,Zt.A)(S.label,null==_?void 0:_.className),children:A}))),(0,Sn.jsxs)(n4,(0,qt.A)({className:(0,Zt.A)(S.root,a),ownerState:w,ref:t},g,{children:[r.cloneElement(l,x),y?(0,Sn.jsxs)(U3,{display:"block",children:[A,(0,Sn.jsxs)(r4,{ownerState:w,"aria-hidden":!0,className:S.asterisk,children:["\u2009","*"]})]}):A]}))})),i4=o4,a4=(0,Ea.A)((0,Sn.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonUnchecked"),s4=(0,Ea.A)((0,Sn.jsx)("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"}),"RadioButtonChecked"),l4=(0,In.Ay)("span",{shouldForwardProp:pr.A})({position:"relative",display:"flex"}),c4=(0,In.Ay)(a4)({transform:"scale(1)"}),u4=(0,In.Ay)(s4)((e=>{let{theme:t,ownerState:n}=e;return(0,qt.A)({left:0,position:"absolute",transform:"scale(0)",transition:t.transitions.create("transform",{easing:t.transitions.easing.easeIn,duration:t.transitions.duration.shortest})},n.checked&&{transform:"scale(1)",transition:t.transitions.create("transform",{easing:t.transitions.easing.easeOut,duration:t.transitions.duration.shortest})})}));const d4=function(e){const{checked:t=!1,classes:n={},fontSize:r}=e,o=(0,qt.A)({},e,{checked:t});return(0,Sn.jsxs)(l4,{className:n.root,ownerState:o,children:[(0,Sn.jsx)(c4,{fontSize:r,className:n.background,ownerState:o}),(0,Sn.jsx)(u4,{fontSize:r,className:n.dot,ownerState:o})]})};var h4=n(6593);function p4(e){return(0,Kt.Ay)("MuiRadio",e)}const f4=(0,nr.A)("MuiRadio",["root","checked","disabled","colorPrimary","colorSecondary","sizeSmall"]),g4=["checked","checkedIcon","color","icon","name","onChange","size","className"],m4=(0,In.Ay)(Y5,{shouldForwardProp:e=>(0,pr.A)(e)||"classes"===e,name:"MuiRadio",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"medium"!==n.size&&t["size".concat((0,Mn.A)(n.size))],t["color".concat((0,Mn.A)(n.color))]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,qt.A)({color:(t.vars||t).palette.text.secondary},!n.disableRipple&&{"&:hover":{backgroundColor:t.vars?"rgba(".concat("default"===n.color?t.vars.palette.action.activeChannel:t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,zi.X4)("default"===n.color?t.palette.action.active:t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==n.color&&{["&.".concat(f4.checked)]:{color:(t.vars||t).palette[n.color].main}},{["&.".concat(f4.disabled)]:{color:(t.vars||t).palette.action.disabled}})}));const v4=(0,Sn.jsx)(d4,{checked:!0}),y4=(0,Sn.jsx)(d4,{}),x4=r.forwardRef((function(e,t){var n,o;const i=(0,Tn.b)({props:e,name:"MuiRadio"}),{checked:a,checkedIcon:s=v4,color:l="primary",icon:c=y4,name:u,onChange:d,size:h="medium",className:p}=i,f=(0,Yt.A)(i,g4),g=(0,qt.A)({},i,{color:l,size:h}),m=(e=>{const{classes:t,color:n,size:r}=e,o={root:["root","color".concat((0,Mn.A)(n)),"medium"!==r&&"size".concat((0,Mn.A)(r))]};return(0,qt.A)({},t,(0,$t.A)(o,p4,t))})(g),v=r.useContext(D3);let y=a;const x=(0,h4.A)(d,v&&v.onChange);let b=u;var w,S;return v&&("undefined"===typeof y&&(w=v.value,y="object"===typeof(S=i.value)&&null!==S?w===S:String(w)===String(S)),"undefined"===typeof b&&(b=v.name)),(0,Sn.jsx)(m4,(0,qt.A)({type:"radio",icon:r.cloneElement(c,{fontSize:null!=(n=y4.props.fontSize)?n:h}),checkedIcon:r.cloneElement(s,{fontSize:null!=(o=v4.props.fontSize)?o:h}),ownerState:g,classes:m,name:b,checked:y,onChange:x,ref:t,className:(0,Zt.A)(m.root,p)},f))})),b4=x4,w4=(0,Ea.A)((0,Sn.jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"Person");var S4=n(8139),_4=n.n(S4);const A4=["xxl","xl","lg","md","sm","xs"],k4="xs",C4=r.createContext({prefixes:{},breakpoints:A4,minBreakpoint:k4}),{Consumer:M4,Provider:I4}=C4;function T4(e,t){const{prefixes:n}=(0,r.useContext)(C4);return e||n[t]||t}const D4=r.forwardRef(((e,t)=>{let{bsPrefix:n,className:r,striped:o,bordered:i,borderless:a,hover:s,size:l,variant:c,responsive:u,...d}=e;const h=T4(n,"table"),p=_4()(r,h,c&&"".concat(h,"-").concat(c),l&&"".concat(h,"-").concat(l),o&&"".concat(h,"-").concat("string"===typeof o?"striped-".concat(o):"striped"),i&&"".concat(h,"-bordered"),a&&"".concat(h,"-borderless"),s&&"".concat(h,"-hover")),f=(0,Sn.jsx)("table",{...d,className:p,ref:t});if(u){let e="".concat(h,"-responsive");return"string"===typeof u&&(e="".concat(e,"-").concat(u)),(0,Sn.jsx)("div",{className:e,children:f})}return f})),j4=D4,P4=!("undefined"===typeof window||!window.document||!window.document.createElement);var L4=!1,R4=!1;try{var E4={get passive(){return L4=!0},get once(){return R4=L4=!0}};P4&&(window.addEventListener("test",E4,E4),window.removeEventListener("test",E4,!0))}catch(Bk){}const N4=function(e,t,n,r){if(r&&"boolean"!==typeof r&&!R4){var o=r.once,i=r.capture,a=n;!R4&&o&&(a=n.__once||function e(r){this.removeEventListener(t,e,i),n.call(this,r)},n.__once=a),e.addEventListener(t,a,L4?r:i)}e.addEventListener(t,n,r)};function O4(e){return e&&e.ownerDocument||document}const z4=function(e,t,n,r){var o=r&&"boolean"!==typeof r?r.capture:r;e.removeEventListener(t,n,o),n.__once&&e.removeEventListener(t,n.__once,o)};var B4;function F4(e){if((!B4&&0!==B4||e)&&P4){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),B4=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return B4}const V4=function(e){const t=(0,r.useRef)(e);return(0,r.useEffect)((()=>{t.current=e}),[e]),t};function W4(e){const t=V4(e);return(0,r.useCallback)((function(){return t.current&&t.current(...arguments)}),[t])}const H4=e=>e&&"function"!==typeof e?t=>{e.current=t}:e;const G4=function(e,t){return(0,r.useMemo)((()=>function(e,t){const n=H4(e),r=H4(t);return e=>{n&&n(e),r&&r(e)}}(e,t)),[e,t])};function U4(e){const t=function(e){const t=(0,r.useRef)(e);return t.current=e,t}(e);(0,r.useEffect)((()=>()=>t.current()),[])}function X4(e,t){return function(e){var t=O4(e);return t&&t.defaultView||window}(e).getComputedStyle(e,t)}var Y4=/([A-Z])/g;var q4=/^ms-/;function Z4(e){return function(e){return e.replace(Y4,"-$1").toLowerCase()}(e).replace(q4,"-ms-")}var K4=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;const $4=function(e,t){var n="",r="";if("string"===typeof t)return e.style.getPropertyValue(Z4(t))||X4(e).getPropertyValue(Z4(t));Object.keys(t).forEach((function(o){var i=t[o];i||0===i?!function(e){return!(!e||!K4.test(e))}(o)?n+=Z4(o)+": "+i+";":r+=o+"("+i+") ":e.style.removeProperty(Z4(o))})),r&&(n+="transform: "+r+";"),e.style.cssText+=";"+n};const Q4=function(e,t,n,r){return N4(e,t,n,r),function(){z4(e,t,n,r)}};function J4(e,t,n){void 0===n&&(n=5);var r=!1,o=setTimeout((function(){r||function(e,t,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=!0),e){var o=document.createEvent("HTMLEvents");o.initEvent(t,n,r),e.dispatchEvent(o)}}(e,"transitionend",!0)}),t+n),i=Q4(e,"transitionend",(function(){r=!0}),{once:!0});return function(){clearTimeout(o),i()}}function e6(e,t,n,r){null==n&&(n=function(e){var t=$4(e,"transitionDuration")||"",n=-1===t.indexOf("ms")?1e3:1;return parseFloat(t)*n}(e)||0);var o=J4(e,n,r),i=Q4(e,"transitionend",t);return function(){o(),i()}}function t6(e){void 0===e&&(e=O4());try{var t=e.activeElement;return t&&t.nodeName?t:null}catch(Bk){return e.body}}function n6(e,t){return e.contains?e.contains(t):e.compareDocumentPosition?e===t||!!(16&e.compareDocumentPosition(t)):void 0}const r6=(o6="modal-open","".concat("data-rr-ui-").concat(o6));var o6;const i6=class{constructor(){let{ownerDocument:e,handleContainerOverflow:t=!0,isRTL:n=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.handleContainerOverflow=t,this.isRTL=n,this.modals=[],this.ownerDocument=e}getScrollbarWidth(){return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;const t=e.defaultView;return Math.abs(t.innerWidth-e.documentElement.clientWidth)}(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(e){}removeModalAttributes(e){}setContainerStyle(e){const t={overflow:"hidden"},n=this.isRTL?"paddingLeft":"paddingRight",r=this.getElement();e.style={overflow:r.style.overflow,[n]:r.style[n]},e.scrollBarWidth&&(t[n]="".concat(parseInt($4(r,n)||"0",10)+e.scrollBarWidth,"px")),r.setAttribute(r6,""),$4(r,t)}reset(){[...this.modals].forEach((e=>this.remove(e)))}removeContainerStyle(e){const t=this.getElement();t.removeAttribute(r6),Object.assign(t.style,e.style)}add(e){let t=this.modals.indexOf(e);return-1!==t?t:(t=this.modals.length,this.modals.push(e),this.setModalAttributes(e),0!==t||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),t)}remove(e){const t=this.modals.indexOf(e);-1!==t&&(this.modals.splice(t,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(e))}isTopModal(e){return!!this.modals.length&&this.modals[this.modals.length-1]===e}},a6=(0,r.createContext)(P4?window:void 0);a6.Provider;function s6(){return(0,r.useContext)(a6)}const l6=(e,t)=>P4?null==e?(t||O4()).body:("function"===typeof e&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null;const c6="undefined"!==typeof n.g&&n.g.navigator&&"ReactNative"===n.g.navigator.product,u6="undefined"!==typeof document||c6?r.useLayoutEffect:r.useEffect;const d6=function(e){let{children:t,in:n,onExited:o,mountOnEnter:i,unmountOnExit:a}=e;const s=(0,r.useRef)(null),l=(0,r.useRef)(n),c=W4(o);(0,r.useEffect)((()=>{n?l.current=!0:c(s.current)}),[n,c]);const u=G4(s,t.ref),d=(0,r.cloneElement)(t,{ref:u});return n?d:a||!l.current&&i?null:d};const h6=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children"];function p6(e){let{onEnter:t,onEntering:n,onEntered:o,onExit:i,onExiting:a,onExited:s,addEndListener:l,children:c}=e,u=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,h6);const{major:d}=function(){const e=r.version.split(".");return{major:+e[0],minor:+e[1],patch:+e[2]}}(),h=d>=19?c.props.ref:c.ref,p=(0,r.useRef)(null),f=G4(p,"function"===typeof c?null:h),g=e=>t=>{e&&p.current&&e(p.current,t)},m=(0,r.useCallback)(g(t),[t]),v=(0,r.useCallback)(g(n),[n]),y=(0,r.useCallback)(g(o),[o]),x=(0,r.useCallback)(g(i),[i]),b=(0,r.useCallback)(g(a),[a]),w=(0,r.useCallback)(g(s),[s]),S=(0,r.useCallback)(g(l),[l]);return Object.assign({},u,{nodeRef:p},t&&{onEnter:m},n&&{onEntering:v},o&&{onEntered:y},i&&{onExit:x},a&&{onExiting:b},s&&{onExited:w},l&&{addEndListener:S},{children:"function"===typeof c?(e,t)=>c(e,Object.assign({},t,{ref:f})):(0,r.cloneElement)(c,{ref:f})})}const f6=["component"];const g6=r.forwardRef(((e,t)=>{let{component:n}=e,r=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,f6);const o=p6(r);return(0,Sn.jsx)(n,Object.assign({ref:t},o))})),m6=g6;function v6(e){let{children:t,in:n,onExited:o,onEntered:i,transition:a}=e;const[s,l]=(0,r.useState)(!n);n&&s&&l(!1);const c=function(e){let{in:t,onTransition:n}=e;const o=(0,r.useRef)(null),i=(0,r.useRef)(!0),a=W4(n);return u6((()=>{if(!o.current)return;let e=!1;return a({in:t,element:o.current,initial:i.current,isStale:()=>e}),()=>{e=!0}}),[t,a]),u6((()=>(i.current=!1,()=>{i.current=!0})),[]),o}({in:!!n,onTransition:e=>{Promise.resolve(a(e)).then((()=>{e.isStale()||(e.in?null==i||i(e.element,e.initial):(l(!0),null==o||o(e.element)))}),(t=>{throw e.in||l(!0),t}))}}),u=G4(c,t.ref);return s&&!n?null:(0,r.cloneElement)(t,{ref:u})}function y6(e,t,n){return e?(0,Sn.jsx)(m6,Object.assign({},n,{component:e})):t?(0,Sn.jsx)(v6,Object.assign({},n,{transition:t})):(0,Sn.jsx)(d6,Object.assign({},n))}const x6=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];let b6;function w6(e){const t=s6(),n=e||function(e){return b6||(b6=new i6({ownerDocument:null==e?void 0:e.document})),b6}(t),o=(0,r.useRef)({dialog:null,backdrop:null});return Object.assign(o.current,{add:()=>n.add(o.current),remove:()=>n.remove(o.current),isTopModal:()=>n.isTopModal(o.current),setDialogRef:(0,r.useCallback)((e=>{o.current.dialog=e}),[]),setBackdropRef:(0,r.useCallback)((e=>{o.current.backdrop=e}),[])})}const S6=(0,r.forwardRef)(((e,t)=>{let{show:n=!1,role:o="dialog",className:i,style:a,children:s,backdrop:l=!0,keyboard:c=!0,onBackdropClick:u,onEscapeKeyDown:d,transition:h,runTransition:p,backdropTransition:f,runBackdropTransition:g,autoFocus:m=!0,enforceFocus:v=!0,restoreFocus:y=!0,restoreFocusOptions:x,renderDialog:b,renderBackdrop:w=(e=>(0,Sn.jsx)("div",Object.assign({},e))),manager:S,container:_,onShow:A,onHide:k=(()=>{}),onExit:C,onExited:M,onExiting:I,onEnter:T,onEntering:D,onEntered:j}=e,P=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,x6);const L=s6(),R=function(e,t){const n=s6(),[o,i]=(0,r.useState)((()=>l6(e,null==n?void 0:n.document)));if(!o){const t=l6(e);t&&i(t)}return(0,r.useEffect)((()=>{t&&o&&t(o)}),[t,o]),(0,r.useEffect)((()=>{const t=l6(e);t!==o&&i(t)}),[e,o]),o}(_),E=w6(S),N=function(){const e=(0,r.useRef)(!0),t=(0,r.useRef)((()=>e.current));return(0,r.useEffect)((()=>(e.current=!0,()=>{e.current=!1})),[]),t.current}(),O=function(e){const t=(0,r.useRef)(null);return(0,r.useEffect)((()=>{t.current=e})),t.current}(n),[z,B]=(0,r.useState)(!n),F=(0,r.useRef)(null);(0,r.useImperativeHandle)(t,(()=>E),[E]),P4&&!O&&n&&(F.current=t6(null==L?void 0:L.document)),n&&z&&B(!1);const V=W4((()=>{if(E.add(),Y.current=Q4(document,"keydown",U),X.current=Q4(document,"focus",(()=>setTimeout(H)),!0),A&&A(),m){var e,t;const n=t6(null!=(e=null==(t=E.dialog)?void 0:t.ownerDocument)?e:null==L?void 0:L.document);E.dialog&&n&&!n6(E.dialog,n)&&(F.current=n,E.dialog.focus())}})),W=W4((()=>{var e;(E.remove(),null==Y.current||Y.current(),null==X.current||X.current(),y)&&(null==(e=F.current)||null==e.focus||e.focus(x),F.current=null)}));(0,r.useEffect)((()=>{n&&R&&V()}),[n,R,V]),(0,r.useEffect)((()=>{z&&W()}),[z,W]),U4((()=>{W()}));const H=W4((()=>{if(!v||!N()||!E.isTopModal())return;const e=t6(null==L?void 0:L.document);E.dialog&&e&&!n6(E.dialog,e)&&E.dialog.focus()})),G=W4((e=>{e.target===e.currentTarget&&(null==u||u(e),!0===l&&k())})),U=W4((e=>{c&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&E.isTopModal()&&(null==d||d(e),e.defaultPrevented||k())})),X=(0,r.useRef)(),Y=(0,r.useRef)();if(!R)return null;const q=Object.assign({role:o,ref:E.setDialogRef,"aria-modal":"dialog"===o||void 0},P,{style:a,className:i,tabIndex:-1});let Z=b?b(q):(0,Sn.jsx)("div",Object.assign({},q,{children:r.cloneElement(s,{role:"document"})}));Z=y6(h,p,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:C,onExiting:I,onExited:function(){B(!0),null==M||M(...arguments)},onEnter:T,onEntering:D,onEntered:j,children:Z});let K=null;return l&&(K=w({ref:E.setBackdropRef,onClick:G}),K=y6(f,g,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:K})),(0,Sn.jsx)(Sn.Fragment,{children:St.createPortal((0,Sn.jsxs)(Sn.Fragment,{children:[K,Z]}),R)})}));S6.displayName="Modal";const _6=Object.assign(S6,{Manager:i6});var A6=Function.prototype.bind.call(Function.prototype.call,[].slice);function k6(e,t){return A6(e.querySelectorAll(t))}function C6(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}const M6=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",I6=".sticky-top",T6=".navbar-toggler";class D6 extends i6{adjustAndStore(e,t,n){const r=t.style[e];t.dataset[e]=r,$4(t,{[e]:"".concat(parseFloat($4(t,e))+n,"px")})}restore(e,t){const n=t.dataset[e];void 0!==n&&(delete t.dataset[e],$4(t,{[e]:n}))}setContainerStyle(e){super.setContainerStyle(e);const t=this.getElement();var n,r;if(r="modal-open",(n=t).classList?n.classList.add(r):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,r)||("string"===typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)),!e.scrollBarWidth)return;const o=this.isRTL?"paddingLeft":"paddingRight",i=this.isRTL?"marginLeft":"marginRight";k6(t,M6).forEach((t=>this.adjustAndStore(o,t,e.scrollBarWidth))),k6(t,I6).forEach((t=>this.adjustAndStore(i,t,-e.scrollBarWidth))),k6(t,T6).forEach((t=>this.adjustAndStore(i,t,e.scrollBarWidth)))}removeContainerStyle(e){super.removeContainerStyle(e);const t=this.getElement();var n,r;r="modal-open",(n=t).classList?n.classList.remove(r):"string"===typeof n.className?n.className=C6(n.className,r):n.setAttribute("class",C6(n.className&&n.className.baseVal||"",r));const o=this.isRTL?"paddingLeft":"paddingRight",i=this.isRTL?"marginLeft":"marginRight";k6(t,M6).forEach((e=>this.restore(o,e))),k6(t,I6).forEach((e=>this.restore(i,e))),k6(t,T6).forEach((e=>this.restore(i,e)))}}let j6;function P6(e,t){const n=$4(e,t)||"",r=-1===n.indexOf("ms")?1e3:1;return parseFloat(n)*r}function L6(e,t){const n=P6(e,"transitionDuration"),r=P6(e,"transitionDelay"),o=e6(e,(n=>{n.target===e&&(o(),t(n))}),n+r)}const R6=r.forwardRef(((e,t)=>{let{onEnter:n,onEntering:o,onEntered:i,onExit:a,onExiting:s,onExited:l,addEndListener:c,children:u,childRef:d,...h}=e;const p=(0,r.useRef)(null),f=G4(p,d),g=e=>{var t;f((t=e)&&"setState"in t?St.findDOMNode(t):null!=t?t:null)},m=e=>t=>{e&&p.current&&e(p.current,t)},v=(0,r.useCallback)(m(n),[n]),y=(0,r.useCallback)(m(o),[o]),x=(0,r.useCallback)(m(i),[i]),b=(0,r.useCallback)(m(a),[a]),w=(0,r.useCallback)(m(s),[s]),S=(0,r.useCallback)(m(l),[l]),_=(0,r.useCallback)(m(c),[c]);return(0,Sn.jsx)($o,{ref:t,...h,onEnter:v,onEntered:x,onEntering:y,onExit:b,onExited:S,onExiting:w,addEndListener:_,nodeRef:p,children:"function"===typeof u?(e,t)=>u(e,{...t,ref:g}):r.cloneElement(u,{ref:g})})})),E6=R6,N6={[Xo]:"show",[Yo]:"show"},O6=r.forwardRef(((e,t)=>{let{className:n,children:o,transitionClasses:i={},onEnter:a,...s}=e;const l={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...s},c=(0,r.useCallback)(((e,t)=>{!function(e){e.offsetHeight}(e),null==a||a(e,t)}),[a]);return(0,Sn.jsx)(E6,{ref:t,addEndListener:L6,...l,onEnter:c,childRef:o.ref,children:(e,t)=>r.cloneElement(o,{...t,className:_4()("fade",n,o.props.className,N6[e],i[e])})})}));O6.displayName="Fade";const z6=O6,B6=r.forwardRef(((e,t)=>{let{className:n,bsPrefix:r,as:o="div",...i}=e;return r=T4(r,"modal-body"),(0,Sn.jsx)(o,{ref:t,className:_4()(n,r),...i})}));B6.displayName="ModalBody";const F6=B6,V6=r.createContext({onHide(){}}),W6=r.forwardRef(((e,t)=>{let{bsPrefix:n,className:r,contentClassName:o,centered:i,size:a,fullscreen:s,children:l,scrollable:c,...u}=e;n=T4(n,"modal");const d="".concat(n,"-dialog"),h="string"===typeof s?"".concat(n,"-fullscreen-").concat(s):"".concat(n,"-fullscreen");return(0,Sn.jsx)("div",{...u,ref:t,className:_4()(d,r,a&&"".concat(n,"-").concat(a),i&&"".concat(d,"-centered"),c&&"".concat(d,"-scrollable"),s&&h),children:(0,Sn.jsx)("div",{className:_4()("".concat(n,"-content"),o),children:l})})}));W6.displayName="ModalDialog";const H6=W6,G6=r.forwardRef(((e,t)=>{let{className:n,bsPrefix:r,as:o="div",...i}=e;return r=T4(r,"modal-footer"),(0,Sn.jsx)(o,{ref:t,className:_4()(n,r),...i})}));G6.displayName="ModalFooter";const U6=G6;var X6=n(5173),Y6=n.n(X6);const q6={"aria-label":Y6().string,onClick:Y6().func,variant:Y6().oneOf(["white"])},Z6=r.forwardRef(((e,t)=>{let{className:n,variant:r,"aria-label":o="Close",...i}=e;return(0,Sn.jsx)("button",{ref:t,type:"button",className:_4()("btn-close",r&&"btn-close-".concat(r),n),"aria-label":o,...i})}));Z6.displayName="CloseButton",Z6.propTypes=q6;const K6=Z6,$6=r.forwardRef(((e,t)=>{let{closeLabel:n="Close",closeVariant:o,closeButton:i=!1,onHide:a,children:s,...l}=e;const c=(0,r.useContext)(V6),u=W4((()=>{null==c||c.onHide(),null==a||a()}));return(0,Sn.jsxs)("div",{ref:t,...l,children:[s,i&&(0,Sn.jsx)(K6,{"aria-label":n,variant:o,onClick:u})]})})),Q6=r.forwardRef(((e,t)=>{let{bsPrefix:n,className:r,closeLabel:o="Close",closeButton:i=!1,...a}=e;return n=T4(n,"modal-header"),(0,Sn.jsx)($6,{ref:t,...a,className:_4()(r,n),closeLabel:o,closeButton:i})}));Q6.displayName="ModalHeader";const J6=Q6,e8=(t8="h4",r.forwardRef(((e,t)=>(0,Sn.jsx)("div",{...e,ref:t,className:_4()(e.className,t8)}))));var t8;const n8=r.forwardRef(((e,t)=>{let{className:n,bsPrefix:r,as:o=e8,...i}=e;return r=T4(r,"modal-title"),(0,Sn.jsx)(o,{ref:t,className:_4()(n,r),...i})}));n8.displayName="ModalTitle";const r8=n8;function o8(e){return(0,Sn.jsx)(z6,{...e,timeout:null})}function i8(e){return(0,Sn.jsx)(z6,{...e,timeout:null})}const a8=r.forwardRef(((e,t)=>{let{bsPrefix:n,className:o,style:i,dialogClassName:a,contentClassName:s,children:l,dialogAs:c=H6,"data-bs-theme":u,"aria-labelledby":d,"aria-describedby":h,"aria-label":p,show:f=!1,animation:g=!0,backdrop:m=!0,keyboard:v=!0,onEscapeKeyDown:y,onShow:x,onHide:b,container:w,autoFocus:S=!0,enforceFocus:_=!0,restoreFocus:A=!0,restoreFocusOptions:k,onEntered:C,onExit:M,onExiting:I,onEnter:T,onEntering:D,onExited:j,backdropClassName:P,manager:L,...R}=e;const[E,N]=(0,r.useState)({}),[O,z]=(0,r.useState)(!1),B=(0,r.useRef)(!1),F=(0,r.useRef)(!1),V=(0,r.useRef)(null),[W,H]=(0,r.useState)(null),G=G4(t,H),U=W4(b),X=function(){const{dir:e}=(0,r.useContext)(C4);return"rtl"===e}();n=T4(n,"modal");const Y=(0,r.useMemo)((()=>({onHide:U})),[U]);function q(){return L||function(e){return j6||(j6=new D6(e)),j6}({isRTL:X})}function Z(e){if(!P4)return;const t=q().getScrollbarWidth()>0,n=e.scrollHeight>O4(e).documentElement.clientHeight;N({paddingRight:t&&!n?F4():void 0,paddingLeft:!t&&n?F4():void 0})}const K=W4((()=>{W&&Z(W.dialog)}));U4((()=>{z4(window,"resize",K),null==V.current||V.current()}));const $=()=>{B.current=!0},Q=e=>{B.current&&W&&e.target===W.dialog&&(F.current=!0),B.current=!1},J=()=>{z(!0),V.current=e6(W.dialog,(()=>{z(!1)}))},ee=e=>{"static"!==m?F.current||e.target!==e.currentTarget?F.current=!1:null==b||b():(e=>{e.target===e.currentTarget&&J()})(e)},te=(0,r.useCallback)((e=>(0,Sn.jsx)("div",{...e,className:_4()("".concat(n,"-backdrop"),P,!g&&"show")})),[g,P,n]),ne={...i,...E};ne.display="block";return(0,Sn.jsx)(V6.Provider,{value:Y,children:(0,Sn.jsx)(_6,{show:f,ref:G,backdrop:m,container:w,keyboard:!0,autoFocus:S,enforceFocus:_,restoreFocus:A,restoreFocusOptions:k,onEscapeKeyDown:e=>{v?null==y||y(e):(e.preventDefault(),"static"===m&&J())},onShow:x,onHide:b,onEnter:(e,t)=>{e&&Z(e),null==T||T(e,t)},onEntering:(e,t)=>{null==D||D(e,t),N4(window,"resize",K)},onEntered:C,onExit:e=>{null==V.current||V.current(),null==M||M(e)},onExiting:I,onExited:e=>{e&&(e.style.display=""),null==j||j(e),z4(window,"resize",K)},manager:q(),transition:g?o8:void 0,backdropTransition:g?i8:void 0,renderBackdrop:te,renderDialog:e=>(0,Sn.jsx)("div",{role:"dialog",...e,style:ne,className:_4()(o,n,O&&"".concat(n,"-static"),!g&&"show"),onClick:m?ee:void 0,onMouseUp:Q,"data-bs-theme":u,"aria-label":p,"aria-labelledby":d,"aria-describedby":h,children:(0,Sn.jsx)(c,{...R,onMouseDown:$,className:a,contentClassName:s,children:l})})})})}));a8.displayName="Modal";const s8=Object.assign(a8,{Body:F6,Header:J6,Title:r8,Footer:U6,Dialog:H6,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150});function l8(e){let{node:t}=e;const n=(0,r.useRef)(null);return(0,r.useEffect)((()=>{if(null!=n.current){const e=function(e){var t=0;const n=[],r=[],o=[],i=[];for(e.uid=t++,n.push([e,0]);n.length>0;){const e=n.shift();if(null!=e){var a,s;const o=e[0],i=e[1];r.length===i&&r.push([]),null===(a=r[i])||void 0===a||a.push(o),null===(s=o.parents)||void 0===s||s.forEach((e=>{e.uid=t++,n.push([e,i+1])}))}}const l=r.reduce(((e,t)=>t.length>e?t.length:e),0),c=r.length,u=10*l;return r.forEach(((e,t)=>{const n=u/e.length;e.forEach(((e,r)=>{var a;const s=r*n,l=10*(c-t);i.push({x:s,y:l,name:e.uid+"",value:e.value,itemStyle:{borderColor:"boolean"!==typeof e.value||e.value?"green":"red",color:"white"},label:{formatter:null!=e.parents?e.operator:e.message}}),null===(a=e.parents)||void 0===a||a.forEach((t=>{o.push({source:t.uid+"",target:e.uid+"",value:t.value,lineStyle:{color:"boolean"!==typeof t.value||t.value?"green":"red"},label:{show:!0,formatter:"number"===typeof t.value?t.value.toFixed(3):t.value+""}})}))}))})),{title:{text:"Basic Graph"},tooltip:{},animationDurationUpdate:1500,animationEasingUpdate:"quinticInOut",series:[{type:"graph",layout:"none",symbolSize:50,roam:!0,label:{show:!0},edgeSymbol:["circle","arrow"],edgeSymbolSize:[4,10],edgeLabel:{fontSize:20},data:i,links:o,lineStyle:{opacity:.9,width:2,curveness:0}}]}}(t);ZT(n.current).setOption(e)}})),(0,Sn.jsx)("div",{ref:n,style:{width:"80vw",height:"80vh"}})}function c8(e){let{symbol:t,strategy:n}=e;const[o,i]=(0,r.useState)(!0),[a,s]=(0,r.useState)(null),[l,c]=(0,r.useState)(null),[u,d]=(0,r.useState)(El());if((0,r.useEffect)((()=>{if(null==a){const e=new AbortController,r=e.signal;return i(!0),async function(e,t,n,r){const o="".concat(xl,"/inspect?command=get&symbol=").concat(e,"&date=").concat(n,"&strategy=").concat(t),i=await Cl(o,r);return"err"in i?i:i instanceof Array?i.map((e=>({...e,graph:JSON.parse(e.graph)}))):{err:"no key named data found"}}(t,n,u,r).then((e=>{s(e),i(!1)})),()=>{e.abort()}}}),[t,n,u,a]),o)return(0,Sn.jsx)($c,{});var h;if(null==a)h=(0,Sn.jsx)("p",{children:"no data"});else if("err"in a){const e="string"!==typeof a.err?a.err+"":a.err;h=(0,Sn.jsx)("p",{children:e})}else h=(0,Sn.jsx)(Sn.Fragment,{children:(0,Sn.jsxs)(j4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,Sn.jsx)("thead",{children:(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:"Symbol"}),(0,Sn.jsx)("td",{children:"Strategy"}),(0,Sn.jsx)("td",{children:"Time"}),(0,Sn.jsx)("td",{children:"Activated"}),(0,Sn.jsx)("td",{children:"Message"})]})}),(0,Sn.jsx)("tbody",{children:a.map((e=>(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:e.symbol}),(0,Sn.jsx)("td",{children:e.strategy}),(0,Sn.jsx)("td",{children:Ml.format(e.timestamp)}),(0,Sn.jsx)("td",{style:{color:1===e.activated?"green":"red"},children:1===e.activated?"True":"False"}),(0,Sn.jsx)("td",{children:null==e.graph.parents?e.graph.message:(0,Sn.jsxs)(Sn.Fragment,{children:[e.graph.operator,(0,Sn.jsx)(Vs,{onClick:()=>c(e.graph),children:"Check"})]})})]},e.symbol+e.strategy+e.timestamp)))})]})});return(0,Sn.jsxs)("div",{style:{width:"100%"},children:[(0,Sn.jsx)("input",{type:"date",value:u,onChange:e=>d(e.target.value)}),(0,Sn.jsx)(Vs,{onClick:()=>{s(null)},children:"Refresh"}),h,(0,Sn.jsxs)(s8,{show:null!=l,onHide:()=>c(null),fullscreen:!0,children:[(0,Sn.jsx)(s8.Header,{closeButton:!0,children:(0,Sn.jsx)(s8.Title,{children:"Inspect"})}),(0,Sn.jsx)(s8.Body,{children:null!=l&&(0,Sn.jsx)(l8,{node:l})})]})]})}const u8=["\u65f6\u95f4","\u5408\u7ea6","\u65b9\u5411","\u4e70\u5165\u4ef7","\u6570\u91cf","\u5356\u51fa\u4ef7","\u4e70\u5165\u65f6\u95f4","\u6210\u672c","\u6536\u76ca","\u6536\u76ca\u7387","\u5356\u51fa\u6761\u4ef6"],d8=["\u65f6\u95f4","\u6807\u7684","\u7b56\u7565","\u5408\u7ea6","\u65b9\u5411","\u4e70\u5165\u4ef7","\u6570\u91cf","\u5356\u51fa\u4ef7","\u4e70\u5165\u65f6\u95f4","\u6210\u672c","\u6536\u76ca","\u6536\u76ca\u7387","\u5356\u51fa\u6761\u4ef6"];function h8(e,t){return p8(e,t)}function p8(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const o=e.buySignal.symbol+e.buySignal.strategy+e.timestamp+e.symbol+e.isSell+e.timestamp,i=e.buySignal.extra&&e.buySignal.extra.betPercent&&"("+e.buySignal.extra.betPercent.toFixed(2)+")"||"",a=e.isSell?"\u6e05\u4ed3":"\u5f00\u4ed3",s=(!0===e.reverse?!e.isSell:e.isSell)?"\u5356":"\u4e70",l=!0===e.reverse?"".concat(s,"|").concat(a):s;return(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:Kl(e.timestamp)}),n&&(0,Sn.jsx)("td",{children:e.buySignal.symbol}),r&&(0,Sn.jsx)("td",{children:e.buySignal.strategy}),(0,Sn.jsx)("td",{children:(0,Sn.jsx)(Vt,{to:"/option/".concat(e.symbol,"/").concat(El(e.buySignal.timestamp),"?").concat(t),children:e.symbol})}),(0,Sn.jsx)("td",{children:"".concat(l).concat(i)}),(0,Sn.jsx)("td",{children:(e.isSell?e.buyPrice:e.price).toFixed(2)}),(0,Sn.jsx)("td",{children:e.volume.toLocaleString()}),(0,Sn.jsx)("td",{children:e.isSell?e.price.toFixed(2):"-"}),(0,Sn.jsx)("td",{children:Kl(e.isSell?e.buyTimestamp:e.buySignal.timestamp)}),(0,Sn.jsx)("td",{children:e.isSell?(e.buyPrice*e.volume).toLocaleString():"-"}),(0,Sn.jsx)("td",{children:e.isSell?((e.price-e.buyPrice)*e.volume*(!0===e.reverse?-1:1)).toLocaleString():"-"}),(0,Sn.jsx)("td",{children:e.isSell?((e.price-e.buyPrice)*(!0===e.reverse?-1:1)/e.buyPrice*100).toFixed(2)+"%":"-"}),(0,Sn.jsx)("td",{children:e.isSell?e.sellSignal.subtype:e.buySignal.subtype})]},o)}function f8(e){let t=e.data,n=null!=e.names?e.names:u8,r=null!=e.converter?e.converter:h8;var o=0,i=0,a=0,s=0,l=0;const c=t.flatMap(((t,c)=>{let u=[];const d=t[0].symbol+t[0].strategy+t[0].timestamp;var h=0,p=0,f=0,g=0,m=null;const v=new Map;if(t[1].forEach((e=>{const t=e.symbol;v.has(t)||v.set(t,[]),v.get(t).push([e.timestamp,e.isSell])})),t[1].forEach((t=>{if(t.isSell){h+=t.volume*t.buyPrice,p+=(t.price-t.buyPrice)*t.volume*(!0===t.reverse?-1:1);const n=Qs(t.symbol),r=null!=e.feeRate?e.feeRate:el(n),o=!0!==t.reverse&&t.price<Js?0:r;f+=-o*t.volume,m=[6e4*Math.floor(t.buyTimestamp/6e4),6e4*Math.floor(t.timestamp/6e4),t.symbol.length>9?"C"===t.symbol[t.symbol.length-9]:"TQQQ"===t.symbol]}const n=new URLSearchParams;v.has(t.symbol)&&n.set("points",JSON.stringify(v.get(t.symbol))),u.push(r(t,n.toString()))})),null!=e.dataMap&&null!=m){var y,x;const t=null===(y=e.dataMap)||void 0===y?void 0:y.get(m[0]),n=null===(x=e.dataMap)||void 0===x?void 0:x.get(m[1]);null!=t&&null!=n&&t>0&&(g=(m[2]?1:-1)*(n-t)/t,s+=g)}return o+=h,i+=p,a+=f,l+=(p+f)/h,u.push((0,Sn.jsx)("tr",{children:n.map((e=>{if("\u65f6\u95f4"===e)return(0,Sn.jsx)("td",{children:"\u5c0f\u8ba1"},e);if("\u6210\u672c"===e)return(0,Sn.jsx)("td",{children:h.toLocaleString()},e);if("\u6536\u76ca"===e)return(0,Sn.jsxs)("td",{children:[(p+f).toLocaleString(),"(",p.toLocaleString(),"|",f.toLocaleString(),")"]},e);if("\u6536\u76ca\u7387"===e){if(h>0){const t=((p+f)/h*100).toFixed(2)+"%",n=(f/h*100).toFixed(2)+"%",r=(p/h*100).toFixed(2)+"%";return(0,Sn.jsxs)("td",{children:[t,"(",r,"|",n,")"]},e)}return(0,Sn.jsx)("td",{children:"0"},e)}return"\u5356\u51fa\u6761\u4ef6"===e?(0,Sn.jsxs)("td",{children:["gain:",(100*g).toFixed(2)+"%"]},e):(0,Sn.jsx)("td",{children:"-"},e)}))},d)),u}));return(0,Sn.jsx)("div",{style:{width:"100%"},children:(0,Sn.jsxs)(j4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,Sn.jsx)("thead",{children:(0,Sn.jsx)("tr",{children:n.map((e=>(0,Sn.jsx)("td",{children:e},e)))})}),(0,Sn.jsxs)("tbody",{children:[c,(0,Sn.jsx)("tr",{children:n.map((t=>{if("\u65f6\u95f4"===t)return(0,Sn.jsx)("td",{children:"\u603b\u8ba1"},t);if("\u6210\u672c"===t)return(0,Sn.jsx)("td",{children:o.toLocaleString()},t);if("\u6536\u76ca"===t)return(0,Sn.jsxs)("td",{children:[i.toLocaleString(),"(",a.toLocaleString(),")"]},t);if("\u6536\u76ca\u7387"===t){if(o>0){const e=((i+a)/o*100).toFixed(2)+"%",n=(a/o*100).toFixed(2)+"%";return(0,Sn.jsxs)("td",{children:[e,"(",n,")"]},t)}return(0,Sn.jsx)("td",{children:"0"},t)}return"\u5356\u51fa\u6761\u4ef6"===t&&!0===e.addPercent?(0,Sn.jsxs)("td",{children:[(100*l).toFixed(2)+"%","(gain:",(100*s).toFixed(2)+"%",")"]},t):(0,Sn.jsx)("td",{children:"-"},t)}))},"sumary")]})]})})}function g8(e){let{data:t,addPercent:n,aggs:r,feeRate:o}=e;const i=new Map;return null===r||void 0===r||r.forEach((e=>{const t=6e4*Math.floor(e.t/6e4);i.set(t,e.c)})),(0,Sn.jsx)(f8,{data:t,names:d8,addPercent:n,converter:(e,t)=>p8(e,t,!0,!0),dataMap:i,feeRate:o})}const m8=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:o,open:i,resumeHideDuration:a}=e,s=(0,Bo.A)();r.useEffect((()=>{if(i)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){e.defaultPrevented||"Escape"!==e.key&&"Esc"!==e.key||null==o||o(e,"escapeKeyDown")}}),[i,o]);const l=(0,_i.A)(((e,t)=>{null==o||o(e,t)})),c=(0,_i.A)((e=>{o&&null!=e&&s.start(e,(()=>{l(null,"timeout")}))}));r.useEffect((()=>(i&&c(t),s.clear)),[i,t,c,s]);const u=s.clear,d=r.useCallback((()=>{null!=t&&c(null!=a?a:.5*t)}),[t,a,c]),h=e=>t=>{const n=e.onFocus;null==n||n(t),u()},p=e=>t=>{const n=e.onMouseEnter;null==n||n(t),u()},f=e=>t=>{const n=e.onMouseLeave;null==n||n(t),d()};return r.useEffect((()=>{if(!n&&i)return window.addEventListener("focus",d),window.addEventListener("blur",u),()=>{window.removeEventListener("focus",d),window.removeEventListener("blur",u)}}),[n,i,d,u]),{getRootProps:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=(0,qt.A)({},mo(e),mo(t));return(0,qt.A)({role:"presentation"},t,n,{onBlur:(r=n,e=>{const t=r.onBlur;null==t||t(e),d()}),onFocus:h(n),onMouseEnter:p(n),onMouseLeave:f(n)});var r},onClickAway:e=>{null==o||o(e,"clickaway")}}};function v8(e){return e.substring(2).toLowerCase()}function y8(e){const{children:t,disableReactTree:n=!1,mouseEvent:o="onClick",onClickAway:i,touchEvent:a="onTouchEnd"}=e,s=r.useRef(!1),l=r.useRef(null),c=r.useRef(!1),u=r.useRef(!1);r.useEffect((()=>(setTimeout((()=>{c.current=!0}),0),()=>{c.current=!1})),[]);const d=(0,En.A)(t.ref,l),h=(0,_i.A)((e=>{const t=u.current;u.current=!1;const r=(0,si.A)(l.current);if(!c.current||!l.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}(e,r))return;if(s.current)return void(s.current=!1);let o;o=e.composedPath?e.composedPath().indexOf(l.current)>-1:!r.documentElement.contains(e.target)||l.current.contains(e.target),o||!n&&t||i(e)})),p=e=>n=>{u.current=!0;const r=t.props[e];r&&r(n)},f={ref:d};return!1!==a&&(f[a]=p(a)),r.useEffect((()=>{if(!1!==a){const e=v8(a),t=(0,si.A)(l.current),n=()=>{s.current=!0};return t.addEventListener(e,h),t.addEventListener("touchmove",n),()=>{t.removeEventListener(e,h),t.removeEventListener("touchmove",n)}}}),[h,a]),!1!==o&&(f[o]=p(o)),r.useEffect((()=>{if(!1!==o){const e=v8(o),t=(0,si.A)(l.current);return t.addEventListener(e,h),()=>{t.removeEventListener(e,h)}}}),[h,o]),(0,Sn.jsx)(r.Fragment,{children:r.cloneElement(t,f)})}function x8(e){return(0,Kt.Ay)("MuiSnackbarContent",e)}(0,nr.A)("MuiSnackbarContent",["root","message","action"]);const b8=["action","className","message","role"],w8=(0,In.Ay)(Gi,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t}=e;const n="light"===t.palette.mode?.8:.98,r=(0,zi.tL)(t.palette.background.default,n);return(0,qt.A)({},t.typography.body2,{color:t.vars?t.vars.palette.SnackbarContent.color:t.palette.getContrastText(r),backgroundColor:t.vars?t.vars.palette.SnackbarContent.bg:r,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,flexGrow:1,[t.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})})),S8=(0,In.Ay)("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),_8=(0,In.Ay)("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),A8=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiSnackbarContent"}),{action:r,className:o,message:i,role:a="alert"}=n,s=(0,Yt.A)(n,b8),l=n,c=(e=>{const{classes:t}=e;return(0,$t.A)({root:["root"],action:["action"],message:["message"]},x8,t)})(l);return(0,Sn.jsxs)(w8,(0,qt.A)({role:a,square:!0,elevation:6,className:(0,Zt.A)(c.root,o),ownerState:l,ref:t},s,{children:[(0,Sn.jsx)(S8,{className:c.message,ownerState:l,children:i}),r?(0,Sn.jsx)(_8,{className:c.action,ownerState:l,children:r}):null]}))})),k8=A8;function C8(e){return(0,Kt.Ay)("MuiSnackbar",e)}(0,nr.A)("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const M8=["onEnter","onExited"],I8=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],T8=(0,In.Ay)("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["anchorOrigin".concat((0,Mn.A)(n.anchorOrigin.vertical)).concat((0,Mn.A)(n.anchorOrigin.horizontal))]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,qt.A)({zIndex:(t.vars||t).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},"top"===n.anchorOrigin.vertical?{top:8}:{bottom:8},"left"===n.anchorOrigin.horizontal&&{justifyContent:"flex-start"},"right"===n.anchorOrigin.horizontal&&{justifyContent:"flex-end"},{[t.breakpoints.up("sm")]:(0,qt.A)({},"top"===n.anchorOrigin.vertical?{top:24}:{bottom:24},"center"===n.anchorOrigin.horizontal&&{left:"50%",right:"auto",transform:"translateX(-50%)"},"left"===n.anchorOrigin.horizontal&&{left:24,right:"auto"},"right"===n.anchorOrigin.horizontal&&{right:24,left:"auto"})})})),D8=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiSnackbar"}),o=Qo(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{action:a,anchorOrigin:{vertical:s,horizontal:l}={vertical:"bottom",horizontal:"left"},autoHideDuration:c=null,children:u,className:d,ClickAwayListenerProps:h,ContentProps:p,disableWindowBlurListener:f=!1,message:g,open:m,TransitionComponent:v=ai,transitionDuration:y=i,TransitionProps:{onEnter:x,onExited:b}={}}=n,w=(0,Yt.A)(n.TransitionProps,M8),S=(0,Yt.A)(n,I8),_=(0,qt.A)({},n,{anchorOrigin:{vertical:s,horizontal:l},autoHideDuration:c,disableWindowBlurListener:f,TransitionComponent:v,transitionDuration:y}),A=(e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root","anchorOrigin".concat((0,Mn.A)(n.vertical)).concat((0,Mn.A)(n.horizontal))]};return(0,$t.A)(r,C8,t)})(_),{getRootProps:k,onClickAway:C}=m8((0,qt.A)({},_)),[M,I]=r.useState(!0),T=wo({elementType:T8,getSlotProps:k,externalForwardedProps:S,ownerState:_,additionalProps:{ref:t},className:[A.root,d]});return!m&&M?null:(0,Sn.jsx)(y8,(0,qt.A)({onClickAway:C},h,{children:(0,Sn.jsx)(T8,(0,qt.A)({},T,{children:(0,Sn.jsx)(v,(0,qt.A)({appear:!0,in:m,timeout:y,direction:"top"===s?"down":"up",onEnter:(e,t)=>{I(!1),x&&x(e,t)},onExited:e=>{I(!0),b&&b(e)}},w,{children:u||(0,Sn.jsx)(k8,(0,qt.A)({message:g,action:a},p))}))}))}))})),j8=D8;function P8(e){return(0,Sn.jsx)(j8,{anchorOrigin:{vertical:"bottom",horizontal:"center"},open:!0,autoHideDuration:2e3,onClose:()=>{e.cb()},message:e.msg})}const L8=["className","component"];var R8=n(9386),E8=n(7344);const N8=(0,nr.A)("MuiBox",["root"]),O8=(0,E8.A)(),z8=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n,defaultClassName:o="MuiBox-root",generateClassName:i}=e,a=(0,ln.default)("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(un.A),s=r.forwardRef((function(e,r){const s=an(n),l=(0,E3.A)(e),{className:c,component:u="div"}=l,d=(0,Yt.A)(l,L8);return(0,Sn.jsx)(a,(0,qt.A)({as:u,ref:r,className:(0,Zt.A)(c,i?i(o):o),theme:t&&s[t]||s},d))}));return s}({themeId:Qn.A,defaultTheme:O8,defaultClassName:N8.root,generateClassName:R8.A.generate}),B8=z8;const F8=(0,nr.A)("MuiListItemIcon",["root","alignItemsFlexStart"]);function V8(e){return(0,Kt.Ay)("MuiListItemText",e)}const W8=(0,nr.A)("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function H8(e){return(0,Kt.Ay)("MuiMenuItem",e)}const G8=(0,nr.A)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),U8=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],X8=(0,In.Ay)(Ds,{shouldForwardProp:e=>(0,pr.A)(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((e=>{let{theme:t,ownerState:n}=e;return(0,qt.A)({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!n.disableGutters&&{paddingLeft:16,paddingRight:16},n.divider&&{borderBottom:"1px solid ".concat((t.vars||t).palette.divider),backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(G8.selected)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,zi.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),["&.".concat(G8.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,zi.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},["&.".concat(G8.selected,":hover")]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,zi.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,zi.X4)(t.palette.primary.main,t.palette.action.selectedOpacity)}},["&.".concat(G8.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat(G8.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity},["& + .".concat(y3.root)]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},["& + .".concat(y3.inset)]:{marginLeft:52},["& .".concat(W8.root)]:{marginTop:0,marginBottom:0},["& .".concat(W8.inset)]:{paddingLeft:36},["& .".concat(F8.root)]:{minWidth:36}},!n.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},n.dense&&(0,qt.A)({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{["& .".concat(F8.root," svg")]:{fontSize:"1.25rem"}}))})),Y8=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiMenuItem"}),{autoFocus:o=!1,component:i="li",dense:a=!1,divider:s=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:d,className:h}=n,p=(0,Yt.A)(n,U8),f=r.useContext(So),g=r.useMemo((()=>({dense:a||f.dense||!1,disableGutters:l})),[f.dense,a,l]),m=r.useRef(null);(0,qn.A)((()=>{o&&m.current&&m.current.focus()}),[o]);const v=(0,qt.A)({},n,{dense:g.dense,divider:s,disableGutters:l}),y=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:a}=e,s={root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},l=(0,$t.A)(s,H8,a);return(0,qt.A)({},a,l)})(n),x=(0,Yn.A)(m,t);let b;return n.disabled||(b=void 0!==d?d:-1),(0,Sn.jsx)(So.Provider,{value:g,children:(0,Sn.jsx)(X8,(0,qt.A)({ref:x,role:u,tabIndex:b,component:i,focusVisibleClassName:(0,Zt.A)(y.focusVisible,c),className:(0,Zt.A)(y.root,h)},p,{ownerState:v,classes:y}))})})),q8=Y8,Z8={PaperProps:{style:{maxHeight:224,width:250}}};function K8(e,t,n){return{fontWeight:-1===t.indexOf(e)?n.typography.fontWeightRegular:n.typography.fontWeightMedium}}function $8(e){const t=Qo(),{data:n,select:o,selected:i}=e,[a,s]=r.useState(i||[]);(0,r.useEffect)((()=>{if(null!=i){const e=new Set(n.map((e=>"string"===typeof e?e:e[0])));null!=i.find((t=>!e.has(t)))&&s([])}}),[n,i]);return(0,Sn.jsx)("div",{children:(0,Sn.jsxs)(ro,{sx:{m:1,width:300},children:[(0,Sn.jsx)($r,{id:"demo-multiple-chip-label",children:"Chip"}),(0,Sn.jsx)(Ga,{labelId:"demo-multiple-chip-label",id:"demo-multiple-chip",multiple:!0,value:a,onChange:e=>{const{target:{value:t}}=e,n="string"===typeof t?t.split(","):t;s(n),o(n)},input:(0,Sn.jsx)(Br,{id:"select-multiple-chip",label:"Chip"}),renderValue:e=>(0,Sn.jsx)(B8,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:e.map((e=>(0,Sn.jsx)(a5,{label:e},e)))}),MenuProps:Z8,children:n.map((e=>{var n,r=null;return"string"===typeof e?n=e:(n=e[0],r=e[1]),(0,Sn.jsx)(q8,{value:n,style:K8(n,a,t),children:null==r?n:"".concat(n,"-").concat(r)},n)}))})]})})}function Q8(e){const{type:t,value:n}=e,[o,i]=(0,r.useState)(n+"");return(0,r.useEffect)((()=>{i(n)}),[n]),(0,Sn.jsx)("input",{..."number"===t?{step:"0.0001"}:{},type:t,value:o+"",onChange:r=>{const o=r.target.value;if("number"===t){const t=parseFloat(r.target.value),a=n;isNaN(t)||(i(o),Math.abs(a-t)>1e-9&&e.handleUpdate(t))}else e.handleUpdate(o),i(o)}})}function J8(e){return(0,Sn.jsx)(Sn.Fragment,{children:e.params.map((t=>{const n=t.alternatives;return(0,Sn.jsxs)("div",{children:[(0,Sn.jsxs)("span",{children:[t.name,": "]}),null!=n&&"string"===typeof t.default?n[0]?(0,Sn.jsx)($8,{data:n[1],selected:t.default.length>0?t.default.split(","):[],select:n=>{e.handleConfig([t.key,n.join(",")])}}):(0,Sn.jsxs)(Ga,{value:t.default,onChange:n=>{e.handleConfig([t.key,n.target.value])},children:[(0,Sn.jsx)(q8,{value:"",children:(0,Sn.jsx)("em",{children:"None"})}),n[1].map((e=>(0,Sn.jsx)(q8,{value:e,children:e},e)))]}):(0,Sn.jsx)(Q8,{type:t.type,value:t.default,handleUpdate:n=>e.handleConfig([t.key,n])})]},t.key)}))})}function e7(e){return e.filter((e=>"includeEndDay"===e.key&&1===e.default)).length>0}function t7(e){let{taskConfigs:t,taskConfig:n,setTaskConfig:r,selectable:o,realTime:i}=e;return(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsxs)("div",{style:{margin:"1rem"},children:[(0,Sn.jsx)("span",{children:"Input Stock: "}),(0,Sn.jsx)("input",{value:n.stock,disabled:!1===o,onChange:e=>{r((t=>({...t,stock:e.target.value})))}})]}),(0,Sn.jsx)(_3,{}),(0,Sn.jsxs)("div",{style:{margin:"1rem"},children:[(0,Sn.jsx)("span",{children:"Select Buy Strategy: "}),(0,Sn.jsx)("select",{value:n.buyAlgorithm,onChange:e=>{if(!1!==o){const n=e.target.value,o=t.filter((e=>e.id===n));1===o.length&&r((e=>({...e,buyAlgorithm:n,buyParams:o[0].params,sellParamsEnd:e7(o[0].params)?e.sellParams:void 0})))}},children:!1!==o?t.filter((e=>e.isBuy)).map((e=>(0,Sn.jsx)("option",{value:e.id,children:e.name},e.id))):(0,Sn.jsx)("option",{value:n.buyAlgorithm,children:n.buyAlgorithm})})]}),(0,Sn.jsx)(J8,{params:n.buyParams.filter((e=>!0===i?null==e.realTime||1===e.realTime:null==e.realTime||0===e.realTime)),handleConfig:e=>{r((t=>{const n=t.buyParams.map((t=>e[0]===t.key?{...t,default:e[1]}:t));return{...t,buyParams:n,sellParamsEnd:e7(n)?t.sellParams:void 0}}))}}),(0,Sn.jsx)(_3,{}),(0,Sn.jsxs)("div",{style:{margin:"1rem"},children:[(0,Sn.jsx)("span",{children:"Select Sell Strategy: "}),(0,Sn.jsx)("select",{value:n.sellAlgorithm,onChange:e=>{if(!1!==o){const n=e.target.value,o=t.filter((e=>e.id===n));1===o.length&&r((e=>({...e,sellAlgorithm:n,sellParams:o[0].params,sellParamsEnd:e7(e.buyParams)?o[0].params:void 0})))}},children:!1!==o?t.filter((e=>!e.isBuy)).map((e=>(0,Sn.jsx)("option",{value:e.id,children:e.name},e.id))):(0,Sn.jsx)("option",{value:n.sellAlgorithm,children:n.sellAlgorithm})})]}),(0,Sn.jsx)(J8,{params:n.sellParams,handleConfig:e=>{r((t=>({...t,sellParams:t.sellParams.map((t=>e[0]===t.key?{...t,default:e[1]}:t))})))}}),null!=n.sellParamsEnd&&(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsx)(_3,{}),(0,Sn.jsx)(J8,{params:n.sellParamsEnd,handleConfig:e=>{r((t=>{var n;return{...t,sellParamsEnd:null===(n=t.sellParamsEnd)||void 0===n?void 0:n.map((t=>e[0]===t.key?{...t,default:e[1]}:t))}}))}})]})]})}async function n7(e,t,n){const r=new URLSearchParams;r.set("type","filter"),r.set("command",e),null!=t&&r.set("data",t);const o="".concat(xl,"/config?").concat(r.toString()),i=await Cl(o,null);return"err"in i?i:n(i)}async function r7(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return await n7("list",JSON.stringify({tag:t}),(e=>"d"in e?e.d:{err:"no key found by name:d"}),e)}function o7(e){return(0,Sn.jsx)(J8,{params:e.data,handleConfig:t=>{e.update(e.data.map((e=>e.key===t[0]?{...e,default:t[1]}:e)))}})}function i7(e){const[t,n]=(0,r.useState)(e.config);return(0,Sn.jsxs)("div",{children:[(0,Sn.jsxs)("h2",{children:["\u53c2\u6570\u7c7b\u578b:",e.name]}),(0,Sn.jsx)(a7,{msg:"\u4fee\u6539\u53c2\u6570",content:(0,Sn.jsx)(o7,{data:t,update:e=>n(e)}),callback:n=>{const r=[];for(var o=0;o<t.length&&o<e.config.length;){const n=t[o],i=e.config[o];n.default!==i.default&&r.push([n.key,n.default]),o++}r.length>0?e.updater(Object.fromEntries(r),n):n("\u914d\u7f6e\u672a\u4fee\u6539!")}}),(0,Sn.jsxs)(j4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,Sn.jsx)("thead",{children:(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:"Name"},"name"),(0,Sn.jsx)("td",{children:"Value"},"value")]})}),(0,Sn.jsx)("tbody",{children:e.config.map((e=>(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:e.name},"name"),(0,Sn.jsx)("td",{children:e.default},"value")]},e.key)))})]})]})}function a7(e){const[t,n]=(0,r.useState)(!1),[o,i]=(0,r.useState)(null),[a,s]=(0,r.useState)(!1);return(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)(Vs,{variant:"outlined",color:!0===e.even?"warning":"primary",onClick:()=>{a?i("\u64cd\u4f5c\u6b63\u5728\u6267\u884c\u4e2d, \u8bf7\u7a0d\u540e\u518d\u91cd\u8bd5!"):n(!0)},children:e.msg}),(0,Sn.jsxs)(s8,{show:t,onHide:()=>n(!1),children:[(0,Sn.jsx)(s8.Header,{closeButton:!0,children:(0,Sn.jsx)(s8.Title,{children:e.msg})}),(0,Sn.jsx)(s8.Body,{children:e.content||(0,Sn.jsxs)("p",{children:["\u662f\u5426\u786e\u5b9a",e.msg,"?"]})}),(0,Sn.jsxs)(s8.Footer,{children:[(0,Sn.jsx)(Vs,{color:"secondary",variant:"outlined",onClick:()=>n(!1),children:"\u53d6\u6d88"}),(0,Sn.jsx)(Vs,{color:"primary",variant:"outlined",onClick:()=>{s(!0),e.callback((e=>{i(e),s(!1)})),n(!1)},children:"\u786e\u5b9a"})]})]}),null!=o&&(0,Sn.jsx)(P8,{msg:o,cb:()=>i(null)})]})}function s7(e,t){return Object.fromEntries(e.map((e=>{const n=e.key,r=t.get(n);return[n,null!=r?r:e.default]})))}function l7(e){const{config:t,stockId:n,strategyId:o,updateCallBack:i,sellAlgorithm:a}=e,s=Math.floor((new Date).getTime()/864e5),l=El((new Date).getTime()),[c,u]=(0,r.useState)([l,l]),d=(e,t,r)=>{Ol("update",n,o,1===e?t:null,a,2===e?t:null,3===e?t:null).then((e=>{e&&i();r("\u64cd\u4f5c"+(e?"\u6210\u529f":"\u5931\u8d25")+"!")}))},h=(e,n)=>{gc(e,t.stock,t.buyAlgorithm,!1).then((e=>{const t="\u64cd\u4f5c"+(e?"\u6210\u529f":"\u5931\u8d25")+"!";e&&i(),n(t)}))},p=t.sellParamsEnd,f=t.defaultBuyParams.filter((e=>1===e.realTime)).map((e=>{const n=t.buyParams.get(e.key);return null!=n?{...e,default:n}:e})),g=(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsx)("div",{children:o.endsWith("big volume buy")&&(0,Sn.jsxs)(Sn.Fragment,{children:[null!=t.defaultBuyParams.find((e=>{if("cancelDate"===e.key){const n=t.buyParams.get(e.key);return null==n&&n!==s}return!1}))&&(0,Sn.jsx)(a7,{msg:"\u53d6\u6d88\u4eca\u65e5\u64cd\u4f5c",even:!1,callback:e=>h("endtoday",e)}),(0,Sn.jsx)(a7,{msg:"\u624b\u52a8\u7ffb\u8f6c",even:!0,callback:e=>h("reverse",e)}),(0,Sn.jsx)(a7,{msg:"\u624b\u52a8\u518d\u6b21\u8d2d\u4e70",even:!0,callback:e=>h("rebuy",e)})]})}),(0,Sn.jsx)("div",{children:(0,Sn.jsx)(a7,{msg:"\u8fd0\u884c\u56de\u6d4b",content:(0,Sn.jsxs)("div",{children:[(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"Start Date: "}),(0,Sn.jsx)("input",{value:c[0],type:"date",onChange:e=>{u((t=>[e.target.value,t[1]]))}})]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"End Date: "}),(0,Sn.jsx)("input",{value:c[1],type:"date",onChange:e=>{u((t=>[t[0],e.target.value]))}})]})]}),callback:e=>{((e,r,i)=>{const a=o.split("-"),s=a[a.length-1];Gl({name:"".concat(n,"-").concat(t.buyAlgorithm),desc:"",startDate:e,endDate:r,needQuote:!1,configs:[{stocks:[n],buyAlgorithm:s,buyParams:s7(t.defaultBuyParams.filter((e=>null==e.realTime||0===e.realTime)),t.buyParams),sellAlgorithm:t.sellAlgorithm,sellParams:s7(t.defaultSellParams,t.sellParams),sellParamsEnd:void 0,origin:[[s,t.defaultBuyParams.filter((e=>null==e.realTime||0===e.realTime)).map((e=>{const n=e.key,r=t.buyParams.get(n);return null!=r?{...e,default:r}:e}))],[t.sellAlgorithm,t.defaultSellParams.map((e=>{const n=e.key,r=t.sellParams.get(n);return null!=r?{...e,default:r}:e})),null]]}]}).then((e=>{i("\u63d0\u4ea4"+(e?"\u6210\u529f":"\u5931\u8d25")+"!")}))})(c[0],c[1],e)}})}),f.length>0&&(0,Sn.jsx)(i7,{name:"\u5b9e\u65f6",config:f,updater:(e,t)=>{d(1,e,t)}}),(0,Sn.jsx)(i7,{name:"\u4e70\u5165\u7b56\u7565(".concat(t.buyAlgorithm,")"),config:t.defaultBuyParams.filter((e=>null==e.realTime||0===e.realTime)).map((e=>{const n=t.buyParams.get(e.key);return null!=n?{...e,default:n}:e})),updater:(e,t)=>{d(1,e,t)}}),(0,Sn.jsx)(i7,{name:"\u5356\u51fa\u7b56\u7565(".concat(t.sellAlgorithm,")"),config:t.defaultSellParams.map((e=>{const n=t.sellParams.get(e.key);return null!=n?{...e,default:n}:e})),updater:(e,t)=>{d(2,e,t)}}),null!=p&&(0,Sn.jsx)(i7,{name:"\u5356\u51fa\u7b56\u7565(\u672b\u65e5)(".concat(t.sellAlgorithm,")"),config:t.defaultSellParams.map((e=>{const t=p.get(e.key);return null!=t?{...e,default:t}:e})),updater:(e,t)=>{d(3,e,t)}}),(0,Sn.jsx)(c8,{symbol:t.stock,strategy:t.buyAlgorithm})]}),m=(0,r.useCallback)((async e=>await async function(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const o=new URLSearchParams;o.set("isFinish",n+""),null!=e&&(o.set("stock",e),null!=t&&o.set("strategy",t));const i=await Cl("".concat(xl,"/getPositions?").concat(o.toString()),r);return"err"in i?i:Nl(i)}(n,o,!0,e)),[n,o]);return(0,Sn.jsx)(Sn.Fragment,{children:(0,Sn.jsxs)("main",{className:"Container",children:[(0,Sn.jsxs)("h2",{children:[(0,Sn.jsx)("span",{style:{color:"lightgrey"},children:"Stock: "}),n,(0,Sn.jsxs)("span",{style:{color:"lightgrey",marginLeft:"1rem"},children:["Strategy:"," "]}),o]}),(0,Sn.jsx)(d7,{symbol:n,strategy:o}),g,(0,Sn.jsx)(Qc,{getter:m,cvt:e=>(0,Sn.jsx)(f8,{data:e})})]})})}const c7="filterList";function u7(){let e=rt();const[t,n]=(0,r.useState)(0),o=(0,r.useCallback)((async t=>{const n=await async function(e,t,n){const r="".concat(xl,"/control?command=get&symbol=").concat(e,"&buyStrategy=").concat(t),o=await Cl(r,n);if("err"in o)return o;if("params"in o){const e=o,t=JSON.parse(e.params);if(2===e.defaultConfig.length){const n=e.defaultConfig.find((e=>t.buyAlgorithm.endsWith(e.id))),r=e.defaultConfig.find((e=>t.sellAlgorithm===e.id));if(null!=n&&null!=r)return{...t,stock:t.stocks[0],buyParams:$l(t.buyParams),sellParams:$l(t.sellParams),defaultSellParams:JSON.parse(r.params),defaultBuyParams:JSON.parse(n.params)}}return{err:"fail to get default params"}}return{err:"key params not found"}}(e.stockId,e.strategyId,t),r=await r7(t);if(!("err"in r)&&!("err"in n)){const e=n.defaultBuyParams,t=r.map((e=>e.name));if(t.length>0&&null!=e.find((e=>e.key===c7))){const r=e.map((e=>e.key===c7?{...e,alternatives:[!0,t]}:e));return{...n,defaultBuyParams:r}}}return n}),[e.stockId,e.strategyId]);return(0,Sn.jsx)(Qc,{getter:o,cvt:t=>(0,Sn.jsx)(l7,{config:t,sellAlgorithm:t.sellAlgorithm,stockId:e.stockId,strategyId:e.strategyId,updateCallBack:()=>n((e=>e+1))})})}function d7(e){const[t,n]=(0,r.useState)(null);if((0,r.useEffect)((()=>{const t=new AbortController,r=t.signal;return pc(e.symbol,e.strategy,r).then((e=>{r.aborted||n(e)})),()=>{t.abort()}}),[e.symbol,e.strategy]),null==t)return(0,Sn.jsx)($c,{});if("err"in t)return(0,Sn.jsx)("div",{children:(0,Sn.jsxs)("p",{children:["Error:",t.err]})});{const e=t.find((e=>!0));return(0,Sn.jsxs)(M5,{children:[(0,Sn.jsx)(E5,{expandIcon:(0,Sn.jsx)(p3.A,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,Sn.jsx)(Q3,{children:null!=e?"\u65f6\u95f4:".concat(El(e.timestamp,!1,!0,!1),",\u540c\u6b65\u4efb\u52a1ID:").concat(e.taskId):"\u6ca1\u6709\u540c\u6b65\u8bb0\u5f55"})}),(0,Sn.jsx)(s3,{children:(0,Sn.jsx)(Q3,{children:t.slice(1).map((e=>(0,Sn.jsx)("p",{children:"\u65f6\u95f4:".concat(El(e.timestamp,!1,!0,!1),",\u540c\u6b65\u4efb\u52a1ID:").concat(e.taskId)})))})})]})}}function h7(e){let{msg:t,content:n,callBack:o,cancelCB:i}=e;const[a,s]=(0,r.useState)(null);return(0,Sn.jsxs)("div",{children:[(0,Sn.jsxs)(s8,{show:!0,onHide:i,children:[(0,Sn.jsx)(s8.Header,{closeButton:!0,children:(0,Sn.jsx)(s8.Title,{children:t})}),(0,Sn.jsx)(s8.Body,{children:n||(0,Sn.jsxs)("p",{children:["\u662f\u5426\u786e\u5b9a",t,"?"]})}),(0,Sn.jsxs)(s8.Footer,{children:[(0,Sn.jsx)(Vs,{color:"secondary",onClick:i,children:"\u53d6\u6d88"}),(0,Sn.jsx)(Vs,{color:"primary",onClick:()=>o((e=>{s(e)})),children:"\u786e\u5b9a"})]})]}),null!=a&&(0,Sn.jsx)(P8,{msg:a,cb:()=>s(null)})]})}function p7(e){const[t,n]=(0,r.useState)(!1),[o,i]=(0,r.useState)(null),[a,s]=(0,r.useState)(!1);return(0,r.useEffect)((()=>(s(!1),()=>{s(!0)})),[s]),(0,Sn.jsxs)("div",{style:{display:"inline-block"},children:[(0,Sn.jsx)(Vs,{color:"success",variant:"outlined",onClick:()=>{n(!0),null!=e.clickCB&&e.clickCB()},children:e.msg}),(0,Sn.jsxs)(s8,{show:t,onHide:()=>n(!1),children:[(0,Sn.jsx)(s8.Header,{closeButton:!0,children:(0,Sn.jsx)(s8.Title,{children:e.msg})}),(0,Sn.jsx)(s8.Body,{children:e.content||(0,Sn.jsxs)("p",{children:["\u662f\u5426\u786e\u5b9a",e.msg,"?"]})}),(0,Sn.jsxs)(s8.Footer,{children:[(0,Sn.jsx)(Vs,{color:"secondary",onClick:()=>n(!1),children:"\u53d6\u6d88"}),(0,Sn.jsx)(Vs,{color:"primary",onClick:()=>e.callBack((e=>{a||(n(!1),i(e))})),children:"\u786e\u5b9a"})]})]}),null!=o&&(0,Sn.jsx)(P8,{msg:o,cb:()=>i(null)})]})}function f7(e){const[t]=(0,r.useState)(new AbortController),[n,o]=(0,r.useState)(!0),[i,a]=(0,r.useState)(0);return(0,r.useEffect)((()=>()=>{t.abort()}),[]),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)(p7,{msg:"\u624b\u52a8\u9996\u6b21\u8d2d\u4e70",callBack:r=>{dc(e.strategyId,{manualFirst:(new Date).getTime(),manualSide:n?1:0},t.signal).then((e=>{r("\u64cd\u4f5c"+(e?"\u6210\u529f":"\u5931\u8d25")+"!")}))},content:(0,Sn.jsxs)("div",{children:[(0,Sn.jsxs)("p",{children:["\u4e70\u5165\u65b9\u5411(",n?"call":"put",")"]}),(0,Sn.jsx)(n3,{checked:n,onChange:e=>o(e.target.checked)})]})}),(0,Sn.jsx)(p7,{msg:"\u6309\u6bd4\u4f8b\u5356\u51fa",callBack:t=>{i>0?mc(e.strategyId,!0,Math.min(i,1)).then((e=>{t("\u64cd\u4f5c"+(e?"\u6210\u529f":"\u5931\u8d25")+"!")})):t("\u6bd4\u4f8b\u5fc5\u987b\u5927\u4e8e0!")},content:(0,Sn.jsx)("div",{children:(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u5356\u51fa\u6bd4\u4f8b:"}),(0,Sn.jsx)(Q8,{value:i,type:"number",handleUpdate:e=>a(e)})]})})})]})}function g7(e){const[t]=(0,r.useState)(new AbortController);return(0,r.useEffect)((()=>()=>{t.abort()}),[]),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)(p7,{msg:"\u624b\u52a8\u9996\u6b21\u8d2d\u4e70",callBack:n=>{dc(e.strategyId,{manualFirst:(new Date).getTime()},t.signal).then((e=>{n("\u64cd\u4f5c"+(e?"\u6210\u529f":"\u5931\u8d25")+"!")}))}}),(0,Sn.jsx)(p7,{msg:"\u53d6\u6d88\u4eca\u5929\u8fc7\u6ee4\u5668",callBack:n=>{dc(e.strategyId,{manualCancelFilterDate:Math.floor((new Date).getTime()/$2)},t.signal).then((e=>{n("\u64cd\u4f5c"+(e?"\u6210\u529f":"\u5931\u8d25")+"!")}))}})]})}function m7(e){const[t,n]=(0,r.useState)(!0),[o,i]=(0,r.useState)([!0,.1]),[a,s]=(0,r.useState)(0),l=function(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;(async function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;return await gc(e,t,n,!1,r,o)})(t,"QQQ",e.strategyId,r).then((e=>{n("\u64cd\u4f5c"+(e?"\u6210\u529f":"\u5931\u8d25")+"!")}))};return(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)(p7,{msg:"\u53d6\u6d88\u4eca\u65e5\u64cd\u4f5c",callBack:e=>{l("endtoday",e)}}),(0,Sn.jsx)(p7,{msg:"\u624b\u52a8\u9996\u6b21\u8d2d\u4e70",callBack:e=>{l("manualfirst",e,[["side",t?"1":"0"]])},content:(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"is call:"}),(0,Sn.jsx)(n3,{checked:t,onChange:e=>{n((e=>!e))}})]})}),(0,Sn.jsx)(p7,{msg:"\u624b\u52a8\u7ffb\u8f6c",callBack:e=>{l("reverse",e)}}),(0,Sn.jsx)(p7,{msg:"\u624b\u52a8\u6e05\u4ed3",callBack:e=>{l("clean",e)}}),(0,Sn.jsx)(p7,{msg:"\u624b\u52a8\u518d\u6b21\u8d2d\u4e70",content:(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u4e70\u5165\u6bd4\u4f8b:"}),(0,Sn.jsx)(Q8,{type:"number",value:a,handleUpdate:s})]}),callBack:e=>{l("rebuy",e,a>0&&a<=1?[["rebuyPercent",a+""]]:null)}}),(0,Sn.jsx)(p7,{msg:"\u6309\u6bd4\u4f8b\u5356\u51fa",callBack:t=>{mc(e.strategyId,o[0],o[1]).then((e=>{t("\u64cd\u4f5c"+(e?"\u6210\u529f":"\u5931\u8d25")+"!")}))},content:(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("div",{children:(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u6309\u5f20\u6570\u5356\u51fa"}),(0,Sn.jsx)(n3,{checked:o[0],onChange:e=>i((t=>[e.target.checked,e.target.checked?.01:1]))}),(0,Sn.jsx)("span",{children:"\u6309\u767e\u5206\u6bd4\u5356\u51fa"})]})}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u5356\u51fa\u6570\u91cf:"}),(0,Sn.jsx)(Q8,{value:o[1],type:"number",handleUpdate:e=>i((t=>[t[0],e]))})]})]})})]})}function v7(e){return(0,Kt.Ay)("MuiDialog",e)}const y7=(0,nr.A)("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]);const x7=r.createContext({}),b7=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],w7=(0,In.Ay)(Si,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),S7=(0,In.Ay)(Oi,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),_7=(0,In.Ay)("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t["scroll".concat((0,Mn.A)(n.scroll))]]}})((e=>{let{ownerState:t}=e;return(0,qt.A)({height:"100%","@media print":{height:"auto"},outline:0},"paper"===t.scroll&&{display:"flex",justifyContent:"center",alignItems:"center"},"body"===t.scroll&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})})),A7=(0,In.Ay)(Gi,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t["scrollPaper".concat((0,Mn.A)(n.scroll))],t["paperWidth".concat((0,Mn.A)(String(n.maxWidth)))],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})((e=>{let{theme:t,ownerState:n}=e;return(0,qt.A)({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},"paper"===n.scroll&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},"body"===n.scroll&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!n.maxWidth&&{maxWidth:"calc(100% - 64px)"},"xs"===n.maxWidth&&{maxWidth:"px"===t.breakpoints.unit?Math.max(t.breakpoints.values.xs,444):"max(".concat(t.breakpoints.values.xs).concat(t.breakpoints.unit,", 444px)"),["&.".concat(y7.paperScrollBody)]:{[t.breakpoints.down(Math.max(t.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}},n.maxWidth&&"xs"!==n.maxWidth&&{maxWidth:"".concat(t.breakpoints.values[n.maxWidth]).concat(t.breakpoints.unit),["&.".concat(y7.paperScrollBody)]:{[t.breakpoints.down(t.breakpoints.values[n.maxWidth]+64)]:{maxWidth:"calc(100% - 64px)"}}},n.fullWidth&&{width:"calc(100% - 64px)"},n.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,["&.".concat(y7.paperScrollBody)]:{margin:0,maxWidth:"100%"}})})),k7=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiDialog"}),o=Qo(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":s,BackdropComponent:l,BackdropProps:c,children:u,className:d,disableEscapeKeyDown:h=!1,fullScreen:p=!1,fullWidth:f=!1,maxWidth:g="sm",onBackdropClick:m,onClick:v,onClose:y,open:x,PaperComponent:b=Gi,PaperProps:w={},scroll:S="paper",TransitionComponent:_=vi,transitionDuration:A=i,TransitionProps:k}=n,C=(0,Yt.A)(n,b7),M=(0,qt.A)({},n,{disableEscapeKeyDown:h,fullScreen:p,fullWidth:f,maxWidth:g,scroll:S}),I=(e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:i}=e,a={root:["root"],container:["container","scroll".concat((0,Mn.A)(n))],paper:["paper","paperScroll".concat((0,Mn.A)(n)),"paperWidth".concat((0,Mn.A)(String(r))),o&&"paperFullWidth",i&&"paperFullScreen"]};return(0,$t.A)(a,v7,t)})(M),T=r.useRef(),D=(0,Pn.A)(s),j=r.useMemo((()=>({titleId:D})),[D]);return(0,Sn.jsx)(S7,(0,qt.A)({className:(0,Zt.A)(I.root,d),closeAfterTransition:!0,components:{Backdrop:w7},componentsProps:{backdrop:(0,qt.A)({transitionDuration:A,as:l},c)},disableEscapeKeyDown:h,onClose:y,open:x,ref:t,onClick:e=>{v&&v(e),T.current&&(T.current=null,m&&m(e),y&&y(e,"backdropClick"))},ownerState:M},C,{children:(0,Sn.jsx)(_,(0,qt.A)({appear:!0,in:x,timeout:A,role:"presentation"},k,{children:(0,Sn.jsx)(_7,{className:(0,Zt.A)(I.container),onMouseDown:e=>{T.current=e.target===e.currentTarget},ownerState:M,children:(0,Sn.jsx)(A7,(0,qt.A)({as:b,elevation:24,role:"dialog","aria-describedby":a,"aria-labelledby":D},w,{className:(0,Zt.A)(I.paper,w.className),ownerState:M,children:(0,Sn.jsx)(x7.Provider,{value:j,children:u})}))})}))}))})),C7=k7;function M7(e){return(0,Kt.Ay)("MuiDialogTitle",e)}const I7=(0,nr.A)("MuiDialogTitle",["root"]),T7=["className","id"],D7=(0,In.Ay)(Q3,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),j7=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiDialogTitle"}),{className:o,id:i}=n,a=(0,Yt.A)(n,T7),s=n,l=(e=>{const{classes:t}=e;return(0,$t.A)({root:["root"]},M7,t)})(s),{titleId:c=i}=r.useContext(x7);return(0,Sn.jsx)(D7,(0,qt.A)({component:"h2",className:(0,Zt.A)(l.root,o),ownerState:s,ref:t,variant:"h6",id:null!=i?i:c},a))})),P7=j7;function L7(e){return(0,Kt.Ay)("MuiDialogContent",e)}(0,nr.A)("MuiDialogContent",["root","dividers"]);const R7=["className","dividers"],E7=(0,In.Ay)("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})((e=>{let{theme:t,ownerState:n}=e;return(0,qt.A)({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},n.dividers?{padding:"16px 24px",borderTop:"1px solid ".concat((t.vars||t).palette.divider),borderBottom:"1px solid ".concat((t.vars||t).palette.divider)}:{[".".concat(I7.root," + &")]:{paddingTop:0}})})),N7=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiDialogContent"}),{className:r,dividers:o=!1}=n,i=(0,Yt.A)(n,R7),a=(0,qt.A)({},n,{dividers:o}),s=(e=>{const{classes:t,dividers:n}=e,r={root:["root",n&&"dividers"]};return(0,$t.A)(r,L7,t)})(a);return(0,Sn.jsx)(E7,(0,qt.A)({className:(0,Zt.A)(s.root,r),ownerState:a,ref:t},i))})),O7=N7;function z7(e){return(0,Kt.Ay)("MuiDialogActions",e)}(0,nr.A)("MuiDialogActions",["root","spacing"]);const B7=["className","disableSpacing"],F7=(0,In.Ay)("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})((e=>{let{ownerState:t}=e;return(0,qt.A)({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!t.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})})),V7=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiDialogActions"}),{className:r,disableSpacing:o=!1}=n,i=(0,Yt.A)(n,B7),a=(0,qt.A)({},n,{disableSpacing:o}),s=(e=>{const{classes:t,disableSpacing:n}=e,r={root:["root",!n&&"spacing"]};return(0,$t.A)(r,z7,t)})(a);return(0,Sn.jsx)(F7,(0,qt.A)({className:(0,Zt.A)(s.root,r),ownerState:a,ref:t},i))})),W7=V7;function H7(e){const{isBuy:t,reverse:n}=e,[o,i]=(0,r.useState)(!0),[a,s]=(0,r.useState)(e.price),[l,c]=(0,r.useState)(null),[u,d]=(0,r.useState)(e.qty),h="manualOrderSubmit"===e.tp?"\u63d0\u4ea4":"manualOrderModify"===e.tp?"\u4fee\u6539":"\u53d6\u6d88",p=()=>{i(!1),e.finishCallBack(!1)};return(0,Sn.jsxs)("div",{children:[(0,Sn.jsxs)(C7,{open:o,onClose:p,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[(0,Sn.jsxs)(P7,{id:"alert-dialog-title",children:[h,"\u8ba2\u5355"]}),(0,Sn.jsxs)(O7,{children:[e.queries.map((e=>(0,Sn.jsxs)("div",{children:[(0,Sn.jsxs)("span",{children:[e[0],": "]}),e[2]]},e[1]))),"manualOrderCancel"!==e.tp&&(0,Sn.jsxs)(Sn.Fragment,{children:[null!=u&&(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u6570\u91cf:"}),(0,Sn.jsx)("input",{value:u,type:"number",onChange:e=>{const t=parseInt(e.target.value);isNaN(t)||d(t)}})]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u4ef7\u683c: "}),(0,Sn.jsx)("input",{value:a,type:"number",onChange:e=>{s(parseFloat(e.target.value))}})]})]})]}),(0,Sn.jsxs)(W7,{children:[(0,Sn.jsx)(Vs,{color:"secondary",onClick:p,children:"\u53d6\u6d88"}),(0,Sn.jsx)(Vs,{color:"primary",onClick:()=>{if("manualOrderCancel"!==e.tp&&a<1e-4)return c(["\u4ef7\u683c\u4e0d\u80fd\u4e3a0",!1]),void i(!1);("manualOrderCancel"===e.tp?yc(e.tp,e.queries.map((e=>[e[1],e[2]]))):yc(e.tp,e.queries.map((e=>[e[1],e[2]])).concat(null!=u?[["price",a+""],["qty",u+""]]:[["price",a+""]]).concat([["isBuy",t+""],...n?[["reverse",""]]:[]]))).then((e=>{c("boolean"!==typeof e?[e.err,!1]:["\u64cd\u4f5c"+(e?"\u6210\u529f":"\u5931\u8d25"),e]),i(!1)}))},children:"\u786e\u5b9a"})]})]}),null!=l&&(0,Sn.jsx)(P8,{msg:l[0],cb:()=>{const t=l[1];c(null),e.finishCallBack(t)}})]})}function G7(e){return new Date(e).getTime()}function U7(e){let{data:t,startDate:n,endDate:o}=e;const i=(0,r.useRef)(null),[a,s]=(0,r.useState)(null);return(0,r.useEffect)((()=>{if(null!=i.current)if(null==a)s(ZT(i.current));else{const e=function(e,t,n){const r=[],o=[],i=G7(e),a=G7(t);for(var s=i;s<=a;){const e=El(s),t=n.get(e);null!=t?(r.push([e,t[0],t[1]]),o.push([e,100*t[1]])):(r.push([e,0,0]),o.push([e,0])),s+=864e5}return{tooltip:{formatter:function(e){var t;return t=3===e.value.length?(100*e.value[2]).toFixed(2):e.value[1].toFixed(2),"\u6536\u76ca\u7387: ".concat(t,"%")}},visualMap:{show:!0,min:-5,max:5,calculable:!0,seriesIndex:[2],orient:"horizontal",left:"center",top:"95%",height:"10%",inRange:{color:["red","green"],opacity:.3},controller:{inRange:{opacity:.5}}},calendar:[{left:"center",top:"middle",yearLabel:{show:!0},orient:"vertical",dayLabel:{firstDay:1,nameMap:"cn"},monthLabel:{show:!0},cellSize:"auto",width:"90%",height:"90%",range:[e,t],splitLine:{show:!0,lineStyle:{color:"purple"}}}],series:[{type:"scatter",coordinateSystem:"calendar",symbolSize:0,label:{show:!0,formatter:function(e){return am(e.value[0]).getDate()+"\n\n"},color:"#000"},data:r},{type:"scatter",coordinateSystem:"calendar",symbolSize:0,label:{show:!0,formatter:function(e){return"\n\n\n\n"+e.value[1].toFixed(2)+"\n"+(e.value[2]>0?"+":"")+(100*e.value[2]).toFixed(2)+"%\n\n"}},data:r},{name:"\u6536\u76ca\u7387",type:"heatmap",coordinateSystem:"calendar",data:o}]}}(n,o,t);a.setOption(e)}}),[a,n,o,t]),(0,Sn.jsx)("div",{ref:i,style:{width:"100%",height:"100%"}})}function X7(e){let{data:t}=e;const n=(0,r.useRef)(null),[o,i]=(0,r.useState)(null);return(0,r.useEffect)((()=>{if(t.length>0&&null!=n.current)if(null==o)i(ZT(n.current));else{const n=t.map((e=>El(e[0]))),r=t.map((e=>e[1]));var e=null;if(r.length>0){const t=r[0];t>0&&(e=r.map((e=>e/t-1)))}const i=L2(n,null==e?[[["profit line",r]]]:[[["profit line",r]],[["gain",e]]]);o.setOption(i)}}),[t,o]),(0,Sn.jsx)("div",{ref:n,style:{width:"100%",aspectRatio:"16/9"}})}function Y7(e){let{aid:t,startDate:n,endDate:o,type:i}=e;const[a,s]=(0,r.useState)(null),l=Math.ceil((new Date(o).getTime()-new Date(n).getTime())/$2/7),c="7/".concat(l);if((0,r.useEffect)((()=>{const e=new AbortController,r=e.signal;return async function(e,t,n,r,o){const i=await rc(e,t,n,r,o);if("err"in i)return i;if(i.t>0){const e=new Map;var a=i.t;if(i.d.reverse().forEach((t=>{const n=a;a-=t.profit;const r=El(t.timestamp);e.set(r,[t.profit,t.profit/a,n,t.timestamp])})),i.d.length>0){const t=i.d[i.d.length-1].timestamp,n=El(t),r=e.get(n);if(null!=r){const n=t-Xl,o=El(n);Math.abs(r[0])>0&&e.set(o,[0,0,r[2]-r[0],n])}}return e}return{err:"invalid total money"}}(t,i,n,o,r).then((e=>{s(e)})),()=>{e.abort()}}),[t,n,o,i]),null==a)return(0,Sn.jsx)($c,{});if("err"in a)return(0,Sn.jsx)("div",{children:(0,Sn.jsxs)("p",{children:["Error:",ol(a.err)]})});{const e=Array.from(a.entries()).map((e=>[e[1][3],e[1][2]])).sort(((e,t)=>e[0]-t[0]));var u=0,d=0,h=0;return Array.from(a.values()).forEach((e=>{e[1]>cl?u++:e[1]<-cl?d++:h++})),(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsx)(X7,{data:e}),(0,Sn.jsx)("div",{className:"Container",children:(0,Sn.jsx)("h3",{children:(0,Sn.jsxs)("div",{style:{display:"flex",width:"90%",justifyContent:"space-evenly"},children:[(0,Sn.jsxs)("div",{style:{color:"green"},children:[(0,Sn.jsx)("span",{children:"Win: "}),(0,Sn.jsx)("span",{children:u})]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"Draw: "}),(0,Sn.jsx)("span",{children:h})]}),(0,Sn.jsxs)("div",{style:{color:"red"},children:[(0,Sn.jsx)("span",{children:"Lose: "}),(0,Sn.jsx)("span",{children:d})]})]})})}),(0,Sn.jsx)("div",{style:{width:"100%",aspectRatio:c},children:(0,Sn.jsx)(U7,{data:a,startDate:n,endDate:o})},"calendar"+c)]})}}function q7(){return(0,Sn.jsx)(Qc,{getter:async e=>await uc(e),cvt:e=>(0,Sn.jsx)(Sn.Fragment,{children:e.filter((e=>e.name.search("\u76c8\u900f")>-1)).map((e=>(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("h2",{children:e.name}),(0,Sn.jsx)(t9,{port:e.aid,disableOrder:!0,interval:3e4,name:e.isVirtual?e.name:void 0}),(0,Sn.jsx)(_3,{})]})))})})}function Z7(){return W2()?(0,Sn.jsx)(K7,{}):(0,Sn.jsx)(vt,{})}function K7(){const[e,t]=(0,r.useState)(null);return(0,r.useEffect)((()=>{const e=new AbortController;return uc(e.signal).then((e=>{t(e)})),()=>{e.abort()}}),[]),null==e?(0,Sn.jsx)($c,{}):"err"in e?(0,Sn.jsx)("div",{children:(0,Sn.jsxs)("p",{children:["Error:",ol(e.err)]})}):(0,Sn.jsxs)("div",{style:{display:"flex"},children:[(0,Sn.jsx)("nav",{style:{borderRight:"solid 1px",padding:"2rem"},children:e.map((e=>{const t=1===e.isVirtual?"?name="+e.name:"";return(0,Sn.jsxs)("div",{children:[(0,Sn.jsxs)("h6",{children:[(0,Sn.jsx)(w4,{color:null==e.active?"warning":e.active?"success":"error"}),e.name]}),(0,Sn.jsx)(Wt,{to:"ZInvest/".concat(e.aid).concat(t),style:e=>{let{isActive:t}=e;return{display:"block",margin:"1rem 0",color:t?"red":""}},children:"ZInvest"}),(0,Sn.jsx)(Wt,{to:"accounts/".concat(e.aid,"?name=").concat(e.name),style:e=>{let{isActive:t}=e;return{display:"block",margin:"1rem 0",color:t?"red":""}},children:"Strategy"})]})}))}),(0,Sn.jsx)("div",{style:{flex:1},children:(0,Sn.jsx)(vt,{})})]})}function $7(){const[e,t]=(0,r.useState)(null),[n,o]=(0,r.useState)(null);return(0,r.useEffect)((()=>{const e=new AbortController;return uc(e.signal).then((e=>{t(e),!("err"in e)&&e.length>0&&o(e[0])})),()=>{e.abort()}}),[]),null==e?(0,Sn.jsx)($c,{}):"err"in e?(0,Sn.jsx)("div",{children:(0,Sn.jsxs)("p",{children:["Error:",ol(e.err)]})}):(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("div",{children:(0,Sn.jsx)("select",{value:(null===n||void 0===n?void 0:n.aid)+"",onChange:t=>{const n=e.find((e=>e.aid+""===t.target.value));null!=n&&o(n)},children:e.map((e=>(0,Sn.jsx)("option",{value:e.aid,children:"".concat(e.name)},e.aid)))})}),null!=n&&(0,Sn.jsx)(t9,{port:n.port})]})}function Q7(){const e=rt(),t=parseInt(e.port),[n]=Xt(),r=n.get("name");return(0,Sn.jsx)(t9,{port:t,name:r||void 0})}function J7(e){const{aid:t,stocks:n}=e,[o,i]=(0,r.useState)(null);return n.length>0?(0,Sn.jsx)("div",{children:(0,Sn.jsx)(p7,{msg:"\u80a1\u7968\u5f00\u4ed3",content:null!=o?(0,Sn.jsxs)("div",{children:[(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u80a1\u7968\u4ee3\u7801:"}),(0,Sn.jsx)("select",{value:o[0],onChange:e=>{i((t=>null!=t?[e.target.value,t[1],t[2],t[3]]:t))},children:n.map((e=>(0,Sn.jsx)("option",{value:e,children:e},e)))})]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u6570\u91cf:"}),(0,Sn.jsx)("input",{value:o[1],type:"number",onChange:e=>{const t=parseInt(e.target.value);isNaN(t)||i((e=>null!=e?[e[0],t,e[2],e[3]]:e))}})]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u505a\u7a7a:"}),(0,Sn.jsx)(n3,{checked:o[3],onChange:e=>{i((t=>null!=t?[t[0],t[1],t[2],e.target.checked]:null))}})]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u4ef7\u683c:"}),(0,Sn.jsx)(Q8,{value:o[2],handleUpdate:e=>{i((t=>null!=t&&"number"===typeof e?[t[0],t[1],e,t[3]]:t))},type:"number"})]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u603b\u8ba1:"}),(o[1]*o[2]).toLocaleString()]})]}):(0,Sn.jsx)("div",{children:"Error!"}),callBack:e=>{null!=o&&o[1]>0&&o[2]>0?yc("manualOrderSubmit",[["aid",t],["symbol",o[0]],["qty",o[1]+""],["isBuy",o[3]?"false":"true"],["price",o[2]+""],["isOpen","true"],[o[3]?"reverse":"kkk","1"]]).then((t=>{e("boolean"===typeof t?"\u64cd\u4f5c"+(t?"\u6210\u529f":"\u5931\u8d25")+"!":"\u64cd\u4f5c\u5931\u8d25:".concat(t.err)),i(null)})):e("\u4ef7\u683c\u6216\u8005\u6570\u91cf\u6709\u95ee\u9898!")},clickCB:()=>{i([n[0],0,0,!1])}})}):(0,Sn.jsx)("p",{children:"Empty Stock List!"})}function e9(e){const t=(0,r.useCallback)((async e=>{const t=await zl(e);return t}),[]);return(0,Sn.jsx)(Qc,{getter:t,cvt:t=>(0,Sn.jsx)(J7,{aid:e.aid,stocks:t.map((e=>e.stock))})})}function t9(e){const{port:t,name:n}=e,[o,i]=(0,r.useState)(0),a=()=>i((e=>e+1));return(0,Sn.jsxs)("main",{children:[(0,Sn.jsx)("h3",{children:"Accounts:"}),(0,Sn.jsx)(n9,{port:t}),(0,Sn.jsx)("h3",{children:"Positions:"}),null!=n?(0,Sn.jsx)(u9,{accountId:n,isMain:!0}):(0,Sn.jsx)(r9,{port:t,orderCallBack:a,interval:e.interval}),!0!==e.disableOrder&&(0,Sn.jsxs)(Sn.Fragment,{children:[null==n&&(0,Sn.jsx)(e9,{aid:t+""}),(0,Sn.jsx)("h3",{children:"Orders:"}),null!=n?(0,Sn.jsx)(h9,{accountId:n,isMain:!0}):(0,Sn.jsx)(o9,{port:t,version:o,updateCallBack:a})]})]})}function n9(e){const[t,n]=(0,r.useState)(null);return(0,r.useEffect)((()=>{const t=new AbortController,r=t.signal;return async function(e,t){const n="".concat(xl,"/position_new?command=zvAccounts&aid=").concat(e),r=await Cl(n,t);return"err"in r?r:"d"in r?r.d:{err:"fail to get data by key:d"}}(e.port,r).then((e=>{r.aborted||n(e)})),()=>{t.abort()}}),[e.port]),null==t?(0,Sn.jsx)($c,{}):"err"in t?(0,Sn.jsx)("div",{children:(0,Sn.jsxs)("p",{children:["Error:",ol(t.err)]})}):(0,Sn.jsxs)(j4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,Sn.jsx)("thead",{children:(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:"Id"},"id"),(0,Sn.jsx)("td",{children:"Balance"},"balance"),(0,Sn.jsx)("td",{children:"Cash"},"cash"),(0,Sn.jsx)("td",{children:"Margin"},"margin")]})}),(0,Sn.jsx)("tbody",{children:(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:t.account||t.name||""},"id"),(0,Sn.jsx)("td",{children:t.balance},"balance"),(0,Sn.jsx)("td",{children:t.cash},"cash"),(0,Sn.jsx)("td",{children:(null===(o=t.margin)||void 0===o?void 0:o.toLocaleString())||0},"margin")]})})]});var o}function r9(e){const[t,n]=(0,r.useState)(null),[o,i]=(0,r.useState)(null),a=e.interval||5e3;return(0,r.useEffect)((()=>{const t=new AbortController,r=t.signal;Ql(e.port,r).then((e=>{r.aborted||n(e)}));const o=setInterval((()=>{Ql(e.port,r).then((e=>{r.aborted||n(e)}))}),a);return()=>{t.abort(),clearInterval(o)}}),[e.port]),null==t?(0,Sn.jsx)($c,{}):"err"in t?(0,Sn.jsx)("div",{children:(0,Sn.jsxs)("p",{children:["Error:",ol(t.err)]})}):(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsxs)(j4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,Sn.jsx)("thead",{children:(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:"Symbol"},"symbol"),(0,Sn.jsx)("td",{children:"Cost Price"},"cost"),(0,Sn.jsx)("td",{children:"Current Price"},"currP"),(0,Sn.jsx)("td",{children:"Total"},"total"),(0,Sn.jsx)("td",{children:"Operate"},"operate")]})}),(0,Sn.jsx)("tbody",{children:t.map((t=>{const n=t.price,r=t.symbol.startsWith("O:"),o=t.num*(r?100:1);return(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:t.symbol},"symbol"),(0,Sn.jsxs)("td",{children:[t.price,"/",(n*o).toFixed(2)]},"cost"),(0,Sn.jsxs)("td",{children:[t.currentPrice,"/",(t.currentPrice*o).toFixed(2),"(",(100*(n>0?(t.currentPrice-n)/n:0)).toFixed(2)+"%",")"]},"currP"),(0,Sn.jsx)("td",{children:t.num},"total"),(0,Sn.jsx)("td",{children:(0,Sn.jsx)("button",{onClick:()=>{i([t.currentPrice,[e.port+"",t.symbol,t.num]])},children:"\u5e73\u4ed3(\u5f02\u5e38\u60c5\u51b5)"})},"operate")]})}))})]}),null!=o&&(0,Sn.jsx)(H7,{price:o[0],tp:"manualOrderSubmit",queries:[["\u8d26\u53f7ID","aid",o[1][0]],["\u5408\u7ea6","symbol",o[1][1]],["\u662f\u5426\u5f00\u4ed3","isOpen","false"]],isBuy:o[1][2]<0,reverse:o[1][2]<0,qty:Math.abs(o[1][2]),finishCallBack:t=>{i(null),t&&e.orderCallBack()}})]})}function o9(e){const[t,n]=(0,r.useState)(null),[o,i]=(0,r.useState)(null);if((0,r.useEffect)((()=>{const t=new AbortController,r=t.signal;return async function(e,t){const n="".concat(xl,"/position_new?command=zvOrders&aid=").concat(e),r=await Cl(n,t);return"err"in r?r:"d"in r?r.d:{err:"fail to get data by key:d"}}(e.port,r).then((e=>{r.aborted||n(e)})),()=>{t.abort()}}),[e.port,e.version]),null==t)return(0,Sn.jsx)($c,{});if("err"in t)return(0,Sn.jsx)("div",{children:(0,Sn.jsxs)("p",{children:["Error:",ol(t.err)]})});{const n=t=>{i(null),t&&e.updateCallBack()};return(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsxs)(j4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,Sn.jsx)("thead",{children:(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:"Order Id"},"oid"),(0,Sn.jsx)("td",{children:"Symbol"},"symbol"),(0,Sn.jsx)("td",{children:"Side"},"side"),(0,Sn.jsx)("td",{children:"Price"},"price"),(0,Sn.jsx)("td",{children:"QTY"},"qty"),(0,Sn.jsx)("td",{children:"Trade QTY"},"trade_qty"),(0,Sn.jsx)("td",{children:"Status"},"status"),(0,Sn.jsx)("td",{children:"Time"},"time"),(0,Sn.jsx)("td",{children:"Message"},"message"),(0,Sn.jsx)("td",{children:"Operate"},"operate")]})}),(0,Sn.jsx)("tbody",{children:t.map((e=>(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:e.id},"oid"),(0,Sn.jsx)("td",{children:e.symbol},"symbol"),(0,Sn.jsx)("td",{children:e.isBuy?"BUY":"SELL"},"side"),(0,Sn.jsx)("td",{children:e.price},"price"),(0,Sn.jsx)("td",{children:e.qty},"qty"),(0,Sn.jsx)("td",{children:e.tradeQty},"trade_qty"),(0,Sn.jsx)("td",{children:e.status},"status"),(0,Sn.jsx)("td",{children:Kl(e.createTime)},"time"),(0,Sn.jsx)("td",{children:e.errorMsg},"message"),(0,Sn.jsx)("td",{children:("PARTIALLY_FILLED"===e.status||"NEW"===e.status)&&(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsx)(Vs,{onClick:()=>i([e.price,e.id,e.qty+""]),color:"primary",children:"\u6539\u4ef7"}),(0,Sn.jsx)(Vs,{onClick:()=>i(e.id),color:"secondary",children:"\u53d6\u6d88"})]})},"operate")]})))})]}),null!=o&&("string"===typeof o?(0,Sn.jsx)(H7,{tp:"manualOrderCancel",price:0,queries:[["\u8d26\u53f7ID","aid",e.port+""],["\u8ba2\u5355\u53f7","orderId",o]],isBuy:!0,reverse:!1,finishCallBack:n}):(0,Sn.jsx)(H7,{tp:"manualOrderModify",price:o[0],queries:[["\u8d26\u53f7ID","aid",e.port+""],["\u8ba2\u5355\u53f7","orderId",o[1]],["\u6570\u91cf","qty",o[2]]],isBuy:!0,reverse:!1,finishCallBack:n}))]})}}function i9(e){const t=e.split(":");return t.length>2?t.slice(t.length-3).join(":"):e}function a9(e){const[t,n]=(0,r.useState)(null);return(0,r.useEffect)((()=>{const t=new AbortController,r=t.signal;return Jl(e.aid,r).then((e=>{r.aborted||n(e)})),()=>{t.abort()}}),[e.aid,e.version]),null==t?(0,Sn.jsx)($c,{}):"err"in t?(0,Sn.jsx)("div",{children:(0,Sn.jsxs)("p",{children:["Error:",ol(t.err)]})}):(0,Sn.jsxs)(j4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,Sn.jsx)("thead",{children:(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:"Account ID"},"aid"),(0,Sn.jsx)("td",{children:"Description"},"desc"),(0,Sn.jsx)("td",{children:"Account"},"account"),(0,Sn.jsx)("td",{children:"Symbol"},"symbol"),(0,Sn.jsx)("td",{children:"Strategy"},"strategy"),(0,Sn.jsx)("td",{children:"Total"},"total"),(0,Sn.jsx)("td",{children:"Frozen"},"freeze"),(0,Sn.jsx)("td",{children:"Bet Percent"},"bp"),(0,Sn.jsx)("td",{children:"Update time"},"update_time")]})}),(0,Sn.jsx)("tbody",{children:t.map((e=>(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:(0,Sn.jsx)(Vt,{to:"/trading/account/".concat(e.rowid),children:e.rowid})},"aid"),(0,Sn.jsx)("td",{children:e.desc},"desc"),(0,Sn.jsx)("td",{children:e.account},"account"),(0,Sn.jsx)("td",{children:e.symbol},"symbol"),(0,Sn.jsx)("td",{children:e.strategy},"strategy"),(0,Sn.jsx)("td",{children:e.total},"total"),(0,Sn.jsx)("td",{children:e.freeze},"freeze"),(0,Sn.jsx)("td",{children:e.betPercent},"bp"),(0,Sn.jsx)("td",{children:El(e.update_time,!1,!0,!1)},"update_time")]})))})]})}function s9(){const e=rt(),[t]=Xt(),n=t.get("name");return(0,Sn.jsx)(c9,{aid:e.aid,an:n})}function l9(){const[e,t]=(0,r.useState)(null),[n,o]=(0,r.useState)(null);return(0,r.useEffect)((()=>{const e=new AbortController;return uc(e.signal).then((e=>{t(e),!("err"in e)&&e.length>0&&o(e[0])})),()=>{e.abort()}}),[]),null==e?(0,Sn.jsx)($c,{}):"err"in e?(0,Sn.jsx)("div",{children:(0,Sn.jsxs)("p",{children:["Error:",ol(e.err)]})}):(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("div",{children:(0,Sn.jsx)("select",{value:(null===n||void 0===n?void 0:n.aid)+"",onChange:t=>{const n=e.find((e=>e.aid+""===t.target.value));null!=n&&o(n)},children:e.map((e=>(0,Sn.jsx)("option",{value:e.aid,children:"".concat(e.name)},e.aid)))})}),null!=n&&(0,Sn.jsx)(c9,{aid:n.aid+"",an:n.name})]})}function c9(e){const t=(new Date).getTime(),[n,o]=(0,r.useState)(0),i=()=>{o((e=>e+1))},[a,s]=(0,r.useState)([El(t-2592e6),El(t)]);return(0,Sn.jsxs)("main",{style:{width:"40vw"},children:[(0,Sn.jsx)("h3",{children:"Accounts:"}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u5f00\u59cb\u65e5\u671f:"}),(0,Sn.jsx)("input",{value:a[0],type:"date",onChange:e=>s((t=>[e.target.value,t[1]]))}),(0,Sn.jsx)("span",{children:"-\u7ed3\u675f\u65e5\u671f:"}),(0,Sn.jsx)("input",{value:a[1],type:"date",onChange:e=>s((t=>[t[0],e.target.value]))})]}),(0,Sn.jsx)(Y7,{aid:e.aid,startDate:a[0],endDate:a[1],type:"main"}),(0,Sn.jsxs)("div",{style:{display:"flex"},children:[(0,Sn.jsx)(v9,{aName:e.an,manualBuy:!0,completeCB:i}),(0,Sn.jsx)("span",{style:{width:"10px"}}),(0,Sn.jsx)(v9,{aName:e.an,manualBuy:!1,completeCB:i})]}),(0,Sn.jsx)(a9,{aid:e.an,version:n})]})}function u9(e){let{accountId:t,runner:n,handleClean:o,aggs:i,isMain:a}=e;const s=(0,r.useCallback)((async e=>await ec(t,null==n?null:n,e,null!=a&&a)),[t,n,a]);return(0,Sn.jsx)(Qc,{interval:5e3,getter:s,cvt:e=>(0,Sn.jsxs)(j4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,Sn.jsx)("thead",{children:(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:"Account"},"aid"),(0,Sn.jsx)("td",{children:"Runner"},"runner"),(0,Sn.jsx)("td",{children:"Symbol"},"symbol"),(0,Sn.jsx)("td",{children:"Cost Price"},"cost"),(0,Sn.jsx)("td",{children:"Current Price"},"cp"),(0,Sn.jsx)("td",{children:"Total"},"total"),(0,Sn.jsx)("td",{children:"Frozen"},"frozen"),(0,Sn.jsx)("td",{children:"Gain"},"gain"),(0,Sn.jsx)("td",{children:"Trade Date"},"date"),(0,Sn.jsx)("td",{children:"Operation"},"op")]})}),(0,Sn.jsx)("tbody",{children:e.map((e=>{var t;const r=e.currentPrice;if(null!=r){var a;const n=(r-e.buyPrice)/e.buyPrice;t=(0,Sn.jsxs)("td",{children:[null===(a=e.currentPrice)||void 0===a?void 0:a.toFixed(3),"/",(r*e.totalQty*100).toFixed(2),"(",(0,Sn.jsxs)("span",{style:{color:n<0?"red":"green"},children:[(100*n).toFixed(2),"%"]}),")"]},"cp")}else t=(0,Sn.jsx)("td",{children:"0"},"cp");var s=null;const l=null===i||void 0===i?void 0:i.find((t=>Math.abs(t.t-e.createTime)<=6e4));null!=l&&null!=i&&(s=null!=e.stockPrice?[l.c,e.stockPrice]:[l.c,i[i.length-1].c]);const c="C"===e.symbol[e.symbol.length-9]?1:-1;return(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:e.accountId},"aid"),(0,Sn.jsx)("td",{children:null==n?(0,Sn.jsx)(Vt,{to:"/trading/runner/".concat(e.accountId,"/").concat(e.runner),children:i9(e.runner)}):i9(e.runner)},"runner"),(0,Sn.jsx)("td",{children:e.symbol},"symbol"),(0,Sn.jsxs)("td",{children:[e.buyPrice.toFixed(3),"/",(e.buyPrice*e.totalQty*100).toFixed(2)]},"cost"),t,(0,Sn.jsx)("td",{children:e.totalQty},"total"),(0,Sn.jsx)("td",{children:e.freezeQty},"frozen"),(0,Sn.jsx)("td",{children:(100*(null!=s&&s[0]>0?(s[1]-s[0])*c/s[0]:0)).toFixed(2)+"%"},"gain"),(0,Sn.jsx)("td",{children:Kl(e.createTime)},"date"),(0,Sn.jsx)("td",{children:null!=o&&(0,Sn.jsx)("button",{onClick:()=>{o(e.runner,e.symbol)},children:"\u5356\u51fa"})},"op")]})}))})]})})}function d9(){let e=rt();const[t,n]=(0,r.useState)(null),[o,i]=(0,r.useState)(null),a=(new Date).getTime(),[s,l]=(0,r.useState)([El(a-2592e6),El(a)]),[c,u]=(0,r.useState)(null),[d,h]=(0,r.useState)(0);if((0,r.useEffect)((()=>{const t=(new AbortController).signal;(async function(e,t){const n=new URLSearchParams;n.set("command","account"),n.set("aid",e);const r="".concat(xl,"/position_new?").concat(n.toString()),o=await Cl(r,t);if("err"in o)return o;if("d"in o){const t=o.d;return null!=t?t:{err:"no account found by id:"+e}}return{err:"fail to get data by key:d"}})(e.account,t).then((e=>{t.aborted||i(e)}))}),[e.account,d]),null==o)return(0,Sn.jsx)($c,{});if("err"in o)return(0,Sn.jsx)("div",{children:(0,Sn.jsxs)("p",{children:["Error:",ol(o.err)]})});{const r=(new Date).getTime(),i=(El(r-2592e6),El(r),()=>n(null)),a=()=>{null!=t&&nc(o.symbol,"".concat(e.account,"-").concat(o.strategy),t.total,t.betPercent,t.desc).then((e=>{e&&h((e=>e+1)),n(null)}))};return(0,Sn.jsxs)("main",{style:{flex:1,width:"40vw"},children:[(0,Sn.jsx)("div",{children:(0,Sn.jsx)("button",{onClick:()=>{n({total:o.total,betPercent:o.betPercent,desc:o.desc})},children:"\u4fee\u6539\u53c2\u6570"})}),(0,Sn.jsx)("div",{children:(0,Sn.jsxs)(j4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,Sn.jsx)("thead",{children:(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:"Name"},"name"),(0,Sn.jsx)("td",{children:"Value"},"value")]})}),(0,Sn.jsxs)("tbody",{children:[(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:"Symbol"},"name"),(0,Sn.jsx)("td",{children:o.symbol},"value")]},"symbol"),(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:"Strategy"},"name"),(0,Sn.jsx)("td",{children:o.strategy},"value")]},"strategy"),(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:"Total"},"name"),(0,Sn.jsx)("td",{children:o.total},"value")]},"total"),(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:"Bet Percent"},"name"),(0,Sn.jsx)("td",{children:o.betPercent},"value")]},"betPercent"),(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:"Description"},"name"),(0,Sn.jsx)("td",{children:o.desc},"value")]},"desc"),(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:"Account"},"name"),(0,Sn.jsx)("td",{children:o.account},"value")]},"account")]})]})}),o.strategy===Ys&&(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsx)("h3",{children:"Select Contracts:"}),(0,Sn.jsx)("div",{children:(0,Sn.jsx)(m9,{symbol:o.symbol,account:e.account})})]}),(0,Sn.jsx)("h3",{children:"Positions:"}),(0,Sn.jsx)(u9,{accountId:e.account,handleClean:(e,t)=>{u([e,t,!0,.01])}}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u5f00\u59cb\u65e5\u671f:"}),(0,Sn.jsx)("input",{value:s[0],type:"date",onChange:e=>l((t=>[e.target.value,t[1]]))}),(0,Sn.jsx)("span",{children:"-\u7ed3\u675f\u65e5\u671f:"}),(0,Sn.jsx)("input",{value:s[1],type:"date",onChange:e=>l((t=>[t[0],e.target.value]))})]}),(0,Sn.jsx)("div",{style:{width:"100%"},children:(0,Sn.jsx)(Y7,{aid:e.account,type:"sub",startDate:s[0],endDate:s[1]})}),(0,Sn.jsx)("h3",{children:"Trades:"}),(0,Sn.jsx)(h9,{accountId:e.account}),(0,Sn.jsxs)(s8,{show:null!=t,onHide:i,children:[(0,Sn.jsx)(s8.Header,{closeButton:!0,children:(0,Sn.jsx)(s8.Title,{children:"Edit"})}),(0,Sn.jsx)(s8.Body,{children:null!=t&&(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u603b\u91d1\u989d:"}),(0,Sn.jsx)("input",{value:t.total,type:"number",onChange:e=>{n((t=>t&&{...t,total:parseFloat(e.target.value)}))}})]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u4e0b\u6ce8\u6bd4\u4f8b:"}),(0,Sn.jsx)("input",{value:t.betPercent,type:"number",onChange:e=>{n((t=>t&&{...t,betPercent:parseFloat(e.target.value)}))}})]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u63cf\u8ff0:"}),(0,Sn.jsx)("input",{value:t.desc||"",type:"text",onChange:e=>{n((t=>t&&{...t,desc:e.target.value}))}})]})]})}),(0,Sn.jsxs)(s8.Footer,{children:[(0,Sn.jsx)(Vs,{color:"secondary",onClick:i,children:"Cancel"}),(0,Sn.jsx)(Vs,{color:"primary",onClick:a,children:"OK"})]})]}),(0,Sn.jsxs)(s8,{show:null!=c,onHide:()=>u(null),children:[(0,Sn.jsx)(s8.Header,{closeButton:!0,children:(0,Sn.jsx)(s8.Title,{children:"Edit"})}),(0,Sn.jsx)(s8.Body,{children:null!=c&&(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"Runner:"}),c[0]]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"Symbol:"}),c[1]]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u5356\u51fa\u6bd4\u4f8b:"}),(0,Sn.jsx)("input",{value:c[3],type:"number",onChange:e=>{u((t=>null==t?t:[t[0],t[1],t[2],parseFloat(e.target.value)]))}})]})]})}),(0,Sn.jsxs)(s8.Footer,{children:[(0,Sn.jsx)(Vs,{color:"secondary",onClick:()=>{u(null)},children:"Cancel"}),(0,Sn.jsx)(Vs,{color:"primary",onClick:()=>{null!=c&&async function(e,t){const n={aid:function(e){const t=e.split(":");return t[t.length-1].split("-")[0]}(e),percent:t},r=await gl("clean_position_req",JSON.stringify(n),null);return"s"in r&&!0===r.s}(c[0],c[3]).then((e=>{u(null)}))},children:"OK"})]})]})]})}}function h9(e){const{accountId:t,isMain:n}=e,[o,i]=(0,r.useState)(null);return(0,r.useEffect)((()=>{const e=new AbortController,r=e.signal;return tc(t,null,r,null!=n&&n).then((e=>{r.aborted||i(e)})),()=>{e.abort()}}),[t,n]),null==o?(0,Sn.jsx)($c,{}):"err"in o?(0,Sn.jsx)("div",{children:(0,Sn.jsxs)("p",{children:["Error:",ol(o.err)]})}):(0,Sn.jsxs)(j4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,Sn.jsx)("thead",{children:(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:"Trade Id"},"tid"),(0,Sn.jsx)("td",{children:"Order Id"},"oid"),(0,Sn.jsx)("td",{children:"Runner"},"runner"),(0,Sn.jsx)("td",{children:"Contract"},"symbol"),(0,Sn.jsx)("td",{children:"Side"},"side"),(0,Sn.jsx)("td",{children:"Price"},"price"),(0,Sn.jsx)("td",{children:"Buy Price"},"bprice"),(0,Sn.jsx)("td",{children:"QTY"},"qty"),(0,Sn.jsx)("td",{children:"Time"},"time")]})}),(0,Sn.jsx)("tbody",{children:qs(o).flatMap((e=>{let t=[];return e[1].forEach((e=>{const n=e.runner.split(":");var r="";n.length>3&&(r=n[n.length-2]+":"+n[n.length-3]),t.push((0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:e.tradeID},"tid"),(0,Sn.jsx)("td",{children:e.orderId},"oid"),(0,Sn.jsx)("td",{children:r},"runner"),(0,Sn.jsx)("td",{children:e.symbol},"symbol"),(0,Sn.jsx)("td",{children:1===e.side?"Buy":"Sell"},"side"),(0,Sn.jsx)("td",{children:e.price},"price"),(0,Sn.jsx)("td",{children:e.buyPrice},"bprice"),(0,Sn.jsx)("td",{children:e.qty},"qty"),(0,Sn.jsx)("td",{children:Kl(e.timestamp)},"time")]}))})),t.push((0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:"\u5c0f\u8ba1"},"tid"),(0,Sn.jsx)("td",{children:"-"},"oid"),(0,Sn.jsx)("td",{children:"-"},"runner"),(0,Sn.jsx)("td",{children:"-"},"symbol"),(0,Sn.jsx)("td",{children:"-"},"side"),(0,Sn.jsx)("td",{children:"-"},"price"),(0,Sn.jsx)("td",{children:e[0][0].toFixed(2)},"bprice"),(0,Sn.jsx)("td",{children:e[0][1].toFixed(2)},"qty"),(0,Sn.jsx)("td",{children:(e[0][1]/e[0][0]*100).toFixed(2)+"%"},"time")]})),t}))})]})}function p9(e){let{accountId:t,runner:n}=e;const[o,i]=(0,r.useState)(null);return(0,r.useEffect)((()=>{const e=new AbortController,r=e.signal;return async function(e,t,n){const r=new URLSearchParams;r.set("command","orders"),r.set("accountId",e),null!=t&&r.set("runner",t);const o="".concat(xl,"/position_new?").concat(r.toString()),i=await Cl(o,n);return"err"in i?i:"d"in i?i.d:{err:"fail to get data by key:d"}}(t,null==n?null:n,r).then((e=>{r.aborted||i(e)})),()=>{e.abort()}}),[]),null==o?(0,Sn.jsx)($c,{}):"err"in o?(0,Sn.jsx)("div",{children:(0,Sn.jsxs)("p",{children:["Error:",ol(o.err)]})}):(0,Sn.jsxs)(j4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,Sn.jsx)("thead",{children:(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:"Account"},"aid"),(0,Sn.jsx)("td",{children:"Order Id"},"oid"),(0,Sn.jsx)("td",{children:"Symbol"},"symbol"),(0,Sn.jsx)("td",{children:"Runner"},"runner"),(0,Sn.jsx)("td",{children:"Type"},"type"),(0,Sn.jsx)("td",{children:"Side"},"side"),(0,Sn.jsx)("td",{children:"Price"},"price"),(0,Sn.jsx)("td",{children:"QTY"},"qty"),(0,Sn.jsx)("td",{children:"Trade QTY"},"trade_qty"),(0,Sn.jsx)("td",{children:"TIF"},"tif"),(0,Sn.jsx)("td",{children:"Status"},"status"),(0,Sn.jsx)("td",{children:"Time"},"time"),(0,Sn.jsx)("td",{children:"Message"},"message")]})}),(0,Sn.jsx)("tbody",{children:o.map((e=>(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:e.accountId},"aid"),(0,Sn.jsx)("td",{children:e.id},"oid"),(0,Sn.jsx)("td",{children:e.symbol},"symbol"),(0,Sn.jsx)("td",{children:null==n?(0,Sn.jsx)(Vt,{to:"/trading/runner/".concat(e.accountId,"/").concat(e.runner),children:e.runner}):e.runner},"runner"),(0,Sn.jsx)("td",{children:e.type},"type"),(0,Sn.jsx)("td",{children:1===e.side?"Buy":"Sell"},"side"),(0,Sn.jsx)("td",{children:e.price},"price"),(0,Sn.jsx)("td",{children:e.qty},"qty"),(0,Sn.jsx)("td",{children:e.tradeQty},"trade_qty"),(0,Sn.jsx)("td",{children:e.tif},"tif"),(0,Sn.jsx)("td",{children:e.status},"status"),(0,Sn.jsx)("td",{children:Kl(e.createTime)},"time"),(0,Sn.jsx)("td",{children:e.errorMsg},"message")]})))})]})}function f9(e){const{uid:t}=e,[n,o]=(0,r.useState)(0),i=(0,r.useCallback)((async e=>{const n=await hc(t,e);if("err"in n)return n;{const r=t.split(":");if(r.length>1){const t=await async function(e,t){const n="".concat(xl,"/control?command=get&sellStrategy=").concat(e),r=await Cl(n,t);return"err"in r?r:"defaultConfig"in r?JSON.parse(r.defaultConfig.params):{err:"fail to find data by key:defaultConfig"}}(r[r.length-2],e);return"err"in t?t:[n,t]}return{err:"invalid uid:"+t}}}),[t,n]);return(0,Sn.jsx)(Qc,{getter:i,cvt:e=>{const n=e[0],r=e[1].map((e=>{if(e.key in n){const t=n[e.key];return{...e,default:t}}return e}));return(0,Sn.jsx)(i7,{name:"",config:r,updater:(e,n)=>{dc(t,e).then((e=>{const t="\u64cd\u4f5c"+(e?"\u6210\u529f":"\u5931\u8d25")+"!";e&&o((e=>e+1)),n(t)}))}})}})}function g9(){let e=rt();const t=e.runner.endsWith(Ys),[n,o]=(0,r.useState)(null);return(0,Sn.jsxs)("main",{children:[(0,Sn.jsx)("h3",{children:"Params:"}),(0,Sn.jsx)(f9,{uid:e.runner}),(0,Sn.jsx)("h3",{children:"Positions:"}),(0,Sn.jsx)(u9,{accountId:e.account,runner:e.runner,handleClean:t?(e,t)=>{o([t,!0,.01])}:void 0}),(0,Sn.jsx)("h3",{children:"Orders:"}),(0,Sn.jsx)(p9,{accountId:e.account,runner:e.runner}),t&&(0,Sn.jsxs)(s8,{show:null!=n,onHide:()=>o(null),children:[(0,Sn.jsx)(s8.Header,{closeButton:!0,children:(0,Sn.jsx)(s8.Title,{children:"Edit"})}),(0,Sn.jsx)(s8.Body,{children:null!=n&&(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u5408\u7ea6:"}),n[0]]}),(0,Sn.jsx)("div",{children:(0,Sn.jsx)("span",{children:"\u6309\u767e\u5206\u6bd4\u5356\u51fa"})}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u6570\u91cf:"}),(0,Sn.jsx)("input",{value:n[2],type:"number",onChange:e=>{o((t=>null==t?t:[t[0],t[1],parseFloat(e.target.value)]))}})]})]})}),(0,Sn.jsxs)(s8.Footer,{children:[(0,Sn.jsx)(Vs,{color:"secondary",onClick:()=>{o(null)},children:"Cancel"}),(0,Sn.jsx)(Vs,{color:"primary",onClick:()=>{null!=n&&lc(e.runner,n[0],n[1],n[2]).then((e=>{o(null)}))},children:"OK"})]})]})]})}function m9(e){const[t,n,o,i,a]=null!=e.default?e.default:[3e3,1,"15:30",1,.004],[s,l]=(0,r.useState)(i),[c,u]=(0,r.useState)(a),[d,h]=(0,r.useState)(null),[p,f]=(0,r.useState)(null),[g,m]=(0,r.useState)(!1),v=(t,n)=>{const r=(new AbortController).signal;m(!0),async function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const o="".concat(xl,"/manualSelectContracts?days=").concat(t,"&symbol=").concat(e,"&percent=").concat(n),i=await Cl(o,r);return i}(e.symbol,t,n,r).then((e=>{if(h(e),!("err"in e)){const t=e.d;null!=t&&f([t.target.call,t.target.put])}m(!1)}))},[y,x]=(0,r.useState)(null),b=()=>x(null);var w=(0,Sn.jsx)("div",{children:(0,Sn.jsx)("p",{children:"Unknown"})});if(g)w=(0,Sn.jsx)($c,{});else if(null==d)w=(0,Sn.jsx)("div",{children:(0,Sn.jsx)("p",{children:"Empty Data"})});else if("err"in d)w=(0,Sn.jsx)("div",{children:(0,Sn.jsx)("p",{children:ol(d.err)})});else{const e=d.d;null!=e&&null!=p&&(w=(0,Sn.jsxs)("div",{children:[(0,Sn.jsxs)("div",{children:[(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"Stock Price:"}),e.stockPrice]}),(0,Sn.jsxs)("div",{className:"ContainerRow",children:[(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"Call"}),(0,Sn.jsx)(ro,{sx:{m:3},variant:"standard",children:(0,Sn.jsx)(R3,{"aria-labelledby":"demo-error-radios",name:"call",value:p[0],onChange:e=>{f((t=>null==t?t:[e.target.value,t[1]]))},children:e.alternativesO.map((e=>(0,Sn.jsx)(i4,{value:e[0].symbol,control:(0,Sn.jsx)(b4,{}),label:e[0].symbol+" / "+e[0].price.toFixed(3)+" / "+(100*e[0].iv).toFixed(3)+"% / "+e[0].v},e[0].symbol)))})})]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"Put:"}),(0,Sn.jsx)(ro,{sx:{m:3},variant:"standard",children:(0,Sn.jsx)(R3,{"aria-labelledby":"demo-error-radios",name:"put",value:p[1],onChange:e=>{f((t=>null==t?t:[t[0],e.target.value]))},children:e.alternativesO.map((e=>(0,Sn.jsx)(i4,{value:e[1].symbol,control:(0,Sn.jsx)(b4,{}),label:e[1].symbol+" / "+e[1].price.toFixed(3)+" / "+(100*e[1].iv).toFixed(3)+"% / "+e[1].v},e[1].symbol)))})})]})]})]}),(0,Sn.jsx)("div",{children:(null!=p[0]||null!=p[1])&&(0,Sn.jsx)("button",{onClick:()=>{x([t,n,o,2])},children:"Buy"})})]}))}return(0,Sn.jsxs)("div",{children:[(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u5230\u671f\u65f6\u95f4\u8ddd\u79bb\u4eca\u5929\u7684\u4ea4\u6613\u65e5\u6570:"}),(0,Sn.jsx)("input",{value:s,type:"number",onChange:e=>l(parseInt(e.target.value))}),(0,Sn.jsx)("input",{value:c,type:"number",onChange:e=>u(parseFloat(e.target.value))}),(0,Sn.jsx)("button",{onClick:()=>{v(s,c)},children:"Filter"})]}),w,(0,Sn.jsxs)(s8,{show:null!=y,onHide:b,children:[(0,Sn.jsx)(s8.Header,{closeButton:!0,children:(0,Sn.jsx)(s8.Title,{children:"Edit"})}),(0,Sn.jsx)(s8.Body,{children:null!=y&&null!=p&&(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"Call:"}),(0,Sn.jsx)("p",{children:p[0]}),(0,Sn.jsx)("span",{children:"Put:"}),(0,Sn.jsx)("p",{children:p[1]})]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u5355\u8fb9\u4e0b\u6ce8\u91d1\u989d:"}),(0,Sn.jsx)("input",{value:y[0],type:"number",onChange:e=>{x((t=>null==t?t:[parseFloat(e.target.value),t[1],t[2],t[3]]))}})]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u6301\u4ed3\u5929\u6570:"}),(0,Sn.jsx)("input",{value:y[1],type:"number",onChange:e=>{x((t=>null==t?t:[t[0],parseInt(e.target.value),t[2],t[3]]))}})]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u5356\u51fa\u65f6\u95f4:"}),(0,Sn.jsx)("input",{value:y[2],type:"time",onChange:e=>{x((t=>null==t?t:[t[0],t[1],e.target.value,t[3]]))}})]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u4e70\u5165\u65b9\u5f0f(0:\u5355\u4e70call,1:\u5355\u4e70put,2:\u53cc\u8fb9\u4e70\u5165):"}),(0,Sn.jsx)("input",{value:y[3],type:"number",onChange:e=>{x((t=>null==t?t:[t[0],t[1],t[2],parseInt(e.target.value)]))}})]})]})}),(0,Sn.jsxs)(s8.Footer,{children:[(0,Sn.jsx)(Vs,{color:"secondary",onClick:b,children:"Cancel"}),(0,Sn.jsx)(Vs,{color:"primary",onClick:()=>{var t;null!=p&&(null!=y&&(t=2===y[3]?{}:{singleSide:1===y[3]?"put":"call"},async function(e,t,n,r,o,i){let a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;const s=new URLSearchParams,l=function(e){const t=e.length;return e.substring(2,t-15)}(t);s.set("command","start_sell");const c={num:e,extra:i,params:o,callContract:t,putContract:n,sellName:"manual sell",buyName:"".concat(r,"-manual buy"),stock:l};console.log(c),s.set("params",JSON.stringify(c));const u="".concat(xl,"/task?").concat(s.toString()),d=await Cl(u,a);if("err"in d)return d;{const e=fl(d,["d","data"]);return null==e?{err:"no key:data found"}:"s"in e?e.s:{err:"no inner key:s found"}}}(y[0],p[0],p[1],e.account,{daysDelay:y[1],tt1:y[2]},t).then((e=>{x(null)}))))},children:"OK"})]})]})]})}function v9(e){const[t,n]=(0,r.useState)(null),[o,i]=(0,r.useState)(e.manualBuy?[Ys]:null);(0,r.useEffect)((()=>{if(!e.manualBuy){const e=(new AbortController).signal;Bl(e).then((t=>{e.aborted||i(t.filter((e=>e.isBuy)).map((e=>e.id)).concat(Ys))}))}}),[e.manualBuy]);const a=()=>n(null),s=()=>{null!=t&&nc(t[0],null!=e.aName?"".concat(e.aName,"-").concat(t[1]):t[1],t[2],t[3],t[4]).then((t=>{t&&e.completeCB(),n(null)}))},l=e.manualBuy?"\u65b0\u5efa\u624b\u52a8\u4ea4\u6613\u8d26\u53f7":"\u65b0\u5efa\u4ea4\u6613\u8d26\u53f7";return null==o?(0,Sn.jsx)($c,{}):"err"in o?(0,Sn.jsx)("p",{children:ol(o.err)}):(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsx)("div",{children:(0,Sn.jsx)("button",{onClick:()=>{n(["",o[0],3e3,.1,""])},children:l})}),(0,Sn.jsxs)(s8,{show:null!=t,onHide:a,children:[(0,Sn.jsx)(s8.Header,{closeButton:!0,children:(0,Sn.jsx)(s8.Title,{children:"Edit"})}),(0,Sn.jsx)(s8.Body,{children:null!=t&&(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u80a1\u7968\u4ee3\u7801:"}),(0,Sn.jsx)("input",{value:t[0],type:"text",onChange:e=>{n((t=>null==t?t:[e.target.value,t[1],t[2],t[3],t[4]]))}})]}),null!=e.aName&&(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u771f\u5b9e\u8d26\u53f7:"}),e.aName]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u7b56\u7565:"}),(0,Sn.jsx)("select",{value:t[1],onChange:e=>{n((t=>null==t?t:[t[0],e.target.value,t[2],t[3],t[4]]))},children:o.map((e=>(0,Sn.jsx)("option",{value:e,children:e},e)))})]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u8d26\u53f7\u603b\u8d44\u91d1:"}),(0,Sn.jsx)("input",{value:t[2],type:"number",onChange:e=>{n((t=>null==t?t:[t[0],t[1],parseFloat(e.target.value),t[3],t[4]]))}})]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u4e0b\u6ce8\u6bd4\u4f8b:"}),(0,Sn.jsx)("input",{value:t[3],type:"number",onChange:e=>{n((t=>null==t?t:[t[0],t[1],t[2],parseFloat(e.target.value),t[4]]))}})]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u8bf4\u660e:"}),(0,Sn.jsx)("input",{value:t[4],type:"text",onChange:e=>{n((t=>null==t?t:[t[0],t[1],t[2],t[3],e.target.value]))}})]})]})}),(0,Sn.jsxs)(s8.Footer,{children:[(0,Sn.jsx)(Vs,{color:"secondary",onClick:a,children:"Cancel"}),(0,Sn.jsx)(Vs,{color:"primary",onClick:s,children:"OK"})]})]})]})}function y9(e,t){const n=new Map;if(t.forEach((e=>{const t=e.extra;if(null!=t&&"type"in t&&"agg"==t.type){const e=t.timestamp,r=n.get(e),o=t.total;null!=r?r.push(o):n.set(e,[o])}})),e.length>0){const t=[["10w",1e5,0,[]],["15w",15e4,0,[]],["20w",2e5,0,[]],["25w",25e4,0,[]]],i=Yl(e[0].t);var r=0,o=0;const a=[];e.forEach((e=>{const s=e.t;s>=i&&(r+=e.v*e.vw);const l=n.get(s);null!=l&&(o+=l.reduce(((e,t)=>e+t),0)),a.push(r>0?1e3*o/r:0),t.forEach((e=>{null!=l&&l.length>0&&(e[2]+=l.filter((t=>t>e[1]-1e-4)).length),e[3].push(s>i?e[2]/Math.ceil((s-i)/36e5):0)}))}));return t.map((e=>[e[0],e[3]])).concat([["all",a]])}return[]}function x9(e,t){const n=new Map;if(t.forEach((e=>{const t=e,r=t.tradeTimestamp,o=n.get(r),i=t.tradeMoney;null!=o?o.push(i):n.set(r,[i])})),e.length>0){const t=[["10w",1e5,0,[]],["15w",15e4,0,[]],["20w",2e5,0,[]],["25w",25e4,0,[]]],i=Yl(e[0].t);var r=0,o=0;const a=[];e.forEach((e=>{const s=e.t;s>=i&&(r+=e.v*e.vw);const l=n.get(s);null!=l&&(o+=l.reduce(((e,t)=>e+t),0)),a.push(r>0?1e3*o/r:0),t.forEach((e=>{null!=l&&l.length>0&&(e[2]+=l.filter((t=>t>e[1]-1e-4)).length),e[3].push(s>i?e[2]/Math.ceil((s-i)/36e5):0)}))}));return t.map((e=>[e[0],e[3]])).concat([["all",a]])}return[]}function b9(e){const{symbol:t}=e,[n,o]=(0,r.useState)(void 0),i=(0,r.useContext)(z2),[a,s]=(0,r.useState)([]);return(0,r.useEffect)((()=>{const e=new AbortController,n=e.signal;return Sc(t,n).then((e=>{n.aborted||null==e||o(e)})),()=>{e.abort()}}),[t]),(0,r.useEffect)((()=>{const e=new Map,n=null===i||void 0===i?void 0:i.subscribe("symbol",t,(t=>{"reset"===t.command&&e.clear(),Object.entries(t.data).forEach((t=>{const n=t[1];e.set(t[0],n)})),s(rl(Array.from(e.values()).sort(((e,t)=>e.t-t.t)),!0))}),{needHistory:!0});return()=>{null!=n&&(null===i||void 0===i||i.unsubscribe("symbol",t,n))}}),[t,i]),(0,Sn.jsx)("div",{style:{width:"100%",aspectRatio:"16/9"},children:(0,Sn.jsx)(l3,{symbol:t,preClose:n,signals:[],isDay:!0,historyData:rl(a,!0),zoomRange:e.zoomRange,setZoomRange:e.setZoomRange})})}function w9(e){const{positions:t,runner:n,reverse:o}=e,[i,a]=(0,r.useState)(.01),[s,l]=(0,r.useState)({}),c=(0,r.useContext)(z2);return(0,r.useEffect)((()=>{const e=e=>{if(e.target.startsWith("symbol@")){const t=e.target.slice(7),n=ll(e.data);null!=n&&l((e=>({...e,[t]:n})))}},n=e=>{if(e.target.startsWith("data@")){const n=e.target.slice(10);var t=null;if("now"in e.data){const n=e.data.now;"price"in n&&(t=n.price)}null!=t&&l((e=>({...e,["data-"+n]:t})))}},r=t.map((t=>[t.sym,null===c||void 0===c?void 0:c.subscribe("symbol",t.sym,e)])),o=t.map((e=>{const t="ws:A:".concat(e.sym);return[t,null===c||void 0===c?void 0:c.subscribe("data",t,n)]}));return()=>{r.forEach((e=>{null!=e[1]&&(null===c||void 0===c||c.unsubscribe("symbol",e[0],e[1]))})),o.forEach((e=>{null!=e[1]&&(null===c||void 0===c||c.unsubscribe("data",e[0],e[1]))}))}}),[c,t]),(0,Sn.jsxs)(j4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,Sn.jsx)("thead",{children:(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:"\u5408\u7ea6"},"symbol"),(0,Sn.jsx)("td",{children:"\u4e70\u5165\u4ef7"},"cost"),(0,Sn.jsx)("td",{children:"\u6570\u91cf"},"total"),(0,Sn.jsx)("td",{children:"\u51bb\u7ed3\u6570\u91cf"},"frozen"),(0,Sn.jsx)("td",{children:"\u65e5\u671f"},"date"),(0,Sn.jsx)("td",{children:"\u64cd\u4f5c"},"op")]})}),(0,Sn.jsx)("tbody",{children:t.map((e=>{var t,r=null;const l="data-"+e.sym;if(l in s){const t=s[l],n=(o?-1:1)*(t-e.buyPrice)/e.buyPrice;r=(0,Sn.jsxs)("td",{children:[e.buyPrice.toLocaleString(),"/",t.toLocaleString(),"|realtime:(",(0,Sn.jsxs)("span",{style:{color:n<0?"red":"green"},children:[(100*n).toLocaleString(),"%"]}),")"]},"cost")}if(e.sym in s){const n=s[e.sym];if("number"===typeof n){const r=(o?-1:1)*(n-e.buyPrice)/e.buyPrice;t=(0,Sn.jsxs)("td",{children:[e.buyPrice.toLocaleString(),"/",n.toLocaleString(),"|(",(0,Sn.jsxs)("span",{style:{color:r<0?"red":"green"},children:[(100*r).toLocaleString(),"%"]}),")"]},"cost")}else{const r=(o?-1:1)*(n[0]-e.buyPrice)/e.buyPrice,i=(o?-1:1)*(n[1]-e.buyPrice)/e.buyPrice;t=(0,Sn.jsxs)("td",{children:[e.buyPrice.toLocaleString(),"/",n.toLocaleString(),"|(",(0,Sn.jsxs)("span",{style:{color:r<0?"red":"green"},children:[(100*r).toLocaleString(),"%"]}),")|(",(0,Sn.jsxs)("span",{style:{color:i<0?"red":"green"},children:[(100*i).toLocaleString(),"%"]}),")"]},"cost")}}else t=(0,Sn.jsx)("td",{children:e.buyPrice},"cost");return(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:e.sym}),(0,Sn.jsx)("td",{children:null!=r?r:t}),(0,Sn.jsx)("td",{children:e.qty}),(0,Sn.jsx)("td",{children:e.freezeQty}),(0,Sn.jsx)("td",{children:Kl(e.createTime)}),(0,Sn.jsx)("td",{children:(0,Sn.jsx)(p7,{msg:"\u5356\u51fa",content:(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u5408\u7ea6:"}),e.sym]}),(0,Sn.jsx)("div",{children:(0,Sn.jsx)("span",{children:"\u6309\u767e\u5206\u6bd4\u5356\u51fa"})}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u6570\u91cf:"}),(0,Sn.jsx)(Q8,{value:i,type:"number",handleUpdate:a})]})]}),callBack:t=>{lc(n,e.sym,!0,i).then((e=>{t("\u63d0\u4ea4"+(e?"\u6210\u529f":"\u5931\u8d25"))}))}})})]})}))})]})}function S9(e){const{runner:t,version:n,reverse:o}=e,i=(0,r.useCallback)((async e=>await async function(e,t){const n=await hc(e,t);return"err"in n?n:"position"in n?n.position.filter((e=>e.qty>0)):{err:"no position found!"}}(t,e)),[t,n]);return(0,Sn.jsx)(Qc,{getter:i,cvt:e=>(0,Sn.jsx)(w9,{positions:e,runner:t,reverse:o})})}function _9(e){const{account:t,mainId:n,version:o,reverse:i}=e,a=(0,r.useCallback)((async e=>{const r=await cc(e);return"err"in r?r:r.filter((e=>e.startsWith("option:")&&e.endsWith(":".concat(n,"-").concat(t.strategy))))}),[t,n,o]);return(0,Sn.jsx)(Qc,{getter:a,cvt:e=>(0,Sn.jsx)("div",{children:e.map((e=>{const t=e.split(":");var n=null;if(t.length>2){const e=parseInt(t[t.length-3]);isNaN(e)||(n=Kl(e))}return(0,Sn.jsxs)("div",{children:[null!=n&&(0,Sn.jsxs)("p",{children:["\u521b\u5efa\u65f6\u95f4:",(0,Sn.jsx)("span",{children:n})]}),(0,Sn.jsx)(S9,{runner:e,version:o,reverse:i},e)]})}))})})}async function A9(e,t,n,r,o){const i=(e>"2023-03-21"?r.rowid:r.account)+"-"+n,a=await sc(t,i,"energy",e,e,o);if("err"in a)return a;{const n=await _l(t,e,e,1,"minute",o);return"err"in n?n:[a[0],a[1],n.results]}}function k9(e){const{positions:t,runner:n,handleClean:o}=e,[i,a]=(0,r.useState)({}),s=(0,r.useContext)(z2);(0,r.useEffect)((()=>{const e=e=>{if(e.target.startsWith("symbol@")){const t=e.target.slice(7),n=ll(e.data);null!=n&&a((e=>({...e,[t]:n})))}},n=e=>{if(e.target.startsWith("data@")){const n=e.target.slice(10);var t=null;if("now"in e.data){const n=e.data.now;"price"in n&&(t=n.price)}null!=t&&a((e=>({...e,["data-"+n]:t})))}},r=t.map((e=>{const t="ws:A:".concat(e.symbol);return[t,null===s||void 0===s?void 0:s.subscribe("data",t,n)]})),o=t.map((t=>[t.symbol,null===s||void 0===s?void 0:s.subscribe("symbol",t.symbol,e)]));return()=>{o.forEach((e=>{null!=e[1]&&(null===s||void 0===s||s.unsubscribe("symbol",e[0],e[1]))})),r.forEach((e=>{null!=e[1]&&(null===s||void 0===s||s.unsubscribe("data",e[0],e[1]))}))}}),[s,t]);const l=t;return(0,Sn.jsxs)(j4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,Sn.jsx)("thead",{children:(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:"Account"},"aid"),(0,Sn.jsx)("td",{children:"Runner"},"runner"),(0,Sn.jsx)("td",{children:"Symbol"},"symbol"),(0,Sn.jsx)("td",{children:"Cost Price"},"cost"),(0,Sn.jsx)("td",{children:"Current Price"},"cp"),(0,Sn.jsx)("td",{children:"Total"},"total"),(0,Sn.jsx)("td",{children:"Frozen"},"frozen"),(0,Sn.jsx)("td",{children:"Gain"},"gain"),(0,Sn.jsx)("td",{children:"Trade Date"},"date"),(0,Sn.jsx)("td",{children:"Operation"},"op")]})}),(0,Sn.jsx)("tbody",{children:l.map((t=>{var r;const a=t.symbol.startsWith("O:")?100:1;var s=null;const l="data-"+t.symbol;if(l in i){const n=i[l],r=(e.reverse?-1:1)*(n-t.buyPrice)/t.buyPrice;s=(0,Sn.jsxs)("td",{children:["(",n.toLocaleString(),"/",(n*t.totalQty*a).toLocaleString()," |realtime:",(0,Sn.jsxs)("span",{style:{color:r<0?"red":"green"},children:[(100*r).toLocaleString(),"%"]}),")"]},"cp")}if(t.symbol in i){const n=i[t.symbol];if("number"===typeof n){const o=(e.reverse?-1:1)*(n-t.buyPrice)/t.buyPrice;r=(0,Sn.jsxs)("td",{children:[n.toFixed(3),"/",(n*t.totalQty*a).toLocaleString(),"(",(0,Sn.jsxs)("span",{style:{color:o<0?"red":"green"},children:[(100*o).toLocaleString(),"%"]}),")"]},"cp")}else{const o=(e.reverse?-1:1)*(n[0]-t.buyPrice)/t.buyPrice,i=(e.reverse?-1:1)*(n[1]-t.buyPrice)/t.buyPrice;r=(0,Sn.jsxs)("td",{children:[n[0].toFixed(3),"/",(n[0]*t.totalQty*a).toLocaleString(),"|(",(0,Sn.jsxs)("span",{style:{color:o<0?"red":"green"},children:[(100*o).toLocaleString(),"%"]}),")|(",(0,Sn.jsxs)("span",{style:{color:i<0?"red":"green"},children:[(100*i).toLocaleString(),"%"]}),")"]},"cp")}}else r=(0,Sn.jsx)("td",{children:"-"},"cp");t.symbol[t.symbol.length-9];return(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:t.accountId},"aid"),(0,Sn.jsx)("td",{children:null==n?(0,Sn.jsx)(Vt,{to:"/trading/runner/".concat(t.accountId,"/").concat(t.runner),children:i9(t.runner)}):i9(t.runner)},"runner"),(0,Sn.jsx)("td",{children:t.symbol},"symbol"),(0,Sn.jsxs)("td",{children:[t.buyPrice.toLocaleString(),"/",(t.buyPrice*t.totalQty*a).toLocaleString()]},"cost"),null!=s?s:r,(0,Sn.jsx)("td",{children:t.totalQty},"total"),(0,Sn.jsx)("td",{children:t.freezeQty},"frozen"),(0,Sn.jsx)("td",{children:(0).toFixed(2)+"%"},"gain"),(0,Sn.jsx)("td",{children:Kl(t.createTime)},"date"),(0,Sn.jsx)("td",{children:null!=o&&(0,Sn.jsx)("button",{onClick:()=>{o(t.runner,t.symbol)},children:"\u5356\u51fa"})},"op")]})}))})]})}function C9(e){let{accountId:t,runner:n,handleClean:o,version:i,reverse:a}=e;const s=(0,r.useCallback)((async e=>await ec(t,null==n?null:n,e)),[t,n,i]);return(0,Sn.jsx)(Qc,{getter:s,cvt:e=>(0,Sn.jsx)(k9,{positions:e,handleClean:o,runner:n,reverse:a})})}function M9(e){var t;const[n,o]=(0,r.useState)(void 0),[i,a]=(0,r.useState)(0),[s,l]=(0,r.useState)([]),[c,u]=(0,r.useState)(null),[d,h]=(0,r.useState)([]),[p,f]=(0,r.useState)([]),[g,m]=(0,r.useState)([]),[v,y]=(0,r.useState)(!1),x=tt(),[b,w]=(0,r.useState)([]),{filter:S,symbol:_,preClose:A,middle:k,front:C,task:M,account:I,mainId:T,showBuyPoint:D}=e,[j,P]=(0,r.useState)(void 0),L="factor buy"===I.strategy,R=Ws.has(I.strategy),[E,N]=(0,r.useState)([]),O=(0,r.useContext)(z2);(0,r.useEffect)((()=>{const e=new AbortController,t=I.rowid+"-"+I.strategy,n=El();sc(_,t,"energy",n,n,e.signal).then((e=>{"err"in e||f(e[0])}))}),[i,I,_]),(0,r.useEffect)((()=>{if(null==A){const e=new AbortController,t=e.signal;return Sc(_,t).then((e=>{t.aborted||null==e||P(e)})),()=>{e.abort()}}P(A)}),[A,_]),(0,r.useEffect)((()=>{const e=new Map,t=new Map,n=new Map,r=new Map,i=new Map,s=new Map,c=new Map,d=null===O||void 0===O?void 0:O.subscribe("symbol",_,(n=>{"reset"===n.command&&e.clear(),Object.entries(n.data).forEach((n=>{const r=n[1];e.set(n[0],r),t.set("latest",r)}));const r=rl(Array.from(e.values()).sort(((e,t)=>e.t-t.t)),!0);l(r)}),{needHistory:!0});var p,f;L?(p="ws:AM:vol-QQQ",f=null===O||void 0===O?void 0:O.subscribe("data",p,(e=>{"reset"===e.command&&s.clear(),Object.entries(e.data).forEach((e=>{const t=e[1];s.set(e[0],t)}));const n=t.get("latest");if(null!=n){const e=nl(Array.from(s.values()),(e=>6e4*Math.floor(e.ts/6e4)),((e,t)=>({ts:t,call:0,put:0,calls:[],puts:[]})),n.t);m(e.sort(((e,t)=>e.ts-t.ts)))}}),{needHistory:!0})):(p="vol-QQQ",f=null===O||void 0===O?void 0:O.subscribe("symbol",p,(e=>{"reset"===e.command&&i.clear(),Object.entries(e.data).forEach((e=>{const t=e[1];i.set(e[0],[parseInt(e[0]),t[0],t[1]])}));const n=t.get("latest");if(null!=n){const e=nl(Array.from(i.values()),(e=>e[0]),((e,t)=>[t,0,0]),n.t);u([e.map((e=>e[1])),e.map((e=>e[2]))])}}),{needHistory:!0}));const g=null===O||void 0===O?void 0:O.subscribe("service","energy@".concat(_),(e=>{Object.entries(e.data).forEach((e=>{const t=e[1],n=e[1],o="".concat(t.contract,"_").concat(n.timestamp),i=c.get(o),a=null!=i?"@@@\u6d41\u5165:".concat(i.callVolume,",").concat(i.callMoney,"@@@\u6d41\u51fa:").concat(i.putVolume,",").concat(i.putMoney):"";r.set(e[0],{strategy:"energy",subtype:n.msg+a,timestamp:n.timestamp,extra:t})})),w(Array.from(r.values()).sort(((e,t)=>e.timestamp-t.timestamp)))})),v=(Math.floor((new Date).getTime()/$2),null===O||void 0===O?void 0:O.subscribe("task",M,(e=>{if("reverse"in e.data){const t=e.data;o(t.reverse.reversePrices)}else"order"in e.data&&a((e=>e+1));"reset"===e.command&&n.clear();const r=[];Object.entries(e.data).forEach((e=>{if(e[0].startsWith("b@")){const t=e[0][2],o=e[0].slice(4).split("-");if(2===o.length){const i=o[0],a=parseInt(o[1]);let s=n.get(t);null==s&&(s=new Map,n.set(t,s));let l=s.get(i);null==l&&(l=[],s.set(i,l)),(0===l.length||l[l.length-1][0]<a)&&(r.push(a),l.push([a,e[1]]))}}else if(e[0].startsWith("obj@netflow_")){const t=e[0].slice(12),n=e[1];c.set(t,n)}}));const i=t.get("latest");if(r.length>0&&null!=i){const e=Array.from(n.entries()).map((e=>Array.from(e[1].entries()).map((e=>{const t=nl(e[1],(e=>e[0]),((e,t)=>[t,e[1]]),i.t);return[e[0],t.map((e=>e[1]))]}))));h(e)}}),{needHistory:!0}));return()=>{null!=g&&(null===O||void 0===O||O.unsubscribe("service","energy@".concat(_),g)),null!=d&&(null===O||void 0===O||O.unsubscribe("symbol",_,d)),null!=v&&(null===O||void 0===O||O.unsubscribe("task",M,v)),null!=f&&(null===O||void 0===O||O.unsubscribe(L?"data":"symbol",p,f))}}),[O,_,M,L]),(0,r.useEffect)((()=>{const e=El(),t=[];g3(S,e,b).sort(((e,t)=>e.timestamp-t.timestamp)).forEach((e=>{const n=6e4*Math.floor(e.timestamp/6e4);0===t.length||t[t.length-1][0]<n?t.push([n,[e.subtype]]):t[t.length-1][1].push(e.subtype)})),N(D?Xs(Hl(p).map((e=>[e[0],e[1]])),t):t)}),[S,b,p,D]);const z=s.length;var B=void 0;if(L){if(g.length>0){const e=g.map((e=>e.call)),t=g.map((e=>e.put)),n=Array.from({length:11}).map(((e,t)=>["call strike price ".concat(t-5),g.map((e=>t<e.calls.length?e.calls[t][0]:0))])),r=Array.from({length:11}).map(((e,t)=>["put strike price ".concat(t-5),g.map((e=>t<e.puts.length?e.puts[t][0]:0))])),o=Array.from({length:11}).map(((e,t)=>["call vol ".concat(t-5),g.map((e=>t<e.calls.length?e.calls[t][1]:0))])),i=Array.from({length:11}).map(((e,t)=>["put vol ".concat(t-5),g.map((e=>t<e.puts.length?e.puts[t][1]:0))]));B=v?[[["call vol",e],["put vol",t]],n,o,r,i]:[[["call vol",e],["put vol",t]]]}}else if(null!=c){B=[[["call vol",pl(c[0],z,(()=>0))],["put vol",pl(c[1],z,(()=>0))]]]}return(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsxs)("div",{style:{width:"100%",marginTop:"2rem",marginBottom:"2rem"},children:[I.strategy.search("energy buy")>-1&&(0,Sn.jsx)(m7,{strategyId:"".concat(T,"-").concat(I.strategy)}),I.strategy.search("energy double buy")>-1&&(0,Sn.jsx)(g7,{strategyId:"stock:".concat(I.symbol,"-").concat(T,"-").concat(I.strategy)}),(I.strategy.search("EventBack buy")>-1||I.strategy.search("IronCondor buy")>-1)&&(0,Sn.jsx)(f7,{strategyId:"stock:".concat(I.symbol,"-").concat(T,"-").concat(I.strategy)}),"factor buy"===I.strategy&&(0,Sn.jsx)("button",{onClick:e=>{x("/strategy/log/stock:".concat(I.symbol,"-").concat(T,"-").concat(I.strategy))},children:"\u67e5\u770b\u65e5\u5fd7"}),null!=C&&C(),(0,Sn.jsx)("div",{style:{width:"100%",aspectRatio:"16/".concat(18+3*((null===(t=B)||void 0===t?void 0:t.length)||0+d.length))},children:(0,Sn.jsx)(I9,{symbol:_,preClose:"loading"===j?void 0:j,signals:E,isDay:!0,historyData:s,zoomRange:e.zoomRange,setZoomRange:e.setZoomRange,lines:n,extras:y9(s,b),extraLines:null==B?d:[...B,...d]})}),L&&(0,Sn.jsxs)("div",{children:["\u662f\u5426\u5c55\u793a\u6863\u4f4d\u4ef7\u683c:",(0,Sn.jsx)("input",{type:"checkbox",checked:v,onChange:e=>y(e.target.checked)})]})]}),k&&k(p),(0,Sn.jsx)(_9,{account:I,version:i,mainId:T,reverse:R}),(0,Sn.jsx)(C9,{accountId:I.rowid+"",version:i,reverse:R}),(0,Sn.jsx)("div",{style:{marginTop:"3rem"},children:(0,Sn.jsx)(g8,{addPercent:!0,data:Nl(p),aggs:s})},"detail")]})}function I9(e){const[t,n]=(0,r.useState)(null),[o,i]=(0,r.useState)([1,100]),a=W2(),s=(0,r.useRef)(null),l=(0,r.useCallback)(((t,n)=>{const r=e.clickDay;null!=r&&r(t,n)}),[e.clickDay]),c=(0,r.useCallback)((t=>{const n=e.clickPoint;null!=n&&n(t)}),[e.clickPoint]),{historyData:u,isDay:d,symbol:h,preClose:p,signals:f,lines:g,extraLines:m,extras:v}=e;return(0,r.useEffect)((()=>{if(null!=s.current)if(null==t){const t=ZT(s.current);t.on("click",(e=>{if("markPoint"===e.componentType){const t=e.data.coord;3===t.length&&"string"===typeof t[2]&&c(t[2])}if("series"===e.componentType&&"candlestick"===e.componentSubType){var t=0;t=e.dataIndex>0&&u.length>=e.dataIndex?u[e.dataIndex-1].c:e.data[1],l(e.name.slice(0,10),t)}})),t.on("datazoom",(t=>{if(null!=t&&"object"===typeof t)if("start"in t&&"end"in t){const n=t;(e.setZoomRange||i)([n.start,n.end])}else if("batch"in t){const n=t.batch;if(Array.isArray(n)){const t=n;if(t.length>0){const n=t[0];if("start"in n&&"end"in n){const t=n;(e.setZoomRange||i)([t.start,t.end])}}}}})),n(t)}else{const n=u;if(null!=n&&n.length>0){const i=n.map((e=>d?Ml.format(e.t):El(e.t,!0))),s=d&&null!=p?n.map((e=>[e.o,e.c,e.l,e.h,p])):n.map((e=>[e.o,e.c,e.l,e.h])),l=n.map((e=>e.v)),c=new Map;f.forEach((e=>{const t=d?Ml.format(e[0]):El(e[0],!0);c.set(t,e[1].map((e=>{const t=e.match(/O:\w+\d{6}[CP]\d{8}/g);return null!=t?[e,t[0]]:e})))}));var r=null;if(d){const e=n[0].t;r=[Ml.format(Yl(e)),Ml.format(ql(e))]}const u=n.map((e=>e.vr||0)),h=ul(n),g=j2(i,s,[],[["volume",l]],[[["volume rank",u]],v,[["estimate volume",h]],...null!=m?m:[]],c,!a,e.zoomRange||o,null!=r?[[r[0],r[1],!0,"market open"]]:void 0);t.setOption(g)}}else n(null)}),[u,f,t,a,d,l,c,p,h,o,e.zoomRange,e.setZoomRange,g,m,v]),(0,Sn.jsx)("div",{ref:s,style:{width:"100%",height:"100%"}})}function T9(e){const{account:t,mainId:n,date:o,symbol:i,strategy:a}=e,s=Ws.has(a),l=(0,r.useCallback)((async e=>{const r=wc(o,e),s=A9(o,i,a,t,e),l="stock:".concat(t.symbol,"-").concat(n,"-").concat(a),c=Tl(o,l,e),[u,d,h]=await Promise.all([s,c,r]);return"err"in u?u:[u[0],u[1],rl(u[2],!1),void 0,"err"in d?[]:d,"err"in h?[]:h]}),[i,o,a,t,n]);return(0,Sn.jsx)(D9,{getter:l,filter:e.filter,date:e.date,symbol:e.symbol,preClose:e.preClose,clickPoint:e.clickPoint,zoomRange:e.zoomRange,setZoomRange:e.setZoomRange,onConvert:e.onConvert,reverse:s},"".concat(e.date,"-").concat(e.strategy,"-").concat(e.symbol))}function D9(e){const{filter:t,date:n,symbol:r,preClose:o,clickPoint:i,middle:a,front:s,getter:l,onConvert:c,reverse:u}=e;return(0,Sn.jsx)(Qc,{getter:l,cvt:l=>{const c=[];g3(t,n,l[1]).sort(((e,t)=>e.timestamp-t.timestamp)).forEach((e=>{const t=6e4*Math.floor(e.timestamp/6e4);0===c.length||c[c.length-1][0]<t?c.push([t,[e.subtype]]):c[c.length-1][1].push(e.subtype)}));const u=Xs(Hl(l[0]).map((e=>[e[0],e[1]])),c),d=nl(l[5],(e=>e[0]),((e,t)=>[t,0,0])),h=d.map((e=>e[1])),p=d.map((e=>e[2])),f=null==o?l[3]:o;console.log("debug GDayCandle preClose2:",f,n,r);const g=l[4].map((e=>e.map((e=>[e[0],nl(e[1],(e=>e[0]),((e,t)=>[t,-2])).map((e=>e[1]))]))));return(0,Sn.jsxs)(Sn.Fragment,{children:[null!=s&&s(),(0,Sn.jsx)("div",{style:{width:"100%",marginTop:"2rem",marginBottom:"2rem",aspectRatio:"16/9"},children:(0,Sn.jsx)(l3,{symbol:r,signals:u,preClose:f,clickPoint:i,isDay:!0,historyData:l[2],zoomRange:e.zoomRange,setZoomRange:e.setZoomRange,extraLines:[[["estimate volume",ul(l[2])]],[["callVol",h],["putVol",p]],...g]})}),a&&a([l[0],l[1],l[2]]),(0,Sn.jsx)("div",{style:{marginTop:"3rem"},children:(0,Sn.jsx)(g8,{addPercent:!0,data:Nl(l[0]),aggs:l[2]})},"detail")]})},onLoad:c})}function j9(e){const{data:t}=e,[n,o]=(0,r.useState)(null),i=(0,Sn.jsx)(l5,{data:t,update:o});return null==n?i:(0,Sn.jsx)(E9,{account:n[1],mainAccount:n[0],children:i})}function P9(){const e=(0,r.useCallback)((async e=>{const t=await s5(e);return"err"in t?t:[t[0].filter((e=>e.startsWith("stock:"))),t[1]]}),[]);return(0,Sn.jsx)(Qc,{getter:e,cvt:e=>(0,Sn.jsx)(j9,{data:e})})}function L9(){return(0,Sn.jsx)("main",{style:{flex:1},className:"MainPage",children:(0,Sn.jsx)("div",{style:{flex:1,maxWidth:"1200px",width:"100vw"},children:(0,Sn.jsx)(P9,{})})})}function R9(e){const{aid:t,startDate:n,endDate:o}=e,i=(0,r.useCallback)((async e=>await rc(t,"sub",n,o,e)),[t,n,o]);return(0,Sn.jsx)(Qc,{getter:i,cvt:t=>{const n=t.d.map((e=>{const t=e.cost>0?e.profit/e.cost:0,n=(100*t).toFixed(2)+"%",r=t>0?"green":"red";return[e.timestamp,["@TITLE"+n,"@Color0"+r+"@@"+n]]}));return(0,Sn.jsx)(h3,{...e,preClose:1,signals:n})}})}function E9(e){const{account:t,mainAccount:n}=e,[o,i]=(0,r.useState)({alpha:10,total:1e5,scoreLow:0,scoreHigh:100,hourScoreLow:0,hourScoreHigh:100,priceHigh:80,isBigTrade:!1}),[a,s]=(0,r.useState)(!0),l=(new Date).getTime(),c=El(l-90*$2),u=El(l),[d,h]=(0,r.useState)(!0),[p,f]=(0,r.useState)(null),g=Yl(l),m=El(l-$2),v=l>=g-198e5&&(null==p||p[0]===u),[y,x]=(0,r.useState)(""),[b,w]=(0,r.useState)([0,100]),S=(0,r.useContext)(F2),_=null!=S&&1!==S.userLevel;return(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsx)("div",{style:{width:"100%",aspectRatio:"16/9",marginTop:"2rem",marginBottom:"2rem"},children:(0,Sn.jsx)(R9,{aid:t.rowid+"",startDate:c,endDate:u,symbol:t.symbol,clickDay:(e,t)=>{f([e,t]),w([0,100])}})}),(0,Sn.jsx)(f3,{filter:o,updateCB:i}),v&&!_&&t.strategy===Ys&&(0,Sn.jsxs)(M5,{expanded:d,children:[(0,Sn.jsx)(E5,{expandIcon:(0,Sn.jsx)(V5,{onClick:e=>{h((e=>!e))},children:(0,Sn.jsx)(p3.A,{})}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,Sn.jsx)("p",{children:"\u624b\u52a8\u4ea4\u6613"})}),(0,Sn.jsx)(s3,{children:(0,Sn.jsx)(m9,{symbol:t.symbol,account:n,default:[1,0,"15:55",0,.002]})})]}),v&&!_&&(0,Sn.jsx)(c5,{}),e.children,(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u5c55\u793a\u4e70\u5165\u4fe1\u53f7:"}),(0,Sn.jsx)(n3,{checked:a,onChange:e=>s(e.target.checked)})]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u9009\u62e9\u65e5\u671f:"}),(0,Sn.jsx)("input",{value:null!=p?p[0]:u,onChange:e=>{f([e.target.value,0]),w([0,100])},type:"date"})]}),v&&(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsx)(b9,{symbol:"I:VIX",zoomRange:b,setZoomRange:w}),(0,Sn.jsx)(M9,{showBuyPoint:a,account:t,symbol:t.symbol,filter:o,task:"stock:".concat(t.symbol,"-").concat(n,"-").concat(t.strategy),mainId:n,zoomRange:b,setZoomRange:w},t.rowid)]}),!v&&(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsx)("div",{style:{width:"100%",aspectRatio:"16/9"},children:(0,Sn.jsx)(u3,{symbol:"I:VIX",startDate:null!=p?p[0]:m,endDate:null!=p?p[0]:m,signals:[],zoomRange:b,setZoomRange:w,load:y===(null!=p?p[0]:m)})}),(0,Sn.jsx)(T9,{date:null!=p?p[0]:m,account:t,symbol:t.symbol,filter:o,strategy:t.strategy,mainId:n,zoomRange:b,setZoomRange:w,onConvert:()=>{const e=null!=p?p[0]:m;y!==e&&x(e)}})]})]})}var N9=n(155),O9=n(5382);const z9="big volume buy";async function B9(e,t){const n=await async function(e){const t="".concat(xl,"/control?command=list"),n=await Cl(t,e);if("err"in n)return n;if("result"in n&&null!=n.result)return n.result.map((e=>["stock:".concat(e[0],"-").concat(e[1]),e[0],e[1],e[2],e[3]]));{const e=n;return{err:e.timeout?"worker timeout":e.e}}}(t);if("err"in n)return n;if(e)return[null,n];{const e=await async function(e){const t=await Bl(e);if("err"in t)return t;{const n=await Jl(null,e);return"err"in n?n:[t,n]}}(t);return"err"in e?e:[e,n]}}function F9(e){const{status:t}=e;return null==t?(0,Sn.jsx)("p",{children:"-"}):(0,Sn.jsxs)("div",{className:"Container",children:[(0,Sn.jsxs)("div",{children:[t.activated?(0,Sn.jsx)(O9.A,{color:"success"}):(0,Sn.jsx)(N9.A,{color:"error"}),t.canceled?(0,Sn.jsx)(N9.A,{color:"error"}):(0,Sn.jsx)(O9.A,{color:"success"})]}),(0,Sn.jsx)("p",{children:El(t.updateTime,!1,!0,!1).substring(11)})]})}function V9(e){return(0,Sn.jsx)(W9,{...e})}function W9(e){const[t,n]=(0,r.useState)(!1),[o,i]=(0,r.useState)(null),[a,s]=(0,r.useState)(null),[l,c]=(0,r.useState)(""),[u,d]=(0,r.useState)(null),[h,p]=(0,r.useState)(null),f=tt(),[g,m]=(0,r.useState)(null),[v,y]=(0,r.useState)(null),x=()=>n(!1),b=()=>d(null),[w,S]=(0,r.useState)(0),[_,A]=(0,r.useState)(null),k=(0,r.useContext)(z2),C=(e,t,n)=>{(async function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const o=new URLSearchParams;n?o.set("command","addgroup"):o.set("command","deletegroup"),o.set("symbol",e),o.set("strategy",t),o.set("group",vc);const i="".concat(xl,"/control?").concat(o.toString()),a=await Cl(i,r);if(!("err"in a)&&"s"in a){const e=a.s;if("boolean"===typeof e)return e}return!1})(t,n,e).then((e=>{e&&S((e=>e+1))}))},[M,I]=(0,r.useState)({});return(0,r.useEffect)((()=>{const e=new Map,t=null===k||void 0===k?void 0:k.subscribe("task","all",(t=>{var n=!1;Object.entries(t.data).forEach((t=>{if(t[0].endsWith("-status")){const r=t[0].substring(0,t[0].length-7);e.set(r,t[1]),n=!0}})),n&&I(Object.fromEntries(e.entries()))}));return()=>{null!=t&&(null===k||void 0===k||k.unsubscribe("task","all",t))}}),[k]),(0,r.useEffect)((()=>{const e=new AbortController;return async function(e){const t="".concat(xl,"/control?command=getgroup&group=").concat(vc),n=await Cl(t,e);return"err"in n?n:"d"in n?n.d:{err:"no key found by name:d"}}(e.signal).then((e=>{if(!("err"in e)){const t=new Set;e.forEach((e=>{t.add(e.strategy)})),y(t)}})),()=>{e.abort()}}),[w]),(0,r.useEffect)((()=>{var e=null;return null==g&&(e=new AbortController,B9(null!=o,e.signal).then((t=>{var n;if(null===(n=e)||void 0===n||!n.signal.aborted)if("err"in t)m(t);else if(m(t[1]),null!=t[0]){const e=new Set(t[1].map((e=>e[2])));i([t[0][0],t[0][1].filter((t=>t.strategy!==Ys&&!e.has(t.rowid+"-"+t.strategy)))]);const n=new Map;t[0][1].forEach((e=>{e.account.length>0&&n.set(e.rowid+"",e.account)})),A(n)}else if(null!=o&&!("err"in o)){const e=new Set(t[1].map((e=>e[2])));i([o[0],o[1].filter((t=>t.strategy!==Ys&&!e.has(t.rowid+"-"+t.strategy)))])}}))),()=>{null!=e&&e.abort()}}),[g,e.stock]),null==g?(0,Sn.jsx)($c,{}):"err"in g?(0,Sn.jsx)("div",{children:(0,Sn.jsxs)("p",{children:["Error:",g.err]})}):(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsxs)("div",{style:{marginBottom:"1rem"},children:[(0,Sn.jsx)("span",{children:"Create Task: "}),null!=o&&!("err"in o)&&(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsx)("button",{onClick:e=>{if(o[1].length>0){const e=o[1][0];s(e);const t=o[0].find((t=>t.isBuy&&t.name===e.strategy)),n=o[0].find((e=>!e.isBuy));null!=t&&null!=n&&d({stock:e.symbol,buyAlgorithm:t.id,buyParams:t.params,sellAlgorithm:n.id,sellParams:n.params})}},children:"New Task"}),(0,Sn.jsx)("span",{children:"Query:"}),(0,Sn.jsx)("input",{value:l,onChange:e=>c(e.target.value)})]})]}),(0,Sn.jsxs)(j4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,Sn.jsx)("thead",{children:(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("th",{children:"Stock"}),(0,Sn.jsx)("th",{children:"Status"}),(0,Sn.jsx)("th",{children:"Desc"}),(0,Sn.jsx)("th",{children:"Strategy"}),(0,Sn.jsx)("th",{children:"Group"}),(0,Sn.jsx)("th",{children:"Operation"})]})}),(0,Sn.jsx)("tbody",{children:g.filter((e=>0===l.length||e[1].toLocaleLowerCase().search(l.toLocaleLowerCase())>-1)).map((e=>{const t=e[2].search("-");if(t>-1){const r=e[2].substring(0,t),o=e[2].substring(t);return(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:e[1]}),(0,Sn.jsx)("td",{children:e[0]in M?(0,Sn.jsx)(F9,{status:M[e[0]]}):"-"}),(0,Sn.jsx)("td",{children:e[4]}),(0,Sn.jsxs)("td",{children:[(0,Sn.jsx)(Vt,{to:null!==_&&void 0!==_&&_.has(r)?"/trading/account/".concat(r):"/accountG?mainId=".concat(r),children:r}),o,"-"+((null===_||void 0===_?void 0:_.get(r))||"")]}),(0,Sn.jsx)("td",{children:o.endsWith(z9)&&null!=v&&(0,Sn.jsx)(Vs,{variant:"outlined",onClick:()=>C(!v.has(e[2]),e[1],e[2]),children:(v.has(e[2])?"\u5220\u9664":"\u6dfb\u52a0")+"\u4e00\u952e\u7ed1\u5b9a"})}),(0,Sn.jsxs)("td",{children:[(0,Sn.jsx)(Vs,{variant:"outlined",color:e[3]?"error":"success",onClick:t=>{p([e[1],e[2],!e[3]]),n(!0)},children:e[3]?"Stop":"Start"}),(0,Sn.jsx)(Vs,{variant:"outlined",onClick:t=>f("/task/".concat(e[1],"/").concat(e[2])),children:"Detail"}),(0,Sn.jsx)(H9,{symbol:e[1],strategy:e[2],cb:()=>m(null)})]})]},e[0])}return(0,Sn.jsx)(Sn.Fragment,{})}))})]}),(0,Sn.jsxs)(s8,{show:null!=u,onHide:b,children:[(0,Sn.jsx)(s8.Header,{closeButton:!0,children:(0,Sn.jsx)(s8.Title,{children:"Start Task"})}),(0,Sn.jsx)(s8.Body,{children:null!=o&&!("err"in o)&&u?(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"Select Account"}),(0,Sn.jsx)("select",{value:(null===a||void 0===a?void 0:a.rowid)||"",onChange:e=>{const t=o[1].find((t=>e.target.value===t.rowid+""));if(null!=t){const e=o[0].find((e=>e.isBuy&&e.name===t.strategy));null!=e&&(s(t),d((n=>n&&{...n,stock:t.symbol,buyAlgorithm:t.strategy,buyParams:e.params})))}},children:o[1].map((e=>(0,Sn.jsx)("option",{value:e.rowid+"",children:"".concat(e.rowid,"-").concat(e.account,"-").concat(e.symbol,"-").concat(e.strategy,"-").concat(e.desc)},e.rowid)))})]}),(0,Sn.jsx)(t7,{taskConfigs:o[0],taskConfig:u,realTime:!0,setTaskConfig:e=>{d((t=>null==t?null:e(t)))}})]}):(0,Sn.jsx)("p",{children:"Task configs not loaded"})}),(0,Sn.jsxs)(s8.Footer,{children:[(0,Sn.jsx)(Vs,{color:"secondary",onClick:b,children:"Cancel"}),(0,Sn.jsx)(Vs,{color:"primary",onClick:function(){if(null!=u&&null!=a){const e=a.rowid+"-"+u.buyAlgorithm;Ol("new",u.stock,e,Object.fromEntries(u.buyParams.map((e=>[e.key,null==e.realValue?e.default:e.realValue]))),u.sellAlgorithm,Object.fromEntries(u.sellParams.map((e=>[e.key,e.default]))),null!=u.sellParamsEnd?Object.fromEntries(u.sellParamsEnd.map((e=>[e.key,e.default]))):null).then((e=>{e&&m(null),d(null)}))}},children:"Start"})]})]}),(0,Sn.jsxs)(s8,{show:t,onHide:x,children:[(0,Sn.jsx)(s8.Header,{closeButton:!0,children:(0,Sn.jsx)(s8.Title,{children:"Check"})}),(0,Sn.jsx)(s8.Body,{children:(0,Sn.jsxs)("p",{children:["Are you sure to ",null!=h&&h[2]?"start":"stop"," this task ?"]})}),(0,Sn.jsxs)(s8.Footer,{children:[(0,Sn.jsx)(Vs,{color:"secondary",onClick:x,children:"Cancel"}),(0,Sn.jsx)(Vs,{color:"primary",onClick:function(){null!=h&&(h[2]?async function(e,t){const n="".concat(xl,"/control?command=start&symbol=").concat(e,"&strategy=").concat(t);return!("err"in await Cl(n))}(h[0],h[1]):async function(e,t){const n="stock:".concat(e,"-").concat(t),r="".concat(xl,"/control?command=stop&uid=").concat(n);return!("err"in await Cl(r))}(h[0],h[1])).then((e=>{e&&m(null)})),x()},children:"OK"})]})]})]})}function H9(e){const{symbol:t,strategy:n,cb:o}=e,[i,a]=(0,r.useState)("");return(0,Sn.jsx)(p7,{msg:"\u4fee\u6539\u4efb\u52a1\u5907\u6ce8",content:(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u5907\u6ce8"}),(0,Sn.jsx)("textarea",{style:{width:"80%",aspectRatio:"3/2"},value:i,onChange:e=>{a(e.target.value)}})]}),callBack:e=>{(async function(e,t,n){const r=new URLSearchParams;r.set("command","update_desc"),r.set("symbol",e),r.set("strategy",t),r.set("desc",n);const o="".concat(xl,"/control?").concat(r.toString()),i=await Cl(o);return"s"in i&&!0===i.s})(t,n,i).then((t=>{const n="\u66f4\u65b0"+(t?"\u6210\u529f!":"\u5931\u8d25!");t&&o(),e(n)})).catch((t=>{e("\u66f4\u65b0\u5931\u8d25!err:"+t)}))}})}function G9(){return W2()?(0,Sn.jsxs)("div",{style:{display:"flex"},children:[(0,Sn.jsxs)("nav",{style:{borderRight:"solid 1px",padding:"2rem"},children:[(0,Sn.jsx)(Wt,{to:"stock",style:e=>{let{isActive:t}=e;return{display:"block",margin:"1rem 0",color:t?"red":""}},children:"Stock"}),(0,Sn.jsx)(Wt,{to:"event",style:e=>{let{isActive:t}=e;return{display:"block",margin:"1rem 0",color:t?"red":""}},children:"Event"}),(0,Sn.jsx)(Wt,{to:"dates",style:e=>{let{isActive:t}=e;return{display:"block",margin:"1rem 0",color:t?"red":""}},children:"Dates"}),(0,Sn.jsx)(Wt,{to:"filter",style:e=>{let{isActive:t}=e;return{display:"block",margin:"1rem 0",color:t?"red":""}},children:"Filter"}),(0,Sn.jsx)(Wt,{to:"block",style:e=>{let{isActive:t}=e;return{display:"block",margin:"1rem 0",color:t?"red":""}},children:"Block"}),(0,Sn.jsx)(Wt,{to:"volatility",style:e=>{let{isActive:t}=e;return{display:"block",margin:"1rem 0",color:t?"red":""}},children:"Volatility"})]}),(0,Sn.jsx)(vt,{})]}):(0,Sn.jsx)(vt,{})}function U9(){const[e,t]=(0,r.useState)(null),[n,o]=(0,r.useState)(null),[i,a]=(0,r.useState)(null),s=()=>o(null);(0,r.useEffect)((()=>{if(null==e){const e=new AbortController,n=e.signal;return zl(n).then((e=>{n.aborted||t(e)})),()=>{e.abort()}}}),[e]);const l=()=>{null!=n&&async function(e){const t=new URLSearchParams;t.set("type","stock"),t.set("command","update"),t.set("data",JSON.stringify(e));const n="".concat(xl,"/config?").concat(t.toString());return!("err"in await Cl(n,null))}(n).then((e=>{o(null),t(null)}))};return null==e?(0,Sn.jsx)($c,{}):"err"in e?(0,Sn.jsx)("div",{children:(0,Sn.jsxs)("p",{children:["Error:",e.err]})}):(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)(Vs,{onClick:()=>o({stock:"",level:1,tags:[]}),children:"\u6dfb\u52a0"}),(0,Sn.jsxs)(j4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,Sn.jsx)("thead",{children:(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:"\u80a1\u7968\u4ee3\u7801"}),(0,Sn.jsx)("td",{children:"\u7b49\u7ea7"}),(0,Sn.jsx)("td",{children:"\u6807\u7b7e"}),(0,Sn.jsx)("td",{children:"\u64cd\u4f5c"})]})}),(0,Sn.jsx)("tbody",{children:e.map((e=>(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:e.stock}),(0,Sn.jsx)("td",{children:e.level}),(0,Sn.jsx)("td",{children:e.tags.map((e=>(0,Sn.jsx)(Vs,{variant:"outlined",color:"success",children:e})))}),(0,Sn.jsx)("td",{children:(0,Sn.jsx)(Vs,{onClick:()=>o(e),children:"\u4fee\u6539"})})]},e.stock)))})]}),(0,Sn.jsxs)(s8,{show:null!=n,children:[(0,Sn.jsx)(s8.Header,{children:(0,Sn.jsx)(s8.Title,{children:"Edit Data"})}),(0,Sn.jsxs)(s8.Body,{children:[(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"Stock: "}),(0,Sn.jsx)("input",{value:null===n||void 0===n?void 0:n.stock,onChange:e=>o((t=>null!=t?{...t,stock:e.target.value}:null))})]}),(0,Sn.jsxs)("div",{style:{margin:"1rem 0"},children:[(0,Sn.jsx)("span",{children:"Level: "}),(0,Sn.jsx)("select",{value:null===n||void 0===n?void 0:n.level,onChange:e=>{o((t=>null!=t?{...t,level:parseInt(e.target.value)}:t))},children:eu.map((e=>(0,Sn.jsx)("option",{value:e,children:e},e)))})]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"Tags: "}),(0,Sn.jsx)("input",{value:null==i?"":i,onChange:e=>{a(e.target.value)}}),(0,Sn.jsx)(Vs,{onClick:e=>{null!=i&&i.length>0&&(o((e=>null==e?e:{...e,tags:e.tags.concat(i)})),a(null))},children:"Create"})]}),(0,Sn.jsx)("div",{children:null===n||void 0===n?void 0:n.tags.map((e=>(0,Sn.jsx)(a5,{label:e,onDelete:()=>{o((t=>null==t?t:{...t,tags:t.tags.filter((t=>t!==e))}))}})))})]}),(0,Sn.jsxs)(s8.Footer,{children:[(0,Sn.jsx)(Vs,{color:"secondary",onClick:s,children:"Cancel"}),(0,Sn.jsx)(Vs,{color:"primary",onClick:l,children:"Submit"})]})]})]})}function X9(e,t,n){return null==e?{[t]:n}:{...e,[t]:n}}const Y9=["low","medium","high"];function q9(){const[e,t]=(0,r.useState)(null),[n,o]=(0,r.useState)(null),i=()=>o(null),a=()=>{null!=n&&async function(e){const t=new URLSearchParams;t.set("type","event"),t.set("command",e.uid>0?"update":"insert"),t.set("data",JSON.stringify(e));const n="".concat(xl,"/config?").concat(t.toString());return!("err"in await Cl(n,null))}(n).then((e=>{o(null),t(null)}))};return(0,r.useEffect)((()=>{if(null==e){const e=new AbortController,n=e.signal;return async function(e){const t="".concat(xl,"/config?type=event&command=list");return await Cl(t,e)}(n).then((e=>{n.aborted||t(e)})),()=>{e.abort()}}})),null==e?(0,Sn.jsx)($c,{}):"err"in e?(0,Sn.jsx)("div",{children:(0,Sn.jsxs)("p",{children:["Error:",e.err]})}):(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("div",{children:(0,Sn.jsx)(Vs,{onClick:e=>{o({uid:0,name:"",timestamp:(new Date).getTime(),target:"",level:"low"})},children:"\u6dfb\u52a0"})}),(0,Sn.jsxs)(j4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,Sn.jsx)("thead",{children:(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:"\u540d\u79f0"}),(0,Sn.jsx)("td",{children:"\u7ea7\u522b"}),(0,Sn.jsx)("td",{children:"\u65e5\u671f"}),(0,Sn.jsx)("td",{children:"\u4f5c\u7528\u76ee\u6807"}),(0,Sn.jsx)("td",{children:"\u64cd\u4f5c"})]})}),(0,Sn.jsx)("tbody",{children:e.map((e=>{const t=e.name+e.target+e.timestamp;return(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:e.name}),(0,Sn.jsx)("td",{children:e.level}),(0,Sn.jsx)("td",{children:El(e.timestamp)}),(0,Sn.jsx)("td",{children:e.target}),(0,Sn.jsx)("td",{children:(0,Sn.jsx)(Vs,{onClick:()=>o(e),children:"\u4fee\u6539"})})]},t)}))})]}),(0,Sn.jsxs)(s8,{show:null!=n,onHide:()=>o(null),children:[(0,Sn.jsx)(s8.Header,{children:(0,Sn.jsx)(s8.Title,{children:"Edit Market Event"})}),(0,Sn.jsxs)(s8.Body,{children:[(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{className:"Edit-Key",children:"Name: "}),(0,Sn.jsx)("input",{value:null===n||void 0===n?void 0:n.name,onChange:e=>o((t=>X9(t,"name",e.target.value)))})]}),(0,Sn.jsxs)("div",{style:{margin:"1rem 0"},children:[(0,Sn.jsx)("span",{className:"Edit-Key",children:"Date: "}),(0,Sn.jsx)("input",{type:"date",value:El((null===n||void 0===n?void 0:n.timestamp)||(new Date).getTime()),onChange:e=>o((t=>X9(t,"timestamp",new Date(e.target.value).getTime())))})]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"Level: "}),(0,Sn.jsx)("select",{value:null===n||void 0===n?void 0:n.level,onChange:e=>{o((t=>X9(t,"level",e.target.value)))},children:Y9.map((e=>(0,Sn.jsx)("option",{value:e,children:e},e)))})]}),(0,Sn.jsxs)("div",{style:{margin:"1rem 0"},children:[(0,Sn.jsx)("span",{className:"Edit-Key",children:"Target: "}),(0,Sn.jsx)("input",{value:null===n||void 0===n?void 0:n.target,onChange:e=>o((t=>X9(t,"target",e.target.value)))})]})]}),(0,Sn.jsxs)(s8.Footer,{children:[(0,Sn.jsx)(Vs,{color:"secondary",onClick:i,children:"Cancel"}),(0,Sn.jsx)(Vs,{color:"primary",onClick:a,children:"Submit"})]})]})]})}function Z9(e){return(0,Kt.Ay)("MuiPagination",e)}(0,nr.A)("MuiPagination",["root","ul","outlined","text"]);var K9=n(1052);const $9=["boundaryCount","componentName","count","defaultPage","disabled","hideNextButton","hidePrevButton","onChange","page","showFirstButton","showLastButton","siblingCount"];function Q9(e){return(0,Kt.Ay)("MuiPaginationItem",e)}const J9=(0,nr.A)("MuiPaginationItem",["root","page","sizeSmall","sizeLarge","text","textPrimary","textSecondary","outlined","outlinedPrimary","outlinedSecondary","rounded","ellipsis","firstLast","previousNext","focusVisible","disabled","selected","icon","colorPrimary","colorSecondary"]),eee=(0,Ea.A)((0,Sn.jsx)("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage"),tee=(0,Ea.A)((0,Sn.jsx)("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),nee=(0,Ea.A)((0,Sn.jsx)("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"NavigateBefore"),ree=(0,Ea.A)((0,Sn.jsx)("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),oee=["className","color","component","components","disabled","page","selected","shape","size","slots","type","variant"],iee=(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["size".concat((0,Mn.A)(n.size))],"text"===n.variant&&t["text".concat((0,Mn.A)(n.color))],"outlined"===n.variant&&t["outlined".concat((0,Mn.A)(n.color))],"rounded"===n.shape&&t.rounded,"page"===n.type&&t.page,("start-ellipsis"===n.type||"end-ellipsis"===n.type)&&t.ellipsis,("previous"===n.type||"next"===n.type)&&t.previousNext,("first"===n.type||"last"===n.type)&&t.firstLast]},aee=(0,In.Ay)("div",{name:"MuiPaginationItem",slot:"Root",overridesResolver:iee})((e=>{let{theme:t,ownerState:n}=e;return(0,qt.A)({},t.typography.body2,{borderRadius:16,textAlign:"center",boxSizing:"border-box",minWidth:32,padding:"0 6px",margin:"0 3px",color:(t.vars||t).palette.text.primary,height:"auto",["&.".concat(J9.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity}},"small"===n.size&&{minWidth:26,borderRadius:13,margin:"0 1px",padding:"0 4px"},"large"===n.size&&{minWidth:40,borderRadius:20,padding:"0 10px",fontSize:t.typography.pxToRem(15)})})),see=(0,In.Ay)(Ds,{name:"MuiPaginationItem",slot:"Root",overridesResolver:iee})((e=>{let{theme:t,ownerState:n}=e;return(0,qt.A)({},t.typography.body2,{borderRadius:16,textAlign:"center",boxSizing:"border-box",minWidth:32,height:32,padding:"0 6px",margin:"0 3px",color:(t.vars||t).palette.text.primary,["&.".concat(J9.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat(J9.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity},transition:t.transitions.create(["color","background-color"],{duration:t.transitions.duration.short}),"&:hover":{backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(J9.selected)]:{backgroundColor:(t.vars||t).palette.action.selected,"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.selectedChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,zi.X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(t.vars||t).palette.action.selected}},["&.".concat(J9.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.selectedChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,zi.X4)(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)},["&.".concat(J9.disabled)]:{opacity:1,color:(t.vars||t).palette.action.disabled,backgroundColor:(t.vars||t).palette.action.selected}}},"small"===n.size&&{minWidth:26,height:26,borderRadius:13,margin:"0 1px",padding:"0 4px"},"large"===n.size&&{minWidth:40,height:40,borderRadius:20,padding:"0 10px",fontSize:t.typography.pxToRem(15)},"rounded"===n.shape&&{borderRadius:(t.vars||t).shape.borderRadius})}),(e=>{let{theme:t,ownerState:n}=e;return(0,qt.A)({},"text"===n.variant&&{["&.".concat(J9.selected)]:(0,qt.A)({},"standard"!==n.color&&{color:(t.vars||t).palette[n.color].contrastText,backgroundColor:(t.vars||t).palette[n.color].main,"&:hover":{backgroundColor:(t.vars||t).palette[n.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[n.color].main}},["&.".concat(J9.focusVisible)]:{backgroundColor:(t.vars||t).palette[n.color].dark}},{["&.".concat(J9.disabled)]:{color:(t.vars||t).palette.action.disabled}})},"outlined"===n.variant&&{border:t.vars?"1px solid rgba(".concat(t.vars.palette.common.onBackgroundChannel," / 0.23)"):"1px solid ".concat("light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),["&.".concat(J9.selected)]:(0,qt.A)({},"standard"!==n.color&&{color:(t.vars||t).palette[n.color].main,border:"1px solid ".concat(t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / 0.5)"):(0,zi.X4)(t.palette[n.color].main,.5)),backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.activatedOpacity,")"):(0,zi.X4)(t.palette[n.color].main,t.palette.action.activatedOpacity),"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / calc(").concat(t.vars.palette.action.activatedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,zi.X4)(t.palette[n.color].main,t.palette.action.activatedOpacity+t.palette.action.focusOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(J9.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / calc(").concat(t.vars.palette.action.activatedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,zi.X4)(t.palette[n.color].main,t.palette.action.activatedOpacity+t.palette.action.focusOpacity)}},{["&.".concat(J9.disabled)]:{borderColor:(t.vars||t).palette.action.disabledBackground,color:(t.vars||t).palette.action.disabled}})})})),lee=(0,In.Ay)("div",{name:"MuiPaginationItem",slot:"Icon",overridesResolver:(e,t)=>t.icon})((e=>{let{theme:t,ownerState:n}=e;return(0,qt.A)({fontSize:t.typography.pxToRem(20),margin:"0 -8px"},"small"===n.size&&{fontSize:t.typography.pxToRem(18)},"large"===n.size&&{fontSize:t.typography.pxToRem(22)})})),cee=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiPaginationItem"}),{className:r,color:o="standard",component:i,components:a={},disabled:s=!1,page:l,selected:c=!1,shape:u="circular",size:d="medium",slots:h={},type:p="page",variant:f="text"}=n,g=(0,Yt.A)(n,oee),m=(0,qt.A)({},n,{color:o,disabled:s,selected:c,shape:u,size:d,type:p,variant:f}),v=fo(),y=(e=>{const{classes:t,color:n,disabled:r,selected:o,size:i,shape:a,type:s,variant:l}=e,c={root:["root","size".concat((0,Mn.A)(i)),l,a,"standard"!==n&&"color".concat((0,Mn.A)(n)),"standard"!==n&&"".concat(l).concat((0,Mn.A)(n)),r&&"disabled",o&&"selected",{page:"page",first:"firstLast",last:"firstLast","start-ellipsis":"ellipsis","end-ellipsis":"ellipsis",previous:"previousNext",next:"previousNext"}[s]],icon:["icon"]};return(0,$t.A)(c,Q9,t)})(m),x=(v?{previous:h.next||a.next||ree,next:h.previous||a.previous||nee,last:h.first||a.first||eee,first:h.last||a.last||tee}:{previous:h.previous||a.previous||nee,next:h.next||a.next||ree,first:h.first||a.first||eee,last:h.last||a.last||tee})[p];return"start-ellipsis"===p||"end-ellipsis"===p?(0,Sn.jsx)(aee,{ref:t,ownerState:m,className:(0,Zt.A)(y.root,r),children:"\u2026"}):(0,Sn.jsxs)(see,(0,qt.A)({ref:t,ownerState:m,component:i,disabled:s,className:(0,Zt.A)(y.root,r)},g,{children:["page"===p&&l,x?(0,Sn.jsx)(lee,{as:x,ownerState:m,className:y.icon}):null]}))})),uee=cee,dee=["boundaryCount","className","color","count","defaultPage","disabled","getItemAriaLabel","hideNextButton","hidePrevButton","onChange","page","renderItem","shape","showFirstButton","showLastButton","siblingCount","size","variant"],hee=(0,In.Ay)("nav",{name:"MuiPagination",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant]]}})({}),pee=(0,In.Ay)("ul",{name:"MuiPagination",slot:"Ul",overridesResolver:(e,t)=>t.ul})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"});function fee(e,t,n){return"page"===e?"".concat(n?"":"Go to ","page ").concat(t):"Go to ".concat(e," page")}const gee=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiPagination"}),{boundaryCount:r=1,className:o,color:i="standard",count:a=1,defaultPage:s=1,disabled:l=!1,getItemAriaLabel:c=fee,hideNextButton:u=!1,hidePrevButton:d=!1,renderItem:h=(e=>(0,Sn.jsx)(uee,(0,qt.A)({},e))),shape:p="circular",showFirstButton:f=!1,showLastButton:g=!1,siblingCount:m=1,size:v="medium",variant:y="text"}=n,x=(0,Yt.A)(n,dee),{items:b}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{boundaryCount:t=1,componentName:n="usePagination",count:r=1,defaultPage:o=1,disabled:i=!1,hideNextButton:a=!1,hidePrevButton:s=!1,onChange:l,page:c,showFirstButton:u=!1,showLastButton:d=!1,siblingCount:h=1}=e,p=(0,Yt.A)(e,$9),[f,g]=(0,K9.A)({controlled:c,default:o,name:n,state:"page"}),m=(e,t)=>{c||g(t),l&&l(e,t)},v=(e,t)=>{const n=t-e+1;return Array.from({length:n},((t,n)=>e+n))},y=v(1,Math.min(t,r)),x=v(Math.max(r-t+1,t+1),r),b=Math.max(Math.min(f-h,r-t-2*h-1),t+2),w=Math.min(Math.max(f+h,t+2*h+2),x.length>0?x[0]-2:r-1),S=[...u?["first"]:[],...s?[]:["previous"],...y,...b>t+2?["start-ellipsis"]:t+1<r-t?[t+1]:[],...v(b,w),...w<r-t-1?["end-ellipsis"]:r-t>t?[r-t]:[],...x,...a?[]:["next"],...d?["last"]:[]],_=e=>{switch(e){case"first":return 1;case"previous":return f-1;case"next":return f+1;case"last":return r;default:return null}},A=S.map((e=>"number"===typeof e?{onClick:t=>{m(t,e)},type:"page",page:e,selected:e===f,disabled:i,"aria-current":e===f?"true":void 0}:{onClick:t=>{m(t,_(e))},type:e,page:_(e),selected:!1,disabled:i||-1===e.indexOf("ellipsis")&&("next"===e||"last"===e?f>=r:f<=1)}));return(0,qt.A)({items:A},p)}((0,qt.A)({},n,{componentName:"Pagination"})),w=(0,qt.A)({},n,{boundaryCount:r,color:i,count:a,defaultPage:s,disabled:l,getItemAriaLabel:c,hideNextButton:u,hidePrevButton:d,renderItem:h,shape:p,showFirstButton:f,showLastButton:g,siblingCount:m,size:v,variant:y}),S=(e=>{const{classes:t,variant:n}=e,r={root:["root",n],ul:["ul"]};return(0,$t.A)(r,Z9,t)})(w);return(0,Sn.jsx)(hee,(0,qt.A)({"aria-label":"pagination navigation",className:(0,Zt.A)(S.root,o),ownerState:w,ref:t},x,{children:(0,Sn.jsx)(pee,{className:S.ul,ownerState:w,children:b.map(((e,t)=>(0,Sn.jsx)("li",{children:h((0,qt.A)({},e,{color:i,"aria-label":c(e.type,e.page,e.selected),shape:p,size:v,variant:y}))},t)))})}))})),mee=gee;var vee=n(6502);async function yee(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:20,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const o=[];o.push(["page",t]),null!=e&&o.push(["tag",e]),o.push(["pagesize",n]);const i=Object.fromEntries(o);return await xee("listdates",JSON.stringify(i),(e=>"total"in e&&"data"in e?e:{err:"key not found,total:".concat("total"in e,", d:").concat("data"in e)}),r)}async function xee(e,t,n){const r=new URLSearchParams;r.set("type","dates"),r.set("command",e),r.set("data",t);const o="".concat(xl,"/config?").concat(r.toString()),i=await Cl(o,null);return"err"in i?i:n(i)}function bee(e){const{tags:t,tag:n,setTag:o,addDate:i}=e,[a,s]=(0,r.useState)([t[0],El((new Date).getTime())]),[l,c]=(0,r.useState)("");return(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"Tags:"}),(0,Sn.jsxs)("select",{value:null!=n?n:"none",onChange:e=>{const t=e.target.value;o("none"===t?null:t)},children:[(0,Sn.jsx)("option",{value:"none",children:"none"},"none"),t.map((e=>(0,Sn.jsx)("option",{value:e,children:e},e)))]}),(0,Sn.jsx)(p7,{msg:"Add Date",content:(0,Sn.jsxs)("div",{children:[(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"Tag:"}),(0,Sn.jsx)("select",{value:null!=a?a[0]:"none",onChange:e=>{s((t=>[e.target.value,t[1]]))},children:t.map((e=>(0,Sn.jsx)("option",{value:e,children:e},e)))})]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"Date:"}),(0,Sn.jsx)("input",{value:a[1],type:"date",onChange:e=>s((t=>[t[0],e.target.value]))}),(0,Sn.jsx)(V5,{onClick:e=>{c((e=>{const t=a[1];if(e.length>0){return new Set(e.split(",")).has(t)?e:e+","+t}return t}))},children:(0,Sn.jsx)(vee.A,{})}),(0,Sn.jsx)(Ka,{value:l,onChange:e=>c(e.target.value),multiline:!0})]})]}),callBack:e=>{l.length>0?xee("adddate",JSON.stringify({tag:a[0],date:l}),(e=>"s"in e?e.s:{err:"no key named:s"})).then((n=>{"boolean"===typeof n?(e(n?"Succeed":"Fail"),n&&(c(""),s([t[0],El((new Date).getTime())]),i())):e("Fail,reason:"+n.err)})):e("tag empty")}})]})}function wee(){const[e,t]=(0,r.useState)(null),[n,o]=(0,r.useState)(1),[i,a]=(0,r.useState)(0),[s,l]=(0,r.useState)(0),c=(0,r.useCallback)((async t=>await yee(e,n,20,t)),[e,n,s]),[u,d]=(0,r.useState)(null),h=(0,r.useCallback)((async e=>await xee("listtag","{}",(e=>"data"in e?e.data:{err:"no data found"}),e)),[i]);return(0,Sn.jsxs)("main",{children:[(0,Sn.jsx)("div",{children:(0,Sn.jsx)(p7,{msg:"Create Tag",content:(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"Tag:"}),(0,Sn.jsx)("input",{value:u||"",onChange:e=>d(e.target.value)})]}),callBack:e=>{null!=u&&u.length>0?xee("addtag",JSON.stringify({tag:u}),(e=>"s"in e?e.s:{err:"no key named:s"})).then((t=>{"boolean"===typeof t?(e(t?"Succeed":"Fail"),t&&a((e=>e+1))):e("Fail,reason:"+t.err),d(null)})):e("tag empty")}})}),(0,Sn.jsx)(Qc,{getter:h,cvt:n=>(0,Sn.jsx)(bee,{tags:n,tag:e,setTag:t,addDate:()=>l((e=>e+1))})}),(0,Sn.jsx)(Qc,{getter:c,cvt:e=>(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("div",{children:(0,Sn.jsx)(mee,{count:e.total,page:n,onChange:(e,t)=>{o(t)}})}),(0,Sn.jsxs)(j4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,Sn.jsx)("thead",{children:(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:"Tag"}),(0,Sn.jsx)("td",{children:"Date"}),(0,Sn.jsx)("td",{children:"Operate"})]})}),(0,Sn.jsx)("tbody",{children:e.data.map((e=>(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:e.tag}),(0,Sn.jsx)("td",{children:e.dts}),(0,Sn.jsx)("td",{children:(0,Sn.jsx)(p7,{content:(0,Sn.jsxs)("p",{children:["\u662f\u5426\u5220\u9664,tag:",e.tag,",date:",e.dts,"?"]}),msg:"\u5220\u9664",callBack:t=>{xee("deletedate",JSON.stringify({date:e.dts,tag:e.tag}),(e=>"s"in e&&e.s)).then((e=>{"boolean"===typeof e&&e?(l((e=>e+1)),t("\u5220\u9664\u6210\u529f!")):t("\u5220\u9664\u5931\u8d25!")}))}})})]})))})]})]})})]})}function See(e){const t=(0,r.useCallback)((async e=>{const t=await yee(null,1,1e3,e);if("err"in t)return t;{const e=new Map;return t.data.forEach((t=>{const n=e.get(t.tag);null!=n?n.push(t.dts):e.set(t.tag,[t.dts])})),e}}),[]);return(0,Sn.jsx)(Qc,{getter:t,cvt:t=>(0,Sn.jsx)($8,{data:Array.from(t.entries()).map((e=>e[0])),select:n=>{const r=new Set;n.forEach((e=>{const n=t.get(e);null!=n&&n.forEach((e=>r.add(e)))})),e.updater(r)}})})}function _ee(e){const{filters:t,updater:n}=e,[o,i]=(0,r.useState)(new AbortController);(0,r.useEffect)((()=>()=>{o.abort()}),[o]);const a=(e,t,r)=>{(async function(e,t,n){const r={rowid:e,freeze:t?1:0},o=await n7("uperset",JSON.stringify(r),(e=>"s"in e&&e.s),n);return"boolean"===typeof o&&o})(t,r,o.signal).then((t=>{e("\u64cd\u4f5c"+(t?"\u6210\u529f":"\u5931\u8d25")+"!"),n()}))};return(0,Sn.jsx)("div",{children:(0,Sn.jsxs)(j4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,Sn.jsx)("thead",{children:(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:"Name"}),(0,Sn.jsx)("td",{children:"Freeze"}),(0,Sn.jsx)("td",{children:"Operate"})]})}),(0,Sn.jsx)("tbody",{children:t.map((e=>(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:e.name}),(0,Sn.jsx)("td",{children:1===e.freeze?"\u9501\u5b9a":"\u672a\u9501\u5b9a"}),(0,Sn.jsx)("td",{children:(0,Sn.jsx)(p7,{msg:1===e.freeze?"\u89e3\u9501":"\u9501\u5b9a",callBack:t=>{null!=e.rowid&&a(t,e.rowid,!(1===e.freeze))}})})]})))})]})})}function Aee(){const[e,t]=(0,r.useState)(0),n=(0,r.useCallback)((async e=>await r7(e)),[e]);return(0,Sn.jsx)(Qc,{getter:n,cvt:e=>(0,Sn.jsx)(_ee,{filters:e,updater:()=>t((e=>e+1))})})}function kee(e){const{data:t,config:n,updater:r}=e,o=t.find((e=>e.name===n.config));if(null!=o){const e=n.value,t=o.value.map((t=>({...t,default:e[t.key]})));return(0,Sn.jsx)(J8,{params:t,handleConfig:e=>r(e)})}return(0,Sn.jsx)("p",{children:"fail to find config!"})}function Cee(e){const{data:t,configs:n,updater:o}=e,[i,a]=(0,r.useState)(null);return(0,Sn.jsxs)(j4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,Sn.jsx)("thead",{children:(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:"Name"},"name"),(0,Sn.jsx)("td",{children:"Desc"},"desc"),(0,Sn.jsx)("td",{children:"Config"},"config"),(0,Sn.jsx)("td",{children:"Operate"},"operate")]})}),(0,Sn.jsx)("tbody",{children:n.map((e=>(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:e.name},"name"),(0,Sn.jsx)("td",{children:e.desc},"desc"),(0,Sn.jsx)("td",{children:e.config},"config"),(0,Sn.jsx)("td",{children:(0,Sn.jsx)(p7,{msg:"\u4fee\u6539\u914d\u7f6e",content:null!=i?(0,Sn.jsxs)("div",{children:[(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u540d\u79f0:"}),i.name]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u63cf\u8ff0:"}),(0,Sn.jsx)("input",{value:i.desc,onChange:e=>a((t=>null!=t?{...t,desc:e.target.value}:null))})]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u914d\u7f6e\u7c7b\u578b:"}),i.config]}),(0,Sn.jsx)("div",{children:(0,Sn.jsx)(kee,{data:t,config:i,updater:e=>{a((t=>{if(null!=t){const n={...t.value,[e[0]]:e[1]};return{...t,value:n}}return null}))}})})]}):void 0,callBack:e=>{null!=i&&i.name.length>0?bc(i).then((t=>{e("\u64cd\u4f5c"+(t?"\u6210\u529f":"\u5931\u8d25")+"!"),o()})):e("\u64cd\u4f5c\u5931\u8d25!")},clickCB:()=>a(e)})},"operate")]})))})]})}function Mee(e){const{data:t}=e,[n,o]=(0,r.useState)(null),[i,a]=(0,r.useState)(0),s=(0,r.useCallback)((async e=>await async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t="".concat(xl,"/control?command=blockConfig&sub=list"),n=await Cl(t,e);return"err"in n||"data"in n&&"count"in n?n:{err:"data or count not found"}}(e)),[i]);return(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("div",{children:(0,Sn.jsx)(p7,{msg:"\u65b0\u5efa\u914d\u7f6e",content:null!=n?(0,Sn.jsxs)("div",{children:[(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u540d\u79f0:"}),(0,Sn.jsx)("input",{value:n.name,onChange:e=>o((t=>null!=t?{...t,name:e.target.value}:null))})]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u63cf\u8ff0:"}),(0,Sn.jsx)("input",{value:n.desc,onChange:e=>o((t=>null!=t?{...t,desc:e.target.value}:null))})]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u914d\u7f6e\u7c7b\u578b:"}),(0,Sn.jsx)("select",{value:n.config,onChange:e=>{o((n=>{if(null!=n){const r=e.target.value,o=t.find((e=>e.name===r));if(o)return{...n,config:r,value:Object.fromEntries(o.value.map((e=>[e.key,e.default])))}}return null}))},children:t.map((e=>(0,Sn.jsx)("option",{value:e.name,children:e.name},e.name)))}),(0,Sn.jsx)(kee,{data:t,config:n,updater:e=>{o((t=>{if(null!=t){const n={...t.value,[e[0]]:e[1]};return{...t,value:n}}return null}))}})]})]}):void 0,callBack:e=>{null!=n&&n.name.length>0?bc(n).then((t=>{const n="\u64cd\u4f5c"+(t?"\u6210\u529f":"\u5931\u8d25")+"!";t&&a((e=>e+1)),e(n)})):e("\u64cd\u4f5c\u5931\u8d25!")},clickCB:()=>o({name:"",desc:"",config:t[0].name,value:Object.fromEntries(t[0].value.map((e=>[e.key,e.default])))})})}),(0,Sn.jsx)(Qc,{getter:s,cvt:e=>(0,Sn.jsx)(Cee,{data:t,configs:e.data,updater:()=>a((e=>e+1))})})]})}function Iee(){const e=(0,r.useCallback)((async e=>await async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t="".concat(xl,"/control?command=blockConfig&sub=listConfig"),n=await Cl(t,e);return n}(e)),[]);return(0,Sn.jsx)(Qc,{getter:e,cvt:e=>e.length>0?(0,Sn.jsx)(Mee,{data:e}):(0,Sn.jsx)("p",{children:"Empty Config"})})}function Tee(e,t){var n=0;return e.map((e=>{const r=t(e);return Math.abs(r)>.01?(n=r,r):n}))}function Dee(e){const{x:t,callData:n,putData:o}=e,[i,a]=(0,r.useState)(null),s=(0,r.useRef)(null);return(0,r.useEffect)((()=>{if(null!=s.current)if(null==i){const e=ZT(s.current);a(e)}else{const e=L2(t,[[["vol(call)",Tee(n,(e=>e[0]))],["vol(put)",Tee(o,(e=>e[0]))]],[["call price",Tee(n,(e=>e[1]))],["pure value",Tee(n,(e=>e[2]))]],[["put price",Tee(o,(e=>e[1]))],["pure value",Tee(o,(e=>e[2]))]]]);i.setOption(e)}else a(null)}),[n,i,o,t]),(0,Sn.jsx)("div",{ref:s,style:{width:"100%",aspectRatio:"16/9"}})}function jee(e){const{data:t}=e,n=t.map((e=>Kl(e.ts)));return(0,Sn.jsxs)("div",{style:{width:"100%"},children:[(0,Sn.jsx)("h2",{children:"Level 1:"}),(0,Sn.jsx)(Dee,{x:n,callData:t.map((e=>e.callM.length>0?e.callM[0]:[0,0,0])),putData:t.map((e=>e.putM.length>0?e.putM[0]:[0,0,0]))}),(0,Sn.jsx)("h2",{children:"Level 2:"}),(0,Sn.jsx)(Dee,{x:n,callData:t.map((e=>e.callM.length>1?e.callM[1]:[0,0,0])),putData:t.map((e=>e.putM.length>1?e.putM[1]:[0,0,0]))}),(0,Sn.jsx)("h2",{children:"Level 3:"}),(0,Sn.jsx)(Dee,{x:n,callData:t.map((e=>e.callM.length>2?e.callM[2]:[0,0,0])),putData:t.map((e=>e.putM.length>2?e.putM[2]:[0,0,0]))}),(0,Sn.jsx)("h2",{children:"Level 4:"}),(0,Sn.jsx)(Dee,{x:n,callData:t.map((e=>e.callM.length>3?e.callM[3]:[0,0,0])),putData:t.map((e=>e.putM.length>3?e.putM[3]:[0,0,0]))})]})}function Pee(){const[e,t]=(0,r.useState)((()=>"2024-04-01")),n=(0,r.useCallback)((async t=>await async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n="".concat(xl,"/qqqVolData?dt=").concat(e);return await Cl(n,t)}(e,t)),[e]);return(0,Sn.jsxs)("main",{style:{flex:1,width:"80vw"},children:[(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"Select Date:"}),(0,Sn.jsx)("input",{type:"date",value:e,onChange:e=>t(e.target.value)})]}),(0,Sn.jsx)(Qc,{getter:n,cvt:e=>(0,Sn.jsx)(jee,{data:e})})]})}function Lee(e){return(0,Kt.Ay)("MuiTableContainer",e)}(0,nr.A)("MuiTableContainer",["root"]);const Ree=["className","component"],Eee=(0,In.Ay)("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),Nee=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiTableContainer"}),{className:r,component:o="div"}=n,i=(0,Yt.A)(n,Ree),a=(0,qt.A)({},n,{component:o}),s=(e=>{const{classes:t}=e;return(0,$t.A)({root:["root"]},Lee,t)})(a);return(0,Sn.jsx)(Eee,(0,qt.A)({ref:t,as:o,className:(0,Zt.A)(s.root,r),ownerState:a},i))})),Oee=Nee;const zee=r.createContext();function Bee(e){return(0,Kt.Ay)("MuiTableHead",e)}(0,nr.A)("MuiTableHead",["root"]);const Fee=["className","component"],Vee=(0,In.Ay)("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),Wee={variant:"head"},Hee="thead",Gee=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiTableHead"}),{className:r,component:o=Hee}=n,i=(0,Yt.A)(n,Fee),a=(0,qt.A)({},n,{component:o}),s=(e=>{const{classes:t}=e;return(0,$t.A)({root:["root"]},Bee,t)})(a);return(0,Sn.jsx)(zee.Provider,{value:Wee,children:(0,Sn.jsx)(Vee,(0,qt.A)({as:o,className:(0,Zt.A)(s.root,r),ref:t,role:o===Hee?null:"rowgroup",ownerState:a},i))})})),Uee=Gee;const Xee=r.createContext();function Yee(e){return(0,Kt.Ay)("MuiTableCell",e)}const qee=(0,nr.A)("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),Zee=["align","className","component","padding","scope","size","sortDirection","variant"],Kee=(0,In.Ay)("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["size".concat((0,Mn.A)(n.size))],"normal"!==n.padding&&t["padding".concat((0,Mn.A)(n.padding))],"inherit"!==n.align&&t["align".concat((0,Mn.A)(n.align))],n.stickyHeader&&t.stickyHeader]}})((e=>{let{theme:t,ownerState:n}=e;return(0,qt.A)({},t.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:t.vars?"1px solid ".concat(t.vars.palette.TableCell.border):"1px solid\n    ".concat("light"===t.palette.mode?(0,zi.a)((0,zi.X4)(t.palette.divider,1),.88):(0,zi.e$)((0,zi.X4)(t.palette.divider,1),.68)),textAlign:"left",padding:16},"head"===n.variant&&{color:(t.vars||t).palette.text.primary,lineHeight:t.typography.pxToRem(24),fontWeight:t.typography.fontWeightMedium},"body"===n.variant&&{color:(t.vars||t).palette.text.primary},"footer"===n.variant&&{color:(t.vars||t).palette.text.secondary,lineHeight:t.typography.pxToRem(21),fontSize:t.typography.pxToRem(12)},"small"===n.size&&{padding:"6px 16px",["&.".concat(qee.paddingCheckbox)]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},"checkbox"===n.padding&&{width:48,padding:"0 0 0 4px"},"none"===n.padding&&{padding:0},"left"===n.align&&{textAlign:"left"},"center"===n.align&&{textAlign:"center"},"right"===n.align&&{textAlign:"right",flexDirection:"row-reverse"},"justify"===n.align&&{textAlign:"justify"},n.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(t.vars||t).palette.background.default})})),$ee=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiTableCell"}),{align:o="inherit",className:i,component:a,padding:s,scope:l,size:c,sortDirection:u,variant:d}=n,h=(0,Yt.A)(n,Zee),p=r.useContext(Xee),f=r.useContext(zee),g=f&&"head"===f.variant;let m;m=a||(g?"th":"td");let v=l;"td"===m?v=void 0:!v&&g&&(v="col");const y=d||f&&f.variant,x=(0,qt.A)({},n,{align:o,component:m,padding:s||(p&&p.padding?p.padding:"normal"),size:c||(p&&p.size?p.size:"medium"),sortDirection:u,stickyHeader:"head"===y&&p&&p.stickyHeader,variant:y}),b=(e=>{const{classes:t,variant:n,align:r,padding:o,size:i,stickyHeader:a}=e,s={root:["root",n,a&&"stickyHeader","inherit"!==r&&"align".concat((0,Mn.A)(r)),"normal"!==o&&"padding".concat((0,Mn.A)(o)),"size".concat((0,Mn.A)(i))]};return(0,$t.A)(s,Yee,t)})(x);let w=null;return u&&(w="asc"===u?"ascending":"descending"),(0,Sn.jsx)(Kee,(0,qt.A)({as:m,ref:t,className:(0,Zt.A)(b.root,i),"aria-sort":w,scope:v,ownerState:x},h))})),Qee=$ee;function Jee(e){return(0,Kt.Ay)("MuiTableBody",e)}(0,nr.A)("MuiTableBody",["root"]);const ete=["className","component"],tte=(0,In.Ay)("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-row-group"}),nte={variant:"body"},rte="tbody",ote=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiTableBody"}),{className:r,component:o=rte}=n,i=(0,Yt.A)(n,ete),a=(0,qt.A)({},n,{component:o}),s=(e=>{const{classes:t}=e;return(0,$t.A)({root:["root"]},Jee,t)})(a);return(0,Sn.jsx)(zee.Provider,{value:nte,children:(0,Sn.jsx)(tte,(0,qt.A)({className:(0,Zt.A)(s.root,r),as:o,ref:t,role:o===rte?null:"rowgroup",ownerState:a},i))})})),ite=ote;function ate(e){return(0,Kt.Ay)("MuiTableRow",e)}const ste=(0,nr.A)("MuiTableRow",["root","selected","hover","head","footer"]),lte=["className","component","hover","selected"],cte=(0,In.Ay)("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.head&&t.head,n.footer&&t.footer]}})((e=>{let{theme:t}=e;return{color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,["&.".concat(ste.hover,":hover")]:{backgroundColor:(t.vars||t).palette.action.hover},["&.".concat(ste.selected)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,zi.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,zi.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)}}}})),ute="tr",dte=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiTableRow"}),{className:o,component:i=ute,hover:a=!1,selected:s=!1}=n,l=(0,Yt.A)(n,lte),c=r.useContext(zee),u=(0,qt.A)({},n,{component:i,hover:a,selected:s,head:c&&"head"===c.variant,footer:c&&"footer"===c.variant}),d=(e=>{const{classes:t,selected:n,hover:r,head:o,footer:i}=e,a={root:["root",n&&"selected",r&&"hover",o&&"head",i&&"footer"]};return(0,$t.A)(a,ate,t)})(u);return(0,Sn.jsx)(cte,(0,qt.A)({as:i,ref:t,className:(0,Zt.A)(d.root,o),role:i===ute?null:"row",ownerState:u},l))})),hte=dte;var pte=n(1188),fte=n(9640);const gte={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};const mte=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:(e,t)=>e===t;return e.length===t.length&&e.every(((e,r)=>n(e,t[r])))};function vte(e,t){return e-t}function yte(e,t){var n;const{index:r}=null!=(n=e.reduce(((e,n,r)=>{const o=Math.abs(t-n);return null===e||o<e.distance||o===e.distance?{distance:o,index:r}:e}),null))?n:{};return r}function xte(e,t){if(void 0!==t.current&&e.changedTouches){const n=e;for(let e=0;e<n.changedTouches.length;e+=1){const r=n.changedTouches[e];if(r.identifier===t.current)return{x:r.clientX,y:r.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function bte(e,t,n){return 100*(e-t)/(n-t)}function wte(e,t,n){const r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(function(e){if(Math.abs(e)<1){const t=e.toExponential().split("e-"),n=t[0].split(".")[1];return(n?n.length:0)+parseInt(t[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}(t)))}function Ste(e){let{values:t,newValue:n,index:r}=e;const o=t.slice();return o[r]=n,o.sort(vte)}function _te(e){let{sliderRef:t,activeIndex:n,setActive:r}=e;var o,i;const a=(0,si.A)(t.current);var s;null!=(o=t.current)&&o.contains(a.activeElement)&&Number(null==a||null==(i=a.activeElement)?void 0:i.getAttribute("data-index"))===n||(null==(s=t.current)||s.querySelector('[type="range"][data-index="'.concat(n,'"]')).focus());r&&r(n)}function Ate(e,t){return"number"===typeof e&&"number"===typeof t?e===t:"object"===typeof e&&"object"===typeof t&&mte(e,t)}const kte={horizontal:{offset:e=>({left:"".concat(e,"%")}),leap:e=>({width:"".concat(e,"%")})},"horizontal-reverse":{offset:e=>({right:"".concat(e,"%")}),leap:e=>({width:"".concat(e,"%")})},vertical:{offset:e=>({bottom:"".concat(e,"%")}),leap:e=>({height:"".concat(e,"%")})}},Cte=e=>e;let Mte;function Ite(){return void 0===Mte&&(Mte="undefined"===typeof CSS||"function"!==typeof CSS.supports||CSS.supports("touch-action","none")),Mte}function Tte(e){const{"aria-labelledby":t,defaultValue:n,disabled:o=!1,disableSwap:i=!1,isRtl:a=!1,marks:s=!1,max:l=100,min:c=0,name:u,onChange:d,onChangeCommitted:h,orientation:p="horizontal",rootRef:f,scale:g=Cte,step:m=1,shiftStep:v=10,tabIndex:y,value:x}=e,b=r.useRef(),[w,S]=r.useState(-1),[_,A]=r.useState(-1),[k,C]=r.useState(!1),M=r.useRef(0),[I,T]=(0,K9.A)({controlled:x,default:null!=n?n:c,name:"Slider"}),D=d&&((e,t,n)=>{const r=e.nativeEvent||e,o=new r.constructor(r.type,r);Object.defineProperty(o,"target",{writable:!0,value:{value:t,name:u}}),d(o,t,n)}),j=Array.isArray(I);let P=j?I.slice().sort(vte):[I];P=P.map((e=>null==e?c:(0,pte.A)(e,c,l)));const L=!0===s&&null!==m?[...Array(Math.floor((l-c)/m)+1)].map(((e,t)=>({value:c+m*t}))):s||[],R=L.map((e=>e.value)),{isFocusVisibleRef:E,onBlur:N,onFocus:O,ref:z}=(0,fte.A)(),[B,F]=r.useState(-1),V=r.useRef(),W=(0,En.A)(z,V),H=(0,En.A)(f,W),G=e=>t=>{var n;const r=Number(t.currentTarget.getAttribute("data-index"));O(t),!0===E.current&&F(r),A(r),null==e||null==(n=e.onFocus)||n.call(e,t)},U=e=>t=>{var n;N(t),!1===E.current&&F(-1),A(-1),null==e||null==(n=e.onBlur)||n.call(e,t)},X=(e,t)=>{const n=Number(e.currentTarget.getAttribute("data-index")),r=P[n],o=R.indexOf(r);let a=t;if(L&&null==m){const e=R[R.length-1];a=a>e?e:a<R[0]?R[0]:a<r?R[o-1]:R[o+1]}if(a=(0,pte.A)(a,c,l),j){i&&(a=(0,pte.A)(a,P[n-1]||-1/0,P[n+1]||1/0));const e=a;a=Ste({values:P,newValue:a,index:n});let t=n;i||(t=a.indexOf(e)),_te({sliderRef:V,activeIndex:t})}T(a),F(n),D&&!Ate(a,I)&&D(e,a,n),h&&h(e,a)},Y=e=>t=>{var n;if(null!==m){const e=Number(t.currentTarget.getAttribute("data-index")),n=P[e];let r=null;("ArrowLeft"===t.key||"ArrowDown"===t.key)&&t.shiftKey||"PageDown"===t.key?r=Math.max(n-v,c):(("ArrowRight"===t.key||"ArrowUp"===t.key)&&t.shiftKey||"PageUp"===t.key)&&(r=Math.min(n+v,l)),null!==r&&(X(t,r),t.preventDefault())}null==e||null==(n=e.onKeyDown)||n.call(e,t)};(0,On.A)((()=>{var e;o&&V.current.contains(document.activeElement)&&(null==(e=document.activeElement)||e.blur())}),[o]),o&&-1!==w&&S(-1),o&&-1!==B&&F(-1);const q=r.useRef();let Z=p;a&&"horizontal"===p&&(Z+="-reverse");const K=e=>{let{finger:t,move:n=!1}=e;const{current:r}=V,{width:o,height:a,bottom:s,left:u}=r.getBoundingClientRect();let d,h;if(d=0===Z.indexOf("vertical")?(s-t.y)/a:(t.x-u)/o,-1!==Z.indexOf("-reverse")&&(d=1-d),h=function(e,t,n){return(n-t)*e+t}(d,c,l),m)h=wte(h,m,c);else{const e=yte(R,h);h=R[e]}h=(0,pte.A)(h,c,l);let p=0;if(j){p=n?q.current:yte(P,h),i&&(h=(0,pte.A)(h,P[p-1]||-1/0,P[p+1]||1/0));const e=h;h=Ste({values:P,newValue:h,index:p}),i&&n||(p=h.indexOf(e),q.current=p)}return{newValue:h,activeIndex:p}},$=(0,_i.A)((e=>{const t=xte(e,b);if(!t)return;if(M.current+=1,"mousemove"===e.type&&0===e.buttons)return void Q(e);const{newValue:n,activeIndex:r}=K({finger:t,move:!0});_te({sliderRef:V,activeIndex:r,setActive:S}),T(n),!k&&M.current>2&&C(!0),D&&!Ate(n,I)&&D(e,n,r)})),Q=(0,_i.A)((e=>{const t=xte(e,b);if(C(!1),!t)return;const{newValue:n}=K({finger:t,move:!0});S(-1),"touchend"===e.type&&A(-1),h&&h(e,n),b.current=void 0,ee()})),J=(0,_i.A)((e=>{if(o)return;Ite()||e.preventDefault();const t=e.changedTouches[0];null!=t&&(b.current=t.identifier);const n=xte(e,b);if(!1!==n){const{newValue:t,activeIndex:r}=K({finger:n});_te({sliderRef:V,activeIndex:r,setActive:S}),T(t),D&&!Ate(t,I)&&D(e,t,r)}M.current=0;const r=(0,si.A)(V.current);r.addEventListener("touchmove",$,{passive:!0}),r.addEventListener("touchend",Q,{passive:!0})})),ee=r.useCallback((()=>{const e=(0,si.A)(V.current);e.removeEventListener("mousemove",$),e.removeEventListener("mouseup",Q),e.removeEventListener("touchmove",$),e.removeEventListener("touchend",Q)}),[Q,$]);r.useEffect((()=>{const{current:e}=V;return e.addEventListener("touchstart",J,{passive:Ite()}),()=>{e.removeEventListener("touchstart",J),ee()}}),[ee,J]),r.useEffect((()=>{o&&ee()}),[o,ee]);const te=bte(j?P[0]:c,c,l),ne=bte(P[P.length-1],c,l)-te,re=e=>t=>{var n;null==(n=e.onMouseLeave)||n.call(e,t),A(-1)};return{active:w,axis:Z,axisProps:kte,dragging:k,focusedThumbIndex:B,getHiddenInputProps:function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var r;const i=mo(n),s={onChange:(d=i||{},e=>{var t;null==(t=d.onChange)||t.call(d,e),X(e,e.target.valueAsNumber)}),onFocus:G(i||{}),onBlur:U(i||{}),onKeyDown:Y(i||{})};var d;const h=(0,qt.A)({},i,s);return(0,qt.A)({tabIndex:y,"aria-labelledby":t,"aria-orientation":p,"aria-valuemax":g(l),"aria-valuemin":g(c),name:u,type:"range",min:e.min,max:e.max,step:null===e.step&&e.marks?"any":null!=(r=e.step)?r:void 0,disabled:o},n,h,{style:(0,qt.A)({},gte,{direction:a?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=mo(e),n={onMouseDown:(r=t||{},e=>{var t;if(null==(t=r.onMouseDown)||t.call(r,e),o)return;if(e.defaultPrevented)return;if(0!==e.button)return;e.preventDefault();const n=xte(e,b);if(!1!==n){const{newValue:t,activeIndex:r}=K({finger:n});_te({sliderRef:V,activeIndex:r,setActive:S}),T(t),D&&!Ate(t,I)&&D(e,t,r)}M.current=0;const i=(0,si.A)(V.current);i.addEventListener("mousemove",$,{passive:!0}),i.addEventListener("mouseup",Q)})};var r;const i=(0,qt.A)({},t,n);return(0,qt.A)({},e,{ref:H},i)},getThumbProps:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=mo(e),n={onMouseOver:(r=t||{},e=>{var t;null==(t=r.onMouseOver)||t.call(r,e);const n=Number(e.currentTarget.getAttribute("data-index"));A(n)}),onMouseLeave:re(t||{})};var r;return(0,qt.A)({},e,t,n)},marks:L,open:_,range:j,rootRef:H,trackLeap:ne,trackOffset:te,values:P,getThumbStyle:e=>({pointerEvents:-1!==w&&w!==e?"none":void 0})}}const Dte=e=>!e||!Rn(e);function jte(e){return(0,Kt.Ay)("MuiSlider",e)}const Pte=(0,nr.A)("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]);const Lte=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","shiftStep","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"];function Rte(e){return e}const Ete=(0,In.Ay)("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["color".concat((0,Mn.A)(n.color))],"medium"!==n.size&&t["size".concat((0,Mn.A)(n.size))],n.marked&&t.marked,"vertical"===n.orientation&&t.vertical,"inverted"===n.track&&t.trackInverted,!1===n.track&&t.trackFalse]}})((e=>{let{theme:t}=e;var n;return{borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},["&.".concat(Pte.disabled)]:{pointerEvents:"none",cursor:"default",color:(t.vars||t).palette.grey[400]},["&.".concat(Pte.dragging)]:{["& .".concat(Pte.thumb,", & .").concat(Pte.track)]:{transition:"none"}},variants:[...Object.keys((null!=(n=t.vars)?n:t).palette).filter((e=>{var n;return(null!=(n=t.vars)?n:t).palette[e].main})).map((e=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}}))),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}})),Nte=(0,In.Ay)("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),Ote=(0,In.Ay)("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})((e=>{let{theme:t}=e;var n;return{display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:t.transitions.create(["left","width","bottom","height"],{duration:t.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.keys((null!=(n=t.vars)?n:t).palette).filter((e=>{var n;return(null!=(n=t.vars)?n:t).palette[e].main})).map((e=>({props:{color:e,track:"inverted"},style:(0,qt.A)({},t.vars?{backgroundColor:t.vars.palette.Slider["".concat(e,"Track")],borderColor:t.vars.palette.Slider["".concat(e,"Track")]}:(0,qt.A)({backgroundColor:(0,zi.a)(t.palette[e].main,.62),borderColor:(0,zi.a)(t.palette[e].main,.62)},t.applyStyles("dark",{backgroundColor:(0,zi.e$)(t.palette[e].main,.5)}),t.applyStyles("dark",{borderColor:(0,zi.e$)(t.palette[e].main,.5)})))})))]}})),zte=(0,In.Ay)("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.thumb,t["thumbColor".concat((0,Mn.A)(n.color))],"medium"!==n.size&&t["thumbSize".concat((0,Mn.A)(n.size))]]}})((e=>{let{theme:t}=e;var n;return{position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:t.transitions.create(["box-shadow","left","bottom"],{duration:t.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(t.vars||t).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},["&.".concat(Pte.disabled)]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.keys((null!=(n=t.vars)?n:t).palette).filter((e=>{var n;return(null!=(n=t.vars)?n:t).palette[e].main})).map((e=>({props:{color:e},style:{["&:hover, &.".concat(Pte.focusVisible)]:(0,qt.A)({},t.vars?{boxShadow:"0px 0px 0px 8px rgba(".concat(t.vars.palette[e].mainChannel," / 0.16)")}:{boxShadow:"0px 0px 0px 8px ".concat((0,zi.X4)(t.palette[e].main,.16))},{"@media (hover: none)":{boxShadow:"none"}}),["&.".concat(Pte.active)]:(0,qt.A)({},t.vars?{boxShadow:"0px 0px 0px 14px rgba(".concat(t.vars.palette[e].mainChannel," / 0.16)")}:{boxShadow:"0px 0px 0px 14px ".concat((0,zi.X4)(t.palette[e].main,.16))})}})))]}})),Bte=(0,In.Ay)((function(e){const{children:t,className:n,value:o}=e,i=(e=>{const{open:t}=e;return{offset:(0,Zt.A)(t&&Pte.valueLabelOpen),circle:Pte.valueLabelCircle,label:Pte.valueLabelLabel}})(e);return t?r.cloneElement(t,{className:(0,Zt.A)(t.props.className)},(0,Sn.jsxs)(r.Fragment,{children:[t.props.children,(0,Sn.jsx)("span",{className:(0,Zt.A)(i.offset,n),"aria-hidden":!0,children:(0,Sn.jsx)("span",{className:i.circle,children:(0,Sn.jsx)("span",{className:i.label,children:o})})})]})):null}),{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})((e=>{let{theme:t}=e;return(0,qt.A)({zIndex:1,whiteSpace:"nowrap"},t.typography.body2,{fontWeight:500,transition:t.transitions.create(["transform"],{duration:t.transitions.duration.shortest}),position:"absolute",backgroundColor:(t.vars||t).palette.grey[600],borderRadius:2,color:(t.vars||t).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},["&.".concat(Pte.valueLabelOpen)]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},["&.".concat(Pte.valueLabelOpen)]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:t.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]})})),Fte=(0,In.Ay)("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>(0,Sa.A)(e)&&"markActive"!==e,overridesResolver:(e,t)=>{const{markActive:n}=e;return[t.mark,n&&t.markActive]}})((e=>{let{theme:t}=e;return{position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(t.vars||t).palette.background.paper,opacity:.8}}]}})),Vte=(0,In.Ay)("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>(0,Sa.A)(e)&&"markLabelActive"!==e,overridesResolver:(e,t)=>t.markLabel})((e=>{let{theme:t}=e;return(0,qt.A)({},t.typography.body2,{color:(t.vars||t).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(t.vars||t).palette.text.primary}}]})})),Wte=e=>{let{children:t}=e;return t},Hte=r.forwardRef((function(e,t){var n,o,i,a,s,l,c,u,d,h,p,f,g,m,v,y,x,b,w,S,_,A,k,C;const M=(0,Tn.b)({props:e,name:"MuiSlider"}),I=fo(),{"aria-label":T,"aria-valuetext":D,"aria-labelledby":j,component:P="span",components:L={},componentsProps:R={},color:E="primary",classes:N,className:O,disableSwap:z=!1,disabled:B=!1,getAriaLabel:F,getAriaValueText:V,marks:W=!1,max:H=100,min:G=0,orientation:U="horizontal",shiftStep:X=10,size:Y="medium",step:q=1,scale:Z=Rte,slotProps:K,slots:$,track:Q="normal",valueLabelDisplay:J="off",valueLabelFormat:ee=Rte}=M,te=(0,Yt.A)(M,Lte),ne=(0,qt.A)({},M,{isRtl:I,max:H,min:G,classes:N,disabled:B,disableSwap:z,orientation:U,marks:W,color:E,size:Y,step:q,shiftStep:X,scale:Z,track:Q,valueLabelDisplay:J,valueLabelFormat:ee}),{axisProps:re,getRootProps:oe,getHiddenInputProps:ie,getThumbProps:ae,open:se,active:le,axis:ce,focusedThumbIndex:ue,range:de,dragging:he,marks:pe,values:fe,trackOffset:ge,trackLeap:me,getThumbStyle:ve}=Tte((0,qt.A)({},ne,{rootRef:t}));ne.marked=pe.length>0&&pe.some((e=>e.label)),ne.dragging=he,ne.focusedThumbIndex=ue;const ye=(e=>{const{disabled:t,dragging:n,marked:r,orientation:o,track:i,classes:a,color:s,size:l}=e,c={root:["root",t&&"disabled",n&&"dragging",r&&"marked","vertical"===o&&"vertical","inverted"===i&&"trackInverted",!1===i&&"trackFalse",s&&"color".concat((0,Mn.A)(s)),l&&"size".concat((0,Mn.A)(l))],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&"thumbSize".concat((0,Mn.A)(l)),s&&"thumbColor".concat((0,Mn.A)(s))],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return(0,$t.A)(c,jte,a)})(ne),xe=null!=(n=null!=(o=null==$?void 0:$.root)?o:L.Root)?n:Ete,be=null!=(i=null!=(a=null==$?void 0:$.rail)?a:L.Rail)?i:Nte,we=null!=(s=null!=(l=null==$?void 0:$.track)?l:L.Track)?s:Ote,Se=null!=(c=null!=(u=null==$?void 0:$.thumb)?u:L.Thumb)?c:zte,_e=null!=(d=null!=(h=null==$?void 0:$.valueLabel)?h:L.ValueLabel)?d:Bte,Ae=null!=(p=null!=(f=null==$?void 0:$.mark)?f:L.Mark)?p:Fte,ke=null!=(g=null!=(m=null==$?void 0:$.markLabel)?m:L.MarkLabel)?g:Vte,Ce=null!=(v=null!=(y=null==$?void 0:$.input)?y:L.Input)?v:"input",Me=null!=(x=null==K?void 0:K.root)?x:R.root,Ie=null!=(b=null==K?void 0:K.rail)?b:R.rail,Te=null!=(w=null==K?void 0:K.track)?w:R.track,De=null!=(S=null==K?void 0:K.thumb)?S:R.thumb,je=null!=(_=null==K?void 0:K.valueLabel)?_:R.valueLabel,Pe=null!=(A=null==K?void 0:K.mark)?A:R.mark,Le=null!=(k=null==K?void 0:K.markLabel)?k:R.markLabel,Re=null!=(C=null==K?void 0:K.input)?C:R.input,Ee=wo({elementType:xe,getSlotProps:oe,externalSlotProps:Me,externalForwardedProps:te,additionalProps:(0,qt.A)({},Dte(xe)&&{as:P}),ownerState:(0,qt.A)({},ne,null==Me?void 0:Me.ownerState),className:[ye.root,O]}),Ne=wo({elementType:be,externalSlotProps:Ie,ownerState:ne,className:ye.rail}),Oe=wo({elementType:we,externalSlotProps:Te,additionalProps:{style:(0,qt.A)({},re[ce].offset(ge),re[ce].leap(me))},ownerState:(0,qt.A)({},ne,null==Te?void 0:Te.ownerState),className:ye.track}),ze=wo({elementType:Se,getSlotProps:ae,externalSlotProps:De,ownerState:(0,qt.A)({},ne,null==De?void 0:De.ownerState),className:ye.thumb}),Be=wo({elementType:_e,externalSlotProps:je,ownerState:(0,qt.A)({},ne,null==je?void 0:je.ownerState),className:ye.valueLabel}),Fe=wo({elementType:Ae,externalSlotProps:Pe,ownerState:ne,className:ye.mark}),Ve=wo({elementType:ke,externalSlotProps:Le,ownerState:ne,className:ye.markLabel}),We=wo({elementType:Ce,getSlotProps:ie,externalSlotProps:Re,ownerState:ne});return(0,Sn.jsxs)(xe,(0,qt.A)({},Ee,{children:[(0,Sn.jsx)(be,(0,qt.A)({},Ne)),(0,Sn.jsx)(we,(0,qt.A)({},Oe)),pe.filter((e=>e.value>=G&&e.value<=H)).map(((e,t)=>{const n=bte(e.value,G,H),o=re[ce].offset(n);let i;return i=!1===Q?-1!==fe.indexOf(e.value):"normal"===Q&&(de?e.value>=fe[0]&&e.value<=fe[fe.length-1]:e.value<=fe[0])||"inverted"===Q&&(de?e.value<=fe[0]||e.value>=fe[fe.length-1]:e.value>=fe[0]),(0,Sn.jsxs)(r.Fragment,{children:[(0,Sn.jsx)(Ae,(0,qt.A)({"data-index":t},Fe,!Rn(Ae)&&{markActive:i},{style:(0,qt.A)({},o,Fe.style),className:(0,Zt.A)(Fe.className,i&&ye.markActive)})),null!=e.label?(0,Sn.jsx)(ke,(0,qt.A)({"aria-hidden":!0,"data-index":t},Ve,!Rn(ke)&&{markLabelActive:i},{style:(0,qt.A)({},o,Ve.style),className:(0,Zt.A)(ye.markLabel,Ve.className,i&&ye.markLabelActive),children:e.label})):null]},t)})),fe.map(((e,t)=>{const n=bte(e,G,H),r=re[ce].offset(n),o="off"===J?Wte:_e;return(0,Sn.jsx)(o,(0,qt.A)({},!Rn(o)&&{valueLabelFormat:ee,valueLabelDisplay:J,value:"function"===typeof ee?ee(Z(e),t):ee,index:t,open:se===t||le===t||"on"===J,disabled:B},Be,{children:(0,Sn.jsx)(Se,(0,qt.A)({"data-index":t},ze,{className:(0,Zt.A)(ye.thumb,ze.className,le===t&&ye.active,ue===t&&ye.focusVisible),style:(0,qt.A)({},r,ve(t),ze.style),children:(0,Sn.jsx)(Ce,(0,qt.A)({"data-index":t,"aria-label":F?F(t):T,"aria-valuenow":Z(e),"aria-labelledby":j,"aria-valuetext":V?V(Z(e),t):D,value:fe[t]},We))}))}),t)}))]}))})),Gte=Hte;function Ute(e,t){let n=0;return r.Children.map(e,(e=>r.isValidElement(e)?t(e,n++):e))}const Xte=1e3;function Yte(e,t,n){const r=(e-t)/(n-t)*100;return Math.round(r*Xte)/Xte}function qte(e,t){let{min:n,now:r,max:o,label:i,visuallyHidden:a,striped:s,animated:l,className:c,style:u,variant:d,bsPrefix:h,...p}=e;return(0,Sn.jsx)("div",{ref:t,...p,role:"progressbar",className:_4()(c,"".concat(h,"-bar"),{["bg-".concat(d)]:d,["".concat(h,"-bar-animated")]:l,["".concat(h,"-bar-striped")]:l||s}),style:{width:"".concat(Yte(r,n,o),"%"),...u},"aria-valuenow":r,"aria-valuemin":n,"aria-valuemax":o,children:a?(0,Sn.jsx)("span",{className:"visually-hidden",children:i}):i})}const Zte=r.forwardRef(((e,t)=>{let{isChild:n=!1,...o}=e;const i={min:0,max:100,animated:!1,visuallyHidden:!1,striped:!1,...o};if(i.bsPrefix=T4(i.bsPrefix,"progress"),n)return qte(i,t);const{min:a,now:s,max:l,label:c,visuallyHidden:u,striped:d,animated:h,bsPrefix:p,variant:f,className:g,children:m,...v}=i;return(0,Sn.jsx)("div",{ref:t,...v,className:_4()(g,p),children:m?Ute(m,(e=>(0,r.cloneElement)(e,{isChild:!0}))):qte({min:a,now:s,max:l,label:c,visuallyHidden:u,striped:d,animated:h,bsPrefix:p,variant:f},t)})}));Zte.displayName="ProgressBar";const Kte=Zte;function $te(e){var t=null;switch(e){case 0:t="\u672a\u5f00\u59cb";break;case-1:t="\u5931\u8d25";break;case 200:t="\u5b8c\u6210"}return t}function Qte(e){const[t,n]=(0,r.useState)(!1),[o,i]=(0,r.useState)("");return t?(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("textarea",{value:o,onChange:e=>{i(e.target.value)}}),(0,Sn.jsx)("button",{onClick:()=>{const t=new Set;Array.from(o.matchAll(/20\d\d-(0[1-9]|1[0-2])-[0-3]\d/g)).map((e=>e[0])).forEach((e=>{t.add(e)})),n(!1),e.setDates(Array.from(t.keys()).sort())},children:"\u786e\u5b9a"})]}):(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("div",{children:e.dates.map((e=>(0,Sn.jsx)(a5,{label:e,variant:"outlined"})))}),(0,Sn.jsx)("div",{children:(0,Sn.jsx)("button",{onClick:()=>{i(e.dates.join(",")),n(!0)},children:"\u7f16\u8f91"})})]})}function Jte(){const[e,t]=(0,r.useState)(null),[n,o]=(0,r.useState)([null,null]),[i,a]=(0,r.useState)([1,30,!0]),[s,l]=(0,r.useState)(1),[c,u]=(0,r.useState)(null),[d,h]=(0,r.useState)(null),[p,f]=(0,r.useState)(null),g=()=>f(null),m=()=>h(null),v=()=>{null!=p&&async function(e,t){const n=new URLSearchParams;n.set("command","update"),n.set("uid",e),n.set("desc",t);const r="".concat(xl,"/backtest?").concat(n.toString());return!("err"in await Cl(r))}(p[0],p[1]).then((e=>{e&&(t(null),a((e=>[e[0],e[1],!e[2]]))),f(null)}))},y=()=>{if(null!=d){const r=d.taskConfig.stock.split(",").map((e=>e.replace(/\s+/g,""))).filter((e=>e.length>0));if(r.length>0){var e,n;const o={};d.taskConfig.buyParams.forEach((e=>{o[e.key]=e.default}));const i={};d.taskConfig.sellParams.forEach((e=>{i[e.key]=e.default}));const s={};null===(e=d.taskConfig.sellParamsEnd)||void 0===e||e.forEach((e=>{s[e.key]=e.default}));Gl({name:null!==(n=d.name)&&void 0!==n&&n.length?d.name:d.taskConfig.stock+"-"+d.taskConfig.buyAlgorithm,desc:(d.desc||"")+(null!=d.dates?";\u591a\u4e2a\u65e5\u671f":""),startDate:d.startDate,endDate:d.endDate,needQuote:!1,configs:[{stocks:r,buyAlgorithm:d.taskConfig.buyAlgorithm,buyParams:o,sellAlgorithm:d.taskConfig.sellAlgorithm,sellParams:i,sellParamsEnd:s,origin:[[d.taskConfig.buyAlgorithm,d.taskConfig.buyParams],[d.taskConfig.sellAlgorithm,d.taskConfig.sellParams,d.taskConfig.sellParamsEnd]]}]},d.dates).then((e=>{e&&(t(null),a((e=>[1,e[1],e[2]]))),h(null)}))}}};if((0,r.useEffect)((()=>{const e=new AbortController;return Bl(e.signal).then((e=>{"err"in e||u(e)})),()=>{e.abort()}}),[]),(0,r.useEffect)((()=>{const e=new AbortController,r=e.signal;return async function(e,t,n,r,o){const i=new URLSearchParams;i.set("command","list"),i.set("page",n+""),i.set("pageNum",r+""),null!=e&&i.set("buyAlgorithm",e),null!=t&&i.set("sellAlgorithm",t);const a="".concat(xl,"/backtest?").concat(i.toString()),s=await Cl(a,o);if("err"in s)return s;if("data"in s&&"total"in s){const e=s.data.map((e=>({...e,params:"params"in e?JSON.parse(e.params):void 0})));return{total:s.total,data:e}}return{err:"data not found"}}(n[0],n[1],i[0]-1,i[1],r).then((e=>{r.aborted||("err"in e?t(e):(t(e.data),l(e.total)))})),()=>{e.abort()}}),[i,n]),(0,r.useEffect)((()=>{if(null!=e&&!("err"in e)&&e.filter((e=>e.status>=0&&e.status<=100)).length>0){const n=new AbortController,r=n.signal,o=e[0].uid,i=()=>async function(e,t){const n="".concat(xl,"/backtest?command=status&uid=").concat(e),r=await Cl(n,t);return"err"in r?r:"data"in r?r.data:{err:"data not found"}}(o,r).then((e=>{"err"in e||r.aborted||t((t=>null==t||"err"in t?t:t.map((t=>t.uid in e?{...t,status:e[t.uid]}:t))))}));return setTimeout(i,1e4),()=>{n.abort()}}}),[e]),null==e)return(0,Sn.jsx)($c,{});if("err"in e)return(0,Sn.jsx)("div",{children:(0,Sn.jsxs)("p",{children:["Error:",e.err]})});{const r=(new Date).getTime();return(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("div",{children:!!c&&(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsx)(Vs,{variant:"outlined",onClick:e=>{const t=c.find((e=>e.isBuy)),n=c.find((e=>!e.isBuy));null!=t&&null!=n&&h({startDate:El(r-15552e6),endDate:El(r),taskConfig:{stock:"",buyAlgorithm:t.id,buyParams:t.params,sellAlgorithm:n.id,sellParams:n.params}})},children:"New Task"}),(0,Sn.jsx)("span",{children:"Buy Algorithm:"}),(0,Sn.jsx)("select",{value:n[0]||"",onChange:e=>{o((t=>[e.target.value,t[1]]))},children:c.filter((e=>e.isBuy)).map((e=>(0,Sn.jsx)("option",{value:e.id,children:e.id},e.id)))}),(0,Sn.jsx)("span",{children:"Sell Algorithm:"}),(0,Sn.jsx)("select",{value:n[1]||"",onChange:e=>{o((t=>[t[0],e.target.value]))},children:c.filter((e=>!e.isBuy)).map((e=>(0,Sn.jsx)("option",{value:e.id,children:e.id},e.id)))}),(0,Sn.jsx)(Vs,{variant:"outlined",onClick:()=>{o([null,null])},children:"Reset"})]})}),(0,Sn.jsx)("div",{children:(0,Sn.jsx)(mee,{count:Math.ceil(s/i[1]),page:i[0],onChange:(e,t)=>{a((e=>[t,e[1],e[2]]))}})}),(0,Sn.jsxs)(j4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,Sn.jsx)("thead",{children:(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:"ID"}),(0,Sn.jsx)("td",{children:"Inspect"}),(0,Sn.jsx)("td",{children:"\u540d\u79f0"}),(0,Sn.jsx)("td",{children:"\u5907\u6ce8"}),(0,Sn.jsx)("td",{children:"\u65e5\u671f"}),(0,Sn.jsx)("td",{children:"\u5f00\u59cb\u65f6\u95f4"}),(0,Sn.jsx)("td",{children:"\u7ed3\u675f\u65f6\u95f4"}),(0,Sn.jsx)("td",{children:"\u6536\u76ca\u7387"}),(0,Sn.jsx)("td",{children:"\u72b6\u6001"}),(0,Sn.jsx)("td",{children:"\u64cd\u4f5c"})]})}),(0,Sn.jsx)("tbody",{children:e.map((e=>{const n=e.params;return(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:200===e.status?(0,Sn.jsx)(Vt,{to:"/backtest/".concat(e.uid),children:e.uid}):e.uid}),(0,Sn.jsx)("td",{children:null!=e.params&&200===e.status?(0,Sn.jsx)(Vt,{to:"/backtest/".concat(e.uid,"/signal_inspect?startDate=").concat(e.params.startDate,"&endDate=").concat(e.params.endDate,"&symbol=").concat(e.params.stocks[0],"&strategy=energy&filterPositive=",!1,"&strategy2=").concat(e.params.buyAlgorithm),children:"Inspect"}):"-"}),(0,Sn.jsx)("td",{children:e.name}),(0,Sn.jsx)("td",{children:e.desc.split("\n").filter((e=>e.length>0)).map((e=>(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsx)("span",{children:e}),(0,Sn.jsx)("br",{})]})))}),(0,Sn.jsx)("td",{children:El(1e3*e.create_date,!1,!0,!1)}),(0,Sn.jsx)("td",{children:e.start_date}),(0,Sn.jsx)("td",{children:e.end_date}),(0,Sn.jsx)("td",{children:(0,Sn.jsxs)("span",{style:{color:e.increase>1?"green":"red"},children:[(100*e.increase).toFixed(2),"%"]})}),(0,Sn.jsxs)("td",{children:[$te(e.status)||(0,Sn.jsx)(Kte,{animated:!0,label:e.status+"%",now:e.status}),e.status>=0&&e.status<=100&&(0,Sn.jsx)(p7,{msg:"\u505c\u6b62\u4efb\u52a1",callBack:n=>{(async function(e){const t="".concat(xl,"/backtest?command=cancel&uid=").concat(e),n=await Cl(t);return"err"in n?n:"s"in n?n.s:{err:"data not found"}})(e.uid).then((e=>{const r="boolean"===typeof e&&!0===e;n("\u64cd\u4f5c"+(r?"\u6210\u529f":"\u5931\u8d25")+"!"),r&&vl(1e3).then((e=>{t(null),a((e=>[1,e[1],e[2]]))}))}))}})]}),(0,Sn.jsxs)("td",{children:[(0,Sn.jsx)(Vs,{variant:"outlined",onClick:()=>{f([e.uid,e.desc])},children:"\u4fee\u6539\u5907\u6ce8"}),null!=n&&null!=c&&(0,Sn.jsx)(Vs,{variant:"outlined",style:{marginLeft:"10px"},onClick:()=>{null!=n&&h({dates:n.dates,startDate:n.startDate,endDate:n.endDate,taskConfig:{stock:n.stocks.join(","),buyAlgorithm:n.buyAlgorithm,buyParams:c.find((e=>e.id===n.buyAlgorithm)).params.map((e=>e.key in n.buyParams?{...e,default:n.buyParams[e.key]}:e)),sellAlgorithm:n.sellAlgorithm,sellParams:c.find((e=>e.id===n.sellAlgorithm)).params.map((e=>e.key in n.sellParams?{...e,default:n.sellParams[e.key]}:e))}})},children:"\u590d\u5236\u4efb\u52a1"})]})]},e.uid)}))})]}),(0,Sn.jsxs)(s8,{show:null!=d,onHide:m,children:[(0,Sn.jsx)(s8.Header,{closeButton:!0,children:(0,Sn.jsx)(s8.Title,{children:"Start Task"})}),(0,Sn.jsx)(s8.Body,{children:c&&d?(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"Input Name: "}),(0,Sn.jsx)("input",{value:d.name,onChange:e=>{h((t=>null==t?t:{...t,name:e.target.value}))}})]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"Input Description: "}),(0,Sn.jsx)("textarea",{value:d.desc,onChange:e=>{h((t=>null==t?t:{...t,desc:e.target.value}))}})]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u65f6\u95f4\u533a\u95f4"}),(0,Sn.jsx)(n3,{checked:null!=d.dates,onChange:e=>{h((t=>null==t?t:{...t,dates:e.target.checked?[]:void 0}))}}),(0,Sn.jsx)("span",{children:"\u591a\u4e2a\u65e5\u671f"})]}),null==d.dates?(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"Start Date: "}),(0,Sn.jsx)("input",{value:d.startDate,type:"date",onChange:e=>{h((t=>null!=t?{...t,startDate:e.target.value}:t))}})]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"End Date: "}),(0,Sn.jsx)("input",{value:d.endDate,type:"date",onChange:e=>{h((t=>null!=t?{...t,endDate:e.target.value}:t))}})]})]}):(0,Sn.jsx)(Qte,{dates:d.dates,setDates:e=>h((t=>null==t?t:{...t,dates:e}))}),(0,Sn.jsx)(_3,{}),(0,Sn.jsx)(t7,{taskConfigs:c,taskConfig:d.taskConfig,setTaskConfig:e=>{h((t=>null==t?null:{...t,taskConfig:e(t.taskConfig)}))}})]}):(0,Sn.jsx)("p",{children:"Task configs not loaded"})}),(0,Sn.jsxs)(s8.Footer,{children:[(0,Sn.jsx)(Vs,{variant:"outlined",color:"secondary",onClick:m,children:"Cancel"}),(0,Sn.jsx)(Vs,{variant:"outlined",color:"primary",onClick:y,children:"Start"})]})]}),(0,Sn.jsxs)(s8,{show:null!=p,onHide:g,children:[(0,Sn.jsx)(s8.Header,{children:(0,Sn.jsx)(s8.Title,{children:"\u4fee\u6539\u5907\u6ce8"})}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u5907\u6ce8"}),(0,Sn.jsx)("textarea",{style:{width:"80%",aspectRatio:"3/2"},value:null!=p?p[1]:"",onChange:e=>{f((t=>null==t?t:[t[0],e.target.value]))}})]}),(0,Sn.jsxs)(s8.Footer,{children:[(0,Sn.jsx)(Vs,{variant:"outlined",color:"secondary",onClick:g,children:"Cancel"}),(0,Sn.jsx)(Vs,{variant:"outlined",color:"primary",onClick:v,children:"Submit"})]})]})]})}}function ene(e){const[t,n]=(0,r.useState)(null),o=(0,r.useRef)(null),[i,a]=(0,r.useState)(null),s=W2();return(0,r.useEffect)((()=>{const t=new AbortController,r=t.signal;return _l(e.symbol,e.startDate,e.endDate,1,"day",r).then((e=>{r.aborted||n("err"in e?e:e.results)})),()=>{t.abort()}}),[e.startDate,e.endDate,e.symbol]),(0,r.useEffect)((()=>{if(null!=t&&!("err"in t)&&null!=o.current)if(null==i)a(ZT(o.current));else{const r=t.map((e=>El(e.t,!0))),o=t.map((e=>[e.o,e.c,e.l,e.h])),a=t.map((e=>e.v));var n=null;if(e.signals.length>0){const t=new Map;e.signals.forEach((e=>{const n=El(e.timestamp,!0);t.set(n,[e.strategy])})),n=t}const l=j2(r,o,[],[["volume",a]],[],n,!s);i.setOption(l)}}),[i,t,e.signals,s]),null==t?(0,Sn.jsx)($c,{}):"err"in t?(0,Sn.jsx)("div",{children:(0,Sn.jsxs)("p",{children:["Error:",t.err]})}):(0,Sn.jsx)("div",{ref:o,style:{width:"100%",height:"100%"}})}function tne(e){let{data:t,isDay:n=!1}=e;const o=(0,r.useRef)(null),[i,a]=(0,r.useState)(null);return(0,r.useEffect)((()=>{if(t.length>0&&null!=o.current)if(null==i)a(ZT(o.current));else{const[e,r]=Pl(...t.map((e=>e[1]))),o=L2(e.map((e=>n?El(e,!0):Ml.format(new Date(e)))),[r.map(((e,n)=>[t[n][0],e]))]);i.setOption(o)}}),[t,i,n]),(0,Sn.jsx)("div",{ref:o,style:{width:"100%",aspectRatio:"16/9"}})}const nne=864e5;function rne(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;const i=new Map;var a=new Date(n).getTime();r?a=Math.floor(a/nne-1)*nne:a+=144e5,i.set(a,[t,0]),e.forEach((e=>{if(e.isSell){const t=r?Math.floor(e.timestamp/nne)*nne:e.timestamp,n=Qs(e.symbol),a=null!=o?o:el(n),s=!0!==e.reverse&&e.price<Js?0:a,l=i.get(t),c=((!0===e.reverse?-1:1)*(e.price-e.buyPrice)-s)*e.volume,u=s*e.volume;null!=l?i.set(t,[l[0]+c,l[1]+u]):i.set(t,[c,u])}}));var s=0,l=0;return Array.from(i.entries()).map((e=>(s+=e[1][0],l+=e[1][1],[e[0],s,l]))).sort(((e,t)=>e[0]-t[0]))}function one(e){const{lst:t,totalFee:n}=e,r=t.length;if(0===r)return(0,Sn.jsx)("p",{children:"Empty Data!"});{const e=El(t[0][0]+$2),s=e.endsWith("-01"),l=parseInt(s?e:El(t[0][0]).substring(0,4)),c=parseInt(El(t[r-1][0]).substring(0,4)),u=new Map;var o="",i=0,a=0;if(t.forEach((t=>{const n=El(t[0]).substring(0,7);if(n!==o){if(o.length>0){const t=i>0?a/i:0;(!s||o>=e.substring(0,7))&&u.set(o,t),i=a}else i=t[1];o=n,a=t[1]}else a=t[1]})),o.length>0){const e=i>0?a/i:0;u.set(o,e)}const d=Array.from({length:12}).map(((e,t)=>t));return(0,Sn.jsx)("div",{className:"Container",children:(0,Sn.jsx)(Oee,{component:Gi,children:(0,Sn.jsxs)(j4,{"aria-label":"simple table",children:[(0,Sn.jsxs)(Uee,{children:[(0,Sn.jsx)(Qee,{children:"-"},"00"),d.map((e=>(0,Sn.jsx)(Qee,{children:"".concat(e+1,"\u6708")},"1"+e)))]}),(0,Sn.jsxs)(ite,{children:[Array.from({length:c-l+1}).map(((e,t)=>{const n=l+t+"";return(0,Sn.jsxs)(hte,{children:[(0,Sn.jsx)(Qee,{children:n},"year"),d.map((e=>{const t=n+"-"+(e<9?"0":"")+(e+1),r=u.get(t);return(0,Sn.jsx)(Qee,{children:null!=r?(0,Sn.jsxs)("p",{style:{color:r>1?"green":"red"},children:[(100*r).toFixed(2),"%"]}):"-"},e+"")}))]},t+"")})),(0,Sn.jsxs)(hte,{children:[(0,Sn.jsx)(Qee,{children:"\u624b\u7eed\u8d39"},"year"),d.map((e=>(0,Sn.jsx)(Qee,{children:e<11?"-":n.toLocaleString()},e+"")))]})]})]})})})}}function ine(e){let{data:t,totalMoney:n,startDate:r,data2:o,dayMerge:i,feeRate:a}=e;var s;const l=rne(t,n,r,i,a),c=l.map((e=>[e[0],e[1]])),u=l.map((e=>[e[0],e[2]])),d=u.length>0?u[u.length-1][1]:0;if(null!=o){s=[["profit",c],["fee",u],["old",rne(o,n,r,i).map((e=>[e[0],e[1]]))]]}else s=[["profit",c],["fee",u]];return(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsx)(one,{lst:s[0][1],totalFee:d}),(0,Sn.jsx)("div",{style:{width:"100%",aspectRatio:"16/9"},children:(0,Sn.jsx)(tne,{data:s,isDay:i})})]})}function ane(e){const t=e.positions,[n,o]=(0,r.useState)(!0),[i,a]=(0,r.useState)(-1),s=e.totalMM||1e6;var l=0,c=0,u=0,d=0,h=0;if(n){const n=new Map;t.forEach((t=>{var r=0,o=0;t[1].forEach((t=>{if(t.isSell){const a=Math.floor(t.timestamp/$2);if(i===e.nameDates.length){if(0===e.nameDates.filter((e=>e[1].has(a))).length)return}else if(i>=0&&!e.nameDates[i][1].has(a))return;const s=Qs(t.symbol),l=null!=e.feeRate?e.feeRate:el(s),c=!0!==t.reverse&&t.price<Js?0:l,u=t.buyPrice*t.volume,d=t.volume*((!0===t.reverse?-1:1)*(t.price-t.buyPrice)-c);r+=u,o+=d;const h=n.get(a);null==h?n.set(a,[d,u]):n.set(a,[d+h[0],u+h[1]])}})),d+=o,h+=r>0?o/r:0})),Array.from(n.entries()).forEach((e=>{const t=e[1][1]>0?e[1][0]/e[1][1]:0;t>cl?l++:t<-cl?c++:u++}))}else t.forEach((t=>{var n=0,r=0;t[1].forEach((t=>{if(t.isSell){n+=t.buyPrice*t.volume;const o=Qs(t.symbol),i=null!=e.feeRate?e.feeRate:el(o),a=!0!==t.reverse&&t.price<Js?0:i;r+=t.volume*(t.price-t.buyPrice-a)}})),d+=r;const o=r/n;o>cl?l++:o<-cl?c++:u++}));const p=d/s+1,f=l+c;return(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("h3",{children:(0,Sn.jsxs)("div",{style:{display:"flex",width:"90%",justifyContent:"space-evenly"},children:[(0,Sn.jsxs)("div",{style:{color:"green"},children:[(0,Sn.jsx)("span",{children:"Win: "}),(0,Sn.jsx)("span",{children:l})]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"Draw: "}),(0,Sn.jsx)("span",{children:u})]}),(0,Sn.jsxs)("div",{style:{color:"red"},children:[(0,Sn.jsx)("span",{children:"Lose: "}),(0,Sn.jsx)("span",{children:c})]}),(0,Sn.jsxs)("div",{style:{color:p>1?"green":"red"},children:[(0,Sn.jsx)("span",{children:"Rate: "}),(0,Sn.jsxs)("span",{children:[(100*p).toFixed(2)+"%","|",(100*h).toFixed(2)+"%"]})]}),null!=e.dates&&(0,Sn.jsx)("div",{children:(0,Sn.jsxs)("span",{children:["\u573a\u5747\u6536\u76ca:",(f>0?100*h/f:0).toFixed(2),"%(",e.dates,"|",f,") | \u80dc\u7387:",(f>0?100*l/f:0).toFixed(2),"%"]})})]})}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u662f\u5426\u6309\u5929\u7edf\u8ba1:"}),(0,Sn.jsx)(n3,{checked:n,onChange:e=>o(e.target.checked)})]}),n&&(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u9009\u62e9\u8fc7\u6ee4\u6761\u4ef6:"}),(0,Sn.jsxs)("select",{value:i,onChange:e=>{a(parseInt(e.target.value))},children:[(0,Sn.jsx)("option",{value:-1,children:"None"},"none"),e.nameDates.map(((e,t)=>(0,Sn.jsx)("option",{value:t,children:e[0]},t))),(0,Sn.jsx)("option",{value:e.nameDates.length,children:"All"},"all")]})]})]})}function sne(e){const{startDate:t,endDate:n,uid:o,symbol:i}=e,a=(0,r.useCallback)((async e=>await ac(o,i,t,n,e)),[t,n,o,i]);return(0,Sn.jsx)(Qc,{getter:a,cvt:t=>(0,Sn.jsx)(ane,{positions:e.positions,nameDates:t,dates:e.dates,totalMM:e.totalM,feeRate:e.feeRate})})}const lne=10;function cne(e){const{data:t,taskId:n}=e,[o,i]=(0,r.useState)(lne),[a,s]=(0,r.useState)(!1),[l,c]=(0,r.useState)(!1),[u,d]=(0,r.useState)(!0),[h,p]=(0,r.useState)(!1),f=1e6;let g=Us(t.positions,f,o,a,!0,h,!1,l),m=Nl(g),v=new Map,y=[];y.push(["startDate",t.config.startDate]),y.push(["endDate",t.config.endDate]),null!=t.config.dates&&y.push(["dates",t.config.dates.join(",")]),t.config.configs.forEach((e=>{if(null!=e.origin){e.origin.forEach((e=>{y.push(e[0]),e[1].forEach((e=>{null!=e.realTime&&0!==e.realTime||y.push([e.name,e.default])})),3===e.length&&null!=e[2]&&(y.push(["includeEndDay","true"]),e[2].forEach((e=>{y.push([e.name,e.default])})))}))}else y.push(e.buyAlgorithm),y.push(e.sellAlgorithm)})),m.forEach((e=>{const t=e[0].symbol;var n;null!=t&&(v.has(t)||v.set(t,[]),null===(n=v.get(t))||void 0===n||n.push(e[0]))}));const x=t.config.configs.map((e=>[e,e.origin])).find((e=>!0));return(0,Sn.jsxs)("main",{className:"Container",children:[(0,Sn.jsxs)("h2",{style:{color:"grey"},children:["Backtest: ",(0,Sn.jsx)("span",{style:{color:"black"},children:t.info.name})," ","Detail"]}),(0,Sn.jsx)("p",{children:t.info.desc.split("\n").filter((e=>e.length>0)).map((e=>(0,Sn.jsxs)(Sn.Fragment,{children:[e,(0,Sn.jsx)("br",{})]})))}),(0,Sn.jsx)("div",{children:(0,Sn.jsxs)(j4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,Sn.jsx)("thead",{children:(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:"Name"},"name"),(0,Sn.jsx)("td",{children:"Value"},"value")]})}),(0,Sn.jsx)("tbody",{children:y.map((e=>"string"==typeof e?(0,Sn.jsx)("tr",{children:(0,Sn.jsx)("td",{colSpan:2,children:e})},e):(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:e[0]},"name"),(0,Sn.jsx)("td",{children:e[1]},"value")]},e[0])))})]})}),null!=x&&(0,Sn.jsx)(dne,{taskId:n,buyAlgorithm:x[0].buyAlgorithm,symbol:x[0].stocks[0],sellAlgorithm:x[0].sellAlgorithm,buyParams:x[1][0][1],sellParams:x[1][1][1]}),(0,Sn.jsx)("div",{}),(0,Sn.jsx)("div",{children:(0,Sn.jsx)(Vt,{to:"/backtest/".concat(n,"/signal_inspect?startDate=").concat(t.config.startDate,"&endDate=").concat(t.config.endDate,"&symbol=").concat(t.config.configs[0].stocks[0],"&strategy=energy&filterPositive=").concat(h,"&strategy2=").concat(t.config.configs[0].buyAlgorithm),children:"Energy Inspect"})}),(0,Sn.jsx)("div",{children:(0,Sn.jsx)(Vt,{to:"/backtest/".concat(n,"/log"),children:"Log"})}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u53cc\u7a7a\u662f\u5426\u7b49\u91cf\u5f00\u4ed3:"}),(0,Sn.jsx)(n3,{checked:l,onChange:e=>{c(e.target.checked)}})]}),(0,Sn.jsxs)("div",{style:{width:"90%",margin:"2rem",display:"flex"},children:[(0,Sn.jsx)("span",{children:"Buy Percent:"}),(0,Sn.jsx)(Gte,{defaultValue:lne,onChangeCommitted:(e,t)=>{"number"===typeof t&&i(t)},"aria-label":"Default",valueLabelDisplay:"auto"}),(0,Sn.jsx)("span",{children:"Double:"}),(0,Sn.jsx)(n3,{checked:a,onChange:e=>{s(e.target.checked)}})]}),(0,Sn.jsx)(sne,{positions:m,startDate:t.config.startDate,endDate:t.config.endDate,uid:n,symbol:t.config.configs[0].stocks[0]}),(0,Sn.jsx)("div",{style:{width:"100%",aspectRatio:"4/3"},children:(0,Sn.jsx)(ine,{data:g,data2:Us(t.positions,f,o,a,!1,h),totalMoney:f,startDate:t.config.startDate,dayMerge:u})},"profit"),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"Merge by Day:"}),(0,Sn.jsx)(n3,{checked:u,onChange:e=>{d(e.target.checked)}})]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"Hide Positive:"}),(0,Sn.jsx)(n3,{checked:h,onChange:e=>{p(e.target.checked)}})]}),Array.from(v.entries()).map((e=>(0,Sn.jsxs)("div",{style:{width:"100%",aspectRatio:"4/3",marginTop:"3rem"},children:[(0,Sn.jsx)("h3",{children:e[0]}),(0,Sn.jsx)(ene,{symbol:e[0],signals:e[1],startDate:t.config.startDate,endDate:t.config.endDate})]},e[0]))),(0,Sn.jsx)(g8,{data:m})]})}function une(){const e=rt().taskId,t=(0,r.useCallback)((async t=>await Fl(e,t)),[e]);return(0,Sn.jsx)(Qc,{getter:t,cvt:t=>(0,Sn.jsx)(cne,{data:t,taskId:e})})}function dne(e){const{buyAlgorithm:t}=e,[n,o]=(0,r.useState)([!1,""]),[i,a]=(0,r.useState)(null),s=()=>{a(null)},l=()=>{null!=i&&Ol("uperset",e.symbol,"".concat(i,"-").concat(e.buyAlgorithm),Object.fromEntries(e.buyParams.filter((e=>null==e.realTime||0===e.realTime)).map((e=>[e.key,e.default]))),e.sellAlgorithm,Object.fromEntries(e.sellParams.map((e=>[e.key,e.default]))),null,e.taskId,!0).then((e=>{o(e?[!0,"\u540c\u6b65\u6210\u529f!"]:[!0,"\u540c\u6b65\u5931\u8d25!"]),a(null)}))},c=(0,r.useCallback)((async e=>{const n=await Jl(null,e);return"err"in n?n:n.filter((e=>e.strategy===t))}),[t]);return(0,Sn.jsx)(Qc,{getter:c,cvt:e=>e.length>0?(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("button",{onClick:()=>a(e[0].rowid+""),children:"\u540c\u6b65\u53c2\u6570"}),(0,Sn.jsxs)(s8,{show:null!=i,onHide:s,children:[(0,Sn.jsx)(s8.Header,{closeButton:!0,children:(0,Sn.jsx)(s8.Title,{children:"Edit"})}),(0,Sn.jsx)(s8.Body,{children:null!=i&&(0,Sn.jsx)("select",{value:i,onChange:e=>a(e.target.value),children:e.map((e=>(0,Sn.jsx)("option",{value:e.rowid,children:"".concat(e.rowid,"-").concat(e.account,"-").concat(e.strategy,"-").concat(e.desc)},e.rowid)))})}),(0,Sn.jsxs)(s8.Footer,{children:[(0,Sn.jsx)(Vs,{color:"secondary",onClick:s,children:"Cancel"}),(0,Sn.jsx)(Vs,{color:"primary",onClick:l,children:"OK"})]})]}),(0,Sn.jsx)(j8,{anchorOrigin:{vertical:"bottom",horizontal:"center"},open:n[0],autoHideDuration:2e3,onClose:()=>{o([!1,""])},message:n[1]})]}):(0,Sn.jsx)(Sn.Fragment,{})})}function hne(){const e=rt(),[t,n]=(0,r.useState)(!1),[o]=(0,r.useState)((new Date).getTime()+""),[i,a]=(0,r.useState)(""),[s,l]=(0,r.useState)(""),[c,u]=(0,r.useState)(0),[d,h]=(0,r.useState)(0),[p,f]=(0,r.useState)([]),[g,m]=(0,r.useState)(null);return(0,r.useEffect)((()=>{if(i.length>0){const t=new AbortController,r=t.signal;return n(!0),async function(e,t,n,r,o){const i="".concat(xl,"/backtest?command=log&uid=").concat(e,"&key=").concat(t,"&keyword=").concat(n,"&pos=").concat(r),a=await Cl(i,o);return"err"in a||"data"in a?a:{err:"data not found"}}(e.taskId,o,i,c,r).then((e=>{"err"in e?m(e):(f((t=>[...t,...e.data])),h(e.pos)),n(!1)})),()=>{t.abort()}}}),[e.taskId,i,o,c]),(0,Sn.jsxs)("main",{children:[(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"Key words:"}),(0,Sn.jsx)(Ka,{id:"outlined-basic",label:"Outlined",variant:"outlined",onChange:e=>{l(e.target.value)}}),(0,Sn.jsx)("button",{onClick:e=>{f([]),a(s),u(0)},children:"submit"})]}),(0,Sn.jsx)("pre",{children:p.map((e=>(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsxs)("code",{children:[" ","    "+e]}),(0,Sn.jsx)("br",{})]})))}),t?(0,Sn.jsx)($c,{}):d>0&&p.length<2e3&&(0,Sn.jsx)("button",{onClick:()=>u(d),children:"Load More"})]})}function pne(e){const{taskId:t}=e,[n,o]=(0,r.useState)([]),i=(0,r.useContext)(z2);return(0,r.useEffect)((()=>{const e=new Map,n=null===i||void 0===i?void 0:i.subscribe("log",t,(t=>{const n=t;"reset"===n.command&&e.clear(),Object.entries(n.data).forEach((t=>{const n=t;e.set(n[0],n[1])})),o(Array.from(e.entries()).sort(((e,t)=>-e[0].localeCompare(t[0]))))}));return()=>{null!=n&&(null===i||void 0===i||i.unsubscribe("log",t,n))}}),[t,i]),(0,Sn.jsx)("div",{children:(0,Sn.jsx)("pre",{children:n.flatMap((e=>e[1].map((e=>(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsx)("code",{children:"    "+e}),(0,Sn.jsx)("br",{})]})))))})})}function fne(){const e=rt();return(0,Sn.jsx)("main",{style:{flex:1},children:(0,Sn.jsx)(pne,{taskId:e.taskId})})}function gne(e){return(0,Sn.jsxs)("div",{children:[(0,Sn.jsxs)("div",{style:{display:!0===e.oneline?"inline-block":"block"},children:[(0,Sn.jsxs)("span",{children:[e.name," \u6700\u5c0f\u503c:"]}),(0,Sn.jsx)(Q8,{type:"number",handleUpdate:t=>e.updater([t,e.range[1]]),value:e.range[0]})]}),(0,Sn.jsxs)("div",{style:{display:!0===e.oneline?"inline-block":"block"},children:[(0,Sn.jsx)("span",{children:"\u6700\u5927\u503c:"}),(0,Sn.jsx)(Q8,{type:"number",handleUpdate:t=>e.updater([e.range[0],t]),value:e.range[1]})]})]})}function mne(e){var t;const{filter:n,setFilter:r,isNew:o}=e;return(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsx)(gne,{range:n.value.vol,oneline:e.oneline,name:"\u9690\u6ce2",updater:e=>r((t=>({...t,value:{...t.value,vol:e}})))}),(0,Sn.jsx)(gne,{range:n.value.increase935,oneline:e.oneline,name:"9:35\u80a1\u4ef7\u6da8\u8dcc\u5e45",updater:e=>r((t=>({...t,value:{...t.value,increase935:e}})))}),(0,Sn.jsx)(gne,{range:n.value.firstHourVR,oneline:e.oneline,name:"\u7b2c\u4e00\u5c0f\u65f6\u6210\u4ea4\u91cf\u6392\u540d",updater:e=>r((t=>({...t,value:{...t.value,firstHourVR:e}})))}),!o&&(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsx)(gne,{range:n.value.prevDayIncrease,oneline:e.oneline,name:"\u524d\u4e00\u65e5\u6da8\u8dcc\u5e45",updater:e=>r((t=>({...t,value:{...t.value,prevDayIncrease:e}})))}),(0,Sn.jsx)(gne,{range:n.value.prevDayIncrease2,oneline:e.oneline,name:"\u524d\u4e00\u65e5K\u7ebf\u5f62\u6001",updater:e=>r((t=>({...t,value:{...t.value,prevDayIncrease2:e}})))}),(0,Sn.jsx)(gne,{range:n.value.prevDayVR,oneline:e.oneline,name:"\u524d\u4e00\u65e5\u6210\u4ea4\u91cf\u6392\u540d",updater:e=>r((t=>({...t,value:{...t.value,prevDayVR:e}})))}),(0,Sn.jsx)(gne,{range:n.value.volIncrease,oneline:e.oneline,name:"\u9690\u6ce2\u589e\u957f\u7387",updater:e=>r((t=>({...t,value:{...t.value,volIncrease:e}})))}),(0,Sn.jsx)(gne,{range:n.value.firstHourVRIncrease,oneline:e.oneline,name:"\u7b2c\u4e00\u5c0f\u65f6\u6210\u4ea4\u91cf\u6392\u540d\u53d8\u5316",updater:e=>r((t=>({...t,value:{...t.value,firstHourVRIncrease:e}})))}),(0,Sn.jsx)(gne,{range:n.value.vixOpen||[10,20],oneline:e.oneline,name:"09:30 VIX\u6307\u6570\u8303\u56f4",updater:e=>r((t=>({...t,value:{...t.value,vixOpen:e}})))}),(0,Sn.jsx)(gne,{range:n.value.vixIncrease||[-1,1],oneline:e.oneline,name:"09:30 VIX\u6307\u6570\u589e\u957f\u7387",updater:e=>r((t=>({...t,value:{...t.value,vixIncrease:e}})))}),(0,Sn.jsx)(gne,{range:n.value.volume||[0,100],oneline:e.oneline,name:"\u7b2c\u4e00\u5c0f\u65f6\u9884\u4f30\u5168\u5929\u6210\u4ea4\u91cf(\u5355\u4f4d\u4e3a\u5343\u4e07)",updater:e=>r((t=>({...t,value:{...t.value,volume:e}})))})]}),(0,Sn.jsx)(gne,{range:n.value.vr5||[1,10],oneline:e.oneline,name:"\u6210\u4ea4\u91cf\u6392\u540d(09:35)",updater:e=>r((t=>({...t,value:{...t.value,vr5:e}})))}),(0,Sn.jsx)(gne,{range:n.value.vr10||[1,10],oneline:e.oneline,name:"\u6210\u4ea4\u91cf\u6392\u540d(09:40)",updater:e=>r((t=>({...t,value:{...t.value,vr10:e}})))}),(0,Sn.jsx)(gne,{range:n.value.vr30||[1,10],oneline:e.oneline,name:"\u6210\u4ea4\u91cf\u6392\u540d(10:00)",updater:e=>r((t=>({...t,value:{...t.value,vr30:e}})))}),!o&&(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsx)(gne,{range:n.value.vr90||[1,10],oneline:e.oneline,name:"\u6210\u4ea4\u91cf\u6392\u540d(11:00)",updater:e=>r((t=>({...t,value:{...t.value,vr90:e}})))}),(0,Sn.jsx)(gne,{range:n.value.vr120||[1,10],oneline:e.oneline,name:"\u6210\u4ea4\u91cf\u6392\u540d(11:30)",updater:e=>r((t=>({...t,value:{...t.value,vr120:e}})))}),(0,Sn.jsx)(gne,{range:n.value.all_10||[0,10],oneline:e.oneline,name:"all\u503c(09:40)",updater:e=>r((t=>({...t,value:{...t.value,all_10:e}})))}),(0,Sn.jsx)(gne,{range:n.value.all_30||[0,10],oneline:e.oneline,name:"all\u503c(10:00)",updater:e=>r((t=>({...t,value:{...t.value,all_30:e}})))}),(0,Sn.jsx)(gne,{range:n.value.all_60||[0,10],oneline:e.oneline,name:"all\u503c(10:30)",updater:e=>r((t=>({...t,value:{...t.value,all_60:e}})))}),(0,Sn.jsx)(gne,{range:n.value.all_90||[0,10],oneline:e.oneline,name:"all\u503c(11:00)",updater:e=>r((t=>({...t,value:{...t.value,all_90:e}})))}),(0,Sn.jsx)(gne,{range:n.value.all_120||[0,10],oneline:e.oneline,name:"all\u503c(11:30)",updater:e=>r((t=>({...t,value:{...t.value,all_120:e}})))})]}),o&&(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u53ea\u505a\u661f\u671f\u51e0:"}),(0,Sn.jsx)($8,{selected:null===(t=n.value.weekDays)||void 0===t?void 0:t.map((e=>""+e)),data:Array.from({length:5}).map(((e,t)=>t+1+"")),select:e=>r((t=>({...t,value:{...t.value,weekDays:e.map((e=>parseInt(e)))}})))})]})]})}function vne(e){const[t,n]=(0,r.useState)(null),[o,i]=(0,r.useState)([1,100]),a=W2(),s=(0,r.useRef)(null),l=(0,r.useCallback)(((t,n)=>{const r=e.clickDay;null!=r&&r(t,n)}),[e.clickDay]),c=(0,r.useCallback)((t=>{const n=e.clickPoint;null!=n&&n(t)}),[e.clickPoint]),{historyData:u,isDay:d,symbol:h,preClose:p,signals:f,lines:g,areas:m,extendedLines:v}=e;return(0,r.useEffect)((()=>{if(null!=s.current)if(null==t){const t=ZT(s.current);t.on("click",(e=>{if("markPoint"===e.componentType){const t=e.data.coord;3===t.length&&"string"===typeof t[2]&&c(t[2])}if("series"===e.componentType&&"candlestick"===e.componentSubType){var t=0;t=e.dataIndex>0&&u.length>=e.dataIndex?u[e.dataIndex-1].c:e.data[1],l(e.name.slice(0,10),t)}})),t.on("datazoom",(t=>{if(null!=t&&"object"===typeof t)if("start"in t&&"end"in t){const n=t;(e.setZoomRange||i)([n.start,n.end])}else if("batch"in t){const n=t.batch;if(Array.isArray(n)){const t=n;if(t.length>0){const n=t[0];if("start"in n&&"end"in n){const t=n;(e.setZoomRange||i)([t.start,t.end])}}}}})),n(t)}else{const n=u;if(null!=n&&n.length>0){const r=n.map((e=>d?Ml.format(e.t):El(e.t,!0))),i=d&&null!=p?n.map((e=>[e.o,e.c,e.l,e.h,p])):n.map((e=>[e.o,e.c,e.l,e.h])),s=(h.length,n.map((e=>e.v))),l=new Map;f.forEach((e=>{const t=d?Ml.format(e[0]):El(e[0],!0);l.set(t,e[1].map((e=>{const t=e.match(/O:\w+\d{6}[CP]\d{8}/g);return null!=t?[e,t[0]]:e})))}));const c=[];if(d){const e=n[0].t;c.push([Ml.format(Yl(e)),Ml.format(ql(e)),!0,"market open"])}null===m||void 0===m||m.forEach((e=>{c.push([Ml.format(e[0]),Ml.format(e[1]),!0,"antireverse"])}));const u=function(e,t){const n=new Map;if(t.forEach((e=>{const t=e.extra;if(null!=t&&"type"in t&&"agg"==t.type){const e=t.timestamp,r=n.get(e),o=t.total;null!=r?r.push(o):n.set(e,[o])}})),e.length>0){const t=[["10w",1e5,0,[]],["15w",15e4,0,[]],["20w",2e5,0,[]],["25w",25e4,0,[]]],i=Yl(e[0].t);var r=0,o=0;const a=[];return e.forEach((e=>{const s=e.t;s>=i&&(r+=e.v*e.vw);const l=n.get(s);null!=l&&(o+=l.reduce(((e,t)=>e+t),0)),a.push(r>0?1e3*o/r:0),t.forEach((e=>{null!=l&&l.length>0&&(e[2]+=l.filter((t=>t>e[1]-1e-4)).length),e[3].push(s>i?e[2]/Math.ceil((s-i)/36e5):0)}))})),t.map((e=>[e[0],e[3]])).concat([["all",a]])}return[]}(n,e.signals2),g=[["xkk",e.historyData2.map((e=>e.xkk))],["wave",e.historyData2.map((e=>e.wave))],["volume rank",e.historyData2.map((e=>e.vr))]],y=j2(r,i,[],[["vol",s]],null!=v?[u,g,...v]:[u,g],l,!a,e.zoomRange||o,c);t.setOption(y)}}else n(null)}),[u,f,t,a,d,l,c,p,h,o,e.zoomRange,e.setZoomRange,g,v,m]),(0,Sn.jsx)("div",{ref:s,style:{width:"100%",height:"100%"}})}function yne(e){const[t,n]=(0,r.useState)(null),{filter:o,date:i,symbol:a,preClose:s,clickPoint:l,middle:c,front:u,getter:d,onConvert:h}=e,p=(0,r.useCallback)((async e=>await d(e)),[d]);return(0,Sn.jsx)(Qc,{getter:p,cvt:t=>{const n=[],r=[];t[1].filter((e=>e.strategy.startsWith("energy-antireverse"))).forEach((e=>{const t=r.length;0===r.length||r[t-1][1]<e.timestamp?r.push([e.timestamp,e.timestamp+6e4]):r[t-1][1]=e.timestamp+6e4})),g3(o,i,t[1].filter((e=>null!=e.extra&&"type"in e.extra))).sort(((e,t)=>e.timestamp-t.timestamp)).forEach((e=>{const t=6e4*Math.floor(e.timestamp/6e4);0===n.length||n[n.length-1][0]<t?n.push([t,[e.subtype]]):n[n.length-1][1].push(e.subtype)}));const d=Xs(Hl(t[0]).map((e=>[e[0],e[1]])),n),h=nl(t[5],(e=>e[0]),((e,t)=>[t,0,0])),p=h.map((e=>e[1])),f=h.map((e=>e[2]));return(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsxs)("div",{style:{width:"100%",marginTop:"2rem",marginBottom:"2rem",aspectRatio:"16/9"},children:[null!=u&&u(),(0,Sn.jsx)(vne,{symbol:a,preClose:s,clickPoint:l,signals:d,signals2:t[1],hasVol:!1,isDay:!0,historyData:t[2],historyData2:t[3],zoomRange:e.zoomRange,setZoomRange:e.setZoomRange,lines:e.lines,areas:r,extendedLines:[[["estimate volume",ul(t[2])]],[["callVol",p],["putVol",f]],...t[4]]})]}),t[4].length>0&&(0,Sn.jsxs)("div",{style:{display:"inline-block"},children:[(0,Sn.jsx)("span",{children:"\u6743\u91cd\u80a1:"}),(0,Sn.jsx)("div",{children:t[4][0].map((e=>(0,Sn.jsx)(Vt,{style:{padding:"5px"},to:"/stockChart/".concat(e[0],"/").concat(i),children:e[0]})))})]}),c&&(0,Sn.jsxs)(Sn.Fragment,{children:[c(t),(0,Sn.jsx)("div",{style:{marginTop:"3rem"},children:(0,Sn.jsx)(g8,{addPercent:!0,data:Nl(t[0]),aggs:t[2],feeRate:e.feeRate})},"detail")]})]})},onLoad:h})}function xne(e){return(0,Sn.jsx)(bne,{x:e.x,y:[e.y]})}function bne(e){const t=(0,r.useRef)(null),[n,o]=(0,r.useState)(null);return(0,r.useEffect)((()=>{if(null!=t.current)if(null==n)o(ZT(t.current));else{const t=L2(e.x,e.y);n.setOption(t)}}),[n,e]),(0,Sn.jsx)("div",{ref:t,style:{width:"100%",height:"100%"}})}const wne={vol:[0,10],increase935:[-1,1],firstHourVR:[0,10],prevDayIncrease:[-1,1],prevDayVR:[0,10],volIncrease:[-1,10],firstHourVRIncrease:[-10,10],prevDayIncrease2:[-1,1],vixOpen:[10,20],vixIncrease:[-1,1]};function Sne(e,t){return null==e||null==t?null!=e||null!=t:e[0]!==t[0]||e[1]!==t[1]}function _ne(e,t){if(e.rowid!==t.rowid)return!0;{const r=e.value,o=t.value,i=Object.keys(r);if(function(e,t){if(e.length!==t.length)return!1;{const r=e.sort(),o=t.sort(),i=e.length;for(var n=0;n<i;){if(r[n]!==o[n])return!1;n++}return!0}}(i,Object.keys(o))){var n=0;const e=i.length;for(;n<e;){const e=i[n];if("weekDays"!==e&&Sne(r[e],o[e]))return!0;n++}return!1}return!0}}function Ane(e){const{filters:t,isNew:n}=e,[o,i]=(0,r.useState)(null!=t?t[0]:{value:wne,name:"",update_time:0}),[a,s]=(0,r.useState)(!1);return(0,Sn.jsx)(p7,{callBack:t=>{a?t("\u64cd\u4f5c\u6b63\u5728\u6267\u884c\u4e2d!"):(s(!0),e.callback(o,(e=>{s(!1),t(e)})))},msg:"".concat(null==t?"\u65b0\u5efa":"\u4fee\u6539","\u8fc7\u6ee4\u5668"),content:(0,Sn.jsxs)("div",{children:[null!=t&&(0,Sn.jsx)("select",{value:o.name,onChange:e=>{const n=t.find((t=>t.name===e.target.value));null!=n&&i(n)},children:t.map((e=>(0,Sn.jsx)("option",{value:e.name,children:e.name},e.name)))}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u540d\u5b57:"}),(0,Sn.jsx)("input",{type:"text",value:o.name,onChange:e=>i((t=>({...t,name:e.target.value})))})]}),(0,Sn.jsx)(mne,{filter:o,setFilter:i,isNew:n})]})})}function kne(e){const{filters:t,filter:n,setFilter:o,callback:i,isNew:a}=e,[s,l]=(0,r.useState)(null);return(0,Sn.jsxs)("div",{children:[(0,Sn.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,Sn.jsxs)(ro,{margin:"normal",size:"medium",sx:{m:1,minWidth:80},children:[(0,Sn.jsx)($r,{id:"demo-simple-select-label",children:"Filter"}),(0,Sn.jsx)(Ga,{labelId:"demo-simple-select-label",id:"demo-simple-select",value:null===n||void 0===n?void 0:n.name,label:"Filter",onChange:e=>{const n=t.find((t=>t.name===e.target.value));null!=n&&(o((e=>n)),l(n))},children:t.map((e=>(0,Sn.jsx)(q8,{value:e.name,children:e.name},e.name)))})]}),null!=n&&null!=s&&_ne(n,s)&&(0,Sn.jsx)(p7,{msg:"\u4fdd\u5b58",callBack:e=>{i(n,(t=>{e(t),l(null)}))}})]}),null!=n&&(0,Sn.jsx)(mne,{oneline:!0,filter:n,setFilter:e=>o((t=>null==t?null:(null==s&&l(t),e(t)))),isNew:a})]})}function Cne(e){const[t,n]=(0,r.useState)(!0),{data:o,startDate:i,updater3:a,filters:s,filterNames:l,setFilterNames:c,tag:u}=e,[d,h]=(0,r.useState)(s),[p,f]=(0,r.useState)([-10,10]),[g,m]=(0,r.useState)(dl),[v,y]=(0,r.useState)(null);(0,r.useEffect)((()=>{const n=l.map((e=>{var t;return null!=v&&v.name===e?v.value:null===(t=d.find((t=>t.name===e)))||void 0===t?void 0:t.value})).filter((e=>null!=e)),r=function(e,t,n){const r=e[1],o=new Map;r.forEach(((e,t)=>{const n=Math.floor(e.t/$2);o.set(n,t)}));const i=e[0];if(0===t.length)return dl;const a=[],s=[],l=new Set,c=new Map;return i.forEach((e=>{const i=e.v2||0,u=e.v_10||0,d=e.v_90||0,h=e.v_120||0,p=e.v_30||0,f=e.v_5||0;s.push([i,e.v,u,d,h,p,f]),s.length>10&&s.shift();const g=s.reduce(((e,t)=>t[0]>i?e+1:e),1),m=s.reduce(((t,n)=>n[1]>e.v?t+1:t),1),v=s.reduce(((e,t)=>t[2]>u?e+1:e),1),y=s.reduce(((e,t)=>t[3]>d?e+1:e),1),x=s.reduce(((e,t)=>t[4]>h?e+1:e),1),b=s.reduce(((e,t)=>t[5]>p?e+1:e),1),w=s.reduce(((e,t)=>t[6]>f?e+1:e),1),S=a.length,_=Math.floor(e.t/Ks),A=o.get(_);var k=null,C=null;if(null!=A&&(k=r[A].o,A>0)){const e=r[A-1].c;e>0&&(C=k/e-1)}var M=0,I=0,T=0,D=0,j=0;null!=e.money&&null!=e.energy&&(M=tl(e.money.m_10,u,e.energy.all_10),I=tl(e.money.m_30,p,e.energy.all_30),T=tl(e.money.m_60,i,e.energy.all_60),D=tl(e.money.m_90,d,e.energy.all_90),j=tl(e.money.m_120,h,e.energy.all_120));const P=new Date(e.t).getDay();_>=n&&S>1&&t.forEach((t=>{const n=c.get(_)||-1;if(!l.has(_))if(null!=t.weekDays&&t.weekDays.length>0&&null==t.weekDays.find((e=>e===P)))c.set(_,0);else{const[r]=a[S-2],[o,s,u]=a[S-1],d=null!=e.c5min?(e.c5min-o.c)/o.c:null,h=(o.c-r.c)/r.c,p=(o.c-o.o)/o.o,f=null!=o.vol2&&null!=e.vol2?o.vol2[0]>0?(e.vol2[0]-o.vol2[0])/o.vol2[0]:0:null,m=-(g-s),A=$s(i,60),P=function(e){for(var t,n,r=0;r++<e.length;){const o=e[r-1];if(null==o[0]||null!=o[1]&&!((t=o[0])>=(n=o[1])[0]&&t<=n[1]))return o[2]}return null}([[f,t.volIncrease,0],[u,t.prevDayVR,0],[h,t.prevDayIncrease,0],[p,t.prevDayIncrease2,0],[k,t.vixOpen,0],[C,t.vixIncrease,0],[null!=e.vol2?e.vol2[0]:null,t.vol,0],[d,t.increase935,5],[w,t.vr5,5],[M,t.all_10,10],[v,t.vr10,10],[b,t.vr30,30],[I,t.all_30,30],[A,t.volume,60],[m,t.firstHourVRIncrease,60],[g,t.firstHourVR,60],[T,t.all_60,60],[y,t.vr90,90],[D,t.all_90,90],[x,t.vr120,120],[j,t.all_120,120]]);null!=P?P>n&&c.set(_,P):(l.add(_),c.delete(_))}})),a.push([e,g,m]),a.length>2&&a.shift()})),c}(o,n,i);m(r),e.updater(r,t,p)}),[d,t,i,l,v]);const[x]=(0,r.useState)(new AbortController);(0,r.useEffect)((()=>()=>x.abort()),[x]);const b=(0,r.useCallback)(((e,t)=>{(async function(e,t,n){var r;r=null!=e.rowid?JSON.stringify({...e,uid:e.rowid,tag:n}):JSON.stringify({...e,tag:n});const o=await n7("uperset",r,(e=>"s"in e&&e.s),t);return"boolean"===typeof o&&o})(e,x.signal,u).then((n=>{n&&(null==e.rowid?a():h((t=>t.map((t=>t.rowid===e.rowid?e:t))))),t(n?"succeed":"fail")}))}),[a,x.signal,u]);return(0,Sn.jsxs)("div",{children:[(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u6761\u4ef6\u8fc7\u6ee4"}),(0,Sn.jsx)(n3,{checked:t,onChange:e=>n((e=>!e))}),(0,Sn.jsx)("span",{children:"\u6761\u4ef6\u4fdd\u7559"})]}),(0,Sn.jsx)(Ane,{callback:b,isNew:u.length>0},"1"),(0,Sn.jsx)(kne,{filters:d.filter((e=>1!==e.freeze)),filter:v,callback:b,setFilter:y,isNew:u.length>0}),(0,Sn.jsx)($8,{selected:l,data:d.map((e=>e.name)),select:e=>c(e)}),(0,Sn.jsx)(gne,{range:p,name:"\u524d\u4e00\u5929\u76c8\u5229",updater:n=>{f(n),e.updater(g,t,n)}})]})}function Mne(e){const[t,n]=(0,r.useState)(0),[o,i]=(0,r.useState)([]),{strategy:a}=e,s="weight stock buy"===a?"weight":"",l=(0,r.useCallback)((async e=>await r7(e,s)),[t,s]);return(0,Sn.jsx)(Qc,{getter:l,cvt:t=>(0,Sn.jsx)(Cne,{startDate:e.startDate,data:e.data,filters:t,updater:e.updater,updater3:()=>n((e=>e+1)),filterNames:o,setFilterNames:i,tag:s})})}async function Ine(e,t,n,r,o,i){const a=await fc(n,r,o,i,!0);if("err"in a)return a;{const o=await _l("I:VIX",n,r,1,"day",i);if("err"in o)return o;{const s=await async function(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null;const a=new URLSearchParams;a.set("symbol",t),a.set("startDate",r),a.set("endDate",o),a.set("strategy",n),a.set("command","signals"),a.set("uid",e),a.set("getDate","1");const s="".concat(xl,"/backtest?").concat(a.toString()),l=await Cl(s,i);return"err"in l?l:Array.isArray(l)?l.map((e=>parseInt(e))):{err:"wrong type"}}(e,"QQQ",t,n,r,i);if("err"in s)return s;{const t=await async function(e,t,n,r){const o="".concat(xl,"/backtest?command=signals_agg&uid=").concat(e,"&startDate=").concat(t,"&endDate=").concat(n),i=await Cl(o,r);return i}(e,n,r,i);if("err"in t)return[a,o.results,new Set(s)];return[a.map((e=>{const n=Math.floor(e.t/$2)+"";return n in t?{...e,energy:t[n]}:e})),o.results,new Set(s)]}}}}function Tne(e){const{updater:t,uid:n,symbol:o,strategy:i,startDate:a,endDate:s,dayProfit2:l,clickDay:c,dayProfit:u,startDate2:d}=e,h=(0,r.useCallback)((async e=>await Ine(n,"energy-antireverse",a,s,o||"QQQ",e)),[a,s,o,n]);return(0,Sn.jsx)(Qc,{getter:h,cvt:e=>{const r=e[0].map((e=>Math.floor(e.t/Ks))),o=u;return(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsx)("div",{style:{width:"100%",aspectRatio:"16/9"},children:(0,Sn.jsx)(h3,{withEstimateVolume:!0,withOtherRank:!0,startDate:a,endDate:s,signals:Xs(Array.from(e[2]).sort().map((e=>[e*$2,["@Color0blue@@antireverse"]])),o),preClose:1,symbol:"QQQ",clickDay:c,aggData:e[0],withExtra:!0,withSignal:!1,taskId:n})}),(0,Sn.jsx)("button",{onClick:e=>{!function(e,t){const n=document.createElement("a");n.href="data:text/csv;charset=utf-8,"+encodeURIComponent(e),n.download=t,n.click()}("date,profit,trade times,profit day\n"+l.map((e=>"".concat(El(e[0]),",").concat(e[1].toLocaleString(),",").concat(e[2],",").concat(e[3].toLocaleString()))).join("\n"),"".concat(n,".csv"))},children:"\u4e0b\u8f7dCsv"}),e[0].length>0&&(0,Sn.jsx)(Mne,{data:[e[0],e[1]],updater:(e,n,o)=>{t([o,r,e,n])},startDate:d,strategy:i})]})}})}const Dne=1e6;function jne(e){const{date:t,symbol:n,stockPrice:o}=e,[i,a]=(0,r.useState)(null),s=(0,r.useCallback)((async e=>{const r=El(new Date(t).getTime()+432e6),i=await async function(e,t,n,r){const o="".concat(xl,"/options?stock=").concat(e,"&startDate=").concat(t,"&endDate=").concat(n),i=await Cl(o,r);return"err"in i?i:"results"in i?i.results:{err:"results not found"}}(n,t,r,e);return"err"in i?i:(a(null),i.map((e=>{const t=parseInt(e.substring(e.length-8))/1e3;return[Math.abs(o-t),e]})).sort(((e,t)=>e[0]-t[0])).slice(0,100).map((e=>e[1])))}),[t,n,o]);return(0,Sn.jsx)(Qc,{getter:s,cvt:e=>(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsxs)("div",{style:{paddingLeft:"100px"},children:[(0,Sn.jsx)("span",{children:"Contracts:"}),(0,Sn.jsxs)("select",{value:i||"",onChange:e=>{const t=e.target.value;a(t.length>0?t:null)},children:[(0,Sn.jsx)("option",{value:"",children:"None"},"none"),e.map((e=>(0,Sn.jsx)("option",{value:e,children:e},e)))]})]}),null!=i&&(0,Sn.jsx)("div",{style:{width:"100%",aspectRatio:"16/9"},children:(0,Sn.jsx)(c3,{signals:[],startDate:t,endDate:t,symbol:i})})]})})}function Pne(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=[];return e.forEach((e=>{if(e.isSell){const t=Math.floor(e.timestamp/Ks)*Ks,o=e.buyPrice*e.volume,i=Qs(e.symbol),a=null!=n?n:el(i),s=!0!==e.reverse&&e.price<Js?0:a,l=!0===e.reverse?-1:1,c=((e.price-e.buyPrice)*l-s)*e.volume,u=e.buySignal.strategy+e.buySignal.timestamp;if(0===r.length||Math.abs(t-r[r.length-1][0])>1e5){const e=new Map;e.set(u,[o,c]),r.push([t,e])}else{const e=r[r.length-1][1],t=e.get(u);null!=t?e.set(u,[t[0]+o,t[1]+c]):e.set(u,[o,c])}}})),r}function Lne(e){return e.map((e=>{const t=Array.from(e[1].entries()).reduce(((e,t)=>{const n=t[1][0],r=t[1][1];return[e[0]+n,e[1]+r,e[2]+(t[1][0]>0?t[1][1]/t[1][0]:0)]}),[0,0,0]),n=t[0]>0?t[1]/t[0]:0;return[e[0],t[2],e[1].size,n]})).filter((e=>0!==e[1]))}function Rne(e,t,n,r,o,i,a,s,l,c,u,d){let h=arguments.length>12&&void 0!==arguments[12]?arguments[12]:null,p=arguments.length>13&&void 0!==arguments[13]&&arguments[13];const f=e.filter((e=>{const n=El(e.timestamp);return!t.has(n)&&n>=i[0]&&n<=i[1]})).filter((e=>{const t=Math.floor(e.timestamp/Ks);return n===a.length?null!=a.find((e=>e[1].has(t))):!(n>=0)||a[n][1].has(t)}));return function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=arguments.length>7&&void 0!==arguments[7]&&arguments[7],l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,c=arguments.length>9&&void 0!==arguments[9]&&arguments[9];const u=Gs(e,t,n,r,o,null,s,l,c);if(i||null!=a){const f=new Set;var d=0;const g=u[1].length;for(;d++<g;){const e=u[1][d-1];var h=!0;if(null!=a){const[t,n]=a;var p=0;if(d>1){const t=u[1][d-2],r=n.findIndex((t=>t===e[0]));r>0&&t[0]===n[r-1]&&(p=t[1])}t[0]>t[1]?(p<t[0]||p>t[1])&&(h=!1):(t[0]>p||p>t[1])&&(h=!1)}h&&i&&e[1]<0&&(h=!1),h&&f.add(e[0])}return Gs(e,t,n,r,o,f,s,l,c)[0]}return u[0]}(null==o?f:o[3]?function(e,t,n){if(null==n)return t.filter((t=>{const n=Math.floor(t.timestamp/$2);return!e.has(n)}));const r=new Map;t.forEach((e=>{const t=Math.floor(e.timestamp/$2),n="".concat(t,"-").concat(e.symbol,"-").concat(e.buySignal.timestamp),o=r.get(n);null!=o?o.push(e):r.set(n,[e])}));const o=[];return Array.from(r.entries()).forEach((t=>{const r=t[0].split("-"),i=parseInt(r[0]),a=r[1],s=e.get(i);if(null!=s){const e=n.get("".concat(i,"-").concat(a,"-").concat(s)),r=Yl(i*$2)+6e4*s;var l=0;const u=[];var c=!0;t[1].forEach((t=>{if(t.isSell){if(t.timestamp<=r)l-=t.volume,u.push(t);else if(l>0)if(null!=e){var n;const o={timestamp:r,strategy:t.sellSignal.strategy,subtype:"cancel first ".concat(s," minutes"),symbol:null===(n=t.sellSignal)||void 0===n?void 0:n.symbol};u.push({...t,volume:l,price:e,timestamp:r,sellSignal:o}),l=0}else c=!1,console.log("debug filter,fail to find clean price for position record:",t)}else t.timestamp<r&&(l+=t.volume,u.push(t))})),c&&u.forEach((e=>o.push(e)))}else t[1].forEach((e=>o.push(e)))})),o}(o[2],f,l?s:null):f.filter((e=>o[2].has(Math.floor(e.timestamp/$2)))),d?[1e5,!0]:[Dne,!1],r,!1,!0,c,null!=o?[o[0],o[1]]:null,u,h,p)}function Ene(e){const{targetPcts:t,specialDays:n,filterN:o,percent:i,newFilter:a,filterStartDate:s,simulateCancel:l,filterPositive:c,strategy:u,symbol:d,clickDay:h}=e,p=u===tu,[f,g]=(0,r.useState)(null),[m,v]=(0,r.useState)(null),y=(0,r.useCallback)((async e=>null!=m?await Vl(m,"energy"===u,e):{err:"task is empty!"}),[m,u]);return(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("input",{value:f||"",onChange:e=>g(e.target.value)}),(0,Sn.jsx)("button",{onClick:()=>{null!=f&&f.startsWith("task")&&v(f)},children:"\u4efb\u52a1PK"})]}),null!=m&&(0,Sn.jsx)(Qc,{getter:y,cvt:e=>{const r=Ws.has(u)||e[0].length>0&&!0===e[0][0].reverse,f=Lne(Pne(Rne(e[0],n,o,i,a,s,e[2],e[3]||dl,l,c,r,!1,null,p),r)),g=[];var m=0,v=0;const y=t.length,x=f.length;for(;m<y||v<x;){const e=t[m],n=f[v];var b,w;if(m<y&&v<x?e[0]===n[0]?(b=e[1]-n[1],w=e[0],m++,v++):e[0]<n[0]?(b=e[1],w=e[0],m++):(b=-n[1],w=n[0],v++):m<y?(w=e[0],b=e[1],m++):(w=n[0],b=-n[1],v++),Math.abs(b)>.001){const e=(100*b).toFixed(2)+"%";g.push([w,["@TITLE"+e,"@Color0"+(b>=0?"green":"red")+"@@"+e]])}}return(0,Sn.jsx)("div",{style:{width:"100%",aspectRatio:"16/9"},children:(0,Sn.jsx)(h3,{symbol:d,startDate:s[0],endDate:s[1],preClose:null,clickDay:h,signals:g})})}})]})}function Nne(){let e=rt(),[t]=Xt();const n=t.get("startDate"),o=e.uid,i=t.get("symbol"),a=t.get("strategy"),s=t.get("strategy2"),l="true"===t.get("filterPositive"),c=t.get("endDate"),u=(0,r.useCallback)((async e=>await Vl(o,"energy"===a,e)),[o,a]);return(0,Sn.jsx)(Qc,{getter:u,cvt:e=>(0,Sn.jsx)(One,{positions:e,startDate:n,endDate:c,uid:o,filterPositive:l,strategy:a,strategy2:s,symbol:i})})}function One(e){const{positions:t,startDate:n,endDate:o,uid:i,filterPositive:a,strategy:s,strategy2:l,symbol:c}=e,u=new Date(n).getTime(),d=El(u-15*Ks),[h,p]=(0,r.useState)(!1),f=t[0].length>0&&!t[0][0].symbol.startsWith("O:"),[g,m]=(0,r.useState)(el(f)),v=Math.floor((new Date(o).getTime()-new Date(n).getTime())/Ks),[y,x]=(0,r.useState)(null),[b,w]=(0,r.useState)({alpha:10,total:1e5,scoreLow:0,scoreHigh:100,hourScoreLow:0,hourScoreHigh:100,priceHigh:80,isBigTrade:!1}),[S,_]=(0,r.useState)(!0),[A,k]=(0,r.useState)(-1),[C,M]=(0,r.useState)([n,o]),[I,T]=(0,r.useState)(null),[D,j]=(0,r.useState)(new Set),[P,L]=(0,r.useState)(10),[R,E]=(0,r.useState)(!1),[N,O]=(0,r.useState)(!1),[z,B]=(0,r.useState)([]);(0,r.useEffect)((()=>{if(null!=t&&!("err"in t)){const e=!1,n=Rne(t[0],D,A,P,I,C,t[2],t[3]||dl,N,a,e,h,g,R);B(n)}}),[t,A,I,a,C,D,P,N,l,h,g,R]);const F=Pne(z,z.length>0&&!0===z[0].reverse,g),V=Lne(F);return(0,Sn.jsxs)("main",{children:[(0,Sn.jsxs)("div",{style:{width:"100%",marginTop:"2rem",marginBottom:"2rem"},children:[t[2].length>0&&(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u9009\u62e9\u8fc7\u6ee4\u6761\u4ef6:"}),(0,Sn.jsxs)("select",{value:A,onChange:e=>{k(parseInt(e.target.value))},children:[(0,Sn.jsx)("option",{value:-1,children:"none"},"none"),t[2].map(((e,t)=>(0,Sn.jsx)("option",{value:t,children:e[0]},t))),(0,Sn.jsx)("option",{value:t[2].length,children:"All"},"all")]}),(0,Sn.jsx)("input",{type:"date",value:C[0],onChange:e=>{M((t=>[e.target.value,t[1]]))}}),"==",(0,Sn.jsx)("input",{type:"date",value:C[1],onChange:e=>{M((t=>[t[0],e.target.value]))}}),(0,Sn.jsx)("span",{children:"\u8fc7\u6ee4\u5668\u6a21\u62df10:35\u53d6\u6d88\u4ea4\u6613"}),(0,Sn.jsx)(n3,{checked:N,onChange:e=>{O(e.target.checked)},inputProps:{"aria-label":"controlled"}})]}),"QQQ2"!==c?(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsx)("h3",{children:"VIX:"}),(0,Sn.jsx)("div",{style:{width:"100%",aspectRatio:"16/9"},children:(0,Sn.jsx)(c3,{signals:[],startDate:d,endDate:o,symbol:"I:VIX"})}),(0,Sn.jsx)(Ene,{targetPcts:V.map((e=>[e[0],e[1]])),specialDays:D,filterN:A,percent:P,newFilter:I,filterStartDate:C,simulateCancel:N,filterPositive:a,strategy:s,symbol:c,clickDay:(e,t)=>{x([e,t])}}),(0,Sn.jsx)(Tne,{uid:i,symbol:c,startDate:d,endDate:o,startDate2:Math.floor(u/Ks),dayProfit2:V,dayProfit:V.map((e=>{const t=e[1],n=(100*t).toFixed(2)+"%",r=Math.floor(e[0]/$2),o=null!=I&&I[2].get(r)||0;console.log("debug color",o);const i=t>=0?o>0?"lightgreen":"green":o>0?"pink":"red";return[e[0],["@TITLE"+n,"@Color0"+i+"@@"+n]]})),clickDay:(e,t)=>{x([e,t])},updater:T,strategy:l})]}):(0,Sn.jsx)(Wne,{uid:i,symbol:c,startDate:n,endDate:o,dayProfit:F.map((e=>{const t=Array.from(e[1].entries()).reduce(((e,t)=>e+t[1][1]/t[1][0]),0),n=(100*t).toFixed(2)+"%",r=Math.floor(e[0]/$2),o=null!=I&&I[2].get(r)||0,i=t>=0?o>0?"lightgreen":"green":o>0?"pink":"red";return[e[0],["@TITLE"+n,"@Color0"+i+"@@"+n]]})),clickDay:(e,t)=>{x([e,t])}})]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u8fc7\u6ee4\u65e5\u671f:"}),(0,Sn.jsx)(See,{updater:j})]}),(0,Sn.jsx)(sne,{positions:Nl(z),startDate:n,endDate:o,symbol:c,uid:i,dates:v,totalM:h?1e5:Dne}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u65e7\u7684\u4e0b\u6ce8\u65b9\u5f0f"}),(0,Sn.jsx)(n3,{checked:h,onChange:e=>p(e.target.checked)}),(0,Sn.jsx)("span",{children:"\u8bb8\u603b\u4e0b\u6ce8\u65b9\u5f0f"})]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u8d39\u7387:"}),(0,Sn.jsx)(Q8,{type:"number",value:g,handleUpdate:e=>m(e)})]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u53cc\u7a7a\u662f\u5426\u7b49\u91cf\u5f00\u4ed3:"}),(0,Sn.jsx)(n3,{checked:R,onChange:e=>{E(e.target.checked)}})]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"Buy Percent:"}),(0,Sn.jsx)(Gte,{defaultValue:10,onChangeCommitted:(e,t)=>{"number"===typeof t&&L(t)},"aria-label":"Default",valueLabelDisplay:"auto"})]}),(0,Sn.jsx)("div",{style:{width:"100%"},children:(0,Sn.jsx)(ine,{data:z,totalMoney:h?1e5:Dne,startDate:n,dayMerge:!0,feeRate:g})},"profit"),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)(f3,{filter:b,updateCB:w}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"Show Buy/Sell Points:"}),(0,Sn.jsx)(n3,{checked:S,onChange:e=>{_(e.target.checked)}})]})]}),null!=y&&(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsx)("div",{children:(0,Sn.jsxs)(Wt,{to:"/stock/".concat(c,"?start=").concat(y[0],"&end=").concat(y[0],"&unit=second"),children:["\u67e5\u770b",y[0],"\u79d2\u7ea7K\u7ebf"]})}),(0,Sn.jsx)(Fne,{uid:i,filter:b,date:y[0],symbol:c,strategy:s,preClose:y[1],clickPoint:e=>{},showBuyPoints:S,positionRecords:z,feeRate:g}),(0,Sn.jsx)(jne,{date:y[0],stockPrice:y[1],symbol:c})]})]})}async function zne(e,t,n,r,o,i){const a=await async function(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;const i=await ic(e,t,n,r,r,o);return i}(e,n,r,t,i);if("err"in a)return a;{const r=await _l(n,t,t,1,"minute",i);if("err"in r)return r;{const n=await async function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const o=new URLSearchParams;o.set("startDate",t),o.set("endDate",n),o.set("command","analysis_data"),o.set("uid",e);const i="".concat(xl,"/backtest?").concat(o.toString()),a=await Cl(i,r);return a}(e,t,t,i);var s;const l=rl(r.results,!1);return s="err"in n?[]:n.map((e=>e.map((e=>{const t=e[1];return[e[0],l.map((e=>{const n=e.t+"";return n in t?t[n]:0}))]})))),[o(t),a,l,s]}}}function Bne(e){const t=Math.floor((new Date).getTime()/864e5)===Math.floor(new Date(e.date).getTime()/864e5),{symbol:n}=e,o=(0,r.useCallback)((async n=>{const r=await _l(e.symbol,e.date,e.date,1,"minute",n);return"err"in r?r:[rl(r.results.map((e=>({...e,v:0,vw:e.o}))),t),r.prevClose]}),[e.date,e.symbol,t]);return e.load?(0,Sn.jsx)(Qc,{getter:o,cvt:t=>(0,Sn.jsx)("div",{style:{width:"100%",marginTop:"2rem",marginBottom:"2rem",aspectRatio:"16/9"},children:(0,Sn.jsx)(l3,{symbol:n,preClose:t[1]||void 0,hasVol:!1,isDay:!0,signals:[],historyData:t[0],zoomRange:e.zoomRange,setZoomRange:e.setZoomRange})})}):(0,Sn.jsx)($c,{})}function Fne(e){const[t,n]=(0,r.useState)(0),[o,i]=(0,r.useState)([0,100]),[a]=(0,r.useState)({alpha:10,total:1e5,scoreLow:0,scoreHigh:100,hourScoreLow:0,hourScoreHigh:100,priceHigh:80,isBigTrade:!1}),s=(0,r.useCallback)((async t=>{const n=Math.floor(new Date(e.date).getTime()/Ks)*Ks,r=await zne(e.uid,e.date,e.symbol,e.strategy,(t=>e.showBuyPoints?e.positionRecords.filter((e=>e.timestamp>n&&e.timestamp<n+Ks)):[]),t);if("err"in r)return r;{const n=await async function(e,t){const n="".concat(xl,"/backtest?command=historyXkk&date=").concat(e),r=await Cl(n,t);return"err"in r||Array.isArray(r)?r:{err:"result not array"}}(e.date,t);if("err"in n)return n;{const o=await wc(e.date,t);return"err"in o?o:[r[0],r[1],r[2],n,r[3],o]}}}),[e.date,e.symbol,e.uid,e.strategy,e.positionRecords,e.showBuyPoints]);return(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsx)(Bne,{symbol:"I:VIX",date:e.date,zoomRange:o,setZoomRange:i,load:t>0}),(0,Sn.jsx)(yne,{getter:s,date:e.date,symbol:e.symbol,filter:e.filter,preClose:e.preClose,clickPoint:e.clickPoint,onConvert:()=>{n((e=>e+1))},feeRate:e.feeRate,zoomRange:o,setZoomRange:i,middle:t=>(0,Sn.jsx)(Vne,{signals:g3(e.filter,e.date,t[1])})})]})}function Vne(e){const[t,n]=(0,r.useState)(!1),[o,i]=(0,r.useState)(3600);return(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u5c55\u793a\u80fd\u91cf\u5bc6\u5ea6\u66f2\u7ebf:"}),(0,Sn.jsx)(n3,{checked:t,onChange:e=>{n(e.target.checked)}})]}),t&&(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsx)("div",{style:{width:"100%",aspectRatio:"16/9"},children:(0,Sn.jsx)(Hne,{signals:e.signals,duration:o})}),(0,Sn.jsxs)("div",{style:{width:"90%",margin:"2rem",display:"flex"},children:[(0,Sn.jsx)("span",{children:"Average Window:"}),(0,Sn.jsx)(Gte,{min:600,max:10800,step:60,defaultValue:3600,onChangeCommitted:(e,t)=>{"number"===typeof t&&i(t)},"aria-label":"Default",valueLabelDisplay:"auto"})]})]})]})}function Wne(e){const{uid:t,symbol:n,startDate:o,endDate:i}=e,a=(0,r.useCallback)((async e=>await async function(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;const i=new URLSearchParams;i.set("stock",t),i.set("startDate",n),i.set("endDate",r),i.set("command","signals"),i.set("uid",e);const a="".concat(xl,"/backtest?").concat(i.toString());return await Cl(a,o)}(t,n,o,i,e)),[t,n,o,i]);return(0,Sn.jsx)(Qc,{getter:a,cvt:t=>(0,Sn.jsx)(h3,{symbol:e.symbol,startDate:e.startDate,endDate:e.endDate,clickDay:e.clickDay,signals:null!=e.dayProfit?Xs(t,e.dayProfit):t,preClose:null})})}function Hne(e){if(e.signals.length>0){const a=[];e.signals.forEach((e=>{if("agg"===e.extra.type){const t=6e4*Math.floor(e.timestamp/6e4);0===a.length||t>a[a.length-1][0]?a.push([t,1]):a[a.length-1][1]+=1}}));const s=e.signals[0].timestamp,l=Yl(s),c=ql(s),u=[];var t=l;const d=[];for(var n=0,r=0,o=0;t<c;){const s=t;for(;r<a.length&&a[r][0]<=s;)o+=a[r][1],r++;for(;n<r&&a[n][0]<s-1e3*e.duration;)n++;const c=Math.ceil((s-l)/36e5);var i=0;i=r<=a.length&&n<r?a.slice(n,r).reduce(((e,t)=>e+t[1]),0):0,d.push([t,3600*i/e.duration]),u.push([s,o/c]),t+=6e4}const h=Pl(a,u,d),p=h[0].map((e=>Ml.format(new Date(e))));return(0,Sn.jsx)("div",{style:{width:"100%",aspectRatio:"16/9"},children:(0,Sn.jsx)(xne,{x:p,y:[["energy",h[1][0]],["hourAverage",h[1][1]],["duration",h[1][2]]]})})}return(0,Sn.jsx)("p",{children:"Empty Signals"})}function Gne(){return W2()?(0,Sn.jsxs)("div",{style:{display:"flex"},children:[(0,Sn.jsxs)("nav",{style:{borderRight:"solid 1px",padding:"2rem"},children:[(0,Sn.jsx)(Wt,{to:"/qqq/signal_search",style:e=>{let{isActive:t}=e;return{display:"block",margin:"1rem 0",color:t?"red":""}},children:"Signal Search"}),(0,Sn.jsx)(Wt,{to:"/qqq",style:e=>{let{isActive:t}=e;return{display:"block",margin:"1rem 0",color:"/qqq"===window.location.pathname?"red":""}},children:"Strategy"})]}),(0,Sn.jsx)(vt,{})]}):(0,Sn.jsx)(vt,{})}const Une="QQQ";const Xne={rowid:1,account:"",symbol:"",strategy:"",total:1,freeze:1,betPercent:0,desc:"",update_time:0};function Yne(e){const{date:t,filter:n,previousClose:o}=e,i=(0,r.useCallback)((async e=>await A9(t,Une,"energy",Xne,e)),[t]);return(0,Sn.jsx)(Qc,{getter:i,cvt:e=>{const r=g3(n,t,e[1]).map((e=>[e.timestamp,[e.subtype]]));return(0,Sn.jsx)(c3,{symbol:Une,startDate:t,endDate:t,signals:r})}})}function qne(e){const{symbol:t,filterIn:n,updateFilter:o,data:i}=e,[a,s]=(0,r.useState)(null),[l,c]=(0,r.useState)(n);return(0,Sn.jsxs)("main",{children:[i.length>0?(0,Sn.jsx)("div",{style:{width:"100%",aspectRatio:"16/9"},children:(0,Sn.jsx)(c3,{symbol:e.symbol,startDate:i[0].date,endDate:i[i.length-1].date,clickDay:(e,t)=>{s([e,t])},signals:i.map((e=>[new Date(e.date).getTime(),["@TITLE"+e.num]]))})}):(0,Sn.jsx)("p",{children:"Empty Result!"}),(0,Sn.jsx)(Vs,{onClick:()=>{o(l)},children:"\u641c\u7d22"}),(0,Sn.jsx)(f3,{filter:l,updateCB:c}),null!=a&&(0,Sn.jsx)(Sn.Fragment,{children:(0,Sn.jsx)("div",{style:{width:"100%",aspectRatio:"16/9"},children:(0,Sn.jsx)(Yne,{date:a[0],filter:l,previousClose:a[1]})})})]})}function Zne(e){return(0,Sn.jsx)(qne,{filterIn:e.filter,updateFilter:e.updateFilter,symbol:Une,data:e.data})}function Kne(){const[e,t]=(0,r.useState)((()=>({alpha:10,total:1e5,scoreLow:0,scoreHigh:100,hourScoreLow:0,hourScoreHigh:100,priceHigh:80,isBigTrade:!1}))),[n,o]=(0,r.useState)(new AbortController);(0,r.useEffect)((()=>(o(new AbortController),()=>{n.abort()})),[]);const i=(0,r.useCallback)((async t=>await async function(e,t){const n=new URLSearchParams,r=JSON.stringify(Object.fromEntries(Object.entries(e).filter((e=>null!=e[1]))));n.set("filter",r);const o="".concat(xl,"/signals?").concat(n.toString()),i=await Cl(o,t);return"err"in i||Array.isArray(i)?i:{err:"invalid search result!"}}(e,t)),[e]);return(0,Sn.jsx)(Qc,{getter:i,cvt:n=>(0,Sn.jsx)(Zne,{filter:e,data:n,updateFilter:e=>t(e)})})}function $ne(){const[e]=Xt(),t=e.get("mainId"),[n,o]=(0,r.useState)(null),[i,a]=(0,r.useState)(0),s=(0,r.useCallback)((async e=>{const n=await async function(e){const t=await Jl(null,e,!0);return"err"in t?t:[t.filter((e=>0===e.account.length)),t.filter((e=>e.account.length>0))]}(e);if(!("err"in n)){if(n[0].length>0){var r=!1;if(null!=t){const e=parseInt(t),i=n[0].find((t=>t.rowid===e));null!=i&&(o(i),r=!0)}r||o(n[0][0])}return n}return n}),[t,i]);return(0,Sn.jsx)(Qc,{getter:s,cvt:e=>{var t=null;return null!=n&&(t=(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"Main:"}),(0,Sn.jsx)("select",{value:n.rowid,onChange:t=>{const n=parseInt(t.target.value);if(!isNaN(n)){const t=e[0].find((e=>e.rowid===n));null!=t&&o(t)}},children:e[0].map((e=>(0,Sn.jsxs)("option",{value:e.rowid,children:[e.rowid,"-",e.symbol,"-",e.strategy,"-",e.desc]},e.rowid)))})]}),(0,Sn.jsx)(Jne,{account:n,alternatives:e[1].filter((e=>n.symbol===e.symbol&&n.strategy===e.strategy))})]})),(0,Sn.jsxs)("main",{children:[(0,Sn.jsx)(v9,{manualBuy:!1,completeCB:()=>a((e=>e+1))}),t]})}})}async function Qne(e,t,n){const r={isAdd:n,mainId:e,subId:t},o=fl(await gl("update_account_group",JSON.stringify(r),null),["d","data"]);return null!=o&&"s"in o&&!0===o.s}function Jne(e){const[t,n]=(0,r.useState)(0),o=e.account.rowid,[i,a]=(0,r.useState)(null),s=(0,r.useCallback)((async e=>await xc(o,e)),[o,t]);return(0,Sn.jsx)(Qc,{getter:s,cvt:t=>{const r=new Set(t.map((e=>e.subId))),o=e.alternatives.filter((e=>!r.has(e.rowid)));return(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsx)("div",{children:(0,Sn.jsx)(Vs,{onClick:()=>{const t=o.find((t=>t.symbol===e.account.symbol&&t.strategy===e.account.strategy));null!=t&&a(t.rowid)},children:"\u65b0\u589e"})}),(0,Sn.jsxs)(j4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,Sn.jsx)("thead",{children:(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:"Main Id"},"main"),(0,Sn.jsx)("td",{children:"Sub Id"},"sub"),(0,Sn.jsx)("td",{children:"Operate"},"operate")]})}),(0,Sn.jsx)("tbody",{children:t.map((e=>(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:e.mainId},"main"),(0,Sn.jsx)("td",{children:(0,Sn.jsx)(Vt,{to:"/trading/account/".concat(e.subId),children:e.subId})},"sub"),(0,Sn.jsx)("td",{children:(0,Sn.jsx)(Vs,{onClick:()=>{Qne(e.mainId,e.subId,!1).then((e=>{e&&n((e=>e+1))}))},children:"\u5220\u9664"})},"operate")]},e.subId)))})]}),null!=i&&(0,Sn.jsx)(ere,{close:()=>a(null),submit:()=>{null!=i&&Qne(e.account.rowid,i,!0).then((e=>{e&&n((e=>e+1)),a(null)}))},content:(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"Select Sub Id:"}),(0,Sn.jsx)("select",{onChange:e=>{const t=parseInt(e.target.value);isNaN(t)||a(t)},children:o.map((e=>(0,Sn.jsxs)("option",{value:e.rowid,children:[e.rowid,"-",e.symbol,"-",e.strategy,"-",e.desc]},e.rowid)))})]})})]})}})}function ere(e){return(0,Sn.jsxs)(s8,{show:!0,onHide:e.close,children:[(0,Sn.jsx)(s8.Header,{closeButton:!0,children:(0,Sn.jsx)(s8.Title,{children:"Edit"})}),(0,Sn.jsx)(s8.Body,{children:e.content}),(0,Sn.jsxs)(s8.Footer,{children:[(0,Sn.jsx)(Vs,{color:"secondary",onClick:e.close,children:"Cancel"}),(0,Sn.jsx)(Vs,{color:"primary",onClick:e.submit,children:"OK"})]})]})}class tre{constructor(e){this.socket=void 0,this.url=void 0,this.closePromise=void 0,this.isClose=void 0,this.closeResolve=void 0,this.pendingMsgs=void 0,this.isClose=!1,this.closeResolve=null,this.closePromise=new Promise(((e,t)=>{this.closeResolve=e})),this.url=e,this.socket=null,this.pendingMsgs=[]}close(){this.isClose=!0,null!=this.closeResolve&&this.closeResolve(1)}async ensureConnect(){for(var e=null,t=null;!this.isClose;){if(null==this.socket||3===this.socket.readyState){t=new Promise(((t,n)=>{e=t}));const n=new WebSocket(Sl(this.url));n.addEventListener("message",(e=>this.onMessage(e))),n.addEventListener("close",(()=>{this.socket=null,null!=e&&e(1)})),n.addEventListener("error",(e=>{console.log("ws got error:",e)})),n.addEventListener("open",(e=>{this.socket=n,this.onConnect()}))}null!=t?(await Promise.any([this.closePromise,t]),t=null):await Promise.any([this.closePromise,vl(5e3)])}}onMessage(e){}onConnect(){const e=this.socket;if(null!=e)for(;this.pendingMsgs.length>0;){const t=this.pendingMsgs.splice(0,1);t.length>0&&e.send(t[0])}}sendMessage(e){const t=this.socket;null==t?this.pendingMsgs.push(e):t.send(e)}}class nre extends tre{constructor(){super("wss://".concat(bl,"/ws_new")),this.subscribeMap=void 0,this.callBackMap=void 0,this.count=10,this.subscribeMap=new Map,this.callBackMap=new Map}onMessage(e){const t=function(e){const t=JSON.parse(e);return"tp"in t&&"pub"===t.tp?t:null}(e.data);if(null!=t){const e=this.subscribeMap.get(t.topic);null!=e&&Array.from(e).forEach((e=>{const n=this.callBackMap.get(e);null!=n&&n(t.data)}))}}subscribe(e,t){const n=this.count++,r=this.subscribeMap.get(e);if(null==r){const t=new Set;t.add(n),this.subscribeMap.set(e,t),this.sendMessage(JSON.stringify({tp:"sub",topic:e,isSub:!0,needHistory:!0}))}else r.add(n);return this.callBackMap.set(n,t),n}onConnect(){console.log("onConnect"),super.onConnect(),Array.from(this.subscribeMap.keys()).forEach((e=>{this.sendMessage(JSON.stringify({tp:"sub",topic:e,isSub:!0,needHistory:!0}))}))}unsubscribe(e,t){const n=this.subscribeMap.get(e);null!=n&&(n.delete(t),this.callBackMap.delete(t),0===n.size&&(this.subscribeMap.delete(e),this.sendMessage(JSON.stringify({tp:"sub",topic:e,isSub:!1,needHistory:!0}))))}}const rre=(0,r.createContext)(null);function ore(e){console.log("MyWSNewProvider start");const[t]=(0,r.useState)((()=>new nre));return(0,r.useEffect)((()=>(t.ensureConnect(),()=>{t.close()})),[t]),(0,Sn.jsx)(rre.Provider,{value:t,children:e.children})}let ire;function are(){if(ire)return ire;const e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),ire="reverse",e.scrollLeft>0?ire="default":(e.scrollLeft=1,0===e.scrollLeft&&(ire="negative")),document.body.removeChild(e),ire}function sre(e,t){const n=e.scrollLeft;if("rtl"!==t)return n;switch(are()){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n;default:return n}}function lre(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}const cre=["onChange"],ure={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};const dre=(0,Ea.A)((0,Sn.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),hre=(0,Ea.A)((0,Sn.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function pre(e){return(0,Kt.Ay)("MuiTabScrollButton",e)}const fre=(0,nr.A)("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),gre=["className","slots","slotProps","direction","orientation","disabled"],mre=(0,In.Ay)(Ds,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})((e=>{let{ownerState:t}=e;return(0,qt.A)({width:40,flexShrink:0,opacity:.8,["&.".concat(fre.disabled)]:{opacity:0}},"vertical"===t.orientation&&{width:"100%",height:40,"& svg":{transform:"rotate(".concat(t.isRtl?-90:90,"deg)")}})})),vre=r.forwardRef((function(e,t){var n,r;const o=(0,Tn.b)({props:e,name:"MuiTabScrollButton"}),{className:i,slots:a={},slotProps:s={},direction:l}=o,c=(0,Yt.A)(o,gre),u=fo(),d=(0,qt.A)({isRtl:u},o),h=(e=>{const{classes:t,orientation:n,disabled:r}=e,o={root:["root",n,r&&"disabled"]};return(0,$t.A)(o,pre,t)})(d),p=null!=(n=a.StartScrollButtonIcon)?n:dre,f=null!=(r=a.EndScrollButtonIcon)?r:hre,g=wo({elementType:p,externalSlotProps:s.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:d}),m=wo({elementType:f,externalSlotProps:s.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:d});return(0,Sn.jsx)(mre,(0,qt.A)({component:"div",className:(0,Zt.A)(h.root,i),ref:t,role:null,ownerState:d,tabIndex:null},c,{children:"left"===l?(0,Sn.jsx)(p,(0,qt.A)({},g)):(0,Sn.jsx)(f,(0,qt.A)({},m))}))})),yre=vre;function xre(e){return(0,Kt.Ay)("MuiTabs",e)}const bre=(0,nr.A)("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),wre=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],Sre=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,_re=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,Are=(e,t,n)=>{let r=!1,o=n(e,t);for(;o;){if(o===e.firstChild){if(r)return;r=!0}const t=o.disabled||"true"===o.getAttribute("aria-disabled");if(o.hasAttribute("tabindex")&&!t)return void o.focus();o=n(e,o)}},kre=(0,In.Ay)("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(bre.scrollButtons)]:t.scrollButtons},{["& .".concat(bre.scrollButtons)]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})((e=>{let{ownerState:t,theme:n}=e;return(0,qt.A)({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},t.vertical&&{flexDirection:"column"},t.scrollButtonsHideMobile&&{["& .".concat(bre.scrollButtons)]:{[n.breakpoints.down("sm")]:{display:"none"}}})})),Cre=(0,In.Ay)("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})((e=>{let{ownerState:t}=e;return(0,qt.A)({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},t.fixed&&{overflowX:"hidden",width:"100%"},t.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},t.scrollableX&&{overflowX:"auto",overflowY:"hidden"},t.scrollableY&&{overflowY:"auto",overflowX:"hidden"})})),Mre=(0,In.Ay)("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})((e=>{let{ownerState:t}=e;return(0,qt.A)({display:"flex"},t.vertical&&{flexDirection:"column"},t.centered&&{justifyContent:"center"})})),Ire=(0,In.Ay)("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})((e=>{let{ownerState:t,theme:n}=e;return(0,qt.A)({position:"absolute",height:2,bottom:0,width:"100%",transition:n.transitions.create()},"primary"===t.indicatorColor&&{backgroundColor:(n.vars||n).palette.primary.main},"secondary"===t.indicatorColor&&{backgroundColor:(n.vars||n).palette.secondary.main},t.vertical&&{height:"100%",width:2,right:0})})),Tre=(0,In.Ay)((function(e){const{onChange:t}=e,n=(0,Yt.A)(e,cre),o=r.useRef(),i=r.useRef(null),a=()=>{o.current=i.current.offsetHeight-i.current.clientHeight};return(0,qn.A)((()=>{const e=(0,Oo.A)((()=>{const e=o.current;a(),e!==o.current&&t(o.current)})),n=(0,zo.A)(i.current);return n.addEventListener("resize",e),()=>{e.clear(),n.removeEventListener("resize",e)}}),[t]),r.useEffect((()=>{a(),t(o.current)}),[t]),(0,Sn.jsx)("div",(0,qt.A)({style:ure,ref:i},n))}))({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Dre={};const jre=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiTabs"}),o=Qo(),i=fo(),{"aria-label":a,"aria-labelledby":s,action:l,centered:c=!1,children:u,className:d,component:h="div",allowScrollButtonsMobile:p=!1,indicatorColor:f="primary",onChange:g,orientation:m="horizontal",ScrollButtonComponent:v=yre,scrollButtons:y="auto",selectionFollowsFocus:x,slots:b={},slotProps:w={},TabIndicatorProps:S={},TabScrollButtonProps:_={},textColor:A="primary",value:k,variant:C="standard",visibleScrollbar:M=!1}=n,I=(0,Yt.A)(n,wre),T="scrollable"===C,D="vertical"===m,j=D?"scrollTop":"scrollLeft",P=D?"top":"left",L=D?"bottom":"right",R=D?"clientHeight":"clientWidth",E=D?"height":"width",N=(0,qt.A)({},n,{component:h,allowScrollButtonsMobile:p,indicatorColor:f,orientation:m,vertical:D,scrollButtons:y,textColor:A,variant:C,visibleScrollbar:M,fixed:!T,hideScrollbar:T&&!M,scrollableX:T&&!D,scrollableY:T&&D,centered:c&&!T,scrollButtonsHideMobile:!p}),O=(e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:o,scrollableY:i,centered:a,scrollButtonsHideMobile:s,classes:l}=e,c={root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",o&&"scrollableX",i&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",s&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]};return(0,$t.A)(c,xre,l)})(N),z=wo({elementType:b.StartScrollButtonIcon,externalSlotProps:w.startScrollButtonIcon,ownerState:N}),B=wo({elementType:b.EndScrollButtonIcon,externalSlotProps:w.endScrollButtonIcon,ownerState:N});const[F,V]=r.useState(!1),[W,H]=r.useState(Dre),[G,U]=r.useState(!1),[X,Y]=r.useState(!1),[q,Z]=r.useState(!1),[K,$]=r.useState({overflow:"hidden",scrollbarWidth:0}),Q=new Map,J=r.useRef(null),ee=r.useRef(null),te=()=>{const e=J.current;let t,n;if(e){const n=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollLeftNormalized:sre(e,i?"rtl":"ltr"),scrollWidth:e.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}if(e&&!1!==k){const e=ee.current.children;if(e.length>0){const t=e[Q.get(k)];0,n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},ne=(0,$a.A)((()=>{const{tabsMeta:e,tabMeta:t}=te();let n,r=0;if(D)n="top",t&&e&&(r=t.top-e.top+e.scrollTop);else if(n=i?"right":"left",t&&e){const o=i?e.scrollLeftNormalized+e.clientWidth-e.scrollWidth:e.scrollLeft;r=(i?-1:1)*(t[n]-e[n]+o)}const o={[n]:r,[E]:t?t[E]:0};if(isNaN(W[n])||isNaN(W[E]))H(o);else{const e=Math.abs(W[n]-o[n]),t=Math.abs(W[E]-o[E]);(e>=1||t>=1)&&H(o)}})),re=function(e){let{animation:t=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t?function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:()=>{};const{ease:i=lre,duration:a=300}=r;let s=null;const l=t[e];let c=!1;const u=()=>{c=!0},d=r=>{if(c)return void o(new Error("Animation cancelled"));null===s&&(s=r);const u=Math.min(1,(r-s)/a);t[e]=i(u)*(n-l)+l,u>=1?requestAnimationFrame((()=>{o(null)})):requestAnimationFrame(d)};l===n?o(new Error("Element already at target position")):requestAnimationFrame(d)}(j,J.current,e,{duration:o.transitions.duration.standard}):J.current[j]=e},oe=e=>{let t=J.current[j];D?t+=e:(t+=e*(i?-1:1),t*=i&&"reverse"===are()?-1:1),re(t)},ie=()=>{const e=J.current[R];let t=0;const n=Array.from(ee.current.children);for(let r=0;r<n.length;r+=1){const o=n[r];if(t+o[R]>e){0===r&&(t=e);break}t+=o[R]}return t},ae=()=>{oe(-1*ie())},se=()=>{oe(ie())},le=r.useCallback((e=>{$({overflow:null,scrollbarWidth:e})}),[]),ce=(0,$a.A)((e=>{const{tabsMeta:t,tabMeta:n}=te();if(n&&t)if(n[P]<t[P]){const r=t[j]+(n[P]-t[P]);re(r,{animation:e})}else if(n[L]>t[L]){const r=t[j]+(n[L]-t[L]);re(r,{animation:e})}})),ue=(0,$a.A)((()=>{T&&!1!==y&&Z(!q)}));r.useEffect((()=>{const e=(0,Oo.A)((()=>{J.current&&ne()}));let t;const n=n=>{n.forEach((e=>{e.removedNodes.forEach((e=>{var n;null==(n=t)||n.unobserve(e)})),e.addedNodes.forEach((e=>{var n;null==(n=t)||n.observe(e)}))})),e(),ue()},r=(0,zo.A)(J.current);let o;return r.addEventListener("resize",e),"undefined"!==typeof ResizeObserver&&(t=new ResizeObserver(e),Array.from(ee.current.children).forEach((e=>{t.observe(e)}))),"undefined"!==typeof MutationObserver&&(o=new MutationObserver(n),o.observe(ee.current,{childList:!0})),()=>{var n,i;e.clear(),r.removeEventListener("resize",e),null==(n=o)||n.disconnect(),null==(i=t)||i.disconnect()}}),[ne,ue]),r.useEffect((()=>{const e=Array.from(ee.current.children),t=e.length;if("undefined"!==typeof IntersectionObserver&&t>0&&T&&!1!==y){const n=e[0],r=e[t-1],o={root:J.current,threshold:.99},i=new IntersectionObserver((e=>{U(!e[0].isIntersecting)}),o);i.observe(n);const a=new IntersectionObserver((e=>{Y(!e[0].isIntersecting)}),o);return a.observe(r),()=>{i.disconnect(),a.disconnect()}}}),[T,y,q,null==u?void 0:u.length]),r.useEffect((()=>{V(!0)}),[]),r.useEffect((()=>{ne()})),r.useEffect((()=>{ce(Dre!==W)}),[ce,W]),r.useImperativeHandle(l,(()=>({updateIndicator:ne,updateScrollButtons:ue})),[ne,ue]);const de=(0,Sn.jsx)(Ire,(0,qt.A)({},S,{className:(0,Zt.A)(O.indicator,S.className),ownerState:N,style:(0,qt.A)({},W,S.style)}));let he=0;const pe=r.Children.map(u,(e=>{if(!r.isValidElement(e))return null;const t=void 0===e.props.value?he:e.props.value;Q.set(t,he);const n=t===k;return he+=1,r.cloneElement(e,(0,qt.A)({fullWidth:"fullWidth"===C,indicator:n&&!F&&de,selected:n,selectionFollowsFocus:x,onChange:g,textColor:A,value:t},1!==he||!1!==k||e.props.tabIndex?{}:{tabIndex:0}))})),fe=(()=>{const e={};e.scrollbarSizeListener=T?(0,Sn.jsx)(Tre,{onChange:le,className:(0,Zt.A)(O.scrollableX,O.hideScrollbar)}):null;const t=T&&("auto"===y&&(G||X)||!0===y);return e.scrollButtonStart=t?(0,Sn.jsx)(v,(0,qt.A)({slots:{StartScrollButtonIcon:b.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:z},orientation:m,direction:i?"right":"left",onClick:ae,disabled:!G},_,{className:(0,Zt.A)(O.scrollButtons,_.className)})):null,e.scrollButtonEnd=t?(0,Sn.jsx)(v,(0,qt.A)({slots:{EndScrollButtonIcon:b.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:B},orientation:m,direction:i?"left":"right",onClick:se,disabled:!X},_,{className:(0,Zt.A)(O.scrollButtons,_.className)})):null,e})();return(0,Sn.jsxs)(kre,(0,qt.A)({className:(0,Zt.A)(O.root,d),ownerState:N,ref:t,as:h},I,{children:[fe.scrollButtonStart,fe.scrollbarSizeListener,(0,Sn.jsxs)(Cre,{className:O.scroller,ownerState:N,style:{overflow:K.overflow,[D?"margin".concat(i?"Left":"Right"):"marginBottom"]:M?void 0:-K.scrollbarWidth},ref:J,children:[(0,Sn.jsx)(Mre,{"aria-label":a,"aria-labelledby":s,"aria-orientation":"vertical"===m?"vertical":null,className:O.flexContainer,ownerState:N,onKeyDown:e=>{const t=ee.current,n=(0,ho.A)(t).activeElement;if("tab"!==n.getAttribute("role"))return;let r="horizontal"===m?"ArrowLeft":"ArrowUp",o="horizontal"===m?"ArrowRight":"ArrowDown";switch("horizontal"===m&&i&&(r="ArrowRight",o="ArrowLeft"),e.key){case r:e.preventDefault(),Are(t,n,_re);break;case o:e.preventDefault(),Are(t,n,Sre);break;case"Home":e.preventDefault(),Are(t,null,Sre);break;case"End":e.preventDefault(),Are(t,null,_re)}},ref:ee,role:"tablist",children:pe}),F&&de]}),fe.scrollButtonEnd]}))})),Pre=jre;function Lre(e){return(0,Kt.Ay)("MuiTab",e)}const Rre=(0,nr.A)("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),Ere=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],Nre=(0,In.Ay)(Ds,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t["textColor".concat((0,Mn.A)(n.textColor))],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{["& .".concat(Rre.iconWrapper)]:t.iconWrapper}]}})((e=>{let{theme:t,ownerState:n}=e;return(0,qt.A)({},t.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},n.label&&{flexDirection:"top"===n.iconPosition||"bottom"===n.iconPosition?"column":"row"},{lineHeight:1.25},n.icon&&n.label&&{minHeight:72,paddingTop:9,paddingBottom:9,["& > .".concat(Rre.iconWrapper)]:(0,qt.A)({},"top"===n.iconPosition&&{marginBottom:6},"bottom"===n.iconPosition&&{marginTop:6},"start"===n.iconPosition&&{marginRight:t.spacing(1)},"end"===n.iconPosition&&{marginLeft:t.spacing(1)})},"inherit"===n.textColor&&{color:"inherit",opacity:.6,["&.".concat(Rre.selected)]:{opacity:1},["&.".concat(Rre.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity}},"primary"===n.textColor&&{color:(t.vars||t).palette.text.secondary,["&.".concat(Rre.selected)]:{color:(t.vars||t).palette.primary.main},["&.".concat(Rre.disabled)]:{color:(t.vars||t).palette.text.disabled}},"secondary"===n.textColor&&{color:(t.vars||t).palette.text.secondary,["&.".concat(Rre.selected)]:{color:(t.vars||t).palette.secondary.main},["&.".concat(Rre.disabled)]:{color:(t.vars||t).palette.text.disabled}},n.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},n.wrapped&&{fontSize:t.typography.pxToRem(12)})})),Ore=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiTab"}),{className:o,disabled:i=!1,disableFocusRipple:a=!1,fullWidth:s,icon:l,iconPosition:c="top",indicator:u,label:d,onChange:h,onClick:p,onFocus:f,selected:g,selectionFollowsFocus:m,textColor:v="inherit",value:y,wrapped:x=!1}=n,b=(0,Yt.A)(n,Ere),w=(0,qt.A)({},n,{disabled:i,disableFocusRipple:a,selected:g,icon:!!l,iconPosition:c,label:!!d,fullWidth:s,textColor:v,wrapped:x}),S=(e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:o,icon:i,label:a,selected:s,disabled:l}=e,c={root:["root",i&&a&&"labelIcon","textColor".concat((0,Mn.A)(n)),r&&"fullWidth",o&&"wrapped",s&&"selected",l&&"disabled"],iconWrapper:["iconWrapper"]};return(0,$t.A)(c,Lre,t)})(w),_=l&&d&&r.isValidElement(l)?r.cloneElement(l,{className:(0,Zt.A)(S.iconWrapper,l.props.className)}):l;return(0,Sn.jsxs)(Nre,(0,qt.A)({focusRipple:!a,className:(0,Zt.A)(S.root,o),ref:t,role:"tab","aria-selected":g,disabled:i,onClick:e=>{!g&&h&&h(e,y),p&&p(e)},onFocus:e=>{m&&!g&&h&&h(e,y),f&&f(e)},ownerState:w,tabIndex:g?0:-1},b,{children:["top"===c||"start"===c?(0,Sn.jsxs)(r.Fragment,{children:[_,d]}):(0,Sn.jsxs)(r.Fragment,{children:[d,_]}),u]}))})),zre=Ore;const Bre=r.createContext();function Fre(e){return(0,Kt.Ay)("MuiGrid",e)}const Vre=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],Wre=(0,nr.A)("MuiGrid",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map((e=>"spacing-xs-".concat(e))),...["column-reverse","column","row-reverse","row"].map((e=>"direction-xs-".concat(e))),...["nowrap","wrap-reverse","wrap"].map((e=>"wrap-xs-".concat(e))),...Vre.map((e=>"grid-xs-".concat(e))),...Vre.map((e=>"grid-sm-".concat(e))),...Vre.map((e=>"grid-md-".concat(e))),...Vre.map((e=>"grid-lg-".concat(e))),...Vre.map((e=>"grid-xl-".concat(e)))]),Hre=Wre,Gre=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function Ure(e){const t=parseFloat(e);return"".concat(t).concat(String(e).replace(String(t),"")||"px")}function Xre(e){let{breakpoints:t,values:n}=e,r="";Object.keys(n).forEach((e=>{""===r&&0!==n[e]&&(r=e)}));const o=Object.keys(t).sort(((e,n)=>t[e]-t[n]));return o.slice(0,o.indexOf(r))}const Yre=(0,In.Ay)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{container:r,direction:o,item:i,spacing:a,wrap:s,zeroMinWidth:l,breakpoints:c}=n;let u=[];r&&(u=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e||e<=0)return[];if("string"===typeof e&&!Number.isNaN(Number(e))||"number"===typeof e)return[n["spacing-xs-".concat(String(e))]];const r=[];return t.forEach((t=>{const o=e[t];Number(o)>0&&r.push(n["spacing-".concat(t,"-").concat(String(o))])})),r}(a,c,t));const d=[];return c.forEach((e=>{const r=n[e];r&&d.push(t["grid-".concat(e,"-").concat(String(r))])})),[t.root,r&&t.container,i&&t.item,l&&t.zeroMinWidth,...u,"row"!==o&&t["direction-xs-".concat(String(o))],"wrap"!==s&&t["wrap-xs-".concat(String(s))],...d]}})((e=>{let{ownerState:t}=e;return(0,qt.A)({boxSizing:"border-box"},t.container&&{display:"flex",flexWrap:"wrap",width:"100%"},t.item&&{margin:0},t.zeroMinWidth&&{minWidth:0},"wrap"!==t.wrap&&{flexWrap:t.wrap})}),(function(e){let{theme:t,ownerState:n}=e;const r=(0,N3.kW)({values:n.direction,breakpoints:t.breakpoints.values});return(0,N3.NI)({theme:t},r,(e=>{const t={flexDirection:e};return 0===e.indexOf("column")&&(t["& > .".concat(Hre.item)]={maxWidth:"none"}),t}))}),(function(e){let{theme:t,ownerState:n}=e;const{container:r,rowSpacing:o}=n;let i={};if(r&&0!==o){const e=(0,N3.kW)({values:o,breakpoints:t.breakpoints.values});let n;"object"===typeof e&&(n=Xre({breakpoints:t.breakpoints.values,values:e})),i=(0,N3.NI)({theme:t},e,((e,r)=>{var o;const i=t.spacing(e);return"0px"!==i?{marginTop:"-".concat(Ure(i)),["& > .".concat(Hre.item)]:{paddingTop:Ure(i)}}:null!=(o=n)&&o.includes(r)?{}:{marginTop:0,["& > .".concat(Hre.item)]:{paddingTop:0}}}))}return i}),(function(e){let{theme:t,ownerState:n}=e;const{container:r,columnSpacing:o}=n;let i={};if(r&&0!==o){const e=(0,N3.kW)({values:o,breakpoints:t.breakpoints.values});let n;"object"===typeof e&&(n=Xre({breakpoints:t.breakpoints.values,values:e})),i=(0,N3.NI)({theme:t},e,((e,r)=>{var o;const i=t.spacing(e);return"0px"!==i?{width:"calc(100% + ".concat(Ure(i),")"),marginLeft:"-".concat(Ure(i)),["& > .".concat(Hre.item)]:{paddingLeft:Ure(i)}}:null!=(o=n)&&o.includes(r)?{}:{width:"100%",marginLeft:0,["& > .".concat(Hre.item)]:{paddingLeft:0}}}))}return i}),(function(e){let t,{theme:n,ownerState:r}=e;return n.breakpoints.keys.reduce(((e,o)=>{let i={};if(r[o]&&(t=r[o]),!t)return e;if(!0===t)i={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===t)i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const a=(0,N3.kW)({values:r.columns,breakpoints:n.breakpoints.values}),s="object"===typeof a?a[o]:a;if(void 0===s||null===s)return e;const l="".concat(Math.round(t/s*1e8)/1e6,"%");let c={};if(r.container&&r.item&&0!==r.columnSpacing){const e=n.spacing(r.columnSpacing);if("0px"!==e){const t="calc(".concat(l," + ").concat(Ure(e),")");c={flexBasis:t,maxWidth:t}}}i=(0,qt.A)({flexBasis:l,flexGrow:0,maxWidth:l},c)}return 0===n.breakpoints.values[o]?Object.assign(e,i):e[n.breakpoints.up(o)]=i,e}),{})}));const qre=e=>{const{classes:t,container:n,direction:r,item:o,spacing:i,wrap:a,zeroMinWidth:s,breakpoints:l}=e;let c=[];n&&(c=function(e,t){if(!e||e<=0)return[];if("string"===typeof e&&!Number.isNaN(Number(e))||"number"===typeof e)return["spacing-xs-".concat(String(e))];const n=[];return t.forEach((t=>{const r=e[t];if(Number(r)>0){const e="spacing-".concat(t,"-").concat(String(r));n.push(e)}})),n}(i,l));const u=[];l.forEach((t=>{const n=e[t];n&&u.push("grid-".concat(t,"-").concat(String(n)))}));const d={root:["root",n&&"container",o&&"item",s&&"zeroMinWidth",...c,"row"!==r&&"direction-xs-".concat(String(r)),"wrap"!==a&&"wrap-xs-".concat(String(a)),...u]};return(0,$t.A)(d,Fre,t)},Zre=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiGrid"}),{breakpoints:o}=Qo(),i=(0,E3.A)(n),{className:a,columns:s,columnSpacing:l,component:c="div",container:u=!1,direction:d="row",item:h=!1,rowSpacing:p,spacing:f=0,wrap:g="wrap",zeroMinWidth:m=!1}=i,v=(0,Yt.A)(i,Gre),y=p||f,x=l||f,b=r.useContext(Bre),w=u?s||12:b,S={},_=(0,qt.A)({},v);o.keys.forEach((e=>{null!=v[e]&&(S[e]=v[e],delete _[e])}));const A=(0,qt.A)({},i,{columns:w,container:u,direction:d,item:h,rowSpacing:y,columnSpacing:x,wrap:g,zeroMinWidth:m,spacing:f},S,{breakpoints:o.keys}),k=qre(A);return(0,Sn.jsx)(Bre.Provider,{value:w,children:(0,Sn.jsx)(Yre,(0,qt.A)({ownerState:A,className:(0,Zt.A)(k.root,a),as:c,ref:t},_))})}));const Kre=Zre;function $re(e){return(0,Kt.Ay)("MuiCard",e)}(0,nr.A)("MuiCard",["root"]);const Qre=["className","raised"],Jre=(0,In.Ay)(Gi,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})((()=>({overflow:"hidden"}))),eoe=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiCard"}),{className:r,raised:o=!1}=n,i=(0,Yt.A)(n,Qre),a=(0,qt.A)({},n,{raised:o}),s=(e=>{const{classes:t}=e;return(0,$t.A)({root:["root"]},$re,t)})(a);return(0,Sn.jsx)(Jre,(0,qt.A)({className:(0,Zt.A)(s.root,r),elevation:o?8:void 0,ref:t,ownerState:a},i))})),toe=eoe;function noe(e){return(0,Kt.Ay)("MuiCardHeader",e)}const roe=(0,nr.A)("MuiCardHeader",["root","avatar","action","content","title","subheader"]),ooe=["action","avatar","className","component","disableTypography","subheader","subheaderTypographyProps","title","titleTypographyProps"],ioe=(0,In.Ay)("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:(e,t)=>(0,qt.A)({["& .".concat(roe.title)]:t.title,["& .".concat(roe.subheader)]:t.subheader},t.root)})({display:"flex",alignItems:"center",padding:16}),aoe=(0,In.Ay)("div",{name:"MuiCardHeader",slot:"Avatar",overridesResolver:(e,t)=>t.avatar})({display:"flex",flex:"0 0 auto",marginRight:16}),soe=(0,In.Ay)("div",{name:"MuiCardHeader",slot:"Action",overridesResolver:(e,t)=>t.action})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),loe=(0,In.Ay)("div",{name:"MuiCardHeader",slot:"Content",overridesResolver:(e,t)=>t.content})({flex:"1 1 auto"}),coe=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiCardHeader"}),{action:r,avatar:o,className:i,component:a="div",disableTypography:s=!1,subheader:l,subheaderTypographyProps:c,title:u,titleTypographyProps:d}=n,h=(0,Yt.A)(n,ooe),p=(0,qt.A)({},n,{component:a,disableTypography:s}),f=(e=>{const{classes:t}=e;return(0,$t.A)({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},noe,t)})(p);let g=u;null==g||g.type===Q3||s||(g=(0,Sn.jsx)(Q3,(0,qt.A)({variant:o?"body2":"h5",className:f.title,component:"span",display:"block"},d,{children:g})));let m=l;return null==m||m.type===Q3||s||(m=(0,Sn.jsx)(Q3,(0,qt.A)({variant:o?"body2":"body1",className:f.subheader,color:"text.secondary",component:"span",display:"block"},c,{children:m}))),(0,Sn.jsxs)(ioe,(0,qt.A)({className:(0,Zt.A)(f.root,i),as:a,ref:t,ownerState:p},h,{children:[o&&(0,Sn.jsx)(aoe,{className:f.avatar,ownerState:p,children:o}),(0,Sn.jsxs)(loe,{className:f.content,ownerState:p,children:[g,m]}),r&&(0,Sn.jsx)(soe,{className:f.action,ownerState:p,children:r})]}))})),uoe=coe;function doe(e){return(0,Kt.Ay)("MuiCardContent",e)}(0,nr.A)("MuiCardContent",["root"]);const hoe=["className","component"],poe=(0,In.Ay)("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})((()=>({padding:16,"&:last-child":{paddingBottom:24}}))),foe=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiCardContent"}),{className:r,component:o="div"}=n,i=(0,Yt.A)(n,hoe),a=(0,qt.A)({},n,{component:o}),s=(e=>{const{classes:t}=e;return(0,$t.A)({root:["root"]},doe,t)})(a);return(0,Sn.jsx)(poe,(0,qt.A)({as:o,className:(0,Zt.A)(s.root,r),ownerState:a,ref:t},i))})),goe=foe;async function moe(e,t,n){const r=await gl("set_params",JSON.stringify({taskId:e,params:t}),n);if("err"in r)return!1;const o=fl(r,["d","data"]);return null!=o&&"s"in o&&!0===o.s}async function voe(e,t,n){const r={aid:e,percent:t},o=await gl("clean_position_req",JSON.stringify(r),n);return!("err"in o)&&("s"in o&&!0===o.s)}function yoe(e){const[t]=(0,r.useState)(new AbortController),[n,o]=(0,r.useState)(!0),[i,a]=(0,r.useState)(0);return(0,r.useEffect)((()=>()=>{t.abort()}),[t]),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)(p7,{msg:"\u624b\u52a8\u9996\u6b21\u8d2d\u4e70",callBack:r=>{moe(e.strategyId,{manualFirst:(new Date).getTime(),manualSide:n?1:0},t.signal).then((e=>{r("\u64cd\u4f5c"+(e?"\u6210\u529f":"\u5931\u8d25")+"!")}))},content:(0,Sn.jsxs)("div",{children:[(0,Sn.jsxs)("p",{children:["\u4e70\u5165\u65b9\u5411(",n?"call":"put",")"]}),(0,Sn.jsx)(n3,{checked:n,onChange:e=>o(e.target.checked)})]})}),(0,Sn.jsx)(p7,{msg:"\u6309\u6bd4\u4f8b\u5356\u51fa",callBack:n=>{i>0?voe(e.mainId,Math.min(i,1),t.signal).then((e=>{n("\u64cd\u4f5c"+(e?"\u6210\u529f":"\u5931\u8d25")+"!")})):n("\u6bd4\u4f8b\u5fc5\u987b\u5927\u4e8e0!")},content:(0,Sn.jsx)("div",{children:(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u5356\u51fa\u6bd4\u4f8b:"}),(0,Sn.jsx)(Q8,{value:i,type:"number",handleUpdate:e=>a(e)})]})})})]})}function xoe(e){const[t,n]=(0,r.useState)(!0),[o,i]=(0,r.useState)(0),[a]=(0,r.useState)(new AbortController);(0,r.useEffect)((()=>()=>{a.abort()}),[a]);const s=(e,t)=>{e.then((e=>{t("\u64cd\u4f5c"+(e?"\u6210\u529f":"\u5931\u8d25")+"!")}))};return(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)(p7,{msg:"\u53d6\u6d88\u4eca\u65e5\u64cd\u4f5c",callBack:t=>{s(moe(e.strategyId,{cancelDate:(new Date).getTime()},a.signal),t)}}),(0,Sn.jsx)(p7,{msg:"\u624b\u52a8\u9996\u6b21\u8d2d\u4e70",callBack:n=>{s(moe(e.strategyId,{rebuyTs:(new Date).getTime(),firstBuySide:t?1:0},a.signal),n)},content:(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"is call:"}),(0,Sn.jsx)(n3,{checked:t,onChange:e=>{n((e=>!e))}})]})}),(0,Sn.jsx)(p7,{msg:"\u624b\u52a8\u7ffb\u8f6c",callBack:t=>{s(moe(e.strategyId,{manualSellTs:(new Date).getTime()},a.signal),t)}}),(0,Sn.jsx)(p7,{msg:"\u6309\u6bd4\u4f8b\u5356\u51fa",callBack:t=>{o>0?voe(e.mainId,Math.min(o,1),a.signal).then((e=>{t("\u64cd\u4f5c"+(e?"\u6210\u529f":"\u5931\u8d25")+"!")})):t("\u6bd4\u4f8b\u5fc5\u987b\u5927\u4e8e0!")},content:(0,Sn.jsx)("div",{children:(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u5356\u51fa\u6bd4\u4f8b:"}),(0,Sn.jsx)(Q8,{value:o,type:"number",handleUpdate:e=>i(e)})]})})})]})}const boe="A.QQQ.minute",woe="A.QQQ.second",Soe="rank-QQQ",_oe=0,Aoe="auditor-",koe="vol-QQQ",Coe="energy-QQQ",Moe="A.netflow-QQQ.minute",Ioe="A.I:VIX.minute";function Toe(e){const t=new Map;return e.forEach((e=>{Kl(e.tradeTimestamp);const n="\u7edf\u8ba1\u65f6\u95f4:@@@\u5408\u7ea6:".concat(e.contract,",\u4ef7\u683c:").concat(e.price.toFixed(2),"@@@\u6210\u4ea4\u989d:").concat(e.tradeMoney.toLocaleString(),",\u5747\u503c\u7684").concat(e.alpha.toFixed(2),"\u500d@@@\u80a1\u4ef7:").concat(e.stockPrice.toFixed(3),",\u5206\u6570:").concat(e.score.toFixed(2),",\u6700\u8fd1\u4e00\u5c0f\u65f6\u5206\u6570:").concat(e.hourScore.toFixed(2)),r=t.get(e.tradeTimestamp);null==r?t.set(e.tradeTimestamp,[n]):t.set(e.tradeTimestamp,[...r,n])})),Array.from(t).sort(((e,t)=>e[0]-t[0]))}async function Doe(e){const t=await async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t="".concat(xl,"/task?command=list"),n=await Cl(t,e);if("err"in n)return n;if("d"in n){const e=n.d;if("object"===typeof e&&null!=e&&"data"in e)return e.data.filter((e=>e.startsWith("stock:")))}return{err:"data not found"}}(e);if("err"in t)return t;{const n=await Jl(null,e);return"err"in n?n:[t.filter((e=>e.startsWith("stock:"))),n]}}function joe(e){const{aid:t,startDate:n,endDate:o}=e,i=(0,r.useCallback)((async e=>await rc(t,"sub",n,o,e)),[t,n,o]);return(0,Sn.jsx)(Qc,{getter:i,cvt:t=>{const n=t.d.map((e=>{const t=e.cost>0?e.profit/e.cost:0,n=(100*t).toFixed(2)+"%",r=t>0?"green":"red";return[e.timestamp,["@TITLE"+n,"@Color0"+r+"@@"+n]]}));return(0,Sn.jsx)(h3,{...e,preClose:1,signals:n})}})}function Poe(){return(0,Sn.jsx)(Qc,{getter:Doe,cvt:e=>(0,Sn.jsx)(Loe,{data:e}),debugKey:"StrategyNewPage"})}function Loe(e){const{data:t}=e,[n,o]=(0,r.useState)(null),i=(0,Sn.jsx)(l5,{data:t,update:o});return null==n?i:(0,Sn.jsxs)("div",{children:[i,(0,Sn.jsx)(Roe,{taskId:n[0],account:n[1],isGuest:!1},n[0])]})}function Roe(e){let{taskId:t,account:n,isGuest:o}=e;const[i,a]=(0,r.useState)(null),[s]=(0,r.useState)((()=>{const e=Date.now();return[El(e-90*$2),El(e)]})),[l,c]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{if(null==i){const e=[],t=setInterval((()=>{const t=Date.now(),n=e.length;if(0===n||e[n-1][1]<t){const r=Math.floor(t/$2);if(0===n||r>e[n-1][2]){const n=Yl(t),o=n+234e5;e.push([n-198e5,o+144e5,r])}}if(e.length>0){const[n,r,o]=e[e.length-1];c(t>=n&&t<r)}}),5e3);return()=>{clearInterval(t)}}}),[i]),(0,Sn.jsxs)("main",{children:[(0,Sn.jsx)("div",{style:{width:"100%",aspectRatio:"16/9",marginTop:"2rem",marginBottom:"2rem"},children:(0,Sn.jsx)(joe,{aid:n.rowid+"",startDate:s[0],endDate:s[1],symbol:n.symbol,clickDay:(e,t)=>{a([e,t])}})}),null==i&&l&&(0,Sn.jsx)(Eoe,{taskId:t,account:n,isGuest:o}),null!=i&&(0,Sn.jsx)(Voe,{dt:i,account:n,mainId:t})]})}function Eoe(e){let{taskId:t,account:n,isGuest:o}=e;const[i,a]=(0,r.useState)([]),[s,l]=(0,r.useState)({alpha:10,total:1e5,scoreLow:0,scoreHigh:100,hourScoreLow:0,hourScoreHigh:100,priceHigh:80,isBigTrade:!1}),[c,u]=(0,r.useState)(0),d=(0,r.useContext)(rre),[h,p]=(0,r.useState)([0,100]),[f,g]=(0,r.useState)([]),[m,v]=(0,r.useState)([]),[y,x]=(0,r.useState)([]),[b,w]=(0,r.useState)([]),[S,_]=(0,r.useState)([]),[A,k]=(0,r.useState)(null),[C,M]=(0,r.useState)([]),[I,T]=(0,r.useState)([]),[D,j]=(0,r.useState)([]),[P,L]=(0,r.useState)("trades"),[R,E]=(0,r.useState)([]),[N,O]=(0,r.useState)(null);(0,r.useEffect)((()=>{if(null!=S&&null==N&&S.length>0){const e=S[S.length-1];_l("QQQ",El(e.t-5*$2),El(e.t-1*$2)).then((e=>{if(!("err"in e)){const t=e.results;t.length>0&&O([0,t[t.length-1].c])}}))}}),[S]),(0,r.useEffect)((()=>{const e=new AbortController,t=n.rowid+"-"+n.strategy,r=El();sc(n.symbol,t,"energy",r,r,e.signal,!0).then((e=>{"err"in e||a(e[0])}))}),[c,n,t]);const z="stock:".concat(n.symbol,"-").concat(t,"-").concat(n.strategy);(0,r.useEffect)((()=>{const e=new Map,t=new Map,n=null===d||void 0===d?void 0:d.subscribe(boe,(e=>{_((n=>{const r=n.length>0?n[n.length-1].t:0,o=e.filter((e=>e.t>r));if(o.length>0){const e=o[o.length-1].t,r=t.get(_oe);var i;return(i=null!=r&&r>e?r:e)===e&&t.set(_oe,e),nl([...n,...o],(e=>e.t),((e,t)=>({...e,t:t,o:e.c,h:e.c,l:e.c})),i)}return n}))})),r=null===d||void 0===d?void 0:d.subscribe(Soe,(e=>{w((t=>{const n=t.length>0?t[t.length-1][0]:0,r=e.filter((e=>e.ts>n));return r.length>0?[...t,...r.map((e=>[e.ts,e.rank]))]:t}))})),o=null===d||void 0===d?void 0:d.subscribe(woe,(e=>{const n=e;if(n.length>0){const e=n[n.length-1],r=t.get(_oe),o=6e4*Math.floor(e.t/6e4);(null==r||r<o)&&t.set(_oe,o),k((t=>null!=t&&t.t===o?{...t,c:e.c,h:Math.max(t.h,e.h),l:Math.min(t.l,e.l),v:e.v+t.v}:{...e,t:o}))}})),i=null===d||void 0===d?void 0:d.subscribe(Ioe,(e=>{v((t=>{const n=t.length>0?t[t.length-1].t:0,r=e.filter((e=>e.t>n));return r.length>0?[...t,...r]:t}))})),a=null===d||void 0===d?void 0:d.subscribe(koe,(e=>{x((t=>{const n=t.length>0?t[t.length-1].ts:0,r=e.filter((e=>e.ts>n));return r.length>0?[...t,...r]:t}))})),s=null===d||void 0===d?void 0:d.subscribe(Coe,(t=>{const n=[];t.forEach((t=>{const r="".concat(t.contract,"-").concat(t.tradeTimestamp);e.set(r,t),n.push(1)})),n.length>0&&E(Array.from(e.values()))})),l=null===d||void 0===d?void 0:d.subscribe(Moe,(e=>{g((t=>{const n=t.length>0?t[t.length-1].ts:0,r=e.filter((e=>e.ts>n));return r.length>0?[...t,...r]:t}))}));return()=>{n&&(null===d||void 0===d||d.unsubscribe(boe,n)),a&&(null===d||void 0===d||d.unsubscribe(koe,a)),s&&(null===d||void 0===d||d.unsubscribe(Coe,s)),l&&(null===d||void 0===d||d.unsubscribe(Moe,l)),i&&(null===d||void 0===d||d.unsubscribe(Ioe,i)),o&&(null===d||void 0===d||d.unsubscribe(woe,o)),r&&(null===d||void 0===d||d.unsubscribe(Soe,r))}}),[d]),(0,r.useEffect)((()=>{const e=new Map,t="".concat(Aoe).concat(z),n=new Map,r=null===d||void 0===d?void 0:d.subscribe(t,(t=>{const r=[],o=[],i=[];if(t.forEach((t=>{const n=function(e){if("code"in e){const t=e.code;if(3===t)return e;if(5===t)return e;if(1===t)return e}return null}(t);if(null!=n)if(1===n.code)n.logs.forEach((e=>{o.push([n.ts,e])}));else if(5===n.code){const t="".concat(n.symbol,"-").concat(n.ts);e.has(t)||(e.set(t,n),r.push(n))}else 3===n.code&&i.push(n)})),o.length>0&&M((e=>[...o,...e].sort(((e,t)=>-e[0]+t[0])).slice(0,100))),r.length>0&&(u((e=>e+1)),T((e=>[...e,...r]))),i.length>0){var a=0;i.forEach((e=>{const t=e.group,r=n.get(t);if(null==r){const r=new Map;r.set(e.key,[[e.ts,e.value]]),n.set(t,r),a++}else{const t=r.get(e.key);null==t?(r.set(e.key,[[e.ts,e.value]]),a++):(0===t.length||t[t.length-1][0]<e.ts)&&(r.set(e.key,[...t,[e.ts,e.value]]),a++)}})),a>0&&j(Array.from(n.entries()).sort(((e,t)=>e[0]-t[0])).map((e=>Array.from(e[1].entries()))))}}));return()=>{r&&(null===d||void 0===d||d.unsubscribe(t,r))}}),[d,z]);const B=null!=A?function(e,t){if(0===e.length)return[t];{const n=e[e.length-1];return n.t===t.t?[...e.slice(0,e.length-1),t]:t.t<n.t?e:[...e,t]}}(S,A):S,F=B.length>0?B[B.length-1].t:0,V=D.map((e=>e.map((e=>[e[0],nl(e[1],(e=>e[0]),((e,t)=>[t,e[1]]),F).map((e=>e[1]))])))),W=nl(b,(e=>e[0]),((e,t)=>[t,e[1]]),F).map((e=>e[1])),H=nl(f,(e=>e.ts),((e,t)=>({...e,ts:t})),F),G=nl(y,(e=>e.ts),((e,t)=>({...e,ts:t})),F),U=nl(m,(e=>e.t),((e,t)=>({...e,t:t,o:e.c,h:e.c,l:e.c})),F),X=m3(s,El(F),R),Y=Toe(X),q=(i.length>0?Xs(Hl(i).map((e=>[e[0],e[1]])),Y):Y).sort(((e,t)=>e[0]-t[0]));return(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("h1",{children:"Strategy New"}),!o&&(0,Sn.jsx)(c5,{}),(0,Sn.jsx)(f3,{filter:s,updateCB:l}),(0,Sn.jsx)("div",{style:{width:"100%",aspectRatio:"16/9"},children:(0,Sn.jsx)(l3,{symbol:"I:VIX",signals:[],isDay:!0,historyData:U,zoomRange:h,setZoomRange:p})}),(0,Sn.jsx)("div",{style:{width:"100%",aspectRatio:"1/1.3"},children:(0,Sn.jsx)(I9,{symbol:"QQQ",preClose:null!=N?N[1]:void 0,signals:q,isDay:!0,zoomRange:h,setZoomRange:p,historyData:B,extras:x9(B,X),extraLines:[[["rank",W]],[["netflow volume",H.map((e=>e.value))]],[["netflow money",H.map((e=>e.money))]],[["call vol",G.map((e=>e.callVol))],["put vol",G.map((e=>e.putVol))]],...V]})}),!o&&n.strategy.search("energy buy")>-1&&(0,Sn.jsx)(xoe,{strategyId:z,mainId:parseInt(t)||0}),!o&&(n.strategy.search("EventBack buy")>-1||n.strategy.search("IronCondor buy")>-1)&&(0,Sn.jsx)(yoe,{strategyId:z,mainId:parseInt(t)||0}),!o&&(0,Sn.jsx)(Noe,{taskId:"".concat(t,"-").concat(n.strategy),version:c}),(0,Sn.jsx)("div",{style:{marginTop:"3rem"},children:(0,Sn.jsx)(g8,{addPercent:!0,data:Nl(i),aggs:[]})},"detail"),(0,Sn.jsx)(B8,{children:(0,Sn.jsxs)(Pre,{value:P,onChange:(e,t)=>{L(t)},children:[(0,Sn.jsx)(zre,{label:"\u4ea4\u6613\u8bb0\u5f55",value:"trades"}),(0,Sn.jsx)(zre,{label:"\u65e5\u5fd7",value:"logs"})]})}),"trades"===P&&(0,Sn.jsx)(Kre,{container:!0,spacing:2,children:I.map((e=>(0,Sn.jsx)(Kre,{item:!0,xs:4,children:(0,Sn.jsxs)(toe,{children:[(0,Sn.jsx)(uoe,{title:e.isBuy?"\u4e70\u5165":"\u5356\u51fa"}),(0,Sn.jsxs)(goe,{children:[(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u65f6\u95f4:"}),Kl(e.ts)]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u5408\u7ea6:"}),e.symbol]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u4ef7\u683c:"}),e.price]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u6570\u91cf:"}),e.volume]})]})]})})))}),"logs"===P&&(0,Sn.jsx)("div",{children:(0,Sn.jsx)("pre",{children:C.map((e=>(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsxs)("code",{children:[" ",Kl(e[0])+"    "+e[1]]}),(0,Sn.jsx)("br",{})]})))})})]})}function Noe(e){let{taskId:t,version:n}=e;const o=(0,r.useCallback)((async e=>{const n=await Ac(e);return"err"in n?n:n.filter((e=>e.startsWith("option:")&&e.endsWith(t)))}),[t,n]);return(0,Sn.jsx)(Qc,{getter:o,cvt:e=>(0,Sn.jsx)(Sn.Fragment,{children:e.map((e=>(0,Sn.jsx)(Foe,{taskId:e,version:n})))})})}function Ooe(e){let{runner:t,symbol:n}=e;const[o,i]=(0,r.useState)(0);return(0,Sn.jsx)(p7,{msg:"\u6309\u6bd4\u4f8b\u5356\u51fa",content:(0,Sn.jsxs)("div",{children:["\u8bf7\u8f93\u5165\u5356\u51fa\u6bd4\u4f8b:",(0,Sn.jsx)("input",{type:"number",value:o,onChange:e=>{i(Number(e.target.value))}})]}),callBack:e=>{o>1e-4?ml(t,n,o).then((t=>{e(t?"\u5356\u51fa\u6210\u529f":"\u5356\u51fa\u5931\u8d25")})).catch((t=>{e("\u5356\u51fa\u5931\u8d25: ".concat(t))})):e("\u8bf7\u8f93\u5165\u5356\u51fa\u6bd4\u4f8b\u5927\u4e8e0")}})}function zoe(e,t,n){if(null!=n){const r=(e?1:-1)*(n-t)/t;return["".concat(t.toFixed(3),"(").concat(n.toFixed(3),"|").concat((100*r).toFixed(3),"%)"),r>0]}return[t.toFixed(3),null]}function Boe(e){let{position:t,runner:n}=e;const[o,i]=(0,r.useState)({}),a=(0,r.useContext)(rre);return(0,r.useEffect)((()=>{const e=t.map((e=>{const t="A.".concat(e.sym,".second");return[t,null===a||void 0===a?void 0:a.subscribe(t,(t=>{if(t.length>0){const n=t[t.length-1];i((t=>({...t,[e.sym]:n.c})))}}))]}));return()=>{e.forEach((e=>{let[t,n]=e;null!=n&&(null===a||void 0===a||a.unsubscribe(t,n))}))}}),[a,n,t]),(0,Sn.jsxs)(j4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,Sn.jsx)("thead",{children:(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:"\u5408\u7ea6"},"symbol"),(0,Sn.jsx)("td",{children:"\u4e70\u5165\u4ef7"},"cost"),(0,Sn.jsx)("td",{children:"\u6570\u91cf"},"total"),(0,Sn.jsx)("td",{children:"\u51bb\u7ed3\u6570\u91cf"},"frozen"),(0,Sn.jsx)("td",{children:"\u65e5\u671f"},"date"),(0,Sn.jsx)("td",{children:"\u64cd\u4f5c"},"op")]})}),(0,Sn.jsx)("tbody",{children:t.map((e=>{return(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:e.sym}),(t=zoe(e.long,e.buyPrice,e.sym in o?o[e.sym]:null),null!=t[1]?(0,Sn.jsx)("td",{style:{color:t[1]?"green":"red"},children:t[0]}):(0,Sn.jsx)("td",{children:t[0]})),(0,Sn.jsx)("td",{children:e.qty}),(0,Sn.jsx)("td",{children:e.freezeQty}),(0,Sn.jsx)("td",{children:Kl(e.createTime)}),(0,Sn.jsx)("td",{children:(0,Sn.jsx)(Ooe,{runner:n,symbol:e.sym})})]});var t}))})]})}function Foe(e){let{taskId:t,version:n}=e;const o=(0,r.useCallback)((async e=>{const n=await async function(e,t){const n={taskId:e};return await gl("get_params",JSON.stringify(n),t)}(t,e);if("err"in n)return n;{const e=fl(n,["d","data","position"]);if(null!=e)return e}return{err:"no position found"}}),[t,n]);return(0,Sn.jsx)(Qc,{getter:o,cvt:e=>(0,Sn.jsx)(Boe,{position:e,runner:t})})}function Voe(e){let{dt:t,account:n,mainId:o}=e;const[i,a]=(0,r.useState)([0,100]),[s,l]=(0,r.useState)({alpha:10,total:1e5,scoreLow:0,scoreHigh:100,hourScoreLow:0,hourScoreHigh:100,priceHigh:80,isBigTrade:!1}),[c,u]=(0,r.useState)(""),d=(0,r.useCallback)((async e=>{const r=wc(t[0],e),i=async function(e,t,n,r,o){const i=(e>"2023-03-21"?r.rowid:r.account)+"-"+n,a=await sc(t,i,"energy",e,e,o,!0);if("err"in a)return a;{const n=await _l(t,e,e,1,"minute",o);return"err"in n?n:[a[0],a[1],n.results,n.prevClose||null]}}(t[0],n.symbol,n.strategy,n,e),a="stock:".concat(n.symbol,"-").concat(o,"-").concat(n.strategy),s=Tl(t[0],a,e),l=async function(e,t){const n=await Cl("".concat(xl,"/historyDataRT?key=netflow-QQQ&date=").concat(e),t);return"err"in n?[]:n}(t[0],e),c=async function(e,t){const n=await Cl("".concat(xl,"/historyDataRT?key=rank-QQQ&date=").concat(e),t);return"err"in n?[]:n}(t[0],e),u=async function(e,t){const n=await Cl("".concat(xl,"/historyDataRT?key=vol-QQQ&date=").concat(e),t);return"err"in n?[]:n}(t[0],e),d=async function(e,t){const n=await Cl("".concat(xl,"/historyDataRT?key=energy-QQQ&date=").concat(e),t);return"err"in n?[]:n}(t[0],e),[h,p,f,g,m,v,y]=await Promise.all([i,s,r,l,c,u,d]);return"err"in h?h:[h[0],h[1],rl(h[2],!1),h[3],"err"in p?[]:p,"err"in f?[]:f,g,m,v,y]}),[t,n,o]);return(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsx)(f3,{filter:s,updateCB:l}),(0,Sn.jsx)("div",{style:{width:"100%",aspectRatio:"16/9"},children:(0,Sn.jsx)(u3,{symbol:"I:VIX",startDate:t[0],endDate:t[0],signals:[],zoomRange:i,setZoomRange:a,load:c===t[0]})}),(0,Sn.jsx)(Qc,{onLoad:()=>u(t[0]),getter:d,cvt:e=>{const r=nl(e[6],(e=>e.ts),((e,t)=>({...e,ts:t}))),o=nl(e[7],(e=>e.ts),((e,t)=>({...e,ts:t}))),l=nl(e[8],(e=>e.ts),((e,t)=>({...e,ts:t}))),c=e[9],u=m3(s,t[0],c),d=Toe(u),h=(e[0].length>0?Xs(Hl(e[0]).map((e=>[e[0],e[1]])),d):d).sort(((e,t)=>e[0]-t[0]));return(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsx)("div",{style:{width:"100%",aspectRatio:"1/1.3"},children:(0,Sn.jsx)(I9,{symbol:n.symbol,preClose:e[3],signals:h,isDay:!0,zoomRange:i,setZoomRange:a,historyData:e[2],extras:x9(e[2],u),extraLines:[[["netflow volume",r.map((e=>e.value))]],[["netflow money",r.map((e=>e.money))]],[["rank",o.map((e=>e.rank))]],[["call vol",l.map((e=>e.callVol))],["put vol",l.map((e=>e.putVol))]]]})}),(0,Sn.jsx)("div",{style:{marginTop:"3rem"},children:(0,Sn.jsx)(g8,{addPercent:!0,data:Nl(e[0]),aggs:[]})},"detail")]})}})]})}function Woe(){const e="energy buy";return(0,Sn.jsx)("main",{style:{flex:1},className:"MainPage",children:(0,Sn.jsx)("div",{style:{flex:1,width:"100%"},children:(0,Sn.jsx)(Roe,{taskId:"stock:QQQ-".concat("95","-").concat(e),isGuest:!0,account:{rowid:113,account:"guest",symbol:"QQQ",strategy:e,total:1,betPercent:.01,desc:"guest account",freeze:0,update_time:0}})})})}function Hoe(e,t,n){const r=e.length;var o=t;const i=e.substring(2,r-15),a="C"===e[r-9],s=parseInt(e.substring(r-8))/1e3;if(i.startsWith("GOOG")){El(n)>="2022-07-18"&&s>1e3&&(o=20*t)}return a?o-s:s-o}function Goe(e){const[t,n]=(0,r.useState)((()=>null)),{symbol:o,startDate:i,points:a}=e,s=r.createRef();return(0,r.useEffect)((()=>{if(null==t)n("loading"),Dl(o,i).then((e=>{"err"in e||n(e)}));else if("loading"!==t&&"stock"in t){const e=t.stock.prevClose,n=t.stock.results.map((t=>[t.t,null!=e&&e>0?(100*(t.c/e-1)).toFixed(3)+"%":"0%"])),r=t.stock.results.map((e=>[e.t,Hoe(o,e.c,e.t)])),i=t.option.results.map((e=>[e.t,e.c])),l=t.cacheOption.results.map((e=>[e.t,e.c])),[c,[u,d,h,p]]=Pl(r,i,l,n),f=[];a.forEach((e=>{const t=function(e,t){for(var n=1;n<t.length;n++)if(t[n-1][0]<e&&e<=t[n][0])return[t[n][0],t[n][1]];return null}(e[0],i);null!=t&&f.push({name:"\u4e70\u5356",value:e[1]?"\u5356":"\u4e70",coord:[Ml.format(new Date(t[0])),t[1]],itemStyle:{color:e[1]?"gray":"black"}})}));const g=L2(c.map((e=>Ml.format(new Date(e)))),[[["stock(\u56fe\u5f62\u7528\u51c0\u503c,".concat(o,")"),u],["option",d,f],["interpolate",h],["increase",p,!0]]]);if(null!=s.current){ZT(s.current).setOption(g)}}return()=>{console.log("debug state,exit effect")}}),[o,i,t,a]),null==t||"loading"===t?(0,Sn.jsx)($c,{}):(0,Sn.jsx)("div",{ref:s,style:{width:"100%",aspectRatio:"4/3"}})}function Uoe(e){const{date:t,points:n,symbol:o}=e,i=(0,r.useCallback)((async e=>{const n=await _l(o,t,t,1,"minute",e);return"err"in n?n:rl(n.results,!1)}),[o,t]);return(0,Sn.jsx)(Qc,{getter:i,cvt:e=>{const t=new Map;return n.forEach((e=>{const n=6e4*Math.floor(e[0]/6e4),r=t.get(n),o=e[1]?"@Color0red@@\u5356":"@Color0green@@\u4e70";null!=r?r.push(o):t.set(n,[o])})),(0,Sn.jsx)("div",{style:{width:"100%",aspectRatio:"16/9"},children:(0,Sn.jsx)(l3,{symbol:o,historyData:e,isDay:!0,signals:Array.from(t.entries()).map((e=>[e[0],e[1]]))})})}})}function Xoe(){let e=rt(),[t]=Xt(),n=t.has("points")?JSON.parse(t.get("points")):[];return(0,Sn.jsxs)("main",{style:{padding:"1rem 0"},children:[(0,Sn.jsx)("h2",{children:"Option"}),e.contract.startsWith("O:")?(0,Sn.jsx)(Goe,{symbol:e.contract,startDate:e.startDate,points:n}):(0,Sn.jsx)(Uoe,{symbol:e.contract,date:e.startDate,points:n})]})}function Yoe(){let e=rt();const[t]=Xt(),n=t.get("start"),r=t.get("end"),o=t.get("unit");var i,a,s;if(null!=n&&null!=r)i=n,a=r;else{const e=(new Date).getTime();i=El(e-5184e6),a=El(e)}return s=i===a?"minute"===o||"second"===o?o:"minute":"day",(0,Sn.jsxs)("main",{style:{padding:"1rem 0"},children:[(0,Sn.jsxs)("h2",{children:["Stock: ",e.stockId,",",i,"-",a,",unit:",s]}),(0,Sn.jsx)("div",{style:{width:"100%",aspectRatio:"16/9"},children:(0,Sn.jsx)(c3,{symbol:e.stockId,startDate:i,endDate:a,signals:[],unit2:s})})]})}function qoe(){let e=rt();return(0,Sn.jsx)("div",{style:{width:"100%",aspectRatio:"1/1"},children:(0,Sn.jsx)(G2,{symbol:e.symbol,startDate:e.date,endDate:e.date})})}function Zoe(e){return Kl(e)+(Math.floor(e)%1e3/1e3).toFixed(3).substring(1)}async function Koe(e,t){const n=await async function(e,t){const n=new URLSearchParams;n.set("command","bids"),n.set("oid",e);const r="".concat(xl,"/position_new?").concat(n.toString()),o=await Cl(r,t);if("err"in o)return o;if("d"in o){const e=o;return[e.d,e.od]}return{err:"fail to get data by key:d"}}(e,t);if("err"in n)return n;{const i=await tc(null,e,t);if("err"in i)return i;{const e=n[1];var r,o;if(n[0].length>0){const e=n[0];r=(e[0].timestamp-6e5).toFixed(),o=(e[e.length-1].timestamp+6e5).toFixed()}else r=(e.createTime-6e5).toFixed(),o=(e.createTime+6e5).toFixed();const a=await _l(e.symbol,r,o,1,"second",t);return"err"in a?a:[n[0],n[1],i.sort(((e,t)=>e.timestamp-t.timestamp)),a.results]}}}function $oe(e){const{trades:t}=e;return(0,Sn.jsxs)(j4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,Sn.jsx)("thead",{children:(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:"Trade Id"},"tid"),(0,Sn.jsx)("td",{children:"Order Id"},"oid"),(0,Sn.jsx)("td",{children:"Runner"},"runner"),(0,Sn.jsx)("td",{children:"Contract"},"symbol"),(0,Sn.jsx)("td",{children:"Side"},"side"),(0,Sn.jsx)("td",{children:"Price"},"price"),(0,Sn.jsx)("td",{children:"Buy Price"},"bprice"),(0,Sn.jsx)("td",{children:"QTY"},"qty"),(0,Sn.jsx)("td",{children:"Time"},"time")]})}),(0,Sn.jsx)("tbody",{children:t.map((e=>{const t=e.runner.split(":");var n="";return t.length>3&&(n=t[t.length-2]+":"+t[t.length-3]),(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:e.tradeID},"tid"),(0,Sn.jsx)("td",{children:e.orderId},"oid"),(0,Sn.jsx)("td",{children:n},"runner"),(0,Sn.jsx)("td",{children:e.symbol},"symbol"),(0,Sn.jsx)("td",{children:1===e.side?"Buy":"Sell"},"side"),(0,Sn.jsx)("td",{children:e.price.toLocaleString()},"price"),(0,Sn.jsx)("td",{children:e.buyPrice.toLocaleString()},"bprice"),(0,Sn.jsx)("td",{children:e.qty},"qty"),(0,Sn.jsx)("td",{children:Zoe(e.timestamp)},"time")]})}))})]})}function Qoe(e){const{data:[t,n,o,i]}=e,a=r.createRef();return(0,r.useEffect)((()=>{if(null!=a.current){const r=ZT(a.current),s=t.map((e=>[e.timestamp,e.ask])),l=t.map((e=>[e.timestamp,e.bid<.001?e.ask:e.bid])),c=o.map((e=>[e.timestamp,e.price])),u=t.map((e=>[e.timestamp,e.price])),d=Pl(i.map((e=>[e.t,e])),s,l,c,u,null!=n.signal&&t.length>0?[[n.signal.timestamp,t[0].price]]:[]),h=[],p=d[0],f=d[0].map((e=>Zoe(e)));var e=null;d[1][0].forEach(((t,n)=>{if("string"===typeof t){if(null!=e){const t=e.c;h.push({t:p[n],o:t,c:t,h:t,l:t,v:0,vw:t})}}else h.push(t),e=t}));const g=[];d[1][4].forEach(((e,t)=>{"string"!==typeof e&&g.push({name:"price",value:"price",coord:[f[t],e],itemStyle:{color:"red"}})}));const m=[];d[1][3].forEach(((e,t)=>{"string"!==typeof e&&m.push({name:"trade",value:"trade",coord:[f[t],e],itemStyle:{color:"purple"}})}));const v=[];d[1][5].forEach(((e,t)=>{"string"!==typeof e&&v.push({name:"signal",value:"signal",coord:[f[t],e],itemStyle:{color:"yellow"}})}));const y=L2(f,[],{y1:h.map((e=>[e.o,e.c,e.l,e.h])),kCandleLines:[["ask",d[1][1],{lineStyle:{width:3}}],["bid",d[1][2],{lineStyle:{width:3}}],["trade",d[1][3],{lineStyle:{width:3},markPoint:{data:m}}],["price",d[1][4],{markPoint:{data:g}}],["signal",d[1][5],{markPoint:{data:v}}]],y2:[["volume",h.map((e=>e.v))]]},!1,null,!1);r.setOption(y)}}),[t,o,i,n]),(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsx)("div",{ref:a,style:{width:"100%",aspectRatio:"4/3"}}),(0,Sn.jsx)($oe,{trades:o})]})}function Joe(){const e=rt(),t=(0,r.useCallback)((async t=>await Koe(e.orderId,t)),[e.orderId]);return(0,Sn.jsx)(Qc,{getter:t,cvt:e=>(0,Sn.jsx)(Qoe,{data:e})})}const eie=["FILLED","NEW","PARTIALLY_FILLED","CANCELED","ERROR"];function tie(){const[e,t]=(0,r.useState)(1),[n,o]=(0,r.useState)(0),i=El((new Date).getTime()),[a,s]=(0,r.useState)(i),[l,c]=(0,r.useState)(i),[u,d]=(0,r.useState)(null),h=(0,r.useCallback)((async t=>await async function(e,t,n,r,o){const i=new URLSearchParams;i.set("command","orders"),i.set("startDate",e),i.set("endDate",t),i.set("page",n+""),null!=r&&i.set("status",r);const a="".concat(xl,"/position_new?").concat(i.toString()),s=await Cl(a,o);if("err"in s)return s;if("d"in s){const e=s;return[e.d,Math.ceil(e.t/40)]}return{err:"fail to get data by key:d"}}(a,l,e,u,t)),[e,a,l,u]);return(0,Sn.jsxs)("main",{children:[(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u5f00\u59cb\u65e5\u671f"}),(0,Sn.jsx)("input",{value:a,onChange:e=>{const t=e.target.value;s(t),t>l&&c(t)},type:"date"}),(0,Sn.jsx)("span",{children:"\u7ed3\u675f\u65e5\u671f"}),(0,Sn.jsx)("input",{value:l,onChange:e=>{const t=e.target.value;c(t),t<a&&s(t)},type:"date"}),(0,Sn.jsx)("span",{children:"\u72b6\u6001"}),(0,Sn.jsxs)("select",{value:u||"all",onChange:e=>{const n=e.target.value;d("all"===n?null:n),t(1)},children:[(0,Sn.jsx)("option",{value:"all",children:"all"},"all"),eie.map((e=>(0,Sn.jsx)("option",{value:e,children:e},e)))]})]}),(0,Sn.jsx)(Qc,{getter:h,cvt:n=>(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsx)("div",{children:(0,Sn.jsx)(mee,{count:n[1],page:e,onChange:(e,n)=>{t(n)}})}),(0,Sn.jsxs)(j4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,Sn.jsx)("thead",{children:(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:"Account"},"aid"),(0,Sn.jsx)("td",{children:"Order Id"},"oid"),(0,Sn.jsx)("td",{children:"Symbol"},"symbol"),(0,Sn.jsx)("td",{children:"Runner"},"runner"),(0,Sn.jsx)("td",{children:"Type"},"type"),(0,Sn.jsx)("td",{children:"Side"},"side"),(0,Sn.jsx)("td",{children:"Price"},"price"),(0,Sn.jsx)("td",{children:"QTY"},"qty"),(0,Sn.jsx)("td",{children:"Trade QTY"},"trade_qty"),(0,Sn.jsx)("td",{children:"TIF"},"tif"),(0,Sn.jsx)("td",{children:"Status|Delay"},"status"),(0,Sn.jsx)("td",{children:"Time"},"time"),(0,Sn.jsx)("td",{children:"Message"},"message")]})}),(0,Sn.jsx)("tbody",{children:n[0].map((e=>{const t=e.runner.split(":");var n=null;return null!=e.signal&&(n=e.updateTime-e.signal.timestamp),(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:e.accountId},"aid"),(0,Sn.jsx)("td",{children:(0,Sn.jsx)(Wt,{to:"/order_inspect/".concat(e.id),children:e.id})},"oid"),(0,Sn.jsx)("td",{children:e.symbol},"symbol"),(0,Sn.jsx)("td",{children:t[t.length-1]},"runner"),(0,Sn.jsx)("td",{children:e.type},"type"),(0,Sn.jsx)("td",{children:1===e.side?"Buy":"Sell"},"side"),(0,Sn.jsx)("td",{children:e.price},"price"),(0,Sn.jsx)("td",{children:e.qty},"qty"),(0,Sn.jsx)("td",{children:e.tradeQty},"trade_qty"),(0,Sn.jsx)("td",{children:e.tif},"tif"),(0,Sn.jsxs)("td",{children:[(0,Sn.jsx)("p",{style:{background:"FILLED"!==e.status?"yellow":"transparent",color:"FILLED"!==e.status?"black":"white"},children:e.status}),null!=n?(0,Sn.jsx)("p",{style:{color:n>1e4?"red":n>5e3?"yellow":"green"},children:(n/1e3).toLocaleString()}):""]},"status"),(0,Sn.jsx)("td",{children:Kl(e.createTime)},"time"),(0,Sn.jsx)("td",{children:e.errorMsg},"message")]})}))})]})]})})]})}const nie=["second","minute","hour","day"];function rie(e){switch(e){case"second":return $2;case"minute":return 2*$2;case"hour":return 10*$2;case"day":return 200*$2}}function oie(){const[e,t]=(0,r.useState)(null),[n,o]=(0,r.useState)("minute"),i=(new Date).getTime(),[a,s]=(0,r.useState)([i,i+$2]),[l,c]=(0,r.useState)(0),u=(0,r.useCallback)((async t=>{var r;return null!=e?(r="day"===n?[Kl(a[0]).substring(0,10),Kl(a[1]).substring(0,10)]:[a[0].toFixed(),a[1].toFixed()],await _l(e,r[0],r[1],1,n,t)):{err:"symbol is empty"}}),[l]);return(0,Sn.jsxs)("div",{children:[(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"Symbol:"}),(0,Sn.jsx)("input",{type:"text",maxLength:30,value:e||"",onChange:e=>{t(e.target.value)}}),(0,Sn.jsx)("span",{children:"Unit:"}),(0,Sn.jsx)("select",{value:n,onChange:e=>{const t=e.target.value;o(t);const n=rie(t);s((e=>[e[0],Math.min(e[0]+n,e[1])]))},children:nie.map((e=>(0,Sn.jsx)("option",{value:e,children:e},e)))}),"day"!==n?(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsx)("span",{children:"StartTime:"}),(0,Sn.jsx)("input",{type:"datetime-local",value:Kl(a[0]).substring(0,16),onChange:e=>{const t=hl(e.target.value+":00");null!=t&&s((e=>{var r=rie(n);return[t,Math.max(Math.min(t+r,e[1]),t)]}))}}),(0,Sn.jsx)("span",{children:"EndTime:"}),(0,Sn.jsx)("input",{type:"datetime-local",value:Kl(a[1]).substring(0,16),onChange:e=>{const t=hl(e.target.value+":00");null!=t&&s((e=>{var r=rie(n);return[Math.min(t,Math.max(t-r,e[0])),t]}))}})]}):(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsx)("span",{children:"StartTime:"}),(0,Sn.jsx)("input",{type:"date",value:Kl(a[0]).substring(0,10),onChange:e=>{const t=hl(e.target.value+" 00:00:00");null!=t&&s((e=>{var r=rie(n);return[t,Math.max(Math.min(t+r,e[1]),t)]}))}}),(0,Sn.jsx)("span",{children:"EndTime:"}),(0,Sn.jsx)("input",{type:"date",value:Kl(a[1]).substring(0,10),onChange:e=>{const t=hl(e.target.value+" 00:00:00");null!=t&&s((e=>{var r=rie(n);return[Math.min(t,Math.max(t-r,e[0])),t]}))}})]}),(0,Sn.jsx)("button",{onClick:()=>{c((e=>e+1))},children:"Ok"})]}),null!=e&&(0,Sn.jsx)("div",{style:{width:"100%",aspectRatio:"4/3"},children:(0,Sn.jsx)(Qc,{getter:u,cvt:t=>(0,Sn.jsx)(l3,{historyData:t.results,isDay:"day"!==n,signals:[],symbol:e||"empty"})})})]})}function iie(e){return(0,Kt.Ay)("MuiTable",e)}(0,nr.A)("MuiTable",["root","stickyHeader"]);const aie=["className","component","padding","size","stickyHeader"],sie=(0,In.Ay)("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.stickyHeader&&t.stickyHeader]}})((e=>{let{theme:t,ownerState:n}=e;return(0,qt.A)({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":(0,qt.A)({},t.typography.body2,{padding:t.spacing(2),color:(t.vars||t).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},n.stickyHeader&&{borderCollapse:"separate"})})),lie="table",cie=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiTable"}),{className:o,component:i=lie,padding:a="normal",size:s="medium",stickyHeader:l=!1}=n,c=(0,Yt.A)(n,aie),u=(0,qt.A)({},n,{component:i,padding:a,size:s,stickyHeader:l}),d=(e=>{const{classes:t,stickyHeader:n}=e,r={root:["root",n&&"stickyHeader"]};return(0,$t.A)(r,iie,t)})(u),h=r.useMemo((()=>({padding:a,size:s,stickyHeader:l})),[a,s,l]);return(0,Sn.jsx)(Xee.Provider,{value:h,children:(0,Sn.jsx)(sie,(0,qt.A)({as:i,role:i===lie?null:"table",ref:t,className:(0,Zt.A)(d.root,o),ownerState:u},c))})})),uie=cie;function die(e){return(0,Kt.Ay)("MuiToolbar",e)}(0,nr.A)("MuiToolbar",["root","gutters","regular","dense"]);const hie=["className","component","disableGutters","variant"],pie=(0,In.Ay)("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,qt.A)({position:"relative",display:"flex",alignItems:"center"},!n.disableGutters&&{paddingLeft:t.spacing(2),paddingRight:t.spacing(2),[t.breakpoints.up("sm")]:{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}},"dense"===n.variant&&{minHeight:48})}),(e=>{let{theme:t,ownerState:n}=e;return"regular"===n.variant&&t.mixins.toolbar})),fie=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiToolbar"}),{className:r,component:o="div",disableGutters:i=!1,variant:a="regular"}=n,s=(0,Yt.A)(n,hie),l=(0,qt.A)({},n,{component:o,disableGutters:i,variant:a}),c=(e=>{const{classes:t,disableGutters:n,variant:r}=e,o={root:["root",!n&&"gutters",r]};return(0,$t.A)(o,die,t)})(l);return(0,Sn.jsx)(pie,(0,qt.A)({as:o,className:(0,Zt.A)(c.root,r),ref:t,ownerState:l},s))})),gie=fie,mie=["backIconButtonProps","count","disabled","getItemAriaLabel","nextIconButtonProps","onPageChange","page","rowsPerPage","showFirstButton","showLastButton","slots","slotProps"],vie=r.forwardRef((function(e,t){var n,r,o,i,a,s,l,c;const{backIconButtonProps:u,count:d,disabled:h=!1,getItemAriaLabel:p,nextIconButtonProps:f,onPageChange:g,page:m,rowsPerPage:v,showFirstButton:y,showLastButton:x,slots:b={},slotProps:w={}}=e,S=(0,Yt.A)(e,mie),_=fo(),A=null!=(n=b.firstButton)?n:V5,k=null!=(r=b.lastButton)?r:V5,C=null!=(o=b.nextButton)?o:V5,M=null!=(i=b.previousButton)?i:V5,I=null!=(a=b.firstButtonIcon)?a:eee,T=null!=(s=b.lastButtonIcon)?s:tee,D=null!=(l=b.nextButtonIcon)?l:hre,j=null!=(c=b.previousButtonIcon)?c:dre,P=_?k:A,L=_?C:M,R=_?M:C,E=_?A:k,N=_?w.lastButton:w.firstButton,O=_?w.nextButton:w.previousButton,z=_?w.previousButton:w.nextButton,B=_?w.firstButton:w.lastButton;return(0,Sn.jsxs)("div",(0,qt.A)({ref:t},S,{children:[y&&(0,Sn.jsx)(P,(0,qt.A)({onClick:e=>{g(e,0)},disabled:h||0===m,"aria-label":p("first",m),title:p("first",m)},N,{children:_?(0,Sn.jsx)(T,(0,qt.A)({},w.lastButtonIcon)):(0,Sn.jsx)(I,(0,qt.A)({},w.firstButtonIcon))})),(0,Sn.jsx)(L,(0,qt.A)({onClick:e=>{g(e,m-1)},disabled:h||0===m,color:"inherit","aria-label":p("previous",m),title:p("previous",m)},null!=O?O:u,{children:_?(0,Sn.jsx)(D,(0,qt.A)({},w.nextButtonIcon)):(0,Sn.jsx)(j,(0,qt.A)({},w.previousButtonIcon))})),(0,Sn.jsx)(R,(0,qt.A)({onClick:e=>{g(e,m+1)},disabled:h||-1!==d&&m>=Math.ceil(d/v)-1,color:"inherit","aria-label":p("next",m),title:p("next",m)},null!=z?z:f,{children:_?(0,Sn.jsx)(j,(0,qt.A)({},w.previousButtonIcon)):(0,Sn.jsx)(D,(0,qt.A)({},w.nextButtonIcon))})),x&&(0,Sn.jsx)(E,(0,qt.A)({onClick:e=>{g(e,Math.max(0,Math.ceil(d/v)-1))},disabled:h||m>=Math.ceil(d/v)-1,"aria-label":p("last",m),title:p("last",m)},B,{children:_?(0,Sn.jsx)(I,(0,qt.A)({},w.firstButtonIcon)):(0,Sn.jsx)(T,(0,qt.A)({},w.lastButtonIcon))}))]}))})),yie=vie;function xie(e){return(0,Kt.Ay)("MuiTablePagination",e)}const bie=(0,nr.A)("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]);var wie;const Sie=["ActionsComponent","backIconButtonProps","className","colSpan","component","count","disabled","getItemAriaLabel","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onPageChange","onRowsPerPageChange","page","rowsPerPage","rowsPerPageOptions","SelectProps","showFirstButton","showLastButton","slotProps","slots"],_ie=(0,In.Ay)(Qee,{name:"MuiTablePagination",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t}=e;return{overflow:"auto",color:(t.vars||t).palette.text.primary,fontSize:t.typography.pxToRem(14),"&:last-child":{padding:0}}})),Aie=(0,In.Ay)(gie,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(e,t)=>(0,qt.A)({["& .".concat(bie.actions)]:t.actions},t.toolbar)})((e=>{let{theme:t}=e;return{minHeight:52,paddingRight:2,["".concat(t.breakpoints.up("xs")," and (orientation: landscape)")]:{minHeight:52},[t.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},["& .".concat(bie.actions)]:{flexShrink:0,marginLeft:20}}})),kie=(0,In.Ay)("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})({flex:"1 1 100%"}),Cie=(0,In.Ay)("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:(e,t)=>t.selectLabel})((e=>{let{theme:t}=e;return(0,qt.A)({},t.typography.body2,{flexShrink:0})})),Mie=(0,In.Ay)(Ga,{name:"MuiTablePagination",slot:"Select",overridesResolver:(e,t)=>(0,qt.A)({["& .".concat(bie.selectIcon)]:t.selectIcon,["& .".concat(bie.select)]:t.select},t.input,t.selectRoot)})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,["& .".concat(bie.select)]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),Iie=(0,In.Ay)(q8,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:(e,t)=>t.menuItem})({}),Tie=(0,In.Ay)("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:(e,t)=>t.displayedRows})((e=>{let{theme:t}=e;return(0,qt.A)({},t.typography.body2,{flexShrink:0})}));function Die(e){let{from:t,to:n,count:r}=e;return"".concat(t,"\u2013").concat(n," of ").concat(-1!==r?r:"more than ".concat(n))}function jie(e){return"Go to ".concat(e," page")}const Pie=r.forwardRef((function(e,t){var n;const o=(0,Tn.b)({props:e,name:"MuiTablePagination"}),{ActionsComponent:i=yie,backIconButtonProps:a,className:s,colSpan:l,component:c=Qee,count:u,disabled:d=!1,getItemAriaLabel:h=jie,labelDisplayedRows:p=Die,labelRowsPerPage:f="Rows per page:",nextIconButtonProps:g,onPageChange:m,onRowsPerPageChange:v,page:y,rowsPerPage:x,rowsPerPageOptions:b=[10,25,50,100],SelectProps:w={},showFirstButton:S=!1,showLastButton:_=!1,slotProps:A={},slots:k={}}=o,C=(0,Yt.A)(o,Sie),M=o,I=(e=>{const{classes:t}=e;return(0,$t.A)({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},xie,t)})(M),T=null!=(n=null==A?void 0:A.select)?n:w,D=T.native?"option":Iie;let j;c!==Qee&&"td"!==c||(j=l||1e3);const P=(0,j3.A)(T.id),L=(0,j3.A)(T.labelId);return(0,Sn.jsx)(_ie,(0,qt.A)({colSpan:j,ref:t,as:c,ownerState:M,className:(0,Zt.A)(I.root,s)},C,{children:(0,Sn.jsxs)(Aie,{className:I.toolbar,children:[(0,Sn.jsx)(kie,{className:I.spacer}),b.length>1&&(0,Sn.jsx)(Cie,{className:I.selectLabel,id:L,children:f}),b.length>1&&(0,Sn.jsx)(Mie,(0,qt.A)({variant:"standard"},!T.variant&&{input:wie||(wie=(0,Sn.jsx)(hr,{}))},{value:x,onChange:v,id:P,labelId:L},T,{classes:(0,qt.A)({},T.classes,{root:(0,Zt.A)(I.input,I.selectRoot,(T.classes||{}).root),select:(0,Zt.A)(I.select,(T.classes||{}).select),icon:(0,Zt.A)(I.selectIcon,(T.classes||{}).icon)}),disabled:d,children:b.map((e=>(0,r.createElement)(D,(0,qt.A)({},!Rn(D)&&{ownerState:M},{className:I.menuItem,key:e.label?e.label:e,value:e.value?e.value:e}),e.label?e.label:e)))})),(0,Sn.jsx)(Tie,{className:I.displayedRows,children:p({from:0===u?0:y*x+1,to:-1===u?(y+1)*x:-1===x?u:Math.min(u,(y+1)*x),count:-1===u?-1:u,page:y})}),(0,Sn.jsx)(i,{className:I.actions,backIconButtonProps:a,count:u,nextIconButtonProps:g,onPageChange:m,page:y,rowsPerPage:x,showFirstButton:S,showLastButton:_,slotProps:A.actions,slots:k.actions,getItemAriaLabel:h,disabled:d})]})}))})),Lie=Pie,Rie=(0,Ea.A)((0,Sn.jsx)("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward");function Eie(e){return(0,Kt.Ay)("MuiTableSortLabel",e)}const Nie=(0,nr.A)("MuiTableSortLabel",["root","active","icon","iconDirectionDesc","iconDirectionAsc"]),Oie=["active","children","className","direction","hideSortIcon","IconComponent"],zie=(0,In.Ay)(Ds,{name:"MuiTableSortLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.active&&t.active]}})((e=>{let{theme:t}=e;return{cursor:"pointer",display:"inline-flex",justifyContent:"flex-start",flexDirection:"inherit",alignItems:"center","&:focus":{color:(t.vars||t).palette.text.secondary},"&:hover":{color:(t.vars||t).palette.text.secondary,["& .".concat(Nie.icon)]:{opacity:.5}},["&.".concat(Nie.active)]:{color:(t.vars||t).palette.text.primary,["& .".concat(Nie.icon)]:{opacity:1,color:(t.vars||t).palette.text.secondary}}}})),Bie=(0,In.Ay)("span",{name:"MuiTableSortLabel",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,t["iconDirection".concat((0,Mn.A)(n.direction))]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,qt.A)({fontSize:18,marginRight:4,marginLeft:4,opacity:0,transition:t.transitions.create(["opacity","transform"],{duration:t.transitions.duration.shorter}),userSelect:"none"},"desc"===n.direction&&{transform:"rotate(0deg)"},"asc"===n.direction&&{transform:"rotate(180deg)"})})),Fie=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiTableSortLabel"}),{active:r=!1,children:o,className:i,direction:a="asc",hideSortIcon:s=!1,IconComponent:l=Rie}=n,c=(0,Yt.A)(n,Oie),u=(0,qt.A)({},n,{active:r,direction:a,hideSortIcon:s,IconComponent:l}),d=(e=>{const{classes:t,direction:n,active:r}=e,o={root:["root",r&&"active"],icon:["icon","iconDirection".concat((0,Mn.A)(n))]};return(0,$t.A)(o,Eie,t)})(u);return(0,Sn.jsxs)(zie,(0,qt.A)({className:(0,Zt.A)(d.root,i),component:"span",disableRipple:!0,ownerState:u,ref:t},c,{children:[o,s&&!r?null:(0,Sn.jsx)(Bie,{as:l,className:(0,Zt.A)(d.icon),ownerState:u})]}))})),Vie=Fie,Wie=[{id:"ticker",numeric:!1,sortable:!1,disablePadding:!0,label:"\u5408\u7ea6"},{id:"volume",numeric:!0,sortable:!0,disablePadding:!1,label:"\u6210\u4ea4\u91cf"},{id:"tradeMoney",numeric:!0,disablePadding:!1,sortable:!0,label:"\u6210\u4ea4\u91d1\u989d"},{id:"close",numeric:!0,sortable:!1,disablePadding:!1,label:"\u6536\u76d8\u4ef7"},{id:"lowhigh",numeric:!0,sortable:!1,disablePadding:!1,label:"\u4ef7\u683c\u533a\u95f4"},{id:"oi",numeric:!0,sortable:!0,disablePadding:!1,label:"\u6301\u4ed3\u91cf"},{id:"netPremium",numeric:!0,sortable:!0,disablePadding:!1,label:"\u51c0\u8d44\u91d1\u6d41"},{id:"netVolume",sortable:!0,numeric:!0,disablePadding:!1,label:"\u51c0\u8d44\u91d1\u6d41\u6570\u91cf"}];function Hie(e){const{data:t,selectContract:n}=e,[o,i]=r.useState(["oi","desc"]),[a,s]=r.useState(0),[l,c]=r.useState(20),u=r.useMemo((()=>{const e="asc"===o[1]?1:-1;return t.sort(((t,n)=>"tradeMoney"===o[0]?(t.volume*t.vw-n.volume*n.vw)*e:(t[o[0]]-n[o[0]])*e))}),[t,o]),d=a*l,h=u.slice(d,Math.min(d+l,u.length)),p=l-h.length;return(0,Sn.jsx)(B8,{sx:{width:"100%"},children:(0,Sn.jsxs)(Gi,{sx:{width:"100%",mb:2},children:[(0,Sn.jsx)(Oee,{children:(0,Sn.jsxs)(uie,{sx:{minWidth:750},"aria-labelledby":"tableTitle",size:"medium",children:[(0,Sn.jsx)(Uee,{children:(0,Sn.jsx)(hte,{children:Wie.map((e=>(0,Sn.jsx)(Qee,{align:e.numeric?"right":"left",padding:"normal",sortDirection:o[0]===e.id&&o[1],children:e.sortable?(0,Sn.jsxs)(Vie,{active:o[0]===e.id,direction:o[0]===e.id?o[1]:"asc",onClick:()=>{i((t=>[e.id,e.id===t[0]?"asc"===t[1]?"desc":"asc":"desc"])),s(0)},children:[e.label,o[0]===e.id?(0,Sn.jsx)(B8,{component:"span",sx:gte,children:"desc"===o[1]?"sorted descending":"sorted ascending"}):null]}):(0,Sn.jsx)(Sn.Fragment,{children:e.label})},e.id)))})}),(0,Sn.jsxs)(ite,{children:[h.map(((e,t)=>(0,Sn.jsxs)(hte,{hover:!0,role:"checkbox",tabIndex:-1,sx:{cursor:"pointer"},onClick:()=>n(e.ticker),children:[(0,Sn.jsx)(Qee,{component:"th",id:e.ticker,scope:"row",children:e.ticker}),(0,Sn.jsx)(Qee,{align:"right",children:e.volume.toLocaleString()}),(0,Sn.jsx)(Qee,{align:"right",children:(e.volume*e.vw*100).toLocaleString()}),(0,Sn.jsx)(Qee,{align:"right",children:e.close}),(0,Sn.jsxs)(Qee,{align:"right",children:[e.low,"-",e.high]}),(0,Sn.jsx)(Qee,{align:"right",children:e.oi}),(0,Sn.jsx)(Qee,{align:"right",children:e.netPremium.toLocaleString()}),(0,Sn.jsx)(Qee,{align:"right",children:e.netVolume.toLocaleString()})]},e.ticker))),p>0&&(0,Sn.jsx)(hte,{style:{height:53*p},children:(0,Sn.jsx)(Qee,{colSpan:6})})]})]})}),(0,Sn.jsx)(Lie,{rowsPerPageOptions:[10,20,30,50],component:"div",count:u.length,rowsPerPage:l,page:a,onPageChange:(e,t)=>{s(t)},onRowsPerPageChange:e=>{c(parseInt(e.target.value,10)),s(0)}})]})})}const Gie="QQQ",Uie={201:"Canceled",202:"Late and Out Of Sequence",203:"Last and Canceled",204:"Late",205:"Opening Trade and Canceled",206:"Opening Trade, Late, and Out Of Sequence",207:"Only Trade and Canceled",208:"Opening Trade and Late",209:"Automatic Execution",210:"Reopening Trade",219:"Intermarket Sweep Order",227:"Single Leg Auction Non ISO",228:"Single Leg Auction ISO",229:"Single Leg Cross Non ISO",230:"Single Leg Cross ISO",231:"Single Leg Floor Trade",232:"Multi Leg auto-electronic trade",233:"Multi Leg Auction",234:"Multi Leg Cross",235:"Multi Leg floor trade",236:"Multi Leg auto-electronic trade against single leg(s)",237:"Stock Options Auction",238:"Multi Leg Auction against single leg(s)",239:"Multi Leg floor trade against single leg(s)",240:"Stock Options auto-electronic trade",241:"Stock Options Cross",242:"Stock Options floor trade",243:"Stock Options auto-electronic trade against single leg(s)",244:"Stock Options Auction against single leg(s)",245:"Stock Options floor trade against single leg(s)",246:"Multi Leg Floor Trade of Proprietary Products",247:"Multilateral Compression Trade of Proprietary Products",248:"Extended Hours Trade"};function Xie(e){const t=(e/1e6+"").slice(10,13);return Ml.format(e/1e6)+"."+t}function Yie(e){const{dt:t,contract:n,tradeData:o}=e,i=(0,r.useCallback)((async e=>{const r=await _c([t,n,"quote"],e);return"err"in r?r:r.sort(((e,t)=>e.sip_timestamp-t.sip_timestamp))}),[t,n]);return(0,Sn.jsx)(Qc,{getter:i,cvt:e=>{const t=function(e){const t=[],n=[],r=[];for(e.forEach((e=>{n.push(0),r.push([])}));;){for(var o=null,i=0;i++<n.length;){const t=i-1,r=n[i-1],a=e[t];if(r<a.data.length){const e=a.getTs(a.data[r]);(null==o||e<o)&&(o=e)}}if(null==o)break;for(i=0;i++<n.length;){const t=i-1,s=n[i-1],l=e[t];var a=!1;if(s<l.data.length){const e=l.data[s];l.getTs(e)===o&&(r[t].push(e),n[t]++,a=!0)}a||r[t].push(l.fill(s>0?l.data[s-1]:null,o))}t.push(o)}return[t,r]}([{data:o,getTs:e=>e.sip_timestamp,fill:(e,t)=>null==e?{price:0,conditions:[],size:0,sip_timestamp:t}:{...e,sip_timestamp:t,size:0}},{data:e,getTs:e=>e.sip_timestamp,fill:(e,t)=>null==e?{ask_price:0,ask_size:0,bid_price:0,bid_size:0,sip_timestamp:t}:{...e,sip_timestamp:t}}]),n=t[1][0],r=t[1][1];return console.log("debug join:",t),(0,Sn.jsx)("div",{style:{width:"100%",aspectRatio:"16/9"},children:(0,Sn.jsx)(bne,{x:t[0].map(Xie),y:[[["ask",r.map((e=>e.ask_price))],["trade",n.map((e=>e.price))],["bid",r.map((e=>e.bid_price))]],[["trade volume",n.map((e=>e.size))]]]})})}})}function qie(e){const{data:t,dt:n,contract:o}=e,[i,a]=(0,r.useState)(null),[s,l]=(0,r.useState)(null),c=(0,r.useMemo)((()=>{const e=new Set;return t.forEach((t=>t.conditions.forEach((t=>e.add(t))))),Array.from(e).sort()}),[t]),[u,d]=(0,r.useMemo)((()=>{const e=null!=s?t.filter((e=>e.conditions.find((e=>s.has(e))))):t,n=new Set,r=[];return t.forEach((e=>{const t=Kl(e.sip_timestamp/1e6).slice(0,16);n.has(t)||(r.push(t),n.add(t))})),[e,r]}),[t,s]);return(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("h3",{children:"Trade Detail"}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u4ea4\u6613\u6761\u4ef6:"}),(0,Sn.jsx)($8,{selected:null!=s?Array.from(s).map((e=>""+e)):[],data:c.map((e=>[e+"",e in Uie?Uie[e]:""])),select:e=>{0===e.length?l(null):l(new Set(e.map((e=>parseInt(e)))))}})]}),(0,Sn.jsx)("div",{style:{width:"100%",aspectRatio:"16/9"},children:(0,Sn.jsx)(bne,{x:u.map((e=>Xie(e.sip_timestamp))),y:[[["price",u.map((e=>e.price))]],[["volume",u.map((e=>e.size))]]]})}),(0,Sn.jsx)("h3",{children:"Biding Detail"}),(0,Sn.jsx)("div",{children:(0,Sn.jsxs)("select",{value:i||"",onChange:e=>{const t=e.target.value;a(""===t?null:t)},children:[(0,Sn.jsx)("option",{value:"",children:"none"},""),d.map((e=>(0,Sn.jsx)("option",{value:e,children:e.slice(11)},e)))]})}),null!=i&&(0,Sn.jsx)(Yie,{tradeData:u.filter((e=>Kl(e.sip_timestamp/1e6).slice(0,16)===i)),dt:i+":00",contract:o})]})}function Zie(e){const{dt:t,contract:n}=e,o=(0,r.useCallback)((async e=>{const r=await _c([t,n,"trade"],e);return"err"in r?r:r.sort(((e,t)=>e.sip_timestamp-t.sip_timestamp))}),[t,n]);return(0,Sn.jsx)(Qc,{getter:o,cvt:e=>(0,Sn.jsx)("div",{children:(0,Sn.jsx)(qie,{data:e,dt:t,contract:n})})})}function Kie(e){const{dt:t,contract:n,aggs:o,preClose:i}=e,a=(0,r.useCallback)((async e=>{const r=await _c([t,n,"net_flow"],e);if("err"in r)return r;return r.map((e=>3===e.length?[...e,0,0,0]:e))}),[t,n]);return(0,Sn.jsx)(Qc,{getter:a,cvt:e=>{const t=nl(e,(e=>6e4*e[0]),((e,t)=>[Math.floor(t/6e4),0,0,0,0,0])),n=t.map((e=>e[1])),r=t.map((e=>e[3])),a=t.map((e=>e[4])),s=t.map((e=>e[5]));return(0,Sn.jsx)(l3,{symbol:"QQQ",signals:[],preClose:i,isDay:!0,historyData:o,extraLines:[[["net flow",n]],[["bid",r],["mid",a],["ask",s]]]})}})}function $ie(e){const{dt:t,data:n,summary:o}=e,[i,a]=(0,r.useState)(null),s=n.results,l=null!=n.prevClose?n.prevClose:n.results.length>0?n.results[0].o:null;if(null!=l){const e=[],n=[],r=[],c=[];o.flow.call.reduce(((t,n)=>{const o=t[0]+n[1][0],i=t[1]+n[1][1];return e.push(o),r.push(i),[o,i]}),[0,0]),o.flow.put.reduce(((e,t)=>{const r=e[0]+t[1][0],o=e[1]+t[1][1];return n.push(r),c.push(o),[r,o]}),[0,0]);const u=Array.from({length:e.length}).map(((t,r)=>e[r]-n[r])),d=Array.from({length:e.length}).map(((e,t)=>r[t]-c[t]));return(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("h2",{children:"Flow Summary:"}),(0,Sn.jsx)("div",{style:{width:"100%",aspectRatio:"1/1"},children:(0,Sn.jsx)(bne,{x:s.map((e=>Ml.format(e.t))),y:[[["stock",s.map((e=>e.c))]],[["net money",u]],[["call money",e],["put money",n]],[["net volume",d]],[["call volume",r],["put volume",c]]]})}),null!=i&&(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsxs)("h3",{children:["Net Flow:",(0,Sn.jsx)(a5,{label:i,onDelete:()=>a(null)})]}),(0,Sn.jsx)("div",{style:{width:"100%",aspectRatio:"16/9"},children:(0,Sn.jsx)(Kie,{dt:t,aggs:s,preClose:l,contract:i})}),(0,Sn.jsx)("div",{style:{width:"100%"},children:(0,Sn.jsx)(Zie,{dt:t,contract:i})})]}),(0,Sn.jsx)(Hie,{data:o.summary,selectContract:a})]})}return(0,Sn.jsx)("p",{children:"Invalid Day Candle!"})}function Qie(e){const{dt:t}=e,n=(0,r.useCallback)((async e=>{const n=await _l(Gie,t,t,1,"minute",e);if("err"in n)return n;{const r=await _c(t,e);if("err"in r)return r;{const e={...n,results:nl(n.results,(e=>e.t),((e,t)=>({...e,t:t,o:e.c,h:e.c,l:e.c})))},t=r,o={...t,flow:{call:nl(t.flow.call,(e=>6e4*e[0]),((e,t)=>[Math.floor(t/6e4),[0,0]])),put:nl(t.flow.put,(e=>6e4*e[0]),((e,t)=>[Math.floor(t/6e4),[0,0]]))}};return[e,o]}}}),[t]);return(0,Sn.jsx)(Qc,{getter:n,cvt:e=>(0,Sn.jsx)($ie,{dt:t,data:e[0],summary:e[1]})})}function Jie(e){const[t,n]=(0,r.useState)(null);return(0,Sn.jsxs)("main",{children:[(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u9009\u62e9\u65e5\u671f:"}),(0,Sn.jsxs)("select",{value:t||"none",onChange:e=>{const t=e.target.value;n("none"===t?null:t)},children:[(0,Sn.jsx)("option",{value:"none",children:"none"},"none"),e.dates.map((e=>(0,Sn.jsx)("option",{value:e,children:e},e)))]})]}),null!=t&&(0,Sn.jsx)("div",{children:(0,Sn.jsx)(Qie,{dt:t})})]})}function eae(){const e=(0,r.useCallback)((async e=>await _c(null,e)),[]);return(0,Sn.jsx)(Qc,{getter:e,cvt:e=>(0,Sn.jsx)(Jie,{dates:e})})}async function tae(e){const t="".concat(xl,"/task?command=get_running_tasks"),n=await Cl(t,e);if("err"in n)return n;if("d"in n&&null!=n.d){return n.d.map((e=>["stock:".concat(e[0],"-").concat(e[1]),e[0],e[1],e[2],e[3]]))}{const e=n;return{err:e.timeout?"worker timeout":e.e}}}async function nae(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=new URLSearchParams;r.set("command","accounts"),null!=e&&r.set("aid",e),n&&r.set("group","1");const o="".concat(xl,"/position_new?").concat(r.toString()),i=await Cl(o,t);return"err"in i?i:"d"in i?i.d:{err:"fail to get data by key:d"}}function rae(e){let{refresh:t,data:n}=e;const[o,i]=n,[a,s]=(0,r.useState)(null),[l,c]=(0,r.useState)(null),[u,d]=(0,r.useState)(""),[h,p]=(0,r.useState)(null),f=()=>c(null),g=tt();const m=(0,r.useMemo)((()=>{const e=new Map;return o[1].forEach((t=>{t.account.length>0&&e.set(t.rowid+"",t.account)})),e}),[o]);return(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsxs)("div",{style:{marginBottom:"1rem"},children:[(0,Sn.jsx)("span",{children:"Create Task: "}),null!=o&&!("err"in o)&&(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsx)("button",{onClick:e=>{if(o[1].length>0){const e=o[1][0];s(e);const t=o[0].find((t=>t.isBuy&&t.name===e.strategy)),n=o[0].find((e=>!e.isBuy));null!=t&&null!=n&&c({stock:e.symbol,buyAlgorithm:t.id,buyParams:t.params,sellAlgorithm:n.id,sellParams:n.params})}},children:"New Task"}),(0,Sn.jsx)("span",{children:"Query:"}),(0,Sn.jsx)("input",{value:u,onChange:e=>d(e.target.value)})]})]}),(0,Sn.jsxs)(j4,{striped:!0,bordered:!0,hover:!0,variant:"dark",responsive:!0,children:[(0,Sn.jsx)("thead",{children:(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("th",{children:"Stock"}),(0,Sn.jsx)("th",{children:"Status"}),(0,Sn.jsx)("th",{children:"Desc"}),(0,Sn.jsx)("th",{children:"Strategy"}),(0,Sn.jsx)("th",{children:"Group"}),(0,Sn.jsx)("th",{children:"Operation"})]})}),(0,Sn.jsx)("tbody",{children:i.filter((e=>0===u.length||e[1].toLocaleLowerCase().search(u.toLocaleLowerCase())>-1)).map((e=>{const n=e[2].search("-");if(n>-1){const r=e[2].substring(0,n),o=e[2].substring(n);return(0,Sn.jsxs)("tr",{children:[(0,Sn.jsx)("td",{children:e[1]}),(0,Sn.jsx)("td",{children:"-"}),(0,Sn.jsx)("td",{children:e[4]}),(0,Sn.jsxs)("td",{children:[(0,Sn.jsx)(Vt,{to:null!==m&&void 0!==m&&m.has(r)?"/trading/account/".concat(r):"/accountG?mainId=".concat(r),children:r}),o,"-"+((null===m||void 0===m?void 0:m.get(r))||"")]}),(0,Sn.jsx)("td",{children:"-"}),(0,Sn.jsxs)("td",{children:[(0,Sn.jsx)(Vs,{variant:"outlined",color:e[3]?"error":"success",onClick:t=>{const n="stock:".concat(e[1],"-").concat(e[2]);p([e[1],e[2],!e[3],n])},children:e[3]?"\u505c\u6b62":"\u542f\u52a8"}),(0,Sn.jsx)(Vs,{variant:"outlined",onClick:t=>g("/task_new/".concat(e[1],"/").concat(e[2])),children:"Detail"}),(0,Sn.jsx)(iae,{symbol:e[1],strategy:e[2],cb:()=>t})]})]},e[0])}return(0,Sn.jsx)(Sn.Fragment,{})}))})]}),(0,Sn.jsxs)(s8,{show:null!=l,onHide:f,children:[(0,Sn.jsx)(s8.Header,{closeButton:!0,children:(0,Sn.jsx)(s8.Title,{children:"Start Task"})}),(0,Sn.jsx)(s8.Body,{children:null!=o&&!("err"in o)&&l?(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"Select Account"}),(0,Sn.jsx)("select",{value:(null===a||void 0===a?void 0:a.rowid)||"",onChange:e=>{const t=o[1].find((t=>e.target.value===t.rowid+""));if(null!=t){const e=o[0].find((e=>e.isBuy&&e.name===t.strategy));null!=e&&(s(t),c((n=>n&&{...n,stock:t.symbol,buyAlgorithm:t.strategy,buyParams:e.params})))}},children:o[1].map((e=>(0,Sn.jsx)("option",{value:e.rowid+"",children:"".concat(e.rowid,"-").concat(e.account,"-").concat(e.symbol,"-").concat(e.strategy,"-").concat(e.desc)},e.rowid)))})]}),(0,Sn.jsx)(t7,{taskConfigs:o[0],taskConfig:l,realTime:!0,setTaskConfig:e=>{c((t=>null==t?null:e(t)))}})]}):(0,Sn.jsx)("p",{children:"Task configs not loaded"})}),(0,Sn.jsxs)(s8.Footer,{children:[(0,Sn.jsx)(Vs,{color:"secondary",onClick:f,children:"Cancel"}),(0,Sn.jsx)(Vs,{color:"primary",onClick:function(){if(null!=l&&null!=a){const e=a.rowid+"-"+l.buyAlgorithm;Ol("new",l.stock,e,Object.fromEntries(l.buyParams.map((e=>[e.key,null==e.realValue?e.default:e.realValue]))),l.sellAlgorithm,Object.fromEntries(l.sellParams.map((e=>[e.key,e.default]))),null!=l.sellParamsEnd?Object.fromEntries(l.sellParamsEnd.map((e=>[e.key,e.default]))):null,null,!0).then((e=>{e&&t(),c(null)}))}},children:"Start"})]})]}),null!=h&&(0,Sn.jsx)(h7,{msg:"".concat(h[2]?"\u542f\u52a8":"\u505c\u6b62","\u4efb\u52a1:").concat(h[0],"-").concat(h[1]),callBack:e=>{(async function(e,t){const n={taskId:e},r=JSON.stringify(n),o=new URLSearchParams;o.set("command",t?"start_buy":"stop_task"),o.set("params",r);const i="".concat(xl,"/task?").concat(o.toString()),a=await Cl(i,null);return!("err"in a)&&"d"in a&&a.d.data.s})(h[3],h[2]).then((n=>{const r=n?"\u6210\u529f":"\u5931\u8d25";e("".concat(h[2]?"\u542f\u52a8":"\u505c\u6b62","\u4efb\u52a1:").concat(h[0],"-").concat(h[1]," ").concat(r,"!")),n&&t(),p(null)})).catch((()=>{e("".concat(h[2]?"\u542f\u52a8":"\u505c\u6b62","\u4efb\u52a1\u5931\u8d25!")),p(null)}))},cancelCB:()=>{p(null)}})]})}function oae(){const[e,t]=(0,r.useState)(0),n=(0,r.useCallback)((e=>async function(e){const[t,n,r]=await Promise.all([Bl(e),tae(e),nae(null,e)]);return"err"in t||"err"in n||"err"in r?{err:"err"in t?t.err:"err"in n?n.err:"err"in r?r.err:""}:[[t,r],n]}(e)),[e]),o=(0,r.useCallback)((()=>t((e=>e+1))),[t]);return(0,Sn.jsx)(Qc,{getter:n,cvt:e=>(0,Sn.jsx)(rae,{refresh:o,data:e})})}function iae(e){const{symbol:t,strategy:n,cb:o}=e,[i,a]=(0,r.useState)("");return(0,Sn.jsx)(p7,{msg:"\u4fee\u6539\u4efb\u52a1\u5907\u6ce8",content:(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u5907\u6ce8"}),(0,Sn.jsx)("textarea",{style:{width:"80%",aspectRatio:"3/2"},value:i,onChange:e=>{a(e.target.value)}})]}),callBack:e=>{(async function(e,t,n){const r=new URLSearchParams;r.set("command","update_task_desc");const o={symbol:e,strategy:t,desc:n};r.set("params",JSON.stringify(o));const i="".concat(xl,"/task?").concat(r.toString()),a=await Cl(i);return"s"in a&&!0===a.s})(t,n,i).then((t=>{const n="\u66f4\u65b0"+(t?"\u6210\u529f!":"\u5931\u8d25!");t&&o(),e(n)})).catch((t=>{e("\u66f4\u65b0\u5931\u8d25!err:"+t)}))}})}function aae(e){const t=new Map;return Object.keys(e).forEach((n=>{t.set(n,e[n])})),t}const sae="filterList";function lae(){let e=rt();const[t,n]=(0,r.useState)(0),o=(0,r.useCallback)((()=>{n((e=>e+1))}),[]),i=(0,r.useCallback)((async t=>{const n=await async function(e,t,n){const r=new URLSearchParams;r.set("command","get_task_config");const o={symbol:e,strategy:t};r.set("params",JSON.stringify(o));const i="".concat(xl,"/task?").concat(r.toString()),a=await Cl(i,n);if("err"in a)return a;if("params"in a){const e=a,t=JSON.parse(e.params);if(2===e.defaultConfig.length){const n=e.defaultConfig.find((e=>t.buyAlgorithm.endsWith(e.id))),r=e.defaultConfig.find((e=>t.sellAlgorithm===e.id));if(null!=n&&null!=r)return{...t,stock:t.stocks[0],buyParams:aae(t.buyParams),sellParams:aae(t.sellParams),defaultSellParams:JSON.parse(r.params),defaultBuyParams:JSON.parse(n.params)}}return{err:"fail to get default params"}}return{err:"key params not found"}}(e.stockId,e.strategyId,t),r=await r7(t);if(!("err"in r)&&!("err"in n)){const e=n.defaultBuyParams,t=r.map((e=>e.name));if(t.length>0&&null!=e.find((e=>e.key===sae))){const r=e.map((e=>e.key===sae?{...e,alternatives:[!0,t]}:e));return{...n,defaultBuyParams:r}}}return n}),[e.stockId,e.strategyId,t]);return(0,Sn.jsx)(Qc,{getter:i,cvt:e=>(0,Sn.jsx)(uae,{config:e,refresh:o})})}function cae(e,t){return Object.fromEntries(e.map((e=>{const n=e.key,r=t.get(n);return[n,null!=r?r:e.default]})))}function uae(e){let{config:t,refresh:n}=e;Math.floor((new Date).getTime()/864e5);const o=El((new Date).getTime()),[i,a]=(0,r.useState)([o,o]),s=(e,r,o)=>{(async function(e,t,n,r,o,i){let a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null;if("new"===e){if(null==r||null==i)return!1}else if("update"===e&&null==r&&null==i&&null==a)return!1;const l=Object.entries({stocks:[t],buyAlgorithm:n,sellAlgorithm:o}),c=[];null!=r&&c.push(["buyParams",r]),null!=i&&c.push(["sellParams",i]),null!=a&&c.push(["sellParamsEnd",a]);const u=Object.fromEntries(l.concat(c)),d="".concat(xl,"/task");var h;h=null!=s?{command:e,params:u,name:"".concat(t,"-").concat(n),taskId:s}:{command:e,params:u,name:"".concat(t,"-").concat(n)};const p=await kl(d,JSON.stringify(h));return!("err"in p)&&"status"in p&&"ok"===p.status})("update",t.stock,t.buyAlgorithm,1===e?r:null,t.sellAlgorithm,2===e?r:null,3===e?r:null).then((e=>{e&&n();o("\u64cd\u4f5c"+(e?"\u6210\u529f":"\u5931\u8d25")+"!")}))},l=t.sellParamsEnd,c=t.defaultBuyParams.filter((e=>1===e.realTime)).map((e=>{const n=t.buyParams.get(e.key);return null!=n?{...e,default:n}:e}));return(0,Sn.jsxs)("main",{children:[(0,Sn.jsxs)("h2",{children:[(0,Sn.jsx)("span",{style:{color:"lightgrey"},children:"Stock: "}),t.stock,(0,Sn.jsxs)("span",{style:{color:"lightgrey",marginLeft:"1rem"},children:["Strategy:"," "]}),t.buyAlgorithm]}),(0,Sn.jsx)(pae,{symbol:t.stock,strategy:t.buyAlgorithm}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("div",{children:(0,Sn.jsx)(hae,{msg:"\u8fd0\u884c\u56de\u6d4b",content:(0,Sn.jsxs)("div",{children:[(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"Start Date: "}),(0,Sn.jsx)("input",{value:i[0],type:"date",onChange:e=>{a((t=>[e.target.value,t[1]]))}})]}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"End Date: "}),(0,Sn.jsx)("input",{value:i[1],type:"date",onChange:e=>{a((t=>[t[0],e.target.value]))}})]})]}),callback:e=>{((e,n,r)=>{const o=t.buyAlgorithm.split("-"),i=o[o.length-1];Gl({name:"".concat(t.stock,"-").concat(t.buyAlgorithm),desc:"",startDate:e,endDate:n,needQuote:!1,configs:[{stocks:[t.stock],buyAlgorithm:i,buyParams:cae(t.defaultBuyParams.filter((e=>null==e.realTime||0===e.realTime)),t.buyParams),sellAlgorithm:t.sellAlgorithm,sellParams:cae(t.defaultSellParams,t.sellParams),sellParamsEnd:void 0,origin:[[i,t.defaultBuyParams.filter((e=>null==e.realTime||0===e.realTime)).map((e=>{const n=e.key,r=t.buyParams.get(n);return null!=r?{...e,default:r}:e}))],[t.sellAlgorithm,t.defaultSellParams.map((e=>{const n=e.key,r=t.sellParams.get(n);return null!=r?{...e,default:r}:e})),null]]}]}).then((e=>{r("\u63d0\u4ea4"+(e?"\u6210\u529f":"\u5931\u8d25")+"!")}))})(i[0],i[1],e)}})}),c.length>0&&(0,Sn.jsx)(i7,{name:"\u5b9e\u65f6",config:c,updater:(e,t)=>{s(1,e,t)}}),(0,Sn.jsx)(i7,{name:"\u4e70\u5165\u7b56\u7565(".concat(t.buyAlgorithm,")"),config:t.defaultBuyParams.filter((e=>null==e.realTime||0===e.realTime)).map((e=>{const n=t.buyParams.get(e.key);return null!=n?{...e,default:n}:e})),updater:(e,t)=>{s(1,e,t)}}),(0,Sn.jsx)(i7,{name:"\u5356\u51fa\u7b56\u7565(".concat(t.sellAlgorithm,")"),config:t.defaultSellParams.map((e=>{const n=t.sellParams.get(e.key);return null!=n?{...e,default:n}:e})),updater:(e,t)=>{s(2,e,t)}}),null!=l&&(0,Sn.jsx)(i7,{name:"\u5356\u51fa\u7b56\u7565(\u672b\u65e5)(".concat(t.sellAlgorithm,")"),config:t.defaultSellParams.map((e=>{const t=l.get(e.key);return null!=t?{...e,default:t}:e})),updater:(e,t)=>{s(3,e,t)}})]}),(0,Sn.jsx)("h3",{children:"Runners:"}),(0,Sn.jsx)(dae,{taskId:"".concat(t.buyAlgorithm)})]})}function dae(e){let{taskId:t}=e;const[n,o]=(0,r.useState)(0),i=(0,r.useCallback)((async e=>{const n=await Ac(e);return"err"in n?n:n.filter((e=>e.startsWith("option:")&&e.endsWith(t)))}),[t,n]);return(0,Sn.jsx)(Qc,{getter:i,cvt:e=>(0,Sn.jsx)(Sn.Fragment,{children:e.map((e=>(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:e}),(0,Sn.jsx)(hae,{msg:"\u6e05\u4ed3\u9000\u51fa\u4efb\u52a1:".concat(e),callback:t=>{ml(e,"all",1).then((e=>{e?(t("\u64cd\u4f5c\u6210\u529f!"),vl(1e3).then((()=>{o((e=>e+1))}))):t("\u64cd\u4f5c\u5931\u8d25!")}))}})]},e)))})})}function hae(e){const[t,n]=(0,r.useState)(!1),[o,i]=(0,r.useState)(null),[a,s]=(0,r.useState)(!1);return(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)(Vs,{variant:"outlined",color:!0===e.even?"warning":"primary",onClick:()=>{a?i("\u64cd\u4f5c\u6b63\u5728\u6267\u884c\u4e2d, \u8bf7\u7a0d\u540e\u518d\u91cd\u8bd5!"):n(!0)},children:e.msg}),(0,Sn.jsxs)(s8,{show:t,onHide:()=>n(!1),children:[(0,Sn.jsx)(s8.Header,{closeButton:!0,children:(0,Sn.jsx)(s8.Title,{children:e.msg})}),(0,Sn.jsx)(s8.Body,{children:e.content||(0,Sn.jsxs)("p",{children:["\u662f\u5426\u786e\u5b9a",e.msg,"?"]})}),(0,Sn.jsxs)(s8.Footer,{children:[(0,Sn.jsx)(Vs,{color:"secondary",variant:"outlined",onClick:()=>n(!1),children:"\u53d6\u6d88"}),(0,Sn.jsx)(Vs,{color:"primary",variant:"outlined",onClick:()=>{s(!0),e.callback((e=>{i(e),s(!1)})),n(!1)},children:"\u786e\u5b9a"})]})]}),null!=o&&(0,Sn.jsx)(P8,{msg:o,cb:()=>i(null)})]})}function pae(e){const[t,n]=(0,r.useState)(null);if((0,r.useEffect)((()=>{const t=new AbortController,r=t.signal;return pc(e.symbol,e.strategy,r).then((e=>{r.aborted||n(e)})),()=>{t.abort()}}),[e.symbol,e.strategy]),null==t)return(0,Sn.jsx)($c,{});if("err"in t)return(0,Sn.jsx)("div",{children:(0,Sn.jsxs)("p",{children:["Error:",t.err]})});{const e=t.find((e=>!0));return(0,Sn.jsxs)(M5,{children:[(0,Sn.jsx)(E5,{expandIcon:(0,Sn.jsx)(p3.A,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,Sn.jsx)(Q3,{children:null!=e?"\u65f6\u95f4:".concat(El(e.timestamp,!1,!0,!1),",\u540c\u6b65\u4efb\u52a1ID:").concat(e.taskId):"\u6ca1\u6709\u540c\u6b65\u8bb0\u5f55"})}),(0,Sn.jsx)(s3,{children:(0,Sn.jsx)(Q3,{children:t.slice(1).map((e=>(0,Sn.jsx)("p",{children:"\u65f6\u95f4:".concat(El(e.timestamp,!1,!0,!1),",\u540c\u6b65\u4efb\u52a1ID:").concat(e.taskId)})))})})]})}}const fae=[{path:null,title:"Main",component:(0,Sn.jsx)(Y2,{})},{path:"strategy",title:"Strategy",component:(0,Sn.jsx)(Woe,{})}],gae=[["Main","/"],["Strategy","/strategy"]],mae=[{path:null,title:"Main",component:(0,Sn.jsx)(Y2,{})},{path:"task",title:"Tasks",component:(0,Sn.jsx)(vt,{}),children:[{path:null,title:"Tasks",component:(0,Sn.jsx)(V9,{})},{path:":stockId/:strategyId",title:"Strategy",component:(0,Sn.jsx)(u7,{})}]},{path:"settings",title:"Settings",component:(0,Sn.jsx)(G9,{}),children:[{path:null,title:"Default",component:(0,Sn.jsx)("main",{style:{padding:"1rem"},children:(0,Sn.jsx)("p",{children:"Select an Item"})})},{path:"stock",title:"Stock",component:(0,Sn.jsx)(U9,{})},{path:"event",title:"Event",component:(0,Sn.jsx)(q9,{})},{path:"dates",title:"Dates",component:(0,Sn.jsx)(wee,{})},{path:"filter",title:"Filter",component:(0,Sn.jsx)(Aee,{})},{path:"block",title:"Block",component:(0,Sn.jsx)(Iee,{})},{path:"volatility",title:"Volatility",component:(0,Sn.jsx)(Pee,{})}]},{path:"backtest",title:"Backtest",component:(0,Sn.jsx)(vt,{}),children:[{path:null,title:"Backtests",component:(0,Sn.jsx)(Jte,{})},{path:":taskId",title:"Task Detail",component:(0,Sn.jsx)(une,{})},{path:":taskId/log",title:"Log",component:(0,Sn.jsx)(hne,{})},{path:":uid/signal_inspect",title:"Inspect",component:(0,Sn.jsx)(Nne,{})}]},{path:"trading",component:(0,Sn.jsx)(Z7,{}),title:"Trading",children:[{path:null,title:"Trading Home",component:(0,Sn.jsx)(q7,{})},{path:"accounts/:aid",title:"Accounts",component:(0,Sn.jsx)(s9,{})},{path:"ZInvest/:port",title:"Zinvest",component:(0,Sn.jsx)(Q7,{})},{path:"account/:account",title:"Account",component:(0,Sn.jsx)(d9,{})},{path:"runner/:account/:runner",title:"Runner",component:(0,Sn.jsx)(g9,{})}]},{path:"qqq",title:"QQQ",component:(0,Sn.jsx)(Gne,{}),children:[{path:null,title:"Strategy",component:(0,Sn.jsx)(L9,{})},{path:"signal_search",title:"Signal Search",component:(0,Sn.jsx)(Kne,{})}]},{path:"accountG",title:"Account Group",component:(0,Sn.jsx)($ne,{})},{path:"accounts",title:"Accounts",component:(0,Sn.jsx)(l9,{})},{path:"zinvest",title:"Zinvest",component:(0,Sn.jsx)($7,{})},{path:"option/:contract/:startDate",title:"Option",component:(0,Sn.jsx)(Xoe,{})},{path:"stock/:stockId",title:"Stock",component:(0,Sn.jsx)(Yoe,{})},{path:"stockChart/:symbol/:date",title:"Stock Chart",component:(0,Sn.jsx)(qoe,{})},{path:"strategy/log/:taskId",title:"Strategy Log",component:(0,Sn.jsx)(fne,{})},{path:"orders",title:"Orders",component:(0,Sn.jsx)(tie,{})},{path:"order_inspect/:orderId",title:"Order Inspect",component:(0,Sn.jsx)(Joe,{})},{path:"symbol",title:"Symbol",component:(0,Sn.jsx)(oie,{})},{path:"netflow",title:"Net Flow",component:(0,Sn.jsx)(eae,{})},{path:"strategy_new",title:"Strategy New",component:(0,Sn.jsx)(Poe,{})},{path:"task_new",title:"Tasks",component:(0,Sn.jsx)(vt,{}),children:[{path:null,title:"Tasks New",component:(0,Sn.jsx)(oae,{})},{path:":stockId/:strategyId",title:"Strategy Detail",component:(0,Sn.jsx)(lae,{})}]}],vae=[["Main","/"],["Tasks","/task"],["Settings","/settings",[["Stock","stock"],["Strategy","strategy"],["Event","event"]]],["Backtest","/backtest"],["Trading","/trading",[["ZInvest","/zinvest"],["Strategy","/accounts"]]],["QQQ","/qqq",[["Signal Search","/qqq/signal_search"],["Strategy","/qqq"]]],["Account Group","/accountG"],["Orders","/orders"],["Symbol","/symbol"],["Net Flow","/netflow"],["Strategy New","/strategy_new"],["Tasks New","/task_new"]];function yae(e){return(0,Kt.Ay)("MuiAppBar",e)}(0,nr.A)("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const xae=["className","color","enableColorOnDark","position"],bae=(e,t)=>e?"".concat(null==e?void 0:e.replace(")",""),", ").concat(t,")"):t,wae=(0,In.Ay)(Gi,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["position".concat((0,Mn.A)(n.position))],t["color".concat((0,Mn.A)(n.color))]]}})((e=>{let{theme:t,ownerState:n}=e;const r="light"===t.palette.mode?t.palette.grey[100]:t.palette.grey[900];return(0,qt.A)({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},"fixed"===n.position&&{position:"fixed",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},"absolute"===n.position&&{position:"absolute",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},"sticky"===n.position&&{position:"sticky",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},"static"===n.position&&{position:"static"},"relative"===n.position&&{position:"relative"},!t.vars&&(0,qt.A)({},"default"===n.color&&{backgroundColor:r,color:t.palette.getContrastText(r)},n.color&&"default"!==n.color&&"inherit"!==n.color&&"transparent"!==n.color&&{backgroundColor:t.palette[n.color].main,color:t.palette[n.color].contrastText},"inherit"===n.color&&{color:"inherit"},"dark"===t.palette.mode&&!n.enableColorOnDark&&{backgroundColor:null,color:null},"transparent"===n.color&&(0,qt.A)({backgroundColor:"transparent",color:"inherit"},"dark"===t.palette.mode&&{backgroundImage:"none"})),t.vars&&(0,qt.A)({},"default"===n.color&&{"--AppBar-background":n.enableColorOnDark?t.vars.palette.AppBar.defaultBg:bae(t.vars.palette.AppBar.darkBg,t.vars.palette.AppBar.defaultBg),"--AppBar-color":n.enableColorOnDark?t.vars.palette.text.primary:bae(t.vars.palette.AppBar.darkColor,t.vars.palette.text.primary)},n.color&&!n.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":n.enableColorOnDark?t.vars.palette[n.color].main:bae(t.vars.palette.AppBar.darkBg,t.vars.palette[n.color].main),"--AppBar-color":n.enableColorOnDark?t.vars.palette[n.color].contrastText:bae(t.vars.palette.AppBar.darkColor,t.vars.palette[n.color].contrastText)},!["inherit","transparent"].includes(n.color)&&{backgroundColor:"var(--AppBar-background)"},{color:"inherit"===n.color?"inherit":"var(--AppBar-color)"},"transparent"===n.color&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))})),Sae=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiAppBar"}),{className:r,color:o="primary",enableColorOnDark:i=!1,position:a="fixed"}=n,s=(0,Yt.A)(n,xae),l=(0,qt.A)({},n,{color:o,position:a,enableColorOnDark:i}),c=(e=>{const{color:t,position:n,classes:r}=e,o={root:["root","color".concat((0,Mn.A)(t)),"position".concat((0,Mn.A)(n))]};return(0,$t.A)(o,yae,r)})(l);return(0,Sn.jsx)(wae,(0,qt.A)({square:!0,component:"header",ownerState:l,elevation:4,className:(0,Zt.A)(c.root,r,"fixed"===a&&"mui-fixed"),ref:t},s))})),_ae=Sae,Aae=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function kae(e,t,n){var r;const o=function(e,t,n){const r=t.getBoundingClientRect(),o=n&&n.getBoundingClientRect(),i=(0,zo.A)(t);let a;if(t.fakeTransform)a=t.fakeTransform;else{const e=i.getComputedStyle(t);a=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("transform")}let s=0,l=0;if(a&&"none"!==a&&"string"===typeof a){const e=a.split("(")[1].split(")")[0].split(",");s=parseInt(e[4],10),l=parseInt(e[5],10)}return"left"===e?"translateX(".concat(o?o.right+s-r.left:i.innerWidth+s-r.left,"px)"):"right"===e?"translateX(-".concat(o?r.right-o.left-s:r.left+r.width-s,"px)"):"up"===e?"translateY(".concat(o?o.bottom+l-r.top:i.innerHeight+l-r.top,"px)"):"translateY(-".concat(o?r.top-o.top+r.height-l:r.top+r.height-l,"px)")}(e,t,"function"===typeof(r=n)?r():r);o&&(t.style.webkitTransform=o,t.style.transform=o)}const Cae=r.forwardRef((function(e,t){const n=Qo(),o={enter:n.transitions.easing.easeOut,exit:n.transitions.easing.sharp},i={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:a,appear:s=!0,children:l,container:c,direction:u="down",easing:d=o,in:h,onEnter:p,onEntered:f,onEntering:g,onExit:m,onExited:v,onExiting:y,style:x,timeout:b=i,TransitionComponent:w=$o}=e,S=(0,Yt.A)(e,Aae),_=r.useRef(null),A=(0,Yn.A)(l.ref,_,t),k=e=>t=>{e&&(void 0===t?e(_.current):e(_.current,t))},C=k(((e,t)=>{kae(u,e,c),Jo(e),p&&p(e,t)})),M=k(((e,t)=>{const r=ei({timeout:b,style:x,easing:d},{mode:"enter"});e.style.webkitTransition=n.transitions.create("-webkit-transform",(0,qt.A)({},r)),e.style.transition=n.transitions.create("transform",(0,qt.A)({},r)),e.style.webkitTransform="none",e.style.transform="none",g&&g(e,t)})),I=k(f),T=k(y),D=k((e=>{const t=ei({timeout:b,style:x,easing:d},{mode:"exit"});e.style.webkitTransition=n.transitions.create("-webkit-transform",t),e.style.transition=n.transitions.create("transform",t),kae(u,e,c),m&&m(e)})),j=k((e=>{e.style.webkitTransition="",e.style.transition="",v&&v(e)})),P=r.useCallback((()=>{_.current&&kae(u,_.current,c)}),[u,c]);return r.useEffect((()=>{if(h||"down"===u||"right"===u)return;const e=(0,Oo.A)((()=>{_.current&&kae(u,_.current,c)})),t=(0,zo.A)(_.current);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[u,h,c]),r.useEffect((()=>{h||P()}),[h,P]),(0,Sn.jsx)(w,(0,qt.A)({nodeRef:_,onEnter:C,onEntered:I,onEntering:M,onExit:D,onExited:j,onExiting:T,addEndListener:e=>{a&&a(_.current,e)},appear:s,in:h,timeout:b},S,{children:(e,t)=>r.cloneElement(l,(0,qt.A)({ref:A,style:(0,qt.A)({visibility:"exited"!==e||h?void 0:"hidden"},x,l.props.style)},t))}))})),Mae=Cae;function Iae(e){return(0,Kt.Ay)("MuiDrawer",e)}(0,nr.A)("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const Tae=["BackdropProps"],Dae=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],jae=(e,t)=>{const{ownerState:n}=e;return[t.root,("permanent"===n.variant||"persistent"===n.variant)&&t.docked,t.modal]},Pae=(0,In.Ay)(Oi,{name:"MuiDrawer",slot:"Root",overridesResolver:jae})((e=>{let{theme:t}=e;return{zIndex:(t.vars||t).zIndex.drawer}})),Lae=(0,In.Ay)("div",{shouldForwardProp:pr.A,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:jae})({flex:"0 0 auto"}),Rae=(0,In.Ay)(Gi,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t["paperAnchor".concat((0,Mn.A)(n.anchor))],"temporary"!==n.variant&&t["paperAnchorDocked".concat((0,Mn.A)(n.anchor))]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,qt.A)({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(t.vars||t).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},"left"===n.anchor&&{left:0},"top"===n.anchor&&{top:0,left:0,right:0,height:"auto",maxHeight:"100%"},"right"===n.anchor&&{right:0},"bottom"===n.anchor&&{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},"left"===n.anchor&&"temporary"!==n.variant&&{borderRight:"1px solid ".concat((t.vars||t).palette.divider)},"top"===n.anchor&&"temporary"!==n.variant&&{borderBottom:"1px solid ".concat((t.vars||t).palette.divider)},"right"===n.anchor&&"temporary"!==n.variant&&{borderLeft:"1px solid ".concat((t.vars||t).palette.divider)},"bottom"===n.anchor&&"temporary"!==n.variant&&{borderTop:"1px solid ".concat((t.vars||t).palette.divider)})})),Eae={left:"right",right:"left",top:"down",bottom:"up"};const Nae=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiDrawer"}),o=Qo(),i=fo(),a={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{anchor:s="left",BackdropProps:l,children:c,className:u,elevation:d=16,hideBackdrop:h=!1,ModalProps:{BackdropProps:p}={},onClose:f,open:g=!1,PaperProps:m={},SlideProps:v,TransitionComponent:y=Mae,transitionDuration:x=a,variant:b="temporary"}=n,w=(0,Yt.A)(n.ModalProps,Tae),S=(0,Yt.A)(n,Dae),_=r.useRef(!1);r.useEffect((()=>{_.current=!0}),[]);const A=function(e,t){let{direction:n}=e;return"rtl"===n&&function(e){return-1!==["left","right"].indexOf(e)}(t)?Eae[t]:t}({direction:i?"rtl":"ltr"},s),k=s,C=(0,qt.A)({},n,{anchor:k,elevation:d,open:g,variant:b},S),M=(e=>{const{classes:t,anchor:n,variant:r}=e,o={root:["root"],docked:[("permanent"===r||"persistent"===r)&&"docked"],modal:["modal"],paper:["paper","paperAnchor".concat((0,Mn.A)(n)),"temporary"!==r&&"paperAnchorDocked".concat((0,Mn.A)(n))]};return(0,$t.A)(o,Iae,t)})(C),I=(0,Sn.jsx)(Rae,(0,qt.A)({elevation:"temporary"===b?d:0,square:!0},m,{className:(0,Zt.A)(M.paper,m.className),ownerState:C,children:c}));if("permanent"===b)return(0,Sn.jsx)(Lae,(0,qt.A)({className:(0,Zt.A)(M.root,M.docked,u),ownerState:C,ref:t},S,{children:I}));const T=(0,Sn.jsx)(y,(0,qt.A)({in:g,direction:Eae[A],timeout:x,appear:_.current},v,{children:I}));return"persistent"===b?(0,Sn.jsx)(Lae,(0,qt.A)({className:(0,Zt.A)(M.root,M.docked,u),ownerState:C,ref:t},S,{children:T})):(0,Sn.jsx)(Pae,(0,qt.A)({BackdropProps:(0,qt.A)({},l,p,{transitionDuration:x}),className:(0,Zt.A)(M.root,M.modal,u),open:g,ownerState:C,onClose:f,hideBackdrop:h,ref:t},S,w,{children:T}))})),Oae=Nae;var zae=n(9611);const Bae=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],Fae=(0,In.Ay)("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(W8.primary)]:t.primary},{["& .".concat(W8.secondary)]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})((e=>{let{ownerState:t}=e;return(0,qt.A)({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},t.primary&&t.secondary&&{marginTop:6,marginBottom:6},t.inset&&{paddingLeft:56})})),Vae=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiListItemText"}),{children:o,className:i,disableTypography:a=!1,inset:s=!1,primary:l,primaryTypographyProps:c,secondary:u,secondaryTypographyProps:d}=n,h=(0,Yt.A)(n,Bae),{dense:p}=r.useContext(So);let f=null!=l?l:o,g=u;const m=(0,qt.A)({},n,{disableTypography:a,inset:s,primary:!!f,secondary:!!g,dense:p}),v=(e=>{const{classes:t,inset:n,primary:r,secondary:o,dense:i}=e,a={root:["root",n&&"inset",i&&"dense",r&&o&&"multiline"],primary:["primary"],secondary:["secondary"]};return(0,$t.A)(a,V8,t)})(m);return null==f||f.type===Q3||a||(f=(0,Sn.jsx)(Q3,(0,qt.A)({variant:p?"body2":"body1",className:v.primary,component:null!=c&&c.variant?void 0:"span",display:"block"},c,{children:f}))),null==g||g.type===Q3||a||(g=(0,Sn.jsx)(Q3,(0,qt.A)({variant:"body2",className:v.secondary,color:"text.secondary",display:"block"},d,{children:g}))),(0,Sn.jsxs)(Fae,(0,qt.A)({className:(0,Zt.A)(v.root,i),ownerState:m,ref:t},h,{children:[f,g]}))})),Wae=Vae;function Hae(e){return(0,Kt.Ay)("MuiListItemButton",e)}const Gae=(0,nr.A)("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),Uae=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],Xae=(0,In.Ay)(Ds,{shouldForwardProp:e=>(0,pr.A)(e)||"classes"===e,name:"MuiListItemButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((e=>{let{theme:t,ownerState:n}=e;return(0,qt.A)({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(Gae.selected)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,zi.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),["&.".concat(Gae.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,zi.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},["&.".concat(Gae.selected,":hover")]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,zi.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,zi.X4)(t.palette.primary.main,t.palette.action.selectedOpacity)}},["&.".concat(Gae.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat(Gae.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity}},n.divider&&{borderBottom:"1px solid ".concat((t.vars||t).palette.divider),backgroundClip:"padding-box"},"flex-start"===n.alignItems&&{alignItems:"flex-start"},!n.disableGutters&&{paddingLeft:16,paddingRight:16},n.dense&&{paddingTop:4,paddingBottom:4})})),Yae=r.forwardRef((function(e,t){const n=(0,Tn.b)({props:e,name:"MuiListItemButton"}),{alignItems:o="center",autoFocus:i=!1,component:a="div",children:s,dense:l=!1,disableGutters:c=!1,divider:u=!1,focusVisibleClassName:d,selected:h=!1,className:p}=n,f=(0,Yt.A)(n,Uae),g=r.useContext(So),m=r.useMemo((()=>({dense:l||g.dense||!1,alignItems:o,disableGutters:c})),[o,g.dense,l,c]),v=r.useRef(null);(0,qn.A)((()=>{i&&v.current&&v.current.focus()}),[i]);const y=(0,qt.A)({},n,{alignItems:o,dense:m.dense,disableGutters:c,divider:u,selected:h}),x=(e=>{const{alignItems:t,classes:n,dense:r,disabled:o,disableGutters:i,divider:a,selected:s}=e,l={root:["root",r&&"dense",!i&&"gutters",a&&"divider",o&&"disabled","flex-start"===t&&"alignItemsFlexStart",s&&"selected"]},c=(0,$t.A)(l,Hae,n);return(0,qt.A)({},n,c)})(y),b=(0,Yn.A)(v,t);return(0,Sn.jsx)(So.Provider,{value:m,children:(0,Sn.jsx)(Xae,(0,qt.A)({ref:b,href:f.href||f.to,component:(f.href||f.to)&&"div"===a?"button":a,focusVisibleClassName:(0,Zt.A)(x.focusVisible,d),ownerState:y,className:(0,Zt.A)(x.root,p)},f,{classes:x,children:s}))})})),qae=Yae;var Zae=n(5473),Kae=n(2177),$ae=n(1702);const Qae=["/favicon.gif","Riches Booster"];function Jae(e){let{naviItems:t}=e;const n=tt(),o=W2(),[i,a]=(0,r.useState)("Rich Booster"),[s,l]=(0,r.useState)(!1),c=Je(),u=(0,r.useContext)(F2);(0,r.useEffect)((()=>{const e=c.pathname.match(/task\d+/g);document.title=1===(null===e||void 0===e?void 0:e.length)?e[0]:"React App"}),[c]);const d=(e,t)=>{n(t),a(e),l(!1)};return t.length>0?o?(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)(_ae,{position:"static",color:"transparent",children:(0,Sn.jsx)(jn,{maxWidth:"xl",children:(0,Sn.jsxs)(gie,{disableGutters:!0,children:[(0,Sn.jsx)("img",{src:Qae[0],style:{width:"64px",aspectRatio:"1/1"},alt:Qae[1]}),(0,Sn.jsx)(B8,{children:t.map((e=>(0,Sn.jsx)(Wt,{className:"MyNavLink",to:e[1],style:e=>{let{isActive:t}=e;return{color:t?"red":""}},children:e[0]},e[1])))}),null!=u&&(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsx)(Kae.A,{}),(0,Sn.jsx)(Q3,{children:1===u.userLevel?"Admin":"Guest"}),(0,Sn.jsx)(V5,{onClick:()=>{sl(),u.updateUserLevel(),n("/")},children:(0,Sn.jsx)($ae.A,{})}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u5c0f\u5c4f\u6a21\u5f0f:"}),(0,Sn.jsx)(n3,{checked:u.enableSelect,onChange:e=>u.updateSelect(e.target.checked)})]})]})]})})}),(0,Sn.jsx)("div",{className:"MainPage",children:(0,Sn.jsx)("div",{style:{maxWidth:"1600px",width:"80vw"},children:(0,Sn.jsx)(vt,{},"mainLayout")})})]},"LayoutDiv"):(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsx)(B8,{sx:{flexGrow:1},children:(0,Sn.jsx)(_ae,{position:"static",children:(0,Sn.jsxs)(gie,{children:[(0,Sn.jsx)(V5,{size:"large",edge:"start",color:"inherit","aria-label":"menu",onClick:()=>{l((e=>!e))},children:(0,Sn.jsx)(zae.A,{})}),(0,Sn.jsx)(Q3,{variant:"h6",component:"div",sx:{flexGrow:1},children:i}),(0,Sn.jsx)("img",{src:Qae[0],style:{width:"64px",aspectRatio:"1/1",background:"transparent"},alt:Qae[1]}),null!=u&&(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsx)(Kae.A,{}),(0,Sn.jsx)(Q3,{children:1===u.userLevel?"Admin":"Guest"}),(0,Sn.jsx)(V5,{onClick:()=>{sl(),u.updateUserLevel(),n("/")},children:(0,Sn.jsx)($ae.A,{})}),(0,Sn.jsxs)("div",{children:[(0,Sn.jsx)("span",{children:"\u5c0f\u5c4f\u6a21\u5f0f:"}),(0,Sn.jsx)(n3,{checked:u.enableSelect,onChange:e=>u.updateSelect(e.target.checked)})]})]})]})})}),(0,Sn.jsx)(Oae,{anchor:"left",open:s,onClose:()=>l(!1),children:(0,Sn.jsx)(Mo,{children:t.map((e=>2===e.length?(0,Sn.jsx)(qae,{onClick:()=>{d(e[0],e[1])},children:(0,Sn.jsx)(Wae,{primary:e[0]})}):(0,Sn.jsx)(ese,{handleNavigate:d,namePath:[e[0],e[1]],subItem:e[2]})))})}),(0,Sn.jsx)(vt,{})]}):(0,Sn.jsx)(vt,{})}function ese(e){const[t,n]=(0,r.useState)(!1);return(0,Sn.jsxs)(Sn.Fragment,{children:[(0,Sn.jsxs)(qae,{onClick:()=>n((e=>!e)),children:[(0,Sn.jsx)(Wae,{primary:e.namePath[0]}),t?(0,Sn.jsx)(Zae.A,{}):(0,Sn.jsx)(p3.A,{})]}),(0,Sn.jsx)(v5,{in:t,timeout:"auto",unmountOnExit:!0,children:(0,Sn.jsx)(Mo,{component:"div",disablePadding:!0,children:e.subItem.map((t=>(0,Sn.jsx)(qae,{sx:{pl:4},onClick:()=>{e.handleNavigate("".concat(e.namePath[0]," - ").concat(t[0]),t[1].startsWith("/")?t[1]:"".concat(e.namePath[1],"/").concat(t[1]))},children:(0,Sn.jsx)(Wae,{primary:t[0]})})))})})]})}function tse(e,t){if(t&&null!=e.children){const t=e.path;return(0,Sn.jsx)(yt,{path:t,element:e.component,children:e.children.map((e=>tse(e,!0)))},t)}return null==e.path?(0,Sn.jsx)(yt,{index:!0,element:e.component},"/"):(0,Sn.jsx)(yt,{path:e.path,element:e.component},e.path)}function nse(e,t){return function(e,t){return re({basename:null==t?void 0:t.basename,future:At({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:l({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||Tt(),routes:e,mapRouteProperties:wt,unstable_dataStrategy:null==t?void 0:t.unstable_dataStrategy,unstable_patchRoutesOnMiss:null==t?void 0:t.unstable_patchRoutesOnMiss,window:null==t?void 0:t.window}).initialize()}(bt((0,Sn.jsx)(yt,{path:"/",element:(0,Sn.jsx)(Jae,{naviItems:t}),children:e.map((e=>tse(e,!0)))})))}function rse(){const e=(0,r.useContext)(F2),t=null!=e?e.userLevel:-1;var n,o;if(t<0){n=nse((o=()=>{null!=e&&e.updateUserLevel()},[{path:null,title:"Login",component:(0,Sn.jsx)(Mc,{loginCB:o})}]),[])}else n=1===t?nse(mae,vae):nse(fae,gae);return t>=0?(0,Sn.jsx)(B2,{children:(0,Sn.jsx)(ore,{children:(0,Sn.jsx)(Ot,{router:n})})}):(0,Sn.jsx)(Ot,{router:n})}const ose=function(){return(0,Sn.jsx)(V2,{child:(0,Sn.jsx)(rse,{})})},ise=e=>{e&&e instanceof Function&&n.e(453).then(n.bind(n,6453)).then((t=>{let{getCLS:n,getFID:r,getFCP:o,getLCP:i,getTTFB:a}=t;n(e),r(e),o(e),i(e),a(e)}))},ase=i.createRoot(document.getElementById("root"));wl?ase.render((0,Sn.jsx)(ose,{})):ase.render((0,Sn.jsx)(r.StrictMode,{children:(0,Sn.jsx)(ose,{})})),ise()})()})();
//# sourceMappingURL=main.04280d52.js.map