UNPKG

@senx/discovery-widgets

Version:

Discovery Widgets Elements

29 lines (25 loc) 2.95 MB
var __extends=this&&this.__extends||function(){var t=function(i,r){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var r in i)if(Object.prototype.hasOwnProperty.call(i,r))t[r]=i[r]};return t(i,r)};return function(i,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(i,r);function e(){this.constructor=i}i.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}}();var __awaiter=this&&this.__awaiter||function(t,i,r,e){function n(t){return t instanceof r?t:new r((function(i){i(t)}))}return new(r||(r=Promise))((function(r,a){function s(t){try{u(e.next(t))}catch(t){a(t)}}function o(t){try{u(e["throw"](t))}catch(t){a(t)}}function u(t){t.done?r(t.value):n(t.value).then(s,o)}u((e=e.apply(t,i||[])).next())}))};var __generator=this&&this.__generator||function(t,i){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},e,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(i){return u([t,i])}}function u(o){if(e)throw new TypeError("Generator is already executing.");while(s&&(s=0,o[0]&&(r=0)),r)try{if(e=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:r.label++;return{value:o[1],done:false};case 5:r.label++;n=o[1];o=[0];continue;case 7:o=r.ops.pop();r.trys.pop();continue;default:if(!(a=r.trys,a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){r=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){r.label=o[1];break}if(o[0]===6&&r.label<a[1]){r.label=a[1];a=o;break}if(a&&r.label<a[2]){r.label=a[2];r.ops.push(o);break}if(a[2])r.ops.pop();r.trys.pop();continue}o=i.call(t,r)}catch(t){o=[6,t];n=0}finally{e=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,i,r){if(r||arguments.length===2)for(var e=0,n=i.length,a;e<n;e++){if(a||!(e in i)){if(!a)a=Array.prototype.slice.call(i,0,e);a[e]=i[e]}}return t.concat(a||Array.prototype.slice.call(i))};System.register(["./p-1c3898ff.system.js","./p-d08dab3f.system.js","./p-33b53463.system.js"],(function(t,i){"use strict";var r,e,n,a,s,o,u,A,f,l,h,c,v,d,m,p,w,g,y,b,_,M,B,k,x,S;return{setters:[function(t){r=t.r;e=t.c;n=t.h;a=t.H;s=t.g},function(t){o=t.P;u=t._;A=t.U;f=t.i;l=t.b;h=t.e;c=t.v;v=t.k;d=t.l;m=t.a;p=t.J;w=t.m;g=t.n;y=t.o;b=t.p;_=t.q;M=t.r;B=t.g;k=t.s;x=t.j},function(t){S=t.L}],execute:function(){var C=t("g",typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{}); /*! ***************************************************************************** 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 F=function(t,i){F=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var r in i)if(Object.prototype.hasOwnProperty.call(i,r))t[r]=i[r]};return F(t,i)};function Q(t,i){if(typeof i!=="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");F(t,i);function r(){this.constructor=t}t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}var D=function(){function t(){this.firefox=false;this.ie=false;this.edge=false;this.newEdge=false;this.weChat=false}return t}();var U=function(){function t(){this.browser=new D;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 Y=new U;if(typeof wx==="object"&&typeof wx.getSystemInfoSync==="function"){Y.wxa=true;Y.touchEventsSupported=true}else if(typeof document==="undefined"&&typeof self!=="undefined"){Y.worker=true}else if(!Y.hasGlobalWindow||"Deno"in window){Y.node=true;Y.svgSupported=true}else{T(navigator.userAgent,Y)}function T(t,i){var r=i.browser;var e=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(e){r.firefox=true;r.version=e[1]}if(n){r.ie=true;r.version=n[1]}if(a){r.edge=true;r.version=a[1];r.newEdge=+a[1].split(".")[0]>18}if(s){r.weChat=true}i.svgSupported=typeof SVGRect!=="undefined";i.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge;i.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&+r.version>=11);i.domSupported=typeof document!=="undefined";var o=document.documentElement.style;i.transform3dSupported=(r.ie&&"transition"in o||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in o)&&!("OTransition"in o);i.transformSupported=i.transform3dSupported||r.ie&&+r.version>=9}var H=Y;var N=12;var I="sans-serif";var E=N+"px "+I;var O=20;var j=100;var z="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function P(t){var i={};if(typeof JSON==="undefined"){return i}for(var r=0;r<t.length;r++){var e=String.fromCharCode(r+32);var n=(t.charCodeAt(r)-O)/j;i[e]=n}return i}var R=P(z);var K={createCanvas:function(){return typeof document!=="undefined"&&document.createElement("canvas")},measureText:function(){var t;var i;return function(r,e){if(!t){var n=K.createCanvas();t=n&&n.getContext("2d")}if(t){if(i!==e){i=t.font=e||E}return t.measureText(r)}else{r=r||"";e=e||E;var a=/((?:\d+)?\.?\d*)px/.exec(e);var s=a&&+a[1]||N;var o=0;if(e.indexOf("mono")>=0){o=s*r.length}else{for(var u=0;u<r.length;u++){var A=R[r[u]];o+=A==null?s:A*s}}return{width:o}}}}(),loadImage:function(t,i,r){var e=new Image;e.onload=i;e.onerror=r;e.src=t;return e}};var W=pt(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],(function(t,i){t["[object "+i+"]"]=true;return t}),{});var V=pt(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],(function(t,i){t["[object "+i+"Array]"]=true;return t}),{});var G=Object.prototype.toString;var q=Array.prototype;var J=q.forEach;var X=q.filter;var Z=q.slice;var $=q.map;var tt=function(){}.constructor;var it=tt?tt.prototype:null;var rt="__proto__";var et=2311;function nt(){return et++}function at(){var t=[];for(var i=0;i<arguments.length;i++){t[i]=arguments[i]}if(typeof console!=="undefined"){console.error.apply(console,t)}}function st(t){if(t==null||typeof t!=="object"){return t}var i=t;var r=G.call(t);if(r==="[object Array]"){if(!Wt(t)){i=[];for(var e=0,n=t.length;e<n;e++){i[e]=st(t[e])}}}else if(V[r]){if(!Wt(t)){var a=t.constructor;if(a.from){i=a.from(t)}else{i=new a(t.length);for(var e=0,n=t.length;e<n;e++){i[e]=t[e]}}}}else if(!W[r]&&!Wt(t)&&!Dt(t)){i={};for(var s in t){if(t.hasOwnProperty(s)&&s!==rt){i[s]=st(t[s])}}}return i}function ot(t,i,r){if(!Ct(i)||!Ct(t)){return r?st(i):t}for(var e in i){if(i.hasOwnProperty(e)&&e!==rt){var n=t[e];var a=i[e];if(Ct(a)&&Ct(n)&&!Bt(a)&&!Bt(n)&&!Dt(a)&&!Dt(n)&&!Ft(a)&&!Ft(n)&&!Wt(a)&&!Wt(n)){ot(n,a,r)}else if(r||!(e in t)){t[e]=st(i[e])}}}return t}function ut(t,i){var r=t[0];for(var e=1,n=t.length;e<n;e++){r=ot(r,t[e],i)}return r}function At(t,i){if(Object.assign){Object.assign(t,i)}else{for(var r in i){if(i.hasOwnProperty(r)&&r!==rt){t[r]=i[r]}}}return t}function ft(t,i,r){var e=yt(i);for(var n=0,a=e.length;n<a;n++){var s=e[n];if(r?i[s]!=null:t[s]==null){t[s]=i[s]}}return t}function lt(t,i){if(t){if(t.indexOf){return t.indexOf(i)}for(var r=0,e=t.length;r<e;r++){if(t[r]===i){return r}}}return-1}function ht(t,i){var r=t.prototype;function e(){}e.prototype=i.prototype;t.prototype=new e;for(var n in r){if(r.hasOwnProperty(n)){t.prototype[n]=r[n]}}t.prototype.constructor=t;t.superClass=i}function ct(t,i,r){t="prototype"in t?t.prototype:t;i="prototype"in i?i.prototype:i;if(Object.getOwnPropertyNames){var e=Object.getOwnPropertyNames(i);for(var n=0;n<e.length;n++){var a=e[n];if(a!=="constructor"){if(r?i[a]!=null:t[a]==null){t[a]=i[a]}}}}else{ft(t,i,r)}}function vt(t){if(!t){return false}if(typeof t==="string"){return false}return typeof t.length==="number"}function dt(t,i,r){if(!(t&&i)){return}if(t.forEach&&t.forEach===J){t.forEach(i,r)}else if(t.length===+t.length){for(var e=0,n=t.length;e<n;e++){i.call(r,t[e],e,t)}}else{for(var a in t){if(t.hasOwnProperty(a)){i.call(r,t[a],a,t)}}}}function mt(t,i,r){if(!t){return[]}if(!i){return Ot(t)}if(t.map&&t.map===$){return t.map(i,r)}else{var e=[];for(var n=0,a=t.length;n<a;n++){e.push(i.call(r,t[n],n,t))}return e}}function pt(t,i,r,e){if(!(t&&i)){return}for(var n=0,a=t.length;n<a;n++){r=i.call(e,r,t[n],n,t)}return r}function wt(t,i,r){if(!t){return[]}if(!i){return Ot(t)}if(t.filter&&t.filter===X){return t.filter(i,r)}else{var e=[];for(var n=0,a=t.length;n<a;n++){if(i.call(r,t[n],n,t)){e.push(t[n])}}return e}}function gt(t,i,r){if(!(t&&i)){return}for(var e=0,n=t.length;e<n;e++){if(i.call(r,t[e],e,t)){return t[e]}}}function yt(t){if(!t){return[]}if(Object.keys){return Object.keys(t)}var i=[];for(var r in t){if(t.hasOwnProperty(r)){i.push(r)}}return i}function bt(t,i){var r=[];for(var e=2;e<arguments.length;e++){r[e-2]=arguments[e]}return function(){return t.apply(i,r.concat(Z.call(arguments)))}}var _t=it&&Lt(it.bind)?it.call.bind(it.bind):bt;function Mt(t){var i=[];for(var r=1;r<arguments.length;r++){i[r-1]=arguments[r]}return function(){return t.apply(this,i.concat(Z.call(arguments)))}}function Bt(t){if(Array.isArray){return Array.isArray(t)}return G.call(t)==="[object Array]"}function Lt(t){return typeof t==="function"}function kt(t){return typeof t==="string"}function xt(t){return G.call(t)==="[object String]"}function St(t){return typeof t==="number"}function Ct(t){var i=typeof t;return i==="function"||!!t&&i==="object"}function Ft(t){return!!W[G.call(t)]}function Qt(t){return!!V[G.call(t)]}function Dt(t){return typeof t==="object"&&typeof t.nodeType==="number"&&typeof t.ownerDocument==="object"}function Ut(t){return t.colorStops!=null}function Yt(t){return t.image!=null}function Tt(t){return G.call(t)==="[object RegExp]"}function Ht(t){return t!==t}function Nt(){var t=[];for(var i=0;i<arguments.length;i++){t[i]=arguments[i]}for(var r=0,e=t.length;r<e;r++){if(t[r]!=null){return t[r]}}}function It(t,i){return t!=null?t:i}function Et(t,i,r){return t!=null?t:i!=null?i:r}function Ot(t){var i=[];for(var r=1;r<arguments.length;r++){i[r-1]=arguments[r]}return Z.apply(t,i)}function jt(t){if(typeof t==="number"){return[t,t,t,t]}var i=t.length;if(i===2){return[t[0],t[1],t[0],t[1]]}else if(i===3){return[t[0],t[1],t[2],t[1]]}return t}function zt(t,i){if(!t){throw new Error(i)}}function Pt(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 Rt="__ec_primitive__";function Kt(t){t[Rt]=true}function Wt(t){return t[Rt]}var Vt=function(){function t(){this.data={}}t.prototype["delete"]=function(t){var i=this.has(t);if(i){delete this.data[t]}return i};t.prototype.has=function(t){return this.data.hasOwnProperty(t)};t.prototype.get=function(t){return this.data[t]};t.prototype.set=function(t,i){this.data[t]=i;return this};t.prototype.keys=function(){return yt(this.data)};t.prototype.forEach=function(t){var i=this.data;for(var r in i){if(i.hasOwnProperty(r)){t(i[r],r)}}};return t}();var Gt=typeof Map==="function";function qt(){return Gt?new Map:new Vt}var Jt=function(){function t(i){var r=Bt(i);this.data=qt();var e=this;i instanceof t?i.each(n):i&&dt(i,n);function n(t,i){r?e.set(t,i):e.set(i,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,i){this.data.set(t,i);return i};t.prototype.each=function(t,i){this.data.forEach((function(r,e){t.call(i,r,e)}))};t.prototype.keys=function(){var t=this.data.keys();return Gt?Array.from(t):t};t.prototype.removeKey=function(t){this.data["delete"](t)};return t}();function Xt(t){return new Jt(t)}function Zt(t,i){var r=new t.constructor(t.length+i.length);for(var e=0;e<t.length;e++){r[e]=t[e]}var n=t.length;for(var e=0;e<i.length;e++){r[e+n]=i[e]}return r}function $t(t,i){var r;if(Object.create){r=Object.create(t)}else{var e=function(){};e.prototype=t;r=new e}if(i){At(r,i)}return r}function ti(t){var i=t.style;i.webkitUserSelect="none";i.userSelect="none";i.webkitTapHighlightColor="rgba(0,0,0,0)";i["-webkit-touch-callout"]="none"}function ii(t,i){return t.hasOwnProperty(i)}function ri(){}var ei=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 ni=function(t,i){ni=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var r in i)if(Object.prototype.hasOwnProperty.call(i,r))t[r]=i[r]};return ni(t,i)};function ai(t,i){if(typeof i!=="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");ni(t,i);function r(){this.constructor=t}t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}function si(t,i){if(t==null){t=0}if(i==null){i=0}return[t,i]}function oi(t,i){t[0]=i[0];t[1]=i[1];return t}function ui(t){return[t[0],t[1]]}function Ai(t,i,r){t[0]=i;t[1]=r;return t}function fi(t,i,r){t[0]=i[0]+r[0];t[1]=i[1]+r[1];return t}function li(t,i,r,e){t[0]=i[0]+r[0]*e;t[1]=i[1]+r[1]*e;return t}function hi(t,i,r){t[0]=i[0]-r[0];t[1]=i[1]-r[1];return t}function ci(t){return Math.sqrt(vi(t))}function vi(t){return t[0]*t[0]+t[1]*t[1]}function di(t,i,r){t[0]=i[0]*r;t[1]=i[1]*r;return t}function mi(t,i){var r=ci(i);if(r===0){t[0]=0;t[1]=0}else{t[0]=i[0]/r;t[1]=i[1]/r}return t}function pi(t,i){return Math.sqrt((t[0]-i[0])*(t[0]-i[0])+(t[1]-i[1])*(t[1]-i[1]))}var wi=pi;function gi(t,i){return(t[0]-i[0])*(t[0]-i[0])+(t[1]-i[1])*(t[1]-i[1])}var yi=gi;function bi(t,i,r,e){t[0]=i[0]+e*(r[0]-i[0]);t[1]=i[1]+e*(r[1]-i[1]);return t}function _i(t,i,r){var e=i[0];var n=i[1];t[0]=r[0]*e+r[2]*n+r[4];t[1]=r[1]*e+r[3]*n+r[5];return t}function Mi(t,i,r){t[0]=Math.min(i[0],r[0]);t[1]=Math.min(i[1],r[1]);return t}function Bi(t,i,r){t[0]=Math.max(i[0],r[0]);t[1]=Math.max(i[1],r[1]);return t}var Li=function(){function t(t,i){this.target=t;this.topTarget=i&&i.topTarget}return t}();var ki=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 i=t.target;while(i&&!i.draggable){i=i.parent||i.__hostTarget}if(i){this._draggingTarget=i;i.dragging=true;this._x=t.offsetX;this._y=t.offsetY;this.handler.dispatchToElement(new Li(i,t),"dragstart",t.event)}};t.prototype._drag=function(t){var i=this._draggingTarget;if(i){var r=t.offsetX;var e=t.offsetY;var n=r-this._x;var a=e-this._y;this._x=r;this._y=e;i.drift(n,a,t);this.handler.dispatchToElement(new Li(i,t),"drag",t.event);var s=this.handler.findHover(r,e,i).target;var o=this._dropTarget;this._dropTarget=s;if(i!==s){if(o&&s!==o){this.handler.dispatchToElement(new Li(o,t),"dragleave",t.event)}if(s&&s!==o){this.handler.dispatchToElement(new Li(s,t),"dragenter",t.event)}}}};t.prototype._dragEnd=function(t){var i=this._draggingTarget;if(i){i.dragging=false}this.handler.dispatchToElement(new Li(i,t),"dragend",t.event);if(this._dropTarget){this.handler.dispatchToElement(new Li(this._dropTarget,t),"drop",t.event)}this._draggingTarget=null;this._dropTarget=null};return t}();var xi=ki;var Si=function(){function t(t){if(t){this._$eventProcessor=t}}t.prototype.on=function(t,i,r,e){if(!this._$handlers){this._$handlers={}}var n=this._$handlers;if(typeof i==="function"){e=r;r=i;i=null}if(!r||!t){return this}var a=this._$eventProcessor;if(i!=null&&a&&a.normalizeQuery){i=a.normalizeQuery(i)}if(!n[t]){n[t]=[]}for(var s=0;s<n[t].length;s++){if(n[t][s].h===r){return this}}var o={h:r,query:i,ctx:e||this,callAtLast:r.zrEventfulCallAtLast};var u=n[t].length-1;var A=n[t][u];A&&A.callAtLast?n[t].splice(u,0,o):n[t].push(o);return this};t.prototype.isSilent=function(t){var i=this._$handlers;return!i||!i[t]||!i[t].length};t.prototype.off=function(t,i){var r=this._$handlers;if(!r){return this}if(!t){this._$handlers={};return this}if(i){if(r[t]){var e=[];for(var n=0,a=r[t].length;n<a;n++){if(r[t][n].h!==i){e.push(r[t][n])}}r[t]=e}if(r[t]&&r[t].length===0){delete r[t]}}else{delete r[t]}return this};t.prototype.trigger=function(t){var i=[];for(var r=1;r<arguments.length;r++){i[r-1]=arguments[r]}if(!this._$handlers){return this}var e=this._$handlers[t];var n=this._$eventProcessor;if(e){var a=i.length;var s=e.length;for(var o=0;o<s;o++){var u=e[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,i[0]);break;case 2:u.h.call(u.ctx,i[0],i[1]);break;default:u.h.apply(u.ctx,i);break}}}n&&n.afterTrigger&&n.afterTrigger(t);return this};t.prototype.triggerWithContext=function(t){var i=[];for(var r=1;r<arguments.length;r++){i[r-1]=arguments[r]}if(!this._$handlers){return this}var e=this._$handlers[t];var n=this._$eventProcessor;if(e){var a=i.length;var s=i[a-1];var o=e.length;for(var u=0;u<o;u++){var A=e[u];if(n&&n.filter&&A.query!=null&&!n.filter(t,A.query)){continue}switch(a){case 0:A.h.call(s);break;case 1:A.h.call(s,i[0]);break;case 2:A.h.call(s,i[0],i[1]);break;default:A.h.apply(s,i.slice(1,a-1));break}}}n&&n.afterTrigger&&n.afterTrigger(t);return this};return t}();var Ci=Si;var Fi=Math.log(2);function Qi(t,i,r,e,n,a){var s=e+"-"+n;var o=t.length;if(a.hasOwnProperty(s)){return a[s]}if(i===1){var u=Math.round(Math.log((1<<o)-1&~n)/Fi);return t[r][u]}var A=e|1<<r;var f=r+1;while(e&1<<f){f++}var l=0;for(var h=0,c=0;h<o;h++){var v=1<<h;if(!(v&n)){l+=(c%2?-1:1)*t[r][h]*Qi(t,i-1,f,A,n|v,a);c++}}a[s]=l;return l}function Di(t,i){var r=[[t[0],t[1],1,0,0,0,-i[0]*t[0],-i[0]*t[1]],[0,0,0,t[0],t[1],1,-i[1]*t[0],-i[1]*t[1]],[t[2],t[3],1,0,0,0,-i[2]*t[2],-i[2]*t[3]],[0,0,0,t[2],t[3],1,-i[3]*t[2],-i[3]*t[3]],[t[4],t[5],1,0,0,0,-i[4]*t[4],-i[4]*t[5]],[0,0,0,t[4],t[5],1,-i[5]*t[4],-i[5]*t[5]],[t[6],t[7],1,0,0,0,-i[6]*t[6],-i[6]*t[7]],[0,0,0,t[6],t[7],1,-i[7]*t[6],-i[7]*t[7]]];var e={};var n=Qi(r,8,0,0,0,e);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)*Qi(r,7,s===0?1:0,1<<s,1<<o,e)/n*i[s]}}return function(t,i,r){var e=i*a[6]+r*a[7]+1;t[0]=(i*a[0]+r*a[1]+a[2])/e;t[1]=(i*a[3]+r*a[4]+a[5])/e}}var Ui="___zrEVENTSAVED";var Yi=[];function Ti(t,i,r,e,n){return Hi(Yi,i,e,n,true)&&Hi(t,r,Yi[0],Yi[1])}function Hi(t,i,r,e,n){if(i.getBoundingClientRect&&H.domSupported&&!Ei(i)){var a=i[Ui]||(i[Ui]={});var s=Ni(i,a);var o=Ii(s,a,n);if(o){o(t,r,e);return true}}return false}function Ni(t,i){var r=i.markers;if(r){return r}r=i.markers=[];var e=["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 A=(a>>1)%2;o.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",e[u]+":0",n[A]+":0",e[1-u]+":auto",n[1-A]+":auto",""].join("!important;");t.appendChild(s);r.push(s)}return r}function Ii(t,i,r){var e=r?"invTrans":"trans";var n=i[e];var a=i.srcCoords;var s=[];var o=[];var u=true;for(var A=0;A<4;A++){var f=t[A].getBoundingClientRect();var l=2*A;var h=f.left;var c=f.top;s.push(h,c);u=u&&a&&h===a[l]&&c===a[l+1];o.push(t[A].offsetLeft,t[A].offsetTop)}return u&&n?n:(i.srcCoords=s,i[e]=r?Di(o,s):Di(s,o))}function Ei(t){return t.nodeName.toUpperCase()==="CANVAS"}var Oi=/([&<>"'])/g;var ji={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function zi(t){return t==null?"":(t+"").replace(Oi,(function(t,i){return ji[i]}))}var Pi=/^(?:mouse|pointer|contextmenu|drag|drop)|click/;var Ri=[];var Ki=H.browser.firefox&&+H.browser.version.split(".")[0]<39;function Wi(t,i,r,e){r=r||{};if(e){Vi(t,i,r)}else if(Ki&&i.layerX!=null&&i.layerX!==i.offsetX){r.zrX=i.layerX;r.zrY=i.layerY}else if(i.offsetX!=null){r.zrX=i.offsetX;r.zrY=i.offsetY}else{Vi(t,i,r)}return r}function Vi(t,i,r){if(H.domSupported&&t.getBoundingClientRect){var e=i.clientX;var n=i.clientY;if(Ei(t)){var a=t.getBoundingClientRect();r.zrX=e-a.left;r.zrY=n-a.top;return}else{if(Hi(Ri,t,e,n)){r.zrX=Ri[0];r.zrY=Ri[1];return}}}r.zrX=r.zrY=0}function Gi(t){return t||window.event}function qi(t,i,r){i=Gi(i);if(i.zrX!=null){return i}var e=i.type;var n=e&&e.indexOf("touch")>=0;if(!n){Wi(t,i,i,r);var a=Ji(i);i.zrDelta=a?a/120:-(i.detail||0)/3}else{var s=e!=="touchend"?i.targetTouches[0]:i.changedTouches[0];s&&Wi(t,s,i,r)}var o=i.button;if(i.which==null&&o!==undefined&&Pi.test(i.type)){i.which=o&1?1:o&2?3:o&4?2:0}return i}function Ji(t){var i=t.wheelDelta;if(i){return i}var r=t.deltaX;var e=t.deltaY;if(r==null||e==null){return i}var n=e!==0?Math.abs(e):Math.abs(r);var a=e>0?-1:e<0?1:r>0?-1:1;return 3*n*a}function Xi(t,i,r,e){t.addEventListener(i,r,e)}function Zi(t,i,r,e){t.removeEventListener(i,r,e)}var $i=function(t){t.preventDefault();t.stopPropagation();t.cancelBubble=true};function tr(t){return t.which===2||t.which===3}var ir=function(){function t(){this._track=[]}t.prototype.recognize=function(t,i,r){this._doTrack(t,i,r);return this._recognize(t)};t.prototype.clear=function(){this._track.length=0;return this};t.prototype._doTrack=function(t,i,r){var e=t.touches;if(!e){return}var n={points:[],touches:[],target:i,event:t};for(var a=0,s=e.length;a<s;a++){var o=e[a];var u=Wi(r,o,{});n.points.push([u.zrX,u.zrY]);n.touches.push(o)}this._track.push(n)};t.prototype._recognize=function(t){for(var i in nr){if(nr.hasOwnProperty(i)){var r=nr[i](this._track,t);if(r){return r}}}};return t}();function rr(t){var i=t[1][0]-t[0][0];var r=t[1][1]-t[0][1];return Math.sqrt(i*i+r*r)}function er(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}var nr={pinch:function(t,i){var r=t.length;if(!r){return}var e=(t[r-1]||{}).points;var n=(t[r-2]||{}).points||e;if(n&&n.length>1&&e&&e.length>1){var a=rr(e)/rr(n);!isFinite(a)&&(a=1);i.pinchScale=a;var s=er(e);i.pinchX=s[0];i.pinchY=s[1];return{type:"pinch",target:t[0].target,event:i}}}};function ar(){return[1,0,0,1,0,0]}function sr(t){t[0]=1;t[1]=0;t[2]=0;t[3]=1;t[4]=0;t[5]=0;return t}function or(t,i){t[0]=i[0];t[1]=i[1];t[2]=i[2];t[3]=i[3];t[4]=i[4];t[5]=i[5];return t}function ur(t,i,r){var e=i[0]*r[0]+i[2]*r[1];var n=i[1]*r[0]+i[3]*r[1];var a=i[0]*r[2]+i[2]*r[3];var s=i[1]*r[2]+i[3]*r[3];var o=i[0]*r[4]+i[2]*r[5]+i[4];var u=i[1]*r[4]+i[3]*r[5]+i[5];t[0]=e;t[1]=n;t[2]=a;t[3]=s;t[4]=o;t[5]=u;return t}function Ar(t,i,r){t[0]=i[0];t[1]=i[1];t[2]=i[2];t[3]=i[3];t[4]=i[4]+r[0];t[5]=i[5]+r[1];return t}function fr(t,i,r,e){if(e===void 0){e=[0,0]}var n=i[0];var a=i[2];var s=i[4];var o=i[1];var u=i[3];var A=i[5];var f=Math.sin(r);var l=Math.cos(r);t[0]=n*l+o*f;t[1]=-n*f+o*l;t[2]=a*l+u*f;t[3]=-a*f+l*u;t[4]=l*(s-e[0])+f*(A-e[1])+e[0];t[5]=l*(A-e[1])-f*(s-e[0])+e[1];return t}function lr(t,i,r){var e=r[0];var n=r[1];t[0]=i[0]*e;t[1]=i[1]*n;t[2]=i[2]*e;t[3]=i[3]*n;t[4]=i[4]*e;t[5]=i[5]*n;return t}function hr(t,i){var r=i[0];var e=i[2];var n=i[4];var a=i[1];var s=i[3];var o=i[5];var u=r*s-a*e;if(!u){return null}u=1/u;t[0]=s*u;t[1]=-a*u;t[2]=-e*u;t[3]=r*u;t[4]=(e*o-s*n)*u;t[5]=(a*n-r*o)*u;return t}function cr(t){var i=ar();or(i,t);return i}var vr=function(){function t(t,i){this.x=t||0;this.y=i||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,i){this.x=t;this.y=i;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,i){this.x+=t.x*i;this.y+=t.y*i};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 i=this.x-t.x;var r=this.y-t.y;return Math.sqrt(i*i+r*r)};t.prototype.distanceSquare=function(t){var i=this.x-t.x;var r=this.y-t.y;return i*i+r*r};t.prototype.negate=function(){this.x=-this.x;this.y=-this.y;return this};t.prototype.transform=function(t){if(!t){return}var i=this.x;var r=this.y;this.x=t[0]*i+t[2]*r+t[4];this.y=t[1]*i+t[3]*r+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,i,r){t.x=i;t.y=r};t.copy=function(t,i){t.x=i.x;t.y=i.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,i){return t.x*i.x+t.y*i.y};t.add=function(t,i,r){t.x=i.x+r.x;t.y=i.y+r.y};t.sub=function(t,i,r){t.x=i.x-r.x;t.y=i.y-r.y};t.scale=function(t,i,r){t.x=i.x*r;t.y=i.y*r};t.scaleAndAdd=function(t,i,r,e){t.x=i.x+r.x*e;t.y=i.y+r.y*e};t.lerp=function(t,i,r,e){var n=1-e;t.x=n*i.x+e*r.x;t.y=n*i.y+e*r.y};return t}();var dr=vr;var mr=Math.min;var pr=Math.max;var wr=new dr;var gr=new dr;var yr=new dr;var br=new dr;var _r=new dr;var Mr=new dr;var Br=function(){function t(t,i,r,e){if(r<0){t=t+r;r=-r}if(e<0){i=i+e;e=-e}this.x=t;this.y=i;this.width=r;this.height=e}t.prototype.union=function(t){var i=mr(t.x,this.x);var r=mr(t.y,this.y);if(isFinite(this.x)&&isFinite(this.width)){this.width=pr(t.x+t.width,this.x+this.width)-i}else{this.width=t.width}if(isFinite(this.y)&&isFinite(this.height)){this.height=pr(t.y+t.height,this.y+this.height)-r}else{this.height=t.height}this.x=i;this.y=r};t.prototype.applyTransform=function(i){t.applyTransform(this,this,i)};t.prototype.calculateTransform=function(t){var i=this;var r=t.width/i.width;var e=t.height/i.height;var n=ar();Ar(n,n,[-i.x,-i.y]);lr(n,n,[r,e]);Ar(n,n,[t.x,t.y]);return n};t.prototype.intersect=function(i,r){if(!i){return false}if(!(i instanceof t)){i=t.create(i)}var e=this;var n=e.x;var a=e.x+e.width;var s=e.y;var o=e.y+e.height;var u=i.x;var A=i.x+i.width;var f=i.y;var l=i.y+i.height;var h=!(a<u||A<n||o<f||l<s);if(r){var c=Infinity;var v=0;var d=Math.abs(a-u);var m=Math.abs(A-n);var p=Math.abs(o-f);var w=Math.abs(l-s);var g=Math.min(d,m);var y=Math.min(p,w);if(a<u||A<n){if(g>v){v=g;if(d<m){dr.set(Mr,-d,0)}else{dr.set(Mr,m,0)}}}else{if(g<c){c=g;if(d<m){dr.set(_r,d,0)}else{dr.set(_r,-m,0)}}}if(o<f||l<s){if(y>v){v=y;if(p<w){dr.set(Mr,0,-p)}else{dr.set(Mr,0,w)}}}else{if(g<c){c=g;if(p<w){dr.set(_r,0,p)}else{dr.set(_r,0,-w)}}}}if(r){dr.copy(r,h?_r:Mr)}return h};t.prototype.contain=function(t,i){var r=this;return t>=r.x&&t<=r.x+r.width&&i>=r.y&&i<=r.y+r.height};t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)};t.prototype.copy=function(i){t.copy(this,i)};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(i){return new t(i.x,i.y,i.width,i.height)};t.copy=function(t,i){t.x=i.x;t.y=i.y;t.width=i.width;t.height=i.height};t.applyTransform=function(i,r,e){if(!e){if(i!==r){t.copy(i,r)}return}if(e[1]<1e-5&&e[1]>-1e-5&&e[2]<1e-5&&e[2]>-1e-5){var n=e[0];var a=e[3];var s=e[4];var o=e[5];i.x=r.x*n+s;i.y=r.y*a+o;i.width=r.width*n;i.height=r.height*a;if(i.width<0){i.x+=i.width;i.width=-i.width}if(i.height<0){i.y+=i.height;i.height=-i.height}return}wr.x=yr.x=r.x;wr.y=br.y=r.y;gr.x=br.x=r.x+r.width;gr.y=yr.y=r.y+r.height;wr.transform(e);br.transform(e);gr.transform(e);yr.transform(e);i.x=mr(wr.x,gr.x,yr.x,br.x);i.y=mr(wr.y,gr.y,yr.y,br.y);var u=pr(wr.x,gr.x,yr.x,br.x);var A=pr(wr.y,gr.y,yr.y,br.y);i.width=u-i.x;i.height=A-i.y};return t}();var Lr=Br;var kr="silent";function xr(t,i,r){return{type:t,event:r,target:i.target,topTarget:i.topTarget,cancelBubble:false,offsetX:r.zrX,offsetY:r.zrY,gestureEvent:r.gestureEvent,pinchX:r.pinchX,pinchY:r.pinchY,pinchScale:r.pinchScale,wheelDelta:r.zrDelta,zrByTouch:r.zrByTouch,which:r.which,stop:Sr}}function Sr(){$i(this.event)}var Cr=function(t){ai(i,t);function i(){var i=t!==null&&t.apply(this,arguments)||this;i.handler=null;return i}i.prototype.dispose=function(){};i.prototype.setCursor=function(){};return i}(Ci);var Fr=function(){function t(t,i){this.x=t;this.y=i}return t}();var Qr=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"];var Dr=new Lr(0,0,0,0);var Ur=function(t){ai(i,t);function i(i,r,e,n,a){var s=t.call(this)||this;s._hovered=new Fr(0,0);s.storage=i;s.painter=r;s.painterRoot=n;s._pointerSize=a;e=e||new Cr;s.proxy=null;s.setHandlerProxy(e);s._draggingMgr=new xi(s);return s}i.prototype.setHandlerProxy=function(t){if(this.proxy){this.proxy.dispose()}if(t){dt(Qr,(function(i){t.on&&t.on(i,this[i],this)}),this);t.handler=this}this.proxy=t};i.prototype.mousemove=function(t){var i=t.zrX;var r=t.zrY;var e=Hr(this,i,r);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=e?new Fr(i,r):this.findHover(i,r);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)}};i.prototype.mouseout=function(t){var i=t.zrEventControl;if(i!=="only_globalout"){this.dispatchToElement(this._hovered,"mouseout",t)}if(i!=="no_globalout"){this.trigger("globalout",{type:"globalout",event:t})}};i.prototype.resize=function(){this._hovered=new Fr(0,0)};i.prototype.dispatch=function(t,i){var r=this[t];r&&r.call(this,i)};i.prototype.dispose=function(){this.proxy.dispose();this.storage=null;this.proxy=null;this.painter=null};i.prototype.setCursorStyle=function(t){var i=this.proxy;i.setCursor&&i.setCursor(t)};i.prototype.dispatchToElement=function(t,i,r){t=t||{};var e=t.target;if(e&&e.silent){return}var n="on"+i;var a=xr(i,t,r);while(e){e[n]&&(a.cancelBubble=!!e[n].call(e,a));e.trigger(i,a);e=e.__hostTarget?e.__hostTarget:e.parent;if(a.cancelBubble){break}}if(!a.cancelBubble){this.trigger(i,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(i,a)}}))}}};i.prototype.findHover=function(t,i,r){var e=this.storage.getDisplayList();var n=new Fr(t,i);Tr(e,n,t,i,r);if(this._pointerSize&&!n.target){var a=[];var s=this._pointerSize;var o=s/2;var u=new Lr(t-o,i-o,s,s);for(var A=e.length-1;A>=0;A--){var f=e[A];if(f!==r&&!f.ignore&&!f.ignoreCoarsePointer&&(!f.parent||!f.parent.ignoreCoarsePointer)){Dr.copy(f.getBoundingRect());if(f.transform){Dr.applyTransform(f.transform)}if(Dr.intersect(u)){a.push(f)}}}if(a.length){var l=4;var h=Math.PI/12;var c=Math.PI*2;for(var v=0;v<o;v+=l){for(var d=0;d<c;d+=h){var m=t+v*Math.cos(d);var p=i+v*Math.sin(d);Tr(a,n,m,p,r);if(n.target){return n}}}}}return n};i.prototype.processGesture=function(t,i){if(!this._gestureMgr){this._gestureMgr=new ir}var r=this._gestureMgr;i==="start"&&r.clear();var e=r.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);i==="end"&&r.clear();if(e){var n=e.type;t.gestureEvent=n;var a=new Fr;a.target=e.target;this.dispatchToElement(a,n,e.event)}};return i}(Ci);dt(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){Ur.prototype[t]=function(i){var r=i.zrX;var e=i.zrY;var n=Hr(this,r,e);var a;var s;if(t!=="mouseup"||!n){a=this.findHover(r,e);s=a.target}if(t==="mousedown"){this._downEl=s;this._downPoint=[i.zrX,i.zrY];this._upEl=s}else if(t==="mouseup"){this._upEl=s}else if(t==="click"){if(this._downEl!==this._upEl||!this._downPoint||wi(this._downPoint,[i.zrX,i.zrY])>4){return}this._downPoint=null}this.dispatchToElement(a,t,i)}}));function Yr(t,i,r){if(t[t.rectHover?"rectContain":"contain"](i,r)){var e=t;var n=void 0;var a=false;while(e){if(e.ignoreClip){a=true}if(!a){var s=e.getClipPath();if(s&&!s.contain(i,r)){return false}}if(e.silent){n=true}var o=e.__hostTarget;e=o?o:e.parent}return n?kr:true}return false}function Tr(t,i,r,e,n){for(var a=t.length-1;a>=0;a--){var s=t[a];var o=void 0;if(s!==n&&!s.ignore&&(o=Yr(s,r,e))){!i.topTarget&&(i.topTarget=s);if(o!==kr){i.target=s;break}}}}function Hr(t,i,r){var e=t.painter;return i<0||i>e.getWidth()||r<0||r>e.getHeight()}var Nr=Ur;var Ir=32;var Er=7;function Or(t){var i=0;while(t>=Ir){i|=t&1;t>>=1}return t+i}function jr(t,i,r,e){var n=i+1;if(n===r){return 1}if(e(t[n++],t[i])<0){while(n<r&&e(t[n],t[n-1])<0){n++}zr(t,i,n)}else{while(n<r&&e(t[n],t[n-1])>=0){n++}}return n-i}function zr(t,i,r){r--;while(i<r){var e=t[i];t[i++]=t[r];t[r--]=e}}function Pr(t,i,r,e,n){if(e===i){e++}for(;e<r;e++){var a=t[e];var s=i;var o=e;var u;while(s<o){u=s+o>>>1;if(n(a,t[u])<0){o=u}else{s=u+1}}var A=e-s;switch(A){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(A>0){t[s+A]=t[s+A-1];A--}}t[s]=a}}function Rr(t,i,r,e,n,a){var s=0;var o=0;var u=1;if(a(t,i[r+n])>0){o=e-n;while(u<o&&a(t,i[r+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,i[r+n-u])<=0){s=u;u=(u<<1)+1;if(u<=0){u=o}}if(u>o){u=o}var A=s;s=n-u;u=n-A}s++;while(s<u){var f=s+(u-s>>>1);if(a(t,i[r+f])>0){s=f+1}else{u=f}}return u}function Kr(t,i,r,e,n,a){var s=0;var o=0;var u=1;if(a(t,i[r+n])<0){o=n+1;while(u<o&&a(t,i[r+n-u])<0){s=u;u=(u<<1)+1;if(u<=0){u=o}}if(u>o){u=o}var A=s;s=n-u;u=n-A}else{o=e-n;while(u<o&&a(t,i[r+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 f=s+(u-s>>>1);if(a(t,i[r+f])<0){u=f}else{s=f+1}}return u}function Wr(t,i){var r=Er;var e;var n;var a=0;var s=[];e=[];n=[];function o(t,i){e[a]=t;n[a]=i;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}f(t)}}function A(){while(a>1){var t=a-2;if(t>0&&n[t-1]<n[t+1]){t--}f(t)}}function f(r){var s=e[r];var o=n[r];var u=e[r+1];var A=n[r+1];n[r]=o+A;if(r===a-3){e[r+1]=e[r+2];n[r+1]=n[r+2]}a--;var f=Kr(t[u],t,s,o,0,i);s+=f;o-=f;if(o===0){return}A=Rr(t[s+o-1],t,u,A,A-1,i);if(A===0){return}if(o<=A){l(s,o,u,A)}else{h(s,o,u,A)}}function l(e,n,a,o){var u=0;for(u=0;u<n;u++){s[u]=t[e+u]}var A=0;var f=a;var l=e;t[l++]=t[f++];if(--o===0){for(u=0;u<n;u++){t[l+u]=s[A+u]}return}if(n===1){for(u=0;u<o;u++){t[l+u]=t[f+u]}t[l+o]=s[A];return}var h=r;var c;var v;var d;while(1){c=0;v=0;d=false;do{if(i(t[f],s[A])<0){t[l++]=t[f++];v++;c=0;if(--o===0){d=true;break}}else{t[l++]=s[A++];c++;v=0;if(--n===1){d=true;break}}}while((c|v)<h);if(d){break}do{c=Kr(t[f],s,A,n,0,i);if(c!==0){for(u=0;u<c;u++){t[l+u]=s[A+u]}l+=c;A+=c;n-=c;if(n<=1){d=true;break}}t[l++]=t[f++];if(--o===0){d=true;break}v=Rr(s[A],t,f,o,0,i);if(v!==0){for(u=0;u<v;u++){t[l+u]=t[f+u]}l+=v;f+=v;o-=v;if(o===0){d=true;break}}t[l++]=s[A++];if(--n===1){d=true;break}h--}while(c>=Er||v>=Er);if(d){break}if(h<0){h=0}h+=2}r=h;r<1&&(r=1);if(n===1){for(u=0;u<o;u++){t[l+u]=t[f+u]}t[l+o]=s[A]}else if(n===0){throw new Error}else{for(u=0;u<n;u++){t[l+u]=s[A+u]}}}function h(e,n,a,o){var u=0;for(u=0;u<o;u++){s[u]=t[a+u]}var A=e+n-1;var f=o-1;var l=a+o-1;var h=0;var c=0;t[l--]=t[A--];if(--n===0){h=l-(o-1);for(u=0;u<o;u++){t[h+u]=s[u]}return}if(o===1){l-=n;A-=n;c=l+1;h=A+1;for(u=n-1;u>=0;u--){t[c+u]=t[h+u]}t[l]=s[f];return}var v=r;while(true){var d=0;var m=0;var p=false;do{if(i(s[f],t[A])<0){t[l--]=t[A--];d++;m=0;if(--n===0){p=true;break}}else{t[l--]=s[f--];m++;d=0;if(--o===1){p=true;break}}}while((d|m)<v);if(p){break}do{d=n-Kr(s[f],t,e,n,n-1,i);if(d!==0){l-=d;A-=d;n-=d;c=l+1;h=A+1;for(u=d-1;u>=0;u--){t[c+u]=t[h+u]}if(n===0){p=true;break}}t[l--]=s[f--];if(--o===1){p=true;break}m=o-Rr(t[A],s,0,o,o-1,i);if(m!==0){l-=m;f-=m;o-=m;c=l+1;h=f+1;for(u=0;u<m;u++){t[c+u]=s[h+u]}if(o<=1){p=true;break}}t[l--]=t[A--];if(--n===0){p=true;break}v--}while(d>=Er||m>=Er);if(p){break}if(v<0){v=0}v+=2}r=v;if(r<1){r=1}if(o===1){l-=n;A-=n;c=l+1;h=A+1;for(u=n-1;u>=0;u--){t[c+u]=t[h+u]}t[l]=s[f]}else if(o===0){throw new Error}else{h=l-(o-1);for(u=0;u<o;u++){t[h+u]=s[u]}}}return{mergeRuns:u,forceMergeRuns:A,pushRun:o}}function Vr(t,i,r,e){if(!r){r=0}if(!e){e=t.length}var n=e-r;if(n<2){return}var a=0;if(n<Ir){a=jr(t,r,e,i);Pr(t,r,e,r+a,i);return}var s=Wr(t,i);var o=Or(n);do{a=jr(t,r,e,i);if(a<o){var u=n;if(u>o){u=o}Pr(t,r,r+u,r+a,i);a=u}s.pushRun(r,a);s.mergeRuns();n-=a;r+=a}while(n!==0);s.forceMergeRuns()}var Gr=1;var qr=2;var Jr=4;var Xr=false;function Zr(){if(Xr){return}Xr=true;console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors")}function $r(t,i){if(t.zlevel===i.zlevel){if(t.z===i.z){return t.z2-i.z2}return t.z-i.z}return t.zlevel-i.zlevel}var te=function(){function t(){this._roots=[];this._displayList=[];this._displayListLen=0;this.displayableSortFunc=$r}t.prototype.traverse=function(t,i){for(var r=0;r<this._roots.length;r++){this._roots[r].traverse(t,i)}};t.prototype.getDisplayList=function(t,i){i=i||false;var r=this._displayList;if(t||!r.length){this.updateDisplayList(i)}return r};t.prototype.updateDisplayList=function(t){this._displayListLen=0;var i=this._roots;var r=this._displayList;for(var e=0,n=i.length;e<n;e++){this._updateAndAddDisplayable(i[e],null,t)}r.length=this._displayListLen;Vr(r,$r)};t.prototype._updateAndAddDisplayable=function(t,i,r){if(t.ignore&&!r){return}t.beforeUpdate();t.update();t.afterUpdate();var e=t.getClipPath();if(t.ignoreClip){i=null}else if(e){if(i){i=i.slice()}else{i=[]}var n=e;var a=t;while(n){n.parent=a;n.updateTransform();i.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|=Gr}this._updateAndAddDisplayable(u,i,r)}t.__dirty=0}else{var A=t;if(i&&i.length){A.__clipPaths=i}else if(A.__clipPaths&&A.__clipPaths.length>0){A.__clipPaths=[]}if(isNaN(A.z)){Zr();A.z=0}if(isNaN(A.z2)){Zr();A.z2=0}if(isNaN(A.zlevel)){Zr();A.zlevel=0}this._displayList[this._displayListLen++]=A}var f=t.getDecalElement&&t.getDecalElement();if(f){this._updateAndAddDisplayable(f,i,r)}var l=t.getTextGuideLine();if(l){this._updateAndAddDisplayable(l,i,r)}var h=t.getTextContent();if(h){this._updateAndAddDisplayable(h,i,r)}};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 i=0,r=t.length;i<r;i++){this.delRoot(t[i])}return}var e=lt(this._roots,t);if(e>=0){this._roots.splice(e,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 ie=te;var re;re=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 ee=re;var ne={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 i;var r=.1;var e=.4;if(t===0){return 0}if(t===1){return 1}if(!r||r<1){r=1;i=e/4}else{i=e*Math.asin(1/r)/(2*Math.PI)}return-(r*Math.pow(2,10*(t-=1))*Math.sin((t-i)*(2*Math.PI)/e))},elasticOut:function(t){var i;var r=.1;var e=.4;if(t===0){return 0}if(t===1){return 1}if(!r||r<1){r=1;i=e/4}else{i=e*Math.asin(1/r)/(2*Math.PI)}return r*Math.pow(2,-10*t)*Math.sin((t-i)*(2*Math.PI)/e)+1},elasticInOut:function(t){var i;var r=.1;var e=.4;if(t===0){return 0}if(t===1){return 1}if(!r||r<1){r=1;i=e/4}else{i=e*Math.asin(1/r)/(2*Math.PI)}if((t*=2)<1){return-.5*(r*Math.pow(2,10*(t-=1))*Math.sin((t-i)*(2*Math.PI)/e))}return r*Math.pow(2,-10*(t-=1))*Math.sin((t-i)*(2*Math.PI)/e)*.5+1},backIn:function(t){var i=1.70158;return t*t*((i+1)*t-i)},backOut:function(t){var i=1.70158;return--t*t*((i+1)*t+i)+1},backInOut:function(t){var i=1.70158*1.525;if((t*=2)<1){return.5*(t*t*((i+1)*t-i))}return.5*((t-=2)*t*((i+1)*t+i)+2)},bounceIn:function(t){return 1-ne.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 ne.bounceIn(t*2)*.5}return ne.bounceOut(t*2-1)*.5+.5}};var ae=ne;var se=Math.pow;var oe=Math.sqrt;var ue=1e-8;var Ae=1e-4;var fe=oe(3);var le=1/3;var he=si();var ce=si();var ve=si();function de(t){return t>-ue&&t<ue}function me(t){return t>ue||t<-ue}function pe(t,i,r,e,n){var a=1-n;return a*a*(a*t+3*n*i)+n*n*(n*e+3*a*r)}function we(t,i,r,e,n){var a=1-n;return 3*(((i-t)*a+2*(r-i)*n)*a+(e-r)*n*n)}function ge(t,i,r,e,n,a){var s=e+3*(i-r)-t;var o=3*(r-i*2+t);var u=3*(i-t);var A=t-n;var f=o*o-3*s*u;var l=o*u-9*s*A;var h=u*u-3*o*A;var c=0;if(de(f)&&de(l)){if(de(o)){a[0]=0}else{var v=-u/o;if(v>=0&&v<=1){a[c++]=v}}}else{var d=l*l-4*f*h;if(de(d)){var m=l/f;var v=-o/s+m;var p=-m/2;if(v>=0&&v<=1){a[c++]=v}if(p>=0&&p<=1){a[c++]=p}}else if(d>0){var w=oe(d);var g=f*o+1.5*s*(-l+w);var y=f*o+1.5*s*(-l-w);if(g<0){g=-se(-g,le)}else{g=se(g,le)}if(y<0){y=-se(-y,le)}else{y=se(y,le)}var v=(-o-(g+y))/(3*s);if(v>=0&&v<=1){a[c++]=v}}else{var b=(2*f*o-3*s*l)/(2*oe(f*f*f));var _=Math.acos(b)/3;var M=oe(f);var B=Math.cos(_);var v=(-o-2*M*B)/(3*s);var p=(-o+M*(B+fe*Math.sin(_)))/(3*s);var L=(-o+M*(B-fe*Math.sin(_)))/(3*s);if(v>=0&&v<=1){a[c++]=v}if(p>=0&&p<=1){a[c++]=p}if(L>=0&&L<=1){a[c++]=L}}}return c}function ye(t,i,r,e,n){var a=6*r-12*i+6*t;var s=9*i+3*e-3*t-9*r;var o=3*i-3*t;var u=0;if(de(s)){if(me(a)){var A=-o/a;if(A>=0&&A<=1){n[u++]=A}}}else{var f=a*a-4*s*o;if(de(f)){n[0]=-a/(2*s)}else if(f>0){var l=oe(f);var A=(-a+l)/(2*s);var h=(-a-l)/(2*s);if(A>=0&&A<=1){n[u++]=A}if(h>=0&&h<=1){n[u++]=h}}}return u}function be(t,i,r,e,n,a){var s=(i-t)*n+t;var o=(r-i)*n+i;var u=(e-r)*n+r;var A=(o-s)*n+s;var f=(u-o)*n+o;var l=(f-A)*n+A;a[0]=t;a[1]=s;a[2]=A;a[3]=l;a[4]=l;a[5]=f;a[6]=u;a[7]=e}function _e(t,i,r,e,n,a,s,o,u,A,f){var l;var h=.005;var c=Infinity;var v;var d;var m;var p;he[0]=u;he[1]=A;for(var w=0;w<1;w+=.05){ce[0]=pe(t,r,n,s,w);ce[1]=pe(i,e,a,o,w);m=yi(he,ce);if(m<c){l=w;c=m}}c=Infinity;for(var g=0;g<32;g++){if(h<Ae){break}v=l-h;d=l+h;ce[0]=pe(t,r,n,s,v);ce[1]=pe(i,e,a,o,v);m=yi(ce,he);if(v>=0&&m<c){l=v;c=m}else{ve[0]=pe(t,r,n,s,d);ve[1]=pe(i,e,a,o,d);p=yi(ve,he);if(d<=1&&p<c){l=d;c=p}else{h*=.5}}}if(f){f[0]=pe(t,r,n,s,l);f[1]=pe(i,e,a,o,l)}return oe(c)}function Me(t,i,r,e,n,a,s,o,u){var A=t;var f=i;var l=0;var h=1/u;for(var c=1;c<=u;c++){var v=c*h;var d=pe(t,r,n,s,v);var m=pe(i,e,a,o,v);var p=d-A;var w=m-f;l+=Math.sqrt(p*p+w*w);A=d;f=m}return l}function Be(t,i,r,e){var n=1-e;return n*(n*t+2*e*i)+e*e*r}function Le(t,i,r,e){return 2*((1-e)*(i-t)+e*(r-i))}function ke(t,i,r,e,n){var a=t-2*i+r;var s=2*(i-t);var o=t-e;var u=0;if(de(a)){if(me(s)){var A=-o/s;if(A>=0&&A<=1){n[u++]=A}}}else{var f=s*s-4*a*o;if(de(f)){var A=-s/(2*a);if(A>=0&&A<=1){n[u++]=A}}else if(f>0){var l=oe(f);var A=(-s+l)/(2*a);var h=(-s-l)/(2*a);if(A>=0&&A<=1){n[u++]=A}if(h>=0&&h<=1){n[u++]=h}}}return u}function xe(t,i,r){var e=t+r-2*i;if(e===0){return.5}else{return(t-i)/e}}function Se(t,i,r,e,n){var a=(i-t)*e+t;var s=(r-i)*e+i;var o=(s-a)*e+a;n[0]=t;n[1]=a;n[2]=o;n[3]=o;n[4]=s;n[5]=r}function Ce(t,i,r,e,n,a,s,o,u){var A;var f=.005;var l=Infinity;he[0]=s;he[1]=o;for(var h=0;h<1;h+=.05){ce[0]=Be(t,r,n,h);ce[1]=Be(i,e,a,h);var c=yi(he,ce);if(c<l){A=h;l=c}}l=Infinity;for(var v=0;v<32;v++){if(f<Ae){break}var d=A-f;var m=A+f;ce[0]=Be(t,r,n,d);ce[1]=Be(i,e,a,d);var c=yi(ce,he);if(d>=0&&c<l){A=d;l=c}else{ve[0]=Be(t,r,n,m);ve[1]=Be(i,e,a,m);var p=yi(ve,he);if(m<=1&&p<l){A=m;l=p}else{f*=.5}}}if(u){u[0]=Be(t,r,n,A);u[1]=Be(i,e,a,A)}return oe(l)}function Fe(t,i,r,e,n,a,s){var o=t;var u=i;var A=0;var f=1/s;for(var l=1;l<=s;l++){var h=l*f;var c=Be(t,r,n,h);var v=Be(i,e,a,h);var d=c-o;var m=v-u;A+=Math.sqrt(d*d+m*m);o=c;u=v}return A}var Qe=/cubic-bezier\(([0-9,\.e ]+)\)/;function De(t){var i=t&&Qe.exec(t);if(i){var r=i[1].split(",");var e=+Pt(r[0]);var n=+Pt(r[1]);var a=+Pt(r[2]);var s=+Pt(r[3]);if(isNaN(e+n+a+s)){return}var o=[];return function(t){return t<=0?0:t>=1?1:ge(0,e,a,1,t,o)&&pe(0,n,s,1,o[0])}}}var Ue=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||ri;this.ondestroy=t.ondestroy||ri;this.onrestart=t.onrestart||ri;t.easing&&this.setEasing(t.easing)}t.prototype.step=function(t,i){if(!this._inited){this._startTime=t+this._delay;this._inited=true}if(this._paused){this._pausedTime+=i;return}var r=this._life;var e=t-this._startTime-this._pausedTime;var n=e/r;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=e%r;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=Lt(t)?t:ae[t]||De(t)};return t}();var Ye=Ue;var Te=function(){function t(t){this.value=t}return t}();var He=function(){function t(){this._len=0}t.prototype.insert=function(t){var i=new Te(t);this.insertEntry(i);return i};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 i=t.prev;var r=t.next;if(i){i.next=r}else{this.head=r}if(r){r.prev=i}else{this.tail=i}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 Ne=function(){function t(t){this._list=new He;this._maxSize=10;this._map={};this._maxSize=t}t.prototype.put=function(t,i){var r=this._list;var e=this._map;var n=null;if(e[t]==null){var a=r.len();var s=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var o=r.head;r.remove(o);delete e[o.key];n=o.value;this._lastRemovedEntry=o}if(s){s.value=i}else{s=new Te(i)}s.key=t;r.insertEntry(s);e[t]=s}return n};t.prototype.get=function(t){var i=this._map[t];var r=this._list;if(i!=null){if(i!==r.tail){r.remove(i);r.insertEntry(i)}return i.value}};t.prototype.clear=function(){this._list.clear();this._map={}};t.prototype.len=function(){return this._list.len()};return t}();var Ie=Ne;var Ee={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]