@senx/discovery-plugin-marauder
Version:
Discovery plugin - Marauder's map
30 lines (26 loc) • 1.89 MB
JavaScript
var __awaiter=this&&this.__awaiter||function(t,r,e,i){function n(t){return t instanceof e?t:new e((function(r){r(t)}))}return new(e||(e=Promise))((function(e,a){function s(t){try{u(i.next(t))}catch(t){a(t)}}function o(t){try{u(i["throw"](t))}catch(t){a(t)}}function u(t){t.done?e(t.value):n(t.value).then(s,o)}u((i=i.apply(t,r||[])).next())}))};var __generator=this&&this.__generator||function(t,r){var e={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,n,a,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(t){return function(r){return u([t,r])}}function u(o){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,o[0]&&(e=0)),e)try{if(i=1,n&&(a=o[0]&2?n["return"]:o[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,o[1])).done)return a;if(n=0,a)o=[o[0]&2,a.value];switch(o[0]){case 0:case 1:a=o;break;case 4:e.label++;return{value:o[1],done:false};case 5:e.label++;n=o[1];o=[0];continue;case 7:o=e.ops.pop();e.trys.pop();continue;default:if(!(a=e.trys,a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){e=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){e.label=o[1];break}if(o[0]===6&&e.label<a[1]){e.label=a[1];a=o;break}if(a&&e.label<a[2]){e.label=a[2];e.ops.push(o);break}if(a[2])e.ops.pop();e.trys.pop();continue}o=r.call(t,e)}catch(t){o=[6,t];n=0}finally{i=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,r,e){if(e||arguments.length===2)for(var i=0,n=r.length,a;i<n;i++){if(a||!(i in r)){if(!a)a=Array.prototype.slice.call(r,0,i);a[i]=r[i]}}return t.concat(a||Array.prototype.slice.call(r))};System.register(["./p-f2d2b9b0.system.js","./p-65468eeb.system.js","./p-17ad0a00.system.js","./p-fb64dbc4.system.js","./p-a66f6e87.system.js","./p-37b7b786.system.js","./p-1e032c57.system.js","./p-c59742af.system.js","./p-85f486e6.system.js","./p-939a7402.system.js"],(function(t){"use strict";var r,e,i,n,a,s,o,u,f,l,v,h,c,d,m,p,y,_,g,b,w,M,x,k,Y,S;return{setters:[function(t){r=t.r;e=t.c;i=t.h;n=t.H;a=t.g},function(t){s=t.a},function(t){o=t.P;u=t.U},function(t){f=t.g},function(t){l=t._;v=t.G;h=t.l;c=t.L;d=t.v;m=t.c;p=t.d;y=t.a;_=t.J;g=t.b},function(t){b=t.C},function(t){w=t.d;M=t.l;x=t.L},function(t){k=t.L},function(t){Y=t.M},function(t){S=t.a}],execute:function(){
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var D=function(t,r){D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)if(Object.prototype.hasOwnProperty.call(r,e))t[e]=r[e]};return D(t,r)};function T(t,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");D(t,r);function e(){this.constructor=t}t.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}var A=function(){function t(){this.firefox=false;this.ie=false;this.edge=false;this.newEdge=false;this.weChat=false}return t}();var O=function(){function t(){this.browser=new A;this.node=false;this.wxa=false;this.worker=false;this.svgSupported=false;this.touchEventsSupported=false;this.pointerEventsSupported=false;this.domSupported=false;this.transformSupported=false;this.transform3dSupported=false;this.hasGlobalWindow=typeof window!=="undefined"}return t}();var j=new O;if(typeof wx==="object"&&typeof wx.getSystemInfoSync==="function"){j.wxa=true;j.touchEventsSupported=true}else if(typeof document==="undefined"&&typeof self!=="undefined"){j.worker=true}else if(typeof navigator==="undefined"||navigator.userAgent.indexOf("Node.js")===0){j.node=true;j.svgSupported=true}else{N(navigator.userAgent,j)}function N(t,r){var e=r.browser;var i=t.match(/Firefox\/([\d.]+)/);var n=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/);var a=t.match(/Edge?\/([\d.]+)/);var s=/micromessenger/i.test(t);if(i){e.firefox=true;e.version=i[1]}if(n){e.ie=true;e.version=n[1]}if(a){e.edge=true;e.version=a[1];e.newEdge=+a[1].split(".")[0]>18}if(s){e.weChat=true}r.svgSupported=typeof SVGRect!=="undefined";r.touchEventsSupported="ontouchstart"in window&&!e.ie&&!e.edge;r.pointerEventsSupported="onpointerdown"in window&&(e.edge||e.ie&&+e.version>=11);r.domSupported=typeof document!=="undefined";var o=document.documentElement.style;r.transform3dSupported=(e.ie&&"transition"in o||e.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in o)&&!("OTransition"in o);r.transformSupported=r.transform3dSupported||e.ie&&+e.version>=9}var H=j;var I=12;var z="sans-serif";var C=I+"px "+z;var E=20;var P=100;var W="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function R(t){var r={};if(typeof JSON==="undefined"){return r}for(var e=0;e<t.length;e++){var i=String.fromCharCode(e+32);var n=(t.charCodeAt(e)-E)/P;r[i]=n}return r}var F=R(W);var B={createCanvas:function(){return typeof document!=="undefined"&&document.createElement("canvas")},measureText:function(){var t;var r;return function(e,i){if(!t){var n=B.createCanvas();t=n&&n.getContext("2d")}if(t){if(r!==i){r=t.font=i||C}return t.measureText(e)}else{e=e||"";i=i||C;var a=/((?:\d+)?\.?\d*)px/.exec(i);var s=a&&+a[1]||I;var o=0;if(i.indexOf("mono")>=0){o=s*e.length}else{for(var u=0;u<e.length;u++){var f=F[e[u]];o+=f==null?s:f*s}}return{width:o}}}}(),loadImage:function(t,r,e){var i=new Image;i.onload=r;i.onerror=e;i.src=t;return i}};var U=mt(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],(function(t,r){t["[object "+r+"]"]=true;return t}),{});var J=mt(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],(function(t,r){t["[object "+r+"Array]"]=true;return t}),{});var V=Object.prototype.toString;var G=Array.prototype;var Z=G.forEach;var X=G.filter;var q=G.slice;var K=G.map;var $=function(){}.constructor;var Q=$?$.prototype:null;var tt="__proto__";var rt=2311;function et(){return rt++}function it(){var t=[];for(var r=0;r<arguments.length;r++){t[r]=arguments[r]}if(typeof console!=="undefined"){console.error.apply(console,t)}}function nt(t){if(t==null||typeof t!=="object"){return t}var r=t;var e=V.call(t);if(e==="[object Array]"){if(!Ut(t)){r=[];for(var i=0,n=t.length;i<n;i++){r[i]=nt(t[i])}}}else if(J[e]){if(!Ut(t)){var a=t.constructor;if(a.from){r=a.from(t)}else{r=new a(t.length);for(var i=0,n=t.length;i<n;i++){r[i]=t[i]}}}}else if(!U[e]&&!Ut(t)&&!At(t)){r={};for(var s in t){if(t.hasOwnProperty(s)&&s!==tt){r[s]=nt(t[s])}}}return r}function at(t,r,e){if(!St(r)||!St(t)){return e?nt(r):t}for(var i in r){if(r.hasOwnProperty(i)&&i!==tt){var n=t[i];var a=r[i];if(St(a)&&St(n)&&!Mt(a)&&!Mt(n)&&!At(a)&&!At(n)&&!Dt(a)&&!Dt(n)&&!Ut(a)&&!Ut(n)){at(n,a,e)}else if(e||!(i in t)){t[i]=nt(r[i])}}}return t}function st(t,r){var e=t[0];for(var i=1,n=t.length;i<n;i++){e=at(e,t[i],r)}return e}function ot(t,r){if(Object.assign){Object.assign(t,r)}else{for(var e in r){if(r.hasOwnProperty(e)&&e!==tt){t[e]=r[e]}}}return t}function ut(t,r,e){var i=_t(r);for(var n=0;n<i.length;n++){var a=i[n];if(e?r[a]!=null:t[a]==null){t[a]=r[a]}}return t}function ft(t,r){if(t){if(t.indexOf){return t.indexOf(r)}for(var e=0,i=t.length;e<i;e++){if(t[e]===r){return e}}}return-1}function lt(t,r){var e=t.prototype;function i(){}i.prototype=r.prototype;t.prototype=new i;for(var n in e){if(e.hasOwnProperty(n)){t.prototype[n]=e[n]}}t.prototype.constructor=t;t.superClass=r}function vt(t,r,e){t="prototype"in t?t.prototype:t;r="prototype"in r?r.prototype:r;if(Object.getOwnPropertyNames){var i=Object.getOwnPropertyNames(r);for(var n=0;n<i.length;n++){var a=i[n];if(a!=="constructor"){if(e?r[a]!=null:t[a]==null){t[a]=r[a]}}}}else{ut(t,r,e)}}function ht(t){if(!t){return false}if(typeof t==="string"){return false}return typeof t.length==="number"}function ct(t,r,e){if(!(t&&r)){return}if(t.forEach&&t.forEach===Z){t.forEach(r,e)}else if(t.length===+t.length){for(var i=0,n=t.length;i<n;i++){r.call(e,t[i],i,t)}}else{for(var a in t){if(t.hasOwnProperty(a)){r.call(e,t[a],a,t)}}}}function dt(t,r,e){if(!t){return[]}if(!r){return Et(t)}if(t.map&&t.map===K){return t.map(r,e)}else{var i=[];for(var n=0,a=t.length;n<a;n++){i.push(r.call(e,t[n],n,t))}return i}}function mt(t,r,e,i){if(!(t&&r)){return}for(var n=0,a=t.length;n<a;n++){e=r.call(i,e,t[n],n,t)}return e}function pt(t,r,e){if(!t){return[]}if(!r){return Et(t)}if(t.filter&&t.filter===X){return t.filter(r,e)}else{var i=[];for(var n=0,a=t.length;n<a;n++){if(r.call(e,t[n],n,t)){i.push(t[n])}}return i}}function yt(t,r,e){if(!(t&&r)){return}for(var i=0,n=t.length;i<n;i++){if(r.call(e,t[i],i,t)){return t[i]}}}function _t(t){if(!t){return[]}if(Object.keys){return Object.keys(t)}var r=[];for(var e in t){if(t.hasOwnProperty(e)){r.push(e)}}return r}function gt(t,r){var e=[];for(var i=2;i<arguments.length;i++){e[i-2]=arguments[i]}return function(){return t.apply(r,e.concat(q.call(arguments)))}}var bt=Q&&xt(Q.bind)?Q.call.bind(Q.bind):gt;function wt(t){var r=[];for(var e=1;e<arguments.length;e++){r[e-1]=arguments[e]}return function(){return t.apply(this,r.concat(q.call(arguments)))}}function Mt(t){if(Array.isArray){return Array.isArray(t)}return V.call(t)==="[object Array]"}function xt(t){return typeof t==="function"}function Lt(t){return typeof t==="string"}function kt(t){return V.call(t)==="[object String]"}function Yt(t){return typeof t==="number"}function St(t){var r=typeof t;return r==="function"||!!t&&r==="object"}function Dt(t){return!!U[V.call(t)]}function Tt(t){return!!J[V.call(t)]}function At(t){return typeof t==="object"&&typeof t.nodeType==="number"&&typeof t.ownerDocument==="object"}function Ot(t){return t.colorStops!=null}function jt(t){return t.image!=null}function Nt(t){return V.call(t)==="[object RegExp]"}function Ht(t){return t!==t}function It(){var t=[];for(var r=0;r<arguments.length;r++){t[r]=arguments[r]}for(var e=0,i=t.length;e<i;e++){if(t[e]!=null){return t[e]}}}function zt(t,r){return t!=null?t:r}function Ct(t,r,e){return t!=null?t:r!=null?r:e}function Et(t){var r=[];for(var e=1;e<arguments.length;e++){r[e-1]=arguments[e]}return q.apply(t,r)}function Pt(t){if(typeof t==="number"){return[t,t,t,t]}var r=t.length;if(r===2){return[t[0],t[1],t[0],t[1]]}else if(r===3){return[t[0],t[1],t[2],t[1]]}return t}function Wt(t,r){if(!t){throw new Error(r)}}function Rt(t){if(t==null){return null}else if(typeof t.trim==="function"){return t.trim()}else{return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}var Ft="__ec_primitive__";function Bt(t){t[Ft]=true}function Ut(t){return t[Ft]}var Jt=function(){function t(){this.data={}}t.prototype["delete"]=function(t){var r=this.has(t);if(r){delete this.data[t]}return r};t.prototype.has=function(t){return this.data.hasOwnProperty(t)};t.prototype.get=function(t){return this.data[t]};t.prototype.set=function(t,r){this.data[t]=r;return this};t.prototype.keys=function(){return _t(this.data)};t.prototype.forEach=function(t){var r=this.data;for(var e in r){if(r.hasOwnProperty(e)){t(r[e],e)}}};return t}();var Vt=typeof Map==="function";function Gt(){return Vt?new Map:new Jt}var Zt=function(){function t(r){var e=Mt(r);this.data=Gt();var i=this;r instanceof t?r.each(n):r&&ct(r,n);function n(t,r){e?i.set(t,r):i.set(r,t)}}t.prototype.hasKey=function(t){return this.data.has(t)};t.prototype.get=function(t){return this.data.get(t)};t.prototype.set=function(t,r){this.data.set(t,r);return r};t.prototype.each=function(t,r){this.data.forEach((function(e,i){t.call(r,e,i)}))};t.prototype.keys=function(){var t=this.data.keys();return Vt?Array.from(t):t};t.prototype.removeKey=function(t){this.data["delete"](t)};return t}();function Xt(t){return new Zt(t)}function qt(t,r){var e=new t.constructor(t.length+r.length);for(var i=0;i<t.length;i++){e[i]=t[i]}var n=t.length;for(var i=0;i<r.length;i++){e[i+n]=r[i]}return e}function Kt(t,r){var e;if(Object.create){e=Object.create(t)}else{var i=function(){};i.prototype=t;e=new i}if(r){ot(e,r)}return e}function $t(t){var r=t.style;r.webkitUserSelect="none";r.userSelect="none";r.webkitTapHighlightColor="rgba(0,0,0,0)";r["-webkit-touch-callout"]="none"}function Qt(t,r){return t.hasOwnProperty(r)}function tr(){}var rr=180/Math.PI;
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var er=function(t,r){er=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)if(Object.prototype.hasOwnProperty.call(r,e))t[e]=r[e]};return er(t,r)};function ir(t,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");er(t,r);function e(){this.constructor=t}t.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}function nr(t,r){if(t==null){t=0}if(r==null){r=0}return[t,r]}function ar(t,r){t[0]=r[0];t[1]=r[1];return t}function sr(t){return[t[0],t[1]]}function or(t,r,e){t[0]=r;t[1]=e;return t}function ur(t,r,e){t[0]=r[0]+e[0];t[1]=r[1]+e[1];return t}function fr(t,r,e,i){t[0]=r[0]+e[0]*i;t[1]=r[1]+e[1]*i;return t}function lr(t,r,e){t[0]=r[0]-e[0];t[1]=r[1]-e[1];return t}function vr(t){return Math.sqrt(hr(t))}function hr(t){return t[0]*t[0]+t[1]*t[1]}function cr(t,r,e){t[0]=r[0]*e;t[1]=r[1]*e;return t}function dr(t,r){var e=vr(r);if(e===0){t[0]=0;t[1]=0}else{t[0]=r[0]/e;t[1]=r[1]/e}return t}function mr(t,r){return Math.sqrt((t[0]-r[0])*(t[0]-r[0])+(t[1]-r[1])*(t[1]-r[1]))}var pr=mr;function yr(t,r){return(t[0]-r[0])*(t[0]-r[0])+(t[1]-r[1])*(t[1]-r[1])}var _r=yr;function gr(t,r,e,i){t[0]=r[0]+i*(e[0]-r[0]);t[1]=r[1]+i*(e[1]-r[1]);return t}function br(t,r,e){var i=r[0];var n=r[1];t[0]=e[0]*i+e[2]*n+e[4];t[1]=e[1]*i+e[3]*n+e[5];return t}function wr(t,r,e){t[0]=Math.min(r[0],e[0]);t[1]=Math.min(r[1],e[1]);return t}function Mr(t,r,e){t[0]=Math.max(r[0],e[0]);t[1]=Math.max(r[1],e[1]);return t}var xr=function(){function t(t,r){this.target=t;this.topTarget=r&&r.topTarget}return t}();var Lr=function(){function t(t){this.handler=t;t.on("mousedown",this._dragStart,this);t.on("mousemove",this._drag,this);t.on("mouseup",this._dragEnd,this)}t.prototype._dragStart=function(t){var r=t.target;while(r&&!r.draggable){r=r.parent||r.__hostTarget}if(r){this._draggingTarget=r;r.dragging=true;this._x=t.offsetX;this._y=t.offsetY;this.handler.dispatchToElement(new xr(r,t),"dragstart",t.event)}};t.prototype._drag=function(t){var r=this._draggingTarget;if(r){var e=t.offsetX;var i=t.offsetY;var n=e-this._x;var a=i-this._y;this._x=e;this._y=i;r.drift(n,a,t);this.handler.dispatchToElement(new xr(r,t),"drag",t.event);var s=this.handler.findHover(e,i,r).target;var o=this._dropTarget;this._dropTarget=s;if(r!==s){if(o&&s!==o){this.handler.dispatchToElement(new xr(o,t),"dragleave",t.event)}if(s&&s!==o){this.handler.dispatchToElement(new xr(s,t),"dragenter",t.event)}}}};t.prototype._dragEnd=function(t){var r=this._draggingTarget;if(r){r.dragging=false}this.handler.dispatchToElement(new xr(r,t),"dragend",t.event);if(this._dropTarget){this.handler.dispatchToElement(new xr(this._dropTarget,t),"drop",t.event)}this._draggingTarget=null;this._dropTarget=null};return t}();var kr=Lr;var Yr=function(){function t(t){if(t){this._$eventProcessor=t}}t.prototype.on=function(t,r,e,i){if(!this._$handlers){this._$handlers={}}var n=this._$handlers;if(typeof r==="function"){i=e;e=r;r=null}if(!e||!t){return this}var a=this._$eventProcessor;if(r!=null&&a&&a.normalizeQuery){r=a.normalizeQuery(r)}if(!n[t]){n[t]=[]}for(var s=0;s<n[t].length;s++){if(n[t][s].h===e){return this}}var o={h:e,query:r,ctx:i||this,callAtLast:e.zrEventfulCallAtLast};var u=n[t].length-1;var f=n[t][u];f&&f.callAtLast?n[t].splice(u,0,o):n[t].push(o);return this};t.prototype.isSilent=function(t){var r=this._$handlers;return!r||!r[t]||!r[t].length};t.prototype.off=function(t,r){var e=this._$handlers;if(!e){return this}if(!t){this._$handlers={};return this}if(r){if(e[t]){var i=[];for(var n=0,a=e[t].length;n<a;n++){if(e[t][n].h!==r){i.push(e[t][n])}}e[t]=i}if(e[t]&&e[t].length===0){delete e[t]}}else{delete e[t]}return this};t.prototype.trigger=function(t){var r=[];for(var e=1;e<arguments.length;e++){r[e-1]=arguments[e]}if(!this._$handlers){return this}var i=this._$handlers[t];var n=this._$eventProcessor;if(i){var a=r.length;var s=i.length;for(var o=0;o<s;o++){var u=i[o];if(n&&n.filter&&u.query!=null&&!n.filter(t,u.query)){continue}switch(a){case 0:u.h.call(u.ctx);break;case 1:u.h.call(u.ctx,r[0]);break;case 2:u.h.call(u.ctx,r[0],r[1]);break;default:u.h.apply(u.ctx,r);break}}}n&&n.afterTrigger&&n.afterTrigger(t);return this};t.prototype.triggerWithContext=function(t){var r=[];for(var e=1;e<arguments.length;e++){r[e-1]=arguments[e]}if(!this._$handlers){return this}var i=this._$handlers[t];var n=this._$eventProcessor;if(i){var a=r.length;var s=r[a-1];var o=i.length;for(var u=0;u<o;u++){var f=i[u];if(n&&n.filter&&f.query!=null&&!n.filter(t,f.query)){continue}switch(a){case 0:f.h.call(s);break;case 1:f.h.call(s,r[0]);break;case 2:f.h.call(s,r[0],r[1]);break;default:f.h.apply(s,r.slice(1,a-1));break}}}n&&n.afterTrigger&&n.afterTrigger(t);return this};return t}();var Sr=Yr;var Dr=Math.log(2);function Tr(t,r,e,i,n,a){var s=i+"-"+n;var o=t.length;if(a.hasOwnProperty(s)){return a[s]}if(r===1){var u=Math.round(Math.log((1<<o)-1&~n)/Dr);return t[e][u]}var f=i|1<<e;var l=e+1;while(i&1<<l){l++}var v=0;for(var h=0,c=0;h<o;h++){var d=1<<h;if(!(d&n)){v+=(c%2?-1:1)*t[e][h]*Tr(t,r-1,l,f,n|d,a);c++}}a[s]=v;return v}function Ar(t,r){var e=[[t[0],t[1],1,0,0,0,-r[0]*t[0],-r[0]*t[1]],[0,0,0,t[0],t[1],1,-r[1]*t[0],-r[1]*t[1]],[t[2],t[3],1,0,0,0,-r[2]*t[2],-r[2]*t[3]],[0,0,0,t[2],t[3],1,-r[3]*t[2],-r[3]*t[3]],[t[4],t[5],1,0,0,0,-r[4]*t[4],-r[4]*t[5]],[0,0,0,t[4],t[5],1,-r[5]*t[4],-r[5]*t[5]],[t[6],t[7],1,0,0,0,-r[6]*t[6],-r[6]*t[7]],[0,0,0,t[6],t[7],1,-r[7]*t[6],-r[7]*t[7]]];var i={};var n=Tr(e,8,0,0,0,i);if(n===0){return}var a=[];for(var s=0;s<8;s++){for(var o=0;o<8;o++){a[o]==null&&(a[o]=0);a[o]+=((s+o)%2?-1:1)*Tr(e,7,s===0?1:0,1<<s,1<<o,i)/n*r[s]}}return function(t,r,e){var i=r*a[6]+e*a[7]+1;t[0]=(r*a[0]+e*a[1]+a[2])/i;t[1]=(r*a[3]+e*a[4]+a[5])/i}}var Or="___zrEVENTSAVED";var jr=[];function Nr(t,r,e,i,n){return Hr(jr,r,i,n,true)&&Hr(t,e,jr[0],jr[1])}function Hr(t,r,e,i,n){if(r.getBoundingClientRect&&H.domSupported&&!Cr(r)){var a=r[Or]||(r[Or]={});var s=Ir(r,a);var o=zr(s,a,n);if(o){o(t,e,i);return true}}return false}function Ir(t,r){var e=r.markers;if(e){return e}e=r.markers=[];var i=["left","right"];var n=["top","bottom"];for(var a=0;a<4;a++){var s=document.createElement("div");var o=s.style;var u=a%2;var f=(a>>1)%2;o.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[u]+":0",n[f]+":0",i[1-u]+":auto",n[1-f]+":auto",""].join("!important;");t.appendChild(s);e.push(s)}return e}function zr(t,r,e){var i=e?"invTrans":"trans";var n=r[i];var a=r.srcCoords;var s=[];var o=[];var u=true;for(var f=0;f<4;f++){var l=t[f].getBoundingClientRect();var v=2*f;var h=l.left;var c=l.top;s.push(h,c);u=u&&a&&h===a[v]&&c===a[v+1];o.push(t[f].offsetLeft,t[f].offsetTop)}return u&&n?n:(r.srcCoords=s,r[i]=e?Ar(o,s):Ar(s,o))}function Cr(t){return t.nodeName.toUpperCase()==="CANVAS"}var Er=/([&<>"'])/g;var Pr={"&":"&","<":"<",">":">",'"':""","'":"'"};function Wr(t){return t==null?"":(t+"").replace(Er,(function(t,r){return Pr[r]}))}var Rr=/^(?:mouse|pointer|contextmenu|drag|drop)|click/;var Fr=[];var Br=H.browser.firefox&&+H.browser.version.split(".")[0]<39;function Ur(t,r,e,i){e=e||{};if(i){Jr(t,r,e)}else if(Br&&r.layerX!=null&&r.layerX!==r.offsetX){e.zrX=r.layerX;e.zrY=r.layerY}else if(r.offsetX!=null){e.zrX=r.offsetX;e.zrY=r.offsetY}else{Jr(t,r,e)}return e}function Jr(t,r,e){if(H.domSupported&&t.getBoundingClientRect){var i=r.clientX;var n=r.clientY;if(Cr(t)){var a=t.getBoundingClientRect();e.zrX=i-a.left;e.zrY=n-a.top;return}else{if(Hr(Fr,t,i,n)){e.zrX=Fr[0];e.zrY=Fr[1];return}}}e.zrX=e.zrY=0}function Vr(t){return t||window.event}function Gr(t,r,e){r=Vr(r);if(r.zrX!=null){return r}var i=r.type;var n=i&&i.indexOf("touch")>=0;if(!n){Ur(t,r,r,e);var a=Zr(r);r.zrDelta=a?a/120:-(r.detail||0)/3}else{var s=i!=="touchend"?r.targetTouches[0]:r.changedTouches[0];s&&Ur(t,s,r,e)}var o=r.button;if(r.which==null&&o!==undefined&&Rr.test(r.type)){r.which=o&1?1:o&2?3:o&4?2:0}return r}function Zr(t){var r=t.wheelDelta;if(r){return r}var e=t.deltaX;var i=t.deltaY;if(e==null||i==null){return r}var n=i!==0?Math.abs(i):Math.abs(e);var a=i>0?-1:i<0?1:e>0?-1:1;return 3*n*a}function Xr(t,r,e,i){t.addEventListener(r,e,i)}function qr(t,r,e,i){t.removeEventListener(r,e,i)}var Kr=function(t){t.preventDefault();t.stopPropagation();t.cancelBubble=true};function $r(t){return t.which===2||t.which===3}var Qr=function(){function t(){this._track=[]}t.prototype.recognize=function(t,r,e){this._doTrack(t,r,e);return this._recognize(t)};t.prototype.clear=function(){this._track.length=0;return this};t.prototype._doTrack=function(t,r,e){var i=t.touches;if(!i){return}var n={points:[],touches:[],target:r,event:t};for(var a=0,s=i.length;a<s;a++){var o=i[a];var u=Ur(e,o,{});n.points.push([u.zrX,u.zrY]);n.touches.push(o)}this._track.push(n)};t.prototype._recognize=function(t){for(var r in ee){if(ee.hasOwnProperty(r)){var e=ee[r](this._track,t);if(e){return e}}}};return t}();function te(t){var r=t[1][0]-t[0][0];var e=t[1][1]-t[0][1];return Math.sqrt(r*r+e*e)}function re(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}var ee={pinch:function(t,r){var e=t.length;if(!e){return}var i=(t[e-1]||{}).points;var n=(t[e-2]||{}).points||i;if(n&&n.length>1&&i&&i.length>1){var a=te(i)/te(n);!isFinite(a)&&(a=1);r.pinchScale=a;var s=re(i);r.pinchX=s[0];r.pinchY=s[1];return{type:"pinch",target:t[0].target,event:r}}}};function ie(){return[1,0,0,1,0,0]}function ne(t){t[0]=1;t[1]=0;t[2]=0;t[3]=1;t[4]=0;t[5]=0;return t}function ae(t,r){t[0]=r[0];t[1]=r[1];t[2]=r[2];t[3]=r[3];t[4]=r[4];t[5]=r[5];return t}function se(t,r,e){var i=r[0]*e[0]+r[2]*e[1];var n=r[1]*e[0]+r[3]*e[1];var a=r[0]*e[2]+r[2]*e[3];var s=r[1]*e[2]+r[3]*e[3];var o=r[0]*e[4]+r[2]*e[5]+r[4];var u=r[1]*e[4]+r[3]*e[5]+r[5];t[0]=i;t[1]=n;t[2]=a;t[3]=s;t[4]=o;t[5]=u;return t}function oe(t,r,e){t[0]=r[0];t[1]=r[1];t[2]=r[2];t[3]=r[3];t[4]=r[4]+e[0];t[5]=r[5]+e[1];return t}function ue(t,r,e,i){if(i===void 0){i=[0,0]}var n=r[0];var a=r[2];var s=r[4];var o=r[1];var u=r[3];var f=r[5];var l=Math.sin(e);var v=Math.cos(e);t[0]=n*v+o*l;t[1]=-n*l+o*v;t[2]=a*v+u*l;t[3]=-a*l+v*u;t[4]=v*(s-i[0])+l*(f-i[1])+i[0];t[5]=v*(f-i[1])-l*(s-i[0])+i[1];return t}function fe(t,r,e){var i=e[0];var n=e[1];t[0]=r[0]*i;t[1]=r[1]*n;t[2]=r[2]*i;t[3]=r[3]*n;t[4]=r[4]*i;t[5]=r[5]*n;return t}function le(t,r){var e=r[0];var i=r[2];var n=r[4];var a=r[1];var s=r[3];var o=r[5];var u=e*s-a*i;if(!u){return null}u=1/u;t[0]=s*u;t[1]=-a*u;t[2]=-i*u;t[3]=e*u;t[4]=(i*o-s*n)*u;t[5]=(a*n-e*o)*u;return t}function ve(t){var r=ie();ae(r,t);return r}var he=function(){function t(t,r){this.x=t||0;this.y=r||0}t.prototype.copy=function(t){this.x=t.x;this.y=t.y;return this};t.prototype.clone=function(){return new t(this.x,this.y)};t.prototype.set=function(t,r){this.x=t;this.y=r;return this};t.prototype.equal=function(t){return t.x===this.x&&t.y===this.y};t.prototype.add=function(t){this.x+=t.x;this.y+=t.y;return this};t.prototype.scale=function(t){this.x*=t;this.y*=t};t.prototype.scaleAndAdd=function(t,r){this.x+=t.x*r;this.y+=t.y*r};t.prototype.sub=function(t){this.x-=t.x;this.y-=t.y;return 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();this.x/=t;this.y/=t;return this};t.prototype.distance=function(t){var r=this.x-t.x;var e=this.y-t.y;return Math.sqrt(r*r+e*e)};t.prototype.distanceSquare=function(t){var r=this.x-t.x;var e=this.y-t.y;return r*r+e*e};t.prototype.negate=function(){this.x=-this.x;this.y=-this.y;return this};t.prototype.transform=function(t){if(!t){return}var r=this.x;var e=this.y;this.x=t[0]*r+t[2]*e+t[4];this.y=t[1]*r+t[3]*e+t[5];return this};t.prototype.toArray=function(t){t[0]=this.x;t[1]=this.y;return t};t.prototype.fromArray=function(t){this.x=t[0];this.y=t[1]};t.set=function(t,r,e){t.x=r;t.y=e};t.copy=function(t,r){t.x=r.x;t.y=r.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,r){return t.x*r.x+t.y*r.y};t.add=function(t,r,e){t.x=r.x+e.x;t.y=r.y+e.y};t.sub=function(t,r,e){t.x=r.x-e.x;t.y=r.y-e.y};t.scale=function(t,r,e){t.x=r.x*e;t.y=r.y*e};t.scaleAndAdd=function(t,r,e,i){t.x=r.x+e.x*i;t.y=r.y+e.y*i};t.lerp=function(t,r,e,i){var n=1-i;t.x=n*r.x+i*e.x;t.y=n*r.y+i*e.y};return t}();var ce=he;var de=Math.min;var me=Math.max;var pe=new ce;var ye=new ce;var _e=new ce;var ge=new ce;var be=new ce;var we=new ce;var Me=function(){function t(t,r,e,i){if(e<0){t=t+e;e=-e}if(i<0){r=r+i;i=-i}this.x=t;this.y=r;this.width=e;this.height=i}t.prototype.union=function(t){var r=de(t.x,this.x);var e=de(t.y,this.y);if(isFinite(this.x)&&isFinite(this.width)){this.width=me(t.x+t.width,this.x+this.width)-r}else{this.width=t.width}if(isFinite(this.y)&&isFinite(this.height)){this.height=me(t.y+t.height,this.y+this.height)-e}else{this.height=t.height}this.x=r;this.y=e};t.prototype.applyTransform=function(r){t.applyTransform(this,this,r)};t.prototype.calculateTransform=function(t){var r=this;var e=t.width/r.width;var i=t.height/r.height;var n=ie();oe(n,n,[-r.x,-r.y]);fe(n,n,[e,i]);oe(n,n,[t.x,t.y]);return n};t.prototype.intersect=function(r,e){if(!r){return false}if(!(r instanceof t)){r=t.create(r)}var i=this;var n=i.x;var a=i.x+i.width;var s=i.y;var o=i.y+i.height;var u=r.x;var f=r.x+r.width;var l=r.y;var v=r.y+r.height;var h=!(a<u||f<n||o<l||v<s);if(e){var c=Infinity;var d=0;var m=Math.abs(a-u);var p=Math.abs(f-n);var y=Math.abs(o-l);var _=Math.abs(v-s);var g=Math.min(m,p);var b=Math.min(y,_);if(a<u||f<n){if(g>d){d=g;if(m<p){ce.set(we,-m,0)}else{ce.set(we,p,0)}}}else{if(g<c){c=g;if(m<p){ce.set(be,m,0)}else{ce.set(be,-p,0)}}}if(o<l||v<s){if(b>d){d=b;if(y<_){ce.set(we,0,-y)}else{ce.set(we,0,_)}}}else{if(g<c){c=g;if(y<_){ce.set(be,0,y)}else{ce.set(be,0,-_)}}}}if(e){ce.copy(e,h?be:we)}return h};t.prototype.contain=function(t,r){var e=this;return t>=e.x&&t<=e.x+e.width&&r>=e.y&&r<=e.y+e.height};t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)};t.prototype.copy=function(r){t.copy(this,r)};t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}};t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)};t.prototype.isZero=function(){return this.width===0||this.height===0};t.create=function(r){return new t(r.x,r.y,r.width,r.height)};t.copy=function(t,r){t.x=r.x;t.y=r.y;t.width=r.width;t.height=r.height};t.applyTransform=function(r,e,i){if(!i){if(r!==e){t.copy(r,e)}return}if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var n=i[0];var a=i[3];var s=i[4];var o=i[5];r.x=e.x*n+s;r.y=e.y*a+o;r.width=e.width*n;r.height=e.height*a;if(r.width<0){r.x+=r.width;r.width=-r.width}if(r.height<0){r.y+=r.height;r.height=-r.height}return}pe.x=_e.x=e.x;pe.y=ge.y=e.y;ye.x=ge.x=e.x+e.width;ye.y=_e.y=e.y+e.height;pe.transform(i);ge.transform(i);ye.transform(i);_e.transform(i);r.x=de(pe.x,ye.x,_e.x,ge.x);r.y=de(pe.y,ye.y,_e.y,ge.y);var u=me(pe.x,ye.x,_e.x,ge.x);var f=me(pe.y,ye.y,_e.y,ge.y);r.width=u-r.x;r.height=f-r.y};return t}();var xe=Me;var Le="silent";function ke(t,r,e){return{type:t,event:e,target:r.target,topTarget:r.topTarget,cancelBubble:false,offsetX:e.zrX,offsetY:e.zrY,gestureEvent:e.gestureEvent,pinchX:e.pinchX,pinchY:e.pinchY,pinchScale:e.pinchScale,wheelDelta:e.zrDelta,zrByTouch:e.zrByTouch,which:e.which,stop:Ye}}function Ye(){Kr(this.event)}var Se=function(t){ir(r,t);function r(){var r=t!==null&&t.apply(this,arguments)||this;r.handler=null;return r}r.prototype.dispose=function(){};r.prototype.setCursor=function(){};return r}(Sr);var De=function(){function t(t,r){this.x=t;this.y=r}return t}();var Te=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"];var Ae=new xe(0,0,0,0);var Oe=function(t){ir(r,t);function r(r,e,i,n,a){var s=t.call(this)||this;s._hovered=new De(0,0);s.storage=r;s.painter=e;s.painterRoot=n;s._pointerSize=a;i=i||new Se;s.proxy=null;s.setHandlerProxy(i);s._draggingMgr=new kr(s);return s}r.prototype.setHandlerProxy=function(t){if(this.proxy){this.proxy.dispose()}if(t){ct(Te,(function(r){t.on&&t.on(r,this[r],this)}),this);t.handler=this}this.proxy=t};r.prototype.mousemove=function(t){var r=t.zrX;var e=t.zrY;var i=He(this,r,e);var n=this._hovered;var a=n.target;if(a&&!a.__zr){n=this.findHover(n.x,n.y);a=n.target}var s=this._hovered=i?new De(r,e):this.findHover(r,e);var o=s.target;var u=this.proxy;u.setCursor&&u.setCursor(o?o.cursor:"default");if(a&&o!==a){this.dispatchToElement(n,"mouseout",t)}this.dispatchToElement(s,"mousemove",t);if(o&&o!==a){this.dispatchToElement(s,"mouseover",t)}};r.prototype.mouseout=function(t){var r=t.zrEventControl;if(r!=="only_globalout"){this.dispatchToElement(this._hovered,"mouseout",t)}if(r!=="no_globalout"){this.trigger("globalout",{type:"globalout",event:t})}};r.prototype.resize=function(){this._hovered=new De(0,0)};r.prototype.dispatch=function(t,r){var e=this[t];e&&e.call(this,r)};r.prototype.dispose=function(){this.proxy.dispose();this.storage=null;this.proxy=null;this.painter=null};r.prototype.setCursorStyle=function(t){var r=this.proxy;r.setCursor&&r.setCursor(t)};r.prototype.dispatchToElement=function(t,r,e){t=t||{};var i=t.target;if(i&&i.silent){return}var n="on"+r;var a=ke(r,t,e);while(i){i[n]&&(a.cancelBubble=!!i[n].call(i,a));i.trigger(r,a);i=i.__hostTarget?i.__hostTarget:i.parent;if(a.cancelBubble){break}}if(!a.cancelBubble){this.trigger(r,a);if(this.painter&&this.painter.eachOtherLayer){this.painter.eachOtherLayer((function(t){if(typeof t[n]==="function"){t[n].call(t,a)}if(t.trigger){t.trigger(r,a)}}))}}};r.prototype.findHover=function(t,r,e){var i=this.storage.getDisplayList();var n=new De(t,r);Ne(i,n,t,r,e);if(this._pointerSize&&!n.target){var a=[];var s=this._pointerSize;var o=s/2;var u=new xe(t-o,r-o,s,s);for(var f=i.length-1;f>=0;f--){var l=i[f];if(l!==e&&!l.ignore&&!l.ignoreCoarsePointer&&(!l.parent||!l.parent.ignoreCoarsePointer)){Ae.copy(l.getBoundingRect());if(l.transform){Ae.applyTransform(l.transform)}if(Ae.intersect(u)){a.push(l)}}}if(a.length){var v=4;var h=Math.PI/12;var c=Math.PI*2;for(var d=0;d<o;d+=v){for(var m=0;m<c;m+=h){var p=t+d*Math.cos(m);var y=r+d*Math.sin(m);Ne(a,n,p,y,e);if(n.target){return n}}}}}return n};r.prototype.processGesture=function(t,r){if(!this._gestureMgr){this._gestureMgr=new Qr}var e=this._gestureMgr;r==="start"&&e.clear();var i=e.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);r==="end"&&e.clear();if(i){var n=i.type;t.gestureEvent=n;var a=new De;a.target=i.target;this.dispatchToElement(a,n,i.event)}};return r}(Sr);ct(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){Oe.prototype[t]=function(r){var e=r.zrX;var i=r.zrY;var n=He(this,e,i);var a;var s;if(t!=="mouseup"||!n){a=this.findHover(e,i);s=a.target}if(t==="mousedown"){this._downEl=s;this._downPoint=[r.zrX,r.zrY];this._upEl=s}else if(t==="mouseup"){this._upEl=s}else if(t==="click"){if(this._downEl!==this._upEl||!this._downPoint||pr(this._downPoint,[r.zrX,r.zrY])>4){return}this._downPoint=null}this.dispatchToElement(a,t,r)}}));function je(t,r,e){if(t[t.rectHover?"rectContain":"contain"](r,e)){var i=t;var n=void 0;var a=false;while(i){if(i.ignoreClip){a=true}if(!a){var s=i.getClipPath();if(s&&!s.contain(r,e)){return false}}if(i.silent){n=true}var o=i.__hostTarget;i=o?o:i.parent}return n?Le:true}return false}function Ne(t,r,e,i,n){for(var a=t.length-1;a>=0;a--){var s=t[a];var o=void 0;if(s!==n&&!s.ignore&&(o=je(s,e,i))){!r.topTarget&&(r.topTarget=s);if(o!==Le){r.target=s;break}}}}function He(t,r,e){var i=t.painter;return r<0||r>i.getWidth()||e<0||e>i.getHeight()}var Ie=Oe;var ze=32;var Ce=7;function Ee(t){var r=0;while(t>=ze){r|=t&1;t>>=1}return t+r}function Pe(t,r,e,i){var n=r+1;if(n===e){return 1}if(i(t[n++],t[r])<0){while(n<e&&i(t[n],t[n-1])<0){n++}We(t,r,n)}else{while(n<e&&i(t[n],t[n-1])>=0){n++}}return n-r}function We(t,r,e){e--;while(r<e){var i=t[r];t[r++]=t[e];t[e--]=i}}function Re(t,r,e,i,n){if(i===r){i++}for(;i<e;i++){var a=t[i];var s=r;var o=i;var u;while(s<o){u=s+o>>>1;if(n(a,t[u])<0){o=u}else{s=u+1}}var f=i-s;switch(f){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:while(f>0){t[s+f]=t[s+f-1];f--}}t[s]=a}}function Fe(t,r,e,i,n,a){var s=0;var o=0;var u=1;if(a(t,r[e+n])>0){o=i-n;while(u<o&&a(t,r[e+n+u])>0){s=u;u=(u<<1)+1;if(u<=0){u=o}}if(u>o){u=o}s+=n;u+=n}else{o=n+1;while(u<o&&a(t,r[e+n-u])<=0){s=u;u=(u<<1)+1;if(u<=0){u=o}}if(u>o){u=o}var f=s;s=n-u;u=n-f}s++;while(s<u){var l=s+(u-s>>>1);if(a(t,r[e+l])>0){s=l+1}else{u=l}}return u}function Be(t,r,e,i,n,a){var s=0;var o=0;var u=1;if(a(t,r[e+n])<0){o=n+1;while(u<o&&a(t,r[e+n-u])<0){s=u;u=(u<<1)+1;if(u<=0){u=o}}if(u>o){u=o}var f=s;s=n-u;u=n-f}else{o=i-n;while(u<o&&a(t,r[e+n+u])>=0){s=u;u=(u<<1)+1;if(u<=0){u=o}}if(u>o){u=o}s+=n;u+=n}s++;while(s<u){var l=s+(u-s>>>1);if(a(t,r[e+l])<0){u=l}else{s=l+1}}return u}function Ue(t,r){var e=Ce;var i;var n;var a=0;var s=[];i=[];n=[];function o(t,r){i[a]=t;n[a]=r;a+=1}function u(){while(a>1){var t=a-2;if(t>=1&&n[t-1]<=n[t]+n[t+1]||t>=2&&n[t-2]<=n[t]+n[t-1]){if(n[t-1]<n[t+1]){t--}}else if(n[t]>n[t+1]){break}l(t)}}function f(){while(a>1){var t=a-2;if(t>0&&n[t-1]<n[t+1]){t--}l(t)}}function l(e){var s=i[e];var o=n[e];var u=i[e+1];var f=n[e+1];n[e]=o+f;if(e===a-3){i[e+1]=i[e+2];n[e+1]=n[e+2]}a--;var l=Be(t[u],t,s,o,0,r);s+=l;o-=l;if(o===0){return}f=Fe(t[s+o-1],t,u,f,f-1,r);if(f===0){return}if(o<=f){v(s,o,u,f)}else{h(s,o,u,f)}}function v(i,n,a,o){var u=0;for(u=0;u<n;u++){s[u]=t[i+u]}var f=0;var l=a;var v=i;t[v++]=t[l++];if(--o===0){for(u=0;u<n;u++){t[v+u]=s[f+u]}return}if(n===1){for(u=0;u<o;u++){t[v+u]=t[l+u]}t[v+o]=s[f];return}var h=e;var c;var d;var m;while(1){c=0;d=0;m=false;do{if(r(t[l],s[f])<0){t[v++]=t[l++];d++;c=0;if(--o===0){m=true;break}}else{t[v++]=s[f++];c++;d=0;if(--n===1){m=true;break}}}while((c|d)<h);if(m){break}do{c=Be(t[l],s,f,n,0,r);if(c!==0){for(u=0;u<c;u++){t[v+u]=s[f+u]}v+=c;f+=c;n-=c;if(n<=1){m=true;break}}t[v++]=t[l++];if(--o===0){m=true;break}d=Fe(s[f],t,l,o,0,r);if(d!==0){for(u=0;u<d;u++){t[v+u]=t[l+u]}v+=d;l+=d;o-=d;if(o===0){m=true;break}}t[v++]=s[f++];if(--n===1){m=true;break}h--}while(c>=Ce||d>=Ce);if(m){break}if(h<0){h=0}h+=2}e=h;e<1&&(e=1);if(n===1){for(u=0;u<o;u++){t[v+u]=t[l+u]}t[v+o]=s[f]}else if(n===0){throw new Error}else{for(u=0;u<n;u++){t[v+u]=s[f+u]}}}function h(i,n,a,o){var u=0;for(u=0;u<o;u++){s[u]=t[a+u]}var f=i+n-1;var l=o-1;var v=a+o-1;var h=0;var c=0;t[v--]=t[f--];if(--n===0){h=v-(o-1);for(u=0;u<o;u++){t[h+u]=s[u]}return}if(o===1){v-=n;f-=n;c=v+1;h=f+1;for(u=n-1;u>=0;u--){t[c+u]=t[h+u]}t[v]=s[l];return}var d=e;while(true){var m=0;var p=0;var y=false;do{if(r(s[l],t[f])<0){t[v--]=t[f--];m++;p=0;if(--n===0){y=true;break}}else{t[v--]=s[l--];p++;m=0;if(--o===1){y=true;break}}}while((m|p)<d);if(y){break}do{m=n-Be(s[l],t,i,n,n-1,r);if(m!==0){v-=m;f-=m;n-=m;c=v+1;h=f+1;for(u=m-1;u>=0;u--){t[c+u]=t[h+u]}if(n===0){y=true;break}}t[v--]=s[l--];if(--o===1){y=true;break}p=o-Fe(t[f],s,0,o,o-1,r);if(p!==0){v-=p;l-=p;o-=p;c=v+1;h=l+1;for(u=0;u<p;u++){t[c+u]=s[h+u]}if(o<=1){y=true;break}}t[v--]=t[f--];if(--n===0){y=true;break}d--}while(m>=Ce||p>=Ce);if(y){break}if(d<0){d=0}d+=2}e=d;if(e<1){e=1}if(o===1){v-=n;f-=n;c=v+1;h=f+1;for(u=n-1;u>=0;u--){t[c+u]=t[h+u]}t[v]=s[l]}else if(o===0){throw new Error}else{h=v-(o-1);for(u=0;u<o;u++){t[h+u]=s[u]}}}return{mergeRuns:u,forceMergeRuns:f,pushRun:o}}function Je(t,r,e,i){if(!e){e=0}if(!i){i=t.length}var n=i-e;if(n<2){return}var a=0;if(n<ze){a=Pe(t,e,i,r);Re(t,e,i,e+a,r);return}var s=Ue(t,r);var o=Ee(n);do{a=Pe(t,e,i,r);if(a<o){var u=n;if(u>o){u=o}Re(t,e,e+u,e+a,r);a=u}s.pushRun(e,a);s.mergeRuns();n-=a;e+=a}while(n!==0);s.forceMergeRuns()}var Ve=1;var Ge=2;var Ze=4;var Xe=false;function qe(){if(Xe){return}Xe=true;console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors")}function Ke(t,r){if(t.zlevel===r.zlevel){if(t.z===r.z){return t.z2-r.z2}return t.z-r.z}return t.zlevel-r.zlevel}var $e=function(){function t(){this._roots=[];this._displayList=[];this._displayListLen=0;this.displayableSortFunc=Ke}t.prototype.traverse=function(t,r){for(var e=0;e<this._roots.length;e++){this._roots[e].traverse(t,r)}};t.prototype.getDisplayList=function(t,r){r=r||false;var e=this._displayList;if(t||!e.length){this.updateDisplayList(r)}return e};t.prototype.updateDisplayList=function(t){this._displayListLen=0;var r=this._roots;var e=this._displayList;for(var i=0,n=r.length;i<n;i++){this._updateAndAddDisplayable(r[i],null,t)}e.length=this._displayListLen;Je(e,Ke)};t.prototype._updateAndAddDisplayable=function(t,r,e){if(t.ignore&&!e){return}t.beforeUpdate();t.update();t.afterUpdate();var i=t.getClipPath();if(t.ignoreClip){r=null}else if(i){if(r){r=r.slice()}else{r=[]}var n=i;var a=t;while(n){n.parent=a;n.updateTransform();r.push(n);a=n;n=n.getClipPath()}}if(t.childrenRef){var s=t.childrenRef();for(var o=0;o<s.length;o++){var u=s[o];if(t.__dirty){u.__dirty|=Ve}this._updateAndAddDisplayable(u,r,e)}t.__dirty=0}else{var f=t;if(r&&r.length){f.__clipPaths=r}else if(f.__clipPaths&&f.__clipPaths.length>0){f.__clipPaths=[]}if(isNaN(f.z)){qe();f.z=0}if(isNaN(f.z2)){qe();f.z2=0}if(isNaN(f.zlevel)){qe();f.zlevel=0}this._displayList[this._displayListLen++]=f}var l=t.getDecalElement&&t.getDecalElement();if(l){this._updateAndAddDisplayable(l,r,e)}var v=t.getTextGuideLine();if(v){this._updateAndAddDisplayable(v,r,e)}var h=t.getTextContent();if(h){this._updateAndAddDisplayable(h,r,e)}};t.prototype.addRoot=function(t){if(t.__zr&&t.__zr.storage===this){return}this._roots.push(t)};t.prototype.delRoot=function(t){if(t instanceof Array){for(var r=0,e=t.length;r<e;r++){this.delRoot(t[r])}return}var i=ft(this._roots,t);if(i>=0){this._roots.splice(i,1)}};t.prototype.delAllRoots=function(){this._roots=[];this._displayList=[];this._displayListLen=0;return};t.prototype.getRoots=function(){return this._roots};t.prototype.dispose=function(){this._displayList=null;this._roots=null};return t}();var Qe=$e;var ti;ti=H.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)};var ri=ti;var ei={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){if((t*=2)<1){return.5*t*t}return-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){if((t*=2)<1){return.5*t*t*t}return.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){if((t*=2)<1){return.5*t*t*t*t}return-.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){if((t*=2)<1){return.5*t*t*t*t*t}return.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return t===0?0:Math.pow(1024,t-1)},exponentialOut:function(t){return t===1?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){if(t===0){return 0}if(t===1){return 1}if((t*=2)<1){return.5*Math.pow(1024,t-1)}return.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){if((t*=2)<1){return-.5*(Math.sqrt(1-t*t)-1)}return.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var r;var e=.1;var i=.4;if(t===0){return 0}if(t===1){return 1}if(!e||e<1){e=1;r=i/4}else{r=i*Math.asin(1/e)/(2*Math.PI)}return-(e*Math.pow(2,10*(t-=1))*Math.sin((t-r)*(2*Math.PI)/i))},elasticOut:function(t){var r;var e=.1;var i=.4;if(t===0){return 0}if(t===1){return 1}if(!e||e<1){e=1;r=i/4}else{r=i*Math.asin(1/e)/(2*Math.PI)}return e*Math.pow(2,-10*t)*Math.sin((t-r)*(2*Math.PI)/i)+1},elasticInOut:function(t){var r;var e=.1;var i=.4;if(t===0){return 0}if(t===1){return 1}if(!e||e<1){e=1;r=i/4}else{r=i*Math.asin(1/e)/(2*Math.PI)}if((t*=2)<1){return-.5*(e*Math.pow(2,10*(t-=1))*Math.sin((t-r)*(2*Math.PI)/i))}return e*Math.pow(2,-10*(t-=1))*Math.sin((t-r)*(2*Math.PI)/i)*.5+1},backIn:function(t){var r=1.70158;return t*t*((r+1)*t-r)},backOut:function(t){var r=1.70158;return--t*t*((r+1)*t+r)+1},backInOut:function(t){var r=1.70158*1.525;if((t*=2)<1){return.5*(t*t*((r+1)*t-r))}return.5*((t-=2)*t*((r+1)*t+r)+2)},bounceIn:function(t){return 1-ei.bounceOut(1-t)},bounceOut:function(t){if(t<1/2.75){return 7.5625*t*t}else if(t<2/2.75){return 7.5625*(t-=1.5/2.75)*t+.75}else if(t<2.5/2.75){return 7.5625*(t-=2.25/2.75)*t+.9375}else{return 7.5625*(t-=2.625/2.75)*t+.984375}},bounceInOut:function(t){if(t<.5){return ei.bounceIn(t*2)*.5}return ei.bounceOut(t*2-1)*.5+.5}};var ii=ei;var ni=Math.pow;var ai=Math.sqrt;var si=1e-8;var oi=1e-4;var ui=ai(3);var fi=1/3;var li=nr();var vi=nr();var hi=nr();function ci(t){return t>-si&&t<si}function di(t){return t>si||t<-si}function mi(t,r,e,i,n){var a=1-n;return a*a*(a*t+3*n*r)+n*n*(n*i+3*a*e)}function pi(t,r,e,i,n){var a=1-n;return 3*(((r-t)*a+2*(e-r)*n)*a+(i-e)*n*n)}function yi(t,r,e,i,n,a){var s=i+3*(r-e)-t;var o=3*(e-r*2+t);var u=3*(r-t);var f=t-n;var l=o*o-3*s*u;var v=o*u-9*s*f;var h=u*u-3*o*f;var c=0;if(ci(l)&&ci(v)){if(ci(o)){a[0]=0}else{var d=-u/o;if(d>=0&&d<=1){a[c++]=d}}}else{var m=v*v-4*l*h;if(ci(m)){var p=v/l;var d=-o/s+p;var y=-p/2;if(d>=0&&d<=1){a[c++]=d}if(y>=0&&y<=1){a[c++]=y}}else if(m>0){var _=ai(m);var g=l*o+1.5*s*(-v+_);var b=l*o+1.5*s*(-v-_);if(g<0){g=-ni(-g,fi)}else{g=ni(g,fi)}if(b<0){b=-ni(-b,fi)}else{b=ni(b,fi)}var d=(-o-(g+b))/(3*s);if(d>=0&&d<=1){a[c++]=d}}else{var w=(2*l*o-3*s*v)/(2*ai(l*l*l));var M=Math.acos(w)/3;var x=ai(l);var L=Math.cos(M);var d=(-o-2*x*L)/(3*s);var y=(-o+x*(L+ui*Math.sin(M)))/(3*s);var k=(-o+x*(L-ui*Math.sin(M)))/(3*s);if(d>=0&&d<=1){a[c++]=d}if(y>=0&&y<=1){a[c++]=y}if(k>=0&&k<=1){a[c++]=k}}}return c}function _i(t,r,e,i,n){var a=6*e-12*r+6*t;var s=9*r+3*i-3*t-9*e;var o=3*r-3*t;var u=0;if(ci(s)){if(di(a)){var f=-o/a;if(f>=0&&f<=1){n[u++]=f}}}else{var l=a*a-4*s*o;if(ci(l)){n[0]=-a/(2*s)}else if(l>0){var v=ai(l);var f=(-a+v)/(2*s);var h=(-a-v)/(2*s);if(f>=0&&f<=1){n[u++]=f}if(h>=0&&h<=1){n[u++]=h}}}return u}function gi(t,r,e,i,n,a){var s=(r-t)*n+t;var o=(e-r)*n+r;var u=(i-e)*n+e;var f=(o-s)*n+s;var l=(u-o)*n+o;var v=(l-f)*n+f;a[0]=t;a[1]=s;a[2]=f;a[3]=v;a[4]=v;a[5]=l;a[6]=u;a[7]=i}function bi(t,r,e,i,n,a,s,o,u,f,l){var v;var h=.005;var c=Infinity;var d;var m;var p;var y;li[0]=u;li[1]=f;for(var _=0;_<1;_+=.05){vi[0]=mi(t,e,n,s,_);vi[1]=mi(r,i,a,o,_);p=_r(li,vi);if(p<c){v=_;c=p}}c=Infinity;for(var g=0;g<32;g++){if(h<oi){break}d=v-h;m=v+h;vi[0]=mi(t,e,n,s,d);vi[1]=mi(r,i,a,o,d);p=_r(vi,li);if(d>=0&&p<c){v=d;c=p}else{hi[0]=mi(t,e,n,s,m);hi[1]=mi(r,i,a,o,m);y=_r(hi,li);if(m<=1&&y<c){v=m;c=y}else{h*=.5}}}if(l){l[0]=mi(t,e,n,s,v);l[1]=mi(r,i,a,o,v)}return ai(c)}function wi(t,r,e,i,n,a,s,o,u){var f=t;var l=r;var v=0;var h=1/u;for(var c=1;c<=u;c++){var d=c*h;var m=mi(t,e,n,s,d);var p=mi(r,i,a,o,d);var y=m-f;var _=p-l;v+=Math.sqrt(y*y+_*_);f=m;l=p}return v}function Mi(t,r,e,i){var n=1-i;return n*(n*t+2*i*r)+i*i*e}function xi(t,r,e,i){return 2*((1-i)*(r-t)+i*(e-r))}function Li(t,r,e,i,n){var a=t-2*r+e;var s=2*(r-t);var o=t-i;var u=0;if(ci(a)){if(di(s)){var f=-o/s;if(f>=0&&f<=1){n[u++]=f}}}else{var l=s*s-4*a*o;if(ci(l)){var f=-s/(2*a);if(f>=0&&f<=1){n[u++]=f}}else if(l>0){var v=ai(l);var f=(-s+v)/(2*a);var h=(-s-v)/(2*a);if(f>=0&&f<=1){n[u++]=f}if(h>=0&&h<=1){n[u++]=h}}}return u}function ki(t,r,e){var i=t+e-2*r;if(i===0){return.5}else{return(t-r)/i}}function Yi(t,r,e,i,n){var a=(r-t)*i+t;var s=(e-r)*i+r;var o=(s-a)*i+a;n[0]=t;n[1]=a;n[2]=o;n[3]=o;n[4]=s;n[5]=e}function Si(t,r,e,i,n,a,s,o,u){var f;var l=.005;var v=Infinity;li[0]=s;li[1]=o;for(var h=0;h<1;h+=.05){vi[0]=Mi(t,e,n,h);vi[1]=Mi(r,i,a,h);var c=_r(li,vi);if(c<v){f=h;v=c}}v=Infinity;for(var d=0;d<32;d++){if(l<oi){break}var m=f-l;var p=f+l;vi[0]=Mi(t,e,n,m);vi[1]=Mi(r,i,a,m);var c=_r(vi,li);if(m>=0&&c<v){f=m;v=c}else{hi[0]=Mi(t,e,n,p);hi[1]=Mi(r,i,a,p);var y=_r(hi,li);if(p<=1&&y<v){f=p;v=y}else{l*=.5}}}if(u){u[0]=Mi(t,e,n,f);u[1]=Mi(r,i,a,f)}return ai(v)}function Di(t,r,e,i,n,a,s){var o=t;var u=r;var f=0;var l=1/s;for(var v=1;v<=s;v++){var h=v*l;var c=Mi(t,e,n,h);var d=Mi(r,i,a,h);var m=c-o;var p=d-u;f+=Math.sqrt(m*m+p*p);o=c;u=d}return f}var Ti=/cubic-bezier\(([0-9,\.e ]+)\)/;function Ai(t){var r=t&&Ti.exec(t);if(r){var e=r[1].split(",");var i=+Rt(e[0]);var n=+Rt(e[1]);var a=+Rt(e[2]);var s=+Rt(e[3]);if(isNaN(i+n+a+s)){return}var o=[];return function(t){return t<=0?0:t>=1?1:yi(0,i,a,1,t,o)&&mi(0,n,s,1,o[0])}}}var Oi=function(){function t(t){this._inited=false;this._startTime=0;this._pausedTime=0;this._paused=false;this._life=t.life||1e3;this._delay=t.delay||0;this.loop=t.loop||false;this.onframe=t.onframe||tr;this.ondestroy=t.ondestroy||tr;this.onrestart=t.onrestart||tr;t.easing&&this.setEasing(t.easing)}t.prototype.step=function(t,r){if(!this._inited){this._startTime=t+this._delay;this._inited=true}if(this._paused){this._pausedTime+=r;return}var e=this._life;var i=t-this._startTime-this._pausedTime;var n=i/e;if(n<0){n=0}n=Math.min(n,1);var a=this.easingFunc;var s=a?a(n):n;this.onframe(s);if(n===1){if(this.loop){var o=i%e;this._startTime=t-o;this._pausedTime=0;this.onrestart()}else{return true}}return false};t.prototype.pause=function(){this._paused=true};t.prototype.resume=function(){this._paused=false};t.prototype.setEasing=function(t){this.easing=t;this.easingFunc=xt(t)?t:ii[t]||Ai(t)};return t}();var ji=Oi;var Ni=function(){function t(t){this.value=t}return t}();var Hi=function(){function t(){this._len=0}t.prototype.insert=function(t){var r=new Ni(t);this.insertEntry(r);return r};t.prototype.insertEntry=function(t){if(!this.head){this.head=this.tail=t}else{this.tail.next=t;t.prev=this.tail;t.next=null;this.tail=t}this._len++};t.prototype.remove=function(t){var r=t.prev;var e=t.next;if(r){r.next=e}else{this.head=e}if(e){e.prev=r}else{this.tail=r}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};return t}();var Ii=function(){function t(t){this._list=new Hi;this._maxSize=10;this._map={};this._maxSize=t}t.prototype.put=function(t,r){var e=this._list;var i=this._map;var n=null;if(i[t]==null){var a=e.len();var s=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var o=e.head;e.remove(o);delete i[o.key];n=o.value;this._lastRemovedEntry=o}if(s){s.value=r}else{s=new Ni(r)}s.key=t;e.insertEntry(s);i[t]=s}return n};t.prototype.get=function(t){var r=this._map[t];var e=this._list;if(r!=null){if(r!==e.tail){e.remove(r);e.insertEntry(r)}return r.value}};t.prototype.clear=function(){this._list.clear();this._map={}};t.prototype.len=function(){return this._list.len()};return t}();var zi=Ii;var Ci={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],dark