Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 

81 строка
694 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[7679],{64183:function(Lt,it,F){"use strict";var R=F(67294),Q=F(80529),gt=F(23185),ht=F(4322),ot=F(24770),rt=F(26119),J=function(d,c){var Z={};for(var T in d)Object.prototype.hasOwnProperty.call(d,T)&&c.indexOf(T)<0&&(Z[T]=d[T]);if(d!=null&&typeof Object.getOwnPropertySymbols=="function")for(var z=0,T=Object.getOwnPropertySymbols(d);z<T.length;z++)c.indexOf(T[z])<0&&Object.prototype.propertyIsEnumerable.call(d,T[z])&&(Z[T[z]]=d[T[z]]);return Z},$=(0,R.forwardRef)(function(d,c){var Z=d.chartRef,T=d.style,z=T===void 0?{height:"inherit"}:T,j=d.className,A=d.loading,D=d.loadingTemplate,V=d.errorTemplate,et=J(d,["chartRef","style","className","loading","loadingTemplate","errorTemplate"]),at=(0,gt.Z)(Q.uN,et),K=at.chart,At=at.container;return(0,R.useEffect)(function(){(0,ht.J)(Z,K.current)},[K.current]),(0,R.useImperativeHandle)(c,function(){return{getChart:function(){return K.current}}}),R.createElement(ot.Z,{errorTemplate:V},A&&R.createElement(rt.Z,{loadingTemplate:D,theme:d.theme}),R.createElement("div",{className:j,style:z,ref:At}))});it.Z=$},78677:function(Lt,it,F){"use strict";var R=F(67294),Q=F(80529),gt=F(23185),ht=F(4322),ot=F(24770),rt=F(26119),J=function(d,c){var Z={};for(var T in d)Object.prototype.hasOwnProperty.call(d,T)&&c.indexOf(T)<0&&(Z[T]=d[T]);if(d!=null&&typeof Object.getOwnPropertySymbols=="function")for(var z=0,T=Object.getOwnPropertySymbols(d);z<T.length;z++)c.indexOf(T[z])<0&&Object.prototype.propertyIsEnumerable.call(d,T[z])&&(Z[T[z]]=d[T[z]]);return Z},$=(0,R.forwardRef)(function(d,c){var Z=d.chartRef,T=d.style,z=T===void 0?{height:"inherit"}:T,j=d.className,A=d.loading,D=d.loadingTemplate,V=d.errorTemplate,et=J(d,["chartRef","style","className","loading","loadingTemplate","errorTemplate"]),at=(0,gt.Z)(Q.sg,et),K=at.chart,At=at.container;return(0,R.useEffect)(function(){(0,ht.J)(Z,K.current)},[K.current]),(0,R.useImperativeHandle)(c,function(){return{getChart:function(){return K.current}}}),R.createElement(ot.Z,{errorTemplate:V},A&&R.createElement(rt.Z,{loadingTemplate:D,theme:d.theme}),R.createElement("div",{className:j,style:z,ref:At}))});it.Z=$},80652:function(Lt,it,F){"use strict";var R=F(67294),Q=F(80529),gt=F(23185),ht=F(4322),ot=F(24770),rt=F(26119),J=function(d,c){var Z={};for(var T in d)Object.prototype.hasOwnProperty.call(d,T)&&c.indexOf(T)<0&&(Z[T]=d[T]);if(d!=null&&typeof Object.getOwnPropertySymbols=="function")for(var z=0,T=Object.getOwnPropertySymbols(d);z<T.length;z++)c.indexOf(T[z])<0&&Object.prototype.propertyIsEnumerable.call(d,T[z])&&(Z[T[z]]=d[T[z]]);return Z},$=(0,R.forwardRef)(function(d,c){var Z=d.chartRef,T=d.style,z=T===void 0?{height:"inherit"}:T,j=d.className,A=d.loading,D=d.loadingTemplate,V=d.errorTemplate,et=J(d,["chartRef","style","className","loading","loadingTemplate","errorTemplate"]),at=(0,gt.Z)(Q.x1,et),K=at.chart,At=at.container;return(0,R.useEffect)(function(){(0,ht.J)(Z,K.current)},[K.current]),(0,R.useImperativeHandle)(c,function(){return{getChart:function(){return K.current}}}),R.createElement(ot.Z,{errorTemplate:V},A&&R.createElement(rt.Z,{loadingTemplate:D,theme:d.theme}),R.createElement("div",{className:j,style:z,ref:At}))});it.Z=$},63430:function(Lt,it,F){"use strict";var R=F(67294),Q=F(80529),gt=F(23185),ht=F(4322),ot=F(24770),rt=F(26119),J=function(d,c){var Z={};for(var T in d)Object.prototype.hasOwnProperty.call(d,T)&&c.indexOf(T)<0&&(Z[T]=d[T]);if(d!=null&&typeof Object.getOwnPropertySymbols=="function")for(var z=0,T=Object.getOwnPropertySymbols(d);z<T.length;z++)c.indexOf(T[z])<0&&Object.prototype.propertyIsEnumerable.call(d,T[z])&&(Z[T[z]]=d[T[z]]);return Z},$=(0,R.forwardRef)(function(d,c){var Z=d.chartRef,T=d.style,z=T===void 0?{height:"inherit"}:T,j=d.className,A=d.loading,D=d.loadingTemplate,V=d.errorTemplate,et=J(d,["chartRef","style","className","loading","loadingTemplate","errorTemplate"]),at=(0,gt.Z)(Q.by,et),K=at.chart,At=at.container;return(0,R.useEffect)(function(){(0,ht.J)(Z,K.current)},[K.current]),(0,R.useImperativeHandle)(c,function(){return{getChart:function(){return K.current}}}),R.createElement(ot.Z,{errorTemplate:V},A&&R.createElement(rt.Z,{loadingTemplate:D,theme:d.theme}),R.createElement("div",{className:j,style:z,ref:At}))});it.Z=$},24770:function(Lt,it,F){"use strict";var R=F(67294),Q=function(){var ht=function(ot,rt){return ht=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,$){J.__proto__=$}||function(J,$){for(var d in $)Object.prototype.hasOwnProperty.call($,d)&&(J[d]=$[d])},ht(ot,rt)};return function(ot,rt){if(typeof rt!="function"&&rt!==null)throw new TypeError("Class extends value "+String(rt)+" is not a constructor or null");ht(ot,rt);function J(){this.constructor=ot}ot.prototype=rt===null?Object.create(rt):(J.prototype=rt.prototype,new J)}}(),gt=function(ht){Q(ot,ht);function ot(){var rt=ht!==null&&ht.apply(this,arguments)||this;return rt.state={hasError:!1},rt.renderError=function(J){var $=rt.props.errorTemplate;switch(J){default:return $&&typeof $=="function"?$(J):R.createElement("h5",null,"\u7EC4\u4EF6\u51FA\u9519\u4E86\uFF0C\u8BF7\u6838\u67E5\u540E\u91CD\u8BD5\uFF1A ",J.message)}},rt}return ot.getDerivedStateFromError=function(rt){return{hasError:!0,error:rt}},ot.getDerivedStateFromProps=function(rt,J){return J.children!==rt.children?{children:rt.children,hasError:!1,error:void 0}:null},ot.prototype.render=function(){return this.state.hasError?this.renderError(this.state.error):R.createElement(R.Fragment,null,this.props.children)},ot}(R.Component);it.Z=gt},23185:function(Lt,it,F){"use strict";F.d(it,{Z:function(){return j}});var R=F(67294),Q=F(49242),gt=F(73935),ht=function(A,D){var V=document.createElement("div");return D==="tooltip"&&(V.className="g2-tooltip"),gt.render(A,V),V},ot=ht,rt=function(A,D){var V={}.toString;return V.call(A)==="[object ".concat(D,"]")},J=function(A){if(!A)return A;var D={};for(var V in A)D[V]=A[V];return D},$=function(A){return Object.prototype.toString.call(A).slice(8,-1)},d=function(A){if(!A||typeof A!="object")return A;var D;return Array.isArray(A)?D=A.map(function(V){return d(V)}):(D={},Object.keys(A).forEach(function(V){return D[V]=d(A[V])})),D},c=function(A,D){for(var V=A,et=0;et<D.length;et+=1)if(V==null?void 0:V[D[et]])V=V[D[et]];else{V=void 0;break}return V},Z=function(A,D,V){if(!A)return A;var et=A;return D.forEach(function(at,K){K<D.length-1?et=et[at]:et[at]=V}),A},T=function(){return T=Object.assign||function(A){for(var D,V=1,et=arguments.length;V<et;V++){D=arguments[V];for(var at in D)Object.prototype.hasOwnProperty.call(D,at)&&(A[at]=D[at])}return A},T.apply(this,arguments)},z=function(A,D){var V={};for(var et in A)Object.prototype.hasOwnProperty.call(A,et)&&D.indexOf(et)<0&&(V[et]=A[et]);if(A!=null&&typeof Object.getOwnPropertySymbols=="function")for(var at=0,et=Object.getOwnPropertySymbols(A);at<et.length;at++)D.indexOf(et[at])<0&&Object.prototype.propertyIsEnumerable.call(A,et[at])&&(V[et[at]]=A[et[at]]);return V};function j(A,D){var V=(0,R.useRef)(),et=(0,R.useRef)(),at=(0,R.useRef)(null),K=D.onReady,At=D.onEvent,Ht=function(bt,E){var k;return bt===void 0&&(bt="image/png"),(k=V.current)===null||k===void 0?void 0:k.chart.canvas.cfg.el.toDataURL(bt,E)},$t=function(bt,E,k){var Y;bt===void 0&&(bt="download"),E===void 0&&(E="image/png");var W=bt;bt.indexOf(".")===-1&&(W="".concat(bt,".").concat(E.split("/")[1]));var N=(Y=V.current)===null||Y===void 0?void 0:Y.chart.canvas.cfg.el.toDataURL(E,k),P=document.createElement("a");return P.href=N,P.download=W,document.body.appendChild(P),P.click(),document.body.removeChild(P),P=null,W},Yt=function(bt,E,k){var Y=c(bt,E);Z(bt,E,function(){for(var W=[],N=0;N<arguments.length;N++)W[N]=arguments[N];var P=rt(Y,"Function")?Y.apply(void 0,W):Y;return rt(P,"String")||rt(P,"Number")||rt(P,"HTMLDivElement")?P:ot(P,k)})},re=function(){c(D,["statistic","content","customHtml"])&&Yt(D,["statistic","content","customHtml"]),c(D,["statistic","title","customHtml"])&&Yt(D,["statistic","title","customHtml"]),typeof D.tooltip=="object"&&(c(D,["tooltip","container"])&&Yt(D,["tooltip","container"],"tooltip"),c(D,["tooltip","customContent"])&&Yt(D,["tooltip","customContent"],"tooltip"))};return(0,R.useEffect)(function(){if(V.current&&!(0,Q.isEqual)(et.current,D)){var bt=!1;if(et.current){var E=et.current,k=E.data,Y=E.value,W=E.percent,N=z(E,["data","value","percent"]),P=D.data,X=D.value,U=D.percent,st=z(D,["data","value","percent"]);bt=(0,Q.isEqual)(N,st)}if(et.current=d(D),bt&&(0,Q.get)(D,"chartType")!=="Mix"){var vt="data",dt=["percent"],Pt=Object.keys(D);dt.forEach(function(St){Pt.includes(St)&&(vt=St)}),V.current.changeData((D==null?void 0:D[vt])||[])}else re(),V.current.update(D)}},[D]),(0,R.useEffect)(function(){if(!at.current)return function(){return null};et.current||(et.current=d(D)),re();var bt=new A(at.current,T({},D));bt.toDataURL=function(k,Y){return Ht(k,Y)},bt.downloadImage=function(k,Y,W){return $t(k,Y,W)},bt.render(),V.current=J(bt),K&&K(bt);var E=function(k){At&&At(bt,k)};return bt.on("*",E),function(){V.current&&(V.current.destroy(),V.current.off("*",E),V.current=void 0)}},[]),{chart:V,container:at}}},26119:function(Lt,it,F){"use strict";var R=F(67294),Q=F(24561),gt=function(ht){var ot=ht.loadingTemplate,rt=ht.theme,J=rt===void 0?"light":rt,$=function(){return ot||R.createElement(Q.ZP,{viewBox:"0 0 400 180",width:200,height:90,speed:1,backgroundColor:J==="dark"?"#262626":"#D9D9D9"},R.createElement("rect",{x:"20",y:"5",rx:"0",ry:"0",width:"1",height:"170"}),R.createElement("rect",{x:"20",y:"175",rx:"0",ry:"0",width:"360",height:"1"}),R.createElement("rect",{x:"40",y:"75",rx:"0",ry:"0",width:"35",height:"100"}),R.createElement("rect",{x:"80",y:"125",rx:"0",ry:"0",width:"35",height:"50"}),R.createElement("rect",{x:"120",y:"105",rx:"0",ry:"0",width:"35",height:"70"}),R.createElement("rect",{x:"160",y:"35",rx:"0",ry:"0",width:"35",height:"140"}),R.createElement("rect",{x:"200",y:"55",rx:"0",ry:"0",width:"35",height:"120"}),R.createElement("rect",{x:"240",y:"15",rx:"0",ry:"0",width:"35",height:"160"}),R.createElement("rect",{x:"280",y:"135",rx:"0",ry:"0",width:"35",height:"40"}),R.createElement("rect",{x:"320",y:"85",rx:"0",ry:"0",width:"35",height:"90"}))};return R.createElement("div",{className:"charts-loading-container",style:{position:"absolute",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",left:0,top:0,zIndex:99,backgroundColor:J==="dark"?"rgb(20, 20, 20)":"rgb(255, 255, 255)"}},$())};it.Z=gt},4322:function(Lt,it,F){"use strict";F.d(it,{J:function(){return Q}});var R=F(49242),Q=function(gt,ht){!gt||((0,R.isFunction)(gt)?gt(ht):gt.current=ht)}},80529:function(Lt,it,F){"use strict";F.d(it,{uN:function(){return uh},sg:function(){return vh},x1:function(){return oh},by:function(){return _h}});var R={};F.r(R),F.d(R,{Arc:function(){return Vd},DataMarker:function(){return jd},DataRegion:function(){return Zd},Html:function(){return ag},Image:function(){return Yd},Line:function(){return Bd},Region:function(){return Wd},RegionFilter:function(){return qd},Shape:function(){return Qd},Text:function(){return Nd}});var Q={};F.r(Q),F.d(Q,{ellipsisHead:function(){return lg},ellipsisMiddle:function(){return ug},ellipsisTail:function(){return _l},getDefault:function(){return sg}});var gt={};F.r(gt),F.d(gt,{equidistance:function(){return Sl},equidistanceWithReverseBoth:function(){return gg},getDefault:function(){return hg},reserveBoth:function(){return dg},reserveFirst:function(){return fg},reserveLast:function(){return vg}});var ht={};F.r(ht),F.d(ht,{fixedAngle:function(){return Al},getDefault:function(){return yg},unfixedAngle:function(){return mg}});var ot={};F.r(ot),F.d(ot,{autoEllipsis:function(){return Q},autoHide:function(){return gt},autoRotate:function(){return ht}});var rt={};F.r(rt),F.d(rt,{Base:function(){return io},Circle:function(){return Fg},Html:function(){return Tg},Line:function(){return Fl}});var J={};F.r(J),F.d(J,{CONTAINER_CLASS:function(){return or},CROSSHAIR_X:function(){return uo},CROSSHAIR_Y:function(){return co},LIST_CLASS:function(){return Wi},LIST_ITEM_CLASS:function(){return Ln},MARKER_CLASS:function(){return In},NAME_CLASS:function(){return Il},TITLE_CLASS:function(){return sr},VALUE_CLASS:function(){return On}});var $={};F.r($),F.d($,{cluster:function(){return AE},hierarchy:function(){return bi},pack:function(){return Xf},packEnclose:function(){return Nf},packSiblings:function(){return IE},partition:function(){return Pf},stratify:function(){return RE},tree:function(){return HE},treemap:function(){return Qf},treemapBinary:function(){return YE},treemapDice:function(){return mn},treemapResquarify:function(){return jE},treemapSlice:function(){return Da},treemapSliceDice:function(){return XE},treemapSquarify:function(){return $f}});var d=F(70655),c=F(49242),Z;(function(e){e.FORE="fore",e.MID="mid",e.BG="bg"})(Z||(Z={}));var T;(function(e){e.TOP="top",e.TOP_LEFT="top-left",e.TOP_RIGHT="top-right",e.RIGHT="right",e.RIGHT_TOP="right-top",e.RIGHT_BOTTOM="right-bottom",e.LEFT="left",e.LEFT_TOP="left-top",e.LEFT_BOTTOM="left-bottom",e.BOTTOM="bottom",e.BOTTOM_LEFT="bottom-left",e.BOTTOM_RIGHT="bottom-right",e.RADIUS="radius",e.CIRCLE="circle",e.NONE="none"})(T||(T={}));var z;(function(e){e.AXIS="axis",e.GRID="grid",e.LEGEND="legend",e.TOOLTIP="tooltip",e.ANNOTATION="annotation",e.SLIDER="slider",e.SCROLLBAR="scrollbar",e.OTHER="other"})(z||(z={}));var j={FORE:3,MID:2,BG:1},A;(function(e){e.BEFORE_RENDER="beforerender",e.AFTER_RENDER="afterrender",e.BEFORE_PAINT="beforepaint",e.AFTER_PAINT="afterpaint",e.BEFORE_CHANGE_DATA="beforechangedata",e.AFTER_CHANGE_DATA="afterchangedata",e.BEFORE_CLEAR="beforeclear",e.AFTER_CLEAR="afterclear",e.BEFORE_DESTROY="beforedestroy",e.BEFORE_CHANGE_SIZE="beforechangesize",e.AFTER_CHANGE_SIZE="afterchangesize"})(A||(A={}));var D;(function(e){e.BEFORE_DRAW_ANIMATE="beforeanimate",e.AFTER_DRAW_ANIMATE="afteranimate",e.BEFORE_RENDER_LABEL="beforerenderlabel",e.AFTER_RENDER_LABEL="afterrenderlabel"})(D||(D={}));var V;(function(e){e.MOUSE_ENTER="plot:mouseenter",e.MOUSE_DOWN="plot:mousedown",e.MOUSE_MOVE="plot:mousemove",e.MOUSE_UP="plot:mouseup",e.MOUSE_LEAVE="plot:mouseleave",e.TOUCH_START="plot:touchstart",e.TOUCH_MOVE="plot:touchmove",e.TOUCH_END="plot:touchend",e.TOUCH_CANCEL="plot:touchcancel",e.CLICK="plot:click",e.DBLCLICK="plot:dblclick",e.CONTEXTMENU="plot:contextmenu",e.LEAVE="plot:leave",e.ENTER="plot:enter"})(V||(V={}));var et;(function(e){e.ACTIVE="active",e.INACTIVE="inactive",e.SELECTED="selected",e.DEFAULT="default"})(et||(et={}));var at=["color","shape","size"],K="_origin",At=1,Ht=1,$t=.25,Yt={};function re(e){var r=Yt[e];if(!r)throw new Error("G engine '".concat(e,"' is not exist, please register it at first."));return r}function bt(e,r){Yt[e]=r}var E=F(6056),k=F(45442);function Y(e){var r=getComputedStyle(e);return{width:(e.clientWidth||parseInt(r.width,10))-parseInt(r.paddingLeft,10)-parseInt(r.paddingRight,10),height:(e.clientHeight||parseInt(r.height,10))-parseInt(r.paddingTop,10)-parseInt(r.paddingBottom,10)}}function W(e){return typeof e=="number"&&!isNaN(e)}function N(e,r,t,i){var n=t,a=i;if(r){var o=Y(e);n=o.width?o.width:n,a=o.height?o.height:a}return{width:Math.max(W(n)?n:At,At),height:Math.max(W(a)?a:Ht,Ht)}}function P(e){var r=e.parentNode;r&&r.removeChild(e)}var X=F(90494),U=function(e){(0,d.__extends)(r,e);function r(t){var i=e.call(this)||this;i.destroyed=!1;var n=t.visible,a=n===void 0?!0:n;return i.visible=a,i}return r.prototype.show=function(){var t=this.visible;t||this.changeVisible(!0)},r.prototype.hide=function(){var t=this.visible;t&&this.changeVisible(!1)},r.prototype.destroy=function(){this.off(),this.destroyed=!0},r.prototype.changeVisible=function(t){this.visible!==t&&(this.visible=t)},r}(X.Z),st=U,vt=F(3232),dt=0,Pt=1/2,St=1/2,Ft=.05,pt=function(){function e(r){var t=r.xField,i=r.yField,n=r.adjustNames,a=n===void 0?["x","y"]:n,o=r.dimValuesMap;this.adjustNames=a,this.xField=t,this.yField=i,this.dimValuesMap=o}return e.prototype.isAdjust=function(r){return this.adjustNames.indexOf(r)>=0},e.prototype.getAdjustRange=function(r,t,i){var n=this.yField,a=i.indexOf(t),o=i.length,s,l;return!n&&this.isAdjust("y")?(s=0,l=1):o>1?(s=i[a===0?0:a-1],l=i[a===o-1?o-1:a+1],a!==0?s+=(t-s)/2:s-=(l-t)/2,a!==o-1?l-=(l-t)/2:l+=(t-i[o-2])/2):(s=t===0?0:t-.5,l=t===0?1:t+.5),{pre:s,next:l}},e.prototype.adjustData=function(r,t){var i=this,n=this.getDimValues(t);c.each(r,function(a,o){c.each(n,function(s,l){i.adjustDim(l,s,a,o)})})},e.prototype.groupData=function(r,t){return c.each(r,function(i){i[t]===void 0&&(i[t]=dt)}),c.groupBy(r,t)},e.prototype.adjustDim=function(r,t,i,n){},e.prototype.getDimValues=function(r){var t=this,i=t.xField,n=t.yField,a=c.assign({},this.dimValuesMap),o=[];if(i&&this.isAdjust("x")&&o.push(i),n&&this.isAdjust("y")&&o.push(n),o.forEach(function(l){a&&a[l]||(a[l]=c.valuesOfKey(r,l).sort(function(u,h){return u-h}))}),!n&&this.isAdjust("y")){var s="y";a[s]=[dt,1]}return a},e}(),ut=pt,Dt={},It=function(e){return Dt[e.toLowerCase()]},Ct=function(e,r){if(It(e))throw new Error("Adjust type '"+e+"' existed.");Dt[e.toLowerCase()]=r};/*! *****************************************************************************
  2. Copyright (c) Microsoft Corporation.
  3. Permission to use, copy, modify, and/or distribute this software for any
  4. purpose with or without fee is hereby granted.
  5. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
  6. REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  7. AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
  8. INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  9. LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  10. OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  11. PERFORMANCE OF THIS SOFTWARE.
  12. ***************************************************************************** */var kt=function(r,t){return kt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var a in n)n.hasOwnProperty(a)&&(i[a]=n[a])},kt(r,t)};function Nt(e,r){kt(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}var Xt=function(){return Xt=Object.assign||function(t){for(var i,n=1,a=arguments.length;n<a;n++){i=arguments[n];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o])}return t},Xt.apply(this,arguments)};function Jt(e,r){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&r.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,i=Object.getOwnPropertySymbols(e);n<i.length;n++)r.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(t[i[n]]=e[i[n]]);return t}function me(e,r,t,i){var n=arguments.length,a=n<3?r:i===null?i=Object.getOwnPropertyDescriptor(r,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,r,t,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(r,t,a):o(r,t))||a);return n>3&&a&&Object.defineProperty(r,t,a),a}function fe(e,r){return function(t,i){r(t,i,e)}}function ge(e,r){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,r)}function xe(e,r,t,i){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(h){try{u(i.next(h))}catch(f){o(f)}}function l(h){try{u(i.throw(h))}catch(f){o(f)}}function u(h){h.done?a(h.value):n(h.value).then(s,l)}u((i=i.apply(e,r||[])).next())})}function ve(e,r){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,n,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(u){return function(h){return l([u,h])}}function l(u){if(i)throw new TypeError("Generator is already executing.");for(;t;)try{if(i=1,n&&(a=u[0]&2?n.return:u[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,u[1])).done)return a;switch(n=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return t.label++,{value:u[1],done:!1};case 5:t.label++,n=u[1],u=[0];continue;case 7:u=t.ops.pop(),t.trys.pop();continue;default:if(a=t.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){t.label=u[1];break}if(u[0]===6&&t.label<a[1]){t.label=a[1],a=u;break}if(a&&t.label<a[2]){t.label=a[2],t.ops.push(u);break}a[2]&&t.ops.pop(),t.trys.pop();continue}u=r.call(e,t)}catch(h){u=[6,h],n=0}finally{i=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function De(e,r,t,i){i===void 0&&(i=t),e[i]=r[t]}function _e(e,r){for(var t in e)t!=="default"&&!r.hasOwnProperty(t)&&(r[t]=e[t])}function de(e){var r=typeof Symbol=="function"&&Symbol.iterator,t=r&&e[r],i=0;if(t)return t.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function pe(e,r){var t=typeof Symbol=="function"&&e[Symbol.iterator];if(!t)return e;var i=t.call(e),n,a=[],o;try{for(;(r===void 0||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(s){o={error:s}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a}function ke(){for(var e=[],r=0;r<arguments.length;r++)e=e.concat(pe(arguments[r]));return e}function We(){for(var e=0,r=0,t=arguments.length;r<t;r++)e+=arguments[r].length;for(var i=Array(e),n=0,r=0;r<t;r++)for(var a=arguments[r],o=0,s=a.length;o<s;o++,n++)i[n]=a[o];return i}function ei(e){return this instanceof ei?(this.v=e,this):new ei(e)}function Wa(e,r,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=t.apply(e,r||[]),n,a=[];return n={},o("next"),o("throw"),o("return"),n[Symbol.asyncIterator]=function(){return this},n;function o(v){i[v]&&(n[v]=function(g){return new Promise(function(p,y){a.push([v,g,p,y])>1||s(v,g)})})}function s(v,g){try{l(i[v](g))}catch(p){f(a[0][3],p)}}function l(v){v.value instanceof ei?Promise.resolve(v.value.v).then(u,h):f(a[0][2],v)}function u(v){s("next",v)}function h(v){s("throw",v)}function f(v,g){v(g),a.shift(),a.length&&s(a[0][0],a[0][1])}}function el(e){var r,t;return r={},i("next"),i("throw",function(n){throw n}),i("return"),r[Symbol.iterator]=function(){return this},r;function i(n,a){r[n]=e[n]?function(o){return(t=!t)?{value:ei(e[n](o)),done:n==="return"}:a?a(o):o}:a}}function rl(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=e[Symbol.asyncIterator],t;return r?r.call(e):(e=typeof de=="function"?de(e):e[Symbol.iterator](),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(a){t[a]=e[a]&&function(o){return new Promise(function(s,l){o=e[a](o),n(s,l,o.done,o.value)})}}function n(a,o,s,l){Promise.resolve(l).then(function(u){a({value:u,done:s})},o)}}function Ha(e,r){return Object.defineProperty?Object.defineProperty(e,"raw",{value:r}):e.raw=r,e}function Mi(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)Object.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r.default=e,r}function Ti(e){return e&&e.__esModule?e:{default:e}}function Ya(e,r){if(!r.has(e))throw new TypeError("attempted to get private field on non-instance");return r.get(e)}function ST(e,r,t){if(!r.has(e))throw new TypeError("attempted to set private field on non-instance");return r.set(e,t),t}var Ov=function(e){Nt(r,e);function r(t){var i=e.call(this,t)||this;i.cacheMap={},i.adjustDataArray=[],i.mergeData=[];var n=t.marginRatio,a=n===void 0?Pt:n,o=t.dodgeRatio,s=o===void 0?St:o,l=t.dodgeBy,u=t.intervalPadding,h=t.dodgePadding,f=t.xDimensionLength,v=t.groupNum,g=t.defaultSize,p=t.maxColumnWidth,y=t.minColumnWidth,m=t.columnWidthRatio,x=t.customOffset;return i.marginRatio=a,i.dodgeRatio=s,i.dodgeBy=l,i.intervalPadding=u,i.dodgePadding=h,i.xDimensionLegenth=f,i.groupNum=v,i.defaultSize=g,i.maxColumnWidth=p,i.minColumnWidth=y,i.columnWidthRatio=m,i.customOffset=x,i}return r.prototype.process=function(t){var i=c.clone(t),n=c.flatten(i),a=this.dodgeBy,o=a?c.group(n,a):i;return this.cacheMap={},this.adjustDataArray=o,this.mergeData=n,this.adjustData(o,n),this.adjustDataArray=[],this.mergeData=[],i},r.prototype.adjustDim=function(t,i,n,a){var o=this,s=this.customOffset,l=this.getDistribution(t),u=this.groupData(n,t);return c.each(u,function(h,f){var v;i.length===1?v={pre:i[0]-1,next:i[0]+1}:v=o.getAdjustRange(t,parseFloat(f),i),c.each(h,function(g){var p=g[t],y=l[p],m=y.indexOf(a);if(c.isNil(s))g[t]=o.getDodgeOffset(v,m,y.length);else{var x=v.pre,_=v.next;g[t]=c.isFunction(s)?s(g,v):(x+_)/2+s}})}),[]},r.prototype.getDodgeOffset=function(t,i,n){var a=this,o=a.dodgeRatio,s=a.marginRatio,l=a.intervalPadding,u=a.dodgePadding,h=t.pre,f=t.next,v=f-h,g;if(!c.isNil(l)&&c.isNil(u)&&l>=0){var p=this.getIntervalOnlyOffset(n,i);g=h+p}else if(!c.isNil(u)&&c.isNil(l)&&u>=0){var p=this.getDodgeOnlyOffset(n,i);g=h+p}else if(!c.isNil(l)&&!c.isNil(u)&&l>=0&&u>=0){var p=this.getIntervalAndDodgeOffset(n,i);g=h+p}else{var y=v*o/n,m=s*y,p=1/2*(v-n*y-(n-1)*m)+((i+1)*y+i*m)-1/2*y-1/2*v;g=(h+f)/2+p}return g},r.prototype.getIntervalOnlyOffset=function(t,i){var n=this,a=n.defaultSize,o=n.intervalPadding,s=n.xDimensionLegenth,l=n.groupNum,u=n.dodgeRatio,h=n.maxColumnWidth,f=n.minColumnWidth,v=n.columnWidthRatio,g=o/s,p=(1-(l-1)*g)/l*u/(t-1),y=((1-g*(l-1))/l-p*(t-1))/t;if(y=c.isNil(v)?y:1/l/t*v,!c.isNil(h)){var m=h/s;y=Math.min(y,m)}if(!c.isNil(f)){var x=f/s;y=Math.max(y,x)}y=a?a/s:y,p=((1-(l-1)*g)/l-t*y)/(t-1);var _=((1/2+i)*y+i*p+1/2*g)*l-g/2;return _},r.prototype.getDodgeOnlyOffset=function(t,i){var n=this,a=n.defaultSize,o=n.dodgePadding,s=n.xDimensionLegenth,l=n.groupNum,u=n.marginRatio,h=n.maxColumnWidth,f=n.minColumnWidth,v=n.columnWidthRatio,g=o/s,p=1*u/(l-1),y=((1-p*(l-1))/l-g*(t-1))/t;if(y=v?1/l/t*v:y,!c.isNil(h)){var m=h/s;y=Math.min(y,m)}if(!c.isNil(f)){var x=f/s;y=Math.max(y,x)}y=a?a/s:y,p=(1-(y*t+g*(t-1))*l)/(l-1);var _=((1/2+i)*y+i*g+1/2*p)*l-p/2;return _},r.prototype.getIntervalAndDodgeOffset=function(t,i){var n=this,a=n.intervalPadding,o=n.dodgePadding,s=n.xDimensionLegenth,l=n.groupNum,u=a/s,h=o/s,f=((1-u*(l-1))/l-h*(t-1))/t,v=((1/2+i)*f+i*h+1/2*u)*l-u/2;return v},r.prototype.getDistribution=function(t){var i=this.adjustDataArray,n=this.cacheMap,a=n[t];return a||(a={},c.each(i,function(o,s){var l=c.valuesOfKey(o,t);l.length||l.push(0),c.each(l,function(u){a[u]||(a[u]=[]),a[u].push(s)})}),n[t]=a),a},r}(ut),Pv=Ov;function Dv(e,r){return(r-e)*Math.random()+e}var kv=function(e){Nt(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.process=function(t){var i=c.clone(t),n=c.flatten(i);return this.adjustData(i,n),i},r.prototype.adjustDim=function(t,i,n){var a=this,o=this.groupData(n,t);return c.each(o,function(s,l){return a.adjustGroup(s,t,parseFloat(l),i)})},r.prototype.getAdjustOffset=function(t){var i=t.pre,n=t.next,a=(n-i)*Ft;return Dv(i+a,n-a)},r.prototype.adjustGroup=function(t,i,n,a){var o=this,s=this.getAdjustRange(i,n,a);return c.each(t,function(l){l[i]=o.getAdjustOffset(s)}),t},r}(ut),Bv=kv,Xa=c.Cache,Rv=function(e){Nt(r,e);function r(t){var i=e.call(this,t)||this,n=t.adjustNames,a=n===void 0?["y"]:n,o=t.height,s=o===void 0?NaN:o,l=t.size,u=l===void 0?10:l,h=t.reverseOrder,f=h===void 0?!1:h;return i.adjustNames=a,i.height=s,i.size=u,i.reverseOrder=f,i}return r.prototype.process=function(t){var i=this,n=i.yField,a=i.reverseOrder,o=n?this.processStack(t):this.processOneDimStack(t);return a?this.reverse(o):o},r.prototype.reverse=function(t){return t.slice(0).reverse()},r.prototype.processStack=function(t){var i=this,n=i.xField,a=i.yField,o=i.reverseOrder,s=o?this.reverse(t):t,l=new Xa,u=new Xa;return s.map(function(h){return h.map(function(f){var v,g=c.get(f,n,0),p=c.get(f,[a]),y=g.toString();if(p=c.isArray(p)?p[1]:p,!c.isNil(p)){var m=p>=0?l:u;m.has(y)||m.set(y,0);var x=m.get(y),_=p+x;return m.set(y,_),Xt(Xt({},f),(v={},v[a]=[x,_],v))}return f})})},r.prototype.processOneDimStack=function(t){var i=this,n=this,a=n.xField,o=n.height,s=n.reverseOrder,l="y",u=s?this.reverse(t):t,h=new Xa;return u.map(function(f){return f.map(function(v){var g,p=i.size,y=v[a],m=p*2/o;h.has(y)||h.set(y,m/2);var x=h.get(y);return h.set(y,x+m),Xt(Xt({},v),(g={},g[l]=x,g))})})},r}(ut),Nv=Rv,zv=function(e){Nt(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.process=function(t){var i=c.flatten(t),n=this,a=n.xField,o=n.yField,s=this.getXValuesMaxMap(i),l=Math.max.apply(Math,Object.keys(s).map(function(u){return s[u]}));return c.map(t,function(u){return c.map(u,function(h){var f,v,g=h[o],p=h[a];if(c.isArray(g)){var y=(l-s[p])/2;return Xt(Xt({},h),(f={},f[o]=c.map(g,function(x){return y+x}),f))}var m=(l-g)/2;return Xt(Xt({},h),(v={},v[o]=[m,g+m],v))})})},r.prototype.getXValuesMaxMap=function(t){var i=this,n=this,a=n.xField,o=n.yField,s=c.groupBy(t,function(l){return l[a]});return c.mapValues(s,function(l){return i.getDimMaxValue(l,o)})},r.prototype.getDimMaxValue=function(t,i){var n=c.map(t,function(o){return c.get(o,i,[])}),a=c.flatten(n);return Math.max.apply(Math,a)},r}(ut),Vv=zv;Ct("Dodge",Pv),Ct("Jitter",Bv),Ct("Stack",Nv),Ct("Symmetric",Vv);var il=function(e,r){return(0,c.isString)(r)?r:e.invert(e.scale(r))},Gv=function(){function e(r){this.names=[],this.scales=[],this.linear=!1,this.values=[],this.callback=function(){return[]},this._parseCfg(r)}return e.prototype.mapping=function(){for(var r=this,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var n=t.map(function(a,o){return r._toOriginParam(a,r.scales[o])});return this.callback.apply(this,n)},e.prototype.getLinearValue=function(r){var t=this.values.length-1,i=Math.floor(t*r),n=t*r-i,a=this.values[i],o=i===t?a:this.values[i+1];return a+(o-a)*n},e.prototype.getNames=function(){for(var r=this.scales,t=this.names,i=Math.min(r.length,t.length),n=[],a=0;a<i;a+=1)n.push(t[a]);return n},e.prototype.getFields=function(){return this.scales.map(function(r){return r.field})},e.prototype.getScale=function(r){return this.scales[this.names.indexOf(r)]},e.prototype.defaultCallback=function(){for(var r=this,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return t.length===0?this.values:t.map(function(n,a){var o=r.scales[a];return o.type==="identity"?o.values[0]:r._getAttributeValue(o,n)})},e.prototype._parseCfg=function(r){var t=this,i=r.type,n=i===void 0?"base":i,a=r.names,o=a===void 0?[]:a,s=r.scales,l=s===void 0?[]:s,u=r.values,h=u===void 0?[]:u,f=r.callback;this.type=n,this.scales=l,this.values=h,this.names=o,this.callback=function(){for(var v=[],g=0;g<arguments.length;g++)v[g]=arguments[g];if(f){var p=f.apply(void 0,v);if(!(0,c.isNil)(p))return[p]}return t.defaultCallback.apply(t,v)}},e.prototype._getAttributeValue=function(r,t){if(r.isCategory&&!this.linear){var i=r.translate(t);return this.values[i%this.values.length]}var n=r.scale(t);return this.getLinearValue(n)},e.prototype._toOriginParam=function(r,t){return t.isLinear?r:(0,c.isArray)(r)?r.map(function(i){return il(t,i)}):il(t,r)},e}(),Li=Gv;/*! *****************************************************************************
  13. Copyright (c) Microsoft Corporation.
  14. Permission to use, copy, modify, and/or distribute this software for any
  15. purpose with or without fee is hereby granted.
  16. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
  17. REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  18. AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
  19. INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  20. LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  21. OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  22. PERFORMANCE OF THIS SOFTWARE.
  23. ***************************************************************************** */var ja=function(r,t){return ja=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var a in n)n.hasOwnProperty(a)&&(i[a]=n[a])},ja(r,t)};function Ii(e,r){ja(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}var nl=function(){return nl=Object.assign||function(t){for(var i,n=1,a=arguments.length;n<a;n++){i=arguments[n];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o])}return t},nl.apply(this,arguments)};function CT(e,r){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&r.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,i=Object.getOwnPropertySymbols(e);n<i.length;n++)r.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(t[i[n]]=e[i[n]]);return t}function AT(e,r,t,i){var n=arguments.length,a=n<3?r:i===null?i=Object.getOwnPropertyDescriptor(r,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,r,t,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(r,t,a):o(r,t))||a);return n>3&&a&&Object.defineProperty(r,t,a),a}function FT(e,r){return function(t,i){r(t,i,e)}}function ET(e,r){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,r)}function MT(e,r,t,i){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(h){try{u(i.next(h))}catch(f){o(f)}}function l(h){try{u(i.throw(h))}catch(f){o(f)}}function u(h){h.done?a(h.value):n(h.value).then(s,l)}u((i=i.apply(e,r||[])).next())})}function TT(e,r){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,n,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(u){return function(h){return l([u,h])}}function l(u){if(i)throw new TypeError("Generator is already executing.");for(;t;)try{if(i=1,n&&(a=u[0]&2?n.return:u[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,u[1])).done)return a;switch(n=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return t.label++,{value:u[1],done:!1};case 5:t.label++,n=u[1],u=[0];continue;case 7:u=t.ops.pop(),t.trys.pop();continue;default:if(a=t.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){t.label=u[1];break}if(u[0]===6&&t.label<a[1]){t.label=a[1],a=u;break}if(a&&t.label<a[2]){t.label=a[2],t.ops.push(u);break}a[2]&&t.ops.pop(),t.trys.pop();continue}u=r.call(e,t)}catch(h){u=[6,h],n=0}finally{i=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function LT(e,r,t,i){i===void 0&&(i=t),e[i]=r[t]}function IT(e,r){for(var t in e)t!=="default"&&!r.hasOwnProperty(t)&&(r[t]=e[t])}function al(e){var r=typeof Symbol=="function"&&Symbol.iterator,t=r&&e[r],i=0;if(t)return t.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function Wv(e,r){var t=typeof Symbol=="function"&&e[Symbol.iterator];if(!t)return e;var i=t.call(e),n,a=[],o;try{for(;(r===void 0||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(s){o={error:s}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a}function OT(){for(var e=[],r=0;r<arguments.length;r++)e=e.concat(Wv(arguments[r]));return e}function PT(){for(var e=0,r=0,t=arguments.length;r<t;r++)e+=arguments[r].length;for(var i=Array(e),n=0,r=0;r<t;r++)for(var a=arguments[r],o=0,s=a.length;o<s;o++,n++)i[n]=a[o];return i}function wn(e){return this instanceof wn?(this.v=e,this):new wn(e)}function DT(e,r,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=t.apply(e,r||[]),n,a=[];return n={},o("next"),o("throw"),o("return"),n[Symbol.asyncIterator]=function(){return this},n;function o(v){i[v]&&(n[v]=function(g){return new Promise(function(p,y){a.push([v,g,p,y])>1||s(v,g)})})}function s(v,g){try{l(i[v](g))}catch(p){f(a[0][3],p)}}function l(v){v.value instanceof wn?Promise.resolve(v.value.v).then(u,h):f(a[0][2],v)}function u(v){s("next",v)}function h(v){s("throw",v)}function f(v,g){v(g),a.shift(),a.length&&s(a[0][0],a[0][1])}}function kT(e){var r,t;return r={},i("next"),i("throw",function(n){throw n}),i("return"),r[Symbol.iterator]=function(){return this},r;function i(n,a){r[n]=e[n]?function(o){return(t=!t)?{value:wn(e[n](o)),done:n==="return"}:a?a(o):o}:a}}function BT(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=e[Symbol.asyncIterator],t;return r?r.call(e):(e=typeof al=="function"?al(e):e[Symbol.iterator](),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(a){t[a]=e[a]&&function(o){return new Promise(function(s,l){o=e[a](o),n(s,l,o.done,o.value)})}}function n(a,o,s,l){Promise.resolve(l).then(function(u){a({value:u,done:s})},o)}}function RT(e,r){return Object.defineProperty?Object.defineProperty(e,"raw",{value:r}):e.raw=r,e}function NT(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)Object.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r.default=e,r}function zT(e){return e&&e.__esModule?e:{default:e}}function VT(e,r){if(!r.has(e))throw new TypeError("attempted to get private field on non-instance");return r.get(e)}function GT(e,r,t){if(!r.has(e))throw new TypeError("attempted to set private field on non-instance");return r.set(e,t),t}var Hv=/rgba?\(([\s.,0-9]+)\)/,Yv=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,Xv=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,jv=/[\d.]+:(#[^\s]+|[^\)]+\))/gi,Uv=function(e){return/^[r,R,L,l]{1}[\s]*\(/.test(e)},Zv=function(){var e=document.createElement("i");return e.title="Web Colour Picker",e.style.display="none",document.body.appendChild(e),e},Ua=function(e,r,t,i){return e[i]+(r[i]-e[i])*t};function ol(e){return"#"+Za(e[0])+Za(e[1])+Za(e[2])}var sl=function(e){return[parseInt(e.substr(1,2),16),parseInt(e.substr(3,2),16),parseInt(e.substr(5,2),16)]},Za=function(e){var r=Math.round(e).toString(16);return r.length===1?"0"+r:r},Kv=function(e,r){var t=isNaN(Number(r))||r<0?0:r>1?1:Number(r),i=e.length-1,n=Math.floor(i*t),a=i*t-n,o=e[n],s=n===i?o:e[n+1];return ol([Ua(o,s,a,0),Ua(o,s,a,1),Ua(o,s,a,2)])},bn,ll=function(e){if(e[0]==="#"&&e.length===7)return e;bn||(bn=Zv()),bn.style.color=e;var r=document.defaultView.getComputedStyle(bn,"").getPropertyValue("color"),t=Hv.exec(r),i=t[1].split(/\s*,\s*/).map(function(n){return Number(n)});return r=ol(i),r},qv=function(e){var r=(0,c.isString)(e)?e.split("-"):e,t=(0,c.map)(r,function(i){return sl(i.indexOf("#")===-1?ll(i):i)});return function(i){return Kv(t,i)}},$v=function(e){if(Uv(e)){var r,t=void 0;if(e[0]==="l"){var i=Yv.exec(e),n=+i[1]+90;t=i[2],r="linear-gradient("+n+"deg, "}else if(e[0]==="r"){r="radial-gradient(";var i=Xv.exec(e);t=i[4]}var a=t.match(jv);return(0,c.each)(a,function(o,s){var l=o.split(":");r+=l[1]+" "+l[0]*100+"%",s!==a.length-1&&(r+=", ")}),r+=")",r}return e},yr={rgb2arr:sl,gradient:qv,toRGB:(0,c.memoize)(ll),toCSSGradient:$v},Qv=function(e){Ii(r,e);function r(t){var i=e.call(this,t)||this;return i.type="color",i.names=["color"],(0,c.isString)(i.values)&&(i.linear=!0),i.gradient=yr.gradient(i.values),i}return r.prototype.getLinearValue=function(t){return this.gradient(t)},r}(Li),Jv=Qv,td=function(e){Ii(r,e);function r(t){var i=e.call(this,t)||this;return i.type="opacity",i.names=["opacity"],i}return r}(Li),ed=td,rd=function(e){Ii(r,e);function r(t){var i=e.call(this,t)||this;return i.names=["x","y"],i.type="position",i}return r.prototype.mapping=function(t,i){var n=this.scales,a=n[0],o=n[1];return(0,c.isNil)(t)||(0,c.isNil)(i)?[]:[(0,c.isArray)(t)?t.map(function(s){return a.scale(s)}):a.scale(t),(0,c.isArray)(i)?i.map(function(s){return o.scale(s)}):o.scale(i)]},r}(Li),id=rd,nd=function(e){Ii(r,e);function r(t){var i=e.call(this,t)||this;return i.type="shape",i.names=["shape"],i}return r.prototype.getLinearValue=function(t){var i=Math.round((this.values.length-1)*t);return this.values[i]},r}(Li),ad=nd,od=function(e){Ii(r,e);function r(t){var i=e.call(this,t)||this;return i.type="size",i.names=["size"],i}return r}(Li),sd=od,Oi=F(86429),ul={},cl=function(e){return ul[e.toLowerCase()]},Pi=function(e,r){if(cl(e))throw new Error("Attribute type '"+e+"' existed.");ul[e.toLowerCase()]=r};Pi("Color",Jv),Pi("Opacity",ed),Pi("Position",id),Pi("Shape",ad),Pi("Size",sd);var Sn=F(77160),ld=F(35600),te=F(31506),ud=function(){function e(r){this.type="coordinate",this.isRect=!1,this.isHelix=!1,this.isPolar=!1,this.isReflectX=!1,this.isReflectY=!1;var t=r.start,i=r.end,n=r.matrix,a=n===void 0?[1,0,0,0,1,0,0,0,1]:n,o=r.isTransposed,s=o===void 0?!1:o;this.start=t,this.end=i,this.matrix=a,this.originalMatrix=(0,d.__spreadArray)([],a),this.isTransposed=s}return e.prototype.initial=function(){this.center={x:(this.start.x+this.end.x)/2,y:(this.start.y+this.end.y)/2},this.width=Math.abs(this.end.x-this.start.x),this.height=Math.abs(this.end.y-this.start.y)},e.prototype.update=function(r){(0,c.assign)(this,r),this.initial()},e.prototype.convertDim=function(r,t){var i,n=this[t],a=n.start,o=n.end;return this.isReflect(t)&&(i=[o,a],a=i[0],o=i[1]),a+r*(o-a)},e.prototype.invertDim=function(r,t){var i,n=this[t],a=n.start,o=n.end;return this.isReflect(t)&&(i=[o,a],a=i[0],o=i[1]),(r-a)/(o-a)},e.prototype.applyMatrix=function(r,t,i){i===void 0&&(i=0);var n=this.matrix,a=[r,t,i];return Sn.kK(a,a,n),a},e.prototype.invertMatrix=function(r,t,i){i===void 0&&(i=0);var n=this.matrix,a=ld.invert([0,0,0,0,0,0,0,0,0],n),o=[r,t,i];return a&&Sn.kK(o,o,a),o},e.prototype.convert=function(r){var t=this.convertPoint(r),i=t.x,n=t.y,a=this.applyMatrix(i,n,1);return{x:a[0],y:a[1]}},e.prototype.invert=function(r){var t=this.invertMatrix(r.x,r.y,1);return this.invertPoint({x:t[0],y:t[1]})},e.prototype.rotate=function(r){var t=this.matrix,i=this.center;return te.m$(t,t,[-i.x,-i.y]),te.zu(t,t,r),te.m$(t,t,[i.x,i.y]),this},e.prototype.reflect=function(r){return r==="x"?this.isReflectX=!this.isReflectX:this.isReflectY=!this.isReflectY,this},e.prototype.scale=function(r,t){var i=this.matrix,n=this.center;return te.m$(i,i,[-n.x,-n.y]),te.lh(i,i,[r,t]),te.m$(i,i,[n.x,n.y]),this},e.prototype.translate=function(r,t){var i=this.matrix;return te.m$(i,i,[r,t]),this},e.prototype.transpose=function(){return this.isTransposed=!this.isTransposed,this},e.prototype.getCenter=function(){return this.center},e.prototype.getWidth=function(){return this.width},e.prototype.getHeight=function(){return this.height},e.prototype.getRadius=function(){return this.radius},e.prototype.isReflect=function(r){return r==="x"?this.isReflectX:this.isReflectY},e.prototype.resetMatrix=function(r){this.matrix=r||(0,d.__spreadArray)([],this.originalMatrix)},e}(),Ka=ud,cd=function(e){(0,d.__extends)(r,e);function r(t){var i=e.call(this,t)||this;return i.isRect=!0,i.type="cartesian",i.initial(),i}return r.prototype.initial=function(){e.prototype.initial.call(this);var t=this.start,i=this.end;this.x={start:t.x,end:i.x},this.y={start:t.y,end:i.y}},r.prototype.convertPoint=function(t){var i,n=t.x,a=t.y;return this.isTransposed&&(i=[a,n],n=i[0],a=i[1]),{x:this.convertDim(n,"x"),y:this.convertDim(a,"y")}},r.prototype.invertPoint=function(t){var i,n=this.invertDim(t.x,"x"),a=this.invertDim(t.y,"y");return this.isTransposed&&(i=[a,n],n=i[0],a=i[1]),{x:n,y:a}},r}(Ka),hl=cd,wt=F(31437),hd=function(e){(0,d.__extends)(r,e);function r(t){var i=e.call(this,t)||this;i.isHelix=!0,i.type="helix";var n=t.startAngle,a=n===void 0?1.25*Math.PI:n,o=t.endAngle,s=o===void 0?7.25*Math.PI:o,l=t.innerRadius,u=l===void 0?0:l,h=t.radius;return i.startAngle=a,i.endAngle=s,i.innerRadius=u,i.radius=h,i.initial(),i}return r.prototype.initial=function(){e.prototype.initial.call(this);var t=(this.endAngle-this.startAngle)/(2*Math.PI)+1,i=Math.min(this.width,this.height)/2;this.radius&&this.radius>=0&&this.radius<=1&&(i=i*this.radius),this.d=Math.floor(i*(1-this.innerRadius)/t),this.a=this.d/(Math.PI*2),this.x={start:this.startAngle,end:this.endAngle},this.y={start:this.innerRadius*i,end:this.innerRadius*i+this.d*.99}},r.prototype.convertPoint=function(t){var i,n=t.x,a=t.y;this.isTransposed&&(i=[a,n],n=i[0],a=i[1]);var o=this.convertDim(n,"x"),s=this.a*o,l=this.convertDim(a,"y");return{x:this.center.x+Math.cos(o)*(s+l),y:this.center.y+Math.sin(o)*(s+l)}},r.prototype.invertPoint=function(t){var i,n=this.d+this.y.start,a=wt.$X([0,0],[t.x,t.y],[this.center.x,this.center.y]),o=te.Dg(a,[1,0],!0),s=o*this.a;wt.kE(a)<s&&(s=wt.kE(a));var l=Math.floor((wt.kE(a)-s)/n);o=2*l*Math.PI+o;var u=this.a*o,h=wt.kE(a)-u;h=(0,c.isNumberEqual)(h,0)?0:h;var f=this.invertDim(o,"x"),v=this.invertDim(h,"y");return f=(0,c.isNumberEqual)(f,0)?0:f,v=(0,c.isNumberEqual)(v,0)?0:v,this.isTransposed&&(i=[v,f],f=i[0],v=i[1]),{x:f,y:v}},r}(Ka),fd=hd,vd=function(e){(0,d.__extends)(r,e);function r(t){var i=e.call(this,t)||this;i.isPolar=!0,i.type="polar";var n=t.startAngle,a=n===void 0?-Math.PI/2:n,o=t.endAngle,s=o===void 0?Math.PI*3/2:o,l=t.innerRadius,u=l===void 0?0:l,h=t.radius;return i.startAngle=a,i.endAngle=s,i.innerRadius=u,i.radius=h,i.initial(),i}return r.prototype.initial=function(){for(e.prototype.initial.call(this);this.endAngle<this.startAngle;)this.endAngle+=Math.PI*2;var t=this.getOneBox(),i=t.maxX-t.minX,n=t.maxY-t.minY,a=Math.abs(t.minX)/i,o=Math.abs(t.minY)/n,s;this.height/n>this.width/i?(s=this.width/i,this.circleCenter={x:this.center.x-(.5-a)*this.width,y:this.center.y-(.5-o)*s*n}):(s=this.height/n,this.circleCenter={x:this.center.x-(.5-a)*s*i,y:this.center.y-(.5-o)*this.height}),this.polarRadius=this.radius,this.radius?this.radius>0&&this.radius<=1?this.polarRadius=s*this.radius:(this.radius<=0||this.radius>s)&&(this.polarRadius=s):this.polarRadius=s,this.x={start:this.startAngle,end:this.endAngle},this.y={start:this.innerRadius*this.polarRadius,end:this.polarRadius}},r.prototype.getRadius=function(){return this.polarRadius},r.prototype.convertPoint=function(t){var i,n=this.getCenter(),a=t.x,o=t.y;return this.isTransposed&&(i=[o,a],a=i[0],o=i[1]),a=this.convertDim(a,"x"),o=this.convertDim(o,"y"),{x:n.x+Math.cos(a)*o,y:n.y+Math.sin(a)*o}},r.prototype.invertPoint=function(t){var i,n=this.getCenter(),a=[t.x-n.x,t.y-n.y],o=this,s=o.startAngle,l=o.endAngle;this.isReflect("x")&&(i=[l,s],s=i[0],l=i[1]);var u=[1,0,0,0,1,0,0,0,1];te.zu(u,u,s);var h=[1,0,0];Sn.kK(h,h,u);var f=[h[0],h[1]],v=te.Dg(f,a,l<s);(0,c.isNumberEqual)(v,Math.PI*2)&&(v=0);var g=wt.kE(a),p=v/(l-s);p=l-s>0?p:-p;var y=this.invertDim(g,"y"),m={x:0,y:0};return m.x=this.isTransposed?y:p,m.y=this.isTransposed?p:y,m},r.prototype.getCenter=function(){return this.circleCenter},r.prototype.getOneBox=function(){var t=this.startAngle,i=this.endAngle;if(Math.abs(i-t)>=Math.PI*2)return{minX:-1,maxX:1,minY:-1,maxY:1};for(var n=[0,Math.cos(t),Math.cos(i)],a=[0,Math.sin(t),Math.sin(i)],o=Math.min(t,i);o<Math.max(t,i);o+=Math.PI/18)n.push(Math.cos(o)),a.push(Math.sin(o));return{minX:Math.min.apply(Math,n),maxX:Math.max.apply(Math,n),minY:Math.min.apply(Math,a),maxY:Math.max.apply(Math,a)}},r}(Ka),dd=vd,fl={},gd=function(e){return fl[e.toLowerCase()]},Cn=function(e,r){fl[e.toLowerCase()]=r};Cn("rect",hl),Cn("cartesian",hl),Cn("polar",dd),Cn("helix",fd);function vl(e,r,t){var i=new vt.ju(r,t);i.target=e,i.propagationPath.push(e),e.emitDelegation(r,i);for(var n=e.getParent();n;)n.emitDelegation(r,i),i.propagationPath.push(n),n=n.getParent()}var dl=[1,0,0,0,1,0,0,0,1];function Pr(e,r,t){if(t===void 0&&(t=dl),!r)return null;var i=te.vs(t,[["t",-e.x,-e.y],["r",r],["t",e.x,e.y]]);return i}function qa(e,r){return!e.x&&!e.y?null:te.vs(r||dl,[["t",e.x,e.y]])}function pd(e){var r=[1,0,0],t=[0,0,0];return Sn.kK(t,r,e),Math.atan2(t[1],t[0])}function An(e,r){var t=[0,0];return wt.kK(t,r,e),t}function yd(e,r){var t=An(e,[r.minX,r.minY]),i=An(e,[r.maxX,r.minY]),n=An(e,[r.minX,r.maxY]),a=An(e,[r.maxX,r.maxY]),o=Math.min(t[0],i[0],n[0],a[0]),s=Math.max(t[0],i[0],n[0],a[0]),l=Math.min(t[1],i[1],n[1],a[1]),u=Math.max(t[1],i[1],n[1],a[1]);return{x:o,y:l,minX:o,minY:l,maxX:s,maxY:u,width:s-o,height:u-l}}function gl(e,r,t,i){if(r){var n=Pr({x:t,y:i},r,e.getMatrix());e.setMatrix(n)}}function Di(e,r,t){var i=qa({x:r,y:t});e.attr("matrix",i)}function Fn(e){var r=0,t=0,i=0,n=0;return(0,c.isNumber)(e)?r=t=i=n=e:(0,c.isArray)(e)&&(r=e[0],i=(0,c.isNil)(e[1])?e[0]:e[1],n=(0,c.isNil)(e[2])?e[0]:e[2],t=(0,c.isNil)(e[3])?i:e[3]),[r,i,n,t]}function $a(e){for(var r=e.childNodes,t=r.length,i=t-1;i>=0;i--)e.removeChild(r[i])}function md(e,r){return!!e.className.match(new RegExp("(\\s|^)"+r+"(\\s|$)"))}function ki(e){var r=e.start,t=e.end,i=Math.min(r.x,t.x),n=Math.min(r.y,t.y),a=Math.max(r.x,t.x),o=Math.max(r.y,t.y);return{x:i,y:n,minX:i,minY:n,maxX:a,maxY:o,width:a-i,height:o-n}}function xd(e){var r=e.map(function(s){return s.x}),t=e.map(function(s){return s.y}),i=Math.min.apply(Math,r),n=Math.min.apply(Math,t),a=Math.max.apply(Math,r),o=Math.max.apply(Math,t);return{x:i,y:n,minX:i,minY:n,maxX:a,maxY:o,width:a-i,height:o-n}}function Bi(e,r,t,i){var n=e+t,a=r+i;return{x:e,y:r,width:t,height:i,minX:e,minY:r,maxX:isNaN(n)?0:n,maxY:isNaN(a)?0:a}}function Dr(e,r,t){return(1-t)*e+r*t}function ri(e,r,t){return{x:e.x+Math.cos(t)*r,y:e.y+Math.sin(t)*r}}function _d(e,r){var t=r.x-e.x,i=r.y-e.y;return Math.sqrt(t*t+i*i)}var WT=function(e){return new Promise(function(r){setTimeout(r,e)})},En=function(e,r,t){return t===void 0&&(t=Math.pow(Number.EPSILON,.5)),[e,r].includes(Infinity)?Math.abs(e)===Math.abs(r):Math.abs(e-r)<t};function wd(e,r){var t=Math.max(e.minX,r.minX),i=Math.max(e.minY,r.minY),n=Math.min(e.maxX,r.maxX),a=Math.min(e.maxY,r.maxY);return Bi(t,i,n-t,a-i)}function HT(e,r){var t=Math.min(e.minX,r.minX),i=Math.min(e.minY,r.minY),n=Math.max(e.maxX,r.maxX),a=Math.max(e.maxY,r.maxY);return Bi(t,i,n-t,a-i)}function pl(e){var r=e.getClip(),t=r&&r.getBBox(),i;if(!e.isGroup())i=e.getBBox();else{var n=Infinity,a=-Infinity,o=Infinity,s=-Infinity,l=e.getChildren();l.length>0?(0,c.each)(l,function(u){if(u.get("visible")){if(u.isGroup()&&u.get("children").length===0)return!0;var h=pl(u),f=u.applyToMatrix([h.minX,h.minY,1]),v=u.applyToMatrix([h.minX,h.maxY,1]),g=u.applyToMatrix([h.maxX,h.minY,1]),p=u.applyToMatrix([h.maxX,h.maxY,1]),y=Math.min(f[0],v[0],g[0],p[0]),m=Math.max(f[0],v[0],g[0],p[0]),x=Math.min(f[1],v[1],g[1],p[1]),_=Math.max(f[1],v[1],g[1],p[1]);y<n&&(n=y),m>a&&(a=m),x<o&&(o=x),_>s&&(s=_)}}):(n=0,a=0,o=0,s=0),i=Bi(n,o,a-n,s-o)}return t?wd(i,t):i}function bd(e,r){if(!(!e.getClip()&&!r.getClip())){var t=r.getClip();if(!t){e.setClip(null);return}var i={type:t.get("type"),attrs:t.attr()};e.setClip(i)}}function Fe(e){return e+"px"}function yl(e,r,t,i){var n=_d(e,r),a=i/n,o=0;return t==="start"?o=0-a:t==="end"&&(o=1+a),{x:Dr(e.x,r.x,o),y:Dr(e.y,r.y,o)}}var Sd={none:[],point:["x","y"],region:["start","end"],points:["points"],circle:["center","radius","startAngle","endAngle"]},Cd=function(e){(0,d.__extends)(r,e);function r(t){var i=e.call(this,t)||this;return i.initCfg(),i}return r.prototype.getDefaultCfg=function(){return{id:"",name:"",type:"",locationType:"none",offsetX:0,offsetY:0,animate:!1,capture:!0,updateAutoRender:!1,animateOption:{appear:null,update:{duration:400,easing:"easeQuadInOut"},enter:{duration:400,easing:"easeQuadInOut"},leave:{duration:350,easing:"easeQuadIn"}},events:null,defaultCfg:{},visible:!0}},r.prototype.clear=function(){},r.prototype.update=function(t){var i=this,n=this.get("defaultCfg")||{};(0,c.each)(t,function(a,o){var s=i.get(o),l=a;s!==a&&((0,c.isObject)(a)&&n[o]&&(l=(0,c.deepMix)({},n[o],a)),i.set(o,l))}),this.updateInner(t),this.afterUpdate(t)},r.prototype.updateInner=function(t){},r.prototype.afterUpdate=function(t){(0,c.hasKey)(t,"visible")&&(t.visible?this.show():this.hide()),(0,c.hasKey)(t,"capture")&&this.setCapture(t.capture)},r.prototype.getLayoutBBox=function(){return this.getBBox()},r.prototype.getLocationType=function(){return this.get("locationType")},r.prototype.getOffset=function(){return{offsetX:this.get("offsetX"),offsetY:this.get("offsetY")}},r.prototype.setOffset=function(t,i){this.update({offsetX:t,offsetY:i})},r.prototype.setLocation=function(t){var i=(0,d.__assign)({},t);this.update(i)},r.prototype.getLocation=function(){var t=this,i={},n=this.get("locationType"),a=Sd[n];return(0,c.each)(a,function(o){i[o]=t.get(o)}),i},r.prototype.isList=function(){return!1},r.prototype.isSlider=function(){return!1},r.prototype.init=function(){},r.prototype.initCfg=function(){var t=this,i=this.get("defaultCfg");(0,c.each)(i,function(n,a){var o=t.get(a);if((0,c.isObject)(o)){var s=(0,c.deepMix)({},n,o);t.set(a,s)}})},r}(vt.XY),ml=Cd,kr="update_status",Ad=["visible","tip","delegateObject"],Fd=["container","group","shapesMap","isRegister","isUpdating","destroyed"],Ed=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,d.__assign)((0,d.__assign)({},t),{container:null,shapesMap:{},group:null,capture:!0,isRegister:!1,isUpdating:!1,isInit:!0})},r.prototype.remove=function(){this.clear();var t=this.get("group");t.remove()},r.prototype.clear=function(){var t=this.get("group");t.clear(),this.set("shapesMap",{}),this.clearOffScreenCache(),this.set("isInit",!0)},r.prototype.getChildComponentById=function(t){var i=this.getElementById(t),n=i&&i.get("component");return n},r.prototype.getElementById=function(t){return this.get("shapesMap")[t]},r.prototype.getElementByLocalId=function(t){var i=this.getElementId(t);return this.getElementById(i)},r.prototype.getElementsByName=function(t){var i=[];return(0,c.each)(this.get("shapesMap"),function(n){n.get("name")===t&&i.push(n)}),i},r.prototype.getContainer=function(){return this.get("container")},r.prototype.updateInner=function(t){this.offScreenRender(),this.get("updateAutoRender")&&this.render()},r.prototype.render=function(){var t=this.get("offScreenGroup");t||(t=this.offScreenRender());var i=this.get("group");this.updateElements(t,i),this.deleteElements(),this.applyOffset(),this.get("eventInitted")||(this.initEvent(),this.set("eventInitted",!0)),this.set("isInit",!1)},r.prototype.show=function(){var t=this.get("group");t.show(),this.set("visible",!0)},r.prototype.hide=function(){var t=this.get("group");t.hide(),this.set("visible",!1)},r.prototype.setCapture=function(t){var i=this.get("group");i.set("capture",t),this.set("capture",t)},r.prototype.destroy=function(){this.removeEvent(),this.remove(),e.prototype.destroy.call(this)},r.prototype.getBBox=function(){return this.get("group").getCanvasBBox()},r.prototype.getLayoutBBox=function(){var t=this.get("group"),i=this.getInnerLayoutBBox(),n=t.getTotalMatrix();return n&&(i=yd(n,i)),i},r.prototype.on=function(t,i,n){var a=this.get("group");return a.on(t,i,n),this},r.prototype.off=function(t,i){var n=this.get("group");return n&&n.off(t,i),this},r.prototype.emit=function(t,i){var n=this.get("group");n.emit(t,i)},r.prototype.init=function(){e.prototype.init.call(this),this.get("group")||this.initGroup(),this.offScreenRender()},r.prototype.getInnerLayoutBBox=function(){return this.get("offScreenBBox")||this.get("group").getBBox()},r.prototype.delegateEmit=function(t,i){var n=this.get("group");i.target=n,n.emit(t,i),vl(n,t,i)},r.prototype.createOffScreenGroup=function(){var t=this.get("group"),i=t.getGroupBase(),n=new i({delegateObject:this.getDelegateObject()});return n},r.prototype.applyOffset=function(){var t=this.get("offsetX"),i=this.get("offsetY");this.moveElementTo(this.get("group"),{x:t,y:i})},r.prototype.initGroup=function(){var t=this.get("container");this.set("group",t.addGroup({id:this.get("id"),name:this.get("name"),capture:this.get("capture"),visible:this.get("visible"),isComponent:!0,component:this,delegateObject:this.getDelegateObject()}))},r.prototype.offScreenRender=function(){this.clearOffScreenCache();var t=this.createOffScreenGroup();return this.renderInner(t),this.set("offScreenGroup",t),this.set("offScreenBBox",pl(t)),t},r.prototype.addGroup=function(t,i){this.appendDelegateObject(t,i);var n=t.addGroup(i);return this.get("isRegister")&&this.registerElement(n),n},r.prototype.addShape=function(t,i){this.appendDelegateObject(t,i);var n=t.addShape(i);return this.get("isRegister")&&this.registerElement(n),n},r.prototype.addComponent=function(t,i){var n=i.id,a=i.component,o=(0,d.__rest)(i,["id","component"]),s=new a((0,d.__assign)((0,d.__assign)({},o),{id:n,container:t,updateAutoRender:this.get("updateAutoRender")}));return s.init(),s.render(),this.get("isRegister")&&this.registerElement(s.get("group")),s},r.prototype.initEvent=function(){},r.prototype.removeEvent=function(){var t=this.get("group");t.off()},r.prototype.getElementId=function(t){var i=this.get("id"),n=this.get("name");return i+"-"+n+"-"+t},r.prototype.registerElement=function(t){var i=t.get("id");this.get("shapesMap")[i]=t},r.prototype.unregisterElement=function(t){var i=t.get("id");delete this.get("shapesMap")[i]},r.prototype.moveElementTo=function(t,i){var n=qa(i);t.attr("matrix",n)},r.prototype.addAnimation=function(t,i,n){var a=i.attr("opacity");(0,c.isNil)(a)&&(a=1),i.attr("opacity",0),i.animate({opacity:a},n)},r.prototype.removeAnimation=function(t,i,n){i.animate({opacity:0},n)},r.prototype.updateAnimation=function(t,i,n,a){i.animate(n,a)},r.prototype.updateElements=function(t,i){var n=this,a=this.get("animate"),o=this.get("animateOption"),s=t.getChildren().slice(0),l;(0,c.each)(s,function(u){var h=u.get("id"),f=n.getElementById(h),v=u.get("name");if(f)if(u.get("isComponent")){var g=u.get("component"),p=f.get("component"),y=(0,c.pick)(g.cfg,(0,c.difference)((0,c.keys)(g.cfg),Fd));p.update(y),f.set(kr,"update")}else{var m=n.getReplaceAttrs(f,u);a&&o.update?n.updateAnimation(v,f,m,o.update):f.attr(m),u.isGroup()&&n.updateElements(u,f),(0,c.each)(Ad,function(b){f.set(b,u.get(b))}),bd(f,u),l=f,f.set(kr,"update")}else{i.add(u);var x=i.getChildren();if(x.splice(x.length-1,1),l){var _=x.indexOf(l);x.splice(_+1,0,u)}else x.unshift(u);if(n.registerElement(u),u.set(kr,"add"),u.get("isComponent")){var g=u.get("component");g.set("container",i)}else u.isGroup()&&n.registerNewGroup(u);if(l=u,a){var w=n.get("isInit")?o.appear:o.enter;w&&n.addAnimation(v,u,w)}}})},r.prototype.clearUpdateStatus=function(t){var i=t.getChildren();(0,c.each)(i,function(n){n.set(kr,null)})},r.prototype.clearOffScreenCache=function(){var t=this.get("offScreenGroup");t&&t.destroy(),this.set("offScreenGroup",null),this.set("offScreenBBox",null)},r.prototype.getDelegateObject=function(){var t,i=this.get("name"),n=(t={},t[i]=this,t.component=this,t);return n},r.prototype.appendDelegateObject=function(t,i){var n=t.get("delegateObject");i.delegateObject||(i.delegateObject={}),(0,c.mix)(i.delegateObject,n)},r.prototype.getReplaceAttrs=function(t,i){var n=t.attr(),a=i.attr();return(0,c.each)(n,function(o,s){a[s]===void 0&&(a[s]=void 0)}),a},r.prototype.registerNewGroup=function(t){var i=this,n=t.getChildren();(0,c.each)(n,function(a){i.registerElement(a),a.set(kr,"add"),a.isGroup()&&i.registerNewGroup(a)})},r.prototype.deleteElements=function(){var t=this,i=this.get("shapesMap"),n=[];(0,c.each)(i,function(s,l){!s.get(kr)||s.destroyed?n.push([l,s]):s.set(kr,null)});var a=this.get("animate"),o=this.get("animateOption");(0,c.each)(n,function(s){var l=s[0],u=s[1];if(!u.destroyed){var h=u.get("name");if(a&&o.leave){var f=(0,c.mix)({callback:function(){t.removeElement(u)}},o.leave);t.removeAnimation(h,u,f)}else t.removeElement(u)}delete i[l]})},r.prototype.removeElement=function(t){if(t.get("isGroup")){var i=t.get("component");i&&i.destroy()}t.remove()},r}(ml),be=Ed,Qa="\u2026";function Md(e){for(var r=0,t=0;t<e.length;t++)r+=Br(e,t);return r}function Br(e,r){return e.charCodeAt(r)>0&&e.charCodeAt(r)<128?1:2}function Td(e,r,t){t===void 0&&(t="tail");var i=e.length,n="";if(t==="tail"){for(var a=0,o=0;a<r;){var s=Br(e,o);if(a+s<=r)n+=e[o],a+=Br(e,o),o++;else break}n+=Qa}else if(t==="head"){for(var a=0,o=i-1;a<r;){var s=Br(e,o);if(a+s<=r)n+=e[o],a+=Br(e,o),o--;else break}n=Qa+n}else{for(var l="",u="",a=0,h=0,f=i-1;a<r;){var v=Br(e,h),g=!1;v+a<=r&&(l+=e[h],h++,a+=v,g=!0);var p=Br(e,f);if(p+a<=r&&(u=e[f]+u,a+=p,f--,g=!0),!g)break}n=l+Qa+u}return n}var Ld="\u2026",Id=2,Od=400;function Pd(e){for(var r=e.map(function(l){var u=l.attr("text");return(0,c.isNil)(u)?"":""+u}),t=0,i=0,n=0;n<r.length;n+=1){for(var a=0,o=0;o<=r[n].length;o+=1){var s=r[n].charCodeAt(o);s>=19968&&s<=40869?a+=2:a+=1}a>t&&(t=a,i=n)}return e[i].getBBox().width}function Ja(e){if(e.length>Od)return Pd(e);var r=0;return(0,c.each)(e,function(t){var i=t.getBBox(),n=i.width;r<n&&(r=n)}),r}function Dd(e,r){var t=r.getCanvasBBox();return e?t.width:t.height}function YT(e,r){return e.getBBox().width<r}function Ri(e,r,t,i){var n;i===void 0&&(i="tail");var a=(n=r.attr("text"))!==null&&n!==void 0?n:"";if(i==="tail"){var o=(0,c.pick)(r.attr(),["fontSize","fontFamily","fontWeight","fontStyle","fontVariant"]),s=(0,c.getEllipsisText)(a,t,o,"\u2026");return a!==s?(r.attr("text",s),r.set("tip",a),!0):(r.set("tip",null),!1)}var l=Dd(e,r),u=Md(a),h=!1;if(t<l){var f=Math.floor(t/l*u)-Id,v=void 0;f>=0?v=Td(a,f,i):v=Ld,v&&(r.attr("text",v),h=!0)}return h?r.set("tip",a):r.set("tip",null),h}function Mn(e,r){var t=r.x,i=r.y,n=r.content,a=r.style,o=r.id,s=r.name,l=r.rotate,u=r.maxLength,h=r.autoEllipsis,f=r.isVertical,v=r.ellipsisPosition,g=r.background,p=e.addGroup({id:o+"-group",name:s+"-group",attrs:{x:t,y:i}}),y=p.addShape({type:"text",id:o,name:s,attrs:(0,d.__assign)({x:0,y:0,text:n},a)}),m=Fn((0,c.get)(g,"padding",0));if(u&&h){var x=u-(m[1]+m[3]);Ri(!f,y,x,v)}if(g){var _=(0,c.get)(g,"style",{}),w=y.getCanvasBBox(),b=w.minX,S=w.minY,C=w.width,M=w.height,L=p.addShape("rect",{id:o+"-bg",name:o+"-bg",attrs:(0,d.__assign)({x:b-m[3],y:S-m[0],width:C+m[1]+m[3],height:M+m[0]+m[2]},_)});L.toBack()}Di(p,t,i),gl(p,l,t,i)}var Bt={fontFamily:`
  24. BlinkMacSystemFont, "Segoe UI", Roboto,"Helvetica Neue",
  25. Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
  26. SimSun, "sans-serif"`,textColor:"#2C3542",activeTextColor:"#333333",uncheckedColor:"#D8D8D8",lineColor:"#416180",regionColor:"#CCD7EB",verticalAxisRotate:-Math.PI/4,horizontalAxisRotate:Math.PI/4,descriptionIconStroke:"#fff",descriptionIconFill:"rgba(58, 73, 101, .25)"},kd=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,d.__assign)((0,d.__assign)({},t),{name:"annotation",type:"line",locationType:"region",start:null,end:null,style:{},text:null,defaultCfg:{style:{fill:Bt.textColor,fontSize:12,textAlign:"center",textBaseline:"bottom",fontFamily:Bt.fontFamily},text:{position:"center",autoRotate:!0,content:null,offsetX:0,offsetY:0,style:{stroke:Bt.lineColor,lineWidth:1}}}})},r.prototype.renderInner=function(t){this.renderLine(t),this.get("text")&&this.renderLabel(t)},r.prototype.renderLine=function(t){var i=this.get("start"),n=this.get("end"),a=this.get("style");this.addShape(t,{type:"line",id:this.getElementId("line"),name:"annotation-line",attrs:(0,d.__assign)({x1:i.x,y1:i.y,x2:n.x,y2:n.y},a)})},r.prototype.getLabelPoint=function(t,i,n){var a;return n==="start"?a=0:n==="center"?a=.5:(0,c.isString)(n)&&n.indexOf("%")!==-1?a=parseInt(n,10)/100:(0,c.isNumber)(n)?a=n:a=1,(a>1||a<0)&&(a=1),{x:Dr(t.x,i.x,a),y:Dr(t.y,i.y,a)}},r.prototype.renderLabel=function(t){var i=this.get("text"),n=this.get("start"),a=this.get("end"),o=i.position,s=i.content,l=i.style,u=i.offsetX,h=i.offsetY,f=i.autoRotate,v=i.maxLength,g=i.autoEllipsis,p=i.ellipsisPosition,y=i.background,m=i.isVertical,x=m===void 0?!1:m,_=this.getLabelPoint(n,a,o),w=_.x+u,b=_.y+h,S={id:this.getElementId("line-text"),name:"annotation-line-text",x:w,y:b,content:s,style:l,maxLength:v,autoEllipsis:g,ellipsisPosition:p,background:y,isVertical:x};if(f){var C=[a.x-n.x,a.y-n.y];S.rotate=Math.atan2(C[1],C[0])}Mn(t,S)},r}(be),Bd=kd,Rd=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,d.__assign)((0,d.__assign)({},t),{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:Bt.textColor,fontSize:12,textAlign:"center",textBaseline:"middle",fontFamily:Bt.fontFamily}}})},r.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetLocation()},r.prototype.renderInner=function(t){var i=this.getLocation(),n=i.x,a=i.y,o=this.get("content"),s=this.get("style"),l=this.getElementId("text"),u=this.get("name")+"-text",h=this.get("maxLength"),f=this.get("autoEllipsis"),v=this.get("isVertical"),g=this.get("ellipsisPosition"),p=this.get("background"),y=this.get("rotate"),m={id:l,name:u,x:n,y:a,content:o,style:s,maxLength:h,autoEllipsis:f,isVertical:v,ellipsisPosition:g,background:p,rotate:y};Mn(t,m)},r.prototype.resetLocation=function(){var t=this.getElementByLocalId("text-group");if(t){var i=this.getLocation(),n=i.x,a=i.y,o=this.get("rotate");Di(t,n,a),gl(t,o,n,a)}},r}(be),Nd=Rd,zd=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,d.__assign)((0,d.__assign)({},t),{name:"annotation",type:"arc",locationType:"circle",center:null,radius:100,startAngle:-Math.PI/2,endAngle:Math.PI*3/2,style:{stroke:"#999",lineWidth:1}})},r.prototype.renderInner=function(t){this.renderArc(t)},r.prototype.getArcPath=function(){var t=this.getLocation(),i=t.center,n=t.radius,a=t.startAngle,o=t.endAngle,s=ri(i,n,a),l=ri(i,n,o),u=o-a>Math.PI?1:0,h=[["M",s.x,s.y]];if(o-a==Math.PI*2){var f=ri(i,n,a+Math.PI);h.push(["A",n,n,0,u,1,f.x,f.y]),h.push(["A",n,n,0,u,1,l.x,l.y])}else h.push(["A",n,n,0,u,1,l.x,l.y]);return h},r.prototype.renderArc=function(t){var i=this.getArcPath(),n=this.get("style");this.addShape(t,{type:"path",id:this.getElementId("arc"),name:"annotation-arc",attrs:(0,d.__assign)({path:i},n)})},r}(be),Vd=zd,Gd=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,d.__assign)((0,d.__assign)({},t),{name:"annotation",type:"region",locationType:"region",start:null,end:null,style:{},defaultCfg:{style:{lineWidth:0,fill:Bt.regionColor,opacity:.4}}})},r.prototype.renderInner=function(t){this.renderRegion(t)},r.prototype.renderRegion=function(t){var i=this.get("start"),n=this.get("end"),a=this.get("style"),o=ki({start:i,end:n});this.addShape(t,{type:"rect",id:this.getElementId("region"),name:"annotation-region",attrs:(0,d.__assign)({x:o.x,y:o.y,width:o.width,height:o.height},a)})},r}(be),Wd=Gd,Hd=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,d.__assign)((0,d.__assign)({},t),{name:"annotation",type:"image",locationType:"region",start:null,end:null,src:null,style:{}})},r.prototype.renderInner=function(t){this.renderImage(t)},r.prototype.getImageAttrs=function(){var t=this.get("start"),i=this.get("end"),n=this.get("style"),a=ki({start:t,end:i}),o=this.get("src");return(0,d.__assign)({x:a.x,y:a.y,img:o,width:a.width,height:a.height},n)},r.prototype.renderImage=function(t){this.addShape(t,{type:"image",id:this.getElementId("image"),name:"annotation-image",attrs:this.getImageAttrs()})},r}(be),Yd=Hd,Xd=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,d.__assign)((0,d.__assign)({},t),{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:Bt.lineColor,lineWidth:1}},text:{content:"",display:!0,style:{fill:Bt.textColor,opacity:.65,fontSize:12,textAlign:"start",fontFamily:Bt.fontFamily}}}})},r.prototype.renderInner=function(t){(0,c.get)(this.get("line"),"display")&&this.renderLine(t),(0,c.get)(this.get("text"),"display")&&this.renderText(t),(0,c.get)(this.get("point"),"display")&&this.renderPoint(t),this.get("autoAdjust")&&this.autoAdjust(t)},r.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x")+this.get("offsetX"),y:this.get("y")+this.get("offsetY")})},r.prototype.renderPoint=function(t){var i=this.getShapeAttrs().point;this.addShape(t,{type:"circle",id:this.getElementId("point"),name:"annotation-point",attrs:i})},r.prototype.renderLine=function(t){var i=this.getShapeAttrs().line;this.addShape(t,{type:"path",id:this.getElementId("line"),name:"annotation-line",attrs:i})},r.prototype.renderText=function(t){var i=this.getShapeAttrs().text,n=i.x,a=i.y,o=i.text,s=(0,d.__rest)(i,["x","y","text"]),l=this.get("text"),u=l.background,h=l.maxLength,f=l.autoEllipsis,v=l.isVertival,g=l.ellipsisPosition,p={x:n,y:a,id:this.getElementId("text"),name:"annotation-text",content:o,style:s,background:u,maxLength:h,autoEllipsis:f,isVertival:v,ellipsisPosition:g};Mn(t,p)},r.prototype.autoAdjust=function(t){var i=this.get("direction"),n=this.get("x"),a=this.get("y"),o=(0,c.get)(this.get("line"),"length",0),s=this.get("coordinateBBox"),l=t.getBBox(),u=l.minX,h=l.maxX,f=l.minY,v=l.maxY,g=t.findById(this.getElementId("text-group")),p=t.findById(this.getElementId("text")),y=t.findById(this.getElementId("line"));if(!!s){if(g){if(n+u<=s.minX){var m=s.minX-(n+u);Di(g,g.attr("x")+m,g.attr("y"))}if(n+h>=s.maxX){var m=n+h-s.maxX;Di(g,g.attr("x")-m,g.attr("y"))}}if(i==="upward"&&a+f<=s.minY||i!=="upward"&&a+v>=s.maxY){var x=void 0,_=void 0;i==="upward"&&a+f<=s.minY?(x="top",_=1):(x="bottom",_=-1),p.attr("textBaseline",x),y&&y.attr("path",[["M",0,0],["L",0,o*_]]),Di(g,g.attr("x"),(o+2)*_)}}},r.prototype.getShapeAttrs=function(){var t=(0,c.get)(this.get("line"),"display"),i=(0,c.get)(this.get("point"),"style",{}),n=(0,c.get)(this.get("line"),"style",{}),a=(0,c.get)(this.get("text"),"style",{}),o=this.get("direction"),s=t?(0,c.get)(this.get("line"),"length",0):0,l=o==="upward"?-1:1;return{point:(0,d.__assign)({x:0,y:0},i),line:(0,d.__assign)({path:[["M",0,0],["L",0,s*l]]},n),text:(0,d.__assign)({x:0,y:(s+2)*l,text:(0,c.get)(this.get("text"),"content",""),textBaseline:o==="upward"?"bottom":"top"},a)}},r}(be),jd=Xd,Ud=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,d.__assign)((0,d.__assign)({},t),{name:"annotation",type:"dataRegion",locationType:"points",points:[],lineLength:0,region:{},text:{},defaultCfg:{region:{style:{lineWidth:0,fill:Bt.regionColor,opacity:.4}},text:{content:"",style:{textAlign:"center",textBaseline:"bottom",fontSize:12,fill:Bt.textColor,fontFamily:Bt.fontFamily}}}})},r.prototype.renderInner=function(t){var i=(0,c.get)(this.get("region"),"style",{}),n=(0,c.get)(this.get("text"),"style",{}),a=this.get("lineLength")||0,o=this.get("points");if(!!o.length){var s=xd(o),l=[];l.push(["M",o[0].x,s.minY-a]),o.forEach(function(h){l.push(["L",h.x,h.y])}),l.push(["L",o[o.length-1].x,o[o.length-1].y-a]),this.addShape(t,{type:"path",id:this.getElementId("region"),name:"annotation-region",attrs:(0,d.__assign)({path:l},i)});var u=(0,d.__assign)({id:this.getElementId("text"),name:"annotation-text",x:(s.minX+s.maxX)/2,y:s.minY-a},this.get("text"));Mn(t,u)}},r}(be),Zd=Ud,Kd=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,d.__assign)((0,d.__assign)({},t),{name:"annotation",type:"regionFilter",locationType:"region",start:null,end:null,color:null,shape:[]})},r.prototype.renderInner=function(t){var i=this,n=this.get("start"),a=this.get("end"),o=this.addGroup(t,{id:this.getElementId("region-filter"),capture:!1});(0,c.each)(this.get("shapes"),function(l,u){var h=l.get("type"),f=(0,c.clone)(l.attr());i.adjustShapeAttrs(f),i.addShape(o,{id:i.getElementId("shape-"+h+"-"+u),capture:!1,type:h,attrs:f})});var s=ki({start:n,end:a});o.setClip({type:"rect",attrs:{x:s.minX,y:s.minY,width:s.width,height:s.height}})},r.prototype.adjustShapeAttrs=function(t){var i=this.get("color");t.fill&&(t.fill=t.fillStyle=i),t.stroke=t.strokeStyle=i},r}(be),qd=Kd,$d=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,d.__assign)((0,d.__assign)({},t),{name:"annotation",type:"shape",draw:c.noop})},r.prototype.renderInner=function(t){var i=this.get("render");(0,c.isFunction)(i)&&i(t)},r}(be),Qd=$d;function Ee(e,r,t){var i;try{i=window.getComputedStyle?window.getComputedStyle(e,null)[r]:e.style[r]}catch(n){}finally{i=i===void 0?t:i}return i}function Jd(e,r){var t=Ee(e,"width",r);return t==="auto"&&(t=e.offsetWidth),parseFloat(t)}function tg(e,r){var t=Jd(e,r),i=parseFloat(Ee(e,"borderLeftWidth"))||0,n=parseFloat(Ee(e,"paddingLeft"))||0,a=parseFloat(Ee(e,"paddingRight"))||0,o=parseFloat(Ee(e,"borderRightWidth"))||0,s=parseFloat(Ee(e,"marginRight"))||0,l=parseFloat(Ee(e,"marginLeft"))||0;return t+i+o+n+a+l+s}function eg(e,r){var t=Ee(e,"height",r);return t==="auto"&&(t=e.offsetHeight),parseFloat(t)}function rg(e,r){var t=eg(e,r),i=parseFloat(Ee(e,"borderTopWidth"))||0,n=parseFloat(Ee(e,"paddingTop"))||0,a=parseFloat(Ee(e,"paddingBottom"))||0,o=parseFloat(Ee(e,"borderBottomWidth"))||0,s=parseFloat(Ee(e,"marginTop"))||0,l=parseFloat(Ee(e,"marginBottom"))||0;return t+i+o+n+a+s+l}var ig=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,d.__assign)((0,d.__assign)({},t),{container:null,containerTpl:"<div></div>",updateAutoRender:!0,containerClassName:"",parent:null})},r.prototype.getContainer=function(){return this.get("container")},r.prototype.show=function(){var t=this.get("container");t.style.display="",this.set("visible",!0)},r.prototype.hide=function(){var t=this.get("container");t.style.display="none",this.set("visible",!1)},r.prototype.setCapture=function(t){var i=this.getContainer(),n=t?"auto":"none";i.style.pointerEvents=n,this.set("capture",t)},r.prototype.getBBox=function(){var t=this.getContainer(),i=parseFloat(t.style.left)||0,n=parseFloat(t.style.top)||0;return Bi(i,n,t.clientWidth,t.clientHeight)},r.prototype.clear=function(){var t=this.get("container");$a(t)},r.prototype.destroy=function(){this.removeEvent(),this.removeDom(),e.prototype.destroy.call(this)},r.prototype.init=function(){e.prototype.init.call(this),this.initContainer(),this.initDom(),this.resetStyles(),this.applyStyles(),this.initEvent(),this.initCapture(),this.initVisible()},r.prototype.initCapture=function(){this.setCapture(this.get("capture"))},r.prototype.initVisible=function(){this.get("visible")?this.show():this.hide()},r.prototype.initDom=function(){},r.prototype.initContainer=function(){var t=this.get("container");if((0,c.isNil)(t)){t=this.createDom();var i=this.get("parent");(0,c.isString)(i)&&(i=document.getElementById(i),this.set("parent",i)),i.appendChild(t),this.get("containerId")&&t.setAttribute("id",this.get("containerId")),this.set("container",t)}else(0,c.isString)(t)&&(t=document.getElementById(t),this.set("container",t));this.get("parent")||this.set("parent",t.parentNode)},r.prototype.resetStyles=function(){var t=this.get("domStyles"),i=this.get("defaultStyles");t?t=(0,c.deepMix)({},i,t):t=i,this.set("domStyles",t)},r.prototype.applyStyles=function(){var t=this.get("domStyles");if(!!t){var i=this.getContainer();this.applyChildrenStyles(i,t);var n=this.get("containerClassName");if(n&&md(i,n)){var a=t[n];(0,k.Z)(i,a)}}},r.prototype.applyChildrenStyles=function(t,i){(0,c.each)(i,function(n,a){var o=t.getElementsByClassName(a);(0,c.each)(o,function(s){(0,k.Z)(s,n)})})},r.prototype.applyStyle=function(t,i){var n=this.get("domStyles");(0,k.Z)(i,n[t])},r.prototype.createDom=function(){var t=this.get("containerTpl");return(0,E.Z)(t)},r.prototype.initEvent=function(){},r.prototype.removeDom=function(){var t=this.get("container");t&&t.parentNode&&t.parentNode.removeChild(t)},r.prototype.removeEvent=function(){},r.prototype.updateInner=function(t){(0,c.hasKey)(t,"domStyles")&&(this.resetStyles(),this.applyStyles()),this.resetPosition()},r.prototype.resetPosition=function(){},r}(ml),to=ig,ng=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,d.__assign)((0,d.__assign)({},t),{name:"annotation",type:"html",locationType:"point",x:0,y:0,containerTpl:'<div class="g2-html-annotation"></div>',alignX:"left",alignY:"top",html:"",zIndex:7})},r.prototype.render=function(){var t=this.getContainer(),i=this.get("html");$a(t);var n=(0,c.isFunction)(i)?i(t):i;if((0,c.isElement)(n))t.appendChild(n);else if((0,c.isString)(n)||(0,c.isNumber)(n)){var a=(0,E.Z)(""+n);a&&t.appendChild(a)}this.resetPosition()},r.prototype.resetPosition=function(){var t=this.getContainer(),i=this.getLocation(),n=i.x,a=i.y,o=this.get("alignX"),s=this.get("alignY"),l=this.get("offsetX"),u=this.get("offsetY"),h=tg(t),f=rg(t),v={x:n,y:a};o==="middle"?v.x-=Math.round(h/2):o==="right"&&(v.x-=Math.round(h)),s==="middle"?v.y-=Math.round(f/2):s==="bottom"&&(v.y-=Math.round(f)),l&&(v.x+=l),u&&(v.y+=u),(0,k.Z)(t,{position:"absolute",left:v.x+"px",top:v.y+"px",zIndex:this.get("zIndex")})},r}(to),ag=ng;function Ni(e,r,t){var i=r+"Style",n=null;return(0,c.each)(t,function(a,o){e[o]&&a[i]&&(n||(n={}),(0,c.mix)(n,a[i]))}),n}var og=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,d.__assign)((0,d.__assign)({},t),{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:Bt.lineColor}},tickLine:{style:{lineWidth:1,stroke:Bt.lineColor},alignTick:!0,length:5,displayWithLabel:!0},subTickLine:{style:{lineWidth:1,stroke:Bt.lineColor},count:4,length:2},label:{autoRotate:!0,autoHide:!1,autoEllipsis:!1,style:{fontSize:12,fill:Bt.textColor,fontFamily:Bt.fontFamily,fontWeight:"normal"},offset:10,offsetX:0,offsetY:0},title:{autoRotate:!0,spacing:5,position:"center",style:{fontSize:12,fill:Bt.textColor,textBaseline:"middle",fontFamily:Bt.fontFamily,textAlign:"center"},iconStyle:{fill:Bt.descriptionIconFill,stroke:Bt.descriptionIconStroke},description:""},tickStates:{active:{labelStyle:{fontWeight:500},tickLineStyle:{lineWidth:2}},inactive:{labelStyle:{fill:Bt.uncheckedColor}}},optimize:{enable:!0,threshold:400}},theme:{}})},r.prototype.renderInner=function(t){this.get("line")&&this.drawLine(t),this.drawTicks(t),this.get("title")&&this.drawTitle(t)},r.prototype.isList=function(){return!0},r.prototype.getItems=function(){return this.get("ticks")},r.prototype.setItems=function(t){this.update({ticks:t})},r.prototype.updateItem=function(t,i){(0,c.mix)(t,i),this.clear(),this.render()},r.prototype.clearItems=function(){var t=this.getElementByLocalId("label-group");t&&t.clear()},r.prototype.setItemState=function(t,i,n){t[i]=n,this.updateTickStates(t)},r.prototype.hasState=function(t,i){return!!t[i]},r.prototype.getItemStates=function(t){var i=this.get("tickStates"),n=[];return(0,c.each)(i,function(a,o){t[o]&&n.push(o)}),n},r.prototype.clearItemsState=function(t){var i=this,n=this.getItemsByState(t);(0,c.each)(n,function(a){i.setItemState(a,t,!1)})},r.prototype.getItemsByState=function(t){var i=this,n=this.getItems();return(0,c.filter)(n,function(a){return i.hasState(a,t)})},r.prototype.getSidePoint=function(t,i){var n=this,a=n.getSideVector(i,t);return{x:t.x+a[0],y:t.y+a[1]}},r.prototype.getTextAnchor=function(t){var i;return(0,c.isNumberEqual)(t[0],0)?i="center":t[0]>0?i="start":t[0]<0&&(i="end"),i},r.prototype.getTextBaseline=function(t){var i;return(0,c.isNumberEqual)(t[1],0)?i="middle":t[1]>0?i="top":t[1]<0&&(i="bottom"),i},r.prototype.processOverlap=function(t){},r.prototype.drawLine=function(t){var i=this.getLinePath(),n=this.get("line");this.addShape(t,{type:"path",id:this.getElementId("line"),name:"axis-line",attrs:(0,c.mix)({path:i},n.style)})},r.prototype.getTickLineItems=function(t){var i=this,n=[],a=this.get("tickLine"),o=a.alignTick,s=a.length,l=1,u=t.length;return u>=2&&(l=t[1].value-t[0].value),(0,c.each)(t,function(h){var f=h.point;o||(f=i.getTickPoint(h.value-l/2));var v=i.getSidePoint(f,s);n.push({startPoint:f,tickValue:h.value,endPoint:v,tickId:h.id,id:"tickline-"+h.id})}),n},r.prototype.getSubTickLineItems=function(t){var i=[],n=this.get("subTickLine"),a=n.count,o=t.length;if(o>=2)for(var s=0;s<o-1;s++)for(var l=t[s],u=t[s+1],h=0;h<a;h++){var f=(h+1)/(a+1),v=(1-f)*l.tickValue+f*u.tickValue,g=this.getTickPoint(v),p=this.getSidePoint(g,n.length);i.push({startPoint:g,endPoint:p,tickValue:v,id:"sub-"+l.id+"-"+h})}return i},r.prototype.getTickLineAttrs=function(t,i,n,a){var o=this.get(i).style,s={points:[t.startPoint,t.endPoint]},l=(0,c.get)(this.get("theme"),["tickLine","style"],{});o=(0,c.isFunction)(o)?(0,c.mix)({},l,o(s,n,a)):o;var u=t.startPoint,h=t.endPoint;return(0,d.__assign)({x1:u.x,y1:u.y,x2:h.x,y2:h.y},o)},r.prototype.drawTick=function(t,i,n,a,o){this.addShape(i,{type:"line",id:this.getElementId(t.id),name:"axis-"+n,attrs:this.getTickLineAttrs(t,n,a,o)})},r.prototype.drawTickLines=function(t){var i=this,n=this.get("ticks"),a=this.get("subTickLine"),o=this.getTickLineItems(n),s=this.addGroup(t,{name:"axis-tickline-group",id:this.getElementId("tickline-group")}),l=this.get("tickLine");if((0,c.each)(o,function(h,f){if(l.displayWithLabel){var v=i.getElementId("label-"+h.tickId);t.findById(v)&&i.drawTick(h,s,"tickLine",f,o)}else i.drawTick(h,s,"tickLine",f,o)}),a){var u=this.getSubTickLineItems(o);(0,c.each)(u,function(h,f){i.drawTick(h,s,"subTickLine",f,u)})}},r.prototype.processTicks=function(){var t=this,i=this.get("ticks");(0,c.each)(i,function(n){n.point=t.getTickPoint(n.value),(0,c.isNil)(n.id)&&(n.id=n.name)})},r.prototype.drawTicks=function(t){var i=this;this.optimizeTicks(),this.processTicks(),this.get("label")&&this.drawLabels(t),this.get("tickLine")&&this.drawTickLines(t);var n=this.get("ticks");(0,c.each)(n,function(a){i.applyTickStates(a,t)})},r.prototype.optimizeTicks=function(){var t=this.get("optimize"),i=this.get("ticks");if(t&&t.enable&&t.threshold>0){var n=(0,c.size)(i);if(n>t.threshold){var a=Math.ceil(n/t.threshold),o=i.filter(function(s,l){return l%a==0});this.set("ticks",o),this.set("originalTicks",i)}}},r.prototype.getLabelAttrs=function(t,i,n){var a=this.get("label"),o=a.offset,s=a.offsetX,l=a.offsetY,u=a.rotate,h=a.formatter,f=this.getSidePoint(t.point,o),v=this.getSideVector(o,f),g=h?h(t.name,t,i):t.name,p=a.style;p=(0,c.isFunction)(p)?(0,c.get)(this.get("theme"),["label","style"],{}):p;var y=(0,c.mix)({x:f.x+s,y:f.y+l,text:g,textAlign:this.getTextAnchor(v),textBaseline:this.getTextBaseline(v)},p);return u&&(y.matrix=Pr(f,u)),y},r.prototype.drawLabels=function(t){var i=this,n=this.get("ticks"),a=this.addGroup(t,{name:"axis-label-group",id:this.getElementId("label-group")});(0,c.each)(n,function(v,g){i.addShape(a,{type:"text",name:"axis-label",id:i.getElementId("label-"+v.id),attrs:i.getLabelAttrs(v,g,n),delegateObject:{tick:v,item:v,index:g}})}),this.processOverlap(a);var o=a.getChildren(),s=(0,c.get)(this.get("theme"),["label","style"],{}),l=this.get("label"),u=l.style,h=l.formatter;if((0,c.isFunction)(u)){var f=o.map(function(v){return(0,c.get)(v.get("delegateObject"),"tick")});(0,c.each)(o,function(v,g){var p=v.get("delegateObject").tick,y=h?h(p.name,p,g):p.name,m=(0,c.mix)({},s,u(y,g,f));v.attr(m)})}},r.prototype.getTitleAttrs=function(){var t=this.get("title"),i=t.style,n=t.position,a=t.offset,o=t.spacing,s=o===void 0?0:o,l=t.autoRotate,u=i.fontSize,h=.5;n==="start"?h=0:n==="end"&&(h=1);var f=this.getTickPoint(h),v=this.getSidePoint(f,a||s+u/2),g=(0,c.mix)({x:v.x,y:v.y,text:t.text},i),p=t.rotate,y=p;if((0,c.isNil)(p)&&l){var m=this.getAxisVector(f),x=[1,0];y=te.Dg(m,x,!0)}if(y){var _=Pr(v,y);g.matrix=_}return g},r.prototype.drawTitle=function(t){var i,n=this.getTitleAttrs(),a=this.addShape(t,{type:"text",id:this.getElementId("title"),name:"axis-title",attrs:n});((i=this.get("title"))===null||i===void 0?void 0:i.description)&&this.drawDescriptionIcon(t,a,n.matrix)},r.prototype.drawDescriptionIcon=function(t,i,n){var a=this.addGroup(t,{name:"axis-description",id:this.getElementById("description")}),o=i.getBBox(),s=o.maxX,l=o.maxY,u=o.height,h=this.get("title").iconStyle,f=4,v=u/2,g=v/6,p=s+f,y=l-u/2,m=[p+v,y-v],x=m[0],_=m[1],w=[x+v,_+v],b=w[0],S=w[1],C=[x,S+v],M=C[0],L=C[1],B=[p,_+v],I=B[0],G=B[1],q=[p+v,y-u/4],ft=q[0],mt=q[1],zt=[ft,mt+g],H=zt[0],tt=zt[1],ct=[H,tt+g],nt=ct[0],lt=ct[1],xt=[nt,lt+v*3/4],Rt=xt[0],Vt=xt[1];this.addShape(a,{type:"path",id:this.getElementId("title-description-icon"),name:"axis-title-description-icon",attrs:(0,d.__assign)({path:[["M",x,_],["A",v,v,0,0,1,b,S],["A",v,v,0,0,1,M,L],["A",v,v,0,0,1,I,G],["A",v,v,0,0,1,x,_],["M",ft,mt],["L",H,tt],["M",nt,lt],["L",Rt,Vt]],lineWidth:g,matrix:n},h)}),this.addShape(a,{type:"rect",id:this.getElementId("title-description-rect"),name:"axis-title-description-rect",attrs:{x:p,y:y-u/2,width:u,height:u,stroke:"#000",fill:"#000",opacity:0,matrix:n,cursor:"pointer"}})},r.prototype.applyTickStates=function(t,i){var n=this.getItemStates(t);if(n.length){var a=this.get("tickStates"),o=this.getElementId("label-"+t.id),s=i.findById(o);if(s){var l=Ni(t,"label",a);l&&s.attr(l)}var u=this.getElementId("tickline-"+t.id),h=i.findById(u);if(h){var f=Ni(t,"tickLine",a);f&&h.attr(f)}}},r.prototype.updateTickStates=function(t){var i=this.getItemStates(t),n=this.get("tickStates"),a=this.get("label"),o=this.getElementByLocalId("label-"+t.id),s=this.get("tickLine"),l=this.getElementByLocalId("tickline-"+t.id);if(i.length){if(o){var u=Ni(t,"label",n);u&&o.attr(u)}if(l){var h=Ni(t,"tickLine",n);h&&l.attr(h)}}else o&&o.attr(a.style),l&&l.attr(s.style)},r}(be),xl=og;function eo(e,r,t,i){var n=r.getChildren(),a=!1;return(0,c.each)(n,function(o){var s=Ri(e,o,t,i);a=a||s}),a}function sg(){return _l}function lg(e,r,t){return eo(e,r,t,"head")}function _l(e,r,t){return eo(e,r,t,"tail")}function ug(e,r,t){return eo(e,r,t,"middle")}function cg(e){var r=e.attr("matrix");return r&&r[0]!==1}function wl(e){var r=cg(e)?pd(e.attr("matrix")):0;return r%360}function ro(e,r,t,i){var n=!1,a=wl(r),o=Math.abs(e?t.attr("y")-r.attr("y"):t.attr("x")-r.attr("x")),s=(e?t.attr("y")>r.attr("y"):t.attr("x")>r.attr("x"))?r.getBBox():t.getBBox();if(e){var l=Math.abs(Math.cos(a));En(l,0,Math.PI/180)?n=s.width+i>o:n=s.height/l+i>o}else{var l=Math.abs(Math.sin(a));En(l,0,Math.PI/180)?n=s.width+i>o:n=s.height/l+i>o}return n}function zi(e,r,t,i){var n=(i==null?void 0:i.minGap)||0,a=r.getChildren().slice().filter(function(p){return p.get("visible")});if(!a.length)return!1;var o=!1;t&&a.reverse();for(var s=a.length,l=a[0],u=l,h=1;h<s;h++){var f=a[h],v=f.getBBox(),g=ro(e,u,f,n);g?(f.hide(),o=!0):u=f}return o}function bl(e,r,t){var i=(t==null?void 0:t.minGap)||0,n=r.getChildren().slice();if(n.length<2)return!1;var a=!1,o=n[0],s=o.getBBox(),l=n[1],u=n.length,h=wl(o),f=Math.abs(e?l.attr("y")-o.attr("y"):l.attr("x")-o.attr("x")),v=0;if(e){var g=Math.abs(Math.cos(h));if(En(g,0,Math.PI/180)){var p=Ja(n);v=(p+i)/f}else v=(s.height/g+i)/f}else{var g=Math.abs(Math.sin(h));if(En(g,0,Math.PI/180)){var p=Ja(n);v=(p+i)/f}else v=(s.height/g+i)/f}if(v>1){v=Math.ceil(v);for(var y=0;y<u;y++)y%v!=0&&(n[y].hide(),a=!0)}return a}function hg(){return Sl}function fg(e,r,t,i){return zi(e,r,!1,i)}function vg(e,r,t,i){return zi(e,r,!0,i)}function dg(e,r,t,i){var n=(i==null?void 0:i.minGap)||0,a=r.getChildren().slice();if(a.length<=2)return!1;for(var o=!1,s=a.length,l=a[0],u=a[s-1],h=l,f=1;f<s-1;f++){var v=a[f],g=v.getBBox(),p=ro(e,h,v,n);p?(v.hide(),o=!0):h=v}var y=ro(e,h,u,n);return y&&(h.hide(),o=!0),o}function Sl(e,r,t,i){var n=bl(e,r,i);return zi(e,r,!1)&&(n=!0),n}function gg(e,r,t,i){var n=r.getChildren().slice(),a=bl(e,r,i);if(n.length>2){var o=n[0],s=n[n.length-1];o.get("visible")||(o.show(),zi(e,r,!1,i)&&(a=!0)),s.get("visible")||(s.show(),zi(e,r,!0,i)&&(a=!0))}return a}function pg(e,r){(0,c.each)(e,function(t){var i=t.attr("x"),n=t.attr("y"),a=Pr({x:i,y:n},r);t.attr("matrix",a)})}function Cl(e,r,t,i){var n=r.getChildren();if(!n.length||!e&&n.length<2)return!1;var a=Ja(n),o=!1;if(e)o=!!t&&a>t;else{var s=Math.abs(n[1].attr("x")-n[0].attr("x"));o=a>s}if(o){var l=i(t,a);pg(n,l)}return o}function yg(){return Al}function Al(e,r,t,i){return Cl(e,r,t,function(){return(0,c.isNumber)(i)?i:e?Bt.verticalAxisRotate:Bt.horizontalAxisRotate})}function mg(e,r,t){return Cl(e,r,t,function(i,n){if(!i)return e?Bt.verticalAxisRotate:Bt.horizontalAxisRotate;if(e)return-Math.acos(i/n);var a=0;return i>n?a=Math.PI/4:(a=Math.asin(i/n),a>Math.PI/4&&(a=Math.PI/4)),a})}var xg=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,d.__assign)((0,d.__assign)({},t),{type:"line",locationType:"region",start:null,end:null})},r.prototype.getLinePath=function(){var t=this.get("start"),i=this.get("end"),n=[];return n.push(["M",t.x,t.y]),n.push(["L",i.x,i.y]),n},r.prototype.getInnerLayoutBBox=function(){var t=this.get("start"),i=this.get("end"),n=e.prototype.getInnerLayoutBBox.call(this),a=Math.min(t.x,i.x,n.x),o=Math.min(t.y,i.y,n.y),s=Math.max(t.x,i.x,n.maxX),l=Math.max(t.y,i.y,n.maxY);return{x:a,y:o,minX:a,minY:o,maxX:s,maxY:l,width:s-a,height:l-o}},r.prototype.isVertical=function(){var t=this.get("start"),i=this.get("end");return(0,c.isNumberEqual)(t.x,i.x)},r.prototype.isHorizontal=function(){var t=this.get("start"),i=this.get("end");return(0,c.isNumberEqual)(t.y,i.y)},r.prototype.getTickPoint=function(t){var i=this,n=i.get("start"),a=i.get("end"),o=a.x-n.x,s=a.y-n.y;return{x:n.x+o*t,y:n.y+s*t}},r.prototype.getSideVector=function(t){var i=this.getAxisVector(),n=wt.Fv([0,0],i),a=this.get("verticalFactor"),o=[n[1],n[0]*-1];return wt.bA([0,0],o,t*a)},r.prototype.getAxisVector=function(){var t=this.get("start"),i=this.get("end");return[i.x-t.x,i.y-t.y]},r.prototype.processOverlap=function(t){var i=this,n=this.isVertical(),a=this.isHorizontal();if(!(!n&&!a)){var o=this.get("label"),s=this.get("title"),l=this.get("verticalLimitLength"),u=o.offset,h=l,f=0,v=0;s&&(f=s.style.fontSize,v=s.spacing),h&&(h=h-u-v-f);var g=this.get("overlapOrder");if((0,c.each)(g,function(m){o[m]&&i.canProcessOverlap(m)&&i.autoProcessOverlap(m,o[m],t,h)}),s&&(0,c.isNil)(s.offset)){var p=t.getCanvasBBox(),y=n?p.width:p.height;s.offset=u+y+v+f/2}}},r.prototype.canProcessOverlap=function(t){var i=this.get("label");return t==="autoRotate"?(0,c.isNil)(i.rotate):!0},r.prototype.autoProcessOverlap=function(t,i,n,a){var o=this,s=this.isVertical(),l=!1,u=ot[t];if(i===!0){var h=this.get("label");l=u.getDefault()(s,n,a)}else if((0,c.isFunction)(i))l=i(s,n,a);else if((0,c.isObject)(i)){var f=i;u[f.type]&&(l=u[f.type](s,n,a,f.cfg))}else u[i]&&(l=u[i](s,n,a));if(t==="autoRotate"){if(l){var v=n.getChildren(),g=this.get("verticalFactor");(0,c.each)(v,function(y){var m=y.attr("textAlign");if(m==="center"){var x=g>0?"end":"start";y.attr("textAlign",x)}})}}else if(t==="autoHide"){var p=n.getChildren().slice(0);(0,c.each)(p,function(y){y.get("visible")||(o.get("isRegister")&&o.unregisterElement(y),y.remove())})}},r}(xl),_g=xg,wg=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,d.__assign)((0,d.__assign)({},t),{type:"circle",locationType:"circle",center:null,radius:null,startAngle:-Math.PI/2,endAngle:Math.PI*3/2})},r.prototype.getLinePath=function(){var t=this.get("center"),i=t.x,n=t.y,a=this.get("radius"),o=a,s=this.get("startAngle"),l=this.get("endAngle"),u=[];if(Math.abs(l-s)===Math.PI*2)u=[["M",i,n-o],["A",a,o,0,1,1,i,n+o],["A",a,o,0,1,1,i,n-o],["Z"]];else{var h=this.getCirclePoint(s),f=this.getCirclePoint(l),v=Math.abs(l-s)>Math.PI?1:0,g=s>l?0:1;u=[["M",i,n],["L",h.x,h.y],["A",a,o,0,v,g,f.x,f.y],["L",i,n]]}return u},r.prototype.getTickPoint=function(t){var i=this.get("startAngle"),n=this.get("endAngle"),a=i+(n-i)*t;return this.getCirclePoint(a)},r.prototype.getSideVector=function(t,i){var n=this.get("center"),a=[i.x-n.x,i.y-n.y],o=this.get("verticalFactor"),s=wt.kE(a);return wt.bA(a,a,o*t/s),a},r.prototype.getAxisVector=function(t){var i=this.get("center"),n=[t.x-i.x,t.y-i.y];return[n[1],-1*n[0]]},r.prototype.getCirclePoint=function(t,i){var n=this.get("center");return i=i||this.get("radius"),{x:n.x+Math.cos(t)*i,y:n.y+Math.sin(t)*i}},r.prototype.canProcessOverlap=function(t){var i=this.get("label");return t==="autoRotate"?(0,c.isNil)(i.rotate):!0},r.prototype.processOverlap=function(t){var i=this,n=this.get("label"),a=this.get("title"),o=this.get("verticalLimitLength"),s=n.offset,l=o,u=0,h=0;a&&(u=a.style.fontSize,h=a.spacing),l&&(l=l-s-h-u);var f=this.get("overlapOrder");if((0,c.each)(f,function(g){n[g]&&i.canProcessOverlap(g)&&i.autoProcessOverlap(g,n[g],t,l)}),a&&(0,c.isNil)(a.offset)){var v=t.getCanvasBBox().height;a.offset=s+v+h+u/2}},r.prototype.autoProcessOverlap=function(t,i,n,a){var o=this,s=!1,l=ot[t];if(a>0)if(i===!0)s=l.getDefault()(!1,n,a);else if((0,c.isFunction)(i))s=i(!1,n,a);else if((0,c.isObject)(i)){var u=i;l[u.type]&&(s=l[u.type](!1,n,a,u.cfg))}else l[i]&&(s=l[i](!1,n,a));if(t==="autoRotate"){if(s){var h=n.getChildren(),f=this.get("verticalFactor");(0,c.each)(h,function(g){var p=g.attr("textAlign");if(p==="center"){var y=f>0?"end":"start";g.attr("textAlign",y)}})}}else if(t==="autoHide"){var v=n.getChildren().slice(0);(0,c.each)(v,function(g){g.get("visible")||(o.get("isRegister")&&o.unregisterElement(g),g.remove())})}},r}(xl),bg=wg,Sg=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,d.__assign)((0,d.__assign)({},t),{name:"crosshair",type:"base",line:{},text:null,textBackground:{},capture:!1,defaultCfg:{line:{style:{lineWidth:1,stroke:Bt.lineColor}},text:{position:"start",offset:10,autoRotate:!1,content:null,style:{fill:Bt.textColor,textAlign:"center",textBaseline:"middle",fontFamily:Bt.fontFamily}},textBackground:{padding:5,style:{stroke:Bt.lineColor}}}})},r.prototype.renderInner=function(t){this.get("line")&&this.renderLine(t),this.get("text")&&(this.renderText(t),this.renderBackground(t))},r.prototype.renderText=function(t){var i=this.get("text"),n=i.style,a=i.autoRotate,o=i.content;if(!(0,c.isNil)(o)){var s=this.getTextPoint(),l=null;if(a){var u=this.getRotateAngle();l=Pr(s,u)}this.addShape(t,{type:"text",name:"crosshair-text",id:this.getElementId("text"),attrs:(0,d.__assign)((0,d.__assign)((0,d.__assign)({},s),{text:o,matrix:l}),n)})}},r.prototype.renderLine=function(t){var i=this.getLinePath(),n=this.get("line"),a=n.style;this.addShape(t,{type:"path",name:"crosshair-line",id:this.getElementId("line"),attrs:(0,d.__assign)({path:i},a)})},r.prototype.renderBackground=function(t){var i=this.getElementId("text"),n=t.findById(i),a=this.get("textBackground");if(a&&n){var o=n.getBBox(),s=Fn(a.padding),l=a.style,u=this.addShape(t,{type:"rect",name:"crosshair-text-background",id:this.getElementId("text-background"),attrs:(0,d.__assign)({x:o.x-s[3],y:o.y-s[0],width:o.width+s[1]+s[3],height:o.height+s[0]+s[2],matrix:n.attr("matrix")},l)});u.toBack()}},r}(be),io=Sg,Cg=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,d.__assign)((0,d.__assign)({},t),{type:"line",locationType:"region",start:null,end:null})},r.prototype.getRotateAngle=function(){var t=this.getLocation(),i=t.start,n=t.end,a=this.get("text").position,o=Math.atan2(n.y-i.y,n.x-i.x),s=a==="start"?o-Math.PI/2:o+Math.PI/2;return s},r.prototype.getTextPoint=function(){var t=this.getLocation(),i=t.start,n=t.end,a=this.get("text"),o=a.position,s=a.offset;return yl(i,n,o,s)},r.prototype.getLinePath=function(){var t=this.getLocation(),i=t.start,n=t.end;return[["M",i.x,i.y],["L",n.x,n.y]]},r}(io),Fl=Cg,Ag=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,d.__assign)((0,d.__assign)({},t),{type:"circle",locationType:"circle",center:null,radius:100,startAngle:-Math.PI/2,endAngle:Math.PI*3/2})},r.prototype.getRotateAngle=function(){var t=this.getLocation(),i=t.startAngle,n=t.endAngle,a=this.get("text").position,o=a==="start"?i+Math.PI/2:n-Math.PI/2;return o},r.prototype.getTextPoint=function(){var t=this.get("text"),i=t.position,n=t.offset,a=this.getLocation(),o=a.center,s=a.radius,l=a.startAngle,u=a.endAngle,h=i==="start"?l:u,f=this.getRotateAngle()-Math.PI,v=ri(o,s,h),g=Math.cos(f)*n,p=Math.sin(f)*n;return{x:v.x+g,y:v.y+p}},r.prototype.getLinePath=function(){var t=this.getLocation(),i=t.center,n=t.radius,a=t.startAngle,o=t.endAngle,s=null;if(o-a==Math.PI*2){var l=i.x,u=i.y;s=[["M",l,u-n],["A",n,n,0,1,1,l,u+n],["A",n,n,0,1,1,l,u-n],["Z"]]}else{var h=ri(i,n,a),f=ri(i,n,o),v=Math.abs(o-a)>Math.PI?1:0,g=a>o?0:1;s=[["M",h.x,h.y],["A",n,n,0,v,g,f.x,f.y]]}return s},r}(io),Fg=Ag,Vi="g2-crosshair",no=Vi+"-line",ao=Vi+"-text",Gi,Eg=(Gi={},Gi[""+Vi]={position:"relative"},Gi[""+no]={position:"absolute",backgroundColor:"rgba(0, 0, 0, 0.25)"},Gi[""+ao]={position:"absolute",color:Bt.textColor,fontFamily:Bt.fontFamily},Gi),Mg=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,d.__assign)((0,d.__assign)({},t),{name:"crosshair",type:"html",locationType:"region",start:{x:0,y:0},end:{x:0,y:0},capture:!1,text:null,containerTpl:'<div class="'+Vi+'"></div>',crosshairTpl:'<div class="'+no+'"></div>',textTpl:'<span class="'+ao+'">{content}</span>',domStyles:null,containerClassName:Vi,defaultStyles:Eg,defaultCfg:{text:{position:"start",content:null,align:"center",offset:10}}})},r.prototype.render=function(){this.resetText(),this.resetPosition()},r.prototype.initCrossHair=function(){var t=this.getContainer(),i=this.get("crosshairTpl"),n=(0,E.Z)(i);t.appendChild(n),this.applyStyle(no,n),this.set("crosshairEl",n)},r.prototype.getTextPoint=function(){var t=this.getLocation(),i=t.start,n=t.end,a=this.get("text"),o=a.position,s=a.offset;return yl(i,n,o,s)},r.prototype.resetText=function(){var t=this.get("text"),i=this.get("textEl");if(t){var n=t.content;if(!i){var a=this.getContainer(),o=(0,c.substitute)(this.get("textTpl"),t);i=(0,E.Z)(o),a.appendChild(i),this.applyStyle(ao,i),this.set("textEl",i)}i.innerHTML=n}else i&&i.remove()},r.prototype.isVertical=function(t,i){return t.x===i.x},r.prototype.resetPosition=function(){var t=this.get("crosshairEl");t||(this.initCrossHair(),t=this.get("crosshairEl"));var i=this.get("start"),n=this.get("end"),a=Math.min(i.x,n.x),o=Math.min(i.y,n.y);this.isVertical(i,n)?(0,k.Z)(t,{width:"1px",height:Fe(Math.abs(n.y-i.y))}):(0,k.Z)(t,{height:"1px",width:Fe(Math.abs(n.x-i.x))}),(0,k.Z)(t,{top:Fe(o),left:Fe(a)}),this.alignText()},r.prototype.alignText=function(){var t=this.get("textEl");if(t){var i=this.get("text").align,n=t.clientWidth,a=this.getTextPoint();switch(i){case"center":a.x=a.x-n/2;break;case"right":a.x=a.x-n;case"left":break}(0,k.Z)(t,{top:Fe(a.y),left:Fe(a.x)})}},r.prototype.updateInner=function(t){(0,c.hasKey)(t,"text")&&this.resetText(),e.prototype.updateInner.call(this,t)},r}(to),Tg=Mg,Lg=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,d.__assign)((0,d.__assign)({},t),{name:"grid",line:{},alternateColor:null,capture:!1,items:[],closed:!1,defaultCfg:{line:{type:"line",style:{lineWidth:1,stroke:Bt.lineColor}}}})},r.prototype.getLineType=function(){var t=this.get("line")||this.get("defaultCfg").line;return t.type},r.prototype.renderInner=function(t){this.drawGrid(t)},r.prototype.getAlternatePath=function(t,i){var n=this.getGridPath(t),a=i.slice(0).reverse(),o=this.getGridPath(a,!0),s=this.get("closed");return s?n=n.concat(o):(o[0][0]="L",n=n.concat(o),n.push(["Z"])),n},r.prototype.getPathStyle=function(){return this.get("line").style},r.prototype.drawGrid=function(t){var i=this,n=this.get("line"),a=this.get("items"),o=this.get("alternateColor"),s=null;(0,c.each)(a,function(l,u){var h=l.id||u;if(n){var f=i.getPathStyle();f=(0,c.isFunction)(f)?f(l,u,a):f;var v=i.getElementId("line-"+h),g=i.getGridPath(l.points);i.addShape(t,{type:"path",name:"grid-line",id:v,attrs:(0,c.mix)({path:g},f)})}if(o&&u>0){var p=i.getElementId("region-"+h),y=u%2==0;if((0,c.isString)(o))y&&i.drawAlternateRegion(p,t,s.points,l.points,o);else{var m=y?o[1]:o[0];i.drawAlternateRegion(p,t,s.points,l.points,m)}}s=l})},r.prototype.drawAlternateRegion=function(t,i,n,a,o){var s=this.getAlternatePath(n,a);this.addShape(i,{type:"path",id:t,name:"grid-region",attrs:{path:s,fill:o}})},r}(be),El=Lg;function Ig(e,r,t,i){var n=t-e,a=i-r;return Math.sqrt(n*n+a*a)}var Og=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,d.__assign)((0,d.__assign)({},t),{type:"circle",center:null,closed:!0})},r.prototype.getGridPath=function(t,i){var n=this.getLineType(),a=this.get("closed"),o=[];if(t.length)if(n==="circle"){var s=this.get("center"),l=t[0],u=Ig(s.x,s.y,l.x,l.y),h=i?0:1;a?(o.push(["M",s.x,s.y-u]),o.push(["A",u,u,0,0,h,s.x,s.y+u]),o.push(["A",u,u,0,0,h,s.x,s.y-u]),o.push(["Z"])):(0,c.each)(t,function(f,v){v===0?o.push(["M",f.x,f.y]):o.push(["A",u,u,0,0,h,f.x,f.y])})}else(0,c.each)(t,function(f,v){v===0?o.push(["M",f.x,f.y]):o.push(["L",f.x,f.y])}),a&&o.push(["Z"]);return o},r}(El),Pg=Og,Dg=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,d.__assign)((0,d.__assign)({},t),{type:"line"})},r.prototype.getGridPath=function(t){var i=[];return(0,c.each)(t,function(n,a){a===0?i.push(["M",n.x,n.y]):i.push(["L",n.x,n.y])}),i},r}(El),kg=Dg,Bg=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,d.__assign)((0,d.__assign)({},t),{name:"legend",layout:"horizontal",locationType:"point",x:0,y:0,offsetX:0,offsetY:0,title:null,background:null})},r.prototype.getLayoutBBox=function(){var t=e.prototype.getLayoutBBox.call(this),i=this.get("maxWidth"),n=this.get("maxHeight"),a=t.width,o=t.height;return i&&(a=Math.min(a,i)),n&&(o=Math.min(o,n)),Bi(t.minX,t.minY,a,o)},r.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetLocation()},r.prototype.resetLocation=function(){var t=this.get("x"),i=this.get("y"),n=this.get("offsetX"),a=this.get("offsetY");this.moveElementTo(this.get("group"),{x:t+n,y:i+a})},r.prototype.applyOffset=function(){this.resetLocation()},r.prototype.getDrawPoint=function(){return this.get("currentPoint")},r.prototype.setDrawPoint=function(t){return this.set("currentPoint",t)},r.prototype.renderInner=function(t){this.resetDraw(),this.get("title")&&this.drawTitle(t),this.drawLegendContent(t),this.get("background")&&this.drawBackground(t)},r.prototype.drawBackground=function(t){var i=this.get("background"),n=t.getBBox(),a=Fn(i.padding),o=(0,d.__assign)({x:0,y:0,width:n.width+a[1]+a[3],height:n.height+a[0]+a[2]},i.style),s=this.addShape(t,{type:"rect",id:this.getElementId("background"),name:"legend-background",attrs:o});s.toBack()},r.prototype.drawTitle=function(t){var i=this.get("currentPoint"),n=this.get("title"),a=n.spacing,o=n.style,s=n.text,l=this.addShape(t,{type:"text",id:this.getElementId("title"),name:"legend-title",attrs:(0,d.__assign)({text:s,x:i.x,y:i.y},o)}),u=l.getBBox();this.set("currentPoint",{x:i.x,y:u.maxY+a})},r.prototype.resetDraw=function(){var t=this.get("background"),i={x:0,y:0};if(t){var n=Fn(t.padding);i.x=n[3],i.y=n[0]}this.set("currentPoint",i)},r}(be),Ml=Bg,oo={marker:{style:{inactiveFill:"#000",inactiveOpacity:.45,fill:"#000",opacity:1,size:12}},text:{style:{fill:"#ccc",fontSize:12}}},Tn={fill:Bt.textColor,fontSize:12,textAlign:"start",textBaseline:"middle",fontFamily:Bt.fontFamily,fontWeight:"normal",lineHeight:12},so="navigation-arrow-right",lo="navigation-arrow-left",Tl={right:90*Math.PI/180,left:(360-90)*Math.PI/180,up:0,down:180*Math.PI/180},Rg=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.currentPageIndex=1,t.totalPagesCnt=1,t.pageWidth=0,t.pageHeight=0,t.startX=0,t.startY=0,t.onNavigationBack=function(){var i=t.getElementByLocalId("item-group");if(t.currentPageIndex>1){t.currentPageIndex-=1,t.updateNavigation();var n=t.getCurrentNavigationMatrix();t.get("animate")?i.animate({matrix:n},100):i.attr({matrix:n})}},t.onNavigationAfter=function(){var i=t.getElementByLocalId("item-group");if(t.currentPageIndex<t.totalPagesCnt){t.currentPageIndex+=1,t.updateNavigation();var n=t.getCurrentNavigationMatrix();t.get("animate")?i.animate({matrix:n},100):i.attr({matrix:n})}},t}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,d.__assign)((0,d.__assign)({},t),{name:"legend",type:"category",itemSpacing:24,itemMarginBottom:8,maxItemWidth:null,itemWidth:null,itemHeight:null,itemName:{},itemValue:null,maxWidth:null,maxHeight:null,marker:{},radio:null,items:[],itemStates:{},itemBackground:{},pageNavigator:{},defaultCfg:{title:{spacing:5,style:{fill:Bt.textColor,fontSize:12,textAlign:"start",textBaseline:"top"}},background:{padding:5,style:{stroke:Bt.lineColor}},itemBackground:{style:{opacity:0,fill:"#fff"}},pageNavigator:oo,itemName:{spacing:16,style:Tn},marker:{spacing:8,style:{r:6,symbol:"circle"}},itemValue:{alignRight:!1,formatter:null,style:Tn,spacing:6},itemStates:{active:{nameStyle:{opacity:.8}},unchecked:{nameStyle:{fill:Bt.uncheckedColor},markerStyle:{fill:Bt.uncheckedColor,stroke:Bt.uncheckedColor}},inactive:{nameStyle:{fill:Bt.uncheckedColor},markerStyle:{opacity:.2}}}}})},r.prototype.isList=function(){return!0},r.prototype.getItems=function(){return this.get("items")},r.prototype.setItems=function(t){this.update({items:t})},r.prototype.updateItem=function(t,i){(0,c.mix)(t,i),this.clear(),this.render()},r.prototype.clearItems=function(){var t=this.getElementByLocalId("item-group");t&&t.clear()},r.prototype.setItemState=function(t,i,n){t[i]=n;var a=this.getElementByLocalId("item-"+t.id);if(a){var o=this.getItems(),s=o.indexOf(t),l=this.createOffScreenGroup(),u=this.drawItem(t,s,this.getItemHeight(),l);this.updateElements(u,a),this.clearUpdateStatus(a)}},r.prototype.hasState=function(t,i){return!!t[i]},r.prototype.getItemStates=function(t){var i=this.get("itemStates"),n=[];return(0,c.each)(i,function(a,o){t[o]&&n.push(o)}),n},r.prototype.clearItemsState=function(t){var i=this,n=this.getItemsByState(t);(0,c.each)(n,function(a){i.setItemState(a,t,!1)})},r.prototype.getItemsByState=function(t){var i=this,n=this.getItems();return(0,c.filter)(n,function(a){return i.hasState(a,t)})},r.prototype.drawLegendContent=function(t){this.processItems(),this.drawItems(t)},r.prototype.processItems=function(){var t=this.get("items");(0,c.each)(t,function(i){i.id||(i.id=i.name)})},r.prototype.drawItems=function(t){var i=this,n=this.addGroup(t,{id:this.getElementId("item-container-group"),name:"legend-item-container-group"}),a=this.addGroup(n,{id:this.getElementId("item-group"),name:"legend-item-group"}),o=this.getItemHeight(),s=this.get("itemWidth"),l=this.get("itemSpacing"),u=this.get("itemMarginBottom"),h=this.get("currentPoint"),f=h.x,v=h.y,g=this.get("layout"),p=this.get("items"),y=!1,m=0,x=this.get("maxWidth"),_=this.get("maxHeight");(0,c.each)(p,function(w,b){var S=i.drawItem(w,b,o,a),C=S.getBBox(),M=s||C.width;M>m&&(m=M),g==="horizontal"?(x&&x<h.x+M-f&&(y=!0,h.x=f,h.y+=o+u),i.moveElementTo(S,h),h.x+=M+l):(_&&_<h.y+o+u-v&&(y=!0,h.x+=m+l,h.y=v,m=0),i.moveElementTo(S,h),h.y+=o+u)}),y&&this.get("flipPage")&&(this.pageHeight=0,this.pageWidth=0,this.totalPagesCnt=1,this.startX=f,this.startY=v,this.adjustNavigation(t,a))},r.prototype.getItemHeight=function(){var t=this.get("itemHeight");if(!t){var i=(this.get("itemName")||{}).style;if((0,c.isFunction)(i)){var n=this.getItems();n.forEach(function(a,o){var s=(0,d.__assign)((0,d.__assign)({},Tn),i(a,o,n)).fontSize;t<s&&(t=s)})}else i&&(t=i.fontSize)}return t},r.prototype.drawMarker=function(t,i,n,a){var o=(0,d.__assign)((0,d.__assign)((0,d.__assign)({x:0,y:a/2},i.style),{symbol:(0,c.get)(n.marker,"symbol","circle")}),(0,c.get)(n.marker,"style",{})),s=this.addShape(t,{type:"marker",id:this.getElementId("item-"+n.id+"-marker"),name:"legend-item-marker",attrs:o}),l=s.getBBox();s.attr("x",l.width/2);var u=s.attr(),h=u.stroke,f=u.fill;return h&&s.set("isStroke",!0),f&&s.set("isFill",!0),s},r.prototype.drawItemText=function(t,i,n,a,o,s,l){var u=n.formatter,h=n.style,f=(0,d.__assign)((0,d.__assign)({x:s,y:o/2,text:u?u(a[i],a,l):a[i]},Tn),(0,c.isFunction)(h)?h(a,l,this.getItems()):h);return this.addShape(t,{type:"text",id:this.getElementId("item-"+a.id+"-"+i),name:"legend-item-"+i,attrs:f})},r.prototype.drawRadio=function(t,i,n,a,o){var s,l,u=i.style||{},h=(s=u.r)!==null&&s!==void 0?s:a/2,f=h*3.6/8,v=[o+h,a/2-h],g=v[0],p=v[1],y=[g+h,p+h],m=y[0],x=y[1],_=[g,x+h],w=_[0],b=_[1],S=[o,p+h],C=S[0],M=S[1],L=n.showRadio,B=(0,d.__assign)((0,d.__assign)({path:[["M",g,p],["A",h,h,0,0,1,m,x],["L",m-f,x],["L",m,x],["A",h,h,0,0,1,w,b],["L",w,b-f],["L",w,b],["A",h,h,0,0,1,C,M],["L",C+f,M],["L",C,M],["A",h,h,0,0,1,g,p],["L",g,p+f]],stroke:"#000000",fill:"#ffffff"},u),{opacity:L?(l=u==null?void 0:u.opacity)!==null&&l!==void 0?l:.45:0}),I=this.addShape(t,{type:"path",id:this.getElementId("item-"+n.id+"-radio"),name:"legend-item-radio",attrs:B});return I.set("tip",i.tip),I},r.prototype.drawItem=function(t,i,n,a){var o="item-"+t.id,s=this.addGroup(a,{name:"legend-item-container",id:this.getElementId("item-container-"+o),delegateObject:{item:t,index:i}}),l=this.addGroup(s,{name:"legend-item",id:this.getElementId(o),delegateObject:{item:t,index:i}}),u=this.get("marker"),h=this.get("itemName"),f=this.get("itemValue"),v=this.get("itemBackground"),g=this.get("radio"),p=this.getLimitItemWidth(),y=0;if(u){var m=this.drawMarker(l,u,t,n),x=u.spacing,_=(0,c.get)(t,["marker","spacing"]);(0,c.isNumber)(_)&&(x=_),y=m.getBBox().maxX+x}if(h){var w=this.drawItemText(l,"name",h,t,n,y,i);p&&Ri(!0,w,(0,c.clamp)(p-y,0,p)),y=w.getBBox().maxX+h.spacing}if(f){var b=this.drawItemText(l,"value",f,t,n,y,i);p&&(f.alignRight?(b.attr({textAlign:"right",x:p}),Ri(!0,b,(0,c.clamp)(p-y,0,p),"head")):Ri(!0,b,(0,c.clamp)(p-y,0,p))),y=b.getBBox().maxX+f.spacing}if(g&&this.drawRadio(l,g,t,n,y),v){var S=l.getBBox(),C=this.addShape(l,{type:"rect",name:"legend-item-background",id:this.getElementId(o+"-background"),attrs:(0,d.__assign)({x:0,y:0,width:S.width,height:n},v.style)});C.toBack()}return this.applyItemStates(t,l),l},r.prototype.adjustNavigation=function(t,i){var n=this,a=this.startX,o=this.startY,s=this.get("layout"),l=i.findAll(function(I){return I.get("name")==="legend-item"}),u=this.get("maxWidth"),h=this.get("maxHeight"),f=this.get("itemWidth"),v=this.get("itemSpacing"),g=this.getItemHeight(),p=(0,c.deepMix)({},oo,this.get("pageNavigator")),y=this.drawNavigation(t,s,"00/00",p),m=y.getBBox(),x={x:a,y:o},_=1,w=0,b=0,S=0,C=this.get("itemMarginBottom");if(s==="horizontal"){var M=this.get("maxRow")||1,L=g+(M===1?0:C);this.pageHeight=L*M,(0,c.each)(l,function(I){var G=I.getBBox(),q=f||G.width;(w&&w<x.x+q+v||u<x.x+q+v+m.width)&&(_===1&&(w=x.x+v,n.pageWidth=w,n.moveElementTo(y,{x:u-v-m.width-m.minX,y:x.y+g/2-m.height/2-m.minY})),_+=1,x.x=a,x.y+=L),n.moveElementTo(I,x),I.getParent().setClip({type:"rect",attrs:{x:x.x,y:x.y,width:q+v,height:g}}),x.x+=q+v})}else{(0,c.each)(l,function(I){var G=I.getBBox();G.width>b&&(b=G.width)}),S=b,b+=v,u&&(b=Math.min(u,b),S=Math.min(u,S)),this.pageWidth=b,this.pageHeight=h-Math.max(m.height,g+C);var B=Math.floor(this.pageHeight/(g+C));(0,c.each)(l,function(I,G){G!==0&&G%B==0&&(_+=1,x.x+=b,x.y=o),n.moveElementTo(I,x),I.getParent().setClip({type:"rect",attrs:{x:x.x,y:x.y,width:b,height:g}}),x.y+=g+C}),this.totalPagesCnt=_,this.moveElementTo(y,{x:a+S/2-m.width/2-m.minX,y:h-m.height-m.minY})}this.pageHeight&&this.pageWidth&&i.getParent().setClip({type:"rect",attrs:{x:this.startX,y:this.startY,width:this.pageWidth,height:this.pageHeight}}),s==="horizontal"&&this.get("maxRow")?this.totalPagesCnt=Math.ceil(_/this.get("maxRow")):this.totalPagesCnt=_,this.currentPageIndex>this.totalPagesCnt&&(this.currentPageIndex=1),this.updateNavigation(y),i.attr("matrix",this.getCurrentNavigationMatrix())},r.prototype.drawNavigation=function(t,i,n,a){var o={x:0,y:0},s=this.addGroup(t,{id:this.getElementId("navigation-group"),name:"legend-navigation"}),l=(0,c.get)(a.marker,"style",{}),u=l.size,h=u===void 0?12:u,f=(0,d.__rest)(l,["size"]),v=this.drawArrow(s,o,lo,i==="horizontal"?"up":"left",h,f);v.on("click",this.onNavigationBack);var g=v.getBBox();o.x+=g.width+2;var p=this.addShape(s,{type:"text",id:this.getElementId("navigation-text"),name:"navigation-text",attrs:(0,d.__assign)({x:o.x,y:o.y+h/2,text:n,textBaseline:"middle"},(0,c.get)(a.text,"style"))}),y=p.getBBox();o.x+=y.width+2;var m=this.drawArrow(s,o,so,i==="horizontal"?"down":"right",h,f);return m.on("click",this.onNavigationAfter),s},r.prototype.updateNavigation=function(t){var i=(0,c.deepMix)({},oo,this.get("pageNavigator")),n=i.marker.style,a=n.fill,o=n.opacity,s=n.inactiveFill,l=n.inactiveOpacity,u=this.currentPageIndex+"/"+this.totalPagesCnt,h=t?t.getChildren()[1]:this.getElementByLocalId("navigation-text"),f=t?t.findById(this.getElementId(lo)):this.getElementByLocalId(lo),v=t?t.findById(this.getElementId(so)):this.getElementByLocalId(so);h.attr("text",u),f.attr("opacity",this.currentPageIndex===1?l:o),f.attr("fill",this.currentPageIndex===1?s:a),f.attr("cursor",this.currentPageIndex===1?"not-allowed":"pointer"),v.attr("opacity",this.currentPageIndex===this.totalPagesCnt?l:o),v.attr("fill",this.currentPageIndex===this.totalPagesCnt?s:a),v.attr("cursor",this.currentPageIndex===this.totalPagesCnt?"not-allowed":"pointer");var g=f.getBBox().maxX+2;h.attr("x",g),g+=h.getBBox().width+2,this.updateArrowPath(v,{x:g,y:0})},r.prototype.drawArrow=function(t,i,n,a,o,s){var l=i.x,u=i.y,h=this.addShape(t,{type:"path",id:this.getElementId(n),name:n,attrs:(0,d.__assign)({size:o,direction:a,path:[["M",l+o/2,u],["L",l,u+o],["L",l+o,u+o],["Z"]],cursor:"pointer"},s)});return h.attr("matrix",Pr({x:l+o/2,y:u+o/2},Tl[a])),h},r.prototype.updateArrowPath=function(t,i){var n=i.x,a=i.y,o=t.attr(),s=o.size,l=o.direction,u=Pr({x:n+s/2,y:a+s/2},Tl[l]);t.attr("path",[["M",n+s/2,a],["L",n,a+s],["L",n+s,a+s],["Z"]]),t.attr("matrix",u)},r.prototype.getCurrentNavigationMatrix=function(){var t=this,i=t.currentPageIndex,n=t.pageWidth,a=t.pageHeight,o=this.get("layout"),s=o==="horizontal"?{x:0,y:a*(1-i)}:{x:n*(1-i),y:0};return qa(s)},r.prototype.applyItemStates=function(t,i){var n=this.getItemStates(t),a=n.length>0;if(a){var o=i.getChildren(),s=this.get("itemStates");(0,c.each)(o,function(l){var u=l.get("name"),h=u.split("-")[2],f=Ni(t,h,s);f&&(l.attr(f),h==="marker"&&!(l.get("isStroke")&&l.get("isFill"))&&(l.get("isStroke")&&l.attr("fill",null),l.get("isFill")&&l.attr("stroke",null)))})}},r.prototype.getLimitItemWidth=function(){var t=this.get("itemWidth"),i=this.get("maxItemWidth");return i?t&&(i=t<=i?t:i):t&&(i=t),i},r}(Ml),Ng=Rg,zg=1.4,Ll=.4,Vg=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,d.__assign)((0,d.__assign)({},t),{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:Bt.textColor,textBaseline:"middle",fontFamily:Bt.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:Bt.textColor,fontSize:12,textAlign:"start",textBaseline:"top"}}}})},r.prototype.isSlider=function(){return!0},r.prototype.getValue=function(){return this.getCurrentValue()},r.prototype.getRange=function(){return{min:this.get("min"),max:this.get("max")}},r.prototype.setRange=function(t,i){this.update({min:t,max:i})},r.prototype.setValue=function(t){var i=this.getValue();this.set("value",t);var n=this.get("group");this.resetTrackClip(),this.get("slidable")&&this.resetHandlers(n),this.delegateEmit("valuechanged",{originValue:i,value:t})},r.prototype.initEvent=function(){var t=this.get("group");this.bindSliderEvent(t),this.bindRailEvent(t),this.bindTrackEvent(t)},r.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)},r.prototype.bindSliderEvent=function(t){this.bindHandlersEvent(t)},r.prototype.bindHandlersEvent=function(t){var i=this;t.on("legend-handler-min:drag",function(n){var a=i.getValueByCanvasPoint(n.x,n.y),o=i.getCurrentValue(),s=o[1];s<a&&(s=a),i.setValue([a,s])}),t.on("legend-handler-max:drag",function(n){var a=i.getValueByCanvasPoint(n.x,n.y),o=i.getCurrentValue(),s=o[0];s>a&&(s=a),i.setValue([s,a])})},r.prototype.bindRailEvent=function(t){},r.prototype.bindTrackEvent=function(t){var i=this,n=null;t.on("legend-track:dragstart",function(a){n={x:a.x,y:a.y}}),t.on("legend-track:drag",function(a){if(!!n){var o=i.getValueByCanvasPoint(n.x,n.y),s=i.getValueByCanvasPoint(a.x,a.y),l=i.getCurrentValue(),u=l[1]-l[0],h=i.getRange(),f=s-o;f<0?l[0]+f>h.min?i.setValue([l[0]+f,l[1]+f]):i.setValue([h.min,h.min+u]):f>0&&(f>0&&l[1]+f<h.max?i.setValue([l[0]+f,l[1]+f]):i.setValue([h.max-u,h.max])),n={x:a.x,y:a.y}}}),t.on("legend-track:dragend",function(a){n=null})},r.prototype.drawLabels=function(t){this.drawLabel("min",t),this.drawLabel("max",t)},r.prototype.drawLabel=function(t,i){var n=this.get("label"),a=n.style,o=n.align,s=n.formatter,l=this.get(t),u=this.getLabelAlignAttrs(t,o),h="label-"+t;this.addShape(i,{type:"text",id:this.getElementId(h),name:"legend-label-"+t,attrs:(0,d.__assign)((0,d.__assign)({x:0,y:0,text:(0,c.isFunction)(s)?s(l):l},a),u)})},r.prototype.getLabelAlignAttrs=function(t,i){var n=this.isVertical(),a="center",o="middle";return n?(a="start",i!=="rail"?t==="min"?o="top":o="bottom":o="top"):i!=="rail"?(o="top",t==="min"?a="start":a="end"):(a="start",o="middle"),{textAlign:a,textBaseline:o}},r.prototype.getRailPath=function(t,i,n,a){var o=this.get("rail"),s=o.size,l=o.defaultLength,u=o.type,h=this.isVertical(),f=l,v=n,g=a;v||(v=h?s:f),g||(g=h?f:s);var p=[];return u==="color"?(p.push(["M",t,i]),p.push(["L",t+v,i]),p.push(["L",t+v,i+g]),p.push(["L",t,i+g]),p.push(["Z"])):(p.push(["M",t+v,i]),p.push(["L",t+v,i+g]),p.push(["L",t,i+g]),p.push(["Z"])),p},r.prototype.drawRail=function(t){var i=this.get("rail"),n=i.style;this.addShape(t,{type:"path",id:this.getElementId("rail"),name:"legend-rail",attrs:(0,d.__assign)({path:this.getRailPath(0,0)},n)})},r.prototype.getTrackColor=function(t){var i=t.length;if(!i)return null;if(i===1)return t[0];var n;this.isVertical()?n="l(90)":n="l(0)";for(var a=0;a<i;a++){var o=a/(i-1);n+=" "+o+":"+t[a]}return n},r.prototype.getTrackPath=function(t){var i=this.getRailShape(t),n=i.attr("path");return(0,c.clone)(n)},r.prototype.getClipTrackAttrs=function(t){var i=this.getCurrentValue(),n=i[0],a=i[1],o=this.getRailBBox(t),s=this.getPointByValue(n,t),l=this.getPointByValue(a,t),u=this.isVertical(),h,f,v,g;return u?(h=o.minX,f=s.y,v=o.width,g=l.y-s.y):(h=s.x,f=o.minY,v=l.x-s.x,g=o.height),{x:h,y:f,width:v,height:g}},r.prototype.getTrackAttrs=function(t){var i=this.get("track"),n=this.get("colors"),a=this.getTrackPath(t);return(0,c.mix)({path:a,fill:this.getTrackColor(n)},i.style)},r.prototype.resetTrackClip=function(t){var i=t||this.get("group"),n=this.getElementId("track"),a=i.findById(n),o=a.getClip(),s=this.getClipTrackAttrs(t);o?o.attr(s):a.setClip({type:"rect",attrs:s})},r.prototype.resetTrack=function(t){var i=this.getElementId("track"),n=t.findById(i),a=this.getTrackAttrs(t);n?n.attr(a):this.addShape(t,{type:"path",id:i,draggable:this.get("slidable"),name:"legend-track",attrs:a})},r.prototype.getPointByValue=function(t,i){var n=this.getRange(),a=n.min,o=n.max,s=(t-a)/(o-a),l=this.getRailBBox(i),u=this.isVertical(),h={x:0,y:0};return u?(h.x=l.minX+l.width/2,h.y=Dr(l.minY,l.maxY,s)):(h.x=Dr(l.minX,l.maxX,s),h.y=l.minY+l.height/2),h},r.prototype.getRailShape=function(t){var i=t||this.get("group");return i.findById(this.getElementId("rail"))},r.prototype.getRailBBox=function(t){var i=this.getRailShape(t),n=i.getBBox();return n},r.prototype.getRailCanvasBBox=function(){var t=this.get("group"),i=t.findById(this.getElementId("rail")),n=i.getCanvasBBox();return n},r.prototype.isVertical=function(){return this.get("layout")==="vertical"},r.prototype.getValueByCanvasPoint=function(t,i){var n=this.getRange(),a=n.min,o=n.max,s=this.getRailCanvasBBox(),l=this.isVertical(),u=this.get("step"),h;l?h=(i-s.minY)/s.height:h=(t-s.minX)/s.width;var f=Dr(a,o,h);if(u){var v=Math.round((f-a)/u);f=a+v*u}return f>o&&(f=o),f<a&&(f=a),f},r.prototype.getCurrentValue=function(){var t=this.get("value");if(!t){var i=this.get("values");return i?[Math.max(Math.min.apply(Math,(0,d.__spreadArrays)(i,[this.get("max")])),this.get("min")),Math.min(Math.max.apply(Math,(0,d.__spreadArrays)(i,[this.get("min")])),this.get("max"))]:[this.get("min"),this.get("max")]}return t},r.prototype.resetHandlers=function(t){var i=this.getCurrentValue(),n=i[0],a=i[1];this.resetHandler(t,"min",n),this.resetHandler(t,"max",a)},r.prototype.getHandlerPath=function(t,i){var n=this.isVertical(),a=[],o=t.size,s=i.x,l=i.y,u=o*zg,h=o/2,f=o/6;if(n){var v=s+u*Ll;a.push(["M",s,l]),a.push(["L",v,l+h]),a.push(["L",s+u,l+h]),a.push(["L",s+u,l-h]),a.push(["L",v,l-h]),a.push(["Z"]),a.push(["M",v,l+f]),a.push(["L",s+u-2,l+f]),a.push(["M",v,l-f]),a.push(["L",s+u-2,l-f])}else{var g=l+u*Ll;a.push(["M",s,l]),a.push(["L",s-h,g]),a.push(["L",s-h,l+u]),a.push(["L",s+h,l+u]),a.push(["L",s+h,g]),a.push(["Z"]),a.push(["M",s-f,g]),a.push(["L",s-f,l+u-2]),a.push(["M",s+f,g]),a.push(["L",s+f,l+u-2])}return a},r.prototype.resetHandler=function(t,i,n){var a=this.getPointByValue(n,t),o=this.get("handler"),s=this.getHandlerPath(o,a),l=this.getElementId("handler-"+i),u=t.findById(l),h=this.isVertical();u?u.attr("path",s):this.addShape(t,{type:"path",name:"legend-handler-"+i,draggable:!0,id:l,attrs:(0,d.__assign)((0,d.__assign)({path:s},o.style),{cursor:h?"ns-resize":"ew-resize"})})},r.prototype.fixedElements=function(t){var i=t.findById(this.getElementId("rail")),n=t.findById(this.getElementId("label-min")),a=t.findById(this.getElementId("label-max")),o=this.getDrawPoint();this.isVertical()?this.fixedVertail(n,a,i,o):this.fixedHorizontal(n,a,i,o)},r.prototype.fitRailLength=function(t,i,n,a){var o=this.isVertical(),s=o?"height":"width",l=this.get("label"),u=l.align,h=l.spacing,f=this.get("max"+(0,c.upperFirst)(s));if(f){var v=u==="rail"?n[s]+t[s]+i[s]+h*2:n[s],g=v-f;g>0&&this.changeRailLength(a,s,n[s]-g)}},r.prototype.changeRailLength=function(t,i,n){var a=t.getBBox(),o;i==="height"?o=this.getRailPath(a.x,a.y,a.width,n):o=this.getRailPath(a.x,a.y,n,a.height),t.attr("path",o)},r.prototype.changeRailPosition=function(t,i,n){var a=t.getBBox(),o=this.getRailPath(i,n,a.width,a.height);t.attr("path",o)},r.prototype.fixedHorizontal=function(t,i,n,a){var o=this.get("label"),s=o.align,l=o.spacing,u=n.getBBox(),h=t.getBBox(),f=i.getBBox(),v=u.height;this.fitRailLength(h,f,u,n),u=n.getBBox(),s==="rail"?(t.attr({x:a.x,y:a.y+v/2}),this.changeRailPosition(n,a.x+h.width+l,a.y),i.attr({x:a.x+h.width+u.width+l*2,y:a.y+v/2})):s==="top"?(t.attr({x:a.x,y:a.y}),i.attr({x:a.x+u.width,y:a.y}),this.changeRailPosition(n,a.x,a.y+h.height+l)):(this.changeRailPosition(n,a.x,a.y),t.attr({x:a.x,y:a.y+u.height+l}),i.attr({x:a.x+u.width,y:a.y+u.height+l}))},r.prototype.fixedVertail=function(t,i,n,a){var o=this.get("label"),s=o.align,l=o.spacing,u=n.getBBox(),h=t.getBBox(),f=i.getBBox();if(this.fitRailLength(h,f,u,n),u=n.getBBox(),s==="rail")t.attr({x:a.x,y:a.y}),this.changeRailPosition(n,a.x,a.y+h.height+l),i.attr({x:a.x,y:a.y+h.height+u.height+l*2});else if(s==="right")t.attr({x:a.x+u.width+l,y:a.y}),this.changeRailPosition(n,a.x,a.y),i.attr({x:a.x+u.width+l,y:a.y+u.height});else{var v=Math.max(h.width,f.width);t.attr({x:a.x,y:a.y}),this.changeRailPosition(n,a.x+v+l,a.y),i.attr({x:a.x,y:a.y+u.height})}},r}(Ml),Gg=Vg,or="g2-tooltip",sr="g2-tooltip-title",Wi="g2-tooltip-list",Ln="g2-tooltip-list-item",In="g2-tooltip-marker",On="g2-tooltip-value",Il="g2-tooltip-name",uo="g2-tooltip-crosshair-x",co="g2-tooltip-crosshair-y",qe,Wg=(qe={},qe[""+or]={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:Bt.fontFamily,lineHeight:"20px",padding:"10px 10px 6px 10px"},qe[""+sr]={marginBottom:"4px"},qe[""+Wi]={margin:"0px",listStyleType:"none",padding:"0px"},qe[""+Ln]={listStyleType:"none",marginBottom:"4px"},qe[""+In]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},qe[""+On]={display:"inline-block",float:"right",marginLeft:"30px"},qe[""+uo]={position:"absolute",width:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},qe[""+co]={position:"absolute",height:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},qe);function Hg(e,r,t,i,n){var a={left:e<n.x,right:e+t>n.x+n.width,top:r<n.y,bottom:r+i>n.y+n.height};return a}function Yg(e,r,t,i,n,a){var o=e,s=r;switch(a){case"left":o=e-i-t,s=r-n/2;break;case"right":o=e+t,s=r-n/2;break;case"top":o=e-i/2,s=r-n-t;break;case"bottom":o=e-i/2,s=r+t;break;default:o=e+t,s=r-n-t;break}return{x:o,y:s}}function Xg(e,r,t,i,n,a,o){var s=Yg(e,r,t,i,n,a);if(o){var l=Hg(s.x,s.y,i,n,o);a==="auto"?(l.right&&(s.x=Math.max(0,e-i-t)),l.top&&(s.y=Math.max(0,r-n-t))):a==="top"||a==="bottom"?(l.left&&(s.x=o.x),l.right&&(s.x=o.x+o.width-i),a==="top"&&l.top&&(s.y=r+t),a==="bottom"&&l.bottom&&(s.y=r-n-t)):(l.top&&(s.y=o.y),l.bottom&&(s.y=o.y+o.height-n),a==="left"&&l.left&&(s.x=e+t),a==="right"&&l.right&&(s.x=e-i-t))}return s}function jg(e,r){var t=!1;return(0,c.each)(r,function(i){if((0,c.hasKey)(e,i))return t=!0,!1}),t}var Ug=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,d.__assign)((0,d.__assign)({},t),{name:"tooltip",type:"html",x:0,y:0,items:[],customContent:null,containerTpl:'<div class="'+or+'"><div class="'+sr+'"></div><ul class="'+Wi+'"></ul></div>',itemTpl:'<li class="'+Ln+`" data-index={index}>
  27. <span class="`+In+`" style="background:{color}"></span>
  28. <span class="`+Il+`">{name}</span>:
  29. <span class="`+On+`">{value}</span>
  30. </li>`,xCrosshairTpl:'<div class="'+uo+'"></div>',yCrosshairTpl:'<div class="'+co+'"></div>',title:null,showTitle:!0,region:null,crosshairsRegion:null,containerClassName:or,crosshairs:null,offset:10,position:"right",domStyles:null,defaultStyles:Wg})},r.prototype.render=function(){this.get("customContent")?this.renderCustomContent():(this.resetTitle(),this.renderItems()),this.resetPosition()},r.prototype.clear=function(){this.clearCrosshairs(),this.setTitle(""),this.clearItemDoms()},r.prototype.show=function(){var t=this.getContainer();!t||this.destroyed||(this.set("visible",!0),(0,k.Z)(t,{visibility:"visible"}),this.setCrossHairsVisible(!0))},r.prototype.hide=function(){var t=this.getContainer();!t||this.destroyed||(this.set("visible",!1),(0,k.Z)(t,{visibility:"hidden"}),this.setCrossHairsVisible(!1))},r.prototype.getLocation=function(){return{x:this.get("x"),y:this.get("y")}},r.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetPosition()},r.prototype.setCrossHairsVisible=function(t){var i=t?"":"none",n=this.get("xCrosshairDom"),a=this.get("yCrosshairDom");n&&(0,k.Z)(n,{display:i}),a&&(0,k.Z)(a,{display:i})},r.prototype.initContainer=function(){if(e.prototype.initContainer.call(this),this.get("customContent")){this.get("container")&&this.get("container").remove();var t=this.getHtmlContentNode();this.get("parent").appendChild(t),this.set("container",t),this.resetStyles(),this.applyStyles()}},r.prototype.updateInner=function(t){this.get("customContent")?this.renderCustomContent():(jg(t,["title","showTitle"])&&this.resetTitle(),(0,c.hasKey)(t,"items")&&this.renderItems()),e.prototype.updateInner.call(this,t)},r.prototype.initDom=function(){this.cacheDoms()},r.prototype.removeDom=function(){e.prototype.removeDom.call(this),this.clearCrosshairs()},r.prototype.resetPosition=function(){var t=this.get("x"),i=this.get("y"),n=this.get("offset"),a=this.getOffset(),o=a.offsetX,s=a.offsetY,l=this.get("position"),u=this.get("region"),h=this.getContainer(),f=this.getBBox(),v=f.width,g=f.height,p;u&&(p=ki(u));var y=Xg(t,i,n,v,g,l,p);(0,k.Z)(h,{left:Fe(y.x+o),top:Fe(y.y+s)}),this.resetCrosshairs()},r.prototype.renderCustomContent=function(){var t=this.getHtmlContentNode(),i=this.get("parent"),n=this.get("container");n&&n.parentNode===i?i.replaceChild(t,n):i.appendChild(t),this.set("container",t),this.resetStyles(),this.applyStyles()},r.prototype.getHtmlContentNode=function(){var t,i=this.get("customContent");if(i){var n=i(this.get("title"),this.get("items"));(0,c.isElement)(n)?t=n:t=(0,E.Z)(n)}return t},r.prototype.cacheDoms=function(){var t=this.getContainer(),i=t.getElementsByClassName(sr)[0],n=t.getElementsByClassName(Wi)[0];this.set("titleDom",i),this.set("listDom",n)},r.prototype.resetTitle=function(){var t=this.get("title"),i=this.get("showTitle");i&&t?this.setTitle(t):this.setTitle("")},r.prototype.setTitle=function(t){var i=this.get("titleDom");i&&(i.innerText=t)},r.prototype.resetCrosshairs=function(){var t=this.get("crosshairsRegion"),i=this.get("crosshairs");if(!t||!i)this.clearCrosshairs();else{var n=ki(t),a=this.get("xCrosshairDom"),o=this.get("yCrosshairDom");i==="x"?(this.resetCrosshair("x",n),o&&(o.remove(),this.set("yCrosshairDom",null))):i==="y"?(this.resetCrosshair("y",n),a&&(a.remove(),this.set("xCrosshairDom",null))):(this.resetCrosshair("x",n),this.resetCrosshair("y",n)),this.setCrossHairsVisible(this.get("visible"))}},r.prototype.resetCrosshair=function(t,i){var n=this.checkCrosshair(t),a=this.get(t);t==="x"?(0,k.Z)(n,{left:Fe(a),top:Fe(i.y),height:Fe(i.height)}):(0,k.Z)(n,{top:Fe(a),left:Fe(i.x),width:Fe(i.width)})},r.prototype.checkCrosshair=function(t){var i=t+"CrosshairDom",n=t+"CrosshairTpl",a="CROSSHAIR_"+t.toUpperCase(),o=J[a],s=this.get(i),l=this.get("parent");return s||(s=(0,E.Z)(this.get(n)),this.applyStyle(o,s),l.appendChild(s),this.set(i,s)),s},r.prototype.renderItems=function(){this.clearItemDoms();var t=this.get("items"),i=this.get("itemTpl"),n=this.get("listDom");n&&((0,c.each)(t,function(a){var o=yr.toCSSGradient(a.color),s=(0,d.__assign)((0,d.__assign)({},a),{color:o}),l=(0,c.substitute)(i,s),u=(0,E.Z)(l);n.appendChild(u)}),this.applyChildrenStyles(n,this.get("domStyles")))},r.prototype.clearItemDoms=function(){this.get("listDom")&&$a(this.get("listDom"))},r.prototype.clearCrosshairs=function(){var t=this.get("xCrosshairDom"),i=this.get("yCrosshairDom");t&&t.remove(),i&&i.remove(),this.set("xCrosshairDom",null),this.set("yCrosshairDom",null)},r}(to),Zg=Ug,Kg={opacity:0},qg={stroke:"#C5C5C5",strokeOpacity:.85},$g={fill:"#CACED4",opacity:.85},Pn=F(80389);function Qg(e){return(0,c.map)(e,function(r,t){var i=t===0?"M":"L",n=r[0],a=r[1];return[i,n,a]})}function Ol(e){return Qg(e)}function Jg(e){if(e.length<=2)return Ol(e);var r=[];(0,c.each)(e,function(o){(0,c.isEqual)(o,r.slice(r.length-2))||r.push(o[0],o[1])});var t=(0,Pn.e9)(r,!1),i=(0,c.head)(e),n=i[0],a=i[1];return t.unshift(["M",n,a]),t}function tp(e,r,t,i){i===void 0&&(i=!0);var n=new Oi.bJ({values:e}),a=new Oi.WD({values:(0,c.map)(e,function(s,l){return l})}),o=(0,c.map)(e,function(s,l){return[a.scale(l)*r,t-n.scale(s)*t]});return i?Jg(o):Ol(o)}function ep(e,r){var t=new Oi.bJ({values:e}),i=t.max<0?t.max:Math.max(0,t.min);return r-t.scale(i)*r}function rp(e,r,t,i){var n=(0,d.__spreadArrays)(e),a=ep(i,t);return n.push(["L",r,a]),n.push(["L",0,a]),n.push(["Z"]),n}var ip=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,d.__assign)((0,d.__assign)({},t),{name:"trend",x:0,y:0,width:200,height:16,smooth:!0,isArea:!1,data:[],backgroundStyle:Kg,lineStyle:qg,areaStyle:$g})},r.prototype.renderInner=function(t){var i=this.cfg,n=i.width,a=i.height,o=i.data,s=i.smooth,l=i.isArea,u=i.backgroundStyle,h=i.lineStyle,f=i.areaStyle;this.addShape(t,{id:this.getElementId("background"),type:"rect",attrs:(0,d.__assign)({x:0,y:0,width:n,height:a},u)});var v=tp(o,n,a,s);if(this.addShape(t,{id:this.getElementId("line"),type:"path",attrs:(0,d.__assign)({path:v},h)}),l){var g=rp(v,n,a,o);this.addShape(t,{id:this.getElementId("area"),type:"path",attrs:(0,d.__assign)({path:g},f)})}},r.prototype.applyOffset=function(){var t=this.cfg,i=t.x,n=t.y;this.moveElementTo(this.get("group"),{x:i,y:n})},r}(be),XT=null,Pl={fill:"#F7F7F7",stroke:"#BFBFBF",radius:2,opacity:1,cursor:"ew-resize",highLightFill:"#FFF"},Dl=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,d.__assign)((0,d.__assign)({},t),{name:"handler",x:0,y:0,width:10,height:24,style:Pl})},r.prototype.renderInner=function(t){var i=this.cfg,n=i.width,a=i.height,o=i.style,s=o.fill,l=o.stroke,u=o.radius,h=o.opacity,f=o.cursor;this.addShape(t,{type:"rect",id:this.getElementId("background"),attrs:{x:0,y:0,width:n,height:a,fill:s,stroke:l,radius:u,opacity:h,cursor:f}});var v=1/3*n,g=2/3*n,p=1/4*a,y=3/4*a;this.addShape(t,{id:this.getElementId("line-left"),type:"line",attrs:{x1:v,y1:p,x2:v,y2:y,stroke:l,cursor:f}}),this.addShape(t,{id:this.getElementId("line-right"),type:"line",attrs:{x1:g,y1:p,x2:g,y2:y,stroke:l,cursor:f}})},r.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},r.prototype.initEvent=function(){this.bindEvents()},r.prototype.bindEvents=function(){var t=this;this.get("group").on("mouseenter",function(){var i=t.get("style").highLightFill;t.getElementByLocalId("background").attr("fill",i),t.draw()}),this.get("group").on("mouseleave",function(){var i=t.get("style").fill;t.getElementByLocalId("background").attr("fill",i),t.draw()})},r.prototype.draw=function(){var t=this.get("container").get("canvas");t&&t.draw()},r}(be),jT=null,np={fill:"#416180",opacity:.05},ap={fill:"#5B8FF9",opacity:.15,cursor:"move"},Dn=10,op={width:Dn,height:24},sp={textBaseline:"middle",fill:"#000",opacity:.45},lp="sliderchange",up=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.onMouseDown=function(i){return function(n){t.currentTarget=i;var a=n.originalEvent;a.stopPropagation(),a.preventDefault(),t.prevX=(0,c.get)(a,"touches.0.pageX",a.pageX),t.prevY=(0,c.get)(a,"touches.0.pageY",a.pageY);var o=t.getContainerDOM();o.addEventListener("mousemove",t.onMouseMove),o.addEventListener("mouseup",t.onMouseUp),o.addEventListener("mouseleave",t.onMouseUp),o.addEventListener("touchmove",t.onMouseMove),o.addEventListener("touchend",t.onMouseUp),o.addEventListener("touchcancel",t.onMouseUp)}},t.onMouseMove=function(i){var n=t.cfg.width,a=[t.get("start"),t.get("end")];i.stopPropagation(),i.preventDefault();var o=(0,c.get)(i,"touches.0.pageX",i.pageX),s=(0,c.get)(i,"touches.0.pageY",i.pageY),l=o-t.prevX,u=t.adjustOffsetRange(l/n);t.updateStartEnd(u),t.updateUI(t.getElementByLocalId("foreground"),t.getElementByLocalId("minText"),t.getElementByLocalId("maxText")),t.prevX=o,t.prevY=s,t.draw(),t.emit(lp,[t.get("start"),t.get("end")].sort()),t.delegateEmit("valuechanged",{originValue:a,value:[t.get("start"),t.get("end")]})},t.onMouseUp=function(){t.currentTarget&&(t.currentTarget=void 0);var i=t.getContainerDOM();i&&(i.removeEventListener("mousemove",t.onMouseMove),i.removeEventListener("mouseup",t.onMouseUp),i.removeEventListener("mouseleave",t.onMouseUp),i.removeEventListener("touchmove",t.onMouseMove),i.removeEventListener("touchend",t.onMouseUp),i.removeEventListener("touchcancel",t.onMouseUp))},t}return r.prototype.setRange=function(t,i){this.set("minLimit",t),this.set("maxLimit",i);var n=this.get("start"),a=this.get("end"),o=(0,c.clamp)(n,t,i),s=(0,c.clamp)(a,t,i);!this.get("isInit")&&(n!==o||a!==s)&&this.setValue([o,s])},r.prototype.getRange=function(){return{min:this.get("minLimit")||0,max:this.get("maxLimit")||1}},r.prototype.setValue=function(t){var i=this.getRange();if((0,c.isArray)(t)&&t.length===2){var n=[this.get("start"),this.get("end")];this.update({start:(0,c.clamp)(t[0],i.min,i.max),end:(0,c.clamp)(t[1],i.min,i.max)}),this.get("updateAutoRender")||this.render(),this.delegateEmit("valuechanged",{originValue:n,value:t})}},r.prototype.getValue=function(){return[this.get("start"),this.get("end")]},r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,d.__assign)((0,d.__assign)({},t),{name:"slider",x:0,y:0,width:100,height:16,backgroundStyle:{},foregroundStyle:{},handlerStyle:{},textStyle:{},defaultCfg:{backgroundStyle:np,foregroundStyle:ap,handlerStyle:op,textStyle:sp}})},r.prototype.update=function(t){var i=t.start,n=t.end,a=(0,d.__assign)({},t);(0,c.isNil)(i)||(a.start=(0,c.clamp)(i,0,1)),(0,c.isNil)(n)||(a.end=(0,c.clamp)(n,0,1)),e.prototype.update.call(this,a),this.minHandler=this.getChildComponentById(this.getElementId("minHandler")),this.maxHandler=this.getChildComponentById(this.getElementId("maxHandler")),this.trend=this.getChildComponentById(this.getElementId("trend"))},r.prototype.init=function(){this.set("start",(0,c.clamp)(this.get("start"),0,1)),this.set("end",(0,c.clamp)(this.get("end"),0,1)),e.prototype.init.call(this)},r.prototype.render=function(){e.prototype.render.call(this),this.updateUI(this.getElementByLocalId("foreground"),this.getElementByLocalId("minText"),this.getElementByLocalId("maxText"))},r.prototype.renderInner=function(t){var i=this.cfg,n=i.start,a=i.end,o=i.width,s=i.height,l=i.trendCfg,u=l===void 0?{}:l,h=i.minText,f=i.maxText,v=i.backgroundStyle,g=v===void 0?{}:v,p=i.foregroundStyle,y=p===void 0?{}:p,m=i.textStyle,x=m===void 0?{}:m,_=(0,c.deepMix)({},Pl,this.cfg.handlerStyle),w=n*o,b=a*o;(0,c.size)((0,c.get)(u,"data"))&&(this.trend=this.addComponent(t,(0,d.__assign)({component:ip,id:this.getElementId("trend"),x:0,y:0,width:o,height:s},u))),this.addShape(t,{id:this.getElementId("background"),type:"rect",attrs:(0,d.__assign)({x:0,y:0,width:o,height:s},g)});var S=this.addShape(t,{id:this.getElementId("minText"),type:"text",attrs:(0,d.__assign)({y:s/2,textAlign:"right",text:h,silent:!1},x)}),C=this.addShape(t,{id:this.getElementId("maxText"),type:"text",attrs:(0,d.__assign)({y:s/2,textAlign:"left",text:f,silent:!1},x)}),M=this.addShape(t,{id:this.getElementId("foreground"),name:"foreground",type:"rect",attrs:(0,d.__assign)({y:0,height:s},y)}),L=(0,c.get)(_,"width",Dn),B=(0,c.get)(_,"height",24);this.minHandler=this.addComponent(t,{component:Dl,id:this.getElementId("minHandler"),name:"handler-min",x:0,y:(s-B)/2,width:L,height:B,cursor:"ew-resize",style:_}),this.maxHandler=this.addComponent(t,{component:Dl,id:this.getElementId("maxHandler"),name:"handler-max",x:0,y:(s-B)/2,width:L,height:B,cursor:"ew-resize",style:_})},r.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},r.prototype.initEvent=function(){this.bindEvents()},r.prototype.updateUI=function(t,i,n){var a=this.cfg,o=a.start,s=a.end,l=a.width,u=a.minText,h=a.maxText,f=a.handlerStyle,v=a.height,g=o*l,p=s*l;this.trend&&(this.trend.update({width:l,height:v}),this.get("updateAutoRender")||this.trend.render()),t.attr("x",g),t.attr("width",p-g);var y=(0,c.get)(f,"width",Dn);i.attr("text",u),n.attr("text",h);var m=this._dodgeText([g,p],i,n),x=m[0],_=m[1];this.minHandler&&(this.minHandler.update({x:g-y/2}),this.get("updateAutoRender")||this.minHandler.render()),(0,c.each)(x,function(w,b){return i.attr(b,w)}),this.maxHandler&&(this.maxHandler.update({x:p-y/2}),this.get("updateAutoRender")||this.maxHandler.render()),(0,c.each)(_,function(w,b){return n.attr(b,w)})},r.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 i=t.findById(this.getElementId("foreground"));i.on("mousedown",this.onMouseDown("foreground")),i.on("touchstart",this.onMouseDown("foreground"))},r.prototype.adjustOffsetRange=function(t){var i=this.cfg,n=i.start,a=i.end;switch(this.currentTarget){case"minHandler":{var o=0-n,s=1-n;return Math.min(s,Math.max(o,t))}case"maxHandler":{var o=0-a,s=1-a;return Math.min(s,Math.max(o,t))}case"foreground":{var o=0-n,s=1-a;return Math.min(s,Math.max(o,t))}}},r.prototype.updateStartEnd=function(t){var i=this.cfg,n=i.start,a=i.end;switch(this.currentTarget){case"minHandler":n+=t;break;case"maxHandler":a+=t;break;case"foreground":n+=t,a+=t;break}this.set("start",n),this.set("end",a)},r.prototype._dodgeText=function(t,i,n){var a,o,s=this.cfg,l=s.handlerStyle,u=s.width,h=2,f=(0,c.get)(l,"width",Dn),v=t[0],g=t[1],p=!1;v>g&&(a=[g,v],v=a[0],g=a[1],o=[n,i],i=o[0],n=o[1],p=!0);var y=i.getBBox(),m=n.getBBox(),x=y.width>v-h?{x:v+f/2+h,textAlign:"left"}:{x:v-f/2-h,textAlign:"right"},_=m.width>u-g-h?{x:g-f/2-h,textAlign:"right"}:{x:g+f/2+h,textAlign:"left"};return p?[_,x]:[x,_]},r.prototype.draw=function(){var t=this.get("container"),i=t&&t.get("canvas");i&&i.draw()},r.prototype.getContainerDOM=function(){var t=this.get("container"),i=t&&t.get("canvas");return i&&i.get("container")},r}(be),UT=null,ii=F(57817),cp={trackColor:"rgba(0,0,0,0)",thumbColor:"rgba(0,0,0,0.15)",size:8,lineCap:"round"},ho={default:cp,hover:{thumbColor:"rgba(0,0,0,0.2)"}},hp=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.clearEvents=c.noop,t.onStartEvent=function(i){return function(n){t.isMobile=i,n.originalEvent.preventDefault();var a=i?(0,c.get)(n.originalEvent,"touches.0.clientX"):n.clientX,o=i?(0,c.get)(n.originalEvent,"touches.0.clientY"):n.clientY;t.startPos=t.cfg.isHorizontal?a:o,t.bindLaterEvent()}},t.bindLaterEvent=function(){var i=t.getContainerDOM(),n=[];t.isMobile?n=[(0,ii.Z)(i,"touchmove",t.onMouseMove),(0,ii.Z)(i,"touchend",t.onMouseUp),(0,ii.Z)(i,"touchcancel",t.onMouseUp)]:n=[(0,ii.Z)(i,"mousemove",t.onMouseMove),(0,ii.Z)(i,"mouseup",t.onMouseUp),(0,ii.Z)(i,"mouseleave",t.onMouseUp)],t.clearEvents=function(){n.forEach(function(a){a.remove()})}},t.onMouseMove=function(i){var n=t.cfg,a=n.isHorizontal,o=n.thumbOffset;i.preventDefault();var s=t.isMobile?(0,c.get)(i,"touches.0.clientX"):i.clientX,l=t.isMobile?(0,c.get)(i,"touches.0.clientY"):i.clientY,u=a?s:l,h=u-t.startPos;t.startPos=u,t.updateThumbOffset(o+h)},t.onMouseUp=function(i){i.preventDefault(),t.clearEvents()},t.onTrackClick=function(i){var n=t.cfg,a=n.isHorizontal,o=n.x,s=n.y,l=n.thumbLen,u=t.getContainerDOM(),h=u.getBoundingClientRect(),f=i.clientX,v=i.clientY,g=a?f-h.left-o-l/2:v-h.top-s-l/2,p=t.validateRange(g);t.updateThumbOffset(p)},t.onThumbMouseOver=function(){var i=t.cfg.theme.hover.thumbColor;t.getElementByLocalId("thumb").attr("stroke",i),t.draw()},t.onThumbMouseOut=function(){var i=t.cfg.theme.default.thumbColor;t.getElementByLocalId("thumb").attr("stroke",i),t.draw()},t}return r.prototype.setRange=function(t,i){this.set("minLimit",t),this.set("maxLimit",i);var n=this.getValue(),a=(0,c.clamp)(n,t,i);n!==a&&!this.get("isInit")&&this.setValue(a)},r.prototype.getRange=function(){var t=this.get("minLimit")||0,i=this.get("maxLimit")||1;return{min:t,max:i}},r.prototype.setValue=function(t){var i=this.getRange(),n=this.getValue();this.update({thumbOffset:(this.get("trackLen")-this.get("thumbLen"))*(0,c.clamp)(t,i.min,i.max)}),this.delegateEmit("valuechange",{originalValue:n,value:this.getValue()})},r.prototype.getValue=function(){return(0,c.clamp)(this.get("thumbOffset")/(this.get("trackLen")-this.get("thumbLen")),0,1)},r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,d.__assign)((0,d.__assign)({},t),{name:"scrollbar",isHorizontal:!0,minThumbLen:20,thumbOffset:0,theme:ho})},r.prototype.renderInner=function(t){this.renderTrackShape(t),this.renderThumbShape(t)},r.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},r.prototype.initEvent=function(){this.bindEvents()},r.prototype.renderTrackShape=function(t){var i=this.cfg,n=i.trackLen,a=i.theme,o=a===void 0?{default:{}}:a,s=(0,c.deepMix)({},ho,o).default,l=s.lineCap,u=s.trackColor,h=s.size,f=(0,c.get)(this.cfg,"size",h),v=this.get("isHorizontal")?{x1:0+f/2,y1:f/2,x2:n-f/2,y2:f/2,lineWidth:f,stroke:u,lineCap:l}:{x1:f/2,y1:0+f/2,x2:f/2,y2:n-f/2,lineWidth:f,stroke:u,lineCap:l};return this.addShape(t,{id:this.getElementId("track"),name:"track",type:"line",attrs:v})},r.prototype.renderThumbShape=function(t){var i=this.cfg,n=i.thumbOffset,a=i.thumbLen,o=i.theme,s=(0,c.deepMix)({},ho,o).default,l=s.size,u=s.lineCap,h=s.thumbColor,f=(0,c.get)(this.cfg,"size",l),v=this.get("isHorizontal")?{x1:n+f/2,y1:f/2,x2:n+a-f/2,y2:f/2,lineWidth:f,stroke:h,lineCap:u,cursor:"default"}:{x1:f/2,y1:n+f/2,x2:f/2,y2:n+a-f/2,lineWidth:f,stroke:h,lineCap:u,cursor:"default"};return this.addShape(t,{id:this.getElementId("thumb"),name:"thumb",type:"line",attrs:v})},r.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);var i=t.findById(this.getElementId("track"));i.on("click",this.onTrackClick);var n=t.findById(this.getElementId("thumb"));n.on("mouseover",this.onThumbMouseOver),n.on("mouseout",this.onThumbMouseOut)},r.prototype.getContainerDOM=function(){var t=this.get("container"),i=t&&t.get("canvas");return i&&i.get("container")},r.prototype.validateRange=function(t){var i=this.cfg,n=i.thumbLen,a=i.trackLen,o=t;return t+n>a?o=a-n:t+n<n&&(o=0),o},r.prototype.draw=function(){var t=this.get("container"),i=t&&t.get("canvas");i&&i.draw()},r.prototype.updateThumbOffset=function(t){var i=this.cfg,n=i.thumbOffset,a=i.isHorizontal,o=i.thumbLen,s=i.size,l=this.validateRange(t);if(l!==n){var u=this.getElementByLocalId("thumb");a?u.attr({x1:l+s/2,x2:l+o-s/2}):u.attr({y1:l+s/2,y2:l+o-s/2}),this.emitOffsetChange(l)}},r.prototype.emitOffsetChange=function(t){var i=this.cfg,n=i.thumbOffset,a=i.trackLen,o=i.thumbLen;this.cfg.thumbOffset=t,this.emit("scrollchange",{thumbOffset:t,ratio:(0,c.clamp)(t/(a-o),0,1)}),this.delegateEmit("valuechange",{originalValue:n,value:t})},r}(be),fp=_g,vp=bg,dp=kg,gp=Pg,kl=Ng,pp=Gg,kn=Zg;function yp(e){if((0,c.isEmpty)(e))return null;var r=e[0].x,t=e[0].x,i=e[0].y,n=e[0].y;return(0,c.each)(e,function(a){r=r>a.x?a.x:r,t=t<a.x?a.x:t,i=i>a.y?a.y:i,n=n<a.y?a.y:n}),{minX:r,maxX:t,minY:i,maxY:n,centerX:(r+t)/2,centerY:(i+n)/2}}function Bl(e){return Array.from(new Set(e)).length===1}function Rl(e){return((0,c.min)(e)+(0,c.max)(e))/2}function le(e,r,t,i){return{x:e+t*Math.cos(i),y:r+t*Math.sin(i)}}function mr(e,r,t,i,n,a){a===void 0&&(a=0);var o=le(e,r,t,i),s=le(e,r,t,n),l=le(e,r,a,i),u=le(e,r,a,n);if(n-i==Math.PI*2){var h=le(e,r,t,i+Math.PI),f=le(e,r,a,i+Math.PI),v=[["M",o.x,o.y],["A",t,t,0,1,1,h.x,h.y],["A",t,t,0,1,1,s.x,s.y],["M",l.x,l.y]];return a&&(v.push(["A",a,a,0,1,0,f.x,f.y]),v.push(["A",a,a,0,1,0,u.x,u.y])),v.push(["M",o.x,o.y]),v.push(["Z"]),v}var g=n-i<=Math.PI?0:1,p=[["M",o.x,o.y],["A",t,t,0,g,1,s.x,s.y],["L",u.x,u.y]];return a&&p.push(["A",a,a,0,g,0,l.x,l.y]),p.push(["L",o.x,o.y]),p.push(["Z"]),p}function Nl(e,r,t,i,n){var a=le(e,r,t,i),o=le(e,r,t,n);if((0,c.isNumberEqual)(n-i,Math.PI*2)){var s=le(e,r,t,i+Math.PI);return[["M",a.x,a.y],["A",t,t,0,1,1,s.x,s.y],["A",t,t,0,1,1,a.x,a.y],["A",t,t,0,1,0,s.x,s.y],["A",t,t,0,1,0,a.x,a.y],["Z"]]}var l=n-i<=Math.PI?0:1;return[["M",a.x,a.y],["A",t,t,0,l,1,o.x,o.y]]}function Hi(e,r){var t=e.points,i=yp(t),n,a,o=r.startAngle,s=r.endAngle,l=s-o;return r.isTransposed?(n=i.maxY*l,a=i.minY*l):(n=i.maxX*l,a=i.minX*l),n+=o,a+=o,{startAngle:a,endAngle:n}}function mp(e,r){if((0,c.isNumber)(e)&&(0,c.isNumber)(r))return[e,r];if(e=e,r=r,Bl(e)||Bl(r))return[Rl(e),Rl(r)];for(var t=-1,i=0,n=0,a,o=e.length-1,s,l=0;++t<e.length;)a=o,o=t,l+=s=e[a]*r[o]-e[o]*r[a],i+=(e[a]+e[o])*s,n+=(r[a]+r[o])*s;return l*=3,[i/l,n/l]}function zl(e,r){var t=e.attr(),i=r.attr();return(0,c.each)(t,function(n,a){i[a]===void 0&&(i[a]=void 0)}),i}function ni(e,r,t){var i=Math.min(r,t),n=Math.max(r,t);return e>=i&&e<=n}function xp(e,r,t){if((0,c.isString)(e))return e.padEnd(r,t);if((0,c.isArray)(e)){var i=e.length;if(i<r)for(var n=r-i,a=0;a<n;a++)e.push(t)}return e}function Me(e,r){return typeof e=="object"&&r.forEach(function(t){delete e[t]}),e}function xr(e,r,t){var i,n;r===void 0&&(r=[]),t===void 0&&(t=new Map);try{for(var a=(0,d.__values)(e),o=a.next();!o.done;o=a.next()){var s=o.value;t.has(s)||(r.push(s),t.set(s,!0))}}catch(l){i={error:l}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return r}var Ae=function(){function e(r,t,i,n){r===void 0&&(r=0),t===void 0&&(t=0),i===void 0&&(i=0),n===void 0&&(n=0),this.x=r,this.y=t,this.height=n,this.width=i}return e.fromRange=function(r,t,i,n){return new e(r,t,i-r,n-t)},e.fromObject=function(r){return new e(r.minX,r.minY,r.width,r.height)},Object.defineProperty(e.prototype,"minX",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxX",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minY",{get:function(){return this.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxY",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tl",{get:function(){return{x:this.x,y:this.y}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tr",{get:function(){return{x:this.maxX,y:this.y}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bl",{get:function(){return{x:this.x,y:this.maxY}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"br",{get:function(){return{x:this.maxX,y:this.maxY}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"top",{get:function(){return{x:this.x+this.width/2,y:this.minY}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"right",{get:function(){return{x:this.maxX,y:this.y+this.height/2}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bottom",{get:function(){return{x:this.x+this.width/2,y:this.maxY}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"left",{get:function(){return{x:this.minX,y:this.y+this.height/2}},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(r){return this.x===r.x&&this.y===r.y&&this.width===r.width&&this.height===r.height},e.prototype.contains=function(r){return r.minX>=this.minX&&r.maxX<=this.maxX&&r.minY>=this.minY&&r.maxY<=this.maxY},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.add=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];var i=this.clone();return(0,c.each)(r,function(n){i.x=Math.min(n.x,i.x),i.y=Math.min(n.y,i.y),i.width=Math.max(n.maxX,i.maxX)-i.x,i.height=Math.max(n.maxY,i.maxY)-i.y}),i},e.prototype.merge=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];var i=this.clone();return(0,c.each)(r,function(n){i.x=Math.max(n.x,i.x),i.y=Math.max(n.y,i.y),i.width=Math.min(n.maxX,i.maxX)-i.x,i.height=Math.min(n.maxY,i.maxY)-i.y}),i},e.prototype.cut=function(r,t){var i=r.width,n=r.height;switch(t){case T.TOP:case T.TOP_LEFT:case T.TOP_RIGHT:return e.fromRange(this.minX,this.minY+n,this.maxX,this.maxY);case T.RIGHT:case T.RIGHT_TOP:case T.RIGHT_BOTTOM:return e.fromRange(this.minX,this.minY,this.maxX-i,this.maxY);case T.BOTTOM:case T.BOTTOM_LEFT:case T.BOTTOM_RIGHT:return e.fromRange(this.minX,this.minY,this.maxX,this.maxY-n);case T.LEFT:case T.LEFT_TOP:case T.LEFT_BOTTOM:return e.fromRange(this.minX+i,this.minY,this.maxX,this.maxY);default:return this}},e.prototype.shrink=function(r){var t=(0,d.__read)(r,4),i=t[0],n=t[1],a=t[2],o=t[3];return new e(this.x+o,this.y+i,this.width-o-n,this.height-i-a)},e.prototype.expand=function(r){var t=(0,d.__read)(r,4),i=t[0],n=t[1],a=t[2],o=t[3];return new e(this.x-o,this.y-i,this.width+o+n,this.height+i+a)},e.prototype.exceed=function(r){return[Math.max(-this.minY+r.minY,0),Math.max(this.maxX-r.maxX,0),Math.max(this.maxY-r.maxY,0),Math.max(-this.minX+r.minX,0)]},e.prototype.collide=function(r){return this.minX<r.maxX&&this.maxX>r.minX&&this.minY<r.maxY&&this.maxY>r.minY},e.prototype.size=function(){return this.width*this.height},e.prototype.isPointIn=function(r){return r.x>=this.minX&&r.x<=this.maxX&&r.y>=this.minY&&r.y<=this.maxY},e}(),ZT=function(e,r){var t=r.start,i=r.end;return new Ae(e.x+e.width*t.x,e.y+e.height*t.y,e.width*Math.abs(i.x-t.x),e.height*Math.abs(i.y-t.y))};function _p(e){return[[e.minX,e.minY],[e.maxX,e.minY],[e.maxX,e.maxY],[e.minX,e.maxY]]}function Yi(e){if(e.isPolar&&!e.isTransposed)return(e.endAngle-e.startAngle)*e.getRadius();var r=e.convert({x:0,y:0}),t=e.convert({x:1,y:0});return Math.sqrt(Math.pow(t.x-r.x,2)+Math.pow(t.y-r.y,2))}function wp(e){if(e.isPolar){var r=e.startAngle,t=e.endAngle;return t-r==Math.PI*2}return!1}function Bn(e,r){var t=e.getCenter();return Math.sqrt(Math.pow(r.x-t.x,2)+Math.pow(r.y-t.y,2))}function fo(e,r){var t=!1;if(e)if(e.type==="theta"){var i=e.start,n=e.end;t=ni(r.x,i.x,n.x)&&ni(r.y,i.y,n.y)}else{var a=e.invert(r);t=ni(a.x,0,1)&&ni(a.y,0,1)}return t}function ai(e,r){var t=e.getCenter();return Math.atan2(r.y-t.y,r.x-t.x)}function vo(e,r){r===void 0&&(r=0);var t=e.start,i=e.end,n=e.getWidth(),a=e.getHeight();if(e.isPolar){var o=e.startAngle,s=e.endAngle,l=e.getCenter(),u=e.getRadius();return{type:"path",startState:{path:mr(l.x,l.y,u+r,o,o)},endState:function(f){var v=(s-o)*f+o,g=mr(l.x,l.y,u+r,o,v);return{path:g}},attrs:{path:mr(l.x,l.y,u+r,o,s)}}}var h;return e.isTransposed?h={height:a+r*2}:h={width:n+r*2},{type:"rect",startState:{x:t.x-r,y:i.y-r,width:e.isTransposed?n+r*2:0,height:e.isTransposed?0:a+r*2},endState:h,attrs:{x:t.x-r,y:i.y-r,width:n+r*2,height:a+r*2}}}function bp(e,r){r===void 0&&(r=0);var t=e.start,i=e.end,n=e.getWidth(),a=e.getHeight(),o=Math.min(t.x,i.x),s=Math.min(t.y,i.y);return Ae.fromRange(o-r,s-r,o+n+r,s+a+r)}var Sp=/^(?:(?!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 Cp(e){var r="linear";return Sp.test(e)?r="timeCat":(0,c.isString)(e)&&(r="cat"),r}function Vl(e,r,t,i){return r===void 0&&(r={}),r.type?r.type:e.type!=="identity"&&at.includes(t)&&["interval"].includes(i)||e.isCategory?"cat":e.type}function Ap(e,r,t){var i=r||[];if((0,c.isNumber)(e)||(0,c.isNil)((0,c.firstValue)(i,e))&&(0,c.isEmpty)(t)){var n=(0,Oi.yZ)("identity");return new n({field:e.toString(),values:[e]})}var a=(0,c.valuesOfKey)(i,e),o=(0,c.get)(t,"type",Cp(a[0])),s=(0,Oi.yZ)(o);return new s((0,d.__assign)({field:e,values:a},t))}function Fp(e,r){if(e.type!=="identity"&&r.type!=="identity"){var t={};for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i]);e.change(t)}}function Xi(e){return e.alias||e.field}function Gl(e,r,t){var i=e.values,n=i.length,a;if(n===1)a=[.5,1];else{var o=1,s=0;wp(r)?r.isTransposed?(o=(0,c.get)(t,"widthRatio.multiplePie",1/1.3),s=1/n*o,a=[s/2,1-s/2]):a=[0,1-1/n]:(s=1/n/2,a=[s,1-s])}return a}function Ep(e){var r=e.values.filter(function(t){return!(0,c.isNil)(t)&&!isNaN(t)});return Math.max.apply(Math,(0,d.__spreadArray)((0,d.__spreadArray)([],(0,d.__read)(r),!1),[(0,c.isNil)(e.max)?-Infinity:e.max],!1))}function Mp(e){var r,t;switch(e){case T.TOP:r={x:0,y:1},t={x:1,y:1};break;case T.RIGHT:r={x:1,y:0},t={x:1,y:1};break;case T.BOTTOM:r={x:0,y:0},t={x:1,y:0};break;case T.LEFT:r={x:0,y:0},t={x:0,y:1};break;default:r=t={x:0,y:0}}return{start:r,end:t}}function Tp(e){var r,t;return e.isTransposed?(r={x:0,y:0},t={x:1,y:0}):(r={x:0,y:0},t={x:0,y:1}),{start:r,end:t}}function Rn(e,r){var t={start:{x:0,y:0},end:{x:0,y:0}};e.isRect?t=Mp(r):e.isPolar&&(t=Tp(e));var i=t.start,n=t.end;return{start:e.convert(i),end:e.convert(n)}}function KT(e,r){if(e.isRect)return e.isTransposed?[DIRECTION.RIGHT,DIRECTION.BOTTOM].includes(r)?1:-1:[DIRECTION.BOTTOM,DIRECTION.RIGHT].includes(r)?-1:1;if(e.isPolar){var t=e.x.start;return t<0?-1:1}return 1}function Wl(e){var r=e.start,t=e.end;return r.x===t.x}function Hl(e,r){var t=e.start,i=e.end,n=Wl(e);return n?(t.y-i.y)*(r.x-t.x)>0?1:-1:(i.x-t.x)*(t.y-r.y)>0?-1:1}function Nn(e,r){var t=(0,c.get)(e,["components","axis"],{});return(0,c.deepMix)({},(0,c.get)(t,["common"],{}),(0,c.deepMix)({},(0,c.get)(t,[r],{})))}function Yl(e,r,t){var i=(0,c.get)(e,["components","axis"],{});return(0,c.deepMix)({},(0,c.get)(i,["common","title"],{}),(0,c.deepMix)({},(0,c.get)(i,[r,"title"],{})),t)}function go(e){var r=e.x,t=e.y,i=e.circleCenter,n=t.start>t.end,a=e.isTransposed?e.convert({x:n?0:1,y:0}):e.convert({x:0,y:n?0:1}),o=[a.x-i.x,a.y-i.y],s=[1,0],l=a.y>i.y?wt.EU(o,s):wt.EU(o,s)*-1,u=l+(r.end-r.start),h=Math.sqrt(Math.pow(a.x-i.x,2)+Math.pow(a.y-i.y,2));return{center:i,radius:h,startAngle:l,endAngle:u}}function zn(e,r){return(0,c.isBoolean)(e)?e===!1?!1:{}:(0,c.get)(e,[r])}function Xl(e,r){return(0,c.get)(e,"position",r)}function jl(e,r){return(0,c.get)(r,["title","text"],Xi(e))}var oi=function(){function e(r,t){this.destroyed=!1,this.facets=[],this.view=r,this.cfg=(0,c.deepMix)({},this.getDefaultCfg(),t)}return e.prototype.init=function(){this.container||(this.container=this.createContainer());var r=this.view.getData();this.facets=this.generateFacets(r)},e.prototype.render=function(){this.renderViews()},e.prototype.update=function(){},e.prototype.clear=function(){this.clearFacetViews()},e.prototype.destroy=function(){this.clear(),this.container&&(this.container.remove(!0),this.container=void 0),this.destroyed=!0,this.view=void 0,this.facets=[]},e.prototype.facetToView=function(r){var t=r.region,i=r.data,n=r.padding,a=n===void 0?this.cfg.padding:n,o=this.view.createView({region:t,padding:a});o.data(i||[]),r.view=o,this.beforeEachView(o,r);var s=this.cfg.eachView;return s&&s(o,r),this.afterEachView(o,r),o},e.prototype.createContainer=function(){var r=this.view.getLayer(Z.FORE);return r.addGroup()},e.prototype.renderViews=function(){this.createFacetViews()},e.prototype.createFacetViews=function(){var r=this;return this.facets.map(function(t){return r.facetToView(t)})},e.prototype.clearFacetViews=function(){var r=this;(0,c.each)(this.facets,function(t){t.view&&(r.view.removeView(t.view),t.view=void 0)})},e.prototype.parseSpacing=function(){var r=this.view.viewBBox,t=r.width,i=r.height,n=this.cfg.spacing;return n.map(function(a,o){return(0,c.isNumber)(a)?a/(o===0?t:i):parseFloat(a)/100})},e.prototype.getFieldValues=function(r,t){var i=[],n={};return(0,c.each)(r,function(a){var o=a[t];!(0,c.isNil)(o)&&!n[o]&&(i.push(o),n[o]=!0)}),i},e.prototype.getRegion=function(r,t,i,n){var a=(0,d.__read)(this.parseSpacing(),2),o=a[0],s=a[1],l=(1+o)/(t===0?1:t)-o,u=(1+s)/(r===0?1:r)-s,h={x:(l+o)*i,y:(u+s)*n},f={x:h.x+l,y:h.y+u};return{start:h,end:f}},e.prototype.getDefaultCfg=function(){return{eachView:void 0,showTitle:!0,spacing:[0,0],padding:10,fields:[]}},e.prototype.getDefaultTitleCfg=function(){var r=this.view.getTheme().fontFamily;return{style:{fontSize:14,fill:"#666",fontFamily:r}}},e.prototype.processAxis=function(r,t){var i=r.getOptions(),n=i.coordinate,a=r.geometries,o=(0,c.get)(n,"type","rect");if(o==="rect"&&a.length){(0,c.isNil)(i.axes)&&(i.axes={});var s=i.axes,l=(0,d.__read)(a[0].getXYFields(),2),u=l[0],h=l[1],f=zn(s,u),v=zn(s,h);f!==!1&&(i.axes[u]=this.getXAxisOption(u,s,f,t)),v!==!1&&(i.axes[h]=this.getYAxisOption(h,s,v,t))}},e.prototype.getFacetDataFilter=function(r){return function(t){return(0,c.every)(r,function(i){var n=i.field,a=i.value;return!(0,c.isNil)(a)&&n?t[n]===a:!0})}},e}(),Ul={},Lp=function(e){return Ul[(0,c.lowerCase)(e)]},si=function(e,r){Ul[(0,c.lowerCase)(e)]=r},Ip=function(){function e(r,t){this.context=r,this.cfg=t,r.addAction(this)}return e.prototype.applyCfg=function(r){(0,c.assign)(this,r)},e.prototype.init=function(){this.applyCfg(this.cfg)},e.prototype.destroy=function(){this.context.removeAction(this),this.context=null},e}(),ie=Ip,Op=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.execute=function(){this.callback&&this.callback(this.context)},r.prototype.destroy=function(){e.prototype.destroy.call(this),this.callback=null},r}(ie),Pp=Op,Vn={};function Dp(e,r){var t=Vn[e],i=null;if(t){var n=t.ActionClass,a=t.cfg;i=new n(r,a),i.name=e,i.init()}return i}function Gn(e){var r=Vn[e];return(0,c.get)(r,"ActionClass")}function yt(e,r,t){Vn[e]={ActionClass:r,cfg:t}}function qT(e){delete Vn[e]}function kp(e,r){var t=new Pp(r);return t.callback=e,t.name="callback",t}function Bp(e,r){var t=[];if(e.length){t.push(["M",e[0].x,e[0].y]);for(var i=1,n=e.length;i<n;i+=1){var a=e[i];t.push(["L",a.x,a.y])}r&&t.push(["Z"])}return t}function po(e,r){for(var t=[e[0]],i=1,n=e.length;i<n;i=i+2){var a=r.convert({x:e[i],y:e[i+1]});t.push(a.x,a.y)}return t}function Zl(e,r){var t=r.isTransposed,i=e[1],n=e[6],a=e[7],o=r.convert({x:n,y:a}),s=t?0:1;return["A",i,i,0,0,s,o.x,o.y]}function Rp(e,r,t){var i=t.isTransposed,n=t.startAngle,a=t.endAngle,o=e[0].toLowerCase()==="a"?{x:e[6],y:e[7]}:{x:e[1],y:e[2]},s={x:r[1],y:r[2]},l=[],u=i?"y":"x",h=Math.abs(s[u]-o[u])*(a-n),f=s[u]>=o[u]?1:0,v=h>Math.PI?1:0,g=t.convert(s),p=Bn(t,g);if(p>=.5)if(h===Math.PI*2){var y={x:(s.x+o.x)/2,y:(s.y+o.y)/2},m=t.convert(y);l.push(["A",p,p,0,v,f,m.x,m.y]),l.push(["A",p,p,0,v,f,g.x,g.y])}else l.push(["A",p,p,0,v,f,g.x,g.y]);return l}function Np(e){(0,c.each)(e,function(r,t){var i=r;if(i[0].toLowerCase()==="a"){var n=e[t-1],a=e[t+1];a&&a[0].toLowerCase()==="a"?n&&n[0].toLowerCase()==="l"&&(n[0]="M"):n&&n[0].toLowerCase()==="a"&&a&&a[0].toLowerCase()==="l"&&(a[0]="M")}})}var zp=function(e,r,t,i){var n,a=[],o=!!i,s,l,u,h,f,v,g;if(o){n=(0,d.__read)(i,2),u=n[0],h=n[1];for(var p=0,y=e.length;p<y;p++){var m=e[p];u=wt.VV([0,0],u,m),h=wt.Fp([0,0],h,m)}}for(var p=0,x=e.length;p<x;p++){var m=e[p];if(p===0&&!t)g=m;else if(p===x-1&&!t)v=m,a.push(g),a.push(v);else{s=e[t?p?p-1:x-1:p-1],l=e[t?(p+1)%x:p+1];var _=[0,0];_=wt.lu(_,l,s),_=wt.bA(_,_,r);var w=wt.TE(m,s),b=wt.TE(m,l),S=w+b;S!==0&&(w/=S,b/=S);var C=wt.bA([0,0],_,-w),M=wt.bA([0,0],_,b);v=wt.IH([0,0],m,C),f=wt.IH([0,0],m,M),f=wt.VV([0,0],f,wt.Fp([0,0],l,m)),f=wt.Fp([0,0],f,wt.VV([0,0],l,m)),C=wt.lu([0,0],f,m),C=wt.bA([0,0],C,-w/b),v=wt.IH([0,0],m,C),v=wt.VV([0,0],v,wt.Fp([0,0],s,m)),v=wt.Fp([0,0],v,wt.VV([0,0],s,m)),M=wt.lu([0,0],m,v),M=wt.bA([0,0],M,b/w),f=wt.IH([0,0],m,M),o&&(v=wt.Fp([0,0],v,u),v=wt.VV([0,0],v,h),f=wt.Fp([0,0],f,u),f=wt.VV([0,0],f,h)),a.push(g),a.push(v),g=f}}return t&&a.push(a.shift()),a};function Kl(e,r,t){for(var i=!!r,n=[],a=0,o=e.length;a<o;a+=2)n.push([e[a],e[a+1]]);for(var s=zp(n,.4,i,t),l=n.length,u=[],h,f,v,a=0;a<l-1;a++)h=s[a*2],f=s[a*2+1],v=n[a+1],u.push(["C",h[0],h[1],f[0],f[1],v[0],v[1]]);return i&&(h=s[l],f=s[l+1],v=n[0],u.push(["C",h[0],h[1],f[0],f[1],v[0],v[1]])),u}function ji(e,r){return Bp(e,r)}function Wn(e,r,t){var i=[],n=e[0],a=null;if(e.length<=2)return ji(e,r);for(var o=0,s=e.length;o<s;o++){var l=e[o];(!a||!(a.x===l.x&&a.y===l.y))&&(i.push(l.x),i.push(l.y),a=l)}var u=t||[[0,0],[1,1]],h=Kl(i,r,u);return h.unshift(["M",n.x,n.y]),h}function Vp(e,r){var t=[];return(0,c.each)(r,function(i){var n=i[0];switch(n.toLowerCase()){case"m":case"l":case"c":t.push(po(i,e));break;case"a":t.push(Zl(i,e));break;case"z":default:t.push(i);break}}),t}function Gp(e,r){var t=[],i,n,a,o;return(0,c.each)(r,function(s,l){var u=s[0];switch(u.toLowerCase()){case"m":case"c":case"q":t.push(po(s,e));break;case"l":i=r[l-1],n=s,a=e.isTransposed,o=a?i[i.length-2]===n[1]:i[i.length-1]===n[2],o?t=t.concat(Rp(i,n,e)):t.push(po(s,e));break;case"a":t.push(Zl(s,e));break;case"z":default:t.push(s);break}}),Np(t),t}function ql(e,r){var t=e.event,i=t.target,n=i.getCanvasBBox();return n.width>=r||n.height>=r?n:null}function Wp(e,r){var t=e.event,i=t.target,n=i.getCanvasBBox();return n.width>=r||n.height>=r?i.attr("path"):null}function _r(e){var r=e.event,t,i=r.target;return i&&(t=i.get("element")),t}function Rr(e){var r=e.event,t=r.target,i;return t&&(i=t.get("delegateObject")),i}function $l(e){var r=e.event.gEvent;return!(r&&r.fromShape&&r.toShape&&r.fromShape.get("element")===r.toShape.get("element"))}function Ui(e){return e&&e.component&&e.component.isList()}function Ql(e){return e&&e.component&&e.component.isSlider()}function Zi(e){var r=e.event,t=r.target;return t&&t.get("name")==="mask"}function yo(e,r){var t=e.event.target;if(t.get("type")==="path"){var i=Wp(e,r);return i?Xp(e.view,i):void 0}var n=ql(e,r);return n?mo(e.view,n):null}function Jl(e,r,t){var i=ql(e,t);if(!i)return null;var n=e.view,a=_o(n,r,{x:i.x,y:i.y}),o=_o(n,r,{x:i.maxX,y:i.maxY}),s={minX:a.x,minY:a.y,maxX:o.x,maxY:o.y};return mo(r,s)}function we(e){var r=e.geometries,t=[];return(0,c.each)(r,function(i){var n=i.elements;t=t.concat(n)}),e.views&&e.views.length&&(0,c.each)(e.views,function(i){t=t.concat(we(i))}),t}function Hp(e,r,t){var i=we(e);return i.filter(function(n){return je(n,r)===t})}function tu(e,r){var t=e.geometries,i=[];return(0,c.each)(t,function(n){var a=n.getElementsBy(function(o){return o.hasState(r)});i=i.concat(a)}),i}function je(e,r){var t=e.getModel(),i=t.data,n;return(0,c.isArray)(i)?n=i[0][r]:n=i[r],n}function Yp(e,r){return!(r.minX>e.maxX||r.maxX<e.minX||r.minY>e.maxY||r.maxY<e.minY)}function mo(e,r){var t=we(e),i=[];return(0,c.each)(t,function(n){var a=n.shape,o=a.getCanvasBBox();Yp(r,o)&&i.push(n)}),i}function eu(e){var r=[];return(0,c.each)(e,function(t){var i=t[0];if(i!=="A")for(var n=1;n<t.length;n=n+2)r.push([t[n],t[n+1]]);else{var a=t.length;r.push([t[a-2],t[a-1]])}}),r}function Xp(e,r){var t=we(e),i=eu(r),n=t.filter(function(a){var o=a.shape,s;if(o.get("type")==="path")s=eu(o.attr("path"));else{var l=o.getCanvasBBox();s=_p(l)}return(0,Pn.Wq)(i,s)});return n}function ru(e){return e.getComponents().map(function(r){return r.component})}function xo(e,r){var t=r.x-e.x,i=r.y-e.y;return Math.sqrt(t*t+i*i)}function jp(e,r){if(e.length<=2)return ji(e,!1);var t=e[0],i=[];(0,c.each)(e,function(a){i.push(a.x),i.push(a.y)});var n=Kl(i,r,null);return n.unshift(["M",t.x,t.y]),n}function iu(e,r){return e.x<=r.x&&e.maxX>=r.x&&e.y<=r.y&&e.maxY>r.y}function $e(e){var r=e.parent,t=null;return r&&(t=r.views.filter(function(i){return i!==e})),t}function Up(e,r){var t=e.getCoordinate();return t.invert(r)}function _o(e,r,t){var i=Up(e,t);return r.getCoordinate().convert(i)}function nu(e,r,t,i){var n=!1;return(0,c.each)(e,function(a){if(a[t]===r[t]&&a[i]===r[i])return n=!0,!1}),n}function li(e,r){var t=e.getScaleByField(r);return!t&&e.views&&(0,c.each)(e.views,function(i){if(t=li(i,r),t)return!1}),t}var Zp=function(){function e(r){this.actions=[],this.event=null,this.cacheMap={},this.view=r}return e.prototype.cache=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];if(r.length===1)return this.cacheMap[r[0]];r.length===2&&(this.cacheMap[r[0]]=r[1])},e.prototype.getAction=function(r){return this.actions.find(function(t){return t.name===r})},e.prototype.addAction=function(r){this.actions.push(r)},e.prototype.removeAction=function(r){var t=this.actions,i=this.actions.indexOf(r);i>=0&&t.splice(i,1)},e.prototype.getCurrentPoint=function(){var r=this.event;if(r)if(r.target instanceof HTMLElement){var t=this.view.getCanvas(),i=t.getPointByClient(r.clientX,r.clientY);return i}else return{x:r.x,y:r.y};return null},e.prototype.getCurrentShape=function(){return(0,c.get)(this.event,["gEvent","shape"])},e.prototype.isInPlot=function(){var r=this.getCurrentPoint();return r?this.view.isPointInPlot(r):!1},e.prototype.isInShape=function(r){var t=this.getCurrentShape();return t?t.get("name")===r:!1},e.prototype.isInComponent=function(r){var t=ru(this.view),i=this.getCurrentPoint();return i?!!t.find(function(n){var a=n.getBBox();return r?n.get("name")===r&&iu(a,i):iu(a,i)}):!1},e.prototype.destroy=function(){(0,c.each)(this.actions.slice(),function(r){r.destroy()}),this.view=null,this.event=null,this.actions=null,this.cacheMap=null},e}(),Kp=Zp,qp=function(){function e(r,t){this.view=r,this.cfg=t}return e.prototype.init=function(){this.initEvents()},e.prototype.initEvents=function(){},e.prototype.clearEvents=function(){},e.prototype.destroy=function(){this.clearEvents()},e}(),$p=qp;function au(e,r,t){var i=e.split(":"),n=i[0],a=r.getAction(n)||Dp(n,r);if(!a)throw new Error("There is no action named ".concat(n));var o=i[1];return{action:a,methodName:o,arg:t}}function ou(e){var r=e.action,t=e.methodName,i=e.arg;if(r[t])r[t](i);else throw new Error("Action(".concat(r.name,") doesn't have a method called ").concat(t))}var Be={START:"start",SHOW_ENABLE:"showEnable",END:"end",ROLLBACK:"rollback",PROCESSING:"processing"},Qp=function(e){(0,d.__extends)(r,e);function r(t,i){var n=e.call(this,t,i)||this;return n.callbackCaches={},n.emitCaches={},n.steps=i,n}return r.prototype.init=function(){this.initContext(),e.prototype.init.call(this)},r.prototype.destroy=function(){e.prototype.destroy.call(this),this.steps=null,this.context&&(this.context.destroy(),this.context=null),this.callbackCaches=null,this.view=null},r.prototype.initEvents=function(){var t=this;(0,c.each)(this.steps,function(i,n){(0,c.each)(i,function(a){var o=t.getActionCallback(n,a);o&&t.bindEvent(a.trigger,o)})})},r.prototype.clearEvents=function(){var t=this;(0,c.each)(this.steps,function(i,n){(0,c.each)(i,function(a){var o=t.getActionCallback(n,a);o&&t.offEvent(a.trigger,o)})})},r.prototype.initContext=function(){var t=this.view,i=new Kp(t);this.context=i;var n=this.steps;(0,c.each)(n,function(a){(0,c.each)(a,function(o){if((0,c.isFunction)(o.action))o.actionObject={action:kp(o.action,i),methodName:"execute"};else if((0,c.isString)(o.action))o.actionObject=au(o.action,i,o.arg);else if((0,c.isArray)(o.action)){var s=o.action,l=(0,c.isArray)(o.arg)?o.arg:[o.arg];o.actionObject=[],(0,c.each)(s,function(u,h){o.actionObject.push(au(u,i,l[h]))})}})})},r.prototype.isAllowStep=function(t){var i=this.currentStepName,n=this.steps;if(i===t||t===Be.SHOW_ENABLE)return!0;if(t===Be.PROCESSING)return i===Be.START;if(t===Be.START)return i!==Be.PROCESSING;if(t===Be.END)return i===Be.PROCESSING||i===Be.START;if(t===Be.ROLLBACK){if(n[Be.END])return i===Be.END;if(i===Be.START)return!0}return!1},r.prototype.isAllowExecute=function(t,i){if(this.isAllowStep(t)){var n=this.getKey(t,i);return i.once&&this.emitCaches[n]?!1:i.isEnable?i.isEnable(this.context):!0}return!1},r.prototype.enterStep=function(t){this.currentStepName=t,this.emitCaches={}},r.prototype.afterExecute=function(t,i){t!==Be.SHOW_ENABLE&&this.currentStepName!==t&&this.enterStep(t);var n=this.getKey(t,i);this.emitCaches[n]=!0},r.prototype.getKey=function(t,i){return t+i.trigger+i.action},r.prototype.getActionCallback=function(t,i){var n=this,a=this.context,o=this.callbackCaches,s=i.actionObject;if(i.action&&s){var l=this.getKey(t,i);if(!o[l]){var u=function(h){a.event=h,n.isAllowExecute(t,i)?((0,c.isArray)(s)?(0,c.each)(s,function(f){a.event=h,ou(f)}):(a.event=h,ou(s)),n.afterExecute(t,i),i.callback&&(a.event=h,i.callback(a))):a.event=null};i.debounce?o[l]=(0,c.debounce)(u,i.debounce.wait,i.debounce.immediate):i.throttle?o[l]=(0,c.throttle)(u,i.throttle.wait,{leading:i.throttle.leading,trailing:i.throttle.trailing}):o[l]=u}return o[l]}return null},r.prototype.bindEvent=function(t,i){var n=t.split(":");n[0]==="window"?window.addEventListener(n[1],i):n[0]==="document"?document.addEventListener(n[1],i):this.view.on(t,i)},r.prototype.offEvent=function(t,i){var n=t.split(":");n[0]==="window"?window.removeEventListener(n[1],i):n[0]==="document"?document.removeEventListener(n[1],i):this.view.off(t,i)},r}($p),Jp=Qp,su={};function ty(e){return su[(0,c.lowerCase)(e)]}function Et(e,r){su[(0,c.lowerCase)(e)]=r}function ey(e,r,t){var i=ty(e);if(!i)return null;if((0,c.isPlainObject)(i)){var n=(0,c.mix)((0,c.clone)(i),t);return new Jp(r,n)}else{var a=i;return new a(r,t)}}function ry(e){return{title:{autoRotate:!0,position:"center",spacing:e.axisTitleSpacing,style:{fill:e.axisTitleTextFillColor,fontSize:e.axisTitleTextFontSize,lineHeight:e.axisTitleTextLineHeight,textBaseline:"middle",fontFamily:e.fontFamily},iconStyle:{fill:e.axisDescriptionIconFillColor}},label:{autoRotate:!1,autoEllipsis:!1,autoHide:{type:"equidistance",cfg:{minGap:6}},offset:e.axisLabelOffset,style:{fill:e.axisLabelFillColor,fontSize:e.axisLabelFontSize,lineHeight:e.axisLabelLineHeight,fontFamily:e.fontFamily}},line:{style:{lineWidth:e.axisLineBorder,stroke:e.axisLineBorderColor}},grid:{line:{type:"line",style:{stroke:e.axisGridBorderColor,lineWidth:e.axisGridBorder,lineDash:e.axisGridLineDash}},alignTick:!0,animate:!0},tickLine:{style:{lineWidth:e.axisTickLineBorder,stroke:e.axisTickLineBorderColor},alignTick:!0,length:e.axisTickLineLength},subTickLine:null,animate:!0}}function iy(e){return{title:null,marker:{symbol:"circle",spacing:e.legendMarkerSpacing,style:{r:e.legendCircleMarkerSize,fill:e.legendMarkerColor}},itemName:{spacing:5,style:{fill:e.legendItemNameFillColor,fontFamily:e.fontFamily,fontSize:e.legendItemNameFontSize,lineHeight:e.legendItemNameLineHeight,fontWeight:e.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:e.legendPageNavigatorMarkerSize,inactiveFill:e.legendPageNavigatorMarkerInactiveFillColor,inactiveOpacity:e.legendPageNavigatorMarkerInactiveFillOpacity,fill:e.legendPageNavigatorMarkerFillColor,opacity:e.legendPageNavigatorMarkerFillOpacity}},text:{style:{fill:e.legendPageNavigatorTextFillColor,fontSize:e.legendPageNavigatorTextFontSize}}},animate:!1,maxItemWidth:200,itemSpacing:e.legendItemSpacing,itemMarginBottom:e.legendItemMarginBottom,padding:e.legendPadding}}function lu(e){var r,t={point:{default:{fill:e.pointFillColor,r:e.pointSize,stroke:e.pointBorderColor,lineWidth:e.pointBorder,fillOpacity:e.pointFillOpacity},active:{stroke:e.pointActiveBorderColor,lineWidth:e.pointActiveBorder},selected:{stroke:e.pointSelectedBorderColor,lineWidth:e.pointSelectedBorder},inactive:{fillOpacity:e.pointInactiveFillOpacity,strokeOpacity:e.pointInactiveBorderOpacity}},hollowPoint:{default:{fill:e.hollowPointFillColor,lineWidth:e.hollowPointBorder,stroke:e.hollowPointBorderColor,strokeOpacity:e.hollowPointBorderOpacity,r:e.hollowPointSize},active:{stroke:e.hollowPointActiveBorderColor,strokeOpacity:e.hollowPointActiveBorderOpacity},selected:{lineWidth:e.hollowPointSelectedBorder,stroke:e.hollowPointSelectedBorderColor,strokeOpacity:e.hollowPointSelectedBorderOpacity},inactive:{strokeOpacity:e.hollowPointInactiveBorderOpacity}},area:{default:{fill:e.areaFillColor,fillOpacity:e.areaFillOpacity,stroke:null},active:{fillOpacity:e.areaActiveFillOpacity},selected:{fillOpacity:e.areaSelectedFillOpacity},inactive:{fillOpacity:e.areaInactiveFillOpacity}},hollowArea:{default:{fill:null,stroke:e.hollowAreaBorderColor,lineWidth:e.hollowAreaBorder,strokeOpacity:e.hollowAreaBorderOpacity},active:{fill:null,lineWidth:e.hollowAreaActiveBorder},selected:{fill:null,lineWidth:e.hollowAreaSelectedBorder},inactive:{strokeOpacity:e.hollowAreaInactiveBorderOpacity}},interval:{default:{fill:e.intervalFillColor,fillOpacity:e.intervalFillOpacity},active:{stroke:e.intervalActiveBorderColor,lineWidth:e.intervalActiveBorder},selected:{stroke:e.intervalSelectedBorderColor,lineWidth:e.intervalSelectedBorder},inactive:{fillOpacity:e.intervalInactiveFillOpacity,strokeOpacity:e.intervalInactiveBorderOpacity}},hollowInterval:{default:{fill:e.hollowIntervalFillColor,stroke:e.hollowIntervalBorderColor,lineWidth:e.hollowIntervalBorder,strokeOpacity:e.hollowIntervalBorderOpacity},active:{stroke:e.hollowIntervalActiveBorderColor,lineWidth:e.hollowIntervalActiveBorder,strokeOpacity:e.hollowIntervalActiveBorderOpacity},selected:{stroke:e.hollowIntervalSelectedBorderColor,lineWidth:e.hollowIntervalSelectedBorder,strokeOpacity:e.hollowIntervalSelectedBorderOpacity},inactive:{stroke:e.hollowIntervalInactiveBorderColor,lineWidth:e.hollowIntervalInactiveBorder,strokeOpacity:e.hollowIntervalInactiveBorderOpacity}},line:{default:{stroke:e.lineBorderColor,lineWidth:e.lineBorder,strokeOpacity:e.lineBorderOpacity,fill:null,lineAppendWidth:10,lineCap:"round",lineJoin:"round"},active:{lineWidth:e.lineActiveBorder},selected:{lineWidth:e.lineSelectedBorder},inactive:{strokeOpacity:e.lineInactiveBorderOpacity}}},i=ry(e),n=iy(e);return{background:e.backgroundColor,defaultColor:e.brandColor,subColor:e.subColor,semanticRed:e.paletteSemanticRed,semanticGreen:e.paletteSemanticGreen,padding:"auto",fontFamily:e.fontFamily,columnWidthRatio:1/2,maxColumnWidth:null,minColumnWidth:null,roseWidthRatio:.9999999,multiplePieWidthRatio:1/1.3,colors10:e.paletteQualitative10,colors20:e.paletteQualitative20,sequenceColors:e.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:t.interval.default},active:{style:t.interval.active},inactive:{style:t.interval.inactive},selected:{style:function(a){var o=a.geometry.coordinate;if(o.isPolar&&o.isTransposed){var s=Hi(a.getModel(),o),l=s.startAngle,u=s.endAngle,h=(l+u)/2,f=7.5,v=f*Math.cos(h),g=f*Math.sin(h);return{matrix:te.vs(null,[["t",v,g]])}}return t.interval.selected}}},"hollow-rect":{default:{style:t.hollowInterval.default},active:{style:t.hollowInterval.active},inactive:{style:t.hollowInterval.inactive},selected:{style:t.hollowInterval.selected}},line:{default:{style:t.hollowInterval.default},active:{style:t.hollowInterval.active},inactive:{style:t.hollowInterval.inactive},selected:{style:t.hollowInterval.selected}},tick:{default:{style:t.hollowInterval.default},active:{style:t.hollowInterval.active},inactive:{style:t.hollowInterval.inactive},selected:{style:t.hollowInterval.selected}},funnel:{default:{style:t.interval.default},active:{style:t.interval.active},inactive:{style:t.interval.inactive},selected:{style:t.interval.selected}},pyramid:{default:{style:t.interval.default},active:{style:t.interval.active},inactive:{style:t.interval.inactive},selected:{style:t.interval.selected}}},line:{line:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},dot:{default:{style:(0,d.__assign)((0,d.__assign)({},t.line.default),{lineCap:null,lineDash:[1,1]})},active:{style:(0,d.__assign)((0,d.__assign)({},t.line.active),{lineCap:null,lineDash:[1,1]})},inactive:{style:(0,d.__assign)((0,d.__assign)({},t.line.inactive),{lineCap:null,lineDash:[1,1]})},selected:{style:(0,d.__assign)((0,d.__assign)({},t.line.selected),{lineCap:null,lineDash:[1,1]})}},dash:{default:{style:(0,d.__assign)((0,d.__assign)({},t.line.default),{lineCap:null,lineDash:[5.5,1]})},active:{style:(0,d.__assign)((0,d.__assign)({},t.line.active),{lineCap:null,lineDash:[5.5,1]})},inactive:{style:(0,d.__assign)((0,d.__assign)({},t.line.inactive),{lineCap:null,lineDash:[5.5,1]})},selected:{style:(0,d.__assign)((0,d.__assign)({},t.line.selected),{lineCap:null,lineDash:[5.5,1]})}},smooth:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},hv:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},vh:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},hvh:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},vhv:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}}},polygon:{polygon:{default:{style:t.interval.default},active:{style:t.interval.active},inactive:{style:t.interval.inactive},selected:{style:t.interval.selected}}},point:{circle:{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},square:{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},bowtie:{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},diamond:{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},hexagon:{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},triangle:{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},"triangle-down":{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},"hollow-circle":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},"hollow-square":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},"hollow-bowtie":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},"hollow-diamond":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},"hollow-hexagon":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},"hollow-triangle":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},"hollow-triangle-down":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},cross:{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},tick:{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},plus:{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},hyphen:{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},line:{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}}},area:{area:{default:{style:t.area.default},active:{style:t.area.active},inactive:{style:t.area.inactive},selected:{style:t.area.selected}},smooth:{default:{style:t.area.default},active:{style:t.area.active},inactive:{style:t.area.inactive},selected:{style:t.area.selected}},line:{default:{style:t.hollowArea.default},active:{style:t.hollowArea.active},inactive:{style:t.hollowArea.inactive},selected:{style:t.hollowArea.selected}},"smooth-line":{default:{style:t.hollowArea.default},active:{style:t.hollowArea.active},inactive:{style:t.hollowArea.inactive},selected:{style:t.hollowArea.selected}}},schema:{candle:{default:{style:t.hollowInterval.default},active:{style:t.hollowInterval.active},inactive:{style:t.hollowInterval.inactive},selected:{style:t.hollowInterval.selected}},box:{default:{style:t.hollowInterval.default},active:{style:t.hollowInterval.active},inactive:{style:t.hollowInterval.inactive},selected:{style:t.hollowInterval.selected}}},edge:{line:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},vhv:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},smooth:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},arc:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}}},violin:{violin:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},smooth:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},hollow:{default:{style:t.hollowArea.default},active:{style:t.hollowArea.active},inactive:{style:t.hollowArea.inactive},selected:{style:t.hollowArea.selected}},"hollow-smooth":{default:{style:t.hollowArea.default},active:{style:t.hollowArea.active},inactive:{style:t.hollowArea.inactive},selected:{style:t.hollowArea.selected}}}},components:{axis:{common:i,top:{position:"top",grid:null,title:null,verticalLimitLength:1/2},bottom:{position:"bottom",grid:null,title:null,verticalLimitLength:1/2},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,c.deepMix)({},i.grid,{line:{type:"line"}})},radius:{title:null,grid:(0,c.deepMix)({},i.grid,{line:{type:"circle"}})}},legend:{common:n,right:{layout:"vertical",padding:e.legendVerticalPadding},left:{layout:"vertical",padding:e.legendVerticalPadding},top:{layout:"horizontal",padding:e.legendHorizontalPadding},bottom:{layout:"horizontal",padding:e.legendHorizontalPadding},continuous:{title:null,background:null,track:{},rail:{type:"color",size:e.sliderRailHeight,defaultLength:e.sliderRailWidth,style:{fill:e.sliderRailFillColor,stroke:e.sliderRailBorderColor,lineWidth:e.sliderRailBorder}},label:{align:"rail",spacing:4,formatter:null,style:{fill:e.sliderLabelTextFillColor,fontSize:e.sliderLabelTextFontSize,lineHeight:e.sliderLabelTextLineHeight,textBaseline:"middle",fontFamily:e.fontFamily}},handler:{size:e.sliderHandlerWidth,style:{fill:e.sliderHandlerFillColor,stroke:e.sliderHandlerBorderColor}},slidable:!0,padding:n.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:e.tooltipCrosshairsBorderColor,lineWidth:e.tooltipCrosshairsBorder}},text:null,textBackground:{padding:2,style:{fill:"rgba(0, 0, 0, 0.25)",lineWidth:0,stroke:null}},follow:!1},domStyles:(r={},r["".concat(or)]={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:e.tooltipContainerFillColor,opacity:e.tooltipContainerFillOpacity,boxShadow:e.tooltipContainerShadow,borderRadius:"".concat(e.tooltipContainerBorderRadius,"px"),color:e.tooltipTextFillColor,fontSize:"".concat(e.tooltipTextFontSize,"px"),fontFamily:e.fontFamily,lineHeight:"".concat(e.tooltipTextLineHeight,"px"),padding:"0 12px 0 12px"},r["".concat(sr)]={marginBottom:"12px",marginTop:"12px"},r["".concat(Wi)]={margin:0,listStyleType:"none",padding:0},r["".concat(Ln)]={listStyleType:"none",padding:0,marginBottom:"12px",marginTop:"12px",marginLeft:0,marginRight:0},r["".concat(In)]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},r["".concat(On)]={display:"inline-block",float:"right",marginLeft:"30px"},r)},annotation:{arc:{style:{stroke:e.annotationArcBorderColor,lineWidth:e.annotationArcBorder},animate:!0},line:{style:{stroke:e.annotationLineBorderColor,lineDash:e.annotationLineDash,lineWidth:e.annotationLineBorder},text:{position:"start",autoRotate:!0,style:{fill:e.annotationTextFillColor,stroke:e.annotationTextBorderColor,lineWidth:e.annotationTextBorder,fontSize:e.annotationTextFontSize,textAlign:"start",fontFamily:e.fontFamily,textBaseline:"bottom"}},animate:!0},text:{style:{fill:e.annotationTextFillColor,stroke:e.annotationTextBorderColor,lineWidth:e.annotationTextBorder,fontSize:e.annotationTextFontSize,textBaseline:"middle",textAlign:"start",fontFamily:e.fontFamily},animate:!0},region:{top:!1,style:{lineWidth:e.annotationRegionBorder,stroke:e.annotationRegionBorderColor,fill:e.annotationRegionFillColor,fillOpacity:e.annotationRegionFillOpacity},animate:!0},image:{top:!1,animate:!0},dataMarker:{top:!0,point:{style:{r:3,stroke:e.brandColor,lineWidth:2}},line:{style:{stroke:e.annotationLineBorderColor,lineWidth:e.annotationLineBorder},length:e.annotationDataMarkerLineLength},text:{style:{textAlign:"start",fill:e.annotationTextFillColor,stroke:e.annotationTextBorderColor,lineWidth:e.annotationTextBorder,fontSize:e.annotationTextFontSize,fontFamily:e.fontFamily}},direction:"upward",autoAdjust:!0,animate:!0},dataRegion:{style:{region:{fill:e.annotationRegionFillColor,fillOpacity:e.annotationRegionFillOpacity},text:{textAlign:"center",textBaseline:"bottom",fill:e.annotationTextFillColor,stroke:e.annotationTextBorderColor,lineWidth:e.annotationTextBorder,fontSize:e.annotationTextFontSize,fontFamily:e.fontFamily}},animate:!0}},slider:{common:{padding:[8,8,8,8],backgroundStyle:{fill:e.cSliderBackgroundFillColor,opacity:e.cSliderBackgroundFillOpacity},foregroundStyle:{fill:e.cSliderForegroundFillColor,opacity:e.cSliderForegroundFillOpacity},handlerStyle:{width:e.cSliderHandlerWidth,height:e.cSliderHandlerHeight,fill:e.cSliderHandlerFillColor,opacity:e.cSliderHandlerFillOpacity,stroke:e.cSliderHandlerBorderColor,lineWidth:e.cSliderHandlerBorder,radius:e.cSliderHandlerBorderRadius,highLightFill:e.cSliderHandlerHighlightFillColor},textStyle:{fill:e.cSliderTextFillColor,opacity:e.cSliderTextFillOpacity,fontSize:e.cSliderTextFontSize,lineHeight:e.cSliderTextLineHeight,fontWeight:e.cSliderTextFontWeight,stroke:e.cSliderTextBorderColor,lineWidth:e.cSliderTextBorder}}},scrollbar:{common:{padding:[8,8,8,8]},default:{style:{trackColor:e.scrollbarTrackFillColor,thumbColor:e.scrollbarThumbFillColor}},hover:{style:{thumbColor:e.scrollbarThumbHighlightFillColor}}}},labels:{offset:12,style:{fill:e.labelFillColor,fontSize:e.labelFontSize,fontFamily:e.fontFamily,stroke:e.labelBorderColor,lineWidth:e.labelBorder},fillColorDark:e.labelFillColorDark,fillColorLight:e.labelFillColorLight,autoRotate:!0},innerLabels:{style:{fill:e.innerLabelFillColor,fontSize:e.innerLabelFontSize,fontFamily:e.fontFamily,stroke:e.innerLabelBorderColor,lineWidth:e.innerLabelBorder},autoRotate:!0},overflowLabels:{style:{fill:e.overflowLabelFillColor,fontSize:e.overflowLabelFontSize,fontFamily:e.fontFamily,stroke:e.overflowLabelBorderColor,lineWidth:e.overflowLabelBorder}},pieLabels:{labelHeight:14,offset:10,labelLine:{style:{lineWidth:e.labelLineBorder}},autoRotate:!0}}}var Ut={100:"#000",95:"#0D0D0D",85:"#262626",65:"#595959",45:"#8C8C8C",25:"#BFBFBF",15:"#D9D9D9",6:"#F0F0F0"},ui={100:"#FFFFFF",95:"#F2F2F2",85:"#D9D9D9",65:"#A6A6A6",45:"#737373",25:"#404040",15:"#262626",6:"#0F0F0F"},ny=["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"],ay=["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"],oy=["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"],uu=function(e){e===void 0&&(e={});var r=e.paletteQualitative10,t=r===void 0?ny:r,i=e.paletteQualitative20,n=i===void 0?ay:i,a=e.brandColor,o=a===void 0?t[0]:a,s={backgroundColor:"transparent",brandColor:o,subColor:"rgba(0,0,0,0.05)",paletteQualitative10:t,paletteQualitative20:n,paletteSemanticRed:"#F4664A",paletteSemanticGreen:"#30BF78",paletteSemanticYellow:"#FAAD14",paletteSequence:oy,fontFamily:`"Segoe UI", Roboto, "Helvetica Neue", Arial,
  31. "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
  32. "Noto Color Emoji"`,axisLineBorderColor:Ut[25],axisLineBorder:1,axisLineDash:null,axisTitleTextFillColor:Ut[65],axisTitleTextFontSize:12,axisTitleTextLineHeight:12,axisTitleTextFontWeight:"normal",axisTitleSpacing:12,axisDescriptionIconFillColor:ui[85],axisTickLineBorderColor:Ut[25],axisTickLineLength:4,axisTickLineBorder:1,axisSubTickLineBorderColor:Ut[15],axisSubTickLineLength:2,axisSubTickLineBorder:1,axisLabelFillColor:Ut[45],axisLabelFontSize:12,axisLabelLineHeight:12,axisLabelFontWeight:"normal",axisLabelOffset:8,axisGridBorderColor:Ut[15],axisGridBorder:1,axisGridLineDash:null,legendTitleTextFillColor:Ut[45],legendTitleTextFontSize:12,legendTitleTextLineHeight:21,legendTitleTextFontWeight:"normal",legendMarkerColor:o,legendMarkerSpacing:8,legendMarkerSize:4,legendCircleMarkerSize:4,legendSquareMarkerSize:4,legendLineMarkerSize:5,legendItemNameFillColor:Ut[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:Ut[100],legendPageNavigatorMarkerInactiveFillOpacity:.45,legendPageNavigatorMarkerFillColor:Ut[100],legendPageNavigatorMarkerFillOpacity:1,legendPageNavigatorTextFillColor:Ut[45],legendPageNavigatorTextFontSize:12,sliderRailFillColor:Ut[15],sliderRailBorder:0,sliderRailBorderColor:null,sliderRailWidth:100,sliderRailHeight:12,sliderLabelTextFillColor:Ut[45],sliderLabelTextFontSize:12,sliderLabelTextLineHeight:12,sliderLabelTextFontWeight:"normal",sliderHandlerFillColor:Ut[6],sliderHandlerWidth:10,sliderHandlerHeight:14,sliderHandlerBorder:1,sliderHandlerBorderColor:Ut[25],annotationArcBorderColor:Ut[15],annotationArcBorder:1,annotationLineBorderColor:Ut[25],annotationLineBorder:1,annotationLineDash:null,annotationTextFillColor:Ut[65],annotationTextFontSize:12,annotationTextLineHeight:12,annotationTextFontWeight:"normal",annotationTextBorderColor:null,annotationTextBorder:0,annotationRegionFillColor:Ut[100],annotationRegionFillOpacity:.06,annotationRegionBorder:0,annotationRegionBorderColor:null,annotationDataMarkerLineLength:16,tooltipCrosshairsBorderColor:Ut[25],tooltipCrosshairsBorder:1,tooltipCrosshairsLineDash:null,tooltipContainerFillColor:"rgb(255, 255, 255)",tooltipContainerFillOpacity:.95,tooltipContainerShadow:"0px 0px 10px #aeaeae",tooltipContainerBorderRadius:3,tooltipTextFillColor:Ut[65],tooltipTextFontSize:12,tooltipTextLineHeight:12,tooltipTextFontWeight:"bold",labelFillColor:Ut[65],labelFillColorDark:"#2c3542",labelFillColorLight:"#ffffff",labelFontSize:12,labelLineHeight:12,labelFontWeight:"normal",labelBorderColor:null,labelBorder:0,innerLabelFillColor:ui[100],innerLabelFontSize:12,innerLabelLineHeight:12,innerLabelFontWeight:"normal",innerLabelBorderColor:null,innerLabelBorder:0,overflowLabelFillColor:Ut[65],overflowLabelFontSize:12,overflowLabelLineHeight:12,overflowLabelFontWeight:"normal",overflowLabelBorderColor:ui[100],overflowLabelBorder:1,labelLineBorder:1,labelLineBorderColor:Ut[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:o,pointFillOpacity:.95,pointSize:4,pointBorder:1,pointBorderColor:ui[100],pointBorderOpacity:1,pointActiveBorderColor:Ut[100],pointSelectedBorder:2,pointSelectedBorderColor:Ut[100],pointInactiveFillOpacity:.3,pointInactiveBorderOpacity:.3,hollowPointSize:4,hollowPointBorder:1,hollowPointBorderColor:o,hollowPointBorderOpacity:.95,hollowPointFillColor:ui[100],hollowPointActiveBorder:1,hollowPointActiveBorderColor:Ut[100],hollowPointActiveBorderOpacity:1,hollowPointSelectedBorder:2,hollowPointSelectedBorderColor:Ut[100],hollowPointSelectedBorderOpacity:1,hollowPointInactiveBorderOpacity:.3,lineBorder:2,lineBorderColor:o,lineBorderOpacity:1,lineActiveBorder:3,lineSelectedBorder:3,lineInactiveBorderOpacity:.3,areaFillColor:o,areaFillOpacity:.25,areaActiveFillColor:o,areaActiveFillOpacity:.5,areaSelectedFillColor:o,areaSelectedFillOpacity:.5,areaInactiveFillOpacity:.3,hollowAreaBorderColor:o,hollowAreaBorder:2,hollowAreaBorderOpacity:1,hollowAreaActiveBorder:3,hollowAreaActiveBorderColor:Ut[100],hollowAreaSelectedBorder:3,hollowAreaSelectedBorderColor:Ut[100],hollowAreaInactiveBorderOpacity:.3,intervalFillColor:o,intervalFillOpacity:.95,intervalActiveBorder:1,intervalActiveBorderColor:Ut[100],intervalActiveBorderOpacity:1,intervalSelectedBorder:2,intervalSelectedBorderColor:Ut[100],intervalSelectedBorderOpacity:1,intervalInactiveBorderOpacity:.3,intervalInactiveFillOpacity:.3,hollowIntervalBorder:2,hollowIntervalBorderColor:o,hollowIntervalBorderOpacity:1,hollowIntervalFillColor:ui[100],hollowIntervalActiveBorder:2,hollowIntervalActiveBorderColor:Ut[100],hollowIntervalSelectedBorder:3,hollowIntervalSelectedBorderColor:Ut[100],hollowIntervalSelectedBorderOpacity:1,hollowIntervalInactiveBorderOpacity:.3};return(0,d.__assign)((0,d.__assign)({},s),e)},$T=uu();function Hn(e){var r=e.styleSheet,t=r===void 0?{}:r,i=(0,d.__rest)(e,["styleSheet"]),n=uu(t);return(0,c.deepMix)({},lu(n),i)}var sy=Hn({}),wo={default:sy};function Ki(e){return(0,c.get)(wo,(0,c.lowerCase)(e),wo.default)}function ly(e,r){wo[(0,c.lowerCase)(e)]=Hn(r)}function cu(e,r,t){var i=t.translate(e),n=t.translate(r);return(0,c.isNumberEqual)(i,n)}function uy(e,r){var t=r.coordinate,i=r.getXScale(),n=i.range,a=n[n.length-1],o=n[0],s=t.invert(e),l=s.x;return t.isPolar&&l>(1+a)/2&&(l=o),i.translate(i.invert(l))}function hu(e,r,t){var i=t.coordinate,n=t.getYScale(),a=n.field,o=i.invert(r),s=n.invert(o.y),l=(0,c.find)(e,function(u){var h=u[K];return h[a][0]<=s&&h[a][1]>=s});return l||e[e.length-1]}var cy=(0,c.memoize)(function(e){if(e.isCategory)return 1;for(var r=e.values,t=r.length,i=e.translate(r[0]),n=i,a=0;a<t;a++){var o=r[a],s=e.translate(o);s<i&&(i=s),s>n&&(n=s)}return(n-i)/(t-1)});function hy(e,r,t){var i=r.getAttribute("position"),n=i.getFields(),a=r.scales,o=(0,c.isFunction)(t)||!t?n[0]:t,s=a[o],l=s?s.getText(e[o]):e[o]||o;return(0,c.isFunction)(t)?t(l,e):l}function fy(e){var r=(0,c.values)(e.attributes);return(0,c.filter)(r,function(t){return(0,c.contains)(at,t.type)})}function fu(e){var r,t,i=fy(e),n;try{for(var a=(0,d.__values)(i),o=a.next();!o.done;o=a.next()){var s=o.value,l=s.getScale(s.type);if(l&&l.isLinear){var u=(0,c.get)(e.scaleDefs,l.field),h=Vl(l,u,s.type,e.type);if(h!=="cat"){n=l;break}}}}catch(g){r={error:g}}finally{try{o&&!o.done&&(t=a.return)&&t.call(a)}finally{if(r)throw r.error}}var f=e.getXScale(),v=e.getYScale();return n||v||f}function vy(e,r){var t=r.field,i=e[t];if((0,c.isArray)(i)){var n=i.map(function(a){return r.getText(a)});return n.join("-")}return r.getText(i)}function dy(e,r){var t,i=r.getGroupScales();if(i.length&&(t=i[0]),t){var n=t.field;return t.getText(e[n])}var a=fu(r);return Xi(a)}function vu(e,r,t){if(r.length===0)return null;var i=t.type,n=t.getXScale(),a=t.getYScale(),o=n.field,s=a.field,l=null;if(i==="heatmap"||i==="point"){for(var u=t.coordinate,h=u.invert(e),f=n.invert(h.x),v=a.invert(h.y),g=Infinity,p=0;p<r.length;p++){var y=r[p],m=y[K],x=Math.pow(m[o]-f,2)+Math.pow(m[s]-v,2);x<g&&(g=x,l=y)}return l}var _=r[0],w=r[r.length-1],b=uy(e,t),S=_[K][o],C=_[K][s],M=w[K][o],L=a.isLinear&&(0,c.isArray)(C);if((0,c.isArray)(S)){for(var p=0;p<r.length;p++){var B=r[p],m=B[K];if(n.translate(m[o][0])<=b&&n.translate(m[o][1])>=b)if(L)(0,c.isArray)(l)||(l=[]),l.push(B);else{l=B;break}}(0,c.isArray)(l)&&(l=hu(l,e,t))}else{var I=void 0;if(!n.isLinear&&n.type!=="timeCat"){for(var p=0;p<r.length;p++){var B=r[p],m=B[K];if(cu(m[o],b,n))if(L)(0,c.isArray)(l)||(l=[]),l.push(B);else{l=B;break}else n.translate(m[o])<=b&&(w=B,I=r[p+1])}(0,c.isArray)(l)&&(l=hu(l,e,t))}else{if((b>n.translate(M)||b<n.translate(S))&&(b>n.max||b<n.min))return null;for(var G=0,q=r.length-1,ft=void 0;G<=q;){ft=Math.floor((G+q)/2);var mt=r[ft][K][o];if(cu(mt,b,n))return r[ft];n.translate(mt)<=n.translate(b)?(G=ft+1,w=r[ft],I=r[ft+1]):(q===0&&(w=r[0]),q=ft-1)}}w&&I&&Math.abs(n.translate(w[K][o])-b)>Math.abs(n.translate(I[K][o])-b)&&(w=I)}var zt=cy(t.getXScale());return!l&&Math.abs(n.translate(w[K][o])-b)<=zt/2&&(l=w),l}function bo(e,r,t,i){var n,a;t===void 0&&(t=""),i===void 0&&(i=!1);var o=e[K],s=hy(o,r,t),l=r.tooltipOption,u=r.theme.defaultColor,h=[],f,v;function g(B,I){if(i||!(0,c.isNil)(I)&&I!==""){var G={title:s,data:o,mappingData:e,name:B,value:I,color:e.color||u,marker:!0};h.push(G)}}if((0,c.isObject)(l)){var p=l.fields,y=l.callback;if(y){var m=p.map(function(B){return e[K][B]}),x=y.apply(void 0,(0,d.__spreadArray)([],(0,d.__read)(m),!1)),_=(0,d.__assign)({data:e[K],mappingData:e,title:s,color:e.color||u,marker:!0},x);h.push(_)}else{var w=r.scales;try{for(var b=(0,d.__values)(p),S=b.next();!S.done;S=b.next()){var C=S.value;if(!(0,c.isNil)(o[C])){var M=w[C];f=Xi(M),v=M.getText(o[C]),g(f,v)}}}catch(B){n={error:B}}finally{try{S&&!S.done&&(a=b.return)&&a.call(b)}finally{if(n)throw n.error}}}}else{var L=fu(r);v=vy(o,L),f=dy(o,r),g(f,v)}return h}function du(e,r,t,i){var n,a,o=i.showNil,s=[],l=e.dataArray;if(!(0,c.isEmpty)(l)){e.sort(l);try{for(var u=(0,d.__values)(l),h=u.next();!h.done;h=u.next()){var f=h.value,v=vu(r,f,e);if(v){var g=e.getElementId(v),p=e.elementsMap[g];if(e.type==="heatmap"||p.visible){var y=bo(v,e,t,o);y.length&&s.push(y)}}}}catch(m){n={error:m}}finally{try{h&&!h.done&&(a=u.return)&&a.call(u)}finally{if(n)throw n.error}}}return s}function gu(e,r,t,i){var n=i.showNil,a=[],o=e.container,s=o.getShape(r.x,r.y);if(s&&s.get("visible")&&s.get("origin")){var l=s.get("origin").mappingData,u=bo(l,e,t,n);u.length&&a.push(u)}return a}function So(e,r,t){var i,n,a=[],o=e.geometries,s=t.shared,l=t.title,u=t.reversed;try{for(var h=(0,d.__values)(o),f=h.next();!f.done;f=h.next()){var v=f.value;if(v.visible&&v.tooltipOption!==!1){var g=v.type,p=void 0;["point","edge","polygon"].includes(g)?p=gu(v,r,l,t):["area","line","path","heatmap"].includes(g)||s!==!1?p=du(v,r,l,t):p=gu(v,r,l,t),p.length&&(u&&p.reverse(),a.push(p))}}}catch(y){i={error:y}}finally{try{f&&!f.done&&(n=h.return)&&n.call(h)}finally{if(i)throw i.error}}return a}function gy(e,r,t){var i,n,a=So(e,r,t);try{for(var o=(0,d.__values)(e.views),s=o.next();!s.done;s=o.next()){var l=s.value;a=a.concat(So(l,r,t))}}catch(u){i={error:u}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function py(e){return!(0,c.isNumber)(e)&&!(0,c.isArray)(e)}function Co(e){e===void 0&&(e=0);var r=(0,c.isArray)(e)?e:[e];switch(r.length){case 0:r=[0,0,0,0];break;case 1:r=new Array(4).fill(r[0]);break;case 2:r=(0,d.__spreadArray)((0,d.__spreadArray)([],(0,d.__read)(r),!1),(0,d.__read)(r),!1);break;case 3:r=(0,d.__spreadArray)((0,d.__spreadArray)([],(0,d.__read)(r),!1),[r[1]],!1);break;default:r=r.slice(0,4);break}return r}var Yn={};function Nr(e,r){Yn[e]=r}function QT(e){delete Yn[e]}function yy(){return Object.keys(Yn)}function my(e){return Yn[e]}var xy=function(){function e(r){this.option=this.wrapperOption(r)}return e.prototype.update=function(r){return this.option=this.wrapperOption(r),this},e.prototype.hasAction=function(r){var t=this.option.actions;return(0,c.some)(t,function(i){return i[0]===r})},e.prototype.create=function(r,t){var i=this.option,n=i.type,a=i.cfg,o=n==="theta",s=(0,d.__assign)({start:r,end:t},a),l=gd(o?"polar":n);return this.coordinate=new l(s),this.coordinate.type=n,o&&(this.hasAction("transpose")||this.transpose()),this.execActions(),this.coordinate},e.prototype.adjust=function(r,t){return this.coordinate.update({start:r,end:t}),this.coordinate.resetMatrix(),this.execActions(["scale","rotate","translate"]),this.coordinate},e.prototype.rotate=function(r){return this.option.actions.push(["rotate",r]),this},e.prototype.reflect=function(r){return this.option.actions.push(["reflect",r]),this},e.prototype.scale=function(r,t){return this.option.actions.push(["scale",r,t]),this},e.prototype.transpose=function(){return this.option.actions.push(["transpose"]),this},e.prototype.getOption=function(){return this.option},e.prototype.getCoordinate=function(){return this.coordinate},e.prototype.wrapperOption=function(r){return(0,d.__assign)({type:"rect",actions:[],cfg:{}},r)},e.prototype.execActions=function(r){var t=this,i=this.option.actions;(0,c.each)(i,function(n){var a,o=(0,d.__read)(n),s=o[0],l=o.slice(1),u=(0,c.isNil)(r)?!0:r.includes(s);u&&(a=t.coordinate)[s].apply(a,(0,d.__spreadArray)([],(0,d.__read)(l),!1))})},e}(),_y=xy,wy=function(){function e(r,t,i){this.view=r,this.gEvent=t,this.data=i,this.type=t.type}return e.fromData=function(r,t,i){return new e(r,new vt.ju(t,{}),i)},Object.defineProperty(e.prototype,"target",{get:function(){return this.gEvent.target},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"event",{get:function(){return this.gEvent.originalEvent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"x",{get:function(){return this.gEvent.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this.gEvent.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientX",{get:function(){return this.gEvent.clientX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientY",{get:function(){return this.gEvent.clientY},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return"[Event (type=".concat(this.type,")]")},e.prototype.clone=function(){return new e(this.view,this.gEvent,this.data)},e}(),ne=wy;function by(e){var r=e.getController("axis"),t=e.getController("legend"),i=e.getController("annotation"),n=e.getController("slider"),a=e.getController("scrollbar");[r,n,a,t,i].forEach(function(o){o&&o.layout()})}var Sy=function(){function e(){this.scales=new Map,this.syncScales=new Map}return e.prototype.createScale=function(r,t,i,n){var a=i,o=this.getScaleMeta(n);if(t.length===0&&o){var s=o.scale,l={type:s.type};s.isCategory&&(l.values=s.values),a=(0,c.deepMix)(l,o.scaleDef,i)}var u=Ap(r,t,a);return this.cacheScale(u,i,n),u},e.prototype.sync=function(r,t){var i=this;this.syncScales.forEach(function(n,a){var o=Number.MAX_SAFE_INTEGER,s=Number.MIN_SAFE_INTEGER,l=[];(0,c.each)(n,function(u){var h=i.getScale(u);s=(0,c.isNumber)(h.max)?Math.max(s,h.max):s,o=(0,c.isNumber)(h.min)?Math.min(o,h.min):o,(0,c.each)(h.values,function(f){l.includes(f)||l.push(f)})}),(0,c.each)(n,function(u){var h=i.getScale(u);if(h.isContinuous)h.change({min:o,max:s,values:l});else if(h.isCategory){var f=h.range,v=i.getScaleMeta(u);l&&!(0,c.get)(v,["scaleDef","range"])&&(f=Gl((0,c.deepMix)({},h,{values:l}),r,t)),h.change({values:l,range:f})}})})},e.prototype.cacheScale=function(r,t,i){var n=this.getScaleMeta(i);n&&n.scale.type===r.type?(Fp(n.scale,r),n.scaleDef=t):(n={key:i,scale:r,scaleDef:t},this.scales.set(i,n));var a=this.getSyncKey(n);if(n.syncKey=a,this.removeFromSyncScales(i),a){var o=this.syncScales.get(a);o||(o=[],this.syncScales.set(a,o)),o.push(i)}},e.prototype.getScale=function(r){var t=this.getScaleMeta(r);if(!t){var i=(0,c.last)(r.split("-")),n=this.syncScales.get(i);n&&n.length&&(t=this.getScaleMeta(n[0]))}return t&&t.scale},e.prototype.deleteScale=function(r){var t=this.getScaleMeta(r);if(t){var i=t.syncKey,n=this.syncScales.get(i);if(n&&n.length){var a=n.indexOf(r);a!==-1&&n.splice(a,1)}}this.scales.delete(r)},e.prototype.clear=function(){this.scales.clear(),this.syncScales.clear()},e.prototype.removeFromSyncScales=function(r){var t=this;this.syncScales.forEach(function(i,n){var a=i.indexOf(r);if(a!==-1)return i.splice(a,1),i.length===0&&t.syncScales.delete(n),!1})},e.prototype.getSyncKey=function(r){var t=r.scale,i=r.scaleDef,n=t.field,a=(0,c.get)(i,["sync"]);return a===!0?n:a===!1?void 0:a},e.prototype.getScaleMeta=function(r){return this.scales.get(r)},e}(),Xn=function(){function e(r,t,i,n){r===void 0&&(r=0),t===void 0&&(t=0),i===void 0&&(i=0),n===void 0&&(n=0),this.top=r,this.right=t,this.bottom=i,this.left=n}return e.instance=function(r,t,i,n){return r===void 0&&(r=0),t===void 0&&(t=0),i===void 0&&(i=0),n===void 0&&(n=0),new e(r,t,i,n)},e.prototype.max=function(r){var t=(0,d.__read)(r,4),i=t[0],n=t[1],a=t[2],o=t[3];return this.top=Math.max(this.top,i),this.right=Math.max(this.right,n),this.bottom=Math.max(this.bottom,a),this.left=Math.max(this.left,o),this},e.prototype.shrink=function(r){var t=(0,d.__read)(r,4),i=t[0],n=t[1],a=t[2],o=t[3];return this.top+=i,this.right+=n,this.bottom+=a,this.left+=o,this},e.prototype.inc=function(r,t){var i=r.width,n=r.height;switch(t){case T.TOP:case T.TOP_LEFT:case T.TOP_RIGHT:this.top+=n;break;case T.RIGHT:case T.RIGHT_TOP:case T.RIGHT_BOTTOM:this.right+=i;break;case T.BOTTOM:case T.BOTTOM_LEFT:case T.BOTTOM_RIGHT:this.bottom+=n;break;case T.LEFT:case T.LEFT_TOP:case T.LEFT_BOTTOM:this.left+=i;break;default:break}return this},e.prototype.getPadding=function(){return[this.top,this.right,this.bottom,this.left]},e.prototype.clone=function(){return new(e.bind.apply(e,(0,d.__spreadArray)([void 0],(0,d.__read)(this.getPadding()),!1)))},e}();function Cy(e){var r=e.padding;if(!py(r))return new(Xn.bind.apply(Xn,(0,d.__spreadArray)([void 0],(0,d.__read)(Co(r)),!1)));var t=e.viewBBox,i=new Xn,n=[],a=[],o=[];return(0,c.each)(e.getComponents(),function(s){var l=s.type;l===z.AXIS?n.push(s):[z.LEGEND,z.SLIDER,z.SCROLLBAR].includes(l)?a.push(s):l!==z.GRID&&l!==z.TOOLTIP&&o.push(s)}),(0,c.each)(n,function(s){var l=s.component,u=l.getLayoutBBox(),h=new Ae(u.x,u.y,u.width,u.height),f=h.exceed(t);i.max(f)}),(0,c.each)(a,function(s){var l=s.component,u=s.direction,h=l.getLayoutBBox(),f=l.get("padding"),v=new Ae(h.x,h.y,h.width,h.height).expand(f);i.inc(v,u)}),(0,c.each)(o,function(s){var l=s.component,u=s.direction,h=l.getLayoutBBox(),f=new Ae(h.x,h.y,h.width,h.height);i.inc(f,u)}),i}function Ay(e,r,t){var i=t.instance();r.forEach(function(n){n.autoPadding=i.max(n.autoPadding.getPadding())})}var pu=function(e){(0,d.__extends)(r,e);function r(t){var i=e.call(this,{visible:t.visible})||this;i.views=[],i.geometries=[],i.controllers=[],i.interactions={},i.limitInPlot=!1,i.options={data:[],animate:!0},i.usedControllers=yy(),i.scalePool=new Sy,i.layoutFunc=by,i.isPreMouseInPlot=!1,i.isDataChanged=!1,i.isCoordinateChanged=!1,i.createdScaleKeys=new Map,i.onCanvasEvent=function(w){var b=w.name;if(!b.includes(":")){var S=i.createViewEvent(w);i.doPlotEvent(S),i.emit(b,S)}},i.onDelegateEvents=function(w){var b=w.name;if(!!b.includes(":")){var S=i.createViewEvent(w);i.emit(b,S)}};var n=t.id,a=n===void 0?(0,c.uniqueId)("view"):n,o=t.parent,s=t.canvas,l=t.backgroundGroup,u=t.middleGroup,h=t.foregroundGroup,f=t.region,v=f===void 0?{start:{x:0,y:0},end:{x:1,y:1}}:f,g=t.padding,p=t.appendPadding,y=t.theme,m=t.options,x=t.limitInPlot,_=t.syncViewPadding;return i.parent=o,i.canvas=s,i.backgroundGroup=l,i.middleGroup=u,i.foregroundGroup=h,i.region=v,i.padding=g,i.appendPadding=p,i.options=(0,d.__assign)((0,d.__assign)({},i.options),m),i.limitInPlot=x,i.id=a,i.syncViewPadding=_,i.themeObject=(0,c.isObject)(y)?(0,c.deepMix)({},Ki("default"),Hn(y)):Ki(y),i.init(),i}return r.prototype.setLayout=function(t){this.layoutFunc=t},r.prototype.init=function(){this.calculateViewBBox(),this.initEvents(),this.initComponentController(),this.initOptions()},r.prototype.render=function(t,i){t===void 0&&(t=!1),this.emit(A.BEFORE_RENDER,ne.fromData(this,A.BEFORE_RENDER,i)),this.paint(t),this.emit(A.AFTER_RENDER,ne.fromData(this,A.AFTER_RENDER,i)),this.visible===!1&&this.changeVisible(!1)},r.prototype.clear=function(){var t=this;this.emit(A.BEFORE_CLEAR),this.filteredData=[],this.coordinateInstance=void 0,this.isDataChanged=!1,this.isCoordinateChanged=!1;for(var i=this.geometries,n=0;n<i.length;n++)i[n].clear(),i[n].container.remove(!0),i[n].labelsContainer.remove(!0);this.geometries=[];for(var a=this.controllers,n=0;n<a.length;n++)a[n].name==="annotation"?a[n].clear(!0):a[n].clear();this.createdScaleKeys.forEach(function(s,l){t.getRootView().scalePool.deleteScale(l)}),this.createdScaleKeys.clear();for(var o=this.views,n=0;n<o.length;n++)o[n].clear();this.emit(A.AFTER_CLEAR)},r.prototype.destroy=function(){this.emit(A.BEFORE_DESTROY);var t=this.interactions;(0,c.each)(t,function(s){s&&s.destroy()}),this.clear();for(var i=this.controllers,n=0,a=i.length;n<a;n++){var o=i[n];o.destroy()}this.backgroundGroup.remove(!0),this.middleGroup.remove(!0),this.foregroundGroup.remove(!0),e.prototype.destroy.call(this)},r.prototype.changeVisible=function(t){e.prototype.changeVisible.call(this,t);for(var i=this.geometries,n=0,a=i.length;n<a;n++){var o=i[n];o.changeVisible(t)}for(var s=this.controllers,n=0,a=s.length;n<a;n++){var l=s[n];l.changeVisible(t)}return this.foregroundGroup.set("visible",t),this.middleGroup.set("visible",t),this.backgroundGroup.set("visible",t),this.getCanvas().draw(),this},r.prototype.data=function(t){return(0,c.set)(this.options,"data",t),this.isDataChanged=!0,this},r.prototype.source=function(t){return console.warn("This method will be removed at G2 V4.1. Please use chart.data() instead."),this.data(t)},r.prototype.filter=function(t,i){return(0,c.isFunction)(i)?((0,c.set)(this.options,["filters",t],i),this):(!i&&(0,c.get)(this.options,["filters",t])&&delete this.options.filters[t],this)},r.prototype.axis=function(t,i){return(0,c.isBoolean)(t)?(0,c.set)(this.options,["axes"],t):(0,c.set)(this.options,["axes",t],i),this},r.prototype.legend=function(t,i){return(0,c.isBoolean)(t)?(0,c.set)(this.options,["legends"],t):(0,c.isString)(t)?((0,c.set)(this.options,["legends",t],i),(0,c.isPlainObject)(i)&&(i==null?void 0:i.selected)&&(0,c.set)(this.options,["filters",t],function(n){var a;return(a=i==null?void 0:i.selected[n])!==null&&a!==void 0?a:!0})):(0,c.set)(this.options,["legends"],t),this},r.prototype.scale=function(t,i){var n=this;return(0,c.isString)(t)?(0,c.set)(this.options,["scales",t],i):(0,c.isObject)(t)&&(0,c.each)(t,function(a,o){(0,c.set)(n.options,["scales",o],a)}),this},r.prototype.tooltip=function(t){return(0,c.set)(this.options,"tooltip",t),this},r.prototype.annotation=function(){return this.getController("annotation")},r.prototype.guide=function(){return console.warn("This method will be removed at G2 V4.1. Please use chart.annotation() instead."),this.annotation()},r.prototype.coordinate=function(t,i){return(0,c.isString)(t)?(0,c.set)(this.options,"coordinate",{type:t,cfg:i}):(0,c.set)(this.options,"coordinate",t),this.coordinateController.update(this.options.coordinate),this.coordinateController},r.prototype.coord=function(t,i){return console.warn("This method will be removed at G2 V4.1. Please use chart.coordinate() instead."),this.coordinate(t,i)},r.prototype.facet=function(t,i){this.facetInstance&&this.facetInstance.destroy();var n=Lp(t);if(!n)throw new Error("facet '".concat(t,"' is not exist!"));return this.facetInstance=new n(this,(0,d.__assign)((0,d.__assign)({},i),{type:t})),this},r.prototype.animate=function(t){return(0,c.set)(this.options,"animate",t),this},r.prototype.updateOptions=function(t){return this.clear(),(0,c.mix)(this.options,t),this.views.forEach(function(i){return i.destroy()}),this.views=[],this.initOptions(),this.coordinateBBox=this.viewBBox,this},r.prototype.option=function(t,i){if(r.prototype[t])throw new Error(`Can't use built in variable name "`.concat(t,'", please change another one.'));return(0,c.set)(this.options,t,i),this},r.prototype.theme=function(t){return this.themeObject=(0,c.isObject)(t)?(0,c.deepMix)({},this.themeObject,Hn(t)):Ki(t),this},r.prototype.interaction=function(t,i){var n=this.interactions[t];n&&n.destroy();var a=ey(t,this,i);return a&&(a.init(),this.interactions[t]=a),this},r.prototype.removeInteraction=function(t){var i=this.interactions[t];i&&(i.destroy(),this.interactions[t]=void 0)},r.prototype.changeData=function(t){this.isDataChanged=!0,this.emit(A.BEFORE_CHANGE_DATA,ne.fromData(this,A.BEFORE_CHANGE_DATA,null)),this.data(t),this.paint(!0);for(var i=this.views,n=0,a=i.length;n<a;n++){var o=i[n];o.changeData(t)}this.emit(A.AFTER_CHANGE_DATA,ne.fromData(this,A.AFTER_CHANGE_DATA,null))},r.prototype.createView=function(t){this.parent&&this.parent.parent&&console.warn("The view nesting recursive feature will be removed at G2 V4.1. Please avoid to use it.");var i={data:this.options.data,scales:(0,c.clone)(this.options.scales),axes:(0,c.clone)(this.options.axes),coordinate:(0,c.clone)(this.coordinateController.getOption()),tooltip:(0,c.clone)(this.options.tooltip),legends:(0,c.clone)(this.options.legends),animate:this.options.animate,visible:this.visible},n=new r((0,d.__assign)((0,d.__assign)({parent:this,canvas:this.canvas,backgroundGroup:this.backgroundGroup.addGroup({zIndex:j.BG}),middleGroup:this.middleGroup.addGroup({zIndex:j.MID}),foregroundGroup:this.foregroundGroup.addGroup({zIndex:j.FORE}),theme:this.themeObject,padding:this.padding},t),{options:(0,d.__assign)((0,d.__assign)({},i),(0,c.get)(t,"options",{}))}));return this.views.push(n),n},r.prototype.view=function(t){return console.warn("This method will be removed at G2 V4.1. Please use chart.createView() instead."),this.createView(t)},r.prototype.removeView=function(t){var i=(0,c.remove)(this.views,function(n){return n===t})[0];return i&&i.destroy(),i},r.prototype.getCoordinate=function(){return this.coordinateInstance},r.prototype.getTheme=function(){return this.themeObject},r.prototype.getXScale=function(){var t=this.geometries[0];return t?t.getXScale():null},r.prototype.getYScales=function(){var t={},i=[];return this.geometries.forEach(function(n){var a=n.getYScale(),o=a.field;t[o]||(t[o]=!0,i.push(a))}),i},r.prototype.getScalesByDim=function(t){for(var i=this.geometries,n={},a=0,o=i.length;a<o;a++){var s=i[a],l=t==="x"?s.getXScale():s.getYScale();l&&!n[l.field]&&(n[l.field]=l)}return n},r.prototype.getScale=function(t,i){var n=i||this.getScaleKey(t);return this.getRootView().scalePool.getScale(n)},r.prototype.getScaleByField=function(t,i){return this.getScale(t,i)},r.prototype.getOptions=function(){return this.options},r.prototype.getData=function(){return this.filteredData},r.prototype.getOriginalData=function(){return this.options.data},r.prototype.getPadding=function(){return this.autoPadding.getPadding()},r.prototype.getGeometries=function(){return this.geometries},r.prototype.getElements=function(){return(0,c.reduce)(this.geometries,function(t,i){return t.concat(i.getElements())},[])},r.prototype.getElementsBy=function(t){return this.getElements().filter(function(i){return t(i)})},r.prototype.getLayer=function(t){return t===Z.BG?this.backgroundGroup:t===Z.MID?this.middleGroup:t===Z.FORE?this.foregroundGroup:this.foregroundGroup},r.prototype.isPointInPlot=function(t){return fo(this.getCoordinate(),t)},r.prototype.getLegendAttributes=function(){return(0,c.flatten)(this.geometries.map(function(t){return t.getGroupAttributes()}))},r.prototype.getGroupScales=function(){var t=this.geometries.map(function(i){return i.getGroupScales()});return xr((0,c.flatten)(t))},r.prototype.getCanvas=function(){return this.getRootView().canvas},r.prototype.getRootView=function(){for(var t=this;;){if(t.parent){t=t.parent;continue}break}return t},r.prototype.getXY=function(t){var i=this.getCoordinate(),n=this.getScalesByDim("x"),a=this.getScalesByDim("y"),o,s;if((0,c.each)(t,function(l,u){n[u]&&(o=n[u].scale(l)),a[u]&&(s=a[u].scale(l))}),!(0,c.isNil)(o)&&!(0,c.isNil)(s))return i.convert({x:o,y:s})},r.prototype.getController=function(t){return(0,c.find)(this.controllers,function(i){return i.name===t})},r.prototype.showTooltip=function(t){var i=this.getController("tooltip");return i&&i.showTooltip(t),this},r.prototype.hideTooltip=function(){var t=this.getController("tooltip");return t&&t.hideTooltip(),this},r.prototype.lockTooltip=function(){var t=this.getController("tooltip");return t&&t.lockTooltip(),this},r.prototype.unlockTooltip=function(){var t=this.getController("tooltip");return t&&t.unlockTooltip(),this},r.prototype.isTooltipLocked=function(){var t=this.getController("tooltip");return t&&t.isTooltipLocked()},r.prototype.getTooltipItems=function(t){var i=this.getController("tooltip");return i?i.getTooltipItems(t):[]},r.prototype.getSnapRecords=function(t){for(var i=this.geometries,n=[],a=0,o=i.length;a<o;a++){var s=i[a],l=s.dataArray;s.sort(l);for(var u=void 0,h=0,f=l.length;h<f;h++){var v=l[h];u=vu(t,v,s),u&&n.push(u)}}for(var g=this.views,a=0,o=g.length;a<o;a++){var p=g[a],y=p.getSnapRecords(t);n=n.concat(y)}return n},r.prototype.getComponents=function(){for(var t=[],i=this.controllers,n=0,a=i.length;n<a;n++){var o=i[n];t=t.concat(o.getComponents())}return t},r.prototype.filterData=function(t){var i=this.options.filters;return(0,c.size)(i)===0?t:(0,c.filter)(t,function(n,a){var o=Object.keys(i);return o.every(function(s){var l=i[s];return l(n[s],n,a)})})},r.prototype.filterFieldData=function(t,i){var n=this.options.filters,a=(0,c.get)(n,t);return(0,c.isUndefined)(a)?i:i.filter(function(o,s){return a(o[t],o,s)})},r.prototype.adjustCoordinate=function(){var t=this.getCoordinate(),i=t.start,n=t.end,a=this.coordinateBBox.bl,o=this.coordinateBBox.tr;if((0,c.isEqual)(i,a)&&(0,c.isEqual)(n,o)){this.isCoordinateChanged=!1;return}this.isCoordinateChanged=!0,this.coordinateInstance=this.coordinateController.adjust(a,o)},r.prototype.paint=function(t){this.renderDataRecursive(t),this.syncScale(),this.emit(A.BEFORE_PAINT),this.renderPaddingRecursive(t),this.renderLayoutRecursive(t),this.renderBackgroundStyleShape(),this.renderPaintRecursive(t),this.emit(A.AFTER_PAINT),this.isDataChanged=!1},r.prototype.renderBackgroundStyleShape=function(){if(!this.parent){var t=(0,c.get)(this.themeObject,"background");if(t){this.backgroundStyleRectShape||(this.backgroundStyleRectShape=this.backgroundGroup.addShape("rect",{attrs:{},zIndex:-1,capture:!1}),this.backgroundStyleRectShape.toBack());var i=this.viewBBox,n=i.x,a=i.y,o=i.width,s=i.height;this.backgroundStyleRectShape.attr({fill:t,x:n,y:a,width:o,height:s})}else this.backgroundStyleRectShape&&(this.backgroundStyleRectShape.remove(!0),this.backgroundStyleRectShape=void 0)}},r.prototype.renderPaddingRecursive=function(t){this.calculateViewBBox(),this.adjustCoordinate(),this.initComponents(t),this.autoPadding=Cy(this).shrink(Co(this.appendPadding)),this.coordinateBBox=this.viewBBox.shrink(this.autoPadding.getPadding()),this.adjustCoordinate();var i=this.controllers.find(function(l){return l.name==="tooltip"});i.update();for(var n=this.views,a=0,o=n.length;a<o;a++){var s=n[a];s.renderPaddingRecursive(t)}},r.prototype.renderLayoutRecursive=function(t){var i=this.syncViewPadding===!0?Ay:(0,c.isFunction)(this.syncViewPadding)?this.syncViewPadding:void 0;i&&(i(this,this.views,Xn),this.views.forEach(function(l){l.coordinateBBox=l.viewBBox.shrink(l.autoPadding.getPadding()),l.adjustCoordinate()})),this.doLayout();for(var n=this.views,a=0,o=n.length;a<o;a++){var s=n[a];s.renderLayoutRecursive(t)}},r.prototype.renderPaintRecursive=function(t){var i=this.middleGroup;if(this.limitInPlot){var n=vo(this.coordinateInstance),a=n.type,o=n.attrs;i.setClip({type:a,attrs:o})}else i.setClip(void 0);this.paintGeometries(t),this.renderComponents(t);for(var s=this.views,l=0,u=s.length;l<u;l++){var h=s[l];h.renderPaintRecursive(t)}},r.prototype.createScale=function(t,i,n,a){var o=(0,c.get)(this.options.scales,[t]),s=(0,d.__assign)((0,d.__assign)({},o),n);return this.parent?this.parent.createScale(t,i,s,a):this.scalePool.createScale(t,i,s,a)},r.prototype.renderDataRecursive=function(t){this.doFilterData(),this.createCoordinate(),this.initGeometries(t),this.renderFacet(t);for(var i=this.views,n=0,a=i.length;n<a;n++){var o=i[n];o.renderDataRecursive(t)}},r.prototype.calculateViewBBox=function(){var t,i,n,a;if(this.parent){var o=this.parent.coordinateBBox;t=o.x,i=o.y,n=o.width,a=o.height}else t=0,i=0,n=this.canvas.get("width"),a=this.canvas.get("height");var s=this.region,l=s.start,u=s.end,h=new Ae(t+n*l.x,i+a*l.y,n*(u.x-l.x),a*(u.y-l.y));(!this.viewBBox||!this.viewBBox.isEqual(h))&&(this.viewBBox=new Ae(t+n*l.x,i+a*l.y,n*(u.x-l.x),a*(u.y-l.y))),this.coordinateBBox=this.viewBBox},r.prototype.initEvents=function(){this.foregroundGroup.on("*",this.onDelegateEvents),this.middleGroup.on("*",this.onDelegateEvents),this.backgroundGroup.on("*",this.onDelegateEvents),this.canvas.on("*",this.onCanvasEvent)},r.prototype.initComponentController=function(){for(var t=this.usedControllers,i=0,n=t.length;i<n;i++){var a=t[i],o=my(a);o&&this.controllers.push(new o(this))}},r.prototype.createViewEvent=function(t){var i=t.shape,n=t.name,a=i?i.get("origin"):null,o=new ne(this,t,a);return o.type=n,o},r.prototype.doPlotEvent=function(t){var i=t.type,n=t.x,a=t.y,o={x:n,y:a},s=["mousedown","mouseup","mousemove","mouseleave","mousewheel","touchstart","touchmove","touchend","touchcancel","click","dblclick","contextmenu"];if(s.includes(i)){var l=this.isPointInPlot(o),u=t.clone();if(l){var h="plot:".concat(i);u.type=h,this.emit(h,u),(i==="mouseleave"||i==="touchend")&&(this.isPreMouseInPlot=!1)}i==="mousemove"||i==="touchmove"?(this.isPreMouseInPlot&&!l?(i==="mousemove"&&(u.type=V.MOUSE_LEAVE,this.emit(V.MOUSE_LEAVE,u)),u.type=V.LEAVE,this.emit(V.LEAVE,u)):!this.isPreMouseInPlot&&l&&(i==="mousemove"&&(u.type=V.MOUSE_ENTER,this.emit(V.MOUSE_ENTER,u)),u.type=V.ENTER,this.emit(V.ENTER,u)),this.isPreMouseInPlot=l):(i==="mouseleave"||i==="touchend")&&this.isPreMouseInPlot&&(i==="mouseleave"&&(u.type=V.MOUSE_LEAVE,this.emit(V.MOUSE_LEAVE,u)),u.type=V.LEAVE,this.emit(V.LEAVE,u),this.isPreMouseInPlot=!1)}},r.prototype.doFilterData=function(){var t=this.options.data;this.filteredData=this.filterData(t)},r.prototype.initGeometries=function(t){this.createOrUpdateScales();for(var i=this.getCoordinate(),n=(0,c.get)(this.options,"scales",{}),a=this.geometries,o=0,s=a.length;o<s;o++){var l=a[o];l.scales=this.getGeometryScales();var u={coordinate:i,scaleDefs:n,data:this.filteredData,theme:this.themeObject,isDataChanged:this.isDataChanged,isCoordinateChanged:this.isCoordinateChanged};t?l.update(u):l.init(u)}this.adjustScales()},r.prototype.createOrUpdateScales=function(){for(var t=this.getScaleFields(),i=this.getGroupedFields(),n=this.getOptions(),a=n.data,o=n.scales,s=o===void 0?{}:o,l=this.filteredData,u=0,h=t.length;u<h;u++){var f=t[u],v=s[f],g=this.getScaleKey(f);this.createScale(f,i.includes(f)?a:l,v,g),this.createdScaleKeys.set(g,!0)}},r.prototype.syncScale=function(){this.getRootView().scalePool.sync(this.getCoordinate(),this.theme)},r.prototype.getGeometryScales=function(){for(var t=this.getScaleFields(),i={},n=0;n<t.length;n++){var a=t[n];i[a]=this.getScaleByField(a)}return i},r.prototype.getScaleFields=function(){for(var t=[],i=new Map,n=this.geometries,a=0;a<n.length;a++){var o=n[a],s=o.getScaleFields();xr(s,t,i)}return t},r.prototype.getGroupedFields=function(){for(var t=[],i=new Map,n=this.geometries,a=0;a<n.length;a++){var o=n[a],s=o.getGroupFields();xr(s,t,i)}return t},r.prototype.adjustScales=function(){this.adjustCategoryScaleRange()},r.prototype.adjustCategoryScaleRange=function(){var t=this,i=(0,d.__spreadArray)([this.getXScale()],(0,d.__read)(this.getYScales()),!1).filter(function(o){return!!o}),n=this.getCoordinate(),a=this.options.scales;(0,c.each)(i,function(o){var s=o.field,l=o.values,u=o.isCategory,h=o.isIdentity;(u||h)&&l&&!(0,c.get)(a,[s,"range"])&&(o.range=Gl(o,n,t.theme))})},r.prototype.initComponents=function(t){for(var i=this.controllers,n=0;n<i.length;n++){var a=i[n];t?a.update():(a.clear(),a.render())}},r.prototype.doLayout=function(){this.layoutFunc(this)},r.prototype.createCoordinate=function(){var t=this.coordinateBBox.bl,i=this.coordinateBBox.tr;this.coordinateInstance=this.coordinateController.create(t,i)},r.prototype.paintGeometries=function(t){for(var i=this.options.animate,n=this.getCoordinate(),a={x:this.viewBBox.x,y:this.viewBBox.y,minX:this.viewBBox.minX,minY:this.viewBBox.minY,maxX:this.viewBBox.maxX,maxY:this.viewBBox.maxY,width:this.viewBBox.width,height:this.viewBBox.height},o=this.geometries,s=0;s<o.length;s++){var l=o[s];l.coordinate=n,l.canvasRegion=a,i||l.animate(!1),l.paint(t)}},r.prototype.renderComponents=function(t){for(var i=0;i<this.getComponents().length;i++){var n=this.getComponents()[i];n.component.render()}},r.prototype.renderFacet=function(t){this.facetInstance&&(t?this.facetInstance.update():(this.facetInstance.clear(),this.facetInstance.init(),this.facetInstance.render()))},r.prototype.initOptions=function(){var t=this,i=this.options,n=i.geometries,a=n===void 0?[]:n,o=i.interactions,s=o===void 0?[]:o,l=i.views,u=l===void 0?[]:l,h=i.annotations,f=h===void 0?[]:h,v=i.coordinate,g=i.events,p=i.facets;this.coordinateController?v&&this.coordinateController.update(v):this.coordinateController=new _y(v);for(var y=0;y<a.length;y++){var m=a[y];this.createGeometry(m)}for(var x=0;x<s.length;x++){var _=s[x],w=_.type,b=_.cfg;this.interaction(w,b)}for(var S=0;S<u.length;S++){var C=u[S];this.createView(C)}for(var M=this.getController("annotation"),L=0;L<f.length;L++){var B=f[L];M.annotation(B)}g&&(0,c.each)(g,function(I,G){t.on(G,I)}),p&&(0,c.each)(p,function(I){var G=I.type,q=(0,d.__rest)(I,["type"]);t.facet(G,q)})},r.prototype.createGeometry=function(t){var i=t.type,n=t.cfg,a=n===void 0?{}:n;if(this[i]){var o=this[i](a);(0,c.each)(t,function(s,l){(0,c.isFunction)(o[l])&&o[l](s)})}},r.prototype.getScaleKey=function(t){return"".concat(this.id,"-").concat(t)},r}(st);function Qe(e,r){pu.prototype[e.toLowerCase()]=function(t){t===void 0&&(t={});var i=(0,d.__assign)({container:this.middleGroup.addGroup(),labelsContainer:this.foregroundGroup.addGroup()},t),n=new r(i);return this.geometries.push(n),n}}var Fy=pu,Ey=function(e){(0,d.__extends)(r,e);function r(t){var i=this,n=t.container,a=t.width,o=t.height,s=t.autoFit,l=s===void 0?!1:s,u=t.padding,h=t.appendPadding,f=t.renderer,v=f===void 0?"canvas":f,g=t.pixelRatio,p=t.localRefresh,y=p===void 0?!0:p,m=t.visible,x=m===void 0?!0:m,_=t.supportCSSTransform,w=_===void 0?!1:_,b=t.defaultInteractions,S=b===void 0?["tooltip","legend-filter","legend-active","continuous-filter","ellipsis-text","axis-description"]:b,C=t.options,M=t.limitInPlot,L=t.theme,B=t.syncViewPadding,I=(0,c.isString)(n)?document.getElementById(n):n,G=(0,E.Z)('<div style="position:relative;"></div>');I.appendChild(G);var q=N(I,l,a,o),ft=re(v),mt=new ft.Canvas((0,d.__assign)({container:G,pixelRatio:g,localRefresh:y,supportCSSTransform:w},q));return i=e.call(this,{parent:null,canvas:mt,backgroundGroup:mt.addGroup({zIndex:j.BG}),middleGroup:mt.addGroup({zIndex:j.MID}),foregroundGroup:mt.addGroup({zIndex:j.FORE}),padding:u,appendPadding:h,visible:x,options:C,limitInPlot:M,theme:L,syncViewPadding:B})||this,i.onResize=(0,c.debounce)(function(){i.forceFit()},300),i.ele=I,i.canvas=mt,i.width=q.width,i.height=q.height,i.autoFit=l,i.localRefresh=y,i.renderer=v,i.wrapperElement=G,i.updateCanvasStyle(),i.bindAutoFit(),i.initDefaultInteractions(S),i}return r.prototype.initDefaultInteractions=function(t){var i=this;(0,c.each)(t,function(n){i.interaction(n)})},r.prototype.aria=function(t){var i="aria-label";t===!1?this.ele.removeAttribute(i):this.ele.setAttribute(i,t.label)},r.prototype.changeSize=function(t,i){return this.width===t&&this.height===i?this:(this.emit(A.BEFORE_CHANGE_SIZE),this.width=t,this.height=i,this.canvas.changeSize(t,i),this.render(!0),this.emit(A.AFTER_CHANGE_SIZE),this)},r.prototype.clear=function(){e.prototype.clear.call(this),this.aria(!1)},r.prototype.destroy=function(){e.prototype.destroy.call(this),this.unbindAutoFit(),this.canvas.destroy(),P(this.wrapperElement),this.wrapperElement=null},r.prototype.changeVisible=function(t){return e.prototype.changeVisible.call(this,t),this.wrapperElement.style.display=t?"":"none",this},r.prototype.forceFit=function(){if(!this.destroyed){var t=N(this.ele,!0,this.width,this.height),i=t.width,n=t.height;this.changeSize(i,n)}},r.prototype.updateCanvasStyle=function(){(0,k.Z)(this.canvas.get("el"),{display:"inline-block",verticalAlign:"middle"})},r.prototype.bindAutoFit=function(){this.autoFit&&window.addEventListener("resize",this.onResize)},r.prototype.unbindAutoFit=function(){this.autoFit&&window.removeEventListener("resize",this.onResize)},r}(Fy),My=Ey,ci=function(){function e(r){this.visible=!0,this.components=[],this.view=r}return e.prototype.clear=function(r){(0,c.each)(this.components,function(t){t.component.destroy()}),this.components=[]},e.prototype.destroy=function(){this.clear()},e.prototype.getComponents=function(){return this.components},e.prototype.changeVisible=function(r){this.visible!==r&&(this.components.forEach(function(t){r?t.component.show():t.component.hide()}),this.visible=r)},e}();function Ty(e){for(var r=[],t=function(n){var a=e[n],o=(0,c.find)(r,function(s){return s.color===a.color&&s.name===a.name&&s.value===a.value&&s.title===a.title});o||r.push(a)},i=0;i<e.length;i++)t(i);return r}var Ly=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.isLocked=!1,t}return Object.defineProperty(r.prototype,"name",{get:function(){return"tooltip"},enumerable:!1,configurable:!0}),r.prototype.init=function(){},r.prototype.isVisible=function(){var t=this.view.getOptions().tooltip;return t!==!1},r.prototype.render=function(){},r.prototype.showTooltip=function(t){if(this.point=t,!!this.isVisible()){var i=this.view,n=this.getTooltipItems(t);if(!n.length){this.hideTooltip();return}var a=this.getTitle(n),o={x:n[0].x,y:n[0].y};i.emit("tooltip:show",ne.fromData(i,"tooltip:show",(0,d.__assign)({items:n,title:a},t)));var s=this.getTooltipCfg(),l=s.follow,u=s.showMarkers,h=s.showCrosshairs,f=s.showContent,v=s.marker,g=this.items,p=this.title;if(!(0,c.isEqual)(p,a)||!(0,c.isEqual)(g,n)?(i.emit("tooltip:change",ne.fromData(i,"tooltip:change",(0,d.__assign)({items:n,title:a},t))),((0,c.isFunction)(f)?f(n):f)&&(this.tooltip||this.renderTooltip(),this.tooltip.update((0,c.mix)({},s,{items:this.getItemsAfterProcess(n),title:a},l?t:{})),this.tooltip.show()),u&&this.renderTooltipMarkers(n,v)):(this.tooltip&&l&&(this.tooltip.update(t),this.tooltip.show()),this.tooltipMarkersGroup&&this.tooltipMarkersGroup.show()),this.items=n,this.title=a,h){var y=(0,c.get)(s,["crosshairs","follow"],!1);this.renderCrosshairs(y?t:o,s)}}},r.prototype.hideTooltip=function(){var t=this.getTooltipCfg().follow;if(!t){this.point=null;return}var i=this.tooltipMarkersGroup;i&&i.hide();var n=this.xCrosshair,a=this.yCrosshair;n&&n.hide(),a&&a.hide();var o=this.tooltip;o&&o.hide(),this.view.emit("tooltip:hide",ne.fromData(this.view,"tooltip:hide",{})),this.point=null},r.prototype.lockTooltip=function(){this.isLocked=!0,this.tooltip&&this.tooltip.setCapture(!0)},r.prototype.unlockTooltip=function(){this.isLocked=!1;var t=this.getTooltipCfg();this.tooltip&&this.tooltip.setCapture(t.capture)},r.prototype.isTooltipLocked=function(){return this.isLocked},r.prototype.clear=function(){var t=this,i=t.tooltip,n=t.xCrosshair,a=t.yCrosshair,o=t.tooltipMarkersGroup;i&&(i.hide(),i.clear()),n&&n.clear(),a&&a.clear(),o&&o.clear(),(i==null?void 0:i.get("customContent"))&&(this.tooltip.destroy(),this.tooltip=null),this.title=null,this.items=null},r.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()},r.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},r.prototype.changeVisible=function(t){if(this.visible!==t){var i=this,n=i.tooltip,a=i.tooltipMarkersGroup,o=i.xCrosshair,s=i.yCrosshair;t?(n&&n.show(),a&&a.show(),o&&o.show(),s&&s.show()):(n&&n.hide(),a&&a.hide(),o&&o.hide(),s&&s.hide()),this.visible=t}},r.prototype.getTooltipItems=function(t){var i,n,a,o,s,l,u=this.findItemsFromView(this.view,t);if(u.length){u=(0,c.flatten)(u);try{for(var h=(0,d.__values)(u),f=h.next();!f.done;f=h.next()){var v=f.value;try{for(var g=(a=void 0,(0,d.__values)(v)),p=g.next();!p.done;p=g.next()){var y=p.value,m=y.mappingData,x=m.x,_=m.y;y.x=(0,c.isArray)(x)?x[x.length-1]:x,y.y=(0,c.isArray)(_)?_[_.length-1]:_}}catch(I){a={error:I}}finally{try{p&&!p.done&&(o=g.return)&&o.call(g)}finally{if(a)throw a.error}}}}catch(I){i={error:I}}finally{try{f&&!f.done&&(n=h.return)&&n.call(h)}finally{if(i)throw i.error}}var w=this.getTooltipCfg().shared;if(w===!1&&u.length>1){var b=u[0],S=Math.abs(t.y-b[0].y);try{for(var C=(0,d.__values)(u),M=C.next();!M.done;M=C.next()){var L=M.value,B=Math.abs(t.y-L[0].y);B<=S&&(b=L,S=B)}}catch(I){s={error:I}}finally{try{M&&!M.done&&(l=C.return)&&l.call(C)}finally{if(s)throw s.error}}u=[b]}return Ty((0,c.flatten)(u))}return[]},r.prototype.layout=function(){},r.prototype.update=function(){if(this.point&&this.showTooltip(this.point),this.tooltip){var t=this.view.getCanvas();this.tooltip.set("region",{start:{x:0,y:0},end:{x:t.get("width"),y:t.get("height")}})}},r.prototype.isCursorEntered=function(t){if(this.tooltip){var i=this.tooltip.getContainer(),n=this.tooltip.get("capture");if(i&&n){var a=i.getBoundingClientRect(),o=a.x,s=a.y,l=a.width,u=a.height;return new Ae(o,s,l,u).isPointIn(t)}}return!1},r.prototype.getTooltipCfg=function(){var t=this.view,i=t.getOptions().tooltip,n=this.processCustomContent(i),a=t.getTheme(),o=(0,c.get)(a,["components","tooltip"],{}),s=(0,c.get)(n,"enterable",o.enterable);return(0,c.deepMix)({},o,n,{capture:!!(s||this.isLocked)})},r.prototype.processCustomContent=function(t){if((0,c.isBoolean)(t)||!(0,c.get)(t,"customContent"))return t;var i=t.customContent,n=function(a,o){var s=i(a,o)||"";return(0,c.isString)(s)?'<div class="g2-tooltip">'+s+"</div>":s};return(0,d.__assign)((0,d.__assign)({},t),{customContent:n})},r.prototype.getTitle=function(t){var i=t[0].title||t[0].name;return this.title=i,i},r.prototype.renderTooltip=function(){var t=this.view.getCanvas(),i={start:{x:0,y:0},end:{x:t.get("width"),y:t.get("height")}},n=this.getTooltipCfg(),a=new kn((0,d.__assign)((0,d.__assign)({parent:t.get("el").parentNode,region:i},n),{visible:!1,crosshairs:null}));a.init(),this.tooltip=a},r.prototype.renderTooltipMarkers=function(t,i){var n,a,o=this.getTooltipMarkersGroup(),s=this.view.getRootView(),l=s.limitInPlot;try{for(var u=(0,d.__values)(t),h=u.next();!h.done;h=u.next()){var f=h.value,v=f.x,g=f.y;if(l||(o==null?void 0:o.getClip())){var p=vo(s.getCoordinate()),y=p.type,m=p.attrs;o==null||o.setClip({type:y,attrs:m})}else o==null||o.setClip(void 0);var x=(0,d.__assign)((0,d.__assign)({fill:f.color,symbol:"circle",shadowColor:f.color},i),{x:v,y:g});o.addShape("marker",{attrs:x})}}catch(_){n={error:_}}finally{try{h&&!h.done&&(a=u.return)&&a.call(u)}finally{if(n)throw n.error}}},r.prototype.renderCrosshairs=function(t,i){var n=(0,c.get)(i,["crosshairs","type"],"x");n==="x"?(this.yCrosshair&&this.yCrosshair.hide(),this.renderXCrosshairs(t,i)):n==="y"?(this.xCrosshair&&this.xCrosshair.hide(),this.renderYCrosshairs(t,i)):n==="xy"&&(this.renderXCrosshairs(t,i),this.renderYCrosshairs(t,i))},r.prototype.renderXCrosshairs=function(t,i){var n=this.getViewWithGeometry(this.view).getCoordinate();if(!!fo(n,t)){var a,o;if(n.isRect)n.isTransposed?(a={x:n.start.x,y:t.y},o={x:n.end.x,y:t.y}):(a={x:t.x,y:n.end.y},o={x:t.x,y:n.start.y});else{var s=ai(n,t),l=n.getCenter(),u=n.getRadius();o=le(l.x,l.y,u,s),a=l}var h=(0,c.deepMix)({start:a,end:o,container:this.getTooltipCrosshairsGroup()},(0,c.get)(i,"crosshairs",{}),this.getCrosshairsText("x",t,i));delete h.type;var f=this.xCrosshair;f?f.update(h):(f=new Fl(h),f.init()),f.render(),f.show(),this.xCrosshair=f}},r.prototype.renderYCrosshairs=function(t,i){var n=this.getViewWithGeometry(this.view).getCoordinate();if(!!fo(n,t)){var a,o;if(n.isRect){var s=void 0,l=void 0;n.isTransposed?(s={x:t.x,y:n.end.y},l={x:t.x,y:n.start.y}):(s={x:n.start.x,y:t.y},l={x:n.end.x,y:t.y}),a={start:s,end:l},o="Line"}else a={center:n.getCenter(),radius:Bn(n,t),startAngle:n.startAngle,endAngle:n.endAngle},o="Circle";a=(0,c.deepMix)({container:this.getTooltipCrosshairsGroup()},a,(0,c.get)(i,"crosshairs",{}),this.getCrosshairsText("y",t,i)),delete a.type;var u=this.yCrosshair;u?n.isRect&&u.get("type")==="circle"||!n.isRect&&u.get("type")==="line"?(u=new rt[o](a),u.init()):u.update(a):(u=new rt[o](a),u.init()),u.render(),u.show(),this.yCrosshair=u}},r.prototype.getCrosshairsText=function(t,i,n){var a=(0,c.get)(n,["crosshairs","text"]),o=(0,c.get)(n,["crosshairs","follow"]),s=this.items;if(a){var l=this.getViewWithGeometry(this.view),u=s[0],h=l.getXScale(),f=l.getYScales()[0],v=void 0,g=void 0;if(o){var p=this.view.getCoordinate().invert(i);v=h.invert(p.x),g=f.invert(p.y)}else v=u.data[h.field],g=u.data[f.field];var y=t==="x"?v:g;return(0,c.isFunction)(a)?a=a(t,y,s,i):a.content=y,{text:a}}},r.prototype.getGuideGroup=function(){if(!this.guideGroup){var t=this.view.foregroundGroup;this.guideGroup=t.addGroup({name:"tooltipGuide",capture:!1})}return this.guideGroup},r.prototype.getTooltipMarkersGroup=function(){var t=this.tooltipMarkersGroup;return t&&!t.destroyed?(t.clear(),t.show()):(t=this.getGuideGroup().addGroup({name:"tooltipMarkersGroup"}),t.toFront(),this.tooltipMarkersGroup=t),t},r.prototype.getTooltipCrosshairsGroup=function(){var t=this.tooltipCrosshairsGroup;return t||(t=this.getGuideGroup().addGroup({name:"tooltipCrosshairsGroup",capture:!1}),t.toBack(),this.tooltipCrosshairsGroup=t),t},r.prototype.findItemsFromView=function(t,i){var n,a;if(t.getOptions().tooltip===!1)return[];var o=this.getTooltipCfg(),s=So(t,i,o);try{for(var l=(0,d.__values)(t.views),u=l.next();!u.done;u=l.next()){var h=u.value;s=s.concat(this.findItemsFromView(h,i))}}catch(f){n={error:f}}finally{try{u&&!u.done&&(a=l.return)&&a.call(l)}finally{if(n)throw n.error}}return s},r.prototype.getViewWithGeometry=function(t){var i=this;return t.geometries.length?t:(0,c.find)(t.views,function(n){return i.getViewWithGeometry(n)})},r.prototype.getItemsAfterProcess=function(t){var i=this.getTooltipCfg().customItems,n=i||function(a){return a};return n(t)},r}(ci),yu=Ly,mu={};function xu(e){return mu[e.toLowerCase()]}function Re(e,r){mu[e.toLowerCase()]=r}var hi={appear:{duration:450,easing:"easeQuadOut"},update:{duration:400,easing:"easeQuadInOut"},enter:{duration:400,easing:"easeQuadInOut"},leave:{duration:350,easing:"easeQuadIn"}},Iy={interval:function(e){return{enter:{animation:e.isRect?e.isTransposed?"scale-in-x":"scale-in-y":"fade-in"},update:{animation:e.isPolar&&e.isTransposed?"sector-path-update":null},leave:{animation:"fade-out"}}},line:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},path:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},point:{appear:{animation:"zoom-in"},enter:{animation:"zoom-in"},leave:{animation:"zoom-out"}},area:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},polygon:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},schema:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},edge:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},label:{appear:{animation:"fade-in",delay:450},enter:{animation:"fade-in"},update:{animation:"position-update"},leave:{animation:"fade-out"}}},_u={line:function(){return{animation:"wave-in"}},area:function(){return{animation:"wave-in"}},path:function(){return{animation:"fade-in"}},interval:function(e){var r;return e.isRect?r=e.isTransposed?"grow-in-x":"grow-in-y":(r="grow-in-xy",e.isPolar&&e.isTransposed&&(r="wave-in")),{animation:r}},schema:function(e){var r;return e.isRect?r=e.isTransposed?"grow-in-x":"grow-in-y":r="grow-in-xy",{animation:r}},polygon:function(){return{animation:"fade-in",duration:500}},edge:function(){return{animation:"fade-in"}}};function Oy(e,r){return{delay:(0,c.isFunction)(e.delay)?e.delay(r):e.delay,easing:(0,c.isFunction)(e.easing)?e.easing(r):e.easing,duration:(0,c.isFunction)(e.duration)?e.duration(r):e.duration,callback:e.callback,repeat:e.repeat}}function wu(e,r,t){var i=Iy[e];return i&&((0,c.isFunction)(i)&&(i=i(r)),i=(0,c.deepMix)({},hi,i),t)?i[t]:i}function fi(e,r,t){var i=(0,c.get)(e.get("origin"),"data",K),n=r.animation,a=Oy(r,i);if(n){var o=xu(n);o&&o(e,a,t)}else e.animate(t.toAttrs,a)}function Py(e,r,t,i,n){if(_u[t]){var a=_u[t](i),o=xu((0,c.get)(a,"animation",""));if(o){var s=(0,d.__assign)((0,d.__assign)((0,d.__assign)({},hi.appear),a),r);e.stopAnimate(),o(e,s,{coordinate:i,minYPoint:n,toAttrs:null})}}}var Ao="element-background",Dy=function(e){(0,d.__extends)(r,e);function r(t){var i=e.call(this,t)||this;i.labelShape=[],i.states=[];var n=t.shapeFactory,a=t.container,o=t.offscreenGroup,s=t.elementIndex,l=t.visible,u=l===void 0?!0:l;return i.shapeFactory=n,i.container=a,i.offscreenGroup=o,i.visible=u,i.elementIndex=s,i}return r.prototype.draw=function(t,i){i===void 0&&(i=!1),this.model=t,this.data=t.data,this.shapeType=this.getShapeType(t),this.drawShape(t,i),this.visible===!1&&this.changeVisible(!1)},r.prototype.update=function(t){var i=this,n=i.shapeFactory,a=i.shape;if(!!a){this.model=t,this.data=t.data,this.shapeType=this.getShapeType(t),this.setShapeInfo(a,t);var o=this.getOffscreenGroup(),s=n.drawShape(this.shapeType,t,o);s.cfg.data=this.data,s.cfg.origin=t,s.cfg.element=this,this.syncShapeStyle(a,s,this.getStates(),this.getAnimateCfg("update"))}},r.prototype.destroy=function(){var t=this,i=t.shapeFactory,n=t.shape;if(n){var a=this.getAnimateCfg("leave");a?fi(n,a,{coordinate:i.coordinate,toAttrs:(0,d.__assign)({},n.attr())}):n.remove(!0)}this.states=[],this.shapeFactory=void 0,this.container=void 0,this.shape=void 0,this.animate=void 0,this.geometry=void 0,this.labelShape=[],this.model=void 0,this.data=void 0,this.offscreenGroup=void 0,this.statesStyle=void 0,e.prototype.destroy.call(this)},r.prototype.changeVisible=function(t){e.prototype.changeVisible.call(this,t),t?(this.shape&&this.shape.show(),this.labelShape&&this.labelShape.forEach(function(i){i.show()})):(this.shape&&this.shape.hide(),this.labelShape&&this.labelShape.forEach(function(i){i.hide()}))},r.prototype.setState=function(t,i){var n=this,a=n.states,o=n.shapeFactory,s=n.model,l=n.shape,u=n.shapeType,h=a.indexOf(t);if(i){if(h>-1)return;a.push(t),(t==="active"||t==="selected")&&(l==null||l.toFront())}else{if(h===-1)return;if(a.splice(h,1),t==="active"||t==="selected"){var f=this.geometry,v=f.sortZIndex,g=f.zIndexReversed,p=g?this.geometry.elements.length-this.elementIndex:this.elementIndex;v?l.setZIndex(p):l.set("zIndex",p)}}var y=o.drawShape(u,s,this.getOffscreenGroup());a.length?this.syncShapeStyle(l,y,a,null):this.syncShapeStyle(l,y,["reset"],null),y.remove(!0);var m={state:t,stateStatus:i,element:this,target:this.container};this.container.emit("statechange",m),vl(this.shape,"statechange",m)},r.prototype.clearStates=function(){var t=this,i=this.states;(0,c.each)(i,function(n){t.setState(n,!1)}),this.states=[]},r.prototype.hasState=function(t){return this.states.includes(t)},r.prototype.getStates=function(){return this.states},r.prototype.getData=function(){return this.data},r.prototype.getModel=function(){return this.model},r.prototype.getBBox=function(){var t=this,i=t.shape,n=t.labelShape,a={x:0,y:0,minX:0,minY:0,maxX:0,maxY:0,width:0,height:0};return i&&(a=i.getCanvasBBox()),n&&n.forEach(function(o){var s=o.getCanvasBBox();a.x=Math.min(s.x,a.x),a.y=Math.min(s.y,a.y),a.minX=Math.min(s.minX,a.minX),a.minY=Math.min(s.minY,a.minY),a.maxX=Math.max(s.maxX,a.maxX),a.maxY=Math.max(s.maxY,a.maxY)}),a.width=a.maxX-a.minX,a.height=a.maxY-a.minY,a},r.prototype.getStatesStyle=function(){if(!this.statesStyle){var t=this,i=t.shapeType,n=t.geometry,a=t.shapeFactory,o=n.stateOption,s=a.defaultShapeType,l=a.theme[i]||a.theme[s];this.statesStyle=(0,c.deepMix)({},l,o)}return this.statesStyle},r.prototype.getStateStyle=function(t,i){var n=this.getStatesStyle(),a=(0,c.get)(n,[t,"style"],{}),o=a[i]||a;return(0,c.isFunction)(o)?o(this):o},r.prototype.getAnimateCfg=function(t){var i=this,n=this.animate;if(n){var a=n[t];return a&&(0,d.__assign)((0,d.__assign)({},a),{callback:function(){var o;(0,c.isFunction)(a.callback)&&a.callback(),(o=i.geometry)===null||o===void 0||o.emit(D.AFTER_DRAW_ANIMATE)}})}return null},r.prototype.drawShape=function(t,i){var n;i===void 0&&(i=!1);var a=this,o=a.shapeFactory,s=a.container,l=a.shapeType;if(this.shape=o.drawShape(l,t,s),this.shape){this.setShapeInfo(this.shape,t);var u=this.shape.cfg.name;u?(0,c.isString)(u)&&(this.shape.cfg.name=["element",u]):this.shape.cfg.name=["element",this.shapeFactory.geometryType];var h=i?"enter":"appear",f=this.getAnimateCfg(h);f&&((n=this.geometry)===null||n===void 0||n.emit(D.BEFORE_DRAW_ANIMATE),fi(this.shape,f,{coordinate:o.coordinate,toAttrs:(0,d.__assign)({},this.shape.attr())}))}},r.prototype.getOffscreenGroup=function(){if(!this.offscreenGroup){var t=this.container.getGroupBase();this.offscreenGroup=new t({})}return this.offscreenGroup},r.prototype.setShapeInfo=function(t,i){var n=this;if(t.cfg.origin=i,t.cfg.element=this,t.isGroup()){var a=t.get("children");a.forEach(function(o){n.setShapeInfo(o,i)})}},r.prototype.syncShapeStyle=function(t,i,n,a,o){var s=this,l;if(n===void 0&&(n=[]),o===void 0&&(o=0),!(!t||!i)){var u=t.get("clipShape"),h=i.get("clipShape");if(this.syncShapeStyle(u,h,n,a),t.isGroup())for(var f=t.get("children"),v=i.get("children"),g=0;g<f.length;g++)this.syncShapeStyle(f[g],v[g],n,a,o+g);else{if(!(0,c.isEmpty)(n)&&!(0,c.isEqual)(n,["reset"])){var p=t.get("name");(0,c.isArray)(p)&&(p=p[1]),(0,c.each)(n,function(m){if(i.get("name")!==Ao){var x=s.getStateStyle(m,p||o);i.attr(x)}})}var y=zl(t,i);this.animate?a?((l=this.geometry)===null||l===void 0||l.emit(D.BEFORE_DRAW_ANIMATE),fi(t,a,{coordinate:this.shapeFactory.coordinate,toAttrs:y,shapeModel:this.model})):(0,c.isEmpty)(n)?t.attr(y):(t.stopAnimate(),t.animate(y,{duration:300})):t.attr(y)}}},r.prototype.getShapeType=function(t){var i=(0,c.get)(t,"shape");return(0,c.isArray)(i)?i[0]:i},r}(st),bu=Dy,Su={},Cu={};function ky(e){return Su[e.toLowerCase()]}function qi(e,r){Su[e.toLowerCase()]=r}function By(e){return Cu[e.toLowerCase()]}function Te(e,r){Cu[e.toLowerCase()]=r}var Ry={coordinate:null,defaultShapeType:null,theme:null,getShapePoints:function(e,r){var t=this.getShape(e);return t.getPoints?t.getPoints(r):this.getDefaultPoints(r)},getShape:function(e){var r=this[e]||this[this.defaultShapeType];return r.coordinate=this.coordinate,r},getDefaultPoints:function(){return[]},getDefaultStyle:function(e){return(0,c.get)(e,[this.defaultShapeType,"default","style"],{})},getMarker:function(e,r){var t=this.getShape(e);if(!t.getMarker){var i=this.defaultShapeType;t=this.getShape(i)}var n=this.theme,a=(0,c.get)(n,[e,"default"],{}),o=t.getMarker(r);return(0,c.deepMix)({},a,o)},drawShape:function(e,r,t){var i=this.getShape(e);return i.draw(r,t)}},Ny={coordinate:null,parsePath:function(e){var r=this.coordinate,t=(0,Pn.tr)(e);return r.isPolar?t=Gp(r,t):t=Vp(r,t),t},parsePoint:function(e){var r=this.coordinate;return r.convert(e)},parsePoints:function(e){var r=this.coordinate;return e.map(function(t){return r.convert(t)})},draw:function(e,r){}},Fo={};function wr(e,r){var t=(0,c.upperFirst)(e),i=(0,d.__assign)((0,d.__assign)((0,d.__assign)({},Ry),r),{geometryType:e});return Fo[t]=i,i}function jt(e,r,t){var i=(0,c.upperFirst)(e),n=Fo[i],a=(0,d.__assign)((0,d.__assign)({},Ny),t);return n[r]=a,a}function Au(e){var r=(0,c.upperFirst)(e);return Fo[r]}function zy(e,r,t){var i,n;if(t===void 0&&(t={}),!r)return[e];var a=(0,c.groupToMap)(e,r),o=[];if(r.length===1&&t[r[0]]){var s=t[r[0]];try{for(var l=(0,d.__values)(s),u=l.next();!u.done;u=l.next()){var h=u.value,f=a["_".concat(h)];f&&o.push(f)}}catch(p){i={error:p}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}else for(var v in a)if(a.hasOwnProperty(v)){var g=a[v];o.push(g)}return o}function Fu(e,r){return(0,c.some)(["color","shape","size","x","y","isInCircle","data","style","defaultStyle","points","mappingData"],function(t){return!(0,c.isEqual)(e[t],r[t])})}function $i(e){return(0,c.isArray)(e)?e:e.split("*")}function Eu(e,r){for(var t=[],i=[],n=[],a=new Map,o=0;o<r.length;o++){var s=r[o];e[s]?i.push(s):t.push(s),a.set(s,!0)}return Object.keys(e).forEach(function(l){a.has(l)||n.push(l)}),{added:t,updated:i,removed:n}}var Vy=function(e){(0,d.__extends)(r,e);function r(t){var i=e.call(this,t)||this;i.type="base",i.attributes={},i.elements=[],i.elementsMap={},i.animateOption=!0,i.attributeOption={},i.lastElementsMap={},i.generatePoints=!1,i.beforeMappingData=null,i.adjusts={},i.idFields=[],i.hasSorted=!1,i.isCoordinateChanged=!1;var n=t.container,a=t.labelsContainer,o=t.coordinate,s=t.data,l=t.sortable,u=l===void 0?!1:l,h=t.visible,f=h===void 0?!0:h,v=t.theme,g=t.scales,p=g===void 0?{}:g,y=t.scaleDefs,m=y===void 0?{}:y,x=t.intervalPadding,_=t.dodgePadding,w=t.maxColumnWidth,b=t.minColumnWidth,S=t.columnWidthRatio,C=t.roseWidthRatio,M=t.multiplePieWidthRatio,L=t.zIndexReversed,B=t.sortZIndex,I=t.useDeferredLabel;return i.container=n,i.labelsContainer=a,i.coordinate=o,i.data=s,i.sortable=u,i.visible=f,i.userTheme=v,i.scales=p,i.scaleDefs=m,i.intervalPadding=x,i.dodgePadding=_,i.maxColumnWidth=w,i.minColumnWidth=b,i.columnWidthRatio=S,i.roseWidthRatio=C,i.multiplePieWidthRatio=M,i.zIndexReversed=L,i.sortZIndex=B,i.useDeferredLabel=I?typeof I=="number"?I:Infinity:null,i}return r.prototype.position=function(t){var i=t;(0,c.isPlainObject)(t)||(i={fields:$i(t)});var n=(0,c.get)(i,"fields");return n.length===1&&(n.unshift("1"),(0,c.set)(i,"fields",n)),(0,c.set)(this.attributeOption,"position",i),this},r.prototype.color=function(t,i){return this.createAttrOption("color",t,i),this},r.prototype.shape=function(t,i){return this.createAttrOption("shape",t,i),this},r.prototype.size=function(t,i){return this.createAttrOption("size",t,i),this},r.prototype.adjust=function(t){var i=t;return((0,c.isString)(t)||(0,c.isPlainObject)(t))&&(i=[t]),(0,c.each)(i,function(n,a){(0,c.isObject)(n)||(i[a]={type:n})}),this.adjustOption=i,this},r.prototype.style=function(t,i){if((0,c.isString)(t)){var n=$i(t);this.styleOption={fields:n,callback:i}}else{var a=t,n=a.fields,o=a.callback,s=a.cfg;n||o||s?this.styleOption=t:this.styleOption={cfg:t}}return this},r.prototype.tooltip=function(t,i){if((0,c.isString)(t)){var n=$i(t);this.tooltipOption={fields:n,callback:i}}else this.tooltipOption=t;return this},r.prototype.animate=function(t){return this.animateOption=t,this},r.prototype.label=function(t,i,n){if((0,c.isString)(t)){var a={},o=$i(t);a.fields=o,(0,c.isFunction)(i)?a.callback=i:(0,c.isPlainObject)(i)&&(a.cfg=i),n&&(a.cfg=n),this.labelOption=a}else this.labelOption=t;return this},r.prototype.state=function(t){return this.stateOption=t,this},r.prototype.customInfo=function(t){return this.customOption=t,this},r.prototype.init=function(t){t===void 0&&(t={}),this.setCfg(t),this.initAttributes(),this.processData(this.data),this.adjustScale()},r.prototype.update=function(t){t===void 0&&(t={});var i=t.data,n=t.isDataChanged,a=t.isCoordinateChanged,o=this,s=o.attributeOption,l=o.lastAttributeOption;(0,c.isEqual)(s,l)?i&&(n||!(0,c.isEqual)(i,this.data))?(this.setCfg(t),this.initAttributes(),this.processData(i)):this.setCfg(t):this.init(t),this.adjustScale(),this.isCoordinateChanged=a},r.prototype.paint=function(t){var i=this;t===void 0&&(t=!1),this.animateOption&&(this.animateOption=(0,c.deepMix)({},wu(this.type,this.coordinate),this.animateOption)),this.defaultSize=void 0,this.elementsMap={},this.elements=[];var n=this.getOffscreenGroup();n.clear();var a=this.beforeMappingData,o=this.beforeMapping(a);this.dataArray=new Array(o.length);for(var s=0;s<o.length;s++){var l=o[s];this.dataArray[s]=this.mapping(l)}if(this.updateElements(this.dataArray,t),this.lastElementsMap=this.elementsMap,this.canDoGroupAnimation(t)){var u=this.container,h=this.type,f=this.coordinate,v=(0,c.get)(this.animateOption,"appear"),g=this.getYScale(),p=f.convert({x:0,y:g.scale(this.getYMinValue())});Py(u,v,h,f,p)}if(this.labelOption){var y=this.useDeferredLabel,m=function(){return i.renderLabels((0,c.flatten)(i.dataArray),t)}.bind(this);if(typeof y=="number"){var x=typeof y=="number"&&y!==Infinity?y:0;if(!window.requestIdleCallback)setTimeout(m,x);else{var _=x&&x!==Infinity?{timeout:x}:void 0;window.requestIdleCallback(m,_)}}else m()}this.lastAttributeOption=(0,d.__assign)({},this.attributeOption),this.visible===!1&&this.changeVisible(!1)},r.prototype.clear=function(){var t=this,i=t.container,n=t.geometryLabel,a=t.offscreenGroup;i&&i.clear(),n&&n.clear(),a&&a.clear(),this.scaleDefs=void 0,this.attributes={},this.scales={},this.elementsMap={},this.lastElementsMap={},this.elements=[],this.adjusts={},this.dataArray=null,this.beforeMappingData=null,this.lastAttributeOption=void 0,this.defaultSize=void 0,this.idFields=[],this.groupScales=void 0,this.hasSorted=!1,this.isCoordinateChanged=!1},r.prototype.destroy=function(){this.clear();var t=this.container;t.remove(!0),this.offscreenGroup&&(this.offscreenGroup.remove(!0),this.offscreenGroup=null),this.geometryLabel&&(this.geometryLabel.destroy(),this.geometryLabel=null),this.theme=void 0,this.shapeFactory=void 0,e.prototype.destroy.call(this)},r.prototype.getGroupScales=function(){return this.groupScales},r.prototype.getAttribute=function(t){return this.attributes[t]},r.prototype.getXScale=function(){return this.getAttribute("position").scales[0]},r.prototype.getYScale=function(){return this.getAttribute("position").scales[1]},r.prototype.getGroupAttributes=function(){var t=[];return(0,c.each)(this.attributes,function(i){at.includes(i.type)&&t.push(i)}),t},r.prototype.getDefaultValue=function(t){var i,n=this.getAttribute(t);return n&&(0,c.isEmpty)(n.scales)&&(i=n.values[0]),i},r.prototype.getAttributeValues=function(t,i){for(var n=[],a=t.scales,o=0,s=a.length;o<s;o++){var l=a[o],u=l.field;l.isIdentity?n.push(l.values):n.push(i[u])}return t.mapping.apply(t,(0,d.__spreadArray)([],(0,d.__read)(n),!1))},r.prototype.getAdjust=function(t){return this.adjusts[t]},r.prototype.getCoordinate=function(){return this.coordinate},r.prototype.getData=function(){return this.data},r.prototype.getShapeMarker=function(t,i){var n=this.getShapeFactory();return n.getMarker(t,i)},r.prototype.getElementsBy=function(t){return this.elements.filter(function(i){return t(i)})},r.prototype.getElements=function(){return this.elements},r.prototype.getElementId=function(t){t=(0,c.isArray)(t)?t[0]:t;var i=t[K];if(this.idFields.length){for(var n=i[this.idFields[0]],a=1;a<this.idFields.length;a++)n+="-"+i[this.idFields[a]];return n}var o=this.type,s=this.getXScale(),l=this.getYScale(),u=s.field||"x",h=l.field||"y",f=i[h],v;s.type==="identity"?v=s.values[0]:v=i[u];var g;o==="interval"||o==="schema"?g="".concat(v):o==="line"||o==="area"||o==="path"?g=o:g="".concat(v,"-").concat(f);for(var p=this.groupScales,a=0,y=p.length;a<y;a++){var m=p[a],x=m.field;g="".concat(g,"-").concat(i[x])}var _=this.getAdjust("dodge");if(_){var w=_.dodgeBy;w&&(g="".concat(g,"-").concat(i[w]))}return this.getAdjust("jitter")&&(g="".concat(g,"-").concat(t.x,"-").concat(t.y)),g},r.prototype.getScaleFields=function(){var t=[],i=new Map,n=this,a=n.attributeOption,o=n.labelOption,s=n.tooltipOption;for(var l in a)if(a.hasOwnProperty(l)){var u=a[l];u.fields?xr(u.fields,t,i):u.values&&xr(u.values,t,i)}return o&&o.fields&&xr(o.fields,t,i),(0,c.isObject)(s)&&s.fields&&xr(s.fields,t,i),t},r.prototype.changeVisible=function(t){e.prototype.changeVisible.call(this,t);for(var i=this.elements,n=0,a=i.length;n<a;n++){var o=i[n];o.changeVisible(t)}t?(this.container&&this.container.show(),this.labelsContainer&&this.labelsContainer.show()):(this.container&&this.container.hide(),this.labelsContainer&&this.labelsContainer.hide())},r.prototype.getFields=function(){var t=new Map,i=[];return Object.values(this.attributeOption).forEach(function(n){var a=(n==null?void 0:n.fields)||[];a.forEach(function(o){t.has(o)||i.push(o),t.set(o,!0)})},[]),i},r.prototype.getGroupFields=function(){for(var t=[],i=new Map,n=0,a=at.length;n<a;n++){var o=at[n],s=this.attributeOption[o];s&&s.fields&&xr(s.fields,t,i)}return t},r.prototype.getXYFields=function(){var t=(0,d.__read)(this.attributeOption.position.fields,2),i=t[0],n=t[1];return[i,n]},r.prototype.getXField=function(){return(0,c.get)(this.getXYFields(),[0])},r.prototype.getYField=function(){return(0,c.get)(this.getXYFields(),[1])},r.prototype.getShapes=function(){return this.elements.map(function(t){return t.shape})},r.prototype.getOffscreenGroup=function(){if(!this.offscreenGroup){var t=this.container.getGroupBase();this.offscreenGroup=new t({})}return this.offscreenGroup},r.prototype.sort=function(t){if(!this.hasSorted)for(var i=this.getXScale(),n=i.field,a=0;a<t.length;a++){var o=t[a];o.sort(function(s,l){return i.translate(s[K][n])-i.translate(l[K][n])})}this.hasSorted=!0},r.prototype.adjustScale=function(){var t=this.getYScale();t&&this.getAdjust("stack")&&this.updateStackRange(t,this.beforeMappingData)},r.prototype.getShapeFactory=function(){var t=this.shapeType;if(!!Au(t))return this.shapeFactory||(this.shapeFactory=(0,c.clone)(Au(t))),this.shapeFactory.coordinate=this.coordinate,this.shapeFactory.theme=this.theme.geometries[t]||{},this.shapeFactory},r.prototype.createShapePointsCfg=function(t){var i=this.getXScale(),n=this.getYScale(),a=this.normalizeValues(t[i.field],i),o;return n?o=this.normalizeValues(t[n.field],n):o=t.y?t.y:.1,{x:a,y:o,y0:n?n.scale(this.getYMinValue()):void 0}},r.prototype.createElement=function(t,i,n){n===void 0&&(n=!1);var a=this.container,o=this.getDrawCfg(t),s=this.getShapeFactory(),l=new bu({shapeFactory:s,container:a,offscreenGroup:this.getOffscreenGroup(),elementIndex:i});return l.animate=this.animateOption,l.geometry=this,l.draw(o,n),l},r.prototype.getDrawCfg=function(t){var i=t[K],n={mappingData:t,data:i,x:t.x,y:t.y,color:t.color,size:t.size,isInCircle:this.coordinate.isPolar,customInfo:this.customOption},a=t.shape;!a&&this.getShapeFactory()&&(a=this.getShapeFactory().defaultShapeType),n.shape=a;var o=this.theme.geometries[this.shapeType];n.defaultStyle=(0,c.get)(o,[a,"default"],{}).style,!n.defaultStyle&&this.getShapeFactory()&&(n.defaultStyle=this.getShapeFactory().getDefaultStyle(o));var s=this.styleOption;return s&&(n.style=this.getStyleCfg(s,i)),this.generatePoints&&(n.points=t.points,n.nextPoints=t.nextPoints),n},r.prototype.updateElements=function(t,i){var n,a,o,s,l,u;i===void 0&&(i=!1);for(var h=new Map,f=[],v=new Map,g=0,p=0;p<t.length;p++)for(var y=t[p],m=0;m<y.length;m++){var x=y[m],_=this.getElementId(x),w=h.has(_)?"".concat(_,"-").concat(p,"-").concat(m):_;f.push(w),h.set(w,x),v.set(w,g),g++}this.elements=new Array(g);var b=Eu(this.lastElementsMap,f),S=b.added,C=b.updated,M=b.removed;try{for(var L=(0,d.__values)(S),B=L.next();!B.done;B=L.next()){var _=B.value,x=h.get(_),p=v.get(_),I=this.createElement(x,p,i);this.elements[p]=I,this.elementsMap[_]=I,I.shape&&I.shape.set("zIndex",this.zIndexReversed?this.elements.length-p:p)}}catch(tt){n={error:tt}}finally{try{B&&!B.done&&(a=L.return)&&a.call(L)}finally{if(n)throw n.error}}try{for(var G=(0,d.__values)(C),q=G.next();!q.done;q=G.next()){var _=q.value,I=this.lastElementsMap[_],x=h.get(_),ft=this.getDrawCfg(x),mt=I.getModel(),p=v.get(_);(this.isCoordinateChanged||Fu(ft,mt))&&(I.animate=this.animateOption,I.update(ft)),this.elements[p]=I,this.elementsMap[_]=I,I.shape&&I.shape.set("zIndex",this.zIndexReversed?this.elements.length-p:p)}}catch(tt){o={error:tt}}finally{try{q&&!q.done&&(s=G.return)&&s.call(G)}finally{if(o)throw o.error}}this.container&&this.container.sort();try{for(var zt=(0,d.__values)(M),H=zt.next();!H.done;H=zt.next()){var _=H.value,I=this.lastElementsMap[_];I.animate=this.animateOption,I.destroy()}}catch(tt){l={error:tt}}finally{try{H&&!H.done&&(u=zt.return)&&u.call(zt)}finally{if(l)throw l.error}}},r.prototype.getLabelType=function(){var t=this,i=t.labelOption,n=t.coordinate,a=t.type,o=n.type,s=n.isTransposed,l=(0,c.get)(i,["cfg","type"]);return l||(o==="polar"?l=s?"pie":"polar":o==="theta"?l="pie":a==="interval"||a==="polygon"?l="interval":l="base"),l},r.prototype.getYMinValue=function(){var t=this.getYScale(),i=t.min,n=t.max,a;return i>=0?a=i:n<=0?a=n:a=0,a},r.prototype.createAttrOption=function(t,i,n){if((0,c.isNil)(i)||(0,c.isObject)(i))(0,c.isObject)(i)&&(0,c.isEqual)(Object.keys(i),["values"])?(0,c.set)(this.attributeOption,t,{fields:i.values}):(0,c.set)(this.attributeOption,t,i);else{var a={};(0,c.isNumber)(i)?a.values=[i]:a.fields=$i(i),n&&((0,c.isFunction)(n)?a.callback=n:a.values=n),(0,c.set)(this.attributeOption,t,a)}},r.prototype.initAttributes=function(){var t=this,i=this,n=i.attributes,a=i.attributeOption,o=i.theme,s=i.shapeType;this.groupScales=[];var l={},u=function(v){if(a.hasOwnProperty(v)){var g=a[v];if(!g)return{value:void 0};var p=(0,d.__assign)({},g),y=p.callback,m=p.values,x=p.fields,_=x===void 0?[]:x,w=_.map(function(S){var C=t.scales[S];if(!l[S]&&at.includes(v)){var M=Vl(C,(0,c.get)(t.scaleDefs,S),v,t.type);M==="cat"&&(t.groupScales.push(C),l[S]=!0)}return C});p.scales=w,v!=="position"&&w.length===1&&w[0].type==="identity"?p.values=w[0].values:!y&&!m&&(v==="size"?p.values=o.sizes:v==="shape"?p.values=o.shapes[s]||[]:v==="color"&&(w.length?p.values=w[0].values.length<=10?o.colors10:o.colors20:p.values=o.colors10));var b=cl(v);n[v]=new b(p)}};for(var h in a){var f=u(h);if(typeof f=="object")return f.value}},r.prototype.processData=function(t){var i,n;this.hasSorted=!1;for(var a=this.getAttribute("position").scales,o=a.filter(function(M){return M.isCategory}),s=this.groupData(t),l=[],u=0,h=s.length;u<h;u++){for(var f=s[u],v=[],g=0,p=f.length;g<p;g++){var y=f[g],m={};for(var x in y)m[x]=y[x];m[K]=y;try{for(var _=(i=void 0,(0,d.__values)(o)),w=_.next();!w.done;w=_.next()){var b=w.value,S=b.field;m[S]=b.translate(m[S])}}catch(M){i={error:M}}finally{try{w&&!w.done&&(n=_.return)&&n.call(_)}finally{if(i)throw i.error}}v.push(m)}l.push(v)}var C=this.adjustData(l);return this.beforeMappingData=C,C},r.prototype.adjustData=function(t){var i=this.adjustOption,n=this,a=n.intervalPadding,o=n.dodgePadding,s=n.theme,l=this.maxColumnWidth||s.maxColumnWidth,u=this.minColumnWidth||s.minColumnWidth,h=this.columnWidthRatio||s.columnWidthRatio,f=t;if(i){var v=this.getXScale(),g=this.getYScale(),p=v.field,y=g?g.field:null,m=Yi(this.coordinate),x=v.values.length,_=this.getAttribute("size"),w=void 0;_&&(w=_.values[0]);for(var b=0,S=i.length;b<S;b++){var C=i[b],M=(0,d.__assign)({xField:p,yField:y,intervalPadding:a,dodgePadding:o,xDimensionLength:m,groupNum:x,defaultSize:w,maxColumnWidth:l,minColumnWidth:u,columnWidthRatio:h},C),L=C.type;if(L==="dodge"){var B=[];if(v.isCategory||v.type==="identity")B.push("x");else if(!g)B.push("y");else throw new Error("dodge is not support linear attribute, please use category attribute!");M.adjustNames=B,M.dodgeRatio=h}else if(L==="stack"){var I=this.coordinate;if(!g){M.height=I.getHeight();var G=this.getDefaultValue("size")||3;M.size=G}!I.isTransposed&&(0,c.isNil)(M.reverseOrder)&&(M.reverseOrder=!0)}var q=It(L);M.dimValuesMap={},v&&v.values&&(M.dimValuesMap[v.field]=v.values.map(function(mt){return v.translate(mt)}));var ft=new q(M);f=ft.process(f),this.adjusts[L]=ft}}return f},r.prototype.groupData=function(t){for(var i=this.getGroupScales(),n=this.scaleDefs,a={},o=[],s=0;s<i.length;s++){var l=i[s],u=l.field;o.push(u),(0,c.get)(n,[u,"values"])&&(a[u]=n[u].values)}return zy(t,o,a)},r.prototype.updateStackRange=function(t,i){for(var n=(0,c.flatten)(i),a=t.field,o=t.min,s=t.max,l=0;l<n.length;l++){var u=n[l],h=Math.min.apply(null,u[a]),f=Math.max.apply(null,u[a]);h<o&&(o=h),f>s&&(s=f)}var v=this.scaleDefs,g={};o<t.min&&!(0,c.get)(v,[a,"min"])&&(g.min=o),s>t.max&&!(0,c.get)(v,[a,"max"])&&(g.max=s),t.change(g)},r.prototype.beforeMapping=function(t){var i=t;if(this.sortable&&this.sort(i),this.generatePoints)for(var n=0,a=i.length;n<a;n++){var o=i[n];this.generateShapePoints(o);var s=i[n+1];s&&(this.generateShapePoints(s),o[0].nextPoints=s[0].points)}return i},r.prototype.generateShapePoints=function(t){for(var i=this.getShapeFactory(),n=this.getAttribute("shape"),a=0;a<t.length;a++){var o=t[a],s=this.createShapePointsCfg(o),l=n?this.getAttributeValues(n,o):null,u=i.getShapePoints(l,s);o.points=u}},r.prototype.normalizeValues=function(t,i){var n=[];if((0,c.isArray)(t))for(var a=0;a<t.length;a++){var o=t[a];n.push(i.scale(o))}else n=i.scale(t);return n},r.prototype.mapping=function(t){for(var i=this.attributes,n=[],a=0;a<t.length;a++){var o=t[a],s={_origin:o[K],points:o.points,nextPoints:o.nextPoints};for(var l in i)if(i.hasOwnProperty(l)){var u=i[l],h=u.names,f=this.getAttributeValues(u,o);if(h.length>1)for(var v=0;v<f.length;v+=1){var g=f[v],p=h[v];s[p]=(0,c.isArray)(g)&&g.length===1?g[0]:g}else s[h[0]]=f.length===1?f[0]:f}this.convertPoint(s),n.push(s)}return n},r.prototype.convertPoint=function(t){var i=t.x,n=t.y,a,o,s,l=this.coordinate;if((0,c.isArray)(i)&&(0,c.isArray)(n)){a=[],o=[];for(var u=0,h=0,f=i.length,v=n.length;u<f&&h<v;u+=1,h+=1)s=l.convert({x:i[u],y:n[h]}),a.push(s.x),o.push(s.y)}else if((0,c.isArray)(n)){o=[];for(var g=0;g<n.length;g++){var p=n[g];s=l.convert({x:i,y:p}),a&&a!==s.x?((0,c.isArray)(a)||(a=[a]),a.push(s.x)):a=s.x,o.push(s.y)}}else if((0,c.isArray)(i)){a=[];for(var g=0;g<i.length;g++){var y=i[g];s=l.convert({x:y,y:n}),o&&o!==s.y?((0,c.isArray)(o)||(o=[o]),o.push(s.y)):o=s.y,a.push(s.x)}}else{var m=l.convert({x:i,y:n});a=m.x,o=m.y}t.x=a,t.y=o},r.prototype.getStyleCfg=function(t,i){var n=t.fields,a=n===void 0?[]:n,o=t.callback,s=t.cfg;if(s)return s;var l=a.map(function(u){return i[u]});return o.apply(void 0,(0,d.__spreadArray)([],(0,d.__read)(l),!1))},r.prototype.setCfg=function(t){var i=this,n=t.coordinate,a=t.data,o=t.theme,s=t.scaleDefs;n&&(this.coordinate=n),a&&(this.data=a),s&&(this.scaleDefs=s,this.idFields=[],(0,c.each)(s,function(l,u){l&&l.key&&i.idFields.push(u)})),o&&(this.theme=this.userTheme?(0,c.deepMix)({},o,this.userTheme):o)},r.prototype.renderLabels=function(t,i){return i===void 0&&(i=!1),(0,d.__awaiter)(this,void 0,void 0,function(){var n,a,o,s,l,u,h,f,v,g,p,y,m=this;return(0,d.__generator)(this,function(x){switch(x.label){case 0:return n=this.geometryLabel,this.emit(D.BEFORE_RENDER_LABEL),n||(a=this.getLabelType(),o=ky(a),n=new o(this),this.geometryLabel=n),[4,n.render(t,i)];case 1:x.sent(),s=n.labelsRenderer.shapesMap,l=new Map,(0,c.each)(s,function(_,w){for(var b=_.getChildren()||[],S=0;S<b.length;S++){var C=b[S],M=m.elementsMap[C.get("elementId")||w.split(" ")[0]];if(M){C.cfg.name=["element","label"],C.cfg.element=M;var L=l.get(M)||new Set;L.add(_),l.set(M,L)}}});try{for(u=(0,d.__values)(l.entries()),h=u.next();!h.done;h=u.next())f=(0,d.__read)(h.value,2),v=f[0],g=f[1],v.labelShape=(0,d.__spreadArray)([],(0,d.__read)(g),!1)}catch(_){p={error:_}}finally{try{h&&!h.done&&(y=u.return)&&y.call(u)}finally{if(p)throw p.error}}return this.emit(D.AFTER_RENDER_LABEL),[2]}})})},r.prototype.canDoGroupAnimation=function(t){return!t&&this.animateOption&&((0,c.get)(this.animateOption,"appear")===void 0||(0,c.get)(this.animateOption,"appear")&&(0,c.get)(this.animateOption,["appear","animation"])===void 0)},r}(st),br=Vy,jn=te.vs;function Qi(e,r,t){var i=jn(e.getMatrix(),[["t",r,t]]);e.setMatrix(i)}function Gy(e,r){var t=e.attr(),i=t.x,n=t.y,a=jn(e.getMatrix(),[["t",-i,-n],["r",r],["t",i,n]]);return a}function Eo(e,r){var t=Gy(e,r);e.setMatrix(t)}function JT(){return[1,0,0,0,1,0,0,0,1]}function Wy(e,r){var t=e.getBBox(),i=(t.minX+t.maxX)/2,n=(t.minY+t.maxY)/2;e.applyToMatrix([i,n,1]);var a=jn(e.getMatrix(),[["t",-i,-n],["s",r,r],["t",i,n]]);e.setMatrix(a)}function Sr(e){return e.find(function(r){return r.get("type")==="text"})}function Mu(e,r,t){t===void 0&&(t=[0,0,0,0]);var i=e&&e.getChildren()[0];if(i){var n=i.clone();(r==null?void 0:r.rotate)&&Eo(n,-r.rotate);var a=n.getCanvasBBox(),o=a.x,s=a.y,l=a.width,u=a.height;n.destroy();var h=t;return(0,c.isNil)(h)?h=[2,2,2,2]:(0,c.isNumber)(h)&&(h=new Array(4).fill(h)),{x:o-h[3],y:s-h[0],width:l+h[1]+h[3],height:u+h[0]+h[2],rotation:(r==null?void 0:r.rotate)||0}}return{x:0,y:0,width:0,height:0,rotation:0}}function Hy(e,r,t){t===void 0&&(t=0);var i=Math.max(0,Math.min(e.x+e.width+t,r.x+r.width+t)-Math.max(e.x-t,r.x-t)),n=Math.max(0,Math.min(e.y+e.height+t,r.y+r.height+t)-Math.max(e.y-t,r.y-t));return i*n}function Yy(e,r){var t=e.getBBox();return(0,c.some)(r,function(i){var n=i.getBBox();return Hy(t,n,2)>0})}function Tu(e,r,t){var i=t.data,n=t.origin,a=t.animateCfg,o=t.coordinate,s=(0,c.get)(a,"update");e.set("data",i),e.set("origin",n),e.set("animateCfg",a),e.set("coordinate",o),e.set("visible",r.get("visible")),(e.getChildren()||[]).forEach(function(l,u){var h=r.getChildByIndex(u);if(!h)e.removeChild(l),l.remove(!0);else{l.set("data",i),l.set("origin",n),l.set("animateCfg",a),l.set("coordinate",o);var f=zl(l,h);s?fi(l,s,{toAttrs:f,coordinate:o}):l.attr(f),h.isGroup()&&Tu(l,h,t)}}),(0,c.each)(r.getChildren(),function(l,u){u>=e.getCount()&&(l.destroyed||e.add(l))})}var Xy=function(){function e(r){this.shapesMap={};var t=r.layout,i=r.container;this.layout=t,this.container=i}return e.prototype.render=function(r,t,i){return i===void 0&&(i=!1),(0,d.__awaiter)(this,void 0,void 0,function(){var n,a,o,s,l,u,h,f,v=this;return(0,d.__generator)(this,function(g){switch(g.label){case 0:if(n={},a=this.createOffscreenGroup(),!r.length)return[3,2];try{for(o=(0,d.__values)(r),s=o.next();!s.done;s=o.next())l=s.value,l&&(n[l.id]=this.renderLabel(l,a))}catch(p){h={error:p}}finally{try{s&&!s.done&&(f=o.return)&&f.call(o)}finally{if(h)throw h.error}}return[4,this.doLayout(r,t,n)];case 1:g.sent(),this.renderLabelLine(r,n),this.renderLabelBackground(r,n),this.adjustLabel(r,n),g.label=2;case 2:return u=this.shapesMap,(0,c.each)(n,function(p,y){if(p.destroyed)delete n[y];else{if(u[y]){var m=p.get("data"),x=p.get("origin"),_=p.get("coordinate"),w=p.get("animateCfg"),b=u[y];Tu(b,n[y],{data:m,origin:x,animateCfg:w,coordinate:_}),n[y]=b}else{if(v.container.destroyed)return;v.container.add(p);var S=(0,c.get)(p.get("animateCfg"),i?"enter":"appear");S&&fi(p,S,{toAttrs:(0,d.__assign)({},p.attr()),coordinate:p.get("coordinate")})}delete u[y]}}),(0,c.each)(u,function(p){var y=(0,c.get)(p.get("animateCfg"),"leave");y?fi(p,y,{toAttrs:null,coordinate:p.get("coordinate")}):p.remove(!0)}),this.shapesMap=n,a.destroy(),[2]}})})},e.prototype.clear=function(){this.container.clear(),this.shapesMap={}},e.prototype.destroy=function(){this.container.destroy(),this.shapesMap=null},e.prototype.renderLabel=function(r,t){var i=r.id,n=r.elementId,a=r.data,o=r.mappingData,s=r.coordinate,l=r.animate,u=r.content,h={id:i,elementId:n,data:a,origin:(0,d.__assign)((0,d.__assign)({},o),{data:o[K]}),coordinate:s},f=t.addGroup((0,d.__assign)({name:"label",animateCfg:this.animate===!1||l===null||l===!1?!1:(0,c.deepMix)({},this.animate,l)},h)),v;if(u.isGroup&&u.isGroup()||u.isShape&&u.isShape()){var g=u.getCanvasBBox(),p=g.width,y=g.height,m=(0,c.get)(r,"textAlign","left"),x=r.x,_=r.y-y/2;m==="center"?x=x-p/2:(m==="right"||m==="end")&&(x=x-p),Qi(u,x,_),v=u,f.add(u)}else{var w=(0,c.get)(r,["style","fill"]);v=f.addShape("text",(0,d.__assign)({attrs:(0,d.__assign)((0,d.__assign)({x:r.x,y:r.y,textAlign:r.textAlign,textBaseline:(0,c.get)(r,"textBaseline","middle"),text:r.content},r.style),{fill:(0,c.isNull)(w)?r.color:w})},h))}return r.rotate&&Eo(v,r.rotate),f},e.prototype.doLayout=function(r,t,i){return(0,d.__awaiter)(this,void 0,void 0,function(){var n,a=this;return(0,d.__generator)(this,function(o){switch(o.label){case 0:return this.layout?(n=(0,c.isArray)(this.layout)?this.layout:[this.layout],[4,Promise.all(n.map(function(s){var l=By((0,c.get)(s,"type",""));if(!!l){var u=[],h=[];return(0,c.each)(i,function(f,v){u.push(f),h.push(t[f.get("elementId")])}),l(r,u,h,a.region,s.cfg)}}))]):[3,2];case 1:o.sent(),o.label=2;case 2:return[2]}})})},e.prototype.renderLabelLine=function(r,t){(0,c.each)(r,function(i){var n=(0,c.get)(i,"coordinate");if(!(!i||!n)){var a=n.getCenter(),o=n.getRadius();if(!!i.labelLine){var s=(0,c.get)(i,"labelLine",{}),l=i.id,u=s.path;if(!u){var h=le(a.x,a.y,o,i.angle);u=[["M",h.x,h.y],["L",i.x,i.y]]}var f=t[l];f.destroyed||f.addShape("path",{capture:!1,attrs:(0,d.__assign)({path:u,stroke:i.color?i.color:(0,c.get)(i,["style","fill"],"#000"),fill:null},s.style),id:l,origin:i.mappingData,data:i.data,coordinate:i.coordinate})}}})},e.prototype.renderLabelBackground=function(r,t){(0,c.each)(r,function(i){var n=(0,c.get)(i,"coordinate"),a=(0,c.get)(i,"background");if(!(!a||!n)){var o=i.id,s=t[o];if(!s.destroyed){var l=s.getChildren()[0];if(l){var u=Mu(s,i,a.padding),h=u.rotation,f=(0,d.__rest)(u,["rotation"]),v=s.addShape("rect",{attrs:(0,d.__assign)((0,d.__assign)({},f),a.style||{}),id:o,origin:i.mappingData,data:i.data,coordinate:i.coordinate});if(v.setZIndex(-1),h){var g=l.getMatrix();v.setMatrix(g)}}}}})},e.prototype.createOffscreenGroup=function(){var r=this.container,t=r.getGroupBase(),i=new t({});return i},e.prototype.adjustLabel=function(r,t){(0,c.each)(r,function(i){if(i){var n=i.id,a=t[n];if(!a.destroyed){var o=a.findAll(function(s){return s.get("type")!=="path"});(0,c.each)(o,function(s){s&&(i.offsetX&&s.attr("x",s.attr("x")+i.offsetX),i.offsetY&&s.attr("y",s.attr("y")+i.offsetY))})}}})},e}(),jy=Xy;function Lu(e){var r=0;return(0,c.each)(e,function(t){r+=t}),r/e.length}var Uy=function(){function e(r){this.geometry=r}return e.prototype.getLabelItems=function(r){var t=this,i=[],n=this.getLabelCfgs(r);return(0,c.each)(r,function(a,o){var s=n[o];if(!s||(0,c.isNil)(a.x)||(0,c.isNil)(a.y)){i.push(null);return}var l=(0,c.isArray)(s.content)?s.content:[s.content];s.content=l;var u=l.length;(0,c.each)(l,function(h,f){if((0,c.isNil)(h)||h===""){i.push(null);return}var v=(0,d.__assign)((0,d.__assign)({},s),t.getLabelPoint(s,a,f));v.textAlign||(v.textAlign=t.getLabelAlign(v,f,u)),v.offset<=0&&(v.labelLine=null),i.push(v)})}),i},e.prototype.render=function(r,t){return t===void 0&&(t=!1),(0,d.__awaiter)(this,void 0,void 0,function(){var i,n,a;return(0,d.__generator)(this,function(o){switch(o.label){case 0:return i=this.getLabelItems(r),n=this.getLabelsRenderer(),a=this.getGeometryShapes(),[4,n.render(i,a,t)];case 1:return o.sent(),[2]}})})},e.prototype.clear=function(){var r=this.labelsRenderer;r&&r.clear()},e.prototype.destroy=function(){var r=this.labelsRenderer;r&&r.destroy(),this.labelsRenderer=null},e.prototype.getCoordinate=function(){return this.geometry.coordinate},e.prototype.getDefaultLabelCfg=function(r,t){var i=this.geometry,n=i.type,a=i.theme;return n==="polygon"||n==="interval"&&t==="middle"||r<0&&!["line","point","path"].includes(n)?(0,c.get)(a,"innerLabels",{}):(0,c.get)(a,"labels",{})},e.prototype.getThemedLabelCfg=function(r){var t=this.geometry,i=this.getDefaultLabelCfg(),n=t.type,a=t.theme,o;return n==="polygon"||r.offset<0&&!["line","point","path"].includes(n)?o=(0,c.deepMix)({},i,a.innerLabels,r):o=(0,c.deepMix)({},i,a.labels,r),o},e.prototype.setLabelPosition=function(r,t,i,n){},e.prototype.getLabelOffset=function(r){var t=this.getCoordinate(),i=this.getOffsetVector(r);return t.isTransposed?i[0]:i[1]},e.prototype.getLabelOffsetPoint=function(r,t,i){var n=r.offset,a=this.getCoordinate(),o=a.isTransposed,s=o?"x":"y",l=o?1:-1,u={x:0,y:0};return t>0||i===1?u[s]=n*l:u[s]=n*l*-1,u},e.prototype.getLabelPoint=function(r,t,i){var n=this.getCoordinate(),a=r.content.length;function o(m,x,_){_===void 0&&(_=!1);var w=m;return(0,c.isArray)(w)&&(r.content.length===1?_?w=Lu(w):w.length<=2?w=w[m.length-1]:w=Lu(w):w=w[x]),w}var s={content:r.content[i],x:0,y:0,start:{x:0,y:0},color:"#fff"},l=(0,c.isArray)(t.shape)?t.shape[0]:t.shape,u=l==="funnel"||l==="pyramid";if(this.geometry.type==="polygon"){var h=mp(t.x,t.y);s.x=h[0],s.y=h[1]}else this.geometry.type==="interval"&&!u?(s.x=o(t.x,i,!0),s.y=o(t.y,i)):(s.x=o(t.x,i),s.y=o(t.y,i));if(u){var f=(0,c.get)(t,"nextPoints"),v=(0,c.get)(t,"points");if(f){var g=n.convert(v[1]),p=n.convert(f[1]);s.x=(g.x+p.x)/2,s.y=(g.y+p.y)/2}else if(l==="pyramid"){var g=n.convert(v[1]),p=n.convert(v[2]);s.x=(g.x+p.x)/2,s.y=(g.y+p.y)/2}}r.position&&this.setLabelPosition(s,t,i,r.position);var y=this.getLabelOffsetPoint(r,i,a);return s.start={x:s.x,y:s.y},s.x+=y.x,s.y+=y.y,s.color=t.color,s},e.prototype.getLabelAlign=function(r,t,i){var n="center",a=this.getCoordinate();if(a.isTransposed){var o=r.offset;o<0?n="right":o===0?n="center":n="left",i>1&&t===0&&(n==="right"?n="left":n==="left"&&(n="right"))}return n},e.prototype.getLabelId=function(r){var t=this.geometry,i=t.type,n=t.getXScale(),a=t.getYScale(),o=r[K],s=t.getElementId(r);return i==="line"||i==="area"?s+=" ".concat(o[n.field]):i==="path"&&(s+=" ".concat(o[n.field],"-").concat(o[a.field])),s},e.prototype.getLabelsRenderer=function(){var r=this.geometry,t=r.labelsContainer,i=r.labelOption,n=r.canvasRegion,a=r.animateOption,o=this.geometry.coordinate,s=this.labelsRenderer;return s||(s=new jy({container:t,layout:(0,c.get)(i,["cfg","layout"],{type:this.defaultLayout})}),this.labelsRenderer=s),s.region=n,s.animate=a?wu("label",o):!1,s},e.prototype.getLabelCfgs=function(r){var t=this,i=this.geometry,n=i.labelOption,a=i.scales,o=i.coordinate,s=n,l=s.fields,u=s.callback,h=s.cfg,f=l.map(function(g){return a[g]}),v=[];return(0,c.each)(r,function(g,p){var y=g[K],m=t.getLabelText(y,f),x;if(u){var _=l.map(function(M){return y[M]});if(x=u.apply(void 0,(0,d.__spreadArray)([],(0,d.__read)(_),!1)),(0,c.isNil)(x)){v.push(null);return}}var w=(0,d.__assign)((0,d.__assign)({id:t.getLabelId(g),elementId:t.geometry.getElementId(g),data:y,mappingData:g,coordinate:o},h),x);(0,c.isFunction)(w.position)&&(w.position=w.position(y,g,p));var b=t.getLabelOffset(w.offset||0),S=t.getDefaultLabelCfg(b,w.position);w=(0,c.deepMix)({},S,w),w.offset=t.getLabelOffset(w.offset||0);var C=w.content;(0,c.isFunction)(C)?w.content=C(y,g,p):(0,c.isUndefined)(C)&&(w.content=m[0]),v.push(w)}),v},e.prototype.getLabelText=function(r,t){var i=[];return(0,c.each)(t,function(n){var a=r[n.field];(0,c.isArray)(a)?a=a.map(function(o){return n.getText(o)}):a=n.getText(a),(0,c.isNil)(a)||a===""?i.push(null):i.push(a)}),i},e.prototype.getOffsetVector=function(r){r===void 0&&(r=0);var t=this.getCoordinate(),i=0;return(0,c.isNumber)(r)&&(i=r),t.isTransposed?t.applyMatrix(i,0):t.applyMatrix(0,i)},e.prototype.getGeometryShapes=function(){var r=this.geometry,t={};return(0,c.each)(r.elementsMap,function(i,n){t[n]=i.shape}),(0,c.each)(r.getOffscreenGroup().getChildren(),function(i){var n=r.getElementId(i.get("origin").mappingData);t[n]=i}),t},e}(),Un=Uy;function Mo(e,r,t){if(!e)return t;var i;if(e.callback&&e.callback.length>1){var n=Array(e.callback.length-1).fill("");i=e.mapping.apply(e,(0,d.__spreadArray)([r],(0,d.__read)(n),!1)).join("")}else i=e.mapping(r).join("");return i||t}var zr={hexagon:function(e,r,t){var i=t/2*Math.sqrt(3);return[["M",e,r-t],["L",e+i,r-t/2],["L",e+i,r+t/2],["L",e,r+t],["L",e-i,r+t/2],["L",e-i,r-t/2],["Z"]]},bowtie:function(e,r,t){var i=t-1.5;return[["M",e-t,r-i],["L",e+t,r+i],["L",e+t,r-i],["L",e-t,r+i],["Z"]]},cross:function(e,r,t){return[["M",e-t,r-t],["L",e+t,r+t],["M",e+t,r-t],["L",e-t,r+t]]},tick:function(e,r,t){return[["M",e-t/2,r-t],["L",e+t/2,r-t],["M",e,r-t],["L",e,r+t],["M",e-t/2,r+t],["L",e+t/2,r+t]]},plus:function(e,r,t){return[["M",e-t,r],["L",e+t,r],["M",e,r-t],["L",e,r+t]]},hyphen:function(e,r,t){return[["M",e-t,r],["L",e+t,r]]},line:function(e,r,t){return[["M",e,r-t],["L",e,r+t]]}},Zy=["line","cross","tick","plus","hyphen"];function Ky(e,r){return(0,c.isFunction)(r)?r(e):(0,c.deepMix)({},e,r)}function qy(e,r){var t=e.symbol;if((0,c.isString)(t)&&Zy.indexOf(t)!==-1){var i=(0,c.get)(e,"style",{}),n=(0,c.get)(i,"lineWidth",1),a=i.stroke||i.fill||r;e.style=(0,c.deepMix)({},e.style,{lineWidth:n,stroke:a,fill:null})}}function Iu(e){var r=e.symbol;(0,c.isString)(r)&&zr[r]&&(e.symbol=zr[r])}function To(e){return e.startsWith(T.LEFT)||e.startsWith(T.RIGHT)?"vertical":"horizontal"}function Ou(e,r,t,i,n){var a=t.getScale(t.type);if(a.isCategory){var o=a.field,s=r.getAttribute("color"),l=r.getAttribute("shape"),u=e.getTheme().defaultColor,h=r.coordinate.isPolar;return a.getTicks().map(function(f,v){var g,p=f.text,y=f.value,m=p,x=a.invert(y),_=e.filterFieldData(o,[(g={},g[o]=x,g)]).length===0;(0,c.each)(e.views,function(M){var L;M.filterFieldData(o,[(L={},L[o]=x,L)]).length||(_=!0)});var w=Mo(s,x,u),b=Mo(l,x,"point"),S=r.getShapeMarker(b,{color:w,isInPolar:h}),C=n;return(0,c.isFunction)(C)&&(C=C(m,v,(0,d.__assign)({name:m,value:x},(0,c.deepMix)({},i,S)))),S=(0,c.deepMix)({},i,S,Me((0,d.__assign)({},C),["style"])),qy(S,w),C&&C.style&&(S.style=Ky(S.style,C.style)),Iu(S),{id:x,name:m,value:x,marker:S,unchecked:_}})}return[]}function $y(e,r,t){return t.map(function(i,n){var a=r;(0,c.isFunction)(a)&&(a=a(i.name,n,(0,c.deepMix)({},e,i)));var o=(0,c.isFunction)(i.marker)?i.marker(i.name,n,(0,c.deepMix)({},e,i)):i.marker,s=(0,c.deepMix)({},e,a,o);return Iu(s),i.marker=s,i})}function Pu(e,r){var t=(0,c.get)(e,["components","legend"],{});return(0,c.deepMix)({},(0,c.get)(t,["common"],{}),(0,c.deepMix)({},(0,c.get)(t,[r],{})))}function Lo(e){return e?!1:e==null||isNaN(e)}function Du(e){if((0,c.isArray)(e))return Lo(e[1].y);var r=e.y;return(0,c.isArray)(r)?Lo(r[0]):Lo(r)}function Zn(e,r,t){if(r===void 0&&(r=!1),t===void 0&&(t=!0),!e.length||e.length===1&&!t)return[];if(r){for(var i=[],n=0,a=e.length;n<a;n++){var o=e[n];Du(o)||i.push(o)}return[i]}for(var s=[],l=[],n=0,a=e.length;n<a;n++){var o=e[n];Du(o)?l.length&&(l.length===1&&!t||s.push(l),l=[]):l.push(o)}return l.length&&s.push(l),s}function ku(e){for(var r=[],t=0;t<e.length;t++){var i=e[t];if(i){var n=t===0?"M":"L";r.push([n,i.x,i.y])}}var a=e[0];return a&&(r.push(["L",a.x,a.y]),r.push(["z"])),r}function Bu(e){for(var r=e.length/2,t=[],i=[],n=0;n<e.length;n++)n<r?t.push(e[n]):i.push(e[n]);var a=Wn(t,!1),o=Wn(i,!1);i.length&&a.push(["L",i[0].x,i[0].y]),o.shift();var s=a.concat(o);return t.length&&s.push(["L",t[0].x,t[0].y]),s.push(["z"]),s}function se(e,r,t,i){i===void 0&&(i="");var n=e.style,a=n===void 0?{}:n,o=e.defaultStyle,s=e.color,l=e.size,u=(0,d.__assign)((0,d.__assign)({},o),a);return s&&(r&&(a.stroke||(u.stroke=s)),t&&(a.fill||(u.fill=s))),i&&(0,c.isNil)(a[i])&&!(0,c.isNil)(l)&&(u[i]=l),u}function Ru(e){return(0,c.deepMix)({},{fill:"#CCD6EC",fillOpacity:.3},(0,c.get)(e,["background","style"]))}function Io(e){var r=e.x,t=(0,c.isArray)(e.y)?e.y:[e.y];return t.map(function(i,n){return{x:(0,c.isArray)(r)?r[n]:r,y:i}})}var Qy={line:function(e,r,t){return[["M",e-t,r],["L",e+t,r]]},dot:function(e,r,t){return[["M",e-t,r],["L",e+t,r]]},dash:function(e,r,t){return[["M",e-t,r],["L",e+t,r]]},smooth:function(e,r,t){return[["M",e-t,r],["A",t/2,t/2,0,1,1,e,r],["A",t/2,t/2,0,1,0,e+t,r]]},hv:function(e,r,t){return[["M",e-t-1,r-2.5],["L",e,r-2.5],["L",e,r+2.5],["L",e+t+1,r+2.5]]},vh:function(e,r,t){return[["M",e-t-1,r+2.5],["L",e,r+2.5],["L",e,r-2.5],["L",e+t+1,r-2.5]]},hvh:function(e,r,t){return[["M",e-(t+1),r+2.5],["L",e-t/2,r+2.5],["L",e-t/2,r-2.5],["L",e+t/2,r-2.5],["L",e+t/2,r+2.5],["L",e+t+1,r+2.5]]},vhv:function(e,r){return[["M",e-5,r+2.5],["L",e-5,r],["L",e,r],["L",e,r-3],["L",e,r+3],["L",e+6.5,r+3]]}};function Nu(e,r){var t=e.color;return{symbol:Qy[r],style:{lineWidth:2,r:6,stroke:t}}}function Jy(e,r,t){for(var i=e.isStack,n=e.connectNulls,a=e.isInCircle,o=e.showSinglePoint,s=se(e,!0,!1,"lineWidth"),l=Zn(e.points,n,o),u=[],h=0,f=l.length;h<f;h++){var v=l[h];u=u.concat(zu(v,a,i,r,t,s))}return s.path=u,s}function Oo(e,r,t,i,n){if(e.length===1)return[["M",e[0].x,e[0].y-n.lineWidth/2],["L",e[0].x,e[0].y],["L",e[0].x,e[0].y+n.lineWidth/2]];var a;return t?(r&&e.length&&e.push({x:e[0].x,y:e[0].y}),a=Wn(e,!1,i)):(a=ji(e,!1),r&&a.push(["Z"])),a}function t0(e,r,t,i,n,a){var o=[],s=[];(0,c.each)(e,function(h){var f=Io(h);o.push(f[1]),s.push(f[0])});var l=Oo(o,r,i,n,a),u=Oo(s,r,i,n,a);return t?l:l.concat(u)}function zu(e,r,t,i,n,a){if(e.length){var o=e[0];return(0,c.isArray)(o.y)?t0(e,r,t,i,n,a):Oo(e,r,i,n,a)}return[]}var tL=wr("line",{defaultShapeType:"line"});(0,c.each)(["line","dot","dash","smooth"],function(e){jt("line",e,{draw:function(r,t){var i=e==="smooth",n;if(i){var a=this.coordinate,o=a.start,s=a.end;n=[[o.x,s.y],[s.x,o.y]]}var l=Jy(r,i,n),u=t.addShape({type:"path",attrs:l,name:"line",capture:!i});return u},getMarker:function(r){return Nu(r,e)}})});var eL=null,rL="4.2.4",Le={getLegendItems:Ou,translate:Qi,rotate:Eo,zoom:Wy,transform:jn,getAngle:Hi,getSectorPath:mr,polarToCartesian:le,getDelegationObject:Rr,getTooltipItems:bo,getMappingValue:Mo,getPath:zu,getPathPoints:Zn},Cr={100:"#000",95:"#0D0D0D",85:"#262626",65:"#595959",45:"#8C8C8C",25:"#BFBFBF",15:"#D9D9D9",6:"#F0F0F0"},Qt={100:"#FFFFFF",95:"#F2F2F2",85:"#D9D9D9",65:"#A6A6A6",45:"#737373",25:"#404040",15:"#262626",6:"#0F0F0F"},Ue=["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#E86452","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"],e0=["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#E86452","#F8D0CB","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"],r0=["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"],i0=function(e){e===void 0&&(e={});var r=e.paletteQualitative10,t=r===void 0?Ue:r,i=e.paletteQualitative20,n=i===void 0?e0:i,a=e.brandColor,o=a===void 0?t[0]:a,s={backgroundColor:"#141414",brandColor:o,subColor:"rgba(255,255,255,0.05)",paletteQualitative10:t,paletteQualitative20:n,paletteSemanticRed:"#F4664A",paletteSemanticGreen:"#30BF78",paletteSemanticYellow:"#FAAD14",paletteSequence:r0,fontFamily:`"Segoe UI", Roboto, "Helvetica Neue", Arial,
  33. "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
  34. "Noto Color Emoji"`,axisLineBorderColor:Qt[25],axisLineBorder:1,axisLineDash:null,axisTitleTextFillColor:Qt[65],axisTitleTextFontSize:12,axisTitleTextLineHeight:12,axisTitleTextFontWeight:"normal",axisTitleSpacing:12,axisDescriptionIconFillColor:Cr[85],axisTickLineBorderColor:Qt[25],axisTickLineLength:4,axisTickLineBorder:1,axisSubTickLineBorderColor:Qt[15],axisSubTickLineLength:2,axisSubTickLineBorder:1,axisLabelFillColor:Qt[45],axisLabelFontSize:12,axisLabelLineHeight:12,axisLabelFontWeight:"normal",axisLabelOffset:8,axisGridBorderColor:Qt[15],axisGridBorder:1,axisGridLineDash:null,legendTitleTextFillColor:Qt[45],legendTitleTextFontSize:12,legendTitleTextLineHeight:21,legendTitleTextFontWeight:"normal",legendMarkerColor:Ue[0],legendMarkerSpacing:8,legendMarkerSize:4,legendCircleMarkerSize:4,legendSquareMarkerSize:4,legendLineMarkerSize:5,legendItemNameFillColor:Qt[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:Qt[45],legendPageNavigatorMarkerInactiveFillOpacity:.45,legendPageNavigatorMarkerFillColor:Qt[45],legendPageNavigatorMarkerFillOpacity:1,legendPageNavigatorTextFillColor:Qt[65],legendPageNavigatorTextFontSize:12,sliderRailFillColor:Qt[15],sliderRailBorder:0,sliderRailBorderColor:null,sliderRailWidth:100,sliderRailHeight:12,sliderLabelTextFillColor:Qt[45],sliderLabelTextFontSize:12,sliderLabelTextLineHeight:12,sliderLabelTextFontWeight:"normal",sliderHandlerFillColor:Cr[6],sliderHandlerWidth:10,sliderHandlerHeight:14,sliderHandlerBorder:1,sliderHandlerBorderColor:Cr[25],annotationArcBorderColor:Qt[15],annotationArcBorder:1,annotationLineBorderColor:Qt[25],annotationLineBorder:1,annotationLineDash:null,annotationTextFillColor:Qt[65],annotationTextFontSize:12,annotationTextLineHeight:12,annotationTextFontWeight:"normal",annotationTextBorderColor:null,annotationTextBorder:0,annotationRegionFillColor:Qt[100],annotationRegionFillOpacity:.06,annotationRegionBorder:0,annotationRegionBorderColor:null,annotationDataMarkerLineLength:16,tooltipCrosshairsBorderColor:Qt[25],tooltipCrosshairsBorder:1,tooltipCrosshairsLineDash:null,tooltipContainerFillColor:"#1f1f1f",tooltipContainerFillOpacity:.95,tooltipContainerShadow:"0px 2px 4px rgba(0,0,0,.5)",tooltipContainerBorderRadius:3,tooltipTextFillColor:Qt[65],tooltipTextFontSize:12,tooltipTextLineHeight:12,tooltipTextFontWeight:"bold",labelFillColor:Qt[65],labelFillColorDark:"#2c3542",labelFillColorLight:"#ffffff",labelFontSize:12,labelLineHeight:12,labelFontWeight:"normal",labelBorderColor:null,labelBorder:0,innerLabelFillColor:Cr[100],innerLabelFontSize:12,innerLabelLineHeight:12,innerLabelFontWeight:"normal",innerLabelBorderColor:null,innerLabelBorder:0,overflowLabelFillColor:Qt[65],overflowLabelFillColorDark:"#2c3542",overflowLabelFillColorLight:"#ffffff",overflowLabelFontSize:12,overflowLabelLineHeight:12,overflowLabelFontWeight:"normal",overflowLabelBorderColor:Cr[100],overflowLabelBorder:1,labelLineBorder:1,labelLineBorderColor:Qt[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:Ue[0],pointFillOpacity:.95,pointSize:4,pointBorder:1,pointBorderColor:Cr[100],pointBorderOpacity:1,pointActiveBorderColor:Qt[100],pointSelectedBorder:2,pointSelectedBorderColor:Qt[100],pointInactiveFillOpacity:.3,pointInactiveBorderOpacity:.3,hollowPointSize:4,hollowPointBorder:1,hollowPointBorderColor:Ue[0],hollowPointBorderOpacity:.95,hollowPointFillColor:Cr[100],hollowPointActiveBorder:1,hollowPointActiveBorderColor:Qt[100],hollowPointActiveBorderOpacity:1,hollowPointSelectedBorder:2,hollowPointSelectedBorderColor:Qt[100],hollowPointSelectedBorderOpacity:1,hollowPointInactiveBorderOpacity:.3,lineBorder:2,lineBorderColor:Ue[0],lineBorderOpacity:1,lineActiveBorder:3,lineSelectedBorder:3,lineInactiveBorderOpacity:.3,areaFillColor:Ue[0],areaFillOpacity:.25,areaActiveFillColor:Ue[0],areaActiveFillOpacity:.5,areaSelectedFillColor:Ue[0],areaSelectedFillOpacity:.5,areaInactiveFillOpacity:.3,hollowAreaBorderColor:Ue[0],hollowAreaBorder:2,hollowAreaBorderOpacity:1,hollowAreaActiveBorder:3,hollowAreaActiveBorderColor:Qt[100],hollowAreaSelectedBorder:3,hollowAreaSelectedBorderColor:Qt[100],hollowAreaInactiveBorderOpacity:.3,intervalFillColor:Ue[0],intervalFillOpacity:.95,intervalActiveBorder:1,intervalActiveBorderColor:Qt[100],intervalActiveBorderOpacity:1,intervalSelectedBorder:2,intervalSelectedBorderColor:Qt[100],intervalSelectedBorderOpacity:1,intervalInactiveBorderOpacity:.3,intervalInactiveFillOpacity:.3,hollowIntervalBorder:2,hollowIntervalBorderColor:Ue[0],hollowIntervalBorderOpacity:1,hollowIntervalFillColor:Cr[100],hollowIntervalActiveBorder:2,hollowIntervalActiveBorderColor:Qt[100],hollowIntervalSelectedBorder:3,hollowIntervalSelectedBorderColor:Qt[100],hollowIntervalSelectedBorderOpacity:1,hollowIntervalInactiveBorderOpacity:.3};return(0,d.__assign)((0,d.__assign)({},s),e)},n0=i0(),Vu=F(13063),a0=F(73578),o0=function(e){(0,d.__extends)(r,e);function r(t){var i=e.call(this,t)||this;i.type="path",i.shapeType="line";var n=t.connectNulls,a=n===void 0?!1:n,o=t.showSinglePoint,s=o===void 0?!0:o;return i.connectNulls=a,i.showSinglePoint=s,i}return r.prototype.updateElements=function(t,i){var n,a,o,s,l,u;i===void 0&&(i=!1);for(var h=new Map,f=new Map,v=[],g=0,p=0;p<t.length;p++){var y=t[p],m=this.getElementId(y);v.push(m),h.set(m,y),f.set(m,g),g++}this.elements=new Array(g);var x=Eu(this.lastElementsMap,v),_=x.added,w=x.updated,b=x.removed;try{for(var S=(0,d.__values)(_),C=S.next();!C.done;C=S.next()){var m=C.value,y=h.get(m),M=this.getShapeFactory(),L=this.getShapeInfo(y),p=f.get(m),B=new bu({shapeFactory:M,container:this.container,offscreenGroup:this.getOffscreenGroup(),elementIndex:p});B.geometry=this,B.animate=this.animateOption,B.draw(L,i),this.elementsMap[m]=B,this.elements[p]=B}}catch(zt){n={error:zt}}finally{try{C&&!C.done&&(a=S.return)&&a.call(S)}finally{if(n)throw n.error}}try{for(var I=(0,d.__values)(w),G=I.next();!G.done;G=I.next()){var m=G.value,y=h.get(m),B=this.lastElementsMap[m],p=f.get(m),L=this.getShapeInfo(y),q=B.getModel();(this.isCoordinateChanged||Fu(q,L))&&(B.animate=this.animateOption,B.update(L)),this.elementsMap[m]=B,this.elements[p]=B}}catch(zt){o={error:zt}}finally{try{G&&!G.done&&(s=I.return)&&s.call(I)}finally{if(o)throw o.error}}try{for(var ft=(0,d.__values)(b),mt=ft.next();!mt.done;mt=ft.next()){var m=mt.value,B=this.lastElementsMap[m];B.animate=this.animateOption,B.destroy()}}catch(zt){l={error:zt}}finally{try{mt&&!mt.done&&(u=ft.return)&&u.call(ft)}finally{if(l)throw l.error}}},r.prototype.getPointsAndData=function(t){for(var i=[],n=[],a=0,o=t.length;a<o;a++){var s=t[a];i.push({x:s.x,y:s.y}),n.push(s[K])}return{points:i,data:n}},r.prototype.getShapeInfo=function(t){var i=this.getDrawCfg(t[0]),n=this.getPointsAndData(t),a=n.points,o=n.data;return i.mappingData=t,i.data=o,i.isStack=!!this.getAdjust("stack"),i.points=a,i.connectNulls=this.connectNulls,i.showSinglePoint=this.showSinglePoint,i},r}(br),Po=o0;function s0(e,r,t,i,n){var a=[];if(e.length){for(var o=[],s=[],l=0,u=e.length;l<u;l++){var h=e[l];o.push(h[1]),s.push(h[0])}s=s.reverse(),(0,c.each)([o,s],function(f,v){var g=[],p=i.parsePoints(f),y=p[0];o.length===1&&s.length===1?g=v===0?[["M",y.x-.5,y.y],["L",y.x+.5,y.y]]:[["L",y.x+.5,y.y],["L",y.x-.5,y.y]]:(r&&p.push({x:y.x,y:y.y}),t?g=Wn(p,!1,n):g=ji(p,!1),v>0&&(g[0][0]="L")),a=a.concat(g)}),a.push(["Z"])}return a}function Kn(e,r,t,i,n){for(var a=se(e,r,!r,"lineWidth"),o=e.connectNulls,s=e.isInCircle,l=e.points,u=e.showSinglePoint,h=Zn(l,o,u),f=[],v=0,g=h.length;v<g;v++){var p=h[v];f=f.concat(s0(p,s,t,i,n))}return a.path=f,a}function Gu(e){var r=e.start,t=e.end;return[[r.x,t.y],[t.x,r.y]]}var iL=wr("area",{defaultShapeType:"area",getDefaultPoints:function(e){var r=e.x,t=e.y0,i=(0,c.isArray)(e.y)?e.y:[t,e.y];return i.map(function(n){return{x:r,y:n}})}});jt("area","area",{draw:function(e,r){var t=Kn(e,!1,!1,this),i=r.addShape({type:"path",attrs:t,name:"area"});return i},getMarker:function(e){var r=e.color;return{symbol:function(t,i,n){return n===void 0&&(n=5.5),[["M",t-n,i-4],["L",t+n,i-4],["L",t+n,i+4],["L",t-n,i+4],["Z"]]},style:{r:5,fill:r}}}});var nL=null,l0=function(e){(0,d.__extends)(r,e);function r(t){var i=e.call(this,t)||this;i.type="area",i.shapeType="area",i.generatePoints=!0,i.startOnZero=!0;var n=t.startOnZero,a=n===void 0?!0:n,o=t.sortable,s=o===void 0?!1:o,l=t.showSinglePoint,u=l===void 0?!1:l;return i.startOnZero=a,i.sortable=s,i.showSinglePoint=u,i}return r.prototype.getPointsAndData=function(t){for(var i=[],n=[],a=0,o=t.length;a<o;a++){var s=t[a];i.push(s.points),n.push(s[K])}return{points:i,data:n}},r.prototype.getYMinValue=function(){if(this.startOnZero)return e.prototype.getYMinValue.call(this);var t=this.getYScale();return t.min},r}(Po),u0=l0,aL=wr("edge",{defaultShapeType:"line",getDefaultPoints:function(e){return Io(e)}});jt("edge","line",{draw:function(e,r){var t=se(e,!0,!1,"lineWidth"),i=ji(this.parsePoints(e.points),this.coordinate.isPolar);return r.addShape("path",{attrs:(0,d.__assign)((0,d.__assign)({},t),{path:i})})},getMarker:function(e){return{symbol:"circle",style:{r:4.5,fill:e.color}}}});var oL=null,c0=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="edge",t.shapeType="edge",t.generatePoints=!0,t}return r}(br),h0=c0,f0=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="heatmap",t.paletteCache={},t}return r.prototype.updateElements=function(t,i){i===void 0&&(i=!1);for(var n=0;n<t.length;n++){var a=t[n],o=this.prepareRange(a),s=this.prepareSize(),l=(0,c.get)(this.styleOption,["cfg","shadowBlur"]);(0,c.isNumber)(l)||(l=s/2),this.prepareGreyScaleBlurredCircle(s,l),this.drawWithRange(a,o,s,l)}},r.prototype.color=function(t,i){return this.createAttrOption("color",t,typeof i!="function"?i:""),this},r.prototype.clear=function(){e.prototype.clear.call(this),this.clearShadowCanvasCtx(),this.paletteCache={}},r.prototype.prepareRange=function(t){var i=this.getAttribute("color"),n=i.getFields()[0],a=Infinity,o=-Infinity;return t.forEach(function(s){var l=s[K][n];l>o&&(o=l),l<a&&(a=l)}),a===o&&(a=o-1),[a,o]},r.prototype.prepareSize=function(){var t=this.getDefaultValue("size");return(0,c.isNumber)(t)||(t=this.getDefaultSize()),t},r.prototype.prepareGreyScaleBlurredCircle=function(t,i){var n=this.getGrayScaleBlurredCanvas(),a=t+i,o=n.getContext("2d");n.width=n.height=a*2,o.clearRect(0,0,n.width,n.height),o.shadowOffsetX=o.shadowOffsetY=a*2,o.shadowBlur=i,o.shadowColor="black",o.beginPath(),o.arc(-a,-a,t,0,Math.PI*2,!0),o.closePath(),o.fill()},r.prototype.drawWithRange=function(t,i,n,a){var o,s,l=this.coordinate,u=l.start,h=l.end,f=this.coordinate.getWidth(),v=this.coordinate.getHeight(),g=this.getAttribute("color"),p=g.getFields()[0];this.clearShadowCanvasCtx();var y=this.getShadowCanvasCtx();i&&(t=t.filter(function(I){return I[K][p]<=i[1]&&I[K][p]>=i[0]}));var m=this.scales[p];try{for(var x=(0,d.__values)(t),_=x.next();!_.done;_=x.next()){var w=_.value,b=this.getDrawCfg(w),S=b.x,C=b.y,M=m.scale(w[K][p]);this.drawGrayScaleBlurredCircle(S-u.x,C-h.y,n+a,M,y)}}catch(I){o={error:I}}finally{try{_&&!_.done&&(s=x.return)&&s.call(x)}finally{if(o)throw o.error}}var L=y.getImageData(0,0,f,v);this.clearShadowCanvasCtx(),this.colorize(L),y.putImageData(L,0,0);var B=this.getImageShape();B.attr("x",u.x),B.attr("y",h.y),B.attr("width",f),B.attr("height",v),B.attr("img",y.canvas),B.set("origin",this.getShapeInfo(t))},r.prototype.getDefaultSize=function(){var t=this.getAttribute("position"),i=this.coordinate;return Math.min(i.getWidth()/(t.scales[0].ticks.length*4),i.getHeight()/(t.scales[1].ticks.length*4))},r.prototype.clearShadowCanvasCtx=function(){var t=this.getShadowCanvasCtx();t.clearRect(0,0,t.canvas.width,t.canvas.height)},r.prototype.getShadowCanvasCtx=function(){var t=this.shadowCanvas;return t||(t=document.createElement("canvas"),this.shadowCanvas=t),t.width=this.coordinate.getWidth(),t.height=this.coordinate.getHeight(),t.getContext("2d")},r.prototype.getGrayScaleBlurredCanvas=function(){return this.grayScaleBlurredCanvas||(this.grayScaleBlurredCanvas=document.createElement("canvas")),this.grayScaleBlurredCanvas},r.prototype.drawGrayScaleBlurredCircle=function(t,i,n,a,o){var s=this.getGrayScaleBlurredCanvas();o.globalAlpha=a,o.drawImage(s,t-n,i-n)},r.prototype.colorize=function(t){for(var i=this.getAttribute("color"),n=t.data,a=this.paletteCache,o=3;o<n.length;o+=4){var s=n[o];if((0,c.isNumber)(s)){var l=a[s]?a[s]:yr.rgb2arr(i.gradient(s/256));n[o-3]=l[0],n[o-2]=l[1],n[o-1]=l[2],n[o]=s}}},r.prototype.getImageShape=function(){var t=this.imageShape;if(t)return t;var i=this.container;return t=i.addShape({type:"image",attrs:{}}),this.imageShape=t,t},r.prototype.getShapeInfo=function(t){var i=this.getDrawCfg(t[0]),n=t.map(function(a){return a[K]});return(0,d.__assign)((0,d.__assign)({},i),{mappingData:t,data:n})},r}(br),v0=f0;function Do(e){var r,t,i=e.x,n=e.y,a=e.y0,o=e.size,s,l;(0,c.isArray)(n)?(r=(0,d.__read)(n,2),s=r[0],l=r[1]):(s=a,l=n);var u,h;(0,c.isArray)(i)?(t=(0,d.__read)(i,2),u=t[0],h=t[1]):(u=i-o/2,h=i+o/2);var f=[{x:u,y:s},{x:u,y:l}];return f.push({x:h,y:l},{x:h,y:s}),f}function ko(e,r){r===void 0&&(r=!0);var t=[],i=e[0];t.push(["M",i.x,i.y]);for(var n=1,a=e.length;n<a;n++)t.push(["L",e[n].x,e[n].y]);return r&&(t.push(["L",i.x,i.y]),t.push(["z"])),t}function Wu(e,r){var t=0,i=0,n=0,a=0;return(0,c.isArray)(e)?e.length===1?t=i=n=a=e[0]:e.length===2?(t=n=e[0],i=a=e[1]):e.length===3?(t=e[0],i=a=e[1],n=e[2]):(t=e[0],i=e[1],n=e[2],a=e[3]):t=i=n=a=e,t+i>r&&(t=t?r/(1+i/t):0,i=r-t),n+a>r&&(n=n?r/(1+a/n):0,a=r-n),[t||0,i||0,n||0,a||0]}function Hu(e,r,t){var i=[];if(t.isRect){var n=t.isTransposed?{x:t.start.x,y:r[0].y}:{x:r[0].x,y:t.start.y},a=t.isTransposed?{x:t.end.x,y:r[2].y}:{x:r[3].x,y:t.end.y},o=(0,c.get)(e,["background","style","radius"]);if(o){var s=t.isTransposed?Math.abs(r[0].y-r[2].y):r[2].x-r[1].x,l=t.isTransposed?t.getWidth():t.getHeight(),u=(0,d.__read)(Wu(o,Math.min(s,l)),4),h=u[0],f=u[1],v=u[2],g=u[3],p=t.isTransposed&&t.isReflect("y"),y=p?0:1,m=function(C){return p?-C:C};i.push(["M",n.x,a.y+m(h)]),h!==0&&i.push(["A",h,h,0,0,y,n.x+h,a.y]),i.push(["L",a.x-f,a.y]),f!==0&&i.push(["A",f,f,0,0,y,a.x,a.y+m(f)]),i.push(["L",a.x,n.y-m(v)]),v!==0&&i.push(["A",v,v,0,0,y,a.x-v,n.y]),i.push(["L",n.x+g,n.y]),g!==0&&i.push(["A",g,g,0,0,y,n.x,n.y-m(g)])}else i.push(["M",n.x,n.y]),i.push(["L",a.x,n.y]),i.push(["L",a.x,a.y]),i.push(["L",n.x,a.y]),i.push(["L",n.x,n.y]);i.push(["z"])}if(t.isPolar){var x=t.getCenter(),_=Hi(e,t),w=_.startAngle,b=_.endAngle;if(t.type!=="theta"&&!t.isTransposed)i=mr(x.x,x.y,t.getRadius(),w,b);else{var S=function(L){return Math.pow(L,2)},h=Math.sqrt(S(x.x-r[0].x)+S(x.y-r[0].y)),f=Math.sqrt(S(x.x-r[2].x)+S(x.y-r[2].y));i=mr(x.x,x.y,h,t.startAngle,t.endAngle,f)}}return i}function d0(e,r,t){var i=t.getWidth(),n=t.getHeight(),a=t.type==="rect",o=[],s=(e[2].x-e[1].x)/2,l=t.isTransposed?s*n/i:s*i/n;return r==="round"?(a?(o.push(["M",e[0].x,e[0].y+l]),o.push(["L",e[1].x,e[1].y-l]),o.push(["A",s,s,0,0,1,e[2].x,e[2].y-l]),o.push(["L",e[3].x,e[3].y+l]),o.push(["A",s,s,0,0,1,e[0].x,e[0].y+l])):(o.push(["M",e[0].x,e[0].y]),o.push(["L",e[1].x,e[1].y]),o.push(["A",s,s,0,0,1,e[2].x,e[2].y]),o.push(["L",e[3].x,e[3].y]),o.push(["A",s,s,0,0,1,e[0].x,e[0].y])),o.push(["z"])):o=ko(e),o}function Yu(e,r,t){var i=[];return(0,c.isNil)(r)?t?i.push(["M",e[0].x,e[0].y],["L",e[1].x,e[1].y],["L",(e[2].x+e[3].x)/2,(e[2].y+e[3].y)/2],["Z"]):i.push(["M",e[0].x,e[0].y],["L",e[1].x,e[1].y],["L",e[2].x,e[2].y],["L",e[3].x,e[3].y],["Z"]):i.push(["M",e[0].x,e[0].y],["L",e[1].x,e[1].y],["L",r[1].x,r[1].y],["L",r[0].x,r[0].y],["Z"]),i}function Ji(e,r){return[r,e]}function g0(e,r,t){var i,n,a,o,s,l,u,h=(0,d.__read)((0,d.__spreadArray)([],(0,d.__read)(e),!1),4),f=h[0],v=h[1],g=h[2],p=h[3],y=(0,d.__read)(typeof t=="number"?Array(4).fill(t):t,4),m=y[0],x=y[1],_=y[2],w=y[3];r.isTransposed&&(i=(0,d.__read)(Ji(v,p),2),v=i[0],p=i[1]),r.isReflect("y")&&(n=(0,d.__read)(Ji(f,v),2),f=n[0],v=n[1],a=(0,d.__read)(Ji(g,p),2),g=a[0],p=a[1]),r.isReflect("x")&&(o=(0,d.__read)(Ji(f,p),2),f=o[0],p=o[1],s=(0,d.__read)(Ji(v,g),2),v=s[0],g=s[1]);var b=[],S=function(C){return Math.abs(C)};return l=(0,d.__read)(Wu([m,x,_,w],Math.min(S(p.x-f.x),S(v.y-f.y))).map(function(C){return S(C)}),4),m=l[0],x=l[1],_=l[2],w=l[3],r.isTransposed&&(u=(0,d.__read)([w,m,x,_],4),m=u[0],x=u[1],_=u[2],w=u[3]),f.y<v.y?(b.push(["M",p.x,p.y+_]),_!==0&&b.push(["A",_,_,0,0,0,p.x-_,p.y]),b.push(["L",f.x+w,f.y]),w!==0&&b.push(["A",w,w,0,0,0,f.x,f.y+w]),b.push(["L",v.x,v.y-m]),m!==0&&b.push(["A",m,m,0,0,0,v.x+m,v.y]),b.push(["L",g.x-x,g.y]),x!==0&&b.push(["A",x,x,0,0,0,g.x,g.y-x]),b.push(["L",p.x,p.y+_]),b.push(["z"])):p.x<f.x?(b.push(["M",g.x+x,g.y]),x!==0&&b.push(["A",x,x,0,0,0,g.x,g.y+x]),b.push(["L",p.x,p.y-_]),_!==0&&b.push(["A",_,_,0,0,0,p.x+_,p.y]),b.push(["L",f.x-w,f.y]),w!==0&&b.push(["A",w,w,0,0,0,f.x,f.y-w]),b.push(["L",v.x,v.y+m]),m!==0&&b.push(["A",m,m,0,0,0,v.x-m,v.y]),b.push(["L",g.x+x,g.y]),b.push(["z"])):(b.push(["M",v.x,v.y+m]),m!==0&&b.push(["A",m,m,0,0,1,v.x+m,v.y]),b.push(["L",g.x-x,g.y]),x!==0&&b.push(["A",x,x,0,0,1,g.x,g.y+x]),b.push(["L",p.x,p.y-_]),_!==0&&b.push(["A",_,_,0,0,1,p.x-_,p.y]),b.push(["L",f.x+w,f.y]),w!==0&&b.push(["A",w,w,0,0,1,f.x,f.y-w]),b.push(["L",v.x,v.y+m]),b.push(["z"])),b}var sL=wr("interval",{defaultShapeType:"rect",getDefaultPoints:function(e){return Do(e)}});jt("interval","rect",{draw:function(e,r){var t=se(e,!1,!0),i=r,n=e==null?void 0:e.background;if(n){i=r.addGroup();var a=Ru(e),o=Hu(e,this.parsePoints(e.points),this.coordinate);i.addShape("path",{attrs:(0,d.__assign)((0,d.__assign)({},a),{path:o}),zIndex:-1,name:Ao})}var s;t.radius&&this.coordinate.isRect?s=g0(this.parsePoints(e.points),this.coordinate,t.radius):s=this.parsePath(d0(e.points,t.lineCap,this.coordinate));var l=i.addShape("path",{attrs:(0,d.__assign)((0,d.__assign)({},t),{path:s}),name:"interval"});return n?i:l},getMarker:function(e){var r=e.color,t=e.isInPolar;return t?{symbol:"circle",style:{r:4.5,fill:r}}:{symbol:"square",style:{r:4,fill:r}}}});var lL=null;function p0(e,r){var t=e.length,i=e;(0,c.isString)(i[0])&&(i=e.map(function(s){return r.translate(s)}));for(var n=i[1]-i[0],a=2;a<t;a++){var o=i[a]-i[a-1];n>o&&(n=o)}return n}function y0(e,r){if(r){var t=(0,c.flatten)(e),i=(0,c.valuesOfKey)(t,r);return i.length}return e.length}function Bo(e){var r=e.theme,t=e.coordinate,i=e.getXScale(),n=i.values,a=e.beforeMappingData,o=n.length,s=Yi(e.coordinate),l=e.intervalPadding,u=e.dodgePadding,h=e.maxColumnWidth||r.maxColumnWidth,f=e.minColumnWidth||r.minColumnWidth,v=e.columnWidthRatio||r.columnWidthRatio,g=e.multiplePieWidthRatio||r.multiplePieWidthRatio,p=e.roseWidthRatio||r.roseWidthRatio;if(i.isLinear&&n.length>1){n.sort();var y=p0(n,i);o=(i.max-i.min)/y,n.length>o&&(o=n.length)}var m=i.range,x=1/o,_=1;if(t.isPolar?t.isTransposed&&o>1?_=g:_=p:(i.isLinear&&(x*=m[1]-m[0]),_=v),!(0,c.isNil)(l)&&l>=0){var w=l/s;x=(1-(o-1)*w)/o}else x*=_;if(e.getAdjust("dodge")){var b=e.getAdjust("dodge"),S=b.dodgeBy,C=y0(a,S);if(!(0,c.isNil)(u)&&u>=0){var M=u/s;x=(x-M*(C-1))/C}else!(0,c.isNil)(l)&&l>=0&&(x*=_),x=x/C;x=x>=0?x:0}if(!(0,c.isNil)(h)&&h>=0){var L=h/s;x>L&&(x=L)}if(!(0,c.isNil)(f)&&f>=0){var B=f/s;x<B&&(x=B)}return x}var m0=function(e){(0,d.__extends)(r,e);function r(t){var i=e.call(this,t)||this;i.type="interval",i.shapeType="interval",i.generatePoints=!0;var n=t.background;return i.background=n,i}return r.prototype.createShapePointsCfg=function(t){var i=e.prototype.createShapePointsCfg.call(this,t),n,a=this.getAttribute("size");if(a){n=this.getAttributeValues(a,t)[0];var o=this.coordinate,s=Yi(o);n=n/s}else this.defaultSize||(this.defaultSize=Bo(this)),n=this.defaultSize;return i.size=n,i},r.prototype.adjustScale=function(){e.prototype.adjustScale.call(this);var t=this.getYScale();if(this.coordinate.type==="theta")t.change({nice:!1,min:0,max:Ep(t)});else{var i=this.scaleDefs,n=t.field,a=t.min,o=t.max,s=t.type;s!=="time"&&(a>0&&!(0,c.get)(i,[n,"min"])&&t.change({min:0}),o<=0&&!(0,c.get)(i,[n,"max"])&&t.change({max:0}))}},r.prototype.getDrawCfg=function(t){var i=e.prototype.getDrawCfg.call(this,t);return i.background=this.background,i},r}(br),x0=m0,_0=function(e){(0,d.__extends)(r,e);function r(t){var i=e.call(this,t)||this;i.type="line";var n=t.sortable,a=n===void 0?!1:n;return i.sortable=a,i}return r}(Po),w0=_0,Xu=["circle","square","bowtie","diamond","hexagon","triangle","triangle-down"],b0=["cross","tick","plus","hyphen","line"];function Ro(e,r,t,i,n){var a,o,s=se(r,n,!n,"r"),l=e.parsePoints(r.points),u=l[0];if(r.isStack)u=l[1];else if(l.length>1){var h=t.addGroup();try{for(var f=(0,d.__values)(l),v=f.next();!v.done;v=f.next()){var g=v.value;h.addShape({type:"marker",attrs:(0,d.__assign)((0,d.__assign)((0,d.__assign)({},s),{symbol:zr[i]||i}),g)})}}catch(p){a={error:p}}finally{try{v&&!v.done&&(o=f.return)&&o.call(f)}finally{if(a)throw a.error}}return h}return t.addShape({type:"marker",attrs:(0,d.__assign)((0,d.__assign)((0,d.__assign)({},s),{symbol:zr[i]||i}),u)})}var uL=wr("point",{defaultShapeType:"hollow-circle",getDefaultPoints:function(e){return Io(e)}});(0,c.each)(Xu,function(e){jt("point","hollow-".concat(e),{draw:function(r,t){return Ro(this,r,t,e,!0)},getMarker:function(r){var t=r.color;return{symbol:zr[e]||e,style:{r:4.5,stroke:t,fill:null}}}})});var cL=null,S0=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="point",t.shapeType="point",t.generatePoints=!0,t}return r.prototype.getDrawCfg=function(t){var i=e.prototype.getDrawCfg.call(this,t);return(0,d.__assign)((0,d.__assign)({},i),{isStack:!!this.getAdjust("stack")})},r}(br),C0=S0;function A0(e){for(var r=e[0],t=1,i=[["M",r.x,r.y]];t<e.length;){var n=e[t];(n.x!==e[t-1].x||n.y!==e[t-1].y)&&(i.push(["L",n.x,n.y]),n.x===r.x&&n.y===r.y&&t<e.length-1&&(r=e[t+1],i.push(["Z"]),i.push(["M",r.x,r.y]),t++)),t++}return(0,c.isEqual)((0,c.last)(i),r)||i.push(["L",r.x,r.y]),i.push(["Z"]),i}var hL=wr("polygon",{defaultShapeType:"polygon",getDefaultPoints:function(e){var r=[];return(0,c.each)(e.x,function(t,i){var n=e.y[i];r.push({x:t,y:n})}),r}});jt("polygon","polygon",{draw:function(e,r){if(!(0,c.isEmpty)(e.points)){var t=se(e,!0,!0),i=this.parsePath(A0(e.points));return r.addShape("path",{attrs:(0,d.__assign)((0,d.__assign)({},t),{path:i}),name:"polygon"})}},getMarker:function(e){var r=e.color;return{symbol:"square",style:{r:4,fill:r}}}});var fL=null,F0=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="polygon",t.shapeType="polygon",t.generatePoints=!0,t}return r.prototype.createShapePointsCfg=function(t){var i=e.prototype.createShapePointsCfg.call(this,t),n=i.x,a=i.y,o;if(!((0,c.isArray)(n)&&(0,c.isArray)(a))){var s=this.getXScale(),l=this.getYScale(),u=s.values.length,h=l.values.length,f=.5*1/u,v=.5*1/h;s.isCategory&&l.isCategory?(n=[n-f,n-f,n+f,n+f],a=[a-v,a+v,a+v,a-v]):(0,c.isArray)(n)?(o=n,n=[o[0],o[0],o[1],o[1]],a=[a-v/2,a+v/2,a+v/2,a-v/2]):(0,c.isArray)(a)&&(o=a,a=[o[0],o[1],o[1],o[0]],n=[n-f/2,n-f/2,n+f/2,n+f/2]),i.x=n,i.y=a}return i},r}(br),E0=F0,vL=wr("schema",{defaultShapeType:""}),dL=null,M0=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="schema",t.shapeType="schema",t.generatePoints=!0,t}return r.prototype.createShapePointsCfg=function(t){var i=e.prototype.createShapePointsCfg.call(this,t),n,a=this.getAttribute("size");if(a){n=this.getAttributeValues(a,t)[0];var o=this.coordinate,s=Yi(o);n=n/s}else this.defaultSize||(this.defaultSize=Bo(this)),n=this.defaultSize;return i.size=n,i},r}(br),T0=M0;function L0(e){if(!(0,c.isArray)(e))return[];var r=(0,c.max)(e);return(0,c.map)(e,function(t){return t/r})}var gL=wr("violin",{defaultShapeType:"violin",getDefaultPoints:function(e){var r=e.size/2,t=[],i=L0(e._size);return(0,c.each)(e.y,function(n,a){var o=i[a]*r,s=a===0,l=a===e.y.length-1;t.push({isMin:s,isMax:l,x:e.x-o,y:n}),t.unshift({isMin:s,isMax:l,x:e.x+o,y:n})}),t}});jt("violin","violin",{draw:function(e,r){var t=se(e,!0,!0),i=this.parsePath(ku(e.points));return r.addShape("path",{attrs:(0,d.__assign)((0,d.__assign)({},t),{path:i}),name:"violin"})},getMarker:function(e){var r=e.color;return{symbol:"circle",style:{r:4,fill:r}}}});var pL=null,I0=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="violin",t.shapeType="violin",t.generatePoints=!0,t}return r.prototype.createShapePointsCfg=function(t){var i=e.prototype.createShapePointsCfg.call(this,t),n,a=this.getAttribute("size");if(a){n=this.getAttributeValues(a,t)[0];var o=this.coordinate,s=Yi(o);n=n/s}else this.defaultSize||(this.defaultSize=Bo(this)),n=this.defaultSize;return i.size=n,i._size=(0,c.get)(t[K],[this._sizeField]),i},r.prototype.initAttributes=function(){var t=this.attributeOption,i=t.size?t.size.fields[0]:this._sizeField?this._sizeField:"size";this._sizeField=i,delete t.size,e.prototype.initAttributes.call(this)},r}(br),O0=I0;jt("area","line",{draw:function(e,r){var t=Kn(e,!0,!1,this),i=r.addShape({type:"path",attrs:t,name:"area"});return i},getMarker:function(e){var r=e.color;return{symbol:function(t,i,n){return n===void 0&&(n=5.5),[["M",t-n,i-4],["L",t+n,i-4],["L",t+n,i+4],["L",t-n,i+4],["Z"]]},style:{r:5,stroke:r,fill:null}}}}),jt("area","smooth",{draw:function(e,r){var t=this.coordinate,i=Kn(e,!1,!0,this,Gu(t)),n=r.addShape({type:"path",attrs:i,name:"area"});return n},getMarker:function(e){var r=e.color;return{symbol:function(t,i,n){return n===void 0&&(n=5.5),[["M",t-n,i-4],["L",t+n,i-4],["L",t+n,i+4],["L",t-n,i+4],["Z"]]},style:{r:5,fill:r}}}}),jt("area","smooth-line",{draw:function(e,r){var t=this.coordinate,i=Kn(e,!0,!0,this,Gu(t)),n=r.addShape({type:"path",attrs:i,name:"area"});return n},getMarker:function(e){var r=e.color;return{symbol:function(t,i,n){return n===void 0&&(n=5.5),[["M",t-n,i-4],["L",t+n,i-4],["L",t+n,i+4],["L",t-n,i+4],["Z"]]},style:{r:5,stroke:r,fill:null}}}});function No(e,r){return["C",e.x*1/2+r.x*1/2,e.y,e.x*1/2+r.x*1/2,r.y,r.x,r.y]}function zo(e,r){var t=[];t.push({x:r.x,y:r.y}),t.push(e);var i=["Q"];return(0,c.each)(t,function(n){i.push(n.x,n.y)}),i}function P0(e,r,t){var i=zo(r,t),n=[["M",e.x,e.y]];return n.push(i),n}function D0(e,r){var t=zo(e[1],r),i=zo(e[3],r),n=[["M",e[0].x,e[0].y]];return n.push(i),n.push(["L",e[3].x,e[3].y]),n.push(["L",e[2].x,e[2].y]),n.push(t),n.push(["L",e[1].x,e[1].y]),n.push(["L",e[0].x,e[0].y]),n.push(["Z"]),n}jt("edge","arc",{draw:function(e,r){var t=se(e,!0,!1,"lineWidth"),i=e.points,n=i.length>2?"weight":"normal",a;if(e.isInCircle){var o={x:0,y:1};return n==="normal"?a=P0(i[0],i[1],o):(t.fill=t.stroke,a=D0(i,o)),a=this.parsePath(a),r.addShape("path",{attrs:(0,d.__assign)((0,d.__assign)({},t),{path:a})})}else{if(n==="normal")return i=this.parsePoints(i),a=Nl((i[1].x+i[0].x)/2,i[0].y,Math.abs(i[1].x-i[0].x)/2,Math.PI,Math.PI*2),r.addShape("path",{attrs:(0,d.__assign)((0,d.__assign)({},t),{path:a})});var s=No(i[1],i[3]),l=No(i[2],i[0]);return a=[["M",i[0].x,i[0].y],["L",i[1].x,i[1].y],s,["L",i[3].x,i[3].y],["L",i[2].x,i[2].y],l,["Z"]],a=this.parsePath(a),t.fill=t.stroke,r.addShape("path",{attrs:(0,d.__assign)((0,d.__assign)({},t),{path:a})})}},getMarker:function(e){return{symbol:"circle",style:{r:4.5,fill:e.color}}}});function k0(e,r){var t=No(e,r),i=[["M",e.x,e.y]];return i.push(t),i}jt("edge","smooth",{draw:function(e,r){var t=se(e,!0,!1,"lineWidth"),i=e.points,n=this.parsePath(k0(i[0],i[1]));return r.addShape("path",{attrs:(0,d.__assign)((0,d.__assign)({},t),{path:n})})},getMarker:function(e){return{symbol:"circle",style:{r:4.5,fill:e.color}}}});var qn=1/3;function B0(e,r){var t=[];t.push({x:e.x,y:e.y*(1-qn)+r.y*qn}),t.push({x:r.x,y:e.y*(1-qn)+r.y*qn}),t.push(r);var i=[["M",e.x,e.y]];return(0,c.each)(t,function(n){i.push(["L",n.x,n.y])}),i}jt("edge","vhv",{draw:function(e,r){var t=se(e,!0,!1,"lineWidth"),i=e.points,n=this.parsePath(B0(i[0],i[1]));return r.addShape("path",{attrs:(0,d.__assign)((0,d.__assign)({},t),{path:n})})},getMarker:function(e){return{symbol:"circle",style:{r:4.5,fill:e.color}}}}),jt("interval","funnel",{getPoints:function(e){return e.size=e.size*2,Do(e)},draw:function(e,r){var t=se(e,!1,!0),i=this.parsePath(Yu(e.points,e.nextPoints,!1)),n=r.addShape("path",{attrs:(0,d.__assign)((0,d.__assign)({},t),{path:i}),name:"interval"});return n},getMarker:function(e){var r=e.color;return{symbol:"square",style:{r:4,fill:r}}}}),jt("interval","hollow-rect",{draw:function(e,r){var t=se(e,!0,!1),i=r,n=e==null?void 0:e.background;if(n){i=r.addGroup();var a=Ru(e),o=Hu(e,this.parsePoints(e.points),this.coordinate);i.addShape("path",{attrs:(0,d.__assign)((0,d.__assign)({},a),{path:o}),zIndex:-1,name:Ao})}var s=this.parsePath(ko(e.points)),l=i.addShape("path",{attrs:(0,d.__assign)((0,d.__assign)({},t),{path:s}),name:"interval"});return n?i:l},getMarker:function(e){var r=e.color,t=e.isInPolar;return t?{symbol:"circle",style:{r:4.5,stroke:r,fill:null}}:{symbol:"square",style:{r:4,stroke:r,fill:null}}}});function R0(e){var r=e.x,t=e.y,i=e.y0;return(0,c.isArray)(t)?t.map(function(n,a){return{x:(0,c.isArray)(r)?r[a]:r,y:n}}):[{x:r,y:i},{x:r,y:t}]}jt("interval","line",{getPoints:function(e){return R0(e)},draw:function(e,r){var t=se(e,!0,!1,"lineWidth"),i=Me((0,d.__assign)({},t),["fill"]),n=this.parsePath(ko(e.points,!1)),a=r.addShape("path",{attrs:(0,d.__assign)((0,d.__assign)({},i),{path:n}),name:"interval"});return a},getMarker:function(e){var r=e.color;return{symbol:function(t,i,n){return[["M",t,i-n],["L",t,i+n]]},style:{r:5,stroke:r}}}}),jt("interval","pyramid",{getPoints:function(e){return e.size=e.size*2,Do(e)},draw:function(e,r){var t=se(e,!1,!0),i=this.parsePath(Yu(e.points,e.nextPoints,!0)),n=r.addShape("path",{attrs:(0,d.__assign)((0,d.__assign)({},t),{path:i}),name:"interval"});return n},getMarker:function(e){var r=e.color;return{symbol:"square",style:{r:4,fill:r}}}});function N0(e){var r,t=e.x,i=e.y,n=e.y0,a=e.size,o,s;(0,c.isArray)(i)?(r=(0,d.__read)(i,2),o=r[0],s=r[1]):(o=n,s=i);var l=t+a/2,u=t-a/2;return[{x:t,y:o},{x:t,y:s},{x:u,y:o},{x:l,y:o},{x:u,y:s},{x:l,y:s}]}function z0(e){return[["M",e[0].x,e[0].y],["L",e[1].x,e[1].y],["M",e[2].x,e[2].y],["L",e[3].x,e[3].y],["M",e[4].x,e[4].y],["L",e[5].x,e[5].y]]}jt("interval","tick",{getPoints:function(e){return N0(e)},draw:function(e,r){var t=se(e,!0,!1),i=this.parsePath(z0(e.points)),n=r.addShape("path",{attrs:(0,d.__assign)((0,d.__assign)({},t),{path:i}),name:"interval"});return n},getMarker:function(e){var r=e.color;return{symbol:function(t,i,n){return[["M",t-n/2,i-n],["L",t+n/2,i-n],["M",t,i-n],["L",t,i+n],["M",t-n/2,i+n],["L",t+n/2,i+n]]},style:{r:5,stroke:r}}}});var V0=function(e,r,t){var i=e.x,n=e.y,a=r.x,o=r.y,s;switch(t){case"hv":s=[{x:a,y:n}];break;case"vh":s=[{x:i,y:o}];break;case"hvh":var l=(a+i)/2;s=[{x:l,y:n},{x:l,y:o}];break;case"vhv":var u=(n+o)/2;s=[{x:i,y:u},{x:a,y:u}];break;default:break}return s};function G0(e,r){var t=[];return(0,c.each)(e,function(i,n){var a=e[n+1];if(t.push(i),a){var o=V0(i,a,r);t=t.concat(o)}}),t}function W0(e){return e.map(function(r,t){return t===0?["M",r.x,r.y]:["L",r.x,r.y]})}function H0(e,r){var t=Zn(e.points,e.connectNulls,e.showSinglePoint),i=[];return(0,c.each)(t,function(n){var a=G0(n,r);i=i.concat(W0(a))}),(0,d.__assign)((0,d.__assign)({},se(e,!0,!1,"lineWidth")),{path:i})}(0,c.each)(["hv","vh","hvh","vhv"],function(e){jt("line",e,{draw:function(r,t){var i=H0(r,e),n=t.addShape({type:"path",attrs:i,name:"line"});return n},getMarker:function(r){return Nu(r,e)}})}),(0,c.each)(b0,function(e){jt("point",e,{draw:function(r,t){return Ro(this,r,t,e,!0)},getMarker:function(r){var t=r.color;return{symbol:zr[e],style:{r:4.5,stroke:t,fill:null}}}})}),jt("point","image",{draw:function(e,r){var t,i,n=se(e,!1,!1,"r").r,a=this.parsePoints(e.points),o=a[0];if(e.isStack)o=a[1];else if(a.length>1){var s=r.addGroup();try{for(var l=(0,d.__values)(a),u=l.next();!u.done;u=l.next()){var h=u.value;s.addShape("image",{attrs:{x:h.x-n/2,y:h.y-n,width:n,height:n,img:e.shape[1]}})}}catch(f){t={error:f}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(t)throw t.error}}return s}return r.addShape("image",{attrs:{x:o.x-n/2,y:o.y-n,width:n,height:n,img:e.shape[1]}})},getMarker:function(e){var r=e.color;return{symbol:"circle",style:{r:4.5,fill:r}}}}),(0,c.each)(Xu,function(e){jt("point",e,{draw:function(r,t){return Ro(this,r,t,e,!1)},getMarker:function(r){var t=r.color;return{symbol:zr[e]||e,style:{r:4.5,fill:t}}}})});function ju(e){var r=(0,c.isArray)(e)?e:[e],t=r[0],i=r[r.length-1],n=r.length>1?r[1]:t,a=r.length>3?r[3]:i,o=r.length>2?r[2]:n;return{min:t,max:i,min1:n,max1:a,median:o}}function Uu(e,r,t){var i=t/2,n;if((0,c.isArray)(r)){var a=ju(r),o=a.min,s=a.max,l=a.median,u=a.min1,h=a.max1,f=e-i,v=e+i;n=[[f,s],[v,s],[e,s],[e,h],[f,u],[f,h],[v,h],[v,u],[e,u],[e,o],[f,o],[v,o],[f,l],[v,l]]}else{r=(0,c.isNil)(r)?.5:r;var g=ju(e),o=g.min,s=g.max,l=g.median,u=g.min1,h=g.max1,p=r-i,y=r+i;n=[[o,p],[o,y],[o,r],[u,r],[u,p],[u,y],[h,y],[h,p],[h,r],[s,r],[s,p],[s,y],[l,p],[l,y]]}return n.map(function(m){return{x:m[0],y:m[1]}})}function Y0(e){return[["M",e[0].x,e[0].y],["L",e[1].x,e[1].y],["M",e[2].x,e[2].y],["L",e[3].x,e[3].y],["M",e[4].x,e[4].y],["L",e[5].x,e[5].y],["L",e[6].x,e[6].y],["L",e[7].x,e[7].y],["L",e[4].x,e[4].y],["Z"],["M",e[8].x,e[8].y],["L",e[9].x,e[9].y],["M",e[10].x,e[10].y],["L",e[11].x,e[11].y],["M",e[12].x,e[12].y],["L",e[13].x,e[13].y]]}jt("schema","box",{getPoints:function(e){var r=e.x,t=e.y,i=e.size;return Uu(r,t,i)},draw:function(e,r){var t=se(e,!0,!1),i=this.parsePath(Y0(e.points)),n=r.addShape("path",{attrs:(0,d.__assign)((0,d.__assign)({},t),{path:i,name:"schema"})});return n},getMarker:function(e){var r=e.color;return{symbol:function(t,i,n){var a=[i-6,i-3,i,i+3,i+6],o=Uu(t,a,n);return[["M",o[0].x+1,o[0].y],["L",o[1].x-1,o[1].y],["M",o[2].x,o[2].y],["L",o[3].x,o[3].y],["M",o[4].x,o[4].y],["L",o[5].x,o[5].y],["L",o[6].x,o[6].y],["L",o[7].x,o[7].y],["L",o[4].x,o[4].y],["Z"],["M",o[8].x,o[8].y],["L",o[9].x,o[9].y],["M",o[10].x+1,o[10].y],["L",o[11].x-1,o[11].y],["M",o[12].x,o[12].y],["L",o[13].x,o[13].y]]},style:{r:6,lineWidth:1,stroke:r}}}});function X0(e){var r=(0,c.isArray)(e)?e:[e],t=r.sort(function(i,n){return n-i});return xp(t,4,t[t.length-1])}function Zu(e,r,t){var i=X0(r);return[{x:e,y:i[0]},{x:e,y:i[1]},{x:e-t/2,y:i[2]},{x:e-t/2,y:i[1]},{x:e+t/2,y:i[1]},{x:e+t/2,y:i[2]},{x:e,y:i[2]},{x:e,y:i[3]}]}function j0(e){return[["M",e[0].x,e[0].y],["L",e[1].x,e[1].y],["M",e[2].x,e[2].y],["L",e[3].x,e[3].y],["L",e[4].x,e[4].y],["L",e[5].x,e[5].y],["Z"],["M",e[6].x,e[6].y],["L",e[7].x,e[7].y]]}jt("schema","candle",{getPoints:function(e){var r=e.x,t=e.y,i=e.size;return Zu(r,t,i)},draw:function(e,r){var t=se(e,!0,!0),i=this.parsePath(j0(e.points)),n=r.addShape("path",{attrs:(0,d.__assign)((0,d.__assign)({},t),{path:i,name:"schema"})});return n},getMarker:function(e){var r=e.color;return{symbol:function(t,i,n){var a=[i+7.5,i+3,i-3,i-7.5],o=Zu(t,a,n);return[["M",o[0].x,o[0].y],["L",o[1].x,o[1].y],["M",o[2].x,o[2].y],["L",o[3].x,o[3].y],["L",o[4].x,o[4].y],["L",o[5].x,o[5].y],["Z"],["M",o[6].x,o[6].y],["L",o[7].x,o[7].y]]},style:{lineWidth:1,stroke:r,fill:r,r:6}}}});function U0(e,r){var t=Math.abs(e[0].x-e[2].x),i=Math.abs(e[0].y-e[2].y),n=Math.min(t,i);r&&(n=(0,c.clamp)(r,0,Math.min(t,i))),n=n/2;var a=(e[0].x+e[2].x)/2,o=(e[0].y+e[2].y)/2;return{x:a-n,y:o-n,width:n*2,height:n*2}}jt("polygon","square",{draw:function(e,r){if(!(0,c.isEmpty)(e.points)){var t=se(e,!0,!0),i=this.parsePoints(e.points);return r.addShape("rect",{attrs:(0,d.__assign)((0,d.__assign)({},t),U0(i,e.size)),name:"polygon"})}},getMarker:function(e){var r=e.color;return{symbol:"square",style:{r:4,fill:r}}}}),jt("violin","smooth",{draw:function(e,r){var t=se(e,!0,!0),i=this.parsePath(Bu(e.points));return r.addShape("path",{attrs:(0,d.__assign)((0,d.__assign)({},t),{path:i})})},getMarker:function(e){var r=e.color;return{symbol:"circle",style:{stroke:null,r:4,fill:r}}}}),jt("violin","hollow",{draw:function(e,r){var t=se(e,!0,!1),i=this.parsePath(ku(e.points));return r.addShape("path",{attrs:(0,d.__assign)((0,d.__assign)({},t),{path:i})})},getMarker:function(e){var r=e.color;return{symbol:"circle",style:{r:4,fill:null,stroke:r}}}}),jt("violin","hollow-smooth",{draw:function(e,r){var t=se(e,!0,!1),i=this.parsePath(Bu(e.points));return r.addShape("path",{attrs:(0,d.__assign)((0,d.__assign)({},t),{path:i})})},getMarker:function(e){var r=e.color;return{symbol:"circle",style:{r:4,fill:null,stroke:r}}}});var Z0=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getLabelValueDir=function(t){var i="y",n=t.points;return n[0][i]<=n[2][i]?1:-1},r.prototype.getLabelOffsetPoint=function(t,i,n,a){var o,s=e.prototype.getLabelOffsetPoint.call(this,t,i,n),l=this.getCoordinate(),u=l.isTransposed,h=u?"x":"y",f=this.getLabelValueDir(t.mappingData);return s=(0,d.__assign)((0,d.__assign)({},s),(o={},o[h]=s[h]*f,o)),l.isReflect("x")&&(s=(0,d.__assign)((0,d.__assign)({},s),{x:s.x*-1})),l.isReflect("y")&&(s=(0,d.__assign)((0,d.__assign)({},s),{y:s.y*-1})),s},r.prototype.getThemedLabelCfg=function(t){var i=this.geometry,n=this.getDefaultLabelCfg(),a=i.theme;return(0,c.deepMix)({},n,a.labels,t.position==="middle"?{offset:0}:{},t)},r.prototype.setLabelPosition=function(t,i,n,a){var o=this.getCoordinate(),s=o.isTransposed,l=i.points,u=o.convert(l[0]),h=o.convert(l[2]),f=this.getLabelValueDir(i),v,g,p,y,m=(0,c.isArray)(i.shape)?i.shape[0]:i.shape;if(m==="funnel"||m==="pyramid"){var x=(0,c.get)(i,"nextPoints"),_=(0,c.get)(i,"points");if(x){var w=o.convert(_[0]),b=o.convert(_[1]),S=o.convert(x[0]),C=o.convert(x[1]);s?(v=Math.min(S.y,w.y),p=Math.max(S.y,w.y),g=(b.x+C.x)/2,y=(w.x+S.x)/2):(v=Math.min((b.y+C.y)/2,(w.y+S.y)/2),p=Math.max((b.y+C.y)/2,(w.y+S.y)/2),g=C.x,y=w.x)}else v=Math.min(h.y,u.y),p=Math.max(h.y,u.y),g=h.x,y=u.x}else v=Math.min(h.y,u.y),p=Math.max(h.y,u.y),g=h.x,y=u.x;switch(a){case"right":t.x=g,t.y=(v+p)/2,t.textAlign=(0,c.get)(t,"textAlign",f>0?"left":"right");break;case"left":t.x=y,t.y=(v+p)/2,t.textAlign=(0,c.get)(t,"textAlign",f>0?"left":"right");break;case"bottom":s&&(t.x=(g+y)/2),t.y=p,t.textAlign=(0,c.get)(t,"textAlign","center"),t.textBaseline=(0,c.get)(t,"textBaseline",f>0?"bottom":"top");break;case"middle":s&&(t.x=(g+y)/2),t.y=(v+p)/2,t.textAlign=(0,c.get)(t,"textAlign","center"),t.textBaseline=(0,c.get)(t,"textBaseline","middle");break;case"top":s&&(t.x=(g+y)/2),t.y=v,t.textAlign=(0,c.get)(t,"textAlign","center"),t.textBaseline=(0,c.get)(t,"textBaseline",f>0?"bottom":"top");break;default:break}},r}(Un),K0=Z0,$n=Math.PI/2,q0=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getLabelOffset=function(t){var i=this.getCoordinate(),n=0;if((0,c.isNumber)(t))n=t;else if((0,c.isString)(t)&&t.indexOf("%")!==-1){var a=i.getRadius();i.innerRadius>0&&(a=a*(1-i.innerRadius)),n=parseFloat(t)*.01*a}return n},r.prototype.getLabelItems=function(t){var i=e.prototype.getLabelItems.call(this,t),n=this.geometry.getYScale();return(0,c.map)(i,function(a){if(a&&n){var o=n.scale((0,c.get)(a.data,n.field));return(0,d.__assign)((0,d.__assign)({},a),{percent:o})}return a})},r.prototype.getLabelAlign=function(t){var i=this.getCoordinate(),n;if(t.labelEmit)n=t.angle<=Math.PI/2&&t.angle>=-Math.PI/2?"left":"right";else if(!i.isTransposed)n="center";else{var a=i.getCenter(),o=t.offset;Math.abs(t.x-a.x)<1?n="center":t.angle>Math.PI||t.angle<=0?n=o>0?"left":"right":n=o>0?"right":"left"}return n},r.prototype.getLabelPoint=function(t,i,n){var a=1,o,s=t.content[n];this.isToMiddle(i)?o=this.getMiddlePoint(i.points):(t.content.length===1&&n===0?n=1:n===0&&(a=-1),o=this.getArcPoint(i,n));var l=t.offset*a,u=this.getPointAngle(o),h=t.labelEmit,f=this.getCirclePoint(u,l,o,h);return f.r===0?f.content="":(f.content=s,f.angle=u,f.color=i.color),f.rotate=t.autoRotate?this.getLabelRotate(u,l,h):t.rotate,f.start={x:o.x,y:o.y},f},r.prototype.getArcPoint=function(t,i){return i===void 0&&(i=0),!(0,c.isArray)(t.x)&&!(0,c.isArray)(t.y)?{x:t.x,y:t.y}:{x:(0,c.isArray)(t.x)?t.x[i]:t.x,y:(0,c.isArray)(t.y)?t.y[i]:t.y}},r.prototype.getPointAngle=function(t){return ai(this.getCoordinate(),t)},r.prototype.getCirclePoint=function(t,i,n,a){var o=this.getCoordinate(),s=o.getCenter(),l=Bn(o,n);if(l===0)return(0,d.__assign)((0,d.__assign)({},s),{r:l});var u=t;if(o.isTransposed&&l>i&&!a){var h=Math.asin(i/(2*l));u=t+h*2}else l=l+i;return{x:s.x+l*Math.cos(u),y:s.y+l*Math.sin(u),r:l}},r.prototype.getLabelRotate=function(t,i,n){var a=t+$n;return n&&(a-=$n),a&&(a>$n?a=a-Math.PI:a<-$n&&(a=a+Math.PI)),a},r.prototype.getMiddlePoint=function(t){var i=this.getCoordinate(),n=t.length,a={x:0,y:0};return(0,c.each)(t,function(o){a.x+=o.x,a.y+=o.y}),a.x/=n,a.y/=n,a=i.convert(a),a},r.prototype.isToMiddle=function(t){return t.x.length>2},r}(Un),Ku=q0,$0=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.defaultLayout="distribute",t}return r.prototype.getDefaultLabelCfg=function(t,i){var n=e.prototype.getDefaultLabelCfg.call(this,t,i);return(0,c.deepMix)({},n,(0,c.get)(this.geometry.theme,"pieLabels",{}))},r.prototype.getLabelOffset=function(t){return e.prototype.getLabelOffset.call(this,t)||0},r.prototype.getLabelRotate=function(t,i,n){var a;return i<0&&(a=t,a>Math.PI/2&&(a=a-Math.PI),a<-Math.PI/2&&(a=a+Math.PI)),a},r.prototype.getLabelAlign=function(t){var i=this.getCoordinate(),n=i.getCenter(),a;return t.angle<=Math.PI/2&&t.x>=n.x?a="left":a="right",t.offset<=0&&(a==="right"?a="left":a="right"),a},r.prototype.getArcPoint=function(t){return t},r.prototype.getPointAngle=function(t){var i=this.getCoordinate(),n={x:(0,c.isArray)(t.x)?t.x[0]:t.x,y:t.y[0]},a={x:(0,c.isArray)(t.x)?t.x[1]:t.x,y:t.y[1]},o,s=ai(i,n);if(t.points&&t.points[0].y===t.points[1].y)o=s;else{var l=ai(i,a);s>=l&&(l=l+Math.PI*2),o=s+(l-s)/2}return o},r.prototype.getCirclePoint=function(t,i){var n=this.getCoordinate(),a=n.getCenter(),o=n.getRadius()+i;return(0,d.__assign)((0,d.__assign)({},le(a.x,a.y,o,t)),{angle:t,r:o})},r}(Ku),Q0=$0,qu=4;function J0(e,r,t,i,n,a){var o,s,l=!0,u=i.start,h=i.end,f=Math.min(u.y,h.y),v=Math.abs(u.y-h.y),g,p=0,y=Number.MIN_VALUE,m=r.map(function(M){return M.y>p&&(p=M.y),M.y<y&&(y=M.y),{size:t,targets:[M.y-f]}});for(y-=f,p-f>v&&(v=p-f);l;)for(m.forEach(function(M){var L=(Math.min.apply(y,M.targets)+Math.max.apply(y,M.targets))/2;M.pos=Math.min(Math.max(y,L-M.size/2),v-M.size)}),l=!1,g=m.length;g--;)if(g>0){var x=m[g-1],_=m[g];x.pos+x.size>_.pos&&(x.size+=_.size,x.targets=x.targets.concat(_.targets),x.pos+x.size>v&&(x.pos=v-x.size),m.splice(g,1),l=!0)}g=0,m.forEach(function(M){var L=f+t/2;M.targets.forEach(function(){r[g].y=M.pos+L,L+=t,g++})});var w={};try{for(var b=(0,d.__values)(e),S=b.next();!S.done;S=b.next()){var C=S.value;w[C.get("id")]=C}}catch(M){o={error:M}}finally{try{S&&!S.done&&(s=b.return)&&s.call(b)}finally{if(o)throw o.error}}r.forEach(function(M){var L=M.r*M.r,B=Math.pow(Math.abs(M.y-n.y),2);if(L<B)M.x=n.x;else{var I=Math.sqrt(L-B);a?M.x=n.x+I:M.x=n.x-I}var G=w[M.id];G.attr("x",M.x),G.attr("y",M.y);var q=(0,c.find)(G.getChildren(),function(ft){return ft.get("type")==="text"});q&&(q.attr("y",M.y),q.attr("x",M.x))})}function tm(e,r,t,i){if(!(!e.length||!r.length)){var n=e[0]?e[0].offset:0,a=r[0].get("coordinate"),o=a.getRadius(),s=a.getCenter();if(n>0){var l=14,u=o+n,h=u*2+l*2,f={start:a.start,end:a.end},v=[[],[]];e.forEach(function(g){!g||(g.textAlign==="right"?v[0].push(g):v[1].push(g))}),v.forEach(function(g,p){var y=h/l;g.length>y&&(g.sort(function(m,x){return x["..percent"]-m["..percent"]}),g.splice(y,g.length-y)),g.sort(function(m,x){return m.y-x.y}),J0(r,g,l,f,s,p)})}(0,c.each)(e,function(g){if(g&&g.labelLine){var p=g.offset,y=g.angle,m=le(s.x,s.y,o,y),x=le(s.x,s.y,o+p/2,y),_=g.x+(0,c.get)(g,"offsetX",0),w=g.y+(0,c.get)(g,"offsetY",0),b={x:_-Math.cos(y)*qu,y:w-Math.sin(y)*qu};(0,c.isObject)(g.labelLine)||(g.labelLine={}),g.labelLine.path=["M ".concat(m.x),"".concat(m.y," Q").concat(x.x),"".concat(x.y," ").concat(b.x),b.y].join(",")}})}}function $u(e,r,t){var i=e.filter(function(p){return!p.invisible});i.sort(function(p,y){return p.y-y.y});var n=!0,a=t.minY,o=t.maxY,s=Math.abs(a-o),l,u=0,h=Number.MIN_VALUE,f=i.map(function(p){return p.y>u&&(u=p.y),p.y<h&&(h=p.y),{content:p.content,size:r,targets:[p.y-a],pos:null}});for(h-=a,u-a>s&&(s=u-a);n;)for(f.forEach(function(p){var y=(Math.min.apply(h,p.targets)+Math.max.apply(h,p.targets))/2;p.pos=Math.min(Math.max(h,y-p.size/2),s-p.size),p.pos=Math.max(0,p.pos)}),n=!1,l=f.length;l--;)if(l>0){var v=f[l-1],g=f[l];v.pos+v.size>g.pos&&(v.size+=g.size,v.targets=v.targets.concat(g.targets),v.pos+v.size>s&&(v.pos=s-v.size),f.splice(l,1),n=!0)}l=0,f.forEach(function(p){var y=a+r/2;p.targets.forEach(function(){i[l].y=p.pos+y,y+=r,l++})})}var Qu=4;function em(e,r){var t=r.getCenter(),i=r.getRadius();if(e&&e.labelLine){var n=e.angle,a=e.offset,o=le(t.x,t.y,i,n),s=e.x+(0,c.get)(e,"offsetX",0)*(Math.cos(n)>0?1:-1),l=e.y+(0,c.get)(e,"offsetY",0)*(Math.sin(n)>0?1:-1),u={x:s-Math.cos(n)*Qu,y:l-Math.sin(n)*Qu},h=e.labelLine.smooth,f=[],v=u.x-t.x,g=u.y-t.y,p=Math.atan(g/v);if(v<0&&(p+=Math.PI),h===!1){(0,c.isObject)(e.labelLine)||(e.labelLine={});var y=0;(n<0&&n>-Math.PI/2||n>Math.PI*1.5)&&u.y>o.y&&(y=1),n>=0&&n<Math.PI/2&&u.y>o.y&&(y=1),n>=Math.PI/2&&n<Math.PI&&o.y>u.y&&(y=1),(n<-Math.PI/2||n>=Math.PI&&n<Math.PI*1.5)&&o.y>u.y&&(y=1);var m=a/2>4?4:Math.max(a/2-1,0),x=le(t.x,t.y,i+m,n),_=le(t.x,t.y,i+a/2,p),w=0;f.push("M ".concat(o.x," ").concat(o.y)),f.push("L ".concat(x.x," ").concat(x.y)),f.push("A ".concat(t.x," ").concat(t.y," 0 ").concat(w," ").concat(y," ").concat(_.x," ").concat(_.y)),f.push("L ".concat(u.x," ").concat(u.y))}else{var x=le(t.x,t.y,i+(a/2>4?4:Math.max(a/2-1,0)),n),b=o.x<t.x?1:-1;f.push("M ".concat(u.x," ").concat(u.y));var S=(o.y-t.y)/(o.x-t.x),C=(u.y-t.y)/(u.x-t.x);Math.abs(S-C)>Math.pow(Math.E,-16)&&f.push.apply(f,["C",u.x+b*4,u.y,2*x.x-o.x,2*x.y-o.y,o.x,o.y]),f.push("L ".concat(o.x," ").concat(o.y))}e.labelLine.path=f.join(" ")}}function rm(e,r,t,i){var n,a,o=(0,c.filter)(e,function(L){return!(0,c.isNil)(L)}),s=r[0]&&r[0].get("coordinate");if(!!s){var l=s.getCenter(),u=s.getRadius(),h={};try{for(var f=(0,d.__values)(r),v=f.next();!v.done;v=f.next()){var g=v.value;h[g.get("id")]=g}}catch(L){n={error:L}}finally{try{v&&!v.done&&(a=f.return)&&a.call(f)}finally{if(n)throw n.error}}var p=(0,c.get)(o[0],"labelHeight",14),y=(0,c.get)(o[0],"offset",0);if(!(y<=0)){var m="left",x="right",_=(0,c.groupBy)(o,function(L){return L.x<l.x?m:x}),w=s.start,b=s.end,S=Math.min((u+y+p)*2,s.getHeight()),C=S/2,M={minX:w.x,maxX:b.x,minY:l.y-C,maxY:l.y+C};(0,c.each)(_,function(L,B){var I=Math.floor(S/p);L.length>I&&(L.sort(function(G,q){return q.percent-G.percent}),(0,c.each)(L,function(G,q){q+1>I&&(h[G.id].set("visible",!1),G.invisible=!0)})),$u(L,p,M)}),(0,c.each)(_,function(L,B){(0,c.each)(L,function(I){var G=B===x,q=h[I.id],ft=q.getChildByIndex(0);if(ft){var mt=u+y,zt=I.y-l.y,H=Math.pow(mt,2),tt=Math.pow(zt,2),ct=H-tt>0?H-tt:0,nt=Math.sqrt(ct),lt=Math.abs(Math.cos(I.angle)*mt);G?I.x=l.x+Math.max(nt,lt):I.x=l.x-Math.max(nt,lt)}ft&&(ft.attr("y",I.y),ft.attr("x",I.x)),em(I,s)})})}}}var Vo=4,im=4,Ju=4;function nm(e,r,t){var i=r.getCenter(),n=r.getRadius(),a={x:e.x-(t?Ju:-Ju),y:e.y},o=le(i.x,i.y,n+Vo,e.angle),s={x:a.x,y:a.y},l={x:o.x,y:o.y},u=le(i.x,i.y,n,e.angle),h="";if(a.y!==o.y){var f=t?4:-4;s.y=a.y,e.angle<0&&e.angle>=-Math.PI/2&&(s.x=Math.max(o.x,a.x-f),a.y<o.y?l.y=s.y:(l.y=o.y,l.x=Math.max(l.x,s.x-f))),e.angle>0&&e.angle<Math.PI/2&&(s.x=Math.max(o.x,a.x-f),a.y>o.y?l.y=s.y:(l.y=o.y,l.x=Math.max(l.x,s.x-f))),e.angle>Math.PI/2&&(s.x=Math.min(o.x,a.x-f),a.y>o.y?l.y=s.y:(l.y=o.y,l.x=Math.min(l.x,s.x-f))),e.angle<-Math.PI/2&&(s.x=Math.min(o.x,a.x-f),a.y<o.y?l.y=s.y:(l.y=o.y,l.x=Math.min(l.x,s.x-f)))}h=["M ".concat(a.x,",").concat(a.y),"L ".concat(s.x,",").concat(s.y),"L ".concat(l.x,",").concat(l.y),"L ".concat(o.x,",").concat(o.y),"L ".concat(u.x,",").concat(u.y)].join(" "),e.labelLine=(0,c.deepMix)({},e.labelLine,{path:h})}function am(e,r,t,i){var n,a,o=r[0]&&r[0].get("coordinate");if(!!o){var s=o.getCenter(),l=o.getRadius(),u={};try{for(var h=(0,d.__values)(r),f=h.next();!f.done;f=h.next()){var v=f.value;u[v.get("id")]=v}}catch(L){n={error:L}}finally{try{f&&!f.done&&(a=h.return)&&a.call(h)}finally{if(n)throw n.error}}var g=(0,c.get)(e[0],"labelHeight",14),p=Math.max((0,c.get)(e[0],"offset",0),Vo);(0,c.each)(e,function(L){if(!!L){var B=(0,c.get)(u,[L.id]);if(!!B){var I=L.x>s.x||L.x===s.x&&L.y>s.y,G=(0,c.isNil)(L.offsetX)?im:L.offsetX,q=le(s.x,s.y,l+Vo,L.angle),ft=p+G;L.x=s.x+(I?1:-1)*(l+ft),L.y=q.y}}});var y=o.start,m=o.end,x="left",_="right",w=(0,c.groupBy)(e,function(L){return L.x<s.x?x:_}),b=(l+p)*2+g;(0,c.each)(w,function(L){var B=L.length*g;B>b&&(b=Math.min(B,Math.abs(y.y-m.y)))});var S={minX:y.x,maxX:m.x,minY:s.y-b/2,maxY:s.y+b/2};(0,c.each)(w,function(L,B){var I=b/g;L.length>I&&(L.sort(function(G,q){return q.percent-G.percent}),(0,c.each)(L,function(G,q){q>I&&(u[G.id].set("visible",!1),G.invisible=!0)})),$u(L,g,S)});var C=S.minY,M=S.maxY;(0,c.each)(w,function(L,B){var I=B===_;(0,c.each)(L,function(G){var q=(0,c.get)(u,G&&[G.id]);if(!!q){if(G.y<C||G.y>M){q.set("visible",!1);return}var ft=q.getChildByIndex(0),mt=ft.getCanvasBBox(),zt={x:I?mt.x:mt.maxX,y:mt.y+mt.height/2};Qi(ft,G.x-zt.x,G.y-zt.y),G.labelLine&&nm(G,o,I)}})})}}function om(e,r,t,i){(0,c.each)(r,function(n){var a=i.minX,o=i.minY,s=i.maxX,l=i.maxY,u=n.getCanvasBBox(),h=u.minX,f=u.minY,v=u.maxX,g=u.maxY,p=u.x,y=u.y,m=u.width,x=u.height,_=p,w=y;(h<a||v<a)&&(_=a),(f<o||g<o)&&(w=o),h>s?_=s-m:v>s&&(_=_-(v-s)),f>l?w=l-x:g>l&&(w=w-(g-l)),(_!==p||w!==y)&&Qi(n,_-p,w-y)})}function sm(e,r,t,i){(0,c.each)(r,function(n,a){var o=n.getCanvasBBox(),s=t[a].getBBox();(o.minX<s.minX||o.minY<s.minY||o.maxX>s.maxX||o.maxY>s.maxY)&&n.remove(!0)})}var lm=100,tc=function(){function e(r){r===void 0&&(r={}),this.bitmap={};var t=r.xGap,i=t===void 0?1:t,n=r.yGap,a=n===void 0?8:n;this.xGap=i,this.yGap=a}return e.prototype.hasGap=function(r){for(var t=!0,i=this.bitmap,n=Math.round(r.minX),a=Math.round(r.maxX),o=Math.round(r.minY),s=Math.round(r.maxY),l=n;l<=a;l+=1){if(!i[l]){i[l]={};continue}if(l===n||l===a){for(var u=o;u<=s;u++)if(i[l][u]){t=!1;break}}else if(i[l][o]||i[l][s]){t=!1;break}}return t},e.prototype.fillGap=function(r){for(var t=this.bitmap,i=Math.round(r.minX),n=Math.round(r.maxX),a=Math.round(r.minY),o=Math.round(r.maxY),s=i;s<=n;s+=1)t[s]||(t[s]={});for(var s=i;s<=n;s+=this.xGap){for(var l=a;l<=o;l+=this.yGap)t[s][l]=!0;t[s][o]=!0}if(this.yGap!==1)for(var s=a;s<=o;s+=1)t[i][s]=!0,t[n][s]=!0;if(this.xGap!==1)for(var s=i;s<=n;s+=1)t[s][a]=!0,t[s][o]=!0},e.prototype.destroy=function(){this.bitmap={}},e}();function um(e,r,t){t===void 0&&(t=lm);var i=-1,n=e.attr(),a=n.x,o=n.y,s=e.getCanvasBBox(),l=Math.sqrt(s.width*s.width+s.height*s.height),u,h=-i,f=0,v=0,g=function(x){var _=x*.1;return[_*Math.cos(_),_*Math.sin(_)]};if(r.hasGap(s))return r.fillGap(s),!0;for(var p=!1,y=0,m={};Math.min(Math.abs(f),Math.abs(v))<l&&y<t;)if(u=g(h+=i),f=~~u[0],v=~~u[1],!(!f&&!v||m["".concat(f,"-").concat(v)])&&(e.attr({x:a+f,y:o+v}),f+v<0&&e.attr("textAlign","right"),y++,r.hasGap(e.getCanvasBBox()))){r.fillGap(e.getCanvasBBox()),p=!0,m["".concat(f,"-").concat(v)]=!0;break}return p}function cm(e,r,t,i){var n=e.getCanvasBBox(),a=n.width,o=n.height,s={x:r,y:t,textAlign:"center"};switch(i){case 0:s.y-=o+1,s.x+=1,s.textAlign="left";break;case 1:s.y-=o+1,s.x-=1,s.textAlign="right";break;case 2:s.y+=o+1,s.x-=1,s.textAlign="right";break;case 3:s.y+=o+1,s.x+=1,s.textAlign="left";break;case 5:s.y-=o*2+2;break;case 6:s.y+=o*2+2;break;case 7:s.x+=a+1,s.textAlign="left";break;case 8:s.x-=a+1,s.textAlign="right";break;default:break}return e.attr(s),e.getCanvasBBox()}function hm(e,r,t,i){var n=new tc;(0,c.each)(r,function(a){var o=a.find(function(s){return s.get("type")==="text"});um(o,n)||a.remove(!0)}),n.destroy()}function fm(e,r,t,i){var n=new tc;(0,c.each)(r,function(a){for(var o=a.find(function(g){return g.get("type")==="text"}),s=o.attr(),l=s.x,u=s.y,h=!1,f=0;f<=8;f++){var v=cm(o,l,u,f);if(n.hasGap(v)){n.fillGap(v),h=!0;break}}h||a.remove(!0)}),n.destroy()}function vm(e,r){return(e[0]||0)*(r[0]||0)+(e[1]||0)*(r[1]||0)+(e[2]||0)*(r[2]||0)}function ec(e){if(e.length>4)return[];var r=function(n,a){return[a.x-n.x,a.y-n.y]},t=r(e[0],e[1]),i=r(e[1],e[2]);return[t,i]}function Qn(e,r,t){r===void 0&&(r=0),t===void 0&&(t={x:0,y:0});var i=e.x,n=e.y;return{x:(i-t.x)*Math.cos(-r)+(n-t.y)*Math.sin(-r)+t.x,y:(t.x-i)*Math.sin(-r)+(n-t.y)*Math.cos(-r)+t.y}}function rc(e){var r=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}],t=e.rotation;return t?[Qn(r[0],t,r[0]),Qn(r[1],t,r[0]),Qn(r[2],t,r[0]),Qn(r[3],t,r[0])]:r}function ic(e,r){if(e.length>4)return{min:0,max:0};var t=[];return e.forEach(function(i){t.push(vm([i.x,i.y],r))}),{min:Math.min.apply(Math,(0,d.__spreadArray)([],(0,d.__read)(t),!1)),max:Math.max.apply(Math,(0,d.__spreadArray)([],(0,d.__read)(t),!1))}}function dm(e,r){return e.max>r.min&&e.min<r.max}function gm(e){return typeof e=="number"&&!Number.isNaN(e)&&e!==Infinity&&e!==-Infinity}function nc(e){return["x","y","width","height"].every(function(r){return gm(e[r])})}function pm(e,r,t){return t===void 0&&(t=0),!(r.x>e.x+e.width+t||r.x+r.width<e.x-t||r.y>e.y+e.height+t||r.y+r.height<e.y-t)}function ym(e,r,t){if(t===void 0&&(t=0),!nc(e)||!nc(r))return!1;if(!e.rotation&&!r.rotation)return pm(e,r,t);for(var i=rc(e),n=rc(r),a=ec(i).concat(ec(n)),o=0;o<a.length;o++){var s=a[o],l=ic(i,s),u=ic(n,s);if(!dm(l,u))return!1}return!0}function mm(e){if(typeof window!="undefined"){var r;try{r=new Blob([e.toString()],{type:"application/javascript"})}catch(t){r=new window.BlobBuilder,r.append(e.toString()),r=r.getBlob()}return new Worker(URL.createObjectURL(r))}}var xm=function(e){function r(){function u(w,b){return(w[0]||0)*(b[0]||0)+(w[1]||0)*(b[1]||0)+(w[2]||0)*(b[2]||0)}function h(w){if(w.length>4)return[];var b=function(M,L){return[L.x-M.x,L.y-M.y]},S=b(w[0],w[1]),C=b(w[1],w[2]);return[S,C]}function f(w,b,S){b===void 0&&(b=0),S===void 0&&(S={x:0,y:0});var C=w.x,M=w.y;return{x:(C-S.x)*Math.cos(-b)+(M-S.y)*Math.sin(-b)+S.x,y:(S.x-C)*Math.sin(-b)+(M-S.y)*Math.cos(-b)+S.y}}function v(w){var b=[{x:w.x,y:w.y},{x:w.x+w.width,y:w.y},{x:w.x+w.width,y:w.y+w.height},{x:w.x,y:w.y+w.height}],S=w.rotation;return S?[f(b[0],S,b[0]),f(b[1],S,b[0]),f(b[2],S,b[0]),f(b[3],S,b[0])]:b}function g(w,b){if(w.length>4)return{min:0,max:0};var S=[];return w.forEach(function(C){S.push(u([C.x,C.y],b))}),{min:Math.min.apply(null,S),max:Math.max.apply(null,S)}}function p(w,b){return w.max>b.min&&w.min<b.max}function y(w){return typeof w=="number"&&!Number.isNaN(w)&&w!==Infinity&&w!==-Infinity}function m(w){return["x","y","width","height"].every(function(b){return y(w[b])})}function x(w,b,S){return S===void 0&&(S=0),!(b.x>w.x+w.width+S||b.x+b.width<w.x-S||b.y>w.y+w.height+S||b.y+b.height<w.y-S)}function _(w,b,S){if(S===void 0&&(S=0),!m(w)||!m(b))return!1;if(!w.rotation&&!b.rotation)return x(w,b,S);for(var C=v(w),M=v(b),L=h(C).concat(h(M)),B=0;B<L.length;B++){var I=L[B],G=g(C,I),q=g(M,I);if(!p(G,q))return!1}return!0}return{intersect:_}}var t=r().intersect;function i(u){for(var h=u.slice(),f=0;f<h.length;f++){var v=h[f];if(v.visible)for(var g=f+1;g<h.length;g++){var p=h[g];v!==p&&p.visible&&t(v,p)&&(p.visible=!1)}}return h}var n={"hide-overlap":i};try{var a=JSON.parse(e.data);if(!a||!a.type||!n[a.type])return;var o=a.type,s=a.items,l=n[o](s);self.postMessage(l)}catch(u){throw u}},_m=`
  35. self.onmessage = `.concat(xm.toString(),`
  36. `),Go=function(e){for(var r=e.slice(),t=0;t<r.length;t++){var i=r[t];if(i.visible)for(var n=t+1;n<r.length;n++){var a=r[n];i!==a&&a.visible&&ym(i,a)&&(a.visible=!1)}}return r},Wo=new Map,Jn=mm(_m);function wm(e,r,t,i){return new Promise(function(n){var a=r.map(function(l,u){return(0,d.__assign)((0,d.__assign)({},Mu(l,e[u],(0,c.get)(e[u],"background.padding"))),{visible:!0})}),o=JSON.stringify(a),s=function(l){return Wo.set(o,l),(0,c.each)(l,function(u,h){var f=u.visible,v=r[h];f?v==null||v.show():v==null||v.hide()}),n(l)};if(Wo.get(o))s(Wo.get(o));else if(Jn)try{Jn.postMessage(JSON.stringify({type:"hide-overlap",items:a})),Jn.onmessage=function(l){return s(Array.isArray(l.data)?l.data:[])},Jn.onmessageerror=function(l){console.warn("[AntV G2] Web worker is not available"),s(Go(a))}}catch(l){console.error(l),s(Go(a))}else s(Go(a))})}var ac={"#5B8FF9":!0},bm=function(e){var r=yr.toRGB(e).toUpperCase();if(ac[r])return ac[r];var t=(0,d.__read)(yr.rgb2arr(r),3),i=t[0],n=t[1],a=t[2],o=(i*299+n*587+a*114)/1e3<128;return o};function Sm(e,r,t){if(t.length!==0){var i=t[0].get("element"),n=i.geometry.theme,a=n.labels||{},o=a.fillColorLight,s=a.fillColorDark;t.forEach(function(l,u){var h=r[u],f=h.find(function(x){return x.get("type")==="text"}),v=Ae.fromObject(l.getBBox()),g=Ae.fromObject(f.getCanvasBBox()),p=!v.contains(g),y=l.attr("fill"),m=bm(y);p?f.attr(n.overflowLabels.style):m?o&&f.attr("fill",o):s&&f.attr("fill",s)})}}function Cm(e,r,t){var i=e.coordinate,n=Sr(r),a=Ae.fromObject(n.getCanvasBBox()),o=Ae.fromObject(t.getBBox());return i.isTransposed?o.height>=a.height:o.width>=a.width}function Am(e,r,t){var i=!!e.getAdjust("stack");return i||r.every(function(n,a){var o=t[a];return Cm(e,n,o)})}function Fm(e,r,t){var i=e.coordinate,n=Ae.fromObject(t.getBBox()),a=Sr(r);i.isTransposed?a.attr({x:n.minX+n.width/2,textAlign:"center"}):a.attr({y:n.minY+n.height/2,textBaseline:"middle"})}function Em(e,r,t){var i;if(t.length!==0){var n=(i=t[0])===null||i===void 0?void 0:i.get("element"),a=n==null?void 0:n.geometry;if(!(!a||a.type!=="interval")){var o=Am(a,r,t);o&&t.forEach(function(s,l){var u=r[l];Fm(a,u,s)})}}}function Mm(e){var r=500,t=[],i=Math.max(Math.floor(e.length/r),1);return(0,c.each)(e,function(n,a){a%i==0?t.push(n):n.set("visible",!1)}),t}function Tm(e,r,t){var i;if(t.length!==0){var n=(i=t[0])===null||i===void 0?void 0:i.get("element"),a=n==null?void 0:n.geometry;if(!(!a||a.type!=="interval")){var o=Mm(r),s=(0,d.__read)(a.getXYFields(),1),l=s[0],u=[],h=[],f=(0,c.groupBy)(o,function(m){return m.get("data")[l]}),v=(0,c.uniq)((0,c.map)(o,function(m){return m.get("data")[l]})),g;o.forEach(function(m){m.set("visible",!0)});var p=function(m){m&&(m.length&&h.push(m.pop()),h.push.apply(h,(0,d.__spreadArray)([],(0,d.__read)(m),!1)))};for((0,c.size)(v)>0&&(g=v.shift(),p(f[g])),(0,c.size)(v)>0&&(g=v.pop(),p(f[g])),(0,c.each)(v.reverse(),function(m){p(f[m])});h.length>0;){var y=h.shift();y.get("visible")&&(Yy(y,u)?y.set("visible",!1):u.push(y))}}}}function Lm(e,r){var t=e.getXYFields()[1],i=[],n=r.sort(function(a,o){return a.get("data")[t]-a.get("data")[t]});return n.length>0&&i.push(n.shift()),n.length>0&&i.push(n.pop()),i.push.apply(i,(0,d.__spreadArray)([],(0,d.__read)(n),!1)),i}function oc(e,r,t){return e.some(function(i){return t(i,r)})}function Im(e,r,t){t===void 0&&(t=0);var i=Math.max(0,Math.min(e.x+e.width+t,r.x+r.width+t)-Math.max(e.x-t,r.x-t)),n=Math.max(0,Math.min(e.y+e.height+t,r.y+r.height+t)-Math.max(e.y-t,r.y-t));return i*n}function sc(e,r){return oc(e,r,function(t,i){var n=Sr(t),a=Sr(i);return Im(n.getCanvasBBox(),a.getCanvasBBox(),2)>0})}function Om(e,r,t,i,n){var a,o;if(t.length!==0){var s=(a=t[0])===null||a===void 0?void 0:a.get("element"),l=s==null?void 0:s.geometry;if(!(!l||l.type!=="point")){var u=(0,d.__read)(l.getXYFields(),2),h=u[0],f=u[1],v=(0,c.groupBy)(r,function(y){return y.get("data")[h]}),g=[],p=n&&n.offset||((o=e[0])===null||o===void 0?void 0:o.offset)||12;(0,c.map)((0,c.keys)(v).reverse(),function(y){for(var m=Lm(l,v[y]);m.length;){var x=m.shift(),_=Sr(x);if(oc(g,x,function(S,C){return S.get("data")[h]===C.get("data")[h]&&S.get("data")[f]===C.get("data")[f]})){_.set("visible",!1);continue}var w=sc(g,x),b=!1;if(w&&(_.attr("y",_.attr("y")+2*p),b=sc(g,x)),b){_.set("visible",!1);continue}g.push(x)}})}}}function Pm(e,r){var t=e.getXYFields()[1],i=[],n=r.sort(function(a,o){return a.get("data")[t]-a.get("data")[t]});return n.length>0&&i.push(n.shift()),n.length>0&&i.push(n.pop()),i.push.apply(i,(0,d.__spreadArray)([],(0,d.__read)(n),!1)),i}function lc(e,r,t){return e.some(function(i){return t(i,r)})}function Dm(e,r,t){t===void 0&&(t=0);var i=Math.max(0,Math.min(e.x+e.width+t,r.x+r.width+t)-Math.max(e.x-t,r.x-t)),n=Math.max(0,Math.min(e.y+e.height+t,r.y+r.height+t)-Math.max(e.y-t,r.y-t));return i*n}function uc(e,r){return lc(e,r,function(t,i){var n=Sr(t),a=Sr(i);return Dm(n.getCanvasBBox(),a.getCanvasBBox(),2)>0})}function km(e,r,t,i,n){var a,o;if(t.length!==0){var s=(a=t[0])===null||a===void 0?void 0:a.get("element"),l=s==null?void 0:s.geometry;if(!(!l||["path","line","area"].indexOf(l.type)<0)){var u=(0,d.__read)(l.getXYFields(),2),h=u[0],f=u[1],v=(0,c.groupBy)(r,function(y){return y.get("data")[h]}),g=[],p=n&&n.offset||((o=e[0])===null||o===void 0?void 0:o.offset)||12;(0,c.map)((0,c.keys)(v).reverse(),function(y){for(var m=Pm(l,v[y]);m.length;){var x=m.shift(),_=Sr(x);if(lc(g,x,function(S,C){return S.get("data")[h]===C.get("data")[h]&&S.get("data")[f]===C.get("data")[f]})){_.set("visible",!1);continue}var w=uc(g,x),b=!1;if(w&&(_.attr("y",_.attr("y")+2*p),b=uc(g,x)),b){_.set("visible",!1);continue}g.push(x)}})}}}var Ho;function Bm(){return Ho||(Ho=document.createElement("canvas").getContext("2d")),Ho}var ta=(0,c.memoize)(function(e,r){r===void 0&&(r={});var t=r.fontSize,i=r.fontFamily,n=r.fontWeight,a=r.fontStyle,o=r.fontVariant,s=Bm();return s.font=[a,o,n,"".concat(t,"px"),i].join(" "),s.measureText((0,c.isString)(e)?e:"").width},function(e,r){return r===void 0&&(r={}),(0,d.__spreadArray)([e],(0,d.__read)((0,c.values)(r)),!1).join("")}),Rm=function(e,r,t){var i=16,n=ta("...",t),a;(0,c.isString)(e)?a=e:a=(0,c.toString)(e);var o=r,s=[],l,u;if(ta(e,t)<=r)return e;for(;l=a.substr(0,i),u=ta(l,t),!(u+n>o&&u>o);)if(s.push(l),o-=u,a=a.substr(i),!a)return s.join("");for(;l=a.substr(0,1),u=ta(l,t),!(u+n>o);)if(s.push(l),o-=u,a=a.substr(1),!a)return s.join("");return"".concat(s.join(""),"...")};function Nm(e,r,t,i,n){if(!(r.length<=0)){var a=(n==null?void 0:n.direction)||["top","right","bottom","left"],o=(n==null?void 0:n.action)||"translate",s=(n==null?void 0:n.margin)||0,l=r[0].get("coordinate");if(!!l){var u=bp(l,s),h=u.minX,f=u.minY,v=u.maxX,g=u.maxY;(0,c.each)(r,function(p){var y=p.getCanvasBBox(),m=y.minX,x=y.minY,_=y.maxX,w=y.maxY,b=y.x,S=y.y,C=y.width,M=y.height,L=b,B=S;if(a.indexOf("left")>=0&&(m<h||_<h)&&(L=h),a.indexOf("top")>=0&&(x<f||w<f)&&(B=f),a.indexOf("right")>=0&&(m>v?L=v-C:_>v&&(L=L-(_-v))),a.indexOf("bottom")>=0&&(x>g?B=g-M:w>g&&(B=B-(w-g))),L!==b||B!==S){var I=L-b;if(o==="translate")Qi(p,I,B-S);else if(o==="ellipsis"){var G=p.findAll(function(q){return q.get("type")==="text"});G.forEach(function(q){var ft=(0,c.pick)(q.attr(),["fontSize","fontFamily","fontWeight","fontStyle","fontVariant"]),mt=q.getCanvasBBox(),zt=Rm(q.attr("text"),mt.width-Math.abs(I),ft);q.attr("text",zt)})}else p.hide()}})}}}function zm(e,r,t){var i={fillOpacity:(0,c.isNil)(e.attr("fillOpacity"))?1:e.attr("fillOpacity"),strokeOpacity:(0,c.isNil)(e.attr("strokeOpacity"))?1:e.attr("strokeOpacity"),opacity:(0,c.isNil)(e.attr("opacity"))?1:e.attr("opacity")};e.attr({fillOpacity:0,strokeOpacity:0,opacity:0}),e.animate(i,r)}function Vm(e,r,t){var i={fillOpacity:0,strokeOpacity:0,opacity:0},n=r.easing,a=r.duration,o=r.delay;e.animate(i,a,n,function(){e.remove(!0)},o)}function Gm(e,r,t){var i,n=(0,d.__read)(r,2),a=n[0],o=n[1];return e.applyToMatrix([a,o,1]),t==="x"?(e.setMatrix(te.vs(e.getMatrix(),[["t",-a,-o],["s",.01,1],["t",a,o]])),i=te.vs(e.getMatrix(),[["t",-a,-o],["s",100,1],["t",a,o]])):t==="y"?(e.setMatrix(te.vs(e.getMatrix(),[["t",-a,-o],["s",1,.01],["t",a,o]])),i=te.vs(e.getMatrix(),[["t",-a,-o],["s",1,100],["t",a,o]])):t==="xy"&&(e.setMatrix(te.vs(e.getMatrix(),[["t",-a,-o],["s",.01,.01],["t",a,o]])),i=te.vs(e.getMatrix(),[["t",-a,-o],["s",100,100],["t",a,o]])),i}function Yo(e,r,t,i,n){var a=t.start,o=t.end,s=t.getWidth(),l=t.getHeight(),u,h;n==="y"?(u=a.x+s/2,h=i.y<a.y?i.y:a.y):n==="x"?(u=i.x>a.x?i.x:a.x,h=a.y+l/2):n==="xy"&&(t.isPolar?(u=t.getCenter().x,h=t.getCenter().y):(u=(a.x+o.x)/2,h=(a.y+o.y)/2));var f=Gm(e,[u,h],n);e.animate({matrix:f},r)}function Wm(e,r,t){var i=t.coordinate,n=t.minYPoint;Yo(e,r,i,n,"x")}function Hm(e,r,t){var i=t.coordinate,n=t.minYPoint;Yo(e,r,i,n,"y")}function Ym(e,r,t){var i=t.coordinate,n=t.minYPoint;Yo(e,r,i,n,"xy")}function Xm(e,r,t){var i=e.getTotalLength();e.attr("lineDash",[i]),e.animate(function(n){return{lineDashOffset:(1-n)*i}},r)}function jm(e,r,t){var i=t.toAttrs,n=i.x,a=i.y;delete i.x,delete i.y,e.attr(i),e.animate({x:n,y:a},r)}function Um(e,r,t){var i=e.getBBox(),n=e.get("origin").mappingData,a=n.points,o=a[0].y-a[1].y>0?i.maxX:i.minX,s=(i.minY+i.maxY)/2;e.applyToMatrix([o,s,1]);var l=te.vs(e.getMatrix(),[["t",-o,-s],["s",.01,1],["t",o,s]]);e.setMatrix(l),e.animate({matrix:te.vs(e.getMatrix(),[["t",-o,-s],["s",100,1],["t",o,s]])},r)}function Zm(e,r,t){var i=e.getBBox(),n=e.get("origin").mappingData,a=(i.minX+i.maxX)/2,o=n.points,s=o[0].y-o[1].y<=0?i.maxY:i.minY;e.applyToMatrix([a,s,1]);var l=te.vs(e.getMatrix(),[["t",-a,-s],["s",1,.01],["t",a,s]]);e.setMatrix(l),e.animate({matrix:te.vs(e.getMatrix(),[["t",-a,-s],["s",1,100],["t",a,s]])},r)}function cc(e,r){var t,i=(0,Vu.getArcParams)(e,r),n=i.startAngle,a=i.endAngle,o=i.arcFlag;return!(0,c.isNumberEqual)(n,-Math.PI*.5)&&n<-Math.PI*.5&&(n+=Math.PI*2),!(0,c.isNumberEqual)(a,-Math.PI*.5)&&a<-Math.PI*.5&&(a+=Math.PI*2),r[5]===0&&(t=(0,d.__read)([a,n],2),n=t[0],a=t[1]),(0,c.isNumberEqual)(n,Math.PI*1.5)&&(n=Math.PI*-.5),(0,c.isNumberEqual)(a,Math.PI*-.5)&&o&&(a=Math.PI*1.5),{startAngle:n,endAngle:a}}function hc(e){var r;return e[0]==="M"||e[0]==="L"?r=[e[1],e[2]]:(e[0]==="a"||e[0]==="A"||e[0]==="C")&&(r=[e[e.length-2],e[e.length-1]]),r}function fc(e){var r,t,i,n=e.filter(function(w){return w[0]==="A"||w[0]==="a"});if(n.length===0)return{startAngle:0,endAngle:0,radius:0,innerRadius:0};var a=n[0],o=n.length>1?n[1]:n[0],s=e.indexOf(a),l=e.indexOf(o),u=hc(e[s-1]),h=hc(e[l-1]),f=cc(u,a),v=f.startAngle,g=f.endAngle,p=cc(h,o),y=p.startAngle,m=p.endAngle;(0,c.isNumberEqual)(v,y)&&(0,c.isNumberEqual)(g,m)?(t=v,i=g):(t=Math.min(v,y),i=Math.max(g,m));var x=a[1],_=n[n.length-1][1];return x<_?(r=(0,d.__read)([_,x],2),x=r[0],_=r[1]):x===_&&(_=0),{startAngle:t,endAngle:i,radius:x,innerRadius:_}}function Km(e,r,t){var i=t.toAttrs,n=t.coordinate,a=i.path||[],o=a.map(function(_){return _[0]});if(!(a.length<1)){var s=fc(a),l=s.startAngle,u=s.endAngle,h=s.radius,f=s.innerRadius,v=fc(e.attr("path")),g=v.startAngle,p=v.endAngle,y=n.getCenter(),m=l-g,x=u-p;if(m===0&&x===0){e.attr("path",a);return}e.animate(function(_){var w=g+_*m,b=p+_*x;return(0,d.__assign)((0,d.__assign)({},i),{path:(0,c.isEqual)(o,["M","A","A","Z"])?Nl(y.x,y.y,h,w,b):mr(y.x,y.y,h,w,b,f)})},(0,d.__assign)((0,d.__assign)({},r),{callback:function(){e.attr("path",a)}}))}}function qm(e,r,t){var i=vo(t.coordinate,20),n=i.type,a=i.startState,o=i.endState,s=e.setClip({type:n,attrs:a});t.toAttrs&&e.attr(t.toAttrs),s.animate(o,(0,d.__assign)((0,d.__assign)({},r),{callback:function(){e&&!e.get("destroyed")&&e.set("clipShape",null),s.remove(!0)}}))}function Xo(e,r,t){if(e.isGroup())(0,c.each)(e.getChildren(),function(s){Xo(s,r,t)});else{var i=e.getBBox(),n=(i.minX+i.maxX)/2,a=(i.minY+i.maxY)/2;if(e.applyToMatrix([n,a,1]),t==="zoomIn"){var o=te.vs(e.getMatrix(),[["t",-n,-a],["s",.01,.01],["t",n,a]]);e.setMatrix(o),e.animate({matrix:te.vs(e.getMatrix(),[["t",-n,-a],["s",100,100],["t",n,a]])},r)}else e.animate({matrix:te.vs(e.getMatrix(),[["t",-n,-a],["s",.01,.01],["t",n,a]])},(0,d.__assign)((0,d.__assign)({},r),{callback:function(){e.remove(!0)}}))}}function $m(e,r,t){Xo(e,r,"zoomIn")}function Qm(e,r,t){Xo(e,r,"zoomOut")}function lr(e){return[T.TOP,T.BOTTOM].includes(e)?{offsetX:0,offsetY:e===T.TOP?-8:8,style:{textAlign:"center",textBaseline:e===T.TOP?"bottom":"top"}}:[T.LEFT,T.RIGHT].includes(e)?{offsetX:e===T.LEFT?-8:8,offsetY:0,style:{textAlign:e===T.LEFT?"right":"left",textBaseline:"middle",rotate:Math.PI/2}}:{}}function jo(e,r,t){return{x:e.x+r*Math.cos(t),y:e.y+r*Math.sin(t)}}var Jm=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){return(0,c.deepMix)({},e.prototype.getDefaultCfg.call(this),{type:"circle",showTitle:!0,title:e.prototype.getDefaultTitleCfg.call(this)})},r.prototype.render=function(){e.prototype.render.call(this),this.cfg.showTitle&&this.renderTitle()},r.prototype.getRegion=function(t,i){var n=1/2,a={x:.5,y:.5},o=Math.PI*2/t,s=-1*Math.PI/2+o*i,l=n/(1+1/Math.sin(o/2)),u=jo(a,n-l,s),h=Math.PI*5/4,f=Math.PI*1/4;return{start:jo(u,l,h),end:jo(u,l,f)}},r.prototype.afterEachView=function(t,i){this.processAxis(t,i)},r.prototype.beforeEachView=function(t,i){},r.prototype.generateFacets=function(t){var i=this,n=this.cfg,a=n.fields,o=n.type,s=(0,d.__read)(a,1),l=s[0];if(!l)throw new Error("No `fields` specified!");var u=this.getFieldValues(t,l),h=u.length,f=[];return u.forEach(function(v,g){var p=[{field:l,value:v,values:u}],y=(0,c.filter)(t,i.getFacetDataFilter(p)),m={type:o,data:y,region:i.getRegion(h,g),columnValue:v,columnField:l,columnIndex:g,columnValuesLength:h,rowValue:null,rowField:null,rowIndex:0,rowValuesLength:1};f.push(m)}),f},r.prototype.getXAxisOption=function(t,i,n,a){return n},r.prototype.getYAxisOption=function(t,i,n,a){return n},r.prototype.renderTitle=function(){var t=this;(0,c.each)(this.facets,function(i){var n=i.columnValue,a=i.view,o=(0,c.get)(t.cfg.title,"formatter"),s=(0,c.deepMix)({position:["50%","0%"],content:o?o(n):n},lr(T.TOP),t.cfg.title);a.annotation().text(s)})},r}(oi),tx=Jm,ex=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){return(0,c.deepMix)({},e.prototype.getDefaultCfg.call(this),{type:"list",cols:null,showTitle:!0,title:e.prototype.getDefaultTitleCfg.call(this)})},r.prototype.render=function(){e.prototype.render.call(this),this.cfg.showTitle&&this.renderTitle()},r.prototype.afterEachView=function(t,i){this.processAxis(t,i)},r.prototype.beforeEachView=function(t,i){},r.prototype.generateFacets=function(t){var i=this,n=this.cfg.fields,a=this.cfg.cols,o=(0,d.__read)(n,1),s=o[0];if(!s)throw new Error("No `fields` specified!");var l=this.getFieldValues(t,s),u=l.length;a=a||u;var h=this.getPageCount(u,a),f=[];return l.forEach(function(v,g){var p=i.getRowCol(g,a),y=p.row,m=p.col,x=[{field:s,value:v,values:l}],_=(0,c.filter)(t,i.getFacetDataFilter(x)),w={type:i.cfg.type,data:_,region:i.getRegion(h,a,m,y),columnValue:v,rowValue:v,columnField:s,rowField:null,columnIndex:m,rowIndex:y,columnValuesLength:a,rowValuesLength:h,total:u};f.push(w)}),f},r.prototype.getXAxisOption=function(t,i,n,a){return a.rowIndex!==a.rowValuesLength-1&&a.columnValuesLength*a.rowIndex+a.columnIndex+1+a.columnValuesLength<=a.total?(0,d.__assign)((0,d.__assign)({},n),{label:null,title:null}):n},r.prototype.getYAxisOption=function(t,i,n,a){return a.columnIndex!==0?(0,d.__assign)((0,d.__assign)({},n),{title:null,label:null}):n},r.prototype.renderTitle=function(){var t=this;(0,c.each)(this.facets,function(i){var n=i.columnValue,a=i.view,o=(0,c.get)(t.cfg.title,"formatter"),s=(0,c.deepMix)({position:["50%","0%"],content:o?o(n):n},lr(T.TOP),t.cfg.title);a.annotation().text(s)})},r.prototype.getPageCount=function(t,i){return Math.floor((t+i-1)/i)},r.prototype.getRowCol=function(t,i){var n=Math.floor(t/i),a=t%i;return{row:n,col:a}},r}(oi),rx=ex,ix=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){return(0,c.deepMix)({},e.prototype.getDefaultCfg.call(this),{type:"matrix",showTitle:!1,columnTitle:(0,d.__assign)({},e.prototype.getDefaultTitleCfg.call(this)),rowTitle:(0,d.__assign)({},e.prototype.getDefaultTitleCfg.call(this))})},r.prototype.render=function(){e.prototype.render.call(this),this.cfg.showTitle&&this.renderTitle()},r.prototype.afterEachView=function(t,i){this.processAxis(t,i)},r.prototype.beforeEachView=function(t,i){},r.prototype.generateFacets=function(t){for(var i=this.cfg,n=i.fields,a=i.type,o=n.length,s=o,l=[],u=0;u<s;u++)for(var h=n[u],f=0;f<o;f++){var v=n[f],g={type:a,data:t,region:this.getRegion(o,s,u,f),columnValue:h,rowValue:v,columnField:h,rowField:v,columnIndex:u,rowIndex:f,columnValuesLength:s,rowValuesLength:o};l.push(g)}return l},r.prototype.getXAxisOption=function(t,i,n,a){return a.rowIndex!==a.rowValuesLength-1?(0,d.__assign)((0,d.__assign)({},n),{label:null,title:null}):n},r.prototype.getYAxisOption=function(t,i,n,a){return a.columnIndex!==0?(0,d.__assign)((0,d.__assign)({},n),{title:null,label:null}):n},r.prototype.renderTitle=function(){var t=this;(0,c.each)(this.facets,function(i,n){var a=i.columnIndex,o=i.rowIndex,s=i.columnValuesLength,l=i.rowValuesLength,u=i.columnValue,h=i.rowValue,f=i.view;if(o===0){var v=(0,c.get)(t.cfg.columnTitle,"formatter"),g=(0,c.deepMix)({position:["50%","0%"],content:v?v(u):u},lr(T.TOP),t.cfg.columnTitle);f.annotation().text(g)}if(a===s-1){var v=(0,c.get)(t.cfg.rowTitle,"formatter"),g=(0,c.deepMix)({position:["100%","50%"],content:v?v(h):h},lr(T.RIGHT),t.cfg.rowTitle);f.annotation().text(g)}})},r}(oi),nx=ix,ax=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){return(0,c.deepMix)({},e.prototype.getDefaultCfg.call(this),{type:"mirror",showTitle:!0,title:e.prototype.getDefaultTitleCfg.call(this),transpose:!1})},r.prototype.render=function(){e.prototype.render.call(this),this.cfg.showTitle&&this.renderTitle()},r.prototype.beforeEachView=function(t,i){this.cfg.transpose?i.columnIndex%2==0?t.coordinate().transpose().reflect("x"):t.coordinate().transpose():i.rowIndex%2!=0&&t.coordinate().reflect("y")},r.prototype.afterEachView=function(t,i){this.processAxis(t,i)},r.prototype.generateFacets=function(t){var i=this,n=(0,d.__read)(this.cfg.fields,1),a=n[0],o=[],s=1,l=1,u=[""],h=[""],f,v;return this.cfg.transpose?(f=a,u=this.getFieldValues(t,f).slice(0,2),s=u.length):(v=a,h=this.getFieldValues(t,v).slice(0,2),l=h.length),u.forEach(function(g,p){h.forEach(function(y,m){var x=[{field:f,value:g,values:u},{field:v,value:y,values:h}],_=(0,c.filter)(t,i.getFacetDataFilter(x)),w={type:i.cfg.type,data:_,region:i.getRegion(l,s,p,m),columnValue:g,rowValue:y,columnField:f,rowField:v,columnIndex:p,rowIndex:m,columnValuesLength:s,rowValuesLength:l};o.push(w)})}),o},r.prototype.getXAxisOption=function(t,i,n,a){return a.columnIndex===1||a.rowIndex===1?(0,d.__assign)((0,d.__assign)({},n),{label:null,title:null}):n},r.prototype.getYAxisOption=function(t,i,n,a){return n},r.prototype.renderTitle=function(){var t=this;(0,c.each)(this.facets,function(i,n){var a=i.columnValue,o=i.rowValue,s=i.view,l=(0,c.get)(t.cfg.title,"formatter");if(t.cfg.transpose){var u=(0,c.deepMix)({position:["50%","0%"],content:l?l(a):a},lr(T.TOP),t.cfg.title);s.annotation().text(u)}else{var u=(0,c.deepMix)({position:["100%","50%"],content:l?l(o):o},lr(T.RIGHT),t.cfg.title);s.annotation().text(u)}})},r}(oi),ox=ax,sx=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.afterEachView=function(t,i){this.processAxis(t,i)},r.prototype.beforeEachView=function(t,i){},r.prototype.getDefaultCfg=function(){return(0,c.deepMix)({},e.prototype.getDefaultCfg.call(this),{type:"rect",columnTitle:(0,d.__assign)({},e.prototype.getDefaultTitleCfg.call(this)),rowTitle:(0,d.__assign)({},e.prototype.getDefaultTitleCfg.call(this))})},r.prototype.render=function(){e.prototype.render.call(this),this.cfg.showTitle&&this.renderTitle()},r.prototype.generateFacets=function(t){var i=this,n=(0,d.__read)(this.cfg.fields,2),a=n[0],o=n[1],s=[],l=1,u=1,h=[""],f=[""];return a&&(h=this.getFieldValues(t,a),l=h.length),o&&(f=this.getFieldValues(t,o),u=f.length),h.forEach(function(v,g){f.forEach(function(p,y){var m=[{field:a,value:v,values:h},{field:o,value:p,values:f}],x=(0,c.filter)(t,i.getFacetDataFilter(m)),_={type:i.cfg.type,data:x,region:i.getRegion(u,l,g,y),columnValue:v,rowValue:p,columnField:a,rowField:o,columnIndex:g,rowIndex:y,columnValuesLength:l,rowValuesLength:u};s.push(_)})}),s},r.prototype.renderTitle=function(){var t=this;(0,c.each)(this.facets,function(i,n){var a=i.columnIndex,o=i.rowIndex,s=i.columnValuesLength,l=i.columnValue,u=i.rowValue,h=i.view;if(o===0){var f=(0,c.get)(t.cfg.columnTitle,"formatter"),v=(0,c.deepMix)({position:["50%","0%"],content:f?f(l):l},lr(T.TOP),t.cfg.columnTitle);h.annotation().text(v)}if(a===s-1){var f=(0,c.get)(t.cfg.rowTitle,"formatter"),v=(0,c.deepMix)({position:["100%","50%"],content:f?f(u):u},lr(T.RIGHT),t.cfg.rowTitle);h.annotation().text(v)}})},r.prototype.getXAxisOption=function(t,i,n,a){return a.rowIndex!==a.rowValuesLength-1?(0,d.__assign)((0,d.__assign)({},n),{title:null,label:null}):a.columnIndex!==Math.floor((a.columnValuesLength-1)/2)?(0,d.__assign)((0,d.__assign)({},n),{title:null}):n},r.prototype.getYAxisOption=function(t,i,n,a){return a.columnIndex!==0?(0,d.__assign)((0,d.__assign)({},n),{title:null,label:null}):a.rowIndex!==Math.floor((a.rowValuesLength-1)/2)?(0,d.__assign)((0,d.__assign)({},n),{title:null}):n},r}(oi),lx=sx,ux=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.afterChartRender=function(){t.facets&&t.cfg.line&&(t.container.clear(),t.drawLines(t.facets))},t}return r.prototype.afterEachView=function(t,i){this.processAxis(t,i)},r.prototype.beforeEachView=function(t,i){},r.prototype.init=function(){e.prototype.init.call(this),this.view.on(A.AFTER_RENDER,this.afterChartRender)},r.prototype.getDefaultCfg=function(){return(0,c.deepMix)({},e.prototype.getDefaultCfg.call(this),{type:"tree",line:{style:{lineWidth:1,stroke:"#ddd"},smooth:!1},showTitle:!0,title:e.prototype.getDefaultTitleCfg.call(this)})},r.prototype.generateFacets=function(t){var i=this.cfg.fields;if(!i.length)throw new Error("Please specify for the fields for rootFacet!");var n=[],a={type:this.cfg.type,data:t,region:null,rowValuesLength:this.getRows(),columnValuesLength:1,rowIndex:0,columnIndex:0,rowField:"",columnField:"",rowValue:"",columnValue:""};return n.push(a),a.children=this.getChildFacets(t,1,n),this.setRegion(n),n},r.prototype.setRegion=function(t){var i=this;this.forceColIndex(t),t.forEach(function(n){n.region=i.getRegion(n.rowValuesLength,n.columnValuesLength,n.columnIndex,n.rowIndex)})},r.prototype.getRegion=function(t,i,n,a){var o=1/i,s=1/t,l={x:o*n,y:s*a},u={x:l.x+o,y:l.y+s*2/3};return{start:l,end:u}},r.prototype.forceColIndex=function(t){var i,n,a=this,o=[],s=0;t.forEach(function(p){a.isLeaf(p)&&(o.push(p),p.columnIndex=s,s++)}),o.forEach(function(p){p.columnValuesLength=o.length});for(var l=this.cfg.fields.length,u=l-1;u>=0;u--){var h=this.getFacetsByLevel(t,u);try{for(var f=(i=void 0,(0,d.__values)(h)),v=f.next();!v.done;v=f.next()){var g=v.value;this.isLeaf(g)||(g.originColIndex=g.columnIndex,g.columnIndex=this.getRegionIndex(g.children),g.columnValuesLength=o.length)}}catch(p){i={error:p}}finally{try{v&&!v.done&&(n=f.return)&&n.call(f)}finally{if(i)throw i.error}}}},r.prototype.getFacetsByLevel=function(t,i){var n=[];return t.forEach(function(a){a.rowIndex===i&&n.push(a)}),n},r.prototype.getRegionIndex=function(t){var i=t[0],n=t[t.length-1];return(n.columnIndex-i.columnIndex)/2+i.columnIndex},r.prototype.isLeaf=function(t){return!t.children||!t.children.length},r.prototype.getRows=function(){return this.cfg.fields.length+1},r.prototype.getChildFacets=function(t,i,n){var a=this,o=this.cfg.fields,s=o.length;if(!(s<i)){var l=[],u=o[i-1],h=this.getFieldValues(t,u);return h.forEach(function(f,v){var g=[{field:u,value:f,values:h}],p=t.filter(a.getFacetDataFilter(g));if(p.length){var y={type:a.cfg.type,data:p,region:null,columnValue:f,rowValue:"",columnField:u,rowField:"",columnIndex:v,rowValuesLength:a.getRows(),columnValuesLength:1,rowIndex:i,children:a.getChildFacets(p,i+1,n)};l.push(y),n.push(y)}}),l}},r.prototype.render=function(){e.prototype.render.call(this),this.cfg.showTitle&&this.renderTitle()},r.prototype.renderTitle=function(){var t=this;(0,c.each)(this.facets,function(i){var n=i.columnValue,a=i.view,o=(0,c.get)(t.cfg.title,"formatter"),s=(0,c.deepMix)({position:["50%","0%"],content:o?o(n):n},lr(T.TOP),t.cfg.title);a.annotation().text(s)})},r.prototype.drawLines=function(t){var i=this;t.forEach(function(n){if(!i.isLeaf(n)){var a=n.children;i.addFacetLines(n,a)}})},r.prototype.addFacetLines=function(t,i){var n=this,a=t.view,o=a.coordinateBBox,s={x:o.x+o.width/2,y:o.y+o.height};i.forEach(function(l){var u=l.view.coordinateBBox,h={x:u.bl.x+(u.tr.x-u.bl.x)/2,y:u.tr.y},f={x:s.x,y:s.y+(h.y-s.y)/2},v={x:h.x,y:f.y};n.drawLine([s,f,v,h])})},r.prototype.getPath=function(t){var i=[],n=this.cfg.line.smooth;return n?(i.push(["M",t[0].x,t[0].y]),i.push(["C",t[1].x,t[1].y,t[2].x,t[2].y,t[3].x,t[3].y])):t.forEach(function(a,o){o===0?i.push(["M",a.x,a.y]):i.push(["L",a.x,a.y])}),i},r.prototype.drawLine=function(t){var i=this.getPath(t),n=this.cfg.line.style;this.container.addShape("path",{attrs:(0,c.assign)({path:i},n)})},r.prototype.getXAxisOption=function(t,i,n,a){return a.rowIndex!==a.rowValuesLength-1?(0,d.__assign)((0,d.__assign)({},n),{title:null,label:null}):n},r.prototype.getYAxisOption=function(t,i,n,a){return a.originColIndex!==0&&a.columnIndex!==0?(0,d.__assign)((0,d.__assign)({},n),{title:null,label:null}):n},r}(oi),cx=ux;function vc(e){var r=(0,d.__spreadArray)([],(0,d.__read)(e),!1);r.sort(function(i,n){return i-n});var t=r.length;return t===0?0:t%2==1?r[(t-1)/2]:(r[t/2]+r[t/2-1])/2}function hx(e){var r=(0,c.reduce)(e,function(t,i){return t+=isNaN(i)||!(0,c.isNumber)(i)?0:i},0);return e.length===0?0:r/e.length}function ea(e,r){if(!r)return null;var t;switch(e){case"start":return 0;case"center":return .5;case"end":return 1;case"median":{t=r.isCategory?vc(r.values.map(function(i,n){return n})):vc(r.values);break}case"mean":{t=r.isCategory?(r.values.length-1)/2:hx(r.values);break}case"min":t=r.isCategory?0:r[e];break;case"max":t=r.isCategory?r.values.length-1:r[e];break;default:t=e;break}return r.scale(t)}var ra=["regionFilter","shape"],fx=function(e){(0,d.__extends)(r,e);function r(t){var i=e.call(this,t)||this;return i.cache=new Map,i.foregroundContainer=i.view.getLayer(Z.FORE).addGroup(),i.backgroundContainer=i.view.getLayer(Z.BG).addGroup(),i.option=[],i}return Object.defineProperty(r.prototype,"name",{get:function(){return"annotation"},enumerable:!1,configurable:!0}),r.prototype.init=function(){},r.prototype.layout=function(){this.update()},r.prototype.render=function(){},r.prototype.update=function(){var t=this;this.onAfterRender(function(){var n=new Map;(0,c.each)(t.option,function(a){if((0,c.includes)(ra,a.type)){var o=t.updateOrCreate(a);o&&n.set(t.getCacheKey(a),o)}}),t.cache=t.syncCache(n)});var i=new Map;(0,c.each)(this.option,function(n){if(!(0,c.includes)(ra,n.type)){var a=t.updateOrCreate(n);a&&i.set(t.getCacheKey(n),a)}}),this.cache=this.syncCache(i)},r.prototype.clear=function(t){t===void 0&&(t=!1),e.prototype.clear.call(this),this.clearComponents(),this.foregroundContainer.clear(),this.backgroundContainer.clear(),t&&(this.option=[])},r.prototype.destroy=function(){this.clear(!0),this.foregroundContainer.remove(!0),this.backgroundContainer.remove(!0)},r.prototype.getComponents=function(){var t=[];return this.cache.forEach(function(i){t.push(i)}),t},r.prototype.clearComponents=function(){this.getComponents().forEach(function(t){t.component.destroy()}),this.cache.clear()},r.prototype.onAfterRender=function(t){this.view.getOptions().animate?this.view.geometries.forEach(function(i){i.animateOption&&i.once(D.AFTER_DRAW_ANIMATE,function(){t()})}):this.view.getRootView().once(A.AFTER_RENDER,function(){t()})},r.prototype.createAnnotation=function(t){var i=t.type,n=R[(0,c.upperFirst)(i)];if(n){var a=this.getAnnotationTheme(i),o=this.getAnnotationCfg(i,t,a);if(!o)return null;var s=new n(o);return{component:s,layer:this.isTop(o)?Z.FORE:Z.BG,direction:T.NONE,type:z.ANNOTATION,extra:t}}},r.prototype.annotation=function(t){this.option.push(t)},r.prototype.arc=function(t){return this.annotation((0,d.__assign)({type:"arc"},t)),this},r.prototype.image=function(t){return this.annotation((0,d.__assign)({type:"image"},t)),this},r.prototype.line=function(t){return this.annotation((0,d.__assign)({type:"line"},t)),this},r.prototype.region=function(t){return this.annotation((0,d.__assign)({type:"region"},t)),this},r.prototype.text=function(t){return this.annotation((0,d.__assign)({type:"text"},t)),this},r.prototype.dataMarker=function(t){return this.annotation((0,d.__assign)({type:"dataMarker"},t)),this},r.prototype.dataRegion=function(t){this.annotation((0,d.__assign)({type:"dataRegion"},t))},r.prototype.regionFilter=function(t){this.annotation((0,d.__assign)({type:"regionFilter"},t))},r.prototype.shape=function(t){this.annotation((0,d.__assign)({type:"shape"},t))},r.prototype.html=function(t){this.annotation((0,d.__assign)({type:"html"},t))},r.prototype.parsePosition=function(t){var i,n,a=this.view.getXScale(),o=this.view.getScalesByDim("y"),s=(0,c.isFunction)(t)?t.call(null,a,o):t,l=0,u=0;if((0,c.isArray)(s)){var h=(0,d.__read)(s,2),f=h[0],v=h[1];if((0,c.isString)(f)&&f.indexOf("%")!==-1&&!isNaN(f.slice(0,-1)))return this.parsePercentPosition(s);l=ea(f,a),u=ea(v,Object.values(o)[0])}else if(!(0,c.isNil)(s))try{for(var g=(0,d.__values)((0,c.keys)(s)),p=g.next();!p.done;p=g.next()){var y=p.value,m=s[y];y===a.field&&(l=ea(m,a)),o[y]&&(u=ea(m,o[y]))}}catch(x){i={error:x}}finally{try{p&&!p.done&&(n=g.return)&&n.call(g)}finally{if(i)throw i.error}}return isNaN(l)||isNaN(u)?null:this.view.getCoordinate().convert({x:l,y:u})},r.prototype.getRegionPoints=function(t,i){var n=this,a=this.view.getXScale(),o=this.view.getScalesByDim("y"),s=Object.values(o)[0],l=a.field,u=this.view.getData(),h=(0,c.isArray)(t)?t[0]:t[l],f=(0,c.isArray)(i)?i[0]:i[l],v=[],g;return(0,c.each)(u,function(p,y){if(p[l]===h&&(g=y),y>=g){var m=n.parsePosition([p[l],p[s.field]]);m&&v.push(m)}if(p[l]===f)return!1}),v},r.prototype.parsePercentPosition=function(t){var i=parseFloat(t[0])/100,n=parseFloat(t[1])/100,a=this.view.getCoordinate(),o=a.start,s=a.end,l={x:Math.min(o.x,s.x),y:Math.min(o.y,s.y)},u=a.getWidth()*i+l.x,h=a.getHeight()*n+l.y;return{x:u,y:h}},r.prototype.getCoordinateBBox=function(){var t=this.view.getCoordinate(),i=t.start,n=t.end,a=t.getWidth(),o=t.getHeight(),s={x:Math.min(i.x,n.x),y:Math.min(i.y,n.y)};return{x:s.x,y:s.y,minX:s.x,minY:s.y,maxX:s.x+a,maxY:s.y+o,width:a,height:o}},r.prototype.getAnnotationCfg=function(t,i,n){var a=this,o=this.view.getCoordinate(),s=this.view.getCanvas(),l={};if((0,c.isNil)(i))return null;var u=i.start,h=i.end,f=i.position,v=this.parsePosition(u),g=this.parsePosition(h),p=this.parsePosition(f);if(["arc","image","line","region","regionFilter"].includes(t)&&(!v||!g))return null;if(["text","dataMarker","html"].includes(t)&&!p)return null;if(t==="arc"){var y=i,m=y.start,x=y.end,_=(0,d.__rest)(y,["start","end"]),w=ai(o,v),b=ai(o,g);w>b&&(b=Math.PI*2+b),l=(0,d.__assign)((0,d.__assign)({},_),{center:o.getCenter(),radius:Bn(o,v),startAngle:w,endAngle:b})}else if(t==="image"){var S=i,C=S.start,M=S.end,_=(0,d.__rest)(S,["start","end"]);l=(0,d.__assign)((0,d.__assign)({},_),{start:v,end:g,src:i.src})}else if(t==="line"){var L=i,B=L.start,I=L.end,_=(0,d.__rest)(L,["start","end"]);l=(0,d.__assign)((0,d.__assign)({},_),{start:v,end:g,text:(0,c.get)(i,"text",null)})}else if(t==="region"){var G=i,q=G.start,ft=G.end,_=(0,d.__rest)(G,["start","end"]);l=(0,d.__assign)((0,d.__assign)({},_),{start:v,end:g})}else if(t==="text"){var mt=this.view.getData(),zt=i,H=zt.position,tt=zt.content,_=(0,d.__rest)(zt,["position","content"]),ct=tt;(0,c.isFunction)(tt)&&(ct=tt(mt)),l=(0,d.__assign)((0,d.__assign)((0,d.__assign)({},p),_),{content:ct})}else if(t==="dataMarker"){var nt=i,lt=nt.position,xt=nt.point,Rt=nt.line,Vt=nt.text,Tt=nt.autoAdjust,Gt=nt.direction,_=(0,d.__rest)(nt,["position","point","line","text","autoAdjust","direction"]);l=(0,d.__assign)((0,d.__assign)((0,d.__assign)({},_),p),{coordinateBBox:this.getCoordinateBBox(),point:xt,line:Rt,text:Vt,autoAdjust:Tt,direction:Gt})}else if(t==="dataRegion"){var qt=i,ue=qt.start,ce=qt.end,nr=qt.region,Vt=qt.text,ti=qt.lineLength,_=(0,d.__rest)(qt,["start","end","region","text","lineLength"]);l=(0,d.__assign)((0,d.__assign)({},_),{points:this.getRegionPoints(ue,ce),region:nr,text:Vt,lineLength:ti})}else if(t==="regionFilter"){var pr=i,Fi=pr.start,Ei=pr.end,Tv=pr.apply,yT=pr.color,_=(0,d.__rest)(pr,["start","end","apply","color"]),mT=this.view.geometries,Lv=[],$s=function(ar){!ar||(ar.isGroup()?ar.getChildren().forEach(function(_n){return $s(_n)}):Lv.push(ar))};(0,c.each)(mT,function(ar){Tv?(0,c.contains)(Tv,ar.type)&&(0,c.each)(ar.elements,function(_n){$s(_n.shape)}):(0,c.each)(ar.elements,function(_n){$s(_n.shape)})}),l=(0,d.__assign)((0,d.__assign)({},_),{color:yT,shapes:Lv,start:v,end:g})}else if(t==="shape"){var Iv=i,xT=Iv.render,Qs=(0,d.__rest)(Iv,["render"]),_T=function(bT){if((0,c.isFunction)(i.render))return xT(bT,a.view,{parsePosition:a.parsePosition.bind(a)})};l=(0,d.__assign)((0,d.__assign)({},Qs),{render:_T})}else if(t==="html"){var Js=i,tl=Js.html,jL=Js.position,Qs=(0,d.__rest)(Js,["html","position"]),wT=function(ar){return(0,c.isFunction)(tl)?tl(ar,a.view):tl};l=(0,d.__assign)((0,d.__assign)((0,d.__assign)({},Qs),p),{parent:s.get("el").parentNode,html:wT})}var Or=(0,c.deepMix)({},n,(0,d.__assign)((0,d.__assign)({},l),{top:i.top,style:i.style,offsetX:i.offsetX,offsetY:i.offsetY}));return t!=="html"&&(Or.container=this.getComponentContainer(Or)),Or.animate=this.view.getOptions().animate&&Or.animate&&(0,c.get)(i,"animate",Or.animate),Or.animateOption=(0,c.deepMix)({},hi,Or.animateOption,i.animateOption),Or},r.prototype.isTop=function(t){return(0,c.get)(t,"top",!0)},r.prototype.getComponentContainer=function(t){return this.isTop(t)?this.foregroundContainer:this.backgroundContainer},r.prototype.getAnnotationTheme=function(t){return(0,c.get)(this.view.getTheme(),["components","annotation",t],{})},r.prototype.updateOrCreate=function(t){var i=this.cache.get(this.getCacheKey(t));if(i){var n=t.type,a=this.getAnnotationTheme(n),o=this.getAnnotationCfg(n,t,a);o&&Me(o,["container"]),i.component.update((0,d.__assign)((0,d.__assign)({},o||{}),{visible:!!o})),(0,c.includes)(ra,t.type)&&i.component.render()}else i=this.createAnnotation(t),i&&(i.component.init(),(0,c.includes)(ra,t.type)&&i.component.render());return i},r.prototype.syncCache=function(t){var i=this,n=new Map(this.cache);return t.forEach(function(a,o){n.set(o,a)}),n.forEach(function(a,o){(0,c.find)(i.option,function(s){return o===i.getCacheKey(s)})||(a.component.destroy(),n.delete(o))}),n},r.prototype.getCacheKey=function(t){return t},r}(ci),vx=fx;function dc(e,r){var t=(0,c.deepMix)({},(0,c.get)(e,["components","axis","common"]),(0,c.get)(e,["components","axis",r]));return(0,c.get)(t,["grid"],{})}function ia(e,r,t,i){var n=[],a=r.getTicks();return e.isPolar&&a.push({value:1,text:"",tickValue:""}),a.reduce(function(o,s,l){var u=s.value;if(i)n.push({points:[e.convert(t==="y"?{x:0,y:u}:{x:u,y:0}),e.convert(t==="y"?{x:1,y:u}:{x:u,y:1})]});else if(l){var h=o.value,f=(h+u)/2;n.push({points:[e.convert(t==="y"?{x:0,y:f}:{x:f,y:0}),e.convert(t==="y"?{x:1,y:f}:{x:f,y:1})]})}return s},a[0]),n}function Uo(e,r,t,i,n){var a=r.values.length,o=[],s=t.getTicks();return s.reduce(function(l,u){var h=l?l.value:u.value,f=u.value,v=(h+f)/2;return n==="x"?o.push({points:[e.convert({x:i?f:v,y:0}),e.convert({x:i?f:v,y:1})]}):o.push({points:(0,c.map)(Array(a+1),function(g,p){return e.convert({x:p/a,y:i?f:v})})}),u},s[0]),o}function gc(e,r){var t=(0,c.get)(r,"grid");if(t===null)return!1;var i=(0,c.get)(e,"grid");return!(t===void 0&&i===null)}var Ar=["container"],pc=(0,d.__assign)((0,d.__assign)({},hi),{appear:null}),dx=function(e){(0,d.__extends)(r,e);function r(t){var i=e.call(this,t)||this;return i.cache=new Map,i.gridContainer=i.view.getLayer(Z.BG).addGroup(),i.gridForeContainer=i.view.getLayer(Z.FORE).addGroup(),i.axisContainer=i.view.getLayer(Z.BG).addGroup(),i.axisForeContainer=i.view.getLayer(Z.FORE).addGroup(),i}return Object.defineProperty(r.prototype,"name",{get:function(){return"axis"},enumerable:!1,configurable:!0}),r.prototype.init=function(){},r.prototype.render=function(){this.update()},r.prototype.layout=function(){var t=this,i=this.view.getCoordinate();(0,c.each)(this.getComponents(),function(n){var a=n.component,o=n.direction,s=n.type,l=n.extra,u=l.dim,h=l.scale,f=l.alignTick,v;if(s===z.AXIS)i.isPolar?u==="x"?v=i.isTransposed?Rn(i,o):go(i):u==="y"&&(v=i.isTransposed?go(i):Rn(i,o)):v=Rn(i,o);else if(s===z.GRID)if(i.isPolar){var g=void 0;i.isTransposed?g=u==="x"?Uo(i,t.view.getYScales()[0],h,f,u):ia(i,h,u,f):g=u==="x"?ia(i,h,u,f):Uo(i,t.view.getXScale(),h,f,u),v={items:g,center:t.view.getCoordinate().getCenter()}}else v={items:ia(i,h,u,f)};a.update(v)})},r.prototype.update=function(){this.option=this.view.getOptions().axes;var t=new Map;this.updateXAxes(t),this.updateYAxes(t);var i=new Map;this.cache.forEach(function(n,a){t.has(a)?i.set(a,n):n.component.destroy()}),this.cache=i},r.prototype.clear=function(){e.prototype.clear.call(this),this.cache.clear(),this.gridContainer.clear(),this.gridForeContainer.clear(),this.axisContainer.clear(),this.axisForeContainer.clear()},r.prototype.destroy=function(){e.prototype.destroy.call(this),this.gridContainer.remove(!0),this.gridForeContainer.remove(!0),this.axisContainer.remove(!0),this.axisForeContainer.remove(!0)},r.prototype.getComponents=function(){var t=[];return this.cache.forEach(function(i){t.push(i)}),t},r.prototype.updateXAxes=function(t){var i=this.view.getXScale();if(!(!i||i.isIdentity)){var n=zn(this.option,i.field);if(n!==!1){var a=Xl(n,T.BOTTOM),o=Z.BG,s="x",l=this.view.getCoordinate(),u=this.getId("axis",i.field),h=this.getId("grid",i.field);if(l.isRect){var f=this.cache.get(u);if(f){var v=this.getLineAxisCfg(i,n,a);Me(v,Ar),f.component.update(v),t.set(u,f)}else f=this.createLineAxis(i,n,o,a,s),this.cache.set(u,f),t.set(u,f);var g=this.cache.get(h);if(g){var v=this.getLineGridCfg(i,n,a,s);Me(v,Ar),g.component.update(v),t.set(h,g)}else g=this.createLineGrid(i,n,o,a,s),g&&(this.cache.set(h,g),t.set(h,g))}else if(l.isPolar){var f=this.cache.get(u);if(f){var v=l.isTransposed?this.getLineAxisCfg(i,n,T.RADIUS):this.getCircleAxisCfg(i,n,a);Me(v,Ar),f.component.update(v),t.set(u,f)}else{if(l.isTransposed){if((0,c.isUndefined)(n))return;f=this.createLineAxis(i,n,o,T.RADIUS,s)}else f=this.createCircleAxis(i,n,o,a,s);this.cache.set(u,f),t.set(u,f)}var g=this.cache.get(h);if(g){var v=l.isTransposed?this.getCircleGridCfg(i,n,T.RADIUS,s):this.getLineGridCfg(i,n,T.CIRCLE,s);Me(v,Ar),g.component.update(v),t.set(h,g)}else{if(l.isTransposed){if((0,c.isUndefined)(n))return;g=this.createCircleGrid(i,n,o,T.RADIUS,s)}else g=this.createLineGrid(i,n,o,T.CIRCLE,s);g&&(this.cache.set(h,g),t.set(h,g))}}}}},r.prototype.updateYAxes=function(t){var i=this,n=this.view.getYScales();(0,c.each)(n,function(a,o){if(!(!a||a.isIdentity)){var s=a.field,l=zn(i.option,s);if(l!==!1){var u=Z.BG,h="y",f=i.getId("axis",s),v=i.getId("grid",s),g=i.view.getCoordinate();if(g.isRect){var p=Xl(l,o===0?T.LEFT:T.RIGHT),y=i.cache.get(f);if(y){var m=i.getLineAxisCfg(a,l,p);Me(m,Ar),y.component.update(m),t.set(f,y)}else y=i.createLineAxis(a,l,u,p,h),i.cache.set(f,y),t.set(f,y);var x=i.cache.get(v);if(x){var m=i.getLineGridCfg(a,l,p,h);Me(m,Ar),x.component.update(m),t.set(v,x)}else x=i.createLineGrid(a,l,u,p,h),x&&(i.cache.set(v,x),t.set(v,x))}else if(g.isPolar){var y=i.cache.get(f);if(y){var m=g.isTransposed?i.getCircleAxisCfg(a,l,T.CIRCLE):i.getLineAxisCfg(a,l,T.RADIUS);Me(m,Ar),y.component.update(m),t.set(f,y)}else{if(g.isTransposed){if((0,c.isUndefined)(l))return;y=i.createCircleAxis(a,l,u,T.CIRCLE,h)}else y=i.createLineAxis(a,l,u,T.RADIUS,h);i.cache.set(f,y),t.set(f,y)}var x=i.cache.get(v);if(x){var m=g.isTransposed?i.getLineGridCfg(a,l,T.CIRCLE,h):i.getCircleGridCfg(a,l,T.RADIUS,h);Me(m,Ar),x.component.update(m),t.set(v,x)}else{if(g.isTransposed){if((0,c.isUndefined)(l))return;x=i.createLineGrid(a,l,u,T.CIRCLE,h)}else x=i.createCircleGrid(a,l,u,T.RADIUS,h);x&&(i.cache.set(v,x),t.set(v,x))}}}}})},r.prototype.createLineAxis=function(t,i,n,a,o){var s={component:new fp(this.getLineAxisCfg(t,i,a)),layer:n,direction:a===T.RADIUS?T.NONE:a,type:z.AXIS,extra:{dim:o,scale:t}};return s.component.set("field",t.field),s.component.init(),s},r.prototype.createLineGrid=function(t,i,n,a,o){var s=this.getLineGridCfg(t,i,a,o);if(s){var l={component:new dp(s),layer:n,direction:T.NONE,type:z.GRID,extra:{dim:o,scale:t,alignTick:(0,c.get)(s,"alignTick",!0)}};return l.component.init(),l}},r.prototype.createCircleAxis=function(t,i,n,a,o){var s={component:new vp(this.getCircleAxisCfg(t,i,a)),layer:n,direction:a,type:z.AXIS,extra:{dim:o,scale:t}};return s.component.set("field",t.field),s.component.init(),s},r.prototype.createCircleGrid=function(t,i,n,a,o){var s=this.getCircleGridCfg(t,i,a,o);if(s){var l={component:new gp(s),layer:n,direction:T.NONE,type:z.GRID,extra:{dim:o,scale:t,alignTick:(0,c.get)(s,"alignTick",!0)}};return l.component.init(),l}},r.prototype.getLineAxisCfg=function(t,i,n){var a=(0,c.get)(i,["top"])?this.axisForeContainer:this.axisContainer,o=this.view.getCoordinate(),s=Rn(o,n),l=jl(t,i),u=Nn(this.view.getTheme(),n),h=(0,c.get)(i,["title"])?(0,c.deepMix)({title:{style:{text:l}}},{title:Yl(this.view.getTheme(),n,i.title)},i):i,f=(0,c.deepMix)((0,d.__assign)((0,d.__assign)({container:a},s),{ticks:t.getTicks().map(function(w){return{id:"".concat(w.tickValue),name:w.text,value:w.value}}),verticalFactor:o.isPolar?Hl(s,o.getCenter())*-1:Hl(s,o.getCenter()),theme:u}),u,h),v=this.getAnimateCfg(f),g=v.animate,p=v.animateOption;f.animateOption=p,f.animate=g;var y=Wl(s),m=(0,c.get)(f,"verticalLimitLength",y?1/3:1/2);if(m<=1){var x=this.view.getCanvas().get("width"),_=this.view.getCanvas().get("height");f.verticalLimitLength=m*(y?x:_)}return f},r.prototype.getLineGridCfg=function(t,i,n,a){if(!!gc(Nn(this.view.getTheme(),n),i)){var o=dc(this.view.getTheme(),n),s=(0,c.deepMix)({container:(0,c.get)(i,["top"])?this.gridForeContainer:this.gridContainer},o,(0,c.get)(i,"grid"),this.getAnimateCfg(i));return s.items=ia(this.view.getCoordinate(),t,a,(0,c.get)(s,"alignTick",!0)),s}},r.prototype.getCircleAxisCfg=function(t,i,n){var a=(0,c.get)(i,["top"])?this.axisForeContainer:this.axisContainer,o=this.view.getCoordinate(),s=t.getTicks().map(function(y){return{id:"".concat(y.tickValue),name:y.text,value:y.value}});!t.isCategory&&Math.abs(o.endAngle-o.startAngle)===Math.PI*2&&s.pop();var l=jl(t,i),u=Nn(this.view.getTheme(),T.CIRCLE),h=(0,c.get)(i,["title"])?(0,c.deepMix)({title:{style:{text:l}}},{title:Yl(this.view.getTheme(),n,i.title)},i):i,f=(0,c.deepMix)((0,d.__assign)((0,d.__assign)({container:a},go(this.view.getCoordinate())),{ticks:s,verticalFactor:1,theme:u}),u,h),v=this.getAnimateCfg(f),g=v.animate,p=v.animateOption;return f.animate=g,f.animateOption=p,f},r.prototype.getCircleGridCfg=function(t,i,n,a){if(!!gc(Nn(this.view.getTheme(),n),i)){var o=dc(this.view.getTheme(),T.RADIUS),s=(0,c.deepMix)({container:(0,c.get)(i,["top"])?this.gridForeContainer:this.gridContainer,center:this.view.getCoordinate().getCenter()},o,(0,c.get)(i,"grid"),this.getAnimateCfg(i)),l=(0,c.get)(s,"alignTick",!0),u=a==="x"?this.view.getYScales()[0]:this.view.getXScale();return s.items=Uo(this.view.getCoordinate(),u,t,l,a),s}},r.prototype.getId=function(t,i){var n=this.view.getCoordinate();return"".concat(t,"-").concat(i,"-").concat(n.type)},r.prototype.getAnimateCfg=function(t){return{animate:this.view.getOptions().animate&&(0,c.get)(t,"animate"),animateOption:t&&t.animateOption?(0,c.deepMix)({},pc,t.animateOption):pc}},r}(ci),gx=dx;function Fr(e,r,t){return t===T.TOP?[e.minX+e.width/2-r.width/2,e.minY]:t===T.BOTTOM?[e.minX+e.width/2-r.width/2,e.maxY-r.height]:t===T.LEFT?[e.minX,e.minY+e.height/2-r.height/2]:t===T.RIGHT?[e.maxX-r.width,e.minY+e.height/2-r.height/2]:t===T.TOP_LEFT||t===T.LEFT_TOP?[e.tl.x,e.tl.y]:t===T.TOP_RIGHT||t===T.RIGHT_TOP?[e.tr.x-r.width,e.tr.y]:t===T.BOTTOM_LEFT||t===T.LEFT_BOTTOM?[e.bl.x,e.bl.y-r.height]:t===T.BOTTOM_RIGHT||t===T.RIGHT_BOTTOM?[e.br.x-r.width,e.br.y-r.height]:[0,0]}function px(e,r){if(r.isTransposed)switch(e){case DIRECTION.BOTTOM:return DIRECTION.LEFT;case DIRECTION.LEFT:return DIRECTION.BOTTOM;case DIRECTION.RIGHT:return DIRECTION.TOP;case DIRECTION.TOP:return DIRECTION.RIGHT}return e}function yc(e){return e===DIRECTION.LEFT?DIRECTION.RIGHT:e===DIRECTION.RIGHT?DIRECTION.LEFT:e}function mc(e){return e===DIRECTION.TOP?DIRECTION.BOTTOM:e===DIRECTION.BOTTOM?DIRECTION.TOP:e}function yx(e,r){var t=r.matrix[0],i=r.matrix[4],n=e;return t<0&&(n=yc(n)),i<0&&(n=mc(n)),n}function mx(e,r){var t=e;return r.isReflect("x")&&(t=yc(t)),r.isReflect("y")&&(t=mc(t)),t}function yL(e,r){var t=e;return t=px(t,r),t=yx(t,r),t=mx(t,r),t}function xc(e,r){return(0,c.isBoolean)(e)?e===!1?!1:{}:(0,c.get)(e,[r],e)}function na(e){return(0,c.get)(e,"position",T.BOTTOM)}var xx=function(e){(0,d.__extends)(r,e);function r(t){var i=e.call(this,t)||this;return i.container=i.view.getLayer(Z.FORE).addGroup(),i}return Object.defineProperty(r.prototype,"name",{get:function(){return"legend"},enumerable:!1,configurable:!0}),r.prototype.init=function(){},r.prototype.render=function(){this.update()},r.prototype.layout=function(){var t=this;this.layoutBBox=this.view.viewBBox,(0,c.each)(this.components,function(i){var n=i.component,a=i.direction,o=To(a),s=n.get("maxWidthRatio"),l=n.get("maxHeightRatio"),u=t.getCategoryLegendSizeCfg(o,s,l),h=n.get("maxWidth"),f=n.get("maxHeight");n.update({maxWidth:Math.min(u.maxWidth,h||0),maxHeight:Math.min(u.maxHeight,f||0)});var v=n.get("padding"),g=n.getLayoutBBox(),p=new Ae(g.x,g.y,g.width,g.height).expand(v),y=(0,d.__read)(Fr(t.view.viewBBox,p,a),2),m=y[0],x=y[1],_=(0,d.__read)(Fr(t.layoutBBox,p,a),2),w=_[0],b=_[1],S=0,C=0;a.startsWith("top")||a.startsWith("bottom")?(S=m,C=b):(S=w,C=x),n.setLocation({x:S+v[3],y:C+v[0]}),t.layoutBBox=t.layoutBBox.cut(p,a)})},r.prototype.update=function(){var t=this;this.option=this.view.getOptions().legends;var i={},n=function(v,g,p){var y=t.getId(p.field),m=t.getComponentById(y);if(m){var x=void 0,_=xc(t.option,p.field);_!==!1&&((0,c.get)(_,"custom")?x=t.getCategoryCfg(v,g,p,_,!0):p.isLinear?x=t.getContinuousCfg(v,g,p,_):p.isCategory&&(x=t.getCategoryCfg(v,g,p,_))),x&&(Me(x,["container"]),m.direction=na(_),m.component.update(x),i[y]=!0)}else{var w=t.createFieldLegend(v,g,p);w&&(w.component.init(),t.components.push(w),i[y]=!0)}};if((0,c.get)(this.option,"custom")){var a="global-custom",o=this.getComponentById(a);if(o){var s=this.getCategoryCfg(void 0,void 0,void 0,this.option,!0);Me(s,["container"]),o.component.update(s),i[a]=!0}else{var l=this.createCustomLegend(void 0,void 0,void 0,this.option);if(l){l.init();var u=Z.FORE,h=na(this.option);this.components.push({id:a,component:l,layer:u,direction:h,type:z.LEGEND,extra:void 0}),i[a]=!0}}}else this.loopLegends(n);var f=[];(0,c.each)(this.getComponents(),function(v){i[v.id]?f.push(v):v.component.destroy()}),this.components=f},r.prototype.clear=function(){e.prototype.clear.call(this),this.container.clear()},r.prototype.destroy=function(){e.prototype.destroy.call(this),this.container.remove(!0)},r.prototype.getGeometries=function(t){var i=this,n=t.geometries;return(0,c.each)(t.views,function(a){n=n.concat(i.getGeometries(a))}),n},r.prototype.loopLegends=function(t){var i=this.view.getRootView()===this.view;if(!!i){var n=this.getGeometries(this.view),a={};(0,c.each)(n,function(o){var s=o.getGroupAttributes();(0,c.each)(s,function(l){var u=l.getScale(l.type);!u||u.type==="identity"||a[u.field]||(t(o,l,u),a[u.field]=!0)})})}},r.prototype.createFieldLegend=function(t,i,n){var a,o=xc(this.option,n.field),s=Z.FORE,l=na(o);if(o!==!1&&((0,c.get)(o,"custom")?a=this.createCustomLegend(t,i,n,o):n.isLinear?a=this.createContinuousLegend(t,i,n,o):n.isCategory&&(a=this.createCategoryLegend(t,i,n,o))),a)return a.set("field",n.field),{id:this.getId(n.field),component:a,layer:s,direction:l,type:z.LEGEND,extra:{scale:n}}},r.prototype.createCustomLegend=function(t,i,n,a){var o=this.getCategoryCfg(t,i,n,a,!0);return new kl(o)},r.prototype.createContinuousLegend=function(t,i,n,a){var o=this.getContinuousCfg(t,i,n,Me(a,["value"]));return new pp(o)},r.prototype.createCategoryLegend=function(t,i,n,a){var o=this.getCategoryCfg(t,i,n,a);return new kl(o)},r.prototype.getContinuousCfg=function(t,i,n,a){var o=n.getTicks(),s=(0,c.find)(o,function(y){return y.value===0}),l=(0,c.find)(o,function(y){return y.value===1}),u=o.map(function(y){var m=y.value,x=y.tickValue,_=i.mapping(n.invert(m)).join("");return{value:x,attrValue:_,color:_,scaleValue:m}});s||u.push({value:n.min,attrValue:i.mapping(n.invert(0)).join(""),color:i.mapping(n.invert(0)).join(""),scaleValue:0}),l||u.push({value:n.max,attrValue:i.mapping(n.invert(1)).join(""),color:i.mapping(n.invert(1)).join(""),scaleValue:1}),u.sort(function(y,m){return y.value-m.value});var h={min:(0,c.head)(u).value,max:(0,c.last)(u).value,colors:[],rail:{type:i.type},track:{}};i.type==="size"&&(h.track={style:{fill:i.type==="size"?this.view.getTheme().defaultColor:void 0}}),i.type==="color"&&(h.colors=u.map(function(y){return y.attrValue}));var f=this.container,v=na(a),g=To(v),p=(0,c.get)(a,"title");return p&&(p=(0,c.deepMix)({text:Xi(n)},p)),h.container=f,h.layout=g,h.title=p,h.animateOption=hi,this.mergeLegendCfg(h,a,"continuous")},r.prototype.getCategoryCfg=function(t,i,n,a,o){var s=this.container,l=(0,c.get)(a,"position",T.BOTTOM),u=Pu(this.view.getTheme(),l),h=(0,c.get)(u,["marker"]),f=(0,c.get)(a,"marker"),v=To(l),g=(0,c.get)(u,["pageNavigator"]),p=(0,c.get)(a,"pageNavigator"),y=o?$y(h,f,a.items):Ou(this.view,t,i,h,f),m=(0,c.get)(a,"title");m&&(m=(0,c.deepMix)({text:n?Xi(n):""},m));var x=(0,c.get)(a,"maxWidthRatio"),_=(0,c.get)(a,"maxHeightRatio"),w=this.getCategoryLegendSizeCfg(v,x,_);w.container=s,w.layout=v,w.items=y,w.title=m,w.animateOption=hi,w.pageNavigator=(0,c.deepMix)({},g,p);var b=this.mergeLegendCfg(w,a,l);b.reversed&&b.items.reverse();var S=(0,c.get)(b,"maxItemWidth");return S&&S<=1&&(b.maxItemWidth=this.view.viewBBox.width*S),b},r.prototype.mergeLegendCfg=function(t,i,n){var a=n.split("-")[0],o=Pu(this.view.getTheme(),a);return(0,c.deepMix)({},o,t,i)},r.prototype.getId=function(t){return"".concat(this.name,"-").concat(t)},r.prototype.getComponentById=function(t){return(0,c.find)(this.components,function(i){return i.id===t})},r.prototype.getCategoryLegendSizeCfg=function(t,i,n){i===void 0&&(i=$t),n===void 0&&(n=$t);var a=this.view.viewBBox,o=a.width,s=a.height;return t==="vertical"?{maxWidth:o*i,maxHeight:s}:{maxWidth:o,maxHeight:s*n}},r}(ci),_x=xx,wx=function(e){(0,d.__extends)(r,e);function r(t){var i=e.call(this,t)||this;return i.onChangeFn=c.noop,i.resetMeasure=function(){i.clear()},i.onValueChange=function(n){var a=(0,d.__read)(n,2),o=a[0],s=a[1];i.start=o,i.end=s,i.changeViewData(o,s)},i.container=i.view.getLayer(Z.FORE).addGroup(),i.onChangeFn=(0,c.throttle)(i.onValueChange,20,{leading:!0}),i.width=0,i.view.on(A.BEFORE_CHANGE_DATA,i.resetMeasure),i.view.on(A.BEFORE_CHANGE_SIZE,i.resetMeasure),i}return Object.defineProperty(r.prototype,"name",{get:function(){return"slider"},enumerable:!1,configurable:!0}),r.prototype.destroy=function(){e.prototype.destroy.call(this),this.view.off(A.BEFORE_CHANGE_DATA,this.resetMeasure),this.view.off(A.BEFORE_CHANGE_SIZE,this.resetMeasure)},r.prototype.init=function(){},r.prototype.render=function(){this.option=this.view.getOptions().slider;var t=this.getSliderCfg(),i=t.start,n=t.end;(0,c.isNil)(this.start)&&(this.start=i,this.end=n);var a=this.view.getOptions().data;this.option&&!(0,c.isEmpty)(a)?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)},r.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 i=this.view.coordinateBBox.width,n=this.slider.component.get("padding"),a=(0,d.__read)(n,4),o=a[0],s=a[1],l=a[2],u=a[3],h=this.slider.component.getLayoutBBox(),f=new Ae(h.x,h.y,Math.min(h.width,i),h.height).expand(n),v=this.getMinMaxText(this.start,this.end),g=v.minText,p=v.maxText,y=(0,d.__read)(Fr(this.view.viewBBox,f,T.BOTTOM),2),m=y[0],x=y[1],_=(0,d.__read)(Fr(this.view.coordinateBBox,f,T.BOTTOM),2),w=_[0],b=_[1];this.slider.component.update((0,d.__assign)((0,d.__assign)({},this.getSliderCfg()),{x:w+u,y:x+o,width:this.width,start:this.start,end:this.end,minText:g,maxText:p})),this.view.viewBBox=this.view.viewBBox.cut(f,T.BOTTOM)}},r.prototype.update=function(){this.render()},r.prototype.createSlider=function(){var t=this.getSliderCfg(),i=new up((0,d.__assign)({container:this.container},t));return i.init(),{component:i,layer:Z.FORE,direction:T.BOTTOM,type:z.SLIDER}},r.prototype.updateSlider=function(){var t=this.getSliderCfg();if(this.width){var i=this.getMinMaxText(this.start,this.end),n=i.minText,a=i.maxText;t=(0,d.__assign)((0,d.__assign)({},t),{width:this.width,start:this.start,end:this.end,minText:n,maxText:a})}return this.slider.component.update(t),this.slider},r.prototype.measureSlider=function(){var t=this.getSliderCfg().width;this.width=t},r.prototype.getSliderCfg=function(){var t={height:16,start:0,end:1,minText:"",maxText:"",x:0,y:0,width:this.view.coordinateBBox.width};if((0,c.isObject)(this.option)){var i=(0,d.__assign)({data:this.getData()},(0,c.get)(this.option,"trendCfg",{}));t=(0,c.deepMix)({},t,this.getThemeOptions(),this.option),t=(0,d.__assign)((0,d.__assign)({},t),{trendCfg:i})}return t.start=(0,c.clamp)(Math.min((0,c.isNil)(t.start)?0:t.start,(0,c.isNil)(t.end)?1:t.end),0,1),t.end=(0,c.clamp)(Math.max((0,c.isNil)(t.start)?0:t.start,(0,c.isNil)(t.end)?1:t.end),0,1),t},r.prototype.getData=function(){var t=this.view.getOptions().data,i=(0,d.__read)(this.view.getYScales(),1),n=i[0],a=this.view.getGroupScales();if(a.length){var o=a[0],s=o.field,l=o.ticks;return t.reduce(function(u,h){return h[s]===l[0]&&u.push(h[n.field]),u},[])}return t.map(function(u){return u[n.field]||0})},r.prototype.getThemeOptions=function(){var t=this.view.getTheme();return(0,c.get)(t,["components","slider","common"],{})},r.prototype.getMinMaxText=function(t,i){var n=this.view.getOptions().data,a=this.view.getXScale(),o=!0,s=(0,c.valuesOfKey)(n,a.field);a.isLinear&&(s=s.sort());var l=o?s:s.reverse(),u=(0,c.size)(n);if(!a||!u)return{};var h=(0,c.size)(l),f=Math.floor(t*(h-1)),v=Math.floor(i*(h-1)),g=(0,c.get)(l,[f]),p=(0,c.get)(l,[v]),y=this.getSliderCfg().formatter;return y&&(g=y(g,n[f],f),p=y(p,n[v],v)),{minText:g,maxText:p}},r.prototype.changeViewData=function(t,i){var n=this.view.getOptions().data,a=this.view.getXScale(),o=(0,c.size)(n);if(!(!a||!o)){var s=!0,l=(0,c.valuesOfKey)(n,a.field),u=this.view.getXScale().isLinear?l.sort(function(p,y){return Number(p)-Number(y)}):l,h=s?u:u.reverse(),f=(0,c.size)(h),v=Math.floor(t*(f-1)),g=Math.floor(i*(f-1));this.view.filter(a.field,function(p,y){var m=h.indexOf(p);return m>-1?ni(m,v,g):!0}),this.view.render(!0)}},r.prototype.getComponents=function(){return this.slider?[this.slider]:[]},r.prototype.clear=function(){this.slider&&(this.slider.component.destroy(),this.slider=void 0),this.width=0,this.start=void 0,this.end=void 0},r}(ci),bx=wx,aa=0,_c=8,Sx=32,Cx=20,Ax=function(e){(0,d.__extends)(r,e);function r(t){var i=e.call(this,t)||this;return i.onChangeFn=c.noop,i.resetMeasure=function(){i.clear()},i.onValueChange=function(n){var a=n.ratio,o=i.getValidScrollbarCfg().animate;i.ratio=(0,c.clamp)(a,0,1);var s=i.view.getOptions().animate;o||i.view.animate(!1),i.changeViewData(i.getScrollRange(),!0),i.view.animate(s)},i.container=i.view.getLayer(Z.FORE).addGroup(),i.onChangeFn=(0,c.throttle)(i.onValueChange,20,{leading:!0}),i.trackLen=0,i.thumbLen=0,i.ratio=0,i.view.on(A.BEFORE_CHANGE_DATA,i.resetMeasure),i.view.on(A.BEFORE_CHANGE_SIZE,i.resetMeasure),i}return Object.defineProperty(r.prototype,"name",{get:function(){return"scrollbar"},enumerable:!1,configurable:!0}),r.prototype.destroy=function(){e.prototype.destroy.call(this),this.view.off(A.BEFORE_CHANGE_DATA,this.resetMeasure),this.view.off(A.BEFORE_CHANGE_SIZE,this.resetMeasure)},r.prototype.init=function(){},r.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)},r.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 i=this.view.coordinateBBox.width,n=this.scrollbar.component.get("padding"),a=this.scrollbar.component.getLayoutBBox(),o=new Ae(a.x,a.y,Math.min(a.width,i),a.height).expand(n),s=this.getScrollbarComponentCfg(),l=void 0,u=void 0;if(s.isHorizontal){var h=(0,d.__read)(Fr(this.view.viewBBox,o,T.BOTTOM),2),f=h[0],v=h[1],g=(0,d.__read)(Fr(this.view.coordinateBBox,o,T.BOTTOM),2),p=g[0],y=g[1];l=p,u=v}else{var m=(0,d.__read)(Fr(this.view.viewBBox,o,T.RIGHT),2),f=m[0],v=m[1],x=(0,d.__read)(Fr(this.view.viewBBox,o,T.RIGHT),2),p=x[0],y=x[1];l=p,u=v}l+=n[3],u+=n[0],this.trackLen?this.scrollbar.component.update((0,d.__assign)((0,d.__assign)({},s),{x:l,y:u,trackLen:this.trackLen,thumbLen:this.thumbLen,thumbOffset:(this.trackLen-this.thumbLen)*this.ratio})):this.scrollbar.component.update((0,d.__assign)((0,d.__assign)({},s),{x:l,y:u})),this.view.viewBBox=this.view.viewBBox.cut(o,s.isHorizontal?T.BOTTOM:T.RIGHT)}},r.prototype.update=function(){this.render()},r.prototype.getComponents=function(){return this.scrollbar?[this.scrollbar]:[]},r.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=[]},r.prototype.setValue=function(t){this.onValueChange({ratio:t})},r.prototype.getValue=function(){return this.ratio},r.prototype.getThemeOptions=function(){var t=this.view.getTheme();return(0,c.get)(t,["components","scrollbar","common"],{})},r.prototype.getScrollbarTheme=function(t){var i=(0,c.get)(this.view.getTheme(),["components","scrollbar"]),n=t||{},a=n.thumbHighlightColor,o=(0,d.__rest)(n,["thumbHighlightColor"]);return{default:(0,c.deepMix)({},(0,c.get)(i,["default","style"],{}),o),hover:(0,c.deepMix)({},(0,c.get)(i,["hover","style"],{}),{thumbColor:a})}},r.prototype.measureScrollbar=function(){var t=this.view.getXScale(),i=this.view.getYScales().slice();this.data=this.getScrollbarData(),this.step=this.getStep(),this.cnt=this.getCnt();var n=this.getScrollbarComponentCfg(),a=n.trackLen,o=n.thumbLen;this.trackLen=a,this.thumbLen=o,this.xScaleCfg={field:t.field,values:t.values||[]},this.yScalesCfg=i},r.prototype.getScrollRange=function(){var t=Math.floor((this.cnt-this.step)*(0,c.clamp)(this.ratio,0,1)),i=Math.min(t+this.step-1,this.cnt-1);return[t,i]},r.prototype.changeViewData=function(t,i){var n=this,a=(0,d.__read)(t,2),o=a[0],s=a[1],l=this.getValidScrollbarCfg().type,u=l!=="vertical",h=(0,c.valuesOfKey)(this.data,this.xScaleCfg.field),f=this.view.getXScale().isLinear?h.sort(function(g,p){return Number(g)-Number(p)}):h,v=u?f:f.reverse();this.yScalesCfg.forEach(function(g){n.view.scale(g.field,{formatter:g.formatter,type:g.type,min:g.min,max:g.max,tickMethod:g.tickMethod})}),this.view.filter(this.xScaleCfg.field,function(g){var p=v.indexOf(g);return p>-1?ni(p,o,s):!0}),this.view.render(!0)},r.prototype.createScrollbar=function(){var t=this.getValidScrollbarCfg().type,i=t!=="vertical",n=new hp((0,d.__assign)((0,d.__assign)({container:this.container},this.getScrollbarComponentCfg()),{x:0,y:0}));return n.init(),{component:n,layer:Z.FORE,direction:i?T.BOTTOM:T.RIGHT,type:z.SCROLLBAR}},r.prototype.updateScrollbar=function(){var t=this.getScrollbarComponentCfg(),i=this.trackLen?(0,d.__assign)((0,d.__assign)({},t),{trackLen:this.trackLen,thumbLen:this.thumbLen,thumbOffset:(this.trackLen-this.thumbLen)*this.ratio}):(0,d.__assign)({},t);return this.scrollbar.component.update(i),this.scrollbar},r.prototype.getStep=function(){if(this.step)return this.step;var t=this.view.coordinateBBox,i=this.getValidScrollbarCfg(),n=i.type,a=i.categorySize,o=n!=="vertical";return Math.floor((o?t.width:t.height)/a)},r.prototype.getCnt=function(){if(this.cnt)return this.cnt;var t=this.view.getXScale(),i=this.getScrollbarData(),n=(0,c.valuesOfKey)(i,t.field);return(0,c.size)(n)},r.prototype.getScrollbarComponentCfg=function(){var t=this.view,i=t.coordinateBBox,n=t.viewBBox,a=this.getValidScrollbarCfg(),o=a.type,s=a.padding,l=a.width,u=a.height,h=a.style,f=o!=="vertical",v=(0,d.__read)(s,4),g=v[0],p=v[1],y=v[2],m=v[3],x=f?{x:i.minX+m,y:n.maxY-u-y}:{x:n.maxX-l-p,y:i.minY+g},_=this.getStep(),w=this.getCnt(),b=f?i.width-m-p:i.height-g-y,S=Math.max(b*(0,c.clamp)(_/w,0,1),Cx);return(0,d.__assign)((0,d.__assign)({},this.getThemeOptions()),{x:x.x,y:x.y,size:f?u:l,isHorizontal:f,trackLen:b,thumbLen:S,thumbOffset:0,theme:this.getScrollbarTheme(h)})},r.prototype.getValidScrollbarCfg=function(){var t={type:"horizontal",categorySize:Sx,width:_c,height:_c,padding:[0,0,0,0],animate:!0,style:{}};return(0,c.isObject)(this.option)&&(t=(0,d.__assign)((0,d.__assign)({},t),this.option)),(!(0,c.isObject)(this.option)||!this.option.padding)&&(t.padding=t.type==="horizontal"?[aa,0,aa,0]:[0,aa,0,aa]),t},r.prototype.getScrollbarData=function(){var t=this.view.getCoordinate(),i=this.getValidScrollbarCfg(),n=this.view.getOptions().data||[];return t.isReflect("y")&&i.type==="vertical"&&(n=(0,d.__spreadArray)([],(0,d.__read)(n),!1).reverse()),n},r}(ci),Fx=Ax,Ex={fill:"#CCD6EC",opacity:.3};function Mx(e,r,t){var i,n,a,o,s,l,u=gy(e,r,t);if(u.length){u=(0,c.flatten)(u);try{for(var h=(0,d.__values)(u),f=h.next();!f.done;f=h.next()){var v=f.value;try{for(var g=(a=void 0,(0,d.__values)(v)),p=g.next();!p.done;p=g.next()){var y=p.value,m=y.mappingData,x=m.x,_=m.y;y.x=(0,c.isArray)(x)?x[x.length-1]:x,y.y=(0,c.isArray)(_)?_[_.length-1]:_}}catch(I){a={error:I}}finally{try{p&&!p.done&&(o=g.return)&&o.call(g)}finally{if(a)throw a.error}}}}catch(I){i={error:I}}finally{try{f&&!f.done&&(n=h.return)&&n.call(h)}finally{if(i)throw i.error}}var w=t.shared;if(w===!1&&u.length>1){var b=u[0],S=Math.abs(r.y-b[0].y);try{for(var C=(0,d.__values)(u),M=C.next();!M.done;M=C.next()){var L=M.value,B=Math.abs(r.y-L[0].y);B<=S&&(b=L,S=B)}}catch(I){s={error:I}}finally{try{M&&!M.done&&(l=C.return)&&l.call(C)}finally{if(s)throw s.error}}u=[b]}return(0,c.uniq)((0,c.flatten)(u))}return[]}var Tx=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.show=function(t){var i=this.context.view,n=this.context.event,a=i.getController("tooltip").getTooltipCfg(),o=Mx(i,{x:n.x,y:n.y},a);if(!(0,c.isEqual)(o,this.items)&&(this.items=o,o.length)){var s=i.getXScale().field,l=o[0].data[s],u=[],h=i.geometries;if((0,c.each)(h,function(ct){if(ct.type==="interval"||ct.type==="schema"){var nt=ct.getElementsBy(function(lt){var xt=lt.getData();return xt[s]===l});u=u.concat(nt)}}),u.length){var f=i.getCoordinate(),v=u[0].shape.getCanvasBBox(),g=u[0].shape.getCanvasBBox(),p=v;(0,c.each)(u,function(ct){var nt=ct.shape.getCanvasBBox();f.isTransposed?(nt.minY<v.minY&&(v=nt),nt.maxY>g.maxY&&(g=nt)):(nt.minX<v.minX&&(v=nt),nt.maxX>g.maxX&&(g=nt)),p.x=Math.min(nt.minX,p.minX),p.y=Math.min(nt.minY,p.minY),p.width=Math.max(nt.maxX,p.maxX)-p.x,p.height=Math.max(nt.maxY,p.maxY)-p.y});var y=i.backgroundGroup,m=i.coordinateBBox,x=void 0;if(f.isRect){var _=i.getXScale(),w=t||{},b=w.appendRatio,S=w.appendWidth;(0,c.isNil)(S)&&(b=(0,c.isNil)(b)?_.isLinear?0:.25:b,S=f.isTransposed?b*g.height:b*v.width);var C=void 0,M=void 0,L=void 0,B=void 0;f.isTransposed?(C=m.minX,M=Math.min(g.minY,v.minY)-S,L=m.width,B=p.height+S*2):(C=Math.min(v.minX,g.minX)-S,M=m.minY,L=p.width+S*2,B=m.height),x=[["M",C,M],["L",C+L,M],["L",C+L,M+B],["L",C,M+B],["Z"]]}else{var I=(0,c.head)(u),G=(0,c.last)(u),q=Hi(I.getModel(),f).startAngle,ft=Hi(G.getModel(),f).endAngle,mt=f.getCenter(),zt=f.getRadius(),H=f.innerRadius*zt;x=mr(mt.x,mt.y,zt,q,ft,H)}if(this.regionPath)this.regionPath.attr("path",x),this.regionPath.show();else{var tt=(0,c.get)(t,"style",Ex);this.regionPath=y.addShape({type:"path",name:"active-region",capture:!1,attrs:(0,d.__assign)((0,d.__assign)({},tt),{path:x})})}}}},r.prototype.hide=function(){this.regionPath&&this.regionPath.hide(),this.items=null},r.prototype.destroy=function(){this.hide(),this.regionPath&&this.regionPath.remove(!0),e.prototype.destroy.call(this)},r}(ie),Lx=Tx,Ix=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.timeStamp=0,t}return r.prototype.show=function(){var t=this.context,i=t.event,n=t.view,a=n.isTooltipLocked();if(!a){var o=this.timeStamp,s=+new Date,l=(0,c.get)(t.view.getOptions(),"tooltip.showDelay",16);if(s-o>l){var u=this.location,h={x:i.x,y:i.y};(!u||!(0,c.isEqual)(u,h))&&this.showTooltip(n,h),this.timeStamp=s,this.location=h}}},r.prototype.hide=function(){var t=this.context.view,i=t.getController("tooltip"),n=this.context.event,a=n.clientX,o=n.clientY;i.isCursorEntered({x:a,y:o})||t.isTooltipLocked()||(this.hideTooltip(t),this.location=null)},r.prototype.showTooltip=function(t,i){t.showTooltip(i)},r.prototype.hideTooltip=function(t){t.hideTooltip()},r}(ie),wc=Ix,Ox=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.showTooltip=function(t,i){var n=$e(t);(0,c.each)(n,function(a){var o=_o(t,a,i);a.showTooltip(o)})},r.prototype.hideTooltip=function(t){var i=$e(t);(0,c.each)(i,function(n){n.hideTooltip()})},r}(wc),Px=Ox,Dx=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.timeStamp=0,t}return r.prototype.destroy=function(){e.prototype.destroy.call(this),this.tooltip&&this.tooltip.destroy()},r.prototype.show=function(){var t=this.context,i=t.event,n=this.timeStamp,a=+new Date;if(a-n>16){var o=this.location,s={x:i.x,y:i.y};(!o||!(0,c.isEqual)(o,s))&&this.showTooltip(s),this.timeStamp=a,this.location=s}},r.prototype.hide=function(){this.hideTooltip(),this.location=null},r.prototype.showTooltip=function(t){var i=this.context,n=i.event,a=n.target;if(a&&a.get("tip")){this.tooltip||this.renderTooltip();var o=a.get("tip");this.tooltip.update((0,d.__assign)({title:o},t)),this.tooltip.show()}},r.prototype.hideTooltip=function(){this.tooltip&&this.tooltip.hide()},r.prototype.renderTooltip=function(){var t,i=this.context.view,n=i.canvas,a={start:{x:0,y:0},end:{x:n.get("width"),y:n.get("height")}},o=i.getTheme(),s=(0,c.get)(o,["components","tooltip","domStyles"],{}),l=new kn({parent:n.get("el").parentNode,region:a,visible:!1,crosshairs:null,domStyles:(0,d.__assign)({},(0,c.deepMix)({},s,(t={},t[or]={"max-width":"50%"},t[sr]={"word-break":"break-all"},t)))});l.init(),l.setCapture(!1),this.tooltip=l},r}(ie),kx=Dx,Bx=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="",t}return r.prototype.hasState=function(t){return t.hasState(this.stateName)},r.prototype.setElementState=function(t,i){t.setState(this.stateName,i)},r.prototype.setState=function(){this.setStateEnable(!0)},r.prototype.clear=function(){var t=this.context.view;this.clearViewState(t)},r.prototype.clearViewState=function(t){var i=this,n=tu(t,this.stateName);(0,c.each)(n,function(a){i.setElementState(a,!1)})},r}(ie),Zo=Bx;function bc(e){return(0,c.get)(e.get("delegateObject"),"item")}var Rx=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.ignoreListItemStates=["unchecked"],t}return r.prototype.isItemIgnore=function(t,i){var n=this.ignoreListItemStates,a=n.filter(function(o){return i.hasState(t,o)});return!!a.length},r.prototype.setStateByComponent=function(t,i,n){var a=this.context.view,o=t.get("field"),s=we(a);this.setElementsStateByItem(s,o,i,n)},r.prototype.setStateByElement=function(t,i){this.setElementState(t,i)},r.prototype.isMathItem=function(t,i,n){var a=this.context.view,o=li(a,i),s=je(t,i);return!(0,c.isNil)(s)&&n.name===o.getText(s)},r.prototype.setElementsStateByItem=function(t,i,n,a){var o=this;(0,c.each)(t,function(s){o.isMathItem(s,i,n)&&s.setState(o.stateName,a)})},r.prototype.setStateEnable=function(t){var i=_r(this.context);if(i)$l(this.context)&&this.setStateByElement(i,t);else{var n=Rr(this.context);if(Ui(n)){var a=n.item,o=n.component;if(a&&o&&!this.isItemIgnore(a,o)){var s=this.context.event.gEvent;if(s&&s.fromShape&&s.toShape&&bc(s.fromShape)===bc(s.toShape))return;this.setStateByComponent(o,a,t)}}}},r.prototype.toggle=function(){var t=_r(this.context);if(t){var i=t.hasState(this.stateName);this.setElementState(t,!i)}},r.prototype.reset=function(){this.setStateEnable(!1)},r}(Zo),Ko=Rx,Nx=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="active",t}return r.prototype.active=function(){this.setState()},r}(Ko),zx=Nx,Vx=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.cache={},t}return r.prototype.getColorScale=function(t,i){var n=i.geometry.getAttribute("color");if(!n)return null;var a=t.getScaleByField(n.getFields()[0]);return a},r.prototype.getLinkPath=function(t,i){var n=this.context.view,a=n.getCoordinate().isTransposed,o=t.shape.getCanvasBBox(),s=i.shape.getCanvasBBox(),l=a?[["M",o.minX,o.minY],["L",s.minX,s.maxY],["L",s.maxX,s.maxY],["L",o.maxX,o.minY],["Z"]]:[["M",o.maxX,o.minY],["L",s.minX,s.minY],["L",s.minX,s.maxY],["L",o.maxX,o.maxY],["Z"]];return l},r.prototype.addLinkShape=function(t,i,n,a){var o={opacity:.4,fill:i.shape.attr("fill")};t.addShape({type:"path",attrs:(0,d.__assign)((0,d.__assign)({},(0,c.deepMix)({},o,(0,c.isFunction)(a)?a(o,i):a)),{path:this.getLinkPath(i,n)})})},r.prototype.linkByElement=function(t,i){var n=this,a=this.context.view,o=this.getColorScale(a,t);if(!!o){var s=je(t,o.field);if(!this.cache[s]){var l=Hp(a,o.field,s),u=this.linkGroup,h=u.addGroup();this.cache[s]=h;var f=l.length;(0,c.each)(l,function(v,g){if(g<f-1){var p=l[g+1];n.addLinkShape(h,v,p,i)}})}}},r.prototype.removeLink=function(t){var i=this.getColorScale(this.context.view,t);if(!!i){var n=je(t,i.field);this.cache[n]&&(this.cache[n].remove(),this.cache[n]=null)}},r.prototype.link=function(t){var i=this.context;this.linkGroup||(this.linkGroup=i.view.foregroundGroup.addGroup({id:"link-by-color-group",capture:!1}));var n=_r(i);n&&this.linkByElement(n,t==null?void 0:t.style)},r.prototype.unlink=function(){var t=_r(this.context);t&&this.removeLink(t)},r.prototype.clear=function(){this.linkGroup&&this.linkGroup.clear(),this.cache={}},r.prototype.destroy=function(){e.prototype.destroy.call(this),this.linkGroup&&this.linkGroup.remove()},r}(ie),Gx=Vx,Wx=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.startPoint=null,t.endPoint=null,t.isStarted=!1,t.effectSiblings=!1,t.effectByRecord=!1,t}return r.prototype.getCurrentPoint=function(){var t=this.context.event;return{x:t.x,y:t.y}},r.prototype.start=function(){this.clear(),this.startPoint=this.getCurrentPoint(),this.isStarted=!0},r.prototype.getIntersectElements=function(){var t=null;if(Zi(this.context))t=yo(this.context,10);else{var i=this.startPoint,n=this.isStarted?this.getCurrentPoint():this.endPoint;if(!i||!n)return;var a={minX:Math.min(i.x,n.x),minY:Math.min(i.y,n.y),maxX:Math.max(i.x,n.x),maxY:Math.max(i.y,n.y)},o=this.context.view;t=mo(o,a)}return t},r.prototype.setStateEnable=function(t){if(this.effectSiblings&&!this.effectByRecord)this.setSiblingsState(t);else{var i=we(this.context.view),n=this.getIntersectElements();n&&n.length?this.effectByRecord?this.setSiblingsStateByRecord(n,t):this.setElementsState(n,t,i):this.clear()}},r.prototype.setSiblingsStateByRecord=function(t,i){var n=this,a=this.context.view,o=$e(a),s=t.map(function(h){return h.getModel().data}),l=a.getXScale().field,u=a.getYScales()[0].field;(0,c.each)(o,function(h){var f=we(h),v=f.filter(function(g){var p=g.getModel().data;return nu(s,p,l,u)});n.setElementsState(v,i,f)})},r.prototype.setSiblingsState=function(t){var i=this,n=this.context.view,a=$e(n);Zi(this.context)&&(0,c.each)(a,function(o){var s=we(o),l=Jl(i.context,o,10);l&&l.length?i.setElementsState(l,t,s):i.clearViewState(o)})},r.prototype.setElementsState=function(t,i,n){var a=this;(0,c.each)(n,function(o){t.includes(o)?a.setElementState(o,i):a.setElementState(o,!1)})},r.prototype.end=function(){this.isStarted=!1,this.endPoint=this.getCurrentPoint()},r.prototype.clear=function(){var t=this,i=this.context.view;if(this.effectSiblings){var n=$e(i);(0,c.each)(n,function(a){t.clearViewState(a)})}else this.clearViewState(i)},r}(Zo),qo=Wx,Hx=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="active",t}return r.prototype.active=function(){this.setState()},r}(qo),Yx=Hx,Xx=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.setStateEnable=function(t){var i=_r(this.context);if(i){if(!$l(this.context))return;t?(this.clear(),this.setElementState(i,!0)):this.hasState(i)&&this.setElementState(i,!1)}},r.prototype.toggle=function(){var t=_r(this.context);if(t){var i=this.hasState(t);i||this.clear(),this.setElementState(t,!i)}},r.prototype.reset=function(){this.setStateEnable(!1)},r}(Zo),$o=Xx,jx=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="active",t}return r.prototype.active=function(){this.setState()},r}($o),Ux=jx,tn="inactive",en="active";function Qo(e){var r=we(e);(0,c.each)(r,function(t){t.hasState(en)&&t.setState(en,!1),t.hasState(tn)&&t.setState(tn,!1)})}function Sc(e,r,t){(0,c.each)(e,function(i){r(i)?(i.hasState(tn)&&i.setState(tn,!1),i.setState(en,t)):(i.hasState(en)&&i.setState(en,!1),i.setState(tn,t))})}var Vr=et.INACTIVE,ur=et.ACTIVE,Zx=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName=ur,t}return r.prototype.setElementsStateByItem=function(t,i,n,a){var o=this,s=function(l){return o.isMathItem(l,i,n)};this.setHighlightBy(t,s,a)},r.prototype.setElementHighlight=function(t,i){i(t)?(t.hasState(Vr)&&t.setState(Vr,!1),t.setState(ur,!0)):t.hasState(ur)||t.setState(Vr,!0)},r.prototype.setHighlightBy=function(t,i,n){var a=this;if(n)(0,c.each)(t,function(l){a.setElementHighlight(l,i)});else{var o=tu(this.context.view,ur),s=!0;(0,c.each)(o,function(l){if(!i(l))return s=!1,!1}),s?this.clear():(0,c.each)(t,function(l){i(l)&&(l.hasState(ur)&&l.setState(ur,!1),l.setState(Vr,!0))})}},r.prototype.setElementState=function(t,i){var n=this.context.view,a=we(n);this.setHighlightBy(a,function(o){return t===o},i)},r.prototype.highlight=function(){this.setState()},r.prototype.clear=function(){var t=this.context.view;Qo(t)},r}(Ko),Jo=Zx,Kx=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.setStateByElement=function(t,i){var n=this.context.view,a=t.geometry.getAttribute("color");if(!!a){var o=n.getScaleByField(a.getFields()[0]),s=je(t,o.field),l=we(n),u=l.filter(function(h){return je(h,o.field)===s});this.setHighlightBy(l,function(h){return u.includes(h)},i)}},r}(Jo),qx=Kx,$x=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.setElementHighlight=function(t,i){i(t)?(t.hasState(Vr)&&t.setState(Vr,!1),t.setState(ur,!0)):(t.setState(Vr,!0),t.hasState(ur)&&t.setState(ur,!1))},r.prototype.setStateByElement=function(t,i){var n=this.context.view,a=n.getXScale(),o=je(t,a.field),s=we(n),l=s.filter(function(u){return je(u,a.field)===o});this.setHighlightBy(s,function(u){return l.includes(u)},i)},r.prototype.toggle=function(){var t=_r(this.context);if(t){var i=t.hasState(this.stateName);this.setStateByElement(t,!i)}},r}(Jo),Qx=$x,Je;(function(e){e.BEFORE_HIGHLIGHT="element-range-highlight:beforehighlight",e.AFTER_HIGHLIGHT="element-range-highlight:afterhighlight",e.BEFORE_CLEAR="element-range-highlight:beforeclear",e.AFTER_CLEAR="element-range-highlight:afterclear"})(Je||(Je={}));var Jx=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="active",t}return r.prototype.clearViewState=function(t){Qo(t)},r.prototype.highlight=function(){var t=this.context,i=t.view,n=t.event,a=this.getIntersectElements(),o={view:i,event:n,highlightElements:a};i.emit(Je.BEFORE_HIGHLIGHT,ne.fromData(i,Je.BEFORE_HIGHLIGHT,o)),this.setState(),i.emit(Je.AFTER_HIGHLIGHT,ne.fromData(i,Je.AFTER_HIGHLIGHT,o))},r.prototype.clear=function(){var t=this.context.view;t.emit(Je.BEFORE_CLEAR,ne.fromData(t,Je.BEFORE_CLEAR,{})),e.prototype.clear.call(this),t.emit(Je.AFTER_CLEAR,ne.fromData(t,Je.AFTER_CLEAR,{}))},r.prototype.setElementsState=function(t,i,n){Sc(n,function(a){return t.indexOf(a)>=0},i)},r}(qo),Cc=Jx,t_=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="active",t}return r.prototype.highlight=function(){this.setState()},r.prototype.setElementState=function(t,i){var n=this.context.view,a=we(n);Sc(a,function(o){return t===o},i)},r.prototype.clear=function(){var t=this.context.view;Qo(t)},r}($o),e_=t_,r_=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="selected",t}return r.prototype.selected=function(){this.setState()},r}(qo),i_=r_,n_=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="selected",t}return r.prototype.selected=function(){this.setState()},r}(Ko),a_=n_,o_=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="selected",t}return r.prototype.selected=function(){this.setState()},r}($o),s_=o_,l_=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="",t.ignoreItemStates=[],t}return r.prototype.getTriggerListInfo=function(){var t=Rr(this.context),i=null;return Ui(t)&&(i={item:t.item,list:t.component}),i},r.prototype.getAllowComponents=function(){var t=this,i=this.context.view,n=ru(i),a=[];return(0,c.each)(n,function(o){o.isList()&&t.allowSetStateByElement(o)&&a.push(o)}),a},r.prototype.hasState=function(t,i){return t.hasState(i,this.stateName)},r.prototype.clearAllComponentsState=function(){var t=this,i=this.getAllowComponents();(0,c.each)(i,function(n){n.clearItemsState(t.stateName)})},r.prototype.allowSetStateByElement=function(t){var i=t.get("field");if(!i)return!1;if(this.cfg&&this.cfg.componentNames){var n=t.get("name");if(this.cfg.componentNames.indexOf(n)===-1)return!1}var a=this.context.view,o=li(a,i);return o&&o.isCategory},r.prototype.allowSetStateByItem=function(t,i){var n=this.ignoreItemStates;if(n.length){var a=n.filter(function(o){return i.hasState(t,o)});return a.length===0}return!0},r.prototype.setStateByElement=function(t,i,n){var a=t.get("field"),o=this.context.view,s=li(o,a),l=je(i,a),u=s.getText(l);this.setItemsState(t,u,n)},r.prototype.setStateEnable=function(t){var i=this,n=_r(this.context);if(n){var a=this.getAllowComponents();(0,c.each)(a,function(u){i.setStateByElement(u,n,t)})}else{var o=Rr(this.context);if(Ui(o)){var s=o.item,l=o.component;this.allowSetStateByElement(l)&&this.allowSetStateByItem(s,l)&&this.setItemState(l,s,t)}}},r.prototype.setItemsState=function(t,i,n){var a=this,o=t.getItems();(0,c.each)(o,function(s){s.name===i&&a.setItemState(t,s,n)})},r.prototype.setItemState=function(t,i,n){t.setItemState(i,this.stateName,n)},r.prototype.setState=function(){this.setStateEnable(!0)},r.prototype.reset=function(){this.setStateEnable(!1)},r.prototype.toggle=function(){var t=this.getTriggerListInfo();if(t&&t.item){var i=t.list,n=t.item,a=this.hasState(i,n);this.setItemState(i,n,!a)}},r.prototype.clear=function(){var t=this.getTriggerListInfo();t?t.list.clearItemsState(this.stateName):this.clearAllComponentsState()},r}(ie),Gr=l_,u_=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="active",t}return r.prototype.active=function(){this.setState()},r}(Gr),c_=u_,Ac="inactive",Fc="active";function h_(e){var r=e.getItems();(0,c.each)(r,function(t){e.hasState(t,Fc)&&e.setItemState(t,Fc,!1),e.hasState(t,Ac)&&e.setItemState(t,Ac,!1)})}var rn="inactive",Wr="active",f_=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName=Wr,t.ignoreItemStates=["unchecked"],t}return r.prototype.setItemsState=function(t,i,n){this.setHighlightBy(t,function(a){return a.name===i},n)},r.prototype.setItemState=function(t,i,n){var a=t.getItems();this.setHighlightBy(t,function(o){return o===i},n)},r.prototype.setHighlightBy=function(t,i,n){var a=t.getItems();if(n)(0,c.each)(a,function(l){i(l)?(t.hasState(l,rn)&&t.setItemState(l,rn,!1),t.setItemState(l,Wr,!0)):t.hasState(l,Wr)||t.setItemState(l,rn,!0)});else{var o=t.getItemsByState(Wr),s=!0;(0,c.each)(o,function(l){if(!i(l))return s=!1,!1}),s?this.clear():(0,c.each)(a,function(l){i(l)&&(t.hasState(l,Wr)&&t.setItemState(l,Wr,!1),t.setItemState(l,rn,!0))})}},r.prototype.highlight=function(){this.setState()},r.prototype.clear=function(){var t=this.getTriggerListInfo();if(t)h_(t.list);else{var i=this.getAllowComponents();(0,c.each)(i,function(n){n.clearItemsState(Wr),n.clearItemsState(rn)})}},r}(Gr),ts=f_,v_=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="selected",t}return r.prototype.selected=function(){this.setState()},r}(Gr),d_=v_,g_=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="unchecked",t}return r.prototype.unchecked=function(){this.setState()},r}(Gr),p_=g_,vi="unchecked",oa="checked",y_=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName=oa,t}return r.prototype.setItemState=function(t,i,n){this.setCheckedBy(t,function(a){return a===i},n)},r.prototype.setCheckedBy=function(t,i,n){var a=t.getItems();n&&(0,c.each)(a,function(o){i(o)?(t.hasState(o,vi)&&t.setItemState(o,vi,!1),t.setItemState(o,oa,!0)):t.hasState(o,oa)||t.setItemState(o,vi,!0)})},r.prototype.toggle=function(){var t=this.getTriggerListInfo();if(t&&t.item){var i=t.list,n=t.item,a=!(0,c.some)(i.getItems(),function(o){return i.hasState(o,vi)});a||i.hasState(n,vi)?this.setItemState(i,n,!0):this.reset()}},r.prototype.checked=function(){this.setState()},r.prototype.reset=function(){var t=this.getAllowComponents();(0,c.each)(t,function(i){i.clearItemsState(oa),i.clearItemsState(vi)})},r}(Gr),m_=y_,di="unchecked",x_=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.toggle=function(){var t,i,n,a,o,s,l,u,h=this.getTriggerListInfo();if(h==null?void 0:h.item){var f=h.list,v=h.item,g=f.getItems(),p=g.filter(function(I){return!f.hasState(I,di)}),y=g.filter(function(I){return f.hasState(I,di)}),m=p[0];if(g.length===p.length)try{for(var x=(0,d.__values)(g),_=x.next();!_.done;_=x.next()){var w=_.value;f.setItemState(w,di,w.id!==v.id)}}catch(I){t={error:I}}finally{try{_&&!_.done&&(i=x.return)&&i.call(x)}finally{if(t)throw t.error}}else if(g.length-y.length==1)if(m.id===v.id)try{for(var b=(0,d.__values)(g),S=b.next();!S.done;S=b.next()){var w=S.value;f.setItemState(w,di,!1)}}catch(I){n={error:I}}finally{try{S&&!S.done&&(a=b.return)&&a.call(b)}finally{if(n)throw n.error}}else try{for(var C=(0,d.__values)(g),M=C.next();!M.done;M=C.next()){var w=M.value;f.setItemState(w,di,w.id!==v.id)}}catch(I){o={error:I}}finally{try{M&&!M.done&&(s=C.return)&&s.call(C)}finally{if(o)throw o.error}}else try{for(var L=(0,d.__values)(g),B=L.next();!B.done;B=L.next()){var w=B.value;f.setItemState(w,di,w.id!==v.id)}}catch(I){l={error:I}}finally{try{B&&!B.done&&(u=L.return)&&u.call(L)}finally{if(l)throw l.error}}}},r}(Gr),__=x_,Ec="showRadio",es="legend-radio-tip",w_=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.timeStamp=0,t}return r.prototype.show=function(){var t=this.getTriggerListInfo();if(t==null?void 0:t.item){var i=t.list,n=t.item;i.setItemState(n,Ec,!0)}},r.prototype.hide=function(){var t=this.getTriggerListInfo();if(t==null?void 0:t.item){var i=t.list,n=t.item;i.setItemState(n,Ec,!1)}},r.prototype.destroy=function(){e.prototype.destroy.call(this),this.tooltip&&this.tooltip.destroy()},r.prototype.showTip=function(){var t=this.context,i=t.event,n=this.timeStamp,a=+new Date,o=this.context.event.target;if(a-n>16&&o.get("name")==="legend-item-radio"){var s=this.location,l={x:i.x,y:i.y};this.timeStamp=a,this.location=l,(!s||!(0,c.isEqual)(s,l))&&this.showTooltip(l)}},r.prototype.hideTip=function(){this.hideTooltip(),this.location=null},r.prototype.showTooltip=function(t){var i=this.context,n=i.event,a=n.target;if(a&&a.get("tip")){this.tooltip||this.renderTooltip();var o=i.view.getCanvas().get("el").getBoundingClientRect(),s=o.x,l=o.y;this.tooltip.update((0,d.__assign)((0,d.__assign)({title:a.get("tip")},t),{x:t.x+s,y:t.y+l})),this.tooltip.show()}},r.prototype.hideTooltip=function(){this.tooltip&&this.tooltip.hide()},r.prototype.renderTooltip=function(){var t,i=(t={},t[or]={padding:"6px 8px",transform:"translate(-50%, -80%)",background:"rgba(0,0,0,0.75)",color:"#fff","border-radius":"2px","z-index":100},t[sr]={"font-size":"12px","line-height":"14px","margin-bottom":0,"word-break":"break-all"},t);document.getElementById(es)&&document.body.removeChild(document.getElementById(es));var n=new kn({parent:document.body,region:null,visible:!1,crosshairs:null,domStyles:i,containerId:es});n.init(),n.setCapture(!1),this.tooltip=n},r}(Gr),b_=w_,S_=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.maskShape=null,t.points=[],t.starting=!1,t.moving=!1,t.preMovePoint=null,t.shapeType="path",t}return r.prototype.getCurrentPoint=function(){var t=this.context.event;return{x:t.x,y:t.y}},r.prototype.emitEvent=function(t){var i="mask:".concat(t),n=this.context.view,a=this.context.event;n.emit(i,{target:this.maskShape,shape:this.maskShape,points:this.points,x:a.x,y:a.y})},r.prototype.createMask=function(){var t=this.context.view,i=this.getMaskAttrs(),n=t.foregroundGroup.addShape({type:this.shapeType,name:"mask",draggable:!0,attrs:(0,d.__assign)({fill:"#C5D4EB",opacity:.3},i)});return n},r.prototype.getMaskPath=function(){return[]},r.prototype.show=function(){this.maskShape&&(this.maskShape.show(),this.emitEvent("show"))},r.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(t==null?void 0:t.maskStyle),this.emitEvent("start")},r.prototype.moveStart=function(){this.moving=!0,this.preMovePoint=this.getCurrentPoint()},r.prototype.move=function(){if(!(!this.moving||!this.maskShape)){var t=this.getCurrentPoint(),i=this.preMovePoint,n=t.x-i.x,a=t.y-i.y,o=this.points;(0,c.each)(o,function(s){s.x+=n,s.y+=a}),this.updateMask(),this.emitEvent("change"),this.preMovePoint=t}},r.prototype.updateMask=function(t){var i=(0,c.deepMix)({},this.getMaskAttrs(),t);this.maskShape.attr(i)},r.prototype.moveEnd=function(){this.moving=!1,this.preMovePoint=null},r.prototype.end=function(){this.starting=!1,this.emitEvent("end"),this.maskShape&&this.maskShape.set("capture",!0)},r.prototype.hide=function(){this.maskShape&&(this.maskShape.hide(),this.emitEvent("hide"))},r.prototype.resize=function(){this.starting&&this.maskShape&&(this.points.push(this.getCurrentPoint()),this.updateMask(),this.emitEvent("change"))},r.prototype.destroy=function(){this.points=[],this.maskShape&&this.maskShape.remove(),this.maskShape=null,this.preMovePoint=null,e.prototype.destroy.call(this)},r}(ie),rs=S_,C_=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.shapeType="circle",t}return r.prototype.getMaskAttrs=function(){var t=this.points,i=(0,c.last)(this.points),n=0,a=0,o=0;if(t.length){var s=t[0];n=xo(s,i)/2,a=(i.x+s.x)/2,o=(i.y+s.y)/2}return{x:a,y:o,r:n}},r}(rs),A_=C_,F_=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.shapeType="rect",t}return r.prototype.getRegion=function(){var t=this.points;return{start:(0,c.head)(t),end:(0,c.last)(t)}},r.prototype.getMaskAttrs=function(){var t=this.getRegion(),i=t.start,n=t.end,a=Math.min(i.x,n.x),o=Math.min(i.y,n.y),s=Math.abs(n.x-i.x),l=Math.abs(n.y-i.y);return{x:a,y:o,width:s,height:l}},r}(rs),Mc=F_;function Tc(e){e.x=(0,c.clamp)(e.x,0,1),e.y=(0,c.clamp)(e.y,0,1)}var E_=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.dim="x",t.inPlot=!0,t}return r.prototype.getRegion=function(){var t=null,i=null,n=this.points,a=this.dim,o=this.context.view.getCoordinate(),s=o.invert((0,c.head)(n)),l=o.invert((0,c.last)(n));return this.inPlot&&(Tc(s),Tc(l)),a==="x"?(t=o.convert({x:s.x,y:0}),i=o.convert({x:l.x,y:1})):(t=o.convert({x:0,y:s.y}),i=o.convert({x:1,y:l.y})),{start:t,end:i}},r}(Mc),Lc=E_,M_=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getMaskPath=function(){var t=this.points,i=[];return t.length&&((0,c.each)(t,function(n,a){a===0?i.push(["M",n.x,n.y]):i.push(["L",n.x,n.y])}),i.push(["L",t[0].x,t[0].y])),i},r.prototype.getMaskAttrs=function(){return{path:this.getMaskPath()}},r.prototype.addPoint=function(){this.resize()},r}(rs),Ic=M_,T_=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getMaskPath=function(){var t=this.points;return jp(t,!0)},r}(Ic),L_=T_,I_=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.setCursor=function(t){var i=this.context.view;i.getCanvas().setCursor(t)},r.prototype.default=function(){this.setCursor("default")},r.prototype.pointer=function(){this.setCursor("pointer")},r.prototype.move=function(){this.setCursor("move")},r.prototype.crosshair=function(){this.setCursor("crosshair")},r.prototype.wait=function(){this.setCursor("wait")},r.prototype.help=function(){this.setCursor("help")},r.prototype.text=function(){this.setCursor("text")},r.prototype.eResize=function(){this.setCursor("e-resize")},r.prototype.wResize=function(){this.setCursor("w-resize")},r.prototype.nResize=function(){this.setCursor("n-resize")},r.prototype.sResize=function(){this.setCursor("s-resize")},r.prototype.neResize=function(){this.setCursor("ne-resize")},r.prototype.nwResize=function(){this.setCursor("nw-resize")},r.prototype.seResize=function(){this.setCursor("se-resize")},r.prototype.swResize=function(){this.setCursor("sw-resize")},r.prototype.nsResize=function(){this.setCursor("ns-resize")},r.prototype.ewResize=function(){this.setCursor("ew-resize")},r}(ie),O_=I_,P_=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.filterView=function(t,i,n){var a=this;t.getScaleByField(i)&&t.filter(i,n),t.views&&t.views.length&&(0,c.each)(t.views,function(o){a.filterView(o,i,n)})},r.prototype.filter=function(){var t=Rr(this.context);if(t){var i=this.context.view,n=t.component,a=n.get("field");if(Ui(t)){if(a){var o=n.getItemsByState("unchecked"),s=li(i,a),l=o.map(function(g){return g.name});l.length?this.filterView(i,a,function(g){var p=s.getText(g);return!l.includes(p)}):this.filterView(i,a,null),i.render(!0)}}else if(Ql(t)){var u=n.getValue(),h=(0,d.__read)(u,2),f=h[0],v=h[1];this.filterView(i,a,function(g){return g>=f&&g<=v}),i.render(!0)}}},r}(ie),D_=P_;function Oc(e,r,t,i){var n=Math.min(t[r],i[r]),a=Math.max(t[r],i[r]),o=(0,d.__read)(e.range,2),s=o[0],l=o[1];if(n<s&&(n=s),a>l&&(a=l),n===l&&a===l)return null;var u=e.invert(n),h=e.invert(a);if(e.isCategory){var f=e.values.indexOf(u),v=e.values.indexOf(h),g=e.values.slice(f,v+1);return function(p){return g.includes(p)}}else return function(p){return p>=u&&p<=h}}var Ie;(function(e){e.FILTER="brush-filter-processing",e.RESET="brush-filter-reset",e.BEFORE_FILTER="brush-filter:beforefilter",e.AFTER_FILTER="brush-filter:afterfilter",e.BEFORE_RESET="brush-filter:beforereset",e.AFTER_RESET="brush-filter:afterreset"})(Ie||(Ie={}));var k_=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.dims=["x","y"],t.startPoint=null,t.isStarted=!1,t}return r.prototype.hasDim=function(t){return this.dims.includes(t)},r.prototype.start=function(){var t=this.context;this.isStarted=!0,this.startPoint=t.getCurrentPoint()},r.prototype.filter=function(){var t,i;if(Zi(this.context)){var n=this.context.event.target,a=n.getCanvasBBox();t={x:a.x,y:a.y},i={x:a.maxX,y:a.maxY}}else{if(!this.isStarted)return;t=this.startPoint,i=this.context.getCurrentPoint()}if(!(Math.abs(t.x-i.x)<5||Math.abs(t.x-i.y)<5)){var o=this.context,s=o.view,l=o.event,u={view:s,event:l,dims:this.dims};s.emit(Ie.BEFORE_FILTER,ne.fromData(s,Ie.BEFORE_FILTER,u));var h=s.getCoordinate(),f=h.invert(i),v=h.invert(t);if(this.hasDim("x")){var g=s.getXScale(),p=Oc(g,"x",f,v);this.filterView(s,g.field,p)}if(this.hasDim("y")){var y=s.getYScales()[0],p=Oc(y,"y",f,v);this.filterView(s,y.field,p)}this.reRender(s,{source:Ie.FILTER}),s.emit(Ie.AFTER_FILTER,ne.fromData(s,Ie.AFTER_FILTER,u))}},r.prototype.end=function(){this.isStarted=!1},r.prototype.reset=function(){var t=this.context.view;if(t.emit(Ie.BEFORE_RESET,ne.fromData(t,Ie.BEFORE_RESET,{})),this.isStarted=!1,this.hasDim("x")){var i=t.getXScale();this.filterView(t,i.field,null)}if(this.hasDim("y")){var n=t.getYScales()[0];this.filterView(t,n.field,null)}this.reRender(t,{source:Ie.RESET}),t.emit(Ie.AFTER_RESET,ne.fromData(t,Ie.AFTER_RESET,{}))},r.prototype.filterView=function(t,i,n){t.filter(i,n)},r.prototype.reRender=function(t,i){t.render(!0,i)},r}(ie),sa=k_,B_=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.filterView=function(t,i,n){var a=$e(t);(0,c.each)(a,function(o){o.filter(i,n)})},r.prototype.reRender=function(t){var i=$e(t);(0,c.each)(i,function(n){n.render(!0)})},r}(sa),is=B_,R_=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.filter=function(){var t=Rr(this.context),i=this.context.view,n=we(i);if(Zi(this.context)){var a=yo(this.context,10);a&&(0,c.each)(n,function(y){a.includes(y)?y.show():y.hide()})}else if(t){var o=t.component,s=o.get("field");if(Ui(t)){if(s){var l=o.getItemsByState("unchecked"),u=li(i,s),h=l.map(function(y){return y.name});(0,c.each)(n,function(y){var m=je(y,s),x=u.getText(m);h.indexOf(x)>=0?y.hide():y.show()})}}else if(Ql(t)){var f=o.getValue(),v=(0,d.__read)(f,2),g=v[0],p=v[1];(0,c.each)(n,function(y){var m=je(y,s);m>=g&&m<=p?y.show():y.hide()})}}},r.prototype.clear=function(){var t=we(this.context.view);(0,c.each)(t,function(i){i.show()})},r.prototype.reset=function(){this.clear()},r}(ie),N_=R_,z_=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.byRecord=!1,t}return r.prototype.filter=function(){Zi(this.context)&&(this.byRecord?this.filterByRecord():this.filterByBBox())},r.prototype.filterByRecord=function(){var t=this.context.view,i=yo(this.context,10);if(!!i){var n=t.getXScale().field,a=t.getYScales()[0].field,o=i.map(function(l){return l.getModel().data}),s=$e(t);(0,c.each)(s,function(l){var u=we(l);(0,c.each)(u,function(h){var f=h.getModel().data;nu(o,f,n,a)?h.show():h.hide()})})}},r.prototype.filterByBBox=function(){var t=this,i=this.context.view,n=$e(i);(0,c.each)(n,function(a){var o=Jl(t.context,a,10),s=we(a);o&&(0,c.each)(s,function(l){o.includes(l)?l.show():l.hide()})})},r.prototype.reset=function(){var t=$e(this.context.view);(0,c.each)(t,function(i){var n=we(i);(0,c.each)(n,function(a){a.show()})})},r}(ie),Pc=z_,V_=10,G_=5,W_=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.buttonGroup=null,t.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"}},t}return r.prototype.getButtonCfg=function(){return(0,c.deepMix)(this.buttonCfg,this.cfg)},r.prototype.drawButton=function(){var t=this.getButtonCfg(),i=this.context.view.foregroundGroup.addGroup({name:t.name}),n=i.addShape({type:"text",name:"button-text",attrs:(0,d.__assign)({text:t.text},t.textStyle)}),a=n.getBBox(),o=Co(t.padding),s=i.addShape({type:"rect",name:"button-rect",attrs:(0,d.__assign)({x:a.x-o[3],y:a.y-o[0],width:a.width+o[1]+o[3],height:a.height+o[0]+o[2]},t.style)});s.toBack(),i.on("mouseenter",function(){s.attr(t.activeStyle)}),i.on("mouseleave",function(){s.attr(t.style)}),this.buttonGroup=i},r.prototype.resetPosition=function(){var t=this.context.view,i=t.getCoordinate(),n=i.convert({x:1,y:1}),a=this.buttonGroup,o=a.getBBox(),s=te.vs(null,[["t",n.x-o.width-V_,n.y+o.height+G_]]);a.setMatrix(s)},r.prototype.show=function(){this.buttonGroup||this.drawButton(),this.resetPosition(),this.buttonGroup.show()},r.prototype.hide=function(){this.buttonGroup&&this.buttonGroup.hide()},r.prototype.destroy=function(){var t=this.buttonGroup;t&&t.remove(),e.prototype.destroy.call(this)},r}(ie),H_=W_,Y_=4,X_=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.starting=!1,t.dragStart=!1,t}return r.prototype.start=function(){this.starting=!0,this.startPoint=this.context.getCurrentPoint()},r.prototype.drag=function(){if(!!this.startPoint){var t=this.context.getCurrentPoint(),i=this.context.view,n=this.context.event;this.dragStart?i.emit("drag",{target:n.target,x:n.x,y:n.y}):xo(t,this.startPoint)>Y_&&(i.emit("dragstart",{target:n.target,x:n.x,y:n.y}),this.dragStart=!0)}},r.prototype.end=function(){if(this.dragStart){var t=this.context.view,i=this.context.event;t.emit("dragend",{target:i.target,x:i.x,y:i.y})}this.starting=!1,this.dragStart=!1},r}(ie),j_=X_,U_=5,Z_=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.starting=!1,t.isMoving=!1,t.startPoint=null,t.startMatrix=null,t}return r.prototype.start=function(){this.starting=!0,this.startPoint=this.context.getCurrentPoint(),this.startMatrix=this.context.view.middleGroup.getMatrix()},r.prototype.move=function(){if(!!this.starting){var t=this.startPoint,i=this.context.getCurrentPoint(),n=xo(t,i);if(n>U_&&!this.isMoving&&(this.isMoving=!0),this.isMoving){var a=this.context.view,o=te.vs(this.startMatrix,[["t",i.x-t.x,i.y-t.y]]);a.backgroundGroup.setMatrix(o),a.foregroundGroup.setMatrix(o),a.middleGroup.setMatrix(o)}}},r.prototype.end=function(){this.isMoving&&(this.isMoving=!1),this.startMatrix=null,this.starting=!1,this.startPoint=null},r.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},r}(ie),K_=Z_,Dc="x",kc="y",q_=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.dims=[Dc,kc],t.cfgFields=["dims"],t.cacheScaleDefs={},t}return r.prototype.hasDim=function(t){return this.dims.includes(t)},r.prototype.getScale=function(t){var i=this.context.view;return t==="x"?i.getXScale():i.getYScales()[0]},r.prototype.resetDim=function(t){var i=this.context.view;if(this.hasDim(t)&&this.cacheScaleDefs[t]){var n=this.getScale(t);i.scale(n.field,this.cacheScaleDefs[t]),this.cacheScaleDefs[t]=null}},r.prototype.reset=function(){this.resetDim(Dc),this.resetDim(kc);var t=this.context.view;t.render(!0)},r}(ie),Bc=q_,$_=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.startPoint=null,t.starting=!1,t.startCache={},t}return r.prototype.start=function(){var t=this;this.startPoint=this.context.getCurrentPoint(),this.starting=!0;var i=this.dims;(0,c.each)(i,function(n){var a=t.getScale(n),o=a.min,s=a.max,l=a.values;t.startCache[n]={min:o,max:s,values:l}})},r.prototype.end=function(){this.startPoint=null,this.starting=!1,this.startCache={}},r.prototype.translate=function(){var t=this;if(!!this.starting){var i=this.startPoint,n=this.context.view.getCoordinate(),a=this.context.getCurrentPoint(),o=n.invert(i),s=n.invert(a),l=s.x-o.x,u=s.y-o.y,h=this.context.view,f=this.dims;(0,c.each)(f,function(v){t.translateDim(v,{x:l*-1,y:u*-1})}),h.render(!0)}},r.prototype.translateDim=function(t,i){if(this.hasDim(t)){var n=this.getScale(t);n.isLinear&&this.translateLinear(t,n,i)}},r.prototype.translateLinear=function(t,i,n){var a=this.context.view,o=this.startCache[t],s=o.min,l=o.max,u=l-s,h=n[t]*u;this.cacheScaleDefs[t]||(this.cacheScaleDefs[t]={nice:i.nice,min:s,max:l}),a.scale(i.field,{nice:!1,min:s+h,max:l+h})},r.prototype.reset=function(){e.prototype.reset.call(this),this.startPoint=null,this.starting=!1},r}(Bc),Q_=$_,J_=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.zoomRatio=.05,t}return r.prototype.zoomIn=function(){this.zoom(this.zoomRatio)},r.prototype.zoom=function(t){var i=this,n=this.dims;(0,c.each)(n,function(a){i.zoomDim(a,t)}),this.context.view.render(!0)},r.prototype.zoomOut=function(){this.zoom(-1*this.zoomRatio)},r.prototype.zoomDim=function(t,i){if(this.hasDim(t)){var n=this.getScale(t);n.isLinear&&this.zoomLinear(t,n,i)}},r.prototype.zoomLinear=function(t,i,n){var a=this.context.view;this.cacheScaleDefs[t]||(this.cacheScaleDefs[t]={nice:i.nice,min:i.min,max:i.max});var o=this.cacheScaleDefs[t],s=o.max-o.min,l=i.min,u=i.max,h=n*s,f=l-h,v=u+h,g=v-f,p=g/s;v>f&&p<100&&p>.01&&a.scale(i.field,{nice:!1,min:l-h,max:u+h})},r}(Bc),tw=J_;function ew(e){var r=e.gEvent.originalEvent;return r.deltaY>0}var rw=1,iw=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.scroll=function(t){var i=this.context,n=i.view,a=i.event;if(!!n.getOptions().scrollbar){var o=(t==null?void 0:t.wheelDelta)||rw,s=n.getController("scrollbar"),l=n.getXScale(),u=n.getOptions().data,h=(0,c.size)((0,c.valuesOfKey)(u,l.field)),f=(0,c.size)(l.values),v=s.getValue(),g=Math.floor((h-f)*v),p=g+(ew(a)?o:-o),y=o/(h-f)/1e4,m=(0,c.clamp)(p/(h-f)+y,0,1);s.setValue(m)}},r}(ie),nw=iw,aw="aixs-description-tooltip",ow=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.show=function(){var t=this.context,i=Rr(t).axis,n=i.cfg.title,a=n.description,o=n.text,s=n.descriptionTooltipStyle,l=t.event,u=l.x,h=l.y;this.tooltip||this.renderTooltip(),this.tooltip.update({title:o||"",customContent:function(){return`
  37. <div class="`.concat(or,'" style={').concat(s,`}>
  38. <div class="`).concat(sr,`">
  39. \u5B57\u6BB5\u8BF4\u660E\uFF1A`).concat(a,`
  40. </div>
  41. </div>
  42. `)},x:u,y:h}),this.tooltip.show()},r.prototype.destroy=function(){e.prototype.destroy.call(this),this.tooltip&&this.tooltip.destroy()},r.prototype.hide=function(){this.tooltip&&this.tooltip.hide()},r.prototype.renderTooltip=function(){var t,i=this.context.view,n=i.canvas,a={start:{x:0,y:0},end:{x:n.get("width"),y:n.get("height")}},o=new kn({parent:n.get("el").parentNode,region:a,visible:!1,containerId:aw,domStyles:(0,d.__assign)({},(0,c.deepMix)({},(t={},t[or]={"max-width":"50%",padding:"10px","line-height":"15px","font-size":"12px",color:"rgba(0, 0, 0, .65)"},t[sr]={"word-break":"break-all","margin-bottom":"3px"},t)))});o.init(),o.setCapture(!1),this.tooltip=o},r}(ie),sw=ow;ly("dark",lu(n0)),bt("canvas",Vu),bt("svg",a0),Qe("Polygon",E0),Qe("Interval",x0),Qe("Schema",T0),Qe("Path",Po),Qe("Point",C0),Qe("Line",w0),Qe("Area",u0),Qe("Edge",h0),Qe("Heatmap",v0),Qe("Violin",O0),qi("base",Un),qi("interval",K0),qi("pie",Q0),qi("polar",Ku),Te("overlap",fm),Te("distribute",tm),Te("fixed-overlap",hm),Te("hide-overlap",wm),Te("limit-in-shape",sm),Te("limit-in-canvas",om),Te("limit-in-plot",Nm),Te("pie-outer",rm),Te("adjust-color",Sm),Te("interval-adjust-position",Em),Te("interval-hide-overlap",Tm),Te("point-adjust-position",Om),Te("pie-spider",am),Te("path-adjust-position",km),Re("fade-in",zm),Re("fade-out",Vm),Re("grow-in-x",Wm),Re("grow-in-xy",Ym),Re("grow-in-y",Hm),Re("scale-in-x",Um),Re("scale-in-y",Zm),Re("wave-in",qm),Re("zoom-in",$m),Re("zoom-out",Qm),Re("position-update",jm),Re("sector-path-update",Km),Re("path-in",Xm),si("rect",lx),si("mirror",ox),si("list",rx),si("matrix",nx),si("circle",tx),si("tree",cx),Nr("axis",gx),Nr("legend",_x),Nr("tooltip",yu),Nr("annotation",vx),Nr("slider",bx),Nr("scrollbar",Fx),yt("tooltip",wc),yt("sibling-tooltip",Px),yt("ellipsis-text",kx),yt("element-active",zx),yt("element-single-active",Ux),yt("element-range-active",Yx),yt("element-highlight",Jo),yt("element-highlight-by-x",Qx),yt("element-highlight-by-color",qx),yt("element-single-highlight",e_),yt("element-range-highlight",Cc),yt("element-sibling-highlight",Cc,{effectSiblings:!0,effectByRecord:!0}),yt("element-selected",a_),yt("element-single-selected",s_),yt("element-range-selected",i_),yt("element-link-by-color",Gx),yt("active-region",Lx),yt("list-active",c_),yt("list-selected",d_),yt("list-highlight",ts),yt("list-unchecked",p_),yt("list-checked",m_),yt("list-focus",__),yt("list-radio",b_),yt("legend-item-highlight",ts,{componentNames:["legend"]}),yt("axis-label-highlight",ts,{componentNames:["axis"]}),yt("axis-description",sw),yt("rect-mask",Mc),yt("x-rect-mask",Lc,{dim:"x"}),yt("y-rect-mask",Lc,{dim:"y"}),yt("circle-mask",A_),yt("path-mask",Ic),yt("smooth-path-mask",L_),yt("cursor",O_),yt("data-filter",D_),yt("brush",sa),yt("brush-x",sa,{dims:["x"]}),yt("brush-y",sa,{dims:["y"]}),yt("sibling-filter",is),yt("sibling-x-filter",is),yt("sibling-y-filter",is),yt("element-filter",N_),yt("element-sibling-filter",Pc),yt("element-sibling-filter-record",Pc,{byRecord:!0}),yt("view-drag",j_),yt("view-move",K_),yt("scale-translate",Q_),yt("scale-zoom",tw),yt("reset-button",H_,{name:"reset-button",text:"reset"}),yt("mousewheel-scroll",nw);function Er(e){return e.isInPlot()}Et("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"}]}),Et("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:mouseout",action:"ellipsis-text:hide"},{trigger:"axis-label:touchend",action:"ellipsis-text:hide"}]}),Et("element-active",{start:[{trigger:"element:mouseenter",action:"element-active:active"}],end:[{trigger:"element:mouseleave",action:"element-active:reset"}]}),Et("element-selected",{start:[{trigger:"element:click",action:"element-selected:toggle"}]}),Et("element-highlight",{start:[{trigger:"element:mouseenter",action:"element-highlight:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight:reset"}]}),Et("element-highlight-by-x",{start:[{trigger:"element:mouseenter",action:"element-highlight-by-x:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight-by-x:reset"}]}),Et("element-highlight-by-color",{start:[{trigger:"element:mouseenter",action:"element-highlight-by-color:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight-by-color:reset"}]}),Et("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"]}]}),Et("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"]}]}),Et("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"]}]}),Et("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"]}]}),Et("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(e){return!e.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(e){return!e.isInPlot()},action:["element-range-highlight:clear","rect-mask:end","rect-mask:hide"]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear","rect-mask:hide"]}]}),Et("brush",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:Er,action:["brush:start","rect-mask:start","rect-mask:show"]}],processing:[{trigger:"mousemove",isEnable:Er,action:["rect-mask:resize"]}],end:[{trigger:"mouseup",isEnable:Er,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"]}]}),Et("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"]}]}),Et("brush-x",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:Er,action:["brush-x:start","x-rect-mask:start","x-rect-mask:show"]}],processing:[{trigger:"mousemove",isEnable:Er,action:["x-rect-mask:resize"]}],end:[{trigger:"mouseup",isEnable:Er,action:["brush-x:filter","brush-x:end","x-rect-mask:end","x-rect-mask:hide"]}],rollback:[{trigger:"dblclick",action:["brush-x:reset"]}]}),Et("element-path-highlight",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:Er,action:"path-mask:start"},{trigger:"mousedown",isEnable:Er,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"}]}),Et("element-single-selected",{start:[{trigger:"element:click",action:"element-single-selected:toggle"}]}),Et("legend-filter",{showEnable:[{trigger:"legend-item:mouseenter",action:["cursor:pointer","list-radio:show"]},{trigger:"legend-item:mouseleave",action:["cursor:default","list-radio:hide"]}],start:[{trigger:"legend-item:click",isEnable:function(e){return!e.isInShape("legend-item-radio")},action:["list-unchecked:toggle","data-filter:filter","list-radio:show"]},{trigger:"legend-item-radio:mouseenter",action:["list-radio:showTip"]},{trigger:"legend-item-radio:mouseleave",action:["list-radio:hideTip"]},{trigger:"legend-item-radio:click",action:["list-focus:toggle","data-filter:filter","list-radio:show"]}]}),Et("continuous-filter",{start:[{trigger:"legend:valuechanged",action:"data-filter:filter"}]}),Et("continuous-visible-filter",{start:[{trigger:"legend:valuechanged",action:"element-filter:filter"}]}),Et("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"]}]}),Et("active-region",{start:[{trigger:"plot:mousemove",action:"active-region:show"}],end:[{trigger:"plot:mouseleave",action:"active-region:hide"}]}),Et("axis-description",{start:[{trigger:"axis-description:mousemove",action:"axis-description:show"}],end:[{trigger:"axis-description:mouseleave",action:"axis-description:hide"}]});function Rc(e){return e.gEvent.preventDefault(),e.gEvent.originalEvent.deltaY>0}Et("view-zoom",{start:[{trigger:"plot:mousewheel",isEnable:function(e){return Rc(e.event)},action:"scale-zoom:zoomOut",throttle:{wait:100,leading:!0,trailing:!1}},{trigger:"plot:mousewheel",isEnable:function(e){return!Rc(e.event)},action:"scale-zoom:zoomIn",throttle:{wait:100,leading:!0,trailing:!1}}]}),Et("sibling-tooltip",{start:[{trigger:"plot:mousemove",action:"sibling-tooltip:show"}],end:[{trigger:"plot:mouseleave",action:"sibling-tooltip:hide"}]}),Et("plot-mousewheel-scroll",{start:[{trigger:"plot:mousewheel",action:"mousewheel-scroll:scroll"}]});function _t(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return function(t){return e.reduce(function(i,n){return n(i)},t)}}function Zt(e,r){var t={};return e!==null&&typeof e=="object"&&r.forEach(function(i){var n=e[i];n!==void 0&&(t[i]=n)}),t}function Nc(e,r){return r?(0,c.reduce)(r,function(t,i,n){return t.replace(new RegExp("{\\s*"+n+"\\s*}","g"),i)},e):e}var Ze;(function(e){e.ERROR="error",e.WARN="warn",e.INFO="log"})(Ze||(Ze={}));var zc="AntV/G2Plot";function Vc(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];var i=0;return zc+": "+e.replace(/%s/g,function(){return""+r[i++]})}function mL(e,r){for(var t=[],i=2;i<arguments.length;i++)t[i-2]=arguments[i];if(!e){var n=new Error(Vc.apply(void 0,__spreadArrays([r],t)));throw n.name=zc,n}}function cr(e,r,t){for(var i=[],n=3;n<arguments.length;n++)i[n-3]=arguments[n];r||console[e](Vc.apply(void 0,(0,d.__spreadArrays)([t],i)))}function ns(e){if(!e)return{width:0,height:0};var r=getComputedStyle(e);return{width:(e.clientWidth||parseInt(r.width,10))-parseInt(r.paddingLeft,10)-parseInt(r.paddingRight,10),height:(e.clientHeight||parseInt(r.height,10))-parseInt(r.paddingTop,10)-parseInt(r.paddingBottom,10)}}function Se(e,r){return e.geometries.find(function(t){return t.type===r})}function la(e){return(0,c.reduce)(e.geometries,function(r,t){return r.concat(t.elements)},[])}function nn(e){return(0,c.get)(e,["views","length"],0)<=0?la(e):(0,c.reduce)(e.views,function(r,t){return r.concat(nn(t))},la(e))}function lw(e){return(0,c.get)(e,["views","length"],0)<=0?e.geometries:(0,c.reduce)(e.views,function(r,t){return r.concat(t.geometries)},e.geometries)}function Ot(e,r){return e.views.find(function(t){return t.id===r})}function an(e){var r=e.parent;return r?r.views:[]}function Gc(e){return an(e).filter(function(r){return r!==e})}function ye(e){if(!(0,c.isType)(e,"Object"))return e;var r=(0,d.__assign)({},e);return r.formatter&&!r.content&&(r.content=r.formatter),r}function uw(e,r){var t=[];if(e.length){t.push(["M",e[0].x,e[0].y]);for(var i=1,n=e.length;i<n;i+=1){var a=e[i];t.push(["L",a.x,a.y])}r&&t.push(["Z"])}return t}var cw=function(e,r,t,i){var n=[],a,o,s=!!i,l,u;if(s){l=[Infinity,Infinity],u=[-Infinity,-Infinity];for(var h=0,f=e.length;h<f;h++){var v=e[h];l=wt.VV([0,0],l,v),u=wt.Fp([0,0],u,v)}l=wt.VV([0,0],l,i[0]),u=wt.Fp([0,0],u,i[1])}for(var h=0,g=e.length;h<g;h++){var v=e[h];if(t)a=e[h?h-1:g-1],o=e[(h+1)%g];else if(h===0||h===g-1){n.push(v);continue}else a=e[h-1],o=e[h+1];var p=[0,0];p=wt.lu(p,o,a),p=wt.bA(p,p,r);var y=wt.TE(v,a),m=wt.TE(v,o),x=y+m;x!==0&&(y/=x,m/=x);var _=wt.bA([0,0],p,-y),w=wt.bA([0,0],p,m),b=wt.IH([0,0],v,_),S=wt.IH([0,0],v,w);s&&(b=wt.Fp([0,0],b,l),b=wt.VV([0,0],b,u),S=wt.Fp([0,0],S,l),S=wt.VV([0,0],S,u)),n.push(b),n.push(S)}return t&&n.push(n.shift()),n};function hw(e,r,t){for(var i=!!r,n=[],a=0,o=e.length;a<o;a+=2)n.push([e[a],e[a+1]]);for(var s=cw(n,.4,i,t),l=n.length,u=[],h,f,v,a=0;a<l-1;a++)h=s[a*2],f=s[a*2+1],v=n[a+1],u.push(["C",h[0],h[1],f[0],f[1],v[0],v[1]]);return i&&(h=s[l],f=s[l+1],v=n[0],u.push(["C",h[0],h[1],f[0],f[1],v[0],v[1]])),u}function fw(e,r,t){var i=[],n=e[0],a=null;if(e.length<=2)return uw(e,r);for(var o=0,s=e.length;o<s;o++){var l=e[o];(!a||!(a.x===l.x&&a.y===l.y))&&(i.push(l.x),i.push(l.y),a=l)}var u=t||[[0,0],[1,1]],h=hw(i,r,u);return h.unshift(["M",n.x,n.y]),h}var vw=5,dw={}.toString,Wc=function(e,r){return dw.call(e)==="[object "+r+"]"},gw=function(e){return Wc(e,"Array")},pw=function(e){return typeof e=="object"&&e!==null},Hc=function(e){if(!pw(e)||!Wc(e,"Object"))return!1;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r},Yc=function(e,r,t,i){t=t||0,i=i||vw;for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n)){var a=r[n];a?Hc(a)?(Hc(e[n])||(e[n]={}),t<i?Yc(e[n],a,t+1,i):e[n]=r[n]):gw(a)?(e[n]=[],e[n]=e[n].concat(a)):e[n]=a:e[n]=a}},O=function(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];for(var i=0;i<r.length;i+=1)Yc(e,r[i]);return e};function Xc(e){if(!e)return e;var r=e.match(/(([A-Z]{0,1}[a-z]*[^A-Z])|([A-Z]{1}))/g);return r.map(function(t){return t.toLowerCase()}).join("-")}function jc(e){var r={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis",display:"flex",justifyContent:"center",alignItems:"center"},t=["stroke","lineWidth","shadowColor","strokeOpacity","shadowBlur","shadowOffsetX","shadowOffsetY","fill"];(0,c.get)(e,"fill")&&(r.color=e.fill);var i=Zt(e,t),n=i.shadowColor,a=i.shadowBlur,o=a===void 0?0:a,s=i.shadowOffsetX,l=s===void 0?0:s,u=i.shadowOffsetY,h=u===void 0?0:u;r["text-shadow"]=""+[n,l+"px",h+"px",o+"px"].join(" ");var f=Zt(e,t),v=f.stroke,g=f.lineWidth,p=g===void 0?0:g;return r["-webkit-text-stroke"]=""+[p+"px",v].join(" "),(0,c.each)(e,function(y,m){["fontSize"].includes(m)&&(0,c.isNumber)(y)?r[Xc(m)]=y+"px":m&&!t.includes(m)&&(r[Xc(m)]=""+y)}),r}function Uc(e,r){e.style["pointer-events"]="none",(0,c.each)(r,function(t,i){i&&t&&(e.style[i]=t)})}var ua=function(e,r,t){var i=r.statistic,n=r.plotType,a=i.title,o=i.content;[a,o].forEach(function(s,l){if(!!s){var u="";l===0?u=o?"translate(-50%, -100%)":"translate(-50%, -50%)":u=a?"translate(-50%, 0)":"translate(-50%, -50%)";var h=(0,c.isFunction)(s.style)?s.style(t):s.style;e.annotation().html((0,d.__assign)({position:["50%","50%"],html:function(f,v){var g=v.getCoordinate(),p=0;if(n==="pie"||n==="ring-progress")p=g.getRadius()*g.innerRadius*2;else if(n==="liquid"){var y=(0,c.get)(v.geometries,[0,"elements",0,"shape"]);if(y){var m=y.find(function(b){return b.get("name")==="wrap"}),x=m.getCanvasBBox().width;p=x}}else p||(p=g.getWidth());Uc(f,(0,d.__assign)({width:p+"px",transform:u},jc(h)));var _=v.getData();if(s.customHtml)return s.customHtml(f,v,t,_);var w=s.content;return s.formatter&&(w=s.formatter(t,_)),w?(0,c.isString)(w)?w:""+w:"<div></div>"},key:(l===0?"top":"bottom")+"-statistic"},Zt(s,["offsetX","offsetY","rotate","style","formatter"])))}})},yw=function(e,r,t){var i=r.statistic,n=i.title,a=i.content;[n,a].forEach(function(o){if(!!o){var s=(0,c.isFunction)(o.style)?o.style(t):o.style;e.annotation().html((0,d.__assign)({position:["50%","100%"],html:function(l,u){var h=u.getCoordinate(),f=u.views[0].getCoordinate(),v=f.getCenter(),g=f.getRadius(),p=Math.max(Math.sin(f.startAngle),Math.sin(f.endAngle))*g,y=v.y+p-h.y.start-parseFloat((0,c.get)(s,"fontSize",0)),m=h.getRadius()*h.innerRadius*2;Uc(l,(0,d.__assign)({width:m+"px",transform:"translate(-50%, "+y+"px)"},jc(s)));var x=u.getData();if(o.customHtml)return o.customHtml(l,u,t,x);var _=o.content;return o.formatter&&(_=o.formatter(t,x)),_?(0,c.isString)(_)?_:""+_:"<div></div>"}},Zt(o,["offsetX","offsetY","rotate","style","formatter"])))}})},as;function mw(){return as||(as=document.createElement("canvas").getContext("2d")),as}var xL=(0,c.memoize)(function(e,r){r===void 0&&(r={});var t=r.fontSize,i=r.fontFamily,n=i===void 0?"sans-serif":i,a=r.fontWeight,o=r.fontStyle,s=r.fontVariant,l=mw();l.font=[o,a,s,t+"px",n].join(" ");var u=l.measureText((0,c.isString)(e)?e:"");return u.width},function(e,r){return r===void 0&&(r={}),(0,d.__spreadArrays)([e],(0,c.values)(r)).join("")});function Hr(e){return typeof e=="number"&&!isNaN(e)}function xw(e,r,t){var i=Math.min(r,t),n=Math.max(r,t);return e>=i&&e<=n}function os(e,r){if(!e)return{};var t=e.filter(function(a){var o=(0,c.get)(a,[r]);return(0,c.isNumber)(o)&&!isNaN(o)}),i=t.every(function(a){return(0,c.get)(a,[r])>=0}),n=t.every(function(a){return(0,c.get)(a,[r])<=0});return i?{min:0}:n?{max:0}:{}}function Zc(e,r,t,i,n){if(n===void 0&&(n=[]),!Array.isArray(e))return{nodes:[],links:[]};var a=[],o={},s=-1;return e.forEach(function(l){var u=l[r],h=l[t],f=l[i],v=Zt(l,n);o[u]||(o[u]=(0,d.__assign)({id:++s,name:u},v)),o[h]||(o[h]=(0,d.__assign)({id:++s,name:h},v)),a.push((0,d.__assign)({source:o[u].id,target:o[h].id,value:f},v))}),{nodes:Object.values(o).sort(function(l,u){return l.id-u.id}),links:a}}function gi(e,r){var t=(0,c.filter)(e,function(i){var n=i[r];return n===null||typeof n=="number"&&!isNaN(n)});return cr(Ze.WARN,t.length===e.length,"illegal data existed in chart data."),t}function Mr(e){if((0,c.isNumber)(e))return[e,e,e,e];if((0,c.isArray)(e)){var r=e.length;if(r===1)return[e[0],e[0],e[0],e[0]];if(r===2)return[e[0],e[1],e[0],e[1]];if(r===3)return[e[0],e[1],e[2],e[1]];if(r===4)return e}return[0,0,0,0]}function ca(e,r,t){r===void 0&&(r="bottom"),t===void 0&&(t=25);var i=Mr(e),n=[r.startsWith("top")?t:0,r.startsWith("right")?t:0,r.startsWith("bottom")?t:0,r.startsWith("left")?t:0];return[i[0]+n[0],i[1]+n[1],i[2]+n[2],i[3]+n[3]]}function ss(e){var r=e.map(function(i){return Mr(i)}),t=[0,0,0,0];return r.length>0&&(t=t.map(function(i,n){return r.forEach(function(a,o){i+=r[o][n]}),i})),t}var Kc={locale:"en-US"};function _L(e){each(e,function(r,t){return Kc[t]=r})}var ha={};function qc(e,r){ha[e]=r}function fa(e){return{get:function(r,t){return Nc((0,c.get)(ha[e],r)||(0,c.get)(ha[Kc.locale],r)||(0,c.get)(ha["en-US"],r)||r,t)}}}var _w={locale:"en-US",general:{increase:"Increase",decrease:"Decrease",root:"Root"},statistic:{total:"Total"},conversionTag:{label:"Rate"},legend:{},tooltip:{},slider:{},scrollbar:{},waterfall:{total:"Total"}},ww={locale:"zh-CN",general:{increase:"\u589E\u52A0",decrease:"\u51CF\u5C11",root:"\u521D\u59CB"},statistic:{total:"\u603B\u8BA1"},conversionTag:{label:"\u8F6C\u5316\u7387"},legend:{},tooltip:{},slider:{},scrollbar:{},waterfall:{total:"\u603B\u8BA1"}},bw=F(18587),$c="data-chart-source-type",Qc=["padding","appendPadding","renderer","pixelRatio","syncViewPadding","supportCSSTransform","limitInPlot"],Mt=function(e){(0,d.__extends)(r,e);function r(t,i){var n=e.call(this)||this;return n.container=typeof t=="string"?document.getElementById(t):t,n.options=O({},n.getDefaultOptions(),i),n.createG2(),n.bindEvents(),n}return r.getDefaultOptions=function(){return{renderer:"canvas",xAxis:{nice:!0,label:{autoRotate:!1,autoHide:{type:"equidistance",cfg:{minGap:6}}}},yAxis:{nice:!0,label:{autoHide:!0,autoRotate:!1}},animation:!0}},r.prototype.createG2=function(){var t=this.options,i=t.width,n=t.height,a=t.defaultInteractions;this.chart=new My((0,d.__assign)((0,d.__assign)((0,d.__assign)((0,d.__assign)({container:this.container,autoFit:!1},this.getChartSize(i,n)),{localRefresh:!1}),Zt(this.options,Qc)),{defaultInteractions:a})),this.container.setAttribute($c,"G2Plot")},r.prototype.getChartSize=function(t,i){var n=ns(this.container);return{width:t||n.width||400,height:i||n.height||400}},r.prototype.bindEvents=function(){var t=this;this.chart&&this.chart.on("*",function(i){(i==null?void 0:i.type)&&t.emit(i.type,i)})},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.render=function(){this.chart.clear(),this.chart.options={data:[],animate:!0},this.chart.views=[],this.execAdaptor(),this.chart.render(),this.bindSizeSensor()},r.prototype.update=function(t){this.updateOption(t),this.render()},r.prototype.updateOption=function(t){this.options=O({},this.options,t)},r.prototype.setState=function(t,i,n){n===void 0&&(n=!0);var a=nn(this.chart);(0,c.each)(a,function(o){i(o.getData())&&o.setState(t,n)})},r.prototype.getStates=function(){var t=nn(this.chart),i=[];return(0,c.each)(t,function(n){var a=n.getData(),o=n.getStates();(0,c.each)(o,function(s){i.push({data:a,state:s,geometry:n.geometry,element:n})})}),i},r.prototype.changeData=function(t){this.update({data:t})},r.prototype.changeSize=function(t,i){this.chart.changeSize(t,i)},r.prototype.addAnnotations=function(t,i){i=i||this.chart;var n=(0,d.__spreadArrays)(t),a=i.getController("annotation"),o=a.getComponents().map(function(u){return u.extra});a.clear(!0);for(var s=function(u){var h=o[u],f=n.findIndex(function(v){return v.id&&v.id===h.id});f!==-1&&(h=O({},h,n[f]),n.splice(f,1)),a.annotation(h)},l=0;l<o.length;l++)s(l);n.forEach(function(u){return a.annotation(u)}),i.render(!0)},r.prototype.removeAnnotations=function(t){var i=this.chart.getController("annotation"),n=i.getComponents().map(function(s){return s.extra});i.clear(!0);for(var a=function(s){var l=n[s];t.find(function(u){return u.id&&u.id===l.id})||i.annotation(l)},o=0;o<n.length;o++)a(o);this.chart.render(!0)},r.prototype.destroy=function(){this.unbindSizeSensor(),this.chart.destroy(),this.off(),this.container.removeAttribute($c)},r.prototype.execAdaptor=function(){var t=this.getSchemaAdaptor(),i=this.options,n=i.padding,a=i.appendPadding;this.chart.padding=n,this.chart.appendPadding=a,t({chart:this.chart,options:this.options})},r.prototype.triggerResize=function(){this.chart.forceFit()},r.prototype.bindSizeSensor=function(){var t=this;if(!this.unbind){var i=this.options.autoFit,n=i===void 0?!0:i;n&&(this.unbind=(0,bw.ak)(this.container,function(){var a=ns(t.container),o=a.width,s=a.height;(o!==t.chart.width||s!==t.chart.height)&&t.triggerResize()}))}},r.prototype.unbindSizeSensor=function(){this.unbind&&(this.unbind(),this.unbind=void 0)},r}(X.Z),Oe=["type","alias","tickCount","tickInterval","min","max","nice","minLimit","maxLimit","range","tickMethod","base","exponent","mask","sync"];function va(){return typeof window=="object"?window==null?void 0:window.devicePixelRatio:2}function ls(e,r){r===void 0&&(r=e);var t=document.createElement("canvas"),i=va();t.width=e*i,t.height=r*i,t.style.width=e+"px",t.style.height=r+"px";var n=t.getContext("2d");return n.scale(i,i),t}function us(e,r,t,i){i===void 0&&(i=t);var n=r.backgroundColor,a=r.opacity;e.globalAlpha=a,e.fillStyle=n,e.beginPath(),e.fillRect(0,0,t,i),e.closePath()}function Jc(e,r,t){var i=e+r;return t?i*2:i}function th(e,r){var t=r?[[e*(1/4),e*(1/4)],[e*(3/4),e*(3/4)]]:[[e*(1/2),e*(1/2)]];return t}function cs(e,r){var t=r*Math.PI/180,i={a:Math.cos(t)*(1/e),b:Math.sin(t)*(1/e),c:-Math.sin(t)*(1/e),d:Math.cos(t)*(1/e),e:0,f:0};return i}var Sw={size:6,padding:2,backgroundColor:"transparent",opacity:1,rotation:0,fill:"#fff",fillOpacity:.5,stroke:"transparent",lineWidth:0,isStagger:!0};function Cw(e,r,t,i){var n=r.size,a=r.fill,o=r.lineWidth,s=r.stroke,l=r.fillOpacity;e.beginPath(),e.globalAlpha=l,e.fillStyle=a,e.strokeStyle=s,e.lineWidth=o,e.arc(t,i,n/2,0,2*Math.PI,!1),e.fill(),o&&e.stroke(),e.closePath()}function Aw(e){var r=O({},Sw,e),t=r.size,i=r.padding,n=r.isStagger,a=r.rotation,o=Jc(t,i,n),s=th(o,n),l=ls(o,o),u=l.getContext("2d");us(u,r,o);for(var h=0,f=s;h<f.length;h++){var v=f[h],g=v[0],p=v[1];Cw(u,r,g,p)}var y=u.createPattern(l,"repeat");if(y){var m=va(),x=cs(m,a);y.setTransform(x)}return y}var Fw={rotation:45,spacing:5,opacity:1,backgroundColor:"transparent",strokeOpacity:.5,stroke:"#fff",lineWidth:2};function Ew(e,r,t){var i=r.stroke,n=r.lineWidth,a=r.strokeOpacity,o=new Path2D(t);e.globalAlpha=a,e.lineCap="square",e.strokeStyle=n?i:"transparent",e.lineWidth=n,e.stroke(o)}function Mw(e){var r=O({},Fw,e),t=r.spacing,i=r.rotation,n=r.lineWidth,a=t+n||1,o=t+n||1,s=`
  43. M 0 0 L `+a+` 0
  44. M 0 `+o+" L "+a+" "+o+`
  45. `,l=ls(a,o),u=l.getContext("2d");us(u,r,a,o),Ew(u,r,s);var h=u.createPattern(l,"repeat");if(h){var f=va(),v=cs(f,i);h.setTransform(v)}return h}var Tw={size:6,padding:1,isStagger:!0,backgroundColor:"transparent",opacity:1,rotation:0,fill:"#fff",fillOpacity:.5,stroke:"transparent",lineWidth:0};function Lw(e,r,t,i){var n=r.stroke,a=r.size,o=r.fill,s=r.lineWidth,l=r.fillOpacity;e.globalAlpha=l,e.strokeStyle=n,e.lineWidth=s,e.fillStyle=o,e.strokeRect(t-a/2,i-a/2,a,a),e.fillRect(t-a/2,i-a/2,a,a)}function Iw(e){var r=O({},Tw,e),t=r.size,i=r.padding,n=r.isStagger,a=r.rotation,o=Jc(t,i,n),s=th(o,n),l=ls(o,o),u=l.getContext("2d");us(u,r,o);for(var h=0,f=s;h<f.length;h++){var v=f[h],g=v[0],p=v[1];Lw(u,r,g,p)}var y=u.createPattern(l,"repeat");if(y){var m=va(),x=cs(m,a);y.setTransform(x)}return y}function Ow(e){var r=e.type,t=e.cfg,i;switch(r){case"dot":i=Aw(t);break;case"line":i=Mw(t);break;case"square":i=Iw(t);break;default:break}return i}function Ne(e){var r=this;return function(t){var i,n=t.options,a=t.chart,o=n.pattern;if(!o)return t;var s=function(l){for(var u,h,f,v=[],g=1;g<arguments.length;g++)v[g-1]=arguments[g];var p=a.getTheme().defaultColor,y=p,m=(h=(u=a.geometries)===null||u===void 0?void 0:u[0])===null||h===void 0?void 0:h.getAttribute("color");if(m){var x=m.getFields()[0],_=(0,c.get)(l,x);y=Le.getMappingValue(m,_,((f=m.values)===null||f===void 0?void 0:f[0])||p)}var w=o;typeof o=="function"&&(w=o.call(r,l,y)),w instanceof CanvasPattern||(w=Ow(O({},{cfg:{backgroundColor:y}},w)));var b=n[e];return(0,d.__assign)((0,d.__assign)({},typeof b=="function"?b.call.apply(b,(0,d.__spreadArrays)([r,l],v)):b||{}),{fill:w||y})};return O({},t,{options:(i={},i[e]=s,i)})}}function Yr(e){var r=e.chart,t=e.options,i=t.legend,n=t.colorField,a=t.seriesField;return i===!1?r.legend(!1):(n||a)&&r.legend(n||a,i),e}function he(e){var r=e.chart,t=e.options,i=t.tooltip;return i!==void 0&&r.tooltip(i),e}function ee(e){var r=e.chart,t=e.options,i=t.interactions;return(0,c.each)(i,function(n){n.enable===!1?r.removeInteraction(n.type):r.interaction(n.type,n.cfg||{})}),e}function Kt(e){var r=e.chart,t=e.options,i=t.animation;return typeof i=="boolean"?r.animate(i):r.animate(!0),(0,c.each)(r.geometries,function(n){n.animate(i)}),e}function Wt(e){var r=e.chart,t=e.options,i=t.theme;return i&&r.theme(i),e}function Tr(e){var r=e.chart,t=e.options,i=t.state;return i&&(0,c.each)(r.geometries,function(n){n.state(i)}),e}function on(e){var r=e.chart,t=e.options,i=t.slider;return r.option("slider",i),e}function hs(e){var r=e.chart,t=e.options,i=t.scrollbar;return r.option("scrollbar",i),e}function oe(e,r){return function(t){var i=t.chart,n=t.options,a={};return(0,c.each)(e,function(o,s){a[s]=Zt(o,Oe)}),a=O({},r,n.meta,a),i.scale(a),t}}function ae(e){return function(r){var t=r.chart,i=r.options,n=t.getController("annotation");return(0,c.each)((0,d.__spreadArrays)(i.annotations||[],e||[]),function(a){n.annotation(a)}),r}}function Xr(e){var r=e.chart,t=e.options,i=t.yAxis,n=t.limitInPlot,a=n;return(0,c.isObject)(i)&&(0,c.isNil)(n)&&(Object.values(Zt(i,["min","max","minLimit","maxLimit"])).some(function(o){return!(0,c.isNil)(o)})?a=!0:a=!1),r.limitInPlot=a,e}function eh(e){return e===void 0&&(e="rect"),function(r){var t=r.chart,i=r.options,n=i.coordinate,a=Array.from(n||[]).map(function(o){return o.type==="reflectX"?["reflect","x"]:o.type==="reflectY"?["reflect","y"]:o.type==="transpose"?["transpose"]:null}).filter(function(o){return!!o});return a.length!==0&&t.coordinate({type:e,actions:a}),r}}function He(e,r){if(e===!1)return{fields:!1};var t=(0,c.get)(e,"fields"),i=(0,c.get)(e,"formatter");return i&&!t&&(t=r),{fields:t,formatter:i}}function da(e,r){var t=e.type,i=e.xField,n=e.yField,a=e.colorField,o=e.shapeField,s=e.sizeField,l=e.styleField,u=e.rawFields,h=u===void 0?[]:u,f=[];if(r==="color")f=(0,d.__spreadArrays)([a||i],h);else if(r==="shape")f=(0,d.__spreadArrays)([o||i],h);else if(r==="size")f=(0,d.__spreadArrays)([s||i],h);else{f=(0,d.__spreadArrays)([i,n,a,o,s,l],h);var v=["x","y","color","shape","size","style"].indexOf(r),g=f[v];f.splice(v,1),f.unshift(g)}var p=(0,c.uniq)(f.filter(function(m){return!!m})),y=t==="line"&&[i,n].includes(p.join("*"))?"":p.join("*");return{mappingFields:p,tileMappingField:y}}function pi(e,r){if(!!r)return function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var n={};return e.forEach(function(a,o){n[a]=t[o]}),delete n.undefined,r(n)}}function Pe(e){var r=e.chart,t=e.options,i=t.type,n=t.args,a=t.mapping,o=t.xField,s=t.yField,l=t.colorField,u=t.shapeField,h=t.sizeField,f=t.tooltipFields,v=t.label,g=t.state,p=t.customInfo;if(!a)return e;var y=a.color,m=a.shape,x=a.size,_=a.style,w=a.tooltip,b=r[i](n).position(o+"*"+s);if((0,c.isString)(y))l?b.color(l,y):b.color(y);else if((0,c.isFunction)(y)){var S=da(t,"color"),C=S.mappingFields,M=S.tileMappingField;b.color(M,pi(C,y))}else l&&b.color(l,y);if((0,c.isString)(m))u?b.shape(u,[m]):b.shape(m);else if((0,c.isFunction)(m)){var L=da(t,"shape"),C=L.mappingFields,M=L.tileMappingField;b.shape(M,pi(C,m))}else u&&b.shape(u,m);if((0,c.isNumber)(x))h?b.size(h,x):b.size(x);else if((0,c.isFunction)(x)){var B=da(t,"size"),C=B.mappingFields,M=B.tileMappingField;b.size(M,pi(C,x))}else h&&b.size(h,x);if((0,c.isFunction)(_)){var I=da(t,"style"),C=I.mappingFields,M=I.tileMappingField;b.style(M,pi(C,_))}else(0,c.isObject)(_)&&b.style(_);if(f===!1?b.tooltip(!1):(0,c.isEmpty)(f)||b.tooltip(f.join("*"),pi(f,w)),v===!1)b.label(!1);else if(v){var G=v.callback,q=v.fields,ft=(0,d.__rest)(v,["callback","fields"]);b.label({fields:q||[s],callback:G,cfg:ye(ft)})}return g&&b.state(g),p&&b.customInfo(p),[o,s].filter(function(mt){return mt!==l}).forEach(function(mt){r.legend(mt,!1)}),(0,d.__assign)((0,d.__assign)({},e),{ext:{geometry:b}})}function ga(e){var r=e.options,t=r.area,i=r.xField,n=r.yField,a=r.seriesField,o=r.smooth,s=r.tooltip,l=r.useDeferredLabel,u=He(s,[i,n,a]),h=u.fields,f=u.formatter;return t?Pe(O({},e,{options:{type:"area",colorField:a,tooltipFields:h,mapping:(0,d.__assign)({shape:o?"smooth":"area",tooltip:f},t),args:{useDeferredLabel:l}}})):e}function yi(e){var r=e.options,t=r.line,i=r.stepType,n=r.xField,a=r.yField,o=r.seriesField,s=r.smooth,l=r.connectNulls,u=r.tooltip,h=r.useDeferredLabel,f=He(u,[n,a,o]),v=f.fields,g=f.formatter;return t?Pe(O({},e,{options:{type:"line",colorField:o,tooltipFields:v,mapping:(0,c.deepMix)({shape:i||(s?"smooth":"line"),tooltip:g},t),args:{connectNulls:l,useDeferredLabel:h}}})):e}function ze(e){var r=e.options,t=r.point,i=r.xField,n=r.yField,a=r.seriesField,o=r.sizeField,s=r.shapeField,l=r.tooltip,u=r.useDeferredLabel,h=He(l,[i,n,a,o,s]),f=h.fields,v=h.formatter;return t?Pe(O({},e,{options:{type:"point",colorField:a,shapeField:s,tooltipFields:f,mapping:(0,d.__assign)({tooltip:v},t),args:{useDeferredLabel:u}}})):e}function Pw(e){var r=e.chart,t=e.options,i=e.ext,n=t.seriesField,a=t.isGroup,o=t.isStack,s=t.marginRatio,l=t.widthRatio,u=t.groupField,h=t.theme,f=[];if(n&&(a&&f.push({type:"dodge",dodgeBy:u||n,marginRatio:s}),o&&f.push({type:"stack",marginRatio:s})),f.length&&(i==null?void 0:i.geometry)){var v=i==null?void 0:i.geometry;v.adjust(f)}return(0,c.isNil)(l)||r.theme(O({},(0,c.isObject)(h)?h:Ki(h),{columnWidthRatio:l})),e}function Ce(e){var r=e.options,t=r.xField,i=r.yField,n=r.interval,a=r.seriesField,o=r.tooltip,s=r.minColumnWidth,l=r.maxColumnWidth,u=r.columnBackground,h=r.dodgePadding,f=r.intervalPadding,v=r.useDeferredLabel,g=He(o,[t,i,a]),p=g.fields,y=g.formatter,m=(n?Pe(O({},e,{options:{type:"interval",colorField:a,tooltipFields:p,mapping:(0,d.__assign)({tooltip:y},n),args:{dodgePadding:h,intervalPadding:f,minColumnWidth:s,maxColumnWidth:l,background:u,useDeferredLabel:v}}})):e).ext;return Pw((0,d.__assign)((0,d.__assign)({},e),{ext:m}))}function pa(e){var r=e.options,t=r.polygon,i=r.xField,n=r.yField,a=r.seriesField,o=r.tooltip,s=r.useDeferredLabel,l=He(o,[i,n,a]),u=l.fields,h=l.formatter;return t?Pe(O({},e,{options:{type:"polygon",colorField:a,tooltipFields:u,mapping:(0,d.__assign)({tooltip:h},t),args:{useDeferredLabel:s}}})):e}function rh(e){var r=e.options,t=r.edge,i=r.xField,n=r.yField,a=r.seriesField,o=r.tooltip,s=r.useDeferredLabel,l=He(o,[i,n,a]),u=l.fields,h=l.formatter;return t?Pe(O({},e,{options:{type:"edge",colorField:a,tooltipFields:u,mapping:(0,d.__assign)({tooltip:h},t),args:{useDeferredLabel:s}}})):e}function fs(e){var r=e.options,t=r.schema,i=r.xField,n=r.yField,a=r.seriesField,o=r.tooltip,s=r.useDeferredLabel,l=He(o,[i,n,a]),u=l.fields,h=l.formatter;return t?Pe(O({},e,{options:{type:"schema",colorField:a,tooltipFields:u,mapping:(0,d.__assign)({tooltip:h},t),args:{useDeferredLabel:s}}})):e}function Dw(e){var r=e.options,t=r.violin,i=r.xField,n=r.yField,a=r.seriesField,o=r.sizeField,s=r.tooltip,l=He(s,[i,n,a,o]),u=l.fields,h=l.formatter;return t?Pe(O({},e,{options:{type:"violin",colorField:a,tooltipFields:u,mapping:(0,d.__assign)({tooltip:h},t)}})):e}function kw(e){var r=e.chart,t=e.options,i=t.data,n=t.color,a=t.lineStyle,o=t.lineShape,s=t.point,l=t.area,u=t.seriesField,h=s==null?void 0:s.state,f=l==null?void 0:l.state;r.data(i);var v=O({},e,{options:{shapeField:u,line:{color:n,style:a,shape:o},point:s&&(0,d.__assign)({color:n,shape:"circle"},s),area:l&&(0,d.__assign)({color:n},l),label:void 0}}),g=O({},v,{options:{tooltip:!1,state:h}}),p=O({},v,{options:{tooltip:!1,state:f}});return yi(v),ze(g),ga(p),e}function ya(e){var r,t,i=e.options,n=i.xAxis,a=i.yAxis,o=i.xField,s=i.yField,l=i.data;return _t(oe((r={},r[o]=n,r[s]=a,r),(t={},t[o]={type:"cat"},t[s]=os(l,s),t)))(e)}function Bw(e){var r=e.chart,t=e.options,i=t.reflect;if(i){var n=i;(0,c.isArray)(n)||(n=[n]);var a=n.map(function(o){return["reflect",o]});r.coordinate({type:"rect",actions:a})}return e}function ih(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return i===!1?r.axis(a,!1):r.axis(a,i),n===!1?r.axis(o,!1):r.axis(o,n),e}function nh(e){var r=e.chart,t=e.options,i=t.legend,n=t.seriesField;return i&&n?r.legend(n,i):i===!1&&r.legend(!1),e}function Rw(e){var r=e.chart,t=e.options,i=t.label,n=t.yField,a=Se(r,"line");if(!i)a.label(!1);else{var o=i.callback,s=(0,d.__rest)(i,["callback"]);a.label({fields:[n],callback:o,cfg:(0,d.__assign)({layout:[{type:"limit-in-plot"},{type:"path-adjust-position"},{type:"point-adjust-position"},{type:"limit-in-plot",cfg:{action:"hide"}}]},ye(s))})}return e}function Nw(e){var r=e.chart,t=e.options,i=t.isStack;return i&&(0,c.each)(r.geometries,function(n){n.adjust("stack")}),e}function ah(e){return _t(kw,ya,Nw,Wt,Bw,ih,nh,he,Rw,on,hs,ee,Kt,ae(),Xr)(e)}var zw=O({},Mt.getDefaultOptions(),{tooltip:{shared:!0,showMarkers:!0,showCrosshairs:!0,crosshairs:{type:"x"}},legend:{position:"top-left",radio:{}},isStack:!1}),Vw=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.active=function(){var t=this.getView(),i=this.context.event;if(i.data){var n=i.data.items,a=t.geometries.filter(function(o){return o.type==="point"});(0,c.each)(a,function(o){(0,c.each)(o.elements,function(s){var l=(0,c.findIndex)(n,function(u){return u.data===s.data})!==-1;s.setState("active",l)})})}},r.prototype.reset=function(){var t=this.getView(),i=t.geometries.filter(function(n){return n.type==="point"});(0,c.each)(i,function(n){(0,c.each)(n.elements,function(a){a.setState("active",!1)})})},r.prototype.getView=function(){return this.context.view},r}(ie);yt("marker-active",Vw),Et("marker-active",{start:[{trigger:"tooltip:show",action:"marker-active:active"}],end:[{trigger:"tooltip:hide",action:"marker-active:reset"}]});var oh=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="line",t}return r.getDefaultOptions=function(){return zw},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this,n=i.chart,a=i.options;ya({chart:n,options:a}),this.chart.changeData(t)},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return ah},r}(Mt);function sh(e,r,t,i){var n=(0,c.reduce)(e,function(a,o){var s=o[t],l=a.has(s)?a.get(s):0,u=o[r];return l=Hr(u)?l+u:l,a.set(s,l),a},new Map);return(0,c.map)(e,function(a){var o,s=a[r],l=a[t],u=Hr(s)&&n.get(l)!==0?s/n.get(l):0;return(0,d.__assign)((0,d.__assign)({},a),(o={},o[i]=u,o))})}function Gw(e,r,t,i){var n=(0,c.reduce)(e,function(a,o){var s=(0,c.reduce)(t,function(h,f){return""+h+o[f]},""),l=a.has(s)?a.get(s):0,u=o[r];return l=Hr(u)?l+u:l,a.set(s,l),a},new Map);return(0,c.map)(e,function(a){var o,s=a[r],l=(0,c.reduce)(t,function(h,f){return""+h+a[f]},""),u=Hr(s)&&n.get(l)!==0?s/n.get(l):0;return(0,d.__assign)((0,d.__assign)({},a),(o={},o[i]=u,o))})}function sn(e,r,t,i,n){return n?sh(e,r,t,i):e}function Ww(e){var r=e.chart,t=e.options,i=t.data,n=t.areaStyle,a=t.color,o=t.point,s=t.line,l=t.isPercent,u=t.xField,h=t.yField,f=t.tooltip,v=t.seriesField,g=t.startOnZero,p=o==null?void 0:o.state,y=sn(i,h,u,h,l);r.data(y);var m=l?(0,d.__assign)({formatter:function(b){return{name:b[v]||b[u],value:(Number(b[h])*100).toFixed(2)+"%"}}},f):f,x=O({},e,{options:{area:{color:a,style:n},point:o&&(0,d.__assign)({color:a},o),tooltip:m,label:void 0,args:{startOnZero:g}}}),_={chart:r,options:O({line:{size:2}},(0,c.omit)(t,["state"]),{line:s&&(0,d.__assign)({color:a},s),sizeField:v,state:s==null?void 0:s.state,tooltip:!1,label:void 0,args:{startOnZero:g}})},w=O({},x,{options:{tooltip:!1,state:p}});return ga(x),yi(_),ze(w),e}function Hw(e){var r=e.chart,t=e.options,i=t.label,n=t.yField,a=Se(r,"area");if(!i)a.label(!1);else{var o=i.callback,s=(0,d.__rest)(i,["callback"]);a.label({fields:[n],callback:o,cfg:(0,d.__assign)({layout:[{type:"limit-in-plot"},{type:"path-adjust-position"},{type:"point-adjust-position"},{type:"limit-in-plot",cfg:{action:"hide"}}]},ye(s))})}return e}function Yw(e){var r=e.chart,t=e.options,i=t.isStack,n=t.isPercent,a=t.seriesField;return(n||i)&&a&&(0,c.each)(r.geometries,function(o){o.adjust("stack")}),e}function lh(e){return _t(Wt,Ne("areaStyle"),eh("rect"),Ww,ya,Yw,ih,nh,he,Hw,on,ae(),ee,Kt,Xr)(e)}var Xw=O({},Mt.getDefaultOptions(),{tooltip:{shared:!0,showMarkers:!0,showCrosshairs:!0,crosshairs:{type:"x"}},isStack:!0,line:{},legend:{position:"top-left",radio:{}}}),uh=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="area",t}return r.getDefaultOptions=function(){return Xw},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this.options,n=i.isPercent,a=i.xField,o=i.yField,s=this,l=s.chart,u=s.options;ya({chart:l,options:u}),this.chart.changeData(sn(t,o,a,o,n))},r.prototype.getSchemaAdaptor=function(){return lh},r}(Mt);function ch(e,r){return!(0,c.isNumber)(e)||!(0,c.isNumber)(r)?"-":e===r?"100%":e===0?"\u221E":r===0?"-\u221E":(100*r/e).toFixed(2)+"%"}function jw(e,r){return O({size:r?32:80,spacing:r?8:12,offset:r?32:0,arrow:e.arrow!==!1&&{headSize:12,style:{fill:"rgba(0, 0, 0, 0.05)"}},text:e.text!==!1&&{style:{fontSize:12,fill:"rgba(0, 0, 0, 0.85)",textAlign:"center",textBaseline:"middle"},formatter:ch}},e)}function ma(e,r){return(0,c.map)(r.getModel().points,function(t){return e.convertPoint(t)})}function Uw(e,r,t){var i=e.view,n=e.geometry,a=e.group,o=e.options,s=e.horizontal,l=o.offset,u=o.size,h=o.arrow,f=i.getCoordinate(),v=ma(f,r)[3],g=ma(f,t)[0],p=g.y-v.y,y=g.x-v.x;if(typeof h!="boolean"){var m=h.headSize,x=o.spacing,_;s?(y-m)/2<x?(x=Math.max(1,(y-m)/2),_=[[v.x+x,v.y-l],[v.x+x,v.y-l-u],[g.x-x,g.y-l-u/2]]):_=[[v.x+x,v.y-l],[v.x+x,v.y-l-u],[g.x-x-m,g.y-l-u],[g.x-x,g.y-l-u/2],[g.x-x-m,g.y-l]]:(p-m)/2<x?(x=Math.max(1,(p-m)/2),_=[[v.x+l,v.y+x],[v.x+l+u,v.y+x],[g.x+l+u/2,g.y-x]]):_=[[v.x+l,v.y+x],[v.x+l+u,v.y+x],[g.x+l+u,g.y-x-m],[g.x+l+u/2,g.y-x],[g.x+l,g.y-x-m]],a.addShape("polygon",{id:i.id+"-conversion-tag-arrow-"+n.getElementId(r.getModel().mappingData),name:"conversion-tag-arrow",origin:{element:r,nextElement:t},attrs:(0,d.__assign)((0,d.__assign)({},h.style||{}),{points:_})})}}function Zw(e,r,t){var i,n,a,o=e.view,s=e.geometry,l=e.group,u=e.options,h=e.field,f=e.horizontal,v=u.offset,g=u.size;if(typeof u.text!="boolean"){var p=o.getCoordinate(),y=((i=u.text)===null||i===void 0?void 0:i.formatter)&&((n=u.text)===null||n===void 0?void 0:n.formatter(r.getData()[h],t.getData()[h])),m=ma(p,r)[f?3:0],x=ma(p,t)[f?0:3],_=l.addShape("text",{id:o.id+"-conversion-tag-text-"+s.getElementId(r.getModel().mappingData),name:"conversion-tag-text",origin:{element:r,nextElement:t},attrs:(0,d.__assign)((0,d.__assign)({},((a=u.text)===null||a===void 0?void 0:a.style)||{}),{text:y,x:f?(m.x+x.x)/2:m.x+v+g/2,y:f?m.y-v-g/2:(m.y+x.y)/2})});if(f){var w=x.x-m.x,b=_.getBBox().width;if(b>w){var S=b/y.length,C=Math.max(1,Math.ceil(w/S)-1),M=y.slice(0,C)+"...";_.attr("text",M)}}}}function Kw(e,r,t){Uw(e,r,t),Zw(e,r,t)}function qw(e,r,t){return r===void 0&&(r=!0),t===void 0&&(t=!1),function(i){var n=i.options,a=i.chart,o=n.conversionTag,s=n.theme;return o&&!t&&(a.theme(O({},(0,c.isObject)(s)?s:Ki(s),{columnWidthRatio:1/3})),a.annotation().shape({render:function(l,u){var h=l.addGroup({id:a.id+"-conversion-tag-group",name:"conversion-tag-group"}),f=(0,c.find)(a.geometries,function(p){return p.type==="interval"}),v={view:u,geometry:f,group:h,field:e,horizontal:r,options:jw(o,r)},g=f.elements;(0,c.each)(g,function(p,y){y>0&&Kw(v,g[y-1],p)})}})),i}}var jr={hover:"__interval-connected-area-hover__",click:"__interval-connected-area-click__"},vs=function(e,r){return e==="hover"?[{trigger:"interval:mouseenter",action:["element-highlight-by-color:highlight","element-link-by-color:link"],arg:[null,{style:r}]}]:[{trigger:"interval:click",action:["element-highlight-by-color:clear","element-highlight-by-color:highlight","element-link-by-color:clear","element-link-by-color:unlink","element-link-by-color:link"],arg:[null,null,null,null,{style:r}]}]};Et(jr.hover,{start:vs(jr.hover),end:[{trigger:"interval:mouseleave",action:["element-highlight-by-color:reset","element-link-by-color:unlink"]}]}),Et(jr.click,{start:vs(jr.click),end:[{trigger:"document:mousedown",action:["element-highlight-by-color:clear","element-link-by-color:clear"]}]});function $w(e){return e===void 0&&(e=!1),function(r){var t=r.chart,i=r.options,n=i.connectedArea,a=function(){t.removeInteraction(jr.hover),t.removeInteraction(jr.click)};if(!e&&n){var o=n.trigger||"hover";a(),t.interaction(jr[o],{start:vs(o,n.style)})}else a();return r}}var Qw=10,Jw=5,tb={padding:[8,10],text:"reset",textStyle:{default:{x:0,y:0,fontSize:12,fill:"#333333",cursor:"pointer"}},buttonStyle:{default:{fill:"#f7f7f7",stroke:"#cccccc",cursor:"pointer"},active:{fill:"#e6e6e6"}}},eb=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.buttonGroup=null,t.buttonCfg=(0,d.__assign)({name:"button"},tb),t}return r.prototype.getButtonCfg=function(){var t=this.context.view,i=(0,c.get)(t,["interactions","filter-action","cfg","buttonConfig"]);return O(this.buttonCfg,i,this.cfg)},r.prototype.drawButton=function(){var t=this.getButtonCfg(),i=this.context.view.foregroundGroup.addGroup({name:t.name}),n=this.drawText(i);this.drawBackground(i,n.getBBox()),this.buttonGroup=i},r.prototype.drawText=function(t){var i,n=this.getButtonCfg();return t.addShape({type:"text",name:"button-text",attrs:(0,d.__assign)({text:n.text},(i=n.textStyle)===null||i===void 0?void 0:i.default)})},r.prototype.drawBackground=function(t,i){var n,a=this.getButtonCfg(),o=Mr(a.padding),s=t.addShape({type:"rect",name:"button-rect",attrs:(0,d.__assign)({x:i.x-o[3],y:i.y-o[0],width:i.width+o[1]+o[3],height:i.height+o[0]+o[2]},(n=a.buttonStyle)===null||n===void 0?void 0:n.default)});return s.toBack(),t.on("mouseenter",function(){var l;s.attr((l=a.buttonStyle)===null||l===void 0?void 0:l.active)}),t.on("mouseleave",function(){var l;s.attr((l=a.buttonStyle)===null||l===void 0?void 0:l.default)}),s},r.prototype.resetPosition=function(){var t=this.context.view,i=t.getCoordinate(),n=i.convert({x:1,y:1}),a=this.buttonGroup,o=a.getBBox(),s=Le.transform(null,[["t",n.x-o.width-Qw,n.y+o.height+Jw]]);a.setMatrix(s)},r.prototype.show=function(){this.buttonGroup||this.drawButton(),this.resetPosition(),this.buttonGroup.show()},r.prototype.hide=function(){this.buttonGroup&&this.buttonGroup.hide()},r.prototype.destroy=function(){var t=this.buttonGroup;t&&t.remove(),e.prototype.destroy.call(this)},r}(ie);yt("brush-reset-button",eb,{name:"brush-reset-button"}),Et("filter-action",{});function hr(e){return e.isInPlot()}function Ur(e,r,t){var i=t||{},n=i.mask,a=i.isStartEnable,o=r||"rect";switch(e){case"brush":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair",isEnable:a||function(){return!0}},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:a||hr,action:["brush:start",o+"-mask:start",o+"-mask:show"],arg:[null,{maskStyle:n==null?void 0:n.style}]}],processing:[{trigger:"mousemove",isEnable:hr,action:[o+"-mask:resize"]}],end:[{trigger:"mouseup",isEnable:hr,action:["brush:filter","brush:end",o+"-mask:end",o+"-mask:hide","brush-reset-button:show"]}],rollback:[{trigger:"brush-reset-button:click",action:["brush:reset","brush-reset-button:hide","cursor:crosshair"]}]};case"brush-highlight":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair",isEnable:a||function(){return!0}},{trigger:"plot:mousemove",action:"cursor:crosshair",isEnable:a||function(){return!0}},{trigger:"plot:mousemove",action:"cursor:default",isEnable:function(s){return a?!a(s):!1}},{trigger:"mask:mouseenter",action:"cursor:move",isEnable:a||function(){return!0}},{trigger:"plot:mouseleave",action:"cursor:default"},{trigger:"mask:mouseleave",action:"cursor:crosshair"}],start:[{trigger:"plot:mousedown",isEnable:a||function(s){return!s.isInShape("mask")},action:[o+"-mask:start",o+"-mask:show"],arg:[{maskStyle:n==null?void 0:n.style}]},{trigger:"mask:dragstart",action:[o+"-mask:moveStart"]}],processing:[{trigger:"plot:mousemove",action:[o+"-mask:resize"]},{trigger:"mask:drag",action:[o+"-mask:move"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:[o+"-mask:end"]},{trigger:"mask:dragend",action:[o+"-mask:moveEnd"]},{trigger:"document:mouseup",isEnable:function(s){return!s.isInPlot()},action:["element-range-highlight:clear",o+"-mask:end",o+"-mask:hide"]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear",o+"-mask:hide"]}]};case"brush-x":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair",isEnable:a||function(){return!0}},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:a||hr,action:["brush-x:start",o+"-mask:start",o+"-mask:show"],arg:[null,{maskStyle:n==null?void 0:n.style}]}],processing:[{trigger:"mousemove",isEnable:hr,action:[o+"-mask:resize"]}],end:[{trigger:"mouseup",isEnable:hr,action:["brush-x:filter","brush-x:end",o+"-mask:end",o+"-mask:hide"]}],rollback:[{trigger:"dblclick",action:["brush-x:reset"]}]};case"brush-x-highlight":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair",isEnable:a||function(){return!0}},{trigger:"mask:mouseenter",action:"cursor:move",isEnable:a||function(){return!0}},{trigger:"plot:mouseleave",action:"cursor:default"},{trigger:"mask:mouseleave",action:"cursor:crosshair"}],start:[{trigger:"plot:mousedown",isEnable:a||function(s){return!s.isInShape("mask")},action:[o+"-mask:start",o+"-mask:show"],arg:[{maskStyle:n==null?void 0:n.style}]},{trigger:"mask:dragstart",action:[o+"-mask:moveStart"]}],processing:[{trigger:"plot:mousemove",action:[o+"-mask:resize"]},{trigger:"mask:drag",action:[o+"-mask:move"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:[o+"-mask:end"]},{trigger:"mask:dragend",action:[o+"-mask:moveEnd"]},{trigger:"document:mouseup",isEnable:function(s){return!s.isInPlot()},action:["element-range-highlight:clear",o+"-mask:end",o+"-mask:hide"]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear",o+"-mask:hide"]}]};case"brush-y":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair",isEnable:a||function(){return!0}},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:a||hr,action:["brush-y:start",o+"-mask:start",o+"-mask:show"],arg:[null,{maskStyle:n==null?void 0:n.style}]}],processing:[{trigger:"mousemove",isEnable:hr,action:[o+"-mask:resize"]}],end:[{trigger:"mouseup",isEnable:hr,action:["brush-y:filter","brush-y:end",o+"-mask:end",o+"-mask:hide"]}],rollback:[{trigger:"dblclick",action:["brush-y:reset"]}]};case"brush-y-highlight":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair",isEnable:a||function(){return!0}},{trigger:"mask:mouseenter",action:"cursor:move",isEnable:a||function(){return!0}},{trigger:"plot:mouseleave",action:"cursor:default"},{trigger:"mask:mouseleave",action:"cursor:crosshair"}],start:[{trigger:"plot:mousedown",isEnable:a||function(s){return!s.isInShape("mask")},action:[o+"-mask:start",o+"-mask:show"],arg:[{maskStyle:n==null?void 0:n.style}]},{trigger:"mask:dragstart",action:[o+"-mask:moveStart"]}],processing:[{trigger:"plot:mousemove",action:[o+"-mask:resize"]},{trigger:"mask:drag",action:[o+"-mask:move"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:[o+"-mask:end"]},{trigger:"mask:dragend",action:[o+"-mask:moveEnd"]},{trigger:"document:mouseup",isEnable:function(s){return!s.isInPlot()},action:["element-range-highlight:clear",o+"-mask:end",o+"-mask:hide"]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear",o+"-mask:hide"]}]};default:return{}}}Et("brush",Ur("brush")),Et("brush-highlight",Ur("brush-highlight")),Et("brush-x",Ur("brush-x","x-rect")),Et("brush-y",Ur("brush-y","y-rect")),Et("brush-x-highlight",Ur("brush-x-highlight","x-rect")),Et("brush-y-highlight",Ur("brush-y-highlight","y-rect"));var hh=["brush","brush-x","brush-y","brush-highlight","brush-x-highlight","brush-y-highlight"];function fh(e){var r=e.options,t=r.brush,i=(0,c.filter)(r.interactions||[],function(n){return hh.indexOf(n.type)===-1});return(t==null?void 0:t.enabled)&&(hh.forEach(function(n){var a=!1;switch(t.type){case"x-rect":a=n===(t.action==="highlight"?"brush-x-highlight":"brush-x");break;case"y-rect":a=n===(t.action==="highlight"?"brush-y-highlight":"brush-y");break;default:a=n===(t.action==="highlight"?"brush-highlight":"brush");break}var o={type:n,enable:a};t&&(o.cfg=Ur(n,t.type,t)),i.push(o)}),(t==null?void 0:t.action)!=="highlight"&&i.push({type:"filter-action",cfg:{buttonConfig:t.button}})),O({},e,{options:{interactions:i}})}function rb(e){var r=e.options,t=r.legend,i=r.seriesField,n=r.isStack;return i?t!==!1&&(t=(0,d.__assign)({position:n?"right-top":"top-left"},t)):t=!1,e.options.legend=t,e}function ib(e){var r=e.chart,t=e.options,i=t.data,n=t.columnStyle,a=t.color,o=t.columnWidthRatio,s=t.isPercent,l=t.isGroup,u=t.isStack,h=t.xField,f=t.yField,v=t.seriesField,g=t.groupField,p=t.tooltip,y=t.shape,m=s&&l&&u?Gw(i,f,[h,g],f):sn(i,f,h,f,s),x=[];u&&v&&!l?m.forEach(function(b){var S=x.find(function(C){return C[h]===b[h]&&C[v]===b[v]});S?S[f]+=b[f]||0:x.push((0,d.__assign)({},b))}):x=m,r.data(x);var _=s?(0,d.__assign)({formatter:function(b){return{name:l&&u?b[v]+" - "+b[g]:b[v]||b[h],value:(Number(b[f])*100).toFixed(2)+"%"}}},p):p,w=O({},e,{options:{data:x,widthRatio:o,tooltip:_,interval:{shape:y,style:n,color:a}}});return Ce(w),w}function ds(e){var r,t,i=e.options,n=i.xAxis,a=i.yAxis,o=i.xField,s=i.yField,l=i.data,u=i.isPercent,h=u?{max:1,min:0,minLimit:0,maxLimit:1}:{};return _t(oe((r={},r[o]=n,r[s]=a,r),(t={},t[o]={type:"cat"},t[s]=(0,d.__assign)((0,d.__assign)({},os(l,s)),h),t)))(e)}function nb(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return i===!1?r.axis(a,!1):r.axis(a,i),n===!1?r.axis(o,!1):r.axis(o,n),e}function ab(e){var r=e.chart,t=e.options,i=t.legend,n=t.seriesField;return i&&n?r.legend(n,i):i===!1&&r.legend(!1),e}function ob(e){var r=e.chart,t=e.options,i=t.label,n=t.yField,a=t.isRange,o=Se(r,"interval");if(!i)o.label(!1);else{var s=i.callback,l=(0,d.__rest)(i,["callback"]);o.label({fields:[n],callback:s,cfg:(0,d.__assign)({layout:(l==null?void 0:l.position)?void 0:[{type:"interval-adjust-position"},{type:"interval-hide-overlap"},{type:"adjust-color"},{type:"limit-in-plot",cfg:{action:"hide"}}]},ye(a?(0,d.__assign)({content:function(u){var h;return(h=u[n])===null||h===void 0?void 0:h.join("-")}},l):l))})}return e}function sb(e){var r=e.chart,t=e.options,i=t.tooltip,n=t.isGroup,a=t.isStack,o=t.groupField,s=t.data,l=t.xField,u=t.yField,h=t.seriesField;if(i===!1)r.tooltip(!1);else{var f=i;if(n&&a){var v=(f==null?void 0:f.formatter)||function(g){return{name:g[h]+" - "+g[o],value:g[u]}};f=(0,d.__assign)((0,d.__assign)({},f),{customItems:function(g){var p=[];return(0,c.each)(g,function(y){var m=(0,c.filter)(s,function(x){return(0,c.isMatch)(x,Zt(y.data,[l,h]))});m.forEach(function(x){p.push((0,d.__assign)((0,d.__assign)((0,d.__assign)({},y),{value:x[u],data:x,mappingData:{_origin:x}}),v(x)))})}),p}})}r.tooltip(f)}return e}function xa(e,r){r===void 0&&(r=!1);var t=e.options,i=t.seriesField;return _t(rb,Wt,Ne("columnStyle"),Tr,eh("rect"),ib,ds,nb,ab,sb,on,hs,ob,fh,ee,Kt,ae(),qw(t.yField,!r,!!i),$w(!t.isStack),Xr)(e)}var lb=O({},Mt.getDefaultOptions(),{columnWidthRatio:.6,marginRatio:1/32,tooltip:{shared:!0,showMarkers:!1,offset:20},legend:{radio:{}},interactions:[{type:"active-region"}]}),vh=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="column",t}return r.getDefaultOptions=function(){return lb},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this.options,n=i.yField,a=i.xField,o=i.isPercent,s=this,l=s.chart,u=s.options;ds({chart:l,options:u}),this.chart.changeData(sn(t,n,a,n,o))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return xa},r}(Mt);function ub(e){var r=e.options,t=r.xField,i=r.yField,n=r.xAxis,a=r.yAxis,o={left:"bottom",right:"top",top:"left",bottom:"right"},s=a!==!1?(0,d.__assign)({position:o[(a==null?void 0:a.position)||"left"]},a):!1,l=n!==!1?(0,d.__assign)({position:o[(n==null?void 0:n.position)||"bottom"]},n):!1;return(0,d.__assign)((0,d.__assign)({},e),{options:(0,d.__assign)((0,d.__assign)({},r),{xField:i,yField:t,xAxis:s,yAxis:l})})}function cb(e){var r=e.options,t=r.label;return t&&!t.position&&(t.position="left",t.layout||(t.layout=[{type:"interval-adjust-position"},{type:"interval-hide-overlap"},{type:"adjust-color"},{type:"limit-in-plot",cfg:{action:"hide"}}])),O({},e,{options:{label:t}})}function hb(e){var r=e.options,t=r.seriesField,i=r.isStack,n=r.legend;return t?n!==!1&&(n=(0,d.__assign)({position:i?"top-left":"right-top"},n||{})):n=!1,O({},e,{options:{legend:n}})}function fb(e){var r=e.options,t=[{type:"transpose"},{type:"reflectY"}].concat(r.coordinate||[]);return O({},e,{options:{coordinate:t}})}function vb(e){var r=e.chart,t=e.options,i=t.barStyle,n=t.barWidthRatio,a=t.minBarWidth,o=t.maxBarWidth,s=t.barBackground;return xa({chart:r,options:(0,d.__assign)((0,d.__assign)({},t),{columnStyle:i,columnWidthRatio:n,minColumnWidth:a,maxColumnWidth:o,columnBackground:s})},!0)}function dh(e){return _t(ub,cb,hb,he,fb,vb)(e)}var db=O({},Mt.getDefaultOptions(),{barWidthRatio:.6,marginRatio:1/32,tooltip:{shared:!0,showMarkers:!1,offset:20},legend:{radio:{}},interactions:[{type:"active-region"}]}),gb=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="bar",t}return r.getDefaultOptions=function(){return db},r.prototype.changeData=function(t){var i,n;this.updateOption({data:t});var a=this,o=a.chart,s=a.options,l=s.isPercent,u=s.xField,h=s.yField,f=s.xAxis,v=s.yAxis;i=[h,u],u=i[0],h=i[1],n=[v,f],f=n[0],v=n[1];var g=(0,d.__assign)((0,d.__assign)({},s),{xField:u,yField:h,yAxis:v,xAxis:f});ds({chart:o,options:g}),o.changeData(sn(t,u,h,u,l))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return dh},r}(Mt),gh=O({},Mt.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}}}}});function pb(e,r){var t=null;return(0,c.each)(e,function(i){typeof i[r]=="number"&&(t+=i[r])}),t}function yb(e,r){var t;switch(e){case"inner":return t="-30%",(0,c.isString)(r)&&r.endsWith("%")?parseFloat(r)*.01>0?t:r:r<0?r:t;case"outer":return t=12,(0,c.isString)(r)&&r.endsWith("%")?parseFloat(r)*.01<0?t:r:r>0?r:t;default:return r}}function _a(e,r){return(0,c.every)(gi(e,r),function(t){return t[r]===0})}var mb=[1,0,0,0,1,0,0,0,1];function gs(e,r){var t=r?(0,d.__spreadArrays)(r):(0,d.__spreadArrays)(mb);return Le.transform(t,e)}var xb=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getActiveElements=function(){var t=Le.getDelegationObject(this.context);if(t){var i=this.context.view,n=t.component,a=t.item,o=n.get("field");if(o){var s=i.geometries[0].elements;return s.filter(function(l){return l.getModel().data[o]===a.value})}}return[]},r.prototype.getActiveElementLabels=function(){var t=this.context.view,i=this.getActiveElements(),n=t.geometries[0].labelsContainer.getChildren();return n.filter(function(a){return i.find(function(o){return(0,c.isEqual)(o.getData(),a.get("data"))})})},r.prototype.transfrom=function(t){t===void 0&&(t=7.5);var i=this.getActiveElements(),n=this.getActiveElementLabels();i.forEach(function(a,o){var s=n[o],l=a.geometry.coordinate;if(l.isPolar&&l.isTransposed){var u=Le.getAngle(a.getModel(),l),h=u.startAngle,f=u.endAngle,v=(h+f)/2,g=t,p=g*Math.cos(v),y=g*Math.sin(v);a.shape.setMatrix(gs([["t",p,y]])),s.setMatrix(gs([["t",p,y]]))}})},r.prototype.active=function(){this.transfrom()},r.prototype.reset=function(){this.transfrom(0)},r}(ie);function _b(e){var r=e.event,t,i=r.target;return i&&(t=i.get("element")),t}var wb=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getAnnotations=function(t){var i=t||this.context.view;return i.getController("annotation").option},r.prototype.getInitialAnnotation=function(){return this.initialAnnotation},r.prototype.init=function(){var t=this,i=this.context.view;i.removeInteraction("tooltip"),i.on("afterchangesize",function(){var n=t.getAnnotations(i);t.initialAnnotation=n})},r.prototype.change=function(t){var i=this.context,n=i.view,a=i.event;this.initialAnnotation||(this.initialAnnotation=this.getAnnotations());var o=(0,c.get)(a,["data","data"]);if(a.type.match("legend-item")){var s=Le.getDelegationObject(this.context),l=n.getGroupedFields()[0];if(s&&l){var u=s.item;o=n.getData().find(function(g){return g[l]===u.value})}}if(o){var h=(0,c.get)(t,"annotations",[]),f=(0,c.get)(t,"statistic",{});n.getController("annotation").clear(!0),(0,c.each)(h,function(g){typeof g=="object"&&n.annotation()[g.type](g)}),ua(n,{statistic:f,plotType:"pie"},o),n.render(!0)}var v=_b(this.context);v&&v.shape.toFront()},r.prototype.reset=function(){var t=this.context.view,i=t.getController("annotation");i.clear(!0);var n=this.getInitialAnnotation();(0,c.each)(n,function(a){t.annotation()[a.type](a)}),t.render(!0)},r}(ie),ph="pie-statistic";yt(ph,wb),Et("pie-statistic-active",{start:[{trigger:"element:mouseenter",action:"pie-statistic:change"}],end:[{trigger:"element:mouseleave",action:"pie-statistic:reset"}]}),yt("pie-legend",xb),Et("pie-legend-active",{start:[{trigger:"legend-item:mouseenter",action:"pie-legend:active"}],end:[{trigger:"legend-item:mouseleave",action:"pie-legend:reset"}]});function bb(e){var r=e.chart,t=e.options,i=t.data,n=t.angleField,a=t.colorField,o=t.color,s=t.pieStyle,l=gi(i,n);if(_a(l,n)){var u="$$percentage$$";l=l.map(function(f){var v;return(0,d.__assign)((0,d.__assign)({},f),(v={},v[u]=1/l.length,v))}),r.data(l);var h=O({},e,{options:{xField:"1",yField:u,seriesField:a,isStack:!0,interval:{color:o,style:s},args:{zIndexReversed:!0,sortZIndex:!0}}});Ce(h)}else{r.data(l);var h=O({},e,{options:{xField:"1",yField:n,seriesField:a,isStack:!0,interval:{color:o,style:s},args:{zIndexReversed:!0,sortZIndex:!0}}});Ce(h)}return e}function Sb(e){var r,t=e.chart,i=e.options,n=i.meta,a=i.colorField,o=O({},n);return t.scale(o,(r={},r[a]={type:"cat"},r)),e}function Cb(e){var r=e.chart,t=e.options,i=t.radius,n=t.innerRadius,a=t.startAngle,o=t.endAngle;return r.coordinate({type:"theta",cfg:{radius:i,innerRadius:n,startAngle:a,endAngle:o}}),e}function Ab(e){var r=e.chart,t=e.options,i=t.label,n=t.colorField,a=t.angleField,o=r.geometries[0];if(!i)o.label(!1);else{var s=i.callback,l=(0,d.__rest)(i,["callback"]),u=ye(l);if(u.content){var h=u.content;u.content=function(p,y,m){var x=p[n],_=p[a],w=r.getScaleByField(a),b=w==null?void 0:w.scale(_);return(0,c.isFunction)(h)?h((0,d.__assign)((0,d.__assign)({},p),{percent:b}),y,m):(0,c.isString)(h)?Nc(h,{value:_,name:x,percentage:(0,c.isNumber)(b)&&!(0,c.isNil)(_)?(b*100).toFixed(2)+"%":null}):h}}var f={inner:"",outer:"pie-outer",spider:"pie-spider"},v=u.type?f[u.type]:"pie-outer",g=u.layout?(0,c.isArray)(u.layout)?u.layout:[u.layout]:[];u.layout=(v?[{type:v}]:[]).concat(g),o.label({fields:n?[a,n]:[a],callback:s,cfg:(0,d.__assign)((0,d.__assign)({},u),{offset:yb(u.type,u.offset),type:"pie"})})}return e}function yh(e){var r=e.innerRadius,t=e.statistic,i=e.angleField,n=e.colorField,a=e.meta,o=e.locale,s=fa(o);if(r&&t){var l=O({},gh.statistic,t),u=l.title,h=l.content;return u!==!1&&(u=O({},{formatter:function(f){var v=f?f[n]:(0,c.isNil)(u.content)?s.get(["statistic","total"]):u.content,g=(0,c.get)(a,[n,"formatter"])||function(p){return p};return g(v)}},u)),h!==!1&&(h=O({},{formatter:function(f,v){var g=f?f[i]:pb(v,i),p=(0,c.get)(a,[i,"formatter"])||function(y){return y};return f||(0,c.isNil)(h.content)?p(g):h.content}},h)),O({},{statistic:{title:u,content:h}},e)}return e}function mh(e){var r=e.chart,t=e.options,i=yh(t),n=i.innerRadius,a=i.statistic;return r.getController("annotation").clear(!0),_t(ae())(e),n&&a&&ua(r,{statistic:a,plotType:"pie"}),e}function Fb(e){var r=e.chart,t=e.options,i=t.tooltip,n=t.colorField,a=t.angleField,o=t.data;if(i===!1)r.tooltip(i);else if(r.tooltip(O({},i,{shared:!1})),_a(o,a)){var s=(0,c.get)(i,"fields"),l=(0,c.get)(i,"formatter");(0,c.isEmpty)((0,c.get)(i,"fields"))&&(s=[n,a],l=l||function(u){return{name:u[n],value:(0,c.toString)(u[a])}}),r.geometries[0].tooltip(s.join("*"),pi(s,l))}return e}function Eb(e){var r=e.chart,t=e.options,i=yh(t),n=i.interactions,a=i.statistic,o=i.annotations;return(0,c.each)(n,function(s){var l,u;if(s.enable===!1)r.removeInteraction(s.type);else if(s.type==="pie-statistic-active"){var h=[];((l=s.cfg)===null||l===void 0?void 0:l.start)||(h=[{trigger:"element:mouseenter",action:ph+":change",arg:{statistic:a,annotations:o}}]),(0,c.each)((u=s.cfg)===null||u===void 0?void 0:u.start,function(f){h.push((0,d.__assign)((0,d.__assign)({},f),{arg:{statistic:a,annotations:o}}))}),r.interaction(s.type,O({},s.cfg,{start:h}))}else r.interaction(s.type,s.cfg||{})}),e}function xh(e){return _t(Ne("pieStyle"),bb,Sb,Wt,Cb,Yr,Fb,Ab,Tr,mh,Eb,Kt)(e)}var _h=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="pie",t}return r.getDefaultOptions=function(){return gh},r.prototype.changeData=function(t){this.chart.emit(A.BEFORE_CHANGE_DATA,ne.fromData(this.chart,A.BEFORE_CHANGE_DATA,null));var i=this.options,n=this.options.angleField,a=gi(i.data,n),o=gi(t,n);_a(a,n)||_a(o,n)?this.update({data:t}):(this.updateOption({data:t}),this.chart.data(o),mh({chart:this.chart,options:this.options}),this.chart.render(!0)),this.chart.emit(A.AFTER_CHANGE_DATA,ne.fromData(this.chart,A.AFTER_CHANGE_DATA,null))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return xh},r}(Mt);function Mb(e){var r=e.chart,t=e.options,i=t.data,n=t.sectorStyle,a=t.color;return r.data(i),_t(Ce)(O({},e,{options:{marginRatio:1,interval:{style:n,color:a}}})),e}function Tb(e){var r=e.chart,t=e.options,i=t.label,n=t.xField,a=Se(r,"interval");if(i===!1)a.label(!1);else if((0,c.isObject)(i)){var o=i.callback,s=i.fields,l=(0,d.__rest)(i,["callback","fields"]),u=l.offset,h=l.layout;(u===void 0||u>=0)&&(h=h?(0,c.isArray)(h)?h:[h]:[],l.layout=(0,c.filter)(h,function(f){return f.type!=="limit-in-shape"}),l.layout.length||delete l.layout),a.label({fields:s||[n],callback:o,cfg:ye(l)})}else cr(Ze.WARN,i===null,"the label option must be an Object."),a.label({fields:[n]});return e}function Lb(e){var r=e.chart,t=e.options,i=t.legend,n=t.seriesField;return i===!1?r.legend(!1):n&&r.legend(n,i),e}function Ib(e){var r=e.chart,t=e.options,i=t.radius,n=t.innerRadius,a=t.startAngle,o=t.endAngle;return r.coordinate({type:"polar",cfg:{radius:i,innerRadius:n,startAngle:a,endAngle:o}}),e}function Ob(e){var r,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return _t(oe((r={},r[a]=i,r[o]=n,r)))(e)}function Pb(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return i?r.axis(a,i):r.axis(a,!1),n?r.axis(o,n):r.axis(o,!1),e}function Db(e){_t(Ne("sectorStyle"),Mb,Ob,Tb,Ib,Pb,Lb,he,ee,Kt,Wt,ae(),Tr)(e)}var kb=O({},Mt.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"}]}),wL=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="rose",t}return r.getDefaultOptions=function(){return kb},r.prototype.changeData=function(t){this.updateOption({data:t}),this.chart.changeData(t)},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return Db},r}(Mt),Bb={font:function(){return"serif"},padding:1,size:[500,500],spiral:"archimedean",timeInterval:3e3};function Rb(e,r){return r=(0,c.assign)({},Bb,r),Nb(e,r)}function Nb(e,r){var t=$b();["font","fontSize","fontWeight","padding","rotate","size","spiral","timeInterval","random"].forEach(function(l){(0,c.isNil)(r[l])||t[l](r[l])}),t.words(e),r.imageMask&&t.createMask(r.imageMask);var i=t.start(),n=i._tags;n.forEach(function(l){l.x+=r.size[0]/2,l.y+=r.size[1]/2});var a=r.size,o=a[0],s=a[1];return n.push({text:"",value:0,x:0,y:0,opacity:0}),n.push({text:"",value:0,x:o,y:s,opacity:0}),n}var ps=Math.PI/180,ln=1<<11>>5,wa=1<<11;function zb(e){return e.text}function Vb(){return"serif"}function wh(){return"normal"}function Gb(e){return e.value}function Wb(){return~~(Math.random()*2)*90}function Hb(){return 1}function Yb(e,r,t,i){if(!r.sprite){var n=e.context,a=e.ratio;n.clearRect(0,0,(ln<<5)/a,wa/a);var o=0,s=0,l=0,u=t.length;for(--i;++i<u;){r=t[i],n.save(),n.font=r.style+" "+r.weight+" "+~~((r.size+1)/a)+"px "+r.font;var h=n.measureText(r.text+"m").width*a,f=r.size<<1;if(r.rotate){var v=Math.sin(r.rotate*ps),g=Math.cos(r.rotate*ps),p=h*g,y=h*v,m=f*g,x=f*v;h=Math.max(Math.abs(p+x),Math.abs(p-x))+31>>5<<5,f=~~Math.max(Math.abs(y+m),Math.abs(y-m))}else h=h+31>>5<<5;if(f>l&&(l=f),o+h>=ln<<5&&(o=0,s+=l,l=0),s+f>=wa)break;n.translate((o+(h>>1))/a,(s+(f>>1))/a),r.rotate&&n.rotate(r.rotate*ps),n.fillText(r.text,0,0),r.padding&&(n.lineWidth=2*r.padding,n.strokeText(r.text,0,0)),n.restore(),r.width=h,r.height=f,r.xoff=o,r.yoff=s,r.x1=h>>1,r.y1=f>>1,r.x0=-r.x1,r.y0=-r.y1,r.hasText=!0,o+=h}for(var _=n.getImageData(0,0,(ln<<5)/a,wa/a).data,w=[];--i>=0;)if(r=t[i],!!r.hasText){for(var h=r.width,b=h>>5,f=r.y1-r.y0,S=0;S<f*b;S++)w[S]=0;if(o=r.xoff,o==null)return;s=r.yoff;for(var C=0,M=-1,L=0;L<f;L++){for(var S=0;S<h;S++){var B=b*L+(S>>5),I=_[(s+L)*(ln<<5)+(o+S)<<2]?1<<31-S%32:0;w[B]|=I,C|=I}C?M=L:(r.y0++,f--,L--,s++)}r.y1=r.y0+M,r.sprite=w.slice(0,(r.y1-r.y0)*b)}}}function Xb(e,r,t){t>>=5;for(var i=e.sprite,n=e.width>>5,a=e.x-(n<<4),o=a&127,s=32-o,l=e.y1-e.y0,u=(e.y+e.y0)*t+(a>>5),h,f=0;f<l;f++){h=0;for(var v=0;v<=n;v++)if((h<<s|(v<n?(h=i[f*n+v])>>>o:0))&r[u+v])return!0;u+=t}return!1}function jb(e,r){var t=e[0],i=e[1];r.x+r.x0<t.x&&(t.x=r.x+r.x0),r.y+r.y0<t.y&&(t.y=r.y+r.y0),r.x+r.x1>i.x&&(i.x=r.x+r.x1),r.y+r.y1>i.y&&(i.y=r.y+r.y1)}function Ub(e,r){return e.x+e.x1>r[0].x&&e.x+e.x0<r[1].x&&e.y+e.y1>r[0].y&&e.y+e.y0<r[1].y}function bh(e){var r=e[0]/e[1];return function(t){return[r*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function Zb(e){var r=4,t=r*e[0]/e[1],i=0,n=0;return function(a){var o=a<0?-1:1;switch(Math.sqrt(1+4*o*a)-o&3){case 0:i+=t;break;case 1:n+=r;break;case 2:i-=t;break;default:n-=r;break}return[i,n]}}function Sh(e){for(var r=[],t=-1;++t<e;)r[t]=0;return r}function Kb(){return document.createElement("canvas")}function tr(e){return(0,c.isFunction)(e)?e:function(){return e}}var qb={archimedean:bh,rectangular:Zb};function $b(){var e=[256,256],r=Vb,t=Gb,i=wh,n=Wb,a=Hb,o=bh,s=Math.random,l=[],u=Infinity,h=zb,f=wh,v=Kb,g={};g.start=function(){var m=e[0],x=e[1],_=p(v()),w=g.board?g.board:Sh((e[0]>>5)*e[1]),b=l.length,S=[],C=l.map(function(I,G,q){return I.text=h.call(this,I,G,q),I.font=r.call(this,I,G,q),I.style=f.call(this,I,G,q),I.weight=i.call(this,I,G,q),I.rotate=n.call(this,I,G,q),I.size=~~t.call(this,I,G,q),I.padding=a.call(this,I,G,q),I}).sort(function(I,G){return G.size-I.size}),M=-1,L=g.board?[{x:0,y:0},{x:m,y:x}]:null;B();function B(){for(var I=Date.now();Date.now()-I<u&&++M<b;){var G=C[M];G.x=m*(s()+.5)>>1,G.y=x*(s()+.5)>>1,Yb(_,G,C,M),G.hasText&&y(w,G,L)&&(S.push(G),L?g.hasImage||jb(L,G):L=[{x:G.x+G.x0,y:G.y+G.y0},{x:G.x+G.x1,y:G.y+G.y1}],G.x-=e[0]>>1,G.y-=e[1]>>1)}g._tags=S,g._bounds=L}return g};function p(m){m.width=m.height=1;var x=Math.sqrt(m.getContext("2d").getImageData(0,0,1,1).data.length>>2);m.width=(ln<<5)/x,m.height=wa/x;var _=m.getContext("2d");return _.fillStyle=_.strokeStyle="red",_.textAlign="center",{context:_,ratio:x}}function y(m,x,_){for(var w=x.x,b=x.y,S=Math.sqrt(e[0]*e[0]+e[1]*e[1]),C=o(e),M=s()<.5?1:-1,L,B=-M,I,G;(L=C(B+=M))&&(I=~~L[0],G=~~L[1],!(Math.min(Math.abs(I),Math.abs(G))>=S));)if(x.x=w+I,x.y=b+G,!(x.x+x.x0<0||x.y+x.y0<0||x.x+x.x1>e[0]||x.y+x.y1>e[1])&&(!_||!Xb(x,m,e[0]))&&(!_||Ub(x,_))){for(var q=x.sprite,ft=x.width>>5,mt=e[0]>>5,zt=x.x-(ft<<4),H=zt&127,tt=32-H,ct=x.y1-x.y0,nt=void 0,lt=(x.y+x.y0)*mt+(zt>>5),xt=0;xt<ct;xt++){nt=0;for(var Rt=0;Rt<=ft;Rt++)m[lt+Rt]|=nt<<tt|(Rt<ft?(nt=q[xt*ft+Rt])>>>H:0);lt+=mt}return delete x.sprite,!0}return!1}return g.createMask=function(m){var x=document.createElement("canvas"),_=e[0],w=e[1];if(!(!_||!w)){var b=_>>5,S=Sh((_>>5)*w);x.width=_,x.height=w;var C=x.getContext("2d");C.drawImage(m,0,0,m.width,m.height,0,0,_,w);for(var M=C.getImageData(0,0,_,w).data,L=0;L<w;L++)for(var B=0;B<_;B++){var I=b*L+(B>>5),G=L*_+B<<2,q=M[G]>=250&&M[G+1]>=250&&M[G+2]>=250,ft=q?1<<31-B%32:0;S[I]|=ft}g.board=S,g.hasImage=!0}},g.timeInterval=function(m){u=m==null?Infinity:m},g.words=function(m){l=m},g.size=function(m){e=[+m[0],+m[1]]},g.font=function(m){r=tr(m)},g.fontWeight=function(m){i=tr(m)},g.rotate=function(m){n=tr(m)},g.spiral=function(m){o=qb[m]||m},g.fontSize=function(m){t=tr(m)},g.padding=function(m){a=tr(m)},g.random=function(m){s=tr(m)},g}function Ch(e){var r=e.options,t=e.chart,i=t,n=i.width,a=i.height,o=i.padding,s=i.appendPadding,l=i.ele,u=r.data,h=r.imageMask,f=r.wordField,v=r.weightField,g=r.colorField,p=r.wordStyle,y=r.timeInterval,m=r.random,x=r.spiral,_=r.autoFit,w=_===void 0?!0:_,b=r.placementStrategy;if(!u||!u.length)return[];var S=p.fontFamily,C=p.fontWeight,M=p.padding,L=p.fontSize,B=rS(u,v),I=[aS(B),oS(B)],G=u.map(function(mt){return{text:mt[f],value:mt[v],color:mt[g],datum:mt}}),q={imageMask:h,font:S,fontSize:eS(L,I),fontWeight:C,size:Qb({width:n,height:a,padding:o,appendPadding:s,autoFit:w,container:l}),padding:M,timeInterval:y,random:m,spiral:x,rotate:iS(r)};if((0,c.isFunction)(b)){var ft=G.map(function(mt,zt,H){return(0,d.__assign)((0,d.__assign)((0,d.__assign)({},mt),{hasText:!!mt.text,font:tr(q.font)(mt,zt,H),weight:tr(q.fontWeight)(mt,zt,H),rotate:tr(q.rotate)(mt,zt,H),size:tr(q.fontSize)(mt,zt,H),style:"normal"}),b.call(t,mt,zt,H))});return ft.push({text:"",value:0,x:0,y:0,opacity:0}),ft.push({text:"",value:0,x:q.size[0],y:q.size[1],opacity:0}),ft}return Rb(G,q)}function Qb(e){var r=e.width,t=e.height,i=e.container,n=e.autoFit,a=e.padding,o=e.appendPadding;if(n){var s=ns(i);r=s.width,t=s.height}r=r||400,t=t||400;var l=Jb({padding:a,appendPadding:o}),u=l[0],h=l[1],f=l[2],v=l[3],g=[r-(v+h),t-(u+f)];return g}function Jb(e){var r=Mr(e.padding),t=Mr(e.appendPadding),i=r[0]+t[0],n=r[1]+t[1],a=r[2]+t[2],o=r[3]+t[3];return[i,n,a,o]}function tS(e){return new Promise(function(r,t){if(e instanceof HTMLImageElement){r(e);return}if((0,c.isString)(e)){var i=new Image;i.crossOrigin="anonymous",i.src=e,i.onload=function(){r(i)},i.onerror=function(){cr(Ze.ERROR,!1,"image %s load failed !!!",e),t()};return}cr(Ze.WARN,e===void 0,"The type of imageMask option must be String or HTMLImageElement."),t()})}function eS(e,r){if((0,c.isFunction)(e))return e;if((0,c.isArray)(e)){var t=e[0],i=e[1];if(!r)return function(){return(i+t)/2};var n=r[0],a=r[1];return a===n?function(){return(i+t)/2}:function(s){var l=s.value;return(i-t)/(a-n)*(l-n)+t}}return function(){return e}}function rS(e,r){return e.map(function(t){return t[r]}).filter(function(t){return typeof t=="number"&&!isNaN(t)})}function iS(e){var r=nS(e),t=r.rotation,i=r.rotationSteps;if(!(0,c.isArray)(t))return t;var n=t[0],a=t[1],o=i===1?0:(a-n)/(i-1);return function(){return a===n?a:Math.floor(Math.random()*i)*o}}function nS(e){var r=e.wordStyle.rotationSteps;return r<1&&(cr(Ze.WARN,!1,"The rotationSteps option must be greater than or equal to 1."),r=1),{rotation:e.wordStyle.rotation,rotationSteps:r}}function aS(e){return Math.min.apply(Math,e)}function oS(e){return Math.max.apply(Math,e)}var ys="color",sS=O({},Mt.getDefaultOptions(),{timeInterval:2e3,legend:!1,tooltip:{showTitle:!1,showMarkers:!1,showCrosshairs:!1,fields:["text","value",ys],formatter:function(e){return{name:e.text,value:e.value}}},wordStyle:{fontFamily:"Verdana",fontWeight:"normal",padding:1,fontSize:[12,60],rotation:[0,90],rotationSteps:2,rotateRatio:.5}});function lS(e){var r=e.chart,t=e.options,i=t.colorField,n=t.color,a=Ch(e);r.data(a);var o=O({},e,{options:{xField:"x",yField:"y",seriesField:i&&ys,rawFields:(0,c.isFunction)(n)&&(0,d.__spreadArrays)((0,c.get)(t,"rawFields",[]),["datum"]),point:{color:n,shape:"word-cloud"}}}),s=ze(o).ext;return s.geometry.label(!1),r.coordinate().reflect("y"),r.axis(!1),e}function uS(e){return _t(oe({x:{nice:!1},y:{nice:!1}}))(e)}function cS(e){var r=e.chart,t=e.options,i=t.legend,n=t.colorField;return i===!1?r.legend(!1):n&&r.legend(ys,i),e}function hS(e){_t(lS,uS,he,cS,ee,Kt,Wt,Tr)(e)}jt("point","word-cloud",{draw:function(e,r){var t=e.x,i=e.y,n=r.addShape("text",{attrs:(0,d.__assign)((0,d.__assign)({},fS(e)),{x:t,y:i})}),a=e.data.rotate;return typeof a=="number"&&Le.rotate(n,a*Math.PI/180),n}});function fS(e){return{fontSize:e.data.size,text:e.data.text,textAlign:"center",fontFamily:e.data.font,fontWeight:e.data.weight,fill:e.color||e.defaultStyle.stroke,textBaseline:"alphabetic"}}var bL=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="word-cloud",t}return r.getDefaultOptions=function(){return sS},r.prototype.changeData=function(t){this.updateOption({data:t}),this.options.imageMask?this.render():this.chart.changeData(Ch({chart:this.chart,options:this.options}))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.render=function(){var t=this;return new Promise(function(i){var n=t.options.imageMask;if(!n){e.prototype.render.call(t),i();return}var a=function(o){t.options=(0,d.__assign)((0,d.__assign)({},t.options),{imageMask:o||null}),e.prototype.render.call(t),i()};tS(n).then(a).catch(a)})},r.prototype.getSchemaAdaptor=function(){return hS},r.prototype.triggerResize=function(){var t=this;this.chart.destroyed||(this.execAdaptor(),window.setTimeout(function(){e.prototype.triggerResize.call(t)}))},r}(Mt),Zr=F(56645),vS={exp:Zr.regressionExp,linear:Zr.regressionLinear,loess:Zr.regressionLoess,log:Zr.regressionLog,poly:Zr.regressionPoly,pow:Zr.regressionPow,quad:Zr.regressionQuad};function dS(e,r){var t=10,i={regionStyle:[{position:{start:[e,"max"],end:["max",r]},style:{fill:"#d8d0c0",opacity:.4}},{position:{start:["min","max"],end:[e,r]},style:{fill:"#a3dda1",opacity:.4}},{position:{start:["min",r],end:[e,"min"]},style:{fill:"#d8d0c0",opacity:.4}},{position:{start:[e,r],end:["max","min"]},style:{fill:"#a3dda1",opacity:.4}}],lineStyle:{stroke:"#9ba29a",lineWidth:1},labelStyle:[{position:["max",r],offsetX:-t,offsetY:-t,style:{textAlign:"right",textBaseline:"bottom",fontSize:14,fill:"#ccc"}},{position:["min",r],offsetX:t,offsetY:-t,style:{textAlign:"left",textBaseline:"bottom",fontSize:14,fill:"#ccc"}},{position:["min",r],offsetX:t,offsetY:t,style:{textAlign:"left",textBaseline:"top",fontSize:14,fill:"#ccc"}},{position:["max",r],offsetX:-t,offsetY:t,style:{textAlign:"right",textBaseline:"top",fontSize:14,fill:"#ccc"}}]};return i}var gS=function(e,r){var t=r.view,i=r.options,n=i.xField,a=i.yField,o=t.getScaleByField(n),s=t.getScaleByField(a),l=e.map(function(u){return t.getCoordinate().convert({x:o.scale(u[0]),y:s.scale(u[1])})});return fw(l,!1)},pS=function(e){var r=e.options,t=r.xField,i=r.yField,n=r.data,a=r.regressionLine,o=a.type,s=o===void 0?"linear":o,l=a.algorithm,u;if(l)u=(0,c.isArray)(l)?l:l(n);else{var h=vS[s]().x(function(f){return f[t]}).y(function(f){return f[i]});u=h(n)}return gS(u,e)},yS=function(e){var r,t=e.meta,i=t===void 0?{}:t,n=e.xField,a=e.yField,o=e.data,s=o[0][n],l=o[0][a],u=s>0,h=l>0;function f(v,g){var p=(0,c.get)(i,[v]);function y(x){return(0,c.get)(p,x)}var m={};return g==="x"?((0,c.isNumber)(s)&&((0,c.isNumber)(y("min"))||(m.min=u?0:s*2),(0,c.isNumber)(y("max"))||(m.max=u?s*2:0)),m):((0,c.isNumber)(l)&&((0,c.isNumber)(y("min"))||(m.min=h?0:l*2),(0,c.isNumber)(y("max"))||(m.max=h?l*2:0)),m)}return(0,d.__assign)((0,d.__assign)({},i),(r={},r[n]=(0,d.__assign)((0,d.__assign)({},i[n]),f(n,"x")),r[a]=(0,d.__assign)((0,d.__assign)({},i[a]),f(a,"y")),r))};function Ah(e){var r=e.data,t=r===void 0?[]:r,i=e.xField,n=e.yField;if(t.length){for(var a=!0,o=!0,s=t[0],l=void 0,u=1;u<t.length&&(l=t[u],s[i]!==l[i]&&(a=!1),s[n]!==l[n]&&(o=!1),!(!a&&!o));u++)s=l;var h=[];a&&h.push(i),o&&h.push(n);var f=Zt(yS(e),h);return O({},e,{meta:f})}return e}function mS(e){var r=e.chart,t=e.options,i=t.data,n=t.type,a=t.color,o=t.shape,s=t.pointStyle,l=t.shapeField,u=t.colorField,h=t.xField,f=t.yField,v=t.sizeField,g=t.size,p=t.tooltip;v&&(g||(g=[2,8]),(0,c.isNumber)(g)&&(g=[g,g])),p&&!p.fields&&(p=(0,d.__assign)((0,d.__assign)({},p),{fields:[h,f,u,v,l]})),r.data(i),ze(O({},e,{options:{seriesField:u,point:{color:a,shape:o,size:g,style:s},tooltip:p}}));var y=Se(r,"point");return n&&y.adjust(n),e}function ba(e){var r,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField,s=Ah(t);return _t(oe((r={},r[a]=i,r[o]=n,r)))(O({},e,{options:s}))}function xS(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return r.axis(a,i),r.axis(o,n),e}function _S(e){var r=e.chart,t=e.options,i=t.legend,n=t.colorField,a=t.shapeField,o=t.sizeField,s=t.shapeLegend,l=t.sizeLegend,u=i!==!1;return n&&r.legend(n,u?i:!1),a&&(s?r.legend(a,s):r.legend(a,s===!1?!1:i)),o&&r.legend(o,l||!1),!u&&!s&&!l&&r.legend(!1),e}function wS(e){var r=e.chart,t=e.options,i=t.label,n=t.yField,a=Se(r,"point");if(!i)a.label(!1);else{var o=i.callback,s=(0,d.__rest)(i,["callback"]);a.label({fields:[n],callback:o,cfg:ye(s)})}return e}function bS(e){var r=e.options,t=r.quadrant,i=[];if(t){var n=t.xBaseline,a=n===void 0?0:n,o=t.yBaseline,s=o===void 0?0:o,l=t.labels,u=t.regionStyle,h=t.lineStyle,f=dS(a,s),v=new Array(4).join(",").split(",");v.forEach(function(g,p){i.push((0,d.__assign)((0,d.__assign)({type:"region",top:!1},f.regionStyle[p].position),{style:O({},f.regionStyle[p].style,u==null?void 0:u[p])}),(0,d.__assign)({type:"text",top:!0},O({},f.labelStyle[p],l==null?void 0:l[p])))}),i.push({type:"line",top:!1,start:["min",s],end:["max",s],style:O({},f.lineStyle,h)},{type:"line",top:!1,start:[a,"min"],end:[a,"max"],style:O({},f.lineStyle,h)})}return _t(ae(i))(e)}function SS(e){var r=e.options,t=e.chart,i=r.regressionLine;if(i){var n=i.style,a=i.top,o=a===void 0?!1:a,s={stroke:"#9ba29a",lineWidth:2,opacity:.5};t.annotation().shape({top:o,render:function(l,u){var h=l.addGroup({id:t.id+"-regression-line",name:"regression-line-group"}),f=pS({view:u,options:r});h.addShape("path",{name:"regression-line",attrs:(0,d.__assign)((0,d.__assign)({path:f},s),n)})}})}return e}function CS(e){var r=e.chart,t=e.options,i=t.tooltip;return i?r.tooltip(i):i===!1&&r.tooltip(!1),e}function Fh(e){return _t(mS,ba,xS,_S,CS,wS,fh,on,hs,ee,bS,Kt,Wt,SS)(e)}var AS=O({},Mt.getDefaultOptions(),{size:4,tooltip:{showTitle:!1,showMarkers:!1,showCrosshairs:!0,crosshairs:{type:"xy"}}});Et("drag-move",{start:[{trigger:"plot:mousedown",action:"scale-translate:start"}],processing:[{trigger:"plot:mousemove",action:"scale-translate:translate",throttle:{wait:100,leading:!0,trailing:!1}}],end:[{trigger:"plot:mouseup",action:"scale-translate:end"}]});var FS=function(e){(0,d.__extends)(r,e);function r(t,i){var n=e.call(this,t,i)||this;return n.type="scatter",n.on(A.BEFORE_RENDER,function(a){var o,s,l=n,u=l.options,h=l.chart;if(((o=a.data)===null||o===void 0?void 0:o.source)===Ie.FILTER){var f=n.chart.filterData(n.chart.getData());ba({chart:h,options:(0,d.__assign)((0,d.__assign)({},u),{data:f})})}((s=a.data)===null||s===void 0?void 0:s.source)===Ie.RESET&&ba({chart:h,options:u})}),n}return r.getDefaultOptions=function(){return AS},r.prototype.changeData=function(t){this.updateOption(Ah(O({},this.options,{data:t})));var i=this,n=i.options,a=i.chart;ba({chart:a,options:n}),this.chart.changeData(t)},r.prototype.getSchemaAdaptor=function(){return Fh},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r}(Mt);function ES(e){var r=e.chart,t=e.options,i=t.data,n=t.lineStyle,a=t.color,o=t.point,s=t.area;r.data(i);var l=O({},e,{options:{line:{style:n,color:a},point:o&&(0,d.__assign)({color:a},o),area:s&&(0,d.__assign)({color:a},s),label:void 0}}),u=O({},l,{options:{tooltip:!1}}),h=(o==null?void 0:o.state)||t.state,f=O({},l,{options:{tooltip:!1,state:h}});return yi(l),ze(f),ga(u),e}function MS(e){var r,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return _t(oe((r={},r[a]=i,r[o]=n,r)))(e)}function TS(e){var r=e.chart,t=e.options,i=t.radius,n=t.startAngle,a=t.endAngle;return r.coordinate("polar",{radius:i,startAngle:n,endAngle:a}),e}function LS(e){var r=e.chart,t=e.options,i=t.xField,n=t.xAxis,a=t.yField,o=t.yAxis;return r.axis(i,n),r.axis(a,o),e}function IS(e){var r=e.chart,t=e.options,i=t.label,n=t.yField,a=Se(r,"line");if(!i)a.label(!1);else{var o=i.callback,s=(0,d.__rest)(i,["callback"]);a.label({fields:[n],callback:o,cfg:ye(s)})}return e}function OS(e){return _t(ES,MS,Wt,TS,LS,Yr,he,IS,ee,Kt,ae())(e)}var PS=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return Object.defineProperty(r.prototype,"name",{get:function(){return"radar-tooltip"},enumerable:!1,configurable:!0}),r.prototype.getTooltipItems=function(t){var i=this.getTooltipCfg(),n=i.shared,a=i.title,o=e.prototype.getTooltipItems.call(this,t);if(o.length>0){var s=this.view.geometries[0],l=s.dataArray,u=o[0].name,h=[];return l.forEach(function(f){f.forEach(function(v){var g=Le.getTooltipItems(v,s),p=g[0];if(!n&&p&&p.name===u){var y=(0,c.isNil)(a)?u:a;h.push((0,d.__assign)((0,d.__assign)({},p),{name:p.title,title:y}))}else if(n&&p){var y=(0,c.isNil)(a)?p.name||u:a;h.push((0,d.__assign)((0,d.__assign)({},p),{name:p.title,title:y}))}})}),h}return[]},r}(yu);Nr("radar-tooltip",PS);var DS=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.init=function(){var t=this.context.view;t.removeInteraction("tooltip")},r.prototype.show=function(){var t=this.context.event,i=this.getTooltipController();i.showTooltip({x:t.x,y:t.y})},r.prototype.hide=function(){var t=this.getTooltipController();t.hideTooltip()},r.prototype.getTooltipController=function(){var t=this.context.view;return t.getController("radar-tooltip")},r}(ie);yt("radar-tooltip",DS),Et("radar-tooltip",{start:[{trigger:"plot:mousemove",action:"radar-tooltip:show"}],end:[{trigger:"plot:mouseleave",action:"radar-tooltip:hide"}]});var SL=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="radar",t}return r.prototype.changeData=function(t){this.updateOption({data:t}),this.chart.changeData(t)},r.prototype.getDefaultOptions=function(){return O({},e.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}}})},r.prototype.getSchemaAdaptor=function(){return OS},r}(Mt),mi;(function(e){e.Left="Left",e.Right="Right"})(mi||(mi={}));var Kr;(function(e){e.Line="line",e.Column="column"})(Kr||(Kr={}));var Ve="left-axes-view",Ge="right-axes-view",Eh={nice:!0,label:{autoHide:!0,autoRotate:!1}},kS=(0,d.__assign)((0,d.__assign)({},Eh),{position:"left"}),BS=(0,d.__assign)((0,d.__assign)({},Eh),{position:"right",grid:null});function ms(e){return(0,c.get)(e,"geometry")===Kr.Line}function xs(e){return(0,c.get)(e,"geometry")===Kr.Column}function Mh(e,r,t){return xs(t)?O({},{geometry:Kr.Column,label:t.label&&t.isRange?{content:function(i){var n;return(n=i[r])===null||n===void 0?void 0:n.join("-")}}:void 0},t):(0,d.__assign)({geometry:Kr.Line},t)}function Th(e,r){var t=e[0],i=e[1];if((0,c.isArray)(r)){var n=r[0],a=r[1];return[n,a]}var o=(0,c.get)(r,t),s=(0,c.get)(r,i);return[o,s]}function Lh(e,r){return r===mi.Left?e===!1?!1:O({},kS,e):r===mi.Right?e===!1?!1:O({},BS,e):e}function Ih(e){var r=e.view,t=e.geometryOption,i=e.yField,n=e.legend,a=(0,c.get)(n,"marker"),o=Se(r,ms(t)?"line":"interval");if(!t.seriesField){var s=(0,c.get)(r,"options.scales."+i+".alias")||i,l=o.getAttribute("color"),u=r.getTheme().defaultColor;l&&(u=Le.getMappingValue(l,s,(0,c.get)(l,["values",0],u)));var h=((0,c.isFunction)(a)?a:!(0,c.isEmpty)(a)&&O({},{style:{stroke:u,fill:u}},a))||(ms(t)?{symbol:function(v,g,p){return[["M",v-p,g],["L",v+p,g]]},style:{lineWidth:2,r:6,stroke:u}}:{symbol:"square",style:{fill:u}});return[{value:i,name:s,marker:h,isGeometry:!0,viewId:r.id}]}var f=o.getGroupAttributes();return(0,c.reduce)(f,function(v,g){var p=Le.getLegendItems(r,o,g,r.getTheme(),a);return v.concat(p)},[])}function RS(e){var r=e.options,t=e.chart,i=r.geometryOption,n=i.isStack,a=i.color,o=i.seriesField,s=i.groupField,l=i.isGroup,u=["xField","yField"];if(ms(i)){yi(O({},e,{options:(0,d.__assign)((0,d.__assign)((0,d.__assign)({},Zt(r,u)),i),{line:{color:i.color,style:i.lineStyle}})})),ze(O({},e,{options:(0,d.__assign)((0,d.__assign)((0,d.__assign)({},Zt(r,u)),i),{point:i.point&&(0,d.__assign)({color:a,shape:"circle"},i.point)})}));var h=[];l&&h.push({type:"dodge",dodgeBy:s||o,customOffset:0}),n&&h.push({type:"stack"}),h.length&&(0,c.each)(t.geometries,function(f){f.adjust(h)})}return xs(i)&&xa(O({},e,{options:(0,d.__assign)((0,d.__assign)((0,d.__assign)({},Zt(r,u)),i),{widthRatio:i.columnWidthRatio,interval:(0,d.__assign)((0,d.__assign)({},Zt(i,["color"])),{style:i.columnStyle})})})),e}var Oh=function(e,r){var t=r[0],i=r[1],n=e.getOptions().data,a=e.getXScale(),o=(0,c.size)(n);if(!(!a||!o)){var s=!0,l=(0,c.valuesOfKey)(n,a.field),u=s?l:l.reverse(),h=(0,c.size)(u),f=Math.floor(t*(h-1)),v=Math.floor(i*(h-1));e.filter(a.field,function(g){var p=u.indexOf(g);return p>-1?xw(p,f,v):!0}),e.getRootView().render(!0)}};function NS(e){var r,t=e.options,i=t.geometryOptions,n=i===void 0?[]:i,a=t.xField,o=t.yField,s=(0,c.every)(n,function(l){var u=l.geometry;return u===Kr.Line||u===void 0});return O({},{options:{geometryOptions:[],meta:(r={},r[a]={type:"cat",sync:!0,range:s?[0,1]:void 0},r),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"}}},e,{options:{yAxis:Th(o,t.yAxis),geometryOptions:[Mh(a,o[0],n[0]),Mh(a,o[1],n[1])],annotations:Th(o,t.annotations)}})}function zS(e){var r,t,i=e.chart,n=e.options,a=n.geometryOptions,o={line:0,column:1},s=[{type:(r=a[0])===null||r===void 0?void 0:r.geometry,id:Ve},{type:(t=a[1])===null||t===void 0?void 0:t.geometry,id:Ge}];return s.sort(function(l,u){return-o[l.type]+o[u.type]}).forEach(function(l){return i.createView({id:l.id})}),e}function VS(e){var r=e.chart,t=e.options,i=t.xField,n=t.yField,a=t.geometryOptions,o=t.data,s=t.tooltip,l=[(0,d.__assign)((0,d.__assign)({},a[0]),{id:Ve,data:o[0],yField:n[0]}),(0,d.__assign)((0,d.__assign)({},a[1]),{id:Ge,data:o[1],yField:n[1]})];return l.forEach(function(u){var h=u.id,f=u.data,v=u.yField,g=xs(u)&&u.isPercent,p=g?sh(f,v,i,v):f,y=Ot(r,h).data(p),m=g?(0,d.__assign)({formatter:function(x){return{name:x[u.seriesField]||v,value:(Number(x[v])*100).toFixed(2)+"%"}}},s):s;RS({chart:y,options:{xField:i,yField:v,tooltip:m,geometryOption:u}})}),e}function GS(e){var r,t=e.chart,i=e.options,n=i.geometryOptions,a=((r=t.getTheme())===null||r===void 0?void 0:r.colors10)||[],o=0;return t.once("beforepaint",function(){(0,c.each)(n,function(s,l){var u=Ot(t,l===0?Ve:Ge);if(!s.color){var h=u.getGroupScales(),f=(0,c.get)(h,[0,"values","length"],1),v=a.slice(o,o+f).concat(l===0?[]:a);u.geometries.forEach(function(g){s.seriesField?g.color(s.seriesField,v):g.color(v[0])}),o+=f}}),t.render(!0)}),e}function WS(e){var r,t,i=e.chart,n=e.options,a=n.xAxis,o=n.yAxis,s=n.xField,l=n.yField;return oe((r={},r[s]=a,r[l[0]]=o[0],r))(O({},e,{chart:Ot(i,Ve)})),oe((t={},t[s]=a,t[l[1]]=o[1],t))(O({},e,{chart:Ot(i,Ge)})),e}function HS(e){var r=e.chart,t=e.options,i=Ot(r,Ve),n=Ot(r,Ge),a=t.xField,o=t.yField,s=t.xAxis,l=t.yAxis;return r.axis(a,!1),r.axis(o[0],!1),r.axis(o[1],!1),i.axis(a,s),i.axis(o[0],Lh(l[0],mi.Left)),n.axis(a,!1),n.axis(o[1],Lh(l[1],mi.Right)),e}function YS(e){var r=e.chart,t=e.options,i=t.tooltip,n=Ot(r,Ve),a=Ot(r,Ge);return r.tooltip(i),n.tooltip({shared:!0}),a.tooltip({shared:!0}),e}function XS(e){var r=e.chart;return ee(O({},e,{chart:Ot(r,Ve)})),ee(O({},e,{chart:Ot(r,Ge)})),e}function jS(e){var r=e.chart,t=e.options,i=t.annotations,n=(0,c.get)(i,[0]),a=(0,c.get)(i,[1]);return ae(n)(O({},e,{chart:Ot(r,Ve),options:{annotations:n}})),ae(a)(O({},e,{chart:Ot(r,Ge),options:{annotations:a}})),e}function US(e){var r=e.chart;return Wt(O({},e,{chart:Ot(r,Ve)})),Wt(O({},e,{chart:Ot(r,Ge)})),Wt(e),e}function ZS(e){var r=e.chart;return Kt(O({},e,{chart:Ot(r,Ve)})),Kt(O({},e,{chart:Ot(r,Ge)})),e}function KS(e){var r=e.chart,t=e.options,i=t.yAxis;return Xr(O({},e,{chart:Ot(r,Ve),options:{yAxis:i[0]}})),Xr(O({},e,{chart:Ot(r,Ge),options:{yAxis:i[1]}})),e}function qS(e){var r=e.chart,t=e.options,i=t.legend,n=t.geometryOptions,a=t.yField,o=t.data,s=Ot(r,Ve),l=Ot(r,Ge);if(i===!1)r.legend(!1);else if((0,c.isObject)(i)&&i.custom===!0)r.legend(i);else{var u=(0,c.get)(n,[0,"legend"],i),h=(0,c.get)(n,[1,"legend"],i);r.once("beforepaint",function(){var f=o[0].length?Ih({view:s,geometryOption:n[0],yField:a[0],legend:u}):[],v=o[1].length?Ih({view:l,geometryOption:n[1],yField:a[1],legend:h}):[];r.legend(O({},i,{custom:!0,items:f.concat(v)}))}),n[0].seriesField&&s.legend(n[0].seriesField,u),n[1].seriesField&&l.legend(n[1].seriesField,h),r.on("legend-item:click",function(f){var v=(0,c.get)(f,"gEvent.delegateObject",{});if(v&&v.item){var g=v.item,p=g.value,y=g.isGeometry,m=g.viewId;if(y){var x=(0,c.findIndex)(a,function(b){return b===p});if(x>-1){var _=(0,c.get)(Ot(r,m),"geometries");(0,c.each)(_,function(b){b.changeVisible(!v.item.unchecked)})}}else{var w=(0,c.get)(r.getController("legend"),"option.items",[]);(0,c.each)(r.views,function(b){var S=b.getGroupScales();(0,c.each)(S,function(C){C.values&&C.values.indexOf(p)>-1&&b.filter(C.field,function(M){var L=(0,c.find)(w,function(B){return B.value===M});return!L.unchecked})}),r.render(!0)})}}})}return e}function $S(e){var r=e.chart,t=e.options,i=t.slider,n=Ot(r,Ve),a=Ot(r,Ge);return i&&(n.option("slider",i),n.on("slider:valuechanged",function(o){var s=o.event,l=s.value,u=s.originValue;(0,c.isEqual)(l,u)||Oh(a,l)}),r.once("afterpaint",function(){if(!(0,c.isBoolean)(i)){var o=i.start,s=i.end;(o||s)&&Oh(a,[o,s])}})),e}function QS(e){return _t(NS,zS,US,VS,WS,HS,KS,YS,XS,jS,ZS,GS,qS,$S)(e)}var CL=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="dual-axes",t}return r.prototype.getDefaultOptions=function(){return O({},e.prototype.getDefaultOptions.call(this),{yAxis:[],syncViewPadding:!0})},r.prototype.getSchemaAdaptor=function(){return QS},r}(Mt),un="x",xi="y",Ph={showTitle:!1,shared:!0,showMarkers:!1,customContent:function(e,r){return""+(0,c.get)(r,[0,"data","y"],0)},containerTpl:'<div class="g2-tooltip"><div class="g2-tooltip-list"></div></div>',itemTpl:"<span>{value}</span>",domStyles:{"g2-tooltip":{padding:"2px 4px",fontSize:"10px"}},showCrosshairs:!0,crosshairs:{type:"x"}},JS={appendPadding:2,tooltip:(0,d.__assign)({},Ph),animation:{}};function qr(e){return(0,c.map)(e||[],function(r,t){return{x:""+t,y:r}})}function tC(e){var r=e.chart,t=e.options,i=t.data,n=t.color,a=t.areaStyle,o=t.point,s=t.line,l=o==null?void 0:o.state,u=qr(i);r.data(u);var h=O({},e,{options:{xField:un,yField:xi,area:{color:n,style:a},line:s,point:o}}),f=O({},h,{options:{tooltip:!1}}),v=O({},h,{options:{tooltip:!1,state:l}});return ga(h),yi(f),ze(v),r.axis(!1),r.legend(!1),e}function _i(e){var r,t,i=e.options,n=i.xAxis,a=i.yAxis,o=i.data,s=qr(o);return _t(oe((r={},r[un]=n,r[xi]=a,r),(t={},t[un]={type:"cat"},t[xi]=os(s,xi),t)))(e)}function Dh(e){return _t(Ne("areaStyle"),tC,_i,he,Wt,Kt,ae())(e)}function eC(e){var r=e.chart,t=e.options,i=t.data,n=t.color,a=t.lineStyle,o=t.point,s=o==null?void 0:o.state,l=qr(i);r.data(l);var u=O({},e,{options:{xField:un,yField:xi,line:{color:n,style:a},point:o}}),h=O({},u,{options:{tooltip:!1,state:s}});return yi(u),ze(h),r.axis(!1),r.legend(!1),e}function kh(e){return _t(eC,_i,Wt,he,Kt,ae())(e)}var rC=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="tiny-line",t}return r.getDefaultOptions=function(){return JS},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this,n=i.chart,a=i.options;_i({chart:n,options:a}),n.changeData(qr(t))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return kh},r}(Mt);function iC(e){var r=e.chart,t=e.options,i=t.data,n=t.color,a=t.columnStyle,o=t.columnWidthRatio,s=qr(i);r.data(s);var l=O({},e,{options:{xField:un,yField:xi,widthRatio:o,interval:{style:a,color:n}}});return Ce(l),r.axis(!1),r.legend(!1),r.interaction("element-active"),e}function Bh(e){return _t(Wt,Ne("columnStyle"),iC,_i,he,Kt,ae())(e)}var nC={showTitle:!1,shared:!0,showMarkers:!1,customContent:function(e,r){return""+(0,c.get)(r,[0,"data","y"],0)},containerTpl:'<div class="g2-tooltip"><div class="g2-tooltip-list"></div></div>',itemTpl:"<span>{value}</span>",domStyles:{"g2-tooltip":{padding:"2px 4px",fontSize:"10px"}}},aC={appendPadding:2,tooltip:(0,d.__assign)({},nC),animation:{}},oC=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="tiny-column",t}return r.getDefaultOptions=function(){return aC},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this,n=i.chart,a=i.options;_i({chart:n,options:a}),n.changeData(qr(t))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return Bh},r}(Mt),sC={appendPadding:2,tooltip:(0,d.__assign)({},Ph),color:"l(90) 0:#E5EDFE 1:#ffffff",areaStyle:{fillOpacity:.6},line:{size:1,color:"#5B8FF9"},animation:{}},lC=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="tiny-area",t}return r.getDefaultOptions=function(){return sC},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this,n=i.chart,a=i.options;_i({chart:n,options:a}),n.changeData(qr(t))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return Dh},r}(Mt);function Rh(e,r,t){if(t===1)return[0,r];var i=Math.floor(e/r);return[r*i,r*(i+1)]}function uC(e){return Math.ceil(Math.log(e.length)/Math.LN2)+1}function Nh(e,r,t,i,n){var a=(0,c.clone)(e);(0,c.sortBy)(a,r);var o=(0,c.valuesOfKey)(a,r),s=(0,c.getRange)(o),l=s.max-s.min,u=t;if(!t&&i&&(u=i>1?l/(i-1):s.max),!t&&!i){var h=uC(o);u=l/h}var f={},v=(0,c.groupBy)(a,n);(0,c.isEmpty)(v)?(0,c.each)(a,function(p){var y=p[r],m=Rh(y,u,i),x=m[0]+"-"+m[1];(0,c.hasKey)(f,x)||(f[x]={range:m,count:0}),f[x].count+=1}):Object.keys(v).forEach(function(p){(0,c.each)(v[p],function(y){var m=y[r],x=Rh(m,u,i),_=x[0]+"-"+x[1],w=_+"-"+p;(0,c.hasKey)(f,w)||(f[w]={range:x,count:0},f[w][n]=p),f[w].count+=1})});var g=[];return(0,c.each)(f,function(p){g.push(p)}),g}var Sa="range",cn="count",cC=O({},Mt.getDefaultOptions(),{columnStyle:{stroke:"#FFFFFF"},tooltip:{shared:!0,showMarkers:!1},interactions:[{type:"active-region"}]});function hC(e){var r=e.chart,t=e.options,i=t.data,n=t.binField,a=t.binNumber,o=t.binWidth,s=t.color,l=t.stackField,u=t.legend,h=t.columnStyle,f=Nh(i,n,o,a,l);r.data(f);var v=O({},e,{options:{xField:Sa,yField:cn,seriesField:l,isStack:!0,interval:{color:s,style:h}}});return Ce(v),u&&l&&r.legend(l,u),e}function fC(e){var r,t=e.options,i=t.xAxis,n=t.yAxis;return _t(oe((r={},r[Sa]=i,r[cn]=n,r)))(e)}function vC(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis;return i===!1?r.axis(Sa,!1):r.axis(Sa,i),n===!1?r.axis(cn,!1):r.axis(cn,n),e}function dC(e){var r=e.chart,t=e.options,i=t.label,n=Se(r,"interval");if(!i)n.label(!1);else{var a=i.callback,o=(0,d.__rest)(i,["callback"]);n.label({fields:[cn],callback:a,cfg:ye(o)})}return e}function zh(e){return _t(Wt,Ne("columnStyle"),hC,fC,vC,Tr,dC,he,ee,Kt)(e)}var gC=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="histogram",t}return r.getDefaultOptions=function(){return cC},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this.options,n=i.binField,a=i.binNumber,o=i.binWidth,s=i.stackField;this.chart.changeData(Nh(t,n,o,a,s))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return zh},r}(Mt),Vh=["#FAAD14","#E8EDF3"],pC={percent:.2,color:Vh,animation:{}};function _s(e){var r=(0,c.clamp)(Hr(e)?e:0,0,1);return[{type:"current",percent:r},{type:"target",percent:1-r}]}function Gh(e){var r=e.chart,t=e.options,i=t.percent,n=t.progressStyle,a=t.color,o=t.barWidthRatio;r.data(_s(i));var s=O({},e,{options:{xField:"1",yField:"percent",seriesField:"type",isStack:!0,widthRatio:o,interval:{style:n,color:(0,c.isString)(a)?[a,Vh[1]]:a},args:{zIndexReversed:!0,sortZIndex:!0}}});return Ce(s),r.tooltip(!1),r.axis(!1),r.legend(!1),e}function yC(e){var r=e.chart;return r.coordinate("rect").transpose(),e}function Wh(e){return _t(Gh,oe({}),yC,Kt,Wt,ae())(e)}var mC=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="process",t}return r.getDefaultOptions=function(){return pC},r.prototype.changeData=function(t){this.updateOption({percent:t}),this.chart.changeData(_s(t))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return Wh},r}(Mt);function xC(e){var r=e.chart,t=e.options,i=t.innerRadius,n=t.radius;return r.coordinate("theta",{innerRadius:i,radius:n}),e}function Hh(e,r){var t=e.chart,i=e.options,n=i.innerRadius,a=i.statistic,o=i.percent,s=i.meta;if(t.getController("annotation").clear(!0),n&&a){var l=(0,c.get)(s,["percent","formatter"])||function(h){return(h*100).toFixed(2)+"%"},u=a.content;u&&(u=O({},u,{content:(0,c.isNil)(u.content)?l(o):u.content})),ua(t,{statistic:(0,d.__assign)((0,d.__assign)({},a),{content:u}),plotType:"ring-progress"},{percent:o})}return r&&t.render(!0),e}function Yh(e){return _t(Gh,oe({}),xC,Hh,Kt,Wt,ae())(e)}var _C={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:{}},wC=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="ring-process",t}return r.getDefaultOptions=function(){return _C},r.prototype.changeData=function(t){this.chart.emit(A.BEFORE_CHANGE_DATA,ne.fromData(this.chart,A.BEFORE_CHANGE_DATA,null)),this.updateOption({percent:t}),this.chart.data(_s(t)),Hh({chart:this.chart,options:this.options},!0),this.chart.emit(A.AFTER_CHANGE_DATA,ne.fromData(this.chart,A.AFTER_CHANGE_DATA,null))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return Yh},r}(Mt);function bC(e){var r=e.chart,t=e.options,i=t.data,n=t.type,a=t.xField,o=t.yField,s=t.colorField,l=t.sizeField,u=t.sizeRatio,h=t.shape,f=t.color,v=t.tooltip,g=t.heatmapStyle;r.data(i);var p="polygon";n==="density"&&(p="heatmap");var y=He(v,[a,o,s]),m=y.fields,x=y.formatter,_=1;return(u||u===0)&&(!h&&!l?console.warn("sizeRatio is not in effect: Must define shape or sizeField first"):u<0||u>1?console.warn("sizeRatio is not in effect: It must be a number in [0,1]"):_=u),Pe(O({},e,{options:{type:p,colorField:s,tooltipFields:m,shapeField:l||"",label:void 0,mapping:{tooltip:x,shape:h&&(l?function(w){var b=i.map(function(M){return M[l]}),S=Math.min.apply(Math,b),C=Math.max.apply(Math,b);return[h,((0,c.get)(w,l)-S)/(C-S),_]}:function(){return[h,1,_]}),color:f||s&&r.getTheme().sequenceColors.join("-"),style:g}}})),e}function SC(e){var r,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return _t(oe((r={},r[a]=i,r[o]=n,r)))(e)}function CC(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return i===!1?r.axis(a,!1):r.axis(a,i),n===!1?r.axis(o,!1):r.axis(o,n),e}function AC(e){var r=e.chart,t=e.options,i=t.legend,n=t.colorField,a=t.sizeField,o=t.sizeLegend,s=i!==!1;return n&&r.legend(n,s?i:!1),a&&r.legend(a,o===void 0?i:o),!s&&!o&&r.legend(!1),e}function FC(e){var r=e.chart,t=e.options,i=t.label,n=t.colorField,a=t.type,o=Se(r,a==="density"?"heatmap":"polygon");if(!i)o.label(!1);else if(n){var s=i.callback,l=(0,d.__rest)(i,["callback"]);o.label({fields:[n],callback:s,cfg:ye(l)})}return e}function EC(e){var r=e.chart,t=e.options,i=t.coordinate,n=t.reflect;return i&&r.coordinate({type:i.type||"rect",cfg:i.cfg}),n&&r.coordinate().reflect(n),e}function MC(e){return _t(Wt,Ne("heatmapStyle"),SC,EC,bC,CC,AC,he,FC,ae(),ee,Kt,Tr)(e)}var TC=O({},Mt.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"}}}}});jt("polygon","circle",{draw:function(e,r){var t,i,n=e.x,a=e.y,o=this.parsePoints(e.points),s=Math.abs(o[2].x-o[1].x),l=Math.abs(o[1].y-o[0].y),u=Math.min(s,l)/2,h=Number(e.shape[1]),f=Number(e.shape[2]),v=Math.sqrt(f),g=u*v*Math.sqrt(h),p=((t=e.style)===null||t===void 0?void 0:t.fill)||e.color||((i=e.defaultStyle)===null||i===void 0?void 0:i.fill),y=r.addShape("circle",{attrs:(0,d.__assign)((0,d.__assign)((0,d.__assign)({x:n,y:a,r:g},e.defaultStyle),e.style),{fill:p})});return y}}),jt("polygon","square",{draw:function(e,r){var t,i,n=e.x,a=e.y,o=this.parsePoints(e.points),s=Math.abs(o[2].x-o[1].x),l=Math.abs(o[1].y-o[0].y),u=Math.min(s,l),h=Number(e.shape[1]),f=Number(e.shape[2]),v=Math.sqrt(f),g=u*v*Math.sqrt(h),p=((t=e.style)===null||t===void 0?void 0:t.fill)||e.color||((i=e.defaultStyle)===null||i===void 0?void 0:i.fill),y=r.addShape("rect",{attrs:(0,d.__assign)((0,d.__assign)((0,d.__assign)({x:n-g/2,y:a-g/2,width:g,height:g},e.defaultStyle),e.style),{fill:p})});return y}});var AL=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="heatmap",t}return r.getDefaultOptions=function(){return TC},r.prototype.getSchemaAdaptor=function(){return MC},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r}(Mt),ws,wi="$$range$$",LC="low-q1-median-q3-high",IC="$$y_outliers$$",Xh="outliers_view",OC=O({},Mt.getDefaultOptions(),{meta:(ws={},ws[wi]={min:0,alias:LC},ws),interactions:[{type:"active-region"}],tooltip:{showMarkers:!1,shared:!0},boxStyle:{lineWidth:1}}),jh=function(e,r){var t=e;if(Array.isArray(r)){var i=r[0],n=r[1],a=r[2],o=r[3],s=r[4];t=(0,c.map)(e,function(l){return l[wi]=[l[i],l[n],l[a],l[o],l[s]],l})}return t};function PC(e){var r=e.chart,t=e.options,i=t.xField,n=t.yField,a=t.groupField,o=t.color,s=t.tooltip,l=t.boxStyle;r.data(jh(t.data,n));var u=(0,c.isArray)(n)?wi:n,h=n?(0,c.isArray)(n)?n:[n]:[],f=s;f!==!1&&(f=O({},{fields:(0,c.isArray)(n)?n:[]},f));var v=fs(O({},e,{options:{xField:i,yField:u,seriesField:a,tooltip:f,rawFields:h,label:!1,schema:{shape:"box",color:o,style:l}}})).ext;return a&&v.geometry.adjust("dodge"),e}function DC(e){var r=e.chart,t=e.options,i=t.xField,n=t.data,a=t.outliersField,o=t.outliersStyle,s=t.padding,l=t.label;if(!a)return e;var u=r.createView({padding:s,id:Xh}),h=n.reduce(function(f,v){var g=v[a];return g.forEach(function(p){var y;return f.push((0,d.__assign)((0,d.__assign)({},v),(y={},y[a]=p,y)))}),f},[]);return u.data(h),ze({chart:u,options:{xField:i,yField:a,point:{shape:"circle",style:o},label:l}}),u.axis(!1),e}function kC(e){var r,t,i=e.chart,n=e.options,a=n.meta,o=n.xAxis,s=n.yAxis,l=n.xField,u=n.yField,h=n.outliersField,f=Array.isArray(u)?wi:u,v={};if(h){var g=IC;v=(r={},r[h]={sync:g,nice:!0},r[f]={sync:g,nice:!0},r)}var p=O(v,a,(t={},t[l]=Zt(o,Oe),t[f]=Zt(s,Oe),t));return i.scale(p),e}function BC(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField,s=Array.isArray(o)?wi:o;return i===!1?r.axis(a,!1):r.axis(a,i),n===!1?r.axis(wi,!1):r.axis(s,n),e}function RC(e){var r=e.chart,t=e.options,i=t.legend,n=t.groupField;return n?i?r.legend(n,i):r.legend(n,{position:"bottom"}):r.legend(!1),e}function NC(e){return _t(PC,DC,kC,BC,RC,he,ee,Kt,Wt)(e)}var FL=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="box",t}return r.getDefaultOptions=function(){return OC},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this.options.yField,n=this.chart.views.find(function(a){return a.id===Xh});n&&n.data(t),this.chart.changeData(jh(t,i))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return NC},r}(Mt),zC=F(53843),VC=F.n(zC);function Uh(e,r){var t=e.length*r;if(e.length===0)throw new Error("quantile requires at least one data point.");if(r<0||r>1)throw new Error("quantiles must be between 0 and 1");return r===1?e[e.length-1]:r===0?e[0]:t%1!=0?e[Math.ceil(t)-1]:e.length%2==0?(e[t-1]+e[t])/2:e[t]}function hn(e,r,t){var i=e[r];e[r]=e[t],e[t]=i}function Ca(e,r,t,i){for(t=t||0,i=i||e.length-1;i>t;){if(i-t>600){var n=i-t+1,a=r-t+1,o=Math.log(n),s=.5*Math.exp(2*o/3),l=.5*Math.sqrt(o*s*(n-s)/n);a-n/2<0&&(l*=-1);var u=Math.max(t,Math.floor(r-a*s/n+l)),h=Math.min(i,Math.floor(r+(n-a)*s/n+l));Ca(e,r,u,h)}var f=e[r],v=t,g=i;for(hn(e,t,r),e[i]>f&&hn(e,t,i);v<g;){for(hn(e,v,g),v++,g--;e[v]<f;)v++;for(;e[g]>f;)g--}e[t]===f?hn(e,t,g):(g++,hn(e,g,i)),g<=r&&(t=g+1),r<=g&&(i=g-1)}}function fn(e,r){var t=e.slice();if(Array.isArray(r)){GC(t,r);for(var i=[],n=0;n<r.length;n++)i[n]=Uh(t,r[n]);return i}else{var a=Kh(t.length,r);return Zh(t,a,0,t.length-1),Uh(t,r)}}function Zh(e,r,t,i){r%1==0?Ca(e,r,t,i):(r=Math.floor(r),Ca(e,r,t,i),Ca(e,r+1,r+1,i))}function GC(e,r){for(var t=[0],i=0;i<r.length;i++)t.push(Kh(e.length,r[i]));t.push(e.length-1),t.sort(WC);for(var n=[0,t.length-1];n.length;){var a=Math.ceil(n.pop()),o=Math.floor(n.pop());if(!(a-o<=1)){var s=Math.floor((o+a)/2);Zh(e,t[s],Math.floor(t[o]),Math.ceil(t[a])),n.push(o,s,s,a)}}}function WC(e,r){return e-r}function Kh(e,r){var t=e*r;return r===1?e-1:r===0?0:t%1!=0?Math.ceil(t)-1:e%2==0?t-.5:t}var qh=function(e){return{low:(0,c.min)(e),high:(0,c.max)(e),q1:fn(e,.25),q3:fn(e,.75),median:fn(e,[.5]),minMax:[(0,c.min)(e),(0,c.max)(e)],quantile:[fn(e,.25),fn(e,.75)]}},$h=function(e,r){var t=VC().create(e,r);return{violinSize:t.map(function(i){return i.y}),violinY:t.map(function(i){return i.x})}},Qh=function(e){var r=e.xField,t=e.yField,i=e.seriesField,n=e.data,a=e.kde,o={min:a.min,max:a.max,size:a.sampleSize,width:a.width};if(!i){var s=(0,c.groupBy)(n,r);return Object.keys(s).map(function(h){var f=s[h],v=f.map(function(g){return g[t]});return(0,d.__assign)((0,d.__assign)({x:h},$h(v,o)),qh(v))})}var l=[],u=(0,c.groupBy)(n,i);return Object.keys(u).forEach(function(h){var f=(0,c.groupBy)(u[h],r);return Object.keys(f).forEach(function(v){var g,p=f[v],y=p.map(function(m){return m[t]});l.push((0,d.__assign)((0,d.__assign)((g={x:v},g[i]=h,g),$h(y,o)),qh(y)))})}),l},Ye="x",$r="violinY",HC="violinSize",Jh="minMax",tf="quantile",ef="median",bs="violin_view",YC="min_max_view",XC="quantile_view",jC="median_view",UC=O({},Mt.getDefaultOptions(),{syncViewPadding:!0,kde:{type:"triangular",sampleSize:32,width:3},violinStyle:{lineWidth:1,fillOpacity:.3,strokeOpacity:.75},xAxis:{grid:{line:null},tickLine:{alignTick:!1}},yAxis:{grid:{line:{style:{lineWidth:.5,lineDash:[4,4]}}}},legend:{position:"top-left"},tooltip:{showMarkers:!1}}),Aa=["low","high","q1","q3","median"],Fa=[{type:"dodge",marginRatio:1/32}];function ZC(e){var r=e.chart,t=e.options;return r.data(Qh(t)),e}function KC(e){var r=e.chart,t=e.options,i=t.seriesField,n=t.color,a=t.shape,o=a===void 0?"violin":a,s=t.violinStyle,l=t.tooltip,u=t.state,h=r.createView({id:bs});return Dw({chart:h,options:{xField:Ye,yField:$r,seriesField:i||Ye,sizeField:HC,tooltip:(0,d.__assign)({fields:Aa},l),violin:{style:s,color:n,shape:o},state:u}}),h.geometries[0].adjust(Fa),e}function qC(e){var r=e.chart,t=e.options,i=t.seriesField,n=t.color,a=t.tooltip,o=t.box;if(o===!1)return e;var s=r.createView({id:YC});Ce({chart:s,options:{xField:Ye,yField:Jh,seriesField:i||Ye,tooltip:(0,d.__assign)({fields:Aa},a),state:typeof o=="object"?o.state:{},interval:{color:n,size:1,style:{lineWidth:0}}}}),s.geometries[0].adjust(Fa);var l=r.createView({id:XC});Ce({chart:l,options:{xField:Ye,yField:tf,seriesField:i||Ye,tooltip:(0,d.__assign)({fields:Aa},a),state:typeof o=="object"?o.state:{},interval:{color:n,size:8,style:{fillOpacity:1}}}}),l.geometries[0].adjust(Fa);var u=r.createView({id:jC});return ze({chart:u,options:{xField:Ye,yField:ef,seriesField:i||Ye,tooltip:(0,d.__assign)({fields:Aa},a),state:typeof o=="object"?o.state:{},point:{color:n,size:1,style:{fill:"white",lineWidth:0}}}}),u.geometries[0].adjust(Fa),l.axis(!1),s.axis(!1),u.axis(!1),u.legend(!1),s.legend(!1),l.legend(!1),e}function $C(e){var r,t=e.chart,i=e.options,n=i.meta,a=i.xAxis,o=i.yAxis,s={},l=O(s,n,(r={},r[Ye]=(0,d.__assign)((0,d.__assign)({sync:!0},Zt(a,Oe)),{type:"cat"}),r[$r]=(0,d.__assign)({sync:!0},Zt(o,Oe)),r[Jh]=(0,d.__assign)({sync:$r},Zt(o,Oe)),r[tf]=(0,d.__assign)({sync:$r},Zt(o,Oe)),r[ef]=(0,d.__assign)({sync:$r},Zt(o,Oe)),r));return t.scale(l),e}function QC(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=Ot(r,bs);return i===!1?a.axis(Ye,!1):a.axis(Ye,i),n===!1?a.axis($r,!1):a.axis($r,n),r.axis(!1),e}function JC(e){var r=e.chart,t=e.options,i=t.legend,n=t.seriesField,a=t.shape;if(i===!1)r.legend(!1);else{var o=n||Ye,s=(0,c.omit)(i,["selected"]);(!a||!a.startsWith("hollow"))&&((0,c.get)(s,["marker","style","lineWidth"])||(0,c.set)(s,["marker","style","lineWidth"],0)),r.legend(o,s),(0,c.get)(i,"selected")&&(0,c.each)(r.views,function(l){return l.legend(o,i)})}return e}function tA(e){var r=e.chart,t=Ot(r,bs);return ae()((0,d.__assign)((0,d.__assign)({},e),{chart:t})),e}function eA(e){var r=e.chart,t=e.options,i=t.animation;return(0,c.each)(r.views,function(n){typeof i=="boolean"?n.animate(i):n.animate(!0),(0,c.each)(n.geometries,function(a){a.animate(i)})}),e}function rA(e){return _t(Wt,ZC,KC,qC,$C,he,QC,JC,ee,tA,eA)(e)}var EL=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="violin",t}return r.getDefaultOptions=function(){return UC},r.prototype.changeData=function(t){this.updateOption({data:t}),this.chart.changeData(Qh(this.options))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return rA},r}(Mt),iA=function(e){return function(r,t){var i=[];return i[0]=e(r[0],t[0]),i[1]=e(r[1],t[1]),i[2]=e(r[2],t[2]),i}},rf={normal:function(e){return e},multiply:function(e,r){return e*r/255},screen:function(e,r){return 255*(1-(1-e/255)*(1-r/255))},overlay:function(e,r){return r<128?2*e*r/255:255*(1-2*(1-e/255)*(1-r/255))},darken:function(e,r){return e>r?r:e},lighten:function(e,r){return e>r?e:r},dodge:function(e,r){return e===255?255:(e=255*(r/255)/(1-e/255),e>255?255:e)},burn:function(e,r){return r===255?255:e===0?0:255*(1-Math.min(1,(1-r/255)/(e/255)))}},nA=function(e){if(!rf[e])throw new Error("unknown blend mode "+e);return rf[e]};function aA(e,r,t){t===void 0&&(t="normal");var i=iA(nA(t))(Ea(e),Ea(r)),n=Ea(e),a=n[0],o=n[1],s=n[2],l=n[3],u=Ea(r),h=u[0],f=u[1],v=u[2],g=u[3],p=Number((l+g*(1-l)).toFixed(2)),y=Math.round((l*(1-g)*(a/255)+l*g*(i[0]/255)+(1-l)*g*(h/255))/p*255),m=Math.round((l*(1-g)*(o/255)+l*g*(i[1]/255)+(1-l)*g*(f/255))/p*255),x=Math.round((l*(1-g)*(s/255)+l*g*(i[2]/255)+(1-l)*g*(v/255))/p*255);return"rgba("+y+", "+m+", "+x+", "+p+")"}function Ea(e){var r=e.replace("/s+/g",""),t;return typeof r=="string"&&!r.startsWith("rgba")&&!r.startsWith("#")?t=yr.rgb2arr(yr.toRGB(r)).concat([1]):(r.startsWith("rgba")&&(t=r.replace("rgba(","").replace(")","").split(",")),r.startsWith("#")&&(t=yr.rgb2arr(r).concat([1])),t.map(function(i,n){return n===3?Number(i):i|0}))}var er=F(87026),nf=1e-10;function Ss(e,r){var t=sA(e),i=t.filter(function(M){return oA(M,e)}),n=0,a=0,o,s=[];if(i.length>1){var l=sf(i);for(o=0;o<i.length;++o){var u=i[o];u.angle=Math.atan2(u.x-l.x,u.y-l.y)}i.sort(function(M,L){return L.angle-M.angle});var h=i[i.length-1];for(o=0;o<i.length;++o){var f=i[o];a+=(h.x+f.x)*(f.y-h.y);for(var v={x:(f.x+h.x)/2,y:(f.y+h.y)/2},g=null,p=0;p<f.parentIndex.length;++p)if(h.parentIndex.indexOf(f.parentIndex[p])>-1){var y=e[f.parentIndex[p]],m=Math.atan2(f.x-y.x,f.y-y.y),x=Math.atan2(h.x-y.x,h.y-y.y),_=x-m;_<0&&(_+=2*Math.PI);var w=x-_/2,b=Ke(v,{x:y.x+y.radius*Math.sin(w),y:y.y+y.radius*Math.cos(w)});b>y.radius*2&&(b=y.radius*2),(g===null||g.width>b)&&(g={circle:y,width:b,p1:f,p2:h})}g!==null&&(s.push(g),n+=Cs(g.circle.radius,g.width),h=f)}}else{var S=e[0];for(o=1;o<e.length;++o)e[o].radius<S.radius&&(S=e[o]);var C=!1;for(o=0;o<e.length;++o)if(Ke(e[o],S)>Math.abs(S.radius-e[o].radius)){C=!0;break}C?n=a=0:(n=S.radius*S.radius*Math.PI,s.push({circle:S,p1:{x:S.x,y:S.y+S.radius},p2:{x:S.x-nf,y:S.y+S.radius},width:S.radius*2}))}return a/=2,r&&(r.area=n+a,r.arcArea=n,r.polygonArea=a,r.arcs=s,r.innerPoints=i,r.intersectionPoints=t),n+a}function oA(e,r){for(var t=0;t<r.length;++t)if(Ke(e,r[t])>r[t].radius+nf)return!1;return!0}function sA(e){for(var r=[],t=0;t<e.length;++t)for(var i=t+1;i<e.length;++i)for(var n=of(e[t],e[i]),a=0;a<n.length;++a){var o=n[a];o.parentIndex=[t,i],r.push(o)}return r}function Cs(e,r){return e*e*Math.acos(1-r/e)-(e-r)*Math.sqrt(r*(2*e-r))}function Ke(e,r){return Math.sqrt((e.x-r.x)*(e.x-r.x)+(e.y-r.y)*(e.y-r.y))}function af(e,r,t){if(t>=e+r)return 0;if(t<=Math.abs(e-r))return Math.PI*Math.min(e,r)*Math.min(e,r);var i=e-(t*t-r*r+e*e)/(2*t),n=r-(t*t-e*e+r*r)/(2*t);return Cs(e,i)+Cs(r,n)}function of(e,r){var t=Ke(e,r),i=e.radius,n=r.radius;if(t>=i+n||t<=Math.abs(i-n))return[];var a=(i*i-n*n+t*t)/(2*t),o=Math.sqrt(i*i-a*a),s=e.x+a*(r.x-e.x)/t,l=e.y+a*(r.y-e.y)/t,u=-(r.y-e.y)*(o/t),h=-(r.x-e.x)*(o/t);return[{x:s+u,y:l-h},{x:s-u,y:l+h}]}function sf(e){for(var r={x:0,y:0},t=0;t<e.length;++t)r.x+=e[t].x,r.y+=e[t].y;return r.x/=e.length,r.y/=e.length,r}function lA(e,r){r=r||{},r.maxIterations=r.maxIterations||500;var t=r.initialLayout||fA,i=r.lossFunction||Fs;e=uA(e);var n=t(e,r),a=[],o=[],s;for(s in n)n.hasOwnProperty(s)&&(a.push(n[s].x),a.push(n[s].y),o.push(s));for(var l=(0,er.nelderMead)(function(f){for(var v={},g=0;g<o.length;++g){var p=o[g];v[p]={x:f[2*g],y:f[2*g+1],radius:n[p].radius}}return i(v,e)},a,r),u=l.x,h=0;h<o.length;++h)s=o[h],n[s].x=u[2*h],n[s].y=u[2*h+1];return n}var lf=1e-10;function As(e,r,t){return Math.min(e,r)*Math.min(e,r)*Math.PI<=t+lf?Math.abs(e-r):(0,er.bisect)(function(i){return af(e,r,i)-t},0,e+r)}function uA(e){e=e.slice();var r=[],t={},i,n,a,o;for(i=0;i<e.length;++i){var s=e[i];s.sets.length==1?r.push(s.sets[0]):s.sets.length==2&&(a=s.sets[0],o=s.sets[1],t[[a,o]]=!0,t[[o,a]]=!0)}for(r.sort(function(l,u){return l>u?1:-1}),i=0;i<r.length;++i)for(a=r[i],n=i+1;n<r.length;++n)o=r[n],[a,o]in t||e.push({sets:[a,o],size:0});return e}function cA(e,r,t){var i=(0,er.zerosM)(r.length,r.length),n=(0,er.zerosM)(r.length,r.length);return e.filter(function(a){return a.sets.length==2}).map(function(a){var o=t[a.sets[0]],s=t[a.sets[1]],l=Math.sqrt(r[o].size/Math.PI),u=Math.sqrt(r[s].size/Math.PI),h=As(l,u,a.size);i[o][s]=i[s][o]=h;var f=0;a.size+1e-10>=Math.min(r[o].size,r[s].size)?f=1:a.size<=1e-10&&(f=-1),n[o][s]=n[s][o]=f}),{distances:i,constraints:n}}function hA(e,r,t,i){var n=0,a;for(a=0;a<r.length;++a)r[a]=0;for(a=0;a<t.length;++a)for(var o=e[2*a],s=e[2*a+1],l=a+1;l<t.length;++l){var u=e[2*l],h=e[2*l+1],f=t[a][l],v=i[a][l],g=(u-o)*(u-o)+(h-s)*(h-s),p=Math.sqrt(g),y=g-f*f;v>0&&p<=f||v<0&&p>=f||(n+=2*y*y,r[2*a]+=4*y*(o-u),r[2*a+1]+=4*y*(s-h),r[2*l]+=4*y*(u-o),r[2*l+1]+=4*y*(h-s))}return n}function fA(e,r){var t=dA(e,r),i=r.lossFunction||Fs;if(e.length>=8){var n=vA(e,r),a=i(n,e),o=i(t,e);a+1e-8<o&&(t=n)}return t}function vA(e,r){r=r||{};var t=r.restarts||10,i=[],n={},a;for(a=0;a<e.length;++a){var o=e[a];o.sets.length==1&&(n[o.sets[0]]=i.length,i.push(o))}var s=cA(e,i,n),l=s.distances,u=s.constraints,h=(0,er.norm2)(l.map(er.norm2))/l.length;l=l.map(function(_){return _.map(function(w){return w/h})});var f=function(_,w){return hA(_,w,l,u)},v,g;for(a=0;a<t;++a){var p=(0,er.zeros)(l.length*2).map(Math.random);g=(0,er.conjugateGradient)(f,p,r),(!v||g.fx<v.fx)&&(v=g)}var y=v.x,m={};for(a=0;a<i.length;++a){var x=i[a];m[x.sets[0]]={x:y[2*a]*h,y:y[2*a+1]*h,radius:Math.sqrt(x.size/Math.PI)}}if(r.history)for(a=0;a<r.history.length;++a)(0,er.scale)(r.history[a].x,h);return m}function dA(e,r){for(var t=r&&r.lossFunction?r.lossFunction:Fs,i={},n={},a,o=0;o<e.length;++o){var s=e[o];s.sets.length==1&&(a=s.sets[0],i[a]={x:1e10,y:1e10,rowid:Object.keys(i).length,size:s.size,radius:Math.sqrt(s.size/Math.PI)},n[a]=[])}e=e.filter(function(H){return H.sets.length==2});for(var o=0;o<e.length;++o){var l=e[o],u=l.hasOwnProperty("weight")?l.weight:1,h=l.sets[0],f=l.sets[1];l.size+lf>=Math.min(i[h].size,i[f].size)&&(u=0),n[h].push({set:f,size:l.size,weight:u}),n[f].push({set:h,size:l.size,weight:u})}var v=[];for(a in n)if(n.hasOwnProperty(a)){for(var g=0,o=0;o<n[a].length;++o)g+=n[a][o].size*n[a][o].weight;v.push({set:a,size:g})}function p(H,tt){return tt.size-H.size}v.sort(p);var y={};function m(H){return H.set in y}function x(H,tt){i[tt].x=H.x,i[tt].y=H.y,y[tt]=!0}x({x:0,y:0},v[0].set);for(var o=1;o<v.length;++o){var _=v[o].set,w=n[_].filter(m);if(a=i[_],w.sort(p),w.length===0)throw"ERROR: missing pairwise overlap information";for(var b=[],S=0;S<w.length;++S){var C=i[w[S].set],M=As(a.radius,C.radius,w[S].size);b.push({x:C.x+M,y:C.y}),b.push({x:C.x-M,y:C.y}),b.push({y:C.y+M,x:C.x}),b.push({y:C.y-M,x:C.x});for(var L=S+1;L<w.length;++L)for(var B=i[w[L].set],I=As(a.radius,B.radius,w[L].size),G=of({x:C.x,y:C.y,radius:M},{x:B.x,y:B.y,radius:I}),q=0;q<G.length;++q)b.push(G[q])}for(var ft=1e50,mt=b[0],S=0;S<b.length;++S){i[_].x=b[S].x,i[_].y=b[S].y;var zt=t(i,e);zt<ft&&(ft=zt,mt=b[S])}x(mt,_)}return i}function Fs(e,r){var t=0;function i(h){return h.map(function(f){return e[f]})}for(var n=0;n<r.length;++n){var a=r[n],o=void 0;if(a.sets.length!=1){if(a.sets.length==2){var s=e[a.sets[0]],l=e[a.sets[1]];o=af(s.radius,l.radius,Ke(s,l))}else o=Ss(i(a.sets));var u=a.hasOwnProperty("weight")?a.weight:1;t+=u*(o-a.size)*(o-a.size)}}return t}function gA(e,r,t){t===null?e.sort(function(y,m){return m.radius-y.radius}):e.sort(t);var i;if(e.length>0){var n=e[0].x,a=e[0].y;for(i=0;i<e.length;++i)e[i].x-=n,e[i].y-=a}if(e.length==2){var o=distance(e[0],e[1]);o<Math.abs(e[1].radius-e[0].radius)&&(e[1].x=e[0].x+e[0].radius-e[1].radius-1e-10,e[1].y=e[0].y)}if(e.length>1){var s=Math.atan2(e[1].x,e[1].y)-r,l=void 0,u=void 0,h=Math.cos(s),f=Math.sin(s);for(i=0;i<e.length;++i)l=e[i].x,u=e[i].y,e[i].x=h*l-f*u,e[i].y=f*l+h*u}if(e.length>2){for(var v=Math.atan2(e[2].x,e[2].y)-r;v<0;)v+=2*Math.PI;for(;v>2*Math.PI;)v-=2*Math.PI;if(v>Math.PI){var g=e[1].y/(1e-10+e[1].x);for(i=0;i<e.length;++i){var p=(e[i].x+g*e[i].y)/(1+g*g);e[i].x=2*p-e[i].x,e[i].y=2*p*g-e[i].y}}}}function pA(e){e.map(function(u){u.parent=u});function r(u){return u.parent!==u&&(u.parent=r(u.parent)),u.parent}function t(u,h){var f=r(u),v=r(h);f.parent=v}for(var i=0;i<e.length;++i)for(var n=i+1;n<e.length;++n){var a=e[i].radius+e[n].radius;distance(e[i],e[n])+1e-10<a&&t(e[n],e[i])}for(var o={},s,i=0;i<e.length;++i)s=r(e[i]).parent.setid,s in o||(o[s]=[]),o[s].push(e[i]);e.map(function(u){delete u.parent});var l=[];for(s in o)o.hasOwnProperty(s)&&l.push(o[s]);return l}function Es(e){var r=function(t){var i=Math.max.apply(null,e.map(function(a){return a[t]+a.radius})),n=Math.min.apply(null,e.map(function(a){return a[t]-a.radius}));return{max:i,min:n}};return{xRange:r("x"),yRange:r("y")}}function ML(e,r,t){r===null&&(r=Math.PI/2);var i=[],n,a;for(a in e)if(e.hasOwnProperty(a)){var o=e[a];i.push({x:o.x,y:o.y,radius:o.radius,setid:a})}var s=pA(i);for(n=0;n<s.length;++n){gA(s[n],r,t);var l=Es(s[n]);s[n].size=(l.xRange.max-l.xRange.min)*(l.yRange.max-l.yRange.min),s[n].bounds=l}s.sort(function(p,y){return y.size-p.size}),i=s[0];var u=i.bounds,h=(u.xRange.max-u.xRange.min)/50;function f(p,y,m){if(!!p){var x=p.bounds,_,w,b;y?_=u.xRange.max-x.xRange.min+h:(_=u.xRange.max-x.xRange.max,b=(x.xRange.max-x.xRange.min)/2-(u.xRange.max-u.xRange.min)/2,b<0&&(_+=b)),m?w=u.yRange.max-x.yRange.min+h:(w=u.yRange.max-x.yRange.max,b=(x.yRange.max-x.yRange.min)/2-(u.yRange.max-u.yRange.min)/2,b<0&&(w+=b));for(var S=0;S<p.length;++S)p[S].x+=_,p[S].y+=w,i.push(p[S])}}for(var v=1;v<s.length;)f(s[v],!0,!1),f(s[v+1],!1,!0),f(s[v+2],!0,!0),v+=3,u=Es(i);var g={};for(n=0;n<i.length;++n)g[i[n].setid]=i[n];return g}function yA(e,r,t,i){var n=[],a=[];for(var o in e)e.hasOwnProperty(o)&&(a.push(o),n.push(e[o]));r-=2*i,t-=2*i;var s=Es(n),l=s.xRange,u=s.yRange;if(l.max==l.min||u.max==u.min)return console.log("not scaling solution: zero size detected"),e;for(var h=r/(l.max-l.min),f=t/(u.max-u.min),v=Math.min(f,h),g=(r-(l.max-l.min)*v)/2,p=(t-(u.max-u.min)*v)/2,y={},m=0;m<n.length;++m){var x=n[m];y[a[m]]={radius:v*x.radius,x:i+g+(x.x-l.min)*v,y:i+p+(x.y-u.min)*v}}return y}function Ms(e,r,t){var i=r[0].radius-Ke(r[0],e),n,a;for(n=1;n<r.length;++n)a=r[n].radius-Ke(r[n],e),a<=i&&(i=a);for(n=0;n<t.length;++n)a=Ke(t[n],e)-t[n].radius,a<=i&&(i=a);return i}function uf(e,r){var t=[],i;for(i=0;i<e.length;++i){var n=e[i];t.push({x:n.x,y:n.y}),t.push({x:n.x+n.radius/2,y:n.y}),t.push({x:n.x-n.radius/2,y:n.y}),t.push({x:n.x,y:n.y+n.radius/2}),t.push({x:n.x,y:n.y-n.radius/2})}var a=t[0],o=Ms(t[0],e,r);for(i=1;i<t.length;++i){var s=Ms(t[i],e,r);s>=o&&(a=t[i],o=s)}var l=(0,er.nelderMead)(function(v){return-1*Ms({x:v[0],y:v[1]},e,r)},[a.x,a.y],{maxIterations:500,minErrorDelta:1e-10}).x,u={x:l[0],y:l[1]},h=!0;for(i=0;i<e.length;++i)if(Ke(u,e[i])>e[i].radius){h=!1;break}for(i=0;i<r.length;++i)if(Ke(u,r[i])<r[i].radius){h=!1;break}if(!h)if(e.length==1)u={x:e[0].x,y:e[0].y};else{var f={};Ss(e,f),f.arcs.length===0?u={x:0,y:-1e3,disjoint:!0}:f.arcs.length==1?u={x:f.arcs[0].circle.x,y:f.arcs[0].circle.y}:r.length?u=uf(e,[]):u=sf(f.arcs.map(function(v){return v.p1}))}return u}function mA(e){var r={},t=[];for(var i in e)t.push(i),r[i]=[];for(var n=0;n<t.length;n++)for(var a=e[t[n]],o=n+1;o<t.length;++o){var s=e[t[o]],l=Ke(a,s);l+s.radius<=a.radius+1e-10?r[t[o]].push(t[n]):l+a.radius<=s.radius+1e-10&&r[t[n]].push(t[o])}return r}function xA(e,r){for(var t={},i=mA(e),n=0;n<r.length;++n){for(var a=r[n].sets,o={},s={},l=0;l<a.length;++l){o[a[l]]=!0;for(var u=i[a[l]],h=0;h<u.length;++h)s[u[h]]=!0}var f=[],v=[];for(var g in e)g in o?f.push(e[g]):g in s||v.push(e[g]);var p=uf(f,v);t[a]=p,p.disjoint&&r[n].size>0&&console.log("WARNING: area "+a+" not represented on screen")}return t}function _A(e,r,t){var i=[],n=e-t,a=r;return i.push("M",n,a),i.push("A",t,t,0,1,0,n+2*t,a),i.push("A",t,t,0,1,0,n,a),i.join(" ")}function TL(e){var r=e.split(" ");return{x:parseFloat(r[1]),y:parseFloat(r[2]),radius:-parseFloat(r[4])}}function wA(e){var r={};Ss(e,r);var t=r.arcs;if(t.length===0)return"M 0 0";if(t.length==1){var i=t[0].circle;return _A(i.x,i.y,i.radius)}else{for(var n=[`
  46. M`,t[0].p2.x,t[0].p2.y],a=0;a<t.length;++a){var o=t[a],s=o.circle.radius,l=o.width>s;n.push(`
  47. A`,s,s,0,l?1:0,1,o.p1.x,o.p1.y)}return n.join(" ")}}var fr="id",Ts="path",bA={appendPadding:[10,0,20,0],blendMode:"multiply",tooltip:{showTitle:!1,showMarkers:!1,fields:["id","size"],formatter:function(e){return{name:e.id,value:e.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"]},SA=(0,c.memoize)(function(e,r,t,i){var n=new Map,a=e.length;return r.forEach(function(o,s){if(o[i].length===1)n.set(o[fr],e[(s+a)%a]);else{var l=o[i].map(function(u){return n.get(u)});n.set(o[fr],l.slice(1).reduce(function(u,h){return aA(u,h,t)},l[0]))}}),n},function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return JSON.stringify(e)});function CA(e,r,t,i){i===void 0&&(i=0);var n=e.data,a=e.setsField,o=e.sizeField;if(n.length===0)return cr(Ze.WARN,!1,"warn: %s","\u6570\u636E\u4E0D\u80FD\u4E3A\u7A7A"),[];var s=n.map(function(f){var v;return(0,d.__assign)((0,d.__assign)({},f),(v={sets:f[a]||[],size:f[o]},v[Ts]="",v[fr]="",v))});s.sort(function(f,v){return f.sets.length-v.sets.length});var l=lA(s),u=yA(l,r,t,i),h=xA(u,s);return s.forEach(function(f){var v=f.sets,g=v.join(",");f[fr]=g;var p=v.map(function(x){return u[x]}),y=wA(p);/[zZ]$/.test(y)||(y+=" Z"),f[Ts]=y;var m=h[g]||{x:0,y:0};(0,c.assign)(f,m)}),s}function AA(e,r){for(var t=0;t<r.length;t++)if(!e.includes(r[t]))return!1;return!0}function FA(e){return O({},e.defaultStyle,{fill:e.color},e.style)}jt("schema","venn",{draw:function(e,r){var t=e.data,i=(0,Pn.tr)(t[Ts]),n=FA(e),a=r.addGroup({name:"venn-shape"});a.addShape("path",{attrs:(0,d.__assign)((0,d.__assign)({},n),{path:i}),name:"venn-path"});var o=e.customInfo,s=o.offsetX,l=o.offsetY,u=Le.transform(null,[["t",s,l]]);return a.setMatrix(u),a},getMarker:function(e){var r=e.color;return{symbol:"circle",style:{lineWidth:0,stroke:r,fill:r,r:4}}}});var EA=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getLabelPoint=function(t,i,n){var a=t.data,o=a.x,s=a.y,l=t.customLabelInfo,u=l.offsetX,h=l.offsetY;return{content:t.content[n],x:o+u,y:s+h}},r}(Un);qi("venn",EA);function Ma(e){if(!!e){var r=e.geometries[0].elements;r.forEach(function(t){t.shape.toFront()})}}var MA=Gn("element-active"),TA=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.syncElementsPos=function(){Ma(this.context.view)},r.prototype.active=function(){e.prototype.active.call(this),this.syncElementsPos()},r.prototype.toggle=function(){e.prototype.toggle.call(this),this.syncElementsPos()},r.prototype.reset=function(){e.prototype.reset.call(this),this.syncElementsPos()},r}(MA),LA=Gn("element-highlight"),IA=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.syncElementsPos=function(){Ma(this.context.view)},r.prototype.highlight=function(){e.prototype.highlight.call(this),this.syncElementsPos()},r.prototype.toggle=function(){e.prototype.toggle.call(this),this.syncElementsPos()},r.prototype.clear=function(){e.prototype.clear.call(this),this.syncElementsPos()},r.prototype.reset=function(){e.prototype.reset.call(this),this.syncElementsPos()},r}(LA),OA=Gn("element-selected"),PA=Gn("element-single-selected"),DA=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.syncElementsPos=function(){Ma(this.context.view)},r.prototype.selected=function(){e.prototype.selected.call(this),this.syncElementsPos()},r.prototype.toggle=function(){e.prototype.toggle.call(this),this.syncElementsPos()},r.prototype.reset=function(){e.prototype.reset.call(this),this.syncElementsPos()},r}(OA),kA=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.syncElementsPos=function(){Ma(this.context.view)},r.prototype.selected=function(){e.prototype.selected.call(this),this.syncElementsPos()},r.prototype.toggle=function(){e.prototype.toggle.call(this),this.syncElementsPos()},r.prototype.reset=function(){e.prototype.reset.call(this),this.syncElementsPos()},r}(PA);yt("venn-element-active",TA),yt("venn-element-highlight",IA),yt("venn-element-selected",DA),yt("venn-element-single-selected",kA),Et("venn-element-active",{start:[{trigger:"element:mouseenter",action:"venn-element-active:active"}],end:[{trigger:"element:mouseleave",action:"venn-element-active:reset"}]}),Et("venn-element-highlight",{start:[{trigger:"element:mouseenter",action:"venn-element-highlight:highlight"}],end:[{trigger:"element:mouseleave",action:"venn-element-highlight:reset"}]}),Et("venn-element-selected",{start:[{trigger:"element:click",action:"venn-element-selected:toggle"}],rollback:[{trigger:"dblclick",action:["venn-element-selected:reset"]}]}),Et("venn-element-single-selected",{start:[{trigger:"element:click",action:"venn-element-single-selected:toggle"}],rollback:[{trigger:"dblclick",action:["venn-element-single-selected:reset"]}]}),Et("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"]}]}),Et("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"]}]});var BA=40;function cf(e,r,t){var i=e.chart,n=e.options,a=n.blendMode,o=n.setsField,s=i.getTheme(),l=s.colors10,u=s.colors20,h=t;(0,c.isArray)(h)||(h=r.filter(function(v){return v[o].length===1}).length<=10?l:u);var f=SA(h,r,a,o);return function(v){return f.get(v)||h[0]}}function RA(e,r){var t=e.options,i=t.color;if(typeof i!="function"){var n=typeof i=="string"?[i]:i,a=cf(e,r,n);return function(o){return a(o[fr])}}return i}function NA(e){var r=e.chart,t=e.options,i=t.legend,n=t.appendPadding,a=t.padding,o=Mr(n);return i!==!1&&(o=ca(n,(0,c.get)(i,"position"),BA)),r.appendPadding=ss([o,a]),e}function zA(e){var r=e.options,t=r.data;t||(cr(Ze.WARN,!1,"warn: %s","\u6570\u636E\u4E0D\u80FD\u4E3A\u7A7A"),t=[]);var i=t.filter(function(a){return a.sets.length===1}).map(function(a){return a.sets[0]}),n=t.filter(function(a){var o=a.sets;return AA(i,o)});return(0,c.isEqual)(n,t)||cr(Ze.WARN,!1,"warn: %s","\u4EA4\u96C6\u4E2D\u4E0D\u80FD\u51FA\u73B0\u4E0D\u5B58\u5728\u7684\u96C6\u5408, \u8BF7\u8F93\u5165\u5408\u6CD5\u6570\u636E"),(0,c.deepMix)({},e,{options:{data:n}})}function VA(e){var r=e.chart,t=e.options,i=t.pointStyle,n=t.setsField,a=t.sizeField,o=Mr(r.appendPadding),s=o[0],l=o[1],u=o[2],h=o[3],f={offsetX:h,offsetY:s},v=r.viewBBox,g=v.width,p=v.height,y=CA(t,Math.max(g-(l+h),0),Math.max(p-(s+u),0),0);r.data(y);var m=fs(O({},e,{options:{xField:"x",yField:"y",sizeField:a,seriesField:fr,rawFields:[n,a],schema:{shape:"venn",style:i}}})).ext,x=m.geometry;x.customInfo(f);var _=RA(e,y);return typeof _=="function"&&x.color(fr,function(w){var b=y.find(function(C){return C[fr]===w}),S=cf(e,y)(w);return _(b,S)}),e}function GA(e){var r=e.chart,t=e.options,i=t.label,n=Mr(r.appendPadding),a=n[0],o=n[3],s={offsetX:o,offsetY:a},l=Se(r,"schema");if(!i)l.label(!1);else{var u=i.callback,h=(0,d.__rest)(i,["callback"]);l.label({fields:["id"],callback:u,cfg:(0,c.deepMix)({},ye(h),{type:"venn",customLabelInfo:s})})}return e}function WA(e){var r=e.chart,t=e.options,i=t.legend,n=t.sizeField;return r.legend(fr,i),r.legend(n,!1),e}function HA(e){var r=e.chart;return r.axis(!1),e}function YA(e){var r=e.options,t=e.chart,i=r.interactions;if(i){var n={"legend-active":"venn-legend-active","legend-highlight":"venn-legend-highlight"};ee(O({},e,{options:{interactions:i.map(function(a){return(0,d.__assign)((0,d.__assign)({},a),{type:n[a.type]||a.type})})}}))}return t.removeInteraction("legend-active"),t.removeInteraction("legend-highlight"),e}function XA(e){return _t(NA,Wt,zA,VA,GA,oe({}),WA,HA,he,YA,Kt)(e)}var LL=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="venn",t}return r.getDefaultOptions=function(){return bA},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return XA},r.prototype.triggerResize=function(){this.chart.destroyed||(this.chart.forceFit(),this.chart.clear(),this.execAdaptor(),this.chart.render(!0))},r}(Mt),vn="$$stock-range$$",Ta="trend",hf="up",ff="down",jA={showMarkers:!1,showCrosshairs:!0,shared:!0,crosshairs:{type:"xy",follow:!0,text:function(e,r,t){var i;if(e==="x"){var n=t[0];i=n?n.title:r}else i=r;return{position:e==="y"?"start":"end",content:i,style:{fill:"#dfdfdf"}}},textBackground:{padding:[2,4],style:{fill:"#666"}}}},UA=O({},Mt.getDefaultOptions(),{tooltip:jA,interactions:[{type:"tooltip"}],legend:{position:"top-left"},risingFill:"#ef5350",fallingFill:"#26a69a"});function vf(e,r){return(0,c.map)(e,function(t){if((0,c.isArray)(r)){var i=r[0],n=r[1],a=r[2],o=r[3];t[Ta]=t[i]<=t[n]?hf:ff,t[vn]=[t[i],t[n],t[a],t[o]]}return t})}function ZA(e){var r=e.chart,t=e.options,i=t.yField,n=t.data,a=t.risingFill,o=t.fallingFill,s=t.tooltip,l=t.stockStyle;r.data(vf(n,i));var u=s;return u!==!1&&(u=O({},{fields:i},u)),fs(O({},e,{options:{schema:{shape:"candle",color:[a,o],style:l},yField:vn,seriesField:Ta,rawFields:i,tooltip:u}})),e}function KA(e){var r,t,i=e.chart,n=e.options,a=n.meta,o=n.xAxis,s=n.yAxis,l=n.xField,u=(r={},r[l]={type:"timeCat",tickCount:6},r[Ta]={values:[hf,ff]},r),h=O(u,a,(t={},t[l]=Zt(o,Oe),t[vn]=Zt(s,Oe),t));return i.scale(h),e}function qA(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField;return i===!1?r.axis(a,!1):r.axis(a,i),n===!1?r.axis(vn,!1):r.axis(vn,n),e}function $A(e){var r=e.chart,t=e.options,i=t.tooltip;return i!==!1?r.tooltip(i):r.tooltip(!1),e}function QA(e){var r=e.chart,t=e.options,i=t.legend;return i?r.legend(Ta,i):i===!1&&r.legend(!1),e}function df(e){_t(Wt,ZA,KA,qA,$A,QA,ee,Kt,ae(),on)(e)}var JA=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="stock",t}return r.getDefaultOptions=function(){return UA},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return df},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this.options.yField;this.chart.changeData(vf(t,i))},r}(Mt),Ls,Lr="$$percentage$$",Ir="$$mappingValue$$",vr="$$conversion$$",Is="$$totalPercentage$$",dn="$$x$$",gn="$$y$$",tF={appendPadding:[0,80],minSize:0,maxSize:1,meta:(Ls={},Ls[Ir]={min:0,max:1,nice:!1},Ls),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)"}}};function gf(e,r,t){var i=[],n=t.yField,a=t.maxSize,o=t.minSize,s=(0,c.get)((0,c.maxBy)(r,n),[n]),l=(0,c.isNumber)(a)?a:1,u=(0,c.isNumber)(o)?o:0;return i=(0,c.map)(e,function(h,f){var v=(h[n]||0)/s;return h[Lr]=v,h[Ir]=(l-u)*v+u,h[vr]=[(0,c.get)(e,[f-1,n]),h[n]],h}),i}function Os(e){return function(r){var t=r.chart,i=r.options,n=i.conversionTag,a=t.getOptions().data;if(n){var o=n.formatter;a.forEach(function(s,l){if(!(l<=0||Number.isNaN(s[Ir]))){var u=e(s,l,a,{top:!0,text:{content:(0,c.isFunction)(o)?o(s,a):o,offsetX:n.offsetX,offsetY:n.offsetY,position:"end",autoRotate:!1,style:(0,d.__assign)({textAlign:"start",textBaseline:"middle"},n.style)}});t.annotation().line(u)}})}return r}}function eF(e){var r=e.chart,t=e.options,i=t.data,n=i===void 0?[]:i,a=t.yField,o=t.maxSize,s=t.minSize,l=gf(n,n,{yField:a,maxSize:o,minSize:s});return r.data(l),e}function rF(e){var r=e.chart,t=e.options,i=t.xField,n=t.yField,a=t.color,o=t.tooltip,s=t.label,l=t.shape,u=l===void 0?"funnel":l,h=t.funnelStyle,f=t.state,v=He(o,[i,n]),g=v.fields,p=v.formatter;Pe({chart:r,options:{type:"interval",xField:i,yField:Ir,colorField:i,tooltipFields:(0,c.isArray)(g)&&g.concat([Lr,vr]),mapping:{shape:u,tooltip:p,color:a,style:h},label:s,state:f}});var y=Se(e.chart,"interval");return y.adjust("symmetric"),e}function iF(e){var r=e.chart,t=e.options,i=t.isTransposed;return r.coordinate({type:"rect",actions:i?[]:[["transpose"],["scale",1,-1]]}),e}function nF(e){var r=e.options,t=r.maxSize,i=function(n,a,o,s){var l=t-(t-n[Ir])/2;return(0,d.__assign)((0,d.__assign)({},s),{start:[a-.5,l],end:[a-.5,l+.05]})};return Os(i)(e),e}function pf(e){return _t(eF,rF,iF,nF)(e)}function aF(e){var r,t=e.chart,i=e.options,n=i.data,a=n===void 0?[]:n,o=i.yField;return t.data(a),t.scale((r={},r[o]={sync:!0},r)),e}function oF(e){var r=e.chart,t=e.options,i=t.data,n=t.xField,a=t.yField,o=t.color,s=t.compareField,l=t.isTransposed,u=t.tooltip,h=t.maxSize,f=t.minSize,v=t.label,g=t.funnelStyle,p=t.state,y=t.showFacetTitle;return r.facet("mirror",{fields:[s],transpose:!l,padding:l?0:[32,0,0,0],showTitle:y,eachView:function(m,x){var _=l?x.rowIndex:x.columnIndex;l||m.coordinate({type:"rect",actions:[["transpose"],["scale",_===0?-1:1,-1]]});var w=gf(x.data,i,{yField:a,maxSize:h,minSize:f});m.data(w);var b=He(u,[n,a,s]),S=b.fields,C=b.formatter,M=l?{offset:_===0?10:-23,position:_===0?"bottom":"top"}:{offset:10,position:"left",style:{textAlign:_===0?"end":"start"}};Pe({chart:m,options:{type:"interval",xField:n,yField:Ir,colorField:n,tooltipFields:(0,c.isArray)(S)&&S.concat([Lr,vr]),mapping:{shape:"funnel",tooltip:C,color:o,style:g},label:v===!1?!1:O({},M,v),state:p}})}}),e}function sF(e){var r=e.chart,t=e.options,i=t.conversionTag,n=t.isTransposed;return r.once("beforepaint",function(){r.views.forEach(function(a,o){var s=function(l,u,h,f){var v=o===0?-1:1;return O({},f,{start:[u-.5,l[Ir]],end:[u-.5,l[Ir]+.05],text:n?{style:{textAlign:"start"}}:{offsetX:i!==!1?v*i.offsetX:0,style:{textAlign:o===0?"end":"start"}}})};Os(s)(O({},{chart:a,options:t}))})}),e}function lF(e){return _t(aF,oF,sF)(e)}function uF(e){var r,t=e.chart,i=e.options,n=i.data,a=n===void 0?[]:n,o=i.yField;return t.data(a),t.scale((r={},r[o]={sync:!0},r)),e}function cF(e){var r=e.chart,t=e.options,i=t.seriesField,n=t.isTransposed,a=t.showFacetTitle;return r.facet("rect",{fields:[i],padding:[n?0:32,10,0,10],showTitle:a,eachView:function(o,s){pf(O({},e,{chart:o,options:{data:s.data}}))}}),e}function hF(e){return _t(uF,cF)(e)}function fF(e){var r=e.chart,t=e.options,i=t.data,n=i===void 0?[]:i,a=t.yField,o=(0,c.reduce)(n,function(u,h){return u+(h[a]||0)},0),s=(0,c.maxBy)(n,a)[a],l=(0,c.map)(n,function(u,h){var f=[],v=[];if(u[Is]=(u[a]||0)/o,h){var g=n[h-1][dn],p=n[h-1][gn];f[0]=g[3],v[0]=p[3],f[1]=g[2],v[1]=p[2]}else f[0]=-.5,v[0]=1,f[1]=.5,v[1]=1;return v[2]=v[1]-u[Is],f[2]=(v[2]+1)/4,v[3]=v[2],f[3]=-f[2],u[dn]=f,u[gn]=v,u[Lr]=(u[a]||0)/s,u[vr]=[(0,c.get)(n,[h-1,a]),u[a]],u});return r.data(l),e}function vF(e){var r=e.chart,t=e.options,i=t.xField,n=t.yField,a=t.color,o=t.tooltip,s=t.label,l=t.funnelStyle,u=t.state,h=He(o,[i,n]),f=h.fields,v=h.formatter;return Pe({chart:r,options:{type:"polygon",xField:dn,yField:gn,colorField:i,tooltipFields:(0,c.isArray)(f)&&f.concat([Lr,vr]),label:s,state:u,mapping:{tooltip:v,color:a,style:l}}}),e}function dF(e){var r=e.chart,t=e.options,i=t.isTransposed;return r.coordinate({type:"rect",actions:i?[["transpose"],["reflect","x"]]:[]}),e}function gF(e){var r=function(t,i,n,a){return(0,d.__assign)((0,d.__assign)({},a),{start:[t[dn][1],t[gn][1]],end:[t[dn][1]+.05,t[gn][1]]})};return Os(r)(e),e}function pF(e){return _t(fF,vF,dF,gF)(e)}function yF(e){var r=e.options,t=r.compareField,i=r.xField,n=r.yField,a=r.locale,o=r.funnelStyle,s=r.data,l=fa(a),u={label:t?{fields:[i,n,t,Lr,vr],formatter:function(f){return""+f[n]}}:{fields:[i,n,Lr,vr],offset:0,position:"middle",formatter:function(f){return f[i]+" "+f[n]}},tooltip:{title:i,formatter:function(f){return{name:f[i],value:f[n]}}},conversionTag:{formatter:function(f){return l.get(["conversionTag","label"])+": "+ch.apply(void 0,f[vr])}}},h;return(t||o)&&(h=function(f){return O({},t&&{lineWidth:1,stroke:"#fff"},(0,c.isFunction)(o)?o(f):o)}),O({options:u},e,{options:{funnelStyle:h,data:(0,c.clone)(s)}})}function mF(e){var r=e.options,t=r.compareField,i=r.dynamicHeight,n=r.seriesField;return n?hF(e):t?lF(e):i?pF(e):pf(e)}function xF(e){var r,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return _t(oe((r={},r[a]=i,r[o]=n,r)))(e)}function _F(e){var r=e.chart;return r.axis(!1),e}function wF(e){var r=e.chart,t=e.options,i=t.legend;return i===!1?r.legend(!1):r.legend(i),e}function yf(e){return _t(yF,mF,xF,_F,he,ee,wF,Kt,Wt,ae())(e)}var bF=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="funnel",t}return r.getDefaultOptions=function(){return tF},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return yf},r.prototype.setState=function(t,i,n){n===void 0&&(n=!0);var a=nn(this.chart);(0,c.each)(a,function(o){i(o.getData())&&o.setState(t,n)})},r.prototype.getStates=function(){var t=nn(this.chart),i=[];return(0,c.each)(t,function(n){var a=n.getData(),o=n.getStates();(0,c.each)(o,function(s){i.push({data:a,state:s,geometry:n.geometry,element:n})})}),i},r.CONVERSATION_FIELD=vr,r.PERCENT_FIELD=Lr,r.TOTAL_PERCENT_FIELD=Is,r}(Mt),SF="liquid";function mf(e){return[{percent:e,type:SF}]}function CF(e){var r=e.chart,t=e.options,i=t.percent,n=t.liquidStyle,a=t.radius,o=t.outline,s=t.wave,l=t.shape,u=t.animation;r.scale({percent:{min:0,max:1}}),r.data(mf(i));var h=t.color||r.getTheme().defaultColor,f=O({},e,{options:{xField:"type",yField:"percent",widthRatio:a,interval:{color:h,style:n,shape:"liquid-fill-gauge"}}}),v=Ce(f).ext,g=v.geometry,p=r.getTheme().background,y={radius:a,outline:o,wave:s,shape:l,background:p,animation:u};return g.customInfo(y),r.legend(!1),r.axis(!1),r.tooltip(!1),e}function xf(e,r){var t=e.chart,i=e.options,n=i.statistic,a=i.percent,o=i.meta;t.getController("annotation").clear(!0);var s=(0,c.get)(o,["percent","formatter"])||function(u){return(u*100).toFixed(2)+"%"},l=n.content;return l&&(l=O({},l,{content:(0,c.isNil)(l.content)?s(a):l.content})),ua(t,{statistic:(0,d.__assign)((0,d.__assign)({},n),{content:l}),plotType:"liquid"},{percent:a}),r&&t.render(!0),e}function AF(e){return _t(Wt,Ne("liquidStyle"),CF,xf,oe({}),Kt,ee)(e)}var FF={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"},_f=5e3;function wf(e,r,t){return e+(r-e)*t}function EF(e){var r=(0,d.__assign)({opacity:1},e.style);return e.color&&!r.fill&&(r.fill=e.color),r}function MF(e){var r={fill:"#fff",fillOpacity:0,lineWidth:4},t=(0,c.mix)({},r,e.style);return e.color&&!t.stroke&&(t.stroke=e.color),(0,c.isNumber)(e.opacity)&&(t.opacity=t.strokeOpacity=e.opacity),t}function TF(e,r,t,i){return r===0?[[e+1/2*t/Math.PI/2,i/2],[e+1/2*t/Math.PI,i],[e+t/4,i]]:r===1?[[e+1/2*t/Math.PI/2*(Math.PI-2),i],[e+1/2*t/Math.PI/2*(Math.PI-1),i/2],[e+t/4,0]]:r===2?[[e+1/2*t/Math.PI/2,-i/2],[e+1/2*t/Math.PI,-i],[e+t/4,-i]]:[[e+1/2*t/Math.PI/2*(Math.PI-2),-i],[e+1/2*t/Math.PI/2*(Math.PI-1),-i/2],[e+t/4,0]]}function LF(e,r,t,i,n,a,o){for(var s=Math.ceil(2*e/t*4)*4,l=[],u=i;u<-Math.PI*2;)u+=Math.PI*2;for(;u>0;)u-=Math.PI*2;u=u/Math.PI/2*t;var h=a-e+u-e*2;l.push(["M",h,r]);for(var f=0,v=0;v<s;++v){var g=v%4,p=TF(v*t/4,g,t,n);l.push(["C",p[0][0]+h,-p[0][1]+r,p[1][0]+h,-p[1][1]+r,p[2][0]+h,-p[2][1]+r]),v===s-1&&(f=p[2][0])}return l.push(["L",f+h,o+e]),l.push(["L",h,o+e]),l.push(["Z"]),l}function IF(e,r,t,i,n,a,o,s,l,u){for(var h=n.fill,f=n.opacity,v=o.getBBox(),g=v.maxX-v.minX,p=v.maxY-v.minY,y=0;y<i;y++){var m=i<=1?0:y/(i-1),x=a.addShape("path",{name:"waterwave-path",attrs:{path:LF(s,v.minY+p*t,l,0,g/32,e,r),fill:h,opacity:wf(.2,.9,m)*f}});try{if(u===!1)return;var _=gs([["t",l,0]]);x.stopAnimate(),x.animate({matrix:_},{duration:wf(.5*_f,_f,m),repeat:!0})}catch(w){console.warn("off-screen group animate error!")}}}function OF(e,r,t,i){var n=t*2/3,a=Math.max(n,i),o=n/2,s=e,l=o+r-a/2,u=Math.asin(o/((a-o)*.85)),h=Math.sin(u)*o,f=Math.cos(u)*o,v=s-f,g=l+h,p=e,y=l+o/Math.sin(u);return`
  48. M `+v+" "+g+`
  49. A `+o+" "+o+" 0 1 1 "+(v+f*2)+" "+g+`
  50. Q `+p+" "+y+" "+e+" "+(r+a/2)+`
  51. Q `+p+" "+y+" "+v+" "+g+`
  52. Z
  53. `}function PF(e,r,t,i){var n=t/2,a=i/2;return`
  54. M `+e+" "+(r-a)+`
  55. a `+n+" "+a+" 0 1 0 0 "+a*2+`
  56. a `+n+" "+a+" 0 1 0 0 "+-a*2+`
  57. Z
  58. `}function DF(e,r,t,i){var n=i/2,a=t/2;return`
  59. M `+e+" "+(r-n)+`
  60. L `+(e+a)+" "+r+`
  61. L `+e+" "+(r+n)+`
  62. L `+(e-a)+" "+r+`
  63. Z
  64. `}function kF(e,r,t,i){var n=i/2,a=t/2;return`
  65. M `+e+" "+(r-n)+`
  66. L `+(e+a)+" "+(r+n)+`
  67. L `+(e-a)+" "+(r+n)+`
  68. Z
  69. `}function BF(e,r,t,i){var n=.618,a=i/2,o=t/2*n;return`
  70. M `+(e-o)+" "+(r-a)+`
  71. L `+(e+o)+" "+(r-a)+`
  72. L `+(e+o)+" "+(r+a)+`
  73. L `+(e-o)+" "+(r+a)+`
  74. Z
  75. `}var bf={pin:OF,circle:PF,diamond:DF,triangle:kF,rect:BF};jt("interval","liquid-fill-gauge",{draw:function(e,r){var t=.5,i=.5,n=e.customInfo,a=n,o=a.radius,s=a.shape,l=a.background,u=a.animation,h=n.outline,f=n.wave,v=h.border,g=h.distance,p=f.count,y=f.length,m=(0,c.reduce)(e.points,function(q,ft){return Math.min(q,ft.x)},Infinity),x=this.parsePoint({x:t,y:i}),_=this.parsePoint({x:m,y:i}),w=x.x-_.x,b=Math.min(w,_.y*o),S=EF(e),C=MF((0,c.mix)({},e,h)),M=b-v/2,L=typeof s=="function"?s:bf[s]||bf.circle,B=L(x.x,x.y,M*2,M*2),I=r.addGroup({name:"waves"}),G=I.setClip({type:"path",attrs:{path:B}});return IF(x.x,x.y,1-e.points[1].y,p,S,I,G,b*2,y,u),r.addShape("path",{name:"distance",attrs:{path:B,fill:"transparent",lineWidth:v+g*2,stroke:l==="transparent"?"#fff":l}}),r.addShape("path",{name:"wrap",attrs:(0,c.mix)(C,{path:B,fill:"transparent",lineWidth:v})}),r}});var IL=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="liquid",t}return r.getDefaultOptions=function(){return FF},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.changeData=function(t){this.chart.emit(A.BEFORE_CHANGE_DATA,ne.fromData(this.chart,A.BEFORE_CHANGE_DATA,null)),this.updateOption({percent:t}),this.chart.data(mf(t)),xf({chart:this.chart,options:this.options},!0),this.chart.emit(A.AFTER_CHANGE_DATA,ne.fromData(this.chart,A.AFTER_CHANGE_DATA,null))},r.prototype.getSchemaAdaptor=function(){return AF},r}(Mt);function Sf(e,r,t){return e.length>1?r+"_"+t:""+r}function Cf(e){var r=e.data,t=e.xField,i=e.measureField,n=e.rangeField,a=e.targetField,o=e.layout,s=[],l=[];r.forEach(function(f,v){var g=[f[n]].flat();g.sort(function(m,x){return m-x}),g.forEach(function(m,x){var _,w=x===0?m:g[x]-g[x-1];s.push((_={rKey:n+"_"+x},_[t]=t?f[t]:String(v),_[n]=w,_))});var p=[f[i]].flat();p.forEach(function(m,x){var _;s.push((_={mKey:Sf(p,i,x)},_[t]=t?f[t]:String(v),_[i]=m,_))});var y=[f[a]].flat();y.forEach(function(m,x){var _;s.push((_={tKey:Sf(y,a,x)},_[t]=t?f[t]:String(v),_[a]=m,_))}),l.push(f[n],f[i],f[a])});var u=Math.min.apply(Math,l.flat(Infinity)),h=Math.max.apply(Math,l.flat(Infinity));return u=u>0?0:u,o==="vertical"&&s.reverse(),{min:u,max:h,ds:s}}function RF(e){var r=e.chart,t=e.options,i=t.bulletStyle,n=t.targetField,a=t.rangeField,o=t.measureField,s=t.xField,l=t.color,u=t.layout,h=t.size,f=t.label,v=Cf(t),g=v.min,p=v.max,y=v.ds;r.data(y);var m=O({},e,{options:{xField:s,yField:a,seriesField:"rKey",isStack:!0,label:(0,c.get)(f,"range"),interval:{color:(0,c.get)(l,"range"),style:(0,c.get)(i,"range"),size:(0,c.get)(h,"range")}}});Ce(m),r.geometries[0].tooltip(!1);var x=O({},e,{options:{xField:s,yField:o,seriesField:"mKey",isStack:!0,label:(0,c.get)(f,"measure"),interval:{color:(0,c.get)(l,"measure"),style:(0,c.get)(i,"measure"),size:(0,c.get)(h,"measure")}}});Ce(x);var _=O({},e,{options:{xField:s,yField:n,seriesField:"tKey",label:(0,c.get)(f,"target"),point:{color:(0,c.get)(l,"target"),style:(0,c.get)(i,"target"),size:(0,c.isFunction)((0,c.get)(h,"target"))?function(w){return(0,c.get)(h,"target")(w)/2}:(0,c.get)(h,"target")/2,shape:u==="horizontal"?"line":"hyphen"}}});return ze(_),u==="horizontal"&&r.coordinate().transpose(),(0,d.__assign)((0,d.__assign)({},e),{ext:{data:{min:g,max:p}}})}function Af(e){var r,t,i=e.options,n=e.ext,a=i.xAxis,o=i.yAxis,s=i.targetField,l=i.rangeField,u=i.measureField,h=i.xField,f=n.data;return _t(oe((r={},r[h]=a,r[u]=o,r),(t={},t[u]={min:f==null?void 0:f.min,max:f==null?void 0:f.max,sync:!0},t[s]={sync:""+u},t[l]={sync:""+u},t)))(e)}function NF(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.measureField,s=t.rangeField,l=t.targetField;return r.axis(""+s,!1),r.axis(""+l,!1),i===!1?r.axis(""+a,!1):r.axis(""+a,i),n===!1?r.axis(""+o,!1):r.axis(""+o,n),e}function zF(e){var r=e.chart,t=e.options,i=t.legend;return r.removeInteraction("legend-filter"),r.legend(i),r.legend("rKey",!1),r.legend("mKey",!1),r.legend("tKey",!1),e}function VF(e){var r=e.chart,t=e.options,i=t.label,n=t.measureField,a=t.targetField,o=t.rangeField,s=r.geometries,l=s[0],u=s[1],h=s[2];return(0,c.get)(i,"range")?l.label(""+o,(0,d.__assign)({layout:[{type:"limit-in-plot"}]},ye(i.range))):l.label(!1),(0,c.get)(i,"measure")?u.label(""+n,(0,d.__assign)({layout:[{type:"limit-in-plot"}]},ye(i.measure))):u.label(!1),(0,c.get)(i,"target")?h.label(""+a,(0,d.__assign)({layout:[{type:"limit-in-plot"}]},ye(i.target))):h.label(!1),e}function GF(e){_t(RF,Af,NF,zF,Wt,VF,he,ee,Kt)(e)}var WF=O({},Mt.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}}),OL=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="bullet",t}return r.getDefaultOptions=function(){return WF},r.prototype.changeData=function(t){this.updateOption({data:t});var i=Cf(this.options),n=i.min,a=i.max,o=i.ds;Af({options:this.options,ext:{data:{min:n,max:a}},chart:this.chart}),this.chart.changeData(o)},r.prototype.getSchemaAdaptor=function(){return GF},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r}(Mt),Ff="nodeIndex",Ef="childNodeCount",Ps="nodeAncestor",Ds="Invalid field: it must be a string!";function ks(e,r){var t=e.field,i=e.fields;if((0,c.isString)(t))return t;if((0,c.isArray)(t))return console.warn(Ds),t[0];if(console.warn(Ds+" will try to get fields instead."),(0,c.isString)(i))return i;if((0,c.isArray)(i)&&i.length)return i[0];if(r)return r;throw new TypeError(Ds)}function Bs(e){var r=[];if(e&&e.each){var t,i;e.each(function(n){var a,o;n.parent!==t?(t=n.parent,i=0):i+=1;var s=(0,c.filter)((((a=n.ancestors)===null||a===void 0?void 0:a.call(n))||[]).map(function(l){return r.find(function(u){return u.name===l.name})||l}),function(l){var u=l.depth;return u>0&&u<n.depth});n[Ps]=s,n[Ef]=((o=n.children)===null||o===void 0?void 0:o.length)||0,n[Ff]=i,r.push(n)})}else e&&e.eachNode&&e.eachNode(function(n){r.push(n)});return r}var Rs="ancestor-node",Mf="value",pn="path",HF=[pn,Ff,Ps,Ef,"name","depth","height"],YF=O({},Mt.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}}),Tf=4,XF=0,Lf=5,If="drilldown-bread-crumb",jF={position:"top-left",dividerText:"/",textStyle:{fontSize:12,fill:"rgba(0, 0, 0, 0.65)",cursor:"pointer"},activeTextStyle:{fill:"#87B5FF"}},yn="hierarchy-data-transform-params",UF=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.name="drill-down",t.historyCache=[],t.breadCrumbGroup=null,t.breadCrumbCfg=jF,t}return r.prototype.click=function(){var t=(0,c.get)(this.context,["event","data","data"]);if(!t)return!1;this.drill(t),this.drawBreadCrumb()},r.prototype.resetPosition=function(){if(!!this.breadCrumbGroup){var t=this.context.view.getCoordinate(),i=this.breadCrumbGroup,n=i.getBBox(),a=this.getButtonCfg().position,o={x:t.start.x,y:t.end.y-(n.height+Lf*2)};t.isPolar&&(o={x:0,y:0}),a==="bottom-left"&&(o={x:t.start.x,y:t.start.y});var s=Le.transform(null,[["t",o.x+XF,o.y+n.height+Lf]]);i.setMatrix(s)}},r.prototype.back=function(){(0,c.size)(this.historyCache)&&this.backTo(this.historyCache.slice(0,-1))},r.prototype.reset=function(){this.historyCache[0]&&this.backTo(this.historyCache.slice(0,1)),this.historyCache=[],this.hideCrumbGroup()},r.prototype.drill=function(t){var i=this.context.view,n=(0,c.get)(i,["interactions","drill-down","cfg","transformData"],function(u){return u}),a=n((0,d.__assign)({data:t.data},t[yn]));i.changeData(a);for(var o=[],s=t;s;){var l=s.data;o.unshift({id:l.name+"_"+s.height+"_"+s.depth,name:l.name,children:n((0,d.__assign)({data:l},t[yn]))}),s=s.parent}this.historyCache=(this.historyCache||[]).slice(0,-1).concat(o)},r.prototype.backTo=function(t){if(!(!t||t.length<=0)){var i=this.context.view,n=(0,c.last)(t).children;i.changeData(n),t.length>1?(this.historyCache=t,this.drawBreadCrumb()):(this.historyCache=[],this.hideCrumbGroup())}},r.prototype.getButtonCfg=function(){var t=this.context.view,i=(0,c.get)(t,["interactions","drill-down","cfg","drillDownConfig"]);return O(this.breadCrumbCfg,i==null?void 0:i.breadCrumb,this.cfg)},r.prototype.drawBreadCrumb=function(){this.drawBreadCrumbGroup(),this.resetPosition(),this.breadCrumbGroup.show()},r.prototype.drawBreadCrumbGroup=function(){var t=this,i=this.getButtonCfg(),n=this.historyCache;this.breadCrumbGroup?this.breadCrumbGroup.clear():this.breadCrumbGroup=this.context.view.foregroundGroup.addGroup({name:If});var a=0;n.forEach(function(o,s){var l=t.breadCrumbGroup.addShape({type:"text",id:o.id,name:If+"_"+o.name+"_text",attrs:(0,d.__assign)((0,d.__assign)({text:s===0&&!(0,c.isNil)(i.rootText)?i.rootText:o.name},i.textStyle),{x:a,y:0})}),u=l.getBBox();if(a+=u.width+Tf,l.on("click",function(v){var g,p=v.target.get("id");if(p!==((g=(0,c.last)(n))===null||g===void 0?void 0:g.id)){var y=n.slice(0,n.findIndex(function(m){return m.id===p})+1);t.backTo(y)}}),l.on("mouseenter",function(v){var g,p=v.target.get("id");p!==((g=(0,c.last)(n))===null||g===void 0?void 0:g.id)?l.attr(i.activeTextStyle):l.attr({cursor:"default"})}),l.on("mouseleave",function(){l.attr(i.textStyle)}),s<n.length-1){var h=t.breadCrumbGroup.addShape({type:"text",name:i.name+"_"+o.name+"_divider",attrs:(0,d.__assign)((0,d.__assign)({text:i.dividerText},i.textStyle),{x:a,y:0})}),f=h.getBBox();a+=f.width+Tf}})},r.prototype.hideCrumbGroup=function(){this.breadCrumbGroup&&this.breadCrumbGroup.hide()},r.prototype.destroy=function(){this.breadCrumbGroup&&this.breadCrumbGroup.remove(),e.prototype.destroy.call(this)},r}(ie);function Of(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function mn(e,r,t,i,n){for(var a=e.children,o,s=-1,l=a.length,u=e.value&&(i-r)/e.value;++s<l;)o=a[s],o.y0=t,o.y1=n,o.x0=r,o.x1=r+=o.value*u}function Pf(){var e=1,r=1,t=0,i=!1;function n(o){var s=o.height+1;return o.x0=o.y0=t,o.x1=e,o.y1=r/s,o.eachBefore(a(r,s)),i&&o.eachBefore(Of),o}function a(o,s){return function(l){l.children&&mn(l,l.x0,o*(l.depth+1)/s,l.x1,o*(l.depth+2)/s);var u=l.x0,h=l.y0,f=l.x1-t,v=l.y1-t;f<u&&(u=f=(u+f)/2),v<h&&(h=v=(h+v)/2),l.x0=u,l.y0=h,l.x1=f,l.y1=v}}return n.round=function(o){return arguments.length?(i=!!o,n):i},n.size=function(o){return arguments.length?(e=+o[0],r=+o[1],n):[e,r]},n.padding=function(o){return arguments.length?(t=+o,n):t},n}var ZF=F(32059);function KF(e){var r=0,t=e.children,i=t&&t.length;if(!i)r=1;else for(;--i>=0;)r+=t[i].value;e.value=r}function qF(){return this.eachAfter(KF)}var $F=F(64254);function Df(e,r){var t;if(typeof Symbol=="undefined"||e[Symbol.iterator]==null){if(Array.isArray(e)||(t=(0,$F.Z)(e))||r&&e&&typeof e.length=="number"){t&&(e=t);var i=0,n=function(){};return{s:n,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(u){throw u},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
  76. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){t=e[Symbol.iterator]()},n:function(){var u=t.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&t.return!=null&&t.return()}finally{if(o)throw s}}}}function QF(e,r){var t=-1,i=Df(this),n;try{for(i.s();!(n=i.n()).done;){var a=n.value;e.call(r,a,++t,this)}}catch(o){i.e(o)}finally{i.f()}return this}function JF(e,r){for(var t=this,i=[t],n,a,o=-1;t=i.pop();)if(e.call(r,t,++o,this),n=t.children)for(a=n.length-1;a>=0;--a)i.push(n[a]);return this}function tE(e,r){for(var t=this,i=[t],n=[],a,o,s,l=-1;t=i.pop();)if(n.push(t),a=t.children)for(o=0,s=a.length;o<s;++o)i.push(a[o]);for(;t=n.pop();)e.call(r,t,++l,this);return this}function eE(e,r){var t=-1,i=Df(this),n;try{for(i.s();!(n=i.n()).done;){var a=n.value;if(e.call(r,a,++t,this))return a}}catch(o){i.e(o)}finally{i.f()}}function rE(e){return this.eachAfter(function(r){for(var t=+e(r.data)||0,i=r.children,n=i&&i.length;--n>=0;)t+=i[n].value;r.value=t})}function iE(e){return this.eachBefore(function(r){r.children&&r.children.sort(e)})}function nE(e){for(var r=this,t=aE(r,e),i=[r];r!==t;)r=r.parent,i.push(r);for(var n=i.length;e!==t;)i.splice(n,0,e),e=e.parent;return i}function aE(e,r){if(e===r)return e;var t=e.ancestors(),i=r.ancestors(),n=null;for(e=t.pop(),r=i.pop();e===r;)n=e,e=t.pop(),r=i.pop();return n}function oE(){for(var e=this,r=[e];e=e.parent;)r.push(e);return r}function sE(){return Array.from(this)}function lE(){var e=[];return this.eachBefore(function(r){r.children||e.push(r)}),e}function uE(){var e=this,r=[];return e.each(function(t){t!==e&&r.push({source:t.parent,target:t})}),r}var cE=F(94043),kf=F.n(cE),hE=kf().mark(Bf);function Bf(){var e,r,t,i,n,a;return kf().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:e=this,t=[e];case 1:r=t.reverse(),t=[];case 2:if(!(e=r.pop())){s.next=8;break}return s.next=5,e;case 5:if(i=e.children)for(n=0,a=i.length;n<a;++n)t.push(i[n]);s.next=2;break;case 8:if(t.length){s.next=1;break}case 9:case"end":return s.stop()}},hE,this)}function bi(e,r){e instanceof Map?(e=[void 0,e],r===void 0&&(r=dE)):r===void 0&&(r=vE);for(var t=new Si(e),i,n=[t],a,o,s,l;i=n.pop();)if((o=r(i.data))&&(l=(o=Array.from(o)).length))for(i.children=o,s=l-1;s>=0;--s)n.push(a=o[s]=new Si(o[s])),a.parent=i,a.depth=i.depth+1;return t.eachBefore(Rf)}function fE(){return bi(this).eachBefore(gE)}function vE(e){return e.children}function dE(e){return Array.isArray(e)?e[1]:null}function gE(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Rf(e){var r=0;do e.height=r;while((e=e.parent)&&e.height<++r)}function Si(e){this.data=e,this.depth=this.height=0,this.parent=null}Si.prototype=bi.prototype=(0,ZF.Z)({constructor:Si,count:qF,each:QF,eachAfter:tE,eachBefore:JF,find:eE,sum:rE,sort:iE,path:nE,ancestors:oE,descendants:sE,leaves:lE,links:uE,copy:fE},Symbol.iterator,Bf);var pE={field:"value",size:[1,1],round:!1,padding:0,sort:function(e,r){return r.value-e.value},as:["x","y"],ignoreParentValue:!0};function yE(e,r){r=(0,c.assign)({},pE,r);var t=r.as;if(!(0,c.isArray)(t)||t.length!==2)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');var i;try{i=ks(r)}catch(l){console.warn(l)}var n=function(l){return Pf().size(r.size).round(r.round).padding(r.padding)(bi(l).sum(function(u){return(0,c.size)(u.children)?r.ignoreParentValue?0:u[i]-(0,c.reduce)(u.children,function(h,f){return h+f[i]},0):u[i]}).sort(r.sort))},a=n(e),o=t[0],s=t[1];return a.each(function(l){var u,h;l[o]=[l.x0,l.x1,l.x1,l.x0],l[s]=[l.y1,l.y1,l.y0,l.y0],l.name=l.name||((u=l.data)===null||u===void 0?void 0:u.name)||((h=l.data)===null||h===void 0?void 0:h.label),l.data.name=l.name,["x0","x1","y0","y1"].forEach(function(f){t.indexOf(f)===-1&&delete l[f]})}),Bs(a)}function mE(e,r){return e.parent===r.parent?1:2}function xE(e){return e.reduce(_E,0)/e.length}function _E(e,r){return e+r.x}function wE(e){return 1+e.reduce(bE,0)}function bE(e,r){return Math.max(e,r.y)}function SE(e){for(var r;r=e.children;)e=r[0];return e}function CE(e){for(var r;r=e.children;)e=r[r.length-1];return e}function AE(){var e=mE,r=1,t=1,i=!1;function n(a){var o,s=0;a.eachAfter(function(v){var g=v.children;g?(v.x=xE(g),v.y=wE(g)):(v.x=o?s+=e(v,o):0,v.y=0,o=v)});var l=SE(a),u=CE(a),h=l.x-e(l,u)/2,f=u.x+e(u,l)/2;return a.eachAfter(i?function(v){v.x=(v.x-a.x)*r,v.y=(a.y-v.y)*t}:function(v){v.x=(v.x-h)/(f-h)*r,v.y=(1-(a.y?v.y/a.y:1))*t})}return n.separation=function(a){return arguments.length?(e=a,n):e},n.size=function(a){return arguments.length?(i=!1,r=+a[0],t=+a[1],n):i?null:[r,t]},n.nodeSize=function(a){return arguments.length?(i=!0,r=+a[0],t=+a[1],n):i?[r,t]:null},n}function FE(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function EE(e){for(var r=e.length,t,i;r;)i=Math.random()*r--|0,t=e[r],e[r]=e[i],e[i]=t;return e}function Nf(e){for(var r=0,t=(e=EE(Array.from(e))).length,i=[],n,a;r<t;)n=e[r],a&&zf(a,n)?++r:(a=TE(i=ME(i,n)),r=0);return a}function ME(e,r){var t,i;if(Ns(r,e))return[r];for(t=0;t<e.length;++t)if(La(r,e[t])&&Ns(xn(e[t],r),e))return[e[t],r];for(t=0;t<e.length-1;++t)for(i=t+1;i<e.length;++i)if(La(xn(e[t],e[i]),r)&&La(xn(e[t],r),e[i])&&La(xn(e[i],r),e[t])&&Ns(Vf(e[t],e[i],r),e))return[e[t],e[i],r];throw new Error}function La(e,r){var t=e.r-r.r,i=r.x-e.x,n=r.y-e.y;return t<0||t*t<i*i+n*n}function zf(e,r){var t=e.r-r.r+Math.max(e.r,r.r,1)*1e-9,i=r.x-e.x,n=r.y-e.y;return t>0&&t*t>i*i+n*n}function Ns(e,r){for(var t=0;t<r.length;++t)if(!zf(e,r[t]))return!1;return!0}function TE(e){switch(e.length){case 1:return LE(e[0]);case 2:return xn(e[0],e[1]);case 3:return Vf(e[0],e[1],e[2])}}function LE(e){return{x:e.x,y:e.y,r:e.r}}function xn(e,r){var t=e.x,i=e.y,n=e.r,a=r.x,o=r.y,s=r.r,l=a-t,u=o-i,h=s-n,f=Math.sqrt(l*l+u*u);return{x:(t+a+l/f*h)/2,y:(i+o+u/f*h)/2,r:(f+n+s)/2}}function Vf(e,r,t){var i=e.x,n=e.y,a=e.r,o=r.x,s=r.y,l=r.r,u=t.x,h=t.y,f=t.r,v=i-o,g=i-u,p=n-s,y=n-h,m=l-a,x=f-a,_=i*i+n*n-a*a,w=_-o*o-s*s+l*l,b=_-u*u-h*h+f*f,S=g*p-v*y,C=(p*b-y*w)/(S*2)-i,M=(y*m-p*x)/S,L=(g*w-v*b)/(S*2)-n,B=(v*x-g*m)/S,I=M*M+B*B-1,G=2*(a+C*M+L*B),q=C*C+L*L-a*a,ft=-(I?(G+Math.sqrt(G*G-4*I*q))/(2*I):q/G);return{x:i+C+M*ft,y:n+L+B*ft,r:ft}}function Gf(e,r,t){var i=e.x-r.x,n,a,o=e.y-r.y,s,l,u=i*i+o*o;u?(a=r.r+t.r,a*=a,l=e.r+t.r,l*=l,a>l?(n=(u+l-a)/(2*u),s=Math.sqrt(Math.max(0,l/u-n*n)),t.x=e.x-n*i-s*o,t.y=e.y-n*o+s*i):(n=(u+a-l)/(2*u),s=Math.sqrt(Math.max(0,a/u-n*n)),t.x=r.x+n*i-s*o,t.y=r.y+n*o+s*i)):(t.x=r.x+t.r,t.y=r.y)}function Wf(e,r){var t=e.r+r.r-1e-6,i=r.x-e.x,n=r.y-e.y;return t>0&&t*t>i*i+n*n}function Hf(e){var r=e._,t=e.next._,i=r.r+t.r,n=(r.x*t.r+t.x*r.r)/i,a=(r.y*t.r+t.y*r.r)/i;return n*n+a*a}function Ia(e){this._=e,this.next=null,this.previous=null}function Yf(e){if(!(n=(e=FE(e)).length))return 0;var r,t,i,n,a,o,s,l,u,h,f;if(r=e[0],r.x=0,r.y=0,!(n>1))return r.r;if(t=e[1],r.x=-t.r,t.x=r.r,t.y=0,!(n>2))return r.r+t.r;Gf(t,r,i=e[2]),r=new Ia(r),t=new Ia(t),i=new Ia(i),r.next=i.previous=t,t.next=r.previous=i,i.next=t.previous=r;t:for(s=3;s<n;++s){Gf(r._,t._,i=e[s]),i=new Ia(i),l=t.next,u=r.previous,h=t._.r,f=r._.r;do if(h<=f){if(Wf(l._,i._)){t=l,r.next=t,t.previous=r,--s;continue t}h+=l._.r,l=l.next}else{if(Wf(u._,i._)){r=u,r.next=t,t.previous=r,--s;continue t}f+=u._.r,u=u.previous}while(l!==u.next);for(i.previous=r,i.next=t,r.next=t.previous=t=i,a=Hf(r);(i=i.next)!==t;)(o=Hf(i))<a&&(r=i,a=o);t=r.next}for(r=[t._],i=t;(i=i.next)!==t;)r.push(i._);for(i=Nf(r),s=0;s<n;++s)r=e[s],r.x-=i.x,r.y-=i.y;return i.r}function IE(e){return Yf(e),e}function OE(e){return e==null?null:Oa(e)}function Oa(e){if(typeof e!="function")throw new Error;return e}function Qr(){return 0}function Ci(e){return function(){return e}}function PE(e){return Math.sqrt(e.value)}function Xf(){var e=null,r=1,t=1,i=Qr;function n(a){return a.x=r/2,a.y=t/2,e?a.eachBefore(jf(e)).eachAfter(zs(i,.5)).eachBefore(Uf(1)):a.eachBefore(jf(PE)).eachAfter(zs(Qr,1)).eachAfter(zs(i,a.r/Math.min(r,t))).eachBefore(Uf(Math.min(r,t)/(2*a.r))),a}return n.radius=function(a){return arguments.length?(e=OE(a),n):e},n.size=function(a){return arguments.length?(r=+a[0],t=+a[1],n):[r,t]},n.padding=function(a){return arguments.length?(i=typeof a=="function"?a:Ci(+a),n):i},n}function jf(e){return function(r){r.children||(r.r=Math.max(0,+e(r)||0))}}function zs(e,r){return function(t){if(i=t.children){var i,n,a=i.length,o=e(t)*r||0,s;if(o)for(n=0;n<a;++n)i[n].r+=o;if(s=Yf(i),o)for(n=0;n<a;++n)i[n].r-=o;t.r=s+o}}}function Uf(e){return function(r){var t=r.parent;r.r*=e,t&&(r.x=t.x+e*r.x,r.y=t.y+e*r.y)}}var DE={depth:-1},Zf={};function kE(e){return e.id}function BE(e){return e.parentId}function RE(){var e=kE,r=BE;function t(i){var n=Array.from(i),a=n.length,o,s,l,u,h,f,v,g=new Map;for(s=0;s<a;++s)o=n[s],h=n[s]=new Si(o),(f=e(o,s,i))!=null&&(f+="")&&(v=h.id=f,g.set(v,g.has(v)?Zf:h)),(f=r(o,s,i))!=null&&(f+="")&&(h.parent=f);for(s=0;s<a;++s)if(h=n[s],f=h.parent){if(u=g.get(f),!u)throw new Error("missing: "+f);if(u===Zf)throw new Error("ambiguous: "+f);u.children?u.children.push(h):u.children=[h],h.parent=u}else{if(l)throw new Error("multiple roots");l=h}if(!l)throw new Error("no root");if(l.parent=DE,l.eachBefore(function(p){p.depth=p.parent.depth+1,--a}).eachBefore(Rf),l.parent=null,a>0)throw new Error("cycle");return l}return t.id=function(i){return arguments.length?(e=Oa(i),t):e},t.parentId=function(i){return arguments.length?(r=Oa(i),t):r},t}function NE(e,r){return e.parent===r.parent?1:2}function Vs(e){var r=e.children;return r?r[0]:e.t}function Gs(e){var r=e.children;return r?r[r.length-1]:e.t}function zE(e,r,t){var i=t/(r.i-e.i);r.c-=i,r.s+=t,e.c+=i,r.z+=t,r.m+=t}function VE(e){for(var r=0,t=0,i=e.children,n=i.length,a;--n>=0;)a=i[n],a.z+=r,a.m+=r,r+=a.s+(t+=a.c)}function GE(e,r,t){return e.a.parent===r.parent?e.a:t}function Pa(e,r){this._=e,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=r}Pa.prototype=Object.create(Si.prototype);function WE(e){for(var r=new Pa(e,0),t,i=[r],n,a,o,s;t=i.pop();)if(a=t._.children)for(t.children=new Array(s=a.length),o=s-1;o>=0;--o)i.push(n=t.children[o]=new Pa(a[o],o)),n.parent=t;return(r.parent=new Pa(null,0)).children=[r],r}function HE(){var e=NE,r=1,t=1,i=null;function n(u){var h=WE(u);if(h.eachAfter(a),h.parent.m=-h.z,h.eachBefore(o),i)u.eachBefore(l);else{var f=u,v=u,g=u;u.eachBefore(function(_){_.x<f.x&&(f=_),_.x>v.x&&(v=_),_.depth>g.depth&&(g=_)});var p=f===v?1:e(f,v)/2,y=p-f.x,m=r/(v.x+p+y),x=t/(g.depth||1);u.eachBefore(function(_){_.x=(_.x+y)*m,_.y=_.depth*x})}return u}function a(u){var h=u.children,f=u.parent.children,v=u.i?f[u.i-1]:null;if(h){VE(u);var g=(h[0].z+h[h.length-1].z)/2;v?(u.z=v.z+e(u._,v._),u.m=u.z-g):u.z=g}else v&&(u.z=v.z+e(u._,v._));u.parent.A=s(u,v,u.parent.A||f[0])}function o(u){u._.x=u.z+u.parent.m,u.m+=u.parent.m}function s(u,h,f){if(h){for(var v=u,g=u,p=h,y=v.parent.children[0],m=v.m,x=g.m,_=p.m,w=y.m,b;p=Gs(p),v=Vs(v),p&&v;)y=Vs(y),g=Gs(g),g.a=u,b=p.z+_-v.z-m+e(p._,v._),b>0&&(zE(GE(p,u,f),u,b),m+=b,x+=b),_+=p.m,m+=v.m,w+=y.m,x+=g.m;p&&!Gs(g)&&(g.t=p,g.m+=_-x),v&&!Vs(y)&&(y.t=v,y.m+=m-w,f=u)}return f}function l(u){u.x*=r,u.y=u.depth*t}return n.separation=function(u){return arguments.length?(e=u,n):e},n.size=function(u){return arguments.length?(i=!1,r=+u[0],t=+u[1],n):i?null:[r,t]},n.nodeSize=function(u){return arguments.length?(i=!0,r=+u[0],t=+u[1],n):i?[r,t]:null},n}function Da(e,r,t,i,n){for(var a=e.children,o,s=-1,l=a.length,u=e.value&&(n-t)/e.value;++s<l;)o=a[s],o.x0=r,o.x1=i,o.y0=t,o.y1=t+=o.value*u}var Kf=(1+Math.sqrt(5))/2;function qf(e,r,t,i,n,a){for(var o=[],s=r.children,l,u,h=0,f=0,v=s.length,g,p,y=r.value,m,x,_,w,b,S,C;h<v;){g=n-t,p=a-i;do m=s[f++].value;while(!m&&f<v);for(x=_=m,S=Math.max(p/g,g/p)/(y*e),C=m*m*S,b=Math.max(_/C,C/x);f<v;++f){if(m+=u=s[f].value,u<x&&(x=u),u>_&&(_=u),C=m*m*S,w=Math.max(_/C,C/x),w>b){m-=u;break}b=w}o.push(l={value:m,dice:g<p,children:s.slice(h,f)}),l.dice?mn(l,t,i,n,y?i+=p*m/y:a):Da(l,t,i,y?t+=g*m/y:n,a),y-=m,h=f}return o}var $f=function e(r){function t(i,n,a,o,s){qf(r,i,n,a,o,s)}return t.ratio=function(i){return e((i=+i)>1?i:1)},t}(Kf);function Qf(){var e=$f,r=!1,t=1,i=1,n=[0],a=Qr,o=Qr,s=Qr,l=Qr,u=Qr;function h(v){return v.x0=v.y0=0,v.x1=t,v.y1=i,v.eachBefore(f),n=[0],r&&v.eachBefore(Of),v}function f(v){var g=n[v.depth],p=v.x0+g,y=v.y0+g,m=v.x1-g,x=v.y1-g;m<p&&(p=m=(p+m)/2),x<y&&(y=x=(y+x)/2),v.x0=p,v.y0=y,v.x1=m,v.y1=x,v.children&&(g=n[v.depth+1]=a(v)/2,p+=u(v)-g,y+=o(v)-g,m-=s(v)-g,x-=l(v)-g,m<p&&(p=m=(p+m)/2),x<y&&(y=x=(y+x)/2),e(v,p,y,m,x))}return h.round=function(v){return arguments.length?(r=!!v,h):r},h.size=function(v){return arguments.length?(t=+v[0],i=+v[1],h):[t,i]},h.tile=function(v){return arguments.length?(e=Oa(v),h):e},h.padding=function(v){return arguments.length?h.paddingInner(v).paddingOuter(v):h.paddingInner()},h.paddingInner=function(v){return arguments.length?(a=typeof v=="function"?v:Ci(+v),h):a},h.paddingOuter=function(v){return arguments.length?h.paddingTop(v).paddingRight(v).paddingBottom(v).paddingLeft(v):h.paddingTop()},h.paddingTop=function(v){return arguments.length?(o=typeof v=="function"?v:Ci(+v),h):o},h.paddingRight=function(v){return arguments.length?(s=typeof v=="function"?v:Ci(+v),h):s},h.paddingBottom=function(v){return arguments.length?(l=typeof v=="function"?v:Ci(+v),h):l},h.paddingLeft=function(v){return arguments.length?(u=typeof v=="function"?v:Ci(+v),h):u},h}function YE(e,r,t,i,n){var a=e.children,o,s=a.length,l,u=new Array(s+1);for(u[0]=l=o=0;o<s;++o)u[o+1]=l+=a[o].value;h(0,s,e.value,r,t,i,n);function h(f,v,g,p,y,m,x){if(f>=v-1){var _=a[f];_.x0=p,_.y0=y,_.x1=m,_.y1=x;return}for(var w=u[f],b=g/2+w,S=f+1,C=v-1;S<C;){var M=S+C>>>1;u[M]<b?S=M+1:C=M}b-u[S-1]<u[S]-b&&f+1<S&&--S;var L=u[S]-w,B=g-L;if(m-p>x-y){var I=g?(p*B+m*L)/g:m;h(f,S,L,p,y,I,x),h(S,v,B,I,y,m,x)}else{var G=g?(y*B+x*L)/g:x;h(f,S,L,p,y,m,G),h(S,v,B,p,G,m,x)}}}function XE(e,r,t,i,n){(e.depth&1?Da:mn)(e,r,t,i,n)}var jE=function e(r){function t(i,n,a,o,s){if((l=i._squarify)&&l.ratio===r)for(var l,u,h,f,v=-1,g,p=l.length,y=i.value;++v<p;){for(u=l[v],h=u.children,f=u.value=0,g=h.length;f<g;++f)u.value+=h[f].value;u.dice?mn(u,n,a,o,y?a+=(s-a)*u.value/y:s):Da(u,n,a,y?n+=(o-n)*u.value/y:o,s),y-=u.value}else i._squarify=l=qf(r,i,n,a,o,s),l.ratio=r}return t.ratio=function(i){return e((i=+i)>1?i:1)},t}(Kf),UE={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(e,r){return r.value-e.value},ratio:.5*(1+Math.sqrt(5))};function ZE(e,r){return e==="treemapSquarify"?$[e].ratio(r):$[e]}function Jf(e,r){r=(0,c.assign)({},UE,r);var t=r.as;if(!(0,c.isArray)(t)||t.length!==2)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');var i;try{i=ks(r)}catch(u){console.warn(u)}var n=ZE(r.tile,r.ratio),a=function(u){return Qf().tile(n).size(r.size).round(r.round).padding(r.padding).paddingInner(r.paddingInner).paddingOuter(r.paddingOuter).paddingTop(r.paddingTop).paddingRight(r.paddingRight).paddingBottom(r.paddingBottom).paddingLeft(r.paddingLeft)(bi(u).sum(function(h){return r.ignoreParentValue&&h.children?0:h[i]}).sort(r.sort))},o=a(e),s=t[0],l=t[1];return o.each(function(u){u[s]=[u.x0,u.x1,u.x1,u.x0],u[l]=[u.y1,u.y1,u.y0,u.y0],["x0","x1","y0","y1"].forEach(function(h){t.indexOf(h)===-1&&delete u[h]})}),Bs(o)}function tv(e){var r=e.data,t=e.colorField,i=e.rawFields,n=e.hierarchyConfig,a=n===void 0?{}:n,o=a.activeDepth,s={partition:yE,treemap:Jf},l=e.seriesField,u=e.type||"partition",h=s[u](r,(0,d.__assign)((0,d.__assign)({field:l||"value"},(0,c.omit)(a,["activeDepth"])),{type:"hierarchy."+u,as:["x","y"]})),f=[];return h.forEach(function(v){var g,p,y,m,x,_;if(v.depth===0||o>0&&v.depth>o)return null;for(var w=v.data.name,b=(0,d.__assign)({},v);b.depth>1;)w=((p=b.parent.data)===null||p===void 0?void 0:p.name)+" / "+w,b=b.parent;var S=(0,d.__assign)((0,d.__assign)((0,d.__assign)({},Zt(v.data,(0,d.__spreadArrays)(i||[],[a.field]))),(g={},g[pn]=w,g[Rs]=b.data.name,g)),v);l&&(S[l]=v.data[l]||((m=(y=v.parent)===null||y===void 0?void 0:y.data)===null||m===void 0?void 0:m[l])),t&&(S[t]=v.data[t]||((_=(x=v.parent)===null||x===void 0?void 0:x.data)===null||_===void 0?void 0:_[t])),S.ext=a,S[yn]={hierarchyConfig:a,colorField:t,rawFields:i},f.push(S)}),f}function KE(e){var r=e.chart,t=e.options,i=t.color,n=t.colorField,a=n===void 0?Rs:n,o=t.sunburstStyle,s=t.rawFields,l=s===void 0?[]:s,u=tv(t);r.data(u);var h;return o&&(h=function(f){return O({},{fillOpacity:Math.pow(.85,f.depth)},(0,c.isFunction)(o)?o(f):o)}),pa(O({},e,{options:{xField:"x",yField:"y",seriesField:a,rawFields:(0,c.uniq)((0,d.__spreadArrays)(HF,l)),polygon:{color:i,style:h}}})),e}function qE(e){var r=e.chart;return r.axis(!1),e}function $E(e){var r=e.chart,t=e.options,i=t.label,n=Se(r,"polygon");if(!i)n.label(!1);else{var a=i.fields,o=a===void 0?["name"]:a,s=i.callback,l=(0,d.__rest)(i,["fields","callback"]);n.label({fields:o,callback:s,cfg:ye(l)})}return e}function QE(e){var r=e.chart,t=e.options,i=t.innerRadius,n=t.radius,a=t.reflect,o=r.coordinate({type:"polar",cfg:{innerRadius:i,radius:n}});return a&&o.reflect(a),e}function JE(e){var r,t=e.options,i=t.hierarchyConfig,n=t.meta;return _t(oe({},(r={},r[Mf]=(0,c.get)(n,(0,c.get)(i,["field"],"value")),r)))(e)}function tM(e){var r=e.chart,t=e.options,i=t.tooltip;if(i===!1)r.tooltip(!1);else{var n=i;(0,c.get)(i,"fields")||(n=O({},{customItems:function(a){return a.map(function(o){var s=(0,c.get)(r.getOptions(),"scales"),l=(0,c.get)(s,[pn,"formatter"],function(h){return h}),u=(0,c.get)(s,[Mf,"formatter"],function(h){return h});return(0,d.__assign)((0,d.__assign)({},o),{name:l(o.data[pn]),value:u(o.data.value)})})}},n)),r.tooltip(n)}return e}function eM(e){var r=e.drilldown,t=e.interactions,i=t===void 0?[]:t;return(r==null?void 0:r.enabled)?O({},e,{interactions:(0,d.__spreadArrays)(i,[{type:"drill-down",cfg:{drillDownConfig:r,transformData:tv}}])}):e}function rM(e){var r=e.chart,t=e.options,i=t.drilldown;return ee({chart:r,options:eM(t)}),(i==null?void 0:i.enabled)&&(r.appendPadding=ca(r.appendPadding,(0,c.get)(i,["breadCrumb","position"]))),e}function iM(e){return _t(Wt,Ne("sunburstStyle"),KE,qE,JE,Yr,QE,tM,$E,rM,Kt,ae())(e)}function ev(e){var r=(0,c.get)(e,["event","data","data"],{});return(0,c.isArray)(r.children)&&r.children.length>0}function rv(e){var r=e.view.getCoordinate(),t=r.innerRadius;if(t){var i=e.event,n=i.x,a=i.y,o=r.center,s=o.x,l=o.y,u=r.getRadius()*t,h=Math.sqrt(Math.pow(s-n,2)+Math.pow(l-a,2));return h<u}return!1}yt("drill-down-action",UF),Et("drill-down",{showEnable:[{trigger:"element:mouseenter",action:"cursor:pointer",isEnable:ev},{trigger:"element:mouseleave",action:"cursor:default"},{trigger:"element:mouseleave",action:"cursor:pointer",isEnable:rv}],start:[{trigger:"element:click",isEnable:ev,action:["drill-down-action:click"]},{trigger:"afterchangesize",action:["drill-down-action:resetPosition"]},{trigger:"click",isEnable:rv,action:["drill-down-action:back"]}]});var PL=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="sunburst",t}return r.getDefaultOptions=function(){return YF},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return iM},r.SUNBURST_ANCESTOR_FIELD=Rs,r.SUNBURST_PATH_FIELD=pn,r.NODE_ANCESTORS_FIELD=Ps,r}(Mt),ka,Ba="range",iv="type",dr="percent",nM="#f0f0f0",nv="indicator-view",av="range-view",aM={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:(ka={},ka[Ba]={sync:"v"},ka[dr]={sync:"v",tickCount:5,tickInterval:.2},ka),animation:!1};function oM(e,r){return e.map(function(t,i){var n;return n={},n[Ba]=t-(e[i-1]||0),n[iv]=""+i,n[dr]=r,n}).filter(function(t){return!!t[Ba]})}function ov(e){var r;return[(r={},r[dr]=(0,c.clamp)(e,0,1),r)]}function sv(e,r){var t=(0,c.get)(r,["ticks"],[]),i=(0,c.size)(t)?t:[0,(0,c.clamp)(e,0,1),1];return oM(i,e)}function sM(e){var r=e.chart,t=e.options,i=t.percent,n=t.range,a=t.radius,o=t.innerRadius,s=t.startAngle,l=t.endAngle,u=t.axis,h=t.indicator,f=t.gaugeStyle,v=t.type,g=t.meter,p=n.color,y=n.width;if(h){var m=ov(i),x=r.createView({id:nv});x.data(m),x.point().position(dr+"*1").shape(h.shape||"gauge-indicator").customInfo({defaultColor:r.getTheme().defaultColor,indicator:h}),x.coordinate("polar",{startAngle:s,endAngle:l,radius:o*a}),x.axis(dr,u),x.scale(dr,Zt(u,Oe))}var _=sv(i,t.range),w=r.createView({id:av});w.data(_);var b=(0,c.isString)(p)?[p,nM]:p,S=Ce({chart:w,options:{xField:"1",yField:Ba,seriesField:iv,rawFields:[dr],isStack:!0,interval:{color:b,style:f,shape:v==="meter"?"meter-gauge":null},args:{zIndexReversed:!0,sortZIndex:!0},minColumnWidth:y,maxColumnWidth:y}}).ext,C=S.geometry;return C.customInfo({meter:g}),w.coordinate("polar",{innerRadius:o,radius:a,startAngle:s,endAngle:l}).transpose(),e}function lM(e){var r;return _t(oe((r={range:{min:0,max:1,maxLimit:1,minLimit:0}},r[dr]={},r)))(e)}function lv(e,r){var t=e.chart,i=e.options,n=i.statistic,a=i.percent;if(t.getController("annotation").clear(!0),n){var o=n.content,s=void 0;o&&(s=O({},{content:(a*100).toFixed(2)+"%",style:{opacity:.75,fontSize:"30px",lineHeight:1,textAlign:"center",color:"rgba(44,53,66,0.85)"}},o)),yw(t,{statistic:(0,d.__assign)((0,d.__assign)({},n),{content:s})},{percent:a})}return r&&t.render(!0),e}function uM(e){var r=e.chart,t=e.options,i=t.tooltip;return i?r.tooltip(O({showTitle:!1,showMarkers:!1,containerTpl:'<div class="g2-tooltip"><div class="g2-tooltip-list"></div></div>',domStyles:{"g2-tooltip":{padding:"4px 8px",fontSize:"10px"}},customContent:function(n,a){var o=(0,c.get)(a,[0,"data",dr],0);return(o*100).toFixed(2)+"%"}},i)):r.tooltip(!1),e}function cM(e){var r=e.chart;return r.legend(!1),e}function uv(e){return _t(Wt,Kt,sM,lM,uM,lv,ee,ae(),cM)(e)}jt("point","gauge-indicator",{draw:function(e,r){var t=e.customInfo,i=t.indicator,n=t.defaultColor,a=i,o=a.pointer,s=a.pin,l=r.addGroup(),u=this.parsePoint({x:0,y:0});return o&&l.addShape("line",{name:"pointer",attrs:(0,d.__assign)({x1:u.x,y1:u.y,x2:e.x,y2:e.y,stroke:n},o.style)}),s&&l.addShape("circle",{name:"pin",attrs:(0,d.__assign)({x:u.x,y:u.y,stroke:n},s.style)}),l}}),jt("interval","meter-gauge",{draw:function(e,r){var t=e.customInfo.meter,i=t===void 0?{}:t,n=i.steps,a=n===void 0?50:n,o=i.stepRatio,s=o===void 0?.5:o;a=a<1?1:a,s=(0,c.clamp)(s,0,1);var l=this.coordinate,u=l.startAngle,h=l.endAngle,f=0;if(s>0&&s<1){var v=h-u;f=v/a/(s/(1-s)+1-1/a)}for(var g=f/(1-s)*s,p=r.addGroup(),y=this.coordinate.getCenter(),m=this.coordinate.getRadius(),x=Le.getAngle(e,this.coordinate),_=x.startAngle,w=x.endAngle,b=_;b<w;){var S=void 0,C=(b-u)%(g+f);C<g?S=b+(g-C):(b+=g+f-C,S=b+g);var M=Le.getSectorPath(y.x,y.y,m,b,Math.min(S,w),m*this.coordinate.innerRadius);p.addShape("path",{name:"meter-gauge",attrs:{path:M,fill:e.color,stroke:e.color,lineWidth:.5}}),b=S+f}return p}});var hM=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="gauge",t}return r.getDefaultOptions=function(){return aM},r.prototype.changeData=function(t){this.chart.emit(A.BEFORE_CHANGE_DATA,ne.fromData(this.chart,A.BEFORE_CHANGE_DATA,null)),this.updateOption({percent:t});var i=this.chart.views.find(function(a){return a.id===nv});i&&i.data(ov(t));var n=this.chart.views.find(function(a){return a.id===av});n&&n.data(sv(t,this.options.range)),lv({chart:this.chart,options:this.options},!0),this.chart.emit(A.AFTER_CHANGE_DATA,ne.fromData(this.chart,A.AFTER_CHANGE_DATA,null))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return uv},r}(Mt),Xe="$$yField$$",Ra="$$diffField$$",Ws="$$absoluteField$$",Hs="$$isTotal$$",fM={label:{},leaderLine:{style:{lineWidth:1,stroke:"#8c8c8c",lineDash:[4,2]}},total:{style:{fill:"rgba(0, 0, 0, 0.25)"}},interactions:[{type:"element-active"}],risingFill:"#f4664a",fallingFill:"#30bf78",waterfallStyle:{fill:"rgba(0, 0, 0, 0.25)"},yAxis:{grid:{line:{style:{lineDash:[4,2]}}}}};function vM(e,r,t,i,n){var a,o=[];if((0,c.reduce)(e,function(l,u){var h;cr(Ze.WARN,(0,c.isNumber)(u[t]),u[t]+" is not a valid number");var f=(0,c.isUndefined)(u[t])?null:u[t];return o.push((0,d.__assign)((0,d.__assign)({},u),(h={},h[i]=[l,l+f],h))),l+f},0),o.length&&n){var s=(0,c.get)(o,[[e.length-1],i,[1]]);o.push((a={},a[r]=n.label,a[t]=s,a[i]=[0,s],a))}return o}function cv(e,r,t,i){var n=vM(e,r,t,Xe,i);return n.map(function(a,o){var s;return(0,c.isObject)(a)?(0,d.__assign)((0,d.__assign)({},a),(s={},s[Ws]=a[Xe][1],s[Ra]=a[Xe][1]-a[Xe][0],s[Hs]=o===e.length,s)):a})}function dM(e){for(var r=[],t=0;t<e.length;t++){var i=e[t];if(i){var n=t===0?"M":"L";r.push([n,i.x,i.y])}}var a=e[0];return r.push(["L",a.x,a.y]),r.push(["z"]),r}function gM(e){return O({},e.defaultStyle,e.style,{fill:e.color})}jt("interval","waterfall",{draw:function(e,r){var t=e.customInfo,i=e.points,n=e.nextPoints,a=r.addGroup(),o=this.parsePath(dM(i)),s=gM(e);a.addShape("path",{attrs:(0,d.__assign)((0,d.__assign)({},s),{path:o})});var l=(0,c.get)(t,"leaderLine");if(l&&n){var u=[["M",i[2].x,i[2].y],["L",n[0].x,n[0].y]];i[2].y===n[1].y&&(u[1]=["L",n[1].x,n[1].y]),u=this.parsePath(u),a.addShape("path",{attrs:(0,d.__assign)({path:u},l.style||{})})}return a}});function pM(e){var r=e.options,t=r.locale,i=r.total,n=fa(t).get(["waterfall","total"]);return i&&typeof i.label!="string"&&n&&(e.options.total.label=n),e}function yM(e){var r=e.chart,t=e.options,i=t.data,n=t.xField,a=t.yField,o=t.total,s=t.leaderLine,l=t.columnWidthRatio,u=t.waterfallStyle,h=t.risingFill,f=t.fallingFill,v=t.color;r.data(cv(i,n,a,o));var g=v||function(x){return(0,c.get)(x,[Hs])?(0,c.get)(o,["style","fill"],""):(0,c.get)(x,[Xe,1])-(0,c.get)(x,[Xe,0])>0?h:f},p=O({},e,{options:{xField:n,yField:Xe,seriesField:n,rawFields:[a,Ra,Hs,Xe],widthRatio:l,interval:{style:u,shape:"waterfall",color:g}}}),y=Ce(p).ext,m=y.geometry;return m.customInfo({leaderLine:s}),e}function mM(e){var r,t,i=e.options,n=i.xAxis,a=i.yAxis,o=i.xField,s=i.yField,l=i.meta,u=O({},{alias:s},(0,c.get)(l,s));return _t(oe((r={},r[o]=n,r[s]=a,r[Xe]=a,r),O({},l,(t={},t[Xe]=u,t[Ra]=u,t[Ws]=u,t))))(e)}function xM(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return i===!1?r.axis(a,!1):r.axis(a,i),n===!1?(r.axis(o,!1),r.axis(Xe,!1)):(r.axis(o,n),r.axis(Xe,n)),e}function _M(e){var r=e.chart,t=e.options,i=t.legend,n=t.total,a=t.risingFill,o=t.fallingFill,s=t.locale,l=fa(s);if(i===!1)r.legend(!1);else{var u=[{name:l.get(["general","increase"]),value:"increase",marker:{symbol:"square",style:{r:5,fill:a}}},{name:l.get(["general","decrease"]),value:"decrease",marker:{symbol:"square",style:{r:5,fill:o}}}];n&&u.push({name:n.label||"",value:"total",marker:{symbol:"square",style:O({},{r:5},(0,c.get)(n,"style"))}}),r.legend(O({},{custom:!0,position:"top",items:u},i)),r.removeInteraction("legend-filter")}return e}function wM(e){var r=e.chart,t=e.options,i=t.label,n=t.labelMode,a=t.xField,o=Se(r,"interval");if(!i)o.label(!1);else{var s=i.callback,l=(0,d.__rest)(i,["callback"]);o.label({fields:n==="absolute"?[Ws,a]:[Ra,a],callback:s,cfg:ye(l)})}return e}function bM(e){var r=e.chart,t=e.options,i=t.tooltip,n=t.xField,a=t.yField;if(i!==!1){r.tooltip((0,d.__assign)({showCrosshairs:!1,showMarkers:!1,shared:!0,fields:[a]},i));var o=r.geometries[0];(i==null?void 0:i.formatter)?o.tooltip(n+"*"+a,i.formatter):o.tooltip(a)}else r.tooltip(!1);return e}function SM(e){return _t(pM,Wt,yM,mM,xM,_M,bM,wM,Tr,ee,Kt,ae())(e)}var DL=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="waterfall",t}return r.getDefaultOptions=function(){return fM},r.prototype.changeData=function(t){var i=this.options,n=i.xField,a=i.yField,o=i.total;this.updateOption({data:t}),this.chart.changeData(cv(t,n,a,o))},r.prototype.getSchemaAdaptor=function(){return SM},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r}(Mt);function CM(e,r,t){var i=t.map(function(o){return o[r]}).filter(function(o){return o!==void 0}),n=i.length>0?Math.max.apply(Math,i):0,a=Math.abs(e)%360;return a?n*360/a:n}function AM(e,r,t){var i=[];return e.forEach(function(n){var a=i.find(function(o){return o[r]===n[r]});a?a[t]+=n[t]||null:i.push((0,d.__assign)({},n))}),i}function FM(e){var r=e.chart,t=e.options,i=t.barStyle,n=t.color,a=t.tooltip,o=t.colorField,s=t.type,l=t.xField,u=t.yField,h=t.data,f=gi(h,u);r.data(f);var v=O({},e,{options:{tooltip:a,seriesField:o,interval:{style:i,color:n,shape:s==="line"?"line":"intervel"},minColumnWidth:t.minBarWidth,maxColumnWidth:t.maxBarWidth,columnBackground:t.barBackground}});return Ce(v),s==="line"&&ze({chart:r,options:{xField:l,yField:u,seriesField:o,point:{shape:"circle",color:n}}}),e}function hv(e){var r,t=e.options,i=t.yField,n=t.xField,a=t.data,o=t.isStack,s=t.isGroup,l=t.colorField,u=t.maxAngle,h=o&&!s&&l?AM(a,n,i):a,f=gi(h,i);return _t(oe((r={},r[i]={min:0,max:CM(u,i,f)},r)))(e)}function EM(e){var r=e.chart,t=e.options,i=t.radius,n=t.innerRadius,a=t.startAngle,o=t.endAngle;return r.coordinate({type:"polar",cfg:{radius:i,innerRadius:n,startAngle:a,endAngle:o}}).transpose(),e}function MM(e){var r=e.chart,t=e.options,i=t.xField,n=t.xAxis;return r.axis(i,n),e}function TM(e){var r=e.chart,t=e.options,i=t.label,n=t.yField,a=Se(r,"interval");if(!i)a.label(!1);else{var o=i.callback,s=(0,d.__rest)(i,["callback"]);a.label({fields:[n],callback:o,cfg:(0,d.__assign)((0,d.__assign)({},ye(s)),{type:"polar"})})}return e}function LM(e){return _t(Ne("barStyle"),FM,hv,MM,EM,ee,Kt,Wt,he,Yr,ae(),TM)(e)}var IM=O({},Mt.getDefaultOptions(),{interactions:[{type:"element-active"}],legend:!1,tooltip:{showMarkers:!1},xAxis:{grid:null,tickLine:null,line:null},maxAngle:240}),kL=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="radial-bar",t}return r.getDefaultOptions=function(){return IM},r.prototype.changeData=function(t){this.updateOption({data:t}),hv({chart:this.chart,options:this.options}),this.chart.changeData(t)},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return LM},r}(Mt),rr="first-axes-view",ir="second-axes-view",Jr="series-field-key";function fv(e,r,t,i,n){var a=[];r.forEach(function(f){i.forEach(function(v){var g,p=(g={},g[e]=v[e],g[t]=f,g[f]=v[f],g);a.push(p)})});var o=Object.values((0,c.groupBy)(a,t)),s=o[0],l=s===void 0?[]:s,u=o[1],h=u===void 0?[]:u;return n?[l.reverse(),h.reverse()]:[l,h]}function gr(e){return e!=="vertical"}function OM(e,r,t){var i=r[0],n=r[1],a=i.autoPadding,o=n.autoPadding,s=e.__axisPosition,l=s.layout,u=s.position;if(gr(l)&&u==="top"&&(i.autoPadding=t.instance(a.top,0,a.bottom,a.left),n.autoPadding=t.instance(o.top,a.left,o.bottom,0)),gr(l)&&u==="bottom"&&(i.autoPadding=t.instance(a.top,a.right/2+5,a.bottom,a.left),n.autoPadding=t.instance(o.top,o.right,o.bottom,a.right/2+5)),!gr(l)&&u==="bottom"){var h=a.left>=o.left?a.left:o.left;i.autoPadding=t.instance(a.top,a.right,a.bottom/2+5,h),n.autoPadding=t.instance(a.bottom/2+5,o.right,o.bottom,h)}if(!gr(l)&&u==="top"){var h=a.left>=o.left?a.left:o.left;i.autoPadding=t.instance(a.top,a.right,0,h),n.autoPadding=t.instance(0,o.right,a.top,h)}}function PM(e){var r=e.chart,t=e.options,i=t.data,n=t.xField,a=t.yField,o=t.color,s=t.barStyle,l=t.widthRatio,u=t.legend,h=t.layout,f=fv(n,a,Jr,i,gr(h));u?r.legend(Jr,u):u===!1&&r.legend(!1);var v,g,p=f[0],y=f[1];gr(h)?(v=r.createView({region:{start:{x:0,y:0},end:{x:.5,y:1}},id:rr}),v.coordinate().transpose().reflect("x"),g=r.createView({region:{start:{x:.5,y:0},end:{x:1,y:1}},id:ir}),g.coordinate().transpose(),v.data(p),g.data(y)):(v=r.createView({region:{start:{x:0,y:0},end:{x:1,y:.5}},id:rr}),g=r.createView({region:{start:{x:0,y:.5},end:{x:1,y:1}},id:ir}),g.coordinate().reflect("y"),v.data(p),g.data(y));var m=O({},e,{chart:v,options:{widthRatio:l,xField:n,yField:a[0],seriesField:Jr,interval:{color:o,style:s}}});Ce(m);var x=O({},e,{chart:g,options:{xField:n,yField:a[1],seriesField:Jr,widthRatio:l,interval:{color:o,style:s}}});return Ce(x),e}function DM(e){var r,t,i,n=e.options,a=e.chart,o=n.xAxis,s=n.yAxis,l=n.xField,u=n.yField,h=Ot(a,rr),f=Ot(a,ir),v={};return(0,c.keys)((n==null?void 0:n.meta)||{}).map(function(g){(0,c.get)(n==null?void 0:n.meta,[g,"alias"])&&(v[g]=n.meta[g].alias)}),a.scale((r={},r[Jr]={sync:!0,formatter:function(g){return(0,c.get)(v,g,g)}},r)),oe((t={},t[l]=o,t[u[0]]=s[u[0]],t))(O({},e,{chart:h})),oe((i={},i[l]=o,i[u[1]]=s[u[1]],i))(O({},e,{chart:f})),e}function kM(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField,s=t.layout,l=Ot(r,rr),u=Ot(r,ir);return(i==null?void 0:i.position)==="bottom"?u.axis(a,(0,d.__assign)((0,d.__assign)({},i),{label:{formatter:function(){return""}}})):u.axis(a,!1),i===!1?l.axis(a,!1):l.axis(a,(0,d.__assign)({position:gr(s)?"top":"bottom"},i)),n===!1?(l.axis(o[0],!1),u.axis(o[1],!1)):(l.axis(o[0],n[o[0]]),u.axis(o[1],n[o[1]])),r.__axisPosition={position:l.getOptions().axes[a].position,layout:s},e}function BM(e){var r=e.chart;return ee(O({},e,{chart:Ot(r,rr)})),ee(O({},e,{chart:Ot(r,ir)})),e}function RM(e){var r=e.chart,t=e.options,i=t.yField,n=t.yAxis;return Xr(O({},e,{chart:Ot(r,rr),options:{yAxis:n[i[0]]}})),Xr(O({},e,{chart:Ot(r,ir),options:{yAxis:n[i[1]]}})),e}function NM(e){var r=e.chart;return Wt(O({},e,{chart:Ot(r,rr)})),Wt(O({},e,{chart:Ot(r,ir)})),Wt(e),e}function zM(e){var r=e.chart;return Kt(O({},e,{chart:Ot(r,rr)})),Kt(O({},e,{chart:Ot(r,ir)})),e}function VM(e){var r=this,t,i,n=e.chart,a=e.options,o=a.label,s=a.yField,l=a.layout,u=Ot(n,rr),h=Ot(n,ir),f=Se(u,"interval"),v=Se(h,"interval");if(!o)f.label(!1),v.label(!1);else{var g=o.callback,p=(0,d.__rest)(o,["callback"]);p.position||(p.position="middle"),p.offset===void 0&&(p.offset=2);var y=(0,d.__assign)({},p);if(gr(l)){var m=((t=y.style)===null||t===void 0?void 0:t.textAlign)||(p.position==="middle"?"center":"left");p.style=O({},p.style,{textAlign:m});var x={left:"right",right:"left",center:"center"};y.style=O({},y.style,{textAlign:x[m]})}else{var _={top:"bottom",bottom:"top",middle:"middle"};typeof p.position=="string"?p.position=_[p.position]:typeof p.position=="function"&&(p.position=function(){for(var S=[],C=0;C<arguments.length;C++)S[C]=arguments[C];return _[p.position.apply(r,S)]});var w=((i=y.style)===null||i===void 0?void 0:i.textBaseline)||"bottom";y.style=O({},y.style,{textBaseline:w});var b={top:"bottom",bottom:"top",middle:"middle"};p.style=O({},p.style,{textBaseline:b[w]})}f.label({fields:[s[0]],callback:g,cfg:ye(y)}),v.label({fields:[s[1]],callback:g,cfg:ye(p)})}return e}function GM(e){return _t(PM,DM,kM,RM,NM,VM,he,BM,zM)(e)}var BL=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="bidirectional-bar",t}return r.getDefaultOptions=function(){return O({},e.getDefaultOptions.call(this),{syncViewPadding:OM})},r.prototype.changeData=function(t){t===void 0&&(t=[]),this.chart.emit(A.BEFORE_CHANGE_DATA,ne.fromData(this.chart,A.BEFORE_CHANGE_DATA,null)),this.updateOption({data:t});var i=this.options,n=i.xField,a=i.yField,o=i.layout,s=fv(n,a,Jr,t,gr(o)),l=s[0],u=s[1],h=Ot(this.chart,rr),f=Ot(this.chart,ir);h.data(l),f.data(u),this.chart.render(!0),this.chart.emit(A.AFTER_CHANGE_DATA,ne.fromData(this.chart,A.AFTER_CHANGE_DATA,null))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return GM},r.SERIES_FIELD_KEY=Jr,r}(Mt);function vv(e,r){if(!!(0,c.isArray)(e))return e.find(function(t){return t.type===r})}function dv(e,r){var t=vv(e,r);return t&&t.enable!==!1}function Ys(e){var r=e.interactions,t=e.drilldown;return(0,c.get)(t,"enabled")||dv(r,"treemap-drill-down")}function WM(e){var r=e.interactions["drill-down"];if(!!r){var t=r.context.actions.find(function(i){return i.name==="drill-down-action"});t.reset()}}function Xs(e){var r=e.data,t=e.colorField,i=e.enableDrillDown,n=e.hierarchyConfig,a=Jf(r,(0,d.__assign)((0,d.__assign)({},n),{type:"hierarchy.treemap",field:"value",as:["x","y"]})),o=[];return a.forEach(function(s){if(s.depth===0||i&&s.depth!==1||!i&&s.children)return null;var l=s.ancestors().map(function(v){return{data:v.data,height:v.height,value:v.value}}),u=i&&(0,c.isArray)(r.path)?l.concat(r.path.slice(1)):l,h=Object.assign({},s.data,(0,d.__assign)({x:s.x,y:s.y,depth:s.depth,value:s.value,path:u},s));if(!s.data[t]&&s.parent){var f=s.ancestors().find(function(v){return v.data[t]});h[t]=f==null?void 0:f.data[t]}else h[t]=s.data[t];h[yn]={hierarchyConfig:n,colorField:t,enableDrillDown:i},o.push(h)}),o}function HM(e){var r=e.options,t=r.colorField;return O({options:{rawFields:["value"],tooltip:{fields:["name","value",t,"path"],formatter:function(i){return{name:i.name,value:i.value}}}}},e)}function YM(e){var r=e.chart,t=e.options,i=t.color,n=t.colorField,a=t.rectStyle,o=t.hierarchyConfig,s=t.rawFields,l=Xs({data:t.data,colorField:t.colorField,enableDrillDown:Ys(t),hierarchyConfig:o});return r.data(l),pa(O({},e,{options:{xField:"x",yField:"y",seriesField:n,rawFields:s,polygon:{color:i,style:a}}})),r.coordinate().reflect("y"),e}function XM(e){var r=e.chart;return r.axis(!1),e}function jM(e){var r=e.drilldown,t=e.interactions,i=t===void 0?[]:t,n=Ys(e);return n?O({},e,{interactions:(0,d.__spreadArrays)(i,[{type:"drill-down",cfg:{drillDownConfig:r,transformData:Xs}}])}):e}function UM(e){var r=e.chart,t=e.options,i=t.interactions,n=t.drilldown;ee({chart:r,options:jM(t)});var a=vv(i,"view-zoom");a&&(a.enable!==!1?r.getCanvas().on("mousewheel",function(s){s.preventDefault()}):r.getCanvas().off("mousewheel"));var o=Ys(t);return o&&(r.appendPadding=ca(r.appendPadding,(0,c.get)(n,["breadCrumb","position"]))),e}function ZM(e){return _t(HM,Wt,Ne("rectStyle"),YM,XM,Yr,he,UM,Kt,ae())(e)}var KM={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:"\u521D\u59CB",dividerText:"/",textStyle:{fontSize:12,fill:"rgba(0, 0, 0, 0.65)",cursor:"pointer"},activeTextStyle:{fill:"#87B5FF"}}}},RL=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="treemap",t}return r.getDefaultOptions=function(){return KM},r.prototype.changeData=function(t){var i=this.options,n=i.colorField,a=i.interactions,o=i.hierarchyConfig;this.updateOption({data:t});var s=Xs({data:t,colorField:n,enableDrillDown:dv(a,"treemap-drill-down"),hierarchyConfig:o});this.chart.changeData(s),WM(this.chart)},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return ZM},r}(Mt);function qM(e){return e.target.depth}function $M(e){return e.depth}function QM(e,r){return r-1-e.height}function js(e,r){return e.sourceLinks.length?e.depth:r-1}function JM(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?(0,c.minBy)(e.sourceLinks,qM)-1:0}function Na(e){return function(){return e}}function Us(e,r){for(var t=0,i=0;i<e.length;i++)t+=r(e[i]);return t}function Zs(e,r){for(var t=-Infinity,i=0;i<e.length;i++)t=Math.max(r(e[i]),t);return t}function t1(e,r){for(var t=Infinity,i=0;i<e.length;i++)t=Math.min(r(e[i]),t);return t}function gv(e,r){return za(e.source,r.source)||e.index-r.index}function pv(e,r){return za(e.target,r.target)||e.index-r.index}function za(e,r){return e.y0-r.y0}function Ks(e){return e.value}function e1(e){return e.index}function r1(e){return e.nodes}function i1(e){return e.links}function yv(e,r){var t=e.get(r);if(!t)throw new Error("missing: "+r);return t}function mv(e){for(var r=e.nodes,t=0,i=r;t<i.length;t++){for(var n=i[t],a=n.y0,o=a,s=0,l=n.sourceLinks;s<l.length;s++){var u=l[s];u.y0=a+u.width/2,a+=u.width}for(var h=0,f=n.targetLinks;h<f.length;h++){var u=f[h];u.y1=o+u.width/2,o+=u.width}}}function n1(){var e=0,r=0,t=1,i=1,n=24,a=8,o,s=e1,l=js,u,h,f,v=r1,g=i1,p=6;function y(H){var tt={nodes:v(H),links:g(H)};return m(tt),x(tt),_(tt),w(tt),C(tt),mv(tt),tt}y.update=function(H){return mv(H),H},y.nodeId=function(H){return arguments.length?(s=typeof H=="function"?H:Na(H),y):s},y.nodeAlign=function(H){return arguments.length?(l=typeof H=="function"?H:Na(H),y):l},y.nodeDepth=function(H){return arguments.length?(u=(typeof H=="function",H),y):u},y.nodeSort=function(H){return arguments.length?(h=H,y):h},y.nodeWidth=function(H){return arguments.length?(n=+H,y):n},y.nodePadding=function(H){return arguments.length?(a=o=+H,y):a},y.nodes=function(H){return arguments.length?(v=typeof H=="function"?H:Na(H),y):v},y.links=function(H){return arguments.length?(g=typeof H=="function"?H:Na(H),y):g},y.linkSort=function(H){return arguments.length?(f=H,y):f},y.size=function(H){return arguments.length?(e=r=0,t=+H[0],i=+H[1],y):[t-e,i-r]},y.extent=function(H){return arguments.length?(e=+H[0][0],t=+H[1][0],r=+H[0][1],i=+H[1][1],y):[[e,r],[t,i]]},y.iterations=function(H){return arguments.length?(p=+H,y):p};function m(H){var tt=H.nodes,ct=H.links;tt.forEach(function(Gt,qt){Gt.index=qt,Gt.sourceLinks=[],Gt.targetLinks=[]});var nt=new Map(tt.map(function(Gt){return[s(Gt),Gt]}));if(ct.forEach(function(Gt,qt){Gt.index=qt;var ue=Gt.source,ce=Gt.target;typeof ue!="object"&&(ue=Gt.source=yv(nt,ue)),typeof ce!="object"&&(ce=Gt.target=yv(nt,ce)),ue.sourceLinks.push(Gt),ce.targetLinks.push(Gt)}),f!=null)for(var lt=0,xt=tt;lt<xt.length;lt++){var Rt=xt[lt],Vt=Rt.sourceLinks,Tt=Rt.targetLinks;Vt.sort(f),Tt.sort(f)}}function x(H){for(var tt=H.nodes,ct=0,nt=tt;ct<nt.length;ct++){var lt=nt[ct];lt.value=lt.fixedValue===void 0?Math.max(Us(lt.sourceLinks,Ks),Us(lt.targetLinks,Ks)):lt.fixedValue}}function _(H){for(var tt=H.nodes,ct=tt.length,nt=new Set(tt),lt=new Set,xt=0;nt.size;){if(nt.forEach(function(Gt){Gt.depth=xt;for(var qt=0,ue=Gt.sourceLinks;qt<ue.length;qt++){var ce=ue[qt].target;lt.add(ce)}}),++xt>ct)throw new Error("circular link");nt=lt,lt=new Set}if(u)for(var Rt=Math.max(Zs(tt,function(Gt){return Gt.depth})+1,0),Vt=void 0,Tt=0;Tt<tt.length;Tt++)Vt=tt[Tt],Vt.depth=u.call(null,Vt,Rt)}function w(H){for(var tt=H.nodes,ct=tt.length,nt=new Set(tt),lt=new Set,xt=0;nt.size;){if(nt.forEach(function(Rt){Rt.height=xt;for(var Vt=0,Tt=Rt.targetLinks;Vt<Tt.length;Vt++){var Gt=Tt[Vt].source;lt.add(Gt)}}),++xt>ct)throw new Error("circular link");nt=lt,lt=new Set}}function b(H){for(var tt=H.nodes,ct=Math.max(Zs(tt,function(ce){return ce.depth})+1,0),nt=(t-e-n)/(ct-1),lt=new Array(ct).fill(0).map(function(){return[]}),xt=0,Rt=tt;xt<Rt.length;xt++){var Vt=Rt[xt],Tt=Math.max(0,Math.min(ct-1,Math.floor(l.call(null,Vt,ct))));Vt.layer=Tt,Vt.x0=e+Tt*nt,Vt.x1=Vt.x0+n,lt[Tt]?lt[Tt].push(Vt):lt[Tt]=[Vt]}if(h)for(var Gt=0,qt=lt;Gt<qt.length;Gt++){var ue=qt[Gt];ue.sort(h)}return lt}function S(H){for(var tt=t1(H,function(nr){return(i-r-(nr.length-1)*o)/Us(nr,Ks)}),ct=0,nt=H;ct<nt.length;ct++){for(var lt=nt[ct],xt=r,Rt=0,Vt=lt;Rt<Vt.length;Rt++){var Tt=Vt[Rt];Tt.y0=xt,Tt.y1=xt+Tt.value*tt,xt=Tt.y1+o;for(var Gt=0,qt=Tt.sourceLinks;Gt<qt.length;Gt++){var ue=qt[Gt];ue.width=ue.value*tt}}xt=(i-xt+o)/(lt.length+1);for(var ce=0;ce<lt.length;++ce){var Tt=lt[ce];Tt.y0+=xt*(ce+1),Tt.y1+=xt*(ce+1)}ft(lt)}}function C(H){var tt=b(H);o=Math.min(a,(i-r)/(Zs(tt,function(xt){return xt.length})-1)),S(tt);for(var ct=0;ct<p;++ct){var nt=Math.pow(.99,ct),lt=Math.max(1-nt,(ct+1)/p);L(tt,nt,lt),M(tt,nt,lt)}}function M(H,tt,ct){for(var nt=1,lt=H.length;nt<lt;++nt){for(var xt=H[nt],Rt=0,Vt=xt;Rt<Vt.length;Rt++){for(var Tt=Vt[Rt],Gt=0,qt=0,ue=0,ce=Tt.targetLinks;ue<ce.length;ue++){var nr=ce[ue],ti=nr.source,pr=nr.value,Fi=pr*(Tt.layer-ti.layer);Gt+=mt(ti,Tt)*Fi,qt+=Fi}if(qt>0){var Ei=(Gt/qt-Tt.y0)*tt;Tt.y0+=Ei,Tt.y1+=Ei,q(Tt)}}h===void 0&&xt.sort(za),xt.length&&B(xt,ct)}}function L(H,tt,ct){for(var nt=H.length,lt=nt-2;lt>=0;--lt){for(var xt=H[lt],Rt=0,Vt=xt;Rt<Vt.length;Rt++){for(var Tt=Vt[Rt],Gt=0,qt=0,ue=0,ce=Tt.sourceLinks;ue<ce.length;ue++){var nr=ce[ue],ti=nr.target,pr=nr.value,Fi=pr*(ti.layer-Tt.layer);Gt+=zt(Tt,ti)*Fi,qt+=Fi}if(qt>0){var Ei=(Gt/qt-Tt.y0)*tt;Tt.y0+=Ei,Tt.y1+=Ei,q(Tt)}}h===void 0&&xt.sort(za),xt.length&&B(xt,ct)}}function B(H,tt){var ct=H.length>>1,nt=H[ct];G(H,nt.y0-o,ct-1,tt),I(H,nt.y1+o,ct+1,tt),G(H,i,H.length-1,tt),I(H,r,0,tt)}function I(H,tt,ct,nt){for(;ct<H.length;++ct){var lt=H[ct],xt=(tt-lt.y0)*nt;xt>1e-6&&(lt.y0+=xt,lt.y1+=xt),tt=lt.y1+o}}function G(H,tt,ct,nt){for(;ct>=0;--ct){var lt=H[ct],xt=(lt.y1-tt)*nt;xt>1e-6&&(lt.y0-=xt,lt.y1-=xt),tt=lt.y0-o}}function q(H){var tt=H.sourceLinks,ct=H.targetLinks;if(f===void 0){for(var nt=0,lt=ct;nt<lt.length;nt++){var xt=lt[nt].source.sourceLinks;xt.sort(pv)}for(var Rt=0,Vt=tt;Rt<Vt.length;Rt++){var Tt=Vt[Rt].target.targetLinks;Tt.sort(gv)}}}function ft(H){if(f===void 0)for(var tt=0,ct=H;tt<ct.length;tt++){var nt=ct[tt],lt=nt.sourceLinks,xt=nt.targetLinks;lt.sort(pv),xt.sort(gv)}}function mt(H,tt){for(var ct=H.y0-(H.sourceLinks.length-1)*o/2,nt=0,lt=H.sourceLinks;nt<lt.length;nt++){var xt=lt[nt],Rt=xt.target,Vt=xt.width;if(Rt===tt)break;ct+=Vt+o}for(var Tt=0,Gt=tt.targetLinks;Tt<Gt.length;Tt++){var qt=Gt[Tt],Rt=qt.source,Vt=qt.width;if(Rt===H)break;ct-=Vt}return ct}function zt(H,tt){for(var ct=tt.y0-(tt.targetLinks.length-1)*o/2,nt=0,lt=tt.targetLinks;nt<lt.length;nt++){var xt=lt[nt],Rt=xt.source,Vt=xt.width;if(Rt===H)break;ct+=Vt+o}for(var Tt=0,Gt=H.sourceLinks;Tt<Gt.length;Tt++){var qt=Gt[Tt],Rt=qt.target,Vt=qt.width;if(Rt===tt)break;ct-=Vt}return ct}return y}var a1={left:$M,right:QM,center:JM,justify:js},o1={nodeId:function(e){return e.index},nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodeSort:void 0};function s1(e){var r=(0,c.isString)(e)?a1[e]:(0,c.isFunction)(e)?e:null;return r||js}function l1(e){return(0,c.assign)({},o1,e)}function u1(e,r){var t=l1(e),i=t.nodeId,n=t.nodeSort,a=t.nodeAlign,o=t.nodeWidth,s=t.nodePadding,l=t.nodeDepth,u=n1().nodeSort(n).nodeWidth(o).nodePadding(s).nodeDepth(l).nodeAlign(s1(a)).extent([[0,0],[1,1]]).nodeId(i),h=u(r),f=h.nodes.map(function(g){var p=g.x0,y=g.x1,m=g.y0,x=g.y1;return g.x=[p,y,y,p],g.y=[m,m,x,x],g}).filter(function(g){return g.name!==null}),v=h.links.map(function(g){var p=g.source,y=g.target,m=p.x1,x=y.x0;g.x=[m,m,x,x];var _=g.width/2;return g.y=[g.y0+_,g.y0-_,g.y1+_,g.y1-_],g}).filter(function(g){var p=g.source,y=g.target;return p.name!==null&&y.name!==null});return{nodes:f,links:v}}function c1(e,r,t){var i=[];return e.forEach(function(n){var a=n[r],o=n[t];i.includes(a)||i.push(a),i.includes(o)||i.push(o)}),i}function h1(e,r,t,i){var n={};return r.forEach(function(a){n[a]={},r.forEach(function(o){n[a][o]=0})}),e.forEach(function(a){n[a[t]][a[i]]=1}),n}function f1(e,r,t){if(!(0,c.isArray)(e))return[];var i=[],n=c1(e,r,t),a=h1(e,n,r,t),o={};n.forEach(function(l){o[l]=0});function s(l){o[l]=1,n.forEach(function(u){if(a[l][u]!=0)if(o[u]==1)i.push(l+"_"+u);else{if(o[u]==-1)return;s(u)}}),o[l]=-1}return n.forEach(function(l){o[l]!=-1&&s(l)}),i.length!==0&&console.warn("sankey data contains circle, "+i.length+" records removed.",i),e.filter(function(l){return i.findIndex(function(u){return u===l[r]+"_"+l[t]})<0})}function v1(e){return e==="node-link"}function d1(e,r,t){return Hr(e)?e/t:r}function g1(e,r,t){return Hr(e)?e/t:r}function xv(e,r,t){var i=e.dataType,n=e.data,a=e.sourceField,o=e.targetField,s=e.weightField,l=e.nodeAlign,u=e.nodeSort,h=e.nodePadding,f=e.nodePaddingRatio,v=e.nodeWidth,g=e.nodeWidthRatio,p=e.nodeDepth,y=e.rawFields,m=y===void 0?[]:y,x;v1(i)?x=n:x=Zc(f1(n,a,o),a,o,s,m);var _=u1({nodeAlign:l,nodePadding:g1(h,f,t),nodeWidth:d1(v,g,r),nodeSort:u,nodeDepth:p},x),w=_.nodes,b=_.links;return{nodes:w.map(function(S){return(0,d.__assign)((0,d.__assign)({},Zt(S,(0,d.__spreadArrays)(["x","y","name"],m))),{isNode:!0})}),edges:b.map(function(S){return(0,d.__assign)((0,d.__assign)({source:S.source.name,target:S.target.name,name:S.source.name||S.target.name},Zt(S,(0,d.__spreadArrays)(["x","y","value"],m))),{isNode:!1})})}}var _v="x",wv="y",bv="name",Va="nodes",Ga="edges";function p1(e){var r=e.options,t=r.rawFields,i=t===void 0?[]:t;return O({},{options:{tooltip:{fields:(0,c.uniq)((0,d.__spreadArrays)(["name","source","target","value","isNode"],i))},label:{fields:(0,c.uniq)((0,d.__spreadArrays)(["x","name"],i))}}},e)}function y1(e){var r=e.chart,t=e.options,i=t.color,n=t.nodeStyle,a=t.edgeStyle,o=t.label,s=t.tooltip,l=t.nodeState,u=t.edgeState;r.legend(!1),r.tooltip(s),r.axis(!1),r.coordinate().reflect("y");var h=xv(t,r.width,r.height),f=h.nodes,v=h.edges,g=r.createView({id:Ga});g.data(v),rh({chart:g,options:{xField:_v,yField:wv,seriesField:bv,edge:{color:i,style:a,shape:"arc"},tooltip:s,state:u}});var p=r.createView({id:Va});return p.data(f),pa({chart:p,options:{xField:_v,yField:wv,seriesField:bv,polygon:{color:i,style:n},label:o,tooltip:s,state:l}}),r.interaction("element-active"),r.scale({x:{sync:!0,nice:!0,min:0,max:1,minLimit:0,maxLimit:1},y:{sync:!0,nice:!0,min:0,max:1,minLimit:0,maxLimit:1},name:{sync:"color",type:"cat"}}),e}function m1(e){var r=e.chart,t=e.options,i=t.animation;typeof i=="boolean"?r.animate(i):r.animate(!0);var n=(0,d.__spreadArrays)(r.views[0].geometries,r.views[1].geometries);return n.forEach(function(a){a.animate(i)}),e}function x1(e){var r=e.chart,t=e.options,i=t.nodeDraggable,n="sankey-node-draggable";return i?r.interaction(n):r.removeInteraction(n),e}function _1(e){var r=e.chart,t=e.options,i=t.interactions,n=i===void 0?[]:i,a=[].concat(n,t.nodeInteractions||[]),o=[].concat(n,t.edgeInteractions||[]),s=Ot(r,Va),l=Ot(r,Ga);return a.forEach(function(u){(u==null?void 0:u.enable)===!1?s.removeInteraction(u.type):s.interaction(u.type,u.cfg||{})}),o.forEach(function(u){(u==null?void 0:u.enable)===!1?l.removeInteraction(u.type):l.interaction(u.type,u.cfg||{})}),e}function w1(e){return _t(p1,y1,_1,x1,m1,Wt)(e)}var b1=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.isDragging=!1,t}return r.prototype.isNodeElement=function(){var t=(0,c.get)(this.context,"event.target");if(t){var i=t.get("element");return i&&i.getModel().data.isNode}return!1},r.prototype.getNodeView=function(){return Ot(this.context.view,Va)},r.prototype.getEdgeView=function(){return Ot(this.context.view,Ga)},r.prototype.getCurrentDatumIdx=function(t){return this.getNodeView().geometries[0].elements.indexOf(t)},r.prototype.start=function(){if(this.isNodeElement()){this.prevPoint={x:(0,c.get)(this.context,"event.x"),y:(0,c.get)(this.context,"event.y")};var t=this.context.event.target.get("element"),i=this.getCurrentDatumIdx(t);if(i===-1)return;this.currentElementIdx=i,this.context.isDragging=!0,this.isDragging=!0,this.prevNodeAnimateCfg=this.getNodeView().getOptions().animate,this.prevEdgeAnimateCfg=this.getEdgeView().getOptions().animate,this.getNodeView().animate(!1),this.getEdgeView().animate(!1)}},r.prototype.translate=function(){if(this.isDragging){var t=this.context.view,i={x:(0,c.get)(this.context,"event.x"),y:(0,c.get)(this.context,"event.y")},n=i.x-this.prevPoint.x,a=i.y-this.prevPoint.y,o=this.getNodeView(),s=o.geometries[0].elements[this.currentElementIdx];if(s&&s.getModel()){var l=s.getModel().data,u=o.getOptions().data,h=o.getCoordinate(),f={x:n/h.getWidth(),y:a/h.getHeight()},v=(0,d.__assign)((0,d.__assign)({},l),{x:l.x.map(function(x){return x+=f.x}),y:l.y.map(function(x){return x+=f.y})}),g=(0,d.__spreadArrays)(u);g[this.currentElementIdx]=v,o.data(g);var p=l.name,y=this.getEdgeView(),m=y.getOptions().data;m.forEach(function(x){x.source===p&&(x.x[0]+=f.x,x.x[1]+=f.x,x.y[0]+=f.y,x.y[1]+=f.y),x.target===p&&(x.x[2]+=f.x,x.x[3]+=f.x,x.y[2]+=f.y,x.y[3]+=f.y)}),y.data(m),this.prevPoint=i,t.render(!0)}}},r.prototype.end=function(){this.isDragging=!1,this.context.isDragging=!1,this.prevPoint=null,this.currentElementIdx=null,this.getNodeView().animate(this.prevNodeAnimateCfg),this.getEdgeView().animate(this.prevEdgeAnimateCfg)},r}(ie);yt("sankey-node-drag",b1),Et("sankey-node-draggable",{showEnable:[{trigger:"polygon:mouseenter",action:"cursor:pointer"},{trigger:"polygon:mouseleave",action:"cursor:default"}],start:[{trigger:"polygon:mousedown",action:"sankey-node-drag:start"}],processing:[{trigger:"plot:mousemove",action:"sankey-node-drag:translate"},{isEnable:function(e){return e.isDragging},trigger:"plot:mousemove",action:"cursor:move"}],end:[{trigger:"plot:mouseup",action:"sankey-node-drag:end"}]});var NL=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="sankey",t}return r.getDefaultOptions=function(){return{appendPadding:8,syncViewPadding:!0,nodeStyle:{opacity:1,fillOpacity:1,lineWidth:1},edgeStyle:{opacity:.3,lineWidth:0},edgeState:{active:{style:{opacity:.8,lineWidth:0}}},label:{formatter:function(t){var i=t.name;return i},callback:function(t){var i=t[1]===1;return{style:{fill:"#545454",textAlign:i?"end":"start"},offsetX:i?-8:8}},layout:[{type:"hide-overlap"}]},tooltip:{showTitle:!1,showMarkers:!1,shared:!1,showContent:function(t){return!(0,c.get)(t,[0,"data","isNode"])},formatter:function(t){var i=t.source,n=t.target,a=t.value;return{name:i+" -> "+n,value:a}}},nodeWidthRatio:.008,nodePaddingRatio:.01,animation:{appear:{animation:"wave-in"},enter:{animation:"wave-in"}}}},r.prototype.changeData=function(t){this.updateOption({data:t});var i=xv(this.options,this.chart.width,this.chart.height),n=i.nodes,a=i.edges,o=Ot(this.chart,Va),s=Ot(this.chart,Ga);o.changeData(n),s.changeData(a)},r.prototype.getSchemaAdaptor=function(){return w1},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r}(Mt),S1={y:0,nodeWidthRatio:.05,weight:!1,nodePaddingRatio:.1,id:function(e){return e.id},source:function(e){return e.source},target:function(e){return e.target},sourceWeight:function(e){return e.value||1},targetWeight:function(e){return e.value||1},sortBy:null};function C1(e,r,t){(0,c.forIn)(e,function(i,n){i.inEdges=r.filter(function(a){return""+t.target(a)==""+n}),i.outEdges=r.filter(function(a){return""+t.source(a)==""+n}),i.edges=i.outEdges.concat(i.inEdges),i.frequency=i.edges.length,i.value=0,i.inEdges.forEach(function(a){i.value+=t.targetWeight(a)}),i.outEdges.forEach(function(a){i.value+=t.sourceWeight(a)})})}function A1(e,r){var t={weight:function(n,a){return a.value-n.value},frequency:function(n,a){return a.frequency-n.frequency},id:function(n,a){return(""+r.id(n)).localeCompare(""+r.id(a))}},i=t[r.sortBy];!i&&(0,c.isFunction)(r.sortBy)&&(i=r.sortBy),i&&e.sort(i)}function F1(e,r){var t=e.length;if(!t)throw new TypeError("Invalid nodes: it's empty!");if(r.weight){var i=r.nodePaddingRatio;if(i<0||i>=1)throw new TypeError("Invalid nodePaddingRatio: it must be in range [0, 1)!");var n=i/(2*t),a=r.nodeWidthRatio;if(a<=0||a>=1)throw new TypeError("Invalid nodeWidthRatio: it must be in range (0, 1)!");var o=0;e.forEach(function(l){o+=l.value}),e.forEach(function(l){l.weight=l.value/o,l.width=l.weight*(1-i),l.height=a}),e.forEach(function(l,u){for(var h=0,f=u-1;f>=0;f--)h+=e[f].width+2*n;var v=l.minX=n+h,g=l.maxX=l.minX+l.width,p=l.minY=r.y-a/2,y=l.maxY=p+a;l.x=[v,g,g,v],l.y=[p,p,y,y]})}else{var s=1/t;e.forEach(function(l,u){l.x=(u+.5)*s,l.y=r.y})}return e}function E1(e,r,t){if(t.weight){var i={};(0,c.forIn)(e,function(n,a){i[a]=n.value}),r.forEach(function(n){var a=t.source(n),o=t.target(n),s=e[a],l=e[o];if(s&&l){var u=i[a],h=t.sourceWeight(n),f=s.minX+(s.value-u)/s.value*s.width,v=f+h/s.value*s.width;i[a]-=h;var g=i[o],p=t.targetWeight(n),y=l.minX+(l.value-g)/l.value*l.width,m=y+p/l.value*l.width;i[o]-=p;var x=t.y;n.x=[f,v,y,m],n.y=[x,x,x,x],n.source=s,n.target=l}})}else r.forEach(function(n){var a=e[t.source(n)],o=e[t.target(n)];a&&o&&(n.x=[a.x,o.x],n.y=[a.y,o.y],n.source=a,n.target=o)});return r}function M1(e){return(0,c.assign)({},S1,e)}function T1(e,r){var t=M1(e),i={},n=r.nodes,a=r.links;n.forEach(function(l){var u=t.id(l);i[u]=l}),C1(i,a,t),A1(n,t);var o=F1(n,t),s=E1(i,a,t);return{nodes:o,links:s}}var Sv="x",Cv="y",Av="name",Fv="source",L1={nodeStyle:{opacity:1,fillOpacity:1,lineWidth:1},edgeStyle:{opacity:.5,lineWidth:2},label:{fields:["x","name"],callback:function(e,r){var t=(e[0]+e[1])/2,i=t>.5?-4:4;return{labelEmit:!0,style:{fill:"#8c8c8c"},offsetX:i,content:r}}},tooltip:{showTitle:!1,showMarkers:!1,fields:["source","target","value","isNode"],showContent:function(e){return!(0,c.get)(e,[0,"data","isNode"])},formatter:function(e){var r=e.source,t=e.target,i=e.value;return{name:r+" -> "+t,value:i}}},interactions:[{type:"element-active"}],weight:!0,nodePaddingRatio:.1,nodeWidthRatio:.05};function I1(e){var r=e.options,t=r.data,i=r.sourceField,n=r.targetField,a=r.weightField,o=r.nodePaddingRatio,s=r.nodeWidthRatio,l=r.rawFields,u=l===void 0?[]:l,h=Zc(t,i,n,a),f=T1({weight:!0,nodePaddingRatio:o,nodeWidthRatio:s},h),v=f.nodes,g=f.links,p=v.map(function(m){return(0,d.__assign)((0,d.__assign)({},Zt(m,(0,d.__spreadArrays)(["id","x","y","name"],u))),{isNode:!0})}),y=g.map(function(m){return(0,d.__assign)((0,d.__assign)({source:m.source.name,target:m.target.name,name:m.source.name||m.target.name},Zt(m,(0,d.__spreadArrays)(["x","y","value"],u))),{isNode:!1})});return(0,d.__assign)((0,d.__assign)({},e),{ext:(0,d.__assign)((0,d.__assign)({},e.ext),{chordData:{nodesData:p,edgesData:y}})})}function O1(e){var r,t=e.chart;return t.scale((r={x:{sync:!0,nice:!0},y:{sync:!0,nice:!0,max:1}},r[Av]={sync:"color"},r[Fv]={sync:"color"},r)),e}function P1(e){var r=e.chart;return r.axis(!1),e}function D1(e){var r=e.chart;return r.legend(!1),e}function k1(e){var r=e.chart,t=e.options,i=t.tooltip;return r.tooltip(i),e}function B1(e){var r=e.chart;return r.coordinate("polar").reflect("y"),e}function R1(e){var r=e.chart,t=e.options,i=e.ext.chordData.nodesData,n=t.nodeStyle,a=t.label,o=t.tooltip,s=r.createView();return s.data(i),pa({chart:s,options:{xField:Sv,yField:Cv,seriesField:Av,polygon:{style:n},label:a,tooltip:o}}),e}function N1(e){var r=e.chart,t=e.options,i=e.ext.chordData.edgesData,n=t.edgeStyle,a=t.tooltip,o=r.createView();o.data(i);var s={xField:Sv,yField:Cv,seriesField:Fv,edge:{style:n,shape:"arc"},tooltip:a};return rh({chart:o,options:s}),e}function z1(e){var r=e.chart,t=e.options,i=t.animation;return typeof i=="boolean"?r.animate(i):r.animate(!0),(0,c.each)(lw(r),function(n){n.animate(i)}),e}function V1(e){return _t(Wt,I1,B1,O1,P1,D1,k1,N1,R1,ee,Tr,z1)(e)}var zL=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="chord",t}return r.getDefaultOptions=function(){return L1},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return V1},r}(Mt),G1={field:"value",as:["x","y","r"],sort:function(e,r){return r.value-e.value}};function W1(e,r){r=(0,c.assign)({},G1,r);var t=r.as;if(!(0,c.isArray)(t)||t.length!==3)throw new TypeError('Invalid as: it must be an array with 3 strings (e.g. [ "x", "y", "r" ])!');var i;try{i=ks(r)}catch(u){console.warn(u)}var n=function(u){return Xf().size(r.size).padding(r.padding)(bi(u).sum(function(h){return h[i]}).sort(r.sort))},a=n(e),o=t[0],s=t[1],l=t[2];return a.each(function(u){u[o]=u.x,u[s]=u.y,u[l]=u.r}),Bs(a)}function Ev(e){var r=e.data,t=e.hierarchyConfig,i=e.rawFields,n=i===void 0?[]:i,a=e.enableDrillDown,o=W1(r,(0,d.__assign)((0,d.__assign)({},t),{field:"value",as:["x","y","r"]})),s=[];return o.forEach(function(l){for(var u,h=l.data.name,f=(0,d.__assign)({},l);f.depth>1;)h=((u=f.parent.data)===null||u===void 0?void 0:u.name)+" / "+h,f=f.parent;if(a&&l.depth>2)return null;var v=O({},l.data,(0,d.__assign)((0,d.__assign)((0,d.__assign)({},Zt(l.data,n)),{path:h}),l));v.ext=t,v[yn]={hierarchyConfig:t,rawFields:n,enableDrillDown:a},s.push(v)}),s}function Mv(e,r,t){var i=ss([e,r]),n=i[0],a=i[1],o=i[2],s=i[3],l=t.width,u=t.height,h=l-(s+a),f=u-(n+o),v=Math.min(h,f),g=(h-v)/2,p=(f-v)/2,y=n+p,m=a+g,x=o+p,_=s+g,w=[y,m,x,_],b=v<0?0:v;return{finalPadding:w,finalSize:b}}var H1=["x","y","r","name","value","path","depth"],Y1={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}};function X1(e){var r=e.chart,t=Math.min(r.viewBBox.width,r.viewBBox.height);return O({options:{size:function(i){var n=i.r;return n*t}}},e)}function j1(e){var r=e.options,t=e.chart,i=t.viewBBox,n=r.padding,a=r.appendPadding,o=r.drilldown,s=a;if(o==null?void 0:o.enabled){var l=ca(t.appendPadding,(0,c.get)(o,["breadCrumb","position"]));s=ss([l,a])}var u=Mv(n,s,i).finalPadding;return t.padding=u,t.appendPadding=0,e}function U1(e){var r=e.chart,t=e.options,i=r.padding,n=r.appendPadding,a=t.color,o=t.colorField,s=t.pointStyle,l=t.hierarchyConfig,u=t.sizeField,h=t.rawFields,f=h===void 0?[]:h,v=t.drilldown,g=Ev({data:t.data,hierarchyConfig:l,enableDrillDown:v==null?void 0:v.enabled,rawFields:f});r.data(g);var p=r.viewBBox,y=Mv(i,n,p).finalSize,m=function(x){var _=x.r;return _*y};return u&&(m=function(x){return x[u]*y}),ze(O({},e,{options:{xField:"x",yField:"y",seriesField:o,sizeField:u,rawFields:(0,d.__spreadArrays)(H1,f),point:{color:a,style:s,shape:"circle",size:m}}})),e}function Z1(e){return _t(oe({},{x:{min:0,max:1,minLimit:0,maxLimit:1,nice:!0},y:{min:0,max:1,minLimit:0,maxLimit:1,nice:!0}}))(e)}function K1(e){var r=e.chart,t=e.options,i=t.tooltip;if(i===!1)r.tooltip(!1);else{var n=i;(0,c.get)(i,"fields")||(n=O({},{customItems:function(a){return a.map(function(o){var s=(0,c.get)(r.getOptions(),"scales"),l=(0,c.get)(s,["name","formatter"],function(h){return h}),u=(0,c.get)(s,["value","formatter"],function(h){return h});return(0,d.__assign)((0,d.__assign)({},o),{name:l(o.data.name),value:u(o.data.value)})})}},n)),r.tooltip(n)}return e}function q1(e){var r=e.chart;return r.axis(!1),e}function $1(e){var r=e.drilldown,t=e.interactions,i=t===void 0?[]:t;return(r==null?void 0:r.enabled)?O({},e,{interactions:(0,d.__spreadArrays)(i,[{type:"drill-down",cfg:{drillDownConfig:r,transformData:Ev,enableDrillDown:!0}}])}):e}function Q1(e){var r=e.chart,t=e.options;return ee({chart:r,options:$1(t)}),e}function J1(e){return _t(Ne("pointStyle"),X1,j1,Wt,Z1,U1,q1,Yr,K1,Q1,Kt,ae())(e)}var VL=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="circle-packing",t}return r.getDefaultOptions=function(){return Y1},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return J1},r.prototype.triggerResize=function(){this.chart.destroyed||(this.chart.forceFit(),this.chart.clear(),this.execAdaptor(),this.chart.render(!0))},r}(Mt),GL=function(e){(0,d.__extends)(r,e);function r(t,i,n,a){var o=e.call(this,t,O({},a,i))||this;return o.type="g2-plot",o.defaultOptions=a,o.adaptor=n,o}return r.prototype.getDefaultOptions=function(){return this.defaultOptions},r.prototype.getSchemaAdaptor=function(){return this.adaptor},r}(Mt),tT={line:ah,pie:xh,column:xa,bar:dh,area:lh,gauge:uv,"tiny-line":kh,"tiny-column":Bh,"tiny-area":Dh,"ring-progress":Yh,progress:Wh,scatter:Fh,histogram:zh,funnel:yf,stock:df},eT={line:oh,pie:_h,column:vh,bar:gb,area:uh,gauge:hM,"tiny-line":rC,"tiny-column":oC,"tiny-area":lC,"ring-progress":wC,progress:mC,scatter:FS,histogram:gC,funnel:bF,stock:JA},rT={pie:{label:!1},column:{tooltip:{showMarkers:!1}},bar:{tooltip:{showMarkers:!1}}};function qs(e,r,t){var i=eT[e];if(!i){console.error("could not find "+e+" plot");return}var n=tT[e];n({chart:r,options:O({},i.getDefaultOptions(),(0,c.get)(rT,e,{}),t)})}function iT(e){var r=e.chart,t=e.options,i=t.views,n=t.legend;return(0,c.each)(i,function(a){var o=a.region,s=a.data,l=a.meta,u=a.axes,h=a.coordinate,f=a.interactions,v=a.annotations,g=a.tooltip,p=a.geometries,y=r.createView({region:o});y.data(s);var m={};u&&(0,c.each)(u,function(x,_){m[_]=Zt(x,Oe)}),m=O({},l,m),y.scale(m),u?(0,c.each)(u,function(x,_){y.axis(_,x)}):y.axis(!1),y.coordinate(h),(0,c.each)(p,function(x){var _=Pe({chart:y,options:x}).ext,w=x.adjust;w&&_.geometry.adjust(w)}),(0,c.each)(f,function(x){x.enable===!1?y.removeInteraction(x.type):y.interaction(x.type,x.cfg)}),(0,c.each)(v,function(x){y.annotation()[x.type]((0,d.__assign)({},x))}),typeof a.animation=="boolean"?y.animate(!1):(y.animate(!0),(0,c.each)(y.geometries,function(x){x.animate(a.animation)})),g&&(y.interaction("tooltip"),y.tooltip(g))}),n?(0,c.each)(n,function(a,o){r.legend(o,a)}):r.legend(!1),r.tooltip(t.tooltip),e}function nT(e){var r=e.chart,t=e.options,i=t.plots,n=t.data,a=n===void 0?[]:n;return(0,c.each)(i,function(o){var s=o.type,l=o.region,u=o.options,h=u===void 0?{}:u,f=o.top,v=h.tooltip;if(f){qs(s,r,(0,d.__assign)((0,d.__assign)({},h),{data:a}));return}var g=r.createView((0,d.__assign)({region:l},Zt(h,Qc)));v&&g.interaction("tooltip"),qs(s,g,(0,d.__assign)({data:a},h))}),e}function aT(e){var r=e.chart,t=e.options;return r.option("slider",t.slider),e}function oT(e){return _t(Kt,iT,nT,ee,Kt,Wt,he,aT,ae())(e)}function sT(e,r){var t=e.getModel(),i=t.data,n;return(0,c.isArray)(i)?n=i[0][r]:n=i[r],n}function lT(e){var r=la(e);(0,c.each)(r,function(t){t.hasState("active")&&t.setState("active",!1),t.hasState("selected")&&t.setState("selected",!1),t.hasState("inactive")&&t.setState("inactive",!1)})}var uT=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getAssociationItems=function(t,i){var n,a=this.context.event,o=i||{},s=o.linkField,l=o.dim,u=[];if((n=a.data)===null||n===void 0?void 0:n.data){var h=a.data.data;(0,c.each)(t,function(f){var v,g,p=s;if(l==="x"?p=f.getXScale().field:l==="y"?p=(v=f.getYScales().find(function(m){return m.field===p}))===null||v===void 0?void 0:v.field:p||(p=(g=f.getGroupScales()[0])===null||g===void 0?void 0:g.field),!!p){var y=(0,c.map)(la(f),function(m){var x=!1,_=!1,w=(0,c.isArray)(h)?(0,c.get)(h[0],p):(0,c.get)(h,p);return sT(m,p)===w?x=!0:_=!0,{element:m,view:f,active:x,inactive:_}});u.push.apply(u,y)}})}return u},r.prototype.showTooltip=function(t){var i=Gc(this.context.view),n=this.getAssociationItems(i,t);(0,c.each)(n,function(a){if(a.active){var o=a.element.shape.getCanvasBBox();a.view.showTooltip({x:o.minX+o.width/2,y:o.minY+o.height/2})}})},r.prototype.hideTooltip=function(){var t=Gc(this.context.view);(0,c.each)(t,function(i){i.hideTooltip()})},r.prototype.active=function(t){var i=an(this.context.view),n=this.getAssociationItems(i,t);(0,c.each)(n,function(a){var o=a.active,s=a.element;o&&s.setState("active",!0)})},r.prototype.selected=function(t){var i=an(this.context.view),n=this.getAssociationItems(i,t);(0,c.each)(n,function(a){var o=a.active,s=a.element;o&&s.setState("selected",!0)})},r.prototype.highlight=function(t){var i=an(this.context.view),n=this.getAssociationItems(i,t);(0,c.each)(n,function(a){var o=a.inactive,s=a.element;o&&s.setState("inactive",!0)})},r.prototype.reset=function(){var t=an(this.context.view);(0,c.each)(t,function(i){lT(i)})},r}(ie);yt("association",uT),Et("association-active",{start:[{trigger:"element:mouseenter",action:"association:active"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),Et("association-selected",{start:[{trigger:"element:mouseenter",action:"association:selected"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),Et("association-highlight",{start:[{trigger:"element:mouseenter",action:"association:highlight"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),Et("association-tooltip",{start:[{trigger:"element:mousemove",action:"association:showTooltip"}],end:[{trigger:"element:mouseleave",action:"association:hideTooltip"}]});var cT=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="mix",t}return r.prototype.getSchemaAdaptor=function(){return oT},r}(Mt);function hT(e,r){var t=r.data,i=r.coordinate,n=r.interactions,a=r.annotations,o=r.animation,s=r.tooltip,l=r.axes,u=r.meta,h=r.geometries;t&&e.data(t);var f={};l&&(0,c.each)(l,function(v,g){f[g]=Zt(v,Oe)}),f=O({},u,f),e.scale(f),i&&e.coordinate(i),l===!1?e.axis(!1):(0,c.each)(l,function(v,g){e.axis(g,v)}),(0,c.each)(h,function(v){var g=Pe({chart:e,options:v}).ext,p=v.adjust;p&&g.geometry.adjust(p)}),(0,c.each)(n,function(v){v.enable===!1?e.removeInteraction(v.type):e.interaction(v.type,v.cfg)}),(0,c.each)(a,function(v){e.annotation()[v.type]((0,d.__assign)({},v))}),typeof o=="boolean"?e.animate(!1):(e.animate(!0),(0,c.each)(e.geometries,function(v){v.animate(o)})),s?(e.interaction("tooltip"),e.tooltip(s)):s===!1&&e.removeInteraction("tooltip")}function fT(e){var r=e.chart,t=e.options,i=t.type,n=t.data,a=t.fields,o=t.eachView,s=(0,c.omit)(t,["type","data","fields","eachView","axes","meta","tooltip","coordinate","theme","legend","interactions","annotations"]);return r.data(n),r.facet(i,(0,d.__assign)((0,d.__assign)({},s),{fields:a,eachView:function(l,u){var h=o(l,u);if(h.geometries)hT(l,h);else{var f=h,v=f.options;v.tooltip&&l.interaction("tooltip"),qs(f.type,l,v)}}})),e}function vT(e){var r=e.chart,t=e.options,i=t.axes,n=t.meta,a=t.tooltip,o=t.coordinate,s=t.theme,l=t.legend,u=t.interactions,h=t.annotations,f={};return i&&(0,c.each)(i,function(v,g){f[g]=Zt(v,Oe)}),f=O({},n,f),r.scale(f),r.coordinate(o),i?(0,c.each)(i,function(v,g){r.axis(g,v)}):r.axis(!1),a?(r.interaction("tooltip"),r.tooltip(a)):a===!1&&r.removeInteraction("tooltip"),r.legend(l),s&&r.theme(s),(0,c.each)(u,function(v){v.enable===!1?r.removeInteraction(v.type):r.interaction(v.type,v.cfg)}),(0,c.each)(h,function(v){r.annotation()[v.type]((0,d.__assign)({},v))}),e}function dT(e){return _t(Wt,fT,vT)(e)}var gT={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)"}}},WL=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="area",t}return r.getDefaultOptions=function(){return gT},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return dT},r}(Mt),Ai;(function(e){e.DEV="DEV",e.BETA="BETA",e.STABLE="STABLE"})(Ai||(Ai={}));function pT(e,r){console.warn(e===Ai.DEV?"Plot '"+r+"' is in DEV stage, just give us issues.":e===Ai.BETA?"Plot '"+r+"' is in BETA stage, DO NOT use it in production env.":e===Ai.STABLE?"Plot '"+r+`' is in STABLE stage, import it by "import { `+r+` } from '@antv/g2plot'".`:"invalid Stage type.")}var HL=function(){function e(){}return Object.defineProperty(e,"MultiView",{get:function(){return pT(Ai.STABLE,"MultiView"),cT},enumerable:!1,configurable:!0}),e}(),YL="2.4.20";qc("en-US",_w),qc("zh-CN",ww);var XL={scale:oe,legend:Yr,tooltip:he,annotation:ae,interaction:ee,theme:Wt,animation:Kt}},80638:function(){},15746:function(Lt,it,F){"use strict";var R=F(21584);it.Z=R.Z},89032:function(Lt,it,F){"use strict";var R=F(38663),Q=F.n(R),gt=F(6999)},99134:function(Lt,it,F){"use strict";var R=F(67294),Q=(0,R.createContext)({});it.Z=Q},21584:function(Lt,it,F){"use strict";var R=F(96156),Q=F(22122),gt=F(90484),ht=F(94184),ot=F.n(ht),rt=F(67294),J=F(53124),$=F(99134),d=function(z,j){var A={};for(var D in z)Object.prototype.hasOwnProperty.call(z,D)&&j.indexOf(D)<0&&(A[D]=z[D]);if(z!=null&&typeof Object.getOwnPropertySymbols=="function")for(var V=0,D=Object.getOwnPropertySymbols(z);V<D.length;V++)j.indexOf(D[V])<0&&Object.prototype.propertyIsEnumerable.call(z,D[V])&&(A[D[V]]=z[D[V]]);return A};function c(z){return typeof z=="number"?"".concat(z," ").concat(z," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(z)?"0 0 ".concat(z):z}var Z=["xs","sm","md","lg","xl","xxl"],T=rt.forwardRef(function(z,j){var A,D=rt.useContext(J.E_),V=D.getPrefixCls,et=D.direction,at=rt.useContext($.Z),K=at.gutter,At=at.wrap,Ht=at.supportFlexGap,$t=z.prefixCls,Yt=z.span,re=z.order,bt=z.offset,E=z.push,k=z.pull,Y=z.className,W=z.children,N=z.flex,P=z.style,X=d(z,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),U=V("col",$t),st={};Z.forEach(function(Ft){var pt,ut={},Dt=z[Ft];typeof Dt=="number"?ut.span=Dt:(0,gt.Z)(Dt)==="object"&&(ut=Dt||{}),delete X[Ft],st=(0,Q.Z)((0,Q.Z)({},st),(pt={},(0,R.Z)(pt,"".concat(U,"-").concat(Ft,"-").concat(ut.span),ut.span!==void 0),(0,R.Z)(pt,"".concat(U,"-").concat(Ft,"-order-").concat(ut.order),ut.order||ut.order===0),(0,R.Z)(pt,"".concat(U,"-").concat(Ft,"-offset-").concat(ut.offset),ut.offset||ut.offset===0),(0,R.Z)(pt,"".concat(U,"-").concat(Ft,"-push-").concat(ut.push),ut.push||ut.push===0),(0,R.Z)(pt,"".concat(U,"-").concat(Ft,"-pull-").concat(ut.pull),ut.pull||ut.pull===0),(0,R.Z)(pt,"".concat(U,"-rtl"),et==="rtl"),pt))});var vt=ot()(U,(A={},(0,R.Z)(A,"".concat(U,"-").concat(Yt),Yt!==void 0),(0,R.Z)(A,"".concat(U,"-order-").concat(re),re),(0,R.Z)(A,"".concat(U,"-offset-").concat(bt),bt),(0,R.Z)(A,"".concat(U,"-push-").concat(E),E),(0,R.Z)(A,"".concat(U,"-pull-").concat(k),k),A),Y,st),dt={};if(K&&K[0]>0){var Pt=K[0]/2;dt.paddingLeft=Pt,dt.paddingRight=Pt}if(K&&K[1]>0&&!Ht){var St=K[1]/2;dt.paddingTop=St,dt.paddingBottom=St}return N&&(dt.flex=c(N),At===!1&&!dt.minWidth&&(dt.minWidth=0)),rt.createElement("div",(0,Q.Z)({},X,{style:(0,Q.Z)((0,Q.Z)({},dt),P),className:vt,ref:j}),W)});it.Z=T},92820:function(Lt,it,F){"use strict";var R=F(22122),Q=F(96156),gt=F(90484),ht=F(28481),ot=F(94184),rt=F.n(ot),J=F(67294),$=F(53124),d=F(98082),c=F(24308),Z=F(93355),T=F(99134),z=function(V,et){var at={};for(var K in V)Object.prototype.hasOwnProperty.call(V,K)&&et.indexOf(K)<0&&(at[K]=V[K]);if(V!=null&&typeof Object.getOwnPropertySymbols=="function")for(var At=0,K=Object.getOwnPropertySymbols(V);At<K.length;At++)et.indexOf(K[At])<0&&Object.prototype.propertyIsEnumerable.call(V,K[At])&&(at[K[At]]=V[K[At]]);return at},j=(0,Z.b)("top","middle","bottom","stretch"),A=(0,Z.b)("start","end","center","space-around","space-between","space-evenly"),D=J.forwardRef(function(V,et){var at,K=V.prefixCls,At=V.justify,Ht=V.align,$t=V.className,Yt=V.style,re=V.children,bt=V.gutter,E=bt===void 0?0:bt,k=V.wrap,Y=z(V,["prefixCls","justify","align","className","style","children","gutter","wrap"]),W=J.useContext($.E_),N=W.getPrefixCls,P=W.direction,X=J.useState({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0}),U=(0,ht.Z)(X,2),st=U[0],vt=U[1],dt=(0,d.Z)(),Pt=J.useRef(E);J.useEffect(function(){var fe=c.ZP.subscribe(function(ge){var xe=Pt.current||0;(!Array.isArray(xe)&&(0,gt.Z)(xe)==="object"||Array.isArray(xe)&&((0,gt.Z)(xe[0])==="object"||(0,gt.Z)(xe[1])==="object"))&&vt(ge)});return function(){return c.ZP.unsubscribe(fe)}},[]);var St=function(){var ge=[void 0,void 0],xe=Array.isArray(E)?E:[E,void 0];return xe.forEach(function(ve,De){if((0,gt.Z)(ve)==="object")for(var _e=0;_e<c.c4.length;_e++){var de=c.c4[_e];if(st[de]&&ve[de]!==void 0){ge[De]=ve[de];break}}else ge[De]=ve}),ge},Ft=N("row",K),pt=St(),ut=rt()(Ft,(at={},(0,Q.Z)(at,"".concat(Ft,"-no-wrap"),k===!1),(0,Q.Z)(at,"".concat(Ft,"-").concat(At),At),(0,Q.Z)(at,"".concat(Ft,"-").concat(Ht),Ht),(0,Q.Z)(at,"".concat(Ft,"-rtl"),P==="rtl"),at),$t),Dt={},It=pt[0]!=null&&pt[0]>0?pt[0]/-2:void 0,Ct=pt[1]!=null&&pt[1]>0?pt[1]/-2:void 0;if(It&&(Dt.marginLeft=It,Dt.marginRight=It),dt){var kt=(0,ht.Z)(pt,2);Dt.rowGap=kt[1]}else Ct&&(Dt.marginTop=Ct,Dt.marginBottom=Ct);var Nt=(0,ht.Z)(pt,2),Xt=Nt[0],Jt=Nt[1],me=J.useMemo(function(){return{gutter:[Xt,Jt],wrap:k,supportFlexGap:dt}},[Xt,Jt,k,dt]);return J.createElement(T.Z.Provider,{value:me},J.createElement("div",(0,R.Z)({},Y,{className:ut,style:(0,R.Z)((0,R.Z)({},Dt),Yt),ref:et}),re))});it.Z=D},6999:function(Lt,it,F){"use strict";var R=F(38663),Q=F.n(R),gt=F(80638),ht=F.n(gt)},71230:function(Lt,it,F){"use strict";var R=F(92820);it.Z=R.Z},13062:function(Lt,it,F){"use strict";var R=F(38663),Q=F.n(R),gt=F(6999)},56645:function(Lt,it){(function(F,R){R(it)})(this,function(F){"use strict";function R(E,k){return Q(E)||gt(E,k)||ht()}function Q(E){if(Array.isArray(E))return E}function gt(E,k){var Y=[],W=!0,N=!1,P=void 0;try{for(var X=E[Symbol.iterator](),U;!(W=(U=X.next()).done)&&(Y.push(U.value),!(k&&Y.length===k));W=!0);}catch(st){N=!0,P=st}finally{try{!W&&X.return!=null&&X.return()}finally{if(N)throw P}}return Y}function ht(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function ot(E,k,Y,W){E=E.filter(function(pt,ut){var Dt=k(pt,ut),It=Y(pt,ut);return Dt!=null&&isFinite(Dt)&&It!=null&&isFinite(It)}),W&&E.sort(function(pt,ut){return k(pt)-k(ut)});for(var N=E.length,P=new Float64Array(N),X=new Float64Array(N),U=0,st=0,vt,dt,Pt,St=0;St<N;)Pt=E[St],P[St]=vt=+k(Pt,St,E),X[St]=dt=+Y(Pt,St,E),++St,U+=(vt-U)/St,st+=(dt-st)/St;for(var Ft=0;Ft<N;++Ft)P[Ft]-=U,X[Ft]-=st;return[P,X,U,st]}function rt(E,k,Y,W){for(var N=0,P=0,X=E.length;P<X;P++){var U=E[P],st=+k(U,P,E),vt=+Y(U,P,E);st!=null&&isFinite(st)&&vt!=null&&isFinite(vt)&&W(st,vt,N++)}}function J(E,k,Y,W,N){var P=0,X=0;return rt(E,k,Y,function(U,st){var vt=st-N(U),dt=st-W;P+=vt*vt,X+=dt*dt}),1-P/X}function $(E){return Math.atan2(E[1][1]-E[0][1],E[1][0]-E[0][0])*180/Math.PI}function d(E){return[(E[0][0]+E[1][0])/2,(E[0][1]+E[1][1])/2]}function c(E,k,Y){for(var W=Math.log(k-E)*Math.LOG10E+1|0,N=1*Math.pow(10,-W/2-1),P=1e4,X=[st(E),st(k)],U=0;vt(X)&&U<P;);return X;function st(dt){return[dt,Y(dt)]}function vt(dt){U++;for(var Pt=dt.length,St=!1,Ft=0;Ft<Pt-1;Ft++){var pt=dt[Ft],ut=dt[Ft+1],Dt=d([pt,ut]),It=st(Dt[0]),Ct=$([pt,Dt]),kt=$([pt,It]),Nt=Math.abs(Ct-kt);Nt>N&&(dt.splice(Ft+1,0,It),St=!0)}return St}}function Z(E,k,Y,W){var N=W-E*E,P=Math.abs(N)<1e-24?0:(Y-E*k)/N,X=k-P*E;return[X,P]}function T(){var E=function(P){return P[0]},k=function(P){return P[1]},Y;function W(N){var P=0,X=0,U=0,st=0,vt=0,dt=0,Pt=Y?+Y[0]:Infinity,St=Y?+Y[1]:-Infinity;rt(N,E,k,function(kt,Nt){var Xt=Math.log(Nt),Jt=kt*Nt;++P,X+=(Nt-X)/P,st+=(Jt-st)/P,dt+=(kt*Jt-dt)/P,U+=(Nt*Xt-U)/P,vt+=(Jt*Xt-vt)/P,Y||(kt<Pt&&(Pt=kt),kt>St&&(St=kt))});var Ft=Z(st/X,U/X,vt/X,dt/X),pt=R(Ft,2),ut=pt[0],Dt=pt[1];ut=Math.exp(ut);var It=function(Nt){return ut*Math.exp(Dt*Nt)},Ct=c(Pt,St,It);return Ct.a=ut,Ct.b=Dt,Ct.predict=It,Ct.rSquared=J(N,E,k,X,It),Ct}return W.domain=function(N){return arguments.length?(Y=N,W):Y},W.x=function(N){return arguments.length?(E=N,W):E},W.y=function(N){return arguments.length?(k=N,W):k},W}function z(){var E=function(P){return P[0]},k=function(P){return P[1]},Y;function W(N){var P=0,X=0,U=0,st=0,vt=0,dt=Y?+Y[0]:Infinity,Pt=Y?+Y[1]:-Infinity;rt(N,E,k,function(Ct,kt){++P,X+=(Ct-X)/P,U+=(kt-U)/P,st+=(Ct*kt-st)/P,vt+=(Ct*Ct-vt)/P,Y||(Ct<dt&&(dt=Ct),Ct>Pt&&(Pt=Ct))});var St=Z(X,U,st,vt),Ft=R(St,2),pt=Ft[0],ut=Ft[1],Dt=function(kt){return ut*kt+pt},It=[[dt,Dt(dt)],[Pt,Dt(Pt)]];return It.a=ut,It.b=pt,It.predict=Dt,It.rSquared=J(N,E,k,U,Dt),It}return W.domain=function(N){return arguments.length?(Y=N,W):Y},W.x=function(N){return arguments.length?(E=N,W):E},W.y=function(N){return arguments.length?(k=N,W):k},W}function j(E){E.sort(function(Y,W){return Y-W});var k=E.length/2;return k%1==0?(E[k-1]+E[k])/2:E[Math.floor(k)]}var A=2,D=1e-12;function V(){var E=function(P){return P[0]},k=function(P){return P[1]},Y=.3;function W(N){for(var P=ot(N,E,k,!0),X=R(P,4),U=X[0],st=X[1],vt=X[2],dt=X[3],Pt=U.length,St=Math.max(2,~~(Y*Pt)),Ft=new Float64Array(Pt),pt=new Float64Array(Pt),ut=new Float64Array(Pt).fill(1),Dt=-1;++Dt<=A;){for(var It=[0,St-1],Ct=0;Ct<Pt;++Ct){for(var kt=U[Ct],Nt=It[0],Xt=It[1],Jt=kt-U[Nt]>U[Xt]-kt?Nt:Xt,me=0,fe=0,ge=0,xe=0,ve=0,De=1/Math.abs(U[Jt]-kt||1),_e=Nt;_e<=Xt;++_e){var de=U[_e],pe=st[_e],ke=et(Math.abs(kt-de)*De)*ut[_e],We=de*ke;me+=ke,fe+=We,ge+=pe*ke,xe+=pe*We,ve+=de*We}var ei=Z(fe/me,ge/me,xe/me,ve/me),Wa=R(ei,2),el=Wa[0],rl=Wa[1];Ft[Ct]=el+rl*kt,pt[Ct]=Math.abs(st[Ct]-Ft[Ct]),at(U,Ct+1,It)}if(Dt===A)break;var Ha=j(pt);if(Math.abs(Ha)<D)break;for(var Mi=0,Ti,Ya;Mi<Pt;++Mi)Ti=pt[Mi]/(6*Ha),ut[Mi]=Ti>=1?D:(Ya=1-Ti*Ti)*Ya}return K(U,Ft,vt,dt)}return W.bandwidth=function(N){return arguments.length?(Y=N,W):Y},W.x=function(N){return arguments.length?(E=N,W):E},W.y=function(N){return arguments.length?(k=N,W):k},W}function et(E){return(E=1-E*E*E)*E*E}function at(E,k,Y){var W=E[k],N=Y[0],P=Y[1]+1;if(!(P>=E.length))for(;k>N&&E[P]-W<=W-E[N];)Y[0]=++N,Y[1]=P,++P}function K(E,k,Y,W){for(var N=E.length,P=[],X=0,U=0,st=[],vt;X<N;++X)vt=E[X]+Y,st[0]===vt?st[1]+=(k[X]-st[1])/++U:(U=0,st[1]+=W,st=[vt,k[X]],P.push(st));return st[1]+=W,P}function At(){var E=function(X){return X[0]},k=function(X){return X[1]},Y=Math.E,W;function N(P){var X=0,U=0,st=0,vt=0,dt=0,Pt=W?+W[0]:Infinity,St=W?+W[1]:-Infinity,Ft=Math.log(Y);rt(P,E,k,function(Nt,Xt){var Jt=Math.log(Nt)/Ft;++X,U+=(Jt-U)/X,st+=(Xt-st)/X,vt+=(Jt*Xt-vt)/X,dt+=(Jt*Jt-dt)/X,W||(Nt<Pt&&(Pt=Nt),Nt>St&&(St=Nt))});var pt=Z(U,st,vt,dt),ut=R(pt,2),Dt=ut[0],It=ut[1],Ct=function(Xt){return It*Math.log(Xt)/Ft+Dt},kt=c(Pt,St,Ct);return kt.a=It,kt.b=Dt,kt.predict=Ct,kt.rSquared=J(P,E,k,st,Ct),kt}return N.domain=function(P){return arguments.length?(W=P,N):W},N.x=function(P){return arguments.length?(E=P,N):E},N.y=function(P){return arguments.length?(k=P,N):k},N.base=function(P){return arguments.length?(Y=P,N):Y},N}function Ht(){var E=function(P){return P[0]},k=function(P){return P[1]},Y;function W(N){var P=ot(N,E,k),X=R(P,4),U=X[0],st=X[1],vt=X[2],dt=X[3],Pt=U.length,St=0,Ft=0,pt=0,ut=0,Dt=0,It,Ct,kt,Nt;for(It=0;It<Pt;)Ct=U[It],kt=st[It++],Nt=Ct*Ct,St+=(Nt-St)/It,Ft+=(Nt*Ct-Ft)/It,pt+=(Nt*Nt-pt)/It,ut+=(Ct*kt-ut)/It,Dt+=(Nt*kt-Dt)/It;var Xt=0,Jt=0,me=Y?+Y[0]:Infinity,fe=Y?+Y[1]:-Infinity;rt(N,E,k,function(ke,We){Jt++,Xt+=(We-Xt)/Jt,Y||(ke<me&&(me=ke),ke>fe&&(fe=ke))});var ge=pt-St*St,xe=St*ge-Ft*Ft,ve=(Dt*St-ut*Ft)/xe,De=(ut*ge-Dt*Ft)/xe,_e=-ve*St,de=function(We){return We=We-vt,ve*We*We+De*We+_e+dt},pe=c(me,fe,de);return pe.a=ve,pe.b=De-2*ve*vt,pe.c=_e-De*vt+ve*vt*vt+dt,pe.predict=de,pe.rSquared=J(N,E,k,Xt,de),pe}return W.domain=function(N){return arguments.length?(Y=N,W):Y},W.x=function(N){return arguments.length?(E=N,W):E},W.y=function(N){return arguments.length?(k=N,W):k},W}function $t(){var E=function(X){return X[0]},k=function(X){return X[1]},Y=3,W;function N(P){if(Y===1){var X=z().x(E).y(k).domain(W)(P);return X.coefficients=[X.b,X.a],delete X.a,delete X.b,X}if(Y===2){var U=Ht().x(E).y(k).domain(W)(P);return U.coefficients=[U.c,U.b,U.a],delete U.a,delete U.b,delete U.c,U}var st=ot(P,E,k),vt=R(st,4),dt=vt[0],Pt=vt[1],St=vt[2],Ft=vt[3],pt=dt.length,ut=[],Dt=[],It=Y+1,Ct=0,kt=0,Nt=W?+W[0]:Infinity,Xt=W?+W[1]:-Infinity;rt(P,E,k,function(de,pe){++kt,Ct+=(pe-Ct)/kt,W||(de<Nt&&(Nt=de),de>Xt&&(Xt=de))});var Jt,me,fe,ge,xe;for(Jt=0;Jt<It;++Jt){for(fe=0,ge=0;fe<pt;++fe)ge+=Math.pow(dt[fe],Jt)*Pt[fe];for(ut.push(ge),xe=new Float64Array(It),me=0;me<It;++me){for(fe=0,ge=0;fe<pt;++fe)ge+=Math.pow(dt[fe],Jt+me);xe[me]=ge}Dt.push(xe)}Dt.push(ut);var ve=re(Dt),De=function(pe){pe-=St;var ke=Ft+ve[0]+ve[1]*pe+ve[2]*pe*pe;for(Jt=3;Jt<It;++Jt)ke+=ve[Jt]*Math.pow(pe,Jt);return ke},_e=c(Nt,Xt,De);return _e.coefficients=Yt(It,ve,-St,Ft),_e.predict=De,_e.rSquared=J(P,E,k,Ct,De),_e}return N.domain=function(P){return arguments.length?(W=P,N):W},N.x=function(P){return arguments.length?(E=P,N):E},N.y=function(P){return arguments.length?(k=P,N):k},N.order=function(P){return arguments.length?(Y=P,N):Y},N}function Yt(E,k,Y,W){var N=Array(E),P,X,U,st;for(P=0;P<E;++P)N[P]=0;for(P=E-1;P>=0;--P)for(U=k[P],st=1,N[P]+=U,X=1;X<=P;++X)st*=(P+1-X)/X,N[P-X]+=U*Math.pow(Y,X)*st;return N[0]+=W,N}function re(E){var k=E.length-1,Y=[],W,N,P,X,U;for(W=0;W<k;++W){for(X=W,N=W+1;N<k;++N)Math.abs(E[W][N])>Math.abs(E[W][X])&&(X=N);for(P=W;P<k+1;++P)U=E[P][W],E[P][W]=E[P][X],E[P][X]=U;for(N=W+1;N<k;++N)for(P=k;P>=W;P--)E[P][N]-=E[P][W]*E[W][N]/E[W][W]}for(N=k-1;N>=0;--N){for(U=0,P=N+1;P<k;++P)U+=E[P][N]*Y[P];Y[N]=(E[k][N]-U)/E[N][N]}return Y}function bt(){var E=function(P){return P[0]},k=function(P){return P[1]},Y;function W(N){var P=0,X=0,U=0,st=0,vt=0,dt=0,Pt=Y?+Y[0]:Infinity,St=Y?+Y[1]:-Infinity;rt(N,E,k,function(kt,Nt){var Xt=Math.log(kt),Jt=Math.log(Nt);++P,X+=(Xt-X)/P,U+=(Jt-U)/P,st+=(Xt*Jt-st)/P,vt+=(Xt*Xt-vt)/P,dt+=(Nt-dt)/P,Y||(kt<Pt&&(Pt=kt),kt>St&&(St=kt))});var Ft=Z(X,U,st,vt),pt=R(Ft,2),ut=pt[0],Dt=pt[1];ut=Math.exp(ut);var It=function(Nt){return ut*Math.pow(Nt,Dt)},Ct=c(Pt,St,It);return Ct.a=ut,Ct.b=Dt,Ct.predict=It,Ct.rSquared=J(N,E,k,dt,It),Ct}return W.domain=function(N){return arguments.length?(Y=N,W):Y},W.x=function(N){return arguments.length?(E=N,W):E},W.y=function(N){return arguments.length?(k=N,W):k},W}F.regressionExp=T,F.regressionLinear=z,F.regressionLoess=V,F.regressionLog=At,F.regressionPoly=$t,F.regressionPow=bt,F.regressionQuad=Ht,Object.defineProperty(F,"__esModule",{value:!0})})},87026:function(Lt,it){(function(F,R){R(it)})(this,function(F){"use strict";function R(z,j,A,D){D=D||{};var V=D.maxIterations||100,et=D.tolerance||1e-10,at=z(j),K=z(A),At=A-j;if(at*K>0)throw"Initial bisect points must have opposite signs";if(at===0)return j;if(K===0)return A;for(var Ht=0;Ht<V;++Ht){At/=2;var $t=j+At,Yt=z($t);if(Yt*at>=0&&(j=$t),Math.abs(At)<et||Yt===0)return $t}return j+At}function Q(z){for(var j=new Array(z),A=0;A<z;++A)j[A]=0;return j}function gt(z,j){return Q(z).map(function(){return Q(j)})}function ht(z,j){for(var A=0,D=0;D<z.length;++D)A+=z[D]*j[D];return A}function ot(z){return Math.sqrt(ht(z,z))}function rt(z,j,A){for(var D=0;D<j.length;++D)z[D]=j[D]*A}function J(z,j,A,D,V){for(var et=0;et<z.length;++et)z[et]=j*A[et]+D*V[et]}function $(z,j,A){A=A||{};var D=A.maxIterations||j.length*200,V=A.nonZeroDelta||1.05,et=A.zeroDelta||.001,at=A.minErrorDelta||1e-6,K=A.minErrorDelta||1e-5,At=A.rho!==void 0?A.rho:1,Ht=A.chi!==void 0?A.chi:2,$t=A.psi!==void 0?A.psi:-.5,Yt=A.sigma!==void 0?A.sigma:.5,re,bt=j.length,E=new Array(bt+1);E[0]=j,E[0].fx=z(j),E[0].id=0;for(var k=0;k<bt;++k){var Y=j.slice();Y[k]=Y[k]?Y[k]*V:et,E[k+1]=Y,E[k+1].fx=z(Y),E[k+1].id=k+1}function W(pt){for(var ut=0;ut<pt.length;ut++)E[bt][ut]=pt[ut];E[bt].fx=pt.fx}for(var N=function(pt,ut){return pt.fx-ut.fx},P=j.slice(),X=j.slice(),U=j.slice(),st=j.slice(),vt=0;vt<D;++vt){if(E.sort(N),A.history){var dt=E.map(function(pt){var ut=pt.slice();return ut.fx=pt.fx,ut.id=pt.id,ut});dt.sort(function(pt,ut){return pt.id-ut.id}),A.history.push({x:E[0].slice(),fx:E[0].fx,simplex:dt})}for(re=0,k=0;k<bt;++k)re=Math.max(re,Math.abs(E[0][k]-E[1][k]));if(Math.abs(E[0].fx-E[bt].fx)<at&&re<K)break;for(k=0;k<bt;++k){P[k]=0;for(var Pt=0;Pt<bt;++Pt)P[k]+=E[Pt][k];P[k]/=bt}var St=E[bt];if(J(X,1+At,P,-At,St),X.fx=z(X),X.fx<E[0].fx)J(st,1+Ht,P,-Ht,St),st.fx=z(st),st.fx<X.fx?W(st):W(X);else if(X.fx>=E[bt-1].fx){var Ft=!1;if(X.fx>St.fx?(J(U,1+$t,P,-$t,St),U.fx=z(U),U.fx<St.fx?W(U):Ft=!0):(J(U,1-$t*At,P,$t*At,St),U.fx=z(U),U.fx<X.fx?W(U):Ft=!0),Ft){if(Yt>=1)break;for(k=1;k<E.length;++k)J(E[k],1-Yt,E[0],Yt,E[k]),E[k].fx=z(E[k])}}else W(X)}return E.sort(N),{fx:E[0].fx,x:E[0]}}function d(z,j,A,D,V,et,at){var K=A.fx,At=ht(A.fxprime,j),Ht=K,$t=K,Yt=At,re=0;V=V||1,et=et||1e-6,at=at||.1;function bt(k,Y,W){for(var N=0;N<16;++N)if(V=(k+Y)/2,J(D.x,1,A.x,V,j),Ht=D.fx=z(D.x,D.fxprime),Yt=ht(D.fxprime,j),Ht>K+et*V*At||Ht>=W)Y=V;else{if(Math.abs(Yt)<=-at*At)return V;Yt*(Y-k)>=0&&(Y=k),k=V,W=Ht}return 0}for(var E=0;E<10;++E){if(J(D.x,1,A.x,V,j),Ht=D.fx=z(D.x,D.fxprime),Yt=ht(D.fxprime,j),Ht>K+et*V*At||E&&Ht>=$t)return bt(re,V,$t);if(Math.abs(Yt)<=-at*At)return V;if(Yt>=0)return bt(V,re,Ht);$t=Ht,re=V,V*=2}return V}function c(z,j,A){var D={x:j.slice(),fx:0,fxprime:j.slice()},V={x:j.slice(),fx:0,fxprime:j.slice()},et=j.slice(),at,K,At=1,Ht;A=A||{},Ht=A.maxIterations||j.length*20,D.fx=z(D.x,D.fxprime),at=D.fxprime.slice(),rt(at,D.fxprime,-1);for(var $t=0;$t<Ht;++$t){if(At=d(z,at,D,V,At),A.history&&A.history.push({x:D.x.slice(),fx:D.fx,fxprime:D.fxprime.slice(),alpha:At}),!At)rt(at,D.fxprime,-1);else{J(et,1,V.fxprime,-1,D.fxprime);var Yt=ht(D.fxprime,D.fxprime),re=Math.max(0,ht(et,V.fxprime)/Yt);J(at,re,at,-1,V.fxprime),K=D,D=V,V=K}if(ot(D.fxprime)<=1e-5)break}return A.history&&A.history.push({x:D.x.slice(),fx:D.fx,fxprime:D.fxprime.slice(),alpha:At}),D}function Z(z,j,A){A=A||{};for(var D=A.maxIterations||j.length*100,V=A.learnRate||.001,et={x:j.slice(),fx:0,fxprime:j.slice()},at=0;at<D&&(et.fx=z(et.x,et.fxprime),A.history&&A.history.push({x:et.x.slice(),fx:et.fx,fxprime:et.fxprime.slice()}),J(et.x,1,et.x,-V,et.fxprime),!(ot(et.fxprime)<=1e-5));++at);return et}function T(z,j,A){A=A||{};var D={x:j.slice(),fx:0,fxprime:j.slice()},V={x:j.slice(),fx:0,fxprime:j.slice()},et=A.maxIterations||j.length*100,at=A.learnRate||1,K=j.slice(),At=A.c1||.001,Ht=A.c2||.1,$t,Yt=[];if(A.history){var re=z;z=function(E,k){return Yt.push(E.slice()),re(E,k)}}D.fx=z(D.x,D.fxprime);for(var bt=0;bt<et&&(rt(K,D.fxprime,-1),at=d(z,K,D,V,at,At,Ht),A.history&&(A.history.push({x:D.x.slice(),fx:D.fx,fxprime:D.fxprime.slice(),functionCalls:Yt,learnRate:at,alpha:at}),Yt=[]),$t=D,D=V,V=$t,!(at===0||ot(D.fxprime)<1e-5));++bt);return D}F.bisect=R,F.nelderMead=$,F.conjugateGradient=c,F.gradientDescent=Z,F.gradientDescentLineSearch=T,F.zeros=Q,F.zerosM=gt,F.norm2=ot,F.weightedSum=J,F.scale=rt})},29932:function(Lt){function it(F,R){for(var Q=-1,gt=F==null?0:F.length,ht=Array(gt);++Q<gt;)ht[Q]=R(F[Q],Q,F);return ht}Lt.exports=it},40371:function(Lt){function it(F){return function(R){return R==null?void 0:R[F]}}Lt.exports=it},80531:function(Lt,it,F){var R=F(62705),Q=F(29932),gt=F(1469),ht=F(33448),ot=1/0,rt=R?R.prototype:void 0,J=rt?rt.toString:void 0;function $(d){if(typeof d=="string")return d;if(gt(d))return Q(d,$)+"";if(ht(d))return J?J.call(d):"";var c=d+"";return c=="0"&&1/d==-ot?"-0":c}Lt.exports=$},79833:function(Lt,it,F){var R=F(80531);function Q(gt){return gt==null?"":R(gt)}Lt.exports=Q},73807:function(Lt){"use strict";var it=Lt.exports;Lt.exports.isNumber=function(F){return typeof F=="number"},Lt.exports.findMin=function(F){if(F.length===0)return Infinity;for(var R=F[0],Q=1;Q<F.length;Q++)R=Math.min(R,F[Q]);return R},Lt.exports.findMax=function(F){if(F.length===0)return-Infinity;for(var R=F[0],Q=1;Q<F.length;Q++)R=Math.max(R,F[Q]);return R},Lt.exports.findMinMulti=function(F){for(var R=it.findMin(F[0]),Q=1;Q<F.length;Q++)R=Math.min(R,it.findMin(F[Q]));return R},Lt.exports.findMaxMulti=function(F){for(var R=it.findMax(F[0]),Q=1;Q<F.length;Q++)R=Math.max(R,it.findMax(F[Q]));return R},Lt.exports.inside=function(F,R,Q){return F<=Q&&Q<=R}},53843:function(Lt,it,F){"use strict";var R=50,Q=2,gt=Math.log(2),ht=Lt.exports,ot=F(73807);function rt($){return 1-Math.abs($)}Lt.exports.getUnifiedMinMax=function($,d){return ht.getUnifiedMinMaxMulti([$],d)},Lt.exports.getUnifiedMinMaxMulti=function($,d){d=d||{};var c=!1,Z=!1,T=ot.isNumber(d.width)?d.width:Q,z=ot.isNumber(d.size)?d.size:R,j=ot.isNumber(d.min)?d.min:(c=!0,ot.findMinMulti($)),A=ot.isNumber(d.max)?d.max:(Z=!0,ot.findMaxMulti($)),D=A-j,V=D/(z-1);return c&&(j=j-2*T*V),Z&&(A=A+2*T*V),{min:j,max:A}},Lt.exports.create=function($,d){if(d=d||{},!$||$.length===0)return[];var c=ot.isNumber(d.size)?d.size:R,Z=ot.isNumber(d.width)?d.width:Q,T=ht.getUnifiedMinMax($,{size:c,width:Z,min:d.min,max:d.max}),z=T.min,j=T.max,A=j-z,D=A/(c-1);if(A===0)return[{x:z,y:1}];for(var V=[],et=0;et<c;et++)V.push({x:z+et*D,y:0});var at=function(E){return Math.floor((E-z)/D)},K=J(rt,Z),At=K[Z],Ht=K[Z-1]-K[Z-2],$t=0;$.forEach(function(E){var k=at(E);if(!(k+Z<0||k-Z>=V.length)){var Y=Math.max(k-Z,0),W=k,N=Math.min(k+Z,V.length-1),P=Y-(k-Z),X=k+Z-N,U=K[-Z-1+P]||0,st=K[-Z-1+X]||0,vt=At/(At-U-st);P>0&&($t+=vt*(P-1)*Ht);var dt=Math.max(0,k-Z+1);ot.inside(0,V.length-1,dt)&&(V[dt].y+=vt*1*Ht),ot.inside(0,V.length-1,W+1)&&(V[W+1].y-=vt*2*Ht),ot.inside(0,V.length-1,N+1)&&(V[N+1].y+=vt*1*Ht)}});var Yt=$t,re=0,bt=0;return V.forEach(function(E){re+=E.y,Yt+=re,E.y=Yt,bt+=Yt}),bt>0&&V.forEach(function(E){E.y/=bt}),V};function J($,d){for(var c={},Z=0,T=-d;T<=d;T++)Z+=$(T/d),c[T]=Z;return c}Lt.exports.getExpectedValueFromPdf=function($){if(!(!$||$.length===0)){var d=0;return $.forEach(function(c){d+=c.x*c.y}),d}},Lt.exports.getXWithLeftTailArea=function($,d){if(!(!$||$.length===0)){for(var c=0,Z=0,T=0;T<$.length&&(Z=T,c+=$[T].y,!(c>=d));T++);return $[Z].x}},Lt.exports.getPerplexity=function($){if(!(!$||$.length===0)){var d=0;return $.forEach(function(c){var Z=Math.log(c.y);isFinite(Z)&&(d+=c.y*Z)}),d=-d/gt,Math.pow(2,d)}}},55168:function(Lt,it){"use strict";Object.defineProperty(it,"__esModule",{value:!0}),it.SensorTabIndex=it.SensorClassName=it.SizeSensorId=void 0;var F="size-sensor-id";it.SizeSensorId=F;var R="size-sensor-object";it.SensorClassName=R;var Q="-1";it.SensorTabIndex=Q},12177:function(Lt,it){"use strict";Object.defineProperty(it,"__esModule",{value:!0}),it.default=void 0;var F=function(Q){var gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,ht=null;return function(){for(var ot=this,rt=arguments.length,J=new Array(rt),$=0;$<rt;$++)J[$]=arguments[$];clearTimeout(ht),ht=setTimeout(function(){Q.apply(ot,J)},gt)}};it.default=F},15378:function(Lt,it){"use strict";Object.defineProperty(it,"__esModule",{value:!0}),it.default=void 0;var F=1,R=function(){return"".concat(F++)};it.default=R},18587:function(Lt,it,F){"use strict";var R;R={value:!0},R=R=it.ak=void 0;var Q=F(12955),gt=function(J,$){var d=(0,Q.getSensor)(J);return d.bind($),function(){d.unbind($)}};it.ak=gt;var ht=function(J){var $=(0,Q.getSensor)(J);(0,Q.removeSensor)($)};R=ht;var ot="1.0.1";R=ot},12955:function(Lt,it,F){"use strict";Object.defineProperty(it,"__esModule",{value:!0}),it.removeSensor=it.getSensor=void 0;var R=ht(F(15378)),Q=F(82578),gt=F(55168);function ht($){return $&&$.__esModule?$:{default:$}}var ot={},rt=function(d){var c=d.getAttribute(gt.SizeSensorId);if(c&&ot[c])return ot[c];var Z=(0,R.default)();d.setAttribute(gt.SizeSensorId,Z);var T=(0,Q.createSensor)(d);return ot[Z]=T,T};it.getSensor=rt;var J=function(d){var c=d.element.getAttribute(gt.SizeSensorId);d.element.removeAttribute(gt.SizeSensorId),d.destroy(),c&&ot[c]&&delete ot[c]};it.removeSensor=J},82578:function(Lt,it,F){"use strict";Object.defineProperty(it,"__esModule",{value:!0}),it.createSensor=void 0;var R=F(27643),Q=F(31743),gt=typeof ResizeObserver!="undefined"?Q.createSensor:R.createSensor;it.createSensor=gt},27643:function(Lt,it,F){"use strict";Object.defineProperty(it,"__esModule",{value:!0}),it.createSensor=void 0;var R=gt(F(12177)),Q=F(55168);function gt(ot){return ot&&ot.__esModule?ot:{default:ot}}var ht=function(rt){var J=void 0,$=[],d=function(){getComputedStyle(rt).position==="static"&&(rt.style.position="relative");var A=document.createElement("object");return A.onload=function(){A.contentDocument.defaultView.addEventListener("resize",c),c()},A.style.display="block",A.style.position="absolute",A.style.top="0",A.style.left="0",A.style.height="100%",A.style.width="100%",A.style.overflow="hidden",A.style.pointerEvents="none",A.style.zIndex="-1",A.style.opacity="0",A.setAttribute("class",Q.SensorClassName),A.setAttribute("tabindex",Q.SensorTabIndex),A.type="text/html",rt.appendChild(A),A.data="about:blank",A},c=(0,R.default)(function(){$.forEach(function(j){j(rt)})}),Z=function(A){J||(J=d()),$.indexOf(A)===-1&&$.push(A)},T=function(){J&&J.parentNode&&(J.contentDocument&&J.contentDocument.defaultView.removeEventListener("resize",c),J.parentNode.removeChild(J),J=void 0,$=[])},z=function(A){var D=$.indexOf(A);D!==-1&&$.splice(D,1),$.length===0&&J&&T()};return{element:rt,bind:Z,destroy:T,unbind:z}};it.createSensor=ht},31743:function(Lt,it,F){"use strict";Object.defineProperty(it,"__esModule",{value:!0}),it.createSensor=void 0;var R=Q(F(12177));function Q(ht){return ht&&ht.__esModule?ht:{default:ht}}var gt=function(ot){var rt=void 0,J=[],$=(0,R.default)(function(){J.forEach(function(z){z(ot)})}),d=function(){var j=new ResizeObserver($);return j.observe(ot),$(),j},c=function(j){rt||(rt=d()),J.indexOf(j)===-1&&J.push(j)},Z=function(){rt.disconnect(),J=[],rt=void 0},T=function(j){var A=J.indexOf(j);A!==-1&&J.splice(A,1),J.length===0&&rt&&Z()};return{element:ot,bind:c,destroy:Z,unbind:T}};it.createSensor=gt}}]);