You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

81 line
698 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[7679],{64183:function(kt,lt,A){"use strict";var k=A(67294),it=A(80529),wt=A(59153),mt=A(4322),ft=A(24770),ct=A(26119),J=function(d,c){var Q={};for(var E in d)Object.prototype.hasOwnProperty.call(d,E)&&c.indexOf(E)<0&&(Q[E]=d[E]);if(d!=null&&typeof Object.getOwnPropertySymbols=="function")for(var R=0,E=Object.getOwnPropertySymbols(d);R<E.length;R++)c.indexOf(E[R])<0&&Object.prototype.propertyIsEnumerable.call(d,E[R])&&(Q[E[R]]=d[E[R]]);return Q},$=(0,k.forwardRef)(function(d,c){var Q=d.chartRef,E=d.style,R=E===void 0?{height:"inherit"}:E,Z=d.className,L=d.loading,X=d.loadingTemplate,U=d.errorTemplate,Ft=J(d,["chartRef","style","className","loading","loadingTemplate","errorTemplate"]),xt=(0,wt.Z)(it.uN,Ft),tt=xt.chart,Tt=xt.container;return(0,k.useEffect)(function(){(0,mt.J)(Q,tt.current)},[tt.current]),(0,k.useImperativeHandle)(c,function(){return{getChart:function(){return tt.current}}}),k.createElement(ft.Z,{errorTemplate:U},L&&k.createElement(ct.Z,{loadingTemplate:X,theme:d.theme}),k.createElement("div",{className:Z,style:R,ref:Tt}))});lt.Z=$},78677:function(kt,lt,A){"use strict";var k=A(67294),it=A(80529),wt=A(59153),mt=A(4322),ft=A(24770),ct=A(26119),J=function(d,c){var Q={};for(var E in d)Object.prototype.hasOwnProperty.call(d,E)&&c.indexOf(E)<0&&(Q[E]=d[E]);if(d!=null&&typeof Object.getOwnPropertySymbols=="function")for(var R=0,E=Object.getOwnPropertySymbols(d);R<E.length;R++)c.indexOf(E[R])<0&&Object.prototype.propertyIsEnumerable.call(d,E[R])&&(Q[E[R]]=d[E[R]]);return Q},$=(0,k.forwardRef)(function(d,c){var Q=d.chartRef,E=d.style,R=E===void 0?{height:"inherit"}:E,Z=d.className,L=d.loading,X=d.loadingTemplate,U=d.errorTemplate,Ft=J(d,["chartRef","style","className","loading","loadingTemplate","errorTemplate"]),xt=(0,wt.Z)(it.sg,Ft),tt=xt.chart,Tt=xt.container;return(0,k.useEffect)(function(){(0,mt.J)(Q,tt.current)},[tt.current]),(0,k.useImperativeHandle)(c,function(){return{getChart:function(){return tt.current}}}),k.createElement(ft.Z,{errorTemplate:U},L&&k.createElement(ct.Z,{loadingTemplate:X,theme:d.theme}),k.createElement("div",{className:Z,style:R,ref:Tt}))});lt.Z=$},80652:function(kt,lt,A){"use strict";var k=A(67294),it=A(80529),wt=A(59153),mt=A(4322),ft=A(24770),ct=A(26119),J=function(d,c){var Q={};for(var E in d)Object.prototype.hasOwnProperty.call(d,E)&&c.indexOf(E)<0&&(Q[E]=d[E]);if(d!=null&&typeof Object.getOwnPropertySymbols=="function")for(var R=0,E=Object.getOwnPropertySymbols(d);R<E.length;R++)c.indexOf(E[R])<0&&Object.prototype.propertyIsEnumerable.call(d,E[R])&&(Q[E[R]]=d[E[R]]);return Q},$=(0,k.forwardRef)(function(d,c){var Q=d.chartRef,E=d.style,R=E===void 0?{height:"inherit"}:E,Z=d.className,L=d.loading,X=d.loadingTemplate,U=d.errorTemplate,Ft=J(d,["chartRef","style","className","loading","loadingTemplate","errorTemplate"]),xt=(0,wt.Z)(it.x1,Ft),tt=xt.chart,Tt=xt.container;return(0,k.useEffect)(function(){(0,mt.J)(Q,tt.current)},[tt.current]),(0,k.useImperativeHandle)(c,function(){return{getChart:function(){return tt.current}}}),k.createElement(ft.Z,{errorTemplate:U},L&&k.createElement(ct.Z,{loadingTemplate:X,theme:d.theme}),k.createElement("div",{className:Z,style:R,ref:Tt}))});lt.Z=$},63430:function(kt,lt,A){"use strict";var k=A(67294),it=A(80529),wt=A(59153),mt=A(4322),ft=A(24770),ct=A(26119),J=function(d,c){var Q={};for(var E in d)Object.prototype.hasOwnProperty.call(d,E)&&c.indexOf(E)<0&&(Q[E]=d[E]);if(d!=null&&typeof Object.getOwnPropertySymbols=="function")for(var R=0,E=Object.getOwnPropertySymbols(d);R<E.length;R++)c.indexOf(E[R])<0&&Object.prototype.propertyIsEnumerable.call(d,E[R])&&(Q[E[R]]=d[E[R]]);return Q},$=(0,k.forwardRef)(function(d,c){var Q=d.chartRef,E=d.style,R=E===void 0?{height:"inherit"}:E,Z=d.className,L=d.loading,X=d.loadingTemplate,U=d.errorTemplate,Ft=J(d,["chartRef","style","className","loading","loadingTemplate","errorTemplate"]),xt=(0,wt.Z)(it.by,Ft),tt=xt.chart,Tt=xt.container;return(0,k.useEffect)(function(){(0,mt.J)(Q,tt.current)},[tt.current]),(0,k.useImperativeHandle)(c,function(){return{getChart:function(){return tt.current}}}),k.createElement(ft.Z,{errorTemplate:U},L&&k.createElement(ct.Z,{loadingTemplate:X,theme:d.theme}),k.createElement("div",{className:Z,style:R,ref:Tt}))});lt.Z=$},24770:function(kt,lt,A){"use strict";var k=A(67294),it=function(){var mt=function(ft,ct){return mt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,$){J.__proto__=$}||function(J,$){for(var d in $)Object.prototype.hasOwnProperty.call($,d)&&(J[d]=$[d])},mt(ft,ct)};return function(ft,ct){if(typeof ct!="function"&&ct!==null)throw new TypeError("Class extends value "+String(ct)+" is not a constructor or null");mt(ft,ct);function J(){this.constructor=ft}ft.prototype=ct===null?Object.create(ct):(J.prototype=ct.prototype,new J)}}(),wt=function(mt){it(ft,mt);function ft(){var ct=mt!==null&&mt.apply(this,arguments)||this;return ct.state={hasError:!1},ct.renderError=function(J){var $=ct.props.errorTemplate;switch(J){default:return $&&typeof $=="function"?$(J):k.createElement("h5",null,"\u7EC4\u4EF6\u51FA\u9519\u4E86\uFF0C\u8BF7\u6838\u67E5\u540E\u91CD\u8BD5\uFF1A ",J.message)}},ct}return ft.getDerivedStateFromError=function(ct){return{hasError:!0,error:ct}},ft.getDerivedStateFromProps=function(ct,J){return J.children!==ct.children?{children:ct.children,hasError:!1,error:void 0}:null},ft.prototype.render=function(){return this.state.hasError?this.renderError(this.state.error):k.createElement(k.Fragment,null,this.props.children)},ft}(k.Component);lt.Z=wt},59153:function(kt,lt,A){"use strict";A.d(lt,{Z:function(){return q}});var k=A(67294),it=A(49242),wt=A(73935),mt=A.t(wt,2),ft=function(){return ft=Object.assign||function(G){for(var z,V=1,st=arguments.length;V<st;V++){z=arguments[V];for(var nt in z)Object.prototype.hasOwnProperty.call(z,nt)&&(G[nt]=z[nt])}return G},ft.apply(this,arguments)},ct=function(G,z,V,st){function nt(et){return et instanceof V?et:new V(function(vt){vt(et)})}return new(V||(V=Promise))(function(et,vt){function ht(pt){try{ot(st.next(pt))}catch(dt){vt(dt)}}function Ot(pt){try{ot(st.throw(pt))}catch(dt){vt(dt)}}function ot(pt){pt.done?et(pt.value):nt(pt.value).then(ht,Ot)}ot((st=st.apply(G,z||[])).next())})},J=function(G,z){var V={label:0,sent:function(){if(et[0]&1)throw et[1];return et[1]},trys:[],ops:[]},st,nt,et,vt;return vt={next:ht(0),throw:ht(1),return:ht(2)},typeof Symbol=="function"&&(vt[Symbol.iterator]=function(){return this}),vt;function ht(ot){return function(pt){return Ot([ot,pt])}}function Ot(ot){if(st)throw new TypeError("Generator is already executing.");for(;V;)try{if(st=1,nt&&(et=ot[0]&2?nt.return:ot[0]?nt.throw||((et=nt.return)&&et.call(nt),0):nt.next)&&!(et=et.call(nt,ot[1])).done)return et;switch(nt=0,et&&(ot=[ot[0]&2,et.value]),ot[0]){case 0:case 1:et=ot;break;case 4:return V.label++,{value:ot[1],done:!1};case 5:V.label++,nt=ot[1],ot=[0];continue;case 7:ot=V.ops.pop(),V.trys.pop();continue;default:if(et=V.trys,!(et=et.length>0&&et[et.length-1])&&(ot[0]===6||ot[0]===2)){V=0;continue}if(ot[0]===3&&(!et||ot[1]>et[0]&&ot[1]<et[3])){V.label=ot[1];break}if(ot[0]===6&&V.label<et[1]){V.label=et[1],et=ot;break}if(et&&V.label<et[2]){V.label=et[2],V.ops.push(ot);break}et[2]&&V.ops.pop(),V.trys.pop();continue}ot=z.call(G,V)}catch(pt){ot=[6,pt],nt=0}finally{st=et=0}if(ot[0]&5)throw ot[1];return{value:ot[0]?ot[1]:void 0,done:!0}}},$=ft({},mt),d=$.version,c=$.render,Q=$.unmountComponentAtNode,E;try{var R=Number((d||"").split(".")[0]);R>=18&&(E=$.createRoot)}catch(G){}function Z(G){var z=$.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;z&&typeof z=="object"&&(z.usingClientEntryPoint=G)}var L="__rc_react_root__";function X(G,z){Z(!0);var V=z[L]||E(z);Z(!1),V.render(G),z[L]=V}function U(G,z){c(G,z)}function Ft(G,z){}function xt(G,z){if(E){X(G,z);return}U(G,z)}function tt(G){return ct(this,void 0,void 0,function(){return J(this,function(z){return[2,Promise.resolve().then(function(){var V;(V=G[L])===null||V===void 0||V.unmount(),delete G[L]})]})})}function Tt(G){Q(G)}function Yt(G){}function te(G){return ct(this,void 0,void 0,function(){return J(this,function(z){return E!==void 0?[2,tt(G)]:(Tt(G),[2])})})}var Ut=function(G,z){var V=document.createElement("div");return z==="tooltip"&&(V.className="g2-tooltip"),xt(G,V),V},oe=Ut,Xt=function(G,z){var V={}.toString;return V.call(G)==="[object ".concat(z,"]")},M=function(G){if(!G)return G;var z={};for(var V in G)z[V]=G[V];return z},B=function(G){return Object.prototype.toString.call(G).slice(8,-1)},K=function(G){if(!G||typeof G!="object")return G;var z;return Array.isArray(G)?z=G.map(function(V){return K(V)}):(z={},Object.keys(G).forEach(function(V){return z[V]=K(G[V])})),z},H=function(G,z){for(var V=G,st=0;st<z.length;st+=1)if(V==null?void 0:V[z[st]])V=V[z[st]];else{V=void 0;break}return V},N=function(G,z,V){if(!G)return G;var st=G;return z.forEach(function(nt,et){et<z.length-1?st=st[nt]:st[nt]=V}),G},P=function(){return P=Object.assign||function(G){for(var z,V=1,st=arguments.length;V<st;V++){z=arguments[V];for(var nt in z)Object.prototype.hasOwnProperty.call(z,nt)&&(G[nt]=z[nt])}return G},P.apply(this,arguments)},j=function(G,z){var V={};for(var st in G)Object.prototype.hasOwnProperty.call(G,st)&&z.indexOf(st)<0&&(V[st]=G[st]);if(G!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,st=Object.getOwnPropertySymbols(G);nt<st.length;nt++)z.indexOf(st[nt])<0&&Object.prototype.propertyIsEnumerable.call(G,st[nt])&&(V[st[nt]]=G[st[nt]]);return V};function q(G,z){var V=(0,k.useRef)(),st=(0,k.useRef)(),nt=(0,k.useRef)(null),et=z.onReady,vt=z.onEvent,ht=function(dt,St){var Lt;return dt===void 0&&(dt="image/png"),(Lt=V.current)===null||Lt===void 0?void 0:Lt.chart.canvas.cfg.el.toDataURL(dt,St)},Ot=function(dt,St,Lt){var Nt;dt===void 0&&(dt="download"),St===void 0&&(St="image/png");var ne=dt;dt.indexOf(".")===-1&&(ne="".concat(dt,".").concat(St.split("/")[1]));var re=(Nt=V.current)===null||Nt===void 0?void 0:Nt.chart.canvas.cfg.el.toDataURL(St,Lt),Qt=document.createElement("a");return Qt.href=re,Qt.download=ne,document.body.appendChild(Qt),Qt.click(),document.body.removeChild(Qt),Qt=null,ne},ot=function(dt,St,Lt){var Nt=H(dt,St);N(dt,St,function(){for(var ne=[],re=0;re<arguments.length;re++)ne[re]=arguments[re];var Qt=Xt(Nt,"Function")?Nt.apply(void 0,ne):Nt;return Xt(Qt,"String")||Xt(Qt,"Number")||Xt(Qt,"HTMLDivElement")?Qt:oe(Qt,Lt)})},pt=function(){H(z,["statistic","content","customHtml"])&&ot(z,["statistic","content","customHtml"]),H(z,["statistic","title","customHtml"])&&ot(z,["statistic","title","customHtml"]),typeof z.tooltip=="object"&&(H(z,["tooltip","container"])&&ot(z,["tooltip","container"],"tooltip"),H(z,["tooltip","customContent"])&&ot(z,["tooltip","customContent"],"tooltip"))};return(0,k.useEffect)(function(){if(V.current&&!(0,it.isEqual)(st.current,z)){var dt=!1;if(st.current){var St=st.current,Lt=St.data,Nt=St.value,ne=St.percent,re=j(St,["data","value","percent"]),Qt=z.data,xe=z.value,ge=z.percent,Ee=j(z,["data","value","percent"]);dt=(0,it.isEqual)(re,Ee)}if(st.current=K(z),dt&&(0,it.get)(z,"chartType")!=="Mix"){var pe="data",he=["percent"],ye=Object.keys(z);he.forEach(function(Ae){ye.includes(Ae)&&(pe=Ae)}),V.current.changeData((z==null?void 0:z[pe])||[])}else pt(),V.current.update(z)}},[z]),(0,k.useEffect)(function(){if(!nt.current)return function(){return null};st.current||(st.current=K(z)),pt();var dt=new G(nt.current,P({},z));dt.toDataURL=function(Lt,Nt){return ht(Lt,Nt)},dt.downloadImage=function(Lt,Nt,ne){return Ot(Lt,Nt,ne)},dt.render(),V.current=M(dt),et&&et(dt);var St=function(Lt){vt&&vt(dt,Lt)};return dt.on("*",St),function(){V.current&&(V.current.destroy(),V.current.off("*",St),V.current=void 0)}},[]),{chart:V,container:nt}}},26119:function(kt,lt,A){"use strict";var k=A(67294),it=A(24561),wt=function(mt){var ft=mt.loadingTemplate,ct=mt.theme,J=ct===void 0?"light":ct,$=function(){return ft||k.createElement(it.ZP,{viewBox:"0 0 400 180",width:200,height:90,speed:1,backgroundColor:J==="dark"?"#262626":"#D9D9D9"},k.createElement("rect",{x:"20",y:"5",rx:"0",ry:"0",width:"1",height:"170"}),k.createElement("rect",{x:"20",y:"175",rx:"0",ry:"0",width:"360",height:"1"}),k.createElement("rect",{x:"40",y:"75",rx:"0",ry:"0",width:"35",height:"100"}),k.createElement("rect",{x:"80",y:"125",rx:"0",ry:"0",width:"35",height:"50"}),k.createElement("rect",{x:"120",y:"105",rx:"0",ry:"0",width:"35",height:"70"}),k.createElement("rect",{x:"160",y:"35",rx:"0",ry:"0",width:"35",height:"140"}),k.createElement("rect",{x:"200",y:"55",rx:"0",ry:"0",width:"35",height:"120"}),k.createElement("rect",{x:"240",y:"15",rx:"0",ry:"0",width:"35",height:"160"}),k.createElement("rect",{x:"280",y:"135",rx:"0",ry:"0",width:"35",height:"40"}),k.createElement("rect",{x:"320",y:"85",rx:"0",ry:"0",width:"35",height:"90"}))};return k.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)"}},$())};lt.Z=wt},4322:function(kt,lt,A){"use strict";A.d(lt,{J:function(){return it}});var k=A(49242),it=function(wt,mt){!wt||((0,k.isFunction)(wt)?wt(mt):wt.current=mt)}},80529:function(kt,lt,A){"use strict";A.d(lt,{uN:function(){return ch},sg:function(){return dh},x1:function(){return sh},by:function(){return wh}});var k={};A.r(k),A.d(k,{CONTAINER_CLASS:function(){return He},CONTAINER_CLASS_CUSTOM:function(){return Ni},CROSSHAIR_X:function(){return eo},CROSSHAIR_Y:function(){return ro},LIST_CLASS:function(){return zi},LIST_ITEM_CLASS:function(){return Ln},MARKER_CLASS:function(){return On},NAME_CLASS:function(){return xl},TITLE_CLASS:function(){return sr},VALUE_CLASS:function(){return In}});var it={};A.r(it),A.d(it,{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 wt={};A.r(wt),A.d(wt,{ellipsisHead:function(){return lg},ellipsisMiddle:function(){return ug},ellipsisTail:function(){return wl},getDefault:function(){return sg}});var mt={};A.r(mt),A.d(mt,{equidistance:function(){return Cl},equidistanceWithReverseBoth:function(){return gg},getDefault:function(){return hg},reserveBoth:function(){return dg},reserveFirst:function(){return fg},reserveLast:function(){return vg}});var ft={};A.r(ft),A.d(ft,{fixedAngle:function(){return Fl},getDefault:function(){return yg},unfixedAngle:function(){return mg}});var ct={};A.r(ct),A.d(ct,{autoEllipsis:function(){return wt},autoHide:function(){return mt},autoRotate:function(){return ft}});var J={};A.r(J),A.d(J,{Base:function(){return oo},Circle:function(){return Fg},Html:function(){return Tg},Line:function(){return El}});var $={};A.r($),A.d($,{cluster:function(){return FE},hierarchy:function(){return bi},pack:function(){return jf},packEnclose:function(){return zf},packSiblings:function(){return IE},partition:function(){return Df},stratify:function(){return NE},tree:function(){return YE},treemap:function(){return Jf},treemapBinary:function(){return XE},treemapDice:function(){return xn},treemapResquarify:function(){return UE},treemapSlice:function(){return Da},treemapSliceDice:function(){return jE},treemapSquarify:function(){return Qf}});var d=A(70655),c=A(49242),Q;(function(e){e.FORE="fore",e.MID="mid",e.BG="bg"})(Q||(Q={}));var E;(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"})(E||(E={}));var R;(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"})(R||(R={}));var Z={FORE:3,MID:2,BG:1},L;(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"})(L||(L={}));var X;(function(e){e.BEFORE_DRAW_ANIMATE="beforeanimate",e.AFTER_DRAW_ANIMATE="afteranimate",e.BEFORE_RENDER_LABEL="beforerenderlabel",e.AFTER_RENDER_LABEL="afterrenderlabel"})(X||(X={}));var U;(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"})(U||(U={}));var Ft;(function(e){e.ACTIVE="active",e.INACTIVE="inactive",e.SELECTED="selected",e.DEFAULT="default"})(Ft||(Ft={}));var xt=["color","shape","size"],tt="_origin",Tt=1,Yt=1,te=.25,Ut={};function oe(e){var r=Ut[e];if(!r)throw new Error("G engine '".concat(e,"' is not exist, please register it at first."));return r}function Xt(e,r){Ut[e]=r}var M=A(6056),B=A(45442);function K(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 H(e){return typeof e=="number"&&!isNaN(e)}function N(e,r,t,i){var n=t,a=i;if(r){var o=K(e);n=o.width?o.width:n,a=o.height?o.height:a}return{width:Math.max(H(n)?n:Tt,Tt),height:Math.max(H(a)?a:Yt,Yt)}}function P(e){var r=e.parentNode;r&&r.removeChild(e)}var j=A(90494),q=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}(j.Z),G=q,z=A(3232),V=0,st=1/2,nt=1/2,et=.05,vt=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]=V)}),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]=[V,1]}return a},e}(),ht=vt,Ot={},ot=function(e){return Ot[e.toLowerCase()]},pt=function(e,r){if(ot(e))throw new Error("Adjust type '"+e+"' existed.");Ot[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 dt=function(r,t){return dt=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])},dt(r,t)};function St(e,r){dt(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}var Lt=function(){return Lt=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},Lt.apply(this,arguments)};function Nt(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 ne(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 re(e,r){return function(t,i){r(t,i,e)}}function Qt(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 ge(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 Ee(e,r,t,i){i===void 0&&(i=t),e[i]=r[t]}function pe(e,r){for(var t in e)t!=="default"&&!r.hasOwnProperty(t)&&(r[t]=e[t])}function he(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 ye(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 Ae(){for(var e=[],r=0;r<arguments.length;r++)e=e.concat(ye(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 he=="function"?he(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 CT(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 Pv=function(e){St(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?st:n,o=t.dodgeRatio,s=o===void 0?nt: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}(ht),Dv=Pv;function kv(e,r){return(r-e)*Math.random()+e}var Bv=function(e){St(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)*et;return kv(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}(ht),Rv=Bv,Xa=c.Cache,Nv=function(e){St(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,_),Lt(Lt({},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),Lt(Lt({},v),(g={},g[l]=x,g))})})},r}(ht),zv=Nv,Vv=function(e){St(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 Lt(Lt({},h),(f={},f[o]=c.map(g,function(x){return y+x}),f))}var m=(l-g)/2;return Lt(Lt({},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}(ht),Gv=Vv;pt("Dodge",Dv),pt("Jitter",Rv),pt("Stack",zv),pt("Symmetric",Gv);var il=function(e,r){return(0,c.isString)(r)?r:e.invert(e.scale(r))},Wv=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=Wv;/*! *****************************************************************************
  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 Oi(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 AT(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 FT(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 ET(e,r){return function(t,i){r(t,i,e)}}function MT(e,r){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,r)}function TT(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 LT(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 OT(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 Hv(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 PT(){for(var e=[],r=0;r<arguments.length;r++)e=e.concat(Hv(arguments[r]));return e}function DT(){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 bn(e){return this instanceof bn?(this.v=e,this):new bn(e)}function kT(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 bn?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 BT(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:bn(e[n](o)),done:n==="return"}:a?a(o):o}:a}}function RT(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 NT(e,r){return Object.defineProperty?Object.defineProperty(e,"raw",{value:r}):e.raw=r,e}function zT(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 VT(e){return e&&e.__esModule?e:{default:e}}function GT(e,r){if(!r.has(e))throw new TypeError("attempted to get private field on non-instance");return r.get(e)}function WT(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 Yv=/rgba?\(([\s.,0-9]+)\)/,Xv=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,jv=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,Uv=/[\d.]+:(#[^\s]+|[^\)]+\))/gi,Zv=function(e){return/^[r,R,L,l]{1}[\s]*\(/.test(e)},Kv=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},qv=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)])},Sn,ll=function(e){if(e[0]==="#"&&e.length===7)return e;Sn||(Sn=Kv()),Sn.style.color=e;var r=document.defaultView.getComputedStyle(Sn,"").getPropertyValue("color"),t=Yv.exec(r),i=t[1].split(/\s*,\s*/).map(function(n){return Number(n)});return r=ol(i),r},$v=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 qv(t,i)}},Qv=function(e){if(Zv(e)){var r,t=void 0;if(e[0]==="l"){var i=Xv.exec(e),n=+i[1]+90;t=i[2],r="linear-gradient("+n+"deg, "}else if(e[0]==="r"){r="radial-gradient(";var i=jv.exec(e);t=i[4]}var a=t.match(Uv);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:$v,toRGB:(0,c.memoize)(ll),toCSSGradient:Qv},Jv=function(e){Oi(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),td=Jv,ed=function(e){Oi(r,e);function r(t){var i=e.call(this,t)||this;return i.type="opacity",i.names=["opacity"],i}return r}(Li),rd=ed,id=function(e){Oi(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),nd=id,ad=function(e){Oi(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),od=ad,sd=function(e){Oi(r,e);function r(t){var i=e.call(this,t)||this;return i.type="size",i.names=["size"],i}return r}(Li),ld=sd,Ii=A(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",td),Pi("Opacity",rd),Pi("Position",nd),Pi("Shape",od),Pi("Size",ld);var Cn=A(77160),ud=A(35600),ee=A(31506),cd=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 Cn.transformMat3(a,a,n),a},e.prototype.invertMatrix=function(r,t,i){i===void 0&&(i=0);var n=this.matrix,a=ud.invert([0,0,0,0,0,0,0,0,0],n),o=[r,t,i];return a&&Cn.transformMat3(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 ee.m$(t,t,[-i.x,-i.y]),ee.zu(t,t,r),ee.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 ee.m$(i,i,[-n.x,-n.y]),ee.lh(i,i,[r,t]),ee.m$(i,i,[n.x,n.y]),this},e.prototype.translate=function(r,t){var i=this.matrix;return ee.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=cd,hd=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=hd,Mt=A(31437),fd=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=Mt.subtract([0,0],[t.x,t.y],[this.center.x,this.center.y]),o=ee.Dg(a,[1,0],!0),s=o*this.a;Mt.length(a)<s&&(s=Mt.length(a));var l=Math.floor((Mt.length(a)-s)/n);o=2*l*Math.PI+o;var u=this.a*o,h=Mt.length(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),vd=fd,dd=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];ee.zu(u,u,s);var h=[1,0,0];Cn.transformMat3(h,h,u);var f=[h[0],h[1]],v=ee.Dg(f,a,l<s);(0,c.isNumberEqual)(v,Math.PI*2)&&(v=0);var g=Mt.length(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),gd=dd,fl={},pd=function(e){return fl[e.toLowerCase()]},An=function(e,r){fl[e.toLowerCase()]=r};An("rect",hl),An("cartesian",hl),An("polar",gd),An("helix",vd);function vl(e,r,t){var i=new z.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=ee.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:ee.vs(r||dl,[["t",e.x,e.y]])}function yd(e){var r=[1,0,0],t=[0,0,0];return Cn.transformMat3(t,r,e),Math.atan2(t[1],t[0])}function Fn(e,r){var t=[0,0];return Mt.transformMat3(t,r,e),t}function md(e,r){var t=Fn(e,[r.minX,r.minY]),i=Fn(e,[r.maxX,r.minY]),n=Fn(e,[r.minX,r.maxY]),a=Fn(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 En(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 Qa(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 HT=function(e){return new Promise(function(r){setTimeout(r,e)})},Mn=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 YT(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 Me(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}(z.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=md(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,Ja="\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+=Ja}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=Ja+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+Ja+u}return n}var Ld="\u2026",Od=2,Id=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 to(e){if(e.length>Id)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 XT(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)-Od,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 Tn(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=En((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,F=w.height,T=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:F+m[0]+m[2]},_)});T.toBack()}Di(p,t,i),gl(p,l,t,i)}var Rt={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:Rt.textColor,fontSize:12,textAlign:"center",textBaseline:"bottom",fontFamily:Rt.fontFamily},text:{position:"center",autoRotate:!0,content:null,offsetX:0,offsetY:0,style:{stroke:Rt.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])}Tn(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:Rt.textColor,fontSize:12,textAlign:"center",textBaseline:"middle",fontFamily:Rt.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};Tn(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:Rt.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:Rt.lineColor,lineWidth:1}},text:{content:"",display:!0,style:{fill:Rt.textColor,opacity:.65,fontSize:12,textAlign:"start",fontFamily:Rt.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};Tn(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:Rt.regionColor,opacity:.4}},text:{content:"",style:{textAlign:"center",textBaseline:"bottom",fontSize:12,fill:Rt.textColor,fontFamily:Rt.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"));Tn(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 Te(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=Te(e,"width",r);return t==="auto"&&(t=e.offsetWidth),parseFloat(t)}function tg(e,r){var t=Jd(e,r),i=parseFloat(Te(e,"borderLeftWidth"))||0,n=parseFloat(Te(e,"paddingLeft"))||0,a=parseFloat(Te(e,"paddingRight"))||0,o=parseFloat(Te(e,"borderRightWidth"))||0,s=parseFloat(Te(e,"marginRight"))||0,l=parseFloat(Te(e,"marginLeft"))||0;return t+i+o+n+a+l+s}function eg(e,r){var t=Te(e,"height",r);return t==="auto"&&(t=e.offsetHeight),parseFloat(t)}function rg(e,r){var t=eg(e,r),i=parseFloat(Te(e,"borderTopWidth"))||0,n=parseFloat(Te(e,"paddingTop"))||0,a=parseFloat(Te(e,"paddingBottom"))||0,o=parseFloat(Te(e,"borderBottomWidth"))||0,s=parseFloat(Te(e,"marginTop"))||0,l=parseFloat(Te(e,"marginBottom"))||0;return t+i+o+n+a+s+l}var He="g2-tooltip",Ni="g2-tooltip-custom",sr="g2-tooltip-title",zi="g2-tooltip-list",Ln="g2-tooltip-list-item",On="g2-tooltip-marker",In="g2-tooltip-value",xl="g2-tooltip-name",eo="g2-tooltip-crosshair-x",ro="g2-tooltip-crosshair-y",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&&Qa(i,n)){var a=t[n];(0,B.Z)(i,a)}}},r.prototype.applyChildrenStyles=function(t,i){var n=this;(0,c.each)(i,function(a,o){var s=t.getElementsByClassName(o);(0,c.each)(s,function(l){var u=n.get("containerClassName"),h=a;Qa(l,He)&&u===Ni&&(h=(0,d.__assign)((0,d.__assign)({},a),{visibility:"unset",position:"unset"})),(0,B.Z)(l,h)})})},r.prototype.applyStyle=function(t,i){var n=this.get("domStyles");(0,B.Z)(i,n[t])},r.prototype.createDom=function(){var t=this.get("containerTpl");return(0,M.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),io=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" style="position:absolute"></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,M.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,B.Z)(t,{position:"absolute",left:v.x+"px",top:v.y+"px",zIndex:this.get("zIndex")})},r}(io),ag=ng;function Vi(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:Rt.lineColor}},tickLine:{style:{lineWidth:1,stroke:Rt.lineColor},alignTick:!0,length:5,displayWithLabel:!0},subTickLine:{style:{lineWidth:1,stroke:Rt.lineColor},count:4,length:2},label:{autoRotate:!0,autoHide:!1,autoEllipsis:!1,style:{fontSize:12,fill:Rt.textColor,fontFamily:Rt.fontFamily,fontWeight:"normal"},offset:10,offsetX:0,offsetY:0},title:{autoRotate:!0,spacing:5,position:"center",style:{fontSize:12,fill:Rt.textColor,textBaseline:"middle",fontFamily:Rt.fontFamily,textAlign:"center"},iconStyle:{fill:Rt.descriptionIconFill,stroke:Rt.descriptionIconStroke},description:""},tickStates:{active:{labelStyle:{fontWeight:500},tickLineStyle:{lineWidth:2}},inactive:{labelStyle:{fill:Rt.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=ee.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],F=C[0],T=C[1],D=[p,_+v],O=D[0],W=D[1],rt=[p+v,y-u/4],_t=rt[0],Ct=rt[1],Vt=[_t,Ct+g],Y=Vt[0],at=Vt[1],yt=[Y,at+g],ut=yt[0],gt=yt[1],At=[ut,gt+v*3/4],zt=At[0],Gt=At[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,F,T],["A",v,v,0,0,1,O,W],["A",v,v,0,0,1,x,_],["M",_t,Ct],["L",Y,at],["M",ut,gt],["L",zt,Gt]],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=Vi(t,"label",a);l&&s.attr(l)}var u=this.getElementId("tickline-"+t.id),h=i.findById(u);if(h){var f=Vi(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=Vi(t,"label",n);u&&o.attr(u)}if(l){var h=Vi(t,"tickLine",n);h&&l.attr(h)}}else o&&o.attr(a.style),l&&l.attr(s.style)},r}(be),_l=og;function no(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 wl}function lg(e,r,t){return no(e,r,t,"head")}function wl(e,r,t){return no(e,r,t,"tail")}function ug(e,r,t){return no(e,r,t,"middle")}function cg(e){var r=e.attr("matrix");return r&&r[0]!==1}function bl(e){var r=cg(e)?yd(e.attr("matrix")):0;return r%360}function ao(e,r,t,i){var n=!1,a=bl(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));Mn(l,0,Math.PI/180)?n=s.width+i>o:n=s.height/l+i>o}else{var l=Math.abs(Math.sin(a));Mn(l,0,Math.PI/180)?n=s.width+i>o:n=s.height/l+i>o}return n}function Gi(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=ao(e,u,f,n);g?(f.hide(),o=!0):u=f}return o}function Sl(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=bl(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(Mn(g,0,Math.PI/180)){var p=to(n);v=(p+i)/f}else v=(s.height/g+i)/f}else{var g=Math.abs(Math.sin(h));if(Mn(g,0,Math.PI/180)){var p=to(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 Cl}function fg(e,r,t,i){return Gi(e,r,!1,i)}function vg(e,r,t,i){return Gi(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=ao(e,h,v,n);p?(v.hide(),o=!0):h=v}var y=ao(e,h,u,n);return y&&(h.hide(),o=!0),o}function Cl(e,r,t,i){var n=Sl(e,r,i);return Gi(e,r,!1)&&(n=!0),n}function gg(e,r,t,i){var n=r.getChildren().slice(),a=Sl(e,r,i);if(n.length>2){var o=n[0],s=n[n.length-1];o.get("visible")||(o.show(),Gi(e,r,!1,i)&&(a=!0)),s.get("visible")||(s.show(),Gi(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 Al(e,r,t,i){var n=r.getChildren();if(!n.length||!e&&n.length<2)return!1;var a=to(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 Fl}function Fl(e,r,t,i){return Al(e,r,t,function(){return(0,c.isNumber)(i)?i:e?Rt.verticalAxisRotate:Rt.horizontalAxisRotate})}function mg(e,r,t){return Al(e,r,t,function(i,n){if(!i)return e?Rt.verticalAxisRotate:Rt.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=Mt.normalize([0,0],i),a=this.get("verticalFactor"),o=[n[1],n[0]*-1];return Mt.scale([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=ct[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}(_l),_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=Mt.length(a);return Mt.scale(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=ct[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}(_l),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:Rt.lineColor}},text:{position:"start",offset:10,autoRotate:!1,content:null,style:{fill:Rt.textColor,textAlign:"center",textBaseline:"middle",fontFamily:Rt.fontFamily}},textBackground:{padding:5,style:{stroke:Rt.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=En(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),oo=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}(oo),El=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}(oo),Fg=Ag,Wi="g2-crosshair",so=Wi+"-line",lo=Wi+"-text",Hi,Eg=(Hi={},Hi[""+Wi]={position:"relative"},Hi[""+so]={position:"absolute",backgroundColor:"rgba(0, 0, 0, 0.25)"},Hi[""+lo]={position:"absolute",color:Rt.textColor,fontFamily:Rt.fontFamily},Hi),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="'+Wi+'"></div>',crosshairTpl:'<div class="'+so+'"></div>',textTpl:'<span class="'+lo+'">{content}</span>',domStyles:null,containerClassName:Wi,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,M.Z)(i);t.appendChild(n),this.applyStyle(so,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,M.Z)(o),a.appendChild(i),this.applyStyle(lo,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,B.Z)(t,{width:"1px",height:Me(Math.abs(n.y-i.y))}):(0,B.Z)(t,{height:"1px",width:Me(Math.abs(n.x-i.x))}),(0,B.Z)(t,{top:Me(o),left:Me(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,B.Z)(t,{top:Me(a.y),left:Me(a.x)})}},r.prototype.updateInner=function(t){(0,c.hasKey)(t,"text")&&this.resetText(),e.prototype.updateInner.call(this,t)},r}(io),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:Rt.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),Ml=Lg;function Og(e,r,t,i){var n=t-e,a=i-r;return Math.sqrt(n*n+a*a)}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),{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=Og(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}(Ml),Pg=Ig,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}(Ml),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=En(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=En(t.padding);i.x=n[3],i.y=n[0]}this.set("currentPoint",i)},r}(be),Tl=Bg,uo={marker:{style:{inactiveFill:"#000",inactiveOpacity:.45,fill:"#000",opacity:1,size:12}},text:{style:{fill:"#ccc",fontSize:12}}},Pn={fill:Rt.textColor,fontSize:12,textAlign:"start",textBaseline:"middle",fontFamily:Rt.fontFamily,fontWeight:"normal",lineHeight:12},co="navigation-arrow-right",ho="navigation-arrow-left",Ll={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:Rt.textColor,fontSize:12,textAlign:"start",textBaseline:"top"}},background:{padding:5,style:{stroke:Rt.lineColor}},itemBackground:{style:{opacity:0,fill:"#fff"}},pageNavigator:uo,itemName:{spacing:16,style:Pn},marker:{spacing:8,style:{r:6,symbol:"circle"}},itemValue:{alignRight:!1,formatter:null,style:Pn,spacing:6},itemStates:{active:{nameStyle:{opacity:.8}},unchecked:{nameStyle:{fill:Rt.uncheckedColor},markerStyle:{fill:Rt.uncheckedColor,stroke:Rt.uncheckedColor}},inactive:{nameStyle:{fill:Rt.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(),F=s||C.width;F>m&&(m=F),g==="horizontal"?(x&&x<h.x+F-f&&(y=!0,h.x=f,h.y+=o+u),i.moveElementTo(S,h),h.x+=F+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)({},Pn),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]},Pn),(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],F=S[1],T=n.showRadio,D=(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,F],["L",C+f,F],["L",C,F],["A",h,h,0,0,1,g,p],["L",g,p+f]],stroke:"#000000",fill:"#ffffff"},u),{opacity:T?(l=u==null?void 0:u.opacity)!==null&&l!==void 0?l:.45:0}),O=this.addShape(t,{type:"path",id:this.getElementId("item-"+n.id+"-radio"),name:"legend-item-radio",attrs:D});return O.set("tip",i.tip),O},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(O){return O.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)({},uo,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 F=this.get("maxRow")||1,T=g+(F===1?0:C);this.pageHeight=T*F,(0,c.each)(l,function(O){var W=O.getBBox(),rt=f||W.width;(w&&w<x.x+rt+v||u<x.x+rt+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+=T),n.moveElementTo(O,x),O.getParent().setClip({type:"rect",attrs:{x:x.x,y:x.y,width:rt+v,height:g}}),x.x+=rt+v})}else{(0,c.each)(l,function(O){var W=O.getBBox();W.width>b&&(b=W.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 D=Math.floor(this.pageHeight/(g+C));(0,c.each)(l,function(O,W){W!==0&&W%D==0&&(_+=1,x.x+=b,x.y=o),n.moveElementTo(O,x),O.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,ho,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,co,i==="horizontal"?"down":"right",h,f);return m.on("click",this.onNavigationAfter),s},r.prototype.updateNavigation=function(t){var i=(0,c.deepMix)({},uo,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(ho)):this.getElementByLocalId(ho),v=t?t.findById(this.getElementId(co)):this.getElementByLocalId(co);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},Ll[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},Ll[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=Vi(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}(Tl),Ng=Rg,zg=1.4,Ol=.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:Rt.textColor,textBaseline:"middle",fontFamily:Rt.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:Rt.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*Ol;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*Ol;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}(Tl),Gg=Vg,Ue,Wg=(Ue={},Ue[""+He]={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:Rt.fontFamily,lineHeight:"20px",padding:"10px 10px 6px 10px"},Ue[""+Ni]={position:"absolute",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)"},Ue[""+sr]={marginBottom:"4px"},Ue[""+zi]={margin:"0px",listStyleType:"none",padding:"0px"},Ue[""+Ln]={listStyleType:"none",marginBottom:"4px"},Ue[""+On]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},Ue[""+In]={display:"inline-block",float:"right",marginLeft:"30px"},Ue[""+eo]={position:"absolute",width:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},Ue[""+ro]={position:"absolute",height:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},Ue);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="'+He+'"><div class="'+sr+'"></div><ul class="'+zi+'"></ul></div>',itemTpl:'<li class="'+Ln+`" data-index={index}>
  27. <span class="`+On+`" style="background:{color}"></span>
  28. <span class="`+xl+`">{name}</span>:
  29. <span class="`+In+`">{value}</span>
  30. </li>`,xCrosshairTpl:'<div class="'+eo+'"></div>',yCrosshairTpl:'<div class="'+ro+'"></div>',title:null,showTitle:!0,region:null,crosshairsRegion:null,containerClassName:He,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,B.Z)(t,{visibility:"visible"}),this.setCrossHairsVisible(!0))},r.prototype.hide=function(){var t=this.getContainer();!t||this.destroyed||(this.set("visible",!1),(0,B.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,B.Z)(n,{display:i}),a&&(0,B.Z)(a,{display:i})},r.prototype.setCustomContainer=function(){var t=document.createElement("div");t.className=Ni,this.set("container",t),this.set("containerClassName",Ni)},r.prototype.initContainer=function(){if(e.prototype.initContainer.call(this),this.get("customContent")){this.get("container")&&this.get("container").remove(),this.setCustomContainer();var t=this.getHtmlContentNode(),i=this.get("container");i.appendChild(t),this.get("parent").appendChild(i),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,B.Z)(h,{left:Me(y.x+o),top:Me(y.y+s)}),this.resetCrosshairs()},r.prototype.renderCustomContent=function(){var t=this.getHtmlContentNode(),i=this.get("container"),n=Qa(i,He);if(n){this.setCustomContainer(),i=this.get("container");var a=this.get("parent"),o=a.querySelector("."+He);a.removeChild(o)}i.innerHTML="",i.appendChild(t),n&&this.get("parent").appendChild(i),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,M.Z)(n)}return t},r.prototype.cacheDoms=function(){var t=this.getContainer(),i=t.getElementsByClassName(sr)[0],n=t.getElementsByClassName(zi)[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,B.Z)(n,{left:Me(a),top:Me(i.y),height:Me(i.height)}):(0,B.Z)(n,{top:Me(a),left:Me(i.x),width:Me(i.width)})},r.prototype.checkCrosshair=function(t){var i=t+"CrosshairDom",n=t+"CrosshairTpl",a="CROSSHAIR_"+t.toUpperCase(),o=k[a],s=this.get(i),l=this.get("parent");return s||(s=(0,M.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,M.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}(io),Zg=Ug,Kg={opacity:0},qg={stroke:"#C5C5C5",strokeOpacity:.85},$g={fill:"#CACED4",opacity:.85},Dn=A(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 Il(e){return Qg(e)}function Jg(e){if(e.length<=2)return Il(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,Dn.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 Ii.bJ({values:e}),a=new Ii.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):Il(o)}function ep(e,r){var t=new Ii.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),jT=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),UT=null,np={fill:"#416180",opacity:.05},ap={fill:"#5B8FF9",opacity:.15,cursor:"move"},kn=10,op={width:kn,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)}),F=this.addShape(t,{id:this.getElementId("foreground"),name:"foreground",type:"rect",attrs:(0,d.__assign)({y:0,height:s},y)}),T=(0,c.get)(_,"width",kn),D=(0,c.get)(_,"height",24);this.minHandler=this.addComponent(t,{component:Dl,id:this.getElementId("minHandler"),name:"handler-min",x:0,y:(s-D)/2,width:T,height:D,cursor:"ew-resize",style:_}),this.maxHandler=this.addComponent(t,{component:Dl,id:this.getElementId("maxHandler"),name:"handler-max",x:0,y:(s-D)/2,width:T,height:D,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",kn);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",kn),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),ZT=null,ii=A(57817),cp={trackColor:"rgba(0,0,0,0)",thumbColor:"rgba(0,0,0,0.15)",size:8,lineCap:"round"},fo={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:fo})},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)({},fo,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)({},fo,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,Bn=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 fe(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=fe(e,r,t,i),s=fe(e,r,t,n),l=fe(e,r,a,i),u=fe(e,r,a,n);if(n-i==Math.PI*2){var h=fe(e,r,t,i+Math.PI),f=fe(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=fe(e,r,t,i),o=fe(e,r,t,n);if((0,c.isNumberEqual)(n-i,Math.PI*2)){var s=fe(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 Yi(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 Le(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 Fe=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 E.TOP:case E.TOP_LEFT:case E.TOP_RIGHT:return e.fromRange(this.minX,this.minY+n,this.maxX,this.maxY);case E.RIGHT:case E.RIGHT_TOP:case E.RIGHT_BOTTOM:return e.fromRange(this.minX,this.minY,this.maxX-i,this.maxY);case E.BOTTOM:case E.BOTTOM_LEFT:case E.BOTTOM_RIGHT:return e.fromRange(this.minX,this.minY,this.maxX,this.maxY-n);case E.LEFT:case E.LEFT_TOP:case E.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}(),KT=function(e,r){var t=r.start,i=r.end;return new Fe(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 Xi(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 Rn(e,r){var t=e.getCenter();return Math.sqrt(Math.pow(r.x-t.x,2)+Math.pow(r.y-t.y,2))}function bp(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 Sp(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 Fe.fromRange(o-r,s-r,o+n+r,s+a+r)}var Cp=/^(?:(?!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 Ap(e){var r="linear";return Cp.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"&&xt.includes(t)&&["interval"].includes(i)||e.isCategory?"cat":e.type}function Fp(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,Ii.yZ)("identity");return new n({field:e.toString(),values:[e]})}var a=(0,c.valuesOfKey)(i,e),o=(0,c.get)(t,"type",Ap(a[0])),s=(0,Ii.yZ)(o);return new s((0,d.__assign)({field:e,values:a},t))}function Ep(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 ji(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 Mp(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 Tp(e){var r,t;switch(e){case E.TOP:r={x:0,y:1},t={x:1,y:1};break;case E.RIGHT:r={x:1,y:0},t={x:1,y:1};break;case E.BOTTOM:r={x:0,y:0},t={x:1,y:0};break;case E.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 Lp(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 Nn(e,r){var t={start:{x:0,y:0},end:{x:0,y:0}};e.isRect?t=Tp(r):e.isPolar&&(t=Lp(e));var i=t.start,n=t.end;return{start:e.convert(i),end:e.convert(n)}}function qT(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 zn(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?Mt.angle(o,s):Mt.angle(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 Vn(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"],ji(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(Q.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=Vn(s,u),v=Vn(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={},Op=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}(),ae=Ip,Pp=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}(ae),Dp=Pp,Gn={};function kp(e,r){var t=Gn[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 Wn(e){var r=Gn[e];return(0,c.get)(r,"ActionClass")}function bt(e,r,t){Gn[e]={ActionClass:r,cfg:t}}function $T(e){delete Gn[e]}function Bp(e,r){var t=new Dp(r);return t.callback=e,t.name="callback",t}function Rp(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 Np(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=Rn(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 zp(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 Vp=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=Mt.min([0,0],u,m),h=Mt.max([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];_=Mt.sub(_,l,s),_=Mt.scale(_,_,r);var w=Mt.distance(m,s),b=Mt.distance(m,l),S=w+b;S!==0&&(w/=S,b/=S);var C=Mt.scale([0,0],_,-w),F=Mt.scale([0,0],_,b);v=Mt.add([0,0],m,C),f=Mt.add([0,0],m,F),f=Mt.min([0,0],f,Mt.max([0,0],l,m)),f=Mt.max([0,0],f,Mt.min([0,0],l,m)),C=Mt.sub([0,0],f,m),C=Mt.scale([0,0],C,-w/b),v=Mt.add([0,0],m,C),v=Mt.min([0,0],v,Mt.max([0,0],s,m)),v=Mt.max([0,0],v,Mt.min([0,0],s,m)),F=Mt.sub([0,0],m,v),F=Mt.scale([0,0],F,b/w),f=Mt.add([0,0],m,F),o&&(v=Mt.max([0,0],v,u),v=Mt.min([0,0],v,h),f=Mt.max([0,0],f,u),f=Mt.min([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=Vp(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 Ui(e,r){return Rp(e,r)}function Hn(e,r,t){var i=[],n=e[0],a=null;if(e.length<=2)return Ui(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 Gp(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 Wp(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(Np(i,n,e)):t.push(po(s,e));break;case"a":t.push(Zl(s,e));break;case"z":default:t.push(s);break}}),zp(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 Hp(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 Zi(e){return e&&e.component&&e.component.isList()}function Ql(e){return e&&e.component&&e.component.isSlider()}function Ki(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=Hp(e,r);return i?jp(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 Yp(e,r,t){var i=we(e);return i.filter(function(n){return Ze(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 Ze(e,r){var t=e.getModel(),i=t.data,n;return(0,c.isArray)(i)?n=i[0][r]:n=i[r],n}function Xp(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();Xp(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 jp(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,Dn.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 Up(e,r){if(e.length<=2)return Ui(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 Qe(e){var r=e.parent,t=null;return r&&(t=r.views.filter(function(i){return i!==e})),t}function Zp(e,r){var t=e.getCoordinate();return t.invert(r)}function _o(e,r,t){var i=Zp(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 Kp=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}(),qp=Kp,$p=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}(),Qp=$p;function au(e,r,t){var i=e.split(":"),n=i[0],a=r.getAction(n)||kp(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"},Jp=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 qp(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:Bp(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}(Qp),ty=Jp,su={};function ey(e){return su[(0,c.lowerCase)(e)]}function It(e,r){su[(0,c.lowerCase)(e)]=r}function ry(e,r,t){var i=ey(e);if(!i)return null;if((0,c.isPlainObject)(i)){var n=(0,c.mix)((0,c.clone)(i),t);return new ty(r,n)}else{var a=i;return new a(r,t)}}function iy(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 ny(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=iy(e),n=ny(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=Yi(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:ee.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(He)]={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(zi)]={margin:0,listStyleType:"none",padding:0},r["".concat(Ln)]={listStyleType:"none",padding:0,marginBottom:"12px",marginTop:"12px",marginLeft:0,marginRight:0},r["".concat(On)]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},r["".concat(In)]={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 Zt={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"},ay=["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"],oy=["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"],sy=["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"],uu=function(e){e===void 0&&(e={});var r=e.paletteQualitative10,t=r===void 0?ay:r,i=e.paletteQualitative20,n=i===void 0?oy: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:sy,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:Zt[25],axisLineBorder:1,axisLineDash:null,axisTitleTextFillColor:Zt[65],axisTitleTextFontSize:12,axisTitleTextLineHeight:12,axisTitleTextFontWeight:"normal",axisTitleSpacing:12,axisDescriptionIconFillColor:ui[85],axisTickLineBorderColor:Zt[25],axisTickLineLength:4,axisTickLineBorder:1,axisSubTickLineBorderColor:Zt[15],axisSubTickLineLength:2,axisSubTickLineBorder:1,axisLabelFillColor:Zt[45],axisLabelFontSize:12,axisLabelLineHeight:12,axisLabelFontWeight:"normal",axisLabelOffset:8,axisGridBorderColor:Zt[15],axisGridBorder:1,axisGridLineDash:null,legendTitleTextFillColor:Zt[45],legendTitleTextFontSize:12,legendTitleTextLineHeight:21,legendTitleTextFontWeight:"normal",legendMarkerColor:o,legendMarkerSpacing:8,legendMarkerSize:4,legendCircleMarkerSize:4,legendSquareMarkerSize:4,legendLineMarkerSize:5,legendItemNameFillColor:Zt[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:Zt[100],legendPageNavigatorMarkerInactiveFillOpacity:.45,legendPageNavigatorMarkerFillColor:Zt[100],legendPageNavigatorMarkerFillOpacity:1,legendPageNavigatorTextFillColor:Zt[45],legendPageNavigatorTextFontSize:12,sliderRailFillColor:Zt[15],sliderRailBorder:0,sliderRailBorderColor:null,sliderRailWidth:100,sliderRailHeight:12,sliderLabelTextFillColor:Zt[45],sliderLabelTextFontSize:12,sliderLabelTextLineHeight:12,sliderLabelTextFontWeight:"normal",sliderHandlerFillColor:Zt[6],sliderHandlerWidth:10,sliderHandlerHeight:14,sliderHandlerBorder:1,sliderHandlerBorderColor:Zt[25],annotationArcBorderColor:Zt[15],annotationArcBorder:1,annotationLineBorderColor:Zt[25],annotationLineBorder:1,annotationLineDash:null,annotationTextFillColor:Zt[65],annotationTextFontSize:12,annotationTextLineHeight:12,annotationTextFontWeight:"normal",annotationTextBorderColor:null,annotationTextBorder:0,annotationRegionFillColor:Zt[100],annotationRegionFillOpacity:.06,annotationRegionBorder:0,annotationRegionBorderColor:null,annotationDataMarkerLineLength:16,tooltipCrosshairsBorderColor:Zt[25],tooltipCrosshairsBorder:1,tooltipCrosshairsLineDash:null,tooltipContainerFillColor:"rgb(255, 255, 255)",tooltipContainerFillOpacity:.95,tooltipContainerShadow:"0px 0px 10px #aeaeae",tooltipContainerBorderRadius:3,tooltipTextFillColor:Zt[65],tooltipTextFontSize:12,tooltipTextLineHeight:12,tooltipTextFontWeight:"bold",labelFillColor:Zt[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:Zt[65],overflowLabelFontSize:12,overflowLabelLineHeight:12,overflowLabelFontWeight:"normal",overflowLabelBorderColor:ui[100],overflowLabelBorder:1,labelLineBorder:1,labelLineBorderColor:Zt[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:Zt[100],pointSelectedBorder:2,pointSelectedBorderColor:Zt[100],pointInactiveFillOpacity:.3,pointInactiveBorderOpacity:.3,hollowPointSize:4,hollowPointBorder:1,hollowPointBorderColor:o,hollowPointBorderOpacity:.95,hollowPointFillColor:ui[100],hollowPointActiveBorder:1,hollowPointActiveBorderColor:Zt[100],hollowPointActiveBorderOpacity:1,hollowPointSelectedBorder:2,hollowPointSelectedBorderColor:Zt[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:Zt[100],hollowAreaSelectedBorder:3,hollowAreaSelectedBorderColor:Zt[100],hollowAreaInactiveBorderOpacity:.3,intervalFillColor:o,intervalFillOpacity:.95,intervalActiveBorder:1,intervalActiveBorderColor:Zt[100],intervalActiveBorderOpacity:1,intervalSelectedBorder:2,intervalSelectedBorderColor:Zt[100],intervalSelectedBorderOpacity:1,intervalInactiveBorderOpacity:.3,intervalInactiveFillOpacity:.3,hollowIntervalBorder:2,hollowIntervalBorderColor:o,hollowIntervalBorderOpacity:1,hollowIntervalFillColor:ui[100],hollowIntervalActiveBorder:2,hollowIntervalActiveBorderColor:Zt[100],hollowIntervalSelectedBorder:3,hollowIntervalSelectedBorderColor:Zt[100],hollowIntervalSelectedBorderOpacity:1,hollowIntervalInactiveBorderOpacity:.3};return(0,d.__assign)((0,d.__assign)({},s),e)},QT=uu();function Yn(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 ly=Yn({}),wo={default:ly};function qi(e){return(0,c.get)(wo,(0,c.lowerCase)(e),wo.default)}function uy(e,r){wo[(0,c.lowerCase)(e)]=Yn(r)}function cu(e,r,t){var i=t.translate(e),n=t.translate(r);return(0,c.isNumberEqual)(i,n)}function cy(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[tt];return h[a][0]<=s&&h[a][1]>=s});return l||e[e.length-1]}var hy=(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 fy(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 vy(e){var r=(0,c.values)(e.attributes);return(0,c.filter)(r,function(t){return(0,c.contains)(xt,t.type)})}function fu(e){var r,t,i=vy(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 dy(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 gy(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 ji(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[tt],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=cy(e,t),S=_[tt][o],C=_[tt][s],F=w[tt][o],T=a.isLinear&&(0,c.isArray)(C);if((0,c.isArray)(S)){for(var p=0;p<r.length;p++){var D=r[p],m=D[tt];if(n.translate(m[o][0])<=b&&n.translate(m[o][1])>=b)if(T)(0,c.isArray)(l)||(l=[]),l.push(D);else{l=D;break}}(0,c.isArray)(l)&&(l=hu(l,e,t))}else{var O=void 0;if(!n.isLinear&&n.type!=="timeCat"){for(var p=0;p<r.length;p++){var D=r[p],m=D[tt];if(cu(m[o],b,n))if(T)(0,c.isArray)(l)||(l=[]),l.push(D);else{l=D;break}else n.translate(m[o])<=b&&(w=D,O=r[p+1])}(0,c.isArray)(l)&&(l=hu(l,e,t))}else{if((b>n.translate(F)||b<n.translate(S))&&(b>n.max||b<n.min))return null;for(var W=0,rt=r.length-1,_t=void 0;W<=rt;){_t=Math.floor((W+rt)/2);var Ct=r[_t][tt][o];if(cu(Ct,b,n))return r[_t];n.translate(Ct)<=n.translate(b)?(W=_t+1,w=r[_t],O=r[_t+1]):(rt===0&&(w=r[0]),rt=_t-1)}}w&&O&&Math.abs(n.translate(w[tt][o])-b)>Math.abs(n.translate(O[tt][o])-b)&&(w=O)}var Vt=hy(t.getXScale());return!l&&Math.abs(n.translate(w[tt][o])-b)<=Vt/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[tt],s=fy(o,r,t),l=r.tooltipOption,u=r.theme.defaultColor,h=[],f,v;function g(D,O){if(i||!(0,c.isNil)(O)&&O!==""){var W={title:s,data:o,mappingData:e,name:D,value:O,color:e.color||u,marker:!0};h.push(W)}}if((0,c.isObject)(l)){var p=l.fields,y=l.callback;if(y){var m=p.map(function(D){return e[tt][D]}),x=y.apply(void 0,(0,d.__spreadArray)([],(0,d.__read)(m),!1)),_=(0,d.__assign)({data:e[tt],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 F=w[C];f=ji(F),v=F.getText(o[C]),g(f,v)}}}catch(D){n={error:D}}finally{try{S&&!S.done&&(a=b.return)&&a.call(b)}finally{if(n)throw n.error}}}}else{var T=fu(r);v=dy(o,T),f=gy(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 py(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 yy(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 Xn={};function Nr(e,r){Xn[e]=r}function JT(e){delete Xn[e]}function my(){return Object.keys(Xn)}function xy(e){return Xn[e]}var _y=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=pd(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}(),wy=_y,by=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 z.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}(),se=by;function Sy(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 Cy=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=Fp(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?(Ep(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}(),jn=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 E.TOP:case E.TOP_LEFT:case E.TOP_RIGHT:this.top+=n;break;case E.RIGHT:case E.RIGHT_TOP:case E.RIGHT_BOTTOM:this.right+=i;break;case E.BOTTOM:case E.BOTTOM_LEFT:case E.BOTTOM_RIGHT:this.bottom+=n;break;case E.LEFT:case E.LEFT_TOP:case E.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 Ay(e){var r=e.padding;if(!yy(r))return new(jn.bind.apply(jn,(0,d.__spreadArray)([void 0],(0,d.__read)(Co(r)),!1)));var t=e.viewBBox,i=new jn,n=[],a=[],o=[];return(0,c.each)(e.getComponents(),function(s){var l=s.type;l===R.AXIS?n.push(s):[R.LEGEND,R.SLIDER,R.SCROLLBAR].includes(l)?a.push(s):l!==R.GRID&&l!==R.TOOLTIP&&o.push(s)}),(0,c.each)(n,function(s){var l=s.component,u=l.getLayoutBBox(),h=new Fe(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 Fe(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 Fe(h.x,h.y,h.width,h.height);i.inc(f,u)}),i}function Fy(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=my(),i.scalePool=new Cy,i.layoutFunc=Sy,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)({},qi("default"),Yn(y)):qi(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(L.BEFORE_RENDER,se.fromData(this,L.BEFORE_RENDER,i)),this.paint(t),this.emit(L.AFTER_RENDER,se.fromData(this,L.AFTER_RENDER,i)),this.visible===!1&&this.changeVisible(!1)},r.prototype.clear=function(){var t=this;this.emit(L.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(L.AFTER_CLEAR)},r.prototype.destroy=function(){this.emit(L.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=Op(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,Yn(t)):qi(t),this},r.prototype.interaction=function(t,i){var n=this.interactions[t];n&&n.destroy();var a=ry(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(L.BEFORE_CHANGE_DATA,se.fromData(this,L.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(L.AFTER_CHANGE_DATA,se.fromData(this,L.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:Z.BG}),middleGroup:this.middleGroup.addGroup({zIndex:Z.MID}),foregroundGroup:this.foregroundGroup.addGroup({zIndex:Z.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===Q.BG?this.backgroundGroup:t===Q.MID?this.middleGroup:t===Q.FORE?this.foregroundGroup:this.foregroundGroup},r.prototype.isPointInPlot=function(t){return bp(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(L.BEFORE_PAINT),this.renderPaddingRecursive(t),this.renderLayoutRecursive(t),this.renderBackgroundStyleShape(),this.renderPaintRecursive(t),this.emit(L.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=Ay(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?Fy:(0,c.isFunction)(this.syncViewPadding)?this.syncViewPadding:void 0;i&&(i(this,this.views,jn),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 Fe(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 Fe(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=xy(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 se(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=U.MOUSE_LEAVE,this.emit(U.MOUSE_LEAVE,u)),u.type=U.LEAVE,this.emit(U.LEAVE,u)):!this.isPreMouseInPlot&&l&&(i==="mousemove"&&(u.type=U.MOUSE_ENTER,this.emit(U.MOUSE_ENTER,u)),u.type=U.ENTER,this.emit(U.ENTER,u)),this.isPreMouseInPlot=l):(i==="mouseleave"||i==="touchend")&&this.isPreMouseInPlot&&(i==="mouseleave"&&(u.type=U.MOUSE_LEAVE,this.emit(U.MOUSE_LEAVE,u)),u.type=U.LEAVE,this.emit(U.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=this.getComponents(),n=0;n<i.length;n++){var a=i[n];a.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 wy(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 F=this.getController("annotation"),T=0;T<f.length;T++){var D=f[T];F.annotation(D)}g&&(0,c.each)(g,function(O,W){t.on(W,O)}),p&&(0,c.each)(p,function(O){var W=O.type,rt=(0,d.__rest)(O,["type"]);t.facet(W,rt)})},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}(G);function Je(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 Ey=pu,My=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,F=t.limitInPlot,T=t.theme,D=t.syncViewPadding,O=(0,c.isString)(n)?document.getElementById(n):n,W=(0,M.Z)('<div style="position:relative;"></div>');O.appendChild(W);var rt=N(O,l,a,o),_t=oe(v),Ct=new _t.Canvas((0,d.__assign)({container:W,pixelRatio:g,localRefresh:y,supportCSSTransform:w},rt));return i=e.call(this,{parent:null,canvas:Ct,backgroundGroup:Ct.addGroup({zIndex:Z.BG}),middleGroup:Ct.addGroup({zIndex:Z.MID}),foregroundGroup:Ct.addGroup({zIndex:Z.FORE}),padding:u,appendPadding:h,visible:x,options:C,limitInPlot:F,theme:T,syncViewPadding:D})||this,i.onResize=(0,c.debounce)(function(){i.forceFit()},300),i.ele=O,i.canvas=Ct,i.width=rt.width,i.height=rt.height,i.autoFit=l,i.localRefresh=y,i.renderer=v,i.wrapperElement=W,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(L.BEFORE_CHANGE_SIZE),this.width=t,this.height=i,this.canvas.changeSize(t,i),this.render(!0),this.emit(L.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,B.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}(Ey),Ty=My,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 Ly(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 Oy=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",se.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",se.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",se.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(O){a={error:O}}finally{try{p&&!p.done&&(o=g.return)&&o.call(g)}finally{if(a)throw a.error}}}}catch(O){i={error:O}}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),F=C.next();!F.done;F=C.next()){var T=F.value,D=Math.abs(t.y-T[0].y);D<=S&&(b=T,S=D)}}catch(O){s={error:O}}finally{try{F&&!F.done&&(l=C.return)&&l.call(C)}finally{if(s)throw s.error}}u=[b]}return Ly((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 Fe(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 Bn((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=this.view.getTheme(),_=(0,c.get)(x,["components","tooltip","marker"],{}),w=(0,d.__assign)((0,d.__assign)({fill:f.color,symbol:"circle",shadowColor:f.color},(0,c.isFunction)(i)?(0,d.__assign)((0,d.__assign)({},_),i(f)):i),{x:v,y:g});o.addShape("marker",{attrs:w})}}catch(b){n={error:b}}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(),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=fe(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 El(h),f.init()),f.render(),f.show(),this.xCrosshair=f},r.prototype.renderYCrosshairs=function(t,i){var n=this.getViewWithGeometry(this.view).getCoordinate(),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:Rn(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 J[o](a),u.init()):u.update(a):(u=new J[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=Oy,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 Py(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",tt),n=r.animation,a=Py(r,i);if(n){var o=xu(n);o&&o(e,a,t)}else e.animate(t.toAttrs,a)}function Dy(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",ky=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(X.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(X.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(X.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}(G),bu=ky,Su={},Cu={};function By(e){return Su[e.toLowerCase()]}function $i(e,r){Su[e.toLowerCase()]=r}function Ry(e){return Cu[e.toLowerCase()]}function Oe(e,r){Cu[e.toLowerCase()]=r}var Ny={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)}},zy={coordinate:null,parsePath:function(e){var r=this.coordinate,t=(0,Dn.tr)(e);return r.isPolar?t=Wp(r,t):t=Gp(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)({},Ny),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)({},zy),t);return n[r]=a,a}function Au(e){var r=(0,c.upperFirst)(e);return Fo[r]}function Vy(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 Qi(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 Gy=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,F=t.multiplePieWidthRatio,T=t.zIndexReversed,D=t.sortZIndex,O=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=F,i.zIndexReversed=T,i.sortZIndex=D,i.useDeferredLabel=O?typeof O=="number"?O:Infinity:null,i}return r.prototype.position=function(t){var i=t;(0,c.isPlainObject)(t)||(i={fields:Qi(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=Qi(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=Qi(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=Qi(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())});Dy(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){xt.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[tt];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=xt.length;n<a;n++){var o=xt[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[tt][n])-i.translate(l[tt][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[tt],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,F=b.removed;try{for(var T=(0,d.__values)(S),D=T.next();!D.done;D=T.next()){var _=D.value,x=h.get(_),p=v.get(_),O=this.createElement(x,p,i);this.elements[p]=O,this.elementsMap[_]=O,O.shape&&O.shape.set("zIndex",this.zIndexReversed?this.elements.length-p:p)}}catch(at){n={error:at}}finally{try{D&&!D.done&&(a=T.return)&&a.call(T)}finally{if(n)throw n.error}}try{for(var W=(0,d.__values)(C),rt=W.next();!rt.done;rt=W.next()){var _=rt.value,O=this.lastElementsMap[_],x=h.get(_),_t=this.getDrawCfg(x),Ct=O.getModel(),p=v.get(_);(this.isCoordinateChanged||Fu(_t,Ct))&&(O.animate=this.animateOption,O.update(_t)),this.elements[p]=O,this.elementsMap[_]=O,O.shape&&O.shape.set("zIndex",this.zIndexReversed?this.elements.length-p:p)}}catch(at){o={error:at}}finally{try{rt&&!rt.done&&(s=W.return)&&s.call(W)}finally{if(o)throw o.error}}this.container&&this.container.sort();try{for(var Vt=(0,d.__values)(F),Y=Vt.next();!Y.done;Y=Vt.next()){var _=Y.value,O=this.lastElementsMap[_];O.animate=this.animateOption,O.destroy()}}catch(at){l={error:at}}finally{try{Y&&!Y.done&&(u=Vt.return)&&u.call(Vt)}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=Qi(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]&&xt.includes(v)){var F=Vl(C,(0,c.get)(t.scaleDefs,S),v,t.type);F==="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(F){return F.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[tt]=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(F){i={error:F}}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=Xi(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],F=(0,d.__assign)({xField:p,yField:y,intervalPadding:a,dodgePadding:o,xDimensionLength:m,groupNum:x,defaultSize:w,maxColumnWidth:l,minColumnWidth:u,columnWidthRatio:h},C),T=C.type;if(T==="dodge"){var D=[];if(v.isCategory||v.type==="identity")D.push("x");else if(!g)D.push("y");else throw new Error("dodge is not support linear attribute, please use category attribute!");F.adjustNames=D,F.dodgeRatio=h}else if(T==="stack"){var O=this.coordinate;if(!g){F.height=O.getHeight();var W=this.getDefaultValue("size")||3;F.size=W}!O.isTransposed&&(0,c.isNil)(F.reverseOrder)&&(F.reverseOrder=!0)}var rt=ot(T);F.dimValuesMap={},v&&v.values&&(F.dimValuesMap[v.field]=v.values.map(function(Ct){return v.translate(Ct)}));var _t=new rt(F);f=_t.process(f),this.adjusts[T]=_t}}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 Vy(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[tt],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(X.BEFORE_RENDER_LABEL),n||(a=this.getLabelType(),o=By(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],F=m.elementsMap[C.get("elementId")||w.split(" ")[0]];if(F){C.cfg.name=["element","label"],C.cfg.element=F;var T=l.get(F)||new Set;T.add(_),l.set(F,T)}}});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(X.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}(G),br=Gy,Un=ee.vs;function Ji(e,r,t){var i=Un(e.getMatrix(),[["t",r,t]]);e.setMatrix(i)}function Wy(e,r){var t=e.attr(),i=t.x,n=t.y,a=Un(e.getMatrix(),[["t",-i,-n],["r",r],["t",i,n]]);return a}function Eo(e,r){var t=Wy(e,r);e.setMatrix(t)}function tL(){return[1,0,0,0,1,0,0,0,1]}function Hy(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=Un(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 Yy(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 Xy(e,r){var t=e.getBBox();return(0,c.some)(r,function(i){var n=i.getBBox();return Yy(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 jy=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=r.capture,f={id:i,elementId:n,capture:h,data:a,origin:(0,d.__assign)((0,d.__assign)({},o),{data:o[tt]}),coordinate:s},v=t.addGroup((0,d.__assign)({name:"label",animateCfg:this.animate===!1||l===null||l===!1?!1:(0,c.deepMix)({},this.animate,l)},f)),g;if(u.isGroup&&u.isGroup()||u.isShape&&u.isShape()){var p=u.getCanvasBBox(),y=p.width,m=p.height,x=(0,c.get)(r,"textAlign","left"),_=r.x,w=r.y-m/2;x==="center"?_=_-y/2:(x==="right"||x==="end")&&(_=_-y),Ji(u,_,w),g=u,v.add(u)}else{var b=(0,c.get)(r,["style","fill"]);g=v.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)(b)?r.color:b})},f))}return r.rotate&&Eo(g,r.rotate),v},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=Ry((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=fe(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}(),Uy=jy;function Lu(e){var r=0;return(0,c.each)(e,function(t){r+=t}),r/e.length}var Zy=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[tt],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 Uy({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[tt],m=t.getLabelText(y,f),x;if(u){var _=l.map(function(F){return y[F]});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}(),Zn=Zy;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]]}},Ky=["line","cross","tick","plus","hyphen"];function qy(e,r){return(0,c.isFunction)(r)?r(e):(0,c.deepMix)({},e,r)}function $y(e,r){var t=e.symbol;if((0,c.isString)(t)&&Ky.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 Ou(e){var r=e.symbol;(0,c.isString)(r)&&zr[r]&&(e.symbol=zr[r])}function To(e){return e.startsWith(E.LEFT)||e.startsWith(E.RIGHT)?"vertical":"horizontal"}function Iu(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(F){var T;F.filterFieldData(o,[(T={},T[o]=x,T)]).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,Le((0,d.__assign)({},C),["style"])),$y(S,w),C&&C.style&&(S.style=qy(S.style,C.style)),Ou(S),{id:x,name:m,value:x,marker:S,unchecked:_}})}return[]}function Qy(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 Ou(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 Kn(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=Hn(t,!1),o=Hn(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 ce(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 Oo(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 Jy={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:Jy[r],style:{lineWidth:2,r:6,stroke:t}}}function t0(e,r,t){for(var i=e.isStack,n=e.connectNulls,a=e.isInCircle,o=e.showSinglePoint,s=ce(e,!0,!1,"lineWidth"),l=Kn(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 Io(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=Hn(e,!1,i)):(a=Ui(e,!1),r&&a.push(["Z"])),a}function e0(e,r,t,i,n,a){var o=[],s=[];(0,c.each)(e,function(h){var f=Oo(h);o.push(f[1]),s.push(f[0])});var l=Io(o,r,i,n,a),u=Io(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)?e0(e,r,t,i,n,a):Io(e,r,i,n,a)}return[]}var eL=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=t0(r,i,n),u=t.addShape({type:"path",attrs:l,name:"line",capture:!i});return u},getMarker:function(r){return Nu(r,e)}})});var rL=null,iL="4.2.8",Ie={getLegendItems:Iu,translate:Ji,rotate:Eo,zoom:Hy,transform:Un,getAngle:Yi,getSectorPath:mr,polarToCartesian:fe,getDelegationObject:Rr,getTooltipItems:bo,getMappingValue:Mo,getPath:zu,getPathPoints:Kn},Cr={100:"#000",95:"#0D0D0D",85:"#262626",65:"#595959",45:"#8C8C8C",25:"#BFBFBF",15:"#D9D9D9",6:"#F0F0F0"},Jt={100:"#FFFFFF",95:"#F2F2F2",85:"#D9D9D9",65:"#A6A6A6",45:"#737373",25:"#404040",15:"#262626",6:"#0F0F0F"},Ke=["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#E86452","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"],r0=["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#E86452","#F8D0CB","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"],i0=["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"],n0=function(e){e===void 0&&(e={});var r=e.paletteQualitative10,t=r===void 0?Ke:r,i=e.paletteQualitative20,n=i===void 0?r0: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:i0,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:Jt[25],axisLineBorder:1,axisLineDash:null,axisTitleTextFillColor:Jt[65],axisTitleTextFontSize:12,axisTitleTextLineHeight:12,axisTitleTextFontWeight:"normal",axisTitleSpacing:12,axisDescriptionIconFillColor:Cr[85],axisTickLineBorderColor:Jt[25],axisTickLineLength:4,axisTickLineBorder:1,axisSubTickLineBorderColor:Jt[15],axisSubTickLineLength:2,axisSubTickLineBorder:1,axisLabelFillColor:Jt[45],axisLabelFontSize:12,axisLabelLineHeight:12,axisLabelFontWeight:"normal",axisLabelOffset:8,axisGridBorderColor:Jt[15],axisGridBorder:1,axisGridLineDash:null,legendTitleTextFillColor:Jt[45],legendTitleTextFontSize:12,legendTitleTextLineHeight:21,legendTitleTextFontWeight:"normal",legendMarkerColor:Ke[0],legendMarkerSpacing:8,legendMarkerSize:4,legendCircleMarkerSize:4,legendSquareMarkerSize:4,legendLineMarkerSize:5,legendItemNameFillColor:Jt[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:Jt[45],legendPageNavigatorMarkerInactiveFillOpacity:.45,legendPageNavigatorMarkerFillColor:Jt[45],legendPageNavigatorMarkerFillOpacity:1,legendPageNavigatorTextFillColor:Jt[65],legendPageNavigatorTextFontSize:12,sliderRailFillColor:Jt[15],sliderRailBorder:0,sliderRailBorderColor:null,sliderRailWidth:100,sliderRailHeight:12,sliderLabelTextFillColor:Jt[45],sliderLabelTextFontSize:12,sliderLabelTextLineHeight:12,sliderLabelTextFontWeight:"normal",sliderHandlerFillColor:Cr[6],sliderHandlerWidth:10,sliderHandlerHeight:14,sliderHandlerBorder:1,sliderHandlerBorderColor:Cr[25],annotationArcBorderColor:Jt[15],annotationArcBorder:1,annotationLineBorderColor:Jt[25],annotationLineBorder:1,annotationLineDash:null,annotationTextFillColor:Jt[65],annotationTextFontSize:12,annotationTextLineHeight:12,annotationTextFontWeight:"normal",annotationTextBorderColor:null,annotationTextBorder:0,annotationRegionFillColor:Jt[100],annotationRegionFillOpacity:.06,annotationRegionBorder:0,annotationRegionBorderColor:null,annotationDataMarkerLineLength:16,tooltipCrosshairsBorderColor:Jt[25],tooltipCrosshairsBorder:1,tooltipCrosshairsLineDash:null,tooltipContainerFillColor:"#1f1f1f",tooltipContainerFillOpacity:.95,tooltipContainerShadow:"0px 2px 4px rgba(0,0,0,.5)",tooltipContainerBorderRadius:3,tooltipTextFillColor:Jt[65],tooltipTextFontSize:12,tooltipTextLineHeight:12,tooltipTextFontWeight:"bold",labelFillColor:Jt[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:Jt[65],overflowLabelFillColorDark:"#2c3542",overflowLabelFillColorLight:"#ffffff",overflowLabelFontSize:12,overflowLabelLineHeight:12,overflowLabelFontWeight:"normal",overflowLabelBorderColor:Cr[100],overflowLabelBorder:1,labelLineBorder:1,labelLineBorderColor:Jt[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:Ke[0],pointFillOpacity:.95,pointSize:4,pointBorder:1,pointBorderColor:Cr[100],pointBorderOpacity:1,pointActiveBorderColor:Jt[100],pointSelectedBorder:2,pointSelectedBorderColor:Jt[100],pointInactiveFillOpacity:.3,pointInactiveBorderOpacity:.3,hollowPointSize:4,hollowPointBorder:1,hollowPointBorderColor:Ke[0],hollowPointBorderOpacity:.95,hollowPointFillColor:Cr[100],hollowPointActiveBorder:1,hollowPointActiveBorderColor:Jt[100],hollowPointActiveBorderOpacity:1,hollowPointSelectedBorder:2,hollowPointSelectedBorderColor:Jt[100],hollowPointSelectedBorderOpacity:1,hollowPointInactiveBorderOpacity:.3,lineBorder:2,lineBorderColor:Ke[0],lineBorderOpacity:1,lineActiveBorder:3,lineSelectedBorder:3,lineInactiveBorderOpacity:.3,areaFillColor:Ke[0],areaFillOpacity:.25,areaActiveFillColor:Ke[0],areaActiveFillOpacity:.5,areaSelectedFillColor:Ke[0],areaSelectedFillOpacity:.5,areaInactiveFillOpacity:.3,hollowAreaBorderColor:Ke[0],hollowAreaBorder:2,hollowAreaBorderOpacity:1,hollowAreaActiveBorder:3,hollowAreaActiveBorderColor:Jt[100],hollowAreaSelectedBorder:3,hollowAreaSelectedBorderColor:Jt[100],hollowAreaInactiveBorderOpacity:.3,intervalFillColor:Ke[0],intervalFillOpacity:.95,intervalActiveBorder:1,intervalActiveBorderColor:Jt[100],intervalActiveBorderOpacity:1,intervalSelectedBorder:2,intervalSelectedBorderColor:Jt[100],intervalSelectedBorderOpacity:1,intervalInactiveBorderOpacity:.3,intervalInactiveFillOpacity:.3,hollowIntervalBorder:2,hollowIntervalBorderColor:Ke[0],hollowIntervalBorderOpacity:1,hollowIntervalFillColor:Cr[100],hollowIntervalActiveBorder:2,hollowIntervalActiveBorderColor:Jt[100],hollowIntervalSelectedBorder:3,hollowIntervalSelectedBorderColor:Jt[100],hollowIntervalSelectedBorderOpacity:1,hollowIntervalInactiveBorderOpacity:.3};return(0,d.__assign)((0,d.__assign)({},s),e)},a0=n0(),Vu=A(13063),o0=A(73578),s0=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),F=this.getShapeFactory(),T=this.getShapeInfo(y),p=f.get(m),D=new bu({shapeFactory:F,container:this.container,offscreenGroup:this.getOffscreenGroup(),elementIndex:p});D.geometry=this,D.animate=this.animateOption,D.draw(T,i),this.elementsMap[m]=D,this.elements[p]=D}}catch(Vt){n={error:Vt}}finally{try{C&&!C.done&&(a=S.return)&&a.call(S)}finally{if(n)throw n.error}}try{for(var O=(0,d.__values)(w),W=O.next();!W.done;W=O.next()){var m=W.value,y=h.get(m),D=this.lastElementsMap[m],p=f.get(m),T=this.getShapeInfo(y),rt=D.getModel();(this.isCoordinateChanged||Fu(rt,T))&&(D.animate=this.animateOption,D.update(T)),this.elementsMap[m]=D,this.elements[p]=D}}catch(Vt){o={error:Vt}}finally{try{W&&!W.done&&(s=O.return)&&s.call(O)}finally{if(o)throw o.error}}try{for(var _t=(0,d.__values)(b),Ct=_t.next();!Ct.done;Ct=_t.next()){var m=Ct.value,D=this.lastElementsMap[m];D.animate=this.animateOption,D.destroy()}}catch(Vt){l={error:Vt}}finally{try{Ct&&!Ct.done&&(u=_t.return)&&u.call(_t)}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[tt])}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=s0;function l0(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=Hn(p,!1,n):g=Ui(p,!1),v>0&&(g[0][0]="L")),a=a.concat(g)}),a.push(["Z"])}return a}function qn(e,r,t,i,n){for(var a=ce(e,r,!r,"lineWidth"),o=e.connectNulls,s=e.isInCircle,l=e.points,u=e.showSinglePoint,h=Kn(l,o,u),f=[],v=0,g=h.length;v<g;v++){var p=h[v];f=f.concat(l0(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 nL=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=qn(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,fillOpacity:1}}}});var aL=null,u0=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[tt])}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),c0=u0,oL=wr("edge",{defaultShapeType:"line",getDefaultPoints:function(e){return Oo(e)}});jt("edge","line",{draw:function(e,r){var t=ce(e,!0,!1,"lineWidth"),i=Ui(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 sL=null,h0=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),f0=h0,v0=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[tt][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(O){return O[tt][p]<=i[1]&&O[tt][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,F=m.scale(w[tt][p]);this.drawGrayScaleBlurredCircle(S-u.x,C-h.y,n+a,F,y)}}catch(O){o={error:O}}finally{try{_&&!_.done&&(s=x.return)&&s.call(x)}finally{if(o)throw o.error}}var T=y.getImageData(0,0,f,v);this.clearShadowCanvasCtx(),this.colorize(T),y.putImageData(T,0,0);var D=this.getImageShape();D.attr("x",u.x),D.attr("y",h.y),D.attr("width",f),D.attr("height",v),D.attr("img",y.canvas),D.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[tt]});return(0,d.__assign)((0,d.__assign)({},i),{mappingData:t,data:n})},r}(br),d0=v0;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(),_=Yi(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(T){return Math.pow(T,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 g0(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 tn(e,r){return[r,e]}function p0(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)(tn(v,p),2),v=i[0],p=i[1]),r.isReflect("y")&&(n=(0,d.__read)(tn(f,v),2),f=n[0],v=n[1],a=(0,d.__read)(tn(g,p),2),g=a[0],p=a[1]),r.isReflect("x")&&(o=(0,d.__read)(tn(f,p),2),f=o[0],p=o[1],s=(0,d.__read)(tn(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 lL=wr("interval",{defaultShapeType:"rect",getDefaultPoints:function(e){return Do(e)}});jt("interval","rect",{draw:function(e,r){var t=ce(e,!1,!0),i=r,n=e==null?void 0:e.background;if(n){i=r.addGroup({name:"interval-group"});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=p0(this.parsePoints(e.points),this.coordinate,t.radius):s=this.parsePath(g0(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 uL=null;function y0(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 m0(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=Xi(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=y0(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=m0(a,S);if(!(0,c.isNil)(u)&&u>=0){var F=u/s;x=(x-F*(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 T=h/s;x>T&&(x=T)}if(!(0,c.isNil)(f)&&f>=0){var D=f/s;x<D&&(x=D)}return x}var x0=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=Xi(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:Mp(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),_0=x0,w0=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),b0=w0,Xu=["circle","square","bowtie","diamond","hexagon","triangle","triangle-down"],S0=["cross","tick","plus","hyphen","line"];function Ro(e,r,t,i,n){var a,o,s=ce(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 cL=wr("point",{defaultShapeType:"hollow-circle",getDefaultPoints:function(e){return Oo(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 hL=null,C0=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),A0=C0;function F0(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 fL=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=ce(e,!0,!0),i=this.parsePath(F0(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 vL=null,E0=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),M0=E0,dL=wr("schema",{defaultShapeType:""}),gL=null,T0=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=Xi(o);n=n/s}else this.defaultSize||(this.defaultSize=Bo(this)),n=this.defaultSize;return i.size=n,i},r}(br),L0=T0;function O0(e){if(!(0,c.isArray)(e))return[];var r=(0,c.max)(e);return(0,c.map)(e,function(t){return t/r})}var pL=wr("violin",{defaultShapeType:"violin",getDefaultPoints:function(e){var r=e.size/2,t=[],i=O0(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=ce(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 yL=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=Xi(o);n=n/s}else this.defaultSize||(this.defaultSize=Bo(this)),n=this.defaultSize;return i.size=n,i._size=(0,c.get)(t[tt],[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),P0=I0;jt("area","line",{draw:function(e,r){var t=qn(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=qn(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,fillOpacity:1}}}}),jt("area","smooth-line",{draw:function(e,r){var t=this.coordinate,i=qn(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 D0(e,r,t){var i=zo(r,t),n=[["M",e.x,e.y]];return n.push(i),n}function k0(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=ce(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=D0(i[0],i[1],o):(t.fill=t.stroke,a=k0(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 B0(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=ce(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}}}});var $n=1/3;function R0(e,r){var t=[];t.push({x:e.x,y:e.y*(1-$n)+r.y*$n}),t.push({x:r.x,y:e.y*(1-$n)+r.y*$n}),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=ce(e,!0,!1,"lineWidth"),i=e.points,n=this.parsePath(R0(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=ce(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=ce(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 N0(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 N0(e)},draw:function(e,r){var t=ce(e,!0,!1,"lineWidth"),i=Le((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=ce(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 z0(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 V0(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 z0(e)},draw:function(e,r){var t=ce(e,!0,!1),i=this.parsePath(V0(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 G0=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 W0(e,r){var t=[];return(0,c.each)(e,function(i,n){var a=e[n+1];if(t.push(i),a){var o=G0(i,a,r);t=t.concat(o)}}),t}function H0(e){return e.map(function(r,t){return t===0?["M",r.x,r.y]:["L",r.x,r.y]})}function Y0(e,r){var t=Kn(e.points,e.connectNulls,e.showSinglePoint),i=[];return(0,c.each)(t,function(n){var a=W0(n,r);i=i.concat(H0(a))}),(0,d.__assign)((0,d.__assign)({},ce(e,!0,!1,"lineWidth")),{path:i})}(0,c.each)(["hv","vh","hvh","vhv"],function(e){jt("line",e,{draw:function(r,t){var i=Y0(r,e),n=t.addShape({type:"path",attrs:i,name:"line"});return n},getMarker:function(r){return Nu(r,e)}})}),(0,c.each)(S0,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=ce(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 X0(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=ce(e,!0,!1),i=this.parsePath(X0(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 j0(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=j0(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 U0(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=ce(e,!0,!0),i=this.parsePath(U0(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 Z0(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=ce(e,!0,!0),i=this.parsePoints(e.points);return r.addShape("rect",{attrs:(0,d.__assign)((0,d.__assign)({},t),Z0(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=ce(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=ce(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=ce(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 K0=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}(Zn),q0=K0,Qn=Math.PI/2,$0=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=Rn(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+Qn;return n&&(a-=Qn),a&&(a>Qn?a=a-Math.PI:a<-Qn&&(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}(Zn),Ku=$0,Q0=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)({},fe(a.x,a.y,o,t)),{angle:t,r:o})},r}(Ku),J0=Q0,qu=4;function tm(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(F){return F.y>p&&(p=F.y),F.y<y&&(y=F.y),{size:t,targets:[F.y-f]}});for(y-=f,p-f>v&&(v=p-f);l;)for(m.forEach(function(F){var T=(Math.min.apply(y,F.targets)+Math.max.apply(y,F.targets))/2;F.pos=Math.min(Math.max(y,T-F.size/2),v-F.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(F){var T=f+t/2;F.targets.forEach(function(){r[g].y=F.pos+T,T+=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(F){o={error:F}}finally{try{S&&!S.done&&(s=b.return)&&s.call(b)}finally{if(o)throw o.error}}r.forEach(function(F){var T=F.r*F.r,D=Math.pow(Math.abs(F.y-n.y),2);if(T<D)F.x=n.x;else{var O=Math.sqrt(T-D);a?F.x=n.x+O:F.x=n.x-O}var W=w[F.id];W.attr("x",F.x),W.attr("y",F.y);var rt=(0,c.find)(W.getChildren(),function(_t){return _t.get("type")==="text"});rt&&(rt.attr("y",F.y),rt.attr("x",F.x))})}function em(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}),tm(r,g,l,f,s,p)})}(0,c.each)(e,function(g){if(g&&g.labelLine){var p=g.offset,y=g.angle,m=fe(s.x,s.y,o,y),x=fe(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 rm(e,r){var t=r.getCenter(),i=r.getRadius();if(e&&e.labelLine){var n=e.angle,a=e.offset,o=fe(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=fe(t.x,t.y,i+m,n),_=fe(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=fe(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 im(e,r,t,i){var n,a,o=(0,c.filter)(e,function(T){return!(0,c.isNil)(T)}),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(T){n={error:T}}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(T){return T.x<l.x?m:x}),w=s.start,b=s.end,S=Math.min((u+y+p)*2,s.getHeight()),C=S/2,F={minX:w.x,maxX:b.x,minY:l.y-C,maxY:l.y+C};(0,c.each)(_,function(T,D){var O=Math.floor(S/p);T.length>O&&(T.sort(function(W,rt){return rt.percent-W.percent}),(0,c.each)(T,function(W,rt){rt+1>O&&(h[W.id].set("visible",!1),W.invisible=!0)})),$u(T,p,F)}),(0,c.each)(_,function(T,D){(0,c.each)(T,function(O){var W=D===x,rt=h[O.id],_t=rt.getChildByIndex(0);if(_t){var Ct=u+y,Vt=O.y-l.y,Y=Math.pow(Ct,2),at=Math.pow(Vt,2),yt=Y-at>0?Y-at:0,ut=Math.sqrt(yt),gt=Math.abs(Math.cos(O.angle)*Ct);W?O.x=l.x+Math.max(ut,gt):O.x=l.x-Math.max(ut,gt)}_t&&(_t.attr("y",O.y),_t.attr("x",O.x)),rm(O,s)})})}}}var Vo=4,nm=4,Ju=4;function am(e,r,t){var i=r.getCenter(),n=r.getRadius(),a={x:e.x-(t?Ju:-Ju),y:e.y},o=fe(i.x,i.y,n+Vo,e.angle),s={x:a.x,y:a.y},l={x:o.x,y:o.y},u=fe(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 om(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(T){n={error:T}}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(T){if(!!T){var D=(0,c.get)(u,[T.id]);if(!!D){var O=T.x>s.x||T.x===s.x&&T.y>s.y,W=(0,c.isNil)(T.offsetX)?nm:T.offsetX,rt=fe(s.x,s.y,l+Vo,T.angle),_t=p+W;T.x=s.x+(O?1:-1)*(l+_t),T.y=rt.y}}});var y=o.start,m=o.end,x="left",_="right",w=(0,c.groupBy)(e,function(T){return T.x<s.x?x:_}),b=(l+p)*2+g;(0,c.each)(w,function(T){var D=T.length*g;D>b&&(b=Math.min(D,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(T,D){var O=b/g;T.length>O&&(T.sort(function(W,rt){return rt.percent-W.percent}),(0,c.each)(T,function(W,rt){rt>O&&(u[W.id].set("visible",!1),W.invisible=!0)})),$u(T,g,S)});var C=S.minY,F=S.maxY;(0,c.each)(w,function(T,D){var O=D===_;(0,c.each)(T,function(W){var rt=(0,c.get)(u,W&&[W.id]);if(!!rt){if(W.y<C||W.y>F){rt.set("visible",!1);return}var _t=rt.getChildByIndex(0),Ct=_t.getCanvasBBox(),Vt={x:O?Ct.x:Ct.maxX,y:Ct.y+Ct.height/2};Ji(_t,W.x-Vt.x,W.y-Vt.y),W.labelLine&&am(W,o,O)}})})}}function sm(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)&&Ji(n,_-p,w-y)})}function lm(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 um=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 cm(e,r,t){t===void 0&&(t=um);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 hm(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 fm(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"});cm(o,n)||a.remove(!0)}),n.destroy()}function vm(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=hm(o,l,u,f);if(n.hasGap(v)){n.fillGap(v),h=!0;break}}h||a.remove(!0)}),n.destroy()}function dm(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 Jn(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?[Jn(r[0],t,r[0]),Jn(r[1],t,r[0]),Jn(r[2],t,r[0]),Jn(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(dm([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 gm(e,r){return e.max>r.min&&e.min<r.max}function pm(e){return typeof e=="number"&&!Number.isNaN(e)&&e!==Infinity&&e!==-Infinity}function nc(e){return["x","y","width","height"].every(function(r){return pm(e[r])})}function ym(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 mm(e,r,t){if(t===void 0&&(t=0),!nc(e)||!nc(r))return!1;if(!e.rotation&&!r.rotation)return ym(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(!gm(l,u))return!1}return!0}var xm=function(){function e(r){var t=this;this.queue=[],this.worker=new Worker(r),this.worker.onmessage=function(i){var n;(n=t.queue.shift())===null||n===void 0||n.resolve(i)},this.worker.onmessageerror=function(i){var n;console.warn("[AntV G2] Web worker is not available"),(n=t.queue.shift())===null||n===void 0||n.reject(i)}}return e.prototype.post=function(r,t){var i=this;return new Promise(function(n,a){i.queue.push({resolve:n,reject:a});try{i.worker.postMessage(r)}catch(o){console.warn("[AntV G2] Web worker is not available"),(0,c.isFunction)(t)&&t()}})},e.prototype.destroy=function(){this.worker.terminate()},e}();function _m(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 xm(URL.createObjectURL(r))}}var wm=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(F,T){return[T.x-F.x,T.y-F.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,F=w.y;return{x:(C-S.x)*Math.cos(-b)+(F-S.y)*Math.sin(-b)+S.x,y:(S.x-C)*Math.sin(-b)+(F-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),F=v(b),T=h(C).concat(h(F)),D=0;D<T.length;D++){var O=T[D],W=g(C,O),rt=g(F,O);if(!p(W,rt))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}},bm=`
  35. self.onmessage = `.concat(wm.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&&mm(i,a)&&(a.visible=!1)}}return r},Wo=new Map,ac=_m(bm);function Sm(e,r,t,i){return(0,d.__awaiter)(this,void 0,void 0,function(){var n,a,o,s,l,u;return(0,d.__generator)(this,function(h){switch(h.label){case 0:return n=r.map(function(f,v){return(0,d.__assign)((0,d.__assign)({},Mu(f,e[v],(0,c.get)(e[v],"background.padding"))),{visible:!0})}),a=JSON.stringify(n),o=function(f){return Wo.set(a,f),(0,c.each)(f,function(v,g){var p=v.visible,y=r[g];p?y==null||y.show():y==null||y.hide()}),f},Wo.get(a)?(o(Wo.get(a)),[3,7]):[3,1];case 1:if(!ac)return[3,6];h.label=2;case 2:return h.trys.push([2,4,,5]),s=JSON.stringify({type:"hide-overlap",items:n}),[4,ac.post(s,function(){return o(Go(n))})];case 3:return l=h.sent(),o(Array.isArray(l.data)?l.data:[]),[3,5];case 4:return u=h.sent(),console.error(u),o(Go(n)),[3,5];case 5:return[3,7];case 6:o(Go(n)),h.label=7;case 7:return[2]}})})}var oc={"#5B8FF9":!0},Cm=function(e){var r=yr.toRGB(e).toUpperCase();if(oc[r])return oc[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 Am(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=Fe.fromObject(l.getBBox()),g=Fe.fromObject(f.getCanvasBBox()),p=!v.contains(g),y=l.attr("fill"),m=Cm(y);p?f.attr(n.overflowLabels.style):m?o&&f.attr("fill",o):s&&f.attr("fill",s)})}}function Fm(e,r,t){var i=e.coordinate,n=Sr(r),a=Fe.fromObject(n.getCanvasBBox()),o=Fe.fromObject(t.getBBox());return i.isTransposed?o.height>=a.height:o.width>=a.width}function Em(e,r,t){var i=!!e.getAdjust("stack");return i||r.every(function(n,a){var o=t[a];return Fm(e,n,o)})}function Mm(e,r,t){var i=e.coordinate,n=Fe.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 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=Em(a,r,t);o&&t.forEach(function(s,l){var u=r[l];Mm(a,u,s)})}}}function Lm(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 Om(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=Lm(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")&&(Xy(y,u)?y.set("visible",!1):u.push(y))}}}}function Im(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 sc(e,r,t){return e.some(function(i){return t(i,r)})}function Pm(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 lc(e,r){return sc(e,r,function(t,i){var n=Sr(t),a=Sr(i);return Pm(n.getCanvasBBox(),a.getCanvasBBox(),2)>0})}function Dm(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=Im(l,v[y]);m.length;){var x=m.shift(),_=Sr(x);if(sc(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=lc(g,x),b=!1;if(w&&(_.attr("y",_.attr("y")+2*p),b=lc(g,x)),b){_.set("visible",!1);continue}g.push(x)}})}}}function km(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 uc(e,r,t){return e.some(function(i){return t(i,r)})}function Bm(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 cc(e,r){return uc(e,r,function(t,i){var n=Sr(t),a=Sr(i);return Bm(n.getCanvasBBox(),a.getCanvasBBox(),2)>0})}function Rm(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=km(l,v[y]);m.length;){var x=m.shift(),_=Sr(x);if(uc(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=cc(g,x),b=!1;if(w&&(_.attr("y",_.attr("y")+2*p),b=cc(g,x)),b){_.set("visible",!1);continue}g.push(x)}})}}}var Ho;function Nm(){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=Nm();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("")}),zm=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 Vm(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=Sp(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,F=y.height,T=b,D=S;if(a.indexOf("left")>=0&&(m<h||_<h)&&(T=h),a.indexOf("top")>=0&&(x<f||w<f)&&(D=f),a.indexOf("right")>=0&&(m>v?T=v-C:_>v&&(T=T-(_-v))),a.indexOf("bottom")>=0&&(x>g?D=g-F:w>g&&(D=D-(w-g))),T!==b||D!==S){var O=T-b;if(o==="translate")Ji(p,O,D-S);else if(o==="ellipsis"){var W=p.findAll(function(rt){return rt.get("type")==="text"});W.forEach(function(rt){var _t=(0,c.pick)(rt.attr(),["fontSize","fontFamily","fontWeight","fontStyle","fontVariant"]),Ct=rt.getCanvasBBox(),Vt=zm(rt.attr("text"),Ct.width-Math.abs(O),_t);rt.attr("text",Vt)})}else p.hide()}})}}}function Gm(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 Wm(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 Hm(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(ee.vs(e.getMatrix(),[["t",-a,-o],["s",.01,1],["t",a,o]])),i=ee.vs(e.getMatrix(),[["t",-a,-o],["s",100,1],["t",a,o]])):t==="y"?(e.setMatrix(ee.vs(e.getMatrix(),[["t",-a,-o],["s",1,.01],["t",a,o]])),i=ee.vs(e.getMatrix(),[["t",-a,-o],["s",1,100],["t",a,o]])):t==="xy"&&(e.setMatrix(ee.vs(e.getMatrix(),[["t",-a,-o],["s",.01,.01],["t",a,o]])),i=ee.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=Hm(e,[u,h],n);e.animate({matrix:f},r)}function Ym(e,r,t){var i=t.coordinate,n=t.minYPoint;Yo(e,r,i,n,"x")}function Xm(e,r,t){var i=t.coordinate,n=t.minYPoint;Yo(e,r,i,n,"y")}function jm(e,r,t){var i=t.coordinate,n=t.minYPoint;Yo(e,r,i,n,"xy")}function Um(e,r,t){var i=e.getTotalLength();e.attr("lineDash",[i]),e.animate(function(n){return{lineDashOffset:(1-n)*i}},r)}function Zm(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 Km(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=ee.vs(e.getMatrix(),[["t",-o,-s],["s",.01,1],["t",o,s]]);e.setMatrix(l),e.animate({matrix:ee.vs(e.getMatrix(),[["t",-o,-s],["s",100,1],["t",o,s]])},r)}function qm(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=ee.vs(e.getMatrix(),[["t",-a,-s],["s",1,.01],["t",a,s]]);e.setMatrix(l),e.animate({matrix:ee.vs(e.getMatrix(),[["t",-a,-s],["s",1,100],["t",a,s]])},r)}function hc(e,r){var t,i=(0,Vu.getArcParams)(e,r),n=i.startAngle,a=i.endAngle;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)&&!(0,c.isNumberEqual)(n,a)&&(a=Math.PI*1.5),{startAngle:n,endAngle:a}}function fc(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 vc(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=fc(e[s-1]),h=fc(e[l-1]),f=hc(u,a),v=f.startAngle,g=f.endAngle,p=hc(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 $m(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=vc(a),l=s.startAngle,u=s.endAngle,h=s.radius,f=s.innerRadius,v=vc(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=ee.vs(e.getMatrix(),[["t",-n,-a],["s",.01,.01],["t",n,a]]);e.setMatrix(o),e.animate({matrix:ee.vs(e.getMatrix(),[["t",-n,-a],["s",100,100],["t",n,a]])},r)}else e.animate({matrix:ee.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 Jm(e,r,t){Xo(e,r,"zoomIn")}function tx(e,r,t){Xo(e,r,"zoomOut")}function lr(e){return[E.TOP,E.BOTTOM].includes(e)?{offsetX:0,offsetY:e===E.TOP?-8:8,style:{textAlign:"center",textBaseline:e===E.TOP?"bottom":"top"}}:[E.LEFT,E.RIGHT].includes(e)?{offsetX:e===E.LEFT?-8:8,offsetY:0,style:{textAlign:e===E.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 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:"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(E.TOP),t.cfg.title);a.annotation().text(s)})},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:"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(E.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),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:"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(E.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(E.RIGHT),t.cfg.rowTitle);f.annotation().text(g)}})},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.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(E.TOP),t.cfg.title);s.annotation().text(u)}else{var u=(0,c.deepMix)({position:["100%","50%"],content:l?l(o):o},lr(E.RIGHT),t.cfg.title);s.annotation().text(u)}})},r}(oi),lx=sx,ux=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(E.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(E.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),cx=ux,hx=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(L.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(E.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),fx=hx;function dc(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 vx(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?dc(r.values.map(function(i,n){return n})):dc(r.values);break}case"mean":{t=r.isCategory?(r.values.length-1)/2:vx(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"],dx=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(Q.FORE).addGroup(),i.backgroundContainer=i.view.getLayer(Q.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){var i=!1;this.view.getOptions().animate&&this.view.geometries.forEach(function(n){n.animateOption&&(n.once(X.AFTER_DRAW_ANIMATE,function(){t()}),i=!0)}),i||this.view.getRootView().once(L.AFTER_RENDER,function(){t()})},r.prototype.createAnnotation=function(t){var i=t.type,n=it[(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)?Q.FORE:Q.BG,direction:E.NONE,type:R.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:Rn(o,v),startAngle:w,endAngle:b})}else if(t==="image"){var S=i,C=S.start,F=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 T=i,D=T.start,O=T.end,_=(0,d.__rest)(T,["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 W=i,rt=W.start,_t=W.end,_=(0,d.__rest)(W,["start","end"]);l=(0,d.__assign)((0,d.__assign)({},_),{start:v,end:g})}else if(t==="text"){var Ct=this.view.getData(),Vt=i,Y=Vt.position,at=Vt.content,_=(0,d.__rest)(Vt,["position","content"]),yt=at;(0,c.isFunction)(at)&&(yt=at(Ct)),l=(0,d.__assign)((0,d.__assign)((0,d.__assign)({},p),_),{content:yt})}else if(t==="dataMarker"){var ut=i,gt=ut.position,At=ut.point,zt=ut.line,Gt=ut.text,Dt=ut.autoAdjust,Wt=ut.direction,_=(0,d.__rest)(ut,["position","point","line","text","autoAdjust","direction"]);l=(0,d.__assign)((0,d.__assign)((0,d.__assign)({},_),p),{coordinateBBox:this.getCoordinateBBox(),point:At,line:zt,text:Gt,autoAdjust:Dt,direction:Wt})}else if(t==="dataRegion"){var $t=i,ve=$t.start,de=$t.end,ar=$t.region,Gt=$t.text,ti=$t.lineLength,_=(0,d.__rest)($t,["start","end","region","text","lineLength"]);l=(0,d.__assign)((0,d.__assign)({},_),{points:this.getRegionPoints(ve,de),region:ar,text:Gt,lineLength:ti})}else if(t==="regionFilter"){var pr=i,Fi=pr.start,Ei=pr.end,Lv=pr.apply,mT=pr.color,_=(0,d.__rest)(pr,["start","end","apply","color"]),xT=this.view.geometries,Ov=[],$s=function(or){!or||(or.isGroup()?or.getChildren().forEach(function(wn){return $s(wn)}):Ov.push(or))};(0,c.each)(xT,function(or){Lv?(0,c.contains)(Lv,or.type)&&(0,c.each)(or.elements,function(wn){$s(wn.shape)}):(0,c.each)(or.elements,function(wn){$s(wn.shape)})}),l=(0,d.__assign)((0,d.__assign)({},_),{color:mT,shapes:Ov,start:v,end:g})}else if(t==="shape"){var Iv=i,_T=Iv.render,Qs=(0,d.__rest)(Iv,["render"]),wT=function(ST){if((0,c.isFunction)(i.render))return _T(ST,a.view,{parsePosition:a.parsePosition.bind(a)})};l=(0,d.__assign)((0,d.__assign)({},Qs),{render:wT})}else if(t==="html"){var Js=i,tl=Js.html,UL=Js.position,Qs=(0,d.__rest)(Js,["html","position"]),bT=function(or){return(0,c.isFunction)(tl)?tl(or,a.view):tl};l=(0,d.__assign)((0,d.__assign)((0,d.__assign)({},Qs),p),{parent:s.get("el").parentNode,html:bT})}var Ir=(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"&&(Ir.container=this.getComponentContainer(Ir)),Ir.animate=this.view.getOptions().animate&&Ir.animate&&(0,c.get)(i,"animate",Ir.animate),Ir.animateOption=(0,c.deepMix)({},hi,Ir.animateOption,i.animateOption),Ir},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&&Le(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),gx=dx;function gc(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 pc(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"],yc=(0,d.__assign)((0,d.__assign)({},hi),{appear:null}),px=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(Q.BG).addGroup(),i.gridForeContainer=i.view.getLayer(Q.FORE).addGroup(),i.axisContainer=i.view.getLayer(Q.BG).addGroup(),i.axisForeContainer=i.view.getLayer(Q.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===R.AXIS)i.isPolar?u==="x"?v=i.isTransposed?Nn(i,o):go(i):u==="y"&&(v=i.isTransposed?go(i):Nn(i,o)):v=Nn(i,o);else if(s===R.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=Vn(this.option,i.field);if(n!==!1){var a=Xl(n,E.BOTTOM),o=Q.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);Le(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);Le(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,E.RADIUS):this.getCircleAxisCfg(i,n,a);Le(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,E.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,E.RADIUS,s):this.getLineGridCfg(i,n,E.CIRCLE,s);Le(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,E.RADIUS,s)}else g=this.createLineGrid(i,n,o,E.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=Vn(i.option,s);if(l!==!1){var u=Q.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?E.LEFT:E.RIGHT),y=i.cache.get(f);if(y){var m=i.getLineAxisCfg(a,l,p);Le(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);Le(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,E.CIRCLE):i.getLineAxisCfg(a,l,E.RADIUS);Le(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,E.CIRCLE,h)}else y=i.createLineAxis(a,l,u,E.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,E.CIRCLE,h):i.getCircleGridCfg(a,l,E.RADIUS,h);Le(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,E.CIRCLE,h)}else x=i.createCircleGrid(a,l,u,E.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===E.RADIUS?E.NONE:a,type:R.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:E.NONE,type:R.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:R.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:E.NONE,type:R.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=Nn(o,n),l=jl(t,i),u=zn(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(!!pc(zn(this.view.getTheme(),n),i)){var o=gc(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=zn(this.view.getTheme(),E.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(!!pc(zn(this.view.getTheme(),n),i)){var o=gc(this.view.getTheme(),E.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)({},yc,t.animateOption):yc}},r}(ci),yx=px;function Fr(e,r,t){return t===E.TOP?[e.minX+e.width/2-r.width/2,e.minY]:t===E.BOTTOM?[e.minX+e.width/2-r.width/2,e.maxY-r.height]:t===E.LEFT?[e.minX,e.minY+e.height/2-r.height/2]:t===E.RIGHT?[e.maxX-r.width,e.minY+e.height/2-r.height/2]:t===E.TOP_LEFT||t===E.LEFT_TOP?[e.tl.x,e.tl.y]:t===E.TOP_RIGHT||t===E.RIGHT_TOP?[e.tr.x-r.width,e.tr.y]:t===E.BOTTOM_LEFT||t===E.LEFT_BOTTOM?[e.bl.x,e.bl.y-r.height]:t===E.BOTTOM_RIGHT||t===E.RIGHT_BOTTOM?[e.br.x-r.width,e.br.y-r.height]:[0,0]}function mx(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 mc(e){return e===DIRECTION.LEFT?DIRECTION.RIGHT:e===DIRECTION.RIGHT?DIRECTION.LEFT:e}function xc(e){return e===DIRECTION.TOP?DIRECTION.BOTTOM:e===DIRECTION.BOTTOM?DIRECTION.TOP:e}function xx(e,r){var t=r.matrix[0],i=r.matrix[4],n=e;return t<0&&(n=mc(n)),i<0&&(n=xc(n)),n}function _x(e,r){var t=e;return r.isReflect("x")&&(t=mc(t)),r.isReflect("y")&&(t=xc(t)),t}function mL(e,r){var t=e;return t=mx(t,r),t=xx(t,r),t=_x(t,r),t}function _c(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",E.BOTTOM)}var wx=function(e){(0,d.__extends)(r,e);function r(t){var i=e.call(this,t)||this;return i.container=i.view.getLayer(Q.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 Fe(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,_=_c(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&&(Le(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);Le(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=Q.FORE,h=na(this.option);this.components.push({id:a,component:l,layer:u,direction:h,type:R.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=_c(this.option,n.field),s=Q.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:R.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,Le(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:ji(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",E.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?Qy(h,f,a.items):Iu(this.view,t,i,h,f),m=(0,c.get)(a,"title");m&&(m=(0,c.deepMix)({text:n?ji(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=te),n===void 0&&(n=te);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),bx=wx,Sx=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(Q.FORE).addGroup(),i.onChangeFn=(0,c.throttle)(i.onValueChange,20,{leading:!0}),i.width=0,i.view.on(L.BEFORE_CHANGE_DATA,i.resetMeasure),i.view.on(L.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(L.BEFORE_CHANGE_DATA,this.resetMeasure),this.view.off(L.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 Fe(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,E.BOTTOM),2),m=y[0],x=y[1],_=(0,d.__read)(Fr(this.view.coordinateBBox,f,E.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,E.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:Q.FORE,direction:E.BOTTOM,type:R.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.round(t*(h-1)),v=Math.round(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.round(t*(f-1)),g=Math.round(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),Cx=Sx,aa=0,wc=8,Ax=32,Fx=20,Ex=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(Q.FORE).addGroup(),i.onChangeFn=(0,c.throttle)(i.onValueChange,20,{leading:!0}),i.trackLen=0,i.thumbLen=0,i.ratio=0,i.view.on(L.BEFORE_CHANGE_DATA,i.resetMeasure),i.view.on(L.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(L.BEFORE_CHANGE_DATA,this.resetMeasure),this.view.off(L.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 Fe(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,E.BOTTOM),2),f=h[0],v=h[1],g=(0,d.__read)(Fr(this.view.coordinateBBox,o,E.BOTTOM),2),p=g[0],y=g[1];l=p,u=v}else{var m=(0,d.__read)(Fr(this.view.viewBBox,o,E.RIGHT),2),f=m[0],v=m[1],x=(0,d.__read)(Fr(this.view.viewBBox,o,E.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?E.BOTTOM:E.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:Q.FORE,direction:i?E.BOTTOM:E.RIGHT,type:R.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),Fx);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:Ax,width:wc,height:wc,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),Mx=Ex,Tx={fill:"#CCD6EC",opacity:.3};function Lx(e,r,t){var i,n,a,o,s,l,u=py(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(O){a={error:O}}finally{try{p&&!p.done&&(o=g.return)&&o.call(g)}finally{if(a)throw a.error}}}}catch(O){i={error:O}}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),F=C.next();!F.done;F=C.next()){var T=F.value,D=Math.abs(r.y-T[0].y);D<=S&&(b=T,S=D)}}catch(O){s={error:O}}finally{try{F&&!F.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 Ox=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=Lx(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(yt){if(yt.type==="interval"||yt.type==="schema"){var ut=yt.getElementsBy(function(gt){var At=gt.getData();return At[s]===l});u=u.concat(ut)}}),u.length){var f=i.getCoordinate(),v=u[0].shape.getCanvasBBox(),g=u[0].shape.getCanvasBBox(),p=v;(0,c.each)(u,function(yt){var ut=yt.shape.getCanvasBBox();f.isTransposed?(ut.minY<v.minY&&(v=ut),ut.maxY>g.maxY&&(g=ut)):(ut.minX<v.minX&&(v=ut),ut.maxX>g.maxX&&(g=ut)),p.x=Math.min(ut.minX,p.minX),p.y=Math.min(ut.minY,p.minY),p.width=Math.max(ut.maxX,p.maxX)-p.x,p.height=Math.max(ut.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,F=void 0,T=void 0,D=void 0;f.isTransposed?(C=m.minX,F=Math.min(g.minY,v.minY)-S,T=m.width,D=p.height+S*2):(C=Math.min(v.minX,g.minX)-S,F=m.minY,T=p.width+S*2,D=m.height),x=[["M",C,F],["L",C+T,F],["L",C+T,F+D],["L",C,F+D],["Z"]]}else{var O=(0,c.head)(u),W=(0,c.last)(u),rt=Yi(O.getModel(),f).startAngle,_t=Yi(W.getModel(),f).endAngle,Ct=f.getCenter(),Vt=f.getRadius(),Y=f.innerRadius*Vt;x=mr(Ct.x,Ct.y,Vt,rt,_t,Y)}if(this.regionPath)this.regionPath.attr("path",x),this.regionPath.show();else{var at=(0,c.get)(t,"style",Tx);this.regionPath=y.addShape({type:"path",name:"active-region",capture:!1,attrs:(0,d.__assign)((0,d.__assign)({},at),{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}(ae),Ix=Ox,Px=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}(ae),bc=Px,Dx=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=Qe(t);(0,c.each)(n,function(a){var o=_o(t,a,i);a.showTooltip(o)})},r.prototype.hideTooltip=function(t){var i=Qe(t);(0,c.each)(i,function(n){n.hideTooltip()})},r}(bc),kx=Dx,Bx=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 Bn({parent:n.get("el").parentNode,region:a,visible:!1,crosshairs:null,domStyles:(0,d.__assign)({},(0,c.deepMix)({},s,(t={},t[He]={"max-width":"50%"},t[sr]={"word-break":"break-all"},t)))});l.init(),l.setCapture(!1),this.tooltip=l},r}(ae),Rx=Bx,Nx=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}(ae),Zo=Nx;function Sc(e){return(0,c.get)(e.get("delegateObject"),"item")}var zx=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=Ze(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(Zi(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&&Sc(s.fromShape)===Sc(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=zx,Vx=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),Gx=Vx,Wx=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=Ze(t,o.field);if(!this.cache[s]){var l=Yp(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=Ze(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}(ae),Hx=Wx,Yx=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(Ki(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=Qe(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=Qe(n);Ki(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=Qe(i);(0,c.each)(n,function(a){t.clearViewState(a)})}else this.clearViewState(i)},r}(Zo),qo=Yx,Xx=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),jx=Xx,Ux=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=Ux,Zx=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),Kx=Zx,en="inactive",rn="active";function Qo(e){var r=we(e);(0,c.each)(r,function(t){t.hasState(rn)&&t.setState(rn,!1),t.hasState(en)&&t.setState(en,!1)})}function Cc(e,r,t){(0,c.each)(e,function(i){r(i)?(i.hasState(en)&&i.setState(en,!1),i.setState(rn,t)):(i.hasState(rn)&&i.setState(rn,!1),i.setState(en,t))})}var Vr=Ft.INACTIVE,ur=Ft.ACTIVE,qx=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=qx,$x=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=Ze(t,o.field),l=we(n),u=l.filter(function(h){return Ze(h,o.field)===s});this.setHighlightBy(l,function(h){return u.includes(h)},i)}},r}(Jo),Qx=$x,Jx=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=Ze(t,a.field),s=we(n),l=s.filter(function(u){return Ze(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),t_=Jx,tr;(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"})(tr||(tr={}));var e_=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(tr.BEFORE_HIGHLIGHT,se.fromData(i,tr.BEFORE_HIGHLIGHT,o)),this.setState(),i.emit(tr.AFTER_HIGHLIGHT,se.fromData(i,tr.AFTER_HIGHLIGHT,o))},r.prototype.clear=function(){var t=this.context.view;t.emit(tr.BEFORE_CLEAR,se.fromData(t,tr.BEFORE_CLEAR,{})),e.prototype.clear.call(this),t.emit(tr.AFTER_CLEAR,se.fromData(t,tr.AFTER_CLEAR,{}))},r.prototype.setElementsState=function(t,i,n){Cc(n,function(a){return t.indexOf(a)>=0},i)},r}(qo),Ac=e_,r_=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);Cc(a,function(o){return t===o},i)},r.prototype.clear=function(){var t=this.context.view;Qo(t)},r}($o),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}(qo),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}(Ko),s_=o_,l_=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),u_=l_,c_=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 Zi(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=Ze(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(Zi(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}(ae),Gr=c_,h_=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),f_=h_,Fc="inactive",Ec="active";function v_(e){var r=e.getItems();(0,c.each)(r,function(t){e.hasState(t,Ec)&&e.setItemState(t,Ec,!1),e.hasState(t,Fc)&&e.setItemState(t,Fc,!1)})}var nn="inactive",Wr="active",d_=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,nn)&&t.setItemState(l,nn,!1),t.setItemState(l,Wr,!0)):t.hasState(l,Wr)||t.setItemState(l,nn,!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,nn,!0))})}},r.prototype.highlight=function(){this.setState()},r.prototype.clear=function(){var t=this.getTriggerListInfo();if(t)v_(t.list);else{var i=this.getAllowComponents();(0,c.each)(i,function(n){n.clearItemsState(Wr),n.clearItemsState(nn)})}},r}(Gr),ts=d_,g_=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),p_=g_,y_=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),m_=y_,vi="unchecked",oa="checked",x_=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),__=x_,di="unchecked",w_=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(O){return!f.hasState(O,di)}),y=g.filter(function(O){return f.hasState(O,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(O){t={error:O}}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(O){n={error:O}}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),F=C.next();!F.done;F=C.next()){var w=F.value;f.setItemState(w,di,w.id!==v.id)}}catch(O){o={error:O}}finally{try{F&&!F.done&&(s=C.return)&&s.call(C)}finally{if(o)throw o.error}}else try{for(var T=(0,d.__values)(g),D=T.next();!D.done;D=T.next()){var w=D.value;f.setItemState(w,di,w.id!==v.id)}}catch(O){l={error:O}}finally{try{D&&!D.done&&(u=T.return)&&u.call(T)}finally{if(l)throw l.error}}}},r}(Gr),b_=w_,Mc="showRadio",es="legend-radio-tip",S_=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,Mc,!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,Mc,!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[He]={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 Bn({parent:document.body,region:null,visible:!1,crosshairs:null,domStyles:i,containerId:es});n.init(),n.setCapture(!1),this.tooltip=n},r}(Gr),C_=S_,A_=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}(ae),rs=A_,F_=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),E_=F_,M_=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),Tc=M_;function Lc(e){e.x=(0,c.clamp)(e.x,0,1),e.y=(0,c.clamp)(e.y,0,1)}var T_=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&&(Lc(s),Lc(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}(Tc),Oc=T_,L_=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=L_,O_=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 Up(t,!0)},r}(Ic),I_=O_,P_=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.prototype.zoomIn=function(){this.setCursor("zoom-in")},r.prototype.zoomOut=function(){this.setCursor("zoom-out")},r}(ae),D_=P_,k_=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(Zi(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}(ae),B_=k_;function Pc(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 Pe;(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"})(Pe||(Pe={}));var R_=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(Ki(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(Pe.BEFORE_FILTER,se.fromData(s,Pe.BEFORE_FILTER,u));var h=s.getCoordinate(),f=h.invert(i),v=h.invert(t);if(this.hasDim("x")){var g=s.getXScale(),p=Pc(g,"x",f,v);this.filterView(s,g.field,p)}if(this.hasDim("y")){var y=s.getYScales()[0],p=Pc(y,"y",f,v);this.filterView(s,y.field,p)}this.reRender(s,{source:Pe.FILTER}),s.emit(Pe.AFTER_FILTER,se.fromData(s,Pe.AFTER_FILTER,u))}},r.prototype.end=function(){this.isStarted=!1},r.prototype.reset=function(){var t=this.context.view;if(t.emit(Pe.BEFORE_RESET,se.fromData(t,Pe.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:Pe.RESET}),t.emit(Pe.AFTER_RESET,se.fromData(t,Pe.AFTER_RESET,{}))},r.prototype.filterView=function(t,i,n){t.filter(i,n)},r.prototype.reRender=function(t,i){t.render(!0,i)},r}(ae),sa=R_,N_=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=Qe(t);(0,c.each)(a,function(o){o.filter(i,n)})},r.prototype.reRender=function(t){var i=Qe(t);(0,c.each)(i,function(n){n.render(!0)})},r}(sa),is=N_,z_=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(Ki(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(Zi(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=Ze(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=Ze(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}(ae),V_=z_,G_=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(){Ki(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=Qe(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=Qe(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=Qe(this.context.view);(0,c.each)(t,function(i){var n=we(i);(0,c.each)(n,function(a){a.show()})})},r}(ae),Dc=G_,W_=10,H_=5,Y_=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=ee.vs(null,[["t",n.x-o.width-W_,n.y+o.height+H_]]);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}(ae),X_=Y_,j_=4,U_=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)>j_&&(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}(ae),Z_=U_,K_=5,q_=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>K_&&!this.isMoving&&(this.isMoving=!0),this.isMoving){var a=this.context.view,o=ee.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}(ae),$_=q_,kc="x",Bc="y",Q_=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.dims=[kc,Bc],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(kc),this.resetDim(Bc);var t=this.context.view;t.render(!0)},r}(ae),Rc=Q_,J_=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}(Rc),tw=J_,ew=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}(Rc),rw=ew;function iw(e){var r=e.gEvent.originalEvent;return r.deltaY>0}var nw=1,aw=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)||nw,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+(iw(a)?o:-o),y=o/(h-f)/1e4,m=(0,c.clamp)(p/(h-f)+y,0,1);s.setValue(m)}},r}(ae),ow=aw,sw="aixs-description-tooltip",lw=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(He,'" 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 Bn({parent:n.get("el").parentNode,region:a,visible:!1,containerId:sw,domStyles:(0,d.__assign)({},(0,c.deepMix)({},(t={},t[He]={"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}(ae),uw=lw;uy("dark",lu(a0)),Xt("canvas",Vu),Xt("svg",o0),Je("Polygon",M0),Je("Interval",_0),Je("Schema",L0),Je("Path",Po),Je("Point",A0),Je("Line",b0),Je("Area",c0),Je("Edge",f0),Je("Heatmap",d0),Je("Violin",P0),$i("base",Zn),$i("interval",q0),$i("pie",J0),$i("polar",Ku),Oe("overlap",vm),Oe("distribute",em),Oe("fixed-overlap",fm),Oe("hide-overlap",Sm),Oe("limit-in-shape",lm),Oe("limit-in-canvas",sm),Oe("limit-in-plot",Vm),Oe("pie-outer",im),Oe("adjust-color",Am),Oe("interval-adjust-position",Tm),Oe("interval-hide-overlap",Om),Oe("point-adjust-position",Dm),Oe("pie-spider",om),Oe("path-adjust-position",Rm),Re("fade-in",Gm),Re("fade-out",Wm),Re("grow-in-x",Ym),Re("grow-in-xy",jm),Re("grow-in-y",Xm),Re("scale-in-x",Km),Re("scale-in-y",qm),Re("wave-in",Qm),Re("zoom-in",Jm),Re("zoom-out",tx),Re("position-update",Zm),Re("sector-path-update",$m),Re("path-in",Um),si("rect",cx),si("mirror",lx),si("list",nx),si("matrix",ox),si("circle",rx),si("tree",fx),Nr("axis",yx),Nr("legend",bx),Nr("tooltip",yu),Nr("annotation",gx),Nr("slider",Cx),Nr("scrollbar",Mx),bt("tooltip",bc),bt("sibling-tooltip",kx),bt("ellipsis-text",Rx),bt("element-active",Gx),bt("element-single-active",Kx),bt("element-range-active",jx),bt("element-highlight",Jo),bt("element-highlight-by-x",t_),bt("element-highlight-by-color",Qx),bt("element-single-highlight",i_),bt("element-range-highlight",Ac),bt("element-sibling-highlight",Ac,{effectSiblings:!0,effectByRecord:!0}),bt("element-selected",s_),bt("element-single-selected",u_),bt("element-range-selected",a_),bt("element-link-by-color",Hx),bt("active-region",Ix),bt("list-active",f_),bt("list-selected",p_),bt("list-highlight",ts),bt("list-unchecked",m_),bt("list-checked",__),bt("list-focus",b_),bt("list-radio",C_),bt("legend-item-highlight",ts,{componentNames:["legend"]}),bt("axis-label-highlight",ts,{componentNames:["axis"]}),bt("axis-description",uw),bt("rect-mask",Tc),bt("x-rect-mask",Oc,{dim:"x"}),bt("y-rect-mask",Oc,{dim:"y"}),bt("circle-mask",E_),bt("path-mask",Ic),bt("smooth-path-mask",I_),bt("cursor",D_),bt("data-filter",B_),bt("brush",sa),bt("brush-x",sa,{dims:["x"]}),bt("brush-y",sa,{dims:["y"]}),bt("sibling-filter",is),bt("sibling-x-filter",is),bt("sibling-y-filter",is),bt("element-filter",V_),bt("element-sibling-filter",Dc),bt("element-sibling-filter-record",Dc,{byRecord:!0}),bt("view-drag",Z_),bt("view-move",$_),bt("scale-translate",tw),bt("scale-zoom",rw),bt("reset-button",X_,{name:"reset-button",text:"reset"}),bt("mousewheel-scroll",ow);function Er(e){return e.isInPlot()}It("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"}]}),It("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"}]}),It("element-active",{start:[{trigger:"element:mouseenter",action:"element-active:active"}],end:[{trigger:"element:mouseleave",action:"element-active:reset"}]}),It("element-selected",{start:[{trigger:"element:click",action:"element-selected:toggle"}]}),It("element-highlight",{start:[{trigger:"element:mouseenter",action:"element-highlight:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight:reset"}]}),It("element-highlight-by-x",{start:[{trigger:"element:mouseenter",action:"element-highlight-by-x:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight-by-x:reset"}]}),It("element-highlight-by-color",{start:[{trigger:"element:mouseenter",action:"element-highlight-by-color:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight-by-color:reset"}]}),It("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"]}]}),It("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"]}]}),It("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"]}]}),It("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"]}]}),It("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"]}]}),It("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"]}]}),It("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"]}]}),It("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"]}]}),It("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"}]}),It("element-single-selected",{start:[{trigger:"element:click",action:"element-single-selected:toggle"}]}),It("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:["legend-item-highlight:reset","element-highlight:reset","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"]}]}),It("continuous-filter",{start:[{trigger:"legend:valuechanged",action:"data-filter:filter"}]}),It("continuous-visible-filter",{start:[{trigger:"legend:valuechanged",action:"element-filter:filter"}]}),It("legend-visible-filter",{showEnable:[{trigger:"legend-item:mouseenter",action:"cursor:pointer"},{trigger:"legend-item:mouseleave",action:"cursor:default"}],start:[{trigger:"legend-item:click",action:["legend-item-highlight:reset","element-highlight:reset","list-unchecked:toggle","element-filter:filter"]}]}),It("active-region",{start:[{trigger:"plot:mousemove",action:"active-region:show"}],end:[{trigger:"plot:mouseleave",action:"active-region:hide"}]}),It("axis-description",{start:[{trigger:"axis-description:mousemove",action:"axis-description:show"}],end:[{trigger:"axis-description:mouseleave",action:"axis-description:hide"}]});function Nc(e){return e.gEvent.preventDefault(),e.gEvent.originalEvent.deltaY>0}It("view-zoom",{start:[{trigger:"plot:mousewheel",isEnable:function(e){return Nc(e.event)},action:"scale-zoom:zoomOut",throttle:{wait:100,leading:!0,trailing:!1}},{trigger:"plot:mousewheel",isEnable:function(e){return!Nc(e.event)},action:"scale-zoom:zoomIn",throttle:{wait:100,leading:!0,trailing:!1}}]}),It("sibling-tooltip",{start:[{trigger:"plot:mousemove",action:"sibling-tooltip:show"}],end:[{trigger:"plot:mouseleave",action:"sibling-tooltip:hide"}]}),It("plot-mousewheel-scroll",{start:[{trigger:"plot:mousewheel",action:"mousewheel-scroll:scroll"}]});function Et(){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 Kt(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 zc(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 qe;(function(e){e.ERROR="error",e.WARN="warn",e.INFO="log"})(qe||(qe={}));var Vc="AntV/G2Plot";function Gc(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];var i=0;return Vc+": "+e.replace(/%s/g,function(){return""+r[i++]})}function xL(e,r){for(var t=[],i=2;i<arguments.length;i++)t[i-2]=arguments[i];if(!e){var n=new Error(Gc.apply(void 0,__spreadArrays([r],t)));throw n.name=Vc,n}}function cr(e,r,t){for(var i=[],n=3;n<arguments.length;n++)i[n-3]=arguments[n];r||console[e](Gc.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 an(e){return(0,c.get)(e,["views","length"],0)<=0?la(e):(0,c.reduce)(e.views,function(r,t){return r.concat(an(t))},la(e))}function cw(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 Bt(e,r){return e.views.find(function(t){return t.id===r})}function on(e){var r=e.parent;return r?r.views:[]}function Wc(e){return on(e).filter(function(r){return r!==e})}function _e(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 hw(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 fw=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=Mt.min([0,0],l,v),u=Mt.max([0,0],u,v)}l=Mt.min([0,0],l,i[0]),u=Mt.max([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=Mt.sub(p,o,a),p=Mt.scale(p,p,r);var y=Mt.distance(v,a),m=Mt.distance(v,o),x=y+m;x!==0&&(y/=x,m/=x);var _=Mt.scale([0,0],p,-y),w=Mt.scale([0,0],p,m),b=Mt.add([0,0],v,_),S=Mt.add([0,0],v,w);s&&(b=Mt.max([0,0],b,l),b=Mt.min([0,0],b,u),S=Mt.max([0,0],S,l),S=Mt.min([0,0],S,u)),n.push(b),n.push(S)}return t&&n.push(n.shift()),n};function vw(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=fw(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 dw(e,r,t){var i=[],n=e[0],a=null;if(e.length<=2)return hw(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=vw(i,r,u);return h.unshift(["M",n.x,n.y]),h}var gw=5,pw={}.toString,Hc=function(e,r){return pw.call(e)==="[object "+r+"]"},yw=function(e){return Hc(e,"Array")},mw=function(e){return typeof e=="object"&&e!==null},Yc=function(e){if(!mw(e)||!Hc(e,"Object"))return!1;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r},Xc=function(e,r,t,i){t=t||0,i=i||gw;for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n)){var a=r[n];a?Yc(a)?(Yc(e[n])||(e[n]={}),t<i?Xc(e[n],a,t+1,i):e[n]=r[n]):yw(a)?(e[n]=[],e[n]=e[n].concat(a)):e[n]=a:e[n]=a}},I=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)Xc(e,r[i]);return e};function jc(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 Uc(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=Kt(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=Kt(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[jc(m)]=y+"px":m&&!t.includes(m)&&(r[jc(m)]=""+y)}),r}function Zc(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());Zc(f,(0,d.__assign)({width:p+"px",transform:u},Uc(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"},Kt(s,["offsetX","offsetY","rotate","style","formatter"])))}})},xw=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;Zc(l,(0,d.__assign)({width:m+"px",transform:"translate(-50%, "+y+"px)"},Uc(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>"}},Kt(o,["offsetX","offsetY","rotate","style","formatter"])))}})},as;function _w(){return as||(as=document.createElement("canvas").getContext("2d")),as}var _L=(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=_w();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 ww(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 Kc(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=Kt(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(qe.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 qc={locale:"en-US"};function wL(e){each(e,function(r,t){return qc[t]=r})}var ha={};function $c(e,r){ha[e]=r}function fa(e){return{get:function(r,t){return zc((0,c.get)(ha[e],r)||(0,c.get)(ha[qc.locale],r)||(0,c.get)(ha["en-US"],r)||r,t)}}}var bw={locale:"en-US",general:{increase:"Increase",decrease:"Decrease",root:"Root"},statistic:{total:"Total"},conversionTag:{label:"Rate"},legend:{},tooltip:{},slider:{},scrollbar:{},waterfall:{total:"Total"}},Sw={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"}},Cw=A(18587),Qc="data-chart-source-type",Jc=["padding","appendPadding","renderer","pixelRatio","syncViewPadding","supportCSSTransform","limitInPlot"],Pt=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=I({},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 Ty((0,d.__assign)((0,d.__assign)((0,d.__assign)((0,d.__assign)({container:this.container,autoFit:!1},this.getChartSize(i,n)),{localRefresh:!1}),Kt(this.options,Jc)),{defaultInteractions:a})),this.container.setAttribute(Qc,"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=I({},this.options,t)},r.prototype.setState=function(t,i,n){n===void 0&&(n=!0);var a=an(this.chart);(0,c.each)(a,function(o){i(o.getData())&&o.setState(t,n)})},r.prototype.getStates=function(){var t=an(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=I({},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(Qc)},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,Cw.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}(j.Z),De=["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 th(e,r,t){var i=e+r;return t?i*2:i}function eh(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 Aw={size:6,padding:2,backgroundColor:"transparent",opacity:1,rotation:0,fill:"#fff",fillOpacity:.5,stroke:"transparent",lineWidth:0,isStagger:!0};function Fw(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 Ew(e){var r=I({},Aw,e),t=r.size,i=r.padding,n=r.isStagger,a=r.rotation,o=th(t,i,n),s=eh(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];Fw(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 Mw={rotation:45,spacing:5,opacity:1,backgroundColor:"transparent",strokeOpacity:.5,stroke:"#fff",lineWidth:2};function Tw(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 Lw(e){var r=I({},Mw,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),Tw(u,r,s);var h=u.createPattern(l,"repeat");if(h){var f=va(),v=cs(f,i);h.setTransform(v)}return h}var Ow={size:6,padding:1,isStagger:!0,backgroundColor:"transparent",opacity:1,rotation:0,fill:"#fff",fillOpacity:.5,stroke:"transparent",lineWidth:0};function Iw(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 Pw(e){var r=I({},Ow,e),t=r.size,i=r.padding,n=r.isStagger,a=r.rotation,o=th(t,i,n),s=eh(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];Iw(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 Dw(e){var r=e.type,t=e.cfg,i;switch(r){case"dot":i=Ew(t);break;case"line":i=Lw(t);break;case"square":i=Pw(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=Ie.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=Dw(I({},{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 I({},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 me(e){var r=e.chart,t=e.options,i=t.tooltip;return i!==void 0&&r.tooltip(i),e}function ie(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 qt(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 Ht(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 sn(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 ue(e,r){return function(t){var i=t.chart,n=t.options,a={};return(0,c.each)(e,function(o,s){a[s]=Kt(o,De)}),a=I({},r,n.meta,a),i.scale(a),t}}function le(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(Kt(i,["min","max","minLimit","maxLimit"])).some(function(o){return!(0,c.isNil)(o)})?a=!0:a=!1),r.limitInPlot=a,e}function rh(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 Ye(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 ke(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,F=S.tileMappingField;b.color(F,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 T=da(t,"shape"),C=T.mappingFields,F=T.tileMappingField;b.shape(F,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 D=da(t,"size"),C=D.mappingFields,F=D.tileMappingField;b.size(F,pi(C,x))}else h&&b.size(h,x);if((0,c.isFunction)(_)){var O=da(t,"style"),C=O.mappingFields,F=O.tileMappingField;b.style(F,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 W=v.callback,rt=v.fields,_t=(0,d.__rest)(v,["callback","fields"]);b.label({fields:rt||[s],callback:W,cfg:_e(_t)})}return g&&b.state(g),p&&b.customInfo(p),[o,s].filter(function(Ct){return Ct!==l}).forEach(function(Ct){r.legend(Ct,!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=Ye(s,[i,n,a]),h=u.fields,f=u.formatter;return t?ke(I({},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=Ye(u,[n,a,o]),v=f.fields,g=f.formatter;return t?ke(I({},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=Ye(l,[i,n,a,o,s]),f=h.fields,v=h.formatter;return t?ke(I({},e,{options:{type:"point",colorField:a,shapeField:s,tooltipFields:f,mapping:(0,d.__assign)({tooltip:v},t),args:{useDeferredLabel:u}}})):e}function kw(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(I({},(0,c.isObject)(h)?h:qi(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=Ye(o,[t,i,a]),p=g.fields,y=g.formatter,m=(n?ke(I({},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 kw((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=Ye(o,[i,n,a]),u=l.fields,h=l.formatter;return t?ke(I({},e,{options:{type:"polygon",colorField:a,tooltipFields:u,mapping:(0,d.__assign)({tooltip:h},t),args:{useDeferredLabel:s}}})):e}function ih(e){var r=e.options,t=r.edge,i=r.xField,n=r.yField,a=r.seriesField,o=r.tooltip,s=r.useDeferredLabel,l=Ye(o,[i,n,a]),u=l.fields,h=l.formatter;return t?ke(I({},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=Ye(o,[i,n,a]),u=l.fields,h=l.formatter;return t?ke(I({},e,{options:{type:"schema",colorField:a,tooltipFields:u,mapping:(0,d.__assign)({tooltip:h},t),args:{useDeferredLabel:s}}})):e}function Bw(e){var r=e.options,t=r.violin,i=r.xField,n=r.yField,a=r.seriesField,o=r.sizeField,s=r.tooltip,l=Ye(s,[i,n,a,o]),u=l.fields,h=l.formatter;return t?ke(I({},e,{options:{type:"violin",colorField:a,tooltipFields:u,mapping:(0,d.__assign)({tooltip:h},t)}})):e}function Rw(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=I({},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=I({},v,{options:{tooltip:!1,state:h}}),p=I({},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 Et(ue((r={},r[o]=n,r[s]=a,r),(t={},t[o]={type:"cat"},t[s]=os(l,s),t)))(e)}function Nw(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 nh(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 ah(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 zw(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"}}]},_e(s))})}return e}function Vw(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 oh(e){return Et(Rw,ya,Vw,Ht,Nw,nh,ah,me,zw,sn,hs,ie,qt,le(),Xr)(e)}var Gw=I({},Pt.getDefaultOptions(),{tooltip:{shared:!0,showMarkers:!0,showCrosshairs:!0,crosshairs:{type:"x"}},legend:{position:"top-left",radio:{}},isStack:!1}),Ww=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}(ae);bt("marker-active",Ww),It("marker-active",{start:[{trigger:"tooltip:show",action:"marker-active:active"}],end:[{trigger:"tooltip:hide",action:"marker-active:reset"}]});var sh=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 Gw},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 oh},r}(Pt);function lh(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 Hw(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 ln(e,r,t,i,n){return n?lh(e,r,t,i):e}function Yw(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=ln(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=I({},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:I({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=I({},x,{options:{tooltip:!1,state:p}});return ga(x),yi(_),ze(w),e}function Xw(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"}}]},_e(s))})}return e}function jw(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 uh(e){return Et(Ht,Ne("areaStyle"),rh("rect"),Yw,ya,jw,nh,ah,me,Xw,sn,le(),ie,qt,Xr)(e)}var Uw=I({},Pt.getDefaultOptions(),{tooltip:{shared:!0,showMarkers:!0,showCrosshairs:!0,crosshairs:{type:"x"}},isStack:!0,line:{},legend:{position:"top-left",radio:{}}}),ch=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 Uw},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(ln(t,o,a,o,n))},r.prototype.getSchemaAdaptor=function(){return uh},r}(Pt);function hh(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 Zw(e,r){return I({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:hh}},e)}function ma(e,r){return(0,c.map)(r.getModel().points,function(t){return e.convertPoint(t)})}function Kw(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 qw(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),F=y.slice(0,C)+"...";_.attr("text",F)}}}}function $w(e,r,t){Kw(e,r,t),qw(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(I({},(0,c.isObject)(s)?s:qi(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:Zw(o,r)},g=f.elements;(0,c.each)(g,function(p,y){y>0&&$w(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}]}]};It(jr.hover,{start:vs(jr.hover),end:[{trigger:"interval:mouseleave",action:["element-highlight-by-color:reset","element-link-by-color:unlink"]}]}),It(jr.click,{start:vs(jr.click),end:[{trigger:"document:mousedown",action:["element-highlight-by-color:clear","element-link-by-color:clear"]}]});function Jw(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 tb=10,eb=5,rb={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"}}},ib=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"},rb),t}return r.prototype.getButtonCfg=function(){var t=this.context.view,i=(0,c.get)(t,["interactions","filter-action","cfg","buttonConfig"]);return I(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=Ie.transform(null,[["t",n.x-o.width-tb,n.y+o.height+eb]]);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}(ae);bt("brush-reset-button",ib,{name:"brush-reset-button"}),It("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{}}}It("brush",Ur("brush")),It("brush-highlight",Ur("brush-highlight")),It("brush-x",Ur("brush-x","x-rect")),It("brush-y",Ur("brush-y","y-rect")),It("brush-x-highlight",Ur("brush-x-highlight","x-rect")),It("brush-y-highlight",Ur("brush-y-highlight","y-rect"));var fh=["brush","brush-x","brush-y","brush-highlight","brush-x-highlight","brush-y-highlight"];function vh(e){var r=e.options,t=r.brush,i=(0,c.filter)(r.interactions||[],function(n){return fh.indexOf(n.type)===-1});return(t==null?void 0:t.enabled)&&(fh.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}})),I({},e,{options:{interactions:i}})}function nb(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 ab(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?Hw(i,f,[h,g],f):ln(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=I({},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 Et(ue((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 ob(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 sb(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 lb(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"}}]},_e(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 ub(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,Kt(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 Et(nb,Ht,Ne("columnStyle"),Tr,rh("rect"),ab,ds,ob,sb,ub,sn,hs,lb,vh,ie,qt,le(),Qw(t.yField,!r,!!i),Jw(!t.isStack),Xr)(e)}var cb=I({},Pt.getDefaultOptions(),{columnWidthRatio:.6,marginRatio:1/32,tooltip:{shared:!0,showMarkers:!1,offset:20},legend:{radio:{}},interactions:[{type:"active-region"}]}),dh=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 cb},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(ln(t,n,a,n,o))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return xa},r}(Pt);function hb(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 fb(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"}}])),I({},e,{options:{label:t}})}function vb(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,I({},e,{options:{legend:n}})}function db(e){var r=e.options,t=[{type:"transpose"},{type:"reflectY"}].concat(r.coordinate||[]);return I({},e,{options:{coordinate:t}})}function gb(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 gh(e){return Et(hb,fb,vb,me,db,gb)(e)}var pb=I({},Pt.getDefaultOptions(),{barWidthRatio:.6,marginRatio:1/32,tooltip:{shared:!0,showMarkers:!1,offset:20},legend:{radio:{}},interactions:[{type:"active-region"}]}),yb=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 pb},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(ln(t,u,h,u,l))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return gh},r}(Pt),ph=I({},Pt.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 mb(e,r){var t=null;return(0,c.each)(e,function(i){typeof i[r]=="number"&&(t+=i[r])}),t}function xb(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 _b=[1,0,0,0,1,0,0,0,1];function gs(e,r){var t=r?(0,d.__spreadArrays)(r):(0,d.__spreadArrays)(_b);return Ie.transform(t,e)}var wb=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getActiveElements=function(){var t=Ie.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=Ie.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}(ae);function bb(e){var r=e.event,t,i=r.target;return i&&(t=i.get("element")),t}var Sb=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=Ie.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=bb(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}(ae),yh="pie-statistic";bt(yh,Sb),It("pie-statistic-active",{start:[{trigger:"element:mouseenter",action:"pie-statistic:change"}],end:[{trigger:"element:mouseleave",action:"pie-statistic:reset"}]}),bt("pie-legend",wb),It("pie-legend-active",{start:[{trigger:"legend-item:mouseenter",action:"pie-legend:active"}],end:[{trigger:"legend-item:mouseleave",action:"pie-legend:reset"}]});function Cb(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=I({},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=I({},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 Ab(e){var r,t=e.chart,i=e.options,n=i.meta,a=i.colorField,o=I({},n);return t.scale(o,(r={},r[a]={type:"cat"},r)),e}function Fb(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 Eb(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=_e(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)?zc(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:xb(u.type,u.offset),type:"pie"})})}return e}function mh(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=I({},ph.statistic,t),u=l.title,h=l.content;return u!==!1&&(u=I({},{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=I({},{formatter:function(f,v){var g=f?f[i]:mb(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)),I({},{statistic:{title:u,content:h}},e)}return e}function xh(e){var r=e.chart,t=e.options,i=mh(t),n=i.innerRadius,a=i.statistic;return r.getController("annotation").clear(!0),Et(le())(e),n&&a&&ua(r,{statistic:a,plotType:"pie"}),e}function Mb(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(I({},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 Tb(e){var r=e.chart,t=e.options,i=mh(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:yh+":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,I({},s.cfg,{start:h}))}else r.interaction(s.type,s.cfg||{})}),e}function _h(e){return Et(Ne("pieStyle"),Cb,Ab,Ht,Fb,Yr,Mb,Eb,Tr,xh,Tb,qt)(e)}var wh=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 ph},r.prototype.changeData=function(t){this.chart.emit(L.BEFORE_CHANGE_DATA,se.fromData(this.chart,L.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),xh({chart:this.chart,options:this.options}),this.chart.render(!0)),this.chart.emit(L.AFTER_CHANGE_DATA,se.fromData(this.chart,L.AFTER_CHANGE_DATA,null))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return _h},r}(Pt);function Lb(e){var r=e.chart,t=e.options,i=t.data,n=t.sectorStyle,a=t.color;return r.data(i),Et(Ce)(I({},e,{options:{marginRatio:1,interval:{style:n,color:a}}})),e}function Ob(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:_e(l)})}else cr(qe.WARN,i===null,"the label option must be an Object."),a.label({fields:[n]});return e}function Ib(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 Pb(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 Db(e){var r,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return Et(ue((r={},r[a]=i,r[o]=n,r)))(e)}function kb(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 Bb(e){Et(Ne("sectorStyle"),Lb,Db,Ob,Pb,kb,Ib,me,ie,qt,Ht,le(),Tr)(e)}var Rb=I({},Pt.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"}]}),bL=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 Rb},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 Bb},r}(Pt),Nb={font:function(){return"serif"},padding:1,size:[500,500],spiral:"archimedean",timeInterval:3e3};function zb(e,r){return r=(0,c.assign)({},Nb,r),Vb(e,r)}function Vb(e,r){var t=Jb();["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,un=1<<11>>5,wa=1<<11;function Gb(e){return e.text}function Wb(){return"serif"}function bh(){return"normal"}function Hb(e){return e.value}function Yb(){return~~(Math.random()*2)*90}function Xb(){return 1}function jb(e,r,t,i){if(!r.sprite){var n=e.context,a=e.ratio;n.clearRect(0,0,(un<<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>=un<<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,(un<<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,F=-1,T=0;T<f;T++){for(var S=0;S<h;S++){var D=b*T+(S>>5),O=_[(s+T)*(un<<5)+(o+S)<<2]?1<<31-S%32:0;w[D]|=O,C|=O}C?F=T:(r.y0++,f--,T--,s++)}r.y1=r.y0+F,r.sprite=w.slice(0,(r.y1-r.y0)*b)}}}function Ub(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 Zb(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 Kb(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 Sh(e){var r=e[0]/e[1];return function(t){return[r*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function qb(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 Ch(e){for(var r=[],t=-1;++t<e;)r[t]=0;return r}function $b(){return document.createElement("canvas")}function er(e){return(0,c.isFunction)(e)?e:function(){return e}}var Qb={archimedean:Sh,rectangular:qb};function Jb(){var e=[256,256],r=Wb,t=Hb,i=bh,n=Yb,a=Xb,o=Sh,s=Math.random,l=[],u=Infinity,h=Gb,f=bh,v=$b,g={};g.start=function(){var m=e[0],x=e[1],_=p(v()),w=g.board?g.board:Ch((e[0]>>5)*e[1]),b=l.length,S=[],C=l.map(function(O,W,rt){return O.text=h.call(this,O,W,rt),O.font=r.call(this,O,W,rt),O.style=f.call(this,O,W,rt),O.weight=i.call(this,O,W,rt),O.rotate=n.call(this,O,W,rt),O.size=~~t.call(this,O,W,rt),O.padding=a.call(this,O,W,rt),O}).sort(function(O,W){return W.size-O.size}),F=-1,T=g.board?[{x:0,y:0},{x:m,y:x}]:null;D();function D(){for(var O=Date.now();Date.now()-O<u&&++F<b;){var W=C[F];W.x=m*(s()+.5)>>1,W.y=x*(s()+.5)>>1,jb(_,W,C,F),W.hasText&&y(w,W,T)&&(S.push(W),T?g.hasImage||Zb(T,W):T=[{x:W.x+W.x0,y:W.y+W.y0},{x:W.x+W.x1,y:W.y+W.y1}],W.x-=e[0]>>1,W.y-=e[1]>>1)}g._tags=S,g._bounds=T}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=(un<<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),F=s()<.5?1:-1,T,D=-F,O,W;(T=C(D+=F))&&(O=~~T[0],W=~~T[1],!(Math.min(Math.abs(O),Math.abs(W))>=S));)if(x.x=w+O,x.y=b+W,!(x.x+x.x0<0||x.y+x.y0<0||x.x+x.x1>e[0]||x.y+x.y1>e[1])&&(!_||!Ub(x,m,e[0]))&&(!_||Kb(x,_))){for(var rt=x.sprite,_t=x.width>>5,Ct=e[0]>>5,Vt=x.x-(_t<<4),Y=Vt&127,at=32-Y,yt=x.y1-x.y0,ut=void 0,gt=(x.y+x.y0)*Ct+(Vt>>5),At=0;At<yt;At++){ut=0;for(var zt=0;zt<=_t;zt++)m[gt+zt]|=ut<<at|(zt<_t?(ut=rt[At*_t+zt])>>>Y:0);gt+=Ct}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=Ch((_>>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 F=C.getImageData(0,0,_,w).data,T=0;T<w;T++)for(var D=0;D<_;D++){var O=b*T+(D>>5),W=T*_+D<<2,rt=F[W]>=250&&F[W+1]>=250&&F[W+2]>=250,_t=rt?1<<31-D%32:0;S[O]|=_t}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=er(m)},g.fontWeight=function(m){i=er(m)},g.rotate=function(m){n=er(m)},g.spiral=function(m){o=Qb[m]||m},g.fontSize=function(m){t=er(m)},g.padding=function(m){a=er(m)},g.random=function(m){s=er(m)},g}function Ah(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,F=p.padding,T=p.fontSize,D=nS(u,v),O=[sS(D),lS(D)],W=u.map(function(Ct){return{text:Ct[f],value:Ct[v],color:Ct[g],datum:Ct}}),rt={imageMask:h,font:S,fontSize:iS(T,O),fontWeight:C,size:tS({width:n,height:a,padding:o,appendPadding:s,autoFit:w,container:l}),padding:F,timeInterval:y,random:m,spiral:x,rotate:aS(r)};if((0,c.isFunction)(b)){var _t=W.map(function(Ct,Vt,Y){return(0,d.__assign)((0,d.__assign)((0,d.__assign)({},Ct),{hasText:!!Ct.text,font:er(rt.font)(Ct,Vt,Y),weight:er(rt.fontWeight)(Ct,Vt,Y),rotate:er(rt.rotate)(Ct,Vt,Y),size:er(rt.fontSize)(Ct,Vt,Y),style:"normal"}),b.call(t,Ct,Vt,Y))});return _t.push({text:"",value:0,x:0,y:0,opacity:0}),_t.push({text:"",value:0,x:rt.size[0],y:rt.size[1],opacity:0}),_t}return zb(W,rt)}function tS(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=eS({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 eS(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 rS(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(qe.ERROR,!1,"image %s load failed !!!",e),t()};return}cr(qe.WARN,e===void 0,"The type of imageMask option must be String or HTMLImageElement."),t()})}function iS(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 nS(e,r){return e.map(function(t){return t[r]}).filter(function(t){return typeof t=="number"&&!isNaN(t)})}function aS(e){var r=oS(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 oS(e){var r=e.wordStyle.rotationSteps;return r<1&&(cr(qe.WARN,!1,"The rotationSteps option must be greater than or equal to 1."),r=1),{rotation:e.wordStyle.rotation,rotationSteps:r}}function sS(e){return Math.min.apply(Math,e)}function lS(e){return Math.max.apply(Math,e)}var ys="color",uS=I({},Pt.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 cS(e){var r=e.chart,t=e.options,i=t.colorField,n=t.color,a=Ah(e);r.data(a);var o=I({},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 hS(e){return Et(ue({x:{nice:!1},y:{nice:!1}}))(e)}function fS(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 vS(e){Et(cS,hS,me,fS,ie,qt,Ht,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)({},dS(e)),{x:t,y:i})}),a=e.data.rotate;return typeof a=="number"&&Ie.rotate(n,a*Math.PI/180),n}});function dS(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 SL=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 uS},r.prototype.changeData=function(t){this.updateOption({data:t}),this.options.imageMask?this.render():this.chart.changeData(Ah({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()};rS(n).then(a).catch(a)})},r.prototype.getSchemaAdaptor=function(){return vS},r.prototype.triggerResize=function(){var t=this;this.chart.destroyed||(this.execAdaptor(),window.setTimeout(function(){e.prototype.triggerResize.call(t)}))},r}(Pt),Zr=A(56645),gS={exp:Zr.regressionExp,linear:Zr.regressionLinear,loess:Zr.regressionLoess,log:Zr.regressionLog,poly:Zr.regressionPoly,pow:Zr.regressionPow,quad:Zr.regressionQuad};function pS(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 yS=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 dw(l,!1)},mS=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=gS[s]().x(function(f){return f[t]}).y(function(f){return f[i]});u=h(n)}return yS(u,e)},xS=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 Fh(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=Kt(xS(e),h);return I({},e,{meta:f})}return e}function _S(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(I({},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=Fh(t);return Et(ue((r={},r[a]=i,r[o]=n,r)))(I({},e,{options:s}))}function wS(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 bS(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 SS(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:_e(s)})}return e}function CS(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=pS(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:I({},f.regionStyle[p].style,u==null?void 0:u[p])}),(0,d.__assign)({type:"text",top:!0},I({},f.labelStyle[p],l==null?void 0:l[p])))}),i.push({type:"line",top:!1,start:["min",s],end:["max",s],style:I({},f.lineStyle,h)},{type:"line",top:!1,start:[a,"min"],end:[a,"max"],style:I({},f.lineStyle,h)})}return Et(le(i))(e)}function AS(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=mS({view:u,options:r});h.addShape("path",{name:"regression-line",attrs:(0,d.__assign)((0,d.__assign)({path:f},s),n)})}})}return e}function FS(e){var r=e.chart,t=e.options,i=t.tooltip;return i?r.tooltip(i):i===!1&&r.tooltip(!1),e}function Eh(e){return Et(_S,ba,wS,bS,FS,SS,vh,sn,hs,ie,CS,qt,Ht,AS)(e)}var ES=I({},Pt.getDefaultOptions(),{size:4,tooltip:{showTitle:!1,showMarkers:!1,showCrosshairs:!0,crosshairs:{type:"xy"}}});It("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 MS=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(L.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)===Pe.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)===Pe.RESET&&ba({chart:h,options:u})}),n}return r.getDefaultOptions=function(){return ES},r.prototype.changeData=function(t){this.updateOption(Fh(I({},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 Eh},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r}(Pt);function TS(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=I({},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=I({},l,{options:{tooltip:!1}}),h=(o==null?void 0:o.state)||t.state,f=I({},l,{options:{tooltip:!1,state:h}});return yi(l),ze(f),ga(u),e}function LS(e){var r,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return Et(ue((r={},r[a]=i,r[o]=n,r)))(e)}function OS(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 IS(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 PS(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:_e(s)})}return e}function DS(e){return Et(TS,LS,Ht,OS,IS,Yr,me,PS,ie,qt,le())(e)}var kS=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=Ie.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",kS);var BS=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}(ae);bt("radar-tooltip",BS),It("radar-tooltip",{start:[{trigger:"plot:mousemove",action:"radar-tooltip:show"}],end:[{trigger:"plot:mouseleave",action:"radar-tooltip:hide"}]});var CL=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 I({},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 DS},r}(Pt),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",Mh={nice:!0,label:{autoHide:!0,autoRotate:!1}},RS=(0,d.__assign)((0,d.__assign)({},Mh),{position:"left"}),NS=(0,d.__assign)((0,d.__assign)({},Mh),{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 Th(e,r,t){return xs(t)?I({},{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 Lh(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 Oh(e,r){return r===mi.Left?e===!1?!1:I({},RS,e):r===mi.Right?e===!1?!1:I({},NS,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=Ie.getMappingValue(l,s,(0,c.get)(l,["values",0],u)));var h=((0,c.isFunction)(a)?a:!(0,c.isEmpty)(a)&&I({},{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=Ie.getLegendItems(r,o,g,r.getTheme(),a);return v.concat(p)},[])}function zS(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(I({},e,{options:(0,d.__assign)((0,d.__assign)((0,d.__assign)({},Kt(r,u)),i),{line:{color:i.color,style:i.lineStyle}})})),ze(I({},e,{options:(0,d.__assign)((0,d.__assign)((0,d.__assign)({},Kt(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(I({},e,{options:(0,d.__assign)((0,d.__assign)((0,d.__assign)({},Kt(r,u)),i),{widthRatio:i.columnWidthRatio,interval:(0,d.__assign)((0,d.__assign)({},Kt(i,["color"])),{style:i.columnStyle})})})),e}var Ph=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?ww(p,f,v):!0}),e.getRootView().render(!0)}};function VS(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 I({},{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:Lh(o,t.yAxis),geometryOptions:[Th(a,o[0],n[0]),Th(a,o[1],n[1])],annotations:Lh(o,t.annotations)}})}function GS(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 WS(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?lh(f,v,i,v):f,y=Bt(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;zS({chart:y,options:{xField:i,yField:v,tooltip:m,geometryOption:u}})}),e}function HS(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=Bt(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 YS(e){var r,t,i=e.chart,n=e.options,a=n.xAxis,o=n.yAxis,s=n.xField,l=n.yField;return ue((r={},r[s]=a,r[l[0]]=o[0],r))(I({},e,{chart:Bt(i,Ve)})),ue((t={},t[s]=a,t[l[1]]=o[1],t))(I({},e,{chart:Bt(i,Ge)})),e}function XS(e){var r=e.chart,t=e.options,i=Bt(r,Ve),n=Bt(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],Oh(l[0],mi.Left)),n.axis(a,!1),n.axis(o[1],Oh(l[1],mi.Right)),e}function jS(e){var r=e.chart,t=e.options,i=t.tooltip,n=Bt(r,Ve),a=Bt(r,Ge);return r.tooltip(i),n.tooltip({shared:!0}),a.tooltip({shared:!0}),e}function US(e){var r=e.chart;return ie(I({},e,{chart:Bt(r,Ve)})),ie(I({},e,{chart:Bt(r,Ge)})),e}function ZS(e){var r=e.chart,t=e.options,i=t.annotations,n=(0,c.get)(i,[0]),a=(0,c.get)(i,[1]);return le(n)(I({},e,{chart:Bt(r,Ve),options:{annotations:n}})),le(a)(I({},e,{chart:Bt(r,Ge),options:{annotations:a}})),e}function KS(e){var r=e.chart;return Ht(I({},e,{chart:Bt(r,Ve)})),Ht(I({},e,{chart:Bt(r,Ge)})),Ht(e),e}function qS(e){var r=e.chart;return qt(I({},e,{chart:Bt(r,Ve)})),qt(I({},e,{chart:Bt(r,Ge)})),e}function $S(e){var r=e.chart,t=e.options,i=t.yAxis;return Xr(I({},e,{chart:Bt(r,Ve),options:{yAxis:i[0]}})),Xr(I({},e,{chart:Bt(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=Bt(r,Ve),l=Bt(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(I({},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)(Bt(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(F){var T=(0,c.find)(w,function(D){return D.value===F});return!T.unchecked})}),r.render(!0)})}}})}return e}function JS(e){var r=e.chart,t=e.options,i=t.slider,n=Bt(r,Ve),a=Bt(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)||Ph(a,l)}),r.once("afterpaint",function(){if(!(0,c.isBoolean)(i)){var o=i.start,s=i.end;(o||s)&&Ph(a,[o,s])}})),e}function tC(e){return Et(VS,GS,KS,WS,YS,XS,$S,jS,US,ZS,qS,HS,QS,JS)(e)}var AL=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 I({},e.prototype.getDefaultOptions.call(this),{yAxis:[],syncViewPadding:!0})},r.prototype.getSchemaAdaptor=function(){return tC},r}(Pt),cn="x",xi="y",Dh={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"}},eC={appendPadding:2,tooltip:(0,d.__assign)({},Dh),animation:{}};function qr(e){return(0,c.map)(e||[],function(r,t){return{x:""+t,y:r}})}function rC(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=I({},e,{options:{xField:cn,yField:xi,area:{color:n,style:a},line:s,point:o}}),f=I({},h,{options:{tooltip:!1}}),v=I({},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 Et(ue((r={},r[cn]=n,r[xi]=a,r),(t={},t[cn]={type:"cat"},t[xi]=os(s,xi),t)))(e)}function kh(e){return Et(Ne("areaStyle"),rC,_i,me,Ht,qt,le())(e)}function iC(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=I({},e,{options:{xField:cn,yField:xi,line:{color:n,style:a},point:o}}),h=I({},u,{options:{tooltip:!1,state:s}});return yi(u),ze(h),r.axis(!1),r.legend(!1),e}function Bh(e){return Et(iC,_i,Ht,me,qt,le())(e)}var nC=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 eC},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}(Pt);function aC(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=I({},e,{options:{xField:cn,yField:xi,widthRatio:o,interval:{style:a,color:n}}});return Ce(l),r.axis(!1),r.legend(!1),r.interaction("element-active"),e}function Rh(e){return Et(Ht,Ne("columnStyle"),aC,_i,me,qt,le())(e)}var oC={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"}}},sC={appendPadding:2,tooltip:(0,d.__assign)({},oC),animation:{}},lC=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 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 Rh},r}(Pt),uC={appendPadding:2,tooltip:(0,d.__assign)({},Dh),color:"l(90) 0:#E5EDFE 1:#ffffff",areaStyle:{fillOpacity:.6},line:{size:1,color:"#5B8FF9"},animation:{}},cC=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 uC},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}(Pt);function Nh(e,r,t){if(t===1)return[0,r];var i=Math.floor(e/r);return[r*i,r*(i+1)]}function hC(e){return Math.ceil(Math.log(e.length)/Math.LN2)+1}function zh(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=hC(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=Nh(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=Nh(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",hn="count",fC=I({},Pt.getDefaultOptions(),{columnStyle:{stroke:"#FFFFFF"},tooltip:{shared:!0,showMarkers:!1},interactions:[{type:"active-region"}]});function vC(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=zh(i,n,o,a,l);r.data(f);var v=I({},e,{options:{xField:Sa,yField:hn,seriesField:l,isStack:!0,interval:{color:s,style:h}}});return Ce(v),u&&l&&r.legend(l,u),e}function dC(e){var r,t=e.options,i=t.xAxis,n=t.yAxis;return Et(ue((r={},r[Sa]=i,r[hn]=n,r)))(e)}function gC(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(hn,!1):r.axis(hn,n),e}function pC(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:[hn],callback:a,cfg:_e(o)})}return e}function Vh(e){return Et(Ht,Ne("columnStyle"),vC,dC,gC,Tr,pC,me,ie,qt)(e)}var yC=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 fC},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(zh(t,n,o,a,s))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return Vh},r}(Pt),Gh=["#FAAD14","#E8EDF3"],mC={percent:.2,color:Gh,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 Wh(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=I({},e,{options:{xField:"1",yField:"percent",seriesField:"type",isStack:!0,widthRatio:o,interval:{style:n,color:(0,c.isString)(a)?[a,Gh[1]]:a},args:{zIndexReversed:!0,sortZIndex:!0}}});return Ce(s),r.tooltip(!1),r.axis(!1),r.legend(!1),e}function xC(e){var r=e.chart;return r.coordinate("rect").transpose(),e}function Hh(e){return Et(Wh,ue({}),xC,qt,Ht,le())(e)}var _C=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 mC},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 Hh},r}(Pt);function wC(e){var r=e.chart,t=e.options,i=t.innerRadius,n=t.radius;return r.coordinate("theta",{innerRadius:i,radius:n}),e}function Yh(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=I({},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 Xh(e){return Et(Wh,ue({}),wC,Yh,qt,Ht,le())(e)}var bC={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:{}},SC=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 bC},r.prototype.changeData=function(t){this.chart.emit(L.BEFORE_CHANGE_DATA,se.fromData(this.chart,L.BEFORE_CHANGE_DATA,null)),this.updateOption({percent:t}),this.chart.data(_s(t)),Yh({chart:this.chart,options:this.options},!0),this.chart.emit(L.AFTER_CHANGE_DATA,se.fromData(this.chart,L.AFTER_CHANGE_DATA,null))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return Xh},r}(Pt);function CC(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=Ye(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),ke(I({},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(F){return F[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 AC(e){var r,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return Et(ue((r={},r[a]=i,r[o]=n,r)))(e)}function FC(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 EC(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 MC(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:_e(l)})}return e}function TC(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 LC(e){return Et(Ht,Ne("heatmapStyle"),AC,TC,CC,FC,EC,me,MC,le(),ie,qt,Tr)(e)}var OC=I({},Pt.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 FL=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 OC},r.prototype.getSchemaAdaptor=function(){return LC},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r}(Pt),ws,wi="$$range$$",IC="low-q1-median-q3-high",PC="$$y_outliers$$",jh="outliers_view",DC=I({},Pt.getDefaultOptions(),{meta:(ws={},ws[wi]={min:0,alias:IC},ws),interactions:[{type:"active-region"}],tooltip:{showMarkers:!1,shared:!0},boxStyle:{lineWidth:1}}),Uh=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 kC(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(Uh(t.data,n));var u=(0,c.isArray)(n)?wi:n,h=n?(0,c.isArray)(n)?n:[n]:[],f=s;f!==!1&&(f=I({},{fields:(0,c.isArray)(n)?n:[]},f));var v=fs(I({},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 BC(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:jh}),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 RC(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=PC;v=(r={},r[h]={sync:g,nice:!0},r[f]={sync:g,nice:!0},r)}var p=I(v,a,(t={},t[l]=Kt(o,De),t[f]=Kt(s,De),t));return i.scale(p),e}function NC(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 zC(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 VC(e){return Et(kC,BC,RC,NC,zC,me,ie,qt,Ht)(e)}var EL=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 DC},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this.options.yField,n=this.chart.views.find(function(a){return a.id===jh});n&&n.data(t),this.chart.changeData(Uh(t,i))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return VC},r}(Pt),GC=A(53843),WC=A.n(GC);function Zh(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 fn(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(fn(e,t,r),e[i]>f&&fn(e,t,i);v<g;){for(fn(e,v,g),v++,g--;e[v]<f;)v++;for(;e[g]>f;)g--}e[t]===f?fn(e,t,g):(g++,fn(e,g,i)),g<=r&&(t=g+1),r<=g&&(i=g-1)}}function vn(e,r){var t=e.slice();if(Array.isArray(r)){HC(t,r);for(var i=[],n=0;n<r.length;n++)i[n]=Zh(t,r[n]);return i}else{var a=qh(t.length,r);return Kh(t,a,0,t.length-1),Zh(t,r)}}function Kh(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 HC(e,r){for(var t=[0],i=0;i<r.length;i++)t.push(qh(e.length,r[i]));t.push(e.length-1),t.sort(YC);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);Kh(e,t[s],Math.floor(t[o]),Math.ceil(t[a])),n.push(o,s,s,a)}}}function YC(e,r){return e-r}function qh(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 $h=function(e){return{low:(0,c.min)(e),high:(0,c.max)(e),q1:vn(e,.25),q3:vn(e,.75),median:vn(e,[.5]),minMax:[(0,c.min)(e),(0,c.max)(e)],quantile:[vn(e,.25),vn(e,.75)]}},Qh=function(e,r){var t=WC().create(e,r);return{violinSize:t.map(function(i){return i.y}),violinY:t.map(function(i){return i.x})}},Jh=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},Qh(v,o)),$h(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),Qh(y,o)),$h(y)))})}),l},Xe="x",$r="violinY",XC="violinSize",tf="minMax",ef="quantile",rf="median",bs="violin_view",jC="min_max_view",UC="quantile_view",ZC="median_view",KC=I({},Pt.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 qC(e){var r=e.chart,t=e.options;return r.data(Jh(t)),e}function $C(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 Bw({chart:h,options:{xField:Xe,yField:$r,seriesField:i||Xe,sizeField:XC,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:jC});Ce({chart:s,options:{xField:Xe,yField:tf,seriesField:i||Xe,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:UC});Ce({chart:l,options:{xField:Xe,yField:ef,seriesField:i||Xe,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:ZC});return ze({chart:u,options:{xField:Xe,yField:rf,seriesField:i||Xe,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 JC(e){var r,t=e.chart,i=e.options,n=i.meta,a=i.xAxis,o=i.yAxis,s={},l=I(s,n,(r={},r[Xe]=(0,d.__assign)((0,d.__assign)({sync:!0},Kt(a,De)),{type:"cat"}),r[$r]=(0,d.__assign)({sync:!0},Kt(o,De)),r[tf]=(0,d.__assign)({sync:$r},Kt(o,De)),r[ef]=(0,d.__assign)({sync:$r},Kt(o,De)),r[rf]=(0,d.__assign)({sync:$r},Kt(o,De)),r));return t.scale(l),e}function tA(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=Bt(r,bs);return i===!1?a.axis(Xe,!1):a.axis(Xe,i),n===!1?a.axis($r,!1):a.axis($r,n),r.axis(!1),e}function eA(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||Xe,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 rA(e){var r=e.chart,t=Bt(r,bs);return le()((0,d.__assign)((0,d.__assign)({},e),{chart:t})),e}function iA(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 nA(e){return Et(Ht,qC,$C,QC,JC,me,tA,eA,ie,rA,iA)(e)}var ML=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 KC},r.prototype.changeData=function(t){this.updateOption({data:t}),this.chart.changeData(Jh(this.options))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return nA},r}(Pt),aA=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}},nf={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)))}},oA=function(e){if(!nf[e])throw new Error("unknown blend mode "+e);return nf[e]};function sA(e,r,t){t===void 0&&(t="normal");var i=aA(oA(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 rr=A(87026),af=1e-10;function Ss(e,r){var t=uA(e),i=t.filter(function(F){return lA(F,e)}),n=0,a=0,o,s=[];if(i.length>1){var l=lf(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(F,T){return T.angle-F.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=$e(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($e(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-af,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 lA(e,r){for(var t=0;t<r.length;++t)if($e(e,r[t])>r[t].radius+af)return!1;return!0}function uA(e){for(var r=[],t=0;t<e.length;++t)for(var i=t+1;i<e.length;++i)for(var n=sf(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 $e(e,r){return Math.sqrt((e.x-r.x)*(e.x-r.x)+(e.y-r.y)*(e.y-r.y))}function of(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 sf(e,r){var t=$e(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 lf(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 cA(e,r){r=r||{},r.maxIterations=r.maxIterations||500;var t=r.initialLayout||dA,i=r.lossFunction||Fs;e=hA(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,rr.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 uf=1e-10;function As(e,r,t){return Math.min(e,r)*Math.min(e,r)*Math.PI<=t+uf?Math.abs(e-r):(0,rr.bisect)(function(i){return of(e,r,i)-t},0,e+r)}function hA(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 fA(e,r,t){var i=(0,rr.zerosM)(r.length,r.length),n=(0,rr.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 vA(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 dA(e,r){var t=pA(e,r),i=r.lossFunction||Fs;if(e.length>=8){var n=gA(e,r),a=i(n,e),o=i(t,e);a+1e-8<o&&(t=n)}return t}function gA(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=fA(e,i,n),l=s.distances,u=s.constraints,h=(0,rr.norm2)(l.map(rr.norm2))/l.length;l=l.map(function(_){return _.map(function(w){return w/h})});var f=function(_,w){return vA(_,w,l,u)},v,g;for(a=0;a<t;++a){var p=(0,rr.zeros)(l.length*2).map(Math.random);g=(0,rr.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,rr.scale)(r.history[a].x,h);return m}function pA(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(Y){return Y.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+uf>=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(Y,at){return at.size-Y.size}v.sort(p);var y={};function m(Y){return Y.set in y}function x(Y,at){i[at].x=Y.x,i[at].y=Y.y,y[at]=!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],F=As(a.radius,C.radius,w[S].size);b.push({x:C.x+F,y:C.y}),b.push({x:C.x-F,y:C.y}),b.push({y:C.y+F,x:C.x}),b.push({y:C.y-F,x:C.x});for(var T=S+1;T<w.length;++T)for(var D=i[w[T].set],O=As(a.radius,D.radius,w[T].size),W=sf({x:C.x,y:C.y,radius:F},{x:D.x,y:D.y,radius:O}),rt=0;rt<W.length;++rt)b.push(W[rt])}for(var _t=1e50,Ct=b[0],S=0;S<b.length;++S){i[_].x=b[S].x,i[_].y=b[S].y;var Vt=t(i,e);Vt<_t&&(_t=Vt,Ct=b[S])}x(Ct,_)}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=of(s.radius,l.radius,$e(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 yA(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 mA(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 TL(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=mA(i);for(n=0;n<s.length;++n){yA(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 xA(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-$e(r[0],e),n,a;for(n=1;n<r.length;++n)a=r[n].radius-$e(r[n],e),a<=i&&(i=a);for(n=0;n<t.length;++n)a=$e(t[n],e)-t[n].radius,a<=i&&(i=a);return i}function cf(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,rr.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($e(u,e[i])>e[i].radius){h=!1;break}for(i=0;i<r.length;++i)if($e(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=cf(e,[]):u=lf(f.arcs.map(function(v){return v.p1}))}return u}function _A(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=$e(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 wA(e,r){for(var t={},i=_A(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=cf(f,v);t[a]=p,p.disjoint&&r[n].size>0&&console.log("WARNING: area "+a+" not represented on screen")}return t}function bA(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 LL(e){var r=e.split(" ");return{x:parseFloat(r[1]),y:parseFloat(r[2]),radius:-parseFloat(r[4])}}function SA(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 bA(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",CA={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"]},AA=(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 sA(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 FA(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(qe.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=cA(s),u=xA(l,r,t,i),h=wA(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=SA(p);/[zZ]$/.test(y)||(y+=" Z"),f[Ts]=y;var m=h[g]||{x:0,y:0};(0,c.assign)(f,m)}),s}function EA(e,r){for(var t=0;t<r.length;t++)if(!e.includes(r[t]))return!1;return!0}function MA(e){return I({},e.defaultStyle,{fill:e.color},e.style)}jt("schema","venn",{draw:function(e,r){var t=e.data,i=(0,Dn.tr)(t[Ts]),n=MA(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=Ie.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 TA=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}(Zn);$i("venn",TA);function Ma(e){if(!!e){var r=e.geometries[0].elements;r.forEach(function(t){t.shape.toFront()})}}var LA=Wn("element-active"),OA=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}(LA),IA=Wn("element-highlight"),PA=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}(IA),DA=Wn("element-selected"),kA=Wn("element-single-selected"),BA=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}(DA),RA=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}(kA);bt("venn-element-active",OA),bt("venn-element-highlight",PA),bt("venn-element-selected",BA),bt("venn-element-single-selected",RA),It("venn-element-active",{start:[{trigger:"element:mouseenter",action:"venn-element-active:active"}],end:[{trigger:"element:mouseleave",action:"venn-element-active:reset"}]}),It("venn-element-highlight",{start:[{trigger:"element:mouseenter",action:"venn-element-highlight:highlight"}],end:[{trigger:"element:mouseleave",action:"venn-element-highlight:reset"}]}),It("venn-element-selected",{start:[{trigger:"element:click",action:"venn-element-selected:toggle"}],rollback:[{trigger:"dblclick",action:["venn-element-selected:reset"]}]}),It("venn-element-single-selected",{start:[{trigger:"element:click",action:"venn-element-single-selected:toggle"}],rollback:[{trigger:"dblclick",action:["venn-element-single-selected:reset"]}]}),It("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"]}]}),It("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 NA=40;function hf(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=AA(h,r,a,o);return function(v){return f.get(v)||h[0]}}function zA(e,r){var t=e.options,i=t.color;if(typeof i!="function"){var n=typeof i=="string"?[i]:i,a=hf(e,r,n);return function(o){return a(o[fr])}}return i}function VA(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"),NA)),r.appendPadding=ss([o,a]),e}function GA(e){var r=e.options,t=r.data;t||(cr(qe.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 EA(i,o)});return(0,c.isEqual)(n,t)||cr(qe.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 WA(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=FA(t,Math.max(g-(l+h),0),Math.max(p-(s+u),0),0);r.data(y);var m=fs(I({},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 _=zA(e,y);return typeof _=="function"&&x.color(fr,function(w){var b=y.find(function(C){return C[fr]===w}),S=hf(e,y)(w);return _(b,S)}),e}function HA(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)({},_e(h),{type:"venn",customLabelInfo:s})})}return e}function YA(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 XA(e){var r=e.chart;return r.axis(!1),e}function jA(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"};ie(I({},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 UA(e){return Et(VA,Ht,GA,WA,HA,ue({}),YA,XA,me,jA,qt)(e)}var OL=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 CA},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return UA},r.prototype.triggerResize=function(){this.chart.destroyed||(this.chart.forceFit(),this.chart.clear(),this.execAdaptor(),this.chart.render(!0))},r}(Pt),dn="$$stock-range$$",Ta="trend",ff="up",vf="down",ZA={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"}}}},KA=I({},Pt.getDefaultOptions(),{tooltip:ZA,interactions:[{type:"tooltip"}],legend:{position:"top-left"},risingFill:"#ef5350",fallingFill:"#26a69a"});function df(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]?ff:vf,t[dn]=[t[i],t[n],t[a],t[o]]}return t})}function qA(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(df(n,i));var u=s;return u!==!1&&(u=I({},{fields:i},u)),fs(I({},e,{options:{schema:{shape:"candle",color:[a,o],style:l},yField:dn,seriesField:Ta,rawFields:i,tooltip:u}})),e}function $A(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:[ff,vf]},r),h=I(u,a,(t={},t[l]=Kt(o,De),t[dn]=Kt(s,De),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(dn,!1):r.axis(dn,n),e}function JA(e){var r=e.chart,t=e.options,i=t.tooltip;return i!==!1?r.tooltip(i):r.tooltip(!1),e}function tF(e){var r=e.chart,t=e.options,i=t.legend;return i?r.legend(Ta,i):i===!1&&r.legend(!1),e}function gf(e){Et(Ht,qA,$A,QA,JA,tF,ie,qt,le(),sn)(e)}var eF=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 KA},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return gf},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this.options.yField;this.chart.changeData(df(t,i))},r}(Pt),Ls,Lr="$$percentage$$",Or="$$mappingValue$$",vr="$$conversion$$",Os="$$totalPercentage$$",gn="$$x$$",pn="$$y$$",rF={appendPadding:[0,80],minSize:0,maxSize:1,meta:(Ls={},Ls[Or]={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 pf(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[Or]=(l-u)*v+u,h[vr]=[(0,c.get)(e,[f-1,n]),h[n]],h}),i}function Is(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[Or]))){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 iF(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=pf(n,n,{yField:a,maxSize:o,minSize:s});return r.data(l),e}function nF(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=Ye(o,[i,n]),g=v.fields,p=v.formatter;ke({chart:r,options:{type:"interval",xField:i,yField:Or,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 aF(e){var r=e.chart,t=e.options,i=t.isTransposed;return r.coordinate({type:"rect",actions:i?[]:[["transpose"],["scale",1,-1]]}),e}function oF(e){var r=e.options,t=r.maxSize,i=function(n,a,o,s){var l=t-(t-n[Or])/2;return(0,d.__assign)((0,d.__assign)({},s),{start:[a-.5,l],end:[a-.5,l+.05]})};return Is(i)(e),e}function yf(e){return Et(iF,nF,aF,oF)(e)}function sF(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 lF(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=pf(x.data,i,{yField:a,maxSize:h,minSize:f});m.data(w);var b=Ye(u,[n,a,s]),S=b.fields,C=b.formatter,F=l?{offset:_===0?10:-23,position:_===0?"bottom":"top"}:{offset:10,position:"left",style:{textAlign:_===0?"end":"start"}};ke({chart:m,options:{type:"interval",xField:n,yField:Or,colorField:n,tooltipFields:(0,c.isArray)(S)&&S.concat([Lr,vr]),mapping:{shape:"funnel",tooltip:C,color:o,style:g},label:v===!1?!1:I({},F,v),state:p}})}}),e}function uF(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 I({},f,{start:[u-.5,l[Or]],end:[u-.5,l[Or]+.05],text:n?{style:{textAlign:"start"}}:{offsetX:i!==!1?v*i.offsetX:0,style:{textAlign:o===0?"end":"start"}}})};Is(s)(I({},{chart:a,options:t}))})}),e}function cF(e){return Et(sF,lF,uF)(e)}function hF(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 fF(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){yf(I({},e,{chart:o,options:{data:s.data}}))}}),e}function vF(e){return Et(hF,fF)(e)}function dF(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[Os]=(u[a]||0)/o,h){var g=n[h-1][gn],p=n[h-1][pn];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[Os],f[2]=(v[2]+1)/4,v[3]=v[2],f[3]=-f[2],u[gn]=f,u[pn]=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 gF(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=Ye(o,[i,n]),f=h.fields,v=h.formatter;return ke({chart:r,options:{type:"polygon",xField:gn,yField:pn,colorField:i,tooltipFields:(0,c.isArray)(f)&&f.concat([Lr,vr]),label:s,state:u,mapping:{tooltip:v,color:a,style:l}}}),e}function pF(e){var r=e.chart,t=e.options,i=t.isTransposed;return r.coordinate({type:"rect",actions:i?[["transpose"],["reflect","x"]]:[]}),e}function yF(e){var r=function(t,i,n,a){return(0,d.__assign)((0,d.__assign)({},a),{start:[t[gn][1],t[pn][1]],end:[t[gn][1]+.05,t[pn][1]]})};return Is(r)(e),e}function mF(e){return Et(dF,gF,pF,yF)(e)}function xF(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"])+": "+hh.apply(void 0,f[vr])}}},h;return(t||o)&&(h=function(f){return I({},t&&{lineWidth:1,stroke:"#fff"},(0,c.isFunction)(o)?o(f):o)}),I({options:u},e,{options:{funnelStyle:h,data:(0,c.clone)(s)}})}function _F(e){var r=e.options,t=r.compareField,i=r.dynamicHeight,n=r.seriesField;return n?vF(e):t?cF(e):i?mF(e):yf(e)}function wF(e){var r,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return Et(ue((r={},r[a]=i,r[o]=n,r)))(e)}function bF(e){var r=e.chart;return r.axis(!1),e}function SF(e){var r=e.chart,t=e.options,i=t.legend;return i===!1?r.legend(!1):r.legend(i),e}function mf(e){return Et(xF,_F,wF,bF,me,ie,SF,qt,Ht,le())(e)}var CF=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 rF},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return mf},r.prototype.setState=function(t,i,n){n===void 0&&(n=!0);var a=an(this.chart);(0,c.each)(a,function(o){i(o.getData())&&o.setState(t,n)})},r.prototype.getStates=function(){var t=an(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=Os,r}(Pt),AF="liquid";function xf(e){return[{percent:e,type:AF}]}function FF(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(xf(i));var h=t.color||r.getTheme().defaultColor,f=I({},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 _f(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=I({},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 EF(e){return Et(Ht,Ne("liquidStyle"),FF,_f,ue({}),qt,ie)(e)}var MF={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"},wf=5e3;function bf(e,r,t){return e+(r-e)*t}function TF(e){var r=(0,d.__assign)({opacity:1},e.style);return e.color&&!r.fill&&(r.fill=e.color),r}function LF(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 OF(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 IF(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=OF(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 PF(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:IF(s,v.minY+p*t,l,0,g/32,e,r),fill:h,opacity:bf(.2,.9,m)*f}});try{if(u===!1)return;var _=gs([["t",l,0]]);x.stopAnimate(),x.animate({matrix:_},{duration:bf(.5*wf,wf,m),repeat:!0})}catch(w){console.warn("off-screen group animate error!")}}}function DF(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 kF(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 BF(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 RF(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 NF(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 Sf={pin:DF,circle:kF,diamond:BF,triangle:RF,rect:NF};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(rt,_t){return Math.min(rt,_t.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=TF(e),C=LF((0,c.mix)({},e,h)),F=b-v/2,T=typeof s=="function"?s:Sf[s]||Sf.circle,D=T(x.x,x.y,F*2,F*2),O=r.addGroup({name:"waves"}),W=O.setClip({type:"path",attrs:{path:D}});return PF(x.x,x.y,1-e.points[1].y,p,S,O,W,b*2,y,u),r.addShape("path",{name:"distance",attrs:{path:D,fill:"transparent",lineWidth:v+g*2,stroke:l==="transparent"?"#fff":l}}),r.addShape("path",{name:"wrap",attrs:(0,c.mix)(C,{path:D,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 MF},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.changeData=function(t){this.chart.emit(L.BEFORE_CHANGE_DATA,se.fromData(this.chart,L.BEFORE_CHANGE_DATA,null)),this.updateOption({percent:t}),this.chart.data(xf(t)),_f({chart:this.chart,options:this.options},!0),this.chart.emit(L.AFTER_CHANGE_DATA,se.fromData(this.chart,L.AFTER_CHANGE_DATA,null))},r.prototype.getSchemaAdaptor=function(){return EF},r}(Pt);function Cf(e,r,t){return e.length>1?r+"_"+t:""+r}function Af(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:Cf(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:Cf(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 zF(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=Af(t),g=v.min,p=v.max,y=v.ds;r.data(y);var m=I({},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=I({},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 _=I({},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 Ff(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 Et(ue((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 VF(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 GF(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 WF(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"}]},_e(i.range))):l.label(!1),(0,c.get)(i,"measure")?u.label(""+n,(0,d.__assign)({layout:[{type:"limit-in-plot"}]},_e(i.measure))):u.label(!1),(0,c.get)(i,"target")?h.label(""+a,(0,d.__assign)({layout:[{type:"limit-in-plot"}]},_e(i.target))):h.label(!1),e}function HF(e){Et(zF,Ff,VF,GF,Ht,WF,me,ie,qt)(e)}var YF=I({},Pt.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}}),PL=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 YF},r.prototype.changeData=function(t){this.updateOption({data:t});var i=Af(this.options),n=i.min,a=i.max,o=i.ds;Ff({options:this.options,ext:{data:{min:n,max:a}},chart:this.chart}),this.chart.changeData(o)},r.prototype.getSchemaAdaptor=function(){return HF},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r}(Pt),Ef="nodeIndex",Mf="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[Mf]=((o=n.children)===null||o===void 0?void 0:o.length)||0,n[Ef]=i,r.push(n)})}else e&&e.eachNode&&e.eachNode(function(n){r.push(n)});return r}var Rs="ancestor-node",Tf="value",yn="path",XF=[yn,Ef,Ps,Mf,"name","depth","height"],jF=I({},Pt.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}}),Lf=4,UF=0,Of=5,If="drilldown-bread-crumb",ZF={position:"top-left",dividerText:"/",textStyle:{fontSize:12,fill:"rgba(0, 0, 0, 0.65)",cursor:"pointer"},activeTextStyle:{fill:"#87B5FF"}},mn="hierarchy-data-transform-params",KF=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=ZF,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+Of*2)};t.isPolar&&(o={x:0,y:0}),a==="bottom-left"&&(o={x:t.start.x,y:t.start.y});var s=Ie.transform(null,[["t",o.x+UF,o.y+n.height+Of]]);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[mn]));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[mn]))}),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 I(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+Lf,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+Lf}})},r.prototype.hideCrumbGroup=function(){this.breadCrumbGroup&&this.breadCrumbGroup.hide()},r.prototype.destroy=function(){this.breadCrumbGroup&&this.breadCrumbGroup.remove(),e.prototype.destroy.call(this)},r}(ae);function Pf(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 xn(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 Df(){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(Pf),o}function a(o,s){return function(l){l.children&&xn(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 qF=A(32059);function $F(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($F)}var JF=A(64254);function kf(e,r){var t=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=(0,JF.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=t.call(e)},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 tE(e,r){var t=-1,i=kf(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 eE(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 rE(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 iE(e,r){var t=-1,i=kf(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 nE(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 aE(e){return this.eachBefore(function(r){r.children&&r.children.sort(e)})}function oE(e){for(var r=this,t=sE(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 sE(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 lE(){for(var e=this,r=[e];e=e.parent;)r.push(e);return r}function uE(){return Array.from(this)}function cE(){var e=[];return this.eachBefore(function(r){r.children||e.push(r)}),e}function hE(){var e=this,r=[];return e.each(function(t){t!==e&&r.push({source:t.parent,target:t})}),r}var Bf=A(39428),fE=(0,Bf.Z)().mark(Rf);function Rf(){var e,r,t,i,n,a;return(0,Bf.Z)().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()}},fE,this)}function bi(e,r){e instanceof Map?(e=[void 0,e],r===void 0&&(r=gE)):r===void 0&&(r=dE);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(Nf)}function vE(){return bi(this).eachBefore(pE)}function dE(e){return e.children}function gE(e){return Array.isArray(e)?e[1]:null}function pE(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Nf(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,qF.Z)({constructor:Si,count:QF,each:tE,eachAfter:rE,eachBefore:eE,find:iE,sum:nE,sort:aE,path:oE,ancestors:lE,descendants:uE,leaves:cE,links:hE,copy:vE},Symbol.iterator,Rf);var yE={field:"value",size:[1,1],round:!1,padding:0,sort:function(e,r){return r.value-e.value},as:["x","y"],ignoreParentValue:!0};function mE(e,r){r=(0,c.assign)({},yE,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 Df().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 xE(e,r){return e.parent===r.parent?1:2}function _E(e){return e.reduce(wE,0)/e.length}function wE(e,r){return e+r.x}function bE(e){return 1+e.reduce(SE,0)}function SE(e,r){return Math.max(e,r.y)}function CE(e){for(var r;r=e.children;)e=r[0];return e}function AE(e){for(var r;r=e.children;)e=r[r.length-1];return e}function FE(){var e=xE,r=1,t=1,i=!1;function n(a){var o,s=0;a.eachAfter(function(v){var g=v.children;g?(v.x=_E(g),v.y=bE(g)):(v.x=o?s+=e(v,o):0,v.y=0,o=v)});var l=CE(a),u=AE(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 EE(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ME(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 zf(e){for(var r=0,t=(e=ME(Array.from(e))).length,i=[],n,a;r<t;)n=e[r],a&&Vf(a,n)?++r:(a=LE(i=TE(i,n)),r=0);return a}function TE(e,r){var t,i;if(Ns(r,e))return[r];for(t=0;t<e.length;++t)if(La(r,e[t])&&Ns(_n(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(_n(e[t],e[i]),r)&&La(_n(e[t],r),e[i])&&La(_n(e[i],r),e[t])&&Ns(Gf(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 Vf(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(!Vf(e,r[t]))return!1;return!0}function LE(e){switch(e.length){case 1:return OE(e[0]);case 2:return _n(e[0],e[1]);case 3:return Gf(e[0],e[1],e[2])}}function OE(e){return{x:e.x,y:e.y,r:e.r}}function _n(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 Gf(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,F=(y*m-p*x)/S,T=(g*w-v*b)/(S*2)-n,D=(v*x-g*m)/S,O=F*F+D*D-1,W=2*(a+C*F+T*D),rt=C*C+T*T-a*a,_t=-(O?(W+Math.sqrt(W*W-4*O*rt))/(2*O):rt/W);return{x:i+C+F*_t,y:n+T+D*_t,r:_t}}function Wf(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 Hf(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 Yf(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 Oa(e){this._=e,this.next=null,this.previous=null}function Xf(e){if(!(n=(e=EE(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;Wf(t,r,i=e[2]),r=new Oa(r),t=new Oa(t),i=new Oa(i),r.next=i.previous=t,t.next=r.previous=i,i.next=t.previous=r;t:for(s=3;s<n;++s){Wf(r._,t._,i=e[s]),i=new Oa(i),l=t.next,u=r.previous,h=t._.r,f=r._.r;do if(h<=f){if(Hf(l._,i._)){t=l,r.next=t,t.previous=r,--s;continue t}h+=l._.r,l=l.next}else{if(Hf(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=Yf(r);(i=i.next)!==t;)(o=Yf(i))<a&&(r=i,a=o);t=r.next}for(r=[t._],i=t;(i=i.next)!==t;)r.push(i._);for(i=zf(r),s=0;s<n;++s)r=e[s],r.x-=i.x,r.y-=i.y;return i.r}function IE(e){return Xf(e),e}function PE(e){return e==null?null:Ia(e)}function Ia(e){if(typeof e!="function")throw new Error;return e}function Qr(){return 0}function Ci(e){return function(){return e}}function DE(e){return Math.sqrt(e.value)}function jf(){var e=null,r=1,t=1,i=Qr;function n(a){return a.x=r/2,a.y=t/2,e?a.eachBefore(Uf(e)).eachAfter(zs(i,.5)).eachBefore(Zf(1)):a.eachBefore(Uf(DE)).eachAfter(zs(Qr,1)).eachAfter(zs(i,a.r/Math.min(r,t))).eachBefore(Zf(Math.min(r,t)/(2*a.r))),a}return n.radius=function(a){return arguments.length?(e=PE(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 Uf(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=Xf(i),o)for(n=0;n<a;++n)i[n].r-=o;t.r=s+o}}}function Zf(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 kE={depth:-1},Kf={};function BE(e){return e.id}function RE(e){return e.parentId}function NE(){var e=BE,r=RE;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)?Kf: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===Kf)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=kE,l.eachBefore(function(p){p.depth=p.parent.depth+1,--a}).eachBefore(Nf),l.parent=null,a>0)throw new Error("cycle");return l}return t.id=function(i){return arguments.length?(e=Ia(i),t):e},t.parentId=function(i){return arguments.length?(r=Ia(i),t):r},t}function zE(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 VE(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 GE(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 WE(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 HE(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 YE(){var e=zE,r=1,t=1,i=null;function n(u){var h=HE(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){GE(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&&(VE(WE(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 qf=(1+Math.sqrt(5))/2;function $f(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?xn(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 Qf=function e(r){function t(i,n,a,o,s){$f(r,i,n,a,o,s)}return t.ratio=function(i){return e((i=+i)>1?i:1)},t}(qf);function Jf(){var e=Qf,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(Pf),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=Ia(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 XE(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 F=S+C>>>1;u[F]<b?S=F+1:C=F}b-u[S-1]<u[S]-b&&f+1<S&&--S;var T=u[S]-w,D=g-T;if(m-p>x-y){var O=g?(p*D+m*T)/g:m;h(f,S,T,p,y,O,x),h(S,v,D,O,y,m,x)}else{var W=g?(y*D+x*T)/g:x;h(f,S,T,p,y,m,W),h(S,v,D,p,W,m,x)}}}function jE(e,r,t,i,n){(e.depth&1?Da:xn)(e,r,t,i,n)}var UE=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?xn(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=$f(r,i,n,a,o,s),l.ratio=r}return t.ratio=function(i){return e((i=+i)>1?i:1)},t}(qf),ZE={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 KE(e,r){return e==="treemapSquarify"?$[e].ratio(r):$[e]}function tv(e,r){r=(0,c.assign)({},ZE,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=KE(r.tile,r.ratio),a=function(u){return Jf().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 ev(e){var r=e.data,t=e.colorField,i=e.rawFields,n=e.hierarchyConfig,a=n===void 0?{}:n,o=a.activeDepth,s={partition:mE,treemap:tv},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)({},Kt(v.data,(0,d.__spreadArrays)(i||[],[a.field]))),(g={},g[yn]=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[mn]={hierarchyConfig:a,colorField:t,rawFields:i},f.push(S)}),f}function qE(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=ev(t);r.data(u);var h;return o&&(h=function(f){return I({},{fillOpacity:Math.pow(.85,f.depth)},(0,c.isFunction)(o)?o(f):o)}),pa(I({},e,{options:{xField:"x",yField:"y",seriesField:a,rawFields:(0,c.uniq)((0,d.__spreadArrays)(XF,l)),polygon:{color:i,style:h}}})),e}function $E(e){var r=e.chart;return r.axis(!1),e}function QE(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:_e(l)})}return e}function JE(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 tM(e){var r,t=e.options,i=t.hierarchyConfig,n=t.meta;return Et(ue({},(r={},r[Tf]=(0,c.get)(n,(0,c.get)(i,["field"],"value")),r)))(e)}function eM(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=I({},{customItems:function(a){return a.map(function(o){var s=(0,c.get)(r.getOptions(),"scales"),l=(0,c.get)(s,[yn,"formatter"],function(h){return h}),u=(0,c.get)(s,[Tf,"formatter"],function(h){return h});return(0,d.__assign)((0,d.__assign)({},o),{name:l(o.data[yn]),value:u(o.data.value)})})}},n)),r.tooltip(n)}return e}function rM(e){var r=e.drilldown,t=e.interactions,i=t===void 0?[]:t;return(r==null?void 0:r.enabled)?I({},e,{interactions:(0,d.__spreadArrays)(i,[{type:"drill-down",cfg:{drillDownConfig:r,transformData:ev}}])}):e}function iM(e){var r=e.chart,t=e.options,i=t.drilldown;return ie({chart:r,options:rM(t)}),(i==null?void 0:i.enabled)&&(r.appendPadding=ca(r.appendPadding,(0,c.get)(i,["breadCrumb","position"]))),e}function nM(e){return Et(Ht,Ne("sunburstStyle"),qE,$E,tM,Yr,JE,eM,QE,iM,qt,le())(e)}function rv(e){var r=(0,c.get)(e,["event","data","data"],{});return(0,c.isArray)(r.children)&&r.children.length>0}function iv(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}bt("drill-down-action",KF),It("drill-down",{showEnable:[{trigger:"element:mouseenter",action:"cursor:pointer",isEnable:rv},{trigger:"element:mouseleave",action:"cursor:default"},{trigger:"element:mouseleave",action:"cursor:pointer",isEnable:iv}],start:[{trigger:"element:click",isEnable:rv,action:["drill-down-action:click"]},{trigger:"afterchangesize",action:["drill-down-action:resetPosition"]},{trigger:"click",isEnable:iv,action:["drill-down-action:back"]}]});var DL=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 jF},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return nM},r.SUNBURST_ANCESTOR_FIELD=Rs,r.SUNBURST_PATH_FIELD=yn,r.NODE_ANCESTORS_FIELD=Ps,r}(Pt),ka,Ba="range",nv="type",dr="percent",aM="#f0f0f0",av="indicator-view",ov="range-view",oM={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 sM(e,r){return e.map(function(t,i){var n;return n={},n[Ba]=t-(e[i-1]||0),n[nv]=""+i,n[dr]=r,n}).filter(function(t){return!!t[Ba]})}function sv(e){var r;return[(r={},r[dr]=(0,c.clamp)(e,0,1),r)]}function lv(e,r){var t=(0,c.get)(r,["ticks"],[]),i=(0,c.size)(t)?t:[0,(0,c.clamp)(e,0,1),1];return sM(i,e)}function lM(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=sv(i),x=r.createView({id:av});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,Kt(u,De))}var _=lv(i,t.range),w=r.createView({id:ov});w.data(_);var b=(0,c.isString)(p)?[p,aM]:p,S=Ce({chart:w,options:{xField:"1",yField:Ba,seriesField:nv,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 uM(e){var r;return Et(ue((r={range:{min:0,max:1,maxLimit:1,minLimit:0}},r[dr]={},r)))(e)}function uv(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=I({},{content:(a*100).toFixed(2)+"%",style:{opacity:.75,fontSize:"30px",lineHeight:1,textAlign:"center",color:"rgba(44,53,66,0.85)"}},o)),xw(t,{statistic:(0,d.__assign)((0,d.__assign)({},n),{content:s})},{percent:a})}return r&&t.render(!0),e}function cM(e){var r=e.chart,t=e.options,i=t.tooltip;return i?r.tooltip(I({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 hM(e){var r=e.chart;return r.legend(!1),e}function cv(e){return Et(Ht,qt,lM,uM,cM,uv,ie,le(),hM)(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=Ie.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 F=Ie.getSectorPath(y.x,y.y,m,b,Math.min(S,w),m*this.coordinate.innerRadius);p.addShape("path",{name:"meter-gauge",attrs:{path:F,fill:e.color,stroke:e.color,lineWidth:.5}}),b=S+f}return p}});var fM=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 oM},r.prototype.changeData=function(t){this.chart.emit(L.BEFORE_CHANGE_DATA,se.fromData(this.chart,L.BEFORE_CHANGE_DATA,null)),this.updateOption({percent:t});var i=this.chart.views.find(function(a){return a.id===av});i&&i.data(sv(t));var n=this.chart.views.find(function(a){return a.id===ov});n&&n.data(lv(t,this.options.range)),uv({chart:this.chart,options:this.options},!0),this.chart.emit(L.AFTER_CHANGE_DATA,se.fromData(this.chart,L.AFTER_CHANGE_DATA,null))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return cv},r}(Pt),je="$$yField$$",Ra="$$diffField$$",Ws="$$absoluteField$$",Hs="$$isTotal$$",vM={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 dM(e,r,t,i,n){var a,o=[];if((0,c.reduce)(e,function(l,u){var h;cr(qe.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 hv(e,r,t,i){var n=dM(e,r,t,je,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[je][1],s[Ra]=a[je][1]-a[je][0],s[Hs]=o===e.length,s)):a})}function gM(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 pM(e){return I({},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(gM(i)),s=pM(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 yM(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 mM(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(hv(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,[je,1])-(0,c.get)(x,[je,0])>0?h:f},p=I({},e,{options:{xField:n,yField:je,seriesField:n,rawFields:[a,Ra,Hs,je],widthRatio:l,interval:{style:u,shape:"waterfall",color:g}}}),y=Ce(p).ext,m=y.geometry;return m.customInfo({leaderLine:s}),e}function xM(e){var r,t,i=e.options,n=i.xAxis,a=i.yAxis,o=i.xField,s=i.yField,l=i.meta,u=I({},{alias:s},(0,c.get)(l,s));return Et(ue((r={},r[o]=n,r[s]=a,r[je]=a,r),I({},l,(t={},t[je]=u,t[Ra]=u,t[Ws]=u,t))))(e)}function _M(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(je,!1)):(r.axis(o,n),r.axis(je,n)),e}function wM(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:I({},{r:5},(0,c.get)(n,"style"))}}),r.legend(I({},{custom:!0,position:"top",items:u},i)),r.removeInteraction("legend-filter")}return e}function bM(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:_e(l)})}return e}function SM(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 CM(e){return Et(yM,Ht,mM,xM,_M,wM,SM,bM,Tr,ie,qt,le())(e)}var kL=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 vM},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(hv(t,n,a,o))},r.prototype.getSchemaAdaptor=function(){return CM},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r}(Pt);function AM(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 FM(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 EM(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=I({},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 fv(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?FM(a,n,i):a,f=gi(h,i);return Et(ue((r={},r[i]={min:0,max:AM(u,i,f)},r)))(e)}function MM(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 TM(e){var r=e.chart,t=e.options,i=t.xField,n=t.xAxis;return r.axis(i,n),e}function LM(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)({},_e(s)),{type:"polar"})})}return e}function OM(e){return Et(Ne("barStyle"),EM,fv,TM,MM,ie,qt,Ht,me,Yr,le(),LM)(e)}var IM=I({},Pt.getDefaultOptions(),{interactions:[{type:"element-active"}],legend:!1,tooltip:{showMarkers:!1},xAxis:{grid:null,tickLine:null,line:null},maxAngle:240}),BL=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}),fv({chart:this.chart,options:this.options}),this.chart.changeData(t)},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return OM},r}(Pt),ir="first-axes-view",nr="second-axes-view",Jr="series-field-key";function vv(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 PM(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 DM(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=vv(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:ir}),v.coordinate().transpose().reflect("x"),g=r.createView({region:{start:{x:.5,y:0},end:{x:1,y:1}},id:nr}),g.coordinate().transpose(),v.data(p),g.data(y)):(v=r.createView({region:{start:{x:0,y:0},end:{x:1,y:.5}},id:ir}),g=r.createView({region:{start:{x:0,y:.5},end:{x:1,y:1}},id:nr}),g.coordinate().reflect("y"),v.data(p),g.data(y));var m=I({},e,{chart:v,options:{widthRatio:l,xField:n,yField:a[0],seriesField:Jr,interval:{color:o,style:s}}});Ce(m);var x=I({},e,{chart:g,options:{xField:n,yField:a[1],seriesField:Jr,widthRatio:l,interval:{color:o,style:s}}});return Ce(x),e}function kM(e){var r,t,i,n=e.options,a=e.chart,o=n.xAxis,s=n.yAxis,l=n.xField,u=n.yField,h=Bt(a,ir),f=Bt(a,nr),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)),ue((t={},t[l]=o,t[u[0]]=s[u[0]],t))(I({},e,{chart:h})),ue((i={},i[l]=o,i[u[1]]=s[u[1]],i))(I({},e,{chart:f})),e}function BM(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField,s=t.layout,l=Bt(r,ir),u=Bt(r,nr);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 RM(e){var r=e.chart;return ie(I({},e,{chart:Bt(r,ir)})),ie(I({},e,{chart:Bt(r,nr)})),e}function NM(e){var r=e.chart,t=e.options,i=t.yField,n=t.yAxis;return Xr(I({},e,{chart:Bt(r,ir),options:{yAxis:n[i[0]]}})),Xr(I({},e,{chart:Bt(r,nr),options:{yAxis:n[i[1]]}})),e}function zM(e){var r=e.chart;return Ht(I({},e,{chart:Bt(r,ir)})),Ht(I({},e,{chart:Bt(r,nr)})),Ht(e),e}function VM(e){var r=e.chart;return qt(I({},e,{chart:Bt(r,ir)})),qt(I({},e,{chart:Bt(r,nr)})),e}function GM(e){var r=this,t,i,n=e.chart,a=e.options,o=a.label,s=a.yField,l=a.layout,u=Bt(n,ir),h=Bt(n,nr),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=I({},p.style,{textAlign:m});var x={left:"right",right:"left",center:"center"};y.style=I({},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=I({},y.style,{textBaseline:w});var b={top:"bottom",bottom:"top",middle:"middle"};p.style=I({},p.style,{textBaseline:b[w]})}f.label({fields:[s[0]],callback:g,cfg:_e(y)}),v.label({fields:[s[1]],callback:g,cfg:_e(p)})}return e}function WM(e){return Et(DM,kM,BM,NM,zM,GM,me,RM,VM)(e)}var RL=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 I({},e.getDefaultOptions.call(this),{syncViewPadding:PM})},r.prototype.changeData=function(t){t===void 0&&(t=[]),this.chart.emit(L.BEFORE_CHANGE_DATA,se.fromData(this.chart,L.BEFORE_CHANGE_DATA,null)),this.updateOption({data:t});var i=this.options,n=i.xField,a=i.yField,o=i.layout,s=vv(n,a,Jr,t,gr(o)),l=s[0],u=s[1],h=Bt(this.chart,ir),f=Bt(this.chart,nr);h.data(l),f.data(u),this.chart.render(!0),this.chart.emit(L.AFTER_CHANGE_DATA,se.fromData(this.chart,L.AFTER_CHANGE_DATA,null))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return WM},r.SERIES_FIELD_KEY=Jr,r}(Pt);function dv(e,r){if(!!(0,c.isArray)(e))return e.find(function(t){return t.type===r})}function gv(e,r){var t=dv(e,r);return t&&t.enable!==!1}function Ys(e){var r=e.interactions,t=e.drilldown;return(0,c.get)(t,"enabled")||gv(r,"treemap-drill-down")}function HM(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=tv(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[mn]={hierarchyConfig:n,colorField:t,enableDrillDown:i},o.push(h)}),o}function YM(e){var r=e.options,t=r.colorField;return I({options:{rawFields:["value"],tooltip:{fields:["name","value",t,"path"],formatter:function(i){return{name:i.name,value:i.value}}}}},e)}function XM(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(I({},e,{options:{xField:"x",yField:"y",seriesField:n,rawFields:s,polygon:{color:i,style:a}}})),r.coordinate().reflect("y"),e}function jM(e){var r=e.chart;return r.axis(!1),e}function UM(e){var r=e.drilldown,t=e.interactions,i=t===void 0?[]:t,n=Ys(e);return n?I({},e,{interactions:(0,d.__spreadArrays)(i,[{type:"drill-down",cfg:{drillDownConfig:r,transformData:Xs}}])}):e}function ZM(e){var r=e.chart,t=e.options,i=t.interactions,n=t.drilldown;ie({chart:r,options:UM(t)});var a=dv(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 KM(e){return Et(YM,Ht,Ne("rectStyle"),XM,jM,Yr,me,ZM,qt,le())(e)}var qM={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"}}}},NL=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 qM},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:gv(a,"treemap-drill-down"),hierarchyConfig:o});this.chart.changeData(s),HM(this.chart)},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return KM},r}(Pt);function $M(e){return e.target.depth}function QM(e){return e.depth}function JM(e,r){return r-1-e.height}function js(e,r){return e.sourceLinks.length?e.depth:r-1}function t1(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?(0,c.minBy)(e.sourceLinks,$M)-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 e1(e,r){for(var t=Infinity,i=0;i<e.length;i++)t=Math.min(r(e[i]),t);return t}function pv(e,r){return za(e.source,r.source)||e.index-r.index}function yv(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 r1(e){return e.index}function i1(e){return e.nodes}function n1(e){return e.links}function mv(e,r){var t=e.get(r);if(!t)throw new Error("missing: "+r);return t}function xv(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 a1(){var e=0,r=0,t=1,i=1,n=24,a=8,o,s=r1,l=js,u,h,f,v=i1,g=n1,p=6;function y(Y){var at={nodes:v(Y),links:g(Y)};return m(at),x(at),_(at),w(at),C(at),xv(at),at}y.update=function(Y){return xv(Y),Y},y.nodeId=function(Y){return arguments.length?(s=typeof Y=="function"?Y:Na(Y),y):s},y.nodeAlign=function(Y){return arguments.length?(l=typeof Y=="function"?Y:Na(Y),y):l},y.nodeDepth=function(Y){return arguments.length?(u=(typeof Y=="function",Y),y):u},y.nodeSort=function(Y){return arguments.length?(h=Y,y):h},y.nodeWidth=function(Y){return arguments.length?(n=+Y,y):n},y.nodePadding=function(Y){return arguments.length?(a=o=+Y,y):a},y.nodes=function(Y){return arguments.length?(v=typeof Y=="function"?Y:Na(Y),y):v},y.links=function(Y){return arguments.length?(g=typeof Y=="function"?Y:Na(Y),y):g},y.linkSort=function(Y){return arguments.length?(f=Y,y):f},y.size=function(Y){return arguments.length?(e=r=0,t=+Y[0],i=+Y[1],y):[t-e,i-r]},y.extent=function(Y){return arguments.length?(e=+Y[0][0],t=+Y[1][0],r=+Y[0][1],i=+Y[1][1],y):[[e,r],[t,i]]},y.iterations=function(Y){return arguments.length?(p=+Y,y):p};function m(Y){var at=Y.nodes,yt=Y.links;at.forEach(function(Wt,$t){Wt.index=$t,Wt.sourceLinks=[],Wt.targetLinks=[]});var ut=new Map(at.map(function(Wt){return[s(Wt),Wt]}));if(yt.forEach(function(Wt,$t){Wt.index=$t;var ve=Wt.source,de=Wt.target;typeof ve!="object"&&(ve=Wt.source=mv(ut,ve)),typeof de!="object"&&(de=Wt.target=mv(ut,de)),ve.sourceLinks.push(Wt),de.targetLinks.push(Wt)}),f!=null)for(var gt=0,At=at;gt<At.length;gt++){var zt=At[gt],Gt=zt.sourceLinks,Dt=zt.targetLinks;Gt.sort(f),Dt.sort(f)}}function x(Y){for(var at=Y.nodes,yt=0,ut=at;yt<ut.length;yt++){var gt=ut[yt];gt.value=gt.fixedValue===void 0?Math.max(Us(gt.sourceLinks,Ks),Us(gt.targetLinks,Ks)):gt.fixedValue}}function _(Y){for(var at=Y.nodes,yt=at.length,ut=new Set(at),gt=new Set,At=0;ut.size;){if(ut.forEach(function(Wt){Wt.depth=At;for(var $t=0,ve=Wt.sourceLinks;$t<ve.length;$t++){var de=ve[$t].target;gt.add(de)}}),++At>yt)throw new Error("circular link");ut=gt,gt=new Set}if(u)for(var zt=Math.max(Zs(at,function(Wt){return Wt.depth})+1,0),Gt=void 0,Dt=0;Dt<at.length;Dt++)Gt=at[Dt],Gt.depth=u.call(null,Gt,zt)}function w(Y){for(var at=Y.nodes,yt=at.length,ut=new Set(at),gt=new Set,At=0;ut.size;){if(ut.forEach(function(zt){zt.height=At;for(var Gt=0,Dt=zt.targetLinks;Gt<Dt.length;Gt++){var Wt=Dt[Gt].source;gt.add(Wt)}}),++At>yt)throw new Error("circular link");ut=gt,gt=new Set}}function b(Y){for(var at=Y.nodes,yt=Math.max(Zs(at,function(de){return de.depth})+1,0),ut=(t-e-n)/(yt-1),gt=new Array(yt).fill(0).map(function(){return[]}),At=0,zt=at;At<zt.length;At++){var Gt=zt[At],Dt=Math.max(0,Math.min(yt-1,Math.floor(l.call(null,Gt,yt))));Gt.layer=Dt,Gt.x0=e+Dt*ut,Gt.x1=Gt.x0+n,gt[Dt]?gt[Dt].push(Gt):gt[Dt]=[Gt]}if(h)for(var Wt=0,$t=gt;Wt<$t.length;Wt++){var ve=$t[Wt];ve.sort(h)}return gt}function S(Y){for(var at=e1(Y,function(ar){return(i-r-(ar.length-1)*o)/Us(ar,Ks)}),yt=0,ut=Y;yt<ut.length;yt++){for(var gt=ut[yt],At=r,zt=0,Gt=gt;zt<Gt.length;zt++){var Dt=Gt[zt];Dt.y0=At,Dt.y1=At+Dt.value*at,At=Dt.y1+o;for(var Wt=0,$t=Dt.sourceLinks;Wt<$t.length;Wt++){var ve=$t[Wt];ve.width=ve.value*at}}At=(i-At+o)/(gt.length+1);for(var de=0;de<gt.length;++de){var Dt=gt[de];Dt.y0+=At*(de+1),Dt.y1+=At*(de+1)}_t(gt)}}function C(Y){var at=b(Y);o=Math.min(a,(i-r)/(Zs(at,function(At){return At.length})-1)),S(at);for(var yt=0;yt<p;++yt){var ut=Math.pow(.99,yt),gt=Math.max(1-ut,(yt+1)/p);T(at,ut,gt),F(at,ut,gt)}}function F(Y,at,yt){for(var ut=1,gt=Y.length;ut<gt;++ut){for(var At=Y[ut],zt=0,Gt=At;zt<Gt.length;zt++){for(var Dt=Gt[zt],Wt=0,$t=0,ve=0,de=Dt.targetLinks;ve<de.length;ve++){var ar=de[ve],ti=ar.source,pr=ar.value,Fi=pr*(Dt.layer-ti.layer);Wt+=Ct(ti,Dt)*Fi,$t+=Fi}if($t>0){var Ei=(Wt/$t-Dt.y0)*at;Dt.y0+=Ei,Dt.y1+=Ei,rt(Dt)}}h===void 0&&At.sort(za),At.length&&D(At,yt)}}function T(Y,at,yt){for(var ut=Y.length,gt=ut-2;gt>=0;--gt){for(var At=Y[gt],zt=0,Gt=At;zt<Gt.length;zt++){for(var Dt=Gt[zt],Wt=0,$t=0,ve=0,de=Dt.sourceLinks;ve<de.length;ve++){var ar=de[ve],ti=ar.target,pr=ar.value,Fi=pr*(ti.layer-Dt.layer);Wt+=Vt(Dt,ti)*Fi,$t+=Fi}if($t>0){var Ei=(Wt/$t-Dt.y0)*at;Dt.y0+=Ei,Dt.y1+=Ei,rt(Dt)}}h===void 0&&At.sort(za),At.length&&D(At,yt)}}function D(Y,at){var yt=Y.length>>1,ut=Y[yt];W(Y,ut.y0-o,yt-1,at),O(Y,ut.y1+o,yt+1,at),W(Y,i,Y.length-1,at),O(Y,r,0,at)}function O(Y,at,yt,ut){for(;yt<Y.length;++yt){var gt=Y[yt],At=(at-gt.y0)*ut;At>1e-6&&(gt.y0+=At,gt.y1+=At),at=gt.y1+o}}function W(Y,at,yt,ut){for(;yt>=0;--yt){var gt=Y[yt],At=(gt.y1-at)*ut;At>1e-6&&(gt.y0-=At,gt.y1-=At),at=gt.y0-o}}function rt(Y){var at=Y.sourceLinks,yt=Y.targetLinks;if(f===void 0){for(var ut=0,gt=yt;ut<gt.length;ut++){var At=gt[ut].source.sourceLinks;At.sort(yv)}for(var zt=0,Gt=at;zt<Gt.length;zt++){var Dt=Gt[zt].target.targetLinks;Dt.sort(pv)}}}function _t(Y){if(f===void 0)for(var at=0,yt=Y;at<yt.length;at++){var ut=yt[at],gt=ut.sourceLinks,At=ut.targetLinks;gt.sort(yv),At.sort(pv)}}function Ct(Y,at){for(var yt=Y.y0-(Y.sourceLinks.length-1)*o/2,ut=0,gt=Y.sourceLinks;ut<gt.length;ut++){var At=gt[ut],zt=At.target,Gt=At.width;if(zt===at)break;yt+=Gt+o}for(var Dt=0,Wt=at.targetLinks;Dt<Wt.length;Dt++){var $t=Wt[Dt],zt=$t.source,Gt=$t.width;if(zt===Y)break;yt-=Gt}return yt}function Vt(Y,at){for(var yt=at.y0-(at.targetLinks.length-1)*o/2,ut=0,gt=at.targetLinks;ut<gt.length;ut++){var At=gt[ut],zt=At.source,Gt=At.width;if(zt===Y)break;yt+=Gt+o}for(var Dt=0,Wt=Y.sourceLinks;Dt<Wt.length;Dt++){var $t=Wt[Dt],zt=$t.target,Gt=$t.width;if(zt===at)break;yt-=Gt}return yt}return y}var o1={left:QM,right:JM,center:t1,justify:js},s1={nodeId:function(e){return e.index},nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodeSort:void 0};function l1(e){var r=(0,c.isString)(e)?o1[e]:(0,c.isFunction)(e)?e:null;return r||js}function u1(e){return(0,c.assign)({},s1,e)}function c1(e,r){var t=u1(e),i=t.nodeId,n=t.nodeSort,a=t.nodeAlign,o=t.nodeWidth,s=t.nodePadding,l=t.nodeDepth,u=a1().nodeSort(n).nodeWidth(o).nodePadding(s).nodeDepth(l).nodeAlign(l1(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 h1(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 f1(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 v1(e,r,t){if(!(0,c.isArray)(e))return[];var i=[],n=h1(e,r,t),a=f1(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 d1(e){return e==="node-link"}function g1(e,r,t){return Hr(e)?e/t:r}function p1(e,r,t){return Hr(e)?e/t:r}function _v(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;d1(i)?x=n:x=Kc(v1(n,a,o),a,o,s,m);var _=c1({nodeAlign:l,nodePadding:p1(h,f,t),nodeWidth:g1(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)({},Kt(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},Kt(S,(0,d.__spreadArrays)(["x","y","value"],m))),{isNode:!1})})}}var wv="x",bv="y",Sv="name",Va="nodes",Ga="edges";function y1(e){var r=e.options,t=r.rawFields,i=t===void 0?[]:t;return I({},{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 m1(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=_v(t,r.width,r.height),f=h.nodes,v=h.edges,g=r.createView({id:Ga});g.data(v),ih({chart:g,options:{xField:wv,yField:bv,seriesField:Sv,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:wv,yField:bv,seriesField:Sv,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 x1(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 _1(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 w1(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=Bt(r,Va),l=Bt(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 b1(e){return Et(y1,m1,w1,_1,x1,Ht)(e)}var S1=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 Bt(this.context.view,Va)},r.prototype.getEdgeView=function(){return Bt(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}(ae);bt("sankey-node-drag",S1),It("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 zL=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=_v(this.options,this.chart.width,this.chart.height),n=i.nodes,a=i.edges,o=Bt(this.chart,Va),s=Bt(this.chart,Ga);o.changeData(n),s.changeData(a)},r.prototype.getSchemaAdaptor=function(){return b1},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r}(Pt),C1={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 A1(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 F1(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 E1(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 M1(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 T1(e){return(0,c.assign)({},C1,e)}function L1(e,r){var t=T1(e),i={},n=r.nodes,a=r.links;n.forEach(function(l){var u=t.id(l);i[u]=l}),A1(i,a,t),F1(n,t);var o=E1(n,t),s=M1(i,a,t);return{nodes:o,links:s}}var Cv="x",Av="y",Fv="name",Ev="source",O1={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=Kc(t,i,n,a),f=L1({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)({},Kt(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},Kt(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 P1(e){var r,t=e.chart;return t.scale((r={x:{sync:!0,nice:!0},y:{sync:!0,nice:!0,max:1}},r[Fv]={sync:"color"},r[Ev]={sync:"color"},r)),e}function D1(e){var r=e.chart;return r.axis(!1),e}function k1(e){var r=e.chart;return r.legend(!1),e}function B1(e){var r=e.chart,t=e.options,i=t.tooltip;return r.tooltip(i),e}function R1(e){var r=e.chart;return r.coordinate("polar").reflect("y"),e}function N1(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:Cv,yField:Av,seriesField:Fv,polygon:{style:n},label:a,tooltip:o}}),e}function z1(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:Cv,yField:Av,seriesField:Ev,edge:{style:n,shape:"arc"},tooltip:a};return ih({chart:o,options:s}),e}function V1(e){var r=e.chart,t=e.options,i=t.animation;return typeof i=="boolean"?r.animate(i):r.animate(!0),(0,c.each)(cw(r),function(n){n.animate(i)}),e}function G1(e){return Et(Ht,I1,R1,P1,D1,k1,B1,z1,N1,ie,Tr,V1)(e)}var VL=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 O1},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return G1},r}(Pt),W1={field:"value",as:["x","y","r"],sort:function(e,r){return r.value-e.value}};function H1(e,r){r=(0,c.assign)({},W1,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 jf().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 Mv(e){var r=e.data,t=e.hierarchyConfig,i=e.rawFields,n=i===void 0?[]:i,a=e.enableDrillDown,o=H1(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=I({},l.data,(0,d.__assign)((0,d.__assign)((0,d.__assign)({},Kt(l.data,n)),{path:h}),l));v.ext=t,v[mn]={hierarchyConfig:t,rawFields:n,enableDrillDown:a},s.push(v)}),s}function Tv(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 Y1=["x","y","r","name","value","path","depth"],X1={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 j1(e){var r=e.chart,t=Math.min(r.viewBBox.width,r.viewBBox.height);return I({options:{size:function(i){var n=i.r;return n*t}}},e)}function U1(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=Tv(n,s,i).finalPadding;return t.padding=u,t.appendPadding=0,e}function Z1(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=Mv({data:t.data,hierarchyConfig:l,enableDrillDown:v==null?void 0:v.enabled,rawFields:f});r.data(g);var p=r.viewBBox,y=Tv(i,n,p).finalSize,m=function(x){var _=x.r;return _*y};return u&&(m=function(x){return x[u]*y}),ze(I({},e,{options:{xField:"x",yField:"y",seriesField:o,sizeField:u,rawFields:(0,d.__spreadArrays)(Y1,f),point:{color:a,style:s,shape:"circle",size:m}}})),e}function K1(e){return Et(ue({},{x:{min:0,max:1,minLimit:0,maxLimit:1,nice:!0},y:{min:0,max:1,minLimit:0,maxLimit:1,nice:!0}}))(e)}function q1(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=I({},{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 $1(e){var r=e.chart;return r.axis(!1),e}function Q1(e){var r=e.drilldown,t=e.interactions,i=t===void 0?[]:t;return(r==null?void 0:r.enabled)?I({},e,{interactions:(0,d.__spreadArrays)(i,[{type:"drill-down",cfg:{drillDownConfig:r,transformData:Mv,enableDrillDown:!0}}])}):e}function J1(e){var r=e.chart,t=e.options;return ie({chart:r,options:Q1(t)}),e}function tT(e){return Et(Ne("pointStyle"),j1,U1,Ht,K1,Z1,$1,Yr,q1,J1,qt,le())(e)}var GL=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 X1},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return tT},r.prototype.triggerResize=function(){this.chart.destroyed||(this.chart.forceFit(),this.chart.clear(),this.execAdaptor(),this.chart.render(!0))},r}(Pt),WL=function(e){(0,d.__extends)(r,e);function r(t,i,n,a){var o=e.call(this,t,I({},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}(Pt),eT={line:oh,pie:_h,column:xa,bar:gh,area:uh,gauge:cv,"tiny-line":Bh,"tiny-column":Rh,"tiny-area":kh,"ring-progress":Xh,progress:Hh,scatter:Eh,histogram:Vh,funnel:mf,stock:gf},rT={line:sh,pie:wh,column:dh,bar:yb,area:ch,gauge:fM,"tiny-line":nC,"tiny-column":lC,"tiny-area":cC,"ring-progress":SC,progress:_C,scatter:MS,histogram:yC,funnel:CF,stock:eF},iT={pie:{label:!1},column:{tooltip:{showMarkers:!1}},bar:{tooltip:{showMarkers:!1}}};function qs(e,r,t){var i=rT[e];if(!i){console.error("could not find "+e+" plot");return}var n=eT[e];n({chart:r,options:I({},i.getDefaultOptions(),(0,c.get)(iT,e,{}),t)})}function nT(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[_]=Kt(x,De)}),m=I({},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 _=ke({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 aT(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},Kt(h,Jc)));v&&g.interaction("tooltip"),qs(s,g,(0,d.__assign)({data:a},h))}),e}function oT(e){var r=e.chart,t=e.options;return r.option("slider",t.slider),e}function sT(e){return Et(qt,nT,aT,ie,qt,Ht,me,oT,le())(e)}function lT(e,r){var t=e.getModel(),i=t.data,n;return(0,c.isArray)(i)?n=i[0][r]:n=i[r],n}function uT(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 cT=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 lT(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=Wc(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=Wc(this.context.view);(0,c.each)(t,function(i){i.hideTooltip()})},r.prototype.active=function(t){var i=on(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=on(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=on(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=on(this.context.view);(0,c.each)(t,function(i){uT(i)})},r}(ae);bt("association",cT),It("association-active",{start:[{trigger:"element:mouseenter",action:"association:active"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),It("association-selected",{start:[{trigger:"element:mouseenter",action:"association:selected"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),It("association-highlight",{start:[{trigger:"element:mouseenter",action:"association:highlight"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),It("association-tooltip",{start:[{trigger:"element:mousemove",action:"association:showTooltip"}],end:[{trigger:"element:mouseleave",action:"association:hideTooltip"}]});var hT=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 sT},r}(Pt);function fT(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]=Kt(v,De)}),f=I({},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=ke({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 vT(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)fT(l,h);else{var f=h,v=f.options;v.tooltip&&l.interaction("tooltip"),qs(f.type,l,v)}}})),e}function dT(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]=Kt(v,De)}),f=I({},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 gT(e){return Et(Ht,vT,dT)(e)}var pT={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)"}}},HL=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 pT},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return gT},r}(Pt),Ai;(function(e){e.DEV="DEV",e.BETA="BETA",e.STABLE="STABLE"})(Ai||(Ai={}));function yT(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 YL=function(){function e(){}return Object.defineProperty(e,"MultiView",{get:function(){return yT(Ai.STABLE,"MultiView"),hT},enumerable:!1,configurable:!0}),e}(),XL="2.4.20";$c("en-US",bw),$c("zh-CN",Sw);var jL={scale:ue,legend:Yr,tooltip:me,annotation:le,interaction:ie,theme:Ht,animation:qt}},80638:function(){},15746:function(kt,lt,A){"use strict";var k=A(21584);lt.Z=k.Z},89032:function(kt,lt,A){"use strict";var k=A(38663),it=A.n(k),wt=A(6999)},99134:function(kt,lt,A){"use strict";var k=A(67294),it=(0,k.createContext)({});lt.Z=it},21584:function(kt,lt,A){"use strict";var k=A(96156),it=A(22122),wt=A(90484),mt=A(94184),ft=A.n(mt),ct=A(67294),J=A(53124),$=A(99134),d=function(R,Z){var L={};for(var X in R)Object.prototype.hasOwnProperty.call(R,X)&&Z.indexOf(X)<0&&(L[X]=R[X]);if(R!=null&&typeof Object.getOwnPropertySymbols=="function")for(var U=0,X=Object.getOwnPropertySymbols(R);U<X.length;U++)Z.indexOf(X[U])<0&&Object.prototype.propertyIsEnumerable.call(R,X[U])&&(L[X[U]]=R[X[U]]);return L};function c(R){return typeof R=="number"?"".concat(R," ").concat(R," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(R)?"0 0 ".concat(R):R}var Q=["xs","sm","md","lg","xl","xxl"],E=ct.forwardRef(function(R,Z){var L,X=ct.useContext(J.E_),U=X.getPrefixCls,Ft=X.direction,xt=ct.useContext($.Z),tt=xt.gutter,Tt=xt.wrap,Yt=xt.supportFlexGap,te=R.prefixCls,Ut=R.span,oe=R.order,Xt=R.offset,M=R.push,B=R.pull,K=R.className,H=R.children,N=R.flex,P=R.style,j=d(R,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),q=U("col",te),G={};Q.forEach(function(et){var vt,ht={},Ot=R[et];typeof Ot=="number"?ht.span=Ot:(0,wt.Z)(Ot)==="object"&&(ht=Ot||{}),delete j[et],G=(0,it.Z)((0,it.Z)({},G),(vt={},(0,k.Z)(vt,"".concat(q,"-").concat(et,"-").concat(ht.span),ht.span!==void 0),(0,k.Z)(vt,"".concat(q,"-").concat(et,"-order-").concat(ht.order),ht.order||ht.order===0),(0,k.Z)(vt,"".concat(q,"-").concat(et,"-offset-").concat(ht.offset),ht.offset||ht.offset===0),(0,k.Z)(vt,"".concat(q,"-").concat(et,"-push-").concat(ht.push),ht.push||ht.push===0),(0,k.Z)(vt,"".concat(q,"-").concat(et,"-pull-").concat(ht.pull),ht.pull||ht.pull===0),(0,k.Z)(vt,"".concat(q,"-rtl"),Ft==="rtl"),vt))});var z=ft()(q,(L={},(0,k.Z)(L,"".concat(q,"-").concat(Ut),Ut!==void 0),(0,k.Z)(L,"".concat(q,"-order-").concat(oe),oe),(0,k.Z)(L,"".concat(q,"-offset-").concat(Xt),Xt),(0,k.Z)(L,"".concat(q,"-push-").concat(M),M),(0,k.Z)(L,"".concat(q,"-pull-").concat(B),B),L),K,G),V={};if(tt&&tt[0]>0){var st=tt[0]/2;V.paddingLeft=st,V.paddingRight=st}if(tt&&tt[1]>0&&!Yt){var nt=tt[1]/2;V.paddingTop=nt,V.paddingBottom=nt}return N&&(V.flex=c(N),Tt===!1&&!V.minWidth&&(V.minWidth=0)),ct.createElement("div",(0,it.Z)({},j,{style:(0,it.Z)((0,it.Z)({},V),P),className:z,ref:Z}),H)});lt.Z=E},92820:function(kt,lt,A){"use strict";var k=A(22122),it=A(96156),wt=A(90484),mt=A(28481),ft=A(94184),ct=A.n(ft),J=A(67294),$=A(53124),d=A(98082),c=A(24308),Q=A(93355),E=A(99134),R=function(U,Ft){var xt={};for(var tt in U)Object.prototype.hasOwnProperty.call(U,tt)&&Ft.indexOf(tt)<0&&(xt[tt]=U[tt]);if(U!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Tt=0,tt=Object.getOwnPropertySymbols(U);Tt<tt.length;Tt++)Ft.indexOf(tt[Tt])<0&&Object.prototype.propertyIsEnumerable.call(U,tt[Tt])&&(xt[tt[Tt]]=U[tt[Tt]]);return xt},Z=(0,Q.b)("top","middle","bottom","stretch"),L=(0,Q.b)("start","end","center","space-around","space-between","space-evenly"),X=J.forwardRef(function(U,Ft){var xt,tt=U.prefixCls,Tt=U.justify,Yt=U.align,te=U.className,Ut=U.style,oe=U.children,Xt=U.gutter,M=Xt===void 0?0:Xt,B=U.wrap,K=R(U,["prefixCls","justify","align","className","style","children","gutter","wrap"]),H=J.useContext($.E_),N=H.getPrefixCls,P=H.direction,j=J.useState({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0}),q=(0,mt.Z)(j,2),G=q[0],z=q[1],V=(0,d.Z)(),st=J.useRef(M);J.useEffect(function(){var re=c.ZP.subscribe(function(Qt){var xe=st.current||0;(!Array.isArray(xe)&&(0,wt.Z)(xe)==="object"||Array.isArray(xe)&&((0,wt.Z)(xe[0])==="object"||(0,wt.Z)(xe[1])==="object"))&&z(Qt)});return function(){return c.ZP.unsubscribe(re)}},[]);var nt=function(){var Qt=[void 0,void 0],xe=Array.isArray(M)?M:[M,void 0];return xe.forEach(function(ge,Ee){if((0,wt.Z)(ge)==="object")for(var pe=0;pe<c.c4.length;pe++){var he=c.c4[pe];if(G[he]&&ge[he]!==void 0){Qt[Ee]=ge[he];break}}else Qt[Ee]=ge}),Qt},et=N("row",tt),vt=nt(),ht=ct()(et,(xt={},(0,it.Z)(xt,"".concat(et,"-no-wrap"),B===!1),(0,it.Z)(xt,"".concat(et,"-").concat(Tt),Tt),(0,it.Z)(xt,"".concat(et,"-").concat(Yt),Yt),(0,it.Z)(xt,"".concat(et,"-rtl"),P==="rtl"),xt),te),Ot={},ot=vt[0]!=null&&vt[0]>0?vt[0]/-2:void 0,pt=vt[1]!=null&&vt[1]>0?vt[1]/-2:void 0;if(ot&&(Ot.marginLeft=ot,Ot.marginRight=ot),V){var dt=(0,mt.Z)(vt,2);Ot.rowGap=dt[1]}else pt&&(Ot.marginTop=pt,Ot.marginBottom=pt);var St=(0,mt.Z)(vt,2),Lt=St[0],Nt=St[1],ne=J.useMemo(function(){return{gutter:[Lt,Nt],wrap:B,supportFlexGap:V}},[Lt,Nt,B,V]);return J.createElement(E.Z.Provider,{value:ne},J.createElement("div",(0,k.Z)({},K,{className:ht,style:(0,k.Z)((0,k.Z)({},Ot),Ut),ref:Ft}),oe))});lt.Z=X},6999:function(kt,lt,A){"use strict";var k=A(38663),it=A.n(k),wt=A(80638),mt=A.n(wt)},71230:function(kt,lt,A){"use strict";var k=A(92820);lt.Z=k.Z},13062:function(kt,lt,A){"use strict";var k=A(38663),it=A.n(k),wt=A(6999)},56645:function(kt,lt){(function(A,k){k(lt)})(this,function(A){"use strict";function k(M,B){return it(M)||wt(M,B)||mt()}function it(M){if(Array.isArray(M))return M}function wt(M,B){var K=[],H=!0,N=!1,P=void 0;try{for(var j=M[Symbol.iterator](),q;!(H=(q=j.next()).done)&&(K.push(q.value),!(B&&K.length===B));H=!0);}catch(G){N=!0,P=G}finally{try{!H&&j.return!=null&&j.return()}finally{if(N)throw P}}return K}function mt(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function ft(M,B,K,H){M=M.filter(function(vt,ht){var Ot=B(vt,ht),ot=K(vt,ht);return Ot!=null&&isFinite(Ot)&&ot!=null&&isFinite(ot)}),H&&M.sort(function(vt,ht){return B(vt)-B(ht)});for(var N=M.length,P=new Float64Array(N),j=new Float64Array(N),q=0,G=0,z,V,st,nt=0;nt<N;)st=M[nt],P[nt]=z=+B(st,nt,M),j[nt]=V=+K(st,nt,M),++nt,q+=(z-q)/nt,G+=(V-G)/nt;for(var et=0;et<N;++et)P[et]-=q,j[et]-=G;return[P,j,q,G]}function ct(M,B,K,H){for(var N=0,P=0,j=M.length;P<j;P++){var q=M[P],G=+B(q,P,M),z=+K(q,P,M);G!=null&&isFinite(G)&&z!=null&&isFinite(z)&&H(G,z,N++)}}function J(M,B,K,H,N){var P=0,j=0;return ct(M,B,K,function(q,G){var z=G-N(q),V=G-H;P+=z*z,j+=V*V}),1-P/j}function $(M){return Math.atan2(M[1][1]-M[0][1],M[1][0]-M[0][0])*180/Math.PI}function d(M){return[(M[0][0]+M[1][0])/2,(M[0][1]+M[1][1])/2]}function c(M,B,K){for(var H=Math.log(B-M)*Math.LOG10E+1|0,N=1*Math.pow(10,-H/2-1),P=1e4,j=[G(M),G(B)],q=0;z(j)&&q<P;);return j;function G(V){return[V,K(V)]}function z(V){q++;for(var st=V.length,nt=!1,et=0;et<st-1;et++){var vt=V[et],ht=V[et+1],Ot=d([vt,ht]),ot=G(Ot[0]),pt=$([vt,Ot]),dt=$([vt,ot]),St=Math.abs(pt-dt);St>N&&(V.splice(et+1,0,ot),nt=!0)}return nt}}function Q(M,B,K,H){var N=H-M*M,P=Math.abs(N)<1e-24?0:(K-M*B)/N,j=B-P*M;return[j,P]}function E(){var M=function(P){return P[0]},B=function(P){return P[1]},K;function H(N){var P=0,j=0,q=0,G=0,z=0,V=0,st=K?+K[0]:Infinity,nt=K?+K[1]:-Infinity;ct(N,M,B,function(dt,St){var Lt=Math.log(St),Nt=dt*St;++P,j+=(St-j)/P,G+=(Nt-G)/P,V+=(dt*Nt-V)/P,q+=(St*Lt-q)/P,z+=(Nt*Lt-z)/P,K||(dt<st&&(st=dt),dt>nt&&(nt=dt))});var et=Q(G/j,q/j,z/j,V/j),vt=k(et,2),ht=vt[0],Ot=vt[1];ht=Math.exp(ht);var ot=function(St){return ht*Math.exp(Ot*St)},pt=c(st,nt,ot);return pt.a=ht,pt.b=Ot,pt.predict=ot,pt.rSquared=J(N,M,B,j,ot),pt}return H.domain=function(N){return arguments.length?(K=N,H):K},H.x=function(N){return arguments.length?(M=N,H):M},H.y=function(N){return arguments.length?(B=N,H):B},H}function R(){var M=function(P){return P[0]},B=function(P){return P[1]},K;function H(N){var P=0,j=0,q=0,G=0,z=0,V=K?+K[0]:Infinity,st=K?+K[1]:-Infinity;ct(N,M,B,function(pt,dt){++P,j+=(pt-j)/P,q+=(dt-q)/P,G+=(pt*dt-G)/P,z+=(pt*pt-z)/P,K||(pt<V&&(V=pt),pt>st&&(st=pt))});var nt=Q(j,q,G,z),et=k(nt,2),vt=et[0],ht=et[1],Ot=function(dt){return ht*dt+vt},ot=[[V,Ot(V)],[st,Ot(st)]];return ot.a=ht,ot.b=vt,ot.predict=Ot,ot.rSquared=J(N,M,B,q,Ot),ot}return H.domain=function(N){return arguments.length?(K=N,H):K},H.x=function(N){return arguments.length?(M=N,H):M},H.y=function(N){return arguments.length?(B=N,H):B},H}function Z(M){M.sort(function(K,H){return K-H});var B=M.length/2;return B%1==0?(M[B-1]+M[B])/2:M[Math.floor(B)]}var L=2,X=1e-12;function U(){var M=function(P){return P[0]},B=function(P){return P[1]},K=.3;function H(N){for(var P=ft(N,M,B,!0),j=k(P,4),q=j[0],G=j[1],z=j[2],V=j[3],st=q.length,nt=Math.max(2,~~(K*st)),et=new Float64Array(st),vt=new Float64Array(st),ht=new Float64Array(st).fill(1),Ot=-1;++Ot<=L;){for(var ot=[0,nt-1],pt=0;pt<st;++pt){for(var dt=q[pt],St=ot[0],Lt=ot[1],Nt=dt-q[St]>q[Lt]-dt?St:Lt,ne=0,re=0,Qt=0,xe=0,ge=0,Ee=1/Math.abs(q[Nt]-dt||1),pe=St;pe<=Lt;++pe){var he=q[pe],ye=G[pe],Ae=Ft(Math.abs(dt-he)*Ee)*ht[pe],We=he*Ae;ne+=Ae,re+=We,Qt+=ye*Ae,xe+=ye*We,ge+=he*We}var ei=Q(re/ne,Qt/ne,xe/ne,ge/ne),Wa=k(ei,2),el=Wa[0],rl=Wa[1];et[pt]=el+rl*dt,vt[pt]=Math.abs(G[pt]-et[pt]),xt(q,pt+1,ot)}if(Ot===L)break;var Ha=Z(vt);if(Math.abs(Ha)<X)break;for(var Mi=0,Ti,Ya;Mi<st;++Mi)Ti=vt[Mi]/(6*Ha),ht[Mi]=Ti>=1?X:(Ya=1-Ti*Ti)*Ya}return tt(q,et,z,V)}return H.bandwidth=function(N){return arguments.length?(K=N,H):K},H.x=function(N){return arguments.length?(M=N,H):M},H.y=function(N){return arguments.length?(B=N,H):B},H}function Ft(M){return(M=1-M*M*M)*M*M}function xt(M,B,K){var H=M[B],N=K[0],P=K[1]+1;if(!(P>=M.length))for(;B>N&&M[P]-H<=H-M[N];)K[0]=++N,K[1]=P,++P}function tt(M,B,K,H){for(var N=M.length,P=[],j=0,q=0,G=[],z;j<N;++j)z=M[j]+K,G[0]===z?G[1]+=(B[j]-G[1])/++q:(q=0,G[1]+=H,G=[z,B[j]],P.push(G));return G[1]+=H,P}function Tt(){var M=function(j){return j[0]},B=function(j){return j[1]},K=Math.E,H;function N(P){var j=0,q=0,G=0,z=0,V=0,st=H?+H[0]:Infinity,nt=H?+H[1]:-Infinity,et=Math.log(K);ct(P,M,B,function(St,Lt){var Nt=Math.log(St)/et;++j,q+=(Nt-q)/j,G+=(Lt-G)/j,z+=(Nt*Lt-z)/j,V+=(Nt*Nt-V)/j,H||(St<st&&(st=St),St>nt&&(nt=St))});var vt=Q(q,G,z,V),ht=k(vt,2),Ot=ht[0],ot=ht[1],pt=function(Lt){return ot*Math.log(Lt)/et+Ot},dt=c(st,nt,pt);return dt.a=ot,dt.b=Ot,dt.predict=pt,dt.rSquared=J(P,M,B,G,pt),dt}return N.domain=function(P){return arguments.length?(H=P,N):H},N.x=function(P){return arguments.length?(M=P,N):M},N.y=function(P){return arguments.length?(B=P,N):B},N.base=function(P){return arguments.length?(K=P,N):K},N}function Yt(){var M=function(P){return P[0]},B=function(P){return P[1]},K;function H(N){var P=ft(N,M,B),j=k(P,4),q=j[0],G=j[1],z=j[2],V=j[3],st=q.length,nt=0,et=0,vt=0,ht=0,Ot=0,ot,pt,dt,St;for(ot=0;ot<st;)pt=q[ot],dt=G[ot++],St=pt*pt,nt+=(St-nt)/ot,et+=(St*pt-et)/ot,vt+=(St*St-vt)/ot,ht+=(pt*dt-ht)/ot,Ot+=(St*dt-Ot)/ot;var Lt=0,Nt=0,ne=K?+K[0]:Infinity,re=K?+K[1]:-Infinity;ct(N,M,B,function(Ae,We){Nt++,Lt+=(We-Lt)/Nt,K||(Ae<ne&&(ne=Ae),Ae>re&&(re=Ae))});var Qt=vt-nt*nt,xe=nt*Qt-et*et,ge=(Ot*nt-ht*et)/xe,Ee=(ht*Qt-Ot*et)/xe,pe=-ge*nt,he=function(We){return We=We-z,ge*We*We+Ee*We+pe+V},ye=c(ne,re,he);return ye.a=ge,ye.b=Ee-2*ge*z,ye.c=pe-Ee*z+ge*z*z+V,ye.predict=he,ye.rSquared=J(N,M,B,Lt,he),ye}return H.domain=function(N){return arguments.length?(K=N,H):K},H.x=function(N){return arguments.length?(M=N,H):M},H.y=function(N){return arguments.length?(B=N,H):B},H}function te(){var M=function(j){return j[0]},B=function(j){return j[1]},K=3,H;function N(P){if(K===1){var j=R().x(M).y(B).domain(H)(P);return j.coefficients=[j.b,j.a],delete j.a,delete j.b,j}if(K===2){var q=Yt().x(M).y(B).domain(H)(P);return q.coefficients=[q.c,q.b,q.a],delete q.a,delete q.b,delete q.c,q}var G=ft(P,M,B),z=k(G,4),V=z[0],st=z[1],nt=z[2],et=z[3],vt=V.length,ht=[],Ot=[],ot=K+1,pt=0,dt=0,St=H?+H[0]:Infinity,Lt=H?+H[1]:-Infinity;ct(P,M,B,function(he,ye){++dt,pt+=(ye-pt)/dt,H||(he<St&&(St=he),he>Lt&&(Lt=he))});var Nt,ne,re,Qt,xe;for(Nt=0;Nt<ot;++Nt){for(re=0,Qt=0;re<vt;++re)Qt+=Math.pow(V[re],Nt)*st[re];for(ht.push(Qt),xe=new Float64Array(ot),ne=0;ne<ot;++ne){for(re=0,Qt=0;re<vt;++re)Qt+=Math.pow(V[re],Nt+ne);xe[ne]=Qt}Ot.push(xe)}Ot.push(ht);var ge=oe(Ot),Ee=function(ye){ye-=nt;var Ae=et+ge[0]+ge[1]*ye+ge[2]*ye*ye;for(Nt=3;Nt<ot;++Nt)Ae+=ge[Nt]*Math.pow(ye,Nt);return Ae},pe=c(St,Lt,Ee);return pe.coefficients=Ut(ot,ge,-nt,et),pe.predict=Ee,pe.rSquared=J(P,M,B,pt,Ee),pe}return N.domain=function(P){return arguments.length?(H=P,N):H},N.x=function(P){return arguments.length?(M=P,N):M},N.y=function(P){return arguments.length?(B=P,N):B},N.order=function(P){return arguments.length?(K=P,N):K},N}function Ut(M,B,K,H){var N=Array(M),P,j,q,G;for(P=0;P<M;++P)N[P]=0;for(P=M-1;P>=0;--P)for(q=B[P],G=1,N[P]+=q,j=1;j<=P;++j)G*=(P+1-j)/j,N[P-j]+=q*Math.pow(K,j)*G;return N[0]+=H,N}function oe(M){var B=M.length-1,K=[],H,N,P,j,q;for(H=0;H<B;++H){for(j=H,N=H+1;N<B;++N)Math.abs(M[H][N])>Math.abs(M[H][j])&&(j=N);for(P=H;P<B+1;++P)q=M[P][H],M[P][H]=M[P][j],M[P][j]=q;for(N=H+1;N<B;++N)for(P=B;P>=H;P--)M[P][N]-=M[P][H]*M[H][N]/M[H][H]}for(N=B-1;N>=0;--N){for(q=0,P=N+1;P<B;++P)q+=M[P][N]*K[P];K[N]=(M[B][N]-q)/M[N][N]}return K}function Xt(){var M=function(P){return P[0]},B=function(P){return P[1]},K;function H(N){var P=0,j=0,q=0,G=0,z=0,V=0,st=K?+K[0]:Infinity,nt=K?+K[1]:-Infinity;ct(N,M,B,function(dt,St){var Lt=Math.log(dt),Nt=Math.log(St);++P,j+=(Lt-j)/P,q+=(Nt-q)/P,G+=(Lt*Nt-G)/P,z+=(Lt*Lt-z)/P,V+=(St-V)/P,K||(dt<st&&(st=dt),dt>nt&&(nt=dt))});var et=Q(j,q,G,z),vt=k(et,2),ht=vt[0],Ot=vt[1];ht=Math.exp(ht);var ot=function(St){return ht*Math.pow(St,Ot)},pt=c(st,nt,ot);return pt.a=ht,pt.b=Ot,pt.predict=ot,pt.rSquared=J(N,M,B,V,ot),pt}return H.domain=function(N){return arguments.length?(K=N,H):K},H.x=function(N){return arguments.length?(M=N,H):M},H.y=function(N){return arguments.length?(B=N,H):B},H}A.regressionExp=E,A.regressionLinear=R,A.regressionLoess=U,A.regressionLog=Tt,A.regressionPoly=te,A.regressionPow=Xt,A.regressionQuad=Yt,Object.defineProperty(A,"__esModule",{value:!0})})},87026:function(kt,lt){(function(A,k){k(lt)})(this,function(A){"use strict";function k(R,Z,L,X){X=X||{};var U=X.maxIterations||100,Ft=X.tolerance||1e-10,xt=R(Z),tt=R(L),Tt=L-Z;if(xt*tt>0)throw"Initial bisect points must have opposite signs";if(xt===0)return Z;if(tt===0)return L;for(var Yt=0;Yt<U;++Yt){Tt/=2;var te=Z+Tt,Ut=R(te);if(Ut*xt>=0&&(Z=te),Math.abs(Tt)<Ft||Ut===0)return te}return Z+Tt}function it(R){for(var Z=new Array(R),L=0;L<R;++L)Z[L]=0;return Z}function wt(R,Z){return it(R).map(function(){return it(Z)})}function mt(R,Z){for(var L=0,X=0;X<R.length;++X)L+=R[X]*Z[X];return L}function ft(R){return Math.sqrt(mt(R,R))}function ct(R,Z,L){for(var X=0;X<Z.length;++X)R[X]=Z[X]*L}function J(R,Z,L,X,U){for(var Ft=0;Ft<R.length;++Ft)R[Ft]=Z*L[Ft]+X*U[Ft]}function $(R,Z,L){L=L||{};var X=L.maxIterations||Z.length*200,U=L.nonZeroDelta||1.05,Ft=L.zeroDelta||.001,xt=L.minErrorDelta||1e-6,tt=L.minErrorDelta||1e-5,Tt=L.rho!==void 0?L.rho:1,Yt=L.chi!==void 0?L.chi:2,te=L.psi!==void 0?L.psi:-.5,Ut=L.sigma!==void 0?L.sigma:.5,oe,Xt=Z.length,M=new Array(Xt+1);M[0]=Z,M[0].fx=R(Z),M[0].id=0;for(var B=0;B<Xt;++B){var K=Z.slice();K[B]=K[B]?K[B]*U:Ft,M[B+1]=K,M[B+1].fx=R(K),M[B+1].id=B+1}function H(vt){for(var ht=0;ht<vt.length;ht++)M[Xt][ht]=vt[ht];M[Xt].fx=vt.fx}for(var N=function(vt,ht){return vt.fx-ht.fx},P=Z.slice(),j=Z.slice(),q=Z.slice(),G=Z.slice(),z=0;z<X;++z){if(M.sort(N),L.history){var V=M.map(function(vt){var ht=vt.slice();return ht.fx=vt.fx,ht.id=vt.id,ht});V.sort(function(vt,ht){return vt.id-ht.id}),L.history.push({x:M[0].slice(),fx:M[0].fx,simplex:V})}for(oe=0,B=0;B<Xt;++B)oe=Math.max(oe,Math.abs(M[0][B]-M[1][B]));if(Math.abs(M[0].fx-M[Xt].fx)<xt&&oe<tt)break;for(B=0;B<Xt;++B){P[B]=0;for(var st=0;st<Xt;++st)P[B]+=M[st][B];P[B]/=Xt}var nt=M[Xt];if(J(j,1+Tt,P,-Tt,nt),j.fx=R(j),j.fx<M[0].fx)J(G,1+Yt,P,-Yt,nt),G.fx=R(G),G.fx<j.fx?H(G):H(j);else if(j.fx>=M[Xt-1].fx){var et=!1;if(j.fx>nt.fx?(J(q,1+te,P,-te,nt),q.fx=R(q),q.fx<nt.fx?H(q):et=!0):(J(q,1-te*Tt,P,te*Tt,nt),q.fx=R(q),q.fx<j.fx?H(q):et=!0),et){if(Ut>=1)break;for(B=1;B<M.length;++B)J(M[B],1-Ut,M[0],Ut,M[B]),M[B].fx=R(M[B])}}else H(j)}return M.sort(N),{fx:M[0].fx,x:M[0]}}function d(R,Z,L,X,U,Ft,xt){var tt=L.fx,Tt=mt(L.fxprime,Z),Yt=tt,te=tt,Ut=Tt,oe=0;U=U||1,Ft=Ft||1e-6,xt=xt||.1;function Xt(B,K,H){for(var N=0;N<16;++N)if(U=(B+K)/2,J(X.x,1,L.x,U,Z),Yt=X.fx=R(X.x,X.fxprime),Ut=mt(X.fxprime,Z),Yt>tt+Ft*U*Tt||Yt>=H)K=U;else{if(Math.abs(Ut)<=-xt*Tt)return U;Ut*(K-B)>=0&&(K=B),B=U,H=Yt}return 0}for(var M=0;M<10;++M){if(J(X.x,1,L.x,U,Z),Yt=X.fx=R(X.x,X.fxprime),Ut=mt(X.fxprime,Z),Yt>tt+Ft*U*Tt||M&&Yt>=te)return Xt(oe,U,te);if(Math.abs(Ut)<=-xt*Tt)return U;if(Ut>=0)return Xt(U,oe,Yt);te=Yt,oe=U,U*=2}return U}function c(R,Z,L){var X={x:Z.slice(),fx:0,fxprime:Z.slice()},U={x:Z.slice(),fx:0,fxprime:Z.slice()},Ft=Z.slice(),xt,tt,Tt=1,Yt;L=L||{},Yt=L.maxIterations||Z.length*20,X.fx=R(X.x,X.fxprime),xt=X.fxprime.slice(),ct(xt,X.fxprime,-1);for(var te=0;te<Yt;++te){if(Tt=d(R,xt,X,U,Tt),L.history&&L.history.push({x:X.x.slice(),fx:X.fx,fxprime:X.fxprime.slice(),alpha:Tt}),!Tt)ct(xt,X.fxprime,-1);else{J(Ft,1,U.fxprime,-1,X.fxprime);var Ut=mt(X.fxprime,X.fxprime),oe=Math.max(0,mt(Ft,U.fxprime)/Ut);J(xt,oe,xt,-1,U.fxprime),tt=X,X=U,U=tt}if(ft(X.fxprime)<=1e-5)break}return L.history&&L.history.push({x:X.x.slice(),fx:X.fx,fxprime:X.fxprime.slice(),alpha:Tt}),X}function Q(R,Z,L){L=L||{};for(var X=L.maxIterations||Z.length*100,U=L.learnRate||.001,Ft={x:Z.slice(),fx:0,fxprime:Z.slice()},xt=0;xt<X&&(Ft.fx=R(Ft.x,Ft.fxprime),L.history&&L.history.push({x:Ft.x.slice(),fx:Ft.fx,fxprime:Ft.fxprime.slice()}),J(Ft.x,1,Ft.x,-U,Ft.fxprime),!(ft(Ft.fxprime)<=1e-5));++xt);return Ft}function E(R,Z,L){L=L||{};var X={x:Z.slice(),fx:0,fxprime:Z.slice()},U={x:Z.slice(),fx:0,fxprime:Z.slice()},Ft=L.maxIterations||Z.length*100,xt=L.learnRate||1,tt=Z.slice(),Tt=L.c1||.001,Yt=L.c2||.1,te,Ut=[];if(L.history){var oe=R;R=function(M,B){return Ut.push(M.slice()),oe(M,B)}}X.fx=R(X.x,X.fxprime);for(var Xt=0;Xt<Ft&&(ct(tt,X.fxprime,-1),xt=d(R,tt,X,U,xt,Tt,Yt),L.history&&(L.history.push({x:X.x.slice(),fx:X.fx,fxprime:X.fxprime.slice(),functionCalls:Ut,learnRate:xt,alpha:xt}),Ut=[]),te=X,X=U,U=te,!(xt===0||ft(X.fxprime)<1e-5));++Xt);return X}A.bisect=k,A.nelderMead=$,A.conjugateGradient=c,A.gradientDescent=Q,A.gradientDescentLineSearch=E,A.zeros=it,A.zerosM=wt,A.norm2=ft,A.weightedSum=J,A.scale=ct})},29932:function(kt){function lt(A,k){for(var it=-1,wt=A==null?0:A.length,mt=Array(wt);++it<wt;)mt[it]=k(A[it],it,A);return mt}kt.exports=lt},40371:function(kt){function lt(A){return function(k){return k==null?void 0:k[A]}}kt.exports=lt},80531:function(kt,lt,A){var k=A(62705),it=A(29932),wt=A(1469),mt=A(33448),ft=1/0,ct=k?k.prototype:void 0,J=ct?ct.toString:void 0;function $(d){if(typeof d=="string")return d;if(wt(d))return it(d,$)+"";if(mt(d))return J?J.call(d):"";var c=d+"";return c=="0"&&1/d==-ft?"-0":c}kt.exports=$},79833:function(kt,lt,A){var k=A(80531);function it(wt){return wt==null?"":k(wt)}kt.exports=it},73807:function(kt){"use strict";var lt=kt.exports;kt.exports.isNumber=function(A){return typeof A=="number"},kt.exports.findMin=function(A){if(A.length===0)return Infinity;for(var k=A[0],it=1;it<A.length;it++)k=Math.min(k,A[it]);return k},kt.exports.findMax=function(A){if(A.length===0)return-Infinity;for(var k=A[0],it=1;it<A.length;it++)k=Math.max(k,A[it]);return k},kt.exports.findMinMulti=function(A){for(var k=lt.findMin(A[0]),it=1;it<A.length;it++)k=Math.min(k,lt.findMin(A[it]));return k},kt.exports.findMaxMulti=function(A){for(var k=lt.findMax(A[0]),it=1;it<A.length;it++)k=Math.max(k,lt.findMax(A[it]));return k},kt.exports.inside=function(A,k,it){return A<=it&&it<=k}},53843:function(kt,lt,A){"use strict";var k=50,it=2,wt=Math.log(2),mt=kt.exports,ft=A(73807);function ct($){return 1-Math.abs($)}kt.exports.getUnifiedMinMax=function($,d){return mt.getUnifiedMinMaxMulti([$],d)},kt.exports.getUnifiedMinMaxMulti=function($,d){d=d||{};var c=!1,Q=!1,E=ft.isNumber(d.width)?d.width:it,R=ft.isNumber(d.size)?d.size:k,Z=ft.isNumber(d.min)?d.min:(c=!0,ft.findMinMulti($)),L=ft.isNumber(d.max)?d.max:(Q=!0,ft.findMaxMulti($)),X=L-Z,U=X/(R-1);return c&&(Z=Z-2*E*U),Q&&(L=L+2*E*U),{min:Z,max:L}},kt.exports.create=function($,d){if(d=d||{},!$||$.length===0)return[];var c=ft.isNumber(d.size)?d.size:k,Q=ft.isNumber(d.width)?d.width:it,E=mt.getUnifiedMinMax($,{size:c,width:Q,min:d.min,max:d.max}),R=E.min,Z=E.max,L=Z-R,X=L/(c-1);if(L===0)return[{x:R,y:1}];for(var U=[],Ft=0;Ft<c;Ft++)U.push({x:R+Ft*X,y:0});var xt=function(M){return Math.floor((M-R)/X)},tt=J(ct,Q),Tt=tt[Q],Yt=tt[Q-1]-tt[Q-2],te=0;$.forEach(function(M){var B=xt(M);if(!(B+Q<0||B-Q>=U.length)){var K=Math.max(B-Q,0),H=B,N=Math.min(B+Q,U.length-1),P=K-(B-Q),j=B+Q-N,q=tt[-Q-1+P]||0,G=tt[-Q-1+j]||0,z=Tt/(Tt-q-G);P>0&&(te+=z*(P-1)*Yt);var V=Math.max(0,B-Q+1);ft.inside(0,U.length-1,V)&&(U[V].y+=z*1*Yt),ft.inside(0,U.length-1,H+1)&&(U[H+1].y-=z*2*Yt),ft.inside(0,U.length-1,N+1)&&(U[N+1].y+=z*1*Yt)}});var Ut=te,oe=0,Xt=0;return U.forEach(function(M){oe+=M.y,Ut+=oe,M.y=Ut,Xt+=Ut}),Xt>0&&U.forEach(function(M){M.y/=Xt}),U};function J($,d){for(var c={},Q=0,E=-d;E<=d;E++)Q+=$(E/d),c[E]=Q;return c}kt.exports.getExpectedValueFromPdf=function($){if(!(!$||$.length===0)){var d=0;return $.forEach(function(c){d+=c.x*c.y}),d}},kt.exports.getXWithLeftTailArea=function($,d){if(!(!$||$.length===0)){for(var c=0,Q=0,E=0;E<$.length&&(Q=E,c+=$[E].y,!(c>=d));E++);return $[Q].x}},kt.exports.getPerplexity=function($){if(!(!$||$.length===0)){var d=0;return $.forEach(function(c){var Q=Math.log(c.y);isFinite(Q)&&(d+=c.y*Q)}),d=-d/wt,Math.pow(2,d)}}},55168:function(kt,lt){"use strict";Object.defineProperty(lt,"__esModule",{value:!0}),lt.SensorTabIndex=lt.SensorClassName=lt.SizeSensorId=void 0;var A="size-sensor-id";lt.SizeSensorId=A;var k="size-sensor-object";lt.SensorClassName=k;var it="-1";lt.SensorTabIndex=it},12177:function(kt,lt){"use strict";Object.defineProperty(lt,"__esModule",{value:!0}),lt.default=void 0;var A=function(it){var wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,mt=null;return function(){for(var ft=this,ct=arguments.length,J=new Array(ct),$=0;$<ct;$++)J[$]=arguments[$];clearTimeout(mt),mt=setTimeout(function(){it.apply(ft,J)},wt)}};lt.default=A},15378:function(kt,lt){"use strict";Object.defineProperty(lt,"__esModule",{value:!0}),lt.default=void 0;var A=1,k=function(){return"".concat(A++)};lt.default=k},18587:function(kt,lt,A){"use strict";var k;k={value:!0},k=k=lt.ak=void 0;var it=A(12955),wt=function(J,$){var d=(0,it.getSensor)(J);return d.bind($),function(){d.unbind($)}};lt.ak=wt;var mt=function(J){var $=(0,it.getSensor)(J);(0,it.removeSensor)($)};k=mt;var ft="1.0.1";k=ft},12955:function(kt,lt,A){"use strict";Object.defineProperty(lt,"__esModule",{value:!0}),lt.removeSensor=lt.getSensor=void 0;var k=mt(A(15378)),it=A(82578),wt=A(55168);function mt($){return $&&$.__esModule?$:{default:$}}var ft={},ct=function(d){var c=d.getAttribute(wt.SizeSensorId);if(c&&ft[c])return ft[c];var Q=(0,k.default)();d.setAttribute(wt.SizeSensorId,Q);var E=(0,it.createSensor)(d);return ft[Q]=E,E};lt.getSensor=ct;var J=function(d){var c=d.element.getAttribute(wt.SizeSensorId);d.element.removeAttribute(wt.SizeSensorId),d.destroy(),c&&ft[c]&&delete ft[c]};lt.removeSensor=J},82578:function(kt,lt,A){"use strict";Object.defineProperty(lt,"__esModule",{value:!0}),lt.createSensor=void 0;var k=A(27643),it=A(31743),wt=typeof ResizeObserver!="undefined"?it.createSensor:k.createSensor;lt.createSensor=wt},27643:function(kt,lt,A){"use strict";Object.defineProperty(lt,"__esModule",{value:!0}),lt.createSensor=void 0;var k=wt(A(12177)),it=A(55168);function wt(ft){return ft&&ft.__esModule?ft:{default:ft}}var mt=function(ct){var J=void 0,$=[],d=function(){getComputedStyle(ct).position==="static"&&(ct.style.position="relative");var L=document.createElement("object");return L.onload=function(){L.contentDocument.defaultView.addEventListener("resize",c),c()},L.style.display="block",L.style.position="absolute",L.style.top="0",L.style.left="0",L.style.height="100%",L.style.width="100%",L.style.overflow="hidden",L.style.pointerEvents="none",L.style.zIndex="-1",L.style.opacity="0",L.setAttribute("class",it.SensorClassName),L.setAttribute("tabindex",it.SensorTabIndex),L.type="text/html",ct.appendChild(L),L.data="about:blank",L},c=(0,k.default)(function(){$.forEach(function(Z){Z(ct)})}),Q=function(L){J||(J=d()),$.indexOf(L)===-1&&$.push(L)},E=function(){J&&J.parentNode&&(J.contentDocument&&J.contentDocument.defaultView.removeEventListener("resize",c),J.parentNode.removeChild(J),J=void 0,$=[])},R=function(L){var X=$.indexOf(L);X!==-1&&$.splice(X,1),$.length===0&&J&&E()};return{element:ct,bind:Q,destroy:E,unbind:R}};lt.createSensor=mt},31743:function(kt,lt,A){"use strict";Object.defineProperty(lt,"__esModule",{value:!0}),lt.createSensor=void 0;var k=it(A(12177));function it(mt){return mt&&mt.__esModule?mt:{default:mt}}var wt=function(ft){var ct=void 0,J=[],$=(0,k.default)(function(){J.forEach(function(R){R(ft)})}),d=function(){var Z=new ResizeObserver($);return Z.observe(ft),$(),Z},c=function(Z){ct||(ct=d()),J.indexOf(Z)===-1&&J.push(Z)},Q=function(){ct.disconnect(),J=[],ct=void 0},E=function(Z){var L=J.indexOf(Z);L!==-1&&J.splice(L,1),J.length===0&&ct&&Q()};return{element:ft,bind:c,destroy:Q,unbind:E}};lt.createSensor=wt}}]);