All Downloads are FREE. Search and download functionalities are using the official Maven repository.

public.364.2a8c9cb05a9edb25.js Maven / Gradle / Ivy

The newest version!
(self.webpackChunkerupt=self.webpackChunkerupt||[]).push([[364],{378:(rr,be,ct)=>{"use strict";ct.d(be,{Z:()=>ve});var ae="*";const ve=function(){function Zt(){this._events={}}return Zt.prototype.on=function(Qt,zt,Bt){return this._events[Qt]||(this._events[Qt]=[]),this._events[Qt].push({callback:zt,once:!!Bt}),this},Zt.prototype.once=function(Qt,zt){return this.on(Qt,zt,!0)},Zt.prototype.emit=function(Qt){for(var zt=this,Bt=[],Mt=1;Mt{"use strict";ct.d(be,{Z:()=>Qt});var ae=ct(655),Nt=ct(378),ve=ct(8126);const Qt=function(zt){function Bt(Mt){var Vt=zt.call(this)||this;Vt.destroyed=!1;var se=Vt.getDefaultCfg();return Vt.cfg=(0,ve.CD)(se,Mt),Vt}return(0,ae.ZT)(Bt,zt),Bt.prototype.getDefaultCfg=function(){return{}},Bt.prototype.get=function(Mt){return this.cfg[Mt]},Bt.prototype.set=function(Mt,Vt){this.cfg[Mt]=Vt},Bt.prototype.destroy=function(){this.cfg={destroyed:!0},this.off(),this.destroyed=!0},Bt}(Nt.Z)},4967:(rr,be,ct)=>{"use strict";ct.d(be,{Z:()=>Re});var ae=ct(655),Nt=ct(2260),ve=ct(1655),Zt=ct(8126),Qt=ct(8250),zt=ct(9194),Bt=ct(4943);function Mt(it,z,R,N,V){var lt=it*it,_t=lt*it;return((1-3*it+3*lt-_t)*z+(4-6*lt+3*_t)*R+(1+3*it+3*lt-3*_t)*N+_t*V)/6}const ne=it=>()=>it;function dt(it,z){var R=z-it;return R?function me(it,z){return function(R){return it+R*z}}(it,R):ne(isNaN(it)?z:it)}const Yt=function it(z){var R=function ut(it){return 1==(it=+it)?dt:function(z,R){return R-z?function Dt(it,z,R){return it=Math.pow(it,R),z=Math.pow(z,R)-it,R=1/R,function(N){return Math.pow(it+N*z,R)}}(z,R,it):ne(isNaN(z)?R:z)}}(z);function N(V,lt){var _t=R((V=(0,Bt.B8)(V)).r,(lt=(0,Bt.B8)(lt)).r),St=R(V.g,lt.g),Gt=R(V.b,lt.b),ee=dt(V.opacity,lt.opacity);return function(ie){return V.r=_t(ie),V.g=St(ie),V.b=Gt(ie),V.opacity=ee(ie),V+""}}return N.gamma=it,N}(1);function Ut(it){return function(z){var _t,St,R=z.length,N=new Array(R),V=new Array(R),lt=new Array(R);for(_t=0;_t=1?(R=1,z-1):Math.floor(R*z),V=it[N],lt=it[N+1];return Mt((R-N/z)*z,N>0?it[N-1]:2*V-lt,V,lt,NR&&(lt=z.slice(R,lt),St[_t]?St[_t]+=lt:St[++_t]=lt),(N=N[0])===(V=V[0])?St[_t]?St[_t]+=V:St[++_t]=V:(St[++_t]=null,Gt.push({i:_t,x:oe(N,V)})),R=ye.lastIndex;return Ree.length?(Gt=Et.parsePathString(lt[St]),ee=Et.parsePathString(V[St]),ee=Et.fillPathByDiff(ee,Gt),ee=Et.formatPath(ee,Gt),z.fromAttrs.path=ee,z.toAttrs.path=Gt):z.pathFormatted||(Gt=Et.parsePathString(lt[St]),ee=Et.parsePathString(V[St]),ee=Et.formatPath(ee,Gt),z.fromAttrs.path=ee,z.toAttrs.path=Gt,z.pathFormatted=!0),N[St]=[];for(var ie=0;ie0){for(var St=z.animators.length-1;St>=0;St--)if((N=z.animators[St]).destroyed)z.removeAnimator(St);else{if(!N.isAnimatePaused())for(var Gt=(V=N.get("animations")).length-1;Gt>=0;Gt--)K(N,lt=V[Gt],_t)&&(V.splice(Gt,1),lt.callback&<.callback());0===V.length&&z.removeAnimator(St)}z.canvas.get("autoDraw")||z.canvas.draw()}})},it.prototype.addAnimator=function(z){this.animators.push(z)},it.prototype.removeAnimator=function(z){this.animators.splice(z,1)},it.prototype.isAnimating=function(){return!!this.animators.length},it.prototype.stop=function(){this.timer&&this.timer.stop()},it.prototype.stopAllAnimations=function(z){void 0===z&&(z=!0),this.animators.forEach(function(R){R.stopAnimate(z)}),this.animators=[],this.canvas.draw()},it.prototype.getTime=function(){return this.current},it}();var vt=ct(8833),P=["mousedown","mouseup","dblclick","mouseout","mouseover","mousemove","mouseleave","mouseenter","touchstart","touchmove","touchend","dragenter","dragover","dragleave","drop","contextmenu","mousewheel"];function q(it,z,R){R.name=z,R.target=it,R.currentTarget=it,R.delegateTarget=it,it.emit(z,R)}function at(it,z,R){if(R.bubbles){var N=void 0,V=!1;if("mouseenter"===z?(N=R.fromShape,V=!0):"mouseleave"===z&&(V=!0,N=R.toShape),it.isCanvas()&&V)return;if(N&&(0,Zt.UY)(it,N))return void(R.bubbles=!1);R.name=z,R.currentTarget=it,R.delegateTarget=it,it.emit(z,R)}}const Lt=function(){function it(z){var R=this;this.draggingShape=null,this.dragging=!1,this.currentShape=null,this.mousedownShape=null,this.mousedownPoint=null,this._eventCallback=function(N){R._triggerEvent(N.type,N)},this._onDocumentMove=function(N){if(R.canvas.get("el")!==N.target&&(R.dragging||R.currentShape)){var _t=R._getPointInfo(N);R.dragging&&R._emitEvent("drag",N,_t,R.draggingShape)}},this._onDocumentMouseUp=function(N){if(R.canvas.get("el")!==N.target&&R.dragging){var _t=R._getPointInfo(N);R.draggingShape&&R._emitEvent("drop",N,_t,null),R._emitEvent("dragend",N,_t,R.draggingShape),R._afterDrag(R.draggingShape,_t,N)}},this.canvas=z.canvas}return it.prototype.init=function(){this._bindEvents()},it.prototype._bindEvents=function(){var z=this,R=this.canvas.get("el");(0,Zt.S6)(P,function(N){R.addEventListener(N,z._eventCallback)}),document&&(document.addEventListener("mousemove",this._onDocumentMove),document.addEventListener("mouseup",this._onDocumentMouseUp))},it.prototype._clearEvents=function(){var z=this,R=this.canvas.get("el");(0,Zt.S6)(P,function(N){R.removeEventListener(N,z._eventCallback)}),document&&(document.removeEventListener("mousemove",this._onDocumentMove),document.removeEventListener("mouseup",this._onDocumentMouseUp))},it.prototype._getEventObj=function(z,R,N,V,lt,_t){var St=new vt.Z(z,R);return St.fromShape=lt,St.toShape=_t,St.x=N.x,St.y=N.y,St.clientX=N.clientX,St.clientY=N.clientY,St.propagationPath.push(V),St},it.prototype._getShape=function(z,R){return this.canvas.getShape(z.x,z.y,R)},it.prototype._getPointInfo=function(z){var R=this.canvas,N=R.getClientByEvent(z),V=R.getPointByEvent(z);return{x:V.x,y:V.y,clientX:N.x,clientY:N.y}},it.prototype._triggerEvent=function(z,R){var N=this._getPointInfo(R),V=this._getShape(N,R),lt=this["_on"+z],_t=!1;if(lt)lt.call(this,N,V,R);else{var St=this.currentShape;"mouseenter"===z||"dragenter"===z||"mouseover"===z?(this._emitEvent(z,R,N,null,null,V),V&&this._emitEvent(z,R,N,V,null,V),"mouseenter"===z&&this.draggingShape&&this._emitEvent("dragenter",R,N,null)):"mouseleave"===z||"dragleave"===z||"mouseout"===z?(_t=!0,St&&this._emitEvent(z,R,N,St,St,null),this._emitEvent(z,R,N,null,St,null),"mouseleave"===z&&this.draggingShape&&this._emitEvent("dragleave",R,N,null)):this._emitEvent(z,R,N,V,null,null)}if(_t||(this.currentShape=V),V&&!V.get("destroyed")){var Gt=this.canvas;Gt.get("el").style.cursor=V.attr("cursor")||Gt.get("cursor")}},it.prototype._onmousedown=function(z,R,N){0===N.button&&(this.mousedownShape=R,this.mousedownPoint=z,this.mousedownTimeStamp=N.timeStamp),this._emitEvent("mousedown",N,z,R,null,null)},it.prototype._emitMouseoverEvents=function(z,R,N,V){var lt=this.canvas.get("el");N!==V&&(N&&(this._emitEvent("mouseout",z,R,N,N,V),this._emitEvent("mouseleave",z,R,N,N,V),(!V||V.get("destroyed"))&&(lt.style.cursor=this.canvas.get("cursor"))),V&&(this._emitEvent("mouseover",z,R,V,N,V),this._emitEvent("mouseenter",z,R,V,N,V)))},it.prototype._emitDragoverEvents=function(z,R,N,V,lt){V?(V!==N&&(N&&this._emitEvent("dragleave",z,R,N,N,V),this._emitEvent("dragenter",z,R,V,N,V)),lt||this._emitEvent("dragover",z,R,V)):N&&this._emitEvent("dragleave",z,R,N,N,V),lt&&this._emitEvent("dragover",z,R,V)},it.prototype._afterDrag=function(z,R,N){z&&(z.set("capture",!0),this.draggingShape=null),this.dragging=!1;var V=this._getShape(R,N);V!==z&&this._emitMouseoverEvents(N,R,z,V),this.currentShape=V},it.prototype._onmouseup=function(z,R,N){if(0===N.button){var V=this.draggingShape;this.dragging?(V&&this._emitEvent("drop",N,z,R),this._emitEvent("dragend",N,z,V),this._afterDrag(V,z,N)):(this._emitEvent("mouseup",N,z,R),R===this.mousedownShape&&this._emitEvent("click",N,z,R),this.mousedownShape=null,this.mousedownPoint=null)}},it.prototype._ondragover=function(z,R,N){N.preventDefault(),this._emitDragoverEvents(N,z,this.currentShape,R,!0)},it.prototype._onmousemove=function(z,R,N){var V=this.canvas,lt=this.currentShape,_t=this.draggingShape;if(this.dragging)_t&&this._emitDragoverEvents(N,z,lt,R,!1),this._emitEvent("drag",N,z,_t);else{var St=this.mousedownPoint;if(St){var Gt=this.mousedownShape,Ee=St.clientX-z.clientX,Te=St.clientY-z.clientY;N.timeStamp-this.mousedownTimeStamp>120||Ee*Ee+Te*Te>40?Gt&&Gt.get("draggable")?((_t=this.mousedownShape).set("capture",!1),this.draggingShape=_t,this.dragging=!0,this._emitEvent("dragstart",N,z,_t),this.mousedownShape=null,this.mousedownPoint=null):!Gt&&V.get("draggable")?(this.dragging=!0,this._emitEvent("dragstart",N,z,null),this.mousedownShape=null,this.mousedownPoint=null):(this._emitMouseoverEvents(N,z,lt,R),this._emitEvent("mousemove",N,z,R)):(this._emitMouseoverEvents(N,z,lt,R),this._emitEvent("mousemove",N,z,R))}else this._emitMouseoverEvents(N,z,lt,R),this._emitEvent("mousemove",N,z,R)}},it.prototype._emitEvent=function(z,R,N,V,lt,_t){var St=this._getEventObj(z,R,N,V,lt,_t);if(V){St.shape=V,q(V,z,St);for(var Gt=V.getParent();Gt;)Gt.emitDelegation(z,St),St.propagationStopped||at(Gt,z,St),St.propagationPath.push(Gt),Gt=Gt.getParent()}else q(this.canvas,z,St)},it.prototype.destroy=function(){this._clearEvents(),this.canvas=null,this.currentShape=null,this.draggingShape=null,this.mousedownPoint=null,this.mousedownShape=null,this.mousedownTimeStamp=null},it}();var re=(0,Nt.qY)(),Ce=re&&"firefox"===re.name;const Re=function(it){function z(R){var N=it.call(this,R)||this;return N.initContainer(),N.initDom(),N.initEvents(),N.initTimeline(),N}return(0,ae.ZT)(z,it),z.prototype.getDefaultCfg=function(){var R=it.prototype.getDefaultCfg.call(this);return R.cursor="default",R.supportCSSTransform=!1,R},z.prototype.initContainer=function(){var R=this.get("container");(0,Zt.HD)(R)&&(R=document.getElementById(R),this.set("container",R))},z.prototype.initDom=function(){var R=this.createDom();this.set("el",R),this.get("container").appendChild(R),this.setDOMSize(this.get("width"),this.get("height"))},z.prototype.initEvents=function(){var R=new Lt({canvas:this});R.init(),this.set("eventController",R)},z.prototype.initTimeline=function(){var R=new U(this);this.set("timeline",R)},z.prototype.setDOMSize=function(R,N){var V=this.get("el");Zt.jU&&(V.style.width=R+"px",V.style.height=N+"px")},z.prototype.changeSize=function(R,N){this.setDOMSize(R,N),this.set("width",R),this.set("height",N),this.onCanvasChange("changeSize")},z.prototype.getRenderer=function(){return this.get("renderer")},z.prototype.getCursor=function(){return this.get("cursor")},z.prototype.setCursor=function(R){this.set("cursor",R);var N=this.get("el");Zt.jU&&N&&(N.style.cursor=R)},z.prototype.getPointByEvent=function(R){if(this.get("supportCSSTransform")){if(Ce&&!(0,Zt.kK)(R.layerX)&&R.layerX!==R.offsetX)return{x:R.layerX,y:R.layerY};if(!(0,Zt.kK)(R.offsetX))return{x:R.offsetX,y:R.offsetY}}var V=this.getClientByEvent(R);return this.getPointByClient(V.x,V.y)},z.prototype.getClientByEvent=function(R){var N=R;return R.touches&&(N="touchend"===R.type?R.changedTouches[0]:R.touches[0]),{x:N.clientX,y:N.clientY}},z.prototype.getPointByClient=function(R,N){var lt=this.get("el").getBoundingClientRect();return{x:R-lt.left,y:N-lt.top}},z.prototype.getClientByPoint=function(R,N){var lt=this.get("el").getBoundingClientRect();return{x:R+lt.left,y:N+lt.top}},z.prototype.draw=function(){},z.prototype.removeDom=function(){var R=this.get("el");R.parentNode.removeChild(R)},z.prototype.clearEvents=function(){this.get("eventController").destroy()},z.prototype.isCanvas=function(){return!0},z.prototype.getParent=function(){return null},z.prototype.destroy=function(){var R=this.get("timeline");this.get("destroyed")||(this.clear(),R&&R.stop(),this.clearEvents(),this.removeDom(),it.prototype.destroy.call(this))},z}(ve.Z)},1655:(rr,be,ct)=>{"use strict";ct.d(be,{Z:()=>me});var ae=ct(655),Nt=ct(1395),ve=ct(8126),Zt={},Qt="_INDEX";function zt(Dt,Ct){if(Dt.set("canvas",Ct),Dt.isGroup()){var ut=Dt.get("children");ut.length&&ut.forEach(function(dt){zt(dt,Ct)})}}function Bt(Dt,Ct){if(Dt.set("timeline",Ct),Dt.isGroup()){var ut=Dt.get("children");ut.length&&ut.forEach(function(dt){Bt(dt,Ct)})}}const me=function(Dt){function Ct(){return null!==Dt&&Dt.apply(this,arguments)||this}return(0,ae.ZT)(Ct,Dt),Ct.prototype.isCanvas=function(){return!1},Ct.prototype.getBBox=function(){var ut=1/0,dt=-1/0,Yt=1/0,Ut=-1/0,Xt=this.getChildren().filter(function($){return $.get("visible")&&(!$.isGroup()||$.isGroup()&&$.getChildren().length>0)});return Xt.length>0?(0,ve.S6)(Xt,function($){var C=$.getBBox(),gt=C.minX,At=C.maxX,Kt=C.minY,oe=C.maxY;gtdt&&(dt=At),KtUt&&(Ut=oe)}):(ut=0,dt=0,Yt=0,Ut=0),{x:ut,y:Yt,minX:ut,minY:Yt,maxX:dt,maxY:Ut,width:dt-ut,height:Ut-Yt}},Ct.prototype.getCanvasBBox=function(){var ut=1/0,dt=-1/0,Yt=1/0,Ut=-1/0,Xt=this.getChildren().filter(function($){return $.get("visible")&&(!$.isGroup()||$.isGroup()&&$.getChildren().length>0)});return Xt.length>0?(0,ve.S6)(Xt,function($){var C=$.getCanvasBBox(),gt=C.minX,At=C.maxX,Kt=C.minY,oe=C.maxY;gtdt&&(dt=At),KtUt&&(Ut=oe)}):(ut=0,dt=0,Yt=0,Ut=0),{x:ut,y:Yt,minX:ut,minY:Yt,maxX:dt,maxY:Ut,width:dt-ut,height:Ut-Yt}},Ct.prototype.getDefaultCfg=function(){var ut=Dt.prototype.getDefaultCfg.call(this);return ut.children=[],ut},Ct.prototype.onAttrChange=function(ut,dt,Yt){if(Dt.prototype.onAttrChange.call(this,ut,dt,Yt),"matrix"===ut){var Ut=this.getTotalMatrix();this._applyChildrenMarix(Ut)}},Ct.prototype.applyMatrix=function(ut){var dt=this.getTotalMatrix();Dt.prototype.applyMatrix.call(this,ut);var Yt=this.getTotalMatrix();Yt!==dt&&this._applyChildrenMarix(Yt)},Ct.prototype._applyChildrenMarix=function(ut){var dt=this.getChildren();(0,ve.S6)(dt,function(Yt){Yt.applyMatrix(ut)})},Ct.prototype.addShape=function(){for(var ut=[],dt=0;dt=0;yt--){var $=ut[yt];if((0,ve.pP)($)&&($.isGroup()?Xt=$.getShape(dt,Yt,Ut):$.isHit(dt,Yt)&&(Xt=$)),Xt)break}return Xt},Ct.prototype.add=function(ut){var dt=this.getCanvas(),Yt=this.getChildren(),Ut=this.get("timeline"),Xt=ut.getParent();Xt&&function Vt(Dt,Ct,ut){void 0===ut&&(ut=!0),ut?Ct.destroy():(Ct.set("parent",null),Ct.set("canvas",null)),(0,ve.As)(Dt.getChildren(),Ct)}(Xt,ut,!1),ut.set("parent",this),dt&&zt(ut,dt),Ut&&Bt(ut,Ut),Yt.push(ut),ut.onCanvasChange("add"),this._applyElementMatrix(ut)},Ct.prototype._applyElementMatrix=function(ut){var dt=this.getTotalMatrix();dt&&ut.applyMatrix(dt)},Ct.prototype.getChildren=function(){return this.get("children")},Ct.prototype.sort=function(){var ut=this.getChildren();(0,ve.S6)(ut,function(dt,Yt){return dt[Qt]=Yt,dt}),ut.sort(function se(Dt){return function(Ct,ut){var dt=Dt(Ct,ut);return 0===dt?Ct[Qt]-ut[Qt]:dt}}(function(dt,Yt){return dt.get("zIndex")-Yt.get("zIndex")})),this.onCanvasChange("sort")},Ct.prototype.clear=function(){if(this.set("clearing",!0),!this.destroyed){for(var ut=this.getChildren(),dt=ut.length-1;dt>=0;dt--)ut[dt].destroy();this.set("children",[]),this.onCanvasChange("clear"),this.set("clearing",!1)}},Ct.prototype.destroy=function(){this.get("destroyed")||(this.clear(),Dt.prototype.destroy.call(this))},Ct.prototype.getFirst=function(){return this.getChildByIndex(0)},Ct.prototype.getLast=function(){var ut=this.getChildren();return this.getChildByIndex(ut.length-1)},Ct.prototype.getChildByIndex=function(ut){return this.getChildren()[ut]},Ct.prototype.getCount=function(){return this.getChildren().length},Ct.prototype.contain=function(ut){return this.getChildren().indexOf(ut)>-1},Ct.prototype.removeChild=function(ut,dt){void 0===dt&&(dt=!0),this.contain(ut)&&ut.remove(dt)},Ct.prototype.findAll=function(ut){var dt=[],Yt=this.getChildren();return(0,ve.S6)(Yt,function(Ut){ut(Ut)&&dt.push(Ut),Ut.isGroup()&&(dt=dt.concat(Ut.findAll(ut)))}),dt},Ct.prototype.find=function(ut){var dt=null,Yt=this.getChildren();return(0,ve.S6)(Yt,function(Ut){if(ut(Ut)?dt=Ut:Ut.isGroup()&&(dt=Ut.find(ut)),dt)return!1}),dt},Ct.prototype.findById=function(ut){return this.find(function(dt){return dt.get("id")===ut})},Ct.prototype.findByClassName=function(ut){return this.find(function(dt){return dt.get("className")===ut})},Ct.prototype.findAllByName=function(ut){return this.findAll(function(dt){return dt.get("name")===ut})},Ct}(Nt.Z)},1395:(rr,be,ct)=>{"use strict";ct.d(be,{Z:()=>Ut});var ae=ct(655),Nt=ct(8250),ve=ct(3882),Zt=ct(8126),Qt=ct(1415),zt=ct(9456),Bt=ve.vs,Mt="matrix",Vt=["zIndex","capture","visible","type"],se=["repeat"];function Ct(Xt,yt){var $={},C=yt.attrs;for(var gt in Xt)$[gt]=C[gt];return $}const Ut=function(Xt){function yt($){var C=Xt.call(this,$)||this;C.attrs={};var gt=C.getDefaultAttrs();return(0,Nt.CD)(gt,$.attrs),C.attrs=gt,C.initAttrs(gt),C.initAnimate(),C}return(0,ae.ZT)(yt,Xt),yt.prototype.getDefaultCfg=function(){return{visible:!0,capture:!0,zIndex:0}},yt.prototype.getDefaultAttrs=function(){return{matrix:this.getDefaultMatrix(),opacity:1}},yt.prototype.onCanvasChange=function($){},yt.prototype.initAttrs=function($){},yt.prototype.initAnimate=function(){this.set("animable",!0),this.set("animating",!1)},yt.prototype.isGroup=function(){return!1},yt.prototype.getParent=function(){return this.get("parent")},yt.prototype.getCanvas=function(){return this.get("canvas")},yt.prototype.attr=function(){for(var $,C=[],gt=0;gt0?At=function dt(Xt,yt){if(yt.onFrame)return Xt;var $=yt.startTime,C=yt.delay,gt=yt.duration,At=Object.prototype.hasOwnProperty;return(0,Nt.S6)(Xt,function(Kt){$+CKt.delay&&(0,Nt.S6)(yt.toAttrs,function(oe,Rt){At.call(Kt.toAttrs,Rt)&&(delete Kt.toAttrs[Rt],delete Kt.fromAttrs[Rt])})}),Xt}(At,W):gt.addAnimator(this),At.push(W),this.set("animations",At),this.set("_pause",{isPaused:!1})}},yt.prototype.stopAnimate=function($){var C=this;void 0===$&&($=!0);var gt=this.get("animations");(0,Nt.S6)(gt,function(At){$&&C.attr(At.onFrame?At.onFrame(1):At.toAttrs),At.callback&&At.callback()}),this.set("animating",!1),this.set("animations",[])},yt.prototype.pauseAnimate=function(){var $=this.get("timeline"),C=this.get("animations"),gt=$.getTime();return(0,Nt.S6)(C,function(At){At._paused=!0,At._pauseTime=gt,At.pauseCallback&&At.pauseCallback()}),this.set("_pause",{isPaused:!0,pauseTime:gt}),this},yt.prototype.resumeAnimate=function(){var C=this.get("timeline").getTime(),gt=this.get("animations"),At=this.get("_pause").pauseTime;return(0,Nt.S6)(gt,function(Kt){Kt.startTime=Kt.startTime+(C-At),Kt._paused=!1,Kt._pauseTime=null,Kt.resumeCallback&&Kt.resumeCallback()}),this.set("_pause",{isPaused:!1}),this.set("animations",gt),this},yt.prototype.emitDelegation=function($,C){var oe,gt=this,At=C.propagationPath;this.getEvents(),"mouseenter"===$?oe=C.fromShape:"mouseleave"===$&&(oe=C.toShape);for(var Rt=function(Jt){var kt=At[Jt],Q=kt.get("name");if(Q){if((kt.isGroup()||kt.isCanvas&&kt.isCanvas())&&oe&&(0,Zt.UY)(kt,oe))return"break";(0,Nt.kJ)(Q)?(0,Nt.S6)(Q,function(nt){gt.emitDelegateEvent(kt,nt,C)}):Ht.emitDelegateEvent(kt,Q,C)}},Ht=this,ye=0;ye{"use strict";ct.d(be,{Z:()=>Zt});var ae=ct(655);const Zt=function(Qt){function zt(){return null!==Qt&&Qt.apply(this,arguments)||this}return(0,ae.ZT)(zt,Qt),zt.prototype.isGroup=function(){return!0},zt.prototype.isEntityGroup=function(){return!1},zt.prototype.clone=function(){for(var Bt=Qt.prototype.clone.call(this),Mt=this.getChildren(),Vt=0;Vt{"use strict";ct.d(be,{Z:()=>Qt});var ae=ct(655),Nt=ct(1395),ve=ct(1415);const Qt=function(zt){function Bt(Mt){return zt.call(this,Mt)||this}return(0,ae.ZT)(Bt,zt),Bt.prototype._isInBBox=function(Mt,Vt){var se=this.getBBox();return se.minX<=Mt&&se.maxX>=Mt&&se.minY<=Vt&&se.maxY>=Vt},Bt.prototype.afterAttrsChange=function(Mt){zt.prototype.afterAttrsChange.call(this,Mt),this.clearCacheBBox()},Bt.prototype.getBBox=function(){var Mt=this.cfg.bbox;return Mt||(Mt=this.calculateBBox(),this.set("bbox",Mt)),Mt},Bt.prototype.getCanvasBBox=function(){var Mt=this.cfg.canvasBBox;return Mt||(Mt=this.calculateCanvasBBox(),this.set("canvasBBox",Mt)),Mt},Bt.prototype.applyMatrix=function(Mt){zt.prototype.applyMatrix.call(this,Mt),this.set("canvasBBox",null)},Bt.prototype.calculateCanvasBBox=function(){var Mt=this.getBBox(),Vt=this.getTotalMatrix(),se=Mt.minX,ne=Mt.minY,me=Mt.maxX,Dt=Mt.maxY;if(Vt){var Ct=(0,ve.rG)(Vt,[Mt.minX,Mt.minY]),ut=(0,ve.rG)(Vt,[Mt.maxX,Mt.minY]),dt=(0,ve.rG)(Vt,[Mt.minX,Mt.maxY]),Yt=(0,ve.rG)(Vt,[Mt.maxX,Mt.maxY]);se=Math.min(Ct[0],ut[0],dt[0],Yt[0]),me=Math.max(Ct[0],ut[0],dt[0],Yt[0]),ne=Math.min(Ct[1],ut[1],dt[1],Yt[1]),Dt=Math.max(Ct[1],ut[1],dt[1],Yt[1])}var Ut=this.attrs;if(Ut.shadowColor){var Xt=Ut.shadowBlur,yt=void 0===Xt?0:Xt,$=Ut.shadowOffsetX,C=void 0===$?0:$,gt=Ut.shadowOffsetY,At=void 0===gt?0:gt,oe=me+yt+C,Rt=ne-yt+At,Ht=Dt+yt+At;se=Math.min(se,se-yt+C),me=Math.max(me,oe),ne=Math.min(ne,Rt),Dt=Math.max(Dt,Ht)}return{x:se,y:ne,minX:se,minY:ne,maxX:me,maxY:Dt,width:me-se,height:Dt-ne}},Bt.prototype.clearCacheBBox=function(){this.set("bbox",null),this.set("canvasBBox",null)},Bt.prototype.isClipShape=function(){return this.get("isClipShape")},Bt.prototype.isInShape=function(Mt,Vt){return!1},Bt.prototype.isOnlyHitBox=function(){return!1},Bt.prototype.isHit=function(Mt,Vt){var se=this.get("startArrowShape"),ne=this.get("endArrowShape"),me=[Mt,Vt,1],Dt=(me=this.invertFromMatrix(me))[0],Ct=me[1],ut=this._isInBBox(Dt,Ct);return this.isOnlyHitBox()?ut:!(!ut||this.isClipped(Dt,Ct)||!(this.isInShape(Dt,Ct)||se&&se.isHit(Dt,Ct)||ne&&ne.isHit(Dt,Ct)))},Bt}(Nt.Z)},2021:(rr,be,ct)=>{"use strict";ct.d(be,{C:()=>Zt,_:()=>ve});var ae=ct(6399),Nt={};function ve(Qt){return Nt[Qt.toLowerCase()]||ae[Qt]}function Zt(Qt,zt){Nt[Qt.toLowerCase()]=zt}},4860:(rr,be,ct)=>{"use strict";ct.d(be,{b:()=>ve,W:()=>Nt});var ae=new Map;function Nt(yt,$){ae.set(yt,$)}function ve(yt){return ae.get(yt)}function Zt(yt){var $=yt.attr();return{x:$.x,y:$.y,width:$.width,height:$.height}}function Qt(yt){var $=yt.attr(),At=$.r;return{x:$.x-At,y:$.y-At,width:2*At,height:2*At}}var zt=ct(9174);function Bt(yt,$){return yt&&$?{minX:Math.min(yt.minX,$.minX),minY:Math.min(yt.minY,$.minY),maxX:Math.max(yt.maxX,$.maxX),maxY:Math.max(yt.maxY,$.maxY)}:yt||$}function Mt(yt,$){var C=yt.get("startArrowShape"),gt=yt.get("endArrowShape");return C&&($=Bt($,C.getCanvasBBox())),gt&&($=Bt($,gt.getCanvasBBox())),$}var ne=ct(321),Dt=ct(2759),Ct=ct(8250);function dt(yt,$){var C=yt.prePoint,gt=yt.currentPoint,At=yt.nextPoint,Kt=Math.pow(gt[0]-C[0],2)+Math.pow(gt[1]-C[1],2),oe=Math.pow(gt[0]-At[0],2)+Math.pow(gt[1]-At[1],2),Rt=Math.pow(C[0]-At[0],2)+Math.pow(C[1]-At[1],2),Ht=Math.acos((Kt+oe-Rt)/(2*Math.sqrt(Kt)*Math.sqrt(oe)));if(!Ht||0===Math.sin(Ht)||(0,Ct.vQ)(Ht,0))return{xExtra:0,yExtra:0};var ye=Math.abs(Math.atan2(At[1]-gt[1],At[0]-gt[0])),qt=Math.abs(Math.atan2(At[0]-gt[0],At[1]-gt[1]));return ye=ye>Math.PI/2?Math.PI-ye:ye,qt=qt>Math.PI/2?Math.PI-qt:qt,{xExtra:Math.cos(Ht/2-ye)*($/2*(1/Math.sin(Ht/2)))-$/2||0,yExtra:Math.cos(qt-Ht/2)*($/2*(1/Math.sin(Ht/2)))-$/2||0}}Nt("rect",Zt),Nt("image",Zt),Nt("circle",Qt),Nt("marker",Qt),Nt("polyline",function Vt(yt){for(var C=yt.attr().points,gt=[],At=[],Kt=0;Kt{"use strict";ct.d(be,{Z:()=>Nt});const Nt=function(){function ve(Zt,Qt){this.bubbles=!0,this.target=null,this.currentTarget=null,this.delegateTarget=null,this.delegateObject=null,this.defaultPrevented=!1,this.propagationStopped=!1,this.shape=null,this.fromShape=null,this.toShape=null,this.propagationPath=[],this.type=Zt,this.name=Zt,this.originalEvent=Qt,this.timeStamp=Qt.timeStamp}return ve.prototype.preventDefault=function(){this.defaultPrevented=!0,this.originalEvent.preventDefault&&this.originalEvent.preventDefault()},ve.prototype.stopPropagation=function(){this.propagationStopped=!0},ve.prototype.toString=function(){return"[Event (type="+this.type+")]"},ve.prototype.save=function(){},ve.prototype.restore=function(){},ve}()},2185:(rr,be,ct)=>{"use strict";ct.r(be),ct.d(be,{AbstractCanvas:()=>Vt.Z,AbstractGroup:()=>se.Z,AbstractShape:()=>ne.Z,Base:()=>Mt.Z,Event:()=>Bt.Z,PathUtil:()=>ae,assembleFont:()=>Dt.$O,getBBoxMethod:()=>me.b,getOffScreenContext:()=>dt.L,getTextHeight:()=>Dt.FE,invert:()=>ut.U_,isAllowCapture:()=>Ct.pP,multiplyVec2:()=>ut.rG,registerBBox:()=>me.W,registerEasing:()=>Yt.C,version:()=>Ut});var ae=ct(8145),Nt=ct(5511),zt={};for(const Xt in Nt)["default","Event","Base","AbstractCanvas","AbstractGroup","AbstractShape","PathUtil","getBBoxMethod","registerBBox","getTextHeight","assembleFont","isAllowCapture","multiplyVec2","invert","getOffScreenContext","registerEasing","version"].indexOf(Xt)<0&&(zt[Xt]=()=>Nt[Xt]);ct.d(be,zt);var Zt=ct(5799);zt={};for(const Xt in Zt)["default","Event","Base","AbstractCanvas","AbstractGroup","AbstractShape","PathUtil","getBBoxMethod","registerBBox","getTextHeight","assembleFont","isAllowCapture","multiplyVec2","invert","getOffScreenContext","registerEasing","version"].indexOf(Xt)<0&&(zt[Xt]=()=>Zt[Xt]);ct.d(be,zt);var Bt=ct(8833),Mt=ct(9456),Vt=ct(4967),se=ct(7424),ne=ct(837),me=ct(4860),Dt=ct(321),Ct=ct(8126),ut=ct(1415),dt=ct(4085),Yt=ct(2021),Ut="0.5.11"},5799:()=>{},5511:()=>{},1415:(rr,be,ct)=>{"use strict";function ae(Zt,Qt){var zt=[],Bt=Zt[0],Mt=Zt[1],Vt=Zt[2],se=Zt[3],ne=Zt[4],me=Zt[5],Dt=Zt[6],Ct=Zt[7],ut=Zt[8],dt=Qt[0],Yt=Qt[1],Ut=Qt[2],Xt=Qt[3],yt=Qt[4],$=Qt[5],C=Qt[6],gt=Qt[7],At=Qt[8];return zt[0]=dt*Bt+Yt*se+Ut*Dt,zt[1]=dt*Mt+Yt*ne+Ut*Ct,zt[2]=dt*Vt+Yt*me+Ut*ut,zt[3]=Xt*Bt+yt*se+$*Dt,zt[4]=Xt*Mt+yt*ne+$*Ct,zt[5]=Xt*Vt+yt*me+$*ut,zt[6]=C*Bt+gt*se+At*Dt,zt[7]=C*Mt+gt*ne+At*Ct,zt[8]=C*Vt+gt*me+At*ut,zt}function Nt(Zt,Qt){var zt=[],Bt=Qt[0],Mt=Qt[1];return zt[0]=Zt[0]*Bt+Zt[3]*Mt+Zt[6],zt[1]=Zt[1]*Bt+Zt[4]*Mt+Zt[7],zt}function ve(Zt){var Qt=[],zt=Zt[0],Bt=Zt[1],Mt=Zt[2],Vt=Zt[3],se=Zt[4],ne=Zt[5],me=Zt[6],Dt=Zt[7],Ct=Zt[8],ut=Ct*se-ne*Dt,dt=-Ct*Vt+ne*me,Yt=Dt*Vt-se*me,Ut=zt*ut+Bt*dt+Mt*Yt;return Ut?(Qt[0]=ut*(Ut=1/Ut),Qt[1]=(-Ct*Bt+Mt*Dt)*Ut,Qt[2]=(ne*Bt-Mt*se)*Ut,Qt[3]=dt*Ut,Qt[4]=(Ct*zt-Mt*me)*Ut,Qt[5]=(-ne*zt+Mt*Vt)*Ut,Qt[6]=Yt*Ut,Qt[7]=(-Dt*zt+Bt*me)*Ut,Qt[8]=(se*zt-Bt*Vt)*Ut,Qt):null}ct.d(be,{U_:()=>ve,rG:()=>Nt,xq:()=>ae})},4085:(rr,be,ct)=>{"use strict";ct.d(be,{L:()=>Nt});var ae=null;function Nt(){if(!ae){var ve=document.createElement("canvas");ve.width=1,ve.height=1,ae=ve.getContext("2d")}return ae}},8145:(rr,be,ct)=>{"use strict";ct.r(be),ct.d(be,{catmullRomToBezier:()=>zt,fillPath:()=>Jt,fillPathByDiff:()=>Et,formatPath:()=>Fe,intersection:()=>Rt,parsePathArray:()=>Ct,parsePathString:()=>Qt,pathToAbsolute:()=>Mt,pathToCurve:()=>me,rectPath:()=>yt});var ae=ct(8250),Nt="\t\n\v\f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029",ve=new RegExp("([a-z])["+Nt+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+Nt+"]*,?["+Nt+"]*)+)","ig"),Zt=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+Nt+"]*,?["+Nt+"]*","ig"),Qt=function(W){if(!W)return null;if((0,ae.kJ)(W))return W;var K={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},J=[];return String(W).replace(ve,function(U,vt,mt){var j=[],rt=vt.toLowerCase();if(mt.replace(Zt,function(P,Z){Z&&j.push(+Z)}),"m"===rt&&j.length>2&&(J.push([vt].concat(j.splice(0,2))),rt="l",vt="m"===vt?"l":"L"),"o"===rt&&1===j.length&&J.push([vt,j[0]]),"r"===rt)J.push([vt].concat(j));else for(;j.length>=K[rt]&&(J.push([vt].concat(j.splice(0,K[rt]))),K[rt]););return W}),J},zt=function(W,K){for(var J=[],U=0,vt=W.length;vt-2*!K>U;U+=2){var mt=[{x:+W[U-2],y:+W[U-1]},{x:+W[U],y:+W[U+1]},{x:+W[U+2],y:+W[U+3]},{x:+W[U+4],y:+W[U+5]}];K?U?vt-4===U?mt[3]={x:+W[0],y:+W[1]}:vt-2===U&&(mt[2]={x:+W[0],y:+W[1]},mt[3]={x:+W[2],y:+W[3]}):mt[0]={x:+W[vt-2],y:+W[vt-1]}:vt-4===U?mt[3]=mt[2]:U||(mt[0]={x:+W[U],y:+W[U+1]}),J.push(["C",(6*mt[1].x-mt[0].x+mt[2].x)/6,(6*mt[1].y-mt[0].y+mt[2].y)/6,(mt[1].x+6*mt[2].x-mt[3].x)/6,(mt[1].y+6*mt[2].y-mt[3].y)/6,mt[2].x,mt[2].y])}return J},Bt=function(W,K,J,U,vt){var mt=[];if(null===vt&&null===U&&(U=J),W=+W,K=+K,J=+J,U=+U,null!==vt){var j=Math.PI/180,rt=W+J*Math.cos(-U*j),P=W+J*Math.cos(-vt*j);mt=[["M",rt,K+J*Math.sin(-U*j)],["A",J,J,0,+(vt-U>180),0,P,K+J*Math.sin(-vt*j)]]}else mt=[["M",W,K],["m",0,-U],["a",J,U,0,1,1,0,2*U],["a",J,U,0,1,1,0,-2*U],["z"]];return mt},Mt=function(W){if(!(W=Qt(W))||!W.length)return[["M",0,0]];var rt,P,K=[],J=0,U=0,vt=0,mt=0,j=0;"M"===W[0][0]&&(vt=J=+W[0][1],mt=U=+W[0][2],j++,K[0]=["M",J,U]);for(var Z=3===W.length&&"M"===W[0][0]&&"R"===W[1][0].toUpperCase()&&"Z"===W[2][0].toUpperCase(),q=void 0,at=void 0,Tt=j,Lt=W.length;Tt1&&(J*=R=Math.sqrt(R),U*=R);var N=J*J,V=U*U,lt=(mt===j?-1:1)*Math.sqrt(Math.abs((N*V-N*z*z-V*it*it)/(N*z*z+V*it*it)));Ce=lt*J*z/U+(W+rt)/2,we=lt*-U*it/J+(K+P)/2,bt=Math.asin(((K-we)/U).toFixed(9)),re=Math.asin(((P-we)/U).toFixed(9)),bt=Wre&&(bt-=2*Math.PI),!j&&re>bt&&(re-=2*Math.PI)}var _t=re-bt;if(Math.abs(_t)>q){var St=re,Gt=rt,ee=P;re=bt+q*(j&&re>bt?1:-1),rt=Ce+J*Math.cos(re),P=we+U*Math.sin(re),Tt=ne(rt,P,J,U,vt,0,j,Gt,ee,[re,St,Ce,we])}_t=re-bt;var ie=Math.cos(bt),Ee=Math.sin(bt),Te=Math.cos(re),He=Math.sin(re),Xe=Math.tan(_t/4),ke=4/3*J*Xe,qe=4/3*U*Xe,Qe=[W,K],er=[W+ke*Ee,K-qe*ie],Ye=[rt+ke*He,P-qe*Te],sr=[rt,P];if(er[0]=2*Qe[0]-er[0],er[1]=2*Qe[1]-er[1],Z)return[er,Ye,sr].concat(Tt);for(var _r=[],lr=0,Sr=(Tt=[er,Ye,sr].concat(Tt).join().split(",")).length;lr7){it[z].shift();for(var R=it[z];R.length;)j[z]="A",U&&(rt[z]="A"),it.splice(z++,0,["C"].concat(R.splice(0,6)));it.splice(z,1),q=Math.max(J.length,U&&U.length||0)}},Lt=function(it,z,R,N,V){it&&z&&"M"===it[V][0]&&"M"!==z[V][0]&&(z.splice(V,0,["M",N.x,N.y]),R.bx=0,R.by=0,R.x=it[V][1],R.y=it[V][2],q=Math.max(J.length,U&&U.length||0))};q=Math.max(J.length,U&&U.length||0);for(var bt=0;bt1?1:P<0?0:P)/2,at=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],Tt=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],Lt=0,bt=0;bt<12;bt++){var re=Z*at[bt]+Z,Ce=ut(re,W,J,vt,j),we=ut(re,K,U,mt,rt);Lt+=Tt[bt]*Math.sqrt(Ce*Ce+we*we)}return Z*Lt},Yt=function(W,K,J,U,vt,mt,j,rt){for(var q,at,Tt,Lt,P=[],Z=[[],[]],bt=0;bt<2;++bt)if(0===bt?(at=6*W-12*J+6*vt,q=-3*W+9*J-9*vt+3*j,Tt=3*J-3*W):(at=6*K-12*U+6*mt,q=-3*K+9*U-9*mt+3*rt,Tt=3*U-3*K),Math.abs(q)<1e-12){if(Math.abs(at)<1e-12)continue;(Lt=-Tt/at)>0&&Lt<1&&P.push(Lt)}else{var re=at*at-4*Tt*q,Ce=Math.sqrt(re);if(!(re<0)){var we=(-at+Ce)/(2*q);we>0&&we<1&&P.push(we);var Re=(-at-Ce)/(2*q);Re>0&&Re<1&&P.push(Re)}}for(var R,it=P.length,z=it;it--;)Z[0][it]=(R=1-(Lt=P[it]))*R*R*W+3*R*R*Lt*J+3*R*Lt*Lt*vt+Lt*Lt*Lt*j,Z[1][it]=R*R*R*K+3*R*R*Lt*U+3*R*Lt*Lt*mt+Lt*Lt*Lt*rt;return Z[0][z]=W,Z[1][z]=K,Z[0][z+1]=j,Z[1][z+1]=rt,Z[0].length=Z[1].length=z+2,{min:{x:Math.min.apply(0,Z[0]),y:Math.min.apply(0,Z[1])},max:{x:Math.max.apply(0,Z[0]),y:Math.max.apply(0,Z[1])}}},Ut=function(W,K,J,U,vt,mt,j,rt){if(!(Math.max(W,J)Math.max(vt,j)||Math.max(K,U)Math.max(mt,rt))){var q=(W-J)*(mt-rt)-(K-U)*(vt-j);if(q){var at=((W*U-K*J)*(vt-j)-(W-J)*(vt*rt-mt*j))/q,Tt=((W*U-K*J)*(mt-rt)-(K-U)*(vt*rt-mt*j))/q,Lt=+at.toFixed(2),bt=+Tt.toFixed(2);if(!(Lt<+Math.min(W,J).toFixed(2)||Lt>+Math.max(W,J).toFixed(2)||Lt<+Math.min(vt,j).toFixed(2)||Lt>+Math.max(vt,j).toFixed(2)||bt<+Math.min(K,U).toFixed(2)||bt>+Math.max(K,U).toFixed(2)||bt<+Math.min(mt,rt).toFixed(2)||bt>+Math.max(mt,rt).toFixed(2)))return{x:at,y:Tt}}}},Xt=function(W,K,J){return K>=W.x&&K<=W.x+W.width&&J>=W.y&&J<=W.y+W.height},yt=function(W,K,J,U,vt){if(vt)return[["M",+W+ +vt,K],["l",J-2*vt,0],["a",vt,vt,0,0,1,vt,vt],["l",0,U-2*vt],["a",vt,vt,0,0,1,-vt,vt],["l",2*vt-J,0],["a",vt,vt,0,0,1,-vt,-vt],["l",0,2*vt-U],["a",vt,vt,0,0,1,vt,-vt],["z"]];var mt=[["M",W,K],["l",J,0],["l",0,U],["l",-J,0],["z"]];return mt.parsePathArray=Ct,mt},$=function(W,K,J,U){return null===W&&(W=K=J=U=0),null===K&&(K=W.y,J=W.width,U=W.height,W=W.x),{x:W,y:K,width:J,w:J,height:U,h:U,x2:W+J,y2:K+U,cx:W+J/2,cy:K+U/2,r1:Math.min(J,U)/2,r2:Math.max(J,U)/2,r0:Math.sqrt(J*J+U*U)/2,path:yt(W,K,J,U),vb:[W,K,J,U].join(" ")}},gt=function(W,K,J,U,vt,mt,j,rt){(0,ae.kJ)(W)||(W=[W,K,J,U,vt,mt,j,rt]);var P=Yt.apply(null,W);return $(P.min.x,P.min.y,P.max.x-P.min.x,P.max.y-P.min.y)},At=function(W,K,J,U,vt,mt,j,rt,P){var Z=1-P,q=Math.pow(Z,3),at=Math.pow(Z,2),Tt=P*P,Lt=Tt*P,Ce=W+2*P*(J-W)+Tt*(vt-2*J+W),we=K+2*P*(U-K)+Tt*(mt-2*U+K),Re=J+2*P*(vt-J)+Tt*(j-2*vt+J),it=U+2*P*(mt-U)+Tt*(rt-2*mt+U);return{x:q*W+3*at*P*J+3*Z*P*P*vt+Lt*j,y:q*K+3*at*P*U+3*Z*P*P*mt+Lt*rt,m:{x:Ce,y:we},n:{x:Re,y:it},start:{x:Z*W+P*J,y:Z*K+P*U},end:{x:Z*vt+P*j,y:Z*mt+P*rt},alpha:90-180*Math.atan2(Ce-Re,we-it)/Math.PI}},Kt=function(W,K,J){if(!function(W,K){return W=$(W),K=$(K),Xt(K,W.x,W.y)||Xt(K,W.x2,W.y)||Xt(K,W.x,W.y2)||Xt(K,W.x2,W.y2)||Xt(W,K.x,K.y)||Xt(W,K.x2,K.y)||Xt(W,K.x,K.y2)||Xt(W,K.x2,K.y2)||(W.xK.x||K.xW.x)&&(W.yK.y||K.yW.y)}(gt(W),gt(K)))return J?0:[];for(var rt=~~(dt.apply(0,W)/8),P=~~(dt.apply(0,K)/8),Z=[],q=[],at={},Tt=J?0:[],Lt=0;Lt=0&&V<=1&<>=0&<<=1&&(J?Tt+=1:Tt.push({x:N.x,y:N.y,t1:V,t2:lt}))}}return Tt},Rt=function(W,K){return function(W,K,J){W=me(W),K=me(K);for(var U,vt,mt,j,rt,P,Z,q,at,Tt,Lt=[],bt=0,re=W.length;bt=3&&(3===at.length&&Tt.push("Q"),Tt=Tt.concat(at[1])),2===at.length&&Tt.push("L"),Tt.concat(at[at.length-1])})}(W,K,J));else{var vt=[].concat(W);"M"===vt[0]&&(vt[0]="L");for(var mt=0;mt<=J-1;mt++)U.push(vt)}return U}(W[at],W[at+1],q))},[]);return P.unshift(W[0]),("Z"===K[U]||"z"===K[U])&&P.push("Z"),P},kt=function(W,K){if(W.length!==K.length)return!1;var J=!0;return(0,ae.S6)(W,function(U,vt){if(U!==K[vt])return J=!1,!1}),J};function Q(W,K,J){var U=null,vt=J;return K=0;P--)j=mt[P].index,"add"===mt[P].type?W.splice(j,0,[].concat(W[j])):W.splice(j,1)}var at=vt-(U=W.length);if(U0)){W[U]=K[U];break}J=te(J,W[U-1],1)}W[U]=["Q"].concat(J.reduce(function(vt,mt){return vt.concat(mt)},[]));break;case"T":W[U]=["T"].concat(J[0]);break;case"C":if(J.length<3){if(!(U>0)){W[U]=K[U];break}J=te(J,W[U-1],2)}W[U]=["C"].concat(J.reduce(function(vt,mt){return vt.concat(mt)},[]));break;case"S":if(J.length<2){if(!(U>0)){W[U]=K[U];break}J=te(J,W[U-1],1)}W[U]=["S"].concat(J.reduce(function(vt,mt){return vt.concat(mt)},[]));break;default:W[U]=K[U]}return W}},321:(rr,be,ct)=>{"use strict";ct.d(be,{$O:()=>zt,FE:()=>ve,mY:()=>Qt});var ae=ct(8126),Nt=ct(4085);function ve(Bt,Mt,Vt){var se=1;if((0,ae.HD)(Bt)&&(se=Bt.split("\n").length),se>1){var ne=function Zt(Bt,Mt){return Mt?Mt-Bt:.14*Bt}(Mt,Vt);return Mt*se+ne*(se-1)}return Mt}function Qt(Bt,Mt){var Vt=(0,Nt.L)(),se=0;if((0,ae.kK)(Bt)||""===Bt)return se;if(Vt.save(),Vt.font=Mt,(0,ae.HD)(Bt)&&Bt.includes("\n")){var ne=Bt.split("\n");(0,ae.S6)(ne,function(me){var Dt=Vt.measureText(me).width;se{"use strict";ct.d(be,{As:()=>Nt,CD:()=>ae.CD,HD:()=>ae.HD,Kn:()=>ae.Kn,S6:()=>ae.S6,UY:()=>Zt,jC:()=>ae.jC,jU:()=>ve,kK:()=>ae.UM,mf:()=>ae.mf,pP:()=>Qt});var ae=ct(8250);function Nt(zt,Bt){var Mt=zt.indexOf(Bt);-1!==Mt&&zt.splice(Mt,1)}var ve=typeof window<"u"&&typeof window.document<"u";function Zt(zt,Bt){if(zt.isCanvas())return!0;for(var Mt=Bt.getParent(),Vt=!1;Mt;){if(Mt===zt){Vt=!0;break}Mt=Mt.getParent()}return Vt}function Qt(zt){return zt.cfg.visible&&zt.cfg.capture}},9174:(rr,be,ct)=>{"use strict";ct.d(be,{wN:()=>te,Ll:()=>At,x1:()=>Vt,aH:()=>U,lD:()=>Ut,Zr:()=>ae});var ae={};ct.r(ae),ct.d(ae,{distance:()=>ve,getBBoxByArray:()=>Qt,getBBoxRange:()=>zt,isNumberEqual:()=>Zt,piMod:()=>Bt});var Nt=ct(8250);function ve(j,rt,P,Z){var q=j-P,at=rt-Z;return Math.sqrt(q*q+at*at)}function Zt(j,rt){return Math.abs(j-rt)<.001}function Qt(j,rt){var P=(0,Nt.VV)(j),Z=(0,Nt.VV)(rt);return{x:P,y:Z,width:(0,Nt.Fp)(j)-P,height:(0,Nt.Fp)(rt)-Z}}function zt(j,rt,P,Z){return{minX:(0,Nt.VV)([j,P]),maxX:(0,Nt.Fp)([j,P]),minY:(0,Nt.VV)([rt,Z]),maxY:(0,Nt.Fp)([rt,Z])}}function Bt(j){return(j+2*Math.PI)%(2*Math.PI)}var Mt=ct(8235);const Vt={box:function(j,rt,P,Z){return Qt([j,P],[rt,Z])},length:function(j,rt,P,Z){return ve(j,rt,P,Z)},pointAt:function(j,rt,P,Z,q){return{x:(1-q)*j+q*P,y:(1-q)*rt+q*Z}},pointDistance:function(j,rt,P,Z,q,at){var Tt=(P-j)*(q-j)+(Z-rt)*(at-rt);return Tt<0?ve(j,rt,q,at):Tt>(P-j)*(P-j)+(Z-rt)*(Z-rt)?ve(P,Z,q,at):this.pointToLine(j,rt,P,Z,q,at)},pointToLine:function(j,rt,P,Z,q,at){var Tt=[P-j,Z-rt];if(Mt.I6(Tt,[0,0]))return Math.sqrt((q-j)*(q-j)+(at-rt)*(at-rt));var Lt=[-Tt[1],Tt[0]];return Mt.Fv(Lt,Lt),Math.abs(Mt.AK([q-j,at-rt],Lt))},tangentAngle:function(j,rt,P,Z){return Math.atan2(Z-rt,P-j)}};var se=1e-4;function ne(j,rt,P,Z,q,at){var Tt,Lt=1/0,bt=[P,Z],re=20;at&&at>200&&(re=at/10);for(var Ce=1/re,we=Ce/10,Re=0;Re<=re;Re++){var it=Re*Ce,z=[q.apply(null,j.concat([it])),q.apply(null,rt.concat([it]))];(R=ve(bt[0],bt[1],z[0],z[1]))=0&&R=0?[q]:[]}function ut(j,rt,P,Z){return 2*(1-Z)*(rt-j)+2*Z*(P-rt)}function dt(j,rt,P,Z,q,at,Tt){var Lt=Dt(j,P,q,Tt),bt=Dt(rt,Z,at,Tt),re=Vt.pointAt(j,rt,P,Z,Tt),Ce=Vt.pointAt(P,Z,q,at,Tt);return[[j,rt,re.x,re.y,Lt,bt],[Lt,bt,Ce.x,Ce.y,q,at]]}function Yt(j,rt,P,Z,q,at,Tt){if(0===Tt)return(ve(j,rt,P,Z)+ve(P,Z,q,at)+ve(j,rt,q,at))/2;var Lt=dt(j,rt,P,Z,q,at,.5),bt=Lt[0],re=Lt[1];return bt.push(Tt-1),re.push(Tt-1),Yt.apply(null,bt)+Yt.apply(null,re)}const Ut={box:function(j,rt,P,Z,q,at){var Tt=Ct(j,P,q)[0],Lt=Ct(rt,Z,at)[0],bt=[j,q],re=[rt,at];return void 0!==Tt&&bt.push(Dt(j,P,q,Tt)),void 0!==Lt&&re.push(Dt(rt,Z,at,Lt)),Qt(bt,re)},length:function(j,rt,P,Z,q,at){return Yt(j,rt,P,Z,q,at,3)},nearestPoint:function(j,rt,P,Z,q,at,Tt,Lt){return ne([j,P,q],[rt,Z,at],Tt,Lt,Dt)},pointDistance:function(j,rt,P,Z,q,at,Tt,Lt){var bt=this.nearestPoint(j,rt,P,Z,q,at,Tt,Lt);return ve(bt.x,bt.y,Tt,Lt)},interpolationAt:Dt,pointAt:function(j,rt,P,Z,q,at,Tt){return{x:Dt(j,P,q,Tt),y:Dt(rt,Z,at,Tt)}},divide:function(j,rt,P,Z,q,at,Tt){return dt(j,rt,P,Z,q,at,Tt)},tangentAngle:function(j,rt,P,Z,q,at,Tt){var Lt=ut(j,P,q,Tt),bt=ut(rt,Z,at,Tt);return Bt(Math.atan2(bt,Lt))}};function Xt(j,rt,P,Z,q){var at=1-q;return at*at*at*j+3*rt*q*at*at+3*P*q*q*at+Z*q*q*q}function yt(j,rt,P,Z,q){var at=1-q;return 3*(at*at*(rt-j)+2*at*q*(P-rt)+q*q*(Z-P))}function $(j,rt,P,Z){var bt,re,Ce,q=-3*j+9*rt-9*P+3*Z,at=6*j-12*rt+6*P,Tt=3*rt-3*j,Lt=[];if(Zt(q,0))Zt(at,0)||(bt=-Tt/at)>=0&&bt<=1&&Lt.push(bt);else{var we=at*at-4*q*Tt;Zt(we,0)?Lt.push(-at/(2*q)):we>0&&(re=(-at-(Ce=Math.sqrt(we)))/(2*q),(bt=(-at+Ce)/(2*q))>=0&&bt<=1&&Lt.push(bt),re>=0&&re<=1&&Lt.push(re))}return Lt}function C(j,rt,P,Z,q,at,Tt,Lt,bt){var re=Xt(j,P,q,Tt,bt),Ce=Xt(rt,Z,at,Lt,bt),we=Vt.pointAt(j,rt,P,Z,bt),Re=Vt.pointAt(P,Z,q,at,bt),it=Vt.pointAt(q,at,Tt,Lt,bt),z=Vt.pointAt(we.x,we.y,Re.x,Re.y,bt),R=Vt.pointAt(Re.x,Re.y,it.x,it.y,bt);return[[j,rt,we.x,we.y,z.x,z.y,re,Ce],[re,Ce,R.x,R.y,it.x,it.y,Tt,Lt]]}function gt(j,rt,P,Z,q,at,Tt,Lt,bt){if(0===bt)return function me(j,rt){for(var P=0,Z=j.length,q=0;q0?P:-1*P}function Jt(j,rt,P,Z,q,at){return P*Math.cos(q)*Math.cos(at)-Z*Math.sin(q)*Math.sin(at)+j}function kt(j,rt,P,Z,q,at){return P*Math.sin(q)*Math.cos(at)+Z*Math.cos(q)*Math.sin(at)+rt}function nt(j,rt,P){return{x:j*Math.cos(P),y:rt*Math.sin(P)}}function Et(j,rt,P){var Z=Math.cos(P),q=Math.sin(P);return[j*Z-rt*q,j*q+rt*Z]}const te={box:function(j,rt,P,Z,q,at,Tt){for(var Lt=function ye(j,rt,P){return Math.atan(-rt/j*Math.tan(P))}(P,Z,q),bt=1/0,re=-1/0,Ce=[at,Tt],we=2*-Math.PI;we<=2*Math.PI;we+=Math.PI){var Re=Lt+we;atre&&(re=it)}var z=function qt(j,rt,P){return Math.atan(rt/(j*Math.tan(P)))}(P,Z,q),R=1/0,N=-1/0,V=[at,Tt];for(we=2*-Math.PI;we<=2*Math.PI;we+=Math.PI){var lt=z+we;atN&&(N=_t)}return{x:bt,y:R,width:re-bt,height:N-R}},length:function(j,rt,P,Z,q,at,Tt){},nearestPoint:function(j,rt,P,Z,q,at,Tt,Lt,bt){var re=Et(Lt-j,bt-rt,-q),Re=function(j,rt,P,Z,q,at){var Tt=P,Lt=Z;if(0===Tt||0===Lt)return{x:j,y:rt};for(var R,N,bt=q-j,re=at-rt,Ce=Math.abs(bt),we=Math.abs(re),Re=Tt*Tt,it=Lt*Lt,z=Math.PI/4,V=0;V<4;V++){R=Tt*Math.cos(z),N=Lt*Math.sin(z);var lt=(Re-it)*Math.pow(Math.cos(z),3)/Tt,_t=(it-Re)*Math.pow(Math.sin(z),3)/Lt,St=R-lt,Gt=N-_t,ee=Ce-lt,ie=we-_t,Ee=Math.hypot(Gt,St),Te=Math.hypot(ie,ee);z+=Ee*Math.asin((St*ie-Gt*ee)/(Ee*Te))/Math.sqrt(Re+it-R*R-N*N),z=Math.min(Math.PI/2,Math.max(0,z))}return{x:j+Kt(R,bt),y:rt+Kt(N,re)}}(0,0,P,Z,re[0],re[1]),it=function Q(j,rt,P,Z){return(Math.atan2(Z*j,P*rt)+2*Math.PI)%(2*Math.PI)}(P,Z,Re.x,Re.y);itTt&&(Re=nt(P,Z,Tt));var z=Et(Re.x,Re.y,q);return{x:z[0]+j,y:z[1]+rt}},pointDistance:function(j,rt,P,Z,q,at,Tt,Lt,bt){var re=this.nearestPoint(j,rt,P,Z,Lt,bt);return ve(re.x,re.y,Lt,bt)},pointAt:function(j,rt,P,Z,q,at,Tt,Lt){var bt=(Tt-at)*Lt+at;return{x:Jt(j,0,P,Z,q,bt),y:kt(0,rt,P,Z,q,bt)}},tangentAngle:function(j,rt,P,Z,q,at,Tt,Lt){var bt=(Tt-at)*Lt+at,re=function Rt(j,rt,P,Z,q,at,Tt,Lt){return-1*P*Math.cos(q)*Math.sin(Lt)-Z*Math.sin(q)*Math.cos(Lt)}(0,0,P,Z,q,0,0,bt),Ce=function Ht(j,rt,P,Z,q,at,Tt,Lt){return-1*P*Math.sin(q)*Math.sin(Lt)+Z*Math.cos(q)*Math.cos(Lt)}(0,0,P,Z,q,0,0,bt);return Bt(Math.atan2(Ce,re))}};function he(j){for(var rt=0,P=[],Z=0;Z1||rt<0||j.length<2)return null;var P=he(j),Z=P.segments,q=P.totalLength;if(0===q)return{x:j[0][0],y:j[0][1]};for(var at=0,Tt=null,Lt=0;Lt=at&&rt<=at+we){Tt=Vt.pointAt(re[0],re[1],Ce[0],Ce[1],(rt-at)/we);break}at+=we}return Tt}(j,rt)},pointDistance:function(j,rt,P){return function J(j,rt,P){for(var Z=1/0,q=0;q1||rt<0||j.length<2)return 0;for(var P=he(j),Z=P.segments,q=P.totalLength,at=0,Tt=0,Lt=0;Lt=at&&rt<=at+we){Tt=Math.atan2(Ce[1]-re[1],Ce[0]-re[0]);break}at+=we}return Tt}(j,rt)}}},1946:(rr,be,ct)=>{"use strict";ct.d(be,{Z:()=>Qt});var ae=ct(655),Nt=ct(378),ve=ct(6610);const Qt=function(zt){function Bt(Mt){var Vt=zt.call(this)||this;Vt.destroyed=!1;var se=Vt.getDefaultCfg();return Vt.cfg=(0,ve.CD)(se,Mt),Vt}return(0,ae.ZT)(Bt,zt),Bt.prototype.getDefaultCfg=function(){return{}},Bt.prototype.get=function(Mt){return this.cfg[Mt]},Bt.prototype.set=function(Mt,Vt){this.cfg[Mt]=Vt},Bt.prototype.destroy=function(){this.cfg={destroyed:!0},this.off(),this.destroyed=!0},Bt}(Nt.Z)},1512:(rr,be,ct)=>{"use strict";ct.d(be,{Z:()=>Re});var ae=ct(655),Nt=ct(2260),ve=ct(2573),Zt=ct(6610),Qt=ct(8250),zt=ct(9194),Bt=ct(4943);function Mt(it,z,R,N,V){var lt=it*it,_t=lt*it;return((1-3*it+3*lt-_t)*z+(4-6*lt+3*_t)*R+(1+3*it+3*lt-3*_t)*N+_t*V)/6}const ne=it=>()=>it;function dt(it,z){var R=z-it;return R?function me(it,z){return function(R){return it+R*z}}(it,R):ne(isNaN(it)?z:it)}const Yt=function it(z){var R=function ut(it){return 1==(it=+it)?dt:function(z,R){return R-z?function Dt(it,z,R){return it=Math.pow(it,R),z=Math.pow(z,R)-it,R=1/R,function(N){return Math.pow(it+N*z,R)}}(z,R,it):ne(isNaN(z)?R:z)}}(z);function N(V,lt){var _t=R((V=(0,Bt.B8)(V)).r,(lt=(0,Bt.B8)(lt)).r),St=R(V.g,lt.g),Gt=R(V.b,lt.b),ee=dt(V.opacity,lt.opacity);return function(ie){return V.r=_t(ie),V.g=St(ie),V.b=Gt(ie),V.opacity=ee(ie),V+""}}return N.gamma=it,N}(1);function Ut(it){return function(z){var _t,St,R=z.length,N=new Array(R),V=new Array(R),lt=new Array(R);for(_t=0;_t=1?(R=1,z-1):Math.floor(R*z),V=it[N],lt=it[N+1];return Mt((R-N/z)*z,N>0?it[N-1]:2*V-lt,V,lt,NR&&(lt=z.slice(R,lt),St[_t]?St[_t]+=lt:St[++_t]=lt),(N=N[0])===(V=V[0])?St[_t]?St[_t]+=V:St[++_t]=V:(St[++_t]=null,Gt.push({i:_t,x:oe(N,V)})),R=ye.lastIndex;return Ree.length?(Gt=Et.parsePathString(lt[St]),ee=Et.parsePathString(V[St]),ee=Et.fillPathByDiff(ee,Gt),ee=Et.formatPath(ee,Gt),z.fromAttrs.path=ee,z.toAttrs.path=Gt):z.pathFormatted||(Gt=Et.parsePathString(lt[St]),ee=Et.parsePathString(V[St]),ee=Et.formatPath(ee,Gt),z.fromAttrs.path=ee,z.toAttrs.path=Gt,z.pathFormatted=!0),N[St]=[];for(var ie=0;ie0){for(var St=z.animators.length-1;St>=0;St--)if((N=z.animators[St]).destroyed)z.removeAnimator(St);else{if(!N.isAnimatePaused())for(var Gt=(V=N.get("animations")).length-1;Gt>=0;Gt--)K(N,lt=V[Gt],_t)&&(V.splice(Gt,1),lt.callback&<.callback());0===V.length&&z.removeAnimator(St)}z.canvas.get("autoDraw")||z.canvas.draw()}})},it.prototype.addAnimator=function(z){this.animators.push(z)},it.prototype.removeAnimator=function(z){this.animators.splice(z,1)},it.prototype.isAnimating=function(){return!!this.animators.length},it.prototype.stop=function(){this.timer&&this.timer.stop()},it.prototype.stopAllAnimations=function(z){void 0===z&&(z=!0),this.animators.forEach(function(R){R.stopAnimate(z)}),this.animators=[],this.canvas.draw()},it.prototype.getTime=function(){return this.current},it}();var vt=ct(1069),P=["mousedown","mouseup","dblclick","mouseout","mouseover","mousemove","mouseleave","mouseenter","touchstart","touchmove","touchend","dragenter","dragover","dragleave","drop","contextmenu","mousewheel"];function q(it,z,R){R.name=z,R.target=it,R.currentTarget=it,R.delegateTarget=it,it.emit(z,R)}function at(it,z,R){if(R.bubbles){var N=void 0,V=!1;if("mouseenter"===z?(N=R.fromShape,V=!0):"mouseleave"===z&&(V=!0,N=R.toShape),it.isCanvas()&&V)return;if(N&&(0,Zt.UY)(it,N))return void(R.bubbles=!1);R.name=z,R.currentTarget=it,R.delegateTarget=it,it.emit(z,R)}}const Lt=function(){function it(z){var R=this;this.draggingShape=null,this.dragging=!1,this.currentShape=null,this.mousedownShape=null,this.mousedownPoint=null,this._eventCallback=function(N){R._triggerEvent(N.type,N)},this._onDocumentMove=function(N){if(R.canvas.get("el")!==N.target&&(R.dragging||R.currentShape)){var _t=R._getPointInfo(N);R.dragging&&R._emitEvent("drag",N,_t,R.draggingShape)}},this._onDocumentMouseUp=function(N){if(R.canvas.get("el")!==N.target&&R.dragging){var _t=R._getPointInfo(N);R.draggingShape&&R._emitEvent("drop",N,_t,null),R._emitEvent("dragend",N,_t,R.draggingShape),R._afterDrag(R.draggingShape,_t,N)}},this.canvas=z.canvas}return it.prototype.init=function(){this._bindEvents()},it.prototype._bindEvents=function(){var z=this,R=this.canvas.get("el");(0,Zt.S6)(P,function(N){R.addEventListener(N,z._eventCallback)}),document&&(document.addEventListener("mousemove",this._onDocumentMove),document.addEventListener("mouseup",this._onDocumentMouseUp))},it.prototype._clearEvents=function(){var z=this,R=this.canvas.get("el");(0,Zt.S6)(P,function(N){R.removeEventListener(N,z._eventCallback)}),document&&(document.removeEventListener("mousemove",this._onDocumentMove),document.removeEventListener("mouseup",this._onDocumentMouseUp))},it.prototype._getEventObj=function(z,R,N,V,lt,_t){var St=new vt.Z(z,R);return St.fromShape=lt,St.toShape=_t,St.x=N.x,St.y=N.y,St.clientX=N.clientX,St.clientY=N.clientY,St.propagationPath.push(V),St},it.prototype._getShape=function(z,R){return this.canvas.getShape(z.x,z.y,R)},it.prototype._getPointInfo=function(z){var R=this.canvas,N=R.getClientByEvent(z),V=R.getPointByEvent(z);return{x:V.x,y:V.y,clientX:N.x,clientY:N.y}},it.prototype._triggerEvent=function(z,R){var N=this._getPointInfo(R),V=this._getShape(N,R),lt=this["_on"+z],_t=!1;if(lt)lt.call(this,N,V,R);else{var St=this.currentShape;"mouseenter"===z||"dragenter"===z||"mouseover"===z?(this._emitEvent(z,R,N,null,null,V),V&&this._emitEvent(z,R,N,V,null,V),"mouseenter"===z&&this.draggingShape&&this._emitEvent("dragenter",R,N,null)):"mouseleave"===z||"dragleave"===z||"mouseout"===z?(_t=!0,St&&this._emitEvent(z,R,N,St,St,null),this._emitEvent(z,R,N,null,St,null),"mouseleave"===z&&this.draggingShape&&this._emitEvent("dragleave",R,N,null)):this._emitEvent(z,R,N,V,null,null)}if(_t||(this.currentShape=V),V&&!V.get("destroyed")){var Gt=this.canvas;Gt.get("el").style.cursor=V.attr("cursor")||Gt.get("cursor")}},it.prototype._onmousedown=function(z,R,N){0===N.button&&(this.mousedownShape=R,this.mousedownPoint=z,this.mousedownTimeStamp=N.timeStamp),this._emitEvent("mousedown",N,z,R,null,null)},it.prototype._emitMouseoverEvents=function(z,R,N,V){var lt=this.canvas.get("el");N!==V&&(N&&(this._emitEvent("mouseout",z,R,N,N,V),this._emitEvent("mouseleave",z,R,N,N,V),(!V||V.get("destroyed"))&&(lt.style.cursor=this.canvas.get("cursor"))),V&&(this._emitEvent("mouseover",z,R,V,N,V),this._emitEvent("mouseenter",z,R,V,N,V)))},it.prototype._emitDragoverEvents=function(z,R,N,V,lt){V?(V!==N&&(N&&this._emitEvent("dragleave",z,R,N,N,V),this._emitEvent("dragenter",z,R,V,N,V)),lt||this._emitEvent("dragover",z,R,V)):N&&this._emitEvent("dragleave",z,R,N,N,V),lt&&this._emitEvent("dragover",z,R,V)},it.prototype._afterDrag=function(z,R,N){z&&(z.set("capture",!0),this.draggingShape=null),this.dragging=!1;var V=this._getShape(R,N);V!==z&&this._emitMouseoverEvents(N,R,z,V),this.currentShape=V},it.prototype._onmouseup=function(z,R,N){if(0===N.button){var V=this.draggingShape;this.dragging?(V&&this._emitEvent("drop",N,z,R),this._emitEvent("dragend",N,z,V),this._afterDrag(V,z,N)):(this._emitEvent("mouseup",N,z,R),R===this.mousedownShape&&this._emitEvent("click",N,z,R),this.mousedownShape=null,this.mousedownPoint=null)}},it.prototype._ondragover=function(z,R,N){N.preventDefault(),this._emitDragoverEvents(N,z,this.currentShape,R,!0)},it.prototype._onmousemove=function(z,R,N){var V=this.canvas,lt=this.currentShape,_t=this.draggingShape;if(this.dragging)_t&&this._emitDragoverEvents(N,z,lt,R,!1),this._emitEvent("drag",N,z,_t);else{var St=this.mousedownPoint;if(St){var Gt=this.mousedownShape,Ee=St.clientX-z.clientX,Te=St.clientY-z.clientY;N.timeStamp-this.mousedownTimeStamp>120||Ee*Ee+Te*Te>40?Gt&&Gt.get("draggable")?((_t=this.mousedownShape).set("capture",!1),this.draggingShape=_t,this.dragging=!0,this._emitEvent("dragstart",N,z,_t),this.mousedownShape=null,this.mousedownPoint=null):!Gt&&V.get("draggable")?(this.dragging=!0,this._emitEvent("dragstart",N,z,null),this.mousedownShape=null,this.mousedownPoint=null):(this._emitMouseoverEvents(N,z,lt,R),this._emitEvent("mousemove",N,z,R)):(this._emitMouseoverEvents(N,z,lt,R),this._emitEvent("mousemove",N,z,R))}else this._emitMouseoverEvents(N,z,lt,R),this._emitEvent("mousemove",N,z,R)}},it.prototype._emitEvent=function(z,R,N,V,lt,_t){var St=this._getEventObj(z,R,N,V,lt,_t);if(V){St.shape=V,q(V,z,St);for(var Gt=V.getParent();Gt;)Gt.emitDelegation(z,St),St.propagationStopped||at(Gt,z,St),St.propagationPath.push(Gt),Gt=Gt.getParent()}else q(this.canvas,z,St)},it.prototype.destroy=function(){this._clearEvents(),this.canvas=null,this.currentShape=null,this.draggingShape=null,this.mousedownPoint=null,this.mousedownShape=null,this.mousedownTimeStamp=null},it}();var re=(0,Nt.qY)(),Ce=re&&"firefox"===re.name;const Re=function(it){function z(R){var N=it.call(this,R)||this;return N.initContainer(),N.initDom(),N.initEvents(),N.initTimeline(),N}return(0,ae.ZT)(z,it),z.prototype.getDefaultCfg=function(){var R=it.prototype.getDefaultCfg.call(this);return R.cursor="default",R.supportCSSTransform=!1,R},z.prototype.initContainer=function(){var R=this.get("container");(0,Zt.HD)(R)&&(R=document.getElementById(R),this.set("container",R))},z.prototype.initDom=function(){var R=this.createDom();this.set("el",R),this.get("container").appendChild(R),this.setDOMSize(this.get("width"),this.get("height"))},z.prototype.initEvents=function(){var R=new Lt({canvas:this});R.init(),this.set("eventController",R)},z.prototype.initTimeline=function(){var R=new U(this);this.set("timeline",R)},z.prototype.setDOMSize=function(R,N){var V=this.get("el");Zt.jU&&(V.style.width=R+"px",V.style.height=N+"px")},z.prototype.changeSize=function(R,N){this.setDOMSize(R,N),this.set("width",R),this.set("height",N),this.onCanvasChange("changeSize")},z.prototype.getRenderer=function(){return this.get("renderer")},z.prototype.getCursor=function(){return this.get("cursor")},z.prototype.setCursor=function(R){this.set("cursor",R);var N=this.get("el");Zt.jU&&N&&(N.style.cursor=R)},z.prototype.getPointByEvent=function(R){if(this.get("supportCSSTransform")){if(Ce&&!(0,Zt.kK)(R.layerX)&&R.layerX!==R.offsetX)return{x:R.layerX,y:R.layerY};if(!(0,Zt.kK)(R.offsetX))return{x:R.offsetX,y:R.offsetY}}var V=this.getClientByEvent(R);return this.getPointByClient(V.x,V.y)},z.prototype.getClientByEvent=function(R){var N=R;return R.touches&&(N="touchend"===R.type?R.changedTouches[0]:R.touches[0]),{x:N.clientX,y:N.clientY}},z.prototype.getPointByClient=function(R,N){var lt=this.get("el").getBoundingClientRect();return{x:R-lt.left,y:N-lt.top}},z.prototype.getClientByPoint=function(R,N){var lt=this.get("el").getBoundingClientRect();return{x:R+lt.left,y:N+lt.top}},z.prototype.draw=function(){},z.prototype.removeDom=function(){var R=this.get("el");R.parentNode.removeChild(R)},z.prototype.clearEvents=function(){this.get("eventController").destroy()},z.prototype.isCanvas=function(){return!0},z.prototype.getParent=function(){return null},z.prototype.destroy=function(){var R=this.get("timeline");this.get("destroyed")||(this.clear(),R&&R.stop(),this.clearEvents(),this.removeDom(),it.prototype.destroy.call(this))},z}(ve.Z)},2573:(rr,be,ct)=>{"use strict";ct.d(be,{Z:()=>me});var ae=ct(655),Nt=ct(2137),ve=ct(6610),Zt={},Qt="_INDEX";function zt(Dt,Ct){if(Dt.set("canvas",Ct),Dt.isGroup()){var ut=Dt.get("children");ut.length&&ut.forEach(function(dt){zt(dt,Ct)})}}function Bt(Dt,Ct){if(Dt.set("timeline",Ct),Dt.isGroup()){var ut=Dt.get("children");ut.length&&ut.forEach(function(dt){Bt(dt,Ct)})}}const me=function(Dt){function Ct(){return null!==Dt&&Dt.apply(this,arguments)||this}return(0,ae.ZT)(Ct,Dt),Ct.prototype.isCanvas=function(){return!1},Ct.prototype.getBBox=function(){var ut=1/0,dt=-1/0,Yt=1/0,Ut=-1/0,Xt=this.getChildren().filter(function($){return $.get("visible")&&(!$.isGroup()||$.isGroup()&&$.getChildren().length>0)});return Xt.length>0?(0,ve.S6)(Xt,function($){var C=$.getBBox(),gt=C.minX,At=C.maxX,Kt=C.minY,oe=C.maxY;gtdt&&(dt=At),KtUt&&(Ut=oe)}):(ut=0,dt=0,Yt=0,Ut=0),{x:ut,y:Yt,minX:ut,minY:Yt,maxX:dt,maxY:Ut,width:dt-ut,height:Ut-Yt}},Ct.prototype.getCanvasBBox=function(){var ut=1/0,dt=-1/0,Yt=1/0,Ut=-1/0,Xt=this.getChildren().filter(function($){return $.get("visible")&&(!$.isGroup()||$.isGroup()&&$.getChildren().length>0)});return Xt.length>0?(0,ve.S6)(Xt,function($){var C=$.getCanvasBBox(),gt=C.minX,At=C.maxX,Kt=C.minY,oe=C.maxY;gtdt&&(dt=At),KtUt&&(Ut=oe)}):(ut=0,dt=0,Yt=0,Ut=0),{x:ut,y:Yt,minX:ut,minY:Yt,maxX:dt,maxY:Ut,width:dt-ut,height:Ut-Yt}},Ct.prototype.getDefaultCfg=function(){var ut=Dt.prototype.getDefaultCfg.call(this);return ut.children=[],ut},Ct.prototype.onAttrChange=function(ut,dt,Yt){if(Dt.prototype.onAttrChange.call(this,ut,dt,Yt),"matrix"===ut){var Ut=this.getTotalMatrix();this._applyChildrenMarix(Ut)}},Ct.prototype.applyMatrix=function(ut){var dt=this.getTotalMatrix();Dt.prototype.applyMatrix.call(this,ut);var Yt=this.getTotalMatrix();Yt!==dt&&this._applyChildrenMarix(Yt)},Ct.prototype._applyChildrenMarix=function(ut){var dt=this.getChildren();(0,ve.S6)(dt,function(Yt){Yt.applyMatrix(ut)})},Ct.prototype.addShape=function(){for(var ut=[],dt=0;dt=0;yt--){var $=ut[yt];if((0,ve.pP)($)&&($.isGroup()?Xt=$.getShape(dt,Yt,Ut):$.isHit(dt,Yt)&&(Xt=$)),Xt)break}return Xt},Ct.prototype.add=function(ut){var dt=this.getCanvas(),Yt=this.getChildren(),Ut=this.get("timeline"),Xt=ut.getParent();Xt&&function Vt(Dt,Ct,ut){void 0===ut&&(ut=!0),ut?Ct.destroy():(Ct.set("parent",null),Ct.set("canvas",null)),(0,ve.As)(Dt.getChildren(),Ct)}(Xt,ut,!1),ut.set("parent",this),dt&&zt(ut,dt),Ut&&Bt(ut,Ut),Yt.push(ut),ut.onCanvasChange("add"),this._applyElementMatrix(ut)},Ct.prototype._applyElementMatrix=function(ut){var dt=this.getTotalMatrix();dt&&ut.applyMatrix(dt)},Ct.prototype.getChildren=function(){return this.get("children")},Ct.prototype.sort=function(){var ut=this.getChildren();(0,ve.S6)(ut,function(dt,Yt){return dt[Qt]=Yt,dt}),ut.sort(function se(Dt){return function(Ct,ut){var dt=Dt(Ct,ut);return 0===dt?Ct[Qt]-ut[Qt]:dt}}(function(dt,Yt){return dt.get("zIndex")-Yt.get("zIndex")})),this.onCanvasChange("sort")},Ct.prototype.clear=function(){if(this.set("clearing",!0),!this.destroyed){for(var ut=this.getChildren(),dt=ut.length-1;dt>=0;dt--)ut[dt].destroy();this.set("children",[]),this.onCanvasChange("clear"),this.set("clearing",!1)}},Ct.prototype.destroy=function(){this.get("destroyed")||(this.clear(),Dt.prototype.destroy.call(this))},Ct.prototype.getFirst=function(){return this.getChildByIndex(0)},Ct.prototype.getLast=function(){var ut=this.getChildren();return this.getChildByIndex(ut.length-1)},Ct.prototype.getChildByIndex=function(ut){return this.getChildren()[ut]},Ct.prototype.getCount=function(){return this.getChildren().length},Ct.prototype.contain=function(ut){return this.getChildren().indexOf(ut)>-1},Ct.prototype.removeChild=function(ut,dt){void 0===dt&&(dt=!0),this.contain(ut)&&ut.remove(dt)},Ct.prototype.findAll=function(ut){var dt=[],Yt=this.getChildren();return(0,ve.S6)(Yt,function(Ut){ut(Ut)&&dt.push(Ut),Ut.isGroup()&&(dt=dt.concat(Ut.findAll(ut)))}),dt},Ct.prototype.find=function(ut){var dt=null,Yt=this.getChildren();return(0,ve.S6)(Yt,function(Ut){if(ut(Ut)?dt=Ut:Ut.isGroup()&&(dt=Ut.find(ut)),dt)return!1}),dt},Ct.prototype.findById=function(ut){return this.find(function(dt){return dt.get("id")===ut})},Ct.prototype.findByClassName=function(ut){return this.find(function(dt){return dt.get("className")===ut})},Ct.prototype.findAllByName=function(ut){return this.findAll(function(dt){return dt.get("name")===ut})},Ct}(Nt.Z)},2137:(rr,be,ct)=>{"use strict";ct.d(be,{Z:()=>Ut});var ae=ct(655),Nt=ct(8250),ve=ct(3882),Zt=ct(6610),Qt=ct(2727),zt=ct(1946),Bt=ve.vs,Mt="matrix",Vt=["zIndex","capture","visible","type"],se=["repeat"];function Ct(Xt,yt){var $={},C=yt.attrs;for(var gt in Xt)$[gt]=C[gt];return $}const Ut=function(Xt){function yt($){var C=Xt.call(this,$)||this;C.attrs={};var gt=C.getDefaultAttrs();return(0,Nt.CD)(gt,$.attrs),C.attrs=gt,C.initAttrs(gt),C.initAnimate(),C}return(0,ae.ZT)(yt,Xt),yt.prototype.getDefaultCfg=function(){return{visible:!0,capture:!0,zIndex:0}},yt.prototype.getDefaultAttrs=function(){return{matrix:this.getDefaultMatrix(),opacity:1}},yt.prototype.onCanvasChange=function($){},yt.prototype.initAttrs=function($){},yt.prototype.initAnimate=function(){this.set("animable",!0),this.set("animating",!1)},yt.prototype.isGroup=function(){return!1},yt.prototype.getParent=function(){return this.get("parent")},yt.prototype.getCanvas=function(){return this.get("canvas")},yt.prototype.attr=function(){for(var $,C=[],gt=0;gt0?At=function dt(Xt,yt){if(yt.onFrame)return Xt;var $=yt.startTime,C=yt.delay,gt=yt.duration,At=Object.prototype.hasOwnProperty;return(0,Nt.S6)(Xt,function(Kt){$+CKt.delay&&(0,Nt.S6)(yt.toAttrs,function(oe,Rt){At.call(Kt.toAttrs,Rt)&&(delete Kt.toAttrs[Rt],delete Kt.fromAttrs[Rt])})}),Xt}(At,W):gt.addAnimator(this),At.push(W),this.set("animations",At),this.set("_pause",{isPaused:!1})}},yt.prototype.stopAnimate=function($){var C=this;void 0===$&&($=!0);var gt=this.get("animations");(0,Nt.S6)(gt,function(At){$&&C.attr(At.onFrame?At.onFrame(1):At.toAttrs),At.callback&&At.callback()}),this.set("animating",!1),this.set("animations",[])},yt.prototype.pauseAnimate=function(){var $=this.get("timeline"),C=this.get("animations"),gt=$.getTime();return(0,Nt.S6)(C,function(At){At._paused=!0,At._pauseTime=gt,At.pauseCallback&&At.pauseCallback()}),this.set("_pause",{isPaused:!0,pauseTime:gt}),this},yt.prototype.resumeAnimate=function(){var C=this.get("timeline").getTime(),gt=this.get("animations"),At=this.get("_pause").pauseTime;return(0,Nt.S6)(gt,function(Kt){Kt.startTime=Kt.startTime+(C-At),Kt._paused=!1,Kt._pauseTime=null,Kt.resumeCallback&&Kt.resumeCallback()}),this.set("_pause",{isPaused:!1}),this.set("animations",gt),this},yt.prototype.emitDelegation=function($,C){var oe,gt=this,At=C.propagationPath;this.getEvents(),"mouseenter"===$?oe=C.fromShape:"mouseleave"===$&&(oe=C.toShape);for(var Rt=function(Jt){var kt=At[Jt],Q=kt.get("name");if(Q){if((kt.isGroup()||kt.isCanvas&&kt.isCanvas())&&oe&&(0,Zt.UY)(kt,oe))return"break";(0,Nt.kJ)(Q)?(0,Nt.S6)(Q,function(nt){gt.emitDelegateEvent(kt,nt,C)}):Ht.emitDelegateEvent(kt,Q,C)}},Ht=this,ye=0;ye{"use strict";ct.d(be,{Z:()=>Zt});var ae=ct(655);const Zt=function(Qt){function zt(){return null!==Qt&&Qt.apply(this,arguments)||this}return(0,ae.ZT)(zt,Qt),zt.prototype.isGroup=function(){return!0},zt.prototype.isEntityGroup=function(){return!1},zt.prototype.clone=function(){for(var Bt=Qt.prototype.clone.call(this),Mt=this.getChildren(),Vt=0;Vt{"use strict";ct.d(be,{Z:()=>Qt});var ae=ct(655),Nt=ct(2137),ve=ct(2727);const Qt=function(zt){function Bt(Mt){return zt.call(this,Mt)||this}return(0,ae.ZT)(Bt,zt),Bt.prototype._isInBBox=function(Mt,Vt){var se=this.getBBox();return se.minX<=Mt&&se.maxX>=Mt&&se.minY<=Vt&&se.maxY>=Vt},Bt.prototype.afterAttrsChange=function(Mt){zt.prototype.afterAttrsChange.call(this,Mt),this.clearCacheBBox()},Bt.prototype.getBBox=function(){var Mt=this.cfg.bbox;return Mt||(Mt=this.calculateBBox(),this.set("bbox",Mt)),Mt},Bt.prototype.getCanvasBBox=function(){var Mt=this.cfg.canvasBBox;return Mt||(Mt=this.calculateCanvasBBox(),this.set("canvasBBox",Mt)),Mt},Bt.prototype.applyMatrix=function(Mt){zt.prototype.applyMatrix.call(this,Mt),this.set("canvasBBox",null)},Bt.prototype.calculateCanvasBBox=function(){var Mt=this.getBBox(),Vt=this.getTotalMatrix(),se=Mt.minX,ne=Mt.minY,me=Mt.maxX,Dt=Mt.maxY;if(Vt){var Ct=(0,ve.rG)(Vt,[Mt.minX,Mt.minY]),ut=(0,ve.rG)(Vt,[Mt.maxX,Mt.minY]),dt=(0,ve.rG)(Vt,[Mt.minX,Mt.maxY]),Yt=(0,ve.rG)(Vt,[Mt.maxX,Mt.maxY]);se=Math.min(Ct[0],ut[0],dt[0],Yt[0]),me=Math.max(Ct[0],ut[0],dt[0],Yt[0]),ne=Math.min(Ct[1],ut[1],dt[1],Yt[1]),Dt=Math.max(Ct[1],ut[1],dt[1],Yt[1])}var Ut=this.attrs;if(Ut.shadowColor){var Xt=Ut.shadowBlur,yt=void 0===Xt?0:Xt,$=Ut.shadowOffsetX,C=void 0===$?0:$,gt=Ut.shadowOffsetY,At=void 0===gt?0:gt,oe=me+yt+C,Rt=ne-yt+At,Ht=Dt+yt+At;se=Math.min(se,se-yt+C),me=Math.max(me,oe),ne=Math.min(ne,Rt),Dt=Math.max(Dt,Ht)}return{x:se,y:ne,minX:se,minY:ne,maxX:me,maxY:Dt,width:me-se,height:Dt-ne}},Bt.prototype.clearCacheBBox=function(){this.set("bbox",null),this.set("canvasBBox",null)},Bt.prototype.isClipShape=function(){return this.get("isClipShape")},Bt.prototype.isInShape=function(Mt,Vt){return!1},Bt.prototype.isOnlyHitBox=function(){return!1},Bt.prototype.isHit=function(Mt,Vt){var se=this.get("startArrowShape"),ne=this.get("endArrowShape"),me=[Mt,Vt,1],Dt=(me=this.invertFromMatrix(me))[0],Ct=me[1],ut=this._isInBBox(Dt,Ct);return this.isOnlyHitBox()?ut:!(!ut||this.isClipped(Dt,Ct)||!(this.isInShape(Dt,Ct)||se&&se.isHit(Dt,Ct)||ne&&ne.isHit(Dt,Ct)))},Bt}(Nt.Z)},7407:(rr,be,ct)=>{"use strict";ct.d(be,{C:()=>Zt,_:()=>ve});var ae=ct(6399),Nt={};function ve(Qt){return Nt[Qt.toLowerCase()]||ae[Qt]}function Zt(Qt,zt){Nt[Qt.toLowerCase()]=zt}},5904:(rr,be,ct)=>{"use strict";ct.d(be,{b:()=>ve,W:()=>Nt});var ae=new Map;function Nt(yt,$){ae.set(yt,$)}function ve(yt){return ae.get(yt)}function Zt(yt){var $=yt.attr();return{x:$.x,y:$.y,width:$.width,height:$.height}}function Qt(yt){var $=yt.attr(),At=$.r;return{x:$.x-At,y:$.y-At,width:2*At,height:2*At}}var zt=ct(9174);function Bt(yt,$){return yt&&$?{minX:Math.min(yt.minX,$.minX),minY:Math.min(yt.minY,$.minY),maxX:Math.max(yt.maxX,$.maxX),maxY:Math.max(yt.maxY,$.maxY)}:yt||$}function Mt(yt,$){var C=yt.get("startArrowShape"),gt=yt.get("endArrowShape");return C&&($=Bt($,C.getCanvasBBox())),gt&&($=Bt($,gt.getCanvasBBox())),$}var ne=ct(1372),Dt=ct(2759),Ct=ct(8250);function dt(yt,$){var C=yt.prePoint,gt=yt.currentPoint,At=yt.nextPoint,Kt=Math.pow(gt[0]-C[0],2)+Math.pow(gt[1]-C[1],2),oe=Math.pow(gt[0]-At[0],2)+Math.pow(gt[1]-At[1],2),Rt=Math.pow(C[0]-At[0],2)+Math.pow(C[1]-At[1],2),Ht=Math.acos((Kt+oe-Rt)/(2*Math.sqrt(Kt)*Math.sqrt(oe)));if(!Ht||0===Math.sin(Ht)||(0,Ct.vQ)(Ht,0))return{xExtra:0,yExtra:0};var ye=Math.abs(Math.atan2(At[1]-gt[1],At[0]-gt[0])),qt=Math.abs(Math.atan2(At[0]-gt[0],At[1]-gt[1]));return ye=ye>Math.PI/2?Math.PI-ye:ye,qt=qt>Math.PI/2?Math.PI-qt:qt,{xExtra:Math.cos(Ht/2-ye)*($/2*(1/Math.sin(Ht/2)))-$/2||0,yExtra:Math.cos(qt-Ht/2)*($/2*(1/Math.sin(Ht/2)))-$/2||0}}Nt("rect",Zt),Nt("image",Zt),Nt("circle",Qt),Nt("marker",Qt),Nt("polyline",function Vt(yt){for(var C=yt.attr().points,gt=[],At=[],Kt=0;Kt{"use strict";ct.d(be,{Z:()=>Nt});const Nt=function(){function ve(Zt,Qt){this.bubbles=!0,this.target=null,this.currentTarget=null,this.delegateTarget=null,this.delegateObject=null,this.defaultPrevented=!1,this.propagationStopped=!1,this.shape=null,this.fromShape=null,this.toShape=null,this.propagationPath=[],this.type=Zt,this.name=Zt,this.originalEvent=Qt,this.timeStamp=Qt.timeStamp}return ve.prototype.preventDefault=function(){this.defaultPrevented=!0,this.originalEvent.preventDefault&&this.originalEvent.preventDefault()},ve.prototype.stopPropagation=function(){this.propagationStopped=!0},ve.prototype.toString=function(){return"[Event (type="+this.type+")]"},ve.prototype.save=function(){},ve.prototype.restore=function(){},ve}()},9279:(rr,be,ct)=>{"use strict";ct.r(be),ct.d(be,{AbstractCanvas:()=>Vt.Z,AbstractGroup:()=>se.Z,AbstractShape:()=>ne.Z,Base:()=>Mt.Z,Event:()=>Bt.Z,PathUtil:()=>ae,assembleFont:()=>Dt.$O,getBBoxMethod:()=>me.b,getOffScreenContext:()=>dt.L,getTextHeight:()=>Dt.FE,invert:()=>ut.U_,isAllowCapture:()=>Ct.pP,multiplyVec2:()=>ut.rG,registerBBox:()=>me.W,registerEasing:()=>Yt.C,version:()=>Ut});var ae=ct(2144),Nt=ct(4389),zt={};for(const Xt in Nt)["default","Event","Base","AbstractCanvas","AbstractGroup","AbstractShape","PathUtil","getBBoxMethod","registerBBox","getTextHeight","assembleFont","isAllowCapture","multiplyVec2","invert","getOffScreenContext","registerEasing","version"].indexOf(Xt)<0&&(zt[Xt]=()=>Nt[Xt]);ct.d(be,zt);var Zt=ct(9361);zt={};for(const Xt in Zt)["default","Event","Base","AbstractCanvas","AbstractGroup","AbstractShape","PathUtil","getBBoxMethod","registerBBox","getTextHeight","assembleFont","isAllowCapture","multiplyVec2","invert","getOffScreenContext","registerEasing","version"].indexOf(Xt)<0&&(zt[Xt]=()=>Zt[Xt]);ct.d(be,zt);var Bt=ct(1069),Mt=ct(1946),Vt=ct(1512),se=ct(5418),ne=ct(4625),me=ct(5904),Dt=ct(1372),Ct=ct(6610),ut=ct(2727),dt=ct(2623),Yt=ct(7407),Ut="0.5.11"},9361:()=>{},4389:()=>{},2727:(rr,be,ct)=>{"use strict";function ae(Zt,Qt){var zt=[],Bt=Zt[0],Mt=Zt[1],Vt=Zt[2],se=Zt[3],ne=Zt[4],me=Zt[5],Dt=Zt[6],Ct=Zt[7],ut=Zt[8],dt=Qt[0],Yt=Qt[1],Ut=Qt[2],Xt=Qt[3],yt=Qt[4],$=Qt[5],C=Qt[6],gt=Qt[7],At=Qt[8];return zt[0]=dt*Bt+Yt*se+Ut*Dt,zt[1]=dt*Mt+Yt*ne+Ut*Ct,zt[2]=dt*Vt+Yt*me+Ut*ut,zt[3]=Xt*Bt+yt*se+$*Dt,zt[4]=Xt*Mt+yt*ne+$*Ct,zt[5]=Xt*Vt+yt*me+$*ut,zt[6]=C*Bt+gt*se+At*Dt,zt[7]=C*Mt+gt*ne+At*Ct,zt[8]=C*Vt+gt*me+At*ut,zt}function Nt(Zt,Qt){var zt=[],Bt=Qt[0],Mt=Qt[1];return zt[0]=Zt[0]*Bt+Zt[3]*Mt+Zt[6],zt[1]=Zt[1]*Bt+Zt[4]*Mt+Zt[7],zt}function ve(Zt){var Qt=[],zt=Zt[0],Bt=Zt[1],Mt=Zt[2],Vt=Zt[3],se=Zt[4],ne=Zt[5],me=Zt[6],Dt=Zt[7],Ct=Zt[8],ut=Ct*se-ne*Dt,dt=-Ct*Vt+ne*me,Yt=Dt*Vt-se*me,Ut=zt*ut+Bt*dt+Mt*Yt;return Ut?(Qt[0]=ut*(Ut=1/Ut),Qt[1]=(-Ct*Bt+Mt*Dt)*Ut,Qt[2]=(ne*Bt-Mt*se)*Ut,Qt[3]=dt*Ut,Qt[4]=(Ct*zt-Mt*me)*Ut,Qt[5]=(-ne*zt+Mt*Vt)*Ut,Qt[6]=Yt*Ut,Qt[7]=(-Dt*zt+Bt*me)*Ut,Qt[8]=(se*zt-Bt*Vt)*Ut,Qt):null}ct.d(be,{U_:()=>ve,rG:()=>Nt,xq:()=>ae})},2623:(rr,be,ct)=>{"use strict";ct.d(be,{L:()=>Nt});var ae=null;function Nt(){if(!ae){var ve=document.createElement("canvas");ve.width=1,ve.height=1,ae=ve.getContext("2d")}return ae}},2144:(rr,be,ct)=>{"use strict";ct.r(be),ct.d(be,{catmullRomToBezier:()=>zt,fillPath:()=>Jt,fillPathByDiff:()=>Et,formatPath:()=>Fe,intersection:()=>Rt,parsePathArray:()=>Ct,parsePathString:()=>Qt,pathToAbsolute:()=>Mt,pathToCurve:()=>me,rectPath:()=>yt});var ae=ct(8250),Nt="\t\n\v\f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029",ve=new RegExp("([a-z])["+Nt+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+Nt+"]*,?["+Nt+"]*)+)","ig"),Zt=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+Nt+"]*,?["+Nt+"]*","ig"),Qt=function(W){if(!W)return null;if((0,ae.kJ)(W))return W;var K={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},J=[];return String(W).replace(ve,function(U,vt,mt){var j=[],rt=vt.toLowerCase();if(mt.replace(Zt,function(P,Z){Z&&j.push(+Z)}),"m"===rt&&j.length>2&&(J.push([vt].concat(j.splice(0,2))),rt="l",vt="m"===vt?"l":"L"),"o"===rt&&1===j.length&&J.push([vt,j[0]]),"r"===rt)J.push([vt].concat(j));else for(;j.length>=K[rt]&&(J.push([vt].concat(j.splice(0,K[rt]))),K[rt]););return W}),J},zt=function(W,K){for(var J=[],U=0,vt=W.length;vt-2*!K>U;U+=2){var mt=[{x:+W[U-2],y:+W[U-1]},{x:+W[U],y:+W[U+1]},{x:+W[U+2],y:+W[U+3]},{x:+W[U+4],y:+W[U+5]}];K?U?vt-4===U?mt[3]={x:+W[0],y:+W[1]}:vt-2===U&&(mt[2]={x:+W[0],y:+W[1]},mt[3]={x:+W[2],y:+W[3]}):mt[0]={x:+W[vt-2],y:+W[vt-1]}:vt-4===U?mt[3]=mt[2]:U||(mt[0]={x:+W[U],y:+W[U+1]}),J.push(["C",(6*mt[1].x-mt[0].x+mt[2].x)/6,(6*mt[1].y-mt[0].y+mt[2].y)/6,(mt[1].x+6*mt[2].x-mt[3].x)/6,(mt[1].y+6*mt[2].y-mt[3].y)/6,mt[2].x,mt[2].y])}return J},Bt=function(W,K,J,U,vt){var mt=[];if(null===vt&&null===U&&(U=J),W=+W,K=+K,J=+J,U=+U,null!==vt){var j=Math.PI/180,rt=W+J*Math.cos(-U*j),P=W+J*Math.cos(-vt*j);mt=[["M",rt,K+J*Math.sin(-U*j)],["A",J,J,0,+(vt-U>180),0,P,K+J*Math.sin(-vt*j)]]}else mt=[["M",W,K],["m",0,-U],["a",J,U,0,1,1,0,2*U],["a",J,U,0,1,1,0,-2*U],["z"]];return mt},Mt=function(W){if(!(W=Qt(W))||!W.length)return[["M",0,0]];var rt,P,K=[],J=0,U=0,vt=0,mt=0,j=0;"M"===W[0][0]&&(vt=J=+W[0][1],mt=U=+W[0][2],j++,K[0]=["M",J,U]);for(var Z=3===W.length&&"M"===W[0][0]&&"R"===W[1][0].toUpperCase()&&"Z"===W[2][0].toUpperCase(),q=void 0,at=void 0,Tt=j,Lt=W.length;Tt1&&(J*=R=Math.sqrt(R),U*=R);var N=J*J,V=U*U,lt=(mt===j?-1:1)*Math.sqrt(Math.abs((N*V-N*z*z-V*it*it)/(N*z*z+V*it*it)));Ce=lt*J*z/U+(W+rt)/2,we=lt*-U*it/J+(K+P)/2,bt=Math.asin(((K-we)/U).toFixed(9)),re=Math.asin(((P-we)/U).toFixed(9)),bt=Wre&&(bt-=2*Math.PI),!j&&re>bt&&(re-=2*Math.PI)}var _t=re-bt;if(Math.abs(_t)>q){var St=re,Gt=rt,ee=P;re=bt+q*(j&&re>bt?1:-1),rt=Ce+J*Math.cos(re),P=we+U*Math.sin(re),Tt=ne(rt,P,J,U,vt,0,j,Gt,ee,[re,St,Ce,we])}_t=re-bt;var ie=Math.cos(bt),Ee=Math.sin(bt),Te=Math.cos(re),He=Math.sin(re),Xe=Math.tan(_t/4),ke=4/3*J*Xe,qe=4/3*U*Xe,Qe=[W,K],er=[W+ke*Ee,K-qe*ie],Ye=[rt+ke*He,P-qe*Te],sr=[rt,P];if(er[0]=2*Qe[0]-er[0],er[1]=2*Qe[1]-er[1],Z)return[er,Ye,sr].concat(Tt);for(var _r=[],lr=0,Sr=(Tt=[er,Ye,sr].concat(Tt).join().split(",")).length;lr7){it[z].shift();for(var R=it[z];R.length;)j[z]="A",U&&(rt[z]="A"),it.splice(z++,0,["C"].concat(R.splice(0,6)));it.splice(z,1),q=Math.max(J.length,U&&U.length||0)}},Lt=function(it,z,R,N,V){it&&z&&"M"===it[V][0]&&"M"!==z[V][0]&&(z.splice(V,0,["M",N.x,N.y]),R.bx=0,R.by=0,R.x=it[V][1],R.y=it[V][2],q=Math.max(J.length,U&&U.length||0))};q=Math.max(J.length,U&&U.length||0);for(var bt=0;bt1?1:P<0?0:P)/2,at=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],Tt=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],Lt=0,bt=0;bt<12;bt++){var re=Z*at[bt]+Z,Ce=ut(re,W,J,vt,j),we=ut(re,K,U,mt,rt);Lt+=Tt[bt]*Math.sqrt(Ce*Ce+we*we)}return Z*Lt},Yt=function(W,K,J,U,vt,mt,j,rt){for(var q,at,Tt,Lt,P=[],Z=[[],[]],bt=0;bt<2;++bt)if(0===bt?(at=6*W-12*J+6*vt,q=-3*W+9*J-9*vt+3*j,Tt=3*J-3*W):(at=6*K-12*U+6*mt,q=-3*K+9*U-9*mt+3*rt,Tt=3*U-3*K),Math.abs(q)<1e-12){if(Math.abs(at)<1e-12)continue;(Lt=-Tt/at)>0&&Lt<1&&P.push(Lt)}else{var re=at*at-4*Tt*q,Ce=Math.sqrt(re);if(!(re<0)){var we=(-at+Ce)/(2*q);we>0&&we<1&&P.push(we);var Re=(-at-Ce)/(2*q);Re>0&&Re<1&&P.push(Re)}}for(var R,it=P.length,z=it;it--;)Z[0][it]=(R=1-(Lt=P[it]))*R*R*W+3*R*R*Lt*J+3*R*Lt*Lt*vt+Lt*Lt*Lt*j,Z[1][it]=R*R*R*K+3*R*R*Lt*U+3*R*Lt*Lt*mt+Lt*Lt*Lt*rt;return Z[0][z]=W,Z[1][z]=K,Z[0][z+1]=j,Z[1][z+1]=rt,Z[0].length=Z[1].length=z+2,{min:{x:Math.min.apply(0,Z[0]),y:Math.min.apply(0,Z[1])},max:{x:Math.max.apply(0,Z[0]),y:Math.max.apply(0,Z[1])}}},Ut=function(W,K,J,U,vt,mt,j,rt){if(!(Math.max(W,J)Math.max(vt,j)||Math.max(K,U)Math.max(mt,rt))){var q=(W-J)*(mt-rt)-(K-U)*(vt-j);if(q){var at=((W*U-K*J)*(vt-j)-(W-J)*(vt*rt-mt*j))/q,Tt=((W*U-K*J)*(mt-rt)-(K-U)*(vt*rt-mt*j))/q,Lt=+at.toFixed(2),bt=+Tt.toFixed(2);if(!(Lt<+Math.min(W,J).toFixed(2)||Lt>+Math.max(W,J).toFixed(2)||Lt<+Math.min(vt,j).toFixed(2)||Lt>+Math.max(vt,j).toFixed(2)||bt<+Math.min(K,U).toFixed(2)||bt>+Math.max(K,U).toFixed(2)||bt<+Math.min(mt,rt).toFixed(2)||bt>+Math.max(mt,rt).toFixed(2)))return{x:at,y:Tt}}}},Xt=function(W,K,J){return K>=W.x&&K<=W.x+W.width&&J>=W.y&&J<=W.y+W.height},yt=function(W,K,J,U,vt){if(vt)return[["M",+W+ +vt,K],["l",J-2*vt,0],["a",vt,vt,0,0,1,vt,vt],["l",0,U-2*vt],["a",vt,vt,0,0,1,-vt,vt],["l",2*vt-J,0],["a",vt,vt,0,0,1,-vt,-vt],["l",0,2*vt-U],["a",vt,vt,0,0,1,vt,-vt],["z"]];var mt=[["M",W,K],["l",J,0],["l",0,U],["l",-J,0],["z"]];return mt.parsePathArray=Ct,mt},$=function(W,K,J,U){return null===W&&(W=K=J=U=0),null===K&&(K=W.y,J=W.width,U=W.height,W=W.x),{x:W,y:K,width:J,w:J,height:U,h:U,x2:W+J,y2:K+U,cx:W+J/2,cy:K+U/2,r1:Math.min(J,U)/2,r2:Math.max(J,U)/2,r0:Math.sqrt(J*J+U*U)/2,path:yt(W,K,J,U),vb:[W,K,J,U].join(" ")}},gt=function(W,K,J,U,vt,mt,j,rt){(0,ae.kJ)(W)||(W=[W,K,J,U,vt,mt,j,rt]);var P=Yt.apply(null,W);return $(P.min.x,P.min.y,P.max.x-P.min.x,P.max.y-P.min.y)},At=function(W,K,J,U,vt,mt,j,rt,P){var Z=1-P,q=Math.pow(Z,3),at=Math.pow(Z,2),Tt=P*P,Lt=Tt*P,Ce=W+2*P*(J-W)+Tt*(vt-2*J+W),we=K+2*P*(U-K)+Tt*(mt-2*U+K),Re=J+2*P*(vt-J)+Tt*(j-2*vt+J),it=U+2*P*(mt-U)+Tt*(rt-2*mt+U);return{x:q*W+3*at*P*J+3*Z*P*P*vt+Lt*j,y:q*K+3*at*P*U+3*Z*P*P*mt+Lt*rt,m:{x:Ce,y:we},n:{x:Re,y:it},start:{x:Z*W+P*J,y:Z*K+P*U},end:{x:Z*vt+P*j,y:Z*mt+P*rt},alpha:90-180*Math.atan2(Ce-Re,we-it)/Math.PI}},Kt=function(W,K,J){if(!function(W,K){return W=$(W),K=$(K),Xt(K,W.x,W.y)||Xt(K,W.x2,W.y)||Xt(K,W.x,W.y2)||Xt(K,W.x2,W.y2)||Xt(W,K.x,K.y)||Xt(W,K.x2,K.y)||Xt(W,K.x,K.y2)||Xt(W,K.x2,K.y2)||(W.xK.x||K.xW.x)&&(W.yK.y||K.yW.y)}(gt(W),gt(K)))return J?0:[];for(var rt=~~(dt.apply(0,W)/8),P=~~(dt.apply(0,K)/8),Z=[],q=[],at={},Tt=J?0:[],Lt=0;Lt=0&&V<=1&<>=0&<<=1&&(J?Tt+=1:Tt.push({x:N.x,y:N.y,t1:V,t2:lt}))}}return Tt},Rt=function(W,K){return function(W,K,J){W=me(W),K=me(K);for(var U,vt,mt,j,rt,P,Z,q,at,Tt,Lt=[],bt=0,re=W.length;bt=3&&(3===at.length&&Tt.push("Q"),Tt=Tt.concat(at[1])),2===at.length&&Tt.push("L"),Tt.concat(at[at.length-1])})}(W,K,J));else{var vt=[].concat(W);"M"===vt[0]&&(vt[0]="L");for(var mt=0;mt<=J-1;mt++)U.push(vt)}return U}(W[at],W[at+1],q))},[]);return P.unshift(W[0]),("Z"===K[U]||"z"===K[U])&&P.push("Z"),P},kt=function(W,K){if(W.length!==K.length)return!1;var J=!0;return(0,ae.S6)(W,function(U,vt){if(U!==K[vt])return J=!1,!1}),J};function Q(W,K,J){var U=null,vt=J;return K=0;P--)j=mt[P].index,"add"===mt[P].type?W.splice(j,0,[].concat(W[j])):W.splice(j,1)}var at=vt-(U=W.length);if(U0)){W[U]=K[U];break}J=te(J,W[U-1],1)}W[U]=["Q"].concat(J.reduce(function(vt,mt){return vt.concat(mt)},[]));break;case"T":W[U]=["T"].concat(J[0]);break;case"C":if(J.length<3){if(!(U>0)){W[U]=K[U];break}J=te(J,W[U-1],2)}W[U]=["C"].concat(J.reduce(function(vt,mt){return vt.concat(mt)},[]));break;case"S":if(J.length<2){if(!(U>0)){W[U]=K[U];break}J=te(J,W[U-1],1)}W[U]=["S"].concat(J.reduce(function(vt,mt){return vt.concat(mt)},[]));break;default:W[U]=K[U]}return W}},1372:(rr,be,ct)=>{"use strict";ct.d(be,{$O:()=>zt,FE:()=>ve,mY:()=>Qt});var ae=ct(6610),Nt=ct(2623);function ve(Bt,Mt,Vt){var se=1;if((0,ae.HD)(Bt)&&(se=Bt.split("\n").length),se>1){var ne=function Zt(Bt,Mt){return Mt?Mt-Bt:.14*Bt}(Mt,Vt);return Mt*se+ne*(se-1)}return Mt}function Qt(Bt,Mt){var Vt=(0,Nt.L)(),se=0;if((0,ae.kK)(Bt)||""===Bt)return se;if(Vt.save(),Vt.font=Mt,(0,ae.HD)(Bt)&&Bt.includes("\n")){var ne=Bt.split("\n");(0,ae.S6)(ne,function(me){var Dt=Vt.measureText(me).width;se{"use strict";ct.d(be,{As:()=>Nt,CD:()=>ae.CD,HD:()=>ae.HD,Kn:()=>ae.Kn,S6:()=>ae.S6,UY:()=>Zt,jC:()=>ae.jC,jU:()=>ve,kK:()=>ae.UM,mf:()=>ae.mf,pP:()=>Qt});var ae=ct(8250);function Nt(zt,Bt){var Mt=zt.indexOf(Bt);-1!==Mt&&zt.splice(Mt,1)}var ve=typeof window<"u"&&typeof window.document<"u";function Zt(zt,Bt){if(zt.isCanvas())return!0;for(var Mt=Bt.getParent(),Vt=!1;Mt;){if(Mt===zt){Vt=!0;break}Mt=Mt.getParent()}return Vt}function Qt(zt){return zt.cfg.visible&&zt.cfg.capture}},3882:(rr,be,ct)=>{"use strict";ct.d(be,{Dg:()=>Vt,lh:()=>Qt,m$:()=>ve,vs:()=>Bt,zu:()=>Zt});var ae=ct(7543),Nt=ct(8235);function ve(ne,me,Dt){var Ct=[0,0,0,0,0,0,0,0,0];return ae.vc(Ct,Dt),ae.Jp(ne,Ct,me)}function Zt(ne,me,Dt){var Ct=[0,0,0,0,0,0,0,0,0];return ae.Us(Ct,Dt),ae.Jp(ne,Ct,me)}function Qt(ne,me,Dt){var Ct=[0,0,0,0,0,0,0,0,0];return ae.xJ(Ct,Dt),ae.Jp(ne,Ct,me)}function zt(ne,me,Dt){return ae.Jp(ne,Dt,me)}function Bt(ne,me){for(var Dt=ne?[].concat(ne):[1,0,0,0,1,0,0,0,1],Ct=0,ut=me.length;Ct=0;return Dt?ut?2*Math.PI-Ct:Ct:ut?Ct:2*Math.PI-Ct}},2759:(rr,be,ct)=>{"use strict";ct.d(be,{e9:()=>Vt,Wq:()=>z,tr:()=>dt,wb:()=>Xt,zx:()=>Z});var ae=ct(8250),Nt=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/gi,ve=/[^\s\,]+/gi;const Qt=function Zt(R){var N=R||[];return(0,ae.kJ)(N)?N:(0,ae.HD)(N)?(N=N.match(Nt),(0,ae.S6)(N,function(V,lt){if((V=V.match(ve))[0].length>1){var _t=V[0].charAt(0);V.splice(1,0,V[0].substr(1)),V[0]=_t}(0,ae.S6)(V,function(St,Gt){isNaN(St)||(V[Gt]=+St)}),N[lt]=V}),N):void 0};var zt=ct(8235);const Vt=function Mt(R,N,V){void 0===N&&(N=!1),void 0===V&&(V=[[0,0],[1,1]]);for(var lt=!!N,_t=[],St=0,Gt=R.length;St2&&(V.push([_t].concat(Gt.splice(0,2))),ee="l",_t="m"===_t?"l":"L"),"o"===ee&&1===Gt.length&&V.push([_t,Gt[0]]),"r"===ee)V.push([_t].concat(Gt));else for(;Gt.length>=N[ee]&&(V.push([_t].concat(Gt.splice(0,N[ee]))),N[ee]););return""}),V}var Yt=/[a-z]/;function Ut(R,N){return[N[0]+(N[0]-R[0]),N[1]+(N[1]-R[1])]}function Xt(R){var N=dt(R);if(!N||!N.length)return[["M",0,0]];for(var V=!1,lt=0;lt=0){V=!0;break}if(!V)return N;var St=[],Gt=0,ee=0,ie=0,Ee=0,Te=0,ke=N[0];("M"===ke[0]||"m"===ke[0])&&(ie=Gt=+ke[1],Ee=ee=+ke[2],Te++,St[0]=["M",Gt,ee]),lt=Te;for(var qe=N.length;lt1&&(V*=Math.sqrt(ke),lt*=Math.sqrt(ke));var qe=V*V*(Xe*Xe)+lt*lt*(He*He),Qe=qe?Math.sqrt((V*V*(lt*lt)-qe)/qe):1;St===Gt&&(Qe*=-1),isNaN(Qe)&&(Qe=0);var er=lt?Qe*V*Xe/lt:0,Ye=V?Qe*-lt*He/V:0,sr=(ee+Ee)/2+Math.cos(_t)*er-Math.sin(_t)*Ye,_r=(ie+Te)/2+Math.sin(_t)*er+Math.cos(_t)*Ye,lr=[(He-er)/V,(Xe-Ye)/lt],Sr=[(-1*He-er)/V,(-1*Xe-Ye)/lt],Hr=mt([1,0],lr),zr=mt(lr,Sr);return vt(lr,Sr)<=-1&&(zr=Math.PI),vt(lr,Sr)>=1&&(zr=0),0===Gt&&zr>0&&(zr-=2*Math.PI),1===Gt&&zr<0&&(zr+=2*Math.PI),{cx:sr,cy:_r,rx:j(R,[Ee,Te])?0:V,ry:j(R,[Ee,Te])?0:lt,startAngle:Hr,endAngle:Hr+zr,xRotation:_t,arcFlag:St,sweepFlag:Gt}}function P(R,N){return[N[0]+(N[0]-R[0]),N[1]+(N[1]-R[1])]}function Z(R){for(var N=[],V=null,lt=null,_t=null,St=0,Gt=(R=Qt(R)).length,ee=0;ee0!=at(ee[1]-V)>0&&at(N-(V-Gt[1])*(Gt[0]-ee[0])/(Gt[1]-ee[1])-Gt[0])<0&&(lt=!lt)}return lt}var bt=function(R,N,V){return R>=N&&R<=V};function Ce(R){for(var N=[],V=R.length,lt=0;lt1){var Gt=R[0],ee=R[V-1];N.push({from:{x:ee[0],y:ee[1]},to:{x:Gt[0],y:Gt[1]}})}return N}function Re(R){var N=R.map(function(lt){return lt[0]}),V=R.map(function(lt){return lt[1]});return{minX:Math.min.apply(null,N),maxX:Math.max.apply(null,N),minY:Math.min.apply(null,V),maxY:Math.max.apply(null,V)}}function z(R,N){if(R.length<2||N.length<2)return!1;if(!function it(R,N){return!(N.minX>R.maxX||N.maxXR.maxY||N.maxY.001*(Gt_x*Gt_x+Gt_y*Gt_y)*(ee_x*ee_x+ee_y*ee_y)){var ke=(St_x*ee_y-St_y*ee_x)/ie,qe=(St_x*Gt_y-St_y*Gt_x)/ie;bt(ke,0,1)&&bt(qe,0,1)&&(Xe={x:R.x+ke*Gt_x,y:R.y+ke*Gt_y})}return Xe}(lt.from,lt.to,N.from,N.to))return V=!0,!1}),V}(St,ie))return ee=!0,!1}),ee}},9805:(rr,be,ct)=>{"use strict";ct.d(be,{HZt:()=>tE}),rr=ct.hmd(rr);var ae=Object.freeze({__proto__:null,get Base(){return Ro},get Circle(){return ZP},get Ellipse(){return oC},get Image(){return lC},get Line(){return JP},get Marker(){return ek},get Path(){return pd},get Polygon(){return Fg},get Polyline(){return vC},get Rect(){return ok},get Text(){return lk}}),Nt=function(o,s){return(Nt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)Object.prototype.hasOwnProperty.call(u,h)&&(a[h]=u[h])})(o,s)};function ve(o,s){if("function"!=typeof s&&null!==s)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function a(){this.constructor=o}Nt(o,s),o.prototype=null===s?Object.create(s):(a.prototype=s.prototype,new a)}var Zt=function(){return Zt=Object.assign||function(s){for(var a,u=1,h=arguments.length;u2&&(a.push([h].concat(g.splice(0,2))),y="l",h="m"===h?"l":"L"),"o"===y&&1===g.length&&a.push([h,g[0]]),"r"===y)a.push([h].concat(g));else for(;g.length>=s[y]&&(a.push([h].concat(g.splice(0,s[y]))),s[y]););return o}),a},U=function(o,s){for(var a=[],u=0,h=o.length;h-2*!s>u;u+=2){var v=[{x:+o[u-2],y:+o[u-1]},{x:+o[u],y:+o[u+1]},{x:+o[u+2],y:+o[u+3]},{x:+o[u+4],y:+o[u+5]}];s?u?h-4===u?v[3]={x:+o[0],y:+o[1]}:h-2===u&&(v[2]={x:+o[0],y:+o[1]},v[3]={x:+o[2],y:+o[3]}):v[0]={x:+o[h-2],y:+o[h-1]}:h-4===u?v[3]=v[2]:u||(v[0]={x:+o[u],y:+o[u+1]}),a.push(["C",(6*v[1].x-v[0].x+v[2].x)/6,(6*v[1].y-v[0].y+v[2].y)/6,(v[1].x+6*v[2].x-v[3].x)/6,(v[1].y+6*v[2].y-v[3].y)/6,v[2].x,v[2].y])}return a},vt=function(o,s,a,u,h){var v=[];if(null===h&&null===u&&(u=a),o=+o,s=+s,a=+a,u=+u,null!==h){var g=Math.PI/180,y=o+a*Math.cos(-u*g),w=o+a*Math.cos(-h*g);v=[["M",y,s+a*Math.sin(-u*g)],["A",a,a,0,+(h-u>180),0,w,s+a*Math.sin(-h*g)]]}else v=[["M",o,s],["m",0,-u],["a",a,u,0,1,1,0,2*u],["a",a,u,0,1,1,0,-2*u],["z"]];return v},mt=function(o){if(!(o=J(o))||!o.length)return[["M",0,0]];var y,w,s=[],a=0,u=0,h=0,v=0,g=0;"M"===o[0][0]&&(h=a=+o[0][1],v=u=+o[0][2],g++,s[0]=["M",a,u]);for(var M=3===o.length&&"M"===o[0][0]&&"R"===o[1][0].toUpperCase()&&"Z"===o[2][0].toUpperCase(),A=void 0,L=void 0,O=g,D=o.length;O1&&(a*=Wt=Math.sqrt(Wt),u*=Wt);var de=a*a,pe=u*u,Me=(v===g?-1:1)*Math.sqrt(Math.abs((de*pe-de*pt*pt-pe*ht*ht)/(de*pt*pt+pe*ht*ht)));tt=Me*a*pt/u+(o+y)/2,ot=Me*-u*ht/a+(s+w)/2,k=Math.asin(((s-ot)/u).toFixed(9)),X=Math.asin(((w-ot)/u).toFixed(9)),k=oX&&(k-=2*Math.PI),!g&&X>k&&(X-=2*Math.PI)}var ze=X-k;if(Math.abs(ze)>A){var Oe=X,Ze=y,tr=w;X=k+A*(g&&X>k?1:-1),y=tt+a*Math.cos(X),w=ot+u*Math.sin(X),O=P(y,w,a,u,h,0,g,Ze,tr,[X,Oe,tt,ot])}ze=X-k;var vr=Math.cos(k),gr=Math.sin(k),mr=Math.cos(X),Je=Math.sin(X),Xr=Math.tan(ze/4),$r=4/3*a*Xr,sn=4/3*u*Xr,Nr=[o,s],qn=[o+$r*gr,s-sn*vr],fn=[y+$r*Je,w-sn*mr],Zi=[y,w];if(qn[0]=2*Nr[0]-qn[0],qn[1]=2*Nr[1]-qn[1],M)return[qn,fn,Zi].concat(O);for(var qi=[],dn=0,ri=(O=[qn,fn,Zi].concat(O).join().split(",")).length;dn7){ht[pt].shift();for(var Wt=ht[pt];Wt.length;)g[pt]="A",u&&(y[pt]="A"),ht.splice(pt++,0,["C"].concat(Wt.splice(0,6)));ht.splice(pt,1),A=Math.max(a.length,u&&u.length||0)}},D=function(ht,pt,Wt,de,pe){ht&&pt&&"M"===ht[pe][0]&&"M"!==pt[pe][0]&&(pt.splice(pe,0,["M",de.x,de.y]),Wt.bx=0,Wt.by=0,Wt.x=ht[pe][1],Wt.y=ht[pe][2],A=Math.max(a.length,u&&u.length||0))};A=Math.max(a.length,u&&u.length||0);for(var k=0;k1?1:w<0?0:w)/2,L=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],O=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],D=0,k=0;k<12;k++){var X=M*L[k]+M,tt=Tt(X,o,a,h,g),ot=Tt(X,s,u,v,y);D+=O[k]*Math.sqrt(tt*tt+ot*ot)}return M*D},bt=function(o,s,a,u,h,v,g,y){for(var A,L,O,D,w=[],M=[[],[]],k=0;k<2;++k)if(0===k?(L=6*o-12*a+6*h,A=-3*o+9*a-9*h+3*g,O=3*a-3*o):(L=6*s-12*u+6*v,A=-3*s+9*u-9*v+3*y,O=3*u-3*s),Math.abs(A)<1e-12){if(Math.abs(L)<1e-12)continue;(D=-O/L)>0&&D<1&&w.push(D)}else{var X=L*L-4*O*A,tt=Math.sqrt(X);if(!(X<0)){var ot=(-L+tt)/(2*A);ot>0&&ot<1&&w.push(ot);var ft=(-L-tt)/(2*A);ft>0&&ft<1&&w.push(ft)}}for(var Wt,ht=w.length,pt=ht;ht--;)M[0][ht]=(Wt=1-(D=w[ht]))*Wt*Wt*o+3*Wt*Wt*D*a+3*Wt*D*D*h+D*D*D*g,M[1][ht]=Wt*Wt*Wt*s+3*Wt*Wt*D*u+3*Wt*D*D*v+D*D*D*y;return M[0][pt]=o,M[1][pt]=s,M[0][pt+1]=g,M[1][pt+1]=y,M[0].length=M[1].length=pt+2,{min:{x:Math.min.apply(0,M[0]),y:Math.min.apply(0,M[1])},max:{x:Math.max.apply(0,M[0]),y:Math.max.apply(0,M[1])}}},re=function(o,s,a,u,h,v,g,y){if(!(Math.max(o,a)Math.max(h,g)||Math.max(s,u)Math.max(v,y))){var A=(o-a)*(v-y)-(s-u)*(h-g);if(A){var L=((o*u-s*a)*(h-g)-(o-a)*(h*y-v*g))/A,O=((o*u-s*a)*(v-y)-(s-u)*(h*y-v*g))/A,D=+L.toFixed(2),k=+O.toFixed(2);if(!(D<+Math.min(o,a).toFixed(2)||D>+Math.max(o,a).toFixed(2)||D<+Math.min(h,g).toFixed(2)||D>+Math.max(h,g).toFixed(2)||k<+Math.min(s,u).toFixed(2)||k>+Math.max(s,u).toFixed(2)||k<+Math.min(v,y).toFixed(2)||k>+Math.max(v,y).toFixed(2)))return{x:L,y:O}}}},Ce=function(o,s,a){return s>=o.x&&s<=o.x+o.width&&a>=o.y&&a<=o.y+o.height},we=function(o,s,a,u,h){if(h)return[["M",+o+ +h,s],["l",a-2*h,0],["a",h,h,0,0,1,h,h],["l",0,u-2*h],["a",h,h,0,0,1,-h,h],["l",2*h-a,0],["a",h,h,0,0,1,-h,-h],["l",0,2*h-u],["a",h,h,0,0,1,h,-h],["z"]];var v=[["M",o,s],["l",a,0],["l",0,u],["l",-a,0],["z"]];return v.parsePathArray=at,v},Re=function(o,s,a,u){return null===o&&(o=s=a=u=0),null===s&&(s=o.y,a=o.width,u=o.height,o=o.x),{x:o,y:s,width:a,w:a,height:u,h:u,x2:o+a,y2:s+u,cx:o+a/2,cy:s+u/2,r1:Math.min(a,u)/2,r2:Math.max(a,u)/2,r0:Math.sqrt(a*a+u*u)/2,path:we(o,s,a,u),vb:[o,s,a,u].join(" ")}},z=function(o,s,a,u,h,v,g,y){ne(o)||(o=[o,s,a,u,h,v,g,y]);var w=bt.apply(null,o);return Re(w.min.x,w.min.y,w.max.x-w.min.x,w.max.y-w.min.y)},R=function(o,s,a,u,h,v,g,y,w){var M=1-w,A=Math.pow(M,3),L=Math.pow(M,2),O=w*w,D=O*w,tt=o+2*w*(a-o)+O*(h-2*a+o),ot=s+2*w*(u-s)+O*(v-2*u+s),ft=a+2*w*(h-a)+O*(g-2*h+a),ht=u+2*w*(v-u)+O*(y-2*v+u);return{x:A*o+3*L*w*a+3*M*w*w*h+D*g,y:A*s+3*L*w*u+3*M*w*w*v+D*y,m:{x:tt,y:ot},n:{x:ft,y:ht},start:{x:M*o+w*a,y:M*s+w*u},end:{x:M*h+w*g,y:M*v+w*y},alpha:90-180*Math.atan2(tt-ft,ot-ht)/Math.PI}},N=function(o,s,a){if(!function(o,s){return o=Re(o),s=Re(s),Ce(s,o.x,o.y)||Ce(s,o.x2,o.y)||Ce(s,o.x,o.y2)||Ce(s,o.x2,o.y2)||Ce(o,s.x,s.y)||Ce(o,s.x2,s.y)||Ce(o,s.x,s.y2)||Ce(o,s.x2,s.y2)||(o.xs.x||s.xo.x)&&(o.ys.y||s.yo.y)}(z(o),z(s)))return a?0:[];for(var y=~~(Lt.apply(0,o)/8),w=~~(Lt.apply(0,s)/8),M=[],A=[],L={},O=a?0:[],D=0;D=0&&pe<=1&&Me>=0&&Me<=1&&(a?O+=1:O.push({x:de.x,y:de.y,t1:pe,t2:Me}))}}return O};function _t(o,s){var a=[],u=[];return o.length&&function h(v,g){if(1===v.length)a.push(v[0]),u.push(v[0]);else{for(var y=[],w=0;w=0;w--)g=v[w].index,"add"===v[w].type?o.splice(g,0,[].concat(o[g])):o.splice(g,1)}var L=h-(u=o.length);if(u0)){o[u]=s[u];break}a=Xe(a,o[u-1],1)}o[u]=["Q"].concat(a.reduce(function(h,v){return h.concat(v)},[]));break;case"T":o[u]=["T"].concat(a[0]);break;case"C":if(a.length<3){if(!(u>0)){o[u]=s[u];break}a=Xe(a,o[u-1],2)}o[u]=["C"].concat(a.reduce(function(h,v){return h.concat(v)},[]));break;case"S":if(a.length<2){if(!(u>0)){o[u]=s[u];break}a=Xe(a,o[u-1],1)}o[u]=["S"].concat(a.reduce(function(h,v){return h.concat(v)},[]));break;default:o[u]=s[u]}return o},Qe=Object.freeze({__proto__:null,catmullRomToBezier:U,fillPath:function(o,s){if(1===o.length)return o;var a=o.length-1,u=s.length-1,h=a/u,v=[];if(1===o.length&&"M"===o[0][0]){for(var g=0;g=3&&(3===L.length&&O.push("Q"),O=O.concat(L[1])),2===L.length&&O.push("L"),O.concat(L[L.length-1])})}(o,s,a));else{var h=[].concat(o);"M"===h[0]&&(h[0]="L");for(var v=0;v<=a-1;v++)u.push(h)}return u}(o[L],o[L+1],A))},[]);return w.unshift(o[0]),("Z"===s[u]||"z"===s[u])&&w.push("Z"),w},fillPathByDiff:He,formatPath:qe,intersection:function(o,s){return function(o,s,a){o=Z(o),s=Z(s);for(var u,h,v,g,y,w,M,A,L,O,D=[],k=0,X=o.length;k0?v=function H0(o,s){if(s.onFrame)return o;var a=s.startTime,u=s.delay,h=s.duration,v=Object.prototype.hasOwnProperty;return Dt(o,function(g){a+ug.delay&&Dt(s.toAttrs,function(y,w){v.call(g.toAttrs,w)&&(delete g.toAttrs[w],delete g.fromAttrs[w])})}),o}(v,pt):h.addAnimator(this),v.push(pt),this.set("animations",v),this.set("_pause",{isPaused:!1})}},s.prototype.stopAnimate=function(a){var u=this;void 0===a&&(a=!0),Dt(this.get("animations"),function(v){a&&u.attr(v.onFrame?v.onFrame(1):v.toAttrs),v.callback&&v.callback()}),this.set("animating",!1),this.set("animations",[])},s.prototype.pauseAnimate=function(){var a=this.get("timeline"),u=this.get("animations"),h=a.getTime();return Dt(u,function(v){v._paused=!0,v._pauseTime=h,v.pauseCallback&&v.pauseCallback()}),this.set("_pause",{isPaused:!0,pauseTime:h}),this},s.prototype.resumeAnimate=function(){var u=this.get("timeline").getTime(),h=this.get("animations"),v=this.get("_pause").pauseTime;return Dt(h,function(g){g.startTime=g.startTime+(u-v),g._paused=!1,g._pauseTime=null,g.resumeCallback&&g.resumeCallback()}),this.set("_pause",{isPaused:!1}),this.set("animations",h),this},s.prototype.emitDelegation=function(a,u){var g,h=this,v=u.propagationPath;this.getEvents(),"mouseenter"===a?g=u.fromShape:"mouseleave"===a&&(g=u.toShape);for(var y=function(L){var O=v[L],D=O.get("name");if(D){if((O.isGroup()||O.isCanvas&&O.isCanvas())&&g&&zr(O,g))return"break";ne(D)?Dt(D,function(k){h.emitDelegateEvent(O,k,u)}):w.emitDelegateEvent(O,D,u)}},w=this,M=0;M0)});return w.length>0?(Dt(w,function(A){var L=A.getBBox();g.push(L.minX,L.maxX),y.push(L.minY,L.maxY)}),a=dt(g),u=ut(g),h=dt(y),v=ut(y)):(a=0,u=0,h=0,v=0),{x:a,y:h,minX:a,minY:h,maxX:u,maxY:v,width:u-a,height:v-h}},s.prototype.getCanvasBBox=function(){var a=1/0,u=-1/0,h=1/0,v=-1/0,g=[],y=[],w=this.getChildren().filter(function(A){return A.get("visible")&&(!A.isGroup()||A.isGroup()&&A.getChildren().length>0)});return w.length>0?(Dt(w,function(A){var L=A.getCanvasBBox();g.push(L.minX,L.maxX),y.push(L.minY,L.maxY)}),a=dt(g),u=ut(g),h=dt(y),v=ut(y)):(a=0,u=0,h=0,v=0),{x:a,y:h,minX:a,minY:h,maxX:u,maxY:v,width:u-a,height:v-h}},s.prototype.getDefaultCfg=function(){var a=o.prototype.getDefaultCfg.call(this);return a.children=[],a},s.prototype.onAttrChange=function(a,u,h){if(o.prototype.onAttrChange.call(this,a,u,h),"matrix"===a){var v=this.getTotalMatrix();this._applyChildrenMarix(v)}},s.prototype.applyMatrix=function(a){var u=this.getTotalMatrix();o.prototype.applyMatrix.call(this,a);var h=this.getTotalMatrix();h!==u&&this._applyChildrenMarix(h)},s.prototype._applyChildrenMarix=function(a){Dt(this.getChildren(),function(h){h.applyMatrix(a)})},s.prototype.addShape=function(){for(var a=[],u=0;u=0;y--){var w=a[y];if(xn(w)&&(w.isGroup()?g=w.getShape(u,h,v):w.isHit(u,h)&&(g=w)),g)break}return g},s.prototype.add=function(a){var u=this.getCanvas(),h=this.getChildren(),v=this.get("timeline"),g=a.getParent();g&&function Y0(o,s,a){void 0===a&&(a=!0),a?s.destroy():(s.set("parent",null),s.set("canvas",null)),Sr(o.getChildren(),s)}(g,a,!1),a.set("parent",this),u&&Av(a,u),v&&Ev(a,v),h.push(a),a.onCanvasChange("add"),this._applyElementMatrix(a)},s.prototype._applyElementMatrix=function(a){var u=this.getTotalMatrix();u&&a.applyMatrix(u)},s.prototype.getChildren=function(){return this.get("children")},s.prototype.sort=function(){var a=this.getChildren();Dt(a,function(u,h){return u[Ns]=h,u}),a.sort(function W0(o){return function(s,a){var u=o(s,a);return 0===u?s[Ns]-a[Ns]:u}}(function(u,h){return u.get("zIndex")-h.get("zIndex")})),this.onCanvasChange("sort")},s.prototype.clear=function(){if(this.set("clearing",!0),!this.destroyed){for(var a=this.getChildren(),u=a.length-1;u>=0;u--)a[u].destroy();this.set("children",[]),this.onCanvasChange("clear"),this.set("clearing",!1)}},s.prototype.destroy=function(){this.get("destroyed")||(this.clear(),o.prototype.destroy.call(this))},s.prototype.getFirst=function(){return this.getChildByIndex(0)},s.prototype.getLast=function(){var a=this.getChildren();return this.getChildByIndex(a.length-1)},s.prototype.getChildByIndex=function(a){return this.getChildren()[a]},s.prototype.getCount=function(){return this.getChildren().length},s.prototype.contain=function(a){return this.getChildren().indexOf(a)>-1},s.prototype.removeChild=function(a,u){void 0===u&&(u=!0),this.contain(a)&&a.remove(u)},s.prototype.findAll=function(a){var u=[];return Dt(this.getChildren(),function(v){a(v)&&u.push(v),v.isGroup()&&(u=u.concat(v.findAll(a)))}),u},s.prototype.find=function(a){var u=null;return Dt(this.getChildren(),function(v){if(a(v)?u=v:v.isGroup()&&(u=v.find(a)),u)return!1}),u},s.prototype.findById=function(a){return this.find(function(u){return u.get("id")===a})},s.prototype.findByClassName=function(a){return this.find(function(u){return u.get("className")===a})},s.prototype.findAllByName=function(a){return this.findAll(function(u){return u.get("name")===a})},s}(G0),Bl=0,Pl=0,kl=0,Lv=1e3,Xu=0,Hs=0,wh=0,ns="object"==typeof performance&&performance.now?performance:Date,Iv="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(o){setTimeout(o,17)};function Ov(){return Hs||(Iv(X0),Hs=ns.now()+wh)}function X0(){Hs=0}function Vu(){this._call=this._time=this._next=null}function _h(o,s,a){var u=new Vu;return u.restart(o,s,a),u}function Fv(){Hs=(Xu=ns.now())+wh,Bl=Pl=0;try{!function Rv(){Ov(),++Bl;for(var s,o=Uu;o;)(s=Hs-o._time)>=0&&o._call.call(null,s),o=o._next;--Bl}()}finally{Bl=0,function v2(){for(var o,a,s=Uu,u=1/0;s;)s._call?(u>s._time&&(u=s._time),o=s,s=s._next):(a=s._next,s._next=null,s=o?o._next=a:Uu=a);zl=o,Dv(u)}(),Hs=0}}function V0(){var o=ns.now(),s=o-Xu;s>Lv&&(wh-=s,Xu=o)}function Dv(o){Bl||(Pl&&(Pl=clearTimeout(Pl)),o-Hs>24?(o<1/0&&(Pl=setTimeout(Fv,o-ns.now()-wh)),kl&&(kl=clearInterval(kl))):(kl||(Xu=ns.now(),kl=setInterval(V0,Lv)),Bl=1,Iv(Fv)))}function Sh(o,s,a){o.prototype=s.prototype=a,a.constructor=o}function Bv(o,s){var a=Object.create(o.prototype);for(var u in s)a[u]=s[u];return a}function Nl(){}Vu.prototype=_h.prototype={constructor:Vu,restart:function(o,s,a){if("function"!=typeof o)throw new TypeError("callback is not a function");a=(null==a?Ov():+a)+(null==s?0:+s),!this._next&&zl!==this&&(zl?zl._next=this:Uu=this,zl=this),this._call=o,this._time=a,Dv()},stop:function(){this._call&&(this._call=null,this._time=1/0,Dv())}};var Gl=1/.7,Eo="\\s*([+-]?\\d+)\\s*",Yl="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",za="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Pv=/^#([0-9a-f]{3,8})$/,kv=new RegExp("^rgb\\("+[Eo,Eo,Eo]+"\\)$"),$0=new RegExp("^rgb\\("+[za,za,za]+"\\)$"),Z0=new RegExp("^rgba\\("+[Eo,Eo,Eo,Yl]+"\\)$"),Mh=new RegExp("^rgba\\("+[za,za,za,Yl]+"\\)$"),zv=new RegExp("^hsl\\("+[Yl,za,za]+"\\)$"),q0=new RegExp("^hsla\\("+[Yl,za,za,Yl]+"\\)$"),Nv={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Hv(){return this.rgb().formatHex()}function Gv(){return this.rgb().formatRgb()}function Wl(o){var s,a;return o=(o+"").trim().toLowerCase(),(s=Pv.exec(o))?(a=s[1].length,s=parseInt(s[1],16),6===a?Yv(s):3===a?new Qi(s>>8&15|s>>4&240,s>>4&15|240&s,(15&s)<<4|15&s,1):8===a?is(s>>24&255,s>>16&255,s>>8&255,(255&s)/255):4===a?is(s>>12&15|s>>8&240,s>>8&15|s>>4&240,s>>4&15|240&s,((15&s)<<4|15&s)/255):null):(s=kv.exec(o))?new Qi(s[1],s[2],s[3],1):(s=$0.exec(o))?new Qi(255*s[1]/100,255*s[2]/100,255*s[3]/100,1):(s=Z0.exec(o))?is(s[1],s[2],s[3],s[4]):(s=Mh.exec(o))?is(255*s[1]/100,255*s[2]/100,255*s[3]/100,s[4]):(s=zv.exec(o))?Uv(s[1],s[2]/100,s[3]/100,1):(s=q0.exec(o))?Uv(s[1],s[2]/100,s[3]/100,s[4]):Nv.hasOwnProperty(o)?Yv(Nv[o]):"transparent"===o?new Qi(NaN,NaN,NaN,0):null}function Yv(o){return new Qi(o>>16&255,o>>8&255,255&o,1)}function is(o,s,a,u){return u<=0&&(o=s=a=NaN),new Qi(o,s,a,u)}function Th(o,s,a,u){return 1===arguments.length?function Q0(o){return o instanceof Nl||(o=Wl(o)),o?new Qi((o=o.rgb()).r,o.g,o.b,o.opacity):new Qi}(o):new Qi(o,s,a,u??1)}function Qi(o,s,a,u){this.r=+o,this.g=+s,this.b=+a,this.opacity=+u}function Wv(){return"#"+Gs(this.r)+Gs(this.g)+Gs(this.b)}function Ul(){var o=this.opacity;return(1===(o=isNaN(o)?1:Math.max(0,Math.min(1,o)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===o?")":", "+o+")")}function Gs(o){return((o=Math.max(0,Math.min(255,Math.round(o)||0)))<16?"0":"")+o.toString(16)}function Uv(o,s,a,u){return u<=0?o=s=a=NaN:a<=0||a>=1?o=s=NaN:s<=0&&(o=NaN),new st(o,s,a,u)}function Xv(o){if(o instanceof st)return new st(o.h,o.s,o.l,o.opacity);if(o instanceof Nl||(o=Wl(o)),!o)return new st;if(o instanceof st)return o;var s=(o=o.rgb()).r/255,a=o.g/255,u=o.b/255,h=Math.min(s,a,u),v=Math.max(s,a,u),g=NaN,y=v-h,w=(v+h)/2;return y?(g=s===v?(a-u)/y+6*(a0&&w<1?0:g,new st(g,y,w,o.opacity)}function st(o,s,a,u){this.h=+o,this.s=+s,this.l=+a,this.opacity=+u}function Ft(o,s,a){return 255*(o<60?s+(a-s)*o/60:o<180?a:o<240?s+(a-s)*(240-o)/60:s)}function jt(o){return function(){return o}}function dr(o,s){var a=s-o;return a?function fe(o,s){return function(a){return o+a*s}}(o,a):jt(isNaN(o)?s:o)}Sh(Nl,Wl,{copy:function(o){return Object.assign(new this.constructor,this,o)},displayable:function(){return this.rgb().displayable()},hex:Hv,formatHex:Hv,formatHsl:function K0(){return Xv(this).formatHsl()},formatRgb:Gv,toString:Gv}),Sh(Qi,Th,Bv(Nl,{brighter:function(o){return o=null==o?Gl:Math.pow(Gl,o),new Qi(this.r*o,this.g*o,this.b*o,this.opacity)},darker:function(o){return o=null==o?.7:Math.pow(.7,o),new Qi(this.r*o,this.g*o,this.b*o,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Wv,formatHex:Wv,formatRgb:Ul,toString:Ul})),Sh(st,function J0(o,s,a,u){return 1===arguments.length?Xv(o):new st(o,s,a,u??1)},Bv(Nl,{brighter:function(o){return o=null==o?Gl:Math.pow(Gl,o),new st(this.h,this.s,this.l*o,this.opacity)},darker:function(o){return o=null==o?.7:Math.pow(.7,o),new st(this.h,this.s,this.l*o,this.opacity)},rgb:function(){var o=this.h%360+360*(this.h<0),s=isNaN(o)||isNaN(this.s)?0:this.s,a=this.l,u=a+(a<.5?a:1-a)*s,h=2*a-u;return new Qi(Ft(o>=240?o-240:o+120,h,u),Ft(o,h,u),Ft(o<120?o+240:o-120,h,u),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var o=this.opacity;return(1===(o=isNaN(o)?1:Math.max(0,Math.min(1,o)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===o?")":", "+o+")")}}));var an=function o(s){var a=function $e(o){return 1==(o=+o)?dr:function(s,a){return a-s?function Le(o,s,a){return o=Math.pow(o,a),s=Math.pow(s,a)-o,a=1/a,function(u){return Math.pow(o+u*s,a)}}(s,a,o):jt(isNaN(s)?a:s)}}(s);function u(h,v){var g=a((h=Th(h)).r,(v=Th(v)).r),y=a(h.g,v.g),w=a(h.b,v.b),M=dr(h.opacity,v.opacity);return function(A){return h.r=g(A),h.g=y(A),h.b=w(A),h.opacity=M(A),h+""}}return u.gamma=o,u}(1);function Oi(o,s){s||(s=[]);var h,a=o?Math.min(s.length,o.length):0,u=s.slice();return function(v){for(h=0;ha&&(v=s.slice(a,v),y[g]?y[g]+=v:y[++g]=v),(u=u[0])===(h=h[0])?y[g]?y[g]+=h:y[++g]=h:(y[++g]=null,w.push({i:g,x:Rn(u,h)})),a=Ys.lastIndex;return aM.length?(w=J(v[y]),M=J(h[y]),M=He(M,w),M=qe(M,w),s.fromAttrs.path=M,s.toAttrs.path=w):s.pathFormatted||(w=J(v[y]),M=J(h[y]),M=qe(M,w),s.fromAttrs.path=M,s.toAttrs.path=w,s.pathFormatted=!0),u[y]=[];for(var A=0;A0){for(var y=s.animators.length-1;y>=0;y--)if((u=s.animators[y]).destroyed)s.removeAnimator(y);else{if(!u.isAnimatePaused())for(var w=(h=u.get("animations")).length-1;w>=0;w--)wE(u,v=h[w],g)&&(h.splice(w,1),v.callback&&v.callback());0===h.length&&s.removeAnimator(y)}s.canvas.get("autoDraw")||s.canvas.draw()}})},o.prototype.addAnimator=function(s){this.animators.push(s)},o.prototype.removeAnimator=function(s){this.animators.splice(s,1)},o.prototype.isAnimating=function(){return!!this.animators.length},o.prototype.stop=function(){this.timer&&this.timer.stop()},o.prototype.stopAllAnimations=function(s){void 0===s&&(s=!0),this.animators.forEach(function(a){a.stopAnimate(s)}),this.animators=[],this.canvas.draw()},o.prototype.getTime=function(){return this.current},o}(),sg=["mousedown","mouseup","dblclick","mouseout","mouseover","mousemove","mouseleave","mouseenter","touchstart","touchmove","touchend","dragenter","dragover","dragleave","drop","contextmenu","mousewheel"];function lg(o,s,a){a.name=s,a.target=o,a.currentTarget=o,a.delegateTarget=o,o.emit(s,a)}function ME(o,s,a){if(a.bubbles){var u=void 0,h=!1;if("mouseenter"===s?(u=a.fromShape,h=!0):"mouseleave"===s&&(h=!0,u=a.toShape),o.isCanvas()&&h)return;if(u&&zr(o,u))return void(a.bubbles=!1);a.name=s,a.currentTarget=o,a.delegateTarget=o,o.emit(s,a)}}var b2=function(){function o(s){var a=this;this.draggingShape=null,this.dragging=!1,this.currentShape=null,this.mousedownShape=null,this.mousedownPoint=null,this._eventCallback=function(u){a._triggerEvent(u.type,u)},this._onDocumentMove=function(u){if(a.canvas.get("el")!==u.target&&(a.dragging||a.currentShape)){var g=a._getPointInfo(u);a.dragging&&a._emitEvent("drag",u,g,a.draggingShape)}},this._onDocumentMouseUp=function(u){if(a.canvas.get("el")!==u.target&&a.dragging){var g=a._getPointInfo(u);a.draggingShape&&a._emitEvent("drop",u,g,null),a._emitEvent("dragend",u,g,a.draggingShape),a._afterDrag(a.draggingShape,g,u)}},this.canvas=s.canvas}return o.prototype.init=function(){this._bindEvents()},o.prototype._bindEvents=function(){var s=this,a=this.canvas.get("el");Dt(sg,function(u){a.addEventListener(u,s._eventCallback)}),document&&(document.addEventListener("mousemove",this._onDocumentMove),document.addEventListener("mouseup",this._onDocumentMouseUp))},o.prototype._clearEvents=function(){var s=this,a=this.canvas.get("el");Dt(sg,function(u){a.removeEventListener(u,s._eventCallback)}),document&&(document.removeEventListener("mousemove",this._onDocumentMove),document.removeEventListener("mouseup",this._onDocumentMouseUp))},o.prototype._getEventObj=function(s,a,u,h,v,g){var y=new er(s,a);return y.fromShape=v,y.toShape=g,y.x=u.x,y.y=u.y,y.clientX=u.clientX,y.clientY=u.clientY,y.propagationPath.push(h),y},o.prototype._getShape=function(s,a){return this.canvas.getShape(s.x,s.y,a)},o.prototype._getPointInfo=function(s){var a=this.canvas,u=a.getClientByEvent(s),h=a.getPointByEvent(s);return{x:h.x,y:h.y,clientX:u.x,clientY:u.y}},o.prototype._triggerEvent=function(s,a){var u=this._getPointInfo(a),h=this._getShape(u,a),v=this["_on"+s],g=!1;if(v)v.call(this,u,h,a);else{var y=this.currentShape;"mouseenter"===s||"dragenter"===s||"mouseover"===s?(this._emitEvent(s,a,u,null,null,h),h&&this._emitEvent(s,a,u,h,null,h),"mouseenter"===s&&this.draggingShape&&this._emitEvent("dragenter",a,u,null)):"mouseleave"===s||"dragleave"===s||"mouseout"===s?(g=!0,y&&this._emitEvent(s,a,u,y,y,null),this._emitEvent(s,a,u,null,y,null),"mouseleave"===s&&this.draggingShape&&this._emitEvent("dragleave",a,u,null)):this._emitEvent(s,a,u,h,null,null)}if(g||(this.currentShape=h),h&&!h.get("destroyed")){var w=this.canvas;w.get("el").style.cursor=h.attr("cursor")||w.get("cursor")}},o.prototype._onmousedown=function(s,a,u){0===u.button&&(this.mousedownShape=a,this.mousedownPoint=s,this.mousedownTimeStamp=u.timeStamp),this._emitEvent("mousedown",u,s,a,null,null)},o.prototype._emitMouseoverEvents=function(s,a,u,h){var v=this.canvas.get("el");u!==h&&(u&&(this._emitEvent("mouseout",s,a,u,u,h),this._emitEvent("mouseleave",s,a,u,u,h),(!h||h.get("destroyed"))&&(v.style.cursor=this.canvas.get("cursor"))),h&&(this._emitEvent("mouseover",s,a,h,u,h),this._emitEvent("mouseenter",s,a,h,u,h)))},o.prototype._emitDragoverEvents=function(s,a,u,h,v){h?(h!==u&&(u&&this._emitEvent("dragleave",s,a,u,u,h),this._emitEvent("dragenter",s,a,h,u,h)),v||this._emitEvent("dragover",s,a,h)):u&&this._emitEvent("dragleave",s,a,u,u,h),v&&this._emitEvent("dragover",s,a,h)},o.prototype._afterDrag=function(s,a,u){s&&(s.set("capture",!0),this.draggingShape=null),this.dragging=!1;var h=this._getShape(a,u);h!==s&&this._emitMouseoverEvents(u,a,s,h),this.currentShape=h},o.prototype._onmouseup=function(s,a,u){if(0===u.button){var h=this.draggingShape;this.dragging?(h&&this._emitEvent("drop",u,s,a),this._emitEvent("dragend",u,s,h),this._afterDrag(h,s,u)):(this._emitEvent("mouseup",u,s,a),a===this.mousedownShape&&this._emitEvent("click",u,s,a),this.mousedownShape=null,this.mousedownPoint=null)}},o.prototype._ondragover=function(s,a,u){u.preventDefault(),this._emitDragoverEvents(u,s,this.currentShape,a,!0)},o.prototype._onmousemove=function(s,a,u){var h=this.canvas,v=this.currentShape,g=this.draggingShape;if(this.dragging)g&&this._emitDragoverEvents(u,s,v,a,!1),this._emitEvent("drag",u,s,g);else{var y=this.mousedownPoint;if(y){var w=this.mousedownShape,L=y.clientX-s.clientX,O=y.clientY-s.clientY;u.timeStamp-this.mousedownTimeStamp>120||L*L+O*O>40?w&&w.get("draggable")?((g=this.mousedownShape).set("capture",!1),this.draggingShape=g,this.dragging=!0,this._emitEvent("dragstart",u,s,g),this.mousedownShape=null,this.mousedownPoint=null):!w&&h.get("draggable")?(this.dragging=!0,this._emitEvent("dragstart",u,s,null),this.mousedownShape=null,this.mousedownPoint=null):(this._emitMouseoverEvents(u,s,v,a),this._emitEvent("mousemove",u,s,a)):(this._emitMouseoverEvents(u,s,v,a),this._emitEvent("mousemove",u,s,a))}else this._emitMouseoverEvents(u,s,v,a),this._emitEvent("mousemove",u,s,a)}},o.prototype._emitEvent=function(s,a,u,h,v,g){var y=this._getEventObj(s,a,u,h,v,g);if(h){y.shape=h,lg(h,s,y);for(var w=h.getParent();w;)w.emitDelegation(s,y),y.propagationStopped||ME(w,s,y),y.propagationPath.push(w),w=w.getParent()}else lg(this.canvas,s,y)},o.prototype.destroy=function(){this._clearEvents(),this.canvas=null,this.currentShape=null,this.draggingShape=null,this.mousedownPoint=null,this.mousedownShape=null,this.mousedownTimeStamp=null},o}(),cg=function zs(o){return o?wv(o):typeof document>"u"&&typeof navigator<"u"&&"ReactNative"===navigator.product?new Ps:typeof navigator<"u"?wv(navigator.userAgent):function Fl(){return typeof process<"u"&&process.version?new Il(process.version.slice(1)):null}()}(),A2=cg&&"firefox"===cg.name,E2=function(o){function s(a){var u=o.call(this,a)||this;return u.initContainer(),u.initDom(),u.initEvents(),u.initTimeline(),u}return sr(s,o),s.prototype.getDefaultCfg=function(){var a=o.prototype.getDefaultCfg.call(this);return a.cursor="default",a.supportCSSTransform=!1,a},s.prototype.initContainer=function(){var a=this.get("container");Yt(a)&&(a=document.getElementById(a),this.set("container",a))},s.prototype.initDom=function(){var a=this.createDom();this.set("el",a),this.get("container").appendChild(a),this.setDOMSize(this.get("width"),this.get("height"))},s.prototype.initEvents=function(){var a=new b2({canvas:this});a.init(),this.set("eventController",a)},s.prototype.initTimeline=function(){var a=new _E(this);this.set("timeline",a)},s.prototype.setDOMSize=function(a,u){var h=this.get("el");Hr&&(h.style.width=a+"px",h.style.height=u+"px")},s.prototype.changeSize=function(a,u){this.setDOMSize(a,u),this.set("width",a),this.set("height",u),this.onCanvasChange("changeSize")},s.prototype.getRenderer=function(){return this.get("renderer")},s.prototype.getCursor=function(){return this.get("cursor")},s.prototype.setCursor=function(a){this.set("cursor",a);var u=this.get("el");Hr&&u&&(u.style.cursor=a)},s.prototype.getPointByEvent=function(a){if(this.get("supportCSSTransform")){if(A2&&!se(a.layerX)&&a.layerX!==a.offsetX)return{x:a.layerX,y:a.layerY};if(!se(a.offsetX))return{x:a.offsetX,y:a.offsetY}}var h=this.getClientByEvent(a);return this.getPointByClient(h.x,h.y)},s.prototype.getClientByEvent=function(a){var u=a;return a.touches&&(u="touchend"===a.type?a.changedTouches[0]:a.touches[0]),{x:u.clientX,y:u.clientY}},s.prototype.getPointByClient=function(a,u){var v=this.get("el").getBoundingClientRect();return{x:a-v.left,y:u-v.top}},s.prototype.getClientByPoint=function(a,u){var v=this.get("el").getBoundingClientRect();return{x:a+v.left,y:u+v.top}},s.prototype.draw=function(){},s.prototype.removeDom=function(){var a=this.get("el");a.parentNode.removeChild(a)},s.prototype.clearEvents=function(){this.get("eventController").destroy()},s.prototype.isCanvas=function(){return!0},s.prototype.getParent=function(){return null},s.prototype.destroy=function(){var a=this.get("timeline");this.get("destroyed")||(this.clear(),a&&a.stop(),this.clearEvents(),this.removeDom(),o.prototype.destroy.call(this))},s}(U0),TE=function(o){function s(){return null!==o&&o.apply(this,arguments)||this}return sr(s,o),s.prototype.isGroup=function(){return!0},s.prototype.isEntityGroup=function(){return!1},s.prototype.clone=function(){for(var a=o.prototype.clone.call(this),u=this.getChildren(),h=0;h=a&&h.minY<=u&&h.maxY>=u},s.prototype.afterAttrsChange=function(a){o.prototype.afterAttrsChange.call(this,a),this.clearCacheBBox()},s.prototype.getBBox=function(){var a=this.cfg.bbox;return a||(a=this.calculateBBox(),this.set("bbox",a)),a},s.prototype.getCanvasBBox=function(){var a=this.cfg.canvasBBox;return a||(a=this.calculateCanvasBBox(),this.set("canvasBBox",a)),a},s.prototype.applyMatrix=function(a){o.prototype.applyMatrix.call(this,a),this.set("canvasBBox",null)},s.prototype.calculateCanvasBBox=function(){var a=this.getBBox(),u=this.getTotalMatrix(),h=a.minX,v=a.minY,g=a.maxX,y=a.maxY;if(u){var w=rs(u,[a.minX,a.minY]),M=rs(u,[a.maxX,a.minY]),A=rs(u,[a.minX,a.maxY]),L=rs(u,[a.maxX,a.maxY]);h=Math.min(w[0],M[0],A[0],L[0]),g=Math.max(w[0],M[0],A[0],L[0]),v=Math.min(w[1],M[1],A[1],L[1]),y=Math.max(w[1],M[1],A[1],L[1])}var O=this.attrs;if(O.shadowColor){var D=O.shadowBlur,k=void 0===D?0:D,X=O.shadowOffsetX,tt=void 0===X?0:X,ot=O.shadowOffsetY,ft=void 0===ot?0:ot,pt=g+k+tt,Wt=v-k+ft,de=y+k+ft;h=Math.min(h,h-k+tt),g=Math.max(g,pt),v=Math.min(v,Wt),y=Math.max(y,de)}return{x:h,y:v,minX:h,minY:v,maxX:g,maxY:y,width:g-h,height:y-v}},s.prototype.clearCacheBBox=function(){this.set("bbox",null),this.set("canvasBBox",null)},s.prototype.isClipShape=function(){return this.get("isClipShape")},s.prototype.isInShape=function(a,u){return!1},s.prototype.isOnlyHitBox=function(){return!1},s.prototype.isHit=function(a,u){var h=this.get("startArrowShape"),v=this.get("endArrowShape"),g=[a,u,1],y=(g=this.invertFromMatrix(g))[0],w=g[1],M=this._isInBBox(y,w);return this.isOnlyHitBox()?M:!(!M||this.isClipped(y,w)||!(this.isInShape(y,w)||h&&h.isHit(y,w)||v&&v.isHit(y,w)))},s}(G0),Jv=new Map;function Zr(o,s){Jv.set(o,s)}function Xl(o){var s=o.attr();return{x:s.x,y:s.y,width:s.width,height:s.height}}function I2(o){var s=o.attr(),h=s.r;return{x:s.x-h,y:s.y-h,width:2*h,height:2*h}}function Qu(o){return Math.min.apply(null,o)}function jv(o){return Math.max.apply(null,o)}function zi(o,s,a,u){var h=o-a,v=s-u;return Math.sqrt(h*h+v*v)}function td(o,s){return Math.abs(o-s)<.001}function Ju(o,s){var a=Qu(o),u=Qu(s);return{x:a,y:u,width:jv(o)-a,height:jv(s)-u}}function ed(o){return(o+2*Math.PI)%(2*Math.PI)}var aa={box:function(o,s,a,u){return Ju([o,a],[s,u])},length:function(o,s,a,u){return zi(o,s,a,u)},pointAt:function(o,s,a,u,h){return{x:(1-h)*o+h*a,y:(1-h)*s+h*u}},pointDistance:function(o,s,a,u,h,v){var g=(a-o)*(h-o)+(u-s)*(v-s);return g<0?zi(o,s,h,v):g>(a-o)*(a-o)+(u-s)*(u-s)?zi(a,u,h,v):this.pointToLine(o,s,a,u,h,v)},pointToLine:function(o,s,a,u,h,v){var g=[a-o,u-s];if(function E(o,s){return o[0]===s[0]&&o[1]===s[1]}(g,[0,0]))return Math.sqrt((h-o)*(h-o)+(v-s)*(v-s));var y=[-g[1],g[0]];return function P0(o,s){var a=s[0],u=s[1],h=a*a+u*u;h>0&&(h=1/Math.sqrt(h)),o[0]=s[0]*h,o[1]=s[1]*h}(y,y),Math.abs(function k0(o,s){return o[0]*s[0]+o[1]*s[1]}([h-o,v-s],y))},tangentAngle:function(o,s,a,u){return Math.atan2(u-s,a-o)}},AE=1e-4;function O2(o,s,a,u,h,v){var g,y=1/0,w=[a,u],M=20;v&&v>200&&(M=v/10);for(var A=1/M,L=A/10,O=0;O<=M;O++){var D=O*A,k=[h.apply(null,o.concat([D])),h.apply(null,s.concat([D]))];(X=zi(w[0],w[1],k[0],k[1]))=0&&X=0?[h]:[]}function fg(o,s,a,u){return 2*(1-u)*(s-o)+2*u*(a-s)}function rd(o,s,a,u,h,v,g){var y=Xs(o,a,h,g),w=Xs(s,u,v,g),M=aa.pointAt(o,s,a,u,g),A=aa.pointAt(a,u,h,v,g);return[[o,s,M.x,M.y,y,w],[y,w,A.x,A.y,h,v]]}function nd(o,s,a,u,h,v,g){if(0===g)return(zi(o,s,a,u)+zi(a,u,h,v)+zi(o,s,h,v))/2;var y=rd(o,s,a,u,h,v,.5),w=y[0],M=y[1];return w.push(g-1),M.push(g-1),nd.apply(null,w)+nd.apply(null,M)}var vg={box:function(o,s,a,u,h,v){var g=hg(o,a,h)[0],y=hg(s,u,v)[0],w=[o,h],M=[s,v];return void 0!==g&&w.push(Xs(o,a,h,g)),void 0!==y&&M.push(Xs(s,u,v,y)),Ju(w,M)},length:function(o,s,a,u,h,v){return nd(o,s,a,u,h,v,3)},nearestPoint:function(o,s,a,u,h,v,g,y){return O2([o,a,h],[s,u,v],g,y,Xs)},pointDistance:function(o,s,a,u,h,v,g,y){var w=this.nearestPoint(o,s,a,u,h,v,g,y);return zi(w.x,w.y,g,y)},interpolationAt:Xs,pointAt:function(o,s,a,u,h,v,g){return{x:Xs(o,a,h,g),y:Xs(s,u,v,g)}},divide:function(o,s,a,u,h,v,g){return rd(o,s,a,u,h,v,g)},tangentAngle:function(o,s,a,u,h,v,g){var y=fg(o,a,h,g),w=fg(s,u,v,g);return ed(Math.atan2(w,y))}};function Vl(o,s,a,u,h){var v=1-h;return v*v*v*o+3*s*h*v*v+3*a*h*h*v+u*h*h*h}function R2(o,s,a,u,h){var v=1-h;return 3*(v*v*(s-o)+2*v*h*(a-s)+h*h*(u-a))}function dg(o,s,a,u){var w,M,A,h=-3*o+9*s-9*a+3*u,v=6*o-12*s+6*a,g=3*s-3*o,y=[];if(td(h,0))td(v,0)||(w=-g/v)>=0&&w<=1&&y.push(w);else{var L=v*v-4*h*g;td(L,0)?y.push(-v/(2*h)):L>0&&(M=(-v-(A=Math.sqrt(L)))/(2*h),(w=(-v+A)/(2*h))>=0&&w<=1&&y.push(w),M>=0&&M<=1&&y.push(M))}return y}function F2(o,s,a,u,h,v,g,y,w){var M=Vl(o,a,h,g,w),A=Vl(s,u,v,y,w),L=aa.pointAt(o,s,a,u,w),O=aa.pointAt(a,u,h,v,w),D=aa.pointAt(h,v,g,y,w),k=aa.pointAt(L.x,L.y,O.x,O.y,w),X=aa.pointAt(O.x,O.y,D.x,D.y,w);return[[o,s,L.x,L.y,k.x,k.y,M,A],[M,A,X.x,X.y,D.x,D.y,g,y]]}function id(o,s,a,u,h,v,g,y,w){if(0===w)return function EE(o,s){for(var a=0,u=o.length,h=0;hM&&(M=D)}var k=function B2(o,s,a){return Math.atan(s/(o*Math.tan(a)))}(a,u,h),X=1/0,tt=-1/0,ot=[v,g];for(L=2*-Math.PI;L<=2*Math.PI;L+=Math.PI){var ft=k+L;vtt&&(tt=ht)}return{x:w,y:X,width:M-w,height:tt-X}};function G2(o,s){return o&&s?{minX:Math.min(o.minX,s.minX),minY:Math.min(o.minY,s.minY),maxX:Math.max(o.maxX,s.maxX),maxY:Math.max(o.maxY,s.maxY)}:o||s}function Rh(o,s){var a=o.get("startArrowShape"),u=o.get("endArrowShape");return a&&(s=G2(s,a.getCanvasBBox())),u&&(s=G2(s,u.getCanvasBBox())),s}var Fh=null;function Y2(){if(!Fh){var o=document.createElement("canvas");o.width=1,o.height=1,Fh=o.getContext("2d")}return Fh}function W2(o,s,a){var u=1;if(Yt(o)&&(u=o.split("\n").length),u>1){var h=function PE(o,s){return s?s-o:.14*o}(s,a);return s*u+h*(u-1)}return s}function xg(o){return[o.fontStyle,o.fontVariant,o.fontWeight,o.fontSize+"px",o.fontFamily].join(" ").trim()}var kE=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/gi,HP=/[^\s\,]+/gi,Dh="\t\n\v\f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029",X2=new RegExp("([a-z])["+Dh+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+Dh+"]*,?["+Dh+"]*)+)","ig"),NE=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+Dh+"]*,?["+Dh+"]*","ig"),GE=/[a-z]/;function V2(o,s){return[s[0]+(s[0]-o[0]),s[1]+(s[1]-o[1])]}function $2(o){var s=function HE(o){if(!o)return null;if(ne(o))return o;var s={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},a=[];return String(o).replace(X2,function(u,h,v){var g=[],y=h.toLowerCase();if(v.replace(NE,function(w,M){M&&g.push(+M)}),"m"===y&&g.length>2&&(a.push([h].concat(g.splice(0,2))),y="l",h="m"===h?"l":"L"),"o"===y&&1===g.length&&a.push([h,g[0]]),"r"===y)a.push([h].concat(g));else for(;g.length>=s[y]&&(a.push([h].concat(g.splice(0,s[y]))),s[y]););return""}),a}(o);if(!s||!s.length)return[["M",0,0]];for(var a=!1,u=0;u=0){a=!0;break}if(!a)return s;var v=[],g=0,y=0,w=0,M=0,A=0,L=s[0];("M"===L[0]||"m"===L[0])&&(w=g=+L[1],M=y=+L[2],A++,v[0]=["M",g,y]),u=A;for(var O=s.length;u1&&(a*=Math.sqrt(D),u*=Math.sqrt(D));var k=a*a*(O*O)+u*u*(L*L),X=k?Math.sqrt((a*a*(u*u)-k)/k):1;v===g&&(X*=-1),isNaN(X)&&(X=0);var tt=u?X*a*O/u:0,ot=a?X*-u*L/a:0,ft=(y+M)/2+Math.cos(h)*tt-Math.sin(h)*ot,ht=(w+A)/2+Math.sin(h)*tt+Math.cos(h)*ot,pt=[(L-tt)/a,(O-ot)/u],Wt=[(-1*L-tt)/a,(-1*O-ot)/u],de=wg([1,0],pt),pe=wg(pt,Wt);return Cg(pt,Wt)<=-1&&(pe=Math.PI),Cg(pt,Wt)>=1&&(pe=0),0===g&&pe>0&&(pe-=2*Math.PI),1===g&&pe<0&&(pe+=2*Math.PI),{cx:ft,cy:ht,rx:Z2(o,[M,A])?0:a,ry:Z2(o,[M,A])?0:u,startAngle:de,endAngle:de+pe,xRotation:h,arcFlag:v,sweepFlag:g}}function K2(o,s){return[s[0]+(s[0]-o[0]),s[1]+(s[1]-o[1])]}function Q2(o){o=function zE(o){var s=o||[];return ne(s)?s:Yt(s)?(Dt(s=s.match(kE),function(a,u){if((a=a.match(HP))[0].length>1){var h=a[0].charAt(0);a.splice(1,0,a[0].substr(1)),a[0]=h}Dt(a,function(v,g){isNaN(v)||(a[g]=+v)}),s[u]=a}),s):void 0}(o);for(var s=[],a=null,u=null,h=null,v=0,g=o.length,y=0;yMath.PI/2?Math.PI-M:M,A=A>Math.PI/2?Math.PI-A:A,{xExtra:Math.cos(w/2-M)*(s/2*(1/Math.sin(w/2)))-s/2||0,yExtra:Math.cos(A-w/2)*(s/2*(1/Math.sin(w/2)))-s/2||0}}function UE(o,s,a,u){var h=o-a,v=s-u;return Math.sqrt(h*h+v*v)}function tc(o,s,a,u,h,v){return h>=o&&h<=o+a&&v>=s&&v<=s+u}function od(o,s){return!(s.minX>o.maxX||s.maxXo.maxY||s.maxY=0&&h<.5*Math.PI?(y={x:g.minX,y:g.minY},w={x:g.maxX,y:g.maxY}):.5*Math.PI<=h&&h1&&(a*=Math.sqrt(D),u*=Math.sqrt(D));var k=a*a*(O*O)+u*u*(L*L),X=k?Math.sqrt((a*a*(u*u)-k)/k):1;v===g&&(X*=-1),isNaN(X)&&(X=0);var tt=u?X*a*O/u:0,ot=a?X*-u*L/a:0,ft=(y+M)/2+Math.cos(h)*tt-Math.sin(h)*ot,ht=(w+A)/2+Math.sin(h)*tt+Math.cos(h)*ot,pt=[(L-tt)/a,(O-ot)/u],Wt=[(-1*L-tt)/a,(-1*O-ot)/u],de=eC([1,0],pt),pe=eC(pt,Wt);return bg(pt,Wt)<=-1&&(pe=Math.PI),bg(pt,Wt)>=1&&(pe=0),0===g&&pe>0&&(pe-=2*Math.PI),1===g&&pe<0&&(pe+=2*Math.PI),{cx:ft,cy:ht,rx:_g(o,[M,A])?0:a,ry:_g(o,[M,A])?0:u,startAngle:de,endAngle:de+pe,xRotation:h,arcFlag:v,sweepFlag:g}}var ld=Math.sin,ud=Math.cos,Io=Math.atan2,cd=Math.PI;function kh(o,s,a,u,h,v,g){var y=s.stroke,w=s.lineWidth,L=Io(u-v,a-h),O=new pd({type:"path",canvas:o.get("canvas"),isArrowShape:!0,attrs:{path:"M"+10*ud(cd/6)+","+10*ld(cd/6)+" L0,0 L"+10*ud(cd/6)+",-"+10*ld(cd/6),stroke:y,lineWidth:w}});O.translate(h,v),O.rotateAtPoint(h,v,L),o.set(g?"startArrowShape":"endArrowShape",O)}function nC(o,s,a,u,h,v,g){var M=s.stroke,A=s.lineWidth,L=g?s.startArrow:s.endArrow,O=L.d,D=L.fill,k=L.stroke,X=L.lineWidth,tt=function Qt(o,s){var a={};for(var u in o)Object.prototype.hasOwnProperty.call(o,u)&&s.indexOf(u)<0&&(a[u]=o[u]);if(null!=o&&"function"==typeof Object.getOwnPropertySymbols){var h=0;for(u=Object.getOwnPropertySymbols(o);hWt?pt:Wt,Ze=pt>Wt?1:pt/Wt,tr=pt>Wt?Wt/pt:1;s.translate(ft,ht),s.rotate(Me),s.scale(Ze,tr),s.arc(0,0,Oe,de,pe,1-ze),s.scale(1/Ze,1/tr),s.rotate(-Me),s.translate(-ft,-ht)}break;case"Z":s.closePath()}if("Z"===O)y=w;else{var vr=L.length;y=[L[vr-2],L[vr-1]]}}}}function fd(o,s){var a=o.get("canvas");a&&("remove"===s&&(o._cacheCanvasBBox=o.get("cacheCanvasBBox")),o.get("hasChanged")||(o.set("hasChanged",!0),o.cfg.parent&&o.cfg.parent.get("hasChanged")||(a.refreshElement(o,s,a),a.get("autoDraw")&&a.draw())))}var ls=function(o){function s(){return null!==o&&o.apply(this,arguments)||this}return ve(s,o),s.prototype.onCanvasChange=function(a){fd(this,a)},s.prototype.getShapeBase=function(){return ae},s.prototype.getGroupBase=function(){return s},s.prototype._applyClip=function(a,u){u&&(a.save(),ec(a,u),u.createPath(a),a.restore(),a.clip(),u._afterDraw())},s.prototype.cacheCanvasBBox=function(){var u=[],h=[];Dt(this.cfg.children,function(O){var D=O.cfg.cacheCanvasBBox;D&&O.cfg.isInView&&(u.push(D.minX,D.maxX),h.push(D.minY,D.maxY))});var v=null;if(u.length){var g=dt(u),y=ut(u),w=dt(h),M=ut(h);v={minX:g,minY:w,x:g,y:w,maxX:y,maxY:M,width:y-g,height:M-w};var A=this.cfg.canvas;if(A){var L=A.getViewRange();this.set("isInView",od(v,L))}}else this.set("isInView",!1);this.set("cacheCanvasBBox",v)},s.prototype.draw=function(a,u){var h=this.cfg.children;h.length&&(!u||this.cfg.refresh)&&(a.save(),ec(a,this),this._applyClip(a,this.getClip()),Lg(a,h,u),a.restore(),this.cacheCanvasBBox()),this.cfg.refresh=null,this.set("hasChanged",!1)},s.prototype.skipDraw=function(){this.set("cacheCanvasBBox",null),this.set("hasChanged",!1)},s}(TE),VP=function(o){function s(){return null!==o&&o.apply(this,arguments)||this}return ve(s,o),s.prototype.getDefaultAttrs=function(){var a=o.prototype.getDefaultAttrs.call(this);return Zt(Zt({},a),{lineWidth:1,lineAppendWidth:0,strokeOpacity:1,fillOpacity:1})},s.prototype.getShapeBase=function(){return ae},s.prototype.getGroupBase=function(){return ls},s.prototype.onCanvasChange=function(a){fd(this,a)},s.prototype.calculateBBox=function(){var a=this.get("type"),u=this.getHitLineWidth(),h=function L2(o){return Jv.get(o)}(a),v=h(this),g=u/2,y=v.x-g,w=v.y-g;return{x:y,minX:y,y:w,minY:w,width:v.width+u,height:v.height+u,maxX:v.x+v.width+g,maxY:v.y+v.height+g}},s.prototype.isFill=function(){return!!this.attrs.fill||this.isClipShape()},s.prototype.isStroke=function(){return!!this.attrs.stroke},s.prototype._applyClip=function(a,u){u&&(a.save(),ec(a,u),u.createPath(a),a.restore(),a.clip(),u._afterDraw())},s.prototype.draw=function(a,u){var h=this.cfg.clipShape;if(u){if(!1===this.cfg.refresh)return void this.set("hasChanged",!1);if(!od(u,this.getCanvasBBox()))return this.set("hasChanged",!1),void(this.cfg.isInView&&this._afterDraw())}a.save(),ec(a,this),this._applyClip(a,h),this.drawPath(a),a.restore(),this._afterDraw()},s.prototype.getCanvasViewBox=function(){var a=this.cfg.canvas;return a?a.getViewRange():null},s.prototype.cacheCanvasBBox=function(){var a=this.getCanvasViewBox();if(a){var u=this.getCanvasBBox(),h=od(u,a);this.set("isInView",h),this.set("cacheCanvasBBox",h?u:null)}},s.prototype._afterDraw=function(){this.cacheCanvasBBox(),this.set("hasChanged",!1),this.set("refresh",null)},s.prototype.skipDraw=function(){this.set("cacheCanvasBBox",null),this.set("isInView",null),this.set("hasChanged",!1)},s.prototype.drawPath=function(a){this.createPath(a),this.strokeAndFill(a),this.afterDrawPath(a)},s.prototype.fill=function(a){a.fill()},s.prototype.stroke=function(a){a.stroke()},s.prototype.strokeAndFill=function(a){var u=this.attrs,h=u.lineWidth,v=u.opacity,g=u.strokeOpacity,y=u.fillOpacity;this.isFill()&&(se(y)||1===y?this.fill(a):(a.globalAlpha=y,this.fill(a),a.globalAlpha=v)),this.isStroke()&&h>0&&(!se(g)&&1!==g&&(a.globalAlpha=g),this.stroke(a)),this.afterDrawPath(a)},s.prototype.createPath=function(a){},s.prototype.afterDrawPath=function(a){},s.prototype.isInShape=function(a,u){var h=this.isStroke(),v=this.isFill(),g=this.getHitLineWidth();return this.isInStrokeOrPath(a,u,h,v,g)},s.prototype.isInStrokeOrPath=function(a,u,h,v,g){return!1},s.prototype.getHitLineWidth=function(){if(!this.isStroke())return 0;var a=this.attrs;return a.lineWidth+a.lineAppendWidth},s}(bE),Ro=VP,$P=function(o){function s(){return null!==o&&o.apply(this,arguments)||this}return ve(s,o),s.prototype.getDefaultAttrs=function(){var a=o.prototype.getDefaultAttrs.call(this);return Zt(Zt({},a),{x:0,y:0,r:0})},s.prototype.isInStrokeOrPath=function(a,u,h,v,g){var y=this.attr(),A=y.r,L=g/2,O=UE(y.x,y.y,a,u);return v&&h?O<=A+L:v?O<=A:!!h&&O>=A-L&&O<=A+L},s.prototype.createPath=function(a){var u=this.attr(),h=u.x,v=u.y,g=u.r;a.beginPath(),a.arc(h,v,g,0,2*Math.PI,!1),a.closePath()},s}(Ro),ZP=$P;function Og(o,s,a,u){return o/(a*a)+s/(u*u)}var qP=function(o){function s(){return null!==o&&o.apply(this,arguments)||this}return ve(s,o),s.prototype.getDefaultAttrs=function(){var a=o.prototype.getDefaultAttrs.call(this);return Zt(Zt({},a),{x:0,y:0,rx:0,ry:0})},s.prototype.isInStrokeOrPath=function(a,u,h,v,g){var y=this.attr(),w=g/2,M=y.x,A=y.y,L=y.rx,O=y.ry,D=(a-M)*(a-M),k=(u-A)*(u-A);return v&&h?Og(D,k,L+w,O+w)<=1:v?Og(D,k,L,O)<=1:!!h&&Og(D,k,L-w,O-w)>=1&&Og(D,k,L+w,O+w)<=1},s.prototype.createPath=function(a){var u=this.attr(),h=u.x,v=u.y,g=u.rx,y=u.ry;if(a.beginPath(),a.ellipse)a.ellipse(h,v,g,y,0,0,2*Math.PI,!1);else{var w=g>y?g:y,M=g>y?1:g/y,A=g>y?y/g:1;a.save(),a.translate(h,v),a.scale(M,A),a.arc(0,0,w,0,2*Math.PI),a.restore(),a.closePath()}},s}(Ro),oC=qP;function sC(o){return o instanceof HTMLElement&&Yt(o.nodeName)&&"CANVAS"===o.nodeName.toUpperCase()}var KP=function(o){function s(){return null!==o&&o.apply(this,arguments)||this}return ve(s,o),s.prototype.getDefaultAttrs=function(){var a=o.prototype.getDefaultAttrs.call(this);return Zt(Zt({},a),{x:0,y:0,width:0,height:0})},s.prototype.initAttrs=function(a){this._setImage(a.img)},s.prototype.isStroke=function(){return!1},s.prototype.isOnlyHitBox=function(){return!0},s.prototype._afterLoading=function(){if(!0===this.get("toDraw")){var a=this.get("canvas");a?a.draw():this.createPath(this.get("context"))}},s.prototype._setImage=function(a){var u=this,h=this.attrs;if(Yt(a)){var v=new Image;v.onload=function(){if(u.destroyed)return!1;u.attr("img",v),u.set("loading",!1),u._afterLoading();var g=u.get("callback");g&&g.call(u)},v.crossOrigin="Anonymous",v.src=a,this.set("loading",!0)}else a instanceof Image?(h.width||(h.width=a.width),h.height||(h.height=a.height)):sC(a)&&(h.width||(h.width=Number(a.getAttribute("width"))),h.height||Number(a.getAttribute("height")))},s.prototype.onAttrChange=function(a,u,h){o.prototype.onAttrChange.call(this,a,u,h),"img"===a&&this._setImage(u)},s.prototype.createPath=function(a){if(this.get("loading"))return this.set("toDraw",!0),void this.set("context",a);var u=this.attr(),h=u.x,v=u.y,g=u.width,y=u.height,w=u.sx,M=u.sy,A=u.swidth,L=u.sheight,O=u.img;(O instanceof Image||sC(O))&&(se(w)||se(M)||se(A)||se(L)?a.drawImage(O,h,v,g,y):a.drawImage(O,w,M,A,L,h,v,g,y))},s}(Ro),lC=KP;function ro(o,s,a,u,h,v,g){var y=Math.min(o,a),w=Math.max(o,a),M=Math.min(s,u),A=Math.max(s,u),L=h/2;return v>=y-L&&v<=w+L&&g>=M-L&&g<=A+L&&aa.pointToLine(o,s,a,u,v,g)<=h/2}var QP=function(o){function s(){return null!==o&&o.apply(this,arguments)||this}return ve(s,o),s.prototype.getDefaultAttrs=function(){var a=o.prototype.getDefaultAttrs.call(this);return Zt(Zt({},a),{x1:0,y1:0,x2:0,y2:0,startArrow:!1,endArrow:!1})},s.prototype.initAttrs=function(a){this.setArrow()},s.prototype.onAttrChange=function(a,u,h){o.prototype.onAttrChange.call(this,a,u,h),this.setArrow()},s.prototype.setArrow=function(){var a=this.attr(),u=a.x1,h=a.y1,v=a.x2,g=a.y2,w=a.endArrow;a.startArrow&&Ag(this,a,v,g,u,h),w&&iC(this,a,u,h,v,g)},s.prototype.isInStrokeOrPath=function(a,u,h,v,g){if(!h||!g)return!1;var y=this.attr();return ro(y.x1,y.y1,y.x2,y.y2,g,a,u)},s.prototype.createPath=function(a){var u=this.attr(),h=u.x1,v=u.y1,g=u.x2,y=u.y2,w=u.startArrow,M=u.endArrow,A={dx:0,dy:0},L={dx:0,dy:0};w&&w.d&&(A=$l(h,v,g,y,u.startArrow.d)),M&&M.d&&(L=$l(h,v,g,y,u.endArrow.d)),a.beginPath(),a.moveTo(h+A.dx,v+A.dy),a.lineTo(g-L.dx,y-L.dy)},s.prototype.afterDrawPath=function(a){var u=this.get("startArrowShape"),h=this.get("endArrowShape");u&&u.draw(a),h&&h.draw(a)},s.prototype.getTotalLength=function(){var a=this.attr();return aa.length(a.x1,a.y1,a.x2,a.y2)},s.prototype.getPoint=function(a){var u=this.attr();return aa.pointAt(u.x1,u.y1,u.x2,u.y2,a)},s}(Ro),JP=QP,jP={circle:function(o,s,a){return[["M",o-a,s],["A",a,a,0,1,0,o+a,s],["A",a,a,0,1,0,o-a,s]]},square:function(o,s,a){return[["M",o-a,s-a],["L",o+a,s-a],["L",o+a,s+a],["L",o-a,s+a],["Z"]]},diamond:function(o,s,a){return[["M",o-a,s],["L",o,s-a],["L",o+a,s],["L",o,s+a],["Z"]]},triangle:function(o,s,a){var u=a*Math.sin(.3333333333333333*Math.PI);return[["M",o-a,s+u],["L",o,s-u],["L",o+a,s+u],["Z"]]},"triangle-down":function(o,s,a){var u=a*Math.sin(.3333333333333333*Math.PI);return[["M",o-a,s-u],["L",o+a,s-u],["L",o,s+u],["Z"]]}},tk=function(o){function s(){return null!==o&&o.apply(this,arguments)||this}return ve(s,o),s.prototype.initAttrs=function(a){this._resetParamsCache()},s.prototype._resetParamsCache=function(){this.set("paramsCache",{})},s.prototype.onAttrChange=function(a,u,h){o.prototype.onAttrChange.call(this,a,u,h),-1!==["symbol","x","y","r","radius"].indexOf(a)&&this._resetParamsCache()},s.prototype.isOnlyHitBox=function(){return!0},s.prototype._getR=function(a){return se(a.r)?a.radius:a.r},s.prototype._getPath=function(){var y,w,a=this.attr(),u=a.x,h=a.y,v=a.symbol||"circle",g=this._getR(a);if(Vt(v))w=$2(w=(y=v)(u,h,g));else{if(!(y=s.Symbols[v]))return console.warn(v+" marker is not supported."),null;w=y(u,h,g)}return w},s.prototype.createPath=function(a){Nh(this,a,{path:this._getPath()},this.get("paramsCache"))},s.Symbols=jP,s}(Ro),ek=tk;function ZE(o,s,a){var u=Y2();return o.createPath(u),u.isPointInPath(s,a)}var rk=1e-6;function uC(o){return Math.abs(o)0!=uC(y[1]-a)>0&&uC(s-(a-g[1])*(g[0]-y[0])/(g[1]-y[1])-g[0])<0&&(u=!u)}return u}function Hh(o,s,a,u,h,v,g,y){var w=(Math.atan2(y-s,g-o)+2*Math.PI)%(2*Math.PI);if(wh)return!1;var M={x:o+a*Math.cos(w),y:s+a*Math.sin(w)};return UE(M.x,M.y,g,y)<=v/2}var KE=Mv,dd=Zt({hasArc:function QE(o){for(var s=!1,a=o.length,u=0;u0&&u.push(h),{polygons:a,polylines:u}},isPointInStroke:function Rg(o,s,a,u,h){for(var v=!1,g=s/2,y=0;yht?ft:ht;B0(pe,pe,KE(null,[["t",-X.cx,-X.cy],["r",-X.xRotation],["s",1/(ft>ht?1:ft/ht),1/(ft>ht?ht/ft:1)]])),v=Hh(0,0,Me,pt,Wt,s,pe[0],pe[1])}if(v)break}}return v}},Qe);function hC(o,s,a){for(var u=!1,h=0;h=A[0]&&a<=A[1]&&(h=(a-A[0])/(A[1]-A[0]),v=L)});var y=g[v];if(se(y)||se(v))return null;var w=y.length,M=g[v+1];return ju.pointAt(y[w-2],y[w-1],M[1],M[2],M[3],M[4],M[5],M[6],h)},s.prototype._calculateCurve=function(){var a=this.attr().path;this.set("curve",dd.pathToCurve(a))},s.prototype._setTcache=function(){var v,g,y,w,a=0,u=0,h=[],M=this.get("curve");if(M){if(Dt(M,function(A,L){w=A.length,(y=M[L+1])&&(a+=ju.length(A[w-2],A[w-1],y[1],y[2],y[3],y[4],y[5],y[6])||0)}),this.set("totalLength",a),0===a)return void this.set("tCache",[]);Dt(M,function(A,L){w=A.length,(y=M[L+1])&&((v=[])[0]=u/a,g=ju.length(A[w-2],A[w-1],y[1],y[2],y[3],y[4],y[5],y[6]),v[1]=(u+=g||0)/a,h.push(v))}),this.set("tCache",h)}},s.prototype.getStartTangent=function(){var u,a=this.getSegments();if(a.length>1){var h=a[0].currentPoint,v=a[1].currentPoint,g=a[1].startTangent;u=[],g?(u.push([h[0]-g[0],h[1]-g[1]]),u.push([h[0],h[1]])):(u.push([v[0],v[1]]),u.push([h[0],h[1]]))}return u},s.prototype.getEndTangent=function(){var h,a=this.getSegments(),u=a.length;if(u>1){var v=a[u-2].currentPoint,g=a[u-1].currentPoint,y=a[u-1].endTangent;h=[],y?(h.push([g[0]-y[0],g[1]-y[1]]),h.push([g[0],g[1]])):(h.push([v[0],v[1]]),h.push([g[0],g[1]]))}return h},s}(Ro),pd=jE;function fC(o,s,a,u,h){var v=o.length;if(v<2)return!1;for(var g=0;g=y[0]&&a<=y[1]&&(v=(a-y[0])/(y[1]-y[0]),g=w)}),aa.pointAt(u[g][0],u[g][1],u[g+1][0],u[g+1][1],v)},s.prototype._setTcache=function(){var a=this.attr().points;if(a&&0!==a.length){var u=this.getTotalLength();if(!(u<=0)){var g,y,h=0,v=[];Dt(a,function(w,M){a[M+1]&&((g=[])[0]=h/u,y=aa.length(w[0],w[1],a[M+1][0],a[M+1][1]),g[1]=(h+=y)/u,v.push(g))}),this.set("tCache",v)}}},s.prototype.getStartTangent=function(){var a=this.attr().points,u=[];return u.push([a[1][0],a[1][1]]),u.push([a[0][0],a[0][1]]),u},s.prototype.getEndTangent=function(){var a=this.attr().points,u=a.length-1,h=[];return h.push([a[u-1][0],a[u-1][1]]),h.push([a[u][0],a[u][1]]),h},s}(Ro),vC=Yh,ak=function(o){function s(){return null!==o&&o.apply(this,arguments)||this}return ve(s,o),s.prototype.getDefaultAttrs=function(){var a=o.prototype.getDefaultAttrs.call(this);return Zt(Zt({},a),{x:0,y:0,width:0,height:0,radius:0})},s.prototype.isInStrokeOrPath=function(a,u,h,v,g){var y=this.attr(),w=y.x,M=y.y,A=y.width,L=y.height,O=y.radius;if(O){var k=!1;return h&&(k=function ik(o,s,a,u,h,v,g,y){return ro(o+h,s,o+a-h,s,v,g,y)||ro(o+a,s+h,o+a,s+u-h,v,g,y)||ro(o+a-h,s+u,o+h,s+u,v,g,y)||ro(o,s+u-h,o,s+h,v,g,y)||Hh(o+a-h,s+h,h,1.5*Math.PI,2*Math.PI,v,g,y)||Hh(o+a-h,s+u-h,h,0,.5*Math.PI,v,g,y)||Hh(o+h,s+u-h,h,.5*Math.PI,Math.PI,v,g,y)||Hh(o+h,s+h,h,Math.PI,1.5*Math.PI,v,g,y)}(w,M,A,L,O,g,a,u)),!k&&v&&(k=ZE(this,a,u)),k}var D=g/2;return v&&h?tc(w-D,M-D,A+D,L+D,a,u):v?tc(w,M,A,L,a,u):h?function nk(o,s,a,u,h,v,g){var y=h/2;return tc(o-y,s-y,a,h,v,g)||tc(o+a-y,s-y,h,u,v,g)||tc(o+y,s+u-y,a,h,v,g)||tc(o-y,s+y,h,u,v,g)}(w,M,A,L,g,a,u):void 0},s.prototype.createPath=function(a){var u=this.attr(),h=u.x,v=u.y,g=u.width,y=u.height,w=u.radius;if(a.beginPath(),0===w)a.rect(h,v,g,y);else{var M=function Tg(o){var s=0,a=0,u=0,h=0;return ne(o)?1===o.length?s=a=u=h=o[0]:2===o.length?(s=u=o[0],a=h=o[1]):3===o.length?(s=o[0],a=h=o[1],u=o[2]):(s=o[0],a=o[1],u=o[2],h=o[3]):s=a=u=h=o,[s,a,u,h]}(w),A=M[0],L=M[1],O=M[2],D=M[3];a.moveTo(h+A,v),a.lineTo(h+g-L,v),0!==L&&a.arc(h+g-L,v+L,L,-Math.PI/2,0),a.lineTo(h+g,v+y-O),0!==O&&a.arc(h+g-O,v+y-O,O,0,Math.PI/2),a.lineTo(h+D,v+y),0!==D&&a.arc(h+D,v+y-D,D,Math.PI/2,Math.PI),a.lineTo(h,v+A),0!==A&&a.arc(h+A,v+A,A,Math.PI,1.5*Math.PI),a.closePath()}},s}(Ro),ok=ak,sk=function(o){function s(){return null!==o&&o.apply(this,arguments)||this}return ve(s,o),s.prototype.getDefaultAttrs=function(){var a=o.prototype.getDefaultAttrs.call(this);return Zt(Zt({},a),{x:0,y:0,text:null,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom"})},s.prototype.isOnlyHitBox=function(){return!0},s.prototype.initAttrs=function(a){this._assembleFont(),a.text&&this._setText(a.text)},s.prototype._assembleFont=function(){var a=this.attrs;a.font=xg(a)},s.prototype._setText=function(a){var u=null;Yt(a)&&-1!==a.indexOf("\n")&&(u=a.split("\n")),this.set("textArr",u)},s.prototype.onAttrChange=function(a,u,h){o.prototype.onAttrChange.call(this,a,u,h),a.startsWith("font")&&this._assembleFont(),"text"===a&&this._setText(u)},s.prototype._getSpaceingY=function(){var a=this.attrs,u=a.lineHeight,h=1*a.fontSize;return u?u-h:.14*h},s.prototype._drawTextArr=function(a,u,h){var O,v=this.attrs,g=v.textBaseline,y=v.x,w=v.y,M=1*v.fontSize,A=this._getSpaceingY(),L=W2(v.text,v.fontSize,v.lineHeight);Dt(u,function(D,k){O=w+k*(A+M)-L+M,"middle"===g&&(O+=L-M-(L-M)/2),"top"===g&&(O+=L-M),se(D)||(h?a.fillText(D,y,O):a.strokeText(D,y,O))})},s.prototype._drawText=function(a,u){var h=this.attr(),v=h.x,g=h.y,y=this.get("textArr");if(y)this._drawTextArr(a,y,u);else{var w=h.text;se(w)||(u?a.fillText(w,v,g):a.strokeText(w,v,g))}},s.prototype.strokeAndFill=function(a){var u=this.attrs,h=u.lineWidth,v=u.opacity,g=u.strokeOpacity,y=u.fillOpacity;this.isStroke()&&h>0&&(!se(g)&&1!==g&&(a.globalAlpha=v),this.stroke(a)),this.isFill()&&(se(y)||1===y?this.fill(a):(a.globalAlpha=y,this.fill(a),a.globalAlpha=v)),this.afterDrawPath(a)},s.prototype.fill=function(a){this._drawText(a,!0)},s.prototype.stroke=function(a){this._drawText(a,!1)},s}(Ro),lk=sk;function t3(o,s,a){var u=o.getTotalMatrix();if(u){var h=function uk(o,s){return s?rs(Tv(s),o):o}([s,a,1],u);return[h[0],h[1]]}return[s,a]}function Dg(o,s,a){if(o.isCanvas&&o.isCanvas())return!0;if(!xn(o)||!1===o.cfg.isInView)return!1;if(o.cfg.clipShape){var u=t3(o,s,a);if(o.isClipped(u[0],u[1]))return!1}var g=o.cfg.cacheCanvasBBox||o.getCanvasBBox();return s>=g.minX&&s<=g.maxX&&a>=g.minY&&a<=g.maxY}function dC(o,s,a){if(!Dg(o,s,a))return null;for(var u=null,h=o.getChildren(),g=h.length-1;g>=0;g--){var y=h[g];if(y.isGroup())u=dC(y,s,a);else if(Dg(y,s,a)){var w=y,M=t3(y,s,a);w.isInShape(M[0],M[1])&&(u=y)}if(u)break}return u}var cs,e3=function(o){function s(){return null!==o&&o.apply(this,arguments)||this}return ve(s,o),s.prototype.getDefaultCfg=function(){var a=o.prototype.getDefaultCfg.call(this);return a.renderer="canvas",a.autoDraw=!0,a.localRefresh=!0,a.refreshElements=[],a.clipView=!0,a.quickHit=!1,a},s.prototype.onCanvasChange=function(a){("attr"===a||"sort"===a||"changeSize"===a)&&(this.set("refreshElements",[this]),this.draw())},s.prototype.getShapeBase=function(){return ae},s.prototype.getGroupBase=function(){return ls},s.prototype.getPixelRatio=function(){var a=this.get("pixelRatio")||function YP(){return window?window.devicePixelRatio:1}();return a>=1?Math.ceil(a):1},s.prototype.getViewRange=function(){return{minX:0,minY:0,maxX:this.cfg.width,maxY:this.cfg.height}},s.prototype.createDom=function(){var a=document.createElement("canvas"),u=a.getContext("2d");return this.set("context",u),a},s.prototype.setDOMSize=function(a,u){o.prototype.setDOMSize.call(this,a,u);var h=this.get("context"),v=this.get("el"),g=this.getPixelRatio();v.width=g*a,v.height=g*u,g>1&&h.scale(g,g)},s.prototype.clear=function(){o.prototype.clear.call(this),this._clearFrame();var a=this.get("context"),u=this.get("el");a.clearRect(0,0,u.width,u.height)},s.prototype.getShape=function(a,u){return this.get("quickHit")?dC(this,a,u):o.prototype.getShape.call(this,a,u,null)},s.prototype._getRefreshRegion=function(){var h,a=this.get("refreshElements"),u=this.getViewRange();return a.length&&a[0]===this?h=u:(h=function Oo(o){if(!o.length)return null;var s=[],a=[],u=[],h=[];return Dt(o,function(v){var g=function vd(o){var s;if(o.destroyed)s=o._cacheCanvasBBox;else{var a=o.get("cacheCanvasBBox"),u=a&&!(!a.width||!a.height),h=o.getCanvasBBox(),v=h&&!(!h.width||!h.height);u&&v?s=function WP(o,s){return o&&s?{minX:Math.min(o.minX,s.minX),minY:Math.min(o.minY,s.minY),maxX:Math.max(o.maxX,s.maxX),maxY:Math.max(o.maxY,s.maxY)}:o||s}(a,h):u?s=a:v&&(s=h)}return s}(v);g&&(s.push(g.minX),a.push(g.minY),u.push(g.maxX),h.push(g.maxY))}),{minX:dt(s),minY:dt(a),maxX:ut(u),maxY:ut(h)}}(a),h&&(h.minX=Math.floor(h.minX),h.minY=Math.floor(h.minY),h.maxX=Math.ceil(h.maxX),h.maxY=Math.ceil(h.maxY),h.maxY+=1,this.get("clipView")&&(h=function XP(o,s){return o&&s&&od(o,s)?{minX:Math.max(o.minX,s.minX),minY:Math.max(o.minY,s.minY),maxX:Math.min(o.maxX,s.maxX),maxY:Math.min(o.maxY,s.maxY)}:null}(h,u)))),h},s.prototype.refreshElement=function(a){this.get("refreshElements").push(a)},s.prototype._clearFrame=function(){var a=this.get("drawFrame");a&&(function Ht(o){(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.msCancelAnimationFrame||clearTimeout)(o)}(a),this.set("drawFrame",null),this.set("refreshElements",[]))},s.prototype.draw=function(){var a=this.get("drawFrame");this.get("autoDraw")&&a||this._startDraw()},s.prototype._drawAll=function(){var a=this.get("context"),u=this.get("el"),h=this.getChildren();a.clearRect(0,0,u.width,u.height),ec(a,this),Lg(a,h),this.set("refreshElements",[])},s.prototype._drawRegion=function(){var a=this.get("context"),u=this.get("refreshElements"),h=this.getChildren(),v=this._getRefreshRegion();v?(a.clearRect(v.minX,v.minY,v.maxX-v.minX,v.maxY-v.minY),a.save(),a.beginPath(),a.rect(v.minX,v.minY,v.maxX-v.minX,v.maxY-v.minY),a.clip(),ec(a,this),$E(this,h,v),Lg(a,h,v),a.restore()):u.length&&zh(u),Dt(u,function(g){g.get("hasChanged")&&g.set("hasChanged",!1)}),this.set("refreshElements",[])},s.prototype._startDraw=function(){var a=this,u=this.get("drawFrame");u||(u=function Rt(o){return(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(a){return setTimeout(a,16)})(o)}(function(){a.get("localRefresh")?a._drawRegion():a._drawAll(),a.set("drawFrame",null)}),this.set("drawFrame",u))},s.prototype.skipDraw=function(){},s.prototype.removeDom=function(){var a=this.get("el");a.width=0,a.height=0,a.parentNode.removeChild(a)},s}(E2),wi=(()=>(function(o){o.MOUSE_DOWN="mousedown",o.MOUSE_MOVE="mousemove",o.MOUSE_OUT="mouseout",o.MOUSE_LEAVE="mouseleave",o.MOUSE_UP="mouseup",o.KEY_DOWN="keydown",o.KEY_UP="keyup",o.CLICK="click",o.HOVER="hover",o.DOUBLE_CLICK="dblclick",o.CONTEXT_MENU="contextmenu"}(wi||(wi={})),wi))(),_e=(()=>(function(o){o.ROW_CELL_HOVER="row-cell:hover",o.ROW_CELL_CLICK="row-cell:click",o.ROW_CELL_DOUBLE_CLICK="row-cell:double-click",o.ROW_CELL_CONTEXT_MENU="row-cell:context-menu",o.ROW_CELL_MOUSE_DOWN="row-cell:mouse-down",o.ROW_CELL_MOUSE_UP="row-cell:mouse-up",o.ROW_CELL_MOUSE_MOVE="row-cell:mouse-move",o.ROW_CELL_COLLAPSE_TREE_ROWS="row-cell:collapsed-tree-rows",o.ROW_CELL_SCROLL="row-cell:scroll",o.ROW_CELL_BRUSH_SELECTION="row-cell:brush-selection",o.COL_CELL_HOVER="col-cell:hover",o.COL_CELL_CLICK="col-cell:click",o.COL_CELL_DOUBLE_CLICK="col-cell:double-click",o.COL_CELL_CONTEXT_MENU="col-cell:context-menu",o.COL_CELL_MOUSE_DOWN="col-cell:mouse-down",o.COL_CELL_MOUSE_UP="col-cell:mouse-up",o.COL_CELL_MOUSE_MOVE="col-cell:mouse-move",o.COL_CELL_BRUSH_SELECTION="col-cell:brush-selection",o.DATA_CELL_HOVER="data-cell:hover",o.DATA_CELL_CLICK="data-cell:click",o.DATA_CELL_DOUBLE_CLICK="data-cell:double-click",o.DATA_CELL_CONTEXT_MENU="data-cell:context-menu",o.DATA_CELL_MOUSE_UP="data-cell:mouse-up",o.DATA_CELL_MOUSE_DOWN="data-cell:mouse-down",o.DATA_CELL_MOUSE_MOVE="data-cell:mouse-move",o.DATA_CELL_TREND_ICON_CLICK="data-cell:trend-icon-click",o.DATA_CELL_BRUSH_SELECTION="data-cell:brush-selection",o.DATA_CELL_SELECT_MOVE="data-cell:select-move",o.CORNER_CELL_HOVER="corner-cell:hover",o.CORNER_CELL_CLICK="corner-cell:click",o.CORNER_CELL_DOUBLE_CLICK="corner-cell:double-click",o.CORNER_CELL_CONTEXT_MENU="corner-cell:context-menu",o.CORNER_CELL_MOUSE_DOWN="corner-cell:mouse-down",o.CORNER_CELL_MOUSE_UP="corner-cell:mouse-up",o.CORNER_CELL_MOUSE_MOVE="corner-cell:mouse-move",o.MERGED_CELLS_HOVER="merged-cells:hover",o.MERGED_CELLS_CLICK="merged-cells:click",o.MERGED_CELLS_DOUBLE_CLICK="merged-cells:double-click",o.MERGED_CELLS_CONTEXT_MENU="merged-cell:context-menu",o.MERGED_CELLS_MOUSE_DOWN="merged-cells:mouse-down",o.MERGED_CELLS_MOUSE_UP="merged-cells:mouse-up",o.MERGED_CELLS_MOUSE_MOVE="merged-cells:mouse-move",o.RANGE_SORT="sort:range-sort",o.RANGE_SORTED="sort:range-sorted",o.RANGE_FILTER="filter:range-filter",o.RANGE_FILTERED="filter:range-filtered",o.LAYOUT_AFTER_HEADER_LAYOUT="layout:after-header-layout",o.LAYOUT_CELL_SCROLL="layout:cell-scroll",o.LAYOUT_PAGINATION="layout:pagination",o.LAYOUT_COLLAPSE_ROWS="layout:collapsed-rows",o.LAYOUT_AFTER_COLLAPSE_ROWS="layout:after-collapsed-rows",o.LAYOUT_AFTER_REAL_DATA_CELL_RENDER="layout:after-real-data-cell-render",o.LAYOUT_TREE_ROWS_COLLAPSE_ALL="layout:toggle-collapse-all",o.LAYOUT_COLS_EXPANDED="layout:table-col-expanded",o.LAYOUT_COLS_HIDDEN="layout:table-col-hidden",o.LAYOUT_AFTER_RENDER="layout:after-render",o.LAYOUT_BEFORE_RENDER="layout:before-render",o.LAYOUT_DESTROY="layout:destroy",o.LAYOUT_RESIZE="layout:resize",o.LAYOUT_RESIZE_SERIES_WIDTH="layout:resize-series-width",o.LAYOUT_RESIZE_ROW_WIDTH="layout:resize-row-width",o.LAYOUT_RESIZE_ROW_HEIGHT="layout:resize-row-height",o.LAYOUT_RESIZE_COL_WIDTH="layout:resize-column-width",o.LAYOUT_RESIZE_COL_HEIGHT="layout:resize-column-height",o.LAYOUT_RESIZE_TREE_WIDTH="layout:resize-tree-width",o.LAYOUT_RESIZE_MOUSE_DOWN="layout:resize:mouse-down",o.LAYOUT_RESIZE_MOUSE_MOVE="layout:resize:mouse-move",o.LAYOUT_RESIZE_MOUSE_UP="layout:resize-mouse-up",o.GLOBAL_KEYBOARD_DOWN="global:keyboard-down",o.GLOBAL_KEYBOARD_UP="global:keyboard-up",o.GLOBAL_COPIED="global:copied",o.GLOBAL_MOUSE_UP="global:mouse-up",o.GLOBAL_MOUSE_MOVE="global:mouse-move",o.GLOBAL_ACTION_ICON_CLICK="global:action-icon-click",o.GLOBAL_ACTION_ICON_HOVER="global:action-icon-hover",o.GLOBAL_ACTION_ICON_HOVER_OFF="global:action-icon-hover-off",o.GLOBAL_CONTEXT_MENU="global:context-menu",o.GLOBAL_CLICK="global:click",o.GLOBAL_DOUBLE_CLICK="global:double-click",o.GLOBAL_SELECTED="global:selected",o.GLOBAL_HOVER="global:hover",o.GLOBAL_RESET="global:reset",o.GLOBAL_LINK_FIELD_JUMP="global:link-field-jump",o.GLOBAL_SCROLL="global:scroll"}(_e||(_e={})),_e))(),no="$$value$$",Jr="$$extra$$",ck="$$extra_column$$",pC="$$total$$",rc="$$series_number$$",r3=3,Bg=4,zg="mergedCellsGroup",u3="frozenRowGroup",yC="frozenColGroup",Vs="frozenTrailingRowGroup",c3="frozenTrailingColGroup",h3="frozenTopGroup",f3="frozenBottomGroup",nc="rowResizeAreaGroup",mC="rowFrozenResizeAreaGroup",xC="frozenSplitLine",CC="rowIndexResizeAreaGroup",Ng="cornerResizeAreaGroup",wC="colResizeAreaGroup",_C="colFrozenResizeAreaGroup",d3="colScrollGroup",Fo="colFrozenGroup",p3="colFrozenTrailingGroup",yd="gridGroup",Wh="horizontal-resize-area-",Na="root",_i="[&]",$s=(()=>(function(o){o.Line="line",o.Bar="bar",o.Bullet="bullet"}($s||($s={})),$s))(),Wg="square",Si="...",Uh="valueRanges",xd={},Ug="#000000",Cd="#FFFFFF",MC={data:[],totalData:[],fields:{rows:[],columns:[],values:[],customTreeItems:[],valueInCols:!0},meta:[],sortParams:[],filterParams:[]},Hn=(()=>(function(o){o.ROW="row",o.COL="col",o.TRAILING_ROW="trailingRow",o.TRAILING_COL="trailingCol",o.SCROLL="scroll",o.TOP="top",o.BOTTOM="bottom"}(Hn||(Hn={})),Hn))(),Sa=(()=>(function(o){o.FROZEN_COL="frozenCol",o.FROZEN_ROW="frozenRow",o.FROZEN_TRAILING_COL="frozenTrailingCol",o.FROZEN_TRAILING_ROW="frozenTrailingRow"}(Sa||(Sa={})),Sa))(),Xg=((cs={})[Hn.ROW]="frozenRowGroup",cs[Hn.COL]="frozenColGroup",cs[Hn.TRAILING_COL]="frozenTrailingColGroup",cs[Hn.TRAILING_ROW]="frozenTrailingRowGroup",cs[Hn.SCROLL]="panelScrollGroup",cs[Hn.TOP]="frozenTopGroup",cs[Hn.BOTTOM]="frozenBottomGroup",cs),Ri=(()=>(function(o){o.CORNER_CELL_CLICK="cornerCellClick",o.DATA_CELL_CLICK="dataCellClick",o.MERGED_CELLS_CLICK="mergedCellsClick",o.ROW_COLUMN_CLICK="rowColumnClick",o.ROW_TEXT_CLICK="rowTextClick",o.HOVER="hover",o.BRUSH_SELECTION="brushSelection",o.ROW_BRUSH_SELECTION="rowBrushSelection",o.COL_BRUSH_SELECTION="colBrushSelection",o.COL_ROW_RESIZE="rowColResize",o.DATA_CELL_MULTI_SELECTION="dataCellMultiSelection",o.RANGE_SELECTION="rangeSelection",o.SELECTED_CELL_MOVE="selectedCellMove"}(Ri||(Ri={})),Ri))(),pr=(()=>(function(o){o.ALL_SELECTED="allSelected",o.SELECTED="selected",o.UNSELECTED="unselected",o.HOVER="hover",o.HOVER_FOCUS="hoverFocus",o.HIGHLIGHT="highlight",o.SEARCH_RESULT="searchResult",o.PREPARE_SELECT="prepareSelect"}(pr||(pr={})),pr))(),Ue=(()=>(function(o){o.DATA_CELL="dataCell",o.HEADER_CELL="headerCell",o.ROW_CELL="rowCell",o.COL_CELL="colCell",o.CORNER_CELL="cornerCell",o.MERGED_CELL="mergedCell"}(Ue||(Ue={})),Ue))(),oa={textOpacity:"fillOpacity",backgroundOpacity:"fillOpacity",backgroundColor:"fill",borderOpacity:"strokeOpacity",borderColor:"stroke",borderWidth:"lineWidth",opacity:"opacity"},TC={textShape:["textOpacity"],textShapes:["textOpacity"],linkFieldShape:["opacity"],interactiveBgShape:["backgroundColor","backgroundOpacity"],interactiveBorderShape:["borderColor","borderOpacity","borderWidth"]},oc="interactionStateInfo",In=(()=>(function(o){o.CLICK="click",o.UN_DRAGGED="unDragged",o.DRAGGED="dragged"}(In||(In={})),In))(),Vn=(()=>(function(o){o.SHIFT="Shift",o.COPY="c",o.ESC="Escape",o.META="Meta",o.CONTROL="Control",o.ARROW_UP="ArrowUp",o.ARROW_DOWN="ArrowDown",o.ARROW_LEFT="ArrowLeft",o.ARROW_RIGHT="ArrowRight"}(Vn||(Vn={})),Vn))(),Lr=(()=>(function(o){o.HOVER="hover",o.CLICK="click",o.BRUSH_SELECTION="brushSelection",o.ROW_BRUSH_SELECTION="rowBrushSelection",o.COL_BRUSH_SELECTION="colBrushSelection",o.MULTI_SELECTION="multiSelection",o.RESIZE="resize"}(Lr||(Lr={})),Lr))(),lc={x:{value:0,scroll:!1},y:{value:0,scroll:!1}},uc=(()=>(function(o){o.CONTENT="content",o.CANVAS="canvas"}(uc||(uc={})),uc))(),si=(()=>(function(o){o.SCROLL_UP="scrollUp",o.SCROLL_DOWN="scrollDown"}(si||(si={})),si))(),Xh=(()=>(function(o){o[o.SCROLL_UP=-1]="SCROLL_UP",o[o.SCROLL_DOWN=1]="SCROLL_DOWN"}(Xh||(Xh={})),Xh))(),Ni=(()=>(function(o){o.Horizontal="col",o.Vertical="row"}(Ni||(Ni={})),Ni))(),Hi=(()=>(function(o){o.Field="field",o.Cell="cell",o.Tree="tree",o.Series="series"}(Hi||(Hi={})),Hi))(),Zs=(()=>(function(o){o.ALL="all",o.CURRENT="current"}(Zs||(Zs={})),Zs))(),hs=1,li=(()=>(function(o){o.Adaptive="adaptive",o.ColAdaptive="colAdaptive",o.Compact="compact"}(li||(li={})),li))(),dk={width:600,height:480,debug:!1,hierarchyType:"grid",conditions:{},totals:{},tooltip:{showTooltip:!1,autoAdjustBoundary:"body",operation:{hiddenColumns:!1,trend:!1,sort:!1,menus:[]}},interaction:{linkFields:[],hiddenColumnFields:[],selectedCellsSpotlight:!1,hoverHighlight:!0,hoverFocus:{duration:800},scrollSpeedRatio:{horizontal:1,vertical:1},autoResetSheetStyle:!0,brushSelection:{data:!0,row:!1,col:!1},multiSelection:!0,rangeSelection:!0,scrollbarPosition:uc.CONTENT,resize:{rowCellVertical:!0,cornerCellHorizontal:!0,colCellHorizontal:!0,colCellVertical:!0,rowResizeType:Zs.ALL},eventListenerOptions:!1,selectedCellHighlight:!1,overscrollBehavior:"auto"},showSeriesNumber:!1,customSVGIcons:[],showDefaultHeaderActionIcon:!1,headerActionIcons:[],style:{layoutWidthType:li.Adaptive,showTreeLeafNodeAlignDot:!1,collapsedRows:{},collapsedCols:{},cellCfg:{width:96,height:30},rowCfg:{width:null,widthByField:{},heightByField:{}},colCfg:{height:30,widthByFieldValue:{},heightByField:{}},device:"pc"},frozenRowHeader:!0,frozenRowCount:0,frozenColCount:0,frozenTrailingRowCount:0,frozenTrailingColCount:0,hdAdapter:!0,cornerText:"",cornerExtraFieldText:"",placeholder:"-",supportCSSTransform:!1,devicePixelRatio:window.devicePixelRatio},$g=function(o,s){return($g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,u){a.__proto__=u}||function(a,u){for(var h in u)Object.prototype.hasOwnProperty.call(u,h)&&(a[h]=u[h])})(o,s)};function Ir(o,s){if("function"!=typeof s&&null!==s)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function a(){this.constructor=o}$g(o,s),o.prototype=null===s?Object.create(s):(a.prototype=s.prototype,new a)}var ue=function(){return ue=Object.assign||function(s){for(var a,u=1,h=arguments.length;u=o.length&&(o=void 0),{value:o&&o[u++],done:!o}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ae(o,s){var a="function"==typeof Symbol&&o[Symbol.iterator];if(!a)return o;var h,g,u=a.call(o),v=[];try{for(;(void 0===s||s-- >0)&&!(h=u.next()).done;)v.push(h.value)}catch(y){g={error:y}}finally{try{h&&!h.done&&(a=u.return)&&a.call(u)}finally{if(g)throw g.error}}return v}function Be(o,s,a){if(a||2===arguments.length)for(var v,u=0,h=s.length;u0){if(++s>=Tr)return arguments[0]}else s=0;return o.apply(void 0,arguments)}}var iy=VC(Z3),e6=/\{\n\/\* \[wrapped with (.+)\] \*/,bd=/,? & /,r6=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function Bo(o){return function(){return o}}var $C=function(){try{var o=hc(Object,"defineProperty");return o({},"",{}),o}catch{}}(),Kl=$C,ZC=Kl?function(o,s){return Kl(o,"toString",{configurable:!0,enumerable:!1,value:Bo(s),writable:!0})}:Wi,Ed=VC(ZC);function Aa(o,s){for(var a=-1,u=null==o?0:o.length;++a-1}var Nk=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];function tw(o,s,a){var u=s+"";return Ed(o,function n6(o,s){var a=s.length;if(!a)return o;var u=a-1;return s[u]=(a>1?"& ":"")+s[u],s=s.join(a>2?", ":" "),o.replace(r6,"{\n/* [wrapped with "+s+"] */\n")}(u,function u6(o,s){return Aa(Nk,function(a){var u="_."+a[0];s&a[1]&&!Id(o,u)&&o.push(u)}),o.sort()}(function Kh(o){var s=o.match(e6);return s?s[1].split(bd):[]}(u),a)))}var c6=1,Hk=2,h6=4,f6=8,ew=32,rw=64;function Od(o,s,a,u,h,v,g,y,w,M){var A=s&f6;s|=A?ew:rw,(s&=~(A?rw:ew))&h6||(s&=~(c6|Hk));var X=[o,s,h,A?v:void 0,A?g:void 0,A?void 0:v,A?void 0:g,y,w,M],tt=a.apply(void 0,X);return Td(o)&&iy(tt,X),tt.placeholder=u,tw(tt,o,s)}function Jl(o){return o.placeholder}var nw=9007199254740991,v6=/^(?:0|[1-9]\d*)$/;function Po(o,s){var a=typeof o;return!!(s=s??nw)&&("number"==a||"symbol"!=a&&v6.test(o))&&o>-1&&o%1==0&&o1&&ft.reverse(),A&&w-1&&o%1==0&&o<=fw}function sa(o){return null!=o&&jh(o.length)&&!ci(o)}function Ui(o,s,a){if(!Cn(a))return!1;var u=typeof s;return!!("number"==u?sa(a)&&Po(s,a.length):"string"==u&&s in a)&&ao(a[s],o)}function pc(o){return jr(function(s,a){var u=-1,h=a.length,v=h>1?a[h-1]:void 0,g=h>2?a[2]:void 0;for(v=o.length>3&&"function"==typeof v?(h--,v):void 0,g&&Ui(a[0],a[1],g)&&(v=h<3?void 0:v,h=1),s=Object(s);++u-1},Ya.prototype.set=function sf(o,s){var a=this.__data__,u=Pd(a,o);return u<0?(++this.size,a.push([o,s])):a[u][1]=s,this};var lf=hc(ni,"Map");function kd(o,s){var a=o.__data__;return function e4(o){var s=typeof o;return"string"==s||"number"==s||"symbol"==s||"boolean"==s?"__proto__"!==o:null===o}(s)?a["string"==typeof s?"string":"hash"]:a.map}function gs(o){var s=-1,a=null==o?0:o.length;for(this.clear();++s0&&a(y)?s>1?ii(y,s-1,a,u,h):Wa(h,y):u||(h[h.length]=y)}return h}function yc(o){return null!=o&&o.length?ii(o,1):[]}function Ua(o){return Ed(S6(o,void 0,yc),o+"")}var Ey=Ua(ua),zd=N6(Object.getPrototypeOf,Object),Iy="[object Object]",mc=Function.prototype.toString,g4=Object.prototype.hasOwnProperty,Nw=mc.call(Object);function lu(o){if(!Gn(o)||Fi(o)!=Iy)return!1;var s=zd(o);if(null===s)return!0;var a=g4.call(s,"constructor")&&s.constructor;return"function"==typeof a&&a instanceof a&&mc.call(a)==Nw}var y4="[object DOMException]",m4="[object Error]";function Nd(o){if(!Gn(o))return!1;var s=Fi(o);return s==m4||s==y4||"string"==typeof o.message&&"string"==typeof o.name&&!lu(o)}var x4=jr(function(o,s){try{return Ha(o,void 0,s)}catch(a){return Nd(a)?a:new Error(a)}}),Hw=x4,Gw="Expected a function";function Hd(o,s){var a;if("function"!=typeof s)throw new TypeError(Gw);return o=qr(o),function(){return--o>0&&(a=s.apply(this,arguments)),o<=1&&(s=void 0),a}}var Oy=jr(function(o,s,a){var u=1;if(a.length){var h=vs(a,Jl(Oy));u|=32}return ds(o,u,s,a,h)});Oy.placeholder={};var Ww=Oy,C4=Ua(function(o,s){return Aa(s,function(a){a=No(a),ko(o,a,Ww(o[a],o))}),o}),w4=C4,Gd=jr(function(o,s,a){var u=3;if(a.length){var h=vs(a,Jl(Gd));u|=32}return ds(s,u,o,a,h)});Gd.placeholder={};var M4=Gd;function La(o,s,a){var u=-1,h=o.length;s<0&&(s=-s>h?0:h+s),(a=a>h?h:a)<0&&(a+=h),h=s>a?0:a-s>>>0,s>>>=0;for(var v=Array(h);++u=u?o:La(o,s,a)}var Xw=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function xc(o){return Xw.test(o)}var Cc="\\ud800-\\udfff",D4="["+Cc+"]",By="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Yd="\\ud83c[\\udffb-\\udfff]",Vw="[^"+Cc+"]",$w="(?:\\ud83c[\\udde6-\\uddff]){2}",Zw="[\\ud800-\\udbff][\\udc00-\\udfff]",qw="(?:"+By+"|"+Yd+")?",Py="[\\ufe0e\\ufe0f]?",Wd=Py+qw+"(?:\\u200d(?:"+[Vw,$w,Zw].join("|")+")"+Py+qw+")*",zy="(?:"+[Vw+By+"?",By,$w,Zw,D4].join("|")+")",Ny=RegExp(Yd+"(?="+Yd+")|"+zy+Wd,"g");function so(o){return xc(o)?function Kw(o){return o.match(Ny)||[]}(o):function O4(o){return o.split("")}(o)}function Qw(o){return function(s){var a=xc(s=yn(s))?so(s):void 0,u=a?a[0]:s.charAt(0),h=a?Qs(a,1).join(""):s.slice(1);return u[o]()+h}}var Ud=Qw("toUpperCase");function Jw(o){return Ud(yn(o).toLowerCase())}function Hy(o,s,a,u){var h=-1,v=null==o?0:o.length;for(u&&v&&(a=o[++h]);++h=s?o:s)),o}function fu(o,s,a){return void 0===a&&(a=s,s=void 0),void 0!==a&&(a=(a=Yi(a))==a?a:0),void 0!==s&&(s=(s=Yi(s))==s?s:0),hu(Yi(o),s,a)}function ha(o){var s=this.__data__=new Ya(o);this.size=s.size}function Vy(o,s){return o&&oo(s,vn(s),o)}ha.prototype.clear=function e7(){this.__data__=new Ya,this.size=0},ha.prototype.delete=function p_(o){var s=this.__data__,a=s.delete(o);return this.size=s.size,a},ha.prototype.get=function g_(o){return this.__data__.get(o)},ha.prototype.has=function Zd(o){return this.__data__.has(o)},ha.prototype.set=function Xy(o,s){var a=this.__data__;if(a instanceof Ya){var u=a.__data__;if(!lf||u.length<199)return u.push([o,s]),this.size=++a.size,this;a=this.__data__=new gs(u)}return a.set(o,s),this.size=a.size,this};var vu="object"==typeof exports&&exports&&!exports.nodeType&&exports,$y=vu&&rr&&!rr.nodeType&&rr,du=$y&&$y.exports===vu?ni.Buffer:void 0,x_=du?du.allocUnsafe:void 0;function wn(o,s){if(s)return o.slice();var a=o.length,u=x_?x_(a):new o.constructor(a);return o.copy(u),u}function tl(o,s){for(var a=-1,u=null==o?0:o.length,h=0,v=[];++ay))return!1;var M=v.get(o),A=v.get(s);if(M&&A)return M==s&&A==o;var L=-1,O=!0,D=a&r5?new hi:void 0;for(v.set(o,s),v.set(s,o);++L=s||pe<0||L&&de-M>=v}function ot(){var de=da();if(tt(de))return ft(de);y=setTimeout(ot,function X(de){var ze=s-(de-w);return L?wu(ze,v-(de-M)):ze}(de))}function ft(de){return y=void 0,O&&u?D(de):(u=h=void 0,g)}function Wt(){var de=da(),pe=tt(de);if(u=arguments,h=this,w=de,pe){if(void 0===y)return function k(de){return M=de,y=setTimeout(ot,s),A?D(de):g}(w);if(L)return clearTimeout(y),y=setTimeout(ot,s),D(w)}return void 0===y&&(y=setTimeout(ot,s)),g}return s=Yi(s)||0,Cn(a)&&(A=!!a.leading,v=(L="maxWait"in a)?vS(Yi(a.maxWait)||0,s):v,O="trailing"in a?!!a.trailing:O),Wt.cancel=function ht(){void 0!==y&&clearTimeout(y),M=0,u=w=h=y=void 0},Wt.flush=function pt(){return void 0===y?g:ft(da())},Wt}var Lm=Object.prototype,C5=Lm.hasOwnProperty,w5=jr(function(o,s){o=Object(o);var a=-1,u=s.length,h=u>2?s[2]:void 0;for(h&&Ui(s[0],s[1],h)&&(u=1);++a=Rm&&(v=mf,g=!1,s=new hi(s));t:for(;++h=0&&o.slice(a,h)==s}var R5="[object Map]",F5="[object Set]";function bS(o){return function(s){var a=Xa(s);return a==R5?nl(s):a==F5?function ul(o){var s=-1,a=Array(o.size);return o.forEach(function(u){a[++s]=[u,u]}),a}(s):function O5(o,s){return kn(s,function(a){return[a,o[a]]})}(s,o(s))}}var AS=bS(vn),LS=bS(Mi),IS=Ia({"&":"&","<":"<",">":">",'"':""","'":"'"}),Dc=/[&<>"']/g,P5=RegExp(Dc.source);function Pm(o){return(o=yn(o))&&P5.test(o)?o.replace(Dc,IS):o}var OS=/[\\^$.*+?()[\]{}|]/g,k5=RegExp(OS.source);function km(o,s){for(var a=-1,u=null==o?0:o.length;++a-1?h[v?s[g]:g]:void 0}}var G5=Math.max;function Bc(o,s,a){var u=null==o?0:o.length;if(!u)return-1;var h=null==a?0:qr(a);return h<0&&(h=G5(u+h,0)),Ld(o,Yr(s),h)}var ai=BS(Bc);function PS(o,s,a){var u;return a(o,function(h,v,g){if(s(h,v,g))return u=v,!1}),u}var zS=Math.max,NS=Math.min;function HS(o,s,a){var u=null==o?0:o.length;if(!u)return-1;var h=u-1;return void 0!==a&&(h=qr(a),h=a<0?zS(u+h,0):NS(h,u-1)),Ld(o,Yr(s),h,!0)}var zm=BS(HS);function cl(o){return o&&o.length?o[0]:void 0}function tn(o,s){var a=-1,u=sa(o)?Array(o.length):[];return ol(o,function(h,v,g){u[++a]=s(h,v,g)}),u}function cn(o,s){return(Mr(o)?kn:tn)(o,Yr(s))}var Nm=$d("floor"),$5="Expected a function",qa=8,Z5=32,q5=128,K5=256;function XS(o){return Ua(function(s){var a=s.length,u=a,h=io.prototype.thru;for(o&&s.reverse();u--;){var v=s[u];if("function"!=typeof v)throw new TypeError($5);if(h&&!g&&"wrapper"==ry(v))var g=new io([],!0)}for(u=g?u:a;++us}function mp(o){return function(s,a){return"string"==typeof s&&"string"==typeof a||(s=Yi(s),a=Yi(a)),o(s,a)}}var o7=mp(Hm),cI=mp(function(o,s){return o>=s}),hI=cI,fI=Object.prototype.hasOwnProperty;function vI(o,s){return null!=o&&fI.call(o,s)}function Pc(o,s){return null!=o&&_f(o,s,vI)}var dI=Math.max,pI=Math.min;function Gm(o,s,a){return s=fs(s),void 0===a?(a=s,s=0):a=fs(a),function gI(o,s,a){return o>=pI(s,a)&&o-1:!!h&&Ql(o,s,a)>-1}var xI=Math.max;function qS(o,s,a){var u=null==o?0:o.length;if(!u)return-1;var h=null==a?0:qr(a);return h<0&&(h=xI(u+h,0)),Ql(o,s,h)}var wI=Math.min;function Wm(o,s,a){for(var u=a?xs:Id,h=o[0].length,v=o.length,g=v,y=Array(v),w=1/0,M=[];g--;){var A=o[g];g&&s&&(A=kn(A,Ea(s))),w=wI(A.length,w),y[g]=!a&&(s||h>=120&&A.length>=120)?new hi(g&&A):void 0}A=o[0];var L=-1,O=y[0];t:for(;++L1),v}),oo(o,Kd(o),a),u&&(a=en(a,7,LO));for(var h=s.length;h--;)bp(a,s[h]);return a}),i1=RO;function Ff(o,s,a,u){if(!Cn(o))return o;for(var h=-1,v=(s=Jn(s,o)).length,g=v-1,y=o;null!=y&&++hs||v&&g&&w&&!y&&!M||u&&g&&w||!a&&w||!h)return 1;if(!u&&!v&&!M&&o=y?w:w*("desc"==a[u]?-1:1)}return o.index-s.index}(v,g,a)})}function o1(o,s,a,u){return null==o?[]:(Mr(s)||(s=null==s?[]:[s]),Mr(a=u?void 0:a)||(a=null==a?[]:[a]),MM(o,s,a))}function Ap(o){return Ua(function(s){return s=kn(s,Ea(Yr)),jr(function(a){var u=this;return o(s,function(h){return Ha(h,u,a)})})})}var TM=Ap(kn),kO=Math.min,Ep=jr(function(o,s){var a=(s=1==s.length&&Mr(s[0])?kn(s[0],Ea(Yr)):kn(ii(s,1),Ea(Yr))).length;return jr(function(u){for(var h=-1,v=kO(u.length,a);++hl1)return a;do{s%2&&(a+=o),(s=WO(s/2))&&(o+=o)}while(s);return a}var XO=Cm("length"),bM="\\ud800-\\udfff",ZO="["+bM+"]",c1="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Df="\\ud83c[\\udffb-\\udfff]",IM="[^"+bM+"]",Xo="(?:\\ud83c[\\udde6-\\uddff]){2}",Lp="[\\ud800-\\udbff][\\udc00-\\udfff]",OM="(?:"+c1+"|"+Df+")?",RM="[\\ufe0e\\ufe0f]?",JO=RM+OM+"(?:\\u200d(?:"+[IM,Xo,Lp].join("|")+")"+RM+OM+")*",jO="(?:"+[IM+c1+"?",c1,Xo,Lp,ZO].join("|")+")",FM=RegExp(Df+"(?="+Df+")|"+jO+JO,"g");function zc(o){return xc(o)?function tR(o){for(var s=FM.lastIndex=0;FM.test(o);)++s;return s}(o):XO(o)}var eR=Math.ceil;function Ip(o,s){var a=(s=void 0===s?" ":Ta(s)).length;if(a<2)return a?u1(s,o):s;var u=u1(s,eR(o/zc(s)));return xc(s)?Qs(so(u),0,o).join(""):u.slice(0,o)}var rR=Math.ceil,DM=Math.floor,iR=/^\s+/,aR=ni.parseInt,Bf=jr(function(o,s){return ds(o,32,void 0,s,vs(s,Jl(Bf)))});Bf.placeholder={};var h1=Bf,Dp=jr(function(o,s){return ds(o,64,void 0,s,vs(s,Jl(Dp)))});Dp.placeholder={};var oR=Dp,sR=bm(function(o,s,a){o[a?0:1].push(s)},function(){return[[],[]]}),vl=sR,PM=Ua(function(o,s){return null==o?{}:function lR(o,s){return CM(o,s,function(a,u){return Sf(o,u)})}(o,s)}),f1=PM;function y7(o,s,a,u){for(var h=a-1,v=o.length;++h-1;)y!==o&&Pf.call(y,w,1),Pf.call(o,w,1);return o}function zM(o,s){return o&&o.length&&s&&s.length?v1(o,s):o}var fR=jr(zM),dR=Array.prototype.splice;function HM(o,s){for(var a=o?s.length:0,u=a-1;a--;){var h=s[a];if(a==u||h!==v){var v=h;Po(h)?dR.call(o,h,1):bp(o,h)}}return o}var pR=Ua(function(o,s){var a=null==o?0:o.length,u=ua(o,s);return HM(o,kn(s,function(h){return Po(h,a)?+h:h}).sort(_M)),u}),gR=pR,yR=Math.floor,mR=Math.random;function d1(o,s){return o+yR(mR()*(s-o+1))}var xR=parseFloat,GM=Math.min,CR=Math.random,_R=Math.ceil,SR=Math.max;function Pp(o){return function(s,a,u){return u&&"number"!=typeof u&&Ui(s,a,u)&&(a=u=void 0),s=fs(s),void 0===a?(a=s,s=0):a=fs(a),function MR(o,s,a,u){for(var h=-1,v=SR(_R((s-o)/(a||1)),0),g=Array(v);v--;)g[u?v:++h]=o,o+=a;return g}(s,a,u=void 0===u?s1&&Ui(o,s[0],s[1])?s=[]:a>2&&Ui(s[0],s[1],s[2])&&(s=[s[0]]),MM(o,ii(s,1),[])}),VR=qM,Eu=4294967294,$R=Math.floor,x1=Math.min;function C1(o,s,a,u){var h=0,v=null==o?0:o.length;if(0===v)return 0;for(var g=(s=a(s))!=s,y=null===s,w=ui(s),M=void 0===s;h>>1,g=o[v];null!==g&&!ui(g)&&(a?g<=s:g>>0)?(o=yn(o))&&("string"==typeof s||null!=s&&!qm(s))&&!(s=Ta(s))&&xc(o)?Qs(so(o),0,a):o.split(s,a):[]}var _1=Math.max,eF=Mc(function(o,s,a){return o+(a?" ":"")+Ud(s)}),rF=eF;function S1(){return!0}var rT=_d(function(o,s){return o-s},0),nT=rT;function M1(o,s){return o&&o.length?Tp(o,Yr(s)):0}var sT=Object.prototype,oF=sT.hasOwnProperty;function lT(o,s,a,u){return void 0===o||ao(o,sT[a])&&!oF.call(u,a)?s:o}var A1={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function sF(o){return"\\"+A1[o]}var cT=/<%=([\s\S]+?)%>/g,E1={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:cT,variable:"",imports:{_:{escape:Pm}}},fF=/\b__p \+= '';/g,vF=/\b(__p \+=) '' \+/g,dF=/(__e\(.*?\)|\b__t\)) \+\n'';/g,pF=/[()=,{}\[\]\/\s]/,vT=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ti=/($^)/,gF=/['\n\r\u2028\u2029\\]/g,dT=Object.prototype.hasOwnProperty,yF="Expected a function";function I1(o,s,a){var u=!0,h=!0;if("function"!=typeof o)throw new TypeError(yF);return Cn(a)&&(u="leading"in a?!!a.leading:u,h="trailing"in a?!!a.trailing:h),ms(o,s,{leading:u,maxWait:s,trailing:h})}function Gf(o,s){return s(o)}var O1=4294967295,mF=Math.min;function gT(o,s){var a=o;return a instanceof on&&(a=a.value()),Hy(s,function(u,h){return h.func.apply(h.thisArg,Wa([u],h.args))},a)}function R1(){return gT(this.__wrapped__,this.__actions__)}var yT=9007199254740991;function Yc(o){return yn(o).toUpperCase()}function xT(o,s){for(var a=o.length;a--&&Ql(s,o[a],0)>-1;);return a}function F1(o,s){for(var a=-1,u=o.length;++a-1;);return a}var TF=/^\s+/,LF=/\w*$/,_s=Ia({"&":"&","<":"<",">":">",""":'"',"'":"'"}),B1=/&(?:amp|lt|gt|quot|#39);/g,ya=RegExp(B1.source),wT=pu&&1/tp(new pu([,-0]))[1]==1/0?function(o){return new pu(o)}:ey,m7=wT,Ss=200;function Kr(o,s,a){var u=-1,h=Id,v=o.length,g=!0,y=[],w=y;if(a)g=!1,h=xs;else if(v>=Ss){var M=s?null:m7(o);if(M)return tp(M);g=!1,h=mf,w=new hi}else w=s?[]:y;t:for(;++u1||this.__actions__.length)&&u instanceof on&&Po(a)?((u=u.slice(a,+a+(s?1:0))).__actions__.push({func:Gf,args:[h],thisArg:void 0}),new io(u,this.__chain__).thru(function(v){return s&&!v.length&&v.push(void 0),v})):this.thru(h)}),z1=Gp;function N1(o,s,a){var u=o.length;if(u<2)return u?Kr(o[0]):[];for(var h=-1,v=Array(u);++h1?o[s-1]:void 0;return a="function"==typeof a?(o.pop(),a):void 0,Wf(o,a)}),fr={chunk:function gL(o,s,a){s=(a?Ui(o,s,a):void 0===s)?1:pL(qr(s),0);var u=null==o?0:o.length;if(!u||s<1)return[];for(var h=0,v=0,g=Array(d_(u/s));hh?0:h+a),(u=void 0===u||u>h?h:qr(u))<0&&(u+=h),u=a>u?0:FS(u);a=-oM&&o<=oM},isSet:NL,isString:Mu,isSymbol:ui,isTypedArray:ps,isUndefined:fo,isWeakMap:function KI(o){return Gn(o)&&"[object WeakMap]"==Xa(o)},isWeakSet:function _p(o){return Gn(o)&&"[object WeakSet]"==Fi(o)},lt:cM,lte:vO,toArray:yM,toFinite:fs,toInteger:qr,toLength:FS,toNumber:Yi,toPlainObject:dS,toSafeInteger:function SF(o){return o?hu(qr(o),-yT,yT):0===o?o:0},toString:yn},ta={add:B3,ceil:dL,divide:wS,floor:Nm,max:vo,maxBy:jm,mean:function mO(o){return fM(o,Wi)},meanBy:function xO(o,s){return fM(o,Yr(s))},min:t1,minBy:function vM(o,s){return o&&o.length?Mp(o,Yr(s),kc):void 0},multiply:pM,round:m1,subtract:nT,sum:function iF(o){return o&&o.length?Tp(o,Wi):0},sumBy:M1},G1_clamp=fu,G1_inRange=Gm,Wr={assign:af,assignIn:ru,assignInWith:My,assignWith:W6,at:Ey,create:function gn(o,s){var a=$h(o);return null==s?a:Vy(a,s)},defaults:_5,defaultsDeep:up,entries:AS,entriesIn:LS,extend:ru,extendWith:My,findKey:function kS(o,s){return PS(o,Yr(s),uo)},findLastKey:function pp(o,s){return PS(o,Yr(s),Fc)},forIn:VS,forInRight:function eI(o,s){return null==o?o:SS(o,$a(s),Mi)},forOwn:function gp(o,s){return o&&uo(o,$a(s))},forOwnRight:function $S(o,s){return o&&Fc(o,$a(s))},functions:function nI(o){return null==o?[]:yp(o,vn(o))},functionsIn:function iI(o){return null==o?[]:yp(o,Mi(o))},get:yr,has:Pc,hasIn:Sf,invert:Xm,invertBy:l7,invoke:c7,keys:vn,keysIn:Mi,mapKeys:Jm,mapValues:function dO(o,s){var a={};return s=Yr(s),uo(o,function(u,h,v){ko(a,h,s(u,h,v))}),a},merge:If,mergeWith:Mf,omit:i1,omitBy:function FO(o,s){return a1(o,Rf(Yr(s)))},pick:f1,pickBy:a1,result:function y1(o,s,a){var u=-1,h=(s=Jn(s,o)).length;for(h||(h=1,o=void 0);++u=this.__values__.length;return{done:o,value:o?void 0:this.__values__[this.__index__++]}},plant:function uR(o){for(var s,a=this;a instanceof ty;){var u=XC(a);u.__index__=0,u.__values__=void 0,s?h.__wrapped__=u:s=u;var h=u;a=a.__wrapped__}return h.__wrapped__=o,s},reverse:function HF(){var o=this.__wrapped__;if(o instanceof on){var s=o;return this.__actions__.length&&(s=new on(this)),(s=s.reverse()).__actions__.push({func:Gf,args:[po],thisArg:void 0}),new io(s,this.__chain__)}return this.thru(po)},tap:function oT(o,s){return s(o),o},thru:Gf,toIterator:function CF(){return this},toJSON:R1,value:R1,valueOf:R1,wrapperChain:function NF(){return bc(this)}},mn={camelCase:Uy,capitalize:Jw,deburr:jw,endsWith:TS,escape:Pm,escapeRegExp:function dp(o){return(o=yn(o))&&k5.test(o)?o.replace(OS,"\\$&"):o},kebabCase:iO,lowerCase:Qm,lowerFirst:cO,pad:function nR(o,s,a){o=yn(o);var u=(s=qr(s))?zc(o):0;if(!s||u>=s)return o;var h=(s-u)/2;return Ip(DM(h),a)+o+Ip(rR(h),a)},padEnd:function Op(o,s,a){o=yn(o);var u=(s=qr(s))?zc(o):0;return s&&u=v)return o;var y=a-zc(u);if(y<1)return u;var w=g?Qs(g,0,y).join(""):o.slice(0,y);if(void 0===h)return w+u;if(g&&(y+=w.length-y),qm(h)){if(o.slice(y).search(h)){var M,A=w;for(h.global||(h=RegExp(h.source,yn(LF.exec(h))+"g")),h.lastIndex=0;M=h.exec(A);)var L=M.index;w=w.slice(0,void 0===L?y:L)}}else if(o.indexOf(Ta(h),y)!=y){var O=w.lastIndexOf(h);O>-1&&(w=w.slice(0,O))}return w+u},unescape:function Ka(o){return(o=yn(o))&&ya.test(o)?o.replace(B1,_s):o},upperCase:kF,upperFirst:Ud,words:Sc},Sn={attempt:Hw,bindAll:w4,cond:wm,conforms:function uS(o){return function lS(o){var s=vn(o);return function(a){return ip(a,o,s)}}(en(o,1))},constant:Bo,defaultTo:function x5(o,s){return null==o||o!=o?s:o},flow:J5,flowRight:tI,identity:Wi,iteratee:function jI(o){return Yr("function"==typeof o?o:en(o,1))},matches:Sp,matchesProperty:function gO(o,s){return oS(o,en(s,1))},method:_O,methodOf:MO,mixin:Of,noop:ey,nthArg:function n1(o){return o=qr(o),jr(function(s){return mM(s,o)})},over:TM,overEvery:HO,overSome:YO,property:np,propertyOf:function cR(o){return function(s){return null==o?void 0:su(o,s)}},range:Nc,rangeRight:TR,stubArray:Zy,stubFalse:gw,stubObject:function eT(){return{}},stubString:function nF(){return""},stubTrue:S1,times:function xF(o,s){if((o=qr(o))<1||o>9007199254740991)return[];var a=O1,u=mF(o,O1);s=$a(s),o-=O1;for(var h=ef(u,s);++as){var u=o;o=s,s=u}if(a||o%1||s%1){var h=CR();return GM(o+h*(s-o+xR("1e-"+((h+"").length-1))),s)}return d1(o,s)},xt.reduce=Tn.reduce,xt.reduceRight=Tn.reduceRight,xt.repeat=mn.repeat,xt.replace=mn.replace,xt.result=Wr.result,xt.round=ta.round,xt.sample=Tn.sample,xt.size=Tn.size,xt.snakeCase=mn.snakeCase,xt.some=Tn.some,xt.sortedIndex=fr.sortedIndex,xt.sortedIndexBy=fr.sortedIndexBy,xt.sortedIndexOf=fr.sortedIndexOf,xt.sortedLastIndex=fr.sortedLastIndex,xt.sortedLastIndexBy=fr.sortedLastIndexBy,xt.sortedLastIndexOf=fr.sortedLastIndexOf,xt.startCase=mn.startCase,xt.startsWith=mn.startsWith,xt.subtract=ta.subtract,xt.sum=ta.sum,xt.sumBy=ta.sumBy,xt.template=mn.template,xt.times=Sn.times,xt.toFinite=Or.toFinite,xt.toInteger=qr,xt.toLength=Or.toLength,xt.toLower=mn.toLower,xt.toNumber=Or.toNumber,xt.toSafeInteger=Or.toSafeInteger,xt.toString=Or.toString,xt.toUpper=mn.toUpper,xt.trim=mn.trim,xt.trimEnd=mn.trimEnd,xt.trimStart=mn.trimStart,xt.truncate=mn.truncate,xt.unescape=mn.unescape,xt.uniqueId=Sn.uniqueId,xt.upperCase=mn.upperCase,xt.upperFirst=mn.upperFirst,xt.each=Tn.forEach,xt.eachRight=Tn.forEachRight,xt.first=fr.head,Vc(xt,function(){var o={};return uo(xt,function(s,a){W1.call(xt.prototype,a)||(o[a]=s)}),o}(),{chain:!1}),xt.VERSION="4.17.21",(xt.templateSettings=mn.templateSettings).imports._=xt,Aa(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){xt[o].placeholder=xt}),Aa(["drop","take"],function(o,s){on.prototype[o]=function(a){a=void 0===a?1:Up(qr(a),0);var u=this.__filtered__&&!s?new on(this):this.clone();return u.__filtered__?u.__takeCount__=U1(a,u.__takeCount__):u.__views__.push({size:U1(a,En),type:o+(u.__dir__<0?"Right":"")}),u},on.prototype[o+"Right"]=function(a){return this.reverse()[o](a).reverse()}}),Aa(["filter","map","takeWhile"],function(o,s){var a=s+1,u=1==a||3==a;on.prototype[o]=function(h){var v=this.clone();return v.__iteratees__.push({iteratee:Yr(h),type:a}),v.__filtered__=v.__filtered__||u,v}}),Aa(["head","last"],function(o,s){var a="take"+(s?"Right":"");on.prototype[o]=function(){return this[a](1).value()[0]}}),Aa(["initial","tail"],function(o,s){var a="drop"+(s?"":"Right");on.prototype[o]=function(){return this.__filtered__?new on(this):this[a](1)}}),on.prototype.compact=function(){return this.filter(Wi)},on.prototype.find=function(o){return this.filter(o).head()},on.prototype.findLast=function(o){return this.reverse().find(o)},on.prototype.invokeMap=jr(function(o,s){return"function"==typeof o?new on(this):this.map(function(a){return Ef(a,o,s)})}),on.prototype.reject=function(o){return this.filter(Rf(Yr(o)))},on.prototype.slice=function(o,s){o=qr(o);var a=this;return a.__filtered__&&(o>0||s<0)?new on(a):(o<0?a=a.takeRight(-o):o&&(a=a.drop(o)),void 0!==s&&(a=(s=qr(s))<0?a.dropRight(-s):a.take(s-o)),a)},on.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},on.prototype.toArray=function(){return this.take(En)},uo(on.prototype,function(o,s){var a=/^(?:filter|find|map|reject)|While$/.test(s),u=/^(?:head|last)$/.test(s),h=xt[u?"take"+("last"==s?"Right":""):s],v=u||/^find/.test(s);h&&(xt.prototype[s]=function(){var g=this.__wrapped__,y=u?[1]:arguments,w=g instanceof on,M=y[0],A=w||Mr(g),L=function(ot){var ft=h.apply(xt,Wa([ot],y));return u&&O?ft[0]:ft};A&&a&&"function"==typeof M&&1!=M.length&&(w=A=!1);var O=this.__chain__,k=v&&!O,X=w&&!this.__actions__.length;if(!v&&A){g=X?g:new on(this);var tt=o.apply(g,y);return tt.__actions__.push({func:Gf,args:[L],thisArg:void 0}),new io(tt,O)}return k&&X?o.apply(this,y):(tt=this.thru(L),k?u?tt.value()[0]:tt.value():tt)})}),Aa(["pop","push","shift","sort","splice","unshift"],function(o){var s=Ou[o],a=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",u=/^(?:pop|shift)$/.test(o);xt.prototype[o]=function(){var h=arguments;if(u&&!this.__chain__){var v=this.value();return s.apply(Mr(v)?v:[],h)}return this[a](function(g){return s.apply(Mr(g)?g:[],h)})}}),uo(on.prototype,function(o,s){var a=xt[s];if(a){var u=a.name+"";W1.call(qh,u)||(qh[u]=[]),qh[u].push({name:s,func:a})}}),qh[vc(void 0,2).name]=[{name:"wrapper",func:void 0}],on.prototype.clone=function WF(){var o=new on(this.__wrapped__);return o.__actions__=ba(this.__actions__),o.__dir__=this.__dir__,o.__filtered__=this.__filtered__,o.__iteratees__=ba(this.__iteratees__),o.__takeCount__=this.__takeCount__,o.__views__=ba(this.__views__),o},on.prototype.reverse=function UF(){if(this.__filtered__){var o=new on(this);o.__dir__=-1,o.__filtered__=!0}else(o=this.clone()).__dir__*=-1;return o},on.prototype.value=function Qr(){var o=this.__wrapped__.value(),s=this.__dir__,a=Mr(o),u=s<0,h=a?o.length:0,v=function Iu(o,s,a){for(var u=-1,h=a.length;++u1&&(_a-=1),_a<1/6?Li+6*(bo-Li)*_a:_a<.5?bo:_a<2/3?Li+(bo-Li)*(2/3-_a)*6:Li}if(It=Nr(It,360),ce=Nr(ce,100),Pt=Nr(Pt,100),0===ce)Ne=hr=ar=Pt;else{var Nn=Pt<.5?Pt*(1+ce):Pt+ce-Pt*ce,Xn=2*Pt-Nn;Ne=ln(Xn,Nn,It+1/3),hr=ln(Xn,Nn,It),ar=ln(Xn,Nn,It-1/3)}return{r:255*Ne,g:255*hr,b:255*ar}}(It.h,Ne,ar),ln=!0,Nn="hsl"),It.hasOwnProperty("a")&&(Pt=It.a)),Pt=sn(Pt),{ok:ln,format:It.format||Nn,r:g(255,y(ce.r,0)),g:g(255,y(ce.g,0)),b:g(255,y(ce.b,0)),a:Pt}}(It);this._originalInput=It,this._r=Pt.r,this._g=Pt.g,this._b=Pt.b,this._a=Pt.a,this._roundA=v(100*this._a)/100,this._format=ce.format||Pt.format,this._gradientType=ce.gradientType,this._r<1&&(this._r=v(this._r)),this._g<1&&(this._g=v(this._g)),this._b<1&&(this._b=v(this._b)),this._ok=Pt.ok,this._tc_id=h++}function O(It,ce,Pt){It=Nr(It,255),ce=Nr(ce,255),Pt=Nr(Pt,255);var ar,ln,Ne=y(It,ce,Pt),hr=g(It,ce,Pt),Nn=(Ne+hr)/2;if(Ne==hr)ar=ln=0;else{var Xn=Ne-hr;switch(ln=Nn>.5?Xn/(2-Ne-hr):Xn/(Ne+hr),Ne){case It:ar=(ce-Pt)/Xn+(ce>1)+720)%360;--ce;)Ne.h=(Ne.h+hr)%360,ar.push(M(Ne));return ar}function mr(It,ce){ce=ce||6;for(var Pt=M(It).toHsv(),Ne=Pt.h,hr=Pt.s,ar=Pt.v,ln=[],Nn=1/ce;ce--;)ln.push(M({h:Ne,s:hr,v:ar})),ar=(ar+Nn)%1;return ln}M.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var It=this.toRgb();return(299*It.r+587*It.g+114*It.b)/1e3},getLuminance:function(){var ce,Pt,Ne,It=this.toRgb();return Pt=It.g/255,Ne=It.b/255,.2126*((ce=It.r/255)<=.03928?ce/12.92:s.pow((ce+.055)/1.055,2.4))+.7152*(Pt<=.03928?Pt/12.92:s.pow((Pt+.055)/1.055,2.4))+.0722*(Ne<=.03928?Ne/12.92:s.pow((Ne+.055)/1.055,2.4))},setAlpha:function(It){return this._a=sn(It),this._roundA=v(100*this._a)/100,this},toHsv:function(){var It=k(this._r,this._g,this._b);return{h:360*It.h,s:It.s,v:It.v,a:this._a}},toHsvString:function(){var It=k(this._r,this._g,this._b),ce=v(360*It.h),Pt=v(100*It.s),Ne=v(100*It.v);return 1==this._a?"hsv("+ce+", "+Pt+"%, "+Ne+"%)":"hsva("+ce+", "+Pt+"%, "+Ne+"%, "+this._roundA+")"},toHsl:function(){var It=O(this._r,this._g,this._b);return{h:360*It.h,s:It.s,l:It.l,a:this._a}},toHslString:function(){var It=O(this._r,this._g,this._b),ce=v(360*It.h),Pt=v(100*It.s),Ne=v(100*It.l);return 1==this._a?"hsl("+ce+", "+Pt+"%, "+Ne+"%)":"hsla("+ce+", "+Pt+"%, "+Ne+"%, "+this._roundA+")"},toHex:function(It){return tt(this._r,this._g,this._b,It)},toHexString:function(It){return"#"+this.toHex(It)},toHex8:function(It){return function ot(It,ce,Pt,Ne,hr){var ar=[dn(v(It).toString(16)),dn(v(ce).toString(16)),dn(v(Pt).toString(16)),dn(mi(Ne))];return hr&&ar[0].charAt(0)==ar[0].charAt(1)&&ar[1].charAt(0)==ar[1].charAt(1)&&ar[2].charAt(0)==ar[2].charAt(1)&&ar[3].charAt(0)==ar[3].charAt(1)?ar[0].charAt(0)+ar[1].charAt(0)+ar[2].charAt(0)+ar[3].charAt(0):ar.join("")}(this._r,this._g,this._b,this._a,It)},toHex8String:function(It){return"#"+this.toHex8(It)},toRgb:function(){return{r:v(this._r),g:v(this._g),b:v(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+v(this._r)+", "+v(this._g)+", "+v(this._b)+")":"rgba("+v(this._r)+", "+v(this._g)+", "+v(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:v(100*Nr(this._r,255))+"%",g:v(100*Nr(this._g,255))+"%",b:v(100*Nr(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+v(100*Nr(this._r,255))+"%, "+v(100*Nr(this._g,255))+"%, "+v(100*Nr(this._b,255))+"%)":"rgba("+v(100*Nr(this._r,255))+"%, "+v(100*Nr(this._g,255))+"%, "+v(100*Nr(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(Xr[tt(this._r,this._g,this._b,!0)]||!1)},toFilter:function(It){var ce="#"+ft(this._r,this._g,this._b,this._a),Pt=ce,Ne=this._gradientType?"GradientType = 1, ":"";if(It){var hr=M(It);Pt="#"+ft(hr._r,hr._g,hr._b,hr._a)}return"progid:DXImageTransform.Microsoft.gradient("+Ne+"startColorstr="+ce+",endColorstr="+Pt+")"},toString:function(It){var ce=!!It;It=It||this._format;var Pt=!1;return!ce&&this._a<1&&this._a>=0&&("hex"===It||"hex6"===It||"hex3"===It||"hex4"===It||"hex8"===It||"name"===It)?"name"===It&&0===this._a?this.toName():this.toRgbString():("rgb"===It&&(Pt=this.toRgbString()),"prgb"===It&&(Pt=this.toPercentageRgbString()),("hex"===It||"hex6"===It)&&(Pt=this.toHexString()),"hex3"===It&&(Pt=this.toHexString(!0)),"hex4"===It&&(Pt=this.toHex8String(!0)),"hex8"===It&&(Pt=this.toHex8String()),"name"===It&&(Pt=this.toName()),"hsl"===It&&(Pt=this.toHslString()),"hsv"===It&&(Pt=this.toHsvString()),Pt||this.toHexString())},clone:function(){return M(this.toString())},_applyModification:function(It,ce){var Pt=It.apply(null,[this].concat([].slice.call(ce)));return this._r=Pt._r,this._g=Pt._g,this._b=Pt._b,this.setAlpha(Pt._a),this},lighten:function(){return this._applyModification(de,arguments)},brighten:function(){return this._applyModification(pe,arguments)},darken:function(){return this._applyModification(Me,arguments)},desaturate:function(){return this._applyModification(ht,arguments)},saturate:function(){return this._applyModification(pt,arguments)},greyscale:function(){return this._applyModification(Wt,arguments)},spin:function(){return this._applyModification(ze,arguments)},_applyCombination:function(It,ce){return It.apply(null,[this].concat([].slice.call(ce)))},analogous:function(){return this._applyCombination(gr,arguments)},complement:function(){return this._applyCombination(Oe,arguments)},monochromatic:function(){return this._applyCombination(mr,arguments)},splitcomplement:function(){return this._applyCombination(vr,arguments)},triad:function(){return this._applyCombination(Ze,arguments)},tetrad:function(){return this._applyCombination(tr,arguments)}},M.fromRatio=function(It,ce){if("object"==typeof It){var Pt={};for(var Ne in It)It.hasOwnProperty(Ne)&&(Pt[Ne]="a"===Ne?It[Ne]:ri(It[Ne]));It=Pt}return M(It,ce)},M.equals=function(It,ce){return!(!It||!ce)&&M(It).toRgbString()==M(ce).toRgbString()},M.random=function(){return M.fromRatio({r:w(),g:w(),b:w()})},M.mix=function(It,ce,Pt){Pt=0===Pt?0:Pt||50;var Ne=M(It).toRgb(),hr=M(ce).toRgb(),ar=Pt/100;return M({r:(hr.r-Ne.r)*ar+Ne.r,g:(hr.g-Ne.g)*ar+Ne.g,b:(hr.b-Ne.b)*ar+Ne.b,a:(hr.a-Ne.a)*ar+Ne.a})},M.readability=function(It,ce){var Pt=M(It),Ne=M(ce);return(s.max(Pt.getLuminance(),Ne.getLuminance())+.05)/(s.min(Pt.getLuminance(),Ne.getLuminance())+.05)},M.isReadable=function(It,ce,Pt){var hr,ar,Ne=M.readability(It,ce);switch(ar=!1,hr=function xv(It){var ce,Pt;return"AA"!==(ce=((It=It||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==ce&&(ce="AA"),"small"!==(Pt=(It.size||"small").toLowerCase())&&"large"!==Pt&&(Pt="small"),{level:ce,size:Pt}}(Pt),hr.level+hr.size){case"AAsmall":case"AAAlarge":ar=Ne>=4.5;break;case"AAlarge":ar=Ne>=3;break;case"AAAsmall":ar=Ne>=7}return ar},M.mostReadable=function(It,ce,Pt){var ar,ln,Nn,Xn,Ne=null,hr=0;ln=(Pt=Pt||{}).includeFallbackColors,Nn=Pt.level,Xn=Pt.size;for(var Li=0;Lihr&&(hr=ar,Ne=M(ce[Li]));return M.isReadable(It,Ne,{level:Nn,size:Xn})||!ln?Ne:(Pt.includeFallbackColors=!1,M.mostReadable(It,["#fff","#000"],Pt))};var Je=M.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Xr=M.hexNames=function $r(It){var ce={};for(var Pt in It)It.hasOwnProperty(Pt)&&(ce[It[Pt]]=Pt);return ce}(Je);function sn(It){return It=parseFloat(It),(isNaN(It)||It<0||It>1)&&(It=1),It}function Nr(It,ce){(function Zi(It){return"string"==typeof It&&-1!=It.indexOf(".")&&1===parseFloat(It)})(It)&&(It="100%");var Pt=function qi(It){return"string"==typeof It&&-1!=It.indexOf("%")}(It);return It=g(ce,y(0,parseFloat(It))),Pt&&(It=parseInt(It*ce,10)/100),s.abs(It-ce)<1e-6?1:It%ce/parseFloat(ce)}function qn(It){return g(1,y(0,It))}function fn(It){return parseInt(It,16)}function dn(It){return 1==It.length?"0"+It:""+It}function ri(It){return It<=1&&(It=100*It+"%"),It}function mi(It){return s.round(255*parseFloat(It)).toString(16)}function Ki(It){return fn(It)/255}var Pt,Ne,hr,Mn=(Ne="[\\s|\\(]+("+(Pt="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+Pt+")[,|\\s]+("+Pt+")\\s*\\)?",hr="[\\s|\\(]+("+Pt+")[,|\\s]+("+Pt+")[,|\\s]+("+Pt+")[,|\\s]+("+Pt+")\\s*\\)?",{CSS_UNIT:new RegExp(Pt),rgb:new RegExp("rgb"+Ne),rgba:new RegExp("rgba"+hr),hsl:new RegExp("hsl"+Ne),hsla:new RegExp("hsla"+hr),hsv:new RegExp("hsv"+Ne),hsva:new RegExp("hsva"+hr),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function ra(It){return!!Mn.CSS_UNIT.exec(It)}o.exports?o.exports=M:window.tinycolor=M}(Math)}(DT);var BT=DT.exports,$c=[95,85,75,30,15,0,15,30,45,60,80],Vf=function(o){return BT(o).getLuminance()<=.5},PT=[{fontColorIndex:0,bgColorIndex:3},{fontColorIndex:13,bgColorIndex:8},{fontColorIndex:14,bgColorIndex:1}],pi=function(o){void 0===o&&(o={});var s=Array.from(Array(15)).fill(Cd),a=o.basicColorRelations,u=void 0===a?[]:a,v=function(o){for(var s=[],a=0;a<11;a++){var u=$c[a];s.push(Yc(0===u?o:BT.mix(o,a<5?"#FFFFFF":"#000000",u).toHexString()))}return s}(o.brandColor);return u.forEach(function(g){s[g.basicColorIndex]=v[g.standardColorIndex]}),PT.forEach(function(g){s[g.fontColorIndex]=Vf(s[g.bgColorIndex])?Cd:Ug}),ue(ue({},o),{basicColors:s})},Fa=pi({brandColor:"#3471F9",semanticColors:{red:"#FF4D4F",green:"#29A294",yellow:"#FAAD14"},others:{highlight:"#87B5FF",results:"#F0F7FF"},basicColorRelations:[{basicColorIndex:1,standardColorIndex:0},{basicColorIndex:2,standardColorIndex:1},{basicColorIndex:3,standardColorIndex:5},{basicColorIndex:4,standardColorIndex:6},{basicColorIndex:5,standardColorIndex:6},{basicColorIndex:6,standardColorIndex:6},{basicColorIndex:7,standardColorIndex:5},{basicColorIndex:9,standardColorIndex:1},{basicColorIndex:10,standardColorIndex:4},{basicColorIndex:11,standardColorIndex:4},{basicColorIndex:12,standardColorIndex:5}]}),kT={default:pi({brandColor:"#326EF4",semanticColors:{red:"#FF4D4F",green:"#29A294",yellow:"#FAAD14"},others:{highlight:"#87B5FF",results:"#F0F7FF"},basicColorRelations:[{basicColorIndex:1,standardColorIndex:0},{basicColorIndex:2,standardColorIndex:1},{basicColorIndex:3,standardColorIndex:1},{basicColorIndex:4,standardColorIndex:2},{basicColorIndex:5,standardColorIndex:7},{basicColorIndex:6,standardColorIndex:5},{basicColorIndex:7,standardColorIndex:5},{basicColorIndex:9,standardColorIndex:1},{basicColorIndex:10,standardColorIndex:2},{basicColorIndex:11,standardColorIndex:5},{basicColorIndex:12,standardColorIndex:5}]}),colorful:Fa,gray:pi({brandColor:"#9DA7B6",semanticColors:{red:"#FF4D4F",green:"#29A294",yellow:"#FAAD14"},others:{highlight:"#87B5FF",results:"#F0F7FF"},basicColorRelations:[{basicColorIndex:1,standardColorIndex:0},{basicColorIndex:2,standardColorIndex:1},{basicColorIndex:3,standardColorIndex:1},{basicColorIndex:4,standardColorIndex:2},{basicColorIndex:5,standardColorIndex:7},{basicColorIndex:6,standardColorIndex:8},{basicColorIndex:7,standardColorIndex:5},{basicColorIndex:9,standardColorIndex:1},{basicColorIndex:10,standardColorIndex:2},{basicColorIndex:11,standardColorIndex:3},{basicColorIndex:12,standardColorIndex:3}]})},Ja="Roboto, PingFangSC, BlinkMacSystemFont, Microsoft YaHei, Arial, sans-serif",Ru={zh_CN:{\u5c0f\u8ba1:"\u5c0f\u8ba1",\u603b\u8ba1:"\u603b\u8ba1",\u603b\u548c:"\u603b\u548c",\u9879:"\u9879",\u5df2\u9009\u62e9:"\u5df2\u9009\u62e9",\u5e8f\u53f7:"\u5e8f\u53f7",\u5ea6\u91cf:"\u5ea6\u91cf",\u6570\u503c:"\u6570\u503c",\u5171\u8ba1:"\u5171\u8ba1",\u6761:"\u6761",\u8d8b\u52bf:"\u8d8b\u52bf",\u9690\u85cf:"\u9690\u85cf",\u7ec4\u5185\u5347\u5e8f:"\u7ec4\u5185\u5347\u5e8f",\u5347\u5e8f:"\u5347\u5e8f",\u964d\u5e8f:"\u964d\u5e8f",\u7ec4\u5185\u964d\u5e8f:"\u7ec4\u5185\u964d\u5e8f",\u4e0d\u6392\u5e8f:"\u4e0d\u6392\u5e8f"},en_US:{\u5c0f\u8ba1:"Total",\u603b\u8ba1:"Total",\u603b\u548c:"SUM",\u9879:"items",\u5df2\u9009\u62e9:"selected",\u5e8f\u53f7:"Index",\u5ea6\u91cf:"Measure",\u6570\u503c:"Measure",\u5171\u8ba1:"Total",\u6761:"",\u9690\u85cf:"Hide",\u8d8b\u52bf:"Trend",\u7ec4\u5185\u5347\u5e8f:"Group ASC",\u7ec4\u5185\u964d\u5e8f:"Group DESC",\u5347\u5e8f:"ASC",\u964d\u5e8f:"DESC",\u4e0d\u6392\u5e8f:"No order"}},gi=function(o,s){return void 0===s&&(s=o),yr(Ru,["zh_CN",o],s)},$1="".concat("antv-s2","-tooltip"),Z1="".concat($1,"-container"),t8="".concat(Z1,"-show"),e8="".concat(Z1,"-hide"),NT_x=("".concat($1,"-operation"),15),yo=1;function Wn(o){return"mobile"===o||/(iPhone|iPad|SymbianOS|Windows Phone|iPod|iOS|Android)/i.test(navigator.userAgent)}var bi=function(){function o(s){this.x=0,this.y=0,this.width=0,this.height=0,this.colIndex=-1,this.level=0,this.isLeaf=!1,this.children=[],this.padding=0;var u=s.key,h=s.value,v=s.label,g=s.parent,y=s.level,w=s.rowIndex,M=s.isTotals,A=s.isGrandTotals,L=s.isSubTotals,O=s.isCollapsed,D=s.hierarchy,k=s.isPivotMode,X=s.seriesNumberWidth,tt=s.field,ot=s.spreadsheet,ft=s.query,ht=s.belongsCell,pt=s.inCollapseNode,Wt=s.isTotalMeasure,de=s.isLeaf,pe=s.extra;this.id=s.id,this.key=u,this.value=h,this.label=v||h,this.parent=g,this.level=y,this.rowIndex=w,this.isTotals=M,this.isCollapsed=O,this.hierarchy=D,this.isPivotMode=k,this.seriesNumberWidth=X,this.field=tt,this.spreadsheet=ot,this.query=ft,this.belongsCell=ht,this.inCollapseNode=pt,this.isTotalMeasure=Wt,this.isLeaf=de,this.isGrandTotals=A,this.isSubTotals=L,this.extra=pe}return o.getFieldPath=function(s,a){if(s&&!s.isTotals||s&&a){for(var u=s.parent,h=[s.field];u&&u.id!==Na;)h.push(u.field),u=u.parent;return h.reverse()}return[]},o.getAllLeaveNodes=function(s){var a=[];if(s.isLeaf)return[s];for(var u=Be([],Ae(s.children),!1),h=u.shift();h;)h.isLeaf?a.push(h):u.unshift.apply(u,Be([],Ae(h.children),!1)),h=u.shift();return a},o.getAllChildrenNodes=function(s){var a=[];if(s.isLeaf)return[s];for(var u=Be([],Ae(s.children||[]),!1),h=u.shift();h;)a.push(h),u.unshift.apply(u,Be([],Ae(h.children),!1)),h=u.shift();return a},o.getAllBranch=function(s){for(var a=[],u=this.getAllLeaveNodes(s),h=u.shift(),v=[];h;){v.unshift(h);for(var g=h.parent;g&&!Vi(g,s);)v.unshift(g),g=g.parent;a.push(v),h=u.shift(),v=[]}return a},o.blankNode=function(){return new o({id:"",key:"",value:""})},o.rootNode=function(){return new o({id:"root",key:"",value:""})},o.prototype.toJSON=function(){return i1(this,["config","hierarchy","parent","spreadsheet"])},o.prototype.getHeadLeafChild=function(){for(var s=this;!Ke(s.children);)s=cl(s.children);return s},o}(),J1=function(){function o(){this.width=0,this.height=0,this.maxLevel=-1,this.sampleNodesForAllLevels=[],this.sampleNodeForLastLevel=null,this.allNodesWithoutRoot=[],this.indexNode=[]}return o.prototype.getLeaves=function(){return this.allNodesWithoutRoot.filter(function(s){return s.isLeaf})},o.prototype.getNodes=function(s){return void 0!==s?this.allNodesWithoutRoot.filter(function(a){return a.level===s}):this.allNodesWithoutRoot},o.prototype.getNodesLessThanLevel=function(s){return this.allNodesWithoutRoot.filter(function(a){return a.level<=s})},o.prototype.pushNode=function(s,a){void 0===a&&(a=-1),-1===a?this.allNodesWithoutRoot.push(s):this.allNodesWithoutRoot.splice(a,0,s)},o.prototype.pushIndexNode=function(s){this.indexNode.push(s)},o.prototype.getIndexNodes=function(){return this.indexNode},o}(),$f=function o(s,a,u){void 0===a&&(a=!1),void 0===u&&(u=!1),this.label=s,this.isSubTotals=a,this.isGrandTotals=u};function YT(o,s){for(var a={},u=o;u&&u.key;)(!u.isTotals||s)&&(a[u.key]=u.value),u=u.parent;return a}var WT=function(o,s,a,u){return s.layoutArrange?s.layoutArrange(s.spreadsheet,a,u,o):o},j1=function(o,s,a,u){var h,v;if(null===(v=null===(h=o.spreadsheet)||void 0===h?void 0:h.facet)||void 0===v?void 0:v.getHiddenColumnsInfo(a))return!1;var y=!0,w=function(X,tt,ot){void 0===tt&&(tt=-1),void 0===ot&&(ot=-1),-1===tt?(s.children.push(X),u.pushNode(X)):(s.children.splice(tt,0,X),u.pushNode(X,ot))};if(o.layoutHierarchy){var M=o.layoutHierarchy(o.spreadsheet,a);if(M){var A=!!hl(M?.delete)&&M?.delete;y=!A;var L=M.push,O=M.unshift,D=s.children.length,k=u.getNodes().length;Ke(O)||(br(O,function(X){w(X)}),D=s.children.length,k=u.getNodes().length),Ke(L)||br(L,function(X){w(X)}),A||w(a,D,k)}else w(a)}else w(a);return y},tx=function(o,s,a){o?.layoutCoordinate&&(s?.isLeaf||a?.isLeaf)&&o?.layoutCoordinate(o.spreadsheet,s,a)},UT=function o(s){this.label=s},XT=function(o){var s,a=o.addTotalMeasureInTotal,u=o.addMeasureInTotalQuery,h=o.parentNode,v=o.currentField,g=o.fields,y=o.facetCfg,w=o.hierarchy,M=g.indexOf(v),A=y.dataSet,L=y.values,O=y.spreadsheet,D=[],k={};if(h.isTotals)a&&(k=YT(h.parent,!0),D.push.apply(D,Be([],Ae(L.map(function(ht){return new UT(ht)})),!1)));else{k=YT(h,!0);var X=A.getDimensionValues(v,k),tt=WT(X,y,h,v);D.push.apply(D,Be([],Ae(tt||[]),!1));var ot=A.getFieldName(v);Ke(D)&&(v===Jr?D.push.apply(D,Be([],Ae(null===(s=A.fields)||void 0===s?void 0:s.values),!1)):D.push(ot)),function(o,s,a){var u,h,v,g,y=null!==(g=null===(v=a.colCfg)||void 0===v?void 0:v.hideMeasureColumn)&&void 0!==g&&g,w=a.dataSet.fields.valueInCols;try{for(var M=Ma(o),A=M.next();!A.done;A=M.next())y&&w&&s===Jr&&o.splice(o.indexOf(A.value),1)}catch(O){u={error:O}}finally{try{A&&!A.done&&(h=M.return)&&h.call(M)}finally{if(u)throw u.error}}}(D,v,y),function(o){var s,w,M,a=o.isFirstField,u=o.currentField,h=o.fieldValues,y=o.spreadsheet.getTotalsConfig(a?u:o.lastField);a?y?.showGrandTotals&&(w=y.reverseLayout?"unshift":"push",M=new $f(y.label,!1,!0)):y?.showSubTotals&&(xt.size(h)>1||!1!==xt.get(y,"showSubTotals.always"))&&u!==Jr&&(w=y.reverseSubLayout?"unshift":"push",M=new $f(y.subLabel,!0)),null===(s=h[w])||void 0===s||s.call(h,M)}({currentField:v,lastField:g[M-1],isFirstField:0===M,fieldValues:D,spreadsheet:O})}var ft=D.filter(function(ht){return!fo(ht)});VT({currentField:v,fields:g,fieldValues:ft,facetCfg:y,hierarchy:w,parentNode:h,level:M,query:k,addMeasureInTotalQuery:u,addTotalMeasureInTotal:a})},Kc=function(o,s){return"".concat(o).concat(_i).concat(s)},VT=function(o){var s,a,u,h,v,g,y,w,M,A,L,O,D=o.currentField,k=o.fields,X=o.fieldValues,tt=o.facetCfg,ot=o.hierarchy,ft=o.parentNode,ht=o.level,pt=o.query,Wt=o.addMeasureInTotalQuery,de=o.addTotalMeasureInTotal,pe=tt.spreadsheet,Me=tt.collapsedCols,ze=tt.colCfg;try{for(var Oe=Ma(X.entries()),Ze=Oe.next();!Ze.done;Ze=Oe.next()){var tr=Ae(Ze.value,2),vr=tr[0],gr=tr[1],mr=gr instanceof $f,Je=gr instanceof UT,Xr=void 0,$r=void 0,sn=!1,Nr=!1,qn=!1,fn=D;if(mr)Nr=gr.isGrandTotals,qn=gr.isSubTotals,Xr=gi(gr.label),Wt?($r=ue(ue({},pt),((u={})[Jr]=null===(y=pe?.dataSet)||void 0===y?void 0:y.fields.values[0],u)),sn=!0):($r=pt,de||(sn=!0));else if(Je)Xr=gi(gr.label),$r=ue(ue({},pt),((h={})[Jr]=Xr,h)),fn=Jr,sn=!0;else if(pe.isTableMode())Xr=gr,fn=k[vr],$r=ue(ue({},pt),((v={})[fn]=Xr,v)),sn=!0;else{Xr=gr,$r=ue(ue({},pt),((g={})[D]=Xr,g));var qi=null===(M=null===(w=pe.dataCfg.fields)||void 0===w?void 0:w.valueInCols)||void 0===M||M,dn=ze?.hideMeasureColumn&&qi&&pa(k,Jr);sn=ht===k.length-(dn?2:1)}var mi=Kc(ft.id,Xr);if(!mi)return;var Ki=!!hl(Me?.[mi])&&Me?.[mi],Mn=new bi({id:mi,key:fn,value:Xr,level:ht,field:fn,parent:ft,isTotals:mr,isGrandTotals:Nr,isSubTotals:qn,isTotalMeasure:Je,isCollapsed:Ki,hierarchy:ot,query:$r,spreadsheet:pe,isLeaf:sn||Ki}),ra=j1(tt,ft,Mn,ot),xi=null===(A=pe?.facet)||void 0===A?void 0:A.getHiddenColumnsInfo(Mn);xi&&ft&&(ft.hiddenChildNodeInfo=xi),ht>ot.maxLevel&&!Nr&&!ft.isGrandTotals&&!ft.isSubTotals&&!Mn.isSubTotals&&(ot.sampleNodesForAllLevels.push(Mn),ot.maxLevel=ht,ot.sampleNodeForLastLevel=xi?(null===(L=xi?.displaySiblingNode)||void 0===L?void 0:L.next)||(null===(O=xi?.displaySiblingNode)||void 0===O?void 0:O.prev):Mn),sn||Ki||!ra?(Mn.isLeaf=!0,ot.pushIndexNode(Mn),Mn.rowIndex=ot.getIndexNodes().length-1):XT({addTotalMeasureInTotal:de,addMeasureInTotalQuery:Wt,parentNode:Mn,currentField:k[ht+1],fields:k,facetCfg:tt,hierarchy:ot})}}catch(It){s={error:It}}finally{try{Ze&&!Ze.done&&(a=Oe.return)&&a.call(Oe)}finally{if(s)throw s.error}}},$T=function(o,s,a,u){var h=s.facetCfg,v=s.hierarchy,g=s.parentNode,y=h.dataSet;o.forEach(function(w,M){"string"==typeof w&&(w={key:w});var A=w.key,L=A===rc?gi("\u5e8f\u53f7"):y.getFieldName(A),O=u||g;if(VT({currentField:A,fields:[A],fieldValues:[L],facetCfg:h,hierarchy:v,parentNode:O,level:a,query:{},addMeasureInTotalQuery:!1,addTotalMeasureInTotal:!1}),w.children&&w.children.length){var D=O.children[M];D.isLeaf=!1,$T(w.children,s,a+1,D)}})},$o=function(o,s){return s>0&&o0&&o>=a-s},Zp=function(o,s,a){return a>0&&o0&&o>=s+1-a},rx=function(o,s,a,u,h,v){var g=Bc(a,function(L,O){var D=o-(fi(v)?0:v)+h.x;return D>=L&&D=L&&D2?0:s)*a.vertical]},Ms=function(o,s,a){var u,h,v=o?.getMatrix(),g=null!==(u=v?.[6])&&void 0!==u?u:0,y=null!==(h=v?.[7])&&void 0!==h?h:0;o?.translate(s-g,a-y)},nx=function(o,s){var a,u=o?.getMatrix(),h=null!==(a=u?.[6])&&void 0!==a?a:0;o?.translate(s-h,0)},l8=function(o,s,a,u){var h=s.frozenColCount,g=s.frozenTrailingColCount,y=s.frozenTrailingRowCount,w=o.colIndex,M=o.rowIndex;return Zp(M,u.start,s.frozenRowCount)?Hn.ROW:Zf(M,u.end,y)?Hn.TRAILING_ROW:$o(w,h)?Hn.COL:Du(w,g,a)?Hn.TRAILING_COL:Hn.SCROLL},ax=function(o,s,a){for(var u,h=o.frozenColCount,v=o.frozenRowCount,g=o.frozenTrailingColCount,y=o.frozenTrailingRowCount,w=((u={})[Hn.TOP]=[],u[Hn.BOTTOM]=[],u),M=0;M0)for(A=0;A0)for(A=0;A\n\n    \n        \u2193\n    \n\n',ArrowUp:'\n\n    \n        \u2191\n    \n\n\n',CellDown:'\n\n    \x3c!-- Generator: Sketch 58 (84663) - https://sketch.com --\x3e\n    down\n    Created with Sketch.\n    \n        \n    \n',CellUp:'\n\n    \x3c!-- Generator: Sketch 58 (84663) - https://sketch.com --\x3e\n    up\n    Created with Sketch.\n    \n        \n    \n ',GlobalAsc:'\n\n  \n\n\n',GlobalDesc:'\n  \n    \n  \n  \n',GroupAsc:'\n  \n    \n  \n  \n',GroupDesc:'\n  \n    \n  \n  \n',GroupNone:'\n\n    \n        \n            \n                \n                    \n                \n            \n        \n    q\n\n',Minus:'\n\t\n\t\t\n\t\n\t\n\t\n\t\n\t\n',Plus:'\n\t\n\t\t\n\t\n\t\n\t\n\t\n\t\n',SortDown:'\n  \n    \n  \n  \n\n',SortUp:'\n  \n    \n  \n  \n\n',SortDownSelected:'\n  \n    \n  \n  \n\n',SortUpSelected:'\n\n\n\n\n\n',InfoCircle:'',ExpandColIcon:'\n\n    \u7f16\u7ec4 8\u5907\u4efd 3\n    \n        \n            \n            \n                \n                \n                \n                    \n                \n                \n                    \n                \n            \n            \n        \n    \n',Trend:'',DrillDownIcon:'\n',EyeOutlined:''}),tb={},eb=function(o,s){tb[Qm(o)]=s};vn(jT).forEach(function(o){eb(o,jT[o])});var cx="data:image/svg+xml",hx={},ml=function(o){function s(a){var u=o.call(this,a)||this;return u.isOnlineLink=function(h){return/^(https?:)?(\/\/)/.test(h)},u.render(),u}return Ir(s,o),s.prototype.getImage=function(a,u,h){var v=this;return new Promise(function(g,y){var w=function(o){return tb[Qm(o)]}(a);if(w){var M=new Image;M.onload=function(){hx[u]=M,g(M)},M.onerror=y,w.includes(cx)||v.isOnlineLink(w)?M.src=w:(h&&(w=(w=w.replace(/fill=[\'\"]#?\w+[\'\"]/g,"")).replace(/fill>/g,">")),w=w.replace("(function(o){o.TOP="TOP",o.BOTTOM="BOTTOM",o.LEFT="LEFT",o.RIGHT="RIGHT"}(Un||(Un={})),Un))(),xl=(()=>(function(o){o.SUM="SUM",o.MIN="MIN",o.MAX="MAX",o.AVG="AVG"}(xl||(xl={})),xl))(),ei=(()=>(function(o){o.Row="row",o.Col="col",o.Series="series"}(ei||(ei={})),ei))(),b8=function(){function o(){this.store=new Map}return o.prototype.set=function(s,a){return this.store.set(s,a)},o.prototype.get=function(s,a){var u;return null!==(u=this.store.get(s))&&void 0!==u?u:a},o.prototype.clear=function(){this.store.clear()},o.prototype.size=function(){return this.store.size},o}(),qp=function(o,s,a){return o.sort(function(u,h){a&&(u=a(u),h=a(h));var v=s.indexOf(u),g=s.indexOf(h);return-1===v&&-1===g?0:-1===v?1:-1===g?-1:v-g})},Qf=function(o){return Cs(o,function(s){return!fo(s)&&"undefined"!==s})},fx=function(o){var s;return null===(s=vn(o))||void 0===s?void 0:s.reduce(function(a,u){var h=yr(o,u);return Array.isArray(h)?a=a.concat(fx(h)):a?.push(h),a},[])},nb=function(o){var s=[];if(Array.isArray(o))for(var u=(o.length+("undefined"in o?1:0)),h=0,v=function(){var g=h===o.length?o.undefined:o[h];h++,g&&"undefined"in g?vn(g).forEach(function(y){s.push(g[y])}):Array.isArray(g)?s.push.apply(s,Be([],Ae(g),!1)):s.push(g)};h0}))return o;var u=ue({},o);u.frozenColCount>=s&&(u.frozenColCount=s);var h=s-u.frozenColCount;u.frozenTrailingColCount>h&&(u.frozenTrailingColCount=h),u.frozenRowCount>=a&&(u.frozenRowCount=a);var v=a-u.frozenRowCount;return u.frozenTrailingRowCount>v&&(u.frozenTrailingRowCount=v),u};function xa(o,s,a){var u;return null===(u=o?.addShape)||void 0===u?void 0:u.call(o,"rect",ue({zIndex:1,attrs:s},a||{}))}function jc(o,s){var a;return null===(a=o?.addShape)||void 0===a?void 0:a.call(o,"circle",{attrs:s})}function Pu(o,s,a,u,h,v,g,y){var w;return!Ke(s)&&o&&br(s,function(M){o.contain(M)&&o.removeChild(M,!0)}),null===(w=o?.addShape)||void 0===w?void 0:w.call(o,"text",{attrs:ue(ue({x:a,y:u,text:h,originalText:y},v),g)})}function Ai(o,s,a){var u;return null===(u=o?.addShape)||void 0===u?void 0:u.call(o,"line",{zIndex:100,attrs:ue(ue({},s),a)})}function Ca(o,s,a){Ke(o)||(Mr(o)?o:[o]).forEach(function(h){Nf(h,"attrs.".concat(s),a)})}function Qp(o,s){var a=new ml(s);return o?.add(a),a}function lb(o,s,a,u,h){var v=new ml(ue(ue({name:u?"Plus":"Minus"},s),{fill:a}));return ci(h)&&v.on("click",h),o?.add(v),v}var e0,px="s2-offscreen-canvas",ub=function(o){var s;return null!==(s=o?.position)&&void 0!==s?s:"right"},Jp=function(o,s){var a,u,h,v=o.data,g=o.encode,y=o.type,w=s.getMeta(),M=w.x,A=w.y,L=w.height,O=w.width,D=s.getStyle(Ue.DATA_CELL),k=D.cell,X=D.miniChart,tt=[],ot=cn(v,function(vr){return tt.push(vr?.[g.y]),{x:vr[g.x],y:vr[g.y]}}),ft=vo(tt),ht=t1(tt),pt=ft-ht,Wt=M+k.padding.left,de=M+O-k.padding.right,pe=A+k.padding.top,Me=A+L-k.padding.bottom,ze=Me-pe,Oe=y===$s.Bar?(de-Wt-(tt.length-1)*(null===(a=X?.bar)||void 0===a?void 0:a.intervalPadding))/tt.length+(null===(u=X?.bar)||void 0===u?void 0:u.intervalPadding):null!==(h=(de-Wt)/(tt.length-1))&&void 0!==h?h:0,Ze=[];return{points:cn(ot,function(vr,gr){var mr,Xr,Je=Wt+gr*Oe;if(Xr=0!==pt?Me-(vr?.y-ht)/pt*ze:ht>0?pe:Me,y===$s.Bar){var $r=void 0,sn=void 0;ht<0&&ft>0&&0!==pt?($r=Me-(0-ht)/pt*ze,sn=Math.abs(Xr-$r),vr?.y<0&&(Xr=$r)):($r=ht<0?pe:Me,sn=0===(pt=vo([Math.abs(ft),Math.abs(ht)]))?ze:Math.abs(vr?.y-0)/pt*ze,Xr=$r);var Nr=Oe-(null===(mr=X?.bar)||void 0===mr?void 0:mr.intervalPadding);Ze.push([Nr,sn])}return[Je,Xr]}),box:Ze}},D8=function(o,s,a){var u=Number(s)-Number(o);return Number.isNaN(u)||Number(o)<0?a.bad:u<=.1?a.good:u>.1&&u<=.2?a.satisfactory:a.bad},jp=function(o,s){switch(s?.type){case $s.Line:!function(o,s){if(!Ke(o?.data)&&!Ke(s)){var h=s.getStyle(Ue.DATA_CELL).miniChart.line,v=h.point,g=h.linkLine,y=Jp(o,s).points;!function Kp(o,s){var a;null===(a=o?.addShape)||void 0===a||a.call(o,"polyline",{attrs:s})}(s,{points:y,stroke:g.fill,lineWidth:g.size,opacity:g.opacity});for(var w=0;w1?L?.widthPercent/100:L?.widthPercent)*de,Me=de-pe,ze=v+w-Wt.right-pe,Oe=g+y/2-L.height/2;xa(s,{x:ze,y:Oe,width:pe,height:L.height,fill:k,textBaseline:u.text.textBaseline});var Ze=yr(s.getMeta(),"spreadsheet.options.bullet.getRangeColor"),tr=Math.max(Math.min(pe*ot,pe),0);xa(s,{x:ze,y:Oe+(L.height-L.innerHeight)/2,width:tr,height:L.innerHeight,fill:null!==(a=Ze?.(ot,ft))&&void 0!==a?a:D8(ot,ft,D)});var vr=ze+pe*ft;Ai(s,{x1:vr,y1:g+(y-O.height)/2,x2:vr,y2:g+(y-O.height)/2+O.height},{stroke:O?.fill||O?.color,lineWidth:O.width,opacity:O?.opacity}),Pu(s,[],ze-Wt.right,g+y/2,ku({measureTextWidth:M.measureTextWidth,text:ht,maxWidth:Me-Wt.right,fontParam:u.text}),u.text)}}(s,o)}},hb=function(o,s){return{x:o.x+s?.left,y:o.y+s?.top,width:o.width-s?.left-s?.right,height:o.height-s?.top-s?.bottom}},fb=function(o){return If({size:0,position:"right",margin:{left:0,right:0}},o)},vb=function(o,s){return o-(s=fb(s)).size-s.margin.right-s.margin.left},t0=function(o,s,a){var u=o.y,h=o.height;void 0===a&&(a=0);var v=0;switch(s){case"top":v=u;break;case"middle":v=u+h/2-a/2;break;default:v=u+h-a}return v},th=function(o,s,a,u,h){void 0===a&&(a=0),void 0===h&&(h=1);var k,X,v=o.x,g=o.width,y=s.textAlign,w=s.textBaseline,M=fb(u),A=M.size,L=M.margin,O=M.position,D=h*(A+L.left)+(h?L.right:0);switch(y){case"left":k=v+("left"===O?D:0),X=v+("left"===O?L.left:a+L.left);break;case"center":var ot=v+g/2-(D-("left"===O?L.left:L.right)+a)/2;k=ot+a/2+("left"===O?D-L.left:0),X=ot+("left"===O?0:a+L.left);break;default:k=v+g-("right"===O?D:0),X=v+g-("right"===O?D-L.left:a+D-L.left)}return{text:{x:k,y:t0(o,w,0)},icon:{x:X,y:t0(o,w,A)}}},As=function(o,s,a){var D,k,X,tt,ot,u=s.x,h=s.y,v=s.width,g=s.height,y=a.horizontalBorderWidth,A=a.verticalBorderWidth;if(o===Un.TOP||o===Un.BOTTOM){var ft;k=ft=o===Un.TOP?h+A/2:h+g-A/2,tt=ft,D=u,X=u+v,ot={lineWidth:y,stroke:a.horizontalBorderColor,strokeOpacity:a.horizontalBorderColorOpacity}}if(o===Un.LEFT||o===Un.RIGHT){var ht;D=ht=o===Un.LEFT?u+y/2:u+v-y/2,X=ht,k=h,tt=h+g,ot={lineWidth:A,stroke:a.verticalBorderColor,strokeOpacity:a.verticalBorderColorOpacity}}return{position:{x1:D,x2:X,y1:k,y2:tt},style:ot}},gb=(ou(function(o,s){if(void 0===o&&(o=""),!s)return 0;var a=function(){var o=document.getElementById(px);return o||((o=document.createElement("canvas")).id=px,o.style.display="none",document.body.appendChild(o),o)}().getContext("2d"),v=s.fontFamily;return a.font=[s.fontStyle,s.fontVariant,s.fontWeight,"".concat(s.fontSize,"px"),v].join(" ").trim(),a.measureText("".concat(o)).width},function(o,s){return Be([o],Ae(Uo(s)),!1).join("")}),function(o,s,a,u){var g,v=o(Si,u);g=Mu(s)?s:yn(s);var M,A,y=a,w=[];if(o(s,u)<=a)return s;for(var L=!0;L;){if((A=o(M=g.substr(0,16),u))+v>y&&A>y){L=!1;break}if(w.push(M),y-=A,!(g=g.substr(16)))return w.join("")}for(var O=!0;O;){if((A=o(M=g.substr(0,1),u))+v>y){O=!1;break}if(w.push(M),y-=A,!(g=g.substr(1)))return w.join("")}return"".concat(w.join(""),"...")}),ku=function(o){var s=o.measureTextWidth,a=o.text,u=o.maxWidth,h=o.fontParam,v=o.priorityParam,y={},w=o.placeholder??"-",M=fi(a)||""===a?w:"".concat(a),A=v;if(h&&Mr(h)?A=h:y=h||{},!A||!A.length)return gb(s,M,u,y);var L=[],O=[M];A.forEach(function(tt){O.forEach(function(ot,ft){var ht=-1,pt=ot.match(new RegExp(tt));if(pt){var Wt=pt[0];ht=pt.index,L.push(Wt);var de=ht+Wt.length,ze=[ot.slice(0,ht),ot.slice(de)].filter(function(Oe){return!!Oe});O.splice.apply(O,Be([ft,1],Ae(ze),!1))}})}),O=L.concat(O);var D=M,k=s(Si,y),X=u;return O.forEach(function(tt){if(X<=0){var ot=D.indexOf(tt),ft=D.slice(ot-3,ot);if(ft&&ft!==Si){var ht=s(tt,y);D=D.replace(tt,ht>k?Si:tt)}else D=D.replace(tt,"");X-=k}else if(ht=s(tt,y),Xk){var pt=gb(s,tt,X,y);D=D.replace(tt,pt),X=0}else X-=ht}),D},mb=function(o,s,a,u){void 0===u&&(u="left");var h=s.right,g=a||0;return"left"===u?o+h/2+g:"right"===u?o-h/2-g:o+s.left/2+g},N8=function(o){var v=o.textStyle,g=o.textCondition,y=v.fill;return g?.mapping&&(y=g?.mapping(o.data,{rowIndex:o.rowIndex,colIndex:o.colIndex,meta:o.meta}).fill),ue(ue({},v),{fill:y})},zu=function(o,s){return ci(s)?s(o):s},xx=function(o,s){return void 0===s&&(s=1),o?.width*s};function Cb(o,s){return!(!o||!s)&&String(o).toLowerCase()===String(s).toLowerCase()}var r0=function(o,s){var a=o.getColumnNodes().find(function(u){return u.id===s});return o.isPivotMode()?a?.value:a?.field},wl=function(o,s){var a=s.getColumnNodes().find(function(h){return h.colIndex===o}),u=r0(s,a.id);return s.options.interaction.copyWithFormat?s.dataSet.getFieldFormatter(u):function(h){return h}},_b=function(o,s,a){return wl(o.colIndex,a)(function(o,s,a){var u,h;if(a.isPivotMode()){var v=Ae(function(o,s){var a=o.rowIndex,u=o.colIndex;return[s.getRowNodes().find(function(h){return h.rowIndex===a}),s.getColumnNodes().find(function(h){return h.colIndex===u})]}(o,a),2),g=v[0],y=v[1],w=function(o){var s,a,u,h;return(null===(h=null===(u=null===(a=o.options)||void 0===a?void 0:a.style)||void 0===u?void 0:u.colCfg)||void 0===h?void 0:h.hideMeasureColumn)&&o.isValueInCols()?((s={})[Jr]=o.dataCfg.fields.values[0],s):{}}(a);return null!==(u=a.dataSet.getCellData({query:ue(ue(ue({},g.query),y.query),w),rowNode:g,isTotals:g.isTotals||g.isTotalMeasure||y.isTotals||y.isTotalMeasure})?.[no])&&void 0!==u?u:""}var A=function(o,s){var a=s.getColumnNodes().find(function(u){return u.colIndex===o});return r0(s,a.id)}(o.colIndex,a);return null===(h=s[o.rowIndex])||void 0===h?void 0:h[A]}(o,s,a))},Cx=function(o){return/\n/.test(o)?'"'+o.replace(/\r\n?/g,"\n")+'"':o},Jf=function(o,s){var a=o.split(_i);return s?a.slice(a.length-s):(a.shift(),a)},Dn=(()=>(function(o){o.PLAIN="text/plain",o.HTML="text/html"}(Dn||(Dn={})),Dn))(),n0=((e0={})[Dn.PLAIN]=function(o){return{type:Dn.PLAIN,content:cn(o,function(s){return s.join("\t")}).join("\r\n")}},e0[Dn.HTML]=function(o){return{type:Dn.HTML,content:''.concat(function a(u,h){return u.map(function(v){return"<".concat(h,">").concat(function s(u,h){return u.map(function(v){return"<".concat(h,">").concat(Pm(v),"")}).join("")}(v,"td"),"")}).join("")}(o,"tr"),"
")}},e0);function Bi(o){return n0[o]}var wx=function(o,s,a){var u,h,v,g,y,w,M=null!==(h=null===(u=o[0])||void 0===u?void 0:u.length)&&void 0!==h?h:0,A=null!==(v=s?.length)&&void 0!==v?v:0,L=null!==(y=null===(g=a[0])||void 0===g?void 0:g.length)&&void 0!==y?y:0,O=null!==(w=a.length)&&void 0!==w?w:0,D=M+L,k=A+O,X=Array.from(Array(k),function(){return new Array(D)});return X=cn(X,function(tt,ot){return cn(tt,function(ft,ht){return ht>=0&&ht=0&&ot=M&&ht<=D&&ot>=0&&ot=0&&ht=A&&ot=M&&ht<=D&&ot>=A&&ot0&&a.height>0},s.prototype.getStyle=function(a){return yr(this.theme,a||this.cellType)},s.prototype.getResizeAreaStyle=function(){return this.getStyle("resizeArea")},s.prototype.shouldDrawResizeAreaByType=function(a,u){var h=this.spreadsheet.options.interaction.resize;return hl(h)?h:ci(h.visible)?h.visible(u):h[a]},s.prototype.getCellArea=function(){var a=this.meta;return{x:a.x,y:a.y,height:a.height,width:a.width}},s.prototype.getContentArea=function(){var u=(this.getStyle()||this.theme.dataCell)?.cell.padding;return hb(this.getCellArea(),u)},s.prototype.getIconPosition=function(a){return void 0===a&&(a=1),this.getTextAndIconPosition(a).icon},s.prototype.drawTextShape=function(){var a=this.getFormattedFieldValue().formattedValue,u=this.getMaxTextWidth(),h=this.getTextStyle(),v=this.spreadsheet,y=v.measureTextWidth,w=zu(this,v.options.placeholder),M=ku({measureTextWidth:y,text:a,maxWidth:u,fontParam:h,placeholder:w});this.actualText=M,this.actualTextWidth=y(M,h);var A=this.getTextPosition();this.textShape=Pu(this,[this.textShape],A.x,A.y,M,h),this.textShapes.push(this.textShape)},s.prototype.drawLinkFieldShape=function(a,u){if(a){if(!Wn(this.spreadsheet.options.style.device)){var v=this.getTextStyle(),y=this.getTextPosition().x;"center"===v.textAlign?y-=this.actualTextWidth/2:"right"===v.textAlign&&(y-=this.actualTextWidth);var w=this.textShape.getBBox().maxY;this.linkFieldShape=Ai(this,{x1:y,y1:w+1,x2:y+this.actualTextWidth,y2:w+1},{stroke:u,lineWidth:1})}this.textShape.attr({fill:u,cursor:"pointer",appendInfo:{isLinkFieldText:!0,cellData:this.meta}})}},s.prototype.updateByState=function(a,u){var h=this;this.spreadsheet.interaction.setInteractedCells(u),br(yr(this.theme,"".concat(this.cellType,".cell.interactionState.").concat(a)),function(g,y){vn(a1(TC,function(M){return pa(M,y)})).forEach(function(M){var A=h.stateShapes.has(M),L=A?h.stateShapes.get(M):h[M],O=Mr(L)?L:[L];A&&O.forEach(function(k){k.set("visible",!0)}),"interactiveBorderShape"===M&&"borderWidth"===y&&ga(g)&&br(h.getInteractiveBorderShapeStyle(g),function(k,X){Ca(O,X,k)}),Ca(O,oa[y],g)})})},s.prototype.getInteractiveBorderShapeStyle=function(a){var u=this.getCellArea(),w=this.theme.dataCell.cell,M=w.horizontalBorderWidth,A=w.verticalBorderWidth;return{x:u.x+A/2+a/2,y:u.y+M/2+a/2,width:u.width-A-a,height:u.height-M-a}},s.prototype.hideInteractionShape=function(){this.stateShapes.forEach(function(a){Ca(a,oa.backgroundOpacity,0),Ca(a,oa.backgroundColor,"transparent"),Ca(a,oa.borderOpacity,0),Ca(a,oa.borderWidth,1),Ca(a,oa.borderColor,"transparent")})},s.prototype.clearUnselectedState=function(){Ca(this.backgroundShape,oa.backgroundOpacity,1),Ca(this.textShapes,oa.textOpacity,1),Ca(this.linkFieldShape,oa.opacity,1)},s.prototype.getTextShape=function(){return this.textShape},s.prototype.getTextShapes=function(){return this.textShapes||[this.textShape]},s.prototype.addTextShape=function(a){a&&this.textShapes.push(a)},s.prototype.getConditionIconShape=function(){return this.conditionIconShape},s.prototype.getConditionIconShapes=function(){return this.conditionIconShapes||[this.conditionIconShape]},s.prototype.addConditionIconShape=function(a){a&&this.conditionIconShapes.push(a)},s.prototype.resetTextAndConditionIconShapes=function(){this.textShapes=[],this.conditionIconShapes=[]},Object.defineProperty(s.prototype,"cellConditions",{get:function(){return this.conditions},enumerable:!1,configurable:!0}),s.prototype.drawConditionIconShapes=function(){var a,u=this.findFieldCondition(null===(a=this.conditions)||void 0===a?void 0:a.icon);if(u&&u.mapping){var h=this.mappingValue(u),v=this.getIconPosition(),g=this.theme.dataCell.icon.size;Ke(h?.icon)||(this.conditionIconShape=Qp(this,ue(ue({},v),{name:h.icon,width:g,height:g,fill:h.fill})),this.addConditionIconShape(this.conditionIconShape))}},s.prototype.getTextConditionFill=function(a){var u,h,v=a.fill,g=this.findFieldCondition(null===(u=this.conditions)||void 0===u?void 0:u.text);return g?.mapping&&(v=(null===(h=this.mappingValue(g))||void 0===h?void 0:h.fill)||a.fill),v},s}(ls),mo=function(o,s){return s?s(o[Jr],o[no]):o[no]},Ba=function(o,s){var a=s.getMeta().id;return o.some(function(u){return Vi(u.id,a)})},nv=function(o,s){return"".concat(o).concat("-").concat(s)},Sx=function(o){return o.type===Ue.DATA_CELL},_l=function(o){function s(){return null!==o&&o.apply(this,arguments)||this}return Ir(s,o),Object.defineProperty(s.prototype,"cellType",{get:function(){return Ue.DATA_CELL},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"valueRangeByField",{get:function(){return this.spreadsheet.dataSet.getValueRangeByField(this.meta.valueField)},enumerable:!1,configurable:!0}),s.prototype.handleByStateName=function(a,u){Ba(a,this)&&this.updateByState(u)},s.prototype.handleSearchResult=function(a){Ba(a,this)&&(ai(a,function(h){return h?.isTarget}).id===this.getMeta().id?this.updateByState(pr.HIGHLIGHT):this.updateByState(pr.SEARCH_RESULT))},s.prototype.handleSelect=function(a){var u;switch(null===(u=a?.[0])||void 0===u?void 0:u.type){case Ue.COL_CELL:this.changeRowColSelectState("colIndex");break;case Ue.ROW_CELL:this.changeRowColSelectState("rowIndex");break;case Ue.DATA_CELL:!function(o){var s=o.interaction.getSelectedCellHighlight();return s.currentRow||s.currentCol||s.rowHeader||s.colHeader}(this.spreadsheet)?Ba(a,this)?this.updateByState(pr.SELECTED):this.spreadsheet.options.interaction.selectedCellsSpotlight&&this.updateByState(pr.UNSELECTED):function(o,s,a){var u=a.interaction.getSelectedCellHighlight(),h=u.rowHeader,v=u.colHeader,g=u.currentRow,y=u.currentCol,w=s.cellType===Ue.ROW_CELL,M=a.isTableMode()&&a.options.showSeriesNumber&&h&&w;(g||M)&&function(o,s){br(o,function(a){Sx(a)&&a.rowIndex===s.getMeta().rowIndex&&s.updateByState(pr.SELECTED)})}(o,s),y&&function(o,s){br(o,function(a){Sx(a)&&a.colIndex===s.getMeta().colIndex&&s.updateByState(pr.SELECTED)})}(o,s),(h||v)&&function(o,s){br(o,function(a){Sx(a)&&a.rowIndex===s.getMeta().rowIndex&&a.colIndex===s.getMeta().colIndex&&s.updateByState(pr.SELECTED)})}(o,s)}(a,this,this.spreadsheet)}},s.prototype.handleHover=function(a){var u=cl(a);u.type===Ue.DATA_CELL?(this.spreadsheet.options.interaction.hoverHighlight&&(this.meta.colIndex===u?.colIndex||this.meta.rowIndex===u?.rowIndex?this.updateByState(pr.HOVER):this.hideInteractionShape()),Vi(u.id,this.getMeta().id)&&this.updateByState(pr.HOVER_FOCUS)):this.hideInteractionShape()},s.prototype.update=function(){var a=this.spreadsheet.interaction.getCurrentStateName(),u=this.spreadsheet.interaction.getCells();if(a!==pr.ALL_SELECTED){if(!Ke(u)&&a)switch(a){case pr.SELECTED:this.handleSelect(u);break;case pr.HOVER_FOCUS:case pr.HOVER:this.handleHover(u);break;case pr.SEARCH_RESULT:this.handleSearchResult(u);break;default:this.handleByStateName(u,a)}}else this.updateByState(pr.SELECTED)},s.prototype.setMeta=function(a){o.prototype.setMeta.call(this,a),this.initCell()},s.prototype.initCell=function(){this.resetTextAndConditionIconShapes(),this.drawBackgroundShape(),this.drawInteractiveBgShape(),this.drawInteractiveBorderShape(),this.shouldHideRowSubtotalData()||(this.drawConditionIntervalShape(),this.drawTextShape(),this.drawConditionIconShapes()),this.meta.isFrozenCorner&&this.drawBorderShape(),this.update()},s.prototype.getDefaultTextFill=function(a){var u=a.fill,h=this.getBackgroundColor(),g=h.intelligentReverseTextColor;return Vf(h.backgroundColor)&&a.fill===Ug&&g&&(u=Cd),u},s.prototype.getTextStyle=function(){var u=this.meta.isTotals?this.theme.dataCell.bolderText:this.theme.dataCell.text,h=this.getTextConditionFill(ue(ue({},u),{fill:this.getDefaultTextFill(u)}));return ue(ue({},u),{fill:h})},s.prototype.getIconStyle=function(){var a,u=this.theme.dataCell.icon,h=u.size,v=u.margin,g=this.findFieldCondition(null===(a=this.conditions)||void 0===a?void 0:a.icon);return g&&g.mapping&&{size:h,margin:v,position:ub(g)}},s.prototype.drawConditionIntervalShape=function(){this.conditionIntervalShape=function(o){var s,a,u,h,v,g;if(!Ke(o)){var y=o.getCellArea(),w=y.x,M=y.y,A=y.height,L=y.width,O=o.findFieldCondition(null===(s=o.cellConditions)||void 0===s?void 0:s.interval);if(O&&O.mapping){var D=o.mappingValue(O);if(!D)return;var k=D.isCompare?D:o.valueRangeByField,X=Jc(k.minValue),tt=Jc(k.maxValue),ot=fi(D?.fieldValue)?Jc(o.getMeta().fieldValue):Jc(D?.fieldValue);if(ottt)return;var ft=null!==(u=null===(a=o.getStyle().miniChart.interval)||void 0===a?void 0:a.height)&&void 0!==u?u:o.getStyle().cell.miniBarChartHeight,ht=null!==(v=null===(h=o.getStyle().miniChart.interval)||void 0===h?void 0:h.fill)&&void 0!==v?v:o.getStyle().cell.miniBarChartFillColor,pt=function(o,s){void 0===o&&(o=0),void 0===s&&(s=0),o=Jc(o),s=Jc(s);var a=o>=0,u=s>=0&&o<=0,v=u?0:a?o:s,g=s-o;return function(y){var w=a?0:1;return{zeroScale:u?fu(Math.abs(0-o)/g,0,1):w,scale:fu((y-v)/g,-1,1)}}}(X,tt),Wt=pt(ot);return xa(o,{x:w+L*Wt.zeroScale,y:M+A/2-ft/2,width:L*Wt.scale,height:ft,fill:null!==(g=D.fill)&&void 0!==g?g:ht})}}}(this)},s.prototype.shouldHideRowSubtotalData=function(){var a,u=(null!==(a=this.spreadsheet.options.totals)&&void 0!==a?a:{}).row,g=this.spreadsheet.facet.layoutResult.rowLeafNodes[this.meta.rowIndex];return"tree"===this.spreadsheet.options.hierarchyType&&!(void 0===u?{}:u).showSubTotals&&!g?.isGrandTotals&&g?.isTotals},s.prototype.getFormattedFieldValue=function(){if(this.shouldHideRowSubtotalData())return{value:null,formattedValue:"-"};var a=this.meta,u=a.rowId,h=a.valueField,v=a.fieldValue,g=a.data,y=this.spreadsheet.dataSet.getFieldMeta(u);return{value:v,formattedValue:this.spreadsheet.dataSet.getFieldFormatter(y?u:h)(v,g,this.meta)}},s.prototype.getMaxTextWidth=function(){var a=this.getContentArea().width;return vb(a,this.getIconStyle())},s.prototype.getTextPosition=function(){return this.getTextAndIconPosition().text},s.prototype.getBackgroundColor=function(){var a,u=this.getStyle().cell,h=u.crossBackgroundColor,v=u.backgroundColorOpacity,g=this.getStyle().cell.backgroundColor;if(h&&this.meta.rowIndex%2==0&&(g=h),this.shouldHideRowSubtotalData())return{backgroundColor:g,backgroundColorOpacity:v};var y=this.findFieldCondition(null===(a=this.conditions)||void 0===a?void 0:a.background),w=!1;if(y&&y.mapping){var M=this.mappingValue(y);M&&(g=M.fill,w=M.intelligentReverseTextColor)}return{backgroundColor:g,backgroundColorOpacity:v,intelligentReverseTextColor:w}},s.prototype.drawBackgroundShape=function(){var a=this.getBackgroundColor(),u=a.backgroundColor,h=a.backgroundColorOpacity;this.backgroundShape=xa(this,ue(ue({},this.getCellArea()),{fill:u,fillOpacity:h}))},s.prototype.drawInteractiveBorderShape=function(){var u=this.getCellArea();this.stateShapes.set("interactiveBorderShape",xa(this,{x:u.x+1,y:u.y+1,width:u.width-2,height:u.height-2},{visible:!1}))},s.prototype.drawInteractiveBgShape=function(){this.stateShapes.set("interactiveBgShape",xa(this,ue({},this.getCellArea()),{visible:!1}))},s.prototype.changeRowColSelectState=function(a){var u=this.spreadsheet.interaction,h=yr(this.meta,a),v=u.getState(),g=v.nodes,y=void 0===g?[]:g,w=v.cells,M=void 0===w?[]:w;(this.spreadsheet.isTableMode()&&y.length?y[0].hierarchy.getLeaves().some(function(O,D){return!!y.some(function(k){return k===O})&&D===h}):Be(Be([],Ae(y),!1),Ae(M),!1).some(function(O){return yr(O,a)===h}))?this.updateByState(pr.SELECTED):this.spreadsheet.options.interaction.selectedCellsSpotlight?this.updateByState(pr.UNSELECTED):this.hideInteractionShape()},s.prototype.drawBorderShape=function(){var a=this;[Un.BOTTOM,Un.RIGHT].forEach(function(u){var h=As(u,a.getCellArea(),a.getStyle().cell);Ai(a,h.position,h.style)})},s.prototype.findFieldCondition=function(a){var u=this;return zm(a,function(h){return h.field instanceof RegExp?h.field.test(u.meta.valueField):h.field===u.meta.valueField})},s.prototype.mappingValue=function(a){var u=this.meta.fieldValue,h=this.spreadsheet.isTableMode()?this.spreadsheet.dataSet.getCellData({query:{rowIndex:this.meta.rowIndex}}):this.meta.data;return a?.mapping(u,h)},s.prototype.updateByState=function(a){if(o.prototype.updateByState.call(this,a,this),a===pr.UNSELECTED){var u=yr(this.theme,"".concat(this.cellType,".cell.interactionState.").concat(a));u&&this.toggleConditionIntervalShapeOpacity(u.opacity)}},s.prototype.clearUnselectedState=function(){o.prototype.clearUnselectedState.call(this),this.toggleConditionIntervalShapeOpacity(1)},s.prototype.toggleConditionIntervalShapeOpacity=function(a){Ca(this.conditionIntervalShape,oa.backgroundOpacity,a),Ca(this.conditionIconShapes,oa.opacity,a)},s.prototype.drawLeftBorder=function(){var a=As(Un.LEFT,this.getCellArea(),this.getStyle().cell);Ai(this,a.position,a.style)},s}(to),CD=function(o){function s(a,u,h){return o.call(this,h,a,u)||this}return Ir(s,o),s.prototype.handleRestOptions=function(){for(var a=[],u=0;u1?ot/100:ot}),k=0;k0&&y.lengths.x+s.width||o.x+o.width-vs.y+s.height||o.y+o.height-y0,rowFields:s,colFields:a});O.push(ht),Nf(g,ht,tt)}),{paths:O,indexesData:g,rowPivotMeta:A,colPivotMeta:L,sortedDimensionValues:M}}function Vb(o,s){if(o&&s){var a=s.split(_i),u=_n(a),h=o;br(a,function(v,g){var y=h.get(v);return y?(v===u?(y.children=new Map,y.childField=void 0):h=y.children,!0):0===g&&v===Na})}}var ih=function(o){return"ASC"===Yc(o)},Ix=function(o){return"DESC"===Yc(o)},$b=function(o){return!aM(Number(o))},Zb=function(o,s,a){var u=ih(s)?1:-1,h=["-",void 0];return o?.sort(function(v,g){var y=v,w=g;if(a){if(w=g[a],$b(y=v[a])&&$b(w))return(Number(y)-Number(w))*u;if(y&&h?.includes(y?.toString()))return-u;if(Number(y)&&h?.includes(w?.toString()))return u}return fi(y)||fi(w)?y?u:-u:y.toString().localeCompare(w.toString(),"zh")*u})},qb=function(o,s,a){return a?function(o,s){var a;return null===(a=o?.filter(function(u){return!s?.includes(u)}))||void 0===a?void 0:a.concat(s)}(s,dl(o)):Be([],Ae(new Set(Be(Be([],Ae(o),!1),Ae(s),!1))),!1)},Kb=function(o){var s=o.sortByValues,a=o.originValues,h=a.filter(function(y){return s.find(function(w){return TS(y,w)})}).map(function(y){var w=y.split(_i);return w.length>1?[w.slice(0,w.length-1).join(_i),w[w.length-1]]:w}),v=Array.from(new Set(h.map(function(y){return y[0]})));h.sort(function(y,w){var M=y.slice(0,y.length-1),A=w.slice(0,w.length-1);return M.join()!==A.join()?v.indexOf(M[0])-v.indexOf(A[0]):s.indexOf(y[y.length-1])-s.indexOf(w[w.length-1])});var g=h.map(function(y){return y.join(_i)});return qp(a,g)},PD=function(o){var s=o.sortParam,a=o.originValues,g=s.sortMethod,y=s.sortBy,w=a,M={originValues:a,measureValues:o.measureValues,sortParam:s,dataSet:o.dataSet};return s.sortFunc?w=function(o){var s=o.originValues,u=o.sortParam,h=o.dataSet,g=u.sortFieldId,y=u.sortMethod,w=(0,u.sortFunc)(ue({data:o.measureValues},u));return w?.length?(h.fields.rows.indexOf(g)>0||h.fields.columns.indexOf(g)>0)&&!pa(w[0],_i)?Kb({sortByValues:w,originValues:s}):qb(w,s,ih(y)):s}(M):y?w=Kb({sortByValues:y,originValues:a}):(ih(g)||Ix(g))&&(w=function(o){var D,s=o.sortParam,a=o.measureValues,u=o.originValues,v=s.sortByMeasure,g=s.query,y=s.sortFieldId,w=s.sortMethod,M=o.dataSet.fields,A=M.rows,L=M.columns,O=A.includes(y);if(v){var k=Zb(a,w,v===pC?g[Jr]:v);D=function Xb(o,s,a){var u,h=s.slice(0,s.indexOf(o)+1);return null===(u=a.map(function(v){return h.map(function(g){return v[g]}).join("".concat(_i))}))||void 0===u?void 0:u.filter(function(v){return v})}(y,O?A:Bu(L),k)}else D=cn(Zb(a,w));return qb(D,u,ih(w))}(M)),w},Qb=function(o){return o.filter(function(s){return s!==Jr})},ND=function(o){var v,s=o.dataSet,a=o.sortParam,u=o.originValues;return v=o.isSortByMeasure?function(o){var s=o.dataSet,a=o.sortParam,u=o.originValues,h=s.fields,v=a.sortByMeasure,g=a.query,y=a.sortFieldId,w=s.getMultiData(g),M=Bu(h.columns);if(v!==pC){var A=xu(h.rows,M);return w.filter(function(ft){var ht=new Set(vn(ft));return A.every(function(pt){return ht.has(pt)})})}var L=pa(h.rows,y),O=Qb(L?h.rows:M),D=Qb(L?M:h.rows),k=O[O.indexOf(y)+1],X=vn(g),tt=D.filter(function(ft){return!X.includes(ft)}),ot=w.filter(function(ft){var ht=new Set(vn(ft));return!(!ht.has(y)||ht.has(k))&&tt.every(function(Wt){return!ht.has(Wt)})});return Ke(ot)?el(cn(u,function(ft){var ht=function(o,s,a){var u,h={};if(pa(o,_i))for(var g=JM(o,_i),y=null!==(u=s?.rows)&&void 0!==u&&u.includes(a)?s.rows:Bu(s.columns),w=0;w<=qS(y,a);w++)h[y[w]]=g[w];else h[a]=o;return h}(ft,h,y);return s.getTotalValue(ue(ue({},g),ht))})):ot}(o):u,PD({sortParam:a,originValues:u,measureValues:v,dataSet:s})},Ox=function(o,s){if(o?.sortMethod){if(ih(o?.sortMethod))return"groupAsc";if(Ix(o?.sortMethod))return"groupDesc"}if(s)return"SortDown"},Rx=function(o){function s(){return null!==o&&o.apply(this,arguments)||this}return Ir(s,o),s.prototype.handleRestOptions=function(){for(var a=[],u=0;u=h)v=o.start+o.width/2,g=o.width;else if(s.start<=o.start)v=(y=s.width-(o.start-s.start))=h){var y;v=(y=s.width-(u-h))0?o.width/2:h/2;return"left"===u?v-y:v+y-a}(ot,this.actualTextWidth,X,D);return this.textPosition={x:ft,y:A.y+A.height/2},this.textPosition},s.prototype.getActionIconsWidth=function(){var a=this.getStyle().icon,u=a.size,h=a.margin,v=this.getActionIconsCount();return(u+h.left)*v+(v>0?h.right:0)},s.prototype.getColResizeAreaKey=function(){return this.meta.key},s.prototype.getColResizeArea=function(){return iv(this.spreadsheet,wC)},s.prototype.getHorizontalResizeAreaName=function(){return"".concat(Wh).concat(this.meta.key)},s.prototype.drawHorizontalResizeArea=function(){var a,u;if(0!==(null===(u=null===(a=this.spreadsheet.options.style)||void 0===a?void 0:a.colCfg)||void 0===u?void 0:u.height)&&this.shouldDrawResizeAreaByType("colCellVertical",this)){var v=this.headerConfig,g=v.cornerWidth,y=v.viewportWidth,w=this.meta,M=w.y,A=w.height,L=this.getResizeAreaStyle(),O=this.getColResizeArea(),D=this.getHorizontalResizeAreaName();if(!O.find(function(tt){return tt.attrs.name===D})){var X=g+y;O.addShape("rect",{attrs:ue(ue({},o0({theme:L,type:Ni.Vertical,id:this.getColResizeAreaKey(),effect:Hi.Field,offsetX:0,offsetY:M,width:X,height:A,meta:this.meta})),{name:D,x:0,y:M+A-L.size/2,width:X})})}}},s.prototype.shouldAddVerticalResizeArea=function(){var a=this.meta,u=a.x,h=a.y,v=a.width,g=a.height,y=this.headerConfig,w=y.scrollX,M=y.scrollY,A=y.scrollContainsRowHeader,L=y.cornerWidth,O=y.height,D=y.width,k=this.getResizeAreaStyle();return Ex({x:u+v-k.size/2,y:h,width:k.size,height:g},{x:A?-L:0,y:0,width:A?L+D:D,height:O},{scrollX:w,scrollY:M})},s.prototype.getVerticalResizeAreaOffset=function(){var a=this.meta,v=this.headerConfig,y=v.position;return{x:y.x+a.x-v.scrollX,y:y.y+a.y}},s.prototype.drawVerticalResizeArea=function(){if(this.meta.isLeaf&&this.shouldDrawResizeAreaByType("colCellHorizontal",this)){var a=this.meta,u=a.label,h=a.width,v=a.height,g=this.getResizeAreaStyle(),y=this.getColResizeArea();if(this.shouldAddVerticalResizeArea()){var w=this.getVerticalResizeAreaOffset(),M=w.x,A=w.y;y.addShape("rect",{attrs:ue(ue({},o0({theme:g,type:Ni.Horizontal,effect:Hi.Cell,id:u,offsetX:M,offsetY:A,width:h,height:v,meta:this.meta})),{x:M+h-g.size/2,y:A,height:v})})}}},s.prototype.drawResizeArea=function(){this.drawHorizontalResizeArea(),this.drawVerticalResizeArea()},s.prototype.drawHorizontalBorder=function(){var a=As(Un.TOP,this.meta,this.theme.colCell.cell);Ai(this,a.position,a.style)},s.prototype.drawVerticalBorder=function(a){var u=As(a,this.meta,this.theme.colCell.cell);Ai(this,u.position,u.style)},s.prototype.drawBorders=function(){var a=this.spreadsheet,u=a.options;0===this.meta.colIndex&&(0,a.isTableMode)()&&!u.showSeriesNumber&&this.drawVerticalBorder(Un.LEFT),this.drawHorizontalBorder(),this.drawVerticalBorder(Un.RIGHT)},s.prototype.hasHiddenColumnCell=function(){var a=this,u=this.spreadsheet.options,h=u.interaction.hiddenColumnFields,v=void 0===h?[]:h,g=u.tooltip.operation,y=this.spreadsheet.store.get("hiddenColumnsDetail",[]);return!(Ke(y)||Ke(v)||!g.hiddenColumns||!y.find(function(w){return Ax(w?.displaySiblingNode,a.meta.id)}))},s.prototype.getExpandIconTheme=function(){return this.getStyle().icon},s.prototype.addExpandColumnSplitLine=function(){var a=this.meta,u=a.x,h=a.y,v=a.width,g=a.height,y=this.theme.splitLine,w=y.horizontalBorderColor,M=y.horizontalBorderWidth,A=y.horizontalBorderColorOpacity,L=this.isLastColumn()?u+v-M:u;Ai(this,{x1:L,y1:h,x2:L,y2:h+g},{stroke:w,lineWidth:M,strokeOpacity:A})},s.prototype.addExpandColumnIconShapes=function(){this.hasHiddenColumnCell()&&(this.addExpandColumnSplitLine(),this.addExpandColumnIcon())},s.prototype.addExpandColumnIcon=function(){var a=this,u=this.getExpandColumnIconConfig();Qp(this,ue(ue({},u),{name:"ExpandColIcon",cursor:"pointer"})).on("click",function(){a.spreadsheet.emit(_e.LAYOUT_COLS_EXPANDED,a.meta)})},s.prototype.getExpandColumnIconConfig=function(){var a=this.getExpandIconTheme().size,u=this.getCellArea(),v=u.y,g=u.width,y=u.height,w=u.x-a;return{x:this.isLastColumn()?w+g:w,y:v+y/2-a/2,width:2*a,height:a}},s.prototype.isLastColumn=function(){return function(o,s){var a=o.getColumnNodes(),u=o.getInitColumnLeafNodes(),h=kb(s);return yr(_n(a),h)===s&&yr(_n(u),h)!==s}(this.spreadsheet,this.meta.id)},s.prototype.handleViewport=function(a){return a},s}(Rx),Jb=function(o){function s(){return null!==o&&o.apply(this,arguments)||this}return Ir(s,o),s.prototype.isBolderText=function(){return this.meta.cornerType===ei.Col},Object.defineProperty(s.prototype,"cellType",{get:function(){return Ue.CORNER_CELL},enumerable:!1,configurable:!0}),s.prototype.update=function(){},s.prototype.initCell=function(){o.prototype.initCell.call(this),this.resetTextAndConditionIconShapes(),this.drawBackgroundShape(),this.drawTreeIcon(),this.drawCellText(),this.drawConditionIconShapes(),this.drawActionIcons(),this.drawBorderShape(),this.drawResizeArea()},s.prototype.drawCellText=function(){this.drawTextShape()},s.prototype.drawTextShape=function(){var a=this.getContentArea().x,u=this.getCellArea(),h=u.y,v=u.height,g=this.getTextStyle(),y=this.getCornerText(),w=this.getMaxTextWidth(),M=zu(this.meta,this.spreadsheet.options.placeholder),A=this.spreadsheet.measureTextWidth,L=ku({measureTextWidth:A,text:y,maxWidth:w,fontParam:g,placeholder:M});this.actualText=L;var O=L.indexOf(Si),D=L,k="";if(-1!==O&&this.spreadsheet.isHierarchyTreeType()){var X=O+(function HT(){return/iPhone/gi.test(navigator.userAgent)&&812===window.screen.height&&375===window.screen.width}()?1:0);D=y.substr(0,X),k=y.slice(X),k=ku({measureTextWidth:A,text:k,maxWidth:w,fontParam:g})}var tt=function(o,s){return th(o,s).text}({x:a+this.getTreeIconWidth(),y:h,width:w,height:v},g).x,ot=h+(Ke(k)?v/2:v/4);this.addTextShape(Pu(this,[this.textShapes[0]],tt,ot,D,g)),Ke(k)||this.addTextShape(Pu(this,[this.textShapes[1]],tt,h+.75*v,k,g)),this.actualTextWidth=vo([A(D,g),A(k,g)])},s.prototype.drawTreeIcon=function(){var a=this;if(this.showTreeIcon()&&this.meta.cornerType!==ei.Col){var u=this.headerConfig.hierarchyCollapse,h=this.getStyle().icon.size,v=this.getTextStyle(),g=v.textBaseline,y=v.fill,w=this.getContentArea();this.treeIcon=lb(this,{x:w.x,y:t0(w,g,h),width:h,height:h},y,u,function(){a.headerConfig.spreadsheet.store.set("scrollY",0),a.headerConfig.spreadsheet.emit(_e.LAYOUT_TREE_ROWS_COLLAPSE_ALL,u)})}},s.prototype.drawBorderShape=function(){var a=this;[Un.TOP,Un.LEFT].forEach(function(u){var h=As(u,a.getCellArea(),a.getStyle().cell);Ai(a,h.position,h.style)})},s.prototype.isLastRowCornerCell=function(){var a=this.meta,h=a.field,v=this.headerConfig.rows;return a.cornerType===ei.Row&&(this.spreadsheet.isHierarchyTreeType()||_n(v)===h)},s.prototype.getResizeAreaEffect=function(){return this.meta.cornerType===ei.Series?Hi.Series:this.isLastRowCornerCell()&&this.spreadsheet.isHierarchyTreeType()?Hi.Tree:Hi.Field},s.prototype.drawResizeArea=function(){if(this.shouldDrawResizeAreaByType("cornerCellHorizontal",this)){var a=this.getResizeAreaStyle(),u=iv(this.spreadsheet,Ng),h=this.headerConfig,v=h.position,g=h.scrollX,M=h.height,A=this.meta,L=A.x,O=A.y,D=A.width,k=A.height,X=A.field;if(A.cornerType!==ei.Col&&Ex({x:L+D-a.size/2,y:O,width:a.size,height:k},{x:0,y:0,width:h.width,height:M},{scrollX:g,scrollY:h.scrollY})){var ht=v.x+L-g,pt=v.y+(this.isLastRowCornerCell()?0:O);u.addShape("rect",{attrs:ue(ue({},o0({theme:a,id:X,type:Ni.Horizontal,effect:this.getResizeAreaEffect(),offsetX:ht,offsetY:pt,width:D,height:k,meta:this.meta})),{x:ht+D-a.size/2,y:pt,height:this.isLastRowCornerCell()?M:k})})}}},s.prototype.showTreeIcon=function(){var a;return this.spreadsheet.isHierarchyTreeType()&&0===(null===(a=this.meta)||void 0===a?void 0:a.x)},s.prototype.getIconPosition=function(){var a,u,h=null===(u=null===(a=this.textShapes)||void 0===a?void 0:a[0])||void 0===u?void 0:u.cfg.attrs,v=this.getTextStyle(),g=v.textBaseline,y=v.textAlign,w=this.getStyle().icon,M=w.size,A=w.margin;return{x:h?.x+wm([[Sp("center"),Bo(this.actualTextWidth/2)],[Sp("right"),Bo(0)],[S1,Bo(this.actualTextWidth)]])(y)+A.left,y:t0(this.getContentArea(),g,M)}},s.prototype.getTreeIconWidth=function(){var a=this.getStyle().icon,u=a.size,h=a.margin;return this.showTreeIcon()?u+h.right:0},s.prototype.getTextStyle=function(){var a=this.getStyle(),u=a.text,h=a.bolderText,v=this.isBolderText()?u:h,g=this.getTextConditionFill(v);return ue(ue({},v),{fill:g})},s.prototype.getMaxTextWidth=function(){return this.getContentArea().width-this.getTreeIconWidth()-this.getActionIconsWidth()},s.prototype.getTextPosition=function(){return{x:0,y:0}},s.prototype.getFormattedFieldValue=function(){return Yb(this.meta,this.spreadsheet.dataSet.getFieldName(this.meta.label))},s.prototype.getCornerText=function(){var a;return Vi(this.meta.label,Jr)?(null===(a=this.spreadsheet.options)||void 0===a?void 0:a.cornerText)||gi("\u6307\u6807"):this.getFormattedFieldValue().formattedValue},s}(Rx),l0=function(){function o(s){this.EVENT="gesture",this.gm=s}return o.prototype.do=function(s){switch(s.type){case"touchstart":this.onTouchStart(s);break;case"touchmove":this.onTouchMove(s);break;case"touchend":this.onTouchEnd(s);break;case"touchcancel":this.onTouchCancel(s);break;default:return}},o.prototype.emit=function(s){this.gm.emit(this.EVENT,s)},o}(),sv=function(o){function s(){var a=null!==o&&o.apply(this,arguments)||this;return a.EVENT="pan",a}return Ir(s,o),s.prototype.onTouchCancel=function(a){},s.prototype.onTouchEnd=function(a){},s.prototype.onTouchMove=function(a){var u=a.x,h=a.y,v=u-this.preX,g=h-this.preY;this.preX=u,this.preY=h,this.emit({x:u,y:h,deltaX:v,deltaY:g,event:a})},s.prototype.onTouchStart=function(a){var h=a.y;this.preX=a.x,this.preY=h},s}(l0),Sl="object"==typeof performance&&performance.now?performance:Date,tA=function(o){function s(){var a=null!==o&&o.apply(this,arguments)||this;return a.EVENT="press",a}return Ir(s,o),s.prototype.onTouchCancel=function(a){this.clearTimeout()},s.prototype.onTouchEnd=function(a){this.clearTimeout()},s.prototype.onTouchMove=function(a){(a.x-this.touchStartX>10||a.y-this.touchStartY>10)&&this.clearTimeout()},s.prototype.onTouchStart=function(a){var u=this;this.clearTimeout();var h=a.x,v=a.y;this.touchStartTime=Sl.now(),this.touchStartX=h,this.touchStartY=v,this.pressTimeout=window.setTimeout(function(){u.emit({x:h,y:v,event:a})},300)},s.prototype.clearTimeout=function(){window.clearTimeout(this.pressTimeout)},s}(l0),u0=function(o){function s(){var a=null!==o&&o.apply(this,arguments)||this;return a.EVENT="swipe",a.latestMoveTime=0,a.ms=0,a.speedX=0,a.speedY=0,a.preX=0,a.preY=0,a}return Ir(s,o),s.prototype.onTouchCancel=function(a){},s.prototype.onTouchEnd=function(a){var u=this.speedX,h=this.speedY;Sl.now()-this.latestMoveTime<100&&this.emit({x:a.x,y:a.y,speedX:u,speedY:h,event:a})},s.prototype.onTouchMove=function(a){var u=a.x,h=a.y,v=Sl.now(),y=h-this.preY,w=v-this.ms;this.speedX=(u-this.preX)/w,this.speedY=y/w,this.latestMoveTime=v},s.prototype.onTouchStart=function(a){var u=a.x,h=a.y;this.speedX=this.speedY=0,this.preX=u,this.preY=h,this.ms=Sl.now()},s}(l0),YD=function(o){function s(){var a=null!==o&&o.apply(this,arguments)||this;return a.EVENT="tap",a}return Ir(s,o),s.prototype.onTouchCancel=function(a){},s.prototype.onTouchEnd=function(a){var u=a.x,h=a.y;u-this.touchStartX<2&&h-this.touchStartY<2&&Sl.now()-this.touchStartTime<300&&this.emit({x:u,y:h,event:a})},s.prototype.onTouchMove=function(a){},s.prototype.onTouchStart=function(a){var u=a.x,h=a.y;this.touchStartTime=Sl.now(),this.touchStartX=u,this.touchStartY=h},s}(l0),WD={Pan:sv,Press:tA,Swipe:u0,Tap:YD},Fx=function(o){function s(a,u){void 0===u&&(u={});var h=o.call(this)||this;return h.onTouchStart=function(v){h.preventEvent(v),h.element.on("touchmove",h.onTouchMove),h.element.on("touchend",h.onTouchEnd),h.element.on("touchcancel",h.onTouchCancel),h.emit("touchdown",v),h.doGestures(v)},h.onTouchMove=function(v){h.preventEvent(v),h.emit("touchmove",v),h.doGestures(v)},h.onTouchEnd=function(v){h.preventEvent(v),h.emit("touchend",v),h.element.off("touchmove",h.onTouchMove),h.element.off("touchend",h.onTouchEnd),h.element.off("touchcancel",h.onTouchCancel),h.doGestures(v)},h.onTouchCancel=function(v){h.preventEvent(v),h.emit("touchcancel",v),h.element.off("touchmove",h.onTouchMove),h.element.off("touchend",h.onTouchEnd),h.element.off("touchcancel",h.onTouchCancel),h.doGestures(v)},h.element=a,h.options=u,h.initialGestures(),h.bindTouchStart(),h}return Ir(s,o),s.prototype.destroy=function(){this.element.off("touchstart",this.onTouchStart),this.off()},s.prototype.initialGestures=function(){var a=this;this.gestures=(this.options.gestures||["Pan","Press","Swipe","Tap"]).map(function(h){var v=function(o){return WD[o]}(h);return new v(a)})},s.prototype.bindTouchStart=function(){this.element.on("touchstart",this.onTouchStart)},s.prototype.preventEvent=function(a){(this.options.prevents||[]).includes(a.type)&&a.preventDefault()},s.prototype.doGestures=function(a){this.gestures.forEach(function(u){u.do(a)})},s}(lr),rA=tg,iA="swipe",h0="pan",Dx="wheel",UD=function(o){function s(a){var u=o.call(this)||this;return u.rafMs=0,u.onPan=function(h){u.raf&&cancelAnimationFrame(u.raf);var y=u.getWrapperEvent(h,h.deltaX,h.deltaY);u.emit(Dx,y)},u.onSwipe=function(h){var v=h.speedX,g=h.speedY;u.rafMs=Sl.now(),u.ms=u.rafMs,(0!==v||0!==g)&&u.rafInertia(h)},u.element=a,u.gm=new Fx(a,{gestures:["Pan","Swipe"]}),u.gm.on(iA,u.onSwipe),u.gm.on(h0,u.onPan),u}return Ir(s,o),s.prototype.destroy=function(){window.cancelAnimationFrame(this.raf),this.gm.destroy(),this.off()},s.prototype.rafInertia=function(a){var u=this,h=a.speedX,v=a.speedY;this.raf=window.requestAnimationFrame(function(){var g=Sl.now(),y=(g-u.ms)/800;if(y<1){y=rA(1-y);var w=g-u.rafMs,L=u.getWrapperEvent(a,h*y*w,v*y*w);u.emit(Dx,L),u.rafMs=g,u.rafInertia(a)}})},s.prototype.getWrapperEvent=function(a,u,h){return ue(ue({},a),{deltaX:-u,deltaY:-h})},s}(lr),uv=function(o,s,a,u,h){var w=a+u;return o+h>=w?o:wo+(s-h)/2?o+s-a>h?a:o+s-h:o+(s-h)/2},qo=function(o){function s(){return null!==o&&o.apply(this,arguments)||this}return Ir(s,o),Object.defineProperty(s.prototype,"cellType",{get:function(){return Ue.ROW_CELL},enumerable:!1,configurable:!0}),s.prototype.destroy=function(){var a;o.prototype.destroy.call(this),null===(a=this.gm)||void 0===a||a.destroy()},s.prototype.initCell=function(){o.prototype.initCell.call(this),this.drawBackgroundShape(),this.drawInteractiveBgShape(),this.drawInteractiveBorderShape(),this.drawTextShape(),this.drawConditionIconShapes(),this.drawTreeIcon(),this.drawTreeLeafNodeAlignDot(),this.drawRectBorder(),this.drawResizeAreaInLeaf(),this.drawActionIcons(),this.update()},s.prototype.drawInteractiveBorderShape=function(){this.stateShapes.set("interactiveBorderShape",xa(this,this.getInteractiveBorderShapeStyle(2),{visible:!1}))},s.prototype.drawInteractiveBgShape=function(){this.stateShapes.set("interactiveBgShape",xa(this,ue({},this.getCellArea()),{visible:!1}))},s.prototype.showTreeIcon=function(){return this.spreadsheet.isHierarchyTreeType()&&!this.meta.isLeaf},s.prototype.showTreeLeafNodeAlignDot=function(){var a;return(null===(a=this.spreadsheet.options.style)||void 0===a?void 0:a.showTreeLeafNodeAlignDot)&&this.spreadsheet.isHierarchyTreeType()},s.prototype.getParentTreeIconCfg=function(){if(this.showTreeLeafNodeAlignDot()&&this.spreadsheet.isHierarchyTreeType()&&this.meta.isLeaf)return yr(this.meta,"parent.belongsCell.treeIcon.cfg")},s.prototype.drawTreeIcon=function(){var a=this;if(this.showTreeIcon()){var u=this.meta,h=u.isCollapsed,v=u.id,g=u.hierarchy,y=this.getContentArea().x,w=this.getTextStyle().fill,M=this.getStyle().icon.size,L=y+this.getContentIndent(),O=this.getIconYPosition();this.treeIcon=lb(this,{x:L,y:O,width:M,height:M},w,h,function(){if(!Wn()){if(!h){var D=a.spreadsheet.store.get("scrollY"),k=a.spreadsheet.facet.panelBBox.viewportHeight||0,X=function(o){var s=0;return o.children?.forEach(function(u){s+=u.height||0}),s}(a.meta),tt=g.height-X;if(D>0&&D+k>tt){var ot=tt-k;a.spreadsheet.store.set("scrollY",ot>0?ot:0)}}a.spreadsheet.emit(_e.ROW_CELL_COLLAPSE_TREE_ROWS,{id:v,isCollapsed:!h,node:a.meta})}}),Wn()&&(this.gm=new Fx(this,{gestures:["Tap"]}),this.gm.on("tap",function(){a.spreadsheet.emit(_e.ROW_CELL_COLLAPSE_TREE_ROWS,{id:v,isCollapsed:!h,node:a.meta})}))}},s.prototype.drawTreeLeafNodeAlignDot=function(){var a=this.getParentTreeIconCfg();if(a){var u=this.getStyle().icon,h=u.size,g=a.x+h+u.margin.right,y=this.getTextPosition().y,w=this.getTextStyle(),L=h/5;this.treeLeafNodeAlignDot=jc(this,{x:g+h/2,y:y+(w.fontSize-L)/2,r:L,fill:w.fill,fillOpacity:.3})}},s.prototype.isBolderText=function(){var a=this.meta;return!a.isLeaf&&0===a.level||a.isTotals},s.prototype.drawTextShape=function(){o.prototype.drawTextShape.call(this),this.drawLinkFieldShape()},s.prototype.drawLinkFieldShape=function(){var a=this.headerConfig.linkFields,u=void 0===a?[]:a,h=this.getTextStyle().linkTextFill,v=pD(u,this.meta);o.prototype.drawLinkFieldShape.call(this,v,h)},s.prototype.drawRectBorder=function(){var a=this,u=this.getCellArea().x,h=this.getContentIndent(),v=this.spreadsheet.isHierarchyTreeType()?u:u+h;[Un.BOTTOM,Un.LEFT].forEach(function(g){var y=As(g,ue(ue({},a.getCellArea()),{x:v}),a.getStyle().cell);Ai(a,y.position,y.style)})},s.prototype.drawResizeAreaInLeaf=function(){if(this.meta.isLeaf&&this.shouldDrawResizeAreaByType("rowCellVertical",this)){var a=this.getCellArea(),u=a.x,h=a.y,v=a.width,g=a.height,y=this.getResizeAreaStyle(),w=iv(this.spreadsheet,nc),M=this.headerConfig,A=M.position,L=M.seriesNumberWidth,O=M.width,k=M.scrollX,X=M.scrollY;if(Ex({x:u,y:h+g-y.size/2,width:v,height:y.size},{x:0,y:0,width:O,height:M.viewportHeight},{scrollX:k,scrollY:X})){var ft=A?.x+u-k+L,ht=A?.y+h-X,pt=this.spreadsheet.isFrozenRowHeader()?O-L-(u-k):v;w.addShape("rect",{attrs:ue(ue({},o0({id:this.meta.id,theme:y,type:Ni.Vertical,effect:Hi.Cell,offsetX:ft,offsetY:ht,width:v,height:g,meta:this.meta})),{x:ft,y:ht+g-y.size/2,width:pt})})}}},s.prototype.getContentIndent=function(){if(!this.spreadsheet.isHierarchyTreeType())return 0;for(var a=this.getStyle(),u=a.icon,h=a.cell,v=u.size+u.margin.right,g=this.meta.parent,y=0;g;)0!==g.height&&(y+=v),g=g.parent;return this.showTreeLeafNodeAlignDot()&&(y+=this.isTreeLevel()?0:h.padding.right+u.margin.right),y},s.prototype.getTextIndent=function(){var a=this.getStyle().icon,u=a.size,h=a.margin;return this.getContentIndent()+(this.showTreeIcon()||this.isTreeLevel()&&this.showTreeLeafNodeAlignDot()?u+h.right:0)},s.prototype.isTreeLevel=function(){return ai(yr(this.meta,"parent.children"),function(a){return!a.isLeaf})},s.prototype.getIconPosition=function(){var a=this.textShape.cfg.attrs,u=a.x,h=a.y,v=a.textAlign,g=this.getStyle().icon.margin.left;return"left"===v?{x:u+this.actualTextWidth+g,y:h}:"right"===v?{x:u+g,y:h}:{x:u+this.actualTextWidth/2+g,y:h}},s.prototype.getMaxTextWidth=function(){return this.getContentArea().width-this.getTextIndent()-this.getActionIconsWidth()},s.prototype.getTextArea=function(){var a=this.getContentArea(),u=this.getTextIndent();return ue(ue({},a),{x:a.x+u,width:a.width-u})},s.prototype.getTextPosition=function(){var a=this.getTextArea(),u=this.headerConfig,h=u.scrollY,v=u.viewportHeight,g=this.getTextStyle().fontSize,y=uv(a.y,a.height,h,v,g);return{x:th(a,this.getTextStyle(),0,this.getIconStyle(),this.getActionIconsCount()).text.x,y}},s.prototype.getIconYPosition=function(){var a=this.getTextPosition().y,u=this.getStyle().icon.size;return a+(this.getTextStyle().fontSize-u)/2},s}(Rx),aA=function(o,s,a){var u,h,v=(null===(u=a.icon.margin)||void 0===u?void 0:u.left)||0,g=(null===(h=a.icon.margin)||void 0===h?void 0:h.right)||0,y=o.store.get("hiddenColumnsDetail",[]),w=!1,M=!1;y.forEach(function(L){var O,D,k,X;(null===(D=null===(O=L?.displaySiblingNode)||void 0===O?void 0:O.prev)||void 0===D?void 0:D.field)===s&&(w=!0),(null===(X=null===(k=L?.displaySiblingNode)||void 0===k?void 0:k.next)||void 0===X?void 0:X.field)===s&&(M=!0)});var A=yr(a,"icon.size");return{left:M?A+g:0,right:w?A+v:0}},Bx=function(o){function s(){return null!==o&&o.apply(this,arguments)||this}return Ir(s,o),s.prototype.handleRestOptions=function(){for(var a=[],u=0;u0){for(v+=g,s=1;sa)throw Error(Os+o)}function fv(o,s,a,u){var h,v,g,y;for(v=o[0];v>=10;v/=10)--s;return--s<0?(s+=Dr,h=0):(h=Math.ceil((s+1)/Dr),s%=Dr),v=yi(10,Dr-s),y=o[h]%v|0,null==u?s<3?(0==s?y=y/100|0:1==s&&(y=y/10|0),g=a<4&&99999==y||a>3&&49999==y||5e4==y||0==y):g=(a<4&&y+1==v||a>3&&y+1==v/2)&&(o[h+1]/v/100|0)==yi(10,s-2)-1||(y==v/2||0==y)&&0==(o[h+1]/v/100|0):s<4?(0==s?y=y/1e3|0:1==s?y=y/100|0:2==s&&(y=y/10|0),g=(u||a<4)&&9999==y||!u&&a>3&&4999==y):g=((u||a<4)&&y+1==v||!u&&a>3&&y+1==v/2)&&(o[h+1]/v/1e3|0)==yi(10,s-3)-1,g}function Ko(o,s,a){for(var u,v,h=[0],g=0,y=o.length;ga-1&&(void 0===h[u+1]&&(h[u+1]=0),h[u+1]+=h[u]/a|0,h[u]%=a)}return h.reverse()}De.absoluteValue=De.abs=function(){var o=new this.constructor(this);return o.s<0&&(o.s=1),wr(o)},De.ceil=function(){return wr(new this.constructor(this),this.e+1,2)},De.clampedTo=De.clamp=function(o,s){var u=this,h=u.constructor;if(o=new h(o),s=new h(s),!o.s||!s.s)return new h(NaN);if(o.gt(s))throw Error(Os+s);return u.cmp(o)<0?o:u.cmp(s)>0?s:new h(u)},De.comparedTo=De.cmp=function(o){var s,a,u,h,v=this,g=v.d,y=(o=new v.constructor(o)).d,w=v.s,M=o.s;if(!g||!y)return w&&M?w!==M?w:g===y?0:!g^w<0?1:-1:NaN;if(!g[0]||!y[0])return g[0]?w:y[0]?-M:0;if(w!==M)return w;if(v.e!==o.e)return v.e>o.e^w<0?1:-1;for(s=0,a=(u=g.length)<(h=y.length)?u:h;sy[s]^w<0?1:-1;return u===h?0:u>h^w<0?1:-1},De.cosine=De.cos=function(){var o,s,a=this,u=a.constructor;return a.d?a.d[0]?(s=u.rounding,u.precision=(o=u.precision)+Math.max(a.e,a.sd())+Dr,u.rounding=1,a=function Ml(o,s){var a,u,h;if(s.isZero())return s;(u=s.d.length)<32?h=(1/y0(4,a=Math.ceil(u/3))).toString():(a=16,h="2.3283064365386962890625e-10"),o.precision+=a,s=lh(o,1,s.times(h),new o(1));for(var v=a;v--;){var g=s.times(s);s=g.times(g).minus(g).times(8).plus(1)}return o.precision-=a,s}(u,mA(u,a)),u.precision=o,u.rounding=s,wr(2==Co||3==Co?a.neg():a,o,s,!0)):new u(1):new u(NaN)},De.cubeRoot=De.cbrt=function(){var o,s,a,u,h,v,g,y,w,M,A=this,L=A.constructor;if(!A.isFinite()||A.isZero())return new L(A);for(Ur=!1,(v=A.s*yi(A.s*A,1/3))&&Math.abs(v)!=1/0?u=new L(v.toString()):(a=Ei(A.d),(v=((o=A.e)-a.length+1)%3)&&(a+=1==v||-2==v?"0":"00"),v=yi(a,1/3),o=$i((o+1)/3)-(o%3==(o<0?-1:2)),(u=new L(a=v==1/0?"5e"+o:(a=v.toExponential()).slice(0,a.indexOf("e")+1)+o)).s=A.s),g=(o=L.precision)+3;;)if(M=(w=(y=u).times(y).times(y)).plus(A),u=bn(M.plus(A).times(y),M.plus(w),g+2,1),Ei(y.d).slice(0,g)===(a=Ei(u.d)).slice(0,g)){if("9999"!=(a=a.slice(g-3,g+1))&&(h||"4999"!=a)){(!+a||!+a.slice(1)&&"5"==a.charAt(0))&&(wr(u,o+1,1),s=!u.times(u).times(u).eq(A));break}if(!h&&(wr(y,o+1,0),y.times(y).times(y).eq(A))){u=y;break}g+=4,h=1}return Ur=!0,wr(u,o,L.rounding,s)},De.decimalPlaces=De.dp=function(){var o,s=this.d,a=NaN;if(s){if(a=((o=s.length-1)-$i(this.e/Dr))*Dr,o=s[o])for(;o%10==0;o/=10)a--;a<0&&(a=0)}return a},De.dividedBy=De.div=function(o){return bn(this,new this.constructor(o))},De.dividedToIntegerBy=De.divToInt=function(o){var a=this.constructor;return wr(bn(this,new a(o),0,1,1),a.precision,a.rounding)},De.equals=De.eq=function(o){return 0===this.cmp(o)},De.floor=function(){return wr(new this.constructor(this),this.e+1,3)},De.greaterThan=De.gt=function(o){return this.cmp(o)>0},De.greaterThanOrEqualTo=De.gte=function(o){var s=this.cmp(o);return 1==s||0===s},De.hyperbolicCosine=De.cosh=function(){var o,s,a,u,h,v=this,g=v.constructor,y=new g(1);if(!v.isFinite())return new g(v.s?1/0:NaN);if(v.isZero())return y;u=g.rounding,g.precision=(a=g.precision)+Math.max(v.e,v.sd())+4,g.rounding=1,(h=v.d.length)<32?s=(1/y0(4,o=Math.ceil(h/3))).toString():(o=16,s="2.3283064365386962890625e-10"),v=lh(g,1,v.times(s),new g(1),!0);for(var w,M=o,A=new g(8);M--;)w=v.times(v),v=y.minus(w.times(A.minus(w.times(A))));return wr(v,g.precision=a,g.rounding=u,!0)},De.hyperbolicSine=De.sinh=function(){var o,s,a,u,h=this,v=h.constructor;if(!h.isFinite()||h.isZero())return new v(h);if(a=v.rounding,v.precision=(s=v.precision)+Math.max(h.e,h.sd())+4,v.rounding=1,(u=h.d.length)<3)h=lh(v,2,h,h,!0);else{o=1.4*Math.sqrt(u),h=lh(v,2,h=h.times(1/y0(5,o=o>16?16:0|o)),h,!0);for(var g,y=new v(5),w=new v(16),M=new v(20);o--;)g=h.times(h),h=h.times(y.plus(g.times(w.times(g).plus(M))))}return v.precision=s,v.rounding=a,wr(h,s,a,!0)},De.hyperbolicTangent=De.tanh=function(){var o,s,a=this,u=a.constructor;return a.isFinite()?a.isZero()?new u(a):(s=u.rounding,u.precision=(o=u.precision)+7,u.rounding=1,bn(a.sinh(),a.cosh(),u.precision=o,u.rounding=s)):new u(a.s)},De.inverseCosine=De.acos=function(){var o,s=this,a=s.constructor,u=s.abs().cmp(1),h=a.precision,v=a.rounding;return-1!==u?0===u?s.isNeg()?So(a,h,v):new a(0):new a(NaN):s.isZero()?So(a,h+4,v).times(.5):(a.precision=h+6,a.rounding=1,s=s.asin(),o=So(a,h+4,v).times(.5),a.precision=h,a.rounding=v,o.minus(s))},De.inverseHyperbolicCosine=De.acosh=function(){var o,s,a=this,u=a.constructor;return a.lte(1)?new u(a.eq(1)?0:NaN):a.isFinite()?(s=u.rounding,u.precision=(o=u.precision)+Math.max(Math.abs(a.e),a.sd())+4,u.rounding=1,Ur=!1,a=a.times(a).minus(1).sqrt().plus(a),Ur=!0,u.precision=o,u.rounding=s,a.ln()):new u(a)},De.inverseHyperbolicSine=De.asinh=function(){var o,s,a=this,u=a.constructor;return!a.isFinite()||a.isZero()?new u(a):(s=u.rounding,u.precision=(o=u.precision)+2*Math.max(Math.abs(a.e),a.sd())+6,u.rounding=1,Ur=!1,a=a.times(a).plus(1).sqrt().plus(a),Ur=!0,u.precision=o,u.rounding=s,a.ln())},De.inverseHyperbolicTangent=De.atanh=function(){var o,s,a,u,h=this,v=h.constructor;return h.isFinite()?h.e>=0?new v(h.abs().eq(1)?h.s/0:h.isZero()?h:NaN):(o=v.precision,s=v.rounding,u=h.sd(),Math.max(u,o)<2*-h.e-1?wr(new v(h),o,s,!0):(v.precision=a=u-h.e,h=bn(h.plus(1),new v(1).minus(h),a+o,1),v.precision=o+4,v.rounding=1,h=h.ln(),v.precision=o,v.rounding=s,h.times(.5))):new v(NaN)},De.inverseSine=De.asin=function(){var o,s,a,u,h=this,v=h.constructor;return h.isZero()?new v(h):(s=h.abs().cmp(1),a=v.precision,u=v.rounding,-1!==s?0===s?((o=So(v,a+4,u).times(.5)).s=h.s,o):new v(NaN):(v.precision=a+6,v.rounding=1,h=h.div(new v(1).minus(h.times(h)).sqrt().plus(1)).atan(),v.precision=a,v.rounding=u,h.times(2)))},De.inverseTangent=De.atan=function(){var o,s,a,u,h,v,g,y,w,M=this,A=M.constructor,L=A.precision,O=A.rounding;if(M.isFinite()){if(M.isZero())return new A(M);if(M.abs().eq(1)&&L+4<=ea)return(g=So(A,L+4,O).times(.25)).s=M.s,g}else{if(!M.s)return new A(NaN);if(L+4<=ea)return(g=So(A,L+4,O).times(.5)).s=M.s,g}for(A.precision=y=L+10,A.rounding=1,o=a=Math.min(28,y/Dr+2|0);o;--o)M=M.div(M.times(M).plus(1).sqrt().plus(1));for(Ur=!1,s=Math.ceil(y/Dr),u=1,w=M.times(M),g=new A(M),h=M;-1!==o;)if(h=h.times(w),v=g.minus(h.div(u+=2)),h=h.times(w),void 0!==(g=v.plus(h.div(u+=2))).d[s])for(o=s;g.d[o]===v.d[o]&&o--;);return a&&(g=g.times(2<this.d.length-2},De.isNaN=function(){return!this.s},De.isNegative=De.isNeg=function(){return this.s<0},De.isPositive=De.isPos=function(){return this.s>0},De.isZero=function(){return!!this.d&&0===this.d[0]},De.lessThan=De.lt=function(o){return this.cmp(o)<0},De.lessThanOrEqualTo=De.lte=function(o){return this.cmp(o)<1},De.logarithm=De.log=function(o){var s,a,u,h,v,g,y,w,M=this,A=M.constructor,L=A.precision,O=A.rounding;if(null==o)o=new A(10),s=!0;else{if(a=(o=new A(o)).d,o.s<0||!a||!a[0]||o.eq(1))return new A(NaN);s=o.eq(10)}if(a=M.d,M.s<0||!a||!a[0]||M.eq(1))return new A(a&&!a[0]?-1/0:1!=M.s?NaN:a?0:1/0);if(s)if(a.length>1)v=!0;else{for(h=a[0];h%10==0;)h/=10;v=1!==h}if(Ur=!1,g=Tl(M,y=L+5),u=s?dv(A,y+10):Tl(o,y),fv((w=bn(g,u,y,1)).d,h=L,O))do{if(g=Tl(M,y+=10),u=s?dv(A,y+10):Tl(o,y),w=bn(g,u,y,1),!v){+Ei(w.d).slice(h+1,h+15)+1==1e14&&(w=wr(w,L+1,0));break}}while(fv(w.d,h+=10,O));return Ur=!0,wr(w,L,O)},De.minus=De.sub=function(o){var s,a,u,h,v,g,y,w,M,A,L,O,D=this,k=D.constructor;if(o=new k(o),!D.d||!o.d)return D.s&&o.s?D.d?o.s=-o.s:o=new k(o.d||D.s!==o.s?D:NaN):o=new k(NaN),o;if(D.s!=o.s)return o.s=-o.s,D.plus(o);if(O=o.d,y=k.precision,w=k.rounding,!(M=D.d)[0]||!O[0]){if(O[0])o.s=-o.s;else{if(!M[0])return new k(3===w?-0:0);o=new k(D)}return Ur?wr(o,y,w):o}if(a=$i(o.e/Dr),A=$i(D.e/Dr),M=M.slice(),v=A-a){for((L=v<0)?(s=M,v=-v,g=O.length):(s=O,a=A,g=M.length),v>(u=Math.max(Math.ceil(y/Dr),g)+2)&&(v=u,s.length=1),s.reverse(),u=v;u--;)s.push(0);s.reverse()}else{for((L=(u=M.length)<(g=O.length))&&(g=u),u=0;u0;--u)M[g++]=0;for(u=O.length;u>v;){if(M[--u](g=(v=Math.ceil(y/Dr))>g?v+1:g+1)&&(h=g,a.length=1),a.reverse();h--;)a.push(0);a.reverse()}for((g=M.length)-(h=A.length)<0&&(h=g,a=A,A=M,M=a),s=0;h;)s=(M[--h]=M[h]+A[h]+s)/wo|0,M[h]%=wo;for(s&&(M.unshift(s),++u),g=M.length;0==M[--g];)M.pop();return o.d=M,o.e=vv(M,u),Ur?wr(o,y,w):o},De.precision=De.sd=function(o){var s,a=this;if(void 0!==o&&o!==!!o&&1!==o&&0!==o)throw Error(Os+o);return a.d?(s=Gx(a.d),o&&a.e+1>s&&(s=a.e+1)):s=NaN,s},De.round=function(){var o=this,s=o.constructor;return wr(new s(o),o.e+1,s.rounding)},De.sine=De.sin=function(){var o,s,a=this,u=a.constructor;return a.isFinite()?a.isZero()?new u(a):(s=u.rounding,u.precision=(o=u.precision)+Math.max(a.e,a.sd())+Dr,u.rounding=1,a=function iB(o,s){var a,u=s.d.length;if(u<3)return s.isZero()?s:lh(o,2,s,s);a=1.4*Math.sqrt(u),s=lh(o,2,s=s.times(1/y0(5,a=a>16?16:0|a)),s);for(var h,v=new o(5),g=new o(16),y=new o(20);a--;)h=s.times(s),s=s.times(v.plus(h.times(g.times(h).minus(y))));return s}(u,mA(u,a)),u.precision=o,u.rounding=s,wr(Co>2?a.neg():a,o,s,!0)):new u(NaN)},De.squareRoot=De.sqrt=function(){var o,s,a,u,h,v,g=this,y=g.d,w=g.e,M=g.s,A=g.constructor;if(1!==M||!y||!y[0])return new A(!M||M<0&&(!y||y[0])?NaN:y?g:1/0);for(Ur=!1,0==(M=Math.sqrt(+g))||M==1/0?(((s=Ei(y)).length+w)%2==0&&(s+="0"),M=Math.sqrt(s),w=$i((w+1)/2)-(w<0||w%2),u=new A(s=M==1/0?"5e"+w:(s=M.toExponential()).slice(0,s.indexOf("e")+1)+w)):u=new A(M.toString()),a=(w=A.precision)+3;;)if(u=(v=u).plus(bn(g,v,a+2,1)).times(.5),Ei(v.d).slice(0,a)===(s=Ei(u.d)).slice(0,a)){if("9999"!=(s=s.slice(a-3,a+1))&&(h||"4999"!=s)){(!+s||!+s.slice(1)&&"5"==s.charAt(0))&&(wr(u,w+1,1),o=!u.times(u).eq(g));break}if(!h&&(wr(v,w+1,0),v.times(v).eq(g))){u=v;break}a+=4,h=1}return Ur=!0,wr(u,w,A.rounding,o)},De.tangent=De.tan=function(){var o,s,a=this,u=a.constructor;return a.isFinite()?a.isZero()?new u(a):(s=u.rounding,u.precision=(o=u.precision)+10,u.rounding=1,(a=a.sin()).s=1,a=bn(a,new u(1).minus(a.times(a)).sqrt(),o+10,0),u.precision=o,u.rounding=s,wr(2==Co||4==Co?a.neg():a,o,s,!0)):new u(NaN)},De.times=De.mul=function(o){var s,a,u,h,v,g,y,w,M,A=this,L=A.constructor,O=A.d,D=(o=new L(o)).d;if(o.s*=A.s,!(O&&O[0]&&D&&D[0]))return new L(!o.s||O&&!O[0]&&!D||D&&!D[0]&&!O?NaN:O&&D?0*o.s:o.s/0);for(a=$i(A.e/Dr)+$i(o.e/Dr),(w=O.length)<(M=D.length)&&(v=O,O=D,D=v,g=w,w=M,M=g),v=[],u=g=w+M;u--;)v.push(0);for(u=M;--u>=0;){for(s=0,h=w+u;h>u;)y=v[h]+D[u]*O[h-u-1]+s,v[h--]=y%wo|0,s=y/wo|0;v[h]=(v[h]+s)%wo|0}for(;!v[--g];)v.pop();return s?++a:v.shift(),o.d=v,o.e=vv(v,a),Ur?wr(o,L.precision,L.rounding):o},De.toBinary=function(o,s){return Ux(this,2,o,s)},De.toDecimalPlaces=De.toDP=function(o,s){var a=this,u=a.constructor;return a=new u(a),void 0===o?a:(wa(o,0,Pa),void 0===s?s=u.rounding:wa(s,0,8),wr(a,o+a.e+1,s))},De.toExponential=function(o,s){var a,u=this,h=u.constructor;return void 0===o?a=_o(u,!0):(wa(o,0,Pa),void 0===s?s=h.rounding:wa(s,0,8),a=_o(u=wr(new h(u),o+1,s),!0,o+1)),u.isNeg()&&!u.isZero()?"-"+a:a},De.toFixed=function(o,s){var a,u,h=this,v=h.constructor;return void 0===o?a=_o(h):(wa(o,0,Pa),void 0===s?s=v.rounding:wa(s,0,8),a=_o(u=wr(new v(h),o+h.e+1,s),!1,o+u.e+1)),h.isNeg()&&!h.isZero()?"-"+a:a},De.toFraction=function(o){var s,a,u,h,v,g,y,w,M,A,L,O,D=this,k=D.d,X=D.constructor;if(!k)return new X(D);if(M=a=new X(1),u=w=new X(0),v=(s=new X(u)).e=Gx(k)-D.e-1,s.d[0]=yi(10,(g=v%Dr)<0?Dr+g:g),null==o)o=v>0?s:M;else{if(!(y=new X(o)).isInt()||y.lt(M))throw Error(Os+y);o=y.gt(s)?v>0?s:M:y}for(Ur=!1,y=new X(Ei(k)),A=X.precision,X.precision=v=k.length*Dr*2;L=bn(y,s,0,1,1),1!=(h=a.plus(L.times(u))).cmp(o);)a=u,u=h,M=w.plus(L.times(h=M)),w=h,s=y.minus(L.times(h=s)),y=h;return h=bn(o.minus(a),u,0,1,1),w=w.plus(h.times(M)),a=a.plus(h.times(u)),w.s=M.s=D.s,O=bn(M,u,v,1).minus(D).abs().cmp(bn(w,a,v,1).minus(D).abs())<1?[M,u]:[w,a],X.precision=A,Ur=!0,O},De.toHexadecimal=De.toHex=function(o,s){return Ux(this,16,o,s)},De.toNearest=function(o,s){var a=this,u=a.constructor;if(a=new u(a),null==o){if(!a.d)return a;o=new u(1),s=u.rounding}else{if(o=new u(o),void 0===s?s=u.rounding:wa(s,0,8),!a.d)return o.s?a:o;if(!o.d)return o.s&&(o.s=a.s),o}return o.d[0]?(Ur=!1,a=bn(a,o,0,s,1).times(o),Ur=!0,wr(a)):(o.s=a.s,a=o),a},De.toNumber=function(){return+this},De.toOctal=function(o,s){return Ux(this,8,o,s)},De.toPower=De.pow=function(o){var s,a,u,h,v,g,y=this,w=y.constructor,M=+(o=new w(o));if(!(y.d&&o.d&&y.d[0]&&o.d[0]))return new w(yi(+y,M));if((y=new w(y)).eq(1))return y;if(u=w.precision,v=w.rounding,o.eq(1))return wr(y,u,v);if((s=$i(o.e/Dr))>=o.d.length-1&&(a=M<0?-M:M)<=9007199254740991)return h=dA(w,y,a,u),o.s<0?new w(1).div(h):wr(h,u,v);if((g=y.s)<0){if(sw.maxE+1||s0?g/0:0):(Ur=!1,w.rounding=y.s=1,a=Math.min(12,(s+"").length),(h=Yx(o.times(Tl(y,u+a)),u)).d&&fv((h=wr(h,u+5,1)).d,u,v)&&+Ei((h=wr(Yx(o.times(Tl(y,(s=u+10)+a)),s),s+5,1)).d).slice(u+1,u+15)+1==1e14&&(h=wr(h,u+1,0)),h.s=g,Ur=!0,w.rounding=v,wr(h,u,v))},De.toPrecision=function(o,s){var a,u=this,h=u.constructor;return void 0===o?a=_o(u,u.e<=h.toExpNeg||u.e>=h.toExpPos):(wa(o,1,Pa),void 0===s?s=h.rounding:wa(s,0,8),a=_o(u=wr(new h(u),o,s),o<=u.e||u.e<=h.toExpNeg,o)),u.isNeg()&&!u.isZero()?"-"+a:a},De.toSignificantDigits=De.toSD=function(o,s){var u=this.constructor;return void 0===o?(o=u.precision,s=u.rounding):(wa(o,1,Pa),void 0===s?s=u.rounding:wa(s,0,8)),wr(new u(this),o,s)},De.toString=function(){var o=this,s=o.constructor,a=_o(o,o.e<=s.toExpNeg||o.e>=s.toExpPos);return o.isNeg()&&!o.isZero()?"-"+a:a},De.truncated=De.trunc=function(){return wr(new this.constructor(this),this.e+1,1)},De.valueOf=De.toJSON=function(){var o=this,s=o.constructor,a=_o(o,o.e<=s.toExpNeg||o.e>=s.toExpPos);return o.isNeg()?"-"+a:a};var bn=function(){function o(u,h,v){var g,y=0,w=u.length;for(u=u.slice();w--;)u[w]=(g=u[w]*h+y)%v|0,y=g/v|0;return y&&u.unshift(y),u}function s(u,h,v,g){var y,w;if(v!=g)w=v>g?1:-1;else for(y=w=0;yh[y]?1:-1;break}return w}function a(u,h,v,g){for(var y=0;v--;)u[v]-=y,u[v]=(y=u[v]1;)u.shift()}return function(u,h,v,g,y,w){var M,A,L,O,D,k,X,tt,ot,ft,ht,pt,Wt,de,pe,Me,ze,Oe,Ze,tr,vr=u.constructor,gr=u.s==h.s?1:-1,mr=u.d,Je=h.d;if(!(mr&&mr[0]&&Je&&Je[0]))return new vr(u.s&&h.s&&(mr?!Je||mr[0]!=Je[0]:Je)?mr&&0==mr[0]||!Je?0*gr:gr/0:NaN);for(w?(D=1,A=u.e-h.e):(w=wo,A=$i(u.e/(D=Dr))-$i(h.e/D)),Ze=Je.length,ze=mr.length,ft=(ot=new vr(gr)).d=[],L=0;Je[L]==(mr[L]||0);L++);if(Je[L]>(mr[L]||0)&&A--,null==v?(de=v=vr.precision,g=vr.rounding):de=y?v+(u.e-h.e)+1:v,de<0)ft.push(1),k=!0;else{if(de=de/D+2|0,L=0,1==Ze){for(O=0,Je=Je[0],de++;(L1&&(Je=o(Je,O,w),mr=o(mr,O,w),Ze=Je.length,ze=mr.length),Me=Ze,pt=(ht=mr.slice(0,Ze)).length;pt=w/2&&++Oe;do{O=0,(M=s(Je,ht,Ze,pt))<0?(Wt=ht[0],Ze!=pt&&(Wt=Wt*w+(ht[1]||0)),(O=Wt/Oe|0)>1?(O>=w&&(O=w-1),1==(M=s(X=o(Je,O,w),ht,tt=X.length,pt=ht.length))&&(O--,a(X,Ze=10;O/=10)L++;ot.e=L+A*D-1,wr(ot,y?v+ot.e+1:v,g,k)}return ot}}();function wr(o,s,a,u){var h,v,g,y,w,M,A,L,O,D=o.constructor;t:if(null!=s){if(!(L=o.d))return o;for(h=1,y=L[0];y>=10;y/=10)h++;if((v=s-h)<0)v+=Dr,w=(A=L[O=0])/yi(10,h-(g=s)-1)%10|0;else if((O=Math.ceil((v+1)/Dr))>=(y=L.length)){if(!u)break t;for(;y++<=O;)L.push(0);A=w=0,h=1,g=(v%=Dr)-Dr+1}else{for(A=y=L[O],h=1;y>=10;y/=10)h++;w=(g=(v%=Dr)-Dr+h)<0?0:A/yi(10,h-g-1)%10|0}if(u=u||s<0||void 0!==L[O+1]||(g<0?A:A%yi(10,h-g-1)),M=a<4?(w||u)&&(0==a||a==(o.s<0?3:2)):w>5||5==w&&(4==a||u||6==a&&(v>0?g>0?A/yi(10,h-g):0:L[O-1])%10&1||a==(o.s<0?8:7)),s<1||!L[0])return L.length=0,M?(L[0]=yi(10,(Dr-(s-=o.e+1)%Dr)%Dr),o.e=-s||0):L[0]=o.e=0,o;if(0==v?(L.length=O,y=1,O--):(L.length=O+1,y=yi(10,Dr-v),L[O]=g>0?(A/yi(10,h-g)%yi(10,g)|0)*y:0),M)for(;;){if(0==O){for(v=1,g=L[0];g>=10;g/=10)v++;for(g=L[0]+=y,y=1;g>=10;g/=10)y++;v!=y&&(o.e++,L[0]==wo&&(L[0]=1));break}if(L[O]+=y,L[O]!=wo)break;L[O--]=0,y=1}for(v=L.length;0===L[--v];)L.pop()}return Ur&&(o.e>D.maxE?(o.d=null,o.e=NaN):o.e0?v=v.charAt(0)+"."+v.slice(1)+Rs(u):g>1&&(v=v.charAt(0)+"."+v.slice(1)),v=v+(o.e<0?"e":"e+")+o.e):h<0?(v="0."+Rs(-h-1)+v,a&&(u=a-g)>0&&(v+=Rs(u))):h>=g?(v+=Rs(h+1-g),a&&(u=a-h-1)>0&&(v=v+"."+Rs(u))):((u=h+1)0&&(h+1===g&&(v+="."),v+=Rs(u))),v}function vv(o,s){var a=o[0];for(s*=Dr;a>=10;a/=10)s++;return s}function dv(o,s,a){if(s>I7)throw Ur=!0,a&&(o.precision=a),Error(Hx);return wr(new o(cv),s,1,!0)}function So(o,s,a){if(s>ea)throw Error(Hx);return wr(new o(sh),s,a,!0)}function Gx(o){var s=o.length-1,a=s*Dr+1;if(s=o[s]){for(;s%10==0;s/=10)a--;for(s=o[0];s>=10;s/=10)a++}return a}function Rs(o){for(var s="";o--;)s+="0";return s}function dA(o,s,a,u){var h,v=new o(1),g=Math.ceil(u/Dr+4);for(Ur=!1;;){if(a%2&&xA((v=v.times(s)).d,g)&&(h=!0),0===(a=$i(a/2))){a=v.d.length-1,h&&0===v.d[a]&&++v.d[a];break}xA((s=s.times(s)).d,g)}return Ur=!0,v}function pA(o){return 1&o.d[o.d.length-1]}function gA(o,s,a){for(var u,h=new o(s[0]),v=0;++v17)return new O(o.d?o.d[0]?o.s<0?0:1/0:1:o.s?o.s<0?0:o:NaN);for(null==s?(Ur=!1,w=k):w=s,y=new O(.03125);o.e>-2;)o=o.times(y),L+=5;for(w+=u=Math.log(yi(2,L))/Math.LN10*2+5|0,a=v=g=new O(1),O.precision=w;;){if(v=wr(v.times(o),w,1),a=a.times(++A),Ei((y=g.plus(bn(v,a,w,1))).d).slice(0,w)===Ei(g.d).slice(0,w)){for(h=L;h--;)g=wr(g.times(g),w,1);if(null!=s)return O.precision=k,g;if(!(M<3&&fv(g.d,w-u,D,M)))return wr(g,O.precision=k,D,Ur=!0);O.precision=w+=10,a=v=y=new O(1),A=0,M++}g=y}}function Tl(o,s){var a,u,h,v,g,y,w,M,A,L,O,D=1,X=o,tt=X.d,ot=X.constructor,ft=ot.rounding,ht=ot.precision;if(X.s<0||!tt||!tt[0]||!X.e&&1==tt[0]&&1==tt.length)return new ot(tt&&!tt[0]?-1/0:1!=X.s?NaN:tt?0:X);if(null==s?(Ur=!1,A=ht):A=s,ot.precision=A+=10,u=(a=Ei(tt)).charAt(0),!(Math.abs(v=X.e)<15e14))return M=dv(ot,A+2,ht).times(v+""),X=Tl(new ot(u+"."+a.slice(1)),A-10).plus(M),ot.precision=ht,null==s?wr(X,ht,ft,Ur=!0):X;for(;u<7&&1!=u||1==u&&a.charAt(1)>3;)u=(a=Ei((X=X.times(o)).d)).charAt(0),D++;for(v=X.e,u>1?(X=new ot("0."+a),v++):X=new ot(u+"."+a.slice(1)),L=X,w=g=X=bn(X.minus(1),X.plus(1),A,1),O=wr(X.times(X),A,1),h=3;;){if(g=wr(g.times(O),A,1),Ei((M=w.plus(bn(g,new ot(h),A,1))).d).slice(0,A)===Ei(w.d).slice(0,A)){if(w=w.times(2),0!==v&&(w=w.plus(dv(ot,A+2,ht).times(v+""))),w=bn(w,new ot(D),A,1),null!=s)return ot.precision=ht,w;if(!fv(w.d,A-10,ft,y))return wr(w,ot.precision=ht,ft,Ur=!0);ot.precision=A+=10,M=g=X=bn(L.minus(1),L.plus(1),A,1),O=wr(X.times(X),A,1),h=y=1}w=M,h+=2}}function yA(o){return String(o.s*o.s/0)}function Wx(o,s){var a,u,h;for((a=s.indexOf("."))>-1&&(s=s.replace(".","")),(u=s.search(/e/i))>0?(a<0&&(a=u),a+=+s.slice(u+1),s=s.substring(0,u)):a<0&&(a=s.length),u=0;48===s.charCodeAt(u);u++);for(h=s.length;48===s.charCodeAt(h-1);--h);if(s=s.slice(u,h)){if(h-=u,o.e=a=a-u-1,o.d=[],u=(a+1)%Dr,a<0&&(u+=Dr),uo.constructor.maxE?(o.d=null,o.e=NaN):o.e=0&&(A=A.replace(".",""),(O=new D(1)).e=A.length-g,O.d=Ko(_o(O),10,h),O.e=O.d.length),v=w=(L=Ko(A,10,h)).length;0==L[--w];)L.pop();if(L[0]){if(g<0?v--:((o=new D(o)).d=L,o.e=v,L=(o=bn(o,O,a,u,0,h)).d,v=o.e,M=p0),g=L[a],y=h/2,M=M||void 0!==L[a+1],M=u<4?(void 0!==g||M)&&(0===u||u===(o.s<0?3:2)):g>y||g===y&&(4===u||M||6===u&&1&L[a-1]||u===(o.s<0?8:7)),L.length=a,M)for(;++L[--a]>h-1;)L[a]=0,a||(++v,L.unshift(1));for(w=L.length;!L[w-1];--w);for(g=0,A="";g1)if(16==s||8==s){for(g=16==s?4:3,--w;w%g;w++)A+="0";for(w=(L=Ko(A,h,s)).length;!L[w-1];--w);for(g=1,A="1.";gw)for(v-=w;v--;)A+="0";else vs)return o.length=s,!0}function aB(o){return new this(o).abs()}function O7(o){return new this(o).acos()}function oB(o){return new this(o).acosh()}function sB(o,s){return new this(o).plus(s)}function lB(o){return new this(o).asin()}function uB(o){return new this(o).asinh()}function cB(o){return new this(o).atan()}function R7(o){return new this(o).atanh()}function hB(o,s){o=new this(o),s=new this(s);var a,u=this.precision,h=this.rounding,v=u+4;return o.s&&s.s?o.d||s.d?!s.d||o.isZero()?(a=s.s<0?So(this,u,h):new this(0)).s=o.s:!o.d||s.isZero()?(a=So(this,v,1).times(.5)).s=o.s:s.s<0?(this.precision=v,this.rounding=1,a=this.atan(bn(o,s,v,1)),s=So(this,v,1),this.precision=u,this.rounding=h,a=o.s<0?a.minus(s):a.plus(s)):a=this.atan(bn(o,s,v,1)):(a=So(this,v,1).times(s.s>0?.25:.75)).s=o.s:a=new this(NaN),a}function fB(o){return new this(o).cbrt()}function vB(o){return wr(o=new this(o),o.e+1,2)}function dB(o,s,a){return new this(o).clamp(s,a)}function pB(o){if(!o||"object"!=typeof o)throw Error(g0+"Object expected");var s,a,u,h=!0===o.defaults,v=["precision",1,Pa,"rounding",0,8,"toExpNeg",-Gu,0,"toExpPos",0,Gu,"maxE",0,Gu,"minE",-Gu,0,"modulo",0,9];for(s=0;s=v[s+1]&&u<=v[s+2]))throw Error(Os+a+": "+u);this[a]=u}if(a="crypto",h&&(this[a]=hv[a]),void 0!==(u=o[a])){if(!0!==u&&!1!==u&&0!==u&&1!==u)throw Error(Os+a+": "+u);if(u){if(!(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes)))throw Error(cA);this[a]=!0}else this[a]=!1}return this}function gB(o){return new this(o).cos()}function yB(o){return new this(o).cosh()}function F7(o,s){return new this(o).div(s)}function mB(o){return new this(o).exp()}function wA(o){return wr(o=new this(o),o.e+1,3)}function xB(){var o,s,a=new this(0);for(Ur=!1,o=0;o=429e7?s[v]=crypto.getRandomValues(new Uint32Array(1))[0]:y[v++]=h%1e7;else{if(!crypto.randomBytes)throw Error(cA);for(s=crypto.randomBytes(u*=4);v=214e7?crypto.randomBytes(4).copy(s,v):(y.push(h%1e7),v+=4);v=u/4}else for(;v=10;h/=10)u++;uh.maxE?(M.e=NaN,M.d=null):v.e=10;y/=10)g++;return void(Ur?g>h.maxE?(M.e=NaN,M.d=null):g-1){if(s=s.replace(/(\d)_(?=\d)/g,"$1"),fA.test(s))return Wx(o,s)}else if("Infinity"===s||"NaN"===s)return+s||(o.s=NaN),o.e=NaN,o.d=null,o;if(eB.test(s))a=16,s=s.toLowerCase();else if(tB.test(s))a=2;else{if(!rB.test(s))throw Error(Os+s);a=8}for((v=s.search(/p/i))>0?(w=+s.slice(v+1),s=s.substring(2,v)):s=s.slice(2),v=s.indexOf("."),u=o.constructor,(g=v>=0)&&(v=(y=(s=s.replace(".","")).length)-v,h=dA(u,new u(a),v,2*v)),v=A=(M=Ko(s,a,wo)).length-1;0===M[v];--v)M.pop();return v<0?new u(0*o.s):(o.e=vv(M,A),o.d=M,Ur=!1,g&&(o=bn(o,h,4*y)),w&&(o=o.times(Math.abs(w)<54?yi(2,w):Mo.pow(2,w))),Ur=!0,o)}(M,v)}if(h.prototype=De,h.ROUND_UP=0,h.ROUND_DOWN=1,h.ROUND_CEIL=2,h.ROUND_FLOOR=3,h.ROUND_HALF_UP=4,h.ROUND_HALF_DOWN=5,h.ROUND_HALF_EVEN=6,h.ROUND_HALF_CEIL=7,h.ROUND_HALF_FLOOR=8,h.EUCLID=9,h.config=h.set=pB,h.clone=CA,h.isDecimal=Xx,h.abs=aB,h.acos=O7,h.acosh=oB,h.add=sB,h.asin=lB,h.asinh=uB,h.atan=cB,h.atanh=R7,h.atan2=hB,h.cbrt=fB,h.ceil=vB,h.clamp=dB,h.cos=gB,h.cosh=yB,h.div=F7,h.exp=mB,h.floor=wA,h.hypot=xB,h.ln=CB,h.log=wB,h.log10=SA,h.log2=_A,h.max=_B,h.min=SB,h.mod=MB,h.mul=TB,h.pow=bB,h.random=AB,h.round=EB,h.sign=LB,h.sin=IB,h.sinh=OB,h.sqrt=MA,h.sub=D7,h.sum=RB,h.tan=FB,h.tanh=DB,h.trunc=BB,void 0===o&&(o={}),o&&!0!==o.defaults)for(u=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],s=0;s1},o}(),hh=function(o){function s(){var a=null!==o&&o.apply(this,arguments)||this;return a.handleDimensionValuesSort=function(){br(a.sortParams,function(u){var h=u.sortFieldId,v=u.sortByMeasure;if(h){var g=Be([],Ae(a.sortedDimensionValues[h]||[]),!1),y=ND({dataSet:a,sortParam:u,originValues:g,isSortByMeasure:!Ke(v)});a.sortedDimensionValues[h]=y}})},a.getCustomData=function(u){for(var h,v=!1,g=a.indexesData,y=function(M){var A=u[M];v?g=fo(A)?nb(g):null===(h=Uo(g))||void 0===h?void 0:h.map(function(L){return L&&yr(L,A)}):fo(A)?v=!0:g=g?.[A]},w=0;w=a?(h.splice(a,0,Jr),h):Be(Be([],Ae(h),!1),[Jr],!1)},s.prototype.isCustomMeasuresPosition=function(a){return ga(a)},s.prototype.getRowData=function(a){return this.getMultiData(a.rowQuery)},s}(BA),Kx=function(o){function s(){var a=null!==o&&o.apply(this,arguments)||this;return a.handleDimensionValueFilter=function(){br(a.filterParams,function(u){var h=u.filterKey,v=u.filteredValues,g=u.customFilter,y=function(w){return!pa(v,w[h])};a.displayData=Be(Be(Be([],Ae(a.getStartRows()),!1),Ae(Cs(a.getMovableRows(),function(w){return g?g(w)&&y(w):y(w)})),!1),Ae(a.getEndRows()),!1)})},a.handleDimensionValuesSort=function(){br(a.sortParams,function(u){var h=u.sortFieldId,v=u.sortBy,g=u.sortFunc,y=u.sortMethod,w=u.query;if(h){var M=a.getMovableRows(),A=[];if(w){var L=[];M.forEach(function(X){for(var tt=Object.keys(w),ot=!0,ft=0;ft(function(o){o.ScrollChange="scroll-change",o.ScrollEnd="scroll-end"}(bl||(bl={})),bl))(),_0=function(o){function s(a){var u=o.call(this,a)||this;u.isMobile=!1,u.eventHandlers=[],u.scrollFrameId=null,u.getCoordinatesName=function(){return{from:u.isHorizontal?"x1":"y1",to:u.isHorizontal?"x2":"y2"}},u.getCoordinatesWithBBoxExtraPadding=function(){var D=u.theme.size;return{start:u.thumbOffset+(u.isHorizontal?0:D/2),end:u.thumbOffset+u.thumbLen-(u.isHorizontal?D:D/2)}},u.current=function(){return u.thumbOffset/u.trackLen/(1-u.thumbLen/u.trackLen)},u.updateThumbLen=function(D){if(u.thumbLen!==D){u.thumbLen=D;var k=u.getCoordinatesName();u.thumbShape.attr(k.to,u.thumbOffset+D),u.emitScrollChange(u.thumbOffset/(u.trackLen-u.thumbLen)*u.scrollTargetMaxOffset,!1)}},u.updateThumbOffset=function(D,k){var X;void 0===k&&(k=!0);var tt=u.validateRange(D);if(u.thumbOffset!==tt||0===tt){u.thumbOffset=tt;var ft=u.getCoordinatesName(),ht=ft.from,pt=ft.to,Wt=u.getCoordinatesWithBBoxExtraPadding(),pe=Wt.end;u.thumbShape.attr(((X={})[ht]=Wt.start,X[pt]=pe,X)),k&&u.emitScrollChange(tt/(u.trackLen-u.thumbLen)*u.scrollTargetMaxOffset,!1)}},u.onlyUpdateThumbOffset=function(D){var k;u.updateThumbOffset(D,!1),null===(k=u.get("canvas"))||void 0===k||k.draw()},u.emitScrollChange=function(D,k){void 0===k&&(k=!0),cancelAnimationFrame(u.scrollFrameId),u.scrollFrameId=requestAnimationFrame(function(){u.emit(bl.ScrollChange,{offset:D,updateThumbOffset:k})})},u.addEventListener=function(D,k,X){return D?.addEventListener(k,X,!1),{remove:function(){D?.removeEventListener(k,X,!1)}}},u.addEvent=function(D,k,X){D.on(k,X),u.eventHandlers.push({target:D,type:k,handler:X})},u.initScrollBar=function(){u.scrollBarGroup=u.createScrollBarGroup(),u.scrollBarGroup.move(u.position.x,u.position.y),u.bindEvents()},u.createScrollBarGroup=function(){var D=u.addGroup({className:u.isHorizontal?"horizontalBar":"verticalBar"});return u.trackShape=u.createTrackShape(D),u.thumbShape=u.createThumbShape(D),D},u.createTrackShape=function(D){var k=u.theme,X=k.lineCap,ft=k.size,ht={lineWidth:ft,stroke:k.trackColor,lineCap:void 0===X?"round":X};return D.addShape("line",u.isHorizontal?{attrs:ue(ue({},ht),{x1:0,y1:ft/2,x2:u.trackLen,y2:ft/2})}:{attrs:ue(ue({},ht),{x1:ft/2,y1:0,x2:ft/2,y2:u.trackLen})})},u.createThumbShape=function(D){var k=u.theme,X=k.size,tt=k.lineCap,ht={lineWidth:X,stroke:k.thumbColor,lineCap:void 0===tt?"round":tt,cursor:"default"},pt=u.getCoordinatesWithBBoxExtraPadding(),Wt=pt.start,de=pt.end;return D.addShape("line",u.isHorizontal?{attrs:ue(ue({},ht),{x1:Wt,y1:X/2,x2:de,y2:X/2})}:{attrs:ue(ue({},ht),{x1:X/2,y1:Wt,x2:X/2,y2:de})})},u.bindEvents=function(){u.on("mousedown",u.onStartEvent(!1)),u.on("mouseup",u.onMouseUp),u.on("touchstart",u.onStartEvent(!0)),u.on("touchend",u.onMouseUp),u.trackShape.on("click",u.onTrackClick),u.thumbShape.on("mouseover",u.onTrackMouseOver),u.thumbShape.on("mouseout",u.onTrackMouseOut)},u.onStartEvent=function(D){return function(k){k.preventDefault(),u.isMobile=D;var X=u.isMobile?yr(k,"touches.0",k):k;u.startPos=u.isHorizontal?X.clientX:X.clientY,u.bindLaterEvent()}},u.bindLaterEvent=function(){var D=u.get("canvas"),k=document.body,X=[];u.isMobile?(X=[u.addEventListener(k,"touchmove",u.onMouseMove),u.addEventListener(k,"touchend",u.onMouseUp),u.addEventListener(k,"touchcancel",u.onMouseUp)],u.addEvent(D,"touchend",u.onMouseUp),u.addEvent(D,"touchcancel",u.onMouseUp)):(X=[u.addEventListener(k,"mousemove",u.onMouseMove),u.addEventListener(k,"mouseup",u.onMouseUp),u.addEventListener(k,"mouseleave",u.onMouseUp)],u.addEvent(D,"mouseup",u.onMouseUp)),u.clearEvents=function(){X.forEach(function(tt){tt?.remove()}),br(u.eventHandlers,function(tt){var ot;null===(ot=tt.target)||void 0===ot||ot.off(tt.type,tt.handler)}),u.eventHandlers.length=0}},u.onTrackClick=function(D){var X=u.validateRange(u.isHorizontal?D.x-u.position.x-u.thumbLen/2:D.y-u.position.y-u.thumbLen/2);u.updateThumbOffset(X)},u.onMouseMove=function(D){D.preventDefault();var k=u.isMobile?yr(D,"touches.0",D):D,ot=u.isHorizontal?k.clientX:k.clientY,ft=ot-u.startPos;u.startPos=ot,u.updateThumbOffset(u.thumbOffset+ft)},u.onMouseUp=function(D){var k;u.emit(bl.ScrollEnd,{}),D.preventDefault(),null===(k=u.clearEvents)||void 0===k||k.call(u)},u.onTrackMouseOver=function(){var D=u.theme,X=D.hoverSize;u.thumbShape.attr("stroke",D.thumbHoverColor),u.thumbShape.attr("lineWidth",X)},u.onTrackMouseOut=function(){var D=u.theme,X=D.size;u.thumbShape.attr("stroke",D.thumbColor),u.thumbShape.attr("lineWidth",X)},u.validateRange=function(D){var k=D;return D+u.thumbLen>u.trackLen?k=u.trackLen-u.thumbLen:D+u.thumbLen=s}).map(function(u){return u[a]}).reduce(function(u,h){return u+h},0)},pv=function(o,s,a){if(a<=0)return{start:0,end:0};var u=Bc(o,function(v,g){return s>=v&&sv&&a<=o[g+1]},u);return{start:u,end:h=Math.min(-1===h?1/0:h,o.length-2)}},jx=function(o,s){var h=Math.min(s.originalWidth-s.width,o);return h<0?0:h},t2=function(o,s,a){var u=Math.min(s-a,o);return u<0?0:u},gv=function(o,s){if(void 0===o&&(o=[]),Ke(o))return[];var a=[];return o.forEach(function(u){u instanceof s&&a.push(u),u instanceof ls&&u.getChildren().forEach(function(v){v instanceof s&&a.push(v)})}),a},PA=function(o,s,a){return a.slice(o,s+1).map(function(u){return u.x+u.width})},S0=function(o,s,a){for(var u=[],h=o;h=u[0]&&o<=u[1]&&s>=u[2]&&s<=u[3]},NA=function(o){for(var s=Ae(o,4),u=s[1],h=s[2],v=s[3],g=[],y=s[0];y<=u;y+=1)for(var w=h;w<=v;w+=1)g.push([y,w]);return g},QB=function(o,s){var a=[],u=[];return Object.keys(s).forEach(function(h){var v=function(o,s){var a=[],u=[];if(Ke(o))return Ke(s)?{add:a,remove:u}:{add:NA(s),remove:u};if(Ke(s))return{add:a,remove:NA(o)};for(var h=Ae(o,4),v=h[0],g=h[1],y=h[2],w=h[3],M=Ae(s,4),A=M[0],L=M[1],O=M[2],D=M[3],k=v;k<=g;k++)for(var X=y;X<=w;X++)zA(k,X,s)||u.push([k,X]);for(k=A;k<=L;k+=1)for(X=O;X<=D;X+=1)zA(k,X,o)||a.push([k,X]);return{add:a,remove:u}}(o?.[h]||[],s[h]),y=v.remove;a.push.apply(a,Be([],Ae(v.add),!1)),u.push.apply(u,Be([],Ae(y),!1))}),{add:a,remove:u}},HA=function o(s,a){void 0===a&&(a=!1),this.x=0,this.y=0,this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.width=0,this.height=0,this.originalWidth=0,this.originalHeight=0,this.viewportHeight=0,this.viewportWidth=0,this.facet=s,this.spreadsheet=s.spreadsheet,this.layoutResult=s.layoutResult,a&&this.calculateBBox()},GA=function(o){function s(){return null!==o&&o.apply(this,arguments)||this}return Ir(s,o),s.prototype.calculateBBox=function(){var a=this.getCornerBBoxWidth(),u=this.getCornerBBoxHeight();this.width=a,this.height=u,this.maxX=a,this.maxY=u},s.prototype.getCornerBBoxOriginalHeight=function(){var a=this.layoutResult.colsHierarchy,u=this.spreadsheet.options.style.colCfg;return a.sampleNodeForLastLevel?Math.floor(a.height):u?.height},s.prototype.getCornerBBoxHeight=function(){return this.originalHeight=this.getCornerBBoxOriginalHeight(),this.originalHeight},s.prototype.getCornerBBoxWidth=function(){return this.originalWidth=Math.floor(this.layoutResult.rowsHierarchy.width+this.facet.getSeriesNumberWidth()),this.spreadsheet.isScrollContainsRowHeader()?this.originalWidth:this.adjustCornerBBoxWidth()},s.prototype.adjustCornerBBoxWidth=function(){var u=this.spreadsheet.options.width,h=.5*u,v=this.layoutResult.colsHierarchy?.width,g=u-this.originalWidth;if(this.originalWidth<=h||v<=g)return this.originalWidth;return Math.floor(v<=u-h?this.originalWidth-(v-g):h)},s}(HA),JB=function(o){function s(){return null!==o&&o.apply(this,arguments)||this}return Ir(s,o),s.prototype.calculateBBox=function(){this.originalWidth=this.facet.getRealWidth(),this.originalHeight=this.facet.getRealHeight();var a=this.facet.cornerBBox,u={x:Math.floor(a.maxX),y:Math.floor(a.maxY)},h=this.spreadsheet.theme.scrollBar.size,v=this.spreadsheet.options,y=v.height,w=Math.max(0,v.width-u.x),M=Math.max(0,y-u.y-h);this.x=u.x,this.y=u.y,this.width=w,this.height=M,this.viewportHeight=Math.abs(Math.floor(Math.min(M,this.originalHeight))),this.viewportWidth=Math.abs(Math.floor(Math.min(w,this.originalWidth))),this.maxX=u.x+this.viewportWidth,this.maxY=u.y+this.viewportHeight,this.minX=u.x,this.minY=u.y;var A=this.spreadsheet.options,O=A.frozenTrailingRowCount;A.frozenTrailingColCount>0&&(this.viewportWidth=this.width,this.maxX=u.x+this.width),O>0&&(this.viewportHeight=this.height,this.maxY=u.y+this.height)},s}(HA),M0=function(o){function s(a){var u=o.call(this,a)||this;return u.isHeaderCellInViewport=function(h,v,g,y){return h+v>=g&&g+y>=h},u.headerConfig=a,u}return Ir(s,o),s.prototype.getConfig=function(){return this.headerConfig},s.prototype.clearResizeAreaGroup=function(a){var h=this.get("parent")?.findById(a);h?.clear()},s.prototype.render=function(a){this.clearResizeAreaGroup(a),this.clear(),this.layout(),this.offset(),this.clip()},s.prototype.onScrollXY=function(a,u,h){this.headerConfig.scrollX=a,this.headerConfig.scrollY=u,this.render(h)},s.prototype.onRowScrollX=function(a,u){this.headerConfig.scrollX=a,this.render(u)},s.prototype.clear=function(){o.prototype.clear.call(this)},s}(ls),e2=function(o){function s(a){var u=o.call(this,a)||this;return u.scrollGroup=u.addGroup({name:d3,zIndex:r3}),u}return Ir(s,o),s.prototype.onColScroll=function(a,u){this.headerConfig.scrollX!==a&&(this.headerConfig.scrollX=a,this.render(u))},s.prototype.clip=function(){var a=this.headerConfig,u=a.width,h=a.height,v=a.scrollX,y=a.spreadsheet.isFrozenRowHeader();this.scrollGroup.setClip({type:"rect",attrs:{x:y?v:0,y:0,width:y?u:u+v,height:h}})},s.prototype.clear=function(){var a,u;null===(a=this.scrollGroup)||void 0===a||a.clear(),null===(u=this.background)||void 0===u||u.remove(!0)},s.prototype.getCellInstance=function(a,u,h){return new ov(a,u,h)},s.prototype.getCellGroup=function(a){return this.scrollGroup},s.prototype.isColCellInRect=function(a){var u=this.headerConfig,v=u.cornerWidth,y=u.scrollX;return u.width+y>a.x&&y-(u.spreadsheet.isFrozenRowHeader()?0:v)0,this.cfg.showViewportRightShadow=Math.floor(a)X.y&&LX.x&&O-A=0;h--){var v=u[h];v instanceof ls?v.set("children",[]):u[h].remove()}a.foregroundGroup.set("children",[]),a.backgroundGroup.set("children",[])},this.scrollWithAnimation=function(u,h,v){var g,y,w,M;void 0===u&&(u={}),void 0===h&&(h=200);var A=a.getAdjustedScrollOffset({scrollX:(null===(g=u.offsetX)||void 0===g?void 0:g.value)||0,scrollY:(null===(y=u.offsetY)||void 0===y?void 0:y.value)||0,rowHeaderScrollX:(null===(w=u.rowHeaderOffsetX)||void 0===w?void 0:w.value)||0}),L=A.scrollX,O=A.scrollY,D=A.rowHeaderScrollX;null===(M=a.timer)||void 0===M||M.stop();var k=a.getScrollOffset(),X=[L??k.scrollX,O??k.scrollY,D??k.rowHeaderScrollX],tt=ia(Object.values(k),X);a.timer=_h(function(ot){var ft=Math.min(ot/h,1),ht=Ae(tt(ft),3);a.setScrollOffset({rowHeaderScrollX:ht[2],scrollX:ht[0],scrollY:ht[1]}),a.startScroll(),ot>h&&(a.timer.stop(),v?.())})},this.scrollImmediately=function(u){var h,v,g;void 0===u&&(u={});var y=a.getAdjustedScrollOffset({scrollX:(null===(h=u.offsetX)||void 0===h?void 0:h.value)||0,scrollY:(null===(v=u.offsetY)||void 0===v?void 0:v.value)||0,rowHeaderScrollX:(null===(g=u.rowHeaderOffsetX)||void 0===g?void 0:g.value)||0});a.setScrollOffset({scrollX:y.scrollX,scrollY:y.scrollY,rowHeaderScrollX:y.rowHeaderScrollX}),a.startScroll()},this.startScroll=function(u){var h,v,g;void 0===u&&(u=!1);var y=a.getScrollOffset(),M=y.scrollX,A=y.scrollY;null===(h=a.hRowScrollBar)||void 0===h||h.onlyUpdateThumbOffset(a.getScrollBarOffset(y.rowHeaderScrollX,a.hRowScrollBar)),null===(v=a.hScrollBar)||void 0===v||v.onlyUpdateThumbOffset(a.getScrollBarOffset(M,a.hScrollBar)),null===(g=a.vScrollBar)||void 0===g||g.onlyUpdateThumbOffset(a.getScrollBarOffset(A,a.vScrollBar)),a.dynamicRenderCell(u)},this.getRendererHeight=function(){var u=a.getCellRange(),h=u.start;return a.viewCellHeights.getCellOffsetY(u.end+1)-a.viewCellHeights.getCellOffsetY(h)},this.getAdjustedScrollOffset=function(u){var v=u.scrollY,g=u.rowHeaderScrollX;return{scrollX:t2(u.scrollX,a.layoutResult.colsHierarchy.width,a.panelBBox.width),scrollY:t2(v,a.getRendererHeight(),a.panelBBox.height),rowHeaderScrollX:jx(g,a.cornerBBox)}},this.renderRowScrollBar=function(u){if(!a.cfg.spreadsheet.isScrollContainsRowHeader()&&a.cornerBBox.widtha.panelBBox.minX&&ha.panelBBox.minY&&va.cornerBBox.minX&&ha.cornerBBox.minY&&v=a.cornerBBox.width,X=a.hRowScrollBar&&a.isScrollOverTheCornerArea({offsetX:L,offsetY:O})||(null===(w=a.hScrollBar)||void 0===w?void 0:w.thumbOffset)+(null===(M=a.hScrollBar)||void 0===M?void 0:M.thumbLen)>=D;return A>=0&&X&&k},this.isScrollToTop=function(u){var h;return!a.vScrollBar||u<=0&&(null===(h=a.vScrollBar)||void 0===h?void 0:h.thumbOffset)<=0},this.isScrollToBottom=function(u){var h,v,g;return!a.vScrollBar||u>=0&&(null===(h=a.vScrollBar)||void 0===h?void 0:h.thumbOffset)+(null===(v=a.vScrollBar)||void 0===v?void 0:v.thumbLen)>=(null===(g=a.panelBBox)||void 0===g?void 0:g.height)},this.isVerticalScrollOverTheViewport=function(u){return!a.isScrollToTop(u)&&!a.isScrollToBottom(u)},this.isHorizontalScrollOverTheViewport=function(u){return!a.isScrollToLeft(u)&&!a.isScrollToRight(u)},this.isScrollOverTheViewport=function(u){var h=u.deltaY,v=u.deltaX;return!(u.offsetY<=a.cornerBBox.maxY)&&(0!==h?a.isVerticalScrollOverTheViewport(h):0!==v&&a.isHorizontalScrollOverTheViewport(u))},this.cancelScrollFrame=function(){return!(Wn()&&a.scrollFrameId||(cancelAnimationFrame(a.scrollFrameId),0))},this.clearScrollFrameIdOnMobile=function(){Wn()&&(a.scrollFrameId=null)},this.stopScrollChainingIfNeeded=function(u){"auto"!==a.spreadsheet.options.interaction.overscrollBehavior&&a.stopScrollChaining(u)},this.stopScrollChaining=function(u){var h,v,g;null===(h=u?.preventDefault)||void 0===h||h.call(u),null===(g=null===(v=u?.originalEvent)||void 0===v?void 0:v.preventDefault)||void 0===g||g.call(v)},this.onWheel=function(u){var v=u.deltaX,g=u.deltaY,y=u.offsetX,w=u.offsetY;u.shiftKey&&(y=y-v+g,v=g,w-=g,g=0);var A=Ae(s8(v,g,a.spreadsheet.options.interaction.scrollSpeedRatio),2),L=A[0],O=A[1];a.spreadsheet.hideTooltip(),a.spreadsheet.interaction.clearHoverTimer(),a.isScrollOverTheViewport({deltaX:L,deltaY:O,offsetX:y,offsetY:w})?(a.stopScrollChaining(u),a.spreadsheet.interaction.addIntercepts([Lr.HOVER]),a.cancelScrollFrame()&&(a.scrollFrameId=requestAnimationFrame(function(){var D,k=a.getScrollOffset(),X=k.scrollX,tt=k.scrollY,ot=k.rowHeaderScrollX;0!==L&&(a.showHorizontalScrollBar(),a.updateHorizontalRowScrollOffset({offsetX:y,offsetY:w,offset:L+ot}),a.updateHorizontalScrollOffset({offsetX:y,offsetY:w,offset:L+X})),0!==O&&(a.showVerticalScrollBar(),null===(D=a.vScrollBar)||void 0===D||D.emitScrollChange(O+tt)),a.delayHideScrollbarOnMobile(),a.clearScrollFrameIdOnMobile()}))):a.stopScrollChainingIfNeeded(u)},this.addCell=function(u){a.spreadsheet.panelScrollGroup?.add(u)},this.realCellRender=function(u,h){var v=a.calculateXYIndexes(u,h);Ts.getInstance().logger("renderIndex:",a.preCellIndexes,v);var g=QB(a.preCellIndexes,v),y=g.add,w=g.remove;Ts.getInstance().debugCallback(c8,function(){br(y,function(A){var L=Ae(A,2),O=L[0],D=L[1],k=a.layoutResult.getCellMeta(D,O);if(k){var X=a.cfg.dataCell(k);X.set("name","".concat(O,"-").concat(D)),a.addCell(X)}});var M=gv(a.panelGroup.getChildren(),_l);br(w,function(A){var L=Ae(A,2),O=L[0],D=L[1];ai(M,function(X){return X.get("name")==="".concat(O,"-").concat(D)})?.remove(!0)}),Ts.getInstance().logger("Render Cell Panel: ".concat(M?.length,", Add: ").concat(y?.length,", Remove: ").concat(w?.length))}),a.preCellIndexes=v,a.spreadsheet.emit(_e.LAYOUT_AFTER_REAL_DATA_CELL_RENDER,{add:y,remove:w,spreadsheet:a.spreadsheet})},this.getGridInfo=function(){var u=Ae(a.preCellIndexes.center,4),g=u[2],y=u[3];return{cols:PA(u[0],u[1],a.layoutResult.colLeafNodes),rows:S0(g,y,a.viewCellHeights)}},this.onAfterScroll=ms(function(){a.spreadsheet.interaction.isSelectedState()||a.spreadsheet.interaction.removeIntercepts([Lr.HOVER])},300),this.cfg=s,this.spreadsheet=s.spreadsheet,this.init()}return Object.defineProperty(o.prototype,"scrollBarTheme",{get:function(){return this.spreadsheet.theme.scrollBar},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"scrollBarSize",{get:function(){return this.scrollBarTheme.size},enumerable:!1,configurable:!0}),o.prototype.getCellCustomWidth=function(s,a){return ci(a)?a?.(s):a},o.prototype.getCellDraggedWidth=function(s){return yr(this.cfg.colCfg?.widthByFieldValue,"".concat(s.value))},o.prototype.render=function(){this.adjustScrollOffset(),this.renderHeaders(),this.renderScrollBars(),this.renderBackground(),this.dynamicRenderCell()},o.prototype.adjustScrollOffset=function(){var s=this.getAdjustedScrollOffset(this.getScrollOffset());this.setScrollOffset(s)},o.prototype.getSeriesNumberWidth=function(){return this.cfg.showSeriesNumber?this.spreadsheet.theme.rowCell.seriesNumberWidth:0},o.prototype.getCanvasHW=function(){return{width:this.cfg.width,height:this.cfg.height}},o.prototype.getContentHeight=function(){var s=this.layoutResult;return s.rowsHierarchy.height+s.colsHierarchy.height},o.prototype.updateScrollOffset=function(s){var a,u,h,v,g,y;void 0===(null===(a=s.rowHeaderOffsetX)||void 0===a?void 0:a.value)?void 0===(null===(h=s.offsetX)||void 0===h?void 0:h.value)?void 0!==(null===(g=s.offsetY)||void 0===g?void 0:g.value)&&(null!==(y=s.offsetY)&&void 0!==y&&y.animate?this.scrollWithAnimation(s):this.scrollImmediately(s)):null!==(v=s.offsetX)&&void 0!==v&&v.animate?this.scrollWithAnimation(s):this.scrollImmediately(s):null!==(u=s.rowHeaderOffsetX)&&void 0!==u&&u.animate?this.scrollWithAnimation(s):this.scrollImmediately(s)},o.prototype.getPaginationScrollY=function(){var s=this.cfg.pagination;if(s){var a=s.current,v=this.viewCellHeights,g=Math.max(((void 0===a?yo:a)-1)*s.pageSize,0);return v.getCellOffsetY(g)}return 0},o.prototype.destroy=function(){this.unbindEvents(),this.clearAllGroup(),this.preCellIndexes=null,cancelAnimationFrame(this.scrollFrameId)},o.prototype.calculateXYIndexes=function(s,a){var u=this.panelBBox;return{center:rx(s,a,this.viewCellWidths,this.viewCellHeights,{width:u.viewportWidth,height:u.viewportHeight,x:0,y:0},this.getRealScrollX(this.cornerBBox.width))}},o.prototype.calculateCornerBBox=function(){this.cornerBBox=new GA(this,!0)},o.prototype.getCellRange=function(){return function(o,s){var a=o,u=0,h=a.getTotalLength()-1;if(s){var v=s.current,g=void 0===v?yo:v,y=s.pageSize;u=Math.max((g-1)*y,0),h=Math.min(g*y-1,a.getTotalLength()-1)}return{start:u,end:h}}(this.viewCellHeights,this.cfg.pagination)},o.prototype.clip=function(s,a){var u,h=this.spreadsheet.isFrozenRowHeader();null===(u=this.spreadsheet.panelScrollGroup)||void 0===u||u.setClip({type:"rect",attrs:{x:h?s:0,y:a,width:this.panelBBox.width+(h?0:s),height:this.panelBBox.height}})},o.prototype.translateRelatedGroups=function(s,a,u){var h,v;Ms(this.spreadsheet.panelScrollGroup,this.cornerBBox.width-s,this.cornerBBox.height-a),null===(h=this.rowHeader)||void 0===h||h.onScrollXY(this.getRealScrollX(s,u),a,nc),null===(v=this.rowIndexHeader)||void 0===v||v.onScrollXY(this.getRealScrollX(s,u),a,CC),this.cornerHeader.onCorScroll(this.getRealScrollX(s,u),Ng),this.centerFrame.onChangeShadowVisibility(s,this.getRealWidth()-this.panelBBox.width),this.centerFrame.onBorderScroll(this.getRealScrollX(s)),this.columnHeader.onColScroll(s,wC)},o.prototype.init=function(){var s=this;Ts.getInstance().debugCallback("Header Layout",function(){s.layoutResult=s.doLayout(),s.saveInitColumnLeafNodes(s.layoutResult.colLeafNodes),s.spreadsheet.emit(_e.LAYOUT_AFTER_HEADER_LAYOUT,s.layoutResult)}),this.calculateCellWidthHeight(),this.calculateCornerBBox(),this.calculatePanelBBox(),this.clipPanelGroup(),this.bindEvents()},o.prototype.renderBackground=function(){var s=this.getCanvasHW(),h=this.spreadsheet.theme.background;this.backgroundGroup.addShape("rect",{attrs:{fill:h.color,opacity:h.opacity,x:0,y:0,width:s.width,height:s.height}})},o.prototype.renderScrollBars=function(){var s=this.getScrollOffset(),a=s.scrollX,u=s.scrollY,h=s.rowHeaderScrollX,v=this.panelBBox,g=v.width,y=v.height,w=this.layoutResult.colsHierarchy.width,M=this.getRealHeight();this.renderRowScrollBar(h),this.renderHScrollBar(g,w,a),this.renderVScrollBar(y,M,u)},o.prototype.renderHeaders=function(){var s=this.getSeriesNumberWidth();this.rowHeader=this.getRowHeader(),this.columnHeader=this.getColHeader(),s>0&&!this.rowIndexHeader&&(this.rowIndexHeader=this.getSeriesNumberHeader()),this.cornerHeader=this.getCornerHeader(),this.centerFrame=this.getCenterFrame(),this.rowIndexHeader&&this.foregroundGroup.add(this.rowIndexHeader),this.rowHeader&&this.foregroundGroup.add(this.rowHeader),this.foregroundGroup.add(this.columnHeader),this.foregroundGroup.add(this.cornerHeader),this.foregroundGroup.add(this.centerFrame)},o.prototype.getRowHeader=function(){var s,a,u;if(!this.rowHeader){var h=this.panelBBox,v=h.y,g=h.viewportHeight,y=h.viewportWidth,w=h.height,M=this.getSeriesNumberWidth();return new WA({width:this.cornerBBox.width,height:w,viewportWidth:y,viewportHeight:g,position:{x:0,y:v},data:this.layoutResult.rowNodes,hierarchyType:this.cfg.hierarchyType,linkFields:null!==(u=null===(a=null===(s=this.cfg.spreadsheet.options)||void 0===s?void 0:s.interaction)||void 0===a?void 0:a.linkFields)&&void 0!==u?u:[],seriesNumberWidth:M,spreadsheet:this.spreadsheet})}return this.rowHeader},o.prototype.getColHeader=function(){if(!this.columnHeader){var s=this.panelBBox;return new e2({width:s.width,cornerWidth:this.cornerBBox.width,height:this.cornerBBox.height,viewportWidth:s.viewportWidth,viewportHeight:s.viewportHeight,position:{x:s.x,y:0},data:this.layoutResult.colNodes,scrollContainsRowHeader:this.cfg.spreadsheet.isScrollContainsRowHeader(),sortParam:this.cfg.spreadsheet.store.get("sortParam"),spreadsheet:this.spreadsheet})}return this.columnHeader},o.prototype.getCornerHeader=function(){return this.cornerHeader?this.cornerHeader:YA.getCornerHeader(this.panelBBox,this.cornerBBox,this.getSeriesNumberWidth(),this.cfg,this.layoutResult,this.spreadsheet)},o.prototype.getSeriesNumberHeader=function(){return tP.getSeriesNumberHeader(this.panelBBox,this.getSeriesNumberWidth(),this.layoutResult.rowsHierarchy.getNodes(0),this.spreadsheet,this.cornerBBox.width)},o.prototype.getCenterFrame=function(){var s;if(!this.centerFrame){var a=this.panelBBox,y=null===(s=this.cfg)||void 0===s?void 0:s.frame,w={position:{x:this.cornerBBox.x,y:this.cornerBBox.y},width:this.cornerBBox.width,height:this.cornerBBox.height,viewportWidth:a.viewportWidth,viewportHeight:a.viewportHeight,showViewportLeftShadow:!1,showViewportRightShadow:!1,scrollContainsRowHeader:this.cfg.spreadsheet.isScrollContainsRowHeader(),isPivotMode:this.cfg.spreadsheet.isPivotMode(),spreadsheet:this.cfg.spreadsheet};return y?y(w):new jB(w)}return this.centerFrame},o.prototype.updatePanelScrollGroup=function(){this.gridInfo=this.getGridInfo(),this.spreadsheet.panelScrollGroup.update(this.gridInfo)},o.prototype.dynamicRenderCell=function(s){var a=this.getScrollOffset(),u=a.scrollX,v=a.rowHeaderScrollX,g=a.scrollY+this.getPaginationScrollY(),y=t2(g,this.viewCellHeights.getTotalHeight(),this.panelBBox.viewportHeight);this.spreadsheet.hideTooltip(),this.spreadsheet.interaction.clearHoverTimer(),this.realCellRender(u,y),this.updatePanelScrollGroup(),this.translateRelatedGroups(u,y,v),this.clip(u,y),s||this.emitScrollEvent({scrollX:u,scrollY:y,rowHeaderScrollX:v}),this.onAfterScroll()},o.prototype.emitScrollEvent=function(s){this.spreadsheet.emit(_e.LAYOUT_CELL_SCROLL,s),this.spreadsheet.emit(_e.GLOBAL_SCROLL,s)},o.prototype.saveInitColumnLeafNodes=function(s){void 0===s&&(s=[]);var a=this.spreadsheet,u=a.store;s.length+a.options.interaction.hiddenColumnFields.length!==u.get("initColumnLeafNodes",[]).length&&u.set("initColumnLeafNodes",s)},o.prototype.getHiddenColumnsInfo=function(s){var a=this.spreadsheet.store.get("hiddenColumnsDetail",[]);return Ke(a)?null:a.find(function(u){return u.hideColumnNodes.some(function(h){return h.id===s.id})})},o.prototype.getCornerNodes=function(){var s;return(null===(s=this.cornerHeader)||void 0===s?void 0:s.getNodes())||[]},o}(),XA=function(o){var s,a,u,h=o.facetCfg,v=o.customTreeItems,g=void 0===v?[]:v,y=o.level,w=o.parentNode,M=o.hierarchy,A=h.spreadsheet,L=h.collapsedRows,O=h.hierarchyCollapse;try{for(var D=Ma(g),k=D.next();!k.done;k=D.next()){var X=k.value,tt=X.key,ot=X.title,ft=X.collapsed,ht=X.children,pt=Zg(X,["key","title","collapsed","children"]),Wt=((u={})[Jr]=tt,u),de=Kc(w.id,ot),pe=ft??!1,ze=yr(L,de)??(O||pe),Oe=new bi({id:de,key:tt,label:ot,value:ot,level:y,parent:w,field:tt,isTotals:!1,isCollapsed:ze,hierarchy:M,query:Wt,spreadsheet:A,extra:pt});y>M.maxLevel&&(M.maxLevel=y),Ke(ht)&&(Oe.isLeaf=!0);var Ze=j1(h,w,Oe,M);!Ke(ht)&&!ze&&Ze&&XA({facetCfg:h,parentNode:Oe,level:y+1,hierarchy:M,customTreeItems:ht})}}catch(tr){s={error:tr}}finally{try{k&&!k.done&&(a=D.return)&&a.call(D)}finally{if(s)throw s.error}}},rP=(Na+_i).length,VA=function(o){var s,a,u,h,v,g,y,w=o.parentNode,M=o.currentField,A=o.level,L=o.facetCfg,O=o.hierarchy,D=o.pivotMeta,k=L.spreadsheet,tt=L.collapsedRows,ot=L.hierarchyCollapse,ft=L.rowExpandDepth,ht=w.query,pt=w.id,Wt=(null===(h=k.dataCfg.fields.rows)||void 0===h?void 0:h.length)<=A,de=(null===(v=L.dataSet?.sortedDimensionValues)||void 0===v?void 0:v[M])||[],pe=Qf(Array.from(D.keys())),Me=qp(pe,de,function(Ki){return Na===pt?Ki:Kc(pt,Ki).slice(rP)}),ze=WT(Me,L,w,M),Oe=k.store.get("drillItemsNum");Wt&&Oe>0&&(ze=ze.slice(0,Oe)),0===A&&function(o,s,a){var u=o.getTotalsConfig(s);u.showGrandTotals&&a[u.reverseLayout?"unshift":"push"](new $f(u.label,!1,!0))}(k,M,ze);try{for(var Ze=Ma(ze),tr=Ze.next();!tr.done;tr=Ze.next()){var vr=tr.value,gr=vr instanceof $f,mr=gr?null:D.get(vr),Je=void 0,Xr=ht,$r=!1,sn=!1;gr?($r=vr.isGrandTotals,sn=vr.isSubTotals,Je=gi(vr.label),Xr=ht):(Je=vr,Xr=ue(ue({},ht),((u={})[M]=Je,u)));var qn=Kc(pt,Je),fn=tt?.[qn],Zi=ga(ft)?A>ft:null,qi=null!==(g=fn??Zi)&&void 0!==g?g:ot,dn=new bi({id:qn,key:M,label:Je,value:Je,level:A,parent:w,field:M,isTotals:gr,isGrandTotals:$r,isSubTotals:sn,isCollapsed:qi,hierarchy:O,query:Xr,spreadsheet:k});A>O.maxLevel&&(O.maxLevel=A);var ri=!(null!==(y=mr?.children)&&void 0!==y&&y.size);(ri||gr)&&(dn.isLeaf=!0),ri||(dn.isTotals=!0);var mi=j1(L,w,dn,O);!ri&&!qi&&!gr&&mi&&VA({level:A+1,currentField:mr.childField,pivotMeta:mr.children,facetCfg:L,parentNode:dn,hierarchy:O})}}catch(Ki){s={error:Ki}}finally{try{tr&&!tr.done&&(a=Ze.return)&&a.call(Ze)}finally{if(s)throw s.error}}},T0=function(o){var w,M,s=o.isValueInCols,a=o.moreThanOneValue,g=o.fields;o.isRowHeader?(w=!s&&a,M=!s&&!a):(w=s&&a,M=s&&!a),XT({addTotalMeasureInTotal:w,addMeasureInTotalQuery:M,parentNode:o.rootNode,currentField:g[0],fields:g,facetCfg:o.facetCfg,hierarchy:o.hierarchy})},b0=function(o){var s=o.isRowHeader,a=o.facetCfg,u=a.spreadsheet,h=a.rows,v=void 0===h?[]:h,g=a.columns,y=void 0===g?[]:g,w=u.dataCfg.fields.valueInCols,M=u.isPivotMode(),A=a.dataSet.moreThanOneValue(),L=bi.rootNode(),O=new J1,D={isValueInCols:w,isPivotMode:M,moreThanOneValue:A,rootNode:L,hierarchy:O,spreadsheet:u,facetCfg:a,fields:s?v:y,isRowHeader:s};return s?function(o){o.spreadsheet.isHierarchyTreeType()?function(o){var s=o.facetCfg;"tree"===s.hierarchyType?VA({level:0,currentField:s.rows[0],pivotMeta:s.dataSet.rowPivotMeta,facetCfg:s,parentNode:o.rootNode,hierarchy:o.hierarchy}):function(o){var s=o.facetCfg;XA({customTreeItems:s.dataSet.fields.customTreeItems,facetCfg:s,level:0,parentNode:o.rootNode,hierarchy:o.hierarchy})}(o)}(o):T0(o)}(D):function(o){var a=o.hierarchy,u=o.rootNode,h=o.facetCfg;o.isPivotMode?T0(o):function(o){var s=o.facetCfg,a=s.columns,h=s.spreadsheet.store.get("hiddenColumnsDetail"),v=s?.showSeriesNumber,w=Be([],Ae(Bu(a).filter(function(L){return!h||h.every(function(O){return O.hideColumnNodes.every(function(D){return D.field!==L})})})),!1),M=Be([],Ae(a),!1),A={};v&&(M.unshift({key:rc}),A[rc]=!0),w.reduce(function(L,O){return L[O]=!0,L},A),$T(Zo(M,A),o,0,null)}({parentNode:u,hierarchy:a,facetCfg:h})}(D),{hierarchy:O,leafNodes:s&&u.isHierarchyTreeType()?O.getNodes():O.getLeaves()}},mv=function(o){function s(){return null!==o&&o.apply(this,arguments)||this}return Ir(s,o),Object.defineProperty(s.prototype,"rowCellTheme",{get:function(){return this.spreadsheet.theme.rowCell.cell},enumerable:!1,configurable:!0}),s.prototype.doLayout=function(){var a=b0({isRowHeader:!0,facetCfg:this.cfg}),u=a.leafNodes,h=a.hierarchy,v=b0({isRowHeader:!1,facetCfg:this.cfg}),g=v.leafNodes,y=v.hierarchy;this.calculateNodesCoordinate(u,h,g,y);var w=this.cfg,M=w.dataSet,A=w.spreadsheet,O={colNodes:y.getNodes(),colsHierarchy:y,rowNodes:h.getNodes(),rowsHierarchy:h,rowLeafNodes:u,colLeafNodes:g,getCellMeta:function(D,k){var X,tt,ot,ft=D||0,ht=k||0,pt=u[ft],Wt=g[ht];if(!pt||!Wt)return null;var gr,de=pt.query,pe=Wt.query,Me=pt.isTotals||pt.isTotalMeasure||Wt.isTotals||Wt.isTotalMeasure,ze=A.options.hierarchyType,Ze=null!==(tt=yr(A,"facet.cfg.colCfg.hideMeasureColumn"))&&void 0!==tt&&tt&&"customTree"!==ze?((X={})[Jr]=null===(ot=M.fields.values)||void 0===ot?void 0:ot[0],X):{},tr=If({},de,pe,Ze),vr=M.getCellData({query:tr,rowNode:pt,isTotals:Me}),mr=null;return Ke(vr)?gr=yr(tr,[Jr],""):(gr=yr(vr,[Jr],""),mr=yr(vr,[no],null),Me&&(gr=yr(tr,[Jr],""),mr=yr(vr,gr,null))),{spreadsheet:A,x:Wt.x,y:pt.y,width:Wt.width,height:pt.height,data:vr,rowIndex:ft,colIndex:ht,isTotals:Me,valueField:gr,fieldValue:mr,rowQuery:de,colQuery:pe,rowId:pt.id,colId:Wt.id,id:nv(pt.id,Wt.id)}},spreadsheet:A};return function(o,s){var a=o?.layoutDataPosition;if(a){var h=a(o.spreadsheet,s.getCellMeta);return ue(ue({},s),{getCellMeta:h})}return s}(this.cfg,O)},s.prototype.calculateNodesCoordinate=function(a,u,h,v){this.calculateRowNodesCoordinate(a,u,h),this.calculateColNodesCoordinate(h,v,a,u.width)},s.prototype.calculateColNodesCoordinate=function(a,u,h,v){var g,y,w,M,A=bi.blankNode(),L=u.getNodes();try{for(var O=Ma(u.sampleNodesForAllLevels),D=O.next();!D.done;D=O.next()){var k=D.value;k.height=this.getColNodeHeight(k),u.height+=k.height}}catch(ht){g={error:ht}}finally{try{D&&!D.done&&(y=O.return)&&y.call(O)}finally{if(g)throw g.error}}for(var X=0,tt=function(ht){var pt=L[ht];if(pt.isLeaf&&(pt.colIndex=X,X+=1,pt.x=A.x+A.width,pt.width=ot.calculateColLeafNodesWidth(pt,a,h,v),u.width+=pt.width,A=pt),0===pt.level)pt.y=0;else{var Wt=u.sampleNodesForAllLevels.find(function(de){return de.level===pt.level-1});pt.y=null!==(w=Wt?.y+Wt?.height)&&void 0!==w?w:0}pt.height=pt.isGrandTotals&&pt.isLeaf?u.height:ot.getColNodeHeight(pt),tx(ot.cfg,null,pt)},ot=this,ft=0;ftOe&&(ze=Je,Oe=Xr)}}}var $r=Me>Oe,sn=$r?de:ze,Nr=$r?pe:0;return Ts.getInstance().logger("Max Label In Col:",a.field,sn),this.spreadsheet.measureTextWidth(sn,ft)+(null===(M=ht.padding)||void 0===M?void 0:M.left)+(null===(A=ht.padding)||void 0===A?void 0:A.right)+Nr}return this.spreadsheet.isHierarchyTreeType()?this.getAdaptTreeColWidth(a,u,h):this.getAdaptGridColWidth(u,v)},s.prototype.getColNodeHeight=function(a){var u=this.cfg.colCfg;return yr(u,"heightByField.".concat(a.key))??u?.height},s.prototype.getExpectedCellIconWidth=function(a,u,h){var v,g=0;return(g=u?1:null!==(v=Lx(cn(this.spreadsheet.options.headerActionIcons,function(w){return ue(ue({},w),{displayCondition:function(){return!0}})}),null,a)?.iconNames.length)&&void 0!==v?v:0)?g*(h.size+h.margin.left)+h.margin.right:0},s.prototype.calculateRowNodesCoordinate=function(a,u,h){var v,g,y,w,M,A,L,O,D,k,X=this.cfg,tt=X.cellCfg,ot=X.spreadsheet,ft=ot.isHierarchyTreeType(),ht=yr(ot,"options.style.rowCfg.heightByField",{}),pt=null!==(y=u.sampleNodesForAllLevels)&&void 0!==y?y:[];if(ft)u.width=this.getTreeRowHeaderWidth();else try{for(var Wt=Ma(u.sampleNodesForAllLevels),de=Wt.next();!de.done;de=Wt.next()){var pe=de.value;pe.width=this.calculateGridRowNodesWidth(pe,h),u.width+=pe.width;var Me=null!==(w=pt[pe.level-1])&&void 0!==w?w:{x:0,width:0};pe.x=Me?.x+Me?.width}}catch(mr){v={error:mr}}finally{try{de&&!de.done&&(g=Wt.return)&&g.call(Wt)}finally{if(v)throw v.error}}for(var ze=bi.blankNode(),Oe=u.getNodes(),Ze=0;Ze1||w<=1&&!y){var L=null!==(v=null===(h=A?.[0])||void 0===h?void 0:h.height)&&void 0!==v?v:0;M.height=a.height-L;var O=null===(g=ai(a.getNodes(w),function(D){return!D.isTotalMeasure}))||void 0===g?void 0:g.y;br(A,function(D){D.y=O})}}},s.prototype.adjustSubTotalNodesCoordinate=function(a,u){var h=a.getNodes().filter(function(g){return g.isSubTotals});if(!Ke(h)){var v=a.maxLevel;br(h,function(g){var y,w,M,A=g.children;if(u)g.width=Jx(a.sampleNodesForAllLevels,g.level,"width"),br(A,function(k){k.x=a.getNodes(v)[0].x});else{var L=Jx(a.sampleNodesForAllLevels,g.level,"height"),O=null!==(w=null===(y=A?.[0])||void 0===y?void 0:y.height)&&void 0!==w?w:0;g.height=L-O,br(A,function(k){k.y=a.getNodes(v)[0].y});var D=null===(M=ai(a.getNodes(v),function(k){return!k.isTotalMeasure}))||void 0===M?void 0:M.y;br(A,function(k){k.y=D})}})}},s.prototype.calculateGridRowNodesWidth=function(a,u){var h=this.cfg,v=h.rowCfg,g=h.spreadsheet,y=yr(v,"widthByField.".concat(a.key));if(ga(y))return y;var w=this.getCellCustomWidth(a,v?.width);return ga(w)?w:g.getLayoutWidthType()!==li.Adaptive?this.getCompactGridRowWidth(a):this.getAdaptGridColWidth(u)},s.prototype.getAdaptTreeColWidth=function(a,u,h){var g=this.getCanvasHW().width-this.getSeriesNumberWidth(),y=Math.min(g/2,this.getTreeRowHeaderWidth()),w=Math.max(1,u.length);return Math.max(xx(this.cfg.cellCfg,this.getColLabelLength(a,h)),(g-y)/w)},s.prototype.getColLabelLength=function(a,u){var h,v=function(o){try{return JSON.parse(o)}catch{return null}}(a?.value);if(Mr(v))return v.length;for(var g=1,y=0;y<50;y++){var w=u[y];if(!w)return g;for(var M=this.cfg.dataSet.getCellData({query:ue(ue({},a.query),w.query),rowNode:w,isTotals:a.isTotals||a.isTotalMeasure||w.isTotals||w.isTotalMeasure}),A=vn(M),L=0;Lg&&(g=D)}}return g},s.prototype.getAdaptGridColWidth=function(a,u){var h=this.cfg,g=h.cellCfg,y=h.rows.length,w=a.length,A=this.getCanvasHW().width-this.getSeriesNumberWidth(),L=Math.max(1,y+w);return u?Math.max(xx(g),(A-u)/w):Math.max(xx(g),A/L)},s.prototype.getTreeRowHeaderWidth=function(){var a,u,h,v,g=this.cfg,y=g.rows,w=g.dataSet,M=g.rowCfg,L=g.treeRowsWidth??M?.treeRowsWidth;if(L)return L;var O=this.getCellCustomWidth(null,M?.width);if(O)return O;var D=y.map(function(ft){return w.getFieldName(ft)}).join("/"),k=this.spreadsheet.theme.cornerCell,tt=k.icon,ot=this.spreadsheet.measureTextWidth(D,k.bolderText)+2*tt.size+(null===(a=tt.margin)||void 0===a?void 0:a.left)+(null===(u=tt.margin)||void 0===u?void 0:u.right)+(null===(h=this.rowCellTheme.padding)||void 0===h?void 0:h.left)+(null===(v=this.rowCellTheme.padding)||void 0===v?void 0:v.right);return Math.max(L??120,ot)},s.prototype.getCompactGridRowWidth=function(a){var h,u=this,v=this.cfg,g=v.dataSet,y=v.spreadsheet,w=y.theme.rowCell,M=w.bolderText,A=w.icon,L=w.cell,O=y.theme.cornerCell,D=O.bolderText,k=O.icon,X=O.cell,tt=a.field,ot=a.isLeaf,ft=this.getExpectedCellIconWidth(Ue.ROW_CELL,!y.isValueInCols()&&ot&&y.options.showDefaultHeaderActionIcon,A),pt=jm(null===(h=g.getDimensionValues(tt))||void 0===h?void 0:h.slice(0,50).map(function(ze){var Oe,Ze;return null!==(Ze=null===(Oe=u.spreadsheet.dataSet.getFieldFormatter(tt))||void 0===Oe?void 0:Oe(ze))&&void 0!==Ze?Ze:ze}),function(ze){return"".concat(ze).length}),Wt=y.measureTextWidth(pt,M)+ft+L.padding.left+L.padding.right,de=g.getFieldName(tt),pe=this.getExpectedCellIconWidth(Ue.CORNER_CELL,!1,k),Me=y.measureTextWidth(de,D)+pe+X.padding.left+X.padding.right;return Ts.getInstance().logger("Max Label In Row:",tt,Wt>Me?pt:de),Math.max(Wt,Me)},s.prototype.getViewCellHeights=function(a){var h=ws(a.rowLeafNodes,function(v,g){return v.push(_n(v)+g.height),v},[0]);return{getTotalHeight:function(){return _n(h)},getCellOffsetY:function(v){return h[v]},getTotalLength:function(){return h.length-1},getIndexRange:function(v,g){return pv(h,v,g)}}},s}(UA),ZA=function(o){function s(a){var h,u=this;(u=o.call(this,a)||this).getScrollGroupClipBBox=function(){var w,M=u.headerConfig,A=M.width,L=M.height,O=M.scrollX,D=M.spreadsheet,k=D.options;if(!k.frozenColCount&&!k.frozenTrailingColCount)return{x:O,y:0,width:A,height:L};for(var X=null===(w=D.facet)||void 0===w?void 0:w.layoutResult.colLeafNodes,tt=bs(D.options,X.length),ot=tt.frozenColCount,ft=tt.frozenTrailingColCount,ht=0,pt=0,Wt=0;Wt0&&(Ai(Ze,{x1:gr=X.reduce(function($r,sn,Nr){return Nr0?L:D)},ue({},tr)),Oe.showShadow&&g>0&&Ze.addShape("rect",{attrs:{x:gr,y:k,width:Oe.shadowWidth,height:mr,fill:h.getShadowFill(0)}})),ht>0&&(Ai(Ze,{x1:0,x2:Xr=Wt>0?A:O,y1:Je=k+h.getTotalHeightForRange(tt.start,tt.start+ht-1),y2:Je},ue({},vr)),Oe.showShadow&&pe>0&&Ze.addShape("rect",{attrs:{x:0,y:Je,width:Xr,height:Oe.shadowWidth,fill:h.getShadowFill(90)}})),Wt>0&&(Ai(Ze,{x1:gr=X[X.length-Wt].x,x2:gr,y1:k,y2:k+(mr=de?L:D)},ue({},tr)),Oe.showShadow&&Math.floor(g)0&&(Ai(Ze,{x1:0,x2:Xr=Wt>0?A:O,y1:Je=h.panelBBox.maxY-h.getTotalHeightForRange(tt.end-de+1,tt.end),y2:Je},ue({},vr)),Oe.showShadow&&pe0){var de=ja(ht,0,pt).trailingColCount,pe=L.filter(function(Me){return Me.isLeaf});for(ot=1;ot<=de;ot++){var ft;(ft=pe[pe.length-ot]).x=1===ot?Wt-ft.width:A.x-ft.width,A=ft}}this.autoCalculateColNodeWidthAndX(a)},s.prototype.autoCalculateColNodeWidthAndX=function(a){for(var u=null,h=a.slice(0);h.length;){var g=h.shift().parent;u!==g&&g&&(h.push(g),g.x=g.children[0].x,g.width=g.children.map(function(y){return y.width}).reduce(function(y,w){return y+w},0),u=g)}},s.prototype.calculateColLeafNodesWidth=function(a,u){var h=this.cfg,v=h.colCfg,g=h.dataSet,y=h.spreadsheet,w=this.spreadsheet.getLayoutWidthType(),M=this.getCellDraggedWidth(a);if(ga(M))return M;var L,A=this.getCellCustomWidth(a,v?.width);if(ga(A))return A;if(w===li.Compact){var O=g.getDisplayDataSet(),D=g.getFieldFormatter(a.field),k=jm(O?.slice(0,50).map(function(de){var pe;return"".concat(null!==(pe=D?.(de[a.field]))&&void 0!==pe?pe:de[a.field])}),function(de){return y.measureTextWidthRoughly(de)});Ts.getInstance().logger("Max Label In Col:",a.field,k);var X=y.theme.colCell.bolderText,tt=y.theme.dataCell,ft=tt.cell,pt=y.measureTextWidth(k,tt.text)+ft.padding.left+ft.padding.right+1,Wt=y.measureTextWidth(a.label,X)+function(o,s,a){var u=yr(a,"cell.padding"),h=aA(o,s.field,a);return u.left+u.right+function(o,s,a,u){var h,v,w,g=yr(u,"size"),y=yr(u,"margin");return(w=o.options.showDefaultHeaderActionIcon?1:null!==(v=null===(h=Lx(o.options.headerActionIcons,s,a))||void 0===h?void 0:h.iconNames.length)&&void 0!==v?v:0)*(g+y.left)+(w>0?y.right:0)}(o,s,Ue.COL_CELL,yr(a,"icon"))+h.left+h.right}(this.spreadsheet,a,y.theme.colCell);L=Math.max(Wt,pt)}else L=u;return a.field===rc&&(L=this.getSeriesNumberWidth()),L},s.prototype.getDefaultCellHeight=function(){return this.cfg.cellCfg?.height},s.prototype.getCellHeight=function(a){if(this.rowOffsets){var h=yr(this.spreadsheet,"options.style.rowCfg.heightByField",{})?.[String(a)];if(ga(h))return h}return this.getDefaultCellHeight()},s.prototype.initRowOffsets=function(){var a=this,u=this.cfg.dataSet,h=yr(this.spreadsheet,"options.style.rowCfg.heightByField",{});if(Object.keys(h).length){var v=u.getDisplayDataSet();this.rowOffsets=[0];var g=0;v.forEach(function(y,w){var M,A=null!==(M=h?.[String(w)])&&void 0!==M?M:a.getDefaultCellHeight(),L=g+A;a.rowOffsets.push(L),g=L})}},s.prototype.getViewCellHeights=function(){var a=this,u=this.cfg.dataSet;this.initRowOffsets();var h=this.getDefaultCellHeight();return{getTotalHeight:function(){return a.rowOffsets?_n(a.rowOffsets):h*u.getDisplayDataSet().length},getCellOffsetY:function(v){if(v<=0)return 0;if(a.rowOffsets)return a.rowOffsets[v];for(var g=0,y=0;y0&&(L.width=y[u-1].x+y[u-1].width-0,L.range=[0,u-1]),h>0&&(D.height=w.getCellOffsetY(M.start+h)-w.getCellOffsetY(M.start),D.range=[M.start,M.start+h-1]),v>0&&(O.width=y[y.length-1].x-y[y.length-v].x+y[y.length-1].width,O.range=[y.length-v,y.length-1]),g>0&&(k.height=w.getCellOffsetY(M.end+1)-w.getCellOffsetY(M.end+1-g),k.range=[M.end-g+1,M.end])},s.prototype.getRowHeader=function(){return null},s.prototype.getSeriesNumberHeader=function(){return null},s.prototype.translateRelatedGroups=function(a,u,h){var v=this,g=this.spreadsheet,y=g.frozenColGroup,w=g.frozenTrailingColGroup;[g.frozenRowGroup,g.frozenTrailingRowGroup].forEach(function(L){nx(L,v.cornerBBox.width-a)}),[y,w].forEach(function(L){!function(o,s){var a,u=o?.getMatrix(),h=null!==(a=u?.[7])&&void 0!==a?a:0;o?.translate(0,s-h)}(L,v.cornerBBox.height-u)}),o.prototype.translateRelatedGroups.call(this,a,u,h),this.updateRowResizeArea(),this.renderFrozenGroupSplitLine(a,u)},s.prototype.calculateXYIndexes=function(a,u){var h=this.layoutResult.colLeafNodes.length,v=this.getCellRange(),g=this.panelBBox,y=g.viewportHeight,w=g.viewportWidth,M=this.getFrozenOptions(),A=M.frozenColCount,L=M.frozenRowCount,O=M.frozenTrailingColCount,D=M.frozenTrailingRowCount,k={width:w,height:y,x:0,y:0};if(O>0||A>0){var X=this.frozenGroupInfo,ot=X.frozenCol;k.width-=X.frozenTrailingCol.width+ot.width,k.x+=ot.width}if(D>0||L>0){var ft=this.frozenGroupInfo,ht=ft.frozenRow,pt=ft.frozenTrailingRow;k.height0&&v.push(L)});var g=s.getChildren(),y=function(o){return cn(o,function(s){return{cells:s.cells,viewMeta:s.getMeta()}})}(g),w=Pb(y,v),M=Pb(v,y);br(w,function(A){ai(g,function(O){return Vi(O.getMeta().id,A.viewMeta.id)})?.remove(!0)}),br(M,function(A){s.add(Tx(o,A.cells,A.viewMeta))})}}}(this.s2,this.mergedCellsGroup),this.mergedCellsGroup.toFront()},s.prototype.addMergeCell=function(a){var u;null===(u=this.mergedCellsGroup)||void 0===u||u.add(a)},s.prototype.update=function(a){this.updateGrid(a),this.updateMergedCells()},s}(qA),To=function(){function o(s){var a=this;this.isLinkFieldText=function(u){return a.getCellAppendInfo(u)?.isLinkFieldText},this.spreadsheet=s,this.bindEvents()}return o.prototype.getCellAppendInfo=function(s){var a,u;return(null===(a=s?.attr)||void 0===a?void 0:a.call(s,"appendInfo"))||(null===(u=s?.attrs)||void 0===u?void 0:u.appendInfo)||{}},o.prototype.reset=function(){},o}(),sP=function(o){function s(){return null!==o&&o.apply(this,arguments)||this}return Ir(s,o),s.prototype.bindEvents=function(){this.bindDataCellClick()},s.prototype.bindDataCellClick=function(){var a=this;this.spreadsheet.on(_e.DATA_CELL_CLICK,function(u){var h;u.stopPropagation();var v=a.spreadsheet.interaction;if(v.clearHoverTimer(),!v.hasIntercepts([Lr.CLICK])){if(a.isLinkFieldText(u.target))return void a.emitLinkFieldClickEvent(u);var g=a.spreadsheet.getCell(u.target),y=g.getMeta();if(y){if(v.addIntercepts([Lr.HOVER]),v.isSelectedCell(g))return void(1===(null===(h=u.originalEvent)||void 0===h?void 0:h.detail)&&v.reset());v.changeState({cells:[xo(g)],stateName:pr.SELECTED,onUpdateCells:zx}),a.spreadsheet.emit(_e.GLOBAL_SELECTED,[g]),a.showTooltip(u,y)}}})},s.prototype.getTooltipOperator=function(a,u){var h=this,v={key:"trend",text:gi("\u8d8b\u52bf"),icon:"Trend"},g=this.spreadsheet.getCell(a.target),y=w0(this.spreadsheet,a).operation,w=y.trend&&ue(ue({},v),{onClick:function(){h.spreadsheet.emit(_e.DATA_CELL_TREND_ICON_CLICK,ue(ue({},u),{record:h.spreadsheet.isTableMode()?h.spreadsheet.dataSet.getCellData({query:{rowIndex:u.rowIndex}}):void 0})),h.spreadsheet.hideTooltip()}});return DA(y,{defaultMenus:[w],cell:g})},s.prototype.showTooltip=function(a,u){var v=u.isTotals,g=void 0!==v&&v,y=u.value,w=u.fieldValue,M=u.field,A=u.valueField,L=u.data,O=this.spreadsheet.isTableMode(),k=[(O?ue(ue({},L),{value:y||w,valueField:M||A}):L)||ue(ue({},u.rowQuery),u.colQuery)],X=this.getTooltipOperator(a,u);this.spreadsheet.showTooltipWithInfo(a,k,{isTotals:g,operator:X,enterable:!0,hideSummary:!0,showSingleTips:O})},s.prototype.emitLinkFieldClickEvent=function(a){var u=this.getCellAppendInfo(a.target).cellData;this.spreadsheet.emit(_e.GLOBAL_LINK_FIELD_JUMP,{key:u.valueField,cellData:u,record:Object.assign({rowIndex:u.rowIndex},u.data)})},s}(To),lP=function(o){function s(){return null!==o&&o.apply(this,arguments)||this}return Ir(s,o),s.prototype.bindEvents=function(){this.bindDataCellClick()},s.prototype.bindDataCellClick=function(){var a=this;this.spreadsheet.on(_e.MERGED_CELLS_CLICK,function(u){u.stopPropagation();var h=a.spreadsheet.interaction;h.hasIntercepts([Lr.CLICK])||h.addIntercepts([Lr.HOVER])})},s}(To),uP=function(o){function s(){var a=null!==o&&o.apply(this,arguments)||this;return a.isMultiSelection=!1,a.handleRowColClick=function(u){if(u.stopPropagation(),!a.isLinkFieldText(u.target)){var h=a.spreadsheet,v=h.interaction,g=h.options,y=a.spreadsheet.getCell(u.target);v.selectHeaderCell({cell:y,isMultiSelection:!(!g.interaction.multiSelection||!a.isMultiSelection)})&&a.showTooltip(u)}},a.getHideColumnField=function(u){return a.spreadsheet.isTableMode()?u.field:u.id},a}return Ir(s,o),s.prototype.bindEvents=function(){this.bindKeyboardDown(),this.bindKeyboardUp(),this.bindColCellClick(),this.bindRowCellClick(),this.bindTableColExpand()},s.prototype.bindKeyboardDown=function(){var a=this;this.spreadsheet.on(_e.GLOBAL_KEYBOARD_DOWN,function(u){v0(u)&&(a.isMultiSelection=!0)})},s.prototype.bindKeyboardUp=function(){var a=this;this.spreadsheet.on(_e.GLOBAL_KEYBOARD_UP,function(u){v0(u)&&(a.isMultiSelection=!1,a.spreadsheet.interaction.removeIntercepts([Lr.CLICK]))})},s.prototype.bindRowCellClick=function(){var a=this;this.spreadsheet.on(_e.ROW_CELL_CLICK,function(u){a.handleRowColClick(u)})},s.prototype.bindColCellClick=function(){var a=this;this.spreadsheet.on(_e.COL_CELL_CLICK,function(u){a.handleRowColClick(u)})},s.prototype.showTooltip=function(a){var u=w0(this.spreadsheet,a),h=u.operation;if(u.showTooltip){var g=this.spreadsheet.interaction,y=g.isSelectedState()?function(o){return cn(o,function(s){var a=s.getMeta();return af({},a.query||{},f1(a,["colIndex","rowIndex"]))})}(g.getActiveCells()):[],w=this.getTooltipOperator(a,h);this.spreadsheet.showTooltipWithInfo(a,y,{showSingleTips:!0,operator:w})}},s.prototype.getTooltipOperator=function(a,u){var h=this,v=this.spreadsheet.getCell(a.target),g=v.getMeta(),y=v.cellType===Ue.COL_CELL,w=1===this.spreadsheet.getColumnLeafNodes().length,M={key:"hiddenColumns",text:gi("\u9690\u85cf"),icon:"EyeOutlined"},L=y&&!w&&g.isLeaf&&u.hiddenColumns&&ue(ue({},M),{onClick:function(){h.hideSelectedColumns()}});return DA(u,{defaultMenus:[L],cell:v})},s.prototype.bindTableColExpand=function(){var a=this;this.spreadsheet.on(_e.LAYOUT_COLS_EXPANDED,function(u){a.handleExpandIconClick(u)})},s.prototype.hideSelectedColumns=function(){var h=this.spreadsheet.interaction.getActiveCells().map(function(v){return v.getMeta()}).map(this.getHideColumnField);bx(this.spreadsheet,h,!0)},s.prototype.handleExpandIconClick=function(a){var u=this.spreadsheet.store.get("hiddenColumnsDetail",[]),h=(u.find(function(A){return Ax(A.displaySiblingNode,a.id)})||{}).hideColumnNodes,g=this.spreadsheet.options.interaction.hiddenColumnFields,y=(void 0===h?[]:h).map(this.getHideColumnField),w=ll(g,y),M=u.filter(function(A){return!Ax(A.displaySiblingNode,a.id)});this.spreadsheet.setOptions({interaction:{hiddenColumnFields:w}}),this.spreadsheet.store.set("hiddenColumnsDetail",M),this.spreadsheet.interaction.reset(),this.spreadsheet.render(!1)},s}(To),cP=function(o){function s(){var a=null!==o&&o.apply(this,arguments)||this;return a.getRowData=function(u){var h,v=u.getHeadLeafChild(),g=a.spreadsheet.dataSet.getMultiData(v?.query,v?.isTotals,!0)[0];return ue(ue({},g),{rowIndex:null!==(h=u.rowIndex)&&void 0!==h?h:v.rowIndex})},a}return Ir(s,o),s.prototype.bindEvents=function(){this.bindRowCellClick()},s.prototype.bindRowCellClick=function(){var a=this;this.spreadsheet.on(_e.ROW_CELL_CLICK,function(u){if(!a.spreadsheet.interaction.hasIntercepts([Lr.CLICK])&&a.isLinkFieldText(u.target)){var h=a.getCellAppendInfo(u.target).cellData,v=h.key,g=a.getRowData(h);a.spreadsheet.emit(_e.GLOBAL_LINK_FIELD_JUMP,{key:v,cellData:h,record:g})}})},s}(To),hP=function(o){function s(){return null!==o&&o.apply(this,arguments)||this}return Ir(s,o),s.prototype.bindEvents=function(){this.bindCornerCellClick()},s.prototype.bindCornerCellClick=function(){var a=this;this.spreadsheet.on(_e.CORNER_CELL_CLICK,function(u){var h,v=a.spreadsheet.interaction,g=a.spreadsheet.getCell(u.target);if(g){var y=g.getMeta(),w=a.getRowNodesByField(y?.field),M=null===(h=w[0])||void 0===h?void 0:h.belongsCell,A=a.getRowCells(w);if(M&&v.isSelectedCell(M))return v.reset(),void a.spreadsheet.emit(_e.GLOBAL_SELECTED,v.getActiveCells());Ke(w)||Ke(A)||(v.addIntercepts([Lr.HOVER]),v.changeState({cells:A,stateName:pr.SELECTED}),v.highlightNodes(w),a.showTooltip(u),a.spreadsheet.emit(_e.GLOBAL_SELECTED,v.getActiveCells()))}})},s.prototype.getRowNodesByField=function(a){return this.spreadsheet.getRowNodes().filter(function(u){return u.field===a})},s.prototype.getRowCells=function(a){return a.map(function(u){return{id:u.id,colIndex:-1,rowIndex:-1,type:Ue.ROW_CELL}})},s.prototype.showTooltip=function(a){var u=this.spreadsheet.interaction.getActiveCells();this.spreadsheet.showTooltipWithInfo(a,[],{data:{summaries:[{selectedData:u,name:"",value:null}]}})},s}(To),fP=function(o){function s(){return null!==o&&o.apply(this,arguments)||this}return Ir(s,o),s.prototype.bindEvents=function(){this.bindCornerCellHover(),this.bindDataCellHover(),this.bindRowCellHover(),this.bindColCellHover()},s.prototype.updateRowColCells=function(a){var u=a.rowId,v=this.spreadsheet.interaction;(function(o,s,a){o&&br(Es(o,s),function(h){h.updateByState(a)})})(a.colId,v.getAllColHeaderCells(),pr.HOVER),u&&br(Es(u,v.getAllRowHeaderCells(),this.spreadsheet.isHierarchyTreeType()),function(y){y.updateByState(pr.HOVER)})},s.prototype.changeStateToHoverFocus=function(a,u,h){var g,v=this,y=this.spreadsheet.interaction,w=this.spreadsheet.options.interaction,M=w.hoverFocus;y.clearHoverTimer();var A=function(){if(!y.hasIntercepts([Lr.HOVER])){y.changeState({cells:[xo(a)],stateName:pr.HOVER_FOCUS});var D=v.spreadsheet.isTableMode(),k={isTotals:h.isTotals,enterable:!0,hideSummary:!0,showSingleTips:D};w.hoverHighlight&&v.updateRowColCells(h);var X=v.getCellData(h,D);v.spreadsheet.showTooltipWithInfo(u,X,k)}},L=800;if(hl(M)||(L=null!==(g=M?.duration)&&void 0!==g?g:800),0===L)A();else{var O=window.setTimeout(function(){return A()},L);y.setHoverTimer(O)}},s.prototype.handleHeaderHover=function(a){var u=this.spreadsheet.getCell(a.target);if(!Ke(u)){var h=this.spreadsheet.interaction;h.clearHoverTimer(),!h.isActiveCell(u)&&(h.changeState({cells:[xo(u)],stateName:pr.HOVER}),u.update(),this.showEllipsisTooltip(a,u))}},s.prototype.showEllipsisTooltip=function(a,u){if(u&&u.getActualText()!==u.getFieldValue()){var h=u.getMeta(),g={isTotals:h.isTotals,enterable:!0,hideSummary:!0,showSingleTips:!0,enableFormat:this.spreadsheet.isPivotMode()},y=this.getCellData(h,!0);this.spreadsheet.showTooltipWithInfo(a,y,g)}},s.prototype.getCellData=function(a,u){void 0===a&&(a={});var g=a.value,y=a.field,w=a.fieldValue,M=a.valueField,A=a.rowQuery,L=a.colQuery,O=a.data;return u?[ue(ue({},a.query),{value:g||w,valueField:y||M})]:[O||ue(ue({},A),L)]},s.prototype.bindDataCellHover=function(){var a=this;this.spreadsheet.on(_e.DATA_CELL_HOVER,function(u){var h=a.spreadsheet.getCell(u.target);if(!Ke(h)){var v=a.spreadsheet,g=v.interaction,w=v.options.interaction,M=h?.getMeta();g.isActiveCell(h)||(g.changeState({cells:[xo(h)],stateName:pr.HOVER}),w.hoverHighlight&&a.updateRowColCells(M),w.hoverFocus&&a.changeStateToHoverFocus(h,u,M))}})},s.prototype.bindRowCellHover=function(){var a=this;this.spreadsheet.on(_e.ROW_CELL_HOVER,function(u){a.handleHeaderHover(u)})},s.prototype.bindColCellHover=function(){var a=this;this.spreadsheet.on(_e.COL_CELL_HOVER,function(u){a.handleHeaderHover(u)})},s.prototype.bindCornerCellHover=function(){var a=this;this.spreadsheet.on(_e.CORNER_CELL_HOVER,function(u){var h=a.spreadsheet.getCell(u.target);a.showEllipsisTooltip(u,h)})},s}(To),vP=function(){function o(s){var a=this;this.canvasEventHandlers=[],this.s2EventHandlers=[],this.domEventListeners=[],this.isCanvasEffect=!1,this.isGuiIconShape=function(u){return u instanceof lC&&u.attrs.type===ml.type},this.onCanvasMousedown=function(u){if(a.target=u.target,a.spreadsheet.interaction.clearHoverTimer(),a.isResizeArea(u)){a.spreadsheet.emit(_e.LAYOUT_RESIZE_MOUSE_DOWN,u);var h=function(g){if(!a.spreadsheet.getCanvasElement())return!1;a.spreadsheet.getCanvasElement()!==g.target&&(u.clientX=g.clientX,u.clientY=g.clientY,u.originalEvent=g,a.spreadsheet.emit(_e.LAYOUT_RESIZE_MOUSE_MOVE,u))};return window.addEventListener("mousemove",h),void window.addEventListener("mouseup",function(){window.removeEventListener("mousemove",h)},{once:!0})}switch(a.spreadsheet.getCellType(u.target)){case Ue.DATA_CELL:a.spreadsheet.emit(_e.DATA_CELL_MOUSE_DOWN,u);break;case Ue.ROW_CELL:a.spreadsheet.emit(_e.ROW_CELL_MOUSE_DOWN,u);break;case Ue.COL_CELL:a.spreadsheet.emit(_e.COL_CELL_MOUSE_DOWN,u);break;case Ue.CORNER_CELL:a.spreadsheet.emit(_e.CORNER_CELL_MOUSE_DOWN,u);break;case Ue.MERGED_CELL:a.spreadsheet.emit(_e.MERGED_CELLS_MOUSE_DOWN,u)}},this.onCanvasMousemove=function(u){if(a.isResizeArea(u))return a.activeResizeArea(u),void a.spreadsheet.emit(_e.LAYOUT_RESIZE_MOUSE_MOVE,u);a.resetResizeArea();var h=a.spreadsheet.getCell(u.target);if(h){var v=h.cellType;switch(v){case Ue.DATA_CELL:a.spreadsheet.emit(_e.DATA_CELL_MOUSE_MOVE,u);break;case Ue.ROW_CELL:a.spreadsheet.emit(_e.ROW_CELL_MOUSE_MOVE,u);break;case Ue.COL_CELL:a.spreadsheet.emit(_e.COL_CELL_MOUSE_MOVE,u);break;case Ue.CORNER_CELL:a.spreadsheet.emit(_e.CORNER_CELL_MOUSE_MOVE,u);break;case Ue.MERGED_CELL:a.spreadsheet.emit(_e.MERGED_CELLS_MOUSE_MOVE,u)}if(!a.hasBrushSelectionIntercepts())switch(a.spreadsheet.emit(_e.GLOBAL_HOVER,u),v){case Ue.DATA_CELL:a.spreadsheet.emit(_e.DATA_CELL_HOVER,u);break;case Ue.ROW_CELL:a.spreadsheet.emit(_e.ROW_CELL_HOVER,u);break;case Ue.COL_CELL:a.spreadsheet.emit(_e.COL_CELL_HOVER,u);break;case Ue.CORNER_CELL:a.spreadsheet.emit(_e.CORNER_CELL_HOVER,u);break;case Ue.MERGED_CELL:a.spreadsheet.emit(_e.MERGED_CELLS_HOVER,u)}}},this.onCanvasMouseup=function(u){if(a.isResizeArea(u))a.spreadsheet.emit(_e.LAYOUT_RESIZE_MOUSE_UP,u);else{var h=a.spreadsheet.getCell(u.target);if(h){var v=h.cellType;if(a.target===u.target){var g=a.isGuiIconShape(u.target);switch(v){case Ue.DATA_CELL:a.spreadsheet.emit(_e.DATA_CELL_CLICK,u);break;case Ue.ROW_CELL:if(g)break;a.spreadsheet.emit(_e.ROW_CELL_CLICK,u);break;case Ue.COL_CELL:if(g)break;a.spreadsheet.emit(_e.COL_CELL_CLICK,u);break;case Ue.CORNER_CELL:if(g)break;a.spreadsheet.emit(_e.CORNER_CELL_CLICK,u);break;case Ue.MERGED_CELL:a.spreadsheet.emit(_e.MERGED_CELLS_CLICK,u)}}switch(v){case Ue.DATA_CELL:a.spreadsheet.emit(_e.DATA_CELL_MOUSE_UP,u);break;case Ue.ROW_CELL:a.spreadsheet.emit(_e.ROW_CELL_MOUSE_UP,u);break;case Ue.COL_CELL:a.spreadsheet.emit(_e.COL_CELL_MOUSE_UP,u);break;case Ue.CORNER_CELL:a.spreadsheet.emit(_e.CORNER_CELL_MOUSE_UP,u);break;case Ue.MERGED_CELL:a.spreadsheet.emit(_e.MERGED_CELLS_MOUSE_UP,u)}}}},this.onCanvasClick=function(u){a.spreadsheet.emit(_e.GLOBAL_CLICK,u)},this.onCanvasDoubleClick=function(u){var h=a.spreadsheet;if(a.isResizeArea(u))h.emit(_e.LAYOUT_RESIZE_MOUSE_UP,u);else{h.emit(_e.GLOBAL_DOUBLE_CLICK,u);var v=h.getCell(u.target);if(v&&a.target===u.target)switch(v.cellType){case Ue.DATA_CELL:h.emit(_e.DATA_CELL_DOUBLE_CLICK,u);break;case Ue.ROW_CELL:h.emit(_e.ROW_CELL_DOUBLE_CLICK,u);break;case Ue.COL_CELL:h.emit(_e.COL_CELL_DOUBLE_CLICK,u);break;case Ue.CORNER_CELL:h.emit(_e.CORNER_CELL_DOUBLE_CLICK,u);break;case Ue.MERGED_CELL:h.emit(_e.MERGED_CELLS_DOUBLE_CLICK,u)}}},this.onCanvasMouseout=function(u){if(a.isAutoResetSheetStyle&&!u?.shape){var h=a.spreadsheet.interaction;!h.isSelectedState()&&!(h.intercepts.size>0)&&h.reset()}},this.onCanvasContextMenu=function(u){var h=a.spreadsheet;if(a.isResizeArea(u))h.emit(_e.LAYOUT_RESIZE_MOUSE_UP,u);else switch(h.emit(_e.GLOBAL_CONTEXT_MENU,u),a.spreadsheet.getCellType(u.target)){case Ue.DATA_CELL:a.spreadsheet.emit(_e.DATA_CELL_CONTEXT_MENU,u);break;case Ue.ROW_CELL:a.spreadsheet.emit(_e.ROW_CELL_CONTEXT_MENU,u);break;case Ue.COL_CELL:a.spreadsheet.emit(_e.COL_CELL_CONTEXT_MENU,u);break;case Ue.CORNER_CELL:a.spreadsheet.emit(_e.CORNER_CELL_CONTEXT_MENU,u);break;case Ue.MERGED_CELL:a.spreadsheet.emit(_e.MERGED_CELLS_CONTEXT_MENU,u)}},this.spreadsheet=s,this.bindEvents()}return Object.defineProperty(o.prototype,"canvasContainer",{get:function(){return this.spreadsheet.container},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"isAutoResetSheetStyle",{get:function(){return this.spreadsheet.options.interaction.autoResetSheetStyle},enumerable:!1,configurable:!0}),o.prototype.bindEvents=function(){var s=this;this.clearAllEvents(),this.addCanvasEvent(wi.CLICK,this.onCanvasClick),this.addCanvasEvent(wi.MOUSE_DOWN,this.onCanvasMousedown),this.addCanvasEvent(wi.MOUSE_MOVE,this.onCanvasMousemove),this.addCanvasEvent(wi.MOUSE_OUT,this.onCanvasMouseout),this.addCanvasEvent(wi.MOUSE_UP,this.onCanvasMouseup),this.addCanvasEvent(wi.DOUBLE_CLICK,this.onCanvasDoubleClick),this.addCanvasEvent(wi.CONTEXT_MENU,this.onCanvasContextMenu),this.addS2Event(_e.GLOBAL_ACTION_ICON_CLICK,function(){s.spreadsheet.interaction.addIntercepts([Lr.HOVER]),s.spreadsheet.interaction.clearState()}),this.addDomEventListener(window,wi.CLICK,function(a){s.resetSheetStyle(a),s.isCanvasEffect=s.isMouseOnTheCanvasContainer(a)}),this.addDomEventListener(window,wi.KEY_DOWN,function(a){s.onKeyboardCopy(a),s.onKeyboardEsc(a),s.spreadsheet.emit(_e.GLOBAL_KEYBOARD_DOWN,a)}),this.addDomEventListener(window,wi.KEY_UP,function(a){s.spreadsheet.emit(_e.GLOBAL_KEYBOARD_UP,a)}),this.addDomEventListener(window,wi.MOUSE_UP,function(a){s.spreadsheet.emit(_e.GLOBAL_MOUSE_UP,a)}),this.addDomEventListener(window,wi.MOUSE_MOVE,function(a){s.spreadsheet.emit(_e.GLOBAL_MOUSE_MOVE,a)})},o.prototype.onKeyboardCopy=function(s){if(this.isCanvasEffect&&this.spreadsheet.options.interaction.enableCopy&&Cb(s.key,Vn.COPY)&&(s.metaKey||s.ctrlKey)){var a=Lb(this.spreadsheet);fi(a)||this.spreadsheet.emit(_e.GLOBAL_COPIED,a)}},o.prototype.onKeyboardEsc=function(s){this.isCanvasEffect&&Cb(s.key,Vn.ESC)&&this.resetSheetStyle(s)},o.prototype.resetSheetStyle=function(s){if(this.isAutoResetSheetStyle&&this.spreadsheet){var a=this.spreadsheet.interaction;if(a.hasIntercepts([Lr.BRUSH_SELECTION,Lr.COL_BRUSH_SELECTION,Lr.ROW_BRUSH_SELECTION]))return void a.removeIntercepts([Lr.BRUSH_SELECTION,Lr.ROW_BRUSH_SELECTION,Lr.COL_BRUSH_SELECTION]);this.isMouseOnTheTooltip(s)||this.isMouseOnTheCanvasContainer(s)||(this.spreadsheet.emit(_e.GLOBAL_RESET,s),a.reset())}},o.prototype.isMouseOnTheCanvasContainer=function(s){if(s instanceof MouseEvent){var a=this.spreadsheet.getCanvasElement();if(!a)return!1;var u=a.getBoundingClientRect()||{},h=u.x,v=u.y,g=this.getContainerRect(),y=g.width,w=g.height;return a.contains(s.target)&&s.clientX<=h+y&&s.clientY<=v+w}return!1},o.prototype.getContainerRect=function(){var s,a=(null===(s=this.spreadsheet.facet)||void 0===s?void 0:s.panelBBox)||{},h=a.maxY,v=this.spreadsheet.options,y=v.height;return{width:Math.min(v.width,a.maxX),height:Math.min(y,h)}},o.prototype.isMouseOnTheTooltip=function(s){var a,u,h,v;if(!w0(this.spreadsheet,s).showTooltip)return!1;var g=(null===(h=null===(u=null===(a=this.spreadsheet.tooltip)||void 0===a?void 0:a.container)||void 0===u?void 0:u.getBoundingClientRect)||void 0===h?void 0:h.call(u))||{},y=g.x,w=g.y,M=g.width,A=g.height;return s.target instanceof Node&&this.spreadsheet.tooltip.visible?function(o,s){for(var a=!1,u=s;u&&u!==document.body;){if(o===u){a=!0;break}u=u.parentElement}return a}(null===(v=this.spreadsheet.tooltip)||void 0===v?void 0:v.container,s.target):s instanceof MouseEvent&&s.clientX>=y&&s.clientX<=y+M&&s.clientY>=w&&s.clientY<=w+A},o.prototype.isResizeArea=function(s){return yr(s.target,"attrs.appendInfo")?.isResizeArea},o.prototype.activeResizeArea=function(s){this.resetResizeArea();var a=s.target;this.spreadsheet.store.set("activeResizeArea",a),a.attr(oa.backgroundOpacity,this.spreadsheet.theme.resizeArea.interactionState.hover.backgroundOpacity)},o.prototype.resetResizeArea=function(){var s=this.spreadsheet.store.get("activeResizeArea");Ke(s)||s.attr(oa.backgroundOpacity,this.spreadsheet.theme.resizeArea.backgroundOpacity),this.spreadsheet.store.set("activeResizeArea",s)},o.prototype.hasBrushSelectionIntercepts=function(){return this.spreadsheet.interaction.hasIntercepts([Lr.HOVER,Lr.BRUSH_SELECTION,Lr.ROW_BRUSH_SELECTION,Lr.COL_BRUSH_SELECTION])},o.prototype.clear=function(){this.unbindEvents()},o.prototype.unbindEvents=function(){this.clearAllEvents()},o.prototype.addCanvasEvent=function(s,a){var u;null===(u=this.canvasContainer)||void 0===u||u.on(s,a),this.canvasEventHandlers.push({type:s,handler:a})},o.prototype.addS2Event=function(s,a){this.spreadsheet.on(s,a),this.s2EventHandlers.push({type:s,handler:a})},o.prototype.addDomEventListener=function(s,a,u){if(s.addEventListener){var h=this.spreadsheet.options.interaction.eventListenerOptions;s.addEventListener(a,u,h),this.domEventListeners.push({target:s,type:a,handler:u,options:h})}else console.error("Please make sure ".concat(s," has addEventListener function"))},o.prototype.clearAllEvents=function(){var s=this;br(this.canvasEventHandlers,function(a){var u;null===(u=s.canvasContainer)||void 0===u||u.off(a.type,a.handler)}),br(this.s2EventHandlers,function(a){s.spreadsheet.off(a.type,a.handler)}),br(this.domEventListeners,function(a){a.target.removeEventListener(a.type,a.handler,a.options)}),this.canvasEventHandlers=[],this.s2EventHandlers=[],this.domEventListeners=[]},o}(),KA=function(o){function s(){var a=null!==o&&o.apply(this,arguments)||this;return a.isRangeSelection=!1,a.handleColClick=function(u){u.stopPropagation();var h=a.spreadsheet.interaction,v=a.spreadsheet.getCell(u.target),g=v?.getMeta();if(!fi(g?.x)){h.addIntercepts([Lr.HOVER]);var y=[xo(v)],w=a.spreadsheet.store.get("lastClickedCell");if(a.isRangeSelection&&w&&w.cellType===v.cellType&&w.getMeta().level===v.getMeta().level){var M=Ae([a.spreadsheet.facet.layoutResult.rowsHierarchy.maxLevel,a.spreadsheet.facet.layoutResult.colsHierarchy.maxLevel],2),A=M[0],L=M[1],O=kx(w.getMeta(),v.getMeta()),D=O.start,k=O.end;v instanceof _l?y=a.handleSeriesNumberRowSelected(D.rowIndex,k.rowIndex,v):v.cellType===Ue.ROW_CELL&&v.getMeta().level===A?y=a.handleRowSelected(D.rowIndex,k.rowIndex,v):v.cellType===Ue.COL_CELL&&v.getMeta().level===L&&(y=a.handleColSelected(D.colIndex,k.colIndex,v)),h.changeState({cells:y,stateName:pr.SELECTED})}else a.spreadsheet.store.set("lastClickedCell",v);var X=y.map(function(tt){return tt.id});h.updateCells(h.getRowColActiveCells(X)),a.spreadsheet.emit(_e.GLOBAL_SELECTED,h.getActiveCells())}},a}return Ir(s,o),s.prototype.bindEvents=function(){this.bindKeyboardDown(),this.bindDataCellClick(),this.bindColCellClick(),this.bindKeyboardUp()},s.prototype.reset=function(){this.isRangeSelection=!1,this.spreadsheet.interaction.removeIntercepts([Lr.CLICK])},s.prototype.bindKeyboardDown=function(){var a=this;this.spreadsheet.on(_e.GLOBAL_KEYBOARD_DOWN,function(u){u.key===Vn.SHIFT&&(a.isRangeSelection=!0,a.spreadsheet.interaction.addIntercepts([Lr.CLICK]))})},s.prototype.bindKeyboardUp=function(){var a=this;this.spreadsheet.on(_e.GLOBAL_KEYBOARD_UP,function(u){u.key===Vn.SHIFT&&a.reset()})},s.prototype.bindColCellClick=function(){var a=this;this.spreadsheet.isTableMode()&&this.spreadsheet.on(_e.ROW_CELL_CLICK,function(u){a.handleColClick(u)}),this.spreadsheet.on(_e.COL_CELL_CLICK,function(u){a.handleColClick(u)})},s.prototype.bindDataCellClick=function(){var a=this;this.spreadsheet.on(_e.DATA_CELL_CLICK,function(u){u.stopPropagation();var h=a.spreadsheet.getCell(u.target),v=h.getMeta(),g=a.spreadsheet.interaction;if(v){var y=a.spreadsheet.store.get("lastClickedCell");if(!a.isRangeSelection||y?.cellType!==h.cellType)return void a.spreadsheet.store.set("lastClickedCell",h);var M=kx(y.getMeta(),h.getMeta()),A=M.start,L=M.end,O=Nc(A.colIndex,L.colIndex+1).flatMap(function(D){var k=a.spreadsheet.facet.layoutResult.colLeafNodes[D].id;return Nc(A.rowIndex,L.rowIndex+1).map(function(X){return{id:(a.spreadsheet.facet.getSeriesNumberWidth()||a.spreadsheet.isTableMode()?String(X):a.spreadsheet.facet.layoutResult.rowLeafNodes[X].id)+"-"+k,colIndex:D,rowIndex:X,type:h.cellType}})});g.addIntercepts([Lr.CLICK,Lr.HOVER]),g.changeState({cells:O,stateName:pr.SELECTED}),a.spreadsheet.showTooltipWithInfo(u,ch(a.spreadsheet)),a.spreadsheet.emit(_e.GLOBAL_SELECTED,g.getActiveCells())}})},s.prototype.handleSeriesNumberRowSelected=function(a,u,h){var v=this.spreadsheet.facet.layoutResult.colLeafNodes[0].id;return Nc(a,u+1).map(function(g){return{id:String(g)+"-"+v,colIndex:0,rowIndex:g,type:h.cellType}})},s.prototype.handleRowSelected=function(a,u,h){return this.spreadsheet.facet.layoutResult.rowNodes.filter(function(v){return Gm(v.rowIndex,a,u+1)}).map(function(v){return{id:v.id,colIndex:v.colIndex,rowIndex:v.rowIndex,type:h.cellType}})},s.prototype.handleColSelected=function(a,u,h){return this.spreadsheet.facet.layoutResult.colLeafNodes.filter(function(v){return Gm(v.colIndex,a,u+1)}).map(function(v){return{id:v.id,colIndex:v.colIndex,rowIndex:v.rowIndex,type:h.cellType}})},s}(To),dP=[Vn.ARROW_LEFT,Vn.ARROW_RIGHT,Vn.ARROW_UP,Vn.ARROW_DOWN],pP=function(o){function s(a){return o.call(this,a)||this}return Ir(s,o),s.prototype.isCanvasEffect=function(){return this.spreadsheet.interaction.eventController.isCanvasEffect},s.prototype.bindEvents=function(){var a=this;this.spreadsheet.on(_e.GLOBAL_KEYBOARD_DOWN,function(u){if(a.isCanvasEffect()){var h=u.shiftKey,v=u.metaKey,y=!1,w=!1,M=!1;dP.includes(u.key)&&(v&&h?(y=!1,w=!0,M=!1):v?(y=!0,w=!0,M=!0):h?(y=!1,w=!1,M=!1):(y=!0,w=!1,M=!0),a.handleMove({event:u,changeStartCell:y,isJumpMode:w,isSingleSelection:M}))}}),this.spreadsheet.on(_e.DATA_CELL_CLICK,function(u){var h=a.spreadsheet.getCell(u.target).getMeta();h&&(a.startCell=a.getCellMetaFromViewMeta(h),a.endCell=a.startCell)})},s.prototype.getCellMetaFromViewMeta=function(a){return{rowIndex:a.rowIndex,colIndex:a.colIndex,id:a.id,type:Ue.DATA_CELL}},s.prototype.handleMove=function(a){var h=a.changeStartCell,g=a.isSingleSelection,y=this,w=y.spreadsheet,M=y.startCell,O=this.getMoveInfo(a.event.key,h?M:y.endCell,a.isJumpMode);if(O){var D=Ae([O.row,O.col],2),k=D[0],X=D[1];this.scrollToActiveCell(w,k,X);var tt=this.generateCellMeta(w,k,X),ot=g?[tt]:this.getRangeCells(w,M,tt);(function(o,s){var a=o.interaction;a.changeState({stateName:pr.SELECTED,cells:s}),o.emit(_e.GLOBAL_SELECTED,a.getActiveCells())})(w,ot),h&&(this.startCell=tt),this.endCell=tt,this.spreadsheet.emit(_e.DATA_CELL_SELECT_MOVE,ot)}},s.prototype.generateCellMeta=function(a,u,h){var g=a.facet.layoutResult,y=g.colLeafNodes,w=g.rowLeafNodes,M=(0,a.isTableMode)()?String(u):w[u].id;return{rowIndex:u,colIndex:h,id:nv(M,y[h].id),type:Ue.DATA_CELL}},s.prototype.getRangeCells=function(a,u,h){for(var v=kx(u,h),g=v.start,w=g.colIndex,M=v.end,A=M.rowIndex,L=M.colIndex,O=[],D=g.rowIndex;D<=A;D++)for(var k=w;k<=L;k++)O.push(this.generateCellMeta(a,D,k));return O},s.prototype.getMoveInfo=function(a,u,h){var v=this.spreadsheet,g=v.options,y=g.frozenColCount,M=g.frozenRowCount,A=void 0===M?0:M,L=g.frozenTrailingColCount,D=g.frozenTrailingRowCount,k=void 0===D?0:D,X=v.facet.layoutResult,tt=X.rowLeafNodes,ft=Ae([0+(void 0===y?0:y),X.colLeafNodes.length-(void 0===L?0:L)-1],2),ht=ft[0],pt=ft[1],Wt=Ae([0+A,(v.isTableMode()?v.dataSet.getDisplayDataSet().length:tt.length)-k-1],2),de=Wt[0],pe=Wt[1];if(u)switch(a){case Vn.ARROW_RIGHT:return u.colIndex+1>pt?void 0:{row:u.rowIndex,col:h?pt:u.colIndex+1};case Vn.ARROW_LEFT:return u.colIndex-1pe?void 0:{row:h?pe:u.rowIndex+1,col:u.colIndex}}},s.prototype.calculateOffset=function(a,u,h){var v=a.options,g=v.frozenRowCount,y=void 0===g?0:g,w=v.frozenTrailingRowCount,M=void 0===w?0:w,A=a.facet,L=a.frozenColGroup,O=a.frozenTrailingColGroup,D=a.frozenRowGroup,k=a.frozenTrailingRowGroup,X=A.layoutResult.colLeafNodes,tt=A.getScrollOffset(),ot=tt.scrollX,ft=tt.scrollY,ht=A.panelBBox,pt=ht.viewportHeight,Wt=ht.viewportWidth,de=yr(a,"theme.splitLine"),pe=L?Math.floor(L.getBBox().width-de.verticalBorderWidth/2):0,Me=O?Math.floor(O.getBBox().width):0,ze=D?Math.floor(D.getBBox().height-de.horizontalBorderWidth/2):0,Oe=k?Math.floor(k.getBBox().height):0,Ze=rx(ot,ft,A.viewCellWidths,A.viewCellHeights,{width:Wt-pe-Me,height:pt-ze-Oe,x:pe,y:ze},A.getRealScrollX(A.cornerBBox.width)),tr=-1,vr=-1,gr=X.find(function(Je){return Je.colIndex===h});return h<=Ze[0]?tr=gr.x-pe:h>=Ze[1]&&h=Ze[3]&&(vr=A.viewCellHeights.getCellOffsetY(u+1)+Oe-pt),{offsetX:tr,offsetY:vr}},s.prototype.scrollToActiveCell=function(a,u,h){var v=this.calculateOffset(a,u,h),g=v.offsetX,y=v.offsetY,w=a.facet,M=a.facet.getScrollOffset();w.scrollWithAnimation({offsetX:{value:g>-1?g:M.scrollX},offsetY:{value:y>-1?y:M.scrollY}})},s}(To),r2=function(o){function s(){var a=null!==o&&o.apply(this,arguments)||this;return a.displayedCells=[],a.brushRangeCells=[],a.brushSelectionStage=In.UN_DRAGGED,a.brushSelectionMinimumMoveDistance=5,a.scrollAnimationComplete=!0,a.mouseMoveDistanceFromCanvas=0,a.setMoveDistanceFromCanvas=function(u,h,v){var g=0;if(h&&(g=u.x),v){var y=u.y;g=h?Math.max(y,g):y}a.mouseMoveDistanceFromCanvas=g},a.formatBrushPointForScroll=function(u,h){var v,g,y,w;void 0===h&&(h=!1);var L=a.spreadsheet.facet,O=h?L.cornerBBox:L.panelBBox,D=O.minX,k=O.maxX,X=L.panelBBox,tt=X.minY,ot=X.maxY,ft=(null===(v=a.endBrushPoint)||void 0===v?void 0:v.x)+u.x,ht=(null===(g=a.endBrushPoint)||void 0===g?void 0:g.y)+u.y,pt=!0,Wt=!0,de=null===(w=null===(y=L.vScrollBar)||void 0===y?void 0:y.getBBox())||void 0===w?void 0:w.width;return ft>k?ft=k-de-2:ftot?ht=ot-2:ht<=tt?ht=tt+2:Wt=!1,{x:{value:ft,needScroll:pt},y:{value:ht,needScroll:Wt}}},a.rectanglesIntersect=function(u,h){return u.maxX>h.minX&&u.minXh.minY},a.autoScrollIntervalId=null,a.autoScrollConfig=hm(lc),a.validateYIndex=function(u){var h,v,g=a.spreadsheet.facet,y=g.frozenGroupInfo,w=0,M=null===(h=y?.frozenRow)||void 0===h?void 0:h.range;if(M&&(w=M[1]+1),uA?null:u},a.validateXIndex=function(u){var h,v,g=a.spreadsheet.facet,y=g.frozenGroupInfo,w=0,M=null===(h=y?.frozenCol)||void 0===h?void 0:h.range;if(M&&(w=M[1]+1),uA?null:u},a.adjustNextColIndexWithFrozen=function(u,h){var v=a.spreadsheet,g=v.facet,w=v.options,M=v.dataSet.getDisplayDataSet().length,A=g.layoutResult.colLeafNodes.length,L=bs(w,A,M),O=L.frozenTrailingColCount,D=L.frozenColCount,k=g.panelScrollGroupIndexes;return O>0&&h===si.SCROLL_DOWN&&Du(u,O,A)?k[1]:D>0&&h===si.SCROLL_UP&&$o(u,D)?k[0]:u},a.adjustNextRowIndexWithFrozen=function(u,h){var v=a.spreadsheet,g=v.facet,w=v.options,M=v.dataSet.getDisplayDataSet().length,A=g.layoutResult.colLeafNodes.length,L=g.getCellRange(),O=bs(w,A,M),D=O.frozenTrailingRowCount,k=O.frozenRowCount,X=g.panelScrollGroupIndexes;return D>0&&h===si.SCROLL_DOWN&&Zf(u,L.end,D)?X[3]:k>0&&h===si.SCROLL_UP&&Zp(u,L.start,k)?X[2]:u},a.getWillScrollRowIndexDiff=function(u){return u===si.SCROLL_DOWN?Xh.SCROLL_DOWN:Xh.SCROLL_UP},a.getDefaultWillScrollToRowIndex=function(u){var v=a.adjustNextRowIndexWithFrozen(a.endBrushPoint.rowIndex,u)+a.getWillScrollRowIndexDiff(u);return a.validateYIndex(v)},a.getWillScrollToRowIndex=function(u){return a.getDefaultWillScrollToRowIndex(u)},a.getNextScrollDelta=function(u){var h=a.spreadsheet.facet.getScrollOffset(),v=h.scrollX,g=h.scrollY,y=0,w=0;if(u.y.scroll){var A=a.getWillScrollToRowIndex(M=u.y.value>0?si.SCROLL_DOWN:si.SCROLL_UP),L=oh(A,M,a.spreadsheet)-g;w=fi(A)||fi(L)||Number.isNaN(L)?0:L}if(u.x.scroll){var M,D=a.adjustNextColIndexWithFrozen(a.endBrushPoint.colIndex,M=u.x.value>0?si.SCROLL_DOWN:si.SCROLL_UP),k=a.validateXIndex(D+(u.x.value>0?1:-1));y=fi(k)?0:JD(k,M,a.spreadsheet)-v}return{x:y,y:w}},a.onScrollAnimationComplete=function(){a.scrollAnimationComplete=!0,a.brushSelectionStage!==In.UN_DRAGGED&&a.renderPrepareSelected(a.endBrushPoint)},a.autoScroll=function(u){if(void 0===u&&(u=!1),a.brushSelectionStage!==In.UN_DRAGGED&&a.scrollAnimationComplete){var h=a.autoScrollConfig,v=a.spreadsheet.facet.getScrollOffset(),g=u?"rowHeaderOffsetX":"offsetX",y={rowHeaderOffsetX:{value:v.rowHeaderScrollX,animate:!0},offsetX:{value:v.scrollX,animate:!0},offsetY:{value:v.scrollY,animate:!0}},w=a.getNextScrollDelta(h),M=w.x,A=w.y;if(0===A&&0===M)return void a.clearAutoScroll();if(h.y.scroll&&(y.offsetY.value+=A),h.x.scroll){var L=y[g];L.value+=M,L.value<0&&(L.value=0)}a.scrollAnimationComplete=!1;var O=3;h.x.scroll&&(O=1),a.spreadsheet.facet.scrollWithAnimation(y,Math.max(16,300-a.mouseMoveDistanceFromCanvas*O),a.onScrollAnimationComplete)}},a.handleScroll=I1(function(u,h,v){if(void 0===v&&(v=!1),a.brushSelectionStage!==In.UN_DRAGGED){var g=a.formatBrushPointForScroll({x:u,y:h},v),y=g.x,w=y.value,M=y.needScroll,A=g.y,L=A.value,O=A.needScroll,D=a.autoScrollConfig;O&&(D.y.value=h,D.y.scroll=!0),M&&(D.x.value=u,D.x.scroll=!0),a.setMoveDistanceFromCanvas({x:u,y:h},M,O),a.renderPrepareSelected({x:w,y:L}),(O||M)&&(a.clearAutoScroll(),a.autoScroll(v),a.autoScrollIntervalId=setInterval(function(){a.autoScroll(v)},16))}},30),a.clearAutoScroll=function(){a.autoScrollIntervalId&&(clearInterval(a.autoScrollIntervalId),a.autoScrollIntervalId=null,a.resetScrollDelta())},a.onUpdateCells=function(u,h){return h()},a.showPrepareSelectedCells=function(){a.brushRangeCells=a.getBrushRangeCells(),a.spreadsheet.interaction.changeState({cells:cn(a.brushRangeCells,function(u){return xo(u)}),stateName:pr.PREPARE_SELECT,force:!0,onUpdateCells:a.onUpdateCells})},a.renderPrepareSelected=function(u){var h=u.x,v=u.y,g=a.spreadsheet.container.getShape(h,v),y=a.spreadsheet.getCell(g);if(y&&(y instanceof _l||y instanceof qo||y instanceof ov)){var M=y.getMeta();a.endBrushPoint={x:h,y:v,rowIndex:M.rowIndex,colIndex:M.colIndex};var O=a.spreadsheet.interaction;O.addIntercepts([Lr.HOVER]),O.clearStyleIndependent(),a.isValidBrushSelection()&&(a.showPrepareSelectedCells(),a.updatePrepareSelectMask())}},a}return Ir(s,o),s.prototype.bindEvents=function(){this.bindMouseDown(),this.bindMouseMove(),this.bindMouseUp()},s.prototype.getPrepareSelectMaskTheme=function(){var a;return null===(a=this.spreadsheet.theme)||void 0===a?void 0:a.prepareSelectMask},s.prototype.initPrepareSelectMaskShape=function(){var a=this.spreadsheet.foregroundGroup;if(a){a.removeChild(this.prepareSelectMaskShape);var u=this.getPrepareSelectMaskTheme();this.prepareSelectMaskShape=a.addShape("rect",{visible:!1,attrs:{width:0,height:0,x:0,y:0,fill:u?.backgroundColor,fillOpacity:u?.backgroundOpacity,zIndex:5},capture:!1})}},s.prototype.setBrushSelectionStage=function(a){this.brushSelectionStage=a},s.prototype.isPointInCanvas=function(a){var u=this.spreadsheet.facet.getCanvasHW(),g=this.spreadsheet.facet.panelBBox;return a.x>g.minX&&a.xg.minY&&a.ythis.brushSelectionMinimumMoveDistance||h.y-u.y>this.brushSelectionMinimumMoveDistance},s.prototype.setDisplayedCells=function(){this.displayedCells=this.spreadsheet.interaction.getPanelGroupAllDataCells()},s.prototype.updatePrepareSelectMask=function(){var a=this.getBrushRange();this.prepareSelectMaskShape.attr({x:a.start.x,y:a.start.y,width:a.width,height:a.height}),this.prepareSelectMaskShape.show()},s.prototype.hidePrepareSelectMaskShape=function(){var a;null===(a=this.prepareSelectMaskShape)||void 0===a||a.hide()},s.prototype.resetScrollDelta=function(){this.autoScrollConfig=hm(lc)},s.prototype.getBrushPoint=function(a){var u=this.spreadsheet.facet.getScrollOffset(),h=u.scrollY,v=u.scrollX,g={x:a?.x,y:a?.y},w=this.spreadsheet.getCell(a.target).getMeta(),M=w.colIndex,A=w.rowIndex;return ue(ue({},g),{rowIndex:A,colIndex:M,scrollY:h,scrollX:v})},s.prototype.getBrushRange=function(){var a,u,h,v,g,y,w,M,A=this.spreadsheet.facet.getScrollOffset(),L=A.scrollX,O=A.scrollY,D=Math.min(this.startBrushPoint.rowIndex,null===(a=this.endBrushPoint)||void 0===a?void 0:a.rowIndex),k=Math.max(this.startBrushPoint.rowIndex,null===(u=this.endBrushPoint)||void 0===u?void 0:u.rowIndex),X=Math.min(this.startBrushPoint.colIndex,null===(h=this.endBrushPoint)||void 0===h?void 0:h.colIndex),tt=Math.max(this.startBrushPoint.colIndex,null===(v=this.endBrushPoint)||void 0===v?void 0:v.colIndex),ot=this.startBrushPoint.x+this.startBrushPoint.scrollX-L,ft=this.startBrushPoint.y+this.startBrushPoint.scrollY-O,ht=Math.min(ot,null===(g=this.endBrushPoint)||void 0===g?void 0:g.x),pt=Math.max(ot,null===(y=this.endBrushPoint)||void 0===y?void 0:y.x),Wt=Math.min(ft,null===(w=this.endBrushPoint)||void 0===w?void 0:w.y),de=Math.max(ft,null===(M=this.endBrushPoint)||void 0===M?void 0:M.y);return{start:{rowIndex:D,colIndex:X,x:ht,y:Wt},end:{rowIndex:k,colIndex:tt,x:pt,y:de},width:pt-ht,height:de-Wt}},s.prototype.getBrushRangeCells=function(){var a=this;return this.setDisplayedCells(),this.displayedCells.filter(function(u){var h=u.getMeta();return a.isInBrushRange(h)})},s.prototype.mouseDown=function(a){var u;null===(u=a?.preventDefault)||void 0===u||u.call(a),!this.spreadsheet.interaction.hasIntercepts([Lr.CLICK])&&(this.setBrushSelectionStage(In.CLICK),this.initPrepareSelectMaskShape(),this.setDisplayedCells(),this.startBrushPoint=this.getBrushPoint(a))},s.prototype.addBrushIntercepts=function(){this.spreadsheet.interaction.addIntercepts([Lr.BRUSH_SELECTION])},s.prototype.bindMouseUp=function(a){var u=this;void 0===a&&(a=!1),this.spreadsheet.on(_e.GLOBAL_MOUSE_UP,function(h){if(u.brushSelectionStage===In.DRAGGED){if(a&&u.clearAutoScroll(),u.isValidBrushSelection()){u.addBrushIntercepts(),u.updateSelectedCells();var v=ch(u.spreadsheet);u.spreadsheet.showTooltipWithInfo(h,v)}u.spreadsheet.interaction.getCurrentStateName()===pr.PREPARE_SELECT&&u.spreadsheet.interaction.reset(),u.resetDrag()}else u.resetDrag()}),this.spreadsheet.on(_e.GLOBAL_CONTEXT_MENU,function(){u.brushSelectionStage!==In.UN_DRAGGED&&(u.spreadsheet.interaction.removeIntercepts([Lr.HOVER]),u.resetDrag())})},s.prototype.autoBrushScroll=function(a,u){var h,v;if(void 0===u&&(u=!1),this.clearAutoScroll(),!this.isPointInCanvas(a)){var g=a?.x-(null===(h=this.endBrushPoint)||void 0===h?void 0:h.x),y=a?.y-(null===(v=this.endBrushPoint)||void 0===v?void 0:v.y);return this.handleScroll(g,y,u),!0}return!1},s.prototype.emitBrushSelectionEvent=function(a,u){this.spreadsheet.emit(a,u),this.spreadsheet.emit(_e.GLOBAL_SELECTED,u),Ke(u)&&this.spreadsheet.interaction.removeIntercepts([Lr.HOVER])},s.prototype.getVisibleBrushRangeCells=function(a){return this.brushRangeCells.find(function(u){return u.getMeta()?.id===a})},s.prototype.isInBrushRange=function(a){return!1},s.prototype.bindMouseDown=function(){},s.prototype.bindMouseMove=function(){},s.prototype.updateSelectedCells=function(){},s}(To),gP=function(o){function s(){var a=null!==o&&o.apply(this,arguments)||this;return a.displayedCells=[],a.brushRangeCells=[],a.getSelectedCellMetas=function(u){var h=[],v=a.spreadsheet.facet.layoutResult,g=v.rowLeafNodes,y=void 0===g?[]:g,w=v.colLeafNodes,M=void 0===w?[]:w,A=Nc(u.start.rowIndex,u.end.rowIndex+1),L=Nc(u.start.colIndex,u.end.colIndex+1);return A.forEach(function(O){L.forEach(function(D){var k=String(M[D].id),X=Ke(y)?String(O):String(y[O].id);h.push({colIndex:D,rowIndex:O,id:"".concat(X,"-").concat(k),type:Ue.DATA_CELL,rowId:X,colId:k,spreadsheet:a.spreadsheet})})}),h},a}return Ir(s,o),s.prototype.bindMouseDown=function(){var a=this;this.spreadsheet.on(_e.DATA_CELL_MOUSE_DOWN,function(u){o.prototype.mouseDown.call(a,u),a.resetScrollDelta()})},s.prototype.bindMouseMove=function(){var a=this;this.spreadsheet.on(_e.GLOBAL_MOUSE_MOVE,function(u){if(a.brushSelectionStage!==In.UN_DRAGGED){a.setBrushSelectionStage(In.DRAGGED);var h=a.spreadsheet.container.getPointByEvent(u);a.autoBrushScroll(h)||a.renderPrepareSelected(h)}})},s.prototype.isInBrushRange=function(a){var u=this.getBrushRange(),h=u.start,v=u.end,g=a.rowIndex,y=a.colIndex;return g>=h.rowIndex&&g<=v.rowIndex&&y>=h.colIndex&&y<=v.colIndex},s.prototype.updateSelectedCells=function(){var a=this.getBrushRange(),u=this.getSelectedCellMetas(a);this.spreadsheet.interaction.changeState({cells:u,stateName:pr.SELECTED,onUpdateCells:zx});var h=this.getScrollBrushRangeCells(u);this.emitBrushSelectionEvent(_e.DATA_CELL_BRUSH_SELECTION,h)},s.prototype.getScrollBrushRangeCells=function(a){var u=this;return a.map(function(h){var v=u.getVisibleBrushRangeCells(h.id);if(v)return v;var g=u.spreadsheet.facet.layoutResult.getCellMeta(h.rowIndex,h.colIndex);return new _l(g,u.spreadsheet)})},s.prototype.bindMouseUp=function(){o.prototype.bindMouseUp.call(this,!0)},s}(r2),n2=function(o){function s(){var a=null!==o&&o.apply(this,arguments)||this;return a.displayedCells=[],a.brushRangeCells=[],a.onUpdateCells=function(u){return u.updateCells(u.getAllColHeaderCells())},a}return Ir(s,o),s.prototype.bindEvents=function(){this.bindMouseDown(),this.bindMouseMove(),this.bindMouseUp()},s.prototype.bindMouseDown=function(){var a=this;this.spreadsheet.on(_e.COL_CELL_MOUSE_DOWN,function(u){o.prototype.mouseDown.call(a,u)})},s.prototype.isPointInCanvas=function(a){var u=this.spreadsheet.facet.getCanvasHW().width,h=this.spreadsheet.facet.cornerBBox;return a.x>=h.width&&a.x<=u&&a.y>=h.minY&&a.y<=h.maxY},s.prototype.bindMouseMove=function(){var a=this;this.spreadsheet.on(_e.COL_CELL_MOUSE_MOVE,function(u){if(a.brushSelectionStage!==In.UN_DRAGGED){a.setBrushSelectionStage(In.DRAGGED);var h=a.spreadsheet.container.getPointByEvent(u.originalEvent);a.isPointInCanvas(h)&&a.renderPrepareSelected(h)}})},s.prototype.setDisplayedCells=function(){this.displayedCells=this.spreadsheet.interaction.getAllColHeaderCells()},s.prototype.isInBrushRange=function(a){var u=this.getBrushRange(),h=u.start,v=u.end,g=this.spreadsheet.facet.getScrollOffset().scrollX,y=this.spreadsheet.facet.cornerBBox,w=a.x,M=void 0===w?0:w,A=a.y,L=void 0===A?0:A,O=a.width,k=a.height;return this.rectanglesIntersect({minX:h.x-y.width+g,minY:h.y,maxX:v.x-y.width+g,maxY:v.y},{minX:M,maxX:M+(void 0===O?0:O),minY:L,maxY:L+(void 0===k?0:k)})},s.prototype.updateSelectedCells=function(){var a=this.spreadsheet.interaction;a.changeState({cells:cn(this.brushRangeCells,xo),stateName:pr.SELECTED,onUpdateCells:function(u){u.updateCells(u.getAllColHeaderCells())}}),this.spreadsheet.emit(_e.COL_CELL_BRUSH_SELECTION,this.brushRangeCells),this.spreadsheet.emit(_e.GLOBAL_SELECTED,this.brushRangeCells),Ke(this.brushRangeCells)&&a.removeIntercepts([Lr.HOVER])},s.prototype.addBrushIntercepts=function(){this.spreadsheet.interaction.addIntercepts([Lr.COL_BRUSH_SELECTION])},s}(r2),i2=function(o){function s(){var a=null!==o&&o.apply(this,arguments)||this;return a.isInBrushRange=function(u){var h=a.getBrushRange(),v=h.start,g=h.end,y=a.spreadsheet.facet.getScrollOffset(),w=y.scrollY,M=y.rowHeaderScrollX,A=a.spreadsheet.facet.cornerBBox,L=u.x,O=void 0===L?0:L,D=u.y,k=void 0===D?0:D,X=u.width,ot=u.height;return a.rectanglesIntersect({minX:v.x+M,minY:v.y-A.height+w,maxX:g.x+M,maxY:g.y-A.height+w},{minX:O,maxX:O+(void 0===X?0:X),minY:k,maxY:k+(void 0===ot?0:ot)})},a.onUpdateCells=function(u){return u.updateCells(u.getAllRowHeaderCells())},a.getSelectedRowNodes=function(){return a.spreadsheet.getRowNodes().filter(a.isInBrushRange)},a.getVisibleRowLeafCellByScrollDirection=function(u){var h=a.spreadsheet.interaction.getAllRowHeaderCells();return u===si.SCROLL_DOWN?_n(h):h.find(function(v){return v.getMeta().isLeaf})},a.getWillScrollToRowIndex=function(u){var h,v;if(!fi(a.endBrushPoint.rowIndex))return a.getDefaultWillScrollToRowIndex(u);var w=(null!==(v=null===(h=a.getVisibleRowLeafCellByScrollDirection(u)?.getMeta())||void 0===h?void 0:h.rowIndex)&&void 0!==v?v:0)+a.getWillScrollRowIndexDiff(u);return a.validateYIndex(w)},a}return Ir(s,o),s.prototype.bindMouseDown=function(){var a=this;this.spreadsheet.on(_e.ROW_CELL_MOUSE_DOWN,function(u){o.prototype.mouseDown.call(a,u)})},s.prototype.isPointInCanvas=function(a){var u=this.spreadsheet.facet.getCanvasHW().height,h=this.spreadsheet.facet.cornerBBox;return a.x>=h.minX&&a.x<=h.maxX&&a.y>=h.height&&a.y<=u},s.prototype.bindMouseMove=function(){var a=this;this.spreadsheet.on(_e.GLOBAL_MOUSE_MOVE,function(u){if(a.brushSelectionStage!==In.UN_DRAGGED){a.setBrushSelectionStage(In.DRAGGED);var h=a.spreadsheet.container.getPointByEvent(u);a.autoBrushScroll(h,!0)||a.renderPrepareSelected(h)}})},s.prototype.setDisplayedCells=function(){this.displayedCells=this.spreadsheet.interaction.getAllRowHeaderCells()},s.prototype.updateSelectedCells=function(){var a=this.getSelectedRowNodes(),u=this.getScrollBrushRangeCells(a),h=cn(u,xo);this.spreadsheet.interaction.changeState({cells:h,stateName:pr.SELECTED,onUpdateCells:this.onUpdateCells}),this.emitBrushSelectionEvent(_e.ROW_CELL_BRUSH_SELECTION,u)},s.prototype.addBrushIntercepts=function(){this.spreadsheet.interaction.addIntercepts([Lr.ROW_BRUSH_SELECTION])},s.prototype.getScrollBrushRangeCells=function(a){var u=this;return a.map(function(h){return u.getVisibleBrushRangeCells(h.id)||new qo(h,u.spreadsheet)})},s}(r2),yP=function(o){function s(){var a=null!==o&&o.apply(this,arguments)||this;return a.isMultiSelection=!1,a}return Ir(s,o),s.prototype.bindEvents=function(){this.bindKeyboardDown(),this.bindDataCellClick(),this.bindKeyboardUp()},s.prototype.reset=function(){this.isMultiSelection=!1,this.spreadsheet.interaction.removeIntercepts([Lr.CLICK])},s.prototype.bindKeyboardDown=function(){var a=this;this.spreadsheet.on(_e.GLOBAL_KEYBOARD_DOWN,function(u){v0(u)&&(a.isMultiSelection=!0,a.spreadsheet.interaction.addIntercepts([Lr.CLICK]))})},s.prototype.bindKeyboardUp=function(){var a=this;this.spreadsheet.on(_e.GLOBAL_KEYBOARD_UP,function(u){v0(u)&&a.reset()})},s.prototype.getSelectedCells=function(a){var u=a.getMeta().id,h=this.spreadsheet.interaction,v=h.getCells([Ue.DATA_CELL]);return h.getCurrentStateName()!==pr.SELECTED&&(v=[]),v.find(function(y){return y.id===u})?v.filter(function(y){return y.id!==u}):Be(Be([],Ae(v),!1),[xo(a)],!1)},s.prototype.bindDataCellClick=function(){var a=this;this.spreadsheet.on(_e.DATA_CELL_CLICK,function(u){u.stopPropagation();var h=a.spreadsheet.getCell(u.target),v=h.getMeta(),y=a.spreadsheet.interaction;if(a.isMultiSelection&&v){var w=a.getSelectedCells(h);if(Ke(w))return y.clearState(),void a.spreadsheet.hideTooltip();y.addIntercepts([Lr.CLICK,Lr.HOVER]),a.spreadsheet.hideTooltip(),y.changeState({cells:w,stateName:pr.SELECTED,onUpdateCells:zx}),a.spreadsheet.emit(_e.GLOBAL_SELECTED,y.getActiveCells()),a.spreadsheet.showTooltipWithInfo(u,ch(a.spreadsheet))}})},s}(To),mP=function(o){function s(){var a=null!==o&&o.apply(this,arguments)||this;return a.resizeStartPosition={},a.resizeMouseMove=function(u){var h,v;if(null!==(h=a.resizeReferenceGroup)&&void 0!==h&&h.get("visible")){null===(v=u?.preventDefault)||void 0===v||v.call(u);var g=u.originalEvent,y=a.getResizeInfo(),w=a.resizeReferenceGroup.getChildren()||[];if(!Ke(w)){var A=Ae(w,2)[1],L=Ae(Ic(A.attr("path")),2),O=L[0],D=L[1];y.type===Ni.Horizontal?a.updateHorizontalResizingEndGuideLinePosition(g,y,O,D):a.updateVerticalResizingEndGuideLinePosition(g,y,O,D),a.updateResizeGuideLineTheme(A),A.attr("path",[O,D])}}},a}return Ir(s,o),s.prototype.bindEvents=function(){this.bindMouseDown(),this.bindMouseMove(),this.bindMouseUp()},s.prototype.initResizeGroup=function(){if(!this.resizeReferenceGroup){this.resizeReferenceGroup=this.spreadsheet.foregroundGroup.addGroup();var a=this.spreadsheet.options,u=a.width,h=a.height,v=this.getResizeAreaTheme(),M={path:"",lineDash:v.guideLineDash,stroke:v.guideLineColor,lineWidth:v.size};this.resizeReferenceGroup.addShape("path",{id:"RESIZE_START_GUIDE_LINE",attrs:M}),this.resizeReferenceGroup.addShape("path",{id:"RESIZE_END_GUIDE_LINE",attrs:M}),this.resizeReferenceGroup.addShape("rect",{id:"RESIZE_MASK",attrs:{appendInfo:{isResizeArea:!0},x:0,y:0,width:u,height:h,fill:"transparent"}})}},s.prototype.getResizeAreaTheme=function(){return this.spreadsheet.theme.resizeArea},s.prototype.setResizeTarget=function(a){this.resizeTarget=a},s.prototype.getGuideLineWidthAndHeight=function(){var a=this.spreadsheet.options,h=a.height,v=this.spreadsheet.facet.panelBBox,g=v.maxY;return{width:Math.min(v.maxX,a.width),height:Math.min(g,h)}},s.prototype.getResizeShapes=function(){var a;return(null===(a=this.resizeReferenceGroup)||void 0===a?void 0:a.get("children"))||[]},s.prototype.setResizeMaskCursor=function(a){Ae(this.getResizeShapes(),3)[2]?.attr("cursor",a)},s.prototype.updateResizeGuideLinePosition=function(a,u){var h=this.getResizeShapes();if(!Ke(h)){var v=Ae(h,2),g=v[0],y=v[1],w=u.type,M=u.offsetX,A=u.offsetY,L=u.width,O=u.height,D=this.getGuideLineWidthAndHeight(),k=D.width,X=D.height;if(this.setResizeMaskCursor("".concat(w,"-resize")),w===Ni.Horizontal)return g.attr("path",[["M",M,A],["L",M,X]]),y.attr("path",[["M",M+L,A],["L",M+L,X]]),void(this.resizeStartPosition.offsetX=a.offsetX);g.attr("path",[["M",M,A],["L",k,A]]),y.attr("path",[["M",M,A+O],["L",k,A+O]]),this.resizeStartPosition.offsetY=a.offsetY}},s.prototype.bindMouseDown=function(){var a=this;this.spreadsheet.on(_e.LAYOUT_RESIZE_MOUSE_DOWN,function(u){var h=u.target,v=u.originalEvent,g=a.getCellAppendInfo(u.target);a.spreadsheet.store.set("resized",!1),g?.isResizeArea&&(a.spreadsheet.interaction.reset(),a.spreadsheet.interaction.addIntercepts([Lr.RESIZE]),a.setResizeTarget(h),a.showResizeGroup(),a.updateResizeGuideLinePosition(v,g))})},s.prototype.bindMouseMove=function(){var a=this;this.spreadsheet.on(_e.LAYOUT_RESIZE_MOUSE_MOVE,function(u){I1(a.resizeMouseMove,33)(u)})},s.prototype.getResizeGuideLinePosition=function(){var a=Ae(this.resizeReferenceGroup.getChildren()||[],2),h=a[1],v=a[0]?.attr("path")||[],g=h?.attr("path")||[],y=Ae(v[0]||[],3),w=y[1],M=void 0===w?0:w,A=y[2],L=void 0===A?0:A,O=Ae(g[0]||[],3),D=O[1],X=O[2];return{start:{x:M,y:L},end:{x:void 0===D?0:D,y:void 0===X?0:X}}},s.prototype.getDisAllowResizeInfo=function(){var a,u=this.getResizeInfo(),h=this.spreadsheet.options.interaction.resize,v=u.width,g=u.height,y=u.resizedWidth,w=u.resizedHeight,M=null===(a=h?.disable)||void 0===a?void 0:a.call(h,u);return{displayWidth:M?v:y,displayHeight:M?g:w,isDisabled:M}},s.prototype.getResizeWidthDetail=function(){var a,u,h=this.getResizeInfo(),v=this.getDisAllowResizeInfo().displayWidth;switch(h.effect){case Hi.Field:return{eventType:_e.LAYOUT_RESIZE_ROW_WIDTH,style:{rowCfg:{widthByField:(a={},a[h.id]=v,a)}}};case Hi.Tree:return{eventType:_e.LAYOUT_RESIZE_TREE_WIDTH,style:{treeRowsWidth:v,rowCfg:{treeRowsWidth:v}}};case Hi.Cell:return{eventType:_e.LAYOUT_RESIZE_COL_WIDTH,style:{colCfg:{widthByFieldValue:(u={},u[h.id]=v,u)}}};case Hi.Series:return{eventType:_e.LAYOUT_RESIZE_SERIES_WIDTH,seriesNumberWidth:v};default:return null}},s.prototype.getResizeHeightDetail=function(){var a,u,L,h=this.spreadsheet.options,v=h.interaction.resize,g=h.style.rowCfg.heightByField,y=this.spreadsheet.theme.rowCell.cell.padding,w=this.getResizeInfo(),M=this.getDisAllowResizeInfo().displayHeight,A=M-y.top-y.bottom;switch(w.effect){case Hi.Field:return{eventType:_e.LAYOUT_RESIZE_COL_HEIGHT,style:{colCfg:{heightByField:(a={},a[w.id]=M,a)}}};case Hi.Cell:return L=g?.[String(w.id)]||v?.rowResizeType===Zs.CURRENT?{rowCfg:{heightByField:(u={},u[w.id]=A,u)}}:{cellCfg:{height:A}},{eventType:_e.LAYOUT_RESIZE_ROW_HEIGHT,style:L};default:return null}},s.prototype.getResizeDetail=function(){return this.getResizeInfo().type===Ni.Horizontal?this.getResizeWidthDetail():this.getResizeHeightDetail()},s.prototype.showResizeGroup=function(){this.initResizeGroup(),this.resizeReferenceGroup.set("visible",!0)},s.prototype.hideResizeGroup=function(){this.resizeReferenceGroup.set("visible",!1)},s.prototype.bindMouseUp=function(){var a=this;this.spreadsheet.on(_e.GLOBAL_MOUSE_UP,function(){var u;a.setResizeMaskCursor("default"),a.resizeReferenceGroup&&!Ke(null===(u=a.resizeReferenceGroup)||void 0===u?void 0:u.getChildren())&&(a.hideResizeGroup(),a.renderResizedResult())})},s.prototype.updateResizeGuideLineTheme=function(a){var u=this.getResizeAreaTheme(),h=u.guideLineColor,v=u.guideLineDisableColor,g=this.getDisAllowResizeInfo().isDisabled;a.attr("stroke",g?v:h),this.setResizeMaskCursor(g?"no-drop":"default")},s.prototype.updateHorizontalResizingEndGuideLinePosition=function(a,u,h,v){var g=a.offsetX-this.resizeStartPosition.offsetX;u.width+g<28&&(g=-(u.width-28));var y=u.offsetX+u.width+g;h[1]=y,v[1]=y,this.resizeTarget.attr({x:y-u.size/2})},s.prototype.updateVerticalResizingEndGuideLinePosition=function(a,u,h,v){var g=a.offsetY-this.resizeStartPosition.offsetY;u.height+g<16&&(g=-(u.height-16));var y=u.offsetY+u.height+g;h[2]=y,v[2]=y,this.resizeTarget.attr({y:y-u.size/2})},s.prototype.renderResizedResult=function(){var a=this.getResizeInfo(),u=this.getResizeDetail()||{},h=u.style,v=u.seriesNumberWidth,g=u.eventType,y={info:a,style:h};this.spreadsheet.emit(_e.LAYOUT_RESIZE,y),this.spreadsheet.emit(g,y),h&&this.spreadsheet.setOptions({style:h}),v&&this.spreadsheet.setTheme({rowCell:{seriesNumberWidth:v}}),this.spreadsheet.store.set("resized",!0),this.render()},s.prototype.getResizeInfo=function(){var a=this.getCellAppendInfo(this.resizeTarget),u=this.getResizeGuideLinePosition(),h=u.start,v=u.end,g=Math.floor(v.x-h.x),y=Math.floor(v.y-h.y);return ue(ue({},a),{resizedWidth:g,resizedHeight:y})},s.prototype.render=function(){this.resizeStartPosition={},this.resizeTarget=null,this.resizeReferenceGroup=null,this.spreadsheet.render(!1)},s}(To),xP=function(){function o(s){var a=this;this.interactions=new Map,this.intercepts=new Set,this.hoverTimer=null,this.defaultState={cells:[],force:!1},this.onTriggerInteractionsResetEffect=function(){a.interactions.forEach(function(u){u.reset()})},this.selectAll=function(){a.changeState({stateName:pr.ALL_SELECTED})},this.getCellChildrenNodes=function(u){var h,v=null===(h=u?.getMeta)||void 0===h?void 0:h.call(u),g=u?.cellType===Ue.ROW_CELL;return a.spreadsheet.isHierarchyTreeType()&&g?bi.getAllLeaveNodes(v).filter(function(w){return w.rowIndex===v.rowIndex}):bi.getAllChildrenNodes(v)},this.selectHeaderCell=function(u){var h;void 0===u&&(u={});var v=u.cell;if(!Ke(v)){var g=null===(h=v?.getMeta)||void 0===h?void 0:h.call(v);if(g&&!fi(g?.x)){a.addIntercepts([Lr.HOVER]);var y=a.spreadsheet.isHierarchyTreeType(),w=v?.cellType===Ue.COL_CELL,M=a.getState(),A=a.isSelectedCell(v),L=u?.isMultiSelection&&a.isSelectedState(),O=A?[]:a.getCellChildrenNodes(v),D=A?[]:[xo(v)];if(L&&(D=xu(M?.cells,D),O=xu(M?.nodes,O),A&&(D=D.filter(function(tt){return tt.id!==g.id}),O=O.filter(function(tt){return!tt?.id.includes(g.id)}))),Ke(D))return a.reset(),void a.spreadsheet.emit(_e.GLOBAL_SELECTED,a.getActiveCells());var k=O.filter(function(tt){return tt?.isLeaf});a.changeState({cells:D,nodes:k,stateName:pr.SELECTED});var X=D.map(function(tt){return tt.id});return a.updateCells(a.getRowColActiveCells(X)),(!y||w)&&a.highlightNodes(O),a.spreadsheet.emit(_e.GLOBAL_SELECTED,a.getActiveCells()),!0}}},this.highlightNodes=function(u){void 0===u&&(u=[]),u.forEach(function(h){var v;null===(v=h?.belongsCell)||void 0===v||v.updateByState(pr.SELECTED,h.belongsCell)})},this.mergeCells=function(u,h){TD(a.spreadsheet,u,h)},this.unmergeCell=function(u){bD(a.spreadsheet,u)},this.spreadsheet=s,this.registerEventController(),this.registerInteractions(),window.addEventListener("visibilitychange",this.onTriggerInteractionsResetEffect)}return o.prototype.destroy=function(){this.interactions.clear(),this.intercepts.clear(),this.eventController.clear(),this.clearHoverTimer(),this.resetState(),window.removeEventListener("visibilitychange",this.onTriggerInteractionsResetEffect)},o.prototype.reset=function(){this.clearState(),this.clearHoverTimer(),this.intercepts.clear(),this.spreadsheet.hideTooltip()},o.prototype.setState=function(s){!function(o,s){var a=s?.stateName;o.interaction.isEqualStateName(a)||(lA(o),o.hideTooltip(),o.store.set(oc,s))}(this.spreadsheet,s)},o.prototype.getState=function(){return this.spreadsheet.store.get(oc)||this.defaultState},o.prototype.setInteractedCells=function(s){var a=this.getInteractedCells().concat([s]),u=this.getState();u.interactedCells=a,this.setState(u)},o.prototype.getInteractedCells=function(){return this.getState()?.interactedCells||[]},o.prototype.resetState=function(){this.spreadsheet.store.set(oc,this.defaultState)},o.prototype.getCurrentStateName=function(){return this.getState().stateName},o.prototype.isEqualStateName=function(s){return this.getCurrentStateName()===s},o.prototype.isStateOf=function(s){return this.getState()?.stateName===s},o.prototype.isSelectedState=function(){return this.isStateOf(pr.SELECTED)},o.prototype.isAllSelectedState=function(){return this.isStateOf(pr.ALL_SELECTED)},o.prototype.isHoverFocusState=function(){return this.isStateOf(pr.HOVER_FOCUS)},o.prototype.isHoverState=function(){return this.isStateOf(pr.HOVER)},o.prototype.isActiveCell=function(s){return!!this.getCells().find(function(a){return s.getMeta().id===a.id})},o.prototype.isSelectedCell=function(s){return this.isSelectedState()&&this.isActiveCell(s)},o.prototype.getCells=function(s){var u=this.getState()?.cells||[];return fi(s)?u:u.filter(function(h){return s.includes(h.type)})},o.prototype.getActiveCells=function(){var s=this.getCells().map(function(u){return u.id}),a=this.getAllCells();return cn(s,function(u){return ai(a,function(h){var v;return(null===(v=h?.getMeta())||void 0===v?void 0:v.id)===u})}).filter(function(u){return u})},o.prototype.clearStyleIndependent=function(){!this.isSelectedState()&&!this.isHoverState()&&!this.isAllSelectedState()||this.getPanelGroupAllDataCells().forEach(function(s){s.hideInteractionShape()})},o.prototype.getPanelGroupAllUnSelectedDataCells=function(){var s=this;return this.getPanelGroupAllDataCells().filter(function(a){return!s.isActiveCell(a)})},o.prototype.getPanelGroupAllDataCells=function(){var s;return gv(null===(s=this.spreadsheet.panelGroup)||void 0===s?void 0:s.getChildren(),_l)},o.prototype.getAllRowHeaderCells=function(){var s,a,v=(null===(a=((null===(s=this.spreadsheet.foregroundGroup)||void 0===s?void 0:s.getChildren())||[]).find(function(g){return g instanceof WA})?.cfg)||void 0===a?void 0:a.children)||[];return gv(v,qo).filter(function(g){return g.cellType===Ue.ROW_CELL})},o.prototype.getAllColHeaderCells=function(){var s,a,v=(null===(a=((null===(s=this.spreadsheet.foregroundGroup)||void 0===s?void 0:s.getChildren())||[]).find(function(g){return g instanceof e2})?.cfg)||void 0===a?void 0:a.children)||[];return gv(v,ov).filter(function(g){return g.cellType===Ue.COL_CELL})},o.prototype.getRowColActiveCells=function(s){return xu(this.getAllRowHeaderCells(),this.getAllColHeaderCells()).filter(function(a){return s.includes(a.getMeta().id)})},o.prototype.getAllCells=function(){return xu(this.getPanelGroupAllDataCells(),this.getAllRowHeaderCells(),this.getAllColHeaderCells())},o.prototype.hideColumns=function(s,a){void 0===s&&(s=[]),void 0===a&&(a=!0),bx(this.spreadsheet,s,a)},o.prototype.getBrushSelectionInfo=function(s){var a,u,h;return hl(s)?{dataBrushSelection:s,rowBrushSelection:s,colBrushSelection:s}:{dataBrushSelection:null!==(a=s?.data)&&void 0!==a&&a,rowBrushSelection:null!==(u=s?.row)&&void 0!==u&&u,colBrushSelection:null!==(h=s?.col)&&void 0!==h&&h}},o.prototype.getDefaultInteractions=function(){var s=this.spreadsheet.options.interaction,a=s.resize,h=s.multiSelection,v=s.rangeSelection,g=s.selectedCellMove,y=this.getBrushSelectionInfo(s.brushSelection),w=y.dataBrushSelection,M=y.rowBrushSelection,A=y.colBrushSelection;return[{key:Ri.CORNER_CELL_CLICK,interaction:hP},{key:Ri.DATA_CELL_CLICK,interaction:sP},{key:Ri.ROW_COLUMN_CLICK,interaction:uP},{key:Ri.ROW_TEXT_CLICK,interaction:cP},{key:Ri.MERGED_CELLS_CLICK,interaction:lP},{key:Ri.HOVER,interaction:fP,enable:!Wn()},{key:Ri.BRUSH_SELECTION,interaction:gP,enable:!Wn()&&w},{key:Ri.ROW_BRUSH_SELECTION,interaction:i2,enable:!Wn()&&M},{key:Ri.COL_BRUSH_SELECTION,interaction:n2,enable:!Wn()&&A},{key:Ri.COL_ROW_RESIZE,interaction:mP,enable:!Wn()&&a},{key:Ri.DATA_CELL_MULTI_SELECTION,interaction:yP,enable:!Wn()&&h},{key:Ri.RANGE_SELECTION,interaction:KA,enable:!Wn()&&v},{key:Ri.SELECTED_CELL_MOVE,interaction:pP,enable:!Wn()&&g}]},o.prototype.registerInteractions=function(){var s=this,a=this.spreadsheet.options.interaction.customInteractions;this.interactions.clear(),this.getDefaultInteractions().forEach(function(h){!1!==h.enable&&s.interactions.set(h.key,new(0,h.interaction)(s.spreadsheet))}),Ke(a)||br(a,function(h){s.interactions.set(h.key,new(0,h.interaction)(s.spreadsheet))})},o.prototype.registerEventController=function(){this.eventController=new vP(this.spreadsheet)},o.prototype.draw=function(){this.spreadsheet.container.draw()},o.prototype.clearState=function(){lA(this.spreadsheet)&&this.draw()},o.prototype.changeState=function(s){var a=this,u=this.spreadsheet.interaction,h=s.cells,g=s.force,y=s.stateName,w=s.onUpdateCells;if(Ke(void 0===h?[]:h)&&y===pr.SELECTED)g&&u.changeState({cells:[],stateName:pr.UNSELECTED});else{this.getCurrentStateName()===pr.ALL_SELECTED&&this.clearStyleIndependent(),this.clearState(),this.setState(s);var M=function(){a.updatePanelGroupAllDataCells()};w?w(this,M):M(),this.draw()}},o.prototype.updatePanelGroupAllDataCells=function(){this.updateCells(this.getPanelGroupAllDataCells())},o.prototype.updateCells=function(s){void 0===s&&(s=[]),s.forEach(function(a){a.update()})},o.prototype.addIntercepts=function(s){var a=this;void 0===s&&(s=[]),s.forEach(function(u){a.intercepts.add(u)})},o.prototype.hasIntercepts=function(s){var a=this;return void 0===s&&(s=[]),s.some(function(u){return a.intercepts.has(u)})},o.prototype.removeIntercepts=function(s){var a=this;void 0===s&&(s=[]),s.forEach(function(u){a.intercepts.delete(u)})},o.prototype.clearHoverTimer=function(){clearTimeout(this.hoverTimer)},o.prototype.setHoverTimer=function(s){this.hoverTimer=s},o.prototype.getHoverTimer=function(){return this.hoverTimer},o.prototype.getSelectedCellHighlight=function(){var s=this.spreadsheet.options.interaction.selectedCellHighlight;if(hl(s))return{rowHeader:s,colHeader:s,currentRow:!1,currentCol:!1};var a=s??{},u=a.rowHeader,v=a.colHeader,y=a.currentRow,M=a.currentCol;return{rowHeader:void 0!==u&&u,colHeader:void 0!==v&&v,currentRow:void 0!==y&&y,currentCol:void 0!==M&&M}},o}(),A0=function(){function o(s){var a=this;this.viewport=window,this.isDevicePixelRatioChange=!1,this.init=function(){a.initDevicePixelRatioListener(),a.initDeviceZoomListener()},this.destroy=function(){a.removeDevicePixelRatioListener(),a.removeDeviceZoomListener()},this.removeDevicePixelRatioListener=function(){var u;null!==(u=a.devicePixelRatioMedia)&&void 0!==u&&u.removeEventListener?a.devicePixelRatioMedia.removeEventListener("change",a.renderByDevicePixelRatioChanged):a.devicePixelRatioMedia.removeListener(a.renderByDevicePixelRatioChanged)},this.initDeviceZoomListener=function(){var u,h;Wn()||null===(h=null===(u=a.viewport)||void 0===u?void 0:u.visualViewport)||void 0===h||h.addEventListener("resize",a.renderByZoomScaleWithoutResizeEffect)},this.removeDeviceZoomListener=function(){var u,h;Wn()||null===(h=null===(u=a.viewport)||void 0===u?void 0:u.visualViewport)||void 0===h||h.removeEventListener("resize",a.renderByZoomScaleWithoutResizeEffect)},this.renderByZoomScaleWithoutResizeEffect=function(u){a.isDevicePixelRatioChange=!1,a.renderByZoomScale(u)},this.renderByDevicePixelRatioChanged=function(){a.isDevicePixelRatioChange=!0,a.renderByDevicePixelRatio()},this.renderByDevicePixelRatio=function(u){void 0===u&&(u=window.devicePixelRatio);var h=a.spreadsheet,v=h.container,g=h.options,y=g.width,w=g.height,M=g.devicePixelRatio,A=a.spreadsheet.getCanvasElement();if(v.get("pixelRatio")!==u&&A){var O=Math.max(u,M,hs);v.set("pixelRatio",O),v.changeSize(y,w),a.spreadsheet.render(!1)}},this.renderByZoomScale=ms(function(u){var h=Math.ceil(u.target.scale);h>=1&&!a.isDevicePixelRatioChange&&a.renderByDevicePixelRatio(h)},350),this.spreadsheet=s}return o.prototype.initDevicePixelRatioListener=function(){var s;this.devicePixelRatioMedia=window.matchMedia("(resolution: ".concat(window.devicePixelRatio,"dppx)")),null!==(s=this.devicePixelRatioMedia)&&void 0!==s&&s.addEventListener?this.devicePixelRatioMedia.addEventListener("change",this.renderByDevicePixelRatioChanged):this.devicePixelRatioMedia.addListener(this.renderByDevicePixelRatioChanged)},o}(),QA=function(){function o(s){this.visible=!1,this.position={x:0,y:0},this.spreadsheet=s}return o.prototype.show=function(s){var a,u,h,v=s.position,y=s.content,w=s.event,M=function(o){return ue({operator:{onClick:ey,menus:[]},enterable:!0,enableFormat:!0},o)}(s.options).enterable,A=this.spreadsheet.options.tooltip||{},L=A.autoAdjustBoundary,O=A.adjustPosition;this.visible=!0,this.options=s;var D=this.getContainer();this.renderContent(y);var k=function(o){var s=o.spreadsheet,a=o.position,u=o.tooltipContainer,h=o.autoAdjustBoundary,v=s.getCanvasElement(),g=a.x+NT_x,y=a.y+10;if(!h||!v)return{x:g,y};var w="body"===h,M=s.facet.panelBBox,A=M.maxX,L=M.maxY,O=s.options,D=O.width,k=O.height,X=v.getBoundingClientRect(),tt=X.top,ot=X.left,ft=u.getBoundingClientRect(),ht=ft.width,pt=ft.height,Wt=document.body.getBoundingClientRect(),pe=Wt.height,Me=w?Wt.width:Math.min(D,A)+ot,ze=w?pe:Math.min(k,L)+tt;return g+ht>=Me&&(g=Me-ht),y+pt>=ze&&(y=ze-pt),{x:g,y}}({spreadsheet:this.spreadsheet,position:v,tooltipContainer:D,autoAdjustBoundary:L}),X=k.x,tt=k.y;this.position=null!==(a=O?.({position:{x:X,y:tt},event:w}))&&void 0!==a?a:{x:X,y:tt},m0(D,{style:{left:"".concat(null===(u=this.position)||void 0===u?void 0:u.x,"px"),top:"".concat(null===(h=this.position)||void 0===h?void 0:h.y,"px"),pointerEvents:M?"all":"none"},visible:!0})},o.prototype.hide=function(){this.visible=!1,this.container&&(m0(this.container,{style:{pointerEvents:"none"},visible:!1}),this.resetPosition())},o.prototype.destroy=function(){var s,a;this.visible=!1,this.container&&(this.resetPosition(),null===(a=(s=this.container).remove)||void 0===a||a.call(s),this.container=null)},o.prototype.renderContent=function(s){if(this.container){this.clearContent();var u=s??(this.spreadsheet.options.tooltip||{}).content;if(!fi(u)){if("string"==typeof u)return void(this.container.innerHTML=u);u instanceof Element&&this.container.appendChild(u)}}},o.prototype.clearContent=function(){this.container&&(this.container.innerHTML="")},o.prototype.disablePointerEvent=function(){this.container&&"none"!==this.container.style.pointerEvents&&m0(this.container,{style:{pointerEvents:"none"}})},o.prototype.resetPosition=function(){this.position={x:0,y:0}},o.prototype.getContainer=function(){var s;if(!this.container){var a=this.spreadsheet.options.tooltip,u=(null===(s=a.getContainer)||void 0===s?void 0:s.call(a))||document.body,h=document.createElement("div");return m0(h,{style:a.style,className:[Z1].concat(a.className)}),u.appendChild(h),this.container=h,this.container}return this.container},o}(),JA=function(o){function s(a,u,h){var v=o.call(this)||this;return v.store=new b8,v.untypedOn=v.on,v.untypedEmit=v.emit,v.on=function(g,y){return v.untypedOn(g,y)},v.emit=function(g){for(var y=[],w=1;w=0&&tt<=255?A:L}}catch(ot){w={error:ot}}finally{try{k&&!k.done&&(M=D.return)&&M.call(D)}finally{if(w)throw w.error}}return O},v.dataCfg=Nx(u),v.options=uA(h),v.dataSet=v.getDataSet(v.options),v.setDebug(),v.initTooltip(),v.initGroups(a),v.bindEvents(),v.initInteraction(),v.initTheme(),v.initHdAdapter(),v.registerIcons(),v.setOverscrollBehavior(),v}return Ir(s,o),s.prototype.setOverscrollBehavior=function(){var a=this.options.interaction.overscrollBehavior,u=window.getComputedStyle(document.body).getPropertyValue("overscroll-behavior");u&&"auto"!==u?this.store.set("initOverscrollBehavior",u):a&&(document.body.style.overscrollBehavior=a)},s.prototype.restoreOverscrollBehavior=function(){document.body.style.overscrollBehavior=this.store.get("initOverscrollBehavior")||""},s.prototype.setDebug=function(){Ts.getInstance().setDebug(this.options.debug)},s.prototype.initTheme=function(){this.setThemeCfg({name:"default"})},s.prototype.getMountContainer=function(a){var u=Mu(a)?document.querySelector(a):a;if(!u)throw new Error("Target mount container is not a DOM element");return u},s.prototype.initHdAdapter=function(){this.options.hdAdapter&&(this.hdAdapter=new A0(this),this.hdAdapter.init())},s.prototype.initInteraction=function(){this.interaction=new xP(this)},s.prototype.initTooltip=function(){var a,u;this.tooltip=this.renderTooltip(),this.tooltip instanceof QA||console.warn("[Custom Tooltip]: ".concat(null===(u=null===(a=this.tooltip)||void 0===a?void 0:a.constructor)||void 0===u?void 0:u.toString()," should be extends from BaseTooltip"))},s.prototype.renderTooltip=function(){var a,u;return(null===(u=null===(a=this.options.tooltip)||void 0===a?void 0:a.renderTooltip)||void 0===u?void 0:u.call(a,this))||new QA(this)},s.prototype.showTooltip=function(a){var u,h,v=a.content,y=this.getCell(a.event?.target),w=ci(v)?v(y,a):v;null===(h=(u=this.tooltip).show)||void 0===h||h.call(u,ue(ue({},a),{content:w}))},s.prototype.showTooltipWithInfo=function(a,u,h){var v,g=w0(this,a),w=g.content;if(g.showTooltip){var M=this.getCell(a?.target),A=null!==(v=h?.data)&&void 0!==v?v:RA({spreadsheet:this,cellInfos:u,targetCell:M,options:ue({enableFormat:!0},h)});this.showTooltip({data:A,position:{x:a.clientX,y:a.clientY},options:ue({enterable:!0},h),event:a,content:w})}},s.prototype.hideTooltip=function(){var a,u;null===(u=(a=this.tooltip).hide)||void 0===u||u.call(a)},s.prototype.destroyTooltip=function(){var a,u;null===(u=(a=this.tooltip).destroy)||void 0===u||u.call(a)},s.prototype.registerIcons=function(){var a=this.options.customSVGIcons;Ke(a)||br(a,function(u){eb(u.name,u.svg)})},s.prototype.setDataCfg=function(a,u){this.store.set("originalDataCfg",a),this.dataCfg=u?Nx(a):Nx(this.dataCfg,a),function(o){o.store.set(Uh,xd)}(this)},s.prototype.setOptions=function(a,u){this.hideTooltip(),this.options=u?uA(a):Is(this.options,a),this.registerIcons()},s.prototype.render=function(a,u){if(void 0===a&&(a=!0),void 0===u&&(u={}),this.getCanvasElement()){var h=u.reBuildDataSet,v=void 0!==h&&h,g=u.reBuildHiddenColumnsDetail,y=void 0===g||g;this.emit(_e.LAYOUT_BEFORE_RENDER),v&&(this.dataSet=this.getDataSet(this.options)),a&&(this.clearDrillDownData("",!0),this.dataSet.setDataCfg(this.dataCfg)),this.buildFacet(),y&&this.initHiddenColumnsDetail(),this.emit(_e.LAYOUT_AFTER_RENDER)}},s.prototype.destroy=function(){var a,u,h,v,g;this.restoreOverscrollBehavior(),this.emit(_e.LAYOUT_DESTROY),null===(a=this.facet)||void 0===a||a.destroy(),null===(u=this.hdAdapter)||void 0===u||u.destroy(),null===(h=this.interaction)||void 0===h||h.destroy(),null===(v=this.store)||void 0===v||v.clear(),this.destroyTooltip(),this.clearCanvasEvent(),null===(g=this.container)||void 0===g||g.destroy(),function(){var o;null===(o=document.getElementById(px))||void 0===o||o.remove()}()},s.prototype.setThemeCfg=function(a){void 0===a&&(a={});var u=a?.theme||{},h=function(o){var s,a,u,h,v,g=o?.palette||function(o){return kT[(o||"default").toLowerCase()]}(o?.name),y=g.basicColors,w=g.semanticColors,M=g.others,A=null===(s=o?.spreadsheet)||void 0===s?void 0:s.isTableMode(),L=function GT(){return/windows/i.test(navigator.userAgent)}()?"bold":700,O=function(){var D,k;return{bolderText:{fontFamily:Ja,fontSize:12,fontWeight:L,fill:y[13],opacity:1,textAlign:"right",textBaseline:"middle"},text:{fontFamily:Ja,fontSize:12,fontWeight:"normal",fill:y[13],opacity:1,textAlign:"right",textBaseline:"middle"},cell:{crossBackgroundColor:y[1],backgroundColor:y[8],backgroundColorOpacity:1,horizontalBorderColor:y[9],horizontalBorderColorOpacity:1,verticalBorderColor:y[9],verticalBorderColorOpacity:1,horizontalBorderWidth:1,verticalBorderWidth:1,padding:{top:8,right:8,bottom:8,left:8},interactionState:{hover:{backgroundColor:y[2],backgroundOpacity:.6},hoverFocus:{backgroundColor:y[2],backgroundOpacity:.6,borderColor:y[14],borderWidth:1,borderOpacity:1},selected:{backgroundColor:y[2],backgroundOpacity:.6},unselected:{backgroundOpacity:.3,textOpacity:.3,opacity:.3},searchResult:{backgroundColor:null!==(D=M?.results)&&void 0!==D?D:y[2],backgroundOpacity:1},highlight:{backgroundColor:null!==(k=M?.highlight)&&void 0!==k?k:y[6],backgroundOpacity:1},prepareSelect:{borderColor:y[14],borderOpacity:1,borderWidth:1}}},miniChart:{line:{point:{size:2.2,fill:y[6],opacity:1},linkLine:{size:1.5,fill:y[6],opacity:.6}},bar:{intervalPadding:4,fill:y[6],opacity:1},bullet:{progressBar:{widthPercent:.6,height:10,innerHeight:6},comparativeMeasure:{width:1,height:12,fill:y[13],opacity:.25},rangeColors:{good:w?.green,satisfactory:w.yellow,bad:w.red},backgroundColor:"#E9E9E9"},interval:{height:12,fill:y[7]}},icon:{fill:y[13],downIconColor:w.red,upIconColor:w.green,size:10,margin:{right:4,left:4}}}};return{cornerCell:{bolderText:{fontFamily:Ja,fontSize:12,fontWeight:L,fill:y[0],opacity:1,textAlign:A?"center":"left",textBaseline:"middle"},text:{fontFamily:Ja,fontSize:12,fontWeight:L,fill:y[0],opacity:1,textAlign:"right",textBaseline:"middle"},cell:{backgroundColor:y[3],backgroundColorOpacity:1,horizontalBorderColor:y[10],horizontalBorderColorOpacity:1,verticalBorderColor:y[10],verticalBorderColorOpacity:1,horizontalBorderWidth:1,verticalBorderWidth:1,padding:{top:0,right:8,bottom:0,left:8}},icon:{fill:y[0],size:10,margin:{right:4,left:4}}},rowCell:{seriesText:{fontFamily:Ja,fontSize:12,fontWeight:"normal",fill:y[14],linkTextFill:y[6],opacity:1,textBaseline:"middle",textAlign:"center"},measureText:{fontFamily:Ja,fontSize:12,fontWeight:"normal",fill:y[14],linkTextFill:y[6],opacity:1,textAlign:A?"center":"left",textBaseline:"top"},bolderText:{fontFamily:Ja,fontSize:12,fontWeight:L,fill:y[14],linkTextFill:y[6],opacity:1,textAlign:A?"center":"left",textBaseline:"top"},text:{fontFamily:Ja,fontSize:12,fontWeight:"normal",fill:y[14],linkTextFill:y[6],opacity:1,textBaseline:"top",textAlign:A?"center":"left"},cell:{backgroundColor:y[1],backgroundColorOpacity:1,horizontalBorderColor:y[9],horizontalBorderColorOpacity:1,verticalBorderColor:y[9],verticalBorderColorOpacity:1,horizontalBorderWidth:1,verticalBorderWidth:1,padding:{top:0,right:8,bottom:0,left:8},interactionState:{hover:{backgroundColor:y[2],backgroundOpacity:.6},selected:{backgroundColor:y[2],backgroundOpacity:.6},unselected:{backgroundOpacity:.3,textOpacity:.3,opacity:.3},prepareSelect:{borderColor:y[14],borderOpacity:1,borderWidth:1},searchResult:{backgroundColor:null!==(a=M?.results)&&void 0!==a?a:y[2],backgroundOpacity:1},highlight:{backgroundColor:null!==(u=M?.highlight)&&void 0!==u?u:y[6],backgroundOpacity:1}}},icon:{fill:y[14],size:10,margin:{right:4,left:4}},seriesNumberWidth:80},colCell:{measureText:{fontFamily:Ja,fontSize:12,fontWeight:"normal",fill:y[0],opacity:1,textAlign:"right",textBaseline:"middle"},bolderText:{fontFamily:Ja,fontSize:12,fontWeight:L,fill:y[0],opacity:1,textAlign:"center",textBaseline:"middle"},text:{fontFamily:Ja,fontSize:12,fontWeight:"normal",fill:y[0],opacity:1,textAlign:"center",textBaseline:"middle"},cell:{backgroundColor:y[3],backgroundColorOpacity:1,horizontalBorderColor:y[10],horizontalBorderColorOpacity:1,verticalBorderColor:y[10],verticalBorderColorOpacity:1,horizontalBorderWidth:1,verticalBorderWidth:1,padding:{top:0,right:8,bottom:0,left:8},interactionState:{hover:{backgroundColor:y[4],backgroundOpacity:.6},selected:{backgroundColor:y[4],backgroundOpacity:.6},unselected:{backgroundOpacity:.3,textOpacity:.3,opacity:.3},prepareSelect:{borderColor:y[14],borderOpacity:1,borderWidth:1},searchResult:{backgroundColor:null!==(h=M?.results)&&void 0!==h?h:y[2],backgroundOpacity:1},highlight:{backgroundColor:null!==(v=M?.highlight)&&void 0!==v?v:y[6],backgroundOpacity:1}}},icon:{fill:y[0],size:10,margin:{top:6,right:4,bottom:6,left:4}}},dataCell:O(),mergedCell:O(),resizeArea:{size:3,background:y[7],backgroundOpacity:0,guideLineColor:y[7],guideLineDisableColor:"rgba(0,0,0,0.25)",guideLineDash:[3,3],interactionState:{hover:{backgroundColor:y[7],backgroundOpacity:1}}},scrollBar:{trackColor:"rgba(0,0,0,0.01)",thumbHoverColor:"rgba(0,0,0,0.25)",thumbColor:"rgba(0,0,0,0.15)",thumbHorizontalMinSize:32,thumbVerticalMinSize:32,size:Wn()?3:6,hoverSize:Wn()?4:8,lineCap:"round"},splitLine:{horizontalBorderColor:y[12],horizontalBorderColorOpacity:.2,horizontalBorderWidth:2,verticalBorderColor:y[11],verticalBorderColorOpacity:.25,verticalBorderWidth:2,showShadow:!0,shadowWidth:8,shadowColors:{left:"rgba(0,0,0,0.1)",right:"rgba(0,0,0,0)"}},prepareSelectMask:{backgroundColor:y[5],backgroundOpacity:.3},background:{color:y[8],opacity:1}}}(ue(ue({},a),{spreadsheet:this}));this.theme=Is(h,u)},s.prototype.setTheme=function(a){this.theme=Is(this.theme,a)},s.prototype.updatePagination=function(a){this.options=Is(this.options,{pagination:a}),this.store.set("scrollX",0),this.store.set("scrollY",0)},s.prototype.getContentHeight=function(){return this.facet.getContentHeight()},s.prototype.changeSize=function(a,u){void 0===a&&(a=this.options.width),void 0===u&&(u=this.options.height),this.changeSheetSize(a,u)},s.prototype.changeSheetSize=function(a,u){void 0===a&&(a=this.options.width),void 0===u&&(u=this.options.height);var h=this.getCanvasElement(),v=this.container.get("width"),g=this.container.get("height");a===v&&u===g||!h||(this.options=Is(this.options,{width:a,height:u}),this.container.changeSize(a,u))},s.prototype.getCanvasElement=function(){return this.container.get("el")},s.prototype.getLayoutWidthType=function(){return this.options.style.layoutWidthType},s.prototype.getRowNodes=function(a){return void 0===a&&(a=-1),-1===a?this.facet.layoutResult.rowNodes:this.facet.layoutResult.rowNodes.filter(function(u){return u.level===a})},s.prototype.getRowLeafNodes=function(){var a;return(null===(a=this.facet)||void 0===a?void 0:a.layoutResult.rowLeafNodes)||[]},s.prototype.getColumnNodes=function(a){var u;void 0===a&&(a=-1);var h=(null===(u=this.facet)||void 0===u?void 0:u.layoutResult.colNodes)||[];return-1===a?h:h.filter(function(v){return v.level===a})},s.prototype.getColumnLeafNodes=function(){var a;return(null===(a=this.facet)||void 0===a?void 0:a.layoutResult.colLeafNodes)||[]},s.prototype.updateScrollOffset=function(a){this.facet.updateScrollOffset(Is({offsetX:{value:void 0,animate:!1},offsetY:{value:void 0,animate:!1},rowHeaderOffsetX:{value:void 0,animate:!1}},a))},s.prototype.getTooltipDataItemMappingCallback=function(){var a;return null===(a=this.options)||void 0===a?void 0:a.mappingDisplayDataItem},s.prototype.getCell=function(a){for(var u,h=a;h&&!(h instanceof e3);){if(h instanceof to)return h;h=null===(u=h.get)||void 0===u?void 0:u.call(h,"parent")}return null},s.prototype.getCellType=function(a){return this.getCell(a)?.cellType},s.prototype.getTotalsConfig=function(a){var v=yr(this.options.totals,pa(this.dataSet.fields.rows,a)?"row":"col",{});return{showSubTotals:!(!v.showSubTotals||!pa(v.subTotalsDimensions,a))&&v.showSubTotals,showGrandTotals:v.showGrandTotals,reverseLayout:v.reverseLayout,reverseSubLayout:v.reverseSubLayout,label:v.label||gi("\u603b\u8ba1"),subLabel:v.subLabel||gi("\u5c0f\u8ba1")}},s.prototype.initGroups=function(a){var u=this.options,h=u.width,v=u.height,g=u.supportCSSTransform,y=u.devicePixelRatio;this.container=new e3({container:this.getMountContainer(a),width:h,height:v,localRefresh:!1,supportCSSTransform:g,pixelRatio:Math.max(y,hs)}),this.backgroundGroup=this.container.addGroup({name:"backGroundGroup",zIndex:0}),this.panelGroup=this.container.addGroup({name:"panelGroup",zIndex:1}),this.foregroundGroup=this.container.addGroup({name:"foreGroundGroup",zIndex:3}),this.initPanelGroupChildren(),this.updateContainerStyle()},s.prototype.updateContainerStyle=function(){var a=this.getCanvasElement();a&&(a.style.display="block")},s.prototype.initPanelGroupChildren=function(){this.panelScrollGroup=new oP({name:"panelScrollGroup",zIndex:1,s2:this}),this.panelGroup.add(this.panelScrollGroup)},s.prototype.getInitColumnLeafNodes=function(){return this.store.get("initColumnLeafNodes",[])},s.prototype.clearColumnLeafNodes=function(){this.store.set("initColumnLeafNodes",void 0)},s.prototype.clearCanvasEvent=function(){var a=this;VS(this.getEvents(),function(h,v){a.off(v)})},s.prototype.updateSortMethodMap=function(a,u,h){var v;void 0===h&&(h=!1);var g=h?null:this.store.get("sortMethodMap");this.store.set("sortMethodMap",ue(ue({},g),((v={})[a]=u,v)))},s.prototype.getMenuDefaultSelectedKeys=function(a){var h=yr(this.store.get("sortMethodMap"),a);return h?[h]:[]},s}(lr),jA=(function(o){function s(){return null!==o&&o.apply(this,arguments)||this}Ir(s,o),s.prototype.getDataSet=function(a){var u=a.dataSet,h=a.hierarchyType;return u?u(this):"customTree"===h?new Qx(this):new hh(this)},s.prototype.isPivotMode=function(){return!0},s.prototype.isTableMode=function(){return!1},s.prototype.isHierarchyTreeType=function(){var a=this.options.hierarchyType;return"tree"===a||"customTree"===a},s.prototype.isScrollContainsRowHeader=function(){return!this.isFrozenRowHeader()},s.prototype.isFrozenRowHeader=function(){var a;return null===(a=this.options)||void 0===a?void 0:a.frozenRowHeader},s.prototype.isValueInCols=function(){return this.dataSet.fields.valueInCols},s.prototype.clearDrillDownData=function(a,u){this.dataSet instanceof hh&&(this.dataSet.clearDrillDownData(a),u||(this.interaction.reset(),this.render(!1)))},s.prototype.getFacetCfgFromDataSetAndOptions=function(){var a=this,u=this.dataSet,h=u.fields,v=u.meta,g=this.options,y=g.style,w=g.dataCell;return ue(ue(ue(ue({},this.options),h),y),{meta:v,spreadsheet:this,dataSet:this.dataSet,dataCell:w??function(A){return new _l(A,a)}})},s.prototype.buildFacet=function(){var a,u=this.getFacetCfgFromDataSetAndOptions();null===(a=this.facet)||void 0===a||a.destroy(),this.facet=new mv(u),this.facet.render()},s.prototype.bindEvents=function(){this.off(_e.ROW_CELL_COLLAPSE_TREE_ROWS),this.off(_e.LAYOUT_TREE_ROWS_COLLAPSE_ALL),this.on(_e.ROW_CELL_COLLAPSE_TREE_ROWS,this.handleRowCellCollapseTreeRows),this.on(_e.LAYOUT_TREE_ROWS_COLLAPSE_ALL,this.handleTreeRowsCollapseAll)},s.prototype.handleRowCellCollapseTreeRows=function(a){var u,g={style:{collapsedRows:(u={},u[a.id]=a.isCollapsed,u)}};this.emit(_e.LAYOUT_COLLAPSE_ROWS,{collapsedRows:g.style.collapsedRows,meta:a?.node}),this.setOptions(g),this.render(!1),this.emit(_e.LAYOUT_AFTER_COLLAPSE_ROWS,{collapsedRows:g.style.collapsedRows,meta:a?.node})},s.prototype.handleTreeRowsCollapseAll=function(a){this.setOptions({style:{hierarchyCollapse:!a,collapsedRows:null,rowExpandDepth:null}}),this.render(!1)},s.prototype.groupSortByMethod=function(a,u){var h=this.dataCfg.fields,v=h.rows,g=h.columns,y=this.options.style.colCfg.hideMeasureColumn,w=this.isValueInCols()?_n(v):_n(g),A=u.value,L=Ic(u.query),O=A;y&&this.isValueInCols()&&(L[Jr]=O=this.dataSet.fields.values[0]);var D={sortFieldId:w,sortMethod:a,sortByMeasure:O,query:L},k=this.dataCfg.sortParams.filter(function(tt){return tt?.sortFieldId!==w});this.updateSortMethodMap(u.id,a,!0);var X=Be(Be([],Ae(k),!1),[D],!1);this.emit(_e.RANGE_SORT,X),this.setDataCfg(ue(ue({},this.dataCfg),{sortParams:X})),this.render()},s.prototype.handleGroupSort=function(a,u){var h=this;a.stopPropagation(),this.interaction.addIntercepts([Lr.HOVER]);var v=this.getMenuDefaultSelectedKeys(u?.id),g={onClick:function(y){h.groupSortByMethod(y.key,u),h.emit(_e.RANGE_SORTED,a)},menus:[{key:"asc",icon:"groupAsc",text:gi("\u7ec4\u5185\u5347\u5e8f")},{key:"desc",icon:"groupDesc",text:gi("\u7ec4\u5185\u964d\u5e8f")},{key:"none",text:gi("\u4e0d\u6392\u5e8f")}],defaultSelectedKeys:v};this.showTooltipWithInfo(a,[],{operator:g,onlyMenu:!0,forceRender:!0})}}(JA),function(o){function s(){return null!==o&&o.apply(this,arguments)||this}return Ir(s,o),s}(qA)),tE=function(o){function s(){var a=null!==o&&o.apply(this,arguments)||this;return a.onSortTooltipClick=function(u,h){var v=u.key,y={sortFieldId:h.field,sortMethod:v};a.updateSortMethodMap(h.id,v),a.emit(_e.RANGE_SORT,[y])},a}return Ir(s,o),s.prototype.getDataSet=function(a){var u=a.dataSet;return u?u(this):new Kx(this)},s.prototype.isPivotMode=function(){return!1},s.prototype.isTableMode=function(){return!0},s.prototype.isHierarchyTreeType=function(){return!1},s.prototype.isScrollContainsRowHeader=function(){return!1},s.prototype.isFrozenRowHeader=function(){return!1},s.prototype.clearDrillDownData=function(){},s.prototype.isValueInCols=function(){return!1},s.prototype.bindEvents=function(){},s.prototype.initPanelGroupChildren=function(){var a,u=this;o.prototype.initPanelGroupChildren.call(this);var h={zIndex:2,s2:this};a=Ae([u3,yC,Vs,c3,h3,f3].map(function(v){var g=new jA(ue({name:v},h));return u.panelGroup.add(g),g}),6),this.frozenRowGroup=a[0],this.frozenColGroup=a[1],this.frozenTrailingRowGroup=a[2],this.frozenTrailingColGroup=a[3],this.frozenTopGroup=a[4],this.frozenBottomGroup=a[5]},s.prototype.getFacetCfgFromDataSetAndOptions=function(){var a=this,u=this.dataSet,h=u.fields,v=u.meta,g=this.options,y=g.style,w=g.dataCell;return ue(ue(ue(ue({},this.options),h),y),{meta:v,spreadsheet:this,dataSet:this.dataSet,dataCell:w??function(A){return a.options.showSeriesNumber&&0===A.colIndex?new sA(A,a):new f0(A,a)}})},s.prototype.buildFacet=function(){var a,u=this.getFacetCfgFromDataSetAndOptions();null===(a=this.facet)||void 0===a||a.destroy(),this.facet=new aP(u),this.facet.render()},s.prototype.clearFrozenGroups=function(){this.frozenRowGroup.set("children",[]),this.frozenColGroup.set("children",[]),this.frozenTrailingRowGroup.set("children",[]),this.frozenTrailingColGroup.set("children",[]),this.frozenTopGroup.set("children",[]),this.frozenBottomGroup.set("children",[])},s.prototype.destroy=function(){o.prototype.destroy.call(this),this.clearFrozenGroups(),this.off(_e.RANGE_SORT),this.off(_e.RANGE_FILTER)},s.prototype.handleGroupSort=function(a,u){var h=this;a.stopPropagation(),this.interaction.addIntercepts([Lr.HOVER]);var v=this.getMenuDefaultSelectedKeys(u?.id),g={onClick:function(y){h.onSortTooltipClick({key:y.key},u)},menus:[{key:"asc",icon:"groupAsc",text:gi("\u5347\u5e8f")},{key:"desc",icon:"groupDesc",text:gi("\u964d\u5e8f")},{key:"none",text:gi("\u4e0d\u6392\u5e8f")}],defaultSelectedKeys:v};this.showTooltipWithInfo(a,[],{operator:g,onlyMenu:!0,forceRender:!0})},s}(JA)},8250:(rr,be,ct)=>{"use strict";ct.d(be,{Ct:()=>J0,f0:()=>zv,uZ:()=>_r,VS:()=>Xu,d9:()=>Iv,FX:()=>Zt,Ds:()=>X0,b$:()=>V0,e5:()=>Mt,S6:()=>Ut,yW:()=>St,hX:()=>zt,sE:()=>Ht,cx:()=>qt,Wx:()=>kt,ri:()=>Sr,xH:()=>nt,U5:()=>B0,U2:()=>q0,Lo:()=>Uv,rx:()=>K,ru:()=>Xe,vM:()=>Te,Ms:()=>He,wH:()=>P0,YM:()=>it,q9:()=>Zt,cq:()=>Bv,kJ:()=>ut,jn:()=>xh,J_:()=>ka,kK:()=>Uu,xb:()=>Gl,Xy:()=>Yl,mf:()=>me,BD:()=>C,UM:()=>Ct,Ft:()=>Av,hj:()=>zr,vQ:()=>ks,Kn:()=>dt,PO:()=>oe,HD:()=>bt,P9:()=>ne,o8:()=>kl,XP:()=>yt,Z$:()=>z,vl:()=>z0,UI:()=>kv,Q8:()=>Z0,Fp:()=>he,UT:()=>Wu,HP:()=>Vu,VV:()=>Fe,F:()=>wv,CD:()=>zv,wQ:()=>Fl,ZT:()=>Th,CE:()=>Gv,ei:()=>K0,u4:()=>at,Od:()=>Lt,U7:()=>zl,t8:()=>Nv,dp:()=>Qi,G:()=>ee,MR:()=>Ce,ng:()=>gh,P2:()=>Wl,qo:()=>Yv,c$:()=>D0,BB:()=>es,jj:()=>we,EL:()=>Q0,jC:()=>Tv,VO:()=>E,I:()=>Re});const Nt=function(st){return null!==st&&"function"!=typeof st&&isFinite(st.length)},Zt=function(st,Ft){return!!Nt(st)&&st.indexOf(Ft)>-1},zt=function(st,Ft){if(!Nt(st))return st;for(var jt=[],fe=0;fe$e[an])return 1;if(Le[an]<$e[an])return-1}return 0}}return st.sort(jt),st};function we(st,Ft){void 0===Ft&&(Ft=new Map);var jt=[];if(Array.isArray(st))for(var fe=0,Le=st.length;fejt?jt:st},Sr=function(st,Ft){var jt=Ft.toString(),fe=jt.indexOf(".");if(-1===fe)return Math.round(st);var Le=jt.substr(fe+1).length;return Le>20&&(Le=20),parseFloat(st.toFixed(Le))},zr=function(st){return ne(st,"Number")};var Pi=1e-5;function ks(st,Ft,jt){return void 0===jt&&(jt=Pi),Math.abs(st-Ft)fe&&(jt=$e,fe=dr)}return jt}},wv=function(st,Ft){if(ut(st)){for(var jt,fe=1/0,Le=0;LeFt?(fe&&(clearTimeout(fe),fe=null),an=ia,dr=st.apply(Le,$e),fe||(Le=$e=null)):!fe&&!1!==jt.trailing&&(fe=setTimeout(Oi,$u)),dr};return Ji.cancel=function(){clearTimeout(fe),an=0,fe=Le=$e=null},Ji},Yv=function(st){return Nt(st)?Array.prototype.slice.call(st):[]};var is={};const Q0=function(st){return is[st=st||"g"]?is[st]+=1:is[st]=1,st+is[st]},Th=function(){};function Qi(st){return Ct(st)?0:Nt(st)?st.length:Object.keys(st).length}var Ul,Wv=ct(655);const Gs=Vu(function(st,Ft){void 0===Ft&&(Ft={});var jt=Ft.fontSize,fe=Ft.fontFamily,Le=Ft.fontWeight,$e=Ft.fontStyle,dr=Ft.fontVariant;return Ul||(Ul=document.createElement("canvas").getContext("2d")),Ul.font=[$e,dr,Le,jt+"px",fe].join(" "),Ul.measureText(bt(st)?st:"").width},function(st,Ft){return void 0===Ft&&(Ft={}),(0,Wv.pr)([st],E(Ft)).join("")}),Uv=function(st,Ft,jt,fe){void 0===fe&&(fe="...");var Ji,ia,$e=Gs(fe,jt),dr=bt(st)?st:es(st),an=Ft,Oi=[];if(Gs(st,jt)<=Ft)return st;for(;Ji=dr.substr(0,16),!((ia=Gs(Ji,jt))+$e>an&&ia>an);)if(Oi.push(Ji),an-=ia,!(dr=dr.substr(16)))return Oi.join("");for(;Ji=dr.substr(0,1),!((ia=Gs(Ji,jt))+$e>an);)if(Oi.push(Ji),an-=ia,!(dr=dr.substr(1)))return Oi.join("");return""+Oi.join("")+fe},J0=function(){function st(){this.map={}}return st.prototype.has=function(Ft){return void 0!==this.map[Ft]},st.prototype.get=function(Ft,jt){var fe=this.map[Ft];return void 0===fe?jt:fe},st.prototype.set=function(Ft,jt){this.map[Ft]=jt},st.prototype.clear=function(){this.map={}},st.prototype.delete=function(Ft){delete this.map[Ft]},st.prototype.size=function(){return Object.keys(this.map).length},st}()},364:(rr,be,ct)=>{"use strict";ct.r(be),ct.d(be,{BiModule:()=>mH});var ae={};ct.r(ae),ct.d(ae,{assign:()=>us,default:()=>Ue,defaultI18n:()=>Yg,format:()=>Xg,parse:()=>Ri,setGlobalDateI18n:()=>$s,setGlobalDateMasks:()=>Sa});var Nt={};ct.r(Nt),ct.d(Nt,{CONTAINER_CLASS:()=>ua,CONTAINER_CLASS_CUSTOM:()=>Wa,CROSSHAIR_X:()=>Ey,CROSSHAIR_Y:()=>Ly,LIST_CLASS:()=>uf,LIST_ITEM_CLASS:()=>ii,MARKER_CLASS:()=>yc,NAME_CLASS:()=>zw,TITLE_CLASS:()=>Ho,VALUE_CLASS:()=>Ua});var ve={};ct.r(ve),ct.d(ve,{Arc:()=>n4,DataMarker:()=>l4,DataRegion:()=>c4,Html:()=>p4,Image:()=>s4,Line:()=>t4,Region:()=>o4,RegionFilter:()=>f4,Shape:()=>yn,Text:()=>kd});var Zt={};ct.r(Zt),ct.d(Zt,{ellipsisHead:()=>m4,ellipsisMiddle:()=>x4,ellipsisTail:()=>Nd,getDefault:()=>y4});var Qt={};ct.r(Qt),ct.d(Qt,{equidistance:()=>Uw,equidistanceWithReverseBoth:()=>_4,getDefault:()=>Oy,reserveBoth:()=>w4,reserveFirst:()=>Ww,reserveLast:()=>C4});var zt={};ct.r(zt),ct.d(zt,{fixedAngle:()=>La,getDefault:()=>M4,unfixedAngle:()=>Qs});var Bt={};ct.r(Bt),ct.d(Bt,{autoEllipsis:()=>Zt,autoHide:()=>Qt,autoRotate:()=>zt});var Mt={};ct.r(Mt),ct.d(Mt,{Base:()=>Ry,Circle:()=>O4,Html:()=>D4,Line:()=>Xw});var Vt={};ct.r(Vt),ct.d(Vt,{Base:()=>ho,Circle:()=>SS,Ellipse:()=>MS,Image:()=>O5,Line:()=>F5,Marker:()=>AS,Path:()=>Su,Polygon:()=>N5,Polyline:()=>DS,Rect:()=>Bc,Text:()=>ai});var se={};ct.r(se),ct.d(se,{Canvas:()=>W5,Group:()=>$a,Shape:()=>Vt,getArcParams:()=>up,version:()=>zm});var ne={};ct.r(ne),ct.d(ne,{Base:()=>qa,Circle:()=>q5,Dom:()=>XS,Ellipse:()=>J5,Image:()=>tI,Line:()=>eI,Marker:()=>yp,Path:()=>iI,Polygon:()=>oI,Polyline:()=>lI,Rect:()=>hI,Text:()=>pI});var me={};ct.r(me),ct.d(me,{Canvas:()=>EI,Group:()=>Nm,Shape:()=>ne,version:()=>LI});var Dt={};ct.r(Dt),ct.d(Dt,{cluster:()=>fP,hierarchy:()=>oh,pack:()=>oA,packEnclose:()=>tA,packSiblings:()=>UD,partition:()=>ZA,stratify:()=>r2,tree:()=>JA,treemap:()=>s,treemapBinary:()=>a,treemapDice:()=>mv,treemapResquarify:()=>h,treemapSlice:()=>a2,treemapSliceDice:()=>u,treemapSquarify:()=>o});var Ct=ct(6895),ut=ct(9132),dt=(()=>{return(e=dt||(dt={})).Number="Number",e.Line="Line",e.StepLine="StepLine",e.Bar="Bar",e.PercentStackedBar="PercentStackedBar",e.Area="Area",e.PercentageArea="PercentageArea",e.Column="Column",e.Waterfall="Waterfall",e.StackedColumn="StackedColumn",e.Pie="Pie",e.Ring="Ring",e.Rose="Rose",e.Scatter="Scatter",e.Radar="Radar",e.WordCloud="WordCloud",e.Funnel="Funnel",e.Bubble="Bubble",e.Sankey="Sankey",e.RadialBar="RadialBar",e.Chord="Chord",e.tpl="tpl",e.table="table",dt;var e})(),Yt=(()=>{return(e=Yt||(Yt={})).backend="backend",e.front="front",e.none="none",Yt;var e})(),Ut=(()=>{return(e=Ut||(Ut={})).INPUT="INPUT",e.TAG="TAG",e.NUMBER="NUMBER",e.NUMBER_RANGE="NUMBER_RANGE",e.DATE="DATE",e.DATE_RANGE="DATE_RANGE",e.DATETIME="DATETIME",e.DATETIME_RANGE="DATETIME_RANGE",e.TIME="TIME",e.WEEK="WEEK",e.MONTH="MONTH",e.YEAR="YEAR",e.REFERENCE="REFERENCE",e.REFERENCE_CASCADE="REFERENCE_CASCADE",e.REFERENCE_MULTI="REFERENCE_MULTI",e.REFERENCE_TREE_RADIO="REFERENCE_TREE_RADIO",e.REFERENCE_TREE_MULTI="REFERENCE_TREE_MULTI",e.REFERENCE_RADIO="REFERENCE_RADIO",e.REFERENCE_CHECKBOX="REFERENCE_CHECKBOX",Ut;var e})(),Xt=(()=>{return(e=Xt||(Xt={})).STRING="string",e.NUMBER="number",e.DATE="date",e.DRILL="drill",Xt;var e})(),yt=ct(9991),$=ct(9651),C=ct(4650),gt=ct(5379),At=ct(774),Kt=ct(538),oe=ct(2463);let Rt=(()=>{class e{constructor(t,n,i){this._http=t,this.menuSrv=n,this.tokenService=i}getBiBuild(t){return this._http.get(gt.zP.bi+"/"+t,null,{observe:"body",headers:{erupt:t}})}getBiData(t,n,i,l,c,f){let d={index:n,size:i};return l&&c&&(d.sort=l,d.direction=c?"ascend"===c:null),this._http.post(gt.zP.bi+"/data/"+t,f,d,{headers:{erupt:t}})}getBiDrillData(t,n,i,l,c){return this._http.post(gt.zP.bi+"/drill/data/"+t+"/"+n,c,{pageIndex:i,pageSize:l},{headers:{erupt:t}})}getBiChart(t,n,i){return this._http.post(gt.zP.bi+"/"+t+"/chart/"+n,i,null,{headers:{erupt:t}})}getBiReference(t,n,i){return this._http.post(gt.zP.bi+"/"+t+"/reference/"+n,i||{},null,{headers:{erupt:t}})}exportExcel_bak(t,n,i){At.D.postExcelFile(gt.zP.bi+"/"+n+"/excel/"+t,{condition:encodeURIComponent(JSON.stringify(i)),[At.D.PARAM_ERUPT]:n,[At.D.PARAM_TOKEN]:this.tokenService.get().token})}exportExcel(t,n,i,l){this._http.post(gt.zP.bi+"/"+n+"/excel/"+t,i,null,{responseType:"arraybuffer",observe:"events",headers:{erupt:n}}).subscribe(c=>{4===c.type&&((0,yt.Sv)(c),l())},()=>{l()})}getChartTpl(t,n,i){return gt.zP.bi+"/"+n+"/custom-chart/"+t+"?_token="+this.tokenService.get().token+"&_t="+(new Date).getTime()+"&_erupt="+n+"&condition="+encodeURIComponent(JSON.stringify(i))}}return e.\u0275fac=function(t){return new(t||e)(C.LFG(oe.lP),C.LFG(oe.hl),C.LFG(Kt.T))},e.\u0275prov=C.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),Ht=(()=>{class e{constructor(t){this.msg=t,this.datePipe=new Ct.uU("zh-cn")}buildDimParam(t,n=!0,i=!1){let l={};for(let c of t.dimensions){let f=c.$value;if(f)switch(c.type){case Ut.DATE_RANGE:f[0]=this.datePipe.transform(f[0],"yyyy-MM-dd 00:00:00"),f[1]=this.datePipe.transform(f[1],"yyyy-MM-dd 23:59:59");break;case Ut.DATETIME_RANGE:f[0]=this.datePipe.transform(f[0],"yyyy-MM-dd HH:mm:ss"),f[1]=this.datePipe.transform(f[1],"yyyy-MM-dd HH:mm:ss");break;case Ut.DATE:f=this.datePipe.transform(f,"yyyy-MM-dd");break;case Ut.DATETIME:f=this.datePipe.transform(f,"yyyy-MM-dd HH:mm:ss");break;case Ut.TIME:f=this.datePipe.transform(f,"HH:mm:ss");break;case Ut.YEAR:f=this.datePipe.transform(f,"yyyy");break;case Ut.MONTH:f=this.datePipe.transform(f,"yyyy-MM");break;case Ut.WEEK:f=this.datePipe.transform(f,"yyyy-ww")}if(c.notNull&&!c.$value&&(n&&this.msg.error(c.title+"\u5fc5\u586b"),!i)||c.notNull&&Array.isArray(c.$value)&&!c.$value[0]&&!c.$value[1]&&(n&&this.msg.error(c.title+"\u5fc5\u586b"),!i))return null;l[c.code]=Array.isArray(f)&&0==f.length?null:f||null}return l}}return e.\u0275fac=function(t){return new(t||e)(C.LFG($.dD))},e.\u0275prov=C.Yz7({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var ye=ct(9804),qt=ct(6152),Jt=ct(5681),kt=ct(1634);const Q=["st"];function nt(e,r){if(1&e&&C._uU(0),2&e){const t=C.oxw(2);C.hij("\u5171",t.biTable.total,"\u6761")}}const Et=function(e){return{x:e}};function te(e,r){if(1&e){const t=C.EpF();C.ynx(0),C._UZ(1,"st",2,3),C.TgZ(3,"nz-pagination",4),C.NdJ("nzPageSizeChange",function(i){C.CHM(t);const l=C.oxw();return C.KtG(l.pageSizeChange(i))})("nzPageIndexChange",function(i){C.CHM(t);const l=C.oxw();return C.KtG(l.pageIndexChange(i))}),C.qZA(),C.YNc(4,nt,1,1,"ng-template",null,5,C.W1O),C.BQk()}if(2&e){const t=C.MAs(5),n=C.oxw();C.xp6(1),C.Q6J("columns",n.biTable.columns)("data",n.biTable.data)("ps",n.biTable.size)("page",n.biTable.page)("scroll",C.VKq(13,Et,(n.clientWidth>768?150*n.biTable.columns.length:0)+"px"))("bordered",n.settingSrv.layout.bordered)("size","small"),C.xp6(2),C.Q6J("nzPageIndex",n.biTable.index)("nzPageSize",n.biTable.size)("nzTotal",n.biTable.total)("nzPageSizeOptions",n.bi.pageSizeOptions)("nzSize","small")("nzShowTotal",t)}}const he=function(){return[]};function Fe(e,r){1&e&&(C.ynx(0),C._UZ(1,"nz-list",6),C.BQk()),2&e&&(C.xp6(1),C.Q6J("nzDataSource",C.DdM(1,he)))}let W=(()=>{class e{constructor(t,n,i,l,c){this.dataService=t,this.route=n,this.handlerService=i,this.settingSrv=l,this.msg=c,this.querying=!1,this.clientWidth=document.body.clientWidth,this.biTable={index:1,size:10,total:0,page:{show:!1}}}ngOnInit(){this.biTable.size=this.bi.pageSize,this.query(1,this.bi.pageSize)}query(t,n){this.querying=!0,this.dataService.getBiDrillData(this.bi.code,this.drillCode.toString(),t,n,this.row).subscribe(i=>{if(this.querying=!1,this.biTable.total=i.total,this.biTable.columns=[],i.columns){for(let l of i.columns)l.display&&this.biTable.columns.push({title:l.name,index:l.name,className:"text-center",width:l.width});this.biTable.data=i.list}else this.biTable.data=[]})}pageIndexChange(t){this.query(t,this.biTable.size)}pageSizeChange(t){this.biTable.size=t,this.query(1,t)}}return e.\u0275fac=function(t){return new(t||e)(C.Y36(Rt),C.Y36(ut.gz),C.Y36(Ht),C.Y36(oe.gb),C.Y36($.dD))},e.\u0275cmp=C.Xpm({type:e,selectors:[["erupt-drill"]],viewQuery:function(t,n){if(1&t&&C.Gf(Q,5),2&t){let i;C.iGM(i=C.CRH())&&(n.st=i.first)}},inputs:{bi:"bi",drillCode:"drillCode",row:"row"},decls:3,vars:3,consts:[[2,"width","100%","text-align","center","min-height","80px",3,"nzSpinning"],[4,"ngIf"],[2,"margin-bottom","12px",3,"columns","data","ps","page","scroll","bordered","size"],["st",""],["nzShowSizeChanger","","nzShowQuickJumper","",2,"text-align","center",3,"nzPageIndex","nzPageSize","nzTotal","nzPageSizeOptions","nzSize","nzShowTotal","nzPageSizeChange","nzPageIndexChange"],["totalTemplate",""],[3,"nzDataSource"]],template:function(t,n){1&t&&(C.TgZ(0,"nz-spin",0),C.YNc(1,te,6,15,"ng-container",1),C.YNc(2,Fe,2,2,"ng-container",1),C.qZA()),2&t&&(C.Q6J("nzSpinning",n.querying),C.xp6(1),C.Q6J("ngIf",n.biTable.columns&&n.biTable.columns.length>0),C.xp6(1),C.Q6J("ngIf",!n.biTable.columns||0==n.biTable.columns.length))},dependencies:[Ct.O5,ye.A5,qt.n_,Jt.W,kt.dE],encapsulation:2}),e})();var K=ct(7),J=ct(7632),U=ct(433),vt=ct(6616),mt=ct(7044),j=ct(1811),rt=ct(3679),P=ct(8213),Z=ct(9582),q=ct(1102),at=ct(1971),Tt=ct(2577),Lt=ct(545),bt=ct(445),re=ct(6287),Ce=ct(7579),we=ct(2722);function Re(e,r){if(1&e&&(C.ynx(0),C._UZ(1,"span",6),C.BQk()),2&e){const t=r.$implicit;C.xp6(1),C.Q6J("nzType",t)}}function it(e,r){if(1&e&&(C.ynx(0),C.YNc(1,Re,2,1,"ng-container",5),C.BQk()),2&e){const t=C.oxw(2);C.xp6(1),C.Q6J("nzStringTemplateOutlet",t.icon)}}function z(e,r){1&e&&C.Hsn(0,1,["*ngIf","!icon"])}function R(e,r){if(1&e&&(C.ynx(0),C.YNc(1,it,2,1,"ng-container",2),C.YNc(2,z,1,0,"ng-content",2),C.BQk()),2&e){const t=C.oxw();C.xp6(1),C.Q6J("ngIf",t.icon),C.xp6(1),C.Q6J("ngIf",!t.icon)}}function N(e,r){if(1&e&&(C.TgZ(0,"div",8),C._uU(1),C.qZA()),2&e){const t=C.oxw(2);C.xp6(1),C.hij(" ",t.nzTitle," ")}}function V(e,r){if(1&e&&(C.ynx(0),C.YNc(1,N,2,1,"div",7),C.BQk()),2&e){const t=C.oxw();C.xp6(1),C.Q6J("nzStringTemplateOutlet",t.nzTitle)}}function lt(e,r){1&e&&C.Hsn(0,2,["*ngIf","!nzTitle"])}function _t(e,r){if(1&e&&(C.TgZ(0,"div",10),C._uU(1),C.qZA()),2&e){const t=C.oxw(2);C.xp6(1),C.hij(" ",t.nzSubTitle," ")}}function St(e,r){if(1&e&&(C.ynx(0),C.YNc(1,_t,2,1,"div",9),C.BQk()),2&e){const t=C.oxw();C.xp6(1),C.Q6J("nzStringTemplateOutlet",t.nzSubTitle)}}function Gt(e,r){1&e&&C.Hsn(0,3,["*ngIf","!nzSubTitle"])}function ee(e,r){if(1&e&&(C.ynx(0),C._uU(1),C.BQk()),2&e){const t=C.oxw(2);C.xp6(1),C.hij(" ",t.nzExtra," ")}}function ie(e,r){if(1&e&&(C.TgZ(0,"div",11),C.YNc(1,ee,2,1,"ng-container",5),C.qZA()),2&e){const t=C.oxw();C.xp6(1),C.Q6J("nzStringTemplateOutlet",t.nzExtra)}}function Ee(e,r){1&e&&C.Hsn(0,4,["*ngIf","!nzExtra"])}function Te(e,r){1&e&&C._UZ(0,"nz-result-not-found")}function He(e,r){1&e&&C._UZ(0,"nz-result-server-error")}function Xe(e,r){1&e&&C._UZ(0,"nz-result-unauthorized")}function ke(e,r){if(1&e&&(C.ynx(0,12),C.YNc(1,Te,1,0,"nz-result-not-found",13),C.YNc(2,He,1,0,"nz-result-server-error",13),C.YNc(3,Xe,1,0,"nz-result-unauthorized",13),C.BQk()),2&e){const t=C.oxw();C.Q6J("ngSwitch",t.nzStatus),C.xp6(1),C.Q6J("ngSwitchCase","404"),C.xp6(1),C.Q6J("ngSwitchCase","500"),C.xp6(1),C.Q6J("ngSwitchCase","403")}}const qe=[[["nz-result-content"],["","nz-result-content",""]],[["","nz-result-icon",""]],[["div","nz-result-title",""]],[["div","nz-result-subtitle",""]],[["div","nz-result-extra",""]]],Qe=["nz-result-content, [nz-result-content]","[nz-result-icon]","div[nz-result-title]","div[nz-result-subtitle]","div[nz-result-extra]"];let er=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=C.Xpm({type:e,selectors:[["nz-result-not-found"]],exportAs:["nzResultNotFound"],decls:62,vars:0,consts:[["width","252","height","294"],["d","M0 .387h251.772v251.772H0z"],["fill","none","fillRule","evenodd"],["transform","translate(0 .012)"],["fill","#fff"],["d","M0 127.32v-2.095C0 56.279 55.892.387 124.838.387h2.096c68.946 0 124.838 55.892 124.838 124.838v2.096c0 68.946-55.892 124.838-124.838 124.838h-2.096C55.892 252.16 0 196.267 0 127.321","fill","#E4EBF7","mask","url(#b)"],["d","M39.755 130.84a8.276 8.276 0 1 1-16.468-1.66 8.276 8.276 0 0 1 16.468 1.66","fill","#FFF"],["d","M36.975 134.297l10.482 5.943M48.373 146.508l-12.648 10.788","stroke","#FFF","strokeWidth","2"],["d","M39.875 159.352a5.667 5.667 0 1 1-11.277-1.136 5.667 5.667 0 0 1 11.277 1.136M57.588 143.247a5.708 5.708 0 1 1-11.358-1.145 5.708 5.708 0 0 1 11.358 1.145M99.018 26.875l29.82-.014a4.587 4.587 0 1 0-.003-9.175l-29.82.013a4.587 4.587 0 1 0 .003 9.176M110.424 45.211l29.82-.013a4.588 4.588 0 0 0-.004-9.175l-29.82.013a4.587 4.587 0 1 0 .004 9.175","fill","#FFF"],["d","M112.798 26.861v-.002l15.784-.006a4.588 4.588 0 1 0 .003 9.175l-15.783.007v-.002a4.586 4.586 0 0 0-.004-9.172M184.523 135.668c-.553 5.485-5.447 9.483-10.931 8.93-5.485-.553-9.483-5.448-8.93-10.932.552-5.485 5.447-9.483 10.932-8.93 5.485.553 9.483 5.447 8.93 10.932","fill","#FFF"],["d","M179.26 141.75l12.64 7.167M193.006 156.477l-15.255 13.011","par","","stroke","#FFF","strokeWidth","2"],["d","M184.668 170.057a6.835 6.835 0 1 1-13.6-1.372 6.835 6.835 0 0 1 13.6 1.372M203.34 153.325a6.885 6.885 0 1 1-13.7-1.382 6.885 6.885 0 0 1 13.7 1.382","fill","#FFF"],["d","M151.931 192.324a2.222 2.222 0 1 1-4.444 0 2.222 2.222 0 0 1 4.444 0zM225.27 116.056a2.222 2.222 0 1 1-4.445 0 2.222 2.222 0 0 1 4.444 0zM216.38 151.08a2.223 2.223 0 1 1-4.446-.001 2.223 2.223 0 0 1 4.446 0zM176.917 107.636a2.223 2.223 0 1 1-4.445 0 2.223 2.223 0 0 1 4.445 0zM195.291 92.165a2.223 2.223 0 1 1-4.445 0 2.223 2.223 0 0 1 4.445 0zM202.058 180.711a2.223 2.223 0 1 1-4.446 0 2.223 2.223 0 0 1 4.446 0z","stroke","#FFF","strokeWidth","2"],["stroke","#FFF","strokeWidth","2","d","M214.404 153.302l-1.912 20.184-10.928 5.99M173.661 174.792l-6.356 9.814h-11.36l-4.508 6.484M174.941 125.168v-15.804M220.824 117.25l-12.84 7.901-15.31-7.902V94.39"],["d","M166.588 65.936h-3.951a4.756 4.756 0 0 1-4.743-4.742 4.756 4.756 0 0 1 4.743-4.743h3.951a4.756 4.756 0 0 1 4.743 4.743 4.756 4.756 0 0 1-4.743 4.742","fill","#FFF"],["d","M174.823 30.03c0-16.281 13.198-29.48 29.48-29.48 16.28 0 29.48 13.199 29.48 29.48 0 16.28-13.2 29.48-29.48 29.48-16.282 0-29.48-13.2-29.48-29.48","fill","#1890FF"],["d","M205.952 38.387c.5.5.785 1.142.785 1.928s-.286 1.465-.785 1.964c-.572.5-1.214.75-2 .75-.785 0-1.429-.285-1.929-.785-.572-.5-.82-1.143-.82-1.929s.248-1.428.82-1.928c.5-.5 1.144-.75 1.93-.75.785 0 1.462.25 1.999.75m4.285-19.463c1.428 1.249 2.143 2.963 2.143 5.142 0 1.712-.427 3.13-1.219 4.25-.067.096-.137.18-.218.265-.416.429-1.41 1.346-2.956 2.699a5.07 5.07 0 0 0-1.428 1.75 5.207 5.207 0 0 0-.536 2.357v.5h-4.107v-.5c0-1.357.215-2.536.714-3.5.464-.964 1.857-2.464 4.178-4.536l.43-.5c.643-.785.964-1.643.964-2.535 0-1.18-.358-2.108-1-2.785-.678-.68-1.643-1.001-2.858-1.001-1.536 0-2.642.464-3.357 1.43-.37.5-.621 1.135-.76 1.904a1.999 1.999 0 0 1-1.971 1.63h-.004c-1.277 0-2.257-1.183-1.98-2.43.337-1.518 1.02-2.78 2.073-3.784 1.536-1.5 3.607-2.25 6.25-2.25 2.32 0 4.214.607 5.642 1.894","fill","#FFF"],["d","M52.04 76.131s21.81 5.36 27.307 15.945c5.575 10.74-6.352 9.26-15.73 4.935-10.86-5.008-24.7-11.822-11.577-20.88","fill","#FFB594"],["d","M90.483 67.504l-.449 2.893c-.753.49-4.748-2.663-4.748-2.663l-1.645.748-1.346-5.684s6.815-4.589 8.917-5.018c2.452-.501 9.884.94 10.7 2.278 0 0 1.32.486-2.227.69-3.548.203-5.043.447-6.79 3.132-1.747 2.686-2.412 3.624-2.412 3.624","fill","#FFC6A0"],["d","M128.055 111.367c-2.627-7.724-6.15-13.18-8.917-15.478-3.5-2.906-9.34-2.225-11.366-4.187-1.27-1.231-3.215-1.197-3.215-1.197s-14.98-3.158-16.828-3.479c-2.37-.41-2.124-.714-6.054-1.405-1.57-1.907-2.917-1.122-2.917-1.122l-7.11-1.383c-.853-1.472-2.423-1.023-2.423-1.023l-2.468-.897c-1.645 9.976-7.74 13.796-7.74 13.796 1.795 1.122 15.703 8.3 15.703 8.3l5.107 37.11s-3.321 5.694 1.346 9.109c0 0 19.883-3.743 34.921-.329 0 0 3.047-2.546.972-8.806.523-3.01 1.394-8.263 1.736-11.622.385.772 2.019 1.918 3.14 3.477 0 0 9.407-7.365 11.052-14.012-.832-.723-1.598-1.585-2.267-2.453-.567-.736-.358-2.056-.765-2.717-.669-1.084-1.804-1.378-1.907-1.682","fill","#FFF"],["d","M101.09 289.998s4.295 2.041 7.354 1.021c2.821-.94 4.53.668 7.08 1.178 2.55.51 6.874 1.1 11.686-1.26-.103-5.51-6.889-3.98-11.96-6.713-2.563-1.38-3.784-4.722-3.598-8.799h-9.402s-1.392 10.52-1.16 14.573","fill","#CBD1D1"],["d","M101.067 289.826s2.428 1.271 6.759.653c3.058-.437 3.712.481 7.423 1.031 3.712.55 10.724-.069 11.823-.894.413 1.1-.343 2.063-.343 2.063s-1.512.603-4.812.824c-2.03.136-5.8.291-7.607-.503-1.787-1.375-5.247-1.903-5.728-.241-3.918.95-7.355-.286-7.355-.286l-.16-2.647z","fill","#2B0849"],["d","M108.341 276.044h3.094s-.103 6.702 4.536 8.558c-4.64.618-8.558-2.303-7.63-8.558","fill","#A4AABA"],["d","M57.542 272.401s-2.107 7.416-4.485 12.306c-1.798 3.695-4.225 7.492 5.465 7.492 6.648 0 8.953-.48 7.423-6.599-1.53-6.12.266-13.199.266-13.199h-8.669z","fill","#CBD1D1"],["d","M51.476 289.793s2.097 1.169 6.633 1.169c6.083 0 8.249-1.65 8.249-1.65s.602 1.114-.619 2.165c-.993.855-3.597 1.591-7.39 1.546-4.145-.048-5.832-.566-6.736-1.168-.825-.55-.687-1.58-.137-2.062","fill","#2B0849"],["d","M58.419 274.304s.033 1.519-.314 2.93c-.349 1.42-1.078 3.104-1.13 4.139-.058 1.151 4.537 1.58 5.155.034.62-1.547 1.294-6.427 1.913-7.252.619-.825-4.903-2.119-5.624.15","fill","#A4AABA"],["d","M99.66 278.514l13.378.092s1.298-54.52 1.853-64.403c.554-9.882 3.776-43.364 1.002-63.128l-12.547-.644-22.849.78s-.434 3.966-1.195 9.976c-.063.496-.682.843-.749 1.365-.075.585.423 1.354.32 1.966-2.364 14.08-6.377 33.104-8.744 46.677-.116.666-1.234 1.009-1.458 2.691-.04.302.211 1.525.112 1.795-6.873 18.744-10.949 47.842-14.277 61.885l14.607-.014s2.197-8.57 4.03-16.97c2.811-12.886 23.111-85.01 23.111-85.01l3.016-.521 1.043 46.35s-.224 1.234.337 2.02c.56.785-.56 1.123-.392 2.244l.392 1.794s-.449 7.178-.898 11.89c-.448 4.71-.092 39.165-.092 39.165","fill","#7BB2F9"],["d","M76.085 221.626c1.153.094 4.038-2.019 6.955-4.935M106.36 225.142s2.774-1.11 6.103-3.883","stroke","#648BD8","strokeWidth","1.051","strokeLinecap","round","strokeLinejoin","round"],["d","M107.275 222.1s2.773-1.11 6.102-3.884","stroke","#648BD8","strokeLinecap","round","strokeLinejoin","round"],["d","M74.74 224.767s2.622-.591 6.505-3.365M86.03 151.634c-.27 3.106.3 8.525-4.336 9.123M103.625 149.88s.11 14.012-1.293 15.065c-2.219 1.664-2.99 1.944-2.99 1.944M99.79 150.438s.035 12.88-1.196 24.377M93.673 175.911s7.212-1.664 9.431-1.664M74.31 205.861a212.013 212.013 0 0 1-.979 4.56s-1.458 1.832-1.009 3.776c.449 1.944-.947 2.045-4.985 15.355-1.696 5.59-4.49 18.591-6.348 27.597l-.231 1.12M75.689 197.807a320.934 320.934 0 0 1-.882 4.754M82.591 152.233L81.395 162.7s-1.097.15-.5 2.244c.113 1.346-2.674 15.775-5.18 30.43M56.12 274.418h13.31","stroke","#648BD8","strokeWidth","1.051","strokeLinecap","round","strokeLinejoin","round"],["d","M116.241 148.22s-17.047-3.104-35.893.2c.158 2.514-.003 4.15-.003 4.15s14.687-2.818 35.67-.312c.252-2.355.226-4.038.226-4.038","fill","#192064"],["d","M106.322 151.165l.003-4.911a.81.81 0 0 0-.778-.815c-2.44-.091-5.066-.108-7.836-.014a.818.818 0 0 0-.789.815l-.003 4.906a.81.81 0 0 0 .831.813c2.385-.06 4.973-.064 7.73.017a.815.815 0 0 0 .842-.81","fill","#FFF"],["d","M105.207 150.233l.002-3.076a.642.642 0 0 0-.619-.646 94.321 94.321 0 0 0-5.866-.01.65.65 0 0 0-.63.647v3.072a.64.64 0 0 0 .654.644 121.12 121.12 0 0 1 5.794.011c.362.01.665-.28.665-.642","fill","#192064"],["d","M100.263 275.415h12.338M101.436 270.53c.006 3.387.042 5.79.111 6.506M101.451 264.548a915.75 915.75 0 0 0-.015 4.337M100.986 174.965l.898 44.642s.673 1.57-.225 2.692c-.897 1.122 2.468.673.898 2.243-1.57 1.57.897 1.122 0 3.365-.596 1.489-.994 21.1-1.096 35.146","stroke","#648BD8","strokeWidth","1.051","strokeLinecap","round","strokeLinejoin","round"],["d","M46.876 83.427s-.516 6.045 7.223 5.552c11.2-.712 9.218-9.345 31.54-21.655-.786-2.708-2.447-4.744-2.447-4.744s-11.068 3.11-22.584 8.046c-6.766 2.9-13.395 6.352-13.732 12.801M104.46 91.057l.941-5.372-8.884-11.43-5.037 5.372-1.74 7.834a.321.321 0 0 0 .108.32c.965.8 6.5 5.013 14.347 3.544a.332.332 0 0 0 .264-.268","fill","#FFC6A0"],["d","M93.942 79.387s-4.533-2.853-2.432-6.855c1.623-3.09 4.513 1.133 4.513 1.133s.52-3.642 3.121-3.642c.52-1.04 1.561-4.162 1.561-4.162s11.445 2.601 13.526 3.121c0 5.203-2.304 19.424-7.84 19.861-8.892.703-12.449-9.456-12.449-9.456","fill","#FFC6A0"],["d","M113.874 73.446c2.601-2.081 3.47-9.722 3.47-9.722s-2.479-.49-6.64-2.05c-4.683-2.081-12.798-4.747-17.48.976-9.668 3.223-2.05 19.823-2.05 19.823l2.713-3.021s-3.935-3.287-2.08-6.243c2.17-3.462 3.92 1.073 3.92 1.073s.637-2.387 3.581-3.342c.355-.71 1.036-2.674 1.432-3.85a1.073 1.073 0 0 1 1.263-.704c2.4.558 8.677 2.019 11.356 2.662.522.125.871.615.82 1.15l-.305 3.248z","fill","#520038"],["d","M104.977 76.064c-.103.61-.582 1.038-1.07.956-.489-.083-.801-.644-.698-1.254.103-.61.582-1.038 1.07-.956.488.082.8.644.698 1.254M112.132 77.694c-.103.61-.582 1.038-1.07.956-.488-.083-.8-.644-.698-1.254.103-.61.582-1.038 1.07-.956.488.082.8.643.698 1.254","fill","#552950"],["stroke","#DB836E","strokeWidth","1.118","strokeLinecap","round","strokeLinejoin","round","d","M110.13 74.84l-.896 1.61-.298 4.357h-2.228"],["d","M110.846 74.481s1.79-.716 2.506.537","stroke","#5C2552","strokeWidth","1.118","strokeLinecap","round","strokeLinejoin","round"],["d","M92.386 74.282s.477-1.114 1.113-.716c.637.398 1.274 1.433.558 1.99-.717.556.159 1.67.159 1.67","stroke","#DB836E","strokeWidth","1.118","strokeLinecap","round","strokeLinejoin","round"],["d","M103.287 72.93s1.83 1.113 4.137.954","stroke","#5C2552","strokeWidth","1.118","strokeLinecap","round","strokeLinejoin","round"],["d","M103.685 81.762s2.227 1.193 4.376 1.193M104.64 84.308s.954.398 1.511.318M94.693 81.205s2.308 7.4 10.424 7.639","stroke","#DB836E","strokeWidth","1.118","strokeLinecap","round","strokeLinejoin","round"],["d","M81.45 89.384s.45 5.647-4.935 12.787M69 82.654s-.726 9.282-8.204 14.206","stroke","#E4EBF7","strokeWidth","1.101","strokeLinecap","round","strokeLinejoin","round"],["d","M129.405 122.865s-5.272 7.403-9.422 10.768","stroke","#E4EBF7","strokeWidth","1.051","strokeLinecap","round","strokeLinejoin","round"],["d","M119.306 107.329s.452 4.366-2.127 32.062","stroke","#E4EBF7","strokeWidth","1.101","strokeLinecap","round","strokeLinejoin","round"],["d","M150.028 151.232h-49.837a1.01 1.01 0 0 1-1.01-1.01v-31.688c0-.557.452-1.01 1.01-1.01h49.837c.558 0 1.01.453 1.01 1.01v31.688a1.01 1.01 0 0 1-1.01 1.01","fill","#F2D7AD"],["d","M150.29 151.232h-19.863v-33.707h20.784v32.786a.92.92 0 0 1-.92.92","fill","#F4D19D"],["d","M123.554 127.896H92.917a.518.518 0 0 1-.425-.816l6.38-9.113c.193-.277.51-.442.85-.442h31.092l-7.26 10.371z","fill","#F2D7AD"],["fill","#CC9B6E","d","M123.689 128.447H99.25v-.519h24.169l7.183-10.26.424.298z"],["d","M158.298 127.896h-18.669a2.073 2.073 0 0 1-1.659-.83l-7.156-9.541h19.965c.49 0 .95.23 1.244.622l6.69 8.92a.519.519 0 0 1-.415.83","fill","#F4D19D"],["fill","#CC9B6E","d","M157.847 128.479h-19.384l-7.857-10.475.415-.31 7.7 10.266h19.126zM130.554 150.685l-.032-8.177.519-.002.032 8.177z"],["fill","#CC9B6E","d","M130.511 139.783l-.08-21.414.519-.002.08 21.414zM111.876 140.932l-.498-.143 1.479-5.167.498.143zM108.437 141.06l-2.679-2.935 2.665-3.434.41.318-2.397 3.089 2.384 2.612zM116.607 141.06l-.383-.35 2.383-2.612-2.397-3.089.41-.318 2.665 3.434z"],["d","M154.316 131.892l-3.114-1.96.038 3.514-1.043.092c-1.682.115-3.634.23-4.789.23-1.902 0-2.693 2.258 2.23 2.648l-2.645-.596s-2.168 1.317.504 2.3c0 0-1.58 1.217.561 2.58-.584 3.504 5.247 4.058 7.122 3.59 1.876-.47 4.233-2.359 4.487-5.16.28-3.085-.89-5.432-3.35-7.238","fill","#FFC6A0"],["d","M153.686 133.577s-6.522.47-8.36.372c-1.836-.098-1.904 2.19 2.359 2.264 3.739.15 5.451-.044 5.451-.044","stroke","#DB836E","strokeWidth","1.051","strokeLinecap","round","strokeLinejoin","round"],["d","M145.16 135.877c-1.85 1.346.561 2.355.561 2.355s3.478.898 6.73.617","stroke","#DB836E","strokeWidth","1.051","strokeLinecap","round","strokeLinejoin","round"],["d","M151.89 141.71s-6.28.111-6.73-2.132c-.223-1.346.45-1.402.45-1.402M146.114 140.868s-1.103 3.16 5.44 3.533M151.202 129.932v3.477M52.838 89.286c3.533-.337 8.423-1.248 13.582-7.754","stroke","#DB836E","strokeWidth","1.051","strokeLinecap","round","strokeLinejoin","round"],["d","M168.567 248.318a6.647 6.647 0 0 1-6.647-6.647v-66.466a6.647 6.647 0 1 1 13.294 0v66.466a6.647 6.647 0 0 1-6.647 6.647","fill","#5BA02E"],["d","M176.543 247.653a6.647 6.647 0 0 1-6.646-6.647v-33.232a6.647 6.647 0 1 1 13.293 0v33.232a6.647 6.647 0 0 1-6.647 6.647","fill","#92C110"],["d","M186.443 293.613H158.92a3.187 3.187 0 0 1-3.187-3.187v-46.134a3.187 3.187 0 0 1 3.187-3.187h27.524a3.187 3.187 0 0 1 3.187 3.187v46.134a3.187 3.187 0 0 1-3.187 3.187","fill","#F2D7AD"],["d","M88.979 89.48s7.776 5.384 16.6 2.842","stroke","#E4EBF7","strokeWidth","1.101","strokeLinecap","round","strokeLinejoin","round"]],template:function(t,n){1&t&&(C.O4$(),C.TgZ(0,"svg",0)(1,"defs"),C._UZ(2,"path",1),C.qZA(),C.TgZ(3,"g",2)(4,"g",3),C._UZ(5,"mask",4)(6,"path",5),C.qZA(),C._UZ(7,"path",6)(8,"path",7)(9,"path",8)(10,"path",9)(11,"path",10)(12,"path",11)(13,"path",12)(14,"path",13)(15,"path",14)(16,"path",15)(17,"path",16)(18,"path",17)(19,"path",18)(20,"path",19)(21,"path",20)(22,"path",21)(23,"path",22)(24,"path",23)(25,"path",24)(26,"path",25)(27,"path",26)(28,"path",27)(29,"path",28)(30,"path",29)(31,"path",30)(32,"path",31)(33,"path",32)(34,"path",33)(35,"path",34)(36,"path",35)(37,"path",36)(38,"path",37)(39,"path",38)(40,"path",39)(41,"path",40)(42,"path",41)(43,"path",42)(44,"path",43)(45,"path",44)(46,"path",45)(47,"path",46)(48,"path",47)(49,"path",48)(50,"path",49)(51,"path",50)(52,"path",51)(53,"path",52)(54,"path",53)(55,"path",54)(56,"path",55)(57,"path",56)(58,"path",57)(59,"path",58)(60,"path",59)(61,"path",60),C.qZA()())},encapsulation:2,changeDetection:0}),e})(),Ye=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=C.Xpm({type:e,selectors:[["nz-result-server-error"]],exportAs:["nzResultServerError"],decls:69,vars:0,consts:[["width","254","height","294"],["d","M0 .335h253.49v253.49H0z"],["d","M0 293.665h253.49V.401H0z"],["fill","none","fillRule","evenodd"],["transform","translate(0 .067)"],["fill","#fff"],["d","M0 128.134v-2.11C0 56.608 56.273.334 125.69.334h2.11c69.416 0 125.69 56.274 125.69 125.69v2.11c0 69.417-56.274 125.69-125.69 125.69h-2.11C56.273 253.824 0 197.551 0 128.134","fill","#E4EBF7","mask","url(#b)"],["d","M39.989 132.108a8.332 8.332 0 1 1-16.581-1.671 8.332 8.332 0 0 1 16.58 1.671","fill","#FFF"],["d","M37.19 135.59l10.553 5.983M48.665 147.884l-12.734 10.861","stroke","#FFF","strokeWidth","2"],["d","M40.11 160.816a5.706 5.706 0 1 1-11.354-1.145 5.706 5.706 0 0 1 11.354 1.145M57.943 144.6a5.747 5.747 0 1 1-11.436-1.152 5.747 5.747 0 0 1 11.436 1.153M99.656 27.434l30.024-.013a4.619 4.619 0 1 0-.004-9.238l-30.024.013a4.62 4.62 0 0 0 .004 9.238M111.14 45.896l30.023-.013a4.62 4.62 0 1 0-.004-9.238l-30.024.013a4.619 4.619 0 1 0 .004 9.238","fill","#FFF"],["d","M113.53 27.421v-.002l15.89-.007a4.619 4.619 0 1 0 .005 9.238l-15.892.007v-.002a4.618 4.618 0 0 0-.004-9.234M150.167 70.091h-3.979a4.789 4.789 0 0 1-4.774-4.775 4.788 4.788 0 0 1 4.774-4.774h3.979a4.789 4.789 0 0 1 4.775 4.774 4.789 4.789 0 0 1-4.775 4.775","fill","#FFF"],["d","M171.687 30.234c0-16.392 13.289-29.68 29.681-29.68 16.392 0 29.68 13.288 29.68 29.68 0 16.393-13.288 29.681-29.68 29.681s-29.68-13.288-29.68-29.68","fill","#FF603B"],["d","M203.557 19.435l-.676 15.035a1.514 1.514 0 0 1-3.026 0l-.675-15.035a2.19 2.19 0 1 1 4.377 0m-.264 19.378c.513.477.77 1.1.77 1.87s-.257 1.393-.77 1.907c-.55.476-1.21.733-1.943.733a2.545 2.545 0 0 1-1.87-.77c-.55-.514-.806-1.136-.806-1.87 0-.77.256-1.393.806-1.87.513-.513 1.137-.733 1.87-.733.77 0 1.43.22 1.943.733","fill","#FFF"],["d","M119.3 133.275c4.426-.598 3.612-1.204 4.079-4.778.675-5.18-3.108-16.935-8.262-25.118-1.088-10.72-12.598-11.24-12.598-11.24s4.312 4.895 4.196 16.199c1.398 5.243.804 14.45.804 14.45s5.255 11.369 11.78 10.487","fill","#FFB594"],["d","M100.944 91.61s1.463-.583 3.211.582c8.08 1.398 10.368 6.706 11.3 11.368 1.864 1.282 1.864 2.33 1.864 3.496.365.777 1.515 3.03 1.515 3.03s-7.225 1.748-10.954 6.758c-1.399-6.41-6.936-25.235-6.936-25.235","fill","#FFF"],["d","M94.008 90.5l1.019-5.815-9.23-11.874-5.233 5.581-2.593 9.863s8.39 5.128 16.037 2.246","fill","#FFB594"],["d","M82.931 78.216s-4.557-2.868-2.445-6.892c1.632-3.107 4.537 1.139 4.537 1.139s.524-3.662 3.139-3.662c.523-1.046 1.569-4.184 1.569-4.184s11.507 2.615 13.6 3.138c-.001 5.23-2.317 19.529-7.884 19.969-8.94.706-12.516-9.508-12.516-9.508","fill","#FFC6A0"],["d","M102.971 72.243c2.616-2.093 3.489-9.775 3.489-9.775s-2.492-.492-6.676-2.062c-4.708-2.092-12.867-4.771-17.575.982-9.54 4.41-2.062 19.93-2.062 19.93l2.729-3.037s-3.956-3.304-2.092-6.277c2.183-3.48 3.943 1.08 3.943 1.08s.64-2.4 3.6-3.36c.356-.714 1.04-2.69 1.44-3.872a1.08 1.08 0 0 1 1.27-.707c2.41.56 8.723 2.03 11.417 2.676.524.126.876.619.825 1.156l-.308 3.266z","fill","#520038"],["d","M101.22 76.514c-.104.613-.585 1.044-1.076.96-.49-.082-.805-.646-.702-1.26.104-.613.585-1.044 1.076-.961.491.083.805.647.702 1.26M94.26 75.074c-.104.613-.585 1.044-1.076.96-.49-.082-.805-.646-.702-1.26.104-.613.585-1.044 1.076-.96.491.082.805.646.702 1.26","fill","#552950"],["stroke","#DB836E","strokeWidth","1.063","strokeLinecap","round","strokeLinejoin","round","d","M99.206 73.644l-.9 1.62-.3 4.38h-2.24"],["d","M99.926 73.284s1.8-.72 2.52.54","stroke","#5C2552","strokeWidth","1.117","strokeLinecap","round","strokeLinejoin","round"],["d","M81.367 73.084s.48-1.12 1.12-.72c.64.4 1.28 1.44.56 2s.16 1.68.16 1.68","stroke","#DB836E","strokeWidth","1.117","strokeLinecap","round","strokeLinejoin","round"],["d","M92.326 71.724s1.84 1.12 4.16.96","stroke","#5C2552","strokeWidth","1.117","strokeLinecap","round","strokeLinejoin","round"],["d","M92.726 80.604s2.24 1.2 4.4 1.2M93.686 83.164s.96.4 1.52.32M83.687 80.044s1.786 6.547 9.262 7.954","stroke","#DB836E","strokeWidth","1.063","strokeLinecap","round","strokeLinejoin","round"],["d","M95.548 91.663s-1.068 2.821-8.298 2.105c-7.23-.717-10.29-5.044-10.29-5.044","stroke","#E4EBF7","strokeWidth","1.136","strokeLinecap","round","strokeLinejoin","round"],["d","M78.126 87.478s6.526 4.972 16.47 2.486c0 0 9.577 1.02 11.536 5.322 5.36 11.77.543 36.835 0 39.962 3.496 4.055-.466 8.483-.466 8.483-15.624-3.548-35.81-.6-35.81-.6-4.849-3.546-1.223-9.044-1.223-9.044L62.38 110.32c-2.485-15.227.833-19.803 3.549-20.743 3.03-1.049 8.04-1.282 8.04-1.282.496-.058 1.08-.076 1.37-.233 2.36-1.282 2.787-.583 2.787-.583","fill","#FFF"],["d","M65.828 89.81s-6.875.465-7.59 8.156c-.466 8.857 3.03 10.954 3.03 10.954s6.075 22.102 16.796 22.957c8.39-2.176 4.758-6.702 4.661-11.42-.233-11.304-7.108-16.897-7.108-16.897s-4.212-13.75-9.789-13.75","fill","#FFC6A0"],["d","M71.716 124.225s.855 11.264 9.828 6.486c4.765-2.536 7.581-13.828 9.789-22.568 1.456-5.768 2.58-12.197 2.58-12.197l-4.973-1.709s-2.408 5.516-7.769 12.275c-4.335 5.467-9.144 11.11-9.455 17.713","fill","#FFC6A0"],["d","M108.463 105.191s1.747 2.724-2.331 30.535c2.376 2.216 1.053 6.012-.233 7.51","stroke","#E4EBF7","strokeWidth","1.085","strokeLinecap","round","strokeLinejoin","round"],["d","M123.262 131.527s-.427 2.732-11.77 1.981c-15.187-1.006-25.326-3.25-25.326-3.25l.933-5.8s.723.215 9.71-.068c11.887-.373 18.714-6.07 24.964-1.022 4.039 3.263 1.489 8.16 1.489 8.16","fill","#FFC6A0"],["d","M70.24 90.974s-5.593-4.739-11.054 2.68c-3.318 7.223.517 15.284 2.664 19.578-.31 3.729 2.33 4.311 2.33 4.311s.108.895 1.516 2.68c4.078-7.03 6.72-9.166 13.711-12.546-.328-.656-1.877-3.265-1.825-3.767.175-1.69-1.282-2.623-1.282-2.623s-.286-.156-1.165-2.738c-.788-2.313-2.036-5.177-4.895-7.575","fill","#FFF"],["d","M90.232 288.027s4.855 2.308 8.313 1.155c3.188-1.063 5.12.755 8.002 1.331 2.881.577 7.769 1.243 13.207-1.424-.117-6.228-7.786-4.499-13.518-7.588-2.895-1.56-4.276-5.336-4.066-9.944H91.544s-1.573 11.89-1.312 16.47","fill","#CBD1D1"],["d","M90.207 287.833s2.745 1.437 7.639.738c3.456-.494 3.223.66 7.418 1.282 4.195.621 13.092-.194 14.334-1.126.466 1.242-.388 2.33-.388 2.33s-1.709.682-5.438.932c-2.295.154-8.098.276-10.14-.621-2.02-1.554-4.894-1.515-6.06-.234-4.427 1.075-7.184-.31-7.184-.31l-.181-2.991z","fill","#2B0849"],["d","M98.429 272.257h3.496s-.117 7.574 5.127 9.671c-5.244.7-9.672-2.602-8.623-9.671","fill","#A4AABA"],["d","M44.425 272.046s-2.208 7.774-4.702 12.899c-1.884 3.874-4.428 7.854 5.729 7.854 6.97 0 9.385-.503 7.782-6.917-1.604-6.415.279-13.836.279-13.836h-9.088z","fill","#CBD1D1"],["d","M38.066 290.277s2.198 1.225 6.954 1.225c6.376 0 8.646-1.73 8.646-1.73s.63 1.168-.649 2.27c-1.04.897-3.77 1.668-7.745 1.621-4.347-.05-6.115-.593-7.062-1.224-.864-.577-.72-1.657-.144-2.162","fill","#2B0849"],["d","M45.344 274.041s.035 1.592-.329 3.07c-.365 1.49-1.13 3.255-1.184 4.34-.061 1.206 4.755 1.657 5.403.036.65-1.622 1.357-6.737 2.006-7.602.648-.865-5.14-2.222-5.896.156","fill","#A4AABA"],["d","M89.476 277.57l13.899.095s1.349-56.643 1.925-66.909c.576-10.267 3.923-45.052 1.042-65.585l-13.037-.669-23.737.81s-.452 4.12-1.243 10.365c-.065.515-.708.874-.777 1.417-.078.608.439 1.407.332 2.044-2.455 14.627-5.797 32.736-8.256 46.837-.121.693-1.282 1.048-1.515 2.796-.042.314.22 1.584.116 1.865-7.14 19.473-12.202 52.601-15.66 67.19l15.176-.015s2.282-10.145 4.185-18.871c2.922-13.389 24.012-88.32 24.012-88.32l3.133-.954-.158 48.568s-.233 1.282.35 2.098c.583.815-.581 1.167-.408 2.331l.408 1.864s-.466 7.458-.932 12.352c-.467 4.895 1.145 40.69 1.145 40.69","fill","#7BB2F9"],["d","M64.57 218.881c1.197.099 4.195-2.097 7.225-5.127M96.024 222.534s2.881-1.152 6.34-4.034","stroke","#648BD8","strokeWidth","1.085","strokeLinecap","round","strokeLinejoin","round"],["d","M96.973 219.373s2.882-1.153 6.34-4.034","stroke","#648BD8","strokeWidth","1.032","strokeLinecap","round","strokeLinejoin","round"],["d","M63.172 222.144s2.724-.614 6.759-3.496M74.903 146.166c-.281 3.226.31 8.856-4.506 9.478M93.182 144.344s.115 14.557-1.344 15.65c-2.305 1.73-3.107 2.02-3.107 2.02M89.197 144.923s.269 13.144-1.01 25.088M83.525 170.71s6.81-1.051 9.116-1.051M46.026 270.045l-.892 4.538M46.937 263.289l-.815 4.157M62.725 202.503c-.33 1.618-.102 1.904-.449 3.438 0 0-2.756 1.903-2.29 3.923.466 2.02-.31 3.424-4.505 17.252-1.762 5.807-4.233 18.922-6.165 28.278-.03.144-.521 2.646-1.14 5.8M64.158 194.136c-.295 1.658-.6 3.31-.917 4.938M71.33 146.787l-1.244 10.877s-1.14.155-.519 2.33c.117 1.399-2.778 16.39-5.382 31.615M44.242 273.727H58.07","stroke","#648BD8","strokeWidth","1.085","strokeLinecap","round","strokeLinejoin","round"],["d","M106.18 142.117c-3.028-.489-18.825-2.744-36.219.2a.625.625 0 0 0-.518.644c.063 1.307.044 2.343.015 2.995a.617.617 0 0 0 .716.636c3.303-.534 17.037-2.412 35.664-.266.347.04.66-.214.692-.56.124-1.347.16-2.425.17-3.029a.616.616 0 0 0-.52-.62","fill","#192064"],["d","M96.398 145.264l.003-5.102a.843.843 0 0 0-.809-.847 114.104 114.104 0 0 0-8.141-.014.85.85 0 0 0-.82.847l-.003 5.097c0 .476.388.857.864.845 2.478-.064 5.166-.067 8.03.017a.848.848 0 0 0 .876-.843","fill","#FFF"],["d","M95.239 144.296l.002-3.195a.667.667 0 0 0-.643-.672c-1.9-.061-3.941-.073-6.094-.01a.675.675 0 0 0-.654.672l-.002 3.192c0 .376.305.677.68.669 1.859-.042 3.874-.043 6.02.012.376.01.69-.291.691-.668","fill","#192064"],["d","M90.102 273.522h12.819M91.216 269.761c.006 3.519-.072 5.55 0 6.292M90.923 263.474c-.009 1.599-.016 2.558-.016 4.505M90.44 170.404l.932 46.38s.7 1.631-.233 2.796c-.932 1.166 2.564.7.932 2.33-1.63 1.633.933 1.166 0 3.497-.618 1.546-1.031 21.921-1.138 36.513","stroke","#648BD8","strokeWidth","1.085","strokeLinecap","round","strokeLinejoin","round"],["d","M73.736 98.665l2.214 4.312s2.098.816 1.865 2.68l.816 2.214M64.297 116.611c.233-.932 2.176-7.147 12.585-10.488M77.598 90.042s7.691 6.137 16.547 2.72","stroke","#E4EBF7","strokeWidth","1.085","strokeLinecap","round","strokeLinejoin","round"],["d","M91.974 86.954s5.476-.816 7.574-4.545c1.297-.345.72 2.212-.33 3.671-.7.971-1.01 1.554-1.01 1.554s.194.31.155.816c-.053.697-.175.653-.272 1.048-.081.335.108.657 0 1.049-.046.17-.198.5-.382.878-.12.249-.072.687-.2.948-.231.469-1.562 1.87-2.622 2.855-3.826 3.554-5.018 1.644-6.001-.408-.894-1.865-.661-5.127-.874-6.875-.35-2.914-2.622-3.03-1.923-4.429.343-.685 2.87.69 3.263 1.748.757 2.04 2.952 1.807 2.622 1.69","fill","#FFC6A0"],["d","M99.8 82.429c-.465.077-.35.272-.97 1.243-.622.971-4.817 2.932-6.39 3.224-2.589.48-2.278-1.56-4.254-2.855-1.69-1.107-3.562-.638-1.398 1.398.99.932.932 1.107 1.398 3.205.335 1.506-.64 3.67.7 5.593","stroke","#DB836E","strokeWidth",".774","strokeLinecap","round","strokeLinejoin","round"],["d","M79.543 108.673c-2.1 2.926-4.266 6.175-5.557 8.762","stroke","#E59788","strokeWidth",".774","strokeLinecap","round","strokeLinejoin","round"],["d","M87.72 124.768s-2.098-1.942-5.127-2.719c-3.03-.777-3.574-.155-5.516.078-1.942.233-3.885-.932-3.652.7.233 1.63 5.05 1.01 5.206 2.097.155 1.087-6.37 2.796-8.313 2.175-.777.777.466 1.864 2.02 2.175.233 1.554 2.253 1.554 2.253 1.554s.699 1.01 2.641 1.088c2.486 1.32 8.934-.7 10.954-1.554 2.02-.855-.466-5.594-.466-5.594","fill","#FFC6A0"],["d","M73.425 122.826s.66 1.127 3.167 1.418c2.315.27 2.563.583 2.563.583s-2.545 2.894-9.07 2.272M72.416 129.274s3.826.097 4.933-.718M74.98 130.75s1.961.136 3.36-.505M77.232 131.916s1.748.019 2.914-.505M73.328 122.321s-.595-1.032 1.262-.427c1.671.544 2.833.055 5.128.155 1.389.061 3.067-.297 3.982.15 1.606.784 3.632 2.181 3.632 2.181s10.526 1.204 19.033-1.127M78.864 108.104s-8.39 2.758-13.168 12.12","stroke","#E59788","strokeWidth",".774","strokeLinecap","round","strokeLinejoin","round"],["d","M109.278 112.533s3.38-3.613 7.575-4.662","stroke","#E4EBF7","strokeWidth","1.085","strokeLinecap","round","strokeLinejoin","round"],["d","M107.375 123.006s9.697-2.745 11.445-.88","stroke","#E59788","strokeWidth",".774","strokeLinecap","round","strokeLinejoin","round"],["d","M194.605 83.656l3.971-3.886M187.166 90.933l3.736-3.655M191.752 84.207l-4.462-4.56M198.453 91.057l-4.133-4.225M129.256 163.074l3.718-3.718M122.291 170.039l3.498-3.498M126.561 163.626l-4.27-4.27M132.975 170.039l-3.955-3.955","stroke","#BFCDDD","strokeWidth","2","strokeLinecap","round","strokeLinejoin","round"],["d","M190.156 211.779h-1.604a4.023 4.023 0 0 1-4.011-4.011V175.68a4.023 4.023 0 0 1 4.01-4.01h1.605a4.023 4.023 0 0 1 4.011 4.01v32.088a4.023 4.023 0 0 1-4.01 4.01","fill","#A3B4C6"],["d","M237.824 212.977a4.813 4.813 0 0 1-4.813 4.813h-86.636a4.813 4.813 0 0 1 0-9.626h86.636a4.813 4.813 0 0 1 4.813 4.813","fill","#A3B4C6"],["fill","#A3B4C6","mask","url(#d)","d","M154.098 190.096h70.513v-84.617h-70.513z"],["d","M224.928 190.096H153.78a3.219 3.219 0 0 1-3.208-3.209V167.92a3.219 3.219 0 0 1 3.208-3.21h71.148a3.219 3.219 0 0 1 3.209 3.21v18.967a3.219 3.219 0 0 1-3.21 3.209M224.928 130.832H153.78a3.218 3.218 0 0 1-3.208-3.208v-18.968a3.219 3.219 0 0 1 3.208-3.209h71.148a3.219 3.219 0 0 1 3.209 3.21v18.967a3.218 3.218 0 0 1-3.21 3.208","fill","#BFCDDD","mask","url(#d)"],["d","M159.563 120.546a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M166.98 120.546a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M174.397 120.546a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M222.539 120.546h-22.461a.802.802 0 0 1-.802-.802v-3.208c0-.443.359-.803.802-.803h22.46c.444 0 .803.36.803.803v3.208c0 .443-.36.802-.802.802","fill","#FFF","mask","url(#d)"],["d","M224.928 160.464H153.78a3.218 3.218 0 0 1-3.208-3.209v-18.967a3.219 3.219 0 0 1 3.208-3.209h71.148a3.219 3.219 0 0 1 3.209 3.209v18.967a3.218 3.218 0 0 1-3.21 3.209","fill","#BFCDDD","mask","url(#d)"],["d","M173.455 130.832h49.301M164.984 130.832h6.089M155.952 130.832h6.75M173.837 160.613h49.3M165.365 160.613h6.089M155.57 160.613h6.751","stroke","#7C90A5","strokeWidth","1.124","strokeLinecap","round","strokeLinejoin","round","mask","url(#d)"],["d","M159.563 151.038a2.407 2.407 0 1 1 0-4.814 2.407 2.407 0 0 1 0 4.814M166.98 151.038a2.407 2.407 0 1 1 0-4.814 2.407 2.407 0 0 1 0 4.814M174.397 151.038a2.407 2.407 0 1 1 .001-4.814 2.407 2.407 0 0 1 0 4.814M222.539 151.038h-22.461a.802.802 0 0 1-.802-.802v-3.209c0-.443.359-.802.802-.802h22.46c.444 0 .803.36.803.802v3.209c0 .443-.36.802-.802.802M159.563 179.987a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M166.98 179.987a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M174.397 179.987a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M222.539 179.987h-22.461a.802.802 0 0 1-.802-.802v-3.209c0-.443.359-.802.802-.802h22.46c.444 0 .803.36.803.802v3.209c0 .443-.36.802-.802.802","fill","#FFF","mask","url(#d)"],["d","M203.04 221.108h-27.372a2.413 2.413 0 0 1-2.406-2.407v-11.448a2.414 2.414 0 0 1 2.406-2.407h27.372a2.414 2.414 0 0 1 2.407 2.407V218.7a2.413 2.413 0 0 1-2.407 2.407","fill","#BFCDDD","mask","url(#d)"],["d","M177.259 207.217v11.52M201.05 207.217v11.52","stroke","#A3B4C6","strokeWidth","1.124","strokeLinecap","round","strokeLinejoin","round","mask","url(#d)"],["d","M162.873 267.894a9.422 9.422 0 0 1-9.422-9.422v-14.82a9.423 9.423 0 0 1 18.845 0v14.82a9.423 9.423 0 0 1-9.423 9.422","fill","#5BA02E","mask","url(#d)"],["d","M171.22 267.83a9.422 9.422 0 0 1-9.422-9.423v-3.438a9.423 9.423 0 0 1 18.845 0v3.438a9.423 9.423 0 0 1-9.422 9.423","fill","#92C110","mask","url(#d)"],["d","M181.31 293.666h-27.712a3.209 3.209 0 0 1-3.209-3.21V269.79a3.209 3.209 0 0 1 3.209-3.21h27.711a3.209 3.209 0 0 1 3.209 3.21v20.668a3.209 3.209 0 0 1-3.209 3.209","fill","#F2D7AD","mask","url(#d)"]],template:function(t,n){1&t&&(C.O4$(),C.TgZ(0,"svg",0)(1,"defs"),C._UZ(2,"path",1)(3,"path",2),C.qZA(),C.TgZ(4,"g",3)(5,"g",4),C._UZ(6,"mask",5)(7,"path",6),C.qZA(),C._UZ(8,"path",7)(9,"path",8)(10,"path",9)(11,"path",10)(12,"path",11)(13,"path",12)(14,"path",13)(15,"path",14)(16,"path",15)(17,"path",16)(18,"path",17)(19,"path",18)(20,"path",19)(21,"path",20)(22,"path",21)(23,"path",22)(24,"path",23)(25,"path",24)(26,"path",25)(27,"path",26)(28,"path",27)(29,"path",28)(30,"path",29)(31,"path",30)(32,"path",31)(33,"path",32)(34,"path",33)(35,"path",34)(36,"path",35)(37,"path",36)(38,"path",37)(39,"path",38)(40,"path",39)(41,"path",40)(42,"path",41)(43,"path",42)(44,"path",43)(45,"path",44)(46,"path",45)(47,"path",46)(48,"path",47)(49,"path",48)(50,"path",49)(51,"path",50)(52,"path",51)(53,"path",52)(54,"path",53)(55,"path",54)(56,"path",55)(57,"mask",5)(58,"path",56)(59,"path",57)(60,"path",58)(61,"path",59)(62,"path",60)(63,"path",61)(64,"path",62)(65,"path",63)(66,"path",64)(67,"path",65)(68,"path",66),C.qZA()())},encapsulation:2,changeDetection:0}),e})(),sr=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=C.Xpm({type:e,selectors:[["nz-result-unauthorized"]],exportAs:["nzResultUnauthorized"],decls:56,vars:0,consts:[["width","251","height","294"],["fill","none","fillRule","evenodd"],["d","M0 129.023v-2.084C0 58.364 55.591 2.774 124.165 2.774h2.085c68.574 0 124.165 55.59 124.165 124.165v2.084c0 68.575-55.59 124.166-124.165 124.166h-2.085C55.591 253.189 0 197.598 0 129.023","fill","#E4EBF7"],["d","M41.417 132.92a8.231 8.231 0 1 1-16.38-1.65 8.231 8.231 0 0 1 16.38 1.65","fill","#FFF"],["d","M38.652 136.36l10.425 5.91M49.989 148.505l-12.58 10.73","stroke","#FFF","strokeWidth","2"],["d","M41.536 161.28a5.636 5.636 0 1 1-11.216-1.13 5.636 5.636 0 0 1 11.216 1.13M59.154 145.261a5.677 5.677 0 1 1-11.297-1.138 5.677 5.677 0 0 1 11.297 1.138M100.36 29.516l29.66-.013a4.562 4.562 0 1 0-.004-9.126l-29.66.013a4.563 4.563 0 0 0 .005 9.126M111.705 47.754l29.659-.013a4.563 4.563 0 1 0-.004-9.126l-29.66.013a4.563 4.563 0 1 0 .005 9.126","fill","#FFF"],["d","M114.066 29.503V29.5l15.698-.007a4.563 4.563 0 1 0 .004 9.126l-15.698.007v-.002a4.562 4.562 0 0 0-.004-9.122M185.405 137.723c-.55 5.455-5.418 9.432-10.873 8.882-5.456-.55-9.432-5.418-8.882-10.873.55-5.455 5.418-9.432 10.873-8.882 5.455.55 9.432 5.418 8.882 10.873","fill","#FFF"],["d","M180.17 143.772l12.572 7.129M193.841 158.42L178.67 171.36","stroke","#FFF","strokeWidth","2"],["d","M185.55 171.926a6.798 6.798 0 1 1-13.528-1.363 6.798 6.798 0 0 1 13.527 1.363M204.12 155.285a6.848 6.848 0 1 1-13.627-1.375 6.848 6.848 0 0 1 13.626 1.375","fill","#FFF"],["d","M152.988 194.074a2.21 2.21 0 1 1-4.42 0 2.21 2.21 0 0 1 4.42 0zM225.931 118.217a2.21 2.21 0 1 1-4.421 0 2.21 2.21 0 0 1 4.421 0zM217.09 153.051a2.21 2.21 0 1 1-4.421 0 2.21 2.21 0 0 1 4.42 0zM177.84 109.842a2.21 2.21 0 1 1-4.422 0 2.21 2.21 0 0 1 4.421 0zM196.114 94.454a2.21 2.21 0 1 1-4.421 0 2.21 2.21 0 0 1 4.421 0zM202.844 182.523a2.21 2.21 0 1 1-4.42 0 2.21 2.21 0 0 1 4.42 0z","stroke","#FFF","strokeWidth","2"],["stroke","#FFF","strokeWidth","2","d","M215.125 155.262l-1.902 20.075-10.87 5.958M174.601 176.636l-6.322 9.761H156.98l-4.484 6.449M175.874 127.28V111.56M221.51 119.404l-12.77 7.859-15.228-7.86V96.668"],["d","M180.68 29.32C180.68 13.128 193.806 0 210 0c16.193 0 29.32 13.127 29.32 29.32 0 16.194-13.127 29.322-29.32 29.322-16.193 0-29.32-13.128-29.32-29.321","fill","#A26EF4"],["d","M221.45 41.706l-21.563-.125a1.744 1.744 0 0 1-1.734-1.754l.071-12.23a1.744 1.744 0 0 1 1.754-1.734l21.562.125c.964.006 1.74.791 1.735 1.755l-.071 12.229a1.744 1.744 0 0 1-1.754 1.734","fill","#FFF"],["d","M215.106 29.192c-.015 2.577-2.049 4.654-4.543 4.64-2.494-.014-4.504-2.115-4.489-4.693l.04-6.925c.016-2.577 2.05-4.654 4.543-4.64 2.494.015 4.504 2.116 4.49 4.693l-.04 6.925zm-4.53-14.074a6.877 6.877 0 0 0-6.916 6.837l-.043 7.368a6.877 6.877 0 0 0 13.754.08l.042-7.368a6.878 6.878 0 0 0-6.837-6.917zM167.566 68.367h-3.93a4.73 4.73 0 0 1-4.717-4.717 4.73 4.73 0 0 1 4.717-4.717h3.93a4.73 4.73 0 0 1 4.717 4.717 4.73 4.73 0 0 1-4.717 4.717","fill","#FFF"],["d","M168.214 248.838a6.611 6.611 0 0 1-6.61-6.611v-66.108a6.611 6.611 0 0 1 13.221 0v66.108a6.611 6.611 0 0 1-6.61 6.61","fill","#5BA02E"],["d","M176.147 248.176a6.611 6.611 0 0 1-6.61-6.61v-33.054a6.611 6.611 0 1 1 13.221 0v33.053a6.611 6.611 0 0 1-6.61 6.611","fill","#92C110"],["d","M185.994 293.89h-27.376a3.17 3.17 0 0 1-3.17-3.17v-45.887a3.17 3.17 0 0 1 3.17-3.17h27.376a3.17 3.17 0 0 1 3.17 3.17v45.886a3.17 3.17 0 0 1-3.17 3.17","fill","#F2D7AD"],["d","M81.972 147.673s6.377-.927 17.566-1.28c11.729-.371 17.57 1.086 17.57 1.086s3.697-3.855.968-8.424c1.278-12.077 5.982-32.827.335-48.273-1.116-1.339-3.743-1.512-7.536-.62-1.337.315-7.147-.149-7.983-.1l-15.311-.347s-3.487-.17-8.035-.508c-1.512-.113-4.227-1.683-5.458-.338-.406.443-2.425 5.669-1.97 16.077l8.635 35.642s-3.141 3.61 1.219 7.085","fill","#FFF"],["d","M75.768 73.325l-.9-6.397 11.982-6.52s7.302-.118 8.038 1.205c.737 1.324-5.616.993-5.616.993s-1.836 1.388-2.615 2.5c-1.654 2.363-.986 6.471-8.318 5.986-1.708.284-2.57 2.233-2.57 2.233","fill","#FFC6A0"],["d","M52.44 77.672s14.217 9.406 24.973 14.444c1.061.497-2.094 16.183-11.892 11.811-7.436-3.318-20.162-8.44-21.482-14.496-.71-3.258 2.543-7.643 8.401-11.76M141.862 80.113s-6.693 2.999-13.844 6.876c-3.894 2.11-10.137 4.704-12.33 7.988-6.224 9.314 3.536 11.22 12.947 7.503 6.71-2.651 28.999-12.127 13.227-22.367","fill","#FFB594"],["d","M76.166 66.36l3.06 3.881s-2.783 2.67-6.31 5.747c-7.103 6.195-12.803 14.296-15.995 16.44-3.966 2.662-9.754 3.314-12.177-.118-3.553-5.032.464-14.628 31.422-25.95","fill","#FFC6A0"],["d","M64.674 85.116s-2.34 8.413-8.912 14.447c.652.548 18.586 10.51 22.144 10.056 5.238-.669 6.417-18.968 1.145-20.531-.702-.208-5.901-1.286-8.853-2.167-.87-.26-1.611-1.71-3.545-.936l-1.98-.869zM128.362 85.826s5.318 1.956 7.325 13.734c-.546.274-17.55 12.35-21.829 7.805-6.534-6.94-.766-17.393 4.275-18.61 4.646-1.121 5.03-1.37 10.23-2.929","fill","#FFF"],["d","M78.18 94.656s.911 7.41-4.914 13.078","stroke","#E4EBF7","strokeWidth","1.051","strokeLinecap","round","strokeLinejoin","round"],["d","M87.397 94.68s3.124 2.572 10.263 2.572c7.14 0 9.074-3.437 9.074-3.437","stroke","#E4EBF7","strokeWidth",".932","strokeLinecap","round","strokeLinejoin","round"],["d","M117.184 68.639l-6.781-6.177s-5.355-4.314-9.223-.893c-3.867 3.422 4.463 2.083 5.653 4.165 1.19 2.082.848 1.143-2.083.446-5.603-1.331-2.082.893 2.975 5.355 2.091 1.845 6.992.955 6.992.955l2.467-3.851z","fill","#FFC6A0"],["d","M105.282 91.315l-.297-10.937-15.918-.027-.53 10.45c-.026.403.17.788.515.999 2.049 1.251 9.387 5.093 15.799.424.287-.21.443-.554.431-.91","fill","#FFB594"],["d","M107.573 74.24c.817-1.147.982-9.118 1.015-11.928a1.046 1.046 0 0 0-.965-1.055l-4.62-.365c-7.71-1.044-17.071.624-18.253 6.346-5.482 5.813-.421 13.244-.421 13.244s1.963 3.566 4.305 6.791c.756 1.041.398-3.731 3.04-5.929 5.524-4.594 15.899-7.103 15.899-7.103","fill","#5C2552"],["d","M88.426 83.206s2.685 6.202 11.602 6.522c7.82.28 8.973-7.008 7.434-17.505l-.909-5.483c-6.118-2.897-15.478.54-15.478.54s-.576 2.044-.19 5.504c-2.276 2.066-1.824 5.618-1.824 5.618s-.905-1.922-1.98-2.321c-.86-.32-1.897.089-2.322 1.98-1.04 4.632 3.667 5.145 3.667 5.145","fill","#FFC6A0"],["stroke","#DB836E","strokeWidth","1.145","strokeLinecap","round","strokeLinejoin","round","d","M100.843 77.099l1.701-.928-1.015-4.324.674-1.406"],["d","M105.546 74.092c-.022.713-.452 1.279-.96 1.263-.51-.016-.904-.607-.882-1.32.021-.713.452-1.278.96-1.263.51.016.904.607.882 1.32M97.592 74.349c-.022.713-.452 1.278-.961 1.263-.509-.016-.904-.607-.882-1.32.022-.713.452-1.279.961-1.263.51.016.904.606.882 1.32","fill","#552950"],["d","M91.132 86.786s5.269 4.957 12.679 2.327","stroke","#DB836E","strokeWidth","1.145","strokeLinecap","round","strokeLinejoin","round"],["d","M99.776 81.903s-3.592.232-1.44-2.79c1.59-1.496 4.897-.46 4.897-.46s1.156 3.906-3.457 3.25","fill","#DB836E"],["d","M102.88 70.6s2.483.84 3.402.715M93.883 71.975s2.492-1.144 4.778-1.073","stroke","#5C2552","strokeWidth","1.526","strokeLinecap","round","strokeLinejoin","round"],["d","M86.32 77.374s.961.879 1.458 2.106c-.377.48-1.033 1.152-.236 1.809M99.337 83.719s1.911.151 2.509-.254","stroke","#DB836E","strokeWidth","1.145","strokeLinecap","round","strokeLinejoin","round"],["d","M87.782 115.821l15.73-3.012M100.165 115.821l10.04-2.008","stroke","#E4EBF7","strokeWidth","1.051","strokeLinecap","round","strokeLinejoin","round"],["d","M66.508 86.763s-1.598 8.83-6.697 14.078","stroke","#E4EBF7","strokeWidth","1.114","strokeLinecap","round","strokeLinejoin","round"],["d","M128.31 87.934s3.013 4.121 4.06 11.785","stroke","#E4EBF7","strokeWidth","1.051","strokeLinecap","round","strokeLinejoin","round"],["d","M64.09 84.816s-6.03 9.912-13.607 9.903","stroke","#DB836E","strokeWidth",".795","strokeLinecap","round","strokeLinejoin","round"],["d","M112.366 65.909l-.142 5.32s5.993 4.472 11.945 9.202c4.482 3.562 8.888 7.455 10.985 8.662 4.804 2.766 8.9 3.355 11.076 1.808 4.071-2.894 4.373-9.878-8.136-15.263-4.271-1.838-16.144-6.36-25.728-9.73","fill","#FFC6A0"],["d","M130.532 85.488s4.588 5.757 11.619 6.214","stroke","#DB836E","strokeWidth",".75","strokeLinecap","round","strokeLinejoin","round"],["d","M121.708 105.73s-.393 8.564-1.34 13.612","stroke","#E4EBF7","strokeWidth","1.051","strokeLinecap","round","strokeLinejoin","round"],["d","M115.784 161.512s-3.57-1.488-2.678-7.14","stroke","#648BD8","strokeWidth","1.051","strokeLinecap","round","strokeLinejoin","round"],["d","M101.52 290.246s4.326 2.057 7.408 1.03c2.842-.948 4.564.673 7.132 1.186 2.57.514 6.925 1.108 11.772-1.269-.104-5.551-6.939-4.01-12.048-6.763-2.582-1.39-3.812-4.757-3.625-8.863h-9.471s-1.402 10.596-1.169 14.68","fill","#CBD1D1"],["d","M101.496 290.073s2.447 1.281 6.809.658c3.081-.44 3.74.485 7.479 1.039 3.739.554 10.802-.07 11.91-.9.415 1.108-.347 2.077-.347 2.077s-1.523.608-4.847.831c-2.045.137-5.843.293-7.663-.507-1.8-1.385-5.286-1.917-5.77-.243-3.947.958-7.41-.288-7.41-.288l-.16-2.667z","fill","#2B0849"],["d","M108.824 276.19h3.116s-.103 6.751 4.57 8.62c-4.673.624-8.62-2.32-7.686-8.62","fill","#A4AABA"],["d","M57.65 272.52s-2.122 7.47-4.518 12.396c-1.811 3.724-4.255 7.548 5.505 7.548 6.698 0 9.02-.483 7.479-6.648-1.541-6.164.268-13.296.268-13.296H57.65z","fill","#CBD1D1"],["d","M51.54 290.04s2.111 1.178 6.682 1.178c6.128 0 8.31-1.662 8.31-1.662s.605 1.122-.624 2.18c-1 .862-3.624 1.603-7.444 1.559-4.177-.049-5.876-.57-6.786-1.177-.831-.554-.692-1.593-.138-2.078","fill","#2B0849"],["d","M58.533 274.438s.034 1.529-.315 2.95c-.352 1.431-1.087 3.127-1.139 4.17-.058 1.16 4.57 1.592 5.194.035.623-1.559 1.303-6.475 1.927-7.306.622-.831-4.94-2.135-5.667.15","fill","#A4AABA"],["d","M100.885 277.015l13.306.092s1.291-54.228 1.843-64.056c.552-9.828 3.756-43.13.997-62.788l-12.48-.64-22.725.776s-.433 3.944-1.19 9.921c-.062.493-.677.838-.744 1.358-.075.582.42 1.347.318 1.956-2.35 14.003-6.343 32.926-8.697 46.425-.116.663-1.227 1.004-1.45 2.677-.04.3.21 1.516.112 1.785-6.836 18.643-10.89 47.584-14.2 61.551l14.528-.014s2.185-8.524 4.008-16.878c2.796-12.817 22.987-84.553 22.987-84.553l3-.517 1.037 46.1s-.223 1.228.334 2.008c.558.782-.556 1.117-.39 2.233l.39 1.784s-.446 7.14-.892 11.826c-.446 4.685-.092 38.954-.092 38.954","fill","#7BB2F9"],["d","M77.438 220.434c1.146.094 4.016-2.008 6.916-4.91M107.55 223.931s2.758-1.103 6.069-3.862","stroke","#648BD8","strokeWidth","1.051","strokeLinecap","round","strokeLinejoin","round"],["d","M108.459 220.905s2.759-1.104 6.07-3.863","stroke","#648BD8","strokeLinecap","round","strokeLinejoin","round"],["d","M76.099 223.557s2.608-.587 6.47-3.346M87.33 150.82c-.27 3.088.297 8.478-4.315 9.073M104.829 149.075s.11 13.936-1.286 14.983c-2.207 1.655-2.975 1.934-2.975 1.934M101.014 149.63s.035 12.81-1.19 24.245M94.93 174.965s7.174-1.655 9.38-1.655M75.671 204.754c-.316 1.55-.64 3.067-.973 4.535 0 0-1.45 1.822-1.003 3.756.446 1.934-.943 2.034-4.96 15.273-1.686 5.559-4.464 18.49-6.313 27.447-.078.38-4.018 18.06-4.093 18.423M77.043 196.743a313.269 313.269 0 0 1-.877 4.729M83.908 151.414l-1.19 10.413s-1.091.148-.496 2.23c.111 1.34-2.66 15.692-5.153 30.267M57.58 272.94h13.238","stroke","#648BD8","strokeWidth","1.051","strokeLinecap","round","strokeLinejoin","round"],["d","M117.377 147.423s-16.955-3.087-35.7.199c.157 2.501-.002 4.128-.002 4.128s14.607-2.802 35.476-.31c.251-2.342.226-4.017.226-4.017","fill","#192064"],["d","M107.511 150.353l.004-4.885a.807.807 0 0 0-.774-.81c-2.428-.092-5.04-.108-7.795-.014a.814.814 0 0 0-.784.81l-.003 4.88c0 .456.371.82.827.808a140.76 140.76 0 0 1 7.688.017.81.81 0 0 0 .837-.806","fill","#FFF"],["d","M106.402 149.426l.002-3.06a.64.64 0 0 0-.616-.643 94.135 94.135 0 0 0-5.834-.009.647.647 0 0 0-.626.643l-.001 3.056c0 .36.291.648.651.64 1.78-.04 3.708-.041 5.762.012.36.009.662-.279.662-.64","fill","#192064"],["d","M101.485 273.933h12.272M102.652 269.075c.006 3.368.04 5.759.11 6.47M102.667 263.125c-.009 1.53-.015 2.98-.016 4.313M102.204 174.024l.893 44.402s.669 1.561-.224 2.677c-.892 1.116 2.455.67.893 2.231-1.562 1.562.893 1.116 0 3.347-.592 1.48-.988 20.987-1.09 34.956","stroke","#648BD8","strokeWidth","1.051","strokeLinecap","round","strokeLinejoin","round"]],template:function(t,n){1&t&&(C.O4$(),C.TgZ(0,"svg",0)(1,"g",1),C._UZ(2,"path",2)(3,"path",3)(4,"path",4)(5,"path",5)(6,"path",6)(7,"path",7)(8,"path",8)(9,"path",9)(10,"path",10)(11,"path",11)(12,"path",12)(13,"path",13)(14,"path",14)(15,"path",15)(16,"path",16)(17,"path",17)(18,"path",18)(19,"path",19)(20,"path",20)(21,"path",21)(22,"path",22)(23,"path",23)(24,"path",24)(25,"path",25)(26,"path",26)(27,"path",27)(28,"path",28)(29,"path",29)(30,"path",30)(31,"path",31)(32,"path",32)(33,"path",33)(34,"path",34)(35,"path",35)(36,"path",36)(37,"path",37)(38,"path",38)(39,"path",39)(40,"path",40)(41,"path",41)(42,"path",42)(43,"path",43)(44,"path",44)(45,"path",45)(46,"path",46)(47,"path",47)(48,"path",48)(49,"path",49)(50,"path",50)(51,"path",51)(52,"path",52)(53,"path",53)(54,"path",54)(55,"path",55),C.qZA()())},encapsulation:2,changeDetection:0}),e})(),zr=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=C.lG2({type:e,selectors:[["div","nz-result-extra",""]],hostAttrs:[1,"ant-result-extra"],exportAs:["nzResultExtra"]}),e})();const xn={success:"check-circle",error:"close-circle",info:"exclamation-circle",warning:"warning"},na=["404","500","403"];let oi=(()=>{class e{constructor(t,n){this.cdr=t,this.directionality=n,this.nzStatus="info",this.isException=!1,this.dir="ltr",this.destroy$=new Ce.x}ngOnInit(){this.directionality.change?.pipe((0,we.R)(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.dir=this.directionality.value}ngOnChanges(){this.setStatusIcon()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}setStatusIcon(){const t=this.nzIcon;this.isException=-1!==na.indexOf(this.nzStatus),this.icon=t?"string"==typeof t&&xn[t]||t:this.isException?void 0:xn[this.nzStatus]}}return e.\u0275fac=function(t){return new(t||e)(C.Y36(C.sBO),C.Y36(bt.Is,8))},e.\u0275cmp=C.Xpm({type:e,selectors:[["nz-result"]],hostAttrs:[1,"ant-result"],hostVars:10,hostBindings:function(t,n){2&t&&C.ekj("ant-result-success","success"===n.nzStatus)("ant-result-error","error"===n.nzStatus)("ant-result-info","info"===n.nzStatus)("ant-result-warning","warning"===n.nzStatus)("ant-result-rtl","rtl"===n.dir)},inputs:{nzIcon:"nzIcon",nzTitle:"nzTitle",nzStatus:"nzStatus",nzSubTitle:"nzSubTitle",nzExtra:"nzExtra"},exportAs:["nzResult"],features:[C.TTD],ngContentSelectors:Qe,decls:11,vars:8,consts:[[1,"ant-result-icon"],[4,"ngIf","ngIfElse"],[4,"ngIf"],["class","ant-result-extra",4,"ngIf"],["exceptionTpl",""],[4,"nzStringTemplateOutlet"],["nz-icon","","nzTheme","fill",3,"nzType"],["class","ant-result-title",4,"nzStringTemplateOutlet"],[1,"ant-result-title"],["class","ant-result-subtitle",4,"nzStringTemplateOutlet"],[1,"ant-result-subtitle"],[1,"ant-result-extra"],[3,"ngSwitch"],[4,"ngSwitchCase"]],template:function(t,n){if(1&t&&(C.F$t(qe),C.TgZ(0,"div",0),C.YNc(1,R,3,2,"ng-container",1),C.qZA(),C.YNc(2,V,2,1,"ng-container",2),C.YNc(3,lt,1,0,"ng-content",2),C.YNc(4,St,2,1,"ng-container",2),C.YNc(5,Gt,1,0,"ng-content",2),C.Hsn(6),C.YNc(7,ie,2,1,"div",3),C.YNc(8,Ee,1,0,"ng-content",2),C.YNc(9,ke,4,4,"ng-template",null,4,C.W1O)),2&t){const i=C.MAs(10);C.xp6(1),C.Q6J("ngIf",!n.isException)("ngIfElse",i),C.xp6(1),C.Q6J("ngIf",n.nzTitle),C.xp6(1),C.Q6J("ngIf",!n.nzTitle),C.xp6(1),C.Q6J("ngIf",n.nzSubTitle),C.xp6(1),C.Q6J("ngIf",!n.nzSubTitle),C.xp6(2),C.Q6J("ngIf",n.nzExtra),C.xp6(1),C.Q6J("ngIf",!n.nzExtra)}},dependencies:[Ct.O5,Ct.RF,Ct.n9,re.f,q.Ls,er,Ye,sr],encapsulation:2,changeDetection:0}),e})(),Ol=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=C.oAB({type:e}),e.\u0275inj=C.cJS({imports:[bt.vT,Ct.ez,re.T,q.PV]}),e})();var jo=ct(4788),Ps=ct(8440),Pi=ct(5635),ks=ct(8395);const ts=["tree"];function Yu(e,r){1&e&&C._UZ(0,"i",7)}let Rl=(()=>{class e{constructor(t,n){this.dataService=t,this.handlerService=n,this.loading=!1}ngOnInit(){this.multiple=this.dimension.type===Ut.REFERENCE_MULTI||this.dimension.type===Ut.REFERENCE_TREE_MULTI;let t=this.dimension.type==Ut.REFERENCE_TREE_MULTI||this.dimension.type==Ut.REFERENCE_TREE_RADIO;this.loading=!0,this.dataService.getBiReference(this.code,this.dimension.id,this.handlerService.buildDimParam(this.bi,!1,!0)).subscribe(n=>{if(n){if(t)this.data=this.recursiveTree(n,null);else{let i=[];n.forEach(l=>{i.push({isLeaf:!0,key:l.id,title:l.title})}),this.data=i}if(this.multiple&&(this.data=[{key:null,title:"\u5168\u90e8",expanded:!0,children:this.data,all:!0}]),this.dimension.$value)switch(this.dimension.type){case Ut.REFERENCE:this.data.forEach(i=>{i.key==this.dimension.$value&&(i.selected=!0)});break;case Ut.REFERENCE_MULTI:this.data[0].children.forEach(i=>{-1!=this.dimension.$value.indexOf(i.key)&&(i.checked=!0)});break;case Ut.REFERENCE_TREE_RADIO:this.findAllNode(this.data).forEach(i=>{i.key==this.dimension.$value&&(i.selected=!0)});break;case Ut.REFERENCE_TREE_MULTI:this.findAllNode(this.data).forEach(i=>{-1!=this.dimension.$value.indexOf(i.key)&&(i.checked=!0)})}}else this.data=[];this.loading=!1})}recursiveTree(t,n){let i=[];return t.forEach(l=>{if(l.pid==n){let c={key:l.id,title:l.title,expanded:!0,children:this.recursiveTree(t,l.id)};c.isLeaf=!c.children.length,i.push(c)}}),i}nodeClickEvent(t){this.dimension.$viewValue=t.node.origin.title,this.dimension.$value=t.node.origin.key}nodeCheck(t){let n=this.findAllNode(t.checkedKeys),i=[],l=[];n.forEach(c=>{c.origin.key&&(l.push(c.origin.key),i.push(c.origin.title))}),this.dimension.$value=l.length+1===this.findAllNode(this.data).length?[]:l,this.dimension.$viewValue=i.join(" | ")}findAllNode(t,n=[]){return t.forEach(i=>{i.children&&this.findAllNode(i.children,n),n.push(i)}),n}}return e.\u0275fac=function(t){return new(t||e)(C.Y36(Rt),C.Y36(Ht))},e.\u0275cmp=C.Xpm({type:e,selectors:[["erupt-reference-select"]],viewQuery:function(t,n){if(1&t&&C.Gf(ts,5),2&t){let i;C.iGM(i=C.CRH())&&(n.tree=i.first)}},inputs:{dimension:"dimension",code:"code",bi:"bi"},decls:9,vars:9,consts:[[3,"nzSpinning"],[1,"mb-sm",2,"width","100%",3,"nzSuffix"],["type","text","nz-input","","placeholder","Search",3,"ngModel","ngModelChange"],["searchSuffixIcon",""],[2,"max-height","450px","min-height","300px","overflow","auto"],["nzDraggable","",1,"tree-container",3,"nzCheckStrictly","nzCheckable","nzShowLine","nzHideUnMatched","nzData","nzSearchValue","nzClick","nzCheckBoxChange"],["tree",""],["nz-icon","","nzType","search"]],template:function(t,n){if(1&t&&(C.TgZ(0,"nz-spin",0)(1,"nz-input-group",1)(2,"input",2),C.NdJ("ngModelChange",function(l){return n.searchValue=l}),C.qZA()(),C.YNc(3,Yu,1,0,"ng-template",null,3,C.W1O),C._UZ(5,"br"),C.TgZ(6,"div",4)(7,"nz-tree",5,6),C.NdJ("nzClick",function(l){return n.multiple||n.nodeClickEvent(l)})("nzCheckBoxChange",function(l){return n.nodeCheck(l)}),C.qZA()()()),2&t){const i=C.MAs(4);C.Q6J("nzSpinning",n.loading),C.xp6(1),C.Q6J("nzSuffix",i),C.xp6(1),C.Q6J("ngModel",n.searchValue),C.xp6(5),C.Q6J("nzCheckStrictly",!1)("nzCheckable",n.multiple)("nzShowLine",!0)("nzHideUnMatched",!0)("nzData",n.data)("nzSearchValue",n.searchValue)}},dependencies:[U.Fj,U.JJ,U.On,mt.w,q.Ls,Pi.Zp,Pi.gB,Pi.ke,Jt.W,ks.Hc],encapsulation:2}),e})();var zs=ct(5439),Wu=ct(7254),wv=ct(7570),I0=ct(8231),Fl=ct(834),O0=ct(4685),dh=ct(7096),ph=ct(6704),R0=ct(8521),_v=ct(6581);function F0(e,r){1&e&&(C.TgZ(0,"label",6),C._uU(1),C.ALo(2,"translate"),C.qZA()),2&e&&(C.Q6J("nzValue",null),C.xp6(1),C.Oqu(C.lcZ(2,2,"global.check_none")))}function D0(e,r){if(1&e&&(C.TgZ(0,"label",6),C._uU(1),C.qZA()),2&e){const t=r.$implicit;C.Q6J("nzValue",t.id),C.xp6(1),C.Oqu(t.title)}}function B0(e,r){if(1&e){const t=C.EpF();C.ynx(0),C.TgZ(1,"nz-radio-group",3),C.NdJ("ngModelChange",function(i){C.CHM(t);const l=C.oxw();return C.KtG(l.dim.$value=i)}),C.YNc(2,F0,3,4,"label",4),C.YNc(3,D0,2,2,"label",5),C.qZA(),C.BQk()}if(2&e){const t=C.oxw();C.xp6(1),C.Q6J("ngModel",t.dim.$value)("name",t.dim.code),C.xp6(1),C.Q6J("ngIf",!t.dim.notNull),C.xp6(1),C.Q6J("ngForOf",t.data)}}function c2(e,r){if(1&e&&(C.TgZ(0,"label",10),C._uU(1),C.qZA()),2&e){const t=r.$implicit,n=C.oxw(2);C.Q6J("nzChecked",n.dim.$viewValue)("nzValue",t.id),C.xp6(1),C.Oqu(t.title)}}function P0(e,r){if(1&e){const t=C.EpF();C.ynx(0),C.TgZ(1,"label",7),C.NdJ("nzCheckedChange",function(i){C.CHM(t);const l=C.oxw();return C.KtG(l.dim.$viewValue=i)})("nzCheckedChange",function(i){C.CHM(t);const l=C.oxw();return C.KtG(l.checkedChangeAll(i))}),C._uU(2),C.ALo(3,"translate"),C.qZA(),C.TgZ(4,"nz-checkbox-wrapper",8),C.NdJ("nzOnChange",function(i){C.CHM(t);const l=C.oxw();return C.KtG(l.checkedChange(i))}),C.YNc(5,c2,2,3,"label",9),C.qZA(),C.BQk()}if(2&e){const t=C.oxw();C.xp6(1),C.Q6J("nzChecked",t.dim.$viewValue),C.xp6(1),C.Oqu(C.lcZ(3,3,"global.check_all")),C.xp6(3),C.Q6J("ngForOf",t.data)}}let k0=(()=>{class e{constructor(t){this.dataService=t,this.dimType=Ut}ngOnInit(){this.loading=!0,this.dataService.getBiReference(this.bi.code,this.dim.id,null).subscribe(t=>{this.data=t,this.loading=!1})}checkedChange(t){this.dim.$value=t}checkedChangeAll(t){this.dim.$viewValue=t,this.dim.$value=[]}}return e.\u0275fac=function(t){return new(t||e)(C.Y36(Rt))},e.\u0275cmp=C.Xpm({type:e,selectors:[["erupt-bi-choice"]],inputs:{dim:"dim",bi:"bi"},decls:4,vars:4,consts:[[3,"nzSpinning"],[3,"ngSwitch"],[4,"ngSwitchCase"],[3,"ngModel","name","ngModelChange"],["nz-radio","",3,"nzValue",4,"ngIf"],["nz-radio","",3,"nzValue",4,"ngFor","ngForOf"],["nz-radio","",3,"nzValue"],["nz-checkbox","",3,"nzChecked","nzCheckedChange"],[3,"nzOnChange"],["nz-checkbox","",3,"nzChecked","nzValue",4,"ngFor","ngForOf"],["nz-checkbox","",3,"nzChecked","nzValue"]],template:function(t,n){1&t&&(C.TgZ(0,"nz-spin",0),C.ynx(1,1),C.YNc(2,B0,4,4,"ng-container",2),C.YNc(3,P0,6,5,"ng-container",2),C.BQk(),C.qZA()),2&t&&(C.Q6J("nzSpinning",n.loading),C.xp6(1),C.Q6J("ngSwitch",n.dim.type),C.xp6(1),C.Q6J("ngSwitchCase",n.dimType.REFERENCE_RADIO),C.xp6(1),C.Q6J("ngSwitchCase",n.dimType.REFERENCE_CHECKBOX))},dependencies:[Ct.sg,Ct.O5,Ct.RF,Ct.n9,U.JJ,U.On,P.Ie,P.EZ,R0.Of,R0.Dg,Jt.W,_v.C],styles:["label[nz-radio][_ngcontent-%COMP%]{min-width:120px;margin-right:0}label[nz-checkbox][_ngcontent-%COMP%]{min-width:120px;line-height:32px;margin-left:0}"]}),e})();var E=ct(655),Ci=ct(9521),es=ct(8184),Sv=ct(1135),z0=ct(9646),Mv=ct(9751),gh=ct(4968),rs=ct(515),Tv=ct(1884),Dl=ct(1365),yh=ct(4004),N0=ct(8675),h2=ct(3900),f2=ct(2539),mh=ct(2536),xh=ct(1691),bv=ct(3303),ka=ct(3187),H0=ct(7218),G0=ct(4896),Ch=ct(4903),Ns=ct(9570);const Av=["nz-cascader-option",""];function Ev(e,r){}const Y0=function(e,r){return{$implicit:e,index:r}};function W0(e,r){if(1&e&&(C.ynx(0),C.YNc(1,Ev,0,0,"ng-template",3),C.BQk()),2&e){const t=C.oxw();C.xp6(1),C.Q6J("ngTemplateOutlet",t.optionTemplate)("ngTemplateOutletContext",C.WLB(2,Y0,t.option,t.columnIndex))}}function U0(e,r){if(1&e&&(C._UZ(0,"div",4),C.ALo(1,"nzHighlight")),2&e){const t=C.oxw();C.Q6J("innerHTML",C.gM2(1,1,t.optionLabel,t.highlightText,"g","ant-cascader-menu-item-keyword"),C.oJD)}}function Bl(e,r){1&e&&C._UZ(0,"span",8)}function Pl(e,r){if(1&e&&(C.ynx(0),C._UZ(1,"span",10),C.BQk()),2&e){const t=C.oxw(3);C.xp6(1),C.Q6J("nzType",t.expandIcon)}}function kl(e,r){if(1&e&&C.YNc(0,Pl,2,1,"ng-container",9),2&e){const t=C.oxw(2);C.Q6J("nzStringTemplateOutlet",t.expandIcon)}}function Lv(e,r){if(1&e&&(C.TgZ(0,"div",5),C.YNc(1,Bl,1,0,"span",6),C.YNc(2,kl,1,1,"ng-template",null,7,C.W1O),C.qZA()),2&e){const t=C.MAs(3),n=C.oxw();C.xp6(1),C.Q6J("ngIf",n.option.loading)("ngIfElse",t)}}const Uu=["selectContainer"],zl=["input"],Xu=["menu"];function Hs(e,r){if(1&e&&(C.ynx(0),C._uU(1),C.BQk()),2&e){const t=C.oxw(3);C.xp6(1),C.Oqu(t.labelRenderText)}}function wh(e,r){}function ns(e,r){if(1&e&&C.YNc(0,wh,0,0,"ng-template",16),2&e){const t=C.oxw(3);C.Q6J("ngTemplateOutlet",t.nzLabelRender)("ngTemplateOutletContext",t.labelRenderContext)}}function Iv(e,r){if(1&e&&(C.TgZ(0,"span",13),C.YNc(1,Hs,2,1,"ng-container",14),C.YNc(2,ns,1,2,"ng-template",null,15,C.W1O),C.qZA()),2&e){const t=C.MAs(3),n=C.oxw(2);C.Q6J("title",n.labelRenderText),C.xp6(1),C.Q6J("ngIf",!n.isLabelRenderTemplate)("ngIfElse",t)}}function Ov(e,r){if(1&e&&(C.TgZ(0,"span",17),C._uU(1),C.qZA()),2&e){const t=C.oxw(2);C.Udp("visibility",t.inputValue?"hidden":"visible"),C.xp6(1),C.Oqu(t.showPlaceholder?t.nzPlaceHolder||(null==t.locale?null:t.locale.placeholder):null)}}function X0(e,r){if(1&e&&C._UZ(0,"span",22),2&e){const t=C.oxw(3);C.ekj("ant-cascader-picker-arrow-expand",t.menuVisible),C.Q6J("nzType",t.nzSuffixIcon)}}function Vu(e,r){1&e&&C._UZ(0,"span",23)}function _h(e,r){if(1&e&&C._UZ(0,"nz-form-item-feedback-icon",24),2&e){const t=C.oxw(3);C.Q6J("status",t.status)}}function Rv(e,r){if(1&e&&(C.TgZ(0,"span",18),C.YNc(1,X0,1,3,"span",19),C.YNc(2,Vu,1,0,"span",20),C.YNc(3,_h,1,1,"nz-form-item-feedback-icon",21),C.qZA()),2&e){const t=C.oxw(2);C.ekj("ant-select-arrow-loading",t.isLoading),C.xp6(1),C.Q6J("ngIf",!t.isLoading),C.xp6(1),C.Q6J("ngIf",t.isLoading),C.xp6(1),C.Q6J("ngIf",t.hasFeedback&&!!t.status)}}function Fv(e,r){if(1&e){const t=C.EpF();C.TgZ(0,"span",25)(1,"span",26),C.NdJ("click",function(i){C.CHM(t);const l=C.oxw(2);return C.KtG(l.clearSelection(i))}),C.qZA()()}}function V0(e,r){if(1&e){const t=C.EpF();C.ynx(0),C.TgZ(1,"div",4,5)(3,"span",6)(4,"input",7,8),C.NdJ("ngModelChange",function(i){C.CHM(t);const l=C.oxw();return C.KtG(l.inputValue=i)})("blur",function(){C.CHM(t);const i=C.oxw();return C.KtG(i.handleInputBlur())})("focus",function(){C.CHM(t);const i=C.oxw();return C.KtG(i.handleInputFocus())}),C.qZA()(),C.YNc(6,Iv,4,3,"span",9),C.YNc(7,Ov,2,3,"span",10),C.qZA(),C.YNc(8,Rv,4,5,"span",11),C.YNc(9,Fv,2,0,"span",12),C.BQk()}if(2&e){const t=C.oxw();C.xp6(4),C.Udp("opacity",t.nzShowSearch?"":"0"),C.Q6J("readonly",!t.nzShowSearch)("disabled",t.nzDisabled)("ngModel",t.inputValue),C.uIk("autoComplete","off")("expanded",t.menuVisible)("autofocus",t.nzAutoFocus?"autofocus":null),C.xp6(2),C.Q6J("ngIf",t.showLabelRender),C.xp6(1),C.Q6J("ngIf",!t.showLabelRender),C.xp6(1),C.Q6J("ngIf",t.nzShowArrow),C.xp6(1),C.Q6J("ngIf",t.clearIconVisible)}}function v2(e,r){if(1&e&&(C.TgZ(0,"ul",32)(1,"li",33),C._UZ(2,"nz-embed-empty",34),C.qZA()()),2&e){const t=C.oxw(2);C.Udp("width",t.dropdownWidthStyle)("height",t.dropdownHeightStyle),C.xp6(2),C.Q6J("nzComponentName","cascader")("specificContent",t.nzNotFoundContent)}}function Dv(e,r){if(1&e){const t=C.EpF();C.TgZ(0,"li",38),C.NdJ("mouseenter",function(i){const c=C.CHM(t).$implicit,f=C.oxw().index,d=C.oxw(3);return C.KtG(d.onOptionMouseEnter(c,f,i))})("mouseleave",function(i){const c=C.CHM(t).$implicit,f=C.oxw().index,d=C.oxw(3);return C.KtG(d.onOptionMouseLeave(c,f,i))})("click",function(i){const c=C.CHM(t).$implicit,f=C.oxw().index,d=C.oxw(3);return C.KtG(d.onOptionClick(c,f,i))}),C.qZA()}if(2&e){const t=r.$implicit,n=C.oxw().index,i=C.oxw(3);C.Q6J("expandIcon",i.nzExpandIcon)("columnIndex",n)("nzLabelProperty",i.nzLabelProperty)("optionTemplate",i.nzOptionRender)("activated",i.isOptionActivated(t,n))("highlightText",i.inSearchingMode?i.inputValue:"")("option",t)("dir",i.dir)}}function Sh(e,r){if(1&e&&(C.TgZ(0,"ul",36),C.YNc(1,Dv,1,8,"li",37),C.qZA()),2&e){const t=r.$implicit,n=C.oxw(3);C.Udp("height",n.dropdownHeightStyle)("width",n.dropdownWidthStyle),C.Q6J("ngClass",n.menuColumnCls),C.xp6(1),C.Q6J("ngForOf",t)}}function Bv(e,r){if(1&e&&C.YNc(0,Sh,2,6,"ul",35),2&e){const t=C.oxw(2);C.Q6J("ngForOf",t.cascaderService.columns)}}function Nl(e,r){if(1&e){const t=C.EpF();C.TgZ(0,"div",27),C.NdJ("mouseenter",function(){C.CHM(t);const i=C.oxw();return C.KtG(i.onTriggerMouseEnter())})("mouseleave",function(i){C.CHM(t);const l=C.oxw();return C.KtG(l.onTriggerMouseLeave(i))}),C.TgZ(1,"div",28,29),C.YNc(3,v2,3,6,"ul",30),C.YNc(4,Bv,1,1,"ng-template",null,31,C.W1O),C.qZA()()}if(2&e){const t=C.MAs(5),n=C.oxw();C.ekj("ant-cascader-dropdown-rtl","rtl"===n.dir),C.Q6J("@slideMotion","enter")("@.disabled",!(null==n.noAnimation||!n.noAnimation.nzNoAnimation))("nzNoAnimation",null==n.noAnimation?null:n.noAnimation.nzNoAnimation),C.xp6(1),C.ekj("ant-cascader-rtl","rtl"===n.dir)("ant-cascader-menus-hidden",!n.menuVisible)("ant-cascader-menu-empty",n.shouldShowEmpty),C.Q6J("ngClass",n.menuCls)("ngStyle",n.nzMenuStyle),C.xp6(2),C.Q6J("ngIf",n.shouldShowEmpty)("ngIfElse",t)}}const Hl=["*"];function Gl(e){return"boolean"!=typeof e}let za=(()=>{class e{constructor(t,n){this.cdr=t,this.optionTemplate=null,this.activated=!1,this.nzLabelProperty="label",this.expandIcon="",this.dir="ltr",this.nativeElement=n.nativeElement}ngOnInit(){""===this.expandIcon&&"rtl"===this.dir?this.expandIcon="left":""===this.expandIcon&&(this.expandIcon="right")}get optionLabel(){return this.option[this.nzLabelProperty]}markForCheck(){this.cdr.markForCheck()}}return e.\u0275fac=function(t){return new(t||e)(C.Y36(C.sBO),C.Y36(C.SBq))},e.\u0275cmp=C.Xpm({type:e,selectors:[["","nz-cascader-option",""]],hostAttrs:[1,"ant-cascader-menu-item","ant-cascader-menu-item-expanded"],hostVars:7,hostBindings:function(t,n){2&t&&(C.uIk("title",n.option.title||n.optionLabel),C.ekj("ant-cascader-menu-item-active",n.activated)("ant-cascader-menu-item-expand",!n.option.isLeaf)("ant-cascader-menu-item-disabled",n.option.disabled))},inputs:{optionTemplate:"optionTemplate",option:"option",activated:"activated",highlightText:"highlightText",nzLabelProperty:"nzLabelProperty",columnIndex:"columnIndex",expandIcon:"expandIcon",dir:"dir"},exportAs:["nzCascaderOption"],attrs:Av,decls:4,vars:3,consts:[[4,"ngIf","ngIfElse"],["defaultOptionTemplate",""],["class","ant-cascader-menu-item-expand-icon",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"ant-cascader-menu-item-content",3,"innerHTML"],[1,"ant-cascader-menu-item-expand-icon"],["nz-icon","","nzType","loading",4,"ngIf","ngIfElse"],["icon",""],["nz-icon","","nzType","loading"],[4,"nzStringTemplateOutlet"],["nz-icon","",3,"nzType"]],template:function(t,n){if(1&t&&(C.YNc(0,W0,2,5,"ng-container",0),C.YNc(1,U0,2,6,"ng-template",null,1,C.W1O),C.YNc(3,Lv,4,2,"div",2)),2&t){const i=C.MAs(2);C.Q6J("ngIf",n.optionTemplate)("ngIfElse",i),C.xp6(3),C.Q6J("ngIf",!n.option.isLeaf||(null==n.option.children?null:n.option.children.length)||n.option.loading)}},dependencies:[Ct.O5,Ct.tP,re.f,q.Ls,H0.U],encapsulation:2,changeDetection:0}),e})(),Pv=(()=>{class e{constructor(){this.activatedOptions=[],this.columns=[],this.inSearchingMode=!1,this.selectedOptions=[],this.values=[],this.$loading=new Sv.X(!1),this.$redraw=new Ce.x,this.$optionSelected=new Ce.x,this.$quitSearching=new Ce.x,this.columnsSnapshot=[[]],this.activatedOptionsSnapshot=[]}get nzOptions(){return this.columns[0]}ngOnDestroy(){this.$redraw.complete(),this.$quitSearching.complete(),this.$optionSelected.complete(),this.$loading.complete()}syncOptions(t=!1){const n=this.values,i=n&&n.length,l=n.length-1,c=f=>{const d=()=>{const p=n[f];if(!(0,ka.DX)(p))return void this.$redraw.next();const m=this.findOptionWithValue(f,n[f])||("object"==typeof p?p:{[`${this.cascaderComponent.nzValueProperty}`]:p,[`${this.cascaderComponent.nzLabelProperty}`]:p});this.setOptionActivated(m,f,!1,!1),f{this.$quitSearching.next(),this.$redraw.next(),this.inSearchingMode=!1,this.columns=[...this.columnsSnapshot],this.activatedOptions=[...this.selectedOptions]},200)}prepareSearchOptions(t){const n=[],i=[],c=this.cascaderComponent.nzShowSearch,f=Gl(c)&&c.filter?c.filter:(x,_)=>_.some(T=>{const b=this.getOptionLabel(T);return!!b&&-1!==b.indexOf(x)}),d=Gl(c)&&c.sorter?c.sorter:null,p=(x,_=!1)=>{i.push(x);const T=Array.from(i);if(f(t,T)){const I={disabled:_||x.disabled,isLeaf:!0,path:T,[this.cascaderComponent.nzLabelProperty]:T.map(F=>this.getOptionLabel(F)).join(" / ")};n.push(I)}i.pop()},m=(x,_=!1)=>{const T=_||x.disabled;i.push(x),x.children.forEach(b=>{b.parent||(b.parent=x),b.isLeaf||m(b,T),(b.isLeaf||!b.children||!b.children.length)&&p(b,T)}),i.pop()};this.columnsSnapshot.length?(this.columnsSnapshot[0].forEach(x=>function Eo(e){return e.isLeaf||!e.children||!e.children.length}(x)?p(x):m(x)),d&&n.sort((x,_)=>d(x.path,_.path,t)),this.columns=[n],this.$redraw.next()):this.columns=[[]]}toggleSearchingMode(t){this.inSearchingMode=t,t?(this.activatedOptionsSnapshot=[...this.activatedOptions],this.activatedOptions=[],this.selectedOptions=[],this.$redraw.next()):(this.activatedOptions=[...this.activatedOptionsSnapshot],this.selectedOptions=[...this.activatedOptions],this.columns=[...this.columnsSnapshot],this.syncOptions(),this.$redraw.next())}clear(){this.values=[],this.selectedOptions=[],this.activatedOptions=[],this.dropBehindColumns(0),this.$redraw.next(),this.$optionSelected.next(null)}getOptionLabel(t){return t[this.cascaderComponent.nzLabelProperty||"label"]}getOptionValue(t){return t[this.cascaderComponent.nzValueProperty||"value"]}setColumnData(t,n,i){(0,ka.cO)(this.columns[n],t)||(t.forEach(c=>c.parent=i),this.columns[n]=t,this.dropBehindColumns(n))}trackAncestorActivatedOptions(t){for(let n=t-1;n>=0;n--)this.activatedOptions[n]||(this.activatedOptions[n]=this.activatedOptions[n+1].parent)}dropBehindActivatedOptions(t){this.activatedOptions=this.activatedOptions.splice(0,t+1)}dropBehindColumns(t){t{t.loading=!1,t.children&&this.setColumnData(t.children,n+1,t),i&&i(),this.$loading.next(!1),this.$redraw.next()},()=>{t.loading=!1,t.isLeaf=!0,l&&l(),this.$redraw.next()}))}isLoaded(t){return this.columns[t]&&this.columns[t].length>0}findOptionWithValue(t,n){const i=this.columns[t];if(i){const l="object"==typeof n?this.getOptionValue(n):n;return i.find(c=>l===this.getOptionValue(c))}return null}prepareEmitValue(){this.values=this.selectedOptions.map(t=>this.getOptionValue(t))}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=C.Yz7({token:e,factory:e.\u0275fac}),e})();const kv="cascader",$0=e=>e.join(" / ");let Z0=(()=>{class e{constructor(t,n,i,l,c,f,d,p,m,x,_,T){this.cascaderService=t,this.nzConfigService=n,this.ngZone=i,this.cdr=l,this.i18nService=c,this.destroy$=f,this.elementRef=d,this.renderer=p,this.directionality=m,this.noAnimation=x,this.nzFormStatusService=_,this.nzFormNoStatusService=T,this._nzModuleName=kv,this.input$=new Sv.X(void 0),this.nzOptionRender=null,this.nzShowInput=!0,this.nzShowArrow=!0,this.nzAllowClear=!0,this.nzAutoFocus=!1,this.nzChangeOnSelect=!1,this.nzDisabled=!1,this.nzExpandTrigger="click",this.nzValueProperty="value",this.nzLabelRender=null,this.nzLabelProperty="label",this.nzSize="default",this.nzBackdrop=!1,this.nzShowSearch=!1,this.nzPlaceHolder="",this.nzMenuStyle=null,this.nzMouseEnterDelay=150,this.nzMouseLeaveDelay=150,this.nzStatus="",this.nzTriggerAction=["click"],this.nzSuffixIcon="down",this.nzExpandIcon="",this.nzVisibleChange=new C.vpe,this.nzSelectionChange=new C.vpe,this.nzSelect=new C.vpe,this.nzClear=new C.vpe,this.prefixCls="ant-select",this.statusCls={},this.status="",this.hasFeedback=!1,this.shouldShowEmpty=!1,this.menuVisible=!1,this.isLoading=!1,this.labelRenderContext={},this.onChange=Function.prototype,this.onTouched=Function.prototype,this.positions=[...xh.n$],this.dropdownHeightStyle="",this.isFocused=!1,this.dir="ltr",this.inputString="",this.isOpening=!1,this.delayMenuTimer=null,this.delaySelectTimer=null,this.isNzDisableFirstChange=!0,this.el=d.nativeElement,this.cascaderService.withComponent(this),this.renderer.addClass(this.elementRef.nativeElement,"ant-select"),this.renderer.addClass(this.elementRef.nativeElement,"ant-cascader")}set input(t){this.input$.next(t)}get input(){return this.input$.getValue()}get nzOptions(){return this.cascaderService.nzOptions}set nzOptions(t){this.cascaderService.withOptions(t)}get inSearchingMode(){return this.cascaderService.inSearchingMode}set inputValue(t){this.inputString=t,this.toggleSearchingMode(!!t)}get inputValue(){return this.inputString}get menuCls(){return{[`${this.nzMenuClassName}`]:!!this.nzMenuClassName}}get menuColumnCls(){return{[`${this.nzColumnClassName}`]:!!this.nzColumnClassName}}get hasInput(){return!!this.inputValue}get hasValue(){return this.cascaderService.values&&this.cascaderService.values.length>0}get showLabelRender(){return this.hasValue}get showPlaceholder(){return!(this.hasInput||this.hasValue)}get clearIconVisible(){return this.nzAllowClear&&!this.nzDisabled&&(this.hasValue||this.hasInput)}get isLabelRenderTemplate(){return!!this.nzLabelRender}ngOnInit(){this.nzFormStatusService?.formStatusChanges.pipe((0,Tv.x)((n,i)=>n.status===i.status&&n.hasFeedback===i.hasFeedback),(0,Dl.M)(this.nzFormNoStatusService?this.nzFormNoStatusService.noFormStatus:(0,z0.of)(!1)),(0,yh.U)(([{status:n,hasFeedback:i},l])=>({status:l?"":n,hasFeedback:i})),(0,we.R)(this.destroy$)).subscribe(({status:n,hasFeedback:i})=>{this.setStatusStyles(n,i)});const t=this.cascaderService;t.$redraw.pipe((0,we.R)(this.destroy$)).subscribe(()=>{this.checkChildren(),this.setDisplayLabel(),this.cdr.detectChanges(),this.reposition(),this.setDropdownStyles()}),t.$loading.pipe((0,we.R)(this.destroy$)).subscribe(n=>{this.isLoading=n}),t.$optionSelected.pipe((0,we.R)(this.destroy$)).subscribe(n=>{if(n){const{option:i,index:l}=n;(i.isLeaf||this.nzChangeOnSelect&&"hover"===this.nzExpandTrigger)&&this.delaySetMenuVisible(!1),this.onChange(this.cascaderService.values),this.nzSelectionChange.emit(this.cascaderService.selectedOptions),this.nzSelect.emit({option:i,index:l}),this.cdr.markForCheck()}else this.onChange([]),this.nzSelect.emit(null),this.nzSelectionChange.emit([])}),t.$quitSearching.pipe((0,we.R)(this.destroy$)).subscribe(()=>{this.inputString="",this.dropdownWidthStyle=""}),this.i18nService.localeChange.pipe((0,N0.O)(),(0,we.R)(this.destroy$)).subscribe(()=>{this.setLocale()}),this.nzConfigService.getConfigChangeEventForComponent(kv).pipe((0,we.R)(this.destroy$)).subscribe(()=>{this.cdr.markForCheck()}),this.dir=this.directionality.value,this.directionality.change.pipe((0,we.R)(this.destroy$)).subscribe(()=>{this.dir=this.directionality.value,t.$redraw.next()}),this.setupChangeListener(),this.setupKeydownListener()}ngOnChanges(t){const{nzStatus:n}=t;n&&this.setStatusStyles(this.nzStatus,this.hasFeedback)}ngOnDestroy(){this.clearDelayMenuTimer(),this.clearDelaySelectTimer()}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}writeValue(t){this.cascaderService.values=(0,ka.qo)(t),this.cascaderService.syncOptions(!0)}delaySetMenuVisible(t,n=100,i=!1){this.clearDelayMenuTimer(),n?(t&&i&&(this.isOpening=!0),this.delayMenuTimer=setTimeout(()=>{this.setMenuVisible(t),this.cdr.detectChanges(),this.clearDelayMenuTimer(),t&&setTimeout(()=>{this.isOpening=!1},100)},n)):this.setMenuVisible(t)}setMenuVisible(t){this.nzDisabled||this.menuVisible===t||(t&&(this.cascaderService.syncOptions(),this.scrollToActivatedOptions()),t||(this.inputValue=""),this.menuVisible=t,this.nzVisibleChange.emit(t),this.cdr.detectChanges())}clearDelayMenuTimer(){this.delayMenuTimer&&(clearTimeout(this.delayMenuTimer),this.delayMenuTimer=null)}clearSelection(t){t&&(t.preventDefault(),t.stopPropagation()),this.labelRenderText="",this.labelRenderContext={},this.inputValue="",this.setMenuVisible(!1),this.cascaderService.clear(),this.nzClear.emit()}getSubmitValue(){return this.cascaderService.selectedOptions.map(t=>this.cascaderService.getOptionValue(t))}focus(){this.isFocused||((this.input?.nativeElement||this.el).focus(),this.isFocused=!0)}blur(){this.isFocused&&((this.input?.nativeElement||this.el).blur(),this.isFocused=!1)}handleInputBlur(){this.menuVisible?this.focus():this.blur()}handleInputFocus(){this.focus()}onTriggerClick(){this.nzDisabled||(this.nzShowSearch&&this.focus(),this.isActionTrigger("click")&&this.delaySetMenuVisible(!this.menuVisible,100),this.onTouched())}onTriggerMouseEnter(){this.nzDisabled||!this.isActionTrigger("hover")||this.delaySetMenuVisible(!0,this.nzMouseEnterDelay,!0)}onTriggerMouseLeave(t){if(this.nzDisabled||!this.menuVisible||this.isOpening||!this.isActionTrigger("hover"))return void t.preventDefault();const n=t.relatedTarget,l=this.menu&&this.menu.nativeElement;this.el.contains(n)||l&&l.contains(n)||this.delaySetMenuVisible(!1,this.nzMouseLeaveDelay)}onOptionMouseEnter(t,n,i){i.preventDefault(),"hover"===this.nzExpandTrigger&&(t.isLeaf?this.cascaderService.setOptionDeactivatedSinceColumn(n):this.delaySetOptionActivated(t,n,!1))}onOptionMouseLeave(t,n,i){i.preventDefault(),"hover"===this.nzExpandTrigger&&!t.isLeaf&&this.clearDelaySelectTimer()}onOptionClick(t,n,i){i&&i.preventDefault(),(!t||!t.disabled)&&(this.el.focus(),this.inSearchingMode?this.cascaderService.setSearchOptionSelected(t):this.cascaderService.setOptionActivated(t,n,!0))}onClickOutside(t){this.el.contains(t.target)||this.closeMenu()}isActionTrigger(t){return"string"==typeof this.nzTriggerAction?this.nzTriggerAction===t:-1!==this.nzTriggerAction.indexOf(t)}onEnter(){const t=Math.max(this.cascaderService.activatedOptions.length-1,0),n=this.cascaderService.activatedOptions[t];n&&!n.disabled&&(this.inSearchingMode?this.cascaderService.setSearchOptionSelected(n):this.cascaderService.setOptionActivated(n,t,!0))}moveUpOrDown(t){const n=Math.max(this.cascaderService.activatedOptions.length-1,0),i=this.cascaderService.activatedOptions[n],l=this.cascaderService.columns[n]||[],c=l.length;let f=-1;for(f=i?l.indexOf(i):t?c:-1;f=t?f-1:f+1,!(f<0||f>=c);){const d=l[f];if(d&&!d.disabled){this.cascaderService.setOptionActivated(d,n);break}}}moveLeft(){const t=this.cascaderService.activatedOptions;t.length&&t.pop()}moveRight(){const t=this.cascaderService.activatedOptions.length,n=this.cascaderService.columns[t];if(n&&n.length){const i=n.find(l=>!l.disabled);i&&this.cascaderService.setOptionActivated(i,t)}}clearDelaySelectTimer(){this.delaySelectTimer&&(clearTimeout(this.delaySelectTimer),this.delaySelectTimer=null)}delaySetOptionActivated(t,n,i){this.clearDelaySelectTimer(),this.delaySelectTimer=setTimeout(()=>{this.cascaderService.setOptionActivated(t,n,i),this.delaySelectTimer=null},150)}toggleSearchingMode(t){this.inSearchingMode!==t&&this.cascaderService.toggleSearchingMode(t),this.inSearchingMode&&this.cascaderService.prepareSearchOptions(this.inputValue)}isOptionActivated(t,n){return this.cascaderService.activatedOptions[n]===t}setDisabledState(t){this.nzDisabled=this.isNzDisableFirstChange&&this.nzDisabled||t,this.isNzDisableFirstChange=!1,this.nzDisabled&&this.closeMenu()}closeMenu(){this.blur(),this.clearDelayMenuTimer(),this.setMenuVisible(!1)}reposition(){this.overlay&&this.overlay.overlayRef&&this.menuVisible&&Promise.resolve().then(()=>{this.overlay.overlayRef.updatePosition(),this.cdr.markForCheck()})}checkChildren(){this.cascaderItems&&this.cascaderItems.forEach(t=>t.markForCheck())}setDisplayLabel(){const t=this.cascaderService.selectedOptions,n=t.map(i=>this.cascaderService.getOptionLabel(i));this.isLabelRenderTemplate?this.labelRenderContext={labels:n,selectedOptions:t}:this.labelRenderText=$0.call(this,n)}setDropdownStyles(){const t=this.cascaderService.columns[0];this.shouldShowEmpty=this.inSearchingMode&&(!t||!t.length)||!(this.nzOptions&&this.nzOptions.length)&&!this.nzLoadData,this.dropdownHeightStyle=this.shouldShowEmpty?"auto":"",this.input&&(this.dropdownWidthStyle=this.inSearchingMode||this.shouldShowEmpty?`${this.selectContainer.nativeElement.offsetWidth}px`:"")}setStatusStyles(t,n){this.status=t,this.hasFeedback=n,this.cdr.markForCheck(),this.statusCls=(0,ka.Zu)(this.prefixCls,t,n),Object.keys(this.statusCls).forEach(i=>{this.statusCls[i]?this.renderer.addClass(this.elementRef.nativeElement,i):this.renderer.removeClass(this.elementRef.nativeElement,i)})}setLocale(){this.locale=this.i18nService.getLocaleData("global"),this.cdr.markForCheck()}scrollToActivatedOptions(){this.ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this.cascaderItems.toArray().filter(t=>t.activated).forEach(t=>{t.nativeElement.scrollIntoView({block:"start",inline:"nearest"})})})})}setupChangeListener(){this.input$.pipe((0,h2.w)(t=>t?new Mv.y(n=>this.ngZone.runOutsideAngular(()=>(0,gh.R)(t.nativeElement,"change").subscribe(n))):rs.E),(0,we.R)(this.destroy$)).subscribe(t=>t.stopPropagation())}setupKeydownListener(){this.ngZone.runOutsideAngular(()=>{(0,gh.R)(this.el,"keydown").pipe((0,we.R)(this.destroy$)).subscribe(t=>{const n=t.keyCode;if(n===Ci.JH||n===Ci.LH||n===Ci.oh||n===Ci.SV||n===Ci.K5||n===Ci.ZH||n===Ci.hY){if(!this.menuVisible&&n!==Ci.ZH&&n!==Ci.hY)return this.ngZone.run(()=>this.setMenuVisible(!0));this.inSearchingMode&&(n===Ci.ZH||n===Ci.oh||n===Ci.SV)||this.menuVisible&&(t.preventDefault(),this.ngZone.run(()=>{n===Ci.JH?this.moveUpOrDown(!1):n===Ci.LH?this.moveUpOrDown(!0):n===Ci.oh?this.moveLeft():n===Ci.SV?this.moveRight():n===Ci.K5&&this.onEnter(),this.cdr.markForCheck()}))}})})}}return e.\u0275fac=function(t){return new(t||e)(C.Y36(Pv),C.Y36(mh.jY),C.Y36(C.R0b),C.Y36(C.sBO),C.Y36(G0.wi),C.Y36(bv.kn),C.Y36(C.SBq),C.Y36(C.Qsj),C.Y36(bt.Is,8),C.Y36(Ch.P,9),C.Y36(Ns.kH,8),C.Y36(Ns.yW,8))},e.\u0275cmp=C.Xpm({type:e,selectors:[["nz-cascader"],["","nz-cascader",""]],viewQuery:function(t,n){if(1&t&&(C.Gf(Uu,5),C.Gf(zl,5),C.Gf(Xu,5),C.Gf(es.pI,5),C.Gf(za,5)),2&t){let i;C.iGM(i=C.CRH())&&(n.selectContainer=i.first),C.iGM(i=C.CRH())&&(n.input=i.first),C.iGM(i=C.CRH())&&(n.menu=i.first),C.iGM(i=C.CRH())&&(n.overlay=i.first),C.iGM(i=C.CRH())&&(n.cascaderItems=i)}},hostVars:23,hostBindings:function(t,n){1&t&&C.NdJ("click",function(){return n.onTriggerClick()})("mouseenter",function(){return n.onTriggerMouseEnter()})("mouseleave",function(l){return n.onTriggerMouseLeave(l)}),2&t&&(C.uIk("tabIndex","0"),C.ekj("ant-select-in-form-item",!!n.nzFormStatusService)("ant-select-lg","large"===n.nzSize)("ant-select-sm","small"===n.nzSize)("ant-select-allow-clear",n.nzAllowClear)("ant-select-show-arrow",n.nzShowArrow)("ant-select-show-search",!!n.nzShowSearch)("ant-select-disabled",n.nzDisabled)("ant-select-open",n.menuVisible)("ant-select-focused",n.isFocused)("ant-select-single",!0)("ant-select-rtl","rtl"===n.dir))},inputs:{nzOptionRender:"nzOptionRender",nzShowInput:"nzShowInput",nzShowArrow:"nzShowArrow",nzAllowClear:"nzAllowClear",nzAutoFocus:"nzAutoFocus",nzChangeOnSelect:"nzChangeOnSelect",nzDisabled:"nzDisabled",nzColumnClassName:"nzColumnClassName",nzExpandTrigger:"nzExpandTrigger",nzValueProperty:"nzValueProperty",nzLabelRender:"nzLabelRender",nzLabelProperty:"nzLabelProperty",nzNotFoundContent:"nzNotFoundContent",nzSize:"nzSize",nzBackdrop:"nzBackdrop",nzShowSearch:"nzShowSearch",nzPlaceHolder:"nzPlaceHolder",nzMenuClassName:"nzMenuClassName",nzMenuStyle:"nzMenuStyle",nzMouseEnterDelay:"nzMouseEnterDelay",nzMouseLeaveDelay:"nzMouseLeaveDelay",nzStatus:"nzStatus",nzTriggerAction:"nzTriggerAction",nzChangeOn:"nzChangeOn",nzLoadData:"nzLoadData",nzSuffixIcon:"nzSuffixIcon",nzExpandIcon:"nzExpandIcon",nzOptions:"nzOptions"},outputs:{nzVisibleChange:"nzVisibleChange",nzSelectionChange:"nzSelectionChange",nzSelect:"nzSelect",nzClear:"nzClear"},exportAs:["nzCascader"],features:[C._Bn([{provide:U.JU,useExisting:(0,C.Gpc)(()=>e),multi:!0},Pv,bv.kn]),C.TTD],ngContentSelectors:Hl,decls:6,vars:6,consts:[["cdkOverlayOrigin",""],["origin","cdkOverlayOrigin","trigger",""],[4,"ngIf"],["cdkConnectedOverlay","","nzConnectedOverlay","",3,"cdkConnectedOverlayHasBackdrop","cdkConnectedOverlayOrigin","cdkConnectedOverlayPositions","cdkConnectedOverlayTransformOriginOn","cdkConnectedOverlayOpen","overlayOutsideClick","detach"],[1,"ant-select-selector"],["selectContainer",""],[1,"ant-select-selection-search"],["type","search",1,"ant-select-selection-search-input",3,"readonly","disabled","ngModel","ngModelChange","blur","focus"],["input",""],["class","ant-select-selection-item",3,"title",4,"ngIf"],["class","ant-select-selection-placeholder",3,"visibility",4,"ngIf"],["class","ant-select-arrow",3,"ant-select-arrow-loading",4,"ngIf"],["class","ant-select-clear",4,"ngIf"],[1,"ant-select-selection-item",3,"title"],[4,"ngIf","ngIfElse"],["labelTemplate",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"ant-select-selection-placeholder"],[1,"ant-select-arrow"],["nz-icon","",3,"nzType","ant-cascader-picker-arrow-expand",4,"ngIf"],["nz-icon","","nzType","loading",4,"ngIf"],[3,"status",4,"ngIf"],["nz-icon","",3,"nzType"],["nz-icon","","nzType","loading"],[3,"status"],[1,"ant-select-clear"],["nz-icon","","nzType","close-circle","nzTheme","fill",3,"click"],[1,"ant-select-dropdown","ant-cascader-dropdown","ant-select-dropdown-placement-bottomLeft",3,"nzNoAnimation","mouseenter","mouseleave"],[1,"ant-cascader-menus",3,"ngClass","ngStyle"],["menu",""],["class","ant-cascader-menu",3,"width","height",4,"ngIf","ngIfElse"],["hasOptionsTemplate",""],[1,"ant-cascader-menu"],[1,"ant-cascader-menu-item","ant-cascader-menu-item-disabled"],[1,"ant-cascader-menu-item-content",3,"nzComponentName","specificContent"],["class","ant-cascader-menu","role","menuitemcheckbox",3,"ngClass","height","width",4,"ngFor","ngForOf"],["role","menuitemcheckbox",1,"ant-cascader-menu",3,"ngClass"],["nz-cascader-option","",3,"expandIcon","columnIndex","nzLabelProperty","optionTemplate","activated","highlightText","option","dir","mouseenter","mouseleave","click",4,"ngFor","ngForOf"],["nz-cascader-option","",3,"expandIcon","columnIndex","nzLabelProperty","optionTemplate","activated","highlightText","option","dir","mouseenter","mouseleave","click"]],template:function(t,n){if(1&t&&(C.F$t(),C.TgZ(0,"div",0,1),C.YNc(3,V0,10,12,"ng-container",2),C.Hsn(4),C.qZA(),C.YNc(5,Nl,6,15,"ng-template",3),C.NdJ("overlayOutsideClick",function(l){return n.onClickOutside(l)})("detach",function(){return n.closeMenu()})),2&t){const i=C.MAs(1);C.xp6(3),C.Q6J("ngIf",n.nzShowInput),C.xp6(2),C.Q6J("cdkConnectedOverlayHasBackdrop",n.nzBackdrop)("cdkConnectedOverlayOrigin",i)("cdkConnectedOverlayPositions",n.positions)("cdkConnectedOverlayTransformOriginOn",".ant-cascader-dropdown")("cdkConnectedOverlayOpen",n.menuVisible)}},dependencies:[bt.Lv,Ct.mk,Ct.sg,Ct.O5,Ct.tP,Ct.PC,U.Fj,U.JJ,U.On,es.pI,es.xu,jo.gB,q.Ls,Ch.P,xh.hQ,Ns.w_,za],encapsulation:2,data:{animation:[f2.mF]},changeDetection:0}),(0,E.gn)([(0,ka.yF)()],e.prototype,"nzShowInput",void 0),(0,E.gn)([(0,ka.yF)()],e.prototype,"nzShowArrow",void 0),(0,E.gn)([(0,ka.yF)()],e.prototype,"nzAllowClear",void 0),(0,E.gn)([(0,ka.yF)()],e.prototype,"nzAutoFocus",void 0),(0,E.gn)([(0,ka.yF)()],e.prototype,"nzChangeOnSelect",void 0),(0,E.gn)([(0,ka.yF)()],e.prototype,"nzDisabled",void 0),(0,E.gn)([(0,mh.oS)()],e.prototype,"nzSize",void 0),(0,E.gn)([(0,mh.oS)()],e.prototype,"nzBackdrop",void 0),e})(),Mh=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=C.oAB({type:e}),e.\u0275inj=C.cJS({imports:[bt.vT,Ct.ez,U.u5,es.U8,re.T,jo.Xo,H0.C,q.PV,Pi.o7,Ch.g,xh.e4,Ns.mJ]}),e})(),zv=(()=>{class e{constructor(t,n,i){this.dataService=t,this.handlerService=n,this.i18nService=i,this.loading=!1}fanyi(t){return this.i18nService.fanyi("")}ngOnInit(){this.loading=!0,this.dataService.getBiReference(this.bi.code,this.dim.id,this.handlerService.buildDimParam(this.bi,!1,!0)).subscribe(t=>{this.data=this.recursiveTree(t,null),this.data.forEach(n=>{n.key==this.dim.$value&&(n.selected=!0)}),this.loading=!1})}recursiveTree(t,n){let i=[];return t.forEach(l=>{if(l.pid==n){let c={value:l.id,label:l.title,children:this.recursiveTree(t,l.id)};c.isLeaf=!c.children.length,i.push(c)}}),i}}return e.\u0275fac=function(t){return new(t||e)(C.Y36(Rt),C.Y36(Ht),C.Y36(Wu.t$))},e.\u0275cmp=C.Xpm({type:e,selectors:[["erupt-bi-cascade"]],inputs:{dim:"dim",bi:"bi"},decls:2,vars:6,consts:[[3,"nzSpinning"],[2,"width","100%",3,"ngModel","nzChangeOnSelect","nzShowSearch","nzNotFoundContent","nzOptions","ngModelChange"]],template:function(t,n){1&t&&(C.TgZ(0,"nz-spin",0)(1,"nz-cascader",1),C.NdJ("ngModelChange",function(l){return n.dim.$value=l}),C.qZA()()),2&t&&(C.Q6J("nzSpinning",n.loading),C.xp6(1),C.Q6J("ngModel",n.dim.$value)("nzChangeOnSelect",!0)("nzShowSearch",!0)("nzNotFoundContent",n.fanyi("global.no_data"))("nzOptions",n.data))},dependencies:[U.JJ,U.On,Jt.W,Z0],encapsulation:2}),e})();const q0=["*"];let Nv=(()=>{class e{constructor(){}ngOnInit(){}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=C.Xpm({type:e,selectors:[["bi-search-se"]],inputs:{dimension:"dimension"},ngContentSelectors:q0,decls:9,vars:3,consts:[[2,"display","flex","margin","4px 0"],[2,"display","flex","justify-content","flex-end"],[1,"ellipsis",2,"line-height","32px","width","90px","text-align","right"],[2,"color","#f00"],[2,"margin","0 3px",3,"title"],[2,"flex","1","width","100%"]],template:function(t,n){1&t&&(C.F$t(),C.TgZ(0,"div",0)(1,"div",1)(2,"label",2)(3,"span",3),C._uU(4),C.qZA(),C.TgZ(5,"span",4),C._uU(6),C.qZA()()(),C.TgZ(7,"div",5),C.Hsn(8),C.qZA()()),2&t&&(C.xp6(4),C.Oqu(n.dimension.notNull?"*":""),C.xp6(1),C.Q6J("title",n.dimension.title),C.xp6(1),C.hij("",n.dimension.title," : \xa0"))}}),e})();function Hv(e,r){if(1&e&&(C.ynx(0),C.TgZ(1,"div",6)(2,"bi-search-se",7),C._UZ(3,"erupt-bi-choice",8),C.qZA()(),C.BQk()),2&e){const t=C.oxw().$implicit,n=C.oxw();C.xp6(2),C.Q6J("dimension",t),C.xp6(1),C.Q6J("dim",t)("bi",n.bi)}}function K0(e,r){if(1&e&&(C.ynx(0),C.TgZ(1,"div",6)(2,"bi-search-se",7),C._UZ(3,"erupt-bi-choice",8),C.qZA()(),C.BQk()),2&e){const t=C.oxw().$implicit,n=C.oxw();C.xp6(2),C.Q6J("dimension",t),C.xp6(1),C.Q6J("dim",t)("bi",n.bi)}}function Gv(e,r){if(1&e){const t=C.EpF();C.ynx(0),C.TgZ(1,"nz-select",11),C.NdJ("ngModelChange",function(i){C.CHM(t);const l=C.oxw(2).$implicit;return C.KtG(l.$value=i)}),C.qZA(),C.BQk()}if(2&e){const t=C.oxw(2).$implicit;C.xp6(1),C.Q6J("nzMode","tags")("ngModel",t.$value)("name",t.code)}}function Wl(e,r){if(1&e){const t=C.EpF();C.TgZ(0,"i",16),C.NdJ("click",function(){C.CHM(t);const i=C.oxw(4).$implicit;return C.KtG(i.$value=null)}),C.qZA()}}function Yv(e,r){if(1&e&&C.YNc(0,Wl,1,0,"i",15),2&e){const t=C.oxw(3).$implicit;C.Q6J("ngIf",t.$value)}}function is(e,r){if(1&e){const t=C.EpF();C.ynx(0),C.TgZ(1,"nz-input-group",12)(2,"input",13),C.NdJ("ngModelChange",function(i){C.CHM(t);const l=C.oxw(2).$implicit;return C.KtG(l.$value=i)})("keydown",function(i){C.CHM(t);const l=C.oxw(3);return C.KtG(l.enterEvent(i))}),C.qZA()(),C.YNc(3,Yv,1,1,"ng-template",null,14,C.W1O),C.BQk()}if(2&e){const t=C.MAs(4),n=C.oxw(2).$implicit;C.xp6(1),C.Q6J("nzSuffix",t),C.xp6(1),C.Q6J("ngModel",n.$value)("name",n.code)("required",n.notNull)}}function Q0(e,r){if(1&e){const t=C.EpF();C.ynx(0),C.TgZ(1,"nz-input-number",17),C.NdJ("ngModelChange",function(i){C.CHM(t);const l=C.oxw(2).$implicit;return C.KtG(l.$value=i)})("keydown",function(i){C.CHM(t);const l=C.oxw(3);return C.KtG(l.enterEvent(i))}),C.qZA(),C.BQk()}if(2&e){const t=C.oxw(2).$implicit;C.xp6(1),C.Q6J("ngModel",t.$value)("name",t.code)}}function Th(e,r){if(1&e){const t=C.EpF();C.ynx(0),C.TgZ(1,"nz-input-group",18)(2,"nz-input-number",19),C.NdJ("ngModelChange",function(i){C.CHM(t);const l=C.oxw(2).$implicit;return C.KtG(l.$value[0]=i)}),C.qZA(),C._UZ(3,"input",20),C.TgZ(4,"nz-input-number",19),C.NdJ("ngModelChange",function(i){C.CHM(t);const l=C.oxw(2).$implicit;return C.KtG(l.$value[1]=i)}),C.qZA()(),C.BQk()}if(2&e){const t=C.oxw(2).$implicit;C.xp6(2),C.Q6J("ngModel",t.$value[0])("name",t.code),C.xp6(2),C.Q6J("ngModel",t.$value[1])("name",t.code)}}function Qi(e,r){if(1&e){const t=C.EpF();C.ynx(0),C.TgZ(1,"i",22),C.NdJ("click",function(){C.CHM(t);const i=C.oxw(3).$implicit,l=C.oxw();return C.KtG(l.clearRef(i))}),C.qZA(),C.BQk()}}function Wv(e,r){if(1&e){const t=C.EpF();C.ynx(0),C.TgZ(1,"i",23),C.NdJ("click",function(){C.CHM(t);const i=C.oxw(3).$implicit,l=C.oxw();return C.KtG(l.ref(i))}),C.qZA(),C.BQk()}}function Ul(e,r){if(1&e&&(C.YNc(0,Qi,2,0,"ng-container",21),C.YNc(1,Wv,2,0,"ng-container",21)),2&e){const t=C.oxw(2).$implicit;C.Q6J("ngIf",t.$value),C.xp6(1),C.Q6J("ngIf",!t.$value)}}function Gs(e,r){if(1&e){const t=C.EpF();C.ynx(0),C.TgZ(1,"nz-input-group",24)(2,"input",25),C.NdJ("click",function(){C.CHM(t);const i=C.oxw(2).$implicit,l=C.oxw();return C.KtG(l.ref(i))}),C.qZA()(),C.BQk()}if(2&e){C.oxw();const t=C.MAs(10),n=C.oxw().$implicit;C.xp6(1),C.Q6J("nzAddOnAfter",t),C.xp6(1),C.Q6J("required",n.notNull)("readOnly",!0)("value",n.$viewValue||null)("name",n.code)}}function Uv(e,r){if(1&e){const t=C.EpF();C.ynx(0),C.TgZ(1,"nz-input-group",24)(2,"input",25),C.NdJ("click",function(){C.CHM(t);const i=C.oxw(2).$implicit,l=C.oxw();return C.KtG(l.ref(i))}),C.qZA()(),C.BQk()}if(2&e){C.oxw();const t=C.MAs(10),n=C.oxw().$implicit;C.xp6(1),C.Q6J("nzAddOnAfter",t),C.xp6(1),C.Q6J("required",n.notNull)("readOnly",!0)("value",n.$viewValue||null)("name",n.code)}}function Xv(e,r){if(1&e){const t=C.EpF();C.ynx(0),C.TgZ(1,"nz-input-group",24)(2,"input",25),C.NdJ("click",function(){C.CHM(t);const i=C.oxw(2).$implicit,l=C.oxw();return C.KtG(l.ref(i))}),C.qZA()(),C.BQk()}if(2&e){C.oxw();const t=C.MAs(10),n=C.oxw().$implicit;C.xp6(1),C.Q6J("nzAddOnAfter",t),C.xp6(1),C.Q6J("required",n.notNull)("readOnly",!0)("value",n.$viewValue||null)("name",n.code)}}function J0(e,r){if(1&e){const t=C.EpF();C.ynx(0),C.TgZ(1,"nz-input-group",24)(2,"input",25),C.NdJ("click",function(){C.CHM(t);const i=C.oxw(2).$implicit,l=C.oxw();return C.KtG(l.ref(i))}),C.qZA()(),C.BQk()}if(2&e){C.oxw();const t=C.MAs(10),n=C.oxw().$implicit;C.xp6(1),C.Q6J("nzAddOnAfter",t),C.xp6(1),C.Q6J("required",n.notNull)("readOnly",!0)("value",n.$viewValue||null)("name",n.code)}}function st(e,r){if(1&e&&(C.ynx(0),C._UZ(1,"erupt-bi-cascade",8),C.BQk()),2&e){const t=C.oxw(2).$implicit,n=C.oxw();C.xp6(1),C.Q6J("dim",t)("bi",n.bi)}}function Ft(e,r){if(1&e){const t=C.EpF();C.ynx(0),C.TgZ(1,"nz-date-picker",26),C.NdJ("ngModelChange",function(i){C.CHM(t);const l=C.oxw(2).$implicit;return C.KtG(l.$value=i)}),C.qZA(),C.BQk()}if(2&e){const t=C.oxw(2).$implicit;C.xp6(1),C.Q6J("ngModel",t.$value)("name",t.code)}}function jt(e,r){if(1&e){const t=C.EpF();C.ynx(0),C.TgZ(1,"nz-range-picker",27),C.NdJ("ngModelChange",function(i){C.CHM(t);const l=C.oxw(2).$implicit;return C.KtG(l.$value=i)}),C.qZA(),C.BQk()}if(2&e){const t=C.oxw(2).$implicit,n=C.oxw();C.xp6(1),C.Q6J("ngModel",t.$value)("nzRanges",n.dateRanges)("name",t.code)}}function fe(e,r){if(1&e){const t=C.EpF();C.ynx(0),C.TgZ(1,"nz-time-picker",28),C.NdJ("ngModelChange",function(i){C.CHM(t);const l=C.oxw(2).$implicit;return C.KtG(l.$value=i)}),C.qZA(),C.BQk()}if(2&e){const t=C.oxw(2).$implicit;C.xp6(1),C.Q6J("ngModel",t.$value)("name",t.code)}}function Le(e,r){if(1&e){const t=C.EpF();C.ynx(0),C.TgZ(1,"nz-date-picker",29),C.NdJ("ngModelChange",function(i){C.CHM(t);const l=C.oxw(2).$implicit;return C.KtG(l.$value=i)}),C.qZA(),C.BQk()}if(2&e){const t=C.oxw(2).$implicit;C.xp6(1),C.Q6J("ngModel",t.$value)("name",t.code)}}function $e(e,r){if(1&e){const t=C.EpF();C.ynx(0),C.TgZ(1,"nz-range-picker",30),C.NdJ("ngModelChange",function(i){C.CHM(t);const l=C.oxw(2).$implicit;return C.KtG(l.$value=i)}),C.qZA(),C.BQk()}if(2&e){const t=C.oxw(2).$implicit,n=C.oxw();C.xp6(1),C.Q6J("ngModel",t.$value)("name",t.code)("nzRanges",n.dateRanges)}}function dr(e,r){if(1&e){const t=C.EpF();C.ynx(0),C.TgZ(1,"nz-week-picker",28),C.NdJ("ngModelChange",function(i){C.CHM(t);const l=C.oxw(2).$implicit;return C.KtG(l.$value=i)}),C.qZA(),C.BQk()}if(2&e){const t=C.oxw(2).$implicit;C.xp6(1),C.Q6J("ngModel",t.$value)("name",t.code)}}function an(e,r){if(1&e){const t=C.EpF();C.ynx(0),C.TgZ(1,"nz-month-picker",28),C.NdJ("ngModelChange",function(i){C.CHM(t);const l=C.oxw(2).$implicit;return C.KtG(l.$value=i)}),C.qZA(),C.BQk()}if(2&e){const t=C.oxw(2).$implicit;C.xp6(1),C.Q6J("ngModel",t.$value)("name",t.code)}}function Oi(e,r){if(1&e){const t=C.EpF();C.ynx(0),C.TgZ(1,"nz-year-picker",28),C.NdJ("ngModelChange",function(i){C.CHM(t);const l=C.oxw(2).$implicit;return C.KtG(l.$value=i)}),C.qZA(),C.BQk()}if(2&e){const t=C.oxw(2).$implicit;C.xp6(1),C.Q6J("ngModel",t.$value)("name",t.code)}}function Ji(e,r){if(1&e&&(C.ynx(0),C.TgZ(1,"div",9)(2,"bi-search-se",7),C.ynx(3,3),C.YNc(4,Gv,2,3,"ng-container",4),C.YNc(5,is,5,4,"ng-container",4),C.YNc(6,Q0,2,2,"ng-container",4),C.YNc(7,Th,5,4,"ng-container",4),C.ynx(8),C.YNc(9,Ul,2,2,"ng-template",null,10,C.W1O),C.YNc(11,Gs,3,5,"ng-container",4),C.YNc(12,Uv,3,5,"ng-container",4),C.YNc(13,Xv,3,5,"ng-container",4),C.YNc(14,J0,3,5,"ng-container",4),C.BQk(),C.YNc(15,st,2,2,"ng-container",4),C.YNc(16,Ft,2,2,"ng-container",4),C.YNc(17,jt,2,3,"ng-container",4),C.YNc(18,fe,2,2,"ng-container",4),C.YNc(19,Le,2,2,"ng-container",4),C.YNc(20,$e,2,3,"ng-container",4),C.YNc(21,dr,2,2,"ng-container",4),C.YNc(22,an,2,2,"ng-container",4),C.YNc(23,Oi,2,2,"ng-container",4),C.BQk(),C.qZA()(),C.BQk()),2&e){const t=C.oxw().$implicit,n=C.oxw();C.xp6(1),C.Q6J("nzXs",n.col.xs)("nzSm",n.col.sm)("nzMd",n.col.md)("nzLg",n.col.lg)("nzXl",n.col.xl)("nzXXl",n.col.xxl),C.xp6(1),C.Q6J("dimension",t),C.xp6(1),C.Q6J("ngSwitch",t.type),C.xp6(1),C.Q6J("ngSwitchCase",n.dimType.TAG),C.xp6(1),C.Q6J("ngSwitchCase",n.dimType.INPUT),C.xp6(1),C.Q6J("ngSwitchCase",n.dimType.NUMBER),C.xp6(1),C.Q6J("ngSwitchCase",n.dimType.NUMBER_RANGE),C.xp6(4),C.Q6J("ngSwitchCase",n.dimType.REFERENCE),C.xp6(1),C.Q6J("ngSwitchCase",n.dimType.REFERENCE_MULTI),C.xp6(1),C.Q6J("ngSwitchCase",n.dimType.REFERENCE_TREE_MULTI),C.xp6(1),C.Q6J("ngSwitchCase",n.dimType.REFERENCE_TREE_RADIO),C.xp6(1),C.Q6J("ngSwitchCase",n.dimType.REFERENCE_CASCADE),C.xp6(1),C.Q6J("ngSwitchCase",n.dimType.DATE),C.xp6(1),C.Q6J("ngSwitchCase",n.dimType.DATE_RANGE),C.xp6(1),C.Q6J("ngSwitchCase",n.dimType.TIME),C.xp6(1),C.Q6J("ngSwitchCase",n.dimType.DATETIME),C.xp6(1),C.Q6J("ngSwitchCase",n.dimType.DATETIME_RANGE),C.xp6(1),C.Q6J("ngSwitchCase",n.dimType.WEEK),C.xp6(1),C.Q6J("ngSwitchCase",n.dimType.MONTH),C.xp6(1),C.Q6J("ngSwitchCase",n.dimType.YEAR)}}function ia(e,r){if(1&e&&(C.ynx(0)(1,3),C.YNc(2,Hv,4,3,"ng-container",4),C.YNc(3,K0,4,3,"ng-container",4),C.YNc(4,Ji,24,25,"ng-container",5),C.BQk()()),2&e){const t=r.$implicit,n=C.oxw();C.xp6(1),C.Q6J("ngSwitch",t.type),C.xp6(1),C.Q6J("ngSwitchCase",n.dimType.REFERENCE_RADIO),C.xp6(1),C.Q6J("ngSwitchCase",n.dimType.REFERENCE_CHECKBOX)}}let $u=(()=>{class e{constructor(t,n){this.modal=t,this.i18n=n,this.search=new C.vpe,this.col=Ps.l[3],this.dimType=Ut,this.dateRanges={},this.datePipe=new Ct.uU("zh-cn")}ngOnInit(){this.dateRanges={[this.i18n.fanyi("global.today")]:[this.datePipe.transform(new Date,"yyyy-MM-dd 00:00:00"),this.datePipe.transform(new Date,"yyyy-MM-dd 23:59:59")],[this.i18n.fanyi("global.date.last_7_day")]:[this.datePipe.transform(zs().add(-7,"day").toDate(),"yyyy-MM-dd 00:00:00"),this.datePipe.transform(new Date,"yyyy-MM-dd 23:59:59")],[this.i18n.fanyi("global.date.last_30_day")]:[this.datePipe.transform(zs().add(-30,"day").toDate(),"yyyy-MM-dd 00:00:00"),this.datePipe.transform(new Date,"yyyy-MM-dd 23:59:59")],[this.i18n.fanyi("global.date.this_month")]:[this.datePipe.transform(zs().toDate(),"yyyy-MM-01 00:00:00"),this.datePipe.transform(new Date,"yyyy-MM-dd 23:59:59")],[this.i18n.fanyi("global.date.last_month")]:[this.datePipe.transform(zs().add(-1,"month").toDate(),"yyyy-MM-01 00:00:00"),this.datePipe.transform(zs().add(-1,"month").endOf("month").toDate(),"yyyy-MM-dd 23:59:59")]}}enterEvent(t){13===t.which&&this.search.emit()}ref(t){this.modal.create({nzWrapClassName:"modal-xs",nzKeyboard:!0,nzStyle:{top:"30px"},nzTitle:t.title,nzContent:Rl,nzComponentParams:{dimension:t,code:this.bi.code,bi:this.bi},nzOnOk:n=>{}})}clearRef(t){t.$viewValue=null,t.$value=null}}return e.\u0275fac=function(t){return new(t||e)(C.Y36(K.Sf),C.Y36(Wu.t$))},e.\u0275cmp=C.Xpm({type:e,selectors:[["bi-dimension"]],inputs:{bi:"bi"},outputs:{search:"search"},decls:3,vars:2,consts:[["nz-form","","nzLayout","horizontal"],["nz-row","",3,"nzGutter"],[4,"ngFor","ngForOf"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],["nz-col",""],[3,"dimension"],[3,"dim","bi"],["nz-col","",3,"nzXs","nzSm","nzMd","nzLg","nzXl","nzXXl"],["refBtn",""],[2,"width","100%",3,"nzMode","ngModel","name","ngModelChange"],[1,"erupt-input",3,"nzSuffix"],["nz-input","","autocomplete","off",1,"full-width",3,"ngModel","name","required","ngModelChange","keydown"],["suffixTemplate",""],["nz-icon","","nz-tooltip","","class","ant-input-clear-icon","nzTheme","fill","nzType","close-circle",3,"click",4,"ngIf"],["nz-icon","","nz-tooltip","","nzTheme","fill","nzType","close-circle",1,"ant-input-clear-icon",3,"click"],[1,"full-width",3,"ngModel","name","ngModelChange","keydown"],[1,"erupt-input",2,"display","flex","align-items","center"],[2,"width","45%",3,"ngModel","name","ngModelChange"],["disabled","","nz-input","","placeholder","~",2,"width","30px","border-left","0","border-right","0","pointer-events","none"],[4,"ngIf"],["nz-icon","","nzType","close-circle","theme","fill",1,"point",3,"click"],["nz-icon","","nzType","database","theme","fill",1,"point",3,"click"],[1,"full-width",3,"nzAddOnAfter"],["nz-input","","autocomplete","off",3,"required","readOnly","value","name","click"],["nzShowToday","",1,"full-width",3,"ngModel","name","ngModelChange"],["nzShowToday","",1,"full-width",3,"ngModel","nzRanges","name","ngModelChange"],[1,"full-width",3,"ngModel","name","ngModelChange"],["nzShowTime","","nzShowToday","",1,"full-width",3,"ngModel","name","ngModelChange"],["nzShowToday","","nzShowTime","",1,"full-width",3,"ngModel","name","nzRanges","ngModelChange"]],template:function(t,n){1&t&&(C.TgZ(0,"form",0)(1,"div",1),C.YNc(2,ia,5,3,"ng-container",2),C.qZA()()),2&t&&(C.xp6(1),C.Q6J("nzGutter",16),C.xp6(1),C.Q6J("ngForOf",n.bi.dimensions))},dependencies:[Ct.sg,Ct.O5,Ct.RF,Ct.n9,Ct.ED,U._Y,U.Fj,U.JJ,U.JL,U.Q7,U.On,U.F,mt.w,rt.t3,rt.SK,wv.SY,I0.Vq,q.Ls,Pi.Zp,Pi.gB,Pi.ke,Fl.uw,Fl.wS,Fl.Xv,Fl.Mq,Fl.mr,O0.m4,dh._V,ph.Lr,k0,zv,Nv],styles:["[_nghost-%COMP%] nz-input-group{width:100%}[_nghost-%COMP%] se{width:100%}[_nghost-%COMP%] se .ant-form-item-label{width:auto!important;text-overflow:ellipsis;white-space:nowrap;max-width:150px;min-width:65px}"]}),e})();var bh,eg,rg,$v,S=ct(8250),Rn=(()=>{return(e=Rn||(Rn={})).FORE="fore",e.MID="mid",e.BG="bg",Rn;var e})(),Ge=(()=>{return(e=Ge||(Ge={})).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",Ge;var e})(),Kn=(()=>{return(e=Kn||(Kn={})).AXIS="axis",e.GRID="grid",e.LEGEND="legend",e.TOOLTIP="tooltip",e.ANNOTATION="annotation",e.SLIDER="slider",e.SCROLLBAR="scrollbar",e.OTHER="other",Kn;var e})(),Ys={FORE:3,MID:2,BG:1},kr=(()=>{return(e=kr||(kr={})).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",kr;var e})(),as=(()=>{return(e=as||(as={})).BEFORE_DRAW_ANIMATE="beforeanimate",e.AFTER_DRAW_ANIMATE="afteranimate",e.BEFORE_RENDER_LABEL="beforerenderlabel",e.AFTER_RENDER_LABEL="afterrenderlabel",as;var e})(),ji=(()=>{return(e=ji||(ji={})).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",ji;var e})(),Ws=(()=>{return(e=Ws||(Ws={})).ACTIVE="active",e.INACTIVE="inactive",e.SELECTED="selected",e.DEFAULT="default",Ws;var e})(),Zu=["color","shape","size"],pn="_origin",d2=1,j0=1,p2={};function Vv(e,r){p2[e]=r}function Us(e){bh||function y2(){bh=document.createElement("table"),eg=document.createElement("tr"),rg=/^\s*<(\w+|!)[^>]*>/,$v={tr:document.createElement("tbody"),tbody:bh,thead:bh,tfoot:bh,td:eg,th:eg,"*":document.createElement("div")}}();var r=rg.test(e)&&RegExp.$1;(!r||!(r in $v))&&(r="*");var t=$v[r];e="string"==typeof e?e.replace(/(^\s*)|(\s*$)/g,""):e,t.innerHTML=""+e;var n=t.childNodes[0];return n&&t.contains(n)&&t.removeChild(n),n}function ki(e,r){if(e)for(var t in r)r.hasOwnProperty(t)&&(e.style[t]=r[t]);return e}function os(e){return"number"==typeof e&&!isNaN(e)}function x2(e,r,t,n){var i=t,l=n;if(r){var c=function m2(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)}}(e);i=c.width?c.width:i,l=c.height?c.height:l}return{width:Math.max(os(i)?i:d2,d2),height:Math.max(os(l)?l:j0,j0)}}var Ah=ct(378),uE=function(e){function r(t){var n=e.call(this)||this;n.destroyed=!1;var i=t.visible;return n.visible=void 0===i||i,n}return(0,E.ZT)(r,e),r.prototype.show=function(){this.visible||this.changeVisible(!0)},r.prototype.hide=function(){this.visible&&this.changeVisible(!1)},r.prototype.destroy=function(){this.off(),this.destroyed=!0},r.prototype.changeVisible=function(t){this.visible!==t&&(this.visible=t)},r}(Ah.Z);const ng=uE;var qu="\t\n\v\f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029",ig=new RegExp("([a-z])["+qu+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+qu+"]*,?["+qu+"]*)+)","ig"),cE=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+qu+"]*,?["+qu+"]*","ig"),Eh=function(e){if(!e)return null;if((0,S.kJ)(e))return e;var r={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},t=[];return String(e).replace(ig,function(n,i,l){var c=[],f=i.toLowerCase();if(l.replace(cE,function(d,p){p&&c.push(+p)}),"m"===f&&c.length>2&&(t.push([i].concat(c.splice(0,2))),f="l",i="m"===i?"l":"L"),"o"===f&&1===c.length&&t.push([i,c[0]]),"r"===f)t.push([i].concat(c));else for(;c.length>=r[f]&&(t.push([i].concat(c.splice(0,r[f]))),r[f]););return e}),t},CE=function(e,r){if(e.length!==r.length)return!1;var t=!0;return(0,S.S6)(e,function(n,i){if(n!==r[i])return t=!1,!1}),t};function wE(e,r,t){var n=null,i=t;return r=0;d--)c=l[d].index,"add"===l[d].type?e.splice(c,0,[].concat(e[c])):e.splice(c,1)}var x=i-(n=e.length);if(n0)){e[n]=r[n];break}t=Qv(t,e[n-1],1)}e[n]=["Q"].concat(t.reduce(function(i,l){return i.concat(l)},[]));break;case"T":e[n]=["T"].concat(t[0]);break;case"C":if(t.length<3){if(!(n>0)){e[n]=r[n];break}t=Qv(t,e[n-1],2)}e[n]=["C"].concat(t.reduce(function(i,l){return i.concat(l)},[]));break;case"S":if(t.length<2){if(!(n>0)){e[n]=r[n];break}t=Qv(t,e[n-1],1)}e[n]=["S"].concat(t.reduce(function(i,l){return i.concat(l)},[]));break;default:e[n]=r[n]}return e},ME=function(){function e(r,t){this.bubbles=!0,this.target=null,this.currentTarget=null,this.delegateTarget=null,this.delegateObject=null,this.defaultPrevented=!1,this.propagationStopped=!1,this.shape=null,this.fromShape=null,this.toShape=null,this.propagationPath=[],this.type=r,this.name=r,this.originalEvent=t,this.timeStamp=t.timeStamp}return e.prototype.preventDefault=function(){this.defaultPrevented=!0,this.originalEvent.preventDefault&&this.originalEvent.preventDefault()},e.prototype.stopPropagation=function(){this.propagationStopped=!0},e.prototype.toString=function(){return"[Event (type="+this.type+")]"},e.prototype.save=function(){},e.prototype.restore=function(){},e}();const b2=ME;function ug(e,r){var t=e.indexOf(r);-1!==t&&e.splice(t,1)}var cg=typeof window<"u"&&typeof window.document<"u";function A2(e,r){if(e.isCanvas())return!0;for(var t=r.getParent(),n=!1;t;){if(t===e){n=!0;break}t=t.getParent()}return n}function E2(e){return e.cfg.visible&&e.cfg.capture}var TE=function(e){function r(t){var n=e.call(this)||this;n.destroyed=!1;var i=n.getDefaultCfg();return n.cfg=(0,S.CD)(i,t),n}return(0,E.ZT)(r,e),r.prototype.getDefaultCfg=function(){return{}},r.prototype.get=function(t){return this.cfg[t]},r.prototype.set=function(t,n){this.cfg[t]=n},r.prototype.destroy=function(){this.cfg={destroyed:!0},this.off(),this.destroyed=!0},r}(Ah.Z);const bE=TE;var Jv=ct(2260),Zr=ct(3882);function L2(e,r){var t=[],n=e[0],i=e[1],l=e[2],c=e[3],f=e[4],d=e[5],p=e[6],m=e[7],x=e[8],_=r[0],T=r[1],b=r[2],I=r[3],F=r[4],B=r[5],Y=r[6],G=r[7],H=r[8];return t[0]=_*n+T*c+b*p,t[1]=_*i+T*f+b*m,t[2]=_*l+T*d+b*x,t[3]=I*n+F*c+B*p,t[4]=I*i+F*f+B*m,t[5]=I*l+F*d+B*x,t[6]=Y*n+G*c+H*p,t[7]=Y*i+G*f+H*m,t[8]=Y*l+G*d+H*x,t}function Xl(e,r){var t=[],n=r[0],i=r[1];return t[0]=e[0]*n+e[3]*i+e[6],t[1]=e[1]*n+e[4]*i+e[7],t}var Qu=Zr.vs,jv="matrix",zi=["zIndex","capture","visible","type"],td=["repeat"];function AE(e,r){var t={},n=r.attrs;for(var i in e)t[i]=n[i];return t}var Xs=function(e){function r(t){var n=e.call(this,t)||this;n.attrs={};var i=n.getDefaultAttrs();return(0,S.CD)(i,t.attrs),n.attrs=i,n.initAttrs(i),n.initAnimate(),n}return(0,E.ZT)(r,e),r.prototype.getDefaultCfg=function(){return{visible:!0,capture:!0,zIndex:0}},r.prototype.getDefaultAttrs=function(){return{matrix:this.getDefaultMatrix(),opacity:1}},r.prototype.onCanvasChange=function(t){},r.prototype.initAttrs=function(t){},r.prototype.initAnimate=function(){this.set("animable",!0),this.set("animating",!1)},r.prototype.isGroup=function(){return!1},r.prototype.getParent=function(){return this.get("parent")},r.prototype.getCanvas=function(){return this.get("canvas")},r.prototype.attr=function(){for(var t,n=[],i=0;i0?l=function EE(e,r){if(r.onFrame)return e;var t=r.startTime,n=r.delay,i=r.duration,l=Object.prototype.hasOwnProperty;return(0,S.S6)(e,function(c){t+nc.delay&&(0,S.S6)(r.toAttrs,function(f,d){l.call(c.toAttrs,d)&&(delete c.toAttrs[d],delete c.fromAttrs[d])})}),e}(l,H):i.addAnimator(this),l.push(H),this.set("animations",l),this.set("_pause",{isPaused:!1})}},r.prototype.stopAnimate=function(t){var n=this;void 0===t&&(t=!0);var i=this.get("animations");(0,S.S6)(i,function(l){t&&n.attr(l.onFrame?l.onFrame(1):l.toAttrs),l.callback&&l.callback()}),this.set("animating",!1),this.set("animations",[])},r.prototype.pauseAnimate=function(){var t=this.get("timeline"),n=this.get("animations"),i=t.getTime();return(0,S.S6)(n,function(l){l._paused=!0,l._pauseTime=i,l.pauseCallback&&l.pauseCallback()}),this.set("_pause",{isPaused:!0,pauseTime:i}),this},r.prototype.resumeAnimate=function(){var n=this.get("timeline").getTime(),i=this.get("animations"),l=this.get("_pause").pauseTime;return(0,S.S6)(i,function(c){c.startTime=c.startTime+(n-l),c._paused=!1,c._pauseTime=null,c.resumeCallback&&c.resumeCallback()}),this.set("_pause",{isPaused:!1}),this.set("animations",i),this},r.prototype.emitDelegation=function(t,n){var f,i=this,l=n.propagationPath;this.getEvents(),"mouseenter"===t?f=n.fromShape:"mouseleave"===t&&(f=n.toShape);for(var d=function(_){var T=l[_],b=T.get("name");if(b){if((T.isGroup()||T.isCanvas&&T.isCanvas())&&f&&A2(T,f))return"break";(0,S.kJ)(b)?(0,S.S6)(b,function(I){i.emitDelegateEvent(T,I,n)}):p.emitDelegateEvent(T,b,n)}},p=this,m=0;m0)});return c.length>0?(0,S.S6)(c,function(d){var p=d.getBBox(),m=p.minX,x=p.maxX,_=p.minY,T=p.maxY;mn&&(n=x),_l&&(l=T)}):(t=0,n=0,i=0,l=0),{x:t,y:i,minX:t,minY:i,maxX:n,maxY:l,width:n-t,height:l-i}},r.prototype.getCanvasBBox=function(){var t=1/0,n=-1/0,i=1/0,l=-1/0,c=this.getChildren().filter(function(d){return d.get("visible")&&(!d.isGroup()||d.isGroup()&&d.getChildren().length>0)});return c.length>0?(0,S.S6)(c,function(d){var p=d.getCanvasBBox(),m=p.minX,x=p.maxX,_=p.minY,T=p.maxY;mn&&(n=x),_l&&(l=T)}):(t=0,n=0,i=0,l=0),{x:t,y:i,minX:t,minY:i,maxX:n,maxY:l,width:n-t,height:l-i}},r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return t.children=[],t},r.prototype.onAttrChange=function(t,n,i){if(e.prototype.onAttrChange.call(this,t,n,i),"matrix"===t){var l=this.getTotalMatrix();this._applyChildrenMarix(l)}},r.prototype.applyMatrix=function(t){var n=this.getTotalMatrix();e.prototype.applyMatrix.call(this,t);var i=this.getTotalMatrix();i!==n&&this._applyChildrenMarix(i)},r.prototype._applyChildrenMarix=function(t){var n=this.getChildren();(0,S.S6)(n,function(i){i.applyMatrix(t)})},r.prototype.addShape=function(){for(var t=[],n=0;n=0;f--){var d=t[f];if(E2(d)&&(d.isGroup()?c=d.getShape(n,i,l):d.isHit(n,i)&&(c=d)),c)break}return c},r.prototype.add=function(t){var n=this.getCanvas(),i=this.getChildren(),l=this.get("timeline"),c=t.getParent();c&&function R2(e,r,t){void 0===t&&(t=!0),t?r.destroy():(r.set("parent",null),r.set("canvas",null)),ug(e.getChildren(),r)}(c,t,!1),t.set("parent",this),n&&nd(t,n),l&&vg(t,l),i.push(t),t.onCanvasChange("add"),this._applyElementMatrix(t)},r.prototype._applyElementMatrix=function(t){var n=this.getTotalMatrix();n&&t.applyMatrix(n)},r.prototype.getChildren=function(){return this.get("children")},r.prototype.sort=function(){var t=this.getChildren();(0,S.S6)(t,function(n,i){return n[rd]=i,n}),t.sort(function dg(e){return function(r,t){var n=e(r,t);return 0===n?r[rd]-t[rd]:n}}(function(n,i){return n.get("zIndex")-i.get("zIndex")})),this.onCanvasChange("sort")},r.prototype.clear=function(){if(this.set("clearing",!0),!this.destroyed){for(var t=this.getChildren(),n=t.length-1;n>=0;n--)t[n].destroy();this.set("children",[]),this.onCanvasChange("clear"),this.set("clearing",!1)}},r.prototype.destroy=function(){this.get("destroyed")||(this.clear(),e.prototype.destroy.call(this))},r.prototype.getFirst=function(){return this.getChildByIndex(0)},r.prototype.getLast=function(){var t=this.getChildren();return this.getChildByIndex(t.length-1)},r.prototype.getChildByIndex=function(t){return this.getChildren()[t]},r.prototype.getCount=function(){return this.getChildren().length},r.prototype.contain=function(t){return this.getChildren().indexOf(t)>-1},r.prototype.removeChild=function(t,n){void 0===n&&(n=!0),this.contain(t)&&t.remove(n)},r.prototype.findAll=function(t){var n=[],i=this.getChildren();return(0,S.S6)(i,function(l){t(l)&&n.push(l),l.isGroup()&&(n=n.concat(l.findAll(t)))}),n},r.prototype.find=function(t){var n=null,i=this.getChildren();return(0,S.S6)(i,function(l){if(t(l)?n=l:l.isGroup()&&(n=l.find(t)),n)return!1}),n},r.prototype.findById=function(t){return this.find(function(n){return n.get("id")===t})},r.prototype.findByClassName=function(t){return this.find(function(n){return n.get("className")===t})},r.prototype.findAllByName=function(t){return this.findAll(function(n){return n.get("name")===t})},r}(hg);const id=F2;var ju=ct(9194),eo=ct(4943);function D2(e,r,t,n,i){var l=e*e,c=l*e;return((1-3*e+3*l-c)*r+(4-6*l+3*c)*t+(1+3*e+3*l-3*c)*n+c*i)/6}const pg=e=>()=>e;function gg(e,r){var t=r-e;return t?function B2(e,r){return function(t){return e+t*r}}(e,t):pg(isNaN(e)?r:e)}const yg=function e(r){var t=function RE(e){return 1==(e=+e)?gg:function(r,t){return t-r?function P2(e,r,t){return e=Math.pow(e,t),r=Math.pow(r,t)-e,t=1/t,function(n){return Math.pow(e+n*r,t)}}(r,t,e):pg(isNaN(r)?t:r)}}(r);function n(i,l){var c=t((i=(0,eo.B8)(i)).r,(l=(0,eo.B8)(l)).r),f=t(i.g,l.g),d=t(i.b,l.b),p=gg(i.opacity,l.opacity);return function(m){return i.r=c(m),i.g=f(m),i.b=d(m),i.opacity=p(m),i+""}}return n.gamma=e,n}(1);function k2(e){return function(r){var c,f,t=r.length,n=new Array(t),i=new Array(t),l=new Array(t);for(c=0;c=1?(t=1,r-1):Math.floor(t*r),i=e[n],l=e[n+1];return D2((t-n/r)*r,n>0?e[n-1]:2*i-l,i,l,nt&&(l=r.slice(t,l),f[c]?f[c]+=l:f[++c]=l),(n=n[0])===(i=i[0])?f[c]?f[c]+=i:f[++c]=i:(f[++c]=null,d.push({i:c,x:Rh(n,i)})),t=Fh.lastIndex;return tp.length?(d=Eh(l[f]),p=Eh(i[f]),p=SE(p,d),p=lg(p,d),r.fromAttrs.path=p,r.toAttrs.path=d):r.pathFormatted||(d=Eh(l[f]),p=Eh(i[f]),p=lg(p,d),r.fromAttrs.path=p,r.toAttrs.path=d,r.pathFormatted=!0),n[f]=[];for(var m=0;m0){for(var f=r.animators.length-1;f>=0;f--)if((n=r.animators[f]).destroyed)r.removeAnimator(f);else{if(!n.isAnimatePaused())for(var d=(i=n.get("animations")).length-1;d>=0;d--)HE(n,l=i[d],c)&&(i.splice(d,1),l.callback&&l.callback());0===i.length&&r.removeAnimator(f)}r.canvas.get("autoDraw")||r.canvas.draw()}})},e.prototype.addAnimator=function(r){this.animators.push(r)},e.prototype.removeAnimator=function(r){this.animators.splice(r,1)},e.prototype.isAnimating=function(){return!!this.animators.length},e.prototype.stop=function(){this.timer&&this.timer.stop()},e.prototype.stopAllAnimations=function(r){void 0===r&&(r=!0),this.animators.forEach(function(t){t.stopAnimate(r)}),this.animators=[],this.canvas.draw()},e.prototype.getTime=function(){return this.current},e}();const V2=GE;var wg=["mousedown","mouseup","dblclick","mouseout","mouseover","mousemove","mouseleave","mouseenter","touchstart","touchmove","touchend","dragenter","dragover","dragleave","drop","contextmenu","mousewheel"];function q2(e,r,t){t.name=r,t.target=e,t.currentTarget=e,t.delegateTarget=e,e.emit(r,t)}function K2(e,r,t){if(t.bubbles){var n=void 0,i=!1;if("mouseenter"===r?(n=t.fromShape,i=!0):"mouseleave"===r&&(i=!0,n=t.toShape),e.isCanvas()&&i)return;if(n&&A2(e,n))return void(t.bubbles=!1);t.name=r,t.currentTarget=e,t.delegateTarget=e,e.emit(r,t)}}var Q2=function(){function e(r){var t=this;this.draggingShape=null,this.dragging=!1,this.currentShape=null,this.mousedownShape=null,this.mousedownPoint=null,this._eventCallback=function(n){t._triggerEvent(n.type,n)},this._onDocumentMove=function(n){if(t.canvas.get("el")!==n.target&&(t.dragging||t.currentShape)){var c=t._getPointInfo(n);t.dragging&&t._emitEvent("drag",n,c,t.draggingShape)}},this._onDocumentMouseUp=function(n){if(t.canvas.get("el")!==n.target&&t.dragging){var c=t._getPointInfo(n);t.draggingShape&&t._emitEvent("drop",n,c,null),t._emitEvent("dragend",n,c,t.draggingShape),t._afterDrag(t.draggingShape,c,n)}},this.canvas=r.canvas}return e.prototype.init=function(){this._bindEvents()},e.prototype._bindEvents=function(){var r=this,t=this.canvas.get("el");(0,S.S6)(wg,function(n){t.addEventListener(n,r._eventCallback)}),document&&(document.addEventListener("mousemove",this._onDocumentMove),document.addEventListener("mouseup",this._onDocumentMouseUp))},e.prototype._clearEvents=function(){var r=this,t=this.canvas.get("el");(0,S.S6)(wg,function(n){t.removeEventListener(n,r._eventCallback)}),document&&(document.removeEventListener("mousemove",this._onDocumentMove),document.removeEventListener("mouseup",this._onDocumentMouseUp))},e.prototype._getEventObj=function(r,t,n,i,l,c){var f=new b2(r,t);return f.fromShape=l,f.toShape=c,f.x=n.x,f.y=n.y,f.clientX=n.clientX,f.clientY=n.clientY,f.propagationPath.push(i),f},e.prototype._getShape=function(r,t){return this.canvas.getShape(r.x,r.y,t)},e.prototype._getPointInfo=function(r){var t=this.canvas,n=t.getClientByEvent(r),i=t.getPointByEvent(r);return{x:i.x,y:i.y,clientX:n.x,clientY:n.y}},e.prototype._triggerEvent=function(r,t){var n=this._getPointInfo(t),i=this._getShape(n,t),l=this["_on"+r],c=!1;if(l)l.call(this,n,i,t);else{var f=this.currentShape;"mouseenter"===r||"dragenter"===r||"mouseover"===r?(this._emitEvent(r,t,n,null,null,i),i&&this._emitEvent(r,t,n,i,null,i),"mouseenter"===r&&this.draggingShape&&this._emitEvent("dragenter",t,n,null)):"mouseleave"===r||"dragleave"===r||"mouseout"===r?(c=!0,f&&this._emitEvent(r,t,n,f,f,null),this._emitEvent(r,t,n,null,f,null),"mouseleave"===r&&this.draggingShape&&this._emitEvent("dragleave",t,n,null)):this._emitEvent(r,t,n,i,null,null)}if(c||(this.currentShape=i),i&&!i.get("destroyed")){var d=this.canvas;d.get("el").style.cursor=i.attr("cursor")||d.get("cursor")}},e.prototype._onmousedown=function(r,t,n){0===n.button&&(this.mousedownShape=t,this.mousedownPoint=r,this.mousedownTimeStamp=n.timeStamp),this._emitEvent("mousedown",n,r,t,null,null)},e.prototype._emitMouseoverEvents=function(r,t,n,i){var l=this.canvas.get("el");n!==i&&(n&&(this._emitEvent("mouseout",r,t,n,n,i),this._emitEvent("mouseleave",r,t,n,n,i),(!i||i.get("destroyed"))&&(l.style.cursor=this.canvas.get("cursor"))),i&&(this._emitEvent("mouseover",r,t,i,n,i),this._emitEvent("mouseenter",r,t,i,n,i)))},e.prototype._emitDragoverEvents=function(r,t,n,i,l){i?(i!==n&&(n&&this._emitEvent("dragleave",r,t,n,n,i),this._emitEvent("dragenter",r,t,i,n,i)),l||this._emitEvent("dragover",r,t,i)):n&&this._emitEvent("dragleave",r,t,n,n,i),l&&this._emitEvent("dragover",r,t,i)},e.prototype._afterDrag=function(r,t,n){r&&(r.set("capture",!0),this.draggingShape=null),this.dragging=!1;var i=this._getShape(t,n);i!==r&&this._emitMouseoverEvents(n,t,r,i),this.currentShape=i},e.prototype._onmouseup=function(r,t,n){if(0===n.button){var i=this.draggingShape;this.dragging?(i&&this._emitEvent("drop",n,r,t),this._emitEvent("dragend",n,r,i),this._afterDrag(i,r,n)):(this._emitEvent("mouseup",n,r,t),t===this.mousedownShape&&this._emitEvent("click",n,r,t),this.mousedownShape=null,this.mousedownPoint=null)}},e.prototype._ondragover=function(r,t,n){n.preventDefault(),this._emitDragoverEvents(n,r,this.currentShape,t,!0)},e.prototype._onmousemove=function(r,t,n){var i=this.canvas,l=this.currentShape,c=this.draggingShape;if(this.dragging)c&&this._emitDragoverEvents(n,r,l,t,!1),this._emitEvent("drag",n,r,c);else{var f=this.mousedownPoint;if(f){var d=this.mousedownShape,x=f.clientX-r.clientX,_=f.clientY-r.clientY;n.timeStamp-this.mousedownTimeStamp>120||x*x+_*_>40?d&&d.get("draggable")?((c=this.mousedownShape).set("capture",!1),this.draggingShape=c,this.dragging=!0,this._emitEvent("dragstart",n,r,c),this.mousedownShape=null,this.mousedownPoint=null):!d&&i.get("draggable")?(this.dragging=!0,this._emitEvent("dragstart",n,r,null),this.mousedownShape=null,this.mousedownPoint=null):(this._emitMouseoverEvents(n,r,l,t),this._emitEvent("mousemove",n,r,t)):(this._emitMouseoverEvents(n,r,l,t),this._emitEvent("mousemove",n,r,t))}else this._emitMouseoverEvents(n,r,l,t),this._emitEvent("mousemove",n,r,t)}},e.prototype._emitEvent=function(r,t,n,i,l,c){var f=this._getEventObj(r,t,n,i,l,c);if(i){f.shape=i,q2(i,r,f);for(var d=i.getParent();d;)d.emitDelegation(r,f),f.propagationStopped||K2(d,r,f),f.propagationPath.push(d),d=d.getParent()}else q2(this.canvas,r,f)},e.prototype.destroy=function(){this._clearEvents(),this.canvas=null,this.currentShape=null,this.draggingShape=null,this.mousedownPoint=null,this.mousedownShape=null,this.mousedownTimeStamp=null},e}();const YE=Q2;var J2=(0,Jv.qY)(),WE=J2&&"firefox"===J2.name;!function(e){function r(t){var n=e.call(this,t)||this;return n.initContainer(),n.initDom(),n.initEvents(),n.initTimeline(),n}(0,E.ZT)(r,e),r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return t.cursor="default",t.supportCSSTransform=!1,t},r.prototype.initContainer=function(){var t=this.get("container");(0,S.HD)(t)&&(t=document.getElementById(t),this.set("container",t))},r.prototype.initDom=function(){var t=this.createDom();this.set("el",t),this.get("container").appendChild(t),this.setDOMSize(this.get("width"),this.get("height"))},r.prototype.initEvents=function(){var t=new YE({canvas:this});t.init(),this.set("eventController",t)},r.prototype.initTimeline=function(){var t=new V2(this);this.set("timeline",t)},r.prototype.setDOMSize=function(t,n){var i=this.get("el");cg&&(i.style.width=t+"px",i.style.height=n+"px")},r.prototype.changeSize=function(t,n){this.setDOMSize(t,n),this.set("width",t),this.set("height",n),this.onCanvasChange("changeSize")},r.prototype.getRenderer=function(){return this.get("renderer")},r.prototype.getCursor=function(){return this.get("cursor")},r.prototype.setCursor=function(t){this.set("cursor",t);var n=this.get("el");cg&&n&&(n.style.cursor=t)},r.prototype.getPointByEvent=function(t){if(this.get("supportCSSTransform")){if(WE&&!(0,S.UM)(t.layerX)&&t.layerX!==t.offsetX)return{x:t.layerX,y:t.layerY};if(!(0,S.UM)(t.offsetX))return{x:t.offsetX,y:t.offsetY}}var i=this.getClientByEvent(t);return this.getPointByClient(i.x,i.y)},r.prototype.getClientByEvent=function(t){var n=t;return t.touches&&(n="touchend"===t.type?t.changedTouches[0]:t.touches[0]),{x:n.clientX,y:n.clientY}},r.prototype.getPointByClient=function(t,n){var l=this.get("el").getBoundingClientRect();return{x:t-l.left,y:n-l.top}},r.prototype.getClientByPoint=function(t,n){var l=this.get("el").getBoundingClientRect();return{x:t+l.left,y:n+l.top}},r.prototype.draw=function(){},r.prototype.removeDom=function(){var t=this.get("el");t.parentNode.removeChild(t)},r.prototype.clearEvents=function(){this.get("eventController").destroy()},r.prototype.isCanvas=function(){return!0},r.prototype.getParent=function(){return null},r.prototype.destroy=function(){var t=this.get("timeline");this.get("destroyed")||(this.clear(),t&&t.stop(),this.clearEvents(),this.removeDom(),e.prototype.destroy.call(this))}}(id),function(e){function r(){return null!==e&&e.apply(this,arguments)||this}(0,E.ZT)(r,e),r.prototype.isGroup=function(){return!0},r.prototype.isEntityGroup=function(){return!1},r.prototype.clone=function(){for(var t=e.prototype.clone.call(this),n=this.getChildren(),i=0;i=t&&i.minY<=n&&i.maxY>=n},r.prototype.afterAttrsChange=function(t){e.prototype.afterAttrsChange.call(this,t),this.clearCacheBBox()},r.prototype.getBBox=function(){var t=this.cfg.bbox;return t||(t=this.calculateBBox(),this.set("bbox",t)),t},r.prototype.getCanvasBBox=function(){var t=this.cfg.canvasBBox;return t||(t=this.calculateCanvasBBox(),this.set("canvasBBox",t)),t},r.prototype.applyMatrix=function(t){e.prototype.applyMatrix.call(this,t),this.set("canvasBBox",null)},r.prototype.calculateCanvasBBox=function(){var t=this.getBBox(),n=this.getTotalMatrix(),i=t.minX,l=t.minY,c=t.maxX,f=t.maxY;if(n){var d=Xl(n,[t.minX,t.minY]),p=Xl(n,[t.maxX,t.minY]),m=Xl(n,[t.minX,t.maxY]),x=Xl(n,[t.maxX,t.maxY]);i=Math.min(d[0],p[0],m[0],x[0]),c=Math.max(d[0],p[0],m[0],x[0]),l=Math.min(d[1],p[1],m[1],x[1]),f=Math.max(d[1],p[1],m[1],x[1])}var _=this.attrs;if(_.shadowColor){var T=_.shadowBlur,b=void 0===T?0:T,I=_.shadowOffsetX,F=void 0===I?0:I,B=_.shadowOffsetY,Y=void 0===B?0:B,H=c+b+F,et=l-b+Y,wt=f+b+Y;i=Math.min(i,i-b+F),c=Math.max(c,H),l=Math.min(l,et),f=Math.max(f,wt)}return{x:i,y:l,minX:i,minY:l,maxX:c,maxY:f,width:c-i,height:f-l}},r.prototype.clearCacheBBox=function(){this.set("bbox",null),this.set("canvasBBox",null)},r.prototype.isClipShape=function(){return this.get("isClipShape")},r.prototype.isInShape=function(t,n){return!1},r.prototype.isOnlyHitBox=function(){return!1},r.prototype.isHit=function(t,n){var i=this.get("startArrowShape"),l=this.get("endArrowShape"),c=[t,n,1],f=(c=this.invertFromMatrix(c))[0],d=c[1],p=this._isInBBox(f,d);return this.isOnlyHitBox()?p:!(!p||this.isClipped(f,d)||!(this.isInShape(f,d)||i&&i.isHit(f,d)||l&&l.isHit(f,d)))}}(hg);var _g=new Map;function Lo(e,r){_g.set(e,r)}function j2(e){var r=e.attr();return{x:r.x,y:r.y,width:r.width,height:r.height}}function Sg(e){var r=e.attr(),i=r.r;return{x:r.x-i,y:r.y-i,width:2*i,height:2*i}}var Ln=ct(9174);function tC(e,r){return e&&r?{minX:Math.min(e.minX,r.minX),minY:Math.min(e.minY,r.minY),maxX:Math.max(e.maxX,r.maxX),maxY:Math.max(e.maxY,r.maxY)}:e||r}function Mg(e,r){var t=e.get("startArrowShape"),n=e.get("endArrowShape");return t&&(r=tC(r,t.getCanvasBBox())),n&&(r=tC(r,n.getCanvasBBox())),r}var Tg=null;var Io=ct(2759);function kh(e,r){var t=e.prePoint,n=e.currentPoint,i=e.nextPoint,l=Math.pow(n[0]-t[0],2)+Math.pow(n[1]-t[1],2),c=Math.pow(n[0]-i[0],2)+Math.pow(n[1]-i[1],2),f=Math.pow(t[0]-i[0],2)+Math.pow(t[1]-i[1],2),d=Math.acos((l+c-f)/(2*Math.sqrt(l)*Math.sqrt(c)));if(!d||0===Math.sin(d)||(0,S.vQ)(d,0))return{xExtra:0,yExtra:0};var p=Math.abs(Math.atan2(i[1]-n[1],i[0]-n[0])),m=Math.abs(Math.atan2(i[0]-n[0],i[1]-n[1]));return p=p>Math.PI/2?Math.PI-p:p,m=m>Math.PI/2?Math.PI-m:m,{xExtra:Math.cos(d/2-p)*(r/2*(1/Math.sin(d/2)))-r/2||0,yExtra:Math.cos(m-d/2)*(r/2*(1/Math.sin(d/2)))-r/2||0}}Lo("rect",j2),Lo("image",j2),Lo("circle",Sg),Lo("marker",Sg),Lo("polyline",function XE(e){for(var t=e.attr().points,n=[],i=[],l=0;l1){var i=function eC(e,r){return r?r-e:.14*e}(r,t);return r*n+i*(n-1)}return r}(i,l,c),T={x:t,y:n-_};m&&("end"===m||"right"===m?T.x-=d:"center"===m&&(T.x-=d/2)),x&&("top"===x?T.y+=_:"middle"===x&&(T.y+=_/2)),p={x:T.x,y:T.y,width:d,height:_}}else p={x:t,y:n,width:0,height:0};return p}),Lo("path",function nC(e){var r=e.attr(),t=r.path,i=r.stroke?r.lineWidth:0,c=function cd(e,r){for(var t=[],n=[],i=[],l=0;l=0},e.prototype.getAdjustRange=function(r,t,n){var f,d,i=this.yField,l=n.indexOf(t),c=n.length;return!i&&this.isAdjust("y")?(f=0,d=1):c>1?(f=n[0===l?0:l-1],d=n[l===c-1?c-1:l+1],0!==l?f+=(t-f)/2:f-=(d-t)/2,l!==c-1?d-=(d-t)/2:d+=(t-n[c-2])/2):(f=0===t?0:t-.5,d=0===t?1:t+.5),{pre:f,next:d}},e.prototype.adjustData=function(r,t){var n=this,i=this.getDimValues(t);S.S6(r,function(l,c){S.S6(i,function(f,d){n.adjustDim(d,f,l,c)})})},e.prototype.groupData=function(r,t){return S.S6(r,function(n){void 0===n[t]&&(n[t]=0)}),S.vM(r,t)},e.prototype.adjustDim=function(r,t,n,i){},e.prototype.getDimValues=function(r){var n=this.xField,i=this.yField,l=S.f0({},this.dimValuesMap),c=[];return n&&this.isAdjust("x")&&c.push(n),i&&this.isAdjust("y")&&c.push(i),c.forEach(function(d){l&&l[d]||(l[d]=S.I(r,d).sort(function(p,m){return p-m}))}),!i&&this.isAdjust("y")&&(l.y=[0,1]),l},e}();const zh=Ig;var hd={},aC=function(e){return hd[e.toLowerCase()]},Nh=function(e,r){if(aC(e))throw new Error("Adjust type '"+e+"' existed.");hd[e.toLowerCase()]=r},fd=function(e,r){return(fd=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)n.hasOwnProperty(i)&&(t[i]=n[i])})(e,r)};function vd(e,r){function t(){this.constructor=e}fd(e,r),e.prototype=null===r?Object.create(r):(t.prototype=r.prototype,new t)}var Oo=function(){return Oo=Object.assign||function(r){for(var t,n=1,i=arguments.length;n=0)T=m+this.getIntervalOnlyOffset(i,n);else if(!S.UM(p)&&S.UM(d)&&p>=0)T=m+this.getDodgeOnlyOffset(i,n);else if(!S.UM(d)&&!S.UM(p)&&d>=0&&p>=0)T=m+this.getIntervalAndDodgeOffset(i,n);else{var I=_*c/i,F=f*I;T=(m+x)/2+(.5*(_-i*I-(i-1)*F)+((n+1)*I+n*F)-.5*I-.5*_)}return T},r.prototype.getIntervalOnlyOffset=function(t,n){var i=this,l=i.defaultSize,f=i.xDimensionLegenth,d=i.groupNum,m=i.maxColumnWidth,x=i.minColumnWidth,_=i.columnWidthRatio,T=i.intervalPadding/f,b=(1-(d-1)*T)/d*i.dodgeRatio/(t-1),I=((1-T*(d-1))/d-b*(t-1))/t;return I=S.UM(_)?I:1/d/t*_,S.UM(m)||(I=Math.min(I,m/f)),S.UM(x)||(I=Math.max(I,x/f)),((.5+n)*(I=l?l/f:I)+n*(b=((1-(d-1)*T)/d-t*I)/(t-1))+.5*T)*d-T/2},r.prototype.getDodgeOnlyOffset=function(t,n){var i=this,l=i.defaultSize,f=i.xDimensionLegenth,d=i.groupNum,m=i.maxColumnWidth,x=i.minColumnWidth,_=i.columnWidthRatio,T=i.dodgePadding/f,b=1*i.marginRatio/(d-1),I=((1-b*(d-1))/d-T*(t-1))/t;return I=_?1/d/t*_:I,S.UM(m)||(I=Math.min(I,m/f)),S.UM(x)||(I=Math.max(I,x/f)),((.5+n)*(I=l?l/f:I)+n*T+.5*(b=(1-(I*t+T*(t-1))*d)/(d-1)))*d-b/2},r.prototype.getIntervalAndDodgeOffset=function(t,n){var i=this,f=i.xDimensionLegenth,d=i.groupNum,p=i.intervalPadding/f,m=i.dodgePadding/f;return((.5+n)*(((1-p*(d-1))/d-m*(t-1))/t)+n*m+.5*p)*d-p/2},r.prototype.getDistribution=function(t){var i=this.cacheMap,l=i[t];return l||(l={},S.S6(this.adjustDataArray,function(c,f){var d=S.I(c,t);d.length||d.push(0),S.S6(d,function(p){l[p]||(l[p]=[]),l[p].push(f)})}),i[t]=l),l},r}(zh);const cC=qE;var KE=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return vd(r,e),r.prototype.process=function(t){var n=S.d9(t),i=S.xH(n);return this.adjustData(n,i),n},r.prototype.adjustDim=function(t,n,i){var l=this,c=this.groupData(i,t);return S.S6(c,function(f,d){return l.adjustGroup(f,t,parseFloat(d),n)})},r.prototype.getAdjustOffset=function(t){var n=t.pre,i=t.next,l=.05*(i-n);return function Hh(e,r){return(r-e)*Math.random()+e}(n+l,i-l)},r.prototype.adjustGroup=function(t,n,i,l){var c=this,f=this.getAdjustRange(n,i,l);return S.S6(t,function(d){d[n]=c.getAdjustOffset(f)}),t},r}(zh);const QE=KE;var Rg=S.Ct,JE=function(e){function r(t){var n=e.call(this,t)||this,i=t.adjustNames,c=t.height,f=void 0===c?NaN:c,d=t.size,p=void 0===d?10:d,m=t.reverseOrder,x=void 0!==m&&m;return n.adjustNames=void 0===i?["y"]:i,n.height=f,n.size=p,n.reverseOrder=x,n}return vd(r,e),r.prototype.process=function(t){var l=this.reverseOrder,c=this.yField?this.processStack(t):this.processOneDimStack(t);return l?this.reverse(c):c},r.prototype.reverse=function(t){return t.slice(0).reverse()},r.prototype.processStack=function(t){var n=this,i=n.xField,l=n.yField,f=n.reverseOrder?this.reverse(t):t,d=new Rg,p=new Rg;return f.map(function(m){return m.map(function(x){var _,T=S.U2(x,i,0),b=S.U2(x,[l]),I=T.toString();if(b=S.kJ(b)?b[1]:b,!S.UM(b)){var F=b>=0?d:p;F.has(I)||F.set(I,0);var B=F.get(I),Y=b+B;return F.set(I,Y),Oo(Oo({},x),((_={})[l]=[B,Y],_))}return x})})},r.prototype.processOneDimStack=function(t){var n=this,i=this,l=i.xField,c=i.height,p=i.reverseOrder?this.reverse(t):t,m=new Rg;return p.map(function(x){return x.map(function(_){var T,I=_[l],F=2*n.size/c;m.has(I)||m.set(I,F/2);var B=m.get(I);return m.set(I,B+F),Oo(Oo({},_),((T={}).y=B,T))})})},r}(zh);const dd=JE;var hC=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return vd(r,e),r.prototype.process=function(t){var n=S.xH(t),l=this.xField,c=this.yField,f=this.getXValuesMaxMap(n),d=Math.max.apply(Math,Object.keys(f).map(function(p){return f[p]}));return S.UI(t,function(p){return S.UI(p,function(m){var x,_,T=m[c],b=m[l];if(S.kJ(T)){var I=(d-f[b])/2;return Oo(Oo({},m),((x={})[c]=S.UI(T,function(B){return I+B}),x))}var F=(d-T)/2;return Oo(Oo({},m),((_={})[c]=[F,T+F],_))})})},r.prototype.getXValuesMaxMap=function(t){var n=this,l=this.xField,c=this.yField,f=S.vM(t,function(d){return d[l]});return S.Q8(f,function(d){return n.getDimMaxValue(d,c)})},r.prototype.getDimMaxValue=function(t,n){var i=S.UI(t,function(c){return S.U2(c,n,[])}),l=S.xH(i);return Math.max.apply(Math,l)},r}(zh);const jE=hC;Nh("Dodge",cC),Nh("Jitter",QE),Nh("Stack",dd),Nh("Symmetric",jE);var pd=function(e,r){return(0,S.HD)(r)?r:e.invert(e.scale(r))},fC=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=[],n=0;n1?1:Number(r),n=e.length-1,i=Math.floor(n*t),l=n*t-i,c=e[i],f=i===n?c:e[i+1];return s3([Pg(c,f,l,0),Pg(c,f,l,1),Pg(c,f,l,2)])}(t,n)}},toRGB:(0,S.HP)(zg),toCSSGradient:function(e){if(function(e){return/^[r,R,L,l]{1}[\s]*\(/.test(e)}(e)){var r,t=void 0;if("l"===e[0])t=(n=Bg.exec(e))[2],r="linear-gradient("+(+n[1]+90)+"deg, ";else if("r"===e[0]){var n;r="radial-gradient(",t=(n=n3.exec(e))[4]}var l=t.match(i3);return(0,S.S6)(l,function(c,f){var d=c.split(":");r+=d[1]+" "+100*d[0]+"%",f!==l.length-1&&(r+=", ")}),r+=")"}return e}};var c3=function(e){function r(t){var n=e.call(this,t)||this;return n.type="color",n.names=["color"],(0,S.HD)(n.values)&&(n.linear=!0),n.gradient=Vs.gradient(n.values),n}return Yh(r,e),r.prototype.getLinearValue=function(t){return this.gradient(t)},r}(Gh);const h3=c3;var f3=function(e){function r(t){var n=e.call(this,t)||this;return n.type="opacity",n.names=["opacity"],n}return Yh(r,e),r}(Gh);const nc=f3;var mC=function(e){function r(t){var n=e.call(this,t)||this;return n.names=["x","y"],n.type="position",n}return Yh(r,e),r.prototype.mapping=function(t,n){var i=this.scales,l=i[0],c=i[1];return(0,S.UM)(t)||(0,S.UM)(n)?[]:[(0,S.kJ)(t)?t.map(function(f){return l.scale(f)}):l.scale(t),(0,S.kJ)(n)?n.map(function(f){return c.scale(f)}):c.scale(n)]},r}(Gh);const xC=mC;var CC=function(e){function r(t){var n=e.call(this,t)||this;return n.type="shape",n.names=["shape"],n}return Yh(r,e),r.prototype.getLinearValue=function(t){var n=Math.round((this.values.length-1)*t);return this.values[n]},r}(Gh);const Ng=CC;var wC=function(e){function r(t){var n=e.call(this,t)||this;return n.type="size",n.names=["size"],n}return Yh(r,e),r}(Gh);const _C=wC;var v3={};function Fo(e,r){v3[e]=r}var p3=function(){function e(r){this.type="base",this.isCategory=!1,this.isLinear=!1,this.isContinuous=!1,this.isIdentity=!1,this.values=[],this.range=[0,1],this.ticks=[],this.__cfg__=r,this.initCfg(),this.init()}return e.prototype.translate=function(r){return r},e.prototype.change=function(r){(0,S.f0)(this.__cfg__,r),this.init()},e.prototype.clone=function(){return this.constructor(this.__cfg__)},e.prototype.getTicks=function(){var r=this;return(0,S.UI)(this.ticks,function(t,n){return(0,S.Kn)(t)?t:{text:r.getText(t,n),tickValue:t,value:r.scale(t)}})},e.prototype.getText=function(r,t){var n=this.formatter,i=n?n(r,t):r;return(0,S.UM)(i)||!(0,S.mf)(i.toString)?"":i.toString()},e.prototype.getConfig=function(r){return this.__cfg__[r]},e.prototype.init=function(){(0,S.f0)(this,this.__cfg__),this.setDomain(),(0,S.xb)(this.getConfig("ticks"))&&(this.ticks=this.calculateTicks())},e.prototype.initCfg=function(){},e.prototype.setDomain=function(){},e.prototype.calculateTicks=function(){var r=this.tickMethod,t=[];if((0,S.HD)(r)){var n=function d3(e){return v3[e]}(r);if(!n)throw new Error("There is no method to to calculate ticks!");t=n(this)}else(0,S.mf)(r)&&(t=r(this));return t},e.prototype.rangeMin=function(){return this.range[0]},e.prototype.rangeMax=function(){return this.range[1]},e.prototype.calcPercent=function(r,t,n){return(0,S.hj)(r)?(r-t)/(n-t):NaN},e.prototype.calcValue=function(r,t,n){return t+r*(n-t)},e}();const yd=p3;var g3=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="cat",t.isCategory=!0,t}return(0,E.ZT)(r,e),r.prototype.buildIndexMap=function(){if(!this.translateIndexMap){this.translateIndexMap=new Map;for(var t=0;tthis.max?NaN:this.values[l]},r.prototype.getText=function(t){for(var n=[],i=1;i1?t-1:t}this.translateIndexMap&&(this.translateIndexMap=void 0)},r}(yd);const Wh=g3;var y3=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,Zl="\\d\\d?",Na="\\d\\d",md="[^\\s]+",m3=/\[([^]*?)\]/gm;function x3(e,r){for(var t=[],n=0,i=e.length;n-1?i:null}};function us(e){for(var r=[],t=1;t3?0:(e-e%10!=10?1:0)*e%10]}},ac=us({},Yg),$s=function(e){return ac=us(ac,e)},Wg=function(e){return e.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},Si=function(e,r){for(void 0===r&&(r=2),e=String(e);e.length0?"-":"+")+Si(100*Math.floor(Math.abs(r)/60)+Math.abs(r)%60,4)},Z:function(e){var r=e.getTimezoneOffset();return(r>0?"-":"+")+Si(Math.floor(Math.abs(r)/60),2)+":"+Si(Math.abs(r)%60,2)}},Uh=function(e){return+e-1},xd=[null,Zl],Ug=[null,md],Cd=["isPm",md,function(e,r){var t=e.toLowerCase();return t===r.amPm[0]?0:t===r.amPm[1]?1:null}],MC=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(e){var r=(e+"").match(/([+-]|\d\d)/gi);if(r){var t=60*+r[1]+parseInt(r[2],10);return"+"===r[0]?t:-t}return 0}],cs={D:["day",Zl],DD:["day",Na],Do:["day",Zl+md,function(e){return parseInt(e,10)}],M:["month",Zl,Uh],MM:["month",Na,Uh],YY:["year",Na,function(e){var t=+(""+(new Date).getFullYear()).substr(0,2);return+(""+(+e>68?t-1:t)+e)}],h:["hour",Zl,void 0,"isPm"],hh:["hour",Na,void 0,"isPm"],H:["hour",Zl],HH:["hour",Na],m:["minute",Zl],mm:["minute",Na],s:["second",Zl],ss:["second",Na],YYYY:["year","\\d{4}"],S:["millisecond","\\d",function(e){return 100*+e}],SS:["millisecond",Na,function(e){return 10*+e}],SSS:["millisecond","\\d{3}"],d:xd,dd:xd,ddd:Ug,dddd:Ug,MMM:["month",md,C3("monthNamesShort")],MMMM:["month",md,C3("monthNames")],a:Cd,A:Cd,ZZ:MC,Z:MC},Hn={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},Sa=function(e){return us(Hn,e)},Xg=function(e,r,t){if(void 0===r&&(r=Hn.default),void 0===t&&(t={}),"number"==typeof e&&(e=new Date(e)),"[object Date]"!==Object.prototype.toString.call(e)||isNaN(e.getTime()))throw new Error("Invalid Date pass to format");var n=[];r=(r=Hn[r]||r).replace(m3,function(l,c){return n.push(c),"@@@"});var i=us(us({},ac),t);return(r=r.replace(y3,function(l){return SC[l](e,i)})).replace(/@@@/g,function(){return n.shift()})};function Ri(e,r,t){if(void 0===t&&(t={}),"string"!=typeof r)throw new Error("Invalid format in fecha parse");if(r=Hn[r]||r,e.length>1e3)return null;var i={year:(new Date).getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},l=[],c=[],f=r.replace(m3,function(H,et){return c.push(Wg(et)),"@@@"}),d={},p={};f=Wg(f).replace(y3,function(H){var et=cs[H],wt=et[0],Ot=et[1],$t=et[3];if(d[wt])throw new Error("Invalid format. "+wt+" specified twice in format");return d[wt]=!0,$t&&(p[$t]=!0),l.push(et),"("+Ot+")"}),Object.keys(p).forEach(function(H){if(!d[H])throw new Error("Invalid format. "+H+" is required in specified format")}),f=f.replace(/@@@/g,function(){return c.shift()});var B,m=e.match(new RegExp(f,"i"));if(!m)return null;for(var x=us(us({},ac),t),_=1;_11||i.month<0||i.day>31||i.day<1||i.hour>23||i.hour<0||i.minute>59||i.minute<0||i.second>59||i.second<0)return null;return B}const Ue={format:Xg,parse:Ri,defaultI18n:Yg,setGlobalDateI18n:$s,setGlobalDateMasks:Sa};var oa="format";function TC(e,r){return(ae[oa]||Ue[oa])(e,r)}function oc(e){return(0,S.HD)(e)&&(e=e.indexOf("T")>0?new Date(e).getTime():new Date(e.replace(/-/gi,"/")).getTime()),(0,S.J_)(e)&&(e=e.getTime()),e}var In=1e3,Vn=6e4,sc=60*Vn,Lr=24*sc,lc=31*Lr,uc=365*Lr,si=[["HH:mm:ss",In],["HH:mm:ss",1e4],["HH:mm:ss",3e4],["HH:mm",Vn],["HH:mm",10*Vn],["HH:mm",30*Vn],["HH",sc],["HH",6*sc],["HH",12*sc],["YYYY-MM-DD",Lr],["YYYY-MM-DD",4*Lr],["YYYY-WW",7*Lr],["YYYY-MM",lc],["YYYY-MM",4*lc],["YYYY-MM",6*lc],["YYYY",380*Lr]];var _3=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="timeCat",t}return(0,E.ZT)(r,e),r.prototype.translate=function(t){t=oc(t);var n=this.values.indexOf(t);return-1===n&&(n=(0,S.hj)(t)&&t-1){var l=this.values[i],c=this.formatter;return c?c(l,n):TC(l,this.mask)}return t},r.prototype.initCfg=function(){this.tickMethod="time-cat",this.mask="YYYY-MM-DD",this.tickCount=7},r.prototype.setDomain=function(){var t=this.values;(0,S.S6)(t,function(n,i){t[i]=oc(n)}),t.sort(function(n,i){return n-i}),e.prototype.setDomain.call(this)},r}(Wh);const S3=_3;var M3=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.isContinuous=!0,t}return(0,E.ZT)(r,e),r.prototype.scale=function(t){if((0,S.UM)(t))return NaN;var n=this.rangeMin(),i=this.rangeMax();return this.max===this.min?n:n+this.getScalePercent(t)*(i-n)},r.prototype.init=function(){e.prototype.init.call(this);var t=this.ticks,n=(0,S.YM)(t),i=(0,S.Z$)(t);nthis.max&&(this.max=i),(0,S.UM)(this.minLimit)||(this.min=n),(0,S.UM)(this.maxLimit)||(this.max=i)},r.prototype.setDomain=function(){var t=(0,S.rx)(this.values),n=t.min,i=t.max;(0,S.UM)(this.min)&&(this.min=n),(0,S.UM)(this.max)&&(this.max=i),this.min>this.max&&(this.min=n,this.max=i)},r.prototype.calculateTicks=function(){var t=this,n=e.prototype.calculateTicks.call(this);return this.nice||(n=(0,S.hX)(n,function(i){return i>=t.min&&i<=t.max})),n},r.prototype.getScalePercent=function(t){var i=this.min;return(t-i)/(this.max-i)},r.prototype.getInvertPercent=function(t){return(t-this.rangeMin())/(this.rangeMax()-this.rangeMin())},r}(yd);const Ni=M3;var Hi=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="linear",t.isLinear=!0,t}return(0,E.ZT)(r,e),r.prototype.invert=function(t){var n=this.getInvertPercent(t);return this.min+n*(this.max-this.min)},r.prototype.initCfg=function(){this.tickMethod="wilkinson-extended",this.nice=!1},r}(Ni);const Zs=Hi;function hs(e,r){var t=Math.E;return r>=0?Math.pow(t,Math.log(r)/e):-1*Math.pow(t,Math.log(-r)/e)}function li(e,r){return 1===e?1:Math.log(r)/Math.log(e)}function bC(e,r,t){(0,S.UM)(t)&&(t=Math.max.apply(null,e));var n=t;return(0,S.S6)(e,function(i){i>0&&i1&&(n=1),n}var $g=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="log",t}return(0,E.ZT)(r,e),r.prototype.invert=function(t){var f,n=this.base,i=li(n,this.max),l=this.rangeMin(),c=this.rangeMax()-l,d=this.positiveMin;if(d){if(0===t)return 0;var p=1/(i-(f=li(n,d/n)))*c;if(t=0?1:-1;return Math.pow(f,i)*d},r.prototype.initCfg=function(){this.tickMethod="pow",this.exponent=2,this.tickCount=5,this.nice=!0},r.prototype.getScalePercent=function(t){var n=this.max,i=this.min;if(n===i)return 0;var l=this.exponent;return(hs(l,t)-hs(l,i))/(hs(l,n)-hs(l,i))},r}(Ni);const Zg=ue;var Ma=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="time",t}return(0,E.ZT)(r,e),r.prototype.getText=function(t,n){var i=this.translate(t),l=this.formatter;return l?l(i,n):TC(i,this.mask)},r.prototype.scale=function(t){var n=t;return((0,S.HD)(n)||(0,S.J_)(n))&&(n=this.translate(n)),e.prototype.scale.call(this,n)},r.prototype.translate=function(t){return oc(t)},r.prototype.initCfg=function(){this.tickMethod="time-pretty",this.mask="YYYY-MM-DD",this.tickCount=7,this.nice=!1},r.prototype.setDomain=function(){var t=this.values,n=this.getConfig("min"),i=this.getConfig("max");if((!(0,S.UM)(n)||!(0,S.hj)(n))&&(this.min=this.translate(this.min)),(!(0,S.UM)(i)||!(0,S.hj)(i))&&(this.max=this.translate(this.max)),t&&t.length){var l=[],c=1/0,f=c,d=0;(0,S.S6)(t,function(p){var m=oc(p);if(isNaN(m))throw new TypeError("Invalid Time: "+p+" in time scale!");c>m?(f=c,c=m):f>m&&(f=m),d1&&(this.minTickInterval=f-c),(0,S.UM)(n)&&(this.min=c),(0,S.UM)(i)&&(this.max=d)}},r}(Zs);const Ae=Ma;var Be=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="quantize",t}return(0,E.ZT)(r,e),r.prototype.invert=function(t){var n=this.ticks,i=n.length,l=this.getInvertPercent(t),c=Math.floor(l*(i-1));if(c>=i-1)return(0,S.Z$)(n);if(c<0)return(0,S.YM)(n);var f=n[c],p=c/(i-1);return f+(l-p)/((c+1)/(i-1)-p)*(n[c+1]-f)},r.prototype.initCfg=function(){this.tickMethod="r-pretty",this.tickCount=5,this.nice=!0},r.prototype.calculateTicks=function(){var t=e.prototype.calculateTicks.call(this);return this.nice||((0,S.Z$)(t)!==this.max&&t.push(this.max),(0,S.YM)(t)!==this.min&&t.unshift(this.min)),t},r.prototype.getScalePercent=function(t){var n=this.ticks;if(t<(0,S.YM)(n))return 0;if(t>(0,S.Z$)(n))return 1;var i=0;return(0,S.S6)(n,function(l,c){if(!(t>=l))return!1;i=c}),i/(n.length-1)},r}(Ni);const EC=Be;var LC=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="quantile",t}return(0,E.ZT)(r,e),r.prototype.initCfg=function(){this.tickMethod="quantile",this.tickCount=5,this.nice=!0},r}(EC);const T3=LC;var IC={};function ni(e){return IC[e]}function Do(e,r){if(ni(e))throw new Error("type '"+e+"' existed.");IC[e]=r}var Gi=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="identity",t.isIdentity=!0,t}return(0,E.ZT)(r,e),r.prototype.calculateTicks=function(){return this.values},r.prototype.scale=function(t){return this.values[0]!==t&&(0,S.hj)(t)?t:this.range[0]},r.prototype.invert=function(t){var n=this.range;return tn[1]?NaN:this.values[0]},r}(yd);const OC=Gi;function RC(e){var r=e.values,t=e.tickInterval,n=e.tickCount,i=e.showLast;if((0,S.hj)(t)){var l=(0,S.hX)(r,function(b,I){return I%t==0}),c=(0,S.Z$)(r);return i&&(0,S.Z$)(l)!==c&&l.push(c),l}var f=r.length,d=e.min,p=e.max;if((0,S.UM)(d)&&(d=0),(0,S.UM)(p)&&(p=r.length-1),!(0,S.hj)(n)||n>=f)return r.slice(d,p+1);if(n<=0||p<=0)return[];for(var m=1===n?f:Math.floor(f/(n-1)),x=[],_=d,T=0;T=p);T++)_=Math.min(d+T*m,p),x.push(T===n-1&&i?r[p]:r[_]);return x}var FC=Math.sqrt(50),DC=Math.sqrt(10),BC=Math.sqrt(2),A3=function(){function e(){this._domain=[0,1]}return e.prototype.domain=function(r){return r?(this._domain=Array.from(r,Number),this):this._domain.slice()},e.prototype.nice=function(r){var t,n;void 0===r&&(r=5);var p,i=this._domain.slice(),l=0,c=this._domain.length-1,f=this._domain[l],d=this._domain[c];return d0?p=wd(f=Math.floor(f/p)*p,d=Math.ceil(d/p)*p,r):p<0&&(p=wd(f=Math.ceil(f*p)/p,d=Math.floor(d*p)/p,r)),p>0?(i[l]=Math.floor(f/p)*p,i[c]=Math.ceil(d/p)*p,this.domain(i)):p<0&&(i[l]=Math.ceil(f*p)/p,i[c]=Math.floor(d*p)/p,this.domain(i)),this},e.prototype.ticks=function(r){return void 0===r&&(r=5),function E3(e,r,t){var n,l,c,f,i=-1;if(t=+t,(e=+e)===(r=+r)&&t>0)return[e];if((n=r0)for(e=Math.ceil(e/f),r=Math.floor(r/f),c=new Array(l=Math.ceil(r-e+1));++i=0?(l>=FC?10:l>=DC?5:l>=BC?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(l>=FC?10:l>=DC?5:l>=BC?2:1)}function qg(e,r,t){return("ceil"===t?Math.ceil(e/r):"floor"===t?Math.floor(e/r):Math.round(e/r))*r}function Fi(e,r,t){var n=qg(e,t,"floor"),i=qg(r,t,"ceil");n=(0,S.ri)(n,t),i=(0,S.ri)(i,t);for(var l=[],c=Math.max((i-n)/(Math.pow(2,12)-1),t),f=n;f<=i;f+=c){var d=(0,S.ri)(f,c);l.push(d)}return{min:n,max:i,ticks:l}}function Gn(e,r,t){var n,i=e.minLimit,l=e.maxLimit,c=e.min,f=e.max,d=e.tickCount,p=void 0===d?5:d,m=(0,S.UM)(i)?(0,S.UM)(r)?c:r:i,x=(0,S.UM)(l)?(0,S.UM)(t)?f:t:l;if(m>x&&(x=(n=[m,x])[0],m=n[1]),p<=2)return[m,x];for(var _=(x-m)/(p-1),T=[],b=0;b=0&&(d=1),1-f/(c-1)-t+d}function PC(e,r,t){var n=(0,S.dp)(r);return 1-(0,S.cq)(r,e)/(n-1)-t+1}function kC(e,r,t,n,i,l){var c=(e-1)/(l-i),f=(r-1)/(Math.max(l,n)-Math.min(t,i));return 2-Math.max(c/f,f/c)}function Ta(e,r){return e>=r?2-(e-1)/(r-1):1}function _d(e,r,t,n){var i=r-e;return 1-.5*(Math.pow(r-n,2)+Math.pow(e-t,2))/Math.pow(.1*i,2)}function D3(e,r,t){var n=r-e;return t>n?1-Math.pow((t-n)/2,2)/Math.pow(.1*n,2):1}function Kg(e,r,t){if(void 0===t&&(t=5),e===r)return{max:r,min:e,ticks:[e]};var n=t<0?0:Math.round(t);if(0===n)return{max:r,min:e,ticks:[]};var f=(r-e)/n,d=Math.pow(10,Math.floor(Math.log10(f))),p=d;2*d-f<1.5*(f-p)&&5*d-f<2.75*(f-(p=2*d))&&10*d-f<1.5*(f-(p=5*d))&&(p=10*d);for(var m=Math.ceil(r/p),x=Math.floor(e/p),_=Math.max(m*p,r),T=Math.min(x*p,e),b=Math.floor((_-T)/p)+1,I=new Array(b),F=0;F1e148){var d=(r-e)/(f=t||5);return{min:e,max:r,ticks:Array(f).fill(null).map(function(ir,Pr){return ui(e+d*Pr)})}}for(var p={score:-2,lmin:0,lmax:0,lstep:0},m=1;m<1/0;){for(var x=0;xp.score&&(!n||$t<=e&&ge>=r)&&(p.lmin=$t,p.lmax=ge,p.lstep=le,p.score=Rr)}B+=1}b+=1}}m+=1}var Ie=ui(p.lmax),We=ui(p.lmin),nr=ui(p.lstep),Ve=Math.floor(function Mr(e){return Math.round(1e12*e)/1e12}((Ie-We)/nr))+1,je=new Array(Ve);for(je[0]=ui(We),x=1;x>>1;e(r[f])>t?c=f:l=f+1}return l}}(function(c){return c[1]})(si,n)-1,l=si[i];return i<0?l=si[0]:i>=si.length&&(l=(0,S.Z$)(si)),l}(r,t,l)[1])/l;f>1&&(i*=Math.ceil(f)),n&&iuc)for(var d=Yi(t),p=Math.ceil(l/uc),m=f;m<=d+p;m+=p)c.push(HC(m));else if(l>lc){var x=Math.ceil(l/lc),_=Qg(r),T=function fs(e,r){var t=Yi(e),n=Yi(r),i=Qg(e);return 12*(n-t)+(Qg(r)-i)%12}(r,t);for(m=0;m<=T+x;m+=x)c.push(qr(f,m+_))}else if(l>Lr){var I=(b=new Date(r)).getFullYear(),F=b.getMonth(),B=b.getDate(),Y=Math.ceil(l/Lr),G=function Y3(e,r){return Math.ceil((r-e)/Lr)}(r,t);for(m=0;msc){I=(b=new Date(r)).getFullYear(),F=b.getMonth(),Y=b.getDate();var b,H=b.getHours(),et=Math.ceil(l/sc),wt=function W3(e,r){return Math.ceil((r-e)/sc)}(r,t);for(m=0;m<=wt+et;m+=et)c.push(new Date(I,F,Y,H+m).getTime())}else if(l>Vn){var Ot=function Wi(e,r){return Math.ceil((r-e)/6e4)}(r,t),$t=Math.ceil(l/Vn);for(m=0;m<=Ot+$t;m+=$t)c.push(r+m*Vn)}else{var ge=l;ge=512&&console.warn("Notice: current ticks length("+c.length+') >= 512, may cause performance issues, even out of memory. Because of the configure "tickInterval"(in milliseconds, current is '+l+") is too small, increase the value to solve the problem!"),c}),Fo("log",function k3(e){var c,r=e.base,t=e.tickCount,n=e.min,i=e.max,l=e.values,f=li(r,i);if(n>0)c=Math.floor(li(r,n));else{var d=bC(l,r,i);c=Math.floor(li(r,d))}for(var m=Math.ceil((f-c)/t),x=[],_=c;_=0?1:-1;return Math.pow(c,r)*f})}),Fo("quantile",function z3(e){var r=e.tickCount,t=e.values;if(!t||!t.length)return[];for(var n=t.slice().sort(function(f,d){return f-d}),i=[],l=0;l=0&&this.radius<=1&&(n*=this.radius),this.d=Math.floor(n*(1-this.innerRadius)/t),this.a=this.d/(2*Math.PI),this.x={start:this.startAngle,end:this.endAngle},this.y={start:this.innerRadius*n,end:this.innerRadius*n+.99*this.d}},r.prototype.convertPoint=function(t){var n,i=t.x,l=t.y;this.isTransposed&&(i=(n=[l,i])[0],l=n[1]);var c=this.convertDim(i,"x"),f=this.a*c,d=this.convertDim(l,"y");return{x:this.center.x+Math.cos(c)*(f+d),y:this.center.y+Math.sin(c)*(f+d)}},r.prototype.invertPoint=function(t){var n,i=this.d+this.y.start,l=Tr.$X([0,0],[t.x,t.y],[this.center.x,this.center.y]),c=Zr.Dg(l,[1,0],!0),f=c*this.a;Tr.kE(l)this.width/n?{x:this.center.x-(.5-l)*this.width,y:this.center.y-(.5-c)*(f=this.width/n)*i}:{x:this.center.x-(.5-l)*(f=this.height/i)*n,y:this.center.y-(.5-c)*this.height},this.polarRadius=this.radius,this.radius?this.radius>0&&this.radius<=1?this.polarRadius=f*this.radius:(this.radius<=0||this.radius>f)&&(this.polarRadius=f):this.polarRadius=f,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 n,i=this.getCenter(),l=t.x,c=t.y;return this.isTransposed&&(l=(n=[c,l])[0],c=n[1]),l=this.convertDim(l,"x"),c=this.convertDim(c,"y"),{x:i.x+Math.cos(l)*c,y:i.y+Math.sin(l)*c}},r.prototype.invertPoint=function(t){var n,i=this.getCenter(),l=[t.x-i.x,t.y-i.y],f=this.startAngle,d=this.endAngle;this.isReflect("x")&&(f=(n=[d,f])[0],d=n[1]);var p=[1,0,0,0,1,0,0,0,1];Zr.zu(p,p,f);var m=[1,0,0];Zh(m,m,p);var _=Zr.Dg([m[0],m[1]],l,d0?b:-b;var I=this.invertDim(T,"y"),F={x:0,y:0};return F.x=this.isTransposed?I:b,F.y=this.isTransposed?b:I,F},r.prototype.getCenter=function(){return this.circleCenter},r.prototype.getOneBox=function(){var t=this.startAngle,n=this.endAngle;if(Math.abs(n-t)>=2*Math.PI)return{minX:-1,maxX:1,minY:-1,maxY:1};for(var i=[0,Math.cos(t),Math.cos(n)],l=[0,Math.sin(t),Math.sin(n)],c=Math.min(t,n);c2&&(t.push([i].concat(c.splice(0,2))),f="l",i="m"===i?"l":"L"),"o"===f&&1===c.length&&t.push([i,c[0]]),"r"===f)t.push([i].concat(c));else for(;c.length>=r[f]&&(t.push([i].concat(c.splice(0,r[f]))),r[f]););return e}),t},h6=function(e,r){if(e.length!==r.length)return!1;var t=!0;return(0,S.S6)(e,function(n,i){if(n!==r[i])return t=!1,!1}),t};function f6(e,r,t){var n=null,i=t;return r=0;d--)c=l[d].index,"add"===l[d].type?e.splice(c,0,[].concat(e[c])):e.splice(c,1)}var x=i-(n=e.length);if(n0)){e[n]=r[n];break}t=Od(t,e[n-1],1)}e[n]=["Q"].concat(t.reduce(function(i,l){return i.concat(l)},[]));break;case"T":e[n]=["T"].concat(t[0]);break;case"C":if(t.length<3){if(!(n>0)){e[n]=r[n];break}t=Od(t,e[n-1],2)}e[n]=["C"].concat(t.reduce(function(i,l){return i.concat(l)},[]));break;case"S":if(t.length<2){if(!(n>0)){e[n]=r[n];break}t=Od(t,e[n-1],1)}e[n]=["S"].concat(t.reduce(function(i,l){return i.concat(l)},[]));break;default:e[n]=r[n]}return e},v6=function(){function e(r,t){this.bubbles=!0,this.target=null,this.currentTarget=null,this.delegateTarget=null,this.delegateObject=null,this.defaultPrevented=!1,this.propagationStopped=!1,this.shape=null,this.fromShape=null,this.toShape=null,this.propagationPath=[],this.type=r,this.name=r,this.originalEvent=t,this.timeStamp=t.timeStamp}return e.prototype.preventDefault=function(){this.defaultPrevented=!0,this.originalEvent.preventDefault&&this.originalEvent.preventDefault()},e.prototype.stopPropagation=function(){this.propagationStopped=!0},e.prototype.toString=function(){return"[Event (type="+this.type+")]"},e.prototype.save=function(){},e.prototype.restore=function(){},e}();const Po=v6;function iw(e,r){var t=e.indexOf(r);-1!==t&&e.splice(t,1)}var aw=typeof window<"u"&&typeof window.document<"u";function oy(e,r){if(e.isCanvas())return!0;for(var t=r.getParent(),n=!1;t;){if(t===e){n=!0;break}t=t.getParent()}return n}function vs(e){return e.cfg.visible&&e.cfg.capture}var d6=function(e){function r(t){var n=e.call(this)||this;n.destroyed=!1;var i=n.getDefaultCfg();return n.cfg=(0,S.CD)(i,t),n}return(0,E.ZT)(r,e),r.prototype.getDefaultCfg=function(){return{}},r.prototype.get=function(t){return this.cfg[t]},r.prototype.set=function(t,n){this.cfg[t]=n},r.prototype.destroy=function(){this.cfg={destroyed:!0},this.off(),this.destroyed=!0},r}(Ah.Z);const ow=d6;function sw(e,r){var t=[],n=e[0],i=e[1],l=e[2],c=e[3],f=e[4],d=e[5],p=e[6],m=e[7],x=e[8],_=r[0],T=r[1],b=r[2],I=r[3],F=r[4],B=r[5],Y=r[6],G=r[7],H=r[8];return t[0]=_*n+T*c+b*p,t[1]=_*i+T*f+b*m,t[2]=_*l+T*d+b*x,t[3]=I*n+F*c+B*p,t[4]=I*i+F*f+B*m,t[5]=I*l+F*d+B*x,t[6]=Y*n+G*c+H*p,t[7]=Y*i+G*f+H*m,t[8]=Y*l+G*d+H*x,t}function fc(e,r){var t=[],n=r[0],i=r[1];return t[0]=e[0]*n+e[3]*i+e[6],t[1]=e[1]*n+e[4]*i+e[7],t}var Qh=Zr.vs,vc="matrix",g6=["zIndex","capture","visible","type"],y6=["repeat"];function x6(e,r){var t={},n=r.attrs;for(var i in e)t[i]=n[i];return t}var Jh=function(e){function r(t){var n=e.call(this,t)||this;n.attrs={};var i=n.getDefaultAttrs();return(0,S.CD)(i,t.attrs),n.attrs=i,n.initAttrs(i),n.initAnimate(),n}return(0,E.ZT)(r,e),r.prototype.getDefaultCfg=function(){return{visible:!0,capture:!0,zIndex:0}},r.prototype.getDefaultAttrs=function(){return{matrix:this.getDefaultMatrix(),opacity:1}},r.prototype.onCanvasChange=function(t){},r.prototype.initAttrs=function(t){},r.prototype.initAnimate=function(){this.set("animable",!0),this.set("animating",!1)},r.prototype.isGroup=function(){return!1},r.prototype.getParent=function(){return this.get("parent")},r.prototype.getCanvas=function(){return this.get("canvas")},r.prototype.attr=function(){for(var t,n=[],i=0;i0?l=function uw(e,r){if(r.onFrame)return e;var t=r.startTime,n=r.delay,i=r.duration,l=Object.prototype.hasOwnProperty;return(0,S.S6)(e,function(c){t+nc.delay&&(0,S.S6)(r.toAttrs,function(f,d){l.call(c.toAttrs,d)&&(delete c.toAttrs[d],delete c.fromAttrs[d])})}),e}(l,H):i.addAnimator(this),l.push(H),this.set("animations",l),this.set("_pause",{isPaused:!1})}},r.prototype.stopAnimate=function(t){var n=this;void 0===t&&(t=!0);var i=this.get("animations");(0,S.S6)(i,function(l){t&&n.attr(l.onFrame?l.onFrame(1):l.toAttrs),l.callback&&l.callback()}),this.set("animating",!1),this.set("animations",[])},r.prototype.pauseAnimate=function(){var t=this.get("timeline"),n=this.get("animations"),i=t.getTime();return(0,S.S6)(n,function(l){l._paused=!0,l._pauseTime=i,l.pauseCallback&&l.pauseCallback()}),this.set("_pause",{isPaused:!0,pauseTime:i}),this},r.prototype.resumeAnimate=function(){var n=this.get("timeline").getTime(),i=this.get("animations"),l=this.get("_pause").pauseTime;return(0,S.S6)(i,function(c){c.startTime=c.startTime+(n-l),c._paused=!1,c._pauseTime=null,c.resumeCallback&&c.resumeCallback()}),this.set("_pause",{isPaused:!1}),this.set("animations",i),this},r.prototype.emitDelegation=function(t,n){var f,i=this,l=n.propagationPath;this.getEvents(),"mouseenter"===t?f=n.fromShape:"mouseleave"===t&&(f=n.toShape);for(var d=function(_){var T=l[_],b=T.get("name");if(b){if((T.isGroup()||T.isCanvas&&T.isCanvas())&&f&&oy(T,f))return"break";(0,S.kJ)(b)?(0,S.S6)(b,function(I){i.emitDelegateEvent(T,I,n)}):p.emitDelegateEvent(T,b,n)}},p=this,m=0;m0)});return c.length>0?(0,S.S6)(c,function(d){var p=d.getBBox(),m=p.minX,x=p.maxX,_=p.minY,T=p.maxY;mn&&(n=x),_l&&(l=T)}):(t=0,n=0,i=0,l=0),{x:t,y:i,minX:t,minY:i,maxX:n,maxY:l,width:n-t,height:l-i}},r.prototype.getCanvasBBox=function(){var t=1/0,n=-1/0,i=1/0,l=-1/0,c=this.getChildren().filter(function(d){return d.get("visible")&&(!d.isGroup()||d.isGroup()&&d.getChildren().length>0)});return c.length>0?(0,S.S6)(c,function(d){var p=d.getCanvasBBox(),m=p.minX,x=p.maxX,_=p.minY,T=p.maxY;mn&&(n=x),_l&&(l=T)}):(t=0,n=0,i=0,l=0),{x:t,y:i,minX:t,minY:i,maxX:n,maxY:l,width:n-t,height:l-i}},r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return t.children=[],t},r.prototype.onAttrChange=function(t,n,i){if(e.prototype.onAttrChange.call(this,t,n,i),"matrix"===t){var l=this.getTotalMatrix();this._applyChildrenMarix(l)}},r.prototype.applyMatrix=function(t){var n=this.getTotalMatrix();e.prototype.applyMatrix.call(this,t);var i=this.getTotalMatrix();i!==n&&this._applyChildrenMarix(i)},r.prototype._applyChildrenMarix=function(t){var n=this.getChildren();(0,S.S6)(n,function(i){i.applyMatrix(t)})},r.prototype.addShape=function(){for(var t=[],n=0;n=0;f--){var d=t[f];if(vs(d)&&(d.isGroup()?c=d.getShape(n,i,l):d.isHit(n,i)&&(c=d)),c)break}return c},r.prototype.add=function(t){var n=this.getCanvas(),i=this.getChildren(),l=this.get("timeline"),c=t.getParent();c&&function hy(e,r,t){void 0===t&&(t=!0),t?r.destroy():(r.set("parent",null),r.set("canvas",null)),iw(e.getChildren(),r)}(c,t,!1),t.set("parent",this),n&&hw(t,n),l&&cy(t,l),i.push(t),t.onCanvasChange("add"),this._applyElementMatrix(t)},r.prototype._applyElementMatrix=function(t){var n=this.getTotalMatrix();n&&t.applyMatrix(n)},r.prototype.getChildren=function(){return this.get("children")},r.prototype.sort=function(){var t=this.getChildren();(0,S.S6)(t,function(n,i){return n[uy]=i,n}),t.sort(function fy(e){return function(r,t){var n=e(r,t);return 0===n?r[uy]-t[uy]:n}}(function(n,i){return n.get("zIndex")-i.get("zIndex")})),this.onCanvasChange("sort")},r.prototype.clear=function(){if(this.set("clearing",!0),!this.destroyed){for(var t=this.getChildren(),n=t.length-1;n>=0;n--)t[n].destroy();this.set("children",[]),this.onCanvasChange("clear"),this.set("clearing",!1)}},r.prototype.destroy=function(){this.get("destroyed")||(this.clear(),e.prototype.destroy.call(this))},r.prototype.getFirst=function(){return this.getChildByIndex(0)},r.prototype.getLast=function(){var t=this.getChildren();return this.getChildByIndex(t.length-1)},r.prototype.getChildByIndex=function(t){return this.getChildren()[t]},r.prototype.getCount=function(){return this.getChildren().length},r.prototype.contain=function(t){return this.getChildren().indexOf(t)>-1},r.prototype.removeChild=function(t,n){void 0===n&&(n=!0),this.contain(t)&&t.remove(n)},r.prototype.findAll=function(t){var n=[],i=this.getChildren();return(0,S.S6)(i,function(l){t(l)&&n.push(l),l.isGroup()&&(n=n.concat(l.findAll(t)))}),n},r.prototype.find=function(t){var n=null,i=this.getChildren();return(0,S.S6)(i,function(l){if(t(l)?n=l:l.isGroup()&&(n=l.find(t)),n)return!1}),n},r.prototype.findById=function(t){return this.find(function(n){return n.get("id")===t})},r.prototype.findByClassName=function(t){return this.find(function(n){return n.get("className")===t})},r.prototype.findAllByName=function(t){return this.findAll(function(n){return n.get("name")===t})},r}(ly);const dy=vy;function py(e,r,t,n,i){var l=e*e,c=l*e;return((1-3*e+3*l-c)*r+(4-6*l+3*c)*t+(1+3*e+3*l-3*c)*n+c*i)/6}const Rd=e=>()=>e;function dc(e,r){var t=r-e;return t?function ko(e,r){return function(t){return e+t*r}}(e,t):Rd(isNaN(e)?r:e)}const oo=function e(r){var t=function _6(e){return 1==(e=+e)?dc:function(r,t){return t-r?function ao(e,r,t){return e=Math.pow(e,t),r=Math.pow(r,t)-e,t=1/t,function(n){return Math.pow(e+n*r,t)}}(r,t,e):Rd(isNaN(r)?t:r)}}(r);function n(i,l){var c=t((i=(0,eo.B8)(i)).r,(l=(0,eo.B8)(l)).r),f=t(i.g,l.g),d=t(i.b,l.b),p=dc(i.opacity,l.opacity);return function(m){return i.r=c(m),i.g=f(m),i.b=d(m),i.opacity=p(m),i+""}}return n.gamma=e,n}(1);function gy(e){return function(r){var c,f,t=r.length,n=new Array(t),i=new Array(t),l=new Array(t);for(c=0;c=1?(t=1,r-1):Math.floor(t*r),i=e[n],l=e[n+1];return py((t-n/r)*r,n>0?e[n-1]:2*i-l,i,l,nt&&(l=r.slice(t,l),f[c]?f[c]+=l:f[++c]=l),(n=n[0])===(i=i[0])?f[c]?f[c]+=i:f[++c]=i:(f[++c]=null,d.push({i:c,x:yy(n,i)})),t=my.lastIndex;return tp.length?(d=Bo(l[f]),p=Bo(i[f]),p=rw(p,d),p=nw(p,d),r.fromAttrs.path=p,r.toAttrs.path=d):r.pathFormatted||(d=Bo(l[f]),p=Bo(i[f]),p=nw(p,d),r.fromAttrs.path=p,r.toAttrs.path=d,r.pathFormatted=!0),n[f]=[];for(var m=0;m0){for(var f=r.animators.length-1;f>=0;f--)if((n=r.animators[f]).destroyed)r.removeAnimator(f);else{if(!n.isAnimatePaused())for(var d=(i=n.get("animations")).length-1;d>=0;d--)T6(n,l=i[d],c)&&(i.splice(d,1),l.callback&&l.callback());0===i.length&&r.removeAnimator(f)}r.canvas.get("autoDraw")||r.canvas.draw()}})},e.prototype.addAnimator=function(r){this.animators.push(r)},e.prototype.removeAnimator=function(r){this.animators.splice(r,1)},e.prototype.isAnimating=function(){return!!this.animators.length},e.prototype.stop=function(){this.timer&&this.timer.stop()},e.prototype.stopAllAnimations=function(r){void 0===r&&(r=!0),this.animators.forEach(function(t){t.stopAnimate(r)}),this.animators=[],this.canvas.draw()},e.prototype.getTime=function(){return this.current},e}();const Ks=b6;var _w=["mousedown","mouseup","dblclick","mouseout","mouseover","mousemove","mouseleave","mouseenter","touchstart","touchmove","touchend","dragenter","dragover","dragleave","drop","contextmenu","mousewheel"];function Sw(e,r,t){t.name=r,t.target=e,t.currentTarget=e,t.delegateTarget=e,e.emit(r,t)}function L6(e,r,t){if(t.bubbles){var n=void 0,i=!1;if("mouseenter"===r?(n=t.fromShape,i=!0):"mouseleave"===r&&(i=!0,n=t.toShape),e.isCanvas()&&i)return;if(n&&oy(e,n))return void(t.bubbles=!1);t.name=r,t.currentTarget=e,t.delegateTarget=e,e.emit(r,t)}}var I6=function(){function e(r){var t=this;this.draggingShape=null,this.dragging=!1,this.currentShape=null,this.mousedownShape=null,this.mousedownPoint=null,this._eventCallback=function(n){t._triggerEvent(n.type,n)},this._onDocumentMove=function(n){if(t.canvas.get("el")!==n.target&&(t.dragging||t.currentShape)){var c=t._getPointInfo(n);t.dragging&&t._emitEvent("drag",n,c,t.draggingShape)}},this._onDocumentMouseUp=function(n){if(t.canvas.get("el")!==n.target&&t.dragging){var c=t._getPointInfo(n);t.draggingShape&&t._emitEvent("drop",n,c,null),t._emitEvent("dragend",n,c,t.draggingShape),t._afterDrag(t.draggingShape,c,n)}},this.canvas=r.canvas}return e.prototype.init=function(){this._bindEvents()},e.prototype._bindEvents=function(){var r=this,t=this.canvas.get("el");(0,S.S6)(_w,function(n){t.addEventListener(n,r._eventCallback)}),document&&(document.addEventListener("mousemove",this._onDocumentMove),document.addEventListener("mouseup",this._onDocumentMouseUp))},e.prototype._clearEvents=function(){var r=this,t=this.canvas.get("el");(0,S.S6)(_w,function(n){t.removeEventListener(n,r._eventCallback)}),document&&(document.removeEventListener("mousemove",this._onDocumentMove),document.removeEventListener("mouseup",this._onDocumentMouseUp))},e.prototype._getEventObj=function(r,t,n,i,l,c){var f=new Po(r,t);return f.fromShape=l,f.toShape=c,f.x=n.x,f.y=n.y,f.clientX=n.clientX,f.clientY=n.clientY,f.propagationPath.push(i),f},e.prototype._getShape=function(r,t){return this.canvas.getShape(r.x,r.y,t)},e.prototype._getPointInfo=function(r){var t=this.canvas,n=t.getClientByEvent(r),i=t.getPointByEvent(r);return{x:i.x,y:i.y,clientX:n.x,clientY:n.y}},e.prototype._triggerEvent=function(r,t){var n=this._getPointInfo(t),i=this._getShape(n,t),l=this["_on"+r],c=!1;if(l)l.call(this,n,i,t);else{var f=this.currentShape;"mouseenter"===r||"dragenter"===r||"mouseover"===r?(this._emitEvent(r,t,n,null,null,i),i&&this._emitEvent(r,t,n,i,null,i),"mouseenter"===r&&this.draggingShape&&this._emitEvent("dragenter",t,n,null)):"mouseleave"===r||"dragleave"===r||"mouseout"===r?(c=!0,f&&this._emitEvent(r,t,n,f,f,null),this._emitEvent(r,t,n,null,f,null),"mouseleave"===r&&this.draggingShape&&this._emitEvent("dragleave",t,n,null)):this._emitEvent(r,t,n,i,null,null)}if(c||(this.currentShape=i),i&&!i.get("destroyed")){var d=this.canvas;d.get("el").style.cursor=i.attr("cursor")||d.get("cursor")}},e.prototype._onmousedown=function(r,t,n){0===n.button&&(this.mousedownShape=t,this.mousedownPoint=r,this.mousedownTimeStamp=n.timeStamp),this._emitEvent("mousedown",n,r,t,null,null)},e.prototype._emitMouseoverEvents=function(r,t,n,i){var l=this.canvas.get("el");n!==i&&(n&&(this._emitEvent("mouseout",r,t,n,n,i),this._emitEvent("mouseleave",r,t,n,n,i),(!i||i.get("destroyed"))&&(l.style.cursor=this.canvas.get("cursor"))),i&&(this._emitEvent("mouseover",r,t,i,n,i),this._emitEvent("mouseenter",r,t,i,n,i)))},e.prototype._emitDragoverEvents=function(r,t,n,i,l){i?(i!==n&&(n&&this._emitEvent("dragleave",r,t,n,n,i),this._emitEvent("dragenter",r,t,i,n,i)),l||this._emitEvent("dragover",r,t,i)):n&&this._emitEvent("dragleave",r,t,n,n,i),l&&this._emitEvent("dragover",r,t,i)},e.prototype._afterDrag=function(r,t,n){r&&(r.set("capture",!0),this.draggingShape=null),this.dragging=!1;var i=this._getShape(t,n);i!==r&&this._emitMouseoverEvents(n,t,r,i),this.currentShape=i},e.prototype._onmouseup=function(r,t,n){if(0===n.button){var i=this.draggingShape;this.dragging?(i&&this._emitEvent("drop",n,r,t),this._emitEvent("dragend",n,r,i),this._afterDrag(i,r,n)):(this._emitEvent("mouseup",n,r,t),t===this.mousedownShape&&this._emitEvent("click",n,r,t),this.mousedownShape=null,this.mousedownPoint=null)}},e.prototype._ondragover=function(r,t,n){n.preventDefault(),this._emitDragoverEvents(n,r,this.currentShape,t,!0)},e.prototype._onmousemove=function(r,t,n){var i=this.canvas,l=this.currentShape,c=this.draggingShape;if(this.dragging)c&&this._emitDragoverEvents(n,r,l,t,!1),this._emitEvent("drag",n,r,c);else{var f=this.mousedownPoint;if(f){var d=this.mousedownShape,x=f.clientX-r.clientX,_=f.clientY-r.clientY;n.timeStamp-this.mousedownTimeStamp>120||x*x+_*_>40?d&&d.get("draggable")?((c=this.mousedownShape).set("capture",!1),this.draggingShape=c,this.dragging=!0,this._emitEvent("dragstart",n,r,c),this.mousedownShape=null,this.mousedownPoint=null):!d&&i.get("draggable")?(this.dragging=!0,this._emitEvent("dragstart",n,r,null),this.mousedownShape=null,this.mousedownPoint=null):(this._emitMouseoverEvents(n,r,l,t),this._emitEvent("mousemove",n,r,t)):(this._emitMouseoverEvents(n,r,l,t),this._emitEvent("mousemove",n,r,t))}else this._emitMouseoverEvents(n,r,l,t),this._emitEvent("mousemove",n,r,t)}},e.prototype._emitEvent=function(r,t,n,i,l,c){var f=this._getEventObj(r,t,n,i,l,c);if(i){f.shape=i,Sw(i,r,f);for(var d=i.getParent();d;)d.emitDelegation(r,f),f.propagationStopped||L6(d,r,f),f.propagationPath.push(d),d=d.getParent()}else Sw(this.canvas,r,f)},e.prototype.destroy=function(){this._clearEvents(),this.canvas=null,this.currentShape=null,this.draggingShape=null,this.mousedownPoint=null,this.mousedownShape=null,this.mousedownTimeStamp=null},e}();const O6=I6;var Tw=(0,Jv.qY)(),R6=Tw&&"firefox"===Tw.name;!function(e){function r(t){var n=e.call(this,t)||this;return n.initContainer(),n.initDom(),n.initEvents(),n.initTimeline(),n}(0,E.ZT)(r,e),r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return t.cursor="default",t.supportCSSTransform=!1,t},r.prototype.initContainer=function(){var t=this.get("container");(0,S.HD)(t)&&(t=document.getElementById(t),this.set("container",t))},r.prototype.initDom=function(){var t=this.createDom();this.set("el",t),this.get("container").appendChild(t),this.setDOMSize(this.get("width"),this.get("height"))},r.prototype.initEvents=function(){var t=new O6({canvas:this});t.init(),this.set("eventController",t)},r.prototype.initTimeline=function(){var t=new Ks(this);this.set("timeline",t)},r.prototype.setDOMSize=function(t,n){var i=this.get("el");aw&&(i.style.width=t+"px",i.style.height=n+"px")},r.prototype.changeSize=function(t,n){this.setDOMSize(t,n),this.set("width",t),this.set("height",n),this.onCanvasChange("changeSize")},r.prototype.getRenderer=function(){return this.get("renderer")},r.prototype.getCursor=function(){return this.get("cursor")},r.prototype.setCursor=function(t){this.set("cursor",t);var n=this.get("el");aw&&n&&(n.style.cursor=t)},r.prototype.getPointByEvent=function(t){if(this.get("supportCSSTransform")){if(R6&&!(0,S.UM)(t.layerX)&&t.layerX!==t.offsetX)return{x:t.layerX,y:t.layerY};if(!(0,S.UM)(t.offsetX))return{x:t.offsetX,y:t.offsetY}}var i=this.getClientByEvent(t);return this.getPointByClient(i.x,i.y)},r.prototype.getClientByEvent=function(t){var n=t;return t.touches&&(n="touchend"===t.type?t.changedTouches[0]:t.touches[0]),{x:n.clientX,y:n.clientY}},r.prototype.getPointByClient=function(t,n){var l=this.get("el").getBoundingClientRect();return{x:t-l.left,y:n-l.top}},r.prototype.getClientByPoint=function(t,n){var l=this.get("el").getBoundingClientRect();return{x:t+l.left,y:n+l.top}},r.prototype.draw=function(){},r.prototype.removeDom=function(){var t=this.get("el");t.parentNode.removeChild(t)},r.prototype.clearEvents=function(){this.get("eventController").destroy()},r.prototype.isCanvas=function(){return!0},r.prototype.getParent=function(){return null},r.prototype.destroy=function(){var t=this.get("timeline");this.get("destroyed")||(this.clear(),t&&t.stop(),this.clearEvents(),this.removeDom(),e.prototype.destroy.call(this))}}(dy),function(e){function r(){return null!==e&&e.apply(this,arguments)||this}(0,E.ZT)(r,e),r.prototype.isGroup=function(){return!0},r.prototype.isEntityGroup=function(){return!1},r.prototype.clone=function(){for(var t=e.prototype.clone.call(this),n=this.getChildren(),i=0;i=t&&i.minY<=n&&i.maxY>=n},r.prototype.afterAttrsChange=function(t){e.prototype.afterAttrsChange.call(this,t),this.clearCacheBBox()},r.prototype.getBBox=function(){var t=this.cfg.bbox;return t||(t=this.calculateBBox(),this.set("bbox",t)),t},r.prototype.getCanvasBBox=function(){var t=this.cfg.canvasBBox;return t||(t=this.calculateCanvasBBox(),this.set("canvasBBox",t)),t},r.prototype.applyMatrix=function(t){e.prototype.applyMatrix.call(this,t),this.set("canvasBBox",null)},r.prototype.calculateCanvasBBox=function(){var t=this.getBBox(),n=this.getTotalMatrix(),i=t.minX,l=t.minY,c=t.maxX,f=t.maxY;if(n){var d=fc(n,[t.minX,t.minY]),p=fc(n,[t.maxX,t.minY]),m=fc(n,[t.minX,t.maxY]),x=fc(n,[t.maxX,t.maxY]);i=Math.min(d[0],p[0],m[0],x[0]),c=Math.max(d[0],p[0],m[0],x[0]),l=Math.min(d[1],p[1],m[1],x[1]),f=Math.max(d[1],p[1],m[1],x[1])}var _=this.attrs;if(_.shadowColor){var T=_.shadowBlur,b=void 0===T?0:T,I=_.shadowOffsetX,F=void 0===I?0:I,B=_.shadowOffsetY,Y=void 0===B?0:B,H=c+b+F,et=l-b+Y,wt=f+b+Y;i=Math.min(i,i-b+F),c=Math.max(c,H),l=Math.min(l,et),f=Math.max(f,wt)}return{x:i,y:l,minX:i,minY:l,maxX:c,maxY:f,width:c-i,height:f-l}},r.prototype.clearCacheBBox=function(){this.set("bbox",null),this.set("canvasBBox",null)},r.prototype.isClipShape=function(){return this.get("isClipShape")},r.prototype.isInShape=function(t,n){return!1},r.prototype.isOnlyHitBox=function(){return!1},r.prototype.isHit=function(t,n){var i=this.get("startArrowShape"),l=this.get("endArrowShape"),c=[t,n,1],f=(c=this.invertFromMatrix(c))[0],d=c[1],p=this._isInBBox(f,d);return this.isOnlyHitBox()?p:!(!p||this.isClipped(f,d)||!(this.isInShape(f,d)||i&&i.isHit(f,d)||l&&l.isHit(f,d)))}}(ly);var bw=new Map;function zo(e,r){bw.set(e,r)}function Aw(e){var r=e.attr();return{x:r.x,y:r.y,width:r.width,height:r.height}}function Ew(e){var r=e.attr(),i=r.r;return{x:r.x-i,y:r.y-i,width:2*i,height:2*i}}function Lw(e,r){return e&&r?{minX:Math.min(e.minX,r.minX),minY:Math.min(e.minY,r.minY),maxX:Math.max(e.maxX,r.maxX),maxY:Math.max(e.maxY,r.maxY)}:e||r}function On(e,r){var t=e.get("startArrowShape"),n=e.get("endArrowShape");return t&&(r=Lw(r,t.getCanvasBBox())),n&&(r=Lw(r,n.getCanvasBBox())),r}var Dd=null;function ps(e,r){var t=e.prePoint,n=e.currentPoint,i=e.nextPoint,l=Math.pow(n[0]-t[0],2)+Math.pow(n[1]-t[1],2),c=Math.pow(n[0]-i[0],2)+Math.pow(n[1]-i[1],2),f=Math.pow(t[0]-i[0],2)+Math.pow(t[1]-i[1],2),d=Math.acos((l+c-f)/(2*Math.sqrt(l)*Math.sqrt(c)));if(!d||0===Math.sin(d)||(0,S.vQ)(d,0))return{xExtra:0,yExtra:0};var p=Math.abs(Math.atan2(i[1]-n[1],i[0]-n[0])),m=Math.abs(Math.atan2(i[0]-n[0],i[1]-n[1]));return p=p>Math.PI/2?Math.PI-p:p,m=m>Math.PI/2?Math.PI-m:m,{xExtra:Math.cos(d/2-p)*(r/2*(1/Math.sin(d/2)))-r/2||0,yExtra:Math.cos(m-d/2)*(r/2*(1/Math.sin(d/2)))-r/2||0}}function Rw(e,r,t){var n=new Po(r,t);n.target=e,n.propagationPath.push(e),e.emitDelegation(r,n);for(var i=e.getParent();i;)i.emitDelegation(r,n),n.propagationPath.push(i),i=i.getParent()}zo("rect",Aw),zo("image",Aw),zo("circle",Ew),zo("marker",Ew),zo("polyline",function F6(e){for(var t=e.attr().points,n=[],i=[],l=0;l1){var i=function xy(e,r){return r?r-e:.14*e}(r,t);return r*n+i*(n-1)}return r}(i,l,c),T={x:t,y:n-_};m&&("end"===m||"right"===m?T.x-=d:"center"===m&&(T.x-=d/2)),x&&("top"===x?T.y+=_:"middle"===x&&(T.y+=_/2)),p={x:T.x,y:T.y,width:d,height:_}}else p={x:t,y:n,width:0,height:0};return p}),zo("path",function k6(e){var r=e.attr(),t=r.path,i=r.stroke?r.lineWidth:0,c=function P6(e,r){for(var t=[],n=[],i=[],l=0;l=0;n--)e.removeChild(r[n])}function Sy(e,r){return!!e.className.match(new RegExp("(\\s|^)"+r+"(\\s|$)"))}function of(e){var r=e.start,t=e.end,n=Math.min(r.x,t.x),i=Math.min(r.y,t.y),l=Math.max(r.x,t.x),c=Math.max(r.y,t.y);return{x:n,y:i,minX:n,minY:i,maxX:l,maxY:c,width:l-n,height:c-i}}function Mi(e,r,t,n){var i=e+t,l=r+n;return{x:e,y:r,width:t,height:n,minX:e,minY:r,maxX:isNaN(i)?0:i,maxY:isNaN(l)?0:l}}function eu(e,r,t){return(1-t)*e+r*t}function ru(e,r,t){return{x:e.x+Math.cos(t)*r,y:e.y+Math.sin(t)*r}}var Bd=function(e,r,t){return void 0===t&&(t=Math.pow(Number.EPSILON,.5)),[e,r].includes(1/0)?Math.abs(e)===Math.abs(r):Math.abs(e-r)0?(0,S.S6)(d,function(p){if(p.get("visible")){if(p.isGroup()&&0===p.get("children").length)return!0;var m=Bw(p),x=p.applyToMatrix([m.minX,m.minY,1]),_=p.applyToMatrix([m.minX,m.maxY,1]),T=p.applyToMatrix([m.maxX,m.minY,1]),b=p.applyToMatrix([m.maxX,m.maxY,1]),I=Math.min(x[0],_[0],T[0],b[0]),F=Math.max(x[0],_[0],T[0],b[0]),B=Math.min(x[1],_[1],T[1],b[1]),Y=Math.max(x[1],_[1],T[1],b[1]);Il&&(l=F),Bf&&(f=Y)}}):(i=0,l=0,c=0,f=0),n=Mi(i,c,l-i,f-c)}else n=e.getBBox();return t?function W6(e,r){var t=Math.max(e.minX,r.minX),n=Math.max(e.minY,r.minY);return Mi(t,n,Math.min(e.maxX,r.maxX)-t,Math.min(e.maxY,r.maxY)-n)}(n,t):n}function la(e){return e+"px"}function gc(e,r,t,n){var i=function Y6(e,r){var t=r.x-e.x,n=r.y-e.y;return Math.sqrt(t*t+n*n)}(e,r),l=n/i,c=0;return"start"===t?c=0-l:"end"===t&&(c=1+l),{x:eu(e.x,r.x,c),y:eu(e.y,r.y,c)}}var U6={none:[],point:["x","y"],region:["start","end"],points:["points"],circle:["center","radius","startAngle","endAngle"]},X6=function(e){function r(t){var n=e.call(this,t)||this;return n.initCfg(),n}return(0,E.ZT)(r,e),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 n=this,i=this.get("defaultCfg")||{};(0,S.S6)(t,function(l,c){var d=l;n.get(c)!==l&&((0,S.Kn)(l)&&i[c]&&(d=(0,S.b$)({},i[c],l)),n.set(c,d))}),this.updateInner(t),this.afterUpdate(t)},r.prototype.updateInner=function(t){},r.prototype.afterUpdate=function(t){(0,S.wH)(t,"visible")&&(t.visible?this.show():this.hide()),(0,S.wH)(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,n){this.update({offsetX:t,offsetY:n})},r.prototype.setLocation=function(t){var n=(0,E.pi)({},t);this.update(n)},r.prototype.getLocation=function(){var t=this,n={},i=this.get("locationType");return(0,S.S6)(U6[i],function(c){n[c]=t.get(c)}),n},r.prototype.isList=function(){return!1},r.prototype.isSlider=function(){return!1},r.prototype.init=function(){},r.prototype.initCfg=function(){var t=this,n=this.get("defaultCfg");(0,S.S6)(n,function(i,l){var c=t.get(l);if((0,S.Kn)(c)){var f=(0,S.b$)({},i,c);t.set(l,f)}})},r}(ow);const Pw=X6;var nu="update_status",V6=["visible","tip","delegateObject"],$6=["container","group","shapesMap","isRegister","isUpdating","destroyed"],Z6=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,E.pi)((0,E.pi)({},t),{container:null,shapesMap:{},group:null,capture:!0,isRegister:!1,isUpdating:!1,isInit:!0})},r.prototype.remove=function(){this.clear(),this.get("group").remove()},r.prototype.clear=function(){this.get("group").clear(),this.set("shapesMap",{}),this.clearOffScreenCache(),this.set("isInit",!0)},r.prototype.getChildComponentById=function(t){var n=this.getElementById(t);return n&&n.get("component")},r.prototype.getElementById=function(t){return this.get("shapesMap")[t]},r.prototype.getElementByLocalId=function(t){var n=this.getElementId(t);return this.getElementById(n)},r.prototype.getElementsByName=function(t){var n=[];return(0,S.S6)(this.get("shapesMap"),function(i){i.get("name")===t&&n.push(i)}),n},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 n=this.get("group");this.updateElements(t,n),this.deleteElements(),this.applyOffset(),this.get("eventInitted")||(this.initEvent(),this.set("eventInitted",!0)),this.set("isInit",!1)},r.prototype.show=function(){this.get("group").show(),this.set("visible",!0)},r.prototype.hide=function(){this.get("group").hide(),this.set("visible",!1)},r.prototype.setCapture=function(t){this.get("group").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"),n=this.getInnerLayoutBBox(),i=t.getTotalMatrix();return i&&(n=function H6(e,r){var t=vn(e,[r.minX,r.minY]),n=vn(e,[r.maxX,r.minY]),i=vn(e,[r.minX,r.maxY]),l=vn(e,[r.maxX,r.maxY]),c=Math.min(t[0],n[0],i[0],l[0]),f=Math.max(t[0],n[0],i[0],l[0]),d=Math.min(t[1],n[1],i[1],l[1]),p=Math.max(t[1],n[1],i[1],l[1]);return{x:c,y:d,minX:c,minY:d,maxX:f,maxY:p,width:f-c,height:p-d}}(i,n)),n},r.prototype.on=function(t,n,i){return this.get("group").on(t,n,i),this},r.prototype.off=function(t,n){var i=this.get("group");return i&&i.off(t,n),this},r.prototype.emit=function(t,n){this.get("group").emit(t,n)},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,n){var i=this.get("group");n.target=i,i.emit(t,n),Rw(i,t,n)},r.prototype.createOffScreenGroup=function(){return new(this.get("group").getGroupBase())({delegateObject:this.getDelegateObject()})},r.prototype.applyOffset=function(){var t=this.get("offsetX"),n=this.get("offsetY");this.moveElementTo(this.get("group"),{x:t,y:n})},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",Bw(t)),t},r.prototype.addGroup=function(t,n){this.appendDelegateObject(t,n);var i=t.addGroup(n);return this.get("isRegister")&&this.registerElement(i),i},r.prototype.addShape=function(t,n){this.appendDelegateObject(t,n);var i=t.addShape(n);return this.get("isRegister")&&this.registerElement(i),i},r.prototype.addComponent=function(t,n){var i=n.id,l=n.component,c=(0,E._T)(n,["id","component"]),f=new l((0,E.pi)((0,E.pi)({},c),{id:i,container:t,updateAutoRender:this.get("updateAutoRender")}));return f.init(),f.render(),this.get("isRegister")&&this.registerElement(f.get("group")),f},r.prototype.initEvent=function(){},r.prototype.removeEvent=function(){this.get("group").off()},r.prototype.getElementId=function(t){return this.get("id")+"-"+this.get("name")+"-"+t},r.prototype.registerElement=function(t){var n=t.get("id");this.get("shapesMap")[n]=t},r.prototype.unregisterElement=function(t){var n=t.get("id");delete this.get("shapesMap")[n]},r.prototype.moveElementTo=function(t,n){var i=Cy(n);t.attr("matrix",i)},r.prototype.addAnimation=function(t,n,i){var l=n.attr("opacity");(0,S.UM)(l)&&(l=1),n.attr("opacity",0),n.animate({opacity:l},i)},r.prototype.removeAnimation=function(t,n,i){n.animate({opacity:0},i)},r.prototype.updateAnimation=function(t,n,i,l){n.animate(i,l)},r.prototype.updateElements=function(t,n){var d,i=this,l=this.get("animate"),c=this.get("animateOption"),f=t.getChildren().slice(0);(0,S.S6)(f,function(p){var m=p.get("id"),x=i.getElementById(m),_=p.get("name");if(x)if(p.get("isComponent")){var T=p.get("component"),b=x.get("component"),I=(0,S.ei)(T.cfg,(0,S.e5)((0,S.XP)(T.cfg),$6));b.update(I),x.set(nu,"update")}else{var F=i.getReplaceAttrs(x,p);l&&c.update?i.updateAnimation(_,x,F,c.update):x.attr(F),p.isGroup()&&i.updateElements(p,x),(0,S.S6)(V6,function(H){x.set(H,p.get(H))}),function Ty(e,r){if(e.getClip()||r.getClip()){var t=r.getClip();if(!t)return void e.setClip(null);var n={type:t.get("type"),attrs:t.attr()};e.setClip(n)}}(x,p),d=x,x.set(nu,"update")}else{n.add(p);var B=n.getChildren();if(B.splice(B.length-1,1),d){var Y=B.indexOf(d);B.splice(Y+1,0,p)}else B.unshift(p);if(i.registerElement(p),p.set(nu,"add"),p.get("isComponent")?(T=p.get("component")).set("container",n):p.isGroup()&&i.registerNewGroup(p),d=p,l){var G=i.get("isInit")?c.appear:c.enter;G&&i.addAnimation(_,p,G)}}})},r.prototype.clearUpdateStatus=function(t){var n=t.getChildren();(0,S.S6)(n,function(i){i.set(nu,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;return(t={})[this.get("name")]=this,t.component=this,t},r.prototype.appendDelegateObject=function(t,n){var i=t.get("delegateObject");n.delegateObject||(n.delegateObject={}),(0,S.CD)(n.delegateObject,i)},r.prototype.getReplaceAttrs=function(t,n){var i=t.attr(),l=n.attr();return(0,S.S6)(i,function(c,f){void 0===l[f]&&(l[f]=void 0)}),l},r.prototype.registerNewGroup=function(t){var n=this,i=t.getChildren();(0,S.S6)(i,function(l){n.registerElement(l),l.set(nu,"add"),l.isGroup()&&n.registerNewGroup(l)})},r.prototype.deleteElements=function(){var t=this,n=this.get("shapesMap"),i=[];(0,S.S6)(n,function(f,d){!f.get(nu)||f.destroyed?i.push([d,f]):f.set(nu,null)});var l=this.get("animate"),c=this.get("animateOption");(0,S.S6)(i,function(f){var d=f[0],p=f[1];if(!p.destroyed){var m=p.get("name");if(l&&c.leave){var x=(0,S.CD)({callback:function(){t.removeElement(p)}},c.leave);t.removeAnimation(m,p,x)}else t.removeElement(p)}delete n[d]})},r.prototype.removeElement=function(t){if(t.get("isGroup")){var n=t.get("component");n&&n.destroy()}t.remove()},r}(Pw);const Di=Z6;var by="\u2026";function iu(e,r){return e.charCodeAt(r)>0&&e.charCodeAt(r)<128?1:2}var K6="\u2026",Pd=2,Q6=400;function Ay(e){if(e.length>Q6)return function J6(e){for(var r=e.map(function(d){var p=d.attr("text");return(0,S.UM)(p)?"":""+p}),t=0,n=0,i=0;i=19968&&f<=40869?2:1}l>t&&(t=l,n=i)}return e[n].getBBox().width}(e);var r=0;return(0,S.S6)(e,function(t){var i=t.getBBox().width;r=0?function au(e,r,t){void 0===t&&(t="tail");var n=e.length,i="";if("tail"===t){for(var l=0,c=0;l1||l<0)&&(l=1),{x:eu(t.x,n.x,l),y:eu(t.y,n.y,l)}},r.prototype.renderLabel=function(t){var n=this.get("text"),i=this.get("start"),l=this.get("end"),f=n.content,d=n.style,p=n.offsetX,m=n.offsetY,x=n.autoRotate,_=n.maxLength,T=n.autoEllipsis,b=n.ellipsisPosition,I=n.background,F=n.isVertical,B=void 0!==F&&F,Y=this.getLabelPoint(i,l,n.position),G=Y.x+p,H=Y.y+m,et={id:this.getElementId("line-text"),name:"annotation-line-text",x:G,y:H,content:f,style:d,maxLength:_,autoEllipsis:T,ellipsisPosition:b,background:I,isVertical:B};if(x){var wt=[l.x-i.x,l.y-i.y];et.rotate=Math.atan2(wt[1],wt[0])}Ya(t,et)},r}(Di);const t4=lf;var e4=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,E.pi)((0,E.pi)({},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:Vr.textColor,fontSize:12,textAlign:"center",textBaseline:"middle",fontFamily:Vr.fontFamily}}})},r.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetLocation()},r.prototype.renderInner=function(t){var n=this.getLocation(),i=n.x,l=n.y,c=this.get("content"),f=this.get("style");Ya(t,{id:this.getElementId("text"),name:this.get("name")+"-text",x:i,y:l,content:c,style:f,maxLength:this.get("maxLength"),autoEllipsis:this.get("autoEllipsis"),isVertical:this.get("isVertical"),ellipsisPosition:this.get("ellipsisPosition"),background:this.get("background"),rotate:this.get("rotate")})},r.prototype.resetLocation=function(){var t=this.getElementByLocalId("text-group");if(t){var n=this.getLocation(),i=n.x,l=n.y,c=this.get("rotate");nf(t,i,l),Dw(t,c,i,l)}},r}(Di);const kd=e4;var r4=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,E.pi)((0,E.pi)({},t),{name:"annotation",type:"arc",locationType:"circle",center:null,radius:100,startAngle:-Math.PI/2,endAngle:3*Math.PI/2,style:{stroke:"#999",lineWidth:1}})},r.prototype.renderInner=function(t){this.renderArc(t)},r.prototype.getArcPath=function(){var t=this.getLocation(),n=t.center,i=t.radius,l=t.startAngle,c=t.endAngle,f=ru(n,i,l),d=ru(n,i,c),p=c-l>Math.PI?1:0,m=[["M",f.x,f.y]];if(c-l==2*Math.PI){var x=ru(n,i,l+Math.PI);m.push(["A",i,i,0,p,1,x.x,x.y]),m.push(["A",i,i,0,p,1,d.x,d.y])}else m.push(["A",i,i,0,p,1,d.x,d.y]);return m},r.prototype.renderArc=function(t){var n=this.getArcPath(),i=this.get("style");this.addShape(t,{type:"path",id:this.getElementId("arc"),name:"annotation-arc",attrs:(0,E.pi)({path:n},i)})},r}(Di);const n4=r4;var a4=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,E.pi)((0,E.pi)({},t),{name:"annotation",type:"region",locationType:"region",start:null,end:null,style:{},defaultCfg:{style:{lineWidth:0,fill:Vr.regionColor,opacity:.4}}})},r.prototype.renderInner=function(t){this.renderRegion(t)},r.prototype.renderRegion=function(t){var n=this.get("start"),i=this.get("end"),l=this.get("style"),c=of({start:n,end:i});this.addShape(t,{type:"rect",id:this.getElementId("region"),name:"annotation-region",attrs:(0,E.pi)({x:c.x,y:c.y,width:c.width,height:c.height},l)})},r}(Di);const o4=a4;var gs=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,E.pi)((0,E.pi)({},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"),n=this.get("end"),i=this.get("style"),l=of({start:t,end:n}),c=this.get("src");return(0,E.pi)({x:l.x,y:l.y,img:c,width:l.width,height:l.height},i)},r.prototype.renderImage=function(t){this.addShape(t,{type:"image",id:this.getElementId("image"),name:"annotation-image",attrs:this.getImageAttrs()})},r}(Di);const s4=gs;var ou=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,E.pi)((0,E.pi)({},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:Vr.lineColor,lineWidth:1}},text:{content:"",display:!0,style:{fill:Vr.textColor,opacity:.65,fontSize:12,textAlign:"start",fontFamily:Vr.fontFamily}}}})},r.prototype.renderInner=function(t){(0,S.U2)(this.get("line"),"display")&&this.renderLine(t),(0,S.U2)(this.get("text"),"display")&&this.renderText(t),(0,S.U2)(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 n=this.getShapeAttrs().point;this.addShape(t,{type:"circle",id:this.getElementId("point"),name:"annotation-point",attrs:n})},r.prototype.renderLine=function(t){var n=this.getShapeAttrs().line;this.addShape(t,{type:"path",id:this.getElementId("line"),name:"annotation-line",attrs:n})},r.prototype.renderText=function(t){var n=this.getShapeAttrs().text,i=n.x,l=n.y,c=n.text,f=(0,E._T)(n,["x","y","text"]),d=this.get("text"),p=d.background,m=d.maxLength,x=d.autoEllipsis,_=d.isVertival,T=d.ellipsisPosition;Ya(t,{x:i,y:l,id:this.getElementId("text"),name:"annotation-text",content:c,style:f,background:p,maxLength:m,autoEllipsis:x,isVertival:_,ellipsisPosition:T})},r.prototype.autoAdjust=function(t){var n=this.get("direction"),i=this.get("x"),l=this.get("y"),c=(0,S.U2)(this.get("line"),"length",0),f=this.get("coordinateBBox"),d=t.getBBox(),p=d.minX,m=d.maxX,x=d.minY,_=d.maxY,T=t.findById(this.getElementId("text-group")),b=t.findById(this.getElementId("text")),I=t.findById(this.getElementId("line"));if(f){if(T){if(i+p<=f.minX){var F=f.minX-(i+p);nf(T,T.attr("x")+F,T.attr("y"))}i+m>=f.maxX&&(F=i+m-f.maxX,nf(T,T.attr("x")-F,T.attr("y")))}if("upward"===n&&l+x<=f.minY||"upward"!==n&&l+_>=f.maxY){var B=void 0,Y=void 0;"upward"===n&&l+x<=f.minY?(B="top",Y=1):(B="bottom",Y=-1),b.attr("textBaseline",B),I&&I.attr("path",[["M",0,0],["L",0,c*Y]]),nf(T,T.attr("x"),(c+2)*Y)}}},r.prototype.getShapeAttrs=function(){var t=(0,S.U2)(this.get("line"),"display"),n=(0,S.U2)(this.get("point"),"style",{}),i=(0,S.U2)(this.get("line"),"style",{}),l=(0,S.U2)(this.get("text"),"style",{}),c=this.get("direction"),f=t?(0,S.U2)(this.get("line"),"length",0):0,d="upward"===c?-1:1;return{point:(0,E.pi)({x:0,y:0},n),line:(0,E.pi)({path:[["M",0,0],["L",0,f*d]]},i),text:(0,E.pi)({x:0,y:(f+2)*d,text:(0,S.U2)(this.get("text"),"content",""),textBaseline:"upward"===c?"bottom":"top"},l)}},r}(Di);const l4=ou;var u4=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,E.pi)((0,E.pi)({},t),{name:"annotation",type:"dataRegion",locationType:"points",points:[],lineLength:0,region:{},text:{},defaultCfg:{region:{style:{lineWidth:0,fill:Vr.regionColor,opacity:.4}},text:{content:"",style:{textAlign:"center",textBaseline:"bottom",fontSize:12,fill:Vr.textColor,fontFamily:Vr.fontFamily}}}})},r.prototype.renderInner=function(t){var n=(0,S.U2)(this.get("region"),"style",{}),l=((0,S.U2)(this.get("text"),"style",{}),this.get("lineLength")||0),c=this.get("points");if(c.length){var f=function G6(e){var r=e.map(function(f){return f.x}),t=e.map(function(f){return f.y}),n=Math.min.apply(Math,r),i=Math.min.apply(Math,t),l=Math.max.apply(Math,r),c=Math.max.apply(Math,t);return{x:n,y:i,minX:n,minY:i,maxX:l,maxY:c,width:l-n,height:c-i}}(c),d=[];d.push(["M",c[0].x,f.minY-l]),c.forEach(function(m){d.push(["L",m.x,m.y])}),d.push(["L",c[c.length-1].x,c[c.length-1].y-l]),this.addShape(t,{type:"path",id:this.getElementId("region"),name:"annotation-region",attrs:(0,E.pi)({path:d},n)}),Ya(t,(0,E.pi)({id:this.getElementId("text"),name:"annotation-text",x:(f.minX+f.maxX)/2,y:f.minY-l},this.get("text")))}},r}(Di);const c4=u4;var h4=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,E.pi)((0,E.pi)({},t),{name:"annotation",type:"regionFilter",locationType:"region",start:null,end:null,color:null,shape:[]})},r.prototype.renderInner=function(t){var n=this,i=this.get("start"),l=this.get("end"),c=this.addGroup(t,{id:this.getElementId("region-filter"),capture:!1});(0,S.S6)(this.get("shapes"),function(d,p){var m=d.get("type"),x=(0,S.d9)(d.attr());n.adjustShapeAttrs(x),n.addShape(c,{id:n.getElementId("shape-"+m+"-"+p),capture:!1,type:m,attrs:x})});var f=of({start:i,end:l});c.setClip({type:"rect",attrs:{x:f.minX,y:f.minY,width:f.width,height:f.height}})},r.prototype.adjustShapeAttrs=function(t){var n=this.get("color");t.fill&&(t.fill=t.fillStyle=n),t.stroke=t.strokeStyle=n},r}(Di);const f4=h4;var kw=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,E.pi)((0,E.pi)({},t),{name:"annotation",type:"shape",draw:S.ZT})},r.prototype.renderInner=function(t){var n=this.get("render");(0,S.mf)(n)&&n(t)},r}(Di);const yn=kw;function Jn(e,r,t){var n;try{n=window.getComputedStyle?window.getComputedStyle(e,null)[r]:e.style[r]}catch{}finally{n=void 0===n?t:n}return n}var ua="g2-tooltip",Wa="g2-tooltip-custom",Ho="g2-tooltip-title",uf="g2-tooltip-list",ii="g2-tooltip-list-item",yc="g2-tooltip-marker",Ua="g2-tooltip-value",zw="g2-tooltip-name",Ey="g2-tooltip-crosshair-x",Ly="g2-tooltip-crosshair-y",zd=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,E.pi)((0,E.pi)({},t),{container:null,containerTpl:"
",updateAutoRender:!0,containerClassName:"",parent:null})},r.prototype.getContainer=function(){return this.get("container")},r.prototype.show=function(){this.get("container").style.display="",this.set("visible",!0)},r.prototype.hide=function(){this.get("container").style.display="none",this.set("visible",!1)},r.prototype.setCapture=function(t){this.getContainer().style.pointerEvents=t?"auto":"none",this.set("capture",t)},r.prototype.getBBox=function(){var t=this.getContainer();return Mi(parseFloat(t.style.left)||0,parseFloat(t.style.top)||0,t.clientWidth,t.clientHeight)},r.prototype.clear=function(){_y(this.get("container"))},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,S.UM)(t)){t=this.createDom();var n=this.get("parent");(0,S.HD)(n)&&(n=document.getElementById(n),this.set("parent",n)),n.appendChild(t),this.get("containerId")&&t.setAttribute("id",this.get("containerId")),this.set("container",t)}else(0,S.HD)(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"),n=this.get("defaultStyles");t=t?(0,S.b$)({},n,t):n,this.set("domStyles",t)},r.prototype.applyStyles=function(){var t=this.get("domStyles");if(t){var n=this.getContainer();this.applyChildrenStyles(n,t);var i=this.get("containerClassName");i&&Sy(n,i)&&ki(n,t[i])}},r.prototype.applyChildrenStyles=function(t,n){var i=this;(0,S.S6)(n,function(l,c){var f=t.getElementsByClassName(c);(0,S.S6)(f,function(d){var p=i.get("containerClassName"),m=l;Sy(d,ua)&&p===Wa&&(m=(0,E.pi)((0,E.pi)({},l),{visibility:"unset",position:"unset"})),ki(d,m)})})},r.prototype.applyStyle=function(t,n){ki(n,this.get("domStyles")[t])},r.prototype.createDom=function(){return Us(this.get("containerTpl"))},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,S.wH)(t,"domStyles")&&(this.resetStyles(),this.applyStyles()),this.resetPosition()},r.prototype.resetPosition=function(){},r}(Pw);const Iy=zd;var d4=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,E.pi)((0,E.pi)({},t),{name:"annotation",type:"html",locationType:"point",x:0,y:0,containerTpl:'
',alignX:"left",alignY:"top",html:"",zIndex:7})},r.prototype.render=function(){var t=this.getContainer(),n=this.get("html");_y(t);var i=(0,S.mf)(n)?n(t):n;if((0,S.kK)(i))t.appendChild(i);else if((0,S.HD)(i)||(0,S.hj)(i)){var l=Us(""+i);l&&t.appendChild(l)}this.resetPosition()},r.prototype.resetPosition=function(){var t=this.getContainer(),n=this.getLocation(),i=n.x,l=n.y,c=this.get("alignX"),f=this.get("alignY"),d=this.get("offsetX"),p=this.get("offsetY"),m=function No(e,r){var t=function v4(e,r){var t=Jn(e,"width",r);return"auto"===t&&(t=e.offsetWidth),parseFloat(t)}(e,r),n=parseFloat(Jn(e,"borderLeftWidth"))||0,i=parseFloat(Jn(e,"paddingLeft"))||0,l=parseFloat(Jn(e,"paddingRight"))||0,c=parseFloat(Jn(e,"borderRightWidth"))||0,f=parseFloat(Jn(e,"marginRight"))||0;return t+n+c+i+l+(parseFloat(Jn(e,"marginLeft"))||0)+f}(t),x=function yr(e,r){var t=function su(e,r){var t=Jn(e,"height",r);return"auto"===t&&(t=e.offsetHeight),parseFloat(t)}(e,r),n=parseFloat(Jn(e,"borderTopWidth"))||0,i=parseFloat(Jn(e,"paddingTop"))||0,l=parseFloat(Jn(e,"paddingBottom"))||0;return t+n+(parseFloat(Jn(e,"borderBottomWidth"))||0)+i+l+(parseFloat(Jn(e,"marginTop"))||0)+(parseFloat(Jn(e,"marginBottom"))||0)}(t),_={x:i,y:l};"middle"===c?_.x-=Math.round(m/2):"right"===c&&(_.x-=Math.round(m)),"middle"===f?_.y-=Math.round(x/2):"bottom"===f&&(_.y-=Math.round(x)),d&&(_.x+=d),p&&(_.y+=p),ki(t,{position:"absolute",left:_.x+"px",top:_.y+"px",zIndex:this.get("zIndex")})},r}(Iy);const p4=d4;function mc(e,r,t){var n=r+"Style",i=null;return(0,S.S6)(t,function(l,c){e[c]&&l[n]&&(i||(i={}),(0,S.CD)(i,l[n]))}),i}var g4=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,E.pi)((0,E.pi)({},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:Vr.lineColor}},tickLine:{style:{lineWidth:1,stroke:Vr.lineColor},alignTick:!0,length:5,displayWithLabel:!0},subTickLine:{style:{lineWidth:1,stroke:Vr.lineColor},count:4,length:2},label:{autoRotate:!0,autoHide:!1,autoEllipsis:!1,style:{fontSize:12,fill:Vr.textColor,fontFamily:Vr.fontFamily,fontWeight:"normal"},offset:10,offsetX:0,offsetY:0},title:{autoRotate:!0,spacing:5,position:"center",style:{fontSize:12,fill:Vr.textColor,textBaseline:"middle",fontFamily:Vr.fontFamily,textAlign:"center"},iconStyle:{fill:Vr.descriptionIconFill,stroke:Vr.descriptionIconStroke},description:""},tickStates:{active:{labelStyle:{fontWeight:500},tickLineStyle:{lineWidth:2}},inactive:{labelStyle:{fill:Vr.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,n){(0,S.CD)(t,n),this.clear(),this.render()},r.prototype.clearItems=function(){var t=this.getElementByLocalId("label-group");t&&t.clear()},r.prototype.setItemState=function(t,n,i){t[n]=i,this.updateTickStates(t)},r.prototype.hasState=function(t,n){return!!t[n]},r.prototype.getItemStates=function(t){var n=this.get("tickStates"),i=[];return(0,S.S6)(n,function(l,c){t[c]&&i.push(c)}),i},r.prototype.clearItemsState=function(t){var n=this,i=this.getItemsByState(t);(0,S.S6)(i,function(l){n.setItemState(l,t,!1)})},r.prototype.getItemsByState=function(t){var n=this,i=this.getItems();return(0,S.hX)(i,function(l){return n.hasState(l,t)})},r.prototype.getSidePoint=function(t,n){var l=this.getSideVector(n,t);return{x:t.x+l[0],y:t.y+l[1]}},r.prototype.getTextAnchor=function(t){var n;return(0,S.vQ)(t[0],0)?n="center":t[0]>0?n="start":t[0]<0&&(n="end"),n},r.prototype.getTextBaseline=function(t){var n;return(0,S.vQ)(t[1],0)?n="middle":t[1]>0?n="top":t[1]<0&&(n="bottom"),n},r.prototype.processOverlap=function(t){},r.prototype.drawLine=function(t){var n=this.getLinePath(),i=this.get("line");this.addShape(t,{type:"path",id:this.getElementId("line"),name:"axis-line",attrs:(0,S.CD)({path:n},i.style)})},r.prototype.getTickLineItems=function(t){var n=this,i=[],l=this.get("tickLine"),c=l.alignTick,f=l.length,d=1;return t.length>=2&&(d=t[1].value-t[0].value),(0,S.S6)(t,function(m){var x=m.point;c||(x=n.getTickPoint(m.value-d/2));var _=n.getSidePoint(x,f);i.push({startPoint:x,tickValue:m.value,endPoint:_,tickId:m.id,id:"tickline-"+m.id})}),i},r.prototype.getSubTickLineItems=function(t){var n=[],i=this.get("subTickLine"),l=i.count,c=t.length;if(c>=2)for(var f=0;f0){var i=(0,S.dp)(n);if(i>t.threshold){var l=Math.ceil(i/t.threshold),c=n.filter(function(f,d){return d%l==0});this.set("ticks",c),this.set("originalTicks",n)}}},r.prototype.getLabelAttrs=function(t,n,i){var l=this.get("label"),c=l.offset,f=l.offsetX,d=l.offsetY,p=l.rotate,m=l.formatter,x=this.getSidePoint(t.point,c),_=this.getSideVector(c,x),T=m?m(t.name,t,n):t.name,b=l.style;b=(0,S.mf)(b)?(0,S.U2)(this.get("theme"),["label","style"],{}):b;var I=(0,S.CD)({x:x.x+f,y:x.y+d,text:T,textAlign:this.getTextAnchor(_),textBaseline:this.getTextBaseline(_)},b);return p&&(I.matrix=tu(x,p)),I},r.prototype.drawLabels=function(t){var n=this,i=this.get("ticks"),l=this.addGroup(t,{name:"axis-label-group",id:this.getElementId("label-group")});(0,S.S6)(i,function(_,T){n.addShape(l,{type:"text",name:"axis-label",id:n.getElementId("label-"+_.id),attrs:n.getLabelAttrs(_,T,i),delegateObject:{tick:_,item:_,index:T}})}),this.processOverlap(l);var c=l.getChildren(),f=(0,S.U2)(this.get("theme"),["label","style"],{}),d=this.get("label"),p=d.style,m=d.formatter;if((0,S.mf)(p)){var x=c.map(function(_){return(0,S.U2)(_.get("delegateObject"),"tick")});(0,S.S6)(c,function(_,T){var b=_.get("delegateObject").tick,I=m?m(b.name,b,T):b.name,F=(0,S.CD)({},f,p(I,T,x));_.attr(F)})}},r.prototype.getTitleAttrs=function(){var t=this.get("title"),n=t.style,i=t.position,l=t.offset,c=t.spacing,f=void 0===c?0:c,d=t.autoRotate,p=n.fontSize,m=.5;"start"===i?m=0:"end"===i&&(m=1);var x=this.getTickPoint(m),_=this.getSidePoint(x,l||f+p/2),T=(0,S.CD)({x:_.x,y:_.y,text:t.text},n),b=t.rotate,I=b;if((0,S.UM)(b)&&d){var F=this.getAxisVector(x);I=Zr.Dg(F,[1,0],!0)}if(I){var Y=tu(_,I);T.matrix=Y}return T},r.prototype.drawTitle=function(t){var n,i=this.getTitleAttrs(),l=this.addShape(t,{type:"text",id:this.getElementId("title"),name:"axis-title",attrs:i});null!==(n=this.get("title"))&&void 0!==n&&n.description&&this.drawDescriptionIcon(t,l,i.matrix)},r.prototype.drawDescriptionIcon=function(t,n,i){var l=this.addGroup(t,{name:"axis-description",id:this.getElementById("description")}),c=n.getBBox(),f=c.maxX,d=c.maxY,p=c.height,m=this.get("title").iconStyle,_=p/2,T=_/6,b=f+4,I=d-p/2,F=[b+_,I-_],B=F[0],Y=F[1],G=[B+_,Y+_],H=G[0],et=G[1],wt=[B,et+_],Ot=wt[0],$t=wt[1],ge=[b,Y+_],le=ge[0],Se=ge[1],Pe=[b+_,I-p/4],or=Pe[0],cr=Pe[1],Rr=[or,cr+T],Ie=Rr[0],We=Rr[1],nr=[Ie,We+T],Ve=nr[0],je=nr[1],ir=[Ve,je+3*_/4],Pr=ir[0],Gr=ir[1];this.addShape(l,{type:"path",id:this.getElementId("title-description-icon"),name:"axis-title-description-icon",attrs:(0,E.pi)({path:[["M",B,Y],["A",_,_,0,0,1,H,et],["A",_,_,0,0,1,Ot,$t],["A",_,_,0,0,1,le,Se],["A",_,_,0,0,1,B,Y],["M",or,cr],["L",Ie,We],["M",Ve,je],["L",Pr,Gr]],lineWidth:T,matrix:i},m)}),this.addShape(l,{type:"rect",id:this.getElementId("title-description-rect"),name:"axis-title-description-rect",attrs:{x:b,y:I-p/2,width:p,height:p,stroke:"#000",fill:"#000",opacity:0,matrix:i,cursor:"pointer"}})},r.prototype.applyTickStates=function(t,n){if(this.getItemStates(t).length){var l=this.get("tickStates"),c=this.getElementId("label-"+t.id),f=n.findById(c);if(f){var d=mc(t,"label",l);d&&f.attr(d)}var p=this.getElementId("tickline-"+t.id),m=n.findById(p);if(m){var x=mc(t,"tickLine",l);x&&m.attr(x)}}},r.prototype.updateTickStates=function(t){var n=this.getItemStates(t),i=this.get("tickStates"),l=this.get("label"),c=this.getElementByLocalId("label-"+t.id),f=this.get("tickLine"),d=this.getElementByLocalId("tickline-"+t.id);if(n.length){if(c){var p=mc(t,"label",i);p&&c.attr(p)}if(d){var m=mc(t,"tickLine",i);m&&d.attr(m)}}else c&&c.attr(l.style),d&&d.attr(f.style)},r}(Di);const Nw=g4;function lu(e,r,t,n){var i=r.getChildren(),l=!1;return(0,S.S6)(i,function(c){var f=sf(e,c,t,n);l=l||f}),l}function y4(){return Nd}function m4(e,r,t){return lu(e,r,t,"head")}function Nd(e,r,t){return lu(e,r,t,"tail")}function x4(e,r,t){return lu(e,r,t,"middle")}function Gw(e){var r=function Hw(e){var r=e.attr("matrix");return r&&1!==r[0]}(e)?function wy(e){var t=[0,0,0];return Zh(t,[1,0,0],e),Math.atan2(t[1],t[0])}(e.attr("matrix")):0;return r%360}function Hd(e,r,t,n){var i=!1,l=Gw(r),c=Math.abs(e?t.attr("y")-r.attr("y"):t.attr("x")-r.attr("x")),f=(e?t.attr("y")>r.attr("y"):t.attr("x")>r.attr("x"))?r.getBBox():t.getBBox();if(e){var d=Math.abs(Math.cos(l));i=Bd(d,0,Math.PI/180)?f.width+n>c:f.height/d+n>c}else d=Math.abs(Math.sin(l)),i=Bd(d,0,Math.PI/180)?f.width+n>c:f.height/d+n>c;return i}function cf(e,r,t,n){var i=n?.minGap||0,l=r.getChildren().slice().filter(function(b){return b.get("visible")});if(!l.length)return!1;var c=!1;t&&l.reverse();for(var f=l.length,p=l[0],m=1;m1){_=Math.ceil(_);for(var I=0;I2){var c=i[0],f=i[i.length-1];c.get("visible")||(c.show(),cf(e,r,!1,n)&&(l=!0)),f.get("visible")||(f.show(),cf(e,r,!0,n)&&(l=!0))}return l}function Gd(e,r,t,n){var i=r.getChildren();if(!i.length||!e&&i.length<2)return!1;var l=Ay(i),c=!1;return(c=e?!!t&&l>t:l>Math.abs(i[1].attr("x")-i[0].attr("x")))&&function S4(e,r){(0,S.S6)(e,function(t){var l=tu({x:t.attr("x"),y:t.attr("y")},r);t.attr("matrix",l)})}(i,n(t,l)),c}function M4(){return La}function La(e,r,t,n){return Gd(e,r,t,function(){return(0,S.hj)(n)?n:e?Vr.verticalAxisRotate:Vr.horizontalAxisRotate})}function Qs(e,r,t){return Gd(e,r,t,function(n,i){if(!n)return e?Vr.verticalAxisRotate:Vr.horizontalAxisRotate;if(e)return-Math.acos(n/i);var l=0;return(n>i||(l=Math.asin(n/i))>Math.PI/4)&&(l=Math.PI/4),l})}var T4=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,E.pi)((0,E.pi)({},t),{type:"line",locationType:"region",start:null,end:null})},r.prototype.getLinePath=function(){var t=this.get("start"),n=this.get("end"),i=[];return i.push(["M",t.x,t.y]),i.push(["L",n.x,n.y]),i},r.prototype.getInnerLayoutBBox=function(){var t=this.get("start"),n=this.get("end"),i=e.prototype.getInnerLayoutBBox.call(this),l=Math.min(t.x,n.x,i.x),c=Math.min(t.y,n.y,i.y),f=Math.max(t.x,n.x,i.maxX),d=Math.max(t.y,n.y,i.maxY);return{x:l,y:c,minX:l,minY:c,maxX:f,maxY:d,width:f-l,height:d-c}},r.prototype.isVertical=function(){var t=this.get("start"),n=this.get("end");return(0,S.vQ)(t.x,n.x)},r.prototype.isHorizontal=function(){var t=this.get("start"),n=this.get("end");return(0,S.vQ)(t.y,n.y)},r.prototype.getTickPoint=function(t){var i=this.get("start"),l=this.get("end");return{x:i.x+(l.x-i.x)*t,y:i.y+(l.y-i.y)*t}},r.prototype.getSideVector=function(t){var n=this.getAxisVector(),i=Tr.Fv([0,0],n),l=this.get("verticalFactor");return Tr.bA([0,0],[i[1],-1*i[0]],t*l)},r.prototype.getAxisVector=function(){var t=this.get("start"),n=this.get("end");return[n.x-t.x,n.y-t.y]},r.prototype.processOverlap=function(t){var n=this,i=this.isVertical(),l=this.isHorizontal();if(i||l){var c=this.get("label"),f=this.get("title"),d=this.get("verticalLimitLength"),p=c.offset,m=d,x=0,_=0;f&&(x=f.style.fontSize,_=f.spacing),m&&(m=m-p-_-x);var T=this.get("overlapOrder");if((0,S.S6)(T,function(F){c[F]&&n.canProcessOverlap(F)&&n.autoProcessOverlap(F,c[F],t,m)}),f&&(0,S.UM)(f.offset)){var b=t.getCanvasBBox();f.offset=p+(i?b.width:b.height)+_+x/2}}},r.prototype.canProcessOverlap=function(t){var n=this.get("label");return"autoRotate"!==t||(0,S.UM)(n.rotate)},r.prototype.autoProcessOverlap=function(t,n,i,l){var c=this,f=this.isVertical(),d=!1,p=Bt[t];if(!0===n?(this.get("label"),d=p.getDefault()(f,i,l)):(0,S.mf)(n)?d=n(f,i,l):(0,S.Kn)(n)?p[n.type]&&(d=p[n.type](f,i,l,n.cfg)):p[n]&&(d=p[n](f,i,l)),"autoRotate"===t){if(d){var _=i.getChildren(),T=this.get("verticalFactor");(0,S.S6)(_,function(I){"center"===I.attr("textAlign")&&I.attr("textAlign",T>0?"end":"start")})}}else if("autoHide"===t){var b=i.getChildren().slice(0);(0,S.S6)(b,function(I){I.get("visible")||(c.get("isRegister")&&c.unregisterElement(I),I.remove())})}},r}(Nw);const b4=T4;var A4=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,E.pi)((0,E.pi)({},t),{type:"circle",locationType:"circle",center:null,radius:null,startAngle:-Math.PI/2,endAngle:3*Math.PI/2})},r.prototype.getLinePath=function(){var t=this.get("center"),n=t.x,i=t.y,l=this.get("radius"),c=l,f=this.get("startAngle"),d=this.get("endAngle"),p=[];if(Math.abs(d-f)===2*Math.PI)p=[["M",n,i-c],["A",l,c,0,1,1,n,i+c],["A",l,c,0,1,1,n,i-c],["Z"]];else{var m=this.getCirclePoint(f),x=this.getCirclePoint(d),_=Math.abs(d-f)>Math.PI?1:0;p=[["M",n,i],["L",m.x,m.y],["A",l,c,0,_,f>d?0:1,x.x,x.y],["L",n,i]]}return p},r.prototype.getTickPoint=function(t){var n=this.get("startAngle"),i=this.get("endAngle");return this.getCirclePoint(n+(i-n)*t)},r.prototype.getSideVector=function(t,n){var i=this.get("center"),l=[n.x-i.x,n.y-i.y],c=this.get("verticalFactor"),f=Tr.kE(l);return Tr.bA(l,l,c*t/f),l},r.prototype.getAxisVector=function(t){var n=this.get("center"),i=[t.x-n.x,t.y-n.y];return[i[1],-1*i[0]]},r.prototype.getCirclePoint=function(t,n){var i=this.get("center");return n=n||this.get("radius"),{x:i.x+Math.cos(t)*n,y:i.y+Math.sin(t)*n}},r.prototype.canProcessOverlap=function(t){var n=this.get("label");return"autoRotate"!==t||(0,S.UM)(n.rotate)},r.prototype.processOverlap=function(t){var n=this,i=this.get("label"),l=this.get("title"),c=this.get("verticalLimitLength"),f=i.offset,d=c,p=0,m=0;l&&(p=l.style.fontSize,m=l.spacing),d&&(d=d-f-m-p);var x=this.get("overlapOrder");if((0,S.S6)(x,function(T){i[T]&&n.canProcessOverlap(T)&&n.autoProcessOverlap(T,i[T],t,d)}),l&&(0,S.UM)(l.offset)){var _=t.getCanvasBBox().height;l.offset=f+_+m+p/2}},r.prototype.autoProcessOverlap=function(t,n,i,l){var c=this,f=!1,d=Bt[t];if(l>0&&(!0===n?f=d.getDefault()(!1,i,l):(0,S.mf)(n)?f=n(!1,i,l):(0,S.Kn)(n)?d[n.type]&&(f=d[n.type](!1,i,l,n.cfg)):d[n]&&(f=d[n](!1,i,l))),"autoRotate"===t){if(f){var m=i.getChildren(),x=this.get("verticalFactor");(0,S.S6)(m,function(T){"center"===T.attr("textAlign")&&T.attr("textAlign",x>0?"end":"start")})}}else if("autoHide"===t){var _=i.getChildren().slice(0);(0,S.S6)(_,function(T){T.get("visible")||(c.get("isRegister")&&c.unregisterElement(T),T.remove())})}},r}(Nw);const E4=A4;var L4=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,E.pi)((0,E.pi)({},t),{name:"crosshair",type:"base",line:{},text:null,textBackground:{},capture:!1,defaultCfg:{line:{style:{lineWidth:1,stroke:Vr.lineColor}},text:{position:"start",offset:10,autoRotate:!1,content:null,style:{fill:Vr.textColor,textAlign:"center",textBaseline:"middle",fontFamily:Vr.fontFamily}},textBackground:{padding:5,style:{stroke:Vr.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 n=this.get("text"),i=n.style,l=n.autoRotate,c=n.content;if(!(0,S.UM)(c)){var f=this.getTextPoint(),d=null;l&&(d=tu(f,this.getRotateAngle())),this.addShape(t,{type:"text",name:"crosshair-text",id:this.getElementId("text"),attrs:(0,E.pi)((0,E.pi)((0,E.pi)({},f),{text:c,matrix:d}),i)})}},r.prototype.renderLine=function(t){var n=this.getLinePath(),l=this.get("line").style;this.addShape(t,{type:"path",name:"crosshair-line",id:this.getElementId("line"),attrs:(0,E.pi)({path:n},l)})},r.prototype.renderBackground=function(t){var n=this.getElementId("text"),i=t.findById(n),l=this.get("textBackground");if(l&&i){var c=i.getBBox(),f=af(l.padding),d=l.style;this.addShape(t,{type:"rect",name:"crosshair-text-background",id:this.getElementId("text-background"),attrs:(0,E.pi)({x:c.x-f[3],y:c.y-f[0],width:c.width+f[1]+f[3],height:c.height+f[0]+f[2],matrix:i.attr("matrix")},d)}).toBack()}},r}(Di);const Ry=L4;var I4=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,E.pi)((0,E.pi)({},t),{type:"line",locationType:"region",start:null,end:null})},r.prototype.getRotateAngle=function(){var t=this.getLocation(),n=t.start,i=t.end,l=this.get("text").position,c=Math.atan2(i.y-n.y,i.x-n.x);return"start"===l?c-Math.PI/2:c+Math.PI/2},r.prototype.getTextPoint=function(){var t=this.getLocation(),n=t.start,i=t.end,l=this.get("text");return gc(n,i,l.position,l.offset)},r.prototype.getLinePath=function(){var t=this.getLocation(),n=t.start,i=t.end;return[["M",n.x,n.y],["L",i.x,i.y]]},r}(Ry);const Xw=I4;var xc=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,E.pi)((0,E.pi)({},t),{type:"circle",locationType:"circle",center:null,radius:100,startAngle:-Math.PI/2,endAngle:3*Math.PI/2})},r.prototype.getRotateAngle=function(){var t=this.getLocation(),n=t.startAngle,i=t.endAngle;return"start"===this.get("text").position?n+Math.PI/2:i-Math.PI/2},r.prototype.getTextPoint=function(){var t=this.get("text"),n=t.position,i=t.offset,l=this.getLocation(),c=l.center,f=l.radius,m="start"===n?l.startAngle:l.endAngle,x=this.getRotateAngle()-Math.PI,_=ru(c,f,m),T=Math.cos(x)*i,b=Math.sin(x)*i;return{x:_.x+T,y:_.y+b}},r.prototype.getLinePath=function(){var t=this.getLocation(),n=t.center,i=t.radius,l=t.startAngle,c=t.endAngle,f=null;if(c-l==2*Math.PI){var d=n.x,p=n.y;f=[["M",d,p-i],["A",i,i,0,1,1,d,p+i],["A",i,i,0,1,1,d,p-i],["Z"]]}else{var m=ru(n,i,l),x=ru(n,i,c),_=Math.abs(c-l)>Math.PI?1:0;f=[["M",m.x,m.y],["A",i,i,0,_,l>c?0:1,x.x,x.y]]}return f},r}(Ry);const O4=xc;var hf,Cc="g2-crosshair",Fy=Cc+"-line",Dy=Cc+"-text";const R4=((hf={})[""+Cc]={position:"relative"},hf[""+Fy]={position:"absolute",backgroundColor:"rgba(0, 0, 0, 0.25)"},hf[""+Dy]={position:"absolute",color:Vr.textColor,fontFamily:Vr.fontFamily},hf);var F4=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,E.pi)((0,E.pi)({},t),{name:"crosshair",type:"html",locationType:"region",start:{x:0,y:0},end:{x:0,y:0},capture:!1,text:null,containerTpl:'
',crosshairTpl:'
',textTpl:'{content}',domStyles:null,containerClassName:Cc,defaultStyles:R4,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=Us(this.get("crosshairTpl"));t.appendChild(i),this.applyStyle(Fy,i),this.set("crosshairEl",i)},r.prototype.getTextPoint=function(){var t=this.getLocation(),n=t.start,i=t.end,l=this.get("text");return gc(n,i,l.position,l.offset)},r.prototype.resetText=function(){var t=this.get("text"),n=this.get("textEl");if(t){var i=t.content;if(!n){var l=this.getContainer();n=Us((0,S.ng)(this.get("textTpl"),t)),l.appendChild(n),this.applyStyle(Dy,n),this.set("textEl",n)}n.innerHTML=i}else n&&n.remove()},r.prototype.isVertical=function(t,n){return t.x===n.x},r.prototype.resetPosition=function(){var t=this.get("crosshairEl");t||(this.initCrossHair(),t=this.get("crosshairEl"));var n=this.get("start"),i=this.get("end"),l=Math.min(n.x,i.x),c=Math.min(n.y,i.y);this.isVertical(n,i)?ki(t,{width:"1px",height:la(Math.abs(i.y-n.y))}):ki(t,{height:"1px",width:la(Math.abs(i.x-n.x))}),ki(t,{top:la(c),left:la(l)}),this.alignText()},r.prototype.alignText=function(){var t=this.get("textEl");if(t){var n=this.get("text").align,i=t.clientWidth,l=this.getTextPoint();switch(n){case"center":l.x=l.x-i/2;break;case"right":l.x=l.x-i}ki(t,{top:la(l.y),left:la(l.x)})}},r.prototype.updateInner=function(t){(0,S.wH)(t,"text")&&this.resetText(),e.prototype.updateInner.call(this,t)},r}(Iy);const D4=F4;var By=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,E.pi)((0,E.pi)({},t),{name:"grid",line:{},alternateColor:null,capture:!1,items:[],closed:!1,defaultCfg:{line:{type:"line",style:{lineWidth:1,stroke:Vr.lineColor}}}})},r.prototype.getLineType=function(){return(this.get("line")||this.get("defaultCfg").line).type},r.prototype.renderInner=function(t){this.drawGrid(t)},r.prototype.getAlternatePath=function(t,n){var i=this.getGridPath(t),l=n.slice(0).reverse(),c=this.getGridPath(l,!0);return this.get("closed")?i=i.concat(c):(c[0][0]="L",(i=i.concat(c)).push(["Z"])),i},r.prototype.getPathStyle=function(){return this.get("line").style},r.prototype.drawGrid=function(t){var n=this,i=this.get("line"),l=this.get("items"),c=this.get("alternateColor"),f=null;(0,S.S6)(l,function(d,p){var m=d.id||p;if(i){var x=n.getPathStyle();x=(0,S.mf)(x)?x(d,p,l):x;var _=n.getElementId("line-"+m),T=n.getGridPath(d.points);n.addShape(t,{type:"path",name:"grid-line",id:_,attrs:(0,S.CD)({path:T},x)})}if(c&&p>0){var b=n.getElementId("region-"+m),I=p%2==0;(0,S.HD)(c)?I&&n.drawAlternateRegion(b,t,f.points,d.points,c):n.drawAlternateRegion(b,t,f.points,d.points,I?c[1]:c[0])}f=d})},r.prototype.drawAlternateRegion=function(t,n,i,l,c){var f=this.getAlternatePath(i,l);this.addShape(n,{type:"path",id:t,name:"grid-region",attrs:{path:f,fill:c}})},r}(Di);const Yd=By;var Vw=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,E.pi)((0,E.pi)({},t),{type:"circle",center:null,closed:!0})},r.prototype.getGridPath=function(t,n){var i=this.getLineType(),l=this.get("closed"),c=[];if(t.length)if("circle"===i){var f=this.get("center"),d=t[0],p=function B4(e,r,t,n){var i=t-e,l=n-r;return Math.sqrt(i*i+l*l)}(f.x,f.y,d.x,d.y),m=n?0:1;l?(c.push(["M",f.x,f.y-p]),c.push(["A",p,p,0,0,m,f.x,f.y+p]),c.push(["A",p,p,0,0,m,f.x,f.y-p]),c.push(["Z"])):(0,S.S6)(t,function(x,_){c.push(0===_?["M",x.x,x.y]:["A",p,p,0,0,m,x.x,x.y])})}else(0,S.S6)(t,function(x,_){c.push(0===_?["M",x.x,x.y]:["L",x.x,x.y])}),l&&c.push(["Z"]);return c},r}(Yd);const $w=Vw;var Zw=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,E.pi)((0,E.pi)({},t),{type:"line"})},r.prototype.getGridPath=function(t){var n=[];return(0,S.S6)(t,function(i,l){n.push(0===l?["M",i.x,i.y]:["L",i.x,i.y])}),n},r}(Yd);const P4=Zw;var qw=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,E.pi)((0,E.pi)({},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),n=this.get("maxWidth"),i=this.get("maxHeight"),l=t.width,c=t.height;return n&&(l=Math.min(l,n)),i&&(c=Math.min(c,i)),Mi(t.minX,t.minY,l,c)},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"),n=this.get("y"),i=this.get("offsetX"),l=this.get("offsetY");this.moveElementTo(this.get("group"),{x:t+i,y:n+l})},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 n=this.get("background"),i=t.getBBox(),l=af(n.padding),c=(0,E.pi)({x:0,y:0,width:i.width+l[1]+l[3],height:i.height+l[0]+l[2]},n.style);this.addShape(t,{type:"rect",id:this.getElementId("background"),name:"legend-background",attrs:c}).toBack()},r.prototype.drawTitle=function(t){var n=this.get("currentPoint"),i=this.get("title"),l=i.spacing,c=i.style,f=i.text,p=this.addShape(t,{type:"text",id:this.getElementId("title"),name:"legend-title",attrs:(0,E.pi)({text:f,x:n.x,y:n.y},c)}).getBBox();this.set("currentPoint",{x:n.x,y:p.maxY+l})},r.prototype.resetDraw=function(){var t=this.get("background"),n={x:0,y:0};if(t){var i=af(t.padding);n.x=i[3],n.y=i[0]}this.set("currentPoint",n)},r}(Di);const Py=qw;var ky={marker:{style:{inactiveFill:"#000",inactiveOpacity:.45,fill:"#000",opacity:1,size:12}},text:{style:{fill:"#ccc",fontSize:12}}},Wd={fill:Vr.textColor,fontSize:12,textAlign:"start",textBaseline:"middle",fontFamily:Vr.fontFamily,fontWeight:"normal",lineHeight:12},zy="navigation-arrow-right",Ny="navigation-arrow-left",Kw={right:90*Math.PI/180,left:270*Math.PI/180,up:0,down:180*Math.PI/180},so=function(e){function r(){var t=null!==e&&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 n=t.getElementByLocalId("item-group");if(t.currentPageIndex>1){t.currentPageIndex-=1,t.updateNavigation();var i=t.getCurrentNavigationMatrix();t.get("animate")?n.animate({matrix:i},100):n.attr({matrix:i})}},t.onNavigationAfter=function(){var n=t.getElementByLocalId("item-group");if(t.currentPageIndexF&&(F=Ot),"horizontal"===T?(B&&BH&&(H=Se.width)}),et=H,H+=_,p&&(H=Math.min(p,H),et=Math.min(p,et)),this.pageWidth=H,this.pageHeight=m-Math.max(F.height,T+wt);var ge=Math.floor(this.pageHeight/(T+wt));(0,S.S6)(d,function(le,Se){0!==Se&&Se%ge==0&&(Y+=1,B.x+=H,B.y=c),i.moveElementTo(le,B),le.getParent().setClip({type:"rect",attrs:{x:B.x,y:B.y,width:H,height:T}}),B.y+=T+wt}),this.totalPagesCnt=Y,this.moveElementTo(I,{x:l+et/2-F.width/2-F.minX,y:m-F.height-F.minY})}this.pageHeight&&this.pageWidth&&n.getParent().setClip({type:"rect",attrs:{x:this.startX,y:this.startY,width:this.pageWidth,height:this.pageHeight}}),this.totalPagesCnt="horizontal"===f&&this.get("maxRow")?Math.ceil(Y/this.get("maxRow")):Y,this.currentPageIndex>this.totalPagesCnt&&(this.currentPageIndex=1),this.updateNavigation(I),n.attr("matrix",this.getCurrentNavigationMatrix())},r.prototype.drawNavigation=function(t,n,i,l){var c={x:0,y:0},f=this.addGroup(t,{id:this.getElementId("navigation-group"),name:"legend-navigation"}),d=(0,S.U2)(l.marker,"style",{}),p=d.size,m=void 0===p?12:p,x=(0,E._T)(d,["size"]),_=this.drawArrow(f,c,Ny,"horizontal"===n?"up":"left",m,x);_.on("click",this.onNavigationBack);var T=_.getBBox();c.x+=T.width+2;var I=this.addShape(f,{type:"text",id:this.getElementId("navigation-text"),name:"navigation-text",attrs:(0,E.pi)({x:c.x,y:c.y+m/2,text:i,textBaseline:"middle"},(0,S.U2)(l.text,"style"))}).getBBox();return c.x+=I.width+2,this.drawArrow(f,c,zy,"horizontal"===n?"down":"right",m,x).on("click",this.onNavigationAfter),f},r.prototype.updateNavigation=function(t){var i=(0,S.b$)({},ky,this.get("pageNavigator")).marker.style,l=i.fill,c=i.opacity,f=i.inactiveFill,d=i.inactiveOpacity,p=this.currentPageIndex+"/"+this.totalPagesCnt,m=t?t.getChildren()[1]:this.getElementByLocalId("navigation-text"),x=t?t.findById(this.getElementId(Ny)):this.getElementByLocalId(Ny),_=t?t.findById(this.getElementId(zy)):this.getElementByLocalId(zy);m.attr("text",p),x.attr("opacity",1===this.currentPageIndex?d:c),x.attr("fill",1===this.currentPageIndex?f:l),x.attr("cursor",1===this.currentPageIndex?"not-allowed":"pointer"),_.attr("opacity",this.currentPageIndex===this.totalPagesCnt?d:c),_.attr("fill",this.currentPageIndex===this.totalPagesCnt?f:l),_.attr("cursor",this.currentPageIndex===this.totalPagesCnt?"not-allowed":"pointer");var T=x.getBBox().maxX+2;m.attr("x",T),T+=m.getBBox().width+2,this.updateArrowPath(_,{x:T,y:0})},r.prototype.drawArrow=function(t,n,i,l,c,f){var d=n.x,p=n.y,m=this.addShape(t,{type:"path",id:this.getElementId(i),name:i,attrs:(0,E.pi)({size:c,direction:l,path:[["M",d+c/2,p],["L",d,p+c],["L",d+c,p+c],["Z"]],cursor:"pointer"},f)});return m.attr("matrix",tu({x:d+c/2,y:p+c/2},Kw[l])),m},r.prototype.updateArrowPath=function(t,n){var i=n.x,l=n.y,c=t.attr(),f=c.size,p=tu({x:i+f/2,y:l+f/2},Kw[c.direction]);t.attr("path",[["M",i+f/2,l],["L",i,l+f],["L",i+f,l+f],["Z"]]),t.attr("matrix",p)},r.prototype.getCurrentNavigationMatrix=function(){var t=this,n=t.currentPageIndex,i=t.pageWidth,l=t.pageHeight;return Cy("horizontal"===this.get("layout")?{x:0,y:l*(1-n)}:{x:i*(1-n),y:0})},r.prototype.applyItemStates=function(t,n){if(this.getItemStates(t).length>0){var c=n.getChildren(),f=this.get("itemStates");(0,S.S6)(c,function(d){var m=d.get("name").split("-")[2],x=mc(t,m,f);x&&(d.attr(x),"marker"===m&&(!d.get("isStroke")||!d.get("isFill"))&&(d.get("isStroke")&&d.attr("fill",null),d.get("isFill")&&d.attr("stroke",null)))})}},r.prototype.getLimitItemWidth=function(){var t=this.get("itemWidth"),n=this.get("maxItemWidth");return n?t&&(n=t<=n?t:n):t&&(n=t),n},r}(Py);const Qw=so;var Jw=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,E.pi)((0,E.pi)({},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:Vr.textColor,textBaseline:"middle",fontFamily:Vr.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:Vr.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,n){this.update({min:t,max:n})},r.prototype.setValue=function(t){var n=this.getValue();this.set("value",t);var i=this.get("group");this.resetTrackClip(),this.get("slidable")&&this.resetHandlers(i),this.delegateEmit("valuechanged",{originValue:n,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 n=this;t.on("legend-handler-min:drag",function(i){var l=n.getValueByCanvasPoint(i.x,i.y),f=n.getCurrentValue()[1];fl&&(f=l),n.setValue([f,l])})},r.prototype.bindRailEvent=function(t){},r.prototype.bindTrackEvent=function(t){var n=this,i=null;t.on("legend-track:dragstart",function(l){i={x:l.x,y:l.y}}),t.on("legend-track:drag",function(l){if(i){var c=n.getValueByCanvasPoint(i.x,i.y),f=n.getValueByCanvasPoint(l.x,l.y),d=n.getCurrentValue(),p=d[1]-d[0],m=n.getRange(),x=f-c;x<0?n.setValue(d[0]+x>m.min?[d[0]+x,d[1]+x]:[m.min,m.min+p]):x>0&&n.setValue(x>0&&d[1]+xc&&(x=c),x0&&this.changeRailLength(l,f,i[f]-T)}},r.prototype.changeRailLength=function(t,n,i){var c,l=t.getBBox();c="height"===n?this.getRailPath(l.x,l.y,l.width,i):this.getRailPath(l.x,l.y,i,l.height),t.attr("path",c)},r.prototype.changeRailPosition=function(t,n,i){var l=t.getBBox(),c=this.getRailPath(n,i,l.width,l.height);t.attr("path",c)},r.prototype.fixedHorizontal=function(t,n,i,l){var c=this.get("label"),f=c.align,d=c.spacing,p=i.getBBox(),m=t.getBBox(),x=n.getBBox(),_=p.height;this.fitRailLength(m,x,p,i),p=i.getBBox(),"rail"===f?(t.attr({x:l.x,y:l.y+_/2}),this.changeRailPosition(i,l.x+m.width+d,l.y),n.attr({x:l.x+m.width+p.width+2*d,y:l.y+_/2})):"top"===f?(t.attr({x:l.x,y:l.y}),n.attr({x:l.x+p.width,y:l.y}),this.changeRailPosition(i,l.x,l.y+m.height+d)):(this.changeRailPosition(i,l.x,l.y),t.attr({x:l.x,y:l.y+p.height+d}),n.attr({x:l.x+p.width,y:l.y+p.height+d}))},r.prototype.fixedVertail=function(t,n,i,l){var c=this.get("label"),f=c.align,d=c.spacing,p=i.getBBox(),m=t.getBBox(),x=n.getBBox();if(this.fitRailLength(m,x,p,i),p=i.getBBox(),"rail"===f)t.attr({x:l.x,y:l.y}),this.changeRailPosition(i,l.x,l.y+m.height+d),n.attr({x:l.x,y:l.y+m.height+p.height+2*d});else if("right"===f)t.attr({x:l.x+p.width+d,y:l.y}),this.changeRailPosition(i,l.x,l.y),n.attr({x:l.x+p.width+d,y:l.y+p.height});else{var _=Math.max(m.width,x.width);t.attr({x:l.x,y:l.y}),this.changeRailPosition(i,l.x+_+d,l.y),n.attr({x:l.x,y:l.y+p.height})}},r}(Py);const Hy=Jw;var Ia;const z4=((Ia={})[""+ua]={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:Vr.fontFamily,lineHeight:"20px",padding:"10px 10px 6px 10px"},Ia[""+Wa]={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)"},Ia[""+Ho]={marginBottom:"4px"},Ia[""+uf]={margin:"0px",listStyleType:"none",padding:"0px"},Ia[""+ii]={listStyleType:"none",marginBottom:"4px"},Ia[""+yc]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},Ia[""+Ua]={display:"inline-block",float:"right",marginLeft:"30px"},Ia[""+Ey]={position:"absolute",width:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},Ia[""+Ly]={position:"absolute",height:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},Ia);var W4=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,E.pi)((0,E.pi)({},t),{name:"tooltip",type:"html",x:0,y:0,items:[],customContent:null,containerTpl:'
    ',itemTpl:'
  • \n \n {name}:\n {value}\n
  • ',xCrosshairTpl:'
    ',yCrosshairTpl:'
    ',title:null,showTitle:!0,region:null,crosshairsRegion:null,containerClassName:ua,crosshairs:null,offset:10,position:"right",domStyles:null,defaultStyles:z4})},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),ki(t,{visibility:"visible"}),this.setCrossHairsVisible(!0))},r.prototype.hide=function(){var t=this.getContainer();!t||this.destroyed||(this.set("visible",!1),ki(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 n=t?"":"none",i=this.get("xCrosshairDom"),l=this.get("yCrosshairDom");i&&ki(i,{display:n}),l&&ki(l,{display:n})},r.prototype.setCustomContainer=function(){var t=document.createElement("div");t.className=Wa,this.set("container",t),this.set("containerClassName",Wa)},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(),n=this.get("container");n.appendChild(t),this.get("parent").appendChild(n),this.resetStyles(),this.applyStyles()}},r.prototype.updateInner=function(t){this.get("customContent")?this.renderCustomContent():(function Y4(e,r){var t=!1;return(0,S.S6)(r,function(n){if((0,S.wH)(e,n))return t=!0,!1}),t}(t,["title","showTitle"])&&this.resetTitle(),(0,S.wH)(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 b,t=this.get("x"),n=this.get("y"),i=this.get("offset"),l=this.getOffset(),c=l.offsetX,f=l.offsetY,d=this.get("position"),p=this.get("region"),m=this.getContainer(),x=this.getBBox(),_=x.width,T=x.height;p&&(b=of(p));var I=function G4(e,r,t,n,i,l,c){var f=function H4(e,r,t,n,i,l){var c=e,f=r;switch(l){case"left":c=e-n-t,f=r-i/2;break;case"right":c=e+t,f=r-i/2;break;case"top":c=e-n/2,f=r-i-t;break;case"bottom":c=e-n/2,f=r+t;break;default:c=e+t,f=r-i-t}return{x:c,y:f}}(e,r,t,n,i,l);if(c){var d=function N4(e,r,t,n,i){return{left:ei.x+i.width,top:ri.y+i.height}}(f.x,f.y,n,i,c);"auto"===l?(d.right&&(f.x=Math.max(0,e-n-t)),d.top&&(f.y=Math.max(0,r-i-t))):"top"===l||"bottom"===l?(d.left&&(f.x=c.x),d.right&&(f.x=c.x+c.width-n),"top"===l&&d.top&&(f.y=r+t),"bottom"===l&&d.bottom&&(f.y=r-i-t)):(d.top&&(f.y=c.y),d.bottom&&(f.y=c.y+c.height-i),"left"===l&&d.left&&(f.x=e+t),"right"===l&&d.right&&(f.x=e-n-t))}return f}(t,n,i,_,T,d,b);ki(m,{left:la(I.x+c),top:la(I.y+f)}),this.resetCrosshairs()},r.prototype.renderCustomContent=function(){var t=this.getHtmlContentNode(),n=this.get("container"),i=Sy(n,ua);if(i){this.setCustomContainer(),n=this.get("container");var l=this.get("parent"),c=l.querySelector("."+ua);l.removeChild(c)}n.innerHTML="",n.appendChild(t),i&&this.get("parent").appendChild(n),this.resetStyles(),this.applyStyles()},r.prototype.getHtmlContentNode=function(){var t,n=this.get("customContent");if(n){var i=n(this.get("title"),this.get("items"));t=(0,S.kK)(i)?i:Us(i)}return t},r.prototype.cacheDoms=function(){var t=this.getContainer(),n=t.getElementsByClassName(Ho)[0],i=t.getElementsByClassName(uf)[0];this.set("titleDom",n),this.set("listDom",i)},r.prototype.resetTitle=function(){var t=this.get("title"),n=this.get("showTitle");this.setTitle(n&&t?t:"")},r.prototype.setTitle=function(t){var n=this.get("titleDom");n&&(n.innerText=t)},r.prototype.resetCrosshairs=function(){var t=this.get("crosshairsRegion"),n=this.get("crosshairs");if(t&&n){var i=of(t),l=this.get("xCrosshairDom"),c=this.get("yCrosshairDom");"x"===n?(this.resetCrosshair("x",i),c&&(c.remove(),this.set("yCrosshairDom",null))):"y"===n?(this.resetCrosshair("y",i),l&&(l.remove(),this.set("xCrosshairDom",null))):(this.resetCrosshair("x",i),this.resetCrosshair("y",i)),this.setCrossHairsVisible(this.get("visible"))}else this.clearCrosshairs()},r.prototype.resetCrosshair=function(t,n){var i=this.checkCrosshair(t),l=this.get(t);ki(i,"x"===t?{left:la(l),top:la(n.y),height:la(n.height)}:{top:la(l),left:la(n.x),width:la(n.width)})},r.prototype.checkCrosshair=function(t){var n=t+"CrosshairDom",i=t+"CrosshairTpl",l="CROSSHAIR_"+t.toUpperCase(),c=Nt[l],f=this.get(n),d=this.get("parent");return f||(f=Us(this.get(i)),this.applyStyle(c,f),d.appendChild(f),this.set(n,f)),f},r.prototype.renderItems=function(){this.clearItemDoms();var t=this.get("items"),n=this.get("itemTpl"),i=this.get("listDom");i&&((0,S.S6)(t,function(l){var c=Vs.toCSSGradient(l.color),f=(0,E.pi)((0,E.pi)({},l),{color:c}),p=Us((0,S.ng)(n,f));i.appendChild(p)}),this.applyChildrenStyles(i,this.get("domStyles")))},r.prototype.clearItemDoms=function(){this.get("listDom")&&_y(this.get("listDom"))},r.prototype.clearCrosshairs=function(){var t=this.get("xCrosshairDom"),n=this.get("yCrosshairDom");t&&t.remove(),n&&n.remove(),this.set("xCrosshairDom",null),this.set("yCrosshairDom",null)},r}(Iy);const U4=W4;var X4={opacity:0},V4={stroke:"#C5C5C5",strokeOpacity:.85},$4={fill:"#CACED4",opacity:.85};function t_(e){return function jw(e){return(0,S.UI)(e,function(r,t){return[0===t?"M":"L",r[0],r[1]]})}(e)}var Q4=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,E.pi)((0,E.pi)({},t),{name:"trend",x:0,y:0,width:200,height:16,smooth:!0,isArea:!1,data:[],backgroundStyle:X4,lineStyle:V4,areaStyle:$4})},r.prototype.renderInner=function(t){var n=this.cfg,i=n.width,l=n.height,c=n.data,f=n.smooth,d=n.isArea,p=n.backgroundStyle,m=n.lineStyle,x=n.areaStyle;this.addShape(t,{id:this.getElementId("background"),type:"rect",attrs:(0,E.pi)({x:0,y:0,width:i,height:l},p)});var _=function q4(e,r,t,n){void 0===n&&(n=!0);var i=new Zs({values:e}),l=new Wh({values:(0,S.UI)(e,function(f,d){return d})}),c=(0,S.UI)(e,function(f,d){return[l.scale(d)*r,t-i.scale(f)*t]});return n?function Z4(e){if(e.length<=2)return t_(e);var r=[];(0,S.S6)(e,function(c){(0,S.Xy)(c,r.slice(r.length-2))||r.push(c[0],c[1])});var t=(0,Io.e9)(r,!1),n=(0,S.YM)(e);return t.unshift(["M",n[0],n[1]]),t}(c):t_(c)}(c,i,l,f);if(this.addShape(t,{id:this.getElementId("line"),type:"path",attrs:(0,E.pi)({path:_},m)}),d){var T=function e_(e,r,t,n){var i=(0,E.pr)(e),l=function K4(e,r){var t=new Zs({values:e}),n=t.max<0?t.max:Math.max(0,t.min);return r-t.scale(n)*r}(n,t);return i.push(["L",r,l]),i.push(["L",0,l]),i.push(["Z"]),i}(_,i,l,c);this.addShape(t,{id:this.getElementId("area"),type:"path",attrs:(0,E.pi)({path:T},x)})}},r.prototype.applyOffset=function(){var t=this.cfg,n=t.x,i=t.y;this.moveElementTo(this.get("group"),{x:n,y:i})},r}(Di),r_={fill:"#F7F7F7",stroke:"#BFBFBF",radius:2,opacity:1,cursor:"ew-resize",highLightFill:"#FFF"},n_=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,E.pi)((0,E.pi)({},t),{name:"handler",x:0,y:0,width:10,height:24,style:r_})},r.prototype.renderInner=function(t){var n=this.cfg,i=n.width,l=n.height,c=n.style,f=c.fill,d=c.stroke,p=c.radius,m=c.opacity,x=c.cursor;this.addShape(t,{type:"rect",id:this.getElementId("background"),attrs:{x:0,y:0,width:i,height:l,fill:f,stroke:d,radius:p,opacity:m,cursor:x}});var _=1/3*i,T=2/3*i,b=1/4*l,I=3/4*l;this.addShape(t,{id:this.getElementId("line-left"),type:"line",attrs:{x1:_,y1:b,x2:_,y2:I,stroke:d,cursor:x}}),this.addShape(t,{id:this.getElementId("line-right"),type:"line",attrs:{x1:T,y1:b,x2:T,y2:I,stroke:d,cursor:x}})},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 n=t.get("style").highLightFill;t.getElementByLocalId("background").attr("fill",n),t.draw()}),this.get("group").on("mouseleave",function(){var n=t.get("style").fill;t.getElementByLocalId("background").attr("fill",n),t.draw()})},r.prototype.draw=function(){var t=this.get("container").get("canvas");t&&t.draw()},r}(Di),i_={fill:"#416180",opacity:.05},j4={fill:"#5B8FF9",opacity:.15,cursor:"move"},tL={width:10,height:24},eL={textBaseline:"middle",fill:"#000",opacity:.45},a_="sliderchange",rL=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(n){return function(i){t.currentTarget=n;var l=i.originalEvent;l.stopPropagation(),l.preventDefault(),t.prevX=(0,S.U2)(l,"touches.0.pageX",l.pageX),t.prevY=(0,S.U2)(l,"touches.0.pageY",l.pageY);var c=t.getContainerDOM();c.addEventListener("mousemove",t.onMouseMove),c.addEventListener("mouseup",t.onMouseUp),c.addEventListener("mouseleave",t.onMouseUp),c.addEventListener("touchmove",t.onMouseMove),c.addEventListener("touchend",t.onMouseUp),c.addEventListener("touchcancel",t.onMouseUp)}},t.onMouseMove=function(n){var i=t.cfg.width,l=[t.get("start"),t.get("end")];n.stopPropagation(),n.preventDefault();var c=(0,S.U2)(n,"touches.0.pageX",n.pageX),f=(0,S.U2)(n,"touches.0.pageY",n.pageY),p=t.adjustOffsetRange((c-t.prevX)/i);t.updateStartEnd(p),t.updateUI(t.getElementByLocalId("foreground"),t.getElementByLocalId("minText"),t.getElementByLocalId("maxText")),t.prevX=c,t.prevY=f,t.draw(),t.emit(a_,[t.get("start"),t.get("end")].sort()),t.delegateEmit("valuechanged",{originValue:l,value:[t.get("start"),t.get("end")]})},t.onMouseUp=function(){t.currentTarget&&(t.currentTarget=void 0);var n=t.getContainerDOM();n&&(n.removeEventListener("mousemove",t.onMouseMove),n.removeEventListener("mouseup",t.onMouseUp),n.removeEventListener("mouseleave",t.onMouseUp),n.removeEventListener("touchmove",t.onMouseMove),n.removeEventListener("touchend",t.onMouseUp),n.removeEventListener("touchcancel",t.onMouseUp))},t}return(0,E.ZT)(r,e),r.prototype.setRange=function(t,n){this.set("minLimit",t),this.set("maxLimit",n);var i=this.get("start"),l=this.get("end"),c=(0,S.uZ)(i,t,n),f=(0,S.uZ)(l,t,n);!this.get("isInit")&&(i!==c||l!==f)&&this.setValue([c,f])},r.prototype.getRange=function(){return{min:this.get("minLimit")||0,max:this.get("maxLimit")||1}},r.prototype.setValue=function(t){var n=this.getRange();if((0,S.kJ)(t)&&2===t.length){var i=[this.get("start"),this.get("end")];this.update({start:(0,S.uZ)(t[0],n.min,n.max),end:(0,S.uZ)(t[1],n.min,n.max)}),this.get("updateAutoRender")||this.render(),this.delegateEmit("valuechanged",{originValue:i,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,E.pi)((0,E.pi)({},t),{name:"slider",x:0,y:0,width:100,height:16,backgroundStyle:{},foregroundStyle:{},handlerStyle:{},textStyle:{},defaultCfg:{backgroundStyle:i_,foregroundStyle:j4,handlerStyle:tL,textStyle:eL}})},r.prototype.update=function(t){var n=t.start,i=t.end,l=(0,E.pi)({},t);(0,S.UM)(n)||(l.start=(0,S.uZ)(n,0,1)),(0,S.UM)(i)||(l.end=(0,S.uZ)(i,0,1)),e.prototype.update.call(this,l),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,S.uZ)(this.get("start"),0,1)),this.set("end",(0,S.uZ)(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 n=this.cfg,c=n.width,f=n.height,d=n.trendCfg,p=void 0===d?{}:d,m=n.minText,x=n.maxText,_=n.backgroundStyle,T=void 0===_?{}:_,b=n.foregroundStyle,I=void 0===b?{}:b,F=n.textStyle,B=void 0===F?{}:F,Y=(0,S.b$)({},r_,this.cfg.handlerStyle);(0,S.dp)((0,S.U2)(p,"data"))&&(this.trend=this.addComponent(t,(0,E.pi)({component:Q4,id:this.getElementId("trend"),x:0,y:0,width:c,height:f},p))),this.addShape(t,{id:this.getElementId("background"),type:"rect",attrs:(0,E.pi)({x:0,y:0,width:c,height:f},T)}),this.addShape(t,{id:this.getElementId("minText"),type:"text",attrs:(0,E.pi)({y:f/2,textAlign:"right",text:m,silent:!1},B)}),this.addShape(t,{id:this.getElementId("maxText"),type:"text",attrs:(0,E.pi)({y:f/2,textAlign:"left",text:x,silent:!1},B)}),this.addShape(t,{id:this.getElementId("foreground"),name:"foreground",type:"rect",attrs:(0,E.pi)({y:0,height:f},I)});var $t=(0,S.U2)(Y,"width",10),ge=(0,S.U2)(Y,"height",24);this.minHandler=this.addComponent(t,{component:n_,id:this.getElementId("minHandler"),name:"handler-min",x:0,y:(f-ge)/2,width:$t,height:ge,cursor:"ew-resize",style:Y}),this.maxHandler=this.addComponent(t,{component:n_,id:this.getElementId("maxHandler"),name:"handler-max",x:0,y:(f-ge)/2,width:$t,height:ge,cursor:"ew-resize",style:Y})},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,n,i){var l=this.cfg,d=l.width,p=l.minText,m=l.maxText,x=l.handlerStyle,T=l.start*d,b=l.end*d;this.trend&&(this.trend.update({width:d,height:l.height}),this.get("updateAutoRender")||this.trend.render()),t.attr("x",T),t.attr("width",b-T);var I=(0,S.U2)(x,"width",10);n.attr("text",p),i.attr("text",m);var F=this._dodgeText([T,b],n,i),B=F[0],Y=F[1];this.minHandler&&(this.minHandler.update({x:T-I/2}),this.get("updateAutoRender")||this.minHandler.render()),(0,S.S6)(B,function(G,H){return n.attr(H,G)}),this.maxHandler&&(this.maxHandler.update({x:b-I/2}),this.get("updateAutoRender")||this.maxHandler.render()),(0,S.S6)(Y,function(G,H){return i.attr(H,G)})},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 n=t.findById(this.getElementId("foreground"));n.on("mousedown",this.onMouseDown("foreground")),n.on("touchstart",this.onMouseDown("foreground"))},r.prototype.adjustOffsetRange=function(t){var n=this.cfg,i=n.start,l=n.end;switch(this.currentTarget){case"minHandler":var c=0-i,f=1-i;return Math.min(f,Math.max(c,t));case"maxHandler":return c=0-l,f=1-l,Math.min(f,Math.max(c,t));case"foreground":return c=0-i,f=1-l,Math.min(f,Math.max(c,t))}},r.prototype.updateStartEnd=function(t){var n=this.cfg,i=n.start,l=n.end;switch(this.currentTarget){case"minHandler":i+=t;break;case"maxHandler":l+=t;break;case"foreground":i+=t,l+=t}this.set("start",i),this.set("end",l)},r.prototype._dodgeText=function(t,n,i){var l,c,f=this.cfg,p=f.width,x=(0,S.U2)(f.handlerStyle,"width",10),_=t[0],T=t[1],b=!1;_>T&&(_=(l=[T,_])[0],T=l[1],n=(c=[i,n])[0],i=c[1],b=!0);var I=n.getBBox(),F=i.getBBox(),B=I.width>_-2?{x:_+x/2+2,textAlign:"left"}:{x:_-x/2-2,textAlign:"right"},Y=F.width>p-T-2?{x:T-x/2-2,textAlign:"right"}:{x:T+x/2+2,textAlign:"left"};return b?[Y,B]:[B,Y]},r.prototype.draw=function(){var t=this.get("container"),n=t&&t.get("canvas");n&&n.draw()},r.prototype.getContainerDOM=function(){var t=this.get("container"),n=t&&t.get("canvas");return n&&n.get("container")},r}(Di);function uu(e,r,t){if(e){if("function"==typeof e.addEventListener)return e.addEventListener(r,t,!1),{remove:function(){e.removeEventListener(r,t,!1)}};if("function"==typeof e.attachEvent)return e.attachEvent("on"+r,t),{remove:function(){e.detachEvent("on"+r,t)}}}}var Gy={default:{trackColor:"rgba(0,0,0,0)",thumbColor:"rgba(0,0,0,0.15)",size:8,lineCap:"round"},hover:{thumbColor:"rgba(0,0,0,0.2)"}},s_=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.clearEvents=S.ZT,t.onStartEvent=function(n){return function(i){t.isMobile=n,i.originalEvent.preventDefault();var l=n?(0,S.U2)(i.originalEvent,"touches.0.clientX"):i.clientX,c=n?(0,S.U2)(i.originalEvent,"touches.0.clientY"):i.clientY;t.startPos=t.cfg.isHorizontal?l:c,t.bindLaterEvent()}},t.bindLaterEvent=function(){var n=t.getContainerDOM(),i=[];i=t.isMobile?[uu(n,"touchmove",t.onMouseMove),uu(n,"touchend",t.onMouseUp),uu(n,"touchcancel",t.onMouseUp)]:[uu(n,"mousemove",t.onMouseMove),uu(n,"mouseup",t.onMouseUp),uu(n,"mouseleave",t.onMouseUp)],t.clearEvents=function(){i.forEach(function(l){l.remove()})}},t.onMouseMove=function(n){var i=t.cfg,l=i.isHorizontal,c=i.thumbOffset;n.preventDefault();var f=t.isMobile?(0,S.U2)(n,"touches.0.clientX"):n.clientX,d=t.isMobile?(0,S.U2)(n,"touches.0.clientY"):n.clientY,p=l?f:d,m=p-t.startPos;t.startPos=p,t.updateThumbOffset(c+m)},t.onMouseUp=function(n){n.preventDefault(),t.clearEvents()},t.onTrackClick=function(n){var i=t.cfg,l=i.isHorizontal,c=i.x,f=i.y,d=i.thumbLen,m=t.getContainerDOM().getBoundingClientRect(),b=t.validateRange(l?n.clientX-m.left-c-d/2:n.clientY-m.top-f-d/2);t.updateThumbOffset(b)},t.onThumbMouseOver=function(){var n=t.cfg.theme.hover.thumbColor;t.getElementByLocalId("thumb").attr("stroke",n),t.draw()},t.onThumbMouseOut=function(){var n=t.cfg.theme.default.thumbColor;t.getElementByLocalId("thumb").attr("stroke",n),t.draw()},t}return(0,E.ZT)(r,e),r.prototype.setRange=function(t,n){this.set("minLimit",t),this.set("maxLimit",n);var i=this.getValue(),l=(0,S.uZ)(i,t,n);i!==l&&!this.get("isInit")&&this.setValue(l)},r.prototype.getRange=function(){return{min:this.get("minLimit")||0,max:this.get("maxLimit")||1}},r.prototype.setValue=function(t){var n=this.getRange(),i=this.getValue();this.update({thumbOffset:(this.get("trackLen")-this.get("thumbLen"))*(0,S.uZ)(t,n.min,n.max)}),this.delegateEmit("valuechange",{originalValue:i,value:this.getValue()})},r.prototype.getValue=function(){return(0,S.uZ)(this.get("thumbOffset")/(this.get("trackLen")-this.get("thumbLen")),0,1)},r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,E.pi)((0,E.pi)({},t),{name:"scrollbar",isHorizontal:!0,minThumbLen:20,thumbOffset:0,theme:Gy})},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 n=this.cfg,i=n.trackLen,l=n.theme,f=(0,S.b$)({},Gy,void 0===l?{default:{}}:l).default,d=f.lineCap,p=f.trackColor,x=(0,S.U2)(this.cfg,"size",f.size),_=this.get("isHorizontal")?{x1:0+x/2,y1:x/2,x2:i-x/2,y2:x/2,lineWidth:x,stroke:p,lineCap:d}:{x1:x/2,y1:0+x/2,x2:x/2,y2:i-x/2,lineWidth:x,stroke:p,lineCap:d};return this.addShape(t,{id:this.getElementId("track"),name:"track",type:"line",attrs:_})},r.prototype.renderThumbShape=function(t){var n=this.cfg,i=n.thumbOffset,l=n.thumbLen,f=(0,S.b$)({},Gy,n.theme).default,p=f.lineCap,m=f.thumbColor,x=(0,S.U2)(this.cfg,"size",f.size),_=this.get("isHorizontal")?{x1:i+x/2,y1:x/2,x2:i+l-x/2,y2:x/2,lineWidth:x,stroke:m,lineCap:p,cursor:"default"}:{x1:x/2,y1:i+x/2,x2:x/2,y2:i+l-x/2,lineWidth:x,stroke:m,lineCap:p,cursor:"default"};return this.addShape(t,{id:this.getElementId("thumb"),name:"thumb",type:"line",attrs:_})},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),t.findById(this.getElementId("track")).on("click",this.onTrackClick);var i=t.findById(this.getElementId("thumb"));i.on("mouseover",this.onThumbMouseOver),i.on("mouseout",this.onThumbMouseOut)},r.prototype.getContainerDOM=function(){var t=this.get("container"),n=t&&t.get("canvas");return n&&n.get("container")},r.prototype.validateRange=function(t){var n=this.cfg,i=n.thumbLen,l=n.trackLen,c=t;return t+i>l?c=l-i:t+il.x?l.x:r,t=tl.y?l.y:n,i=i=n&&e<=i}function ca(e,r){return"object"==typeof e&&r.forEach(function(t){delete e[t]}),e}function js(e,r,t){var n,i;void 0===r&&(r=[]),void 0===t&&(t=new Map);try{for(var l=(0,E.XA)(e),c=l.next();!c.done;c=l.next()){var f=c.value;t.has(f)||(r.push(f),t.set(f,!0))}}catch(d){n={error:d}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}return r}var Xi=function(){function e(r,t,n,i){void 0===r&&(r=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===i&&(i=0),this.x=r,this.y=t,this.height=i,this.width=n}return e.fromRange=function(r,t,n,i){return new e(r,t,n-r,i-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;tr.minX&&this.minYr.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}();function Sc(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 Vd(e,r){var t=e.getCenter();return Math.sqrt(Math.pow(r.x-t.x,2)+Math.pow(r.y-t.y,2))}function Tc(e,r){var t=e.getCenter();return Math.atan2(r.y-t.y,r.x-t.x)}function Uy(e,r){void 0===r&&(r=0);var t=e.start,n=e.end,i=e.getWidth(),l=e.getHeight();if(e.isPolar){var c=e.startAngle,f=e.endAngle,d=e.getCenter(),p=e.getRadius();return{type:"path",startState:{path:Js(d.x,d.y,p+r,c,c)},endState:function(x){return{path:Js(d.x,d.y,p+r,c,(f-c)*x+c)}},attrs:{path:Js(d.x,d.y,p+r,c,f)}}}return{type:"rect",startState:{x:t.x-r,y:n.y-r,width:e.isTransposed?i+2*r:0,height:e.isTransposed?0:l+2*r},endState:e.isTransposed?{height:l+2*r}:{width:i+2*r},attrs:{x:t.x-r,y:n.y-r,width:i+2*r,height:l+2*r}}}var hL=/^(?:(?!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 $d(e,r,t,n){return void 0===r&&(r={}),r.type?r.type:"identity"!==e.type&&Zu.includes(t)&&["interval"].includes(n)||e.isCategory?"cat":e.type}function bc(e){return e.alias||e.field}function d_(e,r,t){var l,i=e.values.length;if(1===i)l=[.5,1];else{var f=0;l=function uL(e){return!!e.isPolar&&e.endAngle-e.startAngle==2*Math.PI}(r)?r.isTransposed?[(f=1/i*(0,S.U2)(t,"widthRatio.multiplePie",1/1.3))/2,1-f/2]:[0,1-1/i]:[f=1/i/2,1-f]}return l}function pL(e){var r=e.values.filter(function(t){return!(0,S.UM)(t)&&!isNaN(t)});return Math.max.apply(Math,(0,E.ev)((0,E.ev)([],(0,E.CR)(r),!1),[(0,S.UM)(e.max)?-1/0:e.max],!1))}function fu(e,r){var t={start:{x:0,y:0},end:{x:0,y:0}};e.isRect?t=function gL(e){var r,t;switch(e){case Ge.TOP:r={x:0,y:1},t={x:1,y:1};break;case Ge.RIGHT:r={x:1,y:0},t={x:1,y:1};break;case Ge.BOTTOM:r={x:0,y:0},t={x:1,y:0};break;case Ge.LEFT:r={x:0,y:0},t={x:0,y:1};break;default:r=t={x:0,y:0}}return{start:r,end:t}}(r):e.isPolar&&(t=function hu(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}}(e));var i=t.end;return{start:e.convert(t.start),end:e.convert(i)}}function p_(e){return e.start.x===e.end.x}function g_(e,r){var t=e.start,n=e.end;return p_(e)?(t.y-n.y)*(r.x-t.x)>0?1:-1:(n.x-t.x)*(t.y-r.y)>0?-1:1}function Zd(e,r){var t=(0,S.U2)(e,["components","axis"],{});return(0,S.b$)({},(0,S.U2)(t,["common"],{}),(0,S.b$)({},(0,S.U2)(t,[r],{})))}function y_(e,r,t){var n=(0,S.U2)(e,["components","axis"],{});return(0,S.b$)({},(0,S.U2)(n,["common","title"],{}),(0,S.b$)({},(0,S.U2)(n,[r,"title"],{})),t)}function Xy(e){var r=e.x,t=e.y,n=e.circleCenter,i=t.start>t.end,l=e.convert(e.isTransposed?{x:i?0:1,y:0}:{x:0,y:i?0:1}),c=[l.x-n.x,l.y-n.y],f=[1,0],d=l.y>n.y?Tr.EU(c,f):-1*Tr.EU(c,f),p=d+(r.end-r.start);return{center:n,radius:Math.sqrt(Math.pow(l.x-n.x,2)+Math.pow(l.y-n.y,2)),startAngle:d,endAngle:p}}function ha(e,r){return(0,S.jn)(e)?!1!==e&&{}:(0,S.U2)(e,[r])}function Vy(e,r){return(0,S.U2)(e,"position",r)}function m_(e,r){return(0,S.U2)(r,["title","text"],bc(e))}var vu=function(){function e(r,t){this.destroyed=!1,this.facets=[],this.view=r,this.cfg=(0,S.b$)({},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 n=r.data,i=r.padding,c=this.view.createView({region:r.region,padding:void 0===i?this.cfg.padding:i});c.data(n||[]),r.view=c,this.beforeEachView(c,r);var f=this.cfg.eachView;return f&&f(c,r),this.afterEachView(c,r),c},e.prototype.createContainer=function(){return this.view.getLayer(Rn.FORE).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,S.S6)(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,n=r.height;return this.cfg.spacing.map(function(l,c){return(0,S.hj)(l)?l/(0===c?t:n):parseFloat(l)/100})},e.prototype.getFieldValues=function(r,t){var n=[],i={};return(0,S.S6)(r,function(l){var c=l[t];!(0,S.UM)(c)&&!i[c]&&(n.push(c),i[c]=!0)}),n},e.prototype.getRegion=function(r,t,n,i){var l=(0,E.CR)(this.parseSpacing(),2),c=l[0],f=l[1],d=(1+c)/(0===t?1:t)-c,p=(1+f)/(0===r?1:r)-f,m={x:(d+c)*n,y:(p+f)*i};return{start:m,end:{x:m.x+d,y:m.y+p}}},e.prototype.getDefaultCfg=function(){return{eachView:void 0,showTitle:!0,spacing:[0,0],padding:10,fields:[]}},e.prototype.getDefaultTitleCfg=function(){return{style:{fontSize:14,fill:"#666",fontFamily:this.view.getTheme().fontFamily}}},e.prototype.processAxis=function(r,t){var n=r.getOptions(),l=r.geometries;if("rect"===(0,S.U2)(n.coordinate,"type","rect")&&l.length){(0,S.UM)(n.axes)&&(n.axes={});var f=n.axes,d=(0,E.CR)(l[0].getXYFields(),2),p=d[0],m=d[1],x=ha(f,p),_=ha(f,m);!1!==x&&(n.axes[p]=this.getXAxisOption(p,f,x,t)),!1!==_&&(n.axes[m]=this.getYAxisOption(m,f,_,t))}},e.prototype.getFacetDataFilter=function(r){return function(t){return(0,S.yW)(r,function(n){var i=n.field,l=n.value;return!(!(0,S.UM)(l)&&i)||t[i]===l})}},e}(),$y={},du=function(e,r){$y[(0,S.vl)(e)]=r},x_=function(){function e(r,t){this.context=r,this.cfg=t,r.addAction(this)}return e.prototype.applyCfg=function(r){(0,S.f0)(this,r)},e.prototype.init=function(){this.applyCfg(this.cfg)},e.prototype.destroy=function(){this.context.removeAction(this),this.context=null},e}();const wn=x_;var tl=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.execute=function(){this.callback&&this.callback(this.context)},r.prototype.destroy=function(){e.prototype.destroy.call(this),this.callback=null},r}(wn);const Zy=tl;var qd={};function vf(e){return(0,S.U2)(qd[e],"ActionClass")}function ur(e,r,t){qd[e]={ActionClass:r,cfg:t}}function xL(e,r){var t=new Zy(r);return t.callback=e,t.name="callback",t}function qy(e,r){for(var t=[e[0]],n=1,i=e.length;n0&&i>0&&(n>=r||i>=r)}function jy(e,r){var t=e.getCanvasBBox();return pu(e,r)?t:null}function S_(e,r){return e.event.maskShapes.map(function(n){return jy(n,r)}).filter(function(n){return!!n})}function tm(e,r){return pu(e,r)?e.attr("path"):null}function ys(e){var t,n=e.event.target;return n&&(t=n.get("element")),t}function gu(e){var n,t=e.event.target;return t&&(n=t.get("delegateObject")),n}function b_(e){var r=e.event.gEvent;return!(r&&r.fromShape&&r.toShape&&r.fromShape.get("element")===r.toShape.get("element"))}function pf(e){return e&&e.component&&e.component.isList()}function A_(e){return e&&e.component&&e.component.isSlider()}function gf(e){var t=e.event.target;return t&&"mask"===t?.get("name")||Go(e)}function Go(e){var r;return"multi-mask"===(null===(r=e.event.target)||void 0===r?void 0:r.get("name"))}function Xa(e,r){var t=e.event.target;if(Go(e))return function SL(e,r){if("path"===e.event.target.get("type")){var n=function T_(e,r){return e.event.maskShapes.map(function(n){return tm(n,r)})}(e,r);return n.length>0?n.flatMap(function(l){return O_(e.view,l)}):null}var i=S_(e,r);return i.length>0?i.flatMap(function(l){return yf(e.view,l)}):null}(e,r);if("path"===t.get("type")){var n=function M_(e,r){return tm(e.event.target,r)}(e,r);return n?O_(e.view,n):void 0}var i=__(e,r);return i?yf(e.view,i):null}function E_(e,r,t){if(Go(e))return function ML(e,r,t){var n=S_(e,t);return n.length>0?n.flatMap(function(i){return L_(i,e,r)}):null}(e,r,t);var n=__(e,t);return n?L_(n,e,r):null}function L_(e,r,t){var n=r.view,i=am(n,t,{x:e.x,y:e.y}),l=am(n,t,{x:e.maxX,y:e.maxY});return yf(t,{minX:i.x,minY:i.y,maxX:l.x,maxY:l.y})}function jn(e){var t=[];return(0,S.S6)(e.geometries,function(n){t=t.concat(n.elements)}),e.views&&e.views.length&&(0,S.S6)(e.views,function(n){t=t.concat(jn(n))}),t}function I_(e,r){var n=[];return(0,S.S6)(e.geometries,function(i){var l=i.getElementsBy(function(c){return c.hasState(r)});n=n.concat(l)}),n}function lo(e,r){var n=e.getModel().data;return(0,S.kJ)(n)?n[0][r]:n[r]}function yf(e,r){var t=jn(e),n=[];return(0,S.S6)(t,function(i){var c=i.shape.getCanvasBBox();(function TL(e,r){return!(r.minX>e.maxX||r.maxXe.maxY||r.maxY=r.x&&e.y<=r.y&&e.maxY>r.y}function Yo(e){var r=e.parent,t=null;return r&&(t=r.views.filter(function(n){return n!==e})),t}function am(e,r,t){var n=function AL(e,r){return e.getCoordinate().invert(r)}(e,t);return r.getCoordinate().convert(n)}function F_(e,r,t,n){var i=!1;return(0,S.S6)(e,function(l){if(l[t]===r[t]&&l[n]===r[n])return i=!0,!1}),i}function Ec(e,r){var t=e.getScaleByField(r);return!t&&e.views&&(0,S.S6)(e.views,function(n){if(t=Ec(n,r))return!1}),t}var EL=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=0&&t.splice(n,1)},e.prototype.getCurrentPoint=function(){var r=this.event;return r?r.target instanceof HTMLElement?this.view.getCanvas().getPointByClient(r.clientX,r.clientY):{x:r.x,y:r.y}:null},e.prototype.getCurrentShape=function(){return(0,S.U2)(this.event,["gEvent","shape"])},e.prototype.isInPlot=function(){var r=this.getCurrentPoint();return!!r&&this.view.isPointInPlot(r)},e.prototype.isInShape=function(r){var t=this.getCurrentShape();return!!t&&t.get("name")===r},e.prototype.isInComponent=function(r){var t=nm(this.view),n=this.getCurrentPoint();return!!n&&!!t.find(function(i){var l=i.getBBox();return r?i.get("name")===r&&R_(l,n):R_(l,n)})},e.prototype.destroy=function(){(0,S.S6)(this.actions.slice(),function(r){r.destroy()}),this.view=null,this.event=null,this.actions=null,this.cacheMap=null},e}();const LL=EL;var IL=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}();function D_(e,r,t){var n=e.split(":"),i=n[0],l=r.getAction(i)||function mL(e,r){var t=qd[e],n=null;return t&&((n=new(0,t.ActionClass)(r,t.cfg)).name=e,n.init()),n}(i,r);if(!l)throw new Error("There is no action named ".concat(i));return{action:l,methodName:n[1],arg:t}}function B_(e){var r=e.action,t=e.methodName,n=e.arg;if(!r[t])throw new Error("Action(".concat(r.name,") doesn't have a method called ").concat(t));r[t](n)}var RL=function(e){function r(t,n){var i=e.call(this,t,n)||this;return i.callbackCaches={},i.emitCaches={},i.steps=n,i}return(0,E.ZT)(r,e),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,S.S6)(this.steps,function(n,i){(0,S.S6)(n,function(l){var c=t.getActionCallback(i,l);c&&t.bindEvent(l.trigger,c)})})},r.prototype.clearEvents=function(){var t=this;(0,S.S6)(this.steps,function(n,i){(0,S.S6)(n,function(l){var c=t.getActionCallback(i,l);c&&t.offEvent(l.trigger,c)})})},r.prototype.initContext=function(){var n=new LL(this.view);this.context=n,(0,S.S6)(this.steps,function(l){(0,S.S6)(l,function(c){if((0,S.mf)(c.action))c.actionObject={action:xL(c.action,n),methodName:"execute"};else if((0,S.HD)(c.action))c.actionObject=D_(c.action,n,c.arg);else if((0,S.kJ)(c.action)){var f=c.action,d=(0,S.kJ)(c.arg)?c.arg:[c.arg];c.actionObject=[],(0,S.S6)(f,function(p,m){c.actionObject.push(D_(p,n,d[m]))})}})})},r.prototype.isAllowStep=function(t){var n=this.currentStepName;if(n===t||"showEnable"===t)return!0;if("processing"===t)return"start"===n;if("start"===t)return"processing"!==n;if("end"===t)return"processing"===n||"start"===n;if("rollback"===t){if(this.steps.end)return"end"===n;if("start"===n)return!0}return!1},r.prototype.isAllowExecute=function(t,n){if(this.isAllowStep(t)){var i=this.getKey(t,n);return(!n.once||!this.emitCaches[i])&&(!n.isEnable||n.isEnable(this.context))}return!1},r.prototype.enterStep=function(t){this.currentStepName=t,this.emitCaches={}},r.prototype.afterExecute=function(t,n){"showEnable"!==t&&this.currentStepName!==t&&this.enterStep(t);var i=this.getKey(t,n);this.emitCaches[i]=!0},r.prototype.getKey=function(t,n){return t+n.trigger+n.action},r.prototype.getActionCallback=function(t,n){var i=this,l=this.context,c=this.callbackCaches,f=n.actionObject;if(n.action&&f){var d=this.getKey(t,n);if(!c[d]){var p=function(m){l.event=m,i.isAllowExecute(t,n)?((0,S.kJ)(f)?(0,S.S6)(f,function(x){l.event=m,B_(x)}):(l.event=m,B_(f)),i.afterExecute(t,n),n.callback&&(l.event=m,n.callback(l))):l.event=null};c[d]=n.debounce?(0,S.Ds)(p,n.debounce.wait,n.debounce.immediate):n.throttle?(0,S.P2)(p,n.throttle.wait,{leading:n.throttle.leading,trailing:n.throttle.trailing}):p}return c[d]}return null},r.prototype.bindEvent=function(t,n){var i=t.split(":");"window"===i[0]?window.addEventListener(i[1],n):"document"===i[0]?document.addEventListener(i[1],n):this.view.on(t,n)},r.prototype.offEvent=function(t,n){var i=t.split(":");"window"===i[0]?window.removeEventListener(i[1],n):"document"===i[0]?document.removeEventListener(i[1],n):this.view.off(t,n)},r}(IL);const FL=RL;var P_={};function Er(e,r){P_[(0,S.vl)(e)]=r}function om(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}}},n=function BL(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}}(e),i=function PL(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}}(e);return{background:e.backgroundColor,defaultColor:e.brandColor,subColor:e.subColor,semanticRed:e.paletteSemanticRed,semanticGreen:e.paletteSemanticGreen,padding:"auto",fontFamily:e.fontFamily,columnWidthRatio:.5,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(l){var c=l.geometry.coordinate;if(c.isPolar&&c.isTransposed){var f=wc(l.getModel(),c),m=(f.startAngle+f.endAngle)/2,_=7.5*Math.cos(m),T=7.5*Math.sin(m);return{matrix:Zr.vs(null,[["t",_,T]])}}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,E.pi)((0,E.pi)({},t.line.default),{lineCap:null,lineDash:[1,1]})},active:{style:(0,E.pi)((0,E.pi)({},t.line.active),{lineCap:null,lineDash:[1,1]})},inactive:{style:(0,E.pi)((0,E.pi)({},t.line.inactive),{lineCap:null,lineDash:[1,1]})},selected:{style:(0,E.pi)((0,E.pi)({},t.line.selected),{lineCap:null,lineDash:[1,1]})}},dash:{default:{style:(0,E.pi)((0,E.pi)({},t.line.default),{lineCap:null,lineDash:[5.5,1]})},active:{style:(0,E.pi)((0,E.pi)({},t.line.active),{lineCap:null,lineDash:[5.5,1]})},inactive:{style:(0,E.pi)((0,E.pi)({},t.line.inactive),{lineCap:null,lineDash:[5.5,1]})},selected:{style:(0,E.pi)((0,E.pi)({},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:n,top:{position:"top",grid:null,title:null,verticalLimitLength:.5},bottom:{position:"bottom",grid:null,title:null,verticalLimitLength:.5},left:{position:"left",title:null,line:null,tickLine:null,verticalLimitLength:1/3},right:{position:"right",title:null,line:null,tickLine:null,verticalLimitLength:1/3},circle:{title:null,grid:(0,S.b$)({},n.grid,{line:{type:"line"}})},radius:{title:null,grid:(0,S.b$)({},n.grid,{line:{type:"circle"}})}},legend:{common:i,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:i.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(ua)]={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(Ho)]={marginBottom:"12px",marginTop:"12px"},r["".concat(uf)]={margin:0,listStyleType:"none",padding:0},r["".concat(ii)]={listStyleType:"none",padding:0,marginBottom:"12px",marginTop:"12px",marginLeft:0,marginRight:0},r["".concat(yc)]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},r["".concat(Ua)]={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 un_65="#595959",un_25="#BFBFBF",kL=["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"],zL=["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"],z_=["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"],N_=function(e){void 0===e&&(e={});var r=e.paletteQualitative10,t=void 0===r?kL:r,n=e.paletteQualitative20,l=e.brandColor,c=void 0===l?t[0]:l;return(0,E.pi)((0,E.pi)({},{backgroundColor:"transparent",brandColor:c,subColor:"rgba(0,0,0,0.05)",paletteQualitative10:t,paletteQualitative20:void 0===n?zL:n,paletteSemanticRed:"#F4664A",paletteSemanticGreen:"#30BF78",paletteSemanticYellow:"#FAAD14",paletteSequence:z_,fontFamily:'"Segoe UI", Roboto, "Helvetica Neue", Arial,\n "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",\n "Noto Color Emoji"',axisLineBorderColor:un_25,axisLineBorder:1,axisLineDash:null,axisTitleTextFillColor:un_65,axisTitleTextFontSize:12,axisTitleTextLineHeight:12,axisTitleTextFontWeight:"normal",axisTitleSpacing:12,axisDescriptionIconFillColor:"#D9D9D9",axisTickLineBorderColor:un_25,axisTickLineLength:4,axisTickLineBorder:1,axisSubTickLineBorderColor:"#D9D9D9",axisSubTickLineLength:2,axisSubTickLineBorder:1,axisLabelFillColor:"#8C8C8C",axisLabelFontSize:12,axisLabelLineHeight:12,axisLabelFontWeight:"normal",axisLabelOffset:8,axisGridBorderColor:"#D9D9D9",axisGridBorder:1,axisGridLineDash:null,legendTitleTextFillColor:"#8C8C8C",legendTitleTextFontSize:12,legendTitleTextLineHeight:21,legendTitleTextFontWeight:"normal",legendMarkerColor:c,legendMarkerSpacing:8,legendMarkerSize:4,legendCircleMarkerSize:4,legendSquareMarkerSize:4,legendLineMarkerSize:5,legendItemNameFillColor:un_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:"#000",legendPageNavigatorMarkerInactiveFillOpacity:.45,legendPageNavigatorMarkerFillColor:"#000",legendPageNavigatorMarkerFillOpacity:1,legendPageNavigatorTextFillColor:"#8C8C8C",legendPageNavigatorTextFontSize:12,sliderRailFillColor:"#D9D9D9",sliderRailBorder:0,sliderRailBorderColor:null,sliderRailWidth:100,sliderRailHeight:12,sliderLabelTextFillColor:"#8C8C8C",sliderLabelTextFontSize:12,sliderLabelTextLineHeight:12,sliderLabelTextFontWeight:"normal",sliderHandlerFillColor:"#F0F0F0",sliderHandlerWidth:10,sliderHandlerHeight:14,sliderHandlerBorder:1,sliderHandlerBorderColor:un_25,annotationArcBorderColor:"#D9D9D9",annotationArcBorder:1,annotationLineBorderColor:un_25,annotationLineBorder:1,annotationLineDash:null,annotationTextFillColor:un_65,annotationTextFontSize:12,annotationTextLineHeight:12,annotationTextFontWeight:"normal",annotationTextBorderColor:null,annotationTextBorder:0,annotationRegionFillColor:"#000",annotationRegionFillOpacity:.06,annotationRegionBorder:0,annotationRegionBorderColor:null,annotationDataMarkerLineLength:16,tooltipCrosshairsBorderColor:un_25,tooltipCrosshairsBorder:1,tooltipCrosshairsLineDash:null,tooltipContainerFillColor:"rgb(255, 255, 255)",tooltipContainerFillOpacity:.95,tooltipContainerShadow:"0px 0px 10px #aeaeae",tooltipContainerBorderRadius:3,tooltipTextFillColor:un_65,tooltipTextFontSize:12,tooltipTextLineHeight:12,tooltipTextFontWeight:"bold",labelFillColor:un_65,labelFillColorDark:"#2c3542",labelFillColorLight:"#ffffff",labelFontSize:12,labelLineHeight:12,labelFontWeight:"normal",labelBorderColor:null,labelBorder:0,innerLabelFillColor:"#FFFFFF",innerLabelFontSize:12,innerLabelLineHeight:12,innerLabelFontWeight:"normal",innerLabelBorderColor:null,innerLabelBorder:0,overflowLabelFillColor:un_65,overflowLabelFontSize:12,overflowLabelLineHeight:12,overflowLabelFontWeight:"normal",overflowLabelBorderColor:"#FFFFFF",overflowLabelBorder:1,labelLineBorder:1,labelLineBorderColor:un_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:c,pointFillOpacity:.95,pointSize:4,pointBorder:1,pointBorderColor:"#FFFFFF",pointBorderOpacity:1,pointActiveBorderColor:"#000",pointSelectedBorder:2,pointSelectedBorderColor:"#000",pointInactiveFillOpacity:.3,pointInactiveBorderOpacity:.3,hollowPointSize:4,hollowPointBorder:1,hollowPointBorderColor:c,hollowPointBorderOpacity:.95,hollowPointFillColor:"#FFFFFF",hollowPointActiveBorder:1,hollowPointActiveBorderColor:"#000",hollowPointActiveBorderOpacity:1,hollowPointSelectedBorder:2,hollowPointSelectedBorderColor:"#000",hollowPointSelectedBorderOpacity:1,hollowPointInactiveBorderOpacity:.3,lineBorder:2,lineBorderColor:c,lineBorderOpacity:1,lineActiveBorder:3,lineSelectedBorder:3,lineInactiveBorderOpacity:.3,areaFillColor:c,areaFillOpacity:.25,areaActiveFillColor:c,areaActiveFillOpacity:.5,areaSelectedFillColor:c,areaSelectedFillOpacity:.5,areaInactiveFillOpacity:.3,hollowAreaBorderColor:c,hollowAreaBorder:2,hollowAreaBorderOpacity:1,hollowAreaActiveBorder:3,hollowAreaActiveBorderColor:"#000",hollowAreaSelectedBorder:3,hollowAreaSelectedBorderColor:"#000",hollowAreaInactiveBorderOpacity:.3,intervalFillColor:c,intervalFillOpacity:.95,intervalActiveBorder:1,intervalActiveBorderColor:"#000",intervalActiveBorderOpacity:1,intervalSelectedBorder:2,intervalSelectedBorderColor:"#000",intervalSelectedBorderOpacity:1,intervalInactiveBorderOpacity:.3,intervalInactiveFillOpacity:.3,hollowIntervalBorder:2,hollowIntervalBorderColor:c,hollowIntervalBorderOpacity:1,hollowIntervalFillColor:"#FFFFFF",hollowIntervalActiveBorder:2,hollowIntervalActiveBorderColor:"#000",hollowIntervalSelectedBorder:3,hollowIntervalSelectedBorderColor:"#000",hollowIntervalSelectedBorderOpacity:1,hollowIntervalInactiveBorderOpacity:.3}),e)};function Qd(e){var r=e.styleSheet,t=void 0===r?{}:r,n=(0,E._T)(e,["styleSheet"]),i=N_(t);return(0,S.b$)({},om(i),n)}N_();var sm={default:Qd({})};function Lc(e){return(0,S.U2)(sm,(0,S.vl)(e),sm.default)}function H_(e,r,t){var n=t.translate(e),i=t.translate(r);return(0,S.vQ)(n,i)}function G_(e,r,t){var n=t.coordinate,i=t.getYScale(),l=i.field,c=n.invert(r),f=i.invert(c.y);return(0,S.sE)(e,function(p){var m=p[pn];return m[l][0]<=f&&m[l][1]>=f})||e[e.length-1]}var Y_=(0,S.HP)(function(e){if(e.isCategory)return 1;for(var r=e.values,t=r.length,n=e.translate(r[0]),i=n,l=0;li&&(i=f)}return(i-n)/(t-1)});function W_(e){var r,t,i,n=function UL(e){var r=(0,S.VO)(e.attributes);return(0,S.hX)(r,function(t){return(0,S.FX)(Zu,t.type)})}(e);try{for(var l=(0,E.XA)(n),c=l.next();!c.done;c=l.next()){var f=c.value,d=f.getScale(f.type);if(d&&d.isLinear&&"cat"!==$d(d,(0,S.U2)(e.scaleDefs,d.field),f.type,e.type)){i=d;break}}}catch(T){r={error:T}}finally{try{c&&!c.done&&(t=l.return)&&t.call(l)}finally{if(r)throw r.error}}var x=e.getXScale(),_=e.getYScale();return i||_||x}function X_(e,r,t){if(0===r.length)return null;var n=t.type,i=t.getXScale(),l=t.getYScale(),c=i.field,f=l.field,d=null;if("heatmap"===n||"point"===n){for(var m=t.coordinate.invert(e),x=i.invert(m.x),_=l.invert(m.y),T=1/0,b=0;b(1+l)/2&&(d=c),n.translate(n.invert(d))}(e,t),et=Y[pn][c],Ot=G[pn][c],$t=l.isLinear&&(0,S.kJ)(Y[pn][f]);if((0,S.kJ)(et)){for(b=0;b=H){if(!$t){d=ge;break}(0,S.kJ)(d)||(d=[]),d.push(ge)}(0,S.kJ)(d)&&(d=G_(d,e,t))}else{var le=void 0;if(i.isLinear||"timeCat"===i.type){if((H>i.translate(Ot)||Hi.max||HMath.abs(i.translate(le[pn][c])-H)&&(G=le)}var Rr=Y_(t.getXScale());return!d&&Math.abs(i.translate(G[pn][c])-H)<=Rr/2&&(d=G),d}function lm(e,r,t,n){var i,l;void 0===t&&(t=""),void 0===n&&(n=!1);var x,_,c=e[pn],f=function WL(e,r,t){var i=r.getAttribute("position").getFields(),l=r.scales,c=(0,S.mf)(t)||!t?i[0]:t,f=l[c],d=f?f.getText(e[c]):e[c]||c;return(0,S.mf)(t)?t(d,e):d}(c,r,t),d=r.tooltipOption,p=r.theme.defaultColor,m=[];function T(ge,le){(n||!(0,S.UM)(le)&&""!==le)&&m.push({title:f,data:c,mappingData:e,name:ge,value:le,color:e.color||p,marker:!0})}if((0,S.Kn)(d)){var b=d.fields,I=d.callback;if(I){var F=b.map(function(ge){return e[pn][ge]}),B=I.apply(void 0,(0,E.ev)([],(0,E.CR)(F),!1)),Y=(0,E.pi)({data:e[pn],mappingData:e,title:f,color:e.color||p,marker:!0},B);m.push(Y)}else{var G=r.scales;try{for(var H=(0,E.XA)(b),et=H.next();!et.done;et=H.next()){var wt=et.value;if(!(0,S.UM)(c[wt])){var Ot=G[wt];T(x=bc(Ot),_=Ot.getText(c[wt]))}}}catch(ge){i={error:ge}}finally{try{et&&!et.done&&(l=H.return)&&l.call(H)}finally{if(i)throw i.error}}}}else{var $t=W_(r);_=function U_(e,r){var n=e[r.field];return(0,S.kJ)(n)?n.map(function(l){return r.getText(l)}).join("-"):r.getText(n)}(c,$t),x=function XL(e,r){var t,n=r.getGroupScales();return n.length&&(t=n[0]),t?t.getText(e[t.field]):bc(W_(r))}(c,r),T(x,_)}return m}function V_(e,r,t,n){var i,l,c=n.showNil,f=[],d=e.dataArray;if(!(0,S.xb)(d)){e.sort(d);try{for(var p=(0,E.XA)(d),m=p.next();!m.done;m=p.next()){var _=X_(r,m.value,e);if(_){var T=e.getElementId(_);if("heatmap"===e.type||e.elementsMap[T].visible){var I=lm(_,e,t,c);I.length&&f.push(I)}}}}catch(F){i={error:F}}finally{try{m&&!m.done&&(l=p.return)&&l.call(p)}finally{if(i)throw i.error}}}return f}function $_(e,r,t,n){var i=n.showNil,l=[],f=e.container.getShape(r.x,r.y);if(f&&f.get("visible")&&f.get("origin")){var p=lm(f.get("origin").mappingData,e,t,i);p.length&&l.push(p)}return l}function um(e,r,t){var n,i,l=[],c=e.geometries,f=t.shared,d=t.title,p=t.reversed;try{for(var m=(0,E.XA)(c),x=m.next();!x.done;x=m.next()){var _=x.value;if(_.visible&&!1!==_.tooltipOption){var T=_.type,b=void 0;(b=["point","edge","polygon"].includes(T)?$_(_,r,d,t):["area","line","path","heatmap"].includes(T)||!1!==f?V_(_,r,d,t):$_(_,r,d,t)).length&&(p&&b.reverse(),l.push(b))}}}catch(I){n={error:I}}finally{try{x&&!x.done&&(i=m.return)&&i.call(m)}finally{if(n)throw n.error}}return l}function cm(e){void 0===e&&(e=0);var r=(0,S.kJ)(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,E.ev)((0,E.ev)([],(0,E.CR)(r),!1),(0,E.CR)(r),!1);break;case 3:r=(0,E.ev)((0,E.ev)([],(0,E.CR)(r),!1),[r[1]],!1);break;default:r=r.slice(0,4)}return r}var Jd={};function mu(e,r){Jd[e]=r}function qL(e){return Jd[e]}var KL=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){return(0,S.G)(this.option.actions,function(n){return n[0]===r})},e.prototype.create=function(r,t){var n=this.option,i=n.type,c="theta"===i,f=(0,E.pi)({start:r,end:t},n.cfg),d=function(e){return iy[e.toLowerCase()]}(c?"polar":i);return this.coordinate=new d(f),this.coordinate.type=i,c&&(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,E.pi)({type:"rect",actions:[],cfg:{}},r)},e.prototype.execActions=function(r){var t=this;(0,S.S6)(this.option.actions,function(i){var l,c=(0,E.CR)(i),f=c[0],d=c.slice(1);((0,S.UM)(r)||r.includes(f))&&(l=t.coordinate)[f].apply(l,(0,E.ev)([],(0,E.CR)(d),!1))})},e}();const QL=KL;var Fn=function(){function e(r,t,n){this.view=r,this.gEvent=t,this.data=n,this.type=t.type}return e.fromData=function(r,t,n){return new e(r,new b2(t,{}),n)},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}();const en=Fn;function JL(e){var r=e.getController("axis"),t=e.getController("legend"),n=e.getController("annotation");[r,e.getController("slider"),e.getController("scrollbar"),t,n].forEach(function(c){c&&c.layout()})}var Ic=function(){function e(){this.scales=new Map,this.syncScales=new Map}return e.prototype.createScale=function(r,t,n,i){var l=n,c=this.getScaleMeta(i);if(0===t.length&&c){var f=c.scale,d={type:f.type};f.isCategory&&(d.values=f.values),l=(0,S.b$)(d,c.scaleDef,n)}var p=function vL(e,r,t){var n=r||[];if((0,S.hj)(e)||(0,S.UM)((0,S.Wx)(n,e))&&(0,S.xb)(t))return new(ni("identity"))({field:e.toString(),values:[e]});var l=(0,S.I)(n,e),c=(0,S.U2)(t,"type",function fL(e){var r="linear";return hL.test(e)?r="timeCat":(0,S.HD)(e)&&(r="cat"),r}(l[0]));return new(ni(c))((0,E.pi)({field:e,values:l},t))}(r,t,l);return this.cacheScale(p,n,i),p},e.prototype.sync=function(r,t){var n=this;this.syncScales.forEach(function(i,l){var c=Number.MAX_SAFE_INTEGER,f=Number.MIN_SAFE_INTEGER,d=[];(0,S.S6)(i,function(p){var m=n.getScale(p);f=(0,S.hj)(m.max)?Math.max(f,m.max):f,c=(0,S.hj)(m.min)?Math.min(c,m.min):c,(0,S.S6)(m.values,function(x){d.includes(x)||d.push(x)})}),(0,S.S6)(i,function(p){var m=n.getScale(p);if(m.isContinuous)m.change({min:c,max:f,values:d});else if(m.isCategory){var x=m.range,_=n.getScaleMeta(p);d&&!(0,S.U2)(_,["scaleDef","range"])&&(x=d_((0,S.b$)({},m,{values:d}),r,t)),m.change({values:d,range:x})}})})},e.prototype.cacheScale=function(r,t,n){var i=this.getScaleMeta(n);i&&i.scale.type===r.type?(function dL(e,r){if("identity"!==e.type&&"identity"!==r.type){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n]);e.change(t)}}(i.scale,r),i.scaleDef=t):this.scales.set(n,i={key:n,scale:r,scaleDef:t});var l=this.getSyncKey(i);if(i.syncKey=l,this.removeFromSyncScales(n),l){var c=this.syncScales.get(l);c||this.syncScales.set(l,c=[]),c.push(n)}},e.prototype.getScale=function(r){var t=this.getScaleMeta(r);if(!t){var n=(0,S.Z$)(r.split("-")),i=this.syncScales.get(n);i&&i.length&&(t=this.getScaleMeta(i[0]))}return t&&t.scale},e.prototype.deleteScale=function(r){var t=this.getScaleMeta(r);if(t){var i=this.syncScales.get(t.syncKey);if(i&&i.length){var l=i.indexOf(r);-1!==l&&i.splice(l,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(n,i){var l=n.indexOf(r);if(-1!==l)return n.splice(l,1),0===n.length&&t.syncScales.delete(i),!1})},e.prototype.getSyncKey=function(r){var i=r.scale.field,l=(0,S.U2)(r.scaleDef,["sync"]);return!0===l?i:!1===l?void 0:l},e.prototype.getScaleMeta=function(r){return this.scales.get(r)},e}(),jd=function(){function e(r,t,n,i){void 0===r&&(r=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===i&&(i=0),this.top=r,this.right=t,this.bottom=n,this.left=i}return e.instance=function(r,t,n,i){return void 0===r&&(r=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===i&&(i=0),new e(r,t,n,i)},e.prototype.max=function(r){var t=(0,E.CR)(r,4),i=t[1],l=t[2],c=t[3];return this.top=Math.max(this.top,t[0]),this.right=Math.max(this.right,i),this.bottom=Math.max(this.bottom,l),this.left=Math.max(this.left,c),this},e.prototype.shrink=function(r){var t=(0,E.CR)(r,4),i=t[1],l=t[2],c=t[3];return this.top+=t[0],this.right+=i,this.bottom+=l,this.left+=c,this},e.prototype.inc=function(r,t){var n=r.width,i=r.height;switch(t){case Ge.TOP:case Ge.TOP_LEFT:case Ge.TOP_RIGHT:this.top+=i;break;case Ge.RIGHT:case Ge.RIGHT_TOP:case Ge.RIGHT_BOTTOM:this.right+=n;break;case Ge.BOTTOM:case Ge.BOTTOM_LEFT:case Ge.BOTTOM_RIGHT:this.bottom+=i;break;case Ge.LEFT:case Ge.LEFT_TOP:case Ge.LEFT_BOTTOM:this.left+=n}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,E.ev)([void 0],(0,E.CR)(this.getPadding()),!1)))},e}();function hm(e,r,t){var n=t.instance();r.forEach(function(i){i.autoPadding=n.max(i.autoPadding.getPadding())})}var Z_=function(e){function r(t){var n=e.call(this,{visible:t.visible})||this;n.views=[],n.geometries=[],n.controllers=[],n.interactions={},n.limitInPlot=!1,n.options={data:[],animate:!0},n.usedControllers=function ZL(){return Object.keys(Jd)}(),n.scalePool=new Ic,n.layoutFunc=JL,n.isPreMouseInPlot=!1,n.isDataChanged=!1,n.isCoordinateChanged=!1,n.createdScaleKeys=new Map,n.onCanvasEvent=function(G){var H=G.name;if(!H.includes(":")){var et=n.createViewEvent(G);n.doPlotEvent(et),n.emit(H,et)}},n.onDelegateEvents=function(G){var H=G.name;if(H.includes(":")){var et=n.createViewEvent(G);n.emit(H,et)}};var i=t.id,l=void 0===i?(0,S.EL)("view"):i,f=t.canvas,d=t.backgroundGroup,p=t.middleGroup,m=t.foregroundGroup,x=t.region,_=void 0===x?{start:{x:0,y:0},end:{x:1,y:1}}:x,T=t.padding,b=t.appendPadding,I=t.theme,F=t.options,B=t.limitInPlot,Y=t.syncViewPadding;return n.parent=t.parent,n.canvas=f,n.backgroundGroup=d,n.middleGroup=p,n.foregroundGroup=m,n.region=_,n.padding=T,n.appendPadding=b,n.options=(0,E.pi)((0,E.pi)({},n.options),F),n.limitInPlot=B,n.id=l,n.syncViewPadding=Y,n.themeObject=(0,S.Kn)(I)?(0,S.b$)({},Lc("default"),Qd(I)):Lc(I),n.init(),n}return(0,E.ZT)(r,e),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,n){void 0===t&&(t=!1),this.emit(kr.BEFORE_RENDER,en.fromData(this,kr.BEFORE_RENDER,n)),this.paint(t),this.emit(kr.AFTER_RENDER,en.fromData(this,kr.AFTER_RENDER,n)),!1===this.visible&&this.changeVisible(!1)},r.prototype.clear=function(){var t=this;this.emit(kr.BEFORE_CLEAR),this.filteredData=[],this.coordinateInstance=void 0,this.isDataChanged=!1,this.isCoordinateChanged=!1;for(var n=this.geometries,i=0;i
    ');le.appendChild(Se);var Pe=x2(le,d,l,c),or=function g2(e){var r=p2[e];if(!r)throw new Error("G engine '".concat(e,"' is not exist, please register it at first."));return r}(_),cr=new or.Canvas((0,E.pi)({container:Se,pixelRatio:T,localRefresh:I,supportCSSTransform:G},Pe));return(n=e.call(this,{parent:null,canvas:cr,backgroundGroup:cr.addGroup({zIndex:Ys.BG}),middleGroup:cr.addGroup({zIndex:Ys.MID}),foregroundGroup:cr.addGroup({zIndex:Ys.FORE}),padding:p,appendPadding:m,visible:B,options:wt,limitInPlot:Ot,theme:$t,syncViewPadding:ge})||this).onResize=(0,S.Ds)(function(){n.forceFit()},300),n.ele=le,n.canvas=cr,n.width=Pe.width,n.height=Pe.height,n.autoFit=d,n.localRefresh=I,n.renderer=_,n.wrapperElement=Se,n.updateCanvasStyle(),n.bindAutoFit(),n.initDefaultInteractions(et),n}return(0,E.ZT)(r,e),r.prototype.initDefaultInteractions=function(t){var n=this;(0,S.S6)(t,function(i){n.interaction(i)})},r.prototype.aria=function(t){var n="aria-label";!1===t?this.ele.removeAttribute(n):this.ele.setAttribute(n,t.label)},r.prototype.changeSize=function(t,n){return this.width===t&&this.height===n||(this.emit(kr.BEFORE_CHANGE_SIZE),this.width=t,this.height=n,this.canvas.changeSize(t,n),this.render(!0),this.emit(kr.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(),function lE(e){var r=e.parentNode;r&&r.removeChild(e)}(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=x2(this.ele,!0,this.width,this.height);this.changeSize(t.width,t.height)}},r.prototype.updateCanvasStyle=function(){ki(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}(Z_);const e5=t5;var Oc=function(){function e(r){this.visible=!0,this.components=[],this.view=r}return e.prototype.clear=function(r){(0,S.S6)(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}(),xu=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.isLocked=!1,t}return(0,E.ZT)(r,e),Object.defineProperty(r.prototype,"name",{get:function(){return"tooltip"},enumerable:!1,configurable:!0}),r.prototype.init=function(){},r.prototype.isVisible=function(){return!1!==this.view.getOptions().tooltip},r.prototype.render=function(){},r.prototype.showTooltip=function(t){if(this.point=t,this.isVisible()){var n=this.view,i=this.getTooltipItems(t);if(!i.length)return void this.hideTooltip();var l=this.getTitle(i),c={x:i[0].x,y:i[0].y};n.emit("tooltip:show",en.fromData(n,"tooltip:show",(0,E.pi)({items:i,title:l},t)));var f=this.getTooltipCfg(),d=f.follow,p=f.showMarkers,m=f.showCrosshairs,x=f.showContent,_=f.marker,T=this.items;if((0,S.Xy)(this.title,l)&&(0,S.Xy)(T,i)?(this.tooltip&&d&&(this.tooltip.update(t),this.tooltip.show()),this.tooltipMarkersGroup&&this.tooltipMarkersGroup.show()):(n.emit("tooltip:change",en.fromData(n,"tooltip:change",(0,E.pi)({items:i,title:l},t))),((0,S.mf)(x)?x(i):x)&&(this.tooltip||this.renderTooltip(),this.tooltip.update((0,S.CD)({},f,{items:this.getItemsAfterProcess(i),title:l},d?t:{})),this.tooltip.show()),p&&this.renderTooltipMarkers(i,_)),this.items=i,this.title=l,m){var I=(0,S.U2)(f,["crosshairs","follow"],!1);this.renderCrosshairs(I?t:c,f)}}},r.prototype.hideTooltip=function(){if(this.getTooltipCfg().follow){var n=this.tooltipMarkersGroup;n&&n.hide();var i=this.xCrosshair,l=this.yCrosshair;i&&i.hide(),l&&l.hide();var c=this.tooltip;c&&c.hide(),this.view.emit("tooltip:hide",en.fromData(this.view,"tooltip:hide",{})),this.point=null}else 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,n=t.tooltip,i=t.xCrosshair,l=t.yCrosshair,c=t.tooltipMarkersGroup;n&&(n.hide(),n.clear()),i&&i.clear(),l&&l.clear(),c&&c.clear(),n?.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 n=this,i=n.tooltip,l=n.tooltipMarkersGroup,c=n.xCrosshair,f=n.yCrosshair;t?(i&&i.show(),l&&l.show(),c&&c.show(),f&&f.show()):(i&&i.hide(),l&&l.hide(),c&&c.hide(),f&&f.hide()),this.visible=t}},r.prototype.getTooltipItems=function(t){var n,i,l,c,f,d,p=this.findItemsFromView(this.view,t);if(p.length){p=(0,S.xH)(p);try{for(var m=(0,E.XA)(p),x=m.next();!x.done;x=m.next()){var _=x.value;try{for(var T=(l=void 0,(0,E.XA)(_)),b=T.next();!b.done;b=T.next()){var I=b.value,F=I.mappingData,B=F.x,Y=F.y;I.x=(0,S.kJ)(B)?B[B.length-1]:B,I.y=(0,S.kJ)(Y)?Y[Y.length-1]:Y}}catch(le){l={error:le}}finally{try{b&&!b.done&&(c=T.return)&&c.call(T)}finally{if(l)throw l.error}}}}catch(le){n={error:le}}finally{try{x&&!x.done&&(i=m.return)&&i.call(m)}finally{if(n)throw n.error}}if(!1===this.getTooltipCfg().shared&&p.length>1){var H=p[0],et=Math.abs(t.y-H[0].y);try{for(var wt=(0,E.XA)(p),Ot=wt.next();!Ot.done;Ot=wt.next()){var $t=Ot.value,ge=Math.abs(t.y-$t[0].y);ge<=et&&(H=$t,et=ge)}}catch(le){f={error:le}}finally{try{Ot&&!Ot.done&&(d=wt.return)&&d.call(wt)}finally{if(f)throw f.error}}p=[H]}return function el(e){for(var r=[],t=function(i){var l=e[i];(0,S.sE)(r,function(f){return f.color===l.color&&f.name===l.name&&f.value===l.value&&f.title===l.title})||r.push(l)},n=0;n'+f+"
    ":f}})},r.prototype.getTitle=function(t){var n=t[0].title||t[0].name;return this.title=n,n},r.prototype.renderTooltip=function(){var t=this.view.getCanvas(),n={start:{x:0,y:0},end:{x:t.get("width"),y:t.get("height")}},i=this.getTooltipCfg(),l=new ff((0,E.pi)((0,E.pi)({parent:t.get("el").parentNode,region:n},i),{visible:!1,crosshairs:null}));l.init(),this.tooltip=l},r.prototype.renderTooltipMarkers=function(t,n){var i,l,c=this.getTooltipMarkersGroup(),f=this.view.getRootView(),d=f.limitInPlot;try{for(var p=(0,E.XA)(t),m=p.next();!m.done;m=p.next()){var x=m.value,_=x.x,T=x.y;if(d||c?.getClip()){var b=Uy(f.getCoordinate());c?.setClip({type:b.type,attrs:b.attrs})}else c?.setClip(void 0);var B=this.view.getTheme(),Y=(0,S.U2)(B,["components","tooltip","marker"],{}),G=(0,E.pi)((0,E.pi)({fill:x.color,symbol:"circle",shadowColor:x.color},(0,S.mf)(n)?(0,E.pi)((0,E.pi)({},Y),n(x)):n),{x:_,y:T});c.addShape("marker",{attrs:G})}}catch(H){i={error:H}}finally{try{m&&!m.done&&(l=p.return)&&l.call(p)}finally{if(i)throw i.error}}},r.prototype.renderCrosshairs=function(t,n){var i=(0,S.U2)(n,["crosshairs","type"],"x");"x"===i?(this.yCrosshair&&this.yCrosshair.hide(),this.renderXCrosshairs(t,n)):"y"===i?(this.xCrosshair&&this.xCrosshair.hide(),this.renderYCrosshairs(t,n)):"xy"===i&&(this.renderXCrosshairs(t,n),this.renderYCrosshairs(t,n))},r.prototype.renderXCrosshairs=function(t,n){var l,c,i=this.getViewWithGeometry(this.view).getCoordinate();if(i.isRect)i.isTransposed?(l={x:i.start.x,y:t.y},c={x:i.end.x,y:t.y}):(l={x:t.x,y:i.end.y},c={x:t.x,y:i.start.y});else{var f=Tc(i,t),d=i.getCenter(),p=i.getRadius();c=$n(d.x,d.y,p,f),l=d}var m=(0,S.b$)({start:l,end:c,container:this.getTooltipCrosshairsGroup()},(0,S.U2)(n,"crosshairs",{}),this.getCrosshairsText("x",t,n));delete m.type;var x=this.xCrosshair;x?x.update(m):(x=new Xw(m)).init(),x.render(),x.show(),this.xCrosshair=x},r.prototype.renderYCrosshairs=function(t,n){var l,c,i=this.getViewWithGeometry(this.view).getCoordinate();if(i.isRect){var f=void 0,d=void 0;i.isTransposed?(f={x:t.x,y:i.end.y},d={x:t.x,y:i.start.y}):(f={x:i.start.x,y:t.y},d={x:i.end.x,y:t.y}),l={start:f,end:d},c="Line"}else l={center:i.getCenter(),radius:Vd(i,t),startAngle:i.startAngle,endAngle:i.endAngle},c="Circle";delete(l=(0,S.b$)({container:this.getTooltipCrosshairsGroup()},l,(0,S.U2)(n,"crosshairs",{}),this.getCrosshairsText("y",t,n))).type;var p=this.yCrosshair;p?i.isRect&&"circle"===p.get("type")||!i.isRect&&"line"===p.get("type")?(p=new Mt[c](l)).init():p.update(l):(p=new Mt[c](l)).init(),p.render(),p.show(),this.yCrosshair=p},r.prototype.getCrosshairsText=function(t,n,i){var l=(0,S.U2)(i,["crosshairs","text"]),c=(0,S.U2)(i,["crosshairs","follow"]),f=this.items;if(l){var d=this.getViewWithGeometry(this.view),p=f[0],m=d.getXScale(),x=d.getYScales()[0],_=void 0,T=void 0;if(c){var b=this.view.getCoordinate().invert(n);_=m.invert(b.x),T=x.invert(b.y)}else _=p.data[m.field],T=p.data[x.field];var I="x"===t?_:T;return(0,S.mf)(l)?l=l(t,I,f,n):l.content=I,{text:l}}},r.prototype.getGuideGroup=function(){return this.guideGroup||(this.guideGroup=this.view.foregroundGroup.addGroup({name:"tooltipGuide",capture:!1})),this.guideGroup},r.prototype.getTooltipMarkersGroup=function(){var t=this.tooltipMarkersGroup;return t&&!t.destroyed?(t.clear(),t.show()):((t=this.getGuideGroup().addGroup({name:"tooltipMarkersGroup"})).toFront(),this.tooltipMarkersGroup=t),t},r.prototype.getTooltipCrosshairsGroup=function(){var t=this.tooltipCrosshairsGroup;return t||((t=this.getGuideGroup().addGroup({name:"tooltipCrosshairsGroup",capture:!1})).toBack(),this.tooltipCrosshairsGroup=t),t},r.prototype.findItemsFromView=function(t,n){var i,l;if(!1===t.getOptions().tooltip)return[];var f=um(t,n,this.getTooltipCfg());try{for(var d=(0,E.XA)(t.views),p=d.next();!p.done;p=d.next())f=f.concat(this.findItemsFromView(p.value,n))}catch(x){i={error:x}}finally{try{p&&!p.done&&(l=d.return)&&l.call(d)}finally{if(i)throw i.error}}return f},r.prototype.getViewWithGeometry=function(t){var n=this;return t.geometries.length?t:(0,S.sE)(t.views,function(i){return n.getViewWithGeometry(i)})},r.prototype.getItemsAfterProcess=function(t){return(this.getTooltipCfg().customItems||function(l){return l})(t)},r}(Oc);const q_=xu;var K_={};function Q_(e){return K_[e.toLowerCase()]}function hi(e,r){K_[e.toLowerCase()]=r}var rl={appear:{duration:450,easing:"easeQuadOut"},update:{duration:400,easing:"easeQuadInOut"},enter:{duration:400,easing:"easeQuadInOut"},leave:{duration:350,easing:"easeQuadIn"}},mf={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"}}},J_={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){return{animation:e.isRect?e.isTransposed?"grow-in-x":"grow-in-y":"grow-in-xy"}},polygon:function(){return{animation:"fade-in",duration:500}},edge:function(){return{animation:"fade-in"}}};function fm(e,r,t){var n=mf[e];return n&&((0,S.mf)(n)&&(n=n(r)),n=(0,S.b$)({},rl,n),t)?n[t]:n}function nl(e,r,t){var n=(0,S.U2)(e.get("origin"),"data",pn),i=r.animation,l=function r5(e,r){return{delay:(0,S.mf)(e.delay)?e.delay(r):e.delay,easing:(0,S.mf)(e.easing)?e.easing(r):e.easing,duration:(0,S.mf)(e.duration)?e.duration(r):e.duration,callback:e.callback,repeat:e.repeat}}(r,n);if(i){var c=Q_(i);c&&c(e,l,t)}else e.animate(t.toAttrs,l)}var vm="element-background",n5=function(e){function r(t){var n=e.call(this,t)||this;n.labelShape=[],n.states=[];var l=t.container,c=t.offscreenGroup,f=t.elementIndex,d=t.visible,p=void 0===d||d;return n.shapeFactory=t.shapeFactory,n.container=l,n.offscreenGroup=c,n.visible=p,n.elementIndex=f,n}return(0,E.ZT)(r,e),r.prototype.draw=function(t,n){void 0===n&&(n=!1),this.model=t,this.data=t.data,this.shapeType=this.getShapeType(t),this.drawShape(t,n),!1===this.visible&&this.changeVisible(!1)},r.prototype.update=function(t){var i=this.shapeFactory,l=this.shape;if(l){this.model=t,this.data=t.data,this.shapeType=this.getShapeType(t),this.setShapeInfo(l,t);var c=this.getOffscreenGroup(),f=i.drawShape(this.shapeType,t,c);f.cfg.data=this.data,f.cfg.origin=t,f.cfg.element=this,this.syncShapeStyle(l,f,this.getStates(),this.getAnimateCfg("update"))}},r.prototype.destroy=function(){var n=this.shapeFactory,i=this.shape;if(i){var l=this.getAnimateCfg("leave");l?nl(i,l,{coordinate:n.coordinate,toAttrs:(0,E.pi)({},i.attr())}):i.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(n){n.show()})):(this.shape&&this.shape.hide(),this.labelShape&&this.labelShape.forEach(function(n){n.hide()}))},r.prototype.setState=function(t,n){var i=this,l=i.states,c=i.shapeFactory,f=i.model,d=i.shape,p=i.shapeType,m=l.indexOf(t);if(n){if(m>-1)return;l.push(t),("active"===t||"selected"===t)&&d?.toFront()}else{if(-1===m)return;if(l.splice(m,1),"active"===t||"selected"===t){var x=this.geometry,b=x.zIndexReversed?this.geometry.elements.length-this.elementIndex:this.elementIndex;x.sortZIndex?d.setZIndex(b):d.set("zIndex",b)}}var I=c.drawShape(p,f,this.getOffscreenGroup());this.syncShapeStyle(d,I,l.length?l:["reset"],null),I.remove(!0);var F={state:t,stateStatus:n,element:this,target:this.container};this.container.emit("statechange",F),Rw(this.shape,"statechange",F)},r.prototype.clearStates=function(){var t=this;(0,S.S6)(this.states,function(i){t.setState(i,!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 n=this.shape,i=this.labelShape,l={x:0,y:0,minX:0,minY:0,maxX:0,maxY:0,width:0,height:0};return n&&(l=n.getCanvasBBox()),i&&i.forEach(function(c){var f=c.getCanvasBBox();l.x=Math.min(f.x,l.x),l.y=Math.min(f.y,l.y),l.minX=Math.min(f.minX,l.minX),l.minY=Math.min(f.minY,l.minY),l.maxX=Math.max(f.maxX,l.maxX),l.maxY=Math.max(f.maxY,l.maxY)}),l.width=l.maxX-l.minX,l.height=l.maxY-l.minY,l},r.prototype.getStatesStyle=function(){if(!this.statesStyle){var t=this,l=t.shapeFactory;this.statesStyle=(0,S.b$)({},l.theme[t.shapeType]||l.theme[l.defaultShapeType],t.geometry.stateOption)}return this.statesStyle},r.prototype.getStateStyle=function(t,n){var i=this.getStatesStyle(),l=(0,S.U2)(i,[t,"style"],{}),c=l[n]||l;return(0,S.mf)(c)?c(this):c},r.prototype.getAnimateCfg=function(t){var n=this,i=this.animate;if(i){var l=i[t];return l&&(0,E.pi)((0,E.pi)({},l),{callback:function(){var c;(0,S.mf)(l.callback)&&l.callback(),null===(c=n.geometry)||void 0===c||c.emit(as.AFTER_DRAW_ANIMATE)}})}return null},r.prototype.drawShape=function(t,n){var i;void 0===n&&(n=!1);var l=this,c=l.shapeFactory;if(this.shape=c.drawShape(l.shapeType,t,l.container),this.shape){this.setShapeInfo(this.shape,t);var p=this.shape.cfg.name;p?(0,S.HD)(p)&&(this.shape.cfg.name=["element",p]):this.shape.cfg.name=["element",this.shapeFactory.geometryType];var x=this.getAnimateCfg(n?"enter":"appear");x&&(null===(i=this.geometry)||void 0===i||i.emit(as.BEFORE_DRAW_ANIMATE),nl(this.shape,x,{coordinate:c.coordinate,toAttrs:(0,E.pi)({},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,n){var i=this;t.cfg.origin=n,t.cfg.element=this,t.isGroup()&&t.get("children").forEach(function(c){i.setShapeInfo(c,n)})},r.prototype.syncShapeStyle=function(t,n,i,l,c){var d,f=this;if(void 0===i&&(i=[]),void 0===c&&(c=0),t&&n){var p=t.get("clipShape"),m=n.get("clipShape");if(this.syncShapeStyle(p,m,i,l),t.isGroup())for(var x=t.get("children"),_=n.get("children"),T=0;T=c[p]?1:0,_=m>Math.PI?1:0,T=t.convert(f),b=Vd(t,T);if(b>=.5)if(m===2*Math.PI){var F=t.convert({x:(f.x+c.x)/2,y:(f.y+c.y)/2});d.push(["A",b,b,0,_,x,F.x,F.y]),d.push(["A",b,b,0,_,x,T.x,T.y])}else d.push(["A",b,b,0,_,x,T.x,T.y]);return d}(n,i,e)):t.push(qy(f,e));break;case"a":t.push(Ky(f,e));break;default:t.push(f)}}),function w_(e){(0,S.S6)(e,function(r,t){if("a"===r[0].toLowerCase()){var i=e[t-1],l=e[t+1];l&&"a"===l[0].toLowerCase()?i&&"l"===i[0].toLowerCase()&&(i[0]="M"):i&&"a"===i[0].toLowerCase()&&l&&"l"===l[0].toLowerCase()&&(l[0]="M")}})}(t),t}(r,t):function _L(e,r){var t=[];return(0,S.S6)(r,function(n){switch(n[0].toLowerCase()){case"m":case"l":case"c":t.push(qy(n,e));break;case"a":t.push(Ky(n,e));break;default:t.push(n)}}),t}(r,t),t},parsePoint:function(e){return this.coordinate.convert(e)},parsePoints:function(e){var r=this.coordinate;return e.map(function(t){return r.convert(t)})},draw:function(e,r){}},dm={};function il(e,r){var t=(0,S.jC)(e),n=(0,E.pi)((0,E.pi)((0,E.pi)({},o5),r),{geometryType:e});return dm[t]=n,n}function rn(e,r,t){var n=(0,S.jC)(e),i=dm[n],l=(0,E.pi)((0,E.pi)({},s5),t);return i[r]=l,l}function ep(e){var r=(0,S.jC)(e);return dm[r]}function rS(e,r){return(0,S.G)(["color","shape","size","x","y","isInCircle","data","style","defaultStyle","points","mappingData"],function(t){return!(0,S.Xy)(e[t],r[t])})}function Cf(e){return(0,S.kJ)(e)?e:e.split("*")}function nS(e,r){for(var t=[],n=[],i=[],l=new Map,c=0;c=0?n:i<=0?i:0},r.prototype.createAttrOption=function(t,n,i){if((0,S.UM)(n)||(0,S.Kn)(n))(0,S.Kn)(n)&&(0,S.Xy)(Object.keys(n),["values"])?(0,S.t8)(this.attributeOption,t,{fields:n.values}):(0,S.t8)(this.attributeOption,t,n);else{var l={};(0,S.hj)(n)?l.values=[n]:l.fields=Cf(n),i&&((0,S.mf)(i)?l.callback=i:l.values=i),(0,S.t8)(this.attributeOption,t,l)}},r.prototype.initAttributes=function(){var t=this,n=this,i=n.attributes,l=n.attributeOption,c=n.theme,f=n.shapeType;this.groupScales=[];var d={},p=function(_){if(l.hasOwnProperty(_)){var T=l[_];if(!T)return{value:void 0};var b=(0,E.pi)({},T),I=b.callback,F=b.values,B=b.fields,G=(void 0===B?[]:B).map(function(et){var wt=t.scales[et];return!d[et]&&Zu.includes(_)&&"cat"===$d(wt,(0,S.U2)(t.scaleDefs,et),_,t.type)&&(t.groupScales.push(wt),d[et]=!0),wt});b.scales=G,"position"!==_&&1===G.length&&"identity"===G[0].type?b.values=G[0].values:!I&&!F&&("size"===_?b.values=c.sizes:"shape"===_?b.values=c.shapes[f]||[]:"color"===_&&(b.values=G.length?G[0].values.length<=10?c.colors10:c.colors20:c.colors10));var H=YC(_);i[_]=new H(b)}};for(var m in l){var x=p(m);if("object"==typeof x)return x.value}},r.prototype.processData=function(t){var n,i;this.hasSorted=!1;for(var c=this.getAttribute("position").scales.filter(function(Ot){return Ot.isCategory}),f=this.groupData(t),d=[],p=0,m=f.length;pf&&(f=x)}var _=this.scaleDefs,T={};ct.max&&!(0,S.U2)(_,[l,"max"])&&(T.max=f),t.change(T)},r.prototype.beforeMapping=function(t){var n=t;if(this.sortable&&this.sort(n),this.generatePoints)for(var i=0,l=n.length;i1)for(var _=0;_0})}function ym(e,r,t){var n=t.data,i=t.origin,l=t.animateCfg,c=t.coordinate,f=(0,S.U2)(l,"update");e.set("data",n),e.set("origin",i),e.set("animateCfg",l),e.set("coordinate",c),e.set("visible",r.get("visible")),(e.getChildren()||[]).forEach(function(d,p){var m=r.getChildByIndex(p);if(m){d.set("data",n),d.set("origin",i),d.set("animateCfg",l),d.set("coordinate",c);var x=Wy(d,m);f?nl(d,f,{toAttrs:x,coordinate:c}):d.attr(x),m.isGroup()&&ym(d,m,t)}else e.removeChild(d),d.remove(!0)}),(0,S.S6)(r.getChildren(),function(d,p){p>=e.getCount()&&(d.destroyed||e.add(d))})}var mm=function(){function e(r){this.shapesMap={};var n=r.container;this.layout=r.layout,this.container=n}return e.prototype.render=function(r,t,n){return void 0===n&&(n=!1),(0,E.mG)(this,void 0,void 0,function(){var i,l,c,f,d,p,m,x,_=this;return(0,E.Jh)(this,function(T){switch(T.label){case 0:if(i={},l=this.createOffscreenGroup(),!r.length)return[3,2];try{for(c=(0,E.XA)(r),f=c.next();!f.done;f=c.next())(d=f.value)&&(i[d.id]=this.renderLabel(d,l))}catch(b){m={error:b}}finally{try{f&&!f.done&&(x=c.return)&&x.call(c)}finally{if(m)throw m.error}}return[4,this.doLayout(r,t,i)];case 1:T.sent(),this.renderLabelLine(r,i),this.renderLabelBackground(r,i),this.adjustLabel(r,i),T.label=2;case 2:return p=this.shapesMap,(0,S.S6)(i,function(b,I){if(b.destroyed)delete i[I];else{if(p[I]){var F=b.get("data"),B=b.get("origin"),Y=b.get("coordinate"),G=b.get("animateCfg"),H=p[I];ym(H,i[I],{data:F,origin:B,animateCfg:G,coordinate:Y}),i[I]=H}else{if(_.container.destroyed)return;_.container.add(b);var et=(0,S.U2)(b.get("animateCfg"),n?"enter":"appear");et&&nl(b,et,{toAttrs:(0,E.pi)({},b.attr()),coordinate:b.get("coordinate")})}delete p[I]}}),(0,S.S6)(p,function(b){var I=(0,S.U2)(b.get("animateCfg"),"leave");I?nl(b,I,{toAttrs:null,coordinate:b.get("coordinate")}):b.remove(!0)}),this.shapesMap=i,l.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 T,c=r.mappingData,f=r.coordinate,d=r.animate,p=r.content,x={id:r.id,elementId:r.elementId,capture:r.capture,data:r.data,origin:(0,E.pi)((0,E.pi)({},c),{data:c[pn]}),coordinate:f},_=t.addGroup((0,E.pi)({name:"label",animateCfg:!1!==this.animate&&null!==d&&!1!==d&&(0,S.b$)({},this.animate,d)},x));if(p.isGroup&&p.isGroup()||p.isShape&&p.isShape()){var b=p.getCanvasBBox(),I=b.width,F=b.height,B=(0,S.U2)(r,"textAlign","left"),Y=r.x;"center"===B?Y-=I/2:("right"===B||"end"===B)&&(Y-=I),Rc(p,Y,r.y-F/2),T=p,_.add(p)}else{var H=(0,S.U2)(r,["style","fill"]);T=_.addShape("text",(0,E.pi)({attrs:(0,E.pi)((0,E.pi)({x:r.x,y:r.y,textAlign:r.textAlign,textBaseline:(0,S.U2)(r,"textBaseline","middle"),text:r.content},r.style),{fill:(0,S.Ft)(H)?r.color:H})},x))}return r.rotate&&pm(T,r.rotate),_},e.prototype.doLayout=function(r,t,n){return(0,E.mG)(this,void 0,void 0,function(){var i,l=this;return(0,E.Jh)(this,function(c){switch(c.label){case 0:return this.layout?(i=(0,S.kJ)(this.layout)?this.layout:[this.layout],[4,Promise.all(i.map(function(f){var d=function a5(e){return eS[e.toLowerCase()]}((0,S.U2)(f,"type",""));if(d){var p=[],m=[];return(0,S.S6)(n,function(x,_){p.push(x),m.push(t[x.get("elementId")])}),d(r,p,m,l.region,f.cfg)}}))]):[3,2];case 1:c.sent(),c.label=2;case 2:return[2]}})})},e.prototype.renderLabelLine=function(r,t){(0,S.S6)(r,function(n){var i=(0,S.U2)(n,"coordinate");if(n&&i){var l=i.getCenter(),c=i.getRadius();if(n.labelLine){var f=(0,S.U2)(n,"labelLine",{}),d=n.id,p=f.path;if(!p){var m=$n(l.x,l.y,c,n.angle);p=[["M",m.x,m.y],["L",n.x,n.y]]}var x=t[d];x.destroyed||x.addShape("path",{capture:!1,attrs:(0,E.pi)({path:p,stroke:n.color?n.color:(0,S.U2)(n,["style","fill"],"#000"),fill:null},f.style),id:d,origin:n.mappingData,data:n.data,coordinate:n.coordinate})}}})},e.prototype.renderLabelBackground=function(r,t){(0,S.S6)(r,function(n){var i=(0,S.U2)(n,"coordinate"),l=(0,S.U2)(n,"background");if(l&&i){var c=n.id,f=t[c];if(!f.destroyed){var d=f.getChildren()[0];if(d){var p=iS(f,n,l.padding),m=p.rotation,x=(0,E._T)(p,["rotation"]),_=f.addShape("rect",{attrs:(0,E.pi)((0,E.pi)({},x),l.style||{}),id:c,origin:n.mappingData,data:n.data,coordinate:n.coordinate});if(_.setZIndex(-1),m){var T=d.getMatrix();_.setMatrix(T)}}}}})},e.prototype.createOffscreenGroup=function(){return new(this.container.getGroupBase())({})},e.prototype.adjustLabel=function(r,t){(0,S.S6)(r,function(n){if(n){var l=t[n.id];if(!l.destroyed){var c=l.findAll(function(f){return"path"!==f.get("type")});(0,S.S6)(c,function(f){f&&(n.offsetX&&f.attr("x",f.attr("x")+n.offsetX),n.offsetY&&f.attr("y",f.attr("y")+n.offsetY))})}}})},e}();const aS=mm;function xm(e){var r=0;return(0,S.S6)(e,function(t){r+=t}),r/e.length}var v5=function(){function e(r){this.geometry=r}return e.prototype.getLabelItems=function(r){var t=this,n=[],i=this.getLabelCfgs(r);return(0,S.S6)(r,function(l,c){var f=i[c];if(!f||(0,S.UM)(l.x)||(0,S.UM)(l.y))n.push(null);else{var d=(0,S.kJ)(f.content)?f.content:[f.content];f.content=d;var p=d.length;(0,S.S6)(d,function(m,x){if((0,S.UM)(m)||""===m)n.push(null);else{var _=(0,E.pi)((0,E.pi)({},f),t.getLabelPoint(f,l,x));_.textAlign||(_.textAlign=t.getLabelAlign(_,x,p)),_.offset<=0&&(_.labelLine=null),n.push(_)}})}}),n},e.prototype.render=function(r,t){return void 0===t&&(t=!1),(0,E.mG)(this,void 0,void 0,function(){var n,i,l;return(0,E.Jh)(this,function(c){switch(c.label){case 0:return n=this.getLabelItems(r),i=this.getLabelsRenderer(),l=this.getGeometryShapes(),[4,i.render(n,l,t)];case 1:return c.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 n=this.geometry,i=n.type,l=n.theme;return"polygon"===i||"interval"===i&&"middle"===t||r<0&&!["line","point","path"].includes(i)?(0,S.U2)(l,"innerLabels",{}):(0,S.U2)(l,"labels",{})},e.prototype.getThemedLabelCfg=function(r){var t=this.geometry,n=this.getDefaultLabelCfg(),i=t.type,l=t.theme;return"polygon"===i||r.offset<0&&!["line","point","path"].includes(i)?(0,S.b$)({},n,l.innerLabels,r):(0,S.b$)({},n,l.labels,r)},e.prototype.setLabelPosition=function(r,t,n,i){},e.prototype.getLabelOffset=function(r){var t=this.getCoordinate(),n=this.getOffsetVector(r);return t.isTransposed?n[0]:n[1]},e.prototype.getLabelOffsetPoint=function(r,t,n){var i=r.offset,c=this.getCoordinate().isTransposed,d=c?1:-1,p={x:0,y:0};return p[c?"x":"y"]=t>0||1===n?i*d:i*d*-1,p},e.prototype.getLabelPoint=function(r,t,n){var i=this.getCoordinate(),l=r.content.length;function c(F,B,Y){void 0===Y&&(Y=!1);var G=F;return(0,S.kJ)(G)&&(G=1===r.content.length?Y?xm(G):G.length<=2?G[F.length-1]:xm(G):G[B]),G}var f={content:r.content[n],x:0,y:0,start:{x:0,y:0},color:"#fff"},d=(0,S.kJ)(t.shape)?t.shape[0]:t.shape,p="funnel"===d||"pyramid"===d;if("polygon"===this.geometry.type){var m=function v_(e,r){if((0,S.hj)(e)&&(0,S.hj)(r))return[e,r];if(cu(e)||cu(r))return[f_(e),f_(r)];for(var l,f,t=-1,n=0,i=0,c=e.length-1,d=0;++t1&&0===t&&("right"===i?i="left":"left"===i&&(i="right"))}return i},e.prototype.getLabelId=function(r){var t=this.geometry,n=t.type,i=t.getXScale(),l=t.getYScale(),c=r[pn],f=t.getElementId(r);return"line"===n||"area"===n?f+=" ".concat(c[i.field]):"path"===n&&(f+=" ".concat(c[i.field],"-").concat(c[l.field])),f},e.prototype.getLabelsRenderer=function(){var r=this.geometry,i=r.canvasRegion,l=r.animateOption,c=this.geometry.coordinate,f=this.labelsRenderer;return f||(f=new aS({container:r.labelsContainer,layout:(0,S.U2)(r.labelOption,["cfg","layout"],{type:this.defaultLayout})}),this.labelsRenderer=f),f.region=i,f.animate=!!l&&fm("label",c),f},e.prototype.getLabelCfgs=function(r){var t=this,n=this.geometry,i=n.labelOption,l=n.scales,c=n.coordinate,d=i.fields,p=i.callback,m=i.cfg,x=d.map(function(T){return l[T]}),_=[];return(0,S.S6)(r,function(T,b){var B,I=T[pn],F=t.getLabelText(I,x);if(p){var Y=d.map(function(Ot){return I[Ot]});if(B=p.apply(void 0,(0,E.ev)([],(0,E.CR)(Y),!1)),(0,S.UM)(B))return void _.push(null)}var G=(0,E.pi)((0,E.pi)({id:t.getLabelId(T),elementId:t.geometry.getElementId(T),data:I,mappingData:T,coordinate:c},m),B);(0,S.mf)(G.position)&&(G.position=G.position(I,T,b));var H=t.getLabelOffset(G.offset||0),et=t.getDefaultLabelCfg(H,G.position);(G=(0,S.b$)({},et,G)).offset=t.getLabelOffset(G.offset||0);var wt=G.content;(0,S.mf)(wt)?G.content=wt(I,T,b):(0,S.o8)(wt)&&(G.content=F[0]),_.push(G)}),_},e.prototype.getLabelText=function(r,t){var n=[];return(0,S.S6)(t,function(i){var l=r[i.field];l=(0,S.kJ)(l)?l.map(function(c){return i.getText(c)}):i.getText(l),(0,S.UM)(l)||""===l?n.push(null):n.push(l)}),n},e.prototype.getOffsetVector=function(r){void 0===r&&(r=0);var t=this.getCoordinate(),n=0;return(0,S.hj)(r)&&(n=r),t.isTransposed?t.applyMatrix(n,0):t.applyMatrix(0,n)},e.prototype.getGeometryShapes=function(){var r=this.geometry,t={};return(0,S.S6)(r.elementsMap,function(n,i){t[i]=n.shape}),(0,S.S6)(r.getOffscreenGroup().getChildren(),function(n){var i=r.getElementId(n.get("origin").mappingData);t[i]=n}),t},e}();const _f=v5;function Sf(e,r,t){if(!e)return t;var n;if(e.callback&&e.callback.length>1){var i=Array(e.callback.length-1).fill("");n=e.mapping.apply(e,(0,E.ev)([r],(0,E.CR)(i),!1)).join("")}else n=e.mapping(r).join("");return n||t}var Cu={hexagon:function(e,r,t){var n=t/2*Math.sqrt(3);return[["M",e,r-t],["L",e+n,r-t/2],["L",e+n,r+t/2],["L",e,r+t],["L",e-n,r+t/2],["L",e-n,r-t/2],["Z"]]},bowtie:function(e,r,t){var n=t-1.5;return[["M",e-t,r-n],["L",e+t,r+n],["L",e+t,r-n],["L",e-t,r+n],["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]]}},d5=["line","cross","tick","plus","hyphen"];function sS(e){var r=e.symbol;(0,S.HD)(r)&&Cu[r]&&(e.symbol=Cu[r])}function np(e){return e.startsWith(Ge.LEFT)||e.startsWith(Ge.RIGHT)?"vertical":"horizontal"}function Yr(e,r,t,n,i){var l=t.getScale(t.type);if(l.isCategory){var c=l.field,f=r.getAttribute("color"),d=r.getAttribute("shape"),p=e.getTheme().defaultColor,m=r.coordinate.isPolar;return l.getTicks().map(function(x,_){var T,F=x.text,B=l.invert(x.value),Y=0===e.filterFieldData(c,[(T={},T[c]=B,T)]).length;(0,S.S6)(e.views,function(Ot){var $t;Ot.filterFieldData(c,[($t={},$t[c]=B,$t)]).length||(Y=!0)});var G=Sf(f,B,p),H=Sf(d,B,"point"),et=r.getShapeMarker(H,{color:G,isInPolar:m}),wt=i;return(0,S.mf)(wt)&&(wt=wt(F,_,(0,E.pi)({name:F,value:B},(0,S.b$)({},n,et)))),function Cm(e,r){var t=e.symbol;if((0,S.HD)(t)&&-1!==d5.indexOf(t)){var n=(0,S.U2)(e,"style",{}),i=(0,S.U2)(n,"lineWidth",1);e.style=(0,S.b$)({},e.style,{lineWidth:i,stroke:n.stroke||n.fill||r,fill:null})}}(et=(0,S.b$)({},n,et,ca((0,E.pi)({},wt),["style"])),G),wt&&wt.style&&(et.style=function oS(e,r){return(0,S.mf)(r)?r(e):(0,S.b$)({},e,r)}(et.style,wt.style)),sS(et),{id:B,name:F,value:B,marker:et,unchecked:Y}})}return[]}function wm(e,r){var t=(0,S.U2)(e,["components","legend"],{});return(0,S.b$)({},(0,S.U2)(t,["common"],{}),(0,S.b$)({},(0,S.U2)(t,[r],{})))}function ip(e){return!e&&(null==e||isNaN(e))}function lS(e){if((0,S.kJ)(e))return ip(e[1].y);var r=e.y;return(0,S.kJ)(r)?ip(r[0]):ip(r)}function ap(e,r,t){if(void 0===r&&(r=!1),void 0===t&&(t=!0),!e.length||1===e.length&&!t)return[];if(r){for(var n=[],i=0,l=e.length;i=e&&i<=e+t&&l>=r&&l<=r+n}function ms(e,r){return!(r.minX>e.maxX||r.maxXe.maxY||r.maxY=0&&i<.5*Math.PI?(f={x:c.minX,y:c.minY},d={x:c.maxX,y:c.maxY}):.5*Math.PI<=i&&i1&&(t*=Math.sqrt(T),n*=Math.sqrt(T));var b=t*t*(_*_)+n*n*(x*x),I=b?Math.sqrt((t*t*(n*n)-b)/b):1;l===c&&(I*=-1),isNaN(I)&&(I=0);var F=n?I*t*_/n:0,B=t?I*-n*x/t:0,Y=(f+p)/2+Math.cos(i)*F-Math.sin(i)*B,G=(d+m)/2+Math.sin(i)*F+Math.cos(i)*B,H=[(x-F)/t,(_-B)/n],et=[(-1*x-F)/t,(-1*_-B)/n],wt=gS([1,0],H),Ot=gS(H,et);return Mf(H,et)<=-1&&(Ot=Math.PI),Mf(H,et)>=1&&(Ot=0),0===c&&Ot>0&&(Ot-=2*Math.PI),1===c&&Ot<0&&(Ot+=2*Math.PI),{cx:Y,cy:G,rx:Lm(e,[p,m])?0:t,ry:Lm(e,[p,m])?0:n,startAngle:wt,endAngle:wt+Ot,xRotation:i,arcFlag:l,sweepFlag:c}}var cp=Math.sin,Tf=Math.cos,Om=Math.atan2,hp=Math.PI;function yS(e,r,t,n,i,l,c){var f=r.stroke,d=r.lineWidth,x=Om(n-l,t-i),_=new Su({type:"path",canvas:e.get("canvas"),isArrowShape:!0,attrs:{path:"M"+10*Tf(hp/6)+","+10*cp(hp/6)+" L0,0 L"+10*Tf(hp/6)+",-"+10*cp(hp/6),stroke:f,lineWidth:d}});_.translate(i,l),_.rotateAtPoint(i,l,x),e.set(c?"startArrowShape":"endArrowShape",_)}function mS(e,r,t,n,i,l,c){var p=r.stroke,m=r.lineWidth,x=c?r.startArrow:r.endArrow,_=x.d,T=x.fill,b=x.stroke,I=x.lineWidth,F=(0,E._T)(x,["d","fill","stroke","lineWidth"]),G=Om(n-l,t-i);_&&(i-=Tf(G)*_,l-=cp(G)*_);var H=new Su({type:"path",canvas:e.get("canvas"),isArrowShape:!0,attrs:(0,E.pi)((0,E.pi)({},F),{stroke:b||p,lineWidth:I||m,fill:T})});H.translate(i,l),H.rotateAtPoint(i,l,G),e.set(c?"startArrowShape":"endArrowShape",H)}function xs(e,r,t,n,i){var l=Om(n-r,t-e);return{dx:Tf(l)*i,dy:cp(l)*i}}function Rm(e,r,t,n,i,l){"object"==typeof r.startArrow?mS(e,r,t,n,i,l,!0):r.startArrow?yS(e,r,t,n,i,l,!0):e.set("startArrowShape",null)}function _u(e,r,t,n,i,l){"object"==typeof r.endArrow?mS(e,r,t,n,i,l,!1):r.endArrow?yS(e,r,t,n,i,l,!1):e.set("startArrowShape",null)}var xS={fill:"fillStyle",stroke:"strokeStyle",opacity:"globalAlpha"};function ll(e,r){var t=r.attr();for(var n in t){var i=t[n],l=xS[n]?xS[n]:n;"matrix"===l&&i?e.transform(i[0],i[1],i[3],i[4],i[6],i[7]):"lineDash"===l&&e.setLineDash?(0,S.kJ)(i)&&e.setLineDash(i):("strokeStyle"===l||"fillStyle"===l?i=sp(e,r,i):"globalAlpha"===l&&(i*=e.globalAlpha),e[l]=i)}}function _n(e,r,t){for(var n=0;net?H:et,Se=H>et?1:H/et,Pe=H>et?et/H:1;r.translate(Y,G),r.rotate($t),r.scale(Se,Pe),r.arc(0,0,le,wt,Ot,1-ge),r.scale(1/Se,1/Pe),r.rotate(-$t),r.translate(-Y,-G)}break;case"Z":r.closePath()}if("Z"===_)f=d;else{var or=x.length;f=[x[or-2],x[or-1]]}}}}function _S(e,r){var t=e.get("canvas");t&&("remove"===r&&(e._cacheCanvasBBox=e.get("cacheCanvasBBox")),e.get("hasChanged")||(e.set("hasChanged",!0),e.cfg.parent&&e.cfg.parent.get("hasChanged")||(t.refreshElement(e,r,t),t.get("autoDraw")&&t.draw())))}var E5=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.onCanvasChange=function(t){_S(this,t)},r.prototype.getShapeBase=function(){return Vt},r.prototype.getGroupBase=function(){return r},r.prototype._applyClip=function(t,n){n&&(t.save(),ll(t,n),n.createPath(t),t.restore(),t.clip(),n._afterDraw())},r.prototype.cacheCanvasBBox=function(){var n=[],i=[];(0,S.S6)(this.cfg.children,function(_){var T=_.cfg.cacheCanvasBBox;T&&_.cfg.isInView&&(n.push(T.minX,T.maxX),i.push(T.minY,T.maxY))});var l=null;if(n.length){var c=(0,S.VV)(n),f=(0,S.Fp)(n),d=(0,S.VV)(i),p=(0,S.Fp)(i);l={minX:c,minY:d,x:c,y:d,maxX:f,maxY:p,width:f-c,height:p-d};var m=this.cfg.canvas;if(m){var x=m.getViewRange();this.set("isInView",ms(l,x))}}else this.set("isInView",!1);this.set("cacheCanvasBBox",l)},r.prototype.draw=function(t,n){var i=this.cfg.children;i.length&&(!n||this.cfg.refresh)&&(t.save(),ll(t,this),this._applyClip(t,this.getClip()),_n(t,i,n),t.restore(),this.cacheCanvasBBox()),this.cfg.refresh=null,this.set("hasChanged",!1)},r.prototype.skipDraw=function(){this.set("cacheCanvasBBox",null),this.set("hasChanged",!1)},r}(da.AbstractGroup);const $a=E5;var br=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return(0,E.pi)((0,E.pi)({},t),{lineWidth:1,lineAppendWidth:0,strokeOpacity:1,fillOpacity:1})},r.prototype.getShapeBase=function(){return Vt},r.prototype.getGroupBase=function(){return $a},r.prototype.onCanvasChange=function(t){_S(this,t)},r.prototype.calculateBBox=function(){var t=this.get("type"),n=this.getHitLineWidth(),l=(0,da.getBBoxMethod)(t)(this),c=n/2,f=l.x-c,d=l.y-c;return{x:f,minX:f,y:d,minY:d,width:l.width+n,height:l.height+n,maxX:l.x+l.width+c,maxY:l.y+l.height+c}},r.prototype.isFill=function(){return!!this.attrs.fill||this.isClipShape()},r.prototype.isStroke=function(){return!!this.attrs.stroke},r.prototype._applyClip=function(t,n){n&&(t.save(),ll(t,n),n.createPath(t),t.restore(),t.clip(),n._afterDraw())},r.prototype.draw=function(t,n){var i=this.cfg.clipShape;if(n){if(!1===this.cfg.refresh)return void this.set("hasChanged",!1);if(!ms(n,this.getCanvasBBox()))return this.set("hasChanged",!1),void(this.cfg.isInView&&this._afterDraw())}t.save(),ll(t,this),this._applyClip(t,i),this.drawPath(t),t.restore(),this._afterDraw()},r.prototype.getCanvasViewBox=function(){var t=this.cfg.canvas;return t?t.getViewRange():null},r.prototype.cacheCanvasBBox=function(){var t=this.getCanvasViewBox();if(t){var n=this.getCanvasBBox(),i=ms(n,t);this.set("isInView",i),this.set("cacheCanvasBBox",i?n:null)}},r.prototype._afterDraw=function(){this.cacheCanvasBBox(),this.set("hasChanged",!1),this.set("refresh",null)},r.prototype.skipDraw=function(){this.set("cacheCanvasBBox",null),this.set("isInView",null),this.set("hasChanged",!1)},r.prototype.drawPath=function(t){this.createPath(t),this.strokeAndFill(t),this.afterDrawPath(t)},r.prototype.fill=function(t){t.fill()},r.prototype.stroke=function(t){t.stroke()},r.prototype.strokeAndFill=function(t){var n=this.attrs,i=n.lineWidth,l=n.opacity,c=n.strokeOpacity,f=n.fillOpacity;this.isFill()&&((0,S.UM)(f)||1===f?this.fill(t):(t.globalAlpha=f,this.fill(t),t.globalAlpha=l)),this.isStroke()&&i>0&&(!(0,S.UM)(c)&&1!==c&&(t.globalAlpha=c),this.stroke(t)),this.afterDrawPath(t)},r.prototype.createPath=function(t){},r.prototype.afterDrawPath=function(t){},r.prototype.isInShape=function(t,n){var i=this.isStroke(),l=this.isFill(),c=this.getHitLineWidth();return this.isInStrokeOrPath(t,n,i,l,c)},r.prototype.isInStrokeOrPath=function(t,n,i,l,c){return!1},r.prototype.getHitLineWidth=function(){if(!this.isStroke())return 0;var t=this.attrs;return t.lineWidth+t.lineAppendWidth},r}(da.AbstractShape);const ho=br;var L5=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return(0,E.pi)((0,E.pi)({},t),{x:0,y:0,r:0})},r.prototype.isInStrokeOrPath=function(t,n,i,l,c){var f=this.attr(),m=f.r,x=c/2,_=vS(f.x,f.y,t,n);return l&&i?_<=m+x:l?_<=m:!!i&&_>=m-x&&_<=m+x},r.prototype.createPath=function(t){var n=this.attr(),i=n.x,l=n.y,c=n.r;t.beginPath(),t.arc(i,l,c,0,2*Math.PI,!1),t.closePath()},r}(ho);const SS=L5;function Fc(e,r,t,n){return e/(t*t)+r/(n*n)}var I5=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return(0,E.pi)((0,E.pi)({},t),{x:0,y:0,rx:0,ry:0})},r.prototype.isInStrokeOrPath=function(t,n,i,l,c){var f=this.attr(),d=c/2,p=f.x,m=f.y,x=f.rx,_=f.ry,T=(t-p)*(t-p),b=(n-m)*(n-m);return l&&i?Fc(T,b,x+d,_+d)<=1:l?Fc(T,b,x,_)<=1:!!i&&Fc(T,b,x-d,_-d)>=1&&Fc(T,b,x+d,_+d)<=1},r.prototype.createPath=function(t){var n=this.attr(),i=n.x,l=n.y,c=n.rx,f=n.ry;if(t.beginPath(),t.ellipse)t.ellipse(i,l,c,f,0,0,2*Math.PI,!1);else{var d=c>f?c:f,p=c>f?1:c/f,m=c>f?f/c:1;t.save(),t.translate(i,l),t.scale(p,m),t.arc(0,0,d,0,2*Math.PI),t.restore(),t.closePath()}},r}(ho);const MS=I5;function Dm(e){return e instanceof HTMLElement&&(0,S.HD)(e.nodeName)&&"CANVAS"===e.nodeName.toUpperCase()}var TS=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return(0,E.pi)((0,E.pi)({},t),{x:0,y:0,width:0,height:0})},r.prototype.initAttrs=function(t){this._setImage(t.img)},r.prototype.isStroke=function(){return!1},r.prototype.isOnlyHitBox=function(){return!0},r.prototype._afterLoading=function(){if(!0===this.get("toDraw")){var t=this.get("canvas");t?t.draw():this.createPath(this.get("context"))}},r.prototype._setImage=function(t){var n=this,i=this.attrs;if((0,S.HD)(t)){var l=new Image;l.onload=function(){if(n.destroyed)return!1;n.attr("img",l),n.set("loading",!1),n._afterLoading();var c=n.get("callback");c&&c.call(n)},l.crossOrigin="Anonymous",l.src=t,this.set("loading",!0)}else t instanceof Image?(i.width||(i.width=t.width),i.height||(i.height=t.height)):Dm(t)&&(i.width||(i.width=Number(t.getAttribute("width"))),i.height||Number(t.getAttribute("height")))},r.prototype.onAttrChange=function(t,n,i){e.prototype.onAttrChange.call(this,t,n,i),"img"===t&&this._setImage(n)},r.prototype.createPath=function(t){if(this.get("loading"))return this.set("toDraw",!0),void this.set("context",t);var n=this.attr(),i=n.x,l=n.y,c=n.width,f=n.height,d=n.sx,p=n.sy,m=n.swidth,x=n.sheight,_=n.img;(_ instanceof Image||Dm(_))&&((0,S.UM)(d)||(0,S.UM)(p)||(0,S.UM)(m)||(0,S.UM)(x)?t.drawImage(_,i,l,c,f):t.drawImage(_,d,p,m,x,i,l,c,f))},r}(ho);const O5=TS;function ul(e,r,t,n,i,l,c){var f=Math.min(e,t),d=Math.max(e,t),p=Math.min(r,n),m=Math.max(r,n),x=i/2;return l>=f-x&&l<=d+x&&c>=p-x&&c<=m+x&&Ln.x1.pointToLine(e,r,t,n,l,c)<=i/2}var R5=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return(0,E.pi)((0,E.pi)({},t),{x1:0,y1:0,x2:0,y2:0,startArrow:!1,endArrow:!1})},r.prototype.initAttrs=function(t){this.setArrow()},r.prototype.onAttrChange=function(t,n,i){e.prototype.onAttrChange.call(this,t,n,i),this.setArrow()},r.prototype.setArrow=function(){var t=this.attr(),n=t.x1,i=t.y1,l=t.x2,c=t.y2,d=t.endArrow;t.startArrow&&Rm(this,t,l,c,n,i),d&&_u(this,t,n,i,l,c)},r.prototype.isInStrokeOrPath=function(t,n,i,l,c){if(!i||!c)return!1;var f=this.attr();return ul(f.x1,f.y1,f.x2,f.y2,c,t,n)},r.prototype.createPath=function(t){var n=this.attr(),i=n.x1,l=n.y1,c=n.x2,f=n.y2,d=n.startArrow,p=n.endArrow,m={dx:0,dy:0},x={dx:0,dy:0};d&&d.d&&(m=xs(i,l,c,f,n.startArrow.d)),p&&p.d&&(x=xs(i,l,c,f,n.endArrow.d)),t.beginPath(),t.moveTo(i+m.dx,l+m.dy),t.lineTo(c-x.dx,f-x.dy)},r.prototype.afterDrawPath=function(t){var n=this.get("startArrowShape"),i=this.get("endArrowShape");n&&n.draw(t),i&&i.draw(t)},r.prototype.getTotalLength=function(){var t=this.attr();return Ln.x1.length(t.x1,t.y1,t.x2,t.y2)},r.prototype.getPoint=function(t){var n=this.attr();return Ln.x1.pointAt(n.x1,n.y1,n.x2,n.y2,t)},r}(ho);const F5=R5;var bS={circle:function(e,r,t){return[["M",e-t,r],["A",t,t,0,1,0,e+t,r],["A",t,t,0,1,0,e-t,r]]},square:function(e,r,t){return[["M",e-t,r-t],["L",e+t,r-t],["L",e+t,r+t],["L",e-t,r+t],["Z"]]},diamond:function(e,r,t){return[["M",e-t,r],["L",e,r-t],["L",e+t,r],["L",e,r+t],["Z"]]},triangle:function(e,r,t){var n=t*Math.sin(.3333333333333333*Math.PI);return[["M",e-t,r+n],["L",e,r-n],["L",e+t,r+n],["Z"]]},"triangle-down":function(e,r,t){var n=t*Math.sin(.3333333333333333*Math.PI);return[["M",e-t,r-n],["L",e+t,r-n],["L",e,r+n],["Z"]]}},D5=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.initAttrs=function(t){this._resetParamsCache()},r.prototype._resetParamsCache=function(){this.set("paramsCache",{})},r.prototype.onAttrChange=function(t,n,i){e.prototype.onAttrChange.call(this,t,n,i),-1!==["symbol","x","y","r","radius"].indexOf(t)&&this._resetParamsCache()},r.prototype.isOnlyHitBox=function(){return!0},r.prototype._getR=function(t){return(0,S.UM)(t.r)?t.radius:t.r},r.prototype._getPath=function(){var f,d,t=this.attr(),n=t.x,i=t.y,l=t.symbol||"circle",c=this._getR(t);if((0,S.mf)(l))d=(f=l)(n,i,c),d=(0,Io.wb)(d);else{if(!(f=r.Symbols[l]))return console.warn(l+" marker is not supported."),null;d=f(n,i,c)}return d},r.prototype.createPath=function(t){wS(this,t,{path:this._getPath()},this.get("paramsCache"))},r.Symbols=bS,r}(ho);const AS=D5;function ES(e,r,t){var n=(0,da.getOffScreenContext)();return e.createPath(n),n.isPointInPath(r,t)}var LS=1e-6;function Bm(e){return Math.abs(e)0!=Bm(f[1]-t)>0&&Bm(r-(t-c[1])*(c[0]-f[0])/(c[1]-f[1])-c[0])<0&&(n=!n)}return n}function Dc(e,r,t,n,i,l,c,f){var d=(Math.atan2(f-r,c-e)+2*Math.PI)%(2*Math.PI);if(di)return!1;var p={x:e+t*Math.cos(d),y:r+t*Math.sin(d)};return vS(p.x,p.y,c,f)<=l/2}var P5=Zr.vs;const dp=(0,E.pi)({hasArc:function Pm(e){for(var r=!1,t=e.length,n=0;n0&&n.push(i),{polygons:t,polylines:n}},isPointInStroke:function OS(e,r,t,n,i){for(var l=!1,c=r/2,f=0;fG?Y:G;Zh(Ot,Ot,P5(null,[["t",-I.cx,-I.cy],["r",-I.xRotation],["s",1/(Y>G?1:Y/G),1/(Y>G?G/Y:1)]])),l=Dc(0,0,$t,H,et,r,Ot[0],Ot[1])}if(l)break}}return l}},da.PathUtil);function km(e,r,t){for(var n=!1,i=0;i=m[0]&&t<=m[1]&&(i=(t-m[0])/(m[1]-m[0]),l=x)});var f=c[l];if((0,S.UM)(f)||(0,S.UM)(l))return null;var d=f.length,p=c[l+1];return Ln.Ll.pointAt(f[d-2],f[d-1],p[1],p[2],p[3],p[4],p[5],p[6],i)},r.prototype._calculateCurve=function(){var t=this.attr().path;this.set("curve",dp.pathToCurve(t))},r.prototype._setTcache=function(){var l,c,f,d,t=0,n=0,i=[],p=this.get("curve");if(p){if((0,S.S6)(p,function(m,x){d=m.length,(f=p[x+1])&&(t+=Ln.Ll.length(m[d-2],m[d-1],f[1],f[2],f[3],f[4],f[5],f[6])||0)}),this.set("totalLength",t),0===t)return void this.set("tCache",[]);(0,S.S6)(p,function(m,x){d=m.length,(f=p[x+1])&&((l=[])[0]=n/t,c=Ln.Ll.length(m[d-2],m[d-1],f[1],f[2],f[3],f[4],f[5],f[6]),l[1]=(n+=c||0)/t,i.push(l))}),this.set("tCache",i)}},r.prototype.getStartTangent=function(){var n,t=this.getSegments();if(t.length>1){var i=t[0].currentPoint,l=t[1].currentPoint,c=t[1].startTangent;n=[],c?(n.push([i[0]-c[0],i[1]-c[1]]),n.push([i[0],i[1]])):(n.push([l[0],l[1]]),n.push([i[0],i[1]]))}return n},r.prototype.getEndTangent=function(){var i,t=this.getSegments(),n=t.length;if(n>1){var l=t[n-2].currentPoint,c=t[n-1].currentPoint,f=t[n-1].endTangent;i=[],f?(i.push([c[0]-f[0],c[1]-f[1]]),i.push([c[0],c[1]])):(i.push([l[0],l[1]]),i.push([c[0],c[1]]))}return i},r}(ho);const Su=z5;function RS(e,r,t,n,i){var l=e.length;if(l<2)return!1;for(var c=0;c=f[0]&&t<=f[1]&&(l=(t-f[0])/(f[1]-f[0]),c=d)}),Ln.x1.pointAt(n[c][0],n[c][1],n[c+1][0],n[c+1][1],l)},r.prototype._setTcache=function(){var t=this.attr().points;if(t&&0!==t.length){var n=this.getTotalLength();if(!(n<=0)){var c,f,i=0,l=[];(0,S.S6)(t,function(d,p){t[p+1]&&((c=[])[0]=i/n,f=Ln.x1.length(d[0],d[1],t[p+1][0],t[p+1][1]),c[1]=(i+=f)/n,l.push(c))}),this.set("tCache",l)}}},r.prototype.getStartTangent=function(){var t=this.attr().points,n=[];return n.push([t[1][0],t[1][1]]),n.push([t[0][0],t[0][1]]),n},r.prototype.getEndTangent=function(){var t=this.attr().points,n=t.length-1,i=[];return i.push([t[n-1][0],t[n-1][1]]),i.push([t[n][0],t[n][1]]),i},r}(ho);const DS=H5;var G5=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return(0,E.pi)((0,E.pi)({},t),{x:0,y:0,width:0,height:0,radius:0})},r.prototype.isInStrokeOrPath=function(t,n,i,l,c){var f=this.attr(),d=f.x,p=f.y,m=f.width,x=f.height,_=f.radius;if(_){var b=!1;return i&&(b=function BS(e,r,t,n,i,l,c,f){return ul(e+i,r,e+t-i,r,l,c,f)||ul(e+t,r+i,e+t,r+n-i,l,c,f)||ul(e+t-i,r+n,e+i,r+n,l,c,f)||ul(e,r+n-i,e,r+i,l,c,f)||Dc(e+t-i,r+i,i,1.5*Math.PI,2*Math.PI,l,c,f)||Dc(e+t-i,r+n-i,i,0,.5*Math.PI,l,c,f)||Dc(e+i,r+n-i,i,.5*Math.PI,Math.PI,l,c,f)||Dc(e+i,r+i,i,Math.PI,1.5*Math.PI,l,c,f)}(d,p,m,x,_,c,t,n)),!b&&l&&(b=ES(this,t,n)),b}var T=c/2;return l&&i?wu(d-T,p-T,m+T,x+T,t,n):l?wu(d,p,m,x,t,n):i?function Cs(e,r,t,n,i,l,c){var f=i/2;return wu(e-f,r-f,t,i,l,c)||wu(e+t-f,r-f,i,n,l,c)||wu(e+f,r+n-f,t,i,l,c)||wu(e-f,r+f,i,n,l,c)}(d,p,m,x,c,t,n):void 0},r.prototype.createPath=function(t){var n=this.attr(),i=n.x,l=n.y,c=n.width,f=n.height,d=n.radius;if(t.beginPath(),0===d)t.rect(i,l,c,f);else{var p=function pS(e){var r=0,t=0,n=0,i=0;return(0,S.kJ)(e)?1===e.length?r=t=n=i=e[0]:2===e.length?(r=n=e[0],t=i=e[1]):3===e.length?(r=e[0],t=i=e[1],n=e[2]):(r=e[0],t=e[1],n=e[2],i=e[3]):r=t=n=i=e,[r,t,n,i]}(d),m=p[0],x=p[1],_=p[2],T=p[3];t.moveTo(i+m,l),t.lineTo(i+c-x,l),0!==x&&t.arc(i+c-x,l+x,x,-Math.PI/2,0),t.lineTo(i+c,l+f-_),0!==_&&t.arc(i+c-_,l+f-_,_,0,Math.PI/2),t.lineTo(i+T,l+f),0!==T&&t.arc(i+T,l+f-T,T,Math.PI/2,Math.PI),t.lineTo(i,l+m),0!==m&&t.arc(i+m,l+m,m,Math.PI,1.5*Math.PI),t.closePath()}},r}(ho);const Bc=G5;var Y5=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return(0,E.pi)((0,E.pi)({},t),{x:0,y:0,text:null,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom"})},r.prototype.isOnlyHitBox=function(){return!0},r.prototype.initAttrs=function(t){this._assembleFont(),t.text&&this._setText(t.text)},r.prototype._assembleFont=function(){var t=this.attrs;t.font=(0,da.assembleFont)(t)},r.prototype._setText=function(t){var n=null;(0,S.HD)(t)&&-1!==t.indexOf("\n")&&(n=t.split("\n")),this.set("textArr",n)},r.prototype.onAttrChange=function(t,n,i){e.prototype.onAttrChange.call(this,t,n,i),t.startsWith("font")&&this._assembleFont(),"text"===t&&this._setText(n)},r.prototype._getSpaceingY=function(){var t=this.attrs,n=t.lineHeight,i=1*t.fontSize;return n?n-i:.14*i},r.prototype._drawTextArr=function(t,n,i){var _,l=this.attrs,c=l.textBaseline,f=l.x,d=l.y,p=1*l.fontSize,m=this._getSpaceingY(),x=(0,da.getTextHeight)(l.text,l.fontSize,l.lineHeight);(0,S.S6)(n,function(T,b){_=d+b*(m+p)-x+p,"middle"===c&&(_+=x-p-(x-p)/2),"top"===c&&(_+=x-p),(0,S.UM)(T)||(i?t.fillText(T,f,_):t.strokeText(T,f,_))})},r.prototype._drawText=function(t,n){var i=this.attr(),l=i.x,c=i.y,f=this.get("textArr");if(f)this._drawTextArr(t,f,n);else{var d=i.text;(0,S.UM)(d)||(n?t.fillText(d,l,c):t.strokeText(d,l,c))}},r.prototype.strokeAndFill=function(t){var n=this.attrs,i=n.lineWidth,l=n.opacity,c=n.strokeOpacity,f=n.fillOpacity;this.isStroke()&&i>0&&(!(0,S.UM)(c)&&1!==c&&(t.globalAlpha=l),this.stroke(t)),this.isFill()&&((0,S.UM)(f)||1===f?this.fill(t):(t.globalAlpha=f,this.fill(t),t.globalAlpha=l)),this.afterDrawPath(t)},r.prototype.fill=function(t){this._drawText(t,!0)},r.prototype.stroke=function(t){this._drawText(t,!1)},r}(ho);const ai=Y5;function kS(e,r,t){var n=e.getTotalMatrix();if(n){var i=function PS(e,r){if(r){var t=(0,da.invert)(r);return(0,da.multiplyVec2)(t,e)}return e}([r,t,1],n);return[i[0],i[1]]}return[r,t]}function zS(e,r,t){if(e.isCanvas&&e.isCanvas())return!0;if(!(0,da.isAllowCapture)(e)||!1===e.cfg.isInView)return!1;if(e.cfg.clipShape){var n=kS(e,r,t);if(e.isClipped(n[0],n[1]))return!1}var c=e.cfg.cacheCanvasBBox||e.getCanvasBBox();return r>=c.minX&&r<=c.maxX&&t>=c.minY&&t<=c.maxY}function NS(e,r,t){if(!zS(e,r,t))return null;for(var n=null,i=e.getChildren(),c=i.length-1;c>=0;c--){var f=i[c];if(f.isGroup())n=NS(f,r,t);else if(zS(f,r,t)){var d=f,p=kS(f,r,t);d.isInShape(p[0],p[1])&&(n=f)}if(n)break}return n}var HS=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return t.renderer="canvas",t.autoDraw=!0,t.localRefresh=!0,t.refreshElements=[],t.clipView=!0,t.quickHit=!1,t},r.prototype.onCanvasChange=function(t){("attr"===t||"sort"===t||"changeSize"===t)&&(this.set("refreshElements",[this]),this.draw())},r.prototype.getShapeBase=function(){return Vt},r.prototype.getGroupBase=function(){return $a},r.prototype.getPixelRatio=function(){var t=this.get("pixelRatio")||function m5(){return window?window.devicePixelRatio:1}();return t>=1?Math.ceil(t):1},r.prototype.getViewRange=function(){return{minX:0,minY:0,maxX:this.cfg.width,maxY:this.cfg.height}},r.prototype.createDom=function(){var t=document.createElement("canvas"),n=t.getContext("2d");return this.set("context",n),t},r.prototype.setDOMSize=function(t,n){e.prototype.setDOMSize.call(this,t,n);var i=this.get("context"),l=this.get("el"),c=this.getPixelRatio();l.width=c*t,l.height=c*n,c>1&&i.scale(c,c)},r.prototype.clear=function(){e.prototype.clear.call(this),this._clearFrame();var t=this.get("context"),n=this.get("el");t.clearRect(0,0,n.width,n.height)},r.prototype.getShape=function(t,n){return this.get("quickHit")?NS(this,t,n):e.prototype.getShape.call(this,t,n,null)},r.prototype._getRefreshRegion=function(){var i,t=this.get("refreshElements"),n=this.getViewRange();return t.length&&t[0]===this?i=n:(i=function vp(e){if(!e.length)return null;var r=[],t=[],n=[],i=[];return(0,S.S6)(e,function(l){var c=function b5(e){var r;if(e.destroyed)r=e._cacheCanvasBBox;else{var t=e.get("cacheCanvasBBox"),n=t&&!(!t.width||!t.height),i=e.getCanvasBBox(),l=i&&!(!i.width||!i.height);n&&l?r=function x5(e,r){return e&&r?{minX:Math.min(e.minX,r.minX),minY:Math.min(e.minY,r.minY),maxX:Math.max(e.maxX,r.maxX),maxY:Math.max(e.maxY,r.maxY)}:e||r}(t,i):n?r=t:l&&(r=i)}return r}(l);c&&(r.push(c.minX),t.push(c.minY),n.push(c.maxX),i.push(c.maxY))}),{minX:(0,S.VV)(r),minY:(0,S.VV)(t),maxX:(0,S.Fp)(n),maxY:(0,S.Fp)(i)}}(t),i&&(i.minX=Math.floor(i.minX),i.minY=Math.floor(i.minY),i.maxX=Math.ceil(i.maxX),i.maxY=Math.ceil(i.maxY),i.maxY+=1,this.get("clipView")&&(i=function A5(e,r){return e&&r&&ms(e,r)?{minX:Math.max(e.minX,r.minX),minY:Math.max(e.minY,r.minY),maxX:Math.min(e.maxX,r.maxX),maxY:Math.min(e.maxY,r.maxY)}:null}(i,n)))),i},r.prototype.refreshElement=function(t){this.get("refreshElements").push(t)},r.prototype._clearFrame=function(){var t=this.get("drawFrame");t&&((0,S.VS)(t),this.set("drawFrame",null),this.set("refreshElements",[]))},r.prototype.draw=function(){var t=this.get("drawFrame");this.get("autoDraw")&&t||this._startDraw()},r.prototype._drawAll=function(){var t=this.get("context"),n=this.get("el"),i=this.getChildren();t.clearRect(0,0,n.width,n.height),ll(t,this),_n(t,i),this.set("refreshElements",[])},r.prototype._drawRegion=function(){var t=this.get("context"),n=this.get("refreshElements"),i=this.getChildren(),l=this._getRefreshRegion();l?(t.clearRect(l.minX,l.minY,l.maxX-l.minX,l.maxY-l.minY),t.save(),t.beginPath(),t.rect(l.minX,l.minY,l.maxX-l.minX,l.maxY-l.minY),t.clip(),ll(t,this),M5(this,i,l),_n(t,i,l),t.restore()):n.length&&CS(n),(0,S.S6)(n,function(c){c.get("hasChanged")&&c.set("hasChanged",!1)}),this.set("refreshElements",[])},r.prototype._startDraw=function(){var t=this,n=this.get("drawFrame");n||(n=(0,S.U7)(function(){t.get("localRefresh")?t._drawRegion():t._drawAll(),t.set("drawFrame",null)}),this.set("drawFrame",n))},r.prototype.skipDraw=function(){},r.prototype.removeDom=function(){var t=this.get("el");t.width=0,t.height=0,t.parentNode.removeChild(t)},r}(da.AbstractCanvas);const W5=HS;var zm="0.5.12",pp=ct(9279),cl={rect:"path",circle:"circle",line:"line",path:"path",marker:"path",text:"text",polyline:"polyline",polygon:"polygon",image:"image",ellipse:"ellipse",dom:"foreignObject"},tn={opacity:"opacity",fillStyle:"fill",fill:"fill",fillOpacity:"fill-opacity",strokeStyle:"stroke",strokeOpacity:"stroke-opacity",stroke:"stroke",x:"x",y:"y",r:"r",rx:"rx",ry:"ry",width:"width",height:"height",x1:"x1",x2:"x2",y1:"y1",y2:"y2",lineCap:"stroke-linecap",lineJoin:"stroke-linejoin",lineWidth:"stroke-width",lineDash:"stroke-dasharray",lineDashOffset:"stroke-dashoffset",miterLimit:"stroke-miterlimit",font:"font",fontSize:"font-size",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",fontFamily:"font-family",startArrow:"marker-start",endArrow:"marker-end",path:"d",class:"class",id:"id",style:"style",preserveAspectRatio:"preserveAspectRatio"};function Za(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function GS(e){var r=cl[e.type],t=e.getParent();if(!r)throw new Error("the type "+e.type+" is not supported by svg");var n=Za(r);if(e.get("id")&&(n.id=e.get("id")),e.set("el",n),e.set("attrs",{}),t){var i=t.get("el");i||(i=t.createDom(),t.set("el",i)),i.appendChild(n)}return n}function YS(e,r){var t=e.get("el"),n=(0,S.qo)(t.children).sort(r),i=document.createDocumentFragment();n.forEach(function(l){i.appendChild(l)}),t.appendChild(i)}function bf(e){var r=e.attr().matrix;if(r){for(var t=e.cfg.el,n=[],i=0;i<9;i+=3)n.push(r[i]+","+r[i+1]);-1===(n=n.join(",")).indexOf("NaN")?t.setAttribute("transform","matrix("+n+")"):console.warn("invalid matrix:",r)}}function Af(e,r){var t=e.getClip(),n=e.get("el");if(t){if(t&&!n.hasAttribute("clip-path")){GS(t),t.createPath(r);var i=r.addClip(t);n.setAttribute("clip-path","url(#"+i+")")}}else n.removeAttribute("clip-path")}function WS(e,r){r.forEach(function(t){t.draw(e)})}function US(e,r){var t=e.get("canvas");if(t&&t.get("autoDraw")){var n=t.get("context"),i=e.getParent(),l=i?i.getChildren():[t],c=e.get("el");if("remove"===r)if(e.get("isClipShape")){var d=c&&c.parentNode,p=d&&d.parentNode;d&&p&&p.removeChild(d)}else c&&c.parentNode&&c.parentNode.removeChild(c);else if("show"===r)c.setAttribute("visibility","visible");else if("hide"===r)c.setAttribute("visibility","hidden");else if("zIndex"===r)!function U5(e,r){var t=e.parentNode,n=Array.from(t.childNodes).filter(function(f){return 1===f.nodeType&&"defs"!==f.nodeName.toLowerCase()}),i=n[r],l=n.indexOf(e);if(i){if(l>r)t.insertBefore(e,i);else if(l0&&(n?"stroke"in i?this._setColor(t,"stroke",f):"strokeStyle"in i&&this._setColor(t,"stroke",d):this._setColor(t,"stroke",f||d),m&&_.setAttribute(tn.strokeOpacity,m),x&&_.setAttribute(tn.lineWidth,x))},r.prototype._setColor=function(t,n,i){var l=this.get("el");if(i)if(i=i.trim(),/^[r,R,L,l]{1}[\s]*\(/.test(i))(c=t.find("gradient",i))||(c=t.addGradient(i)),l.setAttribute(tn[n],"url(#"+c+")");else if(/^[p,P]{1}[\s]*\(/.test(i)){var c;(c=t.find("pattern",i))||(c=t.addPattern(i)),l.setAttribute(tn[n],"url(#"+c+")")}else l.setAttribute(tn[n],i);else l.setAttribute(tn[n],"none")},r.prototype.shadow=function(t,n){var i=this.attr(),l=n||i;(l.shadowOffsetX||l.shadowOffsetY||l.shadowBlur||l.shadowColor)&&function X5(e,r){var t=e.cfg.el,n=e.attr(),i={dx:n.shadowOffsetX,dy:n.shadowOffsetY,blur:n.shadowBlur,color:n.shadowColor};if(i.dx||i.dy||i.blur||i.color){var l=r.find("filter",i);l||(l=r.addShadow(i)),t.setAttribute("filter","url(#"+l+")")}else t.removeAttribute("filter")}(this,t)},r.prototype.transform=function(t){var n=this.attr();(t||n).matrix&&bf(this)},r.prototype.isInShape=function(t,n){return this.isPointInPath(t,n)},r.prototype.isPointInPath=function(t,n){var i=this.get("el"),c=this.get("canvas").get("el").getBoundingClientRect(),p=document.elementFromPoint(t+c.left,n+c.top);return!(!p||!p.isEqualNode(i))},r.prototype.getHitLineWidth=function(){var t=this.attrs,n=t.lineWidth,i=t.lineAppendWidth;return this.isStroke()?n+i:0},r}(pp.AbstractShape);const qa=$5;var Z5=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="circle",t.canFill=!0,t.canStroke=!0,t}return(0,E.ZT)(r,e),r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return(0,E.pi)((0,E.pi)({},t),{x:0,y:0,r:0})},r.prototype.createPath=function(t,n){var i=this.attr(),l=this.get("el");(0,S.S6)(n||i,function(c,f){"x"===f||"y"===f?l.setAttribute("c"+f,c):tn[f]&&l.setAttribute(tn[f],c)})},r}(qa);const q5=Z5;var K5=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dom",t.canFill=!1,t.canStroke=!1,t}return(0,E.ZT)(r,e),r.prototype.createPath=function(t,n){var i=this.attr(),l=this.get("el");if((0,S.S6)(n||i,function(p,m){tn[m]&&l.setAttribute(tn[m],p)}),"function"==typeof i.html){var c=i.html.call(this,i);if(c instanceof Element||c instanceof HTMLDocument){for(var f=l.childNodes,d=f.length-1;d>=0;d--)l.removeChild(f[d]);l.appendChild(c)}else l.innerHTML=c}else l.innerHTML=i.html},r}(qa);const XS=K5;var Q5=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="ellipse",t.canFill=!0,t.canStroke=!0,t}return(0,E.ZT)(r,e),r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return(0,E.pi)((0,E.pi)({},t),{x:0,y:0,rx:0,ry:0})},r.prototype.createPath=function(t,n){var i=this.attr(),l=this.get("el");(0,S.S6)(n||i,function(c,f){"x"===f||"y"===f?l.setAttribute("c"+f,c):tn[f]&&l.setAttribute(tn[f],c)})},r}(qa);const J5=Q5;var j5=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="image",t.canFill=!1,t.canStroke=!1,t}return(0,E.ZT)(r,e),r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return(0,E.pi)((0,E.pi)({},t),{x:0,y:0,width:0,height:0})},r.prototype.createPath=function(t,n){var i=this,l=this.attr(),c=this.get("el");(0,S.S6)(n||l,function(f,d){"img"===d?i._setImage(l.img):tn[d]&&c.setAttribute(tn[d],f)})},r.prototype.setAttr=function(t,n){this.attrs[t]=n,"img"===t&&this._setImage(n)},r.prototype._setImage=function(t){var n=this.attr(),i=this.get("el");if((0,S.HD)(t))i.setAttribute("href",t);else if(t instanceof window.Image)n.width||(i.setAttribute("width",t.width),this.attr("width",t.width)),n.height||(i.setAttribute("height",t.height),this.attr("height",t.height)),i.setAttribute("href",t.src);else if(t instanceof HTMLElement&&(0,S.HD)(t.nodeName)&&"CANVAS"===t.nodeName.toUpperCase())i.setAttribute("href",t.toDataURL());else if(t instanceof ImageData){var l=document.createElement("canvas");l.setAttribute("width",""+t.width),l.setAttribute("height",""+t.height),l.getContext("2d").putImageData(t,0,0),n.width||(i.setAttribute("width",""+t.width),this.attr("width",t.width)),n.height||(i.setAttribute("height",""+t.height),this.attr("height",t.height)),i.setAttribute("href",l.toDataURL())}},r}(qa);const tI=j5;var VS=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="line",t.canFill=!1,t.canStroke=!0,t}return(0,E.ZT)(r,e),r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return(0,E.pi)((0,E.pi)({},t),{x1:0,y1:0,x2:0,y2:0,startArrow:!1,endArrow:!1})},r.prototype.createPath=function(t,n){var i=this.attr(),l=this.get("el");(0,S.S6)(n||i,function(c,f){if("startArrow"===f||"endArrow"===f)if(c){var d=(0,S.Kn)(c)?t.addArrow(i,tn[f]):t.getDefaultArrow(i,tn[f]);l.setAttribute(tn[f],"url(#"+d+")")}else l.removeAttribute(tn[f]);else tn[f]&&l.setAttribute(tn[f],c)})},r.prototype.getTotalLength=function(){var t=this.attr();return Ln.x1.length(t.x1,t.y1,t.x2,t.y2)},r.prototype.getPoint=function(t){var n=this.attr();return Ln.x1.pointAt(n.x1,n.y1,n.x2,n.y2,t)},r}(qa);const eI=VS;var gp={circle:function(e,r,t){return[["M",e,r],["m",-t,0],["a",t,t,0,1,0,2*t,0],["a",t,t,0,1,0,2*-t,0]]},square:function(e,r,t){return[["M",e-t,r-t],["L",e+t,r-t],["L",e+t,r+t],["L",e-t,r+t],["Z"]]},diamond:function(e,r,t){return[["M",e-t,r],["L",e,r-t],["L",e+t,r],["L",e,r+t],["Z"]]},triangle:function(e,r,t){var n=t*Math.sin(.3333333333333333*Math.PI);return[["M",e-t,r+n],["L",e,r-n],["L",e+t,r+n],["z"]]},triangleDown:function(e,r,t){var n=t*Math.sin(.3333333333333333*Math.PI);return[["M",e-t,r-n],["L",e+t,r-n],["L",e,r+n],["Z"]]}};const $S={get:function(e){return gp[e]},register:function(e,r){gp[e]=r},remove:function(e){delete gp[e]},getAll:function(){return gp}};var rI=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="marker",t.canFill=!0,t.canStroke=!0,t}return(0,E.ZT)(r,e),r.prototype.createPath=function(t){this.get("el").setAttribute("d",this._assembleMarker())},r.prototype._assembleMarker=function(){var t=this._getPath();return(0,S.kJ)(t)?t.map(function(n){return n.join(" ")}).join(""):t},r.prototype._getPath=function(){var f,t=this.attr(),n=t.x,i=t.y,l=t.r||t.radius,c=t.symbol||"circle";return(f=(0,S.mf)(c)?c:$S.get(c))?f(n,i,l):(console.warn(f+" symbol is not exist."),null)},r.symbolsFactory=$S,r}(qa);const yp=rI;var nI=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="path",t.canFill=!0,t.canStroke=!0,t}return(0,E.ZT)(r,e),r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return(0,E.pi)((0,E.pi)({},t),{startArrow:!1,endArrow:!1})},r.prototype.createPath=function(t,n){var i=this,l=this.attr(),c=this.get("el");(0,S.S6)(n||l,function(f,d){if("path"===d&&(0,S.kJ)(f))c.setAttribute("d",i._formatPath(f));else if("startArrow"===d||"endArrow"===d)if(f){var p=(0,S.Kn)(f)?t.addArrow(l,tn[d]):t.getDefaultArrow(l,tn[d]);c.setAttribute(tn[d],"url(#"+p+")")}else c.removeAttribute(tn[d]);else tn[d]&&c.setAttribute(tn[d],f)})},r.prototype._formatPath=function(t){var n=t.map(function(i){return i.join(" ")}).join("");return~n.indexOf("NaN")?"":n},r.prototype.getTotalLength=function(){var t=this.get("el");return t?t.getTotalLength():null},r.prototype.getPoint=function(t){var n=this.get("el"),i=this.getTotalLength();if(0===i)return null;var l=n?n.getPointAtLength(t*i):null;return l?{x:l.x,y:l.y}:null},r}(qa);const iI=nI;var aI=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="polygon",t.canFill=!0,t.canStroke=!0,t}return(0,E.ZT)(r,e),r.prototype.createPath=function(t,n){var i=this.attr(),l=this.get("el");(0,S.S6)(n||i,function(c,f){"points"===f&&(0,S.kJ)(c)&&c.length>=2?l.setAttribute("points",c.map(function(d){return d[0]+","+d[1]}).join(" ")):tn[f]&&l.setAttribute(tn[f],c)})},r}(qa);const oI=aI;var sI=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="polyline",t.canFill=!0,t.canStroke=!0,t}return(0,E.ZT)(r,e),r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return(0,E.pi)((0,E.pi)({},t),{startArrow:!1,endArrow:!1})},r.prototype.onAttrChange=function(t,n,i){e.prototype.onAttrChange.call(this,t,n,i),-1!==["points"].indexOf(t)&&this._resetCache()},r.prototype._resetCache=function(){this.set("totalLength",null),this.set("tCache",null)},r.prototype.createPath=function(t,n){var i=this.attr(),l=this.get("el");(0,S.S6)(n||i,function(c,f){"points"===f&&(0,S.kJ)(c)&&c.length>=2?l.setAttribute("points",c.map(function(d){return d[0]+","+d[1]}).join(" ")):tn[f]&&l.setAttribute(tn[f],c)})},r.prototype.getTotalLength=function(){var t=this.attr().points,n=this.get("totalLength");return(0,S.UM)(n)?(this.set("totalLength",Ln.aH.length(t)),this.get("totalLength")):n},r.prototype.getPoint=function(t){var l,c,n=this.attr().points,i=this.get("tCache");return i||(this._setTcache(),i=this.get("tCache")),(0,S.S6)(i,function(f,d){t>=f[0]&&t<=f[1]&&(l=(t-f[0])/(f[1]-f[0]),c=d)}),Ln.x1.pointAt(n[c][0],n[c][1],n[c+1][0],n[c+1][1],l)},r.prototype._setTcache=function(){var t=this.attr().points;if(t&&0!==t.length){var n=this.getTotalLength();if(!(n<=0)){var c,f,i=0,l=[];(0,S.S6)(t,function(d,p){t[p+1]&&((c=[])[0]=i/n,f=Ln.x1.length(d[0],d[1],t[p+1][0],t[p+1][1]),c[1]=(i+=f)/n,l.push(c))}),this.set("tCache",l)}}},r.prototype.getStartTangent=function(){var t=this.attr().points,n=[];return n.push([t[1][0],t[1][1]]),n.push([t[0][0],t[0][1]]),n},r.prototype.getEndTangent=function(){var t=this.attr().points,n=t.length-1,i=[];return i.push([t[n-1][0],t[n-1][1]]),i.push([t[n][0],t[n][1]]),i},r}(qa);const lI=sI;var cI=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="rect",t.canFill=!0,t.canStroke=!0,t}return(0,E.ZT)(r,e),r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return(0,E.pi)((0,E.pi)({},t),{x:0,y:0,width:0,height:0,radius:0})},r.prototype.createPath=function(t,n){var i=this,l=this.attr(),c=this.get("el"),f=!1,d=["x","y","width","height","radius"];(0,S.S6)(n||l,function(p,m){-1===d.indexOf(m)||f?-1===d.indexOf(m)&&tn[m]&&c.setAttribute(tn[m],p):(c.setAttribute("d",i._assembleRect(l)),f=!0)})},r.prototype._assembleRect=function(t){var n=t.x,i=t.y,l=t.width,c=t.height,f=t.radius;if(!f)return"M "+n+","+i+" l "+l+",0 l 0,"+c+" l"+-l+" 0 z";var d=function uI(e){var r=0,t=0,n=0,i=0;return(0,S.kJ)(e)?1===e.length?r=t=n=i=e[0]:2===e.length?(r=n=e[0],t=i=e[1]):3===e.length?(r=e[0],t=i=e[1],n=e[2]):(r=e[0],t=e[1],n=e[2],i=e[3]):r=t=n=i=e,{r1:r,r2:t,r3:n,r4:i}}(f);return(0,S.kJ)(f)?1===f.length?d.r1=d.r2=d.r3=d.r4=f[0]:2===f.length?(d.r1=d.r3=f[0],d.r2=d.r4=f[1]):3===f.length?(d.r1=f[0],d.r2=d.r4=f[1],d.r3=f[2]):(d.r1=f[0],d.r2=f[1],d.r3=f[2],d.r4=f[3]):d.r1=d.r2=d.r3=d.r4=f,[["M "+(n+d.r1)+","+i],["l "+(l-d.r1-d.r2)+",0"],["a "+d.r2+","+d.r2+",0,0,1,"+d.r2+","+d.r2],["l 0,"+(c-d.r2-d.r3)],["a "+d.r3+","+d.r3+",0,0,1,"+-d.r3+","+d.r3],["l "+(d.r3+d.r4-l)+",0"],["a "+d.r4+","+d.r4+",0,0,1,"+-d.r4+","+-d.r4],["l 0,"+(d.r4+d.r1-c)],["a "+d.r1+","+d.r1+",0,0,1,"+d.r1+","+-d.r1],["z"]].join(" ")},r}(qa);const hI=cI;var fI={top:"before-edge",middle:"central",bottom:"after-edge",alphabetic:"baseline",hanging:"hanging"},vI={top:"text-before-edge",middle:"central",bottom:"text-after-edge",alphabetic:"alphabetic",hanging:"hanging"},Pc={left:"left",start:"left",center:"middle",right:"end",end:"end"},dI=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="text",t.canFill=!0,t.canStroke=!0,t}return(0,E.ZT)(r,e),r.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return(0,E.pi)((0,E.pi)({},t),{x:0,y:0,text:null,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom"})},r.prototype.createPath=function(t,n){var i=this,l=this.attr(),c=this.get("el");this._setFont(),(0,S.S6)(n||l,function(f,d){"text"===d?i._setText(""+f):"matrix"===d&&f?bf(i):tn[d]&&c.setAttribute(tn[d],f)}),c.setAttribute("paint-order","stroke"),c.setAttribute("style","stroke-linecap:butt; stroke-linejoin:miter;")},r.prototype._setFont=function(){var t=this.get("el"),n=this.attr(),i=n.textBaseline,l=n.textAlign,c=(0,Jv.qY)();c&&"firefox"===c.name?t.setAttribute("dominant-baseline",vI[i]||"alphabetic"):t.setAttribute("alignment-baseline",fI[i]||"baseline"),t.setAttribute("text-anchor",Pc[l]||"left")},r.prototype._setText=function(t){var n=this.get("el"),i=this.attr(),l=i.x,c=i.textBaseline,f=void 0===c?"bottom":c;if(t)if(~t.indexOf("\n")){var d=t.split("\n"),p=d.length-1,m="";(0,S.S6)(d,function(x,_){0===_?"alphabetic"===f?m+=''+x+"":"top"===f?m+=''+x+"":"middle"===f?m+=''+x+"":"bottom"===f?m+=''+x+"":"hanging"===f&&(m+=''+x+""):m+=''+x+""}),n.innerHTML=m}else n.innerHTML=t;else n.innerHTML=""},r}(qa);const pI=dI;var gI=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,Gm=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,yI=/[\d.]+:(#[^\s]+|[^)]+\))/gi;function Mu(e){var r=e.match(yI);if(!r)return"";var t="";return r.sort(function(n,i){return n=n.split(":"),i=i.split(":"),Number(n[0])-Number(i[0])}),(0,S.S6)(r,function(n){n=n.split(":"),t+=''}),t}var mI=function(){function e(r){this.cfg={};var t=null,n=(0,S.EL)("gradient_");return"l"===r.toLowerCase()[0]?function Ym(e,r){var l,c,t=gI.exec(e),n=(0,S.wQ)((0,S.c$)(parseFloat(t[1])),2*Math.PI),i=t[2];n>=0&&n<.5*Math.PI?(l={x:0,y:0},c={x:1,y:1}):.5*Math.PI<=n&&n'},e}();const wI=CI;var Wm=function(){function e(r,t){this.cfg={};var n=Za("marker"),i=(0,S.EL)("marker_");n.setAttribute("id",i);var l=Za("path");l.setAttribute("stroke",r.stroke||"none"),l.setAttribute("fill",r.fill||"none"),n.appendChild(l),n.setAttribute("overflow","visible"),n.setAttribute("orient","auto-start-reverse"),this.el=n,this.child=l,this.id=i;var c=r["marker-start"===t?"startArrow":"endArrow"];return this.stroke=r.stroke||"#000",!0===c?this._setDefaultPath(t,l):(this.cfg=c,this._setMarker(r.lineWidth,l)),this}return e.prototype.match=function(){return!1},e.prototype._setDefaultPath=function(r,t){var n=this.el;t.setAttribute("d","M0,0 L"+10*Math.cos(Math.PI/6)+",5 L0,10"),n.setAttribute("refX",""+10*Math.cos(Math.PI/6)),n.setAttribute("refY","5")},e.prototype._setMarker=function(r,t){var n=this.el,i=this.cfg.path,l=this.cfg.d;(0,S.kJ)(i)&&(i=i.map(function(c){return c.join(" ")}).join("")),t.setAttribute("d",i),n.appendChild(t),l&&n.setAttribute("refX",""+l/r)},e.prototype.update=function(r){var t=this.child;t.attr?t.attr("fill",r):t.setAttribute("fill",r)},e}();const xp=Wm;var _I=function(){function e(r){this.type="clip",this.cfg={};var t=Za("clipPath");return this.el=t,this.id=(0,S.EL)("clip_"),t.id=this.id,t.appendChild(r.cfg.el),this.cfg=r,this}return e.prototype.match=function(){return!1},e.prototype.remove=function(){var r=this.el;r.parentNode.removeChild(r)},e}();const Um=_I;var SI=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,MI=function(){function e(r){this.cfg={};var t=Za("pattern");t.setAttribute("patternUnits","userSpaceOnUse");var n=Za("image");t.appendChild(n);var i=(0,S.EL)("pattern_");t.id=i,this.el=t,this.id=i,this.cfg=r;var c=SI.exec(r)[2];n.setAttribute("href",c);var f=new Image;function d(){t.setAttribute("width",""+f.width),t.setAttribute("height",""+f.height)}return c.match(/^data:/i)||(f.crossOrigin="Anonymous"),f.src=c,f.complete?d():(f.onload=d,f.src=f.src),this}return e.prototype.match=function(r,t){return this.cfg===t},e}();const TI=MI;var bI=function(){function e(r){var t=Za("defs"),n=(0,S.EL)("defs_");t.id=n,r.appendChild(t),this.children=[],this.defaultArrow={},this.el=t,this.canvas=r}return e.prototype.find=function(r,t){for(var n=this.children,i=null,l=0;l0&&(T[0][0]="L")),l=l.concat(T)}),l.push(["Z"])}return l}function Cp(e,r,t,n,i){for(var l=Zn(e,r,!r,"lineWidth"),f=e.isInCircle,m=ap(e.points,e.connectNulls,e.showSinglePoint),x=[],_=0,T=m.length;_c&&(c=d),d=n[0]}));var F=this.scales[b];try{for(var B=(0,E.XA)(t),Y=B.next();!Y.done;Y=B.next()){var G=Y.value,H=this.getDrawCfg(G),et=H.x,wt=H.y,Ot=F.scale(G[pn][b]);this.drawGrayScaleBlurredCircle(et-p.x,wt-m.y,i+l,Ot,I)}}catch(le){c={error:le}}finally{try{Y&&!Y.done&&(f=B.return)&&f.call(B)}finally{if(c)throw c.error}}var $t=I.getImageData(0,0,x,_);this.clearShadowCanvasCtx(),this.colorize($t),I.putImageData($t,0,0);var ge=this.getImageShape();ge.attr("x",p.x),ge.attr("y",m.y),ge.attr("width",x),ge.attr("height",_),ge.attr("img",I.canvas),ge.set("origin",this.getShapeInfo(t))},r.prototype.getDefaultSize=function(){var t=this.getAttribute("position"),n=this.coordinate;return Math.min(n.getWidth()/(4*t.scales[0].ticks.length),n.getHeight()/(4*t.scales[1].ticks.length))},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,n,i,l,c){var f=this.getGrayScaleBlurredCanvas();c.globalAlpha=l,c.drawImage(f,t-i,n-i)},r.prototype.colorize=function(t){for(var n=this.getAttribute("color"),i=t.data,l=this.paletteCache,c=3;cr&&(n=r-(t=t?r/(1+n/t):0)),i+l>r&&(l=r-(i=i?r/(1+l/i):0)),[t||0,n||0,i||0,l||0]}function eM(e,r,t){var n=[];if(t.isRect){var i=t.isTransposed?{x:t.start.x,y:r[0].y}:{x:r[0].x,y:t.start.y},l=t.isTransposed?{x:t.end.x,y:r[2].y}:{x:r[3].x,y:t.end.y},c=(0,S.U2)(e,["background","style","radius"]);if(c){var f=t.isTransposed?Math.abs(r[0].y-r[2].y):r[2].x-r[1].x,d=t.isTransposed?t.getWidth():t.getHeight(),p=(0,E.CR)(tM(c,Math.min(f,d)),4),m=p[0],x=p[1],_=p[2],T=p[3],b=t.isTransposed&&t.isReflect("y"),I=b?0:1,F=function(wt){return b?-wt:wt};n.push(["M",i.x,l.y+F(m)]),0!==m&&n.push(["A",m,m,0,0,I,i.x+m,l.y]),n.push(["L",l.x-x,l.y]),0!==x&&n.push(["A",x,x,0,0,I,l.x,l.y+F(x)]),n.push(["L",l.x,i.y-F(_)]),0!==_&&n.push(["A",_,_,0,0,I,l.x-_,i.y]),n.push(["L",i.x+T,i.y]),0!==T&&n.push(["A",T,T,0,0,I,i.x,i.y-F(T)])}else n.push(["M",i.x,i.y]),n.push(["L",l.x,i.y]),n.push(["L",l.x,l.y]),n.push(["L",i.x,l.y]),n.push(["L",i.x,i.y]);n.push(["z"])}if(t.isPolar){var B=t.getCenter(),Y=wc(e,t),G=Y.startAngle,H=Y.endAngle;if("theta"===t.type||t.isTransposed){var et=function($t){return Math.pow($t,2)};m=Math.sqrt(et(B.x-r[0].x)+et(B.y-r[0].y)),x=Math.sqrt(et(B.x-r[2].x)+et(B.y-r[2].y)),n=Js(B.x,B.y,m,t.startAngle,t.endAngle,x)}else n=Js(B.x,B.y,t.getRadius(),G,H)}return n}function rM(e,r,t){var n=[];return(0,S.UM)(r)?t?n.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"]):n.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"]):n.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"]),n}function Lf(e,r){return[r,e]}function $m(e){var r=e.theme,t=e.coordinate,n=e.getXScale(),i=n.values,l=e.beforeMappingData,c=i.length,f=Sc(e.coordinate),d=e.intervalPadding,p=e.dodgePadding,m=e.maxColumnWidth||r.maxColumnWidth,x=e.minColumnWidth||r.minColumnWidth,_=e.columnWidthRatio||r.columnWidthRatio,T=e.multiplePieWidthRatio||r.multiplePieWidthRatio,b=e.roseWidthRatio||r.roseWidthRatio;if(n.isLinear&&i.length>1){i.sort();var I=function BI(e,r){var t=e.length,n=e;(0,S.HD)(n[0])&&(n=e.map(function(f){return r.translate(f)}));for(var i=n[1]-n[0],l=2;lc&&(i=c)}return i}(i,n);i.length>(c=(n.max-n.min)/I)&&(c=i.length)}var F=n.range,B=1/c,Y=1;if(t.isPolar?Y=t.isTransposed&&c>1?T:b:(n.isLinear&&(B*=F[1]-F[0]),Y=_),!(0,S.UM)(d)&&d>=0?B=(1-d/f*(c-1))/c:B*=Y,e.getAdjust("dodge")){var wt=function PI(e,r){if(r){var t=(0,S.xH)(e);return(0,S.I)(t,r).length}return e.length}(l,e.getAdjust("dodge").dodgeBy);!(0,S.UM)(p)&&p>=0?B=(B-p/f*(wt-1))/wt:(!(0,S.UM)(d)&&d>=0&&(B*=Y),B/=wt),B=B>=0?B:0}if(!(0,S.UM)(m)&&m>=0){var $t=m/f;B>$t&&(B=$t)}if(!(0,S.UM)(x)&&x>=0){var ge=x/f;B0&&!(0,S.U2)(n,[i,"min"])&&t.change({min:0}),c<=0&&!(0,S.U2)(n,[i,"max"])&&t.change({max:0}))}},r.prototype.getDrawCfg=function(t){var n=e.prototype.getDrawCfg.call(this,t);return n.background=this.background,n},r}(al);const zI=kI;var Ke=function(e){function r(t){var n=e.call(this,t)||this;n.type="line";var i=t.sortable;return n.sortable=void 0!==i&&i,n}return(0,E.ZT)(r,e),r}(Xm);const Vi=Ke;var iM=["circle","square","bowtie","diamond","hexagon","triangle","triangle-down"];function Zm(e,r,t,n,i){var l,c,f=Zn(r,i,!i,"r"),d=e.parsePoints(r.points),p=d[0];if(r.isStack)p=d[1];else if(d.length>1){var m=t.addGroup();try{for(var x=(0,E.XA)(d),_=x.next();!_.done;_=x.next()){var T=_.value;m.addShape({type:"marker",attrs:(0,E.pi)((0,E.pi)((0,E.pi)({},f),{symbol:Cu[n]||n}),T)})}}catch(b){l={error:b}}finally{try{_&&!_.done&&(c=x.return)&&c.call(x)}finally{if(l)throw l.error}}return m}return t.addShape({type:"marker",attrs:(0,E.pi)((0,E.pi)((0,E.pi)({},f),{symbol:Cu[n]||n}),p)})}il("point",{defaultShapeType:"hollow-circle",getDefaultPoints:function(e){return Sm(e)}}),(0,S.S6)(iM,function(e){rn("point","hollow-".concat(e),{draw:function(r,t){return Zm(this,r,t,e,!0)},getMarker:function(r){return{symbol:Cu[e]||e,style:{r:4.5,stroke:r.color,fill:null}}}})});var GI=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="point",t.shapeType="point",t.generatePoints=!0,t}return(0,E.ZT)(r,e),r.prototype.getDrawCfg=function(t){var n=e.prototype.getDrawCfg.call(this,t);return(0,E.pi)((0,E.pi)({},n),{isStack:!!this.getAdjust("stack")})},r}(al);const YI=GI;il("polygon",{defaultShapeType:"polygon",getDefaultPoints:function(e){var r=[];return(0,S.S6)(e.x,function(t,n){r.push({x:t,y:e.y[n]})}),r}}),rn("polygon","polygon",{draw:function(e,r){if(!(0,S.xb)(e.points)){var t=Zn(e,!0,!0),n=this.parsePath(function ga(e){for(var r=e[0],t=1,n=[["M",r.x,r.y]];t2?"weight":"normal";if(e.isInCircle){var c={x:0,y:1};return"normal"===i?l=function qI(e,r,t){var n=fo(r,t),i=[["M",e.x,e.y]];return i.push(n),i}(n[0],n[1],c):(t.fill=t.stroke,l=function KI(e,r){var t=fo(e[1],r),n=fo(e[3],r),i=[["M",e[0].x,e[0].y]];return i.push(n),i.push(["L",e[3].x,e[3].y]),i.push(["L",e[2].x,e[2].y]),i.push(t),i.push(["L",e[1].x,e[1].y]),i.push(["L",e[0].x,e[0].y]),i.push(["Z"]),i}(n,c)),l=this.parsePath(l),r.addShape("path",{attrs:(0,E.pi)((0,E.pi)({},t),{path:l})})}if("normal"===i)return l=Yy(((n=this.parsePoints(n))[1].x+n[0].x)/2,n[0].y,Math.abs(n[1].x-n[0].x)/2,Math.PI,2*Math.PI),r.addShape("path",{attrs:(0,E.pi)((0,E.pi)({},t),{path:l})});var f=Km(n[1],n[3]),d=Km(n[2],n[0]);return l=this.parsePath(l=[["M",n[0].x,n[0].y],["L",n[1].x,n[1].y],f,["L",n[3].x,n[3].y],["L",n[2].x,n[2].y],d,["Z"]]),t.fill=t.stroke,r.addShape("path",{attrs:(0,E.pi)((0,E.pi)({},t),{path:l})})},getMarker:function(e){return{symbol:"circle",style:{r:4.5,fill:e.color}}}}),rn("edge","smooth",{draw:function(e,r){var t=Zn(e,!0,!1,"lineWidth"),n=e.points,i=this.parsePath(function QI(e,r){var t=Km(e,r),n=[["M",e.x,e.y]];return n.push(t),n}(n[0],n[1]));return r.addShape("path",{attrs:(0,E.pi)((0,E.pi)({},t),{path:i})})},getMarker:function(e){return{symbol:"circle",style:{r:4.5,fill:e.color}}}});var _p=1/3;rn("edge","vhv",{draw:function(e,r){var t=Zn(e,!0,!1,"lineWidth"),n=e.points,i=this.parsePath(function JI(e,r){var t=[];t.push({x:e.x,y:e.y*(1-_p)+r.y*_p}),t.push({x:r.x,y:e.y*(1-_p)+r.y*_p}),t.push(r);var n=[["M",e.x,e.y]];return(0,S.S6)(t,function(i){n.push(["L",i.x,i.y])}),n}(n[0],n[1]));return r.addShape("path",{attrs:(0,E.pi)((0,E.pi)({},t),{path:i})})},getMarker:function(e){return{symbol:"circle",style:{r:4.5,fill:e.color}}}}),rn("interval","funnel",{getPoints:function(e){return e.size=2*e.size,wp(e)},draw:function(e,r){var t=Zn(e,!1,!0),n=this.parsePath(rM(e.points,e.nextPoints,!1));return r.addShape("path",{attrs:(0,E.pi)((0,E.pi)({},t),{path:n}),name:"interval"})},getMarker:function(e){return{symbol:"square",style:{r:4,fill:e.color}}}}),rn("interval","hollow-rect",{draw:function(e,r){var t=Zn(e,!0,!1),n=r,i=e?.background;if(i){n=r.addGroup();var l=_m(e),c=eM(e,this.parsePoints(e.points),this.coordinate);n.addShape("path",{attrs:(0,E.pi)((0,E.pi)({},l),{path:c}),zIndex:-1,name:vm})}var f=this.parsePath(Vm(e.points)),d=n.addShape("path",{attrs:(0,E.pi)((0,E.pi)({},t),{path:f}),name:"interval"});return i?n:d},getMarker:function(e){var r=e.color;return e.isInPolar?{symbol:"circle",style:{r:4.5,stroke:r,fill:null}}:{symbol:"square",style:{r:4,stroke:r,fill:null}}}}),rn("interval","line",{getPoints:function(e){return function jI(e){var r=e.x,t=e.y,n=e.y0;return(0,S.kJ)(t)?t.map(function(i,l){return{x:(0,S.kJ)(r)?r[l]:r,y:i}}):[{x:r,y:n},{x:r,y:t}]}(e)},draw:function(e,r){var t=Zn(e,!0,!1,"lineWidth"),n=ca((0,E.pi)({},t),["fill"]),i=this.parsePath(Vm(e.points,!1));return r.addShape("path",{attrs:(0,E.pi)((0,E.pi)({},n),{path:i}),name:"interval"})},getMarker:function(e){return{symbol:function(t,n,i){return[["M",t,n-i],["L",t,n+i]]},style:{r:5,stroke:e.color}}}}),rn("interval","pyramid",{getPoints:function(e){return e.size=2*e.size,wp(e)},draw:function(e,r){var t=Zn(e,!1,!0),n=this.parsePath(rM(e.points,e.nextPoints,!0));return r.addShape("path",{attrs:(0,E.pi)((0,E.pi)({},t),{path:n}),name:"interval"})},getMarker:function(e){return{symbol:"square",style:{r:4,fill:e.color}}}}),rn("interval","tick",{getPoints:function(e){return function tO(e){var r,c,f,t=e.x,n=e.y,i=e.y0,l=e.size;(0,S.kJ)(n)?(c=(r=(0,E.CR)(n,2))[0],f=r[1]):(c=i,f=n);var d=t+l/2,p=t-l/2;return[{x:t,y:c},{x:t,y:f},{x:p,y:c},{x:d,y:c},{x:p,y:f},{x:d,y:f}]}(e)},draw:function(e,r){var t=Zn(e,!0,!1),n=this.parsePath(function eO(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]]}(e.points));return r.addShape("path",{attrs:(0,E.pi)((0,E.pi)({},t),{path:n}),name:"interval"})},getMarker:function(e){return{symbol:function(t,n,i){return[["M",t-i/2,n-i],["L",t+i/2,n-i],["M",t,n-i],["L",t,n+i],["M",t-i/2,n+i],["L",t+i/2,n+i]]},style:{r:5,stroke:e.color}}}});var rO=function(e,r,t){var f,n=e.x,i=e.y,l=r.x,c=r.y;switch(t){case"hv":f=[{x:l,y:i}];break;case"vh":f=[{x:n,y:c}];break;case"hvh":var d=(l+n)/2;f=[{x:d,y:i},{x:d,y:c}];break;case"vhv":var p=(i+c)/2;f=[{x:n,y:p},{x:l,y:p}]}return f};function sM(e){var r=(0,S.kJ)(e)?e:[e],t=r[0],n=r[r.length-1],i=r.length>1?r[1]:t;return{min:t,max:n,min1:i,max1:r.length>3?r[3]:n,median:r.length>2?r[2]:i}}function lM(e,r,t){var i,n=t/2;if((0,S.kJ)(r)){var l=sM(r),x=e-n,_=e+n;i=[[x,f=l.max],[_,f],[e,f],[e,m=l.max1],[x,p=l.min1],[x,m],[_,m],[_,p],[e,p],[e,c=l.min],[x,c],[_,c],[x,d=l.median],[_,d]]}else{r=(0,S.UM)(r)?.5:r;var c,f,d,p,m,T=sM(e),b=r-n,I=r+n;i=[[c=T.min,b],[c,I],[c,r],[p=T.min1,r],[p,b],[p,I],[m=T.max1,I],[m,b],[m,r],[f=T.max,r],[f,b],[f,I],[d=T.median,b],[d,I]]}return i.map(function(F){return{x:F[0],y:F[1]}})}function uM(e,r,t){var n=function sO(e){var t=((0,S.kJ)(e)?e:[e]).sort(function(n,i){return i-n});return function sL(e,r,t){if((0,S.HD)(e))return e.padEnd(r,t);if((0,S.kJ)(e)){var n=e.length;if(n1){var f=r.addGroup();try{for(var d=(0,E.XA)(l),p=d.next();!p.done;p=d.next()){var m=p.value;f.addShape("image",{attrs:{x:m.x-i/2,y:m.y-i,width:i,height:i,img:e.shape[1]}})}}catch(x){t={error:x}}finally{try{p&&!p.done&&(n=d.return)&&n.call(d)}finally{if(t)throw t.error}}return f}return r.addShape("image",{attrs:{x:c.x-i/2,y:c.y-i,width:i,height:i,img:e.shape[1]}})},getMarker:function(e){return{symbol:"circle",style:{r:4.5,fill:e.color}}}}),(0,S.S6)(iM,function(e){rn("point",e,{draw:function(r,t){return Zm(this,r,t,e,!1)},getMarker:function(r){return{symbol:Cu[e]||e,style:{r:4.5,fill:r.color}}}})}),rn("schema","box",{getPoints:function(e){return lM(e.x,e.y,e.size)},draw:function(e,r){var t=Zn(e,!0,!1),n=this.parsePath(function oO(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]]}(e.points));return r.addShape("path",{attrs:(0,E.pi)((0,E.pi)({},t),{path:n,name:"schema"})})},getMarker:function(e){return{symbol:function(t,n,i){var c=lM(t,[n-6,n-3,n,n+3,n+6],i);return[["M",c[0].x+1,c[0].y],["L",c[1].x-1,c[1].y],["M",c[2].x,c[2].y],["L",c[3].x,c[3].y],["M",c[4].x,c[4].y],["L",c[5].x,c[5].y],["L",c[6].x,c[6].y],["L",c[7].x,c[7].y],["L",c[4].x,c[4].y],["Z"],["M",c[8].x,c[8].y],["L",c[9].x,c[9].y],["M",c[10].x+1,c[10].y],["L",c[11].x-1,c[11].y],["M",c[12].x,c[12].y],["L",c[13].x,c[13].y]]},style:{r:6,lineWidth:1,stroke:e.color}}}}),rn("schema","candle",{getPoints:function(e){return uM(e.x,e.y,e.size)},draw:function(e,r){var t=Zn(e,!0,!0),n=this.parsePath(function lO(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]]}(e.points));return r.addShape("path",{attrs:(0,E.pi)((0,E.pi)({},t),{path:n,name:"schema"})})},getMarker:function(e){var r=e.color;return{symbol:function(t,n,i){var c=uM(t,[n+7.5,n+3,n-3,n-7.5],i);return[["M",c[0].x,c[0].y],["L",c[1].x,c[1].y],["M",c[2].x,c[2].y],["L",c[3].x,c[3].y],["L",c[4].x,c[4].y],["L",c[5].x,c[5].y],["Z"],["M",c[6].x,c[6].y],["L",c[7].x,c[7].y]]},style:{lineWidth:1,stroke:r,fill:r,r:6}}}}),rn("polygon","square",{draw:function(e,r){if(!(0,S.xb)(e.points)){var t=Zn(e,!0,!0),n=this.parsePoints(e.points);return r.addShape("rect",{attrs:(0,E.pi)((0,E.pi)({},t),Qm(n,e.size)),name:"polygon"})}},getMarker:function(e){return{symbol:"square",style:{r:4,fill:e.color}}}}),rn("violin","smooth",{draw:function(e,r){var t=Zn(e,!0,!0),n=this.parsePath(cS(e.points));return r.addShape("path",{attrs:(0,E.pi)((0,E.pi)({},t),{path:n})})},getMarker:function(e){return{symbol:"circle",style:{stroke:null,r:4,fill:e.color}}}}),rn("violin","hollow",{draw:function(e,r){var t=Zn(e,!0,!1),n=this.parsePath(uS(e.points));return r.addShape("path",{attrs:(0,E.pi)((0,E.pi)({},t),{path:n})})},getMarker:function(e){return{symbol:"circle",style:{r:4,fill:null,stroke:e.color}}}}),rn("violin","hollow-smooth",{draw:function(e,r){var t=Zn(e,!0,!1),n=this.parsePath(cS(e.points));return r.addShape("path",{attrs:(0,E.pi)((0,E.pi)({},t),{path:n})})},getMarker:function(e){return{symbol:"circle",style:{r:4,fill:null,stroke:e.color}}}});var uO=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getLabelValueDir=function(t){var i=t.points;return i[0].y<=i[2].y?1:-1},r.prototype.getLabelOffsetPoint=function(t,n,i,l){var c,f=e.prototype.getLabelOffsetPoint.call(this,t,n,i),d=this.getCoordinate(),m=d.isTransposed?"x":"y",x=this.getLabelValueDir(t.mappingData);return f=(0,E.pi)((0,E.pi)({},f),((c={})[m]=f[m]*x,c)),d.isReflect("x")&&(f=(0,E.pi)((0,E.pi)({},f),{x:-1*f.x})),d.isReflect("y")&&(f=(0,E.pi)((0,E.pi)({},f),{y:-1*f.y})),f},r.prototype.getThemedLabelCfg=function(t){var n=this.geometry,i=this.getDefaultLabelCfg();return(0,S.b$)({},i,n.theme.labels,"middle"===t.position?{offset:0}:{},t)},r.prototype.setLabelPosition=function(t,n,i,l){var _,T,b,I,c=this.getCoordinate(),f=c.isTransposed,d=n.points,p=c.convert(d[0]),m=c.convert(d[2]),x=this.getLabelValueDir(n),F=(0,S.kJ)(n.shape)?n.shape[0]:n.shape;if("funnel"===F||"pyramid"===F){var B=(0,S.U2)(n,"nextPoints"),Y=(0,S.U2)(n,"points");if(B){var G=c.convert(Y[0]),H=c.convert(Y[1]),et=c.convert(B[0]),wt=c.convert(B[1]);f?(_=Math.min(et.y,G.y),b=Math.max(et.y,G.y),T=(H.x+wt.x)/2,I=(G.x+et.x)/2):(_=Math.min((H.y+wt.y)/2,(G.y+et.y)/2),b=Math.max((H.y+wt.y)/2,(G.y+et.y)/2),T=wt.x,I=G.x)}else _=Math.min(m.y,p.y),b=Math.max(m.y,p.y),T=m.x,I=p.x}else _=Math.min(m.y,p.y),b=Math.max(m.y,p.y),T=m.x,I=p.x;switch(l){case"right":t.x=T,t.y=(_+b)/2,t.textAlign=(0,S.U2)(t,"textAlign",x>0?"left":"right");break;case"left":t.x=I,t.y=(_+b)/2,t.textAlign=(0,S.U2)(t,"textAlign",x>0?"left":"right");break;case"bottom":f&&(t.x=(T+I)/2),t.y=b,t.textAlign=(0,S.U2)(t,"textAlign","center"),t.textBaseline=(0,S.U2)(t,"textBaseline",x>0?"bottom":"top");break;case"middle":f&&(t.x=(T+I)/2),t.y=(_+b)/2,t.textAlign=(0,S.U2)(t,"textAlign","center"),t.textBaseline=(0,S.U2)(t,"textBaseline","middle");break;case"top":f&&(t.x=(T+I)/2),t.y=_,t.textAlign=(0,S.U2)(t,"textAlign","center"),t.textBaseline=(0,S.U2)(t,"textBaseline",x>0?"bottom":"top")}},r}(_f);const cO=uO;var kc=Math.PI/2,hO=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getLabelOffset=function(t){var n=this.getCoordinate(),i=0;if((0,S.hj)(t))i=t;else if((0,S.HD)(t)&&-1!==t.indexOf("%")){var l=n.getRadius();n.innerRadius>0&&(l*=1-n.innerRadius),i=.01*parseFloat(t)*l}return i},r.prototype.getLabelItems=function(t){var n=e.prototype.getLabelItems.call(this,t),i=this.geometry.getYScale();return(0,S.UI)(n,function(l){if(l&&i){var c=i.scale((0,S.U2)(l.data,i.field));return(0,E.pi)((0,E.pi)({},l),{percent:c})}return l})},r.prototype.getLabelAlign=function(t){var i,n=this.getCoordinate();if(t.labelEmit)i=t.angle<=Math.PI/2&&t.angle>=-Math.PI/2?"left":"right";else if(n.isTransposed){var l=n.getCenter(),c=t.offset;i=Math.abs(t.x-l.x)<1?"center":t.angle>Math.PI||t.angle<=0?c>0?"left":"right":c>0?"right":"left"}else i="center";return i},r.prototype.getLabelPoint=function(t,n,i){var c,l=1,f=t.content[i];this.isToMiddle(n)?c=this.getMiddlePoint(n.points):(1===t.content.length&&0===i?i=1:0===i&&(l=-1),c=this.getArcPoint(n,i));var d=t.offset*l,p=this.getPointAngle(c),m=t.labelEmit,x=this.getCirclePoint(p,d,c,m);return 0===x.r?x.content="":(x.content=f,x.angle=p,x.color=n.color),x.rotate=t.autoRotate?this.getLabelRotate(p,d,m):t.rotate,x.start={x:c.x,y:c.y},x},r.prototype.getArcPoint=function(t,n){return void 0===n&&(n=0),(0,S.kJ)(t.x)||(0,S.kJ)(t.y)?{x:(0,S.kJ)(t.x)?t.x[n]:t.x,y:(0,S.kJ)(t.y)?t.y[n]:t.y}:{x:t.x,y:t.y}},r.prototype.getPointAngle=function(t){return Tc(this.getCoordinate(),t)},r.prototype.getCirclePoint=function(t,n,i,l){var c=this.getCoordinate(),f=c.getCenter(),d=Vd(c,i);if(0===d)return(0,E.pi)((0,E.pi)({},f),{r:d});var p=t;return c.isTransposed&&d>n&&!l?p=t+2*Math.asin(n/(2*d)):d+=n,{x:f.x+d*Math.cos(p),y:f.y+d*Math.sin(p),r:d}},r.prototype.getLabelRotate=function(t,n,i){var l=t+kc;return i&&(l-=kc),l&&(l>kc?l-=Math.PI:l<-kc&&(l+=Math.PI)),l},r.prototype.getMiddlePoint=function(t){var n=this.getCoordinate(),i=t.length,l={x:0,y:0};return(0,S.S6)(t,function(c){l.x+=c.x,l.y+=c.y}),l.x/=i,l.y/=i,l=n.convert(l)},r.prototype.isToMiddle=function(t){return t.x.length>2},r}(_f);const cM=hO;var fO=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.defaultLayout="distribute",t}return(0,E.ZT)(r,e),r.prototype.getDefaultLabelCfg=function(t,n){var i=e.prototype.getDefaultLabelCfg.call(this,t,n);return(0,S.b$)({},i,(0,S.U2)(this.geometry.theme,"pieLabels",{}))},r.prototype.getLabelOffset=function(t){return e.prototype.getLabelOffset.call(this,t)||0},r.prototype.getLabelRotate=function(t,n,i){var l;return n<0&&((l=t)>Math.PI/2&&(l-=Math.PI),l<-Math.PI/2&&(l+=Math.PI)),l},r.prototype.getLabelAlign=function(t){var l,i=this.getCoordinate().getCenter();return l=t.angle<=Math.PI/2&&t.x>=i.x?"left":"right",t.offset<=0&&(l="right"===l?"left":"right"),l},r.prototype.getArcPoint=function(t){return t},r.prototype.getPointAngle=function(t){var c,n=this.getCoordinate(),i={x:(0,S.kJ)(t.x)?t.x[0]:t.x,y:t.y[0]},l={x:(0,S.kJ)(t.x)?t.x[1]:t.x,y:t.y[1]},f=Tc(n,i);if(t.points&&t.points[0].y===t.points[1].y)c=f;else{var d=Tc(n,l);f>=d&&(d+=2*Math.PI),c=f+(d-f)/2}return c},r.prototype.getCirclePoint=function(t,n){var i=this.getCoordinate(),l=i.getCenter(),c=i.getRadius()+n;return(0,E.pi)((0,E.pi)({},$n(l.x,l.y,c,t)),{angle:t,r:c})},r}(cM);const vO=fO;function Sp(e,r,t){var n=e.filter(function(b){return!b.invisible});n.sort(function(b,I){return b.y-I.y});var d,i=!0,l=t.minY,f=Math.abs(l-t.maxY),p=0,m=Number.MIN_VALUE,x=n.map(function(b){return b.y>p&&(p=b.y),b.yf&&(f=p-l);i;)for(x.forEach(function(b){var I=(Math.min.apply(m,b.targets)+Math.max.apply(m,b.targets))/2;b.pos=Math.min(Math.max(m,I-b.size/2),f-b.size),b.pos=Math.max(0,b.pos)}),i=!1,d=x.length;d--;)if(d>0){var _=x[d-1],T=x[d];_.pos+_.size>T.pos&&(_.size+=T.size,_.targets=_.targets.concat(T.targets),_.pos+_.size>f&&(_.pos=f-_.size),x.splice(d,1),i=!0)}d=0,x.forEach(function(b){var I=l+r/2;b.targets.forEach(function(){n[d].y=b.pos+I,I+=r,d++})})}var If=function(){function e(r){void 0===r&&(r={}),this.bitmap={};var t=r.xGap,i=r.yGap,l=void 0===i?8:i;this.xGap=void 0===t?1:t,this.yGap=l}return e.prototype.hasGap=function(r){for(var t=!0,n=this.bitmap,i=Math.round(r.minX),l=Math.round(r.maxX),c=Math.round(r.minY),f=Math.round(r.maxY),d=i;d<=l;d+=1)if(n[d]){if(d===i||d===l){for(var p=c;p<=f;p++)if(n[d][p]){t=!1;break}}else if(n[d][c]||n[d][f]){t=!1;break}}else n[d]={};return t},e.prototype.fillGap=function(r){for(var t=this.bitmap,n=Math.round(r.minX),i=Math.round(r.maxX),l=Math.round(r.minY),c=Math.round(r.maxY),f=n;f<=i;f+=1)t[f]||(t[f]={});for(f=n;f<=i;f+=this.xGap){for(var d=l;d<=c;d+=this.yGap)t[f][d]=!0;t[f][c]=!0}if(1!==this.yGap)for(f=l;f<=c;f+=1)t[n][f]=!0,t[i][f]=!0;if(1!==this.xGap)for(f=n;f<=i;f+=1)t[f][l]=!0,t[f][c]=!0},e.prototype.destroy=function(){this.bitmap={}},e}();function _O(e,r,t,n){var i=e.getCanvasBBox(),l=i.width,c=i.height,f={x:r,y:t,textAlign:"center"};switch(n){case 0:f.y-=c+1,f.x+=1,f.textAlign="left";break;case 1:f.y-=c+1,f.x-=1,f.textAlign="right";break;case 2:f.y+=c+1,f.x-=1,f.textAlign="right";break;case 3:f.y+=c+1,f.x+=1,f.textAlign="left";break;case 5:f.y-=2*c+2;break;case 6:f.y+=2*c+2;break;case 7:f.x+=l+1,f.textAlign="left";break;case 8:f.x-=l+1,f.textAlign="right"}return e.attr(f),e.getCanvasBBox()}function vM(e){if(e.length>4)return[];var r=function(i,l){return[l.x-i.x,l.y-i.y]};return[r(e[0],e[1]),r(e[1],e[2])]}function Of(e,r,t){void 0===r&&(r=0),void 0===t&&(t={x:0,y:0});var n=e.x,i=e.y;return{x:(n-t.x)*Math.cos(-r)+(i-t.y)*Math.sin(-r)+t.x,y:(t.x-n)*Math.sin(-r)+(i-t.y)*Math.cos(-r)+t.y}}function dM(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?[Of(r[0],t,r[0]),Of(r[1],t,r[0]),Of(r[2],t,r[0]),Of(r[3],t,r[0])]:r}function pM(e,r){if(e.length>4)return{min:0,max:0};var t=[];return e.forEach(function(n){t.push(function t1(e,r){return(e[0]||0)*(r[0]||0)+(e[1]||0)*(r[1]||0)+(e[2]||0)*(r[2]||0)}([n.x,n.y],r))}),{min:Math.min.apply(Math,(0,E.ev)([],(0,E.CR)(t),!1)),max:Math.max.apply(Math,(0,E.ev)([],(0,E.CR)(t),!1))}}function TO(e,r){return e.max>r.min&&e.mine.x+e.width+t||r.x+r.widthe.y+e.height+t||r.y+r.heightG.x+G.width+et||H.x+H.widthG.y+G.height+et||H.y+H.height"u")){var r;try{r=new Blob([e.toString()],{type:"application/javascript"})}catch{(r=new window.BlobBuilder).append(e.toString()),r=r.getBlob()}return new e1(URL.createObjectURL(r))}}(mM),xM={"#5B8FF9":!0};function wM(e,r,t){return e.some(function(n){return t(n,r)})}function SM(e,r){return wM(e,r,function(t,n){var i=Va(t),l=Va(n);return function _M(e,r,t){return void 0===t&&(t=0),Math.max(0,Math.min(e.x+e.width+t,r.x+r.width+t)-Math.max(e.x-t,r.x-t))*Math.max(0,Math.min(e.y+e.height+t,r.y+r.height+t)-Math.max(e.y-t,r.y-t))}(i.getCanvasBBox(),l.getCanvasBBox(),2)>0})}function Ap(e,r,t){return e.some(function(n){return t(n,r)})}function TM(e,r){return Ap(e,r,function(t,n){var i=Va(t),l=Va(n);return function BO(e,r,t){return void 0===t&&(t=0),Math.max(0,Math.min(e.x+e.width+t,r.x+r.width+t)-Math.max(e.x-t,r.x-t))*Math.max(0,Math.min(e.y+e.height+t,r.y+r.height+t)-Math.max(e.y-t,r.y-t))}(i.getCanvasBBox(),l.getCanvasBBox(),2)>0})}var Ep=(0,S.HP)(function(e,r){void 0===r&&(r={});var t=r.fontSize,n=r.fontFamily,i=r.fontWeight,l=r.fontStyle,c=r.fontVariant,f=function kO(){return s1||(s1=document.createElement("canvas").getContext("2d")),s1}();return f.font=[l,c,i,"".concat(t,"px"),n].join(" "),f.measureText((0,S.HD)(e)?e:"").width},function(e,r){return void 0===r&&(r={}),(0,E.ev)([e],(0,E.CR)((0,S.VO)(r)),!1).join("")});function l1(e,r,t,n,i){var p,m,l=t.start,c=t.end,f=t.getWidth(),d=t.getHeight();"y"===i?(p=l.x+f/2,m=n.yl.x?n.x:l.x,m=l.y+d/2):"xy"===i&&(t.isPolar?(p=t.getCenter().x,m=t.getCenter().y):(p=(l.x+c.x)/2,m=(l.y+c.y)/2));var x=function YO(e,r,t){var n,i=(0,E.CR)(r,2),l=i[0],c=i[1];return e.applyToMatrix([l,c,1]),"x"===t?(e.setMatrix(Zr.vs(e.getMatrix(),[["t",-l,-c],["s",.01,1],["t",l,c]])),n=Zr.vs(e.getMatrix(),[["t",-l,-c],["s",100,1],["t",l,c]])):"y"===t?(e.setMatrix(Zr.vs(e.getMatrix(),[["t",-l,-c],["s",1,.01],["t",l,c]])),n=Zr.vs(e.getMatrix(),[["t",-l,-c],["s",1,100],["t",l,c]])):"xy"===t&&(e.setMatrix(Zr.vs(e.getMatrix(),[["t",-l,-c],["s",.01,.01],["t",l,c]])),n=Zr.vs(e.getMatrix(),[["t",-l,-c],["s",100,100],["t",l,c]])),n}(e,[p,m],i);e.animate({matrix:x},r)}function AM(e,r){var t,n=up(e,r),i=n.startAngle,l=n.endAngle;return!(0,S.vQ)(i,.5*-Math.PI)&&i<.5*-Math.PI&&(i+=2*Math.PI),!(0,S.vQ)(l,.5*-Math.PI)&&l<.5*-Math.PI&&(l+=2*Math.PI),0===r[5]&&(i=(t=(0,E.CR)([l,i],2))[0],l=t[1]),(0,S.vQ)(i,1.5*Math.PI)&&(i=-.5*Math.PI),(0,S.vQ)(l,-.5*Math.PI)&&!(0,S.vQ)(i,l)&&(l=1.5*Math.PI),{startAngle:i,endAngle:l}}function EM(e){var r;return"M"===e[0]||"L"===e[0]?r=[e[1],e[2]]:("a"===e[0]||"A"===e[0]||"C"===e[0])&&(r=[e[e.length-2],e[e.length-1]]),r}function LM(e){var r,t,n,i=e.filter(function(G){return"A"===G[0]||"a"===G[0]});if(0===i.length)return{startAngle:0,endAngle:0,radius:0,innerRadius:0};var l=i[0],c=i.length>1?i[1]:i[0],f=e.indexOf(l),d=e.indexOf(c),p=EM(e[f-1]),m=EM(e[d-1]),x=AM(p,l),_=x.startAngle,T=x.endAngle,b=AM(m,c),I=b.startAngle,F=b.endAngle;(0,S.vQ)(_,I)&&(0,S.vQ)(T,F)?(t=_,n=T):(t=Math.min(_,I),n=Math.max(T,F));var B=l[1],Y=i[i.length-1][1];return B=0;p--){var m=this.getFacetsByLevel(t,p);try{for(var x=(n=void 0,(0,E.XA)(m)),_=x.next();!_.done;_=x.next()){var T=_.value;this.isLeaf(T)||(T.originColIndex=T.columnIndex,T.columnIndex=this.getRegionIndex(T.children),T.columnValuesLength=c.length)}}catch(b){n={error:b}}finally{try{_&&!_.done&&(i=x.return)&&i.call(x)}finally{if(n)throw n.error}}}},r.prototype.getFacetsByLevel=function(t,n){var i=[];return t.forEach(function(l){l.rowIndex===n&&i.push(l)}),i},r.prototype.getRegionIndex=function(t){var n=t[0];return(t[t.length-1].columnIndex-n.columnIndex)/2+n.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,n,i){var l=this,c=this.cfg.fields;if(!(c.length=T){var F=i.parsePosition([b[d],b[f.field]]);F&&_.push(F)}if(b[d]===x)return!1}),_},r.prototype.parsePercentPosition=function(t){var n=parseFloat(t[0])/100,i=parseFloat(t[1])/100,l=this.view.getCoordinate(),c=l.start,f=l.end,d_x=Math.min(c.x,f.x),d_y=Math.min(c.y,f.y);return{x:l.getWidth()*n+d_x,y:l.getHeight()*i+d_y}},r.prototype.getCoordinateBBox=function(){var t=this.view.getCoordinate(),n=t.start,i=t.end,l=t.getWidth(),c=t.getHeight(),f={x:Math.min(n.x,i.x),y:Math.min(n.y,i.y)};return{x:f.x,y:f.y,minX:f.x,minY:f.y,maxX:f.x+l,maxY:f.y+c,width:l,height:c}},r.prototype.getAnnotationCfg=function(t,n,i){var l=this,c=this.view.getCoordinate(),f=this.view.getCanvas(),d={};if((0,S.UM)(n))return null;var m=n.end,x=n.position,_=this.parsePosition(n.start),T=this.parsePosition(m),b=this.parsePosition(x);if(["arc","image","line","region","regionFilter"].includes(t)&&(!_||!T))return null;if(["text","dataMarker","html"].includes(t)&&!b)return null;if("arc"===t){var Y=(0,E._T)(n,["start","end"]),G=Tc(c,_),H=Tc(c,T);G>H&&(H=2*Math.PI+H),d=(0,E.pi)((0,E.pi)({},Y),{center:c.getCenter(),radius:Vd(c,_),startAngle:G,endAngle:H})}else if("image"===t)Y=(0,E._T)(n,["start","end"]),d=(0,E.pi)((0,E.pi)({},Y),{start:_,end:T,src:n.src});else if("line"===t)Y=(0,E._T)(n,["start","end"]),d=(0,E.pi)((0,E.pi)({},Y),{start:_,end:T,text:(0,S.U2)(n,"text",null)});else if("region"===t)Y=(0,E._T)(n,["start","end"]),d=(0,E.pi)((0,E.pi)({},Y),{start:_,end:T});else if("text"===t){var cr=this.view.getData(),We=n.content,nr=(Y=(0,E._T)(n,["position","content"]),We);(0,S.mf)(We)&&(nr=We(cr)),d=(0,E.pi)((0,E.pi)((0,E.pi)({},b),Y),{content:nr})}else if("dataMarker"===t){var ir=n.point,Pr=n.line,Gr=n.text,Ar=n.autoAdjust,xr=n.direction;Y=(0,E._T)(n,["position","point","line","text","autoAdjust","direction"]),d=(0,E.pi)((0,E.pi)((0,E.pi)({},Y),b),{coordinateBBox:this.getCoordinateBBox(),point:ir,line:Pr,text:Gr,autoAdjust:Ar,direction:xr})}else if("dataRegion"===t){var Bn=n.start,Pn=n.end,Ii=n.region,Ds=(Gr=n.text,n.lineLength);Y=(0,E._T)(n,["start","end","region","text","lineLength"]),d=(0,E.pi)((0,E.pi)({},Y),{points:this.getRegionPoints(Bn,Pn),region:Ii,text:Gr,lineLength:Ds})}else if("regionFilter"===t){var c9=n.apply,xH=n.color,h9=(Y=(0,E._T)(n,["start","end","apply","color"]),[]),DP=function(Ll){Ll&&(Ll.isGroup()?Ll.getChildren().forEach(function(u2){return DP(u2)}):h9.push(Ll))};(0,S.S6)(this.view.geometries,function(Ll){c9?(0,S.FX)(c9,Ll.type)&&(0,S.S6)(Ll.elements,function(u2){DP(u2.shape)}):(0,S.S6)(Ll.elements,function(u2){DP(u2.shape)})}),d=(0,E.pi)((0,E.pi)({},Y),{color:xH,shapes:h9,start:_,end:T})}else if("shape"===t){var wH=n.render,BP=(0,E._T)(n,["render"]);d=(0,E.pi)((0,E.pi)({},BP),{render:function(MH){if((0,S.mf)(n.render))return wH(MH,l.view,{parsePosition:l.parsePosition.bind(l)})}})}else if("html"===t){var kP=n.html;BP=(0,E._T)(n,["html","position"]),d=(0,E.pi)((0,E.pi)((0,E.pi)({},BP),b),{parent:f.get("el").parentNode,html:function(Ll){return(0,S.mf)(kP)?kP(Ll,l.view):kP}})}var vh=(0,S.b$)({},i,(0,E.pi)((0,E.pi)({},d),{top:n.top,style:n.style,offsetX:n.offsetX,offsetY:n.offsetY}));return"html"!==t&&(vh.container=this.getComponentContainer(vh)),vh.animate=this.view.getOptions().animate&&vh.animate&&(0,S.U2)(n,"animate",vh.animate),vh.animateOption=(0,S.b$)({},rl,vh.animateOption,n.animateOption),vh},r.prototype.isTop=function(t){return(0,S.U2)(t,"top",!0)},r.prototype.getComponentContainer=function(t){return this.isTop(t)?this.foregroundContainer:this.backgroundContainer},r.prototype.getAnnotationTheme=function(t){return(0,S.U2)(this.view.getTheme(),["components","annotation",t],{})},r.prototype.updateOrCreate=function(t){var n=this.cache.get(this.getCacheKey(t));if(n){var i=t.type,l=this.getAnnotationTheme(i),c=this.getAnnotationCfg(i,t,l);c&&ca(c,["container"]),n.component.update((0,E.pi)((0,E.pi)({},c||{}),{visible:!!c})),(0,S.q9)(Rp,t.type)&&n.component.render()}else(n=this.createAnnotation(t))&&(n.component.init(),(0,S.q9)(Rp,t.type)&&n.component.render());return n},r.prototype.syncCache=function(t){var n=this,i=new Map(this.cache);return t.forEach(function(l,c){i.set(c,l)}),i.forEach(function(l,c){(0,S.sE)(n.option,function(f){return c===n.getCacheKey(f)})||(l.component.destroy(),i.delete(c))}),i},r.prototype.getCacheKey=function(t){return t},r}(Oc);const aR=iR;function BM(e,r){var t=(0,S.b$)({},(0,S.U2)(e,["components","axis","common"]),(0,S.U2)(e,["components","axis",r]));return(0,S.U2)(t,["grid"],{})}function Fp(e,r,t,n){var i=[],l=r.getTicks();return e.isPolar&&l.push({value:1,text:"",tickValue:""}),l.reduce(function(c,f,d){var p=f.value;if(n)i.push({points:[e.convert("y"===t?{x:0,y:p}:{x:p,y:0}),e.convert("y"===t?{x:1,y:p}:{x:p,y:1})]});else if(d){var x=(c.value+p)/2;i.push({points:[e.convert("y"===t?{x:0,y:x}:{x,y:0}),e.convert("y"===t?{x:1,y:x}:{x,y:1})]})}return f},l[0]),i}function Bf(e,r,t,n,i){var l=r.values.length,c=[],f=t.getTicks();return f.reduce(function(d,p){var x=p.value,_=((d?d.value:p.value)+x)/2;return c.push("x"===i?{points:[e.convert({x:n?x:_,y:0}),e.convert({x:n?x:_,y:1})]}:{points:(0,S.UI)(Array(l+1),function(T,b){return e.convert({x:b/l,y:n?x:_})})}),p},f[0]),c}function h1(e,r){var t=(0,S.U2)(r,"grid");if(null===t)return!1;var n=(0,S.U2)(e,"grid");return!(void 0===t&&null===n)}var fl=["container"],Dp=(0,E.pi)((0,E.pi)({},rl),{appear:null}),oR=function(e){function r(t){var n=e.call(this,t)||this;return n.cache=new Map,n.gridContainer=n.view.getLayer(Rn.BG).addGroup(),n.gridForeContainer=n.view.getLayer(Rn.FORE).addGroup(),n.axisContainer=n.view.getLayer(Rn.BG).addGroup(),n.axisForeContainer=n.view.getLayer(Rn.FORE).addGroup(),n}return(0,E.ZT)(r,e),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,n=this.view.getCoordinate();(0,S.S6)(this.getComponents(),function(i){var _,l=i.component,c=i.direction,f=i.type,d=i.extra,p=d.dim,m=d.scale,x=d.alignTick;f===Kn.AXIS?n.isPolar?"x"===p?_=n.isTransposed?fu(n,c):Xy(n):"y"===p&&(_=n.isTransposed?Xy(n):fu(n,c)):_=fu(n,c):f===Kn.GRID&&(_=n.isPolar?{items:n.isTransposed?"x"===p?Bf(n,t.view.getYScales()[0],m,x,p):Fp(n,m,p,x):"x"===p?Fp(n,m,p,x):Bf(n,t.view.getXScale(),m,x,p),center:t.view.getCoordinate().getCenter()}:{items:Fp(n,m,p,x)}),l.update(_)})},r.prototype.update=function(){this.option=this.view.getOptions().axes;var t=new Map;this.updateXAxes(t),this.updateYAxes(t);var n=new Map;this.cache.forEach(function(i,l){t.has(l)?n.set(l,i):i.component.destroy()}),this.cache=n},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(n){t.push(n)}),t},r.prototype.updateXAxes=function(t){var n=this.view.getXScale();if(n&&!n.isIdentity){var i=ha(this.option,n.field);if(!1!==i){var l=Vy(i,Ge.BOTTOM),c=Rn.BG,f="x",d=this.view.getCoordinate(),p=this.getId("axis",n.field),m=this.getId("grid",n.field);if(d.isRect)(x=this.cache.get(p))?(ca(_=this.getLineAxisCfg(n,i,l),fl),x.component.update(_),t.set(p,x)):(x=this.createLineAxis(n,i,c,l,f),this.cache.set(p,x),t.set(p,x)),(T=this.cache.get(m))?(ca(_=this.getLineGridCfg(n,i,l,f),fl),T.component.update(_),t.set(m,T)):(T=this.createLineGrid(n,i,c,l,f))&&(this.cache.set(m,T),t.set(m,T));else if(d.isPolar){var x,T;if(x=this.cache.get(p))ca(_=d.isTransposed?this.getLineAxisCfg(n,i,Ge.RADIUS):this.getCircleAxisCfg(n,i,l),fl),x.component.update(_),t.set(p,x);else{if(d.isTransposed){if((0,S.o8)(i))return;x=this.createLineAxis(n,i,c,Ge.RADIUS,f)}else x=this.createCircleAxis(n,i,c,l,f);this.cache.set(p,x),t.set(p,x)}if(T=this.cache.get(m)){var _;ca(_=d.isTransposed?this.getCircleGridCfg(n,i,Ge.RADIUS,f):this.getLineGridCfg(n,i,Ge.CIRCLE,f),fl),T.component.update(_),t.set(m,T)}else{if(d.isTransposed){if((0,S.o8)(i))return;T=this.createCircleGrid(n,i,c,Ge.RADIUS,f)}else T=this.createLineGrid(n,i,c,Ge.CIRCLE,f);T&&(this.cache.set(m,T),t.set(m,T))}}}}},r.prototype.updateYAxes=function(t){var n=this,i=this.view.getYScales();(0,S.S6)(i,function(l,c){if(l&&!l.isIdentity){var f=l.field,d=ha(n.option,f);if(!1!==d){var p=Rn.BG,m="y",x=n.getId("axis",f),_=n.getId("grid",f),T=n.view.getCoordinate();if(T.isRect){var b=Vy(d,0===c?Ge.LEFT:Ge.RIGHT);(I=n.cache.get(x))?(ca(F=n.getLineAxisCfg(l,d,b),fl),I.component.update(F),t.set(x,I)):(I=n.createLineAxis(l,d,p,b,m),n.cache.set(x,I),t.set(x,I)),(B=n.cache.get(_))?(ca(F=n.getLineGridCfg(l,d,b,m),fl),B.component.update(F),t.set(_,B)):(B=n.createLineGrid(l,d,p,b,m))&&(n.cache.set(_,B),t.set(_,B))}else if(T.isPolar){var I,B;if(I=n.cache.get(x))ca(F=T.isTransposed?n.getCircleAxisCfg(l,d,Ge.CIRCLE):n.getLineAxisCfg(l,d,Ge.RADIUS),fl),I.component.update(F),t.set(x,I);else{if(T.isTransposed){if((0,S.o8)(d))return;I=n.createCircleAxis(l,d,p,Ge.CIRCLE,m)}else I=n.createLineAxis(l,d,p,Ge.RADIUS,m);n.cache.set(x,I),t.set(x,I)}if(B=n.cache.get(_)){var F;ca(F=T.isTransposed?n.getLineGridCfg(l,d,Ge.CIRCLE,m):n.getCircleGridCfg(l,d,Ge.RADIUS,m),fl),B.component.update(F),t.set(_,B)}else{if(T.isTransposed){if((0,S.o8)(d))return;B=n.createLineGrid(l,d,p,Ge.CIRCLE,m)}else B=n.createCircleGrid(l,d,p,Ge.RADIUS,m);B&&(n.cache.set(_,B),t.set(_,B))}}}}})},r.prototype.createLineAxis=function(t,n,i,l,c){var f={component:new iL(this.getLineAxisCfg(t,n,l)),layer:i,direction:l===Ge.RADIUS?Ge.NONE:l,type:Kn.AXIS,extra:{dim:c,scale:t}};return f.component.set("field",t.field),f.component.init(),f},r.prototype.createLineGrid=function(t,n,i,l,c){var f=this.getLineGridCfg(t,n,l,c);if(f){var d={component:new u_(f),layer:i,direction:Ge.NONE,type:Kn.GRID,extra:{dim:c,scale:t,alignTick:(0,S.U2)(f,"alignTick",!0)}};return d.component.init(),d}},r.prototype.createCircleAxis=function(t,n,i,l,c){var f={component:new l_(this.getCircleAxisCfg(t,n,l)),layer:i,direction:l,type:Kn.AXIS,extra:{dim:c,scale:t}};return f.component.set("field",t.field),f.component.init(),f},r.prototype.createCircleGrid=function(t,n,i,l,c){var f=this.getCircleGridCfg(t,n,l,c);if(f){var d={component:new aL(f),layer:i,direction:Ge.NONE,type:Kn.GRID,extra:{dim:c,scale:t,alignTick:(0,S.U2)(f,"alignTick",!0)}};return d.component.init(),d}},r.prototype.getLineAxisCfg=function(t,n,i){var l=(0,S.U2)(n,["top"])?this.axisForeContainer:this.axisContainer,c=this.view.getCoordinate(),f=fu(c,i),d=m_(t,n),p=Zd(this.view.getTheme(),i),m=(0,S.U2)(n,["title"])?(0,S.b$)({title:{style:{text:d}}},{title:y_(this.view.getTheme(),i,n.title)},n):n,x=(0,S.b$)((0,E.pi)((0,E.pi)({container:l},f),{ticks:t.getTicks().map(function(G){return{id:"".concat(G.tickValue),name:G.text,value:G.value}}),verticalFactor:c.isPolar?-1*g_(f,c.getCenter()):g_(f,c.getCenter()),theme:p}),p,m),_=this.getAnimateCfg(x),T=_.animate;x.animateOption=_.animateOption,x.animate=T;var I=p_(f),F=(0,S.U2)(x,"verticalLimitLength",I?1/3:.5);if(F<=1){var B=this.view.getCanvas().get("width"),Y=this.view.getCanvas().get("height");x.verticalLimitLength=F*(I?B:Y)}return x},r.prototype.getLineGridCfg=function(t,n,i,l){if(h1(Zd(this.view.getTheme(),i),n)){var c=BM(this.view.getTheme(),i),f=(0,S.b$)({container:(0,S.U2)(n,["top"])?this.gridForeContainer:this.gridContainer},c,(0,S.U2)(n,"grid"),this.getAnimateCfg(n));return f.items=Fp(this.view.getCoordinate(),t,l,(0,S.U2)(f,"alignTick",!0)),f}},r.prototype.getCircleAxisCfg=function(t,n,i){var l=(0,S.U2)(n,["top"])?this.axisForeContainer:this.axisContainer,c=this.view.getCoordinate(),f=t.getTicks().map(function(I){return{id:"".concat(I.tickValue),name:I.text,value:I.value}});!t.isCategory&&Math.abs(c.endAngle-c.startAngle)===2*Math.PI&&f.length&&(f[f.length-1].name="");var d=m_(t,n),p=Zd(this.view.getTheme(),Ge.CIRCLE),m=(0,S.U2)(n,["title"])?(0,S.b$)({title:{style:{text:d}}},{title:y_(this.view.getTheme(),i,n.title)},n):n,x=(0,S.b$)((0,E.pi)((0,E.pi)({container:l},Xy(this.view.getCoordinate())),{ticks:f,verticalFactor:1,theme:p}),p,m),_=this.getAnimateCfg(x),b=_.animateOption;return x.animate=_.animate,x.animateOption=b,x},r.prototype.getCircleGridCfg=function(t,n,i,l){if(h1(Zd(this.view.getTheme(),i),n)){var c=BM(this.view.getTheme(),Ge.RADIUS),f=(0,S.b$)({container:(0,S.U2)(n,["top"])?this.gridForeContainer:this.gridContainer,center:this.view.getCoordinate().getCenter()},c,(0,S.U2)(n,"grid"),this.getAnimateCfg(n)),d=(0,S.U2)(f,"alignTick",!0),p="x"===l?this.view.getYScales()[0]:this.view.getXScale();return f.items=Bf(this.view.getCoordinate(),p,t,d,l),f}},r.prototype.getId=function(t,n){var i=this.view.getCoordinate();return"".concat(t,"-").concat(n,"-").concat(i.type)},r.prototype.getAnimateCfg=function(t){return{animate:this.view.getOptions().animate&&(0,S.U2)(t,"animate"),animateOption:t&&t.animateOption?(0,S.b$)({},Dp,t.animateOption):Dp}},r}(Oc);const sR=oR;function vl(e,r,t){return t===Ge.TOP?[e.minX+e.width/2-r.width/2,e.minY]:t===Ge.BOTTOM?[e.minX+e.width/2-r.width/2,e.maxY-r.height]:t===Ge.LEFT?[e.minX,e.minY+e.height/2-r.height/2]:t===Ge.RIGHT?[e.maxX-r.width,e.minY+e.height/2-r.height/2]:t===Ge.TOP_LEFT||t===Ge.LEFT_TOP?[e.tl.x,e.tl.y]:t===Ge.TOP_RIGHT||t===Ge.RIGHT_TOP?[e.tr.x-r.width,e.tr.y]:t===Ge.BOTTOM_LEFT||t===Ge.LEFT_BOTTOM?[e.bl.x,e.bl.y-r.height]:t===Ge.BOTTOM_RIGHT||t===Ge.RIGHT_BOTTOM?[e.br.x-r.width,e.br.y-r.height]:[0,0]}function kM(e,r){return(0,S.jn)(e)?!1!==e&&{}:(0,S.U2)(e,[r],e)}function Pf(e){return(0,S.U2)(e,"position",Ge.BOTTOM)}var v1=function(e){function r(t){var n=e.call(this,t)||this;return n.container=n.view.getLayer(Rn.FORE).addGroup(),n}return(0,E.ZT)(r,e),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,S.S6)(this.components,function(n){var i=n.component,l=n.direction,c=np(l),f=i.get("maxWidthRatio"),d=i.get("maxHeightRatio"),p=t.getCategoryLegendSizeCfg(c,f,d),m=i.get("maxWidth"),x=i.get("maxHeight");i.update({maxWidth:Math.min(p.maxWidth,m||0),maxHeight:Math.min(p.maxHeight,x||0)});var _=i.get("padding"),T=i.getLayoutBBox(),b=new Xi(T.x,T.y,T.width,T.height).expand(_),I=(0,E.CR)(vl(t.view.viewBBox,b,l),2),F=I[0],B=I[1],Y=(0,E.CR)(vl(t.layoutBBox,b,l),2),G=Y[0],H=Y[1],et=0,wt=0;l.startsWith("top")||l.startsWith("bottom")?(et=F,wt=H):(et=G,wt=B),i.setLocation({x:et+_[3],y:wt+_[0]}),t.layoutBBox=t.layoutBBox.cut(b,l)})},r.prototype.update=function(){var t=this;this.option=this.view.getOptions().legends;var n={};if((0,S.U2)(this.option,"custom")){var l="global-custom",c=this.getComponentById(l);if(c){var f=this.getCategoryCfg(void 0,void 0,void 0,this.option,!0);ca(f,["container"]),c.component.update(f),n[l]=!0}else{var d=this.createCustomLegend(void 0,void 0,void 0,this.option);if(d){d.init();var p=Rn.FORE,m=Pf(this.option);this.components.push({id:l,component:d,layer:p,direction:m,type:Kn.LEGEND,extra:void 0}),n[l]=!0}}}else this.loopLegends(function(_,T,b){var I=t.getId(b.field),F=t.getComponentById(I);if(F){var B=void 0,Y=kM(t.option,b.field);!1!==Y&&((0,S.U2)(Y,"custom")?B=t.getCategoryCfg(_,T,b,Y,!0):b.isLinear?B=t.getContinuousCfg(_,T,b,Y):b.isCategory&&(B=t.getCategoryCfg(_,T,b,Y))),B&&(ca(B,["container"]),F.direction=Pf(Y),F.component.update(B),n[I]=!0)}else{var G=t.createFieldLegend(_,T,b);G&&(G.component.init(),t.components.push(G),n[I]=!0)}});var x=[];(0,S.S6)(this.getComponents(),function(_){n[_.id]?x.push(_):_.component.destroy()}),this.components=x},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 n=this,i=t.geometries;return(0,S.S6)(t.views,function(l){i=i.concat(n.getGeometries(l))}),i},r.prototype.loopLegends=function(t){if(this.view.getRootView()===this.view){var i=this.getGeometries(this.view),l={};(0,S.S6)(i,function(c){var f=c.getGroupAttributes();(0,S.S6)(f,function(d){var p=d.getScale(d.type);!p||"identity"===p.type||l[p.field]||(t(c,d,p),l[p.field]=!0)})})}},r.prototype.createFieldLegend=function(t,n,i){var l,c=kM(this.option,i.field),f=Rn.FORE,d=Pf(c);if(!1!==c&&((0,S.U2)(c,"custom")?l=this.createCustomLegend(t,n,i,c):i.isLinear?l=this.createContinuousLegend(t,n,i,c):i.isCategory&&(l=this.createCategoryLegend(t,n,i,c))),l)return l.set("field",i.field),{id:this.getId(i.field),component:l,layer:f,direction:d,type:Kn.LEGEND,extra:{scale:i}}},r.prototype.createCustomLegend=function(t,n,i,l){var c=this.getCategoryCfg(t,n,i,l,!0);return new c_(c)},r.prototype.createContinuousLegend=function(t,n,i,l){var c=this.getContinuousCfg(t,n,i,ca(l,["value"]));return new oL(c)},r.prototype.createCategoryLegend=function(t,n,i,l){var c=this.getCategoryCfg(t,n,i,l);return new c_(c)},r.prototype.getContinuousCfg=function(t,n,i,l){var c=i.getTicks(),f=(0,S.sE)(c,function(I){return 0===I.value}),d=(0,S.sE)(c,function(I){return 1===I.value}),p=c.map(function(I){var F=I.value,B=I.tickValue,Y=n.mapping(i.invert(F)).join("");return{value:B,attrValue:Y,color:Y,scaleValue:F}});f||p.push({value:i.min,attrValue:n.mapping(i.invert(0)).join(""),color:n.mapping(i.invert(0)).join(""),scaleValue:0}),d||p.push({value:i.max,attrValue:n.mapping(i.invert(1)).join(""),color:n.mapping(i.invert(1)).join(""),scaleValue:1}),p.sort(function(I,F){return I.value-F.value});var m={min:(0,S.YM)(p).value,max:(0,S.Z$)(p).value,colors:[],rail:{type:n.type},track:{}};"size"===n.type&&(m.track={style:{fill:"size"===n.type?this.view.getTheme().defaultColor:void 0}}),"color"===n.type&&(m.colors=p.map(function(I){return I.attrValue}));var x=this.container,T=np(Pf(l)),b=(0,S.U2)(l,"title");return b&&(b=(0,S.b$)({text:bc(i)},b)),m.container=x,m.layout=T,m.title=b,m.animateOption=rl,this.mergeLegendCfg(m,l,"continuous")},r.prototype.getCategoryCfg=function(t,n,i,l,c){var f=this.container,d=(0,S.U2)(l,"position",Ge.BOTTOM),p=wm(this.view.getTheme(),d),m=(0,S.U2)(p,["marker"]),x=(0,S.U2)(l,"marker"),_=np(d),T=(0,S.U2)(p,["pageNavigator"]),b=(0,S.U2)(l,"pageNavigator"),I=c?function p5(e,r,t){return t.map(function(n,i){var l=r;(0,S.mf)(l)&&(l=l(n.name,i,(0,S.b$)({},e,n)));var c=(0,S.mf)(n.marker)?n.marker(n.name,i,(0,S.b$)({},e,n)):n.marker,f=(0,S.b$)({},e,l,c);return sS(f),n.marker=f,n})}(m,x,l.items):Yr(this.view,t,n,m,x),F=(0,S.U2)(l,"title");F&&(F=(0,S.b$)({text:i?bc(i):""},F));var B=(0,S.U2)(l,"maxWidthRatio"),Y=(0,S.U2)(l,"maxHeightRatio"),G=this.getCategoryLegendSizeCfg(_,B,Y);G.container=f,G.layout=_,G.items=I,G.title=F,G.animateOption=rl,G.pageNavigator=(0,S.b$)({},T,b);var H=this.mergeLegendCfg(G,l,d);H.reversed&&H.items.reverse();var et=(0,S.U2)(H,"maxItemWidth");return et&&et<=1&&(H.maxItemWidth=this.view.viewBBox.width*et),H},r.prototype.mergeLegendCfg=function(t,n,i){var l=i.split("-")[0],c=wm(this.view.getTheme(),l);return(0,S.b$)({},c,t,n)},r.prototype.getId=function(t){return"".concat(this.name,"-").concat(t)},r.prototype.getComponentById=function(t){return(0,S.sE)(this.components,function(n){return n.id===t})},r.prototype.getCategoryLegendSizeCfg=function(t,n,i){void 0===n&&(n=.25),void 0===i&&(i=.25);var l=this.view.viewBBox,c=l.width,f=l.height;return"vertical"===t?{maxWidth:c*n,maxHeight:f}:{maxWidth:c,maxHeight:f*i}},r}(Oc);const zM=v1;var hR=function(e){function r(t){var n=e.call(this,t)||this;return n.onChangeFn=S.ZT,n.resetMeasure=function(){n.clear()},n.onValueChange=function(i){var l=(0,E.CR)(i,2),c=l[0],f=l[1];n.start=c,n.end=f,n.changeViewData(c,f)},n.container=n.view.getLayer(Rn.FORE).addGroup(),n.onChangeFn=(0,S.P2)(n.onValueChange,20,{leading:!0}),n.width=0,n.view.on(kr.BEFORE_CHANGE_DATA,n.resetMeasure),n.view.on(kr.BEFORE_CHANGE_SIZE,n.resetMeasure),n}return(0,E.ZT)(r,e),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(kr.BEFORE_CHANGE_DATA,this.resetMeasure),this.view.off(kr.BEFORE_CHANGE_SIZE,this.resetMeasure)},r.prototype.init=function(){},r.prototype.render=function(){this.option=this.view.getOptions().slider;var t=this.getSliderCfg(),n=t.start,i=t.end;(0,S.UM)(this.start)&&(this.start=n,this.end=i);var l=this.view.getOptions().data;this.option&&!(0,S.xb)(l)?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 n=this.view.coordinateBBox.width,i=this.slider.component.get("padding"),l=(0,E.CR)(i,4),c=l[0],p=l[3],m=this.slider.component.getLayoutBBox(),x=new Xi(m.x,m.y,Math.min(m.width,n),m.height).expand(i),_=this.getMinMaxText(this.start,this.end),T=_.minText,b=_.maxText,B=(0,E.CR)(vl(this.view.viewBBox,x,Ge.BOTTOM),2)[1],G=(0,E.CR)(vl(this.view.coordinateBBox,x,Ge.BOTTOM),2)[0];this.slider.component.update((0,E.pi)((0,E.pi)({},this.getSliderCfg()),{x:G+p,y:B+c,width:this.width,start:this.start,end:this.end,minText:T,maxText:b})),this.view.viewBBox=this.view.viewBBox.cut(x,Ge.BOTTOM)}},r.prototype.update=function(){this.render()},r.prototype.createSlider=function(){var t=this.getSliderCfg(),n=new rL((0,E.pi)({container:this.container},t));return n.init(),{component:n,layer:Rn.FORE,direction:Ge.BOTTOM,type:Kn.SLIDER}},r.prototype.updateSlider=function(){var t=this.getSliderCfg();if(this.width){var n=this.getMinMaxText(this.start,this.end),i=n.minText,l=n.maxText;t=(0,E.pi)((0,E.pi)({},t),{width:this.width,start:this.start,end:this.end,minText:i,maxText:l})}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,S.Kn)(this.option)){var n=(0,E.pi)({data:this.getData()},(0,S.U2)(this.option,"trendCfg",{}));t=(0,S.b$)({},t,this.getThemeOptions(),this.option),t=(0,E.pi)((0,E.pi)({},t),{trendCfg:n})}return t.start=(0,S.uZ)(Math.min((0,S.UM)(t.start)?0:t.start,(0,S.UM)(t.end)?1:t.end),0,1),t.end=(0,S.uZ)(Math.max((0,S.UM)(t.start)?0:t.start,(0,S.UM)(t.end)?1:t.end),0,1),t},r.prototype.getData=function(){var t=this.view.getOptions().data,i=(0,E.CR)(this.view.getYScales(),1)[0],l=this.view.getGroupScales();if(l.length){var c=l[0],f=c.field,d=c.ticks;return t.reduce(function(p,m){return m[f]===d[0]&&p.push(m[i.field]),p},[])}return t.map(function(p){return p[i.field]||0})},r.prototype.getThemeOptions=function(){var t=this.view.getTheme();return(0,S.U2)(t,["components","slider","common"],{})},r.prototype.getMinMaxText=function(t,n){var i=this.view.getOptions().data,l=this.view.getXScale(),f=(0,S.I)(i,l.field);l.isLinear&&(f=f.sort());var d=f,p=(0,S.dp)(i);if(!l||!p)return{};var m=(0,S.dp)(d),x=Math.round(t*(m-1)),_=Math.round(n*(m-1)),T=(0,S.U2)(d,[x]),b=(0,S.U2)(d,[_]),I=this.getSliderCfg().formatter;return I&&(T=I(T,i[x],x),b=I(b,i[_],_)),{minText:T,maxText:b}},r.prototype.changeViewData=function(t,n){var i=this.view.getOptions().data,l=this.view.getXScale(),c=(0,S.dp)(i);if(l&&c){var d=(0,S.I)(i,l.field),m=this.view.getXScale().isLinear?d.sort(function(b,I){return Number(b)-Number(I)}):d,x=(0,S.dp)(m),_=Math.round(t*(x-1)),T=Math.round(n*(x-1));this.view.filter(l.field,function(b,I){var F=m.indexOf(b);return!(F>-1)||_c(F,_,T)}),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}(Oc);const fR=hR;var HM=function(e){function r(t){var n=e.call(this,t)||this;return n.onChangeFn=S.ZT,n.resetMeasure=function(){n.clear()},n.onValueChange=function(i){var l=i.ratio,c=n.getValidScrollbarCfg().animate;n.ratio=(0,S.uZ)(l,0,1);var f=n.view.getOptions().animate;c||n.view.animate(!1),n.changeViewData(n.getScrollRange(),!0),n.view.animate(f)},n.container=n.view.getLayer(Rn.FORE).addGroup(),n.onChangeFn=(0,S.P2)(n.onValueChange,20,{leading:!0}),n.trackLen=0,n.thumbLen=0,n.ratio=0,n.view.on(kr.BEFORE_CHANGE_DATA,n.resetMeasure),n.view.on(kr.BEFORE_CHANGE_SIZE,n.resetMeasure),n}return(0,E.ZT)(r,e),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(kr.BEFORE_CHANGE_DATA,this.resetMeasure),this.view.off(kr.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 n=this.view.coordinateBBox.width,i=this.scrollbar.component.get("padding"),l=this.scrollbar.component.getLayoutBBox(),c=new Xi(l.x,l.y,Math.min(l.width,n),l.height).expand(i),f=this.getScrollbarComponentCfg(),d=void 0,p=void 0;if(f.isHorizontal){var _=(0,E.CR)(vl(this.view.viewBBox,c,Ge.BOTTOM),2)[1];d=(0,E.CR)(vl(this.view.coordinateBBox,c,Ge.BOTTOM),2)[0],p=_}else{d=(_=(0,E.CR)(vl(this.view.viewBBox,c,Ge.RIGHT),2)[1],(0,E.CR)(vl(this.view.viewBBox,c,Ge.RIGHT),2))[0],p=_}d+=i[3],p+=i[0],this.scrollbar.component.update((0,E.pi)((0,E.pi)({},f),this.trackLen?{x:d,y:p,trackLen:this.trackLen,thumbLen:this.thumbLen,thumbOffset:(this.trackLen-this.thumbLen)*this.ratio}:{x:d,y:p})),this.view.viewBBox=this.view.viewBBox.cut(c,f.isHorizontal?Ge.BOTTOM:Ge.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,S.U2)(t,["components","scrollbar","common"],{})},r.prototype.getScrollbarTheme=function(t){var n=(0,S.U2)(this.view.getTheme(),["components","scrollbar"]),i=t||{},l=i.thumbHighlightColor,c=(0,E._T)(i,["thumbHighlightColor"]);return{default:(0,S.b$)({},(0,S.U2)(n,["default","style"],{}),c),hover:(0,S.b$)({},(0,S.U2)(n,["hover","style"],{}),{thumbColor:l})}},r.prototype.measureScrollbar=function(){var t=this.view.getXScale(),n=this.view.getYScales().slice();this.data=this.getScrollbarData(),this.step=this.getStep(),this.cnt=this.getCnt();var i=this.getScrollbarComponentCfg(),c=i.thumbLen;this.trackLen=i.trackLen,this.thumbLen=c,this.xScaleCfg={field:t.field,values:t.values||[]},this.yScalesCfg=n},r.prototype.getScrollRange=function(){var t=Math.floor((this.cnt-this.step)*(0,S.uZ)(this.ratio,0,1));return[t,Math.min(t+this.step-1,this.cnt-1)]},r.prototype.changeViewData=function(t,n){var i=this,l=(0,E.CR)(t,2),c=l[0],f=l[1],p="vertical"!==this.getValidScrollbarCfg().type,m=(0,S.I)(this.data,this.xScaleCfg.field),x=this.view.getXScale().isLinear?m.sort(function(T,b){return Number(T)-Number(b)}):m,_=p?x:x.reverse();this.yScalesCfg.forEach(function(T){i.view.scale(T.field,{formatter:T.formatter,type:T.type,min:T.min,max:T.max,tickMethod:T.tickMethod})}),this.view.filter(this.xScaleCfg.field,function(T){var b=_.indexOf(T);return!(b>-1)||_c(b,c,f)}),this.view.render(!0)},r.prototype.createScrollbar=function(){var n="vertical"!==this.getValidScrollbarCfg().type,i=new s_((0,E.pi)((0,E.pi)({container:this.container},this.getScrollbarComponentCfg()),{x:0,y:0}));return i.init(),{component:i,layer:Rn.FORE,direction:n?Ge.BOTTOM:Ge.RIGHT,type:Kn.SCROLLBAR}},r.prototype.updateScrollbar=function(){var t=this.getScrollbarComponentCfg(),n=this.trackLen?(0,E.pi)((0,E.pi)({},t),{trackLen:this.trackLen,thumbLen:this.thumbLen,thumbOffset:(this.trackLen-this.thumbLen)*this.ratio}):(0,E.pi)({},t);return this.scrollbar.component.update(n),this.scrollbar},r.prototype.getStep=function(){if(this.step)return this.step;var t=this.view.coordinateBBox,n=this.getValidScrollbarCfg();return Math.floor(("vertical"!==n.type?t.width:t.height)/n.categorySize)},r.prototype.getCnt=function(){if(this.cnt)return this.cnt;var t=this.view.getXScale(),n=this.getScrollbarData(),i=(0,S.I)(n,t.field);return(0,S.dp)(i)},r.prototype.getScrollbarComponentCfg=function(){var t=this.view,n=t.coordinateBBox,i=t.viewBBox,l=this.getValidScrollbarCfg(),d=l.width,p=l.height,m=l.style,x="vertical"!==l.type,_=(0,E.CR)(l.padding,4),T=_[0],b=_[1],I=_[2],F=_[3],B=x?{x:n.minX+F,y:i.maxY-p-I}:{x:i.maxX-d-b,y:n.minY+T},Y=this.getStep(),G=this.getCnt(),H=x?n.width-F-b:n.height-T-I,et=Math.max(H*(0,S.uZ)(Y/G,0,1),20);return(0,E.pi)((0,E.pi)({},this.getThemeOptions()),{x:B.x,y:B.y,size:x?p:d,isHorizontal:x,trackLen:H,thumbLen:et,thumbOffset:0,theme:this.getScrollbarTheme(m)})},r.prototype.getValidScrollbarCfg=function(){var t={type:"horizontal",categorySize:32,width:8,height:8,padding:[0,0,0,0],animate:!0,style:{}};return(0,S.Kn)(this.option)&&(t=(0,E.pi)((0,E.pi)({},t),this.option)),(!(0,S.Kn)(this.option)||!this.option.padding)&&(t.padding=[0,0,0,0]),t},r.prototype.getScrollbarData=function(){var t=this.view.getCoordinate(),n=this.getValidScrollbarCfg(),i=this.view.getOptions().data||[];return t.isReflect("y")&&"vertical"===n.type&&(i=(0,E.ev)([],(0,E.CR)(i),!1).reverse()),i},r}(Oc);const pR=HM;var gR={fill:"#CCD6EC",opacity:.3};var mR=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.show=function(t){var n=this.context.view,i=this.context.event,l=n.getController("tooltip").getTooltipCfg(),c=function yR(e,r,t){var n,i,l,c,f,d,p=function VL(e,r,t){var n,i,l=um(e,r,t);try{for(var c=(0,E.XA)(e.views),f=c.next();!f.done;f=c.next())l=l.concat(um(f.value,r,t))}catch(p){n={error:p}}finally{try{f&&!f.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}return l}(e,r,t);if(p.length){p=(0,S.xH)(p);try{for(var m=(0,E.XA)(p),x=m.next();!x.done;x=m.next()){var _=x.value;try{for(var T=(l=void 0,(0,E.XA)(_)),b=T.next();!b.done;b=T.next()){var I=b.value,F=I.mappingData,B=F.x,Y=F.y;I.x=(0,S.kJ)(B)?B[B.length-1]:B,I.y=(0,S.kJ)(Y)?Y[Y.length-1]:Y}}catch(le){l={error:le}}finally{try{b&&!b.done&&(c=T.return)&&c.call(T)}finally{if(l)throw l.error}}}}catch(le){n={error:le}}finally{try{x&&!x.done&&(i=m.return)&&i.call(m)}finally{if(n)throw n.error}}if(!1===t.shared&&p.length>1){var H=p[0],et=Math.abs(r.y-H[0].y);try{for(var wt=(0,E.XA)(p),Ot=wt.next();!Ot.done;Ot=wt.next()){var $t=Ot.value,ge=Math.abs(r.y-$t[0].y);ge<=et&&(H=$t,et=ge)}}catch(le){f={error:le}}finally{try{Ot&&!Ot.done&&(d=wt.return)&&d.call(wt)}finally{if(f)throw f.error}}p=[H]}return(0,S.jj)((0,S.xH)(p))}return[]}(n,{x:i.x,y:i.y},l);if(!(0,S.Xy)(c,this.items)&&(this.items=c,c.length)){var f=n.getXScale().field,d=c[0].data[f],p=[];if((0,S.S6)(n.geometries,function(nr){if("interval"===nr.type||"schema"===nr.type){var Ve=nr.getElementsBy(function(je){return je.getData()[f]===d});p=p.concat(Ve)}}),p.length){var x=n.getCoordinate(),_=p[0].shape.getCanvasBBox(),T=p[0].shape.getCanvasBBox(),b=_;(0,S.S6)(p,function(nr){var Ve=nr.shape.getCanvasBBox();x.isTransposed?(Ve.minY<_.minY&&(_=Ve),Ve.maxY>T.maxY&&(T=Ve)):(Ve.minX<_.minX&&(_=Ve),Ve.maxX>T.maxX&&(T=Ve)),b.x=Math.min(Ve.minX,b.minX),b.y=Math.min(Ve.minY,b.minY),b.width=Math.max(Ve.maxX,b.maxX)-b.x,b.height=Math.max(Ve.maxY,b.maxY)-b.y});var I=n.backgroundGroup,F=n.coordinateBBox,B=void 0;if(x.isRect){var Y=n.getXScale(),G=t||{},H=G.appendRatio,et=G.appendWidth;(0,S.UM)(et)&&(H=(0,S.UM)(H)?Y.isLinear?0:.25:H,et=x.isTransposed?H*T.height:H*_.width);var wt=void 0,Ot=void 0,$t=void 0,ge=void 0;x.isTransposed?(wt=F.minX,Ot=Math.min(T.minY,_.minY)-et,$t=F.width,ge=b.height+2*et):(wt=Math.min(_.minX,T.minX)-et,Ot=F.minY,$t=b.width+2*et,ge=F.height),B=[["M",wt,Ot],["L",wt+$t,Ot],["L",wt+$t,Ot+ge],["L",wt,Ot+ge],["Z"]]}else{var le=(0,S.YM)(p),Se=(0,S.Z$)(p),Pe=wc(le.getModel(),x).startAngle,or=wc(Se.getModel(),x).endAngle,cr=x.getCenter(),Rr=x.getRadius();B=Js(cr.x,cr.y,Rr,Pe,or,x.innerRadius*Rr)}if(this.regionPath)this.regionPath.attr("path",B),this.regionPath.show();else{var We=(0,S.U2)(t,"style",gR);this.regionPath=I.addShape({type:"path",name:"active-region",capture:!1,attrs:(0,E.pi)((0,E.pi)({},We),{path:B})})}}}},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}(wn);const d1=mR;var xR=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.timeStamp=0,t}return(0,E.ZT)(r,e),r.prototype.show=function(){var t=this.context,n=t.event,i=t.view;if(!i.isTooltipLocked()){var c=this.timeStamp,f=+new Date;if(f-c>(0,S.U2)(t.view.getOptions(),"tooltip.showDelay",16)){var p=this.location,m={x:n.x,y:n.y};(!p||!(0,S.Xy)(p,m))&&this.showTooltip(i,m),this.timeStamp=f,this.location=m}}},r.prototype.hide=function(){var t=this.context.view,n=t.getController("tooltip"),i=this.context.event;n.isCursorEntered({x:i.clientX,y:i.clientY})||t.isTooltipLocked()||(this.hideTooltip(t),this.location=null)},r.prototype.showTooltip=function(t,n){t.showTooltip(n)},r.prototype.hideTooltip=function(t){t.hideTooltip()},r}(wn);const GM=xR;var CR=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.showTooltip=function(t,n){var i=Yo(t);(0,S.S6)(i,function(l){var c=am(t,l,n);l.showTooltip(c)})},r.prototype.hideTooltip=function(t){var n=Yo(t);(0,S.S6)(n,function(i){i.hideTooltip()})},r}(GM);const wR=CR;var _R=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.timeStamp=0,t}return(0,E.ZT)(r,e),r.prototype.destroy=function(){e.prototype.destroy.call(this),this.tooltip&&this.tooltip.destroy()},r.prototype.show=function(){var n=this.context.event,i=this.timeStamp,l=+new Date;if(l-i>16){var c=this.location,f={x:n.x,y:n.y};(!c||!(0,S.Xy)(c,f))&&this.showTooltip(f),this.timeStamp=l,this.location=f}},r.prototype.hide=function(){this.hideTooltip(),this.location=null},r.prototype.showTooltip=function(t){var l=this.context.event.target;if(l&&l.get("tip")){this.tooltip||this.renderTooltip();var c=l.get("tip");this.tooltip.update((0,E.pi)({title:c},t)),this.tooltip.show()}},r.prototype.hideTooltip=function(){this.tooltip&&this.tooltip.hide()},r.prototype.renderTooltip=function(){var t,n=this.context.view,i=n.canvas,l={start:{x:0,y:0},end:{x:i.get("width"),y:i.get("height")}},c=n.getTheme(),f=(0,S.U2)(c,["components","tooltip","domStyles"],{}),d=new ff({parent:i.get("el").parentNode,region:l,visible:!1,crosshairs:null,domStyles:(0,E.pi)({},(0,S.b$)({},f,(t={},t[ua]={"max-width":"50%"},t[Ho]={"word-break":"break-all"},t)))});d.init(),d.setCapture(!1),this.tooltip=d},r}(wn);const SR=_R;var MR=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.stateName="",t}return(0,E.ZT)(r,e),r.prototype.hasState=function(t){return t.hasState(this.stateName)},r.prototype.setElementState=function(t,n){t.setState(this.stateName,n)},r.prototype.setState=function(){this.setStateEnable(!0)},r.prototype.clear=function(){this.clearViewState(this.context.view)},r.prototype.clearViewState=function(t){var n=this,i=I_(t,this.stateName);(0,S.S6)(i,function(l){n.setElementState(l,!1)})},r}(wn);const Pp=MR;function YM(e){return(0,S.U2)(e.get("delegateObject"),"item")}var Nc=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.ignoreListItemStates=["unchecked"],t}return(0,E.ZT)(r,e),r.prototype.isItemIgnore=function(t,n){return!!this.ignoreListItemStates.filter(function(c){return n.hasState(t,c)}).length},r.prototype.setStateByComponent=function(t,n,i){var l=this.context.view,c=t.get("field"),f=jn(l);this.setElementsStateByItem(f,c,n,i)},r.prototype.setStateByElement=function(t,n){this.setElementState(t,n)},r.prototype.isMathItem=function(t,n,i){var c=Ec(this.context.view,n),f=lo(t,n);return!(0,S.UM)(f)&&i.name===c.getText(f)},r.prototype.setElementsStateByItem=function(t,n,i,l){var c=this;(0,S.S6)(t,function(f){c.isMathItem(f,n,i)&&f.setState(c.stateName,l)})},r.prototype.setStateEnable=function(t){var n=ys(this.context);if(n)b_(this.context)&&this.setStateByElement(n,t);else{var i=gu(this.context);if(pf(i)){var l=i.item,c=i.component;if(l&&c&&!this.isItemIgnore(l,c)){var f=this.context.event.gEvent;if(f&&f.fromShape&&f.toShape&&YM(f.fromShape)===YM(f.toShape))return;this.setStateByComponent(c,l,t)}}}},r.prototype.toggle=function(){var t=ys(this.context);if(t){var n=t.hasState(this.stateName);this.setElementState(t,!n)}},r.prototype.reset=function(){this.setStateEnable(!1)},r}(Pp);const p1=Nc;var TR=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.stateName="active",t}return(0,E.ZT)(r,e),r.prototype.active=function(){this.setState()},r}(p1);const bR=TR;var AR=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.cache={},t}return(0,E.ZT)(r,e),r.prototype.getColorScale=function(t,n){var i=n.geometry.getAttribute("color");return i?t.getScaleByField(i.getFields()[0]):null},r.prototype.getLinkPath=function(t,n){var l=this.context.view.getCoordinate().isTransposed,c=t.shape.getCanvasBBox(),f=n.shape.getCanvasBBox();return l?[["M",c.minX,c.minY],["L",f.minX,f.maxY],["L",f.maxX,f.maxY],["L",c.maxX,c.minY],["Z"]]:[["M",c.maxX,c.minY],["L",f.minX,f.minY],["L",f.minX,f.maxY],["L",c.maxX,c.maxY],["Z"]]},r.prototype.addLinkShape=function(t,n,i,l){var c={opacity:.4,fill:n.shape.attr("fill")};t.addShape({type:"path",attrs:(0,E.pi)((0,E.pi)({},(0,S.b$)({},c,(0,S.mf)(l)?l(c,n):l)),{path:this.getLinkPath(n,i)})})},r.prototype.linkByElement=function(t,n){var i=this,l=this.context.view,c=this.getColorScale(l,t);if(c){var f=lo(t,c.field);if(!this.cache[f]){var d=function em(e,r,t){return jn(e).filter(function(i){return lo(i,r)===t})}(l,c.field,f),m=this.linkGroup.addGroup();this.cache[f]=m;var x=d.length;(0,S.S6)(d,function(_,T){T(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"}(go||(go={})),go))(),PR=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.stateName="active",t}return(0,E.ZT)(r,e),r.prototype.clearViewState=function(t){y1(t)},r.prototype.highlight=function(){var t=this.context,n=t.view,c={view:n,event:t.event,highlightElements:this.getIntersectElements()};n.emit(go.BEFORE_HIGHLIGHT,en.fromData(n,go.BEFORE_HIGHLIGHT,c)),this.setState(),n.emit(go.AFTER_HIGHLIGHT,en.fromData(n,go.AFTER_HIGHLIGHT,c))},r.prototype.clear=function(){var t=this.context.view;t.emit(go.BEFORE_CLEAR,en.fromData(t,go.BEFORE_CLEAR,{})),e.prototype.clear.call(this),t.emit(go.AFTER_CLEAR,en.fromData(t,go.AFTER_CLEAR,{}))},r.prototype.setElementsState=function(t,n,i){XM(i,function(l){return t.indexOf(l)>=0},n)},r}(ws);const $M=PR;var Nf=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.stateName="active",t}return(0,E.ZT)(r,e),r.prototype.highlight=function(){this.setState()},r.prototype.setElementState=function(t,n){XM(jn(this.context.view),function(c){return t===c},n)},r.prototype.clear=function(){y1(this.context.view)},r}(g1);const kR=Nf;var zR=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.stateName="selected",t}return(0,E.ZT)(r,e),r.prototype.selected=function(){this.setState()},r}(ws);const NR=zR;var HR=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.stateName="selected",t}return(0,E.ZT)(r,e),r.prototype.selected=function(){this.setState()},r}(p1);const GR=HR;var YR=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.stateName="selected",t}return(0,E.ZT)(r,e),r.prototype.selected=function(){this.setState()},r}(g1);const bu=YR;var WR=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.stateName="",t.ignoreItemStates=[],t}return(0,E.ZT)(r,e),r.prototype.getTriggerListInfo=function(){var t=gu(this.context),n=null;return pf(t)&&(n={item:t.item,list:t.component}),n},r.prototype.getAllowComponents=function(){var t=this,i=nm(this.context.view),l=[];return(0,S.S6)(i,function(c){c.isList()&&t.allowSetStateByElement(c)&&l.push(c)}),l},r.prototype.hasState=function(t,n){return t.hasState(n,this.stateName)},r.prototype.clearAllComponentsState=function(){var t=this,n=this.getAllowComponents();(0,S.S6)(n,function(i){i.clearItemsState(t.stateName)})},r.prototype.allowSetStateByElement=function(t){var n=t.get("field");if(!n)return!1;if(this.cfg&&this.cfg.componentNames){var i=t.get("name");if(-1===this.cfg.componentNames.indexOf(i))return!1}var c=Ec(this.context.view,n);return c&&c.isCategory},r.prototype.allowSetStateByItem=function(t,n){var i=this.ignoreItemStates;return!i.length||0===i.filter(function(c){return n.hasState(t,c)}).length},r.prototype.setStateByElement=function(t,n,i){var l=t.get("field"),f=Ec(this.context.view,l),d=lo(n,l),p=f.getText(d);this.setItemsState(t,p,i)},r.prototype.setStateEnable=function(t){var n=this,i=ys(this.context);if(i){var l=this.getAllowComponents();(0,S.S6)(l,function(p){n.setStateByElement(p,i,t)})}else{var c=gu(this.context);if(pf(c)){var f=c.item,d=c.component;this.allowSetStateByElement(d)&&this.allowSetStateByItem(f,d)&&this.setItemState(d,f,t)}}},r.prototype.setItemsState=function(t,n,i){var l=this,c=t.getItems();(0,S.S6)(c,function(f){f.name===n&&l.setItemState(t,f,i)})},r.prototype.setItemState=function(t,n,i){t.setItemState(n,this.stateName,i)},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 n=t.list,i=t.item,l=this.hasState(n,i);this.setItemState(n,i,!l)}},r.prototype.clear=function(){var t=this.getTriggerListInfo();t?t.list.clearItemsState(this.stateName):this.clearAllComponentsState()},r}(wn);const Au=WR;var UR=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.stateName="active",t}return(0,E.ZT)(r,e),r.prototype.active=function(){this.setState()},r}(Au);const XR=UR;var ZM="inactive",Hf="inactive",Eu="active",$R=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.stateName=Eu,t.ignoreItemStates=["unchecked"],t}return(0,E.ZT)(r,e),r.prototype.setItemsState=function(t,n,i){this.setHighlightBy(t,function(l){return l.name===n},i)},r.prototype.setItemState=function(t,n,i){t.getItems(),this.setHighlightBy(t,function(c){return c===n},i)},r.prototype.setHighlightBy=function(t,n,i){var l=t.getItems();if(i)(0,S.S6)(l,function(d){n(d)?(t.hasState(d,Hf)&&t.setItemState(d,Hf,!1),t.setItemState(d,Eu,!0)):t.hasState(d,Eu)||t.setItemState(d,Hf,!0)});else{var c=t.getItemsByState(Eu),f=!0;(0,S.S6)(c,function(d){if(!n(d))return f=!1,!1}),f?this.clear():(0,S.S6)(l,function(d){n(d)&&(t.hasState(d,Eu)&&t.setItemState(d,Eu,!1),t.setItemState(d,Hf,!0))})}},r.prototype.highlight=function(){this.setState()},r.prototype.clear=function(){var t=this.getTriggerListInfo();if(t)!function VR(e){var r=e.getItems();(0,S.S6)(r,function(t){e.hasState(t,"active")&&e.setItemState(t,"active",!1),e.hasState(t,ZM)&&e.setItemState(t,ZM,!1)})}(t.list);else{var n=this.getAllowComponents();(0,S.S6)(n,function(i){i.clearItemsState(Eu),i.clearItemsState(Hf)})}},r}(Au);const x1=$R;var C1=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.stateName="selected",t}return(0,E.ZT)(r,e),r.prototype.selected=function(){this.setState()},r}(Au);const ZR=C1;var qR=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.stateName="unchecked",t}return(0,E.ZT)(r,e),r.prototype.unchecked=function(){this.setState()},r}(Au);const zp=qR;var Hc="unchecked",Np="checked",KR=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.stateName=Np,t}return(0,E.ZT)(r,e),r.prototype.setItemState=function(t,n,i){this.setCheckedBy(t,function(l){return l===n},i)},r.prototype.setCheckedBy=function(t,n,i){var l=t.getItems();i&&(0,S.S6)(l,function(c){n(c)?(t.hasState(c,Hc)&&t.setItemState(c,Hc,!1),t.setItemState(c,Np,!0)):t.hasState(c,Np)||t.setItemState(c,Hc,!0)})},r.prototype.toggle=function(){var t=this.getTriggerListInfo();if(t&&t.item){var n=t.list,i=t.item;!(0,S.G)(n.getItems(),function(c){return n.hasState(c,Hc)})||n.hasState(i,Hc)?this.setItemState(n,i,!0):this.reset()}},r.prototype.checked=function(){this.setState()},r.prototype.reset=function(){var t=this.getAllowComponents();(0,S.S6)(t,function(n){n.clearItemsState(Np),n.clearItemsState(Hc)})},r}(Au);const QR=KR;var Gc="unchecked",JR=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.toggle=function(){var t,n,i,l,c,f,d,p,m=this.getTriggerListInfo();if(m?.item){var x=m.list,_=m.item,T=x.getItems(),b=T.filter(function(le){return!x.hasState(le,Gc)}),I=T.filter(function(le){return x.hasState(le,Gc)}),F=b[0];if(T.length===b.length)try{for(var B=(0,E.XA)(T),Y=B.next();!Y.done;Y=B.next())x.setItemState(G=Y.value,Gc,G.id!==_.id)}catch(le){t={error:le}}finally{try{Y&&!Y.done&&(n=B.return)&&n.call(B)}finally{if(t)throw t.error}}else if(T.length-I.length==1)if(F.id===_.id)try{for(var H=(0,E.XA)(T),et=H.next();!et.done;et=H.next())x.setItemState(G=et.value,Gc,!1)}catch(le){i={error:le}}finally{try{et&&!et.done&&(l=H.return)&&l.call(H)}finally{if(i)throw i.error}}else try{for(var wt=(0,E.XA)(T),Ot=wt.next();!Ot.done;Ot=wt.next())x.setItemState(G=Ot.value,Gc,G.id!==_.id)}catch(le){c={error:le}}finally{try{Ot&&!Ot.done&&(f=wt.return)&&f.call(wt)}finally{if(c)throw c.error}}else try{for(var $t=(0,E.XA)(T),ge=$t.next();!ge.done;ge=$t.next()){var G;x.setItemState(G=ge.value,Gc,G.id!==_.id)}}catch(le){d={error:le}}finally{try{ge&&!ge.done&&(p=$t.return)&&p.call($t)}finally{if(d)throw d.error}}}},r}(Au);const KM=JR;var QM="showRadio",w1="legend-radio-tip",jR=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.timeStamp=0,t}return(0,E.ZT)(r,e),r.prototype.show=function(){var t=this.getTriggerListInfo();t?.item&&t.list.setItemState(t.item,QM,!0)},r.prototype.hide=function(){var t=this.getTriggerListInfo();t?.item&&t.list.setItemState(t.item,QM,!1)},r.prototype.destroy=function(){e.prototype.destroy.call(this),this.tooltip&&this.tooltip.destroy()},r.prototype.showTip=function(){var n=this.context.event,i=this.timeStamp,l=+new Date;if(l-i>16&&"legend-item-radio"===this.context.event.target.get("name")){var f=this.location,d={x:n.x,y:n.y};this.timeStamp=l,this.location=d,(!f||!(0,S.Xy)(f,d))&&this.showTooltip(d)}},r.prototype.hideTip=function(){this.hideTooltip(),this.location=null},r.prototype.showTooltip=function(t){var n=this.context,l=n.event.target;if(l&&l.get("tip")){this.tooltip||this.renderTooltip();var c=n.view.getCanvas().get("el").getBoundingClientRect(),f=c.x,d=c.y;this.tooltip.update((0,E.pi)((0,E.pi)({title:l.get("tip")},t),{x:t.x+f,y:t.y+d})),this.tooltip.show()}},r.prototype.hideTooltip=function(){this.tooltip&&this.tooltip.hide()},r.prototype.renderTooltip=function(){var t,n=((t={})[ua]={padding:"6px 8px",transform:"translate(-50%, -80%)",background:"rgba(0,0,0,0.75)",color:"#fff","border-radius":"2px","z-index":100},t[Ho]={"font-size":"12px","line-height":"14px","margin-bottom":0,"word-break":"break-all"},t);document.getElementById(w1)&&document.body.removeChild(document.getElementById(w1));var i=new ff({parent:document.body,region:null,visible:!1,crosshairs:null,domStyles:n,containerId:w1});i.init(),i.setCapture(!1),this.tooltip=i},r}(Au);const JM=jR;var tF=function(e){function r(){var t=null!==e&&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(0,E.ZT)(r,e),r.prototype.getCurrentPoint=function(){var t=this.context.event;return{x:t.x,y:t.y}},r.prototype.emitEvent=function(t){var n="mask:".concat(t),l=this.context.event;this.context.view.emit(n,{target:this.maskShape,shape:this.maskShape,points:this.points,x:l.x,y:l.y})},r.prototype.createMask=function(){var t=this.context.view,n=this.getMaskAttrs();return t.foregroundGroup.addShape({type:this.shapeType,name:"mask",draggable:!0,attrs:(0,E.pi)({fill:"#C5D4EB",opacity:.3},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?.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(),n=this.preMovePoint,i=t.x-n.x,l=t.y-n.y;(0,S.S6)(this.points,function(f){f.x+=i,f.y+=l}),this.updateMask(),this.emitEvent("change"),this.preMovePoint=t}},r.prototype.updateMask=function(t){var n=(0,S.b$)({},this.getMaskAttrs(),t);this.maskShape.attr(n)},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}(wn);const _1=tF;function jM(e){var r=(0,S.Z$)(e),t=0,n=0,i=0;if(e.length){var l=e[0];t=im(l,r)/2,n=(r.x+l.x)/2,i=(r.y+l.y)/2}return{x:n,y:i,r:t}}var eF=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.shapeType="circle",t}return(0,E.ZT)(r,e),r.prototype.getMaskAttrs=function(){return jM(this.points)},r}(_1);const rF=eF;function tT(e){return{start:(0,S.YM)(e),end:(0,S.Z$)(e)}}function eT(e,r){return{x:Math.min(e.x,r.x),y:Math.min(e.y,r.y),width:Math.abs(r.x-e.x),height:Math.abs(r.y-e.y)}}var nF=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.shapeType="rect",t}return(0,E.ZT)(r,e),r.prototype.getRegion=function(){return tT(this.points)},r.prototype.getMaskAttrs=function(){var t=this.getRegion();return eT(t.start,t.end)},r}(_1);const S1=nF;function rT(e){e.x=(0,S.uZ)(e.x,0,1),e.y=(0,S.uZ)(e.y,0,1)}function nT(e,r,t,n){var i=null,l=null,c=n.invert((0,S.YM)(e)),f=n.invert((0,S.Z$)(e));return t&&(rT(c),rT(f)),"x"===r?(i=n.convert({x:c.x,y:0}),l=n.convert({x:f.x,y:1})):(i=n.convert({x:0,y:c.y}),l=n.convert({x:1,y:f.y})),{start:i,end:l}}var iF=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.dim="x",t.inPlot=!0,t}return(0,E.ZT)(r,e),r.prototype.getRegion=function(){var t=this.context.view.getCoordinate();return nT(this.points,this.dim,this.inPlot,t)},r}(S1);const M1=iF;function T1(e){var r=[];return e.length&&((0,S.S6)(e,function(t,n){r.push(0===n?["M",t.x,t.y]:["L",t.x,t.y])}),r.push(["L",e[0].x,e[0].y])),r}function iT(e){return{path:T1(e)}}var aF=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getMaskPath=function(){return T1(this.points)},r.prototype.getMaskAttrs=function(){return iT(this.points)},r.prototype.addPoint=function(){this.resize()},r}(_1);const aT=aF;function b1(e){return function bL(e,r){if(e.length<=2)return df(e,!1);var t=e[0],n=[];(0,S.S6)(e,function(l){n.push(l.x),n.push(l.y)});var i=Kd(n,r,null);return i.unshift(["M",t.x,t.y]),i}(e,!0)}function oT(e){return{path:b1(e)}}var sT=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getMaskPath=function(){return b1(this.points)},r.prototype.getMaskAttrs=function(){return oT(this.points)},r}(aT);const oF=sT;var lT=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.maskShapes=[],t.starting=!1,t.moving=!1,t.recordPoints=null,t.preMovePoint=null,t.shapeType="path",t.maskType="multi-mask",t}return(0,E.ZT)(r,e),r.prototype.getCurrentPoint=function(){var t=this.context.event;return{x:t.x,y:t.y}},r.prototype.emitEvent=function(t){var n="".concat(this.maskType,":").concat(t),l=this.context.event,c={type:this.shapeType,name:this.maskType,get:function(f){return c.hasOwnProperty(f)?c[f]:void 0}};this.context.view.emit(n,{target:c,maskShapes:this.maskShapes,multiPoints:this.recordPoints,x:l.x,y:l.y})},r.prototype.createMask=function(t){var n=this.context.view,l=this.getMaskAttrs(this.recordPoints[t]),c=n.foregroundGroup.addShape({type:this.shapeType,name:"mask",draggable:!0,attrs:(0,E.pi)({fill:"#C5D4EB",opacity:.3},l)});this.maskShapes.push(c)},r.prototype.getMaskPath=function(t){return[]},r.prototype.show=function(){this.maskShapes.length>0&&(this.maskShapes.forEach(function(t){return t.show()}),this.emitEvent("show"))},r.prototype.start=function(t){this.recordPointStart(),this.starting=!0,this.moving=!1,this.createMask(this.recordPoints.length-1),this.updateShapesCapture(!1),this.updateMask(t?.maskStyle),this.emitEvent("start")},r.prototype.moveStart=function(){this.moving=!0,this.preMovePoint=this.getCurrentPoint(),this.updateShapesCapture(!1)},r.prototype.move=function(){if(this.moving&&0!==this.maskShapes.length){var t=this.getCurrentPoint(),n=this.preMovePoint,i=t.x-n.x,l=t.y-n.y,c=this.getCurMaskShapeIndex();c>-1&&(this.recordPoints[c].forEach(function(f){f.x+=i,f.y+=l}),this.updateMask(),this.emitEvent("change"),this.preMovePoint=t)}},r.prototype.updateMask=function(t){var n=this;this.recordPoints.forEach(function(i,l){var c=(0,S.b$)({},n.getMaskAttrs(i),t);n.maskShapes[l].attr(c)})},r.prototype.resize=function(){this.starting&&this.maskShapes.length>0&&(this.recordPointContinue(),this.updateMask(),this.emitEvent("change"))},r.prototype.moveEnd=function(){this.moving=!1,this.preMovePoint=null,this.updateShapesCapture(!0)},r.prototype.end=function(){this.starting=!1,this.emitEvent("end"),this.updateShapesCapture(!0)},r.prototype.hide=function(){this.maskShapes.length>0&&(this.maskShapes.forEach(function(t){return t.hide()}),this.emitEvent("hide"))},r.prototype.remove=function(){var t=this.getCurMaskShapeIndex();t>-1&&(this.recordPoints.splice(t,1),this.maskShapes[t].remove(),this.maskShapes.splice(t,1),this.preMovePoint=null,this.updateShapesCapture(!0),this.emitEvent("change"))},r.prototype.clearAll=function(){this.recordPointClear(),this.maskShapes.forEach(function(t){return t.remove()}),this.maskShapes=[],this.preMovePoint=null},r.prototype.clear=function(){var t=this.getCurMaskShapeIndex();-1===t?(this.recordPointClear(),this.maskShapes.forEach(function(n){return n.remove()}),this.maskShapes=[],this.emitEvent("clearAll")):(this.recordPoints.splice(t,1),this.maskShapes[t].remove(),this.maskShapes.splice(t,1),this.preMovePoint=null,this.emitEvent("clearSingle")),this.preMovePoint=null},r.prototype.destroy=function(){this.clear(),e.prototype.destroy.call(this)},r.prototype.getRecordPoints=function(){var t;return(0,E.ev)([],(0,E.CR)(null!==(t=this.recordPoints)&&void 0!==t?t:[]),!1)},r.prototype.recordPointStart=function(){var t=this.getRecordPoints(),n=this.getCurrentPoint();this.recordPoints=(0,E.ev)((0,E.ev)([],(0,E.CR)(t),!1),[[n]],!1)},r.prototype.recordPointContinue=function(){var t=this.getRecordPoints(),n=this.getCurrentPoint(),i=t.splice(-1,1)[0]||[];i.push(n),this.recordPoints=(0,E.ev)((0,E.ev)([],(0,E.CR)(t),!1),[i],!1)},r.prototype.recordPointClear=function(){this.recordPoints=[]},r.prototype.updateShapesCapture=function(t){this.maskShapes.forEach(function(n){return n.set("capture",t)})},r.prototype.getCurMaskShapeIndex=function(){var t=this.getCurrentPoint();return this.maskShapes.findIndex(function(n){var i=n.attrs;return!(0===i.width||0===i.height||0===i.r)&&n.isHit(t.x,t.y)})},r}(wn);const A1=lT;var sF=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.shapeType="rect",t}return(0,E.ZT)(r,e),r.prototype.getRegion=function(t){return tT(t)},r.prototype.getMaskAttrs=function(t){var n=this.getRegion(t);return eT(n.start,n.end)},r}(A1);const uT=sF;var cT=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.dim="x",t.inPlot=!0,t}return(0,E.ZT)(r,e),r.prototype.getRegion=function(t){var n=this.context.view.getCoordinate();return nT(t,this.dim,this.inPlot,n)},r}(uT);const hT=cT;var lF=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.shapeType="circle",t.getMaskAttrs=jM,t}return(0,E.ZT)(r,e),r}(A1);const uF=lF;var cF=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.getMaskPath=T1,t.getMaskAttrs=iT,t}return(0,E.ZT)(r,e),r.prototype.addPoint=function(){this.resize()},r}(A1);const fT=cF;var E1=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.getMaskPath=b1,t.getMaskAttrs=oT,t}return(0,E.ZT)(r,e),r}(fT);const hF=E1;var fF=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.setCursor=function(t){this.context.view.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}(wn);const vF=fF;var dF=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.filterView=function(t,n,i){var l=this;t.getScaleByField(n)&&t.filter(n,i),t.views&&t.views.length&&(0,S.S6)(t.views,function(c){l.filterView(c,n,i)})},r.prototype.filter=function(){var t=gu(this.context);if(t){var n=this.context.view,i=t.component,l=i.get("field");if(pf(t)){if(l){var c=i.getItemsByState("unchecked"),f=Ec(n,l),d=c.map(function(T){return T.name});this.filterView(n,l,d.length?function(T){var b=f.getText(T);return!d.includes(b)}:null),n.render(!0)}}else if(A_(t)){var p=i.getValue(),m=(0,E.CR)(p,2),x=m[0],_=m[1];this.filterView(n,l,function(T){return T>=x&&T<=_}),n.render(!0)}}},r}(wn);const pF=dF;function vT(e,r,t,n){var i=Math.min(t[r],n[r]),l=Math.max(t[r],n[r]),c=(0,E.CR)(e.range,2),f=c[0],d=c[1];if(id&&(l=d),i===d&&l===d)return null;var p=e.invert(i),m=e.invert(l);if(e.isCategory){var x=e.values.indexOf(p),_=e.values.indexOf(m),T=e.values.slice(x,_+1);return function(b){return T.includes(b)}}return function(b){return b>=p&&b<=m}}var Ti=(()=>(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"}(Ti||(Ti={})),Ti))(),gF=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.dims=["x","y"],t.startPoint=null,t.isStarted=!1,t}return(0,E.ZT)(r,e),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,n;if(gf(this.context)){var l=this.context.event.target.getCanvasBBox();t={x:l.x,y:l.y},n={x:l.maxX,y:l.maxY}}else{if(!this.isStarted)return;t=this.startPoint,n=this.context.getCurrentPoint()}if(!(Math.abs(t.x-n.x)<5||Math.abs(t.x-n.y)<5)){var c=this.context,f=c.view,p={view:f,event:c.event,dims:this.dims};f.emit(Ti.BEFORE_FILTER,en.fromData(f,Ti.BEFORE_FILTER,p));var m=f.getCoordinate(),x=m.invert(n),_=m.invert(t);if(this.hasDim("x")){var T=f.getXScale(),b=vT(T,"x",x,_);this.filterView(f,T.field,b)}if(this.hasDim("y")){var I=f.getYScales()[0];b=vT(I,"y",x,_),this.filterView(f,I.field,b)}this.reRender(f,{source:Ti.FILTER}),f.emit(Ti.AFTER_FILTER,en.fromData(f,Ti.AFTER_FILTER,p))}},r.prototype.end=function(){this.isStarted=!1},r.prototype.reset=function(){var t=this.context.view;if(t.emit(Ti.BEFORE_RESET,en.fromData(t,Ti.BEFORE_RESET,{})),this.isStarted=!1,this.hasDim("x")){var n=t.getXScale();this.filterView(t,n.field,null)}if(this.hasDim("y")){var i=t.getYScales()[0];this.filterView(t,i.field,null)}this.reRender(t,{source:Ti.RESET}),t.emit(Ti.AFTER_RESET,en.fromData(t,Ti.AFTER_RESET,{}))},r.prototype.filterView=function(t,n,i){t.filter(n,i)},r.prototype.reRender=function(t,n){t.render(!0,n)},r}(wn);const Hp=gF;var dT=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.filterView=function(t,n,i){var l=Yo(t);(0,S.S6)(l,function(c){c.filter(n,i)})},r.prototype.reRender=function(t){var n=Yo(t);(0,S.S6)(n,function(i){i.render(!0)})},r}(Hp);const L1=dT;var yF=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.filter=function(){var t=gu(this.context),n=this.context.view,i=jn(n);if(gf(this.context)){var l=Xa(this.context,10);l&&(0,S.S6)(i,function(I){l.includes(I)?I.show():I.hide()})}else if(t){var c=t.component,f=c.get("field");if(pf(t)){if(f){var d=c.getItemsByState("unchecked"),p=Ec(n,f),m=d.map(function(I){return I.name});(0,S.S6)(i,function(I){var F=lo(I,f),B=p.getText(F);m.indexOf(B)>=0?I.hide():I.show()})}}else if(A_(t)){var x=c.getValue(),_=(0,E.CR)(x,2),T=_[0],b=_[1];(0,S.S6)(i,function(I){var F=lo(I,f);F>=T&&F<=b?I.show():I.hide()})}}},r.prototype.clear=function(){var t=jn(this.context.view);(0,S.S6)(t,function(n){n.show()})},r.prototype.reset=function(){this.clear()},r}(wn);const I1=yF;var Gf=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.byRecord=!1,t}return(0,E.ZT)(r,e),r.prototype.filter=function(){gf(this.context)&&(this.byRecord?this.filterByRecord():this.filterByBBox())},r.prototype.filterByRecord=function(){var t=this.context.view,n=Xa(this.context,10);if(n){var i=t.getXScale().field,l=t.getYScales()[0].field,c=n.map(function(d){return d.getModel().data}),f=Yo(t);(0,S.S6)(f,function(d){var p=jn(d);(0,S.S6)(p,function(m){var x=m.getModel().data;F_(c,x,i,l)?m.show():m.hide()})})}},r.prototype.filterByBBox=function(){var t=this,i=Yo(this.context.view);(0,S.S6)(i,function(l){var c=E_(t.context,l,10),f=jn(l);c&&(0,S.S6)(f,function(d){c.includes(d)?d.show():d.hide()})})},r.prototype.reset=function(){var t=Yo(this.context.view);(0,S.S6)(t,function(n){var i=jn(n);(0,S.S6)(i,function(l){l.show()})})},r}(wn);const pT=Gf;var xF=function(e){function r(){var t=null!==e&&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(0,E.ZT)(r,e),r.prototype.getButtonCfg=function(){return(0,S.b$)(this.buttonCfg,this.cfg)},r.prototype.drawButton=function(){var t=this.getButtonCfg(),n=this.context.view.foregroundGroup.addGroup({name:t.name}),l=n.addShape({type:"text",name:"button-text",attrs:(0,E.pi)({text:t.text},t.textStyle)}).getBBox(),c=cm(t.padding),f=n.addShape({type:"rect",name:"button-rect",attrs:(0,E.pi)({x:l.x-c[3],y:l.y-c[0],width:l.width+c[1]+c[3],height:l.height+c[0]+c[2]},t.style)});f.toBack(),n.on("mouseenter",function(){f.attr(t.activeStyle)}),n.on("mouseleave",function(){f.attr(t.style)}),this.buttonGroup=n},r.prototype.resetPosition=function(){var i=this.context.view.getCoordinate().convert({x:1,y:1}),l=this.buttonGroup,c=l.getBBox(),f=Zr.vs(null,[["t",i.x-c.width-10,i.y+c.height+5]]);l.setMatrix(f)},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}(wn);const CF=xF;var R1=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.starting=!1,t.dragStart=!1,t}return(0,E.ZT)(r,e),r.prototype.start=function(){this.starting=!0,this.startPoint=this.context.getCurrentPoint()},r.prototype.drag=function(){if(this.startPoint){var t=this.context.getCurrentPoint(),n=this.context.view,i=this.context.event;this.dragStart?n.emit("drag",{target:i.target,x:i.x,y:i.y}):im(t,this.startPoint)>4&&(n.emit("dragstart",{target:i.target,x:i.x,y:i.y}),this.dragStart=!0)}},r.prototype.end=function(){if(this.dragStart){var n=this.context.event;this.context.view.emit("dragend",{target:n.target,x:n.x,y:n.y})}this.starting=!1,this.dragStart=!1},r}(wn);const wF=R1;var yT=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.starting=!1,t.isMoving=!1,t.startPoint=null,t.startMatrix=null,t}return(0,E.ZT)(r,e),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,n=this.context.getCurrentPoint();if(im(t,n)>5&&!this.isMoving&&(this.isMoving=!0),this.isMoving){var l=this.context.view,c=Zr.vs(this.startMatrix,[["t",n.x-t.x,n.y-t.y]]);l.backgroundGroup.setMatrix(c),l.foregroundGroup.setMatrix(c),l.middleGroup.setMatrix(c)}}},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}(wn);const SF=yT;var Yc="x",mT="y",xT=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.dims=[Yc,mT],t.cfgFields=["dims"],t.cacheScaleDefs={},t}return(0,E.ZT)(r,e),r.prototype.hasDim=function(t){return this.dims.includes(t)},r.prototype.getScale=function(t){var n=this.context.view;return"x"===t?n.getXScale():n.getYScales()[0]},r.prototype.resetDim=function(t){var n=this.context.view;if(this.hasDim(t)&&this.cacheScaleDefs[t]){var i=this.getScale(t);n.scale(i.field,this.cacheScaleDefs[t]),this.cacheScaleDefs[t]=null}},r.prototype.reset=function(){this.resetDim(Yc),this.resetDim(mT),this.context.view.render(!0)},r}(wn);const F1=xT;var D1=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.startPoint=null,t.starting=!1,t.startCache={},t}return(0,E.ZT)(r,e),r.prototype.start=function(){var t=this;this.startPoint=this.context.getCurrentPoint(),this.starting=!0,(0,S.S6)(this.dims,function(i){var l=t.getScale(i);t.startCache[i]={min:l.min,max:l.max,values:l.values}})},r.prototype.end=function(){this.startPoint=null,this.starting=!1,this.startCache={}},r.prototype.translate=function(){var t=this;if(this.starting){var n=this.startPoint,i=this.context.view.getCoordinate(),l=this.context.getCurrentPoint(),c=i.invert(n),f=i.invert(l),d=f.x-c.x,p=f.y-c.y,m=this.context.view;(0,S.S6)(this.dims,function(_){t.translateDim(_,{x:-1*d,y:-1*p})}),m.render(!0)}},r.prototype.translateDim=function(t,n){if(this.hasDim(t)){var i=this.getScale(t);i.isLinear&&this.translateLinear(t,i,n)}},r.prototype.translateLinear=function(t,n,i){var l=this.context.view,c=this.startCache[t],f=c.min,d=c.max,m=i[t]*(d-f);this.cacheScaleDefs[t]||(this.cacheScaleDefs[t]={nice:n.nice,min:f,max:d}),l.scale(n.field,{nice:!1,min:f+m,max:d+m})},r.prototype.reset=function(){e.prototype.reset.call(this),this.startPoint=null,this.starting=!1},r}(F1);const MF=D1;var TF=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.zoomRatio=.05,t}return(0,E.ZT)(r,e),r.prototype.zoomIn=function(){this.zoom(this.zoomRatio)},r.prototype.zoom=function(t){var n=this;(0,S.S6)(this.dims,function(l){n.zoomDim(l,t)}),this.context.view.render(!0)},r.prototype.zoomOut=function(){this.zoom(-1*this.zoomRatio)},r.prototype.zoomDim=function(t,n){if(this.hasDim(t)){var i=this.getScale(t);i.isLinear&&this.zoomLinear(t,i,n)}},r.prototype.zoomLinear=function(t,n,i){var l=this.context.view;this.cacheScaleDefs[t]||(this.cacheScaleDefs[t]={nice:n.nice,min:n.min,max:n.max});var c=this.cacheScaleDefs[t],f=c.max-c.min,d=n.min,p=n.max,m=i*f,x=d-m,_=p+m,b=(_-x)/f;_>x&&b<100&&b>.01&&l.scale(n.field,{nice:!1,min:d-m,max:p+m})},r}(F1);const bF=TF;var LF=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.scroll=function(t){var n=this.context,i=n.view,l=n.event;if(i.getOptions().scrollbar){var c=t?.wheelDelta||1,f=i.getController("scrollbar"),d=i.getXScale(),p=i.getOptions().data,m=(0,S.dp)((0,S.I)(p,d.field)),x=(0,S.dp)(d.values),_=f.getValue(),b=Math.floor((m-x)*_)+(function AF(e){return e.gEvent.originalEvent.deltaY>0}(l)?c:-c),F=(0,S.uZ)(b/(m-x)+c/(m-x)/1e4,0,1);f.setValue(F)}},r}(wn);const IF=LF;var RF=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.show=function(){var t=this.context,i=gu(t).axis.cfg.title,l=i.description,c=i.text,f=i.descriptionTooltipStyle,d=t.event,p=d.x,m=d.y;this.tooltip||this.renderTooltip(),this.tooltip.update({title:c||"",customContent:function(){return'\n
    \n
    \n \u5b57\u6bb5\u8bf4\u660e\uff1a').concat(l,"\n
    \n
    \n ")},x:p,y:m}),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.canvas,l={start:{x:0,y:0},end:{x:i.get("width"),y:i.get("height")}},c=new ff({parent:i.get("el").parentNode,region:l,visible:!1,containerId:"aixs-description-tooltip",domStyles:(0,E.pi)({},(0,S.b$)({},(t={},t[ua]={"max-width":"50%",padding:"10px","line-height":"15px","font-size":"12px",color:"rgba(0, 0, 0, .65)"},t[Ho]={"word-break":"break-all","margin-bottom":"3px"},t)))});c.init(),c.setCapture(!1),this.tooltip=c},r}(wn);const FF=RF;function _s(e){return e.isInPlot()}function B1(e){return e.gEvent.preventDefault(),e.gEvent.originalEvent.deltaY>0}(function GL(e,r){sm[(0,S.vl)(e)]=Qd(r)})("dark",om(y5)),Vv("canvas",se),Vv("svg",me),Wo("Polygon",UI),Wo("Interval",zI),Wo("Schema",VI),Wo("Path",Xm),Wo("Point",YI),Wo("Line",Vi),Wo("Area",Ef),Wo("Edge",RI),Wo("Heatmap",DI),Wo("Violin",oM),xf("base",_f),xf("interval",cO),xf("pie",vO),xf("polar",cM),fa("overlap",function MO(e,r,t,n){var i=new If;(0,S.S6)(r,function(l){for(var c=l.find(function(T){return"text"===T.get("type")}),f=c.attr(),d=f.x,p=f.y,m=!1,x=0;x<=8;x++){var _=_O(c,d,p,x);if(i.hasGap(_)){i.fillGap(_),m=!0;break}}m||l.remove(!0)}),i.destroy()}),fa("distribute",function pO(e,r,t,n){if(e.length&&r.length){var i=e[0]?e[0].offset:0,l=r[0].get("coordinate"),c=l.getRadius(),f=l.getCenter();if(i>0){var m=2*(c+i)+28,x={start:l.start,end:l.end},_=[[],[]];e.forEach(function(T){T&&("right"===T.textAlign?_[0].push(T):_[1].push(T))}),_.forEach(function(T,b){var I=m/14;T.length>I&&(T.sort(function(F,B){return B["..percent"]-F["..percent"]}),T.splice(I,T.length-I)),T.sort(function(F,B){return F.y-B.y}),function dO(e,r,t,n,i,l){var c,f,T,d=!0,p=n.start,m=n.end,x=Math.min(p.y,m.y),_=Math.abs(p.y-m.y),b=0,I=Number.MIN_VALUE,F=r.map(function(Ot){return Ot.y>b&&(b=Ot.y),Ot.y_&&(_=b-x);d;)for(F.forEach(function(Ot){var $t=(Math.min.apply(I,Ot.targets)+Math.max.apply(I,Ot.targets))/2;Ot.pos=Math.min(Math.max(I,$t-Ot.size/2),_-Ot.size)}),d=!1,T=F.length;T--;)if(T>0){var B=F[T-1],Y=F[T];B.pos+B.size>Y.pos&&(B.size+=Y.size,B.targets=B.targets.concat(Y.targets),B.pos+B.size>_&&(B.pos=_-B.size),F.splice(T,1),d=!0)}T=0,F.forEach(function(Ot){var $t=x+t/2;Ot.targets.forEach(function(){r[T].y=Ot.pos+$t,$t+=t,T++})});var G={};try{for(var H=(0,E.XA)(e),et=H.next();!et.done;et=H.next()){var wt=et.value;G[wt.get("id")]=wt}}catch(Ot){c={error:Ot}}finally{try{et&&!et.done&&(f=H.return)&&f.call(H)}finally{if(c)throw c.error}}r.forEach(function(Ot){var $t=Ot.r*Ot.r,ge=Math.pow(Math.abs(Ot.y-i.y),2);if($tf.maxX||c.maxY>f.maxY)&&i.remove(!0)})}),fa("limit-in-canvas",function mO(e,r,t,n){(0,S.S6)(r,function(i){var l=n.minX,c=n.minY,f=n.maxX,d=n.maxY,p=i.getCanvasBBox(),m=p.minX,x=p.minY,_=p.maxX,T=p.maxY,b=p.x,I=p.y,Y=b,G=I;(mf?Y=f-p.width:_>f&&(Y-=_-f),x>d?G=d-p.height:T>d&&(G-=T-d),(Y!==b||G!==I)&&Rc(i,Y-b,G-I)})}),fa("limit-in-plot",function NO(e,r,t,n,i){if(!(r.length<=0)){var l=i?.direction||["top","right","bottom","left"],c=i?.action||"translate",f=i?.margin||0,d=r[0].get("coordinate");if(d){var p=function cL(e,r){void 0===r&&(r=0);var t=e.start,n=e.end,i=e.getWidth(),l=e.getHeight(),c=Math.min(t.x,n.x),f=Math.min(t.y,n.y);return Xi.fromRange(c-r,f-r,c+i+r,f+l+r)}(d,f),m=p.minX,x=p.minY,_=p.maxX,T=p.maxY;(0,S.S6)(r,function(b){var I=b.getCanvasBBox(),F=I.minX,B=I.minY,Y=I.maxX,G=I.maxY,H=I.x,et=I.y,wt=I.width,Ot=I.height,$t=H,ge=et;if(l.indexOf("left")>=0&&(F=0&&(B=0&&(F>_?$t=_-wt:Y>_&&($t-=Y-_)),l.indexOf("bottom")>=0&&(B>T?ge=T-Ot:G>T&&(ge-=G-T)),$t!==H||ge!==et){var le=$t-H;"translate"===c?Rc(b,le,ge-et):"ellipsis"===c?b.findAll(function(Pe){return"text"===Pe.get("type")}).forEach(function(Pe){var or=(0,S.ei)(Pe.attr(),["fontSize","fontFamily","fontWeight","fontStyle","fontVariant"]),cr=Pe.getCanvasBBox(),Rr=function(e,r,t){var l,i=Ep("...",t);l=(0,S.HD)(e)?e:(0,S.BB)(e);var d,p,c=r,f=[];if(Ep(e,t)<=r)return e;for(;d=l.substr(0,16),!((p=Ep(d,t))+i>c&&p>c);)if(f.push(d),c-=p,!(l=l.substr(16)))return f.join("");for(;d=l.substr(0,1),!((p=Ep(d,t))+i>c);)if(f.push(d),c-=p,!(l=l.substr(1)))return f.join("");return"".concat(f.join(""),"...")}(Pe.attr("text"),cr.width-Math.abs(le),or);Pe.attr("text",Rr)}):b.hide()}})}}}),fa("pie-outer",function Mp(e,r,t,n){var i,l,c=(0,S.hX)(e,function($t){return!(0,S.UM)($t)}),f=r[0]&&r[0].get("coordinate");if(f){var d=f.getCenter(),p=f.getRadius(),m={};try{for(var x=(0,E.XA)(r),_=x.next();!_.done;_=x.next()){var T=_.value;m[T.get("id")]=T}}catch($t){i={error:$t}}finally{try{_&&!_.done&&(l=x.return)&&l.call(x)}finally{if(i)throw i.error}}var b=(0,S.U2)(c[0],"labelHeight",14),I=(0,S.U2)(c[0],"offset",0);if(!(I<=0)){var B="right",Y=(0,S.vM)(c,function($t){return $t.xle&&($t.sort(function(Se,Pe){return Pe.percent-Se.percent}),(0,S.S6)($t,function(Se,Pe){Pe+1>le&&(m[Se.id].set("visible",!1),Se.invisible=!0)})),Sp($t,b,Ot)}),(0,S.S6)(Y,function($t,ge){(0,S.S6)($t,function(le){var Se=ge===B,or=m[le.id].getChildByIndex(0);if(or){var cr=p+I,Rr=le.y-d.y,Ie=Math.pow(cr,2),We=Math.pow(Rr,2),Ve=Math.sqrt(Ie-We>0?Ie-We:0),je=Math.abs(Math.cos(le.angle)*cr);le.x=Se?d.x+Math.max(Ve,je):d.x-Math.max(Ve,je)}or&&(or.attr("y",le.y),or.attr("x",le.x)),function gO(e,r){var t=r.getCenter(),n=r.getRadius();if(e&&e.labelLine){var i=e.angle,l=e.offset,c=$n(t.x,t.y,n,i),f=e.x+(0,S.U2)(e,"offsetX",0)*(Math.cos(i)>0?1:-1),d=e.y+(0,S.U2)(e,"offsetY",0)*(Math.sin(i)>0?1:-1),p={x:f-4*Math.cos(i),y:d-4*Math.sin(i)},m=e.labelLine.smooth,x=[],_=p.x-t.x,b=Math.atan((p.y-t.y)/_);if(_<0&&(b+=Math.PI),!1===m){(0,S.Kn)(e.labelLine)||(e.labelLine={});var I=0;(i<0&&i>-Math.PI/2||i>1.5*Math.PI)&&p.y>c.y&&(I=1),i>=0&&ic.y&&(I=1),i>=Math.PI/2&&ip.y&&(I=1),(i<-Math.PI/2||i>=Math.PI&&i<1.5*Math.PI)&&c.y>p.y&&(I=1);var F=l/2>4?4:Math.max(l/2-1,0),B=$n(t.x,t.y,n+F,i),Y=$n(t.x,t.y,n+l/2,b);x.push("M ".concat(c.x," ").concat(c.y)),x.push("L ".concat(B.x," ").concat(B.y)),x.push("A ".concat(t.x," ").concat(t.y," 0 ").concat(0," ").concat(I," ").concat(Y.x," ").concat(Y.y)),x.push("L ".concat(p.x," ").concat(p.y))}else{B=$n(t.x,t.y,n+(l/2>4?4:Math.max(l/2-1,0)),i);var H=c.xMath.pow(Math.E,-16)&&x.push.apply(x,["C",p.x+4*H,p.y,2*B.x-c.x,2*B.y-c.y,c.x,c.y]),x.push("L ".concat(c.x," ").concat(c.y))}e.labelLine.path=x.join(" ")}}(le,f)})})}}}),fa("adjust-color",function OO(e,r,t){if(0!==t.length){var i=t[0].get("element").geometry.theme,l=i.labels||{},c=l.fillColorLight,f=l.fillColorDark;t.forEach(function(d,p){var x=r[p].find(function(B){return"text"===B.get("type")}),_=Xi.fromObject(d.getBBox()),T=Xi.fromObject(x.getCanvasBBox()),b=!_.contains(T),F=function(e){var r=Vs.toRGB(e).toUpperCase();if(xM[r])return xM[r];var t=(0,E.CR)(Vs.rgb2arr(r),3);return(299*t[0]+587*t[1]+114*t[2])/1e3<128}(d.attr("fill"));b?x.attr(i.overflowLabels.style):F?c&&x.attr("fill",c):f&&x.attr("fill",f)})}}),fa("interval-adjust-position",function CM(e,r,t){var n;if(0!==t.length){var l=(null===(n=t[0])||void 0===n?void 0:n.get("element"))?.geometry;l&&"interval"===l.type&&function i1(e,r,t){return!!e.getAdjust("stack")||r.every(function(i,l){return function RO(e,r,t){var n=e.coordinate,i=Va(r),l=Xi.fromObject(i.getCanvasBBox()),c=Xi.fromObject(t.getBBox());return n.isTransposed?c.height>=l.height:c.width>=l.width}(e,i,t[l])})}(l,r,t)&&t.forEach(function(f,d){!function Ff(e,r,t){var n=e.coordinate,i=Xi.fromObject(t.getBBox());Va(r).attr(n.isTransposed?{x:i.minX+i.width/2,textAlign:"center"}:{y:i.minY+i.height/2,textBaseline:"middle"})}(l,r[d],f)})}}),fa("interval-hide-overlap",function FO(e,r,t){var n;if(0!==t.length){var l=(null===(n=t[0])||void 0===n?void 0:n.get("element"))?.geometry;if(l&&"interval"===l.type){var T,c=function a1(e){var t=[],n=Math.max(Math.floor(e.length/500),1);return(0,S.S6)(e,function(i,l){l%n==0?t.push(i):i.set("visible",!1)}),t}(r),d=(0,E.CR)(l.getXYFields(),1)[0],p=[],m=[],x=(0,S.vM)(c,function(F){return F.get("data")[d]}),_=(0,S.jj)((0,S.UI)(c,function(F){return F.get("data")[d]}));c.forEach(function(F){F.set("visible",!0)});var b=function(F){F&&(F.length&&m.push(F.pop()),m.push.apply(m,(0,E.ev)([],(0,E.CR)(F),!1)))};for((0,S.dp)(_)>0&&(T=_.shift(),b(x[T])),(0,S.dp)(_)>0&&(T=_.pop(),b(x[T])),(0,S.S6)(_.reverse(),function(F){b(x[F])});m.length>0;){var I=m.shift();I.get("visible")&&(gm(I,p)?I.set("visible",!1):p.push(I))}}}}),fa("point-adjust-position",function MM(e,r,t,n,i){var l,c;if(0!==t.length){var d=(null===(l=t[0])||void 0===l?void 0:l.get("element"))?.geometry;if(d&&"point"===d.type){var p=(0,E.CR)(d.getXYFields(),2),m=p[0],x=p[1],_=(0,S.vM)(r,function(I){return I.get("data")[m]}),T=[],b=i&&i.offset||(null===(c=e[0])||void 0===c?void 0:c.offset)||12;(0,S.UI)((0,S.XP)(_).reverse(),function(I){for(var F=function DO(e,r){var t=e.getXYFields()[1],n=[],i=r.sort(function(l,c){return l.get("data")[t]-l.get("data")[t]});return i.length>0&&n.push(i.shift()),i.length>0&&n.push(i.pop()),n.push.apply(n,(0,E.ev)([],(0,E.CR)(i),!1)),n}(d,_[I]);F.length;){var B=F.shift(),Y=Va(B);if(wM(T,B,function(et,wt){return et.get("data")[m]===wt.get("data")[m]&&et.get("data")[x]===wt.get("data")[x]}))Y.set("visible",!1);else{var H=!1;SM(T,B)&&(Y.attr("y",Y.attr("y")+2*b),H=SM(T,B)),H?Y.set("visible",!1):T.push(B)}}})}}}),fa("pie-spider",function fM(e,r,t,n){var i,l,c=r[0]&&r[0].get("coordinate");if(c){var f=c.getCenter(),d=c.getRadius(),p={};try{for(var m=(0,E.XA)(r),x=m.next();!x.done;x=m.next()){var _=x.value;p[_.get("id")]=_}}catch($t){i={error:$t}}finally{try{x&&!x.done&&(l=m.return)&&l.call(m)}finally{if(i)throw i.error}}var T=(0,S.U2)(e[0],"labelHeight",14),b=Math.max((0,S.U2)(e[0],"offset",0),4);(0,S.S6)(e,function($t){if($t&&(0,S.U2)(p,[$t.id])){var le=$t.x>f.x||$t.x===f.x&&$t.y>f.y,Se=(0,S.UM)($t.offsetX)?4:$t.offsetX,Pe=$n(f.x,f.y,d+4,$t.angle);$t.x=f.x+(le?1:-1)*(d+(b+Se)),$t.y=Pe.y}});var I=c.start,F=c.end,Y="right",G=(0,S.vM)(e,function($t){return $t.xH&&(H=Math.min(ge,Math.abs(I.y-F.y)))});var et={minX:I.x,maxX:F.x,minY:f.y-H/2,maxY:f.y+H/2};(0,S.S6)(G,function($t,ge){var le=H/T;$t.length>le&&($t.sort(function(Se,Pe){return Pe.percent-Se.percent}),(0,S.S6)($t,function(Se,Pe){Pe>le&&(p[Se.id].set("visible",!1),Se.invisible=!0)})),Sp($t,T,et)});var wt=et.minY,Ot=et.maxY;(0,S.S6)(G,function($t,ge){var le=ge===Y;(0,S.S6)($t,function(Se){var Pe=(0,S.U2)(p,Se&&[Se.id]);if(Pe){if(Se.yOt)return void Pe.set("visible",!1);var or=Pe.getChildByIndex(0),cr=or.getCanvasBBox(),Rr={x:le?cr.x:cr.maxX,y:cr.y+cr.height/2};Rc(or,Se.x-Rr.x,Se.y-Rr.y),Se.labelLine&&function yO(e,r,t){var m,n=r.getCenter(),i=r.getRadius(),l={x:e.x-(t?4:-4),y:e.y},c=$n(n.x,n.y,i+4,e.angle),f={x:l.x,y:l.y},d={x:c.x,y:c.y},p=$n(n.x,n.y,i,e.angle);if(l.y!==c.y){var x=t?4:-4;f.y=l.y,e.angle<0&&e.angle>=-Math.PI/2&&(f.x=Math.max(c.x,l.x-x),l.y0&&e.anglec.y?d.y=f.y:(d.y=c.y,d.x=Math.max(d.x,f.x-x))),e.angle>Math.PI/2&&(f.x=Math.min(c.x,l.x-x),l.y>c.y?d.y=f.y:(d.y=c.y,d.x=Math.min(d.x,f.x-x))),e.angle<-Math.PI/2&&(f.x=Math.min(c.x,l.x-x),l.y0&&n.push(i.shift()),i.length>0&&n.push(i.pop()),n.push.apply(n,(0,E.ev)([],(0,E.CR)(i),!1)),n}(d,_[I]);F.length;){var B=F.shift(),Y=Va(B);if(Ap(T,B,function(et,wt){return et.get("data")[m]===wt.get("data")[m]&&et.get("data")[x]===wt.get("data")[x]}))Y.set("visible",!1);else{var H=!1;TM(T,B)&&(Y.attr("y",Y.attr("y")+2*b),H=TM(T,B)),H?Y.set("visible",!1):T.push(B)}}})}}}),hi("fade-in",function HO(e,r,t){var n={fillOpacity:(0,S.UM)(e.attr("fillOpacity"))?1:e.attr("fillOpacity"),strokeOpacity:(0,S.UM)(e.attr("strokeOpacity"))?1:e.attr("strokeOpacity"),opacity:(0,S.UM)(e.attr("opacity"))?1:e.attr("opacity")};e.attr({fillOpacity:0,strokeOpacity:0,opacity:0}),e.animate(n,r)}),hi("fade-out",function GO(e,r,t){e.animate({fillOpacity:0,strokeOpacity:0,opacity:0},r.duration,r.easing,function(){e.remove(!0)},r.delay)}),hi("grow-in-x",function WO(e,r,t){l1(e,r,t.coordinate,t.minYPoint,"x")}),hi("grow-in-xy",function UO(e,r,t){l1(e,r,t.coordinate,t.minYPoint,"xy")}),hi("grow-in-y",function u1(e,r,t){l1(e,r,t.coordinate,t.minYPoint,"y")}),hi("scale-in-x",function VO(e,r,t){var n=e.getBBox(),l=e.get("origin").mappingData.points,c=l[0].y-l[1].y>0?n.maxX:n.minX,f=(n.minY+n.maxY)/2;e.applyToMatrix([c,f,1]);var d=Zr.vs(e.getMatrix(),[["t",-c,-f],["s",.01,1],["t",c,f]]);e.setMatrix(d),e.animate({matrix:Zr.vs(e.getMatrix(),[["t",-c,-f],["s",100,1],["t",c,f]])},r)}),hi("scale-in-y",function $O(e,r,t){var n=e.getBBox(),i=e.get("origin").mappingData,l=(n.minX+n.maxX)/2,c=i.points,f=c[0].y-c[1].y<=0?n.maxY:n.minY;e.applyToMatrix([l,f,1]);var d=Zr.vs(e.getMatrix(),[["t",-l,-f],["s",1,.01],["t",l,f]]);e.setMatrix(d),e.animate({matrix:Zr.vs(e.getMatrix(),[["t",-l,-f],["s",1,100],["t",l,f]])},r)}),hi("wave-in",function c1(e,r,t){var n=Uy(t.coordinate,20),c=n.endState,f=e.setClip({type:n.type,attrs:n.startState});t.toAttrs&&e.attr(t.toAttrs),f.animate(c,(0,E.pi)((0,E.pi)({},r),{callback:function(){e&&!e.get("destroyed")&&e.set("clipShape",null),f.remove(!0)}}))}),hi("zoom-in",function qO(e,r,t){Df(e,r,"zoomIn")}),hi("zoom-out",function IM(e,r,t){Df(e,r,"zoomOut")}),hi("position-update",function bM(e,r,t){var n=t.toAttrs,i=n.x,l=n.y;delete n.x,delete n.y,e.attr(n),e.animate({x:i,y:l},r)}),hi("sector-path-update",function ZO(e,r,t){var n=t.toAttrs,i=t.coordinate,l=n.path||[],c=l.map(function(Y){return Y[0]});if(!(l.length<1)){var f=LM(l),d=f.startAngle,p=f.endAngle,m=f.radius,x=f.innerRadius,_=LM(e.attr("path")),T=_.startAngle,b=_.endAngle,I=i.getCenter(),F=d-T,B=p-b;if(0===F&&0===B)return void e.attr("path",l);e.animate(function(Y){var G=T+Y*F,H=b+Y*B;return(0,E.pi)((0,E.pi)({},n),{path:(0,S.Xy)(c,["M","A","A","Z"])?Yy(I.x,I.y,m,G,H):Js(I.x,I.y,m,G,H,x)})},(0,E.pi)((0,E.pi)({},r),{callback:function(){e.attr("path",l)}}))}}),hi("path-in",function XO(e,r,t){var n=e.getTotalLength();e.attr("lineDash",[n]),e.animate(function(i){return{lineDashOffset:(1-i)*n}},r)}),du("rect",eR),du("mirror",tR),du("list",QO),du("matrix",jO),du("circle",OM),du("tree",rR),mu("axis",sR),mu("legend",zM),mu("tooltip",q_),mu("annotation",aR),mu("slider",fR),mu("scrollbar",pR),ur("tooltip",GM),ur("sibling-tooltip",wR),ur("ellipsis-text",SR),ur("element-active",bR),ur("element-single-active",RR),ur("element-range-active",IR),ur("element-highlight",m1),ur("element-highlight-by-x",kp),ur("element-highlight-by-color",DR),ur("element-single-highlight",kR),ur("element-range-highlight",$M),ur("element-sibling-highlight",$M,{effectSiblings:!0,effectByRecord:!0}),ur("element-selected",GR),ur("element-single-selected",bu),ur("element-range-selected",NR),ur("element-link-by-color",ER),ur("active-region",d1),ur("list-active",XR),ur("list-selected",ZR),ur("list-highlight",x1),ur("list-unchecked",zp),ur("list-checked",QR),ur("list-focus",KM),ur("list-radio",JM),ur("legend-item-highlight",x1,{componentNames:["legend"]}),ur("axis-label-highlight",x1,{componentNames:["axis"]}),ur("axis-description",FF),ur("rect-mask",S1),ur("x-rect-mask",M1,{dim:"x"}),ur("y-rect-mask",M1,{dim:"y"}),ur("circle-mask",rF),ur("path-mask",aT),ur("smooth-path-mask",oF),ur("rect-multi-mask",uT),ur("x-rect-multi-mask",hT,{dim:"x"}),ur("y-rect-multi-mask",hT,{dim:"y"}),ur("circle-multi-mask",uF),ur("path-multi-mask",fT),ur("smooth-path-multi-mask",hF),ur("cursor",vF),ur("data-filter",pF),ur("brush",Hp),ur("brush-x",Hp,{dims:["x"]}),ur("brush-y",Hp,{dims:["y"]}),ur("sibling-filter",L1),ur("sibling-x-filter",L1),ur("sibling-y-filter",L1),ur("element-filter",I1),ur("element-sibling-filter",pT),ur("element-sibling-filter-record",pT,{byRecord:!0}),ur("view-drag",wF),ur("view-move",SF),ur("scale-translate",MF),ur("scale-zoom",bF),ur("reset-button",CF,{name:"reset-button",text:"reset"}),ur("mousewheel-scroll",IF),Er("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"}]}),Er("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"}]}),Er("element-active",{start:[{trigger:"element:mouseenter",action:"element-active:active"}],end:[{trigger:"element:mouseleave",action:"element-active:reset"}]}),Er("element-selected",{start:[{trigger:"element:click",action:"element-selected:toggle"}]}),Er("element-highlight",{start:[{trigger:"element:mouseenter",action:"element-highlight:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight:reset"}]}),Er("element-highlight-by-x",{start:[{trigger:"element:mouseenter",action:"element-highlight-by-x:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight-by-x:reset"}]}),Er("element-highlight-by-color",{start:[{trigger:"element:mouseenter",action:"element-highlight-by-color:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight-by-color:reset"}]}),Er("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"]}]}),Er("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"]}]}),Er("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"]}]}),Er("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"]}]}),Er("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"]}]}),Er("brush",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:_s,action:["brush:start","rect-mask:start","rect-mask:show"]}],processing:[{trigger:"mousemove",isEnable:_s,action:["rect-mask:resize"]}],end:[{trigger:"mouseup",isEnable:_s,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"]}]}),Er("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"]}]}),Er("brush-x",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:_s,action:["brush-x:start","x-rect-mask:start","x-rect-mask:show"]}],processing:[{trigger:"mousemove",isEnable:_s,action:["x-rect-mask:resize"]}],end:[{trigger:"mouseup",isEnable:_s,action:["brush-x:filter","brush-x:end","x-rect-mask:end","x-rect-mask:hide"]}],rollback:[{trigger:"dblclick",action:["brush-x:reset"]}]}),Er("element-path-highlight",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:_s,action:"path-mask:start"},{trigger:"mousedown",isEnable:_s,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"}]}),Er("brush-x-multi",{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:"mousedown",isEnable:_s,action:["x-rect-multi-mask:start","x-rect-multi-mask:show"]},{trigger:"mask:dragstart",action:["x-rect-multi-mask:moveStart"]}],processing:[{trigger:"mousemove",isEnable:function(e){return!Go(e)},action:["x-rect-multi-mask:resize"]},{trigger:"multi-mask:change",action:"element-range-highlight:highlight"},{trigger:"mask:drag",action:["x-rect-multi-mask:move"]}],end:[{trigger:"mouseup",action:["x-rect-multi-mask:end"]},{trigger:"mask:dragend",action:["x-rect-multi-mask:moveEnd"]}],rollback:[{trigger:"dblclick",action:["x-rect-multi-mask:clear","cursor:crosshair"]},{trigger:"multi-mask:clearAll",action:["element-range-highlight:clear"]},{trigger:"multi-mask:clearSingle",action:["element-range-highlight:highlight"]}]}),Er("element-single-selected",{start:[{trigger:"element:click",action:"element-single-selected:toggle"}]}),Er("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"]}]}),Er("continuous-filter",{start:[{trigger:"legend:valuechanged",action:"data-filter:filter"}]}),Er("continuous-visible-filter",{start:[{trigger:"legend:valuechanged",action:"element-filter:filter"}]}),Er("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"]}]}),Er("active-region",{start:[{trigger:"plot:mousemove",action:"active-region:show"}],end:[{trigger:"plot:mouseleave",action:"active-region:hide"}]}),Er("axis-description",{start:[{trigger:"axis-description:mousemove",action:"axis-description:show"}],end:[{trigger:"axis-description:mouseleave",action:"axis-description:hide"}]}),Er("view-zoom",{start:[{trigger:"plot:mousewheel",isEnable:function(e){return B1(e.event)},action:"scale-zoom:zoomOut",throttle:{wait:100,leading:!0,trailing:!1}},{trigger:"plot:mousewheel",isEnable:function(e){return!B1(e.event)},action:"scale-zoom:zoomIn",throttle:{wait:100,leading:!0,trailing:!1}}]}),Er("sibling-tooltip",{start:[{trigger:"plot:mousemove",action:"sibling-tooltip:show"}],end:[{trigger:"plot:mouseleave",action:"sibling-tooltip:hide"}]}),Er("plot-mousewheel-scroll",{start:[{trigger:"plot:mousewheel",action:"mousewheel-scroll:scroll"}]});var ya=["type","alias","tickCount","tickInterval","min","max","nice","minLimit","maxLimit","range","tickMethod","base","exponent","mask","sync"],Ka=(()=>(function(e){e.ERROR="error",e.WARN="warn",e.INFO="log"}(Ka||(Ka={})),Ka))(),CT="AntV/G2Plot";function wT(e){for(var r=[],t=1;t=0}),i=t.every(function(l){return(0,S.U2)(l,[r])<=0});return n?{min:0}:i?{max:0}:{}}function _T(e,r,t,n,i){if(void 0===i&&(i=[]),!Array.isArray(e))return{nodes:[],links:[]};var l=[],c={},f=-1;return e.forEach(function(d){var p=d[r],m=d[t],x=d[n],_=Kr(d,i);c[p]||(c[p]=(0,E.pi)({id:++f,name:p},_)),c[m]||(c[m]=(0,E.pi)({id:++f,name:m},_)),l.push((0,E.pi)({source:c[p].id,target:c[m].id,value:x},_))}),{nodes:Object.values(c).sort(function(d,p){return d.id-p.id}),links:l}}function Wc(e,r){var t=(0,S.hX)(e,function(n){var i=n[r];return null===i||"number"==typeof i&&!isNaN(i)});return Ss(Ka.WARN,t.length===e.length,"illegal data existed in chart data."),t}var k1,BF={}.toString,ST=function(e,r){return BF.call(e)==="[object "+r+"]"},dl=function(e){return ST(e,"Array")},TT=function(e){if(!function(e){return"object"==typeof e&&null!==e}(e)||!ST(e,"Object"))return!1;for(var r=e;null!==Object.getPrototypeOf(r);)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r},bT=function(e,r,t,n){for(var i in t=t||0,n=n||5,r)if(Object.prototype.hasOwnProperty.call(r,i)){var l=r[i];l?TT(l)?(TT(e[i])||(e[i]={}),t0&&(t=t.map(function(n,i){return r.forEach(function(l,c){n+=r[c][i]}),n})),t}(0,S.HP)(function(e,r){void 0===r&&(r={});var t=r.fontSize,n=r.fontFamily,i=void 0===n?"sans-serif":n,l=r.fontWeight,c=r.fontStyle,f=r.fontVariant,d=function kF(){return k1||(k1=document.createElement("canvas").getContext("2d")),k1}();return d.font=[c,l,f,t+"px",i].join(" "),d.measureText((0,S.HD)(e)?e:"").width},function(e,r){return void 0===r&&(r={}),(0,E.pr)([e],(0,S.VO)(r)).join("")});var HF=function(e,r,t,n){var l,c,d,p,i=[],f=!!n;if(f){d=[1/0,1/0],p=[-1/0,-1/0];for(var m=0,x=e.length;m"},key:(0===d?"top":"bottom")+"-statistic"},Kr(f,["offsetX","offsetY","rotate","style","formatter"])))}})},YF=function(e,r,t){var n=r.statistic;[n.title,n.content].forEach(function(c){if(c){var f=(0,S.mf)(c.style)?c.style(t):c.style;e.annotation().html((0,E.pi)({position:["50%","100%"],html:function(d,p){var m=p.getCoordinate(),x=p.views[0].getCoordinate(),_=x.getCenter(),T=x.getRadius(),b=Math.max(Math.sin(x.startAngle),Math.sin(x.endAngle))*T,I=_.y+b-m.y.start-parseFloat((0,S.U2)(f,"fontSize",0)),F=m.getRadius()*m.innerRadius*2;LT(d,(0,E.pi)({width:F+"px",transform:"translate(-50%, "+I+"px)"},ET(f)));var B=p.getData();if(c.customHtml)return c.customHtml(d,p,t,B);var Y=c.content;return c.formatter&&(Y=c.formatter(t,B)),Y?(0,S.HD)(Y)?Y:""+Y:"
    "}},Kr(c,["offsetX","offsetY","rotate","style","formatter"])))}})};function IT(e,r){return r?(0,S.u4)(r,function(t,n,i){return t.replace(new RegExp("{\\s*"+i+"\\s*}","g"),n)},e):e}function Br(e,r){return e.views.find(function(t){return t.id===r})}function Xc(e){var r=e.parent;return r?r.views:[]}function OT(e){return Xc(e).filter(function(r){return r!==e})}function Uf(e,r,t){void 0===t&&(t=e.geometries),e.animate("boolean"!=typeof r||r),(0,S.S6)(t,function(n){var i;i=(0,S.mf)(r)?r(n.type||n.shapeType,n)||!0:r,n.animate(i)})}function Wp(){return"object"==typeof window?window?.devicePixelRatio:2}function H1(e,r){void 0===r&&(r=e);var t=document.createElement("canvas"),n=Wp();return t.width=e*n,t.height=r*n,t.style.width=e+"px",t.style.height=r+"px",t.getContext("2d").scale(n,n),t}function fr(e,r,t,n){void 0===n&&(n=t);var i=r.backgroundColor;e.globalAlpha=r.opacity,e.fillStyle=i,e.beginPath(),e.fillRect(0,0,t,n),e.closePath()}function Tn(e,r,t){var n=e+r;return t?2*n:n}function RT(e,r){return r?[[.25*e,.25*e],[.75*e,.75*e]]:[[.5*e,.5*e]]}function Yn(e,r){var t=r*Math.PI/180;return{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}}var Or={size:6,padding:2,backgroundColor:"transparent",opacity:1,rotation:0,fill:"#fff",fillOpacity:.5,stroke:"transparent",lineWidth:0,isStagger:!0};function ta(e,r,t,n){var i=r.size,l=r.fill,c=r.lineWidth,f=r.stroke,d=r.fillOpacity;e.beginPath(),e.globalAlpha=d,e.fillStyle=l,e.strokeStyle=f,e.lineWidth=c,e.arc(t,n,i/2,0,2*Math.PI,!1),e.fill(),c&&e.stroke(),e.closePath()}var Wr={rotation:45,spacing:5,opacity:1,backgroundColor:"transparent",strokeOpacity:.5,stroke:"#fff",lineWidth:2};var Sn={size:6,padding:1,isStagger:!0,backgroundColor:"transparent",opacity:1,rotation:0,fill:"#fff",fillOpacity:.5,stroke:"transparent",lineWidth:0};function WF(e,r,t,n){var i=r.stroke,l=r.size,c=r.fill,f=r.lineWidth;e.globalAlpha=r.fillOpacity,e.strokeStyle=i,e.lineWidth=f,e.fillStyle=c,e.strokeRect(t-l/2,n-l/2,l,l),e.fillRect(t-l/2,n-l/2,l,l)}function XF(e){var n,t=e.cfg;switch(e.type){case"dot":n=function G1(e){var r=xe({},Or,e),i=r.isStagger,l=r.rotation,c=Tn(r.size,r.padding,i),f=RT(c,i),d=H1(c,c),p=d.getContext("2d");fr(p,r,c);for(var m=0,x=f;m0&&function j1(e,r,t){(function YT(e,r,t){var n=e.view,i=e.geometry,l=e.group,c=e.options,f=e.horizontal,d=c.offset,p=c.size,m=c.arrow,x=n.getCoordinate(),_=$p(x,r)[3],T=$p(x,t)[0],b=T.y-_.y,I=T.x-_.x;if("boolean"!=typeof m){var Y,F=m.headSize,B=c.spacing;f?(I-F)/2G){var wt=Math.max(1,Math.ceil(G/(H/I.length))-1),Ot=I.slice(0,wt)+"...";Y.attr("text",Ot)}}}}(e,r,t)}(_,T[I-1],b)})}})),n}}(t.yField,!r,!!n),function bi(e){return void 0===e&&(e=!1),function(r){var t=r.chart,i=r.options.connectedArea,l=function(){t.removeInteraction(Fu.hover),t.removeInteraction(Fu.click)};if(!e&&i){var c=i.trigger||"hover";l(),t.interaction(Fu[c],{start:Q1(c,i.style)})}else l();return r}}(!t.isStack),Ou)(e)}function Du(e){var r=e.options,t=r.xField,n=r.yField,i=r.xAxis,l=r.yAxis,c={left:"bottom",right:"top",top:"left",bottom:"right"},f=!1!==l&&(0,E.pi)({position:c[l?.position||"left"]},l),d=!1!==i&&(0,E.pi)({position:c[i?.position||"bottom"]},i);return(0,E.pi)((0,E.pi)({},e),{options:(0,E.pi)((0,E.pi)({},r),{xField:n,yField:t,xAxis:f,yAxis:d})})}function Zp(e){var t=e.options.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"}}])),xe({},e,{options:{label:t}})}function Zf(e){var r=e.options,i=r.legend;return r.seriesField?!1!==i&&(i=(0,E.pi)({position:r.isStack?"top-left":"right-top"},i||{})):i=!1,xe({},e,{options:{legend:i}})}function rx(e){var t=[{type:"transpose"},{type:"reflectY"}].concat(e.options.coordinate||[]);return xe({},e,{options:{coordinate:t}})}function s8(e){var t=e.options,n=t.barStyle,i=t.barWidthRatio,l=t.minBarWidth,c=t.maxBarWidth,f=t.barBackground;return $o({chart:e.chart,options:(0,E.pi)((0,E.pi)({},t),{columnStyle:n,columnWidthRatio:i,minColumnWidth:l,maxColumnWidth:c,columnBackground:f})},!0)}function Ms(e){return Cr(Du,Zp,Zf,ti,rx,s8)(e)}Er(Fu.hover,{start:Q1(Fu.hover),end:[{trigger:"interval:mouseleave",action:["element-highlight-by-color:reset","element-link-by-color:unlink"]}]}),Er(Fu.click,{start:Q1(Fu.click),end:[{trigger:"document:mousedown",action:["element-highlight-by-color:clear","element-link-by-color:clear"]}]});var ox,nx=xe({},Fr.getDefaultOptions(),{barWidthRatio:.6,marginRatio:1/32,tooltip:{shared:!0,showMarkers:!1,offset:20},legend:{radio:{}},interactions:[{type:"active-region"}]}),ix=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="bar",t}return(0,E.ZT)(r,e),r.getDefaultOptions=function(){return nx},r.prototype.changeData=function(t){var n,i;this.updateOption({data:t});var c=this.chart,f=this.options,d=f.isPercent,p=f.xField,m=f.yField,x=f.xAxis,_=f.yAxis;p=(n=[m,p])[0],m=n[1],x=(i=[_,x])[0],_=i[1],ex({chart:c,options:(0,E.pi)((0,E.pi)({},f),{xField:p,yField:m,yAxis:_,xAxis:x})}),c.changeData(qc(t,p,m,p,d))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return Ms},r}(Fr),l8=xe({},Fr.getDefaultOptions(),{columnWidthRatio:.6,marginRatio:1/32,tooltip:{shared:!0,showMarkers:!1,offset:20},legend:{radio:{}},interactions:[{type:"active-region"}]}),ax=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="column",t}return(0,E.ZT)(r,e),r.getDefaultOptions=function(){return l8},r.prototype.changeData=function(t){this.updateOption({data:t});var n=this.options,i=n.yField,l=n.xField,c=n.isPercent;ex({chart:this.chart,options:this.options}),this.chart.changeData(qc(t,i,l,i,c))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return $o},r}(Fr),yl="$$percentage$$",ja="$$mappingValue$$",Zo="$$conversion$$",Da="$$totalPercentage$$",qf="$$x$$",Kf="$$y$$",Bu={appendPadding:[0,80],minSize:0,maxSize:1,meta:(ox={},ox[ja]={min:0,max:1,nice:!1},ox),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)"}}},Qc="CONVERSION_TAG_NAME";function sx(e,r,t){var i=t.yField,l=t.maxSize,c=t.minSize,f=(0,S.U2)((0,S.UT)(r,i),[i]),d=(0,S.hj)(l)?l:1,p=(0,S.hj)(c)?c:0;return(0,S.UI)(e,function(m,x){var _=(m[i]||0)/f;return m[yl]=_,m[ja]=(d-p)*_+p,m[Zo]=[(0,S.U2)(e,[x-1,i]),m[i]],m})}function lx(e){return function(r){var t=r.chart,n=r.options,i=n.conversionTag,c=n.filteredData||t.getOptions().data;if(i){var f=i.formatter;c.forEach(function(d,p){if(!(p<=0||Number.isNaN(d[ja]))){var m=e(d,p,c,{top:!0,name:Qc,text:{content:(0,S.mf)(f)?f(d,c):f,offsetX:i.offsetX,offsetY:i.offsetY,position:"end",autoRotate:!1,style:(0,E.pi)({textAlign:"start",textBaseline:"middle"},i.style)}});t.annotation().line(m)}})}return r}}function u8(e){var r=e.chart,t=e.options,n=t.data,i=void 0===n?[]:n,d=sx(i,i,{yField:t.yField,maxSize:t.maxSize,minSize:t.minSize});return r.data(d),e}function c8(e){var r=e.chart,t=e.options,n=t.xField,l=t.color,f=t.label,d=t.shape,p=void 0===d?"funnel":d,m=t.funnelStyle,x=t.state,_=Qa(t.tooltip,[n,t.yField]),T=_.fields,b=_.formatter;return ma({chart:r,options:{type:"interval",xField:n,yField:ja,colorField:n,tooltipFields:(0,S.kJ)(T)&&T.concat([yl,Zo]),mapping:{shape:p,tooltip:b,color:l,style:m},label:f,state:x}}),vi(e.chart,"interval").adjust("symmetric"),e}function Ts(e){return e.chart.coordinate({type:"rect",actions:e.options.isTransposed?[]:[["transpose"],["scale",1,-1]]}),e}function ZT(e){var t=e.chart,n=e.options.maxSize,i=(0,S.U2)(t,["geometries","0","dataArray"],[]),l=(0,S.U2)(t,["options","data","length"]),c=(0,S.UI)(i,function(d){return(0,S.U2)(d,["0","nextPoints","0","x"])*l-.5});return lx(function(d,p,m,x){var _=n-(n-d[ja])/2;return(0,E.pi)((0,E.pi)({},x),{start:[c[p-1]||p-.5,_],end:[c[p-1]||p-.5,_+.05]})})(e),e}function qT(e){return Cr(u8,c8,Ts,ZT)(e)}function h8(e){var r,t=e.chart,n=e.options,i=n.data,c=n.yField;return t.data(void 0===i?[]:i),t.scale(((r={})[c]={sync:!0},r)),e}function f8(e){var t=e.options,n=t.data,i=t.xField,l=t.yField,c=t.color,f=t.compareField,d=t.isTransposed,p=t.tooltip,m=t.maxSize,x=t.minSize,_=t.label,T=t.funnelStyle,b=t.state;return e.chart.facet("mirror",{fields:[f],transpose:!d,padding:d?0:[32,0,0,0],showTitle:t.showFacetTitle,eachView:function(F,B){var Y=d?B.rowIndex:B.columnIndex;d||F.coordinate({type:"rect",actions:[["transpose"],["scale",0===Y?-1:1,-1]]});var G=sx(B.data,n,{yField:l,maxSize:m,minSize:x});F.data(G);var H=Qa(p,[i,l,f]),et=H.fields,wt=H.formatter,Ot=d?{offset:0===Y?10:-23,position:0===Y?"bottom":"top"}:{offset:10,position:"left",style:{textAlign:0===Y?"end":"start"}};ma({chart:F,options:{type:"interval",xField:i,yField:ja,colorField:i,tooltipFields:(0,S.kJ)(et)&&et.concat([yl,Zo]),mapping:{shape:"funnel",tooltip:wt,color:c,style:T},label:!1!==_&&xe({},Ot,_),state:b}})}}),e}function KT(e){var r=e.chart,t=e.index,n=e.options,i=n.conversionTag,l=n.isTransposed;((0,S.hj)(t)?[r]:r.views).forEach(function(c,f){var d=(0,S.U2)(c,["geometries","0","dataArray"],[]),p=(0,S.U2)(c,["options","data","length"]),m=(0,S.UI)(d,function(_){return(0,S.U2)(_,["0","nextPoints","0","x"])*p-.5});lx(function(_,T,b,I){return xe({},I,{start:[m[T-1]||T-.5,_[ja]],end:[m[T-1]||T-.5,_[ja]+.05],text:l?{style:{textAlign:"start"}}:{offsetX:!1!==i?(0===(t||f)?-1:1)*i.offsetX:0,style:{textAlign:0===(t||f)?"end":"start"}}})})(xe({},{chart:c,options:n}))})}function v8(e){return e.chart.once("beforepaint",function(){return KT(e)}),e}function p8(e){var r=e.chart,t=e.options,n=t.data,i=void 0===n?[]:n,l=t.yField,c=(0,S.u4)(i,function(p,m){return p+(m[l]||0)},0),f=(0,S.UT)(i,l)[l],d=(0,S.UI)(i,function(p,m){var x=[],_=[];if(p[Da]=(p[l]||0)/c,m){var T=i[m-1][qf],b=i[m-1][Kf];x[0]=T[3],_[0]=b[3],x[1]=T[2],_[1]=b[2]}else x[0]=-.5,_[0]=1,x[1]=.5,_[1]=1;return _[2]=_[1]-p[Da],x[2]=(_[2]+1)/4,_[3]=_[2],x[3]=-x[2],p[qf]=x,p[Kf]=_,p[yl]=(p[l]||0)/f,p[Zo]=[(0,S.U2)(i,[m-1,l]),p[l]],p});return r.data(d),e}function g8(e){var r=e.chart,t=e.options,n=t.xField,l=t.color,f=t.label,d=t.funnelStyle,p=t.state,m=Qa(t.tooltip,[n,t.yField]),x=m.fields,_=m.formatter;return ma({chart:r,options:{type:"polygon",xField:qf,yField:Kf,colorField:n,tooltipFields:(0,S.kJ)(x)&&x.concat([yl,Zo]),label:f,state:p,mapping:{tooltip:_,color:l,style:d}}}),e}function y8(e){return e.chart.coordinate({type:"rect",actions:e.options.isTransposed?[["transpose"],["reflect","x"]]:[]}),e}function m8(e){return lx(function(t,n,i,l){return(0,E.pi)((0,E.pi)({},l),{start:[t[qf][1],t[Kf][1]],end:[t[qf][1]+.05,t[Kf][1]]})})(e),e}function C8(e){var r,t=e.chart,n=e.options,i=n.data,c=n.yField;return t.data(void 0===i?[]:i),t.scale(((r={})[c]={sync:!0},r)),e}function w8(e){var t=e.options;return e.chart.facet("rect",{fields:[t.seriesField],padding:[t.isTransposed?0:32,10,0,10],showTitle:t.showFacetTitle,eachView:function(c,f){qT(xe({},e,{chart:c,options:{data:f.data}}))}}),e}var S8=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendering=!1,t}return(0,E.ZT)(r,e),r.prototype.change=function(t){var n=this;if(!this.rendering){var l=t.compareField,c=l?KT:ZT,f=this.context.view;(0,S.UI)(t.seriesField||l?f.views:[f],function(p,m){var x=p.getController("annotation"),_=(0,S.hX)((0,S.U2)(x,["option"],[]),function(b){return b.name!==Qc});x.clear(!0),(0,S.S6)(_,function(b){"object"==typeof b&&p.annotation()[b.type](b)});var T=(0,S.U2)(p,["filteredData"],p.getOptions().data);c({chart:p,index:m,options:(0,E.pi)((0,E.pi)({},t),{filteredData:sx(T,T,t)})}),p.filterData(T),n.rendering=!0,p.render(!0)})}this.rendering=!1},r}(wn),QT="funnel-conversion-tag",ux="funnel-afterrender",JT={trigger:"afterrender",action:QT+":change"};function M8(e){var m,r=e.options,t=r.compareField,n=r.xField,i=r.yField,c=r.funnelStyle,f=r.data,d=Vc(r.locale);return(t||c)&&(m=function(x){return xe({},t&&{lineWidth:1,stroke:"#fff"},(0,S.mf)(c)?c(x):c)}),xe({options:{label:t?{fields:[n,i,t,yl,Zo],formatter:function(x){return""+x[i]}}:{fields:[n,i,yl,Zo],offset:0,position:"middle",formatter:function(x){return x[n]+" "+x[i]}},tooltip:{title:n,formatter:function(x){return{name:x[n],value:x[i]}}},conversionTag:{formatter:function(x){return d.get(["conversionTag","label"])+": "+J1.apply(void 0,x[Zo])}}}},e,{options:{funnelStyle:m,data:(0,S.d9)(f)}})}function jT(e){var r=e.options,t=r.compareField,n=r.dynamicHeight;return r.seriesField?function _8(e){return Cr(C8,w8)(e)}(e):t?function d8(e){return Cr(h8,f8,v8)(e)}(e):n?function x8(e){return Cr(p8,g8,y8,m8)(e)}(e):qT(e)}function tb(e){var r,t=e.options,i=t.yAxis,c=t.yField;return Cr(zn(((r={})[t.xField]=t.xAxis,r[c]=i,r)))(e)}function eb(e){return e.chart.axis(!1),e}function T8(e){var n=e.options.legend;return e.chart.legend(!1!==n&&n),e}function rb(e){var r=e.chart,t=e.options,i=t.dynamicHeight;return(0,S.S6)(t.interactions,function(l){!1===l.enable?r.removeInteraction(l.type):r.interaction(l.type,l.cfg||{})}),i?r.removeInteraction(ux):r.interaction(ux,{start:[(0,E.pi)((0,E.pi)({},JT),{arg:t})]}),e}function cx(e){return Cr(M8,jT,tb,eb,ti,rb,T8,hn,Qr,En())(e)}ur(QT,S8),Er(ux,{start:[JT]});var ml,hx=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="funnel",t}return(0,E.ZT)(r,e),r.getDefaultOptions=function(){return Bu},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return cx},r.prototype.setState=function(t,n,i){void 0===i&&(i=!0);var l=Uc(this.chart);(0,S.S6)(l,function(c){n(c.getData())&&c.setState(t,i)})},r.prototype.getStates=function(){var t=Uc(this.chart),n=[];return(0,S.S6)(t,function(i){var l=i.getData(),c=i.getStates();(0,S.S6)(c,function(f){n.push({data:l,state:f,geometry:i.geometry,element:i})})}),n},r.CONVERSATION_FIELD=Zo,r.PERCENT_FIELD=yl,r.TOTAL_PERCENT_FIELD=Da,r}(Fr),Un="range",xl="type",ei="percent",b8="#f0f0f0",qp="indicator-view",Qf="range-view",fx={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:(ml={},ml[Un]={sync:"v"},ml[ei]={sync:"v",tickCount:5,tickInterval:.2},ml),animation:!1};function ib(e){var r;return[(r={},r[ei]=(0,S.uZ)(e,0,1),r)]}function vx(e,r){var t=(0,S.U2)(r,["ticks"],[]),n=(0,S.dp)(t)?(0,S.jj)(t):[0,(0,S.uZ)(e,0,1),1];return n[0]||n.shift(),function nb(e,r){return e.map(function(t,n){var i;return(i={})[Un]=t-(e[n-1]||0),i[xl]=""+n,i[ei]=r,i})}(n,e)}function A8(e){var r=e.chart,t=e.options,n=t.percent,i=t.range,l=t.radius,c=t.innerRadius,f=t.startAngle,d=t.endAngle,p=t.axis,m=t.indicator,x=t.gaugeStyle,_=t.type,T=t.meter,b=i.color,I=i.width;if(m){var F=ib(n),B=r.createView({id:qp});B.data(F),B.point().position(ei+"*1").shape(m.shape||"gauge-indicator").customInfo({defaultColor:r.getTheme().defaultColor,indicator:m}),B.coordinate("polar",{startAngle:f,endAngle:d,radius:c*l}),B.axis(ei,p),B.scale(ei,Kr(p,ya))}var Y=vx(n,t.range),G=r.createView({id:Qf});G.data(Y);var H=(0,S.HD)(b)?[b,b8]:b;return pi({chart:G,options:{xField:"1",yField:Un,seriesField:xl,rawFields:[ei],isStack:!0,interval:{color:H,style:x,shape:"meter"===_?"meter-gauge":null},args:{zIndexReversed:!0,sortZIndex:!0},minColumnWidth:I,maxColumnWidth:I}}).ext.geometry.customInfo({meter:T}),G.coordinate("polar",{innerRadius:c,radius:l,startAngle:f,endAngle:d}).transpose(),e}function ab(e){var r;return Cr(zn(((r={range:{min:0,max:1,maxLimit:1,minLimit:0}})[ei]={},r)))(e)}function dx(e,r){var t=e.chart,n=e.options,i=n.statistic,l=n.percent;if(t.getController("annotation").clear(!0),i){var c=i.content,f=void 0;c&&(f=xe({},{content:(100*l).toFixed(2)+"%",style:{opacity:.75,fontSize:"30px",lineHeight:1,textAlign:"center",color:"rgba(44,53,66,0.85)"}},c)),YF(t,{statistic:(0,E.pi)((0,E.pi)({},i),{content:f})},{percent:l})}return r&&t.render(!0),e}function E8(e){var n=e.options.tooltip;return e.chart.tooltip(!!n&&xe({showTitle:!1,showMarkers:!1,containerTpl:'
    ',domStyles:{"g2-tooltip":{padding:"4px 8px",fontSize:"10px"}},customContent:function(i,l){return(100*(0,S.U2)(l,[0,"data",ei],0)).toFixed(2)+"%"}},n)),e}function ob(e){return e.chart.legend(!1),e}function L8(e){return Cr(Qr,hn,A8,ab,E8,dx,An,En(),ob)(e)}rn("point","gauge-indicator",{draw:function(e,r){var t=e.customInfo,n=t.indicator,i=t.defaultColor,c=n.pointer,f=n.pin,d=r.addGroup(),p=this.parsePoint({x:0,y:0});return c&&d.addShape("line",{name:"pointer",attrs:(0,E.pi)({x1:p.x,y1:p.y,x2:e.x,y2:e.y,stroke:i},c.style)}),f&&d.addShape("circle",{name:"pin",attrs:(0,E.pi)({x:p.x,y:p.y,stroke:i},f.style)}),d}}),rn("interval","meter-gauge",{draw:function(e,r){var t=e.customInfo.meter,n=void 0===t?{}:t,i=n.steps,l=void 0===i?50:i,c=n.stepRatio,f=void 0===c?.5:c;l=l<1?1:l,f=(0,S.uZ)(f,0,1);var d=this.coordinate,p=d.startAngle,x=0;f>0&&f<1&&(x=(d.endAngle-p)/l/(f/(1-f)+1-1/l));for(var T=x/(1-f)*f,b=r.addGroup(),I=this.coordinate.getCenter(),F=this.coordinate.getRadius(),B=va.getAngle(e,this.coordinate),G=B.endAngle,H=B.startAngle;H1?d/(n-1):f.max),!t&&!n){var m=function xa(e){return Math.ceil(Math.log(e.length)/Math.LN2)+1}(c);p=d/m}var x={},_=(0,S.vM)(l,i);(0,S.xb)(_)?(0,S.S6)(l,function(b){var F=bs(b[r],p,n),B=F[0]+"-"+F[1];(0,S.wH)(x,B)||(x[B]={range:F,count:0}),x[B].count+=1}):Object.keys(_).forEach(function(b){(0,S.S6)(_[b],function(I){var B=bs(I[r],p,n),G=B[0]+"-"+B[1]+"-"+b;(0,S.wH)(x,G)||(x[G]={range:B,count:0},x[G][i]=b),x[G].count+=1})});var T=[];return(0,S.S6)(x,function(b){T.push(b)}),T}var Kp="range",jc="count",Pu=xe({},Fr.getDefaultOptions(),{columnStyle:{stroke:"#FFFFFF"},tooltip:{shared:!0,showMarkers:!1},interactions:[{type:"active-region"}]});function Ai(e){var r=e.chart,t=e.options,f=t.color,d=t.stackField,p=t.legend,m=t.columnStyle,x=sb(t.data,t.binField,t.binWidth,t.binNumber,d);return r.data(x),pi(xe({},e,{options:{xField:Kp,yField:jc,seriesField:d,isStack:!0,interval:{color:f,style:m}}})),p&&d?r.legend(d,p):r.legend(!1),e}function Ca(e){var r,t=e.options,i=t.yAxis;return Cr(zn(((r={})[Kp]=t.xAxis,r[jc]=i,r)))(e)}function w7(e){var r=e.chart,t=e.options,n=t.xAxis,i=t.yAxis;return r.axis(Kp,!1!==n&&n),r.axis(jc,!1!==i&&i),e}function _7(e){var n=e.options.label,i=vi(e.chart,"interval");if(n){var l=n.callback,c=(0,E._T)(n,["callback"]);i.label({fields:[jc],callback:l,cfg:di(c)})}else i.label(!1);return e}function Qp(e){return Cr(Qr,Ra("columnStyle"),Ai,Ca,w7,gl,_7,ti,An,hn)(e)}var lb=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="histogram",t}return(0,E.ZT)(r,e),r.getDefaultOptions=function(){return Pu},r.prototype.changeData=function(t){this.updateOption({data:t});var n=this.options;this.chart.changeData(sb(t,n.binField,n.binWidth,n.binNumber,n.stackField))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return Qp},r}(Fr),px=xe({},Fr.getDefaultOptions(),{tooltip:{shared:!0,showMarkers:!0,showCrosshairs:!0,crosshairs:{type:"x"}},legend:{position:"top-left",radio:{}},isStack:!1}),I8=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.active=function(){var t=this.getView(),n=this.context.event;if(n.data){var i=n.data.items,l=t.geometries.filter(function(c){return"point"===c.type});(0,S.S6)(l,function(c){(0,S.S6)(c.elements,function(f){var d=-1!==(0,S.cx)(i,function(p){return p.data===f.data});f.setState("active",d)})})}},r.prototype.reset=function(){var n=this.getView().geometries.filter(function(i){return"point"===i.type});(0,S.S6)(n,function(i){(0,S.S6)(i.elements,function(l){l.setState("active",!1)})})},r.prototype.getView=function(){return this.context.view},r}(wn);ur("marker-active",I8),Er("marker-active",{start:[{trigger:"tooltip:show",action:"marker-active:active"}],end:[{trigger:"tooltip:hide",action:"marker-active:reset"}]});var gx=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="line",t}return(0,E.ZT)(r,e),r.getDefaultOptions=function(){return px},r.prototype.changeData=function(t){this.updateOption({data:t}),Ru({chart:this.chart,options:this.options}),this.chart.changeData(t)},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return $1},r}(Fr),ub=xe({},Fr.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}}}}}),O8=[1,0,0,0,1,0,0,0,1];function Jp(e,r){var t=(0,E.pr)(r||O8);return va.transform(t,e)}var R8=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getActiveElements=function(){var t=va.getDelegationObject(this.context);if(t){var n=this.context.view,l=t.item,c=t.component.get("field");if(c)return n.geometries[0].elements.filter(function(d){return d.getModel().data[c]===l.value})}return[]},r.prototype.getActiveElementLabels=function(){var t=this.context.view,n=this.getActiveElements();return t.geometries[0].labelsContainer.getChildren().filter(function(l){return n.find(function(c){return(0,S.Xy)(c.getData(),l.get("data"))})})},r.prototype.transfrom=function(t){void 0===t&&(t=7.5);var n=this.getActiveElements(),i=this.getActiveElementLabels();n.forEach(function(l,c){var f=i[c],d=l.geometry.coordinate;if(d.isPolar&&d.isTransposed){var p=va.getAngle(l.getModel(),d),_=(p.startAngle+p.endAngle)/2,T=t,b=T*Math.cos(_),I=T*Math.sin(_);l.shape.setMatrix(Jp([["t",b,I]])),f.setMatrix(Jp([["t",b,I]]))}})},r.prototype.active=function(){this.transfrom()},r.prototype.reset=function(){this.transfrom(0)},r}(wn),D8=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getAnnotations=function(t){return(t||this.context.view).getController("annotation").option},r.prototype.getInitialAnnotation=function(){return this.initialAnnotation},r.prototype.init=function(){var t=this,n=this.context.view;n.removeInteraction("tooltip"),n.on("afterchangesize",function(){var i=t.getAnnotations(n);t.initialAnnotation=i})},r.prototype.change=function(t){var n=this.context,i=n.view,l=n.event;this.initialAnnotation||(this.initialAnnotation=this.getAnnotations());var c=(0,S.U2)(l,["data","data"]);if(l.type.match("legend-item")){var f=va.getDelegationObject(this.context),d=i.getGroupedFields()[0];if(f&&d){var p=f.item;c=i.getData().find(function(T){return T[d]===p.value})}}if(c){var m=(0,S.U2)(t,"annotations",[]),x=(0,S.U2)(t,"statistic",{});i.getController("annotation").clear(!0),(0,S.S6)(m,function(T){"object"==typeof T&&i.annotation()[T.type](T)}),Yp(i,{statistic:x,plotType:"pie"},c),i.render(!0)}var _=function F8(e){var t,n=e.event.target;return n&&(t=n.get("element")),t}(this.context);_&&_.shape.toFront()},r.prototype.reset=function(){var t=this.context.view;t.getController("annotation").clear(!0);var i=this.getInitialAnnotation();(0,S.S6)(i,function(l){t.annotation()[l.type](l)}),t.render(!0)},r}(wn),cb="pie-statistic";function P8(e,r){var t;switch(e){case"inner":return t="-30%",(0,S.HD)(r)&&r.endsWith("%")?.01*parseFloat(r)>0?t:r:r<0?r:t;case"outer":return t=12,(0,S.HD)(r)&&r.endsWith("%")?.01*parseFloat(r)<0?t:r:r>0?r:t;default:return r}}function jp(e,r){return(0,S.yW)(Wc(e,r),function(t){return 0===t[r]})}function hb(e){var r=e.chart,t=e.options,i=t.angleField,l=t.colorField,c=t.color,f=t.pieStyle,d=t.shape,p=Wc(t.data,i);if(jp(p,i)){var m="$$percentage$$";p=p.map(function(_){var T;return(0,E.pi)((0,E.pi)({},_),((T={})[m]=1/p.length,T))}),r.data(p),pi(xe({},e,{options:{xField:"1",yField:m,seriesField:l,isStack:!0,interval:{color:c,shape:d,style:f},args:{zIndexReversed:!0,sortZIndex:!0}}}))}else r.data(p),pi(xe({},e,{options:{xField:"1",yField:i,seriesField:l,isStack:!0,interval:{color:c,shape:d,style:f},args:{zIndexReversed:!0,sortZIndex:!0}}}));return e}function fb(e){var r,t=e.chart,n=e.options,l=n.colorField,c=xe({},n.meta);return t.scale(c,((r={})[l]={type:"cat"},r)),e}function vb(e){var t=e.options;return e.chart.coordinate({type:"theta",cfg:{radius:t.radius,innerRadius:t.innerRadius,startAngle:t.startAngle,endAngle:t.endAngle}}),e}function t0(e){var r=e.chart,t=e.options,n=t.label,i=t.colorField,l=t.angleField,c=r.geometries[0];if(n){var f=n.callback,p=di((0,E._T)(n,["callback"]));if(p.content){var m=p.content;p.content=function(b,I,F){var B=b[i],Y=b[l],H=r.getScaleByField(l)?.scale(Y);return(0,S.mf)(m)?m((0,E.pi)((0,E.pi)({},b),{percent:H}),I,F):(0,S.HD)(m)?IT(m,{value:Y,name:B,percentage:(0,S.hj)(H)&&!(0,S.UM)(Y)?(100*H).toFixed(2)+"%":null}):m}}var _=p.type?{inner:"",outer:"pie-outer",spider:"pie-spider"}[p.type]:"pie-outer",T=p.layout?(0,S.kJ)(p.layout)?p.layout:[p.layout]:[];p.layout=(_?[{type:_}]:[]).concat(T),c.label({fields:i?[l,i]:[l],callback:f,cfg:(0,E.pi)((0,E.pi)({},p),{offset:P8(p.type,p.offset),type:"pie"})})}else c.label(!1);return e}function th(e){var r=e.innerRadius,t=e.statistic,n=e.angleField,i=e.colorField,l=e.meta,f=Vc(e.locale);if(r&&t){var d=xe({},ub.statistic,t),p=d.title,m=d.content;return!1!==p&&(p=xe({},{formatter:function(x){var _=x?x[i]:(0,S.UM)(p.content)?f.get(["statistic","total"]):p.content;return((0,S.U2)(l,[i,"formatter"])||function(b){return b})(_)}},p)),!1!==m&&(m=xe({},{formatter:function(x,_){var T=x?x[n]:function B8(e,r){var t=null;return(0,S.S6)(e,function(n){"number"==typeof n[r]&&(t+=n[r])}),t}(_,n),b=(0,S.U2)(l,[n,"formatter"])||function(I){return I};return x||(0,S.UM)(m.content)?b(T):m.content}},m)),xe({},{statistic:{title:p,content:m}},e)}return e}function db(e){var r=e.chart,n=th(e.options),i=n.innerRadius,l=n.statistic;return r.getController("annotation").clear(!0),Cr(En())(e),i&&l&&Yp(r,{statistic:l,plotType:"pie"}),e}function k8(e){var r=e.chart,t=e.options,n=t.tooltip,i=t.colorField,l=t.angleField,c=t.data;if(!1===n)r.tooltip(n);else if(r.tooltip(xe({},n,{shared:!1})),jp(c,l)){var f=(0,S.U2)(n,"fields"),d=(0,S.U2)(n,"formatter");(0,S.xb)((0,S.U2)(n,"fields"))&&(f=[i,l],d=d||function(p){return{name:p[i],value:(0,S.BB)(p[l])}}),r.geometries[0].tooltip(f.join("*"),$c(f,d))}return e}function As(e){var r=e.chart,n=th(e.options),l=n.statistic,c=n.annotations;return(0,S.S6)(n.interactions,function(f){var d,p;if(!1===f.enable)r.removeInteraction(f.type);else if("pie-statistic-active"===f.type){var m=[];!(null===(d=f.cfg)||void 0===d)&&d.start||(m=[{trigger:"element:mouseenter",action:cb+":change",arg:{statistic:l,annotations:c}}]),(0,S.S6)(null===(p=f.cfg)||void 0===p?void 0:p.start,function(x){m.push((0,E.pi)((0,E.pi)({},x),{arg:{statistic:l,annotations:c}}))}),r.interaction(f.type,xe({},f.cfg,{start:m}))}else r.interaction(f.type,f.cfg||{})}),e}function pb(e){return Cr(Ra("pieStyle"),hb,fb,Qr,vb,Iu,k8,t0,gl,db,As,hn)(e)}ur(cb,D8),Er("pie-statistic-active",{start:[{trigger:"element:mouseenter",action:"pie-statistic:change"}],end:[{trigger:"element:mouseleave",action:"pie-statistic:reset"}]}),ur("pie-legend",R8),Er("pie-legend-active",{start:[{trigger:"legend-item:mouseenter",action:"pie-legend:active"}],end:[{trigger:"legend-item:mouseleave",action:"pie-legend:reset"}]});var yx=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="pie",t}return(0,E.ZT)(r,e),r.getDefaultOptions=function(){return ub},r.prototype.changeData=function(t){this.chart.emit(kr.BEFORE_CHANGE_DATA,en.fromData(this.chart,kr.BEFORE_CHANGE_DATA,null));var i=this.options.angleField,l=Wc(this.options.data,i),c=Wc(t,i);jp(l,i)||jp(c,i)?this.update({data:t}):(this.updateOption({data:t}),this.chart.data(c),db({chart:this.chart,options:this.options}),this.chart.render(!0)),this.chart.emit(kr.AFTER_CHANGE_DATA,en.fromData(this.chart,kr.AFTER_CHANGE_DATA,null))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return pb},r}(Fr),mx=["#FAAD14","#E8EDF3"],gb={percent:.2,color:mx,animation:{}};function yb(e){var r=(0,S.uZ)(Lu(e)?e:0,0,1);return[{current:""+r,type:"current",percent:r},{current:""+r,type:"target",percent:1}]}function ku(e){var r=e.chart,t=e.options,i=t.progressStyle,l=t.color,c=t.barWidthRatio;return r.data(yb(t.percent)),pi(xe({},e,{options:{xField:"current",yField:"percent",seriesField:"type",widthRatio:c,interval:{style:i,color:(0,S.HD)(l)?[l,mx[1]]:l},args:{zIndexReversed:!0,sortZIndex:!0}}})),r.tooltip(!1),r.axis(!1),r.legend(!1),e}function S7(e){return e.chart.coordinate("rect").transpose(),e}function mb(e){return Cr(ku,zn({}),S7,hn,Qr,En())(e)}var z8=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="process",t}return(0,E.ZT)(r,e),r.getDefaultOptions=function(){return gb},r.prototype.changeData=function(t){this.updateOption({percent:t}),this.chart.changeData(yb(t))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return mb},r}(Fr);function N8(e){var t=e.options;return e.chart.coordinate("theta",{innerRadius:t.innerRadius,radius:t.radius}),e}function zu(e,r){var t=e.chart,n=e.options,i=n.innerRadius,l=n.statistic,c=n.percent,f=n.meta;if(t.getController("annotation").clear(!0),i&&l){var d=(0,S.U2)(f,["percent","formatter"])||function(m){return(100*m).toFixed(2)+"%"},p=l.content;p&&(p=xe({},p,{content:(0,S.UM)(p.content)?d(c):p.content})),Yp(t,{statistic:(0,E.pi)((0,E.pi)({},l),{content:p}),plotType:"ring-progress"},{percent:c})}return r&&t.render(!0),e}function xb(e){return Cr(ku,zn({}),N8,zu,hn,Qr,En())(e)}var H8={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:{}},xx=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="ring-process",t}return(0,E.ZT)(r,e),r.getDefaultOptions=function(){return H8},r.prototype.changeData=function(t){this.chart.emit(kr.BEFORE_CHANGE_DATA,en.fromData(this.chart,kr.BEFORE_CHANGE_DATA,null)),this.updateOption({percent:t}),this.chart.data(yb(t)),zu({chart:this.chart,options:this.options},!0),this.chart.emit(kr.AFTER_CHANGE_DATA,en.fromData(this.chart,kr.AFTER_CHANGE_DATA,null))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return xb},r}(Fr),Cl=ct(5066),e0={exp:Cl.regressionExp,linear:Cl.regressionLinear,loess:Cl.regressionLoess,log:Cl.regressionLog,poly:Cl.regressionPoly,pow:Cl.regressionPow,quad:Cl.regressionQuad},Y8=function(e){var r=e.options,t=r.xField,n=r.yField,i=r.data,l=r.regressionLine,c=l.type,f=void 0===c?"linear":c,d=l.algorithm;return function(e,r){var t=r.view,n=r.options,l=n.yField,c=t.getScaleByField(n.xField),f=t.getScaleByField(l);return function GF(e,r,t){var n=[],i=e[0],l=null;if(e.length<=2)return function NF(e,r){var t=[];if(e.length){t.push(["M",e[0].x,e[0].y]);for(var n=1,i=e.length;n0,m=d>0;function x(_,T){var b=(0,S.U2)(n,[_]);function I(B){return(0,S.U2)(b,B)}var F={};return"x"===T?((0,S.hj)(f)&&((0,S.hj)(I("min"))||(F.min=p?0:2*f),(0,S.hj)(I("max"))||(F.max=p?2*f:0)),F):((0,S.hj)(d)&&((0,S.hj)(I("min"))||(F.min=m?0:2*d),(0,S.hj)(I("max"))||(F.max=m?2*d:0)),F)}return(0,E.pi)((0,E.pi)({},n),((r={})[i]=(0,E.pi)((0,E.pi)({},n[i]),x(i,"x")),r[l]=(0,E.pi)((0,E.pi)({},n[l]),x(l,"y")),r))};function wb(e){var r=e.data,t=void 0===r?[]:r,n=e.xField,i=e.yField;if(t.length){for(var l=!0,c=!0,f=t[0],d=void 0,p=1;p
    ',itemTpl:"{value}",domStyles:{"g2-tooltip":{padding:"2px 4px",fontSize:"10px"}},showCrosshairs:!0,crosshairs:{type:"x"}},j8={appendPadding:2,tooltip:(0,E.pi)({},Ab),animation:{}};function tD(e){var r=e.chart,t=e.options,i=t.color,l=t.areaStyle,c=t.point,f=t.line,d=c?.state,p=Nu(t.data);r.data(p);var m=xe({},e,{options:{xField:eh,yField:ev,area:{color:i,style:l},line:f,point:c}}),x=xe({},m,{options:{tooltip:!1}}),_=xe({},m,{options:{tooltip:!1,state:d}});return Vf(m),Zc(x),Fa(_),r.axis(!1),r.legend(!1),e}function rh(e){var r,t,n=e.options,i=n.xAxis,l=n.yAxis,f=Nu(n.data);return Cr(zn(((r={})[eh]=i,r[ev]=l,r),((t={})[eh]={type:"cat"},t[ev]=P1(f,ev),t)))(e)}function Eb(e){return Cr(Ra("areaStyle"),tD,rh,ti,Qr,hn,En())(e)}var eD={appendPadding:2,tooltip:(0,E.pi)({},Ab),color:"l(90) 0:#E5EDFE 1:#ffffff",areaStyle:{fillOpacity:.6},line:{size:1,color:"#5B8FF9"},animation:{}},rD=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="tiny-area",t}return(0,E.ZT)(r,e),r.getDefaultOptions=function(){return eD},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this.chart;rh({chart:i,options:this.options}),i.changeData(Nu(t))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return Eb},r}(Fr);function nD(e){var r=e.chart,t=e.options,i=t.color,l=t.columnStyle,c=t.columnWidthRatio,f=Nu(t.data);return r.data(f),pi(xe({},e,{options:{xField:eh,yField:ev,widthRatio:c,interval:{style:l,color:i}}})),r.axis(!1),r.legend(!1),r.interaction("element-active"),e}function Lb(e){return Cr(Qr,Ra("columnStyle"),nD,rh,ti,hn,En())(e)}var Ib={appendPadding:2,tooltip:(0,E.pi)({},{showTitle:!1,shared:!0,showMarkers:!1,customContent:function(e,r){return""+(0,S.U2)(r,[0,"data","y"],0)},containerTpl:'
    ',itemTpl:"{value}",domStyles:{"g2-tooltip":{padding:"2px 4px",fontSize:"10px"}}}),animation:{}},iD=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="tiny-column",t}return(0,E.ZT)(r,e),r.getDefaultOptions=function(){return Ib},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this.chart;rh({chart:i,options:this.options}),i.changeData(Nu(t))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return Lb},r}(Fr);function aD(e){var r=e.chart,t=e.options,i=t.color,l=t.lineStyle,c=t.point,f=c?.state,d=Nu(t.data);r.data(d);var p=xe({},e,{options:{xField:eh,yField:ev,line:{color:i,style:l},point:c}}),m=xe({},p,{options:{tooltip:!1,state:f}});return Zc(p),Fa(m),r.axis(!1),r.legend(!1),e}function oD(e){return Cr(aD,rh,Qr,ti,hn,En())(e)}var sD=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="tiny-line",t}return(0,E.ZT)(r,e),r.getDefaultOptions=function(){return j8},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this.chart;rh({chart:i,options:this.options}),i.changeData(Nu(t))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return oD},r}(Fr),lD={line:$1,pie:pb,column:$o,bar:Ms,area:r8,gauge:L8,"tiny-line":oD,"tiny-column":Lb,"tiny-area":Eb,"ring-progress":xb,progress:mb,scatter:Sb,histogram:Qp,funnel:cx,stock:tv},uD={line:gx,pie:yx,column:ax,bar:ix,area:q1,gauge:Jc,"tiny-line":sD,"tiny-column":iD,"tiny-area":rD,"ring-progress":xx,progress:z8,scatter:n0,histogram:lb,funnel:hx,stock:J8},cD={pie:{label:!1},column:{tooltip:{showMarkers:!1}},bar:{tooltip:{showMarkers:!1}}};function _x(e,r,t){var n=uD[e];n?(0,lD[e])({chart:r,options:xe({},n.getDefaultOptions(),(0,S.U2)(cD,e,{}),t)}):console.error("could not find "+e+" plot")}function Ob(e){var r=e.chart,t=e.options,i=t.legend;return(0,S.S6)(t.views,function(l){var f=l.data,d=l.meta,p=l.axes,m=l.coordinate,x=l.interactions,_=l.annotations,T=l.tooltip,b=l.geometries,I=r.createView({region:l.region});I.data(f);var F={};p&&(0,S.S6)(p,function(B,Y){F[Y]=Kr(B,ya)}),F=xe({},d,F),I.scale(F),p?(0,S.S6)(p,function(B,Y){I.axis(Y,B)}):I.axis(!1),I.coordinate(m),(0,S.S6)(b,function(B){var Y=ma({chart:I,options:B}).ext,G=B.adjust;G&&Y.geometry.adjust(G)}),(0,S.S6)(x,function(B){!1===B.enable?I.removeInteraction(B.type):I.interaction(B.type,B.cfg)}),(0,S.S6)(_,function(B){I.annotation()[B.type]((0,E.pi)({},B))}),"boolean"==typeof l.animation?I.animate(!1):(I.animate(!0),(0,S.S6)(I.geometries,function(B){B.animate(l.animation)})),T&&(I.interaction("tooltip"),I.tooltip(T))}),i?(0,S.S6)(i,function(l,c){r.legend(c,l)}):r.legend(!1),r.tooltip(t.tooltip),e}function hD(e){var r=e.chart,t=e.options,i=t.data,l=void 0===i?[]:i;return(0,S.S6)(t.plots,function(c){var f=c.type,d=c.region,p=c.options,m=void 0===p?{}:p,_=m.tooltip;if(c.top)_x(f,r,(0,E.pi)((0,E.pi)({},m),{data:l}));else{var T=r.createView((0,E.pi)({region:d},Kr(m,Ja)));_&&T.interaction("tooltip"),_x(f,T,(0,E.pi)({data:l},m))}}),e}function fD(e){return e.chart.option("slider",e.options.slider),e}function Rb(e){return Cr(hn,Ob,hD,An,hn,Qr,ti,fD,En())(e)}var M7=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getAssociationItems=function(t,n){var i,l=this.context.event,c=n||{},f=c.linkField,d=c.dim,p=[];if(null!==(i=l.data)&&void 0!==i&&i.data){var m=l.data.data;(0,S.S6)(t,function(x){var _,T,b=f;if("x"===d?b=x.getXScale().field:"y"===d?b=null===(_=x.getYScales().find(function(F){return F.field===b}))||void 0===_?void 0:_.field:b||(b=null===(T=x.getGroupScales()[0])||void 0===T?void 0:T.field),b){var I=(0,S.UI)(Wf(x),function(F){var B=!1,Y=!1,G=(0,S.kJ)(m)?(0,S.U2)(m[0],b):(0,S.U2)(m,b);return function vD(e,r){var n=e.getModel().data;return(0,S.kJ)(n)?n[0][r]:n[r]}(F,b)===G?B=!0:Y=!0,{element:F,view:x,active:B,inactive:Y}});p.push.apply(p,I)}})}return p},r.prototype.showTooltip=function(t){var n=OT(this.context.view),i=this.getAssociationItems(n,t);(0,S.S6)(i,function(l){if(l.active){var c=l.element.shape.getCanvasBBox();l.view.showTooltip({x:c.minX+c.width/2,y:c.minY+c.height/2})}})},r.prototype.hideTooltip=function(){var t=OT(this.context.view);(0,S.S6)(t,function(n){n.hideTooltip()})},r.prototype.active=function(t){var n=Xc(this.context.view),i=this.getAssociationItems(n,t);(0,S.S6)(i,function(l){l.active&&l.element.setState("active",!0)})},r.prototype.selected=function(t){var n=Xc(this.context.view),i=this.getAssociationItems(n,t);(0,S.S6)(i,function(l){l.active&&l.element.setState("selected",!0)})},r.prototype.highlight=function(t){var n=Xc(this.context.view),i=this.getAssociationItems(n,t);(0,S.S6)(i,function(l){l.inactive&&l.element.setState("inactive",!0)})},r.prototype.reset=function(){var t=Xc(this.context.view);(0,S.S6)(t,function(n){!function dD(e){var r=Wf(e);(0,S.S6)(r,function(t){t.hasState("active")&&t.setState("active",!1),t.hasState("selected")&&t.setState("selected",!1),t.hasState("inactive")&&t.setState("inactive",!1)})}(n)})},r}(wn);ur("association",M7),Er("association-active",{start:[{trigger:"element:mouseenter",action:"association:active"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),Er("association-selected",{start:[{trigger:"element:mouseenter",action:"association:selected"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),Er("association-highlight",{start:[{trigger:"element:mouseenter",action:"association:highlight"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),Er("association-tooltip",{start:[{trigger:"element:mousemove",action:"association:showTooltip"}],end:[{trigger:"element:mouseleave",action:"association:hideTooltip"}]});var T7=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="mix",t}return(0,E.ZT)(r,e),r.prototype.getSchemaAdaptor=function(){return Rb},r}(Fr),Es=(()=>(function(e){e.DEV="DEV",e.BETA="BETA",e.STABLE="STABLE"}(Es||(Es={})),Es))();Object.defineProperty(function e(){},"MultiView",{get:function(){return function Fb(e,r){console.warn(e===Es.DEV?"Plot '"+r+"' is in DEV stage, just give us issues.":e===Es.BETA?"Plot '"+r+"' is in BETA stage, DO NOT use it in production env.":e===Es.STABLE?"Plot '"+r+"' is in STABLE stage, import it by \"import { "+r+" } from '@antv/g2plot'\".":"invalid Stage type.")}(Es.STABLE,"MultiView"),T7},enumerable:!1,configurable:!0});var to="first-axes-view",mo="second-axes-view",Ba="series-field-key";function nv(e,r,t,n,i){var l=[];r.forEach(function(x){n.forEach(function(_){var T,b=((T={})[e]=_[e],T[t]=x,T[x]=_[x],T);l.push(b)})});var c=Object.values((0,S.vM)(l,t)),f=c[0],d=void 0===f?[]:f,p=c[1],m=void 0===p?[]:p;return i?[d.reverse(),m.reverse()]:[d,m]}function Ls(e){return"vertical"!==e}function Sx(e,r,t){var m,n=r[0],i=r[1],l=n.autoPadding,c=i.autoPadding,f=e.__axisPosition,d=f.layout,p=f.position;Ls(d)&&"top"===p&&(n.autoPadding=t.instance(l.top,0,l.bottom,l.left),i.autoPadding=t.instance(c.top,l.left,c.bottom,0)),Ls(d)&&"bottom"===p&&(n.autoPadding=t.instance(l.top,l.right/2+5,l.bottom,l.left),i.autoPadding=t.instance(c.top,c.right,c.bottom,l.right/2+5)),Ls(d)||"bottom"!==p||(n.autoPadding=t.instance(l.top,l.right,l.bottom/2+5,m=l.left>=c.left?l.left:c.left),i.autoPadding=t.instance(l.bottom/2+5,c.right,c.bottom,m)),Ls(d)||"top"!==p||(n.autoPadding=t.instance(l.top,l.right,0,m=l.left>=c.left?l.left:c.left),i.autoPadding=t.instance(0,c.right,l.top,m))}function gD(e){var r=e.chart,t=e.options,i=t.xField,l=t.yField,c=t.color,f=t.barStyle,d=t.widthRatio,p=t.legend,m=t.layout,x=nv(i,l,Ba,t.data,Ls(m));p?r.legend(Ba,p):!1===p&&r.legend(!1);var _,T,b=x[0],I=x[1];return Ls(m)?((_=r.createView({region:{start:{x:0,y:0},end:{x:.5,y:1}},id:to})).coordinate().transpose().reflect("x"),(T=r.createView({region:{start:{x:.5,y:0},end:{x:1,y:1}},id:mo})).coordinate().transpose(),_.data(b),T.data(I)):(_=r.createView({region:{start:{x:0,y:0},end:{x:1,y:.5}},id:to}),(T=r.createView({region:{start:{x:0,y:.5},end:{x:1,y:1}},id:mo})).coordinate().reflect("y"),_.data(b),T.data(I)),pi(xe({},e,{chart:_,options:{widthRatio:d,xField:i,yField:l[0],seriesField:Ba,interval:{color:c,style:f}}})),pi(xe({},e,{chart:T,options:{xField:i,yField:l[1],seriesField:Ba,widthRatio:d,interval:{color:c,style:f}}})),e}function yD(e){var r,t,n,i=e.options,l=e.chart,c=i.xAxis,f=i.yAxis,d=i.xField,p=i.yField,m=Br(l,to),x=Br(l,mo),_={};return(0,S.XP)(i?.meta||{}).map(function(T){(0,S.U2)(i?.meta,[T,"alias"])&&(_[T]=i.meta[T].alias)}),l.scale(((r={})[Ba]={sync:!0,formatter:function(T){return(0,S.U2)(_,T,T)}},r)),zn(((t={})[d]=c,t[p[0]]=f[p[0]],t))(xe({},e,{chart:m})),zn(((n={})[d]=c,n[p[1]]=f[p[1]],n))(xe({},e,{chart:x})),e}function mD(e){var r=e.chart,t=e.options,n=t.xAxis,i=t.yAxis,l=t.xField,c=t.yField,f=t.layout,d=Br(r,to),p=Br(r,mo);return p.axis(l,"bottom"===n?.position&&(0,E.pi)((0,E.pi)({},n),{label:{formatter:function(){return""}}})),d.axis(l,!1!==n&&(0,E.pi)({position:Ls(f)?"top":"bottom"},n)),!1===i?(d.axis(c[0],!1),p.axis(c[1],!1)):(d.axis(c[0],i[c[0]]),p.axis(c[1],i[c[1]])),r.__axisPosition={position:d.getOptions().axes[l].position,layout:f},e}function xD(e){var r=e.chart;return An(xe({},e,{chart:Br(r,to)})),An(xe({},e,{chart:Br(r,mo)})),e}function _l(e){var r=e.chart,t=e.options,n=t.yField,i=t.yAxis;return Ou(xe({},e,{chart:Br(r,to),options:{yAxis:i[n[0]]}})),Ou(xe({},e,{chart:Br(r,mo),options:{yAxis:i[n[1]]}})),e}function CD(e){var r=e.chart;return Qr(xe({},e,{chart:Br(r,to)})),Qr(xe({},e,{chart:Br(r,mo)})),Qr(e),e}function wD(e){var r=e.chart;return hn(xe({},e,{chart:Br(r,to)})),hn(xe({},e,{chart:Br(r,mo)})),e}function _D(e){var t,n,r=this,i=e.chart,l=e.options,c=l.label,f=l.yField,d=l.layout,p=Br(i,to),m=Br(i,mo),x=vi(p,"interval"),_=vi(m,"interval");if(c){var T=c.callback,b=(0,E._T)(c,["callback"]);b.position||(b.position="middle"),void 0===b.offset&&(b.offset=2);var I=(0,E.pi)({},b);if(Ls(d)){var F=(null===(t=I.style)||void 0===t?void 0:t.textAlign)||("middle"===b.position?"center":"left");b.style=xe({},b.style,{textAlign:F}),I.style=xe({},I.style,{textAlign:{left:"right",right:"left",center:"center"}[F]})}else{var Y={top:"bottom",bottom:"top",middle:"middle"};"string"==typeof b.position?b.position=Y[b.position]:"function"==typeof b.position&&(b.position=function(){for(var et=[],wt=0;wt1?r+"_"+t:""+r}function Nb(e){var t=e.xField,n=e.measureField,i=e.rangeField,l=e.targetField,c=e.layout,f=[],d=[];e.data.forEach(function(x,_){var T=[x[i]].flat();T.sort(function(F,B){return F-B}),T.forEach(function(F,B){var Y,G=0===B?F:T[B]-T[B-1];f.push(((Y={rKey:i+"_"+B})[t]=t?x[t]:String(_),Y[i]=G,Y))});var b=[x[n]].flat();b.forEach(function(F,B){var Y;f.push(((Y={mKey:zb(b,n,B)})[t]=t?x[t]:String(_),Y[n]=F,Y))});var I=[x[l]].flat();I.forEach(function(F,B){var Y;f.push(((Y={tKey:zb(I,l,B)})[t]=t?x[t]:String(_),Y[l]=F,Y))}),d.push(x[i],x[n],x[l])});var p=Math.min.apply(Math,d.flat(1/0)),m=Math.max.apply(Math,d.flat(1/0));return p=p>0?0:p,"vertical"===c&&f.reverse(),{min:p,max:m,ds:f}}function Hb(e){var r=e.chart,t=e.options,n=t.bulletStyle,i=t.targetField,l=t.rangeField,c=t.measureField,f=t.xField,d=t.color,p=t.layout,m=t.size,x=t.label,_=Nb(t),T=_.min,b=_.max;return r.data(_.ds),pi(xe({},e,{options:{xField:f,yField:l,seriesField:"rKey",isStack:!0,label:(0,S.U2)(x,"range"),interval:{color:(0,S.U2)(d,"range"),style:(0,S.U2)(n,"range"),size:(0,S.U2)(m,"range")}}})),r.geometries[0].tooltip(!1),pi(xe({},e,{options:{xField:f,yField:c,seriesField:"mKey",isStack:!0,label:(0,S.U2)(x,"measure"),interval:{color:(0,S.U2)(d,"measure"),style:(0,S.U2)(n,"measure"),size:(0,S.U2)(m,"measure")}}})),Fa(xe({},e,{options:{xField:f,yField:i,seriesField:"tKey",label:(0,S.U2)(x,"target"),point:{color:(0,S.U2)(d,"target"),style:(0,S.U2)(n,"target"),size:(0,S.mf)((0,S.U2)(m,"target"))?function(G){return(0,S.U2)(m,"target")(G)/2}:(0,S.U2)(m,"target")/2,shape:"horizontal"===p?"line":"hyphen"}}})),"horizontal"===p&&r.coordinate().transpose(),(0,E.pi)((0,E.pi)({},e),{ext:{data:{min:T,max:b}}})}function Gb(e){var r,t,n=e.options,c=n.yAxis,f=n.targetField,d=n.rangeField,p=n.measureField,x=e.ext.data;return Cr(zn(((r={})[n.xField]=n.xAxis,r[p]=c,r),((t={})[p]={min:x?.min,max:x?.max,sync:!0},t[f]={sync:""+p},t[d]={sync:""+p},t)))(e)}function bx(e){var r=e.chart,t=e.options,n=t.xAxis,i=t.yAxis,l=t.xField,c=t.measureField,d=t.targetField;return r.axis(""+t.rangeField,!1),r.axis(""+d,!1),r.axis(""+l,!1!==n&&n),r.axis(""+c,!1!==i&&i),e}function ID(e){var r=e.chart,n=e.options.legend;return r.removeInteraction("legend-filter"),r.legend(n),r.legend("rKey",!1),r.legend("mKey",!1),r.legend("tKey",!1),e}function OD(e){var t=e.options,n=t.label,i=t.measureField,l=t.targetField,c=t.rangeField,f=e.chart.geometries,d=f[0],p=f[1],m=f[2];return(0,S.U2)(n,"range")?d.label(""+c,(0,E.pi)({layout:[{type:"limit-in-plot"}]},di(n.range))):d.label(!1),(0,S.U2)(n,"measure")?p.label(""+i,(0,E.pi)({layout:[{type:"limit-in-plot"}]},di(n.measure))):p.label(!1),(0,S.U2)(n,"target")?m.label(""+l,(0,E.pi)({layout:[{type:"limit-in-plot"}]},di(n.target))):m.label(!1),e}function RD(e){Cr(Hb,Gb,bx,ID,Qr,OD,ti,An,hn)(e)}!function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="box",t}(0,E.ZT)(r,e),r.getDefaultOptions=function(){return TD},r.prototype.changeData=function(t){this.updateOption({data:t});var n=this.options.yField,i=this.chart.views.find(function(l){return l.id===Tx});i&&i.data(t),this.chart.changeData(Bb(t,n))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return kb}}(Fr);var Ax=xe({},Fr.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}}),iv=(function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="bullet",t}(0,E.ZT)(r,e),r.getDefaultOptions=function(){return Ax},r.prototype.changeData=function(t){this.updateOption({data:t});var n=Nb(this.options),c=n.ds;Gb({options:this.options,ext:{data:{min:n.min,max:n.max}},chart:this.chart}),this.chart.changeData(c)},r.prototype.getSchemaAdaptor=function(){return RD},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()}}(Fr),{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});var Xb="x",av="y",Hu="name",s0="source",Vb={nodeStyle:{opacity:1,fillOpacity:1,lineWidth:1},edgeStyle:{opacity:.5,lineWidth:2},label:{fields:["x","name"],callback:function(e,r){return{offsetX:(e[0]+e[1])/2>.5?-4:4,content:r}},labelEmit:!0,style:{fill:"#8c8c8c"}},tooltip:{showTitle:!1,showMarkers:!1,fields:["source","target","value","isNode"],showContent:function(e){return!(0,S.U2)(e,[0,"data","isNode"])},formatter:function(e){return{name:e.source+" -> "+e.target,value:e.value}}},interactions:[{type:"element-active"}],weight:!0,nodePaddingRatio:.1,nodeWidthRatio:.05};function ih(e){var r=e.options,d=r.rawFields,p=void 0===d?[]:d,x=function Ub(e,r){var t=function Wb(e){return(0,S.f0)({},iv,e)}(e),n={},i=r.nodes,l=r.links;i.forEach(function(d){var p=t.id(d);n[p]=d}),function Ex(e,r,t){(0,S.U5)(e,function(n,i){n.inEdges=r.filter(function(l){return""+t.target(l)==""+i}),n.outEdges=r.filter(function(l){return""+t.source(l)==""+i}),n.edges=n.outEdges.concat(n.inEdges),n.frequency=n.edges.length,n.value=0,n.inEdges.forEach(function(l){n.value+=t.targetWeight(l)}),n.outEdges.forEach(function(l){n.value+=t.sourceWeight(l)})})}(n,l,t),function FD(e,r){var n={weight:function(i,l){return l.value-i.value},frequency:function(i,l){return l.frequency-i.frequency},id:function(i,l){return(""+r.id(i)).localeCompare(""+r.id(l))}}[r.sortBy];!n&&(0,S.mf)(r.sortBy)&&(n=r.sortBy),n&&e.sort(n)}(i,t);var c=function Lx(e,r){var t=e.length;if(!t)throw new TypeError("Invalid nodes: it's empty!");if(r.weight){var n=r.nodePaddingRatio;if(n<0||n>=1)throw new TypeError("Invalid nodePaddingRatio: it must be in range [0, 1)!");var i=n/(2*t),l=r.nodeWidthRatio;if(l<=0||l>=1)throw new TypeError("Invalid nodeWidthRatio: it must be in range (0, 1)!");var c=0;e.forEach(function(d){c+=d.value}),e.forEach(function(d){d.weight=d.value/c,d.width=d.weight*(1-n),d.height=l}),e.forEach(function(d,p){for(var m=0,x=p-1;x>=0;x--)m+=e[x].width+2*i;var _=d.minX=i+m,T=d.maxX=d.minX+d.width,b=d.minY=r.y-l/2,I=d.maxY=b+l;d.x=[_,T,T,_],d.y=[b,b,I,I]})}else{var f=1/t;e.forEach(function(d,p){d.x=(p+.5)*f,d.y=r.y})}return e}(i,t),f=function Yb(e,r,t){if(t.weight){var n={};(0,S.U5)(e,function(i,l){n[l]=i.value}),r.forEach(function(i){var l=t.source(i),c=t.target(i),f=e[l],d=e[c];if(f&&d){var p=n[l],m=t.sourceWeight(i),x=f.minX+(f.value-p)/f.value*f.width,_=x+m/f.value*f.width;n[l]-=m;var T=n[c],b=t.targetWeight(i),I=d.minX+(d.value-T)/d.value*d.width,F=I+b/d.value*d.width;n[c]-=b;var B=t.y;i.x=[x,_,I,F],i.y=[B,B,B,B],i.source=f,i.target=d}})}else r.forEach(function(i){var l=e[t.source(i)],c=e[t.target(i)];l&&c&&(i.x=[l.x,c.x],i.y=[l.y,c.y],i.source=l,i.target=c)});return r}(n,l,t);return{nodes:c,links:f}}({weight:!0,nodePaddingRatio:r.nodePaddingRatio,nodeWidthRatio:r.nodeWidthRatio},_T(r.data,r.sourceField,r.targetField,r.weightField)),T=x.links,b=x.nodes.map(function(F){return(0,E.pi)((0,E.pi)({},Kr(F,(0,E.pr)(["id","x","y","name"],p))),{isNode:!0})}),I=T.map(function(F){return(0,E.pi)((0,E.pi)({source:F.source.name,target:F.target.name,name:F.source.name||F.target.name},Kr(F,(0,E.pr)(["x","y","value"],p))),{isNode:!1})});return(0,E.pi)((0,E.pi)({},e),{ext:(0,E.pi)((0,E.pi)({},e.ext),{chordData:{nodesData:b,edgesData:I}})})}function Ix(e){var r;return e.chart.scale(((r={x:{sync:!0,nice:!0},y:{sync:!0,nice:!0,max:1}})[Hu]={sync:"color"},r[s0]={sync:"color"},r)),e}function $b(e){return e.chart.axis(!1),e}function Zb(e){return e.chart.legend(!1),e}function qb(e){return e.chart.tooltip(e.options.tooltip),e}function Kb(e){return e.chart.coordinate("polar").reflect("y"),e}function DD(e){var t=e.options,n=e.ext.chordData.nodesData,i=t.nodeStyle,l=t.label,c=t.tooltip,f=e.chart.createView();return f.data(n),Vp({chart:f,options:{xField:Xb,yField:av,seriesField:Hu,polygon:{style:i},label:l,tooltip:c}}),e}function BD(e){var t=e.options,n=e.ext.chordData.edgesData,i=t.edgeStyle,l=t.tooltip,c=e.chart.createView();return c.data(n),PT({chart:c,options:{xField:Xb,yField:av,seriesField:s0,edge:{style:i,shape:"arc"},tooltip:l}}),e}function PD(e){var r=e.chart;return Uf(r,e.options.animation,function PF(e){return(0,S.U2)(e,["views","length"],0)<=0?e.geometries:(0,S.u4)(e.views,function(r,t){return r.concat(t.geometries)},e.geometries)}(r)),e}function kD(e){return Cr(Qr,ih,Kb,Ix,$b,Zb,qb,BD,DD,An,gl,PD)(e)}var Qb=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="chord",t}return(0,E.ZT)(r,e),r.getDefaultOptions=function(){return Vb},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return kD},r}(Fr),zD=["x","y","r","name","value","path","depth"],ND={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}},Jb="drilldown-bread-crumb",l0={position:"top-left",dividerText:"/",textStyle:{fontSize:12,fill:"rgba(0, 0, 0, 0.65)",cursor:"pointer"},activeTextStyle:{fill:"#87B5FF"}},sv="hierarchy-data-transform-params",Sl=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="drill-down",t.historyCache=[],t.breadCrumbGroup=null,t.breadCrumbCfg=l0,t}return(0,E.ZT)(r,e),r.prototype.click=function(){var t=(0,S.U2)(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(),n=this.breadCrumbGroup,i=n.getBBox(),l=this.getButtonCfg().position,c={x:t.start.x,y:t.end.y-(i.height+10)};t.isPolar&&(c={x:0,y:0}),"bottom-left"===l&&(c={x:t.start.x,y:t.start.y});var f=va.transform(null,[["t",c.x+0,c.y+i.height+5]]);n.setMatrix(f)}},r.prototype.back=function(){(0,S.dp)(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 n=this.context.view,i=(0,S.U2)(n,["interactions","drill-down","cfg","transformData"],function(p){return p}),l=i((0,E.pi)({data:t.data},t[sv]));n.changeData(l);for(var c=[],f=t;f;){var d=f.data;c.unshift({id:d.name+"_"+f.height+"_"+f.depth,name:d.name,children:i((0,E.pi)({data:d},t[sv]))}),f=f.parent}this.historyCache=(this.historyCache||[]).slice(0,-1).concat(c)},r.prototype.backTo=function(t){if(t&&!(t.length<=0)){var n=this.context.view,i=(0,S.Z$)(t).children;n.changeData(i),t.length>1?(this.historyCache=t,this.drawBreadCrumb()):(this.historyCache=[],this.hideCrumbGroup())}},r.prototype.getButtonCfg=function(){var n=(0,S.U2)(this.context.view,["interactions","drill-down","cfg","drillDownConfig"]);return xe(this.breadCrumbCfg,n?.breadCrumb,this.cfg)},r.prototype.drawBreadCrumb=function(){this.drawBreadCrumbGroup(),this.resetPosition(),this.breadCrumbGroup.show()},r.prototype.drawBreadCrumbGroup=function(){var t=this,n=this.getButtonCfg(),i=this.historyCache;this.breadCrumbGroup?this.breadCrumbGroup.clear():this.breadCrumbGroup=this.context.view.foregroundGroup.addGroup({name:Jb});var l=0;i.forEach(function(c,f){var d=t.breadCrumbGroup.addShape({type:"text",id:c.id,name:Jb+"_"+c.name+"_text",attrs:(0,E.pi)((0,E.pi)({text:0!==f||(0,S.UM)(n.rootText)?c.name:n.rootText},n.textStyle),{x:l,y:0})}),p=d.getBBox();if(l+=p.width+4,d.on("click",function(_){var T,b=_.target.get("id");if(b!==(null===(T=(0,S.Z$)(i))||void 0===T?void 0:T.id)){var I=i.slice(0,i.findIndex(function(F){return F.id===b})+1);t.backTo(I)}}),d.on("mouseenter",function(_){var T;_.target.get("id")!==(null===(T=(0,S.Z$)(i))||void 0===T?void 0:T.id)?d.attr(n.activeTextStyle):d.attr({cursor:"default"})}),d.on("mouseleave",function(){d.attr(n.textStyle)}),f0&&t*t>n*n+i*i}function c0(e,r){for(var t=0;t(d*=d)?(i=(p+d-l)/(2*p),f=Math.sqrt(Math.max(0,d/p-i*i)),t.x=e.x-i*n-f*c,t.y=e.y-i*c+f*n):(i=(p+l-d)/(2*p),f=Math.sqrt(Math.max(0,l/p-i*i)),t.x=r.x+i*n-f*c,t.y=r.y+i*c+f*n)):(t.x=r.x+t.r,t.y=r.y)}function nA(e,r){var t=e.r+r.r-1e-6,n=r.x-e.x,i=r.y-e.y;return t>0&&t*t>n*n+i*i}function iA(e){var r=e._,t=e.next._,n=r.r+t.r,i=(r.x*t.r+t.x*r.r)/n,l=(r.y*t.r+t.y*r.r)/n;return i*i+l*l}function h0(e){this._=e,this.next=null,this.previous=null}function Dx(e){if(!(i=(e=function HD(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}(e)).length))return 0;var r,t,n,i,l,c,f,d,p,m,x;if((r=e[0]).x=0,r.y=0,!(i>1))return r.r;if(r.x=-(t=e[1]).r,t.x=r.r,t.y=0,!(i>2))return r.r+t.r;rA(t,r,n=e[2]),r=new h0(r),t=new h0(t),n=new h0(n),r.next=n.previous=t,t.next=r.previous=n,n.next=t.previous=r;t:for(f=3;f=0;)r+=t[n].value;else r=1;e.value=r}function oh(e,r){e instanceof Map?(e=[void 0,e],void 0===r&&(r=Nx)):void 0===r&&(r=jD);for(var n,l,c,f,d,t=new Pa(e),i=[t];n=i.pop();)if((c=r(n.data))&&(d=(c=Array.from(c)).length))for(n.children=c,f=d-1;f>=0;--f)i.push(l=c[f]=new Pa(c[f])),l.parent=n,l.depth=n.depth+1;return t.eachBefore(Gu)}function jD(e){return e.children}function Nx(e){return Array.isArray(e)?e[1]:null}function uA(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function Gu(e){var r=0;do{e.height=r}while((e=e.parent)&&e.height<++r)}function Pa(e){this.data=e,this.depth=this.height=0,this.parent=null}Pa.prototype=oh.prototype={constructor:Pa,count:function v0(){return this.eachAfter(sA)},each:function xo(e,r){let t=-1;for(const n of this)e.call(r,n,++t,this);return this},eachAfter:function kx(e,r){for(var l,c,f,t=this,n=[t],i=[],d=-1;t=n.pop();)if(i.push(t),l=t.children)for(c=0,f=l.length;c=0;--l)n.push(i[l]);return this},find:function $D(e,r){let t=-1;for(const n of this)if(e.call(r,n,++t,this))return n},sum:function E7(e){return this.eachAfter(function(r){for(var t=+e(r.data)||0,n=r.children,i=n&&n.length;--i>=0;)t+=n[i].value;r.value=t})},sort:function ZD(e){return this.eachBefore(function(r){r.children&&r.children.sort(e)})},path:function qD(e){for(var r=this,t=function KD(e,r){if(e===r)return e;var t=e.ancestors(),n=r.ancestors(),i=null;for(e=t.pop(),r=n.pop();e===r;)i=e,e=t.pop(),r=n.pop();return i}(r,e),n=[r];r!==t;)n.push(r=r.parent);for(var i=n.length;e!==t;)n.splice(i,0,e),e=e.parent;return n},ancestors:function L7(){for(var e=this,r=[e];e=e.parent;)r.push(e);return r},descendants:function zx(){return Array.from(this)},leaves:function lA(){var e=[];return this.eachBefore(function(r){r.children||e.push(r)}),e},links:function QD(){var e=this,r=[];return e.each(function(t){t!==e&&r.push({source:t.parent,target:t})}),r},copy:function Is(){return oh(this).eachBefore(uA)},[Symbol.iterator]:function*JD(){var r,n,i,l,e=this,t=[e];do{for(r=t.reverse(),t=[];e=r.pop();)if(yield e,n=e.children)for(i=0,l=n.length;i0&&p1;)m=(null===(p=x.parent.data)||void 0===p?void 0:p.name)+" / "+m,x=x.parent;if(l&&d.depth>2)return null;var _=xe({},d.data,(0,E.pi)((0,E.pi)((0,E.pi)({},Kr(d.data,i)),{path:m}),d));_.ext=t,_[sv]={hierarchyConfig:t,rawFields:i,enableDrillDown:l},f.push(_)}),f}function Hx(e,r,t){var n=z1([e,r]),i=n[0],l=n[1],c=n[2],f=n[3],m=t.width-(f+l),x=t.height-(i+c),_=Math.min(m,x),T=(m-_)/2,b=(x-_)/2;return{finalPadding:[i+b,l+T,c+b,f+T],finalSize:_<0?0:_}}function cA(e){var r=e.chart,t=Math.min(r.viewBBox.width,r.viewBBox.height);return xe({options:{size:function(n){return n.r*t}}},e)}function hA(e){var r=e.options,t=e.chart,n=t.viewBBox,i=r.padding,l=r.appendPadding,c=r.drilldown,f=l;c?.enabled&&(f=z1([Gp(t.appendPadding,(0,S.U2)(c,["breadCrumb","position"])),l]));var p=Hx(i,f,n).finalPadding;return t.padding=p,t.appendPadding=0,e}function $i(e){var r=e.chart,t=e.options,n=r.padding,i=r.appendPadding,l=t.color,c=t.colorField,f=t.pointStyle,p=t.sizeField,m=t.rawFields,x=void 0===m?[]:m,T=Os({data:t.data,hierarchyConfig:t.hierarchyConfig,enableDrillDown:t.drilldown?.enabled,rawFields:x});r.data(T);var I=Hx(n,i,r.viewBBox).finalSize,F=function(B){return B.r*I};return p&&(F=function(B){return B[p]*I}),Fa(xe({},e,{options:{xField:"x",yField:"y",seriesField:c,sizeField:p,rawFields:(0,E.pr)(zD,x),point:{color:l,style:f,shape:"circle",size:F}}})),e}function yi(e){return Cr(zn({},{x:{min:0,max:1,minLimit:0,maxLimit:1,nice:!0},y:{min:0,max:1,minLimit:0,maxLimit:1,nice:!0}}))(e)}function tB(e){var r=e.chart,n=e.options.tooltip;if(!1===n)r.tooltip(!1);else{var i=n;(0,S.U2)(n,"fields")||(i=xe({},{customItems:function(l){return l.map(function(c){var f=(0,S.U2)(r.getOptions(),"scales"),d=(0,S.U2)(f,["name","formatter"],function(m){return m}),p=(0,S.U2)(f,["value","formatter"],function(m){return m});return(0,E.pi)((0,E.pi)({},c),{name:d(c.data.name),value:p(c.data.value)})})}},i)),r.tooltip(i)}return e}function eB(e){return e.chart.axis(!1),e}function rB(e){var r=e.drilldown,t=e.interactions;return r?.enabled?xe({},e,{interactions:(0,E.pr)(void 0===t?[]:t,[{type:"drill-down",cfg:{drillDownConfig:r,transformData:Os,enableDrillDown:!0}}])}):e}function fA(e){return An({chart:e.chart,options:rB(e.options)}),e}function wo(e){return Cr(Ra("pointStyle"),cA,hA,Qr,yi,$i,eB,Iu,tB,fA,hn,En())(e)}function Dr(e){var r=(0,S.U2)(e,["event","data","data"],{});return(0,S.kJ)(r.children)&&r.children.length>0}function vA(e){var r=e.view.getCoordinate(),t=r.innerRadius;if(t){var n=e.event,i=n.x,l=n.y,c=r.center,f=c.x,d=c.y,p=r.getRadius()*t;return Math.sqrt(Math.pow(f-i,2)+Math.pow(d-l,2))(function(e){e.Left="Left",e.Right="Right"}(Ko||(Ko={})),Ko))(),Ml=(()=>(function(e){e.Line="line",e.Column="column"}(Ml||(Ml={})),Ml))();function bn(e){return(0,S.U2)(e,"geometry")===Ml.Line}function wr(e){return(0,S.U2)(e,"geometry")===Ml.Column}function _o(e,r,t){return wr(t)?xe({},{geometry:Ml.Column,label:t.label&&t.isRange?{content:function(n){var i;return null===(i=n[r])||void 0===i?void 0:i.join("-")}}:void 0},t):(0,E.pi)({geometry:Ml.Line},t)}function vv(e,r){var t=e[0],n=e[1];return(0,S.kJ)(r)?[r[0],r[1]]:[(0,S.U2)(r,t),(0,S.U2)(r,n)]}function dv(e,r){return r===Ko.Left?!1!==e&&xe({},wa,e):r===Ko.Right?!1!==e&&xe({},fv,e):e}function Gx(e){var r=e.view,t=e.geometryOption,n=e.yField,l=(0,S.U2)(e.legend,"marker"),c=vi(r,bn(t)?"line":"interval");if(!t.seriesField){var f=(0,S.U2)(r,"options.scales."+n+".alias")||n,d=c.getAttribute("color"),p=r.getTheme().defaultColor;return d&&(p=va.getMappingValue(d,f,(0,S.U2)(d,["values",0],p))),[{value:n,name:f,marker:((0,S.mf)(l)?l:!(0,S.xb)(l)&&xe({},{style:{stroke:p,fill:p}},l))||(bn(t)?{symbol:function(_,T,b){return[["M",_-b,T],["L",_+b,T]]},style:{lineWidth:2,r:6,stroke:p}}:{symbol:"square",style:{fill:p}}),isGeometry:!0,viewId:r.id}]}var x=c.getGroupAttributes();return(0,S.u4)(x,function(_,T){var b=va.getLegendItems(r,c,T,r.getTheme(),l);return _.concat(b)},[])}var Rs=function(e,r){var t=r[0],n=r[1],i=e.getOptions().data,l=e.getXScale(),c=(0,S.dp)(i);if(l&&c){var p=(0,S.I)(i,l.field),m=(0,S.dp)(p),x=Math.floor(t*(m-1)),_=Math.floor(n*(m-1));e.filter(l.field,function(T){var b=p.indexOf(T);return!(b>-1)||function zF(e,r,t){var n=Math.min(r,t),i=Math.max(r,t);return e>=n&&e<=i}(b,x,_)}),e.getRootView().render(!0)}};function dA(e){var r,t=e.options,n=t.geometryOptions,i=void 0===n?[]:n,l=t.xField,c=t.yField,f=(0,S.yW)(i,function(d){var p=d.geometry;return p===Ml.Line||void 0===p});return xe({},{options:{geometryOptions:[],meta:(r={},r[l]={type:"cat",sync:!0,range:f?[0,1]:void 0},r),tooltip:{showMarkers:f,showCrosshairs:f,shared:!0,crosshairs:{type:"x"}},interactions:f?[{type:"legend-visible-filter"}]:[{type:"legend-visible-filter"},{type:"active-region"}],legend:{position:"top-left"}}},e,{options:{yAxis:vv(c,t.yAxis),geometryOptions:[_o(0,c[0],i[0]),_o(0,c[1],i[1])],annotations:vv(c,t.annotations)}})}function pA(e){var r,t,n=e.chart,l=e.options.geometryOptions,c={line:0,column:1};return[{type:null===(r=l[0])||void 0===r?void 0:r.geometry,id:ea},{type:null===(t=l[1])||void 0===t?void 0:t.geometry,id:De}].sort(function(d,p){return-c[d.type]+c[p.type]}).forEach(function(d){return n.createView({id:d.id})}),e}function gA(e){var r=e.chart,t=e.options,n=t.xField,i=t.yField,l=t.geometryOptions,c=t.data,f=t.tooltip;return[(0,E.pi)((0,E.pi)({},l[0]),{id:ea,data:c[0],yField:i[0]}),(0,E.pi)((0,E.pi)({},l[1]),{id:De,data:c[1],yField:i[1]})].forEach(function(p){var m=p.id,x=p.data,_=p.yField,T=wr(p)&&p.isPercent,b=T?zT(x,_,n,_):x,I=Br(r,m).data(b),F=T?(0,E.pi)({formatter:function(B){return{name:B[p.seriesField]||_,value:(100*Number(B[_])).toFixed(2)+"%"}}},f):f;!function So(e){var r=e.options,t=e.chart,n=r.geometryOption,i=n.isStack,l=n.color,c=n.seriesField,f=n.groupField,d=n.isGroup,p=["xField","yField"];if(bn(n)){Zc(xe({},e,{options:(0,E.pi)((0,E.pi)((0,E.pi)({},Kr(r,p)),n),{line:{color:n.color,style:n.lineStyle}})})),Fa(xe({},e,{options:(0,E.pi)((0,E.pi)((0,E.pi)({},Kr(r,p)),n),{point:n.point&&(0,E.pi)({color:l,shape:"circle"},n.point)})}));var m=[];d&&m.push({type:"dodge",dodgeBy:f||c,customOffset:0}),i&&m.push({type:"stack"}),m.length&&(0,S.S6)(t.geometries,function(x){x.adjust(m)})}wr(n)&&$o(xe({},e,{options:(0,E.pi)((0,E.pi)((0,E.pi)({},Kr(r,p)),n),{widthRatio:n.columnWidthRatio,interval:(0,E.pi)((0,E.pi)({},Kr(n,["color"])),{style:n.columnStyle})})}))}({chart:I,options:{xField:n,yField:_,tooltip:F,geometryOption:p}})}),e}function Yx(e){var r,t=e.chart,i=e.options.geometryOptions,l=(null===(r=t.getTheme())||void 0===r?void 0:r.colors10)||[],c=0;return t.once("beforepaint",function(){(0,S.S6)(i,function(f,d){var p=Br(t,0===d?ea:De);if(!f.color){var m=p.getGroupScales(),x=(0,S.U2)(m,[0,"values","length"],1),_=l.slice(c,c+x).concat(0===d?[]:l);p.geometries.forEach(function(T){f.seriesField?T.color(f.seriesField,_):T.color(_[0])}),c+=x}}),t.render(!0)}),e}function Tl(e){var r,t,n=e.chart,i=e.options,l=i.xAxis,c=i.yAxis,f=i.xField,d=i.yField;return zn(((r={})[f]=l,r[d[0]]=c[0],r))(xe({},e,{chart:Br(n,ea)})),zn(((t={})[f]=l,t[d[1]]=c[1],t))(xe({},e,{chart:Br(n,De)})),e}function yA(e){var r=e.chart,t=e.options,n=Br(r,ea),i=Br(r,De),l=t.xField,c=t.yField,f=t.xAxis,d=t.yAxis;return r.axis(l,!1),r.axis(c[0],!1),r.axis(c[1],!1),n.axis(l,f),n.axis(c[0],dv(d[0],Ko.Left)),i.axis(l,!1),i.axis(c[1],dv(d[1],Ko.Right)),e}function Wx(e){var r=e.chart,n=e.options.tooltip,i=Br(r,ea),l=Br(r,De);return r.tooltip(n),i.tooltip({shared:!0}),l.tooltip({shared:!0}),e}function nB(e){var r=e.chart;return An(xe({},e,{chart:Br(r,ea)})),An(xe({},e,{chart:Br(r,De)})),e}function iB(e){var r=e.chart,n=e.options.annotations,i=(0,S.U2)(n,[0]),l=(0,S.U2)(n,[1]);return En(i)(xe({},e,{chart:Br(r,ea),options:{annotations:i}})),En(l)(xe({},e,{chart:Br(r,De),options:{annotations:l}})),e}function lh(e){var r=e.chart;return Qr(xe({},e,{chart:Br(r,ea)})),Qr(xe({},e,{chart:Br(r,De)})),Qr(e),e}function y0(e){var r=e.chart;return hn(xe({},e,{chart:Br(r,ea)})),hn(xe({},e,{chart:Br(r,De)})),e}function mA(e){var r=e.chart,n=e.options.yAxis;return Ou(xe({},e,{chart:Br(r,ea),options:{yAxis:n[0]}})),Ou(xe({},e,{chart:Br(r,De),options:{yAxis:n[1]}})),e}function Ux(e){var r=e.chart,t=e.options,n=t.legend,i=t.geometryOptions,l=t.yField,c=t.data,f=Br(r,ea),d=Br(r,De);if(!1===n)r.legend(!1);else if((0,S.Kn)(n)&&!0===n.custom)r.legend(n);else{var p=(0,S.U2)(i,[0,"legend"],n),m=(0,S.U2)(i,[1,"legend"],n);r.once("beforepaint",function(){var x=c[0].length?Gx({view:f,geometryOption:i[0],yField:l[0],legend:p}):[],_=c[1].length?Gx({view:d,geometryOption:i[1],yField:l[1],legend:m}):[];r.legend(xe({},n,{custom:!0,items:x.concat(_)}))}),i[0].seriesField&&f.legend(i[0].seriesField,p),i[1].seriesField&&d.legend(i[1].seriesField,m),r.on("legend-item:click",function(x){var _=(0,S.U2)(x,"gEvent.delegateObject",{});if(_&&_.item){var T=_.item,b=T.value,F=T.viewId;if(T.isGeometry){if((0,S.cx)(l,function(H){return H===b})>-1){var Y=(0,S.U2)(Br(r,F),"geometries");(0,S.S6)(Y,function(H){H.changeVisible(!_.item.unchecked)})}}else{var G=(0,S.U2)(r.getController("legend"),"option.items",[]);(0,S.S6)(r.views,function(H){var et=H.getGroupScales();(0,S.S6)(et,function(wt){wt.values&&wt.values.indexOf(b)>-1&&H.filter(wt.field,function(Ot){return!(0,S.sE)(G,function(ge){return ge.value===Ot}).unchecked})}),r.render(!0)})}}})}return e}function xA(e){var r=e.chart,n=e.options.slider,i=Br(r,ea),l=Br(r,De);return n&&(i.option("slider",n),i.on("slider:valuechanged",function(c){var f=c.event,d=f.value;(0,S.Xy)(d,f.originValue)||Rs(l,d)}),r.once("afterpaint",function(){if(!(0,S.jn)(n)){var c=n.start,f=n.end;(c||f)&&Rs(l,[c,f])}})),e}function aB(e){return Cr(dA,pA,lh,gA,Tl,yA,mA,Wx,nB,iB,y0,Yx,Ux,xA)(e)}function sB(e){var r=e.chart,t=e.options,n=t.type,i=t.data,l=t.fields,c=t.eachView,f=(0,S.CE)(t,["type","data","fields","eachView","axes","meta","tooltip","coordinate","theme","legend","interactions","annotations"]);return r.data(i),r.facet(n,(0,E.pi)((0,E.pi)({},f),{fields:l,eachView:function(d,p){var m=c(d,p);if(m.geometries)!function oB(e,r){var t=r.data,n=r.coordinate,i=r.interactions,l=r.annotations,c=r.animation,f=r.tooltip,d=r.axes,p=r.meta,m=r.geometries;t&&e.data(t);var x={};d&&(0,S.S6)(d,function(_,T){x[T]=Kr(_,ya)}),x=xe({},p,x),e.scale(x),n&&e.coordinate(n),!1===d?e.axis(!1):(0,S.S6)(d,function(_,T){e.axis(T,_)}),(0,S.S6)(m,function(_){var T=ma({chart:e,options:_}).ext,b=_.adjust;b&&T.geometry.adjust(b)}),(0,S.S6)(i,function(_){!1===_.enable?e.removeInteraction(_.type):e.interaction(_.type,_.cfg)}),(0,S.S6)(l,function(_){e.annotation()[_.type]((0,E.pi)({},_))}),Uf(e,c),f?(e.interaction("tooltip"),e.tooltip(f)):!1===f&&e.removeInteraction("tooltip")}(d,m);else{var x=m,_=x.options;_.tooltip&&d.interaction("tooltip"),_x(x.type,d,_)}}})),e}function lB(e){var r=e.chart,t=e.options,n=t.axes,i=t.meta,l=t.tooltip,c=t.coordinate,f=t.theme,d=t.legend,p=t.interactions,m=t.annotations,x={};return n&&(0,S.S6)(n,function(_,T){x[T]=Kr(_,ya)}),x=xe({},i,x),r.scale(x),r.coordinate(c),n?(0,S.S6)(n,function(_,T){r.axis(T,_)}):r.axis(!1),l?(r.interaction("tooltip"),r.tooltip(l)):!1===l&&r.removeInteraction("tooltip"),r.legend(d),f&&r.theme(f),(0,S.S6)(p,function(_){!1===_.enable?r.removeInteraction(_.type):r.interaction(_.type,_.cfg)}),(0,S.S6)(m,function(_){r.annotation()[_.type]((0,E.pi)({},_))}),e}function uB(e){return Cr(Qr,sB,lB)(e)}!function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dual-axes",t}(0,E.ZT)(r,e),r.prototype.getDefaultOptions=function(){return xe({},e.prototype.getDefaultOptions.call(this),{yAxis:[],syncViewPadding:!0})},r.prototype.getSchemaAdaptor=function(){return aB}}(Fr);var cB={title:{style:{fontSize:12,fill:"rgba(0,0,0,0.65)"}},rowTitle:{style:{fontSize:12,fill:"rgba(0,0,0,0.65)"}},columnTitle:{style:{fontSize:12,fill:"rgba(0,0,0,0.65)"}}};function hB(e){var r=e.chart,t=e.options,n=t.data,i=t.type,l=t.xField,c=t.yField,f=t.colorField,d=t.sizeField,p=t.sizeRatio,m=t.shape,x=t.color,_=t.tooltip,T=t.heatmapStyle,b=t.meta;r.data(n);var I="polygon";"density"===i&&(I="heatmap");var F=Qa(_,[l,c,f]),B=F.fields,Y=F.formatter,G=1;return(p||0===p)&&(m||d?p<0||p>1?console.warn("sizeRatio is not in effect: It must be a number in [0,1]"):G=p:console.warn("sizeRatio is not in effect: Must define shape or sizeField first")),ma(xe({},e,{options:{type:I,colorField:f,tooltipFields:B,shapeField:d||"",label:void 0,mapping:{tooltip:Y,shape:m&&(d?function(H){var et=n.map(function(ge){return ge[d]}),wt=b?.[d]||{},Ot=wt.min,$t=wt.max;return Ot=(0,S.hj)(Ot)?Ot:Math.min.apply(Math,et),$t=(0,S.hj)($t)?$t:Math.max.apply(Math,et),[m,((0,S.U2)(H,d)-Ot)/($t-Ot),G]}:function(){return[m,1,G]}),color:x||f&&r.getTheme().sequenceColors.join("-"),style:T}}})),e}function fB(e){var r,t=e.options,i=t.yAxis,c=t.yField;return Cr(zn(((r={})[t.xField]=t.xAxis,r[c]=i,r)))(e)}function vB(e){var r=e.chart,t=e.options,n=t.xAxis,i=t.yAxis,c=t.yField;return r.axis(t.xField,!1!==n&&n),r.axis(c,!1!==i&&i),e}function dB(e){var r=e.chart,t=e.options,n=t.legend,i=t.colorField,l=t.sizeField,c=t.sizeLegend,f=!1!==n;return i&&r.legend(i,!!f&&n),l&&r.legend(l,void 0===c?n:c),!f&&!c&&r.legend(!1),e}function pB(e){var t=e.options,n=t.label,i=t.colorField,c=vi(e.chart,"density"===t.type?"heatmap":"polygon");if(n){if(i){var f=n.callback,d=(0,E._T)(n,["callback"]);c.label({fields:[i],callback:f,cfg:di(d)})}}else c.label(!1);return e}function gB(e){var r,t,n=e.chart,i=e.options,c=i.reflect,f=xe({actions:[]},i.coordinate??{type:"rect"});return c&&(null===(t=null===(r=f.actions)||void 0===r?void 0:r.push)||void 0===t||t.call(r,["reflect",c])),n.coordinate(f),e}function yB(e){return Cr(Qr,Ra("heatmapStyle"),fB,gB,hB,vB,dB,ti,pB,En(),An,hn,gl)(e)}!function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="area",t}(0,E.ZT)(r,e),r.getDefaultOptions=function(){return cB},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return uB}}(Fr);var CA=xe({},Fr.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"}}}}});rn("polygon","circle",{draw:function(e,r){var t,n,i=e.x,l=e.y,c=this.parsePoints(e.points),f=Math.abs(c[2].x-c[1].x),d=Math.abs(c[1].y-c[0].y),p=Math.min(f,d)/2,m=Number(e.shape[1]),x=Number(e.shape[2]),T=p*Math.sqrt(x)*Math.sqrt(m),b=(null===(t=e.style)||void 0===t?void 0:t.fill)||e.color||(null===(n=e.defaultStyle)||void 0===n?void 0:n.fill);return r.addShape("circle",{attrs:(0,E.pi)((0,E.pi)((0,E.pi)({x:i,y:l,r:T},e.defaultStyle),e.style),{fill:b})})}}),rn("polygon","square",{draw:function(e,r){var t,n,i=e.x,l=e.y,c=this.parsePoints(e.points),f=Math.abs(c[2].x-c[1].x),d=Math.abs(c[1].y-c[0].y),p=Math.min(f,d),m=Number(e.shape[1]),x=Number(e.shape[2]),T=p*Math.sqrt(x)*Math.sqrt(m),b=(null===(t=e.style)||void 0===t?void 0:t.fill)||e.color||(null===(n=e.defaultStyle)||void 0===n?void 0:n.fill);return r.addShape("rect",{attrs:(0,E.pi)((0,E.pi)((0,E.pi)({x:i-T/2,y:l-T/2,width:T,height:T},e.defaultStyle),e.style),{fill:b})})}}),function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="heatmap",t}(0,E.ZT)(r,e),r.getDefaultOptions=function(){return CA},r.prototype.getSchemaAdaptor=function(){return yB},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()}}(Fr);var mB="liquid";function wA(e){return[{percent:e,type:mB}]}function xB(e){var r=e.chart,t=e.options,n=t.percent,i=t.liquidStyle,l=t.radius,c=t.outline,f=t.wave,d=t.shape,p=t.shapeStyle,m=t.animation;r.scale({percent:{min:0,max:1}}),r.data(wA(n));var x=t.color||r.getTheme().defaultColor,b=pi(xe({},e,{options:{xField:"type",yField:"percent",widthRatio:l,interval:{color:x,style:i,shape:"liquid-fill-gauge"}}})).ext.geometry,I=r.getTheme().background;return b.customInfo({percent:n,radius:l,outline:c,wave:f,shape:d,shapeStyle:p,background:I,animation:m}),r.legend(!1),r.axis(!1),r.tooltip(!1),e}function Xx(e,r){var t=e.chart,n=e.options,i=n.statistic,l=n.percent,c=n.meta;t.getController("annotation").clear(!0);var f=(0,S.U2)(c,["percent","formatter"])||function(p){return(100*p).toFixed(2)+"%"},d=i.content;return d&&(d=xe({},d,{content:(0,S.UM)(d.content)?f(l):d.content})),Yp(t,{statistic:(0,E.pi)((0,E.pi)({},i),{content:d}),plotType:"liquid"},{percent:l}),r&&t.render(!0),e}function CB(e){return Cr(Qr,Ra("liquidStyle"),xB,Xx,zn({}),hn,An)(e)}var wB={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"};function SA(e,r,t){return e+(r-e)*t}function MB(e,r,t,n){return 0===r?[[e+.5*t/Math.PI/2,n/2],[e+.5*t/Math.PI,n],[e+t/4,n]]:1===r?[[e+.5*t/Math.PI/2*(Math.PI-2),n],[e+.5*t/Math.PI/2*(Math.PI-1),n/2],[e+t/4,0]]:2===r?[[e+.5*t/Math.PI/2,-n/2],[e+.5*t/Math.PI,-n],[e+t/4,-n]]:[[e+.5*t/Math.PI/2*(Math.PI-2),-n],[e+.5*t/Math.PI/2*(Math.PI-1),-n/2],[e+t/4,0]]}function TB(e,r,t,n,i,l,c){for(var f=4*Math.ceil(2*e/t*4),d=[],p=n;p<2*-Math.PI;)p+=2*Math.PI;for(;p>0;)p-=2*Math.PI;var m=l-e+(p=p/Math.PI/2*t)-2*e;d.push(["M",m,r]);for(var x=0,_=0;_0){var Pe=r.addGroup({name:"waves"}),or=Pe.setClip({type:"path",attrs:{path:Se}});!function bB(e,r,t,n,i,l,c,f,d,p){for(var m=i.fill,x=i.opacity,_=c.getBBox(),T=_.maxX-_.minX,b=_.maxY-_.minY,I=0;I0){var f=this.view.geometries[0],p=c[0].name,m=[];return f.dataArray.forEach(function(x){x.forEach(function(_){var b=va.getTooltipItems(_,f)[0];if(!i&&b&&b.name===p){var I=(0,S.UM)(l)?p:l;m.push((0,E.pi)((0,E.pi)({},b),{name:b.title,title:I}))}else i&&b&&(I=(0,S.UM)(l)?b.name||p:l,m.push((0,E.pi)((0,E.pi)({},b),{name:b.title,title:I})))})}),m}return[]},r}(q_);mu("radar-tooltip",TA);var Vx=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.init=function(){this.context.view.removeInteraction("tooltip")},r.prototype.show=function(){var t=this.context.event;this.getTooltipController().showTooltip({x:t.x,y:t.y})},r.prototype.hide=function(){this.getTooltipController().hideTooltip()},r.prototype.getTooltipController=function(){return this.context.view.getController("radar-tooltip")},r}(wn);ur("radar-tooltip",Vx),Er("radar-tooltip",{start:[{trigger:"plot:mousemove",action:"radar-tooltip:show"}],end:[{trigger:"plot:mouseleave",action:"radar-tooltip:hide"}]});var bA=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="radar",t}return(0,E.ZT)(r,e),r.prototype.changeData=function(t){this.updateOption({data:t}),this.chart.changeData(t)},r.prototype.getDefaultOptions=function(){return xe({},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 uh},r}(Fr);function AA(e,r,t){var n=t.map(function(c){return c[r]}).filter(function(c){return void 0!==c}),i=n.length>0?Math.max.apply(Math,n):0,l=Math.abs(e)%360;return l?360*i/l:i}function kB(e){var r=e.chart,t=e.options,n=t.barStyle,i=t.color,l=t.tooltip,c=t.colorField,f=t.type,d=t.xField,p=t.yField,x=Wc(t.data,p);return r.data(x),pi(xe({},e,{options:{tooltip:l,seriesField:c,interval:{style:n,color:i,shape:"line"===f?"line":"intervel"},minColumnWidth:t.minBarWidth,maxColumnWidth:t.maxBarWidth,columnBackground:t.barBackground}})),"line"===f&&Fa({chart:r,options:{xField:d,yField:p,seriesField:c,point:{shape:"circle",color:i}}}),e}function EA(e){var r,t=e.options,n=t.yField,l=t.data,p=t.maxAngle,m=t.isStack&&!t.isGroup&&t.colorField?function PB(e,r,t){var n=[];return e.forEach(function(i){var l=n.find(function(c){return c[r]===i[r]});l?l[t]+=i[t]||null:n.push((0,E.pi)({},i))}),n}(l,t.xField,n):l,x=Wc(m,n);return Cr(zn(((r={})[n]={min:0,max:AA(p,n,x)},r)))(e)}function zB(e){var t=e.options;return e.chart.coordinate({type:"polar",cfg:{radius:t.radius,innerRadius:t.innerRadius,startAngle:t.startAngle,endAngle:t.endAngle}}).transpose(),e}function NB(e){var t=e.options;return e.chart.axis(t.xField,t.xAxis),e}function $x(e){var t=e.options,n=t.label,i=t.yField,l=vi(e.chart,"interval");if(n){var c=n.callback,f=(0,E._T)(n,["callback"]);l.label({fields:[i],callback:c,cfg:(0,E.pi)((0,E.pi)({},di(f)),{type:"polar"})})}else l.label(!1);return e}function m0(e){return Cr(Ra("barStyle"),kB,EA,NB,zB,An,hn,Qr,ti,Iu,En(),$x)(e)}var HB=xe({},Fr.getDefaultOptions(),{interactions:[{type:"element-active"}],legend:!1,tooltip:{showMarkers:!1},xAxis:{grid:null,tickLine:null,line:null},maxAngle:240}),Zx=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="radial-bar",t}return(0,E.ZT)(r,e),r.getDefaultOptions=function(){return HB},r.prototype.changeData=function(t){this.updateOption({data:t}),EA({chart:this.chart,options:this.options}),this.chart.changeData(t)},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return m0},r}(Fr);function x0(e){var t=e.options,i=t.sectorStyle,l=t.color;return e.chart.data(t.data),Cr(pi)(xe({},e,{options:{marginRatio:1,interval:{style:i,color:l}}})),e}function LA(e){var t=e.options,n=t.label,i=t.xField,l=vi(e.chart,"interval");if(!1===n)l.label(!1);else if((0,S.Kn)(n)){var c=n.callback,f=n.fields,d=(0,E._T)(n,["callback","fields"]),p=d.offset,m=d.layout;(void 0===p||p>=0)&&(m=m?(0,S.kJ)(m)?m:[m]:[],d.layout=(0,S.hX)(m,function(x){return"limit-in-shape"!==x.type}),d.layout.length||delete d.layout),l.label({fields:f||[i],callback:c,cfg:di(d)})}else Ss(Ka.WARN,null===n,"the label option must be an Object."),l.label({fields:[i]});return e}function GB(e){var r=e.chart,t=e.options,n=t.legend,i=t.seriesField;return!1===n?r.legend(!1):i&&r.legend(i,n),e}function YB(e){var t=e.options;return e.chart.coordinate({type:"polar",cfg:{radius:t.radius,innerRadius:t.innerRadius,startAngle:t.startAngle,endAngle:t.endAngle}}),e}function WB(e){var r,t=e.options,i=t.yAxis,c=t.yField;return Cr(zn(((r={})[t.xField]=t.xAxis,r[c]=i,r)))(e)}function IA(e){var r=e.chart,t=e.options,i=t.yAxis,c=t.yField;return r.axis(t.xField,t.xAxis||!1),r.axis(c,i||!1),e}function UB(e){Cr(Ra("sectorStyle"),x0,WB,LA,YB,IA,GB,ti,An,hn,Qr,En(),gl)(e)}var XB=xe({},Fr.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"}]}),VB=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="rose",t}return(0,E.ZT)(r,e),r.getDefaultOptions=function(){return XB},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 UB},r}(Fr),OA="x",RA="y",FA="name",ch="nodes",C0="edges";function $B(e,r,t){if(!(0,S.kJ)(e))return[];var n=[],i=function w0(e,r,t){var n=[];return e.forEach(function(i){var l=i[r],c=i[t];n.includes(l)||n.push(l),n.includes(c)||n.push(c)}),n}(e,r,t),l=function DA(e,r,t,n){var i={};return r.forEach(function(l){i[l]={},r.forEach(function(c){i[l][c]=0})}),e.forEach(function(l){i[l[t]][l[n]]=1}),i}(e,i,r,t),c={};function f(d){c[d]=1,i.forEach(function(p){if(0!=l[d][p])if(1==c[p])n.push(d+"_"+p);else{if(-1==c[p])return;f(p)}}),c[d]=-1}return i.forEach(function(d){c[d]=0}),i.forEach(function(d){-1!=c[d]&&f(d)}),0!==n.length&&console.warn("sankey data contains circle, "+n.length+" records removed.",n),e.filter(function(d){return n.findIndex(function(p){return p===d[r]+"_"+d[t]})<0})}function B7(e){return e.target.depth}function qx(e,r){return e.sourceLinks.length?e.depth:r-1}function hh(e){return function(){return e}}function Kx(e,r){for(var t=0,n=0;nnr)throw new Error("circular link");Ve=je,je=new Set}if(p)for(var Pr=Math.max(Qx(We,function(xr){return xr.depth})+1,0),Gr=void 0,Ar=0;Arnr)throw new Error("circular link");Ve=je,je=new Set}}(We),function wt(Ie){var We=function H(Ie){for(var We=Ie.nodes,nr=Math.max(Qx(We,function(Pn){return Pn.depth})+1,0),Ve=(t-e-i)/(nr-1),je=new Array(nr).fill(0).map(function(){return[]}),ir=0,Pr=We;ir0){var L0=(xr/nn-Ar.y0)*We;Ar.y0+=L0,Ar.y1+=L0,Pe(Ar)}}void 0===m&&ir.sort(pv),ir.length&&ge(ir,nr)}}function $t(Ie,We,nr){for(var je=Ie.length-2;je>=0;--je){for(var ir=Ie[je],Pr=0,Gr=ir;Pr0){var L0=(xr/nn-Ar.y0)*We;Ar.y0+=L0,Ar.y1+=L0,Pe(Ar)}}void 0===m&&ir.sort(pv),ir.length&&ge(ir,nr)}}function ge(Ie,We){var nr=Ie.length>>1,Ve=Ie[nr];Se(Ie,Ve.y0-c,nr-1,We),le(Ie,Ve.y1+c,nr+1,We),Se(Ie,n,Ie.length-1,We),le(Ie,r,0,We)}function le(Ie,We,nr,Ve){for(;nr1e-6&&(je.y0+=ir,je.y1+=ir),We=je.y1+c}}function Se(Ie,We,nr,Ve){for(;nr>=0;--nr){var je=Ie[nr],ir=(je.y1-We)*Ve;ir>1e-6&&(je.y0-=ir,je.y1-=ir),We=je.y0-c}}function Pe(Ie){var We=Ie.sourceLinks;if(void 0===x){for(var Ve=0,je=Ie.targetLinks;Ve "+t.target,value:t.value}}},nodeWidthRatio:.008,nodePaddingRatio:.01,animation:{appear:{animation:"wave-in"},enter:{animation:"wave-in"}}}},r.prototype.changeData=function(t){this.updateOption({data:t});var n=YA(this.options,this.chart.width,this.chart.height),i=n.nodes,l=n.edges,c=Br(this.chart,ch),f=Br(this.chart,C0);c.changeData(i),f.changeData(l)},r.prototype.getSchemaAdaptor=function(){return eP},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r}(Fr),T0="ancestor-node",$A="value",yv="path",nP=[yv,d0,sh,cv,"name","depth","height"],iP=xe({},Fr.getDefaultOptions(),{innerRadius:0,radius:.85,hierarchyConfig:{field:"value"},tooltip:{shared:!0,showMarkers:!1,offset:20,showTitle:!1},legend:!1,sunburstStyle:{lineWidth:.5,stroke:"#FFF"},drilldown:{enabled:!0}});function b0(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 mv(e,r,t,n,i){for(var c,l=e.children,f=-1,d=l.length,p=e.value&&(n-r)/e.value;++f0)throw new Error("cycle");return d}return t.id=function(n){return arguments.length?(e=uv(n),t):e},t.parentId=function(n){return arguments.length?(r=uv(n),t):r},t}function gP(e,r){return e.parent===r.parent?1:2}function n2(e){var r=e.children;return r?r[0]:e.t}function i2(e){var r=e.children;return r?r[r.length-1]:e.t}function yP(e,r,t){var n=t/(r.i-e.i);r.c-=n,r.s+=t,e.c+=n,r.z+=t,r.m+=t}function xP(e,r,t){return e.a.parent===r.parent?e.a:t}function A0(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}function JA(){var e=gP,r=1,t=1,n=null;function i(p){var m=function QA(e){for(var t,i,l,c,f,r=new A0(e,0),n=[r];t=n.pop();)if(l=t._.children)for(t.children=new Array(f=l.length),c=f-1;c>=0;--c)n.push(i=t.children[c]=new A0(l[c],c)),i.parent=t;return(r.parent=new A0(null,0)).children=[r],r}(p);if(m.eachAfter(l),m.parent.m=-m.z,m.eachBefore(c),n)p.eachBefore(d);else{var x=p,_=p,T=p;p.eachBefore(function(Y){Y.x_.x&&(_=Y),Y.depth>T.depth&&(T=Y)});var b=x===_?1:e(x,_)/2,I=b-x.x,F=r/(_.x+b+I),B=t/(T.depth||1);p.eachBefore(function(Y){Y.x=(Y.x+I)*F,Y.y=Y.depth*B})}return p}function l(p){var m=p.children,x=p.parent.children,_=p.i?x[p.i-1]:null;if(m){!function mP(e){for(var l,r=0,t=0,n=e.children,i=n.length;--i>=0;)(l=n[i]).z+=r,l.m+=r,r+=l.s+(t+=l.c)}(p);var T=(m[0].z+m[m.length-1].z)/2;_?(p.z=_.z+e(p._,_._),p.m=p.z-T):p.z=T}else _&&(p.z=_.z+e(p._,_._));p.parent.A=function f(p,m,x){if(m){for(var H,_=p,T=p,b=m,I=_.parent.children[0],F=_.m,B=T.m,Y=b.m,G=I.m;b=i2(b),_=n2(_),b&&_;)I=n2(I),(T=i2(T)).a=p,(H=b.z+Y-_.z-F+e(b._,_._))>0&&(yP(xP(b,p,x),p,H),F+=H,B+=H),Y+=b.m,F+=_.m,G+=I.m,B+=T.m;b&&!i2(T)&&(T.t=b,T.m+=Y-B),_&&!n2(I)&&(I.t=_,I.m+=F-G,x=p)}return x}(p,_,p.parent.A||x[0])}function c(p){p._.x=p.z+p.parent.m,p.m+=p.parent.m}function d(p){p.x*=r,p.y=p.depth*t}return i.separation=function(p){return arguments.length?(e=p,i):e},i.size=function(p){return arguments.length?(n=!1,r=+p[0],t=+p[1],i):n?null:[r,t]},i.nodeSize=function(p){return arguments.length?(n=!0,r=+p[0],t=+p[1],i):n?[r,t]:null},i}function a2(e,r,t,n,i){for(var c,l=e.children,f=-1,d=l.length,p=e.value&&(i-t)/e.value;++fY&&(Y=p),wt=F*F*et,(G=Math.max(Y/wt,wt/B))>H){F-=p;break}H=G}c.push(d={value:F,dice:T1?n:1)},t}(jA);function s(){var e=o,r=!1,t=1,n=1,i=[0],l=qo,c=qo,f=qo,d=qo,p=qo;function m(_){return _.x0=_.y0=0,_.x1=t,_.y1=n,_.eachBefore(x),i=[0],r&&_.eachBefore(b0),_}function x(_){var T=i[_.depth],b=_.x0+T,I=_.y0+T,F=_.x1-T,B=_.y1-T;F=_-1){var Y=l[x];return Y.x0=b,Y.y0=I,Y.x1=F,void(Y.y1=B)}for(var G=p[x],H=T/2+G,et=x+1,wt=_-1;et>>1;p[Ot]B-I){var le=T?(b*ge+F*$t)/T:F;m(x,et,$t,b,I,le,B),m(et,_,ge,le,I,F,B)}else{var Se=T?(I*ge+B*$t)/T:B;m(x,et,$t,b,I,F,Se),m(et,_,ge,b,Se,F,B)}}(0,f,e.value,r,t,n,i)}function u(e,r,t,n,i){(1&e.depth?a2:mv)(e,r,t,n,i)}const h=function e(r){function t(n,i,l,c,f){if((d=n._squarify)&&d.ratio===r)for(var d,p,m,x,T,_=-1,b=d.length,I=n.value;++_1?n:1)},t}(jA);var v={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 y(e,r){var n,t=(r=(0,S.f0)({},v,r)).as;if(!(0,S.kJ)(t)||2!==t.length)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');try{n=p0(r)}catch(p){console.warn(p)}var p,i=function g(e,r){return"treemapSquarify"===e?Dt[e].ratio(r):Dt[e]}(r.tile,r.ratio),c=(p=e,s().tile(i).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)(oh(p).sum(function(m){return r.ignoreParentValue&&m.children?0:m[n]}).sort(r.sort))),f=t[0],d=t[1];return c.each(function(p){p[f]=[p.x0,p.x1,p.x1,p.x0],p[d]=[p.y1,p.y1,p.y0,p.y0],["x0","x1","y0","y1"].forEach(function(m){-1===t.indexOf(m)&&delete p[m]})}),Co(c)}function w(e){var t=e.colorField,n=e.rawFields,i=e.hierarchyConfig,l=void 0===i?{}:i,c=l.activeDepth,d=e.seriesField,p=e.type||"partition",m={partition:qA,treemap:y}[p](e.data,(0,E.pi)((0,E.pi)({field:d||"value"},(0,S.CE)(l,["activeDepth"])),{type:"hierarchy."+p,as:["x","y"]})),x=[];return m.forEach(function(_){var T,b,I,F,B,Y;if(0===_.depth||c>0&&_.depth>c)return null;for(var G=_.data.name,H=(0,E.pi)({},_);H.depth>1;)G=(null===(b=H.parent.data)||void 0===b?void 0:b.name)+" / "+G,H=H.parent;var et=(0,E.pi)((0,E.pi)((0,E.pi)({},Kr(_.data,(0,E.pr)(n||[],[l.field]))),((T={})[yv]=G,T[T0]=H.data.name,T)),_);d&&(et[d]=_.data[d]||(null===(F=null===(I=_.parent)||void 0===I?void 0:I.data)||void 0===F?void 0:F[d])),t&&(et[t]=_.data[t]||(null===(Y=null===(B=_.parent)||void 0===B?void 0:B.data)||void 0===Y?void 0:Y[t])),et.ext=l,et[sv]={hierarchyConfig:l,colorField:t,rawFields:n},x.push(et)}),x}function M(e){var m,r=e.chart,t=e.options,n=t.color,i=t.colorField,l=void 0===i?T0:i,c=t.sunburstStyle,f=t.rawFields,d=void 0===f?[]:f,p=w(t);return r.data(p),c&&(m=function(x){return xe({},{fillOpacity:Math.pow(.85,x.depth)},(0,S.mf)(c)?c(x):c)}),Vp(xe({},e,{options:{xField:"x",yField:"y",seriesField:l,rawFields:(0,S.jj)((0,E.pr)(nP,d)),polygon:{color:n,style:m}}})),e}function A(e){return e.chart.axis(!1),e}function L(e){var n=e.options.label,i=vi(e.chart,"polygon");if(n){var l=n.fields,c=void 0===l?["name"]:l,f=n.callback,d=(0,E._T)(n,["fields","callback"]);i.label({fields:c,callback:f,cfg:di(d)})}else i.label(!1);return e}function O(e){var t=e.options,l=t.reflect,c=e.chart.coordinate({type:"polar",cfg:{innerRadius:t.innerRadius,radius:t.radius}});return l&&c.reflect(l),e}function D(e){var r,t=e.options;return Cr(zn({},((r={})[$A]=(0,S.U2)(t.meta,(0,S.U2)(t.hierarchyConfig,["field"],"value")),r)))(e)}function k(e){var r=e.chart,n=e.options.tooltip;if(!1===n)r.tooltip(!1);else{var i=n;(0,S.U2)(n,"fields")||(i=xe({},{customItems:function(l){return l.map(function(c){var f=(0,S.U2)(r.getOptions(),"scales"),d=(0,S.U2)(f,[yv,"formatter"],function(m){return m}),p=(0,S.U2)(f,[$A,"formatter"],function(m){return m});return(0,E.pi)((0,E.pi)({},c),{name:d(c.data[yv]),value:p(c.data.value)})})}},i)),r.tooltip(i)}return e}function X(e){var r=e.drilldown,t=e.interactions;return r?.enabled?xe({},e,{interactions:(0,E.pr)(void 0===t?[]:t,[{type:"drill-down",cfg:{drillDownConfig:r,transformData:w}}])}):e}function tt(e){var r=e.chart,t=e.options,n=t.drilldown;return An({chart:r,options:X(t)}),n?.enabled&&(r.appendPadding=Gp(r.appendPadding,(0,S.U2)(n,["breadCrumb","position"]))),e}function ot(e){return Cr(Qr,Ra("sunburstStyle"),M,A,D,Iu,O,k,L,tt,hn,En())(e)}function ht(e,r){if((0,S.kJ)(e))return e.find(function(t){return t.type===r})}function pt(e,r){var t=ht(e,r);return t&&!1!==t.enable}function Wt(e){var r=e.interactions;return(0,S.U2)(e.drilldown,"enabled")||pt(r,"treemap-drill-down")}function pe(e){var r=e.data,t=e.colorField,n=e.enableDrillDown,i=e.hierarchyConfig,l=y(r,(0,E.pi)((0,E.pi)({},i),{type:"hierarchy.treemap",field:"value",as:["x","y"]})),c=[];return l.forEach(function(f){if(0===f.depth||n&&1!==f.depth||!n&&f.children)return null;var d=f.ancestors().map(function(_){return{data:_.data,height:_.height,value:_.value}}),p=n&&(0,S.kJ)(r.path)?d.concat(r.path.slice(1)):d,m=Object.assign({},f.data,(0,E.pi)({x:f.x,y:f.y,depth:f.depth,value:f.value,path:p},f));if(!f.data[t]&&f.parent){var x=f.ancestors().find(function(_){return _.data[t]});m[t]=x?.data[t]}else m[t]=f.data[t];m[sv]={hierarchyConfig:i,colorField:t,enableDrillDown:n},c.push(m)}),c}function Me(e){return xe({options:{rawFields:["value"],tooltip:{fields:["name","value",e.options.colorField,"path"],formatter:function(n){return{name:n.name,value:n.value}}}}},e)}function ze(e){var r=e.chart,t=e.options,n=t.color,i=t.colorField,l=t.rectStyle,c=t.hierarchyConfig,f=t.rawFields,d=pe({data:t.data,colorField:t.colorField,enableDrillDown:Wt(t),hierarchyConfig:c});return r.data(d),Vp(xe({},e,{options:{xField:"x",yField:"y",seriesField:i,rawFields:f,polygon:{color:n,style:l}}})),r.coordinate().reflect("y"),e}function Oe(e){return e.chart.axis(!1),e}function Ze(e){var r=e.drilldown,t=e.interactions,n=void 0===t?[]:t;return Wt(e)?xe({},e,{interactions:(0,E.pr)(n,[{type:"drill-down",cfg:{drillDownConfig:r,transformData:pe}}])}):e}function tr(e){var r=e.chart,t=e.options,n=t.interactions,i=t.drilldown;An({chart:r,options:Ze(t)});var l=ht(n,"view-zoom");return l&&(!1!==l.enable?r.getCanvas().on("mousewheel",function(f){f.preventDefault()}):r.getCanvas().off("mousewheel")),Wt(t)&&(r.appendPadding=Gp(r.appendPadding,(0,S.U2)(i,["breadCrumb","position"]))),e}function vr(e){return Cr(Me,Qr,Ra("rectStyle"),ze,Oe,Iu,ti,tr,hn,En())(e)}!function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="sunburst",t}(0,E.ZT)(r,e),r.getDefaultOptions=function(){return iP},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return ot},r.SUNBURST_ANCESTOR_FIELD=T0,r.SUNBURST_PATH_FIELD=yv,r.NODE_ANCESTORS_FIELD=sh}(Fr);var gr={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"}}}},Je=(function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="treemap",t}(0,E.ZT)(r,e),r.getDefaultOptions=function(){return gr},r.prototype.changeData=function(t){var n=this.options,i=n.colorField,l=n.interactions,c=n.hierarchyConfig;this.updateOption({data:t});var f=pe({data:t,colorField:i,enableDrillDown:pt(l,"treemap-drill-down"),hierarchyConfig:c});this.chart.changeData(f),function de(e){var r=e.interactions["drill-down"];r&&r.context.actions.find(function(n){return"drill-down-action"===n.name}).reset()}(this.chart)},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return vr}}(Fr),"id"),Xr="path",$r={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"]};function sn(e){e&&e.geometries[0].elements.forEach(function(t){t.shape.toFront()})}var qn=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.syncElementsPos=function(){sn(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}(vf("element-active")),Zi=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.syncElementsPos=function(){sn(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}(vf("element-highlight")),qi=vf("element-selected"),dn=vf("element-single-selected"),ri=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.syncElementsPos=function(){sn(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}(qi),mi=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.syncElementsPos=function(){sn(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}(dn);ur("venn-element-active",qn),ur("venn-element-highlight",Zi),ur("venn-element-selected",ri),ur("venn-element-single-selected",mi),Er("venn-element-active",{start:[{trigger:"element:mouseenter",action:"venn-element-active:active"}],end:[{trigger:"element:mouseleave",action:"venn-element-active:reset"}]}),Er("venn-element-highlight",{start:[{trigger:"element:mouseenter",action:"venn-element-highlight:highlight"}],end:[{trigger:"element:mouseleave",action:"venn-element-highlight:reset"}]}),Er("venn-element-selected",{start:[{trigger:"element:click",action:"venn-element-selected:toggle"}],rollback:[{trigger:"dblclick",action:["venn-element-selected:reset"]}]}),Er("venn-element-single-selected",{start:[{trigger:"element:click",action:"venn-element-single-selected:toggle"}],rollback:[{trigger:"dblclick",action:["venn-element-single-selected:reset"]}]}),Er("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"]}]}),Er("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 Ki=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return(0,E.ZT)(r,e),r.prototype.getLabelPoint=function(t,n,i){var l=t.data,d=t.customLabelInfo;return{content:t.content[i],x:l.x+d.offsetX,y:l.y+d.offsetY}},r}(_f);xf("venn",Ki);const ra=Array.isArray;var xi="\t\n\v\f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029",xv=new RegExp("([a-z])["+xi+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+xi+"]*,?["+xi+"]*)+)","ig"),It=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+xi+"]*,?["+xi+"]*","ig");Math,rn("schema","venn",{draw:function(e,r){var n=function ce(e){if(!e)return null;if(ra(e))return e;var r={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},t=[];return String(e).replace(xv,function(n,i,l){var c=[],f=i.toLowerCase();if(l.replace(It,function(d,p){p&&c.push(+p)}),"m"===f&&c.length>2&&(t.push([i].concat(c.splice(0,2))),f="l",i="m"===i?"l":"L"),"o"===f&&1===c.length&&t.push([i,c[0]]),"r"===f)t.push([i].concat(c));else for(;c.length>=r[f]&&(t.push([i].concat(c.splice(0,r[f]))),r[f]););return""}),t}(e.data[Xr]),i=function C9(e){return xe({},e.defaultStyle,{fill:e.color},e.style)}(e),l=r.addGroup({name:"venn-shape"});l.addShape("path",{attrs:(0,E.pi)((0,E.pi)({},i),{path:n}),name:"venn-path"});var c=e.customInfo,p=va.transform(null,[["t",c.offsetX,c.offsetY]]);return l.setMatrix(p),l},getMarker:function(e){var r=e.color;return{symbol:"circle",style:{lineWidth:0,stroke:r,fill:r,r:4}}}});var H7={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 255===e||(e=r/255*255/(1-e/255))>255?255:e},burn:function(e,r){return 255===r?255:0===e?0:255*(1-Math.min(1,(1-r/255)/(e/255)))}};function eE(e){var t,r=e.replace("/s+/g","");return"string"!=typeof r||r.startsWith("rgba")||r.startsWith("#")?(r.startsWith("rgba")&&(t=r.replace("rgba(","").replace(")","").split(",")),r.startsWith("#")&&(t=Vs.rgb2arr(r).concat([1])),t.map(function(n,i){return 3===i?Number(n):0|n})):t=Vs.rgb2arr(Vs.toRGB(r)).concat([1])}var Al=ct(6948),G7=1e-10;function wP(e,r){var c,t=function T9(e){for(var r=[],t=0;tr[t].radius+G7)return!1;return!0}(Ot,e)}),i=0,l=0,f=[];if(n.length>1){var d=U7(n);for(c=0;c-1){var I=e[x.parentIndex[b]],F=Math.atan2(x.x-I.x,x.y-I.y),B=Math.atan2(m.x-I.x,m.y-I.y),Y=B-F;Y<0&&(Y+=2*Math.PI);var G=B-Y/2,H=Fs(_,{x:I.x+I.radius*Math.sin(G),y:I.y+I.radius*Math.cos(G)});H>2*I.radius&&(H=2*I.radius),(null===T||T.width>H)&&(T={circle:I,width:H,p1:x,p2:m})}null!==T&&(f.push(T),i+=_P(T.circle.radius,T.width),m=x)}}else{var et=e[0];for(c=1;cMath.abs(et.radius-e[c].radius)){wt=!0;break}wt?i=l=0:(i=et.radius*et.radius*Math.PI,f.push({circle:et,p1:{x:et.x,y:et.y+et.radius},p2:{x:et.x-G7,y:et.y+et.radius},width:2*et.radius}))}return l/=2,r&&(r.area=i+l,r.arcArea=i,r.polygonArea=l,r.arcs=f,r.innerPoints=n,r.intersectionPoints=t),i+l}function _P(e,r){return e*e*Math.acos(1-r/e)-(e-r)*Math.sqrt(r*(2*e-r))}function Fs(e,r){return Math.sqrt((e.x-r.x)*(e.x-r.x)+(e.y-r.y)*(e.y-r.y))}function Y7(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=r-(t*t-e*e+r*r)/(2*t);return _P(e,e-(t*t-r*r+e*e)/(2*t))+_P(r,i)}function W7(e,r){var t=Fs(e,r),n=e.radius,i=r.radius;if(t>=n+i||t<=Math.abs(n-i))return[];var l=(n*n-i*i+t*t)/(2*t),c=Math.sqrt(n*n-l*l),f=e.x+l*(r.x-e.x)/t,d=e.y+l*(r.y-e.y)/t,p=c/t*-(r.y-e.y),m=c/t*-(r.x-e.x);return[{x:f+p,y:d-m},{x:f-p,y:d+m}]}function U7(e){for(var r={x:0,y:0},t=0;t=c&&(l=t[n],c=f)}var d=(0,Al.nelderMead)(function(_){return-1*SP({x:_[0],y:_[1]},e,r)},[l.x,l.y],{maxIterations:500,minErrorDelta:1e-10}).x,p={x:d[0],y:d[1]},m=!0;for(n=0;ne[n].radius){m=!1;break}for(n=0;n=Math.min(n[m].size,n[x].size)&&(p=0),i[m].push({set:x,size:d.size,weight:p}),i[x].push({set:m,size:d.size,weight:p})}var _=[];for(l in i)if(i.hasOwnProperty(l)){var T=0;for(c=0;c=8){var i=function B9(e,r){var l,t=(r=r||{}).restarts||10,n=[],i={};for(l=0;l=Math.min(r[c].size,r[f].size)?x=1:l.size<=1e-10&&(x=-1),i[c][f]=i[f][c]=x}),{distances:n,constraints:i}}(e,n,i),d=f.distances,p=f.constraints,m=(0,Al.norm2)(d.map(Al.norm2))/d.length;d=d.map(function(Y){return Y.map(function(G){return G/m})});var _,T,x=function(Y,G){return function F9(e,r,t,n){var l,i=0;for(l=0;l0&&b<=x||_<0&&b>=x||(i+=2*I*I,r[2*l]+=4*I*(c-p),r[2*l+1]+=4*I*(f-m),r[2*d]+=4*I*(p-c),r[2*d+1]+=4*I*(m-f))}return i}(Y,G,d,p)};for(l=0;lp?1:-1}),n=0;n0&&console.log("WARNING: area "+l+" not represented on screen")}return t}(p,f);return f.forEach(function(x){var _=x.sets,T=_.join(",");x[Je]=T;var I=function L9(e){var r={};wP(e,r);var t=r.arcs;if(0===t.length)return"M 0 0";if(1==t.length){var n=t[0].circle;return function E9(e,r,t){var n=[],i=e-t,l=r;return n.push("M",i,l),n.push("A",t,t,0,1,0,i+2*t,l),n.push("A",t,t,0,1,0,i,l),n.join(" ")}(n.x,n.y,n.radius)}for(var i=["\nM",t[0].p2.x,t[0].p2.y],l=0;lf?1:0,1,c.p1.x,c.p1.y)}return i.join(" ")}(_.map(function(B){return p[B]}));/[zZ]$/.test(I)||(I+=" Z"),x[Xr]=I,(0,S.f0)(x,m[T]||{x:0,y:0})}),f}var W9=40;function $7(e,r,t){var i=e.options,l=i.blendMode,c=i.setsField,f=e.chart.getTheme(),d=f.colors10,p=f.colors20,m=t;(0,S.kJ)(m)||(m=r.filter(function(_){return 1===_[c].length}).length<=10?d:p);var x=H9(m,r,l,c);return function(_){return x.get(_)||m[0]}}function X9(e){var r=e.chart,t=e.options,n=t.legend,i=t.appendPadding,l=t.padding,c=pl(i);return!1!==n&&(c=Gp(i,(0,S.U2)(n,"position"),W9)),r.appendPadding=z1([c,l]),e}function V9(e){var t=e.options.data;t||(Ss(Ka.WARN,!1,"warn: %s","\u6570\u636e\u4e0d\u80fd\u4e3a\u7a7a"),t=[]);var n=t.filter(function(l){return 1===l.sets.length}).map(function(l){return l.sets[0]}),i=t.filter(function(l){return function Y9(e,r){for(var t=0;t1)throw new Error("quantiles must be between 0 and 1");return 1===r?e[e.length-1]:0===r?e[0]:t%1!=0?e[Math.ceil(t)-1]:e.length%2==0?(e[t-1]+e[t])/2:e[t]}function o2(e,r,t){var n=e[r];e[r]=e[t],e[t]=n}function rE(e,r,t,n){for(t=t||0,n=n||e.length-1;n>t;){if(n-t>600){var i=n-t+1,l=r-t+1,c=Math.log(i),f=.5*Math.exp(2*c/3),d=.5*Math.sqrt(c*f*(i-f)/i);l-i/2<0&&(d*=-1),rE(e,r,Math.max(t,Math.floor(r-l*f/i+d)),Math.min(n,Math.floor(r+(i-l)*f/i+d)))}var x=e[r],_=t,T=n;for(o2(e,t,r),e[n]>x&&o2(e,t,n);_x;)T--}e[t]===x?o2(e,t,T):o2(e,++T,n),T<=r&&(t=T+1),r<=T&&(n=T-1)}}function s2(e,r){var t=e.slice();if(Array.isArray(r)){!function oz(e,r){for(var t=[0],n=0;n0?m:x}}}})).ext.geometry.customInfo({leaderLine:f}),e}function Sz(e){var r,t,n=e.options,i=n.xAxis,l=n.yAxis,c=n.xField,f=n.yField,d=n.meta,p=xe({},{alias:f},(0,S.U2)(d,f));return Cr(zn(((r={})[c]=i,r[f]=l,r[Jo]=l,r),xe({},d,((t={})[Jo]=p,t[aE]=p,t[EP]=p,t))))(e)}function Mz(e){var r=e.chart,t=e.options,n=t.xAxis,i=t.yAxis,c=t.yField;return r.axis(t.xField,!1!==n&&n),!1===i?(r.axis(c,!1),r.axis(Jo,!1)):(r.axis(c,i),r.axis(Jo,i)),e}function Tz(e){var r=e.chart,t=e.options,n=t.legend,i=t.total,l=t.risingFill,c=t.fallingFill,d=Vc(t.locale);if(!1===n)r.legend(!1);else{var p=[{name:d.get(["general","increase"]),value:"increase",marker:{symbol:"square",style:{r:5,fill:l}}},{name:d.get(["general","decrease"]),value:"decrease",marker:{symbol:"square",style:{r:5,fill:c}}}];i&&p.push({name:i.label||"",value:"total",marker:{symbol:"square",style:xe({},{r:5},(0,S.U2)(i,"style"))}}),r.legend(xe({},{custom:!0,position:"top",items:p},n)),r.removeInteraction("legend-filter")}return e}function bz(e){var t=e.options,n=t.label,i=t.labelMode,l=t.xField,c=vi(e.chart,"interval");if(n){var f=n.callback,d=(0,E._T)(n,["callback"]);c.label({fields:"absolute"===i?[EP,l]:[aE,l],callback:f,cfg:di(d)})}else c.label(!1);return e}function Az(e){var r=e.chart,t=e.options,n=t.tooltip,i=t.xField,l=t.yField;if(!1!==n){r.tooltip((0,E.pi)({showCrosshairs:!1,showMarkers:!1,shared:!0,fields:[l]},n));var c=r.geometries[0];n?.formatter?c.tooltip(i+"*"+l,n.formatter):c.tooltip(l)}else r.tooltip(!1);return e}function Ez(e){return Cr(wz,Qr,_z,Sz,Mz,Tz,Az,bz,gl,An,hn,En())(e)}rn("interval","waterfall",{draw:function(e,r){var t=e.customInfo,n=e.points,i=e.nextPoints,l=r.addGroup(),c=this.parsePath(function mz(e){for(var r=[],t=0;t=et));)if(B.x=G+le,B.y=H+Se,!(B.x+B.x0<0||B.y+B.y0<0||B.x+B.x1>e[0]||B.y+B.y1>e[1])&&(!Y||!Hz(B,F,e[0]))&&(!Y||Yz(B,Y))){for(var Pe=B.sprite,or=B.width>>5,cr=e[0]>>5,Rr=B.x-(or<<4),Ie=127&Rr,We=32-Ie,nr=B.y1-B.y0,Ve=void 0,je=(B.y+B.y0)*cr+(Rr>>5),ir=0;ir>>Ie:0);je+=cr}return delete B.sprite,!0}return!1}return T.start=function(){var F=e[0],B=e[1],Y=function b(F){F.width=F.height=1;var B=Math.sqrt(F.getContext("2d",{willReadFrequently:!0}).getImageData(0,0,1,1).data.length>>2);F.width=(l2<<5)/B,F.height=oE/B;var Y=F.getContext("2d",{willReadFrequently:!0});return Y.fillStyle=Y.strokeStyle="red",Y.textAlign="center",{context:Y,ratio:B}}(_()),G=T.board?T.board:o9((e[0]>>5)*e[1]),H=d.length,et=[],wt=d.map(function(le,Se,Pe){return le.text=m.call(this,le,Se,Pe),le.font=r.call(this,le,Se,Pe),le.style=x.call(this,le,Se,Pe),le.weight=n.call(this,le,Se,Pe),le.rotate=i.call(this,le,Se,Pe),le.size=~~t.call(this,le,Se,Pe),le.padding=l.call(this,le,Se,Pe),le}).sort(function(le,Se){return Se.size-le.size}),Ot=-1,$t=T.board?[{x:0,y:0},{x:F,y:B}]:null;return function ge(){for(var le=Date.now();Date.now()-le>1,Se.y=B*(f()+.5)>>1,Nz(Y,Se,wt,Ot),Se.hasText&&I(G,Se,$t)&&(et.push(Se),$t?T.hasImage||Gz($t,Se):$t=[{x:Se.x+Se.x0,y:Se.y+Se.y0},{x:Se.x+Se.x1,y:Se.y+Se.y1}],Se.x-=e[0]>>1,Se.y-=e[1]>>1)}T._tags=et,T._bounds=$t}(),T},T.createMask=function(F){var B=document.createElement("canvas"),Y=e[0],G=e[1];if(Y&&G){var H=Y>>5,et=o9((Y>>5)*G);B.width=Y,B.height=G;var wt=B.getContext("2d");wt.drawImage(F,0,0,F.width,F.height,0,0,Y,G);for(var Ot=wt.getImageData(0,0,Y,G).data,$t=0;$t>5)]|=Ot[Se]>=250&&Ot[Se+1]>=250&&Ot[Se+2]>=250?1<<31-ge%32:0}T.board=et,T.hasImage=!0}},T.timeInterval=function(F){p=F??1/0},T.words=function(F){d=F},T.size=function(F){e=[+F[0],+F[1]]},T.font=function(F){r=El(F)},T.fontWeight=function(F){n=El(F)},T.rotate=function(F){i=El(F)},T.spiral=function(F){c=Xz[F]||F},T.fontSize=function(F){t=El(F)},T.padding=function(F){l=El(F)},T.random=function(F){f=El(F)},T}();["font","fontSize","fontWeight","padding","rotate","size","spiral","timeInterval","random"].forEach(function(d){(0,S.UM)(r[d])||t[d](r[d])}),t.words(e),r.imageMask&&t.createMask(r.imageMask);var i=t.start()._tags;i.forEach(function(d){d.x+=r.size[0]/2,d.y+=r.size[1]/2});var l=r.size,c=l[0],f=l[1];return i.push({text:"",value:0,x:0,y:0,opacity:0}),i.push({text:"",value:0,x:c,y:f,opacity:0}),i}(e,r=(0,S.f0)({},Oz,r))}var OP=Math.PI/180,l2=64,oE=2048;function Dz(e){return e.text}function Bz(){return"serif"}function i9(){return"normal"}function Pz(e){return e.value}function kz(){return 90*~~(2*Math.random())}function zz(){return 1}function Nz(e,r,t,n){if(!r.sprite){var i=e.context,l=e.ratio;i.clearRect(0,0,(l2<<5)/l,oE/l);var c=0,f=0,d=0,p=t.length;for(--n;++n>5<<5,x=~~Math.max(Math.abs(I+F),Math.abs(I-F))}else m=m+31>>5<<5;if(x>d&&(d=x),c+m>=l2<<5&&(c=0,f+=d,d=0),f+x>=oE)break;i.translate((c+(m>>1))/l,(f+(x>>1))/l),r.rotate&&i.rotate(r.rotate*OP),i.fillText(r.text,0,0),r.padding&&(i.lineWidth=2*r.padding,i.strokeText(r.text,0,0)),i.restore(),r.width=m,r.height=x,r.xoff=c,r.yoff=f,r.x1=m>>1,r.y1=x>>1,r.x0=-r.x1,r.y0=-r.y1,r.hasText=!0,c+=m}for(var Y=i.getImageData(0,0,(l2<<5)/l,oE/l).data,G=[];--n>=0;)if((r=t[n]).hasText){for(var H=(m=r.width)>>5,et=(x=r.y1-r.y0,0);et>5)]|=le,wt|=le}wt?Ot=$t:(r.y0++,x--,$t--,f++)}r.y1=r.y0+Ot,r.sprite=G.slice(0,(r.y1-r.y0)*H)}}}function Hz(e,r,t){for(var m,n=e.sprite,i=e.width>>5,l=e.x-(i<<4),c=127&l,f=32-c,d=e.y1-e.y0,p=(e.y+e.y0)*(t>>=5)+(l>>5),x=0;x>>c:0))&r[p+_])return!0;p+=t}return!1}function Gz(e,r){var t=e[0],n=e[1];r.x+r.x0n.x&&(n.x=r.x+r.x1),r.y+r.y1>n.y&&(n.y=r.y+r.y1)}function Yz(e,r){return e.x+e.x1>r[0].x&&e.x+e.x0r[0].y&&e.y+e.y0{class e{get marginValue(){return-this.gutter/2}constructor(t){t.attach(this,"sg",{gutter:32,col:2})}}return e.\u0275fac=function(t){return new(t||e)(C.Y36(uN.Ri))},e.\u0275cmp=C.Xpm({type:e,selectors:[["sg-container"],["","sg-container",""]],hostVars:8,hostBindings:function(t,n){2&t&&(C.Udp("margin-left",n.marginValue,"px")("margin-right",n.marginValue,"px"),C.ekj("ant-row",!0)("sg__wrap",!0))},inputs:{gutter:"gutter",colInCon:["sg-container","colInCon"],col:"col"},exportAs:["sgContainer"],ngContentSelectors:l9,decls:1,vars:0,template:function(t,n){1&t&&(C.F$t(),C.Hsn(0))},encapsulation:2,changeDetection:0}),(0,E.gn)([(0,sE.Rn)()],e.prototype,"gutter",void 0),(0,E.gn)([(0,sE.Rn)(null)],e.prototype,"colInCon",void 0),(0,E.gn)([(0,sE.Rn)(null)],e.prototype,"col",void 0),e})(),u9=(()=>{class e{get paddingValue(){return this.parent.gutter/2}constructor(t,n,i,l){if(this.ren=n,this.parent=i,this.rep=l,this.clsMap=[],this.inited=!1,this.col=null,null==i)throw new Error("[sg] must include 'sg-container' component");this.el=t.nativeElement}setClass(){const{el:t,ren:n,clsMap:i,col:l,parent:c}=this;return i.forEach(f=>n.removeClass(t,f)),i.length=0,i.push(...this.rep.genCls(l??(c.colInCon||c.col)),"sg__item"),i.forEach(f=>n.addClass(t,f)),this}ngOnChanges(){this.inited&&this.setClass()}ngAfterViewInit(){this.setClass(),this.inited=!0}}return e.\u0275fac=function(t){return new(t||e)(C.Y36(C.SBq),C.Y36(C.Qsj),C.Y36(RP,9),C.Y36(oe.kz))},e.\u0275cmp=C.Xpm({type:e,selectors:[["sg"]],hostVars:4,hostBindings:function(t,n){2&t&&C.Udp("padding-left",n.paddingValue,"px")("padding-right",n.paddingValue,"px")},inputs:{col:"col"},exportAs:["sg"],features:[C.TTD],ngContentSelectors:l9,decls:1,vars:0,template:function(t,n){1&t&&(C.F$t(),C.Hsn(0))},encapsulation:2,changeDetection:0}),(0,E.gn)([(0,sE.Rn)(null)],e.prototype,"col",void 0),e})(),hN=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=C.oAB({type:e}),e.\u0275inj=C.cJS({imports:[Ct.ez]}),e})();var fN=ct(3353);let vN=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=C.oAB({type:e}),e.\u0275inj=C.cJS({imports:[Ct.ez]}),e})();const dN=function(e){return{$implicit:e}};function pN(e,r){if(1&e&&C.GkF(0,3),2&e){const t=C.oxw();C.Q6J("ngTemplateOutlet",t.nzValueTemplate)("ngTemplateOutletContext",C.VKq(2,dN,t.nzValue))}}function gN(e,r){if(1&e&&(C.TgZ(0,"span",6),C._uU(1),C.qZA()),2&e){const t=C.oxw(2);C.xp6(1),C.Oqu(t.displayInt)}}function yN(e,r){if(1&e&&(C.TgZ(0,"span",7),C._uU(1),C.qZA()),2&e){const t=C.oxw(2);C.xp6(1),C.Oqu(t.displayDecimal)}}function mN(e,r){if(1&e&&(C.ynx(0),C.YNc(1,gN,2,1,"span",4),C.YNc(2,yN,2,1,"span",5),C.BQk()),2&e){const t=C.oxw();C.xp6(1),C.Q6J("ngIf",t.displayInt),C.xp6(1),C.Q6J("ngIf",t.displayDecimal)}}function xN(e,r){if(1&e&&(C.ynx(0),C._uU(1),C.BQk()),2&e){const t=C.oxw();C.xp6(1),C.Oqu(t.nzTitle)}}function CN(e,r){if(1&e&&(C.ynx(0),C._uU(1),C.BQk()),2&e){const t=C.oxw(2);C.xp6(1),C.Oqu(t.nzPrefix)}}function wN(e,r){if(1&e&&(C.TgZ(0,"span",6),C.YNc(1,CN,2,1,"ng-container",1),C.qZA()),2&e){const t=C.oxw();C.xp6(1),C.Q6J("nzStringTemplateOutlet",t.nzPrefix)}}function _N(e,r){if(1&e&&(C.ynx(0),C._uU(1),C.BQk()),2&e){const t=C.oxw(2);C.xp6(1),C.Oqu(t.nzSuffix)}}function SN(e,r){if(1&e&&(C.TgZ(0,"span",7),C.YNc(1,_N,2,1,"ng-container",1),C.qZA()),2&e){const t=C.oxw();C.xp6(1),C.Q6J("nzStringTemplateOutlet",t.nzSuffix)}}let MN=(()=>{class e{constructor(t){this.locale_id=t,this.displayInt="",this.displayDecimal=""}ngOnChanges(){this.formatNumber()}formatNumber(){const t="number"==typeof this.nzValue?".":(0,Ct.dv)(this.locale_id,Ct.wE.Decimal),n=String(this.nzValue),[i,l]=n.split(t);this.displayInt=i,this.displayDecimal=l?`${t}${l}`:""}}return e.\u0275fac=function(t){return new(t||e)(C.Y36(C.soG))},e.\u0275cmp=C.Xpm({type:e,selectors:[["nz-statistic-number"]],inputs:{nzValue:"nzValue",nzValueTemplate:"nzValueTemplate"},exportAs:["nzStatisticNumber"],features:[C.TTD],decls:3,vars:2,consts:[[1,"ant-statistic-content-value"],[3,"ngTemplateOutlet","ngTemplateOutletContext",4,"ngIf"],[4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["class","ant-statistic-content-value-int",4,"ngIf"],["class","ant-statistic-content-value-decimal",4,"ngIf"],[1,"ant-statistic-content-value-int"],[1,"ant-statistic-content-value-decimal"]],template:function(t,n){1&t&&(C.TgZ(0,"span",0),C.YNc(1,pN,1,4,"ng-container",1),C.YNc(2,mN,3,2,"ng-container",2),C.qZA()),2&t&&(C.xp6(1),C.Q6J("ngIf",n.nzValueTemplate),C.xp6(1),C.Q6J("ngIf",!n.nzValueTemplate))},dependencies:[Ct.O5,Ct.tP],encapsulation:2,changeDetection:0}),e})(),TN=(()=>{class e{constructor(t,n){this.cdr=t,this.directionality=n,this.nzValueStyle={},this.dir="ltr",this.destroy$=new Ce.x}ngOnInit(){this.directionality.change?.pipe((0,we.R)(this.destroy$)).subscribe(t=>{this.dir=t,this.cdr.detectChanges()}),this.dir=this.directionality.value}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}}return e.\u0275fac=function(t){return new(t||e)(C.Y36(C.sBO),C.Y36(bt.Is,8))},e.\u0275cmp=C.Xpm({type:e,selectors:[["nz-statistic"]],hostAttrs:[1,"ant-statistic"],hostVars:2,hostBindings:function(t,n){2&t&&C.ekj("ant-statistic-rtl","rtl"===n.dir)},inputs:{nzPrefix:"nzPrefix",nzSuffix:"nzSuffix",nzTitle:"nzTitle",nzValue:"nzValue",nzValueStyle:"nzValueStyle",nzValueTemplate:"nzValueTemplate"},exportAs:["nzStatistic"],decls:6,vars:6,consts:[[1,"ant-statistic-title"],[4,"nzStringTemplateOutlet"],[1,"ant-statistic-content",3,"ngStyle"],["class","ant-statistic-content-prefix",4,"ngIf"],[3,"nzValue","nzValueTemplate"],["class","ant-statistic-content-suffix",4,"ngIf"],[1,"ant-statistic-content-prefix"],[1,"ant-statistic-content-suffix"]],template:function(t,n){1&t&&(C.TgZ(0,"div",0),C.YNc(1,xN,2,1,"ng-container",1),C.qZA(),C.TgZ(2,"div",2),C.YNc(3,wN,2,1,"span",3),C._UZ(4,"nz-statistic-number",4),C.YNc(5,SN,2,1,"span",5),C.qZA()),2&t&&(C.xp6(1),C.Q6J("nzStringTemplateOutlet",n.nzTitle),C.xp6(1),C.Q6J("ngStyle",n.nzValueStyle),C.xp6(1),C.Q6J("ngIf",n.nzPrefix),C.xp6(1),C.Q6J("nzValue",n.nzValue)("nzValueTemplate",n.nzValueTemplate),C.xp6(1),C.Q6J("ngIf",n.nzSuffix))},dependencies:[Ct.O5,Ct.PC,re.f,MN],encapsulation:2,changeDetection:0}),e})(),bN=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=C.oAB({type:e}),e.\u0275inj=C.cJS({imports:[bt.vT,Ct.ez,fN.ud,re.T,vN]}),e})();var AN=ct(9805);const EN=["s2t"];let LN=(()=>{class e{constructor(){}ngOnInit(){}ngAfterViewInit(){this.s2=new AN.HZt(this.chartTable.nativeElement,{data:[],fields:{}},null),this.s2.render()}render(t){let n=[],i=[];if(t&&t.length>0)for(let c in t[0])n.push({field:c,name:c}),i.push(c);this.s2.setDataCfg({data:t,fields:{columns:i},meta:n,showDefaultHeaderActionIcon:!0}),this.onResize(),this.s2.setThemeCfg({name:"gray"}),this.s2.render(!0)}onResize(){if(this.s2){let t=this.chartTable.nativeElement;this.s2.changeSheetSize(t.offsetWidth,t.offsetHeight),this.s2.render(!1)}}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=C.Xpm({type:e,selectors:[["erupt-chart-table"]],viewQuery:function(t,n){if(1&t&&C.Gf(EN,5),2&t){let i;C.iGM(i=C.CRH())&&(n.chartTable=i.first)}},hostBindings:function(t,n){1&t&&C.NdJ("resize",function(l){return n.onResize(l)},!1,C.Jf7)},decls:2,vars:0,consts:[[2,"width","100%","height","100%"],["s2t",""]],template:function(t,n){1&t&&C._UZ(0,"div",0,1)},styles:["[_nghost-%COMP%] table{width:100%}[_nghost-%COMP%] table tr{transition:all .3s,height 0s}[_nghost-%COMP%] table tr td, [_nghost-%COMP%] table tr th{padding:8px;color:#000000a6;font-size:14px;line-height:1;border:1px solid #e8e8e8}"]}),e})();const IN=["chartTable"],FP=function(e){return{height:e}};function ON(e,r){if(1&e&&(C.ynx(0),C.TgZ(1,"div",5),C._UZ(2,"i",6),C.qZA(),C.BQk()),2&e){const t=C.oxw();C.xp6(1),C.Q6J("id",t.chart.code)("ngStyle",C.VKq(2,FP,t.chart.height+"px"))}}const RN=function(e){return{height:e,paddingTop:"1px"}};function FN(e,r){if(1&e&&(C.ynx(0),C._UZ(1,"erupt-iframe",10),C.BQk()),2&e){const t=C.oxw(2);C.xp6(1),C.Akn(C.VKq(3,RN,t.chart.height+"px")),C.Q6J("url",t.src)}}function DN(e,r){if(1&e&&(C.ynx(0),C.TgZ(1,"div",11),C._UZ(2,"erupt-chart-table",null,12),C.qZA(),C.BQk()),2&e){const t=C.oxw(2);C.xp6(1),C.Q6J("ngStyle",C.VKq(1,FP,t.chart.height+"px"))}}function BN(e,r){if(1&e&&(C.ynx(0),C.TgZ(1,"sg"),C._UZ(2,"nz-statistic",16),C.qZA(),C.BQk()),2&e){const t=r.$implicit,n=C.oxw(3);C.xp6(2),C.Q6J("nzValue",t[n.dataKeys[0]]||0)("nzTitle",t[n.dataKeys[1]])("nzValueStyle",n.chart.chartOption)}}function PN(e,r){if(1&e&&(C.ynx(0),C.TgZ(1,"div",13)(2,"div",14),C.YNc(3,BN,3,3,"ng-container",15),C.qZA()(),C.BQk()),2&e){const t=C.oxw(2);C.xp6(2),C.s9C("sg-container",t.data.length),C.xp6(1),C.Q6J("ngForOf",t.data)}}function kN(e,r){if(1&e&&(C.ynx(0),C._UZ(1,"div",17),C.BQk()),2&e){const t=C.oxw(2);C.xp6(1),C.Q6J("id",t.chart.code)("ngStyle",C.VKq(2,FP,t.chart.height+"px"))}}function zN(e,r){if(1&e&&(C.ynx(0,7),C.YNc(1,FN,2,5,"ng-container",8),C.YNc(2,DN,4,3,"ng-container",8),C.YNc(3,PN,4,2,"ng-container",8),C.YNc(4,kN,2,4,"ng-container",9),C.BQk()),2&e){const t=C.oxw();C.Q6J("ngSwitch",t.chart.type),C.xp6(1),C.Q6J("ngSwitchCase",t.chartType.tpl),C.xp6(1),C.Q6J("ngSwitchCase",t.chartType.table),C.xp6(1),C.Q6J("ngSwitchCase",t.chartType.Number)}}function NN(e,r){if(1&e){const t=C.EpF();C.ynx(0),C.TgZ(1,"i",19),C.NdJ("click",function(){C.CHM(t);const i=C.oxw(2);return C.KtG(i.downloadChart())}),C.qZA(),C._uU(2," \xa0"),C._UZ(3,"nz-divider",20),C._uU(4,"\xa0 "),C.BQk()}}function HN(e,r){if(1&e){const t=C.EpF();C.YNc(0,NN,5,0,"ng-container",2),C.TgZ(1,"i",18),C.NdJ("click",function(){C.CHM(t);const i=C.oxw();return C.KtG(i.update(!0))}),C.qZA()}if(2&e){const t=C.oxw();C.Q6J("ngIf",t.plot)}}const GN=function(){return{padding:"0"}};let YN=(()=>{class e{constructor(t,n,i,l){this.ref=t,this.biDataService=n,this.handlerService=i,this.msg=l,this.buildDimParam=new C.vpe,this.chartType=dt,this.ready=!0,this.data=[],this.dataKeys=[]}ngOnInit(){this.chart.chartOption&&(this.chart.chartOption=JSON.parse(this.chart.chartOption)),this.init()}init(){let t=this.handlerService.buildDimParam(this.bi,!1);for(let n of this.bi.dimensions)if(n.notNull&&(!t||null===t[n.code]))return void(this.ready=!1);this.ready=!0,this.chart.type==dt.tpl?this.src=this.biDataService.getChartTpl(this.chart.id,this.bi.code,t):(this.chart.loading=!0,this.biDataService.getBiChart(this.bi.code,this.chart.id,t).subscribe(n=>{this.chart.loading=!1,this.chart.type==dt.Number?(n[0]&&(this.dataKeys=Object.keys(n[0])),this.data=n):this.chart.type==dt.table?this.chartTable.render(n):this.render(n)}))}ngOnDestroy(){this.plot&&this.plot.destroy()}update(t){this.handlerService.buildDimParam(this.bi,!0),this.plot?(t&&(this.chart.loading=!0),this.biDataService.getBiChart(this.bi.code,this.chart.id,this.handlerService.buildDimParam(this.bi)).subscribe(n=>{this.chart.loading&&(this.chart.loading=!1),this.plot.changeData(n)})):this.init()}downloadChart(){this.plot||this.init();let n=this.ref.nativeElement.querySelector("#"+this.chart.code).querySelector("canvas").toDataURL("image/png"),i=document.createElement("a");if("download"in i){i.style.visibility="hidden",i.href=n,i.download=this.chart.name,document.body.appendChild(i);let l=document.createEvent("MouseEvents");l.initEvent("click",!0,!0),i.dispatchEvent(l),document.body.removeChild(i)}else window.open(n)}render(t){this.plot&&(this.plot.destroy(),this.plot=null);let n=Object.keys(t[0]),i=n[0],l=n[1],c=n[2],f=n[3],d={data:t,xField:i,yField:l,slider:{},appendPadding:16,legend:{position:"bottom"}};switch(this.chart.chartOption&&Object.assign(d,this.chart.chartOption),this.chart.type){case dt.Line:this.plot=new gx(this.chart.code,Object.assign(d,{seriesField:c}));break;case dt.StepLine:this.plot=new gx(this.chart.code,Object.assign(d,{seriesField:c,stepType:"vh"}));break;case dt.Bar:this.plot=new ix(this.chart.code,Object.assign(d,{seriesField:c}));break;case dt.PercentStackedBar:this.plot=new ix(this.chart.code,Object.assign(d,{stackField:c,isPercent:!0,isStack:!0}));break;case dt.Waterfall:this.plot=new Lz(this.chart.code,Object.assign(d,{legend:!1,label:{style:{fontSize:10},layout:[{type:"interval-adjust-position"}]}}));break;case dt.Column:this.plot=new ax(this.chart.code,Object.assign(d,{isGroup:!0,seriesField:c}));break;case dt.StackedColumn:this.plot=new ax(this.chart.code,Object.assign(d,{isStack:!0,seriesField:c,slider:{}}));break;case dt.Area:this.plot=new q1(this.chart.code,Object.assign(d,{seriesField:c}));break;case dt.PercentageArea:this.plot=new q1(this.chart.code,Object.assign(d,{seriesField:c,isPercent:!0}));break;case dt.Pie:this.plot=new yx(this.chart.code,Object.assign(d,{angleField:l,colorField:i}));break;case dt.Ring:this.plot=new yx(this.chart.code,Object.assign(d,{angleField:l,colorField:i,innerRadius:.6,radius:1}));break;case dt.Rose:this.plot=new VB(this.chart.code,Object.assign(d,{seriesField:c,isGroup:!!c,radius:.9,label:{offset:-15},interactions:[{type:"element-active"}]}));break;case dt.Funnel:this.plot=new hx(this.chart.code,Object.assign(d,{seriesField:c,appendPadding:[12,38],shape:"pyramid"}));break;case dt.Radar:this.plot=new bA(this.chart.code,Object.assign(d,{seriesField:c,point:{size:2},xAxis:{line:null,tickLine:null,grid:{line:{style:{lineDash:null}}}},yAxis:{line:null,tickLine:null,grid:{line:{type:"line",style:{lineDash:null}},alternateColor:"rgba(0, 0, 0, 0.04)"}},area:{}}));break;case dt.Scatter:this.plot=new n0(this.chart.code,Object.assign(d,{colorField:c,shape:"circle",brush:{enabled:!0},yAxis:{nice:!0,line:{style:{stroke:"#aaa"}}},xAxis:{line:{style:{stroke:"#aaa"}}}}));break;case dt.Bubble:this.plot=new n0(this.chart.code,Object.assign(d,{colorField:c,sizeField:f,size:[3,36],shape:"circle",brush:{enabled:!0}}));break;case dt.WordCloud:this.plot=new sN(this.chart.code,Object.assign(d,{wordField:i,weightField:l,colorField:c,wordStyle:{}}));break;case dt.Sankey:this.plot=new VA(this.chart.code,Object.assign(d,{sourceField:i,weightField:l,targetField:c,nodeDraggable:!0,nodeWidthRatio:.008,nodePaddingRatio:.03}));break;case dt.Chord:this.plot=new Qb(this.chart.code,Object.assign(d,{sourceField:i,weightField:l,targetField:c}));break;case dt.RadialBar:this.plot=new Zx(this.chart.code,Object.assign(d,{colorField:c,isStack:!0,maxAngle:270}))}this.plot&&this.plot.render()}}return e.\u0275fac=function(t){return new(t||e)(C.Y36(C.SBq),C.Y36(Rt),C.Y36(Ht),C.Y36($.dD))},e.\u0275cmp=C.Xpm({type:e,selectors:[["bi-chart"]],viewQuery:function(t,n){if(1&t&&C.Gf(IN,5),2&t){let i;C.iGM(i=C.CRH())&&(n.chartTable=i.first)}},inputs:{chart:"chart",bi:"bi"},outputs:{buildDimParam:"buildDimParam"},decls:6,vars:8,consts:[[3,"nzSpinning"],["nzSize","small",2,"margin-bottom","12px",3,"nzTitle","nzBodyStyle","nzHoverable","nzExtra"],[4,"ngIf"],[3,"ngSwitch",4,"ngIf"],["extraTemplate",""],[2,"width","100%","display","flex","flex-direction","column","align-items","center","justify-content","center",3,"id","ngStyle"],["nz-icon","","nzType","pie-chart","nzTheme","twotone",2,"font-size","36px"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[3,"url"],[2,"overflow","auto",3,"ngStyle"],["chartTable",""],[2,"padding","12px","text-align","center"],[3,"sg-container"],[4,"ngFor","ngForOf"],[2,"margin-bottom","16px",3,"nzValue","nzTitle","nzValueStyle"],[2,"width","100%",3,"id","ngStyle"],["nz-icon","","nzType","reload",3,"click"],["nz-icon","","nzType","download",3,"click"],["nzType","vertical"]],template:function(t,n){if(1&t&&(C.TgZ(0,"nz-spin",0)(1,"nz-card",1),C.YNc(2,ON,3,4,"ng-container",2),C.YNc(3,zN,5,4,"ng-container",3),C.qZA(),C.YNc(4,HN,2,1,"ng-template",null,4,C.W1O),C.qZA()),2&t){const i=C.MAs(5);C.Q6J("nzSpinning",n.chart.loading),C.xp6(1),C.Q6J("nzTitle",n.chart.name)("nzBodyStyle",C.DdM(7,GN))("nzHoverable",!0)("nzExtra",i),C.xp6(1),C.Q6J("ngIf",!n.ready),C.xp6(1),C.Q6J("ngIf",n.ready)}},dependencies:[Ct.sg,Ct.O5,Ct.PC,Ct.RF,Ct.n9,Ct.ED,mt.w,q.Ls,Jt.W,at.bd,Tt.g,lN.M,RP,u9,TN,LN],styles:["@media (min-width: 1600px){[_nghost-%COMP%] .ant-col-xxl-2{width:16.6666666%!important}}"]}),e})();const WN=["st"],UN=["biChart"],XN=function(){return{rows:10}};function VN(e,r){1&e&&C._UZ(0,"nz-skeleton",4),2&e&&C.Q6J("nzActive",!0)("nzTitle",!0)("nzParagraph",C.DdM(3,XN))}function $N(e,r){if(1&e){const t=C.EpF();C.ynx(0),C.TgZ(1,"button",10),C.NdJ("click",function(){C.CHM(t);const i=C.oxw(2);return C.KtG(i.exportBiData())}),C._UZ(2,"i",11),C._uU(3),C.ALo(4,"translate"),C.qZA(),C.BQk()}if(2&e){const t=C.oxw(2);C.xp6(1),C.Q6J("nzLoading",t.downloading)("disabled",!t.biTable.data||t.biTable.data.length<=0),C.xp6(2),C.hij("",C.lcZ(4,3,"table.download")," ")}}function ZN(e,r){1&e&&C._UZ(0,"nz-divider",16)}function qN(e,r){if(1&e){const t=C.EpF();C.TgZ(0,"div",20)(1,"label",21),C.NdJ("ngModelChange",function(i){C.CHM(t);const l=C.oxw().$implicit;return C.KtG(l.show=i)})("ngModelChange",function(){C.CHM(t);const i=C.oxw(5);return C.KtG(i.st.resetColumns())}),C._uU(2),C.qZA()()}if(2&e){const t=C.oxw().$implicit;C.xp6(1),C.Q6J("ngModel",t.show),C.xp6(1),C.Oqu(t.title)}}function KN(e,r){if(1&e&&(C.ynx(0),C.YNc(1,qN,3,2,"div",19),C.BQk()),2&e){const t=r.$implicit;C.xp6(1),C.Q6J("ngIf",t.title&&t.index)}}function QN(e,r){if(1&e&&(C.TgZ(0,"div",17),C.YNc(1,KN,2,1,"ng-container",18),C.qZA()),2&e){const t=C.oxw(3);C.xp6(1),C.Q6J("ngForOf",t.st.columns)}}function JN(e,r){if(1&e&&(C.ynx(0),C.TgZ(1,"button",12),C._UZ(2,"i",13),C._uU(3),C.ALo(4,"translate"),C.qZA(),C.YNc(5,ZN,1,0,"nz-divider",14),C.YNc(6,QN,2,1,"ng-template",null,15,C.W1O),C.BQk()),2&e){const t=C.MAs(7),n=C.oxw(2);C.xp6(1),C.Q6J("nzPopoverContent",t),C.xp6(2),C.hij("",C.lcZ(4,3,"table.col.ctrl")," "),C.xp6(2),C.Q6J("ngIf",n.bi.dimensions.length>0)}}function jN(e,r){if(1&e){const t=C.EpF();C.TgZ(0,"button",25),C.NdJ("click",function(){C.CHM(t);const i=C.oxw(3);return C.KtG(i.clearCondition())}),C._UZ(1,"i",26),C._uU(2),C.ALo(3,"translate"),C.qZA()}if(2&e){const t=C.oxw(3);C.Q6J("disabled",t.querying),C.xp6(2),C.hij("",C.lcZ(3,2,"table.reset")," ")}}function tH(e,r){if(1&e){const t=C.EpF();C.ynx(0),C.YNc(1,jN,4,4,"button",22),C.TgZ(2,"button",23),C.NdJ("click",function(){C.CHM(t);const i=C.oxw(2);return C.KtG(i.hideCondition=!i.hideCondition)}),C._UZ(3,"i",24),C.qZA(),C.BQk()}if(2&e){const t=C.oxw(2);C.xp6(1),C.Q6J("ngIf",!t.hideCondition),C.xp6(2),C.Q6J("nzType",t.hideCondition?"caret-down":"caret-up")}}function eH(e,r){if(1&e){const t=C.EpF();C.TgZ(0,"nz-card",27)(1,"bi-dimension",28),C.NdJ("search",function(){C.CHM(t);const i=C.oxw(2);return C.KtG(i.query({pageIndex:1,pageSize:i.biTable.size},!0))}),C.qZA()()}if(2&e){const t=C.oxw(2);C.Q6J("nzHoverable",!0)("hidden",t.hideCondition),C.xp6(1),C.Q6J("bi",t.bi)}}function rH(e,r){if(1&e&&(C.ynx(0),C.TgZ(1,"div",30),C._UZ(2,"bi-chart",31,32),C.qZA(),C.BQk()),2&e){const t=r.$implicit,n=C.oxw(3);C.xp6(1),C.Q6J("nzMd",t.grid)("nzXs",24),C.xp6(1),C.Q6J("chart",t)("bi",n.bi)}}function nH(e,r){if(1&e&&(C.ynx(0),C.TgZ(1,"div",29),C.ynx(2),C.YNc(3,rH,4,4,"ng-container",18),C.BQk(),C.qZA(),C.BQk()),2&e){const t=C.oxw(2);C.xp6(3),C.Q6J("ngForOf",t.bi.charts)}}function iH(e,r){1&e&&C._UZ(0,"i",38)}function aH(e,r){if(1&e){const t=C.EpF();C.ynx(0),C.TgZ(1,"nz-card",33)(2,"nz-result",34)(3,"div",35)(4,"button",36),C.NdJ("click",function(){C.CHM(t);const i=C.oxw(2);return C.KtG(i.query({pageIndex:1,pageSize:i.biTable.size}))}),C._UZ(5,"i",7),C._uU(6),C.ALo(7,"translate"),C.qZA()()(),C.YNc(8,iH,1,0,"ng-template",null,37,C.W1O),C.qZA(),C.BQk()}if(2&e){const t=C.MAs(9),n=C.oxw(2);C.xp6(1),C.Q6J("nzHoverable",!0)("nzBordered",!0),C.xp6(1),C.Q6J("nzIcon",t)("nzTitle","\u8f93\u5165\u67e5\u8be2\u6761\u4ef6\uff0c\u5f00\u542f\u67e5\u8be2\u64cd\u4f5c"),C.xp6(2),C.Q6J("nzLoading",n.querying)("nzGhost",!0),C.xp6(2),C.hij("",C.lcZ(7,7,"table.query")," ")}}function oH(e,r){1&e&&(C.ynx(0),C.TgZ(1,"nz-card"),C._UZ(2,"nz-empty"),C.qZA(),C.BQk())}function sH(e,r){if(1&e&&C._uU(0),2&e){const t=C.oxw(6);C.hij("\u5171",t.biTable.total,"\u6761")}}function lH(e,r){if(1&e){const t=C.EpF();C.ynx(0),C.TgZ(1,"nz-pagination",41),C.NdJ("nzPageSizeChange",function(i){C.CHM(t);const l=C.oxw(5);return C.KtG(l.pageSizeChange(i))})("nzPageIndexChange",function(i){C.CHM(t);const l=C.oxw(5);return C.KtG(l.pageIndexChange(i))}),C.qZA(),C.YNc(2,sH,1,1,"ng-template",null,42,C.W1O),C.BQk()}if(2&e){const t=C.MAs(3),n=C.oxw(5);C.xp6(1),C.Q6J("nzPageIndex",n.biTable.index)("nzPageSize",n.biTable.size)("nzTotal",n.biTable.total)("nzPageSizeOptions",n.biTable.page.pageSizes)("nzSize","small")("nzShowTotal",t)}}const uH=function(e){return{x:e}};function cH(e,r){if(1&e){const t=C.EpF();C.ynx(0),C.TgZ(1,"st",39,40),C.NdJ("change",function(i){C.CHM(t);const l=C.oxw(4);return C.KtG(l.biTableChange(i))}),C.qZA(),C.YNc(3,lH,4,6,"ng-container",3),C.BQk()}if(2&e){const t=C.oxw(4);C.xp6(1),C.Q6J("columns",t.columns)("data",t.biTable.data)("loading",t.querying)("ps",t.biTable.size)("page",t.biTable.page)("scroll",C.VKq(10,uH,(t.clientWidth>768?150*t.columns.length:0)+"px"))("bordered",t.settingSrv.layout.bordered)("resizable",!0)("size","small"),C.xp6(2),C.Q6J("ngIf",t.biTable.pageType==t.pageType.backend)}}function hH(e,r){if(1&e&&(C.ynx(0),C.YNc(1,oH,3,0,"ng-container",3),C.YNc(2,cH,4,12,"ng-container",3),C.BQk()),2&e){const t=C.oxw(3);C.xp6(1),C.Q6J("ngIf",t.columns.length<=0),C.xp6(1),C.Q6J("ngIf",t.columns&&t.columns.length>0)}}function fH(e,r){if(1&e&&(C.ynx(0),C.YNc(1,hH,3,2,"ng-container",3),C.BQk()),2&e){const t=C.oxw(2);C.xp6(1),C.Q6J("ngIf",t.bi.table)}}function vH(e,r){if(1&e){const t=C.EpF();C.ynx(0),C.TgZ(1,"div",5),C.ynx(2),C.TgZ(3,"button",6),C.NdJ("click",function(){C.CHM(t);const i=C.oxw();return C.KtG(i.query({pageIndex:1,pageSize:i.biTable.size},!0))}),C._UZ(4,"i",7),C._uU(5),C.ALo(6,"translate"),C.qZA(),C.BQk(),C.YNc(7,$N,5,5,"ng-container",3),C.TgZ(8,"div",8),C.YNc(9,JN,8,5,"ng-container",3),C.YNc(10,tH,4,2,"ng-container",3),C.qZA()(),C.YNc(11,eH,2,3,"nz-card",9),C.YNc(12,nH,4,1,"ng-container",3),C.YNc(13,aH,10,9,"ng-container",3),C.YNc(14,fH,2,1,"ng-container",3),C.BQk()}if(2&e){const t=C.oxw();C.xp6(3),C.Q6J("nzLoading",t.querying),C.xp6(2),C.hij("",C.lcZ(6,9,"table.query")," "),C.xp6(2),C.Q6J("ngIf",t.bi.export),C.xp6(2),C.Q6J("ngIf",t.columns&&t.columns.length>0),C.xp6(1),C.Q6J("ngIf",t.bi.dimensions.length>0),C.xp6(1),C.Q6J("ngIf",t.bi.dimensions.length>0),C.xp6(1),C.Q6J("ngIf",t.bi.charts.length>0),C.xp6(1),C.Q6J("ngIf",t.haveNotNull&&t.bi.table),C.xp6(1),C.Q6J("ngIf",!t.haveNotNull)}}const dH=[{path:"",component:(()=>{class e{constructor(t,n,i,l,c,f,d){this.dataService=t,this.route=n,this.handlerService=i,this.settingSrv=l,this.appViewService=c,this.msg=f,this.modal=d,this.haveNotNull=!1,this.querying=!1,this.clientWidth=document.body.clientWidth,this.hideCondition=!1,this.pageType=Yt,this.sort={direction:null},this.biTable={index:1,size:10,total:0,page:{show:!1}},this.columns=[],this.downloading=!1}ngOnInit(){this.router$=this.route.params.subscribe(t=>{this.timer&&clearInterval(this.timer),this.name=t.name,this.biTable.data=null,this.dataService.getBiBuild(this.name).subscribe(n=>{this.bi=n,this.appViewService.setRouterViewDesc(this.bi.remark),this.bi.pageType==Yt.front&&(this.biTable.page={show:!0,front:!0,placement:"center",showSize:!0,showQuickJumper:!0}),this.biTable.size=this.bi.pageSize,this.biTable.page.pageSizes=this.bi.pageSizeOptions;for(let i of n.dimensions)if(i.type===Ut.NUMBER_RANGE&&(i.$value=[]),(0,yt.K0)(i.defaultValue)&&(i.$value=i.defaultValue),i.notNull&&(0,yt.Ft)(i.$value))return void(this.haveNotNull=!0);this.query({pageIndex:1,pageSize:this.biTable.size}),this.bi.refreshTime&&(this.timer=setInterval(()=>{this.query({pageIndex:this.biTable.index,pageSize:this.biTable.size},!0,!1)},1e3*this.bi.refreshTime))})})}query(t,n,i=!0){let l=this.handlerService.buildDimParam(this.bi);l&&(n&&this.biCharts.forEach(c=>c.update(i)),this.bi.table&&(this.querying=!0,this.biTable.index=t.pageIndex,this.dataService.getBiData(this.bi.code,t.pageIndex,t.pageSize,this.sort.column,this.sort.direction,l).subscribe(c=>{if(this.querying=!1,this.haveNotNull=!1,this.biTable.total=c.total,this.biTable.pageType=this.bi.pageType,c.columns){let f=[];for(let d of c.columns)if(d.display){let p={title:{text:d.name,optional:" ",optionalHelp:d.remark},index:d.name,width:d.width,className:"text-center",iif:m=>m.show,show:!0};d.sortable&&(p.sort={key:d.name,default:this.sort.column==d.name?this.sort.direction:null}),d.type==Xt.STRING||(d.type==Xt.NUMBER?p.type="number":d.type==Xt.DATE?p.type="date":d.type==Xt.DRILL&&(p.type="link",p.click=m=>{this.modal.create({nzWrapClassName:"modal-lg",nzKeyboard:!0,nzMaskClosable:!1,nzStyle:{top:"30px"},nzTitle:d.name,nzContent:W,nzComponentParams:{drillCode:d.code,bi:this.bi,row:m},nzFooter:null})})),f.push(p)}this.columns=f,this.biTable.data=c.list}else this.biTable.data=[]})))}biTableChange(t){"sort"==t.type&&(this.sort={column:t.sort.column.indexKey},t.sort.value&&(this.sort.direction=t.sort.value),this.query({pageIndex:1,pageSize:this.biTable.size}))}pageIndexChange(t){this.query({pageIndex:t,pageSize:this.biTable.size})}pageSizeChange(t){this.biTable.size=t,this.query({pageIndex:1,pageSize:t})}clearCondition(){for(let t of this.bi.dimensions)t.$value=null,t.$viewValue=null;this.query({pageIndex:1,pageSize:this.biTable.size})}exportBiData(){let t=this.handlerService.buildDimParam(this.bi);t&&(this.downloading=!0,this.dataService.exportExcel(this.bi.id,this.bi.code,t,()=>{this.downloading=!1}))}ngOnDestroy(){this.router$.unsubscribe(),this.timer&&clearInterval(this.timer)}}return e.\u0275fac=function(t){return new(t||e)(C.Y36(Rt),C.Y36(ut.gz),C.Y36(Ht),C.Y36(oe.gb),C.Y36(J.O),C.Y36($.dD),C.Y36(K.Sf))},e.\u0275cmp=C.Xpm({type:e,selectors:[["bi-skeleton"]],viewQuery:function(t,n){if(1&t&&(C.Gf(WN,5),C.Gf(UN,5)),2&t){let i;C.iGM(i=C.CRH())&&(n.st=i.first),C.iGM(i=C.CRH())&&(n.biCharts=i)}},decls:4,vars:3,consts:[[2,"padding","16px"],[3,"nzActive","nzTitle","nzParagraph",4,"ngIf"],[3,"id"],[4,"ngIf"],[3,"nzActive","nzTitle","nzParagraph"],[2,"display","flex"],["nz-button","",1,"mb-sm",3,"nzLoading","click"],["nz-icon","","nzType","search","nzTheme","outline"],[2,"margin-left","auto"],["style","margin-bottom: 12px;margin-top: 4px","nzSize","small",3,"nzHoverable","hidden",4,"ngIf"],["nz-button","",1,"mb-sm",3,"nzLoading","disabled","click"],["nz-icon","","nzType","download","nzTheme","outline"],["nz-button","","nzType","default","nz-popover","","nzPopoverTrigger","click",1,"mb-sm","hidden-mobile",3,"nzPopoverContent"],["nz-icon","","nzType","table","nzTheme","outline"],["nzType","vertical",4,"ngIf"],["tableColumnCtrl",""],["nzType","vertical"],["nz-row","",2,"max-width","520px"],[4,"ngFor","ngForOf"],["nz-col","","nzSpan","6","style","min-width: 130px;",4,"ngIf"],["nz-col","","nzSpan","6",2,"min-width","130px"],["nz-checkbox","",2,"width","130px",3,"ngModel","ngModelChange"],["nz-button","","class","mb-sm",3,"disabled","click",4,"ngIf"],["nz-button","",1,"mb-sm",2,"padding","4px 8px",3,"click"],["nz-icon","","nzTheme","outline",3,"nzType"],["nz-button","",1,"mb-sm",3,"disabled","click"],["nz-icon","","nzType","sync","nzTheme","outline"],["nzSize","small",2,"margin-bottom","12px","margin-top","4px",3,"nzHoverable","hidden"],[3,"bi","search"],["nz-row","","nzGutter","12"],["nz-col","",3,"nzMd","nzXs"],[3,"chart","bi"],["biChart",""],[3,"nzHoverable","nzBordered"],[3,"nzIcon","nzTitle"],["nz-result-extra",""],["nz-button","","nzType","primary",1,"mb-sm",3,"nzLoading","nzGhost","click"],["icon",""],["nz-icon","","nzType","rocket","nzTheme","twotone"],[2,"margin-bottom","12px",3,"columns","data","loading","ps","page","scroll","bordered","resizable","size","change"],["st",""],["nzShowSizeChanger","","nzShowQuickJumper","",2,"text-align","center",3,"nzPageIndex","nzPageSize","nzTotal","nzPageSizeOptions","nzSize","nzShowTotal","nzPageSizeChange","nzPageIndexChange"],["totalTemplate",""]],template:function(t,n){1&t&&(C.TgZ(0,"div",0),C.YNc(1,VN,1,4,"nz-skeleton",1),C.TgZ(2,"div",2),C.YNc(3,vH,15,11,"ng-container",3),C.qZA()()),2&t&&(C.xp6(1),C.Q6J("ngIf",!n.bi),C.xp6(1),C.Q6J("id",n.name),C.xp6(1),C.Q6J("ngIf",n.bi))},dependencies:[Ct.sg,Ct.O5,U.JJ,U.On,ye.A5,vt.ix,mt.w,j.dQ,rt.t3,rt.SK,P.Ie,Z.lU,q.Ls,at.bd,Tt.g,kt.dE,Lt.ng,oi,zr,jo.p9,$u,YN,_v.C],styles:["[_nghost-%COMP%] .ant-table{transition:.3s all;border-radius:0}[_nghost-%COMP%] .ant-table:hover{border-color:#00000017;box-shadow:0 2px 8px #00000017}"]}),e})(),data:{desc:"BI",status:!0}}];let pH=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=C.oAB({type:e}),e.\u0275inj=C.cJS({imports:[ut.Bz.forChild(dH),ut.Bz]}),e})();var gH=ct(635),yH=ct(9002);let mH=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=C.oAB({type:e}),e.\u0275inj=C.cJS({providers:[Rt],imports:[Ct.ez,pH,gH.m,Ol,jo.Xo,hN,bN,Mh,yH.YS]}),e})()},4943:(rr,be,ct)=>{"use strict";function ae(nt,Et,te){nt.prototype=Et.prototype=te,te.constructor=nt}function Nt(nt,Et){var te=Object.create(nt.prototype);for(var he in Et)te[he]=Et[he];return te}function ve(){}ct.d(be,{ZP:()=>yt,B8:()=>At});var Qt=1/.7,zt="\\s*([+-]?\\d+)\\s*",Bt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Mt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Vt=/^#([0-9a-f]{3,8})$/,se=new RegExp("^rgb\\("+[zt,zt,zt]+"\\)$"),ne=new RegExp("^rgb\\("+[Mt,Mt,Mt]+"\\)$"),me=new RegExp("^rgba\\("+[zt,zt,zt,Bt]+"\\)$"),Dt=new RegExp("^rgba\\("+[Mt,Mt,Mt,Bt]+"\\)$"),Ct=new RegExp("^hsl\\("+[Bt,Mt,Mt]+"\\)$"),ut=new RegExp("^hsla\\("+[Bt,Mt,Mt,Bt]+"\\)$"),dt={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Yt(){return this.rgb().formatHex()}function Xt(){return this.rgb().formatRgb()}function yt(nt){var Et,te;return nt=(nt+"").trim().toLowerCase(),(Et=Vt.exec(nt))?(te=Et[1].length,Et=parseInt(Et[1],16),6===te?$(Et):3===te?new Kt(Et>>8&15|Et>>4&240,Et>>4&15|240&Et,(15&Et)<<4|15&Et,1):8===te?C(Et>>24&255,Et>>16&255,Et>>8&255,(255&Et)/255):4===te?C(Et>>12&15|Et>>8&240,Et>>8&15|Et>>4&240,Et>>4&15|240&Et,((15&Et)<<4|15&Et)/255):null):(Et=se.exec(nt))?new Kt(Et[1],Et[2],Et[3],1):(Et=ne.exec(nt))?new Kt(255*Et[1]/100,255*Et[2]/100,255*Et[3]/100,1):(Et=me.exec(nt))?C(Et[1],Et[2],Et[3],Et[4]):(Et=Dt.exec(nt))?C(255*Et[1]/100,255*Et[2]/100,255*Et[3]/100,Et[4]):(Et=Ct.exec(nt))?ye(Et[1],Et[2]/100,Et[3]/100,1):(Et=ut.exec(nt))?ye(Et[1],Et[2]/100,Et[3]/100,Et[4]):dt.hasOwnProperty(nt)?$(dt[nt]):"transparent"===nt?new Kt(NaN,NaN,NaN,0):null}function $(nt){return new Kt(nt>>16&255,nt>>8&255,255&nt,1)}function C(nt,Et,te,he){return he<=0&&(nt=Et=te=NaN),new Kt(nt,Et,te,he)}function At(nt,Et,te,he){return 1===arguments.length?function gt(nt){return nt instanceof ve||(nt=yt(nt)),nt?new Kt((nt=nt.rgb()).r,nt.g,nt.b,nt.opacity):new Kt}(nt):new Kt(nt,Et,te,he??1)}function Kt(nt,Et,te,he){this.r=+nt,this.g=+Et,this.b=+te,this.opacity=+he}function oe(){return"#"+Ht(this.r)+Ht(this.g)+Ht(this.b)}function Rt(){var nt=this.opacity;return(1===(nt=isNaN(nt)?1:Math.max(0,Math.min(1,nt)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===nt?")":", "+nt+")")}function Ht(nt){return((nt=Math.max(0,Math.min(255,Math.round(nt)||0)))<16?"0":"")+nt.toString(16)}function ye(nt,Et,te,he){return he<=0?nt=Et=te=NaN:te<=0||te>=1?nt=Et=NaN:Et<=0&&(nt=NaN),new kt(nt,Et,te,he)}function qt(nt){if(nt instanceof kt)return new kt(nt.h,nt.s,nt.l,nt.opacity);if(nt instanceof ve||(nt=yt(nt)),!nt)return new kt;if(nt instanceof kt)return nt;var Et=(nt=nt.rgb()).r/255,te=nt.g/255,he=nt.b/255,Fe=Math.min(Et,te,he),W=Math.max(Et,te,he),K=NaN,J=W-Fe,U=(W+Fe)/2;return J?(K=Et===W?(te-he)/J+6*(te0&&U<1?0:K,new kt(K,J,U,nt.opacity)}function kt(nt,Et,te,he){this.h=+nt,this.s=+Et,this.l=+te,this.opacity=+he}function Q(nt,Et,te){return 255*(nt<60?Et+(te-Et)*nt/60:nt<180?te:nt<240?Et+(te-Et)*(240-nt)/60:Et)}ae(ve,yt,{copy:function(nt){return Object.assign(new this.constructor,this,nt)},displayable:function(){return this.rgb().displayable()},hex:Yt,formatHex:Yt,formatHsl:function Ut(){return qt(this).formatHsl()},formatRgb:Xt,toString:Xt}),ae(Kt,At,Nt(ve,{brighter:function(nt){return nt=null==nt?Qt:Math.pow(Qt,nt),new Kt(this.r*nt,this.g*nt,this.b*nt,this.opacity)},darker:function(nt){return nt=null==nt?.7:Math.pow(.7,nt),new Kt(this.r*nt,this.g*nt,this.b*nt,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:oe,formatHex:oe,formatRgb:Rt,toString:Rt})),ae(kt,function Jt(nt,Et,te,he){return 1===arguments.length?qt(nt):new kt(nt,Et,te,he??1)},Nt(ve,{brighter:function(nt){return nt=null==nt?Qt:Math.pow(Qt,nt),new kt(this.h,this.s,this.l*nt,this.opacity)},darker:function(nt){return nt=null==nt?.7:Math.pow(.7,nt),new kt(this.h,this.s,this.l*nt,this.opacity)},rgb:function(){var nt=this.h%360+360*(this.h<0),Et=isNaN(nt)||isNaN(this.s)?0:this.s,te=this.l,he=te+(te<.5?te:1-te)*Et,Fe=2*te-he;return new Kt(Q(nt>=240?nt-240:nt+120,Fe,he),Q(nt,Fe,he),Q(nt<120?nt+240:nt-120,Fe,he),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var nt=this.opacity;return(1===(nt=isNaN(nt)?1:Math.max(0,Math.min(1,nt)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===nt?")":", "+nt+")")}}))},6399:(rr,be,ct)=>{"use strict";function ae(P){return+P}function Nt(P){return P*P}function ve(P){return P*(2-P)}function Zt(P){return((P*=2)<=1?P*P:--P*(2-P)+1)/2}function Qt(P){return P*P*P}function zt(P){return--P*P*P+1}function Bt(P){return((P*=2)<=1?P*P*P:(P-=2)*P*P+2)/2}ct.r(be),ct.d(be,{easeBack:()=>K,easeBackIn:()=>Fe,easeBackInOut:()=>K,easeBackOut:()=>W,easeBounce:()=>Et,easeBounceIn:()=>nt,easeBounceInOut:()=>te,easeBounceOut:()=>Et,easeCircle:()=>gt,easeCircleIn:()=>$,easeCircleInOut:()=>gt,easeCircleOut:()=>C,easeCubic:()=>Bt,easeCubicIn:()=>Qt,easeCubicInOut:()=>Bt,easeCubicOut:()=>zt,easeElastic:()=>j,easeElasticIn:()=>mt,easeElasticInOut:()=>rt,easeElasticOut:()=>j,easeExp:()=>yt,easeExpIn:()=>Ut,easeExpInOut:()=>yt,easeExpOut:()=>Xt,easeLinear:()=>ae,easePoly:()=>ne,easePolyIn:()=>Vt,easePolyInOut:()=>ne,easePolyOut:()=>se,easeQuad:()=>Zt,easeQuadIn:()=>Nt,easeQuadInOut:()=>Zt,easeQuadOut:()=>ve,easeSin:()=>dt,easeSinIn:()=>Ct,easeSinInOut:()=>dt,easeSinOut:()=>ut});var Vt=function P(Z){function q(at){return Math.pow(at,Z)}return Z=+Z,q.exponent=P,q}(3),se=function P(Z){function q(at){return 1-Math.pow(1-at,Z)}return Z=+Z,q.exponent=P,q}(3),ne=function P(Z){function q(at){return((at*=2)<=1?Math.pow(at,Z):2-Math.pow(2-at,Z))/2}return Z=+Z,q.exponent=P,q}(3),me=Math.PI,Dt=me/2;function Ct(P){return 1==+P?1:1-Math.cos(P*Dt)}function ut(P){return Math.sin(P*Dt)}function dt(P){return(1-Math.cos(me*P))/2}function Yt(P){return 1.0009775171065494*(Math.pow(2,-10*P)-.0009765625)}function Ut(P){return Yt(1-+P)}function Xt(P){return 1-Yt(P)}function yt(P){return((P*=2)<=1?Yt(1-P):2-Yt(P-1))/2}function $(P){return 1-Math.sqrt(1-P*P)}function C(P){return Math.sqrt(1- --P*P)}function gt(P){return((P*=2)<=1?1-Math.sqrt(1-P*P):Math.sqrt(1-(P-=2)*P)+1)/2}var At=4/11,Kt=6/11,oe=8/11,Rt=3/4,Ht=9/11,ye=10/11,qt=15/16,Jt=21/22,kt=63/64,Q=1/At/At;function nt(P){return 1-Et(1-P)}function Et(P){return(P=+P)Jt&&(he.splice(K+1,0,mt),W=!0)}return W}}function ne(Rt,Ht,ye,qt){var Jt=qt-Rt*Rt,kt=Math.abs(Jt)<1e-24?0:(ye-Rt*Ht)/Jt;return[Ht-kt*Rt,kt]}function Dt(){var ye,Rt=function(kt){return kt[0]},Ht=function(kt){return kt[1]};function qt(Jt){var kt=0,Q=0,nt=0,Et=0,te=0,he=ye?+ye[0]:1/0,Fe=ye?+ye[1]:-1/0;zt(Jt,Rt,Ht,function(j,rt){++kt,Q+=(j-Q)/kt,nt+=(rt-nt)/kt,Et+=(j*rt-Et)/kt,te+=(j*j-te)/kt,ye||(jFe&&(Fe=j))});var K=ae(ne(Q,nt,Et,te),2),J=K[0],U=K[1],vt=function(rt){return U*rt+J},mt=[[he,vt(he)],[Fe,vt(Fe)]];return mt.a=U,mt.b=J,mt.predict=vt,mt.rSquared=Bt(Jt,Rt,Ht,nt,vt),mt}return qt.domain=function(Jt){return arguments.length?(ye=Jt,qt):ye},qt.x=function(Jt){return arguments.length?(Rt=Jt,qt):Rt},qt.y=function(Jt){return arguments.length?(Ht=Jt,qt):Ht},qt}function Ct(Rt){Rt.sort(function(ye,qt){return ye-qt});var Ht=Rt.length/2;return Ht%1==0?(Rt[Ht-1]+Rt[Ht])/2:Rt[Math.floor(Ht)]}var ut=2,dt=1e-12;function Ut(Rt){return(Rt=1-Rt*Rt*Rt)*Rt*Rt}function Xt(Rt,Ht,ye){var qt=Rt[Ht],Jt=ye[0],kt=ye[1]+1;if(!(kt>=Rt.length))for(;Ht>Jt&&Rt[kt]-qt<=qt-Rt[Jt];)ye[0]=++Jt,ye[1]=kt,++kt}function C(){var ye,Rt=function(kt){return kt[0]},Ht=function(kt){return kt[1]};function qt(Jt){var mt,j,rt,P,Q=ae(Qt(Jt,Rt,Ht),4),nt=Q[0],Et=Q[1],te=Q[2],he=Q[3],Fe=nt.length,W=0,K=0,J=0,U=0,vt=0;for(mt=0;mtTt&&(Tt=z))});var Lt=J-W*W,bt=W*Lt-K*K,re=(vt*W-U*K)/bt,Ce=(U*Lt-vt*K)/bt,we=-re*W,Re=function(R){return re*(R-=te)*R+Ce*R+we+he},it=se(at,Tt,Re);return it.a=re,it.b=Ce-2*re*te,it.c=we-Ce*te+re*te*te+he,it.predict=Re,it.rSquared=Bt(Jt,Rt,Ht,Z,Re),it}return qt.domain=function(Jt){return arguments.length?(ye=Jt,qt):ye},qt.x=function(Jt){return arguments.length?(Rt=Jt,qt):Rt},qt.y=function(Jt){return arguments.length?(Ht=Jt,qt):Ht},qt}ct.regressionExp=function me(){var ye,Rt=function(kt){return kt[0]},Ht=function(kt){return kt[1]};function qt(Jt){var kt=0,Q=0,nt=0,Et=0,te=0,he=0,Fe=ye?+ye[0]:1/0,W=ye?+ye[1]:-1/0;zt(Jt,Rt,Ht,function(rt,P){var Z=Math.log(P),q=rt*P;++kt,Q+=(P-Q)/kt,Et+=(q-Et)/kt,he+=(rt*q-he)/kt,nt+=(P*Z-nt)/kt,te+=(q*Z-te)/kt,ye||(rtW&&(W=rt))});var J=ae(ne(Et/Q,nt/Q,te/Q,he/Q),2),U=J[0],vt=J[1];U=Math.exp(U);var mt=function(P){return U*Math.exp(vt*P)},j=se(Fe,W,mt);return j.a=U,j.b=vt,j.predict=mt,j.rSquared=Bt(Jt,Rt,Ht,Q,mt),j}return qt.domain=function(Jt){return arguments.length?(ye=Jt,qt):ye},qt.x=function(Jt){return arguments.length?(Rt=Jt,qt):Rt},qt.y=function(Jt){return arguments.length?(Ht=Jt,qt):Ht},qt},ct.regressionLinear=Dt,ct.regressionLoess=function Yt(){var Rt=function(kt){return kt[0]},Ht=function(kt){return kt[1]},ye=.3;function qt(Jt){for(var Q=ae(Qt(Jt,Rt,Ht,!0),4),nt=Q[0],Et=Q[1],te=Q[2],he=Q[3],Fe=nt.length,W=Math.max(2,~~(ye*Fe)),K=new Float64Array(Fe),J=new Float64Array(Fe),U=new Float64Array(Fe).fill(1),vt=-1;++vt<=ut;){for(var mt=[0,W-1],j=0;jnt[Z]-rt?P:Z]-rt||1),we=P;we<=Z;++we){var Re=nt[we],it=Et[we],z=Ut(Math.abs(rt-Re)*Ce)*U[we],R=Re*z;at+=z,Tt+=R,Lt+=it*z,bt+=it*R,re+=Re*R}var V=ae(ne(Tt/at,Lt/at,bt/at,re/at),2);K[j]=V[0]+V[1]*rt,J[j]=Math.abs(Et[j]-K[j]),Xt(nt,j+1,mt)}if(vt===ut)break;var St=Ct(J);if(Math.abs(St)=1?dt:(ie=1-ee*ee)*ie}return function yt(Rt,Ht,ye,qt){for(var te,Jt=Rt.length,kt=[],Q=0,nt=0,Et=[];QW&&(W=P))});var U=ae(ne(nt,Et,te,he),2),vt=U[0],mt=U[1],j=function(Z){return mt*Math.log(Z)/K+vt},rt=se(Fe,W,j);return rt.a=mt,rt.b=vt,rt.predict=j,rt.rSquared=Bt(kt,Rt,Ht,Et,j),rt}return Jt.domain=function(kt){return arguments.length?(qt=kt,Jt):qt},Jt.x=function(kt){return arguments.length?(Rt=kt,Jt):Rt},Jt.y=function(kt){return arguments.length?(Ht=kt,Jt):Ht},Jt.base=function(kt){return arguments.length?(ye=kt,Jt):ye},Jt},ct.regressionPoly=function gt(){var qt,Rt=function(Q){return Q[0]},Ht=function(Q){return Q[1]},ye=3;function Jt(kt){if(1===ye){var Q=Dt().x(Rt).y(Ht).domain(qt)(kt);return Q.coefficients=[Q.b,Q.a],delete Q.a,delete Q.b,Q}if(2===ye){var nt=C().x(Rt).y(Ht).domain(qt)(kt);return nt.coefficients=[nt.c,nt.b,nt.a],delete nt.a,delete nt.b,delete nt.c,nt}var q,at,Tt,Lt,bt,te=ae(Qt(kt,Rt,Ht),4),he=te[0],Fe=te[1],W=te[2],K=te[3],J=he.length,U=[],vt=[],mt=ye+1,j=0,rt=0,P=qt?+qt[0]:1/0,Z=qt?+qt[1]:-1/0;for(zt(kt,Rt,Ht,function(Re,it){++rt,j+=(it-j)/rt,qt||(ReZ&&(Z=Re))}),q=0;qMath.abs(Rt[qt][Q])&&(Q=Jt);for(kt=qt;kt=qt;kt--)Rt[kt][Jt]-=Rt[kt][qt]*Rt[qt][Jt]/Rt[qt][qt]}for(Jt=Ht-1;Jt>=0;--Jt){for(nt=0,kt=Jt+1;kt=0;--kt)for(Et=1,Jt[kt]+=nt=Ht[kt],Q=1;Q<=kt;++Q)Et*=(kt+1-Q)/Q,Jt[kt-Q]+=nt*Math.pow(ye,Q)*Et;return Jt[0]+=qt,Jt}(mt,re,-W,K),we.predict=Ce,we.rSquared=Bt(kt,Rt,Ht,j,Ce),we}return Jt.domain=function(kt){return arguments.length?(qt=kt,Jt):qt},Jt.x=function(kt){return arguments.length?(Rt=kt,Jt):Rt},Jt.y=function(kt){return arguments.length?(Ht=kt,Jt):Ht},Jt.order=function(kt){return arguments.length?(ye=kt,Jt):ye},Jt},ct.regressionPow=function oe(){var ye,Rt=function(kt){return kt[0]},Ht=function(kt){return kt[1]};function qt(Jt){var kt=0,Q=0,nt=0,Et=0,te=0,he=0,Fe=ye?+ye[0]:1/0,W=ye?+ye[1]:-1/0;zt(Jt,Rt,Ht,function(rt,P){var Z=Math.log(rt),q=Math.log(P);++kt,Q+=(Z-Q)/kt,nt+=(q-nt)/kt,Et+=(Z*q-Et)/kt,te+=(Z*Z-te)/kt,he+=(P-he)/kt,ye||(rtW&&(W=rt))});var J=ae(ne(Q,nt,Et,te),2),U=J[0],vt=J[1];U=Math.exp(U);var mt=function(P){return U*Math.pow(P,vt)},j=se(Fe,W,mt);return j.a=U,j.b=vt,j.predict=mt,j.rSquared=Bt(Jt,Rt,Ht,he,mt),j}return qt.domain=function(Jt){return arguments.length?(ye=Jt,qt):ye},qt.x=function(Jt){return arguments.length?(Rt=Jt,qt):Rt},qt.y=function(Jt){return arguments.length?(Ht=Jt,qt):Ht},qt},ct.regressionQuad=C,Object.defineProperty(ct,"__esModule",{value:!0})}(be)},9194:(rr,be,ct)=>{"use strict";ct.d(be,{HT:()=>ut});var Qt,zt,ae=0,Nt=0,ve=0,Zt=1e3,Bt=0,Mt=0,Vt=0,se="object"==typeof performance&&performance.now?performance:Date,ne="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function($){setTimeout($,17)};function me(){return Mt||(ne(Dt),Mt=se.now()+Vt)}function Dt(){Mt=0}function Ct(){this._call=this._time=this._next=null}function ut($,C,gt){var At=new Ct;return At.restart($,C,gt),At}function Yt(){Mt=(Bt=se.now())+Vt,ae=Nt=0;try{!function dt(){me(),++ae;for(var C,$=Qt;$;)(C=Mt-$._time)>=0&&$._call.call(null,C),$=$._next;--ae}()}finally{ae=0,function Xt(){for(var $,gt,C=Qt,At=1/0;C;)C._call?(At>C._time&&(At=C._time),$=C,C=C._next):(gt=C._next,C._next=null,C=$?$._next=gt:Qt=gt);zt=$,yt(At)}(),Mt=0}}function Ut(){var $=se.now(),C=$-Bt;C>Zt&&(Vt-=C,Bt=$)}function yt($){ae||(Nt&&(Nt=clearTimeout(Nt)),$-Mt>24?($<1/0&&(Nt=setTimeout(Yt,$-se.now()-Vt)),ve&&(ve=clearInterval(ve))):(ve||(Bt=se.now(),ve=setInterval(Ut,Zt)),ae=1,ne(Yt)))}Ct.prototype=ut.prototype={constructor:Ct,restart:function($,C,gt){if("function"!=typeof $)throw new TypeError("callback is not a function");gt=(null==gt?me():+gt)+(null==C?0:+C),!this._next&&zt!==this&&(zt?zt._next=this:Qt=this,zt=this),this._call=$,this._time=gt,yt()},stop:function(){this._call&&(this._call=null,this._time=1/0,yt())}}},2260:(rr,be,ct)=>{"use strict";ct.d(be,{qY:()=>me});var ae=function(Xt,yt,$){if($||2===arguments.length)for(var At,C=0,gt=yt.length;C"u"&&typeof navigator<"u"&&"ReactNative"===navigator.product?new zt:typeof navigator<"u"?ut(navigator.userAgent):function Yt(){return typeof process<"u"&&process.version?new ve(process.version.slice(1)):null}()}function ut(Xt){var yt=function Dt(Xt){return""!==Xt&&se.reduce(function(yt,$){var C=$[0];if(yt)return yt;var At=$[1].exec(Xt);return!!At&&[C,At]},!1)}(Xt);if(!yt)return null;var $=yt[0],C=yt[1];if("searchbot"===$)return new Qt;var gt=C[1]&&C[1].split(".").join("_").split("_").slice(0,3);gt?gt.lengthyt+Ut*Yt*$||C>=qt)ye=Yt;else{if(Math.abs(At)<=-Xt*$)return Yt;At*(ye-Ht)>=0&&(ye=Ht),Ht=Yt,qt=C}return 0}Yt=Yt||1,Ut=Ut||1e-6,Xt=Xt||.1;for(var Rt=0;Rt<10;++Rt){if(Bt(dt.x,1,ut.x,Yt,Ct),C=dt.fx=Dt(dt.x,dt.fxprime),At=Zt(dt.fxprime,Ct),C>yt+Ut*Yt*$||Rt&&C>=gt)return oe(Kt,Yt,gt);if(Math.abs(At)<=-Xt*$)return Yt;if(At>=0)return oe(Yt,Kt,C);gt=C,Kt=Yt,Yt*=2}return Yt}ct.bisect=function ae(Dt,Ct,ut,dt){var Yt=(dt=dt||{}).maxIterations||100,Ut=dt.tolerance||1e-10,Xt=Dt(Ct),yt=Dt(ut),$=ut-Ct;if(Xt*yt>0)throw"Initial bisect points must have opposite signs";if(0===Xt)return Ct;if(0===yt)return ut;for(var C=0;C=0&&(Ct=gt),Math.abs($)=Rt[oe-1].fx){var K=!1;if(Q.fx>W.fx?(Bt(nt,1+gt,kt,-gt,W),nt.fx=Dt(nt),nt.fx=1)break;for(Ht=1;Ht{"use strict";ct.d(be,{WT:()=>Nt});var Nt=typeof Float32Array<"u"?Float32Array:Array;Math,Math,Math.hypot||(Math.hypot=function(){for(var Mt=0,Vt=arguments.length;Vt--;)Mt+=arguments[Vt]*arguments[Vt];return Math.sqrt(Mt)})},7543:(rr,be,ct)=>{"use strict";function Vt(Q,nt){var Et=nt[0],te=nt[1],he=nt[2],Fe=nt[3],W=nt[4],K=nt[5],J=nt[6],U=nt[7],vt=nt[8],mt=vt*W-K*U,j=-vt*Fe+K*J,rt=U*Fe-W*J,P=Et*mt+te*j+he*rt;return P?(Q[0]=mt*(P=1/P),Q[1]=(-vt*te+he*U)*P,Q[2]=(K*te-he*W)*P,Q[3]=j*P,Q[4]=(vt*Et-he*J)*P,Q[5]=(-K*Et+he*Fe)*P,Q[6]=rt*P,Q[7]=(-U*Et+te*J)*P,Q[8]=(W*Et-te*Fe)*P,Q):null}function me(Q,nt,Et){var te=nt[0],he=nt[1],Fe=nt[2],W=nt[3],K=nt[4],J=nt[5],U=nt[6],vt=nt[7],mt=nt[8],j=Et[0],rt=Et[1],P=Et[2],Z=Et[3],q=Et[4],at=Et[5],Tt=Et[6],Lt=Et[7],bt=Et[8];return Q[0]=j*te+rt*W+P*U,Q[1]=j*he+rt*K+P*vt,Q[2]=j*Fe+rt*J+P*mt,Q[3]=Z*te+q*W+at*U,Q[4]=Z*he+q*K+at*vt,Q[5]=Z*Fe+q*J+at*mt,Q[6]=Tt*te+Lt*W+bt*U,Q[7]=Tt*he+Lt*K+bt*vt,Q[8]=Tt*Fe+Lt*J+bt*mt,Q}function dt(Q,nt){return Q[0]=1,Q[1]=0,Q[2]=0,Q[3]=0,Q[4]=1,Q[5]=0,Q[6]=nt[0],Q[7]=nt[1],Q[8]=1,Q}function Yt(Q,nt){var Et=Math.sin(nt),te=Math.cos(nt);return Q[0]=te,Q[1]=Et,Q[2]=0,Q[3]=-Et,Q[4]=te,Q[5]=0,Q[6]=0,Q[7]=0,Q[8]=1,Q}function Ut(Q,nt){return Q[0]=nt[0],Q[1]=0,Q[2]=0,Q[3]=0,Q[4]=nt[1],Q[5]=0,Q[6]=0,Q[7]=0,Q[8]=1,Q}ct.d(be,{Jp:()=>me,U_:()=>Vt,Us:()=>Yt,vc:()=>dt,xJ:()=>Ut})},8235:(rr,be,ct)=>{"use strict";ct.d(be,{$X:()=>Mt,AK:()=>Kt,EU:()=>nt,Fp:()=>Ct,Fv:()=>At,I6:()=>he,IH:()=>Bt,TE:()=>Ut,VV:()=>Dt,bA:()=>dt,kE:()=>yt,kK:()=>Jt,lu:()=>K});var ae=ct(5278);function Bt(P,Z,q){return P[0]=Z[0]+q[0],P[1]=Z[1]+q[1],P}function Mt(P,Z,q){return P[0]=Z[0]-q[0],P[1]=Z[1]-q[1],P}function Dt(P,Z,q){return P[0]=Math.min(Z[0],q[0]),P[1]=Math.min(Z[1],q[1]),P}function Ct(P,Z,q){return P[0]=Math.max(Z[0],q[0]),P[1]=Math.max(Z[1],q[1]),P}function dt(P,Z,q){return P[0]=Z[0]*q,P[1]=Z[1]*q,P}function Ut(P,Z){return Math.hypot(Z[0]-P[0],Z[1]-P[1])}function yt(P){return Math.hypot(P[0],P[1])}function At(P,Z){var q=Z[0],at=Z[1],Tt=q*q+at*at;return Tt>0&&(Tt=1/Math.sqrt(Tt)),P[0]=Z[0]*Tt,P[1]=Z[1]*Tt,P}function Kt(P,Z){return P[0]*Z[0]+P[1]*Z[1]}function Jt(P,Z,q){var at=Z[0],Tt=Z[1];return P[0]=q[0]*at+q[3]*Tt+q[6],P[1]=q[1]*at+q[4]*Tt+q[7],P}function nt(P,Z){var q=P[0],at=P[1],Tt=Z[0],Lt=Z[1],bt=Math.sqrt(q*q+at*at)*Math.sqrt(Tt*Tt+Lt*Lt);return Math.acos(Math.min(Math.max(bt&&(q*Tt+at*Lt)/bt,-1),1))}function he(P,Z){return P[0]===Z[0]&&P[1]===Z[1]}var K=Mt;(function Nt(){var P=new ae.WT(2);ae.WT!=Float32Array&&(P[0]=0,P[1]=0)})()},6224:rr=>{"use strict";var be=rr.exports;rr.exports.isNumber=function(ct){return"number"==typeof ct},rr.exports.findMin=function(ct){if(0===ct.length)return 1/0;for(var ae=ct[0],Nt=1;Nt{"use strict";var ve=Math.log(2),Zt=rr.exports,Qt=ct(6224);function zt(Mt){return 1-Math.abs(Mt)}rr.exports.getUnifiedMinMax=function(Mt,Vt){return Zt.getUnifiedMinMaxMulti([Mt],Vt)},rr.exports.getUnifiedMinMaxMulti=function(Mt,Vt){var se=!1,ne=!1,me=Qt.isNumber((Vt=Vt||{}).width)?Vt.width:2,Dt=Qt.isNumber(Vt.size)?Vt.size:50,Ct=Qt.isNumber(Vt.min)?Vt.min:(se=!0,Qt.findMinMulti(Mt)),ut=Qt.isNumber(Vt.max)?Vt.max:(ne=!0,Qt.findMaxMulti(Mt)),Yt=(ut-Ct)/(Dt-1);return se&&(Ct-=2*me*Yt),ne&&(ut+=2*me*Yt),{min:Ct,max:ut}},rr.exports.create=function(Mt,Vt){if(!Mt||0===Mt.length)return[];var se=Qt.isNumber((Vt=Vt||{}).size)?Vt.size:50,ne=Qt.isNumber(Vt.width)?Vt.width:2,me=Zt.getUnifiedMinMax(Mt,{size:se,width:ne,min:Vt.min,max:Vt.max}),Dt=me.min,ut=me.max-Dt,dt=ut/(se-1);if(0===ut)return[{x:Dt,y:1}];for(var Yt=[],Ut=0;Ut=Yt.length)){var ye=Math.max(Ht-ne,0),qt=Ht,Jt=Math.min(Ht+ne,Yt.length-1),kt=ye-(Ht-ne),te=$/($-(yt[-ne-1+kt]||0)-(yt[-ne-1+(Ht+ne-Jt)]||0));kt>0&&(gt+=te*(kt-1)*C);var he=Math.max(0,Ht-ne+1);Qt.inside(0,Yt.length-1,he)&&(Yt[he].y+=1*te*C),Qt.inside(0,Yt.length-1,qt+1)&&(Yt[qt+1].y-=2*te*C),Qt.inside(0,Yt.length-1,Jt+1)&&(Yt[Jt+1].y+=1*te*C)}});var At=gt,Kt=0,oe=0;return Yt.forEach(function(Rt){Rt.y=At+=Kt+=Rt.y,oe+=At}),oe>0&&Yt.forEach(function(Rt){Rt.y/=oe}),Yt},rr.exports.getExpectedValueFromPdf=function(Mt){if(Mt&&0!==Mt.length){var Vt=0;return Mt.forEach(function(se){Vt+=se.x*se.y}),Vt}},rr.exports.getXWithLeftTailArea=function(Mt,Vt){if(Mt&&0!==Mt.length){for(var se=0,ne=0,me=0;me=Vt));me++);return Mt[ne].x}},rr.exports.getPerplexity=function(Mt){if(Mt&&0!==Mt.length){var Vt=0;return Mt.forEach(function(se){var ne=Math.log(se.y);isFinite(ne)&&(Vt+=se.y*ne)}),Vt=-Vt/ve,Math.pow(2,Vt)}}},8836:(rr,be)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.SensorTabIndex=be.SensorClassName=be.SizeSensorId=void 0,be.SizeSensorId="size-sensor-id",be.SensorClassName="size-sensor-object",be.SensorTabIndex="-1"},1920:(rr,be)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.default=void 0,be.default=function(Nt){var ve=arguments.length>1&&void 0!==arguments[1]?arguments[1]:60,Zt=null;return function(){for(var Qt=this,zt=arguments.length,Bt=new Array(zt),Mt=0;Mt{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.default=void 0;var ct=1;be.default=function(){return"".concat(ct++)}},1909:(rr,be,ct)=>{"use strict";be.ak=void 0;var Nt=ct(53);be.ak=function(Bt,Mt){var Vt=(0,Nt.getSensor)(Bt);return Vt.bind(Mt),function(){Vt.unbind(Mt)}}},53:(rr,be,ct)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.removeSensor=be.getSensor=void 0;var ae=function Zt(Mt){return Mt&&Mt.__esModule?Mt:{default:Mt}}(ct(595)),Nt=ct(627),ve=ct(8836),Qt={};be.getSensor=function(Vt){var se=Vt.getAttribute(ve.SizeSensorId);if(se&&Qt[se])return Qt[se];var ne=(0,ae.default)();Vt.setAttribute(ve.SizeSensorId,ne);var me=(0,Nt.createSensor)(Vt);return Qt[ne]=me,me},be.removeSensor=function(Vt){var se=Vt.element.getAttribute(ve.SizeSensorId);Vt.element.removeAttribute(ve.SizeSensorId),Vt.destroy(),se&&Qt[se]&&delete Qt[se]}},627:(rr,be,ct)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.createSensor=void 0;var ae=ct(1463),Nt=ct(4534),ve=typeof ResizeObserver<"u"?Nt.createSensor:ae.createSensor;be.createSensor=ve},1463:(rr,be,ct)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.createSensor=void 0;var ae=function ve(Qt){return Qt&&Qt.__esModule?Qt:{default:Qt}}(ct(1920)),Nt=ct(8836);be.createSensor=function(zt){var Bt=void 0,Mt=[],se=(0,ae.default)(function(){Mt.forEach(function(Ct){Ct(zt)})}),me=function(){Bt&&Bt.parentNode&&(Bt.contentDocument&&Bt.contentDocument.defaultView.removeEventListener("resize",se),Bt.parentNode.removeChild(Bt),Bt=void 0,Mt=[])};return{element:zt,bind:function(ut){Bt||(Bt=function(){"static"===getComputedStyle(zt).position&&(zt.style.position="relative");var ut=document.createElement("object");return ut.onload=function(){ut.contentDocument.defaultView.addEventListener("resize",se),se()},ut.style.display="block",ut.style.position="absolute",ut.style.top="0",ut.style.left="0",ut.style.height="100%",ut.style.width="100%",ut.style.overflow="hidden",ut.style.pointerEvents="none",ut.style.zIndex="-1",ut.style.opacity="0",ut.setAttribute("class",Nt.SensorClassName),ut.setAttribute("tabindex",Nt.SensorTabIndex),ut.type="text/html",zt.appendChild(ut),ut.data="about:blank",ut}()),-1===Mt.indexOf(ut)&&Mt.push(ut)},destroy:me,unbind:function(ut){var dt=Mt.indexOf(ut);-1!==dt&&Mt.splice(dt,1),0===Mt.length&&Bt&&me()}}}},4534:(rr,be,ct)=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.createSensor=void 0;var ae=function Nt(Zt){return Zt&&Zt.__esModule?Zt:{default:Zt}}(ct(1920));be.createSensor=function(Qt){var zt=void 0,Bt=[],Mt=(0,ae.default)(function(){Bt.forEach(function(Dt){Dt(Qt)})}),ne=function(){zt.disconnect(),Bt=[],zt=void 0};return{element:Qt,bind:function(Ct){zt||(zt=function(){var Ct=new ResizeObserver(Mt);return Ct.observe(Qt),Mt(),Ct}()),-1===Bt.indexOf(Ct)&&Bt.push(Ct)},destroy:ne,unbind:function(Ct){var ut=Bt.indexOf(Ct);-1!==ut&&Bt.splice(ut,1),0===Bt.length&&zt&&ne()}}}}}]);




    © 2015 - 2024 Weber Informatics LLC | Privacy Policy