!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("stream"),require("events"),require("buffer"),require("util")):"function"==typeof define&&define.amd?define(["exports","stream","events","buffer","util"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).pptxPreview={},t.require$$0,t.require$$2,t.require$$0$1,t.require$$1)}(this,(function(t,e,n,r,i){"use strict";var o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)};function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var s=function(){return s=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=t+e.data;return n},t.prototype.concat=function(t){if(0===this.length)return e.alloc(0);for(var n,r,i,o=e.allocUnsafe(t>>>0),a=this.head,s=0;a;)n=a.data,r=o,i=s,n.copy(r,i),s+=a.data.length,a=a.next;return o},t}(),n&&n.inspect&&n.inspect.custom&&(t.exports.prototype[n.inspect.custom]=function(){var t=n.inspect({length:this.length});return this.constructor.name+" "+t})}(U)),U.exports}function Y(){if(B)return z;B=1;var t=S();function e(t,e){t.emit("error",e)}return z={destroy:function(n,r){var i=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(r?r(n):n&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,t.nextTick(e,this,n)):t.nextTick(e,this,n)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(n||null,(function(n){!r&&n?i._writableState?i._writableState.errorEmitted||(i._writableState.errorEmitted=!0,t.nextTick(e,i,n)):t.nextTick(e,i,n):r&&r(n)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}}function X(){if(j)return G;j=1;var t=S();function e(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,n){var r=t.entry;t.entry=null;for(;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree.next=t}(e,t)}}G=g;var n,r=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:t.nextTick;g.WritableState=f;var o=Object.create(L());o.inherits=E();var a={deprecate:F?V:(F=1,V=i.deprecate)},s=M(),l=A().Buffer,u=(void 0!==h?h:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var c,d=Y();function p(){}function f(i,o){n=n||q(),i=i||{};var a=o instanceof n;this.objectMode=!!i.objectMode,a&&(this.objectMode=this.objectMode||!!i.writableObjectMode);var s=i.highWaterMark,l=i.writableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=s||0===s?s:a&&(l||0===l)?l:u,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var c=!1===i.decodeStrings;this.decodeStrings=!c,this.defaultEncoding=i.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,n){var i=e._writableState,o=i.sync,a=i.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(i),n)!function(e,n,r,i,o){--n.pendingcb,r?(t.nextTick(o,i),t.nextTick(b,e,n),e._writableState.errorEmitted=!0,e.emit("error",i)):(o(i),e._writableState.errorEmitted=!0,e.emit("error",i),b(e,n))}(e,i,o,n,a);else{var s=_(i);s||i.corked||i.bufferProcessing||!i.bufferedRequest||m(e,i),o?r(v,e,i,s,a):v(e,i,s,a)}}(o,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}function g(t){if(n=n||q(),!(c.call(g,this)||this instanceof n))return new g(t);this._writableState=new f(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),s.call(this)}function y(t,e,n,r,i,o,a){e.writelen=r,e.writecb=a,e.writing=!0,e.sync=!0,n?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function v(t,e,n,r){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),b(t,e)}function m(t,n){n.bufferProcessing=!0;var r=n.bufferedRequest;if(t._writev&&r&&r.next){var i=n.bufferedRequestCount,o=new Array(i),a=n.corkedRequestsFree;a.entry=r;for(var s=0,l=!0;r;)o[s]=r,r.isBuf||(l=!1),r=r.next,s+=1;o.allBuffers=l,y(t,n,!0,n.length,o,"",a.finish),n.pendingcb++,n.lastBufferedRequest=null,a.next?(n.corkedRequestsFree=a.next,a.next=null):n.corkedRequestsFree=new e(n),n.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,h=r.callback;if(y(t,n,!1,n.objectMode?1:u.length,u,c,h),r=r.next,n.bufferedRequestCount--,n.writing)break}null===r&&(n.lastBufferedRequest=null)}n.bufferedRequest=r,n.bufferProcessing=!1}function _(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function x(t,e){t._final((function(n){e.pendingcb--,n&&t.emit("error",n),e.prefinished=!0,t.emit("prefinish"),b(t,e)}))}function b(e,n){var r=_(n);return r&&(!function(e,n){n.prefinished||n.finalCalled||("function"==typeof e._final?(n.pendingcb++,n.finalCalled=!0,t.nextTick(x,e,n)):(n.prefinished=!0,e.emit("prefinish")))}(e,n),0===n.pendingcb&&(n.finished=!0,e.emit("finish"))),r}return o.inherits(g,s),f.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(f.prototype,"buffer",{get:a.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(t){return!!c.call(this,t)||this===g&&(t&&t._writableState instanceof f)}})):c=function(t){return t instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(e,n,r){var i,o=this._writableState,a=!1,s=!o.objectMode&&(i=e,l.isBuffer(i)||i instanceof u);return s&&!l.isBuffer(e)&&(e=function(t){return l.from(t)}(e)),"function"==typeof n&&(r=n,n=null),s?n="buffer":n||(n=o.defaultEncoding),"function"!=typeof r&&(r=p),o.ended?function(e,n){var r=new Error("write after end");e.emit("error",r),t.nextTick(n,r)}(this,r):(s||function(e,n,r,i){var o=!0,a=!1;return null===r?a=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||n.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),t.nextTick(i,a),o=!1),o}(this,o,e,r))&&(o.pendingcb++,a=function(t,e,n,r,i,o){if(!n){var a=function(t,e,n){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=l.from(e,n));return e}(e,r,i);r!==a&&(n=!0,i="buffer",r=a)}var s=e.objectMode?1:r.length;e.length+=s;var u=e.length-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),g.prototype._write=function(t,e,n){n(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(e,n,r){var i=this._writableState;"function"==typeof e?(r=e,e=null,n=null):"function"==typeof n&&(r=n,n=null),null!=e&&this.write(e,n),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,n,r){n.ending=!0,b(e,n),r&&(n.finished?t.nextTick(r):e.once("finish",r));n.ended=!0,e.writable=!1}(this,i,r)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),g.prototype.destroy=d.destroy,g.prototype._undestroy=d.undestroy,g.prototype._destroy=function(t,e){this.end(),e(t)},G}function q(){if(H)return W;H=1;var t=S(),e=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};W=l;var n=Object.create(L());n.inherits=E();var r=st(),i=X();n.inherits(l,r);for(var o=e(i.prototype),a=0;a>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function i(t){var e=this.lastTotal-this.lastNeed,n=function(t,e){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function o(t,e){if((t.length-e)%2==0){var n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function a(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function s(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function l(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function u(t){return t.toString(this.encoding)}function c(t){return t&&t.length?this.write(t):""}return ot.StringDecoder=n,n.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0)return o>0&&(t.lastNeed=o-1),o;if(--i=0)return o>0&&(t.lastNeed=o-2),o;if(--i=0)return o>0&&(2===o?o=0:t.lastNeed=o-3),o;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var i=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)},n.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length},ot}function st(){if(Q)return $;Q=1;var t=S();$=x;var e,r=function(){if(g)return f;g=1;var t={}.toString;return f=Array.isArray||function(e){return"[object Array]"==t.call(e)}}();x.ReadableState=_,n.EventEmitter;var o=function(t,e){return t.listeners(e).length},a=M(),s=A().Buffer,l=(void 0!==h?h:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var u=Object.create(L());u.inherits=E();var c=i,d=void 0;d=c&&c.debuglog?c.debuglog("stream"):function(){};var p,y=Z(),v=Y();u.inherits(x,a);var m=["error","close","destroy","pause","resume"];function _(t,n){t=t||{};var r=n instanceof(e=e||q());this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,o=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(p||(p=at().StringDecoder),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function x(t){if(e=e||q(),!(this instanceof x))return new x(t);this._readableState=new _(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),a.call(this)}function b(t,e,n,r,i){var o,a=t._readableState;null===e?(a.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,T(t)}(t,a)):(i||(o=function(t,e){var n;r=e,s.isBuffer(r)||r instanceof l||"string"==typeof e||void 0===e||t.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));var r;return n}(a,e)),o?t.emit("error",o):a.objectMode||e&&e.length>0?("string"==typeof e||a.objectMode||Object.getPrototypeOf(e)===s.prototype||(e=function(t){return s.from(t)}(e)),r?a.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):w(t,a,e,!0):a.ended?t.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!n?(e=a.decoder.write(e),a.objectMode||0!==e.length?w(t,a,e,!1):D(t,a)):w(t,a,e,!1))):r||(a.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=I?t=I:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function T(e){var n=e._readableState;n.needReadable=!1,n.emittedReadable||(d("emitReadable",n.flowing),n.emittedReadable=!0,n.sync?t.nextTick(k,e):k(e))}function k(t){d("emit readable"),t.emit("readable"),N(t)}function D(e,n){n.readingMore||(n.readingMore=!0,t.nextTick(P,e,n))}function P(t,e){for(var n=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):n=function(t,e,n){var r;to.length?o.length:t;if(a===o.length?i+=o:i+=o.slice(0,t),0===(t-=a)){a===o.length?(++r,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(a));break}++r}return e.length-=r,i}(t,e):function(t,e){var n=s.allocUnsafe(t),r=e.head,i=1;r.data.copy(n),t-=r.data.length;for(;r=r.next;){var o=r.data,a=t>o.length?o.length:t;if(o.copy(n,n.length-t,0,a),0===(t-=a)){a===o.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(a));break}++i}return e.length-=i,n}(t,e);return r}(t,e.buffer,e.decoder),n);var n}function B(e){var n=e._readableState;if(n.length>0)throw new Error('"endReadable()" called on non-empty stream');n.endEmitted||(n.ended=!0,t.nextTick(V,n,e))}function V(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function F(t,e){for(var n=0,r=t.length;n=e.highWaterMark||e.ended))return d("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?B(this):T(this),null;if(0===(t=C(t,e))&&e.ended)return 0===e.length&&B(this),null;var r,i=e.needReadable;return d("need readable",i),(0===e.length||e.length-t0?z(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&B(this)),null!==r&&this.emit("data",r),r},x.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},x.prototype.pipe=function(e,n){var i=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e)}a.pipesCount+=1,d("pipe count=%d opts=%j",a.pipesCount,n);var s=(!n||!1!==n.end)&&e!==process.stdout&&e!==process.stderr?u:m;function l(t,n){d("onunpipe"),t===i&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,d("cleanup"),e.removeListener("close",y),e.removeListener("finish",v),e.removeListener("drain",c),e.removeListener("error",g),e.removeListener("unpipe",l),i.removeListener("end",u),i.removeListener("end",m),i.removeListener("data",f),h=!0,!a.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function u(){d("onend"),e.end()}a.endEmitted?t.nextTick(s):i.once("end",s),e.on("unpipe",l);var c=function(t){return function(){var e=t._readableState;d("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,N(t))}}(i);e.on("drain",c);var h=!1;var p=!1;function f(t){d("ondata"),p=!1,!1!==e.write(t)||p||((1===a.pipesCount&&a.pipes===e||a.pipesCount>1&&-1!==F(a.pipes,e))&&!h&&(d("false write response, pause",a.awaitDrain),a.awaitDrain++,p=!0),i.pause())}function g(t){d("onerror",t),m(),e.removeListener("error",g),0===o(e,"error")&&e.emit("error",t)}function y(){e.removeListener("finish",v),m()}function v(){d("onfinish"),e.removeListener("close",y),m()}function m(){d("unpipe"),i.unpipe(e)}return i.on("data",f),function(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?r(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}(e,"error",g),e.once("close",y),e.once("finish",v),e.emit("pipe",i),a.flowing||(d("pipe resume"),i.resume()),e},x.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n)),this;if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o>2,s=(3&r)<<4|i>>4,l=p>1?(15&i)<<2|o>>6:64,u=p>2?63&o:64,c.push(n.charAt(a)+n.charAt(s)+n.charAt(l)+n.charAt(u));return c.join("")},xt.decode=function(t){var r,i,o,a,s,l,u=0,c=0,h="data:";if(t.substr(0,5)===h)throw new Error("Invalid base64 input, it looks like a data url.");var d,p=3*(t=t.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(t.charAt(t.length-1)===n.charAt(64)&&p--,t.charAt(t.length-2)===n.charAt(64)&&p--,p%1!=0)throw new Error("Invalid base64 input, bad content length.");for(d=e.uint8array?new Uint8Array(0|p):new Array(0|p);u>4,i=(15&a)<<4|(s=n.indexOf(t.charAt(u++)))>>2,o=(3&s)<<6|(l=n.indexOf(t.charAt(u++))),d[c++]=r,64!==s&&(d[c++]=i),64!==l&&(d[c++]=o);return d},xt}function wt(){return pt?dt:(pt=1,dt={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(t,e){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(t,e);if("number"==typeof t)throw new Error('The "data" argument must not be a number');return new Buffer(t,e)},allocBuffer:function(t){if(Buffer.alloc)return Buffer.alloc(t);var e=new Buffer(t);return e.fill(0),e},isBuffer:function(t){return Buffer.isBuffer(t)},isStream:function(t){return t&&"function"==typeof t.on&&"function"==typeof t.pause&&"function"==typeof t.resume}})}function St(){if(vt)return yt;vt=1;var t=function(){if(gt)return ft;gt=1;var t,e,n=h.MutationObserver||h.WebKitMutationObserver;if(process.browser)if(n){var r=0,i=new n(l),o=h.document.createTextNode("");i.observe(o,{characterData:!0}),t=function(){o.data=r=++r%2}}else if(h.setImmediate||void 0===h.MessageChannel)t="document"in h&&"onreadystatechange"in h.document.createElement("script")?function(){var t=h.document.createElement("script");t.onreadystatechange=function(){l(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},h.document.documentElement.appendChild(t)}:function(){setTimeout(l,0)};else{var a=new h.MessageChannel;a.port1.onmessage=l,t=function(){a.port2.postMessage(0)}}else t=function(){process.nextTick(l)};var s=[];function l(){var t,n;e=!0;for(var r=s.length;r;){for(n=s,s=[],t=-1;++t1;)try{return s.stringifyByChunk(e,r,n)}catch(t){n=Math.floor(n/2)}return s.stringifyByChar(e)}function u(t,e){for(var n=0;n "+t:t}},At=t}function Vt(){return kt||(kt=1,function(t){for(var e=zt(),n=ct(),r=wt(),i=Bt(),o=new Array(256),a=0;a<256;a++)o[a]=a>=252?6:a>=248?5:a>=240?4:a>=224?3:a>=192?2:1;o[254]=o[254]=1;function s(){i.call(this,"utf-8 decode"),this.leftOver=null}function l(){i.call(this,"utf-8 encode")}t.utf8encode=function(t){return n.nodebuffer?r.newBufferFrom(t,"utf-8"):function(t){var e,r,i,o,a,s=t.length,l=0;for(o=0;o>>6,e[a++]=128|63&r):r<65536?(e[a++]=224|r>>>12,e[a++]=128|r>>>6&63,e[a++]=128|63&r):(e[a++]=240|r>>>18,e[a++]=128|r>>>12&63,e[a++]=128|r>>>6&63,e[a++]=128|63&r);return e}(t)},t.utf8decode=function(t){return n.nodebuffer?e.transformTo("nodebuffer",t).toString("utf-8"):function(t){var n,r,i,a,s=t.length,l=new Array(2*s);for(r=0,n=0;n4)l[r++]=65533,n+=a-1;else{for(i&=2===a?31:3===a?15:7;a>1&&n1?l[r++]=65533:i<65536?l[r++]=i:(i-=65536,l[r++]=55296|i>>10&1023,l[r++]=56320|1023&i)}return l.length!==r&&(l.subarray?l=l.subarray(0,r):l.length=r),e.applyFromCharCode(l)}(t=e.transformTo(n.uint8array?"uint8array":"array",t))},e.inherits(s,i),s.prototype.processChunk=function(r){var i=e.transformTo(n.uint8array?"uint8array":"array",r.data);if(this.leftOver&&this.leftOver.length){if(n.uint8array){var a=i;(i=new Uint8Array(a.length+this.leftOver.length)).set(this.leftOver,0),i.set(a,this.leftOver.length)}else i=this.leftOver.concat(i);this.leftOver=null}var s=function(t,e){var n;for((e=e||t.length)>t.length&&(e=t.length),n=e-1;n>=0&&128==(192&t[n]);)n--;return n<0||0===n?e:n+o[t[n]]>e?n:e}(i),l=i;s!==i.length&&(n.uint8array?(l=i.subarray(0,s),this.leftOver=i.subarray(s,i.length)):(l=i.slice(0,s),this.leftOver=i.slice(s,i.length))),this.push({data:t.utf8decode(l),meta:r.meta})},s.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:t.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},t.Utf8DecodeWorker=s,e.inherits(l,i),l.prototype.processChunk=function(e){this.push({data:t.utf8encode(e.data),meta:e.meta})},t.Utf8EncodeWorker=l}(m)),m}function Ft(){if(Et)return Ot;Et=1;var t=zt(),e=function(){if(Dt)return Lt;Dt=1;var t=Bt(),e=zt();function n(e){t.call(this,"ConvertWorker to "+e),this.destType=e}return e.inherits(n,t),n.prototype.processChunk=function(t){this.push({data:e.transformTo(this.destType,t.data),meta:t.meta})},Lt=n}(),n=Bt(),r=bt(),i=ct(),o=Mt(),a=null;if(i.nodestream)try{a=function(){if(Rt)return Pt;Rt=1;var t=ut().Readable;function e(e,n,r){t.call(this,n),this._helper=e;var i=this;e.on("data",(function(t,e){i.push(t)||i._helper.pause(),r&&r(e)})).on("error",(function(t){i.emit("error",t)})).on("end",(function(){i.push(null)}))}return zt().inherits(e,t),e.prototype._read=function(){this._helper.resume()},Pt=e}()}catch(t){}function s(e,n){return new o.Promise((function(i,o){var a=[],s=e._internalType,l=e._outputType,u=e._mimeType;e.on("data",(function(t,e){a.push(t),n&&n(e)})).on("error",(function(t){a=[],o(t)})).on("end",(function(){try{var e=function(e,n,i){switch(e){case"blob":return t.newBlob(t.transformTo("arraybuffer",n),i);case"base64":return r.encode(n);default:return t.transformTo(e,n)}}(l,function(t,e){var n,r=0,i=null,o=0;for(n=0;n=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,e);break;case"uint8array":t=this.data.subarray(this.index,e);break;case"array":case"nodebuffer":t=this.data.slice(this.index,e)}return this.index=e,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})},jt=n}function re(){if(Ut)return Ht;Ut=1;var t=zt();var e=function(){for(var t,e=[],n=0;n<256;n++){t=n;for(var r=0;r<8;r++)t=1&t?3988292384^t>>>1:t>>>1;e[n]=t}return e}();return Ht=function(n,r){return void 0!==n&&n.length?"string"!==t.getTypeOf(n)?function(t,n,r,i){var o=e,a=i+r;t=~t;for(var s=i;s>>8^o[255&(t^n[s])];return~t}(0|r,n,n.length,0):function(t,n,r,i){var o=e,a=i+r;t=~t;for(var s=i;s>>8^o[255&(t^n.charCodeAt(s))];return~t}(0|r,n,n.length,0):0},Ht}function ie(){if(Yt)return Zt;Yt=1;var t=Bt(),e=re();function n(){t.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}return zt().inherits(n,t),n.prototype.processChunk=function(t){this.streamInfo.crc32=e(t.data,this.streamInfo.crc32||0),this.push(t)},Zt=n}function oe(){if($t)return Kt;$t=1;var t=Mt(),e=ne(),n=ie(),r=function(){if(qt)return Xt;qt=1;var t=zt(),e=Bt();function n(t){e.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}return t.inherits(n,e),n.prototype.processChunk=function(t){if(t){var n=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=n+t.data.length}e.prototype.processChunk.call(this,t)},Xt=n}();function i(t,e,n,r,i){this.compressedSize=t,this.uncompressedSize=e,this.crc32=n,this.compression=r,this.compressedContent=i}return i.prototype={getContentWorker:function(){var n=new e(t.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new r("data_length")),i=this;return n.on("end",(function(){if(this.streamInfo.data_length!==i.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),n},getCompressedWorker:function(){return new e(t.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},i.createWorkerFrom=function(t,e,i){return t.pipe(new n).pipe(new r("uncompressedSize")).pipe(e.compressWorker(i)).pipe(new r("compressedSize")).withStreamInfo("compression",e)},Kt=i}var ae,se={},le={},ue={},ce={};function he(){return ae||(ae=1,function(t){var e="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var i in r)n(r,i)&&(t[i]=r[i])}}return t},t.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var r={arraySet:function(t,e,n,r,i){if(e.subarray&&t.subarray)t.set(e.subarray(n,n+r),i);else for(var o=0;o=0;)t[e]=0}var n=256,r=286,i=30,o=15,a=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],s=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],l=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],u=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],c=new Array(576);e(c);var h=new Array(60);e(h);var d=new Array(512);e(d);var p=new Array(256);e(p);var f=new Array(29);e(f);var g,y,v,m=new Array(i);function _(t,e,n,r,i){this.static_tree=t,this.extra_bits=e,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=t&&t.length}function x(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function b(t){return t<256?d[t]:d[256+(t>>>7)]}function w(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function S(t,e,n){t.bi_valid>16-n?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=n-16):(t.bi_buf|=e<>>=1,n<<=1}while(--e>0);return n>>>1}function C(t,e,n){var r,i,a=new Array(16),s=0;for(r=1;r<=o;r++)a[r]=s=s+n[r-1]<<1;for(i=0;i<=e;i++){var l=t[2*i+1];0!==l&&(t[2*i]=I(a[l]++,l))}}function A(t){var e;for(e=0;e8?w(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function k(t,e,n,r){var i=2*e,o=2*n;return t[i]>1;n>=1;n--)L(t,a,n);i=u;do{n=t.heap[1],t.heap[1]=t.heap[t.heap_len--],L(t,a,1),r=t.heap[1],t.heap[--t.heap_max]=n,t.heap[--t.heap_max]=r,a[2*i]=a[2*n]+a[2*r],t.depth[i]=(t.depth[n]>=t.depth[r]?t.depth[n]:t.depth[r])+1,a[2*n+1]=a[2*r+1]=i,t.heap[1]=i++,L(t,a,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var n,r,i,a,s,l,u=e.dyn_tree,c=e.max_code,h=e.stat_desc.static_tree,d=e.stat_desc.has_stree,p=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,g=e.stat_desc.max_length,y=0;for(a=0;a<=o;a++)t.bl_count[a]=0;for(u[2*t.heap[t.heap_max]+1]=0,n=t.heap_max+1;n<573;n++)(a=u[2*u[2*(r=t.heap[n])+1]+1]+1)>g&&(a=g,y++),u[2*r+1]=a,r>c||(t.bl_count[a]++,s=0,r>=f&&(s=p[r-f]),l=u[2*r],t.opt_len+=l*(a+s),d&&(t.static_len+=l*(h[2*r+1]+s)));if(0!==y){do{for(a=g-1;0===t.bl_count[a];)a--;t.bl_count[a]--,t.bl_count[a+1]+=2,t.bl_count[g]--,y-=2}while(y>0);for(a=g;0!==a;a--)for(r=t.bl_count[a];0!==r;)(i=t.heap[--n])>c||(u[2*i+1]!==a&&(t.opt_len+=(a-u[2*i+1])*u[2*i],u[2*i+1]=a),r--)}}(t,e),C(a,c,t.bl_count)}function R(t,e,n){var r,i,o=-1,a=e[1],s=0,l=7,u=4;for(0===a&&(l=138,u=3),e[2*(n+1)+1]=65535,r=0;r<=n;r++)i=a,a=e[2*(r+1)+1],++s>=7;u0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e=3&&0===t.bl_tree[2*u[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),o=t.opt_len+3+7>>>3,(a=t.static_len+3+7>>>3)<=o&&(o=a)):o=a=r+5,r+4<=o&&-1!==e?N(t,e,r,i):4===t.strategy||a===o?(S(t,2+(i?1:0),3),D(t,c,h)):(S(t,4+(i?1:0),3),function(t,e,n,r){var i;for(S(t,e-257,5),S(t,n-1,5),S(t,r-4,4),i=0;i>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(p[r]+n+1)]++,t.dyn_dtree[2*b(e)]++),t.last_lit===t.lit_bufsize-1},we._tr_align=function(t){S(t,2,3),M(t,256,c),function(t){16===t.bi_valid?(w(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)},we}function Me(){if(fe)return pe;return fe=1,pe=function(t,e,n,r){for(var i=65535&t,o=t>>>16&65535,a=0;0!==n;){n-=a=n>2e3?2e3:n;do{o=o+(i=i+e[r++]|0)|0}while(--a);i%=65521,o%=65521}return i|o<<16},pe}function Ie(){if(ye)return ge;ye=1;var t=function(){for(var t,e=[],n=0;n<256;n++){t=n;for(var r=0;r<8;r++)t=1&t?3988292384^t>>>1:t>>>1;e[n]=t}return e}();return ge=function(e,n,r,i){var o=t,a=i+r;e^=-1;for(var s=i;s>>8^o[255&(e^n[s])];return~e},ge}function Ce(){return me?ve:(me=1,ve={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"})}function Ae(){if(_e)return be;_e=1;var t,e=he(),n=Se(),r=Me(),i=Ie(),o=Ce(),a=-2,s=258,l=262,u=103,c=113,h=666;function d(t,e){return t.msg=o[e],e}function p(t){return(t<<1)-(t>4?9:0)}function f(t){for(var e=t.length;--e>=0;)t[e]=0}function g(t){var n=t.state,r=n.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(e.arraySet(t.output,n.pending_buf,n.pending_out,r,t.next_out),t.next_out+=r,n.pending_out+=r,t.total_out+=r,t.avail_out-=r,n.pending-=r,0===n.pending&&(n.pending_out=0))}function y(t,e){n._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,g(t.strm)}function v(t,e){t.pending_buf[t.pending++]=e}function m(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function _(t,n,o,a){var s=t.avail_in;return s>a&&(s=a),0===s?0:(t.avail_in-=s,e.arraySet(n,t.input,t.next_in,s,o),1===t.state.wrap?t.adler=r(t.adler,n,s,o):2===t.state.wrap&&(t.adler=i(t.adler,n,s,o)),t.next_in+=s,t.total_in+=s,s)}function x(t,e){var n,r,i=t.max_chain_length,o=t.strstart,a=t.prev_length,u=t.nice_match,c=t.strstart>t.w_size-l?t.strstart-(t.w_size-l):0,h=t.window,d=t.w_mask,p=t.prev,f=t.strstart+s,g=h[o+a-1],y=h[o+a];t.prev_length>=t.good_match&&(i>>=2),u>t.lookahead&&(u=t.lookahead);do{if(h[(n=e)+a]===y&&h[n+a-1]===g&&h[n]===h[o]&&h[++n]===h[o+1]){o+=2,n++;do{}while(h[++o]===h[++n]&&h[++o]===h[++n]&&h[++o]===h[++n]&&h[++o]===h[++n]&&h[++o]===h[++n]&&h[++o]===h[++n]&&h[++o]===h[++n]&&h[++o]===h[++n]&&oa){if(t.match_start=e,a=r,r>=u)break;g=h[o+a-1],y=h[o+a]}}}while((e=p[e&d])>c&&0!=--i);return a<=t.lookahead?a:t.lookahead}function b(t){var n,r,i,o,a,s=t.w_size;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-l)){e.arraySet(t.window,t.window,s,s,0),t.match_start-=s,t.strstart-=s,t.block_start-=s,n=r=t.hash_size;do{i=t.head[--n],t.head[n]=i>=s?i-s:0}while(--r);n=r=s;do{i=t.prev[--n],t.prev[n]=i>=s?i-s:0}while(--r);o+=s}if(0===t.strm.avail_in)break;if(r=_(t.strm,t.window,t.strstart+t.lookahead,o),t.lookahead+=r,t.lookahead+t.insert>=3)for(a=t.strstart-t.insert,t.ins_h=t.window[a],t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<=3)if(i=n._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){o=t.strstart+t.lookahead-3,i=n._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=o&&(t.ins_h=(t.ins_h<15&&(l=2,i-=16),o<1||o>9||8!==r||i<8||i>15||n<0||n>9||s<0||s>4)return d(t,a);8===i&&(i=9);var u=new I;return t.state=u,u.strm=t,u.wrap=l,u.gzhead=null,u.w_bits=i,u.w_size=1<t.pending_buf_size-5&&(n=t.pending_buf_size-5);;){if(t.lookahead<=1){if(b(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var r=t.block_start+n;if((0===t.strstart||t.strstart>=r)&&(t.lookahead=t.strstart-r,t.strstart=r,y(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-l&&(y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(y(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(y(t,!1),t.strm.avail_out),1)})),new M(4,4,8,4,w),new M(4,5,16,8,w),new M(4,6,32,32,w),new M(4,4,16,16,S),new M(8,16,32,32,S),new M(8,16,128,128,S),new M(8,32,128,256,S),new M(32,128,258,1024,S),new M(32,258,258,4096,S)],be.deflateInit=function(t,e){return T(t,e,8,15,8,0)},be.deflateInit2=T,be.deflateReset=A,be.deflateResetKeep=C,be.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?a:(t.state.gzhead=e,0):a},be.deflate=function(e,r){var o,l,_,x;if(!e||!e.state||r>5||r<0)return e?d(e,a):a;if(l=e.state,!e.output||!e.input&&0!==e.avail_in||l.status===h&&4!==r)return d(e,0===e.avail_out?-5:a);if(l.strm=e,o=l.last_flush,l.last_flush=r,42===l.status)if(2===l.wrap)e.adler=0,v(l,31),v(l,139),v(l,8),l.gzhead?(v(l,(l.gzhead.text?1:0)+(l.gzhead.hcrc?2:0)+(l.gzhead.extra?4:0)+(l.gzhead.name?8:0)+(l.gzhead.comment?16:0)),v(l,255&l.gzhead.time),v(l,l.gzhead.time>>8&255),v(l,l.gzhead.time>>16&255),v(l,l.gzhead.time>>24&255),v(l,9===l.level?2:l.strategy>=2||l.level<2?4:0),v(l,255&l.gzhead.os),l.gzhead.extra&&l.gzhead.extra.length&&(v(l,255&l.gzhead.extra.length),v(l,l.gzhead.extra.length>>8&255)),l.gzhead.hcrc&&(e.adler=i(e.adler,l.pending_buf,l.pending,0)),l.gzindex=0,l.status=69):(v(l,0),v(l,0),v(l,0),v(l,0),v(l,0),v(l,9===l.level?2:l.strategy>=2||l.level<2?4:0),v(l,3),l.status=c);else{var w=8+(l.w_bits-8<<4)<<8;w|=(l.strategy>=2||l.level<2?0:l.level<6?1:6===l.level?2:3)<<6,0!==l.strstart&&(w|=32),w+=31-w%31,l.status=c,m(l,w),0!==l.strstart&&(m(l,e.adler>>>16),m(l,65535&e.adler)),e.adler=1}if(69===l.status)if(l.gzhead.extra){for(_=l.pending;l.gzindex<(65535&l.gzhead.extra.length)&&(l.pending!==l.pending_buf_size||(l.gzhead.hcrc&&l.pending>_&&(e.adler=i(e.adler,l.pending_buf,l.pending-_,_)),g(e),_=l.pending,l.pending!==l.pending_buf_size));)v(l,255&l.gzhead.extra[l.gzindex]),l.gzindex++;l.gzhead.hcrc&&l.pending>_&&(e.adler=i(e.adler,l.pending_buf,l.pending-_,_)),l.gzindex===l.gzhead.extra.length&&(l.gzindex=0,l.status=73)}else l.status=73;if(73===l.status)if(l.gzhead.name){_=l.pending;do{if(l.pending===l.pending_buf_size&&(l.gzhead.hcrc&&l.pending>_&&(e.adler=i(e.adler,l.pending_buf,l.pending-_,_)),g(e),_=l.pending,l.pending===l.pending_buf_size)){x=1;break}x=l.gzindex_&&(e.adler=i(e.adler,l.pending_buf,l.pending-_,_)),0===x&&(l.gzindex=0,l.status=91)}else l.status=91;if(91===l.status)if(l.gzhead.comment){_=l.pending;do{if(l.pending===l.pending_buf_size&&(l.gzhead.hcrc&&l.pending>_&&(e.adler=i(e.adler,l.pending_buf,l.pending-_,_)),g(e),_=l.pending,l.pending===l.pending_buf_size)){x=1;break}x=l.gzindex_&&(e.adler=i(e.adler,l.pending_buf,l.pending-_,_)),0===x&&(l.status=u)}else l.status=u;if(l.status===u&&(l.gzhead.hcrc?(l.pending+2>l.pending_buf_size&&g(e),l.pending+2<=l.pending_buf_size&&(v(l,255&e.adler),v(l,e.adler>>8&255),e.adler=0,l.status=c)):l.status=c),0!==l.pending){if(g(e),0===e.avail_out)return l.last_flush=-1,0}else if(0===e.avail_in&&p(r)<=p(o)&&4!==r)return d(e,-5);if(l.status===h&&0!==e.avail_in)return d(e,-5);if(0!==e.avail_in||0!==l.lookahead||0!==r&&l.status!==h){var S=2===l.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(b(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,r=n._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(y(t,!1),0===t.strm.avail_out)?1:2}(l,r):3===l.strategy?function(t,e){for(var r,i,o,a,l=t.window;;){if(t.lookahead<=s){if(b(t),t.lookahead<=s&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(i=l[o=t.strstart-1])===l[++o]&&i===l[++o]&&i===l[++o]){a=t.strstart+s;do{}while(i===l[++o]&&i===l[++o]&&i===l[++o]&&i===l[++o]&&i===l[++o]&&i===l[++o]&&i===l[++o]&&i===l[++o]&&ot.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=n._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=n._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(y(t,!1),0===t.strm.avail_out)?1:2}(l,r):t[l.level].func(l,r);if(3!==S&&4!==S||(l.status=h),1===S||3===S)return 0===e.avail_out&&(l.last_flush=-1),0;if(2===S&&(1===r?n._tr_align(l):5!==r&&(n._tr_stored_block(l,0,0,!1),3===r&&(f(l.head),0===l.lookahead&&(l.strstart=0,l.block_start=0,l.insert=0))),g(e),0===e.avail_out))return l.last_flush=-1,0}return 4!==r?0:l.wrap<=0?1:(2===l.wrap?(v(l,255&e.adler),v(l,e.adler>>8&255),v(l,e.adler>>16&255),v(l,e.adler>>24&255),v(l,255&e.total_in),v(l,e.total_in>>8&255),v(l,e.total_in>>16&255),v(l,e.total_in>>24&255)):(m(l,e.adler>>>16),m(l,65535&e.adler)),g(e),l.wrap>0&&(l.wrap=-l.wrap),0!==l.pending?0:1)},be.deflateEnd=function(t){var e;return t&&t.state?42!==(e=t.state.status)&&69!==e&&73!==e&&91!==e&&e!==u&&e!==c&&e!==h?d(t,a):(t.state=null,e===c?d(t,-3):0):a},be.deflateSetDictionary=function(t,n){var i,o,s,l,u,c,h,d,p=n.length;if(!t||!t.state)return a;if(2===(l=(i=t.state).wrap)||1===l&&42!==i.status||i.lookahead)return a;for(1===l&&(t.adler=r(t.adler,n,p,0)),i.wrap=0,p>=i.w_size&&(0===l&&(f(i.head),i.strstart=0,i.block_start=0,i.insert=0),d=new e.Buf8(i.w_size),e.arraySet(d,n,p-i.w_size,i.w_size,0),n=d,p=i.w_size),u=t.avail_in,c=t.next_in,h=t.input,t.avail_in=p,t.next_in=0,t.input=n,b(i);i.lookahead>=3;){o=i.strstart,s=i.lookahead-2;do{i.ins_h=(i.ins_h<=252?6:i>=248?5:i>=240?4:i>=224?3:i>=192?2:1;function o(r,i){if(i<65534&&(r.subarray&&n||!r.subarray&&e))return String.fromCharCode.apply(null,t.shrinkBuf(r,i));for(var o="",a=0;a>>6,n[a++]=128|63&r):r<65536?(n[a++]=224|r>>>12,n[a++]=128|r>>>6&63,n[a++]=128|63&r):(n[a++]=240|r>>>18,n[a++]=128|r>>>12&63,n[a++]=128|r>>>6&63,n[a++]=128|63&r);return n},Pe.buf2binstring=function(t){return o(t,t.length)},Pe.binstring2buf=function(e){for(var n=new t.Buf8(e.length),r=0,i=n.length;r4)u[i++]=65533,n+=s-1;else{for(a&=2===s?31:3===s?15:7;s>1&&n1?u[i++]=65533:a<65536?u[i++]=a:(a-=65536,u[i++]=55296|a>>10&1023,u[i++]=56320|1023&a)}return o(u,i)},Pe.utf8border=function(t,e){var n;for((e=e||t.length)>t.length&&(e=t.length),n=e-1;n>=0&&128==(192&t[n]);)n--;return n<0||0===n?e:n+r[t[n]]>e?n:e},Pe}function Oe(){if(Le)return ke;return Le=1,ke=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}}var Ee,Ne,ze,Be,Ve,Fe,Ge,je,We,He,Ue,Ze,Ye,Xe,qe={},Ke={};function $e(){if(Ve)return Ke;Ve=1;var t=he(),e=Me(),n=Ie(),r=(Ne||(Ne=1,Ee=function(t,e){var n,r,i,o,a,s,l,u,c,h,d,p,f,g,y,v,m,_,x,b,w,S,M,I,C;n=t.state,r=t.next_in,I=t.input,i=r+(t.avail_in-5),o=t.next_out,C=t.output,a=o-(e-t.avail_out),s=o+(t.avail_out-257),l=n.dmax,u=n.wsize,c=n.whave,h=n.wnext,d=n.window,p=n.hold,f=n.bits,g=n.lencode,y=n.distcode,v=(1<>>=x=_>>>24,f-=x,0==(x=_>>>16&255))C[o++]=65535&_;else{if(!(16&x)){if(64&x){if(32&x){n.mode=12;break t}t.msg="invalid literal/length code",n.mode=30;break t}_=g[(65535&_)+(p&(1<>>=x,f-=x),f<15&&(p+=I[r++]<>>=x=_>>>24,f-=x,16&(x=_>>>16&255)){if(w=65535&_,f<(x&=15)&&(p+=I[r++]<l){t.msg="invalid distance too far back",n.mode=30;break t}if(p>>>=x,f-=x,w>(x=o-a)){if((x=w-x)>c&&n.sane){t.msg="invalid distance too far back",n.mode=30;break t}if(S=0,M=d,0===h){if(S+=u-x,x2;)C[o++]=M[S++],C[o++]=M[S++],C[o++]=M[S++],b-=3;b&&(C[o++]=M[S++],b>1&&(C[o++]=M[S++]))}else{S=o-w;do{C[o++]=C[S++],C[o++]=C[S++],C[o++]=C[S++],b-=3}while(b>2);b&&(C[o++]=C[S++],b>1&&(C[o++]=C[S++]))}break}if(64&x){t.msg="invalid distance code",n.mode=30;break t}_=y[(65535&_)+(p&(1<>3,p&=(1<<(f-=b<<3))-1,t.next_in=r,t.next_out=o,t.avail_in=r=1&&0===N[A];A--);if(T>A&&(T=A),0===A)return c[h++]=20971520,c[h++]=20971520,p.bits=1,0;for(C=1;C0&&(0===a||1!==A))return-1;for(z[1]=0,M=1;M852||2===a&&P>592)return 1;for(;;){x=M-L,d[I]<_?(b=0,w=d[I]):d[I]>_?(b=B[V+d[I]],w=O[E+d[I]]):(b=96,w=0),f=1<>L)+(g-=f)]=x<<24|b<<16|w}while(0!==g);for(f=1<>=1;if(0!==f?(R&=f-1,R+=f):R=0,I++,0==--N[M]){if(M===A)break;M=s[l+d[I]]}if(M>T&&(R&v)!==y){for(0===L&&(L=T),m+=C,D=1<<(k=M-L);k+L852||2===a&&P>592)return 1;c[y=R&v]=T<<24|k<<16|m-h}}return 0!==R&&(c[m+R]=M-L<<24|64<<16),p.bits=T,0},ze}(),o=-2,a=12,s=30;function l(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function u(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new t.Buf16(320),this.work=new t.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function c(e){var n;return e&&e.state?(n=e.state,e.total_in=e.total_out=n.total=0,e.msg="",n.wrap&&(e.adler=1&n.wrap),n.mode=1,n.last=0,n.havedict=0,n.dmax=32768,n.head=null,n.hold=0,n.bits=0,n.lencode=n.lendyn=new t.Buf32(852),n.distcode=n.distdyn=new t.Buf32(592),n.sane=1,n.back=-1,0):o}function h(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,c(t)):o}function d(t,e){var n,r;return t&&t.state?(r=t.state,e<0?(n=0,e=-e):(n=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?o:(null!==r.window&&r.wbits!==e&&(r.window=null),r.wrap=n,r.wbits=e,h(t))):o}function p(t,e){var n,r;return t?(r=new u,t.state=r,r.window=null,0!==(n=d(t,e))&&(t.state=null),n):o}var f,g,y=!0;function v(e){if(y){var n;for(f=new t.Buf32(512),g=new t.Buf32(32),n=0;n<144;)e.lens[n++]=8;for(;n<256;)e.lens[n++]=9;for(;n<280;)e.lens[n++]=7;for(;n<288;)e.lens[n++]=8;for(i(1,e.lens,0,288,f,0,e.work,{bits:9}),n=0;n<32;)e.lens[n++]=5;i(2,e.lens,0,32,g,0,e.work,{bits:5}),y=!1}e.lencode=f,e.lenbits=9,e.distcode=g,e.distbits=5}function m(e,n,r,i){var o,a=e.state;return null===a.window&&(a.wsize=1<=a.wsize?(t.arraySet(a.window,n,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>i&&(o=i),t.arraySet(a.window,n,r-i,o,a.wnext),(i-=o)?(t.arraySet(a.window,n,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,h.check=n(h.check,B,2,0),x=0,b=0,h.mode=2;break}if(h.flags=0,h.head&&(h.head.done=!1),!(1&h.wrap)||(((255&x)<<8)+(x>>8))%31){u.msg="incorrect header check",h.mode=s;break}if(8!=(15&x)){u.msg="unknown compression method",h.mode=s;break}if(b-=4,R=8+(15&(x>>>=4)),0===h.wbits)h.wbits=R;else if(R>h.wbits){u.msg="invalid window size",h.mode=s;break}h.dmax=1<>8&1),512&h.flags&&(B[0]=255&x,B[1]=x>>>8&255,h.check=n(h.check,B,2,0)),x=0,b=0,h.mode=3;case 3:for(;b<32;){if(0===y)break t;y--,x+=d[f++]<>>8&255,B[2]=x>>>16&255,B[3]=x>>>24&255,h.check=n(h.check,B,4,0)),x=0,b=0,h.mode=4;case 4:for(;b<16;){if(0===y)break t;y--,x+=d[f++]<>8),512&h.flags&&(B[0]=255&x,B[1]=x>>>8&255,h.check=n(h.check,B,2,0)),x=0,b=0,h.mode=5;case 5:if(1024&h.flags){for(;b<16;){if(0===y)break t;y--,x+=d[f++]<>>8&255,h.check=n(h.check,B,2,0)),x=0,b=0}else h.head&&(h.head.extra=null);h.mode=6;case 6:if(1024&h.flags&&((M=h.length)>y&&(M=y),M&&(h.head&&(R=h.head.extra_len-h.length,h.head.extra||(h.head.extra=new Array(h.head.extra_len)),t.arraySet(h.head.extra,d,f,M,R)),512&h.flags&&(h.check=n(h.check,d,M,f)),y-=M,f+=M,h.length-=M),h.length))break t;h.length=0,h.mode=7;case 7:if(2048&h.flags){if(0===y)break t;M=0;do{R=d[f+M++],h.head&&R&&h.length<65536&&(h.head.name+=String.fromCharCode(R))}while(R&&M>9&1,h.head.done=!0),u.adler=h.check=0,h.mode=a;break;case 10:for(;b<32;){if(0===y)break t;y--,x+=d[f++]<>>=7&b,b-=7&b,h.mode=27;break}for(;b<3;){if(0===y)break t;y--,x+=d[f++]<>>=1)){case 0:h.mode=14;break;case 1:if(v(h),h.mode=20,6===c){x>>>=2,b-=2;break t}break;case 2:h.mode=17;break;case 3:u.msg="invalid block type",h.mode=s}x>>>=2,b-=2;break;case 14:for(x>>>=7&b,b-=7&b;b<32;){if(0===y)break t;y--,x+=d[f++]<>>16^65535)){u.msg="invalid stored block lengths",h.mode=s;break}if(h.length=65535&x,x=0,b=0,h.mode=15,6===c)break t;case 15:h.mode=16;case 16:if(M=h.length){if(M>y&&(M=y),M>_&&(M=_),0===M)break t;t.arraySet(p,d,f,M,g),y-=M,f+=M,_-=M,g+=M,h.length-=M;break}h.mode=a;break;case 17:for(;b<14;){if(0===y)break t;y--,x+=d[f++]<>>=5,b-=5,h.ndist=1+(31&x),x>>>=5,b-=5,h.ncode=4+(15&x),x>>>=4,b-=4,h.nlen>286||h.ndist>30){u.msg="too many length or distance symbols",h.mode=s;break}h.have=0,h.mode=18;case 18:for(;h.have>>=3,b-=3}for(;h.have<19;)h.lens[V[h.have++]]=0;if(h.lencode=h.lendyn,h.lenbits=7,E={bits:h.lenbits},O=i(0,h.lens,0,19,h.lencode,0,h.work,E),h.lenbits=E.bits,O){u.msg="invalid code lengths set",h.mode=s;break}h.have=0,h.mode=19;case 19:for(;h.have>>16&255,k=65535&z,!((A=z>>>24)<=b);){if(0===y)break t;y--,x+=d[f++]<>>=A,b-=A,h.lens[h.have++]=k;else{if(16===k){for(N=A+2;b>>=A,b-=A,0===h.have){u.msg="invalid bit length repeat",h.mode=s;break}R=h.lens[h.have-1],M=3+(3&x),x>>>=2,b-=2}else if(17===k){for(N=A+3;b>>=A)),x>>>=3,b-=3}else{for(N=A+7;b>>=A)),x>>>=7,b-=7}if(h.have+M>h.nlen+h.ndist){u.msg="invalid bit length repeat",h.mode=s;break}for(;M--;)h.lens[h.have++]=R}}if(h.mode===s)break;if(0===h.lens[256]){u.msg="invalid code -- missing end-of-block",h.mode=s;break}if(h.lenbits=9,E={bits:h.lenbits},O=i(1,h.lens,0,h.nlen,h.lencode,0,h.work,E),h.lenbits=E.bits,O){u.msg="invalid literal/lengths set",h.mode=s;break}if(h.distbits=6,h.distcode=h.distdyn,E={bits:h.distbits},O=i(2,h.lens,h.nlen,h.ndist,h.distcode,0,h.work,E),h.distbits=E.bits,O){u.msg="invalid distances set",h.mode=s;break}if(h.mode=20,6===c)break t;case 20:h.mode=21;case 21:if(y>=6&&_>=258){u.next_out=g,u.avail_out=_,u.next_in=f,u.avail_in=y,h.hold=x,h.bits=b,r(u,S),g=u.next_out,p=u.output,_=u.avail_out,f=u.next_in,d=u.input,y=u.avail_in,x=h.hold,b=h.bits,h.mode===a&&(h.back=-1);break}for(h.back=0;T=(z=h.lencode[x&(1<>>16&255,k=65535&z,!((A=z>>>24)<=b);){if(0===y)break t;y--,x+=d[f++]<>L)])>>>16&255,k=65535&z,!(L+(A=z>>>24)<=b);){if(0===y)break t;y--,x+=d[f++]<>>=L,b-=L,h.back+=L}if(x>>>=A,b-=A,h.back+=A,h.length=k,0===T){h.mode=26;break}if(32&T){h.back=-1,h.mode=a;break}if(64&T){u.msg="invalid literal/length code",h.mode=s;break}h.extra=15&T,h.mode=22;case 22:if(h.extra){for(N=h.extra;b>>=h.extra,b-=h.extra,h.back+=h.extra}h.was=h.length,h.mode=23;case 23:for(;T=(z=h.distcode[x&(1<>>16&255,k=65535&z,!((A=z>>>24)<=b);){if(0===y)break t;y--,x+=d[f++]<>L)])>>>16&255,k=65535&z,!(L+(A=z>>>24)<=b);){if(0===y)break t;y--,x+=d[f++]<>>=L,b-=L,h.back+=L}if(x>>>=A,b-=A,h.back+=A,64&T){u.msg="invalid distance code",h.mode=s;break}h.offset=k,h.extra=15&T,h.mode=24;case 24:if(h.extra){for(N=h.extra;b>>=h.extra,b-=h.extra,h.back+=h.extra}if(h.offset>h.dmax){u.msg="invalid distance too far back",h.mode=s;break}h.mode=25;case 25:if(0===_)break t;if(M=S-_,h.offset>M){if((M=h.offset-M)>h.whave&&h.sane){u.msg="invalid distance too far back",h.mode=s;break}M>h.wnext?(M-=h.wnext,I=h.wsize-M):I=h.wnext-M,M>h.length&&(M=h.length),C=h.window}else C=p,I=g-h.offset,M=h.length;M>_&&(M=_),_-=M,h.length-=M;do{p[g++]=C[I++]}while(--M);0===h.length&&(h.mode=21);break;case 26:if(0===_)break t;p[g++]=h.length,_--,h.mode=21;break;case 27:if(h.wrap){for(;b<32;){if(0===y)break t;y--,x|=d[f++]<=0&&c.windowBits<16&&(c.windowBits=-c.windowBits,0===c.windowBits&&(c.windowBits=-15)),!(c.windowBits>=0&&c.windowBits<16)||u&&u.windowBits||(c.windowBits+=32),c.windowBits>15&&c.windowBits<48&&(15&c.windowBits||(c.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new o,this.strm.avail_out=0;var h=t.inflateInit2(this.strm,c.windowBits);if(h!==r.Z_OK)throw new Error(i[h]);if(this.header=new a,t.inflateGetHeader(this.strm,this.header),c.dictionary&&("string"==typeof c.dictionary?c.dictionary=n.string2buf(c.dictionary):"[object ArrayBuffer]"===s.call(c.dictionary)&&(c.dictionary=new Uint8Array(c.dictionary)),c.raw&&(h=t.inflateSetDictionary(this.strm,c.dictionary))!==r.Z_OK))throw new Error(i[h])}function u(t,e){var n=new l(e);if(n.push(t,!0),n.err)throw n.msg||i[n.err];return n.result}return l.prototype.push=function(i,o){var a,l,u,c,h,d=this.strm,p=this.options.chunkSize,f=this.options.dictionary,g=!1;if(this.ended)return!1;l=o===~~o?o:!0===o?r.Z_FINISH:r.Z_NO_FLUSH,"string"==typeof i?d.input=n.binstring2buf(i):"[object ArrayBuffer]"===s.call(i)?d.input=new Uint8Array(i):d.input=i,d.next_in=0,d.avail_in=d.input.length;do{if(0===d.avail_out&&(d.output=new e.Buf8(p),d.next_out=0,d.avail_out=p),(a=t.inflate(d,r.Z_NO_FLUSH))===r.Z_NEED_DICT&&f&&(a=t.inflateSetDictionary(this.strm,f)),a===r.Z_BUF_ERROR&&!0===g&&(a=r.Z_OK,g=!1),a!==r.Z_STREAM_END&&a!==r.Z_OK)return this.onEnd(a),this.ended=!0,!1;d.next_out&&(0!==d.avail_out&&a!==r.Z_STREAM_END&&(0!==d.avail_in||l!==r.Z_FINISH&&l!==r.Z_SYNC_FLUSH)||("string"===this.options.to?(u=n.utf8border(d.output,d.next_out),c=d.next_out-u,h=n.buf2string(d.output,u),d.next_out=c,d.avail_out=p-c,c&&e.arraySet(d.output,d.output,u,c,0),this.onData(h)):this.onData(e.shrinkBuf(d.output,d.next_out)))),0===d.avail_in&&0===d.avail_out&&(g=!0)}while((d.avail_in>0||0===d.avail_out)&&a!==r.Z_STREAM_END);return a===r.Z_STREAM_END&&(l=r.Z_FINISH),l===r.Z_FINISH?(a=t.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===r.Z_OK):l!==r.Z_SYNC_FLUSH||(this.onEnd(r.Z_OK),d.avail_out=0,!0)},l.prototype.onData=function(t){this.chunks.push(t)},l.prototype.onEnd=function(t){t===r.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=e.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},qe.Inflate=l,qe.inflate=u,qe.inflateRaw=function(t,e){return(e=e||{}).raw=!0,u(t,e)},qe.ungzip=u,qe}function tn(){if(Ze)return Ue;Ze=1;var t=he().assign,e=function(){if(De)return xe;De=1;var t=Ae(),e=he(),n=Re(),r=Ce(),i=Oe(),o=Object.prototype.toString;function a(s){if(!(this instanceof a))return new a(s);this.options=e.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},s||{});var l=this.options;l.raw&&l.windowBits>0?l.windowBits=-l.windowBits:l.gzip&&l.windowBits>0&&l.windowBits<16&&(l.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new i,this.strm.avail_out=0;var u=t.deflateInit2(this.strm,l.level,l.method,l.windowBits,l.memLevel,l.strategy);if(0!==u)throw new Error(r[u]);if(l.header&&t.deflateSetHeader(this.strm,l.header),l.dictionary){var c;if(c="string"==typeof l.dictionary?n.string2buf(l.dictionary):"[object ArrayBuffer]"===o.call(l.dictionary)?new Uint8Array(l.dictionary):l.dictionary,0!==(u=t.deflateSetDictionary(this.strm,c)))throw new Error(r[u]);this._dict_set=!0}}function s(t,e){var n=new a(e);if(n.push(t,!0),n.err)throw n.msg||r[n.err];return n.result}return a.prototype.push=function(r,i){var a,s,l=this.strm,u=this.options.chunkSize;if(this.ended)return!1;s=i===~~i?i:!0===i?4:0,"string"==typeof r?l.input=n.string2buf(r):"[object ArrayBuffer]"===o.call(r)?l.input=new Uint8Array(r):l.input=r,l.next_in=0,l.avail_in=l.input.length;do{if(0===l.avail_out&&(l.output=new e.Buf8(u),l.next_out=0,l.avail_out=u),1!==(a=t.deflate(l,s))&&0!==a)return this.onEnd(a),this.ended=!0,!1;0!==l.avail_out&&(0!==l.avail_in||4!==s&&2!==s)||("string"===this.options.to?this.onData(n.buf2binstring(e.shrinkBuf(l.output,l.next_out))):this.onData(e.shrinkBuf(l.output,l.next_out)))}while((l.avail_in>0||0===l.avail_out)&&1!==a);return 4===s?(a=t.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,0===a):2!==s||(this.onEnd(0),l.avail_out=0,!0)},a.prototype.onData=function(t){this.chunks.push(t)},a.prototype.onEnd=function(t){0===t&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=e.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},xe.Deflate=a,xe.deflate=s,xe.deflateRaw=function(t,e){return(e=e||{}).raw=!0,s(t,e)},xe.gzip=function(t,e){return(e=e||{}).gzip=!0,s(t,e)},xe}(),n={};return t(n,e,Je(),Qe()),Ue=n}function en(){if(Xe)return le;Xe=1;var t=Bt();return le.STORE={magic:"\0\0",compressWorker:function(){return new t("STORE compression")},uncompressWorker:function(){return new t("STORE decompression")}},le.DEFLATE=function(){if(Ye)return ue;Ye=1;var t="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,e=tn(),n=zt(),r=Bt(),i=t?"uint8array":"array";function o(t,e){r.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=e,this.meta={}}return ue.magic="\b\0",n.inherits(o,r),o.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(n.transformTo(i,t.data),!1)},o.prototype.flush=function(){r.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},o.prototype.cleanUp=function(){r.prototype.cleanUp.call(this),this._pako=null},o.prototype._createPako=function(){this._pako=new e[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta})}},ue.compressWorker=function(t){return new o("Deflate",t)},ue.uncompressWorker=function(){return new o("Inflate",{})},ue}(),le}var nn,rn,on,an,sn,ln,un,cn,hn,dn,pn,fn,gn,yn,vn,mn,_n,xn,bn,wn,Sn,Mn,In,Cn,An,Tn,kn,Ln,Dn={};function Pn(){return nn||(nn=1,Dn.LOCAL_FILE_HEADER="PK",Dn.CENTRAL_FILE_HEADER="PK",Dn.CENTRAL_DIRECTORY_END="PK",Dn.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",Dn.ZIP64_CENTRAL_DIRECTORY_END="PK",Dn.DATA_DESCRIPTOR="PK\b"),Dn}function Rn(){if(on)return rn;on=1;var t=zt(),e=Bt(),n=Vt(),r=re(),i=Pn(),o=function(t,e){var n,r="";for(n=0;n>>=8;return r},a=function(e,a,s,l,u,c){var h,d,p=e.file,f=e.compression,g=c!==n.utf8encode,y=t.transformTo("string",c(p.name)),v=t.transformTo("string",n.utf8encode(p.name)),m=p.comment,_=t.transformTo("string",c(m)),x=t.transformTo("string",n.utf8encode(m)),b=v.length!==p.name.length,w=x.length!==m.length,S="",M="",I="",C=p.dir,A=p.date,T={crc32:0,compressedSize:0,uncompressedSize:0};a&&!s||(T.crc32=e.crc32,T.compressedSize=e.compressedSize,T.uncompressedSize=e.uncompressedSize);var k=0;a&&(k|=8),g||!b&&!w||(k|=2048);var L,D,P,R=0,O=0;C&&(R|=16),"UNIX"===u?(O=798,R|=(L=p.unixPermissions,D=C,P=L,L||(P=D?16893:33204),(65535&P)<<16)):(O=20,R|=63&(p.dosPermissions||0)),h=A.getUTCHours(),h<<=6,h|=A.getUTCMinutes(),h<<=5,h|=A.getUTCSeconds()/2,d=A.getUTCFullYear()-1980,d<<=4,d|=A.getUTCMonth()+1,d<<=5,d|=A.getUTCDate(),b&&(M=o(1,1)+o(r(y),4)+v,S+="up"+o(M.length,2)+M),w&&(I=o(1,1)+o(r(_),4)+x,S+="uc"+o(I.length,2)+I);var E="";return E+="\n\0",E+=o(k,2),E+=f.magic,E+=o(h,2),E+=o(d,2),E+=o(T.crc32,4),E+=o(T.compressedSize,4),E+=o(T.uncompressedSize,4),E+=o(y.length,2),E+=o(S.length,2),{fileRecord:i.LOCAL_FILE_HEADER+E+y+S,dirRecord:i.CENTRAL_FILE_HEADER+o(O,2)+E+o(_.length,2)+"\0\0\0\0"+o(R,4)+o(l,4)+y+S+_}},s=function(t){return i.DATA_DESCRIPTOR+o(t.crc32,4)+o(t.compressedSize,4)+o(t.uncompressedSize,4)};function l(t,n,r,i){e.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=n,this.zipPlatform=r,this.encodeFileName=i,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}return t.inherits(l,e),l.prototype.push=function(t){var n=t.meta.percent||0,r=this.entriesCount,i=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,e.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:r?(n+100*(r-i-1))/r:100}}))},l.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var e=this.streamFiles&&!t.file.dir;if(e){var n=a(t,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},l.prototype.closedSource=function(t){this.accumulate=!1;var e=this.streamFiles&&!t.file.dir,n=a(t,e,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),e)this.push({data:s(t),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},l.prototype.flush=function(){for(var e=this.bytesWritten,n=0;n0?t.substring(0,e):""},d=function(t){return"/"!==t.slice(-1)&&(t+="/"),t},p=function(t,e){return e=void 0!==e?e:i.createFolders,t=d(t),this.files[t]||c.call(this,t,null,{dir:!0,createFolders:e}),this.files[t]};function f(t){return"[object RegExp]"===Object.prototype.toString.call(t)}var g={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(t){var e,n,r;for(e in this.files)r=this.files[e],(n=e.slice(this.root.length,e.length))&&e.slice(0,this.root.length)===this.root&&t(n,r)},filter:function(t){var e=[];return this.forEach((function(n,r){t(n,r)&&e.push(r)})),e},file:function(t,e,n){if(1===arguments.length){if(f(t)){var r=t;return this.filter((function(t,e){return!e.dir&&r.test(t)}))}var i=this.files[this.root+t];return i&&!i.dir?i:null}return t=this.root+t,c.call(this,t,e,n),this},folder:function(t){if(!t)return this;if(f(t))return this.filter((function(e,n){return n.dir&&t.test(e)}));var e=this.root+t,n=p.call(this,e),r=this.clone();return r.root=n.name,r},remove:function(t){t=this.root+t;var e=this.files[t];if(e||("/"!==t.slice(-1)&&(t+="/"),e=this.files[t]),e&&!e.dir)delete this.files[t];else for(var n=this.filter((function(e,n){return n.name.slice(0,t.length)===t})),r=0;r=this.index;e--)n=(n<<8)+this.byteAt(e);return this.index+=t,n},readString:function(e){return t.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},hn=e}function zn(){if(fn)return pn;fn=1;var t=Nn();function e(e){t.call(this,e);for(var n=0;n=0;--o)if(this.data[o]===e&&this.data[o+1]===n&&this.data[o+2]===r&&this.data[o+3]===i)return o-this.zero;return-1},e.prototype.readAndCheckSignature=function(t){var e=t.charCodeAt(0),n=t.charCodeAt(1),r=t.charCodeAt(2),i=t.charCodeAt(3),o=this.readData(4);return e===o[0]&&n===o[1]&&r===o[2]&&i===o[3]},e.prototype.readData=function(t){if(this.checkOffset(t),0===t)return[];var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},pn=e}function Bn(){if(mn)return vn;mn=1;var t=zn();function e(e){t.call(this,e)}return zt().inherits(e,t),e.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},vn=e}function Vn(){if(wn)return bn;wn=1;var t=zt(),e=ct(),n=zn(),r=function(){if(yn)return gn;yn=1;var t=Nn();function e(e){t.call(this,e)}return zt().inherits(e,t),e.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},e.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},e.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},e.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},gn=e}(),i=function(){if(xn)return _n;xn=1;var t=Bn();function e(e){t.call(this,e)}return zt().inherits(e,t),e.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},_n=e}(),o=Bn();return bn=function(a){var s=t.getTypeOf(a);return t.checkSupport(s),"string"!==s||e.uint8array?"nodebuffer"===s?new i(a):e.uint8array?new o(t.transformTo("uint8array",a)):new n(t.transformTo("array",a)):new r(a)}}function Fn(){if(Mn)return Sn;Mn=1;var t=Vn(),e=zt(),n=oe(),r=re(),i=Vt(),o=en(),a=ct();function s(t,e){this.options=t,this.loadOptions=e}return s.prototype={isEncrypted:function(){return!(1&~this.bitFlag)},useUTF8:function(){return!(2048&~this.bitFlag)},readLocalPart:function(t){var r,i;if(t.skip(22),this.fileNameLength=t.readInt(2),i=t.readInt(2),this.fileName=t.readData(this.fileNameLength),t.skip(i),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(r=function(t){for(var e in o)if(Object.prototype.hasOwnProperty.call(o,e)&&o[e].magic===t)return o[e];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+e.pretty(this.compressionMethod)+" unknown (inner file : "+e.transformTo("string",this.fileName)+")");this.decompressed=new n(this.compressedSize,this.uncompressedSize,this.crc32,r,t.readData(this.compressedSize))},readCentralPart:function(t){this.versionMadeBy=t.readInt(2),t.skip(2),this.bitFlag=t.readInt(2),this.compressionMethod=t.readString(2),this.date=t.readDate(),this.crc32=t.readInt(4),this.compressedSize=t.readInt(4),this.uncompressedSize=t.readInt(4);var e=t.readInt(2);if(this.extraFieldsLength=t.readInt(2),this.fileCommentLength=t.readInt(2),this.diskNumberStart=t.readInt(2),this.internalFileAttributes=t.readInt(2),this.externalFileAttributes=t.readInt(4),this.localHeaderOffset=t.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");t.skip(e),this.readExtraFields(t),this.parseZIP64ExtraField(t),this.fileComment=t.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var t=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0===t&&(this.dosPermissions=63&this.externalFileAttributes),3===t&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var n=t(this.extraFields[1].value);this.uncompressedSize===e.MAX_VALUE_32BITS&&(this.uncompressedSize=n.readInt(8)),this.compressedSize===e.MAX_VALUE_32BITS&&(this.compressedSize=n.readInt(8)),this.localHeaderOffset===e.MAX_VALUE_32BITS&&(this.localHeaderOffset=n.readInt(8)),this.diskNumberStart===e.MAX_VALUE_32BITS&&(this.diskNumberStart=n.readInt(4))}},readExtraFields:function(t){var e,n,r,i=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index+41)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var t,e;for(t=0;t0)this.isSignature(r,n.CENTRAL_FILE_HEADER)||(this.reader.zero=o);else if(o<0)throw new Error("Corrupted zip: missing "+Math.abs(o)+" bytes.")},prepareReader:function(e){this.reader=t(e)},load:function(t){this.prepareReader(t),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},In=o}(),i=ie(),o=wt();function a(t){return new e.Promise((function(e,n){var r=t.decompressed.getContentWorker().pipe(new i);r.on("error",(function(t){n(t)})).on("end",(function(){r.streamInfo.crc32!==t.decompressed.crc32?n(new Error("Corrupted zip : CRC32 mismatch")):e()})).resume()}))}return An=function(i,s){var l=this;return s=t.extend(s||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:n.utf8decode}),o.isNode&&o.isStream(i)?e.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):t.prepareContent("the loaded zip file",i,!0,s.optimizedBinaryString,s.base64).then((function(t){var e=new r(s);return e.load(t),e})).then((function(t){var n=[e.Promise.resolve(t)],r=t.files;if(s.checkCRC32)for(var i=0;i"']/g,Y=RegExp(U.source),X=RegExp(Z.source),q=/<%-([\s\S]+?)%>/g,K=/<%([\s\S]+?)%>/g,$=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,et=/[\\^$.*+?()[\]{}|]/g,nt=RegExp(et.source),rt=/^\s+/,it=/\s/,ot=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,at=/\{\n\/\* \[wrapped with (.+)\] \*/,st=/,? & /,lt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ut=/[()=,{}\[\]\/\s]/,ct=/\\(\\)?/g,ht=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,dt=/\w*$/,pt=/^[-+]0x[0-9a-f]+$/i,ft=/^0b[01]+$/i,gt=/^\[object .+?Constructor\]$/,yt=/^0o[0-7]+$/i,vt=/^(?:0|[1-9]\d*)$/,mt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_t=/($^)/,xt=/['\n\r\u2028\u2029\\]/g,bt="\\ud800-\\udfff",wt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",St="\\u2700-\\u27bf",Mt="a-z\\xdf-\\xf6\\xf8-\\xff",It="A-Z\\xc0-\\xd6\\xd8-\\xde",Ct="\\ufe0e\\ufe0f",At="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Tt="['’]",kt="["+bt+"]",Lt="["+At+"]",Dt="["+wt+"]",Pt="\\d+",Rt="["+St+"]",Ot="["+Mt+"]",Et="[^"+bt+At+Pt+St+Mt+It+"]",Nt="\\ud83c[\\udffb-\\udfff]",zt="[^"+bt+"]",Bt="(?:\\ud83c[\\udde6-\\uddff]){2}",Vt="[\\ud800-\\udbff][\\udc00-\\udfff]",Ft="["+It+"]",Gt="\\u200d",jt="(?:"+Ot+"|"+Et+")",Wt="(?:"+Ft+"|"+Et+")",Ht="(?:['’](?:d|ll|m|re|s|t|ve))?",Ut="(?:['’](?:D|LL|M|RE|S|T|VE))?",Zt="(?:"+Dt+"|"+Nt+")?",Yt="["+Ct+"]?",Xt=Yt+Zt+"(?:"+Gt+"(?:"+[zt,Bt,Vt].join("|")+")"+Yt+Zt+")*",qt="(?:"+[Rt,Bt,Vt].join("|")+")"+Xt,Kt="(?:"+[zt+Dt+"?",Dt,Bt,Vt,kt].join("|")+")",$t=RegExp(Tt,"g"),Qt=RegExp(Dt,"g"),Jt=RegExp(Nt+"(?="+Nt+")|"+Kt+Xt,"g"),te=RegExp([Ft+"?"+Ot+"+"+Ht+"(?="+[Lt,Ft,"$"].join("|")+")",Wt+"+"+Ut+"(?="+[Lt,Ft+jt,"$"].join("|")+")",Ft+"?"+jt+"+"+Ht,Ft+"+"+Ut,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Pt,qt].join("|"),"g"),ee=RegExp("["+Gt+bt+wt+Ct+"]"),ne=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,re=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ie=-1,oe={};oe[R]=oe[O]=oe[E]=oe[N]=oe[z]=oe[B]=oe[V]=oe[F]=oe[G]=!0,oe[g]=oe[y]=oe[D]=oe[v]=oe[P]=oe[m]=oe[_]=oe[x]=oe[w]=oe[S]=oe[M]=oe[C]=oe[A]=oe[T]=oe[L]=!1;var ae={};ae[g]=ae[y]=ae[D]=ae[P]=ae[v]=ae[m]=ae[R]=ae[O]=ae[E]=ae[N]=ae[z]=ae[w]=ae[S]=ae[M]=ae[C]=ae[A]=ae[T]=ae[k]=ae[B]=ae[V]=ae[F]=ae[G]=!0,ae[_]=ae[x]=ae[L]=!1;var se={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},le=parseFloat,ue=parseInt,ce="object"==typeof h&&h&&h.Object===Object&&h,he="object"==typeof self&&self&&self.Object===Object&&self,de=ce||he||Function("return this")(),pe=e&&!e.nodeType&&e,fe=pe&&t&&!t.nodeType&&t,ge=fe&&fe.exports===pe,ye=ge&&ce.process,ve=function(){try{var t=fe&&fe.require&&fe.require("util").types;return t||ye&&ye.binding&&ye.binding("util")}catch(t){}}(),me=ve&&ve.isArrayBuffer,_e=ve&&ve.isDate,xe=ve&&ve.isMap,be=ve&&ve.isRegExp,we=ve&&ve.isSet,Se=ve&&ve.isTypedArray;function Me(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ie(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i-1}function De(t,e,n){for(var r=-1,i=null==t?0:t.length;++r-1;);return n}function tn(t,e){for(var n=t.length;n--&&Fe(e,t[n],0)>-1;);return n}var en=Ue({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),nn=Ue({"&":"&","<":"<",">":">",'"':""","'":"'"});function rn(t){return"\\"+se[t]}function on(t){return ee.test(t)}function an(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function sn(t,e){return function(n){return t(e(n))}}function ln(t,e){for(var n=-1,r=t.length,i=0,a=[];++n",""":'"',"'":"'"}),gn=function t(e){var h,it=(e=null==e?de:gn.defaults(de.Object(),e,gn.pick(de,re))).Array,bt=e.Date,wt=e.Error,St=e.Function,Mt=e.Math,It=e.Object,Ct=e.RegExp,At=e.String,Tt=e.TypeError,kt=it.prototype,Lt=St.prototype,Dt=It.prototype,Pt=e["__core-js_shared__"],Rt=Lt.toString,Ot=Dt.hasOwnProperty,Et=0,Nt=(h=/[^.]+$/.exec(Pt&&Pt.keys&&Pt.keys.IE_PROTO||""))?"Symbol(src)_1."+h:"",zt=Dt.toString,Bt=Rt.call(It),Vt=de._,Ft=Ct("^"+Rt.call(Ot).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Gt=ge?e.Buffer:n,jt=e.Symbol,Wt=e.Uint8Array,Ht=Gt?Gt.allocUnsafe:n,Ut=sn(It.getPrototypeOf,It),Zt=It.create,Yt=Dt.propertyIsEnumerable,Xt=kt.splice,qt=jt?jt.isConcatSpreadable:n,Kt=jt?jt.iterator:n,Jt=jt?jt.toStringTag:n,ee=function(){try{var t=co(It,"defineProperty");return t({},"",{}),t}catch(t){}}(),se=e.clearTimeout!==de.clearTimeout&&e.clearTimeout,ce=bt&&bt.now!==de.Date.now&&bt.now,he=e.setTimeout!==de.setTimeout&&e.setTimeout,pe=Mt.ceil,fe=Mt.floor,ye=It.getOwnPropertySymbols,ve=Gt?Gt.isBuffer:n,ze=e.isFinite,Ue=kt.join,yn=sn(It.keys,It),vn=Mt.max,mn=Mt.min,_n=bt.now,xn=e.parseInt,bn=Mt.random,wn=kt.reverse,Sn=co(e,"DataView"),Mn=co(e,"Map"),In=co(e,"Promise"),Cn=co(e,"Set"),An=co(e,"WeakMap"),Tn=co(It,"create"),kn=An&&new An,Ln={},Dn=zo(Sn),Pn=zo(Mn),Rn=zo(In),On=zo(Cn),En=zo(An),Nn=jt?jt.prototype:n,zn=Nn?Nn.valueOf:n,Bn=Nn?Nn.toString:n;function Vn(t){if(ts(t)&&!Wa(t)&&!(t instanceof Wn)){if(t instanceof jn)return t;if(Ot.call(t,"__wrapped__"))return Bo(t)}return new jn(t)}var Fn=function(){function t(){}return function(e){if(!Ja(e))return{};if(Zt)return Zt(e);t.prototype=e;var r=new t;return t.prototype=n,r}}();function Gn(){}function jn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=n}function Wn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=p,this.__views__=[]}function Hn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e=e?t:e)),t}function sr(t,e,r,i,o,a){var s,l=1&e,u=2&e,c=4&e;if(r&&(s=o?r(t,i,o,a):r(t)),s!==n)return s;if(!Ja(t))return t;var h=Wa(t);if(h){if(s=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Ot.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!l)return Ti(t,s)}else{var d=fo(t),p=d==x||d==b;if(Ya(t))return wi(t,l);if(d==M||d==g||p&&!o){if(s=u||p?{}:yo(t),!l)return u?function(t,e){return ki(t,po(t),e)}(t,function(t,e){return t&&ki(e,Ds(e),t)}(s,t)):function(t,e){return ki(t,ho(t),e)}(t,rr(s,t))}else{if(!ae[d])return o?t:{};s=function(t,e,n){var r,i=t.constructor;switch(e){case D:return Si(t);case v:case m:return new i(+t);case P:return function(t,e){var n=e?Si(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case R:case O:case E:case N:case z:case B:case V:case F:case G:return Mi(t,n);case w:return new i;case S:case T:return new i(t);case C:return function(t){var e=new t.constructor(t.source,dt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case A:return new i;case k:return r=t,zn?It(zn.call(r)):{}}}(t,d,l)}}a||(a=new Xn);var f=a.get(t);if(f)return f;a.set(t,s),os(t)?t.forEach((function(n){s.add(sr(n,e,r,n,t,a))})):es(t)&&t.forEach((function(n,i){s.set(i,sr(n,e,r,i,t,a))}));var y=h?n:(c?u?ro:no:u?Ds:Ls)(t);return Ce(y||t,(function(n,i){y&&(n=t[i=n]),tr(s,i,sr(n,e,r,i,t,a))})),s}function lr(t,e,r){var i=r.length;if(null==t)return!i;for(t=It(t);i--;){var o=r[i],a=e[o],s=t[o];if(s===n&&!(o in t)||!a(s))return!1}return!0}function ur(t,e,i){if("function"!=typeof t)throw new Tt(r);return Lo((function(){t.apply(n,i)}),e)}function cr(t,e,n,r){var i=-1,o=Le,a=!0,s=t.length,l=[],u=e.length;if(!s)return l;n&&(e=Pe(e,Ke(n))),r?(o=De,a=!1):e.length>=200&&(o=Qe,a=!1,e=new Yn(e));t:for(;++i-1},Un.prototype.set=function(t,e){var n=this.__data__,r=er(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Zn.prototype.clear=function(){this.size=0,this.__data__={hash:new Hn,map:new(Mn||Un),string:new Hn}},Zn.prototype.delete=function(t){var e=lo(this,t).delete(t);return this.size-=e?1:0,e},Zn.prototype.get=function(t){return lo(this,t).get(t)},Zn.prototype.has=function(t){return lo(this,t).has(t)},Zn.prototype.set=function(t,e){var n=lo(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Yn.prototype.add=Yn.prototype.push=function(t){return this.__data__.set(t,i),this},Yn.prototype.has=function(t){return this.__data__.has(t)},Xn.prototype.clear=function(){this.__data__=new Un,this.size=0},Xn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Xn.prototype.get=function(t){return this.__data__.get(t)},Xn.prototype.has=function(t){return this.__data__.has(t)},Xn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Un){var r=n.__data__;if(!Mn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Zn(r)}return n.set(t,e),this.size=n.size,this};var hr=Pi(_r),dr=Pi(xr,!0);function pr(t,e){var n=!0;return hr(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function fr(t,e,r){for(var i=-1,o=t.length;++i0&&n(s)?e>1?yr(s,e-1,n,r,i):Re(i,s):r||(i[i.length]=s)}return i}var vr=Ri(),mr=Ri(!0);function _r(t,e){return t&&vr(t,e,Ls)}function xr(t,e){return t&&mr(t,e,Ls)}function br(t,e){return ke(e,(function(e){return Ka(t[e])}))}function wr(t,e){for(var r=0,i=(e=mi(e,t)).length;null!=t&&re}function Cr(t,e){return null!=t&&Ot.call(t,e)}function Ar(t,e){return null!=t&&e in It(t)}function Tr(t,e,r){for(var i=r?De:Le,o=t[0].length,a=t.length,s=a,l=it(a),u=1/0,c=[];s--;){var h=t[s];s&&e&&(h=Pe(h,Ke(e))),u=mn(h.length,u),l[s]=!r&&(e||o>=120&&h.length>=120)?new Yn(s&&h):n}h=t[0];var d=-1,p=l[0];t:for(;++d=s?l:l*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}))}function Hr(t,e,n){for(var r=-1,i=e.length,o={};++r-1;)s!==t&&Xt.call(s,l,1),Xt.call(t,l,1);return t}function Zr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;mo(i)?Xt.call(t,i,1):ci(t,i)}}return t}function Yr(t,e){return t+fe(bn()*(e-t+1))}function Xr(t,e){var n="";if(!t||e<1||e>c)return n;do{e%2&&(n+=t),(e=fe(e/2))&&(t+=t)}while(e);return n}function qr(t,e){return Do(Co(t,e,nl),t+"")}function Kr(t){return Kn(Vs(t))}function $r(t,e){var n=Vs(t);return Oo(n,ar(e,0,n.length))}function Qr(t,e,r,i){if(!Ja(t))return t;for(var o=-1,a=(e=mi(e,t)).length,s=a-1,l=t;null!=l&&++oi?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=it(i);++r>>1,a=t[o];null!==a&&!ss(a)&&(n?a<=e:a=200){var u=e?null:Xi(t);if(u)return un(u);a=!1,i=Qe,l=new Yn}else l=e?[]:s;t:for(;++r=i?t:ni(t,e,r)}var bi=se||function(t){return de.clearTimeout(t)};function wi(t,e){if(e)return t.slice();var n=t.length,r=Ht?Ht(n):new t.constructor(n);return t.copy(r),r}function Si(t){var e=new t.constructor(t.byteLength);return new Wt(e).set(new Wt(t)),e}function Mi(t,e){var n=e?Si(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Ii(t,e){if(t!==e){var r=t!==n,i=null===t,o=t==t,a=ss(t),s=e!==n,l=null===e,u=e==e,c=ss(e);if(!l&&!c&&!a&&t>e||a&&s&&u&&!l&&!c||i&&s&&u||!r&&u||!o)return 1;if(!i&&!a&&!c&&t1?r[o-1]:n,s=o>2?r[2]:n;for(a=t.length>3&&"function"==typeof a?(o--,a):n,s&&_o(r[0],r[1],s)&&(a=o<3?n:a,o=1),e=It(e);++i-1?o[a?e[s]:s]:n}}function Bi(t){return eo((function(e){var i=e.length,o=i,a=jn.prototype.thru;for(t&&e.reverse();o--;){var s=e[o];if("function"!=typeof s)throw new Tt(r);if(a&&!l&&"wrapper"==oo(s))var l=new jn([],!0)}for(o=l?o:i;++o1&&_.reverse(),d&&cl))return!1;var c=a.get(t),h=a.get(e);if(c&&h)return c==e&&h==t;var d=-1,p=!0,f=2&r?new Yn:n;for(a.set(t,e),a.set(e,t);++d-1&&t%1==0&&t1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(ot,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Ce(f,(function(n){var r="_."+n[0];e&n[1]&&!Le(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(at);return e?e[1].split(st):[]}(r),n)))}function Ro(t){var e=0,r=0;return function(){var i=_n(),o=16-(i-r);if(r=i,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(n,arguments)}}function Oo(t,e){var r=-1,i=t.length,o=i-1;for(e=e===n?i:e;++r1?t[e-1]:n;return r="function"==typeof r?(t.pop(),r):n,ia(t,r)}));function ha(t){var e=Vn(t);return e.__chain__=!0,e}function da(t,e){return e(t)}var pa=eo((function(t){var e=t.length,r=e?t[0]:0,i=this.__wrapped__,o=function(e){return or(e,t)};return!(e>1||this.__actions__.length)&&i instanceof Wn&&mo(r)?((i=i.slice(r,+r+(e?1:0))).__actions__.push({func:da,args:[o],thisArg:n}),new jn(i,this.__chain__).thru((function(t){return e&&!t.length&&t.push(n),t}))):this.thru(o)})),fa=Li((function(t,e,n){Ot.call(t,n)?++t[n]:ir(t,n,1)})),ga=zi(jo),ya=zi(Wo);function va(t,e){return(Wa(t)?Ce:hr)(t,so(e,3))}function ma(t,e){return(Wa(t)?Ae:dr)(t,so(e,3))}var _a=Li((function(t,e,n){Ot.call(t,n)?t[n].push(e):ir(t,n,[e])})),xa=qr((function(t,e,n){var r=-1,i="function"==typeof e,o=Ua(t)?it(t.length):[];return hr(t,(function(t){o[++r]=i?Me(e,t,n):kr(t,e,n)})),o})),ba=Li((function(t,e,n){ir(t,n,e)}));function wa(t,e){return(Wa(t)?Pe:Br)(t,so(e,3))}var Sa=Li((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),Ma=qr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&_o(t,e[0],e[1])?e=[]:n>2&&_o(e[0],e[1],e[2])&&(e=[e[0]]),Wr(t,yr(e,1),[])})),Ia=ce||function(){return de.Date.now()};function Ca(t,e,r){return e=r?n:e,e=t&&null==e?t.length:e,Ki(t,s,n,n,n,n,e)}function Aa(t,e){var i;if("function"!=typeof e)throw new Tt(r);return t=ps(t),function(){return--t>0&&(i=e.apply(this,arguments)),t<=1&&(e=n),i}}var Ta=qr((function(t,e,n){var r=1;if(n.length){var i=ln(n,ao(Ta));r|=a}return Ki(t,r,e,n,i)})),ka=qr((function(t,e,n){var r=3;if(n.length){var i=ln(n,ao(ka));r|=a}return Ki(e,r,t,n,i)}));function La(t,e,i){var o,a,s,l,u,c,h=0,d=!1,p=!1,f=!0;if("function"!=typeof t)throw new Tt(r);function g(e){var r=o,i=a;return o=a=n,h=e,l=t.apply(i,r)}function y(t){var r=t-c;return c===n||r>=e||r<0||p&&t-h>=s}function v(){var t=Ia();if(y(t))return m(t);u=Lo(v,function(t){var n=e-(t-c);return p?mn(n,s-(t-h)):n}(t))}function m(t){return u=n,f&&o?g(t):(o=a=n,l)}function _(){var t=Ia(),r=y(t);if(o=arguments,a=this,c=t,r){if(u===n)return function(t){return h=t,u=Lo(v,e),d?g(t):l}(c);if(p)return bi(u),u=Lo(v,e),g(c)}return u===n&&(u=Lo(v,e)),l}return e=gs(e)||0,Ja(i)&&(d=!!i.leading,s=(p="maxWait"in i)?vn(gs(i.maxWait)||0,e):s,f="trailing"in i?!!i.trailing:f),_.cancel=function(){u!==n&&bi(u),h=0,o=c=a=u=n},_.flush=function(){return u===n?l:m(Ia())},_}var Da=qr((function(t,e){return ur(t,1,e)})),Pa=qr((function(t,e,n){return ur(t,gs(e)||0,n)}));function Ra(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new Tt(r);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Ra.Cache||Zn),n}function Oa(t){if("function"!=typeof t)throw new Tt(r);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Ra.Cache=Zn;var Ea=_i((function(t,e){var n=(e=1==e.length&&Wa(e[0])?Pe(e[0],Ke(so())):Pe(yr(e,1),Ke(so()))).length;return qr((function(r){for(var i=-1,o=mn(r.length,n);++i=e})),ja=Lr(function(){return arguments}())?Lr:function(t){return ts(t)&&Ot.call(t,"callee")&&!Yt.call(t,"callee")},Wa=it.isArray,Ha=me?Ke(me):function(t){return ts(t)&&Mr(t)==D};function Ua(t){return null!=t&&Qa(t.length)&&!Ka(t)}function Za(t){return ts(t)&&Ua(t)}var Ya=ve||gl,Xa=_e?Ke(_e):function(t){return ts(t)&&Mr(t)==m};function qa(t){if(!ts(t))return!1;var e=Mr(t);return e==_||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!rs(t)}function Ka(t){if(!Ja(t))return!1;var e=Mr(t);return e==x||e==b||"[object AsyncFunction]"==e||"[object Proxy]"==e}function $a(t){return"number"==typeof t&&t==ps(t)}function Qa(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=c}function Ja(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ts(t){return null!=t&&"object"==typeof t}var es=xe?Ke(xe):function(t){return ts(t)&&fo(t)==w};function ns(t){return"number"==typeof t||ts(t)&&Mr(t)==S}function rs(t){if(!ts(t)||Mr(t)!=M)return!1;var e=Ut(t);if(null===e)return!0;var n=Ot.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Rt.call(n)==Bt}var is=be?Ke(be):function(t){return ts(t)&&Mr(t)==C},os=we?Ke(we):function(t){return ts(t)&&fo(t)==A};function as(t){return"string"==typeof t||!Wa(t)&&ts(t)&&Mr(t)==T}function ss(t){return"symbol"==typeof t||ts(t)&&Mr(t)==k}var ls=Se?Ke(Se):function(t){return ts(t)&&Qa(t.length)&&!!oe[Mr(t)]},us=Ui(zr),cs=Ui((function(t,e){return t<=e}));function hs(t){if(!t)return[];if(Ua(t))return as(t)?dn(t):Ti(t);if(Kt&&t[Kt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Kt]());var e=fo(t);return(e==w?an:e==A?un:Vs)(t)}function ds(t){return t?(t=gs(t))===u||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ps(t){var e=ds(t),n=e%1;return e==e?n?e-n:e:0}function fs(t){return t?ar(ps(t),0,p):0}function gs(t){if("number"==typeof t)return t;if(ss(t))return d;if(Ja(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Ja(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=qe(t);var n=ft.test(t);return n||yt.test(t)?ue(t.slice(2),n?2:8):pt.test(t)?d:+t}function ys(t){return ki(t,Ds(t))}function vs(t){return null==t?"":li(t)}var ms=Di((function(t,e){if(So(e)||Ua(e))ki(e,Ls(e),t);else for(var n in e)Ot.call(e,n)&&tr(t,n,e[n])})),_s=Di((function(t,e){ki(e,Ds(e),t)})),xs=Di((function(t,e,n,r){ki(e,Ds(e),t,r)})),bs=Di((function(t,e,n,r){ki(e,Ls(e),t,r)})),ws=eo(or),Ss=qr((function(t,e){t=It(t);var r=-1,i=e.length,o=i>2?e[2]:n;for(o&&_o(e[0],e[1],o)&&(i=1);++r1),e})),ki(t,ro(t),n),r&&(n=sr(n,7,Ji));for(var i=e.length;i--;)ci(n,e[i]);return n})),Es=eo((function(t,e){return null==t?{}:function(t,e){return Hr(t,e,(function(e,n){return Cs(t,n)}))}(t,e)}));function Ns(t,e){if(null==t)return{};var n=Pe(ro(t),(function(t){return[t]}));return e=so(e),Hr(t,n,(function(t,n){return e(t,n[0])}))}var zs=qi(Ls),Bs=qi(Ds);function Vs(t){return null==t?[]:$e(t,Ls(t))}var Fs=Ei((function(t,e,n){return e=e.toLowerCase(),t+(n?Gs(e):e)}));function Gs(t){return qs(vs(t).toLowerCase())}function js(t){return(t=vs(t))&&t.replace(mt,en).replace(Qt,"")}var Ws=Ei((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Hs=Ei((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Us=Oi("toLowerCase"),Zs=Ei((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),Ys=Ei((function(t,e,n){return t+(n?" ":"")+qs(e)})),Xs=Ei((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),qs=Oi("toUpperCase");function Ks(t,e,r){return t=vs(t),(e=r?n:e)===n?function(t){return ne.test(t)}(t)?function(t){return t.match(te)||[]}(t):function(t){return t.match(lt)||[]}(t):t.match(e)||[]}var $s=qr((function(t,e){try{return Me(t,n,e)}catch(t){return qa(t)?t:new wt(t)}})),Qs=eo((function(t,e){return Ce(e,(function(e){e=No(e),ir(t,e,Ta(t[e],t))})),t}));function Js(t){return function(){return t}}var tl=Bi(),el=Bi(!0);function nl(t){return t}function rl(t){return Or("function"==typeof t?t:sr(t,1))}var il=qr((function(t,e){return function(n){return kr(n,t,e)}})),ol=qr((function(t,e){return function(n){return kr(t,n,e)}}));function al(t,e,n){var r=Ls(e),i=br(e,r);null!=n||Ja(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=br(e,Ls(e)));var o=!(Ja(n)&&"chain"in n&&!n.chain),a=Ka(t);return Ce(i,(function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__);return(n.__actions__=Ti(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Re([this.value()],arguments))})})),t}function sl(){}var ll=ji(Pe),ul=ji(Te),cl=ji(Ne);function hl(t){return xo(t)?He(No(t)):function(t){return function(e){return wr(e,t)}}(t)}var dl=Hi(),pl=Hi(!0);function fl(){return[]}function gl(){return!1}var yl,vl=Gi((function(t,e){return t+e}),0),ml=Yi("ceil"),_l=Gi((function(t,e){return t/e}),1),xl=Yi("floor"),bl=Gi((function(t,e){return t*e}),1),wl=Yi("round"),Sl=Gi((function(t,e){return t-e}),0);return Vn.after=function(t,e){if("function"!=typeof e)throw new Tt(r);return t=ps(t),function(){if(--t<1)return e.apply(this,arguments)}},Vn.ary=Ca,Vn.assign=ms,Vn.assignIn=_s,Vn.assignInWith=xs,Vn.assignWith=bs,Vn.at=ws,Vn.before=Aa,Vn.bind=Ta,Vn.bindAll=Qs,Vn.bindKey=ka,Vn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Wa(t)?t:[t]},Vn.chain=ha,Vn.chunk=function(t,e,r){e=(r?_o(t,e,r):e===n)?1:vn(ps(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var o=0,a=0,s=it(pe(i/e));oo?0:o+r),(i=i===n||i>o?o:ps(i))<0&&(i+=o),i=r>i?0:fs(i);r>>0)?(t=vs(t))&&("string"==typeof e||null!=e&&!is(e))&&!(e=li(e))&&on(t)?xi(dn(t),0,r):t.split(e,r):[]},Vn.spread=function(t,e){if("function"!=typeof t)throw new Tt(r);return e=null==e?0:vn(ps(e),0),qr((function(n){var r=n[e],i=xi(n,0,e);return r&&Re(i,r),Me(t,this,i)}))},Vn.tail=function(t){var e=null==t?0:t.length;return e?ni(t,1,e):[]},Vn.take=function(t,e,r){return t&&t.length?ni(t,0,(e=r||e===n?1:ps(e))<0?0:e):[]},Vn.takeRight=function(t,e,r){var i=null==t?0:t.length;return i?ni(t,(e=i-(e=r||e===n?1:ps(e)))<0?0:e,i):[]},Vn.takeRightWhile=function(t,e){return t&&t.length?di(t,so(e,3),!1,!0):[]},Vn.takeWhile=function(t,e){return t&&t.length?di(t,so(e,3)):[]},Vn.tap=function(t,e){return e(t),t},Vn.throttle=function(t,e,n){var i=!0,o=!0;if("function"!=typeof t)throw new Tt(r);return Ja(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),La(t,e,{leading:i,maxWait:e,trailing:o})},Vn.thru=da,Vn.toArray=hs,Vn.toPairs=zs,Vn.toPairsIn=Bs,Vn.toPath=function(t){return Wa(t)?Pe(t,No):ss(t)?[t]:Ti(Eo(vs(t)))},Vn.toPlainObject=ys,Vn.transform=function(t,e,n){var r=Wa(t),i=r||Ya(t)||ls(t);if(e=so(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:Ja(t)&&Ka(o)?Fn(Ut(t)):{}}return(i?Ce:_r)(t,(function(t,r,i){return e(n,t,r,i)})),n},Vn.unary=function(t){return Ca(t,1)},Vn.union=ta,Vn.unionBy=ea,Vn.unionWith=na,Vn.uniq=function(t){return t&&t.length?ui(t):[]},Vn.uniqBy=function(t,e){return t&&t.length?ui(t,so(e,2)):[]},Vn.uniqWith=function(t,e){return e="function"==typeof e?e:n,t&&t.length?ui(t,n,e):[]},Vn.unset=function(t,e){return null==t||ci(t,e)},Vn.unzip=ra,Vn.unzipWith=ia,Vn.update=function(t,e,n){return null==t?t:hi(t,e,vi(n))},Vn.updateWith=function(t,e,r,i){return i="function"==typeof i?i:n,null==t?t:hi(t,e,vi(r),i)},Vn.values=Vs,Vn.valuesIn=function(t){return null==t?[]:$e(t,Ds(t))},Vn.without=oa,Vn.words=Ks,Vn.wrap=function(t,e){return Na(vi(e),t)},Vn.xor=aa,Vn.xorBy=sa,Vn.xorWith=la,Vn.zip=ua,Vn.zipObject=function(t,e){return gi(t||[],e||[],tr)},Vn.zipObjectDeep=function(t,e){return gi(t||[],e||[],Qr)},Vn.zipWith=ca,Vn.entries=zs,Vn.entriesIn=Bs,Vn.extend=_s,Vn.extendWith=xs,al(Vn,Vn),Vn.add=vl,Vn.attempt=$s,Vn.camelCase=Fs,Vn.capitalize=Gs,Vn.ceil=ml,Vn.clamp=function(t,e,r){return r===n&&(r=e,e=n),r!==n&&(r=(r=gs(r))==r?r:0),e!==n&&(e=(e=gs(e))==e?e:0),ar(gs(t),e,r)},Vn.clone=function(t){return sr(t,4)},Vn.cloneDeep=function(t){return sr(t,5)},Vn.cloneDeepWith=function(t,e){return sr(t,5,e="function"==typeof e?e:n)},Vn.cloneWith=function(t,e){return sr(t,4,e="function"==typeof e?e:n)},Vn.conformsTo=function(t,e){return null==e||lr(t,e,Ls(e))},Vn.deburr=js,Vn.defaultTo=function(t,e){return null==t||t!=t?e:t},Vn.divide=_l,Vn.endsWith=function(t,e,r){t=vs(t),e=li(e);var i=t.length,o=r=r===n?i:ar(ps(r),0,i);return(r-=e.length)>=0&&t.slice(r,o)==e},Vn.eq=Va,Vn.escape=function(t){return(t=vs(t))&&X.test(t)?t.replace(Z,nn):t},Vn.escapeRegExp=function(t){return(t=vs(t))&&nt.test(t)?t.replace(et,"\\$&"):t},Vn.every=function(t,e,r){var i=Wa(t)?Te:pr;return r&&_o(t,e,r)&&(e=n),i(t,so(e,3))},Vn.find=ga,Vn.findIndex=jo,Vn.findKey=function(t,e){return Be(t,so(e,3),_r)},Vn.findLast=ya,Vn.findLastIndex=Wo,Vn.findLastKey=function(t,e){return Be(t,so(e,3),xr)},Vn.floor=xl,Vn.forEach=va,Vn.forEachRight=ma,Vn.forIn=function(t,e){return null==t?t:vr(t,so(e,3),Ds)},Vn.forInRight=function(t,e){return null==t?t:mr(t,so(e,3),Ds)},Vn.forOwn=function(t,e){return t&&_r(t,so(e,3))},Vn.forOwnRight=function(t,e){return t&&xr(t,so(e,3))},Vn.get=Is,Vn.gt=Fa,Vn.gte=Ga,Vn.has=function(t,e){return null!=t&&go(t,e,Cr)},Vn.hasIn=Cs,Vn.head=Uo,Vn.identity=nl,Vn.includes=function(t,e,n,r){t=Ua(t)?t:Vs(t),n=n&&!r?ps(n):0;var i=t.length;return n<0&&(n=vn(i+n,0)),as(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Fe(t,e,n)>-1},Vn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ps(n);return i<0&&(i=vn(r+i,0)),Fe(t,e,i)},Vn.inRange=function(t,e,r){return e=ds(e),r===n?(r=e,e=0):r=ds(r),function(t,e,n){return t>=mn(e,n)&&t=-9007199254740991&&t<=c},Vn.isSet=os,Vn.isString=as,Vn.isSymbol=ss,Vn.isTypedArray=ls,Vn.isUndefined=function(t){return t===n},Vn.isWeakMap=function(t){return ts(t)&&fo(t)==L},Vn.isWeakSet=function(t){return ts(t)&&"[object WeakSet]"==Mr(t)},Vn.join=function(t,e){return null==t?"":Ue.call(t,e)},Vn.kebabCase=Ws,Vn.last=qo,Vn.lastIndexOf=function(t,e,r){var i=null==t?0:t.length;if(!i)return-1;var o=i;return r!==n&&(o=(o=ps(r))<0?vn(i+o,0):mn(o,i-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,o):Ve(t,je,o,!0)},Vn.lowerCase=Hs,Vn.lowerFirst=Us,Vn.lt=us,Vn.lte=cs,Vn.max=function(t){return t&&t.length?fr(t,nl,Ir):n},Vn.maxBy=function(t,e){return t&&t.length?fr(t,so(e,2),Ir):n},Vn.mean=function(t){return We(t,nl)},Vn.meanBy=function(t,e){return We(t,so(e,2))},Vn.min=function(t){return t&&t.length?fr(t,nl,zr):n},Vn.minBy=function(t,e){return t&&t.length?fr(t,so(e,2),zr):n},Vn.stubArray=fl,Vn.stubFalse=gl,Vn.stubObject=function(){return{}},Vn.stubString=function(){return""},Vn.stubTrue=function(){return!0},Vn.multiply=bl,Vn.nth=function(t,e){return t&&t.length?jr(t,ps(e)):n},Vn.noConflict=function(){return de._===this&&(de._=Vt),this},Vn.noop=sl,Vn.now=Ia,Vn.pad=function(t,e,n){t=vs(t);var r=(e=ps(e))?hn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return Wi(fe(i),n)+t+Wi(pe(i),n)},Vn.padEnd=function(t,e,n){t=vs(t);var r=(e=ps(e))?hn(t):0;return e&&re){var i=t;t=e,e=i}if(r||t%1||e%1){var o=bn();return mn(t+o*(e-t+le("1e-"+((o+"").length-1))),e)}return Yr(t,e)},Vn.reduce=function(t,e,n){var r=Wa(t)?Oe:Ze,i=arguments.length<3;return r(t,so(e,4),n,i,hr)},Vn.reduceRight=function(t,e,n){var r=Wa(t)?Ee:Ze,i=arguments.length<3;return r(t,so(e,4),n,i,dr)},Vn.repeat=function(t,e,r){return e=(r?_o(t,e,r):e===n)?1:ps(e),Xr(vs(t),e)},Vn.replace=function(){var t=arguments,e=vs(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Vn.result=function(t,e,r){var i=-1,o=(e=mi(e,t)).length;for(o||(o=1,t=n);++ic)return[];var n=p,r=mn(t,p);e=so(e),t-=p;for(var i=Xe(r,e);++n=a)return t;var l=r-hn(i);if(l<1)return i;var u=s?xi(s,0,l).join(""):t.slice(0,l);if(o===n)return u+i;if(s&&(l+=u.length-l),is(o)){if(t.slice(l).search(o)){var c,h=u;for(o.global||(o=Ct(o.source,vs(dt.exec(o))+"g")),o.lastIndex=0;c=o.exec(h);)var d=c.index;u=u.slice(0,d===n?l:d)}}else if(t.indexOf(li(o),l)!=l){var p=u.lastIndexOf(o);p>-1&&(u=u.slice(0,p))}return u+i},Vn.unescape=function(t){return(t=vs(t))&&Y.test(t)?t.replace(U,fn):t},Vn.uniqueId=function(t){var e=++Et;return vs(t)+e},Vn.upperCase=Xs,Vn.upperFirst=qs,Vn.each=va,Vn.eachRight=ma,Vn.first=Uo,al(Vn,(yl={},_r(Vn,(function(t,e){Ot.call(Vn.prototype,e)||(yl[e]=t)})),yl),{chain:!1}),Vn.VERSION="4.17.21",Ce(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Vn[t].placeholder=Vn})),Ce(["drop","take"],(function(t,e){Wn.prototype[t]=function(r){r=r===n?1:vn(ps(r),0);var i=this.__filtered__&&!e?new Wn(this):this.clone();return i.__filtered__?i.__takeCount__=mn(r,i.__takeCount__):i.__views__.push({size:mn(r,p),type:t+(i.__dir__<0?"Right":"")}),i},Wn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Ce(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Wn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:so(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),Ce(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Wn.prototype[t]=function(){return this[n](1).value()[0]}})),Ce(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Wn.prototype[t]=function(){return this.__filtered__?new Wn(this):this[n](1)}})),Wn.prototype.compact=function(){return this.filter(nl)},Wn.prototype.find=function(t){return this.filter(t).head()},Wn.prototype.findLast=function(t){return this.reverse().find(t)},Wn.prototype.invokeMap=qr((function(t,e){return"function"==typeof t?new Wn(this):this.map((function(n){return kr(n,t,e)}))})),Wn.prototype.reject=function(t){return this.filter(Oa(so(t)))},Wn.prototype.slice=function(t,e){t=ps(t);var r=this;return r.__filtered__&&(t>0||e<0)?new Wn(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),e!==n&&(r=(e=ps(e))<0?r.dropRight(-e):r.take(e-t)),r)},Wn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Wn.prototype.toArray=function(){return this.take(p)},_r(Wn.prototype,(function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),i=/^(?:head|last)$/.test(e),o=Vn[i?"take"+("last"==e?"Right":""):e],a=i||/^find/.test(e);o&&(Vn.prototype[e]=function(){var e=this.__wrapped__,s=i?[1]:arguments,l=e instanceof Wn,u=s[0],c=l||Wa(e),h=function(t){var e=o.apply(Vn,Re([t],s));return i&&d?e[0]:e};c&&r&&"function"==typeof u&&1!=u.length&&(l=c=!1);var d=this.__chain__,p=!!this.__actions__.length,f=a&&!d,g=l&&!p;if(!a&&c){e=g?e:new Wn(this);var y=t.apply(e,s);return y.__actions__.push({func:da,args:[h],thisArg:n}),new jn(y,d)}return f&&g?t.apply(this,s):(y=this.thru(h),f?i?y.value()[0]:y.value():y)})})),Ce(["pop","push","shift","sort","splice","unshift"],(function(t){var e=kt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Vn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Wa(i)?i:[],t)}return this[n]((function(n){return e.apply(Wa(n)?n:[],t)}))}})),_r(Wn.prototype,(function(t,e){var n=Vn[e];if(n){var r=n.name+"";Ot.call(Ln,r)||(Ln[r]=[]),Ln[r].push({name:e,func:n})}})),Ln[Vi(n,2).name]=[{name:"wrapper",func:n}],Wn.prototype.clone=function(){var t=new Wn(this.__wrapped__);return t.__actions__=Ti(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Ti(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Ti(this.__views__),t},Wn.prototype.reverse=function(){if(this.__filtered__){var t=new Wn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Wn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Wa(t),r=e<0,i=n?t.length:0,o=function(t,e,n){for(var r=-1,i=n.length;++r=this.__values__.length;return{done:t,value:t?n:this.__values__[this.__index__++]}},Vn.prototype.plant=function(t){for(var e,r=this;r instanceof Gn;){var i=Bo(r);i.__index__=0,i.__values__=n,e?o.__wrapped__=i:e=i;var o=i;r=r.__wrapped__}return o.__wrapped__=t,e},Vn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Wn){var e=t;return this.__actions__.length&&(e=new Wn(this)),(e=e.reverse()).__actions__.push({func:da,args:[Jo],thisArg:n}),new jn(e,this.__chain__)}return this.thru(Jo)},Vn.prototype.toJSON=Vn.prototype.valueOf=Vn.prototype.value=function(){return pi(this.__wrapped__,this.__actions__)},Vn.prototype.first=Vn.prototype.head,Kt&&(Vn.prototype[Kt]=function(){return this}),Vn}();fe?((fe.exports=gn)._=gn,pe._=gn):de._=gn}).call(Zn)}(Un,Un.exports)),Un.exports),Xn=1;function qn(t){var e="<".charCodeAt(0),n=">".charCodeAt(0),r="-".charCodeAt(0),i="/".charCodeAt(0),o="!".charCodeAt(0),a="'".charCodeAt(0),s='"'.charCodeAt(0),l="?".charCodeAt(0),u="\r\n\t>/= ",c=0;return Xn=1,Kn(function h(){for(var d=[];t[c];){if(t.charCodeAt(c)==e){if(t.charCodeAt(c+1)===i)return c=t.indexOf(">",c),d;if(t.charCodeAt(c+1)===o){if(t.charCodeAt(c+2)==r){for(;t.charCodeAt(c)!==n||t.charCodeAt(c-1)!=r||t.charCodeAt(c-2)!=r||-1==c;)c=t.indexOf(">",c+1);-1===c&&(c=t.length)}else for(c+=2;t.charCodeAt(c)!==n;c++);c++;continue}if(t.charCodeAt(c+1)===l){c=t.indexOf(">",c),c++;continue}for(var p=++c;-1===u.indexOf(t[c]);c++);for(var f=t.slice(p,c),g=!1,y={};t.charCodeAt(c)!==n;c++){var v=t.charCodeAt(c);if(v>64&&v<91||v>96&&v<123){for(p=c;-1===u.indexOf(t[c]);c++);for(var m=t.slice(p,c),_=t.charCodeAt(c);_!==a&&_!==s;)c++,_=t.charCodeAt(c);var x=t[c],b=++c;c=t.indexOf(x,b);var w=t.slice(b,c);g||(y={},g=!0),y[m]=w}}var S=[];t.charCodeAt(c-1)!==i&&(c++,S=h()),d.push({children:S,tagName:f,attrs:y})}else{var M=c;-2===(c=t.indexOf("<",c)-1)&&(c=t.length);var I=t.slice(M,c+1);I.length>0&&d.push(I)}c++}return d}())}function Kn(t){var e={};if(void 0===t)return{};if(1===t.length&&"string"==typeof t[0])return t[0];for(var n in t.forEach((function(t){if(e[t.tagName]||(e[t.tagName]=[]),"object"==typeof t){var n=Kn(t.children);"object"==typeof n&&(t.attrs&&(n.attrs=t.attrs),void 0===n.attrs?n.attrs={order:Xn}:n.attrs.order=Xn),Xn++,e[t.tagName].push(n)}})),e)1==e[n].length&&(e[n]=e[n][0]);return e}function $n(t){return Math.abs(t)>2e4?"emu":"point"}function Qn(t){return t/12700}function Jn(t){return t/20}function tr(t){return t/100}function er(t){return t/6e4}function nr(t){return t/1e5}function rr(t){var e=Math.ceil(t/26),n=(t%26||26)-1+65;return String.fromCharCode(n).repeat(e)}function ir(t,e,n){var r={type:"solidFill"};if(t["a:srgbClr"])r.color="#"+t["a:srgbClr"].attrs.val;else if(t["a:schemeClr"]){var i=t["a:schemeClr"].attrs.val;n&&(i=n.getColorThemeName(i)),r.color=e.getColor(i)}else if(t["a:sysClr"])r.color="#"+t["a:sysClr"].attrs.lastClr;else if(t["a:prstClr"]){var o=Yn.get(t["a:prstClr"],["attrs","val"]);r.color=function(t){var e,n=["white","AliceBlue","AntiqueWhite","Aqua","Aquamarine","Azure","Beige","Bisque","black","BlanchedAlmond","Blue","BlueViolet","Brown","BurlyWood","CadetBlue","Chartreuse","Chocolate","Coral","CornflowerBlue","Cornsilk","Crimson","Cyan","DarkBlue","DarkCyan","DarkGoldenRod","DarkGray","DarkGrey","DarkGreen","DarkKhaki","DarkMagenta","DarkOliveGreen","DarkOrange","DarkOrchid","DarkRed","DarkSalmon","DarkSeaGreen","DarkSlateBlue","DarkSlateGray","DarkSlateGrey","DarkTurquoise","DarkViolet","DeepPink","DeepSkyBlue","DimGray","DimGrey","DodgerBlue","FireBrick","FloralWhite","ForestGreen","Fuchsia","Gainsboro","GhostWhite","Gold","GoldenRod","Gray","Grey","Green","GreenYellow","HoneyDew","HotPink","IndianRed","Indigo","Ivory","Khaki","Lavender","LavenderBlush","LawnGreen","LemonChiffon","LightBlue","LightCoral","LightCyan","LightGoldenRodYellow","LightGray","LightGrey","LightGreen","LightPink","LightSalmon","LightSeaGreen","LightSkyBlue","LightSlateGray","LightSlateGrey","LightSteelBlue","LightYellow","Lime","LimeGreen","Linen","Magenta","Maroon","MediumAquaMarine","MediumBlue","MediumOrchid","MediumPurple","MediumSeaGreen","MediumSlateBlue","MediumSpringGreen","MediumTurquoise","MediumVioletRed","MidnightBlue","MintCream","MistyRose","Moccasin","NavajoWhite","Navy","OldLace","Olive","OliveDrab","Orange","OrangeRed","Orchid","PaleGoldenRod","PaleGreen","PaleTurquoise","PaleVioletRed","PapayaWhip","PeachPuff","Peru","Pink","Plum","PowderBlue","Purple","RebeccaPurple","Red","RosyBrown","RoyalBlue","SaddleBrown","Salmon","SandyBrown","SeaGreen","SeaShell","Sienna","Silver","SkyBlue","SlateBlue","SlateGray","SlateGrey","Snow","SpringGreen","SteelBlue","Tan","Teal","Thistle","Tomato","Turquoise","Violet","Wheat","White","WhiteSmoke","Yellow","YellowGreen"],r=["ffffff","f0f8ff","faebd7","00ffff","7fffd4","f0ffff","f5f5dc","ffe4c4","000000","ffebcd","0000ff","8a2be2","a52a2a","deb887","5f9ea0","7fff00","d2691e","ff7f50","6495ed","fff8dc","dc143c","00ffff","00008b","008b8b","b8860b","a9a9a9","a9a9a9","006400","bdb76b","8b008b","556b2f","ff8c00","9932cc","8b0000","e9967a","8fbc8f","483d8b","2f4f4f","2f4f4f","00ced1","9400d3","ff1493","00bfff","696969","696969","1e90ff","b22222","fffaf0","228b22","ff00ff","dcdcdc","f8f8ff","ffd700","daa520","808080","808080","008000","adff2f","f0fff0","ff69b4","cd5c5c","4b0082","fffff0","f0e68c","e6e6fa","fff0f5","7cfc00","fffacd","add8e6","f08080","e0ffff","fafad2","d3d3d3","d3d3d3","90ee90","ffb6c1","ffa07a","20b2aa","87cefa","778899","778899","b0c4de","ffffe0","00ff00","32cd32","faf0e6","ff00ff","800000","66cdaa","0000cd","ba55d3","9370db","3cb371","7b68ee","00fa9a","48d1cc","c71585","191970","f5fffa","ffe4e1","ffe4b5","ffdead","000080","fdf5e6","808000","6b8e23","ffa500","ff4500","da70d6","eee8aa","98fb98","afeeee","db7093","ffefd5","ffdab9","cd853f","ffc0cb","dda0dd","b0e0e6","800080","663399","ff0000","bc8f8f","4169e1","8b4513","fa8072","f4a460","2e8b57","fff5ee","a0522d","c0c0c0","87ceeb","6a5acd","708090","708090","fffafa","00ff7f","4682b4","d2b48c","008080","d8bfd8","ff6347","40e0d0","ee82ee","f5deb3","ffffff","f5f5f5","ffff00","9acd32"],i=n.indexOf(t);-1!=i&&(e=r[i]);return"#".concat(e||"000000")}(o)}var a=t["a:srgbClr"]||t["a:schemeClr"]||t["a:sysClr"],s=Yn.get(a,["a:alpha","attrs","val"],1e5);r.alpha=s/1e5;var l=Yn.get(a,["a:shade","attrs","val"]);l&&(r.shade=l/1e5);var u=Yn.get(a,["a:lumMod","attrs","val"]);u&&(r.lumMod=u/1e5);var c=Yn.get(a,["a:lumOff","attrs","val"]);c&&(r.lumOff=c/1e5);var h=Yn.get(a,["a:tint","attrs","val"]);return h&&(r.tint=h/1e5),r}function or(t,e,n){var r,i={type:"blipFill"},o=Yn.get(t,["a:blip","attrs","r:embed"]);if(o){var a=null===(r=n.rels[o])||void 0===r?void 0:r.target;a&&(i.base64=e.getMedia(a))}var s=Yn.get(t,["a:blip","a:alphaModFix","attrs","amt"]);s&&(i.alpha=s/1e5);var l=Yn.get(t,["a:stretch","a:fillRect","attrs"]);return l&&(i.fillRect={},l.b&&(i.fillRect.b=l.b/1e5),l.t&&(i.fillRect.t=l.t/1e5),l.r&&(i.fillRect.r=l.r/1e5),l.l&&(i.fillRect.l=l.l/1e5)),i}function ar(t,e,n){var r={type:"gradFill",tileRect:{},lin:{},gsList:[]};r.flip=t.attrs.flip,r.path=Yn.get(t,["a:path","attrs","path"])||"linear",r.rotWithShape="1"===t.attrs.rotWithShape,Yn.get(t,["a:lin","attrs","ang"])&&(r.lin.ang=er(t["a:lin"].attrs.ang)),Yn.get(t,["a:lin","attrs","scaled"])&&(r.lin.scaled="1"===t["a:lin"].attrs.scaled);var i=Yn.get(t,["a:gsLst","a:gs"])||[];return r.gsList=i.map((function(t){return{color:ir(t,e,n),pos:nr(t.attrs.pos)}})),Yn.get(t,["a:tileRect","attrs","l"])&&(r.tileRect.l=nr(t["a:tileRect"].attrs.l)),Yn.get(t,["a:tileRect","attrs","t"])&&(r.tileRect.t=nr(t["a:tileRect"].attrs.t)),Yn.get(t,["a:tileRect","attrs","r"])&&(r.tileRect.r=nr(t["a:tileRect"].attrs.r)),Yn.get(t,["a:tileRect","attrs","b"])&&(r.tileRect.b=nr(t["a:tileRect"].attrs.b)),r}function sr(t){return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function lr(t){return t<.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055}function ur(t,e){var n=t[0],r=t[1],i=t[2],o=sr(n/255)*e,a=sr(r/255)*e,s=sr(i/255)*e;return[Math.round(255*lr(o)),Math.round(255*lr(a)),Math.round(255*lr(s))]}function cr(t,e,n){var r=t/255,i=e/255,o=n/255,a=Math.max(r,i,o),s=Math.min(r,i,o),l=a-s,u=0,c=(a+s)/2;return 0===l?u=0:a===r?u=(i-o)/l%6:a===i?u=(o-r)/l+2:a===o&&(u=(r-i)/l+4),(u=Math.round(60*u))<0&&(u+=360),{h:u,s:0===l||0===c||1===c?0:l/(1-Math.abs(2*c-1)),l:c}}function hr(t,e,n){var r,i,o,a=(1-Math.abs(2*n-1))*e,s=a*(1-Math.abs(t/60%2-1)),l=n-a/2;return t<60?(r=a,i=s,o=0):t<120?(r=s,i=a,o=0):t<180?(r=0,i=a,o=s):t<240?(r=0,i=s,o=a):t<300?(r=s,i=0,o=a):(r=a,i=0,o=s),[r=Math.round(255*(r+l)),i=Math.round(255*(i+l)),o=Math.round(255*(o+l))]}function dr(t,e){if(!t||"none"===t.type)return"";if("solidFill"===t.type&&/^#[\da-fA-F]{3,6}$/.test(t.color)){var n=parseInt(t.color.substr(1,2),16),r=parseInt(t.color.substr(3,2),16),i=parseInt(t.color.substr(5,2),16);if(t.shade){var o=ur([n,r,i],t.shade);n=o[0],r=o[1],i=o[2]}if(t.lumMod){var a=function(t,e,n,r){var i=cr(t,e,n),o=i.h,a=i.l*r;return a>=1&&(a=1),hr(o,i.s,a)}(n,r,i,t.lumMod);n=a[0],r=a[1],i=a[2]}if(t.lumOff){a=function(t,e,n,r){var i=cr(t,e,n),o=i.h,a=r+i.l;return a>1&&(a=1),hr(o,i.s,a)}(n,r,i,t.lumOff);n=a[0],r=a[1],i=a[2]}if(t.tint||(null==e?void 0:e.light)){var s=function(t,e,n,r){var i=cr(t,e,n),o=i.h,a=i.l;return r>=1&&(r=1),hr(o,i.s,a*r+(1-r))}(n,r,i,t.tint||(null==e?void 0:e.light));n=s[0],r=s[1],i=s[2]}if(null==e?void 0:e.dark){var l=ur([n,r,i],null==e?void 0:e.dark);n=l[0],r=l[1],i=l[2]}var u=t.alpha;return"rgba(".concat(n,",").concat(r,",").concat(i,",").concat(u,")")}}for(var pr,fr=[],gr=0;gr<256;++gr)fr.push((gr+256).toString(16).slice(1));var yr=new Uint8Array(16);function vr(){if(!pr&&!(pr="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return pr(yr)}var mr={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function _r(t,e,n){if(mr.randomUUID&&!t)return mr.randomUUID();var r=(t=t||{}).random||(t.rng||vr)();return r[6]=15&r[6]|64,r[8]=63&r[8]|128,function(t,e=0){return(fr[t[e+0]]+fr[t[e+1]]+fr[t[e+2]]+fr[t[e+3]]+"-"+fr[t[e+4]]+fr[t[e+5]]+"-"+fr[t[e+6]]+fr[t[e+7]]+"-"+fr[t[e+8]]+fr[t[e+9]]+"-"+fr[t[e+10]]+fr[t[e+11]]+fr[t[e+12]]+fr[t[e+13]]+fr[t[e+14]]+fr[t[e+15]]).toLowerCase()}(r)}var xr=function(){function t(t,e,n){var r,i;this.uuid=_r(),this.offset={x:0,y:0},this.extend={w:0,h:0},this.rotate=0,this.order=0,this.flipV=!1,this.flipH=!1,this.source=t,this.ctx=e,this.group=n;var o=Yn.get(t,["p:nvSpPr","p:nvPr"]);if(o){var a=Yn.get(o,"p:ph");a&&a.attrs&&(this.idx=a.attrs.idx,this.type=a.attrs.type),Yn.get(o,["attrs","userDrawn"])&&(this.userDrawn="1"===Yn.get(o,["attrs","userDrawn"]))}if(this.order=Yn.get(t,"attrs.order",0),this.source["p:spPr"]){if(l=this.getXfrm()){var s=this.group&&((null===(r=this.ctx.pptx)||void 0===r?void 0:r.wps)||"point"===$n(parseInt(l["a:off"].attrs.x)))?Jn:Qn;this.offset={x:Math.round(s(parseInt(l["a:off"].attrs.x))),y:Math.round(s(parseInt(l["a:off"].attrs.y)))},this.extend={w:Math.round(s(parseInt(l["a:ext"].attrs.cx))),h:Math.round(s(parseInt(l["a:ext"].attrs.cy||"0")))},this.rotate=er(parseInt(Yn.get(l,"attrs.rot",0))),this.flipV="1"===Yn.get(l,"attrs.flipV"),this.flipH="1"===Yn.get(l,"attrs.flipH")}}else if(this.source["p:xfrm"]){var l=this.source["p:xfrm"];s=this.group&&((null===(i=this.ctx.pptx)||void 0===i?void 0:i.wps)||"point"===$n(parseInt(l["a:off"].attrs.x)))?Jn:Qn;this.offset={x:Math.round(s(parseInt(l["a:off"].attrs.x))),y:Math.round(s(parseInt(l["a:off"].attrs.y)))},this.extend={w:Math.round(s(parseInt(l["a:ext"].attrs.cx))),h:Math.round(s(parseInt(l["a:ext"].attrs.cy)))}}if(n){var u=n.extend,c=n.chExtend,h=n.chOffset,d=0===c.w?0:u.w/c.w,p=0===c.h?0:u.h/c.h;this.extend.w=this.extend.w*d,this.extend.h=this.extend.h*p,this.offset.x=(this.offset.x-h.x)*d,this.offset.y=(this.offset.y-h.y)*p}}return Object.defineProperty(t.prototype,"theme",{get:function(){return(this.ctx.sliderMaster||this.ctx).theme},enumerable:!1,configurable:!0}),t.prototype.getColorThemeName=function(t){return this.ctx.getColorThemeName(t)},t.prototype.getXfrm=function(){var t=this.source["p:spPr"]["a:xfrm"];return t||(this.idx?t=this.ctx.getNodeInheritAttrsByIdx(this.idx,["p:spPr","a:xfrm"]):this.type&&(t=this.ctx.getNodeInheritAttrsByType(this.type,["p:spPr","a:xfrm"]))),t},t}(),br=function(){function t(t,e){this.props={},this.inheritProps={},this.source=t,this.node=e,this._getInheritBodyProps(),this._parseBodyProps(),this._parseLstStyle(),this._parseText()}return t.prototype._getInheritBodyProps=function(){var t,e=this.node.ctx,n=this.node.type,r=this.node.idx;if(n||r)switch(e.slideType){case"slideMaster":break;case"slideLayout":(t=n?e.slideMaster.getNodeByType(n):e.slideMaster.getNodeByIdx(r))&&(this.inheritProps=Yn.get(t,["textBody","props"])||{});break;case"slide":(t=n?e.slideLayout.slideMaster.getNodeByType(n):e.slideLayout.slideMaster.getNodeByIdx(r))&&Object.assign(this.inheritProps,Yn.get(t,["textBody","props"])||{}),(t=n?e.slideLayout.getNodeByType(n):e.slideLayout.getNodeByIdx(r))&&Object.assign(this.inheritProps,Yn.get(t,["textBody","props"])||{})}},t.prototype._parseBodyProps=function(){var t=this,e=Yn.get(this.source,["a:bodyPr","attrs"])||{};Object.keys(e).forEach((function(n){switch(n){case"anchor":t.props.anchor=e[n];break;case"rtlCol":t.props.rtlCol="1"===e[n];break;case"lIns":case"rIns":case"tIns":case"bIns":t.props[n]=Qn(parseInt(e[n]));break;case"order":break;default:t.props[n]=e[n]}}));var n=Yn.get(this.source,["a:bodyPr","a:normAutofit","attrs"]);if(n){this.props.normAutofit={};var r=n.fontScale;r&&(this.props.normAutofit.fontScale=nr(parseInt(r)));var i=n.lnSpcReduction;i&&(this.props.normAutofit.lnSpcReduction=nr(parseInt(i)))}},t.prototype._parseLstStyle=function(){var t=this,e={},n=Yn.get(this.source,"a:lstStyle")||{};Object.keys(n).forEach((function(r){if(r.startsWith("a:")&&r.endsWith("pPr")){var i=r.substr(2,r.length-5);e[i]={props:t._formatPPr(n[r])};var o=Yn.get(n[r],["a:defRPr"]);e[i].defRPr=t._formatRPr(o)}})),this.lstStyle=e},t.prototype._parseText=function(){var t=this,e=Yn.get(this.source,["a:p"])||[];Array.isArray(e)||(e=[e]),this.paragraphs=e.map((function(e){return t._parseParagraph(e)}))},t.prototype._parseParagraph=function(t){var e=this,n={props:{},inheritProps:{},inheritRProps:{},endParaRProps:{},rows:[]},r=Yn.get(t,["a:pPr"])||{};n.props=this._formatPPr(r);var i=Yn.get(t,["a:endParaRPr"]);n.endParaRProps=this._formatRPr(i);var o=Yn.get(t,["a:r"])||[];Array.isArray(o)||(o=[o]);var a=Yn.get(t,["a:br"])||[];return Array.isArray(a)||(a=[a]),(o=o.concat(a.map((function(t){return s({isBr:!0},t)})))).sort((function(t,e){return Yn.get(t,["attrs","order"])-Yn.get(e,["attrs","order"])})),n.rows=o.map((function(t){return e._parseRow(t)})),n.inheritProps=this._getInheritPProps(n.props.level),n.inheritRProps=this._getInheritRProps(n.props.level),n},t.prototype._getInheritPProps=function(t){void 0===t&&(t="0");var e,n={},r=this.node.ctx,i=this.node.type,o=this.node.idx;switch(r.slideType){case"slideMaster":this.node.isTextBox?Object.assign(n,Yn.get(r.defaultTextStyle,["lvl".concat(t?+t+1:1),"props"])||{}):Object.assign(n,Yn.get(r,["textStyles","otherStyle","lvl".concat(t?+t+1:1),"props"])||{});break;case"slideLayout":this.node.isTextBox?Object.assign(n,Yn.get(r.slideMaster.defaultTextStyle,["lvl".concat(t?+t+1:1),"props"])||{}):Object.assign(n,Yn.get(r.slideMaster,["textStyles","otherStyle","lvl".concat(t?+t+1:1),"props"])||{}),(i||o)&&(e=i?r.slideMaster.getNodeByType(i):r.slideMaster.getNodeByIdx(o))&&Object.assign(n,Yn.get(e,["textBody","lstStyle","lvl".concat(t?+t+1:1),"props"])||{});break;case"slide":this.node.isTextBox?Object.assign(n,Yn.get(r.slideLayout.slideMaster.defaultTextStyle,["lvl".concat(t?+t+1:1),"props"])||{}):Object.assign(n,Yn.get(r.slideLayout.slideMaster,["textStyles","otherStyle","lvl".concat(t?+t+1:1),"props"])||{}),(i||o)&&(["subTitle","ctrTitle","title"].includes(i)&&Object.assign(n,Yn.get(r.slideLayout.slideMaster,["textStyles","titleStyle","lvl".concat(t?+t+1:1),"props"])||{}),(e=i?r.slideLayout.slideMaster.getNodeByType(i):r.slideLayout.slideMaster.getNodeByIdx(o))&&Object.assign(n,Yn.get(e,["textBody","lstStyle","lvl".concat(t?+t+1:1),"props"])||{}),(e=i?r.slideLayout.getNodeByType(i):r.slideLayout.getNodeByIdx(o))&&Object.assign(n,Yn.get(e,["textBody","lstStyle","lvl".concat(t?+t+1:1),"props"])||{}))}return n},t.prototype._getInheritRProps=function(t){void 0===t&&(t="0");var e,n={},r=this.node.ctx,i=this.node.type,o=this.node.idx;switch(r.slideType){case"slideMaster":this.node.isTextBox?Object.assign(n,Yn.get(r.defaultTextStyle,["lvl".concat(t?+t+1:1),"defRPr"])||{}):Object.assign(n,Yn.get(r,["textStyles","otherStyle","lvl".concat(t?+t+1:1),"defRPr"])||{});break;case"slideLayout":this.node.isTextBox?Object.assign(n,Yn.get(r.slideMaster.defaultTextStyle,["lvl".concat(t?+t+1:1),"defRPr"])||{}):Object.assign(n,Yn.get(r.slideMaster,["textStyles","otherStyle","lvl".concat(t?+t+1:1),"defRPr"])||{}),(i||o)&&(e=i?r.slideMaster.getNodeByType(i):r.slideMaster.getNodeByIdx(o))&&(n=Yn.get(e,["textBody","lstStyle","lvl".concat(t?+t+1:1),"defRPr"])||{});break;case"slide":this.node.isTextBox?Object.assign(n,Yn.get(r.slideLayout.slideMaster.defaultTextStyle,["lvl".concat(t?+t+1:1),"defRPr"])||{}):Object.assign(n,Yn.get(r.slideLayout.slideMaster,["textStyles","otherStyle","lvl".concat(t?+t+1:1),"defRPr"])||{}),(i||o)&&(["subTitle","ctrTitle","title"].includes(i)&&Object.assign(n,Yn.get(r.slideLayout.slideMaster,["textStyles","titleStyle","lvl".concat(t?+t+1:1),"defRPr"])||{}),(e=i?r.slideLayout.slideMaster.getNodeByType(i):r.slideLayout.slideMaster.getNodeByIdx(o))&&Object.assign(n,Yn.get(e,["textBody","lstStyle","lvl".concat(t?+t+1:1),"defRPr"])||{}),(e=i?r.slideLayout.getNodeByType(i):r.slideLayout.getNodeByIdx(o))&&Object.assign(n,Yn.get(e,["textBody","lstStyle","lvl".concat(t?+t+1:1),"defRPr"])||{}))}var a=Yn.get(this.node.source,["p:style","a:fontRef"]);return Yn.get(a,"a:schemeClr")&&(n.color=ir(a,this.node.theme,this.node)),Yn.get(this.lstStyle,["lvl".concat(t?+t+1:1),"defRPr"])&&Object.assign(n,Yn.get(this.lstStyle,["lvl".concat(t?+t+1:1),"defRPr"])),n},t.prototype._formatPPr=function(t){var e={},n=Yn.get(t,"attrs")||{};return Object.keys(n).forEach((function(t){switch(t){case"algn":e.align=n[t];break;case"marL":e.marginLeft=Qn(parseInt(n[t]));break;case"indent":e.indent=Qn(parseInt(n[t]));break;case"lvl":e.level=n[t]}})),Yn.get(t,["a:lnSpc","a:spcPct","attrs","val"])&&(e.lineHeight=parseInt(t["a:lnSpc"]["a:spcPct"].attrs.val)/1e5),Yn.get(t,["a:buAutoNum","attrs","type"])&&(e.buAutoNum=t["a:buAutoNum"].attrs.type),Yn.get(t,["a:buChar","attrs","char"])&&(e.buChar=t["a:buChar"].attrs.char),Yn.get(t,["a:spcBef","a:spcPts","attrs","val"])&&(e.spaceBefore=tr(parseInt(t["a:spcBef"]["a:spcPts"].attrs.val))),Yn.get(t,["a:spcAft","a:spcPts","attrs","val"])&&(e.spaceAfter=tr(parseInt(t["a:spcAft"]["a:spcPts"].attrs.val))),Yn.get(t,["a:defRPr"])&&(e.defRPr=this._formatRPr(Yn.get(t,["a:defRPr"]))),e},t.prototype._parseRow=function(t){if(t.isBr)return{isBr:!0};var e={props:{},text:""},n=Yn.get(t,["a:rPr"])||{};return e.props=this._formatRPr(n),e.text=Yn.get(t,"a:t")||"",e},t.prototype._formatRPr=function(t){var e={},n=Yn.get(t,"attrs")||{};Object.keys(n).forEach((function(t){switch(t){case"sz":e.size=parseInt(n[t])/100;break;case"b":e.bold="1"===n[t];break;case"i":e.italic="1"===n[t];break;case"u":e.underline=n[t];break;case"strike":e.strike=n[t];break;case"order":case"dirty":break;default:e[t]=n[t]}}));var r=Yn.get(t,"a:solidFill");r&&(e.color=ir(r,this.node.theme,this.node));var i=Yn.get(t,"a:highlight");return i&&(e.background=ir(i,this.node.theme,this.node)),e.typeface=Yn.get(t,["a:ea","attrs","typeface"]),e},t}();function wr(t,e,n){var r={};if(!Yn.get(t,"a:noFill")){Yn.get(t,"attrs.w")&&(r.width=Qn(parseInt(Yn.get(t,"attrs.w"))));var i=Yn.get(t,"a:solidFill");i&&(r.color=ir(i,e,n));var o=Yn.get(t,"a:prstDash");if(o&&(r.type=o.attrs.val),Yn.get(t,["a:miter"])&&(r.lineJoin="miter"),Yn.get(t,["a:bevel"])&&(r.lineJoin="bevel"),Yn.get(t,["a:round"])&&(r.lineJoin="round"),Yn.get(t,["a:miter","attrs","lim"])&&(r.miterLim=Qn(parseInt(Yn.get(t,["a:miter","attrs","lim"])))),Yn.get(t,["a:headEnd"])){var a=Yn.get(t,["a:headEnd","attrs"]);r.headEnd={type:a.type,len:a.len,w:a.w}}if(Yn.get(t,["a:tailEnd"])){var s=Yn.get(t,["a:tailEnd","attrs"]);r.tailEnd={type:s.type,len:s.len,w:s.w}}return r}}var Sr=function(t){function e(e,n,r,i){var o=t.call(this,e,r,i)||this;return o.border={},o.prstGeom={},o.isTextBox=!1,o.pptx=n,o._parseShape(),o._parIsTextBox(),o._parsePrstGeom(),o._parseBackground(),o._parseBorder(),o._parseTxt(),o}return a(e,t),e.prototype._parseShape=function(){if(this.shape=Yn.get(this.source,["p:spPr","a:prstGeom","attrs","prst"]),!this.shape&&Yn.get(this.source,["p:spPr","a:custGeom"])){this.shape="customGeom";var t=Yn.get(this.source,["p:spPr","a:custGeom","a:pathLst","a:path"]),e=[],n=[],r=function(r){switch(r){case"a:moveTo":case"a:cubicBezTo":case"a:lnTo":n=Array.isArray(t[r])?t[r]:[t[r]],e=e.concat(n.map((function(t){return{order:t.attrs.order,type:r.split(":")[1],points:(Array.isArray(t["a:pt"])?t["a:pt"]:[t["a:pt"]]).map((function(t){return[Qn(parseInt(Yn.get(t,["attrs","x"]))),Qn(parseInt(Yn.get(t,["attrs","y"])))]}))}})));break;case"a:close":n=Array.isArray(t[r])?t[r]:[t[r]],e=e.concat(n.map((function(t){return{order:t.attrs.order,type:r.split(":")[1]}})))}};for(var i in t)r(i);e.sort((function(t,e){return t.order-e.order})),this.prstGeom.pathList=e,Yn.get(t,["attrs","w"])&&(this.prstGeom.w=Qn(parseInt(Yn.get(t,["attrs","w"])))),Yn.get(t,["attrs","h"])&&(this.prstGeom.h=Qn(parseInt(Yn.get(t,["attrs","h"]))))}},e.prototype._parIsTextBox=function(){this.isTextBox="1"===Yn.get(this.source,["p:nvSpPr","p:cNvSpPr","attrs","txBox"])},e.prototype._parsePrstGeom=function(){var t=this,e=Yn.get(this.source,["p:spPr","a:prstGeom"]),n=Yn.get(e,["a:avLst","a:gd"]);n&&(Array.isArray(n)||(n=[n]),this.prstGeom.gd=n.map((function(e){var n=["pie","chord","arc"].includes(t.shape)||["blockArc"].includes(t.shape)&&["adj1","adj2"].includes(e.attrs.name)?er(parseInt(e.attrs.fmla.split(" ")[1])):nr(parseInt(e.attrs.fmla.split(" ")[1]));return{name:e.attrs.name,fmla:n}})))},e.prototype._parseBackground=function(){if(!Yn.get(this.source,["p:spPr","a:noFill"]))if(Yn.get(this.source,["p:spPr","a:grpFill"])&&this.group)this.background=this.group.getBackground();else{var t=Yn.get(this.source,["p:spPr","a:solidFill"]);if(t)this.background=ir(t,this.theme,this);else{var e=Yn.get(this.source,["p:spPr","a:gradFill"]);if(e)this.background=ar(e,this.theme,this);else{var n=Yn.get(this.source,["p:spPr","a:blipFill"]);if(n)this.background=or(n,this.pptx,this.ctx);else{var r=Yn.get(this.source,["p:style","a:fillRef"]);r&&(this.background=ir(r,this.theme,this))}}}}},e.prototype._parseBorder=function(){var t=Yn.get(this.source,["p:style","a:lnRef"]);if(t){var n=parseInt(t.attrs.idx),r=this.theme.getLineStyle(n);this.border=s(s({},r),this.border),this.border.color&&this.border.color.color||(this.border.color=ir(t,this.theme,this))}var i=Yn.get(this.source,["p:spPr","a:ln"]);i&&Object.assign(this.border,wr(i,this.theme,this)),this.border.color&&this.border.color.color&&!this.border.width&&(this.border.width=e.defaultBorderWidth)},e.prototype._parseTxt=function(){this.textBody=new br(Yn.get(this.source,["p:txBody"]),this)},e.defaultBorderWidth=.75,e}(xr),Mr=function(t){function e(e,n,r,i,o){var a,s,l=t.call(this,n,i,o)||this;l.userDrawn=!0,l.pptx=r,l.path=e;var u=Yn.get(l.source,["p:blipFill","a:srcRect"]);u&&(l.clip={},u.attrs.b&&(l.clip.b=parseInt(u.attrs.b)/1e5),u.attrs.t&&(l.clip.t=parseInt(u.attrs.t)/1e5),u.attrs.l&&(l.clip.l=parseInt(u.attrs.l)/1e5),u.attrs.r&&(l.clip.r=parseInt(u.attrs.r)/1e5));var c=Yn.get(n,["p:nvPicPr","p:nvPr","a:audioFile","attrs","r:link"]);if(c){var h=null===(a=l.ctx.rels[c])||void 0===a?void 0:a.target;l.audioFile=l.pptx.getMedia(h)}var d=Yn.get(n,["p:nvPicPr","p:nvPr","a:videoFile","attrs","r:link"]);if(d){var p=null===(s=l.ctx.rels[d])||void 0===s?void 0:s.target;l.videoFile=l.pptx.getMedia(p)}return l}return a(e,t),Object.defineProperty(e.prototype,"base64",{get:function(){return this.pptx.getMedia(this.path)},enumerable:!1,configurable:!0}),e}(xr),Ir=function(t){function e(e,n,r,i){var o=t.call(this,e,r,i)||this;return o.userDrawn=!0,o.props={tableStyleId:""},o.tableGrid={gridCol:[]},o.tr=[],o.tableStyles={},o.pptx=n,o._parseTableProps(),o._parseTableGrid(),o._parseTr(),o._parseInheritStyles(),o}return a(e,t),Object.defineProperty(e.prototype,"slideMaster",{get:function(){return this.ctx.slideMaster||this.ctx},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"theme",{get:function(){return this.slideMaster.theme},enumerable:!1,configurable:!0}),e.prototype._parseTableProps=function(){var t=Yn.get(this.source,["a:graphic","a:graphicData","a:tbl","a:tblPr"]);this.props.tableStyleId=Yn.get(t,"a:tableStyleId"),this.tableStyles=Yn.get(this.slideMaster.tableStyles,this.props.tableStyleId)||{},"1"===Yn.get(t,["attrs","bandCol"])&&(this.props.bandCol=!0),"1"===Yn.get(t,["attrs","bandRow"])&&(this.props.bandRow=!0),"1"===Yn.get(t,["attrs","firstCol"])&&(this.props.firstCol=!0),"1"===Yn.get(t,["attrs","firstRow"])&&(this.props.firstRow=!0),"1"===Yn.get(t,["attrs","lastCol"])&&(this.props.lastCol=!0),"1"===Yn.get(t,["attrs","lastRow"])&&(this.props.lastRow=!0)},e.prototype._parseTableGrid=function(){var t=Yn.get(this.source,["a:graphic","a:graphicData","a:tbl","a:tblGrid","a:gridCol"]);if(t)for(var e=0;e>>0))),[4,r.async("base64")]):[3,4];case 2:o=u.sent(),this.medias[r.name]="data:".concat(i,";base64,").concat(o),u.label=3;case 3:return e++,[3,1];case 4:a=Object.keys(this._zipContents.files).filter((function(t){return t.startsWith("ppt/media/media")&&["mp3","wav","ogg","mp4","webm"].includes(t.split(".").pop().toLowerCase())})).map((function(t){return f._zipContents.files[t]})),s=0,l=a,u.label=5;case 5:return s3999)throw new Error("Input must be a number between 1 and 3999.");for(var n="",r=0;r=e[r].value;)n+=e[r].numeral,t-=e[r].value;return n}(n)+".";break;case"alphaUcPeriod":r.textContent=rr(n)+".";break;case"alphaLcPeriod":r.textContent=rr(n).toLowerCase()+".";break;case"alphaLcParenR":r.textContent=rr(n).toLowerCase()+")";break;case"ea1JpnChsDbPeriod":r.textContent=function(t){var e=["〇","一","二","三","四","五","六","七","八","九"];if(!Number.isInteger(t)||t<0)return"";for(var n="",r=t.toString(),i=0;i0&&o3*Math.PI/2&&o<2*Math.PI?e+Math.sqrt(1/(1/Math.pow(r,2)+Math.pow(Math.tan(o),2)/Math.pow(i,2))):e-Math.sqrt(1/(1/Math.pow(r,2)+Math.pow(Math.tan(o),2)/Math.pow(i,2))),0===o||o===2*Math.PI||o===Math.PI?n:o===Math.PI/2?n+i:o===3*Math.PI/2?n-i:o>Math.PI&&o<2*Math.PI?n-Math.sqrt(1/(1/Math.pow(i,2)+Math.pow(1/Math.tan(o),2)/Math.pow(r,2))):n+Math.sqrt(1/(1/Math.pow(i,2)+Math.pow(1/Math.tan(o),2)/Math.pow(r,2)))]}function ni(t,e){var n=0;return(e>t&&e-t>180||e2*r&&(n=2*r);var a=["M0,".concat(e.h-r),"L".concat(i,",").concat(e.h-2*r),"L".concat(i,",").concat(e.h-r-n/2),"L".concat(e.w/2-n/2,",").concat(e.h-r-n/2),"L".concat(e.w/2-n/2,",").concat(i),"L".concat(e.w/2-r,",").concat(i),"L".concat(e.w/2,",0"),"L".concat(e.w/2+r,",").concat(i),"L".concat(e.w/2+n/2,",").concat(i),"L".concat(e.w/2+n/2,",").concat(e.h-r-n/2),"L".concat(e.w-i,",").concat(e.h-r-n/2),"L".concat(e.w-i,",").concat(e.h-2*r),"L".concat(e.w,",").concat(e.h-r),"L".concat(e.w-i,",").concat(e.h),"L".concat(e.w-i,",").concat(e.h-r+n/2),"L".concat(i,",").concat(e.h-r+n/2),"L".concat(i,",").concat(e.h),"Z"].join(" ");return o.setAttribute("d",a),o}(t),f=function(t){var e=t.extend,n=Ur("adj1",t,.225*Math.min(e.w,e.h)),r=Ur("adj2",t,.225*Math.min(e.w,e.h)),i=Ur("adj3",t,.225*Math.min(e.w,e.h)),o=0===r?0:n*i/r/2;return{top:e.h-r-n/2,bottom:r-n/2,left:o,right:o,w:e.w-2*o,h:n}}(t);break;case"bentArrow":d=function(t){var e=t.extend,n=Ur("adj1",t,.25*Math.min(e.w,e.h)),r=Ur("adj2",t,.25*Math.min(e.w,e.h)),i=Ur("adj3",t,.25*Math.min(e.w,e.h)),o=Ur("adj4",t,.4375*Math.min(e.w,e.h)),a=jr("path");n>2*r&&(n=2*r);var s=o-n;s<0&&(s=0);var l=["M0,".concat(e.h),"L0,".concat(r-n/2+o),"A".concat(o," ").concat(o," 0 0 1 ").concat(o," ").concat(r-n/2),"L".concat(e.w-i,",").concat(r-n/2),"L".concat(e.w-i,",0"),"L".concat(e.w,",").concat(r),"L".concat(e.w-i,",").concat(2*r),"L".concat(e.w-i,",").concat(r+n/2),"L".concat(n+s,",").concat(r+n/2),"A".concat(s," ").concat(s," 0 0 0 ").concat(n," ").concat(r+n/2+s),"L".concat(n,",").concat(e.h),"Z"].join(" ");return a.setAttribute("d",l),a}(t);break;case"uturnArrow":d=function(t){var e=t.extend,n=Ur("adj1",t,.25*Math.min(e.w,e.h)),r=Ur("adj2",t,.25*Math.min(e.w,e.h)),i=Ur("adj3",t,.25*Math.min(e.w,e.h)),o=Ur("adj4",t,.4375*Math.min(e.w,e.h)),a=Ur("adj5",t,.75*Math.min(e.w,e.h)),s=jr("path");n>2*r&&(n=2*r),aa-i&&(o=a-i);var l=o-n;l>a-i-n&&(l=a-i-n),l<0&&(l=0);var u=r-n/2,c=["M0,".concat(e.h),"L0,".concat(o),"A".concat(o," ").concat(o," 0 0 1 ").concat(o," 0"),"L".concat(e.w-o-u,",0"),"A".concat(o," ").concat(o," 0 0 1 ").concat(e.w-u," ").concat(o),"L".concat(e.w-u,",").concat(a-i),"L".concat(e.w,",").concat(a-i),"L".concat(e.w-r,",").concat(a),"L".concat(e.w-2*r,",").concat(a-i),"L".concat(e.w-r-n/2,",").concat(a-i),"L".concat(e.w-r-n/2,",").concat(n+l),"A".concat(l," ").concat(l," 0 0 0 ").concat(e.w-l-r-n/2," ").concat(n),"L".concat(n+l,",").concat(n),"A".concat(l," ").concat(l," 0 0 0 ").concat(n," ").concat(n+l),"L".concat(n,",").concat(e.h),"Z"].join(" ");return s.setAttribute("d",c),s}(t);break;case"leftUpArrow":d=function(t){var e=t.extend,n=Ur("adj1",t,.25*Math.min(e.w,e.h)),r=Ur("adj2",t,.25*Math.min(e.w,e.h)),i=Ur("adj3",t,.25*Math.min(e.w,e.h));n>2*r&&(n=2*r);var o=Math.min(e.w,e.h)-2*r;i>o&&(i=o),i<0&&(i=0);var a=r-n/2,s=jr("path"),l=["M0,".concat(e.h-r),"L".concat(i,",").concat(e.h-2*r),"L".concat(i,",").concat(e.h-r-n/2),"L".concat(e.w-r-n/2,",").concat(e.h-r-n/2),"L".concat(e.w-r-n/2,",").concat(i),"L".concat(e.w-2*r,",").concat(i),"L".concat(e.w-r,",0"),"L".concat(e.w,",").concat(i),"L".concat(e.w-a,",").concat(i),"L".concat(e.w-a,",").concat(e.h-a),"L".concat(i,",").concat(e.h-a),"L".concat(i,",").concat(e.h),"Z"].join(" ");return s.setAttribute("d",l),s}(t),f=function(t){var e=t.extend,n=Ur("adj1",t,.25*Math.min(e.w,e.h)),r=Ur("adj2",t,.25*Math.min(e.w,e.h)),i=Ur("adj3",t,.25*Math.min(e.w,e.h));n>2*r&&(n=2*r);var o=Math.min(e.w,e.h)-2*r;i>o&&(i=o),i<0&&(i=0);var a=0===r?0:n*i/r/2;return{top:e.h-r-n/2,bottom:r-n/2,left:a,right:r,w:e.w-a-r,h:n}}(t);break;case"bentUpArrow":d=function(t){var e=t.extend,n=Ur("adj1",t,.25*Math.min(e.w,e.h)),r=Ur("adj2",t,.25*Math.min(e.w,e.h)),i=Ur("adj3",t,.25*Math.min(e.w,e.h));n>2*r&&(n=2*r);var o=Math.min(e.w,e.h)-2*r;i>o&&(i=o),i<0&&(i=0);var a=r-n/2,s=jr("path"),l=["M0,".concat(e.h),"L0,".concat(e.h-n),"L".concat(e.w-r-n/2,",").concat(e.h-n),"L".concat(e.w-r-n/2,",").concat(i),"L".concat(e.w-2*r,",").concat(i),"L".concat(e.w-r,",0"),"L".concat(e.w,",").concat(i),"L".concat(e.w-a,",").concat(i),"L".concat(e.w-a,",").concat(e.h),"Z"].join(" ");return s.setAttribute("d",l),s}(t),f=function(t){var e=t.extend,n=Ur("adj1",t,.25*Math.min(e.w,e.h));return{top:e.h-n,bottom:0,left:0,right:0,w:e.w,h:n}}(t);break;case"curvedRightArrow":d=function(t){var e=t.extend,n=t.background,r=Ur("adj1",t,.25*Math.min(e.w,e.h)),i=Ur("adj2",t,.5*Math.min(e.w,e.h)),o=Ur("adj3",t,.25*Math.min(e.w,e.h));r>i&&(r=i);var a=i/2-r/2,s=(e.h-i/2-r/2)/2,l=(e.h-a-r)/2,u=jr("g"),c=jr("path"),h=["M".concat(e.w,",0"),"A ".concat(e.w," ").concat(s," 0 0 0 ").concat(0," ").concat(s),"L0,".concat(l+r),"A ".concat(e.w," ").concat(l," 0 0 1 ").concat(e.w," ").concat(r),"Z"].join(" ");c.setAttribute("d",h),"solidFill"===(null==n?void 0:n.type)&&c.setAttribute("fill",dr(n,{dark:.6})||"transparent");var d=jr("path"),p=["M0,".concat(s),"A ".concat(e.w," ").concat(s," 0 0 0 ").concat(e.w-o," ").concat(e.h-i/2-r/2),"L".concat(e.w-o,",").concat(e.h-i),"L".concat(e.w,",").concat(e.h-i/2),"L".concat(e.w-o,",").concat(e.h),"L".concat(e.w-o,",").concat(e.h-a),"A ".concat(e.w," ").concat(l," 0 0 1 0 ").concat(r+l),"Z"].join(" ");return d.setAttribute("d",p),u.appendChild(c),u.appendChild(d),u}(t);break;case"curvedLeftArrow":d=function(t){var e=t.extend,n=t.background,r=Ur("adj1",t,.25*Math.min(e.w,e.h)),i=Ur("adj2",t,.5*Math.min(e.w,e.h)),o=Ur("adj3",t,.25*Math.min(e.w,e.h));r>i&&(r=i);var a=i/2-r/2,s=(e.h-i/2-r/2)/2,l=(e.h-a-r)/2,u=jr("g"),c=jr("path"),h=["M0,".concat(e.h-i/2),"L".concat(o,",").concat(e.h-i),"L".concat(o,",").concat(e.h-i/2-r/2),"A".concat(e.w," ").concat(s," 0 0 0 ").concat(e.w," ").concat(s),"L".concat(e.w,",").concat(l+r),"A ".concat(e.w," ").concat(l," 0 0 1 ").concat(o," ").concat(e.h-a),"L".concat(o,",").concat(e.h),"Z"].join(" ");c.setAttribute("d",h);var d=jr("path"),p=["M0,0","A ".concat(e.w," ").concat(s," 0 0 1 ").concat(e.w," ").concat(s),"L".concat(e.w,",").concat(l+r),"A ".concat(e.w," ").concat(l," 0 0 0 ").concat(0," ").concat(r),"Z"].join(" ");return d.setAttribute("d",p),"solidFill"===(null==n?void 0:n.type)&&d.setAttribute("fill",dr(n,{dark:.6})||"transparent"),u.appendChild(c),u.appendChild(d),u}(t);break;case"curvedUpArrow":d=function(t){var e=t.extend,n=t.background,r=Ur("adj1",t,.25*Math.min(e.w,e.h)),i=Ur("adj2",t,.5*Math.min(e.w,e.h)),o=Ur("adj3",t,.25*Math.min(e.w,e.h));r>i&&(r=i);var a=i/2-r/2,s=(e.w-i/2-r/2)/2,l=(e.w-a-r)/2,u=jr("g"),c=jr("path"),h=["M".concat(e.w-i/2,",").concat(0),"L".concat(e.w-i,",").concat(o),"L".concat(e.w-i/2-r/2,",").concat(o),"A".concat(s," ").concat(e.h," 0 0 1 ").concat(s," ").concat(e.h),"L".concat(s+r,",").concat(e.h),"A".concat(l," ").concat(e.h," 0 0 0 ").concat(e.w-a," ").concat(o),"L".concat(e.w,",").concat(o),"Z"].join(" ");c.setAttribute("d",h);var d=jr("path"),p=["M".concat(r,",0"),"L".concat(0,",").concat(0),"A ".concat(s," ").concat(e.h," 0 0 0 ").concat(s," ").concat(e.h),"L".concat(s+r,",").concat(e.h),"A ".concat(l," ").concat(e.h," 0 0 1 ").concat(r," ").concat(0),"Z"].join(" ");return d.setAttribute("d",p),"solidFill"===(null==n?void 0:n.type)&&d.setAttribute("fill",dr(n,{dark:.6})||"transparent"),u.appendChild(c),u.appendChild(d),u}(t);break;case"curvedDownArrow":d=function(t){var e=t.extend,n=t.background,r=Ur("adj1",t,.25*Math.min(e.w,e.h)),i=Ur("adj2",t,.5*Math.min(e.w,e.h)),o=Ur("adj3",t,.25*Math.min(e.w,e.h));r>i&&(r=i);var a=i/2-r/2,s=(e.w-i/2-r/2)/2,l=(e.w-a-r)/2,u=jr("g"),c=jr("path"),h=["M".concat(0,",").concat(e.h),"L".concat(r,",").concat(e.h),"A".concat(l," ").concat(e.h," 0 0 1 ").concat(l+r," ").concat(0),"L".concat(s,",").concat(0),"A".concat(s," ").concat(e.h," 0 0 0 ").concat(0," ").concat(e.h),"Z"].join(" ");c.setAttribute("d",h),"solidFill"===(null==n?void 0:n.type)&&c.setAttribute("fill",dr(n,{dark:.6})||"transparent");var d=jr("path"),p=["M".concat(e.w-i/2,",").concat(e.h),"L".concat(e.w-i,",").concat(e.h-o),"L".concat(e.w-i/2-r/2,",").concat(e.h-o),"A ".concat(s," ").concat(e.h," 0 0 0 ").concat(s," ").concat(0),"L".concat(s+r,",").concat(0),"A ".concat(l," ").concat(e.h," 0 0 1 ").concat(e.w-a," ").concat(e.h-o),"L".concat(e.w,",").concat(e.h-o),"Z"].join(" ");return d.setAttribute("d",p),u.appendChild(c),u.appendChild(d),u}(t);break;case"stripedRightArrow":d=function(t){var e=t.extend,n=jr("g"),r=Math.min(e.w,e.h),i=Hr("adj1",t,.5)*e.h,o=Hr("adj2",t,.5)*r,a=r/8,s=r/16,l=r/32,u=5*r/32,c=e.h/2-i/2,h=e.h/2+i/2,d=jr("path");d.setAttribute("d",["M".concat(0,",").concat(c),"L".concat(l,",").concat(c),"L".concat(l,",").concat(h),"L".concat(0,",").concat(h),"Z"].join(" "));var p=jr("path");p.setAttribute("d",["M".concat(s,",").concat(c),"L".concat(a,",").concat(c),"L".concat(a,",").concat(h),"L".concat(s,",").concat(h),"Z"].join(" "));var f=jr("path"),g=["M".concat(u,",").concat(c),"L".concat(e.w-o,",").concat(c),"L".concat(e.w-o,",").concat(0),"L".concat(e.w,",").concat(e.h/2),"L".concat(e.w-o,",").concat(e.h),"L".concat(e.w-o,",").concat(h),"L".concat(u,",").concat(h),"Z"].join(" ");return f.setAttribute("d",g),n.appendChild(f),n.appendChild(d),n.appendChild(p),n}(t),f=function(t){var e=t.extend,n=Math.min(e.w,e.h),r=Hr("adj1",t,.5)*e.h,i=r*(Hr("adj2",t,.5)*n)/e.h;return{top:e.h/2-r/2,bottom:e.h/2-r/2,left:0,right:i,w:e.w-i,h:r}}(t);break;case"notchedRightArrow":d=function(t){var e=t.extend,n=Math.min(e.w,e.h),r=Hr("adj1",t,.5)*e.h,i=Hr("adj2",t,.5)*n,o=r*i/e.h,a=e.h/2-r/2,s=e.h/2+r/2,l=jr("path"),u=["M".concat(0,",").concat(a),"L".concat(e.w-i,",").concat(a),"L".concat(e.w-i,",").concat(0),"L".concat(e.w,",").concat(e.h/2),"L".concat(e.w-i,",").concat(e.h),"L".concat(e.w-i,",").concat(s),"L".concat(0,",").concat(s),"L".concat(o,",").concat(e.h/2),"Z"].join(" ");return l.setAttribute("d",u),l}(t),f=function(t){var e=t.extend,n=Math.min(e.w,e.h),r=Hr("adj1",t,.5)*e.h,i=Hr("adj2",t,.5)*n,o=r*i/e.h,a=r*i/e.h;return{top:e.h/2-r/2,bottom:e.h/2-r/2,left:o,right:a,w:e.w-o-a,h:r}}(t);break;case"homePlate":d=function(t){var e=t.extend,n=Math.min(e.w,e.h),r=Hr("adj",t,.5)*n,i=jr("path"),o=["M".concat(0,",").concat(0),"L".concat(e.w-r,",").concat(0),"L".concat(e.w,",").concat(e.h/2),"L".concat(e.w-r,",").concat(e.h),"L".concat(0,",").concat(e.h),"Z"].join(" ");return i.setAttribute("d",o),i}(t),f=function(t){var e=t.extend,n=Math.min(e.w,e.h),r=Hr("adj",t,.5)*n;return{top:0,bottom:0,left:0,right:r/2,w:e.w-r/2,h:e.h}}(t);break;case"chevron":d=function(t){var e=t.extend,n=Math.min(e.w,e.h),r=Hr("adj",t,.5)*n,i=jr("path"),o=["M".concat(0,",").concat(0),"L".concat(e.w-r,",").concat(0),"L".concat(e.w,",").concat(e.h/2),"L".concat(e.w-r,",").concat(e.h),"L".concat(0,",").concat(e.h),"L".concat(r,",").concat(e.h/2),"Z"].join(" ");return i.setAttribute("d",o),i}(t),f=function(t){var e=t.extend,n=Math.min(e.w,e.h),r=Hr("adj",t,.5)*n;return{top:0,bottom:0,left:r,right:r,w:e.w-2*r,h:e.h}}(t);break;case"blockArc":d=function(t){var e=t.extend,n=Math.min(e.w,e.h),r=jr("path"),i=Hr("adj1",t,180),o=Hr("adj2",t,0),a=Ur("adj3",t,.25*n),s=e.w/2,l=e.h/2,u=e.w/2,c=e.h/2,h=e.w/2-a,d=e.h/2-a,p=ei(i,s,l,u,c),f=p[0],g=p[1],y=ei(o,s,l,u,c),v=y[0],m=y[1],_=ei(i,s,l,h,d),x=_[0],b=_[1],w=ei(o,s,l,h,d),S=w[0],M=w[1],I=ni(i,o),C=["M".concat(f,",").concat(g),"A".concat(u," ").concat(c," 0 ").concat(I," 1 ").concat(v," ").concat(m),"L".concat(S,",").concat(M),"A".concat(h," ").concat(d," 0 ").concat(I," 0 ").concat(x," ").concat(b),"Z"].join(" ");return r.setAttribute("d",C),r}(t),f=function(t){var e=t.extend,n=Math.min(e.w,e.h),r=Hr("adj1",t,180),i=Hr("adj2",t,0),o=Ur("adj3",t,.25*n),a=e.w/2,s=e.h/2,l=e.w/2,u=e.h/2,c=e.w/2-o,h=e.h/2-o,d=ei(r,a,s,l,u),p=d[0],f=d[1],g=ei(i,a,s,l,u),y=g[0],v=g[1],m=ei(r,a,s,c,h),_=m[0],x=m[1],b=ei(i,a,s,c,h),w=[[p,f],[y,v],[_,x],[b[0],b[1]]];w.push(),r>i&&w.push([e.w,e.h/2]),(i>180&&i<=360&&r<180||r>i&&i>=0&&i<180&&r<180)&&w.push([0,e.h/2]),(r90||r>i&&i>90||r>i&&r<90)&&w.push([e.w/2,e.h]),(r270||r>i&&i>270||r>i&&r<270)&&w.push([e.w/2,0]);var S=1/0,M=1/0,I=-1/0,C=-1/0;return w.forEach((function(t){S=Math.min(t[0],S),M=Math.min(t[1],M),I=Math.max(t[0],I),C=Math.max(t[1],C)})),{top:M,bottom:e.h-C,left:S,right:e.w-I,w:I-S,h:C-M}}(t);break;case"foldedCorner":d=function(t){var e=t.extend,n=t.background,r=jr("g"),i=jr("path"),o=Ur("adj",t,.16667*Math.min(e.w,e.h)),a=["M0,0","L".concat(e.w,",0"),"L".concat(e.w,",").concat(e.h-o),"L".concat(e.w-o,",").concat(e.h),"L".concat(0,",").concat(e.h),"Z"].join(" ");i.setAttribute("d",a);var s=o*Math.cos(Math.PI/4)/Math.cos(Math.PI/6)*Math.cos(75/180*Math.PI),l=jr("path"),u=["M".concat(e.w-o+s,", ").concat(e.h-o+s),"L".concat(e.w,",").concat(e.h-o),"L".concat(e.w-o,",").concat(e.h),"Z"].join(" ");return l.setAttribute("d",u),"solidFill"===(null==n?void 0:n.type)&&l.setAttribute("fill",dr(n,{dark:.6})||"transparent"),r.appendChild(i),r.appendChild(l),r}(t),f=function(t){var e=t.extend,n=Ur("adj",t,.16667*Math.min(e.w,e.h));return{top:0,bottom:n,left:0,right:0,w:e.w,h:e.h-n}}(t);break;case"rightArrowCallout":d=function(t){var e=t.extend,n=Math.min(e.w,e.h),r=Hr("adj1",t,.25)*n,i=Hr("adj2",t,.25)*n,o=Hr("adj3",t,.25)*n,a=Hr("adj4",t,.64977)*e.w,s=jr("path"),l=["M".concat(0,",").concat(0),"L".concat(a,",").concat(0),"L".concat(a,",").concat(e.h/2-r/2),"L".concat(e.w-o,",").concat(e.h/2-r/2),"L".concat(e.w-o,",").concat(e.h/2-i),"L".concat(e.w,",").concat(e.h/2),"L".concat(e.w-o,",").concat(e.h/2+i),"L".concat(e.w-o,",").concat(e.h/2+r/2),"L".concat(a,",").concat(e.h/2+r/2),"L".concat(a,",").concat(e.h),"L".concat(0,",").concat(e.h),"Z"].join(" ");return s.setAttribute("d",l),s}(t),f=function(t){var e=t.extend,n=Hr("adj4",t,.64977)*e.w;return{top:0,bottom:0,left:0,right:e.w-n,w:n,h:e.h}}(t);break;case"leftArrowCallout":d=function(t){var e=t.extend,n=Math.min(e.w,e.h),r=Hr("adj1",t,.25)*n,i=Hr("adj2",t,.25)*n,o=Hr("adj3",t,.25)*n,a=Hr("adj4",t,.64977)*e.w,s=jr("path"),l=["M".concat(0,",").concat(e.h/2),"L".concat(o,",").concat(e.h/2-i),"L".concat(o,",").concat(e.h/2-r/2),"L".concat(e.w-a,",").concat(e.h/2-r/2),"L".concat(e.w-a,",").concat(0),"L".concat(e.w,",").concat(0),"L".concat(e.w,",").concat(e.h),"L".concat(e.w-a,",").concat(e.h),"L".concat(e.w-a,",").concat(e.h/2+r/2),"L".concat(o,",").concat(e.h/2+r/2),"L".concat(o,",").concat(e.h/2+i),"Z"].join(" ");return s.setAttribute("d",l),s}(t),f=function(t){var e=t.extend,n=Hr("adj4",t,.64977)*e.w;return{top:0,bottom:0,left:e.w-n,right:0,w:n,h:e.h}}(t);break;case"upArrowCallout":d=function(t){var e=t.extend,n=Math.min(e.w,e.h),r=Hr("adj1",t,.25)*n,i=Hr("adj2",t,.25)*n,o=Hr("adj3",t,.25)*n,a=Hr("adj4",t,.64977)*e.h,s=jr("path"),l=["M".concat(0,",").concat(e.h-a),"L".concat(e.w/2-r/2,",").concat(e.h-a),"L".concat(e.w/2-r/2,",").concat(o),"L".concat(e.w/2-i,",").concat(o),"L".concat(e.w/2,",").concat(0),"L".concat(e.w/2+i,",").concat(o),"L".concat(e.w/2+r/2,",").concat(o),"L".concat(e.w/2+r/2,",").concat(e.h-a),"L".concat(e.w,",").concat(e.h-a),"L".concat(e.w,",").concat(e.h),"L".concat(0,",").concat(e.h),"Z"].join(" ");return s.setAttribute("d",l),s}(t),f=function(t){var e=t.extend,n=Hr("adj4",t,.64977)*e.h;return{top:e.h-n,bottom:0,left:0,right:0,w:e.w,h:n}}(t);break;case"downArrowCallout":d=function(t){var e=t.extend,n=Math.min(e.w,e.h),r=Hr("adj1",t,.25)*n,i=Hr("adj2",t,.25)*n,o=Hr("adj3",t,.25)*n,a=Hr("adj4",t,.64977)*e.h,s=jr("path"),l=["M".concat(0,",").concat(0),"L".concat(e.w,",").concat(0),"L".concat(e.w,",").concat(a),"L".concat(e.w/2+r/2,",").concat(a),"L".concat(e.w/2+r/2,",").concat(e.h-o),"L".concat(e.w/2+i,",").concat(e.h-o),"L".concat(e.w/2,",").concat(e.h),"L".concat(e.w/2-i,",").concat(e.h-o),"L".concat(e.w/2-r/2,",").concat(e.h-o),"L".concat(e.w/2-r/2,",").concat(a),"L".concat(0,",").concat(a),"Z"].join(" ");return s.setAttribute("d",l),s}(t),f=function(t){var e=t.extend,n=Hr("adj4",t,.64977)*e.h;return{top:0,bottom:e.h-n,left:0,right:0,w:e.w,h:n}}(t);break;case"leftRightArrowCallout":d=function(t){var e=t.extend,n=Math.min(e.w,e.h),r=Hr("adj1",t,.25)*n,i=Hr("adj2",t,.25)*n,o=Hr("adj3",t,.25)*n,a=Hr("adj4",t,.48123)*e.w,s=jr("path"),l=["M".concat(0,",").concat(e.h/2),"L".concat(o,",").concat(e.h/2-i),"L".concat(o,",").concat(e.h/2-r/2),"L".concat(e.w/2-a/2,",").concat(e.h/2-r/2),"L".concat(e.w/2-a/2,",").concat(0),"L".concat(e.w/2+a/2,",").concat(0),"L".concat(e.w/2+a/2,",").concat(e.h/2-r/2),"L".concat(e.w-o,",").concat(e.h/2-r/2),"L".concat(e.w-o,",").concat(e.h/2-i),"L".concat(e.w,",").concat(e.h/2),"L".concat(e.w-o,",").concat(e.h/2+i),"L".concat(e.w-o,",").concat(e.h/2+r/2),"L".concat(e.w/2+a/2,",").concat(e.h/2+r/2),"L".concat(e.w/2+a/2,",").concat(e.h),"L".concat(e.w/2-a/2,",").concat(e.h),"L".concat(e.w/2-a/2,",").concat(e.h/2+r/2),"L".concat(o,",").concat(e.h/2+r/2),"L".concat(o,",").concat(e.h/2+i),"Z"].join(" ");return s.setAttribute("d",l),s}(t),f=function(t){var e=t.extend,n=Hr("adj4",t,.48123)*e.w;return{top:0,bottom:0,left:e.w/2-n/2,right:e.w/2-n/2,w:n,h:e.h}}(t);break;case"quadArrowCallout":d=function(t){var e=t.extend,n=Math.min(e.w,e.h),r=Hr("adj1",t,.18515)*n,i=Hr("adj2",t,.18515)*n,o=Hr("adj3",t,.18515)*n,a=Hr("adj4",t,.48123)*e.w,s=Hr("adj4",t,.48123)*e.h,l=jr("path"),u=["M".concat(0,",").concat(e.h/2),"L".concat(o,",").concat(e.h/2-i),"L".concat(o,",").concat(e.h/2-r/2),"L".concat(e.w/2-a/2,",").concat(e.h/2-r/2),"L".concat(e.w/2-a/2,",").concat(e.h/2-s/2),"L".concat(e.w/2-r/2,",").concat(e.h/2-s/2),"L".concat(e.w/2-r/2,",").concat(o),"L".concat(e.w/2-i,",").concat(o),"L".concat(e.w/2,",").concat(0),"L".concat(e.w/2+i,",").concat(o),"L".concat(e.w/2+r/2,",").concat(o),"L".concat(e.w/2+r/2,",").concat(e.h/2-s/2),"L".concat(e.w/2+a/2,",").concat(e.h/2-s/2),"L".concat(e.w/2+a/2,",").concat(e.h/2-r/2),"L".concat(e.w-o,",").concat(e.h/2-r/2),"L".concat(e.w-o,",").concat(e.h/2-i),"L".concat(e.w,",").concat(e.h/2),"L".concat(e.w-o,",").concat(e.h/2+i),"L".concat(e.w-o,",").concat(e.h/2+r/2),"L".concat(e.w/2+a/2,",").concat(e.h/2+r/2),"L".concat(e.w/2+a/2,",").concat(e.h/2+s/2),"L".concat(e.w/2+r/2,",").concat(e.h/2+s/2),"L".concat(e.w/2+r/2,",").concat(e.h-o),"L".concat(e.w/2+i,",").concat(e.h-o),"L".concat(e.w/2,",").concat(e.h),"L".concat(e.w/2-i,",").concat(e.h-o),"L".concat(e.w/2-r/2,",").concat(e.h-o),"L".concat(e.w/2-r/2,",").concat(e.h/2+s/2),"L".concat(e.w/2-a/2,",").concat(e.h/2+s/2),"L".concat(e.w/2-a/2,",").concat(e.h/2+r/2),"L".concat(o,",").concat(e.h/2+r/2),"L".concat(o,",").concat(e.h/2+i),"Z"].join(" ");return l.setAttribute("d",u),l}(t),f=function(t){var e=t.extend,n=Hr("adj4",t,.48123)*e.w,r=Hr("adj4",t,.48123)*e.h;return{top:e.h/2-r/2,bottom:e.h/2-r/2,left:e.w/2-n/2,right:e.w/2-n/2,w:n,h:r}}(t)}if(d){g?"blipFill"===(null==i?void 0:i.type)?function(t,e,n){var r=t.background,i=void 0===r?{}:r,o=t.extend,a=i.base64,s=i.alpha,l=i.fillRect,u=void 0===l?{}:l,c=u.b,h=void 0===c?0:c,d=u.t,p=void 0===d?0:d,f=u.l,g=void 0===f?0:f,y=u.r,v=void 0===y?0:y,m=jr("defs"),_=jr("pattern");_.setAttribute("id","background_"+t.uuid),_.setAttribute("patternUnits","userSpaceOnUse"),_.setAttribute("width",o.w+""),_.setAttribute("height",o.h+"");var x=jr("image");x.setAttribute("href",a),x.setAttribute("preserveAspectRatio","none");var b=o.w*g,w=o.h*p,S=o.w*(1-g-v),M=o.h*(1-p-h);x.setAttribute("width",S+""),x.setAttribute("height",M+""),x.setAttribute("x",b+""),x.setAttribute("y",w+""),"number"==typeof s&&x.setAttribute("opacity",s+""),_.appendChild(x),m.appendChild(_),e.appendChild(m),n.setAttribute("fill","url(#background_".concat(t.uuid,")"))}(t,p,d):"gradFill"===(null==i?void 0:i.type)?function(t,e,n){var r=t.background,i=void 0===r?{}:r;t.extend;var o=i.gsList,a=i.lin,s=i.path,l=i.tileRect,u=void 0===l?{}:l,c=jr("defs"),h=jr("circle"===s?"radialGradient":"linearGradient");h.setAttribute("id","background_grad_fill_"+t.uuid);var d=o||[];if(d.sort((function(t,e){return t.pos-e.pos})),d.forEach((function(t){var e=jr("stop");e.setAttribute("offset","".concat(100*t.pos,"%")),e.setAttribute("stop-color",dr(t.color)),h.appendChild(e)})),"circle"===s){var p=u.r,f=u.l,g=u.t,y=u.b;-1===p?h.setAttribute("cx","100%"):-1===f&&h.setAttribute("cx","0%"),-1===g?h.setAttribute("cy","0%"):-1===y&&h.setAttribute("cy","100%")}else(null==a?void 0:a.ang)&&h.setAttribute("gradientTransform","rotate(".concat(a.ang,")"));c.appendChild(h),e.appendChild(c),n.setAttribute("fill","url(#background_grad_fill_".concat(t.uuid,")"))}(t,p,d):d.setAttribute("fill",dr(i)||"transparent"):d.setAttribute("fill","transparent"),r.width?(d.setAttribute("stroke-width",r.width+"px"),d.setAttribute("stroke",dr(r.color)||"transparent")):d.setAttribute("stroke-width","0"),d.setAttribute("stroke-dasharray",function(t){return t&&"solid"!==t.type?({sysDot:[1,1],sysDash:[3,1],dash:[4,3],dashDot:[4,3,1,3],lgDash:[8,3],lgDashDot:[8,3,1,3],lgDashDotDot:[8,3,1,3,1,3]}[t.type]||[]).map((function(e){return e*t.width})).join(","):""}(r));d.setAttribute("stroke-linecap",r.cap&&{sq:"square",rnd:"round",flat:"butt"}[r.cap]||"square"),d.setAttribute("stroke-linejoin",r.lineJoin||"round"),"miter"===r.lineJoin&&d.setAttribute("stroke-miterlimit",r.miterLim+""),p.appendChild(d)}var y=[];a&&y.push("scaleX(-1)"),l&&y.push("scaleY(-1)"),p.style.setProperty("transform",y.join(" ")),u.appendChild(p);var v=function(t,e,n){var r;void 0===n&&(n=!1);var i=t.inheritProps,o=t.props,a=t.paragraphs;if(!a||0===a.length)return null;var l=s(s({},i),o),u=document.createElement("div");switch(u.className="text-wrapper",u.style.boxSizing="border-box",u.style.position="absolute",u.style.left=e.left+"px","eaVert"===l.vert?(u.style.writingMode="vertical-rl",u.style.height=e.h+"px"):u.style.width=e.w+"px",l.anchor){case"b":u.style.bottom=e.bottom+"px";break;case"t":u.style.top=e.top+"px";break;case"ctr":u.style.top=e.top+e.h/2+"px",u.style.transform="translateY(-50%)";break;default:n?u.style.top=e.top+"px":(u.style.top=e.top+e.h/2+"px",u.style.transform="translateY(-50%)")}var c=[l.hasOwnProperty("tIns")?Math.floor(l.tIns)+"px":"3px",l.hasOwnProperty("rIns")?Math.floor(l.rIns)+"px":"5px",l.hasOwnProperty("bIns")?Math.floor(l.bIns)+"px":"3px",l.hasOwnProperty("lIns")?Math.floor(l.lIns)+"px":"5px"];u.style.padding=c.join(" ");for(var h={},d=0,p=function(t){var e=s(s({},t.inheritProps),t.props),n=void 0;if(e.buAutoNum){var i=e.level?+e.level:0;h[i]||(h[i]=0),(null===(r=t.rows)||void 0===r?void 0:r.length)&&h[i]++,Object.keys(h).forEach((function(t){+t>i&&(h[t]=0)})),n=Fr(t,h[i],{isFirst:0===d,isLast:a.length-1===d,bodyProps:l})}else n=Fr(t,0,{isFirst:0===d,isLast:a.length-1===d,bodyProps:l});u.appendChild(n),d++},f=0,g=a;f18);a&&(n.weChat=!0);e.svgSupported="undefined"!=typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,e.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),e.domSupported="undefined"!=typeof document;var s=document.documentElement.style;e.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||n.ie&&+n.version>=9}(navigator.userAgent,si);var li="sans-serif",ui="12px "+li;var ci,hi,di=function(t){var e={};if("undefined"==typeof JSON)return e;for(var n=0;n=0)o=i*t.length;else for(var a=0;a>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",r[s]+":0",i[l]+":0",r[1-s]+":auto",i[1-l]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}return n}(e,o),s=function(t,e,n){for(var r=n?"invTrans":"trans",i=e[r],o=e.srcCoords,a=[],s=[],l=!0,u=0;u<4;u++){var c=t[u].getBoundingClientRect(),h=2*u,d=c.left,p=c.top;a.push(d,p),l=l&&o&&d===o[h]&&p===o[h+1],s.push(t[u].offsetLeft,t[u].offsetTop)}return l&&i?i:(e.srcCoords=a,e[r]=n?Wo(s,a):Wo(a,s))}(a,o,i);if(s)return s(t,n,r),!0}return!1}function Yo(t){return"CANVAS"===t.nodeName.toUpperCase()}var Xo=/([&<>"'])/g,qo={"&":"&","<":"<",">":">",'"':""","'":"'"};function Ko(t){return null==t?"":(t+"").replace(Xo,(function(t,e){return qo[e]}))}var $o=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Qo=[],Jo=si.browser.firefox&&+si.browser.version.split(".")[0]<39;function ta(t,e,n,r){return n=n||{},r?ea(t,e,n):Jo&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):ea(t,e,n),n}function ea(t,e,n){if(si.domSupported&&t.getBoundingClientRect){var r=e.clientX,i=e.clientY;if(Yo(t)){var o=t.getBoundingClientRect();return n.zrX=r-o.left,void(n.zrY=i-o.top)}if(Zo(Qo,t,r,i))return n.zrX=Qo[0],void(n.zrY=Qo[1])}n.zrX=n.zrY=0}function na(t){return t||window.event}function ra(t,e,n){if(null!=(e=na(e)).zrX)return e;var r=e.type;if(r&&r.indexOf("touch")>=0){var i="touchend"!==r?e.targetTouches[0]:e.changedTouches[0];i&&ta(t,i,e,n)}else{ta(t,e,e,n);var o=function(t){var e=t.wheelDelta;if(e)return e;var n=t.deltaX,r=t.deltaY;if(null==n||null==r)return e;return 3*(0!==r?Math.abs(r):Math.abs(n))*(r>0?-1:r<0?1:n>0?-1:1)}(e);e.zrDelta=o?o/120:-(e.detail||0)/3}var a=e.button;return null==e.which&&void 0!==a&&$o.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function ia(t,e,n,r){t.addEventListener(e,n,r)}var oa=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0};function aa(t){return 2===t.which||3===t.which}var sa=function(){function t(){this._track=[]}return t.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(t,e,n){var r=t.touches;if(r){for(var i={points:[],touches:[],target:e,event:t},o=0,a=r.length;o1&&i&&i.length>1){var a=la(i)/la(o);!isFinite(a)&&(a=1),e.pinchScale=a;var s=[((r=i)[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}};function ca(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function ha(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function da(t,e,n){var r=e[0]*n[0]+e[2]*n[1],i=e[1]*n[0]+e[3]*n[1],o=e[0]*n[2]+e[2]*n[3],a=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t}function pa(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function fa(t,e,n,r){void 0===r&&(r=[0,0]);var i=e[0],o=e[2],a=e[4],s=e[1],l=e[3],u=e[5],c=Math.sin(n),h=Math.cos(n);return t[0]=i*h+s*c,t[1]=-i*c+s*h,t[2]=o*h+l*c,t[3]=-o*c+h*l,t[4]=h*(a-r[0])+c*(u-r[1])+r[0],t[5]=h*(u-r[1])-c*(a-r[0])+r[1],t}function ga(t,e,n){var r=n[0],i=n[1];return t[0]=e[0]*r,t[1]=e[1]*i,t[2]=e[2]*r,t[3]=e[3]*i,t[4]=e[4]*r,t[5]=e[5]*i,t}function ya(t,e){var n=e[0],r=e[2],i=e[4],o=e[1],a=e[3],s=e[5],l=n*a-o*r;return l?(l=1/l,t[0]=a*l,t[1]=-o*l,t[2]=-r*l,t[3]=n*l,t[4]=(r*s-a*i)*l,t[5]=(o*i-n*s)*l,t):null}var va=function(){function t(t,e){this.x=t||0,this.y=e||0}return t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(t,e){return this.x=t,this.y=e,this},t.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},t.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},t.prototype.scale=function(t){this.x*=t,this.y*=t},t.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},t.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},t.prototype.dot=function(t){return this.x*t.x+this.y*t.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},t.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},t.prototype.distanceSquare=function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(t){if(t){var e=this.x,n=this.y;return this.x=t[0]*e+t[2]*n+t[4],this.y=t[1]*e+t[3]*n+t[5],this}},t.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},t.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},t.set=function(t,e,n){t.x=e,t.y=n},t.copy=function(t,e){t.x=e.x,t.y=e.y},t.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},t.lenSquare=function(t){return t.x*t.x+t.y*t.y},t.dot=function(t,e){return t.x*e.x+t.y*e.y},t.add=function(t,e,n){t.x=e.x+n.x,t.y=e.y+n.y},t.sub=function(t,e,n){t.x=e.x-n.x,t.y=e.y-n.y},t.scale=function(t,e,n){t.x=e.x*n,t.y=e.y*n},t.scaleAndAdd=function(t,e,n,r){t.x=e.x+n.x*r,t.y=e.y+n.y*r},t.lerp=function(t,e,n,r){var i=1-r;t.x=i*e.x+r*n.x,t.y=i*e.y+r*n.y},t}(),ma=Math.min,_a=Math.max,xa=new va,ba=new va,wa=new va,Sa=new va,Ma=new va,Ia=new va,Ca=function(){function t(t,e,n,r){n<0&&(t+=n,n=-n),r<0&&(e+=r,r=-r),this.x=t,this.y=e,this.width=n,this.height=r}return t.prototype.union=function(t){var e=ma(t.x,this.x),n=ma(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=_a(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=_a(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=e,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(t){var e=this,n=t.width/e.width,r=t.height/e.height,i=[1,0,0,1,0,0];return pa(i,i,[-e.x,-e.y]),ga(i,i,[n,r]),pa(i,i,[t.x,t.y]),i},t.prototype.intersect=function(e,n){if(!e)return!1;e instanceof t||(e=t.create(e));var r=this,i=r.x,o=r.x+r.width,a=r.y,s=r.y+r.height,l=e.x,u=e.x+e.width,c=e.y,h=e.y+e.height,d=!(of&&(f=_,gf&&(f=x,v=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return 0===this.width||0===this.height},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},t.applyTransform=function(e,n,r){if(r){if(r[1]<1e-5&&r[1]>-1e-5&&r[2]<1e-5&&r[2]>-1e-5){var i=r[0],o=r[3],a=r[4],s=r[5];return e.x=n.x*i+a,e.y=n.y*o+s,e.width=n.width*i,e.height=n.height*o,e.width<0&&(e.x+=e.width,e.width=-e.width),void(e.height<0&&(e.y+=e.height,e.height=-e.height))}xa.x=wa.x=n.x,xa.y=Sa.y=n.y,ba.x=Sa.x=n.x+n.width,ba.y=wa.y=n.y+n.height,xa.transform(r),Sa.transform(r),ba.transform(r),wa.transform(r),e.x=ma(xa.x,ba.x,wa.x,Sa.x),e.y=ma(xa.y,ba.y,wa.y,Sa.y);var l=_a(xa.x,ba.x,wa.x,Sa.x),u=_a(xa.y,ba.y,wa.y,Sa.y);e.width=l-e.x,e.height=u-e.y}else e!==n&&t.copy(e,n)},t}(),Aa="silent";function Ta(){oa(this.event)}var ka=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handler=null,e}return a(e,t),e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(Fo),La=function(t,e){this.x=t,this.y=e},Da=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Pa=new Ca(0,0,0,0),Ra=function(t){function e(e,n,r,i,o){var a=t.call(this)||this;return a._hovered=new La(0,0),a.storage=e,a.painter=n,a.painterRoot=i,a._pointerSize=o,r=r||new ka,a.proxy=null,a.setHandlerProxy(r),a._draggingMgr=new Vo(a),a}return a(e,t),e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(Ni(Da,(function(e){t.on&&t.on(e,this[e],this)}),this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var e=t.zrX,n=t.zrY,r=Na(this,e,n),i=this._hovered,o=i.target;o&&!o.__zr&&(o=(i=this.findHover(i.x,i.y)).target);var a=this._hovered=r?new La(e,n):this.findHover(e,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(i,"mouseout",t),this.dispatchToElement(a,"mousemove",t),s&&s!==o&&this.dispatchToElement(a,"mouseover",t)},e.prototype.mouseout=function(t){var e=t.zrEventControl;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new La(0,0)},e.prototype.dispatch=function(t,e){var n=this[t];n&&n.call(this,e)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},e.prototype.dispatchToElement=function(t,e,n){var r=(t=t||{}).target;if(!r||!r.silent){for(var i="on"+e,o=function(t,e,n){return{type:t,event:n,target:e.target,topTarget:e.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:Ta}}(e,t,n);r&&(r[i]&&(o.cancelBubble=!!r[i].call(r,o)),r.trigger(e,o),r=r.__hostTarget?r.__hostTarget:r.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(e,o),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer((function(t){"function"==typeof t[i]&&t[i].call(t,o),t.trigger&&t.trigger(e,o)})))}},e.prototype.findHover=function(t,e,n){var r=this.storage.getDisplayList(),i=new La(t,e);if(Ea(r,i,t,e,n),this._pointerSize&&!i.target){for(var o=[],a=this._pointerSize,s=a/2,l=new Ca(t-s,e-s,a,a),u=r.length-1;u>=0;u--){var c=r[u];c===n||c.ignore||c.ignoreCoarsePointer||c.parent&&c.parent.ignoreCoarsePointer||(Pa.copy(c.getBoundingRect()),c.transform&&Pa.applyTransform(c.transform),Pa.intersect(l)&&o.push(c))}if(o.length)for(var h=Math.PI/12,d=2*Math.PI,p=0;p=0;o--){var a=t[o],s=void 0;if(a!==i&&!a.ignore&&(s=Oa(a,n,r))&&(!e.topTarget&&(e.topTarget=a),s!==Aa)){e.target=a;break}}}function Na(t,e,n){var r=t.painter;return e<0||e>r.getWidth()||n<0||n>r.getHeight()}Ni(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){Ra.prototype[t]=function(e){var n,r,i=e.zrX,o=e.zrY,a=Na(this,i,o);if("mouseup"===t&&a||(r=(n=this.findHover(i,o)).target),"mousedown"===t)this._downEl=r,this._downPoint=[e.zrX,e.zrY],this._upEl=r;else if("mouseup"===t)this._upEl=r;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||Po(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}}));function za(t,e,n,r){var i=e+1;if(i===n)return 1;if(r(t[i++],t[e])<0){for(;i=0;)i++;return i-e}function Ba(t,e,n,r,i){for(r===e&&r++;r>>1])<0?l=o:s=o+1;var u=r-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=a}}function Va(t,e,n,r,i,o){var a=0,s=0,l=1;if(o(t,e[n+i])>0){for(s=r-i;l0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=i,l+=i}else{for(s=i+1;ls&&(l=s);var u=a;a=i-l,l=i-u}for(a++;a>>1);o(t,e[n+c])>0?a=c+1:l=c}return l}function Fa(t,e,n,r,i,o){var a=0,s=0,l=1;if(o(t,e[n+i])<0){for(s=i+1;ls&&(l=s);var u=a;a=i-l,l=i-u}else{for(s=r-i;l=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=i,l+=i}for(a++;a>>1);o(t,e[n+c])<0?l=c:a=c+1}return l}function Ga(t,e){var n,r,i=7,o=0,a=[];function s(s){var l=n[s],u=r[s],c=n[s+1],h=r[s+1];r[s]=u+h,s===o-3&&(n[s+1]=n[s+2],r[s+1]=r[s+2]),o--;var d=Fa(t[c],t,l,u,0,e);l+=d,0!==(u-=d)&&0!==(h=Va(t[l+u-1],t,c,h,h-1,e))&&(u<=h?function(n,r,o,s){var l=0;for(l=0;l=7||p>=7);if(f)break;g<0&&(g=0),g+=2}if((i=g)<1&&(i=1),1===r){for(l=0;l=0;l--)t[p+l]=t[d+l];return void(t[h]=a[c])}var f=i;for(;;){var g=0,y=0,v=!1;do{if(e(a[c],t[u])<0){if(t[h--]=t[u--],g++,y=0,0==--r){v=!0;break}}else if(t[h--]=a[c--],y++,g=0,1==--s){v=!0;break}}while((g|y)=0;l--)t[p+l]=t[d+l];if(0===r){v=!0;break}}if(t[h--]=a[c--],1==--s){v=!0;break}if(0!==(y=s-Va(t[u],a,0,s,s-1,e))){for(s-=y,p=(h-=y)+1,d=(c-=y)+1,l=0;l=7||y>=7);if(v)break;f<0&&(f=0),f+=2}(i=f)<1&&(i=1);if(1===s){for(p=(h-=r)+1,d=(u-=r)+1,l=r-1;l>=0;l--)t[p+l]=t[d+l];t[h]=a[c]}else{if(0===s)throw new Error;for(d=h-(s-1),l=0;l1;){var t=o-2;if(t>=1&&r[t-1]<=r[t]+r[t+1]||t>=2&&r[t-2]<=r[t]+r[t-1])r[t-1]r[t+1])break;s(t)}},forceMergeRuns:function(){for(;o>1;){var t=o-2;t>0&&r[t-1]=32;)e|=1&t,t>>=1;return t+e}(i);do{if((o=za(t,n,r,e))s&&(l=s),Ba(t,n,n+l,n+o,e),o=l}a.pushRun(n,o),a.mergeRuns(),i-=o,n+=o}while(0!==i);a.forceMergeRuns()}}}var Wa=!1;function Ha(){Wa||(Wa=!0)}function Ua(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var Za,Ya=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Ua}return t.prototype.traverse=function(t,e){for(var n=0;n0&&(u.__clipPaths=[]),isNaN(u.z)&&(Ha(),u.z=0),isNaN(u.z2)&&(Ha(),u.z2=0),isNaN(u.zlevel)&&(Ha(),u.zlevel=0),this._displayList[this._displayListLen++]=u}var c=t.getDecalElement&&t.getDecalElement();c&&this._updateAndAddDisplayable(c,e,n);var h=t.getTextGuideLine();h&&this._updateAndAddDisplayable(h,e,n);var d=t.getTextContent();d&&this._updateAndAddDisplayable(d,e,n)}},t.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},t.prototype.delRoot=function(t){if(t instanceof Array)for(var e=0,n=t.length;e=0&&this._roots.splice(r,1)}},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}();Za=si.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)};var Xa={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,n=.1,r=.4;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=r*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/r)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/r)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-Xa.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*Xa.bounceIn(2*t):.5*Xa.bounceOut(2*t-1)+.5}},qa=Math.pow,Ka=Math.sqrt,$a=1e-4,Qa=Ka(3),Ja=1/3,ts=bo(),es=bo(),ns=bo();function rs(t){return t>-1e-8&&t<1e-8}function is(t){return t>1e-8||t<-1e-8}function os(t,e,n,r,i){var o=1-i;return o*o*(o*t+3*i*e)+i*i*(i*r+3*o*n)}function as(t,e,n,r,i){var o=1-i;return 3*(((e-t)*o+2*(n-e)*i)*o+(r-n)*i*i)}function ss(t,e,n,r,i,o){var a=r+3*(e-n)-t,s=3*(n-2*e+t),l=3*(e-t),u=t-i,c=s*s-3*a*l,h=s*l-9*a*u,d=l*l-3*s*u,p=0;if(rs(c)&&rs(h)){if(rs(s))o[0]=0;else(M=-l/s)>=0&&M<=1&&(o[p++]=M)}else{var f=h*h-4*c*d;if(rs(f)){var g=h/c,y=-g/2;(M=-s/a+g)>=0&&M<=1&&(o[p++]=M),y>=0&&y<=1&&(o[p++]=y)}else if(f>0){var v=Ka(f),m=c*s+1.5*a*(-h+v),_=c*s+1.5*a*(-h-v);(M=(-s-((m=m<0?-qa(-m,Ja):qa(m,Ja))+(_=_<0?-qa(-_,Ja):qa(_,Ja))))/(3*a))>=0&&M<=1&&(o[p++]=M)}else{var x=(2*c*s-3*a*h)/(2*Ka(c*c*c)),b=Math.acos(x)/3,w=Ka(c),S=Math.cos(b),M=(-s-2*w*S)/(3*a),I=(y=(-s+w*(S+Qa*Math.sin(b)))/(3*a),(-s+w*(S-Qa*Math.sin(b)))/(3*a));M>=0&&M<=1&&(o[p++]=M),y>=0&&y<=1&&(o[p++]=y),I>=0&&I<=1&&(o[p++]=I)}}return p}function ls(t,e,n,r,i){var o=6*n-12*e+6*t,a=9*e+3*r-3*t-9*n,s=3*e-3*t,l=0;if(rs(a)){if(is(o))(c=-s/o)>=0&&c<=1&&(i[l++]=c)}else{var u=o*o-4*a*s;if(rs(u))i[0]=-o/(2*a);else if(u>0){var c,h=Ka(u),d=(-o-h)/(2*a);(c=(-o+h)/(2*a))>=0&&c<=1&&(i[l++]=c),d>=0&&d<=1&&(i[l++]=d)}}return l}function us(t,e,n,r,i,o){var a=(e-t)*i+t,s=(n-e)*i+e,l=(r-n)*i+n,u=(s-a)*i+a,c=(l-s)*i+s,h=(c-u)*i+u;o[0]=t,o[1]=a,o[2]=u,o[3]=h,o[4]=h,o[5]=c,o[6]=l,o[7]=r}function cs(t,e,n,r,i,o,a,s,l,u,c){var h,d,p,f,g,y=.005,v=1/0;ts[0]=l,ts[1]=u;for(var m=0;m<1;m+=.05)es[0]=os(t,n,i,a,m),es[1]=os(e,r,o,s,m),(f=Ro(ts,es))=0&&f=0&&y=1?1:ss(0,r,o,1,t,s)&&os(0,i,a,1,s[0])}}}var xs=function(){function t(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||_o,this.ondestroy=t.ondestroy||_o,this.onrestart=t.onrestart||_o,t.easing&&this.setEasing(t.easing)}return t.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),!this._paused){var n=this._life,r=t-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var o=this.easingFunc,a=o?o(i):i;if(this.onframe(a),1===i){if(!this.loop)return!0;var s=r%n;this._startTime=t-s,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=e},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(t){this.easing=t,this.easingFunc=Hi(t)?t:Xa[t]||_s(t)},t}(),bs=function(t){this.value=t},ws=function(){function t(){this._len=0}return t.prototype.insert=function(t){var e=new bs(t);return this.insertEntry(e),e},t.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},t.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),Ss=function(){function t(t){this._list=new ws,this._maxSize=10,this._map={},this._maxSize=t}return t.prototype.put=function(t,e){var n=this._list,r=this._map,i=null;if(null==r[t]){var o=n.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}a?a.value=e:a=new bs(e),a.key=t,n.insertEntry(a),r[t]=a}return i},t.prototype.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}(),Ms={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 Is(t){return(t=Math.round(t))<0?0:t>255?255:t}function Cs(t){return t<0?0:t>1?1:t}function As(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?Is(parseFloat(e)/100*255):Is(parseInt(e,10))}function Ts(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?Cs(parseFloat(e)/100):Cs(parseFloat(e))}function ks(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function Ls(t,e,n){return t+(e-t)*n}function Ds(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t}function Ps(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var Rs=new Ss(20),Os=null;function Es(t,e){Os&&Ps(Os,e),Os=Rs.put(t,Os||e.slice())}function Ns(t,e){if(t){e=e||[];var n=Rs.get(t);if(n)return Ps(e,n);var r=(t+="").replace(/ /g,"").toLowerCase();if(r in Ms)return Ps(e,Ms[r]),Es(t,e),e;var i,o=r.length;if("#"===r.charAt(0))return 4===o||5===o?(i=parseInt(r.slice(1,4),16))>=0&&i<=4095?(Ds(e,(3840&i)>>4|(3840&i)>>8,240&i|(240&i)>>4,15&i|(15&i)<<4,5===o?parseInt(r.slice(4),16)/15:1),Es(t,e),e):void Ds(e,0,0,0,1):7===o||9===o?(i=parseInt(r.slice(1,7),16))>=0&&i<=16777215?(Ds(e,(16711680&i)>>16,(65280&i)>>8,255&i,9===o?parseInt(r.slice(7),16)/255:1),Es(t,e),e):void Ds(e,0,0,0,1):void 0;var a=r.indexOf("("),s=r.indexOf(")");if(-1!==a&&s+1===o){var l=r.substr(0,a),u=r.substr(a+1,s-(a+1)).split(","),c=1;switch(l){case"rgba":if(4!==u.length)return 3===u.length?Ds(e,+u[0],+u[1],+u[2],1):Ds(e,0,0,0,1);c=Ts(u.pop());case"rgb":return u.length>=3?(Ds(e,As(u[0]),As(u[1]),As(u[2]),3===u.length?c:Ts(u[3])),Es(t,e),e):void Ds(e,0,0,0,1);case"hsla":return 4!==u.length?void Ds(e,0,0,0,1):(u[3]=Ts(u[3]),zs(u,e),Es(t,e),e);case"hsl":return 3!==u.length?void Ds(e,0,0,0,1):(zs(u,e),Es(t,e),e);default:return}}Ds(e,0,0,0,1)}}function zs(t,e){var n=(parseFloat(t[0])%360+360)%360/360,r=Ts(t[1]),i=Ts(t[2]),o=i<=.5?i*(r+1):i+r-i*r,a=2*i-o;return Ds(e=e||[],Is(255*ks(a,o,n+1/3)),Is(255*ks(a,o,n)),Is(255*ks(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Bs(t,e){var n=Ns(t);if(n){for(var r=0;r<3;r++)n[r]=e<0?n[r]*(1-e)|0:(255-n[r])*e+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return js(n,4===n.length?"rgba":"rgb")}}function Vs(t,e,n){if(e&&e.length&&t>=0&&t<=1){n=n||[];var r=t*(e.length-1),i=Math.floor(r),o=Math.ceil(r),a=e[i],s=e[o],l=r-i;return n[0]=Is(Ls(a[0],s[0],l)),n[1]=Is(Ls(a[1],s[1],l)),n[2]=Is(Ls(a[2],s[2],l)),n[3]=Cs(Ls(a[3],s[3],l)),n}}function Fs(t,e,n,r){var i=Ns(t);if(t)return i=function(t){if(t){var e,n,r=t[0]/255,i=t[1]/255,o=t[2]/255,a=Math.min(r,i,o),s=Math.max(r,i,o),l=s-a,u=(s+a)/2;if(0===l)e=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var c=((s-r)/6+l/2)/l,h=((s-i)/6+l/2)/l,d=((s-o)/6+l/2)/l;r===s?e=d-h:i===s?e=1/3+c-d:o===s&&(e=2/3+h-c),e<0&&(e+=1),e>1&&(e-=1)}var p=[360*e,n,u];return null!=t[3]&&p.push(t[3]),p}}(i),null!=e&&(i[0]=function(t){return(t=Math.round(t))<0?0:t>360?360:t}(e)),null!=n&&(i[1]=Ts(n)),null!=r&&(i[2]=Ts(r)),js(zs(i),"rgba")}function Gs(t,e){var n=Ns(t);if(n&&null!=e)return n[3]=Cs(e),js(n,"rgba")}function js(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}}function Ws(t,e){var n=Ns(t);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*e:0}var Hs=new Ss(100);function Us(t){if(Ui(t)){var e=Hs.get(t);return e||(e=Bs(t,-.1),Hs.put(t,e)),e}if(Qi(t)){var n=Di({},t);return n.colorStops=zi(t.colorStops,(function(t){return{offset:t.offset,color:Bs(t.color,-.1)}})),n}return t}var Zs=Math.round;function Ys(t){var e;if(t&&"transparent"!==t){if("string"==typeof t&&t.indexOf("rgba")>-1){var n=Ns(t);n&&(t="rgb("+n[0]+","+n[1]+","+n[2]+")",e=n[3])}}else t="none";return{color:t,opacity:null==e?1:e}}function Xs(t){return t<1e-4&&t>-1e-4}function qs(t){return Zs(1e3*t)/1e3}function Ks(t){return Zs(1e4*t)/1e4}var $s={left:"start",right:"end",center:"middle",middle:"middle"};function Qs(t){return t&&!!t.image}function Js(t){return Qs(t)||function(t){return t&&!!t.svgElement}(t)}function tl(t){return"linear"===t.type}function el(t){return"radial"===t.type}function nl(t){return t&&("linear"===t.type||"radial"===t.type)}function rl(t){return"url(#"+t+")"}function il(t){var e=t.getGlobalScale(),n=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function ol(t){var e=t.x||0,n=t.y||0,r=(t.rotation||0)*xo,i=eo(t.scaleX,1),o=eo(t.scaleY,1),a=t.skewX||0,s=t.skewY||0,l=[];return(e||n)&&l.push("translate("+e+"px,"+n+"px)"),r&&l.push("rotate("+r+")"),1===i&&1===o||l.push("scale("+i+","+o+")"),(a||s)&&l.push("skew("+Zs(a*xo)+"deg, "+Zs(s*xo)+"deg)"),l.join(" ")}var al=si.hasGlobalWindow&&Hi(window.btoa)?function(t){return window.btoa(unescape(encodeURIComponent(t)))}:"undefined"!=typeof Buffer?function(t){return Buffer.from(t).toString("base64")}:function(t){return null},sl=Array.prototype.slice;function ll(t,e,n){return(e-t)*n+t}function ul(t,e,n,r){for(var i=e.length,o=0;or?e:t,o=Math.min(n,r),a=i[o-1]||{color:[0,0,0,0],offset:0},s=o;sa)r.length=a;else for(var s=o;s=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(t,e,n){this._needsSort=!0;var r=this.keyframes,i=r.length,o=!1,a=6,s=e;if(Ei(e)){var l=function(t){return Ei(t&&t[0])?2:1}(e);a=l,(1===l&&!Yi(e[0])||2===l&&!Yi(e[0][0]))&&(o=!0)}else if(Yi(e)&&!Ji(e))a=0;else if(Ui(e))if(isNaN(+e)){var u=Ns(e);u&&(s=u,a=3)}else a=0;else if(Qi(e)){var c=Di({},s);c.colorStops=zi(e.colorStops,(function(t){return{offset:t.offset,color:Ns(t.color)}})),tl(e)?a=4:el(e)&&(a=5),s=c}0===i?this.valType=a:a===this.valType&&6!==a||(o=!0),this.discrete=this.discrete||o;var h={time:t,value:s,rawValue:e,percent:0};return n&&(h.easing=n,h.easingFunc=Hi(n)?n:Xa[n]||_s(n)),r.push(h),h},t.prototype.prepare=function(t,e){var n=this.keyframes;this._needsSort&&n.sort((function(t,e){return t.time-e.time}));for(var r=this.valType,i=n.length,o=n[i-1],a=this.discrete,s=vl(r),l=yl(r),u=0;u=0&&!(l[n].percent<=e);n--);n=p(n,u-2)}else{for(n=d;ne);n++);n=p(n-1,u-2)}i=l[n+1],r=l[n]}if(r&&i){this._lastFr=n,this._lastFrP=e;var f=i.percent-r.percent,g=0===f?1:p((e-r.percent)/f,1);i.easingFunc&&(g=i.easingFunc(g));var y=o?this._additiveValue:h?ml:t[c];if(!vl(s)&&!h||y||(y=this._additiveValue=[]),this.discrete)t[c]=g<1?r.rawValue:i.rawValue;else if(vl(s))1===s?ul(y,r[a],i[a],g):function(t,e,n,r){for(var i=e.length,o=i&&e[0].length,a=0;a0&&s.addKeyframe(0,fl(l),r),this._trackKeys.push(a)}s.addKeyframe(t,fl(e[a]),r)}return this._maxTime=Math.max(this._maxTime,t),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,n=0;n0)){this._started=1;for(var e=this,n=[],r=this._maxTime||0,i=0;i1){var a=o.pop();i.addKeyframe(a.time,t[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},t}();function bl(){return(new Date).getTime()}var wl,Sl,Ml=function(t){function e(e){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,e=e||{},n.stage=e.stage||{},n}return a(e,t),e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var e=t.getClip();e&&this.addClip(e)},e.prototype.removeClip=function(t){if(t.animation){var e=t.prev,n=t.next;e?e.next=n:this._head=n,n?n.prev=e:this._tail=e,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var e=t.getClip();e&&this.removeClip(e),t.animation=null},e.prototype.update=function(t){for(var e=bl()-this._pausedTime,n=e-this._time,r=this._head;r;){var i=r.next;r.step(e,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=e,t||(this.trigger("frame",n),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0,Za((function e(){t._running&&(Za(e),!t._paused&&t.update())}))},e.prototype.start=function(){this._running||(this._time=bl(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=bl(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=bl()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._head=this._tail=null},e.prototype.isFinished=function(){return null==this._head},e.prototype.animate=function(t,e){e=e||{},this.start();var n=new xl(t,e.loop);return this.addAnimator(n),n},e}(Fo),Il=si.domSupported,Cl=(Sl={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:wl=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:zi(wl,(function(t){var e=t.replace("mouse","pointer");return Sl.hasOwnProperty(e)?e:t}))}),Al=["mousemove","mouseup"],Tl=["pointermove","pointerup"],kl=!1;function Ll(t){var e=t.pointerType;return"pen"===e||"touch"===e}function Dl(t){t&&(t.zrByTouch=!0)}function Pl(t,e){for(var n=e,r=!1;n&&9!==n.nodeType&&!(r=n.domBelongToZr||n!==e&&n===t.painterRoot);)n=n.parentNode;return r}var Rl=function(t,e){this.stopPropagation=_o,this.stopImmediatePropagation=_o,this.preventDefault=_o,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY},Ol={mousedown:function(t){t=ra(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=ra(this.dom,t);var e=this.__mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=ra(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){Pl(this,(t=ra(this.dom,t)).toElement||t.relatedTarget)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){kl=!0,t=ra(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){kl||(t=ra(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){Dl(t=ra(this.dom,t)),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),Ol.mousemove.call(this,t),Ol.mousedown.call(this,t)},touchmove:function(t){Dl(t=ra(this.dom,t)),this.handler.processGesture(t,"change"),Ol.mousemove.call(this,t)},touchend:function(t){Dl(t=ra(this.dom,t)),this.handler.processGesture(t,"end"),Ol.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<300&&Ol.click.call(this,t)},pointerdown:function(t){Ol.mousedown.call(this,t)},pointermove:function(t){Ll(t)||Ol.mousemove.call(this,t)},pointerup:function(t){Ol.mouseup.call(this,t)},pointerout:function(t){Ll(t)||Ol.mouseout.call(this,t)}};Ni(["click","dblclick","contextmenu"],(function(t){Ol[t]=function(e){e=ra(this.dom,e),this.trigger(t,e)}}));var El={pointermove:function(t){Ll(t)||El.mousemove.call(this,t)},pointerup:function(t){El.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function Nl(t,e){var n=e.domHandlers;si.pointerEventsSupported?Ni(Cl.pointer,(function(r){Bl(e,r,(function(e){n[r].call(t,e)}))})):(si.touchEventsSupported&&Ni(Cl.touch,(function(r){Bl(e,r,(function(i){n[r].call(t,i),function(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout((function(){t.touching=!1,t.touchTimer=null}),700)}(e)}))})),Ni(Cl.mouse,(function(r){Bl(e,r,(function(i){i=na(i),e.touching||n[r].call(t,i)}))})))}function zl(t,e){function n(n){Bl(e,n,(function(r){r=na(r),Pl(t,r.target)||(r=function(t,e){return ra(t.dom,new Rl(t,e),!0)}(t,r),e.domHandlers[n].call(t,r))}),{capture:!0})}si.pointerEventsSupported?Ni(Tl,n):si.touchEventsSupported||Ni(Al,n)}function Bl(t,e,n,r){t.mounted[e]=n,t.listenerOpts[e]=r,ia(t.domTarget,e,n,r)}function Vl(t){var e,n,r,i,o=t.mounted;for(var a in o)o.hasOwnProperty(a)&&(e=t.domTarget,n=a,r=o[a],i=t.listenerOpts[a],e.removeEventListener(n,r,i));t.mounted={}}var Fl=function(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e},Gl=function(t){function e(e,n){var r=t.call(this)||this;return r.__pointerCapturing=!1,r.dom=e,r.painterRoot=n,r._localHandlerScope=new Fl(e,Ol),Il&&(r._globalHandlerScope=new Fl(document,El)),Nl(r,r._localHandlerScope),r}return a(e,t),e.prototype.dispose=function(){Vl(this._localHandlerScope),Il&&Vl(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,Il&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var e=this._globalHandlerScope;t?zl(this,e):Vl(e)}},e}(Fo),jl=1;si.hasGlobalWindow&&(jl=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Wl=jl,Hl="#333",Ul="#ccc",Zl=ca;function Yl(t){return t>5e-5||t<-5e-5}var Xl=[],ql=[],Kl=[1,0,0,1,0,0],$l=Math.abs,Ql=function(){function t(){}return t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},t.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},t.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},t.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},t.prototype.needLocalTransform=function(){return Yl(this.rotation)||Yl(this.x)||Yl(this.y)||Yl(this.scaleX-1)||Yl(this.scaleY-1)||Yl(this.skewX)||Yl(this.skewY)},t.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),n=this.transform;e||t?(n=n||[1,0,0,1,0,0],e?this.getLocalTransform(n):Zl(n),t&&(e?da(n,t,n):ha(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n)):n&&(Zl(n),this.invTransform=null)},t.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(null!=e&&1!==e){this.getGlobalScale(Xl);var n=Xl[0]<0?-1:1,r=Xl[1]<0?-1:1,i=((Xl[0]-n)*e+n)/Xl[0]||0,o=((Xl[1]-r)*e+r)/Xl[1]||0;t[0]*=i,t[1]*=i,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||[1,0,0,1,0,0],ya(this.invTransform,t)},t.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},t.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],r=Math.atan2(t[1],t[0]),i=Math.PI/2+r-Math.atan2(t[3],t[2]);n=Math.sqrt(n)*Math.cos(i),e=Math.sqrt(e),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=n,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||[1,0,0,1,0,0],da(ql,t.invTransform,e),e=ql);var n=this.originX,r=this.originY;(n||r)&&(Kl[4]=n,Kl[5]=r,da(ql,e,Kl),ql[4]-=n,ql[5]-=r,e=ql),this.setLocalTransform(e)}},t.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},t.prototype.transformCoordToLocal=function(t,e){var n=[t,e],r=this.invTransform;return r&&Eo(n,n,r),n},t.prototype.transformCoordToGlobal=function(t,e){var n=[t,e],r=this.transform;return r&&Eo(n,n,r),n},t.prototype.getLineScale=function(){var t=this.transform;return t&&$l(t[0]-1)>1e-10&&$l(t[3]-1)>1e-10?Math.sqrt($l(t[0]*t[3]-t[2]*t[1])):1},t.prototype.copyTransform=function(t){tu(this,t)},t.getLocalTransform=function(t,e){e=e||[];var n=t.originX||0,r=t.originY||0,i=t.scaleX,o=t.scaleY,a=t.anchorX,s=t.anchorY,l=t.rotation||0,u=t.x,c=t.y,h=t.skewX?Math.tan(t.skewX):0,d=t.skewY?Math.tan(-t.skewY):0;if(n||r||a||s){var p=n+a,f=r+s;e[4]=-p*i-h*f*o,e[5]=-f*o-d*p*i}else e[4]=e[5]=0;return e[0]=i,e[3]=o,e[1]=d*i,e[2]=h*o,l&&fa(e,e,l),e[4]+=n+u,e[5]+=r+c,e},t.initDefaultProps=function(){var e=t.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),t}(),Jl=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function tu(t,e){for(var n=0;n=0?parseFloat(t)/100*e:parseFloat(t):t}function uu(t,e,n){var r=e.position||"inside",i=null!=e.distance?e.distance:5,o=n.height,a=n.width,s=o/2,l=n.x,u=n.y,c="left",h="top";if(r instanceof Array)l+=lu(r[0],n.width),u+=lu(r[1],n.height),c=null,h=null;else switch(r){case"left":l-=i,u+=s,c="right",h="middle";break;case"right":l+=i+a,u+=s,h="middle";break;case"top":l+=a/2,u-=i,c="center",h="bottom";break;case"bottom":l+=a/2,u+=o+i,c="center";break;case"inside":l+=a/2,u+=s,c="center",h="middle";break;case"insideLeft":l+=i,u+=s,h="middle";break;case"insideRight":l+=a-i,u+=s,c="right",h="middle";break;case"insideTop":l+=a/2,u+=i,c="center";break;case"insideBottom":l+=a/2,u+=o-i,c="center",h="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=a-i,u+=i,c="right";break;case"insideBottomLeft":l+=i,u+=o-i,h="bottom";break;case"insideBottomRight":l+=a-i,u+=o-i,c="right",h="bottom"}return(t=t||{}).x=l,t.y=u,t.align=c,t.verticalAlign=h,t}var cu="__zr_normal__",hu=Jl.concat(["ignore"]),du=Bi(Jl,(function(t,e){return t[e]=!0,t}),{ignore:!1}),pu={},fu=new Ca(0,0,0,0),gu=function(){function t(t){this.id=Ci(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return t.prototype._init=function(t){this.attr(t)},t.prototype.drift=function(t,e,n){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var r=this.transform;r||(r=this.transform=[1,0,0,1,0,0]),r[4]+=t,r[5]+=e,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,r=n.local,i=e.innerTransformable,o=void 0,a=void 0,s=!1;i.parent=r?this:null;var l=!1;if(i.copyTransform(e),null!=n.position){var u=fu;n.layoutRect?u.copy(n.layoutRect):u.copy(this.getBoundingRect()),r||u.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(pu,n,u):uu(pu,n,u),i.x=pu.x,i.y=pu.y,o=pu.align,a=pu.verticalAlign;var c=n.origin;if(c&&null!=n.rotation){var h=void 0,d=void 0;"center"===c?(h=.5*u.width,d=.5*u.height):(h=lu(c[0],u.width),d=lu(c[1],u.height)),l=!0,i.originX=-i.x+h+(r?0:u.x),i.originY=-i.y+d+(r?0:u.y)}}null!=n.rotation&&(i.rotation=n.rotation);var p=n.offset;p&&(i.x+=p[0],i.y+=p[1],l||(i.originX=-p[0],i.originY=-p[1]));var f=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),y=void 0,v=void 0,m=void 0;f&&this.canBeInsideText()?(y=n.insideFill,v=n.insideStroke,null!=y&&"auto"!==y||(y=this.getInsideTextFill()),null!=v&&"auto"!==v||(v=this.getInsideTextStroke(y),m=!0)):(y=n.outsideFill,v=n.outsideStroke,null!=y&&"auto"!==y||(y=this.getOutsideFill()),null!=v&&"auto"!==v||(v=this.getOutsideStroke(y),m=!0)),(y=y||"#000")===g.fill&&v===g.stroke&&m===g.autoStroke&&o===g.align&&a===g.verticalAlign||(s=!0,g.fill=y,g.stroke=v,g.autoStroke=m,g.align=o,g.verticalAlign=a,e.setDefaultTextStyle(g)),e.__dirty|=1,s&&e.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(t){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Ul:Hl},t.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof e&&Ns(e);n||(n=[255,255,255,1]);for(var r=n[3],i=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*r+(i?0:255)*(1-r);return n[3]=1,js(n,"rgba")},t.prototype.traverse=function(t,e){},t.prototype.attrKV=function(t,e){"textConfig"===t?this.setTextConfig(e):"textContent"===t?this.setTextContent(e):"clipPath"===t?this.setClipPath(e):"extra"===t?(this.extra=this.extra||{},Di(this.extra,e)):this[t]=e},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(Xi(t))for(var n=Fi(t),r=0;r0},t.prototype.getState=function(t){return this.states[t]},t.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},t.prototype.clearStates=function(t){this.useState(cu,!1,t)},t.prototype.useState=function(t,e,n,r){var i=t===cu;if(this.hasState()||!i){var o=this.currentStates,a=this.stateTransition;if(!(Ri(o,t)>=0)||!e&&1!==o.length){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(t)),s||(s=this.states&&this.states[t]),s||i){i||this.saveCurrentToNormalState(s);var l=!!(s&&s.hoverLayer||r);l&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,s,this._normalState,e,!n&&!this.__inHover&&a&&a.duration>0,a);var u=this._textContent,c=this._textGuide;return u&&u.useState(t,e,n,l),c&&c.useState(t,e,n,l),i?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),s}Ai("State "+t+" not exists.")}}},t.prototype.useStates=function(t,e,n){if(t.length){var r=[],i=this.currentStates,o=t.length,a=o===i.length;if(a)for(var s=0;s0,p);var f=this._textContent,g=this._textGuide;f&&f.useStates(t,e,h),g&&g.useStates(t,e,h),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}else this.clearStates()},t.prototype.isSilent=function(){for(var t=this.silent,e=this.parent;!t&&e;){if(e.silent){t=!0;break}e=e.parent}return t},t.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var n=this.currentStates.slice();n.splice(e,1),this.useStates(n)}},t.prototype.replaceState=function(t,e,n){var r=this.currentStates.slice(),i=Ri(r,t),o=Ri(r,e)>=0;i>=0?o?r.splice(i,1):r[i]=e:n&&!o&&r.push(e),this.useStates(r)},t.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},t.prototype._mergeStates=function(t){for(var e,n={},r=0;r=0&&e.splice(n,1)})),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(t){this.markRedraw()},t.prototype.stopAnimation=function(t,e){for(var n=this.animators,r=n.length,i=[],o=0;o0&&n.during&&o[0].during((function(t,e){n.during(e)}));for(var d=0;d0||i.force&&!a.length){var w,S=void 0,M=void 0,I=void 0;if(s){M={},d&&(S={});for(x=0;x<_;x++){M[v=g[x]]=n[v],d?S[v]=r[v]:n[v]=r[v]}}else if(d){I={};for(x=0;x<_;x++){I[v=g[x]]=fl(n[v]),mu(n,r,v)}}(w=new xl(n,!1,!1,h?Vi(f,(function(t){return t.targetName===e})):null)).targetName=e,i.scope&&(w.scope=i.scope),d&&S&&w.whenWithKeys(0,S,g),I&&w.whenWithKeys(0,I,g),w.whenWithKeys(null==u?500:u,s?M:r,g).delay(c||0),t.addAnimator(w,e),a.push(w)}}Oi(gu,Fo),Oi(gu,Ql);var xu=function(t){function e(e){var n=t.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(e),n}return a(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(t){return this._children[t]},e.prototype.childOfName=function(t){for(var e=this._children,n=0;n=0&&(n.splice(r,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,e){var n=Ri(this._children,t);return n>=0&&this.replaceAt(e,n),this},e.prototype.replaceAt=function(t,e){var n=this._children,r=n[e];if(t&&t!==this&&t.parent!==this&&t!==r){n[e]=t,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__zr;e&&e!==t.__zr&&t.addSelfToZr(e),e&&e.refresh()},e.prototype.remove=function(t){var e=this.__zr,n=this._children,r=Ri(n,t);return r<0||(n.splice(r,1),t.parent=null,e&&t.removeSelfFromZr(e),e&&e.refresh()),this},e.prototype.removeAll=function(){for(var t=this._children,e=this.__zr,n=0;n0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},t.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover())},t.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},t.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},t.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},t.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},t.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},t.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},t.prototype.on=function(t,e,n){return this._disposed||this.handler.on(t,e,n),this},t.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},t.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},t.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e0){if(t<=i)return a;if(t>=o)return s}else{if(t>=i)return a;if(t<=o)return s}else{if(t===i)return a;if(t===o)return s}return(t-i)/l*u+a}function Au(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return Ui(t)?(n=t,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var n}function Tu(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function ku(t){return t.sort((function(t,e){return t-e})),t}function Lu(t){if(t=+t,isNaN(t))return 0;if(t>1e-14)for(var e=1,n=0;n<15;n++,e*=10)if(Math.round(t*e)/e===t)return n;return function(t){var e=t.toString().toLowerCase(),n=e.indexOf("e"),r=n>0?+e.slice(n+1):0,i=n>0?n:e.length,o=e.indexOf("."),a=o<0?0:i-1-o;return Math.max(0,a-r)}(t)}function Du(t,e){var n=Math.log,r=Math.LN10,i=Math.floor(n(t[1]-t[0])/r),o=Math.round(n(Math.abs(e[1]-e[0]))/r),a=Math.min(Math.max(-i+o,0),20);return isFinite(a)?a:20}function Pu(t,e){var n=Math.max(Lu(t),Lu(e)),r=t+e;return n>20?r:Tu(r,n)}var Ru=9007199254740991;function Ou(t){var e=2*Math.PI;return(t%e+e)%e}function Eu(t){return t>-1e-4&&t<1e-4}var Nu=/^(?:(\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 zu(t){if(t instanceof Date)return t;if(Ui(t)){var e=Nu.exec(t);if(!e)return new Date(NaN);if(e[8]){var n=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(n-=+e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,n,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0))}return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0)}return null==t?new Date(NaN):new Date(Math.round(t))}function Bu(t){if(0===t)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return t/Math.pow(10,e)>=10&&e++,e}function Vu(t,e){var n=Bu(t),r=Math.pow(10,n),i=t/r;return t=(i<1.5?1:i<2.5?2:i<4?3:i<7?5:10)*r,n>=-20?+t.toFixed(n<0?-n:0):t}function Fu(t,e){var n=(t.length-1)*e+1,r=Math.floor(n),i=+t[r-1],o=n-r;return o?i+o*(t[r]-i):i}function Gu(t){t.sort((function(t,e){return s(t,e,0)?-1:1}));for(var e=-1/0,n=1,r=0;r=0||i&&Ri(i,s)<0)){var l=n.getShallow(s,e);null!=l&&(o[t[a][0]]=l)}}return o}}var kc=Tc([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Lc=function(){function t(){}return t.prototype.getAreaStyle=function(t,e){return kc(this,t,e)},t}(),Dc=new Ss(50);function Pc(t){if("string"==typeof t){var e=Dc.get(t);return e&&e.image}return t}function Rc(t,e,n,r,i){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!n)return e;var o=Dc.get(t),a={hostEl:n,cb:r,cbPayload:i};return o?!Ec(e=o.image)&&o.pending.push(a):((e=pi.loadImage(t,Oc,Oc)).__zrImageSrc=t,Dc.put(t,e.__cachedImgObj={image:e,pending:[a]})),e}return t}return e}function Oc(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=a;l++)s-=a;var u=nu(n,e);return u>s&&(n="",u=0),s=t-u,i.ellipsis=n,i.ellipsisWidth=u,i.contentWidth=s,i.containerWidth=t,i}function Vc(t,e,n){var r=n.containerWidth,i=n.font,o=n.contentWidth;if(!r)return t.textLine="",void(t.isTruncated=!1);var a=nu(e,i);if(a<=r)return t.textLine=e,void(t.isTruncated=!1);for(var s=0;;s++){if(a<=o||s>=n.maxIterations){e+=n.ellipsis;break}var l=0===s?Fc(e,o,n.ascCharWidth,n.cnCharWidth):a>0?Math.floor(e.length*o/a):0;a=nu(e=e.substr(0,l),i)}""===e&&(e=n.placeholder),t.textLine=e,t.isTruncated=!0}function Fc(t,e,n,r){for(var i=0,o=0,a=t.length;o0&&f+r.accumWidth>r.width&&(o=e.split("\n"),h=!0),r.accumWidth=f}else{var g=Yc(e,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=g.accumWidth+p,a=g.linesWidths,o=g.lines}}else o=e.split("\n");for(var y=0;y=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}(t)||!!Uc[t]}function Yc(t,e,n,r,i){for(var o=[],a=[],s="",l="",u=0,c=0,h=0;hn:i+c+p>n)?c?(s||l)&&(f?(s||(s=l,l="",c=u=0),o.push(s),a.push(c-u),l+=d,s="",c=u+=p):(l&&(s+=l,l="",u=0),o.push(s),a.push(c),s=d,c=p)):f?(o.push(l),a.push(u),l=d,u=p):(o.push(d),a.push(p)):(c+=p,f?(l+=d,u+=p):(l&&(s+=l,l="",u=0),s+=d))}else l&&(s+=l,c+=u),o.push(s),a.push(c),s="",l="",u=0,c=0}return o.length||s||(s=t,l="",u=0),l&&(s+=l),s&&(o.push(s),a.push(c)),1===o.length&&(c+=i),{accumWidth:c,lines:o,linesWidths:a}}var Xc="__zr_style_"+Math.round(10*Math.random()),qc={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Kc={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};qc[Xc]=!0;var $c=["z","z2","invisible"],Qc=["invisible"],Jc=function(t){function e(e){return t.call(this,e)||this}var n;return a(e,t),e.prototype._init=function(e){for(var n=Fi(e),r=0;r1e-4)return s[0]=t-n,s[1]=e-r,l[0]=t+n,void(l[1]=e+r);if(sh[0]=oh(i)*n+t,sh[1]=ih(i)*r+e,lh[0]=oh(o)*n+t,lh[1]=ih(o)*r+e,u(s,sh,lh),c(l,sh,lh),(i%=ah)<0&&(i+=ah),(o%=ah)<0&&(o+=ah),i>o&&!a?o+=ah:ii&&(uh[0]=oh(p)*n+t,uh[1]=ih(p)*r+e,u(s,uh,s),c(l,uh,l))}var vh={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},mh=[],_h=[],xh=[],bh=[],wh=[],Sh=[],Mh=Math.min,Ih=Math.max,Ch=Math.cos,Ah=Math.sin,Th=Math.abs,kh=Math.PI,Lh=2*kh,Dh="undefined"!=typeof Float32Array,Ph=[];function Rh(t){return Math.round(t/kh*1e8)/1e8%2*kh}function Oh(t,e){var n=Rh(t[0]);n<0&&(n+=Lh);var r=n-t[0],i=t[1];i+=r,!e&&i-n>=Lh?i=n+Lh:e&&n-i>=Lh?i=n-Lh:!e&&n>i?i=n+(Lh-Rh(n-i)):e&&n0&&(this._ux=Th(n/Wl/t)||0,this._uy=Th(n/Wl/e)||0)},t.prototype.setDPR=function(t){this.dpr=t},t.prototype.setContext=function(t){this._ctx=t},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(vh.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},t.prototype.lineTo=function(t,e){var n=Th(t-this._xi),r=Th(e-this._yi),i=n>this._ux||r>this._uy;if(this.addData(vh.L,t,e),this._ctx&&i&&this._ctx.lineTo(t,e),i)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=n*n+r*r;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},t.prototype.bezierCurveTo=function(t,e,n,r,i,o){return this._drawPendingPt(),this.addData(vh.C,t,e,n,r,i,o),this._ctx&&this._ctx.bezierCurveTo(t,e,n,r,i,o),this._xi=i,this._yi=o,this},t.prototype.quadraticCurveTo=function(t,e,n,r){return this._drawPendingPt(),this.addData(vh.Q,t,e,n,r),this._ctx&&this._ctx.quadraticCurveTo(t,e,n,r),this._xi=n,this._yi=r,this},t.prototype.arc=function(t,e,n,r,i,o){this._drawPendingPt(),Ph[0]=r,Ph[1]=i,Oh(Ph,o),r=Ph[0];var a=(i=Ph[1])-r;return this.addData(vh.A,t,e,n,n,r,a,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,r,i,o),this._xi=Ch(i)*n+t,this._yi=Ah(i)*n+e,this},t.prototype.arcTo=function(t,e,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,n,r,i),this},t.prototype.rect=function(t,e,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,n,r),this.addData(vh.R,t,e,n,r),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(vh.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&t.closePath(),this._xi=e,this._yi=n,this},t.prototype.fill=function(t){t&&t.fill(),this.toStatic()},t.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(t){var e=t.length;this.data&&this.data.length===e||!Dh||(this.data=new Float32Array(e));for(var n=0;nu.length&&(this._expandData(),u=this.data);for(var c=0;c0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e11&&(this.data=new Float32Array(t)))}},t.prototype.getBoundingRect=function(){xh[0]=xh[1]=wh[0]=wh[1]=Number.MAX_VALUE,bh[0]=bh[1]=Sh[0]=Sh[1]=-Number.MAX_VALUE;var t,e=this.data,n=0,r=0,i=0,o=0;for(t=0;tn||Th(y)>r||h===e-1)&&(f=Math.sqrt(k*k+y*y),i=g,o=_);break;case vh.C:var v=t[h++],m=t[h++],_=(g=t[h++],t[h++]),x=t[h++],b=t[h++];f=hs(i,o,v,m,g,_,x,b,10),i=x,o=b;break;case vh.Q:f=vs(i,o,v=t[h++],m=t[h++],g=t[h++],_=t[h++],10),i=g,o=_;break;case vh.A:var w=t[h++],S=t[h++],M=t[h++],I=t[h++],C=t[h++],A=t[h++],T=A+C;h+=1,p&&(a=Ch(C)*M+w,s=Ah(C)*I+S),f=Ih(M,I)*Mh(Lh,Math.abs(A)),i=Ch(T)*M+w,o=Ah(T)*I+S;break;case vh.R:a=i=t[h++],s=o=t[h++],f=2*t[h++]+2*t[h++];break;case vh.Z:var k=a-i;y=s-o;f=Math.sqrt(k*k+y*y),i=a,o=s}f>=0&&(l[c++]=f,u+=f)}return this._pathLen=u,u},t.prototype.rebuildPath=function(t,e){var n,r,i,o,a,s,l,u,c,h,d=this.data,p=this._ux,f=this._uy,g=this._len,y=e<1,v=0,m=0,_=0;if(!y||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,u=e*this._pathLen))t:for(var x=0;x0&&(t.lineTo(c,h),_=0),b){case vh.M:n=i=d[x++],r=o=d[x++],t.moveTo(i,o);break;case vh.L:a=d[x++],s=d[x++];var S=Th(a-i),M=Th(s-o);if(S>p||M>f){if(y){if(v+(X=l[m++])>u){var I=(u-v)/X;t.lineTo(i*(1-I)+a*I,o*(1-I)+s*I);break t}v+=X}t.lineTo(a,s),i=a,o=s,_=0}else{var C=S*S+M*M;C>_&&(c=a,h=s,_=C)}break;case vh.C:var A=d[x++],T=d[x++],k=d[x++],L=d[x++],D=d[x++],P=d[x++];if(y){if(v+(X=l[m++])>u){us(i,A,k,D,I=(u-v)/X,mh),us(o,T,L,P,I,_h),t.bezierCurveTo(mh[1],_h[1],mh[2],_h[2],mh[3],_h[3]);break t}v+=X}t.bezierCurveTo(A,T,k,L,D,P),i=D,o=P;break;case vh.Q:A=d[x++],T=d[x++],k=d[x++],L=d[x++];if(y){if(v+(X=l[m++])>u){gs(i,A,k,I=(u-v)/X,mh),gs(o,T,L,I,_h),t.quadraticCurveTo(mh[1],_h[1],mh[2],_h[2]);break t}v+=X}t.quadraticCurveTo(A,T,k,L),i=k,o=L;break;case vh.A:var R=d[x++],O=d[x++],E=d[x++],N=d[x++],z=d[x++],B=d[x++],V=d[x++],F=!d[x++],G=E>N?E:N,j=Th(E-N)>.001,W=z+B,H=!1;if(y)v+(X=l[m++])>u&&(W=z+B*(u-v)/X,H=!0),v+=X;if(j&&t.ellipse?t.ellipse(R,O,E,N,V,z,W,F):t.arc(R,O,G,z,W,F),H)break t;w&&(n=Ch(z)*E+R,r=Ah(z)*N+O),i=Ch(W)*E+R,o=Ah(W)*N+O;break;case vh.R:n=i=d[x],r=o=d[x+1],a=d[x++],s=d[x++];var U=d[x++],Z=d[x++];if(y){if(v+(X=l[m++])>u){var Y=u-v;t.moveTo(a,s),t.lineTo(a+Mh(Y,U),s),(Y-=U)>0&&t.lineTo(a+U,s+Mh(Y,Z)),(Y-=Z)>0&&t.lineTo(a+Ih(U-Y,0),s+Z),(Y-=U)>0&&t.lineTo(a,s+Ih(Z-Y,0));break t}v+=X}t.rect(a,s,U,Z);break;case vh.Z:if(y){var X;if(v+(X=l[m++])>u){I=(u-v)/X;t.lineTo(i*(1-I)+n*I,o*(1-I)+r*I);break t}v+=X}t.closePath(),i=n,o=r}}},t.prototype.clone=function(){var e=new t,n=this.data;return e.data=n.slice?n.slice():Array.prototype.slice.call(n),e._len=this._len,e},t.CMD=vh,t.initDefaultProps=function(){var e=t.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),t}();function Nh(t,e,n,r,i,o,a){if(0===i)return!1;var s=i,l=0;if(a>e+s&&a>r+s||at+s&&o>n+s||oe+h&&c>r+h&&c>o+h&&c>s+h||ct+h&&u>n+h&&u>i+h&&u>a+h||ue+u&&l>r+u&&l>o+u||lt+u&&s>n+u&&s>i+u||sn||c+ui&&(i+=Gh);var d=Math.atan2(l,s);return d<0&&(d+=Gh),d>=r&&d<=i||d+Gh>=r&&d+Gh<=i}function Wh(t,e,n,r,i,o){if(o>e&&o>r||oi?s:0}var Hh=Eh.CMD,Uh=2*Math.PI;var Zh=[-1,-1,-1],Yh=[-1,-1];function Xh(t,e,n,r,i,o,a,s,l,u){if(u>e&&u>r&&u>o&&u>s||u1&&(c=void 0,c=Yh[0],Yh[0]=Yh[1],Yh[1]=c),f=os(e,r,o,s,Yh[0]),p>1&&(g=os(e,r,o,s,Yh[1]))),2===p?ve&&s>r&&s>o||s=0&&c<=1&&(i[l++]=c);else{var u=a*a-4*o*s;if(rs(u))(c=-a/(2*o))>=0&&c<=1&&(i[l++]=c);else if(u>0){var c,h=Ka(u),d=(-a-h)/(2*o);(c=(-a+h)/(2*o))>=0&&c<=1&&(i[l++]=c),d>=0&&d<=1&&(i[l++]=d)}}return l}(e,r,o,s,Zh);if(0===l)return 0;var u=fs(e,r,o);if(u>=0&&u<=1){for(var c=0,h=ds(e,r,o,u),d=0;dn||s<-n)return 0;var l=Math.sqrt(n*n-s*s);Zh[0]=-l,Zh[1]=l;var u=Math.abs(r-i);if(u<1e-4)return 0;if(u>=Uh-1e-4){r=0,i=Uh;var c=o?1:-1;return a>=Zh[0]+t&&a<=Zh[1]+t?c:0}if(r>i){var h=r;r=i,i=h}r<0&&(r+=Uh,i+=Uh);for(var d=0,p=0;p<2;p++){var f=Zh[p];if(f+t>a){var g=Math.atan2(s,f);c=o?1:-1;g<0&&(g=Uh+g),(g>=r&&g<=i||g+Uh>=r&&g+Uh<=i)&&(g>Math.PI/2&&g<1.5*Math.PI&&(c=-c),d+=c)}}return d}function $h(t,e,n,r,i){for(var o,a,s,l,u=t.data,c=t.len(),h=0,d=0,p=0,f=0,g=0,y=0;y1&&(n||(h+=Wh(d,p,f,g,r,i))),m&&(f=d=u[y],g=p=u[y+1]),v){case Hh.M:d=f=u[y++],p=g=u[y++];break;case Hh.L:if(n){if(Nh(d,p,u[y],u[y+1],e,r,i))return!0}else h+=Wh(d,p,u[y],u[y+1],r,i)||0;d=u[y++],p=u[y++];break;case Hh.C:if(n){if(zh(d,p,u[y++],u[y++],u[y++],u[y++],u[y],u[y+1],e,r,i))return!0}else h+=Xh(d,p,u[y++],u[y++],u[y++],u[y++],u[y],u[y+1],r,i)||0;d=u[y++],p=u[y++];break;case Hh.Q:if(n){if(Bh(d,p,u[y++],u[y++],u[y],u[y+1],e,r,i))return!0}else h+=qh(d,p,u[y++],u[y++],u[y],u[y+1],r,i)||0;d=u[y++],p=u[y++];break;case Hh.A:var _=u[y++],x=u[y++],b=u[y++],w=u[y++],S=u[y++],M=u[y++];y+=1;var I=!!(1-u[y++]);o=Math.cos(S)*b+_,a=Math.sin(S)*w+x,m?(f=o,g=a):h+=Wh(d,p,o,a,r,i);var C=(r-_)*w/b+_;if(n){if(jh(_,x,w,S,S+M,I,e,C,i))return!0}else h+=Kh(_,x,w,S,S+M,I,C,i);d=Math.cos(S+M)*b+_,p=Math.sin(S+M)*w+x;break;case Hh.R:if(f=d=u[y++],g=p=u[y++],o=f+u[y++],a=g+u[y++],n){if(Nh(f,g,o,g,e,r,i)||Nh(o,g,o,a,e,r,i)||Nh(o,a,f,a,e,r,i)||Nh(f,a,f,g,e,r,i))return!0}else h+=Wh(o,g,o,a,r,i),h+=Wh(f,a,f,g,r,i);break;case Hh.Z:if(n){if(Nh(d,p,f,g,e,r,i))return!0}else h+=Wh(d,p,f,g,r,i);d=f,p=g}}return n||(s=p,l=g,Math.abs(s-l)<1e-4)||(h+=Wh(d,p,f,g,r,i)||0),0!==h}var Qh=Pi({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},qc),Jh={style:Pi({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Kc.style)},td=Jl.concat(["invisible","culling","z","z2","zlevel","parent"]),ed=function(t){function e(e){return t.call(this,e)||this}var n;return a(e,t),e.prototype.update=function(){var n=this;t.prototype.update.call(this);var r=this.style;if(r.decal){var i=this._decalEl=this._decalEl||new e;i.buildPath===e.prototype.buildPath&&(i.buildPath=function(t){n.buildPath(t,n.shape)}),i.silent=!0;var o=i.style;for(var a in r)o[a]!==r[a]&&(o[a]=r[a]);o.fill=r.fill?r.decal:null,o.decal=null,o.shadowColor=null,r.strokeFirst&&(o.stroke=null);for(var s=0;s.5?Hl:e>.2?"#eee":Ul}if(t)return Ul}return Hl},e.prototype.getInsideTextStroke=function(t){var e=this.style.fill;if(Ui(e)){var n=this.__zr;if(!(!n||!n.isDarkMode())===Ws(t,0)<.4)return e}},e.prototype.buildPath=function(t,e,n){},e.prototype.pathUpdated=function(){this.__dirty&=-5},e.prototype.getUpdatedPathProxy=function(t){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,t),this.path},e.prototype.createPathProxy=function(){this.path=new Eh(!1)},e.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.getBoundingRect=function(){var t=this._rect,e=this.style,n=!t;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var i=this.path;(r||4&this.__dirty)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),t=i.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var o=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||n){o.copy(t);var a=e.strokeNoScale?this.getLineScale():1,s=e.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;s=Math.max(s,null==l?4:l)}a>1e-10&&(o.width+=s/a,o.height+=s/a,o.x-=s/a/2,o.y-=s/a/2)}return o}return t},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),r=this.getBoundingRect(),i=this.style;if(t=n[0],e=n[1],r.contain(t,e)){var o=this.path;if(this.hasStroke()){var a=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),function(t,e,n,r){return $h(t,e,!0,n,r)}(o,a/s,t,e)))return!0}if(this.hasFill())return function(t,e,n){return $h(t,0,!1,e,n)}(o,t,e)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(e,n){"shape"===e?this.setShape(n):t.prototype.attrKV.call(this,e,n)},e.prototype.setShape=function(t,e){var n=this.shape;return n||(n=this.shape={}),"string"==typeof t?n[t]=e:Di(n,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(4&this.__dirty)},e.prototype.createStyle=function(t){return yo(Qh,t)},e.prototype._innerSaveToNormal=function(e){t.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.shape&&!n.shape&&(n.shape=Di({},this.shape))},e.prototype._applyStateObj=function(e,n,r,i,o,a){t.prototype._applyStateObj.call(this,e,n,r,i,o,a);var s,l=!(n&&i);if(n&&n.shape?o?i?s=n.shape:(s=Di({},r.shape),Di(s,n.shape)):(s=Di({},i?this.shape:r.shape),Di(s,n.shape)):l&&(s=r.shape),s)if(o){this.shape=Di({},this.shape);for(var u={},c=Fi(s),h=0;h0},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.createStyle=function(t){return yo(nd,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var e=t.text;null!=e?e+="":e="";var n=iu(e,t.font,t.textAlign,t.textBaseline);if(n.x+=t.x||0,n.y+=t.y||0,this.hasStroke()){var r=t.lineWidth;n.x-=r/2,n.y-=r/2,n.width+=r,n.height+=r}this._rect=n}return this._rect},e.initDefaultProps=void(e.prototype.dirtyRectTolerance=10),e}(Jc);rd.prototype.type="tspan";var id=Pi({x:0,y:0},qc),od={style:Pi({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Kc.style)};var ad=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.createStyle=function(t){return yo(id,t)},e.prototype._getSize=function(t){var e=this.style,n=e[t];if(null!=n)return n;var r,i=(r=e.image)&&"string"!=typeof r&&r.width&&r.height?e.image:this.__image;if(!i)return 0;var o="width"===t?"height":"width",a=e[o];return null==a?i[t]:i[t]/i[o]*a},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return od},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new Ca(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(Jc);ad.prototype.type="image";var sd=Math.round;function ld(t,e,n){if(e){var r=e.x1,i=e.x2,o=e.y1,a=e.y2;t.x1=r,t.x2=i,t.y1=o,t.y2=a;var s=n&&n.lineWidth;return s?(sd(2*r)===sd(2*i)&&(t.x1=t.x2=cd(r,s,!0)),sd(2*o)===sd(2*a)&&(t.y1=t.y2=cd(o,s,!0)),t):t}}function ud(t,e,n){if(e){var r=e.x,i=e.y,o=e.width,a=e.height;t.x=r,t.y=i,t.width=o,t.height=a;var s=n&&n.lineWidth;return s?(t.x=cd(r,s,!0),t.y=cd(i,s,!0),t.width=Math.max(cd(r+o,s,!1)-t.x,0===o?0:1),t.height=Math.max(cd(i+a,s,!1)-t.y,0===a?0:1),t):t}}function cd(t,e,n){if(!e)return t;var r=sd(2*t);return(r+sd(e))%2==0?r/2:(r+(n?1:-1))/2}var hd=function(){this.x=0,this.y=0,this.width=0,this.height=0},dd={},pd=function(t){function e(e){return t.call(this,e)||this}return a(e,t),e.prototype.getDefaultShape=function(){return new hd},e.prototype.buildPath=function(t,e){var n,r,i,o;if(this.subPixelOptimize){var a=ud(dd,e,this.style);n=a.x,r=a.y,i=a.width,o=a.height,a.r=e.r,e=a}else n=e.x,r=e.y,i=e.width,o=e.height;e.r?function(t,e){var n,r,i,o,a,s=e.x,l=e.y,u=e.width,c=e.height,h=e.r;u<0&&(s+=u,u=-u),c<0&&(l+=c,c=-c),"number"==typeof h?n=r=i=o=h:h instanceof Array?1===h.length?n=r=i=o=h[0]:2===h.length?(n=i=h[0],r=o=h[1]):3===h.length?(n=h[0],r=o=h[1],i=h[2]):(n=h[0],r=h[1],i=h[2],o=h[3]):n=r=i=o=0,n+r>u&&(n*=u/(a=n+r),r*=u/a),i+o>u&&(i*=u/(a=i+o),o*=u/a),r+i>c&&(r*=c/(a=r+i),i*=c/a),n+o>c&&(n*=c/(a=n+o),o*=c/a),t.moveTo(s+n,l),t.lineTo(s+u-r,l),0!==r&&t.arc(s+u-r,l+r,r,-Math.PI/2,0),t.lineTo(s+u,l+c-i),0!==i&&t.arc(s+u-i,l+c-i,i,0,Math.PI/2),t.lineTo(s+o,l+c),0!==o&&t.arc(s+o,l+c-o,o,Math.PI/2,Math.PI),t.lineTo(s,l+n),0!==n&&t.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}(t,e):t.rect(n,r,i,o)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(ed);pd.prototype.type="rect";var fd={fill:"#000"},gd={style:Pi({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},Kc.style)},yd=function(t){function e(e){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=fd,n.attr(e),n}return a(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;ef&&c){var g=Math.floor(f/l);h=h||n.length>g,n=n.slice(0,g)}if(t&&a&&null!=d)for(var y=Bc(d,o,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),v={},m=0;m0,I=null!=t.width&&("truncate"===t.overflow||"break"===t.overflow||"breakAll"===t.overflow),C=r.calculatedLineHeight,A=0;Al&&Hc(n,t.substring(l,u),e,s),Hc(n,r[2],e,s,r[1]),l=Nc.lastIndex}lo){var T=n.lines.length;w>0?(_.tokens=_.tokens.slice(0,w),v(_,b,x),n.lines=n.lines.slice(0,m+1)):n.lines=n.lines.slice(0,m),n.isTruncated=n.isTruncated||n.lines.length=0&&"right"===(A=_[C]).align;)this._placeToken(A,t,b,f,I,"right",y),w-=A.width,I-=A.width,C--;for(M+=(n-(M-p)-(g-I)-w)/2;S<=C;)A=_[S],this._placeToken(A,t,b,f,M+A.width/2,"center",y),M+=A.width,S++;f+=b}},e.prototype._placeToken=function(t,e,n,r,i,o,a){var s=e.rich[t.styleName]||{};s.text=t.text;var l=t.verticalAlign,u=r+n/2;"top"===l?u=r+t.height/2:"bottom"===l&&(u=r+n-t.height/2),!t.isLineHolder&&Td(s)&&this._renderBackground(s,e,"right"===o?i-t.width:"center"===o?i-t.width/2:i,u-t.height/2,t.width,t.height);var c=!!s.backgroundColor,h=t.textPadding;h&&(i=Cd(i,o,h),u-=t.height/2-h[0]-t.innerHeight/2);var d=this._getOrCreateChild(rd),p=d.createStyle();d.useStyle(p);var f=this._defaultStyle,g=!1,y=0,v=Id("fill"in s?s.fill:"fill"in e?e.fill:(g=!0,f.fill)),m=Md("stroke"in s?s.stroke:"stroke"in e?e.stroke:c||a||f.autoStroke&&!g?null:(y=2,f.stroke)),_=s.textShadowBlur>0||e.textShadowBlur>0;p.text=t.text,p.x=i,p.y=u,_&&(p.shadowBlur=s.textShadowBlur||e.textShadowBlur||0,p.shadowColor=s.textShadowColor||e.textShadowColor||"transparent",p.shadowOffsetX=s.textShadowOffsetX||e.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||e.textShadowOffsetY||0),p.textAlign=o,p.textBaseline="middle",p.font=t.font||ui,p.opacity=no(s.opacity,e.opacity,1),bd(p,s),m&&(p.lineWidth=no(s.lineWidth,e.lineWidth,y),p.lineDash=eo(s.lineDash,e.lineDash),p.lineDashOffset=e.lineDashOffset||0,p.stroke=m),v&&(p.fill=v);var x=t.contentWidth,b=t.contentHeight;d.setBoundingRect(new Ca(ou(p.x,x,p.textAlign),au(p.y,b,p.textBaseline),x,b))},e.prototype._renderBackground=function(t,e,n,r,i,o){var a,s,l,u=t.backgroundColor,c=t.borderWidth,h=t.borderColor,d=u&&u.image,p=u&&!d,f=t.borderRadius,g=this;if(p||t.lineHeight||c&&h){(a=this._getOrCreateChild(pd)).useStyle(a.createStyle()),a.style.fill=null;var y=a.shape;y.x=n,y.y=r,y.width=i,y.height=o,y.r=f,a.dirtyShape()}if(p)(l=a.style).fill=u||null,l.fillOpacity=eo(t.fillOpacity,1);else if(d){(s=this._getOrCreateChild(ad)).onload=function(){g.dirtyStyle()};var v=s.style;v.image=u.image,v.x=n,v.y=r,v.width=i,v.height=o}c&&h&&((l=a.style).lineWidth=c,l.stroke=h,l.strokeOpacity=eo(t.strokeOpacity,1),l.lineDash=t.borderDash,l.lineDashOffset=t.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(l.strokeFirst=!0,l.lineWidth*=2));var m=(a||s).style;m.shadowBlur=t.shadowBlur||0,m.shadowColor=t.shadowColor||"transparent",m.shadowOffsetX=t.shadowOffsetX||0,m.shadowOffsetY=t.shadowOffsetY||0,m.opacity=no(t.opacity,e.opacity,1)},e.makeFont=function(t){var e="";return wd(t)&&(e=[t.fontStyle,t.fontWeight,xd(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),e&&ao(e)||t.textFont||t.font},e}(Jc),vd={left:!0,right:1,center:1},md={top:1,bottom:1,middle:1},_d=["fontStyle","fontWeight","fontSize","fontFamily"];function xd(t){return"string"!=typeof t||-1===t.indexOf("px")&&-1===t.indexOf("rem")&&-1===t.indexOf("em")?isNaN(+t)?"12px":t+"px":t}function bd(t,e){for(var n=0;n<_d.length;n++){var r=_d[n],i=e[r];null!=i&&(t[r]=i)}}function wd(t){return null!=t.fontSize||t.fontFamily||t.fontWeight}function Sd(t){if(t){t.font=yd.makeFont(t);var e=t.align;"middle"===e&&(e="center"),t.align=null==e||vd[e]?e:"left";var n=t.verticalAlign;"center"===n&&(n="middle"),t.verticalAlign=null==n||md[n]?n:"top",t.padding&&(t.padding=io(t.padding))}}function Md(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function Id(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function Cd(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}function Ad(t){var e=t.text;return null!=e&&(e+=""),e}function Td(t){return!!(t.backgroundColor||t.lineHeight||t.borderWidth&&t.borderColor)}var kd=uc(),Ld=function(t,e,n,r){if(r){var i=kd(r);i.dataIndex=n,i.dataType=e,i.seriesIndex=t,i.ssrType="chart","group"===r.type&&r.traverse((function(r){var i=kd(r);i.seriesIndex=t,i.dataIndex=n,i.dataType=e,i.ssrType="chart"}))}},Dd=1,Pd={},Rd=uc(),Od=uc(),Ed=["emphasis","blur","select"],Nd=["normal","emphasis","blur","select"],zd=10,Bd="highlight",Vd="downplay",Fd="select",Gd="unselect",jd="toggleSelect";function Wd(t){return null!=t&&"none"!==t}function Hd(t,e,n){t.onHoverStateChange&&(t.hoverState||0)!==n&&t.onHoverStateChange(e),t.hoverState=n}function Ud(t){Hd(t,"emphasis",2)}function Zd(t){2===t.hoverState&&Hd(t,"normal",0)}function Yd(t){Hd(t,"blur",1)}function Xd(t){1===t.hoverState&&Hd(t,"normal",0)}function qd(t){t.selected=!0}function Kd(t){t.selected=!1}function $d(t,e,n){e(t,n)}function Qd(t,e,n){$d(t,e,n),t.isGroup&&t.traverse((function(t){$d(t,e,n)}))}function Jd(t,e){switch(e){case"emphasis":t.hoverState=2;break;case"normal":t.hoverState=0;break;case"blur":t.hoverState=1;break;case"select":t.selected=!0}}function tp(t,e){var n=this.states[t];if(this.style){if("emphasis"===t)return function(t,e,n,r){var i=n&&Ri(n,"select")>=0,o=!1;if(t instanceof ed){var a=Rd(t),s=i&&a.selectFill||a.normalFill,l=i&&a.selectStroke||a.normalStroke;if(Wd(s)||Wd(l)){var u=(r=r||{}).style||{};"inherit"===u.fill?(o=!0,r=Di({},r),(u=Di({},u)).fill=s):!Wd(u.fill)&&Wd(s)?(o=!0,r=Di({},r),(u=Di({},u)).fill=Us(s)):!Wd(u.stroke)&&Wd(l)&&(o||(r=Di({},r),u=Di({},u)),u.stroke=Us(l)),r.style=u}}if(r&&null==r.z2){o||(r=Di({},r));var c=t.z2EmphasisLift;r.z2=t.z2+(null!=c?c:zd)}return r}(this,0,e,n);if("blur"===t)return function(t,e,n){var r=Ri(t.currentStates,e)>=0,i=t.style.opacity,o=r?null:function(t,e,n,r){for(var i=t.style,o={},a=0;a0){var o={dataIndex:i,seriesIndex:t.seriesIndex};null!=r&&(o.dataType=r),e.push(o)}}))})),e}function vp(t,e,n){Sp(t,!0),Qd(t,ep),_p(t,e,n)}function mp(t,e,n,r){r?function(t){Sp(t,!1)}(t):vp(t,e,n)}function _p(t,e,n){var r=kd(t);null!=e?(r.focus=e,r.blurScope=n):r.focus&&(r.focus=null)}var xp=["emphasis","blur","select"],bp={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function wp(t,e,n,r){n=n||"itemStyle";for(var i=0;i1&&(a*=Pp(f),s*=Pp(f));var g=(i===o?-1:1)*Pp((a*a*(s*s)-a*a*(p*p)-s*s*(d*d))/(a*a*(p*p)+s*s*(d*d)))||0,y=g*a*p/s,v=g*-s*d/a,m=(t+n)/2+Op(h)*y-Rp(h)*v,_=(e+r)/2+Rp(h)*y+Op(h)*v,x=Bp([1,0],[(d-y)/a,(p-v)/s]),b=[(d-y)/a,(p-v)/s],w=[(-1*d-y)/a,(-1*p-v)/s],S=Bp(b,w);if(zp(b,w)<=-1&&(S=Ep),zp(b,w)>=1&&(S=0),S<0){var M=Math.round(S/Ep*1e6)/1e6;S=2*Ep+M%2*Ep}c.addData(u,m,_,a,s,x,S,h,o)}var Fp=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Gp=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var jp=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.applyTransform=function(t){},e}(ed);function Wp(t){return null!=t.setData}function Hp(t,e){var n=function(t){var e=new Eh;if(!t)return e;var n,r=0,i=0,o=r,a=i,s=Eh.CMD,l=t.match(Fp);if(!l)return e;for(var u=0;uL*L+D*D&&(M=C,I=A),{cx:M,cy:I,x0:-c,y0:-h,x1:M*(i/b-1),y1:I*(i/b-1)}}function cf(t,e){var n,r=af(e.r,0),i=af(e.r0||0,0),o=r>0;if(o||i>0){if(o||(r=i,i=0),i>r){var a=r;r=i,i=a}var s=e.startAngle,l=e.endAngle;if(!isNaN(s)&&!isNaN(l)){var u=e.cx,c=e.cy,h=!!e.clockwise,d=rf(l-s),p=d>Qp&&d%Qp;if(p>lf&&(d=p),r>lf)if(d>Qp-lf)t.moveTo(u+r*tf(s),c+r*Jp(s)),t.arc(u,c,r,s,l,!h),i>lf&&(t.moveTo(u+i*tf(l),c+i*Jp(l)),t.arc(u,c,i,l,s,h));else{var f=void 0,g=void 0,y=void 0,v=void 0,m=void 0,_=void 0,x=void 0,b=void 0,w=void 0,S=void 0,M=void 0,I=void 0,C=void 0,A=void 0,T=void 0,k=void 0,L=r*tf(s),D=r*Jp(s),P=i*tf(l),R=i*Jp(l),O=d>lf;if(O){var E=e.cornerRadius;E&&(n=function(t){var e;if(Wi(t)){var n=t.length;if(!n)return t;e=1===n?[t[0],t[0],0,0]:2===n?[t[0],t[0],t[1],t[1]]:3===n?t.concat(t[2]):t}else e=[t,t,t,t];return e}(E),f=n[0],g=n[1],y=n[2],v=n[3]);var N=rf(r-i)/2;if(m=sf(N,y),_=sf(N,v),x=sf(N,f),b=sf(N,g),M=w=af(m,_),I=S=af(x,b),(w>lf||S>lf)&&(C=r*tf(l),A=r*Jp(l),T=i*tf(s),k=i*Jp(s),d<$p)){var z=function(t,e,n,r,i,o,a,s){var l=n-t,u=r-e,c=a-i,h=s-o,d=h*l-c*u;if(!(d*dlf){var H=sf(y,M),U=sf(v,M),Z=uf(T,k,L,D,r,H,h),Y=uf(C,A,P,R,r,U,h);t.moveTo(u+Z.cx+Z.x0,c+Z.cy+Z.y0),M0&&t.arc(u+Z.cx,c+Z.cy,H,nf(Z.y0,Z.x0),nf(Z.y1,Z.x1),!h),t.arc(u,c,r,nf(Z.cy+Z.y1,Z.cx+Z.x1),nf(Y.cy+Y.y1,Y.cx+Y.x1),!h),U>0&&t.arc(u+Y.cx,c+Y.cy,U,nf(Y.y1,Y.x1),nf(Y.y0,Y.x0),!h))}else t.moveTo(u+L,c+D),t.arc(u,c,r,s,l,!h);else t.moveTo(u+L,c+D);if(i>lf&&O)if(I>lf){H=sf(f,I),Z=uf(P,R,C,A,i,-(U=sf(g,I)),h),Y=uf(L,D,T,k,i,-H,h);t.lineTo(u+Z.cx+Z.x0,c+Z.cy+Z.y0),I0&&t.arc(u+Z.cx,c+Z.cy,U,nf(Z.y0,Z.x0),nf(Z.y1,Z.x1),!h),t.arc(u,c,i,nf(Z.cy+Z.y1,Z.cx+Z.x1),nf(Y.cy+Y.y1,Y.cx+Y.x1),h),H>0&&t.arc(u+Y.cx,c+Y.cy,H,nf(Y.y1,Y.x1),nf(Y.y0,Y.x0),!h))}else t.lineTo(u+P,c+R),t.arc(u,c,i,l,s,h);else t.lineTo(u+P,c+R)}else t.moveTo(u,c);t.closePath()}}}var hf=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},df=function(t){function e(e){return t.call(this,e)||this}return a(e,t),e.prototype.getDefaultShape=function(){return new hf},e.prototype.buildPath=function(t,e){cf(t,e)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(ed);df.prototype.type="sector";var pf=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},ff=function(t){function e(e){return t.call(this,e)||this}return a(e,t),e.prototype.getDefaultShape=function(){return new pf},e.prototype.buildPath=function(t,e){var n=e.cx,r=e.cy,i=2*Math.PI;t.moveTo(n+e.r,r),t.arc(n,r,e.r,0,i,!1),t.moveTo(n+e.r0,r),t.arc(n,r,e.r0,0,i,!0)},e}(ed);function gf(t,e,n){var r=e.smooth,i=e.points;if(i&&i.length>=2){if(r){var o=function(t,e,n,r){var i,o,a,s,l=[],u=[],c=[],h=[];if(r){a=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,p=t.length;dOf[1]){if(a=!1,i)return a;var u=Math.abs(Of[0]-Rf[1]),c=Math.abs(Rf[0]-Of[1]);Math.min(u,c)>r.len()&&(u0){var h={duration:c.duration,delay:c.delay||0,easing:c.easing,done:o,force:!!o||!!a,setToFinal:!u,scope:t,during:a};l?e.animateFrom(n,h):e.animateTo(n,h)}else e.stopAnimation(),!l&&e.attr(n),a&&a(1),o&&o()}function Wf(t,e,n,r,i,o){jf("update",t,e,n,r,i,o)}function Hf(t,e,n,r,i,o){jf("enter",t,e,n,r,i,o)}function Uf(t){if(!t.__zr)return!0;for(var e=0;eMath.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function dg(t){return!t.isGroup}function pg(t,e,n){if(t&&e){var r,i=(r={},t.traverse((function(t){dg(t)&&t.anid&&(r[t.anid]=t)})),r);e.traverse((function(t){if(dg(t)&&t.anid){var e=i[t.anid];if(e){var r=o(t);t.attr(o(e)),Wf(t,r,n,kd(t).dataIndex)}}}))}function o(t){var e={x:t.x,y:t.y,rotation:t.rotation};return function(t){return null!=t.shape}(t)&&(e.shape=Di({},t.shape)),e}}function fg(t,e){return zi(t,(function(t){var n=t[0];n=Kf(n,e.x),n=$f(n,e.x+e.width);var r=t[1];return r=Kf(r,e.y),[n,r=$f(r,e.y+e.height)]}))}function gg(t,e,n){var r=Di({rectHover:!0},e),i=r.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(i.image=t.slice(8),Pi(i,n),new ad(r)):ng(t.replace("path://",""),r,n,"center")}function yg(t,e,n,r,i){for(var o=0,a=i[i.length-1];o=-1e-6)return!1;var f=t-i,g=e-o,y=mg(f,g,u,c)/p;if(y<0||y>1)return!1;var v=mg(f,g,h,d)/p;return!(v<0||v>1)}function mg(t,e,n,r){return t*r-n*e}function _g(t){var e=t.itemTooltipOption,n=t.componentModel,r=t.itemName,i=Ui(e)?{formatter:e}:e,o=n.mainType,a=n.componentIndex,s={componentType:o,name:r,$vars:["name"]};s[o+"Index"]=a;var l=t.formatterParamsExtra;l&&Ni(Fi(l),(function(t){mo(s,t)||(s[t]=l[t],s.$vars.push(t))}));var u=kd(t.el);u.componentMainType=o,u.componentIndex=a,u.tooltipConfig={name:r,option:Pi({content:r,encodeHTMLContent:!0,formatterParams:s},i)}}function xg(t,e){var n;t.isGroup&&(n=e(t)),n||t.traverse(e)}function bg(t,e){if(t)if(Wi(t))for(var n=0;n=n&&o>=i)return{x:n,y:i,width:r-n,height:o-i}},createIcon:gg,extendPath:function(t,e){return Jf(t,e)},extendShape:function(t){return ed.extend(t)},getShapeClass:eg,getTransform:ug,groupTransition:pg,initProps:Hf,isElementRemoved:Uf,lineLineIntersect:vg,linePolygonIntersect:yg,makeImage:rg,makePath:ng,mergePath:og,registerShape:tg,removeElement:Zf,removeElementWithFadeOut:Xf,resizePath:ag,setTooltipConfig:_g,subPixelOptimize:lg,subPixelOptimizeLine:sg,subPixelOptimizeRect:function(t){return ud(t.shape,t.shape,t.style),t},transformDirection:hg,traverseElements:bg,updateProps:Wf}),Sg={};function Mg(t,e){for(var n=0;n-1?ty:ny;function ay(t,e){t=t.toUpperCase(),iy[t]=new Kg(e),ry[t]=e}function sy(t){return iy[t]}ay(ey,{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:". "}}}}),ay(ty,{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}});var ly=1e3,uy=6e4,cy=36e5,hy=864e5,dy=31536e6,py={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}"},fy="{yyyy}-{MM}-{dd}",gy={year:"{yyyy}",month:"{yyyy}-{MM}",day:fy,hour:fy+" "+py.hour,minute:fy+" "+py.minute,second:fy+" "+py.second,millisecond:py.none},yy=["year","month","day","hour","minute","second","millisecond"],vy=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function my(t,e){return"0000".substr(0,e-(t+="").length)+t}function _y(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function xy(t){return t===_y(t)}function by(t,e,n,r){var i=zu(t),o=i[My(n)](),a=i[Iy(n)]()+1,s=Math.floor((a-1)/3)+1,l=i[Cy(n)](),u=i["get"+(n?"UTC":"")+"Day"](),c=i[Ay(n)](),h=(c-1)%12+1,d=i[Ty(n)](),p=i[ky(n)](),f=i[Ly(n)](),g=c>=12?"pm":"am",y=g.toUpperCase(),v=(r instanceof Kg?r:sy(r||oy)||iy[ny]).getModel("time"),m=v.get("month"),_=v.get("monthAbbr"),x=v.get("dayOfWeek"),b=v.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,g+"").replace(/{A}/g,y+"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,my(o%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,m[a-1]).replace(/{MMM}/g,_[a-1]).replace(/{MM}/g,my(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,my(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,x[u]).replace(/{ee}/g,b[u]).replace(/{e}/g,u+"").replace(/{HH}/g,my(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,my(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,my(d,2)).replace(/{m}/g,d+"").replace(/{ss}/g,my(p,2)).replace(/{s}/g,p+"").replace(/{SSS}/g,my(f,3)).replace(/{S}/g,f+"")}function wy(t,e){var n=zu(t),r=n[Iy(e)]()+1,i=n[Cy(e)](),o=n[Ay(e)](),a=n[Ty(e)](),s=n[ky(e)](),l=0===n[Ly(e)](),u=l&&0===s,c=u&&0===a,h=c&&0===o,d=h&&1===i;return d&&1===r?"year":d?"month":h?"day":c?"hour":u?"minute":l?"second":"millisecond"}function Sy(t,e,n){var r=Yi(t)?zu(t):t;switch(e=e||wy(t,n)){case"year":return r[My(n)]();case"half-year":return r[Iy(n)]()>=6?1:0;case"quarter":return Math.floor((r[Iy(n)]()+1)/4);case"month":return r[Iy(n)]();case"day":return r[Cy(n)]();case"half-day":return r[Ay(n)]()/24;case"hour":return r[Ay(n)]();case"minute":return r[Ty(n)]();case"second":return r[ky(n)]();case"millisecond":return r[Ly(n)]()}}function My(t){return t?"getUTCFullYear":"getFullYear"}function Iy(t){return t?"getUTCMonth":"getMonth"}function Cy(t){return t?"getUTCDate":"getDate"}function Ay(t){return t?"getUTCHours":"getHours"}function Ty(t){return t?"getUTCMinutes":"getMinutes"}function ky(t){return t?"getUTCSeconds":"getSeconds"}function Ly(t){return t?"getUTCMilliseconds":"getMilliseconds"}function Dy(t){return t?"setUTCFullYear":"setFullYear"}function Py(t){return t?"setUTCMonth":"setMonth"}function Ry(t){return t?"setUTCDate":"setDate"}function Oy(t){return t?"setUTCHours":"setHours"}function Ey(t){return t?"setUTCMinutes":"setMinutes"}function Ny(t){return t?"setUTCSeconds":"setSeconds"}function zy(t){return t?"setUTCMilliseconds":"setMilliseconds"}function By(t){if(!Wu(t))return Ui(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function Vy(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,(function(t,e){return e.toUpperCase()})),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var Fy=io;function Gy(t,e,n){function r(t){return t&&ao(t)?t:"-"}function i(t){return!(null==t||isNaN(t)||!isFinite(t))}var o="time"===e,a=t instanceof Date;if(o||a){var s=o?zu(t):t;if(!isNaN(+s))return by(s,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===e)return Zi(t)?r(t):Yi(t)&&i(t)?t+"":"-";var l=ju(t);return i(l)?By(l):Zi(t)?r(t):"boolean"==typeof t?t+"":"-"}var jy=["a","b","c","d","e","f","g"],Wy=function(t,e){return"{"+t+(null==e?"":e)+"}"};function Hy(t,e,n){Wi(e)||(e=[e]);var r=e.length;if(!r)return"";for(var i=e[0].$vars||[],o=0;or||l.newline?(o=0,c=g,a+=s+n,s=d.height):s=Math.max(s,d.height)}else{var y=d.height+(f?-f.y+d.y:0);(h=a+y)>i||l.newline?(o+=s+n,a=0,h=y,s=d.width):s=Math.max(s,d.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===t?o=c+n:a=h+n)}))}var $y=Ky;function Qy(t,e,n){n=Fy(n||0);var r=e.width,i=e.height,o=Au(t.left,r),a=Au(t.top,i),s=Au(t.right,r),l=Au(t.bottom,i),u=Au(t.width,r),c=Au(t.height,i),h=n[2]+n[0],d=n[1]+n[3],p=t.aspect;switch(isNaN(u)&&(u=r-s-d-o),isNaN(c)&&(c=i-l-h-a),null!=p&&(isNaN(u)&&isNaN(c)&&(p>r/i?u=.8*r:c=.8*i),isNaN(u)&&(u=p*c),isNaN(c)&&(c=u/p)),isNaN(o)&&(o=r-s-u-d),isNaN(a)&&(a=i-l-c-h),t.left||t.right){case"center":o=r/2-u/2-n[3];break;case"right":o=r-u-d}switch(t.top||t.bottom){case"middle":case"center":a=i/2-c/2-n[0];break;case"bottom":a=i-c-h}o=o||0,a=a||0,isNaN(u)&&(u=r-d-o-(s||0)),isNaN(c)&&(c=i-h-a-(l||0));var f=new Ca(o+n[3],a+n[0],u,c);return f.margin=n,f}function Jy(t,e,n,r,i,o){var a,s=!i||!i.hv||i.hv[0],l=!i||!i.hv||i.hv[1],u=i&&i.boundingMode||"all";if((o=o||t).x=t.x,o.y=t.y,!s&&!l)return!1;if("raw"===u)a="group"===t.type?new Ca(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(a=t.getBoundingRect(),t.needLocalTransform()){var c=t.getLocalTransform();(a=a.clone()).applyTransform(c)}var h=Qy(Pi({width:a.width,height:a.height},e),n,r),d=s?h.x-a.x:0,p=l?h.y-a.y:0;return"raw"===u?(o.x=d,o.y=p):(o.x+=d,o.y+=p),o===t&&t.markRedraw(),!0}function tv(t){var e=t.layoutMode||t.constructor.layoutMode;return Xi(e)?e:e?{type:e}:null}function ev(t,e,n){var r=n&&n.ignoreSize;!Wi(r)&&(r=[r,r]);var i=a(qy[0],0),o=a(qy[1],1);function a(n,i){var o={},a=0,u={},c=0;if(Yy(n,(function(e){u[e]=t[e]})),Yy(n,(function(t){s(e,t)&&(o[t]=u[t]=e[t]),l(o,t)&&a++,l(u,t)&&c++})),r[i])return l(e,n[1])?u[n[2]]=null:l(e,n[2])&&(u[n[1]]=null),u;if(2!==c&&a){if(a>=2)return o;for(var h=0;h=0;a--)o=ki(o,n[a],!0);e.defaultOption=o}return e.defaultOption},e.prototype.getReferringComponents=function(t,e){var n=t+"Index",r=t+"Id";return gc(this.ecModel,t,{index:this.get(n,!0),id:this.get(r,!0)},e)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0}(),e}(Kg);Sc(ov,Kg),Ac(ov),function(t){var e={};t.registerSubTypeDefaulter=function(t,n){var r=bc(t);e[r.main]=n},t.determineSubType=function(n,r){var i=r.type;if(!i){var o=bc(n).main;t.hasSubTypes(n)&&e[o]&&(i=e[o](r))}return i}}(ov),function(t,e){function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}t.topologicalTravel=function(t,r,i,o){if(t.length){var a=function(t){var r={},i=[];return Ni(t,(function(o){var a=n(r,o),s=function(t,e){var n=[];return Ni(t,(function(t){Ri(e,t)>=0&&n.push(t)})),n}(a.originalDeps=e(o),t);a.entryCount=s.length,0===a.entryCount&&i.push(o),Ni(s,(function(t){Ri(a.predecessor,t)<0&&a.predecessor.push(t);var e=n(r,t);Ri(e.successor,t)<0&&e.successor.push(o)}))})),{graph:r,noEntryList:i}}(r),s=a.graph,l=a.noEntryList,u={};for(Ni(t,(function(t){u[t]=!0}));l.length;){var c=l.pop(),h=s[c],d=!!u[c];d&&(i.call(o,c,h.originalDeps.slice()),delete u[c]),Ni(h.successor,d?f:p)}Ni(u,(function(){throw new Error("")}))}function p(t){s[t].entryCount--,0===s[t].entryCount&&l.push(t)}function f(t){u[t]=!0,p(t)}}}(ov,(function(t){var e=[];Ni(ov.getClassesByMainType(t),(function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])})),e=zi(e,(function(t){return bc(t).main})),"dataset"!==t&&Ri(e,"dataset")<=0&&e.unshift("dataset");return e}));var av="";"undefined"!=typeof navigator&&(av=navigator.platform||"");var sv="rgba(0, 0, 0, 0.2)",lv={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:sv,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:sv,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:sv,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:sv,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:sv,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:sv,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:av.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},uv=fo(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),cv="original",hv="arrayRows",dv="objectRows",pv="keyedColumns",fv="typedArray",gv="unknown",yv="column",vv="row",mv=1,_v=2,xv=3,bv=uc();function wv(t,e,n){var r={},i=Mv(e);if(!i||!t)return r;var o,a,s=[],l=[],u=e.ecModel,c=bv(u).datasetMap,h=i.uid+"_"+n.seriesLayoutBy;Ni(t=t.slice(),(function(e,n){var i=Xi(e)?e:t[n]={name:e};"ordinal"===i.type&&null==o&&(o=n,a=f(i)),r[i.name]=[]}));var d=c.get(h)||c.set(h,{categoryWayDim:a,valueWayDim:0});function p(t,e,n){for(var r=0;re)return t[r];return t[n-1]}(r,a):n;if((c=c||n)&&c.length){var h=c[l];return i&&(u[i]=h),s.paletteIdx=(l+1)%c.length,h}}var Nv="\0_ec_inner",zv=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.init=function(t,e,n,r,i,o){r=r||{},this.option=null,this._theme=new Kg(r),this._locale=new Kg(i),this._optionManager=o},e.prototype.setOption=function(t,e,n){var r=Fv(e);this._optionManager.setOption(t,n,r),this._resetOption(null,r)},e.prototype.resetOption=function(t,e){return this._resetOption(t,Fv(e))},e.prototype._resetOption=function(t,e){var n=!1,r=this._optionManager;if(!t||"recreate"===t){var i=r.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(i,e)):Lv(this,i),n=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var o=r.getTimelineOption(this);o&&(n=!0,this._mergeOption(o,e))}if(!t||"recreate"===t||"media"===t){var a=r.getMediaOption(this);a.length&&Ni(a,(function(t){n=!0,this._mergeOption(t,e)}),this)}return n},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,e){var n=this.option,r=this._componentsMap,i=this._componentsCount,o=[],a=fo(),s=e&&e.replaceMergeMainTypeMap;bv(this).datasetMap=fo(),Ni(t,(function(t,e){null!=t&&(ov.hasClass(e)?e&&(o.push(e),a.set(e,!0)):n[e]=null==n[e]?Ti(t):ki(n[e],t,!0))})),s&&s.each((function(t,e){ov.hasClass(e)&&!a.get(e)&&(o.push(e),a.set(e,!0))})),ov.topologicalTravel(o,ov.getAllClassMainTypes(),(function(e){var o=function(t,e,n){var r=Av.get(e);if(!r)return n;var i=r(t);return i?n.concat(i):n}(this,e,$u(t[e])),a=r.get(e),l=a?s&&s.get(e)?"replaceMerge":"normalMerge":"replaceAll",u=nc(a,o,l);(function(t,e,n){Ni(t,(function(t){var r=t.newOption;Xi(r)&&(t.keyInfo.mainType=e,t.keyInfo.subType=function(t,e,n,r){return e.type?e.type:n?n.subType:r.determineSubType(t,e)}(e,r,t.existing,n))}))})(u,e,ov),n[e]=null,r.set(e,null),i.set(e,0);var c,h=[],d=[],p=0;Ni(u,(function(t,n){var r=t.existing,i=t.newOption;if(i){var o="series"===e,a=ov.getClass(e,t.keyInfo.subType,!o);if(!a)return;if("tooltip"===e){if(c)return;c=!0}if(r&&r.constructor===a)r.name=t.keyInfo.name,r.mergeOption(i,this),r.optionUpdated(i,!1);else{var s=Di({componentIndex:n},t.keyInfo);Di(r=new a(i,this,this,s),s),t.brandNew&&(r.__requireNewView=!0),r.init(i,this,this),r.optionUpdated(null,!0)}}else r&&(r.mergeOption({},this),r.optionUpdated({},!1));r?(h.push(r.option),d.push(r),p++):(h.push(void 0),d.push(void 0))}),this),n[e]=h,r.set(e,d),i.set(e,p),"series"===e&&Tv(this)}),this),this._seriesIndices||Tv(this)},e.prototype.getOption=function(){var t=Ti(this.option);return Ni(t,(function(e,n){if(ov.hasClass(n)){for(var r=$u(e),i=r.length,o=!1,a=i-1;a>=0;a--)r[a]&&!sc(r[a])?o=!0:(r[a]=null,!o&&i--);r.length=i,t[n]=r}})),delete t[Nv],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){var r=n[e||0];if(r)return r;if(null==e)for(var i=0;i=e:"max"===n?t<=e:t===e})(r[a],t,o)||(i=!1)}})),i}var Xv=Ni,qv=Xi,Kv=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function $v(t){var e=t&&t.itemStyle;if(e)for(var n=0,r=Kv.length;n=0;g--){var y=t[g];if(s||(d=y.data.rawIndexOf(y.stackedByDimension,h)),d>=0){var v=y.data.getByRawIndex(y.stackResultDimension,d);if("all"===l||"positive"===l&&v>0||"negative"===l&&v<0||"samesign"===l&&p>=0&&v>0||"samesign"===l&&p<=0&&v<0){p=Pu(p,v),f=v;break}}}return r[0]=p,r[1]=f,r}))}))}var gm,ym,vm,mm,_m,xm=function(t){this.data=t.data||(t.sourceFormat===pv?{}:[]),this.sourceFormat=t.sourceFormat||gv,this.seriesLayoutBy=t.seriesLayoutBy||yv,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var n=0;nu&&(u=p)}s[0]=l,s[1]=u}},r=function(){return this._data?this._data.length/this._dimSize:0};function i(t){for(var e=0;e=0&&(s=o.interpolatedValue[l])}return null!=s?s+"":""})):void 0},t.prototype.getRawValue=function(t,e){return Vm(this.getData(e),t)},t.prototype.formatTooltip=function(t,e,n){},t}();function jm(t){var e,n;return Xi(t)?t.type&&(n=t):e=t,{text:e,frag:n}}function Wm(t){return new Hm(t)}var Hm=function(){function t(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return t.prototype.perform=function(t){var e,n=this._upstream,r=t&&t.skip;if(this._dirty&&n){var i=this.context;i.data=i.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!r&&(e=this._plan(this.context));var o,a=c(this._modBy),s=this._modDataCount||0,l=c(t&&t.modBy),u=t&&t.modDataCount||0;function c(t){return!(t>=1)&&(t=1),t}a===l&&s===u||(e="reset"),(this._dirty||"reset"===e)&&(this._dirty=!1,o=this._doReset(r)),this._modBy=l,this._modDataCount=u;var h=t&&t.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,p=Math.min(null!=h?this._dueIndex+h:1/0,this._dueEnd);if(!r&&(o||d1&&r>0?s:a}};return o;function a(){return e=t?null:oe},gte:function(t,e){return t>=e}},Km=function(){function t(t,e){if(!Yi(e)){Yu("")}this._opFn=qm[t],this._rvalFloat=ju(e)}return t.prototype.evaluate=function(t){return Yi(t)?this._opFn(t,this._rvalFloat):this._opFn(ju(t),this._rvalFloat)},t}(),$m=function(){function t(t,e){var n="desc"===t;this._resultLT=n?1:-1,null==e&&(e=n?"min":"max"),this._incomparable="min"===e?-1/0:1/0}return t.prototype.evaluate=function(t,e){var n=Yi(t)?t:ju(t),r=Yi(e)?e:ju(e),i=isNaN(n),o=isNaN(r);if(i&&(n=this._incomparable),o&&(r=this._incomparable),i&&o){var a=Ui(t),s=Ui(e);a&&(n=s?t:0),s&&(r=a?e:0)}return nr?-this._resultLT:0},t}(),Qm=function(){function t(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=ju(e)}return t.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var n=typeof t;n===this._rvalTypeof||"number"!==n&&"number"!==this._rvalTypeof||(e=ju(t)===this._rvalFloat)}return this._isEQ?e:!e},t}();function Jm(t,e){return"eq"===t||"ne"===t?new Qm("eq"===t,e):mo(qm,t)?new Km(t,e):null}var t_=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(t){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(t){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(t,e){},t.prototype.retrieveValueFromItem=function(t,e){},t.prototype.convertValue=function(t,e){return Zm(t,e)},t}();function e_(t){if(!s_(t.sourceFormat)){Yu("")}return t.data}function n_(t){var e=t.sourceFormat,n=t.data;if(!s_(e)){Yu("")}if(e===hv){for(var r=[],i=0,o=n.length;i65535?c_:h_}function y_(t,e,n,r,i){var o=f_[n||"float"];if(i){var a=t[e],s=a&&a.length;if(s!==r){for(var l=new o(r),u=0;ug[1]&&(g[1]=f)}return this._rawCount=this._count=s,{start:a,end:s}},t.prototype._initDataFromProvider=function(t,e,n){for(var r=this._provider,i=this._chunks,o=this._dimensions,a=o.length,s=this._rawExtent,l=zi(o,(function(t){return t.property})),u=0;uy[1]&&(y[1]=g)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=e,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(t,e){if(!(e>=0&&e=0&&e=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&nt))return o;i=o-1}}return-1},t.prototype.indicesOfNearest=function(t,e,n){var r=this._chunks[t],i=[];if(!r)return i;null==n&&(n=1/0);for(var o=1/0,a=-1,s=0,l=0,u=this.count();l=0&&a<0)&&(o=h,a=c,s=0),c===a&&(i[s++]=l))}return i.length=s,i},t.prototype.getIndices=function(){var t,e=this._indices;if(e){var n=e.constructor,r=this._count;if(n===Array){t=new n(r);for(var i=0;i=u&&_<=c||isNaN(_))&&(a[s++]=p),p++}d=!0}else if(2===i){f=h[r[0]];var y=h[r[1]],v=t[r[1]][0],m=t[r[1]][1];for(g=0;g=u&&_<=c||isNaN(_))&&(x>=v&&x<=m||isNaN(x))&&(a[s++]=p),p++}d=!0}}if(!d)if(1===i)for(g=0;g=u&&_<=c||isNaN(_))&&(a[s++]=b)}else for(g=0;gt[M][1])&&(w=!1)}w&&(a[s++]=e.getRawIndex(g))}return sy[1]&&(y[1]=g)}}}},t.prototype.lttbDownSample=function(t,e){var n,r,i,o=this.clone([t],!0),a=o._chunks[t],s=this.count(),l=0,u=Math.floor(1/e),c=this.getRawIndex(0),h=new(g_(this._rawCount))(Math.min(2*(Math.ceil(s/u)+2),s));h[l++]=c;for(var d=1;dn&&(n=r,i=I)}M>0&&Ma&&(f=a-u);for(var g=0;gp&&(p=y,d=u+g)}var v=this.getRawIndex(c),m=this.getRawIndex(d);cu-p&&(s=u-p,a.length=s);for(var f=0;fc[1]&&(c[1]=y),h[d++]=v}return i._count=d,i._indices=h,i._updateGetRawIdx(),i},t.prototype.each=function(t,e){if(this._count)for(var n=t.length,r=this._chunks,i=0,o=this.count();ia&&(a=l)}return r=[o,a],this._extent[t]=r,r},t.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var n=[],r=this._chunks,i=0;i=0?this._indices[t]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function t(t,e,n,r){return Zm(t[r],this._dimensions[r])}l_={arrayRows:t,objectRows:function(t,e,n,r){return Zm(t[e],this._dimensions[r])},keyedColumns:t,original:function(t,e,n,r){var i=t&&(null==t.value?t:t.value);return Zm(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(t,e,n,r){return t[r]}}}(),t}(),m_=function(){function t(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var t,e,n=this._sourceHost,r=this._getUpstreamSourceManagers(),i=!!r.length;if(x_(n)){var o=n,a=void 0,s=void 0,l=void 0;if(i){var u=r[0];u.prepareSource(),a=(l=u.getSource()).data,s=l.sourceFormat,e=[u._getVersionSign()]}else s=Ki(a=o.get("data",!0))?fv:cv,e=[];var c=this._getSourceMetaRawOption()||{},h=l&&l.metaRawOption||{},d=eo(c.seriesLayoutBy,h.seriesLayoutBy)||null,p=eo(c.sourceHeader,h.sourceHeader),f=eo(c.dimensions,h.dimensions);t=d!==h.seriesLayoutBy||!!p!=!!h.sourceHeader||f?[wm(a,{seriesLayoutBy:d,sourceHeader:p,dimensions:f},s)]:[]}else{var g=n;if(i){var y=this._applyTransform(r);t=y.sourceList,e=y.upstreamSignList}else{t=[wm(g.get("source",!0),this._getSourceMetaRawOption(),null)],e=[]}}this._setLocalSource(t,e)},t.prototype._applyTransform=function(t){var e,n=this._sourceHost,r=n.get("transform",!0),i=n.get("fromTransformResult",!0);if(null!=i){1!==t.length&&b_("")}var o,a=[],s=[];return Ni(t,(function(t){t.prepareSource();var e=t.getSource(i||0);null==i||e||b_(""),a.push(e),s.push(t._getVersionSign())})),r?e=function(t,e){var n=$u(t),r=n.length;r||Yu("");for(var i=0,o=r;i1||n>0&&!t.noHeader;return Ni(t.blocks,(function(t){var n=k_(t);n>=e&&(e=n+ +(r&&(!n||A_(t)&&!t.noHeader)))})),e}return 0}function L_(t,e,n,r){var i,o=e.noHeader,a=(i=k_(e),{html:M_[i],richText:I_[i]}),s=[],l=e.blocks||[];oo(!l||Wi(l)),l=l||[];var u=t.orderMode;if(e.sortBlocks&&u){l=l.slice();var c={valueAsc:"asc",valueDesc:"desc"};if(mo(c,u)){var h=new $m(c[u],null);l.sort((function(t,e){return h.evaluate(t.sortParam,e.sortParam)}))}else"seriesDesc"===u&&l.reverse()}Ni(l,(function(n,i){var o=e.valueFormatter,l=T_(n)(o?Di(Di({},t),{valueFormatter:o}):t,n,i>0?a.html:0,r);null!=l&&s.push(l)}));var d="richText"===t.renderMode?s.join(a.richText):R_(r,s.join(""),o?n:a.html);if(o)return d;var p=Gy(e.header,"ordinal",t.useUTC),f=S_(r,t.renderMode).nameStyle,g=w_(r);return"richText"===t.renderMode?O_(t,p,f)+a.richText+d:R_(r,'
'+Ko(p)+"
"+d,n)}function D_(t,e,n,r){var i=t.renderMode,o=e.noName,a=e.noValue,s=!e.markerType,l=e.name,u=t.useUTC,c=e.valueFormatter||t.valueFormatter||function(t){return zi(t=Wi(t)?t:[t],(function(t,e){return Gy(t,Wi(p)?p[e]:p,u)}))};if(!o||!a){var h=s?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",i),d=o?"":Gy(l,"ordinal",u),p=e.valueType,f=a?[]:c(e.value,e.dataIndex),g=!s||!o,y=!s&&o,v=S_(r,i),m=v.nameStyle,_=v.valueStyle;return"richText"===i?(s?"":h)+(o?"":O_(t,d,m))+(a?"":function(t,e,n,r,i){var o=[i],a=r?10:20;return n&&o.push({padding:[0,0,0,a],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(Wi(e)?e.join(" "):e,o)}(t,f,g,y,_)):R_(r,(s?"":h)+(o?"":function(t,e,n){return''+Ko(t)+""}(d,!s,m))+(a?"":function(t,e,n,r){var i=n?"10px":"20px",o=e?"float:right;margin-left:"+i:"";return t=Wi(t)?t:[t],''+zi(t,(function(t){return Ko(t)})).join("  ")+""}(f,g,y,_)),n)}}function P_(t,e,n,r,i,o){if(t)return T_(t)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:e,valueFormatter:t.valueFormatter},t,0,o)}function R_(t,e,n){return'
'+e+'
'}function O_(t,e,n){return t.markupStyleCreator.wrapRichTextStyle(e,n)}function E_(t,e){return Uy(t.getData().getItemVisual(e,"style")[t.visualDrawType])}function N_(t,e){var n=t.get("padding");return null!=n?n:"richText"===e?[8,10]:10}var z_=function(){function t(){this.richTextStyles={},this._nextStyleNameId=Hu()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(t,e,n){var r="richText"===n?this._generateStyleName():null,i=function(t,e){var n=Ui(t)?{color:t,extraCssText:e}:t||{},r=n.color,i=n.type;e=n.extraCssText;var o=n.renderMode||"html";return r?"html"===o?"subItem"===i?'':'':{renderMode:o,content:"{"+(n.markerId||"markerX")+"|} ",style:"subItem"===i?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:""}({color:e,type:t,renderMode:n,markerId:r});return Ui(i)?i:(this.richTextStyles[r]=i.style,i.content)},t.prototype.wrapRichTextStyle=function(t,e){var n={};Wi(e)?Ni(e,(function(t){return Di(n,t)})):Di(n,e);var r=this._generateStyleName();return this.richTextStyles[r]=n,"{"+r+"|"+t+"}"},t}();function B_(t){var e,n,r,i,o=t.series,a=t.dataIndex,s=t.multipleSeries,l=o.getData(),u=l.mapDimensionsAll("defaultedTooltip"),c=u.length,h=o.getRawValue(a),d=Wi(h),p=E_(o,a);if(c>1||d&&!c){var f=function(t,e,n,r,i){var o=e.getData(),a=Bi(t,(function(t,e,n){var r=o.getDimensionInfo(n);return t||r&&!1!==r.tooltip&&null!=r.displayName}),!1),s=[],l=[],u=[];function c(t,e){var n=o.getDimensionInfo(e);n&&!1!==n.otherDims.tooltip&&(a?u.push(C_("nameValue",{markerType:"subItem",markerColor:i,name:n.displayName,value:t,valueType:n.type})):(s.push(t),l.push(n.type)))}return r.length?Ni(r,(function(t){c(Vm(o,n,t),t)})):Ni(t,c),{inlineValues:s,inlineValueTypes:l,blocks:u}}(h,o,a,u,p);e=f.inlineValues,n=f.inlineValueTypes,r=f.blocks,i=f.inlineValues[0]}else if(c){var g=l.getDimensionInfo(u[0]);i=e=Vm(l,a,u[0]),n=g.type}else i=e=d?h[0]:h;var y=ac(o),v=y&&o.name||"",m=l.getName(a),_=s?v:m;return C_("section",{header:v,noHeader:s||!y,sortParam:i,blocks:[C_("nameValue",{markerType:"item",markerColor:p,name:_,noName:!ao(_),value:e,valueType:n,dataIndex:a})].concat(r||[])})}var V_=uc();function F_(t,e){return t.getName(e)||t.getId(e)}var G_="__universalTransitionEnabled",j_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return a(e,t),e.prototype.init=function(t,e,n){this.seriesIndex=this.componentIndex,this.dataTask=Wm({count:H_,reset:U_}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),(V_(this).sourceManager=new m_(this)).prepareSource();var r=this.getInitialData(t,n);Y_(r,this),this.dataTask.context.data=r,V_(this).dataBeforeProcessed=r,W_(this),this._initSelectedMapFromData(r)},e.prototype.mergeDefaultAndTheme=function(t,e){var n=tv(this),r=n?nv(t):{},i=this.subType;ov.hasClass(i)&&(i+="Series"),ki(t,e.getTheme().get(this.subType)),ki(t,this.getDefaultOption()),Qu(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&ev(t,r,n)},e.prototype.mergeOption=function(t,e){t=ki(this.option,t,!0),this.fillDataTextStyle(t.data);var n=tv(this);n&&ev(this.option,t,n);var r=V_(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(t,e);Y_(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,V_(this).dataBeforeProcessed=i,W_(this),this._initSelectedMapFromData(i)},e.prototype.fillDataTextStyle=function(t){if(t&&!Ki(t))for(var e=["show"],n=0;nthis.getShallow("animationThreshold")&&(e=!1),!!e},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,e,n){var r=this.ecModel,i=Rv.prototype.getColorFromPalette.call(this,t,e,n);return i||(i=r.getColorFromPalette(t,e,n)),i},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},e.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(e);if("series"===r||"all"===n)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var o=0;o=0&&n.push(i)}return n},e.prototype.isSelected=function(t,e){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(e);return("all"===n||n[F_(r,t)])&&!r.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[G_])return!0;var t=this.option.universalTransition;return!!t&&(!0===t||t&&t.enabled)},e.prototype._innerSelect=function(t,e){var n,r,i=this.option,o=i.selectedMode,a=e.length;if(o&&a)if("series"===o)i.selectedMap="all";else if("multiple"===o){Xi(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,l=0;l0&&this._innerSelect(t,e)}},e.registerClass=function(t){return ov.registerClass(t)},e.protoInitialize=function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"}(),e}(ov);function W_(t){var e=t.name;ac(t)||(t.name=function(t){var e=t.getRawData(),n=e.mapDimensionsAll("seriesName"),r=[];return Ni(n,(function(t){var n=e.getDimensionInfo(t);n.displayName&&r.push(n.displayName)})),r.join(" ")}(t)||e)}function H_(t){return t.model.getRawData().count()}function U_(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),Z_}function Z_(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Y_(t,e){Ni(go(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),(function(n){t.wrapMethod(n,ji(X_,e))}))}function X_(t,e){var n=q_(t);return n&&n.setOutputEnd((e||this).count()),e}function q_(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(t.uid))}return r}}Oi(j_,Gm),Oi(j_,Rv),Sc(j_,ov);var K_=function(){function t(){this.group=new xu,this.uid=Qg("viewComponent")}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,r){},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,r){},t.prototype.updateLayout=function(t,e,n,r){},t.prototype.updateVisual=function(t,e,n,r){},t.prototype.toggleBlurSeries=function(t,e,n){},t.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},t}();function $_(){var t=uc();return function(e){var n=t(e),r=e.pipelineContext,i=!!n.large,o=!!n.progressiveRender,a=n.large=!(!r||!r.large),s=n.progressiveRender=!(!r||!r.progressiveRender);return!(i===a&&o===s)&&"reset"}}wc(K_),Ac(K_);var Q_=uc(),J_=$_(),tx=function(){function t(){this.group=new xu,this.uid=Qg("viewChart"),this.renderTask=Wm({plan:rx,reset:ix}),this.renderTask.context={view:this}}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,r){},t.prototype.highlight=function(t,e,n,r){var i=t.getData(r&&r.dataType);i&&nx(i,r,"emphasis")},t.prototype.downplay=function(t,e,n,r){var i=t.getData(r&&r.dataType);i&&nx(i,r,"normal")},t.prototype.remove=function(t,e){this.group.removeAll()},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,r){this.render(t,e,n,r)},t.prototype.updateLayout=function(t,e,n,r){this.render(t,e,n,r)},t.prototype.updateVisual=function(t,e,n,r){this.render(t,e,n,r)},t.prototype.eachRendered=function(t){bg(this.group,t)},t.markUpdateMethod=function(t,e){Q_(t).updateMethod=e},t.protoInitialize=void(t.prototype.type="chart"),t}();function ex(t,e,n){t&&Mp(t)&&("emphasis"===e?ip:op)(t,n)}function nx(t,e,n){var r=lc(t,e),i=e&&null!=e.highlightKey?function(t){var e=Pd[t];return null==e&&Dd<=32&&(e=Pd[t]=Dd++),e}(e.highlightKey):null;null!=r?Ni($u(r),(function(e){ex(t.getItemGraphicEl(e),n,i)})):t.eachItemGraphicEl((function(t){ex(t,n,i)}))}function rx(t){return J_(t.model)}function ix(t){var e=t.model,n=t.ecModel,r=t.api,i=t.payload,o=e.pipelineContext.progressiveRender,a=t.view,s=i&&Q_(i).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](e,n,r,i),ox[l]}wc(tx),Ac(tx);var ox={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},ax="\0__throttleOriginMethod",sx="\0__throttleRate",lx="\0__throttleType";function ux(t,e,n){var r,i,o,a,s,l=0,u=0,c=null;function h(){u=(new Date).getTime(),c=null,t.apply(o,a||[])}e=e||0;var d=function(){for(var t=[],d=0;d=0?h():c=setTimeout(h,-i),l=r};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(t){s=t},d}function cx(t,e,n,r){var i=t[e];if(i){var o=i[ax]||i,a=i[lx];if(i[sx]!==n||a!==r){if(null==n||!r)return t[e]=o;(i=t[e]=ux(o,n,"debounce"===r))[ax]=o,i[lx]=r,i[sx]=n}return i}}function hx(t,e){var n=t[e];n&&n[ax]&&(n.clear&&n.clear(),t[e]=n[ax])}var dx=uc(),px={itemStyle:Tc(Yg,!0),lineStyle:Tc(Hg,!0)},fx={lineStyle:"stroke",itemStyle:"fill"};function gx(t,e){var n=t.visualStyleMapper||px[e];return n||px.itemStyle}function yx(t,e){var n=t.visualDrawType||fx[e];return n||"fill"}var vx={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),r=t.visualStyleAccessPath||"itemStyle",i=t.getModel(r),o=gx(t,r)(i),a=i.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=yx(t,r),l=o[s],u=Hi(l)?l:null,c="auto"===o.fill||"auto"===o.stroke;if(!o[s]||u||c){var h=t.getColorFromPalette(t.name,null,e.getSeriesCount());o[s]||(o[s]=h,n.setVisual("colorFromPalette",!0)),o.fill="auto"===o.fill||Hi(o.fill)?h:o.fill,o.stroke="auto"===o.stroke||Hi(o.stroke)?h:o.stroke}if(n.setVisual("style",o),n.setVisual("drawType",s),!e.isSeriesFiltered(t)&&u)return n.setVisual("colorFromPalette",!1),{dataEach:function(e,n){var r=t.getDataParams(n),i=Di({},o);i[s]=u(r),e.setItemVisual(n,"style",i)}}}},mx=new Kg,_x={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.ignoreStyleOnData&&!e.isSeriesFiltered(t)){var n=t.getData(),r=t.visualStyleAccessPath||"itemStyle",i=gx(t,r),o=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(t,e){var n=t.getRawDataItem(e);if(n&&n[r]){mx.option=n[r];var a=i(mx);Di(t.ensureUniqueItemVisual(e,"style"),a),mx.option.decal&&(t.setItemVisual(e,"decal",mx.option.decal),mx.option.decal.dirty=!0),o in a&&t.setItemVisual(e,"colorFromPalette",!1)}}:null}}}},xx={performRawSeries:!0,overallReset:function(t){var e=fo();t.eachSeries((function(t){var n=t.getColorBy();if(!t.isColorBySeries()){var r=t.type+"-"+n,i=e.get(r);i||(i={},e.set(r,i)),dx(t).scope=i}})),t.eachSeries((function(e){if(!e.isColorBySeries()&&!t.isSeriesFiltered(e)){var n=e.getRawData(),r={},i=e.getData(),o=dx(e).scope,a=e.visualStyleAccessPath||"itemStyle",s=yx(e,a);i.each((function(t){var e=i.getRawIndex(t);r[e]=t})),n.each((function(t){var a=r[t];if(i.getItemVisual(a,"colorFromPalette")){var l=i.ensureUniqueItemVisual(a,"style"),u=n.getName(t)||t+"",c=n.count();l[s]=e.getColorFromPalette(u,o,c)}}))}}))}},bx=Math.PI;var Sx=function(){function t(t,e,n,r){this._stageTaskMap=fo(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return t.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each((function(t){var e=t.overallTask;e&&e.dirty()}))},t.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),r=n.context,i=!e&&n.progressiveEnabled&&(!r||r.progressiveRender)&&t.__idxInPipeline>n.blockIndex?n.step:null,o=r&&r.modDataCount;return{step:i,modBy:null!=o?Math.ceil(o/i):null,modDataCount:o}}},t.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},t.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),r=t.getData().count(),i=n.progressiveEnabled&&e.incrementalPrepareRender&&r>=n.threshold,o=t.get("large")&&r>=t.get("largeThreshold"),a="mod"===t.get("progressiveChunkMode")?r:null;t.pipelineContext=n.context={progressiveRender:i,modDataCount:a,large:o}},t.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=fo();t.eachSeries((function(t){var r=t.getProgressive(),i=t.uid;n.set(i,{id:i,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:r&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(r||700),count:0}),e._pipe(t,t.dataTask)}))},t.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;Ni(this._allHandlers,(function(r){var i=t.get(r.uid)||t.set(r.uid,{});oo(!(r.reset&&r.overallReset),""),r.reset&&this._createSeriesStageTask(r,i,e,n),r.overallReset&&this._createOverallStageTask(r,i,e,n)}),this)},t.prototype.prepareView=function(t,e,n,r){var i=t.renderTask,o=i.context;o.model=e,o.ecModel=n,o.api=r,i.__block=!t.incrementalPrepareRender,this._pipe(e,i)},t.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},t.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},t.prototype._performStageTasks=function(t,e,n,r){r=r||{};var i=!1,o=this;function a(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}Ni(t,(function(t,s){if(!r.visualType||r.visualType===t.visualType){var l=o._stageTaskMap.get(t.uid),u=l.seriesTaskMap,c=l.overallTask;if(c){var h,d=c.agentStubMap;d.each((function(t){a(r,t)&&(t.dirty(),h=!0)})),h&&c.dirty(),o.updatePayload(c,n);var p=o.getPerformArgs(c,r.block);d.each((function(t){t.perform(p)})),c.perform(p)&&(i=!0)}else u&&u.each((function(s,l){a(r,s)&&s.dirty();var u=o.getPerformArgs(s,r.block);u.skip=!t.performRawSeries&&e.isSeriesFiltered(s.context.model),o.updatePayload(s,n),s.perform(u)&&(i=!0)}))}})),this.unfinished=i||this.unfinished},t.prototype.performSeriesTasks=function(t){var e;t.eachSeries((function(t){e=t.dataTask.perform()||e})),this.unfinished=e||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each((function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)}))},t.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},t.prototype._createSeriesStageTask=function(t,e,n,r){var i=this,o=e.seriesTaskMap,a=e.seriesTaskMap=fo(),s=t.seriesType,l=t.getTargetSeries;function u(e){var s=e.uid,l=a.set(s,o&&o.get(s)||Wm({plan:Tx,reset:kx,count:Px}));l.context={model:e,ecModel:n,api:r,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:i},i._pipe(e,l)}t.createOnAllSeries?n.eachRawSeries(u):s?n.eachRawSeriesByType(s,u):l&&l(n,r).each(u)},t.prototype._createOverallStageTask=function(t,e,n,r){var i=this,o=e.overallTask=e.overallTask||Wm({reset:Mx});o.context={ecModel:n,api:r,overallReset:t.overallReset,scheduler:i};var a=o.agentStubMap,s=o.agentStubMap=fo(),l=t.seriesType,u=t.getTargetSeries,c=!0,h=!1;function d(t){var e=t.uid,n=s.set(e,a&&a.get(e)||(h=!0,Wm({reset:Ix,onDirty:Ax})));n.context={model:t,overallProgress:c},n.agent=o,n.__block=c,i._pipe(t,n)}oo(!t.createOnAllSeries,""),l?n.eachRawSeriesByType(l,d):u?u(n,r).each(d):(c=!1,Ni(n.getSeries(),d)),h&&o.dirty()},t.prototype._pipe=function(t,e){var n=t.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=e),r.tail&&r.tail.pipe(e),r.tail=e,e.__idxInPipeline=r.count++,e.__pipeline=r},t.wrapStageHandler=function(t,e){return Hi(t)&&(t={overallReset:t,seriesType:Rx(t)}),t.uid=Qg("stageHandler"),e&&(t.visualType=e),t},t}();function Mx(t){t.overallReset(t.ecModel,t.api,t.payload)}function Ix(t){return t.overallProgress&&Cx}function Cx(){this.agent.dirty(),this.getDownstream().dirty()}function Ax(){this.agent&&this.agent.dirty()}function Tx(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function kx(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=$u(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?zi(e,(function(t,e){return Dx(e)})):Lx}var Lx=Dx(0);function Dx(t){return function(e,n){var r=n.data,i=n.resetDefines[t];if(i&&i.dataEach)for(var o=e.start;o0&&c===i.length-u.length){var h=i.slice(0,c);"data"!==h&&(e.mainType=h,e[u.toLowerCase()]=t,s=!0)}}a.hasOwnProperty(i)&&(n[i]=t,s=!0),s||(r[i]=t)}))}return{cptQuery:e,dataQuery:n,otherQuery:r}},t.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,o=n.model,a=n.view;if(!o||!a)return!0;var s=e.cptQuery,l=e.dataQuery;return u(s,o,"mainType")&&u(s,o,"subType")&&u(s,o,"index","componentIndex")&&u(s,o,"name")&&u(s,o,"id")&&u(l,i,"name")&&u(l,i,"dataIndex")&&u(l,i,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(t,e.otherQuery,r,i));function u(t,e,n,r){return null==t[n]||e[r||n]===t[n]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),Zx=["symbol","symbolSize","symbolRotate","symbolOffset"],Yx=Zx.concat(["symbolKeepAspect"]),Xx={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData();if(t.legendIcon&&n.setVisual("legendIcon",t.legendIcon),t.hasSymbolVisual){for(var r={},i={},o=!1,a=0;a=0&&yb(l)?l:.5,t.createRadialGradient(a,s,0,a,s,l)}(t,e,n):function(t,e,n){var r=null==e.x?0:e.x,i=null==e.x2?1:e.x2,o=null==e.y?0:e.y,a=null==e.y2?0:e.y2;return e.global||(r=r*n.width+n.x,i=i*n.width+n.x,o=o*n.height+n.y,a=a*n.height+n.y),r=yb(r)?r:0,i=yb(i)?i:1,o=yb(o)?o:0,a=yb(a)?a:0,t.createLinearGradient(r,o,i,a)}(t,e,n),i=e.colorStops,o=0;o0&&(e=r.lineDash,n=r.lineWidth,e&&"solid"!==e&&n>0?"dashed"===e?[4*n,2*n]:"dotted"===e?[n]:Yi(e)?[e]:Wi(e)?e:null:null),o=r.lineDashOffset;if(i){var a=r.strokeNoScale&&t.getLineScale?t.getLineScale():1;a&&1!==a&&(i=zi(i,(function(t){return t/a})),o/=a)}return[i,o]}var bb=new Eh(!0);function wb(t){var e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))}function Sb(t){return"string"==typeof t&&"none"!==t}function Mb(t){var e=t.fill;return null!=e&&"none"!==e}function Ib(t,e){if(null!=e.fillOpacity&&1!==e.fillOpacity){var n=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=n}else t.fill()}function Cb(t,e){if(null!=e.strokeOpacity&&1!==e.strokeOpacity){var n=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=n}else t.stroke()}function Ab(t,e,n){var r=Rc(e.image,e.__image,n);if(Ec(r)){var i=t.createPattern(r,e.repeat||"repeat");if("function"==typeof DOMMatrix&&i&&i.setTransform){var o=new DOMMatrix;o.translateSelf(e.x||0,e.y||0),o.rotateSelf(0,0,(e.rotation||0)*xo),o.scaleSelf(e.scaleX||1,e.scaleY||1),i.setTransform(o)}return i}}var Tb=["shadowBlur","shadowOffsetX","shadowOffsetY"],kb=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function Lb(t,e,n,r,i){var o=!1;if(!r&&e===(n=n||{}))return!1;if(r||e.opacity!==n.opacity){Rb(t,i),o=!0;var a=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(a)?qc.opacity:a}(r||e.blend!==n.blend)&&(o||(Rb(t,i),o=!0),t.globalCompositeOperation=e.blend||qc.blend);for(var s=0;s0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,e,n){if(!this[qb])if(this._disposed)this.id;else{var r,i,o;if(Xi(e)&&(n=e.lazyUpdate,r=e.silent,i=e.replaceMerge,o=e.transition,e=e.notMerge),this[qb]=!0,!this._model||e){var a=new Zv(this._api),s=this._theme,l=this._model=new zv;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,a)}this._model.setOption(t,{replaceMerge:i},kw);var u={seriesTransition:o,optionChanged:!0};if(n)this[Kb]={silent:r,updateParams:u},this[qb]=!1,this.getZr().wakeUp();else{try{rw(this),aw.update.call(this,null,u)}catch(t){throw this[Kb]=null,this[qb]=!1,t}this._ssr||this._zr.flush(),this[Kb]=null,this[qb]=!1,cw.call(this,r),hw.call(this,r)}}},e.prototype.setTheme=function(){},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||si.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){return t=t||{},this._zr.painter.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){return t=t||{},this._zr.painter.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){if(si.svgSupported){var t=this._zr;return Ni(t.storage.getDisplayList(),(function(t){t.stopAnimation(null,!0)})),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,n=this._model,r=[],i=this;Ni(e,(function(t){n.eachComponent({mainType:t},(function(t){var e=i._componentsMap[t.__viewId];e.group.ignore||(r.push(e),e.group.ignore=!0)}))}));var o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return Ni(r,(function(t){t.group.ignore=!1})),o}this.id},e.prototype.getConnectedDataURL=function(t){if(!this._disposed){var e="svg"===t.type,n=this.group,r=Math.min,i=Math.max,o=1/0;if(Ow[n]){var a=o,s=o,l=-1/0,u=-1/0,c=[],h=t&&t.pixelRatio||this.getDevicePixelRatio();Ni(Rw,(function(o,h){if(o.group===n){var d=e?o.getZr().painter.getSvgDom().innerHTML:o.renderToCanvas(Ti(t)),p=o.getDom().getBoundingClientRect();a=r(p.left,a),s=r(p.top,s),l=i(p.right,l),u=i(p.bottom,u),c.push({dom:d,left:p.left,top:p.top})}}));var d=(l*=h)-(a*=h),p=(u*=h)-(s*=h),f=pi.createCanvas(),g=Iu(f,{renderer:e?"svg":"canvas"});if(g.resize({width:d,height:p}),e){var y="";return Ni(c,(function(t){var e=t.left-a,n=t.top-s;y+=''+t.dom+""})),g.painter.getSvgRoot().innerHTML=y,t.connectedBackgroundColor&&g.painter.setBackgroundColor(t.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}return t.connectedBackgroundColor&&g.add(new pd({shape:{x:0,y:0,width:d,height:p},style:{fill:t.connectedBackgroundColor}})),Ni(c,(function(t){var e=new ad({style:{x:t.left*h-a,y:t.top*h-s,image:t.dom}});g.add(e)})),g.refreshImmediately(),f.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}this.id},e.prototype.convertToPixel=function(t,e){return sw(this,"convertToPixel",t,e)},e.prototype.convertFromPixel=function(t,e){return sw(this,"convertFromPixel",t,e)},e.prototype.containPixel=function(t,e){var n;if(!this._disposed)return Ni(hc(this._model,t),(function(t,r){r.indexOf("Models")>=0&&Ni(t,(function(t){var i=t.coordinateSystem;if(i&&i.containPoint)n=n||!!i.containPoint(e);else if("seriesModels"===r){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(n=n||o.containPoint(e,t))}}),this)}),this),!!n;this.id},e.prototype.getVisual=function(t,e){var n=hc(this._model,t,{defaultMainType:"series"}),r=n.seriesModel.getData(),i=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?r.indexOfRawIndex(n.dataIndex):null;return null!=i?Kx(r,i,e):$x(r,e)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t,e,n,r=this;Ni(Iw,(function(t){var e=function(e){var n,i=r.getModel(),o=e.target;if("globalout"===t?n={}:o&&eb(o,(function(t){var e=kd(t);if(e&&null!=e.dataIndex){var r=e.dataModel||i.getSeriesByIndex(e.seriesIndex);return n=r&&r.getDataParams(e.dataIndex,e.dataType,o)||{},!0}if(e.eventData)return n=Di({},e.eventData),!0}),!0),n){var a=n.componentType,s=n.componentIndex;"markLine"!==a&&"markPoint"!==a&&"markArea"!==a||(a="series",s=n.seriesIndex);var l=a&&null!=s&&i.getComponent(a,s),u=l&&r["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];n.event=e,n.type=t,r._$eventProcessor.eventInfo={targetEl:o,packedEvent:n,model:l,view:u},r.trigger(t,n)}};e.zrEventfulCallAtLast=!0,r._zr.on(t,e,r)})),Ni(Aw,(function(t,e){r._messageCenter.on(e,(function(t){this.trigger(e,t)}),r)})),Ni(["selectchanged"],(function(t){r._messageCenter.on(t,(function(e){this.trigger(t,e)}),r)})),t=this._messageCenter,e=this,n=this._api,t.on("selectchanged",(function(t){var r=n.getModel();t.isFromClick?(tb("map","selectchanged",e,r,t),tb("pie","selectchanged",e,r,t)):"select"===t.fromAction?(tb("map","selected",e,r,t),tb("pie","selected",e,r,t)):"unselect"===t.fromAction&&(tb("map","unselected",e,r,t),tb("pie","unselected",e,r,t))}))},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed)this.id;else{this._disposed=!0,this.getDom()&&yc(this.getDom(),Nw,"");var t=this,e=t._api,n=t._model;Ni(t._componentsViews,(function(t){t.dispose(n,e)})),Ni(t._chartsViews,(function(t){t.dispose(n,e)})),t._zr.dispose(),t._dom=t._model=t._chartsMap=t._componentsMap=t._chartsViews=t._componentsViews=t._scheduler=t._api=t._zr=t._throttledZrFlush=t._theme=t._coordSysMgr=t._messageCenter=null,delete Rw[t.id]}},e.prototype.resize=function(t){if(!this[qb])if(this._disposed)this.id;else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),r=t&&t.silent;this[Kb]&&(null==r&&(r=this[Kb].silent),n=!0,this[Kb]=null),this[qb]=!0;try{n&&rw(this),aw.update.call(this,{type:"resize",animation:Di({duration:0},t&&t.animation)})}catch(t){throw this[qb]=!1,t}this[qb]=!1,cw.call(this,r),hw.call(this,r)}}},e.prototype.showLoading=function(t,e){if(this._disposed)this.id;else if(Xi(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),Pw[t]){var n=Pw[t](this._api,e),r=this._zr;this._loadingFX=n,r.add(n)}},e.prototype.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},e.prototype.makeActionFromEvent=function(t){var e=Di({},t);return e.type=Aw[t.type],e},e.prototype.dispatchAction=function(t,e){if(this._disposed)this.id;else if(Xi(e)||(e={silent:!!e}),Cw[t.type]&&this._model)if(this[qb])this._pendingActions.push(t);else{var n=e.silent;uw.call(this,t,n);var r=e.flush;r?this._zr.flush():!1!==r&&si.browser.weChat&&this._throttledZrFlush(),cw.call(this,n),hw.call(this,n)}},e.prototype.updateLabelLayout=function(){Hb.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed)this.id;else{var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},e.internalField=function(){function t(t){t.clearColorPalette(),t.eachSeries((function(t){t.clearColorPalette()}))}function e(t){for(var e=[],n=t.currentStates,r=0;r0?{duration:o,delay:r.get("delay"),easing:r.get("easing")}:null;n.eachRendered((function(t){if(t.states&&t.states.emphasis){if(Uf(t))return;if(t instanceof ed&&function(t){var e=Rd(t);e.normalFill=t.style.fill,e.normalStroke=t.style.stroke;var n=t.states.select||{};e.selectFill=n.style&&n.style.fill||null,e.selectStroke=n.style&&n.style.stroke||null}(t),t.__dirty){var n=t.prevStates;n&&t.useStates(n)}if(i){t.stateTransition=a;var r=t.getTextContent(),o=t.getTextGuideLine();r&&(r.stateTransition=a),o&&(o.stateTransition=a)}t.__dirty&&e(t)}}))}rw=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),iw(t,!0),iw(t,!1),e.plan()},iw=function(t,e){for(var n=t._model,r=t._scheduler,i=e?t._componentsViews:t._chartsViews,o=e?t._componentsMap:t._chartsMap,a=t._zr,s=t._api,l=0;le.get("hoverLayerThreshold")&&!si.node&&!si.worker&&e.eachSeries((function(e){if(!e.preventUsingHoverLayer){var n=t._chartsMap[e.__viewId];n.__alive&&n.eachRendered((function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)}))}}))}(t,e),Hb.trigger("series:afterupdate",e,r,s)},_w=function(t){t[$b]=!0,t.getZr().wakeUp()},xw=function(t){t[$b]&&(t.getZr().storage.traverse((function(t){Uf(t)||e(t)})),t[$b]=!1)},vw=function(t){return new(function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return a(n,e),n.prototype.getCoordinateSystems=function(){return t._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(e){for(;e;){var n=e.__ecComponentInfo;if(null!=n)return t._model.getComponent(n.mainType,n.index);e=e.parent}},n.prototype.enterEmphasis=function(e,n){ip(e,n),_w(t)},n.prototype.leaveEmphasis=function(e,n){op(e,n),_w(t)},n.prototype.enterBlur=function(e){ap(e),_w(t)},n.prototype.leaveBlur=function(e){sp(e),_w(t)},n.prototype.enterSelect=function(e){lp(e),_w(t)},n.prototype.leaveSelect=function(e){up(e),_w(t)},n.prototype.getModel=function(){return t.getModel()},n.prototype.getViewOfComponentModel=function(e){return t.getViewOfComponentModel(e)},n.prototype.getViewOfSeriesModel=function(e){return t.getViewOfSeriesModel(e)},n}(jv))(t)},mw=function(t){function e(t,e){for(var n=0;n=0)){Hw.push(n);var o=Sx.wrapStageHandler(n,i);o.__prio=e,o.__raw=n,t.push(o)}}function Zw(t,e){Pw[t]=e}var Yw=function(t){var e=(t=Ti(t)).type;e||Yu("");var n=e.split(":");2!==n.length&&Yu("");var r=!1;"echarts"===n[0]&&(e=n[1],r=!0),t.__isBuiltIn=r,o_.set(e,t)};Ww(Zb,vx),Ww(Yb,_x),Ww(Yb,xx),Ww(Zb,Xx),Ww(Yb,qx),Ww(7e3,(function(t,e){t.eachRawSeries((function(n){if(!t.isSeriesFiltered(n)){var r=n.getData();r.hasItemVisual()&&r.each((function(t){var n=r.getItemVisual(t,"decal");n&&(r.ensureUniqueItemVisual(t,"style").decal=Fb(n,e))}));var i=r.getVisual("decal");if(i)r.getVisual("style").decal=Fb(i,e)}}))})),Vw(pm),Fw(900,(function(t){var e=fo();t.eachSeries((function(t){var n=t.get("stack");if(n){var r=e.get(n)||e.set(n,[]),i=t.getData(),o={stackResultDimension:i.getCalculationInfo("stackResultDimension"),stackedOverDimension:i.getCalculationInfo("stackedOverDimension"),stackedDimension:i.getCalculationInfo("stackedDimension"),stackedByDimension:i.getCalculationInfo("stackedByDimension"),isStackedByIndex:i.getCalculationInfo("isStackedByIndex"),data:i,seriesModel:t};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;r.length&&i.setCalculationInfo("stackedOnSeries",r[r.length-1].seriesModel),r.push(o)}})),e.each(fm)})),Zw("default",(function(t,e){Pi(e=e||{},{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 xu,r=new pd({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});n.add(r);var i,o=new yd({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new pd({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});return n.add(a),e.showSpinner&&((i=new Tf({shape:{startAngle:-bx/2,endAngle:-bx/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*bx/2}).start("circularInOut"),i.animateShape(!0).when(1e3,{startAngle:3*bx/2}).delay(300).start("circularInOut"),n.add(i)),n.resize=function(){var n=o.getBoundingRect().width,s=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-2*s-(e.showSpinner&&n?10:0)-n)/2-(e.showSpinner&&n?0:5+n/2)+(e.showSpinner?0:n/2)+(n?0:s),u=t.getHeight()/2;e.showSpinner&&i.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),r.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},n.resize(),n})),jw({type:Bd,event:Bd,update:Bd},_o),jw({type:Vd,event:Vd,update:Vd},_o),jw({type:Fd,event:Fd,update:Fd},_o),jw({type:Gd,event:Gd,update:Gd},_o),jw({type:jd,event:jd,update:jd},_o),Bw("light",Vx),Bw("dark",Hx);var Xw=[],qw={registerPreprocessor:Vw,registerProcessor:Fw,registerPostInit:function(t){Gw("afterinit",t)},registerPostUpdate:function(t){Gw("afterupdate",t)},registerUpdateLifecycle:Gw,registerAction:jw,registerCoordinateSystem:function(t,e){Hv.register(t,e)},registerLayout:function(t,e){Uw(Lw,t,e,1e3,"layout")},registerVisual:Ww,registerTransform:Yw,registerLoading:Zw,registerMap:function(t,e,n){var r=Ub["registerMap"];r&&r(t,e,n)},registerImpl:function(t,e){Ub[t]=e},PRIORITY:Xb,ComponentModel:ov,ComponentView:K_,SeriesModel:j_,ChartView:tx,registerComponentModel:function(t){ov.registerClass(t)},registerComponentView:function(t){K_.registerClass(t)},registerSeriesModel:function(t){j_.registerClass(t)},registerChartView:function(t){tx.registerClass(t)},registerSubTypeDefaulter:function(t,e){ov.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){var n;n=e,bu[t]=n}};function Kw(t){Wi(t)?Ni(t,(function(t){Kw(t)})):Ri(Xw,t)>=0||(Xw.push(t),Hi(t)&&(t={install:t}),t.install(qw))}function $w(t){return null==t?0:t.length||1}function Qw(t){return t}var Jw=function(){function t(t,e,n,r,i,o){this._old=t,this._new=e,this._oldKeyGetter=n||Qw,this._newKeyGetter=r||Qw,this.context=i,this._diffModeMultiple="multiple"===o}return t.prototype.add=function(t){return this._add=t,this},t.prototype.update=function(t){return this._update=t,this},t.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},t.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},t.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},t.prototype.remove=function(t){return this._remove=t,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},r=new Array(t.length),i=new Array(e.length);this._initIndexMap(t,null,r,"_oldKeyGetter"),this._initIndexMap(e,n,i,"_newKeyGetter");for(var o=0;o1){var u=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(u,o)}else 1===l?(n[a]=null,this._update&&this._update(s,o)):this._remove&&this._remove(o)}this._performRestAdd(i,n)},t.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},r={},i=[],o=[];this._initIndexMap(t,n,i,"_oldKeyGetter"),this._initIndexMap(e,r,o,"_newKeyGetter");for(var a=0;a1&&1===h)this._updateManyToOne&&this._updateManyToOne(u,l),r[s]=null;else if(1===c&&h>1)this._updateOneToMany&&this._updateOneToMany(u,l),r[s]=null;else if(1===c&&1===h)this._update&&this._update(u,l),r[s]=null;else if(c>1&&h>1)this._updateManyToMany&&this._updateManyToMany(u,l),r[s]=null;else if(c>1)for(var d=0;d1)for(var a=0;a30}var hS,dS,pS,fS,gS,yS,vS,mS=Xi,_S=zi,xS="undefined"==typeof Int32Array?Array:Int32Array,bS=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],wS=["_approximateExtent"],SS=function(){function t(t,e){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","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var r=!1;sS(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(r=!0,n=t),n=n||["x","y"];for(var i={},o=[],a={},s=!1,l={},u=0;u=e)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,i=this._idList;if(n.getSource().sourceFormat===cv&&!n.pure)for(var o=[],a=t;a0},t.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,r=n[t];r||(r=n[t]={});var i=r[e];return null==i&&(Wi(i=this.getVisual(e))?i=i.slice():mS(i)&&(i=Di({},i)),r[e]=i),i},t.prototype.setItemVisual=function(t,e,n){var r=this._itemVisuals[t]||{};this._itemVisuals[t]=r,mS(e)?Di(r,e):r[e]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(t,e){mS(t)?Di(this._layout,t):this._layout[t]=e},t.prototype.getLayout=function(t){return this._layout[t]},t.prototype.getItemLayout=function(t){return this._itemLayouts[t]},t.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?Di(this._itemLayouts[t]||{},e):e},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(t,e){var n=this.hostModel&&this.hostModel.seriesIndex;Ld(n,this.dataType,t,e),this._graphicEls[t]=e},t.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},t.prototype.eachItemGraphicEl=function(t,e){Ni(this._graphicEls,(function(n,r){n&&t&&t.call(e,n,r)}))},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:_S(this.dimensions,this._getDimInfo,this),this.hostModel)),gS(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(t,e){var n=this[t];Hi(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(ro(arguments)))})},t.internalField=(hS=function(t){var e=t._invertedIndicesMap;Ni(e,(function(n,r){var i=t._dimInfos[r],o=i.ordinalMeta,a=t._store;if(o){n=e[r]=new xS(o.categories.length);for(var s=0;s1&&(s+="__ec__"+u),r[e]=s}})),t}();function MS(t,e){bm(t)||(t=Sm(t));var n=(e=e||{}).coordDimensions||[],r=e.dimensionsDefine||t.dimensionsDefine||[],i=fo(),o=[],a=function(t,e,n,r){var i=Math.max(t.dimensionsDetectedCount||1,e.length,n.length,r||0);return Ni(e,(function(t){var e;Xi(t)&&(e=t.dimsDef)&&(i=Math.max(i,e.length))})),i}(t,n,r,e.dimensionsCount),s=e.canOmitUnusedDimensions&&cS(a),l=r===t.dimensionsDefine,u=l?uS(t):lS(r),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(t,a));for(var h=fo(c),d=new d_(a),p=0;p0&&(r.name=i+(o-1)),o++,e.set(i,o)}}(o),new aS({source:t,dimensions:o,fullDimensionCount:a,dimensionOmitted:s})}function IS(t,e,n){if(n||e.hasKey(t)){for(var r=0;e.hasKey(t+r);)r++;t+=r}return e.set(t,!0),t}var CS=function(t){this.coordSysDims=[],this.axisMap=fo(),this.categoryAxisMap=fo(),this.coordSysName=t};var AS={cartesian2d:function(t,e,n,r){var i=t.getReferringComponents("xAxis",pc).models[0],o=t.getReferringComponents("yAxis",pc).models[0];e.coordSysDims=["x","y"],n.set("x",i),n.set("y",o),TS(i)&&(r.set("x",i),e.firstCategoryDimIndex=0),TS(o)&&(r.set("y",o),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,n,r){var i=t.getReferringComponents("singleAxis",pc).models[0];e.coordSysDims=["single"],n.set("single",i),TS(i)&&(r.set("single",i),e.firstCategoryDimIndex=0)},polar:function(t,e,n,r){var i=t.getReferringComponents("polar",pc).models[0],o=i.findAxisModel("radiusAxis"),a=i.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",a),TS(o)&&(r.set("radius",o),e.firstCategoryDimIndex=0),TS(a)&&(r.set("angle",a),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e,n,r){e.coordSysDims=["lng","lat"]},parallel:function(t,e,n,r){var i=t.ecModel,o=i.getComponent("parallel",t.get("parallelIndex")),a=e.coordSysDims=o.dimensions.slice();Ni(o.parallelAxisIndex,(function(t,o){var s=i.getComponent("parallelAxis",t),l=a[o];n.set(l,s),TS(s)&&(r.set(l,s),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=o))}))}};function TS(t){return"category"===t.get("type")}function kS(t,e,n){var r,i,o,a=(n=n||{}).byIndex,s=n.stackedCoordDimension;!function(t){return!sS(t.schema)}(e)?(i=e.schema,r=i.dimensions,o=e.store):r=e;var l,u,c,h,d=!(!t||!t.get("stack"));if(Ni(r,(function(t,e){Ui(t)&&(r[e]=t={name:t}),d&&!t.isExtraCoord&&(a||l||!t.ordinalMeta||(l=t),u||"ordinal"===t.type||"time"===t.type||s&&s!==t.coordDim||(u=t))})),!u||a||l||(a=!0),u){c="__\0ecstackresult_"+t.id,h="__\0ecstackedover_"+t.id,l&&(l.createInvertedIndices=!0);var p=u.coordDim,f=u.type,g=0;Ni(r,(function(t){t.coordDim===p&&g++}));var y={name:c,coordDim:p,coordDimIndex:g,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length},v={name:h,coordDim:h,coordDimIndex:g+1,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length+1};i?(o&&(y.storeDimIndex=o.ensureCalculationDimension(h,f),v.storeDimIndex=o.ensureCalculationDimension(c,f)),i.appendCalculationDimension(y),i.appendCalculationDimension(v)):(r.push(y),r.push(v))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:a,stackedOverDimension:h,stackResultDimension:c}}function LS(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function DS(t,e){return LS(t,e)?t.getCalculationInfo("stackResultDimension"):e}function PS(t,e,n){n=n||{};var r,i=e.getSourceManager(),o=!1;t?(o=!0,r=Sm(t)):o=(r=i.getSource()).sourceFormat===cv;var a=function(t){var e=t.get("coordinateSystem"),n=new CS(e),r=AS[e];if(r)return r(t,n,n.axisMap,n.categoryAxisMap),n}(e),s=function(t,e){var n,r=t.get("coordinateSystem"),i=Hv.get(r);return e&&e.coordSysDims&&(n=zi(e.coordSysDims,(function(t){var n={name:t},r=e.axisMap.get(t);if(r){var i=r.get("type");n.type=nS(i)}return n}))),n||(n=i&&(i.getDimensionsInfo?i.getDimensionsInfo():i.dimensions.slice())||["x","y"]),n}(e,a),l=n.useEncodeDefaulter,u=Hi(l)?l:l?ji(wv,s,e):null,c=MS(r,{coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!o}),h=function(t,e,n){var r,i;return n&&Ni(t,(function(t,o){var a=t.coordDim,s=n.categoryAxisMap.get(a);s&&(null==r&&(r=o),t.ordinalMeta=s.getOrdinalMeta(),e&&(t.createInvertedIndices=!0)),null!=t.otherDims.itemName&&(i=!0)})),i||null==r||(t[r].otherDims.itemName=0),r}(c.dimensions,n.createInvertedIndices,a),d=o?null:i.getSharedDataStore(c),p=kS(e,{schema:c,store:d}),f=new SS(c,e);f.setCalculationInfo(p);var g=null!=h&&function(t){if(t.sourceFormat===cv){var e=function(t){var e=0;for(;ee[1]&&(e[1]=t[1])},t.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},t.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(t){this._isBlank=t},t}();Ac(RS);var OS=0,ES=function(){function t(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++OS}return t.createByAxisModel=function(e){var n=e.option,r=n.data,i=r&&zi(r,NS);return new t({categories:i,needCollect:!i,deduplication:!1!==n.dedplication})},t.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},t.prototype.parseAndCollect=function(t){var e,n=this._needCollect;if(!Ui(t)&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var r=this._getOrCreateMap();return null==(e=r.get(t))&&(n?(e=this.categories.length,this.categories[e]=t,r.set(t,e)):e=NaN),e},t.prototype._getOrCreateMap=function(){return this._map||(this._map=fo(this.categories))},t}();function NS(t){return Xi(t)&&null!=t.value?t.value:t+""}function zS(t){return"interval"===t.type||"log"===t.type}function BS(t,e,n,r){var i={},o=t[1]-t[0],a=i.interval=Vu(o/e);null!=n&&ar&&(a=i.interval=r);var s=i.intervalPrecision=FS(a);return function(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),GS(t,0,e),GS(t,1,e),t[0]>t[1]&&(t[0]=t[1])}(i.niceTickExtent=[Tu(Math.ceil(t[0]/a)*a,s),Tu(Math.floor(t[1]/a)*a,s)],t),i}function VS(t){var e=Math.pow(10,Bu(t)),n=t/e;return n?2===n?n=3:3===n?n=5:n*=2:n=1,Tu(n*e)}function FS(t){return Lu(t)+2}function GS(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function jS(t,e){return t>=e[0]&&t<=e[1]}function WS(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function HS(t,e){return t*(e[1]-e[0])+e[0]}var US=function(t){function e(e){var n=t.call(this,e)||this;n.type="ordinal";var r=n.getSetting("ordinalMeta");return r||(r=new ES({})),Wi(r)&&(r=new ES({categories:zi(r,(function(t){return Xi(t)?t.value:t}))})),n._ordinalMeta=r,n._extent=n.getSetting("extent")||[0,r.categories.length-1],n}return a(e,t),e.prototype.parse=function(t){return null==t?NaN:Ui(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return jS(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},e.prototype.normalize=function(t){return WS(t=this._getTickNumber(this.parse(t)),this._extent)},e.prototype.scale=function(t){return t=Math.round(HS(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(null!=t){for(var e=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,o=this._ordinalMeta.categories.length,a=Math.min(o,e.length);i=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(RS);RS.registerClass(US);var ZS=Tu,YS=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return a(e,t),e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return jS(t,this._extent)},e.prototype.normalize=function(t){return WS(t,this._extent)},e.prototype.scale=function(t){return HS(t,this._extent)},e.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},e.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=FS(t)},e.prototype.getTicks=function(t){var e=this._interval,n=this._extent,r=this._niceExtent,i=this._intervalPrecision,o=[];if(!e)return o;n[0]1e4)return[];var s=o.length?o[o.length-1].value:r[1];return n[1]>s&&(t?o.push({value:ZS(s+e,i)}):o.push({value:n[1]})),o},e.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],r=this.getExtent(),i=1;ir[0]&&c0&&(o=null===o?s:Math.min(o,s))}n[r]=o}}return n}(t),n=[];return Ni(t,(function(t){var r,i=t.coordinateSystem.getBaseAxis(),o=i.getExtent();if("category"===i.type)r=i.getBandWidth();else if("value"===i.type||"time"===i.type){var a=i.dim+"_"+i.index,s=e[a],l=Math.abs(o[1]-o[0]),u=i.scale.getExtent(),c=Math.abs(u[1]-u[0]);r=s?l/c*s:l}else{var h=t.getData();r=Math.abs(o[1]-o[0])/h.count()}var d=Au(t.get("barWidth"),r),p=Au(t.get("barMaxWidth"),r),f=Au(t.get("barMinWidth")||(aM(t)?.5:1),r),g=t.get("barGap"),y=t.get("barCategoryGap");n.push({bandWidth:r,barWidth:d,barMaxWidth:p,barMinWidth:f,barGap:g,barCategoryGap:y,axisKey:JS(i),stackId:QS(t)})})),nM(n)}function nM(t){var e={};Ni(t,(function(t,n){var r=t.axisKey,i=t.bandWidth,o=e[r]||{bandWidth:i,remainedWidth:i,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=o.stacks;e[r]=o;var s=t.stackId;a[s]||o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var u=t.barMaxWidth;u&&(a[s].maxWidth=u);var c=t.barMinWidth;c&&(a[s].minWidth=c);var h=t.barGap;null!=h&&(o.gap=h);var d=t.barCategoryGap;null!=d&&(o.categoryGap=d)}));var n={};return Ni(e,(function(t,e){n[e]={};var r=t.stacks,i=t.bandWidth,o=t.categoryGap;if(null==o){var a=Fi(r).length;o=Math.max(35-4*a,15)+"%"}var s=Au(o,i),l=Au(t.gap,1),u=t.remainedWidth,c=t.autoWidthCount,h=(u-s)/(c+(c-1)*l);h=Math.max(h,0),Ni(r,(function(t){var e=t.maxWidth,n=t.minWidth;if(t.width){r=t.width;e&&(r=Math.min(r,e)),n&&(r=Math.max(r,n)),t.width=r,u-=r+l*r,c--}else{var r=h;e&&er&&(r=n),r!==h&&(t.width=r,u-=r+l*r,c--)}})),h=(u-s)/(c+(c-1)*l),h=Math.max(h,0);var d,p=0;Ni(r,(function(t,e){t.width||(t.width=h),d=t,p+=t.width*(1+l)})),d&&(p-=d.width*l);var f=-p/2;Ni(r,(function(t,r){n[e][r]=n[e][r]||{bandWidth:i,offset:f,width:t.width},f+=t.width*(1+l)}))})),n}function rM(t,e){var n=tM(t,e),r=eM(n);Ni(n,(function(t){var e=t.getData(),n=t.coordinateSystem.getBaseAxis(),i=QS(t),o=r[JS(n)][i],a=o.offset,s=o.width;e.setLayout({bandWidth:o.bandWidth,offset:a,size:s})}))}function iM(t){return{seriesType:t,plan:$_(),reset:function(t){if(oM(t)){var e=t.getData(),n=t.coordinateSystem,r=n.getBaseAxis(),i=n.getOtherAxis(r),o=e.getDimensionIndex(e.mapDimension(i.dim)),a=e.getDimensionIndex(e.mapDimension(r.dim)),s=t.get("showBackground",!0),l=e.mapDimension(i.dim),u=e.getCalculationInfo("stackResultDimension"),c=LS(e,l)&&!!e.getCalculationInfo("stackedOnSeries"),h=i.isHorizontal(),d=function(t,e){var n=e.model.get("startValue");n||(n=0);return e.toGlobalCoord(e.dataToCoord("log"===e.type?n>0?n:1:n))}(0,i),p=aM(t),f=t.get("barMinHeight")||0,g=u&&e.getDimensionIndex(u),y=e.getLayout("size"),v=e.getLayout("offset");return{progress:function(t,e){for(var r,i=t.count,l=p&&KS(3*i),u=p&&s&&KS(3*i),m=p&&KS(i),_=n.master.getRect(),x=h?_.width:_.height,b=e.getStore(),w=0;null!=(r=t.next());){var S=b.get(c?g:o,r),M=b.get(a,r),I=d,C=void 0;c&&(C=+S-b.get(o,r));var A=void 0,T=void 0,k=void 0,L=void 0;if(h){var D=n.dataToPoint([S,M]);if(c)I=n.dataToPoint([C,M])[0];A=I,T=D[1]+v,k=D[0]-I,L=y,Math.abs(k)0)for(var s=0;s=0;--s)if(l[u]){o=l[u];break}o=o||a.none}if(Wi(o)){var c=null==t.level?0:t.level>=0?t.level:o.length+t.level;o=o[c=Math.min(c,o.length-1)]}}return by(new Date(t.value),o,i,r)}(t,e,n,this.getSetting("locale"),r)},e.prototype.getTicks=function(){var t=this._interval,e=this._extent,n=[];if(!t)return n;n.push({value:e[0],level:0});var r=this.getSetting("useUTC"),i=function(t,e,n,r){var i=1e4,o=vy,a=0;function s(t,e,n,i,o,a,s){for(var l=new Date(e),u=e,c=l[i]();u1&&0===u&&o.unshift({value:o[0].value-d})}}for(u=0;u=r[0]&&v<=r[1]&&h++)}var m=(r[1]-r[0])/e;if(h>1.5*m&&d>m/1.5)break;if(u.push(g),h>m||t===o[p])break}c=[]}}var _=Vi(zi(u,(function(t){return Vi(t,(function(t){return t.value>=r[0]&&t.value<=r[1]&&!t.notAdd}))})),(function(t){return t.length>0})),x=[],b=_.length-1;for(p=0;p<_.length;++p)for(var w=_[p],S=0;Sn&&(this._approxInterval=n);var o=lM.length,a=Math.min(function(t,e,n,r){for(;n>>1;t[i][1]16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function cM(t){return(t/=2592e6)>6?6:t>3?3:t>2?2:1}function hM(t){return(t/=cy)>12?12:t>6?6:t>3.5?4:t>2?2:1}function dM(t,e){return(t/=e?uy:ly)>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function pM(t){return Vu(t)}function fM(t,e,n){var r=new Date(t);switch(_y(e)){case"year":case"month":r[Py(n)](0);case"day":r[Ry(n)](1);case"hour":r[Oy(n)](0);case"minute":r[Ey(n)](0);case"second":r[Ny(n)](0),r[zy(n)](0)}return r.getTime()}RS.registerClass(sM);var gM=RS.prototype,yM=YS.prototype,vM=Tu,mM=Math.floor,_M=Math.ceil,xM=Math.pow,bM=Math.log,wM=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new YS,e._interval=0,e}return a(e,t),e.prototype.getTicks=function(t){var e=this._originalScale,n=this._extent,r=e.getExtent();return zi(yM.getTicks.call(this,t),(function(t){var e=t.value,i=Tu(xM(this.base,e));return i=e===n[0]&&this._fixMin?MM(i,r[0]):i,{value:i=e===n[1]&&this._fixMax?MM(i,r[1]):i}}),this)},e.prototype.setExtent=function(t,e){var n=bM(this.base);t=bM(Math.max(0,t))/n,e=bM(Math.max(0,e))/n,yM.setExtent.call(this,t,e)},e.prototype.getExtent=function(){var t=this.base,e=gM.getExtent.call(this);e[0]=xM(t,e[0]),e[1]=xM(t,e[1]);var n=this._originalScale.getExtent();return this._fixMin&&(e[0]=MM(e[0],n[0])),this._fixMax&&(e[1]=MM(e[1],n[1])),e},e.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=bM(t[0])/bM(e),t[1]=bM(t[1])/bM(e),gM.unionExtent.call(this,t)},e.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},e.prototype.calcNiceTicks=function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(n===1/0||n<=0)){var r,i=(r=n,Math.pow(10,Bu(r)));for(t/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var o=[Tu(_M(e[0]/i)*i),Tu(mM(e[1]/i)*i)];this._interval=i,this._niceExtent=o}},e.prototype.calcNiceExtent=function(t){yM.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return jS(t=bM(t)/bM(this.base),this._extent)},e.prototype.normalize=function(t){return WS(t=bM(t)/bM(this.base),this._extent)},e.prototype.scale=function(t){return t=HS(t,this._extent),xM(this.base,t)},e.type="log",e}(RS),SM=wM.prototype;function MM(t,e){return vM(t,Lu(e))}SM.getMinorTicks=yM.getMinorTicks,SM.getLabel=yM.getLabel,RS.registerClass(wM);var IM=function(){function t(t,e,n){this._prepareParams(t,e,n)}return t.prototype._prepareParams=function(t,e,n){n[1]0&&s>0&&!l&&(a=0),a<0&&s<0&&!u&&(s=0));var h=this._determinedMin,d=this._determinedMax;return null!=h&&(a=h,l=!0),null!=d&&(s=d,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:c}},t.prototype.modifyDataMinMax=function(t,e){this[AM[t]]=e},t.prototype.setDeterminedMinMax=function(t,e){this[CM[t]]=e},t.prototype.freeze=function(){this.frozen=!0},t}(),CM={min:"_determinedMin",max:"_determinedMax"},AM={min:"_dataMin",max:"_dataMax"};function TM(t,e,n){var r=t.rawExtentInfo;return r||(r=new IM(t,e,n),t.rawExtentInfo=r,r)}function kM(t,e){return null==e?null:Ji(e)?NaN:t.parse(e)}function LM(t,e){var n=t.type,r=TM(t,e,t.getExtent()).calculate();t.setBlank(r.isBlank);var i=r.min,o=r.max,a=e.ecModel;if(a&&"time"===n){var s=tM("bar",a),l=!1;if(Ni(s,(function(t){l=l||t.getBaseAxis()===e.axis})),l){var u=eM(s),c=function(t,e,n,r){var i=n.axis.getExtent(),o=Math.abs(i[1]-i[0]),a=function(t,e){if(t&&e)return t[JS(e)]}(r,n.axis);if(void 0===a)return{min:t,max:e};var s=1/0;Ni(a,(function(t){s=Math.min(t.offset,s)}));var l=-1/0;Ni(a,(function(t){l=Math.max(t.offset+t.width,l)})),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=e-t,h=c/(1-(s+l)/o)-c;return e+=h*(l/u),t-=h*(s/u),{min:t,max:e}}(i,o,e,u);i=c.min,o=c.max}}return{extent:[i,o],fixMin:r.minFixed,fixMax:r.maxFixed}}function DM(t,e){var n=e,r=LM(t,n),i=r.extent,o=n.get("splitNumber");t instanceof wM&&(t.base=n.get("logBase"));var a=t.type,s=n.get("interval"),l="interval"===a||"time"===a;t.setExtent(i[0],i[1]),t.calcNiceExtent({splitNumber:o,fixMin:r.fixMin,fixMax:r.fixMax,minInterval:l?n.get("minInterval"):null,maxInterval:l?n.get("maxInterval"):null}),null!=s&&t.setInterval&&t.setInterval(s)}function PM(t,e){if(e=e||t.get("type"))switch(e){case"category":return new US({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new sM({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(RS.getClass(e)||YS)}}function RM(t){var e,n,r=t.getLabelModel().get("formatter"),i="category"===t.type?t.scale.getExtent()[0]:null;return"time"===t.scale.type?(n=r,function(e,r){return t.scale.getFormattedLabel(e,r,n)}):Ui(r)?function(e){return function(n){var r=t.scale.getLabel(n);return e.replace("{value}",null!=r?r:"")}}(r):Hi(r)?(e=r,function(n,r){return null!=i&&(r=n.value-i),e(OM(t,n),r,null!=n.level?{level:n.level}:null)}):function(e){return t.scale.getLabel(e)}}function OM(t,e){return"category"===t.type?t.scale.getLabel(e):e.value}function EM(t,e){var n=e*Math.PI/180,r=t.width,i=t.height,o=r*Math.abs(Math.cos(n))+Math.abs(i*Math.sin(n)),a=r*Math.abs(Math.sin(n))+Math.abs(i*Math.cos(n));return new Ca(t.x,t.y,o,a)}function NM(t){var e=t.get("interval");return null==e?"auto":e}function zM(t){return"category"===t.type&&0===NM(t.getLabelModel())}function BM(t,e){var n={};return Ni(t.mapDimensionsAll(e),(function(e){n[DS(t,e)]=!0})),Fi(n)}var VM=function(){function t(){}return t.prototype.getNeedCrossZero=function(){return!this.option.scale},t.prototype.getCoordSysModel=function(){},t}();function FM(t,e){return Math.abs(t-e)<1e-8}function GM(t,e,n){var r=0,i=t[0];if(!i)return!1;for(var o=1;on&&(t=i,n=a)}if(t)return function(t){for(var e=0,n=0,r=0,i=t.length,o=t[i-1][0],a=t[i-1][1],s=0;s>1^-(1&s),l=l>>1^-(1&l),i=s+=i,o=l+=o,r.push([s/n,l/n])}return r}function QM(t,e){return zi(Vi((t=function(t){if(!t.UTF8Encoding)return t;var e=t,n=e.UTF8Scale;return null==n&&(n=1024),Ni(e.features,(function(t){var e=t.geometry,r=e.encodeOffsets,i=e.coordinates;if(r)switch(e.type){case"LineString":e.coordinates=$M(i,r,n);break;case"Polygon":case"MultiLineString":KM(i,r,n);break;case"MultiPolygon":Ni(i,(function(t,e){return KM(t,r[e],n)}))}})),e.UTF8Encoding=!1,e}(t)).features,(function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0})),(function(t){var n=t.properties,r=t.geometry,i=[];switch(r.type){case"Polygon":var o=r.coordinates;i.push(new ZM(o[0],o.slice(1)));break;case"MultiPolygon":Ni(r.coordinates,(function(t){t[0]&&i.push(new ZM(t[0],t.slice(1)))}));break;case"LineString":i.push(new YM([r.coordinates]));break;case"MultiLineString":i.push(new YM(r.coordinates))}var a=new XM(n[e||"name"],i,n.cp);return a.properties=n,a}))}var JM=uc();function tI(t,e){var n=zi(e,(function(e){return t.scale.parse(e)}));return"time"===t.type&&n.length>0&&(n.sort(),n.unshift(n[0]),n.push(n[n.length-1])),n}function eI(t){var e=t.getLabelModel().get("customValues");if(e){var n=RM(t),r=t.scale.getExtent();return{labels:zi(Vi(tI(t,e),(function(t){return t>=r[0]&&t<=r[1]})),(function(e){var r={value:e};return{formattedLabel:n(r),rawLabel:t.scale.getLabel(r),tickValue:e}}))}}return"category"===t.type?function(t){var e=t.getLabelModel(),n=rI(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(t):function(t){var e=t.scale.getTicks(),n=RM(t);return{labels:zi(e,(function(e,r){return{level:e.level,formattedLabel:n(e,r),rawLabel:t.scale.getLabel(e),tickValue:e.value}}))}}(t)}function nI(t,e){var n=t.getTickModel().get("customValues");if(n){var r=t.scale.getExtent();return{ticks:Vi(tI(t,n),(function(t){return t>=r[0]&&t<=r[1]}))}}return"category"===t.type?function(t,e){var n,r,i=iI(t,"ticks"),o=NM(e),a=oI(i,o);if(a)return a;e.get("show")&&!t.scale.isBlank()||(n=[]);if(Hi(o))n=lI(t,o,!0);else if("auto"===o){var s=rI(t,t.getLabelModel());r=s.labelCategoryInterval,n=zi(s.labels,(function(t){return t.tickValue}))}else n=sI(t,r=o,!0);return aI(i,o,{ticks:n,tickCategoryInterval:r})}(t,e):{ticks:zi(t.scale.getTicks(),(function(t){return t.value}))}}function rI(t,e){var n,r,i=iI(t,"labels"),o=NM(e),a=oI(i,o);return a||(Hi(o)?n=lI(t,o):(r="auto"===o?function(t){var e=JM(t).autoInterval;return null!=e?e:JM(t).autoInterval=t.calculateCategoryInterval()}(t):o,n=sI(t,r)),aI(i,o,{labels:n,labelCategoryInterval:r}))}function iI(t,e){return JM(t)[e]||(JM(t)[e]=[])}function oI(t,e){for(var n=0;n1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=zM(t),d=a.get("showMinLabel")||h,p=a.get("showMaxLabel")||h;d&&u!==o[0]&&g(o[0]);for(var f=u;f<=o[1];f+=l)g(f);function g(t){var e={value:t};s.push(n?t:{formattedLabel:r(e),rawLabel:i.getLabel(e),tickValue:t})}return p&&f-l!==o[1]&&g(o[1]),s}function lI(t,e,n){var r=t.scale,i=RM(t),o=[];return Ni(r.getTicks(),(function(t){var a=r.getLabel(t),s=t.value;e(t.value,a)&&o.push(n?s:{formattedLabel:i(t),rawLabel:a,tickValue:s})})),o}var uI=[0,1],cI=function(){function t(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return t.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),r=Math.max(e[0],e[1]);return t>=n&&t<=r},t.prototype.containData=function(t){return this.scale.contain(t)},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(t){return Du(t||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},t.prototype.dataToCoord=function(t,e){var n=this._extent,r=this.scale;return t=r.normalize(t),this.onBand&&"ordinal"===r.type&&hI(n=n.slice(),r.count()),Cu(t,uI,n,e)},t.prototype.coordToData=function(t,e){var n=this._extent,r=this.scale;this.onBand&&"ordinal"===r.type&&hI(n=n.slice(),r.count());var i=Cu(t,n,uI,e);return this.scale.scale(i)},t.prototype.pointToData=function(t,e){},t.prototype.getTicksCoords=function(t){var e=(t=t||{}).tickModel||this.getTickModel(),n=zi(nI(this,e).ticks,(function(t){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(t):t),tickValue:t}}),this);return function(t,e,n,r){var i=e.length;if(!t.onBand||n||!i)return;var o,a,s=t.getExtent();if(1===i)e[0].coord=s[0],o=e[1]={coord:s[1],tickValue:e[0].tickValue};else{var l=e[i-1].tickValue-e[0].tickValue,u=(e[i-1].coord-e[0].coord)/l;Ni(e,(function(t){t.coord-=u/2}));var c=t.scale.getExtent();a=1+c[1]-e[i-1].tickValue,o={coord:e[i-1].coord+u*a,tickValue:c[1]+1},e.push(o)}var h=s[0]>s[1];d(e[0].coord,s[0])&&(r?e[0].coord=s[0]:e.shift());r&&d(s[0],e[0].coord)&&e.unshift({coord:s[0]});d(s[1],o.coord)&&(r?o.coord=s[1]:e.pop());r&&d(o.coord,s[1])&&e.push({coord:s[1]});function d(t,e){return t=Tu(t),e=Tu(e),h?t>e:t0&&t<100||(t=5),zi(this.scale.getMinorTicks(t),(function(t){return zi(t,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this)}),this)},t.prototype.getViewLabels=function(){return eI(this).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);0===n&&(n=1);var r=Math.abs(t[1]-t[0]);return Math.abs(r)/n},t.prototype.calculateCategoryInterval=function(){return function(t){var e=function(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}(t),n=RM(t),r=(e.axisRotate-e.labelRotate)/180*Math.PI,i=t.scale,o=i.getExtent(),a=i.count();if(o[1]-o[0]<1)return 0;var s=1;a>40&&(s=Math.max(1,Math.floor(a/40)));for(var l=o[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),c=Math.abs(u*Math.cos(r)),h=Math.abs(u*Math.sin(r)),d=0,p=0;l<=o[1];l+=s){var f,g,y=iu(n({value:l}),e.font,"center","top");f=1.3*y.width,g=1.3*y.height,d=Math.max(d,f,7),p=Math.max(p,g,7)}var v=d/c,m=p/h;isNaN(v)&&(v=1/0),isNaN(m)&&(m=1/0);var _=Math.max(0,Math.floor(Math.min(v,m))),x=JM(t.model),b=t.getExtent(),w=x.lastAutoInterval,S=x.lastTickCount;return null!=w&&null!=S&&Math.abs(w-_)<=1&&Math.abs(S-a)<=1&&w>_&&x.axisExtent0===b[0]&&x.axisExtent1===b[1]?_=w:(x.lastTickCount=a,x.lastAutoInterval=_,x.axisExtent0=b[0],x.axisExtent1=b[1]),_}(this)},t}();function hI(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}var dI=2*Math.PI,pI=Eh.CMD,fI=["top","right","bottom","left"];function gI(t,e,n,r,i){var o=n.width,a=n.height;switch(t){case"top":r.set(n.x+o/2,n.y-e),i.set(0,-1);break;case"bottom":r.set(n.x+o/2,n.y+a+e),i.set(0,1);break;case"left":r.set(n.x-e,n.y+a/2),i.set(-1,0);break;case"right":r.set(n.x+o+e,n.y+a/2),i.set(1,0)}}function yI(t,e,n,r,i,o,a,s,l){a-=t,s-=e;var u=Math.sqrt(a*a+s*s),c=(a/=u)*n+t,h=(s/=u)*n+e;if(Math.abs(r-i)%dI<1e-4)return l[0]=c,l[1]=h,u-n;if(o){var d=r;r=Fh(i),i=Fh(d)}else r=Fh(r),i=Fh(i);r>i&&(i+=dI);var p=Math.atan2(s,a);if(p<0&&(p+=dI),p>=r&&p<=i||p+dI>=r&&p+dI<=i)return l[0]=c,l[1]=h,u-n;var f=n*Math.cos(r)+t,g=n*Math.sin(r)+e,y=n*Math.cos(i)+t,v=n*Math.sin(i)+e,m=(f-a)*(f-a)+(g-s)*(g-s),_=(y-a)*(y-a)+(v-s)*(v-s);return m<_?(l[0]=f,l[1]=g,Math.sqrt(m)):(l[0]=y,l[1]=v,Math.sqrt(_))}function vI(t,e,n,r,i,o,a,s){var l=i-t,u=o-e,c=n-t,h=r-e,d=Math.sqrt(c*c+h*h),p=(l*(c/=d)+u*(h/=d))/d;s&&(p=Math.min(Math.max(p,0),1)),p*=d;var f=a[0]=t+p*c,g=a[1]=e+p*h;return Math.sqrt((f-i)*(f-i)+(g-o)*(g-o))}function mI(t,e,n,r,i,o,a){n<0&&(t+=n,n=-n),r<0&&(e+=r,r=-r);var s=t+n,l=e+r,u=a[0]=Math.min(Math.max(i,t),s),c=a[1]=Math.min(Math.max(o,e),l);return Math.sqrt((u-i)*(u-i)+(c-o)*(c-o))}var _I=[];function xI(t,e,n){var r=mI(e.x,e.y,e.width,e.height,t.x,t.y,_I);return n.set(_I[0],_I[1]),r}function bI(t,e,n){for(var r,i,o=0,a=0,s=0,l=0,u=1/0,c=e.data,h=t.x,d=t.y,p=0;p0){e=e/180*Math.PI,wI.fromArray(t[0]),SI.fromArray(t[1]),MI.fromArray(t[2]),va.sub(II,wI,SI),va.sub(CI,MI,SI);var n=II.len(),r=CI.len();if(!(n<.001||r<.001)){II.scale(1/n),CI.scale(1/r);var i=II.dot(CI);if(Math.cos(e)1&&va.copy(kI,MI),kI.toArray(t[1])}}}}function DI(t,e,n){if(n<=180&&n>0){n=n/180*Math.PI,wI.fromArray(t[0]),SI.fromArray(t[1]),MI.fromArray(t[2]),va.sub(II,SI,wI),va.sub(CI,MI,SI);var r=II.len(),i=CI.len();if(!(r<.001||i<.001))if(II.scale(1/r),CI.scale(1/i),II.dot(e)=a)va.copy(kI,MI);else{kI.scaleAndAdd(CI,o/Math.tan(Math.PI/2-s));var l=MI.x!==SI.x?(kI.x-SI.x)/(MI.x-SI.x):(kI.y-SI.y)/(MI.y-SI.y);if(isNaN(l))return;l<0?va.copy(kI,SI):l>1&&va.copy(kI,MI)}kI.toArray(t[1])}}}function PI(t,e,n,r){var i="normal"===n,o=i?t:t.ensureState(n);o.ignore=e;var a=r.get("smooth");a&&!0===a&&(a=.3),o.shape=o.shape||{},a>0&&(o.shape.smooth=a);var s=r.getModel("lineStyle").getLineStyle();i?t.useStyle(s):o.style=s}function RI(t,e){var n=e.smooth,r=e.points;if(r)if(t.moveTo(r[0][0],r[0][1]),n>0&&r.length>=3){var i=Po(r[0],r[1]),o=Po(r[1],r[2]);if(!i||!o)return t.lineTo(r[1][0],r[1][1]),void t.lineTo(r[2][0],r[2][1]);var a=Math.min(i,o)*n,s=Oo([],r[1],r[0],a/i),l=Oo([],r[1],r[2],a/o),u=Oo([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],r[2][0],r[2][1])}else for(var c=1;c0){_(r*n,0,a);var i=r+t;i<0&&x(-i*n,1)}else x(-t*n,1)}}function _(n,r,i){0!==n&&(u=!0);for(var o=r;o0)for(l=0;l0;l--){_(-(o[l-1]*h),l,a)}}}function b(t){var e=t<0?-1:1;t=Math.abs(t);for(var n=Math.ceil(t/(a-1)),r=0;r0?_(n,0,r+1):_(-n,a-r-1,a),(t-=n)<=0)return}}function BI(t,e,n,r){return zI(t,"y","height",e,n)}function VI(t){var e=[];t.sort((function(t,e){return e.priority-t.priority}));var n=new Ca(0,0,0,0);function r(t){if(!t.ignore){var e=t.ensureState("emphasis");null==e.ignore&&(e.ignore=!1)}t.ignore=!0}for(var i=0;i=0&&n.attr(p.oldLayoutSelect),Ri(u,"emphasis")>=0&&n.attr(p.oldLayoutEmphasis)),Wf(n,s,e,a)}else if(n.attr(s),!Eg(n).valueAnimation){var c=eo(n.style.opacity,1);n.style.opacity=0,Hf(n,{style:{opacity:c}},e,a)}if(p.oldLayout=s,n.states.select){var h=p.oldLayoutSelect={};ZI(h,s,YI),ZI(h,n.states.select,YI)}if(n.states.emphasis){var d=p.oldLayoutEmphasis={};ZI(d,s,YI),ZI(d,n.states.emphasis,YI)}zg(n,a,l,e,e)}if(r&&!r.ignore&&!r.invisible){i=(p=UI(r)).oldLayout;var p,f={points:r.shape.points};i?(r.attr({shape:i}),Wf(r,{shape:f},e)):(r.setShape(f),r.style.strokePercent=0,Hf(r,{style:{strokePercent:1}},e)),p.oldLayout=f}},t}(),qI=uc();var KI=Math.sin,$I=Math.cos,QI=Math.PI,JI=2*Math.PI,tC=180/QI,eC=function(){function t(){}return t.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},t.prototype.moveTo=function(t,e){this._add("M",t,e)},t.prototype.lineTo=function(t,e){this._add("L",t,e)},t.prototype.bezierCurveTo=function(t,e,n,r,i,o){this._add("C",t,e,n,r,i,o)},t.prototype.quadraticCurveTo=function(t,e,n,r){this._add("Q",t,e,n,r)},t.prototype.arc=function(t,e,n,r,i,o){this.ellipse(t,e,n,n,0,r,i,o)},t.prototype.ellipse=function(t,e,n,r,i,o,a,s){var l=a-o,u=!s,c=Math.abs(l),h=Xs(c-JI)||(u?l>=JI:-l>=JI),d=l>0?l%JI:l%JI+JI,p=!1;p=!!h||!Xs(c)&&d>=QI==!!u;var f=t+n*$I(o),g=e+r*KI(o);this._start&&this._add("M",f,g);var y=Math.round(i*tC);if(h){var v=1/this._p,m=(u?1:-1)*(JI-v);this._add("A",n,r,y,1,+u,t+n*$I(o+m),e+r*KI(o+m)),v>.01&&this._add("A",n,r,y,0,+u,f,g)}else{var _=t+n*$I(a),x=e+r*KI(a);this._add("A",n,r,y,+p,+u,_,x)}},t.prototype.rect=function(t,e,n,r){this._add("M",t,e),this._add("l",n,0),this._add("l",0,r),this._add("l",-n,0),this._add("Z")},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(t,e,n,r,i,o,a,s,l){for(var u=[],c=this._p,h=1;h"}(i,o)+("style"!==i?Ko(a):a||"")+(r?""+n+zi(r,(function(e){return t(e)})).join(n)+n:"")+("")}(t)}function pC(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function fC(t,e,n,r){return hC("svg","root",{width:t,height:e,xmlns:sC,"xmlns:xlink":lC,version:"1.1",baseProfile:"full",viewBox:!!r&&"0 0 "+t+" "+e},n)}var gC=0;function yC(){return gC++}var vC={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"},mC="transform-origin";function _C(t,e,n){var r=Di({},t.shape);Di(r,e),t.buildPath(n,r);var i=new eC;return i.reset(il(t)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function xC(t,e){var n=e.originX,r=e.originY;(n||r)&&(t[mC]=n+"px "+r+"px")}var bC={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function wC(t,e){var n=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[n]=t,n}function SC(t){return Ui(t)?vC[t]?"cubic-bezier("+vC[t]+")":_s(t)?t:"":""}function MC(t,e,n,r){var i=t.animators,o=i.length,a=[];if(t instanceof kf){var s=function(t,e,n){var r,i,o=t.shape.paths,a={};if(Ni(o,(function(t){var e=pC(n.zrId);e.animation=!0,MC(t,{},e,!0);var o=e.cssAnims,s=e.cssNodes,l=Fi(o),u=l.length;if(u){var c=o[i=l[u-1]];for(var h in c){var d=c[h];a[h]=a[h]||{d:""},a[h].d+=d.d||""}for(var p in s){var f=s[p].animation;f.indexOf(i)>=0&&(r=f)}}})),r){e.d=!1;var s=wC(a,n);return r.replace(i,s)}}(t,e,n);if(s)a.push(s);else if(!o)return}else if(!o)return;for(var l={},u=0;u0})).length)return wC(c,n)+" "+i[0]+" both"}for(var y in l){(s=g(l[y]))&&a.push(s)}if(a.length){var v=n.zrId+"-cls-"+yC();n.cssNodes["."+v]={animation:a.join(",")},e.class=v}}function IC(t,e,n,r){var i=JSON.stringify(t),o=n.cssStyleCache[i];o||(o=n.zrId+"-cls-"+yC(),n.cssStyleCache[i]=o,n.cssNodes["."+o+":hover"]=t),e.class=e.class?e.class+" "+o:o}var CC=Math.round;function AC(t){return t&&Ui(t.src)}function TC(t){return t&&Hi(t.toDataURL)}function kC(t,e,n,r){aC((function(i,o){var a="fill"===i||"stroke"===i;a&&nl(o)?FC(e,t,i,r):a&&Js(o)?GC(n,t,i,r):t[i]=o,a&&r.ssr&&"none"===o&&(t["pointer-events"]="visible")}),e,n,!1),function(t,e,n){var r=t.style;if(function(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)}(r)){var i=function(t){var e=t.style,n=t.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(",")}(t),o=n.shadowCache,a=o[i];if(!a){var s=t.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var c=r.shadowOffsetX||0,h=r.shadowOffsetY||0,d=r.shadowBlur,p=Ys(r.shadowColor),f=p.opacity,g=p.color,y=d/2/l+" "+d/2/u;a=n.zrId+"-s"+n.shadowIdx++,n.defs[a]=hC("filter",a,{id:a,x:"-100%",y:"-100%",width:"300%",height:"300%"},[hC("feDropShadow","",{dx:c/l,dy:h/u,stdDeviation:y,"flood-color":g,"flood-opacity":f})]),o[i]=a}e.filter=rl(a)}}(n,t,r)}function LC(t,e){var n=function(t){if("function"==typeof Su)return Su(t)}(e);n&&(n.each((function(e,n){null!=e&&(t[(uC+n).toLowerCase()]=e+"")})),e.isSilent()&&(t[uC+"silent"]="true"))}function DC(t){return Xs(t[0]-1)&&Xs(t[1])&&Xs(t[2])&&Xs(t[3]-1)}function PC(t,e,n){if(e&&(!function(t){return Xs(t[4])&&Xs(t[5])}(e)||!DC(e))){var r=1e4;t.transform=DC(e)?"translate("+CC(e[4]*r)/r+" "+CC(e[5]*r)/r+")":function(t){return"matrix("+qs(t[0])+","+qs(t[1])+","+qs(t[2])+","+qs(t[3])+","+Ks(t[4])+","+Ks(t[5])+")"}(e)}}function RC(t,e,n){for(var r=t.points,i=[],o=0;o=0&&a||o;s&&(i=Us(s))}var l=r.lineWidth;l&&(l/=!r.strokeNoScale&&t.transform?t.transform[0]:1);var u={cursor:"pointer"};i&&(u.fill=i),r.stroke&&(u.stroke=r.stroke),l&&(u["stroke-width"]=l),IC(u,e,n)}}(t,o,e),hC(s,t.id+"",o)}function VC(t,e){return t instanceof ed?BC(t,e):t instanceof ad?function(t,e){var n=t.style,r=n.image;if(r&&!Ui(r)&&(AC(r)?r=r.src:TC(r)&&(r=r.toDataURL())),r){var i=n.x||0,o=n.y||0,a={href:r,width:n.width,height:n.height};return i&&(a.x=i),o&&(a.y=o),PC(a,t.transform),kC(a,n,t,e),LC(a,t),e.animation&&MC(t,a,e),hC("image",t.id+"",a)}}(t,e):t instanceof rd?function(t,e){var n=t.style,r=n.text;if(null!=r&&(r+=""),r&&!isNaN(n.x)&&!isNaN(n.y)){var i=n.font||ui,o=n.x||0,a=function(t,e,n){return"top"===n?t+=e/2:"bottom"===n&&(t-=e/2),t}(n.y||0,su(i),n.textBaseline),s={"dominant-baseline":"central","text-anchor":$s[n.textAlign]||n.textAlign};if(wd(n)){var l="",u=n.fontStyle,c=xd(n.fontSize);if(!parseFloat(c))return;var h=n.fontFamily||li,d=n.fontWeight;l+="font-size:"+c+";font-family:"+h+";",u&&"normal"!==u&&(l+="font-style:"+u+";"),d&&"normal"!==d&&(l+="font-weight:"+d+";"),s.style=l}else s.style="font: "+i;return r.match(/\s/)&&(s["xml:space"]="preserve"),o&&(s.x=o),a&&(s.y=a),PC(s,t.transform),kC(s,n,t,e),LC(s,t),e.animation&&MC(t,s,e),hC("text",t.id+"",s,void 0,r)}}(t,e):void 0}function FC(t,e,n,r){var i,o=t[n],a={gradientUnits:o.global?"userSpaceOnUse":"objectBoundingBox"};if(tl(o))i="linearGradient",a.x1=o.x,a.y1=o.y,a.x2=o.x2,a.y2=o.y2;else{if(!el(o))return;i="radialGradient",a.cx=eo(o.x,.5),a.cy=eo(o.y,.5),a.r=eo(o.r,.5)}for(var s=o.colorStops,l=[],u=0,c=s.length;ul?nA(t,null==n[h+1]?null:n[h+1].elm,n,s,h):rA(t,e,a,l))}(n,r,i):QC(i)?(QC(t.text)&&qC(n,""),nA(n,null,i,0,i.length-1)):QC(r)?rA(n,r,0,r.length-1):QC(t.text)&&qC(n,""):t.text!==e.text&&(QC(r)&&rA(n,r,0,r.length-1),qC(n,e.text)))}var aA=0,sA=function(){function t(t,e,n){if(this.type="svg",this.refreshHover=function(){},this.configLayer=function(){},this.storage=e,this._opts=n=Di({},n),this.root=t,this._id="zr"+aA++,this._oldVNode=fC(n.width,n.height),t&&!n.ssr){var r=this._viewport=document.createElement("div");r.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=cC("svg");iA(null,this._oldVNode),r.appendChild(i),t.appendChild(r)}this.resize(n.width,n.height)}return t.prototype.getType=function(){return this.type},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",function(t,e){if(tA(t,e))oA(t,e);else{var n=t.elm,r=YC(n);eA(e),null!==r&&(HC(r,e.elm,XC(n)),rA(r,[t],0,0))}}(this._oldVNode,t),this._oldVNode=t}},t.prototype.renderOneToVNode=function(t){return VC(t,pC(this._id))},t.prototype.renderToVNode=function(t){t=t||{};var e=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=pC(this._id);i.animation=t.animation,i.willUpdate=t.willUpdate,i.compress=t.compress,i.emphasis=t.emphasis,i.ssr=this._opts.ssr;var o=[],a=this._bgVNode=function(t,e,n,r){var i;if(n&&"none"!==n)if(i=hC("rect","bg",{width:t,height:e,x:"0",y:"0"}),nl(n))FC({fill:n},i.attrs,"fill",r);else if(Js(n))GC({style:{fill:n},dirty:_o,getBoundingRect:function(){return{width:t,height:e}}},i.attrs,"fill",r);else{var o=Ys(n),a=o.color,s=o.opacity;i.attrs.fill=a,s<1&&(i.attrs["fill-opacity"]=s)}return i}(n,r,this._backgroundColor,i);a&&o.push(a);var s=t.compress?null:this._mainVNode=hC("g","main",{},[]);this._paintList(e,i,s?s.children:o),s&&o.push(s);var l=zi(Fi(i.defs),(function(t){return i.defs[t]}));if(l.length&&o.push(hC("defs","defs",{},l)),t.animation){var u=function(t,e,n){var r=(n=n||{}).newline?"\n":"",i=" {"+r,o=r+"}",a=zi(Fi(t),(function(e){return e+i+zi(Fi(t[e]),(function(n){return n+":"+t[e][n]+";"})).join(r)+o})).join(r),s=zi(Fi(e),(function(t){return"@keyframes "+t+i+zi(Fi(e[t]),(function(n){return n+i+zi(Fi(e[t][n]),(function(r){var i=e[t][n][r];return"d"===r&&(i='path("'+i+'")'),r+":"+i+";"})).join(r)+o})).join(r)+o})).join(r);return a||s?[""].join(r):""}(i.cssNodes,i.cssAnims,{newline:!0});if(u){var c=hC("style","stl",{},[],u);o.push(c)}}return fC(n,r,o,t.useViewBox)},t.prototype.renderToString=function(t){return t=t||{},dC(this.renderToVNode({animation:eo(t.cssAnimation,!0),emphasis:eo(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:eo(t.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(t,e,n){for(var r,i,o=t.length,a=[],s=0,l=0,u=0;u=0&&(!h||!i||h[f]!==i[f]);f--);for(var g=p-1;g>f;g--)r=a[--s-1];for(var y=f+1;y=a)}}for(var c=this.__startIndex;c15)break}n.prevElClipPaths&&h.restore()};if(p)if(0===p.length)s=l.__endIndex;else for(var x=d.dpr,b=0;b0&&t>r[0]){for(s=0;st);s++);a=n[r[s]]}if(r.splice(s+1,0,t),n[t]=e,!e.virtual)if(a){var l=a.dom;l.nextSibling?o.insertBefore(e.dom,l.nextSibling):o.appendChild(e.dom)}else o.firstChild?o.insertBefore(e.dom,o.firstChild):o.appendChild(e.dom);e.painter||(e.painter=this)}},t.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,r=0;r0?dA:0),this._needsManuallyCompositing),u.__builtin__||Ai("ZLevel "+l+" has been used by unkown layer "+u.id),u!==o&&(u.__used=!0,u.__startIndex!==i&&(u.__dirty=!0),u.__startIndex=i,u.incremental?u.__drawIndex=-1:u.__drawIndex=i,e(i),o=u),1&s.__dirty&&!s.__inHover&&(u.__dirty=!0,u.incremental&&u.__drawIndex<0&&(u.__drawIndex=i))}e(i),this.eachBuiltinLayer((function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)}))},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(t){t.clear()},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t,Ni(this._layers,(function(t){t.setUnpainted()}))},t.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?ki(n[t],e,!0):n[t]=e;for(var r=0;r-1&&(s.style.stroke=s.style.fill,s.style.fill="#fff",s.style.lineWidth=2),e},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(j_);function gA(t,e){var n=t.mapDimensionsAll("defaultedLabel"),r=n.length;if(1===r){var i=Vm(t,e,n[0]);return null!=i?i+"":null}if(r){for(var o=[],a=0;a=0&&r.push(e[o])}return r.join(" ")}var vA=function(t){function e(e,n,r,i){var o=t.call(this)||this;return o.updateData(e,n,r,i),o}return a(e,t),e.prototype._createSymbol=function(t,e,n,r,i){this.removeAll();var o=pb(t,-1,-1,2,2,null,i);o.attr({z2:100,culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=mA,this._symbolType=t,this.add(o)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){ip(this.childAt(0))},e.prototype.downplay=function(){op(this.childAt(0))},e.prototype.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},e.prototype.setDraggable=function(t,e){var n=this.childAt(0);n.draggable=t,n.cursor=!e&&t?"move":n.cursor},e.prototype.updateData=function(t,n,r,i){this.silent=!1;var o=t.getItemVisual(n,"symbol")||"circle",a=t.hostModel,s=e.getSymbolSize(t,n),l=o!==this._symbolType,u=i&&i.disableAnimation;if(l){var c=t.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,t,n,s,c)}else{(d=this.childAt(0)).silent=!1;var h={scaleX:s[0]/2,scaleY:s[1]/2};u?d.attr(h):Wf(d,h,a,n),qf(d)}if(this._updateCommon(t,n,s,r,i),l){var d=this.childAt(0);if(!u){h={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:d.style.opacity}};d.scaleX=d.scaleY=0,d.style.opacity=0,Hf(d,h,a,n)}}u&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,e,n,r,i){var o,a,s,l,u,c,h,d,p,f=this.childAt(0),g=t.hostModel;if(r&&(o=r.emphasisItemStyle,a=r.blurItemStyle,s=r.selectItemStyle,l=r.focus,u=r.blurScope,h=r.labelStatesModels,d=r.hoverScale,p=r.cursorStyle,c=r.emphasisDisabled),!r||t.hasItemOption){var y=r&&r.itemModel?r.itemModel:t.getItemModel(e),v=y.getModel("emphasis");o=v.getModel("itemStyle").getItemStyle(),s=y.getModel(["select","itemStyle"]).getItemStyle(),a=y.getModel(["blur","itemStyle"]).getItemStyle(),l=v.get("focus"),u=v.get("blurScope"),c=v.get("disabled"),h=Ag(y),d=v.getShallow("scale"),p=y.getShallow("cursor")}var m=t.getItemVisual(e,"symbolRotate");f.attr("rotation",(m||0)*Math.PI/180||0);var _=gb(t.getItemVisual(e,"symbolOffset"),n);_&&(f.x=_[0],f.y=_[1]),p&&f.attr("cursor",p);var x=t.getItemVisual(e,"style"),b=x.fill;if(f instanceof ad){var w=f.style;f.useStyle(Di({image:w.image,x:w.x,y:w.y,width:w.width,height:w.height},x))}else f.__isEmptyBrush?f.useStyle(Di({},x)):f.useStyle(x),f.style.decal=null,f.setColor(b,i&&i.symbolInnerColor),f.style.strokeNoScale=!0;var S=t.getItemVisual(e,"liftZ"),M=this._z2;null!=S?null==M&&(this._z2=f.z2,f.z2+=S):null!=M&&(f.z2=M,this._z2=null);var I=i&&i.useNameLabel;Cg(f,h,{labelFetcher:g,labelDataIndex:e,defaultText:function(e){return I?t.getName(e):gA(t,e)},inheritColor:b,defaultOpacity:x.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var C=f.ensureState("emphasis");C.style=o,f.ensureState("select").style=s,f.ensureState("blur").style=a;var A=null==d||!0===d?Math.max(1.1,3/this._sizeY):isFinite(d)&&d>0?+d:1;C.scaleX=this._sizeX*A,C.scaleY=this._sizeY*A,this.setSymbolScale(1),mp(this,l,u,c)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,e,n){var r=this.childAt(0),i=kd(this).dataIndex,o=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var a=r.getTextContent();a&&Zf(a,{style:{opacity:0}},e,{dataIndex:i,removeOpt:o,cb:function(){r.removeTextContent()}})}else r.removeTextContent();Zf(r,{style:{opacity:0},scaleX:0,scaleY:0},e,{dataIndex:i,cb:t,removeOpt:o})},e.getSymbolSize=function(t,e){return fb(t.getItemVisual(e,"symbolSize"))},e}(xu);function mA(t,e){this.parent.drift(t,e)}function _A(t,e,n,r){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(r.isIgnore&&r.isIgnore(n))&&!(r.clipShape&&!r.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(n,"symbol")}function xA(t){return null==t||Xi(t)||(t={isIgnore:t}),t||{}}function bA(t){var e=t.hostModel,n=e.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:Ag(e),cursorStyle:e.get("cursor")}}var wA=function(){function t(t){this.group=new xu,this._SymbolCtor=t||vA}return t.prototype.updateData=function(t,e){this._progressiveEls=null,e=xA(e);var n=this.group,r=t.hostModel,i=this._data,o=this._SymbolCtor,a=e.disableAnimation,s=bA(t),l={disableAnimation:a},u=e.getSymbolPoint||function(e){return t.getItemLayout(e)};i||n.removeAll(),t.diff(i).add((function(r){var i=u(r);if(_A(t,i,r,e)){var a=new o(t,r,s,l);a.setPosition(i),t.setItemGraphicEl(r,a),n.add(a)}})).update((function(c,h){var d=i.getItemGraphicEl(h),p=u(c);if(_A(t,p,c,e)){var f=t.getItemVisual(c,"symbol")||"circle",g=d&&d.getSymbolType&&d.getSymbolType();if(!d||g&&g!==f)n.remove(d),(d=new o(t,c,s,l)).setPosition(p);else{d.updateData(t,c,s,l);var y={x:p[0],y:p[1]};a?d.attr(y):Wf(d,y,r)}n.add(d),t.setItemGraphicEl(c,d)}else n.remove(d)})).remove((function(t){var e=i.getItemGraphicEl(t);e&&e.fadeOut((function(){n.remove(e)}),r)})).execute(),this._getSymbolPoint=u,this._data=t},t.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl((function(e,n){var r=t._getSymbolPoint(n);e.setPosition(r),e.markRedraw()}))},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=bA(t),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e,n){function r(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],n=xA(n);for(var i=t.start;i0?n=r[0]:r[1]<0&&(n=r[1]);return n}(i,n),a=r.dim,s=i.dim,l=e.mapDimension(s),u=e.mapDimension(a),c="x"===s||"radius"===s?1:0,h=zi(t.dimensions,(function(t){return e.mapDimension(t)})),d=!1,p=e.getCalculationInfo("stackResultDimension");return LS(e,h[0])&&(d=!0,h[0]=p),LS(e,h[1])&&(d=!0,h[1]=p),{dataDimsForPoint:h,valueStart:o,valueAxisDim:s,baseAxisDim:a,stacked:!!d,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function MA(t,e,n,r){var i=NaN;t.stacked&&(i=n.get(n.getCalculationInfo("stackedOverDimension"),r)),isNaN(i)&&(i=t.valueStart);var o=t.baseDataOffset,a=[];return a[o]=n.get(t.baseDim,r),a[1-o]=i,e.dataToPoint(a)}var IA=Math.min,CA=Math.max;function AA(t,e){return isNaN(t)||isNaN(e)}function TA(t,e,n,r,i,o,a,s,l){for(var u,c,h,d,p,f,g=n,y=0;y=i||g<0)break;if(AA(v,m)){if(l){g+=o;continue}break}if(g===n)t[o>0?"moveTo":"lineTo"](v,m),h=v,d=m;else{var _=v-u,x=m-c;if(_*_+x*x<.5){g+=o;continue}if(a>0){for(var b=g+o,w=e[2*b],S=e[2*b+1];w===v&&S===m&&y=r||AA(w,S))p=v,f=m;else{C=w-u,A=S-c;var L=v-u,D=w-v,P=m-c,R=S-m,O=void 0,E=void 0;if("x"===s){var N=C>0?1:-1;p=v-N*(O=Math.abs(L))*a,f=m,T=v+N*(E=Math.abs(D))*a,k=m}else if("y"===s){var z=A>0?1:-1;p=v,f=m-z*(O=Math.abs(P))*a,T=v,k=m+z*(E=Math.abs(R))*a}else O=Math.sqrt(L*L+P*P),p=v-C*a*(1-(I=(E=Math.sqrt(D*D+R*R))/(E+O))),f=m-A*a*(1-I),k=m+A*a*I,T=IA(T=v+C*a*I,CA(w,v)),k=IA(k,CA(S,m)),T=CA(T,IA(w,v)),f=m-(A=(k=CA(k,IA(S,m)))-m)*O/E,p=IA(p=v-(C=T-v)*O/E,CA(u,v)),f=IA(f,CA(c,m)),T=v+(C=v-(p=CA(p,IA(u,v))))*E/O,k=m+(A=m-(f=CA(f,IA(c,m))))*E/O}t.bezierCurveTo(h,d,p,f,v,m),h=T,d=k}else t.lineTo(v,m)}u=v,c=m,g+=o}return y}var kA=function(){this.smooth=0,this.smoothConstraint=!0},LA=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polyline",n}return a(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new kA},e.prototype.buildPath=function(t,e){var n=e.points,r=0,i=n.length/2;if(e.connectNulls){for(;i>0&&AA(n[2*i-2],n[2*i-1]);i--);for(;r=0){var y=a?(c-r)*g+r:(u-n)*g+n;return a?[t,y]:[y,t]}n=u,r=c;break;case o.C:u=i[l++],c=i[l++],h=i[l++],d=i[l++],p=i[l++],f=i[l++];var v=a?ss(n,u,h,p,t,s):ss(r,c,d,f,t,s);if(v>0)for(var m=0;m=0){y=a?os(r,c,d,f,_):os(n,u,h,p,_);return a?[t,y]:[y,t]}}n=p,r=f}}},e}(ed),DA=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e}(kA),PA=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polygon",n}return a(e,t),e.prototype.getDefaultShape=function(){return new DA},e.prototype.buildPath=function(t,e){var n=e.points,r=e.stackedOnPoints,i=0,o=n.length/2,a=e.smoothMonotone;if(e.connectNulls){for(;o>0&&AA(n[2*o-2],n[2*o-1]);o--);for(;i=0&&t<=1){var r=t*(e.length-1),i=Math.floor(r),o=Math.ceil(r),a=Ns(e[i]),s=Ns(e[o]),l=r-i,u=js([Is(Ls(a[0],s[0],l)),Is(Ls(a[1],s[1],l)),Is(Ls(a[2],s[2],l)),Cs(Ls(a[3],s[3],l))],"rgba");return n?{color:u,leftIndex:i,rightIndex:o,value:r}:u}}((n-r)/(e.coord-r),[t.color,e.color])}}for(var s=0;se){r?i.push(a(r,l,e)):n&&i.push(a(n,l,0),a(n,l,e));break}n&&(i.push(a(n,l,0)),n=null),i.push(l),r=l}}return i}function WA(t,e,n){var r=t.get("showAllSymbol"),i="auto"===r;if(!r||i){var o=n.getAxesByScale("ordinal")[0];if(o&&(!i||!function(t,e){var n=t.getExtent(),r=Math.abs(n[1]-n[0])/t.scale.count();isNaN(r)&&(r=0);for(var i=e.count(),o=Math.max(1,Math.round(i/5)),a=0;ar)return!1;return!0}(o,e))){var a=e.mapDimension(o.dim),s={};return Ni(o.getViewLabels(),(function(t){var e=o.scale.getRawOrdinalNumber(t.tickValue);s[e]=1})),function(t){return!s.hasOwnProperty(e.get(a,t))}}}}function HA(t,e){return[t[2*e],t[2*e+1]]}function UA(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e=0;a--){var s=t.getDimensionInfo(r[a].dimension);if("x"===(i=s&&s.coordDim)||"y"===i){o=r[a];break}}if(o){var l=e.getAxis(i),u=zi(o.stops,(function(t){return{coord:l.toGlobalCoord(l.dataToCoord(t.value)),color:t.color}})),c=u.length,h=o.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),h.reverse());var d=jA(u,"x"===i?n.getWidth():n.getHeight()),p=d.length;if(!p&&c)return u[0].coord<0?h[1]?h[1]:u[c-1].color:h[0]?h[0]:u[0].color;var f=d[0].coord-10,g=d[p-1].coord+10,y=g-f;if(y<.001)return"transparent";Ni(d,(function(t){t.offset=(t.coord-f)/y})),d.push({offset:p?d[p-1].offset:.5,color:h[1]||"transparent"}),d.unshift({offset:p?d[0].offset:.5,color:h[0]||"transparent"});var v=new Df(0,0,0,0,d,!0);return v[i]=f,v[i+"2"]=g,v}}}(o,r,n)||o.getVisual("style")[o.getVisual("drawType")];if(d&&c.type===r.type&&I===this._step){y&&!p?p=this._newPolygon(l,_):p&&!y&&(f.remove(p),p=this._polygon=null),u||this._initOrUpdateEndLabel(t,r,Uy(C));var A=f.getClipPath();if(A)Hf(A,{shape:ZA(this,r,!1,t).shape},t);else f.setClipPath(ZA(this,r,!0,t));x&&h.updateData(o,{isIgnore:w,clipShape:M,disableAnimation:!0,getSymbolPoint:function(t){return[l[2*t],l[2*t+1]]}}),zA(this._stackedOnPoints,_)&&zA(this._points,l)||(g?this._doUpdateAnimation(o,_,r,n,I,v,b):(I&&(_&&(_=GA(_,l,r,I,b)),l=GA(l,null,r,I,b)),d.setShape({points:l}),p&&p.setShape({points:l,stackedOnPoints:_})))}else x&&h.updateData(o,{isIgnore:w,clipShape:M,disableAnimation:!0,getSymbolPoint:function(t){return[l[2*t],l[2*t+1]]}}),g&&this._initSymbolLabelAnimation(o,r,M),I&&(_&&(_=GA(_,l,r,I,b)),l=GA(l,null,r,I,b)),d=this._newPolyline(l),y?p=this._newPolygon(l,_):p&&(f.remove(p),p=this._polygon=null),u||this._initOrUpdateEndLabel(t,r,Uy(C)),f.setClipPath(ZA(this,r,!0,t));var T=t.getModel("emphasis"),k=T.get("focus"),L=T.get("blurScope"),D=T.get("disabled");(d.useStyle(Pi(a.getLineStyle(),{fill:"none",stroke:C,lineJoin:"bevel"})),wp(d,t,"lineStyle"),d.style.lineWidth>0&&"bolder"===t.get(["emphasis","lineStyle","width"]))&&(d.getState("emphasis").style.lineWidth=+d.style.lineWidth+1);kd(d).seriesIndex=t.seriesIndex,mp(d,k,L,D);var P=FA(t.get("smooth")),R=t.get("smoothMonotone");if(d.setShape({smooth:P,smoothMonotone:R,connectNulls:b}),p){var O=o.getCalculationInfo("stackedOnSeries"),E=0;p.useStyle(Pi(s.getAreaStyle(),{fill:C,opacity:.7,lineJoin:"bevel",decal:o.getVisual("style").decal})),O&&(E=FA(O.get("smooth"))),p.setShape({smooth:P,stackedOnSmooth:E,smoothMonotone:R,connectNulls:b}),wp(p,t,"areaStyle"),kd(p).seriesIndex=t.seriesIndex,mp(p,k,L,D)}var N=this._changePolyState;o.eachItemGraphicEl((function(t){t&&(t.onHoverStateChange=N)})),this._polyline.onHoverStateChange=N,this._data=o,this._coordSys=r,this._stackedOnPoints=_,this._points=l,this._step=I,this._valueOrigin=v,t.get("triggerLineEvent")&&(this.packEventData(t,d),p&&this.packEventData(t,p))},e.prototype.packEventData=function(t,e){kd(e).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,e,n,r){var i=t.getData(),o=lc(i,r);if(this._changePolyState("emphasis"),!(o instanceof Array)&&null!=o&&o>=0){var a=i.getLayout("points"),s=i.getItemGraphicEl(o);if(!s){var l=a[2*o],u=a[2*o+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;var c=t.get("zlevel")||0,h=t.get("z")||0;(s=new vA(i,o)).x=l,s.y=u,s.setZ(c,h);var d=s.getSymbolPath().getTextContent();d&&(d.zlevel=c,d.z=h,d.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else tx.prototype.highlight.call(this,t,e,n,r)},e.prototype.downplay=function(t,e,n,r){var i=t.getData(),o=lc(i,r);if(this._changePolyState("normal"),null!=o&&o>=0){var a=i.getItemGraphicEl(o);a&&(a.__temp?(i.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else tx.prototype.downplay.call(this,t,e,n,r)},e.prototype._changePolyState=function(t){var e=this._polygon;Jd(this._polyline,t),e&&Jd(e,t)},e.prototype._newPolyline=function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new LA({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(e),this._polyline=e,e},e.prototype._newPolygon=function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new PA({shape:{points:t,stackedOnPoints:e},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(t,e,n){var r,i,o=e.getBaseAxis(),a=o.inverse;"cartesian2d"===e.type?(r=o.isHorizontal(),i=!1):"polar"===e.type&&(r="angle"===o.dim,i=!0);var s=t.hostModel,l=s.get("animationDuration");Hi(l)&&(l=l(null));var u=s.get("animationDelay")||0,c=Hi(u)?u(null):u;t.eachItemGraphicEl((function(t,o){var s=t;if(s){var h=[t.x,t.y],d=void 0,p=void 0,f=void 0;if(n)if(i){var g=n,y=e.pointToCoord(h);r?(d=g.startAngle,p=g.endAngle,f=-y[1]/180*Math.PI):(d=g.r0,p=g.r,f=y[0])}else{var v=n;r?(d=v.x,p=v.x+v.width,f=t.x):(d=v.y+v.height,p=v.y,f=t.y)}var m=p===d?0:(f-d)/(p-d);a&&(m=1-m);var _=Hi(u)?u(o):l*m+c,x=s.getSymbolPath(),b=x.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:_}),b&&b.animateFrom({style:{opacity:0}},{duration:300,delay:_}),x.disableLabelAnimation=!0}}))},e.prototype._initOrUpdateEndLabel=function(t,e,n){var r=t.getModel("endLabel");if(UA(t)){var i=t.getData(),o=this._polyline,a=i.getLayout("points");if(!a)return o.removeTextContent(),void(this._endLabel=null);var s=this._endLabel;s||((s=this._endLabel=new yd({z2:200})).ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0);var l=function(t){for(var e,n,r=t.length/2;r>0&&(e=t[2*r-2],n=t[2*r-1],isNaN(e)||isNaN(n));r--);return r-1}(a);l>=0&&(Cg(o,Ag(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:l,defaultText:function(t,e,n){return null!=n?yA(i,n):gA(i,t)},enableTextSetter:!0},function(t,e){var n=e.getBaseAxis(),r=n.isHorizontal(),i=n.inverse,o=r?i?"right":"left":"center",a=r?"middle":i?"top":"bottom";return{normal:{align:t.get("align")||o,verticalAlign:t.get("verticalAlign")||a}}}(r,e)),o.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,e,n,r,i,o,a){var s=this._endLabel,l=this._polyline;if(s){t<1&&null==r.originalX&&(r.originalX=s.x,r.originalY=s.y);var u=n.getLayout("points"),c=n.hostModel,h=c.get("connectNulls"),d=o.get("precision"),p=o.get("distance")||0,f=a.getBaseAxis(),g=f.isHorizontal(),y=f.inverse,v=e.shape,m=y?g?v.x:v.y+v.height:g?v.x+v.width:v.y,_=(g?p:0)*(y?-1:1),x=(g?0:-p)*(y?-1:1),b=g?"x":"y",w=function(t,e,n){for(var r,i,o=t.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u=e||r>=e&&i<=e){l=u;break}s=u,r=i}else r=i;return{range:[s,l],t:(e-r)/(i-r)}}(u,m,b),S=w.range,M=S[1]-S[0],I=void 0;if(M>=1){if(M>1&&!h){var C=HA(u,S[0]);s.attr({x:C[0]+_,y:C[1]+x}),i&&(I=c.getRawValue(S[0]))}else{(C=l.getPointOn(m,b))&&s.attr({x:C[0]+_,y:C[1]+x});var A=c.getRawValue(S[0]),T=c.getRawValue(S[1]);i&&(I=mc(n,d,A,T,w.t))}r.lastFrameIndex=S[0]}else{var k=1===t||r.lastFrameIndex>0?S[0]:0;C=HA(u,k);i&&(I=c.getRawValue(k)),s.attr({x:C[0]+_,y:C[1]+x})}if(i){var L=Eg(s);"function"==typeof L.setLabelText&&L.setLabelText(I)}}},e.prototype._doUpdateAnimation=function(t,e,n,r,i,o,a){var s=this._polyline,l=this._polygon,u=t.hostModel,c=function(t,e,n,r,i,o,a){for(var s=function(t,e){var n=[];return e.diff(t).add((function(t){n.push({cmd:"+",idx:t})})).update((function(t,e){n.push({cmd:"=",idx:e,idx1:t})})).remove((function(t){n.push({cmd:"-",idx:t})})).execute(),n}(t,e),l=[],u=[],c=[],h=[],d=[],p=[],f=[],g=SA(i,e,a),y=t.getLayout("points")||[],v=e.getLayout("points")||[],m=0;m3e3||l&&VA(d,f)>3e3)return s.stopAnimation(),s.setShape({points:p}),void(l&&(l.stopAnimation(),l.setShape({points:p,stackedOnPoints:f})));s.shape.__points=c.current,s.shape.points=h;var g={shape:{points:p}};c.current!==h&&(g.shape.__points=c.next),s.stopAnimation(),Wf(s,g,u),l&&(l.setShape({points:h,stackedOnPoints:d}),l.stopAnimation(),Wf(l,{shape:{stackedOnPoints:f}},u),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var y=[],v=c.status,m=0;me&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n10&&"cartesian2d"===o.type&&i){var s=o.getBaseAxis(),l=o.getOtherAxis(s),u=s.getExtent(),c=n.getDevicePixelRatio(),h=Math.abs(u[1]-u[0])*(c||1),d=Math.round(a/h);if(isFinite(d)&&d>1){"lttb"===i?t.setData(r.lttbDownSample(r.mapDimension(l.dim),1/d)):"minmax"===i&&t.setData(r.minmaxDownSample(r.mapDimension(l.dim),1/d));var p=void 0;Ui(i)?p=qA[i]:Hi(i)&&(p=i),p&&t.setData(r.downSample(r.mapDimension(l.dim),1/d,p,KA))}}}}}var QA=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.prototype.getInitialData=function(t,e){return PS(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,e,n){var r=this.coordinateSystem;if(r&&r.clampData){var i=r.clampData(t),o=r.dataToPoint(i);if(n)Ni(r.getAxes(),(function(t,n){if("category"===t.type&&null!=e){var r=t.getTicksCoords(),a=t.getTickModel().get("alignWithLabel"),s=i[n],l="x1"===e[n]||"y1"===e[n];if(l&&!a&&(s+=1),r.length<2)return;if(2===r.length)return void(o[n]=t.toGlobalCoord(t.getExtent()[l?1:0]));for(var u=void 0,c=void 0,h=1,d=0;ds){c=(p+u)/2;break}1===d&&(h=f-r[0].tickValue)}null==c&&(u?u&&(c=r[r.length-1].coord):c=r[0].coord),o[n]=t.toGlobalCoord(c)}}));else{var a=this.getData(),s=a.getLayout("offset"),l=a.getLayout("size"),u=r.getBaseAxis().isHorizontal()?0:1;o[u]+=s+l/2}return o}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(j_);j_.registerClass(QA);var JA=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.prototype.getInitialData=function(){return PS(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t},e.prototype.brushSelector=function(t,e,n){return n.rect(e.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=Jg(QA.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}),e}(QA),tT=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},eT=function(t){function e(e){var n=t.call(this,e)||this;return n.type="sausage",n}return a(e,t),e.prototype.getDefaultShape=function(){return new tT},e.prototype.buildPath=function(t,e){var n=e.cx,r=e.cy,i=Math.max(e.r0||0,0),o=Math.max(e.r,0),a=.5*(o-i),s=i+a,l=e.startAngle,u=e.endAngle,c=e.clockwise,h=2*Math.PI,d=c?u-lo)return!0;o=u}return!1},e.prototype._isOrderDifferentInView=function(t,e){for(var n=e.scale,r=n.getExtent(),i=Math.max(0,r[0]),o=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=o;++i)if(t.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},e.prototype._updateSortWithinSameData=function(t,e,n,r){if(this._isOrderChangedWithinSameData(t,e,n)){var i=this._dataSort(t,n,e);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:i}))}},e.prototype._dispatchInitSort=function(t,e,n){var r=e.baseAxis,i=this._dataSort(t,r,(function(n){return t.get(t.mapDimension(e.otherAxis.dim),n)}));n.dispatchAction({type:"changeAxisOrder",componentType:r.dim+"Axis",isInitSort:!0,axisId:r.index,sortInfo:i})},e.prototype.remove=function(t,e){this._clear(this._model),this._removeOnRenderedListener(e)},e.prototype.dispose=function(t,e){this._removeOnRenderedListener(e)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var e=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(e){Xf(e,t,kd(e).dataIndex)}))):e.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(tx),lT={cartesian2d:function(t,e){var n=e.width<0?-1:1,r=e.height<0?-1:1;n<0&&(e.x+=e.width,e.width=-e.width),r<0&&(e.y+=e.height,e.height=-e.height);var i=t.x+t.width,o=t.y+t.height,a=oT(e.x,t.x),s=aT(e.x+e.width,i),l=oT(e.y,t.y),u=aT(e.y+e.height,o),c=si?s:a,e.y=h&&l>o?u:l,e.width=c?0:s-a,e.height=h?0:u-l,n<0&&(e.x+=e.width,e.width=-e.width),r<0&&(e.y+=e.height,e.height=-e.height),c||h},polar:function(t,e){var n=e.r0<=e.r?1:-1;if(n<0){var r=e.r;e.r=e.r0,e.r0=r}var i=aT(e.r,t.r),o=oT(e.r0,t.r0);e.r=i,e.r0=o;var a=i-o<0;if(n<0){r=e.r;e.r=e.r0,e.r0=r}return a}},uT={cartesian2d:function(t,e,n,r,i,o,a,s,l){var u=new pd({shape:Di({},r),z2:1});(u.__dataIndex=n,u.name="item",o)&&(u.shape[i?"height":"width"]=0);return u},polar:function(t,e,n,r,i,o,a,s,l){var u=!i&&l?eT:df,c=new u({shape:r,z2:1});c.name="item";var h,d,p=yT(i);if(c.calculateTextPosition=(h=p,d=({isRoundCap:u===eT}||{}).isRoundCap,function(t,e,n){var r=e.position;if(!r||r instanceof Array)return uu(t,e,n);var i=h(r),o=null!=e.distance?e.distance:5,a=this.shape,s=a.cx,l=a.cy,u=a.r,c=a.r0,p=(u+c)/2,f=a.startAngle,g=a.endAngle,y=(f+g)/2,v=d?Math.abs(u-c)/2:0,m=Math.cos,_=Math.sin,x=s+u*m(f),b=l+u*_(f),w="left",S="top";switch(i){case"startArc":x=s+(c-o)*m(y),b=l+(c-o)*_(y),w="center",S="top";break;case"insideStartArc":x=s+(c+o)*m(y),b=l+(c+o)*_(y),w="center",S="bottom";break;case"startAngle":x=s+p*m(f)+nT(f,o+v,!1),b=l+p*_(f)+rT(f,o+v,!1),w="right",S="middle";break;case"insideStartAngle":x=s+p*m(f)+nT(f,-o+v,!1),b=l+p*_(f)+rT(f,-o+v,!1),w="left",S="middle";break;case"middle":x=s+p*m(y),b=l+p*_(y),w="center",S="middle";break;case"endArc":x=s+(u+o)*m(y),b=l+(u+o)*_(y),w="center",S="bottom";break;case"insideEndArc":x=s+(u-o)*m(y),b=l+(u-o)*_(y),w="center",S="top";break;case"endAngle":x=s+p*m(g)+nT(g,o+v,!0),b=l+p*_(g)+rT(g,o+v,!0),w="left",S="middle";break;case"insideEndAngle":x=s+p*m(g)+nT(g,-o+v,!0),b=l+p*_(g)+rT(g,-o+v,!0),w="right",S="middle";break;default:return uu(t,e,n)}return(t=t||{}).x=x,t.y=b,t.align=w,t.verticalAlign=S,t}),o){var f=i?"r":"endAngle",g={};c.shape[f]=i?r.r0:r.startAngle,g[f]=r[f],(s?Wf:Hf)(c,{shape:g},o)}return c}};function cT(t,e,n,r,i,o,a,s){var l,u;o?(u={x:r.x,width:r.width},l={y:r.y,height:r.height}):(u={y:r.y,height:r.height},l={x:r.x,width:r.width}),s||(a?Wf:Hf)(n,{shape:l},e,i,null),(a?Wf:Hf)(n,{shape:u},e?t.baseAxis.model:null,i)}function hT(t,e){for(var n=0;n0?1:-1,a=r.height>0?1:-1;return{x:r.x+o*i/2,y:r.y+a*i/2,width:r.width-o*i,height:r.height-a*i}},polar:function(t,e,n){var r=t.getItemLayout(e);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function yT(t){return function(t){var e=t?"Arc":"Angle";return function(t){switch(t){case"start":case"insideStart":case"end":case"insideEnd":return t+e;default:return t}}}(t)}function vT(t,e,n,r,i,o,a,s){var l=e.getItemVisual(n,"style");if(s){if(!o.get("roundCap")){var u=t.shape;Di(u,iT(r.getModel("itemStyle"),u,!0)),t.setShape(u)}}else{var c=r.get(["itemStyle","borderRadius"])||0;t.setShape("r",c)}t.useStyle(l);var h=r.getShallow("cursor");h&&t.attr("cursor",h);var d=s?a?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":a?i.height>=0?"bottom":"top":i.width>=0?"right":"left",p=Ag(r);Cg(t,p,{labelFetcher:o,labelDataIndex:n,defaultText:gA(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:d});var f=t.getTextContent();if(s&&f){var g=r.get(["label","position"]);t.textConfig.inside="middle"===g||null,function(t,e,n,r){if(Yi(r))t.setTextConfig({rotation:r});else if(Wi(e))t.setTextConfig({rotation:0});else{var i,o=t.shape,a=o.clockwise?o.startAngle:o.endAngle,s=o.clockwise?o.endAngle:o.startAngle,l=(a+s)/2,u=n(e);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":i=l;break;case"startAngle":case"insideStartAngle":i=a;break;case"endAngle":case"insideEndAngle":i=s;break;default:return void t.setTextConfig({rotation:0})}var c=1.5*Math.PI-i;"middle"===u&&c>Math.PI/2&&c<1.5*Math.PI&&(c-=Math.PI),t.setTextConfig({rotation:c})}}(t,"outside"===g?d:g,yT(a),r.get(["label","rotate"]))}Ng(f,p,o.getRawValue(n),(function(t){return yA(e,t)}));var y=r.getModel(["emphasis"]);mp(t,y.get("focus"),y.get("blurScope"),y.get("disabled")),wp(t,r),function(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}(i)&&(t.style.fill="none",t.style.stroke="none",Ni(t.states,(function(t){t.style&&(t.style.fill=t.style.stroke="none")})))}var mT=function(){},_T=function(t){function e(e){var n=t.call(this,e)||this;return n.type="largeBar",n}return a(e,t),e.prototype.getDefaultShape=function(){return new mT},e.prototype.buildPath=function(t,e){for(var n=e.points,r=this.baseDimIdx,i=1-this.baseDimIdx,o=[],a=[],s=this.barWidth,l=0;l=s[0]&&e<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return a[c]}return-1}(this,t.offsetX,t.offsetY);kd(this).dataIndex=e>=0?e:null}),30,!1);function wT(t,e,n){if(NA(n,"cartesian2d")){var r=e,i=n.getArea();return{x:t?r.x:i.x,y:t?i.y:r.y,width:t?r.width:i.width,height:t?i.height:r.height}}var o=e;return{cx:(i=n.getArea()).cx,cy:i.cy,r0:t?i.r0:o.r0,r:t?i.r:o.r,startAngle:t?o.startAngle:0,endAngle:t?o.endAngle:2*Math.PI}}var ST=2*Math.PI,MT=Math.PI/180;function IT(t,e){return Qy(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function CT(t,e){var n=IT(t,e),r=t.get("center"),i=t.get("radius");Wi(i)||(i=[0,i]);var o,a,s=Au(n.width,e.getWidth()),l=Au(n.height,e.getHeight()),u=Math.min(s,l),c=Au(i[0],u/2),h=Au(i[1],u/2),d=t.coordinateSystem;if(d){var p=d.dataToPoint(r);o=p[0]||0,a=p[1]||0}else Wi(r)||(r=[r,r]),o=Au(r[0],s)+n.x,a=Au(r[1],l)+n.y;return{cx:o,cy:a,r0:c,r:h}}function AT(t,e,n){e.eachSeriesByType(t,(function(t){var e=t.getData(),r=e.mapDimension("value"),i=IT(t,n),o=CT(t,n),a=o.cx,s=o.cy,l=o.r,u=o.r0,c=-t.get("startAngle")*MT,h=t.get("endAngle"),d=t.get("padAngle")*MT;h="auto"===h?c-ST:-h*MT;var p=t.get("minAngle")*MT+d,f=0;e.each(r,(function(t){!isNaN(t)&&f++}));var g=e.getSum(r),y=Math.PI/(g||f)*2,v=t.get("clockwise"),m=t.get("roseType"),_=t.get("stillShowZeroSum"),x=e.getDataExtent(r);x[0]=0;var b=v?1:-1,w=[c,h],S=b*d/2;Oh(w,!v),c=w[0],h=w[1];var M=TT(t);M.startAngle=c,M.endAngle=h,M.clockwise=v;var I=Math.abs(h-c),C=I,A=0,T=c;if(e.setLayout({viewRect:i,r:l}),e.each(r,(function(t,n){var r;if(isNaN(t))e.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:v,cx:a,cy:s,r0:u,r:m?NaN:l});else{(r="area"!==m?0===g&&_?y:t*y:I/f)r?c=o=T+b*r/2:(o=T+S,c=i-S),e.setItemLayout(n,{angle:r,startAngle:o,endAngle:c,clockwise:v,cx:a,cy:s,r0:u,r:m?Cu(t,x,[u,l]):l}),T=i}})),Cn?a:o,c=Math.abs(l.label.y-n);if(c>=u.maxY){var h=l.label.x-e-l.len2*i,d=r+l.len,f=Math.abs(h)t.unconstrainedWidth?null:p:null;r.setStyle("width",f)}var g=r.getBoundingRect();o.width=g.width;var y=(r.style.margin||0)+2.1;o.height=g.height+y,o.y-=(o.height-h)/2}}}function RT(t){return"center"===t.position}function OT(t){var e,n,r=t.getData(),i=[],o=!1,a=(t.get("minShowLabelAngle")||0)*LT,s=r.getLayout("viewRect"),l=r.getLayout("r"),u=s.width,c=s.x,h=s.y,d=s.height;function p(t){t.ignore=!0}r.each((function(t){var s=r.getItemGraphicEl(t),h=s.shape,d=s.getTextContent(),f=s.getTextGuideLine(),g=r.getItemModel(t),y=g.getModel("label"),v=y.get("position")||g.get(["emphasis","label","position"]),m=y.get("distanceToLabelLine"),_=y.get("alignTo"),x=Au(y.get("edgeDistance"),u),b=y.get("bleedMargin"),w=g.getModel("labelLine"),S=w.get("length");S=Au(S,u);var M=w.get("length2");if(M=Au(M,u),Math.abs(h.endAngle-h.startAngle)0?"right":"left":L>0?"left":"right"}var B=Math.PI,V=0,F=y.get("rotate");if(Yi(F))V=F*(B/180);else if("center"===v)V=0;else if("radial"===F||!0===F){V=L<0?-k+B:-k}else if("tangential"===F&&"outside"!==v&&"outer"!==v){var G=Math.atan2(L,D);G<0&&(G=2*B+G),D>0&&(G=B+G),V=G-B}if(o=!!V,d.x=I,d.y=C,d.rotation=V,d.setStyle({verticalAlign:"middle"}),P){d.setStyle({align:T});var j=d.states.select;j&&(j.x+=d.x,j.y+=d.y)}else{var W=d.getBoundingRect().clone();W.applyTransform(d.getComputedTransform());var H=(d.style.margin||0)+2.1;W.y-=H/2,W.height+=H,i.push({label:d,labelLine:f,position:v,len:S,len2:M,minTurnAngle:w.get("minTurnAngle"),maxSurfaceAngle:w.get("maxSurfaceAngle"),surfaceNormal:new va(L,D),linePoints:A,textAlign:T,labelDistance:m,labelAlignTo:_,edgeDistance:x,bleedMargin:b,rect:W,unconstrainedWidth:W.width,labelStyleWidth:d.style.width})}s.setTextConfig({inside:P})}})),!o&&t.get("avoidLabelOverlap")&&function(t,e,n,r,i,o,a,s){for(var l=[],u=[],c=Number.MAX_VALUE,h=-Number.MAX_VALUE,d=0;d0){for(var l=o.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u=n.r0}},e.type="pie",e}(tx);function zT(t,e,n){e=Wi(e)&&{coordDimensions:e}||Di({encodeDefine:t.getEncode()},e);var r=t.getSource(),i=MS(r,e).dimensions,o=new SS(i,t);return o.initData(r,n),o}var BT=function(){function t(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return t.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},t.prototype.containName=function(t){return this._getRawData().indexOfName(t)>=0},t.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},t.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)},t}(),VT=uc(),FT=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new BT(Gi(this.getData,this),Gi(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return zT(this,{coordDimensions:["value"],encodeDefaulter:ji(Sv,this)})},e.prototype.getDataParams=function(e){var n=this.getData(),r=VT(n),i=r.seats;if(!i){var o=[];n.each(n.mapDimension("value"),(function(t){o.push(t)})),i=r.seats=function(t,e){var n=Bi(t,(function(t,e){return t+(isNaN(e)?0:e)}),0);if(0===n)return[];for(var r=Math.pow(10,e),i=zi(t,(function(t){return(isNaN(t)?0:t)/n*r*100})),o=100*r,a=zi(i,(function(t){return Math.floor(t)})),s=Bi(a,(function(t,e){return t+e}),0),l=zi(i,(function(t,e){return t-a[e]}));su&&(u=l[h],c=h);++a[c],l[c]=0,++s}return zi(a,(function(t){return t/r}))}(o,n.hostModel.get("percentPrecision"))}var a=t.prototype.getDataParams.call(this,e);return a.percent=i[e]||0,a.$vars.push("percent"),a},e.prototype._defaultLabelLine=function(t){Qu(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.type="series.pie",e.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"},e}(j_);var GT=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return a(e,t),e.prototype.getInitialData=function(t,e){return PS(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},e.prototype.brushSelector=function(t,e,n){return n.point(e.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(j_),jT=function(){},WT=function(t){function e(e){var n=t.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return a(e,t),e.prototype.getDefaultShape=function(){return new jT},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,e){var n,r=e.points,i=e.size,o=this.symbolProxy,a=o.shape,s=t.getContext?t.getContext():t,l=s&&i[0]<4,u=this.softClipShape;if(l)this._ctx=s;else{for(this._ctx=null,n=this._off;n=0;s--){var l=2*s,u=r[l]-o/2,c=r[l+1]-a/2;if(t>=u&&e>=c&&t<=u+o&&e<=c+a)return s}return-1},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),r=this.getBoundingRect();return t=n[0],e=n[1],r.contain(t,e)?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var e=this.shape,n=e.points,r=e.size,i=r[0],o=r[1],a=1/0,s=1/0,l=-1/0,u=-1/0,c=0;c=0&&(l.dataIndex=n+(t.startIndex||0))}))},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),UT=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.prototype.render=function(t,e,n){var r=t.getData();this._updateSymbolDraw(r,t).updateData(r,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,n){var r=t.getData();this._updateSymbolDraw(r,t).incrementalPrepareUpdate(r),this._finished=!1},e.prototype.incrementalRender=function(t,e,n){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},e.prototype.updateTransform=function(t,e,n){var r=t.getData();if(this.group.dirty(),!this._finished||r.count()>1e4)return{update:!0};var i=XA("").reset(t,e,n);i.progress&&i.progress({start:0,end:r.count(),count:r.count()},r),this._symbolDraw.updateLayout(r)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){if(t.get("clip",!0)){var e=t.coordinateSystem;return e&&e.getArea&&e.getArea(.1)}},e.prototype._updateSymbolDraw=function(t,e){var n=this._symbolDraw,r=e.pipelineContext.large;return n&&r===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=r?new HT:new wA,this._isLargeDraw=r,this.group.removeAll()),this.group.add(n.group),n},e.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(tx),ZT=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.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"},e}(ov),YT=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",pc).models[0]},e.type="cartesian2dAxis",e}(ov);Oi(YT,VM);var XT={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,showMinLine:!0,showMaxLine:!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)"]}}},qT=ki({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},XT),KT=ki({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}}},XT),$T={category:qT,value:KT,time:ki({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},KT),log:Pi({logBase:10},KT)},QT={value:1,category:1,time:1,log:1};function JT(t,e,n,r){Ni(QT,(function(i,o){var s=ki(ki({},$T[o],!0),r,!0),l=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e+"Axis."+o,n}return a(n,t),n.prototype.mergeDefaultAndTheme=function(t,e){var n=tv(this),r=n?nv(t):{};ki(t,e.getTheme().get(o+"Axis")),ki(t,this.getDefaultOption()),t.type=tk(t),n&&ev(t,r,n)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=ES.createByAxisModel(this))},n.prototype.getCategories=function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.type=e+"Axis."+o,n.defaultOption=s,n}(n);t.registerComponentModel(l)})),t.registerSubTypeDefaulter(e+"Axis",tk)}function tk(t){return t.type||(t.data?"category":"value")}var ek=function(){function t(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return t.prototype.getAxis=function(t){return this._axes[t]},t.prototype.getAxes=function(){return zi(this._dimList,(function(t){return this._axes[t]}),this)},t.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),Vi(this.getAxes(),(function(e){return e.scale.type===t}))},t.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},t}(),nk=["x","y"];function rk(t){return"interval"===t.type||"time"===t.type}var ik=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=nk,e}return a(e,t),e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,e=this.getAxis("y").scale;if(rk(t)&&rk(e)){var n=t.getExtent(),r=e.getExtent(),i=this.dataToPoint([n[0],r[0]]),o=this.dataToPoint([n[1],r[1]]),a=n[1]-n[0],s=r[1]-r[0];if(a&&s){var l=(o[0]-i[0])/a,u=(o[1]-i[1])/s,c=i[0]-n[0]*l,h=i[1]-r[0]*u,d=this._transform=[l,0,0,u,c,h];this._invTransform=ya([],d)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var e=this.getAxis("x"),n=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,e){var n=this.dataToPoint(t),r=this.dataToPoint(e),i=this.getArea(),o=new Ca(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(o)},e.prototype.dataToPoint=function(t,e,n){n=n||[];var r=t[0],i=t[1];if(this._transform&&null!=r&&isFinite(r)&&null!=i&&isFinite(i))return Eo(n,t,this._transform);var o=this.getAxis("x"),a=this.getAxis("y");return n[0]=o.toGlobalCoord(o.dataToCoord(r,e)),n[1]=a.toGlobalCoord(a.dataToCoord(i,e)),n},e.prototype.clampData=function(t,e){var n=this.getAxis("x").scale,r=this.getAxis("y").scale,i=n.getExtent(),o=r.getExtent(),a=n.parse(t[0]),s=r.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(i[0],i[1]),a),Math.max(i[0],i[1])),e[1]=Math.min(Math.max(Math.min(o[0],o[1]),s),Math.max(o[0],o[1])),e},e.prototype.pointToData=function(t,e){var n=[];if(this._invTransform)return Eo(n,t,this._invTransform);var r=this.getAxis("x"),i=this.getAxis("y");return n[0]=r.coordToData(r.toLocalCoord(t[0]),e),n[1]=i.coordToData(i.toLocalCoord(t[1]),e),n},e.prototype.getOtherAxis=function(t){return this.getAxis("x"===t.dim?"y":"x")},e.prototype.getArea=function(t){t=t||0;var e=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),r=Math.min(e[0],e[1])-t,i=Math.min(n[0],n[1])-t,o=Math.max(e[0],e[1])-r+t,a=Math.max(n[0],n[1])-i+t;return new Ca(r,i,o,a)},e}(ek),ok=function(t){function e(e,n,r,i,o){var a=t.call(this,e,n,r)||this;return a.index=0,a.type=i||"value",a.position=o||"bottom",a}return a(e,t),e.prototype.isHorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},e.prototype.getGlobalExtent=function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},e.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},e.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(cI);function ak(t,e,n){n=n||{};var r=t.coordinateSystem,i=e.axis,o={},a=i.getAxesOnZeroOf()[0],s=i.position,l=a?"onZero":s,u=i.dim,c=r.getRect(),h=[c.x,c.x+c.width,c.y,c.y+c.height],d={left:0,right:1,top:0,bottom:1,onZero:2},p=e.get("offset")||0,f="x"===u?[h[2]-p,h[3]+p]:[h[0]-p,h[1]+p];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));f[d.onZero]=Math.max(Math.min(g,f[1]),f[0])}o.position=["y"===u?f[d[l]]:h[0],"x"===u?f[d[l]]:h[3]],o.rotation=Math.PI/2*("x"===u?0:1);o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],o.labelOffset=a?f[d[s]]-f[d.onZero]:0,e.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),to(n.labelInside,e.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var y=e.get(["axisLabel","rotate"]);return o.labelRotate="top"===l?-y:y,o.z2=1,o}function sk(t){return"cartesian2d"===t.get("coordinateSystem")}function lk(t){var e={xAxisModel:null,yAxisModel:null};return Ni(e,(function(n,r){var i=r.replace(/Model$/,""),o=t.getReferringComponents(i,pc).models[0];e[r]=o})),e}var uk=Math.log;function ck(t,e,n){var r=YS.prototype,i=r.getTicks.call(n),o=r.getTicks.call(n,!0),a=i.length-1,s=r.getInterval.call(n),l=LM(t,e),u=l.extent,c=l.fixMin,h=l.fixMax;if("log"===t.type){var d=uk(t.base);u=[uk(u[0])/d,uk(u[1])/d]}t.setExtent(u[0],u[1]),t.calcNiceExtent({splitNumber:a,fixMin:c,fixMax:h});var p=r.getExtent.call(t);c&&(u[0]=p[0]),h&&(u[1]=p[1]);var f=r.getInterval.call(t),g=u[0],y=u[1];if(c&&h)f=(y-g)/a;else if(c)for(y=u[0]+f*a;yu[0]&&isFinite(g)&&isFinite(u[0]);)f=VS(f),g=u[1]-f*a;else{t.getTicks().length-1>a&&(f=VS(f));var v=f*a;(g=Tu((y=Math.ceil(u[1]/f)*f)-v))<0&&u[0]>=0?(g=0,y=Tu(v)):y>0&&u[1]<=0&&(y=0,g=-Tu(v))}var m=(i[0].value-o[0].value)/s,_=(i[a].value-o[a].value)/s;r.setExtent.call(t,g+f*m,y+f*_),r.setInterval.call(t,f),(m||_)&&r.setNiceExtent.call(t,g+f,y-f)}var hk=function(){function t(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=nk,this._initCartesian(t,e,n),this.model=t}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(t,e){var n=this._axesMap;function r(t){var e,n=Fi(t),r=n.length;if(r){for(var i=[],o=r-1;o>=0;o--){var a=t[+n[o]],s=a.model,l=a.scale;zS(l)&&s.get("alignTicks")&&null==s.get("interval")?i.push(a):(DM(l,s),zS(l)&&(e=a))}i.length&&(e||DM((e=i.pop()).scale,e.model),Ni(i,(function(t){ck(t.scale,t.model,e.scale)})))}}this._updateScale(t,this.model),r(n.x),r(n.y);var i={};Ni(n.x,(function(t){pk(n,"y",t,i)})),Ni(n.y,(function(t){pk(n,"x",t,i)})),this.resize(this.model,e)},t.prototype.resize=function(t,e,n){var r=t.getBoxLayoutParams(),i=!n&&t.get("containLabel"),o=Qy(r,{width:e.getWidth(),height:e.getHeight()});this._rect=o;var a=this._axesList;function s(){Ni(a,(function(t){var e=t.isHorizontal(),n=e?[0,o.width]:[0,o.height],r=t.inverse?1:0;t.setExtent(n[r],n[1-r]),function(t,e){var n=t.getExtent(),r=n[0]+n[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return r-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return r-t+e}}(t,e?o.x:o.y)}))}s(),i&&(Ni(a,(function(t){if(!t.model.get(["axisLabel","inside"])){var e=function(t){var e=t.model,n=t.scale;if(e.get(["axisLabel","show"])&&!n.isBlank()){var r,i,o=n.getExtent();i=n instanceof US?n.count():(r=n.getTicks()).length;var a,s=t.getLabelModel(),l=RM(t),u=1;i>40&&(u=Math.ceil(i/40));for(var c=0;c0&&r>0||n<0&&r<0)}(t)}var gk=Math.PI,yk=function(){function t(t,e){this.group=new xu,this.opt=e,this.axisModel=t,Pi(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new xu({x:e.position[0],y:e.position[1],rotation:e.rotation});n.updateTransform(),this._transformGroup=n}return t.prototype.hasBuilder=function(t){return!!vk[t]},t.prototype.add=function(t){vk[t](this.opt,this.axisModel,this.group,this._transformGroup)},t.prototype.getGroup=function(){return this.group},t.innerTextLayout=function(t,e,n){var r,i,o=Ou(e-t);return Eu(o)?(i=n>0?"top":"bottom",r="center"):Eu(o-gk)?(i=n>0?"bottom":"top",r="center"):(i="middle",r=o>0&&o0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:r,textVerticalAlign:i}},t.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},t.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},t}(),vk={axisLine:function(t,e,n,r){var i=e.get(["axisLine","show"]);if("auto"===i&&t.handleAutoShown&&(i=t.handleAutoShown("axisLine")),i){var o=e.axis.getExtent(),a=r.transform,s=[o[0],0],l=[o[1],0],u=s[0]>l[0];a&&(Eo(s,s,a),Eo(l,l,a));var c=Di({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),h=new wf({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1});sg(h.shape,h.style.lineWidth),h.anid="line",n.add(h);var d=e.get(["axisLine","symbol"]);if(null!=d){var p=e.get(["axisLine","symbolSize"]);Ui(d)&&(d=[d,d]),(Ui(p)||Yi(p))&&(p=[p,p]);var f=gb(e.get(["axisLine","symbolOffset"])||0,p),g=p[0],y=p[1];Ni([{rotate:t.rotation+Math.PI/2,offset:f[0],r:0},{rotate:t.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(e,r){if("none"!==d[r]&&null!=d[r]){var i=pb(d[r],-g/2,-y/2,g,y,c.stroke,!0),o=e.r+e.offset,a=u?l:s;i.attr({rotation:e.rotate,x:a[0]+o*Math.cos(t.rotation),y:a[1]-o*Math.sin(t.rotation),silent:!0,z2:11}),n.add(i)}}))}}},axisTickLabel:function(t,e,n,r){var i=function(t,e,n,r){var i=n.axis,o=n.getModel("axisTick"),a=o.get("show");"auto"===a&&r.handleAutoShown&&(a=r.handleAutoShown("axisTick"));if(!a||i.scale.isBlank())return;for(var s=o.getModel("lineStyle"),l=r.tickDirection*o.get("length"),u=bk(i.getTicksCoords(),e.transform,l,Pi(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;ch[1]?-1:1,p=["start"===s?h[0]-d*c:"end"===s?h[1]+d*c:(h[0]+h[1])/2,xk(s)?t.labelOffset+l*c:0],f=e.get("nameRotate");null!=f&&(f=f*gk/180),xk(s)?o=yk.innerTextLayout(t.rotation,null!=f?f:t.rotation,l):(o=function(t,e,n,r){var i,o,a=Ou(n-t),s=r[0]>r[1],l="start"===e&&!s||"start"!==e&&s;Eu(a-gk/2)?(o=l?"bottom":"top",i="center"):Eu(a-1.5*gk)?(o=l?"top":"bottom",i="center"):(o="middle",i=a<1.5*gk&&a>gk/2?l?"left":"right":l?"right":"left");return{rotation:a,textAlign:i,textVerticalAlign:o}}(t.rotation,s,f||0,h),null!=(a=t.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(o.rotation)),!isFinite(a)&&(a=null)));var g=u.getFont(),y=e.get("nameTruncate",!0)||{},v=y.ellipsis,m=to(t.nameTruncateMaxWidth,y.maxWidth,a),_=new yd({x:p[0],y:p[1],rotation:o.rotation,silent:yk.isLabelSilent(e),style:Tg(u,{text:i,font:g,overflow:"truncate",width:m,ellipsis:v,fill:u.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:u.get("align")||o.textAlign,verticalAlign:u.get("verticalAlign")||o.textVerticalAlign}),z2:1});if(_g({el:_,componentModel:e,itemName:i}),_.__fullText=i,_.anid="name",e.get("triggerEvent")){var x=yk.makeAxisEventDataBase(e);x.targetType="axisName",x.name=i,kd(_).eventData=x}r.add(_),_.updateTransform(),n.add(_),_.decomposeTransform()}}};function mk(t){t&&(t.ignore=!0)}function _k(t,e){var n=t&&t.getBoundingRect().clone(),r=e&&e.getBoundingRect().clone();if(n&&r){var i=ca([]);return fa(i,i,-t.rotation),n.applyTransform(da([],i,t.getLocalTransform())),r.applyTransform(da([],i,e.getLocalTransform())),n.intersect(r)}}function xk(t){return"middle"===t||"center"===t}function bk(t,e,n,r,i){for(var o=[],a=[],s=[],l=0;l=0||t===e}function Mk(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[Ck(t)]}function Ik(t){return!!t.get(["handle","show"])}function Ck(t){return t.type+"||"+t.id}var Ak={},Tk=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.prototype.render=function(e,n,r,i){this.axisPointerClass&&function(t){var e=Mk(t);if(e){var n=e.axisPointerModel,r=e.axis.scale,i=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=r.parse(a));var s=Ik(n);null==o&&(i.status=s?"show":"hide");var l=r.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a0&&!h.min?h.min=0:null!=h.min&&h.min<0&&!h.max&&(h.max=0);var d=a;null!=h.color&&(d=Pi({color:h.color},a));var p=ki(Ti(h),{boundaryGap:t,splitNumber:e,scale:n,axisLine:r,axisTick:i,axisLabel:o,name:h.text,showName:s,nameLocation:"end",nameGap:u,nameTextStyle:d,triggerEvent:c},!1);if(Ui(l)){var f=p.name;p.name=l.replace("{value}",null!=f?f:"")}else Hi(l)&&(p.name=l(p.name,p));var g=new Kg(p,null,this.ecModel);return Oi(g,VM.prototype),g.mainType="radar",g.componentIndex=this.componentIndex,g}),this);this._indicatorModels=h},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.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:ki({lineStyle:{color:"#bbb"}},Yk.axisLine),axisLabel:Xk(Yk.axisLabel,!1),axisTick:Xk(Yk.axisTick,!1),splitLine:Xk(Yk.splitLine,!0),splitArea:Xk(Yk.splitArea,!0),indicator:[]},e}(ov),Kk=["axisLine","axisTickLabel","axisName"],$k=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.prototype.render=function(t,e,n){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var e=t.coordinateSystem;Ni(zi(e.getIndicatorAxes(),(function(t){var n=t.model.get("showName")?t.name:"";return new yk(t.model,{axisName:n,position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})})),(function(t){Ni(Kk,t.add,t),this.group.add(t.getGroup())}),this)},e.prototype._buildSplitLineAndArea=function(t){var e=t.coordinateSystem,n=e.getIndicatorAxes();if(n.length){var r=t.get("shape"),i=t.getModel("splitLine"),o=t.getModel("splitArea"),a=i.getModel("lineStyle"),s=o.getModel("areaStyle"),l=i.get("show"),u=o.get("show"),c=a.get("color"),h=s.get("color"),d=Wi(c)?c:[c],p=Wi(h)?h:[h],f=[],g=[];if("circle"===r)for(var y=n[0].getTicksCoords(),v=e.cx,m=e.cy,_=0;_3?1.4:i>1?1.2:1.1;oL(this,"zoom","zoomOnMouseWheel",t,{scale:r>0?s:1/s,originX:o,originY:a,isAvailableBehavior:null})}if(n){var l=Math.abs(r);oL(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(r>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:o,originY:a,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){nL(this._zr,"globalPan")||oL(this,"zoom",null,t,{scale:t.pinchScale>1?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})},e}(Fo);function oL(t,e,n,r,i){t.pointerChecker&&t.pointerChecker(r,i.originX,i.originY)&&(oa(r.event),aL(t,e,n,r,i))}function aL(t,e,n,r,i){i.isAvailableBehavior=Gi(sL,null,n,r),t.trigger(e,i)}function sL(t,e,n){var r=n[t];return!t||r&&(!Ui(r)||e.event[r+"Key"])}function lL(t,e,n){var r=t.target;r.x+=e,r.y+=n,r.dirty()}function uL(t,e,n,r){var i=t.target,o=t.zoomLimit,a=t.zoom=t.zoom||1;if(a*=e,o){var s=o.min||0,l=o.max||1/0;a=Math.max(Math.min(l,a),s)}var u=a/t.zoom;t.zoom=a,i.x-=(n-i.x)*(u-1),i.y-=(r-i.y)*(u-1),i.scaleX*=u,i.scaleY*=u,i.dirty()}var cL,hL={axisPointer:1,tooltip:1,brush:1};function dL(t,e,n){var r=e.getComponentByElement(t.topTarget),i=r&&r.coordinateSystem;return r&&r!==n&&!hL.hasOwnProperty(r.mainType)&&i&&i.model!==n}function pL(t){Ui(t)&&(t=(new DOMParser).parseFromString(t,"text/xml"));var e=t;for(9===e.nodeType&&(e=e.firstChild);"svg"!==e.nodeName.toLowerCase()||1!==e.nodeType;)e=e.nextSibling;return e}var fL={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"},gL=Fi(fL),yL={"alignment-baseline":"textBaseline","stop-color":"stopColor"},vL=Fi(yL),mL=function(){function t(){this._defs={},this._root=null}return t.prototype.parse=function(t,e){e=e||{};var n=pL(t);this._defsUsePending=[];var r=new xu;this._root=r;var i=[],o=n.getAttribute("viewBox")||"",a=parseFloat(n.getAttribute("width")||e.width),s=parseFloat(n.getAttribute("height")||e.height);isNaN(a)&&(a=null),isNaN(s)&&(s=null),ML(n,r,null,!0,!1);for(var l,u,c=n.firstChild;c;)this._parseNode(c,r,i,null,!1,!1),c=c.nextSibling;if(function(t,e){for(var n=0;n=4&&(l={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(l&&null!=a&&null!=s&&(u=RL(l,{x:0,y:0,width:a,height:s}),!e.ignoreViewBox)){var d=r;(r=new xu).add(d),d.scaleX=d.scaleY=u.scale,d.x=u.x,d.y=u.y}return e.ignoreRootClip||null==a||null==s||r.setClipPath(new pd({shape:{x:0,y:0,width:a,height:s}})),{root:r,width:a,height:s,viewBoxRect:l,viewBoxTransform:u,named:i}},t.prototype._parseNode=function(t,e,n,r,i,o){var a,s=t.nodeName.toLowerCase(),l=r;if("defs"===s&&(i=!0),"text"===s&&(o=!0),"defs"===s||"switch"===s)a=e;else{if(!i){var u=cL[s];if(u&&mo(cL,s)){a=u.call(this,t,e);var c=t.getAttribute("name");if(c){var h={name:c,namedFrom:null,svgNodeTagLower:s,el:a};n.push(h),"g"===s&&(l=h)}else r&&n.push({name:r.name,namedFrom:r,svgNodeTagLower:s,el:a});e.add(a)}}var d=_L[s];if(d&&mo(_L,s)){var p=d.call(this,t),f=t.getAttribute("id");f&&(this._defs[f]=p)}}if(a&&a.isGroup)for(var g=t.firstChild;g;)1===g.nodeType?this._parseNode(g,a,n,l,i,o):3===g.nodeType&&o&&this._parseText(g,a),g=g.nextSibling},t.prototype._parseText=function(t,e){var n=new rd({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});wL(e,n),ML(t,n,this._defsUsePending,!1,!1),function(t,e){var n=e.__selfStyle;if(n){var r=n.textBaseline,i=r;r&&"auto"!==r?"baseline"===r?i="alphabetic":"before-edge"===r||"text-before-edge"===r?i="top":"after-edge"===r||"text-after-edge"===r?i="bottom":"central"!==r&&"mathematical"!==r||(i="middle"):i="alphabetic",t.style.textBaseline=i}var o=e.__inheritedStyle;if(o){var a=o.textAlign,s=a;a&&("middle"===a&&(s="center"),t.style.textAlign=s)}}(n,e);var r=n.style,i=r.fontSize;i&&i<9&&(r.fontSize=9,n.scaleX*=i/9,n.scaleY*=i/9);var o=(r.fontSize||r.fontFamily)&&[r.fontStyle,r.fontWeight,(r.fontSize||12)+"px",r.fontFamily||"sans-serif"].join(" ");r.font=o;var a=n.getBoundingRect();return this._textX+=a.width,e.add(n),n},t.internalField=void(cL={g:function(t,e){var n=new xu;return wL(e,n),ML(t,n,this._defsUsePending,!1,!1),n},rect:function(t,e){var n=new pd;return wL(e,n),ML(t,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(t,e){var n=new Xp;return wL(e,n),ML(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),n.silent=!0,n},line:function(t,e){var n=new wf;return wL(e,n),ML(t,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(t,e){var n=new Kp;return wL(e,n),ML(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(t,e){var n,r=t.getAttribute("points");r&&(n=SL(r));var i=new vf({shape:{points:n||[]},silent:!0});return wL(e,i),ML(t,i,this._defsUsePending,!1,!1),i},polyline:function(t,e){var n,r=t.getAttribute("points");r&&(n=SL(r));var i=new _f({shape:{points:n||[]},silent:!0});return wL(e,i),ML(t,i,this._defsUsePending,!1,!1),i},image:function(t,e){var n=new ad;return wL(e,n),ML(t,n,this._defsUsePending,!1,!1),n.setStyle({image:t.getAttribute("xlink:href")||t.getAttribute("href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),n.silent=!0,n},text:function(t,e){var n=t.getAttribute("x")||"0",r=t.getAttribute("y")||"0",i=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(i),this._textY=parseFloat(r)+parseFloat(o);var a=new xu;return wL(e,a),ML(t,a,this._defsUsePending,!1,!0),a},tspan:function(t,e){var n=t.getAttribute("x"),r=t.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=r&&(this._textY=parseFloat(r));var i=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0",a=new xu;return wL(e,a),ML(t,a,this._defsUsePending,!1,!0),this._textX+=parseFloat(i),this._textY+=parseFloat(o),a},path:function(t,e){var n=Up(t.getAttribute("d")||"");return wL(e,n),ML(t,n,this._defsUsePending,!1,!1),n.silent=!0,n}}),t}(),_L={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),n=parseInt(t.getAttribute("y1")||"0",10),r=parseInt(t.getAttribute("x2")||"10",10),i=parseInt(t.getAttribute("y2")||"0",10),o=new Df(e,n,r,i);return xL(t,o),bL(t,o),o},radialgradient:function(t){var e=parseInt(t.getAttribute("cx")||"0",10),n=parseInt(t.getAttribute("cy")||"0",10),r=parseInt(t.getAttribute("r")||"0",10),i=new Pf(e,n,r);return xL(t,i),bL(t,i),i}};function xL(t,e){"userSpaceOnUse"===t.getAttribute("gradientUnits")&&(e.global=!0)}function bL(t,e){for(var n=t.firstChild;n;){if(1===n.nodeType&&"stop"===n.nodeName.toLocaleLowerCase()){var r=n.getAttribute("offset"),i=void 0;i=r&&r.indexOf("%")>0?parseInt(r,10)/100:r?parseFloat(r):0;var o={};PL(n,o,o);var a=o.stopColor||n.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:i,color:a})}n=n.nextSibling}}function wL(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),Pi(e.__inheritedStyle,t.__inheritedStyle))}function SL(t){for(var e=TL(t),n=[],r=0;r0;o-=2){var a=r[o],s=r[o-1],l=TL(a);switch(i=i||[1,0,0,1,0,0],s){case"translate":pa(i,i,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":ga(i,i,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":fa(i,i,-parseFloat(l[0])*LL,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":da(i,[1,0,Math.tan(parseFloat(l[0])*LL),1,0,0],i);break;case"skewY":da(i,[1,Math.tan(parseFloat(l[0])*LL),0,1,0,0],i);break;case"matrix":i[0]=parseFloat(l[0]),i[1]=parseFloat(l[1]),i[2]=parseFloat(l[2]),i[3]=parseFloat(l[3]),i[4]=parseFloat(l[4]),i[5]=parseFloat(l[5])}}e.setLocalTransform(i)}}(t,e),PL(t,a,s),r||function(t,e,n){for(var r=0;r0,f={api:n,geo:s,mapOrGeoModel:t,data:a,isVisualEncodedByVisualMap:p,isGeo:o,transformInfoRaw:h};"geoJSON"===s.resourceType?this._buildGeoJSON(f):"geoSVG"===s.resourceType&&this._buildSVG(f),this._updateController(t,e,n),this._updateMapSelectHandler(t,l,n,r)},t.prototype._buildGeoJSON=function(t){var e=this._regionsGroupByName=fo(),n=fo(),r=this._regionsGroup,i=t.transformInfoRaw,o=t.mapOrGeoModel,a=t.data,s=t.geo.projection,l=s&&s.stream;function u(t,e){return e&&(t=e(t)),t&&[t[0]*i.scaleX+i.x,t[1]*i.scaleY+i.y]}function c(t){for(var e=[],n=!l&&s&&s.project,r=0;r=0)&&(d=i);var p=a?{normal:{align:"center",verticalAlign:"middle"}}:null;Cg(e,Ag(r),{labelFetcher:d,labelDataIndex:h,defaultText:n},p);var f=e.getTextContent();if(f&&(tD(f).ignore=f.ignore,e.textConfig&&a)){var g=e.getBoundingRect().clone();e.textConfig.layoutRect=g,e.textConfig.position=[(a[0]-g.x)/g.width*100+"%",(a[1]-g.y)/g.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function aD(t,e,n,r,i,o){t.data?t.data.setItemGraphicEl(o,e):kd(e).eventData={componentType:"geo",componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:n,region:r&&r.option||{}}}function sD(t,e,n,r,i){t.data||_g({el:e,componentModel:i,itemName:n,itemTooltipOption:r.get("tooltip")})}function lD(t,e,n,r,i){e.highDownSilentOnTouch=!!i.get("selectedMode");var o=r.getModel("emphasis"),a=o.get("focus");return mp(e,a,o.get("blurScope"),o.get("disabled")),t.isGeo&&function(t,e,n){var r=kd(t);r.componentMainType=e.mainType,r.componentIndex=e.componentIndex,r.componentHighDownName=n}(e,i,n),a}function uD(t,e,n){var r,i=[];function o(){r=[]}function a(){r.length&&(i.push(r),r=[])}var s=e({polygonStart:o,polygonEnd:a,lineStart:o,lineEnd:a,point:function(t,e){isFinite(t)&&isFinite(e)&&r.push([t,e])},sphere:function(){}});return!n&&s.polygonStart(),Ni(t,(function(t){s.lineStart();for(var e=0;e-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#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"},e}(j_);function dD(t){var e={};t.eachSeriesByType("map",(function(t){var n=t.getHostGeoModel(),r=n?"o"+n.id:"i"+t.getMapType();(e[r]=e[r]||[]).push(t)})),Ni(e,(function(t,e){for(var n,r,i,o=(n=zi(t,(function(t){return t.getData()})),r=t[0].get("mapValueCalculation"),i={},Ni(n,(function(t){t.each(t.mapDimension("value"),(function(e,n){var r="ec-"+t.getName(n);i[r]=i[r]||[],isNaN(e)||i[r].push(e)}))})),n[0].map(n[0].mapDimension("value"),(function(t,e){for(var o="ec-"+n[0].getName(e),a=0,s=1/0,l=-1/0,u=i[o].length,c=0;c1?(p.width=d,p.height=d/_):(p.height=d,p.width=d*_),p.y=h[1]-p.height/2,p.x=h[0]-p.width/2;else{var b=t.getBoxLayoutParams();b.aspect=_,p=Qy(b,{width:v,height:m})}this.setViewRect(p.x,p.y,p.width,p.height),this.setCenter(t.get("center"),e),this.setZoom(t.get("zoom"))}Oi(_D,gD);var wD=function(){function t(){this.dimensions=mD}return t.prototype.create=function(t,e){var n=[];function r(t){return{nameProperty:t.get("nameProperty"),aspectScale:t.get("aspectScale"),projection:t.get("projection")}}t.eachComponent("geo",(function(t,i){var o=t.get("map"),a=new _D(o+i,o,Di({nameMap:t.get("nameMap")},r(t)));a.zoomLimit=t.get("scaleLimit"),n.push(a),t.coordinateSystem=a,a.model=t,a.resize=bD,a.resize(t,e)})),t.eachSeries((function(t){if("geo"===t.get("coordinateSystem")){var e=t.get("geoIndex")||0;t.coordinateSystem=n[e]}}));var i={};return t.eachSeriesByType("map",(function(t){if(!t.getHostGeoModel()){var e=t.getMapType();i[e]=i[e]||[],i[e].push(t)}})),Ni(i,(function(t,i){var o=zi(t,(function(t){return t.get("nameMap")})),a=new _D(i,i,Di({nameMap:Li(o)},r(t[0])));a.zoomLimit=to.apply(null,zi(t,(function(t){return t.get("scaleLimit")}))),n.push(a),a.resize=bD,a.resize(t[0],e),Ni(t,(function(t){t.coordinateSystem=a,function(t,e){Ni(e.get("geoCoord"),(function(e,n){t.addGeoCoord(n,e)}))}(a,t)}))})),n},t.prototype.getFilledRegions=function(t,e,n,r){for(var i=(t||[]).slice(),o=fo(),a=0;a=0;){var o=e[n];o.hierNode.prelim+=r,o.hierNode.modifier+=r,i+=o.hierNode.change,r+=o.hierNode.shift+i}}(t);var o=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;i?(t.hierNode.prelim=i.hierNode.prelim+e(t,i),t.hierNode.modifier=t.hierNode.prelim-o):t.hierNode.prelim=o}else i&&(t.hierNode.prelim=i.hierNode.prelim+e(t,i));t.parentNode.hierNode.defaultAncestor=function(t,e,n,r){if(e){for(var i=t,o=t,a=o.parentNode.children[0],s=e,l=i.hierNode.modifier,u=o.hierNode.modifier,c=a.hierNode.modifier,h=s.hierNode.modifier;s=OD(s),o=ED(o),s&&o;){i=OD(i),a=ED(a),i.hierNode.ancestor=t;var d=s.hierNode.prelim+h-o.hierNode.prelim-u+r(s,o);d>0&&(zD(ND(s,t,n),t,d),u+=d,l+=d),h+=s.hierNode.modifier,u+=o.hierNode.modifier,l+=i.hierNode.modifier,c+=a.hierNode.modifier}s&&!OD(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=h-l),o&&!ED(a)&&(a.hierNode.thread=o,a.hierNode.modifier+=u-c,n=t)}return n}(t,i,t.parentNode.hierNode.defaultAncestor||r[0],e)}function DD(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function PD(t){return arguments.length?t:BD}function RD(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function OD(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function ED(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function ND(t,e,n){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:n}function zD(t,e,n){var r=n/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=r,e.hierNode.shift+=n,e.hierNode.modifier+=n,e.hierNode.prelim+=n,t.hierNode.change+=r}function BD(t,e){return t.parentNode===e.parentNode?1:2}var VD=function(){this.parentPoint=[],this.childPoints=[]},FD=function(t){function e(e){return t.call(this,e)||this}return a(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new VD},e.prototype.buildPath=function(t,e){var n=e.childPoints,r=n.length,i=e.parentPoint,o=n[0],a=n[r-1];if(1===r)return t.moveTo(i[0],i[1]),void t.lineTo(o[0],o[1]);var s=e.orient,l="TB"===s||"BT"===s?0:1,u=1-l,c=Au(e.forkPosition,1),h=[];h[l]=i[l],h[u]=i[u]+(a[u]-i[u])*c,t.moveTo(i[0],i[1]),t.lineTo(h[0],h[1]),t.moveTo(o[0],o[1]),h[l]=o[l],t.lineTo(h[0],h[1]),h[l]=a[l],t.lineTo(h[0],h[1]),t.lineTo(a[0],a[1]);for(var d=1;dm.x)||(x-=Math.PI);var S=b?"left":"right",M=s.getModel("label"),I=M.get("rotate"),C=I*(Math.PI/180),A=y.getTextContent();A&&(y.setTextConfig({position:M.get("position")||S,rotation:null==I?-x:C,origin:"center"}),A.setStyle("verticalAlign","middle"))}var T=s.get(["emphasis","focus"]),k="relative"===T?go(a.getAncestorsIndices(),a.getDescendantIndices()):"ancestor"===T?a.getAncestorsIndices():"descendant"===T?a.getDescendantIndices():null;k&&(kd(n).focus=k),function(t,e,n,r,i,o,a,s){var l=e.getModel(),u=t.get("edgeShape"),c=t.get("layout"),h=t.getOrient(),d=t.get(["lineStyle","curveness"]),p=t.get("edgeForkPosition"),f=l.getModel("lineStyle").getLineStyle(),g=r.__edge;if("curve"===u)e.parentNode&&e.parentNode!==n&&(g||(g=r.__edge=new Cf({shape:YD(c,h,d,i,i)})),Wf(g,{shape:YD(c,h,d,o,a)},t));else if("polyline"===u&&"orthogonal"===c&&e!==n&&e.children&&0!==e.children.length&&!0===e.isExpand){for(var y=e.children,v=[],m=0;me&&(e=r.height)}this.height=e+1},t.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,n=this.children,r=n.length;e=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},t.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},t.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(t)},t.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},t.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},t.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},t.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},t.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},t.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,e=0;e=0){var r=n.getData().tree.root,i=t.targetNode;if(Ui(i)&&(i=r.getNodeById(i)),i&&r.contains(i))return{node:i};var o=t.targetNodeId;if(null!=o&&(i=r.getNodeById(o)))return{node:i}}}function aP(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function sP(t,e){return Ri(aP(t),e)>=0}function lP(t,e){for(var n=[];t;){var r=t.dataIndex;n.push({name:t.name,dataIndex:r,value:e.getRawValue(r)}),t=t.parentNode}return n.reverse(),n}var uP=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasSymbolVisual=!0,e.ignoreStyleOnData=!0,e}return a(e,t),e.prototype.getInitialData=function(t){var e={name:t.name,children:t.data},n=t.leaves||{},r=new Kg(n,this,this.ecModel),i=iP.createTree(e,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=i.getNodeByDataIndex(e);return n&&n.children.length&&n.isExpand||(t.parentModel=r),t}))}));var o=0;i.eachNode("preorder",(function(t){t.depth>o&&(o=t.depth)}));var a=t.expandAndCollapse&&t.initialTreeDepth>=0?t.initialTreeDepth:o;return i.root.eachNode("preorder",(function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=a})),i.data},e.prototype.getOrient=function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,e,n){for(var r=this.getData().tree,i=r.root.children[0],o=r.getNodeByDataIndex(t),a=o.getValue(),s=o.name;o&&o!==i;)s=o.parentNode.name+"."+s,o=o.parentNode;return C_("nameValue",{name:s,value:a,noValue:isNaN(a)||null==a})},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=lP(r,this),n.collapsed=!r.isExpand,n},e.type="series.tree",e.layoutMode="box",e.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},e}(j_);function cP(t,e){for(var n,r=[t];n=r.pop();)if(e(n),n.isExpand){var i=n.children;if(i.length)for(var o=i.length-1;o>=0;o--)r.push(i[o])}}function hP(t,e){t.eachSeriesByType("tree",(function(t){!function(t,e){var n=function(t,e){return Qy(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=n;var r=t.get("layout"),i=0,o=0,a=null;"radial"===r?(i=2*Math.PI,o=Math.min(n.height,n.width)/2,a=PD((function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth}))):(i=n.width,o=n.height,a=PD());var s=t.getData().tree.root,l=s.children[0];if(l){!function(t){var e=t;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var n,r,i=[e];n=i.pop();)if(r=n.children,n.isExpand&&r.length)for(var o=r.length-1;o>=0;o--){var a=r[o];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},i.push(a)}}(s),function(t,e,n){for(var r,i=[t],o=[];r=i.pop();)if(o.push(r),r.isExpand){var a=r.children;if(a.length)for(var s=0;sc.getLayout().x&&(c=t),t.depth>h.depth&&(h=t)}));var d=u===c?1:a(u,c)/2,p=d-u.getLayout().x,f=0,g=0,y=0,v=0;if("radial"===r)f=i/(c.getLayout().x+d+p),g=o/(h.depth-1||1),cP(l,(function(t){y=(t.getLayout().x+p)*f,v=(t.depth-1)*g;var e=RD(y,v);t.setLayout({x:e.x,y:e.y,rawX:y,rawY:v},!0)}));else{var m=t.getOrient();"RL"===m||"LR"===m?(g=o/(c.getLayout().x+d+p),f=i/(h.depth-1||1),cP(l,(function(t){v=(t.getLayout().x+p)*g,y="LR"===m?(t.depth-1)*f:i-(t.depth-1)*f,t.setLayout({x:y,y:v},!0)}))):"TB"!==m&&"BT"!==m||(f=i/(c.getLayout().x+d+p),g=o/(h.depth-1||1),cP(l,(function(t){y=(t.getLayout().x+p)*f,v="TB"===m?(t.depth-1)*g:o-(t.depth-1)*g,t.setLayout({x:y,y:v},!0)})))}}}(t,e)}))}function dP(t){t.eachSeriesByType("tree",(function(t){var e=t.getData();e.tree.eachNode((function(t){var n=t.getModel().getModel("itemStyle").getItemStyle();Di(e.ensureUniqueItemVisual(t.dataIndex,"style"),n)}))}))}var pP=["treemapZoomToNode","treemapRender","treemapMove"];function fP(t){var e=t.getData().tree,n={};e.eachNode((function(e){for(var r=e;r&&r.depth>1;)r=r.parentNode;var i=Ov(t.ecModel,r.name||r.dataIndex+"",n);e.setVisual("decal",i)}))}var gP=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.preventUsingHoverLayer=!0,n}return a(e,t),e.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};yP(n);var r=t.levels||[],i=this.designatedVisualItemStyle={},o=new Kg({itemStyle:i},this,e);r=t.levels=function(t,e){var n,r,i=$u(e.get("color")),o=$u(e.get(["aria","decal","decals"]));if(!i)return;t=t||[],Ni(t,(function(t){var e=new Kg(t),i=e.get("color"),o=e.get("decal");(e.get(["itemStyle","color"])||i&&"none"!==i)&&(n=!0),(e.get(["itemStyle","decal"])||o&&"none"!==o)&&(r=!0)}));var a=t[0]||(t[0]={});n||(a.color=i.slice());!r&&o&&(a.decal=o.slice());return t}(r,e);var a=zi(r||[],(function(t){return new Kg(t,o,e)}),this),s=iP.createTree(n,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=s.getNodeByDataIndex(e),r=n?a[n.depth]:null;return t.parentModel=r||o,t}))}));return s.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,e,n){var r=this.getData(),i=this.getRawValue(t);return C_("nameValue",{name:r.getName(t),value:i})},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=lP(r,this),n.treePathInfo=n.treeAncestors,n},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},Di(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=fo(),this._idIndexMapCount=0);var n=e.get(t);return null==n&&e.set(t,n=this._idIndexMapCount++),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){fP(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",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:[]},e}(j_);function yP(t){var e=0;Ni(t.children,(function(t){yP(t);var n=t.value;Wi(n)&&(n=n[0]),e+=n}));var n=t.value;Wi(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),Wi(t.value)?t.value[0]=n:t.value=n}var vP=function(){function t(t){this.group=new xu,t.add(this.group)}return t.prototype.render=function(t,e,n,r){var i=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),i.get("show")&&n){var a=i.getModel("itemStyle"),s=i.getModel("emphasis"),l=a.getModel("textStyle"),u=s.getModel(["itemStyle","textStyle"]),c={pos:{left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,c,l),this._renderContent(t,c,a,s,l,u,r),Jy(o,c.pos,c.box)}},t.prototype._prepare=function(t,e,n){for(var r=t;r;r=r.parentNode){var i=oc(r.getModel().get("name"),""),o=n.getTextRect(i),a=Math.max(o.width+16,e.emptyItemWidth);e.totalWidth+=a+8,e.renderList.push({node:r,text:i,width:a})}},t.prototype._renderContent=function(t,e,n,r,i,o,a){for(var s,l,u,c,h,d,p,f,g,y=0,v=e.emptyItemWidth,m=t.get(["breadcrumb","height"]),_=(s=e.pos,l=e.box,c=l.width,h=l.height,d=Au(s.left,c),p=Au(s.top,h),f=Au(s.right,c),g=Au(s.bottom,h),(isNaN(d)||isNaN(parseFloat(s.left)))&&(d=0),(isNaN(f)||isNaN(parseFloat(s.right)))&&(f=c),(isNaN(p)||isNaN(parseFloat(s.top)))&&(p=0),(isNaN(g)||isNaN(parseFloat(s.bottom)))&&(g=h),u=Fy(u||0),{width:Math.max(f-d-u[1]-u[3],0),height:Math.max(g-p-u[0]-u[2],0)}),x=e.totalWidth,b=e.renderList,w=r.getModel("itemStyle").getItemStyle(),S=b.length-1;S>=0;S--){var M=b[S],I=M.node,C=M.width,A=M.text;x>_.width&&(x-=C-v,C=v,A=null);var T=new vf({shape:{points:mP(y,0,C,m,S===b.length-1,0===S)},style:Pi(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new yd({style:Tg(i,{text:A})}),textConfig:{position:"inside"},z2:1e5,onclick:ji(a,I)});T.disableLabelAnimation=!0,T.getTextContent().ensureState("emphasis").style=Tg(o,{text:A}),T.ensureState("emphasis").style=w,mp(T,r.get("focus"),r.get("blurScope"),r.get("disabled")),this.group.add(T),_P(T,t,I),y+=C+8}},t.prototype.remove=function(){this.group.removeAll()},t}();function mP(t,e,n,r,i,o){var a=[[i?t:t-5,e],[t+n,e],[t+n,e+r],[i?t:t-5,e+r]];return!o&&a.splice(2,0,[t+n+5,e+r/2]),!i&&a.push([t,e+r/2]),a}function _P(t,e,n){kd(t).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&lP(n,e)}}var xP=function(){function t(){this._storage=[],this._elExistsMap={}}return t.prototype.add=function(t,e,n,r,i){return!this._elExistsMap[t.id]&&(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:n,delay:r,easing:i}),!0)},t.prototype.finished=function(t){return this._finishedCallback=t,this},t.prototype.start=function(){for(var t=this,e=this._storage.length,n=function(){--e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},r=0,i=this._storage.length;r3||Math.abs(t.dy)>3)){var e=this.seriesModel.getData().tree.root;if(!e)return;var n=e.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},e.prototype._onZoom=function(t){var e=t.originX,n=t.originY,r=t.scale;if("animating"!==this._state){var i=this.seriesModel.getData().tree.root;if(!i)return;var o=i.getLayout();if(!o)return;var a,s=new Ca(o.x,o.y,o.width,o.height),l=this._controllerHost;a=l.zoomLimit;var u=l.zoom=l.zoom||1;if(u*=r,a){var c=a.min||0,h=a.max||1/0;u=Math.max(Math.min(h,u),c)}var d=u/l.zoom;l.zoom=u;var p=this.seriesModel.layoutInfo,f=[1,0,0,1,0,0];pa(f,f,[-(e-=p.x),-(n-=p.y)]),ga(f,f,[d,d]),pa(f,f,[e,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}})}},e.prototype._initEvents=function(t){var e=this;t.on("click",(function(t){if("ready"===e._state){var n=e.seriesModel.get("nodeClick",!0);if(n){var r=e.findTarget(t.offsetX,t.offsetY);if(r){var i=r.node;if(i.getLayout().isLeafRoot)e._rootToNode(r);else if("zoomToNode"===n)e._zoomToNode(r);else if("link"===n){var o=i.hostTree.data.getItemModel(i.dataIndex),a=o.get("link",!0),s=o.get("target",!0)||"blank";a&&Zy(a,s)}}}}}),this)},e.prototype._renderBreadcrumb=function(t,e,n){var r=this;n||(n=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2))||(n={node:t.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new vP(this.group))).render(t,e,n.node,(function(e){"animating"!==r._state&&(sP(t.getViewRoot(),e)?r._rootToNode({node:e}):r._zoomToNode({node:e}))}))},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,e){var n;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},(function(r){var i=this._storage.background[r.getRawIndex()];if(i){var o=i.transformCoordToLocal(t,e),a=i.shape;if(!(a.x<=o[0]&&o[0]<=a.x+a.width&&a.y<=o[1]&&o[1]<=a.y+a.height))return!1;n={node:r,offsetX:o[0],offsetY:o[1]}}}),this),n},e.type="treemap",e}(tx);var kP=Ni,LP=Xi,DP=-1,PP=function(){function t(e){var n=e.mappingMethod,r=e.type,i=this.option=Ti(e);this.type=r,this.mappingMethod=n,this._normalizeData=jP[n];var o=t.visualHandlers[r];this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._normalizedToVisual=o._normalizedToVisual[n],"piecewise"===n?(RP(i),function(t){var e=t.pieceList;t.hasSpecialVisual=!1,Ni(e,(function(e,n){e.originIndex=n,null!=e.visual&&(t.hasSpecialVisual=!0)}))}(i)):"category"===n?i.categories?function(t){var e=t.categories,n=t.categoryMap={},r=t.visual;if(kP(e,(function(t,e){n[t]=e})),!Wi(r)){var i=[];Xi(r)?kP(r,(function(t,e){var r=n[e];i[null!=r?r:DP]=t})):i[-1]=r,r=GP(t,i)}for(var o=e.length-1;o>=0;o--)null==r[o]&&(delete n[e[o]],e.pop())}(i):RP(i,!0):(oo("linear"!==n||i.dataExtent),RP(i))}return t.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},t.prototype.getNormalizer=function(){return Gi(this._normalizeData,this)},t.listVisualTypes=function(){return Fi(t.visualHandlers)},t.isValidType=function(e){return t.visualHandlers.hasOwnProperty(e)},t.eachVisual=function(t,e,n){Xi(t)?Ni(t,e,n):e.call(n,t)},t.mapVisual=function(e,n,r){var i,o=Wi(e)?[]:Xi(e)?{}:(i=!0,null);return t.eachVisual(e,(function(t,e){var a=n.call(r,t,e);i?o=a:o[e]=a})),o},t.retrieveVisuals=function(e){var n,r={};return e&&kP(t.visualHandlers,(function(t,i){e.hasOwnProperty(i)&&(r[i]=e[i],n=!0)})),n?r:null},t.prepareVisualTypes=function(t){if(Wi(t))t=t.slice();else{if(!LP(t))return[];var e=[];kP(t,(function(t,n){e.push(n)})),t=e}return t.sort((function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1})),t},t.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},t.findPieceIndex=function(t,e,n){for(var r,i=1/0,o=0,a=e.length;ou[1]&&(u[1]=l);var c=e.get("colorMappingBy"),h={type:a.name,dataExtent:u,visual:a.range};"color"!==h.type||"index"!==c&&"id"!==c?h.mappingMethod="linear":(h.mappingMethod="category",h.loop=!0);var d=new PP(h);return HP(d).drColorMappingBy=c,d}(0,i,o,0,u,p);Ni(p,(function(t,e){if(t.depth>=n.length||t===n[t.depth]){var o=function(t,e,n,r,i,o){var a=Di({},e);if(i){var s=i.type,l="color"===s&&HP(i).drColorMappingBy,u="index"===l?r:"id"===l?o.mapIdToIndex(n.getId()):n.getValue(t.get("visualDimension"));a[s]=i.mapValueToVisual(u)}return a}(i,u,t,e,f,r);ZP(t,o,n,r)}}))}else s=YP(u),c.fill=s}}function YP(t){var e=XP(t,"color");if(e){var n=XP(t,"colorAlpha"),r=XP(t,"colorSaturation");return r&&(e=Fs(e,null,null,r)),n&&(e=Gs(e,n)),e}}function XP(t,e){var n=t[e];if(null!=n&&"none"!==n)return n}function qP(t,e){var n=t.get(e);return Wi(n)&&n.length?{name:e,range:n}:null}var KP=Math.max,$P=Math.min,QP=to,JP=Ni,tR=["itemStyle","borderWidth"],eR=["itemStyle","gapWidth"],nR=["upperLabel","show"],rR=["upperLabel","height"],iR={seriesType:"treemap",reset:function(t,e,n,r){var i=n.getWidth(),o=n.getHeight(),a=t.option,s=Qy(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),l=a.size||[],u=Au(QP(s.width,l[0]),i),c=Au(QP(s.height,l[1]),o),h=r&&r.type,d=oP(r,["treemapZoomToNode","treemapRootToNode"],t),p="treemapRender"===h||"treemapMove"===h?r.rootRect:null,f=t.getViewRoot(),g=aP(f);if("treemapMove"!==h){var y="treemapZoomToNode"===h?function(t,e,n,r,i){var o,a=(e||{}).node,s=[r,i];if(!a||a===n)return s;var l=r*i,u=l*t.option.zoomToNodeRatio;for(;o=a.parentNode;){for(var c=0,h=o.children,d=0,p=h.length;dRu&&(u=Ru),a=o}ua[1]&&(a[1]=e)}))):a=[NaN,NaN];return{sum:r,dataExtent:a}}(e,a,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=function(t,e,n,r,i){if(!r)return n;for(var o=t.get("visibleMin"),a=i.length,s=a,l=a-1;l>=0;l--){var u=i["asc"===r?a-l-1:l].getValue();u/n*er&&(r=a));var l=t.area*t.area,u=e*e*n;return l?KP(u*r/l,l/(u*i)):1/0}function sR(t,e,n,r,i){var o=e===n.width?0:1,a=1-o,s=["x","y"],l=["width","height"],u=n[s[o]],c=e?t.area/e:0;(i||c>n[l[a]])&&(c=n[l[a]]);for(var h=0,d=t.length;hr&&(r=e);var o=r%2?r+2:r+3;i=[];for(var a=0;a0&&(m[0]=-m[0],m[1]=-m[1]);var x=v[0]<0?-1:1;if("start"!==r.__position&&"end"!==r.__position){var b=-Math.atan2(v[1],v[0]);u[0].8?"left":c[0]<-.8?"right":"center",d=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":r.x=-c[0]*f+l[0],r.y=-c[1]*g+l[1],h=c[0]>.8?"right":c[0]<-.8?"left":"center",d=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":r.x=f*x+l[0],r.y=l[1]+w,h=v[0]<0?"right":"left",r.originX=-f*x,r.originY=-w;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":r.x=_[0],r.y=_[1]+w,h="center",r.originY=-w;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":r.x=-f*x+u[0],r.y=u[1]+w,h=v[0]>=0?"right":"left",r.originX=f*x,r.originY=-w}r.scaleX=r.scaleY=i,r.setStyle({verticalAlign:r.__verticalAlign||d,align:r.__align||h})}}}function S(t,e){var n=t.__specifiedRotation;if(null==n){var r=a.tangentAt(e);t.attr("rotation",(1===e?-1:1)*Math.PI/2-Math.atan2(r[1],r[0]))}else t.attr("rotation",n)}},e}(xu),ZR=function(){function t(t){this.group=new xu,this._LineCtor=t||UR}return t.prototype.updateData=function(t){var e=this;this._progressiveEls=null;var n=this,r=n.group,i=n._lineData;n._lineData=t,i||r.removeAll();var o=YR(t);t.diff(i).add((function(n){e._doAdd(t,n,o)})).update((function(n,r){e._doUpdate(i,t,r,n,o)})).remove((function(t){r.remove(i.getItemGraphicEl(t))})).execute()},t.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl((function(e,n){e.updateLayout(t,n)}),this)},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=YR(t),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e){function n(t){t.isGroup||function(t){return t.animators&&t.animators.length>0}(t)||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[];for(var r=t.start;r=0?r+=u:r-=u:f>=0?r-=u:r+=u}return r}function rO(t,e){var n=[],r=gs,i=[[],[],[]],o=[[],[]],a=[];e/=2,t.eachEdge((function(t,s){var l=t.getLayout(),u=t.getVisual("fromSymbol"),c=t.getVisual("toSymbol");l.__original||(l.__original=[So(l[0]),So(l[1])],l[2]&&l.__original.push(So(l[2])));var h=l.__original;if(null!=l[2]){if(wo(i[0],h[0]),wo(i[1],h[2]),wo(i[2],h[1]),u&&"none"!==u){var d=IR(t.node1),p=nO(i,h[0],d*e);r(i[0][0],i[1][0],i[2][0],p,n),i[0][0]=n[3],i[1][0]=n[4],r(i[0][1],i[1][1],i[2][1],p,n),i[0][1]=n[3],i[1][1]=n[4]}if(c&&"none"!==c){d=IR(t.node2),p=nO(i,h[1],d*e);r(i[0][0],i[1][0],i[2][0],p,n),i[1][0]=n[1],i[2][0]=n[2],r(i[0][1],i[1][1],i[2][1],p,n),i[1][1]=n[1],i[2][1]=n[2]}wo(l[0],i[0]),wo(l[1],i[2]),wo(l[2],i[1])}else{if(wo(o[0],h[0]),wo(o[1],h[1]),Ao(a,o[1],o[0]),Lo(a,a),u&&"none"!==u){d=IR(t.node1);Co(o[0],o[0],a,d*e)}if(c&&"none"!==c){d=IR(t.node2);Co(o[1],o[1],a,-d*e)}wo(l[0],o[0]),wo(l[1],o[1])}}))}function iO(t){return"view"===t.type}var oO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.prototype.init=function(t,e){var n=new wA,r=new ZR,i=this.group;this._controller=new iL(e.getZr()),this._controllerHost={target:i},i.add(n.group),i.add(r.group),this._symbolDraw=n,this._lineDraw=r,this._firstRender=!0},e.prototype.render=function(t,e,n){var r=this,i=t.coordinateSystem;this._model=t;var o=this._symbolDraw,a=this._lineDraw,s=this.group;if(iO(i)){var l={x:i.x,y:i.y,scaleX:i.scaleX,scaleY:i.scaleY};this._firstRender?s.attr(l):Wf(s,l,t)}rO(t.getGraph(),MR(t));var u=t.getData();o.updateData(u);var c=t.getEdgeData();a.updateData(c),this._updateNodeAndLinkScale(),this._updateController(t,e,n),clearTimeout(this._layoutTimeout);var h=t.forceLayout,d=t.get(["force","layoutAnimation"]);h&&this._startForceLayoutIteration(h,d);var p=t.get("layout");u.graph.eachNode((function(e){var n=e.dataIndex,i=e.getGraphicEl(),o=e.getModel();if(i){i.off("drag").off("dragend");var a=o.get("draggable");a&&i.on("drag",(function(o){switch(p){case"force":h.warmUp(),!r._layouting&&r._startForceLayoutIteration(h,d),h.setFixed(n),u.setItemLayout(n,[i.x,i.y]);break;case"circular":u.setItemLayout(n,[i.x,i.y]),e.setLayout({fixed:!0},!0),TR(t,"symbolSize",e,[o.offsetX,o.offsetY]),r.updateLayout(t);break;default:u.setItemLayout(n,[i.x,i.y]),wR(t.getGraph(),t),r.updateLayout(t)}})).on("dragend",(function(){h&&h.setUnfixed(n)})),i.setDraggable(a,!!o.get("cursor")),"adjacency"===o.get(["emphasis","focus"])&&(kd(i).focus=e.getAdjacentDataIndices())}})),u.graph.eachEdge((function(t){var e=t.getGraphicEl(),n=t.getModel().get(["emphasis","focus"]);e&&"adjacency"===n&&(kd(e).focus={edge:[t.dataIndex],node:[t.node1.dataIndex,t.node2.dataIndex]})}));var f="circular"===t.get("layout")&&t.get(["circular","rotateLabel"]),g=u.getLayout("cx"),y=u.getLayout("cy");u.graph.eachNode((function(t){LR(t,f,g,y)})),this._firstRender=!1},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,e){var n=this;!function r(){t.step((function(t){n.updateLayout(n._model),(n._layouting=!t)&&(e?n._layoutTimeout=setTimeout(r,16):r())}))}()},e.prototype._updateController=function(t,e,n){var r=this,i=this._controller,o=this._controllerHost,a=this.group;i.setPointerChecker((function(e,r,i){var o=a.getBoundingRect();return o.applyTransform(a.transform),o.contain(r,i)&&!dL(e,n,t)})),iO(t.coordinateSystem)?(i.enable(t.get("roam")),o.zoomLimit=t.get("scaleLimit"),o.zoom=t.coordinateSystem.getZoom(),i.off("pan").off("zoom").on("pan",(function(e){lL(o,e.dx,e.dy),n.dispatchAction({seriesId:t.id,type:"graphRoam",dx:e.dx,dy:e.dy})})).on("zoom",(function(e){uL(o,e.scale,e.originX,e.originY),n.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:e.scale,originX:e.originX,originY:e.originY}),r._updateNodeAndLinkScale(),rO(t.getGraph(),MR(t)),r._lineDraw.updateLayout(),n.updateLabelLayout()}))):i.disable()},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,e=t.getData(),n=MR(t);e.eachItemGraphicEl((function(t,e){t&&t.setSymbolScale(n)}))},e.prototype.updateLayout=function(t){rO(t.getGraph(),MR(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(tx);function aO(t){return"_EC_"+t}var sO=function(){function t(t){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=t||!1}return t.prototype.isDirected=function(){return this._directed},t.prototype.addNode=function(t,e){t=null==t?""+e:""+t;var n=this._nodesMap;if(!n[aO(t)]){var r=new lO(t,e);return r.hostGraph=this,this.nodes.push(r),n[aO(t)]=r,r}},t.prototype.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},t.prototype.getNodeById=function(t){return this._nodesMap[aO(t)]},t.prototype.addEdge=function(t,e,n){var r=this._nodesMap,i=this._edgesMap;if(Yi(t)&&(t=this.nodes[t]),Yi(e)&&(e=this.nodes[e]),t instanceof lO||(t=r[aO(t)]),e instanceof lO||(e=r[aO(e)]),t&&e){var o=t.id+"-"+e.id,a=new uO(t,e,n);return a.hostGraph=this,this._directed&&(t.outEdges.push(a),e.inEdges.push(a)),t.edges.push(a),t!==e&&e.edges.push(a),this.edges.push(a),i[o]=a,a}},t.prototype.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},t.prototype.getEdge=function(t,e){t instanceof lO&&(t=t.id),e instanceof lO&&(e=e.id);var n=this._edgesMap;return this._directed?n[t+"-"+e]:n[t+"-"+e]||n[e+"-"+t]},t.prototype.eachNode=function(t,e){for(var n=this.nodes,r=n.length,i=0;i=0&&t.call(e,n[i],i)},t.prototype.eachEdge=function(t,e){for(var n=this.edges,r=n.length,i=0;i=0&&n[i].node1.dataIndex>=0&&n[i].node2.dataIndex>=0&&t.call(e,n[i],i)},t.prototype.breadthFirstTraverse=function(t,e,n,r){if(e instanceof lO||(e=this._nodesMap[aO(e)]),e){for(var i="out"===n?"outEdges":"in"===n?"inEdges":"edges",o=0;o=0&&n.node2.dataIndex>=0}));for(i=0,o=r.length;i=0&&this[t][e].setItemVisual(this.dataIndex,n,r)},getVisual:function(n){return this[t][e].getItemVisual(this.dataIndex,n)},setLayout:function(n,r){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,n,r)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}}function hO(t,e,n,r,i){for(var o=new sO(r),a=0;a "+d)),u++)}var p,f=n.get("coordinateSystem");if("cartesian2d"===f||"polar"===f)p=PS(t,n);else{var g=Hv.get(f),y=g&&g.dimensions||[];Ri(y,"value")<0&&y.concat(["value"]);var v=MS(t,{coordDimensions:y,encodeDefine:n.getEncode()}).dimensions;(p=new SS(v,n)).initData(t)}var m=new SS(["value"],n);return m.initData(l,s),i&&i(p,m),qD({mainData:p,struct:o,structAttr:"graph",datas:{node:p,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),o.update(),o}Oi(lO,cO("hostGraph","data")),Oi(uO,cO("hostGraph","edgeData"));var dO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return a(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments);var n=this;function r(){return n._categoriesData}this.legendVisualProvider=new BT(r,r),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(e){t.prototype.mergeDefaultAndTheme.apply(this,arguments),Qu(e,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,e){var n,r=t.edges||t.links||[],i=t.data||t.nodes||[],o=this;if(i&&r){gR(n=this)&&(n.__curvenessList=[],n.__edgeMap={},yR(n));var a=hO(i,r,this,!0,(function(t,e){t.wrapMethod("getItemModel",(function(t){var e=o._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t}));var n=Kg.prototype.getModel;function r(t,e){var r=n.call(this,t,e);return r.resolveParentPath=i,r}function i(t){if(t&&("label"===t[0]||"label"===t[1])){var e=t.slice();return"label"===t[0]?e[0]="edgeLabel":"label"===t[1]&&(e[1]="edgeLabel"),e}return t}e.wrapMethod("getItemModel",(function(t){return t.resolveParentPath=i,t.getModel=r,t}))}));return Ni(a.edges,(function(t){!function(t,e,n,r){if(gR(n)){var i=vR(t,e,n),o=n.__edgeMap,a=o[mR(i)];o[i]&&!a?o[i].isForward=!0:a&&o[i]&&(a.isForward=!0,o[i].isForward=!1),o[i]=o[i]||[],o[i].push(r)}}(t.node1,t.node2,this,t.dataIndex)}),this),a.data}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,e,n){if("edge"===n){var r=this.getData(),i=this.getDataParams(t,n),o=r.graph.getEdgeByIndex(t),a=r.getName(o.node1.dataIndex),s=r.getName(o.node2.dataIndex),l=[];return null!=a&&l.push(a),null!=s&&l.push(s),C_("nameValue",{name:l.join(" > "),value:i.value,noValue:null==i.value})}return B_({series:this,dataIndex:t,multipleSeries:e})},e.prototype._updateCategoriesData=function(){var t=zi(this.option.categories||[],(function(t){return null!=t.value?t:Di({value:0},t)})),e=new SS(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray((function(t){return e.getItemModel(t)}))},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return t.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(j_),pO={type:"graphRoam",event:"graphRoam",update:"none"};var fO=function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0},gO=function(t){function e(e){var n=t.call(this,e)||this;return n.type="pointer",n}return a(e,t),e.prototype.getDefaultShape=function(){return new fO},e.prototype.buildPath=function(t,e){var n=Math.cos,r=Math.sin,i=e.r,o=e.width,a=e.angle,s=e.x-n(a)*o*(o>=i/3?1:2),l=e.y-r(a)*o*(o>=i/3?1:2);a=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+n(a)*o,e.y+r(a)*o),t.lineTo(e.x+n(e.angle)*i,e.y+r(e.angle)*i),t.lineTo(e.x-n(a)*o,e.y-r(a)*o),t.lineTo(s,l)},e}(ed);function yO(t,e){var n=null==t?"":t+"";return e&&(Ui(e)?n=e.replace("{value}",n):Hi(e)&&(n=e(t))),n}var vO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.prototype.render=function(t,e,n){this.group.removeAll();var r=t.get(["axisLine","lineStyle","color"]),i=function(t,e){var n=t.get("center"),r=e.getWidth(),i=e.getHeight(),o=Math.min(r,i);return{cx:Au(n[0],e.getWidth()),cy:Au(n[1],e.getHeight()),r:Au(t.get("radius"),o/2)}}(t,n);this._renderMain(t,e,n,r,i),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,e,n,r,i){var o=this.group,a=t.get("clockwise"),s=-t.get("startAngle")/180*Math.PI,l=-t.get("endAngle")/180*Math.PI,u=t.getModel("axisLine"),c=u.get("roundCap")?eT:df,h=u.get("show"),d=u.getModel("lineStyle"),p=d.get("width"),f=[s,l];Oh(f,!a);for(var g=(l=f[1])-(s=f[0]),y=s,v=[],m=0;h&&m=t&&(0===e?0:r[e-1][0])Math.PI/2&&(B+=Math.PI):"tangential"===z?B=-M-Math.PI/2:Yi(z)&&(B=z*Math.PI/180),0===B?h.add(new yd({style:Tg(_,{text:R,x:E,y:N,verticalAlign:c<-.8?"top":c>.8?"bottom":"middle",align:u<-.4?"left":u>.4?"right":"center"},{inheritColor:O}),silent:!0})):h.add(new yd({style:Tg(_,{text:R,x:E,y:N,verticalAlign:"middle",align:"center"},{inheritColor:O}),silent:!0,originX:E,originY:N,rotation:B}))}if(m.get("show")&&L!==x){P=(P=m.get("distance"))?P+l:l;for(var V=0;V<=b;V++){u=Math.cos(M),c=Math.sin(M);var F=new wf({shape:{x1:u*(f-P)+d,y1:c*(f-P)+p,x2:u*(f-S-P)+d,y2:c*(f-S-P)+p},silent:!0,style:T});"auto"===T.stroke&&F.setStyle({stroke:r((L+V/b)/x)}),h.add(F),M+=C}M-=C}else M+=I}},e.prototype._renderPointer=function(t,e,n,r,i,o,a,s,l){var u=this.group,c=this._data,h=this._progressEls,d=[],p=t.get(["pointer","show"]),f=t.getModel("progress"),g=f.get("show"),y=t.getData(),v=y.mapDimension("value"),m=+t.get("min"),_=+t.get("max"),x=[m,_],b=[o,a];function w(e,n){var r,o=y.getItemModel(e).getModel("pointer"),a=Au(o.get("width"),i.r),s=Au(o.get("length"),i.r),l=t.get(["pointer","icon"]),u=o.get("offsetCenter"),c=Au(u[0],i.r),h=Au(u[1],i.r),d=o.get("keepAspect");return(r=l?pb(l,c-a/2,h-s,a,s,null,d):new gO({shape:{angle:-Math.PI/2,width:a,r:s,x:c,y:h}})).rotation=-(n+Math.PI/2),r.x=i.cx,r.y=i.cy,r}function S(t,e){var n=f.get("roundCap")?eT:df,r=f.get("overlap"),a=r?f.get("width"):l/y.count(),u=r?i.r-a:i.r-(t+1)*a,c=r?i.r:i.r-t*a,h=new n({shape:{startAngle:o,endAngle:e,cx:i.cx,cy:i.cy,clockwise:s,r0:u,r:c}});return r&&(h.z2=Cu(y.get(v,t),[m,_],[100,0],!0)),h}(g||p)&&(y.diff(c).add((function(e){var n=y.get(v,e);if(p){var r=w(e,o);Hf(r,{rotation:-((isNaN(+n)?b[0]:Cu(n,x,b,!0))+Math.PI/2)},t),u.add(r),y.setItemGraphicEl(e,r)}if(g){var i=S(e,o),a=f.get("clip");Hf(i,{shape:{endAngle:Cu(n,x,b,a)}},t),u.add(i),Ld(t.seriesIndex,y.dataType,e,i),d[e]=i}})).update((function(e,n){var r=y.get(v,e);if(p){var i=c.getItemGraphicEl(n),a=i?i.rotation:o,s=w(e,a);s.rotation=a,Wf(s,{rotation:-((isNaN(+r)?b[0]:Cu(r,x,b,!0))+Math.PI/2)},t),u.add(s),y.setItemGraphicEl(e,s)}if(g){var l=h[n],m=S(e,l?l.shape.endAngle:o),_=f.get("clip");Wf(m,{shape:{endAngle:Cu(r,x,b,_)}},t),u.add(m),Ld(t.seriesIndex,y.dataType,e,m),d[e]=m}})).execute(),y.each((function(t){var e=y.getItemModel(t),n=e.getModel("emphasis"),i=n.get("focus"),o=n.get("blurScope"),a=n.get("disabled");if(p){var s=y.getItemGraphicEl(t),l=y.getItemVisual(t,"style"),u=l.fill;if(s instanceof ad){var c=s.style;s.useStyle(Di({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},l))}else s.useStyle(l),"pointer"!==s.type&&s.setColor(u);s.setStyle(e.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===s.style.fill&&s.setStyle("fill",r(Cu(y.get(v,t),x,[0,1],!0))),s.z2EmphasisLift=0,wp(s,e),mp(s,i,o,a)}if(g){var h=d[t];h.useStyle(y.getItemVisual(t,"style")),h.setStyle(e.getModel(["progress","itemStyle"]).getItemStyle()),h.z2EmphasisLift=0,wp(h,e),mp(h,i,o,a)}})),this._progressEls=d)},e.prototype._renderAnchor=function(t,e){var n=t.getModel("anchor");if(n.get("show")){var r=n.get("size"),i=n.get("icon"),o=n.get("offsetCenter"),a=n.get("keepAspect"),s=pb(i,e.cx-r/2+Au(o[0],e.r),e.cy-r/2+Au(o[1],e.r),r,r,null,a);s.z2=n.get("showAbove")?1:0,s.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(s)}},e.prototype._renderTitleAndDetail=function(t,e,n,r,i){var o=this,a=t.getData(),s=a.mapDimension("value"),l=+t.get("min"),u=+t.get("max"),c=new xu,h=[],d=[],p=t.isAnimationEnabled(),f=t.get(["pointer","showAbove"]);a.diff(this._data).add((function(t){h[t]=new yd({silent:!0}),d[t]=new yd({silent:!0})})).update((function(t,e){h[t]=o._titleEls[e],d[t]=o._detailEls[e]})).execute(),a.each((function(e){var n=a.getItemModel(e),o=a.get(s,e),g=new xu,y=r(Cu(o,[l,u],[0,1],!0)),v=n.getModel("title");if(v.get("show")){var m=v.get("offsetCenter"),_=i.cx+Au(m[0],i.r),x=i.cy+Au(m[1],i.r);(T=h[e]).attr({z2:f?0:2,style:Tg(v,{x:_,y:x,text:a.getName(e),align:"center",verticalAlign:"middle"},{inheritColor:y})}),g.add(T)}var b=n.getModel("detail");if(b.get("show")){var w=b.get("offsetCenter"),S=i.cx+Au(w[0],i.r),M=i.cy+Au(w[1],i.r),I=Au(b.get("width"),i.r),C=Au(b.get("height"),i.r),A=t.get(["progress","show"])?a.getItemVisual(e,"style").fill:y,T=d[e],k=b.get("formatter");T.attr({z2:f?0:2,style:Tg(b,{x:S,y:M,text:yO(o,k),width:isNaN(I)?null:I,height:isNaN(C)?null:C,align:"center",verticalAlign:"middle"},{inheritColor:A})}),Ng(T,{normal:b},o,(function(t){return yO(t,k)})),p&&zg(T,e,a,t,{getFormattedLabel:function(t,e,n,r,i,a){return yO(a?a.interpolatedValue:o,k)}}),g.add(T)}c.add(g)})),this.group.add(c),this._titleEls=h,this._detailEls=d},e.type="gauge",e}(tx),mO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="itemStyle",n}return a(e,t),e.prototype.getInitialData=function(t,e){return zT(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#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}},e}(j_);var _O=["itemStyle","opacity"],xO=function(t){function e(e,n){var r=t.call(this)||this,i=r,o=new _f,a=new yd;return i.setTextContent(a),r.setTextGuideLine(o),r.updateData(e,n,!0),r}return a(e,t),e.prototype.updateData=function(t,e,n){var r=this,i=t.hostModel,o=t.getItemModel(e),a=t.getItemLayout(e),s=o.getModel("emphasis"),l=o.get(_O);l=null==l?1:l,n||qf(r),r.useStyle(t.getItemVisual(e,"style")),r.style.lineJoin="round",n?(r.setShape({points:a.points}),r.style.opacity=0,Hf(r,{style:{opacity:l}},i,e)):Wf(r,{style:{opacity:l},shape:{points:a.points}},i,e),wp(r,o),this._updateLabel(t,e),mp(this,s.get("focus"),s.get("blurScope"),s.get("disabled"))},e.prototype._updateLabel=function(t,e){var n=this,r=this.getTextGuideLine(),i=n.getTextContent(),o=t.hostModel,a=t.getItemModel(e),s=t.getItemLayout(e).label,l=t.getItemVisual(e,"style"),u=l.fill;Cg(i,Ag(a),{labelFetcher:t.hostModel,labelDataIndex:e,defaultOpacity:l.opacity,defaultText:t.getName(e)},{normal:{align:s.textAlign,verticalAlign:s.verticalAlign}}),n.setTextConfig({local:!0,inside:!!s.inside,insideStroke:u,outsideFill:u});var c=s.linePoints;r.setShape({points:c}),n.textGuideLineConfig={anchor:c?new va(c[0][0],c[0][1]):null},Wf(i,{style:{x:s.x,y:s.y}},o,e),i.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),OI(n,EI(a),{stroke:u})},e}(vf),bO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreLabelLineUpdate=!0,n}return a(e,t),e.prototype.render=function(t,e,n){var r=t.getData(),i=this._data,o=this.group;r.diff(i).add((function(t){var e=new xO(r,t);r.setItemGraphicEl(t,e),o.add(e)})).update((function(t,e){var n=i.getItemGraphicEl(e);n.updateData(r,t),o.add(n),r.setItemGraphicEl(t,n)})).remove((function(e){Xf(i.getItemGraphicEl(e),t,e)})).execute(),this._data=r},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(tx),wO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new BT(Gi(this.getData,this),Gi(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.getInitialData=function(t,e){return zT(this,{coordDimensions:["value"],encodeDefaulter:ji(Sv,this)})},e.prototype._defaultLabelLine=function(t){Qu(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.prototype.getDataParams=function(e){var n=this.getData(),r=t.prototype.getDataParams.call(this,e),i=n.mapDimension("value"),o=n.getSum(i);return r.percent=o?+(n.get(i,e)/o*100).toFixed(2):0,r.$vars.push("percent"),r},e.type="series.funnel",e.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"}}},e}(j_);function SO(t,e){t.eachSeriesByType("funnel",(function(t){var n=t.getData(),r=n.mapDimension("value"),i=t.get("sort"),o=function(t,e){return Qy(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e),a=t.get("orient"),s=o.width,l=o.height,u=function(t,e){for(var n=t.mapDimension("value"),r=t.mapArray(n,(function(t){return t})),i=[],o="ascending"===e,a=0,s=t.count();a5)return;var r=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==r.behavior&&this._dispatchExpand({axisExpandWindow:r.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&NO(this,"mousemove")){var e=this._model,n=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),r=n.behavior;"jump"===r&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===r?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===r?null:{duration:0}})}}};function NO(t,e){var n=t._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===e}var zO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.prototype.init=function(){t.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var e=this.option;t&&ki(e,t,!0),this._initDimensions()},e.prototype.contains=function(t,e){var n=t.get("parallelIndex");return null!=n&&e.getComponent("parallel",n)===this},e.prototype.setAxisExpand=function(t){Ni(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],(function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])}),this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[];Ni(Vi(this.ecModel.queryComponents({mainType:"parallelAxis"}),(function(t){return(t.get("parallelIndex")||0)===this.componentIndex}),this),(function(n){t.push("dim"+n.get("dim")),e.push(n.componentIndex)}))},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(ov),BO=function(t){function e(e,n,r,i,o){var a=t.call(this,e,n,r)||this;return a.type=i||"value",a.axisIndex=o,a}return a(e,t),e.prototype.isHorizontal=function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")},e}(cI);function VO(t,e,n,r,i,o){t=t||0;var a=n[1]-n[0];if(null!=i&&(i=GO(i,[0,a])),null!=o&&(o=Math.max(o,null!=i?i:0)),"all"===r){var s=Math.abs(e[1]-e[0]);s=GO(s,[0,a]),i=o=GO(s,[i,o]),r=0}e[0]=GO(e[0],n),e[1]=GO(e[1],n);var l=FO(e,r);e[r]+=t;var u,c=i||0,h=n.slice();return l.sign<0?h[0]+=c:h[1]-=c,e[r]=GO(e[r],h),u=FO(e,r),null!=i&&(u.sign!==l.sign||u.spano&&(e[1-r]=e[r]+u.sign*o),e}function FO(t,e){var n=t[e]-t[1-e];return{span:Math.abs(n),sign:n>0?-1:n<0?1:e?-1:1}}function GO(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}var jO=Ni,WO=Math.min,HO=Math.max,UO=Math.floor,ZO=Math.ceil,YO=Tu,XO=Math.PI,qO=function(){function t(t,e,n){this.type="parallel",this._axesMap=fo(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,n)}return t.prototype._init=function(t,e,n){var r=t.dimensions,i=t.parallelAxisIndex;jO(r,(function(t,n){var r=i[n],o=e.getComponent("parallelAxis",r),a=this._axesMap.set(t,new BO(t,PM(o),[0,0],o.get("type"),r)),s="category"===a.type;a.onBand=s&&o.get("boundaryGap"),a.inverse=o.get("inverse"),o.axis=a,a.model=o,a.coordinateSystem=o.coordinateSystem=this}),this)},t.prototype.update=function(t,e){this._updateAxesFromSeries(this._model,t)},t.prototype.containPoint=function(t){var e=this._makeLayoutInfo(),n=e.axisBase,r=e.layoutBase,i=e.pixelDimIndex,o=t[1-i],a=t[i];return o>=n&&o<=n+e.axisLength&&a>=r&&a<=r+e.layoutLength},t.prototype.getModel=function(){return this._model},t.prototype._updateAxesFromSeries=function(t,e){e.eachSeries((function(n){if(t.contains(n,e)){var r=n.getData();jO(this.dimensions,(function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(r,r.mapDimension(t)),DM(e.scale,e.model)}),this)}}),this)},t.prototype.resize=function(t,e){this._rect=Qy(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},t.prototype.getRect=function(){return this._rect},t.prototype._makeLayoutInfo=function(){var t,e=this._model,n=this._rect,r=["x","y"],i=["width","height"],o=e.get("layout"),a="horizontal"===o?0:1,s=n[i[a]],l=[0,s],u=this.dimensions.length,c=KO(e.get("axisExpandWidth"),l),h=KO(e.get("axisExpandCount")||0,[0,u]),d=e.get("axisExpandable")&&u>3&&u>h&&h>1&&c>0&&s>0,p=e.get("axisExpandWindow");p?(t=KO(p[1]-p[0],l),p[1]=p[0]+t):(t=KO(c*(h-1),l),(p=[c*(e.get("axisExpandCenter")||UO(u/2))-t/2])[1]=p[0]+t);var f=(s-t)/(u-h);f<3&&(f=0);var g=[UO(YO(p[0]/c,1))+1,ZO(YO(p[1]/c,1))-1],y=f/c*p[0];return{layout:o,pixelDimIndex:a,layoutBase:n[r[a]],layoutLength:s,axisBase:n[r[1-a]],axisLength:n[i[1-a]],axisExpandable:d,axisExpandWidth:c,axisCollapseWidth:f,axisExpandWindow:p,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:y}},t.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,n=this.dimensions,r=this._makeLayoutInfo(),i=r.layout;e.each((function(t){var e=[0,r.axisLength],n=t.inverse?1:0;t.setExtent(e[n],e[1-n])})),jO(n,(function(e,n){var o=(r.axisExpandable?QO:$O)(n,r),a={horizontal:{x:o.position,y:r.axisLength},vertical:{x:0,y:o.position}},s={horizontal:XO/2,vertical:0},l=[a[i].x+t.x,a[i].y+t.y],u=s[i],c=[1,0,0,1,0,0];fa(c,c,u),pa(c,c,l),this._axesLayout[e]={position:l,rotation:u,transform:c,axisNameAvailableWidth:o.axisNameAvailableWidth,axisLabelShow:o.axisLabelShow,nameTruncateMaxWidth:o.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}}),this)},t.prototype.getAxis=function(t){return this._axesMap.get(t)},t.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},t.prototype.eachActiveState=function(t,e,n,r){null==n&&(n=0),null==r&&(r=t.count());var i=this._axesMap,o=this.dimensions,a=[],s=[];Ni(o,(function(e){a.push(t.mapDimension(e)),s.push(i.get(e).model)}));for(var l=this.hasAxisBrushed(),u=n;ui*(1-c[0])?(l="jump",a=s-i*(1-c[2])):(a=s-i*c[1])>=0&&(a=s-i*(1-c[1]))<=0&&(a=0),(a*=e.axisExpandWidth/u)?VO(a,r,o,"all"):l="none";else{var d=r[1]-r[0];(r=[HO(0,o[1]*s/d-d/2)])[1]=WO(o[1],r[0]+d),r[0]=r[1]-d}return{axisExpandWindow:r,behavior:l}},t}();function KO(t,e){return WO(HO(t,e[0]),e[1])}function $O(t,e){var n=e.layoutLength/(e.axisCount-1);return{position:n*t,axisNameAvailableWidth:n,axisLabelShow:!0}}function QO(t,e){var n,r,i=e.layoutLength,o=e.axisExpandWidth,a=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,u=s,c=!1;return t=0;n--)ku(e[n])},e.prototype.getActiveState=function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(+t))return"inactive";if(1===e.length){var n=e[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var r=0,i=e.length;r6}(t)||o){if(a&&!o){"single"===s.brushMode&&_E(t);var l=Ti(s);l.brushType=NE(l.brushType,a),l.panelId=a===eE?null:a.panelId,o=t._creatingCover=hE(t,l),t._covers.push(o)}if(o){var u=VE[NE(t._brushType,a)];o.__brushOption.range=u.getCreatingRange(PE(t,o,t._track)),r&&(dE(t,o),u.updateCommon(t,o)),pE(t,o),i={isEnd:r}}}else r&&"single"===s.brushMode&&s.removeOnClick&&vE(t,e,n)&&_E(t)&&(i={isEnd:r,removeOnClick:!0});return i}function NE(t,e){return"auto"===t?e.defaultBrushType:t}var zE={mousedown:function(t){if(this._dragging)BE(this,t);else if(!t.target||!t.target.draggable){RE(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=vE(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,n=t.offsetY,r=this.group.transformCoordToLocal(e,n);if(function(t,e,n){if(t._brushType&&!function(t,e,n){var r=t._zr;return e<0||e>r.getWidth()||n<0||n>r.getHeight()}(t,e.offsetX,e.offsetY)){var r=t._zr,i=t._covers,o=vE(t,e,n);if(!t._dragging)for(var a=0;a=0&&(o[i[a].depth]=new Kg(i[a],this,e));var s=hO(r,n,this,!0,(function(t,e){t.wrapMethod("getItemModel",(function(t,e){var n=t.parentModel,r=n.getData().getItemLayout(e);if(r){var i=r.depth,o=n.levelModels[i];o&&(t.parentModel=o)}return t})),e.wrapMethod("getItemModel",(function(t,e){var n=t.parentModel,r=n.getGraph().getEdgeByIndex(e).node1.getLayout();if(r){var i=r.depth,o=n.levelModels[i];o&&(t.parentModel=o)}return t}))}));return s.data},e.prototype.setNodePosition=function(t,e){var n=(this.option.data||this.option.nodes)[t];n.localX=e[0],n.localY=e[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,e,n){function r(t){return isNaN(t)||null==t}if("edge"===n){var i=this.getDataParams(t,n),o=i.data,a=i.value;return C_("nameValue",{name:o.source+" -- "+o.target,value:a,noValue:r(a)})}var s=this.getGraph().getNodeByIndex(t).getLayout().value,l=this.getDataParams(t,n).data.name;return C_("nameValue",{name:null!=l?l+"":null,value:s,noValue:r(s)})},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(e,n){var r=t.prototype.getDataParams.call(this,e,n);if(null==r.value&&"node"===n){var i=this.getGraph().getNodeByIndex(e).getLayout().value;r.value=i}return r},e.type="series.sankey",e.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},e}(j_);function eN(t,e){t.eachSeriesByType("sankey",(function(t){var n=t.get("nodeWidth"),r=t.get("nodeGap"),i=function(t,e){return Qy(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=i;var o=i.width,a=i.height,s=t.getGraph(),l=s.nodes,u=s.edges;!function(t){Ni(t,(function(t){var e=hN(t.outEdges,cN),n=hN(t.inEdges,cN),r=t.getValue()||0,i=Math.max(e,n,r);t.setLayout({value:i},!0)}))}(l);var c=Vi(l,(function(t){return 0===t.getLayout().value}));!function(t,e,n,r,i,o,a,s,l){(function(t,e,n,r,i,o,a){for(var s=[],l=[],u=[],c=[],h=0,d=0;d=0;v&&y.depth>p&&(p=y.depth),g.setLayout({depth:v?y.depth:h},!0),"vertical"===o?g.setLayout({dy:n},!0):g.setLayout({dx:n},!0);for(var m=0;mh-1?p:h-1;a&&"left"!==a&&function(t,e,n,r){if("right"===e){for(var i=[],o=t,a=0;o.length;){for(var s=0;s0;o--)iN(s,l*=.99,a),rN(s,i,n,r,a),dN(s,l,a),rN(s,i,n,r,a)}(t,e,o,i,r,a,s),function(t,e){var n="vertical"===e?"x":"y";Ni(t,(function(t){t.outEdges.sort((function(t,e){return t.node2.getLayout()[n]-e.node2.getLayout()[n]})),t.inEdges.sort((function(t,e){return t.node1.getLayout()[n]-e.node1.getLayout()[n]}))})),Ni(t,(function(t){var e=0,n=0;Ni(t.outEdges,(function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy})),Ni(t.inEdges,(function(t){t.setLayout({ty:n},!0),n+=t.getLayout().dy}))}))}(t,s)}(l,u,n,r,o,a,0!==c.length?0:t.get("layoutIterations"),t.get("orient"),t.get("nodeAlign"))}))}function nN(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=e.depth&&e.depth>=0}function rN(t,e,n,r,i){var o="vertical"===i?"x":"y";Ni(t,(function(t){var a,s,l;t.sort((function(t,e){return t.getLayout()[o]-e.getLayout()[o]}));for(var u=0,c=t.length,h="vertical"===i?"dx":"dy",d=0;d0&&(a=s.getLayout()[o]+l,"vertical"===i?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[o]+s.getLayout()[h]+e;if((l=u-e-("vertical"===i?r:n))>0){a=s.getLayout()[o]-l,"vertical"===i?s.setLayout({x:a},!0):s.setLayout({y:a},!0),u=a;for(d=c-2;d>=0;--d)(l=(s=t[d]).getLayout()[o]+s.getLayout()[h]+e-u)>0&&(a=s.getLayout()[o]-l,"vertical"===i?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[o]}}))}function iN(t,e,n){Ni(t.slice().reverse(),(function(t){Ni(t,(function(t){if(t.outEdges.length){var r=hN(t.outEdges,oN,n)/hN(t.outEdges,cN);if(isNaN(r)){var i=t.outEdges.length;r=i?hN(t.outEdges,aN,n)/i:0}if("vertical"===n){var o=t.getLayout().x+(r-uN(t,n))*e;t.setLayout({x:o},!0)}else{var a=t.getLayout().y+(r-uN(t,n))*e;t.setLayout({y:a},!0)}}}))}))}function oN(t,e){return uN(t.node2,e)*t.getValue()}function aN(t,e){return uN(t.node2,e)}function sN(t,e){return uN(t.node1,e)*t.getValue()}function lN(t,e){return uN(t.node1,e)}function uN(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function cN(t){return t.getValue()}function hN(t,e,n){for(var r=0,i=t.length,o=-1;++oo&&(o=e)})),Ni(n,(function(e){var n=new PP({type:"color",mappingMethod:"linear",dataExtent:[i,o],visual:t.get("color")}).mapValueToVisual(e.getLayout().value),r=e.getModel().get(["itemStyle","color"]);null!=r?(e.setVisual("color",r),e.setVisual("style",{fill:r})):(e.setVisual("color",n),e.setVisual("style",{fill:n}))}))}r.length&&Ni(r,(function(t){var e=t.getModel().get("lineStyle");t.setVisual("style",e)}))}))}var fN=function(){function t(){}return t.prototype._hasEncodeRule=function(t){var e=this.getEncode();return e&&null!=e.get(t)},t.prototype.getInitialData=function(t,e){var n,r,i=e.getComponent("xAxis",this.get("xAxisIndex")),o=e.getComponent("yAxis",this.get("yAxisIndex")),a=i.get("type"),s=o.get("type");"category"===a?(t.layout="horizontal",n=i.getOrdinalMeta(),r=!this._hasEncodeRule("x")):"category"===s?(t.layout="vertical",n=o.getOrdinalMeta(),r=!this._hasEncodeRule("y")):t.layout=t.layout||"horizontal";var l=["x","y"],u="horizontal"===t.layout?0:1,c=this._baseAxisDim=l[u],h=l[1-u],d=[i,o],p=d[u].get("type"),f=d[1-u].get("type"),g=t.data;if(g&&r){var y=[];Ni(g,(function(t,e){var n;Wi(t)?(n=t.slice(),t.unshift(e)):Wi(t.value)?((n=Di({},t)).value=n.value.slice(),t.value.unshift(e)):n=t,y.push(n)})),t.data=y}var v=this.defaultValueDimensions,m=[{name:c,type:nS(p),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:nS(f),dimsDef:v.slice()}];return zT(this,{coordDimensions:m,dimensionsCount:v.length+1,encodeDefaulter:ji(wv,m,this)})},t.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},t}(),gN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.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 a(e,t),e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.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},e}(j_);Oi(gN,fN,!0);var yN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.prototype.render=function(t,e,n){var r=t.getData(),i=this.group,o=this._data;this._data||i.removeAll();var a="horizontal"===t.get("layout")?1:0;r.diff(o).add((function(t){if(r.hasValue(t)){var e=_N(r.getItemLayout(t),r,t,a,!0);r.setItemGraphicEl(t,e),i.add(e)}})).update((function(t,e){var n=o.getItemGraphicEl(e);if(r.hasValue(t)){var s=r.getItemLayout(t);n?(qf(n),xN(s,n,r,t)):n=_N(s,r,t,a),i.add(n),r.setItemGraphicEl(t,n)}else i.remove(n)})).remove((function(t){var e=o.getItemGraphicEl(t);e&&i.remove(e)})).execute(),this._data=r},e.prototype.remove=function(t){var e=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl((function(t){t&&e.remove(t)}))},e.type="boxplot",e}(tx),vN=function(){},mN=function(t){function e(e){var n=t.call(this,e)||this;return n.type="boxplotBoxPath",n}return a(e,t),e.prototype.getDefaultShape=function(){return new vN},e.prototype.buildPath=function(t,e){var n=e.points,r=0;for(t.moveTo(n[r][0],n[r][1]),r++;r<4;r++)t.lineTo(n[r][0],n[r][1]);for(t.closePath();rg){var x=[v,_];r.push(x)}}}return{boxData:n,outliers:r}}(e.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};var IN=["itemStyle","borderColor"],CN=["itemStyle","borderColor0"],AN=["itemStyle","borderColorDoji"],TN=["itemStyle","color"],kN=["itemStyle","color0"];function LN(t,e){return e.get(t>0?TN:kN)}function DN(t,e){return e.get(0===t?AN:t>0?IN:CN)}var PN={seriesType:"candlestick",plan:$_(),performRawSeries:!0,reset:function(t,e){if(!e.isSeriesFiltered(t))return!t.pipelineContext.large&&{progress:function(t,e){for(var n;null!=(n=t.next());){var r=e.getItemModel(n),i=e.getItemLayout(n).sign,o=r.getItemStyle();o.fill=LN(i,r),o.stroke=DN(i,r)||o.fill,Di(e.ensureUniqueItemVisual(n,"style"),o)}}}}},RN=["color","borderColor"],ON=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.prototype.render=function(t,e,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,e,n){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,e,n,r){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},e.prototype.eachRendered=function(t){bg(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var e=t.pipelineContext.large;null!=this._isLargeDraw&&e===this._isLargeDraw||(this._isLargeDraw=e,this._clear())},e.prototype._renderNormal=function(t){var e=t.getData(),n=this._data,r=this.group,i=e.getLayout("isSimpleBox"),o=t.get("clip",!0),a=t.coordinateSystem,s=a.getArea&&a.getArea();this._data||r.removeAll(),e.diff(n).add((function(n){if(e.hasValue(n)){var a=e.getItemLayout(n);if(o&&BN(s,a))return;var l=zN(a,n,!0);Hf(l,{shape:{points:a.ends}},t,n),VN(l,e,n,i),r.add(l),e.setItemGraphicEl(n,l)}})).update((function(a,l){var u=n.getItemGraphicEl(l);if(e.hasValue(a)){var c=e.getItemLayout(a);o&&BN(s,c)?r.remove(u):(u?(Wf(u,{shape:{points:c.ends}},t,a),qf(u)):u=zN(c),VN(u,e,a,i),r.add(u),e.setItemGraphicEl(a,u))}else r.remove(u)})).remove((function(t){var e=n.getItemGraphicEl(t);e&&r.remove(e)})).execute(),this._data=e},e.prototype._renderLarge=function(t){this._clear(),WN(t,this.group);var e=t.get("clip",!0)?EA(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,e){for(var n,r=e.getData(),i=r.getLayout("isSimpleBox");null!=(n=t.next());){var o=zN(r.getItemLayout(n));VN(o,r,n,i),o.incremental=!0,this.group.add(o),this._progressiveEls.push(o)}},e.prototype._incrementalRenderLarge=function(t,e){WN(e,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(tx),EN=function(){},NN=function(t){function e(e){var n=t.call(this,e)||this;return n.type="normalCandlestickBox",n}return a(e,t),e.prototype.getDefaultShape=function(){return new EN},e.prototype.buildPath=function(t,e){var n=e.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))},e}(ed);function zN(t,e,n){var r=t.ends;return new NN({shape:{points:n?FN(r,t):r},z2:100})}function BN(t,e){for(var n=!0,r=0;rp?_[1]:m[1],ends:w,brushRect:C(f,g,h)})}function M(t,n){var r=[];return r[0]=n,r[1]=t,isNaN(n)||isNaN(t)?[NaN,NaN]:e.dataToPoint(r)}function I(t,e,n){var i=e.slice(),o=e.slice();i[0]=lg(i[0]+r/2,1,!1),o[0]=lg(o[0]-r/2,1,!0),n?t.push(i,o):t.push(o,i)}function C(t,e,n){var i=M(t,n),o=M(e,n);return i[0]-=r/2,o[0]-=r/2,{x:i[0],y:i[1],width:r,height:o[1]-i[1]}}function A(t){return t[0]=lg(t[0],1),t}}}}};function XN(t,e,n,r,i,o){return n>r?-1:n0?t.get(i,e-1)<=r?1:-1:1}function qN(t,e){var n=e.rippleEffectColor||e.color;t.eachChild((function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?n:null,fill:"fill"===e.brushType?n:null}})}))}var KN=function(t){function e(e,n){var r=t.call(this)||this,i=new vA(e,n),o=new xu;return r.add(i),r.add(o),r.updateData(e,n),r}return a(e,t),e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var e=t.symbolType,n=t.color,r=t.rippleNumber,i=this.childAt(1),o=0;o0&&(o=this._getLineLength(r)/l*1e3),o!==this._period||a!==this._loop||s!==this._roundTrip){r.stopAnimation();var c=void 0;c=Hi(u)?u(n):u,r.__t>0&&(c=-o*r.__t),this._animateSymbol(r,o,c,a,s)}this._period=o,this._loop=a,this._roundTrip=s}},e.prototype._animateSymbol=function(t,e,n,r,i){if(e>0){t.__t=0;var o=this,a=t.animate("",r).when(i?2*e:e,{__t:i?2:1}).delay(n).during((function(){o._updateSymbolPosition(t)}));r||a.done((function(){o.remove(t)})),a.start()}},e.prototype._getLineLength=function(t){return Po(t.__p1,t.__cp1)+Po(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},e.prototype.updateData=function(t,e,n){this.childAt(0).updateData(t,e,n),this._updateEffectSymbol(t,e)},e.prototype._updateSymbolPosition=function(t){var e=t.__p1,n=t.__p2,r=t.__cp1,i=t.__t<1?t.__t:2-t.__t,o=[t.x,t.y],a=o.slice(),s=ds,l=ps;o[0]=s(e[0],r[0],n[0],i),o[1]=s(e[1],r[1],n[1],i);var u=t.__t<1?l(e[0],r[0],n[0],i):l(n[0],r[0],e[0],1-i),c=t.__t<1?l(e[1],r[1],n[1],i):l(n[1],r[1],e[1],1-i);t.rotation=-Math.atan2(c,u)-Math.PI/2,"line"!==this._symbolType&&"rect"!==this._symbolType&&"roundRect"!==this._symbolType||(void 0!==t.__lastT&&t.__lastT=0&&!(r[o]<=e);o--);o=Math.min(o,i-2)}else{for(o=a;oe);o++);o=Math.min(o-1,i-2)}var s=(e-r[o])/(r[o+1]-r[o]),l=n[o],u=n[o+1];t.x=l[0]*(1-s)+s*u[0],t.y=l[1]*(1-s)+s*u[1];var c=t.__t<1?u[0]-l[0]:l[0]-u[0],h=t.__t<1?u[1]-l[1]:l[1]-u[1];t.rotation=-Math.atan2(h,c)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=e,t.ignore=!1}},e}(JN),nz=function(){this.polyline=!1,this.curveness=0,this.segs=[]},rz=function(t){function e(e){var n=t.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return a(e,t),e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new nz},e.prototype.buildPath=function(t,e){var n,r=e.segs,i=e.curveness;if(e.polyline)for(n=this._off;n0){t.moveTo(r[n++],r[n++]);for(var a=1;a0){var h=(s+u)/2-(l-c)*i,d=(l+c)/2-(u-s)*i;t.quadraticCurveTo(h,d,u,c)}else t.lineTo(u,c)}this.incremental&&(this._off=n,this.notClear=!0)},e.prototype.findDataIndex=function(t,e){var n=this.shape,r=n.segs,i=n.curveness,o=this.style.lineWidth;if(n.polyline)for(var a=0,s=0;s0)for(var u=r[s++],c=r[s++],h=1;h0){if(Bh(u,c,(u+d)/2-(c-p)*i,(c+p)/2-(d-u)*i,d,p,o,t,e))return a}else if(Nh(u,c,d,p,o,t,e))return a;a++}return-1},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),r=this.getBoundingRect();return t=n[0],e=n[1],r.contain(t,e)?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var e=this.shape.segs,n=1/0,r=1/0,i=-1/0,o=-1/0,a=0;a0&&(o.dataIndex=n+t.__startIndex)}))},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),oz={seriesType:"lines",plan:$_(),reset:function(t){var e=t.coordinateSystem;if(e){var n=t.get("polyline"),r=t.pipelineContext.large;return{progress:function(i,o){var a=[];if(r){var s=void 0,l=i.end-i.start;if(n){for(var u=0,c=i.start;c0&&(l||s.configLayer(o,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(a/10+.9,1),0)})),i.updateData(r);var u=t.get("clip",!0)&&EA(t.coordinateSystem,!1,t);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=o,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,n){var r=t.getData();this._updateLineDraw(r,t).incrementalPrepareUpdate(r),this._clearLayer(n),this._finished=!1},e.prototype.incrementalRender=function(t,e,n){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,e,n){var r=t.getData(),i=t.pipelineContext;if(!this._finished||i.large||i.progressiveRender)return{update:!0};var o=oz.reset(t,e,n);o.progress&&o.progress({start:0,end:r.count(),count:r.count()},r),this._lineDraw.updateLayout(),this._clearLayer(n)},e.prototype._updateLineDraw=function(t,e){var n=this._lineDraw,r=this._showEffect(e),i=!!e.get("polyline"),o=e.pipelineContext.large;return n&&r===this._hasEffet&&i===this._isPolyline&&o===this._isLargeDraw||(n&&n.remove(),n=this._lineDraw=o?new iz:new ZR(i?r?ez:tz:r?JN:UR),this._hasEffet=r,this._isPolyline=i,this._isLargeDraw=o),this.group.add(n.group),n},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var e=t.getZr();"svg"===e.painter.getType()||null==this._lastZlevel||e.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},e.prototype.dispose=function(t,e){this.remove(t,e)},e.type="lines",e}(tx),sz="undefined"==typeof Uint32Array?Array:Uint32Array,lz="undefined"==typeof Float64Array?Array:Float64Array;function uz(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=zi(e,(function(t){var e={coords:[t[0].coord,t[1].coord]};return t[0].name&&(e.fromName=t[0].name),t[1].name&&(e.toName=t[1].name),Li([e,t[0],t[1]])})))}var cz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="lineStyle",n.visualDrawType="stroke",n}return a(e,t),e.prototype.init=function(e){e.data=e.data||[],uz(e);var n=this._processFlatCoordsArray(e.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(e.data=new Float32Array(n.count)),t.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(e){if(uz(e),e.data){var n=this._processFlatCoordsArray(e.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(e.data=new Float32Array(n.count))}t.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=go(this._flatCoords,e.flatCoords),this._flatCoordsOffset=go(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var e=this.getData().getItemModel(t);return e.option instanceof Array?e.option:e.getShallow("coords")},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,e){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[2*t],r=this._flatCoordsOffset[2*t+1],i=0;i ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),e=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&e>0?e+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(j_);function hz(t){return t instanceof Array||(t=[t,t]),t}var dz={seriesType:"lines",reset:function(t){var e=hz(t.get("symbol")),n=hz(t.get("symbolSize")),r=t.getData();return r.setVisual("fromSymbol",e&&e[0]),r.setVisual("toSymbol",e&&e[1]),r.setVisual("fromSymbolSize",n&&n[0]),r.setVisual("toSymbolSize",n&&n[1]),{dataEach:r.hasItemOption?function(t,e){var n=t.getItemModel(e),r=hz(n.getShallow("symbol",!0)),i=hz(n.getShallow("symbolSize",!0));r[0]&&t.setItemVisual(e,"fromSymbol",r[0]),r[1]&&t.setItemVisual(e,"toSymbol",r[1]),i[0]&&t.setItemVisual(e,"fromSymbolSize",i[0]),i[1]&&t.setItemVisual(e,"toSymbolSize",i[1])}:null}}};var pz=function(){function t(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=pi.createCanvas();this.canvas=t}return t.prototype.update=function(t,e,n,r,i,o){var a=this._getBrush(),s=this._getGradient(i,"inRange"),l=this._getGradient(i,"outOfRange"),u=this.pointSize+this.blurSize,c=this.canvas,h=c.getContext("2d"),d=t.length;c.width=e,c.height=n;for(var p=0;p0){var I=o(v)?s:l;v>0&&(v=v*S+w),_[x++]=I[M],_[x++]=I[M+1],_[x++]=I[M+2],_[x++]=I[M+3]*v*256}else x+=4}return h.putImageData(m,0,0),c},t.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=pi.createCanvas()),e=this.pointSize+this.blurSize,n=2*e;t.width=n,t.height=n;var r=t.getContext("2d");return r.clearRect(0,0,n,n),r.shadowOffsetX=n,r.shadowBlur=this.blurSize,r.shadowColor="#000",r.beginPath(),r.arc(-e,e,this.pointSize,0,2*Math.PI,!0),r.closePath(),r.fill(),t},t.prototype._getGradient=function(t,e){for(var n=this._gradientPixels,r=n[e]||(n[e]=new Uint8ClampedArray(1024)),i=[0,0,0,0],o=0,a=0;a<256;a++)t[e](a/255,!0,i),r[o++]=i[0],r[o++]=i[1],r[o++]=i[2],r[o++]=i[3];return r},t}();function fz(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}var gz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.prototype.render=function(t,e,n){var r;e.eachComponent("visualMap",(function(e){e.eachTargetSeries((function(n){n===t&&(r=e)}))})),this._progressiveEls=null,this.group.removeAll();var i=t.coordinateSystem;"cartesian2d"===i.type||"calendar"===i.type?this._renderOnCartesianAndCalendar(t,n,0,t.getData().count()):fz(i)&&this._renderOnGeo(i,t,r,n)},e.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll()},e.prototype.incrementalRender=function(t,e,n,r){var i=e.coordinateSystem;i&&(fz(i)?this.render(e,n,r):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(e,r,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){bg(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,e,n,r,i){var o,a,s,l,u=t.coordinateSystem,c=NA(u,"cartesian2d");if(c){var h=u.getAxis("x"),d=u.getAxis("y");o=h.getBandWidth()+.5,a=d.getBandWidth()+.5,s=h.scale.getExtent(),l=d.scale.getExtent()}for(var p=this.group,f=t.getData(),g=t.getModel(["emphasis","itemStyle"]).getItemStyle(),y=t.getModel(["blur","itemStyle"]).getItemStyle(),v=t.getModel(["select","itemStyle"]).getItemStyle(),m=t.get(["itemStyle","borderRadius"]),_=Ag(t),x=t.getModel("emphasis"),b=x.get("focus"),w=x.get("blurScope"),S=x.get("disabled"),M=c?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],I=n;Is[1]||kl[1])continue;var L=u.dataToPoint([T,k]);C=new pd({shape:{x:L[0]-o/2,y:L[1]-a/2,width:o,height:a},style:A})}else{if(isNaN(f.get(M[1],I)))continue;C=new pd({z2:1,shape:u.dataToRect([f.get(M[0],I)]).contentShape,style:A})}if(f.hasItemOption){var D=f.getItemModel(I),P=D.getModel("emphasis");g=P.getModel("itemStyle").getItemStyle(),y=D.getModel(["blur","itemStyle"]).getItemStyle(),v=D.getModel(["select","itemStyle"]).getItemStyle(),m=D.get(["itemStyle","borderRadius"]),b=P.get("focus"),w=P.get("blurScope"),S=P.get("disabled"),_=Ag(D)}C.shape.r=m;var R=t.getRawValue(I),O="-";R&&null!=R[2]&&(O=R[2]+""),Cg(C,_,{labelFetcher:t,labelDataIndex:I,defaultOpacity:A.opacity,defaultText:O}),C.ensureState("emphasis").style=g,C.ensureState("blur").style=y,C.ensureState("select").style=v,mp(C,b,w,S),C.incremental=i,i&&(C.states.emphasis.hoverLayer=!0),p.add(C),f.setItemGraphicEl(I,C),this._progressiveEls&&this._progressiveEls.push(C)}},e.prototype._renderOnGeo=function(t,e,n,r){var i=n.targetVisuals.inRange,o=n.targetVisuals.outOfRange,a=e.getData(),s=this._hmLayer||this._hmLayer||new pz;s.blurSize=e.get("blurSize"),s.pointSize=e.get("pointSize"),s.minOpacity=e.get("minOpacity"),s.maxOpacity=e.get("maxOpacity");var l=t.getViewRect().clone(),u=t.getRoamTransform();l.applyTransform(u);var c=Math.max(l.x,0),h=Math.max(l.y,0),d=Math.min(l.width+l.x,r.getWidth()),p=Math.min(l.height+l.y,r.getHeight()),f=d-c,g=p-h,y=[a.mapDimension("lng"),a.mapDimension("lat"),a.mapDimension("value")],v=a.mapArray(y,(function(e,n,r){var i=t.dataToPoint([e,n]);return i[0]-=c,i[1]-=h,i.push(r),i})),m=n.getExtent(),_="visualMap.continuous"===n.type?function(t,e){var n=t[1]-t[0];return e=[(e[0]-t[0])/n,(e[1]-t[0])/n],function(t){return t>=e[0]&&t<=e[1]}}(m,n.option.range):function(t,e,n){var r=t[1]-t[0],i=(e=zi(e,(function(e){return{interval:[(e.interval[0]-t[0])/r,(e.interval[1]-t[0])/r]}}))).length,o=0;return function(t){var r;for(r=o;r=0;r--){var a;if((a=e[r].interval)[0]<=t&&t<=a[1]){o=r;break}}return r>=0&&r=0?1:-1:o>0?1:-1}(n,o,i,r,h),function(t,e,n,r,i,o,a,s,l,u){var c,h=l.valueDim,d=l.categoryDim,p=Math.abs(n[d.wh]),f=t.getItemVisual(e,"symbolSize");c=Wi(f)?f.slice():null==f?["100%","100%"]:[f,f];c[d.index]=Au(c[d.index],p),c[h.index]=Au(c[h.index],r?p:Math.abs(o)),u.symbolSize=c;var g=u.symbolScale=[c[0]/s,c[1]/s];g[h.index]*=(l.isHorizontal?-1:1)*a}(t,e,i,o,0,h.boundingLength,h.pxSign,u,r,h),function(t,e,n,r,i){var o=t.get(vz)||0;o&&(_z.attr({scaleX:e[0],scaleY:e[1],rotation:n}),_z.updateTransform(),o/=_z.getLineScale(),o*=e[r.valueDim.index]);i.valueLineWidth=o||0}(n,h.symbolScale,l,r,h);var d=h.symbolSize,p=gb(n.get("symbolOffset"),d);return function(t,e,n,r,i,o,a,s,l,u,c,h){var d=c.categoryDim,p=c.valueDim,f=h.pxSign,g=Math.max(e[p.index]+s,0),y=g;if(r){var v=Math.abs(l),m=to(t.get("symbolMargin"),"15%")+"",_=!1;m.lastIndexOf("!")===m.length-1&&(_=!0,m=m.slice(0,m.length-1));var x=Au(m,e[p.index]),b=Math.max(g+2*x,0),w=_?0:2*x,S=Wu(r),M=S?r:zz((v+w)/b);b=g+2*(x=(v-M*g)/2/(_?M:Math.max(M-1,1))),w=_?0:2*x,S||"fixed"===r||(M=u?zz((Math.abs(u)+w)/b):0),y=M*b-w,h.repeatTimes=M,h.symbolMargin=x}var I=f*(y/2),C=h.pathPosition=[];C[d.index]=n[d.wh]/2,C[p.index]="start"===a?I:"end"===a?l-I:l/2,o&&(C[0]+=o[0],C[1]+=o[1]);var A=h.bundlePosition=[];A[d.index]=n[d.xy],A[p.index]=n[p.xy];var T=h.barRectShape=Di({},n);T[p.wh]=f*Math.max(Math.abs(n[p.wh]),Math.abs(C[p.index]+I)),T[d.wh]=n[d.wh];var k=h.clipShape={};k[d.xy]=-n[d.xy],k[d.wh]=c.ecSize[d.wh],k[p.xy]=0,k[p.wh]=n[p.wh]}(n,d,i,o,0,p,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,r,h),h}function wz(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function Sz(t){var e=t.symbolPatternSize,n=pb(t.symbolType,-e/2,-e/2,e,e);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function Mz(t,e,n,r){var i=t.__pictorialBundle,o=n.symbolSize,a=n.valueLineWidth,s=n.pathPosition,l=e.valueDim,u=n.repeatTimes||0,c=0,h=o[e.valueDim.index]+a+2*n.symbolMargin;for(Oz(t,(function(t){t.__pictorialAnimationIndex=c,t.__pictorialRepeatTimes=u,c0:r<0)&&(i=u-1-t),e[l.index]=h*(i-u/2+.5)+s[l.index],{x:e[0],y:e[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation}}}function Iz(t,e,n,r){var i=t.__pictorialBundle,o=t.__pictorialMainPath;o?Ez(o,null,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation},n,r):(o=t.__pictorialMainPath=Sz(n),i.add(o),Ez(o,{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 Cz(t,e,n){var r=Di({},e.barRectShape),i=t.__pictorialBarRect;i?Ez(i,null,{shape:r},e,n):((i=t.__pictorialBarRect=new pd({z2:2,shape:r,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}})).disableMorphing=!0,t.add(i))}function Az(t,e,n,r){if(n.symbolClip){var i=t.__pictorialClipPath,o=Di({},n.clipShape),a=e.valueDim,s=n.animationModel,l=n.dataIndex;if(i)Wf(i,{shape:o},s,l);else{o[a.wh]=0,i=new pd({shape:o}),t.__pictorialBundle.setClipPath(i),t.__pictorialClipPath=i;var u={};u[a.wh]=n.clipShape[a.wh],wg[r?"updateProps":"initProps"](i,{shape:u},s,l)}}}function Tz(t,e){var n=t.getItemModel(e);return n.getAnimationDelayParams=kz,n.isAnimationEnabled=Lz,n}function kz(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function Lz(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function Dz(t,e,n,r){var i=new xu,o=new xu;return i.add(o),i.__pictorialBundle=o,o.x=n.bundlePosition[0],o.y=n.bundlePosition[1],n.symbolRepeat?Mz(i,e,n):Iz(i,0,n),Cz(i,n,r),Az(i,e,n,r),i.__pictorialShapeStr=Rz(t,n),i.__pictorialSymbolMeta=n,i}function Pz(t,e,n,r){var i=r.__pictorialBarRect;i&&i.removeTextContent();var o=[];Oz(r,(function(t){o.push(t)})),r.__pictorialMainPath&&o.push(r.__pictorialMainPath),r.__pictorialClipPath&&(n=null),Ni(o,(function(t){Zf(t,{scaleX:0,scaleY:0},n,e,(function(){r.parent&&r.parent.remove(r)}))})),t.setItemGraphicEl(e,null)}function Rz(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function Oz(t,e,n){Ni(t.__pictorialBundle.children(),(function(r){r!==t.__pictorialBarRect&&e.call(n,r)}))}function Ez(t,e,n,r,i,o){e&&t.attr(e),r.symbolClip&&!i?n&&t.attr(n):n&&wg[i?"updateProps":"initProps"](t,n,r.animationModel,r.dataIndex,o)}function Nz(t,e,n){var r=n.dataIndex,i=n.itemModel,o=i.getModel("emphasis"),a=o.getModel("itemStyle").getItemStyle(),s=i.getModel(["blur","itemStyle"]).getItemStyle(),l=i.getModel(["select","itemStyle"]).getItemStyle(),u=i.getShallow("cursor"),c=o.get("focus"),h=o.get("blurScope"),d=o.get("scale");Oz(t,(function(t){if(t instanceof ad){var e=t.style;t.useStyle(Di({image:e.image,x:e.x,y:e.y,width:e.width,height:e.height},n.style))}else t.useStyle(n.style);var r=t.ensureState("emphasis");r.style=a,d&&(r.scaleX=1.1*t.scaleX,r.scaleY=1.1*t.scaleY),t.ensureState("blur").style=s,t.ensureState("select").style=l,u&&(t.cursor=u),t.z2=n.z2}));var p=e.valueDim.posDesc[+(n.boundingLength>0)],f=t.__pictorialBarRect;f.ignoreClip=!0,Cg(f,Ag(i),{labelFetcher:e.seriesModel,labelDataIndex:r,defaultText:gA(e.seriesModel.getData(),r),inheritColor:n.style.fill,defaultOpacity:n.style.opacity,defaultOutsidePosition:p}),mp(t,c,h,o.get("disabled"))}function zz(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}var Bz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n.defaultSymbol="roundRect",n}return a(e,t),e.prototype.getInitialData=function(e){return e.stack=null,t.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=Jg(QA.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"}}}),e}(QA);var Vz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._layers=[],n}return a(e,t),e.prototype.render=function(t,e,n){var r=t.getData(),i=this,o=this.group,a=t.getLayerSeries(),s=r.getLayout("layoutInfo"),l=s.rect,u=s.boundaryGap;function c(t){return t.name}o.x=0,o.y=l.y+u[0];var h=new Jw(this._layersSeries||[],a,c,c),d=[];function p(e,n,s){var l=i._layers;if("remove"!==e){for(var u,c,h=[],p=[],f=a[n].indices,g=0;go&&(o=s),r.push(s)}for(var u=0;uo&&(o=h)}return{y0:i,max:o}}(l),c=u.y0,h=n/u.max,d=o.length,p=o[0].indices.length,f=0;fI&&!Eu(A-I)&&A0?(i.virtualPiece?i.virtualPiece.updateData(!1,r,t,e,n):(i.virtualPiece=new Wz(r,t,e,n),l.add(i.virtualPiece)),o.piece.off("click"),i.virtualPiece.on("click",(function(t){i._rootToNode(o.parentNode)}))):i.virtualPiece&&(l.remove(i.virtualPiece),i.virtualPiece=null)}(a,s),this._initEvents(),this._oldChildren=c},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",(function(e){var n=!1;t.seriesModel.getViewRoot().eachNode((function(r){if(!n&&r.piece&&r.piece===e.target){var i=r.getModel().get("nodeClick");if("rootToNode"===i)t._rootToNode(r);else if("link"===i){var o=r.getModel(),a=o.get("link");if(a)Zy(a,o.get("target",!0)||"_blank")}n=!0}}))}))},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:Hz,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,e){var n=e.getData().getItemLayout(0);if(n){var r=t[0]-n.cx,i=t[1]-n.cy,o=Math.sqrt(r*r+i*i);return o<=n.r&&o>=n.r0}},e.type="sunburst",e}(tx),Yz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreStyleOnData=!0,n}return a(e,t),e.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};Xz(n);var r=this._levelModels=zi(t.levels||[],(function(t){return new Kg(t,this,e)}),this),i=iP.createTree(n,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=i.getNodeByDataIndex(e),o=r[n.depth];return o&&(t.parentModel=o),t}))}));return i.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(e);return n.treePathInfo=lP(r,this),n},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){fP(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(j_);function Xz(t){var e=0;Ni(t.children,(function(t){Xz(t);var n=t.value;Wi(n)&&(n=n[0]),e+=n}));var n=t.value;Wi(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),Wi(t.value)?t.value[0]=n:t.value=n}var qz=Math.PI/180;function Kz(t,e,n){e.eachSeriesByType(t,(function(t){var e=t.get("center"),r=t.get("radius");Wi(r)||(r=[0,r]),Wi(e)||(e=[e,e]);var i=n.getWidth(),o=n.getHeight(),a=Math.min(i,o),s=Au(e[0],i),l=Au(e[1],o),u=Au(r[0],a/2),c=Au(r[1],a/2),h=-t.get("startAngle")*qz,d=t.get("minAngle")*qz,p=t.getData().tree.root,f=t.getViewRoot(),g=f.depth,y=t.get("sort");null!=y&&$z(f,y);var v=0;Ni(f.children,(function(t){!isNaN(t.getValue())&&v++}));var m=f.getValue(),_=Math.PI/(m||v)*2,x=f.depth>0,b=f.height-(x?-1:1),w=(c-u)/(b||1),S=t.get("clockwise"),M=t.get("stillShowZeroSum"),I=S?1:-1,C=function(e,n){if(e){var r=n;if(e!==p){var i=e.getValue(),o=0===m&&M?_:i*_;o1;)i=i.parentNode;var o=n.getColorFromPalette(i.name||i.dataIndex+"",e);return t.depth>1&&Ui(o)&&(o=Bs(o,(t.depth-1)/(r-1)*.5)),o}(i,t,r.root.height)),Di(n.ensureUniqueItemVisual(i.dataIndex,"style"),o)}))}))}var Jz={color:"fill",borderColor:"stroke"},tB={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},eB=uc(),nB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,e){return PS(null,this)},e.prototype.getDataParams=function(e,n,r){var i=t.prototype.getDataParams.call(this,e,n);return r&&(i.info=eB(r).info),i},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(j_);function rB(t,e){return e=e||[0,0],zi(["x","y"],(function(n,r){var i=this.getAxis(n),o=e[r],a=t[r]/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(o-a)-i.dataToCoord(o+a))}),this)}function iB(t,e){return e=e||[0,0],zi([0,1],(function(n){var r=e[n],i=t[n]/2,o=[],a=[];return o[n]=r-i,a[n]=r+i,o[1-n]=a[1-n]=e[1-n],Math.abs(this.dataToPoint(o)[n]-this.dataToPoint(a)[n])}),this)}function oB(t,e){var n=this.getAxis(),r=e instanceof Array?e[0]:e,i=(t instanceof Array?t[0]:t)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(r-i)-n.dataToCoord(r+i))}function aB(t,e){return e=e||[0,0],zi(["Radius","Angle"],(function(n,r){var i=this["get"+n+"Axis"](),o=e[r],a=t[r]/2,s="category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(o-a)-i.dataToCoord(o+a));return"Angle"===n&&(s=s*Math.PI/180),s}),this)}function sB(t,e,n,r){return t&&(t.legacy||!1!==t.legacy&&!n&&!r&&"tspan"!==e&&("text"===e||mo(t,"text")))}function lB(t,e,n){var r,i,o,a=t;if("text"===e)o=a;else{o={},mo(a,"text")&&(o.text=a.text),mo(a,"rich")&&(o.rich=a.rich),mo(a,"textFill")&&(o.fill=a.textFill),mo(a,"textStroke")&&(o.stroke=a.textStroke),mo(a,"fontFamily")&&(o.fontFamily=a.fontFamily),mo(a,"fontSize")&&(o.fontSize=a.fontSize),mo(a,"fontStyle")&&(o.fontStyle=a.fontStyle),mo(a,"fontWeight")&&(o.fontWeight=a.fontWeight),i={type:"text",style:o,silent:!0},r={};var s=mo(a,"textPosition");n?r.position=s?a.textPosition:"inside":s&&(r.position=a.textPosition),mo(a,"textPosition")&&(r.position=a.textPosition),mo(a,"textOffset")&&(r.offset=a.textOffset),mo(a,"textRotation")&&(r.rotation=a.textRotation),mo(a,"textDistance")&&(r.distance=a.textDistance)}return uB(o,t),Ni(o.rich,(function(t){uB(t,t)})),{textConfig:r,textContent:i}}function uB(t,e){e&&(e.font=e.textFont||e.font,mo(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),mo(e,"textAlign")&&(t.align=e.textAlign),mo(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),mo(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),mo(e,"textWidth")&&(t.width=e.textWidth),mo(e,"textHeight")&&(t.height=e.textHeight),mo(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),mo(e,"textPadding")&&(t.padding=e.textPadding),mo(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),mo(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),mo(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),mo(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),mo(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),mo(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),mo(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}function cB(t,e,n){var r=t;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 i=r.textPosition.indexOf("inside")>=0,o=t.fill||"#000";hB(r,e);var a=null==r.textFill;return i?a&&(r.textFill=n.insideFill||"#fff",!r.textStroke&&n.insideStroke&&(r.textStroke=n.insideStroke),!r.textStroke&&(r.textStroke=o),null==r.textStrokeWidth&&(r.textStrokeWidth=2)):(a&&(r.textFill=t.fill||n.outsideFill||"#000"),!r.textStroke&&n.outsideStroke&&(r.textStroke=n.outsideStroke)),r.text=e.text,r.rich=e.rich,Ni(e.rich,(function(t){hB(t,t)})),r}function hB(t,e){e&&(mo(e,"fill")&&(t.textFill=e.fill),mo(e,"stroke")&&(t.textStroke=e.fill),mo(e,"lineWidth")&&(t.textStrokeWidth=e.lineWidth),mo(e,"font")&&(t.font=e.font),mo(e,"fontStyle")&&(t.fontStyle=e.fontStyle),mo(e,"fontWeight")&&(t.fontWeight=e.fontWeight),mo(e,"fontSize")&&(t.fontSize=e.fontSize),mo(e,"fontFamily")&&(t.fontFamily=e.fontFamily),mo(e,"align")&&(t.textAlign=e.align),mo(e,"verticalAlign")&&(t.textVerticalAlign=e.verticalAlign),mo(e,"lineHeight")&&(t.textLineHeight=e.lineHeight),mo(e,"width")&&(t.textWidth=e.width),mo(e,"height")&&(t.textHeight=e.height),mo(e,"backgroundColor")&&(t.textBackgroundColor=e.backgroundColor),mo(e,"padding")&&(t.textPadding=e.padding),mo(e,"borderColor")&&(t.textBorderColor=e.borderColor),mo(e,"borderWidth")&&(t.textBorderWidth=e.borderWidth),mo(e,"borderRadius")&&(t.textBorderRadius=e.borderRadius),mo(e,"shadowColor")&&(t.textBoxShadowColor=e.shadowColor),mo(e,"shadowBlur")&&(t.textBoxShadowBlur=e.shadowBlur),mo(e,"shadowOffsetX")&&(t.textBoxShadowOffsetX=e.shadowOffsetX),mo(e,"shadowOffsetY")&&(t.textBoxShadowOffsetY=e.shadowOffsetY),mo(e,"textShadowColor")&&(t.textShadowColor=e.textShadowColor),mo(e,"textShadowBlur")&&(t.textShadowBlur=e.textShadowBlur),mo(e,"textShadowOffsetX")&&(t.textShadowOffsetX=e.textShadowOffsetX),mo(e,"textShadowOffsetY")&&(t.textShadowOffsetY=e.textShadowOffsetY))}var dB={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},pB=Fi(dB);Bi(Jl,(function(t,e){return t[e]=1,t}),{}),Jl.join(", ");var fB=["","style","shape","extra"],gB=uc();function yB(t,e,n,r,i){var o=t+"Animation",a=Gf(t,r,i)||{},s=gB(e).userDuring;return a.duration>0&&(a.during=s?Gi(SB,{el:e,userDuring:s}):null,a.setToFinal=!0,a.scope=t),Di(a,n[o]),a}function vB(t,e,n,r){var i=(r=r||{}).dataIndex,o=r.isInit,a=r.clearStyle,s=n.isAnimationEnabled(),l=gB(t),u=e.style;l.userDuring=e.during;var c={},h={};if(function(t,e,n){for(var r=0;r=0)){var h=t.getAnimationStyleProps(),d=h?h.style:null;if(d){!i&&(i=r.style={});var p=Fi(n);for(u=0;u0&&t.animateFrom(d,p)}else!function(t,e,n,r,i){if(i){var o=yB("update",t,e,r,n);o.duration>0&&t.animateFrom(i,o)}}(t,e,i||0,n,c);mB(t,e),u?t.dirty():t.markRedraw()}function mB(t,e){for(var n=gB(t).leaveToProps,r=0;r=0){!o&&(o=r[t]={});var d=Fi(a);for(c=0;cr[1]&&r.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:r[1],r0:r[0]},api:{coord:function(r){var i=e.dataToRadius(r[0]),o=n.dataToAngle(r[1]),a=t.coordToPoint([i,o]);return a.push(i,o*Math.PI/180),a},size:Gi(aB,t)}}},calendar:function(t){var e=t.getRect(),n=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(e,n){return t.dataToPoint(e,n)}}}}};function GB(t){return t instanceof ed}function jB(t){return t instanceof Jc}var WB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.prototype.render=function(t,e,n,r){this._progressiveEls=null;var i=this._data,o=t.getData(),a=this.group,s=XB(t,o,e,n);i||a.removeAll(),o.diff(i).add((function(e){KB(n,null,e,s(e,r),t,a,o)})).remove((function(e){var n=i.getItemGraphicEl(e);n&&_B(n,eB(n).option,t)})).update((function(e,l){var u=i.getItemGraphicEl(l);KB(n,u,e,s(e,r),t,a,o)})).execute();var l=t.get("clip",!0)?EA(t.coordinateSystem,!1,t):null;l?a.setClipPath(l):a.removeClipPath(),this._data=o},e.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,e,n,r,i){var o=e.getData(),a=XB(e,o,n,r),s=this._progressiveEls=[];function l(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}for(var u=t.start;u=0?e.getStore().get(i,n):void 0}var o=e.get(r.name,n),a=r&&r.ordinalMeta;return a?a.categories[o]:o},styleEmphasis:function(n,r){null==r&&(r=s);var i=m(r,DB).getItemStyle(),o=_(r,DB),a=Tg(o,null,null,!0,!0);a.text=o.getShallow("show")?no(t.getFormattedLabel(r,DB),t.getFormattedLabel(r,PB),gA(e,r)):null;var l=kg(o,null,!0);return b(n,i),i=cB(i,a,l),n&&x(i,n),i.legacy=!0,i},visual:function(t,n){if(null==n&&(n=s),mo(Jz,t)){var r=e.getItemVisual(n,"style");return r?r[Jz[t]]:null}if(mo(tB,t))return e.getItemVisual(n,t)},barLayout:function(t){if("cartesian2d"===o.type){return function(t){var e=[],n=t.axis,r="axis0";if("category"===n.type){for(var i=n.getBandWidth(),o=0;o=h;f--){var g=e.childAt(f);nV(e,g,i)}}(t,h,n,r,i),a>=0?o.replaceAt(h,a):o.add(h),h}function QB(t,e,n){var r,i=eB(t),o=e.type,a=e.shape,s=e.style;return n.isUniversalTransitionEnabled()||null!=o&&o!==i.customGraphicType||"path"===o&&((r=a)&&(mo(r,"pathData")||mo(r,"d")))&&aV(a)!==i.customPathData||"image"===o&&mo(s,"image")&&s.image!==i.customImagePath}function JB(t,e,n){var r=e?tV(t,e):t,i=e?eV(t,r,DB):t.style,o=t.type,a=r?r.textConfig:null,s=t.textContent,l=s?e?tV(s,e):s:null;if(i&&(n.isLegacy||sB(i,o,!!a,!!l))){n.isLegacy=!0;var u=lB(i,o,!e);!a&&u.textConfig&&(a=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var c=l;!c.type&&(c.type="text")}var h=e?n[e]:n.normal;h.cfg=a,h.conOpt=l}function tV(t,e){return e?t?t[e]:null:t}function eV(t,e,n){var r=e&&e.style;return null==r&&n===DB&&t&&(r=t.styleEmphasis),r}function nV(t,e,n){e&&_B(e,eB(t).option,n)}function rV(t,e){var n=t&&t.name;return null!=n?n:"e\0\0"+e}function iV(t,e){var n=this.context,r=null!=t?n.newChildren[t]:null,i=null!=e?n.oldChildren[e]:null;$B(n.api,i,n.dataIndex,r,n.seriesModel,n.group)}function oV(t){var e=this.context,n=e.oldChildren[t];n&&_B(n,eB(n).option,e.seriesModel)}function aV(t){return t&&(t.pathData||t.d)}var sV=uc(),lV=Ti,uV=Gi,cV=function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(t,e,n,r){var i=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,r||this._lastValue!==i||this._lastStatus!==o){this._lastValue=i,this._lastStatus=o;var a=this._group,s=this._handle;if(!o||"hide"===o)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var l={};this.makeElOption(l,i,t,e,n);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var c=this._moveAnimation=this.determineAnimation(t,e);if(a){var h=ji(hV,e,c);this.updatePointerEl(a,l,h),this.updateLabelEl(a,l,h,e)}else a=this._group=new xu,this.createPointerEl(a,l,t,e),this.createLabelEl(a,l,t,e),n.getZr().add(a);gV(a,e,!0),this._renderHandle(i)}},t.prototype.remove=function(t){this.clear(t)},t.prototype.dispose=function(t){this.clear(t)},t.prototype.determineAnimation=function(t,e){var n=e.get("animation"),r=t.axis,i="category"===r.type,o=e.get("snap");if(!o&&!i)return!1;if("auto"===n||null==n){var a=this.animationThreshold;if(i&&r.getBandWidth()>a)return!0;if(o){var s=Mk(t).seriesDataCount,l=r.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},t.prototype.makeElOption=function(t,e,n,r,i){},t.prototype.createPointerEl=function(t,e,n,r){var i=e.pointer;if(i){var o=sV(t).pointerEl=new wg[i.type](lV(e.pointer));t.add(o)}},t.prototype.createLabelEl=function(t,e,n,r){if(e.label){var i=sV(t).labelEl=new yd(lV(e.label));t.add(i),pV(i,r)}},t.prototype.updatePointerEl=function(t,e,n){var r=sV(t).pointerEl;r&&e.pointer&&(r.setStyle(e.pointer.style),n(r,{shape:e.pointer.shape}))},t.prototype.updateLabelEl=function(t,e,n,r){var i=sV(t).labelEl;i&&(i.setStyle(e.label.style),n(i,{x:e.label.x,y:e.label.y}),pV(i,r))},t.prototype._renderHandle=function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,r=this._api.getZr(),i=this._handle,o=n.getModel("handle"),a=n.get("status");if(!o.get("show")||!a||"hide"===a)return i&&r.remove(i),void(this._handle=null);this._handle||(e=!0,i=this._handle=gg(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){oa(t.event)},onmousedown:uV(this._onHandleDragMove,this,0,0),drift:uV(this._onHandleDragMove,this),ondragend:uV(this._onHandleDragEnd,this)}),r.add(i)),gV(i,n,!1),i.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");Wi(s)||(s=[s,s]),i.scaleX=s[0]/2,i.scaleY=s[1]/2,cx(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},t.prototype._moveHandleToValue=function(t,e){hV(this._axisPointerModel,!e&&this._moveAnimation,this._handle,fV(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(t,e){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(fV(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(fV(r)),sV(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,r=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),r&&e.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),hx(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}},t}();function hV(t,e,n,r){dV(sV(n).lastProp,r)||(sV(n).lastProp=r,e?Wf(n,r,t):(n.stopAnimation(),n.attr(r)))}function dV(t,e){if(Xi(t)&&Xi(e)){var n=!0;return Ni(e,(function(e,r){n=n&&dV(t[r],e)})),!!n}return t===e}function pV(t,e){t[e.get(["label","show"])?"show":"hide"]()}function fV(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function gV(t,e,n){var r=e.get("z"),i=e.get("zlevel");t&&t.traverse((function(t){"group"!==t.type&&(null!=r&&(t.z=r),null!=i&&(t.zlevel=i),t.silent=n)}))}function yV(t){var e,n=t.get("type"),r=t.getModel(n+"Style");return"line"===n?(e=r.getLineStyle()).fill=null:"shadow"===n&&((e=r.getAreaStyle()).stroke=null),e}function vV(t,e,n,r,i){var o=mV(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),a=n.getModel("label"),s=Fy(a.get("padding")||0),l=a.getFont(),u=iu(o,l),c=i.position,h=u.width+s[1]+s[3],d=u.height+s[0]+s[2],p=i.align;"right"===p&&(c[0]-=h),"center"===p&&(c[0]-=h/2);var f=i.verticalAlign;"bottom"===f&&(c[1]-=d),"middle"===f&&(c[1]-=d/2),function(t,e,n,r){var i=r.getWidth(),o=r.getHeight();t[0]=Math.min(t[0]+e,i)-e,t[1]=Math.min(t[1]+n,o)-n,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(c,h,d,r);var g=a.get("backgroundColor");g&&"auto"!==g||(g=e.get(["axisLine","lineStyle","color"])),t.label={x:c[0],y:c[1],style:Tg(a,{text:o,font:l,fill:a.getTextColor(),padding:s,backgroundColor:g}),z2:10}}function mV(t,e,n,r,i){t=e.scale.parse(t);var o=e.scale.getLabel({value:t},{precision:i.precision}),a=i.formatter;if(a){var s={value:OM(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};Ni(r,(function(t){var e=n.getSeriesByIndex(t.seriesIndex),r=t.dataIndexInside,i=e&&e.getDataParams(r);i&&s.seriesData.push(i)})),Ui(a)?o=a.replace("{value}",o):Hi(a)&&(o=a(s))}return o}function _V(t,e,n){var r=[1,0,0,1,0,0];return fa(r,r,n.rotation),pa(r,r,n.position),cg([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function xV(t,e,n,r,i,o){var a=yk.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get(["label","margin"]),vV(e,r,i,o,{position:_V(r.axis,t,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function bV(t,e,n){return{x1:t[n=n||0],y1:t[1-n],x2:e[n],y2:e[1-n]}}function wV(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}function SV(t,e,n,r,i,o){return{cx:t,cy:e,r0:n,r:r,startAngle:i,endAngle:o,clockwise:!0}}var MV=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.makeElOption=function(t,e,n,r,i){var o=n.axis,a=o.grid,s=r.get("type"),l=IV(a,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(e,!0));if(s&&"none"!==s){var c=yV(r),h=CV[s](o,u,l);h.style=c,t.graphicKey=h.type,t.pointer=h}xV(e,t,ak(a.model,n),n,r,i)},e.prototype.getHandleTransform=function(t,e,n){var r=ak(e.axis.grid.model,e,{labelInside:!1});r.labelMargin=n.get(["handle","margin"]);var i=_V(e.axis,t,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,r){var i=n.axis,o=i.grid,a=i.getGlobalExtent(!0),s=IV(o,i).getOtherAxis(i).getGlobalExtent(),l="x"===i.dim?0:1,u=[t.x,t.y];u[l]+=e[l],u[l]=Math.min(a[1],u[l]),u[l]=Math.max(a[0],u[l]);var c=(s[1]+s[0])/2,h=[c,c];h[l]=u[l];return{x:u[0],y:u[1],rotation:t.rotation,cursorPoint:h,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},e}(cV);function IV(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var CV={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:bV([e,n[0]],[e,n[1]],AV(t))}},shadow:function(t,e,n){var r=Math.max(1,t.getBandWidth()),i=n[1]-n[0];return{type:"Rect",shape:wV([e-r/2,n[0]],[r,i],AV(t))}}};function AV(t){return"x"===t.dim?0:1}var TV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#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}},e}(ov),kV=uc(),LV=Ni;function DV(t,e,n){if(!si.node){var r=e.getZr();kV(r).records||(kV(r).records={}),function(t,e){if(kV(t).initialized)return;function n(n,r){t.on(n,(function(n){var i=function(t){var e={showTip:[],hideTip:[]},n=function(r){var i=e[r.type];i?i.push(r):(r.dispatchAction=n,t.dispatchAction(r))};return{dispatchAction:n,pendings:e}}(e);LV(kV(t).records,(function(t){t&&r(t,n,i.dispatchAction)})),function(t,e){var n,r=t.showTip.length,i=t.hideTip.length;r?n=t.showTip[r-1]:i&&(n=t.hideTip[i-1]);n&&(n.dispatchAction=null,e.dispatchAction(n))}(i.pendings,e)}))}kV(t).initialized=!0,n("click",ji(RV,"click")),n("mousemove",ji(RV,"mousemove")),n("globalout",PV)}(r,e),(kV(r).records[t]||(kV(r).records[t]={})).handler=n}}function PV(t,e,n){t.handler("leave",null,n)}function RV(t,e,n,r){e.handler(t,n,r)}function OV(t,e){if(!si.node){var n=e.getZr();(kV(n).records||{})[t]&&(kV(n).records[t]=null)}}var EV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.prototype.render=function(t,e,n){var r=e.getComponent("tooltip"),i=t.get("triggerOn")||r&&r.get("triggerOn")||"mousemove|click";DV("axisPointer",n,(function(t,e,n){"none"!==i&&("leave"===t||i.indexOf(t)>=0)&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})}))},e.prototype.remove=function(t,e){OV("axisPointer",e)},e.prototype.dispose=function(t,e){OV("axisPointer",e)},e.type="axisPointer",e}(K_);function NV(t,e){var n,r=[],i=t.seriesIndex;if(null==i||!(n=e.getSeriesByIndex(i)))return{point:[]};var o=n.getData(),a=lc(o,t);if(null==a||a<0||Wi(a))return{point:[]};var s=o.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)r=n.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)if(t.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u).dim,h=u.dim,d="x"===c||"radius"===c?1:0,p=o.mapDimension(h),f=[];f[d]=o.get(p,a),f[1-d]=o.get(o.getCalculationInfo("stackResultDimension"),a),r=l.dataToPoint(f)||[]}else r=l.dataToPoint(o.getValues(zi(l.dimensions,(function(t){return o.mapDimension(t)})),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 zV=uc();function BV(t,e,n){var r=t.currTrigger,i=[t.x,t.y],o=t,a=t.dispatchAction||Gi(n.dispatchAction,n),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){WV(i)&&(i=NV({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=WV(i),u=o.axesInfo,c=s.axesInfo,h="leave"===r||WV(i),d={},p={},f={list:[],map:{}},g={showPointer:ji(FV,p),showTooltip:ji(GV,f)};Ni(s.coordSysMap,(function(t,e){var n=l||t.containPoint(i);Ni(s.coordSysAxesInfo[e],(function(t,e){var r=t.axis,o=function(t,e){for(var n=0;n<(t||[]).length;n++){var r=t[n];if(e.axis.dim===r.axisDim&&e.axis.model.componentIndex===r.axisIndex)return r}}(u,t);if(!h&&n&&(!u||o)){var a=o&&o.value;null!=a||l||(a=r.pointToData(i)),null!=a&&VV(t,a,g,!1,d)}}))}));var y={};return Ni(c,(function(t,e){var n=t.linkGroup;n&&!p[e]&&Ni(n.axesInfo,(function(e,r){var i=p[r];if(e!==t&&i){var o=i.value;n.mapper&&(o=t.axis.scale.parse(n.mapper(o,jV(e),jV(t)))),y[t.key]=o}}))})),Ni(y,(function(t,e){VV(c[e],t,g,!0,d)})),function(t,e,n){var r=n.axesInfo=[];Ni(e,(function(e,n){var i=e.axisPointerModel.option,o=t[n];o?(!e.useHandle&&(i.status="show"),i.value=o.value,i.seriesDataIndices=(o.payloadBatch||[]).slice()):!e.useHandle&&(i.status="hide"),"show"===i.status&&r.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:i.value})}))}(p,c,d),function(t,e,n,r){if(WV(e)||!t.list.length)return void r({type:"hideTip"});var i=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:t.list})}(f,i,t,a),function(t,e,n){var r=n.getZr(),i="axisPointerLastHighlights",o=zV(r)[i]||{},a=zV(r)[i]={};Ni(t,(function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&t.triggerEmphasis&&Ni(n.seriesDataIndices,(function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t}))}));var s=[],l=[];Ni(o,(function(t,e){!a[e]&&l.push(t)})),Ni(a,(function(t,e){!o[e]&&s.push(t)})),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}(c,0,n),d}}function VV(t,e,n,r,i){var o=t.axis;if(!o.scale.isBlank()&&o.containData(e))if(t.involveSeries){var a=function(t,e){var n=e.axis,r=n.dim,i=t,o=[],a=Number.MAX_VALUE,s=-1;return Ni(e.seriesModels,(function(e,l){var u,c,h=e.getData().mapDimensionsAll(r);if(e.getAxisTooltipData){var d=e.getAxisTooltipData(h,t,n);c=d.dataIndices,u=d.nestestValue}else{if(!(c=e.getData().indicesOfNearest(h[0],t,"category"===n.type?.5:null)).length)return;u=e.getData().get(h[0],c[0])}if(null!=u&&isFinite(u)){var p=t-u,f=Math.abs(p);f<=a&&((f=0&&s<0)&&(a=f,s=p,i=u,o.length=0),Ni(c,(function(t){o.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})))}})),{payloadBatch:o,snapToValue:i}}(e,t),s=a.payloadBatch,l=a.snapToValue;s[0]&&null==i.seriesIndex&&Di(i,s[0]),!r&&t.snap&&o.containData(l)&&null!=l&&(e=l),n.showPointer(t,e,s),n.showTooltip(t,a,l)}else n.showPointer(t,e)}function FV(t,e,n,r){t[e.key]={value:n,payloadBatch:r}}function GV(t,e,n,r){var i=n.payloadBatch,o=e.axis,a=o.model,s=e.axisPointerModel;if(e.triggerTooltip&&i.length){var l=e.coordSys.model,u=Ck(l),c=t.map[u];c||(c=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(c)),c.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:r,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function jV(t){var e=t.axis.model,n={},r=n.axisDim=t.axis.dim;return n.axisIndex=n[r+"AxisIndex"]=e.componentIndex,n.axisName=n[r+"AxisName"]=e.name,n.axisId=n[r+"AxisId"]=e.id,n}function WV(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function HV(t){Tk.registerAxisPointerClass("CartesianAxisPointer",MV),t.registerComponentModel(TV),t.registerComponentView(EV),t.registerPreprocessor((function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!Wi(e)&&(t.axisPointer.link=[e])}})),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,(function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=wk(t,e)})),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},BV)}var UV=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.makeElOption=function(t,e,n,r,i){var o=n.axis;"angle"===o.dim&&(this.animationThreshold=Math.PI/18);var a=o.polar,s=a.getOtherAxis(o).getExtent(),l=o.dataToCoord(e),u=r.get("type");if(u&&"none"!==u){var c=yV(r),h=ZV[u](o,a,l,s);h.style=c,t.graphicKey=h.type,t.pointer=h}var d=function(t,e,n,r,i){var o=e.axis,a=o.dataToCoord(t),s=r.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,c,h=r.getRadiusAxis().getExtent();if("radius"===o.dim){var d=[1,0,0,1,0,0];fa(d,d,s),pa(d,d,[r.cx,r.cy]),l=cg([a,-i],d);var p=e.getModel("axisLabel").get("rotate")||0,f=yk.innerTextLayout(s,p*Math.PI/180,-1);u=f.textAlign,c=f.textVerticalAlign}else{var g=h[1];l=r.coordToPoint([g+i,a]);var y=r.cx,v=r.cy;u=Math.abs(l[0]-y)/g<.3?"center":l[0]>y?"left":"right",c=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:c}}(e,n,0,a,r.get(["label","margin"]));vV(t,n,r,i,d)},e}(cV);var ZV={line:function(t,e,n,r){return"angle"===t.dim?{type:"Line",shape:bV(e.coordToPoint([r[0],n]),e.coordToPoint([r[1],n]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:n}}},shadow:function(t,e,n,r){var i=Math.max(1,t.getBandWidth()),o=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:SV(e.cx,e.cy,r[0],r[1],(-n-i/2)*o,(i/2-n)*o)}:{type:"Sector",shape:SV(e.cx,e.cy,n-i/2,n+i/2,0,2*Math.PI)}}},YV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.prototype.findAxisModel=function(t){var e;return this.ecModel.eachComponent(t,(function(t){t.getCoordSysModel()===this&&(e=t)}),this),e},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(ov),XV=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",pc).models[0]},e.type="polarAxis",e}(ov);Oi(XV,VM);var qV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.type="angleAxis",e}(XV),KV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.type="radiusAxis",e}(XV),$V=function(t){function e(e,n){return t.call(this,"radius",e,n)||this}return a(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e}(cI);$V.prototype.dataToRadius=cI.prototype.dataToCoord,$V.prototype.radiusToData=cI.prototype.coordToData;var QV=uc(),JV=function(t){function e(e,n){return t.call(this,"angle",e,n||[0,360])||this}return a(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,e=t.getLabelModel(),n=t.scale,r=n.getExtent(),i=n.count();if(r[1]-r[0]<1)return 0;var o=r[0],a=t.dataToCoord(o+1)-t.dataToCoord(o),s=Math.abs(a),l=iu(null==o?"":o+"",e.getFont(),"center","top"),u=Math.max(l.height,7)/s;isNaN(u)&&(u=1/0);var c=Math.max(0,Math.floor(u)),h=QV(t.model),d=h.lastAutoInterval,p=h.lastTickCount;return null!=d&&null!=p&&Math.abs(d-c)<=1&&Math.abs(p-i)<=1&&d>c?c=d:(h.lastTickCount=i,h.lastAutoInterval=c),c},e}(cI);JV.prototype.dataToAngle=cI.prototype.dataToCoord,JV.prototype.angleToData=cI.prototype.coordToData;var tF=["radius","angle"],eF=function(){function t(t){this.dimensions=tF,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new $V,this._angleAxis=new JV,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return t.prototype.containPoint=function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},t.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},t.prototype.getAxis=function(t){return this["_"+t+"Axis"]},t.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},t.prototype.getAxesByScale=function(t){var e=[],n=this._angleAxis,r=this._radiusAxis;return n.scale.type===t&&e.push(n),r.scale.type===t&&e.push(r),e},t.prototype.getAngleAxis=function(){return this._angleAxis},t.prototype.getRadiusAxis=function(){return this._radiusAxis},t.prototype.getOtherAxis=function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},t.prototype.getTooltipAxes=function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},t.prototype.dataToPoint=function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},t.prototype.pointToData=function(t,e){var n=this.pointToCoord(t);return[this._radiusAxis.radiusToData(n[0],e),this._angleAxis.angleToData(n[1],e)]},t.prototype.pointToCoord=function(t){var e=t[0]-this.cx,n=t[1]-this.cy,r=this.getAngleAxis(),i=r.getExtent(),o=Math.min(i[0],i[1]),a=Math.max(i[0],i[1]);r.inverse?o=a-360:a=o+360;var s=Math.sqrt(e*e+n*n);e/=s,n/=s;for(var l=Math.atan2(-n,e)/Math.PI*180,u=la;)l+=360*u;return[s,l]},t.prototype.coordToPoint=function(t){var e=t[0],n=t[1]/180*Math.PI;return[Math.cos(n)*e+this.cx,-Math.sin(n)*e+this.cy]},t.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis().getExtent().slice();e[0]>e[1]&&e.reverse();var n=t.getExtent(),r=Math.PI/180,i=1e-4;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-n[0]*r,endAngle:-n[1]*r,clockwise:t.inverse,contain:function(t,e){var n=t-this.cx,r=e-this.cy,o=n*n+r*r,a=this.r,s=this.r0;return a!==s&&o-i<=a*a&&o+i>=s*s}}},t.prototype.convertToPixel=function(t,e,n){return nF(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return nF(e)===this?this.pointToData(n):null},t}();function nF(t){var e=t.seriesModel,n=t.polarModel;return n&&n.coordinateSystem||e&&e.coordinateSystem}function rF(t,e){var n=this,r=n.getAngleAxis(),i=n.getRadiusAxis();if(r.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),t.eachSeries((function(t){if(t.coordinateSystem===n){var e=t.getData();Ni(BM(e,"radius"),(function(t){i.scale.unionExtentFromData(e,t)})),Ni(BM(e,"angle"),(function(t){r.scale.unionExtentFromData(e,t)}))}})),DM(r.scale,r.model),DM(i.scale,i.model),"category"===r.type&&!r.onBand){var o=r.getExtent(),a=360/r.scale.count();r.inverse?o[1]+=a:o[1]-=a,r.setExtent(o[0],o[1])}}function iF(t,e){var n;if(t.type=e.get("type"),t.scale=PM(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),function(t){return"angleAxis"===t.mainType}(e)){t.inverse=t.inverse!==e.get("clockwise");var r=e.get("startAngle"),i=null!==(n=e.get("endAngle"))&&void 0!==n?n:r+(t.inverse?-360:360);t.setExtent(r,i)}e.axis=t,t.model=e}var oF={dimensions:tF,create:function(t,e){var n=[];return t.eachComponent("polar",(function(t,r){var i=new eF(r+"");i.update=rF;var o=i.getRadiusAxis(),a=i.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");iF(o,s),iF(a,l),function(t,e,n){var r=e.get("center"),i=n.getWidth(),o=n.getHeight();t.cx=Au(r[0],i),t.cy=Au(r[1],o);var a=t.getRadiusAxis(),s=Math.min(i,o)/2,l=e.get("radius");null==l?l=[0,"100%"]:Wi(l)||(l=[0,l]);var u=[Au(l[0],s),Au(l[1],s)];a.inverse?a.setExtent(u[1],u[0]):a.setExtent(u[0],u[1])}(i,t,e),n.push(i),t.coordinateSystem=i,i.model=t})),t.eachSeries((function(t){if("polar"===t.get("coordinateSystem")){var e=t.getReferringComponents("polar",pc).models[0];t.coordinateSystem=e.coordinateSystem}})),n}},aF=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function sF(t,e,n){e[1]>e[0]&&(e=e.slice().reverse());var r=t.coordToPoint([e[0],n]),i=t.coordToPoint([e[1],n]);return{x1:r[0],y1:r[1],x2:i[0],y2:i[1]}}function lF(t){return t.getRadiusAxis().inverse?0:1}function uF(t){var e=t[0],n=t[t.length-1];e&&n&&Math.abs(Math.abs(e.coord-n.coord)-360)<1e-4&&t.pop()}var cF=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="PolarAxisPointer",n}return a(e,t),e.prototype.render=function(t,e){if(this.group.removeAll(),t.get("show")){var n=t.axis,r=n.polar,i=r.getRadiusAxis().getExtent(),o=n.getTicksCoords(),a=n.getMinorTicksCoords(),s=zi(n.getViewLabels(),(function(t){t=Ti(t);var e=n.scale,r="ordinal"===e.type?e.getRawOrdinalNumber(t.tickValue):t.tickValue;return t.coord=n.dataToCoord(r),t}));uF(s),uF(o),Ni(aF,(function(e){!t.get([e,"show"])||n.scale.isBlank()&&"axisLine"!==e||hF[e](this.group,t,r,o,a,i,s)}),this)}},e.type="angleAxis",e}(Tk),hF={axisLine:function(t,e,n,r,i,o){var a,s=e.getModel(["axisLine","lineStyle"]),l=n.getAngleAxis(),u=Math.PI/180,c=l.getExtent(),h=lF(n),d=h?0:1,p=360===Math.abs(c[1]-c[0])?"Circle":"Arc";(a=0===o[d]?new wg[p]({shape:{cx:n.cx,cy:n.cy,r:o[h],startAngle:-c[0]*u,endAngle:-c[1]*u,clockwise:l.inverse},style:s.getLineStyle(),z2:1,silent:!0}):new ff({shape:{cx:n.cx,cy:n.cy,r:o[h],r0:o[d]},style:s.getLineStyle(),z2:1,silent:!0})).style.fill=null,t.add(a)},axisTick:function(t,e,n,r,i,o){var a=e.getModel("axisTick"),s=(a.get("inside")?-1:1)*a.get("length"),l=o[lF(n)],u=zi(r,(function(t){return new wf({shape:sF(n,[l,l+s],t.coord)})}));t.add(og(u,{style:Pi(a.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,n,r,i,o){if(i.length){for(var a=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(a.get("inside")?-1:1)*s.get("length"),u=o[lF(n)],c=[],h=0;hf?"left":"right",v=Math.abs(p[1]-g)/d<.3?"middle":p[1]>g?"top":"bottom";if(s&&s[h]){var m=s[h];Xi(m)&&m.textStyle&&(a=new Kg(m.textStyle,l,l.ecModel))}var _=new yd({silent:yk.isLabelSilent(e),style:Tg(a,{x:p[0],y:p[1],fill:a.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:r.formattedLabel,align:y,verticalAlign:v})});if(t.add(_),c){var x=yk.makeAxisEventDataBase(e);x.targetType="axisLabel",x.value=r.rawLabel,kd(_).eventData=x}}),this)},splitLine:function(t,e,n,r,i,o){var a=e.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],c=0;c=0?"p":"n",A=b;m&&(r[s][I]||(r[s][I]={p:b,n:b}),A=r[s][I][C]);var T=void 0,k=void 0,L=void 0,D=void 0;if("radius"===h.dim){var P=h.dataToCoord(M)-b,R=o.dataToCoord(I);Math.abs(P)=D})}}}))}var _F={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},xF={splitNumber:5},bF=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.type="polar",e}(K_);function wF(t,e){e=e||{};var n=t.coordinateSystem,r=t.axis,i={},o=r.position,a=r.orient,s=n.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};i.position=["vertical"===a?u.vertical[o]:l[0],"horizontal"===a?u.horizontal[o]:l[3]];i.rotation=Math.PI/2*{horizontal:0,vertical:1}[a];i.labelDirection=i.tickDirection=i.nameDirection={top:-1,bottom:1,right:1,left:-1}[o],t.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),to(e.labelInside,t.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var c=e.rotate;return null==c&&(c=t.get(["axisLabel","rotate"])),i.labelRotation="top"===o?-c:c,i.z2=1,i}var SF=["axisLine","axisTickLabel","axisName"],MF=["splitArea","splitLine"],IF=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="SingleAxisPointer",n}return a(e,t),e.prototype.render=function(e,n,r,i){var o=this.group;o.removeAll();var a=this._axisGroup;this._axisGroup=new xu;var s=wF(e),l=new yk(e,s);Ni(SF,l.add,l),o.add(this._axisGroup),o.add(l.getGroup()),Ni(MF,(function(t){e.get([t,"show"])&&CF[t](this,this.group,this._axisGroup,e)}),this),pg(a,this._axisGroup,e),t.prototype.render.call(this,e,n,r,i)},e.prototype.remove=function(){Dk(this)},e.type="singleAxis",e}(Tk),CF={splitLine:function(t,e,n,r){var i=r.axis;if(!i.scale.isBlank()){var o=r.getModel("splitLine"),a=o.getModel("lineStyle"),s=a.get("color");s=s instanceof Array?s:[s];for(var l=a.get("width"),u=r.coordinateSystem.getRect(),c=i.isHorizontal(),h=[],d=0,p=i.getTicksCoords({tickModel:o}),f=[],g=[],y=0;y=e.y&&t[1]<=e.y+e.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},t.prototype.pointToData=function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},t.prototype.dataToPoint=function(t){var e=this.getAxis(),n=this.getRect(),r=[],i="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),r[i]=e.toGlobalCoord(e.dataToCoord(+t)),r[1-i]=0===i?n.y+n.height/2:n.x+n.width/2,r},t.prototype.convertToPixel=function(t,e,n){return DF(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return DF(e)===this?this.pointToData(n):null},t}();function DF(t){var e=t.seriesModel,n=t.singleAxisModel;return n&&n.coordinateSystem||e&&e.coordinateSystem}var PF={create:function(t,e){var n=[];return t.eachComponent("singleAxis",(function(r,i){var o=new LF(r,t,e);o.name="single_"+i,o.resize(r,e),r.coordinateSystem=o,n.push(o)})),t.eachSeries((function(t){if("singleAxis"===t.get("coordinateSystem")){var e=t.getReferringComponents("singleAxis",pc).models[0];t.coordinateSystem=e&&e.coordinateSystem}})),n},dimensions:kF},RF=["x","y"],OF=["width","height"],EF=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.makeElOption=function(t,e,n,r,i){var o=n.axis,a=o.coordinateSystem,s=BF(a,1-zF(o)),l=a.dataToPoint(e)[0],u=r.get("type");if(u&&"none"!==u){var c=yV(r),h=NF[u](o,l,s);h.style=c,t.graphicKey=h.type,t.pointer=h}xV(e,t,wF(n),n,r,i)},e.prototype.getHandleTransform=function(t,e,n){var r=wF(e,{labelInside:!1});r.labelMargin=n.get(["handle","margin"]);var i=_V(e.axis,t,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,r){var i=n.axis,o=i.coordinateSystem,a=zF(i),s=BF(o,a),l=[t.x,t.y];l[a]+=e[a],l[a]=Math.min(s[1],l[a]),l[a]=Math.max(s[0],l[a]);var u=BF(o,1-a),c=(u[1]+u[0])/2,h=[c,c];return h[a]=l[a],{x:l[0],y:l[1],rotation:t.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}},e}(cV),NF={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:bV([e,n[0]],[e,n[1]],zF(t))}},shadow:function(t,e,n){var r=t.getBandWidth(),i=n[1]-n[0];return{type:"Rect",shape:wV([e-r/2,n[0]],[r,i],zF(t))}}};function zF(t){return t.isHorizontal()?0:1}function BF(t,e){var n=t.getRect();return[n[RF[e]],n[RF[e]]+n[OF[e]]]}var VF=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.type="single",e}(K_);var FF=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.prototype.init=function(e,n,r){var i=nv(e);t.prototype.init.apply(this,arguments),GF(e,i)},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),GF(this.option,e)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.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}},e}(ov);function GF(t,e){var n,r=t.cellSize;1===(n=Wi(r)?r:t.cellSize=[r,r]).length&&(n[1]=n[0]);var i=zi([0,1],(function(t){return function(t,e){return null!=t[qy[e][0]]||null!=t[qy[e][1]]&&null!=t[qy[e][2]]}(e,t)&&(n[t]="auto"),null!=n[t]&&"auto"!==n[t]}));ev(t,e,{type:"box",ignoreSize:i})}var jF=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.prototype.render=function(t,e,n){var r=this.group;r.removeAll();var i=t.coordinateSystem,o=i.getRangeInfo(),a=i.getOrient(),s=e.getLocaleModel();this._renderDayRect(t,o,r),this._renderLines(t,o,a,r),this._renderYearText(t,o,a,r),this._renderMonthText(t,s,a,r),this._renderWeekText(t,s,o,a,r)},e.prototype._renderDayRect=function(t,e,n){for(var r=t.coordinateSystem,i=t.getModel("itemStyle").getItemStyle(),o=r.getCellWidth(),a=r.getCellHeight(),s=e.start.time;s<=e.end.time;s=r.getNextNDay(s,1).time){var l=r.dataToRect([s],!1).tl,u=new pd({shape:{x:l[0],y:l[1],width:o,height:a},cursor:"default",style:i});n.add(u)}},e.prototype._renderLines=function(t,e,n,r){var i=this,o=t.coordinateSystem,a=t.getModel(["splitLine","lineStyle"]).getLineStyle(),s=t.get(["splitLine","show"]),l=a.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=e.start,c=0;u.time<=e.end.time;c++){d(u.formatedDate),0===c&&(u=o.getDateInfo(e.start.y+"-"+e.start.m));var h=u.date;h.setMonth(h.getMonth()+1),u=o.getDateInfo(h)}function d(e){i._firstDayOfMonth.push(o.getDateInfo(e)),i._firstDayPoints.push(o.dataToRect([e],!1).tl);var l=i._getLinePointsOfOneWeek(t,e,n);i._tlpoints.push(l[0]),i._blpoints.push(l[l.length-1]),s&&i._drawSplitline(l,a,r)}d(o.getNextNDay(e.end.time,1).formatedDate),s&&this._drawSplitline(i._getEdgesPoints(i._tlpoints,l,n),a,r),s&&this._drawSplitline(i._getEdgesPoints(i._blpoints,l,n),a,r)},e.prototype._getEdgesPoints=function(t,e,n){var r=[t[0].slice(),t[t.length-1].slice()],i="horizontal"===n?0:1;return r[0][i]=r[0][i]-e/2,r[1][i]=r[1][i]+e/2,r},e.prototype._drawSplitline=function(t,e,n){var r=new _f({z2:20,shape:{points:t},style:e});n.add(r)},e.prototype._getLinePointsOfOneWeek=function(t,e,n){for(var r=t.coordinateSystem,i=r.getDateInfo(e),o=[],a=0;a<7;a++){var s=r.getNextNDay(i.time,a),l=r.dataToRect([s.time],!1);o[2*s.day]=l.tl,o[2*s.day+1]=l["horizontal"===n?"bl":"tr"]}return o},e.prototype._formatterLabel=function(t,e){return Ui(t)&&t?(n=t,Ni(e,(function(t,e){n=n.replace("{"+e+"}",t)})),n):Hi(t)?t(e):e.nameMap;var n},e.prototype._yearTextPositionControl=function(t,e,n,r,i){var o=e[0],a=e[1],s=["center","bottom"];"bottom"===r?(a+=i,s=["center","top"]):"left"===r?o-=i:"right"===r?(o+=i,s=["center","top"]):a-=i;var l=0;return"left"!==r&&"right"!==r||(l=Math.PI/2),{rotation:l,x:o,y:a,style:{align:s[0],verticalAlign:s[1]}}},e.prototype._renderYearText=function(t,e,n,r){var i=t.getModel("yearLabel");if(i.get("show")){var o=i.get("margin"),a=i.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,u=(s[0][1]+s[1][1])/2,c="horizontal"===n?0:1,h={top:[l,s[c][1]],bottom:[l,s[1-c][1]],left:[s[1-c][0],u],right:[s[c][0],u]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var p=i.get("formatter"),f={start:e.start.y,end:e.end.y,nameMap:d},g=this._formatterLabel(p,f),y=new yd({z2:30,style:Tg(i,{text:g}),silent:i.get("silent")});y.attr(this._yearTextPositionControl(y,h[a],n,a,o)),r.add(y)}},e.prototype._monthTextPositionControl=function(t,e,n,r,i){var o="left",a="top",s=t[0],l=t[1];return"horizontal"===n?(l+=i,e&&(o="center"),"start"===r&&(a="bottom")):(s+=i,e&&(a="middle"),"start"===r&&(o="right")),{x:s,y:l,align:o,verticalAlign:a}},e.prototype._renderMonthText=function(t,e,n,r){var i=t.getModel("monthLabel");if(i.get("show")){var o=i.get("nameMap"),a=i.get("margin"),s=i.get("position"),l=i.get("align"),u=[this._tlpoints,this._blpoints];o&&!Ui(o)||(o&&(e=sy(o)||e),o=e.get(["time","monthAbbr"])||[]);var c="start"===s?0:1,h="horizontal"===n?0:1;a="start"===s?-a:a;for(var d="center"===l,p=i.get("silent"),f=0;f=r.start.time&&n.timea.end.time&&t.reverse(),t},t.prototype._getRangeInfo=function(t){var e,n=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];n[0].time>n[1].time&&(e=!0,n.reverse());var r=Math.floor(n[1].time/WF)-Math.floor(n[0].time/WF)+1,i=new Date(n[0].time),o=i.getDate(),a=n[1].date.getDate();i.setDate(o+r-1);var s=i.getDate();if(s!==a)for(var l=i.getTime()-n[1].time>0?1:-1;(s=i.getDate())!==a&&(i.getTime()-n[1].time)*l>0;)r-=l,i.setDate(s-l);var u=Math.floor((r+n[0].day+6)/7),c=e?1-u:u-1;return e&&n.reverse(),{range:[n[0].formatedDate,n[1].formatedDate],start:n[0],end:n[1],allDay:r,weeks:u,nthWeek:c,fweek:n[0].day,lweek:n[1].day}},t.prototype._getDateByWeeksAndDay=function(t,e,n){var r=this._getRangeInfo(n);if(t>r.weeks||0===t&&er.lweek)return null;var i=7*(t-1)-r.fweek+e,o=new Date(r.start.time);return o.setDate(+r.start.d+i),this.getDateInfo(o)},t.create=function(e,n){var r=[];return e.eachComponent("calendar",(function(e){var n=new t(e);r.push(n),e.coordinateSystem=n})),e.eachSeries((function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=r[t.get("calendarIndex")||0])})),r},t.dimensions=["time","value"],t}();function UF(t){var e=t.calendarModel,n=t.seriesModel;return e?e.coordinateSystem:n?n.coordinateSystem:null}function ZF(t,e){var n;return Ni(e,(function(e){null!=t[e]&&"auto"!==t[e]&&(n=!0)})),n}var YF=["transition","enterFrom","leaveTo"],XF=YF.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function qF(t,e,n){if(n&&(!t[n]&&e[n]&&(t[n]={}),t=t[n],e=e[n]),t&&e)for(var r=n?YF:XF,i=0;i=0;l--){var d,p,f;if(f=null!=(p=oc((d=n[l]).id,null))?i.get(p):null){var g=f.parent,y=(h=QF(g),{}),v=Jy(f,d,g===r?{width:o,height:a}:{width:h.width,height:h.height},null,{hv:d.hv,boundingMode:d.bounding},y);if(!QF(f).isNew&&v){for(var m=d.transition,_={},x=0;x=0)?_[b]=w:f[b]=w}Wf(f,_,t,0)}else f.attr(y)}}},e.prototype._clear=function(){var t=this,e=this._elMap;e.each((function(n){nG(n,QF(n).option,e,t._lastGraphicModel)})),this._elMap=fo()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(K_);function tG(t){var e=new(mo($F,t)?$F[t]:eg(t))({});return QF(e).type=t,e}function eG(t,e,n,r){var i=tG(n);return e.add(i),r.set(t,i),QF(i).id=t,QF(i).isNew=!0,i}function nG(t,e,n,r){t&&t.parent&&("group"===t.type&&t.traverse((function(t){nG(t,e,n,r)})),_B(t,e,r),n.removeKey(QF(t).id))}function rG(t,e,n,r){t.isGroup||Ni([["cursor",Jc.prototype.cursor],["zlevel",r||0],["z",n||0],["z2",0]],(function(n){var r=n[0];mo(e,r)?t[r]=eo(e[r],n[1]):null==t[r]&&(t[r]=n[1])})),Ni(Fi(e),(function(n){if(0===n.indexOf("on")){var r=e[n];t[n]=Hi(r)?r:null}})),mo(e,"draggable")&&(t.draggable=e.draggable),null!=e.name&&(t.name=e.name),null!=e.id&&(t.id=e.id)}var iG=["x","y","radius","angle","single"],oG=["cartesian2d","polar","singleAxis"];function aG(t){return t+"Axis"}function sG(t,e){var n,r=fo(),i=[],o=fo();t.eachComponent({mainType:"dataZoom",query:e},(function(t){o.get(t.uid)||s(t)}));do{n=!1,t.eachComponent("dataZoom",a)}while(n);function a(t){!o.get(t.uid)&&function(t){var e=!1;return t.eachTargetAxis((function(t,n){var i=r.get(t);i&&i[n]&&(e=!0)})),e}(t)&&(s(t),n=!0)}function s(t){o.set(t.uid,!0),i.push(t),t.eachTargetAxis((function(t,e){(r.get(t)||r.set(t,[]))[e]=!0}))}return i}function lG(t){var e=t.ecModel,n={infoList:[],infoMap:fo()};return t.eachTargetAxis((function(t,r){var i=e.getComponent(aG(t),r);if(i){var o=i.getCoordSysModel();if(o){var a=o.uid,s=n.infoMap.get(a);s||(s={model:o,axisModels:[]},n.infoList.push(s),n.infoMap.set(a,s)),s.axisModels.push(i)}}})),n}var uG=function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},t}(),cG=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return a(e,t),e.prototype.init=function(t,e,n){var r=hG(t);this.settledOption=r,this.mergeDefaultAndTheme(t,n),this._doInit(r)},e.prototype.mergeOption=function(t){var e=hG(t);ki(this.option,t,!0),ki(this.settledOption,e,!0),this._doInit(e)},e.prototype._doInit=function(t){var e=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var n=this.settledOption;Ni([["start","startValue"],["end","endValue"]],(function(t,r){"value"===this._rangePropMode[r]&&(e[t[0]]=n[t[0]]=null)}),this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),e=this._targetAxisInfoMap=fo();this._fillSpecifiedTargetAxis(e)?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(e,this._orient)),this._noTarget=!0,e.each((function(t){t.indexList.length&&(this._noTarget=!1)}),this)},e.prototype._fillSpecifiedTargetAxis=function(t){var e=!1;return Ni(iG,(function(n){var r=this.getReferringComponents(aG(n),fc);if(r.specified){e=!0;var i=new uG;Ni(r.models,(function(t){i.add(t.componentIndex)})),t.set(n,i)}}),this),e},e.prototype._fillAutoTargetAxisByOrient=function(t,e){var n=this.ecModel,r=!0;if(r){var i="vertical"===e?"y":"x";o(n.findComponents({mainType:i+"Axis"}),i)}r&&o(n.findComponents({mainType:"singleAxis",filter:function(t){return t.get("orient",!0)===e}}),"single");function o(e,n){var i=e[0];if(i){var o=new uG;if(o.add(i.componentIndex),t.set(n,o),r=!1,"x"===n||"y"===n){var a=i.getReferringComponents("grid",pc).models[0];a&&Ni(e,(function(t){i.componentIndex!==t.componentIndex&&a===t.getReferringComponents("grid",pc).models[0]&&o.add(t.componentIndex)}))}}}r&&Ni(iG,(function(e){if(r){var i=n.findComponents({mainType:aG(e),filter:function(t){return"category"===t.get("type",!0)}});if(i[0]){var o=new uG;o.add(i[0].componentIndex),t.set(e,o),r=!1}}}),this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis((function(e){!t&&(t=e)}),this),"y"===t?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var e=this._rangePropMode,n=this.get("rangeMode");Ni([["start","startValue"],["end","endValue"]],(function(r,i){var o=null!=t[r[0]],a=null!=t[r[1]];o&&!a?e[i]="percent":!o&&a?e[i]="value":n?e[i]=n[i]:o&&(e[i]="percent")}))},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis((function(e,n){null==t&&(t=this.ecModel.getComponent(aG(e),n))}),this),t},e.prototype.eachTargetAxis=function(t,e){this._targetAxisInfoMap.each((function(n,r){Ni(n.indexList,(function(n){t.call(e,r,n)}))}))},e.prototype.getAxisProxy=function(t,e){var n=this.getAxisModel(t,e);if(n)return n.__dzAxisProxy},e.prototype.getAxisModel=function(t,e){var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[e])return this.ecModel.getComponent(aG(t),e)},e.prototype.setRawRange=function(t){var e=this.option,n=this.settledOption;Ni([["start","startValue"],["end","endValue"]],(function(r){null==t[r[0]]&&null==t[r[1]]||(e[r[0]]=n[r[0]]=t[r[0]],e[r[1]]=n[r[1]]=t[r[1]])}),this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var e=this.option;Ni(["start","startValue","end","endValue"],(function(n){e[n]=t[n]}))},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var e,n=this._targetAxisInfoMap.keys(),r=0;r=0}(e)){var n=aG(this._dimName),r=e.getReferringComponents(n,pc).models[0];r&&this._axisIndex===r.componentIndex&&t.push(e)}}),this),t},t.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},t.prototype.getMinMaxSpan=function(){return Ti(this._minMaxSpan)},t.prototype.calculateDataWindow=function(t){var e,n=this._dataExtent,r=this.getAxisModel().axis.scale,i=this._dataZoomModel.getRangePropMode(),o=[0,100],a=[],s=[];gG(["start","end"],(function(l,u){var c=t[l],h=t[l+"Value"];"percent"===i[u]?(null==c&&(c=o[u]),h=r.parse(Cu(c,o,n))):(e=!0,c=Cu(h=null==h?n[u]:r.parse(h),n,o)),s[u]=null==h||isNaN(h)?n[u]:h,a[u]=null==c||isNaN(c)?o[u]:c})),yG(s),yG(a);var l=this._minMaxSpan;function u(t,e,n,i,o){var a=o?"Span":"ValueSpan";VO(0,t,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)e[s]=Cu(t[s],n,i,!0),o&&(e[s]=r.parse(e[s]))}return e?u(s,a,n,o,!1):u(a,s,o,n,!0),{valueWindow:s,percentWindow:a}},t.prototype.reset=function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=function(t,e,n){var r=[1/0,-1/0];gG(n,(function(t){!function(t,e,n){e&&Ni(BM(e,n),(function(n){var r=e.getApproximateExtent(n);r[0]t[1]&&(t[1]=r[1])}))}(r,t.getData(),e)}));var i=t.getAxisModel(),o=TM(i.axis.scale,i,r).calculate();return[o.min,o.max]}(this,this._dimName,e),this._updateMinMaxSpan();var n=this.calculateDataWindow(t.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},t.prototype.filterData=function(t,e){if(t===this._dataZoomModel){var n=this._dimName,r=this.getTargetSeriesModels(),i=t.get("filterMode"),o=this._valueWindow;"none"!==i&&gG(r,(function(t){var e=t.getData(),r=e.mapDimensionsAll(n);if(r.length){if("weakFilter"===i){var a=e.getStore(),s=zi(r,(function(t){return e.getDimensionIndex(t)}),e);e.filterSelf((function(t){for(var e,n,i,l=0;lo[1];if(c&&!h&&!d)return!0;c&&(i=!0),h&&(e=!0),d&&(n=!0)}return i&&e&&n}))}else gG(r,(function(n){if("empty"===i)t.setData(e=e.map(n,(function(t){return function(t){return t>=o[0]&&t<=o[1]}(t)?t:NaN})));else{var r={};r[n]=o,e.selectRange(r)}}));gG(r,(function(t){e.setApproximateExtent(o,t)}))}}))}},t.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,n=this._dataExtent;gG(["min","max"],(function(r){var i=e.get(r+"Span"),o=e.get(r+"ValueSpan");null!=o&&(o=this.getAxisModel().axis.scale.parse(o)),null!=o?i=Cu(n[0]+o,n,[0,100],!0):null!=i&&(o=Cu(i,[0,100],n,!0)-n[0]),t[r+"Span"]=i,t[r+"ValueSpan"]=o}),this)},t.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,n=this._valueWindow;if(e){var r=Du(n,[0,500]);r=Math.min(r,20);var i=t.axis.scale.rawExtentInfo;0!==e[0]&&i.setDeterminedMinMax("min",+n[0].toFixed(r)),100!==e[1]&&i.setDeterminedMinMax("max",+n[1].toFixed(r)),i.freeze()}},t}();var mG={getTargetSeries:function(t){function e(e){t.eachComponent("dataZoom",(function(n){n.eachTargetAxis((function(r,i){var o=t.getComponent(aG(r),i);e(r,i,o,n)}))}))}e((function(t,e,n,r){n.__dzAxisProxy=null}));var n=[];e((function(e,r,i,o){i.__dzAxisProxy||(i.__dzAxisProxy=new vG(e,r,o,t),n.push(i.__dzAxisProxy))}));var r=fo();return Ni(n,(function(t){Ni(t.getTargetSeriesModels(),(function(t){r.set(t.uid,t)}))})),r},overallReset:function(t,e){t.eachComponent("dataZoom",(function(t){t.eachTargetAxis((function(e,n){t.getAxisProxy(e,n).reset(t)})),t.eachTargetAxis((function(n,r){t.getAxisProxy(n,r).filterData(t,e)}))})),t.eachComponent("dataZoom",(function(t){var e=t.findRepresentativeAxisProxy();if(e){var n=e.getDataPercentWindow(),r=e.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:r[0],endValue:r[1]})}}))}};var _G=!1;function xG(t){_G||(_G=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,mG),function(t){t.registerAction("dataZoom",(function(t,e){Ni(sG(e,t),(function(e){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})}))}))}(t),t.registerSubTypeDefaulter("dataZoom",(function(){return"slider"})))}function bG(t){t.registerComponentModel(dG),t.registerComponentView(fG),xG(t)}var wG=function(){},SG={};function MG(t,e){SG[t]=e}function IG(t){return SG[t]}var CG=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.prototype.optionUpdated=function(){t.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;Ni(this.option.feature,(function(t,n){var r=IG(n);r&&(r.getDefaultOption&&(r.defaultOption=r.getDefaultOption(e)),ki(t,r.defaultOption))}))},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#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"}},e}(ov);function AG(t,e){var n=Fy(e.get("padding")),r=e.getItemStyle(["color","opacity"]);return r.fill=e.get("backgroundColor"),t=new pd({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:r,silent:!0,z2:-1})}var TG=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.render=function(t,e,n,r){var i=this.group;if(i.removeAll(),t.get("show")){var o=+t.get("itemSize"),a="vertical"===t.get("orient"),s=t.get("feature")||{},l=this._features||(this._features={}),u=[];Ni(s,(function(t,e){u.push(e)})),new Jw(this._featureNames||[],u).add(c).update(c).remove(ji(c,null)).execute(),this._featureNames=u,function(t,e,n){var r=e.getBoxLayoutParams(),i=e.get("padding"),o={width:n.getWidth(),height:n.getHeight()},a=Qy(r,o,i);$y(e.get("orient"),t,e.get("itemGap"),a.width,a.height),Jy(t,r,o,i)}(i,t,n),i.add(AG(i.getBoundingRect(),t)),a||i.eachChild((function(t){var e=t.__title,r=t.ensureState("emphasis"),a=r.textConfig||(r.textConfig={}),s=t.getTextContent(),l=s&&s.ensureState("emphasis");if(l&&!Hi(l)&&e){var u=l.style||(l.style={}),c=iu(e,yd.makeFont(u)),h=t.x+i.x,d=!1;t.y+i.y+o+c.height>n.getHeight()&&(a.position="top",d=!0);var p=d?-5-c.height:o+10;h+c.width/2>n.getWidth()?(a.position=["100%",p],u.align="right"):h-c.width/2<0&&(a.position=[0,p],u.align="left")}}))}function c(c,h){var d,p=u[c],f=u[h],g=s[p],y=new Kg(g,t,t.ecModel);if(r&&null!=r.newTitle&&r.featureName===p&&(g.title=r.newTitle),p&&!f){if(function(t){return 0===t.indexOf("my")}(p))d={onclick:y.option.onclick,featureName:p};else{var v=IG(p);if(!v)return;d=new v}l[p]=d}else if(!(d=l[f]))return;d.uid=Qg("toolbox-feature"),d.model=y,d.ecModel=e,d.api=n;var m=d instanceof wG;p||!f?!y.get("show")||m&&d.unusable?m&&d.remove&&d.remove(e,n):(!function(r,s,l){var u,c,h=r.getModel("iconStyle"),d=r.getModel(["emphasis","iconStyle"]),p=s instanceof wG&&s.getIcons?s.getIcons():r.get("icon"),f=r.get("title")||{};Ui(p)?(u={})[l]=p:u=p;Ui(f)?(c={})[l]=f:c=f;var g=r.iconPaths={};Ni(u,(function(l,u){var p=gg(l,{},{x:-o/2,y:-o/2,width:o,height:o});p.setStyle(h.getItemStyle()),p.ensureState("emphasis").style=d.getItemStyle();var f=new yd({style:{text:c[u],align:d.get("textAlign"),borderRadius:d.get("textBorderRadius"),padding:d.get("textPadding"),fill:null,font:Og({fontStyle:d.get("textFontStyle"),fontFamily:d.get("textFontFamily"),fontSize:d.get("textFontSize"),fontWeight:d.get("textFontWeight")},e)},ignore:!0});p.setTextContent(f),_g({el:p,componentModel:t,itemName:u,formatterParamsExtra:{title:c[u]}}),p.__title=c[u],p.on("mouseover",(function(){var e=d.getItemStyle(),r=a?null==t.get("right")&&"right"!==t.get("left")?"right":"left":null==t.get("bottom")&&"bottom"!==t.get("top")?"bottom":"top";f.setStyle({fill:d.get("textFill")||e.fill||e.stroke||"#000",backgroundColor:d.get("textBackgroundColor")}),p.setTextConfig({position:d.get("textPosition")||r}),f.ignore=!t.get("showTitle"),n.enterEmphasis(this)})).on("mouseout",(function(){"emphasis"!==r.get(["iconStatus",u])&&n.leaveEmphasis(this),f.hide()})),("emphasis"===r.get(["iconStatus",u])?ip:op)(p),i.add(p),p.on("click",Gi(s.onclick,s,e,n,u)),g[u]=p}))}(y,d,p),y.setIconStatus=function(t,e){var n=this.option,r=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,r[t]&&("emphasis"===e?ip:op)(r[t])},d instanceof wG&&d.render&&d.render(y,e,n,r)):m&&d.dispose&&d.dispose(e,n)}},e.prototype.updateView=function(t,e,n,r){Ni(this._features,(function(t){t instanceof wG&&t.updateView&&t.updateView(t.model,e,n,r)}))},e.prototype.remove=function(t,e){Ni(this._features,(function(n){n instanceof wG&&n.remove&&n.remove(t,e)})),this.group.removeAll()},e.prototype.dispose=function(t,e){Ni(this._features,(function(n){n instanceof wG&&n.dispose&&n.dispose(t,e)}))},e.type="toolbox",e}(K_);var kG=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.onclick=function(t,e){var n=this.model,r=n.get("name")||t.get("title.0.text")||"echarts",i="svg"===e.getZr().painter.getType(),o=i?"svg":n.get("type",!0)||"png",a=e.getConnectedDataURL({type:o,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),s=si.browser;if("function"!=typeof MouseEvent||!s.newEdge&&(s.ie||s.edge))if(window.navigator.msSaveOrOpenBlob||i){var l=a.split(","),u=l[0].indexOf("base64")>-1,c=i?decodeURIComponent(l[1]):l[1];u&&(c=window.atob(c));var h=r+"."+o;if(window.navigator.msSaveOrOpenBlob){for(var d=c.length,p=new Uint8Array(d);d--;)p[d]=c.charCodeAt(d);var f=new Blob([p]);window.navigator.msSaveOrOpenBlob(f,h)}else{var g=document.createElement("iframe");document.body.appendChild(g);var y=g.contentWindow,v=y.document;v.open("image/svg+xml","replace"),v.write(c),v.close(),y.focus(),v.execCommand("SaveAs",!0,h),document.body.removeChild(g)}}else{var m=n.get("lang"),_='',x=window.open();x.document.write(_),x.document.title=r}else{var b=document.createElement("a");b.download=r+"."+o,b.target="_blank",b.href=a;var w=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});b.dispatchEvent(w)}},e.getDefaultOption=function(t){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:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])}},e}(wG),LG="__ec_magicType_stack__",DG=[["line","bar"],["stack"]],PG=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return Ni(t.get("type"),(function(t){e[t]&&(n[t]=e[t])})),n},e.getDefaultOption=function(t){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:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},e.prototype.onclick=function(t,e,n){var r=this.model,i=r.get(["seriesIndex",n]);if(RG[n]){var o,a={series:[]};Ni(DG,(function(t){Ri(t,n)>=0&&Ni(t,(function(t){r.setIconStatus(t,"normal")}))})),r.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:null==i?null:{seriesIndex:i}},(function(t){var e=t.subType,i=t.id,o=RG[n](e,i,t,r);o&&(Pi(o,t.option),a.series.push(o));var s=t.coordinateSystem;if(s&&"cartesian2d"===s.type&&("line"===n||"bar"===n)){var l=s.getAxesByScale("ordinal")[0];if(l){var u=l.dim+"Axis",c=t.getReferringComponents(u,pc).models[0].componentIndex;a[u]=a[u]||[];for(var h=0;h<=c;h++)a[u][c]=a[u][c]||{};a[u][c].boundaryGap="bar"===n}}}));var s=n;"stack"===n&&(o=ki({stack:r.option.title.tiled,tiled:r.option.title.stack},r.option.title),"emphasis"!==r.get(["iconStatus",n])&&(s="tiled")),e.dispatchAction({type:"changeMagicType",currentType:s,newOption:a,newTitle:o,featureName:"magicType"})}},e}(wG),RG={line:function(t,e,n,r){if("bar"===t)return ki({id:e,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(t,e,n,r){if("line"===t)return ki({id:e,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(t,e,n,r){var i=n.get("stack")===LG;if("line"===t||"bar"===t)return r.setIconStatus("stack",i?"normal":"emphasis"),ki({id:e,stack:i?"":LG},r.get(["option","stack"])||{},!0)}};jw({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(t,e){e.mergeOption(t.newOption)}));var OG=new Array(60).join("-"),EG="\t";function NG(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var zG=new RegExp("[\t]+","g");function BG(t,e){var n=t.split(new RegExp("\n*"+OG+"\n*","g")),r={series:[]};return Ni(n,(function(t,n){if(function(t){if(t.slice(0,t.indexOf("\n")).indexOf(EG)>=0)return!0}(t)){var i=function(t){for(var e=t.split(/\n+/g),n=[],r=zi(NG(e.shift()).split(zG),(function(t){return{name:t,data:[]}})),i=0;i=0)&&t(i,r._targetInfoList)}))}return t.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,(function(t,e,n){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var r=QG[t.brushType](0,n,e);t.__rangeOffset={offset:tj[t.brushType](r.values,t.range,[1,1]),xyMinMax:r.xyMinMax}}})),t},t.prototype.matchOutputRanges=function(t,e,n){Ni(t,(function(t){var r=this.findTargetInfo(t,e);r&&!0!==r&&Ni(r.coordSyses,(function(r){var i=QG[t.brushType](1,r,t.range,!0);n(t,i.values,r,e)}))}),this)},t.prototype.setInputRanges=function(t,e){Ni(t,(function(t){var n,r,i,o,a,s=this.findTargetInfo(t,e);if(t.range=t.range||[],s&&!0!==s){t.panelId=s.panelId;var l=QG[t.brushType](0,s.coordSys,t.coordRange),u=t.__rangeOffset;t.range=u?tj[t.brushType](l.values,u.offset,(n=l.xyMinMax,r=u.xyMinMax,i=nj(n),o=nj(r),a=[i[0]/o[0],i[1]/o[1]],isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a)):l.values}}),this)},t.prototype.makePanelOpts=function(t,e){return zi(this._targetInfoList,(function(n){var r=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e?e(n):null,clipPath:GE(r),isTargetByCursor:WE(r,t,n.coordSysModel),getLinearBrushOtherExtent:jE(r)}}))},t.prototype.controlSeries=function(t,e,n){var r=this.findTargetInfo(t,n);return!0===r||r&&Ri(r.coordSyses,e.coordinateSystem)>=0},t.prototype.findTargetInfo=function(t,e){for(var n=this._targetInfoList,r=XG(e,t),i=0;it[1]&&t.reverse(),t}function XG(t,e){return hc(t,e,{includeMainTypes:UG})}var qG={grid:function(t,e){var n=t.xAxisModels,r=t.yAxisModels,i=t.gridModels,o=fo(),a={},s={};(n||r||i)&&(Ni(n,(function(t){var e=t.axis.grid.model;o.set(e.id,e),a[e.id]=!0})),Ni(r,(function(t){var e=t.axis.grid.model;o.set(e.id,e),s[e.id]=!0})),Ni(i,(function(t){o.set(t.id,t),a[t.id]=!0,s[t.id]=!0})),o.each((function(t){var i=t.coordinateSystem,o=[];Ni(i.getCartesians(),(function(t,e){(Ri(n,t.getAxis("x").model)>=0||Ri(r,t.getAxis("y").model)>=0)&&o.push(t)})),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:o[0],coordSyses:o,getPanelRect:$G.grid,xAxisDeclared:a[t.id],yAxisDeclared:s[t.id]})})))},geo:function(t,e){Ni(t.geoModels,(function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:$G.geo})}))}},KG=[function(t,e){var n=t.xAxisModel,r=t.yAxisModel,i=t.gridModel;return!i&&n&&(i=n.axis.grid.model),!i&&r&&(i=r.axis.grid.model),i&&i===e.gridModel},function(t,e){var n=t.geoModel;return n&&n===e.geoModel}],$G={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(ug(t)),e}},QG={lineX:ji(JG,0),lineY:ji(JG,1),rect:function(t,e,n,r){var i=t?e.pointToData([n[0][0],n[1][0]],r):e.dataToPoint([n[0][0],n[1][0]],r),o=t?e.pointToData([n[0][1],n[1][1]],r):e.dataToPoint([n[0][1],n[1][1]],r),a=[YG([i[0],o[0]]),YG([i[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(t,e,n,r){var i=[[1/0,-1/0],[1/0,-1/0]];return{values:zi(n,(function(n){var o=t?e.pointToData(n,r):e.dataToPoint(n,r);return i[0][0]=Math.min(i[0][0],o[0]),i[1][0]=Math.min(i[1][0],o[1]),i[0][1]=Math.max(i[0][1],o[0]),i[1][1]=Math.max(i[1][1],o[1]),o})),xyMinMax:i}}};function JG(t,e,n,r){var i=n.getAxis(["x","y"][t]),o=YG(zi([0,1],(function(t){return e?i.coordToData(i.toLocalCoord(r[t]),!0):i.toGlobalCoord(i.dataToCoord(r[t]))}))),a=[];return a[t]=o,a[1-t]=[NaN,NaN],{values:o,xyMinMax:a}}var tj={lineX:ji(ej,0),lineY:ji(ej,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,e,n){return zi(t,(function(t,r){return[t[0]-n[0]*e[r][0],t[1]-n[1]*e[r][1]]}))}};function ej(t,e,n,r){return[e[0]-r[t]*n[0],e[1]-r[t]*n[1]]}function nj(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var rj,ij,oj=Ni,aj=Ku+"toolbox-dataZoom_",sj=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.render=function(t,e,n,r){this._brushController||(this._brushController=new cE(n.getZr()),this._brushController.on("brush",Gi(this._onBrush,this)).mount()),function(t,e,n,r,i){var o=n._isZoomActive;r&&"takeGlobalCursor"===r.type&&(o="dataZoomSelect"===r.key&&r.dataZoomSelectActive);n._isZoomActive=o,t.setIconStatus("zoom",o?"emphasis":"normal");var a=new ZG(uj(t),e,{include:["grid"]}),s=a.makePanelOpts(i,(function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"}));n._brushController.setPanels(s).enableBrush(!(!o||!s.length)&&{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()})}(t,e,this,r,n),function(t,e){t.setIconStatus("back",function(t){return WG(t).length}(e)>1?"emphasis":"normal")}(t,e)},e.prototype.onclick=function(t,e,n){lj[n].call(this)},e.prototype.remove=function(t,e){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,e){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var e=t.areas;if(t.isEnd&&e.length){var n={},r=this.ecModel;this._brushController.updateCovers([]),new ZG(uj(this.model),r,{include:["grid"]}).matchOutputRanges(e,r,(function(t,e,n){if("cartesian2d"===n.type){var r=t.brushType;"rect"===r?(i("x",n,e[0]),i("y",n,e[1])):i({lineX:"x",lineY:"y"}[r],n,e)}})),function(t,e){var n=WG(t);GG(e,(function(e,r){for(var i=n.length-1;i>=0&&!n[i][r];i--);if(i<0){var o=t.queryComponents({mainType:"dataZoom",subType:"select",id:r})[0];if(o){var a=o.getPercentRange();n[0][r]={dataZoomId:r,start:a[0],end:a[1]}}}})),n.push(e)}(r,n),this._dispatchZoomAction(n)}function i(t,e,i){var o=e.getAxis(t),a=o.model,s=function(t,e,n){var r;return n.eachComponent({mainType:"dataZoom",subType:"select"},(function(n){n.getAxisModel(t,e.componentIndex)&&(r=n)})),r}(t,a,r),l=s.findRepresentativeAxisProxy(a).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(i=VO(0,i.slice(),o.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(n[s.id]={dataZoomId:s.id,startValue:i[0],endValue:i[1]})}},e.prototype._dispatchZoomAction=function(t){var e=[];oj(t,(function(t,n){e.push(Ti(t))})),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},e.getDefaultOption=function(t){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:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},e}(wG),lj={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(function(t){var e=WG(t),n=e[e.length-1];e.length>1&&e.pop();var r={};return GG(n,(function(t,n){for(var i=e.length-1;i>=0;i--)if(t=e[i][n]){r[n]=t;break}})),r}(this.ecModel))}};function uj(t){var e={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return null==e.xAxisIndex&&null==e.xAxisId&&(e.xAxisIndex="all"),null==e.yAxisIndex&&null==e.yAxisId&&(e.yAxisIndex="all"),e}rj="dataZoom",ij=function(t){var e=t.getComponent("toolbox",0),n=["feature","dataZoom"];if(e&&null!=e.get(n)){var r=e.getModel(n),i=[],o=hc(t,uj(r));return oj(o.xAxisModels,(function(t){return a(t,"xAxis","xAxisIndex")})),oj(o.yAxisModels,(function(t){return a(t,"yAxis","yAxisIndex")})),i}function a(t,e,n){var o=t.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:r.get("filterMode",!0)||"filter",id:aj+e+o};a[n]=o,i.push(a)}},oo(null==Av.get(rj)&&ij),Av.set(rj,ij);var cj=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.type="tooltip",e.dependencies=["axisPointer"],e.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}},e}(ov);function hj(t){var e=t.get("confine");return null!=e?!!e:"richText"===t.get("renderMode")}function dj(t){if(si.domSupported)for(var e=document.documentElement.style,n=0,r=t.length;n-1?(u+="top:50%",c+="translateY(-50%) rotate("+(a="left"===s?-225:-45)+"deg)"):(u+="left:50%",c+="translateX(-50%) rotate("+(a="top"===s?225:45)+"deg)");var h=a*Math.PI/180,d=l+i,p=d*Math.abs(Math.cos(h))+d*Math.abs(Math.sin(h)),f=e+" solid "+i+"px;";return'
'}(n,r,i)),Ui(t))o.innerHTML=t+a;else if(t){o.innerHTML="",Wi(t)||(t=[t]);for(var s=0;s=0?this._tryShow(n,r):"leave"===e&&this._hide(r))}),this))},e.prototype._keepShow=function(){var t=this._tooltipModel,e=this._ecModel,n=this._api,r=t.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==r&&"click"!==r){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&i.manuallyShowTip(t,e,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})}))}},e.prototype.manuallyShowTip=function(t,e,n,r){if(r.from!==this.uid&&!si.node&&n.getDom()){var i=kj(r,n);this._ticket="";var o=r.dataByCoordSys,a=function(t,e,n){var r=dc(t).queryOptionMap,i=r.keys()[0];if(!i||"series"===i)return;var o=gc(e,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),a=o.models[0];if(!a)return;var s,l=n.getViewOfComponentModel(a);if(l.group.traverse((function(e){var n=kd(e).tooltipConfig;if(n&&n.name===t.name)return s=e,!0})),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}(r,e,n);if(a){var s=a.el.getBoundingRect().clone();s.applyTransform(a.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:a.el,position:r.position,positionDefault:"bottom"},i)}else if(r.tooltip&&null!=r.x&&null!=r.y){var l=Cj;l.x=r.x,l.y=r.y,l.update(),kd(l).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:l},i)}else if(o)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:o,tooltipOption:r.tooltipOption},i);else if(null!=r.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,r))return;var u=NV(r,e),c=u.point[0],h=u.point[1];null!=c&&null!=h&&this._tryShow({offsetX:c,offsetY:h,target:u.el,position:r.position,positionDefault:"bottom"},i)}else null!=r.x&&null!=r.y&&(n.dispatchAction({type:"updateAxisPointer",x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},e.prototype.manuallyHideTip=function(t,e,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,r.from!==this.uid&&this._hide(kj(r,n))},e.prototype._manuallyAxisShowTip=function(t,e,n,r){var i=r.seriesIndex,o=r.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=i&&null!=o&&null!=a){var s=e.getSeriesByIndex(i);if(s)if("axis"===Tj([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:i,dataIndex:o,position:r.position}),!0}},e.prototype._tryShow=function(t,e){var n=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var r=t.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,t);else if(n){var i,o;if("legend"===kd(n).ssrType)return;this._lastDataByCoordSys=null,eb(n,(function(t){return null!=kd(t).dataIndex?(i=t,!0):null!=kd(t).tooltipConfig?(o=t,!0):void 0}),!0),i?this._showSeriesItemTooltip(t,i,e):o?this._showComponentItemTooltip(t,o,e):this._hide(e)}else this._lastDataByCoordSys=null,this._hide(e)}},e.prototype._showOrMove=function(t,e){var n=t.get("showDelay");e=Gi(e,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(e,n):e()},e.prototype._showAxisTooltip=function(t,e){var n=this._ecModel,r=this._tooltipModel,i=[e.offsetX,e.offsetY],o=Tj([e.tooltipOption],r),a=this._renderMode,s=[],l=C_("section",{blocks:[],noHeader:!0}),u=[],c=new z_;Ni(t,(function(t){Ni(t.dataByAxis,(function(t){var e=n.getComponent(t.axisDim+"Axis",t.axisIndex),i=t.value;if(e&&null!=i){var o=mV(i,e.axis,n,t.seriesDataIndices,t.valueLabelOpt),h=C_("section",{header:o,noHeader:!ao(o),sortBlocks:!0,blocks:[]});l.blocks.push(h),Ni(t.seriesDataIndices,(function(l){var d=n.getSeriesByIndex(l.seriesIndex),p=l.dataIndexInside,f=d.getDataParams(p);if(!(f.dataIndex<0)){f.axisDim=t.axisDim,f.axisIndex=t.axisIndex,f.axisType=t.axisType,f.axisId=t.axisId,f.axisValue=OM(e.axis,{value:i}),f.axisValueLabel=o,f.marker=c.makeTooltipMarker("item",Uy(f.color),a);var g=jm(d.formatTooltip(p,!0,null)),y=g.frag;if(y){var v=Tj([d],r).get("valueFormatter");h.blocks.push(v?Di({valueFormatter:v},y):y)}g.text&&u.push(g.text),s.push(f)}}))}}))})),l.blocks.reverse(),u.reverse();var h=e.position,d=o.get("order"),p=P_(l,c,a,d,n.get("useUTC"),o.get("textStyle"));p&&u.unshift(p);var f="richText"===a?"\n\n":"
",g=u.join(f);this._showOrMove(o,(function(){this._updateContentNotChangedOnAxis(t,s)?this._updatePosition(o,h,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(o,g,s,Math.random()+"",i[0],i[1],h,null,c)}))},e.prototype._showSeriesItemTooltip=function(t,e,n){var r=this._ecModel,i=kd(e),o=i.seriesIndex,a=r.getSeriesByIndex(o),s=i.dataModel||a,l=i.dataIndex,u=i.dataType,c=s.getData(u),h=this._renderMode,d=t.positionDefault,p=Tj([c.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),f=p.get("trigger");if(null==f||"item"===f){var g=s.getDataParams(l,u),y=new z_;g.marker=y.makeTooltipMarker("item",Uy(g.color),h);var v=jm(s.formatTooltip(l,!1,u)),m=p.get("order"),_=p.get("valueFormatter"),x=v.frag,b=x?P_(_?Di({valueFormatter:_},x):x,y,h,m,r.get("useUTC"),p.get("textStyle")):v.text,w="item_"+s.name+"_"+l;this._showOrMove(p,(function(){this._showTooltipContent(p,b,g,w,t.offsetX,t.offsetY,t.position,t.target,y)})),n({type:"showTip",dataIndexInside:l,dataIndex:c.getRawIndex(l),seriesIndex:o,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,e,n){var r="html"===this._renderMode,i=kd(e),o=i.tooltipConfig.option||{},a=o.encodeHTMLContent;if(Ui(o)){o={content:o,formatter:o},a=!0}a&&r&&o.content&&((o=Ti(o)).content=Ko(o.content));var s=[o],l=this._ecModel.getComponent(i.componentMainType,i.componentIndex);l&&s.push(l),s.push({formatter:o.content});var u=t.positionDefault,c=Tj(s,this._tooltipModel,u?{position:u}:null),h=c.get("content"),d=Math.random()+"",p=new z_;this._showOrMove(c,(function(){var n=Ti(c.get("formatterParams")||{});this._showTooltipContent(c,h,n,d,t.offsetX,t.offsetY,t.position,e,p)})),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,e,n,r,i,o,a,s,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var u=this._tooltipContent;u.setEnterable(t.get("enterable"));var c=t.get("formatter");a=a||t.get("position");var h=e,d=this._getNearestPoint([i,o],n,t.get("trigger"),t.get("borderColor")).color;if(c)if(Ui(c)){var p=t.ecModel.get("useUTC"),f=Wi(n)?n[0]:n;h=c,f&&f.axisType&&f.axisType.indexOf("time")>=0&&(h=by(f.axisValue,h,p)),h=Hy(h,n,!0)}else if(Hi(c)){var g=Gi((function(e,r){e===this._ticket&&(u.setContent(r,l,t,d,a),this._updatePosition(t,a,i,o,u,n,s))}),this);this._ticket=r,h=c(n,r,g)}else h=c;u.setContent(h,l,t,d,a),u.show(t,d),this._updatePosition(t,a,i,o,u,n,s)}},e.prototype._getNearestPoint=function(t,e,n,r){return"axis"===n||Wi(e)?{color:r||("html"===this._renderMode?"#fff":"none")}:Wi(e)?void 0:{color:r||e.color||e.borderColor}},e.prototype._updatePosition=function(t,e,n,r,i,o,a){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=i.getSize(),c=t.get("align"),h=t.get("verticalAlign"),d=a&&a.getBoundingRect().clone();if(a&&d.applyTransform(a.transform),Hi(e)&&(e=e([n,r],o,i.el,d,{viewSize:[s,l],contentSize:u.slice()})),Wi(e))n=Au(e[0],s),r=Au(e[1],l);else if(Xi(e)){var p=e;p.width=u[0],p.height=u[1];var f=Qy(p,{width:s,height:l});n=f.x,r=f.y,c=null,h=null}else if(Ui(e)&&a){var g=function(t,e,n,r){var i=n[0],o=n[1],a=Math.ceil(Math.SQRT2*r)+8,s=0,l=0,u=e.width,c=e.height;switch(t){case"inside":s=e.x+u/2-i/2,l=e.y+c/2-o/2;break;case"top":s=e.x+u/2-i/2,l=e.y-o-a;break;case"bottom":s=e.x+u/2-i/2,l=e.y+c+a;break;case"left":s=e.x-i-a,l=e.y+c/2-o/2;break;case"right":s=e.x+u+a,l=e.y+c/2-o/2}return[s,l]}(e,d,u,t.get("borderWidth"));n=g[0],r=g[1]}else{g=function(t,e,n,r,i,o,a){var s=n.getSize(),l=s[0],u=s[1];null!=o&&(t+l+o+2>r?t-=l+o:t+=o);null!=a&&(e+u+a>i?e-=u+a:e+=a);return[t,e]}(n,r,i,s,l,c?null:20,h?null:20);n=g[0],r=g[1]}if(c&&(n-=Lj(c)?u[0]/2:"right"===c?u[0]:0),h&&(r-=Lj(h)?u[1]/2:"bottom"===h?u[1]:0),hj(t)){g=function(t,e,n,r,i){var o=n.getSize(),a=o[0],s=o[1];return t=Math.min(t+a,r)-a,e=Math.min(e+s,i)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}(n,r,i,s,l);n=g[0],r=g[1]}i.moveTo(n,r)},e.prototype._updateContentNotChangedOnAxis=function(t,e){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===t.length;return i&&Ni(n,(function(n,o){var a=n.dataByAxis||[],s=(t[o]||{}).dataByAxis||[];(i=i&&a.length===s.length)&&Ni(a,(function(t,n){var o=s[n]||{},a=t.seriesDataIndices||[],l=o.seriesDataIndices||[];(i=i&&t.value===o.value&&t.axisType===o.axisType&&t.axisId===o.axisId&&a.length===l.length)&&Ni(a,(function(t,e){var n=l[e];i=i&&t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex})),r&&Ni(t.seriesDataIndices,(function(t){var n=t.seriesIndex,o=e[n],a=r[n];o&&a&&a.data!==o.data&&(i=!1)}))}))})),this._lastDataByCoordSys=t,this._cbParamsList=e,!!i},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,e){!si.node&&e.getDom()&&(hx(this,"_updatePosition"),this._tooltipContent.dispose(),OV("itemTooltip",e))},e.type="tooltip",e}(K_);function Tj(t,e,n){var r,i=e.ecModel;n?(r=new Kg(n,i,i),r=new Kg(e.option,r,i)):r=e;for(var o=t.length-1;o>=0;o--){var a=t[o];a&&(a instanceof Kg&&(a=a.get("tooltip",!0)),Ui(a)&&(a={formatter:a}),a&&(r=new Kg(a,r,i)))}return r}function kj(t,e){return t.dispatchAction||Gi(e.dispatchAction,e)}function Lj(t){return"center"===t||"middle"===t}var Dj=["rect","polygon","keep","clear"];function Pj(t,e){var n=$u(t?t.brush:[]);if(n.length){var r=[];Ni(n,(function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(r=r.concat(e))}));var i=t&&t.toolbox;Wi(i)&&(i=i[0]),i||(i={feature:{}},t.toolbox=[i]);var o=i.feature||(i.feature={}),a=o.brush||(o.brush={}),s=a.type||(a.type=[]);s.push.apply(s,r),function(t){var e={};Ni(t,(function(t){e[t]=1})),t.length=0,Ni(e,(function(e,n){t.push(n)}))}(s),e&&!s.length&&s.push.apply(s,Dj)}}var Rj=Ni;function Oj(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function Ej(t,e,n){var r={};return Rj(e,(function(e){var i,o=r[e]=((i=function(){}).prototype.__hidden=i.prototype,new i);Rj(t[e],(function(t,r){if(PP.isValidType(r)){var i={type:r,visual:t};n&&n(i,e),o[r]=new PP(i),"opacity"===r&&((i=Ti(i)).type="colorAlpha",o.__hidden.__alphaForOpacity=new PP(i))}}))})),r}function Nj(t,e,n){var r;Ni(n,(function(t){e.hasOwnProperty(t)&&Oj(e[t])&&(r=!0)})),r&&Ni(n,(function(n){e.hasOwnProperty(n)&&Oj(e[n])?t[n]=Ti(e[n]):delete t[n]}))}var zj={lineX:Bj(0),lineY:Bj(1),rect:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])},rect:function(t,e,n){return t&&n.boundingRect.intersect(t)}},polygon:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])&&GM(n.range,t[0],t[1])},rect:function(t,e,n){var r=n.range;if(!t||r.length<=1)return!1;var i=t.x,o=t.y,a=t.width,s=t.height,l=r[0];return!!(GM(r,i,o)||GM(r,i+a,o)||GM(r,i,o+s)||GM(r,i+a,o+s)||Ca.create(t).contain(l[0],l[1])||yg(i,o,i+a,o,r)||yg(i,o,i,o+s,r)||yg(i+a,o,i+a,o+s,r)||yg(i,o+s,i+a,o+s,r))||void 0}}};function Bj(t){var e=["x","y"],n=["width","height"];return{point:function(e,n,r){if(e){var i=r.range;return Vj(e[t],i)}},rect:function(r,i,o){if(r){var a=o.range,s=[r[e[t]],r[e[t]]+r[n[t]]];return s[1]e[0][1]&&(e[0][1]=o[0]),o[1]e[1][1]&&(e[1][1]=o[1])}return e&&Xj(e)}};function Xj(t){return new Ca(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var qj=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.prototype.init=function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new cE(e.getZr())).on("brush",Gi(this._onBrush,this)).mount()},e.prototype.render=function(t,e,n,r){this.model=t,this._updateController(t,e,n,r)},e.prototype.updateTransform=function(t,e,n,r){Wj(e),this._updateController(t,e,n,r)},e.prototype.updateVisual=function(t,e,n,r){this.updateTransform(t,e,n,r)},e.prototype.updateView=function(t,e,n,r){this._updateController(t,e,n,r)},e.prototype._updateController=function(t,e,n,r){(!r||r.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var e=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:e,areas:Ti(n),$from:e}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:e,areas:Ti(n),$from:e})},e.type="brush",e}(K_),Kj=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.areas=[],n.brushOption={},n}return a(e,t),e.prototype.optionUpdated=function(t,e){var n=this.option;!e&&Nj(n,t,["inBrush","outOfBrush"]);var r=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:"#ddd"},r.hasOwnProperty("liftZ")||(r.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=zi(t,(function(t){return $j(this.option,t)}),this))},e.prototype.setBrushOption=function(t){this.brushOption=$j(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(ov);function $j(t,e){return ki({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new Kg(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}var Qj=["rect","polygon","lineX","lineY","keep","clear"],Jj=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.render=function(t,e,n){var r,i,o;e.eachComponent({mainType:"brush"},(function(t){r=t.brushType,i=t.brushOption.brushMode||"single",o=o||!!t.areas.length})),this._brushType=r,this._brushMode=i,Ni(t.get("type",!0),(function(e){t.setIconStatus(e,("keep"===e?"multiple"===i:"clear"===e?o:e===r)?"emphasis":"normal")}))},e.prototype.updateView=function(t,e,n){this.render(t,e,n)},e.prototype.getIcons=function(){var t=this.model,e=t.get("icon",!0),n={};return Ni(t.get("type",!0),(function(t){e[t]&&(n[t]=e[t])})),n},e.prototype.onclick=function(t,e,n){var r=this._brushType,i=this._brushMode;"clear"===n?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?r:r!==n&&n,brushMode:"keep"===n?"multiple"===i?"single":"multiple":i}})},e.getDefaultOption=function(t){return{show:!0,type:Qj.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])}},e}(wG);var tW=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode={type:"box",ignoreSize:!0},n}return a(e,t),e.type="title",e.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"}},e}(ov),eW=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.prototype.render=function(t,e,n){if(this.group.removeAll(),t.get("show")){var r=this.group,i=t.getModel("textStyle"),o=t.getModel("subtextStyle"),a=t.get("textAlign"),s=eo(t.get("textBaseline"),t.get("textVerticalAlign")),l=new yd({style:Tg(i,{text:t.get("text"),fill:i.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),c=t.get("subtext"),h=new yd({style:Tg(o,{text:c,fill:o.getTextColor(),y:u.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),p=t.get("sublink"),f=t.get("triggerEvent",!0);l.silent=!d&&!f,h.silent=!p&&!f,d&&l.on("click",(function(){Zy(d,"_"+t.get("target"))})),p&&h.on("click",(function(){Zy(p,"_"+t.get("subtarget"))})),kd(l).eventData=kd(h).eventData=f?{componentType:"title",componentIndex:t.componentIndex}:null,r.add(l),c&&r.add(h);var g=r.getBoundingRect(),y=t.getBoxLayoutParams();y.width=g.width,y.height=g.height;var v=Qy(y,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));a||("middle"===(a=t.get("left")||t.get("right"))&&(a="center"),"right"===a?v.x+=v.width:"center"===a&&(v.x+=v.width/2)),s||("center"===(s=t.get("top")||t.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 m={align:a,verticalAlign:s};l.setStyle(m),h.setStyle(m),g=r.getBoundingRect();var _=v.margin,x=t.getItemStyle(["color","opacity"]);x.fill=t.get("backgroundColor");var b=new pd({shape:{x:g.x-_[3],y:g.y-_[0],width:g.width+_[1]+_[3],height:g.height+_[0]+_[2],r:t.get("borderRadius")},style:x,subPixelOptimize:!0,silent:!0});r.add(b)}},e.type="title",e}(K_);var nW=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode="box",n}return a(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),this._initData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t,e=this.option,n=e.data||[],r=e.axisType,i=this._names=[];"category"===r?(t=[],Ni(n,(function(e,n){var r,o=oc(tc(e),"");Xi(e)?(r=Ti(e)).value=n:r=n,t.push(r),i.push(o)}))):t=n;var o={category:"ordinal",time:"time",value:"number"}[r]||"number";(this._data=new SS([{name:"value",type:o}],this)).initData(t,i)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(ov),rW=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.type="timeline.slider",e.defaultOption=Jg(nW.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:[]}),e}(nW);Oi(rW,Gm.prototype);var iW=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.type="timeline",e}(K_),oW=function(t){function e(e,n,r,i){var o=t.call(this,e,n,r)||this;return o.type=i||"value",o}return a(e,t),e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},e}(cI),aW=Math.PI,sW=uc(),lW=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.prototype.init=function(t,e){this.api=e},e.prototype.render=function(t,e,n){if(this.model=t,this.api=n,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var r=this._layout(t,n),i=this._createGroup("_mainGroup"),o=this._createGroup("_labelGroup"),a=this._axis=this._createAxis(r,t);t.formatTooltip=function(t){return C_("nameValue",{noName:!0,value:a.scale.getLabel({value:t})})},Ni(["AxisLine","AxisTick","Control","CurrentPointer"],(function(e){this["_render"+e](r,i,a,t)}),this),this._renderAxisLabel(r,o,a,t),this._position(r,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,e){var n,r,i,o,a=t.get(["label","position"]),s=t.get("orient"),l=function(t,e){return Qy(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}(t,e),u={horizontal:"center",vertical:(n=null==a||"auto"===a?"horizontal"===s?l.y+l.height/2=0||"+"===n?"left":"right"},c={horizontal:n>=0||"+"===n?"top":"bottom",vertical:"middle"},h={horizontal:0,vertical:aW/2},d="vertical"===s?l.height:l.width,p=t.getModel("controlStyle"),f=p.get("show",!0),g=f?p.get("itemSize"):0,y=f?p.get("itemGap"):0,v=g+y,m=t.get(["label","rotate"])||0;m=m*aW/180;var _=p.get("position",!0),x=f&&p.get("showPlayBtn",!0),b=f&&p.get("showPrevBtn",!0),w=f&&p.get("showNextBtn",!0),S=0,M=d;"left"===_||"bottom"===_?(x&&(r=[0,0],S+=v),b&&(i=[S,0],S+=v),w&&(o=[M-g,0],M-=v)):(x&&(r=[M-g,0],M-=v),b&&(i=[0,0],S+=v),w&&(o=[M-g,0],M-=v));var I=[S,M];return t.get("inverse")&&I.reverse(),{viewRect:l,mainLength:d,orient:s,rotation:h[s],labelRotation:m,labelPosOpt:n,labelAlign:t.get(["label","align"])||u[s],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||c[s],playPosition:r,prevBtnPosition:i,nextBtnPosition:o,axisExtent:I,controlSize:g,controlGap:y}},e.prototype._position=function(t,e){var n=this._mainGroup,r=this._labelGroup,i=t.viewRect;if("vertical"===t.orient){var o=[1,0,0,1,0,0],a=i.x,s=i.y+i.height;pa(o,o,[-a,-s]),fa(o,o,-aW/2),pa(o,o,[a,s]),(i=i.clone()).applyTransform(o)}var l=y(i),u=y(n.getBoundingRect()),c=y(r.getBoundingRect()),h=[n.x,n.y],d=[r.x,r.y];d[0]=h[0]=l[0][0];var p,f=t.labelPosOpt;null==f||Ui(f)?(v(h,u,l,1,p="+"===f?0:1),v(d,c,l,1,1-p)):(v(h,u,l,1,p=f>=0?0:1),d[1]=h[1]+f);function g(t){t.originX=l[0][0]-t.x,t.originY=l[1][0]-t.y}function y(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function v(t,e,n,r,i){t[r]+=n[r][i]-e[r][i]}n.setPosition(h),r.setPosition(d),n.rotation=r.rotation=t.rotation,g(n),g(r)},e.prototype._createAxis=function(t,e){var n=e.getData(),r=e.get("axisType"),i=function(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new US({ordinalMeta:t.getCategories(),extent:[1/0,-1/0]});case"time":return new sM({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new YS}}(e,r);i.getTicks=function(){return n.mapArray(["value"],(function(t){return{value:t}}))};var o=n.getDataExtent("value");i.setExtent(o[0],o[1]),i.calcNiceTicks();var a=new oW("value",i,t.axisExtent,r);return a.model=e,a},e.prototype._createGroup=function(t){var e=this[t]=new xu;return this.group.add(e),e},e.prototype._renderAxisLine=function(t,e,n,r){var i=n.getExtent();if(r.get(["lineStyle","show"])){var o=new wf({shape:{x1:i[0],y1:0,x2:i[1],y2:0},style:Di({lineCap:"round"},r.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});e.add(o);var a=this._progressLine=new wf({shape:{x1:i[0],x2:this._currentPointer?this._currentPointer.x:i[0],y1:0,y2:0},style:Pi({lineCap:"round",lineWidth:o.style.lineWidth},r.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});e.add(a)}},e.prototype._renderAxisTick=function(t,e,n,r){var i=this,o=r.getData(),a=n.scale.getTicks();this._tickSymbols=[],Ni(a,(function(t){var a=n.dataToCoord(t.value),s=o.getItemModel(t.value),l=s.getModel("itemStyle"),u=s.getModel(["emphasis","itemStyle"]),c=s.getModel(["progress","itemStyle"]),h={x:a,y:0,onclick:Gi(i._changeTimeline,i,t.value)},d=uW(s,l,e,h);d.ensureState("emphasis").style=u.getItemStyle(),d.ensureState("progress").style=c.getItemStyle(),vp(d);var p=kd(d);s.get("tooltip")?(p.dataIndex=t.value,p.dataModel=r):p.dataIndex=p.dataModel=null,i._tickSymbols.push(d)}))},e.prototype._renderAxisLabel=function(t,e,n,r){var i=this;if(n.getLabelModel().get("show")){var o=r.getData(),a=n.getViewLabels();this._tickLabels=[],Ni(a,(function(r){var a=r.tickValue,s=o.getItemModel(a),l=s.getModel("label"),u=s.getModel(["emphasis","label"]),c=s.getModel(["progress","label"]),h=n.dataToCoord(r.tickValue),d=new yd({x:h,y:0,rotation:t.labelRotation-t.rotation,onclick:Gi(i._changeTimeline,i,a),silent:!1,style:Tg(l,{text:r.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});d.ensureState("emphasis").style=Tg(u),d.ensureState("progress").style=Tg(c),e.add(d),vp(d),sW(d).dataIndex=a,i._tickLabels.push(d)}))}},e.prototype._renderControl=function(t,e,n,r){var i=t.controlSize,o=t.rotation,a=r.getModel("controlStyle").getItemStyle(),s=r.getModel(["emphasis","controlStyle"]).getItemStyle(),l=r.getPlayState(),u=r.get("inverse",!0);function c(t,n,l,u){if(t){var c=lu(eo(r.get(["controlStyle",n+"BtnSize"]),i),i),h=function(t,e,n,r){var i=r.style,o=gg(t.get(["controlStyle",e]),r||{},new Ca(n[0],n[1],n[2],n[3]));i&&o.setStyle(i);return o}(r,n+"Icon",[0,-c/2,c,c],{x:t[0],y:t[1],originX:i/2,originY:0,rotation:u?-o:0,rectHover:!0,style:a,onclick:l});h.ensureState("emphasis").style=s,e.add(h),vp(h)}}c(t.nextBtnPosition,"next",Gi(this._changeTimeline,this,u?"-":"+")),c(t.prevBtnPosition,"prev",Gi(this._changeTimeline,this,u?"+":"-")),c(t.playPosition,l?"stop":"play",Gi(this._handlePlayClick,this,!l),!0)},e.prototype._renderCurrentPointer=function(t,e,n,r){var i=r.getData(),o=r.getCurrentIndex(),a=i.getItemModel(o).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=Gi(s._handlePointerDrag,s),t.ondragend=Gi(s._handlePointerDragend,s),cW(t,s._progressLine,o,n,r,!0)},onUpdate:function(t){cW(t,s._progressLine,o,n,r)}};this._currentPointer=uW(a,a,this._mainGroup,{},this._currentPointer,l)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,e,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,e){var n=this._toAxisCoord(t)[0],r=ku(this._axis.getExtent().slice());n>r[1]&&(n=r[1]),n=0&&(a[o]=+a[o].toFixed(h)),[a,c]}var bW={min:ji(xW,"min"),max:ji(xW,"max"),average:ji(xW,"average"),median:ji(xW,"median")};function wW(t,e){if(e){var n=t.getData(),r=t.coordinateSystem,i=r&&r.dimensions;if(!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!Wi(e.coord)&&Wi(i)){var o=SW(e,n,r,t);if((e=Ti(e)).type&&bW[e.type]&&o.baseAxis&&o.valueAxis){var a=Ri(i,o.baseAxis.dim),s=Ri(i,o.valueAxis.dim),l=bW[e.type](n,o.baseDataDim,o.valueDataDim,a,s);e.coord=l[0],e.value=l[1]}else e.coord=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis]}if(null!=e.coord&&Wi(i))for(var u=e.coord,c=0;c<2;c++)bW[u[c]]&&(u[c]=CW(n,n.mapDimension(i[c]),u[c]));else e.coord=[];return e}}function SW(t,e,n,r){var i={};return null!=t.valueIndex||null!=t.valueDim?(i.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,i.valueAxis=n.getAxis(function(t,e){var n=t.getData().getDimensionInfo(e);return n&&n.coordDim}(r,i.valueDataDim)),i.baseAxis=n.getOtherAxis(i.valueAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim)):(i.baseAxis=r.getBaseAxis(),i.valueAxis=n.getOtherAxis(i.baseAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim),i.valueDataDim=e.mapDimension(i.valueAxis.dim)),i}function MW(t,e){return!(t&&t.containData&&e.coord&&!_W(e))||t.containData(e.coord)}function IW(t,e){return t?function(t,n,r,i){return Zm(i<2?t.coord&&t.coord[i]:t.value,e[i])}:function(t,n,r,i){return Zm(t.value,e[i])}}function CW(t,e,n){if("average"===n){var r=0,i=0;return t.each(e,(function(t,e){isNaN(t)||(r+=t,i++)})),r/i}return"median"===n?t.getMedian(e):t.getDataExtent(e)["max"===n?1:0]}var AW=uc(),TW=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.prototype.init=function(){this.markerGroupMap=fo()},e.prototype.render=function(t,e,n){var r=this,i=this.markerGroupMap;i.each((function(t){AW(t).keep=!1})),e.eachSeries((function(t){var i=vW.getMarkerModelFromSeries(t,r.type);i&&r.renderSeries(t,i,e,n)})),i.each((function(t){!AW(t).keep&&r.group.remove(t.group)}))},e.prototype.markKeep=function(t){AW(t).keep=!0},e.prototype.toggleBlurSeries=function(t,e){var n=this;Ni(t,(function(t){var r=vW.getMarkerModelFromSeries(t,n.type);r&&r.getData().eachItemGraphicEl((function(t){t&&(e?ap(t):sp(t))}))}))},e.type="marker",e}(K_);function kW(t,e,n){var r=e.coordinateSystem;t.each((function(i){var o,a=t.getItemModel(i),s=Au(a.get("x"),n.getWidth()),l=Au(a.get("y"),n.getHeight());if(isNaN(s)||isNaN(l)){if(e.getMarkerPosition)o=e.getMarkerPosition(t.getValues(t.dimensions,i));else if(r){var u=t.get(r.dimensions[0],i),c=t.get(r.dimensions[1],i);o=r.dataToPoint([u,c])}}else o=[s,l];isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),t.setItemLayout(i,o)}))}var LW=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=vW.getMarkerModelFromSeries(t,"markPoint");e&&(kW(e.getData(),t,n),this.markerGroupMap.get(t.id).updateLayout())}),this)},e.prototype.renderSeries=function(t,e,n,r){var i=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new wA),u=function(t,e,n){var r;r=t?zi(t&&t.dimensions,(function(t){return Di(Di({},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{}),{name:t,ordinalMeta:null})})):[{name:"value",type:"float"}];var i=new SS(r,n),o=zi(n.get("data"),ji(wW,e));t&&(o=Vi(o,ji(MW,t)));var a=IW(!!t,r);return i.initData(o,null,a),i}(i,t,e);e.setData(u),kW(e.getData(),t,r),u.each((function(t){var n=u.getItemModel(t),r=n.getShallow("symbol"),i=n.getShallow("symbolSize"),o=n.getShallow("symbolRotate"),s=n.getShallow("symbolOffset"),l=n.getShallow("symbolKeepAspect");if(Hi(r)||Hi(i)||Hi(o)||Hi(s)){var c=e.getRawValue(t),h=e.getDataParams(t);Hi(r)&&(r=r(c,h)),Hi(i)&&(i=i(c,h)),Hi(o)&&(o=o(c,h)),Hi(s)&&(s=s(c,h))}var d=n.getModel("itemStyle").getItemStyle(),p=$x(a,"color");d.fill||(d.fill=p),u.setItemVisual(t,{symbol:r,symbolSize:i,symbolRotate:o,symbolOffset:s,symbolKeepAspect:l,style:d})})),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl((function(t){t.traverse((function(t){kd(t).dataModel=e}))})),this.markKeep(l),l.group.silent=e.get("silent")||t.get("silent")},e.type="markPoint",e}(TW);var DW=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,r){return new e(t,n,r)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(vW),PW=uc(),RW=function(t,e,n,r){var i,o=t.getData();if(Wi(r))i=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=e.getAxis(null!=r.yAxis?"y":"x"),l=to(r.yAxis,r.xAxis);else{var u=SW(r,o,e,t);s=u.valueAxis,l=CW(o,DS(o,u.valueDataDim),a)}var c="x"===s.dim?0:1,h=1-c,d=Ti(r),p={coord:[]};d.type=null,d.coord=[],d.coord[h]=-1/0,p.coord[h]=1/0;var f=n.get("precision");f>=0&&Yi(l)&&(l=+l.toFixed(Math.min(f,20))),d.coord[c]=p.coord[c]=l,i=[d,p,{type:a,valueIndex:r.valueIndex,value:l}]}else i=[]}var g=[wW(t,i[0]),wW(t,i[1]),Di({},i[2])];return g[2].type=g[2].type||null,ki(g[2],g[0]),ki(g[2],g[1]),g};function OW(t){return!isNaN(t)&&!isFinite(t)}function EW(t,e,n,r){var i=1-t,o=r.dimensions[t];return OW(e[i])&&OW(n[i])&&e[t]===n[t]&&r.getAxis(o).containData(e[t])}function NW(t,e){if("cartesian2d"===t.type){var n=e[0].coord,r=e[1].coord;if(n&&r&&(EW(1,n,r,t)||EW(0,n,r,t)))return!0}return MW(t,e[0])&&MW(t,e[1])}function zW(t,e,n,r,i){var o,a=r.coordinateSystem,s=t.getItemModel(e),l=Au(s.get("x"),i.getWidth()),u=Au(s.get("y"),i.getHeight());if(isNaN(l)||isNaN(u)){if(r.getMarkerPosition)o=r.getMarkerPosition(t.getValues(t.dimensions,e));else{var c=a.dimensions,h=t.get(c[0],e),d=t.get(c[1],e);o=a.dataToPoint([h,d])}if(NA(a,"cartesian2d")){var p=a.getAxis("x"),f=a.getAxis("y");c=a.dimensions;OW(t.get(c[0],e))?o[0]=p.toGlobalCoord(p.getExtent()[n?0:1]):OW(t.get(c[1],e))&&(o[1]=f.toGlobalCoord(f.getExtent()[n?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];t.setItemLayout(e,o)}var BW=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=vW.getMarkerModelFromSeries(t,"markLine");if(e){var r=e.getData(),i=PW(e).from,o=PW(e).to;i.each((function(e){zW(i,e,!0,t,n),zW(o,e,!1,t,n)})),r.each((function(t){r.setItemLayout(t,[i.getItemLayout(t),o.getItemLayout(t)])})),this.markerGroupMap.get(t.id).updateLayout()}}),this)},e.prototype.renderSeries=function(t,e,n,r){var i=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new ZR);this.group.add(l.group);var u=function(t,e,n){var r;r=t?zi(t&&t.dimensions,(function(t){return Di(Di({},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{}),{name:t,ordinalMeta:null})})):[{name:"value",type:"float"}];var i=new SS(r,n),o=new SS(r,n),a=new SS([],n),s=zi(n.get("data"),ji(RW,e,t,n));t&&(s=Vi(s,ji(NW,t)));var l=IW(!!t,r);return i.initData(zi(s,(function(t){return t[0]})),null,l),o.initData(zi(s,(function(t){return t[1]})),null,l),a.initData(zi(s,(function(t){return t[2]}))),a.hasItemOption=!0,{from:i,to:o,line:a}}(i,t,e),c=u.from,h=u.to,d=u.line;PW(e).from=c,PW(e).to=h,e.setData(d);var p=e.get("symbol"),f=e.get("symbolSize"),g=e.get("symbolRotate"),y=e.get("symbolOffset");function v(e,n,i){var o=e.getItemModel(n);zW(e,n,i,t,r);var s=o.getModel("itemStyle").getItemStyle();null==s.fill&&(s.fill=$x(a,"color")),e.setItemVisual(n,{symbolKeepAspect:o.get("symbolKeepAspect"),symbolOffset:eo(o.get("symbolOffset",!0),y[i?0:1]),symbolRotate:eo(o.get("symbolRotate",!0),g[i?0:1]),symbolSize:eo(o.get("symbolSize"),f[i?0:1]),symbol:eo(o.get("symbol",!0),p[i?0:1]),style:s})}Wi(p)||(p=[p,p]),Wi(f)||(f=[f,f]),Wi(g)||(g=[g,g]),Wi(y)||(y=[y,y]),u.from.each((function(t){v(c,t,!0),v(h,t,!1)})),d.each((function(t){var e=d.getItemModel(t).getModel("lineStyle").getLineStyle();d.setItemLayout(t,[c.getItemLayout(t),h.getItemLayout(t)]),null==e.stroke&&(e.stroke=c.getItemVisual(t,"style").fill),d.setItemVisual(t,{fromSymbolKeepAspect:c.getItemVisual(t,"symbolKeepAspect"),fromSymbolOffset:c.getItemVisual(t,"symbolOffset"),fromSymbolRotate:c.getItemVisual(t,"symbolRotate"),fromSymbolSize:c.getItemVisual(t,"symbolSize"),fromSymbol:c.getItemVisual(t,"symbol"),toSymbolKeepAspect:h.getItemVisual(t,"symbolKeepAspect"),toSymbolOffset:h.getItemVisual(t,"symbolOffset"),toSymbolRotate:h.getItemVisual(t,"symbolRotate"),toSymbolSize:h.getItemVisual(t,"symbolSize"),toSymbol:h.getItemVisual(t,"symbol"),style:e})})),l.updateData(d),u.line.eachItemGraphicEl((function(t){kd(t).dataModel=e,t.traverse((function(t){kd(t).dataModel=e}))})),this.markKeep(l),l.group.silent=e.get("silent")||t.get("silent")},e.type="markLine",e}(TW);var VW=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,r){return new e(t,n,r)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(vW),FW=uc(),GW=function(t,e,n,r){var i=r[0],o=r[1];if(i&&o){var a=wW(t,i),s=wW(t,o),l=a.coord,u=s.coord;l[0]=to(l[0],-1/0),l[1]=to(l[1],-1/0),u[0]=to(u[0],1/0),u[1]=to(u[1],1/0);var c=Li([{},a,s]);return c.coord=[a.coord,s.coord],c.x0=a.x,c.y0=a.y,c.x1=s.x,c.y1=s.y,c}};function jW(t){return!isNaN(t)&&!isFinite(t)}function WW(t,e,n,r){var i=1-t;return jW(e[i])&&jW(n[i])}function HW(t,e){var n=e.coord[0],r=e.coord[1],i={coord:n,x:e.x0,y:e.y0},o={coord:r,x:e.x1,y:e.y1};return NA(t,"cartesian2d")?!(!n||!r||!WW(1,n,r)&&!WW(0,n,r))||function(t,e,n){return!(t&&t.containZone&&e.coord&&n.coord&&!_W(e)&&!_W(n))||t.containZone(e.coord,n.coord)}(t,i,o):MW(t,i)||MW(t,o)}function UW(t,e,n,r,i){var o,a=r.coordinateSystem,s=t.getItemModel(e),l=Au(s.get(n[0]),i.getWidth()),u=Au(s.get(n[1]),i.getHeight());if(isNaN(l)||isNaN(u)){if(r.getMarkerPosition){var c=t.getValues(["x0","y0"],e),h=t.getValues(["x1","y1"],e),d=a.clampData(c),p=a.clampData(h),f=[];"x0"===n[0]?f[0]=d[0]>p[0]?h[0]:c[0]:f[0]=d[0]>p[0]?c[0]:h[0],"y0"===n[1]?f[1]=d[1]>p[1]?h[1]:c[1]:f[1]=d[1]>p[1]?c[1]:h[1],o=r.getMarkerPosition(f,n,!0)}else{var g=[m=t.get(n[0],e),_=t.get(n[1],e)];a.clampData&&a.clampData(g,g),o=a.dataToPoint(g,!0)}if(NA(a,"cartesian2d")){var y=a.getAxis("x"),v=a.getAxis("y"),m=t.get(n[0],e),_=t.get(n[1],e);jW(m)?o[0]=y.toGlobalCoord(y.getExtent()["x0"===n[0]?0:1]):jW(_)&&(o[1]=v.toGlobalCoord(v.getExtent()["y0"===n[1]?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];return o}var ZW=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],YW=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=vW.getMarkerModelFromSeries(t,"markArea");if(e){var r=e.getData();r.each((function(e){var i=zi(ZW,(function(i){return UW(r,e,i,t,n)}));r.setItemLayout(e,i),r.getItemGraphicEl(e).setShape("points",i)}))}}),this)},e.prototype.renderSeries=function(t,e,n,r){var i=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,{group:new xu});this.group.add(l.group),this.markKeep(l);var u=function(t,e,n){var r,i,o=["x0","y0","x1","y1"];if(t){var a=zi(t&&t.dimensions,(function(t){var n=e.getData();return Di(Di({},n.getDimensionInfo(n.mapDimension(t))||{}),{name:t,ordinalMeta:null})}));i=zi(o,(function(t,e){return{name:t,type:a[e%2].type}})),r=new SS(i,n)}else r=new SS(i=[{name:"value",type:"float"}],n);var s=zi(n.get("data"),ji(GW,e,t,n));t&&(s=Vi(s,ji(HW,t)));var l=t?function(t,e,n,r){return Zm(t.coord[Math.floor(r/2)][r%2],i[r])}:function(t,e,n,r){return Zm(t.value,i[r])};return r.initData(s,null,l),r.hasItemOption=!0,r}(i,t,e);e.setData(u),u.each((function(e){var n=zi(ZW,(function(n){return UW(u,e,n,t,r)})),o=i.getAxis("x").scale,s=i.getAxis("y").scale,l=o.getExtent(),c=s.getExtent(),h=[o.parse(u.get("x0",e)),o.parse(u.get("x1",e))],d=[s.parse(u.get("y0",e)),s.parse(u.get("y1",e))];ku(h),ku(d);var p=!!(l[0]>h[1]||l[1]d[1]||c[1]=0},e.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",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}},e}(ov),qW=ji,KW=Ni,$W=xu,QW=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.newlineDisabled=!1,n}return a(e,t),e.prototype.init=function(){this.group.add(this._contentGroup=new $W),this.group.add(this._selectorGroup=new $W),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,e,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var i=t.get("align"),o=t.get("orient");i&&"auto"!==i||(i="right"===t.get("left")&&"vertical"===o?"right":"left");var a=t.get("selector",!0),s=t.get("selectorPosition",!0);!a||s&&"auto"!==s||(s="horizontal"===o?"end":"start"),this.renderInner(i,t,e,n,a,o,s);var l=t.getBoxLayoutParams(),u={width:n.getWidth(),height:n.getHeight()},c=t.get("padding"),h=Qy(l,u,c),d=this.layoutInner(t,i,h,r,a,s),p=Qy(Pi({width:d.width,height:d.height},l),u,c);this.group.x=p.x-d.x,this.group.y=p.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=AG(d,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,e,n,r,i,o,a){var s=this.getContentGroup(),l=fo(),u=e.get("selectedMode"),c=[];n.eachRawSeries((function(t){!t.get("legendHoverLink")&&c.push(t.id)})),KW(e.getData(),(function(i,o){var a=i.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var h=new $W;return h.newline=!0,void s.add(h)}var d=n.getSeriesByName(a)[0];if(!l.get(a))if(d){var p=d.getData(),f=p.getVisual("legendLineStyle")||{},g=p.getVisual("legendIcon"),y=p.getVisual("style"),v=this._createItem(d,a,o,i,e,t,f,y,g,u,r);v.on("click",qW(JW,a,null,r,c)).on("mouseover",qW(eH,d.name,null,r,c)).on("mouseout",qW(nH,d.name,null,r,c)),n.ssr&&v.eachChild((function(t){var e=kd(t);e.seriesIndex=d.seriesIndex,e.dataIndex=o,e.ssrType="legend"})),l.set(a,!0)}else n.eachRawSeries((function(s){if(!l.get(a)&&s.legendVisualProvider){var h=s.legendVisualProvider;if(!h.containName(a))return;var d=h.indexOfName(a),p=h.getItemVisual(d,"style"),f=h.getItemVisual(d,"legendIcon"),g=Ns(p.fill);g&&0===g[3]&&(g[3]=.2,p=Di(Di({},p),{fill:js(g,"rgba")}));var y=this._createItem(s,a,o,i,e,t,{},p,f,u,r);y.on("click",qW(JW,null,a,r,c)).on("mouseover",qW(eH,null,a,r,c)).on("mouseout",qW(nH,null,a,r,c)),n.ssr&&y.eachChild((function(t){var e=kd(t);e.seriesIndex=s.seriesIndex,e.dataIndex=o,e.ssrType="legend"})),l.set(a,!0)}}),this)}),this),i&&this._createSelector(i,e,r,o,a)},e.prototype._createSelector=function(t,e,n,r,i){var o=this.getSelectorGroup();KW(t,(function(t){var r=t.type,i=new yd({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===r?"legendAllSelect":"legendInverseSelect",legendId:e.id})}});o.add(i),Cg(i,{normal:e.getModel("selectorLabel"),emphasis:e.getModel(["emphasis","selectorLabel"])},{defaultText:t.title}),vp(i)}))},e.prototype._createItem=function(t,e,n,r,i,o,a,s,l,u,c){var h=t.visualDrawType,d=i.get("itemWidth"),p=i.get("itemHeight"),f=i.isSelected(e),g=r.get("symbolRotate"),y=r.get("symbolKeepAspect"),v=r.get("icon"),m=function(t,e,n,r,i,o,a){function s(t,e){"auto"===t.lineWidth&&(t.lineWidth=e.lineWidth>0?2:0),KW(t,(function(n,r){"inherit"===t[r]&&(t[r]=e[r])}))}var l=e.getModel("itemStyle"),u=l.getItemStyle(),c=0===t.lastIndexOf("empty",0)?"fill":"stroke",h=l.getShallow("decal");u.decal=h&&"inherit"!==h?Fb(h,a):r.decal,"inherit"===u.fill&&(u.fill=r[i]);"inherit"===u.stroke&&(u.stroke=r[c]);"inherit"===u.opacity&&(u.opacity=("fill"===i?r:n).opacity);s(u,r);var d=e.getModel("lineStyle"),p=d.getLineStyle();if(s(p,n),"auto"===u.fill&&(u.fill=r.fill),"auto"===u.stroke&&(u.stroke=r.fill),"auto"===p.stroke&&(p.stroke=r.fill),!o){var f=e.get("inactiveBorderWidth"),g=u[c];u.lineWidth="auto"===f?r.lineWidth>0&&g?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),p.stroke=d.get("inactiveColor"),p.lineWidth=d.get("inactiveWidth")}return{itemStyle:u,lineStyle:p}}(l=v||l||"roundRect",r,a,s,h,f,c),_=new $W,x=r.getModel("textStyle");if(!Hi(t.getLegendIcon)||v&&"inherit"!==v){var b="inherit"===v&&t.getData().getVisual("symbol")?"inherit"===g?t.getData().getVisual("symbolRotate"):g:0;_.add(function(t){var e=t.icon||"roundRect",n=pb(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill,t.symbolKeepAspect);n.setStyle(t.itemStyle),n.rotation=(t.iconRotate||0)*Math.PI/180,n.setOrigin([t.itemWidth/2,t.itemHeight/2]),e.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2);return n}({itemWidth:d,itemHeight:p,icon:l,iconRotate:b,itemStyle:m.itemStyle,symbolKeepAspect:y}))}else _.add(t.getLegendIcon({itemWidth:d,itemHeight:p,icon:l,iconRotate:g,itemStyle:m.itemStyle,lineStyle:m.lineStyle,symbolKeepAspect:y}));var w="left"===o?d+5:-5,S=o,M=i.get("formatter"),I=e;Ui(M)&&M?I=M.replace("{name}",null!=e?e:""):Hi(M)&&(I=M(e));var C=f?x.getTextColor():r.get("inactiveColor");_.add(new yd({style:Tg(x,{text:I,x:w,y:p/2,fill:C,align:S,verticalAlign:"middle"},{inheritColor:C})}));var A=new pd({shape:_.getBoundingRect(),style:{fill:"transparent"}}),T=r.getModel("tooltip");return T.get("show")&&_g({el:A,componentModel:i,itemName:e,itemTooltipOption:T.option}),_.add(A),_.eachChild((function(t){t.silent=!0})),A.silent=!u,this.getContentGroup().add(_),vp(_),_.__legendDataIndex=n,_},e.prototype.layoutInner=function(t,e,n,r,i,o){var a=this.getContentGroup(),s=this.getSelectorGroup();$y(t.get("orient"),a,t.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),i){$y("horizontal",s,t.get("selectorItemGap",!0));var c=s.getBoundingRect(),h=[-c.x,-c.y],d=t.get("selectorButtonGap",!0),p=t.getOrient().index,f=0===p?"width":"height",g=0===p?"height":"width",y=0===p?"y":"x";"end"===o?h[p]+=l[f]+d:u[p]+=c[f]+d,h[1-p]+=l[g]/2-c[g]/2,s.x=h[0],s.y=h[1],a.x=u[0],a.y=u[1];var v={x:0,y:0};return v[f]=l[f]+d+c[f],v[g]=Math.max(l[g],c[g]),v[y]=Math.min(0,c[y]+h[1-p]),v}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(K_);function JW(t,e,n,r){nH(t,e,n,r),n.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),eH(t,e,n,r)}function tH(t){for(var e,n=t.getZr().storage.getDisplayList(),r=0,i=n.length;rn[i],f=[-h.x,-h.y];e||(f[r]=l[s]);var g=[0,0],y=[-d.x,-d.y],v=eo(t.get("pageButtonGap",!0),t.get("itemGap",!0));p&&("end"===t.get("pageButtonPosition",!0)?y[r]+=n[i]-d[i]:g[r]+=d[i]+v);y[1-r]+=h[o]/2-d[o]/2,l.setPosition(f),u.setPosition(g),c.setPosition(y);var m={x:0,y:0};if(m[i]=p?n[i]:h[i],m[o]=Math.max(h[o],d[o]),m[a]=Math.min(0,d[a]+y[1-r]),u.__rectSize=n[i],p){var _={x:0,y:0};_[i]=Math.max(n[i]-d[i]-v,0),_[o]=m[o],u.setClipPath(new pd({shape:_})),u.__rectSize=_[i]}else c.eachChild((function(t){t.attr({invisible:!0,silent:!0})}));var x=this._getPageInfo(t);return null!=x.pageIndex&&Wf(l,{x:x.contentPosition[0],y:x.contentPosition[1]},p?t:null),this._updatePageInfoView(t,x),m},e.prototype._pageGo=function(t,e,n){var r=this._getPageInfo(e)[t];null!=r&&n.dispatchAction({type:"legendScroll",scrollDataIndex:r,legendId:e.id})},e.prototype._updatePageInfoView=function(t,e){var n=this._controllerGroup;Ni(["pagePrev","pageNext"],(function(r){var i=null!=e[r+"DataIndex"],o=n.childOfName(r);o&&(o.setStyle("fill",i?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),o.cursor=i?"pointer":"default")}));var r=n.childOfName("pageText"),i=t.get("pageFormatter"),o=e.pageIndex,a=null!=o?o+1:0,s=e.pageCount;r&&i&&r.setStyle("text",Ui(i)?i.replace("{current}",null==a?"":a+"").replace("{total}",null==s?"":s+""):i({current:a,total:s}))},e.prototype._getPageInfo=function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=t.getOrient().index,o=cH[i],a=hH[i],s=this._findTargetItemIndex(e),l=n.children(),u=l[s],c=l.length,h=c?1:0,d={contentPosition:[n.x,n.y],pageCount:h,pageIndex:h-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return d;var p=m(u);d.contentPosition[i]=-p.s;for(var f=s+1,g=p,y=p,v=null;f<=c;++f)(!(v=m(l[f]))&&y.e>g.s+r||v&&!_(v,g.s))&&(g=y.i>g.i?y:v)&&(null==d.pageNextDataIndex&&(d.pageNextDataIndex=g.i),++d.pageCount),y=v;for(f=s-1,g=p,y=p,v=null;f>=-1;--f)(v=m(l[f]))&&_(y,v.s)||!(g.i=e&&t.s<=e+r}},e.prototype._findTargetItemIndex=function(t){return this._showController?(this.getContentGroup().eachChild((function(r,i){var o=r.__legendDataIndex;null==n&&null!=o&&(n=i),o===t&&(e=i)})),null!=e?e:n):0;var e,n},e.type="legend.scroll",e}(QW);function pH(t){Kw(aH),t.registerComponentModel(sH),t.registerComponentView(dH),function(t){t.registerAction("legendScroll","legendscroll",(function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},(function(t){t.setScrollDataIndex(n)}))}))}(t)}var fH=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.type="dataZoom.inside",e.defaultOption=Jg(cG.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(cG),gH=uc();function yH(t,e){if(e){t.removeKey(e.model.uid);var n=e.controller;n&&n.dispose()}}function vH(t,e){t.isDisposed()||t.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function mH(t,e,n,r){return t.coordinateSystem.containPoint([n,r])}function _H(t){t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,(function(t,e){var n=gH(e),r=n.coordSysRecordMap||(n.coordSysRecordMap=fo());r.each((function(t){t.dataZoomInfoMap=null})),t.eachComponent({mainType:"dataZoom",subType:"inside"},(function(t){Ni(lG(t).infoList,(function(n){var i=n.model.uid,o=r.get(i)||r.set(i,function(t,e){var n={model:e,containsPoint:ji(mH,e),dispatchAction:ji(vH,t),dataZoomInfoMap:null,controller:null},r=n.controller=new iL(t.getZr());return Ni(["pan","zoom","scrollMove"],(function(t){r.on(t,(function(e){var r=[];n.dataZoomInfoMap.each((function(i){if(e.isAvailableBehavior(i.model.option)){var o=(i.getRange||{})[t],a=o&&o(i.dzReferCoordSysInfo,n.model.mainType,n.controller,e);!i.model.get("disabled",!0)&&a&&r.push({dataZoomId:i.model.id,start:a[0],end:a[1]})}})),r.length&&n.dispatchAction(r)}))})),n}(e,n.model));(o.dataZoomInfoMap||(o.dataZoomInfoMap=fo())).set(t.uid,{dzReferCoordSysInfo:n,model:t,getRange:null})}))})),r.each((function(t){var e,n=t.controller,i=t.dataZoomInfoMap;if(i){var o=i.keys()[0];null!=o&&(e=i.get(o))}if(e){var a=function(t){var e,n="type_",r={type_true:2,type_move:1,type_false:0,type_undefined:-1},i=!0;return t.each((function(t){var o=t.model,a=!o.get("disabled",!0)&&(!o.get("zoomLock",!0)||"move");r[n+a]>r[n+e]&&(e=a),i=i&&o.get("preventDefaultMouseMove",!0)})),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i}}}(i);n.enable(a.controlType,a.opt),n.setPointerChecker(t.containsPoint),cx(t,"dispatchAction",e.model.get("throttle",!0),"fixRate")}else yH(r,t)}))}))}var xH=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return a(e,t),e.prototype.render=function(e,n,r){t.prototype.render.apply(this,arguments),e.noTarget()?this._clear():(this.range=e.getPercentRange(),function(t,e,n){gH(t).coordSysRecordMap.each((function(t){var r=t.dataZoomInfoMap.get(e.uid);r&&(r.getRange=n)}))}(r,e,{pan:Gi(bH.pan,this),zoom:Gi(bH.zoom,this),scrollMove:Gi(bH.scrollMove,this)}))},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){!function(t,e){for(var n=gH(t).coordSysRecordMap,r=n.keys(),i=0;i0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(o[1]-o[0])+o[0],u=Math.max(1/r.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return VO(0,o,[0,100],0,c.minSpan,c.maxSpan),this.range=o,i[0]!==o[0]||i[1]!==o[1]?o:void 0}},pan:wH((function(t,e,n,r,i,o){var a=SH[r]([o.oldX,o.oldY],[o.newX,o.newY],e,i,n);return a.signal*(t[1]-t[0])*a.pixel/a.pixelLength})),scrollMove:wH((function(t,e,n,r,i,o){return SH[r]([0,0],[o.scrollDelta,o.scrollDelta],e,i,n).signal*(t[1]-t[0])*o.scrollDelta}))};function wH(t){return function(e,n,r,i){var o=this.range,a=o.slice(),s=e.axisModels[0];if(s)return VO(t(a,s,e,n,r,i),a,[0,100],"all"),this.range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}var SH={grid:function(t,e,n,r,i){var o=n.axis,a={},s=i.model.coordinateSystem.getRect();return t=t||[0,0],"x"===o.dim?(a.pixel=e[0]-t[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(t,e,n,r,i){var o=n.axis,a={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===n.mainType?(a.pixel=e[0]-t[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=o.inverse?-1:1),a},singleAxis:function(t,e,n,r,i){var o=n.axis,a=i.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===o.orient?(s.pixel=e[0]-t[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}};function MH(t){xG(t),t.registerComponentModel(fH),t.registerComponentView(xH),_H(t)}var IH=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=Jg(cG.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:{handleLabel:{show:!0},handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(cG),CH=pd,AH="horizontal",TH="vertical",kH=["line","bar","candlestick","scatter"],LH={easing:"cubicOut",duration:100,delay:0},DH=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._displayables={},n}return a(e,t),e.prototype.init=function(t,e){this.api=e,this._onBrush=Gi(this._onBrush,this),this._onBrushEnd=Gi(this._onBrushEnd,this)},e.prototype.render=function(e,n,r,i){if(t.prototype.render.apply(this,arguments),cx(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),!1!==e.get("show")){if(e.noTarget())return this._clear(),void this.group.removeAll();i&&"dataZoom"===i.type&&i.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){hx(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var e=this._displayables.sliderGroup=new xu;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,e=this.api,n=t.get("brushSelect")?7:0,r=this._findCoordRect(),i={width:e.getWidth(),height:e.getHeight()},o=this._orient===AH?{right:i.width-r.x-r.width,top:i.height-30-7-n,width:r.width,height:30}:{right:7,top:r.y,width:30,height:r.height},a=nv(t.option);Ni(["right","top","width","height"],(function(t){"ph"===a[t]&&(a[t]=o[t])}));var s=Qy(a,i);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===TH&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,e=this._location,n=this._orient,r=this.dataZoomModel.getFirstTargetAxisModel(),i=r&&r.get("inverse"),o=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(n!==AH||i?n===AH&&i?{scaleY:a?1:-1,scaleX:-1}:n!==TH||i?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=t.getBoundingRect([o]);t.x=e.x-s.x,t.y=e.y-s.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.sliderGroup,r=t.get("brushSelect");n.add(new CH({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var i=new CH({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:Gi(this._onClickPanel,this)}),o=this.api.getZr();r?(i.on("mousedown",this._onBrushStart,this),i.cursor="crosshair",o.on("mousemove",this._onBrush),o.on("mouseup",this._onBrushEnd)):(o.off("mousemove",this._onBrush),o.off("mouseup",this._onBrushEnd)),n.add(i)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],t){var e=this._size,n=this._shadowSize||[],r=t.series,i=r.getRawData(),o=r.getShadowDim&&r.getShadowDim(),a=o&&i.getDimensionInfo(o)?r.getShadowDim():t.otherDim;if(null!=a){var s=this._shadowPolygonPts,l=this._shadowPolylinePts;if(i!==this._shadowData||a!==this._shadowDim||e[0]!==n[0]||e[1]!==n[1]){var u=i.getDataExtent(a),c=.3*(u[1]-u[0]);u=[u[0]-c,u[1]+c];var h,d=[0,e[1]],p=[0,e[0]],f=[[e[0],0],[0,0]],g=[],y=p[1]/(i.count()-1),v=0,m=Math.round(i.count()/e[0]);i.each([a],(function(t,e){if(m>0&&e%m)v+=y;else{var n=null==t||isNaN(t)||""===t,r=n?0:Cu(t,u,d,!0);n&&!h&&e?(f.push([f[f.length-1][0],0]),g.push([g[g.length-1][0],0])):!n&&h&&(f.push([v,0]),g.push([v,0])),f.push([v,r]),g.push([v,r]),v+=y,h=n}})),s=this._shadowPolygonPts=f,l=this._shadowPolylinePts=g}this._shadowData=i,this._shadowDim=a,this._shadowSize=[e[0],e[1]];for(var _=this.dataZoomModel,x=0;x<3;x++){var b=w(1===x);this._displayables.sliderGroup.add(b),this._displayables.dataShadowSegs.push(b)}}}function w(t){var e=_.getModel(t?"selectedDataBackground":"dataBackground"),n=new xu,r=new vf({shape:{points:s},segmentIgnoreThreshold:1,style:e.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),i=new _f({shape:{points:l},segmentIgnoreThreshold:1,style:e.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(r),n.add(i),n}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var n,r=this.ecModel;return t.eachTargetAxis((function(i,o){Ni(t.getAxisProxy(i,o).getTargetSeriesModels(),(function(t){if(!(n||!0!==e&&Ri(kH,t.get("type"))<0)){var a,s=r.getComponent(aG(i),o).axis,l=function(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}(i),u=t.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),l=t.getData().mapDimension(l),n={thisAxis:s,series:t,thisDim:i,otherDim:l,otherAxisInverse:a}}}),this)}),this),n}},e.prototype._renderHandle=function(){var t=this.group,e=this._displayables,n=e.handles=[null,null],r=e.handleLabels=[null,null],i=this._displayables.sliderGroup,o=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,u=a.get("brushSelect"),c=e.filler=new CH({silent:u,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});i.add(c),i.add(new CH({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:o[0],height:o[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),Ni([0,1],(function(e){var o=a.get("handleIcon");!cb[o]&&o.indexOf("path://")<0&&o.indexOf("image://")<0&&(o="path://"+o);var s=pb(o,-1,0,2,2,null,!0);s.attr({cursor:PH(this._orient),draggable:!0,drift:Gi(this._onDragMove,this,e),ondragend:Gi(this._onDragEnd,this),onmouseover:Gi(this._showDataInfo,this,!0),onmouseout:Gi(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=Au(u,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),vp(s);var c=a.get("handleColor");null!=c&&(s.style.fill=c),i.add(n[e]=s);var h=a.getModel("textStyle"),d=(a.get("handleLabel")||{}).show||!1;t.add(r[e]=new yd({silent:!0,invisible:!d,style:Tg(h,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:h.getTextColor(),font:h.getFont()}),z2:10}))}),this);var h=c;if(u){var d=Au(a.get("moveHandleSize"),o[1]),p=e.moveHandle=new pd({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:d}}),f=.8*d,g=e.moveHandleIcon=pb(a.get("moveHandleIcon"),-f/2,-f/2,f,f,"#fff",!0);g.silent=!0,g.y=o[1]+d/2-.5,p.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var y=Math.min(o[1]/2,Math.max(d,10));(h=e.moveZone=new pd({invisible:!0,shape:{y:o[1]-y,height:d+y}})).on("mouseover",(function(){s.enterEmphasis(p)})).on("mouseout",(function(){s.leaveEmphasis(p)})),i.add(p),i.add(g),i.add(h)}h.attr({draggable:!0,cursor:PH(this._orient),drift:Gi(this._onDragMove,this,"all"),ondragstart:Gi(this._showDataInfo,this,!0),ondragend:Gi(this._onDragEnd,this),onmouseover:Gi(this._showDataInfo,this,!0),onmouseout:Gi(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[Cu(t[0],[0,100],e,!0),Cu(t[1],[0,100],e,!0)]},e.prototype._updateInterval=function(t,e){var n=this.dataZoomModel,r=this._handleEnds,i=this._getViewExtent(),o=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];VO(e,r,i,n.get("zoomLock")?"all":t,null!=o.minSpan?Cu(o.minSpan,a,i,!0):null,null!=o.maxSpan?Cu(o.maxSpan,a,i,!0):null);var s=this._range,l=this._range=ku([Cu(r[0],i,a,!0),Cu(r[1],i,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},e.prototype._updateView=function(t){var e=this._displayables,n=this._handleEnds,r=ku(n.slice()),i=this._size;Ni([0,1],(function(t){var r=e.handles[t],o=this._handleHeight;r.attr({scaleX:o/2,scaleY:o/2,x:n[t]+(t?-1:1),y:i[1]/2-o/2})}),this),e.filler.setShape({x:r[0],y:0,width:r[1]-r[0],height:i[1]});var o={x:r[0],width:r[1]-r[0]};e.moveHandle&&(e.moveHandle.setShape(o),e.moveZone.setShape(o),e.moveZone.getBoundingRect(),e.moveHandleIcon&&e.moveHandleIcon.attr("x",o.x+o.width/2));for(var a=e.dataShadowSegs,s=[0,r[0],r[1],i[0]],l=0;le[0]||n[1]<0||n[1]>e[1])){var r=this._handleEnds,i=(r[0]+r[1])/2,o=this._updateInterval("all",n[0]-i);this._updateView(),o&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var e=t.offsetX,n=t.offsetY;this._brushStart=new va(e,n),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var e=this._displayables.brushRect;if(this._brushing=!1,e){e.attr("ignore",!0);var n=e.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var r=this._getViewExtent(),i=[0,100];this._range=ku([Cu(n.x,r,i,!0),Cu(n.x+n.width,r,i,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(oa(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,e){var n=this._displayables,r=this.dataZoomModel,i=n.brushRect;i||(i=n.brushRect=new CH({silent:!0,style:r.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(i)),i.attr("ignore",!1);var o=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(t,e),l=a.transformCoordToLocal(o.x,o.y),u=this._size;s[0]=Math.max(Math.min(u[0],s[0]),0),i.setShape({x:l[0],y:0,width:s[0]-l[0],height:u[1]})},e.prototype._dispatchZoomAction=function(t){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?LH:null,start:e[0],end:e[1]})},e.prototype._findCoordRect=function(){var t,e=lG(this.dataZoomModel).infoList;if(!t&&e.length){var n=e[0].model.coordinateSystem;t=n.getRect&&n.getRect()}if(!t){var r=this.api.getWidth(),i=this.api.getHeight();t={x:.2*r,y:.2*i,width:.6*r,height:.6*i}}return t},e.type="dataZoom.slider",e}(pG);function PH(t){return"vertical"===t?"ns-resize":"ew-resize"}function RH(t){t.registerComponentModel(IH),t.registerComponentView(DH),xG(t)}var OH=function(t,e,n){var r=Ti((EH[t]||{})[e]);return n&&Wi(r)?r[r.length-1]:r},EH={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]}},NH=PP.mapVisual,zH=PP.eachVisual,BH=Wi,VH=Ni,FH=ku,GH=Cu,jH=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.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 a(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n)},e.prototype.optionUpdated=function(t,e){var n=this.option;!e&&Nj(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var e=this.stateList;t=Gi(t,this),this.controllerVisuals=Ej(this.option.controller,e,t),this.targetVisuals=Ej(this.option.target,e,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,e=[];return null==t||"all"===t?this.ecModel.eachSeries((function(t,n){e.push(n)})):e=$u(t),e},e.prototype.eachTargetSeries=function(t,e){Ni(this.getTargetSeriesIndices(),(function(n){var r=this.ecModel.getSeriesByIndex(n);r&&t.call(e,r)}),this)},e.prototype.isTargetSeries=function(t){var e=!1;return this.eachTargetSeries((function(n){n===t&&(e=!0)})),e},e.prototype.formatValueText=function(t,e,n){var r,i=this.option,o=i.precision,a=this.dataBound,s=i.formatter;n=n||["<",">"],Wi(t)&&(t=t.slice(),r=!0);var l=e?t:r?[u(t[0]),u(t[1])]:u(t);return Ui(s)?s.replace("{value}",r?l[0]:l).replace("{value2}",r?l[1]:l):Hi(s)?r?s(t[0],t[1]):s(t):r?t[0]===a[0]?n[0]+" "+l[1]:t[1]===a[1]?n[1]+" "+l[0]:l[0]+" - "+l[1]:l;function u(t){return t===a[0]?"min":t===a[1]?"max":(+t).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,e=FH([t.min,t.max]);this._dataExtent=e},e.prototype.getDataDimensionIndex=function(t){var e=this.option.dimension;if(null!=e)return t.getDimensionIndex(e);for(var n=t.dimensions,r=n.length-1;r>=0;r--){var i=n[r],o=t.getDimensionInfo(i);if(!o.isCalculationCoord)return o.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,e=this.option,n={inRange:e.inRange,outOfRange:e.outOfRange},r=e.target||(e.target={}),i=e.controller||(e.controller={});ki(r,n),ki(i,n);var o=this.isCategory();function a(n){BH(e.color)&&!n.inRange&&(n.inRange={color:e.color.slice().reverse()}),n.inRange=n.inRange||{color:t.get("gradientColor")}}a.call(this,r),a.call(this,i),function(t,e,n){var r=t[e],i=t[n];r&&!i&&(i=t[n]={},VH(r,(function(t,e){if(PP.isValidType(e)){var n=OH(e,"inactive",o);null!=n&&(i[e]=n,"color"!==e||i.hasOwnProperty("opacity")||i.hasOwnProperty("colorAlpha")||(i.opacity=[0,0]))}})))}.call(this,r,"inRange","outOfRange"),function(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,n=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,r=this.get("inactiveColor"),i=this.getItemSymbol()||"roundRect";VH(this.stateList,(function(a){var s=this.itemSize,l=t[a];l||(l=t[a]={color:o?r:[r]}),null==l.symbol&&(l.symbol=e&&Ti(e)||(o?i:[i])),null==l.symbolSize&&(l.symbolSize=n&&Ti(n)||(o?s[0]:[s[0],s[0]])),l.symbol=NH(l.symbol,(function(t){return"none"===t?i:t}));var u=l.symbolSize;if(null!=u){var c=-1/0;zH(u,(function(t){t>c&&(c=t)})),l.symbolSize=NH(u,(function(t){return GH(t,[0,c],[0,s[0]],!0)}))}}),this)}.call(this,i)},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,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"}},e}(ov),WH=[20,140],HH=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.prototype.optionUpdated=function(e,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual((function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()})),this._resetRange()},e.prototype.resetItemSize=function(){t.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(null==e[0]||isNaN(e[0]))&&(e[0]=WH[0]),(null==e[1]||isNaN(e[1]))&&(e[1]=WH[1])},e.prototype._resetRange=function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):Wi(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},e.prototype.completeVisualOption=function(){t.prototype.completeVisualOption.apply(this,arguments),Ni(this.stateList,(function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=e[1]/3)}),this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),e=ku((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=n[1]||t<=e[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[];return this.eachTargetSeries((function(n){var r=[],i=n.getData();i.each(this.getDataDimensionIndex(i),(function(e,n){t[0]<=e&&e<=t[1]&&r.push(n)}),this),e.push({seriesId:n.id,dataIndex:r})}),this),e},e.prototype.getVisualMeta=function(t){var e=UH(this,"outOfRange",this.getExtent()),n=UH(this,"inRange",this.option.range.slice()),r=[];function i(e,n){r.push({value:e,color:t(e,n)})}for(var o=0,a=0,s=n.length,l=e.length;at[1])break;n.push({color:this.getControllerVisual(o,"color",e),offset:i/100})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},e.prototype._createBarPoints=function(t,e){var n=this.visualMapModel.itemSize;return[[n[0]-e[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-e[1],t[1]]]},e.prototype._createBarGroup=function(t){var e=this._orient,n=this.visualMapModel.get("inverse");return new xu("horizontal"!==e||n?"horizontal"===e&&n?{scaleX:"bottom"===t?-1:1,rotation:-Math.PI/2}:"vertical"!==e||n?{scaleX:"left"===t?1:-1}:{scaleX:"left"===t?1:-1,scaleY:-1}:{scaleX:"bottom"===t?1:-1,rotation:Math.PI/2})},e.prototype._updateHandle=function(t,e){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,i=n.handleThumbs,o=n.handleLabels,a=r.itemSize,s=r.getExtent(),l=this._applyTransform("left",n.mainGroup);$H([0,1],(function(u){var c=i[u];c.setStyle("fill",e.handlesColor[u]),c.y=t[u];var h=KH(t[u],[0,a[1]],s,!0),d=this.getControllerVisual(h,"symbolSize");c.scaleX=c.scaleY=d/a[0],c.x=a[0]-d/2;var p=cg(n.handleLabelPoints[u],ug(c,this.group));if("horizontal"===this._orient){var f="left"===l||"top"===l?(a[0]-d)/2:(a[0]-d)/-2;p[1]+=f}o[u].setStyle({x:p[0],y:p[1],text:r.formatValueText(this._dataInterval[u]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",n.mainGroup):"center"})}),this)}},e.prototype._showIndicator=function(t,e,n,r){var i=this.visualMapModel,o=i.getExtent(),a=i.itemSize,s=[0,a[1]],l=this._shapes,u=l.indicator;if(u){u.attr("invisible",!1);var c=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0}),h=this.getControllerVisual(t,"symbolSize"),d=KH(t,o,s,!0),p=a[0]-h/2,f={x:u.x,y:u.y};u.y=d,u.x=p;var g=cg(l.indicatorLabelPoint,ug(u,this.group)),y=l.indicatorLabel;y.attr("invisible",!1);var v=this._applyTransform("left",l.mainGroup),m="horizontal"===this._orient;y.setStyle({text:(n||"")+i.formatValueText(e),verticalAlign:m?v:"middle",align:m?"center":v});var _={x:p,y:d,style:{fill:c}},x={style:{x:g[0],y:g[1]}};if(i.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var b={duration:100,easing:"cubicInOut",additive:!0};u.x=f.x,u.y=f.y,u.animateTo(_,b),y.animateTo(x,b)}else u.attr(_),y.attr(x);this._firstShowIndicator=!1;var w=this._shapes.handleLabels;if(w)for(var S=0;Si[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",a):u[1]===1/0?this._showIndicator(l,u[0],"> ",a):this._showIndicator(l,l,"≈ ",a));var c=this._hoverLinkDataIndices,h=[];(e||nU(n))&&(h=this._hoverLinkDataIndices=n.findTargetDataIndices(u));var d=function(t,e){var n={},r={};return i(t||[],n),i(e||[],r,n),[o(n),o(r)];function i(t,e,n){for(var r=0,i=t.length;r=0&&(i.dimension=o,r.push(i))}})),t.getData().setVisual("visualMeta",r)}}];function sU(t,e,n,r){for(var i=e.targetVisuals[r],o=PP.prepareVisualTypes(i),a={color:$x(t.getData(),"color")},s=0,l=o.length;s0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"})),t.registerAction(iU,oU),Ni(aU,(function(e){t.registerVisual(t.PRIORITY.VISUAL.COMPONENT,e)})),t.registerPreprocessor(uU))}function pU(t){t.registerComponentModel(HH),t.registerComponentView(tU),dU(t)}var fU=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._pieceList=[],n}return a(e,t),e.prototype.optionUpdated=function(e,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],gU[this._mode].call(this,this._pieceList),this._resetSelected(e,n);var i=this.option.categories;this.resetVisual((function(t,e){"categories"===r?(t.mappingMethod="category",t.categories=Ti(i)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=zi(this._pieceList,(function(t){return t=Ti(t),"inRange"!==e&&(t.visual=null),t})))}))},e.prototype.completeVisualOption=function(){var e=this.option,n={},r=PP.listVisualTypes(),i=this.isCategory();function o(t,e,n){return t&&t[e]&&t[e].hasOwnProperty(n)}Ni(e.pieces,(function(t){Ni(r,(function(e){t.hasOwnProperty(e)&&(n[e]=1)}))})),Ni(n,(function(t,n){var r=!1;Ni(this.stateList,(function(t){r=r||o(e,t,n)||o(e.target,t,n)}),this),!r&&Ni(this.stateList,(function(t){(e[t]||(e[t]={}))[n]=OH(n,"inRange"===t?"active":"inactive",i)}))}),this),t.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,e){var n=this.option,r=this._pieceList,i=(e?n:t).selected||{};if(n.selected=i,Ni(r,(function(t,e){var n=this.getSelectedMapKey(t);i.hasOwnProperty(n)||(i[n]=!0)}),this),"single"===n.selectedMode){var o=!1;Ni(r,(function(t,e){var n=this.getSelectedMapKey(t);i[n]&&(o?i[n]=!1:o=!0)}),this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return"categories"===this._mode?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=Ti(t)},e.prototype.getValueState=function(t){var e=PP.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[],n=this._pieceList;return this.eachTargetSeries((function(r){var i=[],o=r.getData();o.each(this.getDataDimensionIndex(o),(function(e,r){PP.findPieceIndex(e,n)===t&&i.push(r)}),this),e.push({seriesId:r.id,dataIndex:i})}),this),e},e.prototype.getRepresentValue=function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var n=t.interval||[];e=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return e},e.prototype.getVisualMeta=function(t){if(!this.isCategory()){var e=[],n=["",""],r=this,i=this._pieceList.slice();if(i.length){var o=i[0].interval[0];o!==-1/0&&i.unshift({interval:[-1/0,o]}),(o=i[i.length-1].interval[1])!==1/0&&i.push({interval:[o,1/0]})}else i.push({interval:[-1/0,1/0]});var a=-1/0;return Ni(i,(function(t){var e=t.interval;e&&(e[0]>a&&s([a,e[0]],"outOfRange"),s(e.slice()),a=e[1])}),this),{stops:e,outerColors:n}}function s(i,o){var a=r.getRepresentValue({interval:i});o||(o=r.getValueState(a));var s=t(a,o);i[0]===-1/0?n[0]=s:i[1]===1/0?n[1]=s:e.push({value:i[0],color:s},{value:i[1],color:s})}},e.type="visualMap.piecewise",e.defaultOption=Jg(jH.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(jH),gU={splitNumber:function(t){var e=this.option,n=Math.min(e.precision,20),r=this.getExtent(),i=e.splitNumber;i=Math.max(parseInt(i,10),1),e.splitNumber=i;for(var o=(r[1]-r[0])/i;+o.toFixed(n)!==o&&n<5;)n++;e.precision=n,o=+o.toFixed(n),e.minOpen&&t.push({interval:[-1/0,r[0]],close:[0,0]});for(var a=0,s=r[0];a","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,n)}),this)}};function yU(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}var vU=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return a(e,t),e.prototype.doRender=function(){var t=this.group;t.removeAll();var e=this.visualMapModel,n=e.get("textGap"),r=e.textStyleModel,i=r.getFont(),o=r.getTextColor(),a=this._getItemAlign(),s=e.itemSize,l=this._getViewData(),u=l.endsText,c=to(e.get("showLabel",!0),!u),h=!e.get("selectedMode");u&&this._renderEndsText(t,u[0],s,c,a),Ni(l.viewPieceList,(function(r){var l=r.piece,u=new xu;u.onclick=Gi(this._onItemClick,this,l),this._enableHoverLink(u,r.indexInModelPieceList);var d=e.getRepresentValue(l);if(this._createItemSymbol(u,d,[0,0,s[0],s[1]],h),c){var p=this.visualMapModel.getValueState(d);u.add(new yd({style:{x:"right"===a?-n:s[0]+n,y:s[1]/2,text:l.text,verticalAlign:"middle",align:a,font:i,fill:o,opacity:"outOfRange"===p?.5:1},silent:h}))}t.add(u)}),this),u&&this._renderEndsText(t,u[1],s,c,a),$y(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,e){var n=this;t.on("mouseover",(function(){return r("highlight")})).on("mouseout",(function(){return r("downplay")}));var r=function(t){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:t,batch:qH(r.findTargetDataIndices(e),r)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return XH(t,this.api,t.itemSize);var n=e.align;return n&&"auto"!==n||(n="left"),n},e.prototype._renderEndsText=function(t,e,n,r,i){if(e){var o=new xu,a=this.visualMapModel.textStyleModel;o.add(new yd({style:Tg(a,{x:r?"right"===i?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:r?i:"center",text:e})})),t.add(o)}},e.prototype._getViewData=function(){var t=this.visualMapModel,e=zi(t.getPieceList(),(function(t,e){return{piece:t,indexInModelPieceList:e}})),n=t.get("text"),r=t.get("orient"),i=t.get("inverse");return("horizontal"===r?i:!i)?e.reverse():n&&(n=n.slice().reverse()),{viewPieceList:e,endsText:n}},e.prototype._createItemSymbol=function(t,e,n,r){var i=pb(this.getControllerVisual(e,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(e,"color"));i.silent=r,t.add(i)},e.prototype._onItemClick=function(t){var e=this.visualMapModel,n=e.option,r=n.selectedMode;if(r){var i=Ti(n.selected),o=e.getSelectedMapKey(t);"single"===r||!0===r?(i[o]=!0,Ni(i,(function(t,e){i[e]=e===o}))):i[o]=!i[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}},e.type="visualMap.piecewise",e}(ZH);function mU(t){t.registerComponentModel(fU),t.registerComponentView(vU),dU(t)}var _U={label:{enabled:!0},decal:{show:!1}},xU=uc(),bU={};function wU(t,e){var n=t.getModel("aria");if(n.get("enabled")){var r=Ti(_U);ki(r.label,t.getLocaleModel().get("aria"),!1),ki(n.option,r,!1),function(){if(n.getModel("decal").get("show")){var e=fo();t.eachSeries((function(t){if(!t.isColorBySeries()){var n=e.get(t.type);n||(n={},e.set(t.type,n)),xU(t).scope=n}})),t.eachRawSeries((function(e){if(!t.isSeriesFiltered(e))if(Hi(e.enableAriaDecal))e.enableAriaDecal();else{var n=e.getData();if(e.isColorBySeries()){var r=Ov(e.ecModel,e.name,bU,t.getSeriesCount()),i=n.getVisual("decal");n.setVisual("decal",u(i,r))}else{var o=e.getRawData(),a={},s=xU(e).scope;n.each((function(t){var e=n.getRawIndex(t);a[e]=t}));var l=o.count();o.each((function(t){var r=a[t],i=o.getName(t)||t+"",c=Ov(e.ecModel,i,s,l),h=n.getItemVisual(r,"decal");n.setItemVisual(r,"decal",u(h,c))}))}}function u(t,e){var n=t?Di(Di({},e),t):e;return n.dirty=!0,n}}))}}(),function(){var r=e.getZr().dom;if(!r)return;var o=t.getLocaleModel().get("aria"),a=n.getModel("label");if(a.option=Pi(a.option,o),!a.get("enabled"))return;if(r.setAttribute("role","img"),a.get("description"))return void r.setAttribute("aria-label",a.get("description"));var s,l=t.getSeriesCount(),u=a.get(["data","maxCount"])||10,c=a.get(["series","maxCount"])||10,h=Math.min(l,c);if(l<1)return;var d=function(){var e=t.get("title");e&&e.length&&(e=e[0]);return e&&e.text}();s=d?i(a.get(["general","withTitle"]),{title:d}):a.get(["general","withoutTitle"]);var p=[];s+=i(l>1?a.get(["series","multiple","prefix"]):a.get(["series","single","prefix"]),{seriesCount:l}),t.eachSeries((function(e,n){if(n1?a.get(["series","multiple",o]):a.get(["series","single",o]),{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:(x=e.subType,b=t.getLocaleModel().get(["series","typeNames"]),b[x]||b.chart)});var s=e.getData();if(s.count()>u)r+=i(a.get(["data","partialData"]),{displayCnt:u});else r+=a.get(["data","allData"]);for(var c=a.get(["data","separator","middle"]),d=a.get(["data","separator","end"]),f=a.get(["data","excludeDimensionId"]),g=[],y=0;y":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},IU=function(){function t(t){var e;if(null==(this._condVal=Ui(t)?new RegExp(t):(e=t,"[object RegExp]"===yi.call(e)?t:null))){Yu("")}}return t.prototype.evaluate=function(t){var e=typeof t;return Ui(e)?this._condVal.test(t):!!Yi(e)&&this._condVal.test(t+"")},t}(),CU=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),AU=function(){function t(){}return t.prototype.evaluate=function(){for(var t=this.children,e=0;e2&&l.push(e),e=[t,n]}function f(t,n,r,i){FU(t,r)&&FU(n,i)||e.push(t,n,r,i,r,i)}function g(t,n,r,i,o,a){var s=Math.abs(n-t),l=4*Math.tan(s/4)/3,u=nM:A2&&l.push(e),l}function jU(t,e,n,r,i,o,a,s,l,u){if(FU(t,n)&&FU(e,r)&&FU(i,a)&&FU(o,s))l.push(a,s);else{var c=2/u,h=c*c,d=a-t,p=s-e,f=Math.sqrt(d*d+p*p);d/=f,p/=f;var g=n-t,y=r-e,v=i-a,m=o-s,_=g*g+y*y,x=v*v+m*m;if(_=0&&x-w*w=0)l.push(a,s);else{var S=[],M=[];us(t,n,i,a,.5,S),us(e,r,o,s,.5,M),jU(S[0],M[0],S[1],M[1],S[2],M[2],S[3],M[3],l,u),jU(S[4],M[4],S[5],M[5],S[6],M[6],S[7],M[7],l,u)}}}}function WU(t,e,n){var r=t[e],i=t[1-e],o=Math.abs(r/i),a=Math.ceil(Math.sqrt(o*n)),s=Math.floor(n/a);0===s&&(s=1,a=n);for(var l=[],u=0;u0)for(u=0;uMath.abs(u),h=WU([l,u],c?0:1,e),d=(c?s:u)/h.length,p=0;p1?null:new va(p*l+t,p*u+e)}function YU(t,e,n){var r=new va;va.sub(r,n,e),r.normalize();var i=new va;return va.sub(i,t,e),i.dot(r)}function XU(t,e){var n=t[t.length-1];n&&n[0]===e[0]&&n[1]===e[1]||t.push(e)}function qU(t){var e=t.points,n=[],r=[];ch(e,n,r);var i=new Ca(n[0],n[1],r[0]-n[0],r[1]-n[1]),o=i.width,a=i.height,s=i.x,l=i.y,u=new va,c=new va;return o>a?(u.x=c.x=s+o/2,u.y=l,c.y=l+a):(u.y=c.y=l+a/2,u.x=s,c.x=s+o),function(t,e,n){for(var r=t.length,i=[],o=0;oi,a=WU([r,i],o?0:1,e),s=o?"width":"height",l=o?"height":"width",u=o?"x":"y",c=o?"y":"x",h=t[s]/a.length,d=0;d0;l/=2){var u=0,c=0;(t&l)>0&&(u=1),(e&l)>0&&(c=1),s+=l*l*(3*u^c),0===c&&(1===u&&(t=l-1-t,e=l-1-e),a=t,t=e,e=a)}return s}function dZ(t){var e=1/0,n=1/0,r=-1/0,i=-1/0,o=zi(t,(function(t){var o=t.getBoundingRect(),a=t.getComputedTransform(),s=o.x+o.width/2+(a?a[4]:0),l=o.y+o.height/2+(a?a[5]:0);return e=Math.min(s,e),n=Math.min(l,n),r=Math.max(s,r),i=Math.max(l,i),[s,l]}));return zi(o,(function(o,a){return{cp:o,z:hZ(o[0],o[1],e,n,r,i),path:t[a]}})).sort((function(t,e){return t.z-e.z})).map((function(t){return t.path}))}function pZ(t){return QU(t.path,t.count)}function fZ(t){return Wi(t[0])}function gZ(t,e){for(var n=[],r=t.length,i=0;i=0;i--)if(!n[i].many.length){var l=n[s].many;if(l.length<=1){if(!s)return n;s=0}o=l.length;var u=Math.ceil(o/2);n[i].many=l.slice(u,o),n[s].many=l.slice(0,u),s++}return n}var yZ={clone:function(t){for(var e=[],n=1-Math.pow(1-t.path.style.opacity,1/t.count),r=0;r0){var s,l,u=r.getModel("universalTransition").get("delay"),c=Object.assign({setToFinal:!0},a);fZ(t)&&(s=t,l=e),fZ(e)&&(s=e,l=t);for(var h=s?s===t:t.length>e.length,d=s?gZ(l,s):gZ(h?e:t,[h?t:e]),p=0,f=0;f1e4))for(var i=n.getIndices(),o=0;o0&&r.group.traverse((function(t){t instanceof ed&&!t.animators.length&&t.animateFrom({style:{opacity:0}},i)}))}))}function AZ(t){var e=t.getModel("universalTransition").get("seriesKey");return e||t.id}function TZ(t){return Wi(t)?t.sort().join(","):t}function kZ(t){if(t.hostModel)return t.hostModel.getModel("universalTransition").get("divideShape")}function LZ(t,e){for(var n=0;n=0&&i.push({dataGroupId:e.oldDataGroupIds[n],data:e.oldData[n],divide:kZ(e.oldData[n]),groupIdDim:t.dimension})})),Ni($u(t.to),(function(t){var r=LZ(n.updatedSeries,t);if(r>=0){var i=n.updatedSeries[r].getData();o.push({dataGroupId:e.oldDataGroupIds[r],data:i,divide:kZ(i),groupIdDim:t.dimension})}})),i.length>0&&o.length>0&&CZ(i,o,r)}(t,r,n,e)}));else{var o=function(t,e){var n=fo(),r=fo(),i=fo();return Ni(t.oldSeries,(function(e,n){var o=t.oldDataGroupIds[n],a=t.oldData[n],s=AZ(e),l=TZ(s);r.set(l,{dataGroupId:o,data:a}),Wi(s)&&Ni(s,(function(t){i.set(t,{key:l,dataGroupId:o,data:a})}))})),Ni(e.updatedSeries,(function(t){if(t.isUniversalTransitionEnabled()&&t.isAnimationEnabled()){var e=t.get("dataGroupId"),o=t.getData(),a=AZ(t),s=TZ(a),l=r.get(s);if(l)n.set(s,{oldSeries:[{dataGroupId:l.dataGroupId,divide:kZ(l.data),data:l.data}],newSeries:[{dataGroupId:e,divide:kZ(o),data:o}]});else if(Wi(a)){var u=[];Ni(a,(function(t){var e=r.get(t);e.data&&u.push({dataGroupId:e.dataGroupId,divide:kZ(e.data),data:e.data})})),u.length&&n.set(s,{oldSeries:u,newSeries:[{dataGroupId:e,data:o,divide:kZ(o)}]})}else{var c=i.get(a);if(c){var h=n.get(c.key);h||(h={oldSeries:[{dataGroupId:c.dataGroupId,data:c.data,divide:kZ(c.data)}],newSeries:[]},n.set(c.key,h)),h.newSeries.push({dataGroupId:e,data:o,divide:kZ(o)})}}}})),n}(r,n);Ni(o.keys(),(function(t){var n=o.get(t);CZ(n.oldSeries,n.newSeries,e)}))}Ni(n.updatedSeries,(function(t){t[G_]&&(t[G_]=!1)}))}for(var a=t.getSeries(),s=r.oldSeries=[],l=r.oldDataGroupIds=[],u=r.oldData=[],c=0;ce.order?1:-1}));for(var i=0;ie.order?1:-1}));for(var i=0;ie.order?1:-1}));for(var i=0;ii&&(m[t]=0)})),n=Fr(t,m[i],{isFirst:0===x,isLast:c.length-1===x,bodyProps:v})}else n=Fr(t,0,{isFirst:0===x,isLast:c.length-1===x,bodyProps:v});g.appendChild(n),x++},w=0,S=_;w0?this.currentIndex-1:this.slideCount-1,this.htmlRender.renderSlide(this.currentIndex),this.updatePagination()},t.prototype._addPre=function(t){},t.prototype.preview=function(t){var e=this;return RZ("destroy"),OZ("destroy"),new Promise((function(n,r){e.wrapper.innerHTML="";var i=e.pptx=new Nr;i.load(t).then((function(){try{var t=e.htmlRender=new EZ(e.wrapper,i,{viewPort:{width:e.options.width,height:e.options.height},mode:e.options.mode});if("slide"===e.options.mode){var o=e.renderNextButton();o.onclick=function(){e.renderNextSlide()},e.wrapper.append(o);var a=e.renderPreButton();a.onclick=function(){e.renderPreSlide()},e.wrapper.append(a),e.renderPagination(e.wrapper),e._addPre(e.wrapper),e.currentIndex=0,t.renderSlide(0)}else for(var s=0;s