=0&&(l=1),1-s/(a-1)-n+l}(h,r,c,y,v,A),C=1-.5*(Math.pow(e-v,2)+Math.pow(t-y,2))/Math.pow(.1*(e-t),2),m=function(t,e,n,i,r,o){var a=(t-1)/(o-r),s=(e-1)/(Math.max(o,i)-Math.min(n,r));return 2-Math.max(a/s,s/a)}(T,a,t,e,y,v),L=o[0]*N+o[1]*C+o[2]*m+1*o[3];L>u.score&&(!i||y<=t&&v>=e)&&(u.lmin=y,u.lmax=v,u.lstep=A,u.score=L)}d+=1}T+=1}}c+=1}var _=eQ(u.lmax),x=eQ(u.lmin),M=eQ(u.lstep),P=Math.floor(Math.round(1e12*((_-x)/M))/1e12)+1,D=Array(P);D[0]=eQ(x);for(var E=1;E>>1;t[a][1]>e?o=a:r=a+1}return r}(e_,(n-e)/(a=o))-1,l=e_[s],s<0?l=e_[0]:s>=e_.length&&(l=(0,td.Z$)(e_)),l)[1];var a,s,l,u=(n-e)/r/o;u>1&&(r*=Math.ceil(u)),i&&r31536e6)for(var l,u=e5(n),c=Math.ceil(o/31536e6),E=s;E<=u+c;E+=c)a.push((l=E,new Date(l,0,1).getTime()));else if(o>26784e5)for(var h,p,T,f,d=Math.ceil(o/26784e5),A=e6(e),S=(h=e5(e),p=e5(n),T=e6(e),(p-h)*12+(e6(n)-T)%12),E=0;E<=S+d;E+=d)a.push((f=E+A,new Date(s,f,1).getTime()));else if(o>864e5)for(var R=new Date(e),g=R.getFullYear(),I=R.getMonth(),O=R.getDate(),y=Math.ceil(o/864e5),v=Math.ceil((n-e)/864e5),E=0;E36e5)for(var R=new Date(e),g=R.getFullYear(),I=R.getMonth(),y=R.getDate(),N=R.getHours(),C=Math.ceil(o/36e5),m=Math.ceil((n-e)/36e5),E=0;E<=m+C;E+=C)a.push(new Date(g,I,y,N+E).getTime());else if(o>6e4)for(var L=Math.ceil((n-e)/6e4),_=Math.ceil(o/6e4),E=0;E<=L+_;E+=_)a.push(e+6e4*E);else{var x=o;x<1e3&&(x=1e3);for(var M=1e3*Math.floor(e/1e3),P=Math.ceil((n-e)/1e3),D=Math.ceil(x/1e3),E=0;E=512&&console.warn("Notice: current ticks length("+a.length+') >= 512, may cause performance issues, even out of memory. Because of the configure "tickInterval"(in milliseconds, current is '+o+") is too small, increase the value to solve the problem!"),a},t3.log=function(t){var e,n=t.base,i=t.tickCount,r=t.min,o=t.max,a=t.values,s=eU(n,o);if(r>0)e=Math.floor(eU(n,r));else{var l=eb(a,n,o);e=Math.floor(eU(n,l))}for(var u=Math.ceil((s-e)/i),c=[],E=e;E=0?1:-1)})},t3.quantile=function(t){var e=t.tickCount,n=t.values;if(!n||!n.length)return[];for(var i=n.slice().sort(function(t,e){return t-e}),r=[],o=0;o=0&&this.radius<=1&&(n*=this.radius),this.d=Math.floor(n*(1-this.innerRadius)/e),this.a=this.d/(2*Math.PI),this.x={start:this.startAngle,end:this.endAngle},this.y={start:this.innerRadius*n,end:this.innerRadius*n+.99*this.d}},e.prototype.convertPoint=function(t){var e,n=t.x,i=t.y;this.isTransposed&&(n=(e=[i,n])[0],i=e[1]);var r=this.convertDim(n,"x"),o=this.a*r,a=this.convertDim(i,"y");return{x:this.center.x+Math.cos(r)*(o+a),y:this.center.y+Math.sin(r)*(o+a)}},e.prototype.invertPoint=function(t){var e,n=this.d+this.y.start,i=nr.$X([0,0],[t.x,t.y],[this.center.x,this.center.y]),r=ne.Dg(i,[1,0],!0),o=r*this.a;nr.kE(i)this.width/i?(e=this.width/i,this.circleCenter={x:this.center.x-(.5-o)*this.width,y:this.center.y-(.5-a)*e*r}):(e=this.height/r,this.circleCenter={x:this.center.x-(.5-o)*e*i,y:this.center.y-(.5-a)*this.height}),this.polarRadius=this.radius,this.radius?this.radius>0&&this.radius<=1?this.polarRadius=e*this.radius:(this.radius<=0||this.radius>e)&&(this.polarRadius=e):this.polarRadius=e,this.x={start:this.startAngle,end:this.endAngle},this.y={start:this.innerRadius*this.polarRadius,end:this.polarRadius}},e.prototype.getRadius=function(){return this.polarRadius},e.prototype.convertPoint=function(t){var e,n=this.getCenter(),i=t.x,r=t.y;return this.isTransposed&&(i=(e=[r,i])[0],r=e[1]),i=this.convertDim(i,"x"),r=this.convertDim(r,"y"),{x:n.x+Math.cos(i)*r,y:n.y+Math.sin(i)*r}},e.prototype.invertPoint=function(t){var e,n=this.getCenter(),i=[t.x-n.x,t.y-n.y],r=this.startAngle,o=this.endAngle;this.isReflect("x")&&(r=(e=[o,r])[0],o=e[1]);var a=[1,0,0,0,1,0,0,0,1];ne.zu(a,a,r);var s=[1,0,0];e7(s,s,a);var l=[s[0],s[1]],u=ne.Dg(l,i,o0?E:-E;var h=this.invertDim(c,"y"),p={x:0,y:0};return p.x=this.isTransposed?h:E,p.y=this.isTransposed?E:h,p},e.prototype.getCenter=function(){return this.circleCenter},e.prototype.getOneBox=function(){var t=this.startAngle,e=this.endAngle;if(Math.abs(e-t)>=2*Math.PI)return{minX:-1,maxX:1,minY:-1,maxY:1};for(var n=[0,Math.cos(t),Math.cos(e)],i=[0,Math.sin(t),Math.sin(e)],r=Math.min(t,e);r=0;i--)t.removeChild(e[i])}function nS(t){var e=t.start,n=t.end,i=Math.min(e.x,n.x),r=Math.min(e.y,n.y),o=Math.max(e.x,n.x),a=Math.max(e.y,n.y);return{x:i,y:r,minX:i,minY:r,maxX:o,maxY:a,width:o-i,height:a-r}}function nR(t,e,n,i){var r=t+n,o=e+i;return{x:t,y:e,width:n,height:i,minX:t,minY:e,maxX:isNaN(r)?0:r,maxY:isNaN(o)?0:o}}function ng(t,e,n){return{x:t.x+Math.cos(n)*e,y:t.y+Math.sin(n)*e}}var nI=function(t,e,n){return void 0===n&&(n=Math.pow(Number.EPSILON,.5)),[t,e].includes(1/0)?Math.abs(t)===Math.abs(e):Math.abs(t-e)0?(0,td.S6)(h,function(e){if(e.get("visible")){if(e.isGroup()&&0===e.get("children").length)return!0;var n=t(e),i=e.applyToMatrix([n.minX,n.minY,1]),r=e.applyToMatrix([n.minX,n.maxY,1]),o=e.applyToMatrix([n.maxX,n.minY,1]),a=e.applyToMatrix([n.maxX,n.maxY,1]),s=Math.min(i[0],r[0],o[0],a[0]),h=Math.max(i[0],r[0],o[0],a[0]),p=Math.min(i[1],r[1],o[1],a[1]),T=Math.max(i[1],r[1],o[1],a[1]);su&&(u=h),pE&&(E=T)}}):(l=0,u=0,c=0,E=0),o=nR(l,c,u-l,E-c)}else o=e.getBBox();return s?nR(i=Math.max((n=o).minX,s.minX),r=Math.max(n.minY,s.minY),Math.min(n.maxX,s.maxX)-i,Math.min(n.maxY,s.maxY)-r):o}(t)),t},e.prototype.addGroup=function(t,e){this.appendDelegateObject(t,e);var n=t.addGroup(e);return this.get("isRegister")&&this.registerElement(n),n},e.prototype.addShape=function(t,e){this.appendDelegateObject(t,e);var n=t.addShape(e);return this.get("isRegister")&&this.registerElement(n),n},e.prototype.addComponent=function(t,e){var n=e.id,i=e.component,r=(0,tf._T)(e,["id","component"]),o=new i((0,tf.pi)((0,tf.pi)({},r),{id:n,container:t,updateAutoRender:this.get("updateAutoRender")}));return o.init(),o.render(),this.get("isRegister")&&this.registerElement(o.get("group")),o},e.prototype.initEvent=function(){},e.prototype.removeEvent=function(){this.get("group").off()},e.prototype.getElementId=function(t){return this.get("id")+"-"+this.get("name")+"-"+t},e.prototype.registerElement=function(t){var e=t.get("id");this.get("shapesMap")[e]=t},e.prototype.unregisterElement=function(t){var e=t.get("id");delete this.get("shapesMap")[e]},e.prototype.moveElementTo=function(t,e){var n=nh(e);t.attr("matrix",n)},e.prototype.addAnimation=function(t,e,n){var i=e.attr("opacity");(0,td.UM)(i)&&(i=1),e.attr("opacity",0),e.animate({opacity:i},n)},e.prototype.removeAnimation=function(t,e,n){e.animate({opacity:0},n)},e.prototype.updateAnimation=function(t,e,n,i){e.animate(n,i)},e.prototype.updateElements=function(t,e){var n,i=this,r=this.get("animate"),o=this.get("animateOption"),a=t.getChildren().slice(0);(0,td.S6)(a,function(t){var a=t.get("id"),s=i.getElementById(a),l=t.get("name");if(s){if(t.get("isComponent")){var u=t.get("component"),c=s.get("component"),E=(0,td.ei)(u.cfg,(0,td.e5)((0,td.XP)(u.cfg),nL));c.update(E),s.set(nC,"update")}else{var h=i.getReplaceAttrs(s,t);r&&o.update?i.updateAnimation(l,s,h,o.update):s.attr(h),t.isGroup()&&i.updateElements(t,s),(0,td.S6)(nm,function(e){s.set(e,t.get(e))}),function(t,e){if(t.getClip()||e.getClip()){var n=e.getClip();if(!n){t.setClip(null);return}var i={type:n.get("type"),attrs:n.attr()};t.setClip(i)}}(s,t),n=s,s.set(nC,"update")}}else{e.add(t);var p=e.getChildren();if(p.splice(p.length-1,1),n){var T=p.indexOf(n);p.splice(T+1,0,t)}else p.unshift(t);if(i.registerElement(t),t.set(nC,"add"),t.get("isComponent")){var u=t.get("component");u.set("container",e)}else t.isGroup()&&i.registerNewGroup(t);if(n=t,r){var f=i.get("isInit")?o.appear:o.enter;f&&i.addAnimation(l,t,f)}}})},e.prototype.clearUpdateStatus=function(t){var e=t.getChildren();(0,td.S6)(e,function(t){t.set(nC,null)})},e.prototype.clearOffScreenCache=function(){var t=this.get("offScreenGroup");t&&t.destroy(),this.set("offScreenGroup",null),this.set("offScreenBBox",null)},e.prototype.getDelegateObject=function(){var t,e=this.get("name");return(t={})[e]=this,t.component=this,t},e.prototype.appendDelegateObject=function(t,e){var n=t.get("delegateObject");e.delegateObject||(e.delegateObject={}),(0,td.CD)(e.delegateObject,n)},e.prototype.getReplaceAttrs=function(t,e){var n=t.attr(),i=e.attr();return(0,td.S6)(n,function(t,e){void 0===i[e]&&(i[e]=void 0)}),i},e.prototype.registerNewGroup=function(t){var e=this,n=t.getChildren();(0,td.S6)(n,function(t){e.registerElement(t),t.set(nC,"add"),t.isGroup()&&e.registerNewGroup(t)})},e.prototype.deleteElements=function(){var t=this,e=this.get("shapesMap"),n=[];(0,td.S6)(e,function(t,e){!t.get(nC)||t.destroyed?n.push([e,t]):t.set(nC,null)});var i=this.get("animate"),r=this.get("animateOption");(0,td.S6)(n,function(n){var o=n[0],a=n[1];if(!a.destroyed){var s=a.get("name");if(i&&r.leave){var l=(0,td.CD)({callback:function(){t.removeElement(a)}},r.leave);t.removeAnimation(s,a,l)}else t.removeElement(a)}delete e[o]})},e.prototype.removeElement=function(t){if(t.get("isGroup")){var e=t.get("component");e&&e.destroy()}t.remove()},e}(nN);function nx(t,e){return t.charCodeAt(e)>0&&128>t.charCodeAt(e)?1:2}function nM(t){if(t.length>400)return function(t){for(var e=t.map(function(t){var e=t.attr("text");return(0,td.UM)(e)?"":""+e}),n=0,i=0,r=0;r=19968&&s<=40869?o+=2:o+=1}o>n&&(n=o,i=r)}return t[i].getBBox().width}(t);var e=0;return(0,td.S6)(t,function(t){var n=t.getBBox().width;e=0?function(t,e,n){void 0===n&&(n="tail");var i=t.length,r="";if("tail"===n){for(var o=0,a=0;o1||i<0)&&(i=1),{x:(r=t.x,o=e.x,(1-(a=i))*r+o*a),y:(s=t.y,l=e.y,(1-(u=i))*s+l*u)}},e.prototype.renderLabel=function(t){var e=this.get("text"),n=this.get("start"),i=this.get("end"),r=e.position,o=e.content,a=e.style,s=e.offsetX,l=e.offsetY,u=e.autoRotate,c=e.maxLength,E=e.autoEllipsis,h=e.ellipsisPosition,p=e.background,T=e.isVertical,f=this.getLabelPoint(n,i,r),d=f.x+s,A=f.y+l,S={id:this.getElementId("line-text"),name:"annotation-line-text",x:d,y:A,content:o,style:a,maxLength:c,autoEllipsis:E,ellipsisPosition:h,background:p,isVertical:void 0!==T&&T};if(u){var R=[i.x-n.x,i.y-n.y];S.rotate=Math.atan2(R[1],R[0])}nD(t,S)},e}(n_),nF=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,tf.pi)((0,tf.pi)({},e),{name:"annotation",type:"text",locationType:"point",x:0,y:0,content:"",rotate:null,style:{},background:null,maxLength:null,autoEllipsis:!0,isVertical:!1,ellipsisPosition:"tail",defaultCfg:{style:{fill:nU.textColor,fontSize:12,textAlign:"center",textBaseline:"middle",fontFamily:nU.fontFamily}}})},e.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetLocation()},e.prototype.renderInner=function(t){var e=this.getLocation(),n=e.x,i=e.y,r=this.get("content"),o=this.get("style");nD(t,{id:this.getElementId("text"),name:this.get("name")+"-text",x:n,y:i,content:r,style:o,maxLength:this.get("maxLength"),autoEllipsis:this.get("autoEllipsis"),isVertical:this.get("isVertical"),ellipsisPosition:this.get("ellipsisPosition"),background:this.get("background"),rotate:this.get("rotate")})},e.prototype.resetLocation=function(){var t=this.getElementByLocalId("text-group");if(t){var e=this.getLocation(),n=e.x,i=e.y,r=this.get("rotate");nf(t,n,i),nT(t,r,n,i)}},e}(n_),nB=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,tf.pi)((0,tf.pi)({},e),{name:"annotation",type:"arc",locationType:"circle",center:null,radius:100,startAngle:-Math.PI/2,endAngle:3*Math.PI/2,style:{stroke:"#999",lineWidth:1}})},e.prototype.renderInner=function(t){this.renderArc(t)},e.prototype.getArcPath=function(){var t=this.getLocation(),e=t.center,n=t.radius,i=t.startAngle,r=t.endAngle,o=ng(e,n,i),a=ng(e,n,r),s=r-i>Math.PI?1:0,l=[["M",o.x,o.y]];if(r-i==2*Math.PI){var u=ng(e,n,i+Math.PI);l.push(["A",n,n,0,s,1,u.x,u.y]),l.push(["A",n,n,0,s,1,a.x,a.y])}else l.push(["A",n,n,0,s,1,a.x,a.y]);return l},e.prototype.renderArc=function(t){var e=this.getArcPath(),n=this.get("style");this.addShape(t,{type:"path",id:this.getElementId("arc"),name:"annotation-arc",attrs:(0,tf.pi)({path:e},n)})},e}(n_),nG=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,tf.pi)((0,tf.pi)({},e),{name:"annotation",type:"region",locationType:"region",start:null,end:null,style:{},defaultCfg:{style:{lineWidth:0,fill:nU.regionColor,opacity:.4}}})},e.prototype.renderInner=function(t){this.renderRegion(t)},e.prototype.renderRegion=function(t){var e=this.get("start"),n=this.get("end"),i=this.get("style"),r=nS({start:e,end:n});this.addShape(t,{type:"rect",id:this.getElementId("region"),name:"annotation-region",attrs:(0,tf.pi)({x:r.x,y:r.y,width:r.width,height:r.height},i)})},e}(n_),nw=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,tf.pi)((0,tf.pi)({},e),{name:"annotation",type:"image",locationType:"region",start:null,end:null,src:null,style:{}})},e.prototype.renderInner=function(t){this.renderImage(t)},e.prototype.getImageAttrs=function(){var t=this.get("start"),e=this.get("end"),n=this.get("style"),i=nS({start:t,end:e}),r=this.get("src");return(0,tf.pi)({x:i.x,y:i.y,img:r,width:i.width,height:i.height},n)},e.prototype.renderImage=function(t){this.addShape(t,{type:"image",id:this.getElementId("image"),name:"annotation-image",attrs:this.getImageAttrs()})},e}(n_),nH=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,tf.pi)((0,tf.pi)({},e),{name:"annotation",type:"dataMarker",locationType:"point",x:0,y:0,point:{},line:{},text:{},direction:"upward",autoAdjust:!0,coordinateBBox:null,defaultCfg:{point:{display:!0,style:{r:3,fill:"#FFFFFF",stroke:"#1890FF",lineWidth:2}},line:{display:!0,length:20,style:{stroke:nU.lineColor,lineWidth:1}},text:{content:"",display:!0,style:{fill:nU.textColor,opacity:.65,fontSize:12,textAlign:"start",fontFamily:nU.fontFamily}}}})},e.prototype.renderInner=function(t){(0,td.U2)(this.get("line"),"display")&&this.renderLine(t),(0,td.U2)(this.get("text"),"display")&&this.renderText(t),(0,td.U2)(this.get("point"),"display")&&this.renderPoint(t),this.get("autoAdjust")&&this.autoAdjust(t)},e.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x")+this.get("offsetX"),y:this.get("y")+this.get("offsetY")})},e.prototype.renderPoint=function(t){var e=this.getShapeAttrs().point;this.addShape(t,{type:"circle",id:this.getElementId("point"),name:"annotation-point",attrs:e})},e.prototype.renderLine=function(t){var e=this.getShapeAttrs().line;this.addShape(t,{type:"path",id:this.getElementId("line"),name:"annotation-line",attrs:e})},e.prototype.renderText=function(t){var e=this.getShapeAttrs().text,n=e.x,i=e.y,r=e.text,o=(0,tf._T)(e,["x","y","text"]),a=this.get("text"),s=a.background,l=a.maxLength,u=a.autoEllipsis,c=a.isVertival,E=a.ellipsisPosition;nD(t,{x:n,y:i,id:this.getElementId("text"),name:"annotation-text",content:r,style:o,background:s,maxLength:l,autoEllipsis:u,isVertival:c,ellipsisPosition:E})},e.prototype.autoAdjust=function(t){var e=this.get("direction"),n=this.get("x"),i=this.get("y"),r=(0,td.U2)(this.get("line"),"length",0),o=this.get("coordinateBBox"),a=t.getBBox(),s=a.minX,l=a.maxX,u=a.minY,c=a.maxY,E=t.findById(this.getElementId("text-group")),h=t.findById(this.getElementId("text")),p=t.findById(this.getElementId("line"));if(o&&E){var T=E.attr("x"),f=E.attr("y"),d=h.getCanvasBBox(),A=d.width,S=d.height,R=0,g=0;if(n+s<=o.minX){if("leftward"===e)R=1;else{var I=o.minX-(n+s);T=E.attr("x")+I}}else if(n+l>=o.maxX){if("rightward"===e)R=-1;else{var I=n+l-o.maxX;T=E.attr("x")-I}}if(R&&(p&&p.attr("path",[["M",0,0],["L",r*R,0]]),T=(r+2+A)*R),i+u<=o.minY){if("upward"===e)g=1;else{var I=o.minY-(i+u);f=E.attr("y")+I}}else if(i+c>=o.maxY){if("downward"===e)g=-1;else{var I=i+c-o.maxY;f=E.attr("y")-I}}g&&(p&&p.attr("path",[["M",0,0],["L",0,r*g]]),f=(r+2+S)*g),(T!==E.attr("x")||f!==E.attr("y"))&&nf(E,T,f)}},e.prototype.getShapeAttrs=function(){var t=(0,td.U2)(this.get("line"),"display"),e=(0,td.U2)(this.get("point"),"style",{}),n=(0,td.U2)(this.get("line"),"style",{}),i=(0,td.U2)(this.get("text"),"style",{}),r=this.get("direction"),o=t?(0,td.U2)(this.get("line"),"length",0):0,a=0,s=0,l="top",u="start";switch(r){case"upward":s=-1,l="bottom";break;case"downward":s=1,l="top";break;case"leftward":a=-1,u="end";break;case"rightward":a=1,u="start"}return{point:(0,tf.pi)({x:0,y:0},e),line:(0,tf.pi)({path:[["M",0,0],["L",o*a,o*s]]},n),text:(0,tf.pi)({x:(o+2)*a,y:(o+2)*s,text:(0,td.U2)(this.get("text"),"content",""),textBaseline:l,textAlign:u},i)}},e}(n_),nY=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,tf.pi)((0,tf.pi)({},e),{name:"annotation",type:"dataRegion",locationType:"points",points:[],lineLength:0,region:{},text:{},defaultCfg:{region:{style:{lineWidth:0,fill:nU.regionColor,opacity:.4}},text:{content:"",style:{textAlign:"center",textBaseline:"bottom",fontSize:12,fill:nU.textColor,fontFamily:nU.fontFamily}}}})},e.prototype.renderInner=function(t){var e,n,i,r,o,a,s=(0,td.U2)(this.get("region"),"style",{});(0,td.U2)(this.get("text"),"style",{});var l=this.get("lineLength")||0,u=this.get("points");if(u.length){var c=(e=u.map(function(t){return t.x}),n=u.map(function(t){return t.y}),i=Math.min.apply(Math,e),r=Math.min.apply(Math,n),{x:i,y:r,minX:i,minY:r,maxX:o=Math.max.apply(Math,e),maxY:a=Math.max.apply(Math,n),width:o-i,height:a-r}),E=[];E.push(["M",u[0].x,c.minY-l]),u.forEach(function(t){E.push(["L",t.x,t.y])}),E.push(["L",u[u.length-1].x,u[u.length-1].y-l]),this.addShape(t,{type:"path",id:this.getElementId("region"),name:"annotation-region",attrs:(0,tf.pi)({path:E},s)}),nD(t,(0,tf.pi)({id:this.getElementId("text"),name:"annotation-text",x:(c.minX+c.maxX)/2,y:c.minY-l},this.get("text")))}},e}(n_),nk=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,tf.pi)((0,tf.pi)({},e),{name:"annotation",type:"regionFilter",locationType:"region",start:null,end:null,color:null,shape:[]})},e.prototype.renderInner=function(t){var e=this,n=this.get("start"),i=this.get("end"),r=this.addGroup(t,{id:this.getElementId("region-filter"),capture:!1});(0,td.S6)(this.get("shapes"),function(t,n){var i=t.get("type"),o=(0,td.d9)(t.attr());e.adjustShapeAttrs(o),e.addShape(r,{id:e.getElementId("shape-"+i+"-"+n),capture:!1,type:i,attrs:o})});var o=nS({start:n,end:i});r.setClip({type:"rect",attrs:{x:o.minX,y:o.minY,width:o.width,height:o.height}})},e.prototype.adjustShapeAttrs=function(t){var e=this.get("color");t.fill&&(t.fill=t.fillStyle=e),t.stroke=t.strokeStyle=e},e}(n_),nV=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,tf.pi)((0,tf.pi)({},e),{name:"annotation",type:"shape",draw:td.ZT})},e.prototype.renderInner=function(t){var e=this.get("render");(0,td.mf)(e)&&e(t)},e}(n_);function nW(t,e,n){var i;try{i=window.getComputedStyle?window.getComputedStyle(t,null)[e]:t.style[e]}catch(t){}finally{i=void 0===i?n:i}return i}var nX=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,tf.pi)((0,tf.pi)({},e),{container:null,containerTpl:"",updateAutoRender:!0,containerClassName:"",parent:null})},e.prototype.getContainer=function(){return this.get("container")},e.prototype.show=function(){this.get("container").style.display="",this.set("visible",!0)},e.prototype.hide=function(){this.get("container").style.display="none",this.set("visible",!1)},e.prototype.setCapture=function(t){var e=this.getContainer(),n=t?"auto":"none";e.style.pointerEvents=n,this.set("capture",t)},e.prototype.getBBox=function(){var t=this.getContainer();return nR(parseFloat(t.style.left)||0,parseFloat(t.style.top)||0,t.clientWidth,t.clientHeight)},e.prototype.clear=function(){nA(this.get("container"))},e.prototype.destroy=function(){this.removeEvent(),this.removeDom(),t.prototype.destroy.call(this)},e.prototype.init=function(){t.prototype.init.call(this),this.initContainer(),this.initDom(),this.resetStyles(),this.applyStyles(),this.initEvent(),this.initCapture(),this.initVisible()},e.prototype.initCapture=function(){this.setCapture(this.get("capture"))},e.prototype.initVisible=function(){this.get("visible")?this.show():this.hide()},e.prototype.initDom=function(){},e.prototype.initContainer=function(){var t=this.get("container");if((0,td.UM)(t)){t=this.createDom();var e=this.get("parent");(0,td.HD)(e)&&(e=document.getElementById(e),this.set("parent",e)),e.appendChild(t),this.get("containerId")&&t.setAttribute("id",this.get("containerId")),this.set("container",t)}else(0,td.HD)(t)&&(t=document.getElementById(t),this.set("container",t));this.get("parent")||this.set("parent",t.parentNode)},e.prototype.resetStyles=function(){var t=this.get("domStyles"),e=this.get("defaultStyles");t=t?(0,td.b$)({},e,t):e,this.set("domStyles",t)},e.prototype.applyStyles=function(){var t=this.get("domStyles");if(t){var e=this.getContainer();this.applyChildrenStyles(e,t);var n=this.get("containerClassName");n&&e.className.match(RegExp("(\\s|^)"+n+"(\\s|$)"))&&tO(e,t[n])}},e.prototype.applyChildrenStyles=function(t,e){(0,td.S6)(e,function(e,n){var i=t.getElementsByClassName(n);(0,td.S6)(i,function(t){tO(t,e)})})},e.prototype.applyStyle=function(t,e){tO(e,this.get("domStyles")[t])},e.prototype.createDom=function(){return tI(this.get("containerTpl"))},e.prototype.initEvent=function(){},e.prototype.removeDom=function(){var t=this.get("container");t&&t.parentNode&&t.parentNode.removeChild(t)},e.prototype.removeEvent=function(){},e.prototype.updateInner=function(t){(0,td.wH)(t,"domStyles")&&(this.resetStyles(),this.applyStyles()),this.resetPosition()},e.prototype.resetPosition=function(){},e}(nN),nK=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,tf.pi)((0,tf.pi)({},e),{name:"annotation",type:"html",locationType:"point",x:0,y:0,containerTpl:'',alignX:"left",alignY:"top",html:"",zIndex:7})},e.prototype.render=function(){var t=this.getContainer(),e=this.get("html");nA(t);var n=(0,td.mf)(e)?e(t):e;if((0,td.kK)(n))t.appendChild(n);else if((0,td.HD)(n)||(0,td.hj)(n)){var i=tI(""+n);i&&t.appendChild(i)}this.resetPosition()},e.prototype.resetPosition=function(){var t,e,n,i,r,o,a,s,l,u,c,E,h=this.getContainer(),p=this.getLocation(),T=p.x,f=p.y,d=this.get("alignX"),A=this.get("alignY"),S=this.get("offsetX"),R=this.get("offsetY"),g=("auto"===(t=nW(h,"width",void 0))&&(t=h.offsetWidth),e=parseFloat(t),n=parseFloat(nW(h,"borderLeftWidth"))||0,i=parseFloat(nW(h,"paddingLeft"))||0,r=parseFloat(nW(h,"paddingRight"))||0,o=parseFloat(nW(h,"borderRightWidth"))||0,a=parseFloat(nW(h,"marginRight"))||0,e+n+o+i+r+(parseFloat(nW(h,"marginLeft"))||0)+a),I=("auto"===(s=nW(h,"height",void 0))&&(s=h.offsetHeight),l=parseFloat(s),u=parseFloat(nW(h,"borderTopWidth"))||0,c=parseFloat(nW(h,"paddingTop"))||0,E=parseFloat(nW(h,"paddingBottom"))||0,l+u+(parseFloat(nW(h,"borderBottomWidth"))||0)+c+E+(parseFloat(nW(h,"marginTop"))||0)+(parseFloat(nW(h,"marginBottom"))||0)),O={x:T,y:f};"middle"===d?O.x-=Math.round(g/2):"right"===d&&(O.x-=Math.round(g)),"middle"===A?O.y-=Math.round(I/2):"bottom"===A&&(O.y-=Math.round(I)),S&&(O.x+=S),R&&(O.y+=R),tO(h,{position:"absolute",left:O.x+"px",top:O.y+"px",zIndex:this.get("zIndex")})},e}(nX);function nz(t,e,n){var i=e+"Style",r=null;return(0,td.S6)(n,function(e,n){t[n]&&e[i]&&(r||(r={}),(0,td.CD)(r,e[i]))}),r}var nZ=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,tf.pi)((0,tf.pi)({},e),{name:"axis",ticks:[],line:{},tickLine:{},subTickLine:null,title:null,label:{},verticalFactor:1,verticalLimitLength:null,overlapOrder:["autoRotate","autoEllipsis","autoHide"],tickStates:{},optimize:{},defaultCfg:{line:{style:{lineWidth:1,stroke:nU.lineColor}},tickLine:{style:{lineWidth:1,stroke:nU.lineColor},alignTick:!0,length:5,displayWithLabel:!0},subTickLine:{style:{lineWidth:1,stroke:nU.lineColor},count:4,length:2},label:{autoRotate:!0,autoHide:!1,autoEllipsis:!1,style:{fontSize:12,fill:nU.textColor,fontFamily:nU.fontFamily,fontWeight:"normal"},offset:10,offsetX:0,offsetY:0},title:{autoRotate:!0,spacing:5,position:"center",style:{fontSize:12,fill:nU.textColor,textBaseline:"middle",fontFamily:nU.fontFamily,textAlign:"center"},iconStyle:{fill:nU.descriptionIconFill,stroke:nU.descriptionIconStroke},description:""},tickStates:{active:{labelStyle:{fontWeight:500},tickLineStyle:{lineWidth:2}},inactive:{labelStyle:{fill:nU.uncheckedColor}}},optimize:{enable:!0,threshold:400}},theme:{}})},e.prototype.renderInner=function(t){this.get("line")&&this.drawLine(t),this.drawTicks(t),this.get("title")&&this.drawTitle(t)},e.prototype.isList=function(){return!0},e.prototype.getItems=function(){return this.get("ticks")},e.prototype.setItems=function(t){this.update({ticks:t})},e.prototype.updateItem=function(t,e){(0,td.CD)(t,e),this.clear(),this.render()},e.prototype.clearItems=function(){var t=this.getElementByLocalId("label-group");t&&t.clear()},e.prototype.setItemState=function(t,e,n){t[e]=n,this.updateTickStates(t)},e.prototype.hasState=function(t,e){return!!t[e]},e.prototype.getItemStates=function(t){var e=this.get("tickStates"),n=[];return(0,td.S6)(e,function(e,i){t[i]&&n.push(i)}),n},e.prototype.clearItemsState=function(t){var e=this,n=this.getItemsByState(t);(0,td.S6)(n,function(n){e.setItemState(n,t,!1)})},e.prototype.getItemsByState=function(t){var e=this,n=this.getItems();return(0,td.hX)(n,function(n){return e.hasState(n,t)})},e.prototype.getSidePoint=function(t,e){var n=this.getSideVector(e,t);return{x:t.x+n[0],y:t.y+n[1]}},e.prototype.getTextAnchor=function(t){var e;return(0,td.vQ)(t[0],0)?e="center":t[0]>0?e="start":t[0]<0&&(e="end"),e},e.prototype.getTextBaseline=function(t){var e;return(0,td.vQ)(t[1],0)?e="middle":t[1]>0?e="top":t[1]<0&&(e="bottom"),e},e.prototype.processOverlap=function(t){},e.prototype.drawLine=function(t){var e=this.getLinePath(),n=this.get("line");this.addShape(t,{type:"path",id:this.getElementId("line"),name:"axis-line",attrs:(0,td.CD)({path:e},n.style)})},e.prototype.getTickLineItems=function(t){var e=this,n=[],i=this.get("tickLine"),r=i.alignTick,o=i.length,a=1;return t.length>=2&&(a=t[1].value-t[0].value),(0,td.S6)(t,function(t){var i=t.point;r||(i=e.getTickPoint(t.value-a/2));var s=e.getSidePoint(i,o);n.push({startPoint:i,tickValue:t.value,endPoint:s,tickId:t.id,id:"tickline-"+t.id})}),n},e.prototype.getSubTickLineItems=function(t){var e=[],n=this.get("subTickLine"),i=n.count,r=t.length;if(r>=2)for(var o=0;o0){var n=(0,td.dp)(e);if(n>t.threshold){var i=Math.ceil(n/t.threshold),r=e.filter(function(t,e){return e%i==0});this.set("ticks",r),this.set("originalTicks",e)}}},e.prototype.getLabelAttrs=function(t,e,n){var i=this.get("label"),r=i.offset,o=i.offsetX,a=i.offsetY,s=i.rotate,l=i.formatter,u=this.getSidePoint(t.point,r),c=this.getSideVector(r,u),E=l?l(t.name,t,e):t.name,h=i.style;h=(0,td.mf)(h)?(0,td.U2)(this.get("theme"),["label","style"],{}):h;var p=(0,td.CD)({x:u.x+o,y:u.y+a,text:E,textAlign:this.getTextAnchor(c),textBaseline:this.getTextBaseline(c)},h);return s&&(p.matrix=nE(u,s)),p},e.prototype.drawLabels=function(t){var e=this,n=this.get("ticks"),i=this.addGroup(t,{name:"axis-label-group",id:this.getElementId("label-group")});(0,td.S6)(n,function(t,r){e.addShape(i,{type:"text",name:"axis-label",id:e.getElementId("label-"+t.id),attrs:e.getLabelAttrs(t,r,n),delegateObject:{tick:t,item:t,index:r}})}),this.processOverlap(i);var r=i.getChildren(),o=(0,td.U2)(this.get("theme"),["label","style"],{}),a=this.get("label"),s=a.style,l=a.formatter;if((0,td.mf)(s)){var u=r.map(function(t){return(0,td.U2)(t.get("delegateObject"),"tick")});(0,td.S6)(r,function(t,e){var n=t.get("delegateObject").tick,i=l?l(n.name,n,e):n.name,r=(0,td.CD)({},o,s(i,e,u));t.attr(r)})}},e.prototype.getTitleAttrs=function(){var t=this.get("title"),e=t.style,n=t.position,i=t.offset,r=t.spacing,o=void 0===r?0:r,a=t.autoRotate,s=e.fontSize,l=.5;"start"===n?l=0:"end"===n&&(l=1);var u=this.getTickPoint(l),c=this.getSidePoint(u,i||o+s/2),E=(0,td.CD)({x:c.x,y:c.y,text:t.text},e),h=t.rotate,p=h;if((0,td.UM)(h)&&a){var T=this.getAxisVector(u);p=ne.Dg(T,[1,0],!0)}if(p){var f=nE(c,p);E.matrix=f}return E},e.prototype.drawTitle=function(t){var e,n=this.getTitleAttrs(),i=this.addShape(t,{type:"text",id:this.getElementId("title"),name:"axis-title",attrs:n});(null===(e=this.get("title"))||void 0===e?void 0:e.description)&&this.drawDescriptionIcon(t,i,n.matrix)},e.prototype.drawDescriptionIcon=function(t,e,n){var i=this.addGroup(t,{name:"axis-description",id:this.getElementById("description")}),r=e.getBBox(),o=r.maxX,a=r.maxY,s=r.height,l=this.get("title").iconStyle,u=s/2,c=u/6,E=o+4,h=a-s/2,p=[E+u,h-u],T=p[0],f=p[1],d=[T+u,f+u],A=d[0],S=d[1],R=[T,S+u],g=R[0],I=R[1],O=[E,f+u],y=O[0],v=O[1],N=[E+u,h-s/4],C=N[0],m=N[1],L=[C,m+c],_=L[0],x=L[1],M=[_,x+c],P=M[0],D=M[1],U=[P,D+3*u/4],b=U[0],F=U[1];this.addShape(i,{type:"path",id:this.getElementId("title-description-icon"),name:"axis-title-description-icon",attrs:(0,tf.pi)({path:[["M",T,f],["A",u,u,0,0,1,A,S],["A",u,u,0,0,1,g,I],["A",u,u,0,0,1,y,v],["A",u,u,0,0,1,T,f],["M",C,m],["L",_,x],["M",P,D],["L",b,F]],lineWidth:c,matrix:n},l)}),this.addShape(i,{type:"rect",id:this.getElementId("title-description-rect"),name:"axis-title-description-rect",attrs:{x:E,y:h-s/2,width:s,height:s,stroke:"#000",fill:"#000",opacity:0,matrix:n,cursor:"pointer"}})},e.prototype.applyTickStates=function(t,e){if(this.getItemStates(t).length){var n=this.get("tickStates"),i=this.getElementId("label-"+t.id),r=e.findById(i);if(r){var o=nz(t,"label",n);o&&r.attr(o)}var a=this.getElementId("tickline-"+t.id),s=e.findById(a);if(s){var l=nz(t,"tickLine",n);l&&s.attr(l)}}},e.prototype.updateTickStates=function(t){var e=this.getItemStates(t),n=this.get("tickStates"),i=this.get("label"),r=this.getElementByLocalId("label-"+t.id),o=this.get("tickLine"),a=this.getElementByLocalId("tickline-"+t.id);if(e.length){if(r){var s=nz(t,"label",n);s&&r.attr(s)}if(a){var l=nz(t,"tickLine",n);l&&a.attr(l)}}else r&&r.attr(i.style),a&&a.attr(o.style)},e}(n_);function n$(t,e,n,i){var r=e.getChildren(),o=!1;return(0,td.S6)(r,function(e){var r=nP(t,e,n,i);o=o||r}),o}function nJ(){return nq}function nj(t,e,n){return n$(t,e,n,"head")}function nq(t,e,n){return n$(t,e,n,"tail")}function nQ(t,e,n){return n$(t,e,n,"middle")}function n0(t){var e,n;return((e=t.attr("matrix"))&&1!==e[0]?(e7(n=[0,0,0],[1,0,0],t.attr("matrix")),Math.atan2(n[1],n[0])):0)%360}function n1(t,e,n,i){var r=!1,o=n0(e),a=t?Math.abs(n.attr("y")-e.attr("y")):Math.abs(n.attr("x")-e.attr("x")),s=(t?n.attr("y")>e.attr("y"):n.attr("x")>e.attr("x"))?e.getBBox():n.getBBox();if(t){var l=Math.abs(Math.cos(o));r=nI(l,0,Math.PI/180)?s.width+i>a:s.height/l+i>a}else{var l=Math.abs(Math.sin(o));r=nI(l,0,Math.PI/180)?s.width+i>a:s.height/l+i>a}return r}function n2(t,e,n,i){var r=(null==i?void 0:i.minGap)||0,o=e.getChildren().slice().filter(function(t){return t.get("visible")});if(!o.length)return!1;var a=!1;n&&o.reverse();for(var s=o.length,l=o[0],u=1;u1){h=Math.ceil(h);for(var f=0;f2){var a=r[0],s=r[r.length-1];!a.get("visible")&&(a.show(),n2(t,e,!1,i)&&(o=!0)),!s.get("visible")&&(s.show(),n2(t,e,!0,i)&&(o=!0))}return o}function it(t,e,n,i){var r=e.getChildren();if(!r.length||!t&&r.length<2)return!1;var o=nM(r),a=!1;if(a=t?!!n&&o>n:o>Math.abs(r[1].attr("x")-r[0].attr("x"))){var s=i(n,o);(0,td.S6)(r,function(t){var e=nE({x:t.attr("x"),y:t.attr("y")},s);t.attr("matrix",e)})}return a}function ie(){return ii}function ii(t,e,n,i){return it(t,e,n,function(){return(0,td.hj)(i)?i:t?nU.verticalAxisRotate:nU.horizontalAxisRotate})}function ir(t,e,n){return it(t,e,n,function(e,n){if(!e)return t?nU.verticalAxisRotate:nU.horizontalAxisRotate;if(t)return-Math.acos(e/n);var i=0;return e>n?i=Math.PI/4:(i=Math.asin(e/n))>Math.PI/4&&(i=Math.PI/4),i})}var io=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,tf.pi)((0,tf.pi)({},e),{type:"line",locationType:"region",start:null,end:null})},e.prototype.getLinePath=function(){var t=this.get("start"),e=this.get("end"),n=[];return n.push(["M",t.x,t.y]),n.push(["L",e.x,e.y]),n},e.prototype.getInnerLayoutBBox=function(){var e=this.get("start"),n=this.get("end"),i=t.prototype.getInnerLayoutBBox.call(this),r=Math.min(e.x,n.x,i.x),o=Math.min(e.y,n.y,i.y),a=Math.max(e.x,n.x,i.maxX),s=Math.max(e.y,n.y,i.maxY);return{x:r,y:o,minX:r,minY:o,maxX:a,maxY:s,width:a-r,height:s-o}},e.prototype.isVertical=function(){var t=this.get("start"),e=this.get("end");return(0,td.vQ)(t.x,e.x)},e.prototype.isHorizontal=function(){var t=this.get("start"),e=this.get("end");return(0,td.vQ)(t.y,e.y)},e.prototype.getTickPoint=function(t){var e=this.get("start"),n=this.get("end"),i=n.x-e.x,r=n.y-e.y;return{x:e.x+i*t,y:e.y+r*t}},e.prototype.getSideVector=function(t){var e=this.getAxisVector(),n=nr.Fv([0,0],e),i=this.get("verticalFactor"),r=[n[1],-1*n[0]];return nr.bA([0,0],r,t*i)},e.prototype.getAxisVector=function(){var t=this.get("start"),e=this.get("end");return[e.x-t.x,e.y-t.y]},e.prototype.processOverlap=function(t){var e=this,n=this.isVertical(),i=this.isHorizontal();if(n||i){var r=this.get("label"),o=this.get("title"),a=this.get("verticalLimitLength"),s=r.offset,l=a,u=0,c=0;o&&(u=o.style.fontSize,c=o.spacing),l&&(l=l-s-c-u);var E=this.get("overlapOrder");if((0,td.S6)(E,function(n){r[n]&&e.canProcessOverlap(n)&&e.autoProcessOverlap(n,r[n],t,l)}),o&&(0,td.UM)(o.offset)){var h=t.getCanvasBBox(),p=n?h.width:h.height;o.offset=s+p+c+u/2}}},e.prototype.canProcessOverlap=function(t){var e=this.get("label");return"autoRotate"!==t||(0,td.UM)(e.rotate)},e.prototype.autoProcessOverlap=function(t,e,n,i){var r=this,o=this.isVertical(),a=!1,s=ts[t];if(!0===e?(this.get("label"),a=s.getDefault()(o,n,i)):(0,td.mf)(e)?a=e(o,n,i):(0,td.Kn)(e)?s[e.type]&&(a=s[e.type](o,n,i,e.cfg)):s[e]&&(a=s[e](o,n,i)),"autoRotate"===t){if(a){var l=n.getChildren(),u=this.get("verticalFactor");(0,td.S6)(l,function(t){"center"===t.attr("textAlign")&&t.attr("textAlign",u>0?"end":"start")})}}else if("autoHide"===t){var c=n.getChildren().slice(0);(0,td.S6)(c,function(t){t.get("visible")||(r.get("isRegister")&&r.unregisterElement(t),t.remove())})}},e}(nZ),ia=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,tf.pi)((0,tf.pi)({},e),{type:"circle",locationType:"circle",center:null,radius:null,startAngle:-Math.PI/2,endAngle:3*Math.PI/2})},e.prototype.getLinePath=function(){var t=this.get("center"),e=t.x,n=t.y,i=this.get("radius"),r=this.get("startAngle"),o=this.get("endAngle"),a=[];if(Math.abs(o-r)===2*Math.PI)a=[["M",e,n-i],["A",i,i,0,1,1,e,n+i],["A",i,i,0,1,1,e,n-i],["Z"]];else{var s=this.getCirclePoint(r),l=this.getCirclePoint(o),u=Math.abs(o-r)>Math.PI?1:0,c=r>o?0:1;a=[["M",e,n],["L",s.x,s.y],["A",i,i,0,u,c,l.x,l.y],["L",e,n]]}return a},e.prototype.getTickPoint=function(t){var e=this.get("startAngle"),n=this.get("endAngle");return this.getCirclePoint(e+(n-e)*t)},e.prototype.getSideVector=function(t,e){var n=this.get("center"),i=[e.x-n.x,e.y-n.y],r=this.get("verticalFactor"),o=nr.kE(i);return nr.bA(i,i,r*t/o),i},e.prototype.getAxisVector=function(t){var e=this.get("center"),n=[t.x-e.x,t.y-e.y];return[n[1],-1*n[0]]},e.prototype.getCirclePoint=function(t,e){var n=this.get("center");return e=e||this.get("radius"),{x:n.x+Math.cos(t)*e,y:n.y+Math.sin(t)*e}},e.prototype.canProcessOverlap=function(t){var e=this.get("label");return"autoRotate"!==t||(0,td.UM)(e.rotate)},e.prototype.processOverlap=function(t){var e=this,n=this.get("label"),i=this.get("title"),r=this.get("verticalLimitLength"),o=n.offset,a=r,s=0,l=0;i&&(s=i.style.fontSize,l=i.spacing),a&&(a=a-o-l-s);var u=this.get("overlapOrder");if((0,td.S6)(u,function(i){n[i]&&e.canProcessOverlap(i)&&e.autoProcessOverlap(i,n[i],t,a)}),i&&(0,td.UM)(i.offset)){var c=t.getCanvasBBox().height;i.offset=o+c+l+s/2}},e.prototype.autoProcessOverlap=function(t,e,n,i){var r=this,o=!1,a=ts[t];if(i>0&&(!0===e?o=a.getDefault()(!1,n,i):(0,td.mf)(e)?o=e(!1,n,i):(0,td.Kn)(e)?a[e.type]&&(o=a[e.type](!1,n,i,e.cfg)):a[e]&&(o=a[e](!1,n,i))),"autoRotate"===t){if(o){var s=n.getChildren(),l=this.get("verticalFactor");(0,td.S6)(s,function(t){"center"===t.attr("textAlign")&&t.attr("textAlign",l>0?"end":"start")})}}else if("autoHide"===t){var u=n.getChildren().slice(0);(0,td.S6)(u,function(t){t.get("visible")||(r.get("isRegister")&&r.unregisterElement(t),t.remove())})}},e}(nZ),is=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,tf.pi)((0,tf.pi)({},e),{name:"crosshair",type:"base",line:{},text:null,textBackground:{},capture:!1,defaultCfg:{line:{style:{lineWidth:1,stroke:nU.lineColor}},text:{position:"start",offset:10,autoRotate:!1,content:null,style:{fill:nU.textColor,textAlign:"center",textBaseline:"middle",fontFamily:nU.fontFamily}},textBackground:{padding:5,style:{stroke:nU.lineColor}}}})},e.prototype.renderInner=function(t){this.get("line")&&this.renderLine(t),this.get("text")&&(this.renderText(t),this.renderBackground(t))},e.prototype.renderText=function(t){var e=this.get("text"),n=e.style,i=e.autoRotate,r=e.content;if(!(0,td.UM)(r)){var o=this.getTextPoint(),a=null;i&&(a=nE(o,this.getRotateAngle())),this.addShape(t,{type:"text",name:"crosshair-text",id:this.getElementId("text"),attrs:(0,tf.pi)((0,tf.pi)((0,tf.pi)({},o),{text:r,matrix:a}),n)})}},e.prototype.renderLine=function(t){var e=this.getLinePath(),n=this.get("line").style;this.addShape(t,{type:"path",name:"crosshair-line",id:this.getElementId("line"),attrs:(0,tf.pi)({path:e},n)})},e.prototype.renderBackground=function(t){var e=this.getElementId("text"),n=t.findById(e),i=this.get("textBackground");if(i&&n){var r=n.getBBox(),o=nd(i.padding),a=i.style;this.addShape(t,{type:"rect",name:"crosshair-text-background",id:this.getElementId("text-background"),attrs:(0,tf.pi)({x:r.x-o[3],y:r.y-o[0],width:r.width+o[1]+o[3],height:r.height+o[0]+o[2],matrix:n.attr("matrix")},a)}).toBack()}},e}(n_),il=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,tf.pi)((0,tf.pi)({},e),{type:"line",locationType:"region",start:null,end:null})},e.prototype.getRotateAngle=function(){var t=this.getLocation(),e=t.start,n=t.end,i=this.get("text").position,r=Math.atan2(n.y-e.y,n.x-e.x);return"start"===i?r-Math.PI/2:r+Math.PI/2},e.prototype.getTextPoint=function(){var t=this.getLocation(),e=t.start,n=t.end,i=this.get("text");return ny(e,n,i.position,i.offset)},e.prototype.getLinePath=function(){var t=this.getLocation(),e=t.start,n=t.end;return[["M",e.x,e.y],["L",n.x,n.y]]},e}(is),iu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,tf.pi)((0,tf.pi)({},e),{type:"circle",locationType:"circle",center:null,radius:100,startAngle:-Math.PI/2,endAngle:3*Math.PI/2})},e.prototype.getRotateAngle=function(){var t=this.getLocation(),e=t.startAngle,n=t.endAngle;return"start"===this.get("text").position?e+Math.PI/2:n-Math.PI/2},e.prototype.getTextPoint=function(){var t=this.get("text"),e=t.position,n=t.offset,i=this.getLocation(),r=i.center,o=i.radius,a=i.startAngle,s=i.endAngle,l=this.getRotateAngle()-Math.PI,u=ng(r,o,"start"===e?a:s),c=Math.cos(l)*n,E=Math.sin(l)*n;return{x:u.x+c,y:u.y+E}},e.prototype.getLinePath=function(){var t=this.getLocation(),e=t.center,n=t.radius,i=t.startAngle,r=t.endAngle,o=null;if(r-i==2*Math.PI){var a=e.x,s=e.y;o=[["M",a,s-n],["A",n,n,0,1,1,a,s+n],["A",n,n,0,1,1,a,s-n],["Z"]]}else{var l=ng(e,n,i),u=ng(e,n,r),c=Math.abs(r-i)>Math.PI?1:0,E=i>r?0:1;o=[["M",l.x,l.y],["A",n,n,0,c,E,u.x,u.y]]}return o},e}(is),ic="g2-crosshair",iE=ic+"-line",ih=ic+"-text",ip=((V={})[""+ic]={position:"relative"},V[""+iE]={position:"absolute",backgroundColor:"rgba(0, 0, 0, 0.25)"},V[""+ih]={position:"absolute",color:nU.textColor,fontFamily:nU.fontFamily},V),iT=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,tf.pi)((0,tf.pi)({},e),{name:"crosshair",type:"html",locationType:"region",start:{x:0,y:0},end:{x:0,y:0},capture:!1,text:null,containerTpl:'',crosshairTpl:'',textTpl:'{content}',domStyles:null,containerClassName:ic,defaultStyles:ip,defaultCfg:{text:{position:"start",content:null,align:"center",offset:10}}})},e.prototype.render=function(){this.resetText(),this.resetPosition()},e.prototype.initCrossHair=function(){var t=this.getContainer(),e=tI(this.get("crosshairTpl"));t.appendChild(e),this.applyStyle(iE,e),this.set("crosshairEl",e)},e.prototype.getTextPoint=function(){var t=this.getLocation(),e=t.start,n=t.end,i=this.get("text");return ny(e,n,i.position,i.offset)},e.prototype.resetText=function(){var t=this.get("text"),e=this.get("textEl");if(t){var n=t.content;if(!e){var i=this.getContainer();e=tI((0,td.ng)(this.get("textTpl"),t)),i.appendChild(e),this.applyStyle(ih,e),this.set("textEl",e)}e.innerHTML=n}else e&&e.remove()},e.prototype.isVertical=function(t,e){return t.x===e.x},e.prototype.resetPosition=function(){var t=this.get("crosshairEl");t||(this.initCrossHair(),t=this.get("crosshairEl"));var e=this.get("start"),n=this.get("end"),i=Math.min(e.x,n.x),r=Math.min(e.y,n.y);this.isVertical(e,n)?tO(t,{width:"1px",height:nO(Math.abs(n.y-e.y))}):tO(t,{height:"1px",width:nO(Math.abs(n.x-e.x))}),tO(t,{top:nO(r),left:nO(i)}),this.alignText()},e.prototype.alignText=function(){var t=this.get("textEl");if(t){var e=this.get("text").align,n=t.clientWidth,i=this.getTextPoint();switch(e){case"center":i.x=i.x-n/2;break;case"right":i.x=i.x-n}tO(t,{top:nO(i.y),left:nO(i.x)})}},e.prototype.updateInner=function(e){(0,td.wH)(e,"text")&&this.resetText(),t.prototype.updateInner.call(this,e)},e}(nX),id=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,tf.pi)((0,tf.pi)({},e),{name:"grid",line:{},alternateColor:null,capture:!1,items:[],closed:!1,defaultCfg:{line:{type:"line",style:{lineWidth:1,stroke:nU.lineColor}}}})},e.prototype.getLineType=function(){return(this.get("line")||this.get("defaultCfg").line).type},e.prototype.renderInner=function(t){this.drawGrid(t)},e.prototype.getAlternatePath=function(t,e){var n=this.getGridPath(t),i=e.slice(0).reverse(),r=this.getGridPath(i,!0);return this.get("closed")?n=n.concat(r):(r[0][0]="L",(n=n.concat(r)).push(["Z"])),n},e.prototype.getPathStyle=function(){return this.get("line").style},e.prototype.drawGrid=function(t){var e=this,n=this.get("line"),i=this.get("items"),r=this.get("alternateColor"),o=null;(0,td.S6)(i,function(a,s){var l=a.id||s;if(n){var u=e.getPathStyle();u=(0,td.mf)(u)?u(a,s,i):u;var c=e.getElementId("line-"+l),E=e.getGridPath(a.points);e.addShape(t,{type:"path",name:"grid-line",id:c,attrs:(0,td.CD)({path:E},u)})}if(r&&s>0){var h=e.getElementId("region-"+l),p=s%2==0;if((0,td.HD)(r))p&&e.drawAlternateRegion(h,t,o.points,a.points,r);else{var T=p?r[1]:r[0];e.drawAlternateRegion(h,t,o.points,a.points,T)}}o=a})},e.prototype.drawAlternateRegion=function(t,e,n,i,r){var o=this.getAlternatePath(n,i);this.addShape(e,{type:"path",id:t,name:"grid-region",attrs:{path:o,fill:r}})},e}(n_),iA=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,tf.pi)((0,tf.pi)({},e),{type:"circle",center:null,closed:!0})},e.prototype.getGridPath=function(t,e){var n=this.getLineType(),i=this.get("closed"),r=[];if(t.length){if("circle"===n){var o,a,s,l,u,c,E=this.get("center"),h=t[0],p=(o=E.x,a=E.y,s=h.x,l=h.y,Math.sqrt((u=s-o)*u+(c=l-a)*c)),T=e?0:1;i?(r.push(["M",E.x,E.y-p]),r.push(["A",p,p,0,0,T,E.x,E.y+p]),r.push(["A",p,p,0,0,T,E.x,E.y-p]),r.push(["Z"])):(0,td.S6)(t,function(t,e){0===e?r.push(["M",t.x,t.y]):r.push(["A",p,p,0,0,T,t.x,t.y])})}else(0,td.S6)(t,function(t,e){0===e?r.push(["M",t.x,t.y]):r.push(["L",t.x,t.y])}),i&&r.push(["Z"])}return r},e}(id),iS=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,tf.pi)((0,tf.pi)({},e),{type:"line"})},e.prototype.getGridPath=function(t){var e=[];return(0,td.S6)(t,function(t,n){0===n?e.push(["M",t.x,t.y]):e.push(["L",t.x,t.y])}),e},e}(id),iR=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,tf.pi)((0,tf.pi)({},e),{name:"legend",layout:"horizontal",locationType:"point",x:0,y:0,offsetX:0,offsetY:0,title:null,background:null})},e.prototype.getLayoutBBox=function(){var e=t.prototype.getLayoutBBox.call(this),n=this.get("maxWidth"),i=this.get("maxHeight"),r=e.width,o=e.height;return n&&(r=Math.min(r,n)),i&&(o=Math.min(o,i)),nR(e.minX,e.minY,r,o)},e.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetLocation()},e.prototype.resetLocation=function(){var t=this.get("x"),e=this.get("y"),n=this.get("offsetX"),i=this.get("offsetY");this.moveElementTo(this.get("group"),{x:t+n,y:e+i})},e.prototype.applyOffset=function(){this.resetLocation()},e.prototype.getDrawPoint=function(){return this.get("currentPoint")},e.prototype.setDrawPoint=function(t){return this.set("currentPoint",t)},e.prototype.renderInner=function(t){this.resetDraw(),this.get("title")&&this.drawTitle(t),this.drawLegendContent(t),this.get("background")&&this.drawBackground(t)},e.prototype.drawBackground=function(t){var e=this.get("background"),n=t.getBBox(),i=nd(e.padding),r=(0,tf.pi)({x:0,y:0,width:n.width+i[1]+i[3],height:n.height+i[0]+i[2]},e.style);this.addShape(t,{type:"rect",id:this.getElementId("background"),name:"legend-background",attrs:r}).toBack()},e.prototype.drawTitle=function(t){var e=this.get("currentPoint"),n=this.get("title"),i=n.spacing,r=n.style,o=n.text,a=this.addShape(t,{type:"text",id:this.getElementId("title"),name:"legend-title",attrs:(0,tf.pi)({text:o,x:e.x,y:e.y},r)}).getBBox();this.set("currentPoint",{x:e.x,y:a.maxY+i})},e.prototype.resetDraw=function(){var t=this.get("background"),e={x:0,y:0};if(t){var n=nd(t.padding);e.x=n[3],e.y=n[0]}this.set("currentPoint",e)},e}(n_),ig={marker:{style:{inactiveFill:"#000",inactiveOpacity:.45,fill:"#000",opacity:1,size:12}},text:{style:{fill:"#ccc",fontSize:12}}},iI={fill:nU.textColor,fontSize:12,textAlign:"start",textBaseline:"middle",fontFamily:nU.fontFamily,fontWeight:"normal",lineHeight:12},iO="navigation-arrow-right",iy="navigation-arrow-left",iv={right:90*Math.PI/180,left:270*Math.PI/180,up:0,down:180*Math.PI/180},iN=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.currentPageIndex=1,e.totalPagesCnt=1,e.pageWidth=0,e.pageHeight=0,e.startX=0,e.startY=0,e.onNavigationBack=function(){var t=e.getElementByLocalId("item-group");if(e.currentPageIndex>1){e.currentPageIndex-=1,e.updateNavigation();var n=e.getCurrentNavigationMatrix();e.get("animate")?t.animate({matrix:n},100):t.attr({matrix:n})}},e.onNavigationAfter=function(){var t=e.getElementByLocalId("item-group");if(e.currentPageIndexT&&(T=S),"horizontal"===E?(f&&fs))&&(1===d&&(A=f.x+c,n.moveElementTo(p,{x:y,y:f.y+E/2-T.height/2-T.minY})),d+=1,f.x=i,f.y+=O),n.moveElementTo(t,f),t.getParent().setClip({type:"rect",attrs:{x:f.x,y:f.y,width:a+c,height:E}}),f.x+=a+c})}else{(0,td.S6)(a,function(t){var e=t.getBBox();e.width>S&&(S=e.width)}),R=S,S+=c,s&&(S=Math.min(s,S),R=Math.min(s,R)),this.pageWidth=S,this.pageHeight=l-Math.max(T.height,E+g);var v=Math.floor(this.pageHeight/(E+g));(0,td.S6)(a,function(t,e){0!==e&&e%v==0&&(d+=1,f.x+=S,f.y=r),n.moveElementTo(t,f),t.getParent().setClip({type:"rect",attrs:{x:f.x,y:f.y,width:S,height:E}}),f.y+=E+g}),this.totalPagesCnt=d,this.moveElementTo(p,{x:i+R/2-T.width/2-T.minX,y:l-T.height-T.minY})}this.pageHeight&&this.pageWidth&&e.getParent().setClip({type:"rect",attrs:{x:this.startX,y:this.startY,width:this.pageWidth,height:this.pageHeight}}),"horizontal"===o&&this.get("maxRow")?this.totalPagesCnt=Math.ceil(d/this.get("maxRow")):this.totalPagesCnt=d,this.currentPageIndex>this.totalPagesCnt&&(this.currentPageIndex=1),this.updateNavigation(p),e.attr("matrix",this.getCurrentNavigationMatrix())},e.prototype.drawNavigation=function(t,e,n,i){var r={x:0,y:0},o=this.addGroup(t,{id:this.getElementId("navigation-group"),name:"legend-navigation"}),a=(0,td.U2)(i.marker,"style",{}),s=a.size,l=void 0===s?12:s,u=(0,tf._T)(a,["size"]),c=this.drawArrow(o,r,iy,"horizontal"===e?"up":"left",l,u);c.on("click",this.onNavigationBack);var E=c.getBBox();r.x+=E.width+2;var h=this.addShape(o,{type:"text",id:this.getElementId("navigation-text"),name:"navigation-text",attrs:(0,tf.pi)({x:r.x,y:r.y+l/2,text:n,textBaseline:"middle"},(0,td.U2)(i.text,"style"))}).getBBox();return r.x+=h.width+2,this.drawArrow(o,r,iO,"horizontal"===e?"down":"right",l,u).on("click",this.onNavigationAfter),o},e.prototype.updateNavigation=function(t){var e=(0,td.b$)({},ig,this.get("pageNavigator")).marker.style,n=e.fill,i=e.opacity,r=e.inactiveFill,o=e.inactiveOpacity,a=this.currentPageIndex+"/"+this.totalPagesCnt,s=t?t.getChildren()[1]:this.getElementByLocalId("navigation-text"),l=t?t.findById(this.getElementId(iy)):this.getElementByLocalId(iy),u=t?t.findById(this.getElementId(iO)):this.getElementByLocalId(iO);s.attr("text",a),l.attr("opacity",1===this.currentPageIndex?o:i),l.attr("fill",1===this.currentPageIndex?r:n),l.attr("cursor",1===this.currentPageIndex?"not-allowed":"pointer"),u.attr("opacity",this.currentPageIndex===this.totalPagesCnt?o:i),u.attr("fill",this.currentPageIndex===this.totalPagesCnt?r:n),u.attr("cursor",this.currentPageIndex===this.totalPagesCnt?"not-allowed":"pointer");var c=l.getBBox().maxX+2;s.attr("x",c),c+=s.getBBox().width+2,this.updateArrowPath(u,{x:c,y:0})},e.prototype.drawArrow=function(t,e,n,i,r,o){var a=e.x,s=e.y,l=this.addShape(t,{type:"path",id:this.getElementId(n),name:n,attrs:(0,tf.pi)({size:r,direction:i,path:[["M",a+r/2,s],["L",a,s+r],["L",a+r,s+r],["Z"]],cursor:"pointer"},o)});return l.attr("matrix",nE({x:a+r/2,y:s+r/2},iv[i])),l},e.prototype.updateArrowPath=function(t,e){var n=e.x,i=e.y,r=t.attr(),o=r.size,a=nE({x:n+o/2,y:i+o/2},iv[r.direction]);t.attr("path",[["M",n+o/2,i],["L",n,i+o],["L",n+o,i+o],["Z"]]),t.attr("matrix",a)},e.prototype.getCurrentNavigationMatrix=function(){var t=this.currentPageIndex,e=this.pageWidth,n=this.pageHeight;return nh("horizontal"===this.get("layout")?{x:0,y:n*(1-t)}:{x:e*(1-t),y:0})},e.prototype.applyItemStates=function(t,e){if(this.getItemStates(t).length>0){var n=e.getChildren(),i=this.get("itemStates");(0,td.S6)(n,function(e){var n=e.get("name").split("-")[2],r=nz(t,n,i);r&&(e.attr(r),"marker"===n&&!(e.get("isStroke")&&e.get("isFill"))&&(e.get("isStroke")&&e.attr("fill",null),e.get("isFill")&&e.attr("stroke",null)))})}},e.prototype.getLimitItemWidth=function(){var t=this.get("itemWidth"),e=this.get("maxItemWidth");return e?t&&(e=t<=e?t:e):t&&(e=t),e},e}(iR),iC=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,tf.pi)((0,tf.pi)({},e),{type:"continue",min:0,max:100,value:null,colors:[],track:{},rail:{},label:{},handler:{},slidable:!0,tip:null,step:null,maxWidth:null,maxHeight:null,defaultCfg:{label:{align:"rail",spacing:5,formatter:null,style:{fontSize:12,fill:nU.textColor,textBaseline:"middle",fontFamily:nU.fontFamily}},handler:{size:10,style:{fill:"#fff",stroke:"#333"}},track:{},rail:{type:"color",size:20,defaultLength:100,style:{fill:"#DCDEE2"}},title:{spacing:5,style:{fill:nU.textColor,fontSize:12,textAlign:"start",textBaseline:"top"}}}})},e.prototype.isSlider=function(){return!0},e.prototype.getValue=function(){return this.getCurrentValue()},e.prototype.getRange=function(){return{min:this.get("min"),max:this.get("max")}},e.prototype.setRange=function(t,e){this.update({min:t,max:e})},e.prototype.setValue=function(t){var e=this.getValue();this.set("value",t);var n=this.get("group");this.resetTrackClip(),this.get("slidable")&&this.resetHandlers(n),this.delegateEmit("valuechanged",{originValue:e,value:t})},e.prototype.initEvent=function(){var t=this.get("group");this.bindSliderEvent(t),this.bindRailEvent(t),this.bindTrackEvent(t)},e.prototype.drawLegendContent=function(t){this.drawRail(t),this.drawLabels(t),this.fixedElements(t),this.resetTrack(t),this.resetTrackClip(t),this.get("slidable")&&this.resetHandlers(t)},e.prototype.bindSliderEvent=function(t){this.bindHandlersEvent(t)},e.prototype.bindHandlersEvent=function(t){var e=this;t.on("legend-handler-min:drag",function(t){var n=e.getValueByCanvasPoint(t.x,t.y),i=e.getCurrentValue()[1];in&&(i=n),e.setValue([i,n])})},e.prototype.bindRailEvent=function(t){},e.prototype.bindTrackEvent=function(t){var e=this,n=null;t.on("legend-track:dragstart",function(t){n={x:t.x,y:t.y}}),t.on("legend-track:drag",function(t){if(n){var i=e.getValueByCanvasPoint(n.x,n.y),r=e.getValueByCanvasPoint(t.x,t.y),o=e.getCurrentValue(),a=o[1]-o[0],s=e.getRange(),l=r-i;l<0?o[0]+l>s.min?e.setValue([o[0]+l,o[1]+l]):e.setValue([s.min,s.min+a]):l>0&&(l>0&&o[1]+lo&&(u=o),u0&&this.changeRailLength(i,r,n[r]-u)}},e.prototype.changeRailLength=function(t,e,n){var i,r=t.getBBox();i="height"===e?this.getRailPath(r.x,r.y,r.width,n):this.getRailPath(r.x,r.y,n,r.height),t.attr("path",i)},e.prototype.changeRailPosition=function(t,e,n){var i=t.getBBox(),r=this.getRailPath(e,n,i.width,i.height);t.attr("path",r)},e.prototype.fixedHorizontal=function(t,e,n,i){var r=this.get("label"),o=r.align,a=r.spacing,s=n.getBBox(),l=t.getBBox(),u=e.getBBox(),c=s.height;this.fitRailLength(l,u,s,n),s=n.getBBox(),"rail"===o?(t.attr({x:i.x,y:i.y+c/2}),this.changeRailPosition(n,i.x+l.width+a,i.y),e.attr({x:i.x+l.width+s.width+2*a,y:i.y+c/2})):"top"===o?(t.attr({x:i.x,y:i.y}),e.attr({x:i.x+s.width,y:i.y}),this.changeRailPosition(n,i.x,i.y+l.height+a)):(this.changeRailPosition(n,i.x,i.y),t.attr({x:i.x,y:i.y+s.height+a}),e.attr({x:i.x+s.width,y:i.y+s.height+a}))},e.prototype.fixedVertail=function(t,e,n,i){var r=this.get("label"),o=r.align,a=r.spacing,s=n.getBBox(),l=t.getBBox(),u=e.getBBox();if(this.fitRailLength(l,u,s,n),s=n.getBBox(),"rail"===o)t.attr({x:i.x,y:i.y}),this.changeRailPosition(n,i.x,i.y+l.height+a),e.attr({x:i.x,y:i.y+l.height+s.height+2*a});else if("right"===o)t.attr({x:i.x+s.width+a,y:i.y}),this.changeRailPosition(n,i.x,i.y),e.attr({x:i.x+s.width+a,y:i.y+s.height});else{var c=Math.max(l.width,u.width);t.attr({x:i.x,y:i.y}),this.changeRailPosition(n,i.x+c+a,i.y),e.attr({x:i.x,y:i.y+s.height})}},e}(iR),im="g2-tooltip",iL="g2-tooltip-title",i_="g2-tooltip-list",ix="g2-tooltip-list-item",iM="g2-tooltip-marker",iP="g2-tooltip-value",iD="g2-tooltip-name",iU="g2-tooltip-crosshair-x",ib="g2-tooltip-crosshair-y",iF=((W={})[""+im]={position:"absolute",visibility:"visible",zIndex:8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)",backgroundColor:"rgba(255, 255, 255, 0.9)",boxShadow:"0px 0px 10px #aeaeae",borderRadius:"3px",color:"rgb(87, 87, 87)",fontSize:"12px",fontFamily:nU.fontFamily,lineHeight:"20px",padding:"10px 10px 6px 10px"},W[""+iL]={marginBottom:"4px"},W[""+i_]={margin:"0px",listStyleType:"none",padding:"0px"},W[""+ix]={listStyleType:"none",marginBottom:"4px"},W[""+iM]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},W[""+iP]={display:"inline-block",float:"right",marginLeft:"30px"},W[""+iU]={position:"absolute",width:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},W[""+ib]={position:"absolute",height:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},W),iB=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,tf.pi)((0,tf.pi)({},e),{name:"tooltip",type:"html",x:0,y:0,items:[],customContent:null,containerTpl:'',itemTpl:'\n \n {name}:\n {value}\n ',xCrosshairTpl:'',yCrosshairTpl:'',title:null,showTitle:!0,region:null,crosshairsRegion:null,containerClassName:im,crosshairs:null,offset:10,position:"right",domStyles:null,defaultStyles:iF})},e.prototype.render=function(){this.get("customContent")?this.renderCustomContent():(this.resetTitle(),this.renderItems()),this.resetPosition()},e.prototype.clear=function(){this.clearCrosshairs(),this.setTitle(""),this.clearItemDoms()},e.prototype.show=function(){var t=this.getContainer();t&&!this.destroyed&&(this.set("visible",!0),tO(t,{visibility:"visible"}),this.setCrossHairsVisible(!0))},e.prototype.hide=function(){var t=this.getContainer();t&&!this.destroyed&&(this.set("visible",!1),tO(t,{visibility:"hidden"}),this.setCrossHairsVisible(!1))},e.prototype.getLocation=function(){return{x:this.get("x"),y:this.get("y")}},e.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetPosition()},e.prototype.setCrossHairsVisible=function(t){var e=t?"":"none",n=this.get("xCrosshairDom"),i=this.get("yCrosshairDom");n&&tO(n,{display:e}),i&&tO(i,{display:e})},e.prototype.initContainer=function(){if(t.prototype.initContainer.call(this),this.get("customContent")){this.get("container")&&this.get("container").remove();var e=this.getHtmlContentNode();this.get("parent").appendChild(e),this.set("container",e),this.resetStyles(),this.applyStyles()}},e.prototype.updateInner=function(e){if(this.get("customContent"))this.renderCustomContent();else{var n;n=!1,(0,td.S6)(["title","showTitle"],function(t){if((0,td.wH)(e,t))return n=!0,!1}),n&&this.resetTitle(),(0,td.wH)(e,"items")&&this.renderItems()}t.prototype.updateInner.call(this,e)},e.prototype.initDom=function(){this.cacheDoms()},e.prototype.removeDom=function(){t.prototype.removeDom.call(this),this.clearCrosshairs()},e.prototype.resetPosition=function(){var t,e=this.get("x"),n=this.get("y"),i=this.get("offset"),r=this.getOffset(),o=r.offsetX,a=r.offsetY,s=this.get("position"),l=this.get("region"),u=this.getContainer(),c=this.getBBox(),E=c.width,h=c.height;l&&(t=nS(l));var p=function(t,e,n,i,r,o,a){var s=function(t,e,n,i,r,o){var a=t,s=e;switch(o){case"left":a=t-i-n,s=e-r/2;break;case"right":a=t+n,s=e-r/2;break;case"top":a=t-i/2,s=e-r-n;break;case"bottom":a=t-i/2,s=e+n;break;default:a=t+n,s=e-r-n}return{x:a,y:s}}(t,e,n,i,r,o);if(a){var l,u,c=(l=s.x,u=s.y,{left:la.x+a.width,top:ua.y+a.height});"auto"===o?(c.right&&(s.x=Math.max(0,t-i-n)),c.top&&(s.y=Math.max(0,e-r-n))):"top"===o||"bottom"===o?(c.left&&(s.x=a.x),c.right&&(s.x=a.x+a.width-i),"top"===o&&c.top&&(s.y=e+n),"bottom"===o&&c.bottom&&(s.y=e-r-n)):(c.top&&(s.y=a.y),c.bottom&&(s.y=a.y+a.height-r),"left"===o&&c.left&&(s.x=t+n),"right"===o&&c.right&&(s.x=t-i-n))}return s}(e,n,i,E,h,s,t);tO(u,{left:nO(p.x+o),top:nO(p.y+a)}),this.resetCrosshairs()},e.prototype.renderCustomContent=function(){var t=this.getHtmlContentNode(),e=this.get("parent"),n=this.get("container");n&&n.parentNode===e?e.replaceChild(t,n):e.appendChild(t),this.set("container",t),this.resetStyles(),this.applyStyles()},e.prototype.getHtmlContentNode=function(){var t,e=this.get("customContent");if(e){var n=e(this.get("title"),this.get("items"));t=(0,td.kK)(n)?n:tI(n)}return t},e.prototype.cacheDoms=function(){var t=this.getContainer(),e=t.getElementsByClassName(iL)[0],n=t.getElementsByClassName(i_)[0];this.set("titleDom",e),this.set("listDom",n)},e.prototype.resetTitle=function(){var t=this.get("title");this.get("showTitle")&&t?this.setTitle(t):this.setTitle("")},e.prototype.setTitle=function(t){var e=this.get("titleDom");e&&(e.innerText=t)},e.prototype.resetCrosshairs=function(){var t=this.get("crosshairsRegion"),e=this.get("crosshairs");if(t&&e){var n=nS(t),i=this.get("xCrosshairDom"),r=this.get("yCrosshairDom");"x"===e?(this.resetCrosshair("x",n),r&&(r.remove(),this.set("yCrosshairDom",null))):"y"===e?(this.resetCrosshair("y",n),i&&(i.remove(),this.set("xCrosshairDom",null))):(this.resetCrosshair("x",n),this.resetCrosshair("y",n)),this.setCrossHairsVisible(this.get("visible"))}else this.clearCrosshairs()},e.prototype.resetCrosshair=function(t,e){var n=this.checkCrosshair(t),i=this.get(t);"x"===t?tO(n,{left:nO(i),top:nO(e.y),height:nO(e.height)}):tO(n,{top:nO(i),left:nO(e.x),width:nO(e.width)})},e.prototype.checkCrosshair=function(t){var e=t+"CrosshairDom",n=tu["CROSSHAIR_"+t.toUpperCase()],i=this.get(e),r=this.get("parent");return i||(i=tI(this.get(t+"CrosshairTpl")),this.applyStyle(n,i),r.appendChild(i),this.set(e,i)),i},e.prototype.renderItems=function(){this.clearItemDoms();var t=this.get("items"),e=this.get("itemTpl"),n=this.get("listDom");n&&((0,td.S6)(t,function(t){var i=tQ.toCSSGradient(t.color),r=(0,tf.pi)((0,tf.pi)({},t),{color:i}),o=tI((0,td.ng)(e,r));n.appendChild(o)}),this.applyChildrenStyles(n,this.get("domStyles")))},e.prototype.clearItemDoms=function(){this.get("listDom")&&nA(this.get("listDom"))},e.prototype.clearCrosshairs=function(){var t=this.get("xCrosshairDom"),e=this.get("yCrosshairDom");t&&t.remove(),e&&e.remove(),this.set("xCrosshairDom",null),this.set("yCrosshairDom",null)},e}(nX),iG={opacity:0},iw={stroke:"#C5C5C5",strokeOpacity:.85},iH={fill:"#CACED4",opacity:.85},iY=n(39499);function ik(t){return(0,td.UI)(t,function(t,e){return[0===e?"M":"L",t[0],t[1]]})}var iV=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,tf.pi)((0,tf.pi)({},e),{name:"trend",x:0,y:0,width:200,height:16,smooth:!0,isArea:!1,data:[],backgroundStyle:iG,lineStyle:iw,areaStyle:iH})},e.prototype.renderInner=function(t){var e=this.cfg,n=e.width,i=e.height,r=e.data,o=e.smooth,a=e.isArea,s=e.backgroundStyle,l=e.lineStyle,u=e.areaStyle;this.addShape(t,{id:this.getElementId("background"),type:"rect",attrs:(0,tf.pi)({x:0,y:0,width:n,height:i},s)});var c=(void 0===(E=o)&&(E=!0),h=new eP({values:r}),p=new t8({values:(0,td.UI)(r,function(t,e){return e})}),T=(0,td.UI)(r,function(t,e){return[p.scale(e)*n,i-h.scale(t)*i]}),E?function(t){if(t.length<=2)return ik(t);var e=[];(0,td.S6)(t,function(t){(0,td.Xy)(t,e.slice(e.length-2))||e.push(t[0],t[1])});var n=(0,iY.e9)(e,!1),i=(0,td.YM)(t),r=i[0],o=i[1];return n.unshift(["M",r,o]),n}(T):ik(T));if(this.addShape(t,{id:this.getElementId("line"),type:"path",attrs:(0,tf.pi)({path:c},l)}),a){var E,h,p,T,f,d,A,S,R=(f=(0,tf.pr)(c),A=(d=new eP({values:r})).max<0?d.max:Math.max(0,d.min),S=i-d.scale(A)*i,f.push(["L",n,S]),f.push(["L",0,S]),f.push(["Z"]),f);this.addShape(t,{id:this.getElementId("area"),type:"path",attrs:(0,tf.pi)({path:R},u)})}},e.prototype.applyOffset=function(){var t=this.cfg,e=t.x,n=t.y;this.moveElementTo(this.get("group"),{x:e,y:n})},e}(n_),iW={fill:"#F7F7F7",stroke:"#BFBFBF",radius:2,opacity:1,cursor:"ew-resize",highLightFill:"#FFF"},iX=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,tf.pi)((0,tf.pi)({},e),{name:"handler",x:0,y:0,width:10,height:24,style:iW})},e.prototype.renderInner=function(t){var e=this.cfg,n=e.width,i=e.height,r=e.style,o=r.fill,a=r.stroke,s=r.radius,l=r.opacity,u=r.cursor;this.addShape(t,{type:"rect",id:this.getElementId("background"),attrs:{x:0,y:0,width:n,height:i,fill:o,stroke:a,radius:s,opacity:l,cursor:u}});var c=1/3*n,E=2/3*n,h=1/4*i,p=3/4*i;this.addShape(t,{id:this.getElementId("line-left"),type:"line",attrs:{x1:c,y1:h,x2:c,y2:p,stroke:a,cursor:u}}),this.addShape(t,{id:this.getElementId("line-right"),type:"line",attrs:{x1:E,y1:h,x2:E,y2:p,stroke:a,cursor:u}})},e.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},e.prototype.initEvent=function(){this.bindEvents()},e.prototype.bindEvents=function(){var t=this;this.get("group").on("mouseenter",function(){var e=t.get("style").highLightFill;t.getElementByLocalId("background").attr("fill",e),t.draw()}),this.get("group").on("mouseleave",function(){var e=t.get("style").fill;t.getElementByLocalId("background").attr("fill",e),t.draw()})},e.prototype.draw=function(){var t=this.get("container").get("canvas");t&&t.draw()},e}(n_),iK={fill:"#416180",opacity:.05},iz={fill:"#5B8FF9",opacity:.15,cursor:"move"},iZ={width:10,height:24},i$={textBaseline:"middle",fill:"#000",opacity:.45},iJ=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.onMouseDown=function(t){return function(n){e.currentTarget=t;var i=n.originalEvent;i.stopPropagation(),i.preventDefault(),e.prevX=(0,td.U2)(i,"touches.0.pageX",i.pageX),e.prevY=(0,td.U2)(i,"touches.0.pageY",i.pageY);var r=e.getContainerDOM();r.addEventListener("mousemove",e.onMouseMove),r.addEventListener("mouseup",e.onMouseUp),r.addEventListener("mouseleave",e.onMouseUp),r.addEventListener("touchmove",e.onMouseMove),r.addEventListener("touchend",e.onMouseUp),r.addEventListener("touchcancel",e.onMouseUp)}},e.onMouseMove=function(t){var n=e.cfg.width,i=[e.get("start"),e.get("end")];t.stopPropagation(),t.preventDefault();var r=(0,td.U2)(t,"touches.0.pageX",t.pageX),o=(0,td.U2)(t,"touches.0.pageY",t.pageY),a=r-e.prevX,s=e.adjustOffsetRange(a/n);e.updateStartEnd(s),e.updateUI(e.getElementByLocalId("foreground"),e.getElementByLocalId("minText"),e.getElementByLocalId("maxText")),e.prevX=r,e.prevY=o,e.draw(),e.emit("sliderchange",[e.get("start"),e.get("end")].sort()),e.delegateEmit("valuechanged",{originValue:i,value:[e.get("start"),e.get("end")]})},e.onMouseUp=function(){e.currentTarget&&(e.currentTarget=void 0);var t=e.getContainerDOM();t&&(t.removeEventListener("mousemove",e.onMouseMove),t.removeEventListener("mouseup",e.onMouseUp),t.removeEventListener("mouseleave",e.onMouseUp),t.removeEventListener("touchmove",e.onMouseMove),t.removeEventListener("touchend",e.onMouseUp),t.removeEventListener("touchcancel",e.onMouseUp))},e}return(0,tf.ZT)(e,t),e.prototype.setRange=function(t,e){this.set("minLimit",t),this.set("maxLimit",e);var n=this.get("start"),i=this.get("end"),r=(0,td.uZ)(n,t,e),o=(0,td.uZ)(i,t,e);this.get("isInit")||n===r&&i===o||this.setValue([r,o])},e.prototype.getRange=function(){return{min:this.get("minLimit")||0,max:this.get("maxLimit")||1}},e.prototype.setValue=function(t){var e=this.getRange();if((0,td.kJ)(t)&&2===t.length){var n=[this.get("start"),this.get("end")];this.update({start:(0,td.uZ)(t[0],e.min,e.max),end:(0,td.uZ)(t[1],e.min,e.max)}),this.get("updateAutoRender")||this.render(),this.delegateEmit("valuechanged",{originValue:n,value:t})}},e.prototype.getValue=function(){return[this.get("start"),this.get("end")]},e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,tf.pi)((0,tf.pi)({},e),{name:"slider",x:0,y:0,width:100,height:16,backgroundStyle:{},foregroundStyle:{},handlerStyle:{},textStyle:{},defaultCfg:{backgroundStyle:iK,foregroundStyle:iz,handlerStyle:iZ,textStyle:i$}})},e.prototype.update=function(e){var n=e.start,i=e.end,r=(0,tf.pi)({},e);(0,td.UM)(n)||(r.start=(0,td.uZ)(n,0,1)),(0,td.UM)(i)||(r.end=(0,td.uZ)(i,0,1)),t.prototype.update.call(this,r),this.minHandler=this.getChildComponentById(this.getElementId("minHandler")),this.maxHandler=this.getChildComponentById(this.getElementId("maxHandler")),this.trend=this.getChildComponentById(this.getElementId("trend"))},e.prototype.init=function(){this.set("start",(0,td.uZ)(this.get("start"),0,1)),this.set("end",(0,td.uZ)(this.get("end"),0,1)),t.prototype.init.call(this)},e.prototype.render=function(){t.prototype.render.call(this),this.updateUI(this.getElementByLocalId("foreground"),this.getElementByLocalId("minText"),this.getElementByLocalId("maxText"))},e.prototype.renderInner=function(t){var e=this.cfg,n=(e.start,e.end,e.width),i=e.height,r=e.trendCfg,o=void 0===r?{}:r,a=e.minText,s=e.maxText,l=e.backgroundStyle,u=void 0===l?{}:l,c=e.foregroundStyle,E=void 0===c?{}:c,h=e.textStyle,p=void 0===h?{}:h,T=(0,td.b$)({},iW,this.cfg.handlerStyle);(0,td.dp)((0,td.U2)(o,"data"))&&(this.trend=this.addComponent(t,(0,tf.pi)({component:iV,id:this.getElementId("trend"),x:0,y:0,width:n,height:i},o))),this.addShape(t,{id:this.getElementId("background"),type:"rect",attrs:(0,tf.pi)({x:0,y:0,width:n,height:i},u)}),this.addShape(t,{id:this.getElementId("minText"),type:"text",attrs:(0,tf.pi)({y:i/2,textAlign:"right",text:a,silent:!1},p)}),this.addShape(t,{id:this.getElementId("maxText"),type:"text",attrs:(0,tf.pi)({y:i/2,textAlign:"left",text:s,silent:!1},p)}),this.addShape(t,{id:this.getElementId("foreground"),name:"foreground",type:"rect",attrs:(0,tf.pi)({y:0,height:i},E)});var f=(0,td.U2)(T,"width",10),d=(0,td.U2)(T,"height",24);this.minHandler=this.addComponent(t,{component:iX,id:this.getElementId("minHandler"),name:"handler-min",x:0,y:(i-d)/2,width:f,height:d,cursor:"ew-resize",style:T}),this.maxHandler=this.addComponent(t,{component:iX,id:this.getElementId("maxHandler"),name:"handler-max",x:0,y:(i-d)/2,width:f,height:d,cursor:"ew-resize",style:T})},e.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},e.prototype.initEvent=function(){this.bindEvents()},e.prototype.updateUI=function(t,e,n){var i=this.cfg,r=i.start,o=i.end,a=i.width,s=i.minText,l=i.maxText,u=i.handlerStyle,c=i.height,E=r*a,h=o*a;this.trend&&(this.trend.update({width:a,height:c}),this.get("updateAutoRender")||this.trend.render()),t.attr("x",E),t.attr("width",h-E);var p=(0,td.U2)(u,"width",10);e.attr("text",s),n.attr("text",l);var T=this._dodgeText([E,h],e,n),f=T[0],d=T[1];this.minHandler&&(this.minHandler.update({x:E-p/2}),this.get("updateAutoRender")||this.minHandler.render()),(0,td.S6)(f,function(t,n){return e.attr(n,t)}),this.maxHandler&&(this.maxHandler.update({x:h-p/2}),this.get("updateAutoRender")||this.maxHandler.render()),(0,td.S6)(d,function(t,e){return n.attr(e,t)})},e.prototype.bindEvents=function(){var t=this.get("group");t.on("handler-min:mousedown",this.onMouseDown("minHandler")),t.on("handler-min:touchstart",this.onMouseDown("minHandler")),t.on("handler-max:mousedown",this.onMouseDown("maxHandler")),t.on("handler-max:touchstart",this.onMouseDown("maxHandler"));var e=t.findById(this.getElementId("foreground"));e.on("mousedown",this.onMouseDown("foreground")),e.on("touchstart",this.onMouseDown("foreground"))},e.prototype.adjustOffsetRange=function(t){var e=this.cfg,n=e.start,i=e.end;switch(this.currentTarget){case"minHandler":var r=0-n,o=1-n;return Math.min(o,Math.max(r,t));case"maxHandler":var r=0-i,o=1-i;return Math.min(o,Math.max(r,t));case"foreground":var r=0-n,o=1-i;return Math.min(o,Math.max(r,t))}},e.prototype.updateStartEnd=function(t){var e=this.cfg,n=e.start,i=e.end;switch(this.currentTarget){case"minHandler":n+=t;break;case"maxHandler":i+=t;break;case"foreground":n+=t,i+=t}this.set("start",n),this.set("end",i)},e.prototype._dodgeText=function(t,e,n){var i,r,o=this.cfg,a=o.handlerStyle,s=o.width,l=(0,td.U2)(a,"width",10),u=t[0],c=t[1],E=!1;u>c&&(u=(i=[c,u])[0],c=i[1],e=(r=[n,e])[0],n=r[1],E=!0);var h=e.getBBox(),p=n.getBBox(),T=h.width>u-2?{x:u+l/2+2,textAlign:"left"}:{x:u-l/2-2,textAlign:"right"},f=p.width>s-c-2?{x:c-l/2-2,textAlign:"right"}:{x:c+l/2+2,textAlign:"left"};return E?[f,T]:[T,f]},e.prototype.draw=function(){var t=this.get("container"),e=t&&t.get("canvas");e&&e.draw()},e.prototype.getContainerDOM=function(){var t=this.get("container"),e=t&&t.get("canvas");return e&&e.get("container")},e}(n_);function ij(t,e,n){if(t){if("function"==typeof t.addEventListener)return t.addEventListener(e,n,!1),{remove:function(){t.removeEventListener(e,n,!1)}};if("function"==typeof t.attachEvent)return t.attachEvent("on"+e,n),{remove:function(){t.detachEvent("on"+e,n)}}}}var iq={default:{trackColor:"rgba(0,0,0,0)",thumbColor:"rgba(0,0,0,0.15)",size:8,lineCap:"round"},hover:{thumbColor:"rgba(0,0,0,0.2)"}},iQ=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.clearEvents=td.ZT,e.onStartEvent=function(t){return function(n){e.isMobile=t,n.originalEvent.preventDefault();var i=t?(0,td.U2)(n.originalEvent,"touches.0.clientX"):n.clientX,r=t?(0,td.U2)(n.originalEvent,"touches.0.clientY"):n.clientY;e.startPos=e.cfg.isHorizontal?i:r,e.bindLaterEvent()}},e.bindLaterEvent=function(){var t=e.getContainerDOM(),n=[];n=e.isMobile?[ij(t,"touchmove",e.onMouseMove),ij(t,"touchend",e.onMouseUp),ij(t,"touchcancel",e.onMouseUp)]:[ij(t,"mousemove",e.onMouseMove),ij(t,"mouseup",e.onMouseUp),ij(t,"mouseleave",e.onMouseUp)],e.clearEvents=function(){n.forEach(function(t){t.remove()})}},e.onMouseMove=function(t){var n=e.cfg,i=n.isHorizontal,r=n.thumbOffset;t.preventDefault();var o=e.isMobile?(0,td.U2)(t,"touches.0.clientX"):t.clientX,a=e.isMobile?(0,td.U2)(t,"touches.0.clientY"):t.clientY,s=i?o:a,l=s-e.startPos;e.startPos=s,e.updateThumbOffset(r+l)},e.onMouseUp=function(t){t.preventDefault(),e.clearEvents()},e.onTrackClick=function(t){var n=e.cfg,i=n.isHorizontal,r=n.x,o=n.y,a=n.thumbLen,s=e.getContainerDOM().getBoundingClientRect(),l=t.clientX,u=t.clientY,c=i?l-s.left-r-a/2:u-s.top-o-a/2,E=e.validateRange(c);e.updateThumbOffset(E)},e.onThumbMouseOver=function(){var t=e.cfg.theme.hover.thumbColor;e.getElementByLocalId("thumb").attr("stroke",t),e.draw()},e.onThumbMouseOut=function(){var t=e.cfg.theme.default.thumbColor;e.getElementByLocalId("thumb").attr("stroke",t),e.draw()},e}return(0,tf.ZT)(e,t),e.prototype.setRange=function(t,e){this.set("minLimit",t),this.set("maxLimit",e);var n=this.getValue(),i=(0,td.uZ)(n,t,e);n===i||this.get("isInit")||this.setValue(i)},e.prototype.getRange=function(){return{min:this.get("minLimit")||0,max:this.get("maxLimit")||1}},e.prototype.setValue=function(t){var e=this.getRange(),n=this.getValue();this.update({thumbOffset:(this.get("trackLen")-this.get("thumbLen"))*(0,td.uZ)(t,e.min,e.max)}),this.delegateEmit("valuechange",{originalValue:n,value:this.getValue()})},e.prototype.getValue=function(){return(0,td.uZ)(this.get("thumbOffset")/(this.get("trackLen")-this.get("thumbLen")),0,1)},e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,tf.pi)((0,tf.pi)({},e),{name:"scrollbar",isHorizontal:!0,minThumbLen:20,thumbOffset:0,theme:iq})},e.prototype.renderInner=function(t){this.renderTrackShape(t),this.renderThumbShape(t)},e.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},e.prototype.initEvent=function(){this.bindEvents()},e.prototype.renderTrackShape=function(t){var e=this.cfg,n=e.trackLen,i=e.theme,r=(0,td.b$)({},iq,void 0===i?{default:{}}:i).default,o=r.lineCap,a=r.trackColor,s=r.size,l=(0,td.U2)(this.cfg,"size",s),u=this.get("isHorizontal")?{x1:0+l/2,y1:l/2,x2:n-l/2,y2:l/2,lineWidth:l,stroke:a,lineCap:o}:{x1:l/2,y1:0+l/2,x2:l/2,y2:n-l/2,lineWidth:l,stroke:a,lineCap:o};return this.addShape(t,{id:this.getElementId("track"),name:"track",type:"line",attrs:u})},e.prototype.renderThumbShape=function(t){var e=this.cfg,n=e.thumbOffset,i=e.thumbLen,r=e.theme,o=(0,td.b$)({},iq,r).default,a=o.size,s=o.lineCap,l=o.thumbColor,u=(0,td.U2)(this.cfg,"size",a),c=this.get("isHorizontal")?{x1:n+u/2,y1:u/2,x2:n+i-u/2,y2:u/2,lineWidth:u,stroke:l,lineCap:s,cursor:"default"}:{x1:u/2,y1:n+u/2,x2:u/2,y2:n+i-u/2,lineWidth:u,stroke:l,lineCap:s,cursor:"default"};return this.addShape(t,{id:this.getElementId("thumb"),name:"thumb",type:"line",attrs:c})},e.prototype.bindEvents=function(){var t=this.get("group");t.on("mousedown",this.onStartEvent(!1)),t.on("mouseup",this.onMouseUp),t.on("touchstart",this.onStartEvent(!0)),t.on("touchend",this.onMouseUp),t.findById(this.getElementId("track")).on("click",this.onTrackClick);var e=t.findById(this.getElementId("thumb"));e.on("mouseover",this.onThumbMouseOver),e.on("mouseout",this.onThumbMouseOut)},e.prototype.getContainerDOM=function(){var t=this.get("container"),e=t&&t.get("canvas");return e&&e.get("container")},e.prototype.validateRange=function(t){var e=this.cfg,n=e.thumbLen,i=e.trackLen,r=t;return t+n>i?r=i-n:t+nt.x?t.x:e,n=nt.y?t.y:i,r=r=i&&t<=r}function i9(t,e){return"object"==typeof t&&e.forEach(function(e){delete t[e]}),t}function i7(t,e,n){void 0===e&&(e=[]),void 0===n&&(n=new Map);for(var i=0;i=this.minX&&t.maxX<=this.maxX&&t.minY>=this.minY&&t.maxY<=this.maxY},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.add=function(){for(var t=[],e=0;et.minX&&this.minYt.minY},t.prototype.size=function(){return this.width*this.height},t.prototype.isPointIn=function(t){return t.x>=this.minX&&t.x<=this.maxX&&t.y>=this.minY&&t.y<=this.maxY},t}();function re(t){if(t.isPolar&&!t.isTransposed)return(t.endAngle-t.startAngle)*t.getRadius();var e=t.convert({x:0,y:0}),n=t.convert({x:1,y:0});return Math.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2))}function rn(t,e){var n=t.getCenter();return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function ri(t,e){var n=!1;if(t){if("theta"===t.type){var i=t.start,r=t.end;n=i8(e.x,i.x,r.x)&&i8(e.y,i.y,r.y)}else{var o=t.invert(e);n=i8(o.x,0,1)&&i8(o.y,0,1)}}return n}function rr(t,e){var n=t.getCenter();return Math.atan2(e.y-n.y,e.x-n.x)}function ro(t,e){void 0===e&&(e=0);var n,i=t.start,r=t.end,o=t.getWidth(),a=t.getHeight();if(t.isPolar){var s=t.startAngle,l=t.endAngle,u=t.getCenter(),c=t.getRadius();return{type:"path",startState:{path:i5(u.x,u.y,c+e,s,s)},endState:function(t){var n=(l-s)*t+s;return{path:i5(u.x,u.y,c+e,s,n)}},attrs:{path:i5(u.x,u.y,c+e,s,l)}}}return n=t.isTransposed?{height:a+2*e}:{width:o+2*e},{type:"rect",startState:{x:i.x-e,y:r.y-e,width:t.isTransposed?o+2*e:0,height:t.isTransposed?0:a+2*e},endState:n,attrs:{x:i.x-e,y:r.y-e,width:o+2*e,height:a+2*e}}}var ra=/^(?:(?!0000)[0-9]{4}([-/.]+)(?:(?:0?[1-9]|1[0-2])\1(?:0?[1-9]|1[0-9]|2[0-8])|(?:0?[13-9]|1[0-2])\1(?:29|30)|(?:0?[13578]|1[02])\1(?:31))|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)([-/.]+)0?2\2(?:29))(\s+([01]|([01][0-9]|2[0-3])):([0-9]|[0-5][0-9]):([0-9]|[0-5][0-9]))?$/;function rs(t){return t.alias||t.field}function rl(t,e,n){var i,r=t.values.length;if(1===r)i=[.5,1];else{var o=0;i=!function(t){if(t.isPolar){var e=t.startAngle;return t.endAngle-e==2*Math.PI}return!1}(e)?[o=1/r/2,1-o]:e.isTransposed?[(o=1/r*(0,td.U2)(n,"widthRatio.multiplePie",1/1.3))/2,1-o/2]:[0,1-1/r]}return i}function ru(t,e){var n,i,r={start:{x:0,y:0},end:{x:0,y:0}};t.isRect?r=function(t){var e,n;switch(t){case P.TOP:e={x:0,y:1},n={x:1,y:1};break;case P.RIGHT:e={x:1,y:0},n={x:1,y:1};break;case P.BOTTOM:e={x:0,y:0},n={x:1,y:0};break;case P.LEFT:e={x:0,y:0},n={x:0,y:1};break;default:e=n={x:0,y:0}}return{start:e,end:n}}(e):t.isPolar&&(t.isTransposed?(n={x:0,y:0},i={x:1,y:0}):(n={x:0,y:0},i={x:0,y:1}),r={start:n,end:i});var o=r.start,a=r.end;return{start:t.convert(o),end:t.convert(a)}}function rc(t){var e=t.start,n=t.end;return e.x===n.x}function rE(t,e){var n=t.start,i=t.end;return rc(t)?(n.y-i.y)*(e.x-n.x)>0?1:-1:(i.x-n.x)*(n.y-e.y)>0?-1:1}function rh(t,e){var n=(0,td.U2)(t,["components","axis"],{});return(0,td.b$)({},(0,td.U2)(n,["common"],{}),(0,td.b$)({},(0,td.U2)(n,[e],{})))}function rp(t,e,n){var i=(0,td.U2)(t,["components","axis"],{});return(0,td.b$)({},(0,td.U2)(i,["common","title"],{}),(0,td.b$)({},(0,td.U2)(i,[e,"title"],{})),n)}function rT(t){var e=t.x,n=t.y,i=t.circleCenter,r=n.start>n.end,o=t.isTransposed?t.convert({x:r?0:1,y:0}):t.convert({x:0,y:r?0:1}),a=[o.x-i.x,o.y-i.y],s=[1,0],l=o.y>i.y?nr.EU(a,s):-1*nr.EU(a,s),u=l+(e.end-e.start),c=Math.sqrt(Math.pow(o.x-i.x,2)+Math.pow(o.y-i.y,2));return{center:i,radius:c,startAngle:l,endAngle:u}}function rf(t,e){return(0,td.jn)(t)?!1!==t&&{}:(0,td.U2)(t,[e])}function rd(t,e){return(0,td.U2)(t,"position",e)}function rA(t,e){return(0,td.U2)(e,["title","text"],rs(t))}var rS=function(){function t(t,e){this.destroyed=!1,this.facets=[],this.view=t,this.cfg=(0,td.b$)({},this.getDefaultCfg(),e)}return t.prototype.init=function(){this.container||(this.container=this.createContainer());var t=this.view.getData();this.facets=this.generateFacets(t)},t.prototype.render=function(){this.renderViews()},t.prototype.update=function(){},t.prototype.clear=function(){this.clearFacetViews()},t.prototype.destroy=function(){this.clear(),this.container&&(this.container.remove(!0),this.container=void 0),this.destroyed=!0,this.view=void 0,this.facets=[]},t.prototype.facetToView=function(t){var e=t.region,n=t.data,i=t.padding,r=void 0===i?this.cfg.padding:i,o=this.view.createView({region:e,padding:r});o.data(n||[]),t.view=o,this.beforeEachView(o,t);var a=this.cfg.eachView;return a&&a(o,t),this.afterEachView(o,t),o},t.prototype.createContainer=function(){return this.view.getLayer(M.FORE).addGroup()},t.prototype.renderViews=function(){this.createFacetViews()},t.prototype.createFacetViews=function(){var t=this;return this.facets.map(function(e){return t.facetToView(e)})},t.prototype.clearFacetViews=function(){var t=this;(0,td.S6)(this.facets,function(e){e.view&&(t.view.removeView(e.view),e.view=void 0)})},t.prototype.parseSpacing=function(){var t=this.view.viewBBox,e=t.width,n=t.height;return this.cfg.spacing.map(function(t,i){return(0,td.hj)(t)?t/(0===i?e:n):parseFloat(t)/100})},t.prototype.getFieldValues=function(t,e){var n=[],i={};return(0,td.S6)(t,function(t){var r=t[e];(0,td.UM)(r)||i[r]||(n.push(r),i[r]=!0)}),n},t.prototype.getRegion=function(t,e,n,i){var r=this.parseSpacing(),o=r[0],a=r[1],s=(1+o)/(0===e?1:e)-o,l=(1+a)/(0===t?1:t)-a,u={x:(s+o)*n,y:(l+a)*i},c={x:u.x+s,y:u.y+l};return{start:u,end:c}},t.prototype.getDefaultCfg=function(){return{eachView:void 0,showTitle:!0,spacing:[0,0],padding:10,fields:[]}},t.prototype.getDefaultTitleCfg=function(){return{style:{fontSize:14,fill:"#666",fontFamily:this.view.getTheme().fontFamily}}},t.prototype.processAxis=function(t,e){var n=t.getOptions(),i=n.coordinate,r=t.geometries;if("rect"===(0,td.U2)(i,"type","rect")&&r.length){(0,td.UM)(n.axes)&&(n.axes={});var o=n.axes,a=r[0].getXYFields(),s=a[0],l=a[1],u=rf(o,s),c=rf(o,l);!1!==u&&(n.axes[s]=this.getXAxisOption(s,o,u,e)),!1!==c&&(n.axes[l]=this.getYAxisOption(l,o,c,e))}},t.prototype.getFacetDataFilter=function(t){return function(e){return(0,td.yW)(t,function(t){var n=t.field,i=t.value;return!!(0,td.UM)(i)||!n||e[n]===i})}},t}(),rR={},rg=function(t,e){rR[(0,td.vl)(t)]=e},rI=function(){function t(t,e){this.context=t,this.cfg=e,t.addAction(this)}return t.prototype.applyCfg=function(t){(0,td.f0)(this,t)},t.prototype.init=function(){this.applyCfg(this.cfg)},t.prototype.destroy=function(){this.context.removeAction(this),this.context=null},t}(),rO=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.execute=function(){this.callback&&this.callback(this.context)},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.callback=null},e}(rI),ry={};function rv(t){var e=ry[t];return(0,td.U2)(e,"ActionClass")}function rN(t,e,n){ry[t]={ActionClass:e,cfg:n}}function rC(t,e){for(var n=[t[0]],i=1,r=t.length;i=e||n.height>=e?n:null}function rD(t){var e,n=t.event.target;return n&&(e=n.get("element")),e}function rU(t){var e,n=t.event.target;return n&&(e=n.get("delegateObject")),e}function rb(t){var e=t.event.gEvent;return!e||!e.fromShape||!e.toShape||e.fromShape.get("element")!==e.toShape.get("element")}function rF(t){return t&&t.component&&t.component.isList()}function rB(t){return t&&t.component&&t.component.isSlider()}function rG(t){var e=t.event.target;return e&&"mask"===e.get("name")}function rw(t,e){if("path"===t.event.target.get("type")){var n,i,r,o,a=(o=(r=t.event.target).getCanvasBBox()).width>=e||o.height>=e?r.attr("path"):null;if(!a)return;return n=rY(t.view),i=rX(a),n.filter(function(t){var e,n,r=t.shape;return n="path"===r.get("type")?rX(r.attr("path")):[[(e=r.getCanvasBBox()).minX,e.minY],[e.maxX,e.minY],[e.maxX,e.maxY],[e.minX,e.maxY]],(0,iY.Wq)(i,n)})}var s=rP(t,e);return s?rW(t.view,s):null}function rH(t,e,n){var i=rP(t,n);if(!i)return null;var r=t.view,o=rJ(r,e,{x:i.x,y:i.y}),a=rJ(r,e,{x:i.maxX,y:i.maxY}),s={minX:o.x,minY:o.y,maxX:a.x,maxY:a.y};return rW(e,s)}function rY(t){var e=t.geometries,n=[];return(0,td.S6)(e,function(t){var e=t.elements;n=n.concat(e)}),t.views&&t.views.length&&(0,td.S6)(t.views,function(t){n=n.concat(rY(t))}),n}function rk(t,e){var n=t.geometries,i=[];return(0,td.S6)(n,function(t){var n=t.getElementsBy(function(t){return t.hasState(e)});i=i.concat(n)}),i}function rV(t,e){var n=t.getModel().data;return(0,td.kJ)(n)?n[0][e]:n[e]}function rW(t,e){var n=rY(t),i=[];return(0,td.S6)(n,function(t){var n=t.shape.getCanvasBBox();n.minX>e.maxX||n.maxXe.maxY||n.maxY=e.x&&t.y<=e.y&&t.maxY>e.y}function r$(t){var e=t.parent,n=null;return e&&(n=e.views.filter(function(e){return e!==t})),n}function rJ(t,e,n){var i=t.getCoordinate().invert(n);return e.getCoordinate().convert(i)}function rj(t,e,n,i){var r=!1;return(0,td.S6)(t,function(t){if(t[n]===e[n]&&t[i]===e[i])return r=!0,!1}),r}function rq(t,e){var n=t.getScaleByField(e);return!n&&t.views&&(0,td.S6)(t.views,function(t){if(n=rq(t,e))return!1}),n}var rQ=function(){function t(t){this.actions=[],this.event=null,this.cacheMap={},this.view=t}return t.prototype.cache=function(){for(var t=[],e=0;e=0&&e.splice(n,1)},t.prototype.getCurrentPoint=function(){var t=this.event;return t?t.target instanceof HTMLElement?this.view.getCanvas().getPointByClient(t.clientX,t.clientY):{x:t.x,y:t.y}:null},t.prototype.getCurrentShape=function(){return(0,td.U2)(this.event,["gEvent","shape"])},t.prototype.isInPlot=function(){var t=this.getCurrentPoint();return!!t&&this.view.isPointInPlot(t)},t.prototype.isInShape=function(t){var e=this.getCurrentShape();return!!e&&e.get("name")===t},t.prototype.isInComponent=function(t){var e=rK(this.view),n=this.getCurrentPoint();return!!n&&!!e.find(function(e){var i=e.getBBox();return t?e.get("name")===t&&rZ(i,n):rZ(i,n)})},t.prototype.destroy=function(){(0,td.S6)(this.actions.slice(),function(t){t.destroy()}),this.view=null,this.event=null,this.actions=null,this.cacheMap=null},t}(),r0=function(){function t(t,e){this.view=t,this.cfg=e}return t.prototype.init=function(){this.initEvents()},t.prototype.initEvents=function(){},t.prototype.clearEvents=function(){},t.prototype.destroy=function(){this.clearEvents()},t}();function r1(t,e,n){var i=t.split(":"),r=i[0],o=e.getAction(r)||function(t,e){var n=ry[t],i=null;if(n){var r=n.ActionClass,o=n.cfg;(i=new r(e,o)).name=t,i.init()}return i}(r,e);if(!o)throw Error("There is no action named "+r);return{action:o,methodName:i[1],arg:n}}function r2(t){var e=t.action,n=t.methodName,i=t.arg;if(e[n])e[n](i);else throw Error("Action("+e.name+") doesn't have a method called "+n)}var r5={START:"start",SHOW_ENABLE:"showEnable",END:"end",ROLLBACK:"rollback",PROCESSING:"processing"},r6=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.callbackCaches={},i.emitCaches={},i.steps=n,i}return(0,tf.ZT)(e,t),e.prototype.init=function(){this.initContext(),t.prototype.init.call(this)},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.steps=null,this.context&&(this.context.destroy(),this.context=null),this.callbackCaches=null,this.view=null},e.prototype.initEvents=function(){var t=this;(0,td.S6)(this.steps,function(e,n){(0,td.S6)(e,function(e){var i=t.getActionCallback(n,e);i&&t.bindEvent(e.trigger,i)})})},e.prototype.clearEvents=function(){var t=this;(0,td.S6)(this.steps,function(e,n){(0,td.S6)(e,function(e){var i=t.getActionCallback(n,e);i&&t.offEvent(e.trigger,i)})})},e.prototype.initContext=function(){var t=this.view,e=new rQ(t);this.context=e;var n=this.steps;(0,td.S6)(n,function(t){(0,td.S6)(t,function(t){if((0,td.mf)(t.action)){var n,i;t.actionObject={action:(n=t.action,(i=new rO(e)).callback=n,i.name="callback",i),methodName:"execute"}}else if((0,td.HD)(t.action))t.actionObject=r1(t.action,e,t.arg);else if((0,td.kJ)(t.action)){var r=t.action,o=(0,td.kJ)(t.arg)?t.arg:[t.arg];t.actionObject=[],(0,td.S6)(r,function(n,i){t.actionObject.push(r1(n,e,o[i]))})}})})},e.prototype.isAllowStep=function(t){var e=this.currentStepName,n=this.steps;if(e===t||t===r5.SHOW_ENABLE)return!0;if(t===r5.PROCESSING)return e===r5.START;if(t===r5.START)return e!==r5.PROCESSING;if(t===r5.END)return e===r5.PROCESSING||e===r5.START;if(t===r5.ROLLBACK){if(n[r5.END])return e===r5.END;if(e===r5.START)return!0}return!1},e.prototype.isAllowExecute=function(t,e){if(this.isAllowStep(t)){var n=this.getKey(t,e);return(!e.once||!this.emitCaches[n])&&(!e.isEnable||e.isEnable(this.context))}return!1},e.prototype.enterStep=function(t){this.currentStepName=t,this.emitCaches={}},e.prototype.afterExecute=function(t,e){t!==r5.SHOW_ENABLE&&this.currentStepName!==t&&this.enterStep(t);var n=this.getKey(t,e);this.emitCaches[n]=!0},e.prototype.getKey=function(t,e){return t+e.trigger+e.action},e.prototype.getActionCallback=function(t,e){var n=this,i=this.context,r=this.callbackCaches,o=e.actionObject;if(e.action&&o){var a=this.getKey(t,e);if(!r[a]){var s=function(r){i.event=r,n.isAllowExecute(t,e)?((0,td.kJ)(o)?(0,td.S6)(o,function(t){i.event=r,r2(t)}):(i.event=r,r2(o)),n.afterExecute(t,e),e.callback&&(i.event=r,e.callback(i))):i.event=null};e.debounce?r[a]=(0,td.Ds)(s,e.debounce.wait,e.debounce.immediate):e.throttle?r[a]=(0,td.P2)(s,e.throttle.wait,{leading:e.throttle.leading,trailing:e.throttle.trailing}):r[a]=s}return r[a]}return null},e.prototype.bindEvent=function(t,e){var n=t.split(":");"window"===n[0]?window.addEventListener(n[1],e):"document"===n[0]?document.addEventListener(n[1],e):this.view.on(t,e)},e.prototype.offEvent=function(t,e){var n=t.split(":");"window"===n[0]?window.removeEventListener(n[1],e):"document"===n[0]?document.removeEventListener(n[1],e):this.view.off(t,e)},e}(r0),r3={};function r4(t,e){r3[(0,td.vl)(t)]=e}function r8(t){var e,n={point:{default:{fill:t.pointFillColor,r:t.pointSize,stroke:t.pointBorderColor,lineWidth:t.pointBorder,fillOpacity:t.pointFillOpacity},active:{stroke:t.pointActiveBorderColor,lineWidth:t.pointActiveBorder},selected:{stroke:t.pointSelectedBorderColor,lineWidth:t.pointSelectedBorder},inactive:{fillOpacity:t.pointInactiveFillOpacity,strokeOpacity:t.pointInactiveBorderOpacity}},hollowPoint:{default:{fill:t.hollowPointFillColor,lineWidth:t.hollowPointBorder,stroke:t.hollowPointBorderColor,strokeOpacity:t.hollowPointBorderOpacity,r:t.hollowPointSize},active:{stroke:t.hollowPointActiveBorderColor,strokeOpacity:t.hollowPointActiveBorderOpacity},selected:{lineWidth:t.hollowPointSelectedBorder,stroke:t.hollowPointSelectedBorderColor,strokeOpacity:t.hollowPointSelectedBorderOpacity},inactive:{strokeOpacity:t.hollowPointInactiveBorderOpacity}},area:{default:{fill:t.areaFillColor,fillOpacity:t.areaFillOpacity,stroke:null},active:{fillOpacity:t.areaActiveFillOpacity},selected:{fillOpacity:t.areaSelectedFillOpacity},inactive:{fillOpacity:t.areaInactiveFillOpacity}},hollowArea:{default:{fill:null,stroke:t.hollowAreaBorderColor,lineWidth:t.hollowAreaBorder,strokeOpacity:t.hollowAreaBorderOpacity},active:{fill:null,lineWidth:t.hollowAreaActiveBorder},selected:{fill:null,lineWidth:t.hollowAreaSelectedBorder},inactive:{strokeOpacity:t.hollowAreaInactiveBorderOpacity}},interval:{default:{fill:t.intervalFillColor,fillOpacity:t.intervalFillOpacity},active:{stroke:t.intervalActiveBorderColor,lineWidth:t.intervalActiveBorder},selected:{stroke:t.intervalSelectedBorderColor,lineWidth:t.intervalSelectedBorder},inactive:{fillOpacity:t.intervalInactiveFillOpacity,strokeOpacity:t.intervalInactiveBorderOpacity}},hollowInterval:{default:{fill:t.hollowIntervalFillColor,stroke:t.hollowIntervalBorderColor,lineWidth:t.hollowIntervalBorder,strokeOpacity:t.hollowIntervalBorderOpacity},active:{stroke:t.hollowIntervalActiveBorderColor,lineWidth:t.hollowIntervalActiveBorder,strokeOpacity:t.hollowIntervalActiveBorderOpacity},selected:{stroke:t.hollowIntervalSelectedBorderColor,lineWidth:t.hollowIntervalSelectedBorder,strokeOpacity:t.hollowIntervalSelectedBorderOpacity},inactive:{stroke:t.hollowIntervalInactiveBorderColor,lineWidth:t.hollowIntervalInactiveBorder,strokeOpacity:t.hollowIntervalInactiveBorderOpacity}},line:{default:{stroke:t.lineBorderColor,lineWidth:t.lineBorder,strokeOpacity:t.lineBorderOpacity,fill:null,lineAppendWidth:10,lineCap:"round",lineJoin:"round"},active:{lineWidth:t.lineActiveBorder},selected:{lineWidth:t.lineSelectedBorder},inactive:{strokeOpacity:t.lineInactiveBorderOpacity}}},i={title:{autoRotate:!0,position:"center",spacing:t.axisTitleSpacing,style:{fill:t.axisTitleTextFillColor,fontSize:t.axisTitleTextFontSize,lineHeight:t.axisTitleTextLineHeight,textBaseline:"middle",fontFamily:t.fontFamily}},label:{autoRotate:!1,autoEllipsis:!1,autoHide:{type:"equidistance",cfg:{minGap:6}},offset:t.axisLabelOffset,style:{fill:t.axisLabelFillColor,fontSize:t.axisLabelFontSize,lineHeight:t.axisLabelLineHeight,fontFamily:t.fontFamily}},line:{style:{lineWidth:t.axisLineBorder,stroke:t.axisLineBorderColor}},grid:{line:{type:"line",style:{stroke:t.axisGridBorderColor,lineWidth:t.axisGridBorder,lineDash:t.axisGridLineDash}},alignTick:!0,animate:!0},tickLine:{style:{lineWidth:t.axisTickLineBorder,stroke:t.axisTickLineBorderColor},alignTick:!0,length:t.axisTickLineLength},subTickLine:null,animate:!0},r={title:null,marker:{symbol:"circle",spacing:t.legendMarkerSpacing,style:{r:t.legendCircleMarkerSize,fill:t.legendMarkerColor}},itemName:{spacing:5,style:{fill:t.legendItemNameFillColor,fontFamily:t.fontFamily,fontSize:t.legendItemNameFontSize,lineHeight:t.legendItemNameLineHeight,fontWeight:t.legendItemNameFontWeight,textAlign:"start",textBaseline:"middle"}},itemStates:{active:{nameStyle:{opacity:.8}},unchecked:{nameStyle:{fill:"#D8D8D8"},markerStyle:{fill:"#D8D8D8",stroke:"#D8D8D8"}},inactive:{nameStyle:{fill:"#D8D8D8"},markerStyle:{opacity:.2}}},flipPage:!0,pageNavigator:{marker:{style:{size:t.legendPageNavigatorMarkerSize,inactiveFill:t.legendPageNavigatorMarkerInactiveFillColor,inactiveOpacity:t.legendPageNavigatorMarkerInactiveFillOpacity,fill:t.legendPageNavigatorMarkerFillColor,opacity:t.legendPageNavigatorMarkerFillOpacity}},text:{style:{fill:t.legendPageNavigatorTextFillColor,fontSize:t.legendPageNavigatorTextFontSize}}},animate:!1,maxItemWidth:200,itemSpacing:t.legendItemSpacing,itemMarginBottom:t.legendItemMarginBottom,padding:t.legendPadding};return{background:t.backgroundColor,defaultColor:t.brandColor,subColor:t.subColor,semanticRed:t.paletteSemanticRed,semanticGreen:t.paletteSemanticGreen,padding:"auto",fontFamily:t.fontFamily,columnWidthRatio:.5,maxColumnWidth:null,minColumnWidth:null,roseWidthRatio:.9999999,multiplePieWidthRatio:1/1.3,colors10:t.paletteQualitative10,colors20:t.paletteQualitative20,sequenceColors:t.paletteSequence,shapes:{point:["hollow-circle","hollow-square","hollow-bowtie","hollow-diamond","hollow-hexagon","hollow-triangle","hollow-triangle-down","circle","square","bowtie","diamond","hexagon","triangle","triangle-down","cross","tick","plus","hyphen","line"],line:["line","dash","dot","smooth"],area:["area","smooth","line","smooth-line"],interval:["rect","hollow-rect","line","tick"]},sizes:[1,10],geometries:{interval:{rect:{default:{style:n.interval.default},active:{style:n.interval.active},inactive:{style:n.interval.inactive},selected:{style:function(t){var e=t.geometry.coordinate;if(e.isPolar&&e.isTransposed){var i=i3(t.getModel(),e),r=(i.startAngle+i.endAngle)/2,o=7.5*Math.cos(r),a=7.5*Math.sin(r);return{matrix:ne.vs(null,[["t",o,a]])}}return n.interval.selected}}},"hollow-rect":{default:{style:n.hollowInterval.default},active:{style:n.hollowInterval.active},inactive:{style:n.hollowInterval.inactive},selected:{style:n.hollowInterval.selected}},line:{default:{style:n.hollowInterval.default},active:{style:n.hollowInterval.active},inactive:{style:n.hollowInterval.inactive},selected:{style:n.hollowInterval.selected}},tick:{default:{style:n.hollowInterval.default},active:{style:n.hollowInterval.active},inactive:{style:n.hollowInterval.inactive},selected:{style:n.hollowInterval.selected}},funnel:{default:{style:n.interval.default},active:{style:n.interval.active},inactive:{style:n.interval.inactive},selected:{style:n.interval.selected}},pyramid:{default:{style:n.interval.default},active:{style:n.interval.active},inactive:{style:n.interval.inactive},selected:{style:n.interval.selected}}},line:{line:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},dot:{default:{style:(0,tf.pi)((0,tf.pi)({},n.line.default),{lineCap:null,lineDash:[1,1]})},active:{style:(0,tf.pi)((0,tf.pi)({},n.line.active),{lineCap:null,lineDash:[1,1]})},inactive:{style:(0,tf.pi)((0,tf.pi)({},n.line.inactive),{lineCap:null,lineDash:[1,1]})},selected:{style:(0,tf.pi)((0,tf.pi)({},n.line.selected),{lineCap:null,lineDash:[1,1]})}},dash:{default:{style:(0,tf.pi)((0,tf.pi)({},n.line.default),{lineCap:null,lineDash:[5.5,1]})},active:{style:(0,tf.pi)((0,tf.pi)({},n.line.active),{lineCap:null,lineDash:[5.5,1]})},inactive:{style:(0,tf.pi)((0,tf.pi)({},n.line.inactive),{lineCap:null,lineDash:[5.5,1]})},selected:{style:(0,tf.pi)((0,tf.pi)({},n.line.selected),{lineCap:null,lineDash:[5.5,1]})}},smooth:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},hv:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},vh:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},hvh:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},vhv:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}}},polygon:{polygon:{default:{style:n.interval.default},active:{style:n.interval.active},inactive:{style:n.interval.inactive},selected:{style:n.interval.selected}}},point:{circle:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},square:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},bowtie:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},diamond:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},hexagon:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},triangle:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},"triangle-down":{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},"hollow-circle":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-square":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-bowtie":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-diamond":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-hexagon":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-triangle":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-triangle-down":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},cross:{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},tick:{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},plus:{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},hyphen:{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},line:{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}}},area:{area:{default:{style:n.area.default},active:{style:n.area.active},inactive:{style:n.area.inactive},selected:{style:n.area.selected}},smooth:{default:{style:n.area.default},active:{style:n.area.active},inactive:{style:n.area.inactive},selected:{style:n.area.selected}},line:{default:{style:n.hollowArea.default},active:{style:n.hollowArea.active},inactive:{style:n.hollowArea.inactive},selected:{style:n.hollowArea.selected}},"smooth-line":{default:{style:n.hollowArea.default},active:{style:n.hollowArea.active},inactive:{style:n.hollowArea.inactive},selected:{style:n.hollowArea.selected}}},schema:{candle:{default:{style:n.hollowInterval.default},active:{style:n.hollowInterval.active},inactive:{style:n.hollowInterval.inactive},selected:{style:n.hollowInterval.selected}},box:{default:{style:n.hollowInterval.default},active:{style:n.hollowInterval.active},inactive:{style:n.hollowInterval.inactive},selected:{style:n.hollowInterval.selected}}},edge:{line:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},vhv:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},smooth:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},arc:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}}},violin:{violin:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},smooth:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},hollow:{default:{style:n.hollowArea.default},active:{style:n.hollowArea.active},inactive:{style:n.hollowArea.inactive},selected:{style:n.hollowArea.selected}},"hollow-smooth":{default:{style:n.hollowArea.default},active:{style:n.hollowArea.active},inactive:{style:n.hollowArea.inactive},selected:{style:n.hollowArea.selected}}}},components:{axis:{common:i,top:{position:"top",grid:null,title:null,verticalLimitLength:.5},bottom:{position:"bottom",grid:null,title:null,verticalLimitLength:.5},left:{position:"left",title:null,line:null,tickLine:null,verticalLimitLength:1/3},right:{position:"right",title:null,line:null,tickLine:null,verticalLimitLength:1/3},circle:{title:null,grid:(0,td.b$)({},i.grid,{line:{type:"line"}})},radius:{title:null,grid:(0,td.b$)({},i.grid,{line:{type:"circle"}})}},legend:{common:r,right:{layout:"vertical",padding:t.legendVerticalPadding},left:{layout:"vertical",padding:t.legendVerticalPadding},top:{layout:"horizontal",padding:t.legendHorizontalPadding},bottom:{layout:"horizontal",padding:t.legendHorizontalPadding},continuous:{title:null,background:null,track:{},rail:{type:"color",size:t.sliderRailHeight,defaultLength:t.sliderRailWidth,style:{fill:t.sliderRailFillColor,stroke:t.sliderRailBorderColor,lineWidth:t.sliderRailBorder}},label:{align:"rail",spacing:4,formatter:null,style:{fill:t.sliderLabelTextFillColor,fontSize:t.sliderLabelTextFontSize,lineHeight:t.sliderLabelTextLineHeight,textBaseline:"middle",fontFamily:t.fontFamily}},handler:{size:t.sliderHandlerWidth,style:{fill:t.sliderHandlerFillColor,stroke:t.sliderHandlerBorderColor}},slidable:!0,padding:r.padding}},tooltip:{showContent:!0,follow:!0,showCrosshairs:!1,showMarkers:!0,shared:!1,enterable:!1,position:"auto",marker:{symbol:"circle",stroke:"#fff",shadowBlur:10,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0,0,0,0.09)",lineWidth:2,r:4},crosshairs:{line:{style:{stroke:t.tooltipCrosshairsBorderColor,lineWidth:t.tooltipCrosshairsBorder}},text:null,textBackground:{padding:2,style:{fill:"rgba(0, 0, 0, 0.25)",lineWidth:0,stroke:null}},follow:!1},domStyles:((e={})[""+im]={position:"absolute",visibility:"hidden",zIndex:8,transition:"left 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s, top 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s",backgroundColor:t.tooltipContainerFillColor,opacity:t.tooltipContainerFillOpacity,boxShadow:t.tooltipContainerShadow,borderRadius:t.tooltipContainerBorderRadius+"px",color:t.tooltipTextFillColor,fontSize:t.tooltipTextFontSize+"px",fontFamily:t.fontFamily,lineHeight:t.tooltipTextLineHeight+"px",padding:"0 12px 0 12px"},e[""+iL]={marginBottom:"12px",marginTop:"12px"},e[""+i_]={margin:0,listStyleType:"none",padding:0},e[""+ix]={listStyleType:"none",padding:0,marginBottom:"12px",marginTop:"12px",marginLeft:0,marginRight:0},e[""+iM]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},e[""+iP]={display:"inline-block",float:"right",marginLeft:"30px"},e)},annotation:{arc:{style:{stroke:t.annotationArcBorderColor,lineWidth:t.annotationArcBorder},animate:!0},line:{style:{stroke:t.annotationLineBorderColor,lineDash:t.annotationLineDash,lineWidth:t.annotationLineBorder},text:{position:"start",autoRotate:!0,style:{fill:t.annotationTextFillColor,stroke:t.annotationTextBorderColor,lineWidth:t.annotationTextBorder,fontSize:t.annotationTextFontSize,textAlign:"start",fontFamily:t.fontFamily,textBaseline:"bottom"}},animate:!0},text:{style:{fill:t.annotationTextFillColor,stroke:t.annotationTextBorderColor,lineWidth:t.annotationTextBorder,fontSize:t.annotationTextFontSize,textBaseline:"middle",textAlign:"start",fontFamily:t.fontFamily},animate:!0},region:{top:!1,style:{lineWidth:t.annotationRegionBorder,stroke:t.annotationRegionBorderColor,fill:t.annotationRegionFillColor,fillOpacity:t.annotationRegionFillOpacity},animate:!0},image:{top:!1,animate:!0},dataMarker:{top:!0,point:{style:{r:3,stroke:t.brandColor,lineWidth:2}},line:{style:{stroke:t.annotationLineBorderColor,lineWidth:t.annotationLineBorder},length:t.annotationDataMarkerLineLength},text:{style:{textAlign:"start",fill:t.annotationTextFillColor,stroke:t.annotationTextBorderColor,lineWidth:t.annotationTextBorder,fontSize:t.annotationTextFontSize,fontFamily:t.fontFamily}},direction:"upward",autoAdjust:!0,animate:!0},dataRegion:{style:{region:{fill:t.annotationRegionFillColor,fillOpacity:t.annotationRegionFillOpacity},text:{textAlign:"center",textBaseline:"bottom",fill:t.annotationTextFillColor,stroke:t.annotationTextBorderColor,lineWidth:t.annotationTextBorder,fontSize:t.annotationTextFontSize,fontFamily:t.fontFamily}},animate:!0}},slider:{common:{padding:[8,8,8,8],backgroundStyle:{fill:t.cSliderBackgroundFillColor,opacity:t.cSliderBackgroundFillOpacity},foregroundStyle:{fill:t.cSliderForegroundFillColor,opacity:t.cSliderForegroundFillOpacity},handlerStyle:{width:t.cSliderHandlerWidth,height:t.cSliderHandlerHeight,fill:t.cSliderHandlerFillColor,opacity:t.cSliderHandlerFillOpacity,stroke:t.cSliderHandlerBorderColor,lineWidth:t.cSliderHandlerBorder,radius:t.cSliderHandlerBorderRadius,highLightFill:t.cSliderHandlerHighlightFillColor},textStyle:{fill:t.cSliderTextFillColor,opacity:t.cSliderTextFillOpacity,fontSize:t.cSliderTextFontSize,lineHeight:t.cSliderTextLineHeight,fontWeight:t.cSliderTextFontWeight,stroke:t.cSliderTextBorderColor,lineWidth:t.cSliderTextBorder}}},scrollbar:{common:{padding:[8,8,8,8]},default:{style:{trackColor:t.scrollbarTrackFillColor,thumbColor:t.scrollbarThumbFillColor}},hover:{style:{thumbColor:t.scrollbarThumbHighlightFillColor}}}},labels:{offset:12,style:{fill:t.labelFillColor,fontSize:t.labelFontSize,fontFamily:t.fontFamily,stroke:t.labelBorderColor,lineWidth:t.labelBorder},fillColorDark:t.labelFillColorDark,fillColorLight:t.labelFillColorLight,autoRotate:!0},innerLabels:{style:{fill:t.innerLabelFillColor,fontSize:t.innerLabelFontSize,fontFamily:t.fontFamily,stroke:t.innerLabelBorderColor,lineWidth:t.innerLabelBorder},autoRotate:!0},overflowLabels:{style:{fill:t.overflowLabelFillColor,fontSize:t.overflowLabelFontSize,fontFamily:t.fontFamily,stroke:t.overflowLabelBorderColor,lineWidth:t.overflowLabelBorder}},pieLabels:{labelHeight:14,offset:10,labelLine:{style:{lineWidth:t.labelLineBorder}},autoRotate:!0}}}var r9={100:"#000",95:"#0D0D0D",85:"#262626",65:"#595959",45:"#8C8C8C",25:"#BFBFBF",15:"#D9D9D9",6:"#F0F0F0"},r7={100:"#FFFFFF",95:"#F2F2F2",85:"#D9D9D9",65:"#A6A6A6",45:"#737373",25:"#404040",15:"#262626",6:"#0F0F0F"},ot=["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"],oe=["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"],on=["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"],oi=function(t){void 0===t&&(t={});var e=t.backgroundColor,n=t.subColor,i=t.paletteQualitative10,r=void 0===i?ot:i,o=t.paletteQualitative20,a=t.paletteSemanticRed,s=t.paletteSemanticGreen,l=t.paletteSemanticYellow,u=t.paletteSequence,c=t.fontFamily,E=t.brandColor,h=void 0===E?r[0]:E;return{backgroundColor:void 0===e?"transparent":e,brandColor:h,subColor:void 0===n?"rgba(0,0,0,0.05)":n,paletteQualitative10:r,paletteQualitative20:void 0===o?oe:o,paletteSemanticRed:void 0===a?"#F4664A":a,paletteSemanticGreen:void 0===s?"#30BF78":s,paletteSemanticYellow:void 0===l?"#FAAD14":l,paletteSequence:void 0===u?on:u,fontFamily:void 0===c?'"Segoe UI", Roboto, "Helvetica Neue", Arial,\n "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",\n "Noto Color Emoji"':c,axisLineBorderColor:r9[25],axisLineBorder:1,axisLineDash:null,axisTitleTextFillColor:r9[65],axisTitleTextFontSize:12,axisTitleTextLineHeight:12,axisTitleTextFontWeight:"normal",axisTitleSpacing:12,axisTickLineBorderColor:r9[25],axisTickLineLength:4,axisTickLineBorder:1,axisSubTickLineBorderColor:r9[15],axisSubTickLineLength:2,axisSubTickLineBorder:1,axisLabelFillColor:r9[45],axisLabelFontSize:12,axisLabelLineHeight:12,axisLabelFontWeight:"normal",axisLabelOffset:8,axisGridBorderColor:r9[15],axisGridBorder:1,axisGridLineDash:null,legendTitleTextFillColor:r9[45],legendTitleTextFontSize:12,legendTitleTextLineHeight:21,legendTitleTextFontWeight:"normal",legendMarkerColor:h,legendMarkerSpacing:8,legendMarkerSize:4,legendCircleMarkerSize:4,legendSquareMarkerSize:4,legendLineMarkerSize:5,legendItemNameFillColor:r9[65],legendItemNameFontSize:12,legendItemNameLineHeight:12,legendItemNameFontWeight:"normal",legendItemSpacing:24,legendItemMarginBottom:12,legendPadding:[8,8,8,8],legendHorizontalPadding:[8,0,8,0],legendVerticalPadding:[0,8,0,8],legendPageNavigatorMarkerSize:12,legendPageNavigatorMarkerInactiveFillColor:r9[100],legendPageNavigatorMarkerInactiveFillOpacity:.45,legendPageNavigatorMarkerFillColor:r9[100],legendPageNavigatorMarkerFillOpacity:1,legendPageNavigatorTextFillColor:r9[45],legendPageNavigatorTextFontSize:12,sliderRailFillColor:r9[15],sliderRailBorder:0,sliderRailBorderColor:null,sliderRailWidth:100,sliderRailHeight:12,sliderLabelTextFillColor:r9[45],sliderLabelTextFontSize:12,sliderLabelTextLineHeight:12,sliderLabelTextFontWeight:"normal",sliderHandlerFillColor:r9[6],sliderHandlerWidth:10,sliderHandlerHeight:14,sliderHandlerBorder:1,sliderHandlerBorderColor:r9[25],annotationArcBorderColor:r9[15],annotationArcBorder:1,annotationLineBorderColor:r9[25],annotationLineBorder:1,annotationLineDash:null,annotationTextFillColor:r9[65],annotationTextFontSize:12,annotationTextLineHeight:12,annotationTextFontWeight:"normal",annotationTextBorderColor:null,annotationTextBorder:0,annotationRegionFillColor:r9[100],annotationRegionFillOpacity:.06,annotationRegionBorder:0,annotationRegionBorderColor:null,annotationDataMarkerLineLength:16,tooltipCrosshairsBorderColor:r9[25],tooltipCrosshairsBorder:1,tooltipCrosshairsLineDash:null,tooltipContainerFillColor:"rgb(255, 255, 255)",tooltipContainerFillOpacity:.95,tooltipContainerShadow:"0px 0px 10px #aeaeae",tooltipContainerBorderRadius:3,tooltipTextFillColor:r9[65],tooltipTextFontSize:12,tooltipTextLineHeight:12,tooltipTextFontWeight:"bold",labelFillColor:r9[65],labelFillColorDark:"#2c3542",labelFillColorLight:"#ffffff",labelFontSize:12,labelLineHeight:12,labelFontWeight:"normal",labelBorderColor:null,labelBorder:0,innerLabelFillColor:r7[100],innerLabelFontSize:12,innerLabelLineHeight:12,innerLabelFontWeight:"normal",innerLabelBorderColor:null,innerLabelBorder:0,overflowLabelFillColor:r9[65],overflowLabelFontSize:12,overflowLabelLineHeight:12,overflowLabelFontWeight:"normal",overflowLabelBorderColor:r7[100],overflowLabelBorder:1,labelLineBorder:1,labelLineBorderColor:r9[25],cSliderRailHieght:16,cSliderBackgroundFillColor:"#416180",cSliderBackgroundFillOpacity:.05,cSliderForegroundFillColor:"#5B8FF9",cSliderForegroundFillOpacity:.15,cSliderHandlerHeight:24,cSliderHandlerWidth:10,cSliderHandlerFillColor:"#F7F7F7",cSliderHandlerFillOpacity:1,cSliderHandlerHighlightFillColor:"#FFF",cSliderHandlerBorderColor:"#BFBFBF",cSliderHandlerBorder:1,cSliderHandlerBorderRadius:2,cSliderTextFillColor:"#000",cSliderTextFillOpacity:.45,cSliderTextFontSize:12,cSliderTextLineHeight:12,cSliderTextFontWeight:"normal",cSliderTextBorderColor:null,cSliderTextBorder:0,scrollbarTrackFillColor:"rgba(0,0,0,0)",scrollbarThumbFillColor:"rgba(0,0,0,0.15)",scrollbarThumbHighlightFillColor:"rgba(0,0,0,0.2)",pointFillColor:h,pointFillOpacity:.95,pointSize:4,pointBorder:1,pointBorderColor:r7[100],pointBorderOpacity:1,pointActiveBorderColor:r9[100],pointSelectedBorder:2,pointSelectedBorderColor:r9[100],pointInactiveFillOpacity:.3,pointInactiveBorderOpacity:.3,hollowPointSize:4,hollowPointBorder:1,hollowPointBorderColor:h,hollowPointBorderOpacity:.95,hollowPointFillColor:r7[100],hollowPointActiveBorder:1,hollowPointActiveBorderColor:r9[100],hollowPointActiveBorderOpacity:1,hollowPointSelectedBorder:2,hollowPointSelectedBorderColor:r9[100],hollowPointSelectedBorderOpacity:1,hollowPointInactiveBorderOpacity:.3,lineBorder:2,lineBorderColor:h,lineBorderOpacity:1,lineActiveBorder:3,lineSelectedBorder:3,lineInactiveBorderOpacity:.3,areaFillColor:h,areaFillOpacity:.25,areaActiveFillColor:h,areaActiveFillOpacity:.5,areaSelectedFillColor:h,areaSelectedFillOpacity:.5,areaInactiveFillOpacity:.3,hollowAreaBorderColor:h,hollowAreaBorder:2,hollowAreaBorderOpacity:1,hollowAreaActiveBorder:3,hollowAreaActiveBorderColor:r9[100],hollowAreaSelectedBorder:3,hollowAreaSelectedBorderColor:r9[100],hollowAreaInactiveBorderOpacity:.3,intervalFillColor:h,intervalFillOpacity:.95,intervalActiveBorder:1,intervalActiveBorderColor:r9[100],intervalActiveBorderOpacity:1,intervalSelectedBorder:2,intervalSelectedBorderColor:r9[100],intervalSelectedBorderOpacity:1,intervalInactiveBorderOpacity:.3,intervalInactiveFillOpacity:.3,hollowIntervalBorder:2,hollowIntervalBorderColor:h,hollowIntervalBorderOpacity:1,hollowIntervalFillColor:r7[100],hollowIntervalActiveBorder:2,hollowIntervalActiveBorderColor:r9[100],hollowIntervalSelectedBorder:3,hollowIntervalSelectedBorderColor:r9[100],hollowIntervalSelectedBorderOpacity:1,hollowIntervalInactiveBorderOpacity:.3}};function or(t){var e=t.styleSheet,n=(0,tf._T)(t,["styleSheet"]),i=oi(void 0===e?{}:e);return(0,td.b$)({},r8(i),n)}oi();var oo={default:or({})};function oa(t){return(0,td.U2)(oo,(0,td.vl)(t),oo.default)}function os(t,e,n){var i=n.translate(t),r=n.translate(e);return(0,td.vQ)(i,r)}function ol(t,e,n){var i=n.coordinate,r=n.getYScale(),o=r.field,a=i.invert(e),s=r.invert(a.y);return(0,td.sE)(t,function(t){var e=t[tR];return e[o][0]<=s&&e[o][1]>=s})||t[t.length-1]}var ou=(0,td.HP)(function(t){if(t.isCategory)return 1;for(var e=t.values,n=e.length,i=t.translate(e[0]),r=i,o=0;or&&(r=s)}return(r-i)/(n-1)});function oc(t){for(var e,n,i=(e=(0,td.VO)(t.attributes),(0,td.hX)(e,function(t){return(0,td.FX)(tS,t.type)})),r=0;r(1+a)/2&&(l=s),r.translate(r.invert(l))),C=y[tR][h],m=y[tR][p],L=v[tR][h],_=E.isLinear&&(0,td.kJ)(m);if((0,td.kJ)(C)){for(var R=0;R=N){if(_)(0,td.kJ)(T)||(T=[]),T.push(x);else{T=x;break}}}(0,td.kJ)(T)&&(T=ol(T,t,n))}else{var M=void 0;if(c.isLinear||"timeCat"===c.type){if((N>c.translate(L)||Nc.max||NMath.abs(c.translate(M[tR][h])-N)&&(v=M)}var F=ou(n.getXScale());return!T&&Math.abs(c.translate(v[tR][h])-N)<=F/2&&(T=v),T}function oh(t,e,n,i){void 0===n&&(n=""),void 0===i&&(i=!1);var r,o,a,s,l,u,c,E,h,p=t[tR],T=(r=n,o=e.getAttribute("position").getFields(),l=(s=e.scales[a=(0,td.mf)(r)||!r?o[0]:r])?s.getText(p[a]):p[a]||a,(0,td.mf)(r)?r(l,p):l),f=e.tooltipOption,d=e.theme.defaultColor,A=[];function S(e,n){if(i||!(0,td.UM)(n)&&""!==n){var r={title:T,data:p,mappingData:t,name:e,value:n,color:t.color||d,marker:!0};A.push(r)}}if((0,td.Kn)(f)){var R=f.fields,g=f.callback;if(g){var I=R.map(function(e){return t[tR][e]}),O=g.apply(void 0,I),y=(0,tf.pi)({data:t[tR],mappingData:t,title:T,color:t.color||d,marker:!0},O);A.push(y)}else for(var v=e.scales,N=0;N');y.appendChild(v);var N=tv(y,s,r,o),C=new(function(t){var e=tg[t];if(!e)throw Error("G engine '"+t+"' is not exist, please register it at first.");return e}(E)).Canvas((0,tf.pi)({container:v,pixelRatio:h,localRefresh:T,supportCSSTransform:void 0!==d&&d},N));return(n=t.call(this,{parent:null,canvas:C,backgroundGroup:C.addGroup({zIndex:tA.BG}),middleGroup:C.addGroup({zIndex:tA.MID}),foregroundGroup:C.addGroup({zIndex:tA.FORE}),padding:l,appendPadding:u,visible:void 0===f||f,options:R,limitInPlot:g,theme:I,syncViewPadding:O})||this).onResize=(0,td.Ds)(function(){n.forceFit()},300),n.ele=y,n.canvas=C,n.width=N.width,n.height=N.height,n.autoFit=s,n.localRefresh=T,n.renderer=E,n.wrapperElement=v,n.updateCanvasStyle(),n.bindAutoFit(),n.initDefaultInteractions(S),n}return(0,tf.ZT)(e,t),e.prototype.initDefaultInteractions=function(t){var e=this;(0,td.S6)(t,function(t){e.interaction(t)})},e.prototype.aria=function(t){var e="aria-label";!1===t?this.ele.removeAttribute(e):this.ele.setAttribute(e,t.label)},e.prototype.changeSize=function(t,e){return this.width===t&&this.height===e||(this.emit(U.BEFORE_CHANGE_SIZE),this.width=t,this.height=e,this.canvas.changeSize(t,e),this.render(!0),this.emit(U.AFTER_CHANGE_SIZE)),this},e.prototype.clear=function(){t.prototype.clear.call(this),this.aria(!1)},e.prototype.destroy=function(){var e,n;t.prototype.destroy.call(this),this.unbindAutoFit(),this.canvas.destroy(),(n=(e=this.wrapperElement).parentNode)&&n.removeChild(e),this.wrapperElement=null},e.prototype.changeVisible=function(e){return t.prototype.changeVisible.call(this,e),this.wrapperElement.style.display=e?"":"none",this},e.prototype.forceFit=function(){if(!this.destroyed){var t=tv(this.ele,!0,this.width,this.height),e=t.width,n=t.height;this.changeSize(e,n)}},e.prototype.updateCanvasStyle=function(){tO(this.canvas.get("el"),{display:"inline-block",verticalAlign:"middle"})},e.prototype.bindAutoFit=function(){this.autoFit&&window.addEventListener("resize",this.onResize)},e.prototype.unbindAutoFit=function(){this.autoFit&&window.removeEventListener("resize",this.onResize)},e}(ov),om=function(){function t(t){this.visible=!0,this.components=[],this.view=t}return t.prototype.clear=function(t){(0,td.S6)(this.components,function(t){t.component.destroy()}),this.components=[]},t.prototype.destroy=function(){this.clear()},t.prototype.getComponents=function(){return this.components},t.prototype.changeVisible=function(t){this.visible!==t&&(this.components.forEach(function(e){t?e.component.show():e.component.hide()}),this.visible=t)},t}(),oL=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isLocked=!1,e}return(0,tf.ZT)(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return"tooltip"},enumerable:!1,configurable:!0}),e.prototype.init=function(){},e.prototype.isVisible=function(){return!1!==this.view.getOptions().tooltip},e.prototype.render=function(){},e.prototype.showTooltip=function(t){if(this.point=t,this.isVisible()){var e=this.view,n=this.getTooltipItems(t);if(!n.length){this.hideTooltip();return}var i=this.getTitle(n),r={x:n[0].x,y:n[0].y};e.emit("tooltip:show",oR.fromData(e,"tooltip:show",(0,tf.pi)({items:n,title:i},t)));var o=this.getTooltipCfg(),a=o.follow,s=o.showMarkers,l=o.showCrosshairs,u=o.showContent,c=o.marker,E=this.items,h=this.title;if((0,td.Xy)(h,i)&&(0,td.Xy)(E,n)?(this.tooltip&&a&&(this.tooltip.update(t),this.tooltip.show()),this.tooltipMarkersGroup&&this.tooltipMarkersGroup.show()):(e.emit("tooltip:change",oR.fromData(e,"tooltip:change",(0,tf.pi)({items:n,title:i},t))),((0,td.mf)(u)?u(n):u)&&(this.tooltip||this.renderTooltip(),this.tooltip.update((0,td.CD)({},o,{items:this.getItemsAfterProcess(n),title:i},a?t:{})),this.tooltip.show()),s&&this.renderTooltipMarkers(n,c)),this.items=n,this.title=i,l){var p=(0,td.U2)(o,["crosshairs","follow"],!1);this.renderCrosshairs(p?t:r,o)}}},e.prototype.hideTooltip=function(){if(!this.getTooltipCfg().follow){this.point=null;return}var t=this.tooltipMarkersGroup;t&&t.hide();var e=this.xCrosshair,n=this.yCrosshair;e&&e.hide(),n&&n.hide();var i=this.tooltip;i&&i.hide(),this.view.emit("tooltip:hide",oR.fromData(this.view,"tooltip:hide",{})),this.point=null},e.prototype.lockTooltip=function(){this.isLocked=!0,this.tooltip&&this.tooltip.setCapture(!0)},e.prototype.unlockTooltip=function(){this.isLocked=!1;var t=this.getTooltipCfg();this.tooltip&&this.tooltip.setCapture(t.capture)},e.prototype.isTooltipLocked=function(){return this.isLocked},e.prototype.clear=function(){var t=this.tooltip,e=this.xCrosshair,n=this.yCrosshair,i=this.tooltipMarkersGroup;t&&(t.hide(),t.clear()),e&&e.clear(),n&&n.clear(),i&&i.clear(),(null==t?void 0:t.get("customContent"))&&(this.tooltip.destroy(),this.tooltip=null),this.title=null,this.items=null},e.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),this.xCrosshair&&this.xCrosshair.destroy(),this.yCrosshair&&this.yCrosshair.destroy(),this.guideGroup&&this.guideGroup.remove(!0),this.reset()},e.prototype.reset=function(){this.items=null,this.title=null,this.tooltipMarkersGroup=null,this.tooltipCrosshairsGroup=null,this.xCrosshair=null,this.yCrosshair=null,this.tooltip=null,this.guideGroup=null,this.isLocked=!1,this.point=null},e.prototype.changeVisible=function(t){if(this.visible!==t){var e=this.tooltip,n=this.tooltipMarkersGroup,i=this.xCrosshair,r=this.yCrosshair;t?(e&&e.show(),n&&n.show(),i&&i.show(),r&&r.show()):(e&&e.hide(),n&&n.hide(),i&&i.hide(),r&&r.hide()),this.visible=t}},e.prototype.getTooltipItems=function(t){var e=this.findItemsFromView(this.view,t);if(e.length){e=(0,td.xH)(e);for(var n=0,i=e;n1){for(var c=e[0],E=Math.abs(t.y-c[0].y),h=0,p=e;h'+i+"":i}})},e.prototype.getTitle=function(t){var e=t[0].title||t[0].name;return this.title=e,e},e.prototype.renderTooltip=function(){var t=this.view.getCanvas(),e={start:{x:0,y:0},end:{x:t.get("width"),y:t.get("height")}},n=this.getTooltipCfg(),i=new iB((0,tf.pi)((0,tf.pi)({parent:t.get("el").parentNode,region:e},n),{visible:!1,crosshairs:null}));i.init(),this.tooltip=i},e.prototype.renderTooltipMarkers=function(t,e){for(var n=this.getTooltipMarkersGroup(),i=0;i-1)return;n.push(t),("active"===t||"selected"===t)&&(null==o||o.toFront())}else{if(-1===s)return;n.splice(s,1),("active"===t||"selected"===t)&&(this.geometry.zIndexReversed?o.setZIndex(this.geometry.elements.length-this.elementIndex):o.setZIndex(this.elementIndex))}var l=i.drawShape(a,r,this.getOffscreenGroup());n.length?this.syncShapeStyle(o,l,n,null):this.syncShapeStyle(o,l,["reset"],null),l.remove(!0);var u={state:t,stateStatus:e,element:this,target:this.container};this.container.emit("statechange",u),nu(this.shape,"statechange",u)},e.prototype.clearStates=function(){var t=this,e=this.states;(0,td.S6)(e,function(e){t.setState(e,!1)}),this.states=[]},e.prototype.hasState=function(t){return this.states.includes(t)},e.prototype.getStates=function(){return this.states},e.prototype.getData=function(){return this.data},e.prototype.getModel=function(){return this.model},e.prototype.getBBox=function(){var t=this.shape,e=this.labelShape,n={x:0,y:0,minX:0,minY:0,maxX:0,maxY:0,width:0,height:0};return t&&(n=t.getCanvasBBox()),e&&e.forEach(function(t){var e=t.getCanvasBBox();n.x=Math.min(e.x,n.x),n.y=Math.min(e.y,n.y),n.minX=Math.min(e.minX,n.minX),n.minY=Math.min(e.minY,n.minY),n.maxX=Math.max(e.maxX,n.maxX),n.maxY=Math.max(e.maxY,n.maxY)}),n.width=n.maxX-n.minX,n.height=n.maxY-n.minY,n},e.prototype.getStatesStyle=function(){if(!this.statesStyle){var t=this.shapeType,e=this.geometry,n=this.shapeFactory,i=e.stateOption,r=n.defaultShapeType,o=n.theme[t]||n.theme[r];this.statesStyle=(0,td.b$)({},o,i)}return this.statesStyle},e.prototype.getStateStyle=function(t,e){var n=this.getStatesStyle(),i=(0,td.U2)(n,[t,"style"],{}),r=i[e]||i;return(0,td.mf)(r)?r(this):r},e.prototype.getAnimateCfg=function(t){var e=this,n=this.animate;if(n){var i=n[t];return i?(0,tf.pi)((0,tf.pi)({},i),{callback:function(){var t;(0,td.mf)(i.callback)&&i.callback(),null===(t=e.geometry)||void 0===t||t.emit(b.AFTER_DRAW_ANIMATE)}}):i}return null},e.prototype.drawShape=function(t,e){void 0===e&&(e=!1);var n,i=this.shapeFactory,r=this.container,o=this.shapeType;if(this.shape=i.drawShape(o,t,r),this.shape){this.setShapeInfo(this.shape,t);var a=this.shape.cfg.name;a?(0,td.HD)(a)&&(this.shape.cfg.name=["element",a]):this.shape.cfg.name=["element",this.shapeFactory.geometryType];var s=e?"enter":"appear",l=this.getAnimateCfg(s);l&&(null===(n=this.geometry)||void 0===n||n.emit(b.BEFORE_DRAW_ANIMATE),oF(this.shape,l,{coordinate:i.coordinate,toAttrs:(0,tf.pi)({},this.shape.attr())}))}},e.prototype.getOffscreenGroup=function(){if(!this.offscreenGroup){var t=this.container.getGroupBase();this.offscreenGroup=new t({})}return this.offscreenGroup},e.prototype.setShapeInfo=function(t,e){var n=this;t.cfg.origin=e,t.cfg.element=this,t.isGroup()&&t.get("children").forEach(function(t){n.setShapeInfo(t,e)})},e.prototype.syncShapeStyle=function(t,e,n,i,r){var o,a=this;if(void 0===n&&(n=[]),void 0===r&&(r=0),t&&e){var s=t.get("clipShape"),l=e.get("clipShape");if(this.syncShapeStyle(s,l,n,i),t.isGroup())for(var u=t.get("children"),c=e.get("children"),E=0;E=a[u]?1:0,h=c>Math.PI?1:0,p=n.convert(s),T=rn(n,p);if(T>=.5){if(c===2*Math.PI){var f={x:(s.x+a.x)/2,y:(s.y+a.y)/2},d=n.convert(f);l.push(["A",T,T,0,h,E,d.x,d.y]),l.push(["A",T,T,0,h,E,p.x,p.y])}else l.push(["A",T,T,0,h,E,p.x,p.y])}return l}(n,t,s)):i.push(rC(t,s));break;case"a":i.push(rm(t,s));break;default:i.push(t)}}),r=i,(0,td.S6)(r,function(t,e){if("a"===t[0].toLowerCase()){var n=r[e-1],i=r[e+1];i&&"a"===i[0].toLowerCase()?n&&"l"===n[0].toLowerCase()&&(n[0]="M"):n&&"a"===n[0].toLowerCase()&&i&&"l"===i[0].toLowerCase()&&(i[0]="M")}}),l=i):(o=l,a=[],(0,td.S6)(o,function(t){switch(t[0].toLowerCase()){case"m":case"l":case"c":a.push(rC(t,s));break;case"a":a.push(rm(t,s));break;default:a.push(t)}}),l=a),l},parsePoint:function(t){return this.coordinate.convert(t)},parsePoints:function(t){var e=this.coordinate;return t.map(function(t){return e.convert(t)})},draw:function(t,e){}},oX={};function oK(t,e){var n=(0,td.jC)(t),i=(0,tf.pi)((0,tf.pi)((0,tf.pi)({},oV),e),{geometryType:t});return oX[n]=i,i}function oz(t,e,n){var i=oX[(0,td.jC)(t)],r=(0,tf.pi)((0,tf.pi)({},oW),n);return i[e]=r,r}function oZ(t){return oX[(0,td.jC)(t)]}function o$(t,e){return(0,td.G)(["color","shape","size","x","y","isInCircle","data","style","defaultStyle","points","mappingData"],function(n){return!(0,td.Xy)(t[n],e[n])})}function oJ(t){return(0,td.kJ)(t)?t:t.split("*")}function oj(t,e){for(var n=[],i=[],r=[],o=new Map,a=0;a=0?e:n<=0?n:0},e.prototype.createAttrOption=function(t,e,n){if((0,td.UM)(e)||(0,td.Kn)(e))(0,td.Kn)(e)&&(0,td.Xy)(Object.keys(e),["values"])?(0,td.t8)(this.attributeOption,t,{fields:e.values}):(0,td.t8)(this.attributeOption,t,e);else{var i={};(0,td.hj)(e)?i.values=[e]:i.fields=oJ(e),n&&((0,td.mf)(n)?i.callback=n:i.values=n),(0,td.t8)(this.attributeOption,t,i)}},e.prototype.initAttributes=function(){var t=this,e=this.attributes,n=this.attributeOption,i=this.theme,r=this.shapeType;this.groupScales=[];var o={},a=function(a){if(n.hasOwnProperty(a)){var s=n[a];if(!s)return{value:void 0};var l=(0,tf.pi)({},s),u=l.callback,c=l.values,E=l.fields,h=(void 0===E?[]:E).map(function(e){var n=t.scales[e];return n.isCategory&&!o[e]&&tS.includes(a)&&(t.groupScales.push(n),o[e]=!0),n});l.scales=h,"position"!==a&&1===h.length&&"identity"===h[0].type?l.values=h[0].values:u||c||("size"===a?l.values=i.sizes:"shape"===a?l.values=i.shapes[r]||[]:"color"===a&&(h.length?l.values=h[0].values.length<=10?i.colors10:i.colors20:l.values=i.colors10));var p=e4(a);e[a]=new p(l)}};for(var s in n){var l=a(s);if("object"==typeof l)return l.value}},e.prototype.processData=function(t){this.hasSorted=!1;for(var e=this.getAttribute("position").scales.filter(function(t){return t.isCategory}),n=this.groupData(t),i=[],r=0,o=n.length;ro&&(o=u)}var c=this.scaleDefs,E={};rt.max&&!(0,td.U2)(c,[i,"max"])&&(E.max=o),t.change(E)},e.prototype.beforeMapping=function(t){if(this.sortable&&this.sort(t),this.generatePoints)for(var e=0,n=t.length;e1)for(var c=0;c=e.getCount()&&!t.destroyed&&e.add(t)})})(E,u[e],{data:o,origin:a,animateCfg:c,coordinate:s}),i.shapesMap[e]=E}else{r.add(t);var h=(0,td.U2)(t.get("animateCfg"),n?"enter":"appear");h&&oF(t,h,{toAttrs:(0,tf.pi)({},t.attr()),coordinate:t.get("coordinate")})}delete l[e]}}),(0,td.S6)(l,function(t){var e=(0,td.U2)(t.get("animateCfg"),"leave");e?oF(t,e,{toAttrs:null,coordinate:t.get("coordinate")}):t.remove(!0)}),this.lastShapesMap=u,o.destroy()},t.prototype.clear=function(){this.container.clear(),this.shapesMap={},this.lastShapesMap={}},t.prototype.destroy=function(){this.container.destroy(),this.shapesMap=null,this.lastShapesMap=null},t.prototype.renderLabel=function(t,e){var n,i=t.id,r=t.elementId,o=t.data,a=t.mappingData,s=t.coordinate,l=t.animate,u=t.content,c={id:i,elementId:r,data:o,origin:(0,tf.pi)((0,tf.pi)({},a),{data:a[tR]}),coordinate:s},E=e.addGroup((0,tf.pi)({name:"label",animateCfg:!1!==this.animate&&null!==l&&!1!==l&&(0,td.b$)({},this.animate,l)},c));if(u.isGroup&&u.isGroup()||u.isShape&&u.isShape()){var h=u.getCanvasBBox(),p=h.width,T=h.height,f=(0,td.U2)(t,"textAlign","left"),d=t.x,A=t.y-T/2;"center"===f?d-=p/2:("right"===f||"end"===f)&&(d-=p),o0(u,d,A),n=u,E.add(u)}else{var S=(0,td.U2)(t,["style","fill"]);n=E.addShape("text",(0,tf.pi)({attrs:(0,tf.pi)((0,tf.pi)({x:t.x,y:t.y,textAlign:t.textAlign,textBaseline:(0,td.U2)(t,"textBaseline","middle"),text:t.content},t.style),{fill:(0,td.Ft)(S)?t.color:S})},c))}t.rotate&&o1(n,t.rotate),this.shapesMap[i]=E},t.prototype.doLayout=function(t,e){var n=this;if(this.layout){var i=(0,td.kJ)(this.layout)?this.layout:[this.layout];(0,td.S6)(i,function(i){var r=oH[(0,td.U2)(i,"type","").toLowerCase()];if(r){var o=[],a=[];(0,td.S6)(n.shapesMap,function(t,n){o.push(t),a.push(e[t.get("elementId")])}),r(t,o,a,n.region,i.cfg)}})}},t.prototype.renderLabelLine=function(t){var e=this;(0,td.S6)(t,function(t){var n=(0,td.U2)(t,"coordinate");if(t&&n){var i=n.getCenter(),r=n.getRadius();if(t.labelLine){var o=(0,td.U2)(t,"labelLine",{}),a=t.id,s=o.path;if(!s){var l=i2(i.x,i.y,r,t.angle);s=[["M",l.x,l.y],["L",t.x,t.y]]}var u=e.shapesMap[a];u.destroyed||u.addShape("path",{capture:!1,attrs:(0,tf.pi)({path:s,stroke:t.color?t.color:(0,td.U2)(t,["style","fill"],"#000"),fill:null},o.style),id:a,origin:t.mappingData,data:t.data,coordinate:t.coordinate})}}})},t.prototype.renderLabelBackground=function(t){var e=this;(0,td.S6)(t,function(t){var n=(0,td.U2)(t,"coordinate"),i=(0,td.U2)(t,"background");if(i&&n){var r=t.id,o=e.shapesMap[r];if(!o.destroyed){var a=o.getChildren()[0];if(a){var s=o5(o,t,i.padding),l=s.rotation,u=(0,tf._T)(s,["rotation"]),c=o.addShape("rect",{attrs:(0,tf.pi)((0,tf.pi)({},u),i.style||{}),id:r,origin:t.mappingData,data:t.data,coordinate:t.coordinate});if(c.setZIndex(-1),l){var E=a.getMatrix();c.setMatrix(E)}}}}})},t.prototype.createOffscreenGroup=function(){return new(this.container.getGroupBase())({})},t.prototype.adjustLabel=function(t){var e=this;(0,td.S6)(t,function(t){if(t){var n=t.id,i=e.shapesMap[n];if(!i.destroyed){var r=i.findAll(function(t){return"path"!==t.get("type")});(0,td.S6)(r,function(e){e&&(t.offsetX&&e.attr("x",e.attr("x")+t.offsetX),t.offsetY&&e.attr("y",e.attr("y")+t.offsetY))})}}})},t}();function o3(t){var e=0;return(0,td.S6)(t,function(t){e+=t}),e/t.length}var o4=function(){function t(t){this.geometry=t}return t.prototype.getLabelItems=function(t){var e=this,n=[],i=this.getLabelCfgs(t);return(0,td.S6)(t,function(t,r){var o=i[r];if(!o||(0,td.UM)(t.x)||(0,td.UM)(t.y)){n.push(null);return}var a=(0,td.kJ)(o.content)?o.content:[o.content];o.content=a;var s=a.length;(0,td.S6)(a,function(i,r){if((0,td.UM)(i)||""===i){n.push(null);return}var a=(0,tf.pi)((0,tf.pi)({},o),e.getLabelPoint(o,t,r));a.textAlign||(a.textAlign=e.getLabelAlign(a,r,s)),a.offset<=0&&(a.labelLine=null),n.push(a)})}),n},t.prototype.render=function(t,e){void 0===e&&(e=!1);var n=this.getLabelItems(t),i=this.getLabelsRenderer(),r=this.getGeometryShapes();i.render(n,r,e)},t.prototype.clear=function(){var t=this.labelsRenderer;t&&t.clear()},t.prototype.destroy=function(){var t=this.labelsRenderer;t&&t.destroy(),this.labelsRenderer=null},t.prototype.getCoordinate=function(){return this.geometry.coordinate},t.prototype.getDefaultLabelCfg=function(t,e){var n=this.geometry,i=n.type,r=n.theme;return"polygon"===i||"interval"===i&&"middle"===e||t<0&&!["line","point","path"].includes(i)?(0,td.U2)(r,"innerLabels",{}):(0,td.U2)(r,"labels",{})},t.prototype.getThemedLabelCfg=function(t){var e=this.geometry,n=this.getDefaultLabelCfg(),i=e.type,r=e.theme;return"polygon"===i||t.offset<0&&!["line","point","path"].includes(i)?(0,td.b$)({},n,r.innerLabels,t):(0,td.b$)({},n,r.labels,t)},t.prototype.setLabelPosition=function(t,e,n,i){},t.prototype.getLabelOffset=function(t){var e=this.getCoordinate(),n=this.getOffsetVector(t);return e.isTransposed?n[0]:n[1]},t.prototype.getLabelOffsetPoint=function(t,e,n){var i=t.offset,r=this.getCoordinate().isTransposed,o=r?"x":"y",a=r?1:-1,s={x:0,y:0};return e>0||1===n?s[o]=i*a:s[o]=-(i*a*1),s},t.prototype.getLabelPoint=function(t,e,n){var i=this.getCoordinate(),r=t.content.length;function o(e,n,i){void 0===i&&(i=!1);var r=e;return(0,td.kJ)(r)&&(r=1===t.content.length?i?o3(r):r.length<=2?r[e.length-1]:o3(r):r[n]),r}var a={content:t.content[n],x:0,y:0,start:{x:0,y:0},color:"#fff"},s=(0,td.kJ)(e.shape)?e.shape[0]:e.shape,l="funnel"===s||"pyramid"===s;if("polygon"===this.geometry.type){var u=function(t,e){if((0,td.hj)(t)&&(0,td.hj)(e))return[t,e];if(i0(t)||i0(e))return[i1(t),i1(e)];for(var n,i,r=-1,o=0,a=0,s=t.length-1,l=0;++r1&&0===e&&("right"===i?i="left":"left"===i&&(i="right"))}return i},t.prototype.getLabelId=function(t){var e=this.geometry,n=e.type,i=e.getXScale(),r=e.getYScale(),o=t[tR],a=e.getElementId(t);return"line"===n||"area"===n?a+=" "+o[i.field]:"path"===n&&(a+=" "+o[i.field]+"-"+o[r.field]),a},t.prototype.getLabelsRenderer=function(){var t=this.geometry,e=t.labelsContainer,n=t.labelOption,i=t.canvasRegion,r=t.animateOption,o=this.geometry.coordinate,a=this.labelsRenderer;return a||(a=new o6({container:e,layout:(0,td.U2)(n,["cfg","layout"],{type:this.defaultLayout})}),this.labelsRenderer=a),a.region=i,a.animate=!!r&&ob("label",o),a},t.prototype.getLabelCfgs=function(t){var e=this,n=this.geometry,i=n.labelOption,r=n.scales,o=n.coordinate,a=i.fields,s=i.callback,l=i.cfg,u=a.map(function(t){return r[t]}),c=[];return(0,td.S6)(t,function(t,n){var i,r=t[tR],E=e.getLabelText(r,u);if(s){var h=a.map(function(t){return r[t]});if(i=s.apply(void 0,h),(0,td.UM)(i)){c.push(null);return}}var p=(0,tf.pi)((0,tf.pi)({id:e.getLabelId(t),elementId:e.geometry.getElementId(t),data:r,mappingData:t,coordinate:o},l),i);(0,td.mf)(p.position)&&(p.position=p.position(r,t,n));var T=e.getLabelOffset(p.offset||0),f=e.getDefaultLabelCfg(T,p.position);(p=(0,td.b$)({},f,p)).offset=e.getLabelOffset(p.offset||0);var d=p.content;(0,td.mf)(d)?p.content=d(r,t,n):(0,td.o8)(d)&&(p.content=E[0]),c.push(p)}),c},t.prototype.getLabelText=function(t,e){var n=[];return(0,td.S6)(e,function(e){var i=t[e.field];i=(0,td.kJ)(i)?i.map(function(t){return e.getText(t)}):e.getText(i),(0,td.UM)(i)||""===i?n.push(null):n.push(i)}),n},t.prototype.getOffsetVector=function(t){void 0===t&&(t=0);var e=this.getCoordinate(),n=0;return(0,td.hj)(t)&&(n=t),e.isTransposed?e.applyMatrix(n,0):e.applyMatrix(0,n)},t.prototype.getGeometryShapes=function(){var t=this.geometry,e={};return(0,td.S6)(t.elementsMap,function(t,n){e[n]=t.shape}),(0,td.S6)(t.getOffscreenGroup().getChildren(),function(n){e[t.getElementId(n.get("origin").mappingData)]=n}),e},t}();function o8(t,e,n){if(!t)return n;if(t.callback&&t.callback.length>1){var i,r=Array(t.callback.length-1).fill("");i=t.mapping.apply(t,(0,tf.ev)([e],r,!1)).join("")}else i=t.mapping(e).join("");return i||n}var o9={hexagon:function(t,e,n){var i=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+i,e-n/2],["L",t+i,e+n/2],["L",t,e+n],["L",t-i,e+n/2],["L",t-i,e-n/2],["Z"]]},bowtie:function(t,e,n){var i=n-1.5;return[["M",t-n,e-i],["L",t+n,e+i],["L",t+n,e-i],["L",t-n,e+i],["Z"]]},cross:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]},tick:function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]},plus:function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]},hyphen:function(t,e,n){return[["M",t-n,e],["L",t+n,e]]},line:function(t,e,n){return[["M",t,e-n],["L",t,e+n]]}},o7=["line","cross","tick","plus","hyphen"];function at(t){var e=t.symbol;(0,td.HD)(e)&&o9[e]&&(t.symbol=o9[e])}function ae(t){return t.startsWith(P.LEFT)||t.startsWith(P.RIGHT)?"vertical":"horizontal"}function an(t,e,n,i,r){var o=n.getScale(n.type);if(o.isCategory){var a=o.field,s=e.getAttribute("color"),l=e.getAttribute("shape"),u=t.getTheme().defaultColor,c=e.coordinate.isPolar;return o.getTicks().map(function(n,E){var h,p,T,f=n.text,d=n.value,A=o.invert(d),S=0===t.filterFieldData(a,[((T={})[a]=A,T)]).length;(0,td.S6)(t.views,function(t){var e;t.filterFieldData(a,[((e={})[a]=A,e)]).length||(S=!0)});var R=o8(s,A,u),g=o8(l,A,"point"),I=e.getShapeMarker(g,{color:R,isInPolar:c}),O=r;return(0,td.mf)(O)&&(O=O(f,E,(0,tf.pi)({name:f,value:A},(0,td.b$)({},i,I)))),!function(t,e){var n=t.symbol;if((0,td.HD)(n)&&-1!==o7.indexOf(n)){var i=(0,td.U2)(t,"style",{}),r=(0,td.U2)(i,"lineWidth",1),o=i.stroke||i.fill||e;t.style=(0,td.b$)({},t.style,{lineWidth:r,stroke:o,fill:null})}}(I=(0,td.b$)({},i,I,i9((0,tf.pi)({},O),["style"])),R),O&&O.style&&(I.style=(h=I.style,p=O.style,(0,td.mf)(p)?p(h):(0,td.b$)({},h,p))),at(I),{id:A,name:f,value:A,marker:I,unchecked:S}})}return[]}function ai(t,e){var n=(0,td.U2)(t,["components","legend"],{});return(0,td.b$)({},(0,td.U2)(n,["common"],{}),(0,td.b$)({},(0,td.U2)(n,[e],{})))}var ar={getLegendItems:an,translate:o0,rotate:o1,zoom:function(t,e){var n=t.getBBox(),i=(n.minX+n.maxX)/2,r=(n.minY+n.maxY)/2;t.applyToMatrix([i,r,1]);var o=oQ(t.getMatrix(),[["t",-i,-r],["s",e,e],["t",i,r]]);t.setMatrix(o)},transform:oQ,getAngle:i3,getSectorPath:i5,polarToCartesian:i2,getDelegationObject:rU,getTooltipItems:oh,getMappingValue:o8},ao={100:"#000",95:"#0D0D0D",85:"#262626",65:"#595959",45:"#8C8C8C",25:"#BFBFBF",15:"#D9D9D9",6:"#F0F0F0"},aa={100:"#FFFFFF",95:"#F2F2F2",85:"#D9D9D9",65:"#A6A6A6",45:"#737373",25:"#404040",15:"#262626",6:"#0F0F0F"},as=(void 0===E&&(E={}),h=E.backgroundColor,p=E.subColor,f=void 0===(T=E.paletteQualitative10)?["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#E86452","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"]:T,d=E.paletteQualitative20,A=E.paletteSemanticRed,S=E.paletteSemanticGreen,R=E.paletteSemanticYellow,g=E.paletteSequence,I=E.fontFamily,{backgroundColor:void 0===h?"#141414":h,brandColor:void 0===(O=E.brandColor)?f[0]:O,subColor:void 0===p?"rgba(255,255,255,0.05)":p,paletteQualitative10:f,paletteQualitative20:void 0===d?["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#E86452","#F8D0CB","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"]:d,paletteSemanticRed:void 0===A?"#F4664A":A,paletteSemanticGreen:void 0===S?"#30BF78":S,paletteSemanticYellow:void 0===R?"#FAAD14":R,paletteSequence:void 0===g?["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"]:g,fontFamily:void 0===I?'"Segoe UI", Roboto, "Helvetica Neue", Arial,\n "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",\n "Noto Color Emoji"':I,axisLineBorderColor:aa[25],axisLineBorder:1,axisLineDash:null,axisTitleTextFillColor:aa[65],axisTitleTextFontSize:12,axisTitleTextLineHeight:12,axisTitleTextFontWeight:"normal",axisTitleSpacing:12,axisTickLineBorderColor:aa[25],axisTickLineLength:4,axisTickLineBorder:1,axisSubTickLineBorderColor:aa[15],axisSubTickLineLength:2,axisSubTickLineBorder:1,axisLabelFillColor:aa[45],axisLabelFontSize:12,axisLabelLineHeight:12,axisLabelFontWeight:"normal",axisLabelOffset:8,axisGridBorderColor:aa[15],axisGridBorder:1,axisGridLineDash:null,legendTitleTextFillColor:aa[45],legendTitleTextFontSize:12,legendTitleTextLineHeight:21,legendTitleTextFontWeight:"normal",legendMarkerColor:"#5B8FF9",legendMarkerSpacing:8,legendMarkerSize:4,legendCircleMarkerSize:4,legendSquareMarkerSize:4,legendLineMarkerSize:5,legendItemNameFillColor:aa[65],legendItemNameFontSize:12,legendItemNameLineHeight:12,legendItemNameFontWeight:"normal",legendItemSpacing:24,legendItemMarginBottom:12,legendSpacing:16,legendPadding:[8,8,8,8],legendHorizontalPadding:[8,0,8,0],legendVerticalPadding:[0,8,0,8],legendPageNavigatorMarkerSize:12,legendPageNavigatorMarkerInactiveFillColor:aa[45],legendPageNavigatorMarkerInactiveFillOpacity:.45,legendPageNavigatorMarkerFillColor:aa[45],legendPageNavigatorMarkerFillOpacity:1,legendPageNavigatorTextFillColor:aa[65],legendPageNavigatorTextFontSize:12,sliderRailFillColor:aa[15],sliderRailBorder:0,sliderRailBorderColor:null,sliderRailWidth:100,sliderRailHeight:12,sliderLabelTextFillColor:aa[45],sliderLabelTextFontSize:12,sliderLabelTextLineHeight:12,sliderLabelTextFontWeight:"normal",sliderHandlerFillColor:ao[6],sliderHandlerWidth:10,sliderHandlerHeight:14,sliderHandlerBorder:1,sliderHandlerBorderColor:ao[25],annotationArcBorderColor:aa[15],annotationArcBorder:1,annotationLineBorderColor:aa[25],annotationLineBorder:1,annotationLineDash:null,annotationTextFillColor:aa[65],annotationTextFontSize:12,annotationTextLineHeight:12,annotationTextFontWeight:"normal",annotationTextBorderColor:null,annotationTextBorder:0,annotationRegionFillColor:aa[100],annotationRegionFillOpacity:.06,annotationRegionBorder:0,annotationRegionBorderColor:null,annotationDataMarkerLineLength:16,tooltipCrosshairsBorderColor:aa[25],tooltipCrosshairsBorder:1,tooltipCrosshairsLineDash:null,tooltipContainerFillColor:"#1f1f1f",tooltipContainerFillOpacity:.95,tooltipContainerShadow:"0px 2px 4px rgba(0,0,0,.5)",tooltipContainerBorderRadius:3,tooltipTextFillColor:aa[65],tooltipTextFontSize:12,tooltipTextLineHeight:12,tooltipTextFontWeight:"bold",labelFillColor:aa[65],labelFillColorDark:"#2c3542",labelFillColorLight:"#ffffff",labelFontSize:12,labelLineHeight:12,labelFontWeight:"normal",labelBorderColor:null,labelBorder:0,innerLabelFillColor:ao[100],innerLabelFontSize:12,innerLabelLineHeight:12,innerLabelFontWeight:"normal",innerLabelBorderColor:null,innerLabelBorder:0,overflowLabelFillColor:aa[65],overflowLabelFillColorDark:"#2c3542",overflowLabelFillColorLight:"#ffffff",overflowLabelFontSize:12,overflowLabelLineHeight:12,overflowLabelFontWeight:"normal",overflowLabelBorderColor:ao[100],overflowLabelBorder:1,labelLineBorder:1,labelLineBorderColor:aa[25],cSliderRailHieght:16,cSliderBackgroundFillColor:"#416180",cSliderBackgroundFillOpacity:.05,cSliderForegroundFillColor:"#5B8FF9",cSliderForegroundFillOpacity:.15,cSliderHandlerHeight:24,cSliderHandlerWidth:10,cSliderHandlerFillColor:"#F7F7F7",cSliderHandlerFillOpacity:1,cSliderHandlerHighlightFillColor:"#FFF",cSliderHandlerBorderColor:"#BFBFBF",cSliderHandlerBorder:1,cSliderHandlerBorderRadius:2,cSliderTextFillColor:"#fff",cSliderTextFillOpacity:.45,cSliderTextFontSize:12,cSliderTextLineHeight:12,cSliderTextFontWeight:"normal",cSliderTextBorderColor:null,cSliderTextBorder:0,scrollbarTrackFillColor:"rgba(255,255,255,0.65)",scrollbarThumbFillColor:"rgba(0,0,0,0.35)",scrollbarThumbHighlightFillColor:"rgba(0,0,0,0.45)",pointFillColor:"#5B8FF9",pointFillOpacity:.95,pointSize:4,pointBorder:1,pointBorderColor:ao[100],pointBorderOpacity:1,pointActiveBorderColor:aa[100],pointSelectedBorder:2,pointSelectedBorderColor:aa[100],pointInactiveFillOpacity:.3,pointInactiveBorderOpacity:.3,hollowPointSize:4,hollowPointBorder:1,hollowPointBorderColor:"#5B8FF9",hollowPointBorderOpacity:.95,hollowPointFillColor:ao[100],hollowPointActiveBorder:1,hollowPointActiveBorderColor:aa[100],hollowPointActiveBorderOpacity:1,hollowPointSelectedBorder:2,hollowPointSelectedBorderColor:aa[100],hollowPointSelectedBorderOpacity:1,hollowPointInactiveBorderOpacity:.3,lineBorder:2,lineBorderColor:"#5B8FF9",lineBorderOpacity:1,lineActiveBorder:3,lineSelectedBorder:3,lineInactiveBorderOpacity:.3,areaFillColor:"#5B8FF9",areaFillOpacity:.25,areaActiveFillColor:"#5B8FF9",areaActiveFillOpacity:.5,areaSelectedFillColor:"#5B8FF9",areaSelectedFillOpacity:.5,areaInactiveFillOpacity:.3,hollowAreaBorderColor:"#5B8FF9",hollowAreaBorder:2,hollowAreaBorderOpacity:1,hollowAreaActiveBorder:3,hollowAreaActiveBorderColor:aa[100],hollowAreaSelectedBorder:3,hollowAreaSelectedBorderColor:aa[100],hollowAreaInactiveBorderOpacity:.3,intervalFillColor:"#5B8FF9",intervalFillOpacity:.95,intervalActiveBorder:1,intervalActiveBorderColor:aa[100],intervalActiveBorderOpacity:1,intervalSelectedBorder:2,intervalSelectedBorderColor:aa[100],intervalSelectedBorderOpacity:1,intervalInactiveBorderOpacity:.3,intervalInactiveFillOpacity:.3,hollowIntervalBorder:2,hollowIntervalBorderColor:"#5B8FF9",hollowIntervalBorderOpacity:1,hollowIntervalFillColor:ao[100],hollowIntervalActiveBorder:2,hollowIntervalActiveBorderColor:aa[100],hollowIntervalSelectedBorder:3,hollowIntervalSelectedBorderColor:aa[100],hollowIntervalSelectedBorderOpacity:1,hollowIntervalInactiveBorderOpacity:.3});function al(t,e,n,i){var r=t-n,o=e-i;return Math.sqrt(r*r+o*o)}function au(t,e,n,i,r,o){return r>=t&&r<=t+n&&o>=e&&o<=e+i}function ac(t,e){return!(e.minX>t.maxX||e.maxXt.maxY||e.maxY1&&(n*=Math.sqrt(p),i*=Math.sqrt(p));var T=n*n*(h*h)+i*i*(E*E),f=T?Math.sqrt((n*n*(i*i)-T)/T):1;o===a&&(f*=-1),isNaN(f)&&(f=0);var d=i?f*n*h/i:0,A=n?-(f*i)*E/n:0,S=(s+u)/2+Math.cos(r)*d-Math.sin(r)*A,R=(l+c)/2+Math.sin(r)*d+Math.cos(r)*A,g=[(E-d)/n,(h-A)/i],I=[(-1*E-d)/n,(-1*h-A)/i],O=aR([1,0],g),y=aR(g,I);return -1>=aS(g,I)&&(y=Math.PI),aS(g,I)>=1&&(y=0),0===a&&y>0&&(y-=2*Math.PI),1===a&&y<0&&(y+=2*Math.PI),{cx:S,cy:R,rx:aE(t,[u,c])?0:n,ry:aE(t,[u,c])?0:i,startAngle:O,endAngle:O+y,xRotation:r,arcFlag:o,sweepFlag:a}}var aI=Math.sin,aO=Math.cos,ay=Math.atan2,av=Math.PI;function aN(t,e,n,i,r,o,a){var s=e.stroke,l=e.lineWidth,u=ay(i-o,n-r),c=new a0({type:"path",canvas:t.get("canvas"),isArrowShape:!0,attrs:{path:"M"+10*aO(av/6)+","+10*aI(av/6)+" L0,0 L"+10*aO(av/6)+",-"+10*aI(av/6),stroke:s,lineWidth:l}});c.translate(r,o),c.rotateAtPoint(r,o,u),t.set(a?"startArrowShape":"endArrowShape",c)}function aC(t,e,n,i,r,o,a){var s=e.startArrow,l=e.endArrow,u=e.stroke,c=e.lineWidth,E=a?s:l,h=E.d,p=E.fill,T=E.stroke,f=E.lineWidth,d=(0,tf._T)(E,["d","fill","stroke","lineWidth"]),A=ay(i-o,n-r);h&&(r-=aO(A)*h,o-=aI(A)*h);var S=new a0({type:"path",canvas:t.get("canvas"),isArrowShape:!0,attrs:(0,tf.pi)((0,tf.pi)({},d),{stroke:T||u,lineWidth:f||c,fill:p})});S.translate(r,o),S.rotateAtPoint(r,o,A),t.set(a?"startArrowShape":"endArrowShape",S)}function am(t,e,n,i,r){var o=ay(i-e,n-t);return{dx:aO(o)*r,dy:aI(o)*r}}function aL(t,e,n,i,r,o){"object"==typeof e.startArrow?aC(t,e,n,i,r,o,!0):e.startArrow?aN(t,e,n,i,r,o,!0):t.set("startArrowShape",null)}function a_(t,e,n,i,r,o){"object"==typeof e.endArrow?aC(t,e,n,i,r,o,!1):e.endArrow?aN(t,e,n,i,r,o,!1):t.set("startArrowShape",null)}var ax={fill:"fillStyle",stroke:"strokeStyle",opacity:"globalAlpha"};function aM(t,e){var n=e.attr();for(var i in n){var r=n[i],o=ax[i]?ax[i]:i;"matrix"===o&&r?t.transform(r[0],r[1],r[3],r[4],r[6],r[7]):"lineDash"===o&&t.setLineDash?(0,td.kJ)(r)&&t.setLineDash(r):("strokeStyle"===o||"fillStyle"===o?r=function(t,e,n){var i,r,o,a,s,l,u,c,E,h,p,T=e.getBBox();if(isNaN(T.x)||isNaN(T.y)||isNaN(T.width)||isNaN(T.height))return n;if((0,td.HD)(n)){if("("===n[1]||"("===n[2]){if("l"===n[0])return a=parseFloat((o=ah.exec(n))[1])%360*(Math.PI/180),s=o[2],l=e.getBBox(),a>=0&&a<.5*Math.PI?(i={x:l.minX,y:l.minY},r={x:l.maxX,y:l.maxY}):.5*Math.PI<=a&&ag?R:g,C=R>g?1:R/g,m=R>g?g/R:1;e.translate(A,S),e.rotate(y),e.scale(C,m),e.arc(0,0,N,I,O,1-v),e.scale(1/C,1/m),e.rotate(-y),e.translate(-A,-S)}break;case"Z":e.closePath()}if("Z"===h)s=l;else{var L=E.length;s=[E[L-2],E[L-1]]}}}}function ab(t,e){var n=t.get("canvas");n&&("remove"===e&&(t._cacheCanvasBBox=t.get("cacheCanvasBBox")),t.get("hasChanged")||(t.set("hasChanged",!0),!(t.cfg.parent&&t.cfg.parent.get("hasChanged"))&&(n.refreshElement(t,e,n),n.get("autoDraw")&&n.draw())))}var aF=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.onCanvasChange=function(t){ab(this,t)},e.prototype.getShapeBase=function(){return tc},e.prototype.getGroupBase=function(){return e},e.prototype._applyClip=function(t,e){e&&(t.save(),aM(t,e),e.createPath(t),t.restore(),t.clip(),e._afterDraw())},e.prototype.cacheCanvasBBox=function(){var t=this.cfg.children,e=[],n=[];(0,td.S6)(t,function(t){var i=t.cfg.cacheCanvasBBox;i&&t.cfg.isInView&&(e.push(i.minX,i.maxX),n.push(i.minY,i.maxY))});var i=null;if(e.length){var r=(0,td.VV)(e),o=(0,td.Fp)(e),a=(0,td.VV)(n),s=(0,td.Fp)(n);i={minX:r,minY:a,x:r,y:a,maxX:o,maxY:s,width:o-r,height:s-a};var l=this.cfg.canvas;if(l){var u=l.getViewRange();this.set("isInView",ac(i,u))}}else this.set("isInView",!1);this.set("cacheCanvasBBox",i)},e.prototype.draw=function(t,e){var n=this.cfg.children,i=!e||this.cfg.refresh;n.length&&i&&(t.save(),aM(t,this),this._applyClip(t,this.getClip()),aP(t,n,e),t.restore(),this.cacheCanvasBBox()),this.cfg.refresh=null,this.set("hasChanged",!1)},e.prototype.skipDraw=function(){this.set("cacheCanvasBBox",null),this.set("hasChanged",!1)},e}(tm.AbstractGroup),aB=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return(0,tf.pi)((0,tf.pi)({},e),{lineWidth:1,lineAppendWidth:0,strokeOpacity:1,fillOpacity:1})},e.prototype.getShapeBase=function(){return tc},e.prototype.getGroupBase=function(){return aF},e.prototype.onCanvasChange=function(t){ab(this,t)},e.prototype.calculateBBox=function(){var t=this.get("type"),e=this.getHitLineWidth(),n=(0,tm.getBBoxMethod)(t)(this),i=e/2,r=n.x-i,o=n.y-i,a=n.x+n.width+i,s=n.y+n.height+i;return{x:r,minX:r,y:o,minY:o,width:n.width+e,height:n.height+e,maxX:a,maxY:s}},e.prototype.isFill=function(){return!!this.attrs.fill||this.isClipShape()},e.prototype.isStroke=function(){return!!this.attrs.stroke},e.prototype._applyClip=function(t,e){e&&(t.save(),aM(t,e),e.createPath(t),t.restore(),t.clip(),e._afterDraw())},e.prototype.draw=function(t,e){var n=this.cfg.clipShape;if(e){if(!1===this.cfg.refresh){this.set("hasChanged",!1);return}if(!ac(e,this.getCanvasBBox())){this.set("hasChanged",!1),this.cfg.isInView&&this._afterDraw();return}}t.save(),aM(t,this),this._applyClip(t,n),this.drawPath(t),t.restore(),this._afterDraw()},e.prototype.getCanvasViewBox=function(){var t=this.cfg.canvas;return t?t.getViewRange():null},e.prototype.cacheCanvasBBox=function(){var t=this.getCanvasViewBox();if(t){var e=this.getCanvasBBox(),n=ac(e,t);this.set("isInView",n),n?this.set("cacheCanvasBBox",e):this.set("cacheCanvasBBox",null)}},e.prototype._afterDraw=function(){this.cacheCanvasBBox(),this.set("hasChanged",!1),this.set("refresh",null)},e.prototype.skipDraw=function(){this.set("cacheCanvasBBox",null),this.set("isInView",null),this.set("hasChanged",!1)},e.prototype.drawPath=function(t){this.createPath(t),this.strokeAndFill(t),this.afterDrawPath(t)},e.prototype.fill=function(t){t.fill()},e.prototype.stroke=function(t){t.stroke()},e.prototype.strokeAndFill=function(t){var e=this.attrs,n=e.lineWidth,i=e.opacity,r=e.strokeOpacity,o=e.fillOpacity;this.isFill()&&((0,td.UM)(o)||1===o?this.fill(t):(t.globalAlpha=o,this.fill(t),t.globalAlpha=i)),this.isStroke()&&n>0&&((0,td.UM)(r)||1===r||(t.globalAlpha=r),this.stroke(t)),this.afterDrawPath(t)},e.prototype.createPath=function(t){},e.prototype.afterDrawPath=function(t){},e.prototype.isInShape=function(t,e){var n=this.isStroke(),i=this.isFill(),r=this.getHitLineWidth();return this.isInStrokeOrPath(t,e,n,i,r)},e.prototype.isInStrokeOrPath=function(t,e,n,i,r){return!1},e.prototype.getHitLineWidth=function(){if(!this.isStroke())return 0;var t=this.attrs;return t.lineWidth+t.lineAppendWidth},e}(tm.AbstractShape),aG=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return(0,tf.pi)((0,tf.pi)({},e),{x:0,y:0,r:0})},e.prototype.isInStrokeOrPath=function(t,e,n,i,r){var o=this.attr(),a=o.x,s=o.y,l=o.r,u=r/2,c=al(a,s,t,e);return i&&n?c<=l+u:i?c<=l:!!n&&c>=l-u&&c<=l+u},e.prototype.createPath=function(t){var e=this.attr(),n=e.x,i=e.y,r=e.r;t.beginPath(),t.arc(n,i,r,0,2*Math.PI,!1),t.closePath()},e}(aB),aw=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return(0,tf.pi)((0,tf.pi)({},e),{x:0,y:0,rx:0,ry:0})},e.prototype.isInStrokeOrPath=function(t,e,n,i,r){var o,a,s,l,u,c,E=this.attr(),h=r/2,p=E.x,T=E.y,f=E.rx,d=E.ry,A=(t-p)*(t-p),S=(e-T)*(e-T);return i&&n?1>=A/((o=f+h)*o)+S/((a=d+h)*a):i?1>=A/(f*f)+S/(d*d):!!n&&A/((s=f-h)*s)+S/((l=d-h)*l)>=1&&1>=A/((u=f+h)*u)+S/((c=d+h)*c)},e.prototype.createPath=function(t){var e=this.attr(),n=e.x,i=e.y,r=e.rx,o=e.ry;if(t.beginPath(),t.ellipse)t.ellipse(n,i,r,o,0,0,2*Math.PI,!1);else{var a=r>o?r:o,s=r>o?1:r/o,l=r>o?o/r:1;t.save(),t.translate(n,i),t.scale(s,l),t.arc(0,0,a,0,2*Math.PI),t.restore(),t.closePath()}},e}(aB);function aH(t){return t instanceof HTMLElement&&(0,td.HD)(t.nodeName)&&"CANVAS"===t.nodeName.toUpperCase()}var aY=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return(0,tf.pi)((0,tf.pi)({},e),{x:0,y:0,width:0,height:0})},e.prototype.initAttrs=function(t){this._setImage(t.img)},e.prototype.isStroke=function(){return!1},e.prototype.isOnlyHitBox=function(){return!0},e.prototype._afterLoading=function(){if(!0===this.get("toDraw")){var t=this.get("canvas");t?t.draw():this.createPath(this.get("context"))}},e.prototype._setImage=function(t){var e=this,n=this.attrs;if((0,td.HD)(t)){var i=new Image;i.onload=function(){if(e.destroyed)return!1;e.attr("img",i),e.set("loading",!1),e._afterLoading();var t=e.get("callback");t&&t.call(e)},i.crossOrigin="Anonymous",i.src=t,this.set("loading",!0)}else t instanceof Image?(n.width||(n.width=t.width),n.height||(n.height=t.height)):aH(t)&&(n.width||(n.width=Number(t.getAttribute("width"))),n.height||(n.height,t.getAttribute("height")))},e.prototype.onAttrChange=function(e,n,i){t.prototype.onAttrChange.call(this,e,n,i),"img"===e&&this._setImage(n)},e.prototype.createPath=function(t){if(this.get("loading")){this.set("toDraw",!0),this.set("context",t);return}var e=this.attr(),n=e.x,i=e.y,r=e.width,o=e.height,a=e.sx,s=e.sy,l=e.swidth,u=e.sheight,c=e.img;(c instanceof Image||aH(c))&&((0,td.UM)(a)||(0,td.UM)(s)||(0,td.UM)(l)||(0,td.UM)(u)?t.drawImage(c,n,i,r,o):t.drawImage(c,a,s,l,u,n,i,r,o))},e}(aB),ak=n(32793);function aV(t,e,n,i,r,o,a){var s=Math.min(t,n),l=Math.max(t,n),u=Math.min(e,i),c=Math.max(e,i),E=r/2;return o>=s-E&&o<=l+E&&a>=u-E&&a<=c+E&&ak.x1.pointToLine(t,e,n,i,o,a)<=r/2}var aW=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return(0,tf.pi)((0,tf.pi)({},e),{x1:0,y1:0,x2:0,y2:0,startArrow:!1,endArrow:!1})},e.prototype.initAttrs=function(t){this.setArrow()},e.prototype.onAttrChange=function(e,n,i){t.prototype.onAttrChange.call(this,e,n,i),this.setArrow()},e.prototype.setArrow=function(){var t=this.attr(),e=t.x1,n=t.y1,i=t.x2,r=t.y2,o=t.startArrow,a=t.endArrow;o&&aL(this,t,i,r,e,n),a&&a_(this,t,e,n,i,r)},e.prototype.isInStrokeOrPath=function(t,e,n,i,r){if(!n||!r)return!1;var o=this.attr();return aV(o.x1,o.y1,o.x2,o.y2,r,t,e)},e.prototype.createPath=function(t){var e=this.attr(),n=e.x1,i=e.y1,r=e.x2,o=e.y2,a=e.startArrow,s=e.endArrow,l={dx:0,dy:0},u={dx:0,dy:0};a&&a.d&&(l=am(n,i,r,o,e.startArrow.d)),s&&s.d&&(u=am(n,i,r,o,e.endArrow.d)),t.beginPath(),t.moveTo(n+l.dx,i+l.dy),t.lineTo(r-u.dx,o-u.dy)},e.prototype.afterDrawPath=function(t){var e=this.get("startArrowShape"),n=this.get("endArrowShape");e&&e.draw(t),n&&n.draw(t)},e.prototype.getTotalLength=function(){var t=this.attr(),e=t.x1,n=t.y1,i=t.x2,r=t.y2;return ak.x1.length(e,n,i,r)},e.prototype.getPoint=function(t){var e=this.attr(),n=e.x1,i=e.y1,r=e.x2,o=e.y2;return ak.x1.pointAt(n,i,r,o,t)},e}(aB),aX={circle:function(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e]]},square:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]},diamond:function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]},triangle:function(t,e,n){var i=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+i],["L",t,e-i],["L",t+n,e+i],["Z"]]},"triangle-down":function(t,e,n){var i=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-i],["L",t+n,e-i],["L",t,e+i],["Z"]]}},aK=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.initAttrs=function(t){this._resetParamsCache()},e.prototype._resetParamsCache=function(){this.set("paramsCache",{})},e.prototype.onAttrChange=function(e,n,i){t.prototype.onAttrChange.call(this,e,n,i),-1!==["symbol","x","y","r","radius"].indexOf(e)&&this._resetParamsCache()},e.prototype.isOnlyHitBox=function(){return!0},e.prototype._getR=function(t){return(0,td.UM)(t.r)?t.radius:t.r},e.prototype._getPath=function(){var t,n,i=this.attr(),r=i.x,o=i.y,a=i.symbol||"circle",s=this._getR(i);if((0,td.mf)(a))n=(t=a)(r,o,s),n=(0,iY.wb)(n);else{if(!(t=e.Symbols[a]))return console.warn(a+" marker is not supported."),null;n=t(r,o,s)}return n},e.prototype.createPath=function(t){aU(this,t,{path:this._getPath()},this.get("paramsCache"))},e.Symbols=aX,e}(aB);function az(t,e,n){var i=(0,tm.getOffScreenContext)();return t.createPath(i),i.isPointInPath(e,n)}function aZ(t){return 1e-6>Math.abs(t)?0:t<0?-1:1}function a$(t,e,n){var i=!1,r=t.length;if(r<=2)return!1;for(var o=0;o0!=aZ(l[1]-n)>0&&0>aZ(e-(n-s[1])*(s[0]-l[0])/(s[1]-l[1])-s[0])&&(i=!i)}return i}function aJ(t,e,n,i,r,o,a,s){var l=(Math.atan2(s-e,a-t)+2*Math.PI)%(2*Math.PI);if(lr)return!1;var u={x:t+n*Math.cos(l),y:e+n*Math.sin(l)};return al(u.x,u.y,a,s)<=o/2}var aj=ne.vs,aq=(0,tf.pi)({hasArc:function(t){for(var e=!1,n=t.length,i=0;i0&&i.push(r),{polygons:n,polylines:i}},isPointInStroke:function(t,e,n,i,r){for(var o=!1,a=e/2,s=0;sA?d:A;e7(I,I,aj(null,[["t",-T,-f],["r",-g],["s",1/(d>A?1:d/A),1/(d>A?A/d:1)]])),o=aJ(0,0,O,S,R,e,I[0],I[1])}if(o)break}}return o}},tm.PathUtil);function aQ(t,e,n){for(var i=!1,r=0;r=i[0]&&t<=i[1]&&(e=(t-i[0])/(i[1]-i[0]),n=r)});var o=r[n];if((0,td.UM)(o)||(0,td.UM)(n))return null;var a=o.length,s=r[n+1];return ak.Ll.pointAt(o[a-2],o[a-1],s[1],s[2],s[3],s[4],s[5],s[6],e)},e.prototype._calculateCurve=function(){var t=this.attr().path;this.set("curve",aq.pathToCurve(t))},e.prototype._setTcache=function(){var t,e,n,i=0,r=0,o=[],a=this.get("curve");if(a){if((0,td.S6)(a,function(t,r){e=a[r+1],n=t.length,e&&(i+=ak.Ll.length(t[n-2],t[n-1],e[1],e[2],e[3],e[4],e[5],e[6])||0)}),this.set("totalLength",i),0===i){this.set("tCache",[]);return}(0,td.S6)(a,function(s,l){e=a[l+1],n=s.length,e&&((t=[])[0]=r/i,r+=ak.Ll.length(s[n-2],s[n-1],e[1],e[2],e[3],e[4],e[5],e[6])||0,t[1]=r/i,o.push(t))}),this.set("tCache",o)}},e.prototype.getStartTangent=function(){var t,e=this.getSegments();if(e.length>1){var n=e[0].currentPoint,i=e[1].currentPoint,r=e[1].startTangent;t=[],r?(t.push([n[0]-r[0],n[1]-r[1]]),t.push([n[0],n[1]])):(t.push([i[0],i[1]]),t.push([n[0],n[1]]))}return t},e.prototype.getEndTangent=function(){var t,e=this.getSegments(),n=e.length;if(n>1){var i=e[n-2].currentPoint,r=e[n-1].currentPoint,o=e[n-1].endTangent;t=[],o?(t.push([r[0]-o[0],r[1]-o[1]]),t.push([r[0],r[1]])):(t.push([i[0],i[1]]),t.push([r[0],r[1]]))}return t},e}(aB);function a1(t,e,n,i,r){var o=t.length;if(o<2)return!1;for(var a=0;a=i[0]&&t<=i[1]&&(e=(t-i[0])/(i[1]-i[0]),n=r)}),ak.x1.pointAt(i[n][0],i[n][1],i[n+1][0],i[n+1][1],e)},e.prototype._setTcache=function(){var t,e=this.attr().points;if(e&&0!==e.length){var n=this.getTotalLength();if(!(n<=0)){var i=0,r=[];(0,td.S6)(e,function(o,a){e[a+1]&&((t=[])[0]=i/n,i+=ak.x1.length(o[0],o[1],e[a+1][0],e[a+1][1]),t[1]=i/n,r.push(t))}),this.set("tCache",r)}}},e.prototype.getStartTangent=function(){var t=this.attr().points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.prototype.getEndTangent=function(){var t=this.attr().points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},e}(aB),a6=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return(0,tf.pi)((0,tf.pi)({},e),{x:0,y:0,width:0,height:0,radius:0})},e.prototype.isInStrokeOrPath=function(t,e,n,i,r){var o,a=this.attr(),s=a.x,l=a.y,u=a.width,c=a.height,E=a.radius;if(E){var h=!1;return n&&(h=aV(s+E,l,s+u-E,l,r,t,e)||aV(s+u,l+E,s+u,l+c-E,r,t,e)||aV(s+u-E,l+c,s+E,l+c,r,t,e)||aV(s,l+c-E,s,l+E,r,t,e)||aJ(s+u-E,l+E,E,1.5*Math.PI,2*Math.PI,r,t,e)||aJ(s+u-E,l+c-E,E,0,.5*Math.PI,r,t,e)||aJ(s+E,l+c-E,E,.5*Math.PI,Math.PI,r,t,e)||aJ(s+E,l+E,E,Math.PI,1.5*Math.PI,r,t,e)),!h&&i&&(h=az(this,t,e)),h}var p=r/2;return i&&n?au(s-p,l-p,u+p,c+p,t,e):i?au(s,l,u,c,t,e):n?au(s-(o=r/2),l-o,u,r,t,e)||au(s+u-o,l-o,r,c,t,e)||au(s+o,l+c-o,u,r,t,e)||au(s-o,l+o,r,c,t,e):void 0},e.prototype.createPath=function(t){var e=this.attr(),n=e.x,i=e.y,r=e.width,o=e.height,a=e.radius;if(t.beginPath(),0===a)t.rect(n,i,r,o);else{var s,l,u,c,E=(s=0,l=0,u=0,c=0,(0,td.kJ)(a)?1===a.length?s=l=u=c=a[0]:2===a.length?(s=u=a[0],l=c=a[1]):3===a.length?(s=a[0],l=c=a[1],u=a[2]):(s=a[0],l=a[1],u=a[2],c=a[3]):s=l=u=c=a,[s,l,u,c]),h=E[0],p=E[1],T=E[2],f=E[3];t.moveTo(n+h,i),t.lineTo(n+r-p,i),0!==p&&t.arc(n+r-p,i+p,p,-Math.PI/2,0),t.lineTo(n+r,i+o-T),0!==T&&t.arc(n+r-T,i+o-T,T,0,Math.PI/2),t.lineTo(n+f,i+o),0!==f&&t.arc(n+f,i+o-f,f,Math.PI/2,Math.PI),t.lineTo(n,i+h),0!==h&&t.arc(n+h,i+h,h,Math.PI,1.5*Math.PI),t.closePath()}},e}(aB),a3=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return(0,tf.pi)((0,tf.pi)({},e),{x:0,y:0,text:null,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom"})},e.prototype.isOnlyHitBox=function(){return!0},e.prototype.initAttrs=function(t){this._assembleFont(),t.text&&this._setText(t.text)},e.prototype._assembleFont=function(){var t=this.attrs;t.font=(0,tm.assembleFont)(t)},e.prototype._setText=function(t){var e=null;(0,td.HD)(t)&&-1!==t.indexOf("\n")&&(e=t.split("\n")),this.set("textArr",e)},e.prototype.onAttrChange=function(e,n,i){t.prototype.onAttrChange.call(this,e,n,i),e.startsWith("font")&&this._assembleFont(),"text"===e&&this._setText(n)},e.prototype._getSpaceingY=function(){var t=this.attrs,e=t.lineHeight,n=1*t.fontSize;return e?e-n:.14*n},e.prototype._drawTextArr=function(t,e,n){var i,r=this.attrs,o=r.textBaseline,a=r.x,s=r.y,l=1*r.fontSize,u=this._getSpaceingY(),c=(0,tm.getTextHeight)(r.text,r.fontSize,r.lineHeight);(0,td.S6)(e,function(e,r){i=s+r*(u+l)-c+l,"middle"===o&&(i+=c-l-(c-l)/2),"top"===o&&(i+=c-l),(0,td.UM)(e)||(n?t.fillText(e,a,i):t.strokeText(e,a,i))})},e.prototype._drawText=function(t,e){var n=this.attr(),i=n.x,r=n.y,o=this.get("textArr");if(o)this._drawTextArr(t,o,e);else{var a=n.text;(0,td.UM)(a)||(e?t.fillText(a,i,r):t.strokeText(a,i,r))}},e.prototype.strokeAndFill=function(t){var e=this.attrs,n=e.lineWidth,i=e.opacity,r=e.strokeOpacity,o=e.fillOpacity;this.isStroke()&&n>0&&((0,td.UM)(r)||1===r||(t.globalAlpha=i),this.stroke(t)),this.isFill()&&((0,td.UM)(o)||1===o?this.fill(t):(t.globalAlpha=o,this.fill(t),t.globalAlpha=i)),this.afterDrawPath(t)},e.prototype.fill=function(t){this._drawText(t,!0)},e.prototype.stroke=function(t){this._drawText(t,!1)},e}(aB);function a4(t,e,n){var i=t.getTotalMatrix();if(i){var r=function(t,e){if(e){var n=(0,tm.invert)(e);return(0,tm.multiplyVec2)(n,t)}return t}([e,n,1],i);return[r[0],r[1]]}return[e,n]}function a8(t,e,n){if(t.isCanvas&&t.isCanvas())return!0;if(!(0,tm.isAllowCapture)(t)||!1===t.cfg.isInView)return!1;if(t.cfg.clipShape){var i=a4(t,e,n),r=i[0],o=i[1];if(t.isClipped(r,o))return!1}var a=t.cfg.cacheCanvasBBox||t.getCanvasBBox();return e>=a.minX&&e<=a.maxX&&n>=a.minY&&n<=a.maxY}var a9=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.renderer="canvas",e.autoDraw=!0,e.localRefresh=!0,e.refreshElements=[],e.clipView=!0,e.quickHit=!1,e},e.prototype.onCanvasChange=function(t){("attr"===t||"sort"===t||"changeSize"===t)&&(this.set("refreshElements",[this]),this.draw())},e.prototype.getShapeBase=function(){return tc},e.prototype.getGroupBase=function(){return aF},e.prototype.getPixelRatio=function(){var t=this.get("pixelRatio")||(window?window.devicePixelRatio:1);return t>=1?Math.ceil(t):1},e.prototype.getViewRange=function(){return{minX:0,minY:0,maxX:this.cfg.width,maxY:this.cfg.height}},e.prototype.createDom=function(){var t=document.createElement("canvas"),e=t.getContext("2d");return this.set("context",e),t},e.prototype.setDOMSize=function(e,n){t.prototype.setDOMSize.call(this,e,n);var i=this.get("context"),r=this.get("el"),o=this.getPixelRatio();r.width=o*e,r.height=o*n,o>1&&i.scale(o,o)},e.prototype.clear=function(){t.prototype.clear.call(this),this._clearFrame();var e=this.get("context"),n=this.get("el");e.clearRect(0,0,n.width,n.height)},e.prototype.getShape=function(e,n){return this.get("quickHit")?function t(e,n,i){if(!a8(e,n,i))return null;for(var r=null,o=e.getChildren(),a=o.length,s=a-1;s>=0;s--){var l=o[s];if(l.isGroup())r=t(l,n,i);else if(a8(l,n,i)){var u=a4(l,n,i),c=u[0],E=u[1];l.isInShape(c,E)&&(r=l)}if(r)break}return r}(this,e,n):t.prototype.getShape.call(this,e,n,null)},e.prototype._getRefreshRegion=function(){var t,e,n=this.get("refreshElements"),i=this.getViewRange();return n.length&&n[0]===this?e=i:(e=function(t){if(!t.length)return null;var e=[],n=[],i=[],r=[];return(0,td.S6)(t,function(t){var o=function(t){var e;if(t.destroyed)e=t._cacheCanvasBBox;else{var n=t.get("cacheCanvasBBox"),i=n&&!!(n.width&&n.height),r=t.getCanvasBBox(),o=r&&!!(r.width&&r.height);i&&o?e=n&&r?{minX:Math.min(n.minX,r.minX),minY:Math.min(n.minY,r.minY),maxX:Math.max(n.maxX,r.maxX),maxY:Math.max(n.maxY,r.maxY)}:n||r:i?e=n:o&&(e=r)}return e}(t);o&&(e.push(o.minX),n.push(o.minY),i.push(o.maxX),r.push(o.maxY))}),{minX:(0,td.VV)(e),minY:(0,td.VV)(n),maxX:(0,td.Fp)(i),maxY:(0,td.Fp)(r)}}(n))&&(e.minX=Math.floor(e.minX),e.minY=Math.floor(e.minY),e.maxX=Math.ceil(e.maxX),e.maxY=Math.ceil(e.maxY),e.maxY+=1,this.get("clipView"))&&(e=(t=e)&&i&&ac(t,i)?{minX:Math.max(t.minX,i.minX),minY:Math.max(t.minY,i.minY),maxX:Math.min(t.maxX,i.maxX),maxY:Math.min(t.maxY,i.maxY)}:null),e},e.prototype.refreshElement=function(t){this.get("refreshElements").push(t)},e.prototype._clearFrame=function(){var t=this.get("drawFrame");t&&((0,td.VS)(t),this.set("drawFrame",null),this.set("refreshElements",[]))},e.prototype.draw=function(){var t=this.get("drawFrame");this.get("autoDraw")&&t||this._startDraw()},e.prototype._drawAll=function(){var t=this.get("context"),e=this.get("el"),n=this.getChildren();t.clearRect(0,0,e.width,e.height),aM(t,this),aP(t,n),this.set("refreshElements",[])},e.prototype._drawRegion=function(){var t,e,n=this.get("context"),i=this.get("refreshElements"),r=this.getChildren(),o=this._getRefreshRegion();o?(n.clearRect(o.minX,o.minY,o.maxX-o.minX,o.maxY-o.minY),n.save(),n.beginPath(),n.rect(o.minX,o.minY,o.maxX-o.minX,o.maxY-o.minY),n.clip(),aM(n,this),t=this,e=t.get("refreshElements"),(0,td.S6)(e,function(e){if(e!==t)for(var n=e.cfg.parent;n&&n!==t&&!n.cfg.refresh;)n.cfg.refresh=!0,n=n.cfg.parent}),e[0]===t?aD(r,o):function t(e,n){for(var i=0;ie)n.insertBefore(t,r);else if(o0&&(e?"stroke"in n?this._setColor(t,"stroke",o):"strokeStyle"in n&&this._setColor(t,"stroke",a):this._setColor(t,"stroke",o||a),l&&c.setAttribute(se.strokeOpacity,l),u&&c.setAttribute(se.lineWidth,u))},e.prototype._setColor=function(t,e,n){var i=this.get("el");if(!n){i.setAttribute(se[e],"none");return}if(n=n.trim(),/^[r,R,L,l]{1}[\s]*\(/.test(n)){var r=t.find("gradient",n);r||(r=t.addGradient(n)),i.setAttribute(se[e],"url(#"+r+")")}else if(/^[p,P]{1}[\s]*\(/.test(n)){var r=t.find("pattern",n);r||(r=t.addPattern(n)),i.setAttribute(se[e],"url(#"+r+")")}else i.setAttribute(se[e],n)},e.prototype.shadow=function(t,e){var n=this.attr(),i=e||n,r=i.shadowOffsetX,o=i.shadowOffsetY,a=i.shadowBlur,s=i.shadowColor;(r||o||a||s)&&function(t,e){var n=t.cfg.el,i=t.attr(),r={dx:i.shadowOffsetX,dy:i.shadowOffsetY,blur:i.shadowBlur,color:i.shadowColor};if(r.dx||r.dy||r.blur||r.color){var o=e.find("filter",r);o||(o=e.addShadow(r)),n.setAttribute("filter","url(#"+o+")")}else n.removeAttribute("filter")}(this,t)},e.prototype.transform=function(t){var e=this.attr();(t||e).matrix&&so(this)},e.prototype.isInShape=function(t,e){return this.isPointInPath(t,e)},e.prototype.isPointInPath=function(t,e){var n=this.get("el"),i=this.get("canvas").get("el").getBoundingClientRect(),r=t+i.left,o=e+i.top,a=document.elementFromPoint(r,o);return!!(a&&a.isEqualNode(n))},e.prototype.getHitLineWidth=function(){var t=this.attrs,e=t.lineWidth,n=t.lineAppendWidth;return this.isStroke()?e+n:0},e}(tm.AbstractShape),sE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="circle",e.canFill=!0,e.canStroke=!0,e}return(0,tf.ZT)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return(0,tf.pi)((0,tf.pi)({},e),{x:0,y:0,r:0})},e.prototype.createPath=function(t,e){var n=this.attr(),i=this.get("el");(0,td.S6)(e||n,function(t,e){"x"===e||"y"===e?i.setAttribute("c"+e,t):se[e]&&i.setAttribute(se[e],t)})},e}(sc),sh=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dom",e.canFill=!1,e.canStroke=!1,e}return(0,tf.ZT)(e,t),e.prototype.createPath=function(t,e){var n=this.attr(),i=this.get("el");if((0,td.S6)(e||n,function(t,e){se[e]&&i.setAttribute(se[e],t)}),"function"==typeof n.html){var r=n.html.call(this,n);if(r instanceof Element||r instanceof HTMLDocument){for(var o=i.childNodes,a=o.length-1;a>=0;a--)i.removeChild(o[a]);i.appendChild(r)}else i.innerHTML=r}else i.innerHTML=n.html},e}(sc),sp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ellipse",e.canFill=!0,e.canStroke=!0,e}return(0,tf.ZT)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return(0,tf.pi)((0,tf.pi)({},e),{x:0,y:0,rx:0,ry:0})},e.prototype.createPath=function(t,e){var n=this.attr(),i=this.get("el");(0,td.S6)(e||n,function(t,e){"x"===e||"y"===e?i.setAttribute("c"+e,t):se[e]&&i.setAttribute(se[e],t)})},e}(sc),sT=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="image",e.canFill=!1,e.canStroke=!1,e}return(0,tf.ZT)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return(0,tf.pi)((0,tf.pi)({},e),{x:0,y:0,width:0,height:0})},e.prototype.createPath=function(t,e){var n=this,i=this.attr(),r=this.get("el");(0,td.S6)(e||i,function(t,e){"img"===e?n._setImage(i.img):se[e]&&r.setAttribute(se[e],t)})},e.prototype.setAttr=function(t,e){this.attrs[t]=e,"img"===t&&this._setImage(e)},e.prototype._setImage=function(t){var e=this.attr(),n=this.get("el");if((0,td.HD)(t))n.setAttribute("href",t);else if(t instanceof window.Image)e.width||(n.setAttribute("width",t.width),this.attr("width",t.width)),e.height||(n.setAttribute("height",t.height),this.attr("height",t.height)),n.setAttribute("href",t.src);else if(t instanceof HTMLElement&&(0,td.HD)(t.nodeName)&&"CANVAS"===t.nodeName.toUpperCase())n.setAttribute("href",t.toDataURL());else if(t instanceof ImageData){var i=document.createElement("canvas");i.setAttribute("width",""+t.width),i.setAttribute("height",""+t.height),i.getContext("2d").putImageData(t,0,0),e.width||(n.setAttribute("width",""+t.width),this.attr("width",t.width)),e.height||(n.setAttribute("height",""+t.height),this.attr("height",t.height)),n.setAttribute("href",i.toDataURL())}},e}(sc),sf=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="line",e.canFill=!1,e.canStroke=!0,e}return(0,tf.ZT)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return(0,tf.pi)((0,tf.pi)({},e),{x1:0,y1:0,x2:0,y2:0,startArrow:!1,endArrow:!1})},e.prototype.createPath=function(t,e){var n=this.attr(),i=this.get("el");(0,td.S6)(e||n,function(e,r){if("startArrow"===r||"endArrow"===r){if(e){var o=(0,td.Kn)(e)?t.addArrow(n,se[r]):t.getDefaultArrow(n,se[r]);i.setAttribute(se[r],"url(#"+o+")")}else i.removeAttribute(se[r])}else se[r]&&i.setAttribute(se[r],e)})},e.prototype.getTotalLength=function(){var t=this.attr(),e=t.x1,n=t.y1,i=t.x2,r=t.y2;return ak.x1.length(e,n,i,r)},e.prototype.getPoint=function(t){var e=this.attr(),n=e.x1,i=e.y1,r=e.x2,o=e.y2;return ak.x1.pointAt(n,i,r,o,t)},e}(sc),sd={circle:function(t,e,n){return[["M",t,e],["m",-n,0],["a",n,n,0,1,0,2*n,0],["a",n,n,0,1,0,-(2*n),0]]},square:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]},diamond:function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]},triangle:function(t,e,n){var i=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+i],["L",t,e-i],["L",t+n,e+i],["z"]]},triangleDown:function(t,e,n){var i=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-i],["L",t+n,e-i],["L",t,e+i],["Z"]]}},sA={get:function(t){return sd[t]},register:function(t,e){sd[t]=e},remove:function(t){delete sd[t]},getAll:function(){return sd}},sS=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="marker",e.canFill=!0,e.canStroke=!0,e}return(0,tf.ZT)(e,t),e.prototype.createPath=function(t){this.get("el").setAttribute("d",this._assembleMarker())},e.prototype._assembleMarker=function(){var t=this._getPath();return(0,td.kJ)(t)?t.map(function(t){return t.join(" ")}).join(""):t},e.prototype._getPath=function(){var t,e=this.attr(),n=e.x,i=e.y,r=e.r||e.radius,o=e.symbol||"circle";return(t=(0,td.mf)(o)?o:sA.get(o))?t(n,i,r):(console.warn(t+" symbol is not exist."),null)},e.symbolsFactory=sA,e}(sc),sR=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="path",e.canFill=!0,e.canStroke=!0,e}return(0,tf.ZT)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return(0,tf.pi)((0,tf.pi)({},e),{startArrow:!1,endArrow:!1})},e.prototype.createPath=function(t,e){var n=this,i=this.attr(),r=this.get("el");(0,td.S6)(e||i,function(e,o){if("path"===o&&(0,td.kJ)(e))r.setAttribute("d",n._formatPath(e));else if("startArrow"===o||"endArrow"===o){if(e){var a=(0,td.Kn)(e)?t.addArrow(i,se[o]):t.getDefaultArrow(i,se[o]);r.setAttribute(se[o],"url(#"+a+")")}else r.removeAttribute(se[o])}else se[o]&&r.setAttribute(se[o],e)})},e.prototype._formatPath=function(t){var e=t.map(function(t){return t.join(" ")}).join("");return~e.indexOf("NaN")?"":e},e.prototype.getTotalLength=function(){var t=this.get("el");return t?t.getTotalLength():null},e.prototype.getPoint=function(t){var e=this.get("el"),n=this.getTotalLength();if(0===n)return null;var i=e?e.getPointAtLength(t*n):null;return i?{x:i.x,y:i.y}:null},e}(sc),sg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="polygon",e.canFill=!0,e.canStroke=!0,e}return(0,tf.ZT)(e,t),e.prototype.createPath=function(t,e){var n=this.attr(),i=this.get("el");(0,td.S6)(e||n,function(t,e){"points"===e&&(0,td.kJ)(t)&&t.length>=2?i.setAttribute("points",t.map(function(t){return t[0]+","+t[1]}).join(" ")):se[e]&&i.setAttribute(se[e],t)})},e}(sc),sI=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="polyline",e.canFill=!0,e.canStroke=!0,e}return(0,tf.ZT)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return(0,tf.pi)((0,tf.pi)({},e),{startArrow:!1,endArrow:!1})},e.prototype.onAttrChange=function(e,n,i){t.prototype.onAttrChange.call(this,e,n,i),-1!==["points"].indexOf(e)&&this._resetCache()},e.prototype._resetCache=function(){this.set("totalLength",null),this.set("tCache",null)},e.prototype.createPath=function(t,e){var n=this.attr(),i=this.get("el");(0,td.S6)(e||n,function(t,e){"points"===e&&(0,td.kJ)(t)&&t.length>=2?i.setAttribute("points",t.map(function(t){return t[0]+","+t[1]}).join(" ")):se[e]&&i.setAttribute(se[e],t)})},e.prototype.getTotalLength=function(){var t=this.attr().points,e=this.get("totalLength");return(0,td.UM)(e)?(this.set("totalLength",ak.aH.length(t)),this.get("totalLength")):e},e.prototype.getPoint=function(t){var e,n,i=this.attr().points,r=this.get("tCache");return r||(this._setTcache(),r=this.get("tCache")),(0,td.S6)(r,function(i,r){t>=i[0]&&t<=i[1]&&(e=(t-i[0])/(i[1]-i[0]),n=r)}),ak.x1.pointAt(i[n][0],i[n][1],i[n+1][0],i[n+1][1],e)},e.prototype._setTcache=function(){var t,e=this.attr().points;if(e&&0!==e.length){var n=this.getTotalLength();if(!(n<=0)){var i=0,r=[];(0,td.S6)(e,function(o,a){e[a+1]&&((t=[])[0]=i/n,i+=ak.x1.length(o[0],o[1],e[a+1][0],e[a+1][1]),t[1]=i/n,r.push(t))}),this.set("tCache",r)}}},e.prototype.getStartTangent=function(){var t=this.attr().points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.prototype.getEndTangent=function(){var t=this.attr().points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},e}(sc),sO=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="rect",e.canFill=!0,e.canStroke=!0,e}return(0,tf.ZT)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return(0,tf.pi)((0,tf.pi)({},e),{x:0,y:0,width:0,height:0,radius:0})},e.prototype.createPath=function(t,e){var n=this,i=this.attr(),r=this.get("el"),o=!1,a=["x","y","width","height","radius"];(0,td.S6)(e||i,function(t,e){-1===a.indexOf(e)||o?-1===a.indexOf(e)&&se[e]&&r.setAttribute(se[e],t):(r.setAttribute("d",n._assembleRect(i)),o=!0)})},e.prototype._assembleRect=function(t){var e,n,i,r,o=t.x,a=t.y,s=t.width,l=t.height,u=t.radius;if(!u)return"M "+o+","+a+" l "+s+",0 l 0,"+l+" l"+-s+" 0 z";var c=(e=0,n=0,i=0,r=0,(0,td.kJ)(u)?1===u.length?e=n=i=r=u[0]:2===u.length?(e=i=u[0],n=r=u[1]):3===u.length?(e=u[0],n=r=u[1],i=u[2]):(e=u[0],n=u[1],i=u[2],r=u[3]):e=n=i=r=u,{r1:e,r2:n,r3:i,r4:r});return(0,td.kJ)(u)?1===u.length?c.r1=c.r2=c.r3=c.r4=u[0]:2===u.length?(c.r1=c.r3=u[0],c.r2=c.r4=u[1]):3===u.length?(c.r1=u[0],c.r2=c.r4=u[1],c.r3=u[2]):(c.r1=u[0],c.r2=u[1],c.r3=u[2],c.r4=u[3]):c.r1=c.r2=c.r3=c.r4=u,[["M "+(o+c.r1)+","+a],["l "+(s-c.r1-c.r2)+",0"],["a "+c.r2+","+c.r2+",0,0,1,"+c.r2+","+c.r2],["l 0,"+(l-c.r2-c.r3)],["a "+c.r3+","+c.r3+",0,0,1,"+-c.r3+","+c.r3],["l "+(c.r3+c.r4-s)+",0"],["a "+c.r4+","+c.r4+",0,0,1,"+-c.r4+","+-c.r4],["l 0,"+(c.r4+c.r1-l)],["a "+c.r1+","+c.r1+",0,0,1,"+c.r1+","+-c.r1],["z"]].join(" ")},e}(sc),sy=n(43631),sv={top:"before-edge",middle:"central",bottom:"after-edge",alphabetic:"baseline",hanging:"hanging"},sN={top:"text-before-edge",middle:"central",bottom:"text-after-edge",alphabetic:"alphabetic",hanging:"hanging"},sC={left:"left",start:"left",center:"middle",right:"end",end:"end"},sm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="text",e.canFill=!0,e.canStroke=!0,e}return(0,tf.ZT)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return(0,tf.pi)((0,tf.pi)({},e),{x:0,y:0,text:null,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom"})},e.prototype.createPath=function(t,e){var n=this,i=this.attr(),r=this.get("el");this._setFont(),(0,td.S6)(e||i,function(t,e){"text"===e?n._setText(""+t):"matrix"===e&&t?so(n):se[e]&&r.setAttribute(se[e],t)}),r.setAttribute("paint-order","stroke"),r.setAttribute("style","stroke-linecap:butt; stroke-linejoin:miter;")},e.prototype._setFont=function(){var t=this.get("el"),e=this.attr(),n=e.textBaseline,i=e.textAlign,r=(0,sy.qY)();r&&"firefox"===r.name?t.setAttribute("dominant-baseline",sN[n]||"alphabetic"):t.setAttribute("alignment-baseline",sv[n]||"baseline"),t.setAttribute("text-anchor",sC[i]||"left")},e.prototype._setText=function(t){var e=this.get("el"),n=this.attr(),i=n.x,r=n.textBaseline,o=void 0===r?"bottom":r;if(t){if(~t.indexOf("\n")){var a=t.split("\n"),s=a.length-1,l="";(0,td.S6)(a,function(t,e){0===e?"alphabetic"===o?l+=''+t+"":"top"===o?l+=''+t+"":"middle"===o?l+=''+t+"":"bottom"===o?l+=''+t+"":"hanging"===o&&(l+=''+t+""):l+=''+t+""}),e.innerHTML=l}else e.innerHTML=t}else e.innerHTML=""},e}(sc),sL=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,s_=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,sx=/[\d.]+:(#[^\s]+|[^)]+\))/gi;function sM(t){var e=t.match(sx);if(!e)return"";var n="";return e.sort(function(t,e){return t=t.split(":"),e=e.split(":"),Number(t[0])-Number(e[0])}),(0,td.S6)(e,function(t){n+=''}),n}var sP=function(){function t(t){this.cfg={};var e,n,i,r,o,a,s,l,u,c,E,h,p,T,f,d,A=null,S=(0,td.EL)("gradient_");return"l"===t.toLowerCase()[0]?(e=A=sn("linearGradient"),r=sL.exec(t),o=(0,td.wQ)((0,td.c$)(parseFloat(r[1])),2*Math.PI),a=r[2],o>=0&&o<.5*Math.PI?(n={x:0,y:0},i={x:1,y:1}):.5*Math.PI<=o&&o';e.innerHTML=n},t}(),sF=function(){function t(t,e){this.cfg={};var n=sn("marker"),i=(0,td.EL)("marker_");n.setAttribute("id",i);var r=sn("path");r.setAttribute("stroke",t.stroke||"none"),r.setAttribute("fill",t.fill||"none"),n.appendChild(r),n.setAttribute("overflow","visible"),n.setAttribute("orient","auto-start-reverse"),this.el=n,this.child=r,this.id=i;var o=t["marker-start"===e?"startArrow":"endArrow"];return this.stroke=t.stroke||"#000",!0===o?this._setDefaultPath(e,r):(this.cfg=o,this._setMarker(t.lineWidth,r)),this}return t.prototype.match=function(){return!1},t.prototype._setDefaultPath=function(t,e){var n=this.el;e.setAttribute("d","M0,0 L"+10*Math.cos(Math.PI/6)+",5 L0,10"),n.setAttribute("refX",""+10*Math.cos(Math.PI/6)),n.setAttribute("refY","5")},t.prototype._setMarker=function(t,e){var n=this.el,i=this.cfg.path,r=this.cfg.d;(0,td.kJ)(i)&&(i=i.map(function(t){return t.join(" ")}).join("")),e.setAttribute("d",i),n.appendChild(e),r&&n.setAttribute("refX",""+r/t)},t.prototype.update=function(t){var e=this.child;e.attr?e.attr("fill",t):e.setAttribute("fill",t)},t}(),sB=function(){function t(t){this.type="clip",this.cfg={};var e=sn("clipPath");this.el=e,this.id=(0,td.EL)("clip_"),e.id=this.id;var n=t.cfg.el;return e.appendChild(n),this.cfg=t,this}return t.prototype.match=function(){return!1},t.prototype.remove=function(){var t=this.el;t.parentNode.removeChild(t)},t}(),sG=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,sw=function(){function t(t){this.cfg={};var e=sn("pattern");e.setAttribute("patternUnits","userSpaceOnUse");var n=sn("image");e.appendChild(n);var i=(0,td.EL)("pattern_");e.id=i,this.el=e,this.id=i,this.cfg=t;var r=sG.exec(t)[2];n.setAttribute("href",r);var o=new Image;function a(){e.setAttribute("width",""+o.width),e.setAttribute("height",""+o.height)}return r.match(/^data:/i)||(o.crossOrigin="Anonymous"),o.src=r,o.complete?a():(o.onload=a,o.src=o.src),this}return t.prototype.match=function(t,e){return this.cfg===e},t}(),sH=function(){function t(t){var e=sn("defs"),n=(0,td.EL)("defs_");e.id=n,t.appendChild(e),this.children=[],this.defaultArrow={},this.el=e,this.canvas=t}return t.prototype.find=function(t,e){for(var n=this.children,i=null,r=0;r0&&(u[0][0]="L")),o=o.concat(u)}),o.push(["Z"])}return o}(h,s,n,i,r))}return o.path=u,o}function s2(t){var e=t.start,n=t.end;return[[e.x,n.y],[n.x,e.y]]}oK("area",{defaultShapeType:"area",getDefaultPoints:function(t){var e=t.x,n=t.y0;return((0,td.kJ)(t.y)?t.y:[n,t.y]).map(function(t){return{x:e,y:t}})}}),oz("area","area",{draw:function(t,e){var n=s1(t,!1,!1,this);return e.addShape({type:"path",attrs:n,name:"area"})},getMarker:function(t){return{symbol:function(t,e,n){return void 0===n&&(n=5.5),[["M",t-n,e-4],["L",t+n,e-4],["L",t+n,e+4],["L",t-n,e+4],["Z"]]},style:{r:5,fill:t.color}}}});var s5=function(t){function e(e){var n=t.call(this,e)||this;n.type="area",n.shapeType="area",n.generatePoints=!0,n.startOnZero=!0;var i=e.startOnZero,r=e.sortable,o=e.showSinglePoint;return n.startOnZero=void 0===i||i,n.sortable=void 0!==r&&r,n.showSinglePoint=void 0!==o&&o,n}return(0,tf.ZT)(e,t),e.prototype.getPointsAndData=function(t){for(var e=[],n=[],i=0,r=t.length;ii&&(i=r),r=e[0]}));for(var E=this.scales[u],h=0,p=t;he&&(n=n?e/(1+i/n):0,i=e-n),r+o>e&&(r=r?e/(1+o/r):0,o=e-r),[n||0,i||0,r||0,o||0]}function s7(t,e,n){var i=[];if(n.isRect){var r=n.isTransposed?{x:n.start.x,y:e[0].y}:{x:e[0].x,y:n.start.y},o=n.isTransposed?{x:n.end.x,y:e[2].y}:{x:e[3].x,y:n.end.y},a=(0,td.U2)(t,["background","style","radius"]);if(a){var s=s9(a,Math.min(n.isTransposed?Math.abs(e[0].y-e[2].y):e[2].x-e[1].x,n.isTransposed?n.getWidth():n.getHeight())),l=s[0],u=s[1],c=s[2],E=s[3];i.push(["M",r.x,o.y+l]),0!==l&&i.push(["A",l,l,0,0,1,r.x+l,o.y]),i.push(["L",o.x-u,o.y]),0!==u&&i.push(["A",u,u,0,0,1,o.x,o.y+u]),i.push(["L",o.x,r.y-c]),0!==c&&i.push(["A",c,c,0,0,1,o.x-c,r.y]),i.push(["L",r.x+E,r.y]),0!==E&&i.push(["A",E,E,0,0,1,r.x,r.y-E])}else i.push(["M",r.x,r.y]),i.push(["L",o.x,r.y]),i.push(["L",o.x,o.y]),i.push(["L",r.x,o.y]),i.push(["L",r.x,r.y]);i.push(["z"])}if(n.isPolar){var h=n.getCenter(),p=i3(t,n),T=p.startAngle,f=p.endAngle;if("theta"===n.type||n.isTransposed){var d=function(t){return Math.pow(t,2)},l=Math.sqrt(d(h.x-e[0].x)+d(h.y-e[0].y)),u=Math.sqrt(d(h.x-e[2].x)+d(h.y-e[2].y));i=i5(h.x,h.y,l,n.startAngle,n.endAngle,u)}else i=i5(h.x,h.y,n.getRadius(),T,f)}return i}function lt(t,e,n){var i=[];return(0,td.UM)(e)?n?i.push(["M",t[0].x,t[0].y],["L",t[1].x,t[1].y],["L",(t[2].x+t[3].x)/2,(t[2].y+t[3].y)/2],["Z"]):i.push(["M",t[0].x,t[0].y],["L",t[1].x,t[1].y],["L",t[2].x,t[2].y],["L",t[3].x,t[3].y],["Z"]):i.push(["M",t[0].x,t[0].y],["L",t[1].x,t[1].y],["L",e[1].x,e[1].y],["L",e[0].x,e[0].y],["Z"]),i}function le(t){var e=t.theme,n=t.coordinate,i=t.getXScale(),r=i.values,o=t.beforeMappingData,a=r.length,s=re(t.coordinate),l=t.intervalPadding,u=t.dodgePadding,c=t.maxColumnWidth||e.maxColumnWidth,E=t.minColumnWidth||e.minColumnWidth,h=t.columnWidthRatio||e.columnWidthRatio,p=t.multiplePieWidthRatio||e.multiplePieWidthRatio,T=t.roseWidthRatio||e.roseWidthRatio;if(i.isLinear&&r.length>1){r.sort();var f=function(t,e){var n=t.length,i=t;(0,td.HD)(i[0])&&(i=t.map(function(t){return e.translate(t)}));for(var r=i[1]-i[0],o=2;oa&&(r=a)}return r}(r,i);a=(i.max-i.min)/f,r.length>a&&(a=r.length)}var d=i.range,A=1/a,S=1;if(n.isPolar?S=n.isTransposed&&a>1?p:T:(i.isLinear&&(A*=d[1]-d[0]),S=h),!(0,td.UM)(l)&&l>=0?A=(1-(a-1)*(l/s))/a:A*=S,t.getAdjust("dodge")){var R=function(t,e){if(e){var n=(0,td.xH)(t);return(0,td.I)(n,e).length}return t.length}(o,t.getAdjust("dodge").dodgeBy);!(0,td.UM)(u)&&u>=0?A=(A-u/s*(R-1))/R:(!(0,td.UM)(l)&&l>=0&&(A*=S),A/=R),A=A>=0?A:0}if(!(0,td.UM)(c)&&c>=0){var g=c/s;A>g&&(A=g)}if(!(0,td.UM)(E)&&E>=0){var I=E/s;An[1].x?(h=n[0],u=n[1],c=n[2],E=n[3],p=(s=s9(r,Math.min(h.x-u.x,u.y-c.y)))[0],d=s[1],f=s[2],T=s[3]):(T=(l=s9(r,Math.min(h.x-u.x,u.y-c.y)))[0],f=l[1],d=l[2],p=l[3])),(A=[]).push(["M",c.x,c.y+p]),0!==p&&A.push(["A",p,p,0,0,1,c.x+p,c.y]),A.push(["L",E.x-T,E.y]),0!==T&&A.push(["A",T,T,0,0,1,E.x,E.y+T]),A.push(["L",h.x,h.y-f]),0!==f&&A.push(["A",f,f,0,0,1,h.x-f,h.y]),A.push(["L",u.x+d,u.y]),0!==d&&A.push(["A",d,d,0,0,1,u.x,u.y-d]),A.push(["L",c.x,c.y+p]),A.push(["z"]),m=A):m=this.parsePath((S=t.points,R=L.lineCap,I=(g=this.coordinate).getWidth(),O=g.getHeight(),y="rect"===g.type,v=[],N=(S[2].x-S[1].x)/2,C=g.isTransposed?N*O/I:N*I/O,"round"===R?(y?(v.push(["M",S[0].x,S[0].y+C]),v.push(["L",S[1].x,S[1].y-C]),v.push(["A",N,N,0,0,1,S[2].x,S[2].y-C]),v.push(["L",S[3].x,S[3].y+C]),v.push(["A",N,N,0,0,1,S[0].x,S[0].y+C])):(v.push(["M",S[0].x,S[0].y]),v.push(["L",S[1].x,S[1].y]),v.push(["A",N,N,0,0,1,S[2].x,S[2].y]),v.push(["L",S[3].x,S[3].y]),v.push(["A",N,N,0,0,1,S[0].x,S[0].y])),v.push(["z"])):v=s8(S),v));var D=_.addShape("path",{attrs:(0,tf.pi)((0,tf.pi)({},L),{path:m}),name:"interval"});return x?_:D},getMarker:function(t){var e=t.color;return t.isInPolar?{symbol:"circle",style:{r:4.5,fill:e}}:{symbol:"square",style:{r:4,fill:e}}}});var ln=function(t){function e(e){var n=t.call(this,e)||this;n.type="interval",n.shapeType="interval",n.generatePoints=!0;var i=e.background;return n.background=i,n}return(0,tf.ZT)(e,t),e.prototype.createShapePointsCfg=function(e){var n,i=t.prototype.createShapePointsCfg.call(this,e),r=this.getAttribute("size");return r?n=this.getAttributeValues(r,e)[0]/re(this.coordinate):(this.defaultSize||(this.defaultSize=le(this)),n=this.defaultSize),i.size=n,i},e.prototype.adjustScale=function(){t.prototype.adjustScale.call(this);var e,n=this.getYScale();if("theta"===this.coordinate.type)n.change({nice:!1,min:0,max:(e=n.values.filter(function(t){return!(0,td.UM)(t)&&!isNaN(t)}),Math.max.apply(Math,(0,tf.ev)((0,tf.ev)([],e,!1),[(0,td.UM)(n.max)?-1/0:n.max],!1)))});else{var i=this.scaleDefs,r=n.field,o=n.min,a=n.max;"time"!==n.type&&(o>0&&!(0,td.U2)(i,[r,"min"])&&n.change({min:0}),a<=0&&!(0,td.U2)(i,[r,"max"])&&n.change({max:0}))}},e.prototype.getDrawCfg=function(e){var n=t.prototype.getDrawCfg.call(this,e);return n.background=this.background,n},e}(oq),li=function(t){function e(e){var n=t.call(this,e)||this;n.type="line";var i=e.sortable;return n.sortable=void 0!==i&&i,n}return(0,tf.ZT)(e,t),e}(s0),lr=["circle","square","bowtie","diamond","hexagon","triangle","triangle-down"];function lo(t,e,n,i,r){var o=sZ(e,r,!r,"r"),a=t.parsePoints(e.points),s=a[0];if(e.isStack)s=a[1];else if(a.length>1){for(var l=n.addGroup(),u=0;u2?"weight":"normal";if(t.isInCircle){var a,s,l,u,c,E,h,p={x:0,y:1};return"normal"===o?(a=r[0],s=lE(r[1],p),(l=[["M",a.x,a.y]]).push(s),n=l):(i.fill=i.stroke,c=lE((u=r)[1],p),E=lE(u[3],p),(h=[["M",u[0].x,u[0].y]]).push(E),h.push(["L",u[3].x,u[3].y]),h.push(["L",u[2].x,u[2].y]),h.push(c),h.push(["L",u[1].x,u[1].y]),h.push(["L",u[0].x,u[0].y]),h.push(["Z"]),n=h),n=this.parsePath(n),e.addShape("path",{attrs:(0,tf.pi)((0,tf.pi)({},i),{path:n})})}if("normal"===o)return n=i6(((r=this.parsePoints(r))[1].x+r[0].x)/2,r[0].y,Math.abs(r[1].x-r[0].x)/2,Math.PI,2*Math.PI),e.addShape("path",{attrs:(0,tf.pi)((0,tf.pi)({},i),{path:n})});var T=lc(r[1],r[3]),f=lc(r[2],r[0]);return n=[["M",r[0].x,r[0].y],["L",r[1].x,r[1].y],T,["L",r[3].x,r[3].y],["L",r[2].x,r[2].y],f,["Z"]],n=this.parsePath(n),i.fill=i.stroke,e.addShape("path",{attrs:(0,tf.pi)((0,tf.pi)({},i),{path:n})})},getMarker:function(t){return{symbol:"circle",style:{r:4.5,fill:t.color}}}}),oz("edge","smooth",{draw:function(t,e){var n,i,r,o=sZ(t,!0,!1,"lineWidth"),a=t.points,s=this.parsePath((i=lc(n=a[0],a[1]),(r=[["M",n.x,n.y]]).push(i),r));return e.addShape("path",{attrs:(0,tf.pi)((0,tf.pi)({},o),{path:s})})},getMarker:function(t){return{symbol:"circle",style:{r:4.5,fill:t.color}}}});var lh=1/3;oz("edge","vhv",{draw:function(t,e){var n,i,r,o,a=sZ(t,!0,!1,"lineWidth"),s=t.points,l=this.parsePath((n=s[0],i=s[1],(r=[]).push({x:n.x,y:n.y*(1-lh)+i.y*lh}),r.push({x:i.x,y:n.y*(1-lh)+i.y*lh}),r.push(i),o=[["M",n.x,n.y]],(0,td.S6)(r,function(t){o.push(["L",t.x,t.y])}),o));return e.addShape("path",{attrs:(0,tf.pi)((0,tf.pi)({},a),{path:l})})},getMarker:function(t){return{symbol:"circle",style:{r:4.5,fill:t.color}}}}),oz("interval","funnel",{getPoints:function(t){return t.size=2*t.size,s4(t)},draw:function(t,e){var n=sZ(t,!1,!0),i=this.parsePath(lt(t.points,t.nextPoints,!1));return e.addShape("path",{attrs:(0,tf.pi)((0,tf.pi)({},n),{path:i}),name:"interval"})},getMarker:function(t){return{symbol:"square",style:{r:4,fill:t.color}}}}),oz("interval","hollow-rect",{draw:function(t,e){var n=sZ(t,!0,!1),i=e,r=null==t?void 0:t.background;if(r){i=e.addGroup();var o=s$(t),a=s7(t,this.parsePoints(t.points),this.coordinate);i.addShape("path",{attrs:(0,tf.pi)((0,tf.pi)({},o),{path:a}),zIndex:-1,name:oB})}var s=this.parsePath(s8(t.points)),l=i.addShape("path",{attrs:(0,tf.pi)((0,tf.pi)({},n),{path:s}),name:"interval"});return r?i:l},getMarker:function(t){var e=t.color;return t.isInPolar?{symbol:"circle",style:{r:4.5,stroke:e,fill:null}}:{symbol:"square",style:{r:4,stroke:e,fill:null}}}}),oz("interval","line",{getPoints:function(t){var e,n,i;return e=t.x,n=t.y,i=t.y0,(0,td.kJ)(n)?n.map(function(t,n){return{x:(0,td.kJ)(e)?e[n]:e,y:t}}):[{x:e,y:i},{x:e,y:n}]},draw:function(t,e){var n=sZ(t,!0,!1,"lineWidth"),i=i9((0,tf.pi)({},n),["fill"]),r=this.parsePath(s8(t.points,!1));return e.addShape("path",{attrs:(0,tf.pi)((0,tf.pi)({},i),{path:r}),name:"interval"})},getMarker:function(t){return{symbol:function(t,e,n){return[["M",t,e-n],["L",t,e+n]]},style:{r:5,stroke:t.color}}}}),oz("interval","pyramid",{getPoints:function(t){return t.size=2*t.size,s4(t)},draw:function(t,e){var n=sZ(t,!1,!0),i=this.parsePath(lt(t.points,t.nextPoints,!0));return e.addShape("path",{attrs:(0,tf.pi)((0,tf.pi)({},n),{path:i}),name:"interval"})},getMarker:function(t){return{symbol:"square",style:{r:4,fill:t.color}}}}),oz("interval","tick",{getPoints:function(t){var e,n,i,r,o,a,s,l;return i=t.x,r=t.y,o=t.y0,a=t.size,(0,td.kJ)(r)?(e=r[0],n=r[1]):(e=o,n=r),s=i+a/2,l=i-a/2,[{x:i,y:e},{x:i,y:n},{x:l,y:e},{x:s,y:e},{x:l,y:n},{x:s,y:n}]},draw:function(t,e){var n,i=sZ(t,!0,!1),r=this.parsePath([["M",(n=t.points)[0].x,n[0].y],["L",n[1].x,n[1].y],["M",n[2].x,n[2].y],["L",n[3].x,n[3].y],["M",n[4].x,n[4].y],["L",n[5].x,n[5].y]]);return e.addShape("path",{attrs:(0,tf.pi)((0,tf.pi)({},i),{path:r}),name:"interval"})},getMarker:function(t){return{symbol:function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]},style:{r:5,stroke:t.color}}}});var lp=function(t,e,n){var i,r=t.x,o=t.y,a=e.x,s=e.y;switch(n){case"hv":i=[{x:a,y:o}];break;case"vh":i=[{x:r,y:s}];break;case"hvh":var l=(a+r)/2;i=[{x:l,y:o},{x:l,y:s}];break;case"vhv":var u=(o+s)/2;i=[{x:r,y:u},{x:a,y:u}]}return i};function lT(t){var e=(0,td.kJ)(t)?t:[t],n=e[0],i=e[e.length-1],r=e.length>1?e[1]:n,o=e.length>3?e[3]:i,a=e.length>2?e[2]:r;return{min:n,max:i,min1:r,max1:o,median:a}}function lf(t,e,n){var i,r=n/2;if((0,td.kJ)(e)){var o=lT(e),a=o.min,s=o.max,l=o.median,u=o.min1,c=o.max1,E=t-r,h=t+r;i=[[E,s],[h,s],[t,s],[t,c],[E,u],[E,c],[h,c],[h,u],[t,u],[t,a],[E,a],[h,a],[E,l],[h,l]]}else{e=(0,td.UM)(e)?.5:e;var p=lT(t),a=p.min,s=p.max,l=p.median,u=p.min1,c=p.max1,T=e-r,f=e+r;i=[[a,T],[a,f],[a,e],[u,e],[u,T],[u,f],[c,f],[c,T],[c,e],[s,e],[s,T],[s,f],[l,T],[l,f]]}return i.map(function(t){return{x:t[0],y:t[1]}})}function ld(t,e,n){var i,r=function(t,e,n){if((0,td.HD)(t))return t.padEnd(e,n);if((0,td.kJ)(t)){var i=t.length;if(i1){for(var o=e.addGroup(),a=0;a0?"left":"right");break;case"left":t.x=s,t.y=(r+a)/2,t.textAlign=(0,td.U2)(t,"textAlign",p>0?"left":"right");break;case"bottom":u&&(t.x=(o+s)/2),t.y=a,t.textAlign=(0,td.U2)(t,"textAlign","center"),t.textBaseline=(0,td.U2)(t,"textBaseline",p>0?"bottom":"top");break;case"middle":u&&(t.x=(o+s)/2),t.y=(r+a)/2,t.textAlign=(0,td.U2)(t,"textAlign","center"),t.textBaseline=(0,td.U2)(t,"textBaseline","middle");break;case"top":u&&(t.x=(o+s)/2),t.y=r,t.textAlign=(0,td.U2)(t,"textAlign","center"),t.textBaseline=(0,td.U2)(t,"textBaseline",p>0?"bottom":"top")}},e}(o4),lS=Math.PI/2,lR=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getLabelOffset=function(t){var e=this.getCoordinate(),n=0;if((0,td.hj)(t))n=t;else if((0,td.HD)(t)&&-1!==t.indexOf("%")){var i=e.getRadius();e.innerRadius>0&&(i*=1-e.innerRadius),n=.01*parseFloat(t)*i}return n},e.prototype.getLabelItems=function(e){var n=t.prototype.getLabelItems.call(this,e),i=this.geometry.getYScale();return(0,td.UI)(n,function(t){if(t&&i){var e=i.scale((0,td.U2)(t.data,i.field));return(0,tf.pi)((0,tf.pi)({},t),{percent:e})}return t})},e.prototype.getLabelAlign=function(t){var e,n=this.getCoordinate();if(t.labelEmit)e=t.angle<=Math.PI/2&&t.angle>=-Math.PI/2?"left":"right";else if(n.isTransposed){var i=n.getCenter(),r=t.offset;e=1>Math.abs(t.x-i.x)?"center":t.angle>Math.PI||t.angle<=0?r>0?"left":"right":r>0?"right":"left"}else e="center";return e},e.prototype.getLabelPoint=function(t,e,n){var i,r=1,o=t.content[n];this.isToMiddle(e)?i=this.getMiddlePoint(e.points):(1===t.content.length&&0===n?n=1:0===n&&(r=-1),i=this.getArcPoint(e,n));var a=t.offset*r,s=this.getPointAngle(i),l=t.labelEmit,u=this.getCirclePoint(s,a,i,l);return 0===u.r?u.content="":(u.content=o,u.angle=s,u.color=e.color),u.rotate=t.autoRotate?this.getLabelRotate(s,a,l):t.rotate,u.start={x:i.x,y:i.y},u},e.prototype.getArcPoint=function(t,e){return(void 0===e&&(e=0),(0,td.kJ)(t.x)||(0,td.kJ)(t.y))?{x:(0,td.kJ)(t.x)?t.x[e]:t.x,y:(0,td.kJ)(t.y)?t.y[e]:t.y}:{x:t.x,y:t.y}},e.prototype.getPointAngle=function(t){return rr(this.getCoordinate(),t)},e.prototype.getCirclePoint=function(t,e,n,i){var r=this.getCoordinate(),o=r.getCenter(),a=rn(r,n);if(0===a)return(0,tf.pi)((0,tf.pi)({},o),{r:a});var s=t;return r.isTransposed&&a>e&&!i?s=t+2*Math.asin(e/(2*a)):a+=e,{x:o.x+a*Math.cos(s),y:o.y+a*Math.sin(s),r:a}},e.prototype.getLabelRotate=function(t,e,n){var i=t+lS;return n&&(i-=lS),i&&(i>lS?i-=Math.PI:i<-lS&&(i+=Math.PI)),i},e.prototype.getMiddlePoint=function(t){var e=this.getCoordinate(),n=t.length,i={x:0,y:0};return(0,td.S6)(t,function(t){i.x+=t.x,i.y+=t.y}),i.x/=n,i.y/=n,i=e.convert(i)},e.prototype.isToMiddle=function(t){return t.x.length>2},e}(o4),lg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.defaultLayout="distribute",e}return(0,tf.ZT)(e,t),e.prototype.getDefaultLabelCfg=function(e,n){var i=t.prototype.getDefaultLabelCfg.call(this,e,n);return(0,td.b$)({},i,(0,td.U2)(this.geometry.theme,"pieLabels",{}))},e.prototype.getLabelOffset=function(e){return t.prototype.getLabelOffset.call(this,e)||0},e.prototype.getLabelRotate=function(t,e,n){var i;return e<0&&((i=t)>Math.PI/2&&(i-=Math.PI),i<-Math.PI/2&&(i+=Math.PI)),i},e.prototype.getLabelAlign=function(t){var e,n=this.getCoordinate().getCenter();return e=t.angle<=Math.PI/2&&t.x>=n.x?"left":"right",t.offset<=0&&(e="right"===e?"left":"right"),e},e.prototype.getArcPoint=function(t){return t},e.prototype.getPointAngle=function(t){var e,n=this.getCoordinate(),i={x:(0,td.kJ)(t.x)?t.x[0]:t.x,y:t.y[0]},r={x:(0,td.kJ)(t.x)?t.x[1]:t.x,y:t.y[1]},o=rr(n,i);if(t.points&&t.points[0].y===t.points[1].y)e=o;else{var a=rr(n,r);o>=a&&(a+=2*Math.PI),e=o+(a-o)/2}return e},e.prototype.getCirclePoint=function(t,e){var n=this.getCoordinate(),i=n.getCenter(),r=n.getRadius()+e;return(0,tf.pi)((0,tf.pi)({},i2(i.x,i.y,r,t)),{angle:t,r:r})},e}(lR);function lI(t,e,n){var i,r=t.filter(function(t){return!t.invisible});r.sort(function(t,e){return t.y-e.y});var o=!0,a=n.minY,s=Math.abs(a-n.maxY),l=0,u=Number.MIN_VALUE,c=r.map(function(t){return t.y>l&&(l=t.y),t.ys&&(s=l-a);o;)for(c.forEach(function(t){var e=(Math.min.apply(u,t.targets)+Math.max.apply(u,t.targets))/2;t.pos=Math.min(Math.max(u,e-t.size/2),s-t.size),t.pos=Math.max(0,t.pos)}),o=!1,i=c.length;i--;)if(i>0){var E=c[i-1],h=c[i];E.pos+E.size>h.pos&&(E.size+=h.size,E.targets=E.targets.concat(h.targets),E.pos+E.size>s&&(E.pos=s-E.size),c.splice(i,1),o=!0)}i=0,c.forEach(function(t){var n=a+e/2;t.targets.forEach(function(){r[i].y=t.pos+n,n+=e,i++})})}var lO=function(){function t(t){void 0===t&&(t={}),this.bitmap={};var e=t.xGap,n=t.yGap;this.xGap=void 0===e?1:e,this.yGap=void 0===n?8:n}return t.prototype.hasGap=function(t){for(var e=!0,n=this.bitmap,i=Math.round(t.minX),r=Math.round(t.maxX),o=Math.round(t.minY),a=Math.round(t.maxY),s=i;s<=r;s+=1){if(!n[s]){n[s]={};continue}if(s===i||s===r){for(var l=o;l<=a;l++)if(n[s][l]){e=!1;break}}else if(n[s][o]||n[s][a]){e=!1;break}}return e},t.prototype.fillGap=function(t){for(var e=this.bitmap,n=Math.round(t.minX),i=Math.round(t.maxX),r=Math.round(t.minY),o=Math.round(t.maxY),a=n;a<=i;a+=1)e[a]||(e[a]={});for(var a=n;a<=i;a+=this.xGap){for(var s=r;s<=o;s+=this.yGap)e[a][s]=!0;e[a][o]=!0}if(1!==this.yGap)for(var a=r;a<=o;a+=1)e[n][a]=!0,e[i][a]=!0;if(1!==this.xGap)for(var a=n;a<=i;a+=1)e[a][r]=!0,e[a][o]=!0},t.prototype.destroy=function(){this.bitmap={}},t}(),ly=nr.AK;function lv(t){if(t.length>4)return[];var e=function(t,e){return[e.x-t.x,e.y-t.y]};return[e(t[0],t[1]),e(t[1],t[2])]}function lN(t,e,n){void 0===e&&(e=0),void 0===n&&(n={x:0,y:0});var i=t.x,r=t.y;return{x:(i-n.x)*Math.cos(-e)+(r-n.y)*Math.sin(-e)+n.x,y:(n.x-i)*Math.sin(-e)+(r-n.y)*Math.cos(-e)+n.y}}function lC(t){var e=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],n=t.rotation;return n?[lN(e[0],n,e[0]),lN(e[1],n,e[0]),lN(e[2],n,e[0]),lN(e[3],n,e[0])]:e}function lm(t,e){if(t.length>4)return{min:0,max:0};var n=[];return t.forEach(function(t){n.push(ly([t.x,t.y],e))}),{min:Math.min.apply(Math,n),max:Math.max.apply(Math,n)}}function lL(t){return(0,td.hj)(t)&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0}function l_(t){return Object.values(t).every(lL)}var lx={"#5B8FF9":!0},lM=function(t){var e=tQ.toRGB(t).toUpperCase();if(lx[e])return lx[e];var n=tQ.rgb2arr(e);return(299*n[0]+587*n[1]+114*n[2])/1e3<128};function lP(t,e,n){return t.some(function(t){return n(t,e)})}function lD(t,e){return lP(t,e,function(t,e){var n,i,r=o2(t),o=o2(e);return n=r.getCanvasBBox(),i=o.getCanvasBBox(),Math.max(0,Math.min(n.x+n.width+2,i.x+i.width+2)-Math.max(n.x-2,i.x-2))*Math.max(0,Math.min(n.y+n.height+2,i.y+i.height+2)-Math.max(n.y-2,i.y-2))>0})}function lU(t,e,n){return t.some(function(t){return n(t,e)})}function lb(t,e){return lU(t,e,function(t,e){var n,i,r=o2(t),o=o2(e);return n=r.getCanvasBBox(),i=o.getCanvasBBox(),Math.max(0,Math.min(n.x+n.width+2,i.x+i.width+2)-Math.max(n.x-2,i.x-2))*Math.max(0,Math.min(n.y+n.height+2,i.y+i.height+2)-Math.max(n.y-2,i.y-2))>0})}var lF=(0,td.HP)(function(t,e){void 0===e&&(e={});var n=e.fontSize,i=e.fontFamily,r=e.fontWeight,o=e.fontStyle,a=e.fontVariant,s=(X||(X=document.createElement("canvas").getContext("2d")),X);return s.font=[o,a,r,n+"px",i].join(" "),s.measureText((0,td.HD)(t)?t:"").width},function(t,e){return void 0===e&&(e={}),(0,tf.ev)([t],(0,td.VO)(e),!0).join("")}),lB=function(t,e,n){var i,r,o,a=lF("...",n);i=(0,td.HD)(t)?t:(0,td.BB)(t);var s=e,l=[];if(lF(t,n)<=e)return t;for(;!((o=lF(r=i.substr(0,16),n))+a>s)||!(o>s);)if(l.push(r),s-=o,!(i=i.substr(16)))return l.join("");for(;!((o=lF(r=i.substr(0,1),n))+a>s);)if(l.push(r),s-=o,!(i=i.substr(1)))return l.join("");return l.join("")+"..."};function lG(t,e,n,i,r){var o,a,s,l,u,c,E=n.start,h=n.end,p=n.getWidth(),T=n.getHeight();"y"===r?(u=E.x+p/2,c=i.yE.x?i.x:E.x,c=E.y+T/2):"xy"===r&&(n.isPolar?(u=n.getCenter().x,c=n.getCenter().y):(u=(E.x+h.x)/2,c=(E.y+h.y)/2));var f=(s=(o=[u,c])[0],l=o[1],t.applyToMatrix([s,l,1]),"x"===r?(t.setMatrix(ne.vs(t.getMatrix(),[["t",-s,-l],["s",.01,1],["t",s,l]])),a=ne.vs(t.getMatrix(),[["t",-s,-l],["s",100,1],["t",s,l]])):"y"===r?(t.setMatrix(ne.vs(t.getMatrix(),[["t",-s,-l],["s",1,.01],["t",s,l]])),a=ne.vs(t.getMatrix(),[["t",-s,-l],["s",1,100],["t",s,l]])):"xy"===r&&(t.setMatrix(ne.vs(t.getMatrix(),[["t",-s,-l],["s",.01,.01],["t",s,l]])),a=ne.vs(t.getMatrix(),[["t",-s,-l],["s",100,100],["t",s,l]])),a);t.animate({matrix:f},e)}function lw(t,e){var n,i=ag(t,e),r=i.startAngle,o=i.endAngle;return!(0,td.vQ)(r,-(.5*Math.PI))&&r<-(.5*Math.PI)&&(r+=2*Math.PI),!(0,td.vQ)(o,-(.5*Math.PI))&&o<-(.5*Math.PI)&&(o+=2*Math.PI),0===e[5]&&(r=(n=[o,r])[0],o=n[1]),(0,td.vQ)(r,1.5*Math.PI)&&(r=-.5*Math.PI),(0,td.vQ)(o,-.5*Math.PI)&&(o=1.5*Math.PI),{startAngle:r,endAngle:o}}function lH(t){var e;return"M"===t[0]||"L"===t[0]?e=[t[1],t[2]]:("a"===t[0]||"A"===t[0]||"C"===t[0])&&(e=[t[t.length-2],t[t.length-1]]),e}function lY(t){var e,n,i,r=t.filter(function(t){return"A"===t[0]||"a"===t[0]});if(0===r.length)return{startAngle:0,endAngle:0,radius:0,innerRadius:0};var o=r[0],a=r.length>1?r[1]:r[0],s=t.indexOf(o),l=t.indexOf(a),u=lH(t[s-1]),c=lH(t[l-1]),E=lw(u,o),h=E.startAngle,p=E.endAngle,T=lw(c,a),f=T.startAngle,d=T.endAngle;(0,td.vQ)(h,f)&&(0,td.vQ)(p,d)?(n=h,i=p):(n=Math.min(h,f),i=Math.max(p,d));var A=o[1],S=r[r.length-1][1];return A=0;o--)for(var a=this.getFacetsByLevel(t,o),s=0;s=n){var r=i.parsePosition([t[a],t[o.field]]);r&&c.push(r)}if(t[a]===u)return!1}),c},e.prototype.parsePercentPosition=function(t){var e=parseFloat(t[0])/100,n=parseFloat(t[1])/100,i=this.view.getCoordinate(),r=i.start,o=i.end,a={x:Math.min(r.x,o.x),y:Math.min(r.y,o.y)};return{x:i.getWidth()*e+a.x,y:i.getHeight()*n+a.y}},e.prototype.getCoordinateBBox=function(){var t=this.view.getCoordinate(),e=t.start,n=t.end,i=t.getWidth(),r=t.getHeight(),o={x:Math.min(e.x,n.x),y:Math.min(e.y,n.y)};return{x:o.x,y:o.y,minX:o.x,minY:o.y,maxX:o.x+i,maxY:o.y+r,width:i,height:r}},e.prototype.getAnnotationCfg=function(t,e,n){var i=this,r=this.view.getCoordinate(),o=this.view.getCanvas(),a={};if((0,td.UM)(e))return null;if("arc"===t){var s=e.start,l=e.end,u=(0,tf._T)(e,["start","end"]),c=this.parsePosition(s),E=this.parsePosition(l),h=rr(r,c),p=rr(r,E);h>p&&(p=2*Math.PI+p),a=(0,tf.pi)((0,tf.pi)({},u),{center:r.getCenter(),radius:rn(r,c),startAngle:h,endAngle:p})}else if("image"===t){var s=e.start,l=e.end,u=(0,tf._T)(e,["start","end"]);a=(0,tf.pi)((0,tf.pi)({},u),{start:this.parsePosition(s),end:this.parsePosition(l),src:e.src})}else if("line"===t){var s=e.start,l=e.end,u=(0,tf._T)(e,["start","end"]);a=(0,tf.pi)((0,tf.pi)({},u),{start:this.parsePosition(s),end:this.parsePosition(l),text:(0,td.U2)(e,"text",null)})}else if("region"===t){var s=e.start,l=e.end,u=(0,tf._T)(e,["start","end"]);a=(0,tf.pi)((0,tf.pi)({},u),{start:this.parsePosition(s),end:this.parsePosition(l)})}else if("text"===t){var T=this.view.getData(),f=e.position,d=e.content,u=(0,tf._T)(e,["position","content"]),A=d;(0,td.mf)(d)&&(A=d(T)),a=(0,tf.pi)((0,tf.pi)((0,tf.pi)({},this.parsePosition(f)),u),{content:A})}else if("dataMarker"===t){var f=e.position,S=e.point,R=e.line,g=e.text,I=e.autoAdjust,O=e.direction,u=(0,tf._T)(e,["position","point","line","text","autoAdjust","direction"]);a=(0,tf.pi)((0,tf.pi)((0,tf.pi)({},u),this.parsePosition(f)),{coordinateBBox:this.getCoordinateBBox(),point:S,line:R,text:g,autoAdjust:I,direction:O})}else if("dataRegion"===t){var s=e.start,l=e.end,y=e.region,g=e.text,v=e.lineLength,u=(0,tf._T)(e,["start","end","region","text","lineLength"]);a=(0,tf.pi)((0,tf.pi)({},u),{points:this.getRegionPoints(s,l),region:y,text:g,lineLength:v})}else if("regionFilter"===t){var s=e.start,l=e.end,N=e.apply,C=e.color,u=(0,tf._T)(e,["start","end","apply","color"]),m=this.view.geometries,L=[],_=function(t){t&&(t.isGroup()?t.getChildren().forEach(function(t){return _(t)}):L.push(t))};(0,td.S6)(m,function(t){N?(0,td.FX)(N,t.type)&&(0,td.S6)(t.elements,function(t){_(t.shape)}):(0,td.S6)(t.elements,function(t){_(t.shape)})}),a=(0,tf.pi)((0,tf.pi)({},u),{color:C,shapes:L,start:this.parsePosition(s),end:this.parsePosition(l)})}else if("shape"===t){var x=e.render,M=(0,tf._T)(e,["render"]);a=(0,tf.pi)((0,tf.pi)({},M),{render:function(t){if((0,td.mf)(e.render))return x(t,i.view,{parsePosition:i.parsePosition.bind(i)})}})}else if("html"===t){var P=e.html,f=e.position,M=(0,tf._T)(e,["html","position"]);a=(0,tf.pi)((0,tf.pi)((0,tf.pi)({},M),this.parsePosition(f)),{parent:o.get("el").parentNode,html:function(t){return(0,td.mf)(P)?P(t,i.view):P}})}var D=(0,td.b$)({},n,(0,tf.pi)((0,tf.pi)({},a),{top:e.top,style:e.style,offsetX:e.offsetX,offsetY:e.offsetY}));return"html"!==t&&(D.container=this.getComponentContainer(D)),D.animate=this.view.getOptions().animate&&D.animate&&(0,td.U2)(e,"animate",D.animate),D.animateOption=(0,td.b$)({},oP,D.animateOption,e.animateOption),D},e.prototype.isTop=function(t){return(0,td.U2)(t,"top",!0)},e.prototype.getComponentContainer=function(t){return this.isTop(t)?this.foregroundContainer:this.backgroundContainer},e.prototype.getAnnotationTheme=function(t){return(0,td.U2)(this.view.getTheme(),["components","annotation",t],{})},e.prototype.updateOrCreate=function(t){var e=this.cache.get(this.getCacheKey(t));if(e){var n=t.type,i=this.getAnnotationTheme(n),r=this.getAnnotationCfg(n,t,i);i9(r,["container"]),e.component.update(r),(0,td.q9)(lQ,t.type)&&e.component.render()}else(e=this.createAnnotation(t))&&(e.component.init(),(0,td.q9)(lQ,t.type)&&e.component.render());return e},e.prototype.syncCache=function(t){var e=this,n=new Map(this.cache);return t.forEach(function(t,e){n.set(e,t)}),n.forEach(function(t,i){(0,td.sE)(e.option,function(t){return i===e.getCacheKey(t)})||(t.component.destroy(),n.delete(i))}),n},e.prototype.getCacheKey=function(t){return t},e}(om);function l1(t,e){var n=(0,td.b$)({},(0,td.U2)(t,["components","axis","common"]),(0,td.U2)(t,["components","axis",e]));return(0,td.U2)(n,["grid"],{})}function l2(t,e,n,i){var r=[],o=e.getTicks();return t.isPolar&&o.push({value:1,text:"",tickValue:""}),o.reduce(function(e,o,a){var s=o.value;if(i)r.push({points:[t.convert("y"===n?{x:0,y:s}:{x:s,y:0}),t.convert("y"===n?{x:1,y:s}:{x:s,y:1})]});else if(a){var l=(e.value+s)/2;r.push({points:[t.convert("y"===n?{x:0,y:l}:{x:l,y:0}),t.convert("y"===n?{x:1,y:l}:{x:l,y:1})]})}return o},o[0]),r}function l5(t,e,n,i,r){var o=e.values.length,a=[],s=n.getTicks();return s.reduce(function(e,n){var s=e?e.value:n.value,l=n.value,u=(s+l)/2;return"x"===r?a.push({points:[t.convert({x:i?l:u,y:0}),t.convert({x:i?l:u,y:1})]}):a.push({points:(0,td.UI)(Array(o+1),function(e,n){return t.convert({x:n/o,y:i?l:u})})}),n},s[0]),a}function l6(t,e){var n=(0,td.U2)(e,"grid");if(null===n)return!1;var i=(0,td.U2)(t,"grid");return!(void 0===n&&null===i)}var l3=["container"],l4=(0,tf.pi)((0,tf.pi)({},oP),{appear:null}),l8=function(t){function e(e){var n=t.call(this,e)||this;return n.cache=new Map,n.gridContainer=n.view.getLayer(M.BG).addGroup(),n.gridForeContainer=n.view.getLayer(M.FORE).addGroup(),n.axisContainer=n.view.getLayer(M.BG).addGroup(),n.axisForeContainer=n.view.getLayer(M.FORE).addGroup(),n}return(0,tf.ZT)(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return"axis"},enumerable:!1,configurable:!0}),e.prototype.init=function(){},e.prototype.render=function(){this.update()},e.prototype.layout=function(){var t=this,e=this.view.getCoordinate();(0,td.S6)(this.getComponents(),function(n){var i,r=n.component,o=n.direction,a=n.type,s=n.extra,l=s.dim,u=s.scale,c=s.alignTick;a===D.AXIS?e.isPolar?"x"===l?i=e.isTransposed?ru(e,o):rT(e):"y"===l&&(i=e.isTransposed?rT(e):ru(e,o)):i=ru(e,o):a===D.GRID&&(i=e.isPolar?{items:e.isTransposed?"x"===l?l5(e,t.view.getYScales()[0],u,c,l):l2(e,u,l,c):"x"===l?l2(e,u,l,c):l5(e,t.view.getXScale(),u,c,l),center:t.view.getCoordinate().getCenter()}:{items:l2(e,u,l,c)}),r.update(i)})},e.prototype.update=function(){this.option=this.view.getOptions().axes;var t=new Map;this.updateXAxes(t),this.updateYAxes(t);var e=new Map;this.cache.forEach(function(n,i){t.has(i)?e.set(i,n):n.component.destroy()}),this.cache=e},e.prototype.clear=function(){t.prototype.clear.call(this),this.cache.clear(),this.gridContainer.clear(),this.gridForeContainer.clear(),this.axisContainer.clear(),this.axisForeContainer.clear()},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.gridContainer.remove(!0),this.gridForeContainer.remove(!0),this.axisContainer.remove(!0),this.axisForeContainer.remove(!0)},e.prototype.getComponents=function(){var t=[];return this.cache.forEach(function(e){t.push(e)}),t},e.prototype.updateXAxes=function(t){var e=this.view.getXScale();if(e&&!e.isIdentity){var n=rf(this.option,e.field);if(!1!==n){var i=rd(n,P.BOTTOM),r=M.BG,o=this.view.getCoordinate(),a=this.getId("axis",e.field),s=this.getId("grid",e.field);if(o.isRect){var l=this.cache.get(a);if(l){var u=this.getLineAxisCfg(e,n,i);i9(u,l3),l.component.update(u),t.set(a,l)}else l=this.createLineAxis(e,n,r,i,"x"),this.cache.set(a,l),t.set(a,l);var c=this.cache.get(s);if(c){var u=this.getLineGridCfg(e,n,i,"x");i9(u,l3),c.component.update(u),t.set(s,c)}else(c=this.createLineGrid(e,n,r,i,"x"))&&(this.cache.set(s,c),t.set(s,c))}else if(o.isPolar){var l=this.cache.get(a);if(l){var u=o.isTransposed?this.getLineAxisCfg(e,n,P.RADIUS):this.getCircleAxisCfg(e,n,i);i9(u,l3),l.component.update(u),t.set(a,l)}else{if(o.isTransposed){if((0,td.o8)(n))return;l=this.createLineAxis(e,n,r,P.RADIUS,"x")}else l=this.createCircleAxis(e,n,r,i,"x");this.cache.set(a,l),t.set(a,l)}var c=this.cache.get(s);if(c){var u=o.isTransposed?this.getCircleGridCfg(e,n,P.RADIUS,"x"):this.getLineGridCfg(e,n,P.CIRCLE,"x");i9(u,l3),c.component.update(u),t.set(s,c)}else{if(o.isTransposed){if((0,td.o8)(n))return;c=this.createCircleGrid(e,n,r,P.RADIUS,"x")}else c=this.createLineGrid(e,n,r,P.CIRCLE,"x");c&&(this.cache.set(s,c),t.set(s,c))}}}}},e.prototype.updateYAxes=function(t){var e=this,n=this.view.getYScales();(0,td.S6)(n,function(n,i){if(n&&!n.isIdentity){var r=n.field,o=rf(e.option,r);if(!1!==o){var a=M.BG,s=e.getId("axis",r),l=e.getId("grid",r),u=e.view.getCoordinate();if(u.isRect){var c=rd(o,0===i?P.LEFT:P.RIGHT),E=e.cache.get(s);if(E){var h=e.getLineAxisCfg(n,o,c);i9(h,l3),E.component.update(h),t.set(s,E)}else E=e.createLineAxis(n,o,a,c,"y"),e.cache.set(s,E),t.set(s,E);var p=e.cache.get(l);if(p){var h=e.getLineGridCfg(n,o,c,"y");i9(h,l3),p.component.update(h),t.set(l,p)}else(p=e.createLineGrid(n,o,a,c,"y"))&&(e.cache.set(l,p),t.set(l,p))}else if(u.isPolar){var E=e.cache.get(s);if(E){var h=u.isTransposed?e.getCircleAxisCfg(n,o,P.CIRCLE):e.getLineAxisCfg(n,o,P.RADIUS);i9(h,l3),E.component.update(h),t.set(s,E)}else{if(u.isTransposed){if((0,td.o8)(o))return;E=e.createCircleAxis(n,o,a,P.CIRCLE,"y")}else E=e.createLineAxis(n,o,a,P.RADIUS,"y");e.cache.set(s,E),t.set(s,E)}var p=e.cache.get(l);if(p){var h=u.isTransposed?e.getLineGridCfg(n,o,P.CIRCLE,"y"):e.getCircleGridCfg(n,o,P.RADIUS,"y");i9(h,l3),p.component.update(h),t.set(l,p)}else{if(u.isTransposed){if((0,td.o8)(o))return;p=e.createLineGrid(n,o,a,P.CIRCLE,"y")}else p=e.createCircleGrid(n,o,a,P.RADIUS,"y");p&&(e.cache.set(l,p),t.set(l,p))}}}}})},e.prototype.createLineAxis=function(t,e,n,i,r){var o={component:new io(this.getLineAxisCfg(t,e,i)),layer:n,direction:i===P.RADIUS?P.NONE:i,type:D.AXIS,extra:{dim:r,scale:t}};return o.component.set("field",t.field),o.component.init(),o},e.prototype.createLineGrid=function(t,e,n,i,r){var o=this.getLineGridCfg(t,e,i,r);if(o){var a={component:new iS(o),layer:n,direction:P.NONE,type:D.GRID,extra:{dim:r,scale:t,alignTick:(0,td.U2)(o,"alignTick",!0)}};return a.component.init(),a}},e.prototype.createCircleAxis=function(t,e,n,i,r){var o={component:new ia(this.getCircleAxisCfg(t,e,i)),layer:n,direction:i,type:D.AXIS,extra:{dim:r,scale:t}};return o.component.set("field",t.field),o.component.init(),o},e.prototype.createCircleGrid=function(t,e,n,i,r){var o=this.getCircleGridCfg(t,e,i,r);if(o){var a={component:new iA(o),layer:n,direction:P.NONE,type:D.GRID,extra:{dim:r,scale:t,alignTick:(0,td.U2)(o,"alignTick",!0)}};return a.component.init(),a}},e.prototype.getLineAxisCfg=function(t,e,n){var i=(0,td.U2)(e,["top"])?this.axisForeContainer:this.axisContainer,r=this.view.getCoordinate(),o=ru(r,n),a=rA(t,e),s=rh(this.view.getTheme(),n),l=(0,td.U2)(e,["title"])?(0,td.b$)({title:{style:{text:a}}},{title:rp(this.view.getTheme(),n,e.title)},e):e,u=(0,td.b$)((0,tf.pi)((0,tf.pi)({container:i},o),{ticks:t.getTicks().map(function(t){return{id:""+t.tickValue,name:t.text,value:t.value}}),verticalFactor:r.isPolar?-1*rE(o,r.getCenter()):rE(o,r.getCenter()),theme:s}),s,l),c=this.getAnimateCfg(u),E=c.animate,h=c.animateOption;u.animateOption=h,u.animate=E;var p=rc(o),T=(0,td.U2)(u,"verticalLimitLength",p?1/3:.5);if(T<=1){var f=this.view.getCanvas().get("width"),d=this.view.getCanvas().get("height");u.verticalLimitLength=T*(p?f:d)}return u},e.prototype.getLineGridCfg=function(t,e,n,i){if(l6(rh(this.view.getTheme(),n),e)){var r=l1(this.view.getTheme(),n),o=(0,td.b$)({container:(0,td.U2)(e,["top"])?this.gridForeContainer:this.gridContainer},r,(0,td.U2)(e,"grid"),this.getAnimateCfg(e));return o.items=l2(this.view.getCoordinate(),t,i,(0,td.U2)(o,"alignTick",!0)),o}},e.prototype.getCircleAxisCfg=function(t,e,n){var i=(0,td.U2)(e,["top"])?this.axisForeContainer:this.axisContainer,r=this.view.getCoordinate(),o=t.getTicks().map(function(t){return{id:""+t.tickValue,name:t.text,value:t.value}});t.isCategory||Math.abs(r.endAngle-r.startAngle)!==2*Math.PI||o.pop();var a=rA(t,e),s=rh(this.view.getTheme(),P.CIRCLE),l=(0,td.U2)(e,["title"])?(0,td.b$)({title:{style:{text:a}}},{title:rp(this.view.getTheme(),n,e.title)},e):e,u=(0,td.b$)((0,tf.pi)((0,tf.pi)({container:i},rT(this.view.getCoordinate())),{ticks:o,verticalFactor:1,theme:s}),s,l),c=this.getAnimateCfg(u),E=c.animate,h=c.animateOption;return u.animate=E,u.animateOption=h,u},e.prototype.getCircleGridCfg=function(t,e,n,i){if(l6(rh(this.view.getTheme(),n),e)){var r=l1(this.view.getTheme(),P.RADIUS),o=(0,td.b$)({container:(0,td.U2)(e,["top"])?this.gridForeContainer:this.gridContainer,center:this.view.getCoordinate().getCenter()},r,(0,td.U2)(e,"grid"),this.getAnimateCfg(e)),a=(0,td.U2)(o,"alignTick",!0),s="x"===i?this.view.getYScales()[0]:this.view.getXScale();return o.items=l5(this.view.getCoordinate(),s,t,a,i),o}},e.prototype.getId=function(t,e){return t+"-"+e+"-"+this.view.getCoordinate().type},e.prototype.getAnimateCfg=function(t){return{animate:this.view.getOptions().animate&&(0,td.U2)(t,"animate"),animateOption:t&&t.animateOption?(0,td.b$)({},l4,t.animateOption):l4}},e}(om);function l9(t,e,n){return n===P.TOP?[t.minX+t.width/2-e.width/2,t.minY]:n===P.BOTTOM?[t.minX+t.width/2-e.width/2,t.maxY-e.height]:n===P.LEFT?[t.minX,t.minY+t.height/2-e.height/2]:n===P.RIGHT?[t.maxX-e.width,t.minY+t.height/2-e.height/2]:n===P.TOP_LEFT||n===P.LEFT_TOP?[t.tl.x,t.tl.y]:n===P.TOP_RIGHT||n===P.RIGHT_TOP?[t.tr.x-e.width,t.tr.y]:n===P.BOTTOM_LEFT||n===P.LEFT_BOTTOM?[t.bl.x,t.bl.y-e.height]:n===P.BOTTOM_RIGHT||n===P.RIGHT_BOTTOM?[t.br.x-e.width,t.br.y-e.height]:[0,0]}function l7(t,e){return(0,td.jn)(t)?!1!==t&&{}:(0,td.U2)(t,[e],t)}function ut(t){return(0,td.U2)(t,"position",P.BOTTOM)}var ue=function(t){function e(e){var n=t.call(this,e)||this;return n.container=n.view.getLayer(M.FORE).addGroup(),n}return(0,tf.ZT)(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return"legend"},enumerable:!1,configurable:!0}),e.prototype.init=function(){},e.prototype.render=function(){this.update()},e.prototype.layout=function(){var t=this;this.layoutBBox=this.view.viewBBox,(0,td.S6)(this.components,function(e){var n=e.component,i=e.direction,r=ae(i),o=n.get("maxWidthRatio"),a=n.get("maxHeightRatio"),s=t.getCategoryLegendSizeCfg(r,o,a),l=n.get("maxWidth"),u=n.get("maxHeight");n.update({maxWidth:Math.min(s.maxWidth,l||0),maxHeight:Math.min(s.maxHeight,u||0)});var c=n.get("padding"),E=n.getLayoutBBox(),h=new rt(E.x,E.y,E.width,E.height).expand(c),p=l9(t.view.viewBBox,h,i),T=p[0],f=p[1],d=l9(t.layoutBBox,h,i),A=d[0],S=d[1],R=0,g=0;i.startsWith("top")||i.startsWith("bottom")?(R=T,g=S):(R=A,g=f),n.setLocation({x:R+c[3],y:g+c[0]}),t.layoutBBox=t.layoutBBox.cut(h,i)})},e.prototype.update=function(){var t=this;this.option=this.view.getOptions().legends;var e={};if((0,td.U2)(this.option,"custom")){var n="global-custom",i=this.getComponentById(n);if(i){var r=this.getCategoryCfg(void 0,void 0,void 0,this.option,!0);i9(r,["container"]),i.component.update(r),e[n]=!0}else{var o=this.createCustomLegend(void 0,void 0,void 0,this.option);if(o){o.init();var a=M.FORE,s=ut(this.option);this.components.push({id:n,component:o,layer:a,direction:s,type:D.LEGEND,extra:void 0}),e[n]=!0}}}else this.loopLegends(function(n,i,r){var o=t.getId(r.field),a=t.getComponentById(o);if(a){var s=void 0,l=l7(t.option,r.field);!1!==l&&((0,td.U2)(l,"custom")?s=t.getCategoryCfg(n,i,r,l,!0):r.isLinear?s=t.getContinuousCfg(n,i,r,l):r.isCategory&&(s=t.getCategoryCfg(n,i,r,l))),s&&(i9(s,["container"]),a.direction=ut(l),a.component.update(s),e[o]=!0)}else{var u=t.createFieldLegend(n,i,r);u&&(u.component.init(),t.components.push(u),e[o]=!0)}});var l=[];(0,td.S6)(this.getComponents(),function(t){e[t.id]?l.push(t):t.component.destroy()}),this.components=l},e.prototype.clear=function(){t.prototype.clear.call(this),this.container.clear()},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.container.remove(!0)},e.prototype.getGeometries=function(t){var e=this,n=t.geometries;return(0,td.S6)(t.views,function(t){n=n.concat(e.getGeometries(t))}),n},e.prototype.loopLegends=function(t){if(this.view.getRootView()===this.view){var e=this.getGeometries(this.view),n={};(0,td.S6)(e,function(e){var i=e.getGroupAttributes();(0,td.S6)(i,function(i){var r=i.getScale(i.type);r&&"identity"!==r.type&&!n[r.field]&&(t(e,i,r),n[r.field]=!0)})})}},e.prototype.createFieldLegend=function(t,e,n){var i,r=l7(this.option,n.field),o=M.FORE,a=ut(r);if(!1!==r&&((0,td.U2)(r,"custom")?i=this.createCustomLegend(t,e,n,r):n.isLinear?i=this.createContinuousLegend(t,e,n,r):n.isCategory&&(i=this.createCategoryLegend(t,e,n,r))),i)return i.set("field",n.field),{id:this.getId(n.field),component:i,layer:o,direction:a,type:D.LEGEND,extra:{scale:n}}},e.prototype.createCustomLegend=function(t,e,n,i){var r=this.getCategoryCfg(t,e,n,i,!0);return new iN(r)},e.prototype.createContinuousLegend=function(t,e,n,i){var r=this.getContinuousCfg(t,e,n,i9(i,["value"]));return new iC(r)},e.prototype.createCategoryLegend=function(t,e,n,i){var r=this.getCategoryCfg(t,e,n,i);return new iN(r)},e.prototype.getContinuousCfg=function(t,e,n,i){var r=n.getTicks(),o=(0,td.sE)(r,function(t){return 0===t.value}),a=(0,td.sE)(r,function(t){return 1===t.value}),s=r.map(function(t){var i=t.value,r=t.tickValue,o=e.mapping(n.invert(i)).join("");return{value:r,attrValue:o,color:o,scaleValue:i}});o||s.push({value:n.min,attrValue:e.mapping(n.invert(0)).join(""),color:e.mapping(n.invert(0)).join(""),scaleValue:0}),a||s.push({value:n.max,attrValue:e.mapping(n.invert(1)).join(""),color:e.mapping(n.invert(1)).join(""),scaleValue:1}),s.sort(function(t,e){return t.value-e.value});var l={min:(0,td.YM)(s).value,max:(0,td.Z$)(s).value,colors:[],rail:{type:e.type},track:{}};"size"===e.type&&(l.track={style:{fill:"size"===e.type?this.view.getTheme().defaultColor:void 0}}),"color"===e.type&&(l.colors=s.map(function(t){return t.attrValue}));var u=this.container,c=ae(ut(i)),E=(0,td.U2)(i,"title");return E&&(E=(0,td.b$)({text:rs(n)},E)),l.container=u,l.layout=c,l.title=E,l.animateOption=oP,this.mergeLegendCfg(l,i,"continuous")},e.prototype.getCategoryCfg=function(t,e,n,i,r){var o=this.container,a=(0,td.U2)(i,"position",P.BOTTOM),s=ai(this.view.getTheme(),a),l=(0,td.U2)(s,["marker"]),u=(0,td.U2)(i,"marker"),c=ae(a),E=(0,td.U2)(s,["pageNavigator"]),h=(0,td.U2)(i,"pageNavigator"),p=r?i.items.map(function(t,e){var n=u;(0,td.mf)(n)&&(n=n(t.name,e,(0,td.b$)({},l,t)));var i=(0,td.mf)(t.marker)?t.marker(t.name,e,(0,td.b$)({},l,t)):t.marker,r=(0,td.b$)({},l,n,i);return at(r),t.marker=r,t}):an(this.view,t,e,l,u),T=(0,td.U2)(i,"title");T&&(T=(0,td.b$)({text:n?rs(n):""},T));var f=(0,td.U2)(i,"maxWidthRatio"),d=(0,td.U2)(i,"maxHeightRatio"),A=this.getCategoryLegendSizeCfg(c,f,d);A.container=o,A.layout=c,A.items=p,A.title=T,A.animateOption=oP,A.pageNavigator=(0,td.b$)({},E,h);var S=this.mergeLegendCfg(A,i,a);S.reversed&&S.items.reverse();var R=(0,td.U2)(S,"maxItemWidth");return R&&R<=1&&(S.maxItemWidth=this.view.viewBBox.width*R),S},e.prototype.mergeLegendCfg=function(t,e,n){var i=n.split("-")[0],r=ai(this.view.getTheme(),i);return(0,td.b$)({},r,t,e)},e.prototype.getId=function(t){return this.name+"-"+t},e.prototype.getComponentById=function(t){return(0,td.sE)(this.components,function(e){return e.id===t})},e.prototype.getCategoryLegendSizeCfg=function(t,e,n){void 0===e&&(e=.25),void 0===n&&(n=.25);var i=this.view.viewBBox,r=i.width,o=i.height;return"vertical"===t?{maxWidth:r*e,maxHeight:o}:{maxWidth:r,maxHeight:o*n}},e}(om),un=function(t){function e(e){var n=t.call(this,e)||this;return n.onChangeFn=td.ZT,n.resetMeasure=function(){n.clear()},n.onValueChange=function(t){var e=t[0],i=t[1];n.start=e,n.end=i,n.changeViewData(e,i)},n.container=n.view.getLayer(M.FORE).addGroup(),n.onChangeFn=(0,td.P2)(n.onValueChange,20,{leading:!0}),n.width=0,n.view.on(U.BEFORE_CHANGE_DATA,n.resetMeasure),n.view.on(U.BEFORE_CHANGE_SIZE,n.resetMeasure),n}return(0,tf.ZT)(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return"slider"},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.view.off(U.BEFORE_CHANGE_DATA,this.resetMeasure),this.view.off(U.BEFORE_CHANGE_SIZE,this.resetMeasure)},e.prototype.init=function(){},e.prototype.render=function(){this.option=this.view.getOptions().slider;var t=this.getSliderCfg(),e=t.start,n=t.end;(0,td.UM)(this.start)&&(this.start=e,this.end=n);var i=this.view.getOptions().data;this.option&&!(0,td.xb)(i)?this.slider?this.slider=this.updateSlider():(this.slider=this.createSlider(),this.slider.component.on("sliderchange",this.onChangeFn)):this.slider&&(this.slider.component.destroy(),this.slider=void 0)},e.prototype.layout=function(){var t=this;if(this.option&&!this.width&&(this.measureSlider(),setTimeout(function(){t.view.destroyed||t.changeViewData(t.start,t.end)},0)),this.slider){var e=this.view.coordinateBBox.width,n=this.slider.component.get("padding"),i=n[0],r=(n[1],n[2],n[3]),o=this.slider.component.getLayoutBBox(),a=new rt(o.x,o.y,Math.min(o.width,e),o.height).expand(n),s=this.getMinMaxText(this.start,this.end),l=s.minText,u=s.maxText,c=l9(this.view.viewBBox,a,P.BOTTOM),E=(c[0],c[1]),h=l9(this.view.coordinateBBox,a,P.BOTTOM),p=h[0];h[1],this.slider.component.update((0,tf.pi)((0,tf.pi)({},this.getSliderCfg()),{x:p+r,y:E+i,width:this.width,start:this.start,end:this.end,minText:l,maxText:u})),this.view.viewBBox=this.view.viewBBox.cut(a,P.BOTTOM)}},e.prototype.update=function(){this.render()},e.prototype.createSlider=function(){var t=this.getSliderCfg(),e=new iJ((0,tf.pi)({container:this.container},t));return e.init(),{component:e,layer:M.FORE,direction:P.BOTTOM,type:D.SLIDER}},e.prototype.updateSlider=function(){var t=this.getSliderCfg();if(this.width){var e=this.getMinMaxText(this.start,this.end),n=e.minText,i=e.maxText;t=(0,tf.pi)((0,tf.pi)({},t),{width:this.width,start:this.start,end:this.end,minText:n,maxText:i})}return this.slider.component.update(t),this.slider},e.prototype.measureSlider=function(){var t=this.getSliderCfg().width;this.width=t},e.prototype.getSliderCfg=function(){var t={height:16,start:0,end:1,minText:"",maxText:"",x:0,y:0,width:this.view.coordinateBBox.width};if((0,td.Kn)(this.option)){var e=(0,tf.pi)({data:this.getData()},(0,td.U2)(this.option,"trendCfg",{}));t=(0,td.b$)({},t,this.getThemeOptions(),this.option),t=(0,tf.pi)((0,tf.pi)({},t),{trendCfg:e})}return t.start=(0,td.uZ)(Math.min((0,td.UM)(t.start)?0:t.start,(0,td.UM)(t.end)?1:t.end),0,1),t.end=(0,td.uZ)(Math.max((0,td.UM)(t.start)?0:t.start,(0,td.UM)(t.end)?1:t.end),0,1),t},e.prototype.getData=function(){var t=this.view.getOptions().data,e=this.view.getYScales()[0],n=this.view.getGroupScales();if(n.length){var i=n[0],r=i.field,o=i.ticks;return t.reduce(function(t,n){return n[r]===o[0]&&t.push(n[e.field]),t},[])}return t.map(function(t){return t[e.field]||0})},e.prototype.getThemeOptions=function(){var t=this.view.getTheme();return(0,td.U2)(t,["components","slider","common"],{})},e.prototype.getMinMaxText=function(t,e){var n=this.view.getOptions().data,i=this.view.getXScale(),r=(0,td.I)(n,i.field),o=(0,td.dp)(n);if(!i||!o)return{};var a=(0,td.dp)(r),s=Math.floor(t*(a-1)),l=Math.floor(e*(a-1)),u=(0,td.U2)(r,[s]),c=(0,td.U2)(r,[l]),E=this.getSliderCfg().formatter;return E&&(u=E(u,n[s],s),c=E(c,n[l],l)),{minText:u,maxText:c}},e.prototype.changeViewData=function(t,e){var n=this.view.getOptions().data,i=this.view.getXScale(),r=(0,td.dp)(n);if(i&&r){var o=(0,td.I)(n,i.field),a=(0,td.dp)(o),s=Math.floor(t*(a-1)),l=Math.floor(e*(a-1));this.view.filter(i.field,function(t,e){var n=o.indexOf(t);return!(n>-1)||i8(n,s,l)}),this.view.render(!0)}},e.prototype.getComponents=function(){return this.slider?[this.slider]:[]},e.prototype.clear=function(){this.slider&&(this.slider.component.destroy(),this.slider=void 0),this.width=0,this.start=void 0,this.end=void 0},e}(om),ui=function(t){function e(e){var n=t.call(this,e)||this;return n.onChangeFn=td.ZT,n.resetMeasure=function(){n.clear()},n.onValueChange=function(t){var e=t.ratio,i=n.getValidScrollbarCfg().animate;n.ratio=(0,td.uZ)(e,0,1);var r=n.view.getOptions().animate;i||n.view.animate(!1),n.changeViewData(n.getScrollRange(),!0),n.view.animate(r)},n.container=n.view.getLayer(M.FORE).addGroup(),n.onChangeFn=(0,td.P2)(n.onValueChange,20,{leading:!0}),n.trackLen=0,n.thumbLen=0,n.ratio=0,n.view.on(U.BEFORE_CHANGE_DATA,n.resetMeasure),n.view.on(U.BEFORE_CHANGE_SIZE,n.resetMeasure),n}return(0,tf.ZT)(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return"scrollbar"},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.view.off(U.BEFORE_CHANGE_DATA,this.resetMeasure),this.view.off(U.BEFORE_CHANGE_SIZE,this.resetMeasure)},e.prototype.init=function(){},e.prototype.render=function(){this.option=this.view.getOptions().scrollbar,this.option?this.scrollbar?this.scrollbar=this.updateScrollbar():(this.scrollbar=this.createScrollbar(),this.scrollbar.component.on("scrollchange",this.onChangeFn)):this.scrollbar&&(this.scrollbar.component.destroy(),this.scrollbar=void 0)},e.prototype.layout=function(){var t=this;if(this.option&&!this.trackLen&&(this.measureScrollbar(),setTimeout(function(){t.view.destroyed||t.changeViewData(t.getScrollRange(),!0)})),this.scrollbar){var e=this.view.coordinateBBox.width,n=this.scrollbar.component.get("padding"),i=this.scrollbar.component.getLayoutBBox(),r=new rt(i.x,i.y,Math.min(i.width,e),i.height).expand(n),o=this.getScrollbarComponentCfg(),a=void 0,s=void 0;if(o.isHorizontal){var l=l9(this.view.viewBBox,r,P.BOTTOM),u=l[0],c=l[1],E=l9(this.view.coordinateBBox,r,P.BOTTOM),h=E[0],p=E[1];a=h,s=c}else{var T=l9(this.view.viewBBox,r,P.RIGHT),u=T[0],c=T[1],f=l9(this.view.viewBBox,r,P.RIGHT),h=f[0],p=f[1];a=h,s=c}a+=n[3],s+=n[0],this.trackLen?this.scrollbar.component.update((0,tf.pi)((0,tf.pi)({},o),{x:a,y:s,trackLen:this.trackLen,thumbLen:this.thumbLen,thumbOffset:(this.trackLen-this.thumbLen)*this.ratio})):this.scrollbar.component.update((0,tf.pi)((0,tf.pi)({},o),{x:a,y:s})),this.view.viewBBox=this.view.viewBBox.cut(r,o.isHorizontal?P.BOTTOM:P.RIGHT)}},e.prototype.update=function(){this.render()},e.prototype.getComponents=function(){return this.scrollbar?[this.scrollbar]:[]},e.prototype.clear=function(){this.scrollbar&&(this.scrollbar.component.destroy(),this.scrollbar=void 0),this.trackLen=0,this.thumbLen=0,this.ratio=0,this.cnt=0,this.step=0,this.data=void 0,this.xScaleCfg=void 0,this.yScalesCfg=[]},e.prototype.setValue=function(t){this.onValueChange({ratio:t})},e.prototype.getValue=function(){return this.ratio},e.prototype.getThemeOptions=function(){var t=this.view.getTheme();return(0,td.U2)(t,["components","scrollbar","common"],{})},e.prototype.getScrollbarTheme=function(t){var e=(0,td.U2)(this.view.getTheme(),["components","scrollbar"]),n=t||{},i=n.thumbHighlightColor,r=(0,tf._T)(n,["thumbHighlightColor"]);return{default:(0,td.b$)({},(0,td.U2)(e,["default","style"],{}),r),hover:(0,td.b$)({},(0,td.U2)(e,["hover","style"],{}),{thumbColor:i})}},e.prototype.measureScrollbar=function(){var t=this.view.getXScale(),e=this.view.getYScales().slice();this.data=this.getScrollbarData(),this.step=this.getStep(),this.cnt=this.getCnt();var n=this.getScrollbarComponentCfg(),i=n.trackLen,r=n.thumbLen;this.trackLen=i,this.thumbLen=r,this.xScaleCfg={field:t.field,values:t.values||[]},this.yScalesCfg=e},e.prototype.getScrollRange=function(){var t=Math.floor((this.cnt-this.step)*(0,td.uZ)(this.ratio,0,1)),e=Math.min(t+this.step-1,this.cnt-1);return[t,e]},e.prototype.changeViewData=function(t,e){var n=this,i=t[0],r=t[1],o=this.getValidScrollbarCfg().type,a=(0,td.I)(this.data,this.xScaleCfg.field),s="vertical"!==o?a:a.reverse();this.yScalesCfg.forEach(function(t){n.view.scale(t.field,{formatter:t.formatter,type:t.type,min:t.min,max:t.max})}),this.view.filter(this.xScaleCfg.field,function(t){var e=s.indexOf(t);return!(e>-1)||i8(e,i,r)}),this.view.render(!0)},e.prototype.createScrollbar=function(){var t=this.getValidScrollbarCfg().type,e=new iQ((0,tf.pi)((0,tf.pi)({container:this.container},this.getScrollbarComponentCfg()),{x:0,y:0}));return e.init(),{component:e,layer:M.FORE,direction:"vertical"!==t?P.BOTTOM:P.RIGHT,type:D.SCROLLBAR}},e.prototype.updateScrollbar=function(){var t=this.getScrollbarComponentCfg(),e=this.trackLen?(0,tf.pi)((0,tf.pi)({},t),{trackLen:this.trackLen,thumbLen:this.thumbLen,thumbOffset:(this.trackLen-this.thumbLen)*this.ratio}):(0,tf.pi)({},t);return this.scrollbar.component.update(e),this.scrollbar},e.prototype.getStep=function(){if(this.step)return this.step;var t=this.view.coordinateBBox,e=this.getValidScrollbarCfg(),n=e.type,i=e.categorySize;return Math.floor(("vertical"!==n?t.width:t.height)/i)},e.prototype.getCnt=function(){if(this.cnt)return this.cnt;var t=this.view.getXScale(),e=this.getScrollbarData(),n=(0,td.I)(e,t.field);return(0,td.dp)(n)},e.prototype.getScrollbarComponentCfg=function(){var t=this.view,e=t.coordinateBBox,n=t.viewBBox,i=this.getValidScrollbarCfg(),r=i.type,o=i.padding,a=i.width,s=i.height,l=i.style,u="vertical"!==r,c=o[0],E=o[1],h=o[2],p=o[3],T=u?{x:e.minX+p,y:n.maxY-s-h}:{x:n.maxX-a-E,y:e.minY+c},f=this.getStep(),d=this.getCnt(),A=u?e.width-p-E:e.height-c-h,S=Math.max(A*(0,td.uZ)(f/d,0,1),20);return(0,tf.pi)((0,tf.pi)({},this.getThemeOptions()),{x:T.x,y:T.y,size:u?s:a,isHorizontal:u,trackLen:A,thumbLen:S,thumbOffset:0,theme:this.getScrollbarTheme(l)})},e.prototype.getValidScrollbarCfg=function(){var t={type:"horizontal",categorySize:32,width:8,height:8,padding:[0,0,0,0],animate:!0,style:{}};return(0,td.Kn)(this.option)&&(t=(0,tf.pi)((0,tf.pi)({},t),this.option)),(0,td.Kn)(this.option)&&this.option.padding||(t.padding=(t.type,[0,0,0,0])),t},e.prototype.getScrollbarData=function(){var t=this.view.getCoordinate(),e=this.getValidScrollbarCfg(),n=this.view.getOptions().data||[];return t.isReflect("y")&&"vertical"===e.type&&(n=(0,tf.ev)([],n,!0).reverse()),n},e}(om),ur={fill:"#CCD6EC",opacity:.3},uo=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.show=function(t){var e=this.context.view,n=this.context.event,i=e.getController("tooltip").getTooltipCfg(),r=function(t,e,n){var i=function(t,e,n){for(var i=of(t,e,n),r=0,o=t.views;r1){for(var h=i[0],p=Math.abs(e.y-h[0].y),T=0,f=i;TE.maxY&&(E=e)):(e.minXE.maxX&&(E=e)),h.x=Math.min(e.minX,h.minX),h.y=Math.min(e.minY,h.minY),h.width=Math.max(e.maxX,h.maxX)-h.x,h.height=Math.max(e.maxY,h.maxY)-h.y});var p=e.backgroundGroup,T=e.coordinateBBox,f=void 0;if(u.isRect){var d=e.getXScale(),A=t||{},S=A.appendRatio,R=A.appendWidth;(0,td.UM)(R)&&(S=(0,td.UM)(S)?d.isLinear?0:.25:S,R=u.isTransposed?S*E.height:S*c.width);var g=void 0,I=void 0,O=void 0,y=void 0;u.isTransposed?(g=T.minX,I=Math.min(E.minY,c.minY)-R,O=T.width,y=h.height+2*R):(g=Math.min(c.minX,E.minX)-R,I=T.minY,O=h.width+2*R,y=T.height),f=[["M",g,I],["L",g+O,I],["L",g+O,I+y],["L",g,I+y],["Z"]]}else{var v=(0,td.YM)(s),N=(0,td.Z$)(s),C=i3(v.getModel(),u).startAngle,m=i3(N.getModel(),u).endAngle,L=u.getCenter(),_=u.getRadius(),x=u.innerRadius*_;f=i5(L.x,L.y,_,C,m,x)}if(this.regionPath)this.regionPath.attr("path",f),this.regionPath.show();else{var M=(0,td.U2)(t,"style",ur);this.regionPath=p.addShape({type:"path",name:"active-region",capture:!1,attrs:(0,tf.pi)((0,tf.pi)({},M),{path:f})})}}}},e.prototype.hide=function(){this.regionPath&&this.regionPath.hide(),this.items=null},e.prototype.destroy=function(){this.hide(),this.regionPath&&this.regionPath.remove(!0),t.prototype.destroy.call(this)},e}(rI),ua=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.timeStamp=0,e}return(0,tf.ZT)(e,t),e.prototype.show=function(){var t=this.context,e=t.event,n=t.view;if(!n.isTooltipLocked()){var i=this.timeStamp,r=+new Date;if(r-i>(0,td.U2)(t.view.getOptions(),"tooltip.showDelay",16)){var o=this.location,a={x:e.x,y:e.y};o&&(0,td.Xy)(o,a)||this.showTooltip(n,a),this.timeStamp=r,this.location=a}}},e.prototype.hide=function(){var t=this.context.view,e=t.getController("tooltip"),n=this.context.event,i=n.clientX,r=n.clientY;e.isCursorEntered({x:i,y:r})||t.isTooltipLocked()||(this.hideTooltip(t),this.location=null)},e.prototype.showTooltip=function(t,e){t.showTooltip(e)},e.prototype.hideTooltip=function(t){t.hideTooltip()},e}(rI),us=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.showTooltip=function(t,e){var n=r$(t);(0,td.S6)(n,function(n){var i=rJ(t,n,e);n.showTooltip(i)})},e.prototype.hideTooltip=function(t){var e=r$(t);(0,td.S6)(e,function(t){t.hideTooltip()})},e}(ua),ul=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.timeStamp=0,e}return(0,tf.ZT)(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.tooltip&&this.tooltip.destroy()},e.prototype.show=function(){var t=this.context.event,e=this.timeStamp,n=+new Date;if(n-e>16){var i=this.location,r={x:t.x,y:t.y};i&&(0,td.Xy)(i,r)||this.showTooltip(r),this.timeStamp=n,this.location=r}},e.prototype.hide=function(){this.hideTooltip(),this.location=null},e.prototype.showTooltip=function(t){var e=this.context.event.target;if(e&&e.get("tip")){this.tooltip||this.renderTooltip();var n=e.get("tip");this.tooltip.update((0,tf.pi)({title:n},t)),this.tooltip.show()}},e.prototype.hideTooltip=function(){this.tooltip&&this.tooltip.hide()},e.prototype.renderTooltip=function(){var t,e=this.context.view,n=e.canvas,i={start:{x:0,y:0},end:{x:n.get("width"),y:n.get("height")}},r=e.getTheme(),o=(0,td.U2)(r,["components","tooltip","domStyles"],{}),a=new iB({parent:n.get("el").parentNode,region:i,visible:!1,crosshairs:null,domStyles:(0,tf.pi)({},(0,td.b$)({},o,((t={})[im]={"max-width":"50%"},t[iL]={"word-break":"break-all"},t)))});a.init(),a.setCapture(!1),this.tooltip=a},e}(rI),uu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="",e}return(0,tf.ZT)(e,t),e.prototype.hasState=function(t){return t.hasState(this.stateName)},e.prototype.setElementState=function(t,e){t.setState(this.stateName,e)},e.prototype.setState=function(){this.setStateEnable(!0)},e.prototype.clear=function(){var t=this.context.view;this.clearViewState(t)},e.prototype.clearViewState=function(t){var e=this,n=rk(t,this.stateName);(0,td.S6)(n,function(t){e.setElementState(t,!1)})},e}(rI);function uc(t){return(0,td.U2)(t.get("delegateObject"),"item")}var uE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.ignoreListItemStates=["unchecked"],e}return(0,tf.ZT)(e,t),e.prototype.isItemIgnore=function(t,e){return!!this.ignoreListItemStates.filter(function(n){return e.hasState(t,n)}).length},e.prototype.setStateByComponent=function(t,e,n){var i=this.context.view,r=t.get("field"),o=rY(i);this.setElementsStateByItem(o,r,e,n)},e.prototype.setStateByElement=function(t,e){this.setElementState(t,e)},e.prototype.isMathItem=function(t,e,n){var i=rq(this.context.view,e),r=rV(t,e);return!(0,td.UM)(r)&&n.name===i.getText(r)},e.prototype.setElementsStateByItem=function(t,e,n,i){var r=this;(0,td.S6)(t,function(t){r.isMathItem(t,e,n)&&t.setState(r.stateName,i)})},e.prototype.setStateEnable=function(t){var e=rD(this.context);if(e)rb(this.context)&&this.setStateByElement(e,t);else{var n=rU(this.context);if(rF(n)){var i=n.item,r=n.component;if(i&&r&&!this.isItemIgnore(i,r)){var o=this.context.event.gEvent;if(o&&o.fromShape&&o.toShape&&uc(o.fromShape)===uc(o.toShape))return;this.setStateByComponent(r,i,t)}}}},e.prototype.toggle=function(){var t=rD(this.context);if(t){var e=t.hasState(this.stateName);this.setElementState(t,!e)}},e.prototype.reset=function(){this.setStateEnable(!1)},e}(uu),uh=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="active",e}return(0,tf.ZT)(e,t),e.prototype.active=function(){this.setState()},e}(uE),up=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.cache={},e}return(0,tf.ZT)(e,t),e.prototype.getColorScale=function(t,e){var n=e.geometry.getAttribute("color");return n?t.getScaleByField(n.getFields()[0]):null},e.prototype.getLinkPath=function(t,e){var n=this.context.view.getCoordinate().isTransposed,i=t.shape.getCanvasBBox(),r=e.shape.getCanvasBBox();return n?[["M",i.minX,i.minY],["L",r.minX,r.maxY],["L",r.maxX,r.maxY],["L",i.maxX,i.minY],["Z"]]:[["M",i.maxX,i.minY],["L",r.minX,r.minY],["L",r.minX,r.maxY],["L",i.maxX,i.maxY],["Z"]]},e.prototype.addLinkShape=function(t,e,n,i){var r={opacity:.4,fill:e.shape.attr("fill")};t.addShape({type:"path",attrs:(0,tf.pi)((0,tf.pi)({},(0,td.b$)({},r,(0,td.mf)(i)?i(r,e):i)),{path:this.getLinkPath(e,n)})})},e.prototype.linkByElement=function(t,e){var n=this,i=this.context.view,r=this.getColorScale(i,t);if(r){var o=rV(t,r.field);if(!this.cache[o]){var a,s=(a=r.field,rY(i).filter(function(t){return rV(t,a)===o})),l=this.linkGroup.addGroup();this.cache[o]=l;var u=s.length;(0,td.S6)(s,function(t,i){if(i=0},e)},e}(uT),uL=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="active",e}return(0,tf.ZT)(e,t),e.prototype.highlight=function(){this.setState()},e.prototype.setElementState=function(t,e){uI(rY(this.context.view),function(e){return t===e},e)},e.prototype.clear=function(){ug(this.context.view)},e}(ud),u_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="selected",e}return(0,tf.ZT)(e,t),e.prototype.selected=function(){this.setState()},e}(uT),ux=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="selected",e}return(0,tf.ZT)(e,t),e.prototype.selected=function(){this.setState()},e}(uE),uM=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="selected",e}return(0,tf.ZT)(e,t),e.prototype.selected=function(){this.setState()},e}(ud),uP=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="",e.ignoreItemStates=[],e}return(0,tf.ZT)(e,t),e.prototype.getTriggerListInfo=function(){var t=rU(this.context),e=null;return rF(t)&&(e={item:t.item,list:t.component}),e},e.prototype.getAllowComponents=function(){var t=this,e=rK(this.context.view),n=[];return(0,td.S6)(e,function(e){e.isList()&&t.allowSetStateByElement(e)&&n.push(e)}),n},e.prototype.hasState=function(t,e){return t.hasState(e,this.stateName)},e.prototype.clearAllComponentsState=function(){var t=this,e=this.getAllowComponents();(0,td.S6)(e,function(e){e.clearItemsState(t.stateName)})},e.prototype.allowSetStateByElement=function(t){var e=t.get("field");if(!e)return!1;if(this.cfg&&this.cfg.componentNames){var n=t.get("name");if(-1===this.cfg.componentNames.indexOf(n))return!1}var i=rq(this.context.view,e);return i&&i.isCategory},e.prototype.allowSetStateByItem=function(t,e){var n=this.ignoreItemStates;return!n.length||0===n.filter(function(n){return e.hasState(t,n)}).length},e.prototype.setStateByElement=function(t,e,n){var i=t.get("field"),r=rq(this.context.view,i),o=rV(e,i),a=r.getText(o);this.setItemsState(t,a,n)},e.prototype.setStateEnable=function(t){var e=this,n=rD(this.context);if(n){var i=this.getAllowComponents();(0,td.S6)(i,function(i){e.setStateByElement(i,n,t)})}else{var r=rU(this.context);if(rF(r)){var o=r.item,a=r.component;this.allowSetStateByElement(a)&&this.allowSetStateByItem(o,a)&&this.setItemState(a,o,t)}}},e.prototype.setItemsState=function(t,e,n){var i=this,r=t.getItems();(0,td.S6)(r,function(r){r.name===e&&i.setItemState(t,r,n)})},e.prototype.setItemState=function(t,e,n){t.setItemState(e,this.stateName,n)},e.prototype.setState=function(){this.setStateEnable(!0)},e.prototype.reset=function(){this.setStateEnable(!1)},e.prototype.toggle=function(){var t=this.getTriggerListInfo();if(t&&t.item){var e=t.list,n=t.item,i=this.hasState(e,n);this.setItemState(e,n,!i)}},e.prototype.clear=function(){var t=this.getTriggerListInfo();t?t.list.clearItemsState(this.stateName):this.clearAllComponentsState()},e}(rI),uD=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="active",e}return(0,tf.ZT)(e,t),e.prototype.active=function(){this.setState()},e}(uP),uU="inactive",ub="active",uF="inactive",uB="active",uG=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName=uB,e.ignoreItemStates=["unchecked"],e}return(0,tf.ZT)(e,t),e.prototype.setItemsState=function(t,e,n){this.setHighlightBy(t,function(t){return t.name===e},n)},e.prototype.setItemState=function(t,e,n){t.getItems(),this.setHighlightBy(t,function(t){return t===e},n)},e.prototype.setHighlightBy=function(t,e,n){var i=t.getItems();if(n)(0,td.S6)(i,function(n){e(n)?(t.hasState(n,uF)&&t.setItemState(n,uF,!1),t.setItemState(n,uB,!0)):t.hasState(n,uB)||t.setItemState(n,uF,!0)});else{var r=t.getItemsByState(uB),o=!0;(0,td.S6)(r,function(t){if(!e(t))return o=!1,!1}),o?this.clear():(0,td.S6)(i,function(n){e(n)&&(t.hasState(n,uB)&&t.setItemState(n,uB,!1),t.setItemState(n,uF,!0))})}},e.prototype.highlight=function(){this.setState()},e.prototype.clear=function(){var t,e,n=this.getTriggerListInfo();if(n)e=(t=n.list).getItems(),(0,td.S6)(e,function(e){t.hasState(e,ub)&&t.setItemState(e,ub,!1),t.hasState(e,uU)&&t.setItemState(e,uU,!1)});else{var i=this.getAllowComponents();(0,td.S6)(i,function(t){t.clearItemsState(uB),t.clearItemsState(uF)})}},e}(uP),uw=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="selected",e}return(0,tf.ZT)(e,t),e.prototype.selected=function(){this.setState()},e}(uP),uH=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="unchecked",e}return(0,tf.ZT)(e,t),e.prototype.unchecked=function(){this.setState()},e}(uP),uY="unchecked",uk="checked",uV=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName=uk,e}return(0,tf.ZT)(e,t),e.prototype.setItemState=function(t,e,n){this.setCheckedBy(t,function(t){return t===e},n)},e.prototype.setCheckedBy=function(t,e,n){var i=t.getItems();n&&(0,td.S6)(i,function(n){e(n)?(t.hasState(n,uY)&&t.setItemState(n,uY,!1),t.setItemState(n,uk,!0)):t.hasState(n,uk)||t.setItemState(n,uY,!0)})},e.prototype.toggle=function(){var t=this.getTriggerListInfo();if(t&&t.item){var e=t.list,n=t.item;!(0,td.G)(e.getItems(),function(t){return e.hasState(t,uY)})||e.hasState(n,uY)?this.setItemState(e,n,!0):this.reset()}},e.prototype.checked=function(){this.setState()},e.prototype.reset=function(){var t=this.getAllowComponents();(0,td.S6)(t,function(t){t.clearItemsState(uk),t.clearItemsState(uY)})},e}(uP),uW=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.maskShape=null,e.points=[],e.starting=!1,e.moving=!1,e.preMovePoint=null,e.shapeType="path",e}return(0,tf.ZT)(e,t),e.prototype.getCurrentPoint=function(){var t=this.context.event;return{x:t.x,y:t.y}},e.prototype.emitEvent=function(t){var e=this.context.view,n=this.context.event;e.emit("mask:"+t,{target:this.maskShape,shape:this.maskShape,points:this.points,x:n.x,y:n.y})},e.prototype.createMask=function(){var t=this.context.view,e=this.getMaskAttrs();return t.foregroundGroup.addShape({type:this.shapeType,name:"mask",draggable:!0,attrs:(0,tf.pi)({fill:"#C5D4EB",opacity:.3},e)})},e.prototype.getMaskPath=function(){return[]},e.prototype.show=function(){this.maskShape&&(this.maskShape.show(),this.emitEvent("show"))},e.prototype.start=function(t){this.starting=!0,this.moving=!1,this.points=[this.getCurrentPoint()],this.maskShape||(this.maskShape=this.createMask(),this.maskShape.set("capture",!1)),this.updateMask(null==t?void 0:t.maskStyle),this.emitEvent("start")},e.prototype.moveStart=function(){this.moving=!0,this.preMovePoint=this.getCurrentPoint()},e.prototype.move=function(){if(this.moving&&this.maskShape){var t=this.getCurrentPoint(),e=this.preMovePoint,n=t.x-e.x,i=t.y-e.y,r=this.points;(0,td.S6)(r,function(t){t.x+=n,t.y+=i}),this.updateMask(),this.emitEvent("change"),this.preMovePoint=t}},e.prototype.updateMask=function(t){var e=(0,td.b$)({},this.getMaskAttrs(),t);this.maskShape.attr(e)},e.prototype.moveEnd=function(){this.moving=!1,this.preMovePoint=null},e.prototype.end=function(){this.starting=!1,this.emitEvent("end"),this.maskShape&&this.maskShape.set("capture",!0)},e.prototype.hide=function(){this.maskShape&&(this.maskShape.hide(),this.emitEvent("hide"))},e.prototype.resize=function(){this.starting&&this.maskShape&&(this.points.push(this.getCurrentPoint()),this.updateMask(),this.emitEvent("change"))},e.prototype.destroy=function(){this.points=[],this.maskShape&&this.maskShape.remove(),this.maskShape=null,this.preMovePoint=null,t.prototype.destroy.call(this)},e}(rI),uX=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.shapeType="circle",e}return(0,tf.ZT)(e,t),e.prototype.getMaskAttrs=function(){var t=this.points,e=(0,td.Z$)(this.points),n=0,i=0,r=0;if(t.length){var o=t[0];n=rz(o,e)/2,i=(e.x+o.x)/2,r=(e.y+o.y)/2}return{x:i,y:r,r:n}},e}(uW),uK=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.shapeType="rect",e}return(0,tf.ZT)(e,t),e.prototype.getRegion=function(){var t=this.points;return{start:(0,td.YM)(t),end:(0,td.Z$)(t)}},e.prototype.getMaskAttrs=function(){var t=this.getRegion(),e=t.start,n=t.end;return{x:Math.min(e.x,n.x),y:Math.min(e.y,n.y),width:Math.abs(n.x-e.x),height:Math.abs(n.y-e.y)}},e}(uW);function uz(t){t.x=(0,td.uZ)(t.x,0,1),t.y=(0,td.uZ)(t.y,0,1)}var uZ=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.dim="x",e.inPlot=!0,e}return(0,tf.ZT)(e,t),e.prototype.getRegion=function(){var t=null,e=null,n=this.points,i=this.dim,r=this.context.view.getCoordinate(),o=r.invert((0,td.YM)(n)),a=r.invert((0,td.Z$)(n));return this.inPlot&&(uz(o),uz(a)),"x"===i?(t=r.convert({x:o.x,y:0}),e=r.convert({x:a.x,y:1})):(t=r.convert({x:0,y:o.y}),e=r.convert({x:1,y:a.y})),{start:t,end:e}},e}(uK),u$=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getMaskPath=function(){var t=this.points,e=[];return t.length&&((0,td.S6)(t,function(t,n){0===n?e.push(["M",t.x,t.y]):e.push(["L",t.x,t.y])}),e.push(["L",t[0].x,t[0].y])),e},e.prototype.getMaskAttrs=function(){return{path:this.getMaskPath()}},e.prototype.addPoint=function(){this.resize()},e}(uW),uJ=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getMaskPath=function(){return function(t,e){if(t.length<=2)return rx(t,!1);var n=t[0],i=[];(0,td.S6)(t,function(t){i.push(t.x),i.push(t.y)});var r=r_(i,e,null);return r.unshift(["M",n.x,n.y]),r}(this.points,!0)},e}(u$),uj=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.setCursor=function(t){this.context.view.getCanvas().setCursor(t)},e.prototype.default=function(){this.setCursor("default")},e.prototype.pointer=function(){this.setCursor("pointer")},e.prototype.move=function(){this.setCursor("move")},e.prototype.crosshair=function(){this.setCursor("crosshair")},e.prototype.wait=function(){this.setCursor("wait")},e.prototype.help=function(){this.setCursor("help")},e.prototype.text=function(){this.setCursor("text")},e.prototype.eResize=function(){this.setCursor("e-resize")},e.prototype.wResize=function(){this.setCursor("w-resize")},e.prototype.nResize=function(){this.setCursor("n-resize")},e.prototype.sResize=function(){this.setCursor("s-resize")},e.prototype.neResize=function(){this.setCursor("ne-resize")},e.prototype.nwResize=function(){this.setCursor("nw-resize")},e.prototype.seResize=function(){this.setCursor("se-resize")},e.prototype.swResize=function(){this.setCursor("sw-resize")},e.prototype.nsResize=function(){this.setCursor("ns-resize")},e.prototype.ewResize=function(){this.setCursor("ew-resize")},e}(rI),uq=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.filterView=function(t,e,n){var i=this;t.getScaleByField(e)&&t.filter(e,n),t.views&&t.views.length&&(0,td.S6)(t.views,function(t){i.filterView(t,e,n)})},e.prototype.filter=function(){var t=rU(this.context);if(t){var e=this.context.view,n=t.component,i=n.get("field");if(rF(t)){if(i){var r=n.getItemsByState("unchecked"),o=rq(e,i),a=r.map(function(t){return t.name});a.length?this.filterView(e,i,function(t){var e=o.getText(t);return!a.includes(e)}):this.filterView(e,i,null),e.render(!0)}}else if(rB(t)){var s=n.getValue(),l=s[0],u=s[1];this.filterView(e,i,function(t){return t>=l&&t<=u}),e.render(!0)}}},e}(rI);function uQ(t,e,n,i){var r=Math.min(n[e],i[e]),o=Math.max(n[e],i[e]),a=t.range,s=a[0],l=a[1];if(rl&&(o=l),r===l&&o===l)return null;var u=t.invert(r),c=t.invert(o);if(!t.isCategory)return function(t){return t>=u&&t<=c};var E=t.values.indexOf(u),h=t.values.indexOf(c),p=t.values.slice(E,h+1);return function(t){return p.includes(t)}}(v=z||(z={})).FILTER="brush-filter-processing",v.RESET="brush-filter-reset",v.BEFORE_FILTER="brush-filter:beforefilter",v.AFTER_FILTER="brush-filter:afterfilter",v.BEFORE_RESET="brush-filter:beforereset",v.AFTER_RESET="brush-filter:afterreset";var u0=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.dims=["x","y"],e.startPoint=null,e.isStarted=!1,e}return(0,tf.ZT)(e,t),e.prototype.hasDim=function(t){return this.dims.includes(t)},e.prototype.start=function(){var t=this.context;this.isStarted=!0,this.startPoint=t.getCurrentPoint()},e.prototype.filter=function(){if(rG(this.context)){var t,e,n=this.context.event.target.getCanvasBBox();t={x:n.x,y:n.y},e={x:n.maxX,y:n.maxY}}else{if(!this.isStarted)return;t=this.startPoint,e=this.context.getCurrentPoint()}if(!(5>Math.abs(t.x-e.x)||5>Math.abs(t.x-e.y))){var i=this.context,r=i.view,o={view:r,event:i.event,dims:this.dims};r.emit(z.BEFORE_FILTER,oR.fromData(r,z.BEFORE_FILTER,o));var a=r.getCoordinate(),s=a.invert(e),l=a.invert(t);if(this.hasDim("x")){var u=r.getXScale(),c=uQ(u,"x",s,l);this.filterView(r,u.field,c)}if(this.hasDim("y")){var E=r.getYScales()[0],c=uQ(E,"y",s,l);this.filterView(r,E.field,c)}this.reRender(r,{source:z.FILTER}),r.emit(z.AFTER_FILTER,oR.fromData(r,z.AFTER_FILTER,o))}},e.prototype.end=function(){this.isStarted=!1},e.prototype.reset=function(){var t=this.context.view;if(t.emit(z.BEFORE_RESET,oR.fromData(t,z.BEFORE_RESET,{})),this.isStarted=!1,this.hasDim("x")){var e=t.getXScale();this.filterView(t,e.field,null)}if(this.hasDim("y")){var n=t.getYScales()[0];this.filterView(t,n.field,null)}this.reRender(t,{source:z.RESET}),t.emit(z.AFTER_RESET,oR.fromData(t,z.AFTER_RESET,{}))},e.prototype.filterView=function(t,e,n){t.filter(e,n)},e.prototype.reRender=function(t,e){t.render(!0,e)},e}(rI),u1=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.filterView=function(t,e,n){var i=r$(t);(0,td.S6)(i,function(t){t.filter(e,n)})},e.prototype.reRender=function(t){var e=r$(t);(0,td.S6)(e,function(t){t.render(!0)})},e}(u0),u2=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.filter=function(){var t=rU(this.context),e=this.context.view,n=rY(e);if(rG(this.context)){var i=rw(this.context,10);i&&(0,td.S6)(n,function(t){i.includes(t)?t.show():t.hide()})}else if(t){var r=t.component,o=r.get("field");if(rF(t)){if(o){var a=r.getItemsByState("unchecked"),s=rq(e,o),l=a.map(function(t){return t.name});(0,td.S6)(n,function(t){var e=rV(t,o),n=s.getText(e);l.indexOf(n)>=0?t.hide():t.show()})}}else if(rB(t)){var u=r.getValue(),c=u[0],E=u[1];(0,td.S6)(n,function(t){var e=rV(t,o);e>=c&&e<=E?t.show():t.hide()})}}},e.prototype.clear=function(){var t=rY(this.context.view);(0,td.S6)(t,function(t){t.show()})},e.prototype.reset=function(){this.clear()},e}(rI),u5=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.byRecord=!1,e}return(0,tf.ZT)(e,t),e.prototype.filter=function(){rG(this.context)&&(this.byRecord?this.filterByRecord():this.filterByBBox())},e.prototype.filterByRecord=function(){var t=this.context.view,e=rw(this.context,10);if(e){var n=t.getXScale().field,i=t.getYScales()[0].field,r=e.map(function(t){return t.getModel().data}),o=r$(t);(0,td.S6)(o,function(t){var e=rY(t);(0,td.S6)(e,function(t){rj(r,t.getModel().data,n,i)?t.show():t.hide()})})}},e.prototype.filterByBBox=function(){var t=this,e=r$(this.context.view);(0,td.S6)(e,function(e){var n=rH(t.context,e,10),i=rY(e);n&&(0,td.S6)(i,function(t){n.includes(t)?t.show():t.hide()})})},e.prototype.reset=function(){var t=r$(this.context.view);(0,td.S6)(t,function(t){var e=rY(t);(0,td.S6)(e,function(t){t.show()})})},e}(rI),u6=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.buttonGroup=null,e.buttonCfg={name:"button",text:"button",textStyle:{x:0,y:0,fontSize:12,fill:"#333333",cursor:"pointer"},padding:[8,10],style:{fill:"#f7f7f7",stroke:"#cccccc",cursor:"pointer"},activeStyle:{fill:"#e6e6e6"}},e}return(0,tf.ZT)(e,t),e.prototype.getButtonCfg=function(){return(0,td.b$)(this.buttonCfg,this.cfg)},e.prototype.drawButton=function(){var t=this.getButtonCfg(),e=this.context.view.foregroundGroup.addGroup({name:t.name}),n=e.addShape({type:"text",name:"button-text",attrs:(0,tf.pi)({text:t.text},t.textStyle)}).getBBox(),i=od(t.padding),r=e.addShape({type:"rect",name:"button-rect",attrs:(0,tf.pi)({x:n.x-i[3],y:n.y-i[0],width:n.width+i[1]+i[3],height:n.height+i[0]+i[2]},t.style)});r.toBack(),e.on("mouseenter",function(){r.attr(t.activeStyle)}),e.on("mouseleave",function(){r.attr(t.style)}),this.buttonGroup=e},e.prototype.resetPosition=function(){var t=this.context.view.getCoordinate().convert({x:1,y:1}),e=this.buttonGroup,n=e.getBBox(),i=ne.vs(null,[["t",t.x-n.width-10,t.y+n.height+5]]);e.setMatrix(i)},e.prototype.show=function(){this.buttonGroup||this.drawButton(),this.resetPosition(),this.buttonGroup.show()},e.prototype.hide=function(){this.buttonGroup&&this.buttonGroup.hide()},e.prototype.destroy=function(){var e=this.buttonGroup;e&&e.remove(),t.prototype.destroy.call(this)},e}(rI),u3=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.starting=!1,e.dragStart=!1,e}return(0,tf.ZT)(e,t),e.prototype.start=function(){this.starting=!0,this.startPoint=this.context.getCurrentPoint()},e.prototype.drag=function(){if(this.startPoint){var t=this.context.getCurrentPoint(),e=this.context.view,n=this.context.event;this.dragStart?e.emit("drag",{target:n.target,x:n.x,y:n.y}):rz(t,this.startPoint)>4&&(e.emit("dragstart",{target:n.target,x:n.x,y:n.y}),this.dragStart=!0)}},e.prototype.end=function(){if(this.dragStart){var t=this.context.view,e=this.context.event;t.emit("dragend",{target:e.target,x:e.x,y:e.y})}this.starting=!1,this.dragStart=!1},e}(rI),u4=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.starting=!1,e.isMoving=!1,e.startPoint=null,e.startMatrix=null,e}return(0,tf.ZT)(e,t),e.prototype.start=function(){this.starting=!0,this.startPoint=this.context.getCurrentPoint(),this.startMatrix=this.context.view.middleGroup.getMatrix()},e.prototype.move=function(){if(this.starting){var t=this.startPoint,e=this.context.getCurrentPoint();if(rz(t,e)>5&&!this.isMoving&&(this.isMoving=!0),this.isMoving){var n=this.context.view,i=ne.vs(this.startMatrix,[["t",e.x-t.x,e.y-t.y]]);n.backgroundGroup.setMatrix(i),n.foregroundGroup.setMatrix(i),n.middleGroup.setMatrix(i)}}},e.prototype.end=function(){this.isMoving&&(this.isMoving=!1),this.startMatrix=null,this.starting=!1,this.startPoint=null},e.prototype.reset=function(){this.starting=!1,this.startPoint=null,this.isMoving=!1;var t=this.context.view;t.backgroundGroup.resetMatrix(),t.foregroundGroup.resetMatrix(),t.middleGroup.resetMatrix(),this.isMoving=!1},e}(rI),u8=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.dims=["x","y"],e.cfgFields=["dims"],e.cacheScaleDefs={},e}return(0,tf.ZT)(e,t),e.prototype.hasDim=function(t){return this.dims.includes(t)},e.prototype.getScale=function(t){var e=this.context.view;return"x"===t?e.getXScale():e.getYScales()[0]},e.prototype.resetDim=function(t){var e=this.context.view;if(this.hasDim(t)&&this.cacheScaleDefs[t]){var n=this.getScale(t);e.scale(n.field,this.cacheScaleDefs[t]),this.cacheScaleDefs[t]=null}},e.prototype.reset=function(){this.resetDim("x"),this.resetDim("y"),this.context.view.render(!0)},e}(rI),u9=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.startPoint=null,e.starting=!1,e.startCache={},e}return(0,tf.ZT)(e,t),e.prototype.start=function(){var t=this;this.startPoint=this.context.getCurrentPoint(),this.starting=!0;var e=this.dims;(0,td.S6)(e,function(e){var n=t.getScale(e),i=n.min,r=n.max,o=n.values;t.startCache[e]={min:i,max:r,values:o}})},e.prototype.end=function(){this.startPoint=null,this.starting=!1,this.startCache={}},e.prototype.translate=function(){var t=this;if(this.starting){var e=this.startPoint,n=this.context.view.getCoordinate(),i=this.context.getCurrentPoint(),r=n.invert(e),o=n.invert(i),a=o.x-r.x,s=o.y-r.y,l=this.context.view,u=this.dims;(0,td.S6)(u,function(e){t.translateDim(e,{x:-1*a,y:-1*s})}),l.render(!0)}},e.prototype.translateDim=function(t,e){if(this.hasDim(t)){var n=this.getScale(t);n.isLinear&&this.translateLinear(t,n,e)}},e.prototype.translateLinear=function(t,e,n){var i=this.context.view,r=this.startCache[t],o=r.min,a=r.max,s=n[t]*(a-o);this.cacheScaleDefs[t]||(this.cacheScaleDefs[t]={nice:e.nice,min:o,max:a}),i.scale(e.field,{nice:!1,min:o+s,max:a+s})},e.prototype.reset=function(){t.prototype.reset.call(this),this.startPoint=null,this.starting=!1},e}(u8),u7=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.zoomRatio=.05,e}return(0,tf.ZT)(e,t),e.prototype.zoomIn=function(){this.zoom(this.zoomRatio)},e.prototype.zoom=function(t){var e=this,n=this.dims;(0,td.S6)(n,function(n){e.zoomDim(n,t)}),this.context.view.render(!0)},e.prototype.zoomOut=function(){this.zoom(-1*this.zoomRatio)},e.prototype.zoomDim=function(t,e){if(this.hasDim(t)){var n=this.getScale(t);n.isLinear&&this.zoomLinear(t,n,e)}},e.prototype.zoomLinear=function(t,e,n){var i=this.context.view;this.cacheScaleDefs[t]||(this.cacheScaleDefs[t]={nice:e.nice,min:e.min,max:e.max});var r=this.cacheScaleDefs[t],o=r.max-r.min,a=e.min,s=e.max,l=n*o,u=a-l,c=s+l,E=(c-u)/o;c>u&&E<100&&E>.01&&i.scale(e.field,{nice:!1,min:a-l,max:s+l})},e}(u8),ct=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.scroll=function(t){var e=this.context,n=e.view,i=e.event;if(n.getOptions().scrollbar){var r=(null==t?void 0:t.wheelDelta)||1,o=n.getController("scrollbar"),a=n.getXScale(),s=n.getOptions().data,l=(0,td.dp)((0,td.I)(s,a.field)),u=(0,td.dp)(a.values),c=Math.floor((l-u)*o.getValue())+(i.gEvent.originalEvent.deltaY>0?r:-r),E=r/(l-u)/1e4,h=(0,td.uZ)(c/(l-u)+E,0,1);o.setValue(h)}},e}(rI);function ce(t){return t.isInPlot()}function cn(t){return t.gEvent.preventDefault(),t.gEvent.originalEvent.deltaY>0}N=r8(as),oo[(0,td.vl)("dark")]=or(N),tg.canvas=tE,tg.svg=tp,oN("Polygon",ls),oN("Interval",ln),oN("Schema",ll),oN("Path",s0),oN("Point",la),oN("Line",li),oN("Area",s5),oN("Edge",s6),oN("Heatmap",s3),oN("Violin",lu),oY("base",o4),oY("interval",lA),oY("pie",lg),oY("polar",lR),ok("overlap",function(t,e,n,i){var r=new lO;(0,td.S6)(e,function(t){for(var e=t.find(function(t){return"text"===t.get("type")}),n=e.attr(),i=n.x,o=n.y,a=!1,s=0;s<=8;s++){var l=function(t,e,n,i){var r=t.getCanvasBBox(),o=r.width,a=r.height,s={x:e,y:n,textAlign:"center"};switch(i){case 0:s.y-=a+1,s.x+=1,s.textAlign="left";break;case 1:s.y-=a+1,s.x-=1,s.textAlign="right";break;case 2:s.y+=a+1,s.x-=1,s.textAlign="right";break;case 3:s.y+=a+1,s.x+=1,s.textAlign="left";break;case 5:s.y-=2*a+2;break;case 6:s.y+=2*a+2;break;case 7:s.x+=o+1,s.textAlign="left";break;case 8:s.x-=o+1,s.textAlign="right"}return t.attr(s),t.getCanvasBBox()}(e,i,o,s);if(r.hasGap(l)){r.fillGap(l),a=!0;break}}a||t.remove(!0)}),r.destroy()}),ok("distribute",function(t,e,n,i){if(t.length&&e.length){var r=t[0]?t[0].offset:0,o=e[0].get("coordinate"),a=o.getRadius(),s=o.getCenter();if(r>0){var l=2*(a+r)+28,u={start:o.start,end:o.end},c=[[],[]];t.forEach(function(t){t&&("right"===t.textAlign?c[0].push(t):c[1].push(t))}),c.forEach(function(t,n){var i=l/14;t.length>i&&(t.sort(function(t,e){return e["..percent"]-t["..percent"]}),t.splice(i,t.length-i)),t.sort(function(t,e){return t.y-e.y}),function(t,e,n,i,r,o){var a,s=!0,l=i.start,u=i.end,c=Math.min(l.y,u.y),E=Math.abs(l.y-u.y),h=0,p=Number.MIN_VALUE,T=e.map(function(t){return t.y>h&&(h=t.y),t.yE&&(E=h-c);s;)for(T.forEach(function(t){var e=(Math.min.apply(p,t.targets)+Math.max.apply(p,t.targets))/2;t.pos=Math.min(Math.max(p,e-t.size/2),E-t.size)}),s=!1,a=T.length;a--;)if(a>0){var f=T[a-1],d=T[a];f.pos+f.size>d.pos&&(f.size+=d.size,f.targets=f.targets.concat(d.targets),f.pos+f.size>E&&(f.pos=E-f.size),T.splice(a,1),s=!0)}a=0,T.forEach(function(t){var i=c+n/2;t.targets.forEach(function(){e[a].y=t.pos+i,i+=n,a++})});for(var A={},S=0;St.x+t.width+n||e.x+e.widtht.y+t.height+n||e.y+e.heightu.min)||!(l.minr.maxX||i.maxY>r.maxY)&&t.remove(!0)})}),ok("limit-in-canvas",function(t,e,n,i){(0,td.S6)(e,function(t){var e=i.minX,n=i.minY,r=i.maxX,o=i.maxY,a=t.getCanvasBBox(),s=a.minX,l=a.minY,u=a.maxX,c=a.maxY,E=a.x,h=a.y,p=a.width,T=a.height,f=E,d=h;(sr?f=r-p:u>r&&(f-=u-r),l>o?d=o-T:c>o&&(d-=c-o),(f!==E||d!==h)&&o0(t,f-E,d-h)})}),ok("limit-in-plot",function(t,e,n,i,r){if(!(e.length<=0)){var o,a,s,l,u,c,E,h=(null==r?void 0:r.direction)||["top","right","bottom","left"],p=(null==r?void 0:r.action)||"translate",T=(null==r?void 0:r.margin)||0,f=e[0].get("coordinate");if(f){var d=(void 0===(o=T)&&(o=0),a=f.start,s=f.end,l=f.getWidth(),u=f.getHeight(),c=Math.min(a.x,s.x),E=Math.min(a.y,s.y),rt.fromRange(c-o,E-o,c+l+o,E+u+o)),A=d.minX,S=d.minY,R=d.maxX,g=d.maxY;(0,td.S6)(e,function(t){var e=t.getCanvasBBox(),n=e.minX,i=e.minY,r=e.maxX,o=e.maxY,a=e.x,s=e.y,l=e.width,u=e.height,c=a,E=s;if(h.indexOf("left")>=0&&(n=0&&(i=0&&(n>R?c=R-l:r>R&&(c-=r-R)),h.indexOf("bottom")>=0&&(i>g?E=g-u:o>g&&(E-=o-g)),c!==a||E!==s){var T=c-a;"translate"===p?o0(t,T,E-s):"ellipsis"===p?t.findAll(function(t){return"text"===t.get("type")}).forEach(function(t){var e=(0,td.ei)(t.attr(),["fontSize","fontFamily","fontWeight","fontStyle","fontVariant"]),n=t.getCanvasBBox(),i=lB(t.attr("text"),n.width-Math.abs(T),e);t.attr("text",i)}):t.hide()}})}}}),ok("pie-outer",function(t,e,n,i){var r=(0,td.hX)(t,function(t){return!(0,td.UM)(t)}),o=e[0]&&e[0].get("coordinate");if(o){for(var a=o.getCenter(),s=o.getRadius(),l={},u=0;un&&(t.sort(function(t,e){return e.percent-t.percent}),(0,td.S6)(t,function(t,e){e+1>n&&(l[t.id].set("visible",!1),t.invisible=!0)})),lI(t,E,R)}),(0,td.S6)(T,function(t,e){(0,td.S6)(t,function(t){var n=e===p,i=l[t.id].getChildByIndex(0);if(i){var r=s+h,u=t.y-a.y,c=Math.pow(r,2),E=Math.pow(u,2),T=Math.sqrt(c-E>0?c-E:0),f=Math.abs(Math.cos(t.angle)*r);n?t.x=a.x+Math.max(T,f):t.x=a.x-Math.max(T,f)}i&&(i.attr("y",t.y),i.attr("x",t.x)),function(t,e){var n=e.getCenter(),i=e.getRadius();if(t&&t.labelLine){var r=t.angle,o=t.offset,a=i2(n.x,n.y,i,r),s=t.x+(0,td.U2)(t,"offsetX",0)*(Math.cos(r)>0?1:-1),l=t.y+(0,td.U2)(t,"offsetY",0)*(Math.sin(r)>0?1:-1),u={x:s-4*Math.cos(r),y:l-4*Math.sin(r)},c=t.labelLine.smooth,E=[],h=u.x-n.x,p=Math.atan((u.y-n.y)/h);if(h<0&&(p+=Math.PI),!1===c){(0,td.Kn)(t.labelLine)||(t.labelLine={});var T=0;(r<0&&r>-Math.PI/2||r>1.5*Math.PI)&&u.y>a.y&&(T=1),r>=0&&ra.y&&(T=1),r>=Math.PI/2&&ru.y&&(T=1),(r<-Math.PI/2||r>=Math.PI&&r<1.5*Math.PI)&&a.y>u.y&&(T=1);var f=o/2>4?4:Math.max(o/2-1,0),d=i2(n.x,n.y,i+f,r),A=i2(n.x,n.y,i+o/2,p);E.push("M "+a.x+" "+a.y),E.push("L "+d.x+" "+d.y),E.push("A "+n.x+" "+n.y+" 0 0 "+T+" "+A.x+" "+A.y),E.push("L "+u.x+" "+u.y)}else{var d=i2(n.x,n.y,i+(o/2>4?4:Math.max(o/2-1,0)),r),S=a.x11253517471925921e-23&&E.push.apply(E,["C",u.x+4*S,u.y,2*d.x-a.x,2*d.y-a.y,a.x,a.y]),E.push("L "+a.x+" "+a.y)}t.labelLine.path=E.join(" ")}}(t,o)})})}}}),ok("adjust-color",function(t,e,n){if(0!==n.length){var i=n[0].get("element").geometry.theme,r=i.labels||{},o=r.fillColorLight,a=r.fillColorDark;n.forEach(function(t,n){var r=e[n].find(function(t){return"text"===t.get("type")}),s=rt.fromObject(t.getBBox()),l=rt.fromObject(r.getCanvasBBox()),u=!s.contains(l),c=lM(t.attr("fill"));u?r.attr(i.overflowLabels.style):c?o&&r.attr("fill",o):a&&r.attr("fill",a)})}}),ok("interval-adjust-position",function(t,e,n){if(0!==n.length){var i,r=null===(i=n[0])||void 0===i?void 0:i.get("element"),o=null==r?void 0:r.geometry;o&&"interval"===o.type&&(o.getAdjust("stack")||e.every(function(t,e){var i,r,a,s,l=n[e];return i=o.coordinate,r=o2(t),a=rt.fromObject(r.getCanvasBBox()),s=rt.fromObject(l.getBBox()),i.isTransposed?s.height>=a.height:s.width>=a.width}))&&n.forEach(function(t,n){var i,r,a,s=e[n];i=o.coordinate,r=rt.fromObject(t.getBBox()),a=o2(s),i.isTransposed?a.attr({x:r.minX+r.width/2,textAlign:"center"}):a.attr({y:r.minY+r.height/2,textBaseline:"middle"})})}}),ok("interval-hide-overlap",function(t,e,n){if(0!==n.length){var i,r,o,a=null===(o=n[0])||void 0===o?void 0:o.get("element"),s=null==a?void 0:a.geometry;if(s&&"interval"===s.type){var l=(i=[],r=Math.max(Math.floor(e.length/500),1),(0,td.S6)(e,function(t,e){e%r==0?i.push(t):t.set("visible",!1)}),i),u=s.getXYFields()[0],c=[],E=[],h=(0,td.vM)(l,function(t){return t.get("data")[u]}),p=(0,td.jj)((0,td.UI)(l,function(t){return t.get("data")[u]}));l.forEach(function(t){t.set("visible",!0)});var T=function(t){t&&(t.length&&E.push(t.pop()),E.push.apply(E,t))};for((0,td.dp)(p)>0&&T(h[p.shift()]),(0,td.dp)(p)>0&&T(h[p.pop()]),(0,td.S6)(p.reverse(),function(t){T(h[t])});E.length>0;){var f=E.shift();f.get("visible")&&(function(t,e){var n=t.getBBox();return(0,td.G)(e,function(t){var e=t.getBBox();return Math.max(0,Math.min(n.x+n.width+2,e.x+e.width+2)-Math.max(n.x-2,e.x-2))*Math.max(0,Math.min(n.y+n.height+2,e.y+e.height+2)-Math.max(n.y-2,e.y-2))>0})}(f,c)?f.set("visible",!1):c.push(f))}}}}),ok("point-adjust-position",function(t,e,n,i,r){if(0!==n.length){var o,a,s=null===(o=n[0])||void 0===o?void 0:o.get("element"),l=null==s?void 0:s.geometry;if(l&&"point"===l.type){var u=l.getXYFields(),c=u[0],E=u[1],h=(0,td.vM)(e,function(t){return t.get("data")[c]}),p=[],T=r&&r.offset||(null===(a=t[0])||void 0===a?void 0:a.offset)||12;(0,td.UI)((0,td.XP)(h).reverse(),function(t){for(var e,n,i,r,o=(e=h[t],n=l.getXYFields()[1],i=[],(r=e.sort(function(t,e){return t.get("data")[n]-t.get("data")[n]})).length>0&&i.push(r.shift()),r.length>0&&i.push(r.pop()),i.push.apply(i,r),i);o.length;){var a=o.shift(),s=o2(a);if(lP(p,a,function(t,e){return t.get("data")[c]===e.get("data")[c]&&t.get("data")[E]===e.get("data")[E]})){s.set("visible",!1);continue}var u=lD(p,a),f=!1;if(u&&(s.attr("y",s.attr("y")+2*T),f=lD(p,a)),f){s.set("visible",!1);continue}p.push(a)}})}}}),ok("pie-spider",function(t,e,n,i){var r=e[0]&&e[0].get("coordinate");if(r){for(var o=r.getCenter(),a=r.getRadius(),s={},l=0;lo.x||t.x===o.x&&t.y>o.y,n=(0,td.UM)(t.offsetX)?4:t.offsetX,i=i2(o.x,o.y,a+4,t.angle);t.x=o.x+(e?1:-1)*(a+(E+n)),t.y=i.y}});var h=r.start,p=r.end,T="right",f=(0,td.vM)(t,function(t){return t.xd&&(d=Math.min(e,Math.abs(h.y-p.y)))});var A={minX:h.x,maxX:p.x,minY:o.y-d/2,maxY:o.y+d/2};(0,td.S6)(f,function(t,e){var n=d/c;t.length>n&&(t.sort(function(t,e){return e.percent-t.percent}),(0,td.S6)(t,function(t,e){e>n&&(s[t.id].set("visible",!1),t.invisible=!0)})),lI(t,c,A)});var S=A.minY,R=A.maxY;(0,td.S6)(f,function(t,e){var n=e===T;(0,td.S6)(t,function(t){var e=(0,td.U2)(s,t&&[t.id]);if(e){if(t.yR){e.set("visible",!1);return}var i=e.getChildByIndex(0),o=i.getCanvasBBox(),a={x:n?o.x:o.maxX,y:o.y+o.height/2};o0(i,t.x-a.x,t.y-a.y),t.labelLine&&function(t,e,n){var i=e.getCenter(),r=e.getRadius(),o={x:t.x-(n?4:-4),y:t.y},a=i2(i.x,i.y,r+4,t.angle),s={x:o.x,y:o.y},l={x:a.x,y:a.y},u=i2(i.x,i.y,r,t.angle),c="";if(o.y!==a.y){var E=n?4:-4;s.y=o.y,t.angle<0&&t.angle>=-Math.PI/2&&(s.x=Math.max(a.x,o.x-E),o.y0&&t.anglea.y?l.y=s.y:(l.y=a.y,l.x=Math.max(l.x,s.x-E))),t.angle>Math.PI/2&&(s.x=Math.min(a.x,o.x-E),o.y>a.y?l.y=s.y:(l.y=a.y,l.x=Math.min(l.x,s.x-E))),t.angle<-Math.PI/2&&(s.x=Math.min(a.x,o.x-E),o.y["path","line","area"].indexOf(l.type))){var u=l.getXYFields(),c=u[0],E=u[1],h=(0,td.vM)(e,function(t){return t.get("data")[c]}),p=[],T=r&&r.offset||(null===(a=t[0])||void 0===a?void 0:a.offset)||12;(0,td.UI)((0,td.XP)(h).reverse(),function(t){for(var e,n,i,r,o=(e=h[t],n=l.getXYFields()[1],i=[],(r=e.sort(function(t,e){return t.get("data")[n]-t.get("data")[n]})).length>0&&i.push(r.shift()),r.length>0&&i.push(r.pop()),i.push.apply(i,r),i);o.length;){var a=o.shift(),s=o2(a);if(lU(p,a,function(t,e){return t.get("data")[c]===e.get("data")[c]&&t.get("data")[E]===e.get("data")[E]})){s.set("visible",!1);continue}var u=lb(p,a),f=!1;if(u&&(s.attr("y",s.attr("y")+2*T),f=lb(p,a)),f){s.set("visible",!1);continue}p.push(a)}})}}}),oM("fade-in",function(t,e,n){var i={fillOpacity:(0,td.UM)(t.attr("fillOpacity"))?1:t.attr("fillOpacity"),strokeOpacity:(0,td.UM)(t.attr("strokeOpacity"))?1:t.attr("strokeOpacity"),opacity:(0,td.UM)(t.attr("opacity"))?1:t.attr("opacity")};t.attr({fillOpacity:0,strokeOpacity:0,opacity:0}),t.animate(i,e)}),oM("fade-out",function(t,e,n){var i=e.easing,r=e.duration,o=e.delay;t.animate({fillOpacity:0,strokeOpacity:0,opacity:0},r,i,function(){t.remove(!0)},o)}),oM("grow-in-x",function(t,e,n){lG(t,e,n.coordinate,n.minYPoint,"x")}),oM("grow-in-xy",function(t,e,n){lG(t,e,n.coordinate,n.minYPoint,"xy")}),oM("grow-in-y",function(t,e,n){lG(t,e,n.coordinate,n.minYPoint,"y")}),oM("scale-in-x",function(t,e,n){var i=t.getBBox(),r=t.get("origin").mappingData.points,o=r[0].y-r[1].y>0?i.maxX:i.minX,a=(i.minY+i.maxY)/2;t.applyToMatrix([o,a,1]);var s=ne.vs(t.getMatrix(),[["t",-o,-a],["s",.01,1],["t",o,a]]);t.setMatrix(s),t.animate({matrix:ne.vs(t.getMatrix(),[["t",-o,-a],["s",100,1],["t",o,a]])},e)}),oM("scale-in-y",function(t,e,n){var i=t.getBBox(),r=t.get("origin").mappingData,o=(i.minX+i.maxX)/2,a=r.points,s=a[0].y-a[1].y<=0?i.maxY:i.minY;t.applyToMatrix([o,s,1]);var l=ne.vs(t.getMatrix(),[["t",-o,-s],["s",1,.01],["t",o,s]]);t.setMatrix(l),t.animate({matrix:ne.vs(t.getMatrix(),[["t",-o,-s],["s",1,100],["t",o,s]])},e)}),oM("wave-in",function(t,e,n){var i=ro(n.coordinate,20),r=i.type,o=i.startState,a=i.endState,s=t.setClip({type:r,attrs:o});s.animate(a,(0,tf.pi)((0,tf.pi)({},e),{callback:function(){t&&!t.get("destroyed")&&t.set("clipShape",null),s.remove(!0)}}))}),oM("zoom-in",function(t,e,n){lk(t,e,"zoomIn")}),oM("zoom-out",function(t,e,n){lk(t,e,"zoomOut")}),oM("position-update",function(t,e,n){var i=n.toAttrs,r=i.x,o=i.y;delete i.x,delete i.y,t.attr(i),t.animate({x:r,y:o},e)}),oM("sector-path-update",function(t,e,n){var i=n.toAttrs,r=n.coordinate,o=i.path||[],a=o.map(function(t){return t[0]});if(!(o.length<1)){var s=lY(o),l=s.startAngle,u=s.endAngle,c=s.radius,E=s.innerRadius,h=lY(t.attr("path")),p=h.startAngle,T=h.endAngle,f=r.getCenter(),d=l-p,A=u-T;if(0===d&&0===A){t.attr("path",o);return}t.animate(function(t){var e=p+t*d,n=T+t*A;return(0,tf.pi)((0,tf.pi)({},i),{path:(0,td.Xy)(a,["M","A","A","Z"])?i6(f.x,f.y,c,e,n):i5(f.x,f.y,c,e,n,E)})},(0,tf.pi)((0,tf.pi)({},e),{callback:function(){t.attr("path",o)}}))}}),oM("path-in",function(t,e,n){var i=t.getTotalLength();t.attr("lineDash",[i]),t.animate(function(t){return{lineDashOffset:(1-t)*i}},e)}),rg("rect",l$),rg("mirror",lZ),rg("list",lK),rg("matrix",lz),rg("circle",lX),rg("tree",lJ),oA.axis=l8,oA.legend=ue,oA.tooltip=oL,oA.annotation=l0,oA.slider=un,oA.scrollbar=ui,rN("tooltip",ua),rN("sibling-tooltip",us),rN("ellipsis-text",ul),rN("element-active",uh),rN("element-single-active",uA),rN("element-range-active",uf),rN("element-highlight",uv),rN("element-highlight-by-x",uC),rN("element-highlight-by-color",uN),rN("element-single-highlight",uL),rN("element-range-highlight",um),rN("element-sibling-highlight",um,{effectSiblings:!0,effectByRecord:!0}),rN("element-selected",ux),rN("element-single-selected",uM),rN("element-range-selected",u_),rN("element-link-by-color",up),rN("active-region",uo),rN("list-active",uD),rN("list-selected",uw),rN("list-highlight",uG),rN("list-unchecked",uH),rN("list-checked",uV),rN("legend-item-highlight",uG,{componentNames:["legend"]}),rN("axis-label-highlight",uG,{componentNames:["axis"]}),rN("rect-mask",uK),rN("x-rect-mask",uZ,{dim:"x"}),rN("y-rect-mask",uZ,{dim:"y"}),rN("circle-mask",uX),rN("path-mask",u$),rN("smooth-path-mask",uJ),rN("cursor",uj),rN("data-filter",uq),rN("brush",u0),rN("brush-x",u0,{dims:["x"]}),rN("brush-y",u0,{dims:["y"]}),rN("sibling-filter",u1),rN("sibling-x-filter",u1),rN("sibling-y-filter",u1),rN("element-filter",u2),rN("element-sibling-filter",u5),rN("element-sibling-filter-record",u5,{byRecord:!0}),rN("view-drag",u3),rN("view-move",u4),rN("scale-translate",u9),rN("scale-zoom",u7),rN("reset-button",u6,{name:"reset-button",text:"reset"}),rN("mousewheel-scroll",ct),r4("tooltip",{start:[{trigger:"plot:mousemove",action:"tooltip:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"plot:touchmove",action:"tooltip:show",throttle:{wait:50,leading:!0,trailing:!1}}],end:[{trigger:"plot:mouseleave",action:"tooltip:hide"},{trigger:"plot:leave",action:"tooltip:hide"},{trigger:"plot:touchend",action:"tooltip:hide"}]}),r4("ellipsis-text",{start:[{trigger:"legend-item-name:mousemove",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"legend-item-name:touchstart",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"axis-label:mousemove",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"axis-label:touchstart",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}}],end:[{trigger:"legend-item-name:mouseleave",action:"ellipsis-text:hide"},{trigger:"legend-item-name:touchend",action:"ellipsis-text:hide"},{trigger:"axis-label:mouseleave",action:"ellipsis-text:hide"},{trigger:"axis-label:touchend",action:"ellipsis-text:hide"}]}),r4("element-active",{start:[{trigger:"element:mouseenter",action:"element-active:active"}],end:[{trigger:"element:mouseleave",action:"element-active:reset"}]}),r4("element-selected",{start:[{trigger:"element:click",action:"element-selected:toggle"}]}),r4("element-highlight",{start:[{trigger:"element:mouseenter",action:"element-highlight:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight:reset"}]}),r4("element-highlight-by-x",{start:[{trigger:"element:mouseenter",action:"element-highlight-by-x:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight-by-x:reset"}]}),r4("element-highlight-by-color",{start:[{trigger:"element:mouseenter",action:"element-highlight-by-color:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight-by-color:reset"}]}),r4("legend-active",{start:[{trigger:"legend-item:mouseenter",action:["list-active:active","element-active:active"]}],end:[{trigger:"legend-item:mouseleave",action:["list-active:reset","element-active:reset"]}]}),r4("legend-highlight",{start:[{trigger:"legend-item:mouseenter",action:["legend-item-highlight:highlight","element-highlight:highlight"]}],end:[{trigger:"legend-item:mouseleave",action:["legend-item-highlight:reset","element-highlight:reset"]}]}),r4("axis-label-highlight",{start:[{trigger:"axis-label:mouseenter",action:["axis-label-highlight:highlight","element-highlight:highlight"]}],end:[{trigger:"axis-label:mouseleave",action:["axis-label-highlight:reset","element-highlight:reset"]}]}),r4("element-list-highlight",{start:[{trigger:"element:mouseenter",action:["list-highlight:highlight","element-highlight:highlight"]}],end:[{trigger:"element:mouseleave",action:["list-highlight:reset","element-highlight:reset"]}]}),r4("element-range-highlight",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"mask:mouseenter",action:"cursor:move"},{trigger:"plot:mouseleave",action:"cursor:default"},{trigger:"mask:mouseleave",action:"cursor:crosshair"}],start:[{trigger:"plot:mousedown",isEnable:function(t){return!t.isInShape("mask")},action:["rect-mask:start","rect-mask:show"]},{trigger:"mask:dragstart",action:["rect-mask:moveStart"]}],processing:[{trigger:"plot:mousemove",action:["rect-mask:resize"]},{trigger:"mask:drag",action:["rect-mask:move"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:["rect-mask:end"]},{trigger:"mask:dragend",action:["rect-mask:moveEnd"]},{trigger:"document:mouseup",isEnable:function(t){return!t.isInPlot()},action:["element-range-highlight:clear","rect-mask:end","rect-mask:hide"]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear","rect-mask:hide"]}]}),r4("brush",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:ce,action:["brush:start","rect-mask:start","rect-mask:show"]}],processing:[{trigger:"mousemove",isEnable:ce,action:["rect-mask:resize"]}],end:[{trigger:"mouseup",isEnable:ce,action:["brush:filter","brush:end","rect-mask:end","rect-mask:hide","reset-button:show"]}],rollback:[{trigger:"reset-button:click",action:["brush:reset","reset-button:hide","cursor:crosshair"]}]}),r4("brush-visible",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"plot:mousedown",action:["rect-mask:start","rect-mask:show"]}],processing:[{trigger:"plot:mousemove",action:["rect-mask:resize"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:["rect-mask:end","rect-mask:hide","element-filter:filter","element-range-highlight:clear"]}],rollback:[{trigger:"dblclick",action:["element-filter:clear"]}]}),r4("brush-x",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:ce,action:["brush-x:start","x-rect-mask:start","x-rect-mask:show"]}],processing:[{trigger:"mousemove",isEnable:ce,action:["x-rect-mask:resize"]}],end:[{trigger:"mouseup",isEnable:ce,action:["brush-x:filter","brush-x:end","x-rect-mask:end","x-rect-mask:hide"]}],rollback:[{trigger:"dblclick",action:["brush-x:reset"]}]}),r4("element-path-highlight",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:ce,action:"path-mask:start"},{trigger:"mousedown",isEnable:ce,action:"path-mask:show"}],processing:[{trigger:"mousemove",action:"path-mask:addPoint"}],end:[{trigger:"mouseup",action:"path-mask:end"}],rollback:[{trigger:"dblclick",action:"path-mask:hide"}]}),r4("element-single-selected",{start:[{trigger:"element:click",action:"element-single-selected:toggle"}]}),r4("legend-filter",{showEnable:[{trigger:"legend-item:mouseenter",action:"cursor:pointer"},{trigger:"legend-item:mouseleave",action:"cursor:default"}],start:[{trigger:"legend-item:click",action:["list-unchecked:toggle","data-filter:filter"]}]}),r4("continuous-filter",{start:[{trigger:"legend:valuechanged",action:"data-filter:filter"}]}),r4("continuous-visible-filter",{start:[{trigger:"legend:valuechanged",action:"element-filter:filter"}]}),r4("legend-visible-filter",{showEnable:[{trigger:"legend-item:mouseenter",action:"cursor:pointer"},{trigger:"legend-item:mouseleave",action:"cursor:default"}],start:[{trigger:"legend-item:click",action:["list-unchecked:toggle","element-filter:filter"]}]}),r4("active-region",{start:[{trigger:"plot:mousemove",action:"active-region:show"}],end:[{trigger:"plot:mouseleave",action:"active-region:hide"}]}),r4("view-zoom",{start:[{trigger:"plot:mousewheel",isEnable:function(t){return cn(t.event)},action:"scale-zoom:zoomOut",throttle:{wait:100,leading:!0,trailing:!1}},{trigger:"plot:mousewheel",isEnable:function(t){return!cn(t.event)},action:"scale-zoom:zoomIn",throttle:{wait:100,leading:!0,trailing:!1}}]}),r4("sibling-tooltip",{start:[{trigger:"plot:mousemove",action:"sibling-tooltip:show"}],end:[{trigger:"plot:mouseleave",action:"sibling-tooltip:hide"}]}),r4("plot-mousewheel-scroll",{start:[{trigger:"plot:mousewheel",action:"mousewheel-scroll:scroll"}]});var ci=["type","alias","tickCount","tickInterval","min","max","nice","minLimit","maxLimit","range","tickMethod","base","exponent","mask","sync"];function cr(t){for(var e=[],n=1;n=0}),r=n.every(function(t){return 0>=(0,td.U2)(t,[e])});return i?{min:0}:r?{max:0}:{}}function cl(t,e,n,i,r){if(void 0===r&&(r=[]),!Array.isArray(t))return{nodes:[],links:[]};var o=[],a={},s=-1;return t.forEach(function(t){var l=t[e],u=t[n],c=t[i],E=ca(t,r);a[l]||(a[l]=(0,tf.pi)({id:++s,name:l},E)),a[u]||(a[u]=(0,tf.pi)({id:++s,name:u},E)),o.push((0,tf.pi)({source:a[l].id,target:a[u].id,value:c},E))}),{nodes:Object.values(a).sort(function(t,e){return t.id-e.id}),links:o}}function cu(t,e){var n=(0,td.hX)(t,function(t){var n=t[e];return null===n||"number"==typeof n&&!isNaN(n)});return co(Z.WARN,n.length===t.length,"illegal data existed in chart data."),n}(C=Z||(Z={})).ERROR="error",C.WARN="warn",C.INFO="log";var cc={}.toString,cE=function(t,e){return cc.call(t)==="[object "+e+"]"},ch=function(t){if(!("object"==typeof t&&null!==t)||!cE(t,"Object"))return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},cp=function(t,e,n,i){for(var r in n=n||0,i=i||5,e)if(Object.prototype.hasOwnProperty.call(e,r)){var o=e[r];o?ch(o)?(ch(t[r])||(t[r]={}),n=(0,td.U2)(t,["views","length"],0)?cS(t):(0,td.u4)(t.views,function(t,e){return t.concat(cR(e))},cS(t))}function cg(t){if(!(0,td.P9)(t,"Object"))return t;var e=(0,tf.pi)({},t);return e.formatter&&!e.content&&(e.content=e.formatter),e}function cI(t){return"number"==typeof t&&!isNaN(t)}function cO(t){if((0,td.hj)(t))return[t,t,t,t];if((0,td.kJ)(t)){var e=t.length;if(1===e)return[t[0],t[0],t[0],t[0]];if(2===e)return[t[0],t[1],t[0],t[1]];if(3===e)return[t[0],t[1],t[2],t[1]];if(4===e)return t}return[0,0,0,0]}function cy(t,e,n){void 0===e&&(e="bottom"),void 0===n&&(n=25);var i=cO(t),r=[e.startsWith("top")?n:0,e.startsWith("right")?n:0,e.startsWith("bottom")?n:0,e.startsWith("left")?n:0];return[i[0]+r[0],i[1]+r[1],i[2]+r[2],i[3]+r[3]]}function cv(t){var e=t.map(function(t){return cO(t)}),n=[0,0,0,0];return e.length>0&&(n=n.map(function(t,n){return e.forEach(function(i,r){t+=e[r][n]}),t})),n}(0,td.HP)(function(t,e){void 0===e&&(e={});var n=e.fontSize,i=e.fontFamily,r=e.fontWeight,o=e.fontStyle,a=e.fontVariant,s=($||($=document.createElement("canvas").getContext("2d")),$);return s.font=[o,r,a,"".concat(n,"px"),void 0===i?"sans-serif":i].join(" "),s.measureText((0,td.HD)(t)?t:"").width},function(t,e){return void 0===e&&(e={}),(0,tf.ev)([t],(0,td.VO)(e),!0).join("")});var cN=function(t,e,n,i){var r,o,a,s,l=[],u=!!i;if(u){a=[1/0,1/0],s=[-1/0,-1/0];for(var c=0,E=t.length;c"},key:"".concat(0===i?"top":"bottom","-statistic")},ca(e,["offsetX","offsetY","rotate","style","formatter"])))}})},cx=function(t,e,n){var i=e.statistic;[i.title,i.content].forEach(function(e){if(e){var i=(0,td.mf)(e.style)?e.style(n):e.style;t.annotation().html((0,tf.pi)({position:["50%","100%"],html:function(t,r){var o=r.getCoordinate(),a=r.views[0].getCoordinate(),s=a.getCenter(),l=a.getRadius(),u=Math.max(Math.sin(a.startAngle),Math.sin(a.endAngle))*l,c=s.y+u-o.y.start-parseFloat((0,td.U2)(i,"fontSize",0)),E=o.getRadius()*o.innerRadius*2;cL(t,(0,tf.pi)({width:"".concat(E,"px"),transform:"translate(-50%, ".concat(c,"px)")},cm(i)));var h=r.getData();if(e.customHtml)return e.customHtml(t,r,n,h);var p=e.content;return e.formatter&&(p=e.formatter(n,h)),p?(0,td.HD)(p)?p:"".concat(p):""}},ca(e,["offsetX","offsetY","rotate","style","formatter"])))}})};function cM(t,e){return e?(0,td.u4)(e,function(t,e,n){return t.replace(RegExp("{\\s*".concat(n,"\\s*}"),"g"),e)},t):t}function cP(t,e){return t.views.find(function(t){return t.id===e})}function cD(t){var e=t.parent;return e?e.views:[]}function cU(t){return cD(t).filter(function(e){return e!==t})}function cb(t,e,n){void 0===n&&(n=t.geometries),"boolean"==typeof e?t.animate(e):t.animate(!0),(0,td.S6)(n,function(t){var n;n=(0,td.mf)(e)?e(t.type||t.shapeType,t)||!0:e,t.animate(n)})}function cF(){return"object"==typeof window?null==window?void 0:window.devicePixelRatio:2}function cB(t,e){void 0===e&&(e=t);var n=document.createElement("canvas"),i=cF();return n.width=t*i,n.height=e*i,n.style.width="".concat(t,"px"),n.style.height="".concat(e,"px"),n.getContext("2d").scale(i,i),n}function cG(t,e,n,i){void 0===i&&(i=n);var r=e.backgroundColor,o=e.opacity;t.globalAlpha=o,t.fillStyle=r,t.beginPath(),t.fillRect(0,0,n,i),t.closePath()}function cw(t,e,n){var i=t+e;return n?2*i:i}function cH(t,e){return e?[[t*(1/4),t*(1/4)],[t*(3/4),t*(3/4)]]:[[.5*t,.5*t]]}function cY(t,e){var n=e*Math.PI/180;return{a:Math.cos(n)*(1/t),b:Math.sin(n)*(1/t),c:-Math.sin(n)*(1/t),d:Math.cos(n)*(1/t),e:0,f:0}}var ck={size:6,padding:2,backgroundColor:"transparent",opacity:1,rotation:0,fill:"#fff",fillOpacity:.5,stroke:"transparent",lineWidth:0,isStagger:!0},cV={rotation:45,spacing:5,opacity:1,backgroundColor:"transparent",strokeOpacity:.5,stroke:"#fff",lineWidth:2},cW={size:6,padding:1,isStagger:!0,backgroundColor:"transparent",opacity:1,rotation:0,fill:"#fff",fillOpacity:.5,stroke:"transparent",lineWidth:0};function cX(t){var e=this;return function(n){var i,r=n.options,o=n.chart,a=r.pattern;return a?cT({},n,{options:((i={})[t]=function(n){for(var i,s,l,u=[],c=1;c0){var n;(function(t,e,n){var i,r=t.view,o=t.geometry,a=t.group,s=t.options,l=t.horizontal,u=s.offset,c=s.size,E=s.arrow,h=r.getCoordinate(),p=Eb(h,e)[3],T=Eb(h,n)[0],f=T.y-p.y,d=T.x-p.x;if("boolean"!=typeof E){var A=E.headSize,S=s.spacing;l?(d-A)/2R){var I=Math.max(1,Math.ceil(R/(g/f.length))-1),O="".concat(f.slice(0,I),"...");S.attr("text",O)}}}}(l,n,t)}})}})),t}),(o=!a.isStack,function(t){var e=t.chart,n=t.options.connectedArea,i=function(){e.removeInteraction(EP.hover),e.removeInteraction(EP.click)};if(!o&&n){var r=n.trigger||"hover";i(),e.interaction(EP[r],{start:ED(r,n.style)})}else i();return t}),c2)(t)}function EW(t){var e=t.options,n=e.xField,i=e.yField,r=e.xAxis,o=e.yAxis,a={left:"bottom",right:"top",top:"left",bottom:"right"},s=!1!==o&&(0,tf.pi)({position:a[(null==o?void 0:o.position)||"left"]},o),l=!1!==r&&(0,tf.pi)({position:a[(null==r?void 0:r.position)||"bottom"]},r);return(0,tf.pi)((0,tf.pi)({},t),{options:(0,tf.pi)((0,tf.pi)({},e),{xField:i,yField:n,xAxis:s,yAxis:l})})}function EX(t){var e=t.options.label;return!e||e.position||(e.position="left",e.layout||(e.layout=[{type:"interval-adjust-position"},{type:"interval-hide-overlap"},{type:"adjust-color"},{type:"limit-in-plot",cfg:{action:"hide"}}])),cT({},t,{options:{label:e}})}function EK(t){var e=t.options,n=e.seriesField,i=e.isStack,r=e.legend;return n?!1!==r&&(r=(0,tf.pi)({position:i?"top-left":"right-top"},r||{})):r=!1,cT({},t,{options:{legend:r}})}function Ez(t){var e=[{type:"transpose"},{type:"reflectY"}].concat(t.options.coordinate||[]);return cT({},t,{options:{coordinate:e}})}function EZ(t){var e=t.chart,n=t.options,i=n.barStyle,r=n.barWidthRatio,o=n.minBarWidth,a=n.maxBarWidth,s=n.barBackground;return EV({chart:e,options:(0,tf.pi)((0,tf.pi)({},n),{columnStyle:i,columnWidthRatio:r,minColumnWidth:o,maxColumnWidth:a,columnBackground:s})},!0)}function E$(t){return cd(EW,EX,EK,cz,Ez,EZ)(t)}r4(EP.hover,{start:ED(EP.hover),end:[{trigger:"interval:mouseleave",action:["element-highlight-by-color:reset","element-link-by-color:unlink"]}]}),r4(EP.click,{start:ED(EP.click),end:[{trigger:"document:mousedown",action:["element-highlight-by-color:clear","element-link-by-color:clear"]}]});var EJ=cT({},EE.getDefaultOptions(),{barWidthRatio:.6,marginRatio:1/32,tooltip:{shared:!0,showMarkers:!1,offset:20},legend:{radio:{}},interactions:[{type:"active-region"}]}),Ej=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bar",e}return(0,tf.ZT)(e,t),e.getDefaultOptions=function(){return EJ},e.prototype.changeData=function(t){this.updateOption({data:t});var e,n,i,r,o,a=this.chart,s=this.options,l=s.isPercent,u=s.xField,c=s.yField,E=s.xAxis,h=s.yAxis;u=(r=[c,u])[0],c=r[1],E=(o=[h,E])[0],h=o[1],EG({chart:a,options:(0,tf.pi)((0,tf.pi)({},s),{xField:u,yField:c,yAxis:h,xAxis:E})}),a.changeData((e=u,n=c,i=u,l?Eh(t,e,n,i):t))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return E$},e}(EE),Eq=cT({},EE.getDefaultOptions(),{columnWidthRatio:.6,marginRatio:1/32,tooltip:{shared:!0,showMarkers:!1,offset:20},legend:{radio:{}},interactions:[{type:"active-region"}]}),EQ=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="column",e}return(0,tf.ZT)(e,t),e.getDefaultOptions=function(){return Eq},e.prototype.changeData=function(t){this.updateOption({data:t});var e=this.options,n=e.yField,i=e.xField,r=e.isPercent;EG({chart:this.chart,options:this.options}),this.chart.changeData(r?Eh(t,n,i,n):t)},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return EV},e}(EE),E0="$$percentage$$",E1="$$mappingValue$$",E2="$$conversion$$",E5="$$totalPercentage$$",E6="$$x$$",E3="$$y$$",E4={appendPadding:[0,80],minSize:0,maxSize:1,meta:((J={})[E1]={min:0,max:1,nice:!1},J),label:{style:{fill:"#fff",fontSize:12}},tooltip:{showTitle:!1,showMarkers:!1,shared:!1},conversionTag:{offsetX:10,offsetY:0,style:{fontSize:12,fill:"rgba(0,0,0,0.45)"}}},E8="CONVERSION_TAG_NAME";function E9(t,e,n){var i=n.yField,r=n.maxSize,o=n.minSize,a=(0,td.U2)((0,td.UT)(e,i),[i]),s=(0,td.hj)(r)?r:1,l=(0,td.hj)(o)?o:0;return(0,td.UI)(t,function(e,n){var r=(e[i]||0)/a;return e[E0]=r,e[E1]=(s-l)*r+l,e[E2]=[(0,td.U2)(t,[n-1,i]),e[i]],e})}function E7(t){return function(e){var n=e.chart,i=e.options,r=i.conversionTag,o=i.filteredData||n.getOptions().data;if(r){var a=r.formatter;o.forEach(function(e,i){if(!(i<=0||Number.isNaN(e[E1]))){var s=t(e,i,o,{top:!0,name:E8,text:{content:(0,td.mf)(a)?a(e,o):a,offsetX:r.offsetX,offsetY:r.offsetY,position:"end",autoRotate:!1,style:(0,tf.pi)({textAlign:"start",textBaseline:"middle"},r.style)}});n.annotation().line(s)}})}return e}}function ht(t){var e=t.chart,n=t.options,i=n.data,r=void 0===i?[]:i,o=E9(r,r,{yField:n.yField,maxSize:n.maxSize,minSize:n.minSize});return e.data(o),t}function he(t){var e=t.chart,n=t.options,i=n.xField,r=n.yField,o=n.color,a=n.tooltip,s=n.label,l=n.shape,u=n.funnelStyle,c=n.state,E=c8(a,[i,r]),h=E.fields,p=E.formatter;return Et({chart:e,options:{type:"interval",xField:i,yField:E1,colorField:i,tooltipFields:(0,td.kJ)(h)&&h.concat([E0,E2]),mapping:{shape:void 0===l?"funnel":l,tooltip:p,color:o,style:u},label:s,state:c}}),cA(t.chart,"interval").adjust("symmetric"),t}function hn(t){var e=t.chart,n=t.options.isTransposed;return e.coordinate({type:"rect",actions:n?[]:[["transpose"],["scale",1,-1]]}),t}function hi(t){var e=t.options,n=t.chart,i=e.maxSize,r=(0,td.U2)(n,["geometries","0","dataArray"],[]),o=(0,td.U2)(n,["options","data","length"]),a=(0,td.UI)(r,function(t){return(0,td.U2)(t,["0","nextPoints","0","x"])*o-.5});return E7(function(t,e,n,r){var o=i-(i-t[E1])/2;return(0,tf.pi)((0,tf.pi)({},r),{start:[a[e-1]||e-.5,o],end:[a[e-1]||e-.5,o+.05]})})(t),t}function hr(t){return cd(ht,he,hn,hi)(t)}function ho(t){var e,n=t.chart,i=t.options,r=i.data,o=void 0===r?[]:r,a=i.yField;return n.data(o),n.scale(((e={})[a]={sync:!0},e)),t}function ha(t){var e=t.chart,n=t.options,i=n.data,r=n.xField,o=n.yField,a=n.color,s=n.compareField,l=n.isTransposed,u=n.tooltip,c=n.maxSize,E=n.minSize,h=n.label,p=n.funnelStyle,T=n.state,f=n.showFacetTitle;return e.facet("mirror",{fields:[s],transpose:!l,padding:l?0:[32,0,0,0],showTitle:f,eachView:function(t,e){var n=l?e.rowIndex:e.columnIndex;l||t.coordinate({type:"rect",actions:[["transpose"],["scale",0===n?-1:1,-1]]});var f=E9(e.data,i,{yField:o,maxSize:c,minSize:E});t.data(f);var d=c8(u,[r,o,s]),A=d.fields,S=d.formatter;Et({chart:t,options:{type:"interval",xField:r,yField:E1,colorField:r,tooltipFields:(0,td.kJ)(A)&&A.concat([E0,E2]),mapping:{shape:"funnel",tooltip:S,color:a,style:p},label:!1!==h&&cT({},l?{offset:0===n?10:-23,position:0===n?"bottom":"top"}:{offset:10,position:"left",style:{textAlign:0===n?"end":"start"}},h),state:T}})}}),t}function hs(t){var e=t.chart,n=t.index,i=t.options,r=i.conversionTag,o=i.isTransposed;((0,td.hj)(n)?[e]:e.views).forEach(function(t,e){var a=(0,td.U2)(t,["geometries","0","dataArray"],[]),s=(0,td.U2)(t,["options","data","length"]),l=(0,td.UI)(a,function(t){return(0,td.U2)(t,["0","nextPoints","0","x"])*s-.5});E7(function(t,i,a,s){var u=0===(n||e)?-1:1;return cT({},s,{start:[l[i-1]||i-.5,t[E1]],end:[l[i-1]||i-.5,t[E1]+.05],text:o?{style:{textAlign:"start"}}:{offsetX:!1!==r?u*r.offsetX:0,style:{textAlign:0===(n||e)?"end":"start"}}})})(cT({},{chart:t,options:i}))})}function hl(t){return t.chart.once("beforepaint",function(){return hs(t)}),t}function hu(t){var e=t.chart,n=t.options,i=n.data,r=void 0===i?[]:i,o=n.yField,a=(0,td.u4)(r,function(t,e){return t+(e[o]||0)},0),s=(0,td.UT)(r,o)[o],l=(0,td.UI)(r,function(t,e){var n=[],i=[];if(t[E5]=(t[o]||0)/a,e){var l=r[e-1][E6],u=r[e-1][E3];n[0]=l[3],i[0]=u[3],n[1]=l[2],i[1]=u[2]}else n[0]=-.5,i[0]=1,n[1]=.5,i[1]=1;return i[2]=i[1]-t[E5],n[2]=(i[2]+1)/4,i[3]=i[2],n[3]=-n[2],t[E6]=n,t[E3]=i,t[E0]=(t[o]||0)/s,t[E2]=[(0,td.U2)(r,[e-1,o]),t[o]],t});return e.data(l),t}function hc(t){var e=t.chart,n=t.options,i=n.xField,r=n.yField,o=n.color,a=n.tooltip,s=n.label,l=n.funnelStyle,u=n.state,c=c8(a,[i,r]),E=c.fields,h=c.formatter;return Et({chart:e,options:{type:"polygon",xField:E6,yField:E3,colorField:i,tooltipFields:(0,td.kJ)(E)&&E.concat([E0,E2]),label:s,state:u,mapping:{tooltip:h,color:o,style:l}}}),t}function hE(t){var e=t.chart,n=t.options.isTransposed;return e.coordinate({type:"rect",actions:n?[["transpose"],["reflect","x"]]:[]}),t}function hh(t){return E7(function(t,e,n,i){return(0,tf.pi)((0,tf.pi)({},i),{start:[t[E6][1],t[E3][1]],end:[t[E6][1]+.05,t[E3][1]]})})(t),t}function hp(t){var e,n=t.chart,i=t.options,r=i.data,o=void 0===r?[]:r,a=i.yField;return n.data(o),n.scale(((e={})[a]={sync:!0},e)),t}function hT(t){var e=t.chart,n=t.options,i=n.seriesField,r=n.isTransposed,o=n.showFacetTitle;return e.facet("rect",{fields:[i],padding:[r?0:32,10,0,10],showTitle:o,eachView:function(e,n){hr(cT({},t,{chart:e,options:{data:n.data}}))}}),t}var hf=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.rendering=!1,e}return(0,tf.ZT)(e,t),e.prototype.change=function(t){var e=this;if(!this.rendering){var n=t.seriesField,i=t.compareField,r=i?hs:hi,o=this.context.view,a=n||i?o.views:[o];(0,td.UI)(a,function(n,i){var o=n.getController("annotation"),a=(0,td.hX)((0,td.U2)(o,["option"],[]),function(t){return t.name!==E8});o.clear(!0),(0,td.S6)(a,function(t){"object"==typeof t&&n.annotation()[t.type](t)});var s=(0,td.U2)(n,["filteredData"],n.getOptions().data);r({chart:n,index:i,options:(0,tf.pi)((0,tf.pi)({},t),{filteredData:E9(s,s,t)})}),n.filterData(s),e.rendering=!0,n.render(!0)})}this.rendering=!1},e}(rI),hd="funnel-conversion-tag",hA="funnel-afterrender",hS={trigger:"afterrender",action:"".concat(hd,":change")};function hR(t){var e,n=t.options,i=n.compareField,r=n.xField,o=n.yField,a=n.locale,s=n.funnelStyle,l=n.data,u=c4(a);return(i||s)&&(e=function(t){return cT({},i&&{lineWidth:1,stroke:"#fff"},(0,td.mf)(s)?s(t):s)}),cT({options:{label:i?{fields:[r,o,i,E0,E2],formatter:function(t){return"".concat(t[o])}}:{fields:[r,o,E0,E2],offset:0,position:"middle",formatter:function(t){return"".concat(t[r]," ").concat(t[o])}},tooltip:{title:r,formatter:function(t){return{name:t[r],value:t[o]}}},conversionTag:{formatter:function(t){return"".concat(u.get(["conversionTag","label"]),": ").concat(EU.apply(void 0,t[E2]))}}}},t,{options:{funnelStyle:e,data:(0,td.d9)(l)}})}function hg(t){var e=t.options,n=e.compareField,i=e.dynamicHeight;return e.seriesField?cd(hp,hT)(t):n?cd(ho,ha,hl)(t):i?cd(hu,hc,hE,hh)(t):hr(t)}function hI(t){var e,n=t.options,i=n.xAxis,r=n.yAxis,o=n.xField,a=n.yField;return cd(c0(((e={})[o]=i,e[a]=r,e)))(t)}function hO(t){return t.chart.axis(!1),t}function hy(t){var e=t.chart,n=t.options.legend;return!1===n?e.legend(!1):e.legend(n),t}function hv(t){var e=t.chart,n=t.options,i=n.interactions,r=n.dynamicHeight;return(0,td.S6)(i,function(t){!1===t.enable?e.removeInteraction(t.type):e.interaction(t.type,t.cfg||{})}),r?e.removeInteraction(hA):e.interaction(hA,{start:[(0,tf.pi)((0,tf.pi)({},hS),{arg:n})]}),t}function hN(t){return cd(hR,hg,hI,hO,cz,hv,hy,c$,cJ,c1())(t)}rN(hd,hf),r4(hA,{start:[hS]});var hC=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="funnel",e}return(0,tf.ZT)(e,t),e.getDefaultOptions=function(){return E4},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return hN},e.prototype.setState=function(t,e,n){void 0===n&&(n=!0);var i=cR(this.chart);(0,td.S6)(i,function(i){e(i.getData())&&i.setState(t,n)})},e.prototype.getStates=function(){var t=cR(this.chart),e=[];return(0,td.S6)(t,function(t){var n=t.getData(),i=t.getStates();(0,td.S6)(i,function(i){e.push({data:n,state:i,geometry:t.geometry,element:t})})}),e},e.CONVERSATION_FIELD=E2,e.PERCENT_FIELD=E0,e.TOTAL_PERCENT_FIELD=E5,e}(EE),hm="range",hL="type",h_="percent",hx="indicator-view",hM="range-view",hP={percent:0,range:{ticks:[]},innerRadius:.9,radius:.95,startAngle:-7/6*Math.PI,endAngle:1/6*Math.PI,syncViewPadding:!0,axis:{line:null,label:{offset:-24,style:{textAlign:"center",textBaseline:"middle"}},subTickLine:{length:-8},tickLine:{length:-12},grid:null},indicator:{pointer:{style:{lineWidth:5,lineCap:"round"}},pin:{style:{r:9.75,lineWidth:4.5,fill:"#fff"}}},statistic:{title:!1},meta:((j={})[hm]={sync:"v"},j[h_]={sync:"v",tickCount:5,tickInterval:.2},j),animation:!1};function hD(t){var e;return[((e={})[h_]=(0,td.uZ)(t,0,1),e)]}function hU(t,e){var n=(0,td.U2)(e,["ticks"],[]),i=(0,td.dp)(n)?(0,td.jj)(n):[0,(0,td.uZ)(t,0,1),1];return i[0]||i.shift(),i.map(function(e,n){var r;return(r={})[hm]=e-(i[n-1]||0),r[hL]="".concat(n),r[h_]=t,r})}function hb(t){var e=t.chart,n=t.options,i=n.percent,r=n.range,o=n.radius,a=n.innerRadius,s=n.startAngle,l=n.endAngle,u=n.axis,c=n.indicator,E=n.gaugeStyle,h=n.type,p=n.meter,T=r.color,f=r.width;if(c){var d=hD(i),A=e.createView({id:hx});A.data(d),A.point().position("".concat(h_,"*1")).shape(c.shape||"gauge-indicator").customInfo({defaultColor:e.getTheme().defaultColor,indicator:c}),A.coordinate("polar",{startAngle:s,endAngle:l,radius:a*o}),A.axis(h_,u),A.scale(h_,ca(u,ci))}var S=hU(i,n.range),R=e.createView({id:hM});return R.data(S),Ei({chart:R,options:{xField:"1",yField:hm,seriesField:hL,rawFields:[h_],isStack:!0,interval:{color:(0,td.HD)(T)?[T,"#f0f0f0"]:T,style:E,shape:"meter"===h?"meter-gauge":null},args:{zIndexReversed:!0,sortZIndex:!0},minColumnWidth:f,maxColumnWidth:f}}).ext.geometry.customInfo({meter:p}),R.coordinate("polar",{innerRadius:a,radius:o,startAngle:s,endAngle:l}).transpose(),t}function hF(t){var e;return cd(c0(((e={range:{min:0,max:1,maxLimit:1,minLimit:0}})[h_]={},e)))(t)}function hB(t,e){var n=t.chart,i=t.options,r=i.statistic,o=i.percent;if(n.getController("annotation").clear(!0),r){var a=r.content,s=void 0;a&&(s=cT({},{content:"".concat((100*o).toFixed(2),"%"),style:{opacity:.75,fontSize:"30px",lineHeight:1,textAlign:"center",color:"rgba(44,53,66,0.85)"}},a)),cx(n,{statistic:(0,tf.pi)((0,tf.pi)({},r),{content:s})},{percent:o})}return e&&n.render(!0),t}function hG(t){var e=t.chart,n=t.options.tooltip;return n?e.tooltip(cT({showTitle:!1,showMarkers:!1,containerTpl:'',domStyles:{"g2-tooltip":{padding:"4px 8px",fontSize:"10px"}},customContent:function(t,e){var n=(0,td.U2)(e,[0,"data",h_],0);return"".concat((100*n).toFixed(2),"%")}},n)):e.tooltip(!1),t}function hw(t){return t.chart.legend(!1),t}function hH(t){return cd(cJ,c$,hb,hF,hG,hB,cZ,c1(),hw)(t)}oz("point","gauge-indicator",{draw:function(t,e){var n=t.customInfo,i=n.indicator,r=n.defaultColor,o=i.pointer,a=i.pin,s=e.addGroup(),l=this.parsePoint({x:0,y:0});return o&&s.addShape("line",{name:"pointer",attrs:(0,tf.pi)({x1:l.x,y1:l.y,x2:t.x,y2:t.y,stroke:r},o.style)}),a&&s.addShape("circle",{name:"pin",attrs:(0,tf.pi)({x:l.x,y:l.y,stroke:r},a.style)}),s}}),oz("interval","meter-gauge",{draw:function(t,e){var n=t.customInfo.meter,i=void 0===n?{}:n,r=i.steps,o=void 0===r?50:r,a=i.stepRatio,s=void 0===a?.5:a;o=o<1?1:o,s=(0,td.uZ)(s,0,1);var l=this.coordinate,u=l.startAngle,c=l.endAngle,E=0;s>0&&s<1&&(E=(c-u)/o/(s/(1-s)+1-1/o));for(var h=E/(1-s)*s,p=e.addGroup(),T=this.coordinate.getCenter(),f=this.coordinate.getRadius(),d=ar.getAngle(t,this.coordinate),A=d.startAngle,S=d.endAngle,R=A;R1?l/(i-1):s.max),n||i||(u=l/(Math.ceil(Math.log(a.length)/Math.LN2)+1));var c={},E=(0,td.vM)(o,r);(0,td.xb)(E)?(0,td.S6)(o,function(t){var n=hk(t[e],u,i),r="".concat(n[0],"-").concat(n[1]);(0,td.wH)(c,r)||(c[r]={range:n,count:0}),c[r].count+=1}):Object.keys(E).forEach(function(t){(0,td.S6)(E[t],function(n){var o=hk(n[e],u,i),a="".concat(o[0],"-").concat(o[1]),s="".concat(a,"-").concat(t);(0,td.wH)(c,s)||(c[s]={range:o,count:0},c[s][r]=t),c[s].count+=1})});var h=[];return(0,td.S6)(c,function(t){h.push(t)}),h}var hW="range",hX="count",hK=cT({},EE.getDefaultOptions(),{columnStyle:{stroke:"#FFFFFF"},tooltip:{shared:!0,showMarkers:!1},interactions:[{type:"active-region"}]});function hz(t){var e=t.chart,n=t.options,i=n.data,r=n.binField,o=n.binNumber,a=n.binWidth,s=n.color,l=n.stackField,u=n.legend,c=n.columnStyle,E=hV(i,r,a,o,l);return e.data(E),Ei(cT({},t,{options:{xField:hW,yField:hX,seriesField:l,isStack:!0,interval:{color:s,style:c}}})),u&&l?e.legend(l,u):e.legend(!1),t}function hZ(t){var e,n=t.options,i=n.xAxis,r=n.yAxis;return cd(c0(((e={})[hW]=i,e[hX]=r,e)))(t)}function h$(t){var e=t.chart,n=t.options,i=n.xAxis,r=n.yAxis;return!1===i?e.axis(hW,!1):e.axis(hW,i),!1===r?e.axis(hX,!1):e.axis(hX,r),t}function hJ(t){var e=t.chart,n=t.options.label,i=cA(e,"interval");if(n){var r=n.callback,o=(0,tf._T)(n,["callback"]);i.label({fields:[hX],callback:r,cfg:cg(o)})}else i.label(!1);return t}function hj(t){return cd(cJ,cX("columnStyle"),hz,hZ,h$,cj,hJ,cz,cZ,c$)(t)}var hq=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="histogram",e}return(0,tf.ZT)(e,t),e.getDefaultOptions=function(){return hK},e.prototype.changeData=function(t){this.updateOption({data:t});var e=this.options,n=e.binField,i=e.binNumber,r=e.binWidth,o=e.stackField;this.chart.changeData(hV(t,n,r,i,o))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return hj},e}(EE),hQ=cT({},EE.getDefaultOptions(),{tooltip:{shared:!0,showMarkers:!0,showCrosshairs:!0,crosshairs:{type:"x"}},legend:{position:"top-left",radio:{}},isStack:!1});rN("marker-active",function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.active=function(){var t=this.getView(),e=this.context.event;if(e.data){var n=e.data.items,i=t.geometries.filter(function(t){return"point"===t.type});(0,td.S6)(i,function(t){(0,td.S6)(t.elements,function(t){var e=-1!==(0,td.cx)(n,function(e){return e.data===t.data});t.setState("active",e)})})}},e.prototype.reset=function(){var t=this.getView().geometries.filter(function(t){return"point"===t.type});(0,td.S6)(t,function(t){(0,td.S6)(t.elements,function(t){t.setState("active",!1)})})},e.prototype.getView=function(){return this.context.view},e}(rI)),r4("marker-active",{start:[{trigger:"tooltip:show",action:"marker-active:active"}],end:[{trigger:"tooltip:hide",action:"marker-active:reset"}]});var h0=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="line",e}return(0,tf.ZT)(e,t),e.getDefaultOptions=function(){return hQ},e.prototype.changeData=function(t){this.updateOption({data:t}),ET({chart:this.chart,options:this.options}),this.chart.changeData(t)},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Eg},e}(EE),h1=cT({},EE.getDefaultOptions(),{legend:{position:"right",radio:{}},tooltip:{shared:!1,showTitle:!1,showMarkers:!1},label:{layout:{type:"limit-in-plot",cfg:{action:"ellipsis"}}},pieStyle:{stroke:"white",lineWidth:1},statistic:{title:{style:{fontWeight:300,color:"#4B535E",textAlign:"center",fontSize:"20px",lineHeight:1}},content:{style:{fontWeight:"bold",color:"rgba(44,53,66,0.85)",textAlign:"center",fontSize:"32px",lineHeight:1}}},theme:{components:{annotation:{text:{animate:!1}}}}}),h2=[1,0,0,0,1,0,0,0,1];function h5(t,e){var n=e?(0,tf.ev)([],e,!0):(0,tf.ev)([],h2,!0);return ar.transform(n,t)}var h6=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getActiveElements=function(){var t=ar.getDelegationObject(this.context);if(t){var e=this.context.view,n=t.component,i=t.item,r=n.get("field");if(r)return e.geometries[0].elements.filter(function(t){return t.getModel().data[r]===i.value})}return[]},e.prototype.getActiveElementLabels=function(){var t=this.context.view,e=this.getActiveElements();return t.geometries[0].labelsContainer.getChildren().filter(function(t){return e.find(function(e){return(0,td.Xy)(e.getData(),t.get("data"))})})},e.prototype.transfrom=function(t){void 0===t&&(t=7.5);var e=this.getActiveElements(),n=this.getActiveElementLabels();e.forEach(function(e,i){var r=n[i],o=e.geometry.coordinate;if(o.isPolar&&o.isTransposed){var a=ar.getAngle(e.getModel(),o),s=(a.startAngle+a.endAngle)/2,l=t,u=l*Math.cos(s),c=l*Math.sin(s);e.shape.setMatrix(h5([["t",u,c]])),r.setMatrix(h5([["t",u,c]]))}})},e.prototype.active=function(){this.transfrom()},e.prototype.reset=function(){this.transfrom(0)},e}(rI),h3=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getAnnotations=function(t){return(t||this.context.view).getController("annotation").option},e.prototype.getInitialAnnotation=function(){return this.initialAnnotation},e.prototype.init=function(){var t=this,e=this.context.view;e.removeInteraction("tooltip"),e.on("afterchangesize",function(){var n=t.getAnnotations(e);t.initialAnnotation=n})},e.prototype.change=function(t){var e,n,i=this.context,r=i.view,o=i.event;this.initialAnnotation||(this.initialAnnotation=this.getAnnotations());var a=(0,td.U2)(o,["data","data"]);if(o.type.match("legend-item")){var s=ar.getDelegationObject(this.context),l=r.getGroupedFields()[0];if(s&&l){var u=s.item;a=r.getData().find(function(t){return t[l]===u.value})}}if(a){var c=(0,td.U2)(t,"annotations",[]),E=(0,td.U2)(t,"statistic",{});r.getController("annotation").clear(!0),(0,td.S6)(c,function(t){"object"==typeof t&&r.annotation()[t.type](t)}),c_(r,{statistic:E,plotType:"pie"},a),r.render(!0)}var h=((n=this.context.event.target)&&(e=n.get("element")),e);h&&h.shape.toFront()},e.prototype.reset=function(){var t=this.context.view;t.getController("annotation").clear(!0);var e=this.getInitialAnnotation();(0,td.S6)(e,function(e){t.annotation()[e.type](e)}),t.render(!0)},e}(rI),h4="pie-statistic";function h8(t,e){return(0,td.yW)(cu(t,e),function(t){return 0===t[e]})}function h9(t){var e=t.chart,n=t.options,i=n.data,r=n.angleField,o=n.colorField,a=n.color,s=n.pieStyle,l=n.shape,u=cu(i,r);if(h8(u,r)){var c="$$percentage$$";u=u.map(function(t){var e;return(0,tf.pi)((0,tf.pi)({},t),((e={})[c]=1/u.length,e))}),e.data(u);var E=cT({},t,{options:{xField:"1",yField:c,seriesField:o,isStack:!0,interval:{color:a,shape:l,style:s},args:{zIndexReversed:!0,sortZIndex:!0}}});Ei(E)}else{e.data(u);var E=cT({},t,{options:{xField:"1",yField:r,seriesField:o,isStack:!0,interval:{color:a,shape:l,style:s},args:{zIndexReversed:!0,sortZIndex:!0}}});Ei(E)}return t}function h7(t){var e,n=t.chart,i=t.options,r=i.meta,o=i.colorField,a=cT({},r);return n.scale(a,((e={})[o]={type:"cat"},e)),t}function pt(t){var e=t.chart,n=t.options,i=n.radius,r=n.innerRadius,o=n.startAngle,a=n.endAngle;return e.coordinate({type:"theta",cfg:{radius:i,innerRadius:r,startAngle:o,endAngle:a}}),t}function pe(t){var e=t.chart,n=t.options,i=n.label,r=n.colorField,o=n.angleField,a=e.geometries[0];if(i){var s=i.callback,l=cg((0,tf._T)(i,["callback"]));if(l.content){var u=l.content;l.content=function(t,n,i){var a=t[r],s=t[o],l=e.getScaleByField(o),c=null==l?void 0:l.scale(s);return(0,td.mf)(u)?u((0,tf.pi)((0,tf.pi)({},t),{percent:c}),n,i):(0,td.HD)(u)?cM(u,{value:s,name:a,percentage:(0,td.hj)(c)&&!(0,td.UM)(s)?"".concat((100*c).toFixed(2),"%"):null}):u}}var c=l.type?({inner:"",outer:"pie-outer",spider:"pie-spider"})[l.type]:"pie-outer",E=l.layout?(0,td.kJ)(l.layout)?l.layout:[l.layout]:[];l.layout=(c?[{type:c}]:[]).concat(E),a.label({fields:r?[o,r]:[o],callback:s,cfg:(0,tf.pi)((0,tf.pi)({},l),{offset:function(t,e){var n;switch(t){case"inner":if(n="-30%",(0,td.HD)(e)&&e.endsWith("%"))return .01*parseFloat(e)>0?n:e;return e<0?e:n;case"outer":if(n=12,(0,td.HD)(e)&&e.endsWith("%"))return .01*parseFloat(e)<0?n:e;return e>0?e:n;default:return e}}(l.type,l.offset),type:"pie"})})}else a.label(!1);return t}function pn(t){var e=t.innerRadius,n=t.statistic,i=t.angleField,r=t.colorField,o=t.meta,a=c4(t.locale);if(e&&n){var s=cT({},h1.statistic,n),l=s.title,u=s.content;return!1!==l&&(l=cT({},{formatter:function(t){var e=t?t[r]:(0,td.UM)(l.content)?a.get(["statistic","total"]):l.content;return((0,td.U2)(o,[r,"formatter"])||function(t){return t})(e)}},l)),!1!==u&&(u=cT({},{formatter:function(t,e){var n,r=t?t[i]:(n=null,(0,td.S6)(e,function(t){"number"==typeof t[i]&&(n+=t[i])}),n),a=(0,td.U2)(o,[i,"formatter"])||function(t){return t};return t?a(r):(0,td.UM)(u.content)?a(r):u.content}},u)),cT({},{statistic:{title:l,content:u}},t)}return t}function pi(t){var e=t.chart,n=pn(t.options),i=n.innerRadius,r=n.statistic;return e.getController("annotation").clear(!0),cd(c1())(t),i&&r&&c_(e,{statistic:r,plotType:"pie"}),t}function pr(t){var e=t.chart,n=t.options,i=n.tooltip,r=n.colorField,o=n.angleField,a=n.data;if(!1===i)e.tooltip(i);else if(e.tooltip(cT({},i,{shared:!1})),h8(a,o)){var s=(0,td.U2)(i,"fields"),l=(0,td.U2)(i,"formatter");(0,td.xb)((0,td.U2)(i,"fields"))&&(s=[r,o],l=l||function(t){return{name:t[r],value:(0,td.BB)(t[o])}}),e.geometries[0].tooltip(s.join("*"),c7(s,l))}return t}function po(t){var e=t.chart,n=pn(t.options),i=n.interactions,r=n.statistic,o=n.annotations;return(0,td.S6)(i,function(t){var n,i;if(!1===t.enable)e.removeInteraction(t.type);else if("pie-statistic-active"===t.type){var a=[];(null===(n=t.cfg)||void 0===n?void 0:n.start)||(a=[{trigger:"element:mouseenter",action:"".concat(h4,":change"),arg:{statistic:r,annotations:o}}]),(0,td.S6)(null===(i=t.cfg)||void 0===i?void 0:i.start,function(t){a.push((0,tf.pi)((0,tf.pi)({},t),{arg:{statistic:r,annotations:o}}))}),e.interaction(t.type,cT({},t.cfg,{start:a}))}else e.interaction(t.type,t.cfg||{})}),t}function pa(t){return cd(cX("pieStyle"),h9,h7,cJ,pt,cK,pr,pe,cj,pi,po,c$)(t)}rN(h4,h3),r4("pie-statistic-active",{start:[{trigger:"element:mouseenter",action:"pie-statistic:change"}],end:[{trigger:"element:mouseleave",action:"pie-statistic:reset"}]}),rN("pie-legend",h6),r4("pie-legend-active",{start:[{trigger:"legend-item:mouseenter",action:"pie-legend:active"}],end:[{trigger:"legend-item:mouseleave",action:"pie-legend:reset"}]});var ps=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="pie",e}return(0,tf.ZT)(e,t),e.getDefaultOptions=function(){return h1},e.prototype.changeData=function(t){this.chart.emit(U.BEFORE_CHANGE_DATA,oR.fromData(this.chart,U.BEFORE_CHANGE_DATA,null));var e=this.options,n=this.options.angleField,i=cu(e.data,n),r=cu(t,n);h8(i,n)||h8(r,n)?this.update({data:t}):(this.updateOption({data:t}),this.chart.data(r),pi({chart:this.chart,options:this.options}),this.chart.render(!0)),this.chart.emit(U.AFTER_CHANGE_DATA,oR.fromData(this.chart,U.AFTER_CHANGE_DATA,null))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return pa},e}(EE),pl={percent:.2,color:["#FAAD14","#E8EDF3"],animation:{}};function pu(t){var e=(0,td.uZ)(cI(t)?t:0,0,1);return[{current:"".concat(e),type:"current",percent:e},{current:"".concat(e),type:"target",percent:1}]}function pc(t){var e=t.chart,n=t.options,i=n.percent,r=n.progressStyle,o=n.color,a=n.barWidthRatio;return e.data(pu(i)),Ei(cT({},t,{options:{xField:"current",yField:"percent",seriesField:"type",widthRatio:a,interval:{style:r,color:(0,td.HD)(o)?[o,"#E8EDF3"]:o},args:{zIndexReversed:!0,sortZIndex:!0}}})),e.tooltip(!1),e.axis(!1),e.legend(!1),t}function pE(t){return t.chart.coordinate("rect").transpose(),t}function ph(t){return cd(pc,c0({}),pE,c$,cJ,c1())(t)}var pp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="process",e}return(0,tf.ZT)(e,t),e.getDefaultOptions=function(){return pl},e.prototype.changeData=function(t){this.updateOption({percent:t}),this.chart.changeData(pu(t))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return ph},e}(EE);function pT(t){var e=t.chart,n=t.options,i=n.innerRadius,r=n.radius;return e.coordinate("theta",{innerRadius:i,radius:r}),t}function pf(t,e){var n=t.chart,i=t.options,r=i.innerRadius,o=i.statistic,a=i.percent,s=i.meta;if(n.getController("annotation").clear(!0),r&&o){var l=(0,td.U2)(s,["percent","formatter"])||function(t){return"".concat((100*t).toFixed(2),"%")},u=o.content;u&&(u=cT({},u,{content:(0,td.UM)(u.content)?l(a):u.content})),c_(n,{statistic:(0,tf.pi)((0,tf.pi)({},o),{content:u}),plotType:"ring-progress"},{percent:a})}return e&&n.render(!0),t}function pd(t){return cd(pc,c0({}),pT,pf,c$,cJ,c1())(t)}var pA={percent:.2,innerRadius:.8,radius:.98,color:["#FAAD14","#E8EDF3"],statistic:{title:!1,content:{style:{fontSize:"14px",fontWeight:300,fill:"#4D4D4D",textAlign:"center",textBaseline:"middle"}}},animation:{}},pS=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ring-process",e}return(0,tf.ZT)(e,t),e.getDefaultOptions=function(){return pA},e.prototype.changeData=function(t){this.chart.emit(U.BEFORE_CHANGE_DATA,oR.fromData(this.chart,U.BEFORE_CHANGE_DATA,null)),this.updateOption({percent:t}),this.chart.data(pu(t)),pf({chart:this.chart,options:this.options},!0),this.chart.emit(U.AFTER_CHANGE_DATA,oR.fromData(this.chart,U.AFTER_CHANGE_DATA,null))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return pd},e}(EE),pR=n(56645),pg={exp:pR.regressionExp,linear:pR.regressionLinear,loess:pR.regressionLoess,log:pR.regressionLog,poly:pR.regressionPoly,pow:pR.regressionPow,quad:pR.regressionQuad},pI=function(t,e){var n=e.view,i=e.options,r=i.xField,o=i.yField,a=n.getScaleByField(r),s=n.getScaleByField(o);return function(t,e,n){var i=[],r=t[0],o=null;if(t.length<=2)return function(t,e){var n=[];if(t.length){n.push(["M",t[0].x,t[0].y]);for(var i=1,r=t.length;i0,c=l>0;function E(t,e){var n=(0,td.U2)(i,[t]);function r(t){return(0,td.U2)(n,t)}var o={};return"x"===e?((0,td.hj)(s)&&((0,td.hj)(r("min"))||(o.min=u?0:2*s),(0,td.hj)(r("max"))||(o.max=u?2*s:0)),o):((0,td.hj)(l)&&((0,td.hj)(r("min"))||(o.min=c?0:2*l),(0,td.hj)(r("max"))||(o.max=c?2*l:0)),o)}return(0,tf.pi)((0,tf.pi)({},i),((e={})[r]=(0,tf.pi)((0,tf.pi)({},i[r]),E(r,"x")),e[o]=(0,tf.pi)((0,tf.pi)({},i[o]),E(o,"y")),e))};function pv(t){var e=t.data,n=void 0===e?[]:e,i=t.xField,r=t.yField;if(n.length){for(var o=!0,a=!0,s=n[0],l=void 0,u=1;u',itemTpl:"{value}",domStyles:{"g2-tooltip":{padding:"2px 4px",fontSize:"10px"}},showCrosshairs:!0,crosshairs:{type:"x"}},pJ={appendPadding:2,tooltip:(0,tf.pi)({},p$),animation:{}};function pj(t){var e=t.chart,n=t.options,i=n.data,r=n.color,o=n.areaStyle,a=n.point,s=n.line,l=null==a?void 0:a.state,u=pZ(i);e.data(u);var c=cT({},t,{options:{xField:"x",yField:"y",area:{color:r,style:o},line:s,point:a}}),E=cT({},c,{options:{tooltip:!1}}),h=cT({},c,{options:{tooltip:!1,state:l}});return Ee(c),Er(E),Eo(h),e.axis(!1),e.legend(!1),t}function pq(t){var e,n,i=t.options,r=i.xAxis,o=i.yAxis,a=pZ(i.data);return cd(c0(((e={}).x=r,e.y=o,e),((n={}).x={type:"cat"},n.y=cs(a,"y"),n)))(t)}function pQ(t){return cd(cX("areaStyle"),pj,pq,cz,cJ,c$,c1())(t)}var p0={appendPadding:2,tooltip:(0,tf.pi)({},p$),color:"l(90) 0:#E5EDFE 1:#ffffff",areaStyle:{fillOpacity:.6},line:{size:1,color:"#5B8FF9"},animation:{}},p1=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="tiny-area",e}return(0,tf.ZT)(e,t),e.getDefaultOptions=function(){return p0},e.prototype.changeData=function(t){this.updateOption({data:t});var e=this.chart;pq({chart:e,options:this.options}),e.changeData(pZ(t))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return pQ},e}(EE);function p2(t){var e=t.chart,n=t.options,i=n.data,r=n.color,o=n.columnStyle,a=n.columnWidthRatio,s=pZ(i);return e.data(s),Ei(cT({},t,{options:{xField:"x",yField:"y",widthRatio:a,interval:{style:o,color:r}}})),e.axis(!1),e.legend(!1),e.interaction("element-active"),t}function p5(t){return cd(cJ,cX("columnStyle"),p2,pq,cz,c$,c1())(t)}var p6={appendPadding:2,tooltip:(0,tf.pi)({},{showTitle:!1,shared:!0,showMarkers:!1,customContent:function(t,e){return"".concat((0,td.U2)(e,[0,"data","y"],0))},containerTpl:'',itemTpl:"{value}",domStyles:{"g2-tooltip":{padding:"2px 4px",fontSize:"10px"}}}),animation:{}},p3=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="tiny-column",e}return(0,tf.ZT)(e,t),e.getDefaultOptions=function(){return p6},e.prototype.changeData=function(t){this.updateOption({data:t});var e=this.chart;pq({chart:e,options:this.options}),e.changeData(pZ(t))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return p5},e}(EE);function p4(t){var e=t.chart,n=t.options,i=n.data,r=n.color,o=n.lineStyle,a=n.point,s=null==a?void 0:a.state,l=pZ(i);e.data(l);var u=cT({},t,{options:{xField:"x",yField:"y",line:{color:r,style:o},point:a}}),c=cT({},u,{options:{tooltip:!1,state:s}});return Er(u),Eo(c),e.axis(!1),e.legend(!1),t}function p8(t){return cd(p4,pq,cJ,cz,c$,c1())(t)}var p9=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="tiny-line",e}return(0,tf.ZT)(e,t),e.getDefaultOptions=function(){return pJ},e.prototype.changeData=function(t){this.updateOption({data:t});var e=this.chart;pq({chart:e,options:this.options}),e.changeData(pZ(t))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return p8},e}(EE),p7={line:Eg,pie:pa,column:EV,bar:E$,area:Ev,gauge:hH,"tiny-line":p8,"tiny-column":p5,"tiny-area":pQ,"ring-progress":pd,progress:ph,scatter:pD,histogram:hj,funnel:hN,stock:pK},Tt={line:h0,pie:ps,column:EQ,bar:Ej,area:EC,gauge:hY,"tiny-line":p9,"tiny-column":p3,"tiny-area":p1,"ring-progress":pS,progress:pp,scatter:pb,histogram:hq,funnel:hC,stock:pz},Te={pie:{label:!1},column:{tooltip:{showMarkers:!1}},bar:{tooltip:{showMarkers:!1}}};function Tn(t,e,n){var i=Tt[t];if(!i){console.error("could not find ".concat(t," plot"));return}(0,p7[t])({chart:e,options:cT({},i.getDefaultOptions(),(0,td.U2)(Te,t,{}),n)})}function Ti(t){var e=t.chart,n=t.options,i=n.views,r=n.legend;return(0,td.S6)(i,function(t){var n=t.region,i=t.data,r=t.meta,o=t.axes,a=t.coordinate,s=t.interactions,l=t.annotations,u=t.tooltip,c=t.geometries,E=e.createView({region:n});E.data(i);var h={};o&&(0,td.S6)(o,function(t,e){h[e]=ca(t,ci)}),h=cT({},r,h),E.scale(h),o?(0,td.S6)(o,function(t,e){E.axis(e,t)}):E.axis(!1),E.coordinate(a),(0,td.S6)(c,function(t){var e=Et({chart:E,options:t}).ext,n=t.adjust;n&&e.geometry.adjust(n)}),(0,td.S6)(s,function(t){!1===t.enable?E.removeInteraction(t.type):E.interaction(t.type,t.cfg)}),(0,td.S6)(l,function(t){E.annotation()[t.type]((0,tf.pi)({},t))}),"boolean"==typeof t.animation?E.animate(!1):(E.animate(!0),(0,td.S6)(E.geometries,function(e){e.animate(t.animation)})),u&&(E.interaction("tooltip"),E.tooltip(u))}),r?(0,td.S6)(r,function(t,n){e.legend(n,t)}):e.legend(!1),e.tooltip(n.tooltip),t}function Tr(t){var e=t.chart,n=t.options,i=n.plots,r=n.data,o=void 0===r?[]:r;return(0,td.S6)(i,function(t){var n=t.type,i=t.region,r=t.options,a=void 0===r?{}:r,s=t.top,l=a.tooltip;if(s){Tn(n,e,(0,tf.pi)((0,tf.pi)({},a),{data:o}));return}var u=e.createView((0,tf.pi)({region:i},ca(a,Ec)));l&&u.interaction("tooltip"),Tn(n,u,(0,tf.pi)({data:o},a))}),t}function To(t){var e=t.chart,n=t.options;return e.option("slider",n.slider),t}function Ta(t){return cd(c$,Ti,Tr,cZ,c$,cJ,cz,To,c1())(t)}rN("association",function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getAssociationItems=function(t,e){var n,i=this.context.event,r=e||{},o=r.linkField,a=r.dim,s=[];if(null===(n=i.data)||void 0===n?void 0:n.data){var l=i.data.data;(0,td.S6)(t,function(t){var e,n,i=o;if("x"===a?i=t.getXScale().field:"y"===a?i=null===(e=t.getYScales().find(function(t){return t.field===i}))||void 0===e?void 0:e.field:i||(i=null===(n=t.getGroupScales()[0])||void 0===n?void 0:n.field),i){var r=(0,td.UI)(cS(t),function(e){var n,r,o=!1,a=!1,s=(0,td.kJ)(l)?(0,td.U2)(l[0],i):(0,td.U2)(l,i);return(n=i,r=e.getModel().data,((0,td.kJ)(r)?r[0][n]:r[n])===s)?o=!0:a=!0,{element:e,view:t,active:o,inactive:a}});s.push.apply(s,r)}})}return s},e.prototype.showTooltip=function(t){var e=cU(this.context.view),n=this.getAssociationItems(e,t);(0,td.S6)(n,function(t){if(t.active){var e=t.element.shape.getCanvasBBox();t.view.showTooltip({x:e.minX+e.width/2,y:e.minY+e.height/2})}})},e.prototype.hideTooltip=function(){var t=cU(this.context.view);(0,td.S6)(t,function(t){t.hideTooltip()})},e.prototype.active=function(t){var e=cD(this.context.view),n=this.getAssociationItems(e,t);(0,td.S6)(n,function(t){var e=t.active,n=t.element;e&&n.setState("active",!0)})},e.prototype.selected=function(t){var e=cD(this.context.view),n=this.getAssociationItems(e,t);(0,td.S6)(n,function(t){var e=t.active,n=t.element;e&&n.setState("selected",!0)})},e.prototype.highlight=function(t){var e=cD(this.context.view),n=this.getAssociationItems(e,t);(0,td.S6)(n,function(t){var e=t.inactive,n=t.element;e&&n.setState("inactive",!0)})},e.prototype.reset=function(){var t=cD(this.context.view);(0,td.S6)(t,function(t){var e;e=cS(t),(0,td.S6)(e,function(t){t.hasState("active")&&t.setState("active",!1),t.hasState("selected")&&t.setState("selected",!1),t.hasState("inactive")&&t.setState("inactive",!1)})})},e}(rI)),r4("association-active",{start:[{trigger:"element:mouseenter",action:"association:active"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),r4("association-selected",{start:[{trigger:"element:mouseenter",action:"association:selected"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),r4("association-highlight",{start:[{trigger:"element:mouseenter",action:"association:highlight"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),r4("association-tooltip",{start:[{trigger:"element:mousemove",action:"association:showTooltip"}],end:[{trigger:"element:mouseleave",action:"association:hideTooltip"}]});var Ts=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="mix",e}return(0,tf.ZT)(e,t),e.prototype.getSchemaAdaptor=function(){return Ta},e}(EE);(m=q||(q={})).DEV="DEV",m.BETA="BETA",m.STABLE="STABLE",Object.defineProperty(function(){},"MultiView",{get:function(){var t,e;return t=q.STABLE,e="MultiView",console.warn(t===q.DEV?"Plot '".concat(e,"' is in DEV stage, just give us issues."):t===q.BETA?"Plot '".concat(e,"' is in BETA stage, DO NOT use it in production env."):t===q.STABLE?"Plot '".concat(e,"' is in STABLE stage, import it by \"import { ").concat(e," } from '@antv/g2plot'\"."):"invalid Stage type."),Ts},enumerable:!1,configurable:!0});var Tl="first-axes-view",Tu="second-axes-view",Tc="series-field-key";function TE(t,e,n,i,r){var o=[];e.forEach(function(e){i.forEach(function(i){var r,a=((r={})[t]=i[t],r[n]=e,r[e]=i[e],r);o.push(a)})});var a=Object.values((0,td.vM)(o,n)),s=a[0],l=void 0===s?[]:s,u=a[1],c=void 0===u?[]:u;return r?[l.reverse(),c.reverse()]:[l,c]}function Th(t){return"vertical"!==t}function Tp(t,e,n){var i=e[0],r=e[1],o=i.autoPadding,a=r.autoPadding,s=t.__axisPosition,l=s.layout,u=s.position;if(Th(l)&&"top"===u&&(i.autoPadding=n.instance(o.top,0,o.bottom,o.left),r.autoPadding=n.instance(a.top,o.left,a.bottom,0)),Th(l)&&"bottom"===u&&(i.autoPadding=n.instance(o.top,o.right/2+5,o.bottom,o.left),r.autoPadding=n.instance(a.top,a.right,a.bottom,o.right/2+5)),!Th(l)&&"bottom"===u){var c=o.left>=a.left?o.left:a.left;i.autoPadding=n.instance(o.top,o.right,o.bottom/2+5,c),r.autoPadding=n.instance(o.bottom/2+5,a.right,a.bottom,c)}if(!Th(l)&&"top"===u){var c=o.left>=a.left?o.left:a.left;i.autoPadding=n.instance(o.top,o.right,0,c),r.autoPadding=n.instance(0,a.right,o.top,c)}}function TT(t){var e,n,i=t.chart,r=t.options,o=r.data,a=r.xField,s=r.yField,l=r.color,u=r.barStyle,c=r.widthRatio,E=r.legend,h=r.layout,p=TE(a,s,Tc,o,Th(h));E?i.legend(Tc,E):!1===E&&i.legend(!1);var T=p[0],f=p[1];return Th(h)?((e=i.createView({region:{start:{x:0,y:0},end:{x:.5,y:1}},id:Tl})).coordinate().transpose().reflect("x"),(n=i.createView({region:{start:{x:.5,y:0},end:{x:1,y:1}},id:Tu})).coordinate().transpose(),e.data(T),n.data(f)):(e=i.createView({region:{start:{x:0,y:0},end:{x:1,y:.5}},id:Tl}),(n=i.createView({region:{start:{x:0,y:.5},end:{x:1,y:1}},id:Tu})).coordinate().reflect("y"),e.data(T),n.data(f)),Ei(cT({},t,{chart:e,options:{widthRatio:c,xField:a,yField:s[0],seriesField:Tc,interval:{color:l,style:u}}})),Ei(cT({},t,{chart:n,options:{xField:a,yField:s[1],seriesField:Tc,widthRatio:c,interval:{color:l,style:u}}})),t}function Tf(t){var e,n,i,r=t.options,o=t.chart,a=r.xAxis,s=r.yAxis,l=r.xField,u=r.yField,c=cP(o,Tl),E=cP(o,Tu),h={};return(0,td.XP)((null==r?void 0:r.meta)||{}).map(function(t){(0,td.U2)(null==r?void 0:r.meta,[t,"alias"])&&(h[t]=r.meta[t].alias)}),o.scale(((e={})[Tc]={sync:!0,formatter:function(t){return(0,td.U2)(h,t,t)}},e)),c0(((n={})[l]=a,n[u[0]]=s[u[0]],n))(cT({},t,{chart:c})),c0(((i={})[l]=a,i[u[1]]=s[u[1]],i))(cT({},t,{chart:E})),t}function Td(t){var e=t.chart,n=t.options,i=n.xAxis,r=n.yAxis,o=n.xField,a=n.yField,s=n.layout,l=cP(e,Tl),u=cP(e,Tu);return(null==i?void 0:i.position)==="bottom"?u.axis(o,(0,tf.pi)((0,tf.pi)({},i),{label:{formatter:function(){return""}}})):u.axis(o,!1),!1===i?l.axis(o,!1):l.axis(o,(0,tf.pi)({position:Th(s)?"top":"bottom"},i)),!1===r?(l.axis(a[0],!1),u.axis(a[1],!1)):(l.axis(a[0],r[a[0]]),u.axis(a[1],r[a[1]])),e.__axisPosition={position:l.getOptions().axes[o].position,layout:s},t}function TA(t){var e=t.chart;return cZ(cT({},t,{chart:cP(e,Tl)})),cZ(cT({},t,{chart:cP(e,Tu)})),t}function TS(t){var e=t.chart,n=t.options,i=n.yField,r=n.yAxis;return c2(cT({},t,{chart:cP(e,Tl),options:{yAxis:r[i[0]]}})),c2(cT({},t,{chart:cP(e,Tu),options:{yAxis:r[i[1]]}})),t}function TR(t){var e=t.chart;return cJ(cT({},t,{chart:cP(e,Tl)})),cJ(cT({},t,{chart:cP(e,Tu)})),cJ(t),t}function Tg(t){var e=t.chart;return c$(cT({},t,{chart:cP(e,Tl)})),c$(cT({},t,{chart:cP(e,Tu)})),t}function TI(t){var e,n,i=this,r=t.chart,o=t.options,a=o.label,s=o.yField,l=o.layout,u=cP(r,Tl),c=cP(r,Tu),E=cA(u,"interval"),h=cA(c,"interval");if(a){var p=a.callback,T=(0,tf._T)(a,["callback"]);T.position||(T.position="middle"),void 0===T.offset&&(T.offset=2);var f=(0,tf.pi)({},T);if(Th(l)){var d=(null===(e=f.style)||void 0===e?void 0:e.textAlign)||("middle"===T.position?"center":"left");T.style=cT({},T.style,{textAlign:d}),f.style=cT({},f.style,{textAlign:{left:"right",right:"left",center:"center"}[d]})}else{var A={top:"bottom",bottom:"top",middle:"middle"};"string"==typeof T.position?T.position=A[T.position]:"function"==typeof T.position&&(T.position=function(){for(var t=[],e=0;e1?"".concat(e,"_").concat(n):"".concat(e)}function TU(t){var e=t.data,n=t.xField,i=t.measureField,r=t.rangeField,o=t.targetField,a=t.layout,s=[],l=[];e.forEach(function(t,e){var a=[t[r]].flat();a.sort(function(t,e){return t-e}),a.forEach(function(i,o){var l,u=0===o?i:a[o]-a[o-1];s.push(((l={rKey:"".concat(r,"_").concat(o)})[n]=n?t[n]:String(e),l[r]=u,l))});var u=[t[i]].flat();u.forEach(function(r,o){var a;s.push(((a={mKey:TD(u,i,o)})[n]=n?t[n]:String(e),a[i]=r,a))});var c=[t[o]].flat();c.forEach(function(i,r){var a;s.push(((a={tKey:TD(c,o,r)})[n]=n?t[n]:String(e),a[o]=i,a))}),l.push(t[r],t[i],t[o])});var u=Math.min.apply(Math,l.flat(1/0)),c=Math.max.apply(Math,l.flat(1/0));return u=u>0?0:u,"vertical"===a&&s.reverse(),{min:u,max:c,ds:s}}function Tb(t){var e=t.chart,n=t.options,i=n.bulletStyle,r=n.targetField,o=n.rangeField,a=n.measureField,s=n.xField,l=n.color,u=n.layout,c=n.size,E=n.label,h=TU(n),p=h.min,T=h.max,f=h.ds;return e.data(f),Ei(cT({},t,{options:{xField:s,yField:o,seriesField:"rKey",isStack:!0,label:(0,td.U2)(E,"range"),interval:{color:(0,td.U2)(l,"range"),style:(0,td.U2)(i,"range"),size:(0,td.U2)(c,"range")}}})),e.geometries[0].tooltip(!1),Ei(cT({},t,{options:{xField:s,yField:a,seriesField:"mKey",isStack:!0,label:(0,td.U2)(E,"measure"),interval:{color:(0,td.U2)(l,"measure"),style:(0,td.U2)(i,"measure"),size:(0,td.U2)(c,"measure")}}})),Eo(cT({},t,{options:{xField:s,yField:r,seriesField:"tKey",label:(0,td.U2)(E,"target"),point:{color:(0,td.U2)(l,"target"),style:(0,td.U2)(i,"target"),size:(0,td.mf)((0,td.U2)(c,"target"))?function(t){return(0,td.U2)(c,"target")(t)/2}:(0,td.U2)(c,"target")/2,shape:"horizontal"===u?"line":"hyphen"}}})),"horizontal"===u&&e.coordinate().transpose(),(0,tf.pi)((0,tf.pi)({},t),{ext:{data:{min:p,max:T}}})}function TF(t){var e,n,i=t.options,r=t.ext,o=i.xAxis,a=i.yAxis,s=i.targetField,l=i.rangeField,u=i.measureField,c=i.xField,E=r.data;return cd(c0(((e={})[c]=o,e[u]=a,e),((n={})[u]={min:null==E?void 0:E.min,max:null==E?void 0:E.max,sync:!0},n[s]={sync:"".concat(u)},n[l]={sync:"".concat(u)},n)))(t)}function TB(t){var e=t.chart,n=t.options,i=n.xAxis,r=n.yAxis,o=n.xField,a=n.measureField,s=n.rangeField,l=n.targetField;return e.axis("".concat(s),!1),e.axis("".concat(l),!1),!1===i?e.axis("".concat(o),!1):e.axis("".concat(o),i),!1===r?e.axis("".concat(a),!1):e.axis("".concat(a),r),t}function TG(t){var e=t.chart,n=t.options.legend;return e.removeInteraction("legend-filter"),e.legend(n),e.legend("rKey",!1),e.legend("mKey",!1),e.legend("tKey",!1),t}function Tw(t){var e=t.chart,n=t.options,i=n.label,r=n.measureField,o=n.targetField,a=n.rangeField,s=e.geometries,l=s[0],u=s[1],c=s[2];return(0,td.U2)(i,"range")?l.label("".concat(a),(0,tf.pi)({layout:[{type:"limit-in-plot"}]},cg(i.range))):l.label(!1),(0,td.U2)(i,"measure")?u.label("".concat(r),(0,tf.pi)({layout:[{type:"limit-in-plot"}]},cg(i.measure))):u.label(!1),(0,td.U2)(i,"target")?c.label("".concat(o),(0,tf.pi)({layout:[{type:"limit-in-plot"}]},cg(i.target))):c.label(!1),t}function TH(t){cd(Tb,TF,TB,TG,cJ,Tw,cz,cZ,c$)(t)}!function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="box",e}(0,tf.ZT)(e,t),e.getDefaultOptions=function(){return TN},e.prototype.changeData=function(t){this.updateOption({data:t});var e=this.options.yField,n=this.chart.views.find(function(t){return t.id===Tv});n&&n.data(t),this.chart.changeData(TC(t,e))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return TP}}(EE);var TY=cT({},EE.getDefaultOptions(),{layout:"horizontal",size:{range:30,measure:20,target:20},xAxis:{tickLine:!1,line:null},bulletStyle:{range:{fillOpacity:.5}},label:{measure:{position:"right"}},tooltip:{showMarkers:!1}});!function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bullet",e}(0,tf.ZT)(e,t),e.getDefaultOptions=function(){return TY},e.prototype.changeData=function(t){this.updateOption({data:t});var e=TU(this.options),n=e.min,i=e.max,r=e.ds;TF({options:this.options,ext:{data:{min:n,max:i}},chart:this.chart}),this.chart.changeData(r)},e.prototype.getSchemaAdaptor=function(){return TH},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()}}(EE);var Tk={y:0,nodeWidthRatio:.05,weight:!1,nodePaddingRatio:.1,id:function(t){return t.id},source:function(t){return t.source},target:function(t){return t.target},sourceWeight:function(t){return t.value||1},targetWeight:function(t){return t.value||1},sortBy:null},TV="name",TW="source",TX={nodeStyle:{opacity:1,fillOpacity:1,lineWidth:1},edgeStyle:{opacity:.5,lineWidth:2},label:{fields:["x","name"],callback:function(t,e){return{offsetX:(t[0]+t[1])/2>.5?-4:4,content:e}},labelEmit:!0,style:{fill:"#8c8c8c"}},tooltip:{showTitle:!1,showMarkers:!1,fields:["source","target","value","isNode"],showContent:function(t){return!(0,td.U2)(t,[0,"data","isNode"])},formatter:function(t){var e=t.source,n=t.target,i=t.value;return{name:"".concat(e," -> ").concat(n),value:i}}},interactions:[{type:"element-active"}],weight:!0,nodePaddingRatio:.1,nodeWidthRatio:.05};function TK(t){var e,n,i,r,o,a,s=t.options,l=s.data,u=s.sourceField,c=s.targetField,E=s.weightField,h=s.nodePaddingRatio,p=s.nodeWidthRatio,T=s.rawFields,f=void 0===T?[]:T,d=cl(l,u,c,E),A=(e=(0,td.f0)({},Tk,{weight:!0,nodePaddingRatio:h,nodeWidthRatio:p}),n={},i=d.nodes,r=d.links,i.forEach(function(t){n[e.id(t)]=t}),(0,td.U5)(n,function(t,n){t.inEdges=r.filter(function(t){return"".concat(e.target(t))==="".concat(n)}),t.outEdges=r.filter(function(t){return"".concat(e.source(t))==="".concat(n)}),t.edges=t.outEdges.concat(t.inEdges),t.frequency=t.edges.length,t.value=0,t.inEdges.forEach(function(n){t.value+=e.targetWeight(n)}),t.outEdges.forEach(function(n){t.value+=e.sourceWeight(n)})}),!(a=({weight:function(t,e){return e.value-t.value},frequency:function(t,e){return e.frequency-t.frequency},id:function(t,e){return"".concat(o.id(t)).localeCompare("".concat(o.id(e)))}})[(o=e).sortBy])&&(0,td.mf)(o.sortBy)&&(a=o.sortBy),a&&i.sort(a),{nodes:function(t,e){var n=t.length;if(!n)throw TypeError("Invalid nodes: it's empty!");if(e.weight){var i=e.nodePaddingRatio;if(i<0||i>=1)throw TypeError("Invalid nodePaddingRatio: it must be in range [0, 1)!");var r=i/(2*n),o=e.nodeWidthRatio;if(o<=0||o>=1)throw TypeError("Invalid nodeWidthRatio: it must be in range (0, 1)!");var a=0;t.forEach(function(t){a+=t.value}),t.forEach(function(t){t.weight=t.value/a,t.width=t.weight*(1-i),t.height=o}),t.forEach(function(n,i){for(var a=0,s=i-1;s>=0;s--)a+=t[s].width+2*r;var l=n.minX=r+a,u=n.maxX=n.minX+n.width,c=n.minY=e.y-o/2,E=n.maxY=c+o;n.x=[l,u,u,l],n.y=[c,c,E,E]})}else{var s=1/n;t.forEach(function(t,n){t.x=(n+.5)*s,t.y=e.y})}return t}(i,e),links:function(t,e,n){if(n.weight){var i={};(0,td.U5)(t,function(t,e){i[e]=t.value}),e.forEach(function(e){var r=n.source(e),o=n.target(e),a=t[r],s=t[o];if(a&&s){var l=i[r],u=n.sourceWeight(e),c=a.minX+(a.value-l)/a.value*a.width,E=c+u/a.value*a.width;i[r]-=u;var h=i[o],p=n.targetWeight(e),T=s.minX+(s.value-h)/s.value*s.width,f=T+p/s.value*s.width;i[o]-=p;var d=n.y;e.x=[c,E,T,f],e.y=[d,d,d,d],e.source=a,e.target=s}})}else e.forEach(function(e){var i=t[n.source(e)],r=t[n.target(e)];i&&r&&(e.x=[i.x,r.x],e.y=[i.y,r.y],e.source=i,e.target=r)});return e}(n,r,e)}),S=A.nodes,R=A.links,g=S.map(function(t){return(0,tf.pi)((0,tf.pi)({},ca(t,(0,tf.ev)(["id","x","y","name"],f,!0))),{isNode:!0})}),I=R.map(function(t){return(0,tf.pi)((0,tf.pi)({source:t.source.name,target:t.target.name,name:t.source.name||t.target.name},ca(t,(0,tf.ev)(["x","y","value"],f,!0))),{isNode:!1})});return(0,tf.pi)((0,tf.pi)({},t),{ext:(0,tf.pi)((0,tf.pi)({},t.ext),{chordData:{nodesData:g,edgesData:I}})})}function Tz(t){var e;return t.chart.scale(((e={x:{sync:!0,nice:!0},y:{sync:!0,nice:!0,max:1}})[TV]={sync:"color"},e[TW]={sync:"color"},e)),t}function TZ(t){return t.chart.axis(!1),t}function T$(t){return t.chart.legend(!1),t}function TJ(t){var e=t.chart,n=t.options.tooltip;return e.tooltip(n),t}function Tj(t){return t.chart.coordinate("polar").reflect("y"),t}function Tq(t){var e=t.chart,n=t.options,i=t.ext.chordData.nodesData,r=n.nodeStyle,o=n.label,a=n.tooltip,s=e.createView();return s.data(i),Ea({chart:s,options:{xField:"x",yField:"y",seriesField:TV,polygon:{style:r},label:o,tooltip:a}}),t}function TQ(t){var e=t.chart,n=t.options,i=t.ext.chordData.edgesData,r=n.edgeStyle,o=n.tooltip,a=e.createView();return a.data(i),En({chart:a,options:{xField:"x",yField:"y",seriesField:TW,edge:{style:r,shape:"arc"},tooltip:o}}),t}function T0(t){var e=t.chart;return cb(e,t.options.animation,0>=(0,td.U2)(e,["views","length"],0)?e.geometries:(0,td.u4)(e.views,function(t,e){return t.concat(e.geometries)},e.geometries)),t}function T1(t){return cd(cJ,TK,Tj,Tz,TZ,T$,TJ,TQ,Tq,cZ,cj,T0)(t)}!function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="chord",e}(0,tf.ZT)(e,t),e.getDefaultOptions=function(){return TX},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return T1}}(EE);var T2=["x","y","r","name","value","path","depth"],T5={colorField:"name",autoFit:!0,pointStyle:{lineWidth:0,stroke:"#fff"},legend:!1,hierarchyConfig:{size:[1,1],padding:0},label:{fields:["name"],layout:{type:"limit-in-shape"}},tooltip:{showMarkers:!1,showTitle:!1},drilldown:{enabled:!1}},T6="drilldown-bread-crumb",T3={position:"top-left",dividerText:"/",textStyle:{fontSize:12,fill:"rgba(0, 0, 0, 0.65)",cursor:"pointer"},activeTextStyle:{fill:"#87B5FF"}},T4="hierarchy-data-transform-params",T8=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="drill-down",e.historyCache=[],e.breadCrumbGroup=null,e.breadCrumbCfg=T3,e}return(0,tf.ZT)(e,t),e.prototype.click=function(){var t=(0,td.U2)(this.context,["event","data","data"]);if(!t)return!1;this.drill(t),this.drawBreadCrumb()},e.prototype.resetPosition=function(){if(this.breadCrumbGroup){var t=this.context.view.getCoordinate(),e=this.breadCrumbGroup,n=e.getBBox(),i=this.getButtonCfg().position,r={x:t.start.x,y:t.end.y-(n.height+10)};t.isPolar&&(r={x:0,y:0}),"bottom-left"===i&&(r={x:t.start.x,y:t.start.y});var o=ar.transform(null,[["t",r.x+0,r.y+n.height+5]]);e.setMatrix(o)}},e.prototype.back=function(){(0,td.dp)(this.historyCache)&&this.backTo(this.historyCache.slice(0,-1))},e.prototype.reset=function(){this.historyCache[0]&&this.backTo(this.historyCache.slice(0,1)),this.historyCache=[],this.hideCrumbGroup()},e.prototype.drill=function(t){var e=this.context.view,n=(0,td.U2)(e,["interactions","drill-down","cfg","transformData"],function(t){return t}),i=n((0,tf.pi)({data:t.data},t[T4]));e.changeData(i);for(var r=[],o=t;o;){var a=o.data;r.unshift({id:"".concat(a.name,"_").concat(o.height,"_").concat(o.depth),name:a.name,children:n((0,tf.pi)({data:a},t[T4]))}),o=o.parent}this.historyCache=(this.historyCache||[]).slice(0,-1).concat(r)},e.prototype.backTo=function(t){if(t&&!(t.length<=0)){var e=this.context.view,n=(0,td.Z$)(t).children;e.changeData(n),t.length>1?(this.historyCache=t,this.drawBreadCrumb()):(this.historyCache=[],this.hideCrumbGroup())}},e.prototype.getButtonCfg=function(){var t=this.context.view,e=(0,td.U2)(t,["interactions","drill-down","cfg","drillDownConfig"]);return cT(this.breadCrumbCfg,null==e?void 0:e.breadCrumb,this.cfg)},e.prototype.drawBreadCrumb=function(){this.drawBreadCrumbGroup(),this.resetPosition(),this.breadCrumbGroup.show()},e.prototype.drawBreadCrumbGroup=function(){var t=this,e=this.getButtonCfg(),n=this.historyCache;this.breadCrumbGroup?this.breadCrumbGroup.clear():this.breadCrumbGroup=this.context.view.foregroundGroup.addGroup({name:T6});var i=0;n.forEach(function(r,o){var a=t.breadCrumbGroup.addShape({type:"text",id:r.id,name:"".concat(T6,"_").concat(r.name,"_text"),attrs:(0,tf.pi)((0,tf.pi)({text:0!==o||(0,td.UM)(e.rootText)?r.name:e.rootText},e.textStyle),{x:i,y:0})}),s=a.getBBox();if(i+=s.width+4,a.on("click",function(e){var i,r=e.target.get("id");if(r!==(null===(i=(0,td.Z$)(n))||void 0===i?void 0:i.id)){var o=n.slice(0,n.findIndex(function(t){return t.id===r})+1);t.backTo(o)}}),a.on("mouseenter",function(t){var i;t.target.get("id")!==(null===(i=(0,td.Z$)(n))||void 0===i?void 0:i.id)?a.attr(e.activeTextStyle):a.attr({cursor:"default"})}),a.on("mouseleave",function(){a.attr(e.textStyle)}),o0&&n*n>i*i+r*r}function fe(t,e){for(var n=0;n(a*=a)?(i=(u+a-r)/(2*u),o=Math.sqrt(Math.max(0,a/u-i*i)),n.x=t.x-i*s-o*l,n.y=t.y-i*l+o*s):(i=(u+r-a)/(2*u),o=Math.sqrt(Math.max(0,r/u-i*i)),n.x=e.x+i*s-o*l,n.y=e.y+i*l+o*s)):(n.x=e.x+n.r,n.y=e.y)}function fo(t,e){var n=t.r+e.r-1e-6,i=e.x-t.x,r=e.y-t.y;return n>0&&n*n>i*i+r*r}function fa(t){var e=t._,n=t.next._,i=e.r+n.r,r=(e.x*n.r+n.x*e.r)/i,o=(e.y*n.r+n.y*e.r)/i;return r*r+o*o}function fs(t){this._=t,this.next=null,this.previous=null}function fl(t){var e,n,i,r,o,a,s,l,u,c,E,h;if(!(r=(t="object"==typeof(h=t)&&"length"in h?h:Array.from(h)).length))return 0;if((e=t[0]).x=0,e.y=0,!(r>1))return e.r;if(n=t[1],e.x=-n.r,n.x=e.r,n.y=0,!(r>2))return e.r+n.r;fr(n,e,i=t[2]),e=new fs(e),n=new fs(n),i=new fs(i),e.next=i.previous=n,n.next=e.previous=i,i.next=n.previous=e;t:for(s=3;s=0;)e+=n[i].value;else e=1;t.value=e}function fR(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=fI)):void 0===e&&(e=fg);for(var n,i,r,o,a,s=new fv(t),l=[s];n=l.pop();)if((r=e(n.data))&&(a=(r=Array.from(r)).length))for(n.children=r,o=a-1;o>=0;--o)l.push(i=r[o]=new fv(r[o])),i.parent=n,i.depth=n.depth+1;return s.eachBefore(fy)}function fg(t){return t.children}function fI(t){return Array.isArray(t)?t[1]:null}function fO(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function fy(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function fv(t){this.data=t,this.depth=this.height=0,this.parent=null}fv.prototype=fR.prototype={constructor:fv,count:function(){return this.eachAfter(fS)},each:function(t,e){let n=-1;for(let i of this)t.call(e,i,++n,this);return this},eachAfter:function(t,e){for(var n,i,r,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),n=o.children)for(i=0,r=n.length;i=0;--i)o.push(n[i]);return this},find:function(t,e){let n=-1;for(let i of this)if(t.call(e,i,++n,this))return i},sum:function(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,i=e.children,r=i&&i.length;--r>=0;)n+=i[r].value;e.value=n})},sort:function(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),i=e.ancestors(),r=null;for(t=n.pop(),e=i.pop();t===e;)r=t,t=n.pop(),e=i.pop();return r}(e,t),i=[e];e!==n;)i.push(e=e.parent);for(var r=i.length;t!==n;)i.splice(r,0,t),t=t.parent;return i},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t},links:function(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e},copy:function(){return fR(this).eachBefore(fO)},[Symbol.iterator]:function*(){var t,e,n,i,r=this,o=[r];do for(t=o.reverse(),o=[];r=t.pop();)if(yield r,e=r.children)for(n=0,i=e.length;n0&&n1;)i="".concat(null===(e=a.parent.data)||void 0===e?void 0:e.name," / ").concat(i),a=a.parent;if(o&&t.depth>2)return null;var l=cT({},t.data,(0,tf.pi)((0,tf.pi)((0,tf.pi)({},ca(t.data,r)),{path:i}),t));l.ext=n,l[T4]={hierarchyConfig:n,rawFields:r,enableDrillDown:o},s.push(l)}),s}function fD(t,e,n){var i=cv([t,e]),r=i[0],o=i[1],a=i[2],s=i[3],l=n.width,u=n.height,c=l-(s+o),E=u-(r+a),h=Math.min(c,E),p=(c-h)/2,T=(E-h)/2;return{finalPadding:[r+T,o+p,a+T,s+p],finalSize:h<0?0:h}}function fU(t){var e=t.chart,n=Math.min(e.viewBBox.width,e.viewBBox.height);return cT({options:{size:function(t){return t.r*n}}},t)}function fb(t){var e=t.options,n=t.chart,i=n.viewBBox,r=e.padding,o=e.appendPadding,a=e.drilldown,s=o;(null==a?void 0:a.enabled)&&(s=cv([cy(n.appendPadding,(0,td.U2)(a,["breadCrumb","position"])),o]));var l=fD(r,s,i).finalPadding;return n.padding=l,n.appendPadding=0,t}function fF(t){var e=t.chart,n=t.options,i=e.padding,r=e.appendPadding,o=n.color,a=n.colorField,s=n.pointStyle,l=n.hierarchyConfig,u=n.sizeField,c=n.rawFields,E=void 0===c?[]:c,h=n.drilldown,p=fP({data:n.data,hierarchyConfig:l,enableDrillDown:null==h?void 0:h.enabled,rawFields:E});e.data(p);var T=fD(i,r,e.viewBBox).finalSize,f=function(t){return t.r*T};return u&&(f=function(t){return t[u]*T}),Eo(cT({},t,{options:{xField:"x",yField:"y",seriesField:a,sizeField:u,rawFields:(0,tf.ev)((0,tf.ev)([],T2,!0),E,!0),point:{color:o,style:s,shape:"circle",size:f}}})),t}function fB(t){return cd(c0({},{x:{min:0,max:1,minLimit:0,maxLimit:1,nice:!0},y:{min:0,max:1,minLimit:0,maxLimit:1,nice:!0}}))(t)}function fG(t){var e=t.chart,n=t.options.tooltip;if(!1===n)e.tooltip(!1);else{var i=n;(0,td.U2)(n,"fields")||(i=cT({},{customItems:function(t){return t.map(function(t){var n=(0,td.U2)(e.getOptions(),"scales"),i=(0,td.U2)(n,["name","formatter"],function(t){return t}),r=(0,td.U2)(n,["value","formatter"],function(t){return t});return(0,tf.pi)((0,tf.pi)({},t),{name:i(t.data.name),value:r(t.data.value)})})}},i)),e.tooltip(i)}return t}function fw(t){return t.chart.axis(!1),t}function fH(t){var e,n,i;return cZ({chart:t.chart,options:(n=(e=t.options).drilldown,i=e.interactions,(null==n?void 0:n.enabled)?cT({},e,{interactions:(0,tf.ev)((0,tf.ev)([],void 0===i?[]:i,!0),[{type:"drill-down",cfg:{drillDownConfig:n,transformData:fP,enableDrillDown:!0}}],!1)}):e)}),t}function fY(t){return cd(cX("pointStyle"),fU,fb,cJ,fB,fF,fw,cK,fG,fH,c$,c1())(t)}function fk(t){var e=(0,td.U2)(t,["event","data","data"],{});return(0,td.kJ)(e.children)&&e.children.length>0}function fV(t){var e=t.view.getCoordinate(),n=e.innerRadius;if(n){var i=t.event,r=i.x,o=i.y,a=e.center;return Math.sqrt(Math.pow(a.x-r,2)+Math.pow(a.y-o,2))-1)||(e=Math.min(u,c),n=Math.max(u,c),i>=e&&i<=n)}),t.getRootView().render(!0)}};function f2(t){var e,n=t.options,i=n.geometryOptions,r=void 0===i?[]:i,o=n.xField,a=n.yField,s=(0,td.yW)(r,function(t){var e=t.geometry;return e===te.Line||void 0===e});return cT({},{options:{geometryOptions:[],meta:((e={})[o]={type:"cat",sync:!0,range:s?[0,1]:void 0},e),tooltip:{showMarkers:s,showCrosshairs:s,shared:!0,crosshairs:{type:"x"}},interactions:s?[{type:"legend-visible-filter"}]:[{type:"legend-visible-filter"},{type:"active-region"}],legend:{position:"top-left"}}},t,{options:{yAxis:fq(a,n.yAxis),geometryOptions:[fj(o,a[0],r[0]),fj(o,a[1],r[1])],annotations:fq(a,n.annotations)}})}function f5(t){var e,n,i=t.chart,r=t.options.geometryOptions,o={line:0,column:1};return[{type:null===(e=r[0])||void 0===e?void 0:e.geometry,id:fW},{type:null===(n=r[1])||void 0===n?void 0:n.geometry,id:fX}].sort(function(t,e){return-o[t.type]+o[e.type]}).forEach(function(t){return i.createView({id:t.id})}),t}function f6(t){var e=t.chart,n=t.options,i=n.xField,r=n.yField,o=n.geometryOptions,a=n.data,s=n.tooltip;return[(0,tf.pi)((0,tf.pi)({},o[0]),{id:fW,data:a[0],yField:r[0]}),(0,tf.pi)((0,tf.pi)({},o[1]),{id:fX,data:a[1],yField:r[1]})].forEach(function(t){var n=t.id,r=t.data,o=t.yField,a=fJ(t)&&t.isPercent,l=a?Eh(r,o,i,o):r,u=cP(e,n).data(l),c=a?(0,tf.pi)({formatter:function(e){return{name:e[t.seriesField]||o,value:(100*Number(e[o])).toFixed(2)+"%"}}},s):s;!function(t){var e=t.options,n=t.chart,i=e.geometryOption,r=i.isStack,o=i.color,a=i.seriesField,s=i.groupField,l=i.isGroup,u=["xField","yField"];if(f$(i)){Er(cT({},t,{options:(0,tf.pi)((0,tf.pi)((0,tf.pi)({},ca(e,u)),i),{line:{color:i.color,style:i.lineStyle}})})),Eo(cT({},t,{options:(0,tf.pi)((0,tf.pi)((0,tf.pi)({},ca(e,u)),i),{point:i.point&&(0,tf.pi)({color:o,shape:"circle"},i.point)})}));var c=[];l&&c.push({type:"dodge",dodgeBy:s||a,customOffset:0}),r&&c.push({type:"stack"}),c.length&&(0,td.S6)(n.geometries,function(t){t.adjust(c)})}fJ(i)&&EV(cT({},t,{options:(0,tf.pi)((0,tf.pi)((0,tf.pi)({},ca(e,u)),i),{widthRatio:i.columnWidthRatio,interval:(0,tf.pi)((0,tf.pi)({},ca(i,["color"])),{style:i.columnStyle})})}))}({chart:u,options:{xField:i,yField:o,tooltip:c,geometryOption:t}})}),t}function f3(t){var e,n=t.chart,i=t.options.geometryOptions,r=(null===(e=n.getTheme())||void 0===e?void 0:e.colors10)||[],o=0;return n.once("beforepaint",function(){(0,td.S6)(i,function(t,e){var i=cP(n,0===e?fW:fX);if(!t.color){var a=i.getGroupScales(),s=(0,td.U2)(a,[0,"values","length"],1),l=r.slice(o,o+s).concat(0===e?[]:r);i.geometries.forEach(function(e){t.seriesField?e.color(t.seriesField,l):e.color(l[0])}),o+=s}}),n.render(!0)}),t}function f4(t){var e,n,i=t.chart,r=t.options,o=r.xAxis,a=r.yAxis,s=r.xField,l=r.yField;return c0(((e={})[s]=o,e[l[0]]=a[0],e))(cT({},t,{chart:cP(i,fW)})),c0(((n={})[s]=o,n[l[1]]=a[1],n))(cT({},t,{chart:cP(i,fX)})),t}function f8(t){var e=t.chart,n=t.options,i=cP(e,fW),r=cP(e,fX),o=n.xField,a=n.yField,s=n.xAxis,l=n.yAxis;return e.axis(o,!1),e.axis(a[0],!1),e.axis(a[1],!1),i.axis(o,s),i.axis(a[0],fQ(l[0],tt.Left)),r.axis(o,!1),r.axis(a[1],fQ(l[1],tt.Right)),t}function f9(t){var e=t.chart,n=t.options.tooltip,i=cP(e,fW),r=cP(e,fX);return e.tooltip(n),i.tooltip({shared:!0}),r.tooltip({shared:!0}),t}function f7(t){var e=t.chart;return cZ(cT({},t,{chart:cP(e,fW)})),cZ(cT({},t,{chart:cP(e,fX)})),t}function dt(t){var e=t.chart,n=t.options.annotations,i=(0,td.U2)(n,[0]),r=(0,td.U2)(n,[1]);return c1(i)(cT({},t,{chart:cP(e,fW),options:{annotations:i}})),c1(r)(cT({},t,{chart:cP(e,fX),options:{annotations:r}})),t}function de(t){var e=t.chart;return cJ(cT({},t,{chart:cP(e,fW)})),cJ(cT({},t,{chart:cP(e,fX)})),cJ(t),t}function dn(t){var e=t.chart;return c$(cT({},t,{chart:cP(e,fW)})),c$(cT({},t,{chart:cP(e,fX)})),t}function di(t){var e=t.chart,n=t.options.yAxis;return c2(cT({},t,{chart:cP(e,fW),options:{yAxis:n[0]}})),c2(cT({},t,{chart:cP(e,fX),options:{yAxis:n[1]}})),t}function dr(t){var e=t.chart,n=t.options,i=n.legend,r=n.geometryOptions,o=n.yField,a=n.data,s=cP(e,fW),l=cP(e,fX);if(!1===i)e.legend(!1);else if((0,td.Kn)(i)&&!0===i.custom)e.legend(i);else{var u=(0,td.U2)(r,[0,"legend"],i),c=(0,td.U2)(r,[1,"legend"],i);e.once("beforepaint",function(){var t=a[0].length?f0({view:s,geometryOption:r[0],yField:o[0],legend:u}):[],n=a[1].length?f0({view:l,geometryOption:r[1],yField:o[1],legend:c}):[];e.legend(cT({},i,{custom:!0,items:t.concat(n)}))}),r[0].seriesField&&s.legend(r[0].seriesField,u),r[1].seriesField&&l.legend(r[1].seriesField,c),e.on("legend-item:click",function(t){var n=(0,td.U2)(t,"gEvent.delegateObject",{});if(n&&n.item){var i=n.item,r=i.value,a=i.isGeometry,s=i.viewId;if(a){if((0,td.cx)(o,function(t){return t===r})>-1){var l=(0,td.U2)(cP(e,s),"geometries");(0,td.S6)(l,function(t){t.changeVisible(!n.item.unchecked)})}}else{var u=(0,td.U2)(e.getController("legend"),"option.items",[]);(0,td.S6)(e.views,function(t){var n=t.getGroupScales();(0,td.S6)(n,function(e){e.values&&e.values.indexOf(r)>-1&&t.filter(e.field,function(t){return!(0,td.sE)(u,function(e){return e.value===t}).unchecked})}),e.render(!0)})}}})}return t}function da(t){var e=t.chart,n=t.options.slider,i=cP(e,fW),r=cP(e,fX);return n&&(i.option("slider",n),i.on("slider:valuechanged",function(t){var e=t.event,n=e.value,i=e.originValue;(0,td.Xy)(n,i)||f1(r,n)}),e.once("afterpaint",function(){if(!(0,td.jn)(n)){var t=n.start,e=n.end;(t||e)&&f1(r,[t,e])}})),t}function ds(t){return cd(f2,f5,de,f6,f4,f8,di,f9,f7,dt,dn,f3,dr,da)(t)}function dl(t){var e=t.chart,n=t.options,i=n.type,r=n.data,o=n.fields,a=n.eachView,s=(0,td.CE)(n,["type","data","fields","eachView","axes","meta","tooltip","coordinate","theme","legend","interactions","annotations"]);return e.data(r),e.facet(i,(0,tf.pi)((0,tf.pi)({},s),{fields:o,eachView:function(t,e){var n,i,r,o,s,l,u,c,E,h,p=a(t,e);if(p.geometries)n=p.data,i=p.coordinate,r=p.interactions,o=p.annotations,s=p.animation,l=p.tooltip,u=p.axes,c=p.meta,E=p.geometries,n&&t.data(n),h={},u&&(0,td.S6)(u,function(t,e){h[e]=ca(t,ci)}),h=cT({},c,h),t.scale(h),i&&t.coordinate(i),!1===u?t.axis(!1):(0,td.S6)(u,function(e,n){t.axis(n,e)}),(0,td.S6)(E,function(e){var n=Et({chart:t,options:e}).ext,i=e.adjust;i&&n.geometry.adjust(i)}),(0,td.S6)(r,function(e){!1===e.enable?t.removeInteraction(e.type):t.interaction(e.type,e.cfg)}),(0,td.S6)(o,function(e){t.annotation()[e.type]((0,tf.pi)({},e))}),cb(t,s),l?(t.interaction("tooltip"),t.tooltip(l)):!1===l&&t.removeInteraction("tooltip");else{var T=p.options;T.tooltip&&t.interaction("tooltip"),Tn(p.type,t,T)}}})),t}function du(t){var e=t.chart,n=t.options,i=n.axes,r=n.meta,o=n.tooltip,a=n.coordinate,s=n.theme,l=n.legend,u=n.interactions,c=n.annotations,E={};return i&&(0,td.S6)(i,function(t,e){E[e]=ca(t,ci)}),E=cT({},r,E),e.scale(E),e.coordinate(a),i?(0,td.S6)(i,function(t,n){e.axis(n,t)}):e.axis(!1),o?(e.interaction("tooltip"),e.tooltip(o)):!1===o&&e.removeInteraction("tooltip"),e.legend(l),s&&e.theme(s),(0,td.S6)(u,function(t){!1===t.enable?e.removeInteraction(t.type):e.interaction(t.type,t.cfg)}),(0,td.S6)(c,function(t){e.annotation()[t.type]((0,tf.pi)({},t))}),t}function dc(t){return cd(cJ,dl,du)(t)}!function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dual-axes",e}(0,tf.ZT)(e,t),e.prototype.getDefaultOptions=function(){return cT({},t.prototype.getDefaultOptions.call(this),{yAxis:[],syncViewPadding:!0})},e.prototype.getSchemaAdaptor=function(){return ds}}(EE);var dE={title:{style:{fontSize:12,fill:"rgba(0,0,0,0.65)"}},rowTitle:{style:{fontSize:12,fill:"rgba(0,0,0,0.65)"}},columnTitle:{style:{fontSize:12,fill:"rgba(0,0,0,0.65)"}}};function dh(t){var e=t.chart,n=t.options,i=n.data,r=n.type,o=n.xField,a=n.yField,s=n.colorField,l=n.sizeField,u=n.sizeRatio,c=n.shape,E=n.color,h=n.tooltip,p=n.heatmapStyle,T=n.meta;e.data(i);var f="polygon";"density"===r&&(f="heatmap");var d=c8(h,[o,a,s]),A=d.fields,S=d.formatter,R=1;return(u||0===u)&&(c||l?u<0||u>1?console.warn("sizeRatio is not in effect: It must be a number in [0,1]"):R=u:console.warn("sizeRatio is not in effect: Must define shape or sizeField first")),Et(cT({},t,{options:{type:f,colorField:s,tooltipFields:A,shapeField:l||"",label:void 0,mapping:{tooltip:S,shape:c&&(l?function(t){var e=i.map(function(t){return t[l]}),n=(null==T?void 0:T[l])||{},r=n.min,o=n.max;return r=(0,td.hj)(r)?r:Math.min.apply(Math,e),o=(0,td.hj)(o)?o:Math.max.apply(Math,e),[c,((0,td.U2)(t,l)-r)/(o-r),R]}:function(){return[c,1,R]}),color:E||s&&e.getTheme().sequenceColors.join("-"),style:p}}})),t}function dp(t){var e,n=t.options,i=n.xAxis,r=n.yAxis,o=n.xField,a=n.yField;return cd(c0(((e={})[o]=i,e[a]=r,e)))(t)}function dT(t){var e=t.chart,n=t.options,i=n.xAxis,r=n.yAxis,o=n.xField,a=n.yField;return!1===i?e.axis(o,!1):e.axis(o,i),!1===r?e.axis(a,!1):e.axis(a,r),t}function df(t){var e=t.chart,n=t.options,i=n.legend,r=n.colorField,o=n.sizeField,a=n.sizeLegend,s=!1!==i;return r&&e.legend(r,!!s&&i),o&&e.legend(o,void 0===a?i:a),s||a||e.legend(!1),t}function dd(t){var e=t.chart,n=t.options,i=n.label,r=n.colorField,o=cA(e,"density"===n.type?"heatmap":"polygon");if(i){if(r){var a=i.callback,s=(0,tf._T)(i,["callback"]);o.label({fields:[r],callback:a,cfg:cg(s)})}}else o.label(!1);return t}function dA(t){var e,n,i=t.chart,r=t.options,o=r.coordinate,a=r.reflect,s=cT({actions:[]},null!=o?o:{type:"rect"});return a&&(null===(n=null===(e=s.actions)||void 0===e?void 0:e.push)||void 0===n||n.call(e,["reflect",a])),i.coordinate(s),t}function dS(t){return cd(cJ,cX("heatmapStyle"),dp,dA,dh,dT,df,cz,dd,c1(),cZ,c$,cj)(t)}!function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area",e}(0,tf.ZT)(e,t),e.getDefaultOptions=function(){return dE},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return dc}}(EE);var dR=cT({},EE.getDefaultOptions(),{type:"polygon",legend:!1,coordinate:{type:"rect"},xAxis:{tickLine:null,line:null,grid:{alignTick:!1,line:{style:{lineWidth:1,lineDash:null,stroke:"#f0f0f0"}}}},yAxis:{grid:{alignTick:!1,line:{style:{lineWidth:1,lineDash:null,stroke:"#f0f0f0"}}}}});function dg(t){return[{percent:t,type:"liquid"}]}function dI(t){var e=t.chart,n=t.options,i=n.percent,r=n.liquidStyle,o=n.radius,a=n.outline,s=n.wave,l=n.shape,u=n.shapeStyle,c=n.animation;e.scale({percent:{min:0,max:1}}),e.data(dg(i));var E=Ei(cT({},t,{options:{xField:"type",yField:"percent",widthRatio:o,interval:{color:n.color||e.getTheme().defaultColor,style:r,shape:"liquid-fill-gauge"}}})).ext.geometry,h=e.getTheme().background;return E.customInfo({percent:i,radius:o,outline:a,wave:s,shape:l,shapeStyle:u,background:h,animation:c}),e.legend(!1),e.axis(!1),e.tooltip(!1),t}function dO(t,e){var n=t.chart,i=t.options,r=i.statistic,o=i.percent,a=i.meta;n.getController("annotation").clear(!0);var s=(0,td.U2)(a,["percent","formatter"])||function(t){return"".concat((100*t).toFixed(2),"%")},l=r.content;return l&&(l=cT({},l,{content:(0,td.UM)(l.content)?s(o):l.content})),c_(n,{statistic:(0,tf.pi)((0,tf.pi)({},r),{content:l}),plotType:"liquid"},{percent:o}),e&&n.render(!0),t}function dy(t){return cd(cJ,cX("liquidStyle"),dI,dO,c0({}),c$,cZ)(t)}oz("polygon","circle",{draw:function(t,e){var n,i,r=t.x,o=t.y,a=this.parsePoints(t.points),s=Math.min(Math.abs(a[2].x-a[1].x),Math.abs(a[1].y-a[0].y))/2,l=Number(t.shape[1]),u=s*Math.sqrt(Number(t.shape[2]))*Math.sqrt(l),c=(null===(n=t.style)||void 0===n?void 0:n.fill)||t.color||(null===(i=t.defaultStyle)||void 0===i?void 0:i.fill);return e.addShape("circle",{attrs:(0,tf.pi)((0,tf.pi)((0,tf.pi)({x:r,y:o,r:u},t.defaultStyle),t.style),{fill:c})})}}),oz("polygon","square",{draw:function(t,e){var n,i,r=t.x,o=t.y,a=this.parsePoints(t.points),s=Math.min(Math.abs(a[2].x-a[1].x),Math.abs(a[1].y-a[0].y)),l=Number(t.shape[1]),u=s*Math.sqrt(Number(t.shape[2]))*Math.sqrt(l),c=(null===(n=t.style)||void 0===n?void 0:n.fill)||t.color||(null===(i=t.defaultStyle)||void 0===i?void 0:i.fill);return e.addShape("rect",{attrs:(0,tf.pi)((0,tf.pi)((0,tf.pi)({x:r-u/2,y:o-u/2,width:u,height:u},t.defaultStyle),t.style),{fill:c})})}}),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="heatmap",e}(0,tf.ZT)(e,t),e.getDefaultOptions=function(){return dR},e.prototype.getSchemaAdaptor=function(){return dS},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()}}(EE);var dv={radius:.9,statistic:{title:!1,content:{style:{opacity:.75,fontSize:"30px",lineHeight:"30px",textAlign:"center"}}},outline:{border:2,distance:0},wave:{count:3,length:192},shape:"circle"},dN={pin:function(t,e,n,i){var r=2*n/3,o=Math.max(r,i),a=r/2,s=a+e-o/2,l=Math.asin(a/((o-a)*.85)),u=Math.sin(l)*a,c=Math.cos(l)*a,E=t-c,h=s+u,p=s+a/Math.sin(l);return"\n M ".concat(E," ").concat(h,"\n A ").concat(a," ").concat(a," 0 1 1 ").concat(E+2*c," ").concat(h,"\n Q ").concat(t," ").concat(p," ").concat(t," ").concat(e+o/2,"\n Q ").concat(t," ").concat(p," ").concat(E," ").concat(h,"\n Z \n ")},circle:function(t,e,n,i){var r=n/2,o=i/2;return"\n M ".concat(t," ").concat(e-o," \n a ").concat(r," ").concat(o," 0 1 0 0 ").concat(2*o,"\n a ").concat(r," ").concat(o," 0 1 0 0 ").concat(-(2*o),"\n Z\n ")},diamond:function(t,e,n,i){var r=i/2,o=n/2;return"\n M ".concat(t," ").concat(e-r,"\n L ").concat(t+o," ").concat(e,"\n L ").concat(t," ").concat(e+r,"\n L ").concat(t-o," ").concat(e,"\n Z\n ")},triangle:function(t,e,n,i){var r=i/2,o=n/2;return"\n M ".concat(t," ").concat(e-r,"\n L ").concat(t+o," ").concat(e+r,"\n L ").concat(t-o," ").concat(e+r,"\n Z\n ")},rect:function(t,e,n,i){var r=i/2,o=n/2*.618;return"\n M ".concat(t-o," ").concat(e-r,"\n L ").concat(t+o," ").concat(e-r,"\n L ").concat(t+o," ").concat(e+r,"\n L ").concat(t-o," ").concat(e+r,"\n Z\n ")}};function dC(t){var e=t.chart,n=t.options,i=n.data,r=n.lineStyle,o=n.color,a=n.point,s=n.area;e.data(i);var l=cT({},t,{options:{line:{style:r,color:o},point:a?(0,tf.pi)({color:o},a):a,area:s?(0,tf.pi)({color:o},s):s,label:void 0}}),u=cT({},l,{options:{tooltip:!1}}),c=cT({},l,{options:{tooltip:!1,state:(null==a?void 0:a.state)||n.state}});return Er(l),Eo(c),Ee(u),t}function dm(t){var e,n=t.options,i=n.xAxis,r=n.yAxis,o=n.xField,a=n.yField;return cd(c0(((e={})[o]=i,e[a]=r,e)))(t)}function dL(t){var e=t.chart,n=t.options,i=n.radius,r=n.startAngle,o=n.endAngle;return e.coordinate("polar",{radius:i,startAngle:r,endAngle:o}),t}function d_(t){var e=t.chart,n=t.options,i=n.xField,r=n.xAxis,o=n.yField,a=n.yAxis;return e.axis(i,r),e.axis(o,a),t}function dx(t){var e=t.chart,n=t.options,i=n.label,r=n.yField,o=cA(e,"line");if(i){var a=i.callback,s=(0,tf._T)(i,["callback"]);o.label({fields:[r],callback:a,cfg:cg(s)})}else o.label(!1);return t}function dM(t){return cd(dC,dm,cJ,dL,d_,cK,cz,dx,cZ,c$,c1())(t)}function dP(t){var e=t.chart,n=t.options,i=n.barStyle,r=n.color,o=n.tooltip,a=n.colorField,s=n.type,l=n.xField,u=n.yField,c=n.data,E=n.shape,h=cu(c,u);return e.data(h),Ei(cT({},t,{options:{tooltip:o,seriesField:a,interval:{style:i,color:r,shape:E||("line"===s?"line":"intervel")},minColumnWidth:n.minBarWidth,maxColumnWidth:n.maxBarWidth,columnBackground:n.barBackground}})),"line"===s&&Eo({chart:e,options:{xField:l,yField:u,seriesField:a,point:{shape:"circle",color:r}}}),t}function dD(t){var e,n,i,r,o,a=t.options,s=a.yField,l=a.xField,u=a.data,c=a.isStack,E=a.isGroup,h=a.colorField,p=a.maxAngle,T=cu(c&&!E&&h?(e=[],u.forEach(function(t){var n=e.find(function(e){return e[l]===t[l]});n?n[s]+=t[s]||null:e.push((0,tf.pi)({},t))}),e):u,s);return cd(c0(((o={})[s]={min:0,max:(i=(n=T.map(function(t){return t[s]}).filter(function(t){return void 0!==t})).length>0?Math.max.apply(Math,n):0,(r=Math.abs(p)%360)?360*i/r:i)},o)))(t)}function dU(t){var e=t.chart,n=t.options,i=n.radius,r=n.innerRadius,o=n.startAngle,a=n.endAngle;return e.coordinate({type:"polar",cfg:{radius:i,innerRadius:r,startAngle:o,endAngle:a}}).transpose(),t}function db(t){var e=t.chart,n=t.options,i=n.xField,r=n.xAxis;return e.axis(i,r),t}function dF(t){var e=t.chart,n=t.options,i=n.label,r=n.yField,o=cA(e,"interval");if(i){var a=i.callback,s=(0,tf._T)(i,["callback"]);o.label({fields:[r],callback:a,cfg:(0,tf.pi)((0,tf.pi)({},cg(s)),{type:"polar"})})}else o.label(!1);return t}function dB(t){return cd(cX("barStyle"),dP,dD,db,dU,cZ,c$,cJ,cz,cK,c1(),dF)(t)}oz("interval","liquid-fill-gauge",{draw:function(t,e){var n,i,r,o=t.customInfo,a=o.percent,s=o.radius,l=o.shape,u=o.shapeStyle,c=o.background,E=o.animation,h=o.outline,p=o.wave,T=h.border,f=h.distance,d=p.count,A=p.length,S=(0,td.u4)(t.points,function(t,e){return Math.min(t,e.x)},1/0),R=this.parsePoint({x:.5,y:.5}),g=this.parsePoint({x:S,y:.5}),I=Math.min(R.x-g.x,g.y*s),O=(n=(0,tf.pi)({opacity:1},t.style),t.color&&!n.fill&&(n.fill=t.color),n),y=(i=(0,td.CD)({},t,h),r=(0,td.CD)({},{fill:"#fff",fillOpacity:0,lineWidth:4},i.style),i.color&&!r.stroke&&(r.stroke=i.color),(0,td.hj)(i.opacity)&&(r.opacity=r.strokeOpacity=i.opacity),r),v=I-T/2,N=("function"==typeof l?l:dN[l]||dN.circle)(R.x,R.y,2*v,2*v);if(u&&e.addShape("path",{name:"shape",attrs:(0,tf.pi)({path:N},u)}),a>0){var C=e.addGroup({name:"waves"}),m=C.setClip({type:"path",attrs:{path:N}});!function(t,e,n,i,r,o,a,s,l,u){for(var c=r.fill,E=r.opacity,h=a.getBBox(),p=h.maxX-h.minX,T=h.maxY-h.minY,f=0;f0;)u-=2*Math.PI;var c=o-t+(u=u/Math.PI/2*n)-2*t;l.push(["M",c,e]);for(var E=0,h=0;h0){var a=this.view.geometries[0],s=a.dataArray,l=o[0].name,u=[];return s.forEach(function(t){t.forEach(function(t){var e=ar.getTooltipItems(t,a)[0];if(!i&&e&&e.name===l){var n=(0,td.UM)(r)?l:r;u.push((0,tf.pi)((0,tf.pi)({},e),{name:e.title,title:n}))}else if(i&&e){var n=(0,td.UM)(r)?e.name||l:r;u.push((0,tf.pi)((0,tf.pi)({},e),{name:e.title,title:n}))}})}),u}return[]},e}(oL),oA["radar-tooltip"]=x,rN("radar-tooltip",function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.init=function(){this.context.view.removeInteraction("tooltip")},e.prototype.show=function(){var t=this.context.event;this.getTooltipController().showTooltip({x:t.x,y:t.y})},e.prototype.hide=function(){this.getTooltipController().hideTooltip()},e.prototype.getTooltipController=function(){return this.context.view.getController("radar-tooltip")},e}(rI)),r4("radar-tooltip",{start:[{trigger:"plot:mousemove",action:"radar-tooltip:show"}],end:[{trigger:"plot:mouseleave",action:"radar-tooltip:hide"}]}),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="radar",e}(0,tf.ZT)(e,t),e.prototype.changeData=function(t){this.updateOption({data:t}),this.chart.changeData(t)},e.prototype.getDefaultOptions=function(){return cT({},t.prototype.getDefaultOptions.call(this),{xAxis:{label:{offset:15},grid:{line:{type:"line"}}},yAxis:{grid:{line:{type:"circle"}}},legend:{position:"top"},tooltip:{shared:!0,showCrosshairs:!0,showMarkers:!0,crosshairs:{type:"xy",line:{style:{stroke:"#565656",lineDash:[4]}},follow:!0}}})},e.prototype.getSchemaAdaptor=function(){return dM}}(EE);var dG=cT({},EE.getDefaultOptions(),{interactions:[{type:"element-active"}],legend:!1,tooltip:{showMarkers:!1},xAxis:{grid:null,tickLine:null,line:null},maxAngle:240});function dw(t){var e=t.chart,n=t.options,i=n.data,r=n.sectorStyle,o=n.shape,a=n.color;return e.data(i),cd(Ei)(cT({},t,{options:{marginRatio:1,interval:{style:r,color:a,shape:o}}})),t}function dH(t){var e=t.chart,n=t.options,i=n.label,r=n.xField,o=cA(e,"interval");if(!1===i)o.label(!1);else if((0,td.Kn)(i)){var a=i.callback,s=i.fields,l=(0,tf._T)(i,["callback","fields"]),u=l.offset,c=l.layout;(void 0===u||u>=0)&&(c=c?(0,td.kJ)(c)?c:[c]:[],l.layout=(0,td.hX)(c,function(t){return"limit-in-shape"!==t.type}),l.layout.length||delete l.layout),o.label({fields:s||[r],callback:a,cfg:cg(l)})}else co(Z.WARN,null===i,"the label option must be an Object."),o.label({fields:[r]});return t}function dY(t){var e=t.chart,n=t.options,i=n.legend,r=n.seriesField;return!1===i?e.legend(!1):r&&e.legend(r,i),t}function dk(t){var e=t.chart,n=t.options,i=n.radius,r=n.innerRadius,o=n.startAngle,a=n.endAngle;return e.coordinate({type:"polar",cfg:{radius:i,innerRadius:r,startAngle:o,endAngle:a}}),t}function dV(t){var e,n=t.options,i=n.xAxis,r=n.yAxis,o=n.xField,a=n.yField;return cd(c0(((e={})[o]=i,e[a]=r,e)))(t)}function dW(t){var e=t.chart,n=t.options,i=n.xAxis,r=n.yAxis,o=n.xField,a=n.yField;return i?e.axis(o,i):e.axis(o,!1),r?e.axis(a,r):e.axis(a,!1),t}function dX(t){cd(cX("sectorStyle"),dw,dV,dH,dk,dW,dY,cz,cZ,c$,cJ,c1(),cj)(t)}!function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="radial-bar",e}(0,tf.ZT)(e,t),e.getDefaultOptions=function(){return dG},e.prototype.changeData=function(t){this.updateOption({data:t}),dD({chart:this.chart,options:this.options}),this.chart.changeData(t)},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return dB}}(EE);var dK=cT({},EE.getDefaultOptions(),{xAxis:!1,yAxis:!1,legend:{position:"right",radio:{}},sectorStyle:{stroke:"#fff",lineWidth:1},label:{layout:{type:"limit-in-shape"}},tooltip:{shared:!0,showMarkers:!1},interactions:[{type:"active-region"}]});!function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="rose",e}(0,tf.ZT)(e,t),e.getDefaultOptions=function(){return dK},e.prototype.changeData=function(t){this.updateOption({data:t}),this.chart.changeData(t)},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return dX}}(EE);var dz="name",dZ="nodes",d$="edges";function dJ(t){return t.target.depth}function dj(t,e){return t.sourceLinks.length?t.depth:e-1}function dq(t){return function(){return t}}function dQ(t,e){for(var n=0,i=0;io.findIndex(function(i){return i==="".concat(t[e],"_").concat(t[n])})})}(T,f,d),f,d,A,C);var m=(i={nodeAlign:S,nodePadding:cI(g)?g/n:I,nodeWidth:cI(O)?O/e:y,nodeSort:R,nodeDepth:v},o=(r=(0,td.f0)({},Ae,i)).nodeId,a=r.nodeSort,s=r.nodeAlign,l=r.nodeWidth,u=r.nodePadding,c=r.nodeDepth,{nodes:(E=(function(){var t,e,n,i,r=0,o=0,a=1,s=1,l=24,u=8,c=d3,E=dj,h=d4,p=d8,T=6;function f(f){var A={nodes:h(f),links:p(f)};return function(t){var e=t.nodes,i=t.links;e.forEach(function(t,e){t.index=e,t.sourceLinks=[],t.targetLinks=[]});var r=new Map(e.map(function(t){return[c(t),t]}));if(i.forEach(function(t,e){t.index=e;var n=t.source,i=t.target;"object"!=typeof n&&(n=t.source=d9(r,n)),"object"!=typeof i&&(i=t.target=d9(r,i)),n.sourceLinks.push(t),i.targetLinks.push(t)}),null!=n)for(var o=0;oi)throw Error("circular link");r=o,o=new Set}if(t)for(var s=Math.max(d0(n,function(t){return t.depth})+1,0),l=void 0,u=0;un)throw Error("circular link");i=r,r=new Set}}(A),function(t){var c=function(t){for(var n=t.nodes,i=Math.max(d0(n,function(t){return t.depth})+1,0),o=(a-r-l)/(i-1),s=Array(i).fill(0).map(function(){return[]}),u=0;u=0;--a){for(var s=t[a],l=0;l0){var S=(c/E-u.y0)*n;u.y0+=S,u.y1+=S,R(u)}}void 0===e&&s.sort(d5),s.length&&d(s,r)}})(c,p,f),function(t,n,r){for(var o=1,a=t.length;o0){var S=(c/E-u.y0)*n;u.y0+=S,u.y1+=S,R(u)}}void 0===e&&s.sort(d5),s.length&&d(s,r)}}(c,p,f)}}(A),d7(A),A}function d(t,e){var n=t.length>>1,r=t[n];S(t,r.y0-i,n-1,e),A(t,r.y1+i,n+1,e),S(t,s,t.length-1,e),A(t,o,0,e)}function A(t,e,n,r){for(;n1e-6&&(o.y0+=a,o.y1+=a),e=o.y1+i}}function S(t,e,n,r){for(;n>=0;--n){var o=t[n],a=(o.y1-e)*r;a>1e-6&&(o.y0-=a,o.y1-=a),e=o.y0-i}}function R(t){var e=t.sourceLinks,i=t.targetLinks;if(void 0===n){for(var r=0;r "+t.target,value:t.value}}},nodeWidthRatio:.008,nodePaddingRatio:.01,animation:{appear:{animation:"wave-in"},enter:{animation:"wave-in"}}}},e.prototype.changeData=function(t){this.updateOption({data:t});var e=An(this.options,this.chart.width,this.chart.height),n=e.nodes,i=e.edges,r=cP(this.chart,dZ),o=cP(this.chart,d$);r.changeData(n),o.changeData(i)},e.prototype.getSchemaAdaptor=function(){return Al},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()}}(EE);var Au="ancestor-node",Ac="value",AE="path",Ah=[AE,fN,fm,fC,"name","depth","height"],Ap=cT({},EE.getDefaultOptions(),{innerRadius:0,radius:.85,hierarchyConfig:{field:"value"},tooltip:{shared:!0,showMarkers:!1,offset:20,showTitle:!1},legend:!1,sunburstStyle:{lineWidth:.5,stroke:"#FFF"},drilldown:{enabled:!0}});function AT(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Af(t,e,n,i,r){for(var o,a=t.children,s=-1,l=a.length,u=t.value&&(i-e)/t.value;++s0)throw Error("cycle");return o}return n.id=function(e){return arguments.length?(t=fc(e),n):t},n.parentId=function(t){return arguments.length?(e=fc(t),n):e},n}function AL(t,e){return t.parent===e.parent?1:2}function A_(t){var e=t.children;return e?e[0]:t.t}function Ax(t){var e=t.children;return e?e[e.length-1]:t.t}function AM(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function AP(){var t=AL,e=1,n=1,i=null;function r(r){var l=function(t){for(var e,n,i,r,o,a=new AM(t,0),s=[a];e=s.pop();)if(i=e._.children)for(e.children=Array(o=i.length),r=o-1;r>=0;--r)s.push(n=e.children[r]=new AM(i[r],r)),n.parent=e;return(a.parent=new AM(null,0)).children=[a],a}(r);if(l.eachAfter(o),l.parent.m=-l.z,l.eachBefore(a),i)r.eachBefore(s);else{var u=r,c=r,E=r;r.eachBefore(function(t){t.xc.x&&(c=t),t.depth>E.depth&&(E=t)});var h=u===c?1:t(u,c)/2,p=h-u.x,T=e/(c.x+h+p),f=n/(E.depth||1);r.eachBefore(function(t){t.x=(t.x+p)*T,t.y=t.depth*f})}return r}function o(e){var n=e.children,i=e.parent.children,r=e.i?i[e.i-1]:null;if(n){!function(t){for(var e,n=0,i=0,r=t.children,o=r.length;--o>=0;)e=r[o],e.z+=n,e.m+=n,n+=e.s+(i+=e.c)}(e);var o=(n[0].z+n[n.length-1].z)/2;r?(e.z=r.z+t(e._,r._),e.m=e.z-o):e.z=o}else r&&(e.z=r.z+t(e._,r._));e.parent.A=function(e,n,i){if(n){for(var r,o,a,s=e,l=e,u=n,c=s.parent.children[0],E=s.m,h=l.m,p=u.m,T=c.m;u=Ax(u),s=A_(s),u&&s;)c=A_(c),(l=Ax(l)).a=e,(a=u.z+p-s.z-E+t(u._,s._))>0&&(function(t,e,n){var i=n/(e.i-t.i);e.c-=i,e.s+=n,t.c+=i,e.z+=n,e.m+=n}((r=u,o=i,r.a.parent===e.parent?r.a:o),e,a),E+=a,h+=a),p+=u.m,E+=s.m,T+=c.m,h+=l.m;u&&!Ax(l)&&(l.t=u,l.m+=p-h),s&&!A_(c)&&(c.t=s,c.m+=E-T,i=e)}return i}(e,r,e.parent.A||i[0])}function a(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*n}return r.separation=function(e){return arguments.length?(t=e,r):t},r.size=function(t){return arguments.length?(i=!1,e=+t[0],n=+t[1],r):i?null:[e,n]},r.nodeSize=function(t){return arguments.length?(i=!0,e=+t[0],n=+t[1],r):i?[e,n]:null},r}function AD(t,e,n,i,r){for(var o,a=t.children,s=-1,l=a.length,u=t.value&&(r-n)/t.value;++sh&&(h=s),(p=Math.max(h/(d=c*c*f),d/E))>T){c-=s;break}T=p}A.push(a={value:c,dice:l1?e:1)},n}(AU);function AB(){var t=AF,e=!1,n=1,i=1,r=[0],o=fE,a=fE,s=fE,l=fE,u=fE;function c(t){return t.x0=t.y0=0,t.x1=n,t.y1=i,t.eachBefore(E),r=[0],e&&t.eachBefore(AT),t}function E(e){var n=r[e.depth],i=e.x0+n,c=e.y0+n,E=e.x1-n,h=e.y1-n;E=n-1){var c=s[e];c.x0=r,c.y0=o,c.x1=a,c.y1=l;return}for(var E=u[e],h=i/2+E,p=e+1,T=n-1;p>>1;u[f]l-o){var S=i?(r*A+a*d)/i:a;t(e,p,d,r,o,S,l),t(p,n,A,S,o,a,l)}else{var R=i?(o*A+l*d)/i:l;t(e,p,d,r,o,a,R),t(p,n,A,r,R,a,l)}}(0,l,t.value,e,n,i,r)}function Aw(t,e,n,i,r){(1&t.depth?AD:Af)(t,e,n,i,r)}var AH=function t(e){function n(t,n,i,r,o){if((a=t._squarify)&&a.ratio===e)for(var a,s,l,u,c,E=-1,h=a.length,p=t.value;++E1?e:1)},n}(AU),AY={field:"value",tile:"treemapSquarify",size:[1,1],round:!1,ignoreParentValue:!0,padding:0,paddingInner:0,paddingOuter:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,as:["x","y"],sort:function(t,e){return e.value-t.value},ratio:.5*(1+Math.sqrt(5))};function Ak(t,e){var n,i,r,o=(e=(0,td.f0)({},AY,e)).as;if(!(0,td.kJ)(o)||2!==o.length)throw TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');try{r=f_(e)}catch(t){console.warn(t)}var a=(n=e.tile,i=e.ratio,"treemapSquarify"===n?tT[n].ratio(i):tT[n]),s=AB().tile(a).size(e.size).round(e.round).padding(e.padding).paddingInner(e.paddingInner).paddingOuter(e.paddingOuter).paddingTop(e.paddingTop).paddingRight(e.paddingRight).paddingBottom(e.paddingBottom).paddingLeft(e.paddingLeft)(fR(t).sum(function(t){return e.ignoreParentValue&&t.children?0:t[r]}).sort(e.sort)),l=o[0],u=o[1];return s.each(function(t){t[l]=[t.x0,t.x1,t.x1,t.x0],t[u]=[t.y1,t.y1,t.y0,t.y0],["x0","x1","y0","y1"].forEach(function(e){-1===o.indexOf(e)&&delete t[e]})}),fx(s)}function AV(t){var e=t.data,n=t.colorField,i=t.rawFields,r=t.hierarchyConfig,o=void 0===r?{}:r,a=o.activeDepth,s=t.seriesField,l=t.type||"partition",u=({partition:AS,treemap:Ak})[l](e,(0,tf.pi)((0,tf.pi)({field:s||"value"},(0,td.CE)(o,["activeDepth"])),{type:"hierarchy.".concat(l),as:["x","y"]})),c=[];return u.forEach(function(t){if(0===t.depth||a>0&&t.depth>a)return null;for(var e,r,l,u,E,h,p=t.data.name,T=(0,tf.pi)({},t);T.depth>1;)p="".concat(null===(r=T.parent.data)||void 0===r?void 0:r.name," / ").concat(p),T=T.parent;var f=(0,tf.pi)((0,tf.pi)((0,tf.pi)({},ca(t.data,(0,tf.ev)((0,tf.ev)([],i||[],!0),[o.field],!1))),((e={})[AE]=p,e[Au]=T.data.name,e)),t);s&&(f[s]=t.data[s]||(null===(u=null===(l=t.parent)||void 0===l?void 0:l.data)||void 0===u?void 0:u[s])),n&&(f[n]=t.data[n]||(null===(h=null===(E=t.parent)||void 0===E?void 0:E.data)||void 0===h?void 0:h[n])),f.ext=o,f[T4]={hierarchyConfig:o,colorField:n,rawFields:i},c.push(f)}),c}function AW(t){var e,n=t.chart,i=t.options,r=i.color,o=i.colorField,a=void 0===o?Au:o,s=i.sunburstStyle,l=i.rawFields,u=void 0===l?[]:l,c=i.shape,E=AV(i);return n.data(E),s&&(e=function(t){return cT({},{fillOpacity:Math.pow(.85,t.depth)},(0,td.mf)(s)?s(t):s)}),Ea(cT({},t,{options:{xField:"x",yField:"y",seriesField:a,rawFields:(0,td.jj)((0,tf.ev)((0,tf.ev)([],Ah,!0),u,!0)),polygon:{color:r,style:e,shape:c}}})),t}function AX(t){return t.chart.axis(!1),t}function AK(t){var e=t.chart,n=t.options.label,i=cA(e,"polygon");if(n){var r=n.fields,o=n.callback,a=(0,tf._T)(n,["fields","callback"]);i.label({fields:void 0===r?["name"]:r,callback:o,cfg:cg(a)})}else i.label(!1);return t}function Az(t){var e=t.chart,n=t.options,i=n.innerRadius,r=n.radius,o=n.reflect,a=e.coordinate({type:"polar",cfg:{innerRadius:i,radius:r}});return o&&a.reflect(o),t}function AZ(t){var e,n=t.options,i=n.hierarchyConfig,r=n.meta;return cd(c0({},((e={})[Ac]=(0,td.U2)(r,(0,td.U2)(i,["field"],"value")),e)))(t)}function A$(t){var e=t.chart,n=t.options.tooltip;if(!1===n)e.tooltip(!1);else{var i=n;(0,td.U2)(n,"fields")||(i=cT({},{customItems:function(t){return t.map(function(t){var n=(0,td.U2)(e.getOptions(),"scales"),i=(0,td.U2)(n,[AE,"formatter"],function(t){return t}),r=(0,td.U2)(n,[Ac,"formatter"],function(t){return t});return(0,tf.pi)((0,tf.pi)({},t),{name:i(t.data[AE]),value:r(t.data.value)})})}},i)),e.tooltip(i)}return t}function AJ(t){var e,n,i=t.chart,r=t.options,o=r.drilldown;return cZ({chart:i,options:(e=r.drilldown,n=r.interactions,(null==e?void 0:e.enabled)?cT({},r,{interactions:(0,tf.ev)((0,tf.ev)([],void 0===n?[]:n,!0),[{type:"drill-down",cfg:{drillDownConfig:e,transformData:AV}}],!1)}):r)}),(null==o?void 0:o.enabled)&&(i.appendPadding=cy(i.appendPadding,(0,td.U2)(o,["breadCrumb","position"]))),t}function Aj(t){return cd(cJ,cX("sunburstStyle"),AW,AX,AZ,cK,Az,A$,AK,AJ,c$,c1())(t)}function Aq(t,e){if((0,td.kJ)(t))return t.find(function(t){return t.type===e})}function AQ(t,e){var n=Aq(t,e);return n&&!1!==n.enable}function A0(t){var e=t.interactions,n=t.drilldown;return(0,td.U2)(n,"enabled")||AQ(e,"treemap-drill-down")}function A1(t){var e=t.data,n=t.colorField,i=t.enableDrillDown,r=t.hierarchyConfig,o=Ak(e,(0,tf.pi)((0,tf.pi)({},r),{type:"hierarchy.treemap",field:"value",as:["x","y"]})),a=[];return o.forEach(function(t){if(0===t.depth||i&&1!==t.depth||!i&&t.children)return null;var o=t.ancestors().map(function(t){return{data:t.data,height:t.height,value:t.value}}),s=i&&(0,td.kJ)(e.path)?o.concat(e.path.slice(1)):o,l=Object.assign({},t.data,(0,tf.pi)({x:t.x,y:t.y,depth:t.depth,value:t.value,path:s},t));if(!t.data[n]&&t.parent){var u=t.ancestors().find(function(t){return t.data[n]});l[n]=null==u?void 0:u.data[n]}else l[n]=t.data[n];l[T4]={hierarchyConfig:r,colorField:n,enableDrillDown:i},a.push(l)}),a}function A2(t){return cT({options:{rawFields:["value"],tooltip:{fields:["name","value",t.options.colorField,"path"],formatter:function(t){return{name:t.name,value:t.value}}}}},t)}function A5(t){var e=t.chart,n=t.options,i=n.color,r=n.colorField,o=n.rectStyle,a=n.hierarchyConfig,s=n.rawFields,l=A1({data:n.data,colorField:n.colorField,enableDrillDown:A0(n),hierarchyConfig:a});return e.data(l),Ea(cT({},t,{options:{xField:"x",yField:"y",seriesField:r,rawFields:s,polygon:{color:i,style:o}}})),e.coordinate().reflect("y"),t}function A6(t){return t.chart.axis(!1),t}function A3(t){var e,n,i=t.chart,r=t.options,o=r.interactions,a=r.drilldown;cZ({chart:i,options:(e=r.drilldown,n=r.interactions,A0(r)?cT({},r,{interactions:(0,tf.ev)((0,tf.ev)([],void 0===n?[]:n,!0),[{type:"drill-down",cfg:{drillDownConfig:e,transformData:A1}}],!1)}):r)});var s=Aq(o,"view-zoom");return s&&(!1!==s.enable?i.getCanvas().on("mousewheel",function(t){t.preventDefault()}):i.getCanvas().off("mousewheel")),A0(r)&&(i.appendPadding=cy(i.appendPadding,(0,td.U2)(a,["breadCrumb","position"]))),t}function A4(t){return cd(A2,cJ,cX("rectStyle"),A5,A6,cK,cz,A3,c$,c1())(t)}!function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="sunburst",e}(0,tf.ZT)(e,t),e.getDefaultOptions=function(){return Ap},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Aj},e.SUNBURST_ANCESTOR_FIELD=Au,e.SUNBURST_PATH_FIELD=AE,e.NODE_ANCESTORS_FIELD=fm}(EE);var A8={colorField:"name",rectStyle:{lineWidth:1,stroke:"#fff"},hierarchyConfig:{tile:"treemapSquarify"},label:{fields:["name"],layout:{type:"limit-in-shape"}},tooltip:{showMarkers:!1,showTitle:!1},drilldown:{enabled:!1,breadCrumb:{position:"bottom-left",rootText:"初始",dividerText:"/",textStyle:{fontSize:12,fill:"rgba(0, 0, 0, 0.65)",cursor:"pointer"},activeTextStyle:{fill:"#87B5FF"}}}};!function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="treemap",e}(0,tf.ZT)(e,t),e.getDefaultOptions=function(){return A8},e.prototype.changeData=function(t){var e,n=this.options,i=n.colorField,r=n.interactions,o=n.hierarchyConfig;this.updateOption({data:t});var a=A1({data:t,colorField:i,enableDrillDown:AQ(r,"treemap-drill-down"),hierarchyConfig:o});this.chart.changeData(a),(e=this.chart.interactions["drill-down"])&&e.context.actions.find(function(t){return"drill-down-action"===t.name}).reset()},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return A4}}(EE);var A9="path",A7={appendPadding:[10,0,20,0],blendMode:"multiply",tooltip:{showTitle:!1,showMarkers:!1,fields:["id","size"],formatter:function(t){return{name:t.id,value:t.size}}},legend:{position:"top-left"},label:{style:{textAlign:"center",fill:"#fff"}},interactions:[{type:"legend-filter",enable:!1}],state:{active:{style:{stroke:"#000"}},selected:{style:{stroke:"#000",lineWidth:2}},inactive:{style:{fillOpacity:.3,strokeOpacity:.3}}},defaultInteractions:["tooltip","venn-legend-active"]};function St(t){t&&t.geometries[0].elements.forEach(function(t){t.shape.toFront()})}var Se=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.syncElementsPos=function(){St(this.context.view)},e.prototype.active=function(){t.prototype.active.call(this),this.syncElementsPos()},e.prototype.toggle=function(){t.prototype.toggle.call(this),this.syncElementsPos()},e.prototype.reset=function(){t.prototype.reset.call(this),this.syncElementsPos()},e}(rv("element-active")),Sn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.syncElementsPos=function(){St(this.context.view)},e.prototype.highlight=function(){t.prototype.highlight.call(this),this.syncElementsPos()},e.prototype.toggle=function(){t.prototype.toggle.call(this),this.syncElementsPos()},e.prototype.clear=function(){t.prototype.clear.call(this),this.syncElementsPos()},e.prototype.reset=function(){t.prototype.reset.call(this),this.syncElementsPos()},e}(rv("element-highlight")),Si=rv("element-selected"),Sr=rv("element-single-selected"),So=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.syncElementsPos=function(){St(this.context.view)},e.prototype.selected=function(){t.prototype.selected.call(this),this.syncElementsPos()},e.prototype.toggle=function(){t.prototype.toggle.call(this),this.syncElementsPos()},e.prototype.reset=function(){t.prototype.reset.call(this),this.syncElementsPos()},e}(Si),Sa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.syncElementsPos=function(){St(this.context.view)},e.prototype.selected=function(){t.prototype.selected.call(this),this.syncElementsPos()},e.prototype.toggle=function(){t.prototype.toggle.call(this),this.syncElementsPos()},e.prototype.reset=function(){t.prototype.reset.call(this),this.syncElementsPos()},e}(Sr);rN("venn-element-active",Se),rN("venn-element-highlight",Sn),rN("venn-element-selected",So),rN("venn-element-single-selected",Sa),r4("venn-element-active",{start:[{trigger:"element:mouseenter",action:"venn-element-active:active"}],end:[{trigger:"element:mouseleave",action:"venn-element-active:reset"}]}),r4("venn-element-highlight",{start:[{trigger:"element:mouseenter",action:"venn-element-highlight:highlight"}],end:[{trigger:"element:mouseleave",action:"venn-element-highlight:reset"}]}),r4("venn-element-selected",{start:[{trigger:"element:click",action:"venn-element-selected:toggle"}],rollback:[{trigger:"dblclick",action:["venn-element-selected:reset"]}]}),r4("venn-element-single-selected",{start:[{trigger:"element:click",action:"venn-element-single-selected:toggle"}],rollback:[{trigger:"dblclick",action:["venn-element-single-selected:reset"]}]}),r4("venn-legend-active",{start:[{trigger:"legend-item:mouseenter",action:["list-active:active","venn-element-active:active"]}],end:[{trigger:"legend-item:mouseleave",action:["list-active:reset","venn-element-active:reset"]}]}),r4("venn-legend-highlight",{start:[{trigger:"legend-item:mouseenter",action:["legend-item-highlight:highlight","venn-element-highlight:highlight"]}],end:[{trigger:"legend-item:mouseleave",action:["legend-item-highlight:reset","venn-element-highlight:reset"]}]}),oY("venn",function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,tf.ZT)(e,t),e.prototype.getLabelPoint=function(t,e,n){var i=t.data,r=i.x,o=i.y,a=t.customLabelInfo,s=a.offsetX,l=a.offsetY;return{content:t.content[n],x:r+s,y:o+l}},e}(o4));var Ss=Array.isArray,Sl=" \n\v\f\r \xa0 \u2028\u2029",Su=RegExp("([a-z])["+Sl+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+Sl+"]*,?["+Sl+"]*)+)","ig"),Sc=RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+Sl+"]*,?["+Sl+"]*","ig");oz("schema","venn",{draw:function(t,e){var n=function(t){if(!t)return null;if(Ss(t))return t;var e={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},n=[];return String(t).replace(Su,function(t,i,r){var o=[],a=i.toLowerCase();if(r.replace(Sc,function(t,e){e&&o.push(+e)}),"m"===a&&o.length>2&&(n.push([i].concat(o.splice(0,2))),a="l",i="m"===i?"l":"L"),"o"===a&&1===o.length&&n.push([i,o[0]]),"r"===a)n.push([i].concat(o));else for(;o.length>=e[a]&&(n.push([i].concat(o.splice(0,e[a]))),e[a]););return""}),n}(t.data[A9]),i=cT({},t.defaultStyle,{fill:t.color},t.style),r=e.addGroup({name:"venn-shape"});r.addShape("path",{attrs:(0,tf.pi)((0,tf.pi)({},i),{path:n}),name:"venn-path"});var o=t.customInfo,a=o.offsetX,s=o.offsetY,l=ar.transform(null,[["t",a,s]]);return r.setMatrix(l),r},getMarker:function(t){var e=t.color;return{symbol:"circle",style:{lineWidth:0,stroke:e,fill:e,r:4}}}});var SE={normal:function(t){return t},multiply:function(t,e){return t*e/255},screen:function(t,e){return 255*(1-(1-t/255)*(1-e/255))},overlay:function(t,e){return e<128?2*t*e/255:255*(1-2*(1-t/255)*(1-e/255))},darken:function(t,e){return t>e?e:t},lighten:function(t,e){return t>e?t:e},dodge:function(t,e){return 255===t?255:(t=255*(e/255)/(1-t/255))>255?255:t},burn:function(t,e){return 255===e?255:0===t?0:255*(1-Math.min(1,(1-e/255)/(t/255)))}},Sh=function(t){if(!SE[t])throw Error("unknown blend mode "+t);return SE[t]};function Sp(t){var e,n=t.replace("/s+/g","");return"string"!=typeof n||n.startsWith("rgba")||n.startsWith("#")?(n.startsWith("rgba")&&(e=n.replace("rgba(","").replace(")","").split(",")),n.startsWith("#")&&(e=tQ.rgb2arr(n).concat([1])),e.map(function(t,e){return 3===e?Number(t):0|t})):tQ.rgb2arr(tQ.toRGB(n)).concat([1])}var ST=n(69916);function Sf(t,e){var n,i=function(t){for(var e=[],n=0;ne[n].radius+1e-10)return!1;return!0}(e,t)}),o=0,a=0,s=[];if(r.length>1){var l=Sg(r);for(n=0;n-1){var f=t[E.parentIndex[T]],d=Math.atan2(E.x-f.x,E.y-f.y),A=Math.atan2(c.x-f.x,c.y-f.y),S=A-d;S<0&&(S+=2*Math.PI);var R=A-S/2,g=SA(h,{x:f.x+f.radius*Math.sin(R),y:f.y+f.radius*Math.cos(R)});g>2*f.radius&&(g=2*f.radius),(null===p||p.width>g)&&(p={circle:f,width:g,p1:E,p2:c})}null!==p&&(s.push(p),o+=Sd(p.circle.radius,p.width),c=E)}}else{var I=t[0];for(n=1;nMath.abs(I.radius-t[n].radius)){O=!0;break}O?o=a=0:(o=I.radius*I.radius*Math.PI,s.push({circle:I,p1:{x:I.x,y:I.y+I.radius},p2:{x:I.x-1e-10,y:I.y+I.radius},width:2*I.radius}))}return a/=2,e&&(e.area=o+a,e.arcArea=o,e.polygonArea=a,e.arcs=s,e.innerPoints=r,e.intersectionPoints=i),o+a}function Sd(t,e){return t*t*Math.acos(1-e/t)-(t-e)*Math.sqrt(e*(2*t-e))}function SA(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}function SS(t,e,n){if(n>=t+e)return 0;if(n<=Math.abs(t-e))return Math.PI*Math.min(t,e)*Math.min(t,e);var i=t-(n*n-e*e+t*t)/(2*n),r=e-(n*n-t*t+e*e)/(2*n);return Sd(t,i)+Sd(e,r)}function SR(t,e){var n=SA(t,e),i=t.radius,r=e.radius;if(n>=i+r||n<=Math.abs(i-r))return[];var o=(i*i-r*r+n*n)/(2*n),a=Math.sqrt(i*i-o*o),s=t.x+o*(e.x-t.x)/n,l=t.y+o*(e.y-t.y)/n,u=-(e.y-t.y)*(a/n),c=-(e.x-t.x)*(a/n);return[{x:s+u,y:l-c},{x:s-u,y:l+c}]}function Sg(t){for(var e={x:0,y:0},n=0;n=Math.min(r[c].size,r[E].size)&&(u=0),o[c].push({set:E,size:l.size,weight:u}),o[E].push({set:c,size:l.size,weight:u})}var h=[];for(n in o)if(o.hasOwnProperty(n)){for(var p=0,a=0;a=8){var r=function(t,e){var n,i,r,o,a,s=(e=e||{}).restarts||10,l=[],u={};for(r=0;r=Math.min(l[e].size,l[r].size)?a=1:t.size<=1e-10&&(a=-1),i[e][r]=i[r][e]=a}),{distances:n,constraints:i}),h=E.distances,p=E.constraints,T=(0,ST.norm2)(h.map(ST.norm2))/h.length;h=h.map(function(t){return t.map(function(t){return t/T})});var f=function(t,e){return function(t,e,n,i){var r,o=0;for(r=0;r0&&T<=E||h<0&&T>=E||(o+=2*f*f,e[2*r]+=4*f*(a-u),e[2*r+1]+=4*f*(s-c),e[2*l]+=4*f*(u-a),e[2*l+1]+=4*f*(c-s))}return o}(t,e,h,p)};for(r=0;re?1:-1}),e=0;e