(self["webpackChunkyos_manage"]=self["webpackChunkyos_manage"]||[]).push([[443],{90494:function(t,e){"use strict";var n="*",r=function(){function t(){this._events={}}return t.prototype.on=function(t,e,n){return this._events[t]||(this._events[t]=[]),this._events[t].push({callback:e,once:!!n}),this},t.prototype.once=function(t,e){return this.on(t,e,!0)},t.prototype.emit=function(t){for(var e=this,r=[],i=1;i=0&&e._call.call(null,t),e=e._next;--d}function A(){m=(g=y.now())+v,d=h=0;try{S()}finally{d=0,E(),m=0}}function k(){var t=y.now(),e=t-g;e>p&&(v-=e,g=t)}function E(){var t,e,n=i,r=1/0;while(n)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:i=e);a=t,D(r)}function D(t){if(!d){h&&(h=clearTimeout(h));var e=t-m;e>24?(t<1/0&&(h=setTimeout(A,t-y.now()-v)),f&&(f=clearInterval(f))):(f||(g=y.now(),f=setInterval(k,p)),d=1,b(A))}}function F(t){return+t}function M(t){return t*t}function O(t){return t*(2-t)}function B(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function T(t){return t*t*t}function P(t){return--t*t*t+1}function I(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}_.prototype=C.prototype={constructor:_,restart:function(t,e,n){if("function"!==typeof t)throw new TypeError("callback is not a function");n=(null==n?x():+n)+(null==e?0:+e),this._next||a===this||(a?a._next=this:i=this,a=this),this._call=t,this._time=n,D()},stop:function(){this._call&&(this._call=null,this._time=1/0,D())}};var L=3,R=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(L),N=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(L),z=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(L),j=Math.PI,$=j/2;function V(t){return 1===+t?1:1-Math.cos(t*$)}function q(t){return Math.sin(t*$)}function H(t){return(1-Math.cos(j*t))/2}function U(t){return 1.0009775171065494*(Math.pow(2,-10*t)-.0009765625)}function G(t){return U(1-+t)}function W(t){return 1-U(t)}function Z(t){return((t*=2)<=1?U(1-t):2-U(t-1))/2}function X(t){return 1-Math.sqrt(1-t*t)}function Y(t){return Math.sqrt(1- --t*t)}function K(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var Q=4/11,J=6/11,tt=8/11,et=3/4,nt=9/11,rt=10/11,it=15/16,at=21/22,ot=63/64,st=1/Q/Q;function lt(t){return 1-ut(1-t)}function ut(t){return(t=+t)>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Vt(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Vt(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Mt.exec(t))?new Ut(e[1],e[2],e[3],1):(e=Ot.exec(t))?new Ut(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Bt.exec(t))?Vt(e[1],e[2],e[3],e[4]):(e=Tt.exec(t))?Vt(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Pt.exec(t))?Xt(e[1],e[2]/100,e[3]/100,1):(e=It.exec(t))?Xt(e[1],e[2]/100,e[3]/100,e[4]):Lt.hasOwnProperty(t)?$t(Lt[t]):"transparent"===t?new Ut(NaN,NaN,NaN,0):null}function $t(t){return new Ut(t>>16&255,t>>8&255,255&t,1)}function Vt(t,e,n,r){return r<=0&&(t=e=n=NaN),new Ut(t,e,n,r)}function qt(t){return t instanceof Ct||(t=jt(t)),t?(t=t.rgb(),new Ut(t.r,t.g,t.b,t.opacity)):new Ut}function Ht(t,e,n,r){return 1===arguments.length?qt(t):new Ut(t,e,n,null==r?1:r)}function Ut(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Gt(){return"#"+Zt(this.r)+Zt(this.g)+Zt(this.b)}function Wt(){var t=this.opacity;return t=isNaN(t)?1:Math.max(0,Math.min(1,t)),(1===t?"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===t?")":", "+t+")")}function Zt(t){return t=Math.max(0,Math.min(255,Math.round(t)||0)),(t<16?"0":"")+t.toString(16)}function Xt(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Qt(t,e,n,r)}function Yt(t){if(t instanceof Qt)return new Qt(t.h,t.s,t.l,t.opacity);if(t instanceof Ct||(t=jt(t)),!t)return new Qt;if(t instanceof Qt)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,l=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n0&&l<1?0:o,new Qt(o,s,l,t.opacity)}function Kt(t,e,n,r){return 1===arguments.length?Yt(t):new Qt(t,e,n,null==r?1:r)}function Qt(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Jt(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function te(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}function ee(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r=240?t-240:t+120,i,r),Jt(t,i,r),Jt(t<120?t+240:t-120,i,r),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 t=this.opacity;return t=isNaN(t)?1:Math.max(0,Math.min(1,t)),(1===t?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var le=function t(e){var n=oe(e);function r(t,e){var r=n((t=Ht(t)).r,(e=Ht(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=se(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function ue(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;na&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,l.push({i:o,x:ge(n,r)})),a=ye.lastIndex;return au.length?(l=Ce.parsePathString(a[s]),u=Ce.parsePathString(i[s]),u=Ce.fillPathByDiff(u,l),u=Ce.formatPath(u,l),e.fromAttrs.path=u,e.toAttrs.path=l):e.pathFormatted||(l=Ce.parsePathString(a[s]),u=Ce.parsePathString(i[s]),u=Ce.formatPath(u,l),e.fromAttrs.path=u,e.toAttrs.path=l,e.pathFormatted=!0),r[s]=[];for(var d=0;d0){for(var o=r.animators.length-1;o>=0;o--)if(t=r.animators[o],t.destroyed)r.removeAnimator(o);else{if(!t.isAnimatePaused()){e=t.get("animations");for(var s=e.length-1;s>=0;s--)n=e[s],i=De(t,n,a),i&&(e.splice(s,1),i=!1,n.callback&&n.callback())}0===e.length&&r.removeAnimator(o)}var l=r.canvas.get("autoDraw");l||r.canvas.draw()}}))},t.prototype.addAnimator=function(t){this.animators.push(t)},t.prototype.removeAnimator=function(t){this.animators.splice(t,1)},t.prototype.isAnimating=function(){return!!this.animators.length},t.prototype.stop=function(){this.timer&&this.timer.stop()},t.prototype.stopAllAnimations=function(t){void 0===t&&(t=!0),this.animators.forEach((function(e){e.stopAnimate(t)})),this.animators=[],this.canvas.draw()},t.prototype.getTime=function(){return this.current},t}(),Me=Fe,Oe=n(89473),Be=40,Te=0,Pe=["mousedown","mouseup","dblclick","mouseout","mouseover","mousemove","mouseleave","mouseenter","touchstart","touchmove","touchend","dragenter","dragover","dragleave","drop","contextmenu","mousewheel"];function Ie(t,e,n){n.name=e,n.target=t,n.currentTarget=t,n.delegateTarget=t,t.emit(e,n)}function Le(t,e,n){if(n.bubbles){var r=void 0,i=!1;if("mouseenter"===e?(r=n.fromShape,i=!0):"mouseleave"===e&&(i=!0,r=n.toShape),t.isCanvas()&&i)return;if(r&&(0,u.UY)(t,r))return void(n.bubbles=!1);n.name=e,n.currentTarget=t,n.delegateTarget=t,t.emit(e,n)}}var Re=function(){function t(t){var e=this;this.draggingShape=null,this.dragging=!1,this.currentShape=null,this.mousedownShape=null,this.mousedownPoint=null,this._eventCallback=function(t){var n=t.type;e._triggerEvent(n,t)},this._onDocumentMove=function(t){var n=e.canvas,r=n.get("el");if(r!==t.target&&(e.dragging||e.currentShape)){var i=e._getPointInfo(t);e.dragging&&e._emitEvent("drag",t,i,e.draggingShape)}},this._onDocumentMouseUp=function(t){var n=e.canvas,r=n.get("el");if(r!==t.target&&e.dragging){var i=e._getPointInfo(t);e.draggingShape&&e._emitEvent("drop",t,i,null),e._emitEvent("dragend",t,i,e.draggingShape),e._afterDrag(e.draggingShape,i,t)}},this.canvas=t.canvas}return t.prototype.init=function(){this._bindEvents()},t.prototype._bindEvents=function(){var t=this,e=this.canvas.get("el");(0,u.S6)(Pe,(function(n){e.addEventListener(n,t._eventCallback)})),document&&(document.addEventListener("mousemove",this._onDocumentMove),document.addEventListener("mouseup",this._onDocumentMouseUp))},t.prototype._clearEvents=function(){var t=this,e=this.canvas.get("el");(0,u.S6)(Pe,(function(n){e.removeEventListener(n,t._eventCallback)})),document&&(document.removeEventListener("mousemove",this._onDocumentMove),document.removeEventListener("mouseup",this._onDocumentMouseUp))},t.prototype._getEventObj=function(t,e,n,r,i,a){var o=new Oe.Z(t,e);return o.fromShape=i,o.toShape=a,o.x=n.x,o.y=n.y,o.clientX=n.clientX,o.clientY=n.clientY,o.propagationPath.push(r),o},t.prototype._getShape=function(t,e){return this.canvas.getShape(t.x,t.y,e)},t.prototype._getPointInfo=function(t){var e=this.canvas,n=e.getClientByEvent(t),r=e.getPointByEvent(t);return{x:r.x,y:r.y,clientX:n.x,clientY:n.y}},t.prototype._triggerEvent=function(t,e){var n=this._getPointInfo(e),r=this._getShape(n,e),i=this["_on"+t],a=!1;if(i)i.call(this,n,r,e);else{var o=this.currentShape;"mouseenter"===t||"dragenter"===t||"mouseover"===t?(this._emitEvent(t,e,n,null,null,r),r&&this._emitEvent(t,e,n,r,null,r),"mouseenter"===t&&this.draggingShape&&this._emitEvent("dragenter",e,n,null)):"mouseleave"===t||"dragleave"===t||"mouseout"===t?(a=!0,o&&this._emitEvent(t,e,n,o,o,null),this._emitEvent(t,e,n,null,o,null),"mouseleave"===t&&this.draggingShape&&this._emitEvent("dragleave",e,n,null)):this._emitEvent(t,e,n,r,null,null)}if(a||(this.currentShape=r),r&&!r.get("destroyed")){var s=this.canvas,l=s.get("el");l.style.cursor=r.attr("cursor")||s.get("cursor")}},t.prototype._onmousedown=function(t,e,n){n.button===Te&&(this.mousedownShape=e,this.mousedownPoint=t,this.mousedownTimeStamp=n.timeStamp),this._emitEvent("mousedown",n,t,e,null,null)},t.prototype._emitMouseoverEvents=function(t,e,n,r){var i=this.canvas.get("el");n!==r&&(n&&(this._emitEvent("mouseout",t,e,n,n,r),this._emitEvent("mouseleave",t,e,n,n,r),r&&!r.get("destroyed")||(i.style.cursor=this.canvas.get("cursor"))),r&&(this._emitEvent("mouseover",t,e,r,n,r),this._emitEvent("mouseenter",t,e,r,n,r)))},t.prototype._emitDragoverEvents=function(t,e,n,r,i){r?(r!==n&&(n&&this._emitEvent("dragleave",t,e,n,n,r),this._emitEvent("dragenter",t,e,r,n,r)),i||this._emitEvent("dragover",t,e,r)):n&&this._emitEvent("dragleave",t,e,n,n,r),i&&this._emitEvent("dragover",t,e,r)},t.prototype._afterDrag=function(t,e,n){t&&(t.set("capture",!0),this.draggingShape=null),this.dragging=!1;var r=this._getShape(e,n);r!==t&&this._emitMouseoverEvents(n,e,t,r),this.currentShape=r},t.prototype._onmouseup=function(t,e,n){if(n.button===Te){var r=this.draggingShape;this.dragging?(r&&this._emitEvent("drop",n,t,e),this._emitEvent("dragend",n,t,r),this._afterDrag(r,t,n)):(this._emitEvent("mouseup",n,t,e),e===this.mousedownShape&&this._emitEvent("click",n,t,e),this.mousedownShape=null,this.mousedownPoint=null)}},t.prototype._ondragover=function(t,e,n){n.preventDefault();var r=this.currentShape;this._emitDragoverEvents(n,t,r,e,!0)},t.prototype._onmousemove=function(t,e,n){var r=this.canvas,i=this.currentShape,a=this.draggingShape;if(this.dragging)a&&this._emitDragoverEvents(n,t,i,e,!1),this._emitEvent("drag",n,t,a);else{var o=this.mousedownPoint;if(o){var s=this.mousedownShape,l=n.timeStamp,u=l-this.mousedownTimeStamp,c=o.clientX-t.clientX,d=o.clientY-t.clientY,h=c*c+d*d;u>120||h>Be?s&&s.get("draggable")?(a=this.mousedownShape,a.set("capture",!1),this.draggingShape=a,this.dragging=!0,this._emitEvent("dragstart",n,t,a),this.mousedownShape=null,this.mousedownPoint=null):!s&&r.get("draggable")?(this.dragging=!0,this._emitEvent("dragstart",n,t,null),this.mousedownShape=null,this.mousedownPoint=null):(this._emitMouseoverEvents(n,t,i,e),this._emitEvent("mousemove",n,t,e)):(this._emitMouseoverEvents(n,t,i,e),this._emitEvent("mousemove",n,t,e))}else this._emitMouseoverEvents(n,t,i,e),this._emitEvent("mousemove",n,t,e)}},t.prototype._emitEvent=function(t,e,n,r,i,a){var o=this._getEventObj(t,e,n,r,i,a);if(r){o.shape=r,Ie(r,t,o);var s=r.getParent();while(s)s.emitDelegation(t,o),o.propagationStopped||Le(s,t,o),o.propagationPath.push(s),s=s.getParent()}else{var l=this.canvas;Ie(l,t,o)}},t.prototype.destroy=function(){this._clearEvents(),this.canvas=null,this.currentShape=null,this.draggingShape=null,this.mousedownPoint=null,this.mousedownShape=null,this.mousedownTimeStamp=null},t}(),Ne=Re,ze="px",je=(0,s.qY)(),$e=je&&"firefox"===je.name,Ve=function(t){function e(e){var n=t.call(this,e)||this;return n.initContainer(),n.initDom(),n.initEvents(),n.initTimeline(),n}return(0,o.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e["cursor"]="default",e["supportCSSTransform"]=!1,e},e.prototype.initContainer=function(){var t=this.get("container");(0,u.HD)(t)&&(t=document.getElementById(t),this.set("container",t))},e.prototype.initDom=function(){var t=this.createDom();this.set("el",t);var e=this.get("container");e.appendChild(t),this.setDOMSize(this.get("width"),this.get("height"))},e.prototype.initEvents=function(){var t=new Ne({canvas:this});t.init(),this.set("eventController",t)},e.prototype.initTimeline=function(){var t=new Me(this);this.set("timeline",t)},e.prototype.setDOMSize=function(t,e){var n=this.get("el");u.jU&&(n.style.width=t+ze,n.style.height=e+ze)},e.prototype.changeSize=function(t,e){this.setDOMSize(t,e),this.set("width",t),this.set("height",e),this.onCanvasChange("changeSize")},e.prototype.getRenderer=function(){return this.get("renderer")},e.prototype.getCursor=function(){return this.get("cursor")},e.prototype.setCursor=function(t){this.set("cursor",t);var e=this.get("el");u.jU&&e&&(e.style.cursor=t)},e.prototype.getPointByEvent=function(t){var e=this.get("supportCSSTransform");if(e){if($e&&!(0,u.kK)(t.layerX)&&t.layerX!==t.offsetX)return{x:t.layerX,y:t.layerY};if(!(0,u.kK)(t.offsetX))return{x:t.offsetX,y:t.offsetY}}var n=this.getClientByEvent(t),r=n.x,i=n.y;return this.getPointByClient(r,i)},e.prototype.getClientByEvent=function(t){var e=t;return t.touches&&(e="touchend"===t.type?t.changedTouches[0]:t.touches[0]),{x:e.clientX,y:e.clientY}},e.prototype.getPointByClient=function(t,e){var n=this.get("el"),r=n.getBoundingClientRect();return{x:t-r.left,y:e-r.top}},e.prototype.getClientByPoint=function(t,e){var n=this.get("el"),r=n.getBoundingClientRect();return{x:t+r.left,y:e+r.top}},e.prototype.draw=function(){},e.prototype.removeDom=function(){var t=this.get("el");t.parentNode.removeChild(t)},e.prototype.clearEvents=function(){var t=this.get("eventController");t.destroy()},e.prototype.isCanvas=function(){return!0},e.prototype.getParent=function(){return null},e.prototype.destroy=function(){var e=this.get("timeline");this.get("destroyed")||(this.clear(),e&&e.stop(),this.clearEvents(),this.removeDom(),t.prototype.destroy.call(this))},e}(l.Z),qe=Ve},37153:function(t,e,n){"use strict";var r=n(70655),i=n(13810),a=n(29881),o=n(77341),s={},l="_INDEX";function u(t,e){if(t.set("canvas",e),t.isGroup()){var n=t.get("children");n.length&&n.forEach((function(t){u(t,e)}))}}function c(t,e){if(t.set("timeline",e),t.isGroup()){var n=t.get("children");n.length&&n.forEach((function(t){c(t,e)}))}}function d(t,e,n){void 0===n&&(n=!0),n?e.destroy():(e.set("parent",null),e.set("canvas",null)),(0,o.As)(t.getChildren(),e)}function h(t){return function(e,n){var r=t(e,n);return 0===r?e[l]-n[l]:r}}var f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,r.__extends)(e,t),e.prototype.isCanvas=function(){return!1},e.prototype.getBBox=function(){var t=1/0,e=-1/0,n=1/0,r=-1/0,a=[],s=[],l=this.getChildren().filter((function(t){return t.get("visible")&&(!t.isGroup()||t.isGroup()&&t.getChildren().length>0)}));l.length>0?((0,o.S6)(l,(function(t){var e=t.getBBox();a.push(e.minX,e.maxX),s.push(e.minY,e.maxY)})),t=(0,i.min)(a),e=(0,i.max)(a),n=(0,i.min)(s),r=(0,i.max)(s)):(t=0,e=0,n=0,r=0);var u={x:t,y:n,minX:t,minY:n,maxX:e,maxY:r,width:e-t,height:r-n};return u},e.prototype.getCanvasBBox=function(){var t=1/0,e=-1/0,n=1/0,r=-1/0,a=[],s=[],l=this.getChildren().filter((function(t){return t.get("visible")&&(!t.isGroup()||t.isGroup()&&t.getChildren().length>0)}));l.length>0?((0,o.S6)(l,(function(t){var e=t.getCanvasBBox();a.push(e.minX,e.maxX),s.push(e.minY,e.maxY)})),t=(0,i.min)(a),e=(0,i.max)(a),n=(0,i.min)(s),r=(0,i.max)(s)):(t=0,e=0,n=0,r=0);var u={x:t,y:n,minX:t,minY:n,maxX:e,maxY:r,width:e-t,height:r-n};return u},e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e["children"]=[],e},e.prototype.onAttrChange=function(e,n,r){if(t.prototype.onAttrChange.call(this,e,n,r),"matrix"===e){var i=this.getTotalMatrix();this._applyChildrenMarix(i)}},e.prototype.applyMatrix=function(e){var n=this.getTotalMatrix();t.prototype.applyMatrix.call(this,e);var r=this.getTotalMatrix();r!==n&&this._applyChildrenMarix(r)},e.prototype._applyChildrenMarix=function(t){var e=this.getChildren();(0,o.S6)(e,(function(e){e.applyMatrix(t)}))},e.prototype.addShape=function(){for(var t=[],e=0;e=0;a--){var s=t[a];if((0,o.pP)(s)&&(s.isGroup()?i=s.getShape(e,n,r):s.isHit(e,n)&&(i=s)),i)break}return i},e.prototype.add=function(t){var e=this.getCanvas(),n=this.getChildren(),r=this.get("timeline"),i=t.getParent();i&&d(i,t,!1),t.set("parent",this),e&&u(t,e),r&&c(t,r),n.push(t),t.onCanvasChange("add"),this._applyElementMatrix(t)},e.prototype._applyElementMatrix=function(t){var e=this.getTotalMatrix();e&&t.applyMatrix(e)},e.prototype.getChildren=function(){return this.get("children")},e.prototype.sort=function(){var t=this.getChildren();(0,o.S6)(t,(function(t,e){return t[l]=e,t})),t.sort(h((function(t,e){return t.get("zIndex")-e.get("zIndex")}))),this.onCanvasChange("sort")},e.prototype.clear=function(){if(this.set("clearing",!0),!this.destroyed){for(var t=this.getChildren(),e=t.length-1;e>=0;e--)t[e].destroy();this.set("children",[]),this.onCanvasChange("clear"),this.set("clearing",!1)}},e.prototype.destroy=function(){this.get("destroyed")||(this.clear(),t.prototype.destroy.call(this))},e.prototype.getFirst=function(){return this.getChildByIndex(0)},e.prototype.getLast=function(){var t=this.getChildren();return this.getChildByIndex(t.length-1)},e.prototype.getChildByIndex=function(t){var e=this.getChildren();return e[t]},e.prototype.getCount=function(){var t=this.getChildren();return t.length},e.prototype.contain=function(t){var e=this.getChildren();return e.indexOf(t)>-1},e.prototype.removeChild=function(t,e){void 0===e&&(e=!0),this.contain(t)&&t.remove(e)},e.prototype.findAll=function(t){var e=[],n=this.getChildren();return(0,o.S6)(n,(function(n){t(n)&&e.push(n),n.isGroup()&&(e=e.concat(n.findAll(t)))})),e},e.prototype.find=function(t){var e=null,n=this.getChildren();return(0,o.S6)(n,(function(n){if(t(n)?e=n:n.isGroup()&&(e=n.find(t)),e)return!1})),e},e.prototype.findById=function(t){return this.find((function(e){return e.get("id")===t}))},e.prototype.findByClassName=function(t){return this.find((function(e){return e.get("className")===t}))},e.prototype.findAllByName=function(t){return this.findAll((function(e){return e.get("name")===t}))},e}(a.Z);e["Z"]=f},29881:function(t,e,n){"use strict";var r=n(70655),i=n(13810),a=n(31506),o=n(77341),s=n(41482),l=n(2667),u=a.transform,c="matrix",d=["zIndex","capture","visible","type"],h=["repeat"],f=":",p="*";function g(t){for(var e=[],n=0;nt.delay&&(0,i.each)(e.toAttrs,(function(e,n){o.call(t.toAttrs,n)&&(delete t.toAttrs[n],delete t.fromAttrs[n])}))})),t}var b=function(t){function e(e){var n=t.call(this,e)||this;n.attrs={};var r=n.getDefaultAttrs();return(0,i.mix)(r,e.attrs),n.attrs=r,n.initAttrs(r),n.initAnimate(),n}return(0,r.__extends)(e,t),e.prototype.getDefaultCfg=function(){return{visible:!0,capture:!0,zIndex:0}},e.prototype.getDefaultAttrs=function(){return{matrix:this.getDefaultMatrix(),opacity:1}},e.prototype.onCanvasChange=function(t){},e.prototype.initAttrs=function(t){},e.prototype.initAnimate=function(){this.set("animable",!0),this.set("animating",!1)},e.prototype.isGroup=function(){return!1},e.prototype.getParent=function(){return this.get("parent")},e.prototype.getCanvas=function(){return this.get("canvas")},e.prototype.attr=function(){for(var t,e=[],n=0;n0?r=y(r,_):n.addAnimator(this),r.push(_),this.set("animations",r),this.set("_pause",{isPaused:!1})}},e.prototype.stopAnimate=function(t){var e=this;void 0===t&&(t=!0);var n=this.get("animations");(0,i.each)(n,(function(n){t&&(n.onFrame?e.attr(n.onFrame(1)):e.attr(n.toAttrs)),n.callback&&n.callback()})),this.set("animating",!1),this.set("animations",[])},e.prototype.pauseAnimate=function(){var t=this.get("timeline"),e=this.get("animations"),n=t.getTime();return(0,i.each)(e,(function(t){t._paused=!0,t._pauseTime=n,t.pauseCallback&&t.pauseCallback()})),this.set("_pause",{isPaused:!0,pauseTime:n}),this},e.prototype.resumeAnimate=function(){var t=this.get("timeline"),e=t.getTime(),n=this.get("animations"),r=this.get("_pause").pauseTime;return(0,i.each)(n,(function(t){t.startTime=t.startTime+(e-r),t._paused=!1,t._pauseTime=null,t.resumeCallback&&t.resumeCallback()})),this.set("_pause",{isPaused:!1}),this.set("animations",n),this},e.prototype.emitDelegation=function(t,e){var n,r=this,a=e.propagationPath;this.getEvents();"mouseenter"===t?n=e.fromShape:"mouseleave"===t&&(n=e.toShape);for(var s=function(t){var s=a[t],u=s.get("name");if(u){if((s.isGroup()||s.isCanvas&&s.isCanvas())&&n&&(0,o.UY)(s,n))return"break";(0,i.isArray)(u)?(0,i.each)(u,(function(t){r.emitDelegateEvent(s,t,e)})):l.emitDelegateEvent(s,u,e)}},l=this,u=0;u=t&&n.minY<=e&&n.maxY>=e},e.prototype.afterAttrsChange=function(e){t.prototype.afterAttrsChange.call(this,e),this.clearCacheBBox()},e.prototype.getBBox=function(){var t=this.cfg.bbox;return t||(t=this.calculateBBox(),this.set("bbox",t)),t},e.prototype.getCanvasBBox=function(){var t=this.cfg.canvasBBox;return t||(t=this.calculateCanvasBBox(),this.set("canvasBBox",t)),t},e.prototype.applyMatrix=function(e){t.prototype.applyMatrix.call(this,e),this.set("canvasBBox",null)},e.prototype.calculateCanvasBBox=function(){var t=this.getBBox(),e=this.getTotalMatrix(),n=t.minX,r=t.minY,i=t.maxX,o=t.maxY;if(e){var s=(0,a.rG)(e,[t.minX,t.minY]),l=(0,a.rG)(e,[t.maxX,t.minY]),u=(0,a.rG)(e,[t.minX,t.maxY]),c=(0,a.rG)(e,[t.maxX,t.maxY]);n=Math.min(s[0],l[0],u[0],c[0]),i=Math.max(s[0],l[0],u[0],c[0]),r=Math.min(s[1],l[1],u[1],c[1]),o=Math.max(s[1],l[1],u[1],c[1])}var d=this.attrs;if(d.shadowColor){var h=d.shadowBlur,f=void 0===h?0:h,p=d.shadowOffsetX,g=void 0===p?0:p,m=d.shadowOffsetY,v=void 0===m?0:m,y=n-f+g,b=i+f+g,x=r-f+v,w=o+f+v;n=Math.min(n,y),i=Math.max(i,b),r=Math.min(r,x),o=Math.max(o,w)}return{x:n,y:r,minX:n,minY:r,maxX:i,maxY:o,width:i-n,height:o-r}},e.prototype.clearCacheBBox=function(){this.set("bbox",null),this.set("canvasBBox",null)},e.prototype.isClipShape=function(){return this.get("isClipShape")},e.prototype.isInShape=function(t,e){return!1},e.prototype.isOnlyHitBox=function(){return!1},e.prototype.isHit=function(t,e){var n=this.get("startArrowShape"),r=this.get("endArrowShape"),i=[t,e,1];i=this.invertFromMatrix(i);var a=i[0],o=i[1],s=this._isInBBox(a,o);if(this.isOnlyHitBox())return s;if(s&&!this.isClipped(a,o)){if(this.isInShape(a,o))return!0;if(n&&n.isHit(a,o))return!0;if(r&&r.isHit(a,o))return!0}return!1},e}(i.Z);e["Z"]=o},46556:function(t,e,n){"use strict";n.d(e,{b:function(){return a},W:function(){return i}});var r=new Map;function i(t,e){r.set(t,e)}function a(t){return r.get(t)}function o(t){var e=t.attr(),n=e.x,r=e.y,i=e.width,a=e.height;return{x:n,y:r,width:i,height:a}}function s(t){var e=t.attr(),n=e.x,r=e.y,i=e.r;return{x:n-i,y:r-i,width:2*i,height:2*i}}var l=n(32793);function u(t,e){return t&&e?{minX:Math.min(t.minX,e.minX),minY:Math.min(t.minY,e.minY),maxX:Math.max(t.maxX,e.maxX),maxY:Math.max(t.maxY,e.maxY)}:t||e}function c(t,e){var n=t.get("startArrowShape"),r=t.get("endArrowShape"),i=null,a=null;return n&&(i=n.getCanvasBBox(),e=u(e,i)),r&&(a=r.getCanvasBBox(),e=u(e,a)),e}function d(t){for(var e=t.attr(),n=e.points,r=[],i=[],a=0;aMath.PI/2?Math.PI-u:u,c=c>Math.PI/2?Math.PI-c:c;var d={xExtra:Math.cos(l/2-u)*(e/2*(1/Math.sin(l/2)))-e/2||0,yExtra:Math.cos(c-l/2)*(e/2*(1/Math.sin(l/2)))-e/2||0};return d}function b(t){var e=t.attr(),n=e.path,r=e.stroke,i=r?e.lineWidth:0,a=t.get("segments")||(0,g.zx)(n),o=v(a,i),s=o.x,l=o.y,u=o.width,d=o.height,h={minX:s,minY:l,maxX:s+u,maxY:l+d};return h=c(t,h),{x:h.minX,y:h.minY,width:h.maxX-h.minX,height:h.maxY-h.minY}}function x(t){var e=t.attr(),n=e.x1,r=e.y1,i=e.x2,a=e.y2,o=Math.min(n,i),s=Math.max(n,i),l=Math.min(r,a),u=Math.max(r,a),d={minX:o,maxX:s,minY:l,maxY:u};return d=c(t,d),{x:d.minX,y:d.minY,width:d.maxX-d.minX,height:d.maxY-d.minY}}function w(t){var e=t.attr(),n=e.x,r=e.y,i=e.rx,a=e.ry;return{x:n-i,y:r-a,width:2*i,height:2*a}}i("rect",o),i("image",o),i("circle",s),i("marker",s),i("polyline",d),i("polygon",h),i("text",p),i("path",b),i("line",x),i("ellipse",w)},89473:function(t,e){"use strict";var n=function(){function t(t,e){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=t,this.name=t,this.originalEvent=e,this.timeStamp=e.timeStamp}return t.prototype.preventDefault=function(){this.defaultPrevented=!0,this.originalEvent.preventDefault&&this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.toString=function(){var t=this.type;return"[Event (type="+t+")]"},t.prototype.save=function(){},t.prototype.restore=function(){},t}();e["Z"]=n},98190:function(t,e,n){"use strict";n.r(e),n.d(e,{Event:function(){return l.Z},Base:function(){return u.Z},AbstractCanvas:function(){return c.Z},AbstractGroup:function(){return d.Z},AbstractShape:function(){return h.Z},PathUtil:function(){return r},getBBoxMethod:function(){return f.b},registerBBox:function(){return f.W},getTextHeight:function(){return p.FE},assembleFont:function(){return p.$O},isAllowCapture:function(){return g.pP},multiplyVec2:function(){return m.rG},invert:function(){return m.U_},getOffScreenContext:function(){return v.L},version:function(){return y}});var r=n(47575),i=n(52),a={};for(var o in i)["default","Event","Base","AbstractCanvas","AbstractGroup","AbstractShape","PathUtil","getBBoxMethod","registerBBox","getTextHeight","assembleFont","isAllowCapture","multiplyVec2","invert","getOffScreenContext","version"].indexOf(o)<0&&(a[o]=function(t){return i[t]}.bind(0,o));n.d(e,a);var s=n(15294);a={};for(var o in s)["default","Event","Base","AbstractCanvas","AbstractGroup","AbstractShape","PathUtil","getBBoxMethod","registerBBox","getTextHeight","assembleFont","isAllowCapture","multiplyVec2","invert","getOffScreenContext","version"].indexOf(o)<0&&(a[o]=function(t){return s[t]}.bind(0,o));n.d(e,a);var l=n(89473),u=n(2667),c=n(71862),d=n(31841),h=n(15032),f=n(46556),p=n(8723),g=n(77341),m=n(41482),v=n(67052),y="0.5.9"},15294:function(){},52:function(){},41482:function(t,e,n){"use strict";function r(t,e){var n=[],r=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],d=t[8],h=e[0],f=e[1],p=e[2],g=e[3],m=e[4],v=e[5],y=e[6],b=e[7],x=e[8];return n[0]=h*r+f*o+p*u,n[1]=h*i+f*s+p*c,n[2]=h*a+f*l+p*d,n[3]=g*r+m*o+v*u,n[4]=g*i+m*s+v*c,n[5]=g*a+m*l+v*d,n[6]=y*r+b*o+x*u,n[7]=y*i+b*s+x*c,n[8]=y*a+b*l+x*d,n}function i(t,e){var n=[],r=e[0],i=e[1];return n[0]=t[0]*r+t[3]*i+t[6],n[1]=t[1]*r+t[4]*i+t[7],n}function a(t){var e=[],n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],d=c*o-s*u,h=-c*a+s*l,f=u*a-o*l,p=n*d+r*h+i*f;return p?(p=1/p,e[0]=d*p,e[1]=(-c*r+i*u)*p,e[2]=(s*r-i*o)*p,e[3]=h*p,e[4]=(c*n-i*l)*p,e[5]=(-s*n+i*a)*p,e[6]=f*p,e[7]=(-u*n+r*l)*p,e[8]=(o*n-r*a)*p,e):null}n.d(e,{xq:function(){return r},rG:function(){return i},U_:function(){return a}})},67052:function(t,e,n){"use strict";n.d(e,{L:function(){return i}});var r=null;function i(){if(!r){var t=document.createElement("canvas");t.width=1,t.height=1,r=t.getContext("2d")}return r}},47575:function(t,e,n){"use strict";n.r(e),n.d(e,{catmullRomToBezier:function(){return l},fillPath:function(){return T},fillPathByDiff:function(){return R},formatPath:function(){return j},intersection:function(){return F},parsePathArray:function(){return m},parsePathString:function(){return s},pathToAbsolute:function(){return c},pathToCurve:function(){return p},rectPath:function(){return _}});var r=n(13810),i="\t\n\v\f\r   ᠎              \u2028\u2029",a=new RegExp("([a-z])["+i+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+i+"]*,?["+i+"]*)+)","ig"),o=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+i+"]*,?["+i+"]*","ig"),s=function(t){if(!t)return null;if((0,r.isArray)(t))return t;var e={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},n=[];return String(t).replace(a,(function(r,i,a){var s=[],l=i.toLowerCase();if(a.replace(o,(function(t,e){e&&s.push(+e)})),"m"===l&&s.length>2&&(n.push([i].concat(s.splice(0,2))),l="l",i="m"===i?"l":"L"),"o"===l&&1===s.length&&n.push([i,s[0]]),"r"===l)n.push([i].concat(s));else while(s.length>=e[l])if(n.push([i].concat(s.splice(0,e[l]))),!e[l])break;return t})),n},l=function(t,e){for(var n=[],r=0,i=t.length;i-2*!e>r;r+=2){var a=[{x:+t[r-2],y:+t[r-1]},{x:+t[r],y:+t[r+1]},{x:+t[r+2],y:+t[r+3]},{x:+t[r+4],y:+t[r+5]}];e?r?i-4===r?a[3]={x:+t[0],y:+t[1]}:i-2===r&&(a[2]={x:+t[0],y:+t[1]},a[3]={x:+t[2],y:+t[3]}):a[0]={x:+t[i-2],y:+t[i-1]}:i-4===r?a[3]=a[2]:r||(a[0]={x:+t[r],y:+t[r+1]}),n.push(["C",(-a[0].x+6*a[1].x+a[2].x)/6,(-a[0].y+6*a[1].y+a[2].y)/6,(a[1].x+6*a[2].x-a[3].x)/6,(a[1].y+6*a[2].y-a[3].y)/6,a[2].x,a[2].y])}return n},u=function(t,e,n,r,i){var a=[];if(null===i&&null===r&&(r=n),t=+t,e=+e,n=+n,r=+r,null!==i){var o=Math.PI/180,s=t+n*Math.cos(-r*o),l=t+n*Math.cos(-i*o),u=e+n*Math.sin(-r*o),c=e+n*Math.sin(-i*o);a=[["M",s,u],["A",n,n,0,+(i-r>180),0,l,c]]}else a=[["M",t,e],["m",0,-r],["a",n,r,0,1,1,0,2*r],["a",n,r,0,1,1,0,-2*r],["z"]];return a},c=function(t){if(t=s(t),!t||!t.length)return[["M",0,0]];var e,n,r=[],i=0,a=0,o=0,c=0,d=0;"M"===t[0][0]&&(i=+t[0][1],a=+t[0][2],o=i,c=a,d++,r[0]=["M",i,a]);for(var h=3===t.length&&"M"===t[0][0]&&"R"===t[1][0].toUpperCase()&&"Z"===t[2][0].toUpperCase(),f=void 0,p=void 0,g=d,m=t.length;g1&&(_=Math.sqrt(_),n*=_,r*=_);var C=n*n,S=r*r,A=(a===o?-1:1)*Math.sqrt(Math.abs((C*S-C*w*w-S*x*x)/(C*w*w+S*x*x)));p=A*n*w/r+(t+s)/2,g=A*-r*x/n+(e+l)/2,d=Math.asin(((e-g)/r).toFixed(9)),h=Math.asin(((l-g)/r).toFixed(9)),d=th&&(d-=2*Math.PI),!o&&h>d&&(h-=2*Math.PI)}var k=h-d;if(Math.abs(k)>m){var E=h,D=s,F=l;h=d+m*(o&&h>d?1:-1),s=p+n*Math.cos(h),l=g+r*Math.sin(h),y=f(s,l,n,r,i,0,o,D,F,[h,E,p,g])}k=h-d;var M=Math.cos(d),O=Math.sin(d),B=Math.cos(h),T=Math.sin(h),P=Math.tan(k/4),I=4/3*n*P,L=4/3*r*P,R=[t,e],N=[t+I*O,e-L*M],z=[s+I*T,l-L*B],j=[s,l];if(N[0]=2*R[0]-N[0],N[1]=2*R[1]-N[1],u)return[N,z,j].concat(y);y=[N,z,j].concat(y).join().split(",");for(var $=[],V=0,q=y.length;V7){t[e].shift();var a=t[e];while(a.length)s[e]="A",i&&(l[e]="A"),t.splice(e++,0,["C"].concat(a.splice(0,6)));t.splice(e,1),n=Math.max(r.length,i&&i.length||0)}},v=function(t,e,a,o,s){t&&e&&"M"===t[s][0]&&"M"!==e[s][0]&&(e.splice(s,0,["M",o.x,o.y]),a.bx=0,a.by=0,a.x=t[s][1],a.y=t[s][2],n=Math.max(r.length,i&&i.length||0))};n=Math.max(r.length,i&&i.length||0);for(var y=0;y1?1:l<0?0:l;for(var u=l/2,c=12,d=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],h=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],f=0,p=0;p0&&d<1&&h.push(d)}else{var g=u*u-4*c*l,m=Math.sqrt(g);if(!(g<0)){var v=(-u+m)/(2*l);v>0&&v<1&&h.push(v);var y=(-u-m)/(2*l);y>0&&y<1&&h.push(y)}}var b,x=h.length,w=x;while(x--)d=h[x],b=1-d,f[0][x]=b*b*b*t+3*b*b*d*n+3*b*d*d*i+d*d*d*o,f[1][x]=b*b*b*e+3*b*b*d*r+3*b*d*d*a+d*d*d*s;return f[0][w]=t,f[1][w]=e,f[0][w+1]=o,f[1][w+1]=s,f[0].length=f[1].length=w+2,{min:{x:Math.min.apply(0,f[0]),y:Math.min.apply(0,f[1])},max:{x:Math.max.apply(0,f[0]),y:Math.max.apply(0,f[1])}}},x=function(t,e,n,r,i,a,o,s){if(!(Math.max(t,n)Math.max(i,o)||Math.max(e,r)Math.max(a,s))){var l=(t*r-e*n)*(i-o)-(t-n)*(i*s-a*o),u=(t*r-e*n)*(a-s)-(e-r)*(i*s-a*o),c=(t-n)*(a-s)-(e-r)*(i-o);if(c){var d=l/c,h=u/c,f=+d.toFixed(2),p=+h.toFixed(2);if(!(f<+Math.min(t,n).toFixed(2)||f>+Math.max(t,n).toFixed(2)||f<+Math.min(i,o).toFixed(2)||f>+Math.max(i,o).toFixed(2)||p<+Math.min(e,r).toFixed(2)||p>+Math.max(e,r).toFixed(2)||p<+Math.min(a,s).toFixed(2)||p>+Math.max(a,s).toFixed(2)))return{x:d,y:h}}}},w=function(t,e,n){return e>=t.x&&e<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},_=function(t,e,n,r,i){if(i)return[["M",+t+ +i,e],["l",n-2*i,0],["a",i,i,0,0,1,i,i],["l",0,r-2*i],["a",i,i,0,0,1,-i,i],["l",2*i-n,0],["a",i,i,0,0,1,-i,-i],["l",0,2*i-r],["a",i,i,0,0,1,i,-i],["z"]];var a=[["M",t,e],["l",n,0],["l",0,r],["l",-n,0],["z"]];return a.parsePathArray=m,a},C=function(t,e,n,r){return null===t&&(t=e=n=r=0),null===e&&(e=t.y,n=t.width,r=t.height,t=t.x),{x:t,y:e,width:n,w:n,height:r,h:r,x2:t+n,y2:e+r,cx:t+n/2,cy:e+r/2,r1:Math.min(n,r)/2,r2:Math.max(n,r)/2,r0:Math.sqrt(n*n+r*r)/2,path:_(t,e,n,r),vb:[t,e,n,r].join(" ")}},S=function(t,e){return t=C(t),e=C(e),w(e,t.x,t.y)||w(e,t.x2,t.y)||w(e,t.x,t.y2)||w(e,t.x2,t.y2)||w(t,e.x,e.y)||w(t,e.x2,e.y)||w(t,e.x,e.y2)||w(t,e.x2,e.y2)||(t.xe.x||e.xt.x)&&(t.ye.y||e.yt.y)},A=function(t,e,n,i,a,o,s,l){(0,r.isArray)(t)||(t=[t,e,n,i,a,o,s,l]);var u=b.apply(null,t);return C(u.min.x,u.min.y,u.max.x-u.min.x,u.max.y-u.min.y)},k=function(t,e,n,r,i,a,o,s,l){var u=1-l,c=Math.pow(u,3),d=Math.pow(u,2),h=l*l,f=h*l,p=c*t+3*d*l*n+3*u*l*l*i+f*o,g=c*e+3*d*l*r+3*u*l*l*a+f*s,m=t+2*l*(n-t)+h*(i-2*n+t),v=e+2*l*(r-e)+h*(a-2*r+e),y=n+2*l*(i-n)+h*(o-2*i+n),b=r+2*l*(a-r)+h*(s-2*a+r),x=u*t+l*n,w=u*e+l*r,_=u*i+l*o,C=u*a+l*s,S=90-180*Math.atan2(m-y,v-b)/Math.PI;return{x:p,y:g,m:{x:m,y:v},n:{x:y,y:b},start:{x:x,y:w},end:{x:_,y:C},alpha:S}},E=function(t,e,n){var r=A(t),i=A(e);if(!S(r,i))return n?0:[];for(var a=y.apply(0,t),o=y.apply(0,e),s=~~(a/8),l=~~(o/8),u=[],c=[],d={},h=n?0:[],f=0;f=0&&D<=1&&F>=0&&F<=1&&(n?h+=1:h.push({x:E.x,y:E.y,t1:D,t2:F}))}}return h},D=function(t,e,n){var r,i,a,o,s,l,u,c,d,h;t=p(t),e=p(e);for(var f=n?0:[],g=0,m=t.length;g=3&&(3===t.length&&e.push("Q"),e=e.concat(t[1])),2===t.length&&e.push("L"),e=e.concat(t[t.length-1]),e}));return c}var B=function(t,e,n){if(1===n)return[[].concat(t)];var r=[];if("L"===e[0]||"C"===e[0]||"Q"===e[0])r=r.concat(O(t,e,n));else{var i=[].concat(t);"M"===i[0]&&(i[0]="L");for(var a=0;a<=n-1;a++)r.push(i)}return r},T=function(t,e){if(1===t.length)return t;var n=t.length-1,r=e.length-1,i=n/r,a=[];if(1===t.length&&"M"===t[0][0]){for(var o=0;o=0;l--)o=a[l].index,"add"===a[l].type?t.splice(o,0,[].concat(t[o])):t.splice(o,1)}r=t.length;var d=i-r;if(r0)){t[r]=e[r];break}n=N(n,t[r-1],1)}t[r]=["Q"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"T":t[r]=["T"].concat(n[0]);break;case"C":if(n.length<3){if(!(r>0)){t[r]=e[r];break}n=N(n,t[r-1],2)}t[r]=["C"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;case"S":if(n.length<2){if(!(r>0)){t[r]=e[r];break}n=N(n,t[r-1],1)}t[r]=["S"].concat(n.reduce((function(t,e){return t.concat(e)}),[]));break;default:t[r]=e[r]}return t}},8723:function(t,e,n){"use strict";n.d(e,{FE:function(){return a},mY:function(){return s},$O:function(){return l}});var r=n(77341),i=n(67052);function a(t,e,n){var i=1;if((0,r.HD)(t)&&(i=t.split("\n").length),i>1){var a=o(e,n);return e*i+a*(i-1)}return e}function o(t,e){return e?e-t:.14*t}function s(t,e){var n=(0,i.L)(),a=0;if((0,r.kK)(t)||""===t)return a;if(n.save(),n.font=e,(0,r.HD)(t)&&t.includes("\n")){var o=t.split("\n");(0,r.S6)(o,(function(t){var e=n.measureText(t).width;al?o(n,r,i,a):this.pointToLine(t,e,n,r,i,a)},pointToLine:function(t,e,n,r,i,a){var o=[n-t,r-e];if(d.exactEquals(o,[0,0]))return Math.sqrt((i-t)*(i-t)+(a-e)*(a-e));var s=[-o[1],o[0]];d.normalize(s,s);var l=[i-t,a-e];return Math.abs(d.dot(l,s))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}},f=1e-4;function p(t,e,n,r,i,a){var s,l=1/0,u=[n,r],c=20;a&&a>200&&(c=a/10);for(var d=1/c,h=d/10,p=0;p<=c;p++){var g=p*d,m=[i.apply(null,t.concat([g])),i.apply(null,e.concat([g]))],v=o(u[0],u[1],m[0],m[1]);v=0&&v=0?[i]:[]}function y(t,e,n,r){return 2*(1-r)*(e-t)+2*r*(n-e)}function b(t,e,n,r,i,a,o){var s=m(t,n,i,o),l=m(e,r,a,o),u=h.pointAt(t,e,n,r,o),c=h.pointAt(n,r,i,a,o);return[[t,e,u.x,u.y,s,l],[s,l,c.x,c.y,i,a]]}function x(t,e,n,r,i,a,s){if(0===s)return(o(t,e,n,r)+o(n,r,i,a)+o(t,e,i,a))/2;var l=b(t,e,n,r,i,a,.5),u=l[0],c=l[1];return u.push(s-1),c.push(s-1),x.apply(null,u)+x.apply(null,c)}var w={box:function(t,e,n,r,i,a){var o=v(t,n,i)[0],s=v(e,r,a)[0],u=[t,i],c=[e,a];return void 0!==o&&u.push(m(t,n,i,o)),void 0!==s&&c.push(m(e,r,a,s)),l(u,c)},length:function(t,e,n,r,i,a){return x(t,e,n,r,i,a,3)},nearestPoint:function(t,e,n,r,i,a,o,s){return p([t,n,i],[e,r,a],o,s,m)},pointDistance:function(t,e,n,r,i,a,s,l){var u=this.nearestPoint(t,e,n,r,i,a,s,l);return o(u.x,u.y,s,l)},interpolationAt:m,pointAt:function(t,e,n,r,i,a,o){return{x:m(t,n,i,o),y:m(e,r,a,o)}},divide:function(t,e,n,r,i,a,o){return b(t,e,n,r,i,a,o)},tangentAngle:function(t,e,n,r,i,a,o){var s=y(t,n,i,o),l=y(e,r,a,o),u=Math.atan2(l,s);return c(u)}};function _(t,e,n,r,i){var a=1-i;return a*a*a*t+3*e*i*a*a+3*n*i*i*a+r*i*i*i}function C(t,e,n,r,i){var a=1-i;return 3*(a*a*(e-t)+2*a*i*(n-e)+i*i*(r-n))}function S(t,e,n,r){var i,a,o,l=-3*t+9*e-9*n+3*r,u=6*t-12*e+6*n,c=3*e-3*t,d=[];if(s(l,0))s(u,0)||(i=-c/u,i>=0&&i<=1&&d.push(i));else{var h=u*u-4*l*c;s(h,0)?d.push(-u/(2*l)):h>0&&(o=Math.sqrt(h),i=(-u+o)/(2*l),a=(-u-o)/(2*l),i>=0&&i<=1&&d.push(i),a>=0&&a<=1&&d.push(a))}return d}function A(t,e,n,r,i,a,o,s,l){var u=_(t,n,i,o,l),c=_(e,r,a,s,l),d=h.pointAt(t,e,n,r,l),f=h.pointAt(n,r,i,a,l),p=h.pointAt(i,a,o,s,l),g=h.pointAt(d.x,d.y,f.x,f.y,l),m=h.pointAt(f.x,f.y,p.x,p.y,l);return[[t,e,d.x,d.y,g.x,g.y,u,c],[u,c,m.x,m.y,p.x,p.y,o,s]]}function k(t,e,n,r,i,a,o,s,l){if(0===l)return g([t,n,i,o],[e,r,a,s]);var u=A(t,e,n,r,i,a,o,s,.5),c=u[0],d=u[1];return c.push(l-1),d.push(l-1),k.apply(null,c)+k.apply(null,d)}var E={extrema:S,box:function(t,e,n,r,i,a,o,s){for(var u=[t,o],c=[e,s],d=S(t,n,i,o),h=S(e,r,a,s),f=0;f0?n:-1*n}var F={box:function(t,e,n,r){return{x:t-n,y:e-r,width:2*n,height:2*r}},length:function(t,e,n,r){return Math.PI*(3*(n+r)-Math.sqrt((3*n+r)*(n+3*r)))},nearestPoint:function(t,e,n,r,i,a){var o=n,s=r;if(0===o||0===s)return{x:t,y:e};for(var l,u,c=i-t,d=a-e,h=Math.abs(c),f=Math.abs(d),p=o*o,g=s*s,m=Math.PI/4,v=0;v<4;v++){l=o*Math.cos(m),u=s*Math.sin(m);var y=(p-g)*Math.pow(Math.cos(m),3)/o,b=(g-p)*Math.pow(Math.sin(m),3)/s,x=l-y,w=u-b,_=h-y,C=f-b,S=Math.hypot(w,x),A=Math.hypot(C,_),k=S*Math.asin((x*C-w*_)/(S*A)),E=k/Math.sqrt(p+g-l*l-u*u);m+=E,m=Math.min(Math.PI/2,Math.max(0,m))}return{x:t+D(l,c),y:e+D(u,d)}},pointDistance:function(t,e,n,r,i,a){var s=this.nearestPoint(t,e,n,r,i,a);return o(s.x,s.y,i,a)},pointAt:function(t,e,n,r,i){var a=2*Math.PI*i;return{x:t+n*Math.cos(a),y:e+r*Math.sin(a)}},tangentAngle:function(t,e,n,r,i){var a=2*Math.PI*i,o=Math.atan2(r*Math.cos(a),-n*Math.sin(a));return c(o)}};function M(t,e,n,r,i,a,o,s){return-1*n*Math.cos(i)*Math.sin(s)-r*Math.sin(i)*Math.cos(s)}function O(t,e,n,r,i,a,o,s){return-1*n*Math.sin(i)*Math.sin(s)+r*Math.cos(i)*Math.cos(s)}function B(t,e,n){return Math.atan(-e/t*Math.tan(n))}function T(t,e,n){return Math.atan(e/(t*Math.tan(n)))}function P(t,e,n,r,i,a){return n*Math.cos(i)*Math.cos(a)-r*Math.sin(i)*Math.sin(a)+t}function I(t,e,n,r,i,a){return n*Math.sin(i)*Math.cos(a)+r*Math.cos(i)*Math.sin(a)+e}function L(t,e,n,r){var i=Math.atan2(r*t,n*e);return(i+2*Math.PI)%(2*Math.PI)}function R(t,e,n){return{x:t*Math.cos(n),y:e*Math.sin(n)}}function N(t,e,n){var r=Math.cos(n),i=Math.sin(n);return[t*r-e*i,t*i+e*r]}var z={box:function(t,e,n,r,i,a,o){for(var s=B(n,r,i),l=1/0,u=-1/0,c=[a,o],d=2*-Math.PI;d<=2*Math.PI;d+=Math.PI){var h=s+d;au&&(u=f)}var p=T(n,r,i),g=1/0,m=-1/0,v=[a,o];for(d=2*-Math.PI;d<=2*Math.PI;d+=Math.PI){var y=p+d;am&&(m=b)}return{x:l,y:g,width:u-l,height:m-g}},length:function(t,e,n,r,i,a,o){},nearestPoint:function(t,e,n,r,i,a,o,s,l){var u=N(s-t,l-e,-i),c=u[0],d=u[1],h=F.nearestPoint(0,0,n,r,c,d),f=L(n,r,h.x,h.y);fo&&(h=R(n,r,o));var p=N(h.x,h.y,i);return{x:p[0]+t,y:p[1]+e}},pointDistance:function(t,e,n,r,i,a,s,l,u){var c=this.nearestPoint(t,e,n,r,l,u);return o(c.x,c.y,l,u)},pointAt:function(t,e,n,r,i,a,o,s){var l=(o-a)*s+a;return{x:P(t,e,n,r,i,l),y:I(t,e,n,r,i,l)}},tangentAngle:function(t,e,n,r,i,a,o,s){var l=(o-a)*s+a,u=M(t,e,n,r,i,a,o,l),d=O(t,e,n,r,i,a,o,l);return c(Math.atan2(d,u))}};function j(t){for(var e=0,n=[],r=0;r1||e<0||t.length<2)return null;var n=j(t),r=n.segments,i=n.totalLength;if(0===i)return{x:t[0][0],y:t[0][1]};for(var a=0,o=null,s=0;s=a&&e<=a+d){var f=(e-a)/d;o=h.pointAt(u[0],u[1],c[0],c[1],f);break}a+=d}return o}function q(t,e){if(e>1||e<0||t.length<2)return 0;for(var n=j(t),r=n.segments,i=n.totalLength,a=0,o=0,s=0;s=a&&e<=a+d){o=Math.atan2(c[1]-u[1],c[0]-u[0]);break}a+=d}return o}function H(t,e,n){for(var r=1/0,i=0;i]*>/,F={tr:document.createElement("tbody"),tbody:k,thead:k,tfoot:k,td:E,th:E,"*":document.createElement("div")}}function z(t){k||N();var e=D.test(t)&&RegExp.$1;e&&e in F||(e="*");var n=F[e];t="string"===typeof t?t.replace(/(^\s*)|(\s*$)/g,""):t,n.innerHTML=""+t;var r=n.childNodes[0];return r&&n.contains(r)&&n.removeChild(r),r}function j(t,e){if(t)for(var n in e)e.hasOwnProperty(n)&&(t.style[n]=e[n]);return t}function $(t){var e=getComputedStyle(t);return{width:(t.clientWidth||parseInt(e.width,10))-parseInt(e.paddingLeft,10)-parseInt(e.paddingRight,10),height:(t.clientHeight||parseInt(e.height,10))-parseInt(e.paddingTop,10)-parseInt(e.paddingBottom,10)}}function V(t){return"number"===typeof t&&!isNaN(t)}function q(t,e,n,r){var i=n,a=r;if(e){var o=$(t);i=o.width?o.width:i,a=o.height?o.height:a}return{width:Math.max(V(i)?i:B,B),height:Math.max(V(a)?a:T,T)}}function H(t){var e=t.parentNode;e&&e.removeChild(t)}var U=n(90494),G=function(t){function e(e){var n=t.call(this)||this;n.destroyed=!1;var r=e.visible,i=void 0===r||r;return n.visible=i,n}return(0,b.__extends)(e,t),e.prototype.show=function(){var t=this.visible;t||this.changeVisible(!0)},e.prototype.hide=function(){var t=this.visible;t&&this.changeVisible(!1)},e.prototype.destroy=function(){this.off(),this.destroyed=!0},e.prototype.changeVisible=function(t){this.visible!==t&&(this.visible=t)},e}(U.Z),W=G,Z=n(98190),X=0,Y=.5,K=.5,Q=.05,J=function(){function t(t){var e=t.xField,n=t.yField,r=t.adjustNames,i=void 0===r?["x","y"]:r,a=t.dimValuesMap;this.adjustNames=i,this.xField=e,this.yField=n,this.dimValuesMap=a}return t.prototype.isAdjust=function(t){return this.adjustNames.indexOf(t)>=0},t.prototype.getAdjustRange=function(t,e,n){var r,i,a=this.yField,o=n.indexOf(e),s=n.length;return!a&&this.isAdjust("y")?(r=0,i=1):s>1?(r=n[0===o?0:o-1],i=n[o===s-1?s-1:o+1],0!==o?r+=(e-r)/2:r-=(i-e)/2,o!==s-1?i-=(i-e)/2:i+=(e-n[s-2])/2):(r=0===e?0:e-.5,i=0===e?1:e+.5),{pre:r,next:i}},t.prototype.adjustData=function(t,e){var n=this,r=this.getDimValues(e);x.each(t,(function(t,e){x.each(r,(function(r,i){n.adjustDim(i,r,t,e)}))}))},t.prototype.groupData=function(t,e){return x.each(t,(function(t){void 0===t[e]&&(t[e]=X)})),x.groupBy(t,e)},t.prototype.adjustDim=function(t,e,n,r){},t.prototype.getDimValues=function(t){var e=this,n=e.xField,r=e.yField,i=x.assign({},this.dimValuesMap),a=[];if(n&&this.isAdjust("x")&&a.push(n),r&&this.isAdjust("y")&&a.push(r),a.forEach((function(e){i&&i[e]||(i[e]=x.valuesOfKey(t,e).sort((function(t,e){return t-e})))})),!r&&this.isAdjust("y")){var o="y";i[o]=[X,1]}return i},t}(),tt=J,et={},nt=function(t){return et[t.toLowerCase()]},rt=function(t,e){if(nt(t))throw new Error("Adjust type '"+t+"' existed.");et[t.toLowerCase()]=e},it=function(t,e){return it=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},it(t,e)};function at(t,e){function n(){this.constructor=t}it(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var ot=function(){return ot=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0){var h=this.getIntervalOnlyOffset(n,e);r=u+h}else if(!x.isNil(l)&&x.isNil(s)&&l>=0){h=this.getDodgeOnlyOffset(n,e);r=u+h}else if(!x.isNil(s)&&!x.isNil(l)&&s>=0&&l>=0){h=this.getIntervalAndDodgeOffset(n,e);r=u+h}else{var f=d*a/n,p=o*f;h=.5*(d-n*f-(n-1)*p)+((e+1)*f+e*p)-.5*f-.5*d;r=(u+c)/2+h}return r},e.prototype.getIntervalOnlyOffset=function(t,e){var n=this,r=n.defaultSize,i=n.intervalPadding,a=n.xDimensionLegenth,o=n.groupNum,s=n.dodgeRatio,l=n.maxColumnWidth,u=n.minColumnWidth,c=n.columnWidthRatio,d=i/a,h=(1-(o-1)*d)/o*s/(t-1),f=((1-d*(o-1))/o-h*(t-1))/t;if(f=x.isNil(c)?f:1/o/t*c,!x.isNil(l)){var p=l/a;f=Math.min(f,p)}if(!x.isNil(u)){var g=u/a;f=Math.max(f,g)}f=r?r/a:f,h=((1-(o-1)*d)/o-t*f)/(t-1);var m=((.5+e)*f+e*h+.5*d)*o-d/2;return m},e.prototype.getDodgeOnlyOffset=function(t,e){var n=this,r=n.defaultSize,i=n.dodgePadding,a=n.xDimensionLegenth,o=n.groupNum,s=n.marginRatio,l=n.maxColumnWidth,u=n.minColumnWidth,c=n.columnWidthRatio,d=i/a,h=1*s/(o-1),f=((1-h*(o-1))/o-d*(t-1))/t;if(f=c?1/o/t*c:f,!x.isNil(l)){var p=l/a;f=Math.min(f,p)}if(!x.isNil(u)){var g=u/a;f=Math.max(f,g)}f=r?r/a:f,h=(1-(f*t+d*(t-1))*o)/(o-1);var m=((.5+e)*f+e*d+.5*h)*o-h/2;return m},e.prototype.getIntervalAndDodgeOffset=function(t,e){var n=this,r=n.intervalPadding,i=n.dodgePadding,a=n.xDimensionLegenth,o=n.groupNum,s=r/a,l=i/a,u=((1-s*(o-1))/o-l*(t-1))/t,c=((.5+e)*u+e*l+.5*s)*o-s/2;return c},e.prototype.getDistribution=function(t){var e=this.adjustDataArray,n=this.cacheMap,r=n[t];return r||(r={},x.each(e,(function(e,n){var i=x.valuesOfKey(e,t);i.length||i.push(0),x.each(i,(function(t){r[t]||(r[t]=[]),r[t].push(n)}))})),n[t]=r),r},e}(tt),lt=st;function ut(t,e){return(e-t)*Math.random()+t}var ct=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return at(e,t),e.prototype.process=function(t){var e=x.clone(t),n=x.flatten(e);return this.adjustData(e,n),e},e.prototype.adjustDim=function(t,e,n){var r=this,i=this.groupData(n,t);return x.each(i,(function(n,i){return r.adjustGroup(n,t,parseFloat(i),e)}))},e.prototype.getAdjustOffset=function(t){var e=t.pre,n=t.next,r=(n-e)*Q;return ut(e+r,n-r)},e.prototype.adjustGroup=function(t,e,n,r){var i=this,a=this.getAdjustRange(e,n,r);return x.each(t,(function(t){t[e]=i.getAdjustOffset(a)})),t},e}(tt),dt=ct,ht=x.Cache,ft=function(t){function e(e){var n=t.call(this,e)||this,r=e.adjustNames,i=void 0===r?["y"]:r,a=e.height,o=void 0===a?NaN:a,s=e.size,l=void 0===s?10:s,u=e.reverseOrder,c=void 0!==u&&u;return n.adjustNames=i,n.height=o,n.size=l,n.reverseOrder=c,n}return at(e,t),e.prototype.process=function(t){var e=this,n=e.yField,r=e.reverseOrder,i=n?this.processStack(t):this.processOneDimStack(t);return r?this.reverse(i):i},e.prototype.reverse=function(t){return t.slice(0).reverse()},e.prototype.processStack=function(t){var e=this,n=e.xField,r=e.yField,i=e.reverseOrder,a=i?this.reverse(t):t,o=new ht,s=new ht;return a.map((function(t){return t.map((function(t){var e,i=x.get(t,n,0),a=x.get(t,[r]),l=i.toString();if(a=x.isArray(a)?a[1]:a,!x.isNil(a)){var u=a>=0?o:s;u.has(l)||u.set(l,0);var c=u.get(l),d=a+c;return u.set(l,d),ot(ot({},t),(e={},e[r]=[c,d],e))}return t}))}))},e.prototype.processOneDimStack=function(t){var e=this,n=this,r=n.xField,i=n.height,a=n.reverseOrder,o="y",s=a?this.reverse(t):t,l=new ht;return s.map((function(t){return t.map((function(t){var n,a=e.size,s=t[r],u=2*a/i;l.has(s)||l.set(s,u/2);var c=l.get(s);return l.set(s,c+u),ot(ot({},t),(n={},n[o]=c,n))}))}))},e}(tt),pt=ft,gt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return at(e,t),e.prototype.process=function(t){var e=x.flatten(t),n=this,r=n.xField,i=n.yField,a=this.getXValuesMaxMap(e),o=Math.max.apply(Math,Object.keys(a).map((function(t){return a[t]})));return x.map(t,(function(t){return x.map(t,(function(t){var e,n,s=t[i],l=t[r];if(x.isArray(s)){var u=(o-a[l])/2;return ot(ot({},t),(e={},e[i]=x.map(s,(function(t){return u+t})),e))}var c=(o-s)/2;return ot(ot({},t),(n={},n[i]=[c,s+c],n))}))}))},e.prototype.getXValuesMaxMap=function(t){var e=this,n=this,r=n.xField,i=n.yField,a=x.groupBy(t,(function(t){return t[r]}));return x.mapValues(a,(function(t){return e.getDimMaxValue(t,i)}))},e.prototype.getDimMaxValue=function(t,e){var n=x.map(t,(function(t){return x.get(t,e,[])})),r=x.flatten(n);return Math.max.apply(Math,r)},e}(tt),mt=gt;rt("Dodge",lt),rt("Jitter",dt),rt("Stack",pt),rt("Symmetric",mt);var vt=function(t,e){return(0,x.isString)(e)?e:t.invert(t.scale(e))},yt=function(){function t(t){this.names=[],this.scales=[],this.linear=!1,this.values=[],this.callback=function(){return[]},this._parseCfg(t)}return t.prototype.mapping=function(){for(var t=this,e=[],n=0;n1?1:Number(e),r=t.length-1,i=Math.floor(r*n),a=r*n-i,o=t[i],s=i===r?o:t[i+1];return Ft([Dt(o,s,a,0),Dt(o,s,a,1),Dt(o,s,a,2)])},Pt=function(t){if("#"===t[0]&&7===t.length)return t;Mt||(Mt=Et()),Mt.style.color=t;var e=document.defaultView.getComputedStyle(Mt,"").getPropertyValue("color"),n=_t.exec(e),r=n[1].split(/\s*,\s*/).map((function(t){return Number(t)}));return e=Ft(r),e},It=function(t){var e=(0,x.isString)(t)?t.split("-"):t,n=(0,x.map)(e,(function(t){return Ot(-1===t.indexOf("#")?Pt(t):t)}));return function(t){return Tt(n,t)}},Lt=function(t){if(kt(t)){var e,n=void 0;if("l"===t[0]){var r=Ct.exec(t),i=+r[1]+90;n=r[2],e="linear-gradient("+i+"deg, "}else if("r"===t[0]){e="radial-gradient(";r=St.exec(t);n=r[4]}var a=n.match(At);return(0,x.each)(a,(function(t,n){var r=t.split(":");e+=r[1]+" "+100*r[0]+"%",n!==a.length-1&&(e+=", ")})),e+=")",e}return t},Rt={rgb2arr:Ot,gradient:It,toRGB:(0,x.memoize)(Pt),toCSSGradient:Lt},Nt=function(t){function e(e){var n=t.call(this,e)||this;return n.type="color",n.names=["color"],(0,x.isString)(n.values)&&(n.linear=!0),n.gradient=Rt.gradient(n.values),n}return wt(e,t),e.prototype.getLinearValue=function(t){return this.gradient(t)},e}(bt),zt=Nt,jt=function(t){function e(e){var n=t.call(this,e)||this;return n.type="opacity",n.names=["opacity"],n}return wt(e,t),e}(bt),$t=jt,Vt=function(t){function e(e){var n=t.call(this,e)||this;return n.names=["x","y"],n.type="position",n}return wt(e,t),e.prototype.mapping=function(t,e){var n=this.scales,r=n[0],i=n[1];return(0,x.isNil)(t)||(0,x.isNil)(e)?[]:[(0,x.isArray)(t)?t.map((function(t){return r.scale(t)})):r.scale(t),(0,x.isArray)(e)?e.map((function(t){return i.scale(t)})):i.scale(e)]},e}(bt),qt=Vt,Ht=function(t){function e(e){var n=t.call(this,e)||this;return n.type="shape",n.names=["shape"],n}return wt(e,t),e.prototype.getLinearValue=function(t){var e=Math.round((this.values.length-1)*t);return this.values[e]},e}(bt),Ut=Ht,Gt=function(t){function e(e){var n=t.call(this,e)||this;return n.type="size",n.names=["size"],n}return wt(e,t),e}(bt),Wt=Gt,Zt={};function Xt(t){return Zt[t]}function Yt(t,e){Zt[t]=e}var Kt=function(){function t(t){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__=t,this.initCfg(),this.init()}return t.prototype.translate=function(t){return t},t.prototype.change=function(t){(0,x.assign)(this.__cfg__,t),this.init()},t.prototype.clone=function(){return this.constructor(this.__cfg__)},t.prototype.getTicks=function(){var t=this;return(0,x.map)(this.ticks,(function(e,n){return(0,x.isObject)(e)?e:{text:t.getText(e,n),tickValue:e,value:t.scale(e)}}))},t.prototype.getText=function(t,e){var n=this.formatter,r=n?n(t,e):t;return(0,x.isNil)(r)||!(0,x.isFunction)(r.toString)?"":r.toString()},t.prototype.getConfig=function(t){return this.__cfg__[t]},t.prototype.init=function(){(0,x.assign)(this,this.__cfg__),this.setDomain(),(0,x.isEmpty)(this.getConfig("ticks"))&&(this.ticks=this.calculateTicks())},t.prototype.initCfg=function(){},t.prototype.setDomain=function(){},t.prototype.calculateTicks=function(){var t=this.tickMethod,e=[];if((0,x.isString)(t)){var n=Xt(t);if(!n)throw new Error("There is no method to to calculate ticks!");e=n(this)}else(0,x.isFunction)(t)&&(e=t(this));return e},t.prototype.rangeMin=function(){return this.range[0]},t.prototype.rangeMax=function(){return this.range[1]},t.prototype.calcPercent=function(t,e,n){return(0,x.isNumber)(t)?(t-e)/(n-e):NaN},t.prototype.calcValue=function(t,e,n){return e+t*(n-e)},t}(),Qt=Kt,Jt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="cat",e.isCategory=!0,e}return(0,b.__extends)(e,t),e.prototype.buildIndexMap=function(){if(!this.translateIndexMap){this.translateIndexMap=new Map;for(var t=0;tthis.max?NaN:this.values[r]},e.prototype.getText=function(e){for(var n=[],r=1;r1?t-1:t}this.translateIndexMap&&(this.translateIndexMap=void 0)},e}(Qt),te=Jt,ee=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,ne="\\d\\d?",re="\\d\\d",ie="\\d{3}",ae="\\d{4}",oe="[^\\s]+",se=/\[([^]*?)\]/gm;function le(t,e){for(var n=[],r=0,i=t.length;r-1?i:null}};function ce(t){for(var e=[],n=1;n3?0:(t-t%10!==10?1:0)*t%10]}},me=ce({},ge),ve=function(t){return me=ce(me,t)},ye=function(t){return t.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},be=function(t,e){void 0===e&&(e=2),t=String(t);while(t.length0?"-":"+")+be(100*Math.floor(Math.abs(e)/60)+Math.abs(e)%60,4)},Z:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+be(Math.floor(Math.abs(e)/60),2)+":"+be(Math.abs(e)%60,2)}},we=function(t){return+t-1},_e=[null,ne],Ce=[null,oe],Se=["isPm",oe,function(t,e){var n=t.toLowerCase();return n===e.amPm[0]?0:n===e.amPm[1]?1:null}],Ae=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(t){var e=(t+"").match(/([+-]|\d\d)/gi);if(e){var n=60*+e[1]+parseInt(e[2],10);return"+"===e[0]?n:-n}return 0}],ke={D:["day",ne],DD:["day",re],Do:["day",ne+oe,function(t){return parseInt(t,10)}],M:["month",ne,we],MM:["month",re,we],YY:["year",re,function(t){var e=new Date,n=+(""+e.getFullYear()).substr(0,2);return+(""+(+t>68?n-1:n)+t)}],h:["hour",ne,void 0,"isPm"],hh:["hour",re,void 0,"isPm"],H:["hour",ne],HH:["hour",re],m:["minute",ne],mm:["minute",re],s:["second",ne],ss:["second",re],YYYY:["year",ae],S:["millisecond","\\d",function(t){return 100*+t}],SS:["millisecond",re,function(t){return 10*+t}],SSS:["millisecond",ie],d:_e,dd:_e,ddd:Ce,dddd:Ce,MMM:["month",oe,ue("monthNamesShort")],MMMM:["month",oe,ue("monthNames")],a:Se,A:Se,ZZ:Ae,Z:Ae},Ee={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"},De=function(t){return ce(Ee,t)},Fe=function(t,e,n){if(void 0===e&&(e=Ee["default"]),void 0===n&&(n={}),"number"===typeof t&&(t=new Date(t)),"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))throw new Error("Invalid Date pass to format");e=Ee[e]||e;var r=[];e=e.replace(se,(function(t,e){return r.push(e),"@@@"}));var i=ce(ce({},me),n);return e=e.replace(ee,(function(e){return xe[e](t,i)})),e.replace(/@@@/g,(function(){return r.shift()}))};function Me(t,e,n){if(void 0===n&&(n={}),"string"!==typeof e)throw new Error("Invalid format in fecha parse");if(e=Ee[e]||e,t.length>1e3)return null;var r=new Date,i={year:r.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},a=[],o=[],s=e.replace(se,(function(t,e){return o.push(ye(e)),"@@@"})),l={},u={};s=ye(s).replace(ee,(function(t){var e=ke[t],n=e[0],r=e[1],i=e[3];if(l[n])throw new Error("Invalid format. "+n+" specified twice in format");return l[n]=!0,i&&(u[i]=!0),a.push(e),"("+r+")"})),Object.keys(u).forEach((function(t){if(!l[t])throw new Error("Invalid format. "+t+" is required in specified format")})),s=s.replace(/@@@/g,(function(){return o.shift()}));var c=t.match(new RegExp(s,"i"));if(!c)return null;for(var d,h=ce(ce({},me),n),f=1;f11||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 d}var Oe={format:Fe,parse:Me,defaultI18n:ge,setGlobalDateI18n:ve,setGlobalDateMasks:De},Be=Oe;function Te(t){return function(e,n,r,i){var a=(0,x.isNil)(r)?0:r,o=(0,x.isNil)(i)?e.length:i;while(a>>1;t(e[s])>n?o=s:a=s+1}return a}}var Pe="format";function Ie(t,e){var n=r[Pe]||Be[Pe];return n(t,e)}function Le(t){return(0,x.isString)(t)&&(t=t.indexOf("T")>0?new Date(t).getTime():new Date(t.replace(/-/gi,"/")).getTime()),(0,x.isDate)(t)&&(t=t.getTime()),t}var Re=1e3,Ne=60*Re,ze=60*Ne,je=24*ze,$e=31*je,Ve=365*je,qe=[["HH:mm:ss",Re],["HH:mm:ss",10*Re],["HH:mm:ss",30*Re],["HH:mm",Ne],["HH:mm",10*Ne],["HH:mm",30*Ne],["HH",ze],["HH",6*ze],["HH",12*ze],["YYYY-MM-DD",je],["YYYY-MM-DD",4*je],["YYYY-WW",7*je],["YYYY-MM",$e],["YYYY-MM",4*$e],["YYYY-MM",6*$e],["YYYY",380*je]];function He(t,e,n){var r=(e-t)/n,i=Te((function(t){return t[1]}))(qe,r)-1,a=qe[i];return i<0?a=qe[0]:i>=qe.length&&(a=(0,x.last)(qe)),a}var Ue=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="timeCat",e}return(0,b.__extends)(e,t),e.prototype.translate=function(t){t=Le(t);var e=this.values.indexOf(t);return-1===e&&(e=(0,x.isNumber)(t)&&t-1){var r=this.values[n],i=this.formatter;return r=i?i(r,e):Ie(r,this.mask),r}return t},e.prototype.initCfg=function(){this.tickMethod="time-cat",this.mask="YYYY-MM-DD",this.tickCount=7},e.prototype.setDomain=function(){var e=this.values;(0,x.each)(e,(function(t,n){e[n]=Le(t)})),e.sort((function(t,e){return t-e})),t.prototype.setDomain.call(this)},e}(te),Ge=Ue,We=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isContinuous=!0,e}return(0,b.__extends)(e,t),e.prototype.scale=function(t){if((0,x.isNil)(t))return NaN;var e=this.rangeMin(),n=this.rangeMax(),r=this.max,i=this.min;if(r===i)return e;var a=this.getScalePercent(t);return e+a*(n-e)},e.prototype.init=function(){t.prototype.init.call(this);var e=this.ticks,n=(0,x.head)(e),r=(0,x.last)(e);nthis.max&&(this.max=r),(0,x.isNil)(this.minLimit)||(this.min=n),(0,x.isNil)(this.maxLimit)||(this.max=r)},e.prototype.setDomain=function(){var t=(0,x.getRange)(this.values),e=t.min,n=t.max;(0,x.isNil)(this.min)&&(this.min=e),(0,x.isNil)(this.max)&&(this.max=n),this.min>this.max&&(this.min=e,this.max=n)},e.prototype.calculateTicks=function(){var e=this,n=t.prototype.calculateTicks.call(this);return this.nice||(n=(0,x.filter)(n,(function(t){return t>=e.min&&t<=e.max}))),n},e.prototype.getScalePercent=function(t){var e=this.max,n=this.min;return(t-n)/(e-n)},e.prototype.getInvertPercent=function(t){return(t-this.rangeMin())/(this.rangeMax()-this.rangeMin())},e}(Qt),Ze=We,Xe=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="linear",e.isLinear=!0,e}return(0,b.__extends)(e,t),e.prototype.invert=function(t){var e=this.getInvertPercent(t);return this.min+e*(this.max-this.min)},e.prototype.initCfg=function(){this.tickMethod="wilkinson-extended",this.nice=!1},e}(Ze),Ye=Xe;function Ke(t,e){var n,r=Math.E;return n=e>=0?Math.pow(r,Math.log(e)/t):-1*Math.pow(r,Math.log(-e)/t),n}function Qe(t,e){return 1===t?1:Math.log(e)/Math.log(t)}function Je(t,e,n){(0,x.isNil)(n)&&(n=Math.max.apply(null,t));var r=n;return(0,x.each)(t,(function(t){t>0&&t1&&(r=1),r}var tn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e}return(0,b.__extends)(e,t),e.prototype.invert=function(t){var e,n=this.base,r=Qe(n,this.max),i=this.rangeMin(),a=this.rangeMax()-i,o=this.positiveMin;if(o){if(0===t)return 0;e=Qe(n,o/n);var s=1/(r-e)*a;if(t=0?1:-1;return Math.pow(a,n)*o},e.prototype.initCfg=function(){this.tickMethod="pow",this.exponent=2,this.tickCount=5,this.nice=!0},e.prototype.getScalePercent=function(t){var e=this.max,n=this.min;if(e===n)return 0;var r=this.exponent,i=(Ke(r,t)-Ke(r,n))/(Ke(r,e)-Ke(r,n));return i},e}(Ze),rn=nn,an=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="time",e}return(0,b.__extends)(e,t),e.prototype.getText=function(t,e){var n=this.translate(t),r=this.formatter;return r?r(n,e):Ie(n,this.mask)},e.prototype.scale=function(e){var n=e;return((0,x.isString)(n)||(0,x.isDate)(n))&&(n=this.translate(n)),t.prototype.scale.call(this,n)},e.prototype.translate=function(t){return Le(t)},e.prototype.initCfg=function(){this.tickMethod="time-pretty",this.mask="YYYY-MM-DD",this.tickCount=7,this.nice=!1},e.prototype.setDomain=function(){var t=this.values,e=this.getConfig("min"),n=this.getConfig("max");if((0,x.isNil)(e)&&(0,x.isNumber)(e)||(this.min=this.translate(this.min)),(0,x.isNil)(n)&&(0,x.isNumber)(n)||(this.max=this.translate(this.max)),t&&t.length){var r=[],i=1/0,a=i,o=0;(0,x.each)(t,(function(t){var e=Le(t);if(isNaN(e))throw new TypeError("Invalid Time: "+t+" in time scale!");i>e?(a=i,i=e):a>e&&(a=e),o1&&(this.minTickInterval=a-i),(0,x.isNil)(e)&&(this.min=i),(0,x.isNil)(n)&&(this.max=o)}},e}(Ye),on=an,sn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="quantize",e}return(0,b.__extends)(e,t),e.prototype.invert=function(t){var e=this.ticks,n=e.length,r=this.getInvertPercent(t),i=Math.floor(r*(n-1));if(i>=n-1)return(0,x.last)(e);if(i<0)return(0,x.head)(e);var a=e[i],o=e[i+1],s=i/(n-1),l=(i+1)/(n-1);return a+(r-s)/(l-s)*(o-a)},e.prototype.initCfg=function(){this.tickMethod="r-pretty",this.tickCount=5,this.nice=!0},e.prototype.calculateTicks=function(){var e=t.prototype.calculateTicks.call(this);return this.nice||((0,x.last)(e)!==this.max&&e.push(this.max),(0,x.head)(e)!==this.min&&e.unshift(this.min)),e},e.prototype.getScalePercent=function(t){var e=this.ticks;if(t<(0,x.head)(e))return 0;if(t>(0,x.last)(e))return 1;var n=0;return(0,x.each)(e,(function(e,r){if(!(t>=e))return!1;n=r})),n/(e.length-1)},e}(Ze),ln=sn,un=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="quantile",e}return(0,b.__extends)(e,t),e.prototype.initCfg=function(){this.tickMethod="quantile",this.tickCount=5,this.nice=!0},e}(ln),cn=un,dn={};function hn(t){return dn[t]}function fn(t,e){if(hn(t))throw new Error("type '"+t+"' existed.");dn[t]=e}var pn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="identity",e.isIdentity=!0,e}return(0,b.__extends)(e,t),e.prototype.calculateTicks=function(){return this.values},e.prototype.scale=function(t){return this.values[0]!==t&&(0,x.isNumber)(t)?t:this.range[0]},e.prototype.invert=function(t){var e=this.range;return te[1]?NaN:this.values[0]},e}(Qt),gn=pn;function mn(t){var e=t.values,n=t.tickInterval,r=t.tickCount,i=t.showLast;if((0,x.isNumber)(n)){var a=(0,x.filter)(e,(function(t,e){return e%n===0})),o=(0,x.last)(e);return i&&(0,x.last)(a)!==o&&a.push(o),a}var s=e.length,l=t.min,u=t.max;if((0,x.isNil)(l)&&(l=0),(0,x.isNil)(u)&&(u=e.length-1),!(0,x.isNumber)(r)||r>=s)return e.slice(l,u+1);if(r<=0||u<=0)return[];for(var c=1===r?s:Math.floor(s/(r-1)),d=[],h=l,f=0;f=u)break;h=Math.min(l+f*c,u),f===r-1&&i?d.push(e[u]):d.push(e[h])}return d}function vn(t){var e=t.min,n=t.max,r=t.nice,i=t.tickCount,a=new _n;return a.domain([e,n]),r&&a.nice(i),a.ticks(i)}var yn=5,bn=Math.sqrt(50),xn=Math.sqrt(10),wn=Math.sqrt(2),_n=function(){function t(){this._domain=[0,1]}return t.prototype.domain=function(t){return t?(this._domain=Array.from(t,Number),this):this._domain.slice()},t.prototype.nice=function(t){var e,n;void 0===t&&(t=yn);var r,i=this._domain.slice(),a=0,o=this._domain.length-1,s=this._domain[a],l=this._domain[o];return l0?(s=Math.floor(s/r)*r,l=Math.ceil(l/r)*r,r=Sn(s,l,t)):r<0&&(s=Math.ceil(s*r)/r,l=Math.floor(l*r)/r,r=Sn(s,l,t)),r>0?(i[a]=Math.floor(s/r)*r,i[o]=Math.ceil(l/r)*r,this.domain(i)):r<0&&(i[a]=Math.ceil(s*r)/r,i[o]=Math.floor(l*r)/r,this.domain(i)),this},t.prototype.ticks=function(t){return void 0===t&&(t=yn),Cn(this._domain[0],this._domain[this._domain.length-1],t||yn)},t}();function Cn(t,e,n){var r,i,a,o,s=-1;if(e=+e,t=+t,n=+n,t===e&&n>0)return[t];if((r=e0){t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));while(++s=0?(a>=bn?10:a>=xn?5:a>=wn?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=bn?10:a>=xn?5:a>=wn?2:1)}function An(t,e,n){var r;return r="ceil"===n?Math.ceil(t/e):"floor"===n?Math.floor(t/e):Math.round(t/e),r*e}function kn(t,e,n){var r=An(t,n,"floor"),i=An(e,n,"ceil");r=(0,x.fixedBase)(r,n),i=(0,x.fixedBase)(i,n);for(var a=[],o=Math.max((i-r)/(Math.pow(2,12)-1),n),s=r;s<=i;s+=o){var l=(0,x.fixedBase)(s,o);a.push(l)}return{min:r,max:i,ticks:a}}function En(t,e,n){var r,i=t.minLimit,a=t.maxLimit,o=t.min,s=t.max,l=t.tickCount,u=void 0===l?5:l,c=(0,x.isNil)(i)?(0,x.isNil)(e)?o:e:i,d=(0,x.isNil)(a)?(0,x.isNil)(n)?s:n:a;if(c>d&&(r=[c,d],d=r[0],c=r[1]),u<=2)return[c,d];for(var h=(d-c)/(u-1),f=[],p=0;p=0&&(l=1),1-s/(o-1)-n+l}function In(t,e,n){var r=(0,x.size)(e),i=(0,x.indexOf)(e,t),a=1;return 1-i/(r-1)-n+a}function Ln(t,e,n,r,i,a){var o=(t-1)/(a-i),s=(e-1)/(Math.max(a,r)-Math.min(n,i));return 2-Math.max(o/s,s/o)}function Rn(t,e){return t>=e?2-(t-1)/(e-1):1}function Nn(t,e,n,r){var i=e-t;return 1-.5*(Math.pow(e-r,2)+Math.pow(t-n,2))/Math.pow(.1*i,2)}function zn(t,e,n){var r=e-t;if(n>r){var i=(n-r)/2;return 1-Math.pow(i,2)/Math.pow(.1*r,2)}return 1}function jn(){return 1}function $n(t,e,n,r,i,a){void 0===n&&(n=5),void 0===r&&(r=!0),void 0===i&&(i=Mn),void 0===a&&(a=[.25,.2,.5,.05]);var o=n<0?0:Math.round(n);if(Number.isNaN(t)||Number.isNaN(e)||"number"!==typeof t||"number"!==typeof e||!o)return{min:0,max:0,ticks:[]};if(e-t<1e-15||1===o)return{min:t,max:e,ticks:[t]};if(e-t>1e148){var s=n||5,l=(e-t)/s;return{min:t,max:e,ticks:Array(s).fill(null).map((function(e,n){return Fn(t+l*n)}))}}var u={score:-2,lmin:0,lmax:0,lstep:0},c=1;while(c<1/0){for(var d=0;du.score&&(!r||A<=t&&k>=e)&&(u.lmin=A,u.lmax=k,u.lstep=E,u.score=B)}}v+=1}p+=1}}c+=1}var T=Fn(u.lmax),P=Fn(u.lmin),I=Fn(u.lstep),L=Math.floor(Tn((T-P)/I))+1,R=new Array(L);R[0]=Fn(P);for(d=1;d0)e=Math.floor(Qe(n,i));else{var l=Je(o,n,a);e=Math.floor(Qe(n,l))}for(var u=s-e,c=Math.ceil(u/r),d=[],h=e;h=0?1:-1;return Math.pow(t,e)*n}))}function Gn(t,e){var n=t.length*e;return 1===e?t[t.length-1]:0===e?t[0]:n%1!==0?t[Math.ceil(n)-1]:t.length%2===0?(t[n-1]+t[n])/2:t[n]}function Wn(t){var e=t.tickCount,n=t.values;if(!n||!n.length)return[];for(var r=n.slice().sort((function(t,e){return t-e})),i=[],a=0;a1&&(i*=Math.ceil(s)),r&&iVe)for(var l=Kn(n),u=Math.ceil(a/Ve),c=s;c<=l+u;c+=u)o.push(Qn(c));else if(a>$e){var d=Math.ceil(a/$e),h=Jn(e),f=tr(e,n);for(c=0;c<=f+d;c+=d)o.push(er(s,c+h))}else if(a>je){var p=new Date(e),g=p.getFullYear(),m=p.getMonth(),v=p.getDate(),y=Math.ceil(a/je),b=nr(e,n);for(c=0;cze){p=new Date(e),g=p.getFullYear(),m=p.getMonth(),y=p.getDate();var x=p.getHours(),w=Math.ceil(a/ze),_=rr(e,n);for(c=0;c<=_+w;c+=w)o.push(new Date(g,m,y,x+c).getTime())}else if(a>Ne){var C=ir(e,n),S=Math.ceil(a/Ne);for(c=0;c<=C+S;c+=S)o.push(e+c*Ne)}else{var A=a;A=512&&console.warn("Notice: current ticks length("+o.length+') >= 512, may cause performance issues, even out of memory. Because of the configure "tickInterval"(in milliseconds, current is '+a+") is too small, increase the value to solve the problem!"),o}Yt("cat",mn),Yt("time-cat",Yn),Yt("wilkinson-extended",Vn),Yt("r-pretty",Zn),Yt("time",Xn),Yt("time-pretty",ar),Yt("log",qn),Yt("pow",Un),Yt("quantile",Wn),Yt("d3-linear",Dn),fn("cat",te),fn("category",te),fn("identity",gn),fn("linear",Ye),fn("log",en),fn("pow",rn),fn("time",on),fn("timeCat",Ge),fn("quantize",ln),fn("quantile",cn);var or={},sr=function(t){return or[t.toLowerCase()]},lr=function(t,e){if(sr(t))throw new Error("Attribute type '"+t+"' existed.");or[t.toLowerCase()]=e};lr("Color",zt),lr("Opacity",$t),lr("Position",qt),lr("Shape",Ut),lr("Size",Wt);var ur=n(77160),cr=n(35600),dr=n(31506),hr=function(){function t(t){this.type="coordinate",this.isRect=!1,this.isHelix=!1,this.isPolar=!1,this.isReflectX=!1,this.isReflectY=!1;var e=t.start,n=t.end,r=t.matrix,i=void 0===r?[1,0,0,0,1,0,0,0,1]:r,a=t.isTransposed,o=void 0!==a&&a;this.start=e,this.end=n,this.matrix=i,this.originalMatrix=(0,b.__spreadArray)([],i),this.isTransposed=o}return t.prototype.initial=function(){this.center={x:(this.start.x+this.end.x)/2,y:(this.start.y+this.end.y)/2},this.width=Math.abs(this.end.x-this.start.x),this.height=Math.abs(this.end.y-this.start.y)},t.prototype.update=function(t){(0,x.assign)(this,t),this.initial()},t.prototype.convertDim=function(t,e){var n,r=this[e],i=r.start,a=r.end;return this.isReflect(e)&&(n=[a,i],i=n[0],a=n[1]),i+t*(a-i)},t.prototype.invertDim=function(t,e){var n,r=this[e],i=r.start,a=r.end;return this.isReflect(e)&&(n=[a,i],i=n[0],a=n[1]),(t-i)/(a-i)},t.prototype.applyMatrix=function(t,e,n){void 0===n&&(n=0);var r=this.matrix,i=[t,e,n];return ur.transformMat3(i,i,r),i},t.prototype.invertMatrix=function(t,e,n){void 0===n&&(n=0);var r=this.matrix,i=cr.invert([0,0,0,0,0,0,0,0,0],r),a=[t,e,n];return i&&ur.transformMat3(a,a,i),a},t.prototype.convert=function(t){var e=this.convertPoint(t),n=e.x,r=e.y,i=this.applyMatrix(n,r,1);return{x:i[0],y:i[1]}},t.prototype.invert=function(t){var e=this.invertMatrix(t.x,t.y,1);return this.invertPoint({x:e[0],y:e[1]})},t.prototype.rotate=function(t){var e=this.matrix,n=this.center;return dr.leftTranslate(e,e,[-n.x,-n.y]),dr.leftRotate(e,e,t),dr.leftTranslate(e,e,[n.x,n.y]),this},t.prototype.reflect=function(t){return"x"===t?this.isReflectX=!this.isReflectX:this.isReflectY=!this.isReflectY,this},t.prototype.scale=function(t,e){var n=this.matrix,r=this.center;return dr.leftTranslate(n,n,[-r.x,-r.y]),dr.leftScale(n,n,[t,e]),dr.leftTranslate(n,n,[r.x,r.y]),this},t.prototype.translate=function(t,e){var n=this.matrix;return dr.leftTranslate(n,n,[t,e]),this},t.prototype.transpose=function(){return this.isTransposed=!this.isTransposed,this},t.prototype.getCenter=function(){return this.center},t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.getRadius=function(){return this.radius},t.prototype.isReflect=function(t){return"x"===t?this.isReflectX:this.isReflectY},t.prototype.resetMatrix=function(t){this.matrix=t||(0,b.__spreadArray)([],this.originalMatrix)},t}(),fr=hr,pr=function(t){function e(e){var n=t.call(this,e)||this;return n.isRect=!0,n.type="cartesian",n.initial(),n}return(0,b.__extends)(e,t),e.prototype.initial=function(){t.prototype.initial.call(this);var e=this.start,n=this.end;this.x={start:e.x,end:n.x},this.y={start:e.y,end:n.y}},e.prototype.convertPoint=function(t){var e,n=t.x,r=t.y;return this.isTransposed&&(e=[r,n],n=e[0],r=e[1]),{x:this.convertDim(n,"x"),y:this.convertDim(r,"y")}},e.prototype.invertPoint=function(t){var e,n=this.invertDim(t.x,"x"),r=this.invertDim(t.y,"y");return this.isTransposed&&(e=[r,n],n=e[0],r=e[1]),{x:n,y:r}},e}(fr),gr=pr,mr=n(31437),vr=function(t){function e(e){var n=t.call(this,e)||this;n.isHelix=!0,n.type="helix";var r=e.startAngle,i=void 0===r?1.25*Math.PI:r,a=e.endAngle,o=void 0===a?7.25*Math.PI:a,s=e.innerRadius,l=void 0===s?0:s,u=e.radius;return n.startAngle=i,n.endAngle=o,n.innerRadius=l,n.radius=u,n.initial(),n}return(0,b.__extends)(e,t),e.prototype.initial=function(){t.prototype.initial.call(this);var e=(this.endAngle-this.startAngle)/(2*Math.PI)+1,n=Math.min(this.width,this.height)/2;this.radius&&this.radius>=0&&this.radius<=1&&(n*=this.radius),this.d=Math.floor(n*(1-this.innerRadius)/e),this.a=this.d/(2*Math.PI),this.x={start:this.startAngle,end:this.endAngle},this.y={start:this.innerRadius*n,end:this.innerRadius*n+.99*this.d}},e.prototype.convertPoint=function(t){var e,n=t.x,r=t.y;this.isTransposed&&(e=[r,n],n=e[0],r=e[1]);var i=this.convertDim(n,"x"),a=this.a*i,o=this.convertDim(r,"y");return{x:this.center.x+Math.cos(i)*(a+o),y:this.center.y+Math.sin(i)*(a+o)}},e.prototype.invertPoint=function(t){var e,n=this.d+this.y.start,r=mr.subtract([0,0],[t.x,t.y],[this.center.x,this.center.y]),i=dr.angleTo(r,[1,0],!0),a=i*this.a;mr.length(r)this.width/r?(e=this.width/r,this.circleCenter={x:this.center.x-(.5-a)*this.width,y:this.center.y-(.5-o)*e*i}):(e=this.height/i,this.circleCenter={x:this.center.x-(.5-a)*e*r,y:this.center.y-(.5-o)*this.height}),this.polarRadius=this.radius,this.radius?this.radius>0&&this.radius<=1?this.polarRadius=e*this.radius:(this.radius<=0||this.radius>e)&&(this.polarRadius=e):this.polarRadius=e,this.x={start:this.startAngle,end:this.endAngle},this.y={start:this.innerRadius*this.polarRadius,end:this.polarRadius}},e.prototype.getRadius=function(){return this.polarRadius},e.prototype.convertPoint=function(t){var e,n=this.getCenter(),r=t.x,i=t.y;return this.isTransposed&&(e=[i,r],r=e[0],i=e[1]),r=this.convertDim(r,"x"),i=this.convertDim(i,"y"),{x:n.x+Math.cos(r)*i,y:n.y+Math.sin(r)*i}},e.prototype.invertPoint=function(t){var e,n=this.getCenter(),r=[t.x-n.x,t.y-n.y],i=this,a=i.startAngle,o=i.endAngle;this.isReflect("x")&&(e=[o,a],a=e[0],o=e[1]);var s=[1,0,0,0,1,0,0,0,1];dr.leftRotate(s,s,a);var l=[1,0,0];ur.transformMat3(l,l,s);var u=[l[0],l[1]],c=dr.angleTo(u,r,o0?h:-h;var f=this.invertDim(d,"y"),p={x:0,y:0};return p.x=this.isTransposed?f:h,p.y=this.isTransposed?h:f,p},e.prototype.getCenter=function(){return this.circleCenter},e.prototype.getOneBox=function(){var t=this.startAngle,e=this.endAngle;if(Math.abs(e-t)>=2*Math.PI)return{minX:-1,maxX:1,minY:-1,maxY:1};for(var n=[0,Math.cos(t),Math.cos(e)],r=[0,Math.sin(t),Math.sin(e)],i=Math.min(t,e);i=0;r--)t.removeChild(e[r])}function Ir(t,e){return!!t.className.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))}function Lr(t){var e=t.start,n=t.end,r=Math.min(e.x,n.x),i=Math.min(e.y,n.y),a=Math.max(e.x,n.x),o=Math.max(e.y,n.y);return{x:r,y:i,minX:r,minY:i,maxX:a,maxY:o,width:a-r,height:o-i}}function Rr(t){var e=t.map((function(t){return t.x})),n=t.map((function(t){return t.y})),r=Math.min.apply(Math,e),i=Math.min.apply(Math,n),a=Math.max.apply(Math,e),o=Math.max.apply(Math,n);return{x:r,y:i,minX:r,minY:i,maxX:a,maxY:o,width:a-r,height:o-i}}function Nr(t,e,n,r){var i=t+n,a=e+r;return{x:t,y:e,width:n,height:r,minX:t,minY:e,maxX:isNaN(i)?0:i,maxY:isNaN(a)?0:a}}function zr(t,e,n){return(1-n)*t+e*n}function jr(t,e,n){return{x:t.x+Math.cos(n)*e,y:t.y+Math.sin(n)*e}}function $r(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}var Vr=function(t,e,n){return void 0===n&&(n=Math.pow(Number.EPSILON,.5)),[t,e].includes(1/0)?Math.abs(t)===Math.abs(e):Math.abs(t-e)0?(0,x.each)(l,(function(t){if(t.get("visible")){if(t.isGroup()&&0===t.get("children").length)return!0;var e=Hr(t),n=t.applyToMatrix([e.minX,e.minY,1]),r=t.applyToMatrix([e.minX,e.maxY,1]),l=t.applyToMatrix([e.maxX,e.minY,1]),u=t.applyToMatrix([e.maxX,e.maxY,1]),c=Math.min(n[0],r[0],l[0],u[0]),d=Math.max(n[0],r[0],l[0],u[0]),h=Math.min(n[1],r[1],l[1],u[1]),f=Math.max(n[1],r[1],l[1],u[1]);ca&&(a=d),hs&&(s=f)}})):(i=0,a=0,o=0,s=0),e=Nr(i,o,a-i,s-o)}else e=t.getBBox();return r?qr(e,r):e}function Ur(t,e){if(t.getClip()||e.getClip()){var n=e.getClip();if(n){var r={type:n.get("type"),attrs:n.attr()};t.setClip(r)}else t.setClip(null)}}function Gr(t){return t+"px"}function Wr(t,e,n,r){var i=$r(t,e),a=r/i,o=0;return"start"===n?o=0-a:"end"===n&&(o=1+a),{x:zr(t.x,e.x,o),y:zr(t.y,e.y,o)}}var Zr={none:[],point:["x","y"],region:["start","end"],points:["points"],circle:["center","radius","startAngle","endAngle"]},Xr=function(t){function e(e){var n=t.call(this,e)||this;return n.initCfg(),n}return(0,b.__extends)(e,t),e.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}},e.prototype.clear=function(){},e.prototype.update=function(t){var e=this,n=this.get("defaultCfg")||{};(0,x.each)(t,(function(t,r){var i=e.get(r),a=t;i!==t&&((0,x.isObject)(t)&&n[r]&&(a=(0,x.deepMix)({},n[r],t)),e.set(r,a))})),this.updateInner(t),this.afterUpdate(t)},e.prototype.updateInner=function(t){},e.prototype.afterUpdate=function(t){(0,x.hasKey)(t,"visible")&&(t.visible?this.show():this.hide()),(0,x.hasKey)(t,"capture")&&this.setCapture(t.capture)},e.prototype.getLayoutBBox=function(){return this.getBBox()},e.prototype.getLocationType=function(){return this.get("locationType")},e.prototype.getOffset=function(){return{offsetX:this.get("offsetX"),offsetY:this.get("offsetY")}},e.prototype.setOffset=function(t,e){this.update({offsetX:t,offsetY:e})},e.prototype.setLocation=function(t){var e=(0,b.__assign)({},t);this.update(e)},e.prototype.getLocation=function(){var t=this,e={},n=this.get("locationType"),r=Zr[n];return(0,x.each)(r,(function(n){e[n]=t.get(n)})),e},e.prototype.isList=function(){return!1},e.prototype.isSlider=function(){return!1},e.prototype.init=function(){},e.prototype.initCfg=function(){var t=this,e=this.get("defaultCfg");(0,x.each)(e,(function(e,n){var r=t.get(n);if((0,x.isObject)(r)){var i=(0,x.deepMix)({},e,r);t.set(n,i)}}))},e}(Z.Base),Yr=Xr,Kr="update_status",Qr=["visible","tip","delegateObject"],Jr=["container","group","shapesMap","isRegister","isUpdating","destroyed"],ti=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,b.__assign)((0,b.__assign)({},e),{container:null,shapesMap:{},group:null,capture:!0,isRegister:!1,isUpdating:!1,isInit:!0})},e.prototype.remove=function(){this.clear();var t=this.get("group");t.remove()},e.prototype.clear=function(){var t=this.get("group");t.clear(),this.set("shapesMap",{}),this.clearOffScreenCache(),this.set("isInit",!0)},e.prototype.getChildComponentById=function(t){var e=this.getElementById(t),n=e&&e.get("component");return n},e.prototype.getElementById=function(t){return this.get("shapesMap")[t]},e.prototype.getElementByLocalId=function(t){var e=this.getElementId(t);return this.getElementById(e)},e.prototype.getElementsByName=function(t){var e=[];return(0,x.each)(this.get("shapesMap"),(function(n){n.get("name")===t&&e.push(n)})),e},e.prototype.getContainer=function(){return this.get("container")},e.prototype.updateInner=function(t){this.offScreenRender(),this.get("updateAutoRender")&&this.render()},e.prototype.render=function(){var t=this.get("offScreenGroup");t||(t=this.offScreenRender());var e=this.get("group");this.updateElements(t,e),this.deleteElements(),this.applyOffset(),this.get("eventInitted")||(this.initEvent(),this.set("eventInitted",!0)),this.set("isInit",!1)},e.prototype.show=function(){var t=this.get("group");t.show(),this.set("visible",!0)},e.prototype.hide=function(){var t=this.get("group");t.hide(),this.set("visible",!1)},e.prototype.setCapture=function(t){var e=this.get("group");e.set("capture",t),this.set("capture",t)},e.prototype.destroy=function(){this.removeEvent(),this.remove(),t.prototype.destroy.call(this)},e.prototype.getBBox=function(){return this.get("group").getCanvasBBox()},e.prototype.getLayoutBBox=function(){var t=this.get("group"),e=this.getInnerLayoutBBox(),n=t.getTotalMatrix();return n&&(e=Mr(n,e)),e},e.prototype.on=function(t,e,n){var r=this.get("group");return r.on(t,e,n),this},e.prototype.off=function(t,e){var n=this.get("group");return n&&n.off(t,e),this},e.prototype.emit=function(t,e){var n=this.get("group");n.emit(t,e)},e.prototype.init=function(){t.prototype.init.call(this),this.get("group")||this.initGroup(),this.offScreenRender()},e.prototype.getInnerLayoutBBox=function(){return this.get("offScreenBBox")||this.get("group").getBBox()},e.prototype.delegateEmit=function(t,e){var n=this.get("group");e.target=n,n.emit(t,e),Sr(n,t,e)},e.prototype.createOffScreenGroup=function(){var t=this.get("group"),e=t.getGroupBase(),n=new e({delegateObject:this.getDelegateObject()});return n},e.prototype.applyOffset=function(){var t=this.get("offsetX"),e=this.get("offsetY");this.moveElementTo(this.get("group"),{x:t,y:e})},e.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()}))},e.prototype.offScreenRender=function(){this.clearOffScreenCache();var t=this.createOffScreenGroup();return this.renderInner(t),this.set("offScreenGroup",t),this.set("offScreenBBox",Hr(t)),t},e.prototype.addGroup=function(t,e){this.appendDelegateObject(t,e);var n=t.addGroup(e);return this.get("isRegister")&&this.registerElement(n),n},e.prototype.addShape=function(t,e){this.appendDelegateObject(t,e);var n=t.addShape(e);return this.get("isRegister")&&this.registerElement(n),n},e.prototype.addComponent=function(t,e){var n=e.id,r=e.component,i=(0,b.__rest)(e,["id","component"]),a=new r((0,b.__assign)((0,b.__assign)({},i),{id:n,container:t,updateAutoRender:this.get("updateAutoRender")}));return a.init(),a.render(),this.get("isRegister")&&this.registerElement(a.get("group")),a},e.prototype.initEvent=function(){},e.prototype.removeEvent=function(){var t=this.get("group");t.off()},e.prototype.getElementId=function(t){var e=this.get("id"),n=this.get("name");return e+"-"+n+"-"+t},e.prototype.registerElement=function(t){var e=t.get("id");this.get("shapesMap")[e]=t},e.prototype.unregisterElement=function(t){var e=t.get("id");delete this.get("shapesMap")[e]},e.prototype.moveElementTo=function(t,e){var n=Er(e);t.attr("matrix",n)},e.prototype.addAnimation=function(t,e,n){var r=e.attr("opacity");(0,x.isNil)(r)&&(r=1),e.attr("opacity",0),e.animate({opacity:r},n)},e.prototype.removeAnimation=function(t,e,n){e.animate({opacity:0},n)},e.prototype.updateAnimation=function(t,e,n,r){e.animate(n,r)},e.prototype.updateElements=function(t,e){var n,r=this,i=this.get("animate"),a=this.get("animateOption"),o=t.getChildren().slice(0);(0,x.each)(o,(function(t){var o=t.get("id"),s=r.getElementById(o),l=t.get("name");if(s)if(t.get("isComponent")){var u=t.get("component"),c=s.get("component"),d=(0,x.pick)(u.cfg,(0,x.difference)((0,x.keys)(u.cfg),Jr));c.update(d),s.set(Kr,"update")}else{var h=r.getReplaceAttrs(s,t);i&&a.update?r.updateAnimation(l,s,h,a.update):s.attr(h),t.isGroup()&&r.updateElements(t,s),(0,x.each)(Qr,(function(e){s.set(e,t.get(e))})),Ur(s,t),n=s,s.set(Kr,"update")}else{e.add(t);var f=e.getChildren();if(f.splice(f.length-1,1),n){var p=f.indexOf(n);f.splice(p+1,0,t)}else f.unshift(t);if(r.registerElement(t),t.set(Kr,"add"),t.get("isComponent")){u=t.get("component");u.set("container",e)}else t.isGroup()&&r.registerNewGroup(t);if(n=t,i){var g=r.get("isInit")?a.appear:a.enter;g&&r.addAnimation(l,t,g)}}}))},e.prototype.clearUpdateStatus=function(t){var e=t.getChildren();(0,x.each)(e,(function(t){t.set(Kr,null)}))},e.prototype.clearOffScreenCache=function(){var t=this.get("offScreenGroup");t&&t.destroy(),this.set("offScreenGroup",null),this.set("offScreenBBox",null)},e.prototype.getDelegateObject=function(){var t,e=this.get("name"),n=(t={},t[e]=this,t.component=this,t);return n},e.prototype.appendDelegateObject=function(t,e){var n=t.get("delegateObject");e.delegateObject||(e.delegateObject={}),(0,x.mix)(e.delegateObject,n)},e.prototype.getReplaceAttrs=function(t,e){var n=t.attr(),r=e.attr();return(0,x.each)(n,(function(t,e){void 0===r[e]&&(r[e]=void 0)})),r},e.prototype.registerNewGroup=function(t){var e=this,n=t.getChildren();(0,x.each)(n,(function(t){e.registerElement(t),t.set(Kr,"add"),t.isGroup()&&e.registerNewGroup(t)}))},e.prototype.deleteElements=function(){var t=this,e=this.get("shapesMap"),n=[];(0,x.each)(e,(function(t,e){!t.get(Kr)||t.destroyed?n.push([e,t]):t.set(Kr,null)}));var r=this.get("animate"),i=this.get("animateOption");(0,x.each)(n,(function(n){var a=n[0],o=n[1];if(!o.destroyed){var s=o.get("name");if(r&&i.leave){var l=(0,x.mix)({callback:function(){t.removeElement(o)}},i.leave);t.removeAnimation(s,o,l)}else t.removeElement(o)}delete e[a]}))},e.prototype.removeElement=function(t){if(t.get("isGroup")){var e=t.get("component");e&&e.destroy()}t.remove()},e}(Yr),ei=ti,ni="…";function ri(t){for(var e=0,n=0;n0&&t.charCodeAt(e)<128?1:2}function ai(t,e,n){void 0===n&&(n="tail");var r=t.length,i="";if("tail"===n){for(var a=0,o=0;a=19968&&s<=40869?2:1}a>n&&(n=a,r=i)}return t[r].getBBox().width}function ci(t){if(t.length>li)return ui(t);var e=0;return(0,x.each)(t,(function(t){var n=t.getBBox(),r=n.width;e=0?ai(a,d,r):oi,h&&(e.attr("text",h),c=!0)}return c?e.set("tip",a):e.set("tip",null),c}function fi(t,e){var n=e.x,r=e.y,i=e.content,a=e.style,o=e.id,s=e.name,l=e.rotate,u=e.maxLength,c=e.autoEllipsis,d=e.isVertical,h=e.ellipsisPosition,f=e.background,p=t.addGroup({id:o+"-group",name:s+"-group",attrs:{x:n,y:r}}),g=p.addShape({type:"text",id:o,name:s,attrs:(0,b.__assign)({x:0,y:0,text:i},a)}),m=Tr((0,x.get)(f,"padding",0));if(u&&c){var v=u-(m[1]+m[3]);hi(!d,g,v,h)}if(f){var y=(0,x.get)(f,"style",{}),w=g.getCanvasBBox(),_=w.minX,C=w.minY,S=w.width,A=w.height,k=p.addShape("rect",{id:o+"-bg",name:o+"-bg",attrs:(0,b.__assign)({x:_-m[3],y:C-m[0],width:S+m[1]+m[3],height:A+m[0]+m[2]},y)});k.toBack()}Br(p,n,r),Or(p,l,n,r)}var pi={fontFamily:'\n BlinkMacSystemFont, "Segoe UI", Roboto,"Helvetica Neue",\n Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",\n SimSun, "sans-serif"',textColor:"#2C3542",activeTextColor:"#333333",uncheckedColor:"#D8D8D8",lineColor:"#416180",regionColor:"#CCD7EB",verticalAxisRotate:-Math.PI/4,horizontalAxisRotate:Math.PI/4,descriptionIconStroke:"#fff",descriptionIconFill:"rgba(58, 73, 101, .25)"},gi=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,b.__assign)((0,b.__assign)({},e),{name:"annotation",type:"line",locationType:"region",start:null,end:null,style:{},text:null,defaultCfg:{style:{fill:pi.textColor,fontSize:12,textAlign:"center",textBaseline:"bottom",fontFamily:pi.fontFamily},text:{position:"center",autoRotate:!0,content:null,offsetX:0,offsetY:0,style:{stroke:pi.lineColor,lineWidth:1}}}})},e.prototype.renderInner=function(t){this.renderLine(t),this.get("text")&&this.renderLabel(t)},e.prototype.renderLine=function(t){var e=this.get("start"),n=this.get("end"),r=this.get("style");this.addShape(t,{type:"line",id:this.getElementId("line"),name:"annotation-line",attrs:(0,b.__assign)({x1:e.x,y1:e.y,x2:n.x,y2:n.y},r)})},e.prototype.getLabelPoint=function(t,e,n){var r;return r="start"===n?0:"center"===n?.5:(0,x.isString)(n)&&-1!==n.indexOf("%")?parseInt(n,10)/100:(0,x.isNumber)(n)?n:1,(r>1||r<0)&&(r=1),{x:zr(t.x,e.x,r),y:zr(t.y,e.y,r)}},e.prototype.renderLabel=function(t){var e=this.get("text"),n=this.get("start"),r=this.get("end"),i=e.position,a=e.content,o=e.style,s=e.offsetX,l=e.offsetY,u=e.autoRotate,c=e.maxLength,d=e.autoEllipsis,h=e.ellipsisPosition,f=e.background,p=e.isVertical,g=void 0!==p&&p,m=this.getLabelPoint(n,r,i),v=m.x+s,y=m.y+l,b={id:this.getElementId("line-text"),name:"annotation-line-text",x:v,y:y,content:a,style:o,maxLength:c,autoEllipsis:d,ellipsisPosition:h,background:f,isVertical:g};if(u){var x=[r.x-n.x,r.y-n.y];b.rotate=Math.atan2(x[1],x[0])}fi(t,b)},e}(ei),mi=gi,vi=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,b.__assign)((0,b.__assign)({},e),{name:"annotation",type:"text",locationType:"point",x:0,y:0,content:"",rotate:null,style:{},background:null,maxLength:null,autoEllipsis:!0,isVertical:!1,ellipsisPosition:"tail",defaultCfg:{style:{fill:pi.textColor,fontSize:12,textAlign:"center",textBaseline:"middle",fontFamily:pi.fontFamily}}})},e.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetLocation()},e.prototype.renderInner=function(t){var e=this.getLocation(),n=e.x,r=e.y,i=this.get("content"),a=this.get("style"),o=this.getElementId("text"),s=this.get("name")+"-text",l=this.get("maxLength"),u=this.get("autoEllipsis"),c=this.get("isVertical"),d=this.get("ellipsisPosition"),h=this.get("background"),f=this.get("rotate"),p={id:o,name:s,x:n,y:r,content:i,style:a,maxLength:l,autoEllipsis:u,isVertical:c,ellipsisPosition:d,background:h,rotate:f};fi(t,p)},e.prototype.resetLocation=function(){var t=this.getElementByLocalId("text-group");if(t){var e=this.getLocation(),n=e.x,r=e.y,i=this.get("rotate");Br(t,n,r),Or(t,i,n,r)}},e}(ei),yi=vi,bi=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,b.__assign)((0,b.__assign)({},e),{name:"annotation",type:"arc",locationType:"circle",center:null,radius:100,startAngle:-Math.PI/2,endAngle:3*Math.PI/2,style:{stroke:"#999",lineWidth:1}})},e.prototype.renderInner=function(t){this.renderArc(t)},e.prototype.getArcPath=function(){var t=this.getLocation(),e=t.center,n=t.radius,r=t.startAngle,i=t.endAngle,a=jr(e,n,r),o=jr(e,n,i),s=i-r>Math.PI?1:0,l=[["M",a.x,a.y]];if(i-r===2*Math.PI){var u=jr(e,n,r+Math.PI);l.push(["A",n,n,0,s,1,u.x,u.y]),l.push(["A",n,n,0,s,1,o.x,o.y])}else l.push(["A",n,n,0,s,1,o.x,o.y]);return l},e.prototype.renderArc=function(t){var e=this.getArcPath(),n=this.get("style");this.addShape(t,{type:"path",id:this.getElementId("arc"),name:"annotation-arc",attrs:(0,b.__assign)({path:e},n)})},e}(ei),xi=bi,wi=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,b.__assign)((0,b.__assign)({},e),{name:"annotation",type:"region",locationType:"region",start:null,end:null,style:{},defaultCfg:{style:{lineWidth:0,fill:pi.regionColor,opacity:.4}}})},e.prototype.renderInner=function(t){this.renderRegion(t)},e.prototype.renderRegion=function(t){var e=this.get("start"),n=this.get("end"),r=this.get("style"),i=Lr({start:e,end:n});this.addShape(t,{type:"rect",id:this.getElementId("region"),name:"annotation-region",attrs:(0,b.__assign)({x:i.x,y:i.y,width:i.width,height:i.height},r)})},e}(ei),_i=wi,Ci=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,b.__assign)((0,b.__assign)({},e),{name:"annotation",type:"image",locationType:"region",start:null,end:null,src:null,style:{}})},e.prototype.renderInner=function(t){this.renderImage(t)},e.prototype.getImageAttrs=function(){var t=this.get("start"),e=this.get("end"),n=this.get("style"),r=Lr({start:t,end:e}),i=this.get("src");return(0,b.__assign)({x:r.x,y:r.y,img:i,width:r.width,height:r.height},n)},e.prototype.renderImage=function(t){this.addShape(t,{type:"image",id:this.getElementId("image"),name:"annotation-image",attrs:this.getImageAttrs()})},e}(ei),Si=Ci,Ai=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,b.__assign)((0,b.__assign)({},e),{name:"annotation",type:"dataMarker",locationType:"point",x:0,y:0,point:{},line:{},text:{},direction:"upward",autoAdjust:!0,coordinateBBox:null,defaultCfg:{point:{display:!0,style:{r:3,fill:"#FFFFFF",stroke:"#1890FF",lineWidth:2}},line:{display:!0,length:20,style:{stroke:pi.lineColor,lineWidth:1}},text:{content:"",display:!0,style:{fill:pi.textColor,opacity:.65,fontSize:12,textAlign:"start",fontFamily:pi.fontFamily}}}})},e.prototype.renderInner=function(t){(0,x.get)(this.get("line"),"display")&&this.renderLine(t),(0,x.get)(this.get("text"),"display")&&this.renderText(t),(0,x.get)(this.get("point"),"display")&&this.renderPoint(t),this.get("autoAdjust")&&this.autoAdjust(t)},e.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x")+this.get("offsetX"),y:this.get("y")+this.get("offsetY")})},e.prototype.renderPoint=function(t){var e=this.getShapeAttrs().point;this.addShape(t,{type:"circle",id:this.getElementId("point"),name:"annotation-point",attrs:e})},e.prototype.renderLine=function(t){var e=this.getShapeAttrs().line;this.addShape(t,{type:"path",id:this.getElementId("line"),name:"annotation-line",attrs:e})},e.prototype.renderText=function(t){var e=this.getShapeAttrs().text,n=e.x,r=e.y,i=e.text,a=(0,b.__rest)(e,["x","y","text"]),o=this.get("text"),s=o.background,l=o.maxLength,u=o.autoEllipsis,c=o.isVertival,d=o.ellipsisPosition,h={x:n,y:r,id:this.getElementId("text"),name:"annotation-text",content:i,style:a,background:s,maxLength:l,autoEllipsis:u,isVertival:c,ellipsisPosition:d};fi(t,h)},e.prototype.autoAdjust=function(t){var e=this.get("direction"),n=this.get("x"),r=this.get("y"),i=(0,x.get)(this.get("line"),"length",0),a=this.get("coordinateBBox"),o=t.getBBox(),s=o.minX,l=o.maxX,u=o.minY,c=o.maxY,d=t.findById(this.getElementId("text-group")),h=t.findById(this.getElementId("text")),f=t.findById(this.getElementId("line"));if(a){if(d){if(n+s<=a.minX){var p=a.minX-(n+s);Br(d,d.attr("x")+p,d.attr("y"))}if(n+l>=a.maxX){p=n+l-a.maxX;Br(d,d.attr("x")-p,d.attr("y"))}}if("upward"===e&&r+u<=a.minY||"upward"!==e&&r+c>=a.maxY){var g=void 0,m=void 0;"upward"===e&&r+u<=a.minY?(g="top",m=1):(g="bottom",m=-1),h.attr("textBaseline",g),f&&f.attr("path",[["M",0,0],["L",0,i*m]]),Br(d,d.attr("x"),(i+2)*m)}}},e.prototype.getShapeAttrs=function(){var t=(0,x.get)(this.get("line"),"display"),e=(0,x.get)(this.get("point"),"style",{}),n=(0,x.get)(this.get("line"),"style",{}),r=(0,x.get)(this.get("text"),"style",{}),i=this.get("direction"),a=t?(0,x.get)(this.get("line"),"length",0):0,o="upward"===i?-1:1;return{point:(0,b.__assign)({x:0,y:0},e),line:(0,b.__assign)({path:[["M",0,0],["L",0,a*o]]},n),text:(0,b.__assign)({x:0,y:(a+2)*o,text:(0,x.get)(this.get("text"),"content",""),textBaseline:"upward"===i?"bottom":"top"},r)}},e}(ei),ki=Ai,Ei=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,b.__assign)((0,b.__assign)({},e),{name:"annotation",type:"dataRegion",locationType:"points",points:[],lineLength:0,region:{},text:{},defaultCfg:{region:{style:{lineWidth:0,fill:pi.regionColor,opacity:.4}},text:{content:"",style:{textAlign:"center",textBaseline:"bottom",fontSize:12,fill:pi.textColor,fontFamily:pi.fontFamily}}}})},e.prototype.renderInner=function(t){var e=(0,x.get)(this.get("region"),"style",{}),n=((0,x.get)(this.get("text"),"style",{}),this.get("lineLength")||0),r=this.get("points");if(r.length){var i=Rr(r),a=[];a.push(["M",r[0].x,i.minY-n]),r.forEach((function(t){a.push(["L",t.x,t.y])})),a.push(["L",r[r.length-1].x,r[r.length-1].y-n]),this.addShape(t,{type:"path",id:this.getElementId("region"),name:"annotation-region",attrs:(0,b.__assign)({path:a},e)});var o=(0,b.__assign)({id:this.getElementId("text"),name:"annotation-text",x:(i.minX+i.maxX)/2,y:i.minY-n},this.get("text"));fi(t,o)}},e}(ei),Di=Ei,Fi=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,b.__assign)((0,b.__assign)({},e),{name:"annotation",type:"regionFilter",locationType:"region",start:null,end:null,color:null,shape:[]})},e.prototype.renderInner=function(t){var e=this,n=this.get("start"),r=this.get("end"),i=this.addGroup(t,{id:this.getElementId("region-filter"),capture:!1});(0,x.each)(this.get("shapes"),(function(t,n){var r=t.get("type"),a=(0,x.clone)(t.attr());e.adjustShapeAttrs(a),e.addShape(i,{id:e.getElementId("shape-"+r+"-"+n),capture:!1,type:r,attrs:a})}));var a=Lr({start:n,end:r});i.setClip({type:"rect",attrs:{x:a.minX,y:a.minY,width:a.width,height:a.height}})},e.prototype.adjustShapeAttrs=function(t){var e=this.get("color");t.fill&&(t.fill=t.fillStyle=e),t.stroke=t.strokeStyle=e},e}(ei),Mi=Fi,Oi=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,b.__assign)((0,b.__assign)({},e),{name:"annotation",type:"shape",draw:x.noop})},e.prototype.renderInner=function(t){var e=this.get("render");(0,x.isFunction)(e)&&e(t)},e}(ei),Bi=Oi;function Ti(t,e,n){var r;try{r=window.getComputedStyle?window.getComputedStyle(t,null)[e]:t.style[e]}catch(i){}finally{r=void 0===r?n:r}return r}function Pi(t,e){var n=Ti(t,"width",e);return"auto"===n&&(n=t.offsetWidth),parseFloat(n)}function Ii(t,e){var n=Pi(t,e),r=parseFloat(Ti(t,"borderLeftWidth"))||0,i=parseFloat(Ti(t,"paddingLeft"))||0,a=parseFloat(Ti(t,"paddingRight"))||0,o=parseFloat(Ti(t,"borderRightWidth"))||0,s=parseFloat(Ti(t,"marginRight"))||0,l=parseFloat(Ti(t,"marginLeft"))||0;return n+r+o+i+a+l+s}function Li(t,e){var n=Ti(t,"height",e);return"auto"===n&&(n=t.offsetHeight),parseFloat(n)}function Ri(t,e){var n=Li(t,e),r=parseFloat(Ti(t,"borderTopWidth"))||0,i=parseFloat(Ti(t,"paddingTop"))||0,a=parseFloat(Ti(t,"paddingBottom"))||0,o=parseFloat(Ti(t,"borderBottomWidth"))||0,s=parseFloat(Ti(t,"marginTop"))||0,l=parseFloat(Ti(t,"marginBottom"))||0;return n+r+o+i+a+s+l}var Ni=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,b.__assign)((0,b.__assign)({},e),{container:null,containerTpl:"
",updateAutoRender:!0,containerClassName:"",parent:null})},e.prototype.getContainer=function(){return this.get("container")},e.prototype.show=function(){var t=this.get("container");t.style.display="",this.set("visible",!0)},e.prototype.hide=function(){var t=this.get("container");t.style.display="none",this.set("visible",!1)},e.prototype.setCapture=function(t){var e=this.getContainer(),n=t?"auto":"none";e.style.pointerEvents=n,this.set("capture",t)},e.prototype.getBBox=function(){var t=this.getContainer(),e=parseFloat(t.style.left)||0,n=parseFloat(t.style.top)||0;return Nr(e,n,t.clientWidth,t.clientHeight)},e.prototype.clear=function(){var t=this.get("container");Pr(t)},e.prototype.destroy=function(){this.removeEvent(),this.removeDom(),t.prototype.destroy.call(this)},e.prototype.init=function(){t.prototype.init.call(this),this.initContainer(),this.initDom(),this.resetStyles(),this.applyStyles(),this.initEvent(),this.initCapture(),this.initVisible()},e.prototype.initCapture=function(){this.setCapture(this.get("capture"))},e.prototype.initVisible=function(){this.get("visible")?this.show():this.hide()},e.prototype.initDom=function(){},e.prototype.initContainer=function(){var t=this.get("container");if((0,x.isNil)(t)){t=this.createDom();var e=this.get("parent");(0,x.isString)(e)&&(e=document.getElementById(e),this.set("parent",e)),e.appendChild(t),this.get("containerId")&&t.setAttribute("id",this.get("containerId")),this.set("container",t)}else(0,x.isString)(t)&&(t=document.getElementById(t),this.set("container",t));this.get("parent")||this.set("parent",t.parentNode)},e.prototype.resetStyles=function(){var t=this.get("domStyles"),e=this.get("defaultStyles");t=t?(0,x.deepMix)({},e,t):e,this.set("domStyles",t)},e.prototype.applyStyles=function(){var t=this.get("domStyles");if(t){var e=this.getContainer();this.applyChildrenStyles(e,t);var n=this.get("containerClassName");if(n&&Ir(e,n)){var r=t[n];j(e,r)}}},e.prototype.applyChildrenStyles=function(t,e){(0,x.each)(e,(function(e,n){var r=t.getElementsByClassName(n);(0,x.each)(r,(function(t){j(t,e)}))}))},e.prototype.applyStyle=function(t,e){var n=this.get("domStyles");j(e,n[t])},e.prototype.createDom=function(){var t=this.get("containerTpl");return z(t)},e.prototype.initEvent=function(){},e.prototype.removeDom=function(){var t=this.get("container");t&&t.parentNode&&t.parentNode.removeChild(t)},e.prototype.removeEvent=function(){},e.prototype.updateInner=function(t){(0,x.hasKey)(t,"domStyles")&&(this.resetStyles(),this.applyStyles()),this.resetPosition()},e.prototype.resetPosition=function(){},e}(Yr),zi=Ni,ji=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,b.__assign)((0,b.__assign)({},e),{name:"annotation",type:"html",locationType:"point",x:0,y:0,containerTpl:'
',alignX:"left",alignY:"top",html:"",zIndex:7})},e.prototype.render=function(){var t=this.getContainer(),e=this.get("html");Pr(t);var n=(0,x.isFunction)(e)?e(t):e;if((0,x.isElement)(n))t.appendChild(n);else if((0,x.isString)(n)||(0,x.isNumber)(n)){var r=z(""+n);r&&t.appendChild(r)}this.resetPosition()},e.prototype.resetPosition=function(){var t=this.getContainer(),e=this.getLocation(),n=e.x,r=e.y,i=this.get("alignX"),a=this.get("alignY"),o=this.get("offsetX"),s=this.get("offsetY"),l=Ii(t),u=Ri(t),c={x:n,y:r};"middle"===i?c.x-=Math.round(l/2):"right"===i&&(c.x-=Math.round(l)),"middle"===a?c.y-=Math.round(u/2):"bottom"===a&&(c.y-=Math.round(u)),o&&(c.x+=o),s&&(c.y+=s),j(t,{position:"absolute",left:c.x+"px",top:c.y+"px",zIndex:this.get("zIndex")})},e}(zi),$i=ji;function Vi(t,e,n){var r=e+"Style",i=null;return(0,x.each)(n,(function(e,n){t[n]&&e[r]&&(i||(i={}),(0,x.mix)(i,e[r]))})),i}var qi=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,b.__assign)((0,b.__assign)({},e),{name:"axis",ticks:[],line:{},tickLine:{},subTickLine:null,title:null,label:{},verticalFactor:1,verticalLimitLength:null,overlapOrder:["autoRotate","autoEllipsis","autoHide"],tickStates:{},optimize:{},defaultCfg:{line:{style:{lineWidth:1,stroke:pi.lineColor}},tickLine:{style:{lineWidth:1,stroke:pi.lineColor},alignTick:!0,length:5,displayWithLabel:!0},subTickLine:{style:{lineWidth:1,stroke:pi.lineColor},count:4,length:2},label:{autoRotate:!0,autoHide:!1,autoEllipsis:!1,style:{fontSize:12,fill:pi.textColor,fontFamily:pi.fontFamily,fontWeight:"normal"},offset:10,offsetX:0,offsetY:0},title:{autoRotate:!0,spacing:5,position:"center",style:{fontSize:12,fill:pi.textColor,textBaseline:"middle",fontFamily:pi.fontFamily,textAlign:"center"},iconStyle:{fill:pi.descriptionIconFill,stroke:pi.descriptionIconStroke},description:""},tickStates:{active:{labelStyle:{fontWeight:500},tickLineStyle:{lineWidth:2}},inactive:{labelStyle:{fill:pi.uncheckedColor}}},optimize:{enable:!0,threshold:400}},theme:{}})},e.prototype.renderInner=function(t){this.get("line")&&this.drawLine(t),this.drawTicks(t),this.get("title")&&this.drawTitle(t)},e.prototype.isList=function(){return!0},e.prototype.getItems=function(){return this.get("ticks")},e.prototype.setItems=function(t){this.update({ticks:t})},e.prototype.updateItem=function(t,e){(0,x.mix)(t,e),this.clear(),this.render()},e.prototype.clearItems=function(){var t=this.getElementByLocalId("label-group");t&&t.clear()},e.prototype.setItemState=function(t,e,n){t[e]=n,this.updateTickStates(t)},e.prototype.hasState=function(t,e){return!!t[e]},e.prototype.getItemStates=function(t){var e=this.get("tickStates"),n=[];return(0,x.each)(e,(function(e,r){t[r]&&n.push(r)})),n},e.prototype.clearItemsState=function(t){var e=this,n=this.getItemsByState(t);(0,x.each)(n,(function(n){e.setItemState(n,t,!1)}))},e.prototype.getItemsByState=function(t){var e=this,n=this.getItems();return(0,x.filter)(n,(function(n){return e.hasState(n,t)}))},e.prototype.getSidePoint=function(t,e){var n=this,r=n.getSideVector(e,t);return{x:t.x+r[0],y:t.y+r[1]}},e.prototype.getTextAnchor=function(t){var e;return(0,x.isNumberEqual)(t[0],0)?e="center":t[0]>0?e="start":t[0]<0&&(e="end"),e},e.prototype.getTextBaseline=function(t){var e;return(0,x.isNumberEqual)(t[1],0)?e="middle":t[1]>0?e="top":t[1]<0&&(e="bottom"),e},e.prototype.processOverlap=function(t){},e.prototype.drawLine=function(t){var e=this.getLinePath(),n=this.get("line");this.addShape(t,{type:"path",id:this.getElementId("line"),name:"axis-line",attrs:(0,x.mix)({path:e},n.style)})},e.prototype.getTickLineItems=function(t){var e=this,n=[],r=this.get("tickLine"),i=r.alignTick,a=r.length,o=1,s=t.length;return s>=2&&(o=t[1].value-t[0].value),(0,x.each)(t,(function(t){var r=t.point;i||(r=e.getTickPoint(t.value-o/2));var s=e.getSidePoint(r,a);n.push({startPoint:r,tickValue:t.value,endPoint:s,tickId:t.id,id:"tickline-"+t.id})})),n},e.prototype.getSubTickLineItems=function(t){var e=[],n=this.get("subTickLine"),r=n.count,i=t.length;if(i>=2)for(var a=0;a0){var n=(0,x.size)(e);if(n>t.threshold){var r=Math.ceil(n/t.threshold),i=e.filter((function(t,e){return e%r===0}));this.set("ticks",i),this.set("originalTicks",e)}}},e.prototype.getLabelAttrs=function(t,e,n){var r=this.get("label"),i=r.offset,a=r.offsetX,o=r.offsetY,s=r.rotate,l=r.formatter,u=this.getSidePoint(t.point,i),c=this.getSideVector(i,u),d=l?l(t.name,t,e):t.name,h=r.style;h=(0,x.isFunction)(h)?(0,x.get)(this.get("theme"),["label","style"],{}):h;var f=(0,x.mix)({x:u.x+a,y:u.y+o,text:d,textAlign:this.getTextAnchor(c),textBaseline:this.getTextBaseline(c)},h);return s&&(f.matrix=kr(u,s)),f},e.prototype.drawLabels=function(t){var e=this,n=this.get("ticks"),r=this.addGroup(t,{name:"axis-label-group",id:this.getElementId("label-group")});(0,x.each)(n,(function(t,i){e.addShape(r,{type:"text",name:"axis-label",id:e.getElementId("label-"+t.id),attrs:e.getLabelAttrs(t,i,n),delegateObject:{tick:t,item:t,index:i}})})),this.processOverlap(r);var i=r.getChildren(),a=(0,x.get)(this.get("theme"),["label","style"],{}),o=this.get("label"),s=o.style,l=o.formatter;if((0,x.isFunction)(s)){var u=i.map((function(t){return(0,x.get)(t.get("delegateObject"),"tick")}));(0,x.each)(i,(function(t,e){var n=t.get("delegateObject").tick,r=l?l(n.name,n,e):n.name,i=(0,x.mix)({},a,s(r,e,u));t.attr(i)}))}},e.prototype.getTitleAttrs=function(){var t=this.get("title"),e=t.style,n=t.position,r=t.offset,i=t.spacing,a=void 0===i?0:i,o=t.autoRotate,s=e.fontSize,l=.5;"start"===n?l=0:"end"===n&&(l=1);var u=this.getTickPoint(l),c=this.getSidePoint(u,r||a+s/2),d=(0,x.mix)({x:c.x,y:c.y,text:t.text},e),h=t.rotate,f=h;if((0,x.isNil)(h)&&o){var p=this.getAxisVector(u),g=[1,0];f=dr.angleTo(p,g,!0)}if(f){var m=kr(c,f);d.matrix=m}return d},e.prototype.drawTitle=function(t){var e,n=this.getTitleAttrs(),r=this.addShape(t,{type:"text",id:this.getElementId("title"),name:"axis-title",attrs:n});(null===(e=this.get("title"))||void 0===e?void 0:e.description)&&this.drawDescriptionIcon(t,r,n.matrix)},e.prototype.drawDescriptionIcon=function(t,e,n){var r=this.addGroup(t,{name:"axis-description",id:this.getElementById("description")}),i=e.getBBox(),a=i.maxX,o=i.maxY,s=i.height,l=this.get("title").iconStyle,u=4,c=s/2,d=c/6,h=a+u,f=o-s/2,p=[h+c,f-c],g=p[0],m=p[1],v=[g+c,m+c],y=v[0],x=v[1],w=[g,x+c],_=w[0],C=w[1],S=[h,m+c],A=S[0],k=S[1],E=[h+c,f-s/4],D=E[0],F=E[1],M=[D,F+d],O=M[0],B=M[1],T=[O,B+d],P=T[0],I=T[1],L=[P,I+3*c/4],R=L[0],N=L[1];this.addShape(r,{type:"path",id:this.getElementId("title-description-icon"),name:"axis-title-description-icon",attrs:(0,b.__assign)({path:[["M",g,m],["A",c,c,0,0,1,y,x],["A",c,c,0,0,1,_,C],["A",c,c,0,0,1,A,k],["A",c,c,0,0,1,g,m],["M",D,F],["L",O,B],["M",P,I],["L",R,N]],lineWidth:d,matrix:n},l)}),this.addShape(r,{type:"rect",id:this.getElementId("title-description-rect"),name:"axis-title-description-rect",attrs:{x:h,y:f-s/2,width:s,height:s,stroke:"#000",fill:"#000",opacity:0,matrix:n,cursor:"pointer"}})},e.prototype.applyTickStates=function(t,e){var n=this.getItemStates(t);if(n.length){var r=this.get("tickStates"),i=this.getElementId("label-"+t.id),a=e.findById(i);if(a){var o=Vi(t,"label",r);o&&a.attr(o)}var s=this.getElementId("tickline-"+t.id),l=e.findById(s);if(l){var u=Vi(t,"tickLine",r);u&&l.attr(u)}}},e.prototype.updateTickStates=function(t){var e=this.getItemStates(t),n=this.get("tickStates"),r=this.get("label"),i=this.getElementByLocalId("label-"+t.id),a=this.get("tickLine"),o=this.getElementByLocalId("tickline-"+t.id);if(e.length){if(i){var s=Vi(t,"label",n);s&&i.attr(s)}if(o){var l=Vi(t,"tickLine",n);l&&o.attr(l)}}else i&&i.attr(r.style),o&&o.attr(a.style)},e}(ei),Hi=qi;function Ui(t,e,n,r){var i=e.getChildren(),a=!1;return(0,x.each)(i,(function(e){var i=hi(t,e,n,r);a=a||i})),a}function Gi(){return Zi}function Wi(t,e,n){return Ui(t,e,n,"head")}function Zi(t,e,n){return Ui(t,e,n,"tail")}function Xi(t,e,n){return Ui(t,e,n,"middle")}function Yi(t){var e=t.attr("matrix");return e&&1!==e[0]}function Ki(t){var e=Yi(t)?Dr(t.attr("matrix")):0;return e%360}function Qi(t,e,n,r){var i=!1,a=Ki(e),o=t?Math.abs(n.attr("y")-e.attr("y")):Math.abs(n.attr("x")-e.attr("x")),s=(t?n.attr("y")>e.attr("y"):n.attr("x")>e.attr("x"))?e.getBBox():n.getBBox();if(t){var l=Math.abs(Math.cos(a));i=Vr(l,0,Math.PI/180)?s.width+r>o:s.height/l+r>o}else{l=Math.abs(Math.sin(a));i=Vr(l,0,Math.PI/180)?s.width+r>o:s.height/l+r>o}return i}function Ji(t,e,n,r){var i=(null===r||void 0===r?void 0:r.minGap)||0,a=e.getChildren().slice().filter((function(t){return t.get("visible")}));if(!a.length)return!1;var o=!1;n&&a.reverse();for(var s=a.length,l=a[0],u=l,c=1;c1){h=Math.ceil(h);for(var g=0;g2){var o=i[0],s=i[i.length-1];o.get("visible")||(o.show(),Ji(t,e,!1,r)&&(a=!0)),s.get("visible")||(s.show(),Ji(t,e,!0,r)&&(a=!0))}return a}function sa(t,e){(0,x.each)(t,(function(t){var n=t.attr("x"),r=t.attr("y"),i=kr({x:n,y:r},e);t.attr("matrix",i)}))}function la(t,e,n,r){var i=e.getChildren();if(!i.length)return!1;if(!t&&i.length<2)return!1;var a=ci(i),o=!1;if(t)o=!!n&&a>n;else{var s=Math.abs(i[1].attr("x")-i[0].attr("x"));o=a>s}if(o){var l=r(n,a);sa(i,l)}return o}function ua(){return ca}function ca(t,e,n,r){return la(t,e,n,(function(){return(0,x.isNumber)(r)?r:t?pi.verticalAxisRotate:pi.horizontalAxisRotate}))}function da(t,e,n){return la(t,e,n,(function(e,n){if(!e)return t?pi.verticalAxisRotate:pi.horizontalAxisRotate;if(t)return-Math.acos(e/n);var r=0;return e>n?r=Math.PI/4:(r=Math.asin(e/n),r>Math.PI/4&&(r=Math.PI/4)),r}))}var ha,fa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,b.__assign)((0,b.__assign)({},e),{type:"line",locationType:"region",start:null,end:null})},e.prototype.getLinePath=function(){var t=this.get("start"),e=this.get("end"),n=[];return n.push(["M",t.x,t.y]),n.push(["L",e.x,e.y]),n},e.prototype.getInnerLayoutBBox=function(){var e=this.get("start"),n=this.get("end"),r=t.prototype.getInnerLayoutBBox.call(this),i=Math.min(e.x,n.x,r.x),a=Math.min(e.y,n.y,r.y),o=Math.max(e.x,n.x,r.maxX),s=Math.max(e.y,n.y,r.maxY);return{x:i,y:a,minX:i,minY:a,maxX:o,maxY:s,width:o-i,height:s-a}},e.prototype.isVertical=function(){var t=this.get("start"),e=this.get("end");return(0,x.isNumberEqual)(t.x,e.x)},e.prototype.isHorizontal=function(){var t=this.get("start"),e=this.get("end");return(0,x.isNumberEqual)(t.y,e.y)},e.prototype.getTickPoint=function(t){var e=this,n=e.get("start"),r=e.get("end"),i=r.x-n.x,a=r.y-n.y;return{x:n.x+i*t,y:n.y+a*t}},e.prototype.getSideVector=function(t){var e=this.getAxisVector(),n=mr.normalize([0,0],e),r=this.get("verticalFactor"),i=[n[1],-1*n[0]];return mr.scale([0,0],i,t*r)},e.prototype.getAxisVector=function(){var t=this.get("start"),e=this.get("end");return[e.x-t.x,e.y-t.y]},e.prototype.processOverlap=function(t){var e=this,n=this.isVertical(),r=this.isHorizontal();if(n||r){var i=this.get("label"),a=this.get("title"),o=this.get("verticalLimitLength"),s=i.offset,l=o,u=0,c=0;a&&(u=a.style.fontSize,c=a.spacing),l&&(l=l-s-c-u);var d=this.get("overlapOrder");if((0,x.each)(d,(function(n){i[n]&&e.canProcessOverlap(n)&&e.autoProcessOverlap(n,i[n],t,l)})),a&&(0,x.isNil)(a.offset)){var h=t.getCanvasBBox(),f=n?h.width:h.height;a.offset=s+f+c+u/2}}},e.prototype.canProcessOverlap=function(t){var e=this.get("label");return"autoRotate"!==t||(0,x.isNil)(e.rotate)},e.prototype.autoProcessOverlap=function(t,e,n,r){var i=this,a=this.isVertical(),o=!1,s=l[t];if(!0===e){this.get("label");o=s.getDefault()(a,n,r)}else if((0,x.isFunction)(e))o=e(a,n,r);else if((0,x.isObject)(e)){var u=e;s[u.type]&&(o=s[u.type](a,n,r,u.cfg))}else s[e]&&(o=s[e](a,n,r));if("autoRotate"===t){if(o){var c=n.getChildren(),d=this.get("verticalFactor");(0,x.each)(c,(function(t){var e=t.attr("textAlign");if("center"===e){var n=d>0?"end":"start";t.attr("textAlign",n)}}))}}else if("autoHide"===t){var h=n.getChildren().slice(0);(0,x.each)(h,(function(t){t.get("visible")||(i.get("isRegister")&&i.unregisterElement(t),t.remove())}))}},e}(Hi),pa=fa,ga=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,b.__assign)((0,b.__assign)({},e),{type:"circle",locationType:"circle",center:null,radius:null,startAngle:-Math.PI/2,endAngle:3*Math.PI/2})},e.prototype.getLinePath=function(){var t=this.get("center"),e=t.x,n=t.y,r=this.get("radius"),i=r,a=this.get("startAngle"),o=this.get("endAngle"),s=[];if(Math.abs(o-a)===2*Math.PI)s=[["M",e,n-i],["A",r,i,0,1,1,e,n+i],["A",r,i,0,1,1,e,n-i],["Z"]];else{var l=this.getCirclePoint(a),u=this.getCirclePoint(o),c=Math.abs(o-a)>Math.PI?1:0,d=a>o?0:1;s=[["M",e,n],["L",l.x,l.y],["A",r,i,0,c,d,u.x,u.y],["L",e,n]]}return s},e.prototype.getTickPoint=function(t){var e=this.get("startAngle"),n=this.get("endAngle"),r=e+(n-e)*t;return this.getCirclePoint(r)},e.prototype.getSideVector=function(t,e){var n=this.get("center"),r=[e.x-n.x,e.y-n.y],i=this.get("verticalFactor"),a=mr.length(r);return mr.scale(r,r,i*t/a),r},e.prototype.getAxisVector=function(t){var e=this.get("center"),n=[t.x-e.x,t.y-e.y];return[n[1],-1*n[0]]},e.prototype.getCirclePoint=function(t,e){var n=this.get("center");return e=e||this.get("radius"),{x:n.x+Math.cos(t)*e,y:n.y+Math.sin(t)*e}},e.prototype.canProcessOverlap=function(t){var e=this.get("label");return"autoRotate"!==t||(0,x.isNil)(e.rotate)},e.prototype.processOverlap=function(t){var e=this,n=this.get("label"),r=this.get("title"),i=this.get("verticalLimitLength"),a=n.offset,o=i,s=0,l=0;r&&(s=r.style.fontSize,l=r.spacing),o&&(o=o-a-l-s);var u=this.get("overlapOrder");if((0,x.each)(u,(function(r){n[r]&&e.canProcessOverlap(r)&&e.autoProcessOverlap(r,n[r],t,o)})),r&&(0,x.isNil)(r.offset)){var c=t.getCanvasBBox().height;r.offset=a+c+l+s/2}},e.prototype.autoProcessOverlap=function(t,e,n,r){var i=this,a=!1,o=l[t];if(r>0)if(!0===e)a=o.getDefault()(!1,n,r);else if((0,x.isFunction)(e))a=e(!1,n,r);else if((0,x.isObject)(e)){var s=e;o[s.type]&&(a=o[s.type](!1,n,r,s.cfg))}else o[e]&&(a=o[e](!1,n,r));if("autoRotate"===t){if(a){var u=n.getChildren(),c=this.get("verticalFactor");(0,x.each)(u,(function(t){var e=t.attr("textAlign");if("center"===e){var n=c>0?"end":"start";t.attr("textAlign",n)}}))}}else if("autoHide"===t){var d=n.getChildren().slice(0);(0,x.each)(d,(function(t){t.get("visible")||(i.get("isRegister")&&i.unregisterElement(t),t.remove())}))}},e}(Hi),ma=ga,va=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,b.__assign)((0,b.__assign)({},e),{name:"crosshair",type:"base",line:{},text:null,textBackground:{},capture:!1,defaultCfg:{line:{style:{lineWidth:1,stroke:pi.lineColor}},text:{position:"start",offset:10,autoRotate:!1,content:null,style:{fill:pi.textColor,textAlign:"center",textBaseline:"middle",fontFamily:pi.fontFamily}},textBackground:{padding:5,style:{stroke:pi.lineColor}}}})},e.prototype.renderInner=function(t){this.get("line")&&this.renderLine(t),this.get("text")&&(this.renderText(t),this.renderBackground(t))},e.prototype.renderText=function(t){var e=this.get("text"),n=e.style,r=e.autoRotate,i=e.content;if(!(0,x.isNil)(i)){var a=this.getTextPoint(),o=null;if(r){var s=this.getRotateAngle();o=kr(a,s)}this.addShape(t,{type:"text",name:"crosshair-text",id:this.getElementId("text"),attrs:(0,b.__assign)((0,b.__assign)((0,b.__assign)({},a),{text:i,matrix:o}),n)})}},e.prototype.renderLine=function(t){var e=this.getLinePath(),n=this.get("line"),r=n.style;this.addShape(t,{type:"path",name:"crosshair-line",id:this.getElementId("line"),attrs:(0,b.__assign)({path:e},r)})},e.prototype.renderBackground=function(t){var e=this.getElementId("text"),n=t.findById(e),r=this.get("textBackground");if(r&&n){var i=n.getBBox(),a=Tr(r.padding),o=r.style,s=this.addShape(t,{type:"rect",name:"crosshair-text-background",id:this.getElementId("text-background"),attrs:(0,b.__assign)({x:i.x-a[3],y:i.y-a[0],width:i.width+a[1]+a[3],height:i.height+a[0]+a[2],matrix:n.attr("matrix")},o)});s.toBack()}},e}(ei),ya=va,ba=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,b.__assign)((0,b.__assign)({},e),{type:"line",locationType:"region",start:null,end:null})},e.prototype.getRotateAngle=function(){var t=this.getLocation(),e=t.start,n=t.end,r=this.get("text").position,i=Math.atan2(n.y-e.y,n.x-e.x),a="start"===r?i-Math.PI/2:i+Math.PI/2;return a},e.prototype.getTextPoint=function(){var t=this.getLocation(),e=t.start,n=t.end,r=this.get("text"),i=r.position,a=r.offset;return Wr(e,n,i,a)},e.prototype.getLinePath=function(){var t=this.getLocation(),e=t.start,n=t.end;return[["M",e.x,e.y],["L",n.x,n.y]]},e}(ya),xa=ba,wa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,b.__assign)((0,b.__assign)({},e),{type:"circle",locationType:"circle",center:null,radius:100,startAngle:-Math.PI/2,endAngle:3*Math.PI/2})},e.prototype.getRotateAngle=function(){var t=this.getLocation(),e=t.startAngle,n=t.endAngle,r=this.get("text").position,i="start"===r?e+Math.PI/2:n-Math.PI/2;return i},e.prototype.getTextPoint=function(){var t=this.get("text"),e=t.position,n=t.offset,r=this.getLocation(),i=r.center,a=r.radius,o=r.startAngle,s=r.endAngle,l="start"===e?o:s,u=this.getRotateAngle()-Math.PI,c=jr(i,a,l),d=Math.cos(u)*n,h=Math.sin(u)*n;return{x:c.x+d,y:c.y+h}},e.prototype.getLinePath=function(){var t=this.getLocation(),e=t.center,n=t.radius,r=t.startAngle,i=t.endAngle,a=null;if(i-r===2*Math.PI){var o=e.x,s=e.y;a=[["M",o,s-n],["A",n,n,0,1,1,o,s+n],["A",n,n,0,1,1,o,s-n],["Z"]]}else{var l=jr(e,n,r),u=jr(e,n,i),c=Math.abs(i-r)>Math.PI?1:0,d=r>i?0:1;a=[["M",l.x,l.y],["A",n,n,0,c,d,u.x,u.y]]}return a},e}(ya),_a=wa,Ca="g2-crosshair",Sa=Ca+"-line",Aa=Ca+"-text",ka=(ha={},ha[""+Ca]={position:"relative"},ha[""+Sa]={position:"absolute",backgroundColor:"rgba(0, 0, 0, 0.25)"},ha[""+Aa]={position:"absolute",color:pi.textColor,fontFamily:pi.fontFamily},ha),Ea=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,b.__assign)((0,b.__assign)({},e),{name:"crosshair",type:"html",locationType:"region",start:{x:0,y:0},end:{x:0,y:0},capture:!1,text:null,containerTpl:'
',crosshairTpl:'
',textTpl:'{content}',domStyles:null,containerClassName:Ca,defaultStyles:ka,defaultCfg:{text:{position:"start",content:null,align:"center",offset:10}}})},e.prototype.render=function(){this.resetText(),this.resetPosition()},e.prototype.initCrossHair=function(){var t=this.getContainer(),e=this.get("crosshairTpl"),n=z(e);t.appendChild(n),this.applyStyle(Sa,n),this.set("crosshairEl",n)},e.prototype.getTextPoint=function(){var t=this.getLocation(),e=t.start,n=t.end,r=this.get("text"),i=r.position,a=r.offset;return Wr(e,n,i,a)},e.prototype.resetText=function(){var t=this.get("text"),e=this.get("textEl");if(t){var n=t.content;if(!e){var r=this.getContainer(),i=(0,x.substitute)(this.get("textTpl"),t);e=z(i),r.appendChild(e),this.applyStyle(Aa,e),this.set("textEl",e)}e.innerHTML=n}else e&&e.remove()},e.prototype.isVertical=function(t,e){return t.x===e.x},e.prototype.resetPosition=function(){var t=this.get("crosshairEl");t||(this.initCrossHair(),t=this.get("crosshairEl"));var e=this.get("start"),n=this.get("end"),r=Math.min(e.x,n.x),i=Math.min(e.y,n.y);this.isVertical(e,n)?j(t,{width:"1px",height:Gr(Math.abs(n.y-e.y))}):j(t,{height:"1px",width:Gr(Math.abs(n.x-e.x))}),j(t,{top:Gr(i),left:Gr(r)}),this.alignText()},e.prototype.alignText=function(){var t=this.get("textEl");if(t){var e=this.get("text").align,n=t.clientWidth,r=this.getTextPoint();switch(e){case"center":r.x=r.x-n/2;break;case"right":r.x=r.x-n;case"left":break}j(t,{top:Gr(r.y),left:Gr(r.x)})}},e.prototype.updateInner=function(e){(0,x.hasKey)(e,"text")&&this.resetText(),t.prototype.updateInner.call(this,e)},e}(zi),Da=Ea,Fa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,b.__assign)((0,b.__assign)({},e),{name:"grid",line:{},alternateColor:null,capture:!1,items:[],closed:!1,defaultCfg:{line:{type:"line",style:{lineWidth:1,stroke:pi.lineColor}}}})},e.prototype.getLineType=function(){var t=this.get("line")||this.get("defaultCfg").line;return t.type},e.prototype.renderInner=function(t){this.drawGrid(t)},e.prototype.getAlternatePath=function(t,e){var n=this.getGridPath(t),r=e.slice(0).reverse(),i=this.getGridPath(r,!0),a=this.get("closed");return a?n=n.concat(i):(i[0][0]="L",n=n.concat(i),n.push(["Z"])),n},e.prototype.getPathStyle=function(){return this.get("line").style},e.prototype.drawGrid=function(t){var e=this,n=this.get("line"),r=this.get("items"),i=this.get("alternateColor"),a=null;(0,x.each)(r,(function(o,s){var l=o.id||s;if(n){var u=e.getPathStyle();u=(0,x.isFunction)(u)?u(o,s,r):u;var c=e.getElementId("line-"+l),d=e.getGridPath(o.points);e.addShape(t,{type:"path",name:"grid-line",id:c,attrs:(0,x.mix)({path:d},u)})}if(i&&s>0){var h=e.getElementId("region-"+l),f=s%2===0;if((0,x.isString)(i))f&&e.drawAlternateRegion(h,t,a.points,o.points,i);else{var p=f?i[1]:i[0];e.drawAlternateRegion(h,t,a.points,o.points,p)}}a=o}))},e.prototype.drawAlternateRegion=function(t,e,n,r,i){var a=this.getAlternatePath(n,r);this.addShape(e,{type:"path",id:t,name:"grid-region",attrs:{path:a,fill:i}})},e}(ei),Ma=Fa;function Oa(t,e,n,r){var i=n-t,a=r-e;return Math.sqrt(i*i+a*a)}var Ba,Ta=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,b.__assign)((0,b.__assign)({},e),{type:"circle",center:null,closed:!0})},e.prototype.getGridPath=function(t,e){var n=this.getLineType(),r=this.get("closed"),i=[];if(t.length)if("circle"===n){var a=this.get("center"),o=t[0],s=Oa(a.x,a.y,o.x,o.y),l=e?0:1;r?(i.push(["M",a.x,a.y-s]),i.push(["A",s,s,0,0,l,a.x,a.y+s]),i.push(["A",s,s,0,0,l,a.x,a.y-s]),i.push(["Z"])):(0,x.each)(t,(function(t,e){0===e?i.push(["M",t.x,t.y]):i.push(["A",s,s,0,0,l,t.x,t.y])}))}else(0,x.each)(t,(function(t,e){0===e?i.push(["M",t.x,t.y]):i.push(["L",t.x,t.y])})),r&&i.push(["Z"]);return i},e}(Ma),Pa=Ta,Ia=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,b.__assign)((0,b.__assign)({},e),{type:"line"})},e.prototype.getGridPath=function(t){var e=[];return(0,x.each)(t,(function(t,n){0===n?e.push(["M",t.x,t.y]):e.push(["L",t.x,t.y])})),e},e}(Ma),La=Ia,Ra=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,b.__assign)((0,b.__assign)({},e),{name:"legend",layout:"horizontal",locationType:"point",x:0,y:0,offsetX:0,offsetY:0,title:null,background:null})},e.prototype.getLayoutBBox=function(){var e=t.prototype.getLayoutBBox.call(this),n=this.get("maxWidth"),r=this.get("maxHeight"),i=e.width,a=e.height;return n&&(i=Math.min(i,n)),r&&(a=Math.min(a,r)),Nr(e.minX,e.minY,i,a)},e.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetLocation()},e.prototype.resetLocation=function(){var t=this.get("x"),e=this.get("y"),n=this.get("offsetX"),r=this.get("offsetY");this.moveElementTo(this.get("group"),{x:t+n,y:e+r})},e.prototype.applyOffset=function(){this.resetLocation()},e.prototype.getDrawPoint=function(){return this.get("currentPoint")},e.prototype.setDrawPoint=function(t){return this.set("currentPoint",t)},e.prototype.renderInner=function(t){this.resetDraw(),this.get("title")&&this.drawTitle(t),this.drawLegendContent(t),this.get("background")&&this.drawBackground(t)},e.prototype.drawBackground=function(t){var e=this.get("background"),n=t.getBBox(),r=Tr(e.padding),i=(0,b.__assign)({x:0,y:0,width:n.width+r[1]+r[3],height:n.height+r[0]+r[2]},e.style),a=this.addShape(t,{type:"rect",id:this.getElementId("background"),name:"legend-background",attrs:i});a.toBack()},e.prototype.drawTitle=function(t){var e=this.get("currentPoint"),n=this.get("title"),r=n.spacing,i=n.style,a=n.text,o=this.addShape(t,{type:"text",id:this.getElementId("title"),name:"legend-title",attrs:(0,b.__assign)({text:a,x:e.x,y:e.y},i)}),s=o.getBBox();this.set("currentPoint",{x:e.x,y:s.maxY+r})},e.prototype.resetDraw=function(){var t=this.get("background"),e={x:0,y:0};if(t){var n=Tr(t.padding);e.x=n[3],e.y=n[0]}this.set("currentPoint",e)},e}(ei),Na=Ra,za={marker:{style:{inactiveFill:"#000",inactiveOpacity:.45,fill:"#000",opacity:1,size:12}},text:{style:{fill:"#ccc",fontSize:12}}},ja={fill:pi.textColor,fontSize:12,textAlign:"start",textBaseline:"middle",fontFamily:pi.fontFamily,fontWeight:"normal",lineHeight:12},$a="navigation-arrow-right",Va="navigation-arrow-left",qa={right:90*Math.PI/180,left:270*Math.PI/180,up:0,down:180*Math.PI/180},Ha=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.currentPageIndex=1,e.totalPagesCnt=1,e.pageWidth=0,e.pageHeight=0,e.startX=0,e.startY=0,e.onNavigationBack=function(){var t=e.getElementByLocalId("item-group");if(e.currentPageIndex>1){e.currentPageIndex-=1,e.updateNavigation();var n=e.getCurrentNavigationMatrix();e.get("animate")?t.animate({matrix:n},100):t.attr({matrix:n})}},e.onNavigationAfter=function(){var t=e.getElementByLocalId("item-group");if(e.currentPageIndexp&&(p=y),"horizontal"===d?(g&&gy&&(y=e.width)})),b=y,y+=c,s&&(y=Math.min(s,y),b=Math.min(s,b)),this.pageWidth=y,this.pageHeight=l-Math.max(p.height,d+w);var S=Math.floor(this.pageHeight/(d+w));(0,x.each)(o,(function(t,e){0!==e&&e%S===0&&(m+=1,g.x+=y,g.y=i),n.moveElementTo(t,g),t.getParent().setClip({type:"rect",attrs:{x:g.x,y:g.y,width:y,height:d}}),g.y+=d+w})),this.totalPagesCnt=m,this.moveElementTo(f,{x:r+b/2-p.width/2-p.minX,y:l-p.height-p.minY})}this.pageHeight&&this.pageWidth&&e.getParent().setClip({type:"rect",attrs:{x:this.startX,y:this.startY,width:this.pageWidth,height:this.pageHeight}}),"horizontal"===a&&this.get("maxRow")?this.totalPagesCnt=Math.ceil(m/this.get("maxRow")):this.totalPagesCnt=m,this.currentPageIndex>this.totalPagesCnt&&(this.currentPageIndex=1),this.updateNavigation(f),e.attr("matrix",this.getCurrentNavigationMatrix())},e.prototype.drawNavigation=function(t,e,n,r){var i={x:0,y:0},a=this.addGroup(t,{id:this.getElementId("navigation-group"),name:"legend-navigation"}),o=(0,x.get)(r.marker,"style",{}),s=o.size,l=void 0===s?12:s,u=(0,b.__rest)(o,["size"]),c=this.drawArrow(a,i,Va,"horizontal"===e?"up":"left",l,u);c.on("click",this.onNavigationBack);var d=c.getBBox();i.x+=d.width+2;var h=this.addShape(a,{type:"text",id:this.getElementId("navigation-text"),name:"navigation-text",attrs:(0,b.__assign)({x:i.x,y:i.y+l/2,text:n,textBaseline:"middle"},(0,x.get)(r.text,"style"))}),f=h.getBBox();i.x+=f.width+2;var p=this.drawArrow(a,i,$a,"horizontal"===e?"down":"right",l,u);return p.on("click",this.onNavigationAfter),a},e.prototype.updateNavigation=function(t){var e=(0,x.deepMix)({},za,this.get("pageNavigator")),n=e.marker.style,r=n.fill,i=n.opacity,a=n.inactiveFill,o=n.inactiveOpacity,s=this.currentPageIndex+"/"+this.totalPagesCnt,l=t?t.getChildren()[1]:this.getElementByLocalId("navigation-text"),u=t?t.findById(this.getElementId(Va)):this.getElementByLocalId(Va),c=t?t.findById(this.getElementId($a)):this.getElementByLocalId($a);l.attr("text",s),u.attr("opacity",1===this.currentPageIndex?o:i),u.attr("fill",1===this.currentPageIndex?a:r),u.attr("cursor",1===this.currentPageIndex?"not-allowed":"pointer"),c.attr("opacity",this.currentPageIndex===this.totalPagesCnt?o:i),c.attr("fill",this.currentPageIndex===this.totalPagesCnt?a:r),c.attr("cursor",this.currentPageIndex===this.totalPagesCnt?"not-allowed":"pointer");var d=u.getBBox().maxX+2;l.attr("x",d),d+=l.getBBox().width+2,this.updateArrowPath(c,{x:d,y:0})},e.prototype.drawArrow=function(t,e,n,r,i,a){var o=e.x,s=e.y,l=this.addShape(t,{type:"path",id:this.getElementId(n),name:n,attrs:(0,b.__assign)({size:i,direction:r,path:[["M",o+i/2,s],["L",o,s+i],["L",o+i,s+i],["Z"]],cursor:"pointer"},a)});return l.attr("matrix",kr({x:o+i/2,y:s+i/2},qa[r])),l},e.prototype.updateArrowPath=function(t,e){var n=e.x,r=e.y,i=t.attr(),a=i.size,o=i.direction,s=kr({x:n+a/2,y:r+a/2},qa[o]);t.attr("path",[["M",n+a/2,r],["L",n,r+a],["L",n+a,r+a],["Z"]]),t.attr("matrix",s)},e.prototype.getCurrentNavigationMatrix=function(){var t=this,e=t.currentPageIndex,n=t.pageWidth,r=t.pageHeight,i=this.get("layout"),a="horizontal"===i?{x:0,y:r*(1-e)}:{x:n*(1-e),y:0};return Er(a)},e.prototype.applyItemStates=function(t,e){var n=this.getItemStates(t),r=n.length>0;if(r){var i=e.getChildren(),a=this.get("itemStates");(0,x.each)(i,(function(e){var n=e.get("name"),r=n.split("-")[2],i=Vi(t,r,a);i&&(e.attr(i),"marker"!==r||e.get("isStroke")&&e.get("isFill")||(e.get("isStroke")&&e.attr("fill",null),e.get("isFill")&&e.attr("stroke",null)))}))}},e.prototype.getLimitItemWidth=function(){var t=this.get("itemWidth"),e=this.get("maxItemWidth");return e?t&&(e=t<=e?t:e):t&&(e=t),e},e}(Na),Ua=Ha,Ga=1.4,Wa=.4,Za=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,b.__assign)((0,b.__assign)({},e),{type:"continue",min:0,max:100,value:null,colors:[],track:{},rail:{},label:{},handler:{},slidable:!0,tip:null,step:null,maxWidth:null,maxHeight:null,defaultCfg:{label:{align:"rail",spacing:5,formatter:null,style:{fontSize:12,fill:pi.textColor,textBaseline:"middle",fontFamily:pi.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:pi.textColor,fontSize:12,textAlign:"start",textBaseline:"top"}}}})},e.prototype.isSlider=function(){return!0},e.prototype.getValue=function(){return this.getCurrentValue()},e.prototype.getRange=function(){return{min:this.get("min"),max:this.get("max")}},e.prototype.setRange=function(t,e){this.update({min:t,max:e})},e.prototype.setValue=function(t){var e=this.getValue();this.set("value",t);var n=this.get("group");this.resetTrackClip(),this.get("slidable")&&this.resetHandlers(n),this.delegateEmit("valuechanged",{originValue:e,value:t})},e.prototype.initEvent=function(){var t=this.get("group");this.bindSliderEvent(t),this.bindRailEvent(t),this.bindTrackEvent(t)},e.prototype.drawLegendContent=function(t){this.drawRail(t),this.drawLabels(t),this.fixedElements(t),this.resetTrack(t),this.resetTrackClip(t),this.get("slidable")&&this.resetHandlers(t)},e.prototype.bindSliderEvent=function(t){this.bindHandlersEvent(t)},e.prototype.bindHandlersEvent=function(t){var e=this;t.on("legend-handler-min:drag",(function(t){var n=e.getValueByCanvasPoint(t.x,t.y),r=e.getCurrentValue(),i=r[1];in&&(i=n),e.setValue([i,n])}))},e.prototype.bindRailEvent=function(t){},e.prototype.bindTrackEvent=function(t){var e=this,n=null;t.on("legend-track:dragstart",(function(t){n={x:t.x,y:t.y}})),t.on("legend-track:drag",(function(t){if(n){var r=e.getValueByCanvasPoint(n.x,n.y),i=e.getValueByCanvasPoint(t.x,t.y),a=e.getCurrentValue(),o=a[1]-a[0],s=e.getRange(),l=i-r;l<0?a[0]+l>s.min?e.setValue([a[0]+l,a[1]+l]):e.setValue([s.min,s.min+o]):l>0&&(l>0&&a[1]+la&&(u=a),u0&&this.changeRailLength(r,a,n[a]-d)}},e.prototype.changeRailLength=function(t,e,n){var r,i=t.getBBox();r="height"===e?this.getRailPath(i.x,i.y,i.width,n):this.getRailPath(i.x,i.y,n,i.height),t.attr("path",r)},e.prototype.changeRailPosition=function(t,e,n){var r=t.getBBox(),i=this.getRailPath(e,n,r.width,r.height);t.attr("path",i)},e.prototype.fixedHorizontal=function(t,e,n,r){var i=this.get("label"),a=i.align,o=i.spacing,s=n.getBBox(),l=t.getBBox(),u=e.getBBox(),c=s.height;this.fitRailLength(l,u,s,n),s=n.getBBox(),"rail"===a?(t.attr({x:r.x,y:r.y+c/2}),this.changeRailPosition(n,r.x+l.width+o,r.y),e.attr({x:r.x+l.width+s.width+2*o,y:r.y+c/2})):"top"===a?(t.attr({x:r.x,y:r.y}),e.attr({x:r.x+s.width,y:r.y}),this.changeRailPosition(n,r.x,r.y+l.height+o)):(this.changeRailPosition(n,r.x,r.y),t.attr({x:r.x,y:r.y+s.height+o}),e.attr({x:r.x+s.width,y:r.y+s.height+o}))},e.prototype.fixedVertail=function(t,e,n,r){var i=this.get("label"),a=i.align,o=i.spacing,s=n.getBBox(),l=t.getBBox(),u=e.getBBox();if(this.fitRailLength(l,u,s,n),s=n.getBBox(),"rail"===a)t.attr({x:r.x,y:r.y}),this.changeRailPosition(n,r.x,r.y+l.height+o),e.attr({x:r.x,y:r.y+l.height+s.height+2*o});else if("right"===a)t.attr({x:r.x+s.width+o,y:r.y}),this.changeRailPosition(n,r.x,r.y),e.attr({x:r.x+s.width+o,y:r.y+s.height});else{var c=Math.max(l.width,u.width);t.attr({x:r.x,y:r.y}),this.changeRailPosition(n,r.x+c+o,r.y),e.attr({x:r.x,y:r.y+s.height})}},e}(Na),Xa=Za,Ya="g2-tooltip",Ka="g2-tooltip-title",Qa="g2-tooltip-list",Ja="g2-tooltip-list-item",to="g2-tooltip-marker",eo="g2-tooltip-value",no="g2-tooltip-name",ro="g2-tooltip-crosshair-x",io="g2-tooltip-crosshair-y",ao=(Ba={},Ba[""+Ya]={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:pi.fontFamily,lineHeight:"20px",padding:"10px 10px 6px 10px"},Ba[""+Ka]={marginBottom:"4px"},Ba[""+Qa]={margin:"0px",listStyleType:"none",padding:"0px"},Ba[""+Ja]={listStyleType:"none",marginBottom:"4px"},Ba[""+to]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},Ba[""+eo]={display:"inline-block",float:"right",marginLeft:"30px"},Ba[""+ro]={position:"absolute",width:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},Ba[""+io]={position:"absolute",height:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},Ba);function oo(t,e,n,r,i){var a={left:ti.x+i.width,top:ei.y+i.height};return a}function so(t,e,n,r,i,a){var o=t,s=e;switch(a){case"left":o=t-r-n,s=e-i/2;break;case"right":o=t+n,s=e-i/2;break;case"top":o=t-r/2,s=e-i-n;break;case"bottom":o=t-r/2,s=e+n;break;default:o=t+n,s=e-i-n;break}return{x:o,y:s}}function lo(t,e,n,r,i,a,o){var s=so(t,e,n,r,i,a);if(o){var l=oo(s.x,s.y,r,i,o);"auto"===a?(l.right&&(s.x=Math.max(0,t-r-n)),l.top&&(s.y=Math.max(0,e-i-n))):"top"===a||"bottom"===a?(l.left&&(s.x=o.x),l.right&&(s.x=o.x+o.width-r),"top"===a&&l.top&&(s.y=e+n),"bottom"===a&&l.bottom&&(s.y=e-i-n)):(l.top&&(s.y=o.y),l.bottom&&(s.y=o.y+o.height-i),"left"===a&&l.left&&(s.x=t+n),"right"===a&&l.right&&(s.x=t-r-n))}return s}function uo(t,e){var n=!1;return(0,x.each)(e,(function(e){if((0,x.hasKey)(t,e))return n=!0,!1})),n}var co=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,b.__assign)((0,b.__assign)({},e),{name:"tooltip",type:"html",x:0,y:0,items:[],customContent:null,containerTpl:'
    ',itemTpl:'
  • \n \n {name}:\n {value}\n
  • ',xCrosshairTpl:'
    ',yCrosshairTpl:'
    ',title:null,showTitle:!0,region:null,crosshairsRegion:null,containerClassName:Ya,crosshairs:null,offset:10,position:"right",domStyles:null,defaultStyles:ao})},e.prototype.render=function(){this.get("customContent")?this.renderCustomContent():(this.resetTitle(),this.renderItems()),this.resetPosition()},e.prototype.clear=function(){this.clearCrosshairs(),this.setTitle(""),this.clearItemDoms()},e.prototype.show=function(){var t=this.getContainer();t&&!this.destroyed&&(this.set("visible",!0),j(t,{visibility:"visible"}),this.setCrossHairsVisible(!0))},e.prototype.hide=function(){var t=this.getContainer();t&&!this.destroyed&&(this.set("visible",!1),j(t,{visibility:"hidden"}),this.setCrossHairsVisible(!1))},e.prototype.getLocation=function(){return{x:this.get("x"),y:this.get("y")}},e.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetPosition()},e.prototype.setCrossHairsVisible=function(t){var e=t?"":"none",n=this.get("xCrosshairDom"),r=this.get("yCrosshairDom");n&&j(n,{display:e}),r&&j(r,{display:e})},e.prototype.initContainer=function(){if(t.prototype.initContainer.call(this),this.get("customContent")){this.get("container")&&this.get("container").remove();var e=this.getHtmlContentNode();this.get("parent").appendChild(e),this.set("container",e),this.resetStyles(),this.applyStyles()}},e.prototype.updateInner=function(e){this.get("customContent")?this.renderCustomContent():(uo(e,["title","showTitle"])&&this.resetTitle(),(0,x.hasKey)(e,"items")&&this.renderItems()),t.prototype.updateInner.call(this,e)},e.prototype.initDom=function(){this.cacheDoms()},e.prototype.removeDom=function(){t.prototype.removeDom.call(this),this.clearCrosshairs()},e.prototype.resetPosition=function(){var t,e=this.get("x"),n=this.get("y"),r=this.get("offset"),i=this.getOffset(),a=i.offsetX,o=i.offsetY,s=this.get("position"),l=this.get("region"),u=this.getContainer(),c=this.getBBox(),d=c.width,h=c.height;l&&(t=Lr(l));var f=lo(e,n,r,d,h,s,t);j(u,{left:Gr(f.x+a),top:Gr(f.y+o)}),this.resetCrosshairs()},e.prototype.renderCustomContent=function(){var t=this.getHtmlContentNode(),e=this.get("parent"),n=this.get("container");n&&n.parentNode===e?e.replaceChild(t,n):e.appendChild(t),this.set("container",t),this.resetStyles(),this.applyStyles()},e.prototype.getHtmlContentNode=function(){var t,e=this.get("customContent");if(e){var n=e(this.get("title"),this.get("items"));t=(0,x.isElement)(n)?n:z(n)}return t},e.prototype.cacheDoms=function(){var t=this.getContainer(),e=t.getElementsByClassName(Ka)[0],n=t.getElementsByClassName(Qa)[0];this.set("titleDom",e),this.set("listDom",n)},e.prototype.resetTitle=function(){var t=this.get("title"),e=this.get("showTitle");e&&t?this.setTitle(t):this.setTitle("")},e.prototype.setTitle=function(t){var e=this.get("titleDom");e&&(e.innerText=t)},e.prototype.resetCrosshairs=function(){var t=this.get("crosshairsRegion"),e=this.get("crosshairs");if(t&&e){var n=Lr(t),r=this.get("xCrosshairDom"),i=this.get("yCrosshairDom");"x"===e?(this.resetCrosshair("x",n),i&&(i.remove(),this.set("yCrosshairDom",null))):"y"===e?(this.resetCrosshair("y",n),r&&(r.remove(),this.set("xCrosshairDom",null))):(this.resetCrosshair("x",n),this.resetCrosshair("y",n)),this.setCrossHairsVisible(this.get("visible"))}else this.clearCrosshairs()},e.prototype.resetCrosshair=function(t,e){var n=this.checkCrosshair(t),r=this.get(t);j(n,"x"===t?{left:Gr(r),top:Gr(e.y),height:Gr(e.height)}:{top:Gr(r),left:Gr(e.x),width:Gr(e.width)})},e.prototype.checkCrosshair=function(t){var e=t+"CrosshairDom",n=t+"CrosshairTpl",r="CROSSHAIR_"+t.toUpperCase(),i=c[r],a=this.get(e),o=this.get("parent");return a||(a=z(this.get(n)),this.applyStyle(i,a),o.appendChild(a),this.set(e,a)),a},e.prototype.renderItems=function(){this.clearItemDoms();var t=this.get("items"),e=this.get("itemTpl"),n=this.get("listDom");n&&((0,x.each)(t,(function(t){var r=Rt.toCSSGradient(t.color),i=(0,b.__assign)((0,b.__assign)({},t),{color:r}),a=(0,x.substitute)(e,i),o=z(a);n.appendChild(o)})),this.applyChildrenStyles(n,this.get("domStyles")))},e.prototype.clearItemDoms=function(){this.get("listDom")&&Pr(this.get("listDom"))},e.prototype.clearCrosshairs=function(){var t=this.get("xCrosshairDom"),e=this.get("yCrosshairDom");t&&t.remove(),e&&e.remove(),this.set("xCrosshairDom",null),this.set("yCrosshairDom",null)},e}(zi),ho=co,fo={opacity:0},po={stroke:"#C5C5C5",strokeOpacity:.85},go={fill:"#CACED4",opacity:.85},mo=n(39499);function vo(t){return(0,x.map)(t,(function(t,e){var n=0===e?"M":"L",r=t[0],i=t[1];return[n,r,i]}))}function yo(t){return vo(t)}function bo(t){if(t.length<=2)return yo(t);var e=[];(0,x.each)(t,(function(t){(0,x.isEqual)(t,e.slice(e.length-2))||e.push(t[0],t[1])}));var n=(0,mo.e9)(e,!1),r=(0,x.head)(t),i=r[0],a=r[1];return n.unshift(["M",i,a]),n}function xo(t,e,n,r){void 0===r&&(r=!0);var i=new Ye({values:t}),a=new te({values:(0,x.map)(t,(function(t,e){return e}))}),o=(0,x.map)(t,(function(t,r){return[a.scale(r)*e,n-i.scale(t)*n]}));return r?bo(o):yo(o)}function wo(t,e){var n=new Ye({values:t}),r=n.max<0?n.max:Math.max(0,n.min);return e-n.scale(r)*e}function _o(t,e,n,r){var i=(0,b.__spreadArrays)(t),a=wo(r,n);return i.push(["L",e,a]),i.push(["L",0,a]),i.push(["Z"]),i}var Co=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,b.__assign)((0,b.__assign)({},e),{name:"trend",x:0,y:0,width:200,height:16,smooth:!0,isArea:!1,data:[],backgroundStyle:fo,lineStyle:po,areaStyle:go})},e.prototype.renderInner=function(t){var e=this.cfg,n=e.width,r=e.height,i=e.data,a=e.smooth,o=e.isArea,s=e.backgroundStyle,l=e.lineStyle,u=e.areaStyle;this.addShape(t,{id:this.getElementId("background"),type:"rect",attrs:(0,b.__assign)({x:0,y:0,width:n,height:r},s)});var c=xo(i,n,r,a);if(this.addShape(t,{id:this.getElementId("line"),type:"path",attrs:(0,b.__assign)({path:c},l)}),o){var d=_o(c,n,r,i);this.addShape(t,{id:this.getElementId("area"),type:"path",attrs:(0,b.__assign)({path:d},u)})}},e.prototype.applyOffset=function(){var t=this.cfg,e=t.x,n=t.y;this.moveElementTo(this.get("group"),{x:e,y:n})},e}(ei),So={fill:"#F7F7F7",stroke:"#BFBFBF",radius:2,opacity:1,cursor:"ew-resize",highLightFill:"#FFF"},Ao=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,b.__assign)((0,b.__assign)({},e),{name:"handler",x:0,y:0,width:10,height:24,style:So})},e.prototype.renderInner=function(t){var e=this.cfg,n=e.width,r=e.height,i=e.style,a=i.fill,o=i.stroke,s=i.radius,l=i.opacity,u=i.cursor;this.addShape(t,{type:"rect",id:this.getElementId("background"),attrs:{x:0,y:0,width:n,height:r,fill:a,stroke:o,radius:s,opacity:l,cursor:u}});var c=1/3*n,d=2/3*n,h=1/4*r,f=3/4*r;this.addShape(t,{id:this.getElementId("line-left"),type:"line",attrs:{x1:c,y1:h,x2:c,y2:f,stroke:o,cursor:u}}),this.addShape(t,{id:this.getElementId("line-right"),type:"line",attrs:{x1:d,y1:h,x2:d,y2:f,stroke:o,cursor:u}})},e.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},e.prototype.initEvent=function(){this.bindEvents()},e.prototype.bindEvents=function(){var t=this;this.get("group").on("mouseenter",(function(){var e=t.get("style").highLightFill;t.getElementByLocalId("background").attr("fill",e),t.draw()})),this.get("group").on("mouseleave",(function(){var e=t.get("style").fill;t.getElementByLocalId("background").attr("fill",e),t.draw()}))},e.prototype.draw=function(){var t=this.get("container").get("canvas");t&&t.draw()},e}(ei),ko={fill:"#416180",opacity:.05},Eo={fill:"#5B8FF9",opacity:.15,cursor:"move"},Do=10,Fo={width:Do,height:24},Mo={textBaseline:"middle",fill:"#000",opacity:.45},Oo="sliderchange",Bo=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.onMouseDown=function(t){return function(n){e.currentTarget=t;var r=n.originalEvent;r.stopPropagation(),r.preventDefault(),e.prevX=(0,x.get)(r,"touches.0.pageX",r.pageX),e.prevY=(0,x.get)(r,"touches.0.pageY",r.pageY);var i=e.getContainerDOM();i.addEventListener("mousemove",e.onMouseMove),i.addEventListener("mouseup",e.onMouseUp),i.addEventListener("mouseleave",e.onMouseUp),i.addEventListener("touchmove",e.onMouseMove),i.addEventListener("touchend",e.onMouseUp),i.addEventListener("touchcancel",e.onMouseUp)}},e.onMouseMove=function(t){var n=e.cfg.width,r=[e.get("start"),e.get("end")];t.stopPropagation(),t.preventDefault();var i=(0,x.get)(t,"touches.0.pageX",t.pageX),a=(0,x.get)(t,"touches.0.pageY",t.pageY),o=i-e.prevX,s=e.adjustOffsetRange(o/n);e.updateStartEnd(s),e.updateUI(e.getElementByLocalId("foreground"),e.getElementByLocalId("minText"),e.getElementByLocalId("maxText")),e.prevX=i,e.prevY=a,e.draw(),e.emit(Oo,[e.get("start"),e.get("end")].sort()),e.delegateEmit("valuechanged",{originValue:r,value:[e.get("start"),e.get("end")]})},e.onMouseUp=function(){e.currentTarget&&(e.currentTarget=void 0);var t=e.getContainerDOM();t&&(t.removeEventListener("mousemove",e.onMouseMove),t.removeEventListener("mouseup",e.onMouseUp),t.removeEventListener("mouseleave",e.onMouseUp),t.removeEventListener("touchmove",e.onMouseMove),t.removeEventListener("touchend",e.onMouseUp),t.removeEventListener("touchcancel",e.onMouseUp))},e}return(0,b.__extends)(e,t),e.prototype.setRange=function(t,e){this.set("minLimit",t),this.set("maxLimit",e);var n=this.get("start"),r=this.get("end"),i=(0,x.clamp)(n,t,e),a=(0,x.clamp)(r,t,e);this.get("isInit")||n===i&&r===a||this.setValue([i,a])},e.prototype.getRange=function(){return{min:this.get("minLimit")||0,max:this.get("maxLimit")||1}},e.prototype.setValue=function(t){var e=this.getRange();if((0,x.isArray)(t)&&2===t.length){var n=[this.get("start"),this.get("end")];this.update({start:(0,x.clamp)(t[0],e.min,e.max),end:(0,x.clamp)(t[1],e.min,e.max)}),this.get("updateAutoRender")||this.render(),this.delegateEmit("valuechanged",{originValue:n,value:t})}},e.prototype.getValue=function(){return[this.get("start"),this.get("end")]},e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,b.__assign)((0,b.__assign)({},e),{name:"slider",x:0,y:0,width:100,height:16,backgroundStyle:{},foregroundStyle:{},handlerStyle:{},textStyle:{},defaultCfg:{backgroundStyle:ko,foregroundStyle:Eo,handlerStyle:Fo,textStyle:Mo}})},e.prototype.update=function(e){var n=e.start,r=e.end,i=(0,b.__assign)({},e);(0,x.isNil)(n)||(i.start=(0,x.clamp)(n,0,1)),(0,x.isNil)(r)||(i.end=(0,x.clamp)(r,0,1)),t.prototype.update.call(this,i),this.minHandler=this.getChildComponentById(this.getElementId("minHandler")),this.maxHandler=this.getChildComponentById(this.getElementId("maxHandler")),this.trend=this.getChildComponentById(this.getElementId("trend"))},e.prototype.init=function(){this.set("start",(0,x.clamp)(this.get("start"),0,1)),this.set("end",(0,x.clamp)(this.get("end"),0,1)),t.prototype.init.call(this)},e.prototype.render=function(){t.prototype.render.call(this),this.updateUI(this.getElementByLocalId("foreground"),this.getElementByLocalId("minText"),this.getElementByLocalId("maxText"))},e.prototype.renderInner=function(t){var e=this.cfg,n=(e.start,e.end,e.width),r=e.height,i=e.trendCfg,a=void 0===i?{}:i,o=e.minText,s=e.maxText,l=e.backgroundStyle,u=void 0===l?{}:l,c=e.foregroundStyle,d=void 0===c?{}:c,h=e.textStyle,f=void 0===h?{}:h,p=(0,x.deepMix)({},So,this.cfg.handlerStyle);(0,x.size)((0,x.get)(a,"data"))&&(this.trend=this.addComponent(t,(0,b.__assign)({component:Co,id:this.getElementId("trend"),x:0,y:0,width:n,height:r},a))),this.addShape(t,{id:this.getElementId("background"),type:"rect",attrs:(0,b.__assign)({x:0,y:0,width:n,height:r},u)});this.addShape(t,{id:this.getElementId("minText"),type:"text",attrs:(0,b.__assign)({y:r/2,textAlign:"right",text:o,silent:!1},f)}),this.addShape(t,{id:this.getElementId("maxText"),type:"text",attrs:(0,b.__assign)({y:r/2,textAlign:"left",text:s,silent:!1},f)}),this.addShape(t,{id:this.getElementId("foreground"),name:"foreground",type:"rect",attrs:(0,b.__assign)({y:0,height:r},d)});var g=(0,x.get)(p,"width",Do),m=(0,x.get)(p,"height",24);this.minHandler=this.addComponent(t,{component:Ao,id:this.getElementId("minHandler"),name:"handler-min",x:0,y:(r-m)/2,width:g,height:m,cursor:"ew-resize",style:p}),this.maxHandler=this.addComponent(t,{component:Ao,id:this.getElementId("maxHandler"),name:"handler-max",x:0,y:(r-m)/2,width:g,height:m,cursor:"ew-resize",style:p})},e.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},e.prototype.initEvent=function(){this.bindEvents()},e.prototype.updateUI=function(t,e,n){var r=this.cfg,i=r.start,a=r.end,o=r.width,s=r.minText,l=r.maxText,u=r.handlerStyle,c=r.height,d=i*o,h=a*o;this.trend&&(this.trend.update({width:o,height:c}),this.get("updateAutoRender")||this.trend.render()),t.attr("x",d),t.attr("width",h-d);var f=(0,x.get)(u,"width",Do);e.attr("text",s),n.attr("text",l);var p=this._dodgeText([d,h],e,n),g=p[0],m=p[1];this.minHandler&&(this.minHandler.update({x:d-f/2}),this.get("updateAutoRender")||this.minHandler.render()),(0,x.each)(g,(function(t,n){return e.attr(n,t)})),this.maxHandler&&(this.maxHandler.update({x:h-f/2}),this.get("updateAutoRender")||this.maxHandler.render()),(0,x.each)(m,(function(t,e){return n.attr(e,t)}))},e.prototype.bindEvents=function(){var t=this.get("group");t.on("handler-min:mousedown",this.onMouseDown("minHandler")),t.on("handler-min:touchstart",this.onMouseDown("minHandler")),t.on("handler-max:mousedown",this.onMouseDown("maxHandler")),t.on("handler-max:touchstart",this.onMouseDown("maxHandler"));var e=t.findById(this.getElementId("foreground"));e.on("mousedown",this.onMouseDown("foreground")),e.on("touchstart",this.onMouseDown("foreground"))},e.prototype.adjustOffsetRange=function(t){var e=this.cfg,n=e.start,r=e.end;switch(this.currentTarget){case"minHandler":var i=0-n,a=1-n;return Math.min(a,Math.max(i,t));case"maxHandler":i=0-r,a=1-r;return Math.min(a,Math.max(i,t));case"foreground":i=0-n,a=1-r;return Math.min(a,Math.max(i,t))}},e.prototype.updateStartEnd=function(t){var e=this.cfg,n=e.start,r=e.end;switch(this.currentTarget){case"minHandler":n+=t;break;case"maxHandler":r+=t;break;case"foreground":n+=t,r+=t;break}this.set("start",n),this.set("end",r)},e.prototype._dodgeText=function(t,e,n){var r,i,a=this.cfg,o=a.handlerStyle,s=a.width,l=2,u=(0,x.get)(o,"width",Do),c=t[0],d=t[1],h=!1;c>d&&(r=[d,c],c=r[0],d=r[1],i=[n,e],e=i[0],n=i[1],h=!0);var f=e.getBBox(),p=n.getBBox(),g=f.width>c-l?{x:c+u/2+l,textAlign:"left"}:{x:c-u/2-l,textAlign:"right"},m=p.width>s-d-l?{x:d-u/2-l,textAlign:"right"}:{x:d+u/2+l,textAlign:"left"};return h?[m,g]:[g,m]},e.prototype.draw=function(){var t=this.get("container"),e=t&&t.get("canvas");e&&e.draw()},e.prototype.getContainerDOM=function(){var t=this.get("container"),e=t&&t.get("canvas");return e&&e.get("container")},e}(ei);function To(t,e,n){if(t){if("function"===typeof t.addEventListener)return t.addEventListener(e,n,!1),{remove:function(){t.removeEventListener(e,n,!1)}};if("function"===typeof t.attachEvent)return t.attachEvent("on"+e,n),{remove:function(){t.detachEvent("on"+e,n)}}}}var Po={trackColor:"rgba(0,0,0,0)",thumbColor:"rgba(0,0,0,0.15)",size:8,lineCap:"round"},Io={default:Po,hover:{thumbColor:"rgba(0,0,0,0.2)"}},Lo=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.clearEvents=x.noop,e.onStartEvent=function(t){return function(n){e.isMobile=t,n.originalEvent.preventDefault();var r=t?(0,x.get)(n.originalEvent,"touches.0.clientX"):n.clientX,i=t?(0,x.get)(n.originalEvent,"touches.0.clientY"):n.clientY;e.startPos=e.cfg.isHorizontal?r:i,e.bindLaterEvent()}},e.bindLaterEvent=function(){var t=e.getContainerDOM(),n=[];n=e.isMobile?[To(t,"touchmove",e.onMouseMove),To(t,"touchend",e.onMouseUp),To(t,"touchcancel",e.onMouseUp)]:[To(t,"mousemove",e.onMouseMove),To(t,"mouseup",e.onMouseUp),To(t,"mouseleave",e.onMouseUp)],e.clearEvents=function(){n.forEach((function(t){t.remove()}))}},e.onMouseMove=function(t){var n=e.cfg,r=n.isHorizontal,i=n.thumbOffset;t.preventDefault();var a=e.isMobile?(0,x.get)(t,"touches.0.clientX"):t.clientX,o=e.isMobile?(0,x.get)(t,"touches.0.clientY"):t.clientY,s=r?a:o,l=s-e.startPos;e.startPos=s,e.updateThumbOffset(i+l)},e.onMouseUp=function(t){t.preventDefault(),e.clearEvents()},e.onTrackClick=function(t){var n=e.cfg,r=n.isHorizontal,i=n.x,a=n.y,o=n.thumbLen,s=e.getContainerDOM(),l=s.getBoundingClientRect(),u=t.clientX,c=t.clientY,d=r?u-l.left-i-o/2:c-l.top-a-o/2,h=e.validateRange(d);e.updateThumbOffset(h)},e.onThumbMouseOver=function(){var t=e.cfg.theme.hover.thumbColor;e.getElementByLocalId("thumb").attr("stroke",t),e.draw()},e.onThumbMouseOut=function(){var t=e.cfg.theme.default.thumbColor;e.getElementByLocalId("thumb").attr("stroke",t),e.draw()},e}return(0,b.__extends)(e,t),e.prototype.setRange=function(t,e){this.set("minLimit",t),this.set("maxLimit",e);var n=this.getValue(),r=(0,x.clamp)(n,t,e);n===r||this.get("isInit")||this.setValue(r)},e.prototype.getRange=function(){var t=this.get("minLimit")||0,e=this.get("maxLimit")||1;return{min:t,max:e}},e.prototype.setValue=function(t){var e=this.getRange(),n=this.getValue();this.update({thumbOffset:(this.get("trackLen")-this.get("thumbLen"))*(0,x.clamp)(t,e.min,e.max)}),this.delegateEmit("valuechange",{originalValue:n,value:this.getValue()})},e.prototype.getValue=function(){return(0,x.clamp)(this.get("thumbOffset")/(this.get("trackLen")-this.get("thumbLen")),0,1)},e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return(0,b.__assign)((0,b.__assign)({},e),{name:"scrollbar",isHorizontal:!0,minThumbLen:20,thumbOffset:0,theme:Io})},e.prototype.renderInner=function(t){this.renderTrackShape(t),this.renderThumbShape(t)},e.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},e.prototype.initEvent=function(){this.bindEvents()},e.prototype.renderTrackShape=function(t){var e=this.cfg,n=e.trackLen,r=e.theme,i=void 0===r?{default:{}}:r,a=(0,x.deepMix)({},Io,i).default,o=a.lineCap,s=a.trackColor,l=a.size,u=(0,x.get)(this.cfg,"size",l),c=this.get("isHorizontal")?{x1:0+u/2,y1:u/2,x2:n-u/2,y2:u/2,lineWidth:u,stroke:s,lineCap:o}:{x1:u/2,y1:0+u/2,x2:u/2,y2:n-u/2,lineWidth:u,stroke:s,lineCap:o};return this.addShape(t,{id:this.getElementId("track"),name:"track",type:"line",attrs:c})},e.prototype.renderThumbShape=function(t){var e=this.cfg,n=e.thumbOffset,r=e.thumbLen,i=e.theme,a=(0,x.deepMix)({},Io,i).default,o=a.size,s=a.lineCap,l=a.thumbColor,u=(0,x.get)(this.cfg,"size",o),c=this.get("isHorizontal")?{x1:n+u/2,y1:u/2,x2:n+r-u/2,y2:u/2,lineWidth:u,stroke:l,lineCap:s,cursor:"default"}:{x1:u/2,y1:n+u/2,x2:u/2,y2:n+r-u/2,lineWidth:u,stroke:l,lineCap:s,cursor:"default"};return this.addShape(t,{id:this.getElementId("thumb"),name:"thumb",type:"line",attrs:c})},e.prototype.bindEvents=function(){var t=this.get("group");t.on("mousedown",this.onStartEvent(!1)),t.on("mouseup",this.onMouseUp),t.on("touchstart",this.onStartEvent(!0)),t.on("touchend",this.onMouseUp);var e=t.findById(this.getElementId("track"));e.on("click",this.onTrackClick);var n=t.findById(this.getElementId("thumb"));n.on("mouseover",this.onThumbMouseOver),n.on("mouseout",this.onThumbMouseOut)},e.prototype.getContainerDOM=function(){var t=this.get("container"),e=t&&t.get("canvas");return e&&e.get("container")},e.prototype.validateRange=function(t){var e=this.cfg,n=e.thumbLen,r=e.trackLen,i=t;return t+n>r?i=r-n:t+nt.x?t.x:e,n=nt.y?t.y:r,i=i=r&&t<=i}function ts(t,e,n){if((0,x.isString)(t))return t.padEnd(e,n);if((0,x.isArray)(t)){var r=t.length;if(r=this.minX&&t.maxX<=this.maxX&&t.minY>=this.minY&&t.maxY<=this.maxY},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.add=function(){for(var t=[],e=0;et.minX&&this.minYt.minY},t.prototype.size=function(){return this.width*this.height},t.prototype.isPointIn=function(t){return t.x>=this.minX&&t.x<=this.maxX&&t.y>=this.minY&&t.y<=this.maxY},t}();function is(t){return[[t.minX,t.minY],[t.maxX,t.minY],[t.maxX,t.maxY],[t.minX,t.maxY]]}function as(t){if(t.isPolar&&!t.isTransposed)return(t.endAngle-t.startAngle)*t.getRadius();var e=t.convert({x:0,y:0}),n=t.convert({x:1,y:0});return Math.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2))}function os(t){if(t.isPolar){var e=t.startAngle,n=t.endAngle;return n-e===2*Math.PI}return!1}function ss(t,e){var n=t.getCenter();return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function ls(t,e){var n=!1;if(t)if("theta"===t.type){var r=t.start,i=t.end;n=Jo(e.x,r.x,i.x)&&Jo(e.y,r.y,i.y)}else{var a=t.invert(e);n=Jo(a.x,0,1)&&Jo(a.y,0,1)}return n}function us(t,e){var n=t.getCenter();return Math.atan2(e.y-n.y,e.x-n.x)}function cs(t,e){void 0===e&&(e=0);var n,r=t.start,i=t.end,a=t.getWidth(),o=t.getHeight();if(t.isPolar){var s=t.startAngle,l=t.endAngle,u=t.getCenter(),c=t.getRadius();return{type:"path",startState:{path:Zo(u.x,u.y,c+e,s,s)},endState:function(t){var n=(l-s)*t+s,r=Zo(u.x,u.y,c+e,s,n);return{path:r}},attrs:{path:Zo(u.x,u.y,c+e,s,l)}}}return n=t.isTransposed?{height:o+2*e}:{width:a+2*e},{type:"rect",startState:{x:r.x-e,y:i.y-e,width:t.isTransposed?a+2*e:0,height:t.isTransposed?0:o+2*e},endState:n,attrs:{x:r.x-e,y:i.y-e,width:a+2*e,height:o+2*e}}}function ds(t,e){void 0===e&&(e=0);var n=t.start,r=t.end,i=t.getWidth(),a=t.getHeight(),o=Math.min(n.x,r.x),s=Math.min(n.y,r.y);return rs.fromRange(o-e,s-e,o+i+e,s+a+e)}var hs=/^(?:(?!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 fs(t){var e="linear";return hs.test(t)?e="timeCat":(0,x.isString)(t)&&(e="cat"),e}function ps(t,e,n,r){return void 0===e&&(e={}),e.type?e.type:"identity"!==t.type&&M.includes(n)&&["interval"].includes(r)||t.isCategory?"cat":t.type}function gs(t,e,n){var r=e||[];if((0,x.isNumber)(t)||(0,x.isNil)((0,x.firstValue)(r,t))&&(0,x.isEmpty)(n)){var i=hn("identity");return new i({field:t.toString(),values:[t]})}var a=(0,x.valuesOfKey)(r,t),o=(0,x.get)(n,"type",fs(a[0])),s=hn(o);return new s((0,b.__assign)({field:t,values:a},n))}function ms(t,e){if("identity"!==t.type&&"identity"!==e.type){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);t.change(n)}}function vs(t){return t.alias||t.field}function ys(t,e,n){var r,i=t.values,a=i.length;if(1===a)r=[.5,1];else{var o=1,s=0;os(e)?e.isTransposed?(o=(0,x.get)(n,"widthRatio.multiplePie",1/1.3),s=1/a*o,r=[s/2,1-s/2]):r=[0,1-1/a]:(s=1/a/2,r=[s,1-s])}return r}function bs(t){var e=t.values.filter((function(t){return!(0,x.isNil)(t)&&!isNaN(t)}));return Math.max.apply(Math,(0,b.__spreadArray)((0,b.__spreadArray)([],(0,b.__read)(e),!1),[(0,x.isNil)(t.max)?-1/0:t.max],!1))}function xs(t){var e,n;switch(t){case v.TOP:e={x:0,y:1},n={x:1,y:1};break;case v.RIGHT:e={x:1,y:0},n={x:1,y:1};break;case v.BOTTOM:e={x:0,y:0},n={x:1,y:0};break;case v.LEFT:e={x:0,y:0},n={x:0,y:1};break;default:e=n={x:0,y:0}}return{start:e,end:n}}function ws(t){var e,n;return t.isTransposed?(e={x:0,y:0},n={x:1,y:0}):(e={x:0,y:0},n={x:0,y:1}),{start:e,end:n}}function _s(t,e){var n={start:{x:0,y:0},end:{x:0,y:0}};t.isRect?n=xs(e):t.isPolar&&(n=ws(t));var r=n.start,i=n.end;return{start:t.convert(r),end:t.convert(i)}}function Cs(t){var e=t.start,n=t.end;return e.x===n.x}function Ss(t,e){var n=t.start,r=t.end,i=Cs(t);return i?(n.y-r.y)*(e.x-n.x)>0?1:-1:(r.x-n.x)*(n.y-e.y)>0?-1:1}function As(t,e){var n=(0,x.get)(t,["components","axis"],{});return(0,x.deepMix)({},(0,x.get)(n,["common"],{}),(0,x.deepMix)({},(0,x.get)(n,[e],{})))}function ks(t,e,n){var r=(0,x.get)(t,["components","axis"],{});return(0,x.deepMix)({},(0,x.get)(r,["common","title"],{}),(0,x.deepMix)({},(0,x.get)(r,[e,"title"],{})),n)}function Es(t){var e=t.x,n=t.y,r=t.circleCenter,i=n.start>n.end,a=t.isTransposed?t.convert({x:i?0:1,y:0}):t.convert({x:0,y:i?0:1}),o=[a.x-r.x,a.y-r.y],s=[1,0],l=a.y>r.y?mr.angle(o,s):-1*mr.angle(o,s),u=l+(e.end-e.start),c=Math.sqrt(Math.pow(a.x-r.x,2)+Math.pow(a.y-r.y,2));return{center:r,radius:c,startAngle:l,endAngle:u}}function Ds(t,e){return(0,x.isBoolean)(t)?!1!==t&&{}:(0,x.get)(t,[e])}function Fs(t,e){return(0,x.get)(t,"position",e)}function Ms(t,e){return(0,x.get)(e,["title","text"],vs(t))}var Os=function(){function t(t,e){this.destroyed=!1,this.facets=[],this.view=t,this.cfg=(0,x.deepMix)({},this.getDefaultCfg(),e)}return t.prototype.init=function(){this.container||(this.container=this.createContainer());var t=this.view.getData();this.facets=this.generateFacets(t)},t.prototype.render=function(){this.renderViews()},t.prototype.update=function(){},t.prototype.clear=function(){this.clearFacetViews()},t.prototype.destroy=function(){this.clear(),this.container&&(this.container.remove(!0),this.container=void 0),this.destroyed=!0,this.view=void 0,this.facets=[]},t.prototype.facetToView=function(t){var e=t.region,n=t.data,r=t.padding,i=void 0===r?this.cfg.padding:r,a=this.view.createView({region:e,padding:i});a.data(n||[]),t.view=a,this.beforeEachView(a,t);var o=this.cfg.eachView;return o&&o(a,t),this.afterEachView(a,t),a},t.prototype.createContainer=function(){var t=this.view.getLayer(m.FORE);return t.addGroup()},t.prototype.renderViews=function(){this.createFacetViews()},t.prototype.createFacetViews=function(){var t=this;return this.facets.map((function(e){return t.facetToView(e)}))},t.prototype.clearFacetViews=function(){var t=this;(0,x.each)(this.facets,(function(e){e.view&&(t.view.removeView(e.view),e.view=void 0)}))},t.prototype.parseSpacing=function(){var t=this.view.viewBBox,e=t.width,n=t.height,r=this.cfg.spacing;return r.map((function(t,r){return(0,x.isNumber)(t)?t/(0===r?e:n):parseFloat(t)/100}))},t.prototype.getFieldValues=function(t,e){var n=[],r={};return(0,x.each)(t,(function(t){var i=t[e];(0,x.isNil)(i)||r[i]||(n.push(i),r[i]=!0)})),n},t.prototype.getRegion=function(t,e,n,r){var i=(0,b.__read)(this.parseSpacing(),2),a=i[0],o=i[1],s=(1+a)/(0===e?1:e)-a,l=(1+o)/(0===t?1:t)-o,u={x:(s+a)*n,y:(l+o)*r},c={x:u.x+s,y:u.y+l};return{start:u,end:c}},t.prototype.getDefaultCfg=function(){return{eachView:void 0,showTitle:!0,spacing:[0,0],padding:10,fields:[]}},t.prototype.getDefaultTitleCfg=function(){var t=this.view.getTheme().fontFamily;return{style:{fontSize:14,fill:"#666",fontFamily:t}}},t.prototype.processAxis=function(t,e){var n=t.getOptions(),r=n.coordinate,i=t.geometries,a=(0,x.get)(r,"type","rect");if("rect"===a&&i.length){(0,x.isNil)(n.axes)&&(n.axes={});var o=n.axes,s=(0,b.__read)(i[0].getXYFields(),2),l=s[0],u=s[1],c=Ds(o,l),d=Ds(o,u);!1!==c&&(n.axes[l]=this.getXAxisOption(l,o,c,e)),!1!==d&&(n.axes[u]=this.getYAxisOption(u,o,d,e))}},t.prototype.getFacetDataFilter=function(t){return function(e){return(0,x.every)(t,(function(t){var n=t.field,r=t.value;return!(!(0,x.isNil)(r)&&n)||e[n]===r}))}},t}(),Bs={},Ts=function(t){return Bs[(0,x.lowerCase)(t)]},Ps=function(t,e){Bs[(0,x.lowerCase)(t)]=e},Is=function(){function t(t,e){this.context=t,this.cfg=e,t.addAction(this)}return t.prototype.applyCfg=function(t){(0,x.assign)(this,t)},t.prototype.init=function(){this.applyCfg(this.cfg)},t.prototype.destroy=function(){this.context.removeAction(this),this.context=null},t}(),Ls=Is,Rs=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.execute=function(){this.callback&&this.callback(this.context)},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.callback=null},e}(Ls),Ns=Rs,zs={};function js(t,e){var n=zs[t],r=null;if(n){var i=n.ActionClass,a=n.cfg;r=new i(e,a),r.name=t,r.init()}return r}function $s(t){var e=zs[t];return(0,x.get)(e,"ActionClass")}function Vs(t,e,n){zs[t]={ActionClass:e,cfg:n}}function qs(t,e){var n=new Ns(e);return n.callback=t,n.name="callback",n}function Hs(t,e){var n=[];if(t.length){n.push(["M",t[0].x,t[0].y]);for(var r=1,i=t.length;r=o[u]?1:0,h=c>Math.PI?1:0,f=n.convert(s),p=ss(n,f);if(p>=.5)if(c===2*Math.PI){var g={x:(s.x+o.x)/2,y:(s.y+o.y)/2},m=n.convert(g);l.push(["A",p,p,0,h,d,m.x,m.y]),l.push(["A",p,p,0,h,d,f.x,f.y])}else l.push(["A",p,p,0,h,d,f.x,f.y]);return l}function Zs(t){(0,x.each)(t,(function(e,n){var r=e;if("a"===r[0].toLowerCase()){var i=t[n-1],a=t[n+1];a&&"a"===a[0].toLowerCase()?i&&"l"===i[0].toLowerCase()&&(i[0]="M"):i&&"a"===i[0].toLowerCase()&&a&&"l"===a[0].toLowerCase()&&(a[0]="M")}}))}var Xs=function(t,e,n,r){var i,a,o,s,l,u,c,d,h=[],f=!!r;if(f){i=(0,b.__read)(r,2),s=i[0],l=i[1];for(var p=0,g=t.length;p=e||i.height>=e?i:null}function nl(t,e){var n=t.event,r=n.target,i=r.getCanvasBBox();return i.width>=e||i.height>=e?r.attr("path"):null}function rl(t){var e,n=t.event,r=n.target;return r&&(e=r.get("element")),e}function il(t){var e,n=t.event,r=n.target;return r&&(e=r.get("delegateObject")),e}function al(t){var e=t.event.gEvent;return!(e&&e.fromShape&&e.toShape&&e.fromShape.get("element")===e.toShape.get("element"))}function ol(t){return t&&t.component&&t.component.isList()}function sl(t){return t&&t.component&&t.component.isSlider()}function ll(t){var e=t.event,n=e.target;return n&&"mask"===n.get("name")}function ul(t,e){var n=t.event.target;if("path"===n.get("type")){var r=nl(t,e);if(!r)return;return yl(t.view,r)}var i=el(t,e);return i?ml(t.view,i):null}function cl(t,e,n){var r=el(t,n);if(!r)return null;var i=t.view,a=Al(i,e,{x:r.x,y:r.y}),o=Al(i,e,{x:r.maxX,y:r.maxY}),s={minX:a.x,minY:a.y,maxX:o.x,maxY:o.y};return ml(e,s)}function dl(t){var e=t.geometries,n=[];return(0,x.each)(e,(function(t){var e=t.elements;n=n.concat(e)})),t.views&&t.views.length&&(0,x.each)(t.views,(function(t){n=n.concat(dl(t))})),n}function hl(t,e,n){var r=dl(t);return r.filter((function(t){return pl(t,e)===n}))}function fl(t,e){var n=t.geometries,r=[];return(0,x.each)(n,(function(t){var n=t.getElementsBy((function(t){return t.hasState(e)}));r=r.concat(n)})),r}function pl(t,e){var n,r=t.getModel(),i=r.data;return n=(0,x.isArray)(i)?i[0][e]:i[e],n}function gl(t,e){return!(e.minX>t.maxX||e.maxXt.maxY||e.maxY=e.x&&t.y<=e.y&&t.maxY>e.y}function Cl(t){var e=t.parent,n=null;return e&&(n=e.views.filter((function(e){return e!==t}))),n}function Sl(t,e){var n=t.getCoordinate();return n.invert(e)}function Al(t,e,n){var r=Sl(t,n);return e.getCoordinate().convert(r)}function kl(t,e,n,r){var i=!1;return(0,x.each)(t,(function(t){if(t[n]===e[n]&&t[r]===e[r])return i=!0,!1})),i}function El(t,e){var n=t.getScaleByField(e);return!n&&t.views&&(0,x.each)(t.views,(function(t){if(n=El(t,e),n)return!1})),n}var Dl=function(){function t(t){this.actions=[],this.event=null,this.cacheMap={},this.view=t}return t.prototype.cache=function(){for(var t=[],e=0;e=0&&e.splice(n,1)},t.prototype.getCurrentPoint=function(){var t=this.event;if(t){if(t.target instanceof HTMLElement){var e=this.view.getCanvas(),n=e.getPointByClient(t.clientX,t.clientY);return n}return{x:t.x,y:t.y}}return null},t.prototype.getCurrentShape=function(){return(0,x.get)(this.event,["gEvent","shape"])},t.prototype.isInPlot=function(){var t=this.getCurrentPoint();return!!t&&this.view.isPointInPlot(t)},t.prototype.isInShape=function(t){var e=this.getCurrentShape();return!!e&&e.get("name")===t},t.prototype.isInComponent=function(t){var e=bl(this.view),n=this.getCurrentPoint();return!!n&&!!e.find((function(e){var r=e.getBBox();return t?e.get("name")===t&&_l(r,n):_l(r,n)}))},t.prototype.destroy=function(){(0,x.each)(this.actions.slice(),(function(t){t.destroy()})),this.view=null,this.event=null,this.actions=null,this.cacheMap=null},t}(),Fl=Dl,Ml=function(){function t(t,e){this.view=t,this.cfg=e}return t.prototype.init=function(){this.initEvents()},t.prototype.initEvents=function(){},t.prototype.clearEvents=function(){},t.prototype.destroy=function(){this.clearEvents()},t}(),Ol=Ml;function Bl(t,e,n){var r=t.split(":"),i=r[0],a=e.getAction(i)||js(i,e);if(!a)throw new Error("There is no action named ".concat(i));var o=r[1];return{action:a,methodName:o,arg:n}}function Tl(t){var e=t.action,n=t.methodName,r=t.arg;if(!e[n])throw new Error("Action(".concat(e.name,") doesn't have a method called ").concat(n));e[n](r)}var Pl={START:"start",SHOW_ENABLE:"showEnable",END:"end",ROLLBACK:"rollback",PROCESSING:"processing"},Il=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.callbackCaches={},r.emitCaches={},r.steps=n,r}return(0,b.__extends)(e,t),e.prototype.init=function(){this.initContext(),t.prototype.init.call(this)},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.steps=null,this.context&&(this.context.destroy(),this.context=null),this.callbackCaches=null,this.view=null},e.prototype.initEvents=function(){var t=this;(0,x.each)(this.steps,(function(e,n){(0,x.each)(e,(function(e){var r=t.getActionCallback(n,e);r&&t.bindEvent(e.trigger,r)}))}))},e.prototype.clearEvents=function(){var t=this;(0,x.each)(this.steps,(function(e,n){(0,x.each)(e,(function(e){var r=t.getActionCallback(n,e);r&&t.offEvent(e.trigger,r)}))}))},e.prototype.initContext=function(){var t=this.view,e=new Fl(t);this.context=e;var n=this.steps;(0,x.each)(n,(function(t){(0,x.each)(t,(function(t){if((0,x.isFunction)(t.action))t.actionObject={action:qs(t.action,e),methodName:"execute"};else if((0,x.isString)(t.action))t.actionObject=Bl(t.action,e,t.arg);else if((0,x.isArray)(t.action)){var n=t.action,r=(0,x.isArray)(t.arg)?t.arg:[t.arg];t.actionObject=[],(0,x.each)(n,(function(n,i){t.actionObject.push(Bl(n,e,r[i]))}))}}))}))},e.prototype.isAllowStep=function(t){var e=this.currentStepName,n=this.steps;if(e===t)return!0;if(t===Pl.SHOW_ENABLE)return!0;if(t===Pl.PROCESSING)return e===Pl.START;if(t===Pl.START)return e!==Pl.PROCESSING;if(t===Pl.END)return e===Pl.PROCESSING||e===Pl.START;if(t===Pl.ROLLBACK){if(n[Pl.END])return e===Pl.END;if(e===Pl.START)return!0}return!1},e.prototype.isAllowExecute=function(t,e){if(this.isAllowStep(t)){var n=this.getKey(t,e);return(!e.once||!this.emitCaches[n])&&(!e.isEnable||e.isEnable(this.context))}return!1},e.prototype.enterStep=function(t){this.currentStepName=t,this.emitCaches={}},e.prototype.afterExecute=function(t,e){t!==Pl.SHOW_ENABLE&&this.currentStepName!==t&&this.enterStep(t);var n=this.getKey(t,e);this.emitCaches[n]=!0},e.prototype.getKey=function(t,e){return t+e.trigger+e.action},e.prototype.getActionCallback=function(t,e){var n=this,r=this.context,i=this.callbackCaches,a=e.actionObject;if(e.action&&a){var o=this.getKey(t,e);if(!i[o]){var s=function(i){r.event=i,n.isAllowExecute(t,e)?((0,x.isArray)(a)?(0,x.each)(a,(function(t){r.event=i,Tl(t)})):(r.event=i,Tl(a)),n.afterExecute(t,e),e.callback&&(r.event=i,e.callback(r))):r.event=null};e.debounce?i[o]=(0,x.debounce)(s,e.debounce.wait,e.debounce.immediate):e.throttle?i[o]=(0,x.throttle)(s,e.throttle.wait,{leading:e.throttle.leading,trailing:e.throttle.trailing}):i[o]=s}return i[o]}return null},e.prototype.bindEvent=function(t,e){var n=t.split(":");"window"===n[0]?window.addEventListener(n[1],e):"document"===n[0]?document.addEventListener(n[1],e):this.view.on(t,e)},e.prototype.offEvent=function(t,e){var n=t.split(":");"window"===n[0]?window.removeEventListener(n[1],e):"document"===n[0]?document.removeEventListener(n[1],e):this.view.off(t,e)},e}(Ol),Ll=Il,Rl={};function Nl(t){return Rl[(0,x.lowerCase)(t)]}function zl(t,e){Rl[(0,x.lowerCase)(t)]=e}function jl(t,e,n){var r=Nl(t);if(!r)return null;if((0,x.isPlainObject)(r)){var i=(0,x.mix)((0,x.clone)(r),n);return new Ll(e,i)}var a=r;return new a(e,n)}function $l(t){return{title:{autoRotate:!0,position:"center",spacing:t.axisTitleSpacing,style:{fill:t.axisTitleTextFillColor,fontSize:t.axisTitleTextFontSize,lineHeight:t.axisTitleTextLineHeight,textBaseline:"middle",fontFamily:t.fontFamily},iconStyle:{fill:t.axisDescriptionIconFillColor}},label:{autoRotate:!1,autoEllipsis:!1,autoHide:{type:"equidistance",cfg:{minGap:6}},offset:t.axisLabelOffset,style:{fill:t.axisLabelFillColor,fontSize:t.axisLabelFontSize,lineHeight:t.axisLabelLineHeight,fontFamily:t.fontFamily}},line:{style:{lineWidth:t.axisLineBorder,stroke:t.axisLineBorderColor}},grid:{line:{type:"line",style:{stroke:t.axisGridBorderColor,lineWidth:t.axisGridBorder,lineDash:t.axisGridLineDash}},alignTick:!0,animate:!0},tickLine:{style:{lineWidth:t.axisTickLineBorder,stroke:t.axisTickLineBorderColor},alignTick:!0,length:t.axisTickLineLength},subTickLine:null,animate:!0}}function Vl(t){return{title:null,marker:{symbol:"circle",spacing:t.legendMarkerSpacing,style:{r:t.legendCircleMarkerSize,fill:t.legendMarkerColor}},itemName:{spacing:5,style:{fill:t.legendItemNameFillColor,fontFamily:t.fontFamily,fontSize:t.legendItemNameFontSize,lineHeight:t.legendItemNameLineHeight,fontWeight:t.legendItemNameFontWeight,textAlign:"start",textBaseline:"middle"}},itemStates:{active:{nameStyle:{opacity:.8}},unchecked:{nameStyle:{fill:"#D8D8D8"},markerStyle:{fill:"#D8D8D8",stroke:"#D8D8D8"}},inactive:{nameStyle:{fill:"#D8D8D8"},markerStyle:{opacity:.2}}},flipPage:!0,pageNavigator:{marker:{style:{size:t.legendPageNavigatorMarkerSize,inactiveFill:t.legendPageNavigatorMarkerInactiveFillColor,inactiveOpacity:t.legendPageNavigatorMarkerInactiveFillOpacity,fill:t.legendPageNavigatorMarkerFillColor,opacity:t.legendPageNavigatorMarkerFillOpacity}},text:{style:{fill:t.legendPageNavigatorTextFillColor,fontSize:t.legendPageNavigatorTextFontSize}}},animate:!1,maxItemWidth:200,itemSpacing:t.legendItemSpacing,itemMarginBottom:t.legendItemMarginBottom,padding:t.legendPadding}}function ql(t){var e,n={point:{default:{fill:t.pointFillColor,r:t.pointSize,stroke:t.pointBorderColor,lineWidth:t.pointBorder,fillOpacity:t.pointFillOpacity},active:{stroke:t.pointActiveBorderColor,lineWidth:t.pointActiveBorder},selected:{stroke:t.pointSelectedBorderColor,lineWidth:t.pointSelectedBorder},inactive:{fillOpacity:t.pointInactiveFillOpacity,strokeOpacity:t.pointInactiveBorderOpacity}},hollowPoint:{default:{fill:t.hollowPointFillColor,lineWidth:t.hollowPointBorder,stroke:t.hollowPointBorderColor,strokeOpacity:t.hollowPointBorderOpacity,r:t.hollowPointSize},active:{stroke:t.hollowPointActiveBorderColor,strokeOpacity:t.hollowPointActiveBorderOpacity},selected:{lineWidth:t.hollowPointSelectedBorder,stroke:t.hollowPointSelectedBorderColor,strokeOpacity:t.hollowPointSelectedBorderOpacity},inactive:{strokeOpacity:t.hollowPointInactiveBorderOpacity}},area:{default:{fill:t.areaFillColor,fillOpacity:t.areaFillOpacity,stroke:null},active:{fillOpacity:t.areaActiveFillOpacity},selected:{fillOpacity:t.areaSelectedFillOpacity},inactive:{fillOpacity:t.areaInactiveFillOpacity}},hollowArea:{default:{fill:null,stroke:t.hollowAreaBorderColor,lineWidth:t.hollowAreaBorder,strokeOpacity:t.hollowAreaBorderOpacity},active:{fill:null,lineWidth:t.hollowAreaActiveBorder},selected:{fill:null,lineWidth:t.hollowAreaSelectedBorder},inactive:{strokeOpacity:t.hollowAreaInactiveBorderOpacity}},interval:{default:{fill:t.intervalFillColor,fillOpacity:t.intervalFillOpacity},active:{stroke:t.intervalActiveBorderColor,lineWidth:t.intervalActiveBorder},selected:{stroke:t.intervalSelectedBorderColor,lineWidth:t.intervalSelectedBorder},inactive:{fillOpacity:t.intervalInactiveFillOpacity,strokeOpacity:t.intervalInactiveBorderOpacity}},hollowInterval:{default:{fill:t.hollowIntervalFillColor,stroke:t.hollowIntervalBorderColor,lineWidth:t.hollowIntervalBorder,strokeOpacity:t.hollowIntervalBorderOpacity},active:{stroke:t.hollowIntervalActiveBorderColor,lineWidth:t.hollowIntervalActiveBorder,strokeOpacity:t.hollowIntervalActiveBorderOpacity},selected:{stroke:t.hollowIntervalSelectedBorderColor,lineWidth:t.hollowIntervalSelectedBorder,strokeOpacity:t.hollowIntervalSelectedBorderOpacity},inactive:{stroke:t.hollowIntervalInactiveBorderColor,lineWidth:t.hollowIntervalInactiveBorder,strokeOpacity:t.hollowIntervalInactiveBorderOpacity}},line:{default:{stroke:t.lineBorderColor,lineWidth:t.lineBorder,strokeOpacity:t.lineBorderOpacity,fill:null,lineAppendWidth:10,lineCap:"round",lineJoin:"round"},active:{lineWidth:t.lineActiveBorder},selected:{lineWidth:t.lineSelectedBorder},inactive:{strokeOpacity:t.lineInactiveBorderOpacity}}},r=$l(t),i=Vl(t);return{background:t.backgroundColor,defaultColor:t.brandColor,subColor:t.subColor,semanticRed:t.paletteSemanticRed,semanticGreen:t.paletteSemanticGreen,padding:"auto",fontFamily:t.fontFamily,columnWidthRatio:.5,maxColumnWidth:null,minColumnWidth:null,roseWidthRatio:.9999999,multiplePieWidthRatio:1/1.3,colors10:t.paletteQualitative10,colors20:t.paletteQualitative20,sequenceColors:t.paletteSequence,shapes:{point:["hollow-circle","hollow-square","hollow-bowtie","hollow-diamond","hollow-hexagon","hollow-triangle","hollow-triangle-down","circle","square","bowtie","diamond","hexagon","triangle","triangle-down","cross","tick","plus","hyphen","line"],line:["line","dash","dot","smooth"],area:["area","smooth","line","smooth-line"],interval:["rect","hollow-rect","line","tick"]},sizes:[1,10],geometries:{interval:{rect:{default:{style:n.interval.default},active:{style:n.interval.active},inactive:{style:n.interval.inactive},selected:{style:function(t){var e=t.geometry.coordinate;if(e.isPolar&&e.isTransposed){var r=Yo(t.getModel(),e),i=r.startAngle,a=r.endAngle,o=(i+a)/2,s=7.5,l=s*Math.cos(o),u=s*Math.sin(o);return{matrix:dr.transform(null,[["t",l,u]])}}return n.interval.selected}}},"hollow-rect":{default:{style:n.hollowInterval.default},active:{style:n.hollowInterval.active},inactive:{style:n.hollowInterval.inactive},selected:{style:n.hollowInterval.selected}},line:{default:{style:n.hollowInterval.default},active:{style:n.hollowInterval.active},inactive:{style:n.hollowInterval.inactive},selected:{style:n.hollowInterval.selected}},tick:{default:{style:n.hollowInterval.default},active:{style:n.hollowInterval.active},inactive:{style:n.hollowInterval.inactive},selected:{style:n.hollowInterval.selected}},funnel:{default:{style:n.interval.default},active:{style:n.interval.active},inactive:{style:n.interval.inactive},selected:{style:n.interval.selected}},pyramid:{default:{style:n.interval.default},active:{style:n.interval.active},inactive:{style:n.interval.inactive},selected:{style:n.interval.selected}}},line:{line:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},dot:{default:{style:(0,b.__assign)((0,b.__assign)({},n.line.default),{lineCap:null,lineDash:[1,1]})},active:{style:(0,b.__assign)((0,b.__assign)({},n.line.active),{lineCap:null,lineDash:[1,1]})},inactive:{style:(0,b.__assign)((0,b.__assign)({},n.line.inactive),{lineCap:null,lineDash:[1,1]})},selected:{style:(0,b.__assign)((0,b.__assign)({},n.line.selected),{lineCap:null,lineDash:[1,1]})}},dash:{default:{style:(0,b.__assign)((0,b.__assign)({},n.line.default),{lineCap:null,lineDash:[5.5,1]})},active:{style:(0,b.__assign)((0,b.__assign)({},n.line.active),{lineCap:null,lineDash:[5.5,1]})},inactive:{style:(0,b.__assign)((0,b.__assign)({},n.line.inactive),{lineCap:null,lineDash:[5.5,1]})},selected:{style:(0,b.__assign)((0,b.__assign)({},n.line.selected),{lineCap:null,lineDash:[5.5,1]})}},smooth:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},hv:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},vh:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},hvh:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},vhv:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}}},polygon:{polygon:{default:{style:n.interval.default},active:{style:n.interval.active},inactive:{style:n.interval.inactive},selected:{style:n.interval.selected}}},point:{circle:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},square:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},bowtie:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},diamond:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},hexagon:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},triangle:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},"triangle-down":{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},"hollow-circle":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-square":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-bowtie":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-diamond":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-hexagon":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-triangle":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-triangle-down":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},cross:{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},tick:{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},plus:{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},hyphen:{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},line:{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}}},area:{area:{default:{style:n.area.default},active:{style:n.area.active},inactive:{style:n.area.inactive},selected:{style:n.area.selected}},smooth:{default:{style:n.area.default},active:{style:n.area.active},inactive:{style:n.area.inactive},selected:{style:n.area.selected}},line:{default:{style:n.hollowArea.default},active:{style:n.hollowArea.active},inactive:{style:n.hollowArea.inactive},selected:{style:n.hollowArea.selected}},"smooth-line":{default:{style:n.hollowArea.default},active:{style:n.hollowArea.active},inactive:{style:n.hollowArea.inactive},selected:{style:n.hollowArea.selected}}},schema:{candle:{default:{style:n.hollowInterval.default},active:{style:n.hollowInterval.active},inactive:{style:n.hollowInterval.inactive},selected:{style:n.hollowInterval.selected}},box:{default:{style:n.hollowInterval.default},active:{style:n.hollowInterval.active},inactive:{style:n.hollowInterval.inactive},selected:{style:n.hollowInterval.selected}}},edge:{line:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},vhv:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},smooth:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},arc:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}}},violin:{violin:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},smooth:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},hollow:{default:{style:n.hollowArea.default},active:{style:n.hollowArea.active},inactive:{style:n.hollowArea.inactive},selected:{style:n.hollowArea.selected}},"hollow-smooth":{default:{style:n.hollowArea.default},active:{style:n.hollowArea.active},inactive:{style:n.hollowArea.inactive},selected:{style:n.hollowArea.selected}}}},components:{axis:{common:r,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,x.deepMix)({},r.grid,{line:{type:"line"}})},radius:{title:null,grid:(0,x.deepMix)({},r.grid,{line:{type:"circle"}})}},legend:{common:i,right:{layout:"vertical",padding:t.legendVerticalPadding},left:{layout:"vertical",padding:t.legendVerticalPadding},top:{layout:"horizontal",padding:t.legendHorizontalPadding},bottom:{layout:"horizontal",padding:t.legendHorizontalPadding},continuous:{title:null,background:null,track:{},rail:{type:"color",size:t.sliderRailHeight,defaultLength:t.sliderRailWidth,style:{fill:t.sliderRailFillColor,stroke:t.sliderRailBorderColor,lineWidth:t.sliderRailBorder}},label:{align:"rail",spacing:4,formatter:null,style:{fill:t.sliderLabelTextFillColor,fontSize:t.sliderLabelTextFontSize,lineHeight:t.sliderLabelTextLineHeight,textBaseline:"middle",fontFamily:t.fontFamily}},handler:{size:t.sliderHandlerWidth,style:{fill:t.sliderHandlerFillColor,stroke:t.sliderHandlerBorderColor}},slidable:!0,padding: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:t.tooltipCrosshairsBorderColor,lineWidth:t.tooltipCrosshairsBorder}},text:null,textBackground:{padding:2,style:{fill:"rgba(0, 0, 0, 0.25)",lineWidth:0,stroke:null}},follow:!1},domStyles:(e={},e["".concat(Ya)]={position:"absolute",visibility:"hidden",zIndex:8,transition:"left 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s, top 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s",backgroundColor:t.tooltipContainerFillColor,opacity:t.tooltipContainerFillOpacity,boxShadow:t.tooltipContainerShadow,borderRadius:"".concat(t.tooltipContainerBorderRadius,"px"),color:t.tooltipTextFillColor,fontSize:"".concat(t.tooltipTextFontSize,"px"),fontFamily:t.fontFamily,lineHeight:"".concat(t.tooltipTextLineHeight,"px"),padding:"0 12px 0 12px"},e["".concat(Ka)]={marginBottom:"12px",marginTop:"12px"},e["".concat(Qa)]={margin:0,listStyleType:"none",padding:0},e["".concat(Ja)]={listStyleType:"none",padding:0,marginBottom:"12px",marginTop:"12px",marginLeft:0,marginRight:0},e["".concat(to)]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},e["".concat(eo)]={display:"inline-block",float:"right",marginLeft:"30px"},e)},annotation:{arc:{style:{stroke:t.annotationArcBorderColor,lineWidth:t.annotationArcBorder},animate:!0},line:{style:{stroke:t.annotationLineBorderColor,lineDash:t.annotationLineDash,lineWidth:t.annotationLineBorder},text:{position:"start",autoRotate:!0,style:{fill:t.annotationTextFillColor,stroke:t.annotationTextBorderColor,lineWidth:t.annotationTextBorder,fontSize:t.annotationTextFontSize,textAlign:"start",fontFamily:t.fontFamily,textBaseline:"bottom"}},animate:!0},text:{style:{fill:t.annotationTextFillColor,stroke:t.annotationTextBorderColor,lineWidth:t.annotationTextBorder,fontSize:t.annotationTextFontSize,textBaseline:"middle",textAlign:"start",fontFamily:t.fontFamily},animate:!0},region:{top:!1,style:{lineWidth:t.annotationRegionBorder,stroke:t.annotationRegionBorderColor,fill:t.annotationRegionFillColor,fillOpacity:t.annotationRegionFillOpacity},animate:!0},image:{top:!1,animate:!0},dataMarker:{top:!0,point:{style:{r:3,stroke:t.brandColor,lineWidth:2}},line:{style:{stroke:t.annotationLineBorderColor,lineWidth:t.annotationLineBorder},length:t.annotationDataMarkerLineLength},text:{style:{textAlign:"start",fill:t.annotationTextFillColor,stroke:t.annotationTextBorderColor,lineWidth:t.annotationTextBorder,fontSize:t.annotationTextFontSize,fontFamily:t.fontFamily}},direction:"upward",autoAdjust:!0,animate:!0},dataRegion:{style:{region:{fill:t.annotationRegionFillColor,fillOpacity:t.annotationRegionFillOpacity},text:{textAlign:"center",textBaseline:"bottom",fill:t.annotationTextFillColor,stroke:t.annotationTextBorderColor,lineWidth:t.annotationTextBorder,fontSize:t.annotationTextFontSize,fontFamily:t.fontFamily}},animate:!0}},slider:{common:{padding:[8,8,8,8],backgroundStyle:{fill:t.cSliderBackgroundFillColor,opacity:t.cSliderBackgroundFillOpacity},foregroundStyle:{fill:t.cSliderForegroundFillColor,opacity:t.cSliderForegroundFillOpacity},handlerStyle:{width:t.cSliderHandlerWidth,height:t.cSliderHandlerHeight,fill:t.cSliderHandlerFillColor,opacity:t.cSliderHandlerFillOpacity,stroke:t.cSliderHandlerBorderColor,lineWidth:t.cSliderHandlerBorder,radius:t.cSliderHandlerBorderRadius,highLightFill:t.cSliderHandlerHighlightFillColor},textStyle:{fill:t.cSliderTextFillColor,opacity:t.cSliderTextFillOpacity,fontSize:t.cSliderTextFontSize,lineHeight:t.cSliderTextLineHeight,fontWeight:t.cSliderTextFontWeight,stroke:t.cSliderTextBorderColor,lineWidth:t.cSliderTextBorder}}},scrollbar:{common:{padding:[8,8,8,8]},default:{style:{trackColor:t.scrollbarTrackFillColor,thumbColor:t.scrollbarThumbFillColor}},hover:{style:{thumbColor:t.scrollbarThumbHighlightFillColor}}}},labels:{offset:12,style:{fill:t.labelFillColor,fontSize:t.labelFontSize,fontFamily:t.fontFamily,stroke:t.labelBorderColor,lineWidth:t.labelBorder},fillColorDark:t.labelFillColorDark,fillColorLight:t.labelFillColorLight,autoRotate:!0},innerLabels:{style:{fill:t.innerLabelFillColor,fontSize:t.innerLabelFontSize,fontFamily:t.fontFamily,stroke:t.innerLabelBorderColor,lineWidth:t.innerLabelBorder},autoRotate:!0},overflowLabels:{style:{fill:t.overflowLabelFillColor,fontSize:t.overflowLabelFontSize,fontFamily:t.fontFamily,stroke:t.overflowLabelBorderColor,lineWidth:t.overflowLabelBorder}},pieLabels:{labelHeight:14,offset:10,labelLine:{style:{lineWidth:t.labelLineBorder}},autoRotate:!0}}}var Hl={100:"#000",95:"#0D0D0D",85:"#262626",65:"#595959",45:"#8C8C8C",25:"#BFBFBF",15:"#D9D9D9",6:"#F0F0F0"},Ul={100:"#FFFFFF",95:"#F2F2F2",85:"#D9D9D9",65:"#A6A6A6",45:"#737373",25:"#404040",15:"#262626",6:"#0F0F0F"},Gl=["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"],Wl=["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"],Zl=["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"],Xl=function(t){void 0===t&&(t={});var e=t.paletteQualitative10,n=void 0===e?Gl:e,r=t.paletteQualitative20,i=void 0===r?Wl:r,a=t.brandColor,o=void 0===a?n[0]:a,s={backgroundColor:"transparent",brandColor:o,subColor:"rgba(0,0,0,0.05)",paletteQualitative10:n,paletteQualitative20:i,paletteSemanticRed:"#F4664A",paletteSemanticGreen:"#30BF78",paletteSemanticYellow:"#FAAD14",paletteSequence:Zl,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:Hl[25],axisLineBorder:1,axisLineDash:null,axisTitleTextFillColor:Hl[65],axisTitleTextFontSize:12,axisTitleTextLineHeight:12,axisTitleTextFontWeight:"normal",axisTitleSpacing:12,axisDescriptionIconFillColor:Ul[85],axisTickLineBorderColor:Hl[25],axisTickLineLength:4,axisTickLineBorder:1,axisSubTickLineBorderColor:Hl[15],axisSubTickLineLength:2,axisSubTickLineBorder:1,axisLabelFillColor:Hl[45],axisLabelFontSize:12,axisLabelLineHeight:12,axisLabelFontWeight:"normal",axisLabelOffset:8,axisGridBorderColor:Hl[15],axisGridBorder:1,axisGridLineDash:null,legendTitleTextFillColor:Hl[45],legendTitleTextFontSize:12,legendTitleTextLineHeight:21,legendTitleTextFontWeight:"normal",legendMarkerColor:o,legendMarkerSpacing:8,legendMarkerSize:4,legendCircleMarkerSize:4,legendSquareMarkerSize:4,legendLineMarkerSize:5,legendItemNameFillColor:Hl[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:Hl[100],legendPageNavigatorMarkerInactiveFillOpacity:.45,legendPageNavigatorMarkerFillColor:Hl[100],legendPageNavigatorMarkerFillOpacity:1,legendPageNavigatorTextFillColor:Hl[45],legendPageNavigatorTextFontSize:12,sliderRailFillColor:Hl[15],sliderRailBorder:0,sliderRailBorderColor:null,sliderRailWidth:100,sliderRailHeight:12,sliderLabelTextFillColor:Hl[45],sliderLabelTextFontSize:12,sliderLabelTextLineHeight:12,sliderLabelTextFontWeight:"normal",sliderHandlerFillColor:Hl[6],sliderHandlerWidth:10,sliderHandlerHeight:14,sliderHandlerBorder:1,sliderHandlerBorderColor:Hl[25],annotationArcBorderColor:Hl[15],annotationArcBorder:1,annotationLineBorderColor:Hl[25],annotationLineBorder:1,annotationLineDash:null,annotationTextFillColor:Hl[65],annotationTextFontSize:12,annotationTextLineHeight:12,annotationTextFontWeight:"normal",annotationTextBorderColor:null,annotationTextBorder:0,annotationRegionFillColor:Hl[100],annotationRegionFillOpacity:.06,annotationRegionBorder:0,annotationRegionBorderColor:null,annotationDataMarkerLineLength:16,tooltipCrosshairsBorderColor:Hl[25],tooltipCrosshairsBorder:1,tooltipCrosshairsLineDash:null,tooltipContainerFillColor:"rgb(255, 255, 255)",tooltipContainerFillOpacity:.95,tooltipContainerShadow:"0px 0px 10px #aeaeae",tooltipContainerBorderRadius:3,tooltipTextFillColor:Hl[65],tooltipTextFontSize:12,tooltipTextLineHeight:12,tooltipTextFontWeight:"bold",labelFillColor:Hl[65],labelFillColorDark:"#2c3542",labelFillColorLight:"#ffffff",labelFontSize:12,labelLineHeight:12,labelFontWeight:"normal",labelBorderColor:null,labelBorder:0,innerLabelFillColor:Ul[100],innerLabelFontSize:12,innerLabelLineHeight:12,innerLabelFontWeight:"normal",innerLabelBorderColor:null,innerLabelBorder:0,overflowLabelFillColor:Hl[65],overflowLabelFontSize:12,overflowLabelLineHeight:12,overflowLabelFontWeight:"normal",overflowLabelBorderColor:Ul[100],overflowLabelBorder:1,labelLineBorder:1,labelLineBorderColor:Hl[25],cSliderRailHieght:16,cSliderBackgroundFillColor:"#416180",cSliderBackgroundFillOpacity:.05,cSliderForegroundFillColor:"#5B8FF9",cSliderForegroundFillOpacity:.15,cSliderHandlerHeight:24,cSliderHandlerWidth:10,cSliderHandlerFillColor:"#F7F7F7",cSliderHandlerFillOpacity:1,cSliderHandlerHighlightFillColor:"#FFF",cSliderHandlerBorderColor:"#BFBFBF",cSliderHandlerBorder:1,cSliderHandlerBorderRadius:2,cSliderTextFillColor:"#000",cSliderTextFillOpacity:.45,cSliderTextFontSize:12,cSliderTextLineHeight:12,cSliderTextFontWeight:"normal",cSliderTextBorderColor:null,cSliderTextBorder:0,scrollbarTrackFillColor:"rgba(0,0,0,0)",scrollbarThumbFillColor:"rgba(0,0,0,0.15)",scrollbarThumbHighlightFillColor:"rgba(0,0,0,0.2)",pointFillColor:o,pointFillOpacity:.95,pointSize:4,pointBorder:1,pointBorderColor:Ul[100],pointBorderOpacity:1,pointActiveBorderColor:Hl[100],pointSelectedBorder:2,pointSelectedBorderColor:Hl[100],pointInactiveFillOpacity:.3,pointInactiveBorderOpacity:.3,hollowPointSize:4,hollowPointBorder:1,hollowPointBorderColor:o,hollowPointBorderOpacity:.95,hollowPointFillColor:Ul[100],hollowPointActiveBorder:1,hollowPointActiveBorderColor:Hl[100],hollowPointActiveBorderOpacity:1,hollowPointSelectedBorder:2,hollowPointSelectedBorderColor:Hl[100],hollowPointSelectedBorderOpacity:1,hollowPointInactiveBorderOpacity:.3,lineBorder:2,lineBorderColor:o,lineBorderOpacity:1,lineActiveBorder:3,lineSelectedBorder:3,lineInactiveBorderOpacity:.3,areaFillColor:o,areaFillOpacity:.25,areaActiveFillColor:o,areaActiveFillOpacity:.5,areaSelectedFillColor:o,areaSelectedFillOpacity:.5,areaInactiveFillOpacity:.3,hollowAreaBorderColor:o,hollowAreaBorder:2,hollowAreaBorderOpacity:1,hollowAreaActiveBorder:3,hollowAreaActiveBorderColor:Hl[100],hollowAreaSelectedBorder:3,hollowAreaSelectedBorderColor:Hl[100],hollowAreaInactiveBorderOpacity:.3,intervalFillColor:o,intervalFillOpacity:.95,intervalActiveBorder:1,intervalActiveBorderColor:Hl[100],intervalActiveBorderOpacity:1,intervalSelectedBorder:2,intervalSelectedBorderColor:Hl[100],intervalSelectedBorderOpacity:1,intervalInactiveBorderOpacity:.3,intervalInactiveFillOpacity:.3,hollowIntervalBorder:2,hollowIntervalBorderColor:o,hollowIntervalBorderOpacity:1,hollowIntervalFillColor:Ul[100],hollowIntervalActiveBorder:2,hollowIntervalActiveBorderColor:Hl[100],hollowIntervalSelectedBorder:3,hollowIntervalSelectedBorderColor:Hl[100],hollowIntervalSelectedBorderOpacity:1,hollowIntervalInactiveBorderOpacity:.3};return(0,b.__assign)((0,b.__assign)({},s),t)};Xl();function Yl(t){var e=t.styleSheet,n=void 0===e?{}:e,r=(0,b.__rest)(t,["styleSheet"]),i=Xl(n);return(0,x.deepMix)({},ql(i),r)}var Kl=Yl({}),Ql={default:Kl};function Jl(t){return(0,x.get)(Ql,(0,x.lowerCase)(t),Ql.default)}function tu(t,e){Ql[(0,x.lowerCase)(t)]=Yl(e)}function eu(t,e,n){var r=n.translate(t),i=n.translate(e);return(0,x.isNumberEqual)(r,i)}function nu(t,e){var n=e.coordinate,r=e.getXScale(),i=r.range,a=i[i.length-1],o=i[0],s=n.invert(t),l=s.x;return n.isPolar&&l>(1+a)/2&&(l=o),r.translate(r.invert(l))}function ru(t,e,n){var r=n.coordinate,i=n.getYScale(),a=i.field,o=r.invert(e),s=i.invert(o.y),l=(0,x.find)(t,(function(t){var e=t[O];return e[a][0]<=s&&e[a][1]>=s}));return l||t[t.length-1]}var iu=(0,x.memoize)((function(t){if(t.isCategory)return 1;for(var e=t.values,n=e.length,r=t.translate(e[0]),i=r,a=0;ai&&(i=s)}return(i-r)/(n-1)}));function au(t,e,n){var r=e.getAttribute("position"),i=r.getFields(),a=e.scales,o=(0,x.isFunction)(n)||!n?i[0]:n,s=a[o],l=s?s.getText(t[o]):t[o]||o;return(0,x.isFunction)(n)?n(l,t):l}function ou(t){var e=(0,x.values)(t.attributes);return(0,x.filter)(e,(function(t){return(0,x.contains)(M,t.type)}))}function su(t){var e,n,r,i=ou(t);try{for(var a=(0,b.__values)(i),o=a.next();!o.done;o=a.next()){var s=o.value,l=s.getScale(s.type);if(l&&l.isLinear){var u=(0,x.get)(t.scaleDefs,l.field),c=ps(l,u,s.type,t.type);if("cat"!==c){r=l;break}}}}catch(f){e={error:f}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}var d=t.getXScale(),h=t.getYScale();return r||h||d}function lu(t,e){var n=e.field,r=t[n];if((0,x.isArray)(r)){var i=r.map((function(t){return e.getText(t)}));return i.join("-")}return e.getText(r)}function uu(t,e){var n,r=e.getGroupScales();if(r.length&&(n=r[0]),n){var i=n.field;return n.getText(t[i])}var a=su(e);return vs(a)}function cu(t,e,n){if(0===e.length)return null;var r=n.type,i=n.getXScale(),a=n.getYScale(),o=i.field,s=a.field,l=null;if("heatmap"===r||"point"===r){for(var u=n.coordinate,c=u.invert(t),d=i.invert(c.x),h=a.invert(c.y),f=1/0,p=0;p=w){if(!A){l=k;break}(0,x.isArray)(l)||(l=[]),l.push(k)}}(0,x.isArray)(l)&&(l=ru(l,t,n))}else{var E=void 0;if(i.isLinear||"timeCat"===i.type){if((w>i.translate(S)||wi.max||wMath.abs(i.translate(E[O][o])-w)&&(b=E)}var T=iu(n.getXScale());return!l&&Math.abs(i.translate(b[O][o])-w)<=T/2&&(l=b),l}function du(t,e,n,r){var i,a;void 0===n&&(n=""),void 0===r&&(r=!1);var o,s,l=t[O],u=au(l,e,n),c=e.tooltipOption,d=e.theme.defaultColor,h=[];function f(e,n){if(r||!(0,x.isNil)(n)&&""!==n){var i={title:u,data:l,mappingData:t,name:e,value:n,color:t.color||d,marker:!0};h.push(i)}}if((0,x.isObject)(c)){var p=c.fields,g=c.callback;if(g){var m=p.map((function(e){return t[O][e]})),v=g.apply(void 0,(0,b.__spreadArray)([],(0,b.__read)(m),!1)),y=(0,b.__assign)({data:t[O],mappingData:t,title:u,color:t.color||d,marker:!0},v);h.push(y)}else{var w=e.scales;try{for(var _=(0,b.__values)(p),C=_.next();!C.done;C=_.next()){var S=C.value;if(!(0,x.isNil)(l[S])){var A=w[S];o=vs(A),s=A.getText(l[S]),f(o,s)}}}catch(E){i={error:E}}finally{try{C&&!C.done&&(a=_.return)&&a.call(_)}finally{if(i)throw i.error}}}}else{var k=su(e);s=lu(l,k),o=uu(l,e),f(o,s)}return h}function hu(t,e,n,r){var i,a,o=r.showNil,s=[],l=t.dataArray;if(!(0,x.isEmpty)(l)){t.sort(l);try{for(var u=(0,b.__values)(l),c=u.next();!c.done;c=u.next()){var d=c.value,h=cu(e,d,t);if(h){var f=t.getElementId(h),p=t.elementsMap[f];if("heatmap"===t.type||p.visible){var g=du(h,t,n,o);g.length&&s.push(g)}}}}catch(m){i={error:m}}finally{try{c&&!c.done&&(a=u.return)&&a.call(u)}finally{if(i)throw i.error}}}return s}function fu(t,e,n,r){var i=r.showNil,a=[],o=t.container,s=o.getShape(e.x,e.y);if(s&&s.get("visible")&&s.get("origin")){var l=s.get("origin").mappingData,u=du(l,t,n,i);u.length&&a.push(u)}return a}function pu(t,e,n){var r,i,a=[],o=t.geometries,s=n.shared,l=n.title,u=n.reversed;try{for(var c=(0,b.__values)(o),d=c.next();!d.done;d=c.next()){var h=d.value;if(h.visible&&!1!==h.tooltipOption){var f=h.type,p=void 0;p=["point","edge","polygon"].includes(f)?fu(h,e,l,n):["area","line","path","heatmap"].includes(f)||!1!==s?hu(h,e,l,n):fu(h,e,l,n),p.length&&(u&&p.reverse(),a.push(p))}}}catch(g){r={error:g}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}return a}function gu(t,e,n){var r,i,a=pu(t,e,n);try{for(var o=(0,b.__values)(t.views),s=o.next();!s.done;s=o.next()){var l=s.value;a=a.concat(pu(l,e,n))}}catch(u){r={error:u}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return a}function mu(t){return!(0,x.isNumber)(t)&&!(0,x.isArray)(t)}function vu(t){void 0===t&&(t=0);var e=(0,x.isArray)(t)?t:[t];switch(e.length){case 0:e=[0,0,0,0];break;case 1:e=new Array(4).fill(e[0]);break;case 2:e=(0,b.__spreadArray)((0,b.__spreadArray)([],(0,b.__read)(e),!1),(0,b.__read)(e),!1);break;case 3:e=(0,b.__spreadArray)((0,b.__spreadArray)([],(0,b.__read)(e),!1),[e[1]],!1);break;default:e=e.slice(0,4);break}return e}var yu={};function bu(t,e){yu[t]=e}function xu(){return Object.keys(yu)}function wu(t){return yu[t]}var _u=function(){function t(t){this.option=this.wrapperOption(t)}return t.prototype.update=function(t){return this.option=this.wrapperOption(t),this},t.prototype.hasAction=function(t){var e=this.option.actions;return(0,x.some)(e,(function(e){return e[0]===t}))},t.prototype.create=function(t,e){var n=this.option,r=n.type,i=n.cfg,a="theta"===r,o=(0,b.__assign)({start:t,end:e},i),s=_r(a?"polar":r);return this.coordinate=new s(o),this.coordinate.type=r,a&&(this.hasAction("transpose")||this.transpose()),this.execActions(),this.coordinate},t.prototype.adjust=function(t,e){return this.coordinate.update({start:t,end:e}),this.coordinate.resetMatrix(),this.execActions(["scale","rotate","translate"]),this.coordinate},t.prototype.rotate=function(t){return this.option.actions.push(["rotate",t]),this},t.prototype.reflect=function(t){return this.option.actions.push(["reflect",t]),this},t.prototype.scale=function(t,e){return this.option.actions.push(["scale",t,e]),this},t.prototype.transpose=function(){return this.option.actions.push(["transpose"]),this},t.prototype.getOption=function(){return this.option},t.prototype.getCoordinate=function(){return this.coordinate},t.prototype.wrapperOption=function(t){return(0,b.__assign)({type:"rect",actions:[],cfg:{}},t)},t.prototype.execActions=function(t){var e=this,n=this.option.actions;(0,x.each)(n,(function(n){var r,i=(0,b.__read)(n),a=i[0],o=i.slice(1),s=!!(0,x.isNil)(t)||t.includes(a);s&&(r=e.coordinate)[a].apply(r,(0,b.__spreadArray)([],(0,b.__read)(o),!1))}))},t}(),Cu=_u,Su=function(){function t(t,e,n){this.view=t,this.gEvent=e,this.data=n,this.type=e.type}return t.fromData=function(e,n,r){return new t(e,new Z.Event(n,{}),r)},Object.defineProperty(t.prototype,"target",{get:function(){return this.gEvent.target},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"event",{get:function(){return this.gEvent.originalEvent},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"x",{get:function(){return this.gEvent.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this.gEvent.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clientX",{get:function(){return this.gEvent.clientX},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clientY",{get:function(){return this.gEvent.clientY},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"[Event (type=".concat(this.type,")]")},t.prototype.clone=function(){return new t(this.view,this.gEvent,this.data)},t}(),Au=Su;function ku(t){var e=t.getController("axis"),n=t.getController("legend"),r=t.getController("annotation"),i=t.getController("slider"),a=t.getController("scrollbar");[e,i,a,n,r].forEach((function(t){t&&t.layout()}))}var Eu=function(){function t(){this.scales=new Map,this.syncScales=new Map}return t.prototype.createScale=function(t,e,n,r){var i=n,a=this.getScaleMeta(r);if(0===e.length&&a){var o=a.scale,s={type:o.type};o.isCategory&&(s.values=o.values),i=(0,x.deepMix)(s,a.scaleDef,n)}var l=gs(t,e,i);return this.cacheScale(l,n,r),l},t.prototype.sync=function(t,e){var n=this;this.syncScales.forEach((function(r,i){var a=Number.MAX_SAFE_INTEGER,o=Number.MIN_SAFE_INTEGER,s=[];(0,x.each)(r,(function(t){var e=n.getScale(t);o=(0,x.isNumber)(e.max)?Math.max(o,e.max):o,a=(0,x.isNumber)(e.min)?Math.min(a,e.min):a,(0,x.each)(e.values,(function(t){s.includes(t)||s.push(t)}))})),(0,x.each)(r,(function(r){var i=n.getScale(r);if(i.isContinuous)i.change({min:a,max:o,values:s});else if(i.isCategory){var l=i.range,u=n.getScaleMeta(r);s&&!(0,x.get)(u,["scaleDef","range"])&&(l=ys((0,x.deepMix)({},i,{values:s}),t,e)),i.change({values:s,range:l})}}))}))},t.prototype.cacheScale=function(t,e,n){var r=this.getScaleMeta(n);r&&r.scale.type===t.type?(ms(r.scale,t),r.scaleDef=e):(r={key:n,scale:t,scaleDef:e},this.scales.set(n,r));var i=this.getSyncKey(r);if(r.syncKey=i,this.removeFromSyncScales(n),i){var a=this.syncScales.get(i);a||(a=[],this.syncScales.set(i,a)),a.push(n)}},t.prototype.getScale=function(t){var e=this.getScaleMeta(t);if(!e){var n=(0,x.last)(t.split("-")),r=this.syncScales.get(n);r&&r.length&&(e=this.getScaleMeta(r[0]))}return e&&e.scale},t.prototype.deleteScale=function(t){var e=this.getScaleMeta(t);if(e){var n=e.syncKey,r=this.syncScales.get(n);if(r&&r.length){var i=r.indexOf(t);-1!==i&&r.splice(i,1)}}this.scales.delete(t)},t.prototype.clear=function(){this.scales.clear(),this.syncScales.clear()},t.prototype.removeFromSyncScales=function(t){var e=this;this.syncScales.forEach((function(n,r){var i=n.indexOf(t);if(-1!==i)return n.splice(i,1),0===n.length&&e.syncScales.delete(r),!1}))},t.prototype.getSyncKey=function(t){var e=t.scale,n=t.scaleDef,r=e.field,i=(0,x.get)(n,["sync"]);return!0===i?r:!1===i?void 0:i},t.prototype.getScaleMeta=function(t){return this.scales.get(t)},t}(),Du=function(){function t(t,e,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),this.top=t,this.right=e,this.bottom=n,this.left=r}return t.instance=function(e,n,r,i){return void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===i&&(i=0),new t(e,n,r,i)},t.prototype.max=function(t){var e=(0,b.__read)(t,4),n=e[0],r=e[1],i=e[2],a=e[3];return this.top=Math.max(this.top,n),this.right=Math.max(this.right,r),this.bottom=Math.max(this.bottom,i),this.left=Math.max(this.left,a),this},t.prototype.shrink=function(t){var e=(0,b.__read)(t,4),n=e[0],r=e[1],i=e[2],a=e[3];return this.top+=n,this.right+=r,this.bottom+=i,this.left+=a,this},t.prototype.inc=function(t,e){var n=t.width,r=t.height;switch(e){case v.TOP:case v.TOP_LEFT:case v.TOP_RIGHT:this.top+=r;break;case v.RIGHT:case v.RIGHT_TOP:case v.RIGHT_BOTTOM:this.right+=n;break;case v.BOTTOM:case v.BOTTOM_LEFT:case v.BOTTOM_RIGHT:this.bottom+=r;break;case v.LEFT:case v.LEFT_TOP:case v.LEFT_BOTTOM:this.left+=n;break;default:break}return this},t.prototype.getPadding=function(){return[this.top,this.right,this.bottom,this.left]},t.prototype.clone=function(){return new(t.bind.apply(t,(0,b.__spreadArray)([void 0],(0,b.__read)(this.getPadding()),!1)))},t}();function Fu(t){var e=t.padding;if(!mu(e))return new(Du.bind.apply(Du,(0,b.__spreadArray)([void 0],(0,b.__read)(vu(e)),!1)));var n=t.viewBBox,r=new Du,i=[],a=[],o=[];return(0,x.each)(t.getComponents(),(function(t){var e=t.type;e===y.AXIS?i.push(t):[y.LEGEND,y.SLIDER,y.SCROLLBAR].includes(e)?a.push(t):e!==y.GRID&&e!==y.TOOLTIP&&o.push(t)})),(0,x.each)(i,(function(t){var e=t.component,i=e.getLayoutBBox(),a=new rs(i.x,i.y,i.width,i.height),o=a.exceed(n);r.max(o)})),(0,x.each)(a,(function(t){var e=t.component,n=t.direction,i=e.getLayoutBBox(),a=e.get("padding"),o=new rs(i.x,i.y,i.width,i.height).expand(a);r.inc(o,n)})),(0,x.each)(o,(function(t){var e=t.component,n=t.direction,i=e.getLayoutBBox(),a=new rs(i.x,i.y,i.width,i.height);r.inc(a,n)})),r}function Mu(t,e,n){var r=n.instance();e.forEach((function(t){t.autoPadding=r.max(t.autoPadding.getPadding())}))}var Ou=function(t){function e(e){var n=t.call(this,{visible:e.visible})||this;n.views=[],n.geometries=[],n.controllers=[],n.interactions={},n.limitInPlot=!1,n.options={data:[],animate:!0},n.usedControllers=xu(),n.scalePool=new Eu,n.layoutFunc=ku,n.isPreMouseInPlot=!1,n.isDataChanged=!1,n.isCoordinateChanged=!1,n.createdScaleKeys=new Map,n.onCanvasEvent=function(t){var e=t.name;if(!e.includes(":")){var r=n.createViewEvent(t);n.doPlotEvent(r),n.emit(e,r)}},n.onDelegateEvents=function(t){var e=t.name;if(e.includes(":")){var r=n.createViewEvent(t);n.emit(e,r)}};var r=e.id,i=void 0===r?(0,x.uniqueId)("view"):r,a=e.parent,o=e.canvas,s=e.backgroundGroup,l=e.middleGroup,u=e.foregroundGroup,c=e.region,d=void 0===c?{start:{x:0,y:0},end:{x:1,y:1}}:c,h=e.padding,f=e.appendPadding,p=e.theme,g=e.options,m=e.limitInPlot,v=e.syncViewPadding;return n.parent=a,n.canvas=o,n.backgroundGroup=s,n.middleGroup=l,n.foregroundGroup=u,n.region=d,n.padding=h,n.appendPadding=f,n.options=(0,b.__assign)((0,b.__assign)({},n.options),g),n.limitInPlot=m,n.id=i,n.syncViewPadding=v,n.themeObject=(0,x.isObject)(p)?(0,x.deepMix)({},Jl("default"),Yl(p)):Jl(p),n.init(),n}return(0,b.__extends)(e,t),e.prototype.setLayout=function(t){this.layoutFunc=t},e.prototype.init=function(){this.calculateViewBBox(),this.initEvents(),this.initComponentController(),this.initOptions()},e.prototype.render=function(t,e){void 0===t&&(t=!1),this.emit(w.BEFORE_RENDER,Au.fromData(this,w.BEFORE_RENDER,e)),this.paint(t),this.emit(w.AFTER_RENDER,Au.fromData(this,w.AFTER_RENDER,e)),!1===this.visible&&this.changeVisible(!1)},e.prototype.clear=function(){var t=this;this.emit(w.BEFORE_CLEAR),this.filteredData=[],this.coordinateInstance=void 0,this.isDataChanged=!1,this.isCoordinateChanged=!1;for(var e=this.geometries,n=0;n');D.appendChild(F);var M=q(D,s,i,a),O=L(d),B=new O.Canvas((0,b.__assign)({container:F,pixelRatio:h,localRefresh:p,supportCSSTransform:y},M));return n=t.call(this,{parent:null,canvas:B,backgroundGroup:B.addGroup({zIndex:A.BG}),middleGroup:B.addGroup({zIndex:A.MID}),foregroundGroup:B.addGroup({zIndex:A.FORE}),padding:l,appendPadding:u,visible:m,options:C,limitInPlot:S,theme:k,syncViewPadding:E})||this,n.onResize=(0,x.debounce)((function(){n.forceFit()}),300),n.ele=D,n.canvas=B,n.width=M.width,n.height=M.height,n.autoFit=s,n.localRefresh=p,n.renderer=d,n.wrapperElement=F,n.updateCanvasStyle(),n.bindAutoFit(),n.initDefaultInteractions(_),n}return(0,b.__extends)(e,t),e.prototype.initDefaultInteractions=function(t){var e=this;(0,x.each)(t,(function(t){e.interaction(t)}))},e.prototype.aria=function(t){var e="aria-label";!1===t?this.ele.removeAttribute(e):this.ele.setAttribute(e,t.label)},e.prototype.changeSize=function(t,e){return this.width===t&&this.height===e||(this.emit(w.BEFORE_CHANGE_SIZE),this.width=t,this.height=e,this.canvas.changeSize(t,e),this.render(!0),this.emit(w.AFTER_CHANGE_SIZE)),this},e.prototype.clear=function(){t.prototype.clear.call(this),this.aria(!1)},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.unbindAutoFit(),this.canvas.destroy(),H(this.wrapperElement),this.wrapperElement=null},e.prototype.changeVisible=function(e){return t.prototype.changeVisible.call(this,e),this.wrapperElement.style.display=e?"":"none",this},e.prototype.forceFit=function(){if(!this.destroyed){var t=q(this.ele,!0,this.width,this.height),e=t.width,n=t.height;this.changeSize(e,n)}},e.prototype.updateCanvasStyle=function(){j(this.canvas.get("el"),{display:"inline-block",verticalAlign:"middle"})},e.prototype.bindAutoFit=function(){this.autoFit&&window.addEventListener("resize",this.onResize)},e.prototype.unbindAutoFit=function(){this.autoFit&&window.removeEventListener("resize",this.onResize)},e}(Tu),Iu=Pu,Lu=function(){function t(t){this.visible=!0,this.components=[],this.view=t}return t.prototype.clear=function(t){(0,x.each)(this.components,(function(t){t.component.destroy()})),this.components=[]},t.prototype.destroy=function(){this.clear()},t.prototype.getComponents=function(){return this.components},t.prototype.changeVisible=function(t){this.visible!==t&&(this.components.forEach((function(e){t?e.component.show():e.component.hide()})),this.visible=t)},t}();function Ru(t){for(var e=[],n=function(n){var r=t[n],i=(0,x.find)(e,(function(t){return t.color===r.color&&t.name===r.name&&t.value===r.value&&t.title===r.title}));i||e.push(r)},r=0;r1){var y=s[0],w=Math.abs(t.y-y[0].y);try{for(var _=(0,b.__values)(s),C=_.next();!C.done;C=_.next()){var S=C.value,A=Math.abs(t.y-S[0].y);A<=w&&(y=S,w=A)}}catch(D){a={error:D}}finally{try{C&&!C.done&&(o=_.return)&&o.call(_)}finally{if(a)throw a.error}}s=[y]}return Ru((0,x.flatten)(s))}return[]},e.prototype.layout=function(){},e.prototype.update=function(){if(this.point&&this.showTooltip(this.point),this.tooltip){var t=this.view.getCanvas();this.tooltip.set("region",{start:{x:0,y:0},end:{x:t.get("width"),y:t.get("height")}})}},e.prototype.isCursorEntered=function(t){if(this.tooltip){var e=this.tooltip.getContainer(),n=this.tooltip.get("capture");if(e&&n){var r=e.getBoundingClientRect(),i=r.x,a=r.y,o=r.width,s=r.height;return new rs(i,a,o,s).isPointIn(t)}}return!1},e.prototype.getTooltipCfg=function(){var t=this.view,e=t.getOptions().tooltip,n=this.processCustomContent(e),r=t.getTheme(),i=(0,x.get)(r,["components","tooltip"],{}),a=(0,x.get)(n,"enterable",i.enterable);return(0,x.deepMix)({},i,n,{capture:!(!a&&!this.isLocked)})},e.prototype.processCustomContent=function(t){if((0,x.isBoolean)(t)||!(0,x.get)(t,"customContent"))return t;var e=t.customContent,n=function(t,n){var r=e(t,n)||"";return(0,x.isString)(r)?'
    '+r+"
    ":r};return(0,b.__assign)((0,b.__assign)({},t),{customContent:n})},e.prototype.getTitle=function(t){var e=t[0].title||t[0].name;return this.title=e,e},e.prototype.renderTooltip=function(){var t=this.view.getCanvas(),e={start:{x:0,y:0},end:{x:t.get("width"),y:t.get("height")}},n=this.getTooltipCfg(),r=new qo((0,b.__assign)((0,b.__assign)({parent:t.get("el").parentNode,region:e},n),{visible:!1,crosshairs:null}));r.init(),this.tooltip=r},e.prototype.renderTooltipMarkers=function(t,e){var n,r,i=this.getTooltipMarkersGroup(),a=this.view.getRootView(),o=a.limitInPlot;try{for(var s=(0,b.__values)(t),l=s.next();!l.done;l=s.next()){var u=l.value,c=u.x,d=u.y;if(o||(null===i||void 0===i?void 0:i.getClip())){var h=cs(a.getCoordinate()),f=h.type,p=h.attrs;null===i||void 0===i||i.setClip({type:f,attrs:p})}else null===i||void 0===i||i.setClip(void 0);var g=(0,b.__assign)((0,b.__assign)({fill:u.color,symbol:"circle",shadowColor:u.color},e),{x:c,y:d});i.addShape("marker",{attrs:g})}}catch(m){n={error:m}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}},e.prototype.renderCrosshairs=function(t,e){var n=(0,x.get)(e,["crosshairs","type"],"x");"x"===n?(this.yCrosshair&&this.yCrosshair.hide(),this.renderXCrosshairs(t,e)):"y"===n?(this.xCrosshair&&this.xCrosshair.hide(),this.renderYCrosshairs(t,e)):"xy"===n&&(this.renderXCrosshairs(t,e),this.renderYCrosshairs(t,e))},e.prototype.renderXCrosshairs=function(t,e){var n=this.getViewWithGeometry(this.view).getCoordinate();if(ls(n,t)){var r,i;if(n.isRect)n.isTransposed?(r={x:n.start.x,y:t.y},i={x:n.end.x,y:t.y}):(r={x:t.x,y:n.end.y},i={x:t.x,y:n.start.y});else{var a=us(n,t),o=n.getCenter(),s=n.getRadius();i=Wo(o.x,o.y,s,a),r=o}var l=(0,x.deepMix)({start:r,end:i,container:this.getTooltipCrosshairsGroup()},(0,x.get)(e,"crosshairs",{}),this.getCrosshairsText("x",t,e));delete l.type;var u=this.xCrosshair;u?u.update(l):(u=new xa(l),u.init()),u.render(),u.show(),this.xCrosshair=u}},e.prototype.renderYCrosshairs=function(t,e){var n=this.getViewWithGeometry(this.view).getCoordinate();if(ls(n,t)){var r,i;if(n.isRect){var a=void 0,o=void 0;n.isTransposed?(a={x:t.x,y:n.end.y},o={x:t.x,y:n.start.y}):(a={x:n.start.x,y:t.y},o={x:n.end.x,y:t.y}),r={start:a,end:o},i="Line"}else r={center:n.getCenter(),radius:ss(n,t),startAngle:n.startAngle,endAngle:n.endAngle},i="Circle";r=(0,x.deepMix)({container:this.getTooltipCrosshairsGroup()},r,(0,x.get)(e,"crosshairs",{}),this.getCrosshairsText("y",t,e)),delete r.type;var s=this.yCrosshair;s?n.isRect&&"circle"===s.get("type")||!n.isRect&&"line"===s.get("type")?(s=new u[i](r),s.init()):s.update(r):(s=new u[i](r),s.init()),s.render(),s.show(),this.yCrosshair=s}},e.prototype.getCrosshairsText=function(t,e,n){var r=(0,x.get)(n,["crosshairs","text"]),i=(0,x.get)(n,["crosshairs","follow"]),a=this.items;if(r){var o=this.getViewWithGeometry(this.view),s=a[0],l=o.getXScale(),u=o.getYScales()[0],c=void 0,d=void 0;if(i){var h=this.view.getCoordinate().invert(e);c=l.invert(h.x),d=u.invert(h.y)}else c=s.data[l.field],d=s.data[u.field];var f="x"===t?c:d;return(0,x.isFunction)(r)?r=r(t,f,a,e):r.content=f,{text:r}}},e.prototype.getGuideGroup=function(){if(!this.guideGroup){var t=this.view.foregroundGroup;this.guideGroup=t.addGroup({name:"tooltipGuide",capture:!1})}return this.guideGroup},e.prototype.getTooltipMarkersGroup=function(){var t=this.tooltipMarkersGroup;return t&&!t.destroyed?(t.clear(),t.show()):(t=this.getGuideGroup().addGroup({name:"tooltipMarkersGroup"}),t.toFront(),this.tooltipMarkersGroup=t),t},e.prototype.getTooltipCrosshairsGroup=function(){var t=this.tooltipCrosshairsGroup;return t||(t=this.getGuideGroup().addGroup({name:"tooltipCrosshairsGroup",capture:!1}),t.toBack(),this.tooltipCrosshairsGroup=t),t},e.prototype.findItemsFromView=function(t,e){var n,r;if(!1===t.getOptions().tooltip)return[];var i=this.getTooltipCfg(),a=pu(t,e,i);try{for(var o=(0,b.__values)(t.views),s=o.next();!s.done;s=o.next()){var l=s.value;a=a.concat(this.findItemsFromView(l,e))}}catch(u){n={error:u}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return a},e.prototype.getViewWithGeometry=function(t){var e=this;return t.geometries.length?t:(0,x.find)(t.views,(function(t){return e.getViewWithGeometry(t)}))},e.prototype.getItemsAfterProcess=function(t){var e=this.getTooltipCfg().customItems,n=e||function(t){return t};return n(t)},e}(Lu),zu=Nu,ju={};function $u(t){return ju[t.toLowerCase()]}function Vu(t,e){ju[t.toLowerCase()]=e}var qu={appear:{duration:450,easing:"easeQuadOut"},update:{duration:400,easing:"easeQuadInOut"},enter:{duration:400,easing:"easeQuadInOut"},leave:{duration:350,easing:"easeQuadIn"}},Hu={interval:function(t){return{enter:{animation:t.isRect?t.isTransposed?"scale-in-x":"scale-in-y":"fade-in"},update:{animation:t.isPolar&&t.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"}}},Uu={line:function(){return{animation:"wave-in"}},area:function(){return{animation:"wave-in"}},path:function(){return{animation:"fade-in"}},interval:function(t){var e;return t.isRect?e=t.isTransposed?"grow-in-x":"grow-in-y":(e="grow-in-xy",t.isPolar&&t.isTransposed&&(e="wave-in")),{animation:e}},schema:function(t){var e;return e=t.isRect?t.isTransposed?"grow-in-x":"grow-in-y":"grow-in-xy",{animation:e}},polygon:function(){return{animation:"fade-in",duration:500}},edge:function(){return{animation:"fade-in"}}};function Gu(t,e){return{delay:(0,x.isFunction)(t.delay)?t.delay(e):t.delay,easing:(0,x.isFunction)(t.easing)?t.easing(e):t.easing,duration:(0,x.isFunction)(t.duration)?t.duration(e):t.duration,callback:t.callback,repeat:t.repeat}}function Wu(t,e,n){var r=Hu[t];return r&&((0,x.isFunction)(r)&&(r=r(e)),r=(0,x.deepMix)({},qu,r),n)?r[n]:r}function Zu(t,e,n){var r=(0,x.get)(t.get("origin"),"data",O),i=e.animation,a=Gu(e,r);if(i){var o=$u(i);o&&o(t,a,n)}else t.animate(n.toAttrs,a)}function Xu(t,e,n,r,i){if(Uu[n]){var a=Uu[n](r),o=$u((0,x.get)(a,"animation",""));if(o){var s=(0,b.__assign)((0,b.__assign)((0,b.__assign)({},qu.appear),a),e);t.stopAnimate(),o(t,s,{coordinate:r,minYPoint:i,toAttrs:null})}}}var Yu="element-background",Ku=function(t){function e(e){var n=t.call(this,e)||this;n.labelShape=[],n.states=[];var r=e.shapeFactory,i=e.container,a=e.offscreenGroup,o=e.elementIndex,s=e.visible,l=void 0===s||s;return n.shapeFactory=r,n.container=i,n.offscreenGroup=a,n.visible=l,n.elementIndex=o,n}return(0,b.__extends)(e,t),e.prototype.draw=function(t,e){void 0===e&&(e=!1),this.model=t,this.data=t.data,this.shapeType=this.getShapeType(t),this.drawShape(t,e),!1===this.visible&&this.changeVisible(!1)},e.prototype.update=function(t){var e=this,n=e.shapeFactory,r=e.shape;if(r){this.model=t,this.data=t.data,this.shapeType=this.getShapeType(t),this.setShapeInfo(r,t);var i=this.getOffscreenGroup(),a=n.drawShape(this.shapeType,t,i);a.cfg.data=this.data,a.cfg.origin=t,a.cfg.element=this,this.syncShapeStyle(r,a,this.getStates(),this.getAnimateCfg("update"))}},e.prototype.destroy=function(){var e=this,n=e.shapeFactory,r=e.shape;if(r){var i=this.getAnimateCfg("leave");i?Zu(r,i,{coordinate:n.coordinate,toAttrs:(0,b.__assign)({},r.attr())}):r.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,t.prototype.destroy.call(this)},e.prototype.changeVisible=function(e){t.prototype.changeVisible.call(this,e),e?(this.shape&&this.shape.show(),this.labelShape&&this.labelShape.forEach((function(t){t.show()}))):(this.shape&&this.shape.hide(),this.labelShape&&this.labelShape.forEach((function(t){t.hide()})))},e.prototype.setState=function(t,e){var n=this,r=n.states,i=n.shapeFactory,a=n.model,o=n.shape,s=n.shapeType,l=r.indexOf(t);if(e){if(l>-1)return;r.push(t),"active"!==t&&"selected"!==t||null===o||void 0===o||o.toFront()}else{if(-1===l)return;if(r.splice(l,1),"active"===t||"selected"===t){var u=this.geometry,c=u.sortZIndex,d=u.zIndexReversed,h=d?this.geometry.elements.length-this.elementIndex:this.elementIndex;c?o.setZIndex(h):o.set("zIndex",h)}}var f=i.drawShape(s,a,this.getOffscreenGroup());r.length?this.syncShapeStyle(o,f,r,null):this.syncShapeStyle(o,f,["reset"],null),f.remove(!0);var p={state:t,stateStatus:e,element:this,target:this.container};this.container.emit("statechange",p),Sr(this.shape,"statechange",p)},e.prototype.clearStates=function(){var t=this,e=this.states;(0,x.each)(e,(function(e){t.setState(e,!1)})),this.states=[]},e.prototype.hasState=function(t){return this.states.includes(t)},e.prototype.getStates=function(){return this.states},e.prototype.getData=function(){return this.data},e.prototype.getModel=function(){return this.model},e.prototype.getBBox=function(){var t=this,e=t.shape,n=t.labelShape,r={x:0,y:0,minX:0,minY:0,maxX:0,maxY:0,width:0,height:0};return e&&(r=e.getCanvasBBox()),n&&n.forEach((function(t){var e=t.getCanvasBBox();r.x=Math.min(e.x,r.x),r.y=Math.min(e.y,r.y),r.minX=Math.min(e.minX,r.minX),r.minY=Math.min(e.minY,r.minY),r.maxX=Math.max(e.maxX,r.maxX),r.maxY=Math.max(e.maxY,r.maxY)})),r.width=r.maxX-r.minX,r.height=r.maxY-r.minY,r},e.prototype.getStatesStyle=function(){if(!this.statesStyle){var t=this,e=t.shapeType,n=t.geometry,r=t.shapeFactory,i=n.stateOption,a=r.defaultShapeType,o=r.theme[e]||r.theme[a];this.statesStyle=(0,x.deepMix)({},o,i)}return this.statesStyle},e.prototype.getStateStyle=function(t,e){var n=this.getStatesStyle(),r=(0,x.get)(n,[t,"style"],{}),i=r[e]||r;return(0,x.isFunction)(i)?i(this):i},e.prototype.getAnimateCfg=function(t){var e=this,n=this.animate;if(n){var r=n[t];return r?(0,b.__assign)((0,b.__assign)({},r),{callback:function(){var t;(0,x.isFunction)(r.callback)&&r.callback(),null===(t=e.geometry)||void 0===t||t.emit(_.AFTER_DRAW_ANIMATE)}}):r}return null},e.prototype.drawShape=function(t,e){var n;void 0===e&&(e=!1);var r=this,i=r.shapeFactory,a=r.container,o=r.shapeType;if(this.shape=i.drawShape(o,t,a),this.shape){this.setShapeInfo(this.shape,t);var s=this.shape.cfg.name;s?(0,x.isString)(s)&&(this.shape.cfg.name=["element",s]):this.shape.cfg.name=["element",this.shapeFactory.geometryType];var l=e?"enter":"appear",u=this.getAnimateCfg(l);u&&(null===(n=this.geometry)||void 0===n||n.emit(_.BEFORE_DRAW_ANIMATE),Zu(this.shape,u,{coordinate:i.coordinate,toAttrs:(0,b.__assign)({},this.shape.attr())}))}},e.prototype.getOffscreenGroup=function(){if(!this.offscreenGroup){var t=this.container.getGroupBase();this.offscreenGroup=new t({})}return this.offscreenGroup},e.prototype.setShapeInfo=function(t,e){var n=this;if(t.cfg.origin=e,t.cfg.element=this,t.isGroup()){var r=t.get("children");r.forEach((function(t){n.setShapeInfo(t,e)}))}},e.prototype.syncShapeStyle=function(t,e,n,r,i){var a,o=this;if(void 0===n&&(n=[]),void 0===i&&(i=0),t&&e){var s=t.get("clipShape"),l=e.get("clipShape");if(this.syncShapeStyle(s,l,n,r),t.isGroup())for(var u=t.get("children"),c=e.get("children"),d=0;d=0?n:r<=0?r:0,t},e.prototype.createAttrOption=function(t,e,n){if((0,x.isNil)(e)||(0,x.isObject)(e))(0,x.isObject)(e)&&(0,x.isEqual)(Object.keys(e),["values"])?(0,x.set)(this.attributeOption,t,{fields:e.values}):(0,x.set)(this.attributeOption,t,e);else{var r={};(0,x.isNumber)(e)?r.values=[e]:r.fields=fc(e),n&&((0,x.isFunction)(n)?r.callback=n:r.values=n),(0,x.set)(this.attributeOption,t,r)}},e.prototype.initAttributes=function(){var t=this,e=this,n=e.attributes,r=e.attributeOption,i=e.theme,a=e.shapeType;this.groupScales=[];var o={},s=function(e){if(r.hasOwnProperty(e)){var s=r[e];if(!s)return{value:void 0};var l=(0,b.__assign)({},s),u=l.callback,c=l.values,d=l.fields,h=void 0===d?[]:d,f=h.map((function(n){var r=t.scales[n];if(!o[n]&&M.includes(e)){var i=ps(r,(0,x.get)(t.scaleDefs,n),e,t.type);"cat"===i&&(t.groupScales.push(r),o[n]=!0)}return r}));l.scales=f,"position"!==e&&1===f.length&&"identity"===f[0].type?l.values=f[0].values:u||c||("size"===e?l.values=i.sizes:"shape"===e?l.values=i.shapes[a]||[]:"color"===e&&(f.length?l.values=f[0].values.length<=10?i.colors10:i.colors20:l.values=i.colors10));var p=sr(e);n[e]=new p(l)}};for(var l in r){var u=s(l);if("object"===typeof u)return u.value}},e.prototype.processData=function(t){var e,n;this.hasSorted=!1;for(var r=this.getAttribute("position").scales,i=r.filter((function(t){return t.isCategory})),a=this.groupData(t),o=[],s=0,l=a.length;sa&&(a=u)}var c=this.scaleDefs,d={};it.max&&!(0,x.get)(c,[r,"max"])&&(d.max=a),t.change(d)},e.prototype.beforeMapping=function(t){var e=t;if(this.sortable&&this.sort(e),this.generatePoints)for(var n=0,r=e.length;n1)for(var c=0;c0}))}function kc(t,e,n){var r=n.data,i=n.origin,a=n.animateCfg,o=n.coordinate,s=(0,x.get)(a,"update");t.set("data",r),t.set("origin",i),t.set("animateCfg",a),t.set("coordinate",o),t.set("visible",e.get("visible")),t.getChildren().forEach((function(l,u){var c=e.getChildByIndex(u);if(c){l.set("data",r),l.set("origin",i),l.set("animateCfg",a),l.set("coordinate",o);var d=Qo(l,c);s?Zu(l,s,{toAttrs:d,coordinate:o}):l.attr(d),c.isGroup()&&kc(l,c,n)}else t.removeChild(l),l.remove(!0)})),(0,x.each)(e.getChildren(),(function(e,n){n>=t.getCount()&&(e.destroyed||t.add(e))}))}var Ec=function(){function t(t){this.shapesMap={};var e=t.layout,n=t.container;this.layout=e,this.container=n}return t.prototype.render=function(t,e,n){return void 0===n&&(n=!1),(0,b.__awaiter)(this,void 0,void 0,(function(){var r,i,a,o,s,l,u,c,d=this;return(0,b.__generator)(this,(function(h){switch(h.label){case 0:if(r={},i=this.createOffscreenGroup(),!t.length)return[3,2];try{for(a=(0,b.__values)(t),o=a.next();!o.done;o=a.next())s=o.value,s&&(r[s.id]=this.renderLabel(s,i))}catch(f){u={error:f}}finally{try{o&&!o.done&&(c=a.return)&&c.call(a)}finally{if(u)throw u.error}}return[4,this.doLayout(t,e,r)];case 1:h.sent(),this.renderLabelLine(t,r),this.renderLabelBackground(t,r),this.adjustLabel(t,r),h.label=2;case 2:return l=this.shapesMap,(0,x.each)(r,(function(t,e){if(t.destroyed)delete r[e];else{if(l[e]){var i=t.get("data"),a=t.get("origin"),o=t.get("coordinate"),s=t.get("animateCfg"),u=l[e];kc(u,r[e],{data:i,origin:a,animateCfg:s,coordinate:o}),r[e]=u}else{if(d.container.destroyed)return;d.container.add(t);var c=(0,x.get)(t.get("animateCfg"),n?"enter":"appear");c&&Zu(t,c,{toAttrs:(0,b.__assign)({},t.attr()),coordinate:t.get("coordinate")})}delete l[e]}})),(0,x.each)(l,(function(t){var e=(0,x.get)(t.get("animateCfg"),"leave");e?Zu(t,e,{toAttrs:null,coordinate:t.get("coordinate")}):t.remove(!0)})),this.shapesMap=r,i.destroy(),[2]}}))}))},t.prototype.clear=function(){this.container.clear(),this.shapesMap={}},t.prototype.destroy=function(){this.container.destroy(),this.shapesMap=null},t.prototype.renderLabel=function(t,e){var n,r=t.id,i=t.elementId,a=t.data,o=t.mappingData,s=t.coordinate,l=t.animate,u=t.content,c={id:r,elementId:i,data:a,origin:(0,b.__assign)((0,b.__assign)({},o),{data:o[O]}),coordinate:s},d=e.addGroup((0,b.__assign)({name:"label",animateCfg:!1!==this.animate&&null!==l&&!1!==l&&(0,x.deepMix)({},this.animate,l)},c));if(u.isGroup&&u.isGroup()||u.isShape&&u.isShape()){var h=u.getCanvasBBox(),f=h.width,p=h.height,g=(0,x.get)(t,"textAlign","left"),m=t.x,v=t.y-p/2;"center"===g?m-=f/2:"right"!==g&&"end"!==g||(m-=f),yc(u,m,v),n=u,d.add(u)}else{var y=(0,x.get)(t,["style","fill"]);n=d.addShape("text",(0,b.__assign)({attrs:(0,b.__assign)((0,b.__assign)({x:t.x,y:t.y,textAlign:t.textAlign,textBaseline:(0,x.get)(t,"textBaseline","middle"),text:t.content},t.style),{fill:(0,x.isNull)(y)?t.color:y})},c))}return t.rotate&&xc(n,t.rotate),d},t.prototype.doLayout=function(t,e,n){return(0,b.__awaiter)(this,void 0,void 0,(function(){var r,i=this;return(0,b.__generator)(this,(function(a){switch(a.label){case 0:return this.layout?(r=(0,x.isArray)(this.layout)?this.layout:[this.layout],[4,Promise.all(r.map((function(r){var a=rc((0,x.get)(r,"type",""));if(a){var o=[],s=[];return(0,x.each)(n,(function(t,n){o.push(t),s.push(e[t.get("elementId")])})),a(t,o,s,i.region,r.cfg)}})))]):[3,2];case 1:a.sent(),a.label=2;case 2:return[2]}}))}))},t.prototype.renderLabelLine=function(t,e){(0,x.each)(t,(function(t){var n=(0,x.get)(t,"coordinate");if(t&&n){var r=n.getCenter(),i=n.getRadius();if(t.labelLine){var a=(0,x.get)(t,"labelLine",{}),o=t.id,s=a.path;if(!s){var l=Wo(r.x,r.y,i,t.angle);s=[["M",l.x,l.y],["L",t.x,t.y]]}var u=e[o];u.destroyed||u.addShape("path",{capture:!1,attrs:(0,b.__assign)({path:s,stroke:t.color?t.color:(0,x.get)(t,["style","fill"],"#000"),fill:null},a.style),id:o,origin:t.mappingData,data:t.data,coordinate:t.coordinate})}}}))},t.prototype.renderLabelBackground=function(t,e){(0,x.each)(t,(function(t){var n=(0,x.get)(t,"coordinate"),r=(0,x.get)(t,"background");if(r&&n){var i=t.id,a=e[i];if(!a.destroyed){var o=a.getChildren()[0];if(o){var s=Cc(a,t,r.padding),l=s.rotation,u=(0,b.__rest)(s,["rotation"]),c=a.addShape("rect",{attrs:(0,b.__assign)((0,b.__assign)({},u),r.style||{}),id:i,origin:t.mappingData,data:t.data,coordinate:t.coordinate});if(c.setZIndex(-1),l){var d=o.getMatrix();c.setMatrix(d)}}}}}))},t.prototype.createOffscreenGroup=function(){var t=this.container,e=t.getGroupBase(),n=new e({});return n},t.prototype.adjustLabel=function(t,e){(0,x.each)(t,(function(t){if(t){var n=t.id,r=e[n];if(!r.destroyed){var i=r.findAll((function(t){return"path"!==t.get("type")}));(0,x.each)(i,(function(e){e&&(t.offsetX&&e.attr("x",e.attr("x")+t.offsetX),t.offsetY&&e.attr("y",e.attr("y")+t.offsetY))}))}}}))},t}(),Dc=Ec;function Fc(t){var e=0;return(0,x.each)(t,(function(t){e+=t})),e/t.length}var Mc=function(){function t(t){this.geometry=t}return t.prototype.getLabelItems=function(t){var e=this,n=[],r=this.getLabelCfgs(t);return(0,x.each)(t,(function(t,i){var a=r[i];if(!a||(0,x.isNil)(t.x)||(0,x.isNil)(t.y))n.push(null);else{var o=(0,x.isArray)(a.content)?a.content:[a.content];a.content=o;var s=o.length;(0,x.each)(o,(function(r,i){if((0,x.isNil)(r)||""===r)n.push(null);else{var o=(0,b.__assign)((0,b.__assign)({},a),e.getLabelPoint(a,t,i));o.textAlign||(o.textAlign=e.getLabelAlign(o,i,s)),o.offset<=0&&(o.labelLine=null),n.push(o)}}))}})),n},t.prototype.render=function(t,e){return void 0===e&&(e=!1),(0,b.__awaiter)(this,void 0,void 0,(function(){var n,r,i;return(0,b.__generator)(this,(function(a){switch(a.label){case 0:return n=this.getLabelItems(t),r=this.getLabelsRenderer(),i=this.getGeometryShapes(),[4,r.render(n,i,e)];case 1:return a.sent(),[2]}}))}))},t.prototype.clear=function(){var t=this.labelsRenderer;t&&t.clear()},t.prototype.destroy=function(){var t=this.labelsRenderer;t&&t.destroy(),this.labelsRenderer=null},t.prototype.getCoordinate=function(){return this.geometry.coordinate},t.prototype.getDefaultLabelCfg=function(t,e){var n=this.geometry,r=n.type,i=n.theme;return"polygon"===r||"interval"===r&&"middle"===e||t<0&&!["line","point","path"].includes(r)?(0,x.get)(i,"innerLabels",{}):(0,x.get)(i,"labels",{})},t.prototype.getThemedLabelCfg=function(t){var e,n=this.geometry,r=this.getDefaultLabelCfg(),i=n.type,a=n.theme;return e="polygon"===i||t.offset<0&&!["line","point","path"].includes(i)?(0,x.deepMix)({},r,a.innerLabels,t):(0,x.deepMix)({},r,a.labels,t),e},t.prototype.setLabelPosition=function(t,e,n,r){},t.prototype.getLabelOffset=function(t){var e=this.getCoordinate(),n=this.getOffsetVector(t);return e.isTransposed?n[0]:n[1]},t.prototype.getLabelOffsetPoint=function(t,e,n){var r=t.offset,i=this.getCoordinate(),a=i.isTransposed,o=a?"x":"y",s=a?1:-1,l={x:0,y:0};return l[o]=e>0||1===n?r*s:r*s*-1,l},t.prototype.getLabelPoint=function(t,e,n){var r=this.getCoordinate(),i=t.content.length;function a(e,n,r){void 0===r&&(r=!1);var i=e;return(0,x.isArray)(i)&&(i=1===t.content.length?r?Fc(i):i.length<=2?i[e.length-1]:Fc(i):i[n]),i}var o={content:t.content[n],x:0,y:0,start:{x:0,y:0},color:"#fff"},s=(0,x.isArray)(e.shape)?e.shape[0]:e.shape,l="funnel"===s||"pyramid"===s;if("polygon"===this.geometry.type){var u=Ko(e.x,e.y);o.x=u[0],o.y=u[1]}else"interval"!==this.geometry.type||l?(o.x=a(e.x,n),o.y=a(e.y,n)):(o.x=a(e.x,n,!0),o.y=a(e.y,n));if(l){var c=(0,x.get)(e,"nextPoints"),d=(0,x.get)(e,"points");if(c){var h=r.convert(d[1]),f=r.convert(c[1]);o.x=(h.x+f.x)/2,o.y=(h.y+f.y)/2}else if("pyramid"===s){h=r.convert(d[1]),f=r.convert(d[2]);o.x=(h.x+f.x)/2,o.y=(h.y+f.y)/2}}t.position&&this.setLabelPosition(o,e,n,t.position);var p=this.getLabelOffsetPoint(t,n,i);return o.start={x:o.x,y:o.y},o.x+=p.x,o.y+=p.y,o.color=e.color,o},t.prototype.getLabelAlign=function(t,e,n){var r="center",i=this.getCoordinate();if(i.isTransposed){var a=t.offset;r=a<0?"right":0===a?"center":"left",n>1&&0===e&&("right"===r?r="left":"left"===r&&(r="right"))}return r},t.prototype.getLabelId=function(t){var e=this.geometry,n=e.type,r=e.getXScale(),i=e.getYScale(),a=t[O],o=e.getElementId(t);return"line"===n||"area"===n?o+=" ".concat(a[r.field]):"path"===n&&(o+=" ".concat(a[r.field],"-").concat(a[i.field])),o},t.prototype.getLabelsRenderer=function(){var t=this.geometry,e=t.labelsContainer,n=t.labelOption,r=t.canvasRegion,i=t.animateOption,a=this.geometry.coordinate,o=this.labelsRenderer;return o||(o=new Dc({container:e,layout:(0,x.get)(n,["cfg","layout"],{type:this.defaultLayout})}),this.labelsRenderer=o),o.region=r,o.animate=!!i&&Wu("label",a),o},t.prototype.getLabelCfgs=function(t){var e=this,n=this.geometry,r=n.labelOption,i=n.scales,a=n.coordinate,o=r,s=o.fields,l=o.callback,u=o.cfg,c=s.map((function(t){return i[t]})),d=[];return(0,x.each)(t,(function(t,n){var r,i=t[O],o=e.getLabelText(i,c);if(l){var h=s.map((function(t){return i[t]}));if(r=l.apply(void 0,(0,b.__spreadArray)([],(0,b.__read)(h),!1)),(0,x.isNil)(r))return void d.push(null)}var f=(0,b.__assign)((0,b.__assign)({id:e.getLabelId(t),elementId:e.geometry.getElementId(t),data:i,mappingData:t,coordinate:a},u),r);(0,x.isFunction)(f.position)&&(f.position=f.position(i,t,n));var p=e.getLabelOffset(f.offset||0),g=e.getDefaultLabelCfg(p,f.position);f=(0,x.deepMix)({},g,f),f.offset=e.getLabelOffset(f.offset||0);var m=f.content;(0,x.isFunction)(m)?f.content=m(i,t,n):(0,x.isUndefined)(m)&&(f.content=o[0]),d.push(f)})),d},t.prototype.getLabelText=function(t,e){var n=[];return(0,x.each)(e,(function(e){var r=t[e.field];r=(0,x.isArray)(r)?r.map((function(t){return e.getText(t)})):e.getText(r),(0,x.isNil)(r)||""===r?n.push(null):n.push(r)})),n},t.prototype.getOffsetVector=function(t){void 0===t&&(t=0);var e=this.getCoordinate(),n=0;return(0,x.isNumber)(t)&&(n=t),e.isTransposed?e.applyMatrix(n,0):e.applyMatrix(0,n)},t.prototype.getGeometryShapes=function(){var t=this.geometry,e={};return(0,x.each)(t.elementsMap,(function(t,n){e[n]=t.shape})),(0,x.each)(t.getOffscreenGroup().getChildren(),(function(n){var r=t.getElementId(n.get("origin").mappingData);e[r]=n})),e},t}(),Oc=Mc;function Bc(t,e,n){if(!t)return n;var r;if(t.callback&&t.callback.length>1){var i=Array(t.callback.length-1).fill("");r=t.mapping.apply(t,(0,b.__spreadArray)([e],(0,b.__read)(i),!1)).join("")}else r=t.mapping(e).join("");return r||n}var Tc={hexagon:function(t,e,n){var r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]},bowtie:function(t,e,n){var r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]},cross:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]},tick:function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]},plus:function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]},hyphen:function(t,e,n){return[["M",t-n,e],["L",t+n,e]]},line:function(t,e,n){return[["M",t,e-n],["L",t,e+n]]}},Pc=["line","cross","tick","plus","hyphen"];function Ic(t,e){return(0,x.isFunction)(e)?e(t):(0,x.deepMix)({},t,e)}function Lc(t,e){var n=t.symbol;if((0,x.isString)(n)&&-1!==Pc.indexOf(n)){var r=(0,x.get)(t,"style",{}),i=(0,x.get)(r,"lineWidth",1),a=r.stroke||r.fill||e;t.style=(0,x.deepMix)({},t.style,{lineWidth:i,stroke:a,fill:null})}}function Rc(t){var e=t.symbol;(0,x.isString)(e)&&Tc[e]&&(t.symbol=Tc[e])}function Nc(t){return t.startsWith(v.LEFT)||t.startsWith(v.RIGHT)?"vertical":"horizontal"}function zc(t,e,n,r,i){var a=n.getScale(n.type);if(a.isCategory){var o=a.field,s=e.getAttribute("color"),l=e.getAttribute("shape"),u=t.getTheme().defaultColor,c=e.coordinate.isPolar;return a.getTicks().map((function(n,d){var h,f=n.text,p=n.value,g=f,m=a.invert(p),v=0===t.filterFieldData(o,[(h={},h[o]=m,h)]).length;(0,x.each)(t.views,(function(t){var e;t.filterFieldData(o,[(e={},e[o]=m,e)]).length||(v=!0)}));var y=Bc(s,m,u),w=Bc(l,m,"point"),_=e.getShapeMarker(w,{color:y,isInPolar:c}),C=i;return(0,x.isFunction)(C)&&(C=C(g,d,(0,b.__assign)({name:g,value:m},(0,x.deepMix)({},r,_)))),_=(0,x.deepMix)({},r,_,es((0,b.__assign)({},C),["style"])),Lc(_,y),C&&C.style&&(_.style=Ic(_.style,C.style)),Rc(_),{id:m,name:g,value:m,marker:_,unchecked:v}}))}return[]}function jc(t,e,n){return n.map((function(n,r){var i=e;(0,x.isFunction)(i)&&(i=i(n.name,r,(0,x.deepMix)({},t,n)));var a=(0,x.isFunction)(n.marker)?n.marker(n.name,r,(0,x.deepMix)({},t,n)):n.marker,o=(0,x.deepMix)({},t,i,a);return Rc(o),n.marker=o,n}))}function $c(t,e){var n=(0,x.get)(t,["components","legend"],{});return(0,x.deepMix)({},(0,x.get)(n,["common"],{}),(0,x.deepMix)({},(0,x.get)(n,[e],{})))}function Vc(t){return!t&&(null===t||void 0===t||isNaN(t))}function qc(t){if((0,x.isArray)(t))return Vc(t[1].y);var e=t.y;return(0,x.isArray)(e)?Vc(e[0]):Vc(e)}function Hc(t,e,n){if(void 0===e&&(e=!1),void 0===n&&(n=!0),!t.length||1===t.length&&!n)return[];if(e){for(var r=[],i=0,a=t.length;i=t&&i<=t+n&&a>=e&&a<=e+r}function fd(t,e){return!(e.minX>t.maxX||e.maxXt.maxY||e.maxY=0&&o<.5*Math.PI?(r={x:l.minX,y:l.minY},i={x:l.maxX,y:l.maxY}):.5*Math.PI<=o&&o1&&(n*=Math.sqrt(f),r*=Math.sqrt(f));var p=n*n*(h*h)+r*r*(d*d),g=p?Math.sqrt((n*n*(r*r)-p)/p):1;a===o&&(g*=-1),isNaN(g)&&(g=0);var m=r?g*n*h/r:0,v=n?g*-r*d/n:0,y=(s+u)/2+Math.cos(i)*m-Math.sin(i)*v,b=(l+c)/2+Math.sin(i)*m+Math.cos(i)*v,w=[(d-m)/n,(h-v)/r],_=[(-1*d-m)/n,(-1*h-v)/r],C=Dd([1,0],w),S=Dd(w,_);return Ed(w,_)<=-1&&(S=Math.PI),Ed(w,_)>=1&&(S=0),0===o&&S>0&&(S-=2*Math.PI),1===o&&S<0&&(S+=2*Math.PI),{cx:y,cy:b,rx:gd(t,[u,c])?0:n,ry:gd(t,[u,c])?0:r,startAngle:C,endAngle:C+S,xRotation:i,arcFlag:a,sweepFlag:o}}var Md=Math.sin,Od=Math.cos,Bd=Math.atan2,Td=Math.PI;function Pd(t,e,n,r,i,a,o){var s=e.stroke,l=e.lineWidth,u=n-i,c=r-a,d=Bd(c,u),h=new Mh({type:"path",canvas:t.get("canvas"),isArrowShape:!0,attrs:{path:"M"+10*Od(Td/6)+","+10*Md(Td/6)+" L0,0 L"+10*Od(Td/6)+",-"+10*Md(Td/6),stroke:s,lineWidth:l}});h.translate(i,a),h.rotateAtPoint(i,a,d),t.set(o?"startArrowShape":"endArrowShape",h)}function Id(t,e,n,r,i,a,o){var s=e.startArrow,l=e.endArrow,u=e.stroke,c=e.lineWidth,d=o?s:l,h=d.d,f=d.fill,p=d.stroke,g=d.lineWidth,m=(0,b.__rest)(d,["d","fill","stroke","lineWidth"]),v=n-i,y=r-a,x=Bd(y,v);h&&(i-=Od(x)*h,a-=Md(x)*h);var w=new Mh({type:"path",canvas:t.get("canvas"),isArrowShape:!0,attrs:(0,b.__assign)((0,b.__assign)({},m),{stroke:p||u,lineWidth:g||c,fill:f})});w.translate(i,a),w.rotateAtPoint(i,a,x),t.set(o?"startArrowShape":"endArrowShape",w)}function Ld(t,e,n,r,i){var a=Bd(r-e,n-t);return{dx:Od(a)*i,dy:Md(a)*i}}function Rd(t,e,n,r,i,a){"object"===typeof e.startArrow?Id(t,e,n,r,i,a,!0):e.startArrow?Pd(t,e,n,r,i,a,!0):t.set("startArrowShape",null)}function Nd(t,e,n,r,i,a){"object"===typeof e.endArrow?Id(t,e,n,r,i,a,!1):e.endArrow?Pd(t,e,n,r,i,a,!1):t.set("startArrowShape",null)}var zd={fill:"fillStyle",stroke:"strokeStyle",opacity:"globalAlpha"};function jd(t,e){var n=e.attr();for(var r in n){var i=n[r],a=zd[r]?zd[r]:r;"matrix"===a&&i?t.transform(i[0],i[1],i[3],i[4],i[6],i[7]):"lineDash"===a&&t.setLineDash?(0,x.isArray)(i)&&t.setLineDash(i):("strokeStyle"===a||"fillStyle"===a?i=Sd(t,e,i):"globalAlpha"===a&&(i*=t.globalAlpha),t[a]=i)}}function $d(t,e,n){for(var r=0;rw?x:w,E=x>w?1:x/w,D=x>w?w/x:1;e.translate(y,b),e.rotate(S),e.scale(E,D),e.arc(0,0,k,_,C,1-A),e.scale(1/E,1/D),e.rotate(-S),e.translate(-y,-b)}break;case"Z":e.closePath();break;default:break}if("Z"===h)s=l;else{var F=d.length;s=[d[F-2],d[F-1]]}}}}function Zd(t,e){var n=t.get("canvas");n&&("remove"===e&&(t._cacheCanvasBBox=t.get("cacheCanvasBBox")),t.get("hasChanged")||(t.set("hasChanged",!0),t.cfg.parent&&t.cfg.parent.get("hasChanged")||(n.refreshElement(t,e,n),n.get("autoDraw")&&n.draw())))}function Xd(t){var e;if(t.destroyed)e=t["_cacheCanvasBBox"];else{var n=t.get("cacheCanvasBBox"),r=n&&!(!n.width||!n.height),i=t.getCanvasBBox(),a=i&&!(!i.width||!i.height);r&&a?e=pd(n,i):r?e=n:a&&(e=i)}return e}function Yd(t){if(!t.length)return null;var e=[],n=[],r=[],i=[];return(0,x.each)(t,(function(t){var a=Xd(t);a&&(e.push(a.minX),n.push(a.minY),r.push(a.maxX),i.push(a.maxY))})),{minX:(0,x.min)(e),minY:(0,x.min)(n),maxX:(0,x.max)(r),maxY:(0,x.max)(i)}}function Kd(t,e){return t&&e&&fd(t,e)?{minX:Math.max(t.minX,e.minX),minY:Math.max(t.minY,e.minY),maxX:Math.min(t.maxX,e.maxX),maxY:Math.min(t.maxY,e.maxY)}:null}var Qd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.onCanvasChange=function(t){Zd(this,t)},e.prototype.getShapeBase=function(){return d},e.prototype.getGroupBase=function(){return e},e.prototype._applyClip=function(t,e){e&&(t.save(),jd(t,e),e.createPath(t),t.restore(),t.clip(),e._afterDraw())},e.prototype.cacheCanvasBBox=function(){var t=this.cfg.children,e=[],n=[];(0,x.each)(t,(function(t){var r=t.cfg.cacheCanvasBBox;r&&t.cfg.isInView&&(e.push(r.minX,r.maxX),n.push(r.minY,r.maxY))}));var r=null;if(e.length){var i=(0,x.min)(e),a=(0,x.max)(e),o=(0,x.min)(n),s=(0,x.max)(n);r={minX:i,minY:o,x:i,y:o,maxX:a,maxY:s,width:a-i,height:s-o};var l=this.cfg.canvas;if(l){var u=l.getViewRange();this.set("isInView",fd(r,u))}}else this.set("isInView",!1);this.set("cacheCanvasBBox",r)},e.prototype.draw=function(t,e){var n=this.cfg.children,r=!e||this.cfg.refresh;n.length&&r&&(t.save(),jd(t,this),this._applyClip(t,this.getClip()),$d(t,n,e),t.restore(),this.cacheCanvasBBox()),this.cfg.refresh=null,this.set("hasChanged",!1)},e.prototype.skipDraw=function(){this.set("cacheCanvasBBox",null),this.set("hasChanged",!1)},e}(Z.AbstractGroup),Jd=Qd,th=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return(0,b.__assign)((0,b.__assign)({},e),{lineWidth:1,lineAppendWidth:0,strokeOpacity:1,fillOpacity:1})},e.prototype.getShapeBase=function(){return d},e.prototype.getGroupBase=function(){return Jd},e.prototype.onCanvasChange=function(t){Zd(this,t)},e.prototype.calculateBBox=function(){var t=this.get("type"),e=this.getHitLineWidth(),n=(0,Z.getBBoxMethod)(t),r=n(this),i=e/2,a=r.x-i,o=r.y-i,s=r.x+r.width+i,l=r.y+r.height+i;return{x:a,minX:a,y:o,minY:o,width:r.width+e,height:r.height+e,maxX:s,maxY:l}},e.prototype.isFill=function(){return!!this.attrs["fill"]||this.isClipShape()},e.prototype.isStroke=function(){return!!this.attrs["stroke"]},e.prototype._applyClip=function(t,e){e&&(t.save(),jd(t,e),e.createPath(t),t.restore(),t.clip(),e._afterDraw())},e.prototype.draw=function(t,e){var n=this.cfg.clipShape;if(e){if(!1===this.cfg.refresh)return void this.set("hasChanged",!1);var r=this.getCanvasBBox();if(!fd(e,r))return this.set("hasChanged",!1),void(this.cfg.isInView&&this._afterDraw())}t.save(),jd(t,this),this._applyClip(t,n),this.drawPath(t),t.restore(),this._afterDraw()},e.prototype.getCanvasViewBox=function(){var t=this.cfg.canvas;return t?t.getViewRange():null},e.prototype.cacheCanvasBBox=function(){var t=this.getCanvasViewBox();if(t){var e=this.getCanvasBBox(),n=fd(e,t);this.set("isInView",n),n?this.set("cacheCanvasBBox",e):this.set("cacheCanvasBBox",null)}},e.prototype._afterDraw=function(){this.cacheCanvasBBox(),this.set("hasChanged",!1),this.set("refresh",null)},e.prototype.skipDraw=function(){this.set("cacheCanvasBBox",null),this.set("isInView",null),this.set("hasChanged",!1)},e.prototype.drawPath=function(t){this.createPath(t),this.strokeAndFill(t),this.afterDrawPath(t)},e.prototype.fill=function(t){t.fill()},e.prototype.stroke=function(t){t.stroke()},e.prototype.strokeAndFill=function(t){var e=this.attrs,n=e.lineWidth,r=e.opacity,i=e.strokeOpacity,a=e.fillOpacity;this.isFill()&&((0,x.isNil)(a)||1===a?this.fill(t):(t.globalAlpha=a,this.fill(t),t.globalAlpha=r)),this.isStroke()&&n>0&&((0,x.isNil)(i)||1===i||(t.globalAlpha=i),this.stroke(t)),this.afterDrawPath(t)},e.prototype.createPath=function(t){},e.prototype.afterDrawPath=function(t){},e.prototype.isInShape=function(t,e){var n=this.isStroke(),r=this.isFill(),i=this.getHitLineWidth();return this.isInStrokeOrPath(t,e,n,r,i)},e.prototype.isInStrokeOrPath=function(t,e,n,r,i){return!1},e.prototype.getHitLineWidth=function(){if(!this.isStroke())return 0;var t=this.attrs;return t["lineWidth"]+t["lineAppendWidth"]},e}(Z.AbstractShape),eh=th,nh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return(0,b.__assign)((0,b.__assign)({},e),{x:0,y:0,r:0})},e.prototype.isInStrokeOrPath=function(t,e,n,r,i){var a=this.attr(),o=a.x,s=a.y,l=a.r,u=i/2,c=dd(o,s,t,e);return r&&n?c<=l+u:r?c<=l:!!n&&(c>=l-u&&c<=l+u)},e.prototype.createPath=function(t){var e=this.attr(),n=e.x,r=e.y,i=e.r;t.beginPath(),t.arc(n,r,i,0,2*Math.PI,!1),t.closePath()},e}(eh),rh=nh;function ih(t,e,n,r){return t/(n*n)+e/(r*r)}var ah=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return(0,b.__assign)((0,b.__assign)({},e),{x:0,y:0,rx:0,ry:0})},e.prototype.isInStrokeOrPath=function(t,e,n,r,i){var a=this.attr(),o=i/2,s=a.x,l=a.y,u=a.rx,c=a.ry,d=(t-s)*(t-s),h=(e-l)*(e-l);return r&&n?ih(d,h,u+o,c+o)<=1:r?ih(d,h,u,c)<=1:!!n&&(ih(d,h,u-o,c-o)>=1&&ih(d,h,u+o,c+o)<=1)},e.prototype.createPath=function(t){var e=this.attr(),n=e.x,r=e.y,i=e.rx,a=e.ry;if(t.beginPath(),t.ellipse)t.ellipse(n,r,i,a,0,0,2*Math.PI,!1);else{var o=i>a?i:a,s=i>a?1:i/a,l=i>a?a/i:1;t.save(),t.translate(n,r),t.scale(s,l),t.arc(0,0,o,0,2*Math.PI),t.restore(),t.closePath()}},e}(eh),oh=ah;function sh(t){return t instanceof HTMLElement&&(0,x.isString)(t.nodeName)&&"CANVAS"===t.nodeName.toUpperCase()}var lh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return(0,b.__assign)((0,b.__assign)({},e),{x:0,y:0,width:0,height:0})},e.prototype.initAttrs=function(t){this._setImage(t.img)},e.prototype.isStroke=function(){return!1},e.prototype.isOnlyHitBox=function(){return!0},e.prototype._afterLoading=function(){if(!0===this.get("toDraw")){var t=this.get("canvas");t?t.draw():this.createPath(this.get("context"))}},e.prototype._setImage=function(t){var e=this,n=this.attrs;if((0,x.isString)(t)){var r=new Image;r.onload=function(){if(e.destroyed)return!1;e.attr("img",r),e.set("loading",!1),e._afterLoading();var t=e.get("callback");t&&t.call(e)},r.crossOrigin="Anonymous",r.src=t,this.set("loading",!0)}else t instanceof Image?(n.width||(n.width=t.width),n.height||(n.height=t.height)):sh(t)&&(n.width||(n.width=Number(t.getAttribute("width"))),n.height||(n.height,Number(t.getAttribute("height"))))},e.prototype.onAttrChange=function(e,n,r){t.prototype.onAttrChange.call(this,e,n,r),"img"===e&&this._setImage(n)},e.prototype.createPath=function(t){if(this.get("loading"))return this.set("toDraw",!0),void this.set("context",t);var e=this.attr(),n=e.x,r=e.y,i=e.width,a=e.height,o=e.sx,s=e.sy,l=e.swidth,u=e.sheight,c=e.img;(c instanceof Image||sh(c))&&((0,x.isNil)(o)||(0,x.isNil)(s)||(0,x.isNil)(l)||(0,x.isNil)(u)?t.drawImage(c,n,r,i,a):t.drawImage(c,o,s,l,u,n,r,i,a))},e}(eh),uh=lh,ch=n(32793);function dh(t,e,n,r,i,a,o){var s=Math.min(t,n),l=Math.max(t,n),u=Math.min(e,r),c=Math.max(e,r),d=i/2;return a>=s-d&&a<=l+d&&o>=u-d&&o<=c+d&&ch.x1.pointToLine(t,e,n,r,a,o)<=i/2}var hh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return(0,b.__assign)((0,b.__assign)({},e),{x1:0,y1:0,x2:0,y2:0,startArrow:!1,endArrow:!1})},e.prototype.initAttrs=function(t){this.setArrow()},e.prototype.onAttrChange=function(e,n,r){t.prototype.onAttrChange.call(this,e,n,r),this.setArrow()},e.prototype.setArrow=function(){var t=this.attr(),e=t.x1,n=t.y1,r=t.x2,i=t.y2,a=t.startArrow,o=t.endArrow;a&&Rd(this,t,r,i,e,n),o&&Nd(this,t,e,n,r,i)},e.prototype.isInStrokeOrPath=function(t,e,n,r,i){if(!n||!i)return!1;var a=this.attr(),o=a.x1,s=a.y1,l=a.x2,u=a.y2;return dh(o,s,l,u,i,t,e)},e.prototype.createPath=function(t){var e=this.attr(),n=e.x1,r=e.y1,i=e.x2,a=e.y2,o=e.startArrow,s=e.endArrow,l={dx:0,dy:0},u={dx:0,dy:0};o&&o.d&&(l=Ld(n,r,i,a,e.startArrow.d)),s&&s.d&&(u=Ld(n,r,i,a,e.endArrow.d)),t.beginPath(),t.moveTo(n+l.dx,r+l.dy),t.lineTo(i-u.dx,a-u.dy)},e.prototype.afterDrawPath=function(t){var e=this.get("startArrowShape"),n=this.get("endArrowShape");e&&e.draw(t),n&&n.draw(t)},e.prototype.getTotalLength=function(){var t=this.attr(),e=t.x1,n=t.y1,r=t.x2,i=t.y2;return ch.x1.length(e,n,r,i)},e.prototype.getPoint=function(t){var e=this.attr(),n=e.x1,r=e.y1,i=e.x2,a=e.y2;return ch.x1.pointAt(n,r,i,a,t)},e}(eh),fh=hh,ph={circle:function(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e]]},square:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]},diamond:function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]},triangle:function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]},"triangle-down":function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]}},gh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.initAttrs=function(t){this._resetParamsCache()},e.prototype._resetParamsCache=function(){this.set("paramsCache",{})},e.prototype.onAttrChange=function(e,n,r){t.prototype.onAttrChange.call(this,e,n,r),-1!==["symbol","x","y","r","radius"].indexOf(e)&&this._resetParamsCache()},e.prototype.isOnlyHitBox=function(){return!0},e.prototype._getR=function(t){return(0,x.isNil)(t.r)?t.radius:t.r},e.prototype._getPath=function(){var t,n,r=this.attr(),i=r.x,a=r.y,o=r.symbol||"circle",s=this._getR(r);if((0,x.isFunction)(o))t=o,n=t(i,a,s),n=(0,mo.wb)(n);else{if(t=e.Symbols[o],!t)return console.warn(o+" marker is not supported."),null;n=t(i,a,s)}return n},e.prototype.createPath=function(t){var e=this._getPath(),n=this.get("paramsCache");Wd(this,t,{path:e},n)},e.Symbols=ph,e}(eh),mh=gh;function vh(t,e,n){var r=(0,Z.getOffScreenContext)();return t.createPath(r),r.isPointInPath(e,n)}var yh=1e-6;function bh(t){return Math.abs(t)0!==bh(s[1]-n)>0&&bh(e-(n-o[1])*(o[0]-s[0])/(o[1]-s[1])-o[0])<0&&(r=!r)}return r}function _h(t,e,n,r,i,a,o,s){var l=(Math.atan2(s-e,o-t)+2*Math.PI)%(2*Math.PI);if(li)return!1;var u={x:t+n*Math.cos(l),y:e+n*Math.sin(l)};return dd(u.x,u.y,o,s)<=a/2}var Ch=dr.transform;function Sh(t){for(var e=!1,n=t.length,r=0;rb?y:b,A=y>b?1:y/b,k=y>b?b/y:1,E=Ch(null,[["t",-m,-v],["r",-_],["s",1/A,1/k]]);ur.transformMat3(C,C,E),a=_h(0,0,S,x,w,e,C[0],C[1]);break;default:break}if(a)break}}return a}function kh(t){for(var e=t.length,n=[],r=[],i=[],a=0;a0&&r.push(i),{polygons:n,polylines:r}}var Eh=(0,b.__assign)({hasArc:Sh,extractPolygons:kh,isPointInStroke:Ah},Z.PathUtil);function Dh(t,e,n){for(var r=!1,i=0;i=r[0]&&t<=r[1]&&(e=(t-r[0])/(r[1]-r[0]),n=i)}));var a=i[n];if((0,x.isNil)(a)||(0,x.isNil)(n))return null;var o=a.length,s=i[n+1];return ch.Ll.pointAt(a[o-2],a[o-1],s[1],s[2],s[3],s[4],s[5],s[6],e)},e.prototype._calculateCurve=function(){var t=this.attr().path;this.set("curve",Eh.pathToCurve(t))},e.prototype._setTcache=function(){var t,e,n,r,i=0,a=0,o=[],s=this.get("curve");s&&((0,x.each)(s,(function(t,e){n=s[e+1],r=t.length,n&&(i+=ch.Ll.length(t[r-2],t[r-1],n[1],n[2],n[3],n[4],n[5],n[6])||0)})),this.set("totalLength",i),0!==i?((0,x.each)(s,(function(l,u){n=s[u+1],r=l.length,n&&(t=[],t[0]=a/i,e=ch.Ll.length(l[r-2],l[r-1],n[1],n[2],n[3],n[4],n[5],n[6]),a+=e||0,t[1]=a/i,o.push(t))})),this.set("tCache",o)):this.set("tCache",[]))},e.prototype.getStartTangent=function(){var t,e=this.getSegments();if(e.length>1){var n=e[0].currentPoint,r=e[1].currentPoint,i=e[1].startTangent;t=[],i?(t.push([n[0]-i[0],n[1]-i[1]]),t.push([n[0],n[1]])):(t.push([r[0],r[1]]),t.push([n[0],n[1]]))}return t},e.prototype.getEndTangent=function(){var t,e=this.getSegments(),n=e.length;if(n>1){var r=e[n-2].currentPoint,i=e[n-1].currentPoint,a=e[n-1].endTangent;t=[],a?(t.push([i[0]-a[0],i[1]-a[1]]),t.push([i[0],i[1]])):(t.push([r[0],r[1]]),t.push([i[0],i[1]]))}return t},e}(eh),Mh=Fh;function Oh(t,e,n,r,i){var a=t.length;if(a<2)return!1;for(var o=0;o=r[0]&&t<=r[1]&&(e=(t-r[0])/(r[1]-r[0]),n=i)})),ch.x1.pointAt(r[n][0],r[n][1],r[n+1][0],r[n+1][1],e)},e.prototype._setTcache=function(){var t=this.attr().points;if(t&&0!==t.length){var e=this.getTotalLength();if(!(e<=0)){var n,r,i=0,a=[];(0,x.each)(t,(function(o,s){t[s+1]&&(n=[],n[0]=i/e,r=ch.x1.length(o[0],o[1],t[s+1][0],t[s+1][1]),i+=r,n[1]=i/e,a.push(n))})),this.set("tCache",a)}}},e.prototype.getStartTangent=function(){var t=this.attr().points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.prototype.getEndTangent=function(){var t=this.attr().points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},e}(eh),Ih=Ph;function Lh(t,e,n,r,i,a,o){var s=i/2;return hd(t-s,e-s,n,i,a,o)||hd(t+n-s,e-s,i,r,a,o)||hd(t+s,e+r-s,n,i,a,o)||hd(t-s,e+s,i,r,a,o)}function Rh(t,e,n,r,i,a,o,s){return dh(t+i,e,t+n-i,e,a,o,s)||dh(t+n,e+i,t+n,e+r-i,a,o,s)||dh(t+n-i,e+r,t+i,e+r,a,o,s)||dh(t,e+r-i,t,e+i,a,o,s)||_h(t+n-i,e+i,i,1.5*Math.PI,2*Math.PI,a,o,s)||_h(t+n-i,e+r-i,i,0,.5*Math.PI,a,o,s)||_h(t+i,e+r-i,i,.5*Math.PI,Math.PI,a,o,s)||_h(t+i,e+i,i,Math.PI,1.5*Math.PI,a,o,s)}var Nh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return(0,b.__assign)((0,b.__assign)({},e),{x:0,y:0,width:0,height:0,radius:0})},e.prototype.isInStrokeOrPath=function(t,e,n,r,i){var a=this.attr(),o=a.x,s=a.y,l=a.width,u=a.height,c=a.radius;if(c){var d=!1;return n&&(d=Rh(o,s,l,u,c,i,t,e)),!d&&r&&(d=vh(this,t,e)),d}var h=i/2;return r&&n?hd(o-h,s-h,l+h,u+h,t,e):r?hd(o,s,l,u,t,e):n?Lh(o,s,l,u,i,t,e):void 0},e.prototype.createPath=function(t){var e=this.attr(),n=e.x,r=e.y,i=e.width,a=e.height,o=e.radius;if(t.beginPath(),0===o)t.rect(n,r,i,a);else{var s=Ad(o),l=s[0],u=s[1],c=s[2],d=s[3];t.moveTo(n+l,r),t.lineTo(n+i-u,r),0!==u&&t.arc(n+i-u,r+u,u,-Math.PI/2,0),t.lineTo(n+i,r+a-c),0!==c&&t.arc(n+i-c,r+a-c,c,0,Math.PI/2),t.lineTo(n+d,r+a),0!==d&&t.arc(n+d,r+a-d,d,Math.PI/2,Math.PI),t.lineTo(n,r+l),0!==l&&t.arc(n+l,r+l,l,Math.PI,1.5*Math.PI),t.closePath()}},e}(eh),zh=Nh,jh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return(0,b.__assign)((0,b.__assign)({},e),{x:0,y:0,text:null,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom"})},e.prototype.isOnlyHitBox=function(){return!0},e.prototype.initAttrs=function(t){this._assembleFont(),t.text&&this._setText(t.text)},e.prototype._assembleFont=function(){var t=this.attrs;t.font=(0,Z.assembleFont)(t)},e.prototype._setText=function(t){var e=null;(0,x.isString)(t)&&-1!==t.indexOf("\n")&&(e=t.split("\n")),this.set("textArr",e)},e.prototype.onAttrChange=function(e,n,r){t.prototype.onAttrChange.call(this,e,n,r),e.startsWith("font")&&this._assembleFont(),"text"===e&&this._setText(n)},e.prototype._getSpaceingY=function(){var t=this.attrs,e=t.lineHeight,n=1*t.fontSize;return e?e-n:.14*n},e.prototype._drawTextArr=function(t,e,n){var r,i=this.attrs,a=i.textBaseline,o=i.x,s=i.y,l=1*i.fontSize,u=this._getSpaceingY(),c=(0,Z.getTextHeight)(i.text,i.fontSize,i.lineHeight);(0,x.each)(e,(function(e,i){r=s+i*(u+l)-c+l,"middle"===a&&(r+=c-l-(c-l)/2),"top"===a&&(r+=c-l),(0,x.isNil)(e)||(n?t.fillText(e,o,r):t.strokeText(e,o,r))}))},e.prototype._drawText=function(t,e){var n=this.attr(),r=n.x,i=n.y,a=this.get("textArr");if(a)this._drawTextArr(t,a,e);else{var o=n.text;(0,x.isNil)(o)||(e?t.fillText(o,r,i):t.strokeText(o,r,i))}},e.prototype.strokeAndFill=function(t){var e=this.attrs,n=e.lineWidth,r=e.opacity,i=e.strokeOpacity,a=e.fillOpacity;this.isStroke()&&n>0&&((0,x.isNil)(i)||1===i||(t.globalAlpha=r),this.stroke(t)),this.isFill()&&((0,x.isNil)(a)||1===a?this.fill(t):(t.globalAlpha=a,this.fill(t),t.globalAlpha=r)),this.afterDrawPath(t)},e.prototype.fill=function(t){this._drawText(t,!0)},e.prototype.stroke=function(t){this._drawText(t,!1)},e}(eh),$h=jh;function Vh(t,e){if(e){var n=(0,Z.invert)(e);return(0,Z.multiplyVec2)(n,t)}return t}function qh(t,e,n){var r=t.getTotalMatrix();if(r){var i=Vh([e,n,1],r),a=i[0],o=i[1];return[a,o]}return[e,n]}function Hh(t,e,n){if(t.isCanvas&&t.isCanvas())return!0;if(!(0,Z.isAllowCapture)(t)||!1===t.cfg.isInView)return!1;if(t.cfg.clipShape){var r=qh(t,e,n),i=r[0],a=r[1];if(t.isClipped(i,a))return!1}var o=t.cfg.cacheCanvasBBox||t.getCanvasBBox();return e>=o.minX&&e<=o.maxX&&n>=o.minY&&n<=o.maxY}function Uh(t,e,n){if(!Hh(t,e,n))return null;for(var r=null,i=t.getChildren(),a=i.length,o=a-1;o>=0;o--){var s=i[o];if(s.isGroup())r=Uh(s,e,n);else if(Hh(s,e,n)){var l=s,u=qh(s,e,n),c=u[0],d=u[1];l.isInShape(c,d)&&(r=s)}if(r)break}return r}var Gh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e["renderer"]="canvas",e["autoDraw"]=!0,e["localRefresh"]=!0,e["refreshElements"]=[],e["clipView"]=!0,e["quickHit"]=!1,e},e.prototype.onCanvasChange=function(t){"attr"!==t&&"sort"!==t&&"changeSize"!==t||(this.set("refreshElements",[this]),this.draw())},e.prototype.getShapeBase=function(){return d},e.prototype.getGroupBase=function(){return Jd},e.prototype.getPixelRatio=function(){var t=this.get("pixelRatio")||cd();return t>=1?Math.ceil(t):1},e.prototype.getViewRange=function(){return{minX:0,minY:0,maxX:this.cfg.width,maxY:this.cfg.height}},e.prototype.createDom=function(){var t=document.createElement("canvas"),e=t.getContext("2d");return this.set("context",e),t},e.prototype.setDOMSize=function(e,n){t.prototype.setDOMSize.call(this,e,n);var r=this.get("context"),i=this.get("el"),a=this.getPixelRatio();i.width=a*e,i.height=a*n,a>1&&r.scale(a,a)},e.prototype.clear=function(){t.prototype.clear.call(this),this._clearFrame();var e=this.get("context"),n=this.get("el");e.clearRect(0,0,n.width,n.height)},e.prototype.getShape=function(e,n){var r;return r=this.get("quickHit")?Uh(this,e,n):t.prototype.getShape.call(this,e,n,null),r},e.prototype._getRefreshRegion=function(){var t,e=this.get("refreshElements"),n=this.getViewRange();if(e.length&&e[0]===this)t=n;else if(t=Yd(e),t){t.minX=Math.floor(t.minX),t.minY=Math.floor(t.minY),t.maxX=Math.ceil(t.maxX),t.maxY=Math.ceil(t.maxY),t.maxY+=1;var r=this.get("clipView");r&&(t=Kd(t,n))}return t},e.prototype.refreshElement=function(t){var e=this.get("refreshElements");e.push(t)},e.prototype._clearFrame=function(){var t=this.get("drawFrame");t&&((0,x.clearAnimationFrame)(t),this.set("drawFrame",null),this.set("refreshElements",[]))},e.prototype.draw=function(){var t=this.get("drawFrame");this.get("autoDraw")&&t||this._startDraw()},e.prototype._drawAll=function(){var t=this.get("context"),e=this.get("el"),n=this.getChildren();t.clearRect(0,0,e.width,e.height),jd(t,this),$d(t,n),this.set("refreshElements",[])},e.prototype._drawRegion=function(){var t=this.get("context"),e=this.get("refreshElements"),n=this.getChildren(),r=this._getRefreshRegion();r?(t.clearRect(r.minX,r.minY,r.maxX-r.minX,r.maxY-r.minY),t.save(),t.beginPath(),t.rect(r.minX,r.minY,r.maxX-r.minX,r.maxY-r.minY),t.clip(),jd(t,this),Vd(this,n,r),$d(t,n,r),t.restore()):e.length&&Hd(e),(0,x.each)(e,(function(t){t.get("hasChanged")&&t.set("hasChanged",!1)})),this.set("refreshElements",[])},e.prototype._startDraw=function(){var t=this,e=this.get("drawFrame");e||(e=(0,x.requestAnimationFrame)((function(){t.get("localRefresh")?t._drawRegion():t._drawAll(),t.set("drawFrame",null)})),this.set("drawFrame",e))},e.prototype.skipDraw=function(){},e.prototype.removeDom=function(){var t=this.get("el");t.width=0,t.height=0,t.parentNode.removeChild(t)},e}(Z.AbstractCanvas),Wh=Gh,Zh="0.5.12",Xh={rect:"path",circle:"circle",line:"line",path:"path",marker:"path",text:"text",polyline:"polyline",polygon:"polygon",image:"image",ellipse:"ellipse",dom:"foreignObject"},Yh={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 Kh(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Qh(t){var e=Xh[t.type],n=t.getParent();if(!e)throw new Error("the type "+t.type+" is not supported by svg");var r=Kh(e);if(t.get("id")&&(r.id=t.get("id")),t.set("el",r),t.set("attrs",{}),n){var i=n.get("el");i||(i=n.createDom(),n.set("el",i)),i.appendChild(r)}return r}function Jh(t,e){var n=t.get("el"),r=(0,x.toArray)(n.children).sort(e),i=document.createDocumentFragment();r.forEach((function(t){i.appendChild(t)})),n.appendChild(i)}function tf(t,e){var n=t.parentNode,r=Array.from(n.childNodes).filter((function(t){return 1===t.nodeType&&"defs"!==t.nodeName.toLowerCase()})),i=r[e],a=r.indexOf(t);if(i){if(a>e)n.insertBefore(t,i);else if(a0&&(e?"stroke"in n?this._setColor(t,"stroke",a):"strokeStyle"in n&&this._setColor(t,"stroke",o):this._setColor(t,"stroke",a||o),l&&c.setAttribute(Yh.strokeOpacity,l),u&&c.setAttribute(Yh.lineWidth,u))},e.prototype._setColor=function(t,e,n){var r=this.get("el");if(n)if(n=n.trim(),/^[r,R,L,l]{1}[\s]*\(/.test(n)){var i=t.find("gradient",n);i||(i=t.addGradient(n)),r.setAttribute(Yh[e],"url(#"+i+")")}else if(/^[p,P]{1}[\s]*\(/.test(n)){i=t.find("pattern",n);i||(i=t.addPattern(n)),r.setAttribute(Yh[e],"url(#"+i+")")}else r.setAttribute(Yh[e],n);else r.setAttribute(Yh[e],"none")},e.prototype.shadow=function(t,e){var n=this.attr(),r=e||n,i=r.shadowOffsetX,a=r.shadowOffsetY,o=r.shadowBlur,s=r.shadowColor;(i||a||o||s)&&ef(this,t)},e.prototype.transform=function(t){var e=this.attr(),n=(t||e).matrix;n&&nf(this)},e.prototype.isInShape=function(t,e){return this.isPointInPath(t,e)},e.prototype.isPointInPath=function(t,e){var n=this.get("el"),r=this.get("canvas"),i=r.get("el").getBoundingClientRect(),a=t+i.left,o=e+i.top,s=document.elementFromPoint(a,o);return!(!s||!s.isEqualNode(n))},e.prototype.getHitLineWidth=function(){var t=this.attrs,e=t.lineWidth,n=t.lineAppendWidth;return this.isStroke()?e+n:0},e}(Z.AbstractShape),cf=uf,df=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="circle",e.canFill=!0,e.canStroke=!0,e}return(0,b.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return(0,b.__assign)((0,b.__assign)({},e),{x:0,y:0,r:0})},e.prototype.createPath=function(t,e){var n=this.attr(),r=this.get("el");(0,x.each)(e||n,(function(t,e){"x"===e||"y"===e?r.setAttribute("c"+e,t):Yh[e]&&r.setAttribute(Yh[e],t)}))},e}(cf),hf=df,ff=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dom",e.canFill=!1,e.canStroke=!1,e}return(0,b.__extends)(e,t),e.prototype.createPath=function(t,e){var n=this.attr(),r=this.get("el");if((0,x.each)(e||n,(function(t,e){Yh[e]&&r.setAttribute(Yh[e],t)})),"function"===typeof n["html"]){var i=n["html"].call(this,n);if(i instanceof Element||i instanceof HTMLDocument){for(var a=r.childNodes,o=a.length-1;o>=0;o--)r.removeChild(a[o]);r.appendChild(i)}else r.innerHTML=i}else r.innerHTML=n["html"]},e}(cf),pf=ff,gf=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ellipse",e.canFill=!0,e.canStroke=!0,e}return(0,b.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return(0,b.__assign)((0,b.__assign)({},e),{x:0,y:0,rx:0,ry:0})},e.prototype.createPath=function(t,e){var n=this.attr(),r=this.get("el");(0,x.each)(e||n,(function(t,e){"x"===e||"y"===e?r.setAttribute("c"+e,t):Yh[e]&&r.setAttribute(Yh[e],t)}))},e}(cf),mf=gf,vf=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="image",e.canFill=!1,e.canStroke=!1,e}return(0,b.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return(0,b.__assign)((0,b.__assign)({},e),{x:0,y:0,width:0,height:0})},e.prototype.createPath=function(t,e){var n=this,r=this.attr(),i=this.get("el");(0,x.each)(e||r,(function(t,e){"img"===e?n._setImage(r.img):Yh[e]&&i.setAttribute(Yh[e],t)}))},e.prototype.setAttr=function(t,e){this.attrs[t]=e,"img"===t&&this._setImage(e)},e.prototype._setImage=function(t){var e=this.attr(),n=this.get("el");if((0,x.isString)(t))n.setAttribute("href",t);else if(t instanceof window.Image)e.width||(n.setAttribute("width",t.width),this.attr("width",t.width)),e.height||(n.setAttribute("height",t.height),this.attr("height",t.height)),n.setAttribute("href",t.src);else if(t instanceof HTMLElement&&(0,x.isString)(t.nodeName)&&"CANVAS"===t.nodeName.toUpperCase())n.setAttribute("href",t.toDataURL());else if(t instanceof ImageData){var r=document.createElement("canvas");r.setAttribute("width",""+t.width),r.setAttribute("height",""+t.height),r.getContext("2d").putImageData(t,0,0),e.width||(n.setAttribute("width",""+t.width),this.attr("width",t.width)),e.height||(n.setAttribute("height",""+t.height),this.attr("height",t.height)),n.setAttribute("href",r.toDataURL())}},e}(cf),yf=vf,bf=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="line",e.canFill=!1,e.canStroke=!0,e}return(0,b.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return(0,b.__assign)((0,b.__assign)({},e),{x1:0,y1:0,x2:0,y2:0,startArrow:!1,endArrow:!1})},e.prototype.createPath=function(t,e){var n=this.attr(),r=this.get("el");(0,x.each)(e||n,(function(e,i){if("startArrow"===i||"endArrow"===i)if(e){var a=(0,x.isObject)(e)?t.addArrow(n,Yh[i]):t.getDefaultArrow(n,Yh[i]);r.setAttribute(Yh[i],"url(#"+a+")")}else r.removeAttribute(Yh[i]);else Yh[i]&&r.setAttribute(Yh[i],e)}))},e.prototype.getTotalLength=function(){var t=this.attr(),e=t.x1,n=t.y1,r=t.x2,i=t.y2;return ch.x1.length(e,n,r,i)},e.prototype.getPoint=function(t){var e=this.attr(),n=e.x1,r=e.y1,i=e.x2,a=e.y2;return ch.x1.pointAt(n,r,i,a,t)},e}(cf),xf=bf,wf={circle:function(t,e,n){return[["M",t,e],["m",-n,0],["a",n,n,0,1,0,2*n,0],["a",n,n,0,1,0,2*-n,0]]},square:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]},diamond:function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]},triangle:function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["z"]]},triangleDown:function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]}},_f={get:function(t){return wf[t]},register:function(t,e){wf[t]=e},remove:function(t){delete wf[t]},getAll:function(){return wf}},Cf=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="marker",e.canFill=!0,e.canStroke=!0,e}return(0,b.__extends)(e,t),e.prototype.createPath=function(t){var e=this.get("el");e.setAttribute("d",this._assembleMarker())},e.prototype._assembleMarker=function(){var t=this._getPath();return(0,x.isArray)(t)?t.map((function(t){return t.join(" ")})).join(""):t},e.prototype._getPath=function(){var t,e=this.attr(),n=e.x,r=e.y,i=e.r||e.radius,a=e.symbol||"circle";return t=(0,x.isFunction)(a)?a:_f.get(a),t?t(n,r,i):(console.warn(t+" symbol is not exist."),null)},e.symbolsFactory=_f,e}(cf),Sf=Cf,Af=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="path",e.canFill=!0,e.canStroke=!0,e}return(0,b.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return(0,b.__assign)((0,b.__assign)({},e),{startArrow:!1,endArrow:!1})},e.prototype.createPath=function(t,e){var n=this,r=this.attr(),i=this.get("el");(0,x.each)(e||r,(function(e,a){if("path"===a&&(0,x.isArray)(e))i.setAttribute("d",n._formatPath(e));else if("startArrow"===a||"endArrow"===a)if(e){var o=(0,x.isObject)(e)?t.addArrow(r,Yh[a]):t.getDefaultArrow(r,Yh[a]);i.setAttribute(Yh[a],"url(#"+o+")")}else i.removeAttribute(Yh[a]);else Yh[a]&&i.setAttribute(Yh[a],e)}))},e.prototype._formatPath=function(t){var e=t.map((function(t){return t.join(" ")})).join("");return~e.indexOf("NaN")?"":e},e.prototype.getTotalLength=function(){var t=this.get("el");return t?t.getTotalLength():null},e.prototype.getPoint=function(t){var e=this.get("el"),n=this.getTotalLength();if(0===n)return null;var r=e?e.getPointAtLength(t*n):null;return r?{x:r.x,y:r.y}:null},e}(cf),kf=Af,Ef=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="polygon",e.canFill=!0,e.canStroke=!0,e}return(0,b.__extends)(e,t),e.prototype.createPath=function(t,e){var n=this.attr(),r=this.get("el");(0,x.each)(e||n,(function(t,e){"points"===e&&(0,x.isArray)(t)&&t.length>=2?r.setAttribute("points",t.map((function(t){return t[0]+","+t[1]})).join(" ")):Yh[e]&&r.setAttribute(Yh[e],t)}))},e}(cf),Df=Ef,Ff=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="polyline",e.canFill=!0,e.canStroke=!0,e}return(0,b.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return(0,b.__assign)((0,b.__assign)({},e),{startArrow:!1,endArrow:!1})},e.prototype.onAttrChange=function(e,n,r){t.prototype.onAttrChange.call(this,e,n,r),-1!==["points"].indexOf(e)&&this._resetCache()},e.prototype._resetCache=function(){this.set("totalLength",null),this.set("tCache",null)},e.prototype.createPath=function(t,e){var n=this.attr(),r=this.get("el");(0,x.each)(e||n,(function(t,e){"points"===e&&(0,x.isArray)(t)&&t.length>=2?r.setAttribute("points",t.map((function(t){return t[0]+","+t[1]})).join(" ")):Yh[e]&&r.setAttribute(Yh[e],t)}))},e.prototype.getTotalLength=function(){var t=this.attr().points,e=this.get("totalLength");return(0,x.isNil)(e)?(this.set("totalLength",ch.aH.length(t)),this.get("totalLength")):e},e.prototype.getPoint=function(t){var e,n,r=this.attr().points,i=this.get("tCache");return i||(this._setTcache(),i=this.get("tCache")),(0,x.each)(i,(function(r,i){t>=r[0]&&t<=r[1]&&(e=(t-r[0])/(r[1]-r[0]),n=i)})),ch.x1.pointAt(r[n][0],r[n][1],r[n+1][0],r[n+1][1],e)},e.prototype._setTcache=function(){var t=this.attr().points;if(t&&0!==t.length){var e=this.getTotalLength();if(!(e<=0)){var n,r,i=0,a=[];(0,x.each)(t,(function(o,s){t[s+1]&&(n=[],n[0]=i/e,r=ch.x1.length(o[0],o[1],t[s+1][0],t[s+1][1]),i+=r,n[1]=i/e,a.push(n))})),this.set("tCache",a)}}},e.prototype.getStartTangent=function(){var t=this.attr().points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.prototype.getEndTangent=function(){var t=this.attr().points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},e}(cf),Mf=Ff;function Of(t){var e=0,n=0,r=0,i=0;return(0,x.isArray)(t)?1===t.length?e=n=r=i=t[0]:2===t.length?(e=r=t[0],n=i=t[1]):3===t.length?(e=t[0],n=i=t[1],r=t[2]):(e=t[0],n=t[1],r=t[2],i=t[3]):e=n=r=i=t,{r1:e,r2:n,r3:r,r4:i}}var Bf=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="rect",e.canFill=!0,e.canStroke=!0,e}return(0,b.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return(0,b.__assign)((0,b.__assign)({},e),{x:0,y:0,width:0,height:0,radius:0})},e.prototype.createPath=function(t,e){var n=this,r=this.attr(),i=this.get("el"),a=!1,o=["x","y","width","height","radius"];(0,x.each)(e||r,(function(t,e){-1===o.indexOf(e)||a?-1===o.indexOf(e)&&Yh[e]&&i.setAttribute(Yh[e],t):(i.setAttribute("d",n._assembleRect(r)),a=!0)}))},e.prototype._assembleRect=function(t){var e=t.x,n=t.y,r=t.width,i=t.height,a=t.radius;if(!a)return"M "+e+","+n+" l "+r+",0 l 0,"+i+" l"+-r+" 0 z";var o=Of(a);(0,x.isArray)(a)?1===a.length?o.r1=o.r2=o.r3=o.r4=a[0]:2===a.length?(o.r1=o.r3=a[0],o.r2=o.r4=a[1]):3===a.length?(o.r1=a[0],o.r2=o.r4=a[1],o.r3=a[2]):(o.r1=a[0],o.r2=a[1],o.r3=a[2],o.r4=a[3]):o.r1=o.r2=o.r3=o.r4=a;var s=[["M "+(e+o.r1)+","+n],["l "+(r-o.r1-o.r2)+",0"],["a "+o.r2+","+o.r2+",0,0,1,"+o.r2+","+o.r2],["l 0,"+(i-o.r2-o.r3)],["a "+o.r3+","+o.r3+",0,0,1,"+-o.r3+","+o.r3],["l "+(o.r3+o.r4-r)+",0"],["a "+o.r4+","+o.r4+",0,0,1,"+-o.r4+","+-o.r4],["l 0,"+(o.r4+o.r1-i)],["a "+o.r1+","+o.r1+",0,0,1,"+o.r1+","+-o.r1],["z"]];return s.join(" ")},e}(cf),Tf=Bf,Pf=n(43631),If=.3,Lf={top:"before-edge",middle:"central",bottom:"after-edge",alphabetic:"baseline",hanging:"hanging"},Rf={top:"text-before-edge",middle:"central",bottom:"text-after-edge",alphabetic:"alphabetic",hanging:"hanging"},Nf={left:"left",start:"left",center:"middle",right:"end",end:"end"},zf=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="text",e.canFill=!0,e.canStroke=!0,e}return(0,b.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return(0,b.__assign)((0,b.__assign)({},e),{x:0,y:0,text:null,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom"})},e.prototype.createPath=function(t,e){var n=this,r=this.attr(),i=this.get("el");this._setFont(),(0,x.each)(e||r,(function(t,e){"text"===e?n._setText(""+t):"matrix"===e&&t?nf(n):Yh[e]&&i.setAttribute(Yh[e],t)})),i.setAttribute("paint-order","stroke"),i.setAttribute("style","stroke-linecap:butt; stroke-linejoin:miter;")},e.prototype._setFont=function(){var t=this.get("el"),e=this.attr(),n=e.textBaseline,r=e.textAlign,i=(0,Pf.qY)();i&&"firefox"===i.name?t.setAttribute("dominant-baseline",Rf[n]||"alphabetic"):t.setAttribute("alignment-baseline",Lf[n]||"baseline"),t.setAttribute("text-anchor",Nf[r]||"left")},e.prototype._setText=function(t){var e=this.get("el"),n=this.attr(),r=n.x,i=n.textBaseline,a=void 0===i?"bottom":i;if(t)if(~t.indexOf("\n")){var o=t.split("\n"),s=o.length-1,l="";(0,x.each)(o,(function(t,e){0===e?"alphabetic"===a?l+=''+t+"":"top"===a?l+=''+t+"":"middle"===a?l+=''+t+"":"bottom"===a?l+=''+t+"":"hanging"===a&&(l+=''+t+""):l+=''+t+""})),e.innerHTML=l}else e.innerHTML=t;else e.innerHTML=""},e}(cf),jf=zf,$f=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,Vf=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,qf=/[\d.]+:(#[^\s]+|[^)]+\))/gi;function Hf(t){var e=t.match(qf);if(!e)return"";var n="";return e.sort((function(t,e){return t=t.split(":"),e=e.split(":"),Number(t[0])-Number(e[0])})),(0,x.each)(e,(function(t){t=t.split(":"),n+=''})),n}function Uf(t,e){var n,r,i=$f.exec(t),a=(0,x.mod)((0,x.toRadian)(parseFloat(i[1])),2*Math.PI),o=i[2];a>=0&&a<.5*Math.PI?(n={x:0,y:0},r={x:1,y:1}):.5*Math.PI<=a&&a';e.innerHTML=n},t}(),Qf=Kf,Jf=function(){function t(t,e){this.cfg={};var n=Kh("marker"),r=(0,x.uniqueId)("marker_");n.setAttribute("id",r);var i=Kh("path");i.setAttribute("stroke",t.stroke||"none"),i.setAttribute("fill",t.fill||"none"),n.appendChild(i),n.setAttribute("overflow","visible"),n.setAttribute("orient","auto-start-reverse"),this.el=n,this.child=i,this.id=r;var a=t["marker-start"===e?"startArrow":"endArrow"];return this.stroke=t.stroke||"#000",!0===a?this._setDefaultPath(e,i):(this.cfg=a,this._setMarker(t.lineWidth,i)),this}return t.prototype.match=function(){return!1},t.prototype._setDefaultPath=function(t,e){var n=this.el;e.setAttribute("d","M0,0 L"+10*Math.cos(Math.PI/6)+",5 L0,10"),n.setAttribute("refX",""+10*Math.cos(Math.PI/6)),n.setAttribute("refY","5")},t.prototype._setMarker=function(t,e){var n=this.el,r=this.cfg.path,i=this.cfg.d;(0,x.isArray)(r)&&(r=r.map((function(t){return t.join(" ")})).join("")),e.setAttribute("d",r),n.appendChild(e),i&&n.setAttribute("refX",""+i/t)},t.prototype.update=function(t){var e=this.child;e.attr?e.attr("fill",t):e.setAttribute("fill",t)},t}(),tp=Jf,ep=function(){function t(t){this.type="clip",this.cfg={};var e=Kh("clipPath");this.el=e,this.id=(0,x.uniqueId)("clip_"),e.id=this.id;var n=t.cfg.el;return e.appendChild(n),this.cfg=t,this}return t.prototype.match=function(){return!1},t.prototype.remove=function(){var t=this.el;t.parentNode.removeChild(t)},t}(),np=ep,rp=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,ip=function(){function t(t){this.cfg={};var e=Kh("pattern");e.setAttribute("patternUnits","userSpaceOnUse");var n=Kh("image");e.appendChild(n);var r=(0,x.uniqueId)("pattern_");e.id=r,this.el=e,this.id=r,this.cfg=t;var i=rp.exec(t),a=i[2];n.setAttribute("href",a);var o=new Image;function s(){e.setAttribute("width",""+o.width),e.setAttribute("height",""+o.height)}return a.match(/^data:/i)||(o.crossOrigin="Anonymous"),o.src=a,o.complete?s():(o.onload=s,o.src=o.src),this}return t.prototype.match=function(t,e){return this.cfg===e},t}(),ap=ip,op=function(){function t(t){var e=Kh("defs"),n=(0,x.uniqueId)("defs_");e.id=n,t.appendChild(e),this.children=[],this.defaultArrow={},this.el=e,this.canvas=t}return t.prototype.find=function(t,e){for(var n=this.children,r=null,i=0;i0&&(u[0][0]="L")),a=a.concat(u)})),a.push(["Z"])}return a}function pp(t,e,n,r,i){for(var a=Wc(t,e,!e,"lineWidth"),o=t.connectNulls,s=t.isInCircle,l=t.points,u=t.showSinglePoint,c=Hc(l,o,u),d=[],h=0,f=c.length;hi&&(i=e),e=e[0]})));var p=this.scales[h];try{for(var g=(0,b.__values)(t),m=g.next();!m.done;m=g.next()){var v=m.value,y=this.getDrawCfg(v),x=y.x,w=y.y,_=p.scale(v[O][h]);this.drawGrayScaleBlurredCircle(x-s.x,w-l.y,n+r,_,f)}}catch(A){i={error:A}}finally{try{m&&!m.done&&(a=g.return)&&a.call(g)}finally{if(i)throw i.error}}var C=f.getImageData(0,0,u,c);this.clearShadowCanvasCtx(),this.colorize(C),f.putImageData(C,0,0);var S=this.getImageShape();S.attr("x",s.x),S.attr("y",l.y),S.attr("width",u),S.attr("height",c),S.attr("img",f.canvas),S.set("origin",this.getShapeInfo(t))},e.prototype.getDefaultSize=function(){var t=this.getAttribute("position"),e=this.coordinate;return Math.min(e.getWidth()/(4*t.scales[0].ticks.length),e.getHeight()/(4*t.scales[1].ticks.length))},e.prototype.clearShadowCanvasCtx=function(){var t=this.getShadowCanvasCtx();t.clearRect(0,0,t.canvas.width,t.canvas.height)},e.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")},e.prototype.getGrayScaleBlurredCanvas=function(){return this.grayScaleBlurredCanvas||(this.grayScaleBlurredCanvas=document.createElement("canvas")),this.grayScaleBlurredCanvas},e.prototype.drawGrayScaleBlurredCircle=function(t,e,n,r,i){var a=this.getGrayScaleBlurredCanvas();i.globalAlpha=r,i.drawImage(a,t-n,e-n)},e.prototype.colorize=function(t){for(var e=this.getAttribute("color"),n=t.data,r=this.paletteCache,i=3;ie&&(n=n?e/(1+r/n):0,r=e-n),i+a>e&&(i=i?e/(1+a/i):0,a=e-i),[n||0,r||0,i||0,a||0]}function Ap(t,e,n){var r=[];if(n.isRect){var i=n.isTransposed?{x:n.start.x,y:e[0].y}:{x:e[0].x,y:n.start.y},a=n.isTransposed?{x:n.end.x,y:e[2].y}:{x:e[3].x,y:n.end.y},o=(0,x.get)(t,["background","style","radius"]);if(o){var s=n.isTransposed?Math.abs(e[0].y-e[2].y):e[2].x-e[1].x,l=n.isTransposed?n.getWidth():n.getHeight(),u=(0,b.__read)(Sp(o,Math.min(s,l)),4),c=u[0],d=u[1],h=u[2],f=u[3];r.push(["M",i.x,a.y+c]),0!==c&&r.push(["A",c,c,0,0,1,i.x+c,a.y]),r.push(["L",a.x-d,a.y]),0!==d&&r.push(["A",d,d,0,0,1,a.x,a.y+d]),r.push(["L",a.x,i.y-h]),0!==h&&r.push(["A",h,h,0,0,1,a.x-h,i.y]),r.push(["L",i.x+f,i.y]),0!==f&&r.push(["A",f,f,0,0,1,i.x,i.y-f])}else r.push(["M",i.x,i.y]),r.push(["L",a.x,i.y]),r.push(["L",a.x,a.y]),r.push(["L",i.x,a.y]),r.push(["L",i.x,i.y]);r.push(["z"])}if(n.isPolar){var p=n.getCenter(),g=Yo(t,n),m=g.startAngle,v=g.endAngle;if("theta"===n.type||n.isTransposed){var y=function(t){return Math.pow(t,2)};c=Math.sqrt(y(p.x-e[0].x)+y(p.y-e[0].y)),d=Math.sqrt(y(p.x-e[2].x)+y(p.y-e[2].y));r=Zo(p.x,p.y,c,n.startAngle,n.endAngle,d)}else r=Zo(p.x,p.y,n.getRadius(),m,v)}return r}function kp(t,e,n){var r=n.getWidth(),i=n.getHeight(),a="rect"===n.type,o=[],s=(t[2].x-t[1].x)/2,l=n.isTransposed?s*i/r:s*r/i;return"round"===e?(a?(o.push(["M",t[0].x,t[0].y+l]),o.push(["L",t[1].x,t[1].y-l]),o.push(["A",s,s,0,0,1,t[2].x,t[2].y-l]),o.push(["L",t[3].x,t[3].y+l]),o.push(["A",s,s,0,0,1,t[0].x,t[0].y+l])):(o.push(["M",t[0].x,t[0].y]),o.push(["L",t[1].x,t[1].y]),o.push(["A",s,s,0,0,1,t[2].x,t[2].y]),o.push(["L",t[3].x,t[3].y]),o.push(["A",s,s,0,0,1,t[0].x,t[0].y])),o.push(["z"])):o=Cp(t),o}function Ep(t,e,n){var r=[];return(0,x.isNil)(e)?n?r.push(["M",t[0].x,t[0].y],["L",t[1].x,t[1].y],["L",(t[2].x+t[3].x)/2,(t[2].y+t[3].y)/2],["Z"]):r.push(["M",t[0].x,t[0].y],["L",t[1].x,t[1].y],["L",t[2].x,t[2].y],["L",t[3].x,t[3].y],["Z"]):r.push(["M",t[0].x,t[0].y],["L",t[1].x,t[1].y],["L",e[1].x,e[1].y],["L",e[0].x,e[0].y],["Z"]),r}function Dp(t,e){return[e,t]}function Fp(t,e,n){var r,i,a,o,s,l,u,c=(0,b.__read)((0,b.__spreadArray)([],(0,b.__read)(t),!1),4),d=c[0],h=c[1],f=c[2],p=c[3],g=(0,b.__read)("number"===typeof n?Array(4).fill(n):n,4),m=g[0],v=g[1],y=g[2],x=g[3];e.isTransposed&&(r=(0,b.__read)(Dp(h,p),2),h=r[0],p=r[1]),e.isReflect("y")&&(i=(0,b.__read)(Dp(d,h),2),d=i[0],h=i[1],a=(0,b.__read)(Dp(f,p),2),f=a[0],p=a[1]),e.isReflect("x")&&(o=(0,b.__read)(Dp(d,p),2),d=o[0],p=o[1],s=(0,b.__read)(Dp(h,f),2),h=s[0],f=s[1]);var w=[],_=function(t){return Math.abs(t)};return l=(0,b.__read)(Sp([m,v,y,x],Math.min(_(p.x-d.x),_(h.y-d.y))).map((function(t){return _(t)})),4),m=l[0],v=l[1],y=l[2],x=l[3],e.isTransposed&&(u=(0,b.__read)([x,m,v,y],4),m=u[0],v=u[1],y=u[2],x=u[3]),d.yo&&(i=o)}return i}function Op(t,e){if(e){var n=(0,x.flatten)(t),r=(0,x.valuesOfKey)(n,e);return r.length}return t.length}function Bp(t){var e=t.theme,n=t.coordinate,r=t.getXScale(),i=r.values,a=t.beforeMappingData,o=i.length,s=as(t.coordinate),l=t.intervalPadding,u=t.dodgePadding,c=t.maxColumnWidth||e.maxColumnWidth,d=t.minColumnWidth||e.minColumnWidth,h=t.columnWidthRatio||e.columnWidthRatio,f=t.multiplePieWidthRatio||e.multiplePieWidthRatio,p=t.roseWidthRatio||e.roseWidthRatio;if(r.isLinear&&i.length>1){i.sort();var g=Mp(i,r);o=(r.max-r.min)/g,i.length>o&&(o=i.length)}var m=r.range,v=1/o,y=1;if(n.isPolar?y=n.isTransposed&&o>1?f:p:(r.isLinear&&(v*=m[1]-m[0]),y=h),!(0,x.isNil)(l)&&l>=0){var b=l/s;v=(1-(o-1)*b)/o}else v*=y;if(t.getAdjust("dodge")){var w=t.getAdjust("dodge"),_=w.dodgeBy,C=Op(a,_);if(!(0,x.isNil)(u)&&u>=0){var S=u/s;v=(v-S*(C-1))/C}else!(0,x.isNil)(l)&&l>=0?(v*=y,v/=C):v/=C;v=v>=0?v:0}if(!(0,x.isNil)(c)&&c>=0){var A=c/s;v>A&&(v=A)}if(!(0,x.isNil)(d)&&d>=0){var k=d/s;v0&&!(0,x.get)(n,[r,"min"])&&e.change({min:0}),a<=0&&!(0,x.get)(n,[r,"max"])&&e.change({max:0}))}},e.prototype.getDrawCfg=function(e){var n=t.prototype.getDrawCfg.call(this,e);return n.background=this.background,n},e}(mc),Pp=Tp,Ip=function(t){function e(e){var n=t.call(this,e)||this;n.type="line";var r=e.sortable,i=void 0!==r&&r;return n.sortable=i,n}return(0,b.__extends)(e,t),e}(hp),Lp=Ip,Rp=["circle","square","bowtie","diamond","hexagon","triangle","triangle-down"],Np=["cross","tick","plus","hyphen","line"];function zp(t,e,n,r,i){var a,o,s=Wc(e,i,!i,"r"),l=t.parsePoints(e.points),u=l[0];if(e.isStack)u=l[1];else if(l.length>1){var c=n.addGroup();try{for(var d=(0,b.__values)(l),h=d.next();!h.done;h=d.next()){var f=h.value;c.addShape({type:"marker",attrs:(0,b.__assign)((0,b.__assign)((0,b.__assign)({},s),{symbol:Tc[r]||r}),f)})}}catch(p){a={error:p}}finally{try{h&&!h.done&&(o=d.return)&&o.call(d)}finally{if(a)throw a.error}}return c}return n.addShape({type:"marker",attrs:(0,b.__assign)((0,b.__assign)((0,b.__assign)({},s),{symbol:Tc[r]||r}),u)})}lc("point",{defaultShapeType:"hollow-circle",getDefaultPoints:function(t){return Xc(t)}});(0,x.each)(Rp,(function(t){uc("point","hollow-".concat(t),{draw:function(e,n){return zp(this,e,n,t,!0)},getMarker:function(e){var n=e.color;return{symbol:Tc[t]||t,style:{r:4.5,stroke:n,fill:null}}}})}));var jp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="point",e.shapeType="point",e.generatePoints=!0,e}return(0,b.__extends)(e,t),e.prototype.getDrawCfg=function(e){var n=t.prototype.getDrawCfg.call(this,e);return(0,b.__assign)((0,b.__assign)({},n),{isStack:!!this.getAdjust("stack")})},e}(mc),$p=jp;function Vp(t){var e=t[0],n=1,r=[["M",e.x,e.y]];while(n2?"weight":"normal";if(t.isInCircle){var o={x:0,y:1};return"normal"===a?n=Qp(i[0],i[1],o):(r.fill=r.stroke,n=Jp(i,o)),n=this.parsePath(n),e.addShape("path",{attrs:(0,b.__assign)((0,b.__assign)({},r),{path:n})})}if("normal"===a)return i=this.parsePoints(i),n=Xo((i[1].x+i[0].x)/2,i[0].y,Math.abs(i[1].x-i[0].x)/2,Math.PI,2*Math.PI),e.addShape("path",{attrs:(0,b.__assign)((0,b.__assign)({},r),{path:n})});var s=Yp(i[1],i[3]),l=Yp(i[2],i[0]);return n=[["M",i[0].x,i[0].y],["L",i[1].x,i[1].y],s,["L",i[3].x,i[3].y],["L",i[2].x,i[2].y],l,["Z"]],n=this.parsePath(n),r.fill=r.stroke,e.addShape("path",{attrs:(0,b.__assign)((0,b.__assign)({},r),{path:n})})},getMarker:function(t){return{symbol:"circle",style:{r:4.5,fill:t.color}}}}),uc("edge","smooth",{draw:function(t,e){var n=Wc(t,!0,!1,"lineWidth"),r=t.points,i=this.parsePath(tg(r[0],r[1]));return e.addShape("path",{attrs:(0,b.__assign)((0,b.__assign)({},n),{path:i})})},getMarker:function(t){return{symbol:"circle",style:{r:4.5,fill:t.color}}}});var eg=1/3;function ng(t,e){var n=[];n.push({x:t.x,y:t.y*(1-eg)+e.y*eg}),n.push({x:e.x,y:t.y*(1-eg)+e.y*eg}),n.push(e);var r=[["M",t.x,t.y]];return(0,x.each)(n,(function(t){r.push(["L",t.x,t.y])})),r}function rg(t){var e=t.x,n=t.y,r=t.y0;return(0,x.isArray)(n)?n.map((function(t,n){return{x:(0,x.isArray)(e)?e[n]:e,y:t}})):[{x:e,y:r},{x:e,y:n}]}function ig(t){var e,n,r,i=t.x,a=t.y,o=t.y0,s=t.size;(0,x.isArray)(a)?(e=(0,b.__read)(a,2),n=e[0],r=e[1]):(n=o,r=a);var l=i+s/2,u=i-s/2;return[{x:i,y:n},{x:i,y:r},{x:u,y:n},{x:l,y:n},{x:u,y:r},{x:l,y:r}]}function ag(t){return[["M",t[0].x,t[0].y],["L",t[1].x,t[1].y],["M",t[2].x,t[2].y],["L",t[3].x,t[3].y],["M",t[4].x,t[4].y],["L",t[5].x,t[5].y]]}uc("edge","vhv",{draw:function(t,e){var n=Wc(t,!0,!1,"lineWidth"),r=t.points,i=this.parsePath(ng(r[0],r[1]));return e.addShape("path",{attrs:(0,b.__assign)((0,b.__assign)({},n),{path:i})})},getMarker:function(t){return{symbol:"circle",style:{r:4.5,fill:t.color}}}}),uc("interval","funnel",{getPoints:function(t){return t.size=2*t.size,_p(t)},draw:function(t,e){var n=Wc(t,!1,!0),r=this.parsePath(Ep(t.points,t.nextPoints,!1)),i=e.addShape("path",{attrs:(0,b.__assign)((0,b.__assign)({},n),{path:r}),name:"interval"});return i},getMarker:function(t){var e=t.color;return{symbol:"square",style:{r:4,fill:e}}}}),uc("interval","hollow-rect",{draw:function(t,e){var n=Wc(t,!0,!1),r=e,i=null===t||void 0===t?void 0:t.background;if(i){r=e.addGroup();var a=Zc(t),o=Ap(t,this.parsePoints(t.points),this.coordinate);r.addShape("path",{attrs:(0,b.__assign)((0,b.__assign)({},a),{path:o}),zIndex:-1,name:Yu})}var s=this.parsePath(Cp(t.points)),l=r.addShape("path",{attrs:(0,b.__assign)((0,b.__assign)({},n),{path:s}),name:"interval"});return i?r:l},getMarker:function(t){var e=t.color,n=t.isInPolar;return n?{symbol:"circle",style:{r:4.5,stroke:e,fill:null}}:{symbol:"square",style:{r:4,stroke:e,fill:null}}}}),uc("interval","line",{getPoints:function(t){return rg(t)},draw:function(t,e){var n=Wc(t,!0,!1,"lineWidth"),r=es((0,b.__assign)({},n),["fill"]),i=this.parsePath(Cp(t.points,!1)),a=e.addShape("path",{attrs:(0,b.__assign)((0,b.__assign)({},r),{path:i}),name:"interval"});return a},getMarker:function(t){var e=t.color;return{symbol:function(t,e,n){return[["M",t,e-n],["L",t,e+n]]},style:{r:5,stroke:e}}}}),uc("interval","pyramid",{getPoints:function(t){return t.size=2*t.size,_p(t)},draw:function(t,e){var n=Wc(t,!1,!0),r=this.parsePath(Ep(t.points,t.nextPoints,!0)),i=e.addShape("path",{attrs:(0,b.__assign)((0,b.__assign)({},n),{path:r}),name:"interval"});return i},getMarker:function(t){var e=t.color;return{symbol:"square",style:{r:4,fill:e}}}}),uc("interval","tick",{getPoints:function(t){return ig(t)},draw:function(t,e){var n=Wc(t,!0,!1),r=this.parsePath(ag(t.points)),i=e.addShape("path",{attrs:(0,b.__assign)((0,b.__assign)({},n),{path:r}),name:"interval"});return i},getMarker:function(t){var e=t.color;return{symbol:function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]},style:{r:5,stroke:e}}}});var og=function(t,e,n){var r,i=t.x,a=t.y,o=e.x,s=e.y;switch(n){case"hv":r=[{x:o,y:a}];break;case"vh":r=[{x:i,y:s}];break;case"hvh":var l=(o+i)/2;r=[{x:l,y:a},{x:l,y:s}];break;case"vhv":var u=(a+s)/2;r=[{x:i,y:u},{x:o,y:u}];break;default:break}return r};function sg(t,e){var n=[];return(0,x.each)(t,(function(r,i){var a=t[i+1];if(n.push(r),a){var o=og(r,a,e);n=n.concat(o)}})),n}function lg(t){return t.map((function(t,e){return 0===e?["M",t.x,t.y]:["L",t.x,t.y]}))}function ug(t,e){var n=Hc(t.points,t.connectNulls,t.showSinglePoint),r=[];return(0,x.each)(n,(function(t){var n=sg(t,e);r=r.concat(lg(n))})),(0,b.__assign)((0,b.__assign)({},Wc(t,!0,!1,"lineWidth")),{path:r})}function cg(t){var e=(0,x.isArray)(t)?t:[t],n=e[0],r=e[e.length-1],i=e.length>1?e[1]:n,a=e.length>3?e[3]:r,o=e.length>2?e[2]:i;return{min:n,max:r,min1:i,max1:a,median:o}}function dg(t,e,n){var r,i=n/2;if((0,x.isArray)(e)){var a=cg(e),o=a.min,s=a.max,l=a.median,u=a.min1,c=a.max1,d=t-i,h=t+i;r=[[d,s],[h,s],[t,s],[t,c],[d,u],[d,c],[h,c],[h,u],[t,u],[t,o],[d,o],[h,o],[d,l],[h,l]]}else{e=(0,x.isNil)(e)?.5:e;var f=cg(t),p=(o=f.min,s=f.max,l=f.median,u=f.min1,c=f.max1,e-i),g=e+i;r=[[o,p],[o,g],[o,e],[u,e],[u,p],[u,g],[c,g],[c,p],[c,e],[s,e],[s,p],[s,g],[l,p],[l,g]]}return r.map((function(t){return{x:t[0],y:t[1]}}))}function hg(t){return[["M",t[0].x,t[0].y],["L",t[1].x,t[1].y],["M",t[2].x,t[2].y],["L",t[3].x,t[3].y],["M",t[4].x,t[4].y],["L",t[5].x,t[5].y],["L",t[6].x,t[6].y],["L",t[7].x,t[7].y],["L",t[4].x,t[4].y],["Z"],["M",t[8].x,t[8].y],["L",t[9].x,t[9].y],["M",t[10].x,t[10].y],["L",t[11].x,t[11].y],["M",t[12].x,t[12].y],["L",t[13].x,t[13].y]]}function fg(t){var e=(0,x.isArray)(t)?t:[t],n=e.sort((function(t,e){return e-t}));return ts(n,4,n[n.length-1])}function pg(t,e,n){var r=fg(e);return[{x:t,y:r[0]},{x:t,y:r[1]},{x:t-n/2,y:r[2]},{x:t-n/2,y:r[1]},{x:t+n/2,y:r[1]},{x:t+n/2,y:r[2]},{x:t,y:r[2]},{x:t,y:r[3]}]}function gg(t){return[["M",t[0].x,t[0].y],["L",t[1].x,t[1].y],["M",t[2].x,t[2].y],["L",t[3].x,t[3].y],["L",t[4].x,t[4].y],["L",t[5].x,t[5].y],["Z"],["M",t[6].x,t[6].y],["L",t[7].x,t[7].y]]}function mg(t,e){var n=Math.abs(t[0].x-t[2].x),r=Math.abs(t[0].y-t[2].y),i=Math.min(n,r);e&&(i=(0,x.clamp)(e,0,Math.min(n,r))),i/=2;var a=(t[0].x+t[2].x)/2,o=(t[0].y+t[2].y)/2;return{x:a-i,y:o-i,width:2*i,height:2*i}}(0,x.each)(["hv","vh","hvh","vhv"],(function(t){uc("line",t,{draw:function(e,n){var r=ug(e,t),i=n.addShape({type:"path",attrs:r,name:"line"});return i},getMarker:function(e){return Kc(e,t)}})})),(0,x.each)(Np,(function(t){uc("point",t,{draw:function(e,n){return zp(this,e,n,t,!0)},getMarker:function(e){var n=e.color;return{symbol:Tc[t],style:{r:4.5,stroke:n,fill:null}}}})})),uc("point","image",{draw:function(t,e){var n,r,i=Wc(t,!1,!1,"r").r,a=this.parsePoints(t.points),o=a[0];if(t.isStack)o=a[1];else if(a.length>1){var s=e.addGroup();try{for(var l=(0,b.__values)(a),u=l.next();!u.done;u=l.next()){var c=u.value;s.addShape("image",{attrs:{x:c.x-i/2,y:c.y-i,width:i,height:i,img:t.shape[1]}})}}catch(d){n={error:d}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return s}return e.addShape("image",{attrs:{x:o.x-i/2,y:o.y-i,width:i,height:i,img:t.shape[1]}})},getMarker:function(t){var e=t.color;return{symbol:"circle",style:{r:4.5,fill:e}}}}),(0,x.each)(Rp,(function(t){uc("point",t,{draw:function(e,n){return zp(this,e,n,t,!1)},getMarker:function(e){var n=e.color;return{symbol:Tc[t]||t,style:{r:4.5,fill:n}}}})})),uc("schema","box",{getPoints:function(t){var e=t.x,n=t.y,r=t.size;return dg(e,n,r)},draw:function(t,e){var n=Wc(t,!0,!1),r=this.parsePath(hg(t.points)),i=e.addShape("path",{attrs:(0,b.__assign)((0,b.__assign)({},n),{path:r,name:"schema"})});return i},getMarker:function(t){var e=t.color;return{symbol:function(t,e,n){var r=[e-6,e-3,e,e+3,e+6],i=dg(t,r,n);return[["M",i[0].x+1,i[0].y],["L",i[1].x-1,i[1].y],["M",i[2].x,i[2].y],["L",i[3].x,i[3].y],["M",i[4].x,i[4].y],["L",i[5].x,i[5].y],["L",i[6].x,i[6].y],["L",i[7].x,i[7].y],["L",i[4].x,i[4].y],["Z"],["M",i[8].x,i[8].y],["L",i[9].x,i[9].y],["M",i[10].x+1,i[10].y],["L",i[11].x-1,i[11].y],["M",i[12].x,i[12].y],["L",i[13].x,i[13].y]]},style:{r:6,lineWidth:1,stroke:e}}}}),uc("schema","candle",{getPoints:function(t){var e=t.x,n=t.y,r=t.size;return pg(e,n,r)},draw:function(t,e){var n=Wc(t,!0,!0),r=this.parsePath(gg(t.points)),i=e.addShape("path",{attrs:(0,b.__assign)((0,b.__assign)({},n),{path:r,name:"schema"})});return i},getMarker:function(t){var e=t.color;return{symbol:function(t,e,n){var r=[e+7.5,e+3,e-3,e-7.5],i=pg(t,r,n);return[["M",i[0].x,i[0].y],["L",i[1].x,i[1].y],["M",i[2].x,i[2].y],["L",i[3].x,i[3].y],["L",i[4].x,i[4].y],["L",i[5].x,i[5].y],["Z"],["M",i[6].x,i[6].y],["L",i[7].x,i[7].y]]},style:{lineWidth:1,stroke:e,fill:e,r:6}}}}),uc("polygon","square",{draw:function(t,e){if(!(0,x.isEmpty)(t.points)){var n=Wc(t,!0,!0),r=this.parsePoints(t.points);return e.addShape("rect",{attrs:(0,b.__assign)((0,b.__assign)({},n),mg(r,t.size)),name:"polygon"})}},getMarker:function(t){var e=t.color;return{symbol:"square",style:{r:4,fill:e}}}}),uc("violin","smooth",{draw:function(t,e){var n=Wc(t,!0,!0),r=this.parsePath(Gc(t.points));return e.addShape("path",{attrs:(0,b.__assign)((0,b.__assign)({},n),{path:r})})},getMarker:function(t){var e=t.color;return{symbol:"circle",style:{stroke:null,r:4,fill:e}}}}),uc("violin","hollow",{draw:function(t,e){var n=Wc(t,!0,!1),r=this.parsePath(Uc(t.points));return e.addShape("path",{attrs:(0,b.__assign)((0,b.__assign)({},n),{path:r})})},getMarker:function(t){var e=t.color;return{symbol:"circle",style:{r:4,fill:null,stroke:e}}}}),uc("violin","hollow-smooth",{draw:function(t,e){var n=Wc(t,!0,!1),r=this.parsePath(Gc(t.points));return e.addShape("path",{attrs:(0,b.__assign)((0,b.__assign)({},n),{path:r})})},getMarker:function(t){var e=t.color;return{symbol:"circle",style:{r:4,fill:null,stroke:e}}}});var vg=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getLabelValueDir=function(t){var e="y",n=t.points;return n[0][e]<=n[2][e]?1:-1},e.prototype.getLabelOffsetPoint=function(e,n,r,i){var a,o=t.prototype.getLabelOffsetPoint.call(this,e,n,r),s=this.getCoordinate(),l=s.isTransposed,u=l?"x":"y",c=this.getLabelValueDir(e.mappingData);return o=(0,b.__assign)((0,b.__assign)({},o),(a={},a[u]=o[u]*c,a)),s.isReflect("x")&&(o=(0,b.__assign)((0,b.__assign)({},o),{x:-1*o.x})),s.isReflect("y")&&(o=(0,b.__assign)((0,b.__assign)({},o),{y:-1*o.y})),o},e.prototype.getThemedLabelCfg=function(t){var e=this.geometry,n=this.getDefaultLabelCfg(),r=e.theme;return(0,x.deepMix)({},n,r.labels,"middle"===t.position?{offset:0}:{},t)},e.prototype.setLabelPosition=function(t,e,n,r){var i,a,o,s,l=this.getCoordinate(),u=l.isTransposed,c=e.points,d=l.convert(c[0]),h=l.convert(c[2]),f=this.getLabelValueDir(e),p=(0,x.isArray)(e.shape)?e.shape[0]:e.shape;if("funnel"===p||"pyramid"===p){var g=(0,x.get)(e,"nextPoints"),m=(0,x.get)(e,"points");if(g){var v=l.convert(m[0]),y=l.convert(m[1]),b=l.convert(g[0]),w=l.convert(g[1]);u?(i=Math.min(b.y,v.y),o=Math.max(b.y,v.y),a=(y.x+w.x)/2,s=(v.x+b.x)/2):(i=Math.min((y.y+w.y)/2,(v.y+b.y)/2),o=Math.max((y.y+w.y)/2,(v.y+b.y)/2),a=w.x,s=v.x)}else i=Math.min(h.y,d.y),o=Math.max(h.y,d.y),a=h.x,s=d.x}else i=Math.min(h.y,d.y),o=Math.max(h.y,d.y),a=h.x,s=d.x;switch(r){case"right":t.x=a,t.y=(i+o)/2,t.textAlign=(0,x.get)(t,"textAlign",f>0?"left":"right");break;case"left":t.x=s,t.y=(i+o)/2,t.textAlign=(0,x.get)(t,"textAlign",f>0?"left":"right");break;case"bottom":u&&(t.x=(a+s)/2),t.y=o,t.textAlign=(0,x.get)(t,"textAlign","center"),t.textBaseline=(0,x.get)(t,"textBaseline",f>0?"bottom":"top");break;case"middle":u&&(t.x=(a+s)/2),t.y=(i+o)/2,t.textAlign=(0,x.get)(t,"textAlign","center"),t.textBaseline=(0,x.get)(t,"textBaseline","middle");break;case"top":u&&(t.x=(a+s)/2),t.y=i,t.textAlign=(0,x.get)(t,"textAlign","center"),t.textBaseline=(0,x.get)(t,"textBaseline",f>0?"bottom":"top");break;default:break}},e}(Oc),yg=vg,bg=Math.PI/2,xg=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getLabelOffset=function(t){var e=this.getCoordinate(),n=0;if((0,x.isNumber)(t))n=t;else if((0,x.isString)(t)&&-1!==t.indexOf("%")){var r=e.getRadius();e.innerRadius>0&&(r*=1-e.innerRadius),n=.01*parseFloat(t)*r}return n},e.prototype.getLabelItems=function(e){var n=t.prototype.getLabelItems.call(this,e),r=this.geometry.getYScale();return(0,x.map)(n,(function(t){if(t&&r){var e=r.scale((0,x.get)(t.data,r.field));return(0,b.__assign)((0,b.__assign)({},t),{percent:e})}return t}))},e.prototype.getLabelAlign=function(t){var e,n=this.getCoordinate();if(t.labelEmit)e=t.angle<=Math.PI/2&&t.angle>=-Math.PI/2?"left":"right";else if(n.isTransposed){var r=n.getCenter(),i=t.offset;e=Math.abs(t.x-r.x)<1?"center":t.angle>Math.PI||t.angle<=0?i>0?"left":"right":i>0?"right":"left"}else e="center";return e},e.prototype.getLabelPoint=function(t,e,n){var r,i=1,a=t.content[n];this.isToMiddle(e)?r=this.getMiddlePoint(e.points):(1===t.content.length&&0===n?n=1:0===n&&(i=-1),r=this.getArcPoint(e,n));var o=t.offset*i,s=this.getPointAngle(r),l=t.labelEmit,u=this.getCirclePoint(s,o,r,l);return 0===u.r?u.content="":(u.content=a,u.angle=s,u.color=e.color),u.rotate=t.autoRotate?this.getLabelRotate(s,o,l):t.rotate,u.start={x:r.x,y:r.y},u},e.prototype.getArcPoint=function(t,e){return void 0===e&&(e=0),(0,x.isArray)(t.x)||(0,x.isArray)(t.y)?{x:(0,x.isArray)(t.x)?t.x[e]:t.x,y:(0,x.isArray)(t.y)?t.y[e]:t.y}:{x:t.x,y:t.y}},e.prototype.getPointAngle=function(t){return us(this.getCoordinate(),t)},e.prototype.getCirclePoint=function(t,e,n,r){var i=this.getCoordinate(),a=i.getCenter(),o=ss(i,n);if(0===o)return(0,b.__assign)((0,b.__assign)({},a),{r:o});var s=t;if(i.isTransposed&&o>e&&!r){var l=Math.asin(e/(2*o));s=t+2*l}else o+=e;return{x:a.x+o*Math.cos(s),y:a.y+o*Math.sin(s),r:o}},e.prototype.getLabelRotate=function(t,e,n){var r=t+bg;return n&&(r-=bg),r&&(r>bg?r-=Math.PI:r<-bg&&(r+=Math.PI)),r},e.prototype.getMiddlePoint=function(t){var e=this.getCoordinate(),n=t.length,r={x:0,y:0};return(0,x.each)(t,(function(t){r.x+=t.x,r.y+=t.y})),r.x/=n,r.y/=n,r=e.convert(r),r},e.prototype.isToMiddle=function(t){return t.x.length>2},e}(Oc),wg=xg,_g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.defaultLayout="distribute",e}return(0,b.__extends)(e,t),e.prototype.getDefaultLabelCfg=function(e,n){var r=t.prototype.getDefaultLabelCfg.call(this,e,n);return(0,x.deepMix)({},r,(0,x.get)(this.geometry.theme,"pieLabels",{}))},e.prototype.getLabelOffset=function(e){return t.prototype.getLabelOffset.call(this,e)||0},e.prototype.getLabelRotate=function(t,e,n){var r;return e<0&&(r=t,r>Math.PI/2&&(r-=Math.PI),r<-Math.PI/2&&(r+=Math.PI)),r},e.prototype.getLabelAlign=function(t){var e,n=this.getCoordinate(),r=n.getCenter();return e=t.angle<=Math.PI/2&&t.x>=r.x?"left":"right",t.offset<=0&&(e="right"===e?"left":"right"),e},e.prototype.getArcPoint=function(t){return t},e.prototype.getPointAngle=function(t){var e,n=this.getCoordinate(),r={x:(0,x.isArray)(t.x)?t.x[0]:t.x,y:t.y[0]},i={x:(0,x.isArray)(t.x)?t.x[1]:t.x,y:t.y[1]},a=us(n,r);if(t.points&&t.points[0].y===t.points[1].y)e=a;else{var o=us(n,i);a>=o&&(o+=2*Math.PI),e=a+(o-a)/2}return e},e.prototype.getCirclePoint=function(t,e){var n=this.getCoordinate(),r=n.getCenter(),i=n.getRadius()+e;return(0,b.__assign)((0,b.__assign)({},Wo(r.x,r.y,i,t)),{angle:t,r:i})},e}(wg),Cg=_g,Sg=4;function Ag(t,e,n,r,i,a){var o,s,l,u=!0,c=r.start,d=r.end,h=Math.min(c.y,d.y),f=Math.abs(c.y-d.y),p=0,g=Number.MIN_VALUE,m=e.map((function(t){return t.y>p&&(p=t.y),t.yf&&(f=p-h);while(u){m.forEach((function(t){var e=(Math.min.apply(g,t.targets)+Math.max.apply(g,t.targets))/2;t.pos=Math.min(Math.max(g,e-t.size/2),f-t.size)})),u=!1,l=m.length;while(l--)if(l>0){var v=m[l-1],y=m[l];v.pos+v.size>y.pos&&(v.size+=y.size,v.targets=v.targets.concat(y.targets),v.pos+v.size>f&&(v.pos=f-v.size),m.splice(l,1),u=!0)}}l=0,m.forEach((function(t){var r=h+n/2;t.targets.forEach((function(){e[l].y=t.pos+r,r+=n,l++}))}));var w={};try{for(var _=(0,b.__values)(t),C=_.next();!C.done;C=_.next()){var S=C.value;w[S.get("id")]=S}}catch(A){o={error:A}}finally{try{C&&!C.done&&(s=_.return)&&s.call(_)}finally{if(o)throw o.error}}e.forEach((function(t){var e=t.r*t.r,n=Math.pow(Math.abs(t.y-i.y),2);if(e0){var l=14,u=o+i,c=2*u+2*l,d={start:a.start,end:a.end},h=[[],[]];t.forEach((function(t){t&&("right"===t.textAlign?h[0].push(t):h[1].push(t))})),h.forEach((function(t,n){var r=c/l;t.length>r&&(t.sort((function(t,e){return e["..percent"]-t["..percent"]})),t.splice(r,t.length-r)),t.sort((function(t,e){return t.y-e.y})),Ag(e,t,l,d,s,n)}))}(0,x.each)(t,(function(t){if(t&&t.labelLine){var e=t.offset,n=t.angle,r=Wo(s.x,s.y,o,n),i=Wo(s.x,s.y,o+e/2,n),a=t.x+(0,x.get)(t,"offsetX",0),l=t.y+(0,x.get)(t,"offsetY",0),u={x:a-Math.cos(n)*Sg,y:l-Math.sin(n)*Sg};(0,x.isObject)(t.labelLine)||(t.labelLine={}),t.labelLine.path=["M ".concat(r.x),"".concat(r.y," Q").concat(i.x),"".concat(i.y," ").concat(u.x),u.y].join(",")}}))}}function Eg(t,e,n){var r=t.filter((function(t){return!t.invisible}));r.sort((function(t,e){return t.y-e.y}));var i,a=!0,o=n.minY,s=n.maxY,l=Math.abs(o-s),u=0,c=Number.MIN_VALUE,d=r.map((function(t){return t.y>u&&(u=t.y),t.yl&&(l=u-o);while(a){d.forEach((function(t){var e=(Math.min.apply(c,t.targets)+Math.max.apply(c,t.targets))/2;t.pos=Math.min(Math.max(c,e-t.size/2),l-t.size),t.pos=Math.max(0,t.pos)})),a=!1,i=d.length;while(i--)if(i>0){var h=d[i-1],f=d[i];h.pos+h.size>f.pos&&(h.size+=f.size,h.targets=h.targets.concat(f.targets),h.pos+h.size>l&&(h.pos=l-h.size),d.splice(i,1),a=!0)}}i=0,d.forEach((function(t){var n=o+e/2;t.targets.forEach((function(){r[i].y=t.pos+n,n+=e,i++}))}))}var Dg=4;function Fg(t,e){var n=e.getCenter(),r=e.getRadius();if(t&&t.labelLine){var i=t.angle,a=t.offset,o=Wo(n.x,n.y,r,i),s=t.x+(0,x.get)(t,"offsetX",0)*(Math.cos(i)>0?1:-1),l=t.y+(0,x.get)(t,"offsetY",0)*(Math.sin(i)>0?1:-1),u={x:s-Math.cos(i)*Dg,y:l-Math.sin(i)*Dg},c=t.labelLine.smooth,d=[],h=u.x-n.x,f=u.y-n.y,p=Math.atan(f/h);if(h<0&&(p+=Math.PI),!1===c){(0,x.isObject)(t.labelLine)||(t.labelLine={});var g=0;(i<0&&i>-Math.PI/2||i>1.5*Math.PI)&&u.y>o.y&&(g=1),i>=0&&io.y&&(g=1),i>=Math.PI/2&&iu.y&&(g=1),(i<-Math.PI/2||i>=Math.PI&&i<1.5*Math.PI)&&o.y>u.y&&(g=1);var m=a/2>4?4:Math.max(a/2-1,0),v=Wo(n.x,n.y,r+m,i),y=Wo(n.x,n.y,r+a/2,p),b=0;d.push("M ".concat(o.x," ").concat(o.y)),d.push("L ".concat(v.x," ").concat(v.y)),d.push("A ".concat(n.x," ").concat(n.y," 0 ").concat(b," ").concat(g," ").concat(y.x," ").concat(y.y)),d.push("L ".concat(u.x," ").concat(u.y))}else{v=Wo(n.x,n.y,r+(a/2>4?4:Math.max(a/2-1,0)),i);var w=o.xMath.pow(Math.E,-16)&&d.push.apply(d,["C",u.x+4*w,u.y,2*v.x-o.x,2*v.y-o.y,o.x,o.y]),d.push("L ".concat(o.x," ").concat(o.y))}t.labelLine.path=d.join(" ")}}function Mg(t,e,n,r){var i,a,o=(0,x.filter)(t,(function(t){return!(0,x.isNil)(t)})),s=e[0]&&e[0].get("coordinate");if(s){var l=s.getCenter(),u=s.getRadius(),c={};try{for(var d=(0,b.__values)(e),h=d.next();!h.done;h=d.next()){var f=h.value;c[f.get("id")]=f}}catch(k){i={error:k}}finally{try{h&&!h.done&&(a=d.return)&&a.call(d)}finally{if(i)throw i.error}}var p=(0,x.get)(o[0],"labelHeight",14),g=(0,x.get)(o[0],"offset",0);if(!(g<=0)){var m="left",v="right",y=(0,x.groupBy)(o,(function(t){return t.xn&&(t.sort((function(t,e){return e.percent-t.percent})),(0,x.each)(t,(function(t,e){e+1>n&&(c[t.id].set("visible",!1),t.invisible=!0)}))),Eg(t,p,A)})),(0,x.each)(y,(function(t,e){(0,x.each)(t,(function(t){var n=e===v,r=c[t.id],i=r.getChildByIndex(0);if(i){var a=u+g,o=t.y-l.y,d=Math.pow(a,2),h=Math.pow(o,2),f=d-h>0?d-h:0,p=Math.sqrt(f),m=Math.abs(Math.cos(t.angle)*a);t.x=n?l.x+Math.max(p,m):l.x-Math.max(p,m)}i&&(i.attr("y",t.y),i.attr("x",t.x)),Fg(t,s)}))}))}}}var Og=4,Bg=4,Tg=4;function Pg(t,e,n){var r=e.getCenter(),i=e.getRadius(),a={x:t.x-(n?Tg:-Tg),y:t.y},o=Wo(r.x,r.y,i+Og,t.angle),s={x:a.x,y:a.y},l={x:o.x,y:o.y},u=Wo(r.x,r.y,i,t.angle),c="";if(a.y!==o.y){var d=n?4:-4;s.y=a.y,t.angle<0&&t.angle>=-Math.PI/2&&(s.x=Math.max(o.x,a.x-d),a.y0&&t.angleo.y?l.y=s.y:(l.y=o.y,l.x=Math.max(l.x,s.x-d))),t.angle>Math.PI/2&&(s.x=Math.min(o.x,a.x-d),a.y>o.y?l.y=s.y:(l.y=o.y,l.x=Math.min(l.x,s.x-d))),t.angle<-Math.PI/2&&(s.x=Math.min(o.x,a.x-d),a.ys.x||t.x===s.x&&t.y>s.y,r=(0,x.isNil)(t.offsetX)?Bg:t.offsetX,i=Wo(s.x,s.y,l+Og,t.angle),a=p+r;t.x=s.x+(n?1:-1)*(l+a),t.y=i.y}}}));var g=o.start,m=o.end,v="left",y="right",w=(0,x.groupBy)(t,(function(t){return t.x_&&(_=Math.min(e,Math.abs(g.y-m.y)))}));var C={minX:g.x,maxX:m.x,minY:s.y-_/2,maxY:s.y+_/2};(0,x.each)(w,(function(t,e){var n=_/f;t.length>n&&(t.sort((function(t,e){return e.percent-t.percent})),(0,x.each)(t,(function(t,e){e>n&&(u[t.id].set("visible",!1),t.invisible=!0)}))),Eg(t,f,C)}));var S=C.minY,A=C.maxY;(0,x.each)(w,(function(t,e){var n=e===y;(0,x.each)(t,(function(t){var e=(0,x.get)(u,t&&[t.id]);if(e)if(t.yA)e.set("visible",!1);else{var r=e.getChildByIndex(0),i=r.getCanvasBBox(),a={x:n?i.x:i.maxX,y:i.y+i.height/2};yc(r,t.x-a.x,t.y-a.y),t.labelLine&&Pg(t,o,n)}}))}))}}function Lg(t,e,n,r){(0,x.each)(e,(function(t){var e=r.minX,n=r.minY,i=r.maxX,a=r.maxY,o=t.getCanvasBBox(),s=o.minX,l=o.minY,u=o.maxX,c=o.maxY,d=o.x,h=o.y,f=o.width,p=o.height,g=d,m=h;(si?g=i-f:u>i&&(g-=u-i),l>a?m=a-p:c>a&&(m-=c-a),g===d&&m===h||yc(t,g-d,m-h)}))}function Rg(t,e,n,r){(0,x.each)(e,(function(t,e){var r=t.getCanvasBBox(),i=n[e].getBBox();(r.minXi.maxX||r.maxY>i.maxY)&&t.remove(!0)}))}var Ng=100,zg=function(){function t(t){void 0===t&&(t={}),this.bitmap={};var e=t.xGap,n=void 0===e?1:e,r=t.yGap,i=void 0===r?8:r;this.xGap=n,this.yGap=i}return t.prototype.hasGap=function(t){for(var e=!0,n=this.bitmap,r=Math.round(t.minX),i=Math.round(t.maxX),a=Math.round(t.minY),o=Math.round(t.maxY),s=r;s<=i;s+=1)if(n[s]){if(s===r||s===i){for(var l=a;l<=o;l++)if(n[s][l]){e=!1;break}}else if(n[s][a]||n[s][o]){e=!1;break}}else n[s]={};return e},t.prototype.fillGap=function(t){for(var e=this.bitmap,n=Math.round(t.minX),r=Math.round(t.maxX),i=Math.round(t.minY),a=Math.round(t.maxY),o=n;o<=r;o+=1)e[o]||(e[o]={});for(o=n;o<=r;o+=this.xGap){for(var s=i;s<=a;s+=this.yGap)e[o][s]=!0;e[o][a]=!0}if(1!==this.yGap)for(o=i;o<=a;o+=1)e[n][o]=!0,e[r][o]=!0;if(1!==this.xGap)for(o=n;o<=r;o+=1)e[o][i]=!0,e[o][a]=!0},t.prototype.destroy=function(){this.bitmap={}},t}();function jg(t,e,n){void 0===n&&(n=Ng);var r,i=-1,a=t.attr(),o=a.x,s=a.y,l=t.getCanvasBBox(),u=Math.sqrt(l.width*l.width+l.height*l.height),c=-i,d=0,h=0,f=function(t){var e=.1*t;return[e*Math.cos(e),e*Math.sin(e)]};if(e.hasGap(l))return e.fillGap(l),!0;var p=!1,g=0,m={};while(Math.min(Math.abs(d),Math.abs(h))4)return[];var e=function(t,e){return[e.x-t.x,e.y-t.y]},n=e(t[0],t[1]),r=e(t[1],t[2]);return[n,r]}function Gg(t,e,n){void 0===e&&(e=0),void 0===n&&(n={x:0,y:0});var r=t.x,i=t.y;return{x:(r-n.x)*Math.cos(-e)+(i-n.y)*Math.sin(-e)+n.x,y:(n.x-r)*Math.sin(-e)+(i-n.y)*Math.cos(-e)+n.y}}function Wg(t){var e=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],n=t.rotation;return n?[Gg(e[0],n,e[0]),Gg(e[1],n,e[0]),Gg(e[2],n,e[0]),Gg(e[3],n,e[0])]:e}function Zg(t,e){if(t.length>4)return{min:0,max:0};var n=[];return t.forEach((function(t){n.push(Hg([t.x,t.y],e))})),{min:Math.min.apply(Math,(0,b.__spreadArray)([],(0,b.__read)(n),!1)),max:Math.max.apply(Math,(0,b.__spreadArray)([],(0,b.__read)(n),!1))}}function Xg(t,e){return t.max>e.min&&t.mint.x+t.width+n||e.x+e.widtht.y+t.height+n||e.y+e.height4)return[];var e=function(t,e){return[e.x-t.x,e.y-t.y]},n=e(t[0],t[1]),r=e(t[1],t[2]);return[n,r]}function n(t,e,n){void 0===e&&(e=0),void 0===n&&(n={x:0,y:0});var r=t.x,i=t.y;return{x:(r-n.x)*Math.cos(-e)+(i-n.y)*Math.sin(-e)+n.x,y:(n.x-r)*Math.sin(-e)+(i-n.y)*Math.cos(-e)+n.y}}function r(t){var e=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],r=t.rotation;return r?[n(e[0],r,e[0]),n(e[1],r,e[0]),n(e[2],r,e[0]),n(e[3],r,e[0])]:e}function i(e,n){if(e.length>4)return{min:0,max:0};var r=[];return e.forEach((function(e){r.push(t([e.x,e.y],n))})),{min:Math.min.apply(null,r),max:Math.max.apply(null,r)}}function a(t,e){return t.max>e.min&&t.mint.x+t.width+n||e.x+e.widtht.y+t.height+n||e.y+e.height=a.height:o.width>=a.width}function hm(t,e,n){var r=!!t.getAdjust("stack");return r||e.every((function(e,r){var i=n[r];return dm(t,e,i)}))}function fm(t,e,n){var r=t.coordinate,i=rs.fromObject(n.getBBox()),a=_c(e);r.isTransposed?a.attr({x:i.minX+i.width/2,textAlign:"center"}):a.attr({y:i.minY+i.height/2,textBaseline:"middle"})}function pm(t,e,n){var r;if(0!==n.length){var i=null===(r=n[0])||void 0===r?void 0:r.get("element"),a=null===i||void 0===i?void 0:i.geometry;if(a&&"interval"===a.type){var o=hm(a,e,n);o&&n.forEach((function(t,n){var r=e[n];fm(a,r,t)}))}}}function gm(t){var e=500,n=[],r=Math.max(Math.floor(t.length/e),1);return(0,x.each)(t,(function(t,e){e%r===0?n.push(t):t.set("visible",!1)})),n}function mm(t,e,n){var r;if(0!==n.length){var i=null===(r=n[0])||void 0===r?void 0:r.get("element"),a=null===i||void 0===i?void 0:i.geometry;if(a&&"interval"===a.type){var o,s=gm(e),l=(0,b.__read)(a.getXYFields(),1),u=l[0],c=[],d=[],h=(0,x.groupBy)(s,(function(t){return t.get("data")[u]})),f=(0,x.uniq)((0,x.map)(s,(function(t){return t.get("data")[u]})));s.forEach((function(t){t.set("visible",!0)}));var p=function(t){t&&(t.length&&d.push(t.pop()),d.push.apply(d,(0,b.__spreadArray)([],(0,b.__read)(t),!1)))};(0,x.size)(f)>0&&(o=f.shift(),p(h[o])),(0,x.size)(f)>0&&(o=f.pop(),p(h[o])),(0,x.each)(f.reverse(),(function(t){p(h[t])}));while(d.length>0){var g=d.shift();g.get("visible")&&(Ac(g,c)?g.set("visible",!1):c.push(g))}}}}function vm(t,e){var n=t.getXYFields()[1],r=[],i=e.sort((function(t,e){return t.get("data")[n]-t.get("data")[n]}));return i.length>0&&r.push(i.shift()),i.length>0&&r.push(i.pop()),r.push.apply(r,(0,b.__spreadArray)([],(0,b.__read)(i),!1)),r}function ym(t,e,n){return t.some((function(t){return n(t,e)}))}function bm(t,e,n){void 0===n&&(n=0);var r=Math.max(0,Math.min(t.x+t.width+n,e.x+e.width+n)-Math.max(t.x-n,e.x-n)),i=Math.max(0,Math.min(t.y+t.height+n,e.y+e.height+n)-Math.max(t.y-n,e.y-n));return r*i}function xm(t,e){return ym(t,e,(function(t,e){var n=_c(t),r=_c(e);return bm(n.getCanvasBBox(),r.getCanvasBBox(),2)>0}))}function wm(t,e,n,r,i){var a,o;if(0!==n.length){var s=null===(a=n[0])||void 0===a?void 0:a.get("element"),l=null===s||void 0===s?void 0:s.geometry;if(l&&"point"===l.type){var u=(0,b.__read)(l.getXYFields(),2),c=u[0],d=u[1],h=(0,x.groupBy)(e,(function(t){return t.get("data")[c]})),f=[],p=i&&i.offset||(null===(o=t[0])||void 0===o?void 0:o.offset)||12;(0,x.map)((0,x.keys)(h).reverse(),(function(t){var e=vm(l,h[t]);while(e.length){var n=e.shift(),r=_c(n);if(ym(f,n,(function(t,e){return t.get("data")[c]===e.get("data")[c]&&t.get("data")[d]===e.get("data")[d]})))r.set("visible",!1);else{var i=xm(f,n),a=!1;i&&(r.attr("y",r.attr("y")+2*p),a=xm(f,n)),a?r.set("visible",!1):f.push(n)}}}))}}}function _m(t,e){var n=t.getXYFields()[1],r=[],i=e.sort((function(t,e){return t.get("data")[n]-t.get("data")[n]}));return i.length>0&&r.push(i.shift()),i.length>0&&r.push(i.pop()),r.push.apply(r,(0,b.__spreadArray)([],(0,b.__read)(i),!1)),r}function Cm(t,e,n){return t.some((function(t){return n(t,e)}))}function Sm(t,e,n){void 0===n&&(n=0);var r=Math.max(0,Math.min(t.x+t.width+n,e.x+e.width+n)-Math.max(t.x-n,e.x-n)),i=Math.max(0,Math.min(t.y+t.height+n,e.y+e.height+n)-Math.max(t.y-n,e.y-n));return r*i}function Am(t,e){return Cm(t,e,(function(t,e){var n=_c(t),r=_c(e);return Sm(n.getCanvasBBox(),r.getCanvasBBox(),2)>0}))}function km(t,e,n,r,i){var a,o;if(0!==n.length){var s=null===(a=n[0])||void 0===a?void 0:a.get("element"),l=null===s||void 0===s?void 0:s.geometry;if(l&&!(["path","line","area"].indexOf(l.type)<0)){var u=(0,b.__read)(l.getXYFields(),2),c=u[0],d=u[1],h=(0,x.groupBy)(e,(function(t){return t.get("data")[c]})),f=[],p=i&&i.offset||(null===(o=t[0])||void 0===o?void 0:o.offset)||12;(0,x.map)((0,x.keys)(h).reverse(),(function(t){var e=_m(l,h[t]);while(e.length){var n=e.shift(),r=_c(n);if(Cm(f,n,(function(t,e){return t.get("data")[c]===e.get("data")[c]&&t.get("data")[d]===e.get("data")[d]})))r.set("visible",!1);else{var i=Am(f,n),a=!1;i&&(r.attr("y",r.attr("y")+2*p),a=Am(f,n)),a?r.set("visible",!1):f.push(n)}}}))}}}function Em(){return sm||(sm=document.createElement("canvas").getContext("2d")),sm}var Dm=(0,x.memoize)((function(t,e){void 0===e&&(e={});var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,o=e.fontVariant,s=Em();return s.font=[a,o,i,"".concat(n,"px"),r].join(" "),s.measureText((0,x.isString)(t)?t:"").width}),(function(t,e){return void 0===e&&(e={}),(0,b.__spreadArray)([t],(0,b.__read)((0,x.values)(e)),!1).join("")})),Fm=function(t,e,n){var r,i=16,a=Dm("...",n);r=(0,x.isString)(t)?t:(0,x.toString)(t);var o,s,l=e,u=[];if(Dm(t,n)<=e)return t;while(1){if(o=r.substr(0,i),s=Dm(o,n),s+a>l&&s>l)break;if(u.push(o),l-=s,r=r.substr(i),!r)return u.join("")}while(1){if(o=r.substr(0,1),s=Dm(o,n),s+a>l)break;if(u.push(o),l-=s,r=r.substr(1),!r)return u.join("")}return"".concat(u.join(""),"...")};function Mm(t,e,n,r,i){if(!(e.length<=0)){var a=(null===i||void 0===i?void 0:i.direction)||["top","right","bottom","left"],o=(null===i||void 0===i?void 0:i.action)||"translate",s=(null===i||void 0===i?void 0:i.margin)||0,l=e[0].get("coordinate");if(l){var u=ds(l,s),c=u.minX,d=u.minY,h=u.maxX,f=u.maxY;(0,x.each)(e,(function(t){var e=t.getCanvasBBox(),n=e.minX,r=e.minY,i=e.maxX,s=e.maxY,l=e.x,u=e.y,p=e.width,g=e.height,m=l,v=u;if(a.indexOf("left")>=0&&(n=0&&(r=0&&(n>h?m=h-p:i>h&&(m-=i-h)),a.indexOf("bottom")>=0&&(r>f?v=f-g:s>f&&(v-=s-f)),m!==l||v!==u){var y=m-l;if("translate"===o)yc(t,y,v-u);else if("ellipsis"===o){var b=t.findAll((function(t){return"text"===t.get("type")}));b.forEach((function(t){var e=(0,x.pick)(t.attr(),["fontSize","fontFamily","fontWeight","fontStyle","fontVariant"]),n=t.getCanvasBBox(),r=Fm(t.attr("text"),n.width-Math.abs(y),e);t.attr("text",r)}))}else t.hide()}}))}}}function Om(t,e,n){var r={fillOpacity:(0,x.isNil)(t.attr("fillOpacity"))?1:t.attr("fillOpacity"),strokeOpacity:(0,x.isNil)(t.attr("strokeOpacity"))?1:t.attr("strokeOpacity"),opacity:(0,x.isNil)(t.attr("opacity"))?1:t.attr("opacity")};t.attr({fillOpacity:0,strokeOpacity:0,opacity:0}),t.animate(r,e)}function Bm(t,e,n){var r={fillOpacity:0,strokeOpacity:0,opacity:0},i=e.easing,a=e.duration,o=e.delay;t.animate(r,a,i,(function(){t.remove(!0)}),o)}function Tm(t,e,n){var r,i=(0,b.__read)(e,2),a=i[0],o=i[1];return t.applyToMatrix([a,o,1]),"x"===n?(t.setMatrix(dr.transform(t.getMatrix(),[["t",-a,-o],["s",.01,1],["t",a,o]])),r=dr.transform(t.getMatrix(),[["t",-a,-o],["s",100,1],["t",a,o]])):"y"===n?(t.setMatrix(dr.transform(t.getMatrix(),[["t",-a,-o],["s",1,.01],["t",a,o]])),r=dr.transform(t.getMatrix(),[["t",-a,-o],["s",1,100],["t",a,o]])):"xy"===n&&(t.setMatrix(dr.transform(t.getMatrix(),[["t",-a,-o],["s",.01,.01],["t",a,o]])),r=dr.transform(t.getMatrix(),[["t",-a,-o],["s",100,100],["t",a,o]])),r}function Pm(t,e,n,r,i){var a,o,s=n.start,l=n.end,u=n.getWidth(),c=n.getHeight();"y"===i?(a=s.x+u/2,o=r.ys.x?r.x:s.x,o=s.y+c/2):"xy"===i&&(n.isPolar?(a=n.getCenter().x,o=n.getCenter().y):(a=(s.x+l.x)/2,o=(s.y+l.y)/2));var d=Tm(t,[a,o],i);t.animate({matrix:d},e)}function Im(t,e,n){var r=n.coordinate,i=n.minYPoint;Pm(t,e,r,i,"x")}function Lm(t,e,n){var r=n.coordinate,i=n.minYPoint;Pm(t,e,r,i,"y")}function Rm(t,e,n){var r=n.coordinate,i=n.minYPoint;Pm(t,e,r,i,"xy")}function Nm(t,e,n){var r=t.getTotalLength();t.attr("lineDash",[r]),t.animate((function(t){return{lineDashOffset:(1-t)*r}}),e)}function zm(t,e,n){var r=n.toAttrs,i=r.x,a=r.y;delete r.x,delete r.y,t.attr(r),t.animate({x:i,y:a},e)}function jm(t,e,n){var r=t.getBBox(),i=t.get("origin").mappingData,a=i.points,o=a[0].y-a[1].y>0?r.maxX:r.minX,s=(r.minY+r.maxY)/2;t.applyToMatrix([o,s,1]);var l=dr.transform(t.getMatrix(),[["t",-o,-s],["s",.01,1],["t",o,s]]);t.setMatrix(l),t.animate({matrix:dr.transform(t.getMatrix(),[["t",-o,-s],["s",100,1],["t",o,s]])},e)}function $m(t,e,n){var r=t.getBBox(),i=t.get("origin").mappingData,a=(r.minX+r.maxX)/2,o=i.points,s=o[0].y-o[1].y<=0?r.maxY:r.minY;t.applyToMatrix([a,s,1]);var l=dr.transform(t.getMatrix(),[["t",-a,-s],["s",1,.01],["t",a,s]]);t.setMatrix(l),t.animate({matrix:dr.transform(t.getMatrix(),[["t",-a,-s],["s",1,100],["t",a,s]])},e)}function Vm(t,e){var n,r=Fd(t,e),i=r.startAngle,a=r.endAngle;return!(0,x.isNumberEqual)(i,.5*-Math.PI)&&i<.5*-Math.PI&&(i+=2*Math.PI),!(0,x.isNumberEqual)(a,.5*-Math.PI)&&a<.5*-Math.PI&&(a+=2*Math.PI),0===e[5]&&(n=(0,b.__read)([a,i],2),i=n[0],a=n[1]),(0,x.isNumberEqual)(i,1.5*Math.PI)&&(i=-.5*Math.PI),(0,x.isNumberEqual)(a,-.5*Math.PI)&&(a=1.5*Math.PI),{startAngle:i,endAngle:a}}function qm(t){var e;return"M"===t[0]||"L"===t[0]?e=[t[1],t[2]]:"a"!==t[0]&&"A"!==t[0]&&"C"!==t[0]||(e=[t[t.length-2],t[t.length-1]]),e}function Hm(t){var e,n,r,i=t.filter((function(t){return"A"===t[0]||"a"===t[0]}));if(0===i.length)return{startAngle:0,endAngle:0,radius:0,innerRadius:0};var a=i[0],o=i.length>1?i[1]:i[0],s=t.indexOf(a),l=t.indexOf(o),u=qm(t[s-1]),c=qm(t[l-1]),d=Vm(u,a),h=d.startAngle,f=d.endAngle,p=Vm(c,o),g=p.startAngle,m=p.endAngle;(0,x.isNumberEqual)(h,g)&&(0,x.isNumberEqual)(f,m)?(n=h,r=f):(n=Math.min(h,g),r=Math.max(f,m));var v=a[1],y=i[i.length-1][1];return v=0;s--){var l=this.getFacetsByLevel(t,s);try{for(var u=(e=void 0,(0,b.__values)(l)),c=u.next();!c.done;c=u.next()){var d=c.value;this.isLeaf(d)||(d.originColIndex=d.columnIndex,d.columnIndex=this.getRegionIndex(d.children),d.columnValuesLength=i.length)}}catch(h){e={error:h}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(e)throw e.error}}}},e.prototype.getFacetsByLevel=function(t,e){var n=[];return t.forEach((function(t){t.rowIndex===e&&n.push(t)})),n},e.prototype.getRegionIndex=function(t){var e=t[0],n=t[t.length-1];return(n.columnIndex-e.columnIndex)/2+e.columnIndex},e.prototype.isLeaf=function(t){return!t.children||!t.children.length},e.prototype.getRows=function(){return this.cfg.fields.length+1},e.prototype.getChildFacets=function(t,e,n){var r=this,i=this.cfg.fields,a=i.length;if(!(a=n){var i=r.parsePosition([t[s],t[o.field]]);i&&d.push(i)}if(t[s]===c)return!1})),d},e.prototype.parsePercentPosition=function(t){var e=parseFloat(t[0])/100,n=parseFloat(t[1])/100,r=this.view.getCoordinate(),i=r.start,a=r.end,o={x:Math.min(i.x,a.x),y:Math.min(i.y,a.y)},s=r.getWidth()*e+o.x,l=r.getHeight()*n+o.y;return{x:s,y:l}},e.prototype.getCoordinateBBox=function(){var t=this.view.getCoordinate(),e=t.start,n=t.end,r=t.getWidth(),i=t.getHeight(),a={x:Math.min(e.x,n.x),y:Math.min(e.y,n.y)};return{x:a.x,y:a.y,minX:a.x,minY:a.y,maxX:a.x+r,maxY:a.y+i,width:r,height:i}},e.prototype.getAnnotationCfg=function(t,e,n){var r=this,i=this.view.getCoordinate(),a=this.view.getCanvas(),o={};if((0,x.isNil)(e))return null;var s=e.start,l=e.end,u=e.position,c=this.parsePosition(s),d=this.parsePosition(l),h=this.parsePosition(u);if(!(!["arc","image","line","region","regionFilter"].includes(t)||c&&d))return null;if(["text","dataMarker","html"].includes(t)&&!h)return null;if("arc"===t){var f=e,p=(f.start,f.end,(0,b.__rest)(f,["start","end"])),g=us(i,c),m=us(i,d);g>m&&(m=2*Math.PI+m),o=(0,b.__assign)((0,b.__assign)({},p),{center:i.getCenter(),radius:ss(i,c),startAngle:g,endAngle:m})}else if("image"===t){var v=e;v.start,v.end,p=(0,b.__rest)(v,["start","end"]);o=(0,b.__assign)((0,b.__assign)({},p),{start:c,end:d,src:e.src})}else if("line"===t){var y=e;y.start,y.end,p=(0,b.__rest)(y,["start","end"]);o=(0,b.__assign)((0,b.__assign)({},p),{start:c,end:d,text:(0,x.get)(e,"text",null)})}else if("region"===t){var w=e;w.start,w.end,p=(0,b.__rest)(w,["start","end"]);o=(0,b.__assign)((0,b.__assign)({},p),{start:c,end:d})}else if("text"===t){var _=this.view.getData(),C=e,S=(C.position,C.content),A=(p=(0,b.__rest)(C,["position","content"]),S);(0,x.isFunction)(S)&&(A=S(_)),o=(0,b.__assign)((0,b.__assign)((0,b.__assign)({},h),p),{content:A})}else if("dataMarker"===t){var k=e,E=(k.position,k.point),D=k.line,F=k.text,M=k.autoAdjust,O=k.direction;p=(0,b.__rest)(k,["position","point","line","text","autoAdjust","direction"]);o=(0,b.__assign)((0,b.__assign)((0,b.__assign)({},p),h),{coordinateBBox:this.getCoordinateBBox(),point:E,line:D,text:F,autoAdjust:M,direction:O})}else if("dataRegion"===t){var B=e,T=B.start,P=B.end,I=B.region,L=(F=B.text,B.lineLength);p=(0,b.__rest)(B,["start","end","region","text","lineLength"]);o=(0,b.__assign)((0,b.__assign)({},p),{points:this.getRegionPoints(T,P),region:I,text:F,lineLength:L})}else if("regionFilter"===t){var R=e,N=(R.start,R.end,R.apply),z=R.color,j=(p=(0,b.__rest)(R,["start","end","apply","color"]),this.view.geometries),$=[],V=function(t){t&&(t.isGroup()?t.getChildren().forEach((function(t){return V(t)})):$.push(t))};(0,x.each)(j,(function(t){N?(0,x.contains)(N,t.type)&&(0,x.each)(t.elements,(function(t){V(t.shape)})):(0,x.each)(t.elements,(function(t){V(t.shape)}))})),o=(0,b.__assign)((0,b.__assign)({},p),{color:z,shapes:$,start:c,end:d})}else if("shape"===t){var q=e,H=q.render,U=(0,b.__rest)(q,["render"]),G=function(t){if((0,x.isFunction)(e.render))return H(t,r.view,{parsePosition:r.parsePosition.bind(r)})};o=(0,b.__assign)((0,b.__assign)({},U),{render:G})}else if("html"===t){var W=e,Z=W.html,X=(W.position,U=(0,b.__rest)(W,["html","position"]),function(t){return(0,x.isFunction)(Z)?Z(t,r.view):Z});o=(0,b.__assign)((0,b.__assign)((0,b.__assign)({},U),h),{parent:a.get("el").parentNode,html:X})}var Y=(0,x.deepMix)({},n,(0,b.__assign)((0,b.__assign)({},o),{top:e.top,style:e.style,offsetX:e.offsetX,offsetY:e.offsetY}));return"html"!==t&&(Y.container=this.getComponentContainer(Y)),Y.animate=this.view.getOptions().animate&&Y.animate&&(0,x.get)(e,"animate",Y.animate),Y.animateOption=(0,x.deepMix)({},qu,Y.animateOption,e.animateOption),Y},e.prototype.isTop=function(t){return(0,x.get)(t,"top",!0)},e.prototype.getComponentContainer=function(t){return this.isTop(t)?this.foregroundContainer:this.backgroundContainer},e.prototype.getAnnotationTheme=function(t){return(0,x.get)(this.view.getTheme(),["components","annotation",t],{})},e.prototype.updateOrCreate=function(t){var e=this.cache.get(this.getCacheKey(t));if(e){var n=t.type,r=this.getAnnotationTheme(n),i=this.getAnnotationCfg(n,t,r);i&&es(i,["container"]),e.component.update((0,b.__assign)((0,b.__assign)({},i||{}),{visible:!!i})),(0,x.includes)(fv,t.type)&&e.component.render()}else e=this.createAnnotation(t),e&&(e.component.init(),(0,x.includes)(fv,t.type)&&e.component.render());return e},e.prototype.syncCache=function(t){var e=this,n=new Map(this.cache);return t.forEach((function(t,e){n.set(e,t)})),n.forEach((function(t,r){(0,x.find)(e.option,(function(t){return r===e.getCacheKey(t)}))||(t.component.destroy(),n.delete(r))})),n},e.prototype.getCacheKey=function(t){return t},e}(Lu),gv=pv;function mv(t,e){var n=(0,x.deepMix)({},(0,x.get)(t,["components","axis","common"]),(0,x.get)(t,["components","axis",e]));return(0,x.get)(n,["grid"],{})}function vv(t,e,n,r){var i=[],a=e.getTicks();return t.isPolar&&a.push({value:1,text:"",tickValue:""}),a.reduce((function(e,a,o){var s=a.value;if(r)i.push({points:[t.convert("y"===n?{x:0,y:s}:{x:s,y:0}),t.convert("y"===n?{x:1,y:s}:{x:s,y:1})]});else if(o){var l=e.value,u=(l+s)/2;i.push({points:[t.convert("y"===n?{x:0,y:u}:{x:u,y:0}),t.convert("y"===n?{x:1,y:u}:{x:u,y:1})]})}return a}),a[0]),i}function yv(t,e,n,r,i){var a=e.values.length,o=[],s=n.getTicks();return s.reduce((function(e,n){var s=e?e.value:n.value,l=n.value,u=(s+l)/2;return"x"===i?o.push({points:[t.convert({x:r?l:u,y:0}),t.convert({x:r?l:u,y:1})]}):o.push({points:(0,x.map)(Array(a+1),(function(e,n){return t.convert({x:n/a,y:r?l:u})}))}),n}),s[0]),o}function bv(t,e){var n=(0,x.get)(e,"grid");if(null===n)return!1;var r=(0,x.get)(t,"grid");return!(void 0===n&&null===r)}var xv=["container"],wv=(0,b.__assign)((0,b.__assign)({},qu),{appear:null}),_v=function(t){function e(e){var n=t.call(this,e)||this;return n.cache=new Map,n.gridContainer=n.view.getLayer(m.BG).addGroup(),n.gridForeContainer=n.view.getLayer(m.FORE).addGroup(),n.axisContainer=n.view.getLayer(m.BG).addGroup(),n.axisForeContainer=n.view.getLayer(m.FORE).addGroup(),n}return(0,b.__extends)(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return"axis"},enumerable:!1,configurable:!0}),e.prototype.init=function(){},e.prototype.render=function(){this.update()},e.prototype.layout=function(){var t=this,e=this.view.getCoordinate();(0,x.each)(this.getComponents(),(function(n){var r,i=n.component,a=n.direction,o=n.type,s=n.extra,l=s.dim,u=s.scale,c=s.alignTick;if(o===y.AXIS)e.isPolar?"x"===l?r=e.isTransposed?_s(e,a):Es(e):"y"===l&&(r=e.isTransposed?Es(e):_s(e,a)):r=_s(e,a);else if(o===y.GRID)if(e.isPolar){var d=void 0;d=e.isTransposed?"x"===l?yv(e,t.view.getYScales()[0],u,c,l):vv(e,u,l,c):"x"===l?vv(e,u,l,c):yv(e,t.view.getXScale(),u,c,l),r={items:d,center:t.view.getCoordinate().getCenter()}}else r={items:vv(e,u,l,c)};i.update(r)}))},e.prototype.update=function(){this.option=this.view.getOptions().axes;var t=new Map;this.updateXAxes(t),this.updateYAxes(t);var e=new Map;this.cache.forEach((function(n,r){t.has(r)?e.set(r,n):n.component.destroy()})),this.cache=e},e.prototype.clear=function(){t.prototype.clear.call(this),this.cache.clear(),this.gridContainer.clear(),this.gridForeContainer.clear(),this.axisContainer.clear(),this.axisForeContainer.clear()},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.gridContainer.remove(!0),this.gridForeContainer.remove(!0),this.axisContainer.remove(!0),this.axisForeContainer.remove(!0)},e.prototype.getComponents=function(){var t=[];return this.cache.forEach((function(e){t.push(e)})),t},e.prototype.updateXAxes=function(t){var e=this.view.getXScale();if(e&&!e.isIdentity){var n=Ds(this.option,e.field);if(!1!==n){var r=Fs(n,v.BOTTOM),i=m.BG,a="x",o=this.view.getCoordinate(),s=this.getId("axis",e.field),l=this.getId("grid",e.field);if(o.isRect){var u=this.cache.get(s);if(u){var c=this.getLineAxisCfg(e,n,r);es(c,xv),u.component.update(c),t.set(s,u)}else u=this.createLineAxis(e,n,i,r,a),this.cache.set(s,u),t.set(s,u);var d=this.cache.get(l);if(d){c=this.getLineGridCfg(e,n,r,a);es(c,xv),d.component.update(c),t.set(l,d)}else d=this.createLineGrid(e,n,i,r,a),d&&(this.cache.set(l,d),t.set(l,d))}else if(o.isPolar){u=this.cache.get(s);if(u){c=o.isTransposed?this.getLineAxisCfg(e,n,v.RADIUS):this.getCircleAxisCfg(e,n,r);es(c,xv),u.component.update(c),t.set(s,u)}else{if(o.isTransposed){if((0,x.isUndefined)(n))return;u=this.createLineAxis(e,n,i,v.RADIUS,a)}else u=this.createCircleAxis(e,n,i,r,a);this.cache.set(s,u),t.set(s,u)}d=this.cache.get(l);if(d){c=o.isTransposed?this.getCircleGridCfg(e,n,v.RADIUS,a):this.getLineGridCfg(e,n,v.CIRCLE,a);es(c,xv),d.component.update(c),t.set(l,d)}else{if(o.isTransposed){if((0,x.isUndefined)(n))return;d=this.createCircleGrid(e,n,i,v.RADIUS,a)}else d=this.createLineGrid(e,n,i,v.CIRCLE,a);d&&(this.cache.set(l,d),t.set(l,d))}}}}},e.prototype.updateYAxes=function(t){var e=this,n=this.view.getYScales();(0,x.each)(n,(function(n,r){if(n&&!n.isIdentity){var i=n.field,a=Ds(e.option,i);if(!1!==a){var o=m.BG,s="y",l=e.getId("axis",i),u=e.getId("grid",i),c=e.view.getCoordinate();if(c.isRect){var d=Fs(a,0===r?v.LEFT:v.RIGHT),h=e.cache.get(l);if(h){var f=e.getLineAxisCfg(n,a,d);es(f,xv),h.component.update(f),t.set(l,h)}else h=e.createLineAxis(n,a,o,d,s),e.cache.set(l,h),t.set(l,h);var p=e.cache.get(u);if(p){f=e.getLineGridCfg(n,a,d,s);es(f,xv),p.component.update(f),t.set(u,p)}else p=e.createLineGrid(n,a,o,d,s),p&&(e.cache.set(u,p),t.set(u,p))}else if(c.isPolar){h=e.cache.get(l);if(h){f=c.isTransposed?e.getCircleAxisCfg(n,a,v.CIRCLE):e.getLineAxisCfg(n,a,v.RADIUS);es(f,xv),h.component.update(f),t.set(l,h)}else{if(c.isTransposed){if((0,x.isUndefined)(a))return;h=e.createCircleAxis(n,a,o,v.CIRCLE,s)}else h=e.createLineAxis(n,a,o,v.RADIUS,s);e.cache.set(l,h),t.set(l,h)}p=e.cache.get(u);if(p){f=c.isTransposed?e.getLineGridCfg(n,a,v.CIRCLE,s):e.getCircleGridCfg(n,a,v.RADIUS,s);es(f,xv),p.component.update(f),t.set(u,p)}else{if(c.isTransposed){if((0,x.isUndefined)(a))return;p=e.createLineGrid(n,a,o,v.CIRCLE,s)}else p=e.createCircleGrid(n,a,o,v.RADIUS,s);p&&(e.cache.set(u,p),t.set(u,p))}}}}}))},e.prototype.createLineAxis=function(t,e,n,r,i){var a={component:new Ro(this.getLineAxisCfg(t,e,r)),layer:n,direction:r===v.RADIUS?v.NONE:r,type:y.AXIS,extra:{dim:i,scale:t}};return a.component.set("field",t.field),a.component.init(),a},e.prototype.createLineGrid=function(t,e,n,r,i){var a=this.getLineGridCfg(t,e,r,i);if(a){var o={component:new zo(a),layer:n,direction:v.NONE,type:y.GRID,extra:{dim:i,scale:t,alignTick:(0,x.get)(a,"alignTick",!0)}};return o.component.init(),o}},e.prototype.createCircleAxis=function(t,e,n,r,i){var a={component:new No(this.getCircleAxisCfg(t,e,r)),layer:n,direction:r,type:y.AXIS,extra:{dim:i,scale:t}};return a.component.set("field",t.field),a.component.init(),a},e.prototype.createCircleGrid=function(t,e,n,r,i){var a=this.getCircleGridCfg(t,e,r,i);if(a){var o={component:new jo(a),layer:n,direction:v.NONE,type:y.GRID,extra:{dim:i,scale:t,alignTick:(0,x.get)(a,"alignTick",!0)}};return o.component.init(),o}},e.prototype.getLineAxisCfg=function(t,e,n){var r=(0,x.get)(e,["top"])?this.axisForeContainer:this.axisContainer,i=this.view.getCoordinate(),a=_s(i,n),o=Ms(t,e),s=As(this.view.getTheme(),n),l=(0,x.get)(e,["title"])?(0,x.deepMix)({title:{style:{text:o}}},{title:ks(this.view.getTheme(),n,e.title)},e):e,u=(0,x.deepMix)((0,b.__assign)((0,b.__assign)({container:r},a),{ticks:t.getTicks().map((function(t){return{id:"".concat(t.tickValue),name:t.text,value:t.value}})),verticalFactor:i.isPolar?-1*Ss(a,i.getCenter()):Ss(a,i.getCenter()),theme:s}),s,l),c=this.getAnimateCfg(u),d=c.animate,h=c.animateOption;u.animateOption=h,u.animate=d;var f=Cs(a),p=(0,x.get)(u,"verticalLimitLength",f?1/3:.5);if(p<=1){var g=this.view.getCanvas().get("width"),m=this.view.getCanvas().get("height");u.verticalLimitLength=p*(f?g:m)}return u},e.prototype.getLineGridCfg=function(t,e,n,r){if(bv(As(this.view.getTheme(),n),e)){var i=mv(this.view.getTheme(),n),a=(0,x.deepMix)({container:(0,x.get)(e,["top"])?this.gridForeContainer:this.gridContainer},i,(0,x.get)(e,"grid"),this.getAnimateCfg(e));return a.items=vv(this.view.getCoordinate(),t,r,(0,x.get)(a,"alignTick",!0)),a}},e.prototype.getCircleAxisCfg=function(t,e,n){var r=(0,x.get)(e,["top"])?this.axisForeContainer:this.axisContainer,i=this.view.getCoordinate(),a=t.getTicks().map((function(t){return{id:"".concat(t.tickValue),name:t.text,value:t.value}}));t.isCategory||Math.abs(i.endAngle-i.startAngle)!==2*Math.PI||a.pop();var o=Ms(t,e),s=As(this.view.getTheme(),v.CIRCLE),l=(0,x.get)(e,["title"])?(0,x.deepMix)({title:{style:{text:o}}},{title:ks(this.view.getTheme(),n,e.title)},e):e,u=(0,x.deepMix)((0,b.__assign)((0,b.__assign)({container:r},Es(this.view.getCoordinate())),{ticks:a,verticalFactor:1,theme:s}),s,l),c=this.getAnimateCfg(u),d=c.animate,h=c.animateOption;return u.animate=d,u.animateOption=h,u},e.prototype.getCircleGridCfg=function(t,e,n,r){if(bv(As(this.view.getTheme(),n),e)){var i=mv(this.view.getTheme(),v.RADIUS),a=(0,x.deepMix)({container:(0,x.get)(e,["top"])?this.gridForeContainer:this.gridContainer,center:this.view.getCoordinate().getCenter()},i,(0,x.get)(e,"grid"),this.getAnimateCfg(e)),o=(0,x.get)(a,"alignTick",!0),s="x"===r?this.view.getYScales()[0]:this.view.getXScale();return a.items=yv(this.view.getCoordinate(),s,t,o,r),a}},e.prototype.getId=function(t,e){var n=this.view.getCoordinate();return"".concat(t,"-").concat(e,"-").concat(n.type)},e.prototype.getAnimateCfg=function(t){return{animate:this.view.getOptions().animate&&(0,x.get)(t,"animate"),animateOption:t&&t.animateOption?(0,x.deepMix)({},wv,t.animateOption):wv}},e}(Lu),Cv=_v;function Sv(t,e,n){return n===v.TOP?[t.minX+t.width/2-e.width/2,t.minY]:n===v.BOTTOM?[t.minX+t.width/2-e.width/2,t.maxY-e.height]:n===v.LEFT?[t.minX,t.minY+t.height/2-e.height/2]:n===v.RIGHT?[t.maxX-e.width,t.minY+t.height/2-e.height/2]:n===v.TOP_LEFT||n===v.LEFT_TOP?[t.tl.x,t.tl.y]:n===v.TOP_RIGHT||n===v.RIGHT_TOP?[t.tr.x-e.width,t.tr.y]:n===v.BOTTOM_LEFT||n===v.LEFT_BOTTOM?[t.bl.x,t.bl.y-e.height]:n===v.BOTTOM_RIGHT||n===v.RIGHT_BOTTOM?[t.br.x-e.width,t.br.y-e.height]:[0,0]}function Av(t,e){return(0,x.isBoolean)(t)?!1!==t&&{}:(0,x.get)(t,[e],t)}function kv(t){return(0,x.get)(t,"position",v.BOTTOM)}var Ev=function(t){function e(e){var n=t.call(this,e)||this;return n.container=n.view.getLayer(m.FORE).addGroup(),n}return(0,b.__extends)(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return"legend"},enumerable:!1,configurable:!0}),e.prototype.init=function(){},e.prototype.render=function(){this.update()},e.prototype.layout=function(){var t=this;this.layoutBBox=this.view.viewBBox,(0,x.each)(this.components,(function(e){var n=e.component,r=e.direction,i=Nc(r),a=n.get("maxWidthRatio"),o=n.get("maxHeightRatio"),s=t.getCategoryLegendSizeCfg(i,a,o),l=n.get("maxWidth"),u=n.get("maxHeight");n.update({maxWidth:Math.min(s.maxWidth,l||0),maxHeight:Math.min(s.maxHeight,u||0)});var c=n.get("padding"),d=n.getLayoutBBox(),h=new rs(d.x,d.y,d.width,d.height).expand(c),f=(0,b.__read)(Sv(t.view.viewBBox,h,r),2),p=f[0],g=f[1],m=(0,b.__read)(Sv(t.layoutBBox,h,r),2),v=m[0],y=m[1],x=0,w=0;r.startsWith("top")||r.startsWith("bottom")?(x=p,w=y):(x=v,w=g),n.setLocation({x:x+c[3],y:w+c[0]}),t.layoutBBox=t.layoutBBox.cut(h,r)}))},e.prototype.update=function(){var t=this;this.option=this.view.getOptions().legends;var e={},n=function(n,r,i){var a=t.getId(i.field),o=t.getComponentById(a);if(o){var s=void 0,l=Av(t.option,i.field);!1!==l&&((0,x.get)(l,"custom")?s=t.getCategoryCfg(n,r,i,l,!0):i.isLinear?s=t.getContinuousCfg(n,r,i,l):i.isCategory&&(s=t.getCategoryCfg(n,r,i,l))),s&&(es(s,["container"]),o.direction=kv(l),o.component.update(s),e[a]=!0)}else{var u=t.createFieldLegend(n,r,i);u&&(u.component.init(),t.components.push(u),e[a]=!0)}};if((0,x.get)(this.option,"custom")){var r="global-custom",i=this.getComponentById(r);if(i){var a=this.getCategoryCfg(void 0,void 0,void 0,this.option,!0);es(a,["container"]),i.component.update(a),e[r]=!0}else{var o=this.createCustomLegend(void 0,void 0,void 0,this.option);if(o){o.init();var s=m.FORE,l=kv(this.option);this.components.push({id:r,component:o,layer:s,direction:l,type:y.LEGEND,extra:void 0}),e[r]=!0}}}else this.loopLegends(n);var u=[];(0,x.each)(this.getComponents(),(function(t){e[t.id]?u.push(t):t.component.destroy()})),this.components=u},e.prototype.clear=function(){t.prototype.clear.call(this),this.container.clear()},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.container.remove(!0)},e.prototype.getGeometries=function(t){var e=this,n=t.geometries;return(0,x.each)(t.views,(function(t){n=n.concat(e.getGeometries(t))})),n},e.prototype.loopLegends=function(t){var e=this.view.getRootView()===this.view;if(e){var n=this.getGeometries(this.view),r={};(0,x.each)(n,(function(e){var n=e.getGroupAttributes();(0,x.each)(n,(function(n){var i=n.getScale(n.type);i&&"identity"!==i.type&&!r[i.field]&&(t(e,n,i),r[i.field]=!0)}))}))}},e.prototype.createFieldLegend=function(t,e,n){var r,i=Av(this.option,n.field),a=m.FORE,o=kv(i);if(!1!==i&&((0,x.get)(i,"custom")?r=this.createCustomLegend(t,e,n,i):n.isLinear?r=this.createContinuousLegend(t,e,n,i):n.isCategory&&(r=this.createCategoryLegend(t,e,n,i))),r)return r.set("field",n.field),{id:this.getId(n.field),component:r,layer:a,direction:o,type:y.LEGEND,extra:{scale:n}}},e.prototype.createCustomLegend=function(t,e,n,r){var i=this.getCategoryCfg(t,e,n,r,!0);return new $o(i)},e.prototype.createContinuousLegend=function(t,e,n,r){var i=this.getContinuousCfg(t,e,n,es(r,["value"]));return new Vo(i)},e.prototype.createCategoryLegend=function(t,e,n,r){var i=this.getCategoryCfg(t,e,n,r);return new $o(i)},e.prototype.getContinuousCfg=function(t,e,n,r){var i=n.getTicks(),a=(0,x.find)(i,(function(t){return 0===t.value})),o=(0,x.find)(i,(function(t){return 1===t.value})),s=i.map((function(t){var r=t.value,i=t.tickValue,a=e.mapping(n.invert(r)).join("");return{value:i,attrValue:a,color:a,scaleValue:r}}));a||s.push({value:n.min,attrValue:e.mapping(n.invert(0)).join(""),color:e.mapping(n.invert(0)).join(""),scaleValue:0}),o||s.push({value:n.max,attrValue:e.mapping(n.invert(1)).join(""),color:e.mapping(n.invert(1)).join(""),scaleValue:1}),s.sort((function(t,e){return t.value-e.value}));var l={min:(0,x.head)(s).value,max:(0,x.last)(s).value,colors:[],rail:{type:e.type},track:{}};"size"===e.type&&(l.track={style:{fill:"size"===e.type?this.view.getTheme().defaultColor:void 0}}),"color"===e.type&&(l.colors=s.map((function(t){return t.attrValue})));var u=this.container,c=kv(r),d=Nc(c),h=(0,x.get)(r,"title");return h&&(h=(0,x.deepMix)({text:vs(n)},h)),l.container=u,l.layout=d,l.title=h,l.animateOption=qu,this.mergeLegendCfg(l,r,"continuous")},e.prototype.getCategoryCfg=function(t,e,n,r,i){var a=this.container,o=(0,x.get)(r,"position",v.BOTTOM),s=$c(this.view.getTheme(),o),l=(0,x.get)(s,["marker"]),u=(0,x.get)(r,"marker"),c=Nc(o),d=(0,x.get)(s,["pageNavigator"]),h=(0,x.get)(r,"pageNavigator"),f=i?jc(l,u,r.items):zc(this.view,t,e,l,u),p=(0,x.get)(r,"title");p&&(p=(0,x.deepMix)({text:n?vs(n):""},p));var g=(0,x.get)(r,"maxWidthRatio"),m=(0,x.get)(r,"maxHeightRatio"),y=this.getCategoryLegendSizeCfg(c,g,m);y.container=a,y.layout=c,y.items=f,y.title=p,y.animateOption=qu,y.pageNavigator=(0,x.deepMix)({},d,h);var b=this.mergeLegendCfg(y,r,o);b.reversed&&b.items.reverse();var w=(0,x.get)(b,"maxItemWidth");return w&&w<=1&&(b.maxItemWidth=this.view.viewBBox.width*w),b},e.prototype.mergeLegendCfg=function(t,e,n){var r=n.split("-")[0],i=$c(this.view.getTheme(),r);return(0,x.deepMix)({},i,t,e)},e.prototype.getId=function(t){return"".concat(this.name,"-").concat(t)},e.prototype.getComponentById=function(t){return(0,x.find)(this.components,(function(e){return e.id===t}))},e.prototype.getCategoryLegendSizeCfg=function(t,e,n){void 0===e&&(e=P),void 0===n&&(n=P);var r=this.view.viewBBox,i=r.width,a=r.height;return"vertical"===t?{maxWidth:i*e,maxHeight:a}:{maxWidth:i,maxHeight:a*n}},e}(Lu),Dv=Ev,Fv=function(t){function e(e){var n=t.call(this,e)||this;return n.onChangeFn=x.noop,n.resetMeasure=function(){n.clear()},n.onValueChange=function(t){var e=(0,b.__read)(t,2),r=e[0],i=e[1];n.start=r,n.end=i,n.changeViewData(r,i)},n.container=n.view.getLayer(m.FORE).addGroup(),n.onChangeFn=(0,x.throttle)(n.onValueChange,20,{leading:!0}),n.width=0,n.view.on(w.BEFORE_CHANGE_DATA,n.resetMeasure),n.view.on(w.BEFORE_CHANGE_SIZE,n.resetMeasure),n}return(0,b.__extends)(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return"slider"},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.view.off(w.BEFORE_CHANGE_DATA,this.resetMeasure),this.view.off(w.BEFORE_CHANGE_SIZE,this.resetMeasure)},e.prototype.init=function(){},e.prototype.render=function(){this.option=this.view.getOptions().slider;var t=this.getSliderCfg(),e=t.start,n=t.end;(0,x.isNil)(this.start)&&(this.start=e,this.end=n);var r=this.view.getOptions().data;this.option&&!(0,x.isEmpty)(r)?this.slider?this.slider=this.updateSlider():(this.slider=this.createSlider(),this.slider.component.on("sliderchange",this.onChangeFn)):this.slider&&(this.slider.component.destroy(),this.slider=void 0)},e.prototype.layout=function(){var t=this;if(this.option&&!this.width&&(this.measureSlider(),setTimeout((function(){t.view.destroyed||t.changeViewData(t.start,t.end)}),0)),this.slider){var e=this.view.coordinateBBox.width,n=this.slider.component.get("padding"),r=(0,b.__read)(n,4),i=r[0],a=(r[1],r[2],r[3]),o=this.slider.component.getLayoutBBox(),s=new rs(o.x,o.y,Math.min(o.width,e),o.height).expand(n),l=this.getMinMaxText(this.start,this.end),u=l.minText,c=l.maxText,d=(0,b.__read)(Sv(this.view.viewBBox,s,v.BOTTOM),2),h=(d[0],d[1]),f=(0,b.__read)(Sv(this.view.coordinateBBox,s,v.BOTTOM),2),p=f[0];f[1];this.slider.component.update((0,b.__assign)((0,b.__assign)({},this.getSliderCfg()),{x:p+a,y:h+i,width:this.width,start:this.start,end:this.end,minText:u,maxText:c})),this.view.viewBBox=this.view.viewBBox.cut(s,v.BOTTOM)}},e.prototype.update=function(){this.render()},e.prototype.createSlider=function(){var t=this.getSliderCfg(),e=new Bo((0,b.__assign)({container:this.container},t));return e.init(),{component:e,layer:m.FORE,direction:v.BOTTOM,type:y.SLIDER}},e.prototype.updateSlider=function(){var t=this.getSliderCfg();if(this.width){var e=this.getMinMaxText(this.start,this.end),n=e.minText,r=e.maxText;t=(0,b.__assign)((0,b.__assign)({},t),{width:this.width,start:this.start,end:this.end,minText:n,maxText:r})}return this.slider.component.update(t),this.slider},e.prototype.measureSlider=function(){var t=this.getSliderCfg().width;this.width=t},e.prototype.getSliderCfg=function(){var t={height:16,start:0,end:1,minText:"",maxText:"",x:0,y:0,width:this.view.coordinateBBox.width};if((0,x.isObject)(this.option)){var e=(0,b.__assign)({data:this.getData()},(0,x.get)(this.option,"trendCfg",{}));t=(0,x.deepMix)({},t,this.getThemeOptions(),this.option),t=(0,b.__assign)((0,b.__assign)({},t),{trendCfg:e})}return t.start=(0,x.clamp)(Math.min((0,x.isNil)(t.start)?0:t.start,(0,x.isNil)(t.end)?1:t.end),0,1),t.end=(0,x.clamp)(Math.max((0,x.isNil)(t.start)?0:t.start,(0,x.isNil)(t.end)?1:t.end),0,1),t},e.prototype.getData=function(){var t=this.view.getOptions().data,e=(0,b.__read)(this.view.getYScales(),1),n=e[0],r=this.view.getGroupScales();if(r.length){var i=r[0],a=i.field,o=i.ticks;return t.reduce((function(t,e){return e[a]===o[0]&&t.push(e[n.field]),t}),[])}return t.map((function(t){return t[n.field]||0}))},e.prototype.getThemeOptions=function(){var t=this.view.getTheme();return(0,x.get)(t,["components","slider","common"],{})},e.prototype.getMinMaxText=function(t,e){var n=this.view.getOptions().data,r=this.view.getXScale(),i=!0,a=(0,x.valuesOfKey)(n,r.field);r.isLinear&&(a=a.sort());var o=i?a:a.reverse(),s=(0,x.size)(n);if(!r||!s)return{};var l=(0,x.size)(o),u=Math.floor(t*(l-1)),c=Math.floor(e*(l-1)),d=(0,x.get)(o,[u]),h=(0,x.get)(o,[c]),f=this.getSliderCfg().formatter;return f&&(d=f(d,n[u],u),h=f(h,n[c],c)),{minText:d,maxText:h}},e.prototype.changeViewData=function(t,e){var n=this.view.getOptions().data,r=this.view.getXScale(),i=(0,x.size)(n);if(r&&i){var a=!0,o=(0,x.valuesOfKey)(n,r.field),s=this.view.getXScale().isLinear?o.sort((function(t,e){return Number(t)-Number(e)})):o,l=a?s:s.reverse(),u=(0,x.size)(l),c=Math.floor(t*(u-1)),d=Math.floor(e*(u-1));this.view.filter(r.field,(function(t,e){var n=l.indexOf(t);return!(n>-1)||Jo(n,c,d)})),this.view.render(!0)}},e.prototype.getComponents=function(){return this.slider?[this.slider]:[]},e.prototype.clear=function(){this.slider&&(this.slider.component.destroy(),this.slider=void 0),this.width=0,this.start=void 0,this.end=void 0},e}(Lu),Mv=Fv,Ov=0,Bv=8,Tv=32,Pv=20,Iv=function(t){function e(e){var n=t.call(this,e)||this;return n.onChangeFn=x.noop,n.resetMeasure=function(){n.clear()},n.onValueChange=function(t){var e=t.ratio,r=n.getValidScrollbarCfg().animate;n.ratio=(0,x.clamp)(e,0,1);var i=n.view.getOptions().animate;r||n.view.animate(!1),n.changeViewData(n.getScrollRange(),!0),n.view.animate(i)},n.container=n.view.getLayer(m.FORE).addGroup(),n.onChangeFn=(0,x.throttle)(n.onValueChange,20,{leading:!0}),n.trackLen=0,n.thumbLen=0,n.ratio=0,n.view.on(w.BEFORE_CHANGE_DATA,n.resetMeasure),n.view.on(w.BEFORE_CHANGE_SIZE,n.resetMeasure),n}return(0,b.__extends)(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return"scrollbar"},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.view.off(w.BEFORE_CHANGE_DATA,this.resetMeasure),this.view.off(w.BEFORE_CHANGE_SIZE,this.resetMeasure)},e.prototype.init=function(){},e.prototype.render=function(){this.option=this.view.getOptions().scrollbar,this.option?this.scrollbar?this.scrollbar=this.updateScrollbar():(this.scrollbar=this.createScrollbar(),this.scrollbar.component.on("scrollchange",this.onChangeFn)):this.scrollbar&&(this.scrollbar.component.destroy(),this.scrollbar=void 0)},e.prototype.layout=function(){var t=this;if(this.option&&!this.trackLen&&(this.measureScrollbar(),setTimeout((function(){t.view.destroyed||t.changeViewData(t.getScrollRange(),!0)}))),this.scrollbar){var e=this.view.coordinateBBox.width,n=this.scrollbar.component.get("padding"),r=this.scrollbar.component.getLayoutBBox(),i=new rs(r.x,r.y,Math.min(r.width,e),r.height).expand(n),a=this.getScrollbarComponentCfg(),o=void 0,s=void 0;if(a.isHorizontal){var l=(0,b.__read)(Sv(this.view.viewBBox,i,v.BOTTOM),2),u=(l[0],l[1]),c=(0,b.__read)(Sv(this.view.coordinateBBox,i,v.BOTTOM),2),d=c[0];c[1];o=d,s=u}else{var h=(0,b.__read)(Sv(this.view.viewBBox,i,v.RIGHT),2),f=(h[0],u=h[1],(0,b.__read)(Sv(this.view.viewBBox,i,v.RIGHT),2));d=f[0],f[1];o=d,s=u}o+=n[3],s+=n[0],this.trackLen?this.scrollbar.component.update((0,b.__assign)((0,b.__assign)({},a),{x:o,y:s,trackLen:this.trackLen,thumbLen:this.thumbLen,thumbOffset:(this.trackLen-this.thumbLen)*this.ratio})):this.scrollbar.component.update((0,b.__assign)((0,b.__assign)({},a),{x:o,y:s})),this.view.viewBBox=this.view.viewBBox.cut(i,a.isHorizontal?v.BOTTOM:v.RIGHT)}},e.prototype.update=function(){this.render()},e.prototype.getComponents=function(){return this.scrollbar?[this.scrollbar]:[]},e.prototype.clear=function(){this.scrollbar&&(this.scrollbar.component.destroy(),this.scrollbar=void 0),this.trackLen=0,this.thumbLen=0,this.ratio=0,this.cnt=0,this.step=0,this.data=void 0,this.xScaleCfg=void 0,this.yScalesCfg=[]},e.prototype.setValue=function(t){this.onValueChange({ratio:t})},e.prototype.getValue=function(){return this.ratio},e.prototype.getThemeOptions=function(){var t=this.view.getTheme();return(0,x.get)(t,["components","scrollbar","common"],{})},e.prototype.getScrollbarTheme=function(t){var e=(0,x.get)(this.view.getTheme(),["components","scrollbar"]),n=t||{},r=n.thumbHighlightColor,i=(0,b.__rest)(n,["thumbHighlightColor"]);return{default:(0,x.deepMix)({},(0,x.get)(e,["default","style"],{}),i),hover:(0,x.deepMix)({},(0,x.get)(e,["hover","style"],{}),{thumbColor:r})}},e.prototype.measureScrollbar=function(){var t=this.view.getXScale(),e=this.view.getYScales().slice();this.data=this.getScrollbarData(),this.step=this.getStep(),this.cnt=this.getCnt();var n=this.getScrollbarComponentCfg(),r=n.trackLen,i=n.thumbLen;this.trackLen=r,this.thumbLen=i,this.xScaleCfg={field:t.field,values:t.values||[]},this.yScalesCfg=e},e.prototype.getScrollRange=function(){var t=Math.floor((this.cnt-this.step)*(0,x.clamp)(this.ratio,0,1)),e=Math.min(t+this.step-1,this.cnt-1);return[t,e]},e.prototype.changeViewData=function(t,e){var n=this,r=(0,b.__read)(t,2),i=r[0],a=r[1],o=this.getValidScrollbarCfg().type,s="vertical"!==o,l=(0,x.valuesOfKey)(this.data,this.xScaleCfg.field),u=this.view.getXScale().isLinear?l.sort((function(t,e){return Number(t)-Number(e)})):l,c=s?u:u.reverse();this.yScalesCfg.forEach((function(t){n.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 e=c.indexOf(t);return!(e>-1)||Jo(e,i,a)})),this.view.render(!0)},e.prototype.createScrollbar=function(){var t=this.getValidScrollbarCfg().type,e="vertical"!==t,n=new Lo((0,b.__assign)((0,b.__assign)({container:this.container},this.getScrollbarComponentCfg()),{x:0,y:0}));return n.init(),{component:n,layer:m.FORE,direction:e?v.BOTTOM:v.RIGHT,type:y.SCROLLBAR}},e.prototype.updateScrollbar=function(){var t=this.getScrollbarComponentCfg(),e=this.trackLen?(0,b.__assign)((0,b.__assign)({},t),{trackLen:this.trackLen,thumbLen:this.thumbLen,thumbOffset:(this.trackLen-this.thumbLen)*this.ratio}):(0,b.__assign)({},t);return this.scrollbar.component.update(e),this.scrollbar},e.prototype.getStep=function(){if(this.step)return this.step;var t=this.view.coordinateBBox,e=this.getValidScrollbarCfg(),n=e.type,r=e.categorySize,i="vertical"!==n;return Math.floor((i?t.width:t.height)/r)},e.prototype.getCnt=function(){if(this.cnt)return this.cnt;var t=this.view.getXScale(),e=this.getScrollbarData(),n=(0,x.valuesOfKey)(e,t.field);return(0,x.size)(n)},e.prototype.getScrollbarComponentCfg=function(){var t=this.view,e=t.coordinateBBox,n=t.viewBBox,r=this.getValidScrollbarCfg(),i=r.type,a=r.padding,o=r.width,s=r.height,l=r.style,u="vertical"!==i,c=(0,b.__read)(a,4),d=c[0],h=c[1],f=c[2],p=c[3],g=u?{x:e.minX+p,y:n.maxY-s-f}:{x:n.maxX-o-h,y:e.minY+d},m=this.getStep(),v=this.getCnt(),y=u?e.width-p-h:e.height-d-f,w=Math.max(y*(0,x.clamp)(m/v,0,1),Pv);return(0,b.__assign)((0,b.__assign)({},this.getThemeOptions()),{x:g.x,y:g.y,size:u?s:o,isHorizontal:u,trackLen:y,thumbLen:w,thumbOffset:0,theme:this.getScrollbarTheme(l)})},e.prototype.getValidScrollbarCfg=function(){var t={type:"horizontal",categorySize:Tv,width:Bv,height:Bv,padding:[0,0,0,0],animate:!0,style:{}};return(0,x.isObject)(this.option)&&(t=(0,b.__assign)((0,b.__assign)({},t),this.option)),(0,x.isObject)(this.option)&&this.option.padding||(t.padding="horizontal"===t.type?[Ov,0,Ov,0]:[0,Ov,0,Ov]),t},e.prototype.getScrollbarData=function(){var t=this.view.getCoordinate(),e=this.getValidScrollbarCfg(),n=this.view.getOptions().data||[];return t.isReflect("y")&&"vertical"===e.type&&(n=(0,b.__spreadArray)([],(0,b.__read)(n),!1).reverse()),n},e}(Lu),Lv=Iv,Rv={fill:"#CCD6EC",opacity:.3};function Nv(t,e,n){var r,i,a,o,s,l,u=gu(t,e,n);if(u.length){u=(0,x.flatten)(u);try{for(var c=(0,b.__values)(u),d=c.next();!d.done;d=c.next()){var h=d.value;try{for(var f=(a=void 0,(0,b.__values)(h)),p=f.next();!p.done;p=f.next()){var g=p.value,m=g.mappingData,v=m.x,y=m.y;g.x=(0,x.isArray)(v)?v[v.length-1]:v,g.y=(0,x.isArray)(y)?y[y.length-1]:y}}catch(D){a={error:D}}finally{try{p&&!p.done&&(o=f.return)&&o.call(f)}finally{if(a)throw a.error}}}}catch(F){r={error:F}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}var w=n.shared;if(!1===w&&u.length>1){var _=u[0],C=Math.abs(e.y-_[0].y);try{for(var S=(0,b.__values)(u),A=S.next();!A.done;A=S.next()){var k=A.value,E=Math.abs(e.y-k[0].y);E<=C&&(_=k,C=E)}}catch(M){s={error:M}}finally{try{A&&!A.done&&(l=S.return)&&l.call(S)}finally{if(s)throw s.error}}u=[_]}return(0,x.uniq)((0,x.flatten)(u))}return[]}var zv=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.show=function(t){var e=this.context.view,n=this.context.event,r=e.getController("tooltip").getTooltipCfg(),i=Nv(e,{x:n.x,y:n.y},r);if(!(0,x.isEqual)(i,this.items)&&(this.items=i,i.length)){var a=e.getXScale().field,o=i[0].data[a],s=[],l=e.geometries;if((0,x.each)(l,(function(t){if("interval"===t.type||"schema"===t.type){var e=t.getElementsBy((function(t){var e=t.getData();return e[a]===o}));s=s.concat(e)}})),s.length){var u=e.getCoordinate(),c=s[0].shape.getCanvasBBox(),d=s[0].shape.getCanvasBBox(),h=c;(0,x.each)(s,(function(t){var e=t.shape.getCanvasBBox();u.isTransposed?(e.minYd.maxY&&(d=e)):(e.minXd.maxX&&(d=e)),h.x=Math.min(e.minX,h.minX),h.y=Math.min(e.minY,h.minY),h.width=Math.max(e.maxX,h.maxX)-h.x,h.height=Math.max(e.maxY,h.maxY)-h.y}));var f=e.backgroundGroup,p=e.coordinateBBox,g=void 0;if(u.isRect){var m=e.getXScale(),v=t||{},y=v.appendRatio,w=v.appendWidth;(0,x.isNil)(w)&&(y=(0,x.isNil)(y)?m.isLinear?0:.25:y,w=u.isTransposed?y*d.height:y*c.width);var _=void 0,C=void 0,S=void 0,A=void 0;u.isTransposed?(_=p.minX,C=Math.min(d.minY,c.minY)-w,S=p.width,A=h.height+2*w):(_=Math.min(c.minX,d.minX)-w,C=p.minY,S=h.width+2*w,A=p.height),g=[["M",_,C],["L",_+S,C],["L",_+S,C+A],["L",_,C+A],["Z"]]}else{var k=(0,x.head)(s),E=(0,x.last)(s),D=Yo(k.getModel(),u).startAngle,F=Yo(E.getModel(),u).endAngle,M=u.getCenter(),O=u.getRadius(),B=u.innerRadius*O;g=Zo(M.x,M.y,O,D,F,B)}if(this.regionPath)this.regionPath.attr("path",g),this.regionPath.show();else{var T=(0,x.get)(t,"style",Rv);this.regionPath=f.addShape({type:"path",name:"active-region",capture:!1,attrs:(0,b.__assign)((0,b.__assign)({},T),{path:g})})}}}},e.prototype.hide=function(){this.regionPath&&this.regionPath.hide(),this.items=null},e.prototype.destroy=function(){this.hide(),this.regionPath&&this.regionPath.remove(!0),t.prototype.destroy.call(this)},e}(Ls),jv=zv,$v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.timeStamp=0,e}return(0,b.__extends)(e,t),e.prototype.show=function(){var t=this.context,e=t.event,n=t.view,r=n.isTooltipLocked();if(!r){var i=this.timeStamp,a=+new Date,o=(0,x.get)(t.view.getOptions(),"tooltip.showDelay",16);if(a-i>o){var s=this.location,l={x:e.x,y:e.y};s&&(0,x.isEqual)(s,l)||this.showTooltip(n,l),this.timeStamp=a,this.location=l}}},e.prototype.hide=function(){var t=this.context.view,e=t.getController("tooltip"),n=this.context.event,r=n.clientX,i=n.clientY;e.isCursorEntered({x:r,y:i})||t.isTooltipLocked()||(this.hideTooltip(t),this.location=null)},e.prototype.showTooltip=function(t,e){t.showTooltip(e)},e.prototype.hideTooltip=function(t){t.hideTooltip()},e}(Ls),Vv=$v,qv=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.showTooltip=function(t,e){var n=Cl(t);(0,x.each)(n,(function(n){var r=Al(t,n,e);n.showTooltip(r)}))},e.prototype.hideTooltip=function(t){var e=Cl(t);(0,x.each)(e,(function(t){t.hideTooltip()}))},e}(Vv),Hv=qv,Uv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.timeStamp=0,e}return(0,b.__extends)(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.tooltip&&this.tooltip.destroy()},e.prototype.show=function(){var t=this.context,e=t.event,n=this.timeStamp,r=+new Date;if(r-n>16){var i=this.location,a={x:e.x,y:e.y};i&&(0,x.isEqual)(i,a)||this.showTooltip(a),this.timeStamp=r,this.location=a}},e.prototype.hide=function(){this.hideTooltip(),this.location=null},e.prototype.showTooltip=function(t){var e=this.context,n=e.event,r=n.target;if(r&&r.get("tip")){this.tooltip||this.renderTooltip();var i=r.get("tip");this.tooltip.update((0,b.__assign)({title:i},t)),this.tooltip.show()}},e.prototype.hideTooltip=function(){this.tooltip&&this.tooltip.hide()},e.prototype.renderTooltip=function(){var t,e=this.context.view,n=e.canvas,r={start:{x:0,y:0},end:{x:n.get("width"),y:n.get("height")}},i=e.getTheme(),a=(0,x.get)(i,["components","tooltip","domStyles"],{}),o=new qo({parent:n.get("el").parentNode,region:r,visible:!1,crosshairs:null,domStyles:(0,b.__assign)({},(0,x.deepMix)({},a,(t={},t[Ya]={"max-width":"50%"},t[Ka]={"word-break":"break-all"},t)))});o.init(),o.setCapture(!1),this.tooltip=o},e}(Ls),Gv=Uv,Wv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="",e}return(0,b.__extends)(e,t),e.prototype.hasState=function(t){return t.hasState(this.stateName)},e.prototype.setElementState=function(t,e){t.setState(this.stateName,e)},e.prototype.setState=function(){this.setStateEnable(!0)},e.prototype.clear=function(){var t=this.context.view;this.clearViewState(t)},e.prototype.clearViewState=function(t){var e=this,n=fl(t,this.stateName);(0,x.each)(n,(function(t){e.setElementState(t,!1)}))},e}(Ls),Zv=Wv;function Xv(t){return(0,x.get)(t.get("delegateObject"),"item")}var Yv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.ignoreListItemStates=["unchecked"],e}return(0,b.__extends)(e,t),e.prototype.isItemIgnore=function(t,e){var n=this.ignoreListItemStates,r=n.filter((function(n){return e.hasState(t,n)}));return!!r.length},e.prototype.setStateByComponent=function(t,e,n){var r=this.context.view,i=t.get("field"),a=dl(r);this.setElementsStateByItem(a,i,e,n)},e.prototype.setStateByElement=function(t,e){this.setElementState(t,e)},e.prototype.isMathItem=function(t,e,n){var r=this.context.view,i=El(r,e),a=pl(t,e);return!(0,x.isNil)(a)&&n.name===i.getText(a)},e.prototype.setElementsStateByItem=function(t,e,n,r){var i=this;(0,x.each)(t,(function(t){i.isMathItem(t,e,n)&&t.setState(i.stateName,r)}))},e.prototype.setStateEnable=function(t){var e=rl(this.context);if(e)al(this.context)&&this.setStateByElement(e,t);else{var n=il(this.context);if(ol(n)){var r=n.item,i=n.component;if(r&&i&&!this.isItemIgnore(r,i)){var a=this.context.event.gEvent;if(a&&a.fromShape&&a.toShape&&Xv(a.fromShape)===Xv(a.toShape))return;this.setStateByComponent(i,r,t)}}}},e.prototype.toggle=function(){var t=rl(this.context);if(t){var e=t.hasState(this.stateName);this.setElementState(t,!e)}},e.prototype.reset=function(){this.setStateEnable(!1)},e}(Zv),Kv=Yv,Qv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="active",e}return(0,b.__extends)(e,t),e.prototype.active=function(){this.setState()},e}(Kv),Jv=Qv,ty=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.cache={},e}return(0,b.__extends)(e,t),e.prototype.getColorScale=function(t,e){var n=e.geometry.getAttribute("color");if(!n)return null;var r=t.getScaleByField(n.getFields()[0]);return r},e.prototype.getLinkPath=function(t,e){var n=this.context.view,r=n.getCoordinate().isTransposed,i=t.shape.getCanvasBBox(),a=e.shape.getCanvasBBox(),o=r?[["M",i.minX,i.minY],["L",a.minX,a.maxY],["L",a.maxX,a.maxY],["L",i.maxX,i.minY],["Z"]]:[["M",i.maxX,i.minY],["L",a.minX,a.minY],["L",a.minX,a.maxY],["L",i.maxX,i.maxY],["Z"]];return o},e.prototype.addLinkShape=function(t,e,n,r){var i={opacity:.4,fill:e.shape.attr("fill")};t.addShape({type:"path",attrs:(0,b.__assign)((0,b.__assign)({},(0,x.deepMix)({},i,(0,x.isFunction)(r)?r(i,e):r)),{path:this.getLinkPath(e,n)})})},e.prototype.linkByElement=function(t,e){var n=this,r=this.context.view,i=this.getColorScale(r,t);if(i){var a=pl(t,i.field);if(!this.cache[a]){var o=hl(r,i.field,a),s=this.linkGroup,l=s.addGroup();this.cache[a]=l;var u=o.length;(0,x.each)(o,(function(t,r){if(r=0}),e)},e}(ry),Sy=Cy,Ay=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="active",e}return(0,b.__extends)(e,t),e.prototype.highlight=function(){this.setState()},e.prototype.setElementState=function(t,e){var n=this.context.view,r=dl(n);fy(r,(function(e){return t===e}),e)},e.prototype.clear=function(){var t=this.context.view;hy(t)},e}(sy),ky=Ay,Ey=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="selected",e}return(0,b.__extends)(e,t),e.prototype.selected=function(){this.setState()},e}(ry),Dy=Ey,Fy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="selected",e}return(0,b.__extends)(e,t),e.prototype.selected=function(){this.setState()},e}(Kv),My=Fy,Oy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="selected",e}return(0,b.__extends)(e,t),e.prototype.selected=function(){this.setState()},e}(sy),By=Oy,Ty=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="",e.ignoreItemStates=[],e}return(0,b.__extends)(e,t),e.prototype.getTriggerListInfo=function(){var t=il(this.context),e=null;return ol(t)&&(e={item:t.item,list:t.component}),e},e.prototype.getAllowComponents=function(){var t=this,e=this.context.view,n=bl(e),r=[];return(0,x.each)(n,(function(e){e.isList()&&t.allowSetStateByElement(e)&&r.push(e)})),r},e.prototype.hasState=function(t,e){return t.hasState(e,this.stateName)},e.prototype.clearAllComponentsState=function(){var t=this,e=this.getAllowComponents();(0,x.each)(e,(function(e){e.clearItemsState(t.stateName)}))},e.prototype.allowSetStateByElement=function(t){var e=t.get("field");if(!e)return!1;if(this.cfg&&this.cfg.componentNames){var n=t.get("name");if(-1===this.cfg.componentNames.indexOf(n))return!1}var r=this.context.view,i=El(r,e);return i&&i.isCategory},e.prototype.allowSetStateByItem=function(t,e){var n=this.ignoreItemStates;if(n.length){var r=n.filter((function(n){return e.hasState(t,n)}));return 0===r.length}return!0},e.prototype.setStateByElement=function(t,e,n){var r=t.get("field"),i=this.context.view,a=El(i,r),o=pl(e,r),s=a.getText(o);this.setItemsState(t,s,n)},e.prototype.setStateEnable=function(t){var e=this,n=rl(this.context);if(n){var r=this.getAllowComponents();(0,x.each)(r,(function(r){e.setStateByElement(r,n,t)}))}else{var i=il(this.context);if(ol(i)){var a=i.item,o=i.component;this.allowSetStateByElement(o)&&this.allowSetStateByItem(a,o)&&this.setItemState(o,a,t)}}},e.prototype.setItemsState=function(t,e,n){var r=this,i=t.getItems();(0,x.each)(i,(function(i){i.name===e&&r.setItemState(t,i,n)}))},e.prototype.setItemState=function(t,e,n){t.setItemState(e,this.stateName,n)},e.prototype.setState=function(){this.setStateEnable(!0)},e.prototype.reset=function(){this.setStateEnable(!1)},e.prototype.toggle=function(){var t=this.getTriggerListInfo();if(t&&t.item){var e=t.list,n=t.item,r=this.hasState(e,n);this.setItemState(e,n,!r)}},e.prototype.clear=function(){var t=this.getTriggerListInfo();t?t.list.clearItemsState(this.stateName):this.clearAllComponentsState()},e}(Ls),Py=Ty,Iy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="active",e}return(0,b.__extends)(e,t),e.prototype.active=function(){this.setState()},e}(Py),Ly=Iy,Ry="inactive",Ny="active";function zy(t){var e=t.getItems();(0,x.each)(e,(function(e){t.hasState(e,Ny)&&t.setItemState(e,Ny,!1),t.hasState(e,Ry)&&t.setItemState(e,Ry,!1)}))}var jy="inactive",$y="active",Vy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName=$y,e.ignoreItemStates=["unchecked"],e}return(0,b.__extends)(e,t),e.prototype.setItemsState=function(t,e,n){this.setHighlightBy(t,(function(t){return t.name===e}),n)},e.prototype.setItemState=function(t,e,n){t.getItems();this.setHighlightBy(t,(function(t){return t===e}),n)},e.prototype.setHighlightBy=function(t,e,n){var r=t.getItems();if(n)(0,x.each)(r,(function(n){e(n)?(t.hasState(n,jy)&&t.setItemState(n,jy,!1),t.setItemState(n,$y,!0)):t.hasState(n,$y)||t.setItemState(n,jy,!0)}));else{var i=t.getItemsByState($y),a=!0;(0,x.each)(i,(function(t){if(!e(t))return a=!1,!1})),a?this.clear():(0,x.each)(r,(function(n){e(n)&&(t.hasState(n,$y)&&t.setItemState(n,$y,!1),t.setItemState(n,jy,!0))}))}},e.prototype.highlight=function(){this.setState()},e.prototype.clear=function(){var t=this.getTriggerListInfo();if(t)zy(t.list);else{var e=this.getAllowComponents();(0,x.each)(e,(function(t){t.clearItemsState($y),t.clearItemsState(jy)}))}},e}(Py),qy=Vy,Hy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="selected",e}return(0,b.__extends)(e,t),e.prototype.selected=function(){this.setState()},e}(Py),Uy=Hy,Gy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="unchecked",e}return(0,b.__extends)(e,t),e.prototype.unchecked=function(){this.setState()},e}(Py),Wy=Gy,Zy="unchecked",Xy="checked",Yy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName=Xy,e}return(0,b.__extends)(e,t),e.prototype.setItemState=function(t,e,n){this.setCheckedBy(t,(function(t){return t===e}),n)},e.prototype.setCheckedBy=function(t,e,n){var r=t.getItems();n&&(0,x.each)(r,(function(n){e(n)?(t.hasState(n,Zy)&&t.setItemState(n,Zy,!1),t.setItemState(n,Xy,!0)):t.hasState(n,Xy)||t.setItemState(n,Zy,!0)}))},e.prototype.toggle=function(){var t=this.getTriggerListInfo();if(t&&t.item){var e=t.list,n=t.item,r=!(0,x.some)(e.getItems(),(function(t){return e.hasState(t,Zy)}));r||e.hasState(n,Zy)?this.setItemState(e,n,!0):this.reset()}},e.prototype.checked=function(){this.setState()},e.prototype.reset=function(){var t=this.getAllowComponents();(0,x.each)(t,(function(t){t.clearItemsState(Xy),t.clearItemsState(Zy)}))},e}(Py),Ky=Yy,Qy="unchecked",Jy=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.toggle=function(){var t,e,n,r,i,a,o,s,l=this.getTriggerListInfo();if(null===l||void 0===l?void 0:l.item){var u=l.list,c=l.item,d=u.getItems(),h=d.filter((function(t){return!u.hasState(t,Qy)})),f=d.filter((function(t){return u.hasState(t,Qy)})),p=h[0];if(d.length===h.length)try{for(var g=(0,b.__values)(d),m=g.next();!m.done;m=g.next()){var v=m.value;u.setItemState(v,Qy,v.id!==c.id)}}catch(A){t={error:A}}finally{try{m&&!m.done&&(e=g.return)&&e.call(g)}finally{if(t)throw t.error}}else if(d.length-f.length===1)if(p.id===c.id)try{for(var y=(0,b.__values)(d),x=y.next();!x.done;x=y.next()){v=x.value;u.setItemState(v,Qy,!1)}}catch(k){n={error:k}}finally{try{x&&!x.done&&(r=y.return)&&r.call(y)}finally{if(n)throw n.error}}else try{for(var w=(0,b.__values)(d),_=w.next();!_.done;_=w.next()){v=_.value;u.setItemState(v,Qy,v.id!==c.id)}}catch(E){i={error:E}}finally{try{_&&!_.done&&(a=w.return)&&a.call(w)}finally{if(i)throw i.error}}else try{for(var C=(0,b.__values)(d),S=C.next();!S.done;S=C.next()){v=S.value;u.setItemState(v,Qy,v.id!==c.id)}}catch(D){o={error:D}}finally{try{S&&!S.done&&(s=C.return)&&s.call(C)}finally{if(o)throw o.error}}}},e}(Py),tb=Jy,eb="showRadio",nb="legend-radio-tip",rb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.timeStamp=0,e}return(0,b.__extends)(e,t),e.prototype.show=function(){var t=this.getTriggerListInfo();if(null===t||void 0===t?void 0:t.item){var e=t.list,n=t.item;e.setItemState(n,eb,!0)}},e.prototype.hide=function(){var t=this.getTriggerListInfo();if(null===t||void 0===t?void 0:t.item){var e=t.list,n=t.item;e.setItemState(n,eb,!1)}},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.tooltip&&this.tooltip.destroy()},e.prototype.showTip=function(){var t=this.context,e=t.event,n=this.timeStamp,r=+new Date,i=this.context.event.target;if(r-n>16&&"legend-item-radio"===i.get("name")){var a=this.location,o={x:e.x,y:e.y};this.timeStamp=r,this.location=o,a&&(0,x.isEqual)(a,o)||this.showTooltip(o)}},e.prototype.hideTip=function(){this.hideTooltip(),this.location=null},e.prototype.showTooltip=function(t){var e=this.context,n=e.event,r=n.target;if(r&&r.get("tip")){this.tooltip||this.renderTooltip();var i=e.view.getCanvas().get("el").getBoundingClientRect(),a=i.x,o=i.y;this.tooltip.update((0,b.__assign)((0,b.__assign)({title:r.get("tip")},t),{x:t.x+a,y:t.y+o})),this.tooltip.show()}},e.prototype.hideTooltip=function(){this.tooltip&&this.tooltip.hide()},e.prototype.renderTooltip=function(){var t,e=(t={},t[Ya]={padding:"6px 8px",transform:"translate(-50%, -80%)",background:"rgba(0,0,0,0.75)",color:"#fff","border-radius":"2px","z-index":100},t[Ka]={"font-size":"12px","line-height":"14px","margin-bottom":0,"word-break":"break-all"},t);document.getElementById(nb)&&document.body.removeChild(document.getElementById(nb));var n=new qo({parent:document.body,region:null,visible:!1,crosshairs:null,domStyles:e,containerId:nb});n.init(),n.setCapture(!1),this.tooltip=n},e}(Py),ib=rb,ab=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.maskShape=null,e.points=[],e.starting=!1,e.moving=!1,e.preMovePoint=null,e.shapeType="path",e}return(0,b.__extends)(e,t),e.prototype.getCurrentPoint=function(){var t=this.context.event;return{x:t.x,y:t.y}},e.prototype.emitEvent=function(t){var e="mask:".concat(t),n=this.context.view,r=this.context.event;n.emit(e,{target:this.maskShape,shape:this.maskShape,points:this.points,x:r.x,y:r.y})},e.prototype.createMask=function(){var t=this.context.view,e=this.getMaskAttrs(),n=t.foregroundGroup.addShape({type:this.shapeType,name:"mask",draggable:!0,attrs:(0,b.__assign)({fill:"#C5D4EB",opacity:.3},e)});return n},e.prototype.getMaskPath=function(){return[]},e.prototype.show=function(){this.maskShape&&(this.maskShape.show(),this.emitEvent("show"))},e.prototype.start=function(t){this.starting=!0,this.moving=!1,this.points=[this.getCurrentPoint()],this.maskShape||(this.maskShape=this.createMask(),this.maskShape.set("capture",!1)),this.updateMask(null===t||void 0===t?void 0:t.maskStyle),this.emitEvent("start")},e.prototype.moveStart=function(){this.moving=!0,this.preMovePoint=this.getCurrentPoint()},e.prototype.move=function(){if(this.moving&&this.maskShape){var t=this.getCurrentPoint(),e=this.preMovePoint,n=t.x-e.x,r=t.y-e.y,i=this.points;(0,x.each)(i,(function(t){t.x+=n,t.y+=r})),this.updateMask(),this.emitEvent("change"),this.preMovePoint=t}},e.prototype.updateMask=function(t){var e=(0,x.deepMix)({},this.getMaskAttrs(),t);this.maskShape.attr(e)},e.prototype.moveEnd=function(){this.moving=!1,this.preMovePoint=null},e.prototype.end=function(){this.starting=!1,this.emitEvent("end"),this.maskShape&&this.maskShape.set("capture",!0)},e.prototype.hide=function(){this.maskShape&&(this.maskShape.hide(),this.emitEvent("hide"))},e.prototype.resize=function(){this.starting&&this.maskShape&&(this.points.push(this.getCurrentPoint()),this.updateMask(),this.emitEvent("change"))},e.prototype.destroy=function(){this.points=[],this.maskShape&&this.maskShape.remove(),this.maskShape=null,this.preMovePoint=null,t.prototype.destroy.call(this)},e}(Ls),ob=ab,sb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.shapeType="circle",e}return(0,b.__extends)(e,t),e.prototype.getMaskAttrs=function(){var t=this.points,e=(0,x.last)(this.points),n=0,r=0,i=0;if(t.length){var a=t[0];n=xl(a,e)/2,r=(e.x+a.x)/2,i=(e.y+a.y)/2}return{x:r,y:i,r:n}},e}(ob),lb=sb,ub=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.shapeType="rect",e}return(0,b.__extends)(e,t),e.prototype.getRegion=function(){var t=this.points;return{start:(0,x.head)(t),end:(0,x.last)(t)}},e.prototype.getMaskAttrs=function(){var t=this.getRegion(),e=t.start,n=t.end,r=Math.min(e.x,n.x),i=Math.min(e.y,n.y),a=Math.abs(n.x-e.x),o=Math.abs(n.y-e.y);return{x:r,y:i,width:a,height:o}},e}(ob),cb=ub;function db(t){t.x=(0,x.clamp)(t.x,0,1),t.y=(0,x.clamp)(t.y,0,1)}var hb,fb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.dim="x",e.inPlot=!0,e}return(0,b.__extends)(e,t),e.prototype.getRegion=function(){var t=null,e=null,n=this.points,r=this.dim,i=this.context.view.getCoordinate(),a=i.invert((0,x.head)(n)),o=i.invert((0,x.last)(n));return this.inPlot&&(db(a),db(o)),"x"===r?(t=i.convert({x:a.x,y:0}),e=i.convert({x:o.x,y:1})):(t=i.convert({x:0,y:a.y}),e=i.convert({x:1,y:o.y})),{start:t,end:e}},e}(cb),pb=fb,gb=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getMaskPath=function(){var t=this.points,e=[];return t.length&&((0,x.each)(t,(function(t,n){0===n?e.push(["M",t.x,t.y]):e.push(["L",t.x,t.y])})),e.push(["L",t[0].x,t[0].y])),e},e.prototype.getMaskAttrs=function(){return{path:this.getMaskPath()}},e.prototype.addPoint=function(){this.resize()},e}(ob),mb=gb,vb=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getMaskPath=function(){var t=this.points;return wl(t,!0)},e}(mb),yb=vb,bb=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.setCursor=function(t){var e=this.context.view;e.getCanvas().setCursor(t)},e.prototype.default=function(){this.setCursor("default")},e.prototype.pointer=function(){this.setCursor("pointer")},e.prototype.move=function(){this.setCursor("move")},e.prototype.crosshair=function(){this.setCursor("crosshair")},e.prototype.wait=function(){this.setCursor("wait")},e.prototype.help=function(){this.setCursor("help")},e.prototype.text=function(){this.setCursor("text")},e.prototype.eResize=function(){this.setCursor("e-resize")},e.prototype.wResize=function(){this.setCursor("w-resize")},e.prototype.nResize=function(){this.setCursor("n-resize")},e.prototype.sResize=function(){this.setCursor("s-resize")},e.prototype.neResize=function(){this.setCursor("ne-resize")},e.prototype.nwResize=function(){this.setCursor("nw-resize")},e.prototype.seResize=function(){this.setCursor("se-resize")},e.prototype.swResize=function(){this.setCursor("sw-resize")},e.prototype.nsResize=function(){this.setCursor("ns-resize")},e.prototype.ewResize=function(){this.setCursor("ew-resize")},e}(Ls),xb=bb,wb=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.filterView=function(t,e,n){var r=this;t.getScaleByField(e)&&t.filter(e,n),t.views&&t.views.length&&(0,x.each)(t.views,(function(t){r.filterView(t,e,n)}))},e.prototype.filter=function(){var t=il(this.context);if(t){var e=this.context.view,n=t.component,r=n.get("field");if(ol(t)){if(r){var i=n.getItemsByState("unchecked"),a=El(e,r),o=i.map((function(t){return t.name}));o.length?this.filterView(e,r,(function(t){var e=a.getText(t);return!o.includes(e)})):this.filterView(e,r,null),e.render(!0)}}else if(sl(t)){var s=n.getValue(),l=(0,b.__read)(s,2),u=l[0],c=l[1];this.filterView(e,r,(function(t){return t>=u&&t<=c})),e.render(!0)}}},e}(Ls),_b=wb;function Cb(t,e,n,r){var i=Math.min(n[e],r[e]),a=Math.max(n[e],r[e]),o=(0,b.__read)(t.range,2),s=o[0],l=o[1];if(il&&(a=l),i===l&&a===l)return null;var u=t.invert(i),c=t.invert(a);if(t.isCategory){var d=t.values.indexOf(u),h=t.values.indexOf(c),f=t.values.slice(d,h+1);return function(t){return f.includes(t)}}return function(t){return t>=u&&t<=c}}(function(t){t["FILTER"]="brush-filter-processing",t["RESET"]="brush-filter-reset",t["BEFORE_FILTER"]="brush-filter:beforefilter",t["AFTER_FILTER"]="brush-filter:afterfilter",t["BEFORE_RESET"]="brush-filter:beforereset",t["AFTER_RESET"]="brush-filter:afterreset"})(hb||(hb={}));var Sb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.dims=["x","y"],e.startPoint=null,e.isStarted=!1,e}return(0,b.__extends)(e,t),e.prototype.hasDim=function(t){return this.dims.includes(t)},e.prototype.start=function(){var t=this.context;this.isStarted=!0,this.startPoint=t.getCurrentPoint()},e.prototype.filter=function(){var t,e;if(ll(this.context)){var n=this.context.event.target,r=n.getCanvasBBox();t={x:r.x,y:r.y},e={x:r.maxX,y:r.maxY}}else{if(!this.isStarted)return;t=this.startPoint,e=this.context.getCurrentPoint()}if(!(Math.abs(t.x-e.x)<5||Math.abs(t.x-e.y)<5)){var i=this.context,a=i.view,o=i.event,s={view:a,event:o,dims:this.dims};a.emit(hb.BEFORE_FILTER,Au.fromData(a,hb.BEFORE_FILTER,s));var l=a.getCoordinate(),u=l.invert(e),c=l.invert(t);if(this.hasDim("x")){var d=a.getXScale(),h=Cb(d,"x",u,c);this.filterView(a,d.field,h)}if(this.hasDim("y")){var f=a.getYScales()[0];h=Cb(f,"y",u,c);this.filterView(a,f.field,h)}this.reRender(a,{source:hb.FILTER}),a.emit(hb.AFTER_FILTER,Au.fromData(a,hb.AFTER_FILTER,s))}},e.prototype.end=function(){this.isStarted=!1},e.prototype.reset=function(){var t=this.context.view;if(t.emit(hb.BEFORE_RESET,Au.fromData(t,hb.BEFORE_RESET,{})),this.isStarted=!1,this.hasDim("x")){var e=t.getXScale();this.filterView(t,e.field,null)}if(this.hasDim("y")){var n=t.getYScales()[0];this.filterView(t,n.field,null)}this.reRender(t,{source:hb.RESET}),t.emit(hb.AFTER_RESET,Au.fromData(t,hb.AFTER_RESET,{}))},e.prototype.filterView=function(t,e,n){t.filter(e,n)},e.prototype.reRender=function(t,e){t.render(!0,e)},e}(Ls),Ab=Sb,kb=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.filterView=function(t,e,n){var r=Cl(t);(0,x.each)(r,(function(t){t.filter(e,n)}))},e.prototype.reRender=function(t){var e=Cl(t);(0,x.each)(e,(function(t){t.render(!0)}))},e}(Ab),Eb=kb,Db=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.filter=function(){var t=il(this.context),e=this.context.view,n=dl(e);if(ll(this.context)){var r=ul(this.context,10);r&&(0,x.each)(n,(function(t){r.includes(t)?t.show():t.hide()}))}else if(t){var i=t.component,a=i.get("field");if(ol(t)){if(a){var o=i.getItemsByState("unchecked"),s=El(e,a),l=o.map((function(t){return t.name}));(0,x.each)(n,(function(t){var e=pl(t,a),n=s.getText(e);l.indexOf(n)>=0?t.hide():t.show()}))}}else if(sl(t)){var u=i.getValue(),c=(0,b.__read)(u,2),d=c[0],h=c[1];(0,x.each)(n,(function(t){var e=pl(t,a);e>=d&&e<=h?t.show():t.hide()}))}}},e.prototype.clear=function(){var t=dl(this.context.view);(0,x.each)(t,(function(t){t.show()}))},e.prototype.reset=function(){this.clear()},e}(Ls),Fb=Db,Mb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.byRecord=!1,e}return(0,b.__extends)(e,t),e.prototype.filter=function(){ll(this.context)&&(this.byRecord?this.filterByRecord():this.filterByBBox())},e.prototype.filterByRecord=function(){var t=this.context.view,e=ul(this.context,10);if(e){var n=t.getXScale().field,r=t.getYScales()[0].field,i=e.map((function(t){return t.getModel().data})),a=Cl(t);(0,x.each)(a,(function(t){var e=dl(t);(0,x.each)(e,(function(t){var e=t.getModel().data;kl(i,e,n,r)?t.show():t.hide()}))}))}},e.prototype.filterByBBox=function(){var t=this,e=this.context.view,n=Cl(e);(0,x.each)(n,(function(e){var n=cl(t.context,e,10),r=dl(e);n&&(0,x.each)(r,(function(t){n.includes(t)?t.show():t.hide()}))}))},e.prototype.reset=function(){var t=Cl(this.context.view);(0,x.each)(t,(function(t){var e=dl(t);(0,x.each)(e,(function(t){t.show()}))}))},e}(Ls),Ob=Mb,Bb=10,Tb=5,Pb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.buttonGroup=null,e.buttonCfg={name:"button",text:"button",textStyle:{x:0,y:0,fontSize:12,fill:"#333333",cursor:"pointer"},padding:[8,10],style:{fill:"#f7f7f7",stroke:"#cccccc",cursor:"pointer"},activeStyle:{fill:"#e6e6e6"}},e}return(0,b.__extends)(e,t),e.prototype.getButtonCfg=function(){return(0,x.deepMix)(this.buttonCfg,this.cfg)},e.prototype.drawButton=function(){var t=this.getButtonCfg(),e=this.context.view.foregroundGroup.addGroup({name:t.name}),n=e.addShape({type:"text",name:"button-text",attrs:(0,b.__assign)({text:t.text},t.textStyle)}),r=n.getBBox(),i=vu(t.padding),a=e.addShape({type:"rect",name:"button-rect",attrs:(0,b.__assign)({x:r.x-i[3],y:r.y-i[0],width:r.width+i[1]+i[3],height:r.height+i[0]+i[2]},t.style)});a.toBack(),e.on("mouseenter",(function(){a.attr(t.activeStyle)})),e.on("mouseleave",(function(){a.attr(t.style)})),this.buttonGroup=e},e.prototype.resetPosition=function(){var t=this.context.view,e=t.getCoordinate(),n=e.convert({x:1,y:1}),r=this.buttonGroup,i=r.getBBox(),a=dr.transform(null,[["t",n.x-i.width-Bb,n.y+i.height+Tb]]);r.setMatrix(a)},e.prototype.show=function(){this.buttonGroup||this.drawButton(),this.resetPosition(),this.buttonGroup.show()},e.prototype.hide=function(){this.buttonGroup&&this.buttonGroup.hide()},e.prototype.destroy=function(){var e=this.buttonGroup;e&&e.remove(),t.prototype.destroy.call(this)},e}(Ls),Ib=Pb,Lb=4,Rb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.starting=!1,e.dragStart=!1,e}return(0,b.__extends)(e,t),e.prototype.start=function(){this.starting=!0,this.startPoint=this.context.getCurrentPoint()},e.prototype.drag=function(){if(this.startPoint){var t=this.context.getCurrentPoint(),e=this.context.view,n=this.context.event;this.dragStart?e.emit("drag",{target:n.target,x:n.x,y:n.y}):xl(t,this.startPoint)>Lb&&(e.emit("dragstart",{target:n.target,x:n.x,y:n.y}),this.dragStart=!0)}},e.prototype.end=function(){if(this.dragStart){var t=this.context.view,e=this.context.event;t.emit("dragend",{target:e.target,x:e.x,y:e.y})}this.starting=!1,this.dragStart=!1},e}(Ls),Nb=Rb,zb=5,jb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.starting=!1,e.isMoving=!1,e.startPoint=null,e.startMatrix=null,e}return(0,b.__extends)(e,t),e.prototype.start=function(){this.starting=!0,this.startPoint=this.context.getCurrentPoint(),this.startMatrix=this.context.view.middleGroup.getMatrix()},e.prototype.move=function(){if(this.starting){var t=this.startPoint,e=this.context.getCurrentPoint(),n=xl(t,e);if(n>zb&&!this.isMoving&&(this.isMoving=!0),this.isMoving){var r=this.context.view,i=dr.transform(this.startMatrix,[["t",e.x-t.x,e.y-t.y]]);r.backgroundGroup.setMatrix(i),r.foregroundGroup.setMatrix(i),r.middleGroup.setMatrix(i)}}},e.prototype.end=function(){this.isMoving&&(this.isMoving=!1),this.startMatrix=null,this.starting=!1,this.startPoint=null},e.prototype.reset=function(){this.starting=!1,this.startPoint=null,this.isMoving=!1;var t=this.context.view;t.backgroundGroup.resetMatrix(),t.foregroundGroup.resetMatrix(),t.middleGroup.resetMatrix(),this.isMoving=!1},e}(Ls),$b=jb,Vb="x",qb="y",Hb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.dims=[Vb,qb],e.cfgFields=["dims"],e.cacheScaleDefs={},e}return(0,b.__extends)(e,t),e.prototype.hasDim=function(t){return this.dims.includes(t)},e.prototype.getScale=function(t){var e=this.context.view;return"x"===t?e.getXScale():e.getYScales()[0]},e.prototype.resetDim=function(t){var e=this.context.view;if(this.hasDim(t)&&this.cacheScaleDefs[t]){var n=this.getScale(t);e.scale(n.field,this.cacheScaleDefs[t]),this.cacheScaleDefs[t]=null}},e.prototype.reset=function(){this.resetDim(Vb),this.resetDim(qb);var t=this.context.view;t.render(!0)},e}(Ls),Ub=Hb,Gb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.startPoint=null,e.starting=!1,e.startCache={},e}return(0,b.__extends)(e,t),e.prototype.start=function(){var t=this;this.startPoint=this.context.getCurrentPoint(),this.starting=!0;var e=this.dims;(0,x.each)(e,(function(e){var n=t.getScale(e),r=n.min,i=n.max,a=n.values;t.startCache[e]={min:r,max:i,values:a}}))},e.prototype.end=function(){this.startPoint=null,this.starting=!1,this.startCache={}},e.prototype.translate=function(){var t=this;if(this.starting){var e=this.startPoint,n=this.context.view.getCoordinate(),r=this.context.getCurrentPoint(),i=n.invert(e),a=n.invert(r),o=a.x-i.x,s=a.y-i.y,l=this.context.view,u=this.dims;(0,x.each)(u,(function(e){t.translateDim(e,{x:-1*o,y:-1*s})})),l.render(!0)}},e.prototype.translateDim=function(t,e){if(this.hasDim(t)){var n=this.getScale(t);n.isLinear&&this.translateLinear(t,n,e)}},e.prototype.translateLinear=function(t,e,n){var r=this.context.view,i=this.startCache[t],a=i.min,o=i.max,s=o-a,l=n[t]*s;this.cacheScaleDefs[t]||(this.cacheScaleDefs[t]={nice:e.nice,min:a,max:o}),r.scale(e.field,{nice:!1,min:a+l,max:o+l})},e.prototype.reset=function(){t.prototype.reset.call(this),this.startPoint=null,this.starting=!1},e}(Ub),Wb=Gb,Zb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.zoomRatio=.05,e}return(0,b.__extends)(e,t),e.prototype.zoomIn=function(){this.zoom(this.zoomRatio)},e.prototype.zoom=function(t){var e=this,n=this.dims;(0,x.each)(n,(function(n){e.zoomDim(n,t)})),this.context.view.render(!0)},e.prototype.zoomOut=function(){this.zoom(-1*this.zoomRatio)},e.prototype.zoomDim=function(t,e){if(this.hasDim(t)){var n=this.getScale(t);n.isLinear&&this.zoomLinear(t,n,e)}},e.prototype.zoomLinear=function(t,e,n){var r=this.context.view;this.cacheScaleDefs[t]||(this.cacheScaleDefs[t]={nice:e.nice,min:e.min,max:e.max});var i=this.cacheScaleDefs[t],a=i.max-i.min,o=e.min,s=e.max,l=n*a,u=o-l,c=s+l,d=c-u,h=d/a;c>u&&h<100&&h>.01&&r.scale(e.field,{nice:!1,min:o-l,max:s+l})},e}(Ub),Xb=Zb;function Yb(t){var e=t.gEvent.originalEvent;return e.deltaY>0}var Kb,Qb=1,Jb=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.scroll=function(t){var e=this.context,n=e.view,r=e.event;if(n.getOptions().scrollbar){var i=(null===t||void 0===t?void 0:t.wheelDelta)||Qb,a=n.getController("scrollbar"),o=n.getXScale(),s=n.getOptions().data,l=(0,x.size)((0,x.valuesOfKey)(s,o.field)),u=(0,x.size)(o.values),c=a.getValue(),d=Math.floor((l-u)*c),h=d+(Yb(r)?i:-i),f=i/(l-u)/1e4,p=(0,x.clamp)(h/(l-u)+f,0,1);a.setValue(p)}},e}(Ls),tx=Jb,ex="aixs-description-tooltip",nx=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.show=function(){var t=this.context,e=il(t).axis,n=e.cfg.title,r=n.description,i=n.text,a=n.descriptionTooltipStyle,o=t.event,s=o.x,l=o.y;this.tooltip||this.renderTooltip(),this.tooltip.update({title:i||"",customContent:function(){return'\n
    \n
    \n 字段说明:').concat(r,"\n
    \n
    \n ")},x:s,y:l}),this.tooltip.show()},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.tooltip&&this.tooltip.destroy()},e.prototype.hide=function(){this.tooltip&&this.tooltip.hide()},e.prototype.renderTooltip=function(){var t,e=this.context.view,n=e.canvas,r={start:{x:0,y:0},end:{x:n.get("width"),y:n.get("height")}},i=new qo({parent:n.get("el").parentNode,region:r,visible:!1,containerId:ex,domStyles:(0,b.__assign)({},(0,x.deepMix)({},(t={},t[Ya]={"max-width":"50%",padding:"10px","line-height":"15px","font-size":"12px",color:"rgba(0, 0, 0, .65)"},t[Ka]={"word-break":"break-all","margin-bottom":"3px"},t)))});i.init(),i.setCapture(!1),this.tooltip=i},e}(Ls),rx=nx;function ix(t){return t.isInPlot()}function ax(t){return t.gEvent.preventDefault(),t.gEvent.originalEvent.deltaY>0}function ox(){for(var t=[],e=0;e"},key:(0===r?"top":"bottom")+"-statistic"},sx(e,["offsetX","offsetY","rotate","style","formatter"])))}}))},Nx=function(t,e,n){var r=e.statistic,i=r.title,a=r.content;[i,a].forEach((function(e){if(e){var r=(0,x.isFunction)(e.style)?e.style(n):e.style;t.annotation().html((0,b.__assign)({position:["50%","100%"],html:function(t,i){var a=i.getCoordinate(),o=i.views[0].getCoordinate(),s=o.getCenter(),l=o.getRadius(),u=Math.max(Math.sin(o.startAngle),Math.sin(o.endAngle))*l,c=s.y+u-a.y.start-parseFloat((0,x.get)(r,"fontSize",0)),d=a.getRadius()*a.innerRadius*2;Ix(t,(0,b.__assign)({width:d+"px",transform:"translate(-50%, "+c+"px)"},Px(r)));var h=i.getData();if(e.customHtml)return e.customHtml(t,i,n,h);var f=e.content;return e.formatter&&(f=e.formatter(n,h)),f?(0,x.isString)(f)?f:""+f:"
    "}},sx(e,["offsetX","offsetY","rotate","style","formatter"])))}}))};function zx(){return Lx||(Lx=document.createElement("canvas").getContext("2d")),Lx}(0,x.memoize)((function(t,e){void 0===e&&(e={});var n=e.fontSize,r=e.fontFamily,i=void 0===r?"sans-serif":r,a=e.fontWeight,o=e.fontStyle,s=e.fontVariant,l=zx();l.font=[o,a,s,n+"px",i].join(" ");var u=l.measureText((0,x.isString)(t)?t:"");return u.width}),(function(t,e){return void 0===e&&(e={}),(0,b.__spreadArrays)([t],(0,x.values)(e)).join("")}));function jx(t){return"number"===typeof t&&!isNaN(t)}function $x(t,e,n){var r=Math.min(e,n),i=Math.max(e,n);return t>=r&&t<=i}function Vx(t,e){if(!t)return{};var n=t.filter((function(t){var n=(0,x.get)(t,[e]);return(0,x.isNumber)(n)&&!isNaN(n)})),r=n.every((function(t){return(0,x.get)(t,[e])>=0})),i=n.every((function(t){return(0,x.get)(t,[e])<=0}));return r?{min:0}:i?{max:0}:{}}function qx(t,e,n,r,i){if(void 0===i&&(i=[]),!Array.isArray(t))return{nodes:[],links:[]};var a=[],o={},s=-1;return t.forEach((function(t){var l=t[e],u=t[n],c=t[r],d=sx(t,i);o[l]||(o[l]=(0,b.__assign)({id:++s,name:l},d)),o[u]||(o[u]=(0,b.__assign)({id:++s,name:u},d)),a.push((0,b.__assign)({source:o[l].id,target:o[u].id,value:c},d))})),{nodes:Object.values(o).sort((function(t,e){return t.id-e.id})),links:a}}function Hx(t,e){var n=(0,x.filter)(t,(function(t){var n=t[e];return null===n||"number"===typeof n&&!isNaN(n)}));return dx(Kb.WARN,n.length===t.length,"illegal data existed in chart data."),n}function Ux(t){if((0,x.isNumber)(t))return[t,t,t,t];if((0,x.isArray)(t)){var e=t.length;if(1===e)return[t[0],t[0],t[0],t[0]];if(2===e)return[t[0],t[1],t[0],t[1]];if(3===e)return[t[0],t[1],t[2],t[1]];if(4===e)return t}return[0,0,0,0]}function Gx(t,e,n){void 0===e&&(e="bottom"),void 0===n&&(n=25);var r=Ux(t),i=[e.startsWith("top")?n:0,e.startsWith("right")?n:0,e.startsWith("bottom")?n:0,e.startsWith("left")?n:0];return[r[0]+i[0],r[1]+i[1],r[2]+i[2],r[3]+i[3]]}function Wx(t){var e=t.map((function(t){return Ux(t)})),n=[0,0,0,0];return e.length>0&&(n=n.map((function(t,n){return e.forEach((function(r,i){t+=e[i][n]})),t}))),n}var Zx={locale:"en-US"};var Xx={};function Yx(t,e){Xx[t]=e}function Kx(t){return{get:function(e,n){return lx((0,x.get)(Xx[t],e)||(0,x.get)(Xx[Zx.locale],e)||(0,x.get)(Xx["en-US"],e)||e,n)}}}var Qx={locale:"en-US",general:{increase:"Increase",decrease:"Decrease",root:"Root"},statistic:{total:"Total"},conversionTag:{label:"Rate"},legend:{},tooltip:{},slider:{},scrollbar:{},waterfall:{total:"Total"}},Jx={locale:"zh-CN",general:{increase:"增加",decrease:"减少",root:"初始"},statistic:{total:"总计"},conversionTag:{label:"转化率"},legend:{},tooltip:{},slider:{},scrollbar:{},waterfall:{total:"总计"}},tw=n(18587),ew="data-chart-source-type",nw=["padding","appendPadding","renderer","pixelRatio","syncViewPadding","supportCSSTransform","limitInPlot"],rw=function(t){function e(e,n){var r=t.call(this)||this;return r.container="string"===typeof e?document.getElementById(e):e,r.options=Bx({},r.getDefaultOptions(),n),r.createG2(),r.bindEvents(),r}return(0,b.__extends)(e,t),e.getDefaultOptions=function(){return{renderer:"canvas",xAxis:{nice:!0,label:{autoRotate:!1,autoHide:{type:"equidistance",cfg:{minGap:6}}}},yAxis:{nice:!0,label:{autoHide:!0,autoRotate:!1}},animation:!0}},e.prototype.createG2=function(){var t=this.options,e=t.width,n=t.height,r=t.defaultInteractions;this.chart=new Iu((0,b.__assign)((0,b.__assign)((0,b.__assign)((0,b.__assign)({container:this.container,autoFit:!1},this.getChartSize(e,n)),{localRefresh:!1}),sx(this.options,nw)),{defaultInteractions:r})),this.container.setAttribute(ew,"G2Plot")},e.prototype.getChartSize=function(t,e){var n=hx(this.container);return{width:t||n.width||400,height:e||n.height||400}},e.prototype.bindEvents=function(){var t=this;this.chart&&this.chart.on("*",(function(e){(null===e||void 0===e?void 0:e.type)&&t.emit(e.type,e)}))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.render=function(){this.chart.clear(),this.chart.options={data:[],animate:!0},this.chart.views=[],this.execAdaptor(),this.chart.render(),this.bindSizeSensor()},e.prototype.update=function(t){this.updateOption(t),this.render()},e.prototype.updateOption=function(t){this.options=Bx({},this.options,t)},e.prototype.setState=function(t,e,n){void 0===n&&(n=!0);var r=gx(this.chart);(0,x.each)(r,(function(r){e(r.getData())&&r.setState(t,n)}))},e.prototype.getStates=function(){var t=gx(this.chart),e=[];return(0,x.each)(t,(function(t){var n=t.getData(),r=t.getStates();(0,x.each)(r,(function(r){e.push({data:n,state:r,geometry:t.geometry,element:t})}))})),e},e.prototype.changeData=function(t){this.update({data:t})},e.prototype.changeSize=function(t,e){this.chart.changeSize(t,e)},e.prototype.addAnnotations=function(t,e){e=e||this.chart;var n=(0,b.__spreadArrays)(t),r=e.getController("annotation"),i=r.getComponents().map((function(t){return t.extra}));r.clear(!0);for(var a=function(t){var e=i[t],a=n.findIndex((function(t){return t.id&&t.id===e.id}));-1!==a&&(e=Bx({},e,n[a]),n.splice(a,1)),r.annotation(e)},o=0;ox){var _=w/g.length,C=Math.max(1,Math.ceil(x/_)-1),S=g.slice(0,C)+"...";y.attr("text",S)}}}}function y_(t,e,n){m_(t,e,n),v_(t,e,n)}function b_(t,e,n){return void 0===e&&(e=!0),void 0===n&&(n=!1),function(r){var i=r.options,a=r.chart,o=i.conversionTag,s=i.theme;return o&&!n&&(a.theme(Bx({},(0,x.isObject)(s)?s:Jl(s),{columnWidthRatio:1/3})),a.annotation().shape({render:function(n,r){var i=n.addGroup({id:a.id+"-conversion-tag-group",name:"conversion-tag-group"}),s=(0,x.find)(a.geometries,(function(t){return"interval"===t.type})),l={view:r,geometry:s,group:i,field:t,horizontal:e,options:p_(o,e)},u=s.elements;(0,x.each)(u,(function(t,e){e>0&&y_(l,u[e-1],t)}))}})),r}}var x_={hover:"__interval-connected-area-hover__",click:"__interval-connected-area-click__"},w_=function(t,e){return"hover"===t?[{trigger:"interval:mouseenter",action:["element-highlight-by-color:highlight","element-link-by-color:link"],arg:[null,{style:e}]}]:[{trigger:"interval:click",action:["element-highlight-by-color:clear","element-highlight-by-color:highlight","element-link-by-color:clear","element-link-by-color:unlink","element-link-by-color:link"],arg:[null,null,null,null,{style:e}]}]};function __(t){return void 0===t&&(t=!1),function(e){var n=e.chart,r=e.options,i=r.connectedArea,a=function(){n.removeInteraction(x_.hover),n.removeInteraction(x_.click)};if(!t&&i){var o=i.trigger||"hover";a(),n.interaction(x_[o],{start:w_(o,i.style)})}else a();return e}}zl(x_.hover,{start:w_(x_.hover),end:[{trigger:"interval:mouseleave",action:["element-highlight-by-color:reset","element-link-by-color:unlink"]}]}),zl(x_.click,{start:w_(x_.click),end:[{trigger:"document:mousedown",action:["element-highlight-by-color:clear","element-link-by-color:clear"]}]});var C_=10,S_=5,A_={padding:[8,10],text:"reset",textStyle:{default:{x:0,y:0,fontSize:12,fill:"#333333",cursor:"pointer"}},buttonStyle:{default:{fill:"#f7f7f7",stroke:"#cccccc",cursor:"pointer"},active:{fill:"#e6e6e6"}}},k_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.buttonGroup=null,e.buttonCfg=(0,b.__assign)({name:"button"},A_),e}return(0,b.__extends)(e,t),e.prototype.getButtonCfg=function(){var t=this.context.view,e=(0,x.get)(t,["interactions","filter-action","cfg","buttonConfig"]);return Bx(this.buttonCfg,e,this.cfg)},e.prototype.drawButton=function(){var t=this.getButtonCfg(),e=this.context.view.foregroundGroup.addGroup({name:t.name}),n=this.drawText(e);this.drawBackground(e,n.getBBox()),this.buttonGroup=e},e.prototype.drawText=function(t){var e,n=this.getButtonCfg();return t.addShape({type:"text",name:"button-text",attrs:(0,b.__assign)({text:n.text},null===(e=n.textStyle)||void 0===e?void 0:e.default)})},e.prototype.drawBackground=function(t,e){var n,r=this.getButtonCfg(),i=Ux(r.padding),a=t.addShape({type:"rect",name:"button-rect",attrs:(0,b.__assign)({x:e.x-i[3],y:e.y-i[0],width:e.width+i[1]+i[3],height:e.height+i[0]+i[2]},null===(n=r.buttonStyle)||void 0===n?void 0:n.default)});return a.toBack(),t.on("mouseenter",(function(){var t;a.attr(null===(t=r.buttonStyle)||void 0===t?void 0:t.active)})),t.on("mouseleave",(function(){var t;a.attr(null===(t=r.buttonStyle)||void 0===t?void 0:t.default)})),a},e.prototype.resetPosition=function(){var t=this.context.view,e=t.getCoordinate(),n=e.convert({x:1,y:1}),r=this.buttonGroup,i=r.getBBox(),a=nd.transform(null,[["t",n.x-i.width-C_,n.y+i.height+S_]]);r.setMatrix(a)},e.prototype.show=function(){this.buttonGroup||this.drawButton(),this.resetPosition(),this.buttonGroup.show()},e.prototype.hide=function(){this.buttonGroup&&this.buttonGroup.hide()},e.prototype.destroy=function(){var e=this.buttonGroup;e&&e.remove(),t.prototype.destroy.call(this)},e}(Ls);function E_(t){return t.isInPlot()}function D_(t,e,n){var r=e||"rect";switch(t){case"brush":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:E_,action:["brush:start",r+"-mask:start",r+"-mask:show"],arg:[null,{maskStyle:null===n||void 0===n?void 0:n.style}]}],processing:[{trigger:"mousemove",isEnable:E_,action:[r+"-mask:resize"]}],end:[{trigger:"mouseup",isEnable:E_,action:["brush:filter","brush:end",r+"-mask:end",r+"-mask:hide","brush-reset-button:show"]}],rollback:[{trigger:"brush-reset-button:click",action:["brush:reset","brush-reset-button:hide","cursor:crosshair"]}]};case"brush-highlight":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"mask:mouseenter",action:"cursor:move"},{trigger:"plot:mouseleave",action:"cursor:default"},{trigger:"mask:mouseleave",action:"cursor:crosshair"}],start:[{trigger:"plot:mousedown",isEnable:function(t){return!t.isInShape("mask")},action:[r+"-mask:start",r+"-mask:show"],arg:[{maskStyle:null===n||void 0===n?void 0:n.style}]},{trigger:"mask:dragstart",action:[r+"-mask:moveStart"]}],processing:[{trigger:"plot:mousemove",action:[r+"-mask:resize"]},{trigger:"mask:drag",action:[r+"-mask:move"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:[r+"-mask:end"]},{trigger:"mask:dragend",action:[r+"-mask:moveEnd"]},{trigger:"document:mouseup",isEnable:function(t){return!t.isInPlot()},action:["element-range-highlight:clear",r+"-mask:end",r+"-mask:hide"]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear",r+"-mask:hide"]}]};case"brush-x":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:E_,action:["brush-x:start",r+"-mask:start",r+"-mask:show"],arg:[null,{maskStyle:null===n||void 0===n?void 0:n.style}]}],processing:[{trigger:"mousemove",isEnable:E_,action:[r+"-mask:resize"]}],end:[{trigger:"mouseup",isEnable:E_,action:["brush-x:filter","brush-x:end",r+"-mask:end",r+"-mask:hide"]}],rollback:[{trigger:"dblclick",action:["brush-x:reset"]}]};case"brush-x-highlight":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"mask:mouseenter",action:"cursor:move"},{trigger:"plot:mouseleave",action:"cursor:default"},{trigger:"mask:mouseleave",action:"cursor:crosshair"}],start:[{trigger:"plot:mousedown",isEnable:function(t){return!t.isInShape("mask")},action:[r+"-mask:start",r+"-mask:show"],arg:[{maskStyle:null===n||void 0===n?void 0:n.style}]},{trigger:"mask:dragstart",action:[r+"-mask:moveStart"]}],processing:[{trigger:"plot:mousemove",action:[r+"-mask:resize"]},{trigger:"mask:drag",action:[r+"-mask:move"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:[r+"-mask:end"]},{trigger:"mask:dragend",action:[r+"-mask:moveEnd"]},{trigger:"document:mouseup",isEnable:function(t){return!t.isInPlot()},action:["element-range-highlight:clear",r+"-mask:end",r+"-mask:hide"]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear",r+"-mask:hide"]}]};case"brush-y":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:E_,action:["brush-y:start",r+"-mask:start",r+"-mask:show"],arg:[null,{maskStyle:null===n||void 0===n?void 0:n.style}]}],processing:[{trigger:"mousemove",isEnable:E_,action:[r+"-mask:resize"]}],end:[{trigger:"mouseup",isEnable:E_,action:["brush-y:filter","brush-y:end",r+"-mask:end",r+"-mask:hide"]}],rollback:[{trigger:"dblclick",action:["brush-y:reset"]}]};case"brush-y-highlight":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"mask:mouseenter",action:"cursor:move"},{trigger:"plot:mouseleave",action:"cursor:default"},{trigger:"mask:mouseleave",action:"cursor:crosshair"}],start:[{trigger:"plot:mousedown",isEnable:function(t){return!t.isInShape("mask")},action:[r+"-mask:start",r+"-mask:show"],arg:[{maskStyle:null===n||void 0===n?void 0:n.style}]},{trigger:"mask:dragstart",action:[r+"-mask:moveStart"]}],processing:[{trigger:"plot:mousemove",action:[r+"-mask:resize"]},{trigger:"mask:drag",action:[r+"-mask:move"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:[r+"-mask:end"]},{trigger:"mask:dragend",action:[r+"-mask:moveEnd"]},{trigger:"document:mouseup",isEnable:function(t){return!t.isInPlot()},action:["element-range-highlight:clear",r+"-mask:end",r+"-mask:hide"]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear",r+"-mask:hide"]}]};default:return{}}}Vs("brush-reset-button",k_,{name:"brush-reset-button"}),zl("filter-action",{}),zl("brush",D_("brush")),zl("brush-highlight",D_("brush-highlight")),zl("brush-x",D_("brush-x","x-rect")),zl("brush-y",D_("brush-y","y-rect")),zl("brush-x-highlight",D_("brush-x-highlight","x-rect")),zl("brush-y-highlight",D_("brush-y-highlight","y-rect"));var F_=["brush","brush-x","brush-y","brush-highlight","brush-x-highlight","brush-y-highlight"];function M_(t){var e=t.options,n=e.brush,r=(0,x.filter)(e.interactions||[],(function(t){return-1===F_.indexOf(t.type)}));return(null===n||void 0===n?void 0:n.enabled)&&(F_.forEach((function(t){var e,i=!1;switch(n.type){case"x-rect":i=t===("highlight"===n.action?"brush-x-highlight":"brush-x");break;case"y-rect":i=t===("highlight"===n.action?"brush-y-highlight":"brush-y");break;default:i=t===("highlight"===n.action?"brush-highlight":"brush");break}var a={type:t,enable:i};((null===(e=n.mask)||void 0===e?void 0:e.style)||n.type)&&(a.cfg=D_(t,n.type,n.mask)),r.push(a)})),"highlight"!==(null===n||void 0===n?void 0:n.action)&&r.push({type:"filter-action",cfg:{buttonConfig:n.button}})),Bx({},t,{options:{interactions:r}})}function O_(t){var e=t.options,n=e.legend,r=e.seriesField,i=e.isStack;return r?!1!==n&&(n=(0,b.__assign)({position:i?"right-top":"top-left"},n)):n=!1,t.options.legend=n,t}function B_(t){var e=t.chart,n=t.options,r=n.data,i=n.columnStyle,a=n.color,o=n.columnWidthRatio,s=n.isPercent,l=n.isGroup,u=n.isStack,c=n.xField,d=n.yField,h=n.seriesField,f=n.groupField,p=n.tooltip,g=n.shape,m=s&&l&&u?a_(r,d,[c,f],d):o_(r,d,c,d,s),v=[];u&&h&&!l?m.forEach((function(t){var e=v.find((function(e){return e[c]===t[c]&&e[h]===t[h]}));e?e[d]+=t[d]||0:v.push((0,b.__assign)({},t))})):v=m,e.data(v);var y=s?(0,b.__assign)({formatter:function(t){return{name:l&&u?t[h]+" - "+t[f]:t[h]||t[c],value:(100*Number(t[d])).toFixed(2)+"%"}}},p):p,x=Bx({},t,{options:{data:v,widthRatio:o,tooltip:y,interval:{shape:g,style:i,color:a}}});return Vw(x),x}function T_(t){var e,n,r=t.options,i=r.xAxis,a=r.yAxis,o=r.xField,s=r.yField,l=r.data,u=r.isPercent,c=u?{max:1,min:0,minLimit:0,maxLimit:1}:{};return ox(Mw((e={},e[o]=i,e[s]=a,e),(n={},n[o]={type:"cat"},n[s]=(0,b.__assign)((0,b.__assign)({},Vx(l,s)),c),n)))(t)}function P_(t){var e=t.chart,n=t.options,r=n.xAxis,i=n.yAxis,a=n.xField,o=n.yField;return!1===r?e.axis(a,!1):e.axis(a,r),!1===i?e.axis(o,!1):e.axis(o,i),t}function I_(t){var e=t.chart,n=t.options,r=n.legend,i=n.seriesField;return r&&i?e.legend(i,r):!1===r&&e.legend(!1),t}function L_(t){var e=t.chart,n=t.options,r=n.label,i=n.yField,a=n.isRange,o=fx(e,"interval");if(r){var s=r.callback,l=(0,b.__rest)(r,["callback"]);o.label({fields:[i],callback:s,cfg:(0,b.__assign)({layout:(null===l||void 0===l?void 0:l.position)?void 0:[{type:"interval-adjust-position"},{type:"interval-hide-overlap"},{type:"adjust-color"},{type:"limit-in-plot",cfg:{action:"hide"}}]},xx(a?(0,b.__assign)({content:function(t){var e;return null===(e=t[i])||void 0===e?void 0:e.join("-")}},l):l))})}else o.label(!1);return t}function R_(t){var e=t.chart,n=t.options,r=n.tooltip,i=n.isGroup,a=n.isStack,o=n.groupField,s=n.data,l=n.xField,u=n.yField,c=n.seriesField;if(!1===r)e.tooltip(!1);else{var d=r;if(i&&a){var h=(null===d||void 0===d?void 0:d.formatter)||function(t){return{name:t[c]+" - "+t[o],value:t[u]}};d=(0,b.__assign)((0,b.__assign)({},d),{customItems:function(t){var e=[];return(0,x.each)(t,(function(t){var n=(0,x.filter)(s,(function(e){return(0,x.isMatch)(e,sx(t.data,[l,c]))}));n.forEach((function(n){e.push((0,b.__assign)((0,b.__assign)((0,b.__assign)({},t),{value:n[u],data:n,mappingData:{_origin:n}}),h(n)))}))})),e}})}e.tooltip(d)}return t}function N_(t,e){void 0===e&&(e=!1);var n=t.options,r=n.seriesField;return ox(O_,kw,ww("columnStyle"),Ew,Tw("rect"),B_,T_,P_,I_,R_,Dw,Fw,L_,M_,Sw,Aw,Ow(),b_(n.yField,!e,!!r),__(!n.isStack),Bw)(t)}var z_=Bx({},rw.getDefaultOptions(),{columnWidthRatio:.6,marginRatio:1/32,tooltip:{shared:!0,showMarkers:!1,offset:20},legend:{radio:{}},interactions:[{type:"active-region"}]}),j_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="column",e}return(0,b.__extends)(e,t),e.getDefaultOptions=function(){return z_},e.prototype.changeData=function(t){this.updateOption({data:t});var e=this.options,n=e.yField,r=e.xField,i=e.isPercent,a=this,o=a.chart,s=a.options;T_({chart:o,options:s}),this.chart.changeData(o_(t,n,r,n,i))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return N_},e}(rw);function $_(t){var e=t.options,n=e.xField,r=e.yField,i=e.xAxis,a=e.yAxis,o={left:"bottom",right:"top",top:"left",bottom:"right"},s=!1!==a&&(0,b.__assign)({position:o[(null===a||void 0===a?void 0:a.position)||"left"]},a),l=!1!==i&&(0,b.__assign)({position:o[(null===i||void 0===i?void 0:i.position)||"bottom"]},i);return(0,b.__assign)((0,b.__assign)({},t),{options:(0,b.__assign)((0,b.__assign)({},e),{xField:r,yField:n,xAxis:s,yAxis:l})})}function V_(t){var e=t.options,n=e.label;return n&&!n.position&&(n.position="left",n.layout||(n.layout=[{type:"interval-adjust-position"},{type:"interval-hide-overlap"},{type:"adjust-color"},{type:"limit-in-plot",cfg:{action:"hide"}}])),Bx({},t,{options:{label:n}})}function q_(t){var e=t.options,n=e.seriesField,r=e.isStack,i=e.legend;return n?!1!==i&&(i=(0,b.__assign)({position:r?"top-left":"right-top"},i||{})):i=!1,Bx({},t,{options:{legend:i}})}function H_(t){var e=t.options,n=[{type:"transpose"},{type:"reflectY"}].concat(e.coordinate||[]);return Bx({},t,{options:{coordinate:n}})}function U_(t){var e=t.chart,n=t.options,r=n.barStyle,i=n.barWidthRatio,a=n.minBarWidth,o=n.maxBarWidth,s=n.barBackground;return N_({chart:e,options:(0,b.__assign)((0,b.__assign)({},n),{columnStyle:r,columnWidthRatio:i,minColumnWidth:a,maxColumnWidth:o,columnBackground:s})},!0)}function G_(t){return ox($_,V_,q_,Cw,H_,U_)(t)}var W_=Bx({},rw.getDefaultOptions(),{barWidthRatio:.6,marginRatio:1/32,tooltip:{shared:!0,showMarkers:!1,offset:20},legend:{radio:{}},interactions:[{type:"active-region"}]}),Z_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bar",e}return(0,b.__extends)(e,t),e.getDefaultOptions=function(){return W_},e.prototype.changeData=function(t){var e,n;this.updateOption({data:t});var r=this,i=r.chart,a=r.options,o=a.isPercent,s=a.xField,l=a.yField,u=a.xAxis,c=a.yAxis;e=[l,s],s=e[0],l=e[1],n=[c,u],u=n[0],c=n[1];var d=(0,b.__assign)((0,b.__assign)({},a),{xField:s,yField:l,yAxis:c,xAxis:u});T_({chart:i,options:d}),i.changeData(o_(t,s,l,s,o))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return G_},e}(rw),X_=Bx({},rw.getDefaultOptions(),{legend:{position:"right",radio:{}},tooltip:{shared:!1,showTitle:!1,showMarkers:!1},label:{layout:{type:"limit-in-plot",cfg:{action:"ellipsis"}}},pieStyle:{stroke:"white",lineWidth:1},statistic:{title:{style:{fontWeight:300,color:"#4B535E",textAlign:"center",fontSize:"20px",lineHeight:1}},content:{style:{fontWeight:"bold",color:"rgba(44,53,66,0.85)",textAlign:"center",fontSize:"32px",lineHeight:1}}},theme:{components:{annotation:{text:{animate:!1}}}}});function Y_(t,e){var n=null;return(0,x.each)(t,(function(t){"number"===typeof t[e]&&(n+=t[e])})),n}function K_(t,e){var n;switch(t){case"inner":return n="-30%",(0,x.isString)(e)&&e.endsWith("%")?.01*parseFloat(e)>0?n:e:e<0?e:n;case"outer":return n=12,(0,x.isString)(e)&&e.endsWith("%")?.01*parseFloat(e)<0?n:e:e>0?e:n;default:return e}}function Q_(t,e){return(0,x.every)(Hx(t,e),(function(t){return 0===t[e]}))}var J_=[1,0,0,0,1,0,0,0,1];function tC(t,e){var n=e?(0,b.__spreadArrays)(e):(0,b.__spreadArrays)(J_);return nd.transform(n,t)}var eC=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getActiveElements=function(){var t=nd.getDelegationObject(this.context);if(t){var e=this.context.view,n=t.component,r=t.item,i=n.get("field");if(i){var a=e.geometries[0].elements;return a.filter((function(t){return t.getModel().data[i]===r.value}))}}return[]},e.prototype.getActiveElementLabels=function(){var t=this.context.view,e=this.getActiveElements(),n=t.geometries[0].labelsContainer.getChildren();return n.filter((function(t){return e.find((function(e){return(0,x.isEqual)(e.getData(),t.get("data"))}))}))},e.prototype.transfrom=function(t){void 0===t&&(t=7.5);var e=this.getActiveElements(),n=this.getActiveElementLabels();e.forEach((function(e,r){var i=n[r],a=e.geometry.coordinate;if(a.isPolar&&a.isTransposed){var o=nd.getAngle(e.getModel(),a),s=o.startAngle,l=o.endAngle,u=(s+l)/2,c=t,d=c*Math.cos(u),h=c*Math.sin(u);e.shape.setMatrix(tC([["t",d,h]])),i.setMatrix(tC([["t",d,h]]))}}))},e.prototype.active=function(){this.transfrom()},e.prototype.reset=function(){this.transfrom(0)},e}(Ls);function nC(t){var e,n=t.event,r=n.target;return r&&(e=r.get("element")),e}var rC=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getAnnotations=function(t){var e=t||this.context.view;return e.getController("annotation").option},e.prototype.getInitialAnnotation=function(){return this.initialAnnotation},e.prototype.init=function(){var t=this,e=this.context.view;e.removeInteraction("tooltip"),e.on("afterchangesize",(function(){var n=t.getAnnotations(e);t.initialAnnotation=n}))},e.prototype.change=function(t){var e=this.context,n=e.view,r=e.event;this.initialAnnotation||(this.initialAnnotation=this.getAnnotations());var i=(0,x.get)(r,["data","data"]);if(r.type.match("legend-item")){var a=nd.getDelegationObject(this.context),o=n.getGroupedFields()[0];if(a&&o){var s=a.item;i=n.getData().find((function(t){return t[o]===s.value}))}}if(i){var l=(0,x.get)(t,"annotations",[]),u=(0,x.get)(t,"statistic",{});n.getController("annotation").clear(!0),(0,x.each)(l,(function(t){"object"===typeof t&&n.annotation()[t.type](t)})),Rx(n,{statistic:u,plotType:"pie"},i),n.render(!0)}var c=nC(this.context);c&&c.shape.toFront()},e.prototype.reset=function(){var t=this.context.view,e=t.getController("annotation");e.clear(!0);var n=this.getInitialAnnotation();(0,x.each)(n,(function(e){t.annotation()[e.type](e)})),t.render(!0)},e}(Ls),iC="pie-statistic";function aC(t){var e=t.chart,n=t.options,r=n.data,i=n.angleField,a=n.colorField,o=n.color,s=n.pieStyle,l=Hx(r,i);if(Q_(l,i)){var u="$$percentage$$";l=l.map((function(t){var e;return(0,b.__assign)((0,b.__assign)({},t),(e={},e[u]=1/l.length,e))})),e.data(l);var c=Bx({},t,{options:{xField:"1",yField:u,seriesField:a,isStack:!0,interval:{color:o,style:s},args:{zIndexReversed:!0,sortZIndex:!0}}});Vw(c)}else{e.data(l);c=Bx({},t,{options:{xField:"1",yField:i,seriesField:a,isStack:!0,interval:{color:o,style:s},args:{zIndexReversed:!0,sortZIndex:!0}}});Vw(c)}return t}function oC(t){var e,n=t.chart,r=t.options,i=r.meta,a=r.colorField,o=Bx({},i);return n.scale(o,(e={},e[a]={type:"cat"},e)),t}function sC(t){var e=t.chart,n=t.options,r=n.radius,i=n.innerRadius,a=n.startAngle,o=n.endAngle;return e.coordinate({type:"theta",cfg:{radius:r,innerRadius:i,startAngle:a,endAngle:o}}),t}function lC(t){var e=t.chart,n=t.options,r=n.label,i=n.colorField,a=n.angleField,o=e.geometries[0];if(r){var s=r.callback,l=(0,b.__rest)(r,["callback"]),u=xx(l);if(u.content){var c=u.content;u.content=function(t,n,r){var o=t[i],s=t[a],l=e.getScaleByField(a),u=null===l||void 0===l?void 0:l.scale(s);return(0,x.isFunction)(c)?c((0,b.__assign)((0,b.__assign)({},t),{percent:u}),n,r):(0,x.isString)(c)?lx(c,{value:s,name:o,percentage:(0,x.isNumber)(u)&&!(0,x.isNil)(s)?(100*u).toFixed(2)+"%":null}):c}}var d={inner:"",outer:"pie-outer",spider:"pie-spider"},h=u.type?d[u.type]:"pie-outer",f=u.layout?(0,x.isArray)(u.layout)?u.layout:[u.layout]:[];u.layout=(h?[{type:h}]:[]).concat(f),o.label({fields:i?[a,i]:[a],callback:s,cfg:(0,b.__assign)((0,b.__assign)({},u),{offset:K_(u.type,u.offset),type:"pie"})})}else o.label(!1);return t}function uC(t){var e=t.innerRadius,n=t.statistic,r=t.angleField,i=t.colorField,a=t.meta,o=t.locale,s=Kx(o);if(e&&n){var l=Bx({},X_.statistic,n),u=l.title,c=l.content;return!1!==u&&(u=Bx({},{formatter:function(t){var e=t?t[i]:(0,x.isNil)(u.content)?s.get(["statistic","total"]):u.content,n=(0,x.get)(a,[i,"formatter"])||function(t){return t};return n(e)}},u)),!1!==c&&(c=Bx({},{formatter:function(t,e){var n=t?t[r]:Y_(e,r),i=(0,x.get)(a,[r,"formatter"])||function(t){return t};return t||(0,x.isNil)(c.content)?i(n):c.content}},c)),Bx({},{statistic:{title:u,content:c}},t)}return t}function cC(t){var e=t.chart,n=t.options,r=uC(n),i=r.innerRadius,a=r.statistic;return e.getController("annotation").clear(!0),ox(Ow())(t),i&&a&&Rx(e,{statistic:a,plotType:"pie"}),t}function dC(t){var e=t.chart,n=t.options,r=n.tooltip,i=n.colorField,a=n.angleField,o=n.data;if(!1===r)e.tooltip(r);else if(e.tooltip(Bx({},r,{shared:!1})),Q_(o,a)){var s=(0,x.get)(r,"fields"),l=(0,x.get)(r,"formatter");(0,x.isEmpty)((0,x.get)(r,"fields"))&&(s=[i,a],l=l||function(t){return{name:t[i],value:(0,x.toString)(t[a])}}),e.geometries[0].tooltip(s.join("*"),Lw(s,l))}return t}function hC(t){var e=t.chart,n=t.options,r=uC(n),i=r.interactions,a=r.statistic,o=r.annotations;return(0,x.each)(i,(function(t){var n,r;if(!1===t.enable)e.removeInteraction(t.type);else if("pie-statistic-active"===t.type){var i=[];(null===(n=t.cfg)||void 0===n?void 0:n.start)||(i=[{trigger:"element:mouseenter",action:iC+":change",arg:{statistic:a,annotations:o}}]),(0,x.each)(null===(r=t.cfg)||void 0===r?void 0:r.start,(function(t){i.push((0,b.__assign)((0,b.__assign)({},t),{arg:{statistic:a,annotations:o}}))})),e.interaction(t.type,Bx({},t.cfg,{start:i}))}else e.interaction(t.type,t.cfg||{})})),t}function fC(t){return ox(ww("pieStyle"),aC,oC,kw,sC,_w,dC,lC,Ew,cC,hC,Aw)(t)}Vs(iC,rC),zl("pie-statistic-active",{start:[{trigger:"element:mouseenter",action:"pie-statistic:change"}],end:[{trigger:"element:mouseleave",action:"pie-statistic:reset"}]}),Vs("pie-legend",eC),zl("pie-legend-active",{start:[{trigger:"legend-item:mouseenter",action:"pie-legend:active"}],end:[{trigger:"legend-item:mouseleave",action:"pie-legend:reset"}]});var pC=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="pie",e}return(0,b.__extends)(e,t),e.getDefaultOptions=function(){return X_},e.prototype.changeData=function(t){this.chart.emit(w.BEFORE_CHANGE_DATA,Au.fromData(this.chart,w.BEFORE_CHANGE_DATA,null));var e=this.options,n=this.options.angleField,r=Hx(e.data,n),i=Hx(t,n);Q_(r,n)||Q_(i,n)?this.update({data:t}):(this.updateOption({data:t}),this.chart.data(i),cC({chart:this.chart,options:this.options}),this.chart.render(!0)),this.chart.emit(w.AFTER_CHANGE_DATA,Au.fromData(this.chart,w.AFTER_CHANGE_DATA,null))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return fC},e}(rw);function gC(t){var e=t.chart,n=t.options,r=n.data,i=n.sectorStyle,a=n.color;return e.data(r),ox(Vw)(Bx({},t,{options:{marginRatio:1,interval:{style:i,color:a}}})),t}function mC(t){var e=t.chart,n=t.options,r=n.label,i=n.xField,a=fx(e,"interval");if(!1===r)a.label(!1);else if((0,x.isObject)(r)){var o=r.callback,s=r.fields,l=(0,b.__rest)(r,["callback","fields"]),u=l.offset,c=l.layout;(void 0===u||u>=0)&&(c=c?(0,x.isArray)(c)?c:[c]:[],l.layout=(0,x.filter)(c,(function(t){return"limit-in-shape"!==t.type})),l.layout.length||delete l.layout),a.label({fields:s||[i],callback:o,cfg:xx(l)})}else dx(Kb.WARN,null===r,"the label option must be an Object."),a.label({fields:[i]});return t}function vC(t){var e=t.chart,n=t.options,r=n.legend,i=n.seriesField;return!1===r?e.legend(!1):i&&e.legend(i,r),t}function yC(t){var e=t.chart,n=t.options,r=n.radius,i=n.innerRadius,a=n.startAngle,o=n.endAngle;return e.coordinate({type:"polar",cfg:{radius:r,innerRadius:i,startAngle:a,endAngle:o}}),t}function bC(t){var e,n=t.options,r=n.xAxis,i=n.yAxis,a=n.xField,o=n.yField;return ox(Mw((e={},e[a]=r,e[o]=i,e)))(t)}function xC(t){var e=t.chart,n=t.options,r=n.xAxis,i=n.yAxis,a=n.xField,o=n.yField;return r?e.axis(a,r):e.axis(a,!1),i?e.axis(o,i):e.axis(o,!1),t}function wC(t){ox(ww("sectorStyle"),gC,bC,mC,yC,xC,vC,Cw,Sw,Aw,kw,Ow(),Ew)(t)}var _C=Bx({},rw.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"}]}),CC=(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="rose",e}(0,b.__extends)(e,t),e.getDefaultOptions=function(){return _C},e.prototype.changeData=function(t){this.updateOption({data:t}),this.chart.changeData(t)},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return wC}}(rw),{font:function(){return"serif"},padding:1,size:[500,500],spiral:"archimedean",timeInterval:3e3});function SC(t,e){return e=(0,x.assign)({},CC,e),AC(t,e)}function AC(t,e){var n=UC();["font","fontSize","fontWeight","padding","rotate","size","spiral","timeInterval","random"].forEach((function(t){(0,x.isNil)(e[t])||n[t](e[t])})),n.words(t),e.imageMask&&n.createMask(e.imageMask);var r=n.start(),i=r._tags;i.forEach((function(t){t.x+=e.size[0]/2,t.y+=e.size[1]/2}));var a=e.size,o=a[0],s=a[1];return i.push({text:"",value:0,x:0,y:0,opacity:0}),i.push({text:"",value:0,x:o,y:s,opacity:0}),i}var kC=Math.PI/180,EC=64,DC=2048;function FC(t){return t.text}function MC(){return"serif"}function OC(){return"normal"}function BC(t){return t.value}function TC(){return 90*~~(2*Math.random())}function PC(){return 1}function IC(t,e,n,r){if(!e.sprite){var i=t.context,a=t.ratio;i.clearRect(0,0,(EC<<5)/a,DC/a);var o=0,s=0,l=0,u=n.length;--r;while(++r>5<<5,d=~~Math.max(Math.abs(g+m),Math.abs(g-m))}else c=c+31>>5<<5;if(d>l&&(l=d),o+c>=EC<<5&&(o=0,s+=l,l=0),s+d>=DC)break;i.translate((o+(c>>1))/a,(s+(d>>1))/a),e.rotate&&i.rotate(e.rotate*kC),i.fillText(e.text,0,0),e.padding&&(i.lineWidth=2*e.padding,i.strokeText(e.text,0,0)),i.restore(),e.width=c,e.height=d,e.xoff=o,e.yoff=s,e.x1=c>>1,e.y1=d>>1,e.x0=-e.x1,e.y0=-e.y1,e.hasText=!0,o+=c}var y=i.getImageData(0,0,(EC<<5)/a,DC/a).data,b=[];while(--r>=0)if(e=n[r],e.hasText){c=e.width;for(var x=c>>5,w=(d=e.y1-e.y0,0);w>5),k=y[(s+S)*(EC<<5)+(o+w)<<2]?1<<31-w%32:0;b[A]|=k,_|=k}_?C=S:(e.y0++,d--,S--,s++)}e.y1=e.y0+C,e.sprite=b.slice(0,(e.y1-e.y0)*x)}}}function LC(t,e,n){n>>=5;for(var r,i=t.sprite,a=t.width>>5,o=t.x-(a<<4),s=127&o,l=32-s,u=t.y1-t.y0,c=(t.y+t.y0)*n+(o>>5),d=0;d>>s:0))&e[c+h])return!0;c+=n}return!1}function RC(t,e){var n=t[0],r=t[1];e.x+e.x0r.x&&(r.x=e.x+e.x1),e.y+e.y1>r.y&&(r.y=e.y+e.y1)}function NC(t,e){return t.x+t.x1>e[0].x&&t.x+t.x0e[0].y&&t.y+t.y0>2);t.width=(EC<<5)/e,t.height=DC/e;var n=t.getContext("2d");return n.fillStyle=n.strokeStyle="red",n.textAlign="center",{context:n,ratio:e}}function g(e,n,r){var i,a,l,u=n.x,c=n.y,d=Math.sqrt(t[0]*t[0]+t[1]*t[1]),h=o(t),f=s()<.5?1:-1,p=-f;while(i=h(p+=f)){if(a=~~i[0],l=~~i[1],Math.min(Math.abs(a),Math.abs(l))>=d)break;if(n.x=u+a,n.y=c+l,!(n.x+n.x0<0||n.y+n.y0<0||n.x+n.x1>t[0]||n.y+n.y1>t[1])&&(!r||!LC(n,e,t[0]))&&(!r||NC(n,r))){for(var g=n.sprite,m=n.width>>5,v=t[0]>>5,y=n.x-(m<<4),b=127&y,x=32-b,w=n.y1-n.y0,_=void 0,C=(n.y+n.y0)*v+(y>>5),S=0;S>>b:0);C+=v}return delete n.sprite,!0}}return!1}return f.start=function(){var o=t[0],m=t[1],v=p(h()),y=f.board?f.board:$C((t[0]>>5)*t[1]),b=l.length,x=[],w=l.map((function(t,o,s){return t.text=c.call(this,t,o,s),t.font=e.call(this,t,o,s),t.style=d.call(this,t,o,s),t.weight=r.call(this,t,o,s),t.rotate=i.call(this,t,o,s),t.size=~~n.call(this,t,o,s),t.padding=a.call(this,t,o,s),t})).sort((function(t,e){return e.size-t.size})),_=-1,C=f.board?[{x:0,y:0},{x:o,y:m}]:null;function S(){var e=Date.now();while(Date.now()-e>1,n.y=m*(s()+.5)>>1,IC(v,n,w,_),n.hasText&&g(y,n,C)&&(x.push(n),C?f.hasImage||RC(C,n):C=[{x:n.x+n.x0,y:n.y+n.y0},{x:n.x+n.x1,y:n.y+n.y1}],n.x-=t[0]>>1,n.y-=t[1]>>1)}f._tags=x,f._bounds=C}return S(),f},f.createMask=function(e){var n=document.createElement("canvas"),r=t[0],i=t[1];if(r&&i){var a=r>>5,o=$C((r>>5)*i);n.width=r,n.height=i;var s=n.getContext("2d");s.drawImage(e,0,0,e.width,e.height,0,0,r,i);for(var l=s.getImageData(0,0,r,i).data,u=0;u>5),h=u*r+c<<2,p=l[h]>=250&&l[h+1]>=250&&l[h+2]>=250,g=p?1<<31-c%32:0;o[d]|=g}f.board=o,f.hasImage=!0}},f.timeInterval=function(t){u=null==t?1/0:t},f.words=function(t){l=t},f.size=function(e){t=[+e[0],+e[1]]},f.font=function(t){e=qC(t)},f.fontWeight=function(t){r=qC(t)},f.rotate=function(t){i=qC(t)},f.spiral=function(t){o=HC[t]||t},f.fontSize=function(t){n=qC(t)},f.padding=function(t){a=qC(t)},f.random=function(t){s=qC(t)},f}function GC(t){var e=t.options,n=t.chart,r=n,i=r.width,a=r.height,o=r.padding,s=r.appendPadding,l=r.ele,u=e.data,c=e.imageMask,d=e.wordField,h=e.weightField,f=e.colorField,p=e.wordStyle,g=e.timeInterval,m=e.random,v=e.spiral,y=e.autoFit,w=void 0===y||y,_=e.placementStrategy;if(!u||!u.length)return[];var C=p.fontFamily,S=p.fontWeight,A=p.padding,k=p.fontSize,E=KC(u,h),D=[tS(E),eS(E)],F=u.map((function(t){return{text:t[d],value:t[h],color:t[f],datum:t}})),M={imageMask:c,font:C,fontSize:YC(k,D),fontWeight:S,size:WC({width:i,height:a,padding:o,appendPadding:s,autoFit:w,container:l}),padding:A,timeInterval:g,random:m,spiral:v,rotate:QC(e)};if((0,x.isFunction)(_)){var O=F.map((function(t,e,r){return(0,b.__assign)((0,b.__assign)((0,b.__assign)({},t),{hasText:!!t.text,font:qC(M.font)(t,e,r),weight:qC(M.fontWeight)(t,e,r),rotate:qC(M.rotate)(t,e,r),size:qC(M.fontSize)(t,e,r),style:"normal"}),_.call(n,t,e,r))}));return O.push({text:"",value:0,x:0,y:0,opacity:0}),O.push({text:"",value:0,x:M.size[0],y:M.size[1],opacity:0}),O}return SC(F,M)}function WC(t){var e=t.width,n=t.height,r=t.container,i=t.autoFit,a=t.padding,o=t.appendPadding;if(i){var s=hx(r);e=s.width,n=s.height}e=e||400,n=n||400;var l=ZC({padding:a,appendPadding:o}),u=l[0],c=l[1],d=l[2],h=l[3],f=[e-(h+c),n-(u+d)];return f}function ZC(t){var e=Ux(t.padding),n=Ux(t.appendPadding),r=e[0]+n[0],i=e[1]+n[1],a=e[2]+n[2],o=e[3]+n[3];return[r,i,a,o]}function XC(t){return new Promise((function(e,n){if(t instanceof HTMLImageElement)e(t);else{if((0,x.isString)(t)){var r=new Image;return r.crossOrigin="anonymous",r.src=t,r.onload=function(){e(r)},void(r.onerror=function(){dx(Kb.ERROR,!1,"image %s load failed !!!",t),n()})}dx(Kb.WARN,void 0===t,"The type of imageMask option must be String or HTMLImageElement."),n()}}))}function YC(t,e){if((0,x.isFunction)(t))return t;if((0,x.isArray)(t)){var n=t[0],r=t[1];if(!e)return function(){return(r+n)/2};var i=e[0],a=e[1];return a===i?function(){return(r+n)/2}:function(t){var e=t.value;return(r-n)/(a-i)*(e-i)+n}}return function(){return t}}function KC(t,e){return t.map((function(t){return t[e]})).filter((function(t){return"number"===typeof t&&!isNaN(t)}))}function QC(t){var e=JC(t),n=e.rotation,r=e.rotationSteps;if(!(0,x.isArray)(n))return n;var i=n[0],a=n[1],o=1===r?0:(a-i)/(r-1);return function(){return a===i?a:Math.floor(Math.random()*r)*o}}function JC(t){var e=t.wordStyle.rotationSteps;return e<1&&(dx(Kb.WARN,!1,"The rotationSteps option must be greater than or equal to 1."),e=1),{rotation:t.wordStyle.rotation,rotationSteps:e}}function tS(t){return Math.min.apply(Math,t)}function eS(t){return Math.max.apply(Math,t)}var nS="color",rS=Bx({},rw.getDefaultOptions(),{timeInterval:2e3,legend:!1,tooltip:{showTitle:!1,showMarkers:!1,showCrosshairs:!1,fields:["text","value",nS],formatter:function(t){return{name:t.text,value:t.value}}},wordStyle:{fontFamily:"Verdana",fontWeight:"normal",padding:1,fontSize:[12,60],rotation:[0,90],rotationSteps:2,rotateRatio:.5}});function iS(t){var e=t.chart,n=t.options,r=n.colorField,i=n.color,a=GC(t);e.data(a);var o=Bx({},t,{options:{xField:"x",yField:"y",seriesField:r&&nS,rawFields:(0,x.isFunction)(i)&&(0,b.__spreadArrays)((0,x.get)(n,"rawFields",[]),["datum"]),point:{color:i,shape:"word-cloud"}}}),s=jw(o).ext;return s.geometry.label(!1),e.coordinate().reflect("y"),e.axis(!1),t}function aS(t){return ox(Mw({x:{nice:!1},y:{nice:!1}}))(t)}function oS(t){var e=t.chart,n=t.options,r=n.legend,i=n.colorField;return!1===r?e.legend(!1):i&&e.legend(nS,r),t}function sS(t){ox(iS,aS,Cw,oS,Sw,Aw,kw,Ew)(t)}function lS(t){return{fontSize:t.data.size,text:t.data.text,textAlign:"center",fontFamily:t.data.font,fontWeight:t.data.weight,fill:t.color||t.defaultStyle.stroke,textBaseline:"alphabetic"}}uc("point","word-cloud",{draw:function(t,e){var n=t.x,r=t.y,i=e.addShape("text",{attrs:(0,b.__assign)((0,b.__assign)({},lS(t)),{x:n,y:r})}),a=t.data.rotate;return"number"===typeof a&&nd.rotate(i,a*Math.PI/180),i}});(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="word-cloud",e}(0,b.__extends)(e,t),e.getDefaultOptions=function(){return rS},e.prototype.changeData=function(t){this.updateOption({data:t}),this.options.imageMask?this.render():this.chart.changeData(GC({chart:this.chart,options:this.options}))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.render=function(){var e=this;return new Promise((function(n){var r=e.options.imageMask;if(!r)return t.prototype.render.call(e),void n();var i=function(r){e.options=(0,b.__assign)((0,b.__assign)({},e.options),{imageMask:r||null}),t.prototype.render.call(e),n()};XC(r).then(i).catch(i)}))},e.prototype.getSchemaAdaptor=function(){return sS},e.prototype.triggerResize=function(){var e=this;this.chart.destroyed||(this.execAdaptor(),window.setTimeout((function(){t.prototype.triggerResize.call(e)})))}})(rw);var uS=n(56645),cS={exp:uS.regressionExp,linear:uS.regressionLinear,loess:uS.regressionLoess,log:uS.regressionLog,poly:uS.regressionPoly,pow:uS.regressionPow,quad:uS.regressionQuad};function dS(t,e){var n=10,r={regionStyle:[{position:{start:[t,"max"],end:["max",e]},style:{fill:"#d8d0c0",opacity:.4}},{position:{start:["min","max"],end:[t,e]},style:{fill:"#a3dda1",opacity:.4}},{position:{start:["min",e],end:[t,"min"]},style:{fill:"#d8d0c0",opacity:.4}},{position:{start:[t,e],end:["max","min"]},style:{fill:"#a3dda1",opacity:.4}}],lineStyle:{stroke:"#9ba29a",lineWidth:1},labelStyle:[{position:["max",e],offsetX:-n,offsetY:-n,style:{textAlign:"right",textBaseline:"bottom",fontSize:14,fill:"#ccc"}},{position:["min",e],offsetX:n,offsetY:-n,style:{textAlign:"left",textBaseline:"bottom",fontSize:14,fill:"#ccc"}},{position:["min",e],offsetX:n,offsetY:n,style:{textAlign:"left",textBaseline:"top",fontSize:14,fill:"#ccc"}},{position:["max",e],offsetX:-n,offsetY:n,style:{textAlign:"right",textBaseline:"top",fontSize:14,fill:"#ccc"}}]};return r}var hS=function(t,e){var n=e.view,r=e.options,i=r.xField,a=r.yField,o=n.getScaleByField(i),s=n.getScaleByField(a),l=t.map((function(t){return n.getCoordinate().convert({x:o.scale(t[0]),y:s.scale(t[1])})}));return Sx(l,!1)},fS=function(t){var e,n=t.options,r=n.xField,i=n.yField,a=n.data,o=n.regressionLine,s=o.type,l=void 0===s?"linear":s,u=o.algorithm;if(u)e=(0,x.isArray)(u)?u:u(a);else{var c=cS[l]().x((function(t){return t[r]})).y((function(t){return t[i]}));e=c(a)}return hS(e,t)},pS=function(t){var e,n=t.meta,r=void 0===n?{}:n,i=t.xField,a=t.yField,o=t.data,s=o[0][i],l=o[0][a],u=s>0,c=l>0;function d(t,e){var n=(0,x.get)(r,[t]);function i(t){return(0,x.get)(n,t)}var a={};return"x"===e?((0,x.isNumber)(s)&&((0,x.isNumber)(i("min"))||(a["min"]=u?0:2*s),(0,x.isNumber)(i("max"))||(a["max"]=u?2*s:0)),a):((0,x.isNumber)(l)&&((0,x.isNumber)(i("min"))||(a["min"]=c?0:2*l),(0,x.isNumber)(i("max"))||(a["max"]=c?2*l:0)),a)}return(0,b.__assign)((0,b.__assign)({},r),(e={},e[i]=(0,b.__assign)((0,b.__assign)({},r[i]),d(i,"x")),e[a]=(0,b.__assign)((0,b.__assign)({},r[a]),d(a,"y")),e))};function gS(t){var e=t.data,n=void 0===e?[]:e,r=t.xField,i=t.yField;if(n.length){for(var a=!0,o=!0,s=n[0],l=void 0,u=1;u0){var o=this.view.geometries[0],s=o.dataArray,l=a[0].name,u=[];return s.forEach((function(t){t.forEach((function(t){var e=nd.getTooltipItems(t,o),n=e[0];if(!r&&n&&n.name===l){var a=(0,x.isNil)(i)?l:i;u.push((0,b.__assign)((0,b.__assign)({},n),{name:n.title,title:a}))}else if(r&&n){a=(0,x.isNil)(i)?n.name||l:i;u.push((0,b.__assign)((0,b.__assign)({},n),{name:n.title,title:a}))}}))})),u}return[]},e}(zu);bu("radar-tooltip",TS);var PS=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.init=function(){var t=this.context.view;t.removeInteraction("tooltip")},e.prototype.show=function(){var t=this.context.event,e=this.getTooltipController();e.showTooltip({x:t.x,y:t.y})},e.prototype.hide=function(){var t=this.getTooltipController();t.hideTooltip()},e.prototype.getTooltipController=function(){var t=this.context.view;return t.getController("radar-tooltip")},e}(Ls);Vs("radar-tooltip",PS),zl("radar-tooltip",{start:[{trigger:"plot:mousemove",action:"radar-tooltip:show"}],end:[{trigger:"plot:mouseleave",action:"radar-tooltip:hide"}]});var IS,LS;(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="radar",e}(0,b.__extends)(e,t),e.prototype.changeData=function(t){this.updateOption({data:t}),this.chart.changeData(t)},e.prototype.getDefaultOptions=function(){return Bx({},t.prototype.getDefaultOptions.call(this),{xAxis:{label:{offset:15},grid:{line:{type:"line"}}},yAxis:{grid:{line:{type:"circle"}}},legend:{position:"top"},tooltip:{shared:!0,showCrosshairs:!0,showMarkers:!0,crosshairs:{type:"xy",line:{style:{stroke:"#565656",lineDash:[4]}},follow:!0}}})},e.prototype.getSchemaAdaptor=function(){return BS}})(rw);(function(t){t["Left"]="Left",t["Right"]="Right"})(IS||(IS={})),function(t){t["Line"]="line",t["Column"]="column"}(LS||(LS={}));var RS="left-axes-view",NS="right-axes-view",zS={nice:!0,label:{autoHide:!0,autoRotate:!1}},jS=(0,b.__assign)((0,b.__assign)({},zS),{position:"left"}),$S=(0,b.__assign)((0,b.__assign)({},zS),{position:"right",grid:null});function VS(t){return(0,x.get)(t,"geometry")===LS.Line}function qS(t){return(0,x.get)(t,"geometry")===LS.Column}function HS(t,e,n){return qS(n)?Bx({},{geometry:LS.Column,label:n.label&&n.isRange?{content:function(t){var n;return null===(n=t[e])||void 0===n?void 0:n.join("-")}}:void 0},n):(0,b.__assign)({geometry:LS.Line},n)}function US(t,e){var n=t[0],r=t[1];if((0,x.isArray)(e)){var i=e[0],a=e[1];return[i,a]}var o=(0,x.get)(e,n),s=(0,x.get)(e,r);return[o,s]}function GS(t,e){return e===IS.Left?!1!==t&&Bx({},jS,t):e===IS.Right?!1!==t&&Bx({},$S,t):t}function WS(t){var e=t.view,n=t.geometryOption,r=t.yField,i=t.legend,a=(0,x.get)(i,"marker"),o=fx(e,VS(n)?"line":"interval");if(!n.seriesField){var s=(0,x.get)(e,"options.scales."+r+".alias")||r,l=o.getAttribute("color"),u=e.getTheme().defaultColor;l&&(u=nd.getMappingValue(l,s,(0,x.get)(l,["values",0],u)));var c=((0,x.isFunction)(a)?a:!(0,x.isEmpty)(a)&&Bx({},{style:{stroke:u,fill:u}},a))||(VS(n)?{symbol:function(t,e,n){return[["M",t-n,e],["L",t+n,e]]},style:{lineWidth:2,r:6,stroke:u}}:{symbol:"square",style:{fill:u}});return[{value:r,name:s,marker:c,isGeometry:!0,viewId:e.id}]}var d=o.getGroupAttributes();return(0,x.reduce)(d,(function(t,n){var r=nd.getLegendItems(e,o,n,e.getTheme(),a);return t.concat(r)}),[])}function ZS(t){var e=t.options,n=t.chart,r=e.geometryOption,i=r.isStack,a=r.color,o=r.seriesField,s=r.groupField,l=r.isGroup,u=["xField","yField"];if(VS(r)){zw(Bx({},t,{options:(0,b.__assign)((0,b.__assign)((0,b.__assign)({},sx(e,u)),r),{line:{color:r.color,style:r.lineStyle}})})),jw(Bx({},t,{options:(0,b.__assign)((0,b.__assign)((0,b.__assign)({},sx(e,u)),r),{point:r.point&&(0,b.__assign)({color:a,shape:"circle"},r.point)})}));var c=[];l&&c.push({type:"dodge",dodgeBy:s||o,customOffset:0}),i&&c.push({type:"stack"}),c.length&&(0,x.each)(n.geometries,(function(t){t.adjust(c)}))}return qS(r)&&N_(Bx({},t,{options:(0,b.__assign)((0,b.__assign)((0,b.__assign)({},sx(e,u)),r),{widthRatio:r.columnWidthRatio,interval:(0,b.__assign)((0,b.__assign)({},sx(r,["color"])),{style:r.columnStyle})})})),t}var XS=function(t,e){var n=e[0],r=e[1],i=t.getOptions().data,a=t.getXScale(),o=(0,x.size)(i);if(a&&o){var s=!0,l=(0,x.valuesOfKey)(i,a.field),u=s?l:l.reverse(),c=(0,x.size)(u),d=Math.floor(n*(c-1)),h=Math.floor(r*(c-1));t.filter(a.field,(function(t){var e=u.indexOf(t);return!(e>-1)||$x(e,d,h)})),t.getRootView().render(!0)}};function YS(t){var e,n=t.options,r=n.geometryOptions,i=void 0===r?[]:r,a=n.xField,o=n.yField,s=(0,x.every)(i,(function(t){var e=t.geometry;return e===LS.Line||void 0===e}));return Bx({},{options:{geometryOptions:[],meta:(e={},e[a]={type:"cat",sync:!0,range:s?[0,1]:void 0},e),tooltip:{showMarkers:s,showCrosshairs:s,shared:!0,crosshairs:{type:"x"}},interactions:s?[{type:"legend-visible-filter"}]:[{type:"legend-visible-filter"},{type:"active-region"}],legend:{position:"top-left"}}},t,{options:{yAxis:US(o,n.yAxis),geometryOptions:[HS(a,o[0],i[0]),HS(a,o[1],i[1])],annotations:US(o,n.annotations)}})}function KS(t){var e,n,r=t.chart,i=t.options,a=i.geometryOptions,o={line:0,column:1},s=[{type:null===(e=a[0])||void 0===e?void 0:e.geometry,id:RS},{type:null===(n=a[1])||void 0===n?void 0:n.geometry,id:NS}];return s.sort((function(t,e){return-o[t.type]+o[e.type]})).forEach((function(t){return r.createView({id:t.id})})),t}function QS(t){var e=t.chart,n=t.options,r=n.xField,i=n.yField,a=n.geometryOptions,o=n.data,s=n.tooltip,l=[(0,b.__assign)((0,b.__assign)({},a[0]),{id:RS,data:o[0],yField:i[0]}),(0,b.__assign)((0,b.__assign)({},a[1]),{id:NS,data:o[1],yField:i[1]})];return l.forEach((function(t){var n=t.id,i=t.data,a=t.yField,o=qS(t)&&t.isPercent,l=o?i_(i,a,r,a):i,u=vx(e,n).data(l),c=o?(0,b.__assign)({formatter:function(e){return{name:e[t.seriesField]||a,value:(100*Number(e[a])).toFixed(2)+"%"}}},s):s;ZS({chart:u,options:{xField:r,yField:a,tooltip:c,geometryOption:t}})})),t}function JS(t){var e,n=t.chart,r=t.options,i=r.geometryOptions,a=(null===(e=n.getTheme())||void 0===e?void 0:e.colors10)||[],o=0;return n.once("beforepaint",(function(){(0,x.each)(i,(function(t,e){var r=vx(n,0===e?RS:NS);if(!t.color){var i=r.getGroupScales(),s=(0,x.get)(i,[0,"values","length"],1),l=a.slice(o,o+s).concat(0===e?[]:a);r.geometries.forEach((function(e){t.seriesField?e.color(t.seriesField,l):e.color(l[0])})),o+=s}})),n.render(!0)})),t}function tA(t){var e,n,r=t.chart,i=t.options,a=i.xAxis,o=i.yAxis,s=i.xField,l=i.yField;return Mw((e={},e[s]=a,e[l[0]]=o[0],e))(Bx({},t,{chart:vx(r,RS)})),Mw((n={},n[s]=a,n[l[1]]=o[1],n))(Bx({},t,{chart:vx(r,NS)})),t}function eA(t){var e=t.chart,n=t.options,r=vx(e,RS),i=vx(e,NS),a=n.xField,o=n.yField,s=n.xAxis,l=n.yAxis;return e.axis(a,!1),e.axis(o[0],!1),e.axis(o[1],!1),r.axis(a,s),r.axis(o[0],GS(l[0],IS.Left)),i.axis(a,!1),i.axis(o[1],GS(l[1],IS.Right)),t}function nA(t){var e=t.chart,n=t.options,r=n.tooltip,i=vx(e,RS),a=vx(e,NS);return e.tooltip(r),i.tooltip({shared:!0}),a.tooltip({shared:!0}),t}function rA(t){var e=t.chart;return Sw(Bx({},t,{chart:vx(e,RS)})),Sw(Bx({},t,{chart:vx(e,NS)})),t}function iA(t){var e=t.chart,n=t.options,r=n.annotations,i=(0,x.get)(r,[0]),a=(0,x.get)(r,[1]);return Ow(i)(Bx({},t,{chart:vx(e,RS),options:{annotations:i}})),Ow(a)(Bx({},t,{chart:vx(e,NS),options:{annotations:a}})),t}function aA(t){var e=t.chart;return kw(Bx({},t,{chart:vx(e,RS)})),kw(Bx({},t,{chart:vx(e,NS)})),kw(t),t}function oA(t){var e=t.chart;return Aw(Bx({},t,{chart:vx(e,RS)})),Aw(Bx({},t,{chart:vx(e,NS)})),t}function sA(t){var e=t.chart,n=t.options,r=n.yAxis;return Bw(Bx({},t,{chart:vx(e,RS),options:{yAxis:r[0]}})),Bw(Bx({},t,{chart:vx(e,NS),options:{yAxis:r[1]}})),t}function lA(t){var e=t.chart,n=t.options,r=n.legend,i=n.geometryOptions,a=n.yField,o=n.data,s=vx(e,RS),l=vx(e,NS);if(!1===r)e.legend(!1);else if((0,x.isObject)(r)&&!0===r.custom)e.legend(r);else{var u=(0,x.get)(i,[0,"legend"],r),c=(0,x.get)(i,[1,"legend"],r);e.once("beforepaint",(function(){var t=o[0].length?WS({view:s,geometryOption:i[0],yField:a[0],legend:u}):[],n=o[1].length?WS({view:l,geometryOption:i[1],yField:a[1],legend:c}):[];e.legend(Bx({},r,{custom:!0,items:t.concat(n)}))})),i[0].seriesField&&s.legend(i[0].seriesField,u),i[1].seriesField&&l.legend(i[1].seriesField,c),e.on("legend-item:click",(function(t){var n=(0,x.get)(t,"gEvent.delegateObject",{});if(n&&n.item){var r=n.item,i=r.value,o=r.isGeometry,s=r.viewId;if(o){var l=(0,x.findIndex)(a,(function(t){return t===i}));if(l>-1){var u=(0,x.get)(vx(e,s),"geometries");(0,x.each)(u,(function(t){t.changeVisible(!n.item.unchecked)}))}}else{var c=(0,x.get)(e.getController("legend"),"option.items",[]);(0,x.each)(e.views,(function(t){var n=t.getGroupScales();(0,x.each)(n,(function(e){e.values&&e.values.indexOf(i)>-1&&t.filter(e.field,(function(t){var e=(0,x.find)(c,(function(e){return e.value===t}));return!e.unchecked}))})),e.render(!0)}))}}}))}return t}function uA(t){var e=t.chart,n=t.options,r=n.slider,i=vx(e,RS),a=vx(e,NS);return r&&(i.option("slider",r),i.on("slider:valuechanged",(function(t){var e=t.event,n=e.value,r=e.originValue;(0,x.isEqual)(n,r)||XS(a,n)})),e.once("afterpaint",(function(){if(!(0,x.isBoolean)(r)){var t=r.start,e=r.end;(t||e)&&XS(a,[t,e])}}))),t}function cA(t){return ox(YS,KS,aA,QS,tA,eA,sA,nA,rA,iA,oA,JS,lA,uA)(t)}(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dual-axes",e}(0,b.__extends)(e,t),e.prototype.getDefaultOptions=function(){return Bx({},t.prototype.getDefaultOptions.call(this),{yAxis:[],syncViewPadding:!0})},e.prototype.getSchemaAdaptor=function(){return cA}})(rw);var dA="x",hA="y",fA={showTitle:!1,shared:!0,showMarkers:!1,customContent:function(t,e){return""+(0,x.get)(e,[0,"data","y"],0)},containerTpl:'
    ',itemTpl:"{value}",domStyles:{"g2-tooltip":{padding:"2px 4px",fontSize:"10px"}},showCrosshairs:!0,crosshairs:{type:"x"}},pA={appendPadding:2,tooltip:(0,b.__assign)({},fA),animation:{}};function gA(t){return(0,x.map)(t||[],(function(t,e){return{x:""+e,y:t}}))}function mA(t){var e=t.chart,n=t.options,r=n.data,i=n.color,a=n.areaStyle,o=n.point,s=n.line,l=null===o||void 0===o?void 0:o.state,u=gA(r);e.data(u);var c=Bx({},t,{options:{xField:dA,yField:hA,area:{color:i,style:a},line:s,point:o}}),d=Bx({},c,{options:{tooltip:!1}}),h=Bx({},c,{options:{tooltip:!1,state:l}});return Nw(c),zw(d),jw(h),e.axis(!1),e.legend(!1),t}function vA(t){var e,n,r=t.options,i=r.xAxis,a=r.yAxis,o=r.data,s=gA(o);return ox(Mw((e={},e[dA]=i,e[hA]=a,e),(n={},n[dA]={type:"cat"},n[hA]=Vx(s,hA),n)))(t)}function yA(t){return ox(ww("areaStyle"),mA,vA,Cw,kw,Aw,Ow())(t)}function bA(t){var e=t.chart,n=t.options,r=n.data,i=n.color,a=n.lineStyle,o=n.point,s=null===o||void 0===o?void 0:o.state,l=gA(r);e.data(l);var u=Bx({},t,{options:{xField:dA,yField:hA,line:{color:i,style:a},point:o}}),c=Bx({},u,{options:{tooltip:!1,state:s}});return zw(u),jw(c),e.axis(!1),e.legend(!1),t}function xA(t){return ox(bA,vA,kw,Cw,Aw,Ow())(t)}var wA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="tiny-line",e}return(0,b.__extends)(e,t),e.getDefaultOptions=function(){return pA},e.prototype.changeData=function(t){this.updateOption({data:t});var e=this,n=e.chart,r=e.options;vA({chart:n,options:r}),n.changeData(gA(t))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return xA},e}(rw);function _A(t){var e=t.chart,n=t.options,r=n.data,i=n.color,a=n.columnStyle,o=n.columnWidthRatio,s=gA(r);e.data(s);var l=Bx({},t,{options:{xField:dA,yField:hA,widthRatio:o,interval:{style:a,color:i}}});return Vw(l),e.axis(!1),e.legend(!1),e.interaction("element-active"),t}function CA(t){return ox(kw,ww("columnStyle"),_A,vA,Cw,Aw,Ow())(t)}var SA={showTitle:!1,shared:!0,showMarkers:!1,customContent:function(t,e){return""+(0,x.get)(e,[0,"data","y"],0)},containerTpl:'
    ',itemTpl:"{value}",domStyles:{"g2-tooltip":{padding:"2px 4px",fontSize:"10px"}}},AA={appendPadding:2,tooltip:(0,b.__assign)({},SA),animation:{}},kA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="tiny-column",e}return(0,b.__extends)(e,t),e.getDefaultOptions=function(){return AA},e.prototype.changeData=function(t){this.updateOption({data:t});var e=this,n=e.chart,r=e.options;vA({chart:n,options:r}),n.changeData(gA(t))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return CA},e}(rw),EA={appendPadding:2,tooltip:(0,b.__assign)({},fA),color:"l(90) 0:#E5EDFE 1:#ffffff",areaStyle:{fillOpacity:.6},line:{size:1,color:"#5B8FF9"},animation:{}},DA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="tiny-area",e}return(0,b.__extends)(e,t),e.getDefaultOptions=function(){return EA},e.prototype.changeData=function(t){this.updateOption({data:t});var e=this,n=e.chart,r=e.options;vA({chart:n,options:r}),n.changeData(gA(t))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return yA},e}(rw);function FA(t,e,n){if(1===n)return[0,e];var r=Math.floor(t/e);return[e*r,e*(r+1)]}function MA(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1}function OA(t,e,n,r,i){var a=(0,x.clone)(t);(0,x.sortBy)(a,e);var o=(0,x.valuesOfKey)(a,e),s=(0,x.getRange)(o),l=s.max-s.min,u=n;if(!n&&r&&(u=r>1?l/(r-1):s.max),!n&&!r){var c=MA(o);u=l/c}var d={},h=(0,x.groupBy)(a,i);(0,x.isEmpty)(h)?(0,x.each)(a,(function(t){var n=t[e],i=FA(n,u,r),a=i[0]+"-"+i[1];(0,x.hasKey)(d,a)||(d[a]={range:i,count:0}),d[a].count+=1})):Object.keys(h).forEach((function(t){(0,x.each)(h[t],(function(n){var a=n[e],o=FA(a,u,r),s=o[0]+"-"+o[1],l=s+"-"+t;(0,x.hasKey)(d,l)||(d[l]={range:o,count:0},d[l][i]=t),d[l].count+=1}))}));var f=[];return(0,x.each)(d,(function(t){f.push(t)})),f}var BA="range",TA="count",PA=Bx({},rw.getDefaultOptions(),{columnStyle:{stroke:"#FFFFFF"},tooltip:{shared:!0,showMarkers:!1},interactions:[{type:"active-region"}]});function IA(t){var e=t.chart,n=t.options,r=n.data,i=n.binField,a=n.binNumber,o=n.binWidth,s=n.color,l=n.stackField,u=n.legend,c=n.columnStyle,d=OA(r,i,o,a,l);e.data(d);var h=Bx({},t,{options:{xField:BA,yField:TA,seriesField:l,isStack:!0,interval:{color:s,style:c}}});return Vw(h),u&&l&&e.legend(l,u),t}function LA(t){var e,n=t.options,r=n.xAxis,i=n.yAxis;return ox(Mw((e={},e[BA]=r,e[TA]=i,e)))(t)}function RA(t){var e=t.chart,n=t.options,r=n.xAxis,i=n.yAxis;return!1===r?e.axis(BA,!1):e.axis(BA,r),!1===i?e.axis(TA,!1):e.axis(TA,i),t}function NA(t){var e=t.chart,n=t.options,r=n.label,i=fx(e,"interval");if(r){var a=r.callback,o=(0,b.__rest)(r,["callback"]);i.label({fields:[TA],callback:a,cfg:xx(o)})}else i.label(!1);return t}function zA(t){return ox(kw,ww("columnStyle"),IA,LA,RA,Ew,NA,Cw,Sw,Aw)(t)}var jA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="histogram",e}return(0,b.__extends)(e,t),e.getDefaultOptions=function(){return PA},e.prototype.changeData=function(t){this.updateOption({data:t});var e=this.options,n=e.binField,r=e.binNumber,i=e.binWidth,a=e.stackField;this.chart.changeData(OA(t,n,i,r,a))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return zA},e}(rw),$A=["#FAAD14","#E8EDF3"],VA={percent:.2,color:$A,animation:{}};function qA(t){var e=(0,x.clamp)(jx(t)?t:0,0,1);return[{type:"current",percent:e},{type:"target",percent:1-e}]}function HA(t){var e=t.chart,n=t.options,r=n.percent,i=n.progressStyle,a=n.color,o=n.barWidthRatio;e.data(qA(r));var s=Bx({},t,{options:{xField:"1",yField:"percent",seriesField:"type",isStack:!0,widthRatio:o,interval:{style:i,color:(0,x.isString)(a)?[a,$A[1]]:a},args:{zIndexReversed:!0,sortZIndex:!0}}});return Vw(s),e.tooltip(!1),e.axis(!1),e.legend(!1),t}function UA(t){var e=t.chart;return e.coordinate("rect").transpose(),t}function GA(t){return ox(HA,Mw({}),UA,Aw,kw,Ow())(t)}var WA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="process",e}return(0,b.__extends)(e,t),e.getDefaultOptions=function(){return VA},e.prototype.changeData=function(t){this.updateOption({percent:t}),this.chart.changeData(qA(t))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return GA},e}(rw);function ZA(t){var e=t.chart,n=t.options,r=n.innerRadius,i=n.radius;return e.coordinate("theta",{innerRadius:r,radius:i}),t}function XA(t,e){var n=t.chart,r=t.options,i=r.innerRadius,a=r.statistic,o=r.percent,s=r.meta;if(n.getController("annotation").clear(!0),i&&a){var l=(0,x.get)(s,["percent","formatter"])||function(t){return(100*t).toFixed(2)+"%"},u=a.content;u&&(u=Bx({},u,{content:(0,x.isNil)(u.content)?l(o):u.content})),Rx(n,{statistic:(0,b.__assign)((0,b.__assign)({},a),{content:u}),plotType:"ring-progress"},{percent:o})}return e&&n.render(!0),t}function YA(t){return ox(HA,Mw({}),ZA,XA,Aw,kw,Ow())(t)}var KA={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:{}},QA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ring-process",e}return(0,b.__extends)(e,t),e.getDefaultOptions=function(){return KA},e.prototype.changeData=function(t){this.chart.emit(w.BEFORE_CHANGE_DATA,Au.fromData(this.chart,w.BEFORE_CHANGE_DATA,null)),this.updateOption({percent:t}),this.chart.data(qA(t)),XA({chart:this.chart,options:this.options},!0),this.chart.emit(w.AFTER_CHANGE_DATA,Au.fromData(this.chart,w.AFTER_CHANGE_DATA,null))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return YA},e}(rw);function JA(t){var e=t.chart,n=t.options,r=n.data,i=n.type,a=n.xField,o=n.yField,s=n.colorField,l=n.sizeField,u=n.sizeRatio,c=n.shape,d=n.color,h=n.tooltip,f=n.heatmapStyle;e.data(r);var p="polygon";"density"===i&&(p="heatmap");var g=Pw(h,[a,o,s]),m=g.fields,v=g.formatter,y=1;return(u||0===u)&&(c||l?u<0||u>1?console.warn("sizeRatio is not in effect: It must be a number in [0,1]"):y=u:console.warn("sizeRatio is not in effect: Must define shape or sizeField first")),Rw(Bx({},t,{options:{type:p,colorField:s,tooltipFields:m,shapeField:l||"",label:void 0,mapping:{tooltip:v,shape:c&&(l?function(t){var e=r.map((function(t){return t[l]})),n=Math.min.apply(Math,e),i=Math.max.apply(Math,e);return[c,((0,x.get)(t,l)-n)/(i-n),y]}:function(){return[c,1,y]}),color:d||s&&e.getTheme().sequenceColors.join("-"),style:f}}})),t}function tk(t){var e,n=t.options,r=n.xAxis,i=n.yAxis,a=n.xField,o=n.yField;return ox(Mw((e={},e[a]=r,e[o]=i,e)))(t)}function ek(t){var e=t.chart,n=t.options,r=n.xAxis,i=n.yAxis,a=n.xField,o=n.yField;return!1===r?e.axis(a,!1):e.axis(a,r),!1===i?e.axis(o,!1):e.axis(o,i),t}function nk(t){var e=t.chart,n=t.options,r=n.legend,i=n.colorField,a=n.sizeField,o=n.sizeLegend,s=!1!==r;return i&&e.legend(i,!!s&&r),a&&e.legend(a,void 0===o?r:o),s||o||e.legend(!1),t}function rk(t){var e=t.chart,n=t.options,r=n.label,i=n.colorField,a=n.type,o=fx(e,"density"===a?"heatmap":"polygon");if(r){if(i){var s=r.callback,l=(0,b.__rest)(r,["callback"]);o.label({fields:[i],callback:s,cfg:xx(l)})}}else o.label(!1);return t}function ik(t){var e=t.chart,n=t.options,r=n.coordinate,i=n.reflect;return r&&e.coordinate({type:r.type||"rect",cfg:r.cfg}),i&&e.coordinate().reflect(i),t}function ak(t){return ox(kw,ww("heatmapStyle"),tk,ik,JA,ek,nk,Cw,rk,Ow(),Sw,Aw,Ew)(t)}var ok=Bx({},rw.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"}}}}});uc("polygon","circle",{draw:function(t,e){var n,r,i=t.x,a=t.y,o=this.parsePoints(t.points),s=Math.abs(o[2].x-o[1].x),l=Math.abs(o[1].y-o[0].y),u=Math.min(s,l)/2,c=Number(t.shape[1]),d=Number(t.shape[2]),h=Math.sqrt(d),f=u*h*Math.sqrt(c),p=(null===(n=t.style)||void 0===n?void 0:n.fill)||t.color||(null===(r=t.defaultStyle)||void 0===r?void 0:r.fill),g=e.addShape("circle",{attrs:(0,b.__assign)((0,b.__assign)((0,b.__assign)({x:i,y:a,r:f},t.defaultStyle),t.style),{fill:p})});return g}}),uc("polygon","square",{draw:function(t,e){var n,r,i=t.x,a=t.y,o=this.parsePoints(t.points),s=Math.abs(o[2].x-o[1].x),l=Math.abs(o[1].y-o[0].y),u=Math.min(s,l),c=Number(t.shape[1]),d=Number(t.shape[2]),h=Math.sqrt(d),f=u*h*Math.sqrt(c),p=(null===(n=t.style)||void 0===n?void 0:n.fill)||t.color||(null===(r=t.defaultStyle)||void 0===r?void 0:r.fill),g=e.addShape("rect",{attrs:(0,b.__assign)((0,b.__assign)((0,b.__assign)({x:i-f/2,y:a-f/2,width:f,height:f},t.defaultStyle),t.style),{fill:p})});return g}});(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="heatmap",e}(0,b.__extends)(e,t),e.getDefaultOptions=function(){return ok},e.prototype.getSchemaAdaptor=function(){return ak},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()}})(rw);var sk,lk="$$range$$",uk="low-q1-median-q3-high",ck="$$y_outliers$$",dk="outliers_view",hk=Bx({},rw.getDefaultOptions(),{meta:(sk={},sk[lk]={min:0,alias:uk},sk),interactions:[{type:"active-region"}],tooltip:{showMarkers:!1,shared:!0},boxStyle:{lineWidth:1}}),fk=function(t,e){var n=t;if(Array.isArray(e)){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4];n=(0,x.map)(t,(function(t){return t[lk]=[t[r],t[i],t[a],t[o],t[s]],t}))}return n};function pk(t){var e=t.chart,n=t.options,r=n.xField,i=n.yField,a=n.groupField,o=n.color,s=n.tooltip,l=n.boxStyle;e.data(fk(n.data,i));var u=(0,x.isArray)(i)?lk:i,c=i?(0,x.isArray)(i)?i:[i]:[],d=s;!1!==d&&(d=Bx({},{fields:(0,x.isArray)(i)?i:[]},d));var h=Uw(Bx({},t,{options:{xField:r,yField:u,seriesField:a,tooltip:d,rawFields:c,label:!1,schema:{shape:"box",color:o,style:l}}})).ext;return a&&h.geometry.adjust("dodge"),t}function gk(t){var e=t.chart,n=t.options,r=n.xField,i=n.data,a=n.outliersField,o=n.outliersStyle,s=n.padding,l=n.label;if(!a)return t;var u=e.createView({padding:s,id:dk}),c=i.reduce((function(t,e){var n=e[a];return n.forEach((function(n){var r;return t.push((0,b.__assign)((0,b.__assign)({},e),(r={},r[a]=n,r)))})),t}),[]);return u.data(c),jw({chart:u,options:{xField:r,yField:a,point:{shape:"circle",style:o},label:l}}),u.axis(!1),t}function mk(t){var e,n,r=t.chart,i=t.options,a=i.meta,o=i.xAxis,s=i.yAxis,l=i.xField,u=i.yField,c=i.outliersField,d=Array.isArray(u)?lk:u,h={};if(c){var f=ck;e={},e[c]={sync:f,nice:!0},e[d]={sync:f,nice:!0},h=e}var p=Bx(h,a,(n={},n[l]=sx(o,iw),n[d]=sx(s,iw),n));return r.scale(p),t}function vk(t){var e=t.chart,n=t.options,r=n.xAxis,i=n.yAxis,a=n.xField,o=n.yField,s=Array.isArray(o)?lk:o;return!1===r?e.axis(a,!1):e.axis(a,r),!1===i?e.axis(lk,!1):e.axis(s,i),t}function yk(t){var e=t.chart,n=t.options,r=n.legend,i=n.groupField;return i?r?e.legend(i,r):e.legend(i,{position:"bottom"}):e.legend(!1),t}function bk(t){return ox(pk,gk,mk,vk,yk,Cw,Sw,Aw,kw)(t)}(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="box",e}(0,b.__extends)(e,t),e.getDefaultOptions=function(){return hk},e.prototype.changeData=function(t){this.updateOption({data:t});var e=this.options.yField,n=this.chart.views.find((function(t){return t.id===dk}));n&&n.data(t),this.chart.changeData(fk(t,e))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return bk}})(rw);var xk=n(53843),wk=n.n(xk);function _k(t,e){var n=t.length*e;if(0===t.length)throw new Error("quantile requires at least one data point.");if(e<0||e>1)throw new Error("quantiles must be between 0 and 1");return 1===e?t[t.length-1]:0===e?t[0]:n%1!==0?t[Math.ceil(n)-1]:t.length%2===0?(t[n-1]+t[n])/2:t[n]}function Ck(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function Sk(t,e,n,r){n=n||0,r=r||t.length-1;while(r>n){if(r-n>600){var i=r-n+1,a=e-n+1,o=Math.log(i),s=.5*Math.exp(2*o/3),l=.5*Math.sqrt(o*s*(i-s)/i);a-i/2<0&&(l*=-1);var u=Math.max(n,Math.floor(e-a*s/i+l)),c=Math.min(r,Math.floor(e+(i-a)*s/i+l));Sk(t,e,u,c)}var d=t[e],h=n,f=r;Ck(t,n,e),t[r]>d&&Ck(t,n,r);while(hd)f--}t[n]===d?Ck(t,n,f):(f++,Ck(t,f,r)),f<=e&&(n=f+1),e<=f&&(r=f-1)}}function Ak(t,e){var n=t.slice();if(Array.isArray(e)){Ek(n,e);for(var r=[],i=0;ie?e:t},lighten:function(t,e){return t>e?t:e},dodge:function(t,e){return 255===t?255:(t=e/255*255/(1-t/255),t>255?255:t)},burn:function(t,e){return 255===e?255:0===t?0:255*(1-Math.min(1,(1-e/255)/(t/255)))}},rE=function(t){if(!nE[t])throw new Error("unknown blend mode "+t);return nE[t]};function iE(t,e,n){void 0===n&&(n="normal");var r=eE(rE(n))(aE(t),aE(e)),i=aE(t),a=i[0],o=i[1],s=i[2],l=i[3],u=aE(e),c=u[0],d=u[1],h=u[2],f=u[3],p=Number((l+f*(1-l)).toFixed(2)),g=Math.round((l*(1-f)*(a/255)+l*f*(r[0]/255)+(1-l)*f*(c/255))/p*255),m=Math.round((l*(1-f)*(o/255)+l*f*(r[1]/255)+(1-l)*f*(d/255))/p*255),v=Math.round((l*(1-f)*(s/255)+l*f*(r[2]/255)+(1-l)*f*(h/255))/p*255);return"rgba("+g+", "+m+", "+v+", "+p+")"}function aE(t){var e,n=t.replace("/s+/g","");return"string"!==typeof n||n.startsWith("rgba")||n.startsWith("#")?(n.startsWith("rgba")&&(e=n.replace("rgba(","").replace(")","").split(",")),n.startsWith("#")&&(e=Rt.rgb2arr(n).concat([1])),e.map((function(t,e){return 3===e?Number(t):0|t}))):Rt.rgb2arr(Rt.toRGB(n)).concat([1])}var oE=n(69916),sE=1e-10;function lE(t,e){var n,r=cE(t),i=r.filter((function(e){return uE(e,t)})),a=0,o=0,s=[];if(i.length>1){var l=gE(i);for(n=0;n-1){var g=t[d.parentIndex[p]],m=Math.atan2(d.x-g.x,d.y-g.y),v=Math.atan2(c.x-g.x,c.y-g.y),y=v-m;y<0&&(y+=2*Math.PI);var b=v-y/2,x=hE(h,{x:g.x+g.radius*Math.sin(b),y:g.y+g.radius*Math.cos(b)});x>2*g.radius&&(x=2*g.radius),(null===f||f.width>x)&&(f={circle:g,width:x,p1:d,p2:c})}null!==f&&(s.push(f),a+=dE(f.circle.radius,f.width),c=d)}}else{var w=t[0];for(n=1;nMath.abs(w.radius-t[n].radius)){_=!0;break}_?a=o=0:(a=w.radius*w.radius*Math.PI,s.push({circle:w,p1:{x:w.x,y:w.y+w.radius},p2:{x:w.x-sE,y:w.y+w.radius},width:2*w.radius}))}return o/=2,e&&(e.area=a+o,e.arcArea=a,e.polygonArea=o,e.arcs=s,e.innerPoints=i,e.intersectionPoints=r),a+o}function uE(t,e){for(var n=0;ne[n].radius+sE)return!1;return!0}function cE(t){for(var e=[],n=0;n=t+e)return 0;if(n<=Math.abs(t-e))return Math.PI*Math.min(t,e)*Math.min(t,e);var r=t-(n*n-e*e+t*t)/(2*n),i=e-(n*n-t*t+e*e)/(2*n);return dE(t,r)+dE(e,i)}function pE(t,e){var n=hE(t,e),r=t.radius,i=e.radius;if(n>=r+i||n<=Math.abs(r-i))return[];var a=(r*r-i*i+n*n)/(2*n),o=Math.sqrt(r*r-a*a),s=t.x+a*(e.x-t.x)/n,l=t.y+a*(e.y-t.y)/n,u=-(e.y-t.y)*(o/n),c=-(e.x-t.x)*(o/n);return[{x:s+u,y:l-c},{x:s-u,y:l+c}]}function gE(t){for(var e={x:0,y:0},n=0;ne?1:-1})),e=0;e=Math.min(e[a].size,e[o].size)?c=1:t.size<=1e-10&&(c=-1),i[a][o]=i[o][a]=c})),{distances:r,constraints:i}}function wE(t,e,n,r){var i,a=0;for(i=0;i0&&p<=d||h<0&&p>=d||(a+=2*g*g,e[2*i]+=4*g*(o-u),e[2*i+1]+=4*g*(s-c),e[2*l]+=4*g*(u-o),e[2*l+1]+=4*g*(c-s))}return a}function _E(t,e){var n=SE(t,e),r=e.lossFunction||AE;if(t.length>=8){var i=CE(t,e),a=r(i,t),o=r(n,t);a+1e-8=Math.min(i[c].size,i[d].size)&&(u=0),a[c].push({set:d,size:l.size,weight:u}),a[d].push({set:c,size:l.size,weight:u})}var h=[];for(n in a)if(a.hasOwnProperty(n)){var f=0;for(o=0;o=o&&(a=r[n],o=s)}var l=(0,oE.nelderMead)((function(n){return-1*DE({x:n[0],y:n[1]},t,e)}),[a.x,a.y],{maxIterations:500,minErrorDelta:1e-10}).x,u={x:l[0],y:l[1]},c=!0;for(n=0;nt[n].radius){c=!1;break}for(n=0;n0&&console.log("WARNING: area "+a+" not represented on screen")}return n}function BE(t,e,n){var r=[],i=t-n,a=e;return r.push("M",i,a),r.push("A",n,n,0,1,0,i+2*n,a),r.push("A",n,n,0,1,0,i,a),r.join(" ")}function TE(t){var e={};lE(t,e);var n=e.arcs;if(0===n.length)return"M 0 0";if(1==n.length){var r=n[0].circle;return BE(r.x,r.y,r.radius)}for(var i=["\nM",n[0].p2.x,n[0].p2.y],a=0;as;i.push("\nA",s,s,0,l?1:0,1,o.p1.x,o.p1.y)}return i.join(" ")}var PE="id",IE="path",LE={appendPadding:[10,0,20,0],blendMode:"multiply",tooltip:{showTitle:!1,showMarkers:!1,fields:["id","size"],formatter:function(t){return{name:t.id,value:t.size}}},legend:{position:"top-left"},label:{style:{textAlign:"center",fill:"#fff"}},interactions:[{type:"legend-filter",enable:!1}],state:{active:{style:{stroke:"#000"}},selected:{style:{stroke:"#000",lineWidth:2}},inactive:{style:{fillOpacity:.3,strokeOpacity:.3}}},defaultInteractions:["tooltip","venn-legend-active"]},RE=(0,x.memoize)((function(t,e,n,r){var i=new Map,a=t.length;return e.forEach((function(e,o){if(1===e[r].length)i.set(e[PE],t[(o+a)%a]);else{var s=e[r].map((function(t){return i.get(t)}));i.set(e[PE],s.slice(1).reduce((function(t,e){return iE(t,e,n)}),s[0]))}})),i}),(function(){for(var t=[],e=0;e0)u-=2*Math.PI;u=u/Math.PI/2*n;var c=a-t+u-2*t;l.push(["M",c,e]);for(var d=0,h=0;h1?e+"_"+n:""+e}function _F(t){var e=t.data,n=t.xField,r=t.measureField,i=t.rangeField,a=t.targetField,o=t.layout,s=[],l=[];e.forEach((function(t,e){var o=[t[i]].flat();o.sort((function(t,e){return t-e})),o.forEach((function(r,a){var l,u=0===a?r:o[a]-o[a-1];s.push((l={rKey:i+"_"+a},l[n]=n?t[n]:String(e),l[i]=u,l))}));var u=[t[r]].flat();u.forEach((function(i,a){var o;s.push((o={mKey:wF(u,r,a)},o[n]=n?t[n]:String(e),o[r]=i,o))}));var c=[t[a]].flat();c.forEach((function(r,i){var o;s.push((o={tKey:wF(c,a,i)},o[n]=n?t[n]:String(e),o[a]=r,o))})),l.push(t[i],t[r],t[a])}));var u=Math.min.apply(Math,l.flat(1/0)),c=Math.max.apply(Math,l.flat(1/0));return u=u>0?0:u,"vertical"===o&&s.reverse(),{min:u,max:c,ds:s}}function CF(t){var e=t.chart,n=t.options,r=n.bulletStyle,i=n.targetField,a=n.rangeField,o=n.measureField,s=n.xField,l=n.color,u=n.layout,c=n.size,d=n.label,h=_F(n),f=h.min,p=h.max,g=h.ds;e.data(g);var m=Bx({},t,{options:{xField:s,yField:a,seriesField:"rKey",isStack:!0,label:(0,x.get)(d,"range"),interval:{color:(0,x.get)(l,"range"),style:(0,x.get)(r,"range"),size:(0,x.get)(c,"range")}}});Vw(m),e.geometries[0].tooltip(!1);var v=Bx({},t,{options:{xField:s,yField:o,seriesField:"mKey",isStack:!0,label:(0,x.get)(d,"measure"),interval:{color:(0,x.get)(l,"measure"),style:(0,x.get)(r,"measure"),size:(0,x.get)(c,"measure")}}});Vw(v);var y=Bx({},t,{options:{xField:s,yField:i,seriesField:"tKey",label:(0,x.get)(d,"target"),point:{color:(0,x.get)(l,"target"),style:(0,x.get)(r,"target"),size:(0,x.isFunction)((0,x.get)(c,"target"))?function(t){return(0,x.get)(c,"target")(t)/2}:(0,x.get)(c,"target")/2,shape:"horizontal"===u?"line":"hyphen"}}});return jw(y),"horizontal"===u&&e.coordinate().transpose(),(0,b.__assign)((0,b.__assign)({},t),{ext:{data:{min:f,max:p}}})}function SF(t){var e,n,r=t.options,i=t.ext,a=r.xAxis,o=r.yAxis,s=r.targetField,l=r.rangeField,u=r.measureField,c=r.xField,d=i.data;return ox(Mw((e={},e[c]=a,e[u]=o,e),(n={},n[u]={min:null===d||void 0===d?void 0:d.min,max:null===d||void 0===d?void 0:d.max,sync:!0},n[s]={sync:""+u},n[l]={sync:""+u},n)))(t)}function AF(t){var e=t.chart,n=t.options,r=n.xAxis,i=n.yAxis,a=n.xField,o=n.measureField,s=n.rangeField,l=n.targetField;return e.axis(""+s,!1),e.axis(""+l,!1),!1===r?e.axis(""+a,!1):e.axis(""+a,r),!1===i?e.axis(""+o,!1):e.axis(""+o,i),t}function kF(t){var e=t.chart,n=t.options,r=n.legend;return e.removeInteraction("legend-filter"),e.legend(r),e.legend("rKey",!1),e.legend("mKey",!1),e.legend("tKey",!1),t}function EF(t){var e=t.chart,n=t.options,r=n.label,i=n.measureField,a=n.targetField,o=n.rangeField,s=e.geometries,l=s[0],u=s[1],c=s[2];return(0,x.get)(r,"range")?l.label(""+o,(0,b.__assign)({layout:[{type:"limit-in-plot"}]},xx(r.range))):l.label(!1),(0,x.get)(r,"measure")?u.label(""+i,(0,b.__assign)({layout:[{type:"limit-in-plot"}]},xx(r.measure))):u.label(!1),(0,x.get)(r,"target")?c.label(""+a,(0,b.__assign)({layout:[{type:"limit-in-plot"}]},xx(r.target))):c.label(!1),t}function DF(t){ox(CF,SF,AF,kF,kw,EF,Cw,Sw,Aw)(t)}var FF=Bx({},rw.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}}),MF=(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bullet",e}(0,b.__extends)(e,t),e.getDefaultOptions=function(){return FF},e.prototype.changeData=function(t){this.updateOption({data:t});var e=_F(this.options),n=e.min,r=e.max,i=e.ds;SF({options:this.options,ext:{data:{min:n,max:r}},chart:this.chart}),this.chart.changeData(i)},e.prototype.getSchemaAdaptor=function(){return DF},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()}}(rw),"nodeIndex"),OF="childNodeCount",BF="nodeAncestor",TF="Invalid field: it must be a string!";function PF(t,e){var n=t.field,r=t.fields;if((0,x.isString)(n))return n;if((0,x.isArray)(n))return console.warn(TF),n[0];if(console.warn(TF+" will try to get fields instead."),(0,x.isString)(r))return r;if((0,x.isArray)(r)&&r.length)return r[0];if(e)return e;throw new TypeError(TF)}function IF(t){var e,n,r=[];t&&t.each?t.each((function(t){var i,a;t.parent!==e?(e=t.parent,n=0):n+=1;var o=(0,x.filter)(((null===(i=t.ancestors)||void 0===i?void 0:i.call(t))||[]).map((function(t){return r.find((function(e){return e.name===t.name}))||t})),(function(e){var n=e.depth;return n>0&&n1?(this.historyCache=t,this.drawBreadCrumb()):(this.historyCache=[],this.hideCrumbGroup())}},e.prototype.getButtonCfg=function(){var t=this.context.view,e=(0,x.get)(t,["interactions","drill-down","cfg","drillDownConfig"]);return Bx(this.breadCrumbCfg,null===e||void 0===e?void 0:e.breadCrumb,this.cfg)},e.prototype.drawBreadCrumb=function(){this.drawBreadCrumbGroup(),this.resetPosition(),this.breadCrumbGroup.show()},e.prototype.drawBreadCrumbGroup=function(){var t=this,e=this.getButtonCfg(),n=this.historyCache;this.breadCrumbGroup?this.breadCrumbGroup.clear():this.breadCrumbGroup=this.context.view.foregroundGroup.addGroup({name:HF});var r=0;n.forEach((function(i,a){var o=t.breadCrumbGroup.addShape({type:"text",id:i.id,name:HF+"_"+i.name+"_text",attrs:(0,b.__assign)((0,b.__assign)({text:0!==a||(0,x.isNil)(e.rootText)?i.name:e.rootText},e.textStyle),{x:r,y:0})}),s=o.getBBox();if(r+=s.width+$F,o.on("click",(function(e){var r,i=e.target.get("id");if(i!==(null===(r=(0,x.last)(n))||void 0===r?void 0:r.id)){var a=n.slice(0,n.findIndex((function(t){return t.id===i}))+1);t.backTo(a)}})),o.on("mouseenter",(function(t){var r,i=t.target.get("id");i!==(null===(r=(0,x.last)(n))||void 0===r?void 0:r.id)?o.attr(e.activeTextStyle):o.attr({cursor:"default"})})),o.on("mouseleave",(function(){o.attr(e.textStyle)})),a=0)e+=n[r].value;else e=1;t.value=e}function QF(){return this.eachAfter(KF)}function JF(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function tM(t,e){var n,r,i=this,a=[i],o=-1;while(i=a.pop())if(t.call(e,i,++o,this),n=i.children)for(r=n.length-1;r>=0;--r)a.push(n[r]);return this}function eM(t,e){var n,r,i,a=this,o=[a],s=[],l=-1;while(a=o.pop())if(s.push(a),n=a.children)for(r=0,i=n.length;r=0)n+=r[i].value;e.value=n}))}function iM(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))}function aM(t){var e=this,n=oM(e,t),r=[e];while(e!==n)e=e.parent,r.push(e);var i=r.length;while(t!==n)r.splice(i,0,t),t=t.parent;return r}function oM(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();while(t===e)i=t,t=n.pop(),e=r.pop();return i}function sM(){var t=this,e=[t];while(t=t.parent)e.push(t);return e}function lM(){return Array.from(this)}function uM(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t}function cM(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e}function*dM(){var t,e,n,r,i=this,a=[i];do{t=a.reverse(),a=[];while(i=t.pop())if(yield i,e=i.children)for(n=0,r=e.length;n=0;--a)l.push(r=i[a]=new yM(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(vM)}function fM(){return hM(this).eachBefore(mM)}function pM(t){return t.children}function gM(t){return Array.isArray(t)?t[1]:null}function mM(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function vM(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function yM(t){this.data=t,this.depth=this.height=0,this.parent=null}yM.prototype=hM.prototype={constructor:yM,count:QF,each:JF,eachAfter:eM,eachBefore:tM,find:nM,sum:rM,sort:iM,path:aM,ancestors:sM,descendants:lM,leaves:uM,links:cM,copy:fM,[Symbol.iterator]:dM};var bM={field:"value",size:[1,1],round:!1,padding:0,sort:function(t,e){return e.value-t.value},as:["x","y"],ignoreParentValue:!0};function xM(t,e){e=(0,x.assign)({},bM,e);var n,r=e.as;if(!(0,x.isArray)(r)||2!==r.length)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');try{n=PF(e)}catch(l){console.warn(l)}var i=function(t){return YF().size(e.size).round(e.round).padding(e.padding)(hM(t).sum((function(t){return(0,x.size)(t.children)?e.ignoreParentValue?0:t[n]-(0,x.reduce)(t.children,(function(t,e){return t+e[n]}),0):t[n]})).sort(e.sort))},a=i(t),o=r[0],s=r[1];return a.each((function(t){var e,n;t[o]=[t.x0,t.x1,t.x1,t.x0],t[s]=[t.y1,t.y1,t.y0,t.y0],t.name=t.name||(null===(e=t.data)||void 0===e?void 0:e.name)||(null===(n=t.data)||void 0===n?void 0:n.label),t.data.name=t.name,["x0","x1","y0","y1"].forEach((function(e){-1===r.indexOf(e)&&delete t[e]}))})),IF(a)}function wM(t,e){return t.parent===e.parent?1:2}function _M(t){return t.reduce(CM,0)/t.length}function CM(t,e){return t+e.x}function SM(t){return 1+t.reduce(AM,0)}function AM(t,e){return Math.max(t,e.y)}function kM(t){var e;while(e=t.children)t=e[0];return t}function EM(t){var e;while(e=t.children)t=e[e.length-1];return t}function DM(){var t=wM,e=1,n=1,r=!1;function i(i){var a,o=0;i.eachAfter((function(e){var n=e.children;n?(e.x=_M(n),e.y=SM(n)):(e.x=a?o+=t(e,a):0,e.y=0,a=e)}));var s=kM(i),l=EM(i),u=s.x-t(s,l)/2,c=l.x+t(l,s)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n}:function(t){t.x=(t.x-u)/(c-u)*e,t.y=(1-(i.y?t.y/i.y:1))*n})}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function FM(t){return"object"===typeof t&&"length"in t?t:Array.from(t)}function MM(t){var e,n,r=t.length;while(r)n=Math.random()*r--|0,e=t[r],t[r]=t[n],t[n]=e;return t}function OM(t){var e,n,r=0,i=(t=MM(Array.from(t))).length,a=[];while(r0&&n*n>r*r+i*i}function IM(t,e){for(var n=0;no?(r=(u+o-i)/(2*u),a=Math.sqrt(Math.max(0,o/u-r*r)),n.x=t.x-r*s-a*l,n.y=t.y-r*l+a*s):(r=(u+i-o)/(2*u),a=Math.sqrt(Math.max(0,i/u-r*r)),n.x=e.x+r*s-a*l,n.y=e.y+r*l+a*s)):(n.x=e.x+n.r,n.y=e.y)}function $M(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function VM(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,a=(e.y*n.r+n.y*e.r)/r;return i*i+a*a}function qM(t){this._=t,this.next=null,this.previous=null}function HM(t){if(!(i=(t=FM(t)).length))return 0;var e,n,r,i,a,o,s,l,u,c,d;if(e=t[0],e.x=0,e.y=0,!(i>1))return e.r;if(n=t[1],e.x=-n.r,n.x=e.r,n.y=0,!(i>2))return e.r+n.r;jM(n,e,r=t[2]),e=new qM(e),n=new qM(n),r=new qM(r),e.next=r.previous=n,n.next=e.previous=r,r.next=n.previous=e;t:for(s=3;s0)throw new Error("cycle");return a}return n.id=function(e){return arguments.length?(t=WM(e),n):t},n.parentId=function(t){return arguments.length?(e=WM(t),n):e},n}function oO(t,e){return t.parent===e.parent?1:2}function sO(t){var e=t.children;return e?e[0]:t.t}function lO(t){var e=t.children;return e?e[e.length-1]:t.t}function uO(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function cO(t){var e,n=0,r=0,i=t.children,a=i.length;while(--a>=0)e=i[a],e.z+=n,e.m+=n,n+=e.s+(r+=e.c)}function dO(t,e,n){return t.a.parent===e.parent?t.a:n}function hO(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function fO(t){var e,n,r,i,a,o=new hO(t,0),s=[o];while(e=s.pop())if(r=e._.children)for(e.children=new Array(a=r.length),i=a-1;i>=0;--i)s.push(n=e.children[i]=new hO(r[i],i)),n.parent=e;return(o.parent=new hO(null,0)).children=[o],o}function pO(){var t=oO,e=1,n=1,r=null;function i(i){var s=fO(i);if(s.eachAfter(a),s.parent.m=-s.z,s.eachBefore(o),r)i.eachBefore(l);else{var u=i,c=i,d=i;i.eachBefore((function(t){t.xc.x&&(c=t),t.depth>d.depth&&(d=t)}));var h=u===c?1:t(u,c)/2,f=h-u.x,p=e/(c.x+h+f),g=n/(d.depth||1);i.eachBefore((function(t){t.x=(t.x+f)*p,t.y=t.depth*g}))}return i}function a(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){cO(e);var a=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-a):e.z=a}else i&&(e.z=i.z+t(e._,i._));e.parent.A=s(e,i,e.parent.A||r[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(e,n,r){if(n){var i,a=e,o=e,s=n,l=a.parent.children[0],u=a.m,c=o.m,d=s.m,h=l.m;while(s=lO(s),a=sO(a),s&&a)l=sO(l),o=lO(o),o.a=e,i=s.z+d-a.z-u+t(s._,a._),i>0&&(uO(dO(s,e,r),e,i),u+=i,c+=i),d+=s.m,u+=a.m,h+=l.m,c+=o.m;s&&!lO(o)&&(o.t=s,o.m+=d-c),a&&!sO(l)&&(l.t=a,l.m+=u-h,r=e)}return r}function l(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function gO(t,e,n,r,i){var a,o=t.children,s=-1,l=o.length,u=t.value&&(i-n)/t.value;while(++sh&&(h=s),m=c*c*g,f=Math.max(h/m,m/d),f>p){c-=s;break}p=f}v.push(o={value:c,dice:l1?e:1)},n}(mO);function bO(){var t=yO,e=!1,n=1,r=1,i=[0],a=ZM,o=ZM,s=ZM,l=ZM,u=ZM;function c(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(d),i=[0],e&&t.eachBefore(ZF),t}function d(e){var n=i[e.depth],r=e.x0+n,c=e.y0+n,d=e.x1-n,h=e.y1-n;d=e-1){var l=s[t];return l.x0=r,l.y0=i,l.x1=a,void(l.y1=o)}var d=u[t],h=n/2+d,f=t+1,p=e-1;while(f>>1;u[g]o-i){var y=n?(r*v+a*m)/n:a;c(t,f,m,r,i,y,o),c(f,e,v,y,i,a,o)}else{var b=n?(i*v+o*m)/n:o;c(t,f,m,r,i,a,b),c(f,e,v,r,b,a,o)}}c(0,l,t.value,e,n,r,i)}function wO(t,e,n,r,i){(1&t.depth?gO:XF)(t,e,n,r,i)}var _O=function t(e){function n(t,n,r,i,a){if((o=t._squarify)&&o.ratio===e){var o,s,l,u,c,d=-1,h=o.length,f=t.value;while(++d1?e:1)},n}(mO),CO={field:"value",tile:"treemapSquarify",size:[1,1],round:!1,ignoreParentValue:!0,padding:0,paddingInner:0,paddingOuter:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,as:["x","y"],sort:function(t,e){return e.value-t.value},ratio:.5*(1+Math.sqrt(5))};function SO(t,e){return"treemapSquarify"===t?g[t].ratio(e):g[t]}function AO(t,e){e=(0,x.assign)({},CO,e);var n,r=e.as;if(!(0,x.isArray)(r)||2!==r.length)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');try{n=PF(e)}catch(u){console.warn(u)}var i=SO(e.tile,e.ratio),a=function(t){return bO().tile(i).size(e.size).round(e.round).padding(e.padding).paddingInner(e.paddingInner).paddingOuter(e.paddingOuter).paddingTop(e.paddingTop).paddingRight(e.paddingRight).paddingBottom(e.paddingBottom).paddingLeft(e.paddingLeft)(hM(t).sum((function(t){return e.ignoreParentValue&&t.children?0:t[n]})).sort(e.sort))},o=a(t),s=r[0],l=r[1];return o.each((function(t){t[s]=[t.x0,t.x1,t.x1,t.x0],t[l]=[t.y1,t.y1,t.y0,t.y0],["x0","x1","y0","y1"].forEach((function(e){-1===r.indexOf(e)&&delete t[e]}))})),IF(o)}function kO(t){var e=t.data,n=t.colorField,r=t.rawFields,i=t.hierarchyConfig,a=void 0===i?{}:i,o=a.activeDepth,s={partition:xM,treemap:AO},l=t.seriesField,u=t.type||"partition",c=s[u](e,(0,b.__assign)((0,b.__assign)({field:l||"value"},(0,x.omit)(a,["activeDepth"])),{type:"hierarchy."+u,as:["x","y"]})),d=[];return c.forEach((function(t){var e,i,s,u,c,h;if(0===t.depth)return null;if(o>0&&t.depth>o)return null;var f=t.data.name,p=(0,b.__assign)({},t);while(p.depth>1)f=(null===(i=p.parent.data)||void 0===i?void 0:i.name)+" / "+f,p=p.parent;var g=(0,b.__assign)((0,b.__assign)((0,b.__assign)({},sx(t.data,(0,b.__spreadArrays)(r||[],[a.field]))),(e={},e[NF]=f,e[LF]=p.data.name,e)),t);l&&(g[l]=t.data[l]||(null===(u=null===(s=t.parent)||void 0===s?void 0:s.data)||void 0===u?void 0:u[l])),n&&(g[n]=t.data[n]||(null===(h=null===(c=t.parent)||void 0===c?void 0:c.data)||void 0===h?void 0:h[n])),g.ext=a,g[GF]={hierarchyConfig:a,colorField:n,rawFields:r},d.push(g)})),d}function EO(t){var e,n=t.chart,r=t.options,i=r.color,a=r.colorField,o=void 0===a?LF:a,s=r.sunburstStyle,l=r.rawFields,u=void 0===l?[]:l,c=kO(r);return n.data(c),s&&(e=function(t){return Bx({},{fillOpacity:Math.pow(.85,t.depth)},(0,x.isFunction)(s)?s(t):s)}),qw(Bx({},t,{options:{xField:"x",yField:"y",seriesField:o,rawFields:(0,x.uniq)((0,b.__spreadArrays)(zF,u)),polygon:{color:i,style:e}}})),t}function DO(t){var e=t.chart;return e.axis(!1),t}function FO(t){var e=t.chart,n=t.options,r=n.label,i=fx(e,"polygon");if(r){var a=r.fields,o=void 0===a?["name"]:a,s=r.callback,l=(0,b.__rest)(r,["fields","callback"]);i.label({fields:o,callback:s,cfg:xx(l)})}else i.label(!1);return t}function MO(t){var e=t.chart,n=t.options,r=n.innerRadius,i=n.radius,a=n.reflect,o=e.coordinate({type:"polar",cfg:{innerRadius:r,radius:i}});return a&&o.reflect(a),t}function OO(t){var e,n=t.options,r=n.hierarchyConfig,i=n.meta;return ox(Mw({},(e={},e[RF]=(0,x.get)(i,(0,x.get)(r,["field"],"value")),e)))(t)}function BO(t){var e=t.chart,n=t.options,r=n.tooltip;if(!1===r)e.tooltip(!1);else{var i=r;(0,x.get)(r,"fields")||(i=Bx({},{customItems:function(t){return t.map((function(t){var n=(0,x.get)(e.getOptions(),"scales"),r=(0,x.get)(n,[NF,"formatter"],(function(t){return t})),i=(0,x.get)(n,[RF,"formatter"],(function(t){return t}));return(0,b.__assign)((0,b.__assign)({},t),{name:r(t.data[NF]),value:i(t.data.value)})}))}},i)),e.tooltip(i)}return t}function TO(t){var e=t.drilldown,n=t.interactions,r=void 0===n?[]:n;return(null===e||void 0===e?void 0:e.enabled)?Bx({},t,{interactions:(0,b.__spreadArrays)(r,[{type:"drill-down",cfg:{drillDownConfig:e,transformData:kO}}])}):t}function PO(t){var e=t.chart,n=t.options,r=n.drilldown;return Sw({chart:e,options:TO(n)}),(null===r||void 0===r?void 0:r.enabled)&&(e.appendPadding=Gx(e.appendPadding,(0,x.get)(r,["breadCrumb","position"]))),t}function IO(t){return ox(kw,ww("sunburstStyle"),EO,DO,OO,_w,MO,BO,FO,PO,Aw,Ow())(t)}function LO(t){var e=(0,x.get)(t,["event","data","data"],{});return(0,x.isArray)(e.children)&&e.children.length>0}function RO(t){var e=t.view.getCoordinate(),n=e.innerRadius;if(n){var r=t.event,i=r.x,a=r.y,o=e.center,s=o.x,l=o.y,u=e.getRadius()*n,c=Math.sqrt(Math.pow(s-i,2)+Math.pow(l-a,2));return c
    ',domStyles:{"g2-tooltip":{padding:"4px 8px",fontSize:"10px"}},customContent:function(t,e){var n=(0,x.get)(e,[0,"data",$O],0);return(100*n).toFixed(2)+"%"}},r)):e.tooltip(!1),t}function JO(t){var e=t.chart;return e.legend(!1),t}function tB(t){return ox(kw,Aw,XO,YO,QO,KO,Sw,Ow(),JO)(t)}uc("point","gauge-indicator",{draw:function(t,e){var n=t.customInfo,r=n.indicator,i=n.defaultColor,a=r,o=a.pointer,s=a.pin,l=e.addGroup(),u=this.parsePoint({x:0,y:0});return o&&l.addShape("line",{name:"pointer",attrs:(0,b.__assign)({x1:u.x,y1:u.y,x2:t.x,y2:t.y,stroke:i},o.style)}),s&&l.addShape("circle",{name:"pin",attrs:(0,b.__assign)({x:u.x,y:u.y,stroke:i},s.style)}),l}}),uc("interval","meter-gauge",{draw:function(t,e){var n=t.customInfo.meter,r=void 0===n?{}:n,i=r.steps,a=void 0===i?50:i,o=r.stepRatio,s=void 0===o?.5:o;a=a<1?1:a,s=(0,x.clamp)(s,0,1);var l=this.coordinate,u=l.startAngle,c=l.endAngle,d=0;if(s>0&&s<1){var h=c-u;d=h/a/(s/(1-s)+1-1/a)}for(var f=d/(1-s)*s,p=e.addGroup(),g=this.coordinate.getCenter(),m=this.coordinate.getRadius(),v=nd.getAngle(t,this.coordinate),y=v.startAngle,b=v.endAngle,w=y;w0?c:d},p=Bx({},t,{options:{xField:i,yField:nB,seriesField:i,rawFields:[a,rB,aB,nB],widthRatio:l,interval:{style:u,shape:"waterfall",color:f}}}),g=Vw(p).ext,m=g.geometry;return m.customInfo({leaderLine:s}),t}function fB(t){var e,n,r=t.options,i=r.xAxis,a=r.yAxis,o=r.xField,s=r.yField,l=r.meta,u=Bx({},{alias:s},(0,x.get)(l,s));return ox(Mw((e={},e[o]=i,e[s]=a,e[nB]=a,e),Bx({},l,(n={},n[nB]=u,n[rB]=u,n[iB]=u,n))))(t)}function pB(t){var e=t.chart,n=t.options,r=n.xAxis,i=n.yAxis,a=n.xField,o=n.yField;return!1===r?e.axis(a,!1):e.axis(a,r),!1===i?(e.axis(o,!1),e.axis(nB,!1)):(e.axis(o,i),e.axis(nB,i)),t}function gB(t){var e=t.chart,n=t.options,r=n.legend,i=n.total,a=n.risingFill,o=n.fallingFill,s=n.locale,l=Kx(s);if(!1===r)e.legend(!1);else{var u=[{name:l.get(["general","increase"]),value:"increase",marker:{symbol:"square",style:{r:5,fill:a}}},{name:l.get(["general","decrease"]),value:"decrease",marker:{symbol:"square",style:{r:5,fill:o}}}];i&&u.push({name:i.label||"",value:"total",marker:{symbol:"square",style:Bx({},{r:5},(0,x.get)(i,"style"))}}),e.legend(Bx({},{custom:!0,position:"top",items:u},r)),e.removeInteraction("legend-filter")}return t}function mB(t){var e=t.chart,n=t.options,r=n.label,i=n.labelMode,a=n.xField,o=fx(e,"interval");if(r){var s=r.callback,l=(0,b.__rest)(r,["callback"]);o.label({fields:"absolute"===i?[iB,a]:[rB,a],callback:s,cfg:xx(l)})}else o.label(!1);return t}function vB(t){var e=t.chart,n=t.options,r=n.tooltip,i=n.xField,a=n.yField;if(!1!==r){e.tooltip((0,b.__assign)({showCrosshairs:!1,showMarkers:!1,shared:!0,fields:[a]},r));var o=e.geometries[0];(null===r||void 0===r?void 0:r.formatter)?o.tooltip(i+"*"+a,r.formatter):o.tooltip(a)}else e.tooltip(!1);return t}function yB(t){return ox(dB,kw,hB,fB,pB,gB,vB,mB,Ew,Sw,Aw,Ow())(t)}uc("interval","waterfall",{draw:function(t,e){var n=t.customInfo,r=t.points,i=t.nextPoints,a=e.addGroup(),o=this.parsePath(uB(r)),s=cB(t);a.addShape("path",{attrs:(0,b.__assign)((0,b.__assign)({},s),{path:o})});var l=(0,x.get)(n,"leaderLine");if(l&&i){var u=[["M",r[2].x,r[2].y],["L",i[0].x,i[0].y]];r[2].y===i[1].y&&(u[1]=["L",i[1].x,i[1].y]),u=this.parsePath(u),a.addShape("path",{attrs:(0,b.__assign)({path:u},l.style||{})})}return a}});(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="waterfall",e}(0,b.__extends)(e,t),e.getDefaultOptions=function(){return oB},e.prototype.changeData=function(t){var e=this.options,n=e.xField,r=e.yField,i=e.total;this.updateOption({data:t}),this.chart.changeData(lB(t,n,r,i))},e.prototype.getSchemaAdaptor=function(){return yB},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()}})(rw);function bB(t,e,n){var r=n.map((function(t){return t[e]})).filter((function(t){return void 0!==t})),i=r.length>0?Math.max.apply(Math,r):0,a=Math.abs(t)%360;return a?360*i/a:i}function xB(t,e,n){var r=[];return t.forEach((function(t){var i=r.find((function(n){return n[e]===t[e]}));i?i[n]+=t[n]||null:r.push((0,b.__assign)({},t))})),r}function wB(t){var e=t.chart,n=t.options,r=n.barStyle,i=n.color,a=n.tooltip,o=n.colorField,s=n.type,l=n.xField,u=n.yField,c=n.data,d=Hx(c,u);e.data(d);var h=Bx({},t,{options:{tooltip:a,seriesField:o,interval:{style:r,color:i,shape:"line"===s?"line":"intervel"},minColumnWidth:n.minBarWidth,maxColumnWidth:n.maxBarWidth,columnBackground:n.barBackground}});return Vw(h),"line"===s&&jw({chart:e,options:{xField:l,yField:u,seriesField:o,point:{shape:"circle",color:i}}}),t}function _B(t){var e,n=t.options,r=n.yField,i=n.xField,a=n.data,o=n.isStack,s=n.isGroup,l=n.colorField,u=n.maxAngle,c=o&&!s&&l?xB(a,i,r):a,d=Hx(c,r);return ox(Mw((e={},e[r]={min:0,max:bB(u,r,d)},e)))(t)}function CB(t){var e=t.chart,n=t.options,r=n.radius,i=n.innerRadius,a=n.startAngle,o=n.endAngle;return e.coordinate({type:"polar",cfg:{radius:r,innerRadius:i,startAngle:a,endAngle:o}}).transpose(),t}function SB(t){var e=t.chart,n=t.options,r=n.xField,i=n.xAxis;return e.axis(r,i),t}function AB(t){var e=t.chart,n=t.options,r=n.label,i=n.yField,a=fx(e,"interval");if(r){var o=r.callback,s=(0,b.__rest)(r,["callback"]);a.label({fields:[i],callback:o,cfg:(0,b.__assign)((0,b.__assign)({},xx(s)),{type:"polar"})})}else a.label(!1);return t}function kB(t){return ox(ww("barStyle"),wB,_B,SB,CB,Sw,Aw,kw,Cw,_w,Ow(),AB)(t)}var EB=Bx({},rw.getDefaultOptions(),{interactions:[{type:"element-active"}],legend:!1,tooltip:{showMarkers:!1},xAxis:{grid:null,tickLine:null,line:null},maxAngle:240}),DB=(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="radial-bar",e}(0,b.__extends)(e,t),e.getDefaultOptions=function(){return EB},e.prototype.changeData=function(t){this.updateOption({data:t}),_B({chart:this.chart,options:this.options}),this.chart.changeData(t)},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return kB}}(rw),"first-axes-view"),FB="second-axes-view",MB="series-field-key";function OB(t,e,n,r,i){var a=[];e.forEach((function(e){r.forEach((function(r){var i,o=(i={},i[t]=r[t],i[n]=e,i[e]=r[e],i);a.push(o)}))}));var o=Object.values((0,x.groupBy)(a,n)),s=o[0],l=void 0===s?[]:s,u=o[1],c=void 0===u?[]:u;return i?[l.reverse(),c.reverse()]:[l,c]}function BB(t){return"vertical"!==t}function TB(t,e,n){var r=e[0],i=e[1],a=r.autoPadding,o=i.autoPadding,s=t.__axisPosition,l=s.layout,u=s.position;if(BB(l)&&"top"===u&&(r.autoPadding=n.instance(a.top,0,a.bottom,a.left),i.autoPadding=n.instance(o.top,a.left,o.bottom,0)),BB(l)&&"bottom"===u&&(r.autoPadding=n.instance(a.top,a.right/2+5,a.bottom,a.left),i.autoPadding=n.instance(o.top,o.right,o.bottom,a.right/2+5)),!BB(l)&&"bottom"===u){var c=a.left>=o.left?a.left:o.left;r.autoPadding=n.instance(a.top,a.right,a.bottom/2+5,c),i.autoPadding=n.instance(a.bottom/2+5,o.right,o.bottom,c)}if(!BB(l)&&"top"===u){c=a.left>=o.left?a.left:o.left;r.autoPadding=n.instance(a.top,a.right,0,c),i.autoPadding=n.instance(0,o.right,a.top,c)}}function PB(t){var e,n,r=t.chart,i=t.options,a=i.data,o=i.xField,s=i.yField,l=i.color,u=i.barStyle,c=i.widthRatio,d=i.legend,h=i.layout,f=OB(o,s,MB,a,BB(h));d?r.legend(MB,d):!1===d&&r.legend(!1);var p=f[0],g=f[1];BB(h)?(e=r.createView({region:{start:{x:0,y:0},end:{x:.5,y:1}},id:DB}),e.coordinate().transpose().reflect("x"),n=r.createView({region:{start:{x:.5,y:0},end:{x:1,y:1}},id:FB}),n.coordinate().transpose(),e.data(p),n.data(g)):(e=r.createView({region:{start:{x:0,y:0},end:{x:1,y:.5}},id:DB}),n=r.createView({region:{start:{x:0,y:.5},end:{x:1,y:1}},id:FB}),n.coordinate().reflect("y"),e.data(p),n.data(g));var m=Bx({},t,{chart:e,options:{widthRatio:c,xField:o,yField:s[0],seriesField:MB,interval:{color:l,style:u}}});Vw(m);var v=Bx({},t,{chart:n,options:{xField:o,yField:s[1],seriesField:MB,widthRatio:c,interval:{color:l,style:u}}});return Vw(v),t}function IB(t){var e,n,r,i=t.options,a=t.chart,o=i.xAxis,s=i.yAxis,l=i.xField,u=i.yField,c=vx(a,DB),d=vx(a,FB),h={};return(0,x.keys)((null===i||void 0===i?void 0:i.meta)||{}).map((function(t){(0,x.get)(null===i||void 0===i?void 0:i.meta,[t,"alias"])&&(h[t]=i.meta[t].alias)})),a.scale((e={},e[MB]={sync:!0,formatter:function(t){return(0,x.get)(h,t,t)}},e)),Mw((n={},n[l]=o,n[u[0]]=s[u[0]],n))(Bx({},t,{chart:c})),Mw((r={},r[l]=o,r[u[1]]=s[u[1]],r))(Bx({},t,{chart:d})),t}function LB(t){var e=t.chart,n=t.options,r=n.xAxis,i=n.yAxis,a=n.xField,o=n.yField,s=n.layout,l=vx(e,DB),u=vx(e,FB);return"bottom"===(null===r||void 0===r?void 0:r.position)?u.axis(a,(0,b.__assign)((0,b.__assign)({},r),{label:{formatter:function(){return""}}})):u.axis(a,!1),!1===r?l.axis(a,!1):l.axis(a,(0,b.__assign)({position:BB(s)?"top":"bottom"},r)),!1===i?(l.axis(o[0],!1),u.axis(o[1],!1)):(l.axis(o[0],i[o[0]]),u.axis(o[1],i[o[1]])),e.__axisPosition={position:l.getOptions().axes[a].position,layout:s},t}function RB(t){var e=t.chart;return Sw(Bx({},t,{chart:vx(e,DB)})),Sw(Bx({},t,{chart:vx(e,FB)})),t}function NB(t){var e=t.chart,n=t.options,r=n.yField,i=n.yAxis;return Bw(Bx({},t,{chart:vx(e,DB),options:{yAxis:i[r[0]]}})),Bw(Bx({},t,{chart:vx(e,FB),options:{yAxis:i[r[1]]}})),t}function zB(t){var e=t.chart;return kw(Bx({},t,{chart:vx(e,DB)})),kw(Bx({},t,{chart:vx(e,FB)})),kw(t),t}function jB(t){var e=t.chart;return Aw(Bx({},t,{chart:vx(e,DB)})),Aw(Bx({},t,{chart:vx(e,FB)})),t}function $B(t){var e,n,r=this,i=t.chart,a=t.options,o=a.label,s=a.yField,l=a.layout,u=vx(i,DB),c=vx(i,FB),d=fx(u,"interval"),h=fx(c,"interval");if(o){var f=o.callback,p=(0,b.__rest)(o,["callback"]);p.position||(p.position="middle"),void 0===p.offset&&(p.offset=2);var g=(0,b.__assign)({},p);if(BB(l)){var m=(null===(e=g.style)||void 0===e?void 0:e.textAlign)||("middle"===p.position?"center":"left");p.style=Bx({},p.style,{textAlign:m});var v={left:"right",right:"left",center:"center"};g.style=Bx({},g.style,{textAlign:v[m]})}else{var y={top:"bottom",bottom:"top",middle:"middle"};"string"===typeof p.position?p.position=y[p.position]:"function"===typeof p.position&&(p.position=function(){for(var t=[],e=0;er)throw new Error("circular link");i=a,a=new Set}if(e)for(var s=Math.max(lT(n,(function(t){return t.depth}))+1,0),l=void 0,u=0;un)throw new Error("circular link");r=i,i=new Set}}function x(t){for(var e=t.nodes,r=Math.max(lT(e,(function(t){return t.depth}))+1,0),a=(o-i-l)/(r-1),s=new Array(r).fill(0).map((function(){return[]})),u=0,c=e;u0){var y=(c/d-u.y0)*e;u.y0+=y,u.y1+=y,D(u)}}void 0===n&&o.sort(hT),o.length&&A(o,r)}}function S(t,e,r){for(var i=t.length,a=i-2;a>=0;--a){for(var o=t[a],s=0,l=o;s0){var y=(c/d-u.y0)*e;u.y0+=y,u.y1+=y,D(u)}}void 0===n&&o.sort(hT),o.length&&A(o,r)}}function A(e,n){var r=e.length>>1,i=e[r];E(e,i.y0-t,r-1,n),k(e,i.y1+t,r+1,n),E(e,s,e.length-1,n),k(e,a,0,n)}function k(e,n,r,i){for(;r1e-6&&(a.y0+=o,a.y1+=o),n=a.y1+t}}function E(e,n,r,i){for(;r>=0;--r){var a=e[r],o=(a.y1-n)*i;o>1e-6&&(a.y0-=o,a.y1-=o),n=a.y0-t}}function D(t){var e=t.sourceLinks,n=t.targetLinks;if(void 0===r){for(var i=0,a=n;i "+n,value:r}}},nodeWidthRatio:.008,nodePaddingRatio:.01,animation:{appear:{animation:"wave-in"},enter:{animation:"wave-in"}}}},e.prototype.changeData=function(t){this.updateOption({data:t});var e=OT(this.options,this.chart.width,this.chart.height),n=e.nodes,r=e.edges,i=vx(this.chart,IT),a=vx(this.chart,LT);i.changeData(n),a.changeData(r)},e.prototype.getSchemaAdaptor=function(){return VT},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()}})(rw);var HT={y:0,nodeWidthRatio:.05,weight:!1,nodePaddingRatio:.1,id:function(t){return t.id},source:function(t){return t.source},target:function(t){return t.target},sourceWeight:function(t){return t.value||1},targetWeight:function(t){return t.value||1},sortBy:null};function UT(t,e,n){(0,x.forIn)(t,(function(t,r){t.inEdges=e.filter((function(t){return""+n.target(t)===""+r})),t.outEdges=e.filter((function(t){return""+n.source(t)===""+r})),t.edges=t.outEdges.concat(t.inEdges),t.frequency=t.edges.length,t.value=0,t.inEdges.forEach((function(e){t.value+=n.targetWeight(e)})),t.outEdges.forEach((function(e){t.value+=n.sourceWeight(e)}))}))}function GT(t,e){var n={weight:function(t,e){return e.value-t.value},frequency:function(t,e){return e.frequency-t.frequency},id:function(t,n){return(""+e.id(t)).localeCompare(""+e.id(n))}},r=n[e.sortBy];!r&&(0,x.isFunction)(e.sortBy)&&(r=e.sortBy),r&&t.sort(r)}function WT(t,e){var n=t.length;if(!n)throw new TypeError("Invalid nodes: it's empty!");if(e.weight){var r=e.nodePaddingRatio;if(r<0||r>=1)throw new TypeError("Invalid nodePaddingRatio: it must be in range [0, 1)!");var i=r/(2*n),a=e.nodeWidthRatio;if(a<=0||a>=1)throw new TypeError("Invalid nodeWidthRatio: it must be in range (0, 1)!");var o=0;t.forEach((function(t){o+=t.value})),t.forEach((function(t){t.weight=t.value/o,t.width=t.weight*(1-r),t.height=a})),t.forEach((function(n,r){for(var o=0,s=r-1;s>=0;s--)o+=t[s].width+2*i;var l=n.minX=i+o,u=n.maxX=n.minX+n.width,c=n.minY=e.y-a/2,d=n.maxY=c+a;n.x=[l,u,u,l],n.y=[c,c,d,d]}))}else{var s=1/n;t.forEach((function(t,n){t.x=(n+.5)*s,t.y=e.y}))}return t}function ZT(t,e,n){if(n.weight){var r={};(0,x.forIn)(t,(function(t,e){r[e]=t.value})),e.forEach((function(e){var i=n.source(e),a=n.target(e),o=t[i],s=t[a];if(o&&s){var l=r[i],u=n.sourceWeight(e),c=o.minX+(o.value-l)/o.value*o.width,d=c+u/o.value*o.width;r[i]-=u;var h=r[a],f=n.targetWeight(e),p=s.minX+(s.value-h)/s.value*s.width,g=p+f/s.value*s.width;r[a]-=f;var m=n.y;e.x=[c,d,p,g],e.y=[m,m,m,m],e.source=o,e.target=s}}))}else e.forEach((function(e){var r=t[n.source(e)],i=t[n.target(e)];r&&i&&(e.x=[r.x,i.x],e.y=[r.y,i.y],e.source=r,e.target=i)}));return e}function XT(t){return(0,x.assign)({},HT,t)}function YT(t,e){var n=XT(t),r={},i=e.nodes,a=e.links;i.forEach((function(t){var e=n.id(t);r[e]=t})),UT(r,a,n),GT(i,n);var o=WT(i,n),s=ZT(r,a,n);return{nodes:o,links:s}}var KT="x",QT="y",JT="name",tP="source",eP={nodeStyle:{opacity:1,fillOpacity:1,lineWidth:1},edgeStyle:{opacity:.5,lineWidth:2},label:{fields:["x","name"],callback:function(t,e){var n=(t[0]+t[1])/2,r=n>.5?-4:4;return{labelEmit:!0,style:{fill:"#8c8c8c"},offsetX:r,content:e}}},tooltip:{showTitle:!1,showMarkers:!1,fields:["source","target","value","isNode"],showContent:function(t){return!(0,x.get)(t,[0,"data","isNode"])},formatter:function(t){var e=t.source,n=t.target,r=t.value;return{name:e+" -> "+n,value:r}}},interactions:[{type:"element-active"}],weight:!0,nodePaddingRatio:.1,nodeWidthRatio:.05};function nP(t){var e=t.options,n=e.data,r=e.sourceField,i=e.targetField,a=e.weightField,o=e.nodePaddingRatio,s=e.nodeWidthRatio,l=e.rawFields,u=void 0===l?[]:l,c=qx(n,r,i,a),d=YT({weight:!0,nodePaddingRatio:o,nodeWidthRatio:s},c),h=d.nodes,f=d.links,p=h.map((function(t){return(0,b.__assign)((0,b.__assign)({},sx(t,(0,b.__spreadArrays)(["id","x","y","name"],u))),{isNode:!0})})),g=f.map((function(t){return(0,b.__assign)((0,b.__assign)({source:t.source.name,target:t.target.name,name:t.source.name||t.target.name},sx(t,(0,b.__spreadArrays)(["x","y","value"],u))),{isNode:!1})}));return(0,b.__assign)((0,b.__assign)({},t),{ext:(0,b.__assign)((0,b.__assign)({},t.ext),{chordData:{nodesData:p,edgesData:g}})})}function rP(t){var e,n=t.chart;return n.scale((e={x:{sync:!0,nice:!0},y:{sync:!0,nice:!0,max:1}},e[JT]={sync:"color"},e[tP]={sync:"color"},e)),t}function iP(t){var e=t.chart;return e.axis(!1),t}function aP(t){var e=t.chart;return e.legend(!1),t}function oP(t){var e=t.chart,n=t.options,r=n.tooltip;return e.tooltip(r),t}function sP(t){var e=t.chart;return e.coordinate("polar").reflect("y"),t}function lP(t){var e=t.chart,n=t.options,r=t.ext.chordData.nodesData,i=n.nodeStyle,a=n.label,o=n.tooltip,s=e.createView();return s.data(r),qw({chart:s,options:{xField:KT,yField:QT,seriesField:JT,polygon:{style:i},label:a,tooltip:o}}),t}function uP(t){var e=t.chart,n=t.options,r=t.ext.chordData.edgesData,i=n.edgeStyle,a=n.tooltip,o=e.createView();o.data(r);var s={xField:KT,yField:QT,seriesField:tP,edge:{style:i,shape:"arc"},tooltip:a};return Hw({chart:o,options:s}),t}function cP(t){var e=t.chart,n=t.options,r=n.animation;return"boolean"===typeof r?e.animate(r):e.animate(!0),(0,x.each)(mx(e),(function(t){t.animate(r)})),t}function dP(t){return ox(kw,nP,sP,rP,iP,aP,oP,uP,lP,Sw,Ew,cP)(t)}(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="chord",e}(0,b.__extends)(e,t),e.getDefaultOptions=function(){return eP},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return dP}})(rw);var hP={field:"value",as:["x","y","r"],sort:function(t,e){return e.value-t.value}};function fP(t,e){e=(0,x.assign)({},hP,e);var n,r=e.as;if(!(0,x.isArray)(r)||3!==r.length)throw new TypeError('Invalid as: it must be an array with 3 strings (e.g. [ "x", "y", "r" ])!');try{n=PF(e)}catch(u){console.warn(u)}var i=function(t){return KM().size(e.size).padding(e.padding)(hM(t).sum((function(t){return t[n]})).sort(e.sort))},a=i(t),o=r[0],s=r[1],l=r[2];return a.each((function(t){t[o]=t.x,t[s]=t.y,t[l]=t.r})),IF(a)}function pP(t){var e=t.data,n=t.hierarchyConfig,r=t.rawFields,i=void 0===r?[]:r,a=t.enableDrillDown,o=fP(e,(0,b.__assign)((0,b.__assign)({},n),{field:"value",as:["x","y","r"]})),s=[];return o.forEach((function(t){var e,r=t.data.name,o=(0,b.__assign)({},t);while(o.depth>1)r=(null===(e=o.parent.data)||void 0===e?void 0:e.name)+" / "+r,o=o.parent;if(a&&t.depth>2)return null;var l=Bx({},t.data,(0,b.__assign)((0,b.__assign)((0,b.__assign)({},sx(t.data,i)),{path:r}),t));l.ext=n,l[GF]={hierarchyConfig:n,rawFields:i,enableDrillDown:a},s.push(l)})),s}function gP(t,e,n){var r=Wx([t,e]),i=r[0],a=r[1],o=r[2],s=r[3],l=n.width,u=n.height,c=l-(s+a),d=u-(i+o),h=Math.min(c,d),f=(c-h)/2,p=(d-h)/2,g=i+p,m=a+f,v=o+p,y=s+f,b=[g,m,v,y],x=h<0?0:h;return{finalPadding:b,finalSize:x}}var mP=["x","y","r","name","value","path","depth"],vP={colorField:"name",autoFit:!0,pointStyle:{lineWidth:0,stroke:"#fff"},legend:!1,hierarchyConfig:{size:[1,1],padding:0},label:{fields:["name"],layout:{type:"limit-in-shape"}},tooltip:{showMarkers:!1,showTitle:!1},drilldown:{enabled:!1}};function yP(t){var e=t.chart,n=Math.min(e.viewBBox.width,e.viewBBox.height);return Bx({options:{size:function(t){var e=t.r;return e*n}}},t)}function bP(t){var e=t.options,n=t.chart,r=n.viewBBox,i=e.padding,a=e.appendPadding,o=e.drilldown,s=a;if(null===o||void 0===o?void 0:o.enabled){var l=Gx(n.appendPadding,(0,x.get)(o,["breadCrumb","position"]));s=Wx([l,a])}var u=gP(i,s,r).finalPadding;return n.padding=u,n.appendPadding=0,t}function xP(t){var e=t.chart,n=t.options,r=e.padding,i=e.appendPadding,a=n.color,o=n.colorField,s=n.pointStyle,l=n.hierarchyConfig,u=n.sizeField,c=n.rawFields,d=void 0===c?[]:c,h=n.drilldown,f=pP({data:n.data,hierarchyConfig:l,enableDrillDown:null===h||void 0===h?void 0:h.enabled,rawFields:d});e.data(f);var p=e.viewBBox,g=gP(r,i,p).finalSize,m=function(t){var e=t.r;return e*g};return u&&(m=function(t){return t[u]*g}),jw(Bx({},t,{options:{xField:"x",yField:"y",seriesField:o,sizeField:u,rawFields:(0,b.__spreadArrays)(mP,d),point:{color:a,style:s,shape:"circle",size:m}}})),t}function wP(t){return ox(Mw({},{x:{min:0,max:1,minLimit:0,maxLimit:1,nice:!0},y:{min:0,max:1,minLimit:0,maxLimit:1,nice:!0}}))(t)}function _P(t){var e=t.chart,n=t.options,r=n.tooltip;if(!1===r)e.tooltip(!1);else{var i=r;(0,x.get)(r,"fields")||(i=Bx({},{customItems:function(t){return t.map((function(t){var n=(0,x.get)(e.getOptions(),"scales"),r=(0,x.get)(n,["name","formatter"],(function(t){return t})),i=(0,x.get)(n,["value","formatter"],(function(t){return t}));return(0,b.__assign)((0,b.__assign)({},t),{name:r(t.data.name),value:i(t.data.value)})}))}},i)),e.tooltip(i)}return t}function CP(t){var e=t.chart;return e.axis(!1),t}function SP(t){var e=t.drilldown,n=t.interactions,r=void 0===n?[]:n;return(null===e||void 0===e?void 0:e.enabled)?Bx({},t,{interactions:(0,b.__spreadArrays)(r,[{type:"drill-down",cfg:{drillDownConfig:e,transformData:pP,enableDrillDown:!0}}])}):t}function AP(t){var e=t.chart,n=t.options;return Sw({chart:e,options:SP(n)}),t}function kP(t){return ox(ww("pointStyle"),yP,bP,kw,wP,xP,CP,_w,_P,AP,Aw,Ow())(t)}(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="circle-packing",e}(0,b.__extends)(e,t),e.getDefaultOptions=function(){return vP},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return kP},e.prototype.triggerResize=function(){this.chart.destroyed||(this.chart.forceFit(),this.chart.clear(),this.execAdaptor(),this.chart.render(!0))}})(rw),function(t){function e(e,n,r,i){var a=t.call(this,e,Bx({},i,n))||this;return a.type="g2-plot",a.defaultOptions=i,a.adaptor=r,a}(0,b.__extends)(e,t),e.prototype.getDefaultOptions=function(){return this.defaultOptions},e.prototype.getSchemaAdaptor=function(){return this.adaptor}}(rw);var EP={line:t_,pie:fC,column:N_,bar:G_,area:c_,gauge:tB,"tiny-line":xA,"tiny-column":CA,"tiny-area":yA,"ring-progress":YA,progress:GA,scatter:SS,histogram:zA,funnel:tF,stock:xD},DP={line:r_,pie:pC,column:j_,bar:Z_,area:h_,gauge:eB,"tiny-line":wA,"tiny-column":kA,"tiny-area":DA,"ring-progress":QA,progress:WA,scatter:kS,histogram:jA,funnel:eF,stock:_D},FP={pie:{label:!1},column:{tooltip:{showMarkers:!1}},bar:{tooltip:{showMarkers:!1}}};function MP(t,e,n){var r=DP[t];if(r){var i=EP[t];i({chart:e,options:Bx({},r.getDefaultOptions(),(0,x.get)(FP,t,{}),n)})}else console.error("could not find "+t+" plot")}function OP(t){var e=t.chart,n=t.options,r=n.views,i=n.legend;return(0,x.each)(r,(function(t){var n=t.region,r=t.data,i=t.meta,a=t.axes,o=t.coordinate,s=t.interactions,l=t.annotations,u=t.tooltip,c=t.geometries,d=e.createView({region:n});d.data(r);var h={};a&&(0,x.each)(a,(function(t,e){h[e]=sx(t,iw)})),h=Bx({},i,h),d.scale(h),a?(0,x.each)(a,(function(t,e){d.axis(e,t)})):d.axis(!1),d.coordinate(o),(0,x.each)(c,(function(t){var e=Rw({chart:d,options:t}).ext,n=t.adjust;n&&e.geometry.adjust(n)})),(0,x.each)(s,(function(t){!1===t.enable?d.removeInteraction(t.type):d.interaction(t.type,t.cfg)})),(0,x.each)(l,(function(t){d.annotation()[t.type]((0,b.__assign)({},t))})),"boolean"===typeof t.animation?d.animate(!1):(d.animate(!0),(0,x.each)(d.geometries,(function(e){e.animate(t.animation)}))),u&&(d.interaction("tooltip"),d.tooltip(u))})),i?(0,x.each)(i,(function(t,n){e.legend(n,t)})):e.legend(!1),e.tooltip(n.tooltip),t}function BP(t){var e=t.chart,n=t.options,r=n.plots,i=n.data,a=void 0===i?[]:i;return(0,x.each)(r,(function(t){var n=t.type,r=t.region,i=t.options,o=void 0===i?{}:i,s=t.top,l=o.tooltip;if(s)MP(n,e,(0,b.__assign)((0,b.__assign)({},o),{data:a}));else{var u=e.createView((0,b.__assign)({region:r},sx(o,nw)));l&&u.interaction("tooltip"),MP(n,u,(0,b.__assign)({data:a},o))}})),t}function TP(t){var e=t.chart,n=t.options;return e.option("slider",n.slider),t}function PP(t){return ox(Aw,OP,BP,Sw,Aw,kw,Cw,TP,Ow())(t)}function IP(t,e){var n,r=t.getModel(),i=r.data;return n=(0,x.isArray)(i)?i[0][e]:i[e],n}function LP(t){var e=px(t);(0,x.each)(e,(function(t){t.hasState("active")&&t.setState("active",!1),t.hasState("selected")&&t.setState("selected",!1),t.hasState("inactive")&&t.setState("inactive",!1)}))}var RP=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,b.__extends)(e,t),e.prototype.getAssociationItems=function(t,e){var n,r=this.context.event,i=e||{},a=i.linkField,o=i.dim,s=[];if(null===(n=r.data)||void 0===n?void 0:n.data){var l=r.data.data;(0,x.each)(t,(function(t){var e,n,r=a;if("x"===o?r=t.getXScale().field:"y"===o?r=null===(e=t.getYScales().find((function(t){return t.field===r})))||void 0===e?void 0:e.field:r||(r=null===(n=t.getGroupScales()[0])||void 0===n?void 0:n.field),r){var i=(0,x.map)(px(t),(function(e){var n=!1,i=!1,a=(0,x.isArray)(l)?(0,x.get)(l[0],r):(0,x.get)(l,r);return IP(e,r)===a?n=!0:i=!0,{element:e,view:t,active:n,inactive:i}}));s.push.apply(s,i)}}))}return s},e.prototype.showTooltip=function(t){var e=bx(this.context.view),n=this.getAssociationItems(e,t);(0,x.each)(n,(function(t){if(t.active){var e=t.element.shape.getCanvasBBox();t.view.showTooltip({x:e.minX+e.width/2,y:e.minY+e.height/2})}}))},e.prototype.hideTooltip=function(){var t=bx(this.context.view);(0,x.each)(t,(function(t){t.hideTooltip()}))},e.prototype.active=function(t){var e=yx(this.context.view),n=this.getAssociationItems(e,t);(0,x.each)(n,(function(t){var e=t.active,n=t.element;e&&n.setState("active",!0)}))},e.prototype.selected=function(t){var e=yx(this.context.view),n=this.getAssociationItems(e,t);(0,x.each)(n,(function(t){var e=t.active,n=t.element;e&&n.setState("selected",!0)}))},e.prototype.highlight=function(t){var e=yx(this.context.view),n=this.getAssociationItems(e,t);(0,x.each)(n,(function(t){var e=t.inactive,n=t.element;e&&n.setState("inactive",!0)}))},e.prototype.reset=function(){var t=yx(this.context.view);(0,x.each)(t,(function(t){LP(t)}))},e}(Ls);Vs("association",RP),zl("association-active",{start:[{trigger:"element:mouseenter",action:"association:active"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),zl("association-selected",{start:[{trigger:"element:mouseenter",action:"association:selected"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),zl("association-highlight",{start:[{trigger:"element:mouseenter",action:"association:highlight"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),zl("association-tooltip",{start:[{trigger:"element:mousemove",action:"association:showTooltip"}],end:[{trigger:"element:mouseleave",action:"association:hideTooltip"}]});var NP=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="mix",e}return(0,b.__extends)(e,t),e.prototype.getSchemaAdaptor=function(){return PP},e}(rw);function zP(t,e){var n=e.data,r=e.coordinate,i=e.interactions,a=e.annotations,o=e.animation,s=e.tooltip,l=e.axes,u=e.meta,c=e.geometries;n&&t.data(n);var d={};l&&(0,x.each)(l,(function(t,e){d[e]=sx(t,iw)})),d=Bx({},u,d),t.scale(d),r&&t.coordinate(r),!1===l?t.axis(!1):(0,x.each)(l,(function(e,n){t.axis(n,e)})),(0,x.each)(c,(function(e){var n=Rw({chart:t,options:e}).ext,r=e.adjust;r&&n.geometry.adjust(r)})),(0,x.each)(i,(function(e){!1===e.enable?t.removeInteraction(e.type):t.interaction(e.type,e.cfg)})),(0,x.each)(a,(function(e){t.annotation()[e.type]((0,b.__assign)({},e))})),"boolean"===typeof o?t.animate(!1):(t.animate(!0),(0,x.each)(t.geometries,(function(t){t.animate(o)}))),s?(t.interaction("tooltip"),t.tooltip(s)):!1===s&&t.removeInteraction("tooltip")}function jP(t){var e=t.chart,n=t.options,r=n.type,i=n.data,a=n.fields,o=n.eachView,s=(0,x.omit)(n,["type","data","fields","eachView","axes","meta","tooltip","coordinate","theme","legend","interactions","annotations"]);return e.data(i),e.facet(r,(0,b.__assign)((0,b.__assign)({},s),{fields:a,eachView:function(t,e){var n=o(t,e);if(n.geometries)zP(t,n);else{var r=n,i=r.options;i.tooltip&&t.interaction("tooltip"),MP(r.type,t,i)}}})),t}function $P(t){var e=t.chart,n=t.options,r=n.axes,i=n.meta,a=n.tooltip,o=n.coordinate,s=n.theme,l=n.legend,u=n.interactions,c=n.annotations,d={};return r&&(0,x.each)(r,(function(t,e){d[e]=sx(t,iw)})),d=Bx({},i,d),e.scale(d),e.coordinate(o),r?(0,x.each)(r,(function(t,n){e.axis(n,t)})):e.axis(!1),a?(e.interaction("tooltip"),e.tooltip(a)):!1===a&&e.removeInteraction("tooltip"),e.legend(l),s&&e.theme(s),(0,x.each)(u,(function(t){!1===t.enable?e.removeInteraction(t.type):e.interaction(t.type,t.cfg)})),(0,x.each)(c,(function(t){e.annotation()[t.type]((0,b.__assign)({},t))})),t}function VP(t){return ox(kw,jP,$P)(t)}var qP,HP={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(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area",e}(0,b.__extends)(e,t),e.getDefaultOptions=function(){return HP},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return VP}})(rw);function UP(t,e){console.warn(t===qP.DEV?"Plot '"+e+"' is in DEV stage, just give us issues.":t===qP.BETA?"Plot '"+e+"' is in BETA stage, DO NOT use it in production env.":t===qP.STABLE?"Plot '"+e+"' is in STABLE stage, import it by \"import { "+e+" } from '@antv/g2plot'\".":"invalid Stage type.")}(function(t){t["DEV"]="DEV",t["BETA"]="BETA",t["STABLE"]="STABLE"})(qP||(qP={}));(function(){function t(){}Object.defineProperty(t,"MultiView",{get:function(){return UP(qP.STABLE,"MultiView"),NP},enumerable:!1,configurable:!0})})();Yx("en-US",Qx),Yx("zh-CN",Jx)},37574:function(t,e){"use strict";var n;function r(){return n||(n=document.createElement("canvas").getContext("2d")),n}Object.defineProperty(e,"__esModule",{value:!0}),e.getCanvasContext=void 0,e.getCanvasContext=r},93201:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.processIllegalData=e.transformDataToNodeLinkData=e.adjustYMetaByZero=void 0;var r=n(70655),i=n(13810),a=n(64574),o=n(67428);function s(t,e){if(!t)return{};var n=t.filter((function(t){var n=i.get(t,[e]);return i.isNumber(n)&&!isNaN(n)})),r=n.every((function(t){return i.get(t,[e])>=0})),a=n.every((function(t){return i.get(t,[e])<=0}));return r?{min:0}:a?{max:0}:{}}function l(t,e,n,i,a){if(void 0===a&&(a=[]),!Array.isArray(t))return{nodes:[],links:[]};var s=[],l={},u=-1;return t.forEach((function(t){var c=t[e],d=t[n],h=t[i],f=o.pick(t,a);l[c]||(l[c]=r.__assign({id:++u,name:c},f)),l[d]||(l[d]=r.__assign({id:++u,name:d},f)),s.push(r.__assign({source:l[c].id,target:l[d].id,value:h},f))})),{nodes:Object.values(l).sort((function(t,e){return t.id-e.id})),links:s}}function u(t,e){var n=i.filter(t,(function(t){var n=t[e];return null===n||"number"===typeof n&&!isNaN(n)}));return a.log(a.LEVEL.WARN,n.length===t.length,"illegal data existed in chart data."),n}e.adjustYMetaByZero=s,e.transformDataToNodeLinkData=l,e.processIllegalData=u},54376:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.deepAssign=void 0;var n=5,r={}.toString,i=function(t,e){return r.call(t)==="[object "+e+"]"},a=function(t){return i(t,"Array")},o=function(t){return"object"===typeof t&&null!==t},s=function(t){if(!o(t)||!i(t,"Object"))return!1;var e=t;while(null!==Object.getPrototypeOf(e))e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},l=function(t,e,r,i){for(var o in r=r||0,i=i||n,e)if(Object.prototype.hasOwnProperty.call(e,o)){var u=e[o];u?s(u)?(s(t[o])||(t[o]={}),r=r&&t<=i}Object.defineProperty(e,"__esModule",{value:!0}),e.isBetween=e.isRealNumber=void 0,e.isRealNumber=n,e.isBetween=r},43303:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.resolveAllPadding=e.getAdjustAppendPadding=e.normalPadding=void 0;var r=n(13810);function i(t){if(r.isNumber(t))return[t,t,t,t];if(r.isArray(t)){var e=t.length;if(1===e)return[t[0],t[0],t[0],t[0]];if(2===e)return[t[0],t[1],t[0],t[1]];if(3===e)return[t[0],t[1],t[2],t[1]];if(4===e)return t}return[0,0,0,0]}function a(t,e,n){void 0===e&&(e="bottom"),void 0===n&&(n=25);var r=i(t),a=[e.startsWith("top")?n:0,e.startsWith("right")?n:0,e.startsWith("bottom")?n:0,e.startsWith("left")?n:0];return[r[0]+a[0],r[1]+a[1],r[2]+a[2],r[3]+a[3]]}function o(t){var e=t.map((function(t){return i(t)})),n=[0,0,0,0];return e.length>0&&(n=n.map((function(t,n){return e.forEach((function(r,i){t+=e[i][n]})),t}))),n}e.normalPadding=i,e.getAdjustAppendPadding=a,e.resolveAllPadding=o},61567:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSplinePath=e.catmullRom2bezier=e.smoothBezier=e.points2Path=void 0;var r=n(43567);function i(t,e){var n=[];if(t.length){n.push(["M",t[0].x,t[0].y]);for(var r=1,i=t.length;r"},key:(0===l?"top":"bottom")+"-statistic"},a.pick(e,["offsetX","offsetY","rotate","style","formatter"])))}}))},e.renderGaugeStatistic=function(t,e,n){var l=e.statistic,u=l.title,c=l.content;[u,c].forEach((function(e){if(e){var l=i.isFunction(e.style)?e.style(n):e.style;t.annotation().html(r.__assign({position:["50%","100%"],html:function(t,a){var u=a.getCoordinate(),c=a.views[0].getCoordinate(),d=c.getCenter(),h=c.getRadius(),f=Math.max(Math.sin(c.startAngle),Math.sin(c.endAngle))*h,p=d.y+f-u.y.start-parseFloat(i.get(l,"fontSize",0)),g=u.getRadius()*u.innerRadius*2;s(t,r.__assign({width:g+"px",transform:"translate(-50%, "+p+"px)"},o(l)));var m=a.getData();if(e.customHtml)return e.customHtml(t,a,n,m);var v=e.content;return e.formatter&&(v=e.formatter(n,m)),v?i.isString(v)?v:""+v:"
    "}},a.pick(e,["offsetX","offsetY","rotate","style","formatter"])))}}))}},5486:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.template=void 0;var r=n(13810);function i(t,e){return e?r.reduce(e,(function(t,e,n){return t.replace(new RegExp("{\\s*"+n+"\\s*}","g"),e)}),t):t}e.template=i},91065:function(t,e){"use strict";function n(t,e){return t.views.find((function(t){return t.id===e}))}function r(t){var e=t.parent;return e?e.views:[]}function i(t){return r(t).filter((function(e){return e!==t}))}Object.defineProperty(e,"__esModule",{value:!0}),e.getSiblingViews=e.getViews=e.findViewById=void 0,e.findViewById=n,e.getViews=r,e.getSiblingViews=i},31506:function(t,e,n){"use strict";n.r(e),n.d(e,{leftTranslate:function(){return a},leftRotate:function(){return o},leftScale:function(){return s},transform:function(){return u},direction:function(){return c},angleTo:function(){return d},vertical:function(){return h}});var r=n(35600),i=n(31437);function a(t,e,n){var i=[0,0,0,0,0,0,0,0,0];return r.fromTranslation(i,n),r.multiply(t,i,e)}function o(t,e,n){var i=[0,0,0,0,0,0,0,0,0];return r.fromRotation(i,n),r.multiply(t,i,e)}function s(t,e,n){var i=[0,0,0,0,0,0,0,0,0];return r.fromScaling(i,n),r.multiply(t,i,e)}function l(t,e,n){return r.multiply(t,n,e)}function u(t,e){for(var n=t?[].concat(t):[1,0,0,0,1,0,0,0,1],r=0,i=e.length;r=0;return n?a?2*Math.PI-r:r:a?r:2*Math.PI-r}function h(t,e,n){return n?(t[0]=e[1],t[1]=-1*e[0]):(t[0]=-1*e[1],t[1]=e[0]),t}},43567:function(t,e,n){"use strict";n.r(e),n.d(e,{mat3:function(){return r},vec2:function(){return i},vec3:function(){return a},ext:function(){return o}});var r=n(35600),i=n(31437),a=n(77160),o=n(31506)},39499:function(t,e,n){"use strict";n.d(e,{e9:function(){return d},Wq:function(){return L},tr:function(){return g},wb:function(){return y},zx:function(){return A}});var r=n(13810),i=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/gi,a=/[^\s\,]+/gi;function o(t){var e=t||[];return(0,r.isArray)(e)?e:(0,r.isString)(e)?(e=e.match(i),(0,r.each)(e,(function(t,n){if(t=t.match(a),t[0].length>1){var i=t[0].charAt(0);t.splice(1,0,t[0].substr(1)),t[0]=i}(0,r.each)(t,(function(e,n){isNaN(e)||(t[n]=+e)})),e[n]=t})),e):void 0}var s=o,l=n(31437);function u(t,e,n,r){var i,a,o,s,u,c,d,h=[],f=!!r;if(f){o=r[0],s=r[1];for(var p=0,g=t.length;p2&&(n.push([r].concat(a.splice(0,2))),o="l",r="m"===r?"l":"L"),"o"===o&&1===a.length&&n.push([r,a[0]]),"r"===o)n.push([r].concat(a));else while(a.length>=e[o])if(n.push([r].concat(a.splice(0,e[o]))),!e[o])break;return""})),n}var m=/[a-z]/;function v(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function y(t){var e=g(t);if(!e||!e.length)return[["M",0,0]];for(var n=!1,r=0;r=0){n=!0;break}}if(!n)return e;var a=[],o=0,s=0,l=0,u=0,c=0,d=e[0];"M"!==d[0]&&"m"!==d[0]||(o=+d[1],s=+d[2],l=o,u=s,c++,a[0]=["M",o,s]);r=c;for(var h=e.length;r1&&(n*=Math.sqrt(p),i*=Math.sqrt(p));var g=n*n*(f*f)+i*i*(h*h),m=g?Math.sqrt((n*n*(i*i)-g)/g):1;o===s&&(m*=-1),isNaN(m)&&(m=0);var v=i?m*n*f/i:0,y=n?m*-i*h/n:0,b=(l+c)/2+Math.cos(a)*v-Math.sin(a)*y,C=(u+d)/2+Math.sin(a)*v+Math.cos(a)*y,S=[(h-v)/n,(f-y)/i],A=[(-1*h-v)/n,(-1*f-y)/i],k=w([1,0],S),E=w(S,A);return x(S,A)<=-1&&(E=Math.PI),x(S,A)>=1&&(E=0),0===s&&E>0&&(E-=2*Math.PI),1===s&&E<0&&(E+=2*Math.PI),{cx:b,cy:C,rx:_(t,[c,d])?0:n,ry:_(t,[c,d])?0:i,startAngle:k,endAngle:k+E,xRotation:a,arcFlag:o,sweepFlag:s}}function S(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function A(t){t=s(t);for(var e=[],n=null,r=null,i=null,a=0,o=t.length,l=0;l0!==E(s[1]-n)>0&&E(e-(n-o[1])*(o[0]-s[0])/(o[1]-s[1])-o[0])<0&&(r=!r)}return r}var M=function(t,e,n){return t>=e&&t<=n};function O(t,e,n,r){var i=.001,a={x:n.x-t.x,y:n.y-t.y},o={x:e.x-t.x,y:e.y-t.y},s={x:r.x-n.x,y:r.y-n.y},l=o.x*s.y-o.y*s.x,u=l*l,c=o.x*o.x+o.y*o.y,d=s.x*s.x+s.y*s.y,h=null;if(u>i*c*d){var f=(a.x*s.y-a.y*s.x)/l,p=(a.x*o.y-a.y*o.x)/l;M(f,0,1)&&M(p,0,1)&&(h={x:t.x+f*o.x,y:t.y+f*o.y})}return h}function B(t){for(var e=[],n=t.length,r=0;r1){var o=t[0],s=t[n-1];e.push({from:{x:s[0],y:s[1]},to:{x:o[0],y:o[1]}})}return e}function T(t,e){var n=!1;return(0,r.each)(t,(function(t){if(O(t.from,t.to,e.from,e.to))return n=!0,!1})),n}function P(t){var e=t.map((function(t){return t[0]})),n=t.map((function(t){return t[1]}));return{minX:Math.min.apply(null,e),maxX:Math.max.apply(null,e),minY:Math.min.apply(null,n),maxY:Math.max.apply(null,n)}}function I(t,e){return!(e.minX>t.maxX||e.maxXt.maxY||e.maxY-1},o=a,s=function(t,e){if(!i(t))return t;for(var n=[],r=0;r-1)H.call(t,a,1)}return t},W=G,Z=Array.prototype.splice,X=function(t,e){if(!i(t))return[];var n=t?e.length:0,r=n-1;while(n--){var a=void 0,o=e[n];n!==r&&o===a||(a=o,Z.call(t,o,1))}return t},Y=X,K=function(t,e,n){if(!v(t)&&!D(t))return t;var r=n;return x(t,(function(t,n){r=e(r,t,n)})),r},Q=K,J=function(t,e){var n=[];if(!i(t))return n;var r=-1,a=[],o=t.length;while(++re[i])return 1;if(t[i]n?n:t},Tt=Bt,Pt=function(t,e){var n=e.toString(),r=n.indexOf(".");if(-1===r)return Math.round(t);var i=n.substr(r+1).length;return i>20&&(i=20),parseFloat(t.toFixed(i))},It=Pt,Lt=function(t){return f(t,"Number")},Rt=Lt,Nt=function(t){return Rt(t)&&t%1!==0},zt=Nt,jt=function(t){return Rt(t)&&t%2===0},$t=jt,Vt=Number.isInteger?Number.isInteger:function(t){return Rt(t)&&t%1===0},qt=Vt,Ht=function(t){return Rt(t)&&t<0},Ut=Ht,Gt=1e-5;function Wt(t,e,n){return void 0===n&&(n=Gt),Math.abs(t-e)0},Kt=Yt,Qt=function(t,e){if(v(t)){for(var n,r=-1/0,i=0;ir&&(n=a,r=o)}return n}},Jt=function(t,e){if(v(t)){for(var n,r=1/0,i=0;ie?(r&&(clearTimeout(r),r=null),s=u,o=t.apply(i,a),r||(i=a=null)):r||!1===n.trailing||(r=setTimeout(l,c)),o};return u.cancel=function(){clearTimeout(r),s=0,r=i=a=null},u},On=function(t){return i(t)?Array.prototype.slice.call(t):[]},Bn={},Tn=function(t){return t=t||"g",Bn[t]?Bn[t]+=1:Bn[t]=1,t+Bn[t]},Pn=function(){},In=function(t){return t};function Ln(t){return m(t)?0:i(t)?t.length:Object.keys(t).length}var Rn,Nn=n(70655),zn=on((function(t,e){void 0===e&&(e={});var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,o=e.fontVariant;return Rn||(Rn=document.createElement("canvas").getContext("2d")),Rn.font=[a,o,i,n+"px",r].join(" "),Rn.measureText(et(t)?t:"").width}),(function(t,e){return void 0===e&&(e={}),(0,Nn.__spreadArrays)([t],fe(e)).join("")})),jn=function(t,e,n,r){void 0===r&&(r="...");var i,a,o=16,s=zn(r,n),l=et(t)?t:ge(t),u=e,c=[];if(zn(t,n)<=e)return t;while(1){if(i=l.substr(0,o),a=zn(i,n),a+s>u&&a>u)break;if(c.push(i),u-=a,l=l.substr(o),!l)return c.join("")}while(1){if(i=l.substr(0,1),a=zn(i,n),a+s>u)break;if(c.push(i),u-=a,l=l.substr(1),!l)return c.join("")}return""+c.join("")+r},$n=function(){function t(){this.map={}}return t.prototype.has=function(t){return void 0!==this.map[t]},t.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},t.prototype.set=function(t,e){this.map[t]=e},t.prototype.clear=function(){this.map={}},t.prototype.delete=function(t){delete this.map[t]},t.prototype.size=function(){return Object.keys(this.map).length},t}(),Vn=$n},4301:function(t,e,n){ /*! * vue-treeselect v0.4.0 | (c) 2017-2019 Riophae Lee * Released under the MIT License. * https://vue-treeselect.js.org/ */ t.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=16)}([function(t,e){t.exports=n(94673)},function(t,e){t.exports=n(99848)},function(t,e){t.exports=n(16742)},function(t,e){t.exports=n(24390)},function(t,e){t.exports=n(50308)},function(t,e){t.exports=n(23279)},function(t,e){t.exports=n(26789)},function(t,e){t.exports=n(66141)},function(t,e){t.exports=n(51463)},function(t,e){t.exports=n(6557)},function(t,e){t.exports=n(75703)},function(t,e){t.exports=n(17964)},function(t,e){t.exports=n(10928)},function(t,e){t.exports=n(3933)},function(t,e){t.exports=n(20144)},function(t,e,n){},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(2),l=n.n(s),u=n(3),c=n.n(u),d=n(4),h=n.n(d),f=h.a;function p(t){return function(e){if("mousedown"===e.type&&0===e.button){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;in.bottom?t.scrollTop=Math.min(e.offsetTop+e.clientHeight-t.offsetHeight+i,t.scrollHeight):r.top-i0},single:function(){return!this.multiple},visibleOptionIds:function(){var t=this,e=[];return this.traverseAllNodesByIndex((function(n){if(t.localSearch.active&&!t.shouldOptionBeIncludedInSearchResult(n)||e.push(n.id),n.isBranch&&!t.shouldExpand(n))return!1})),e},hasVisibleOptions:function(){return 0!==this.visibleOptionIds.length},showCountOnSearchComputed:function(){return"boolean"===typeof this.showCountOnSearch?this.showCountOnSearch:this.showCount},hasBranchNodes:function(){return this.forest.normalizedOptions.some((function(t){return t.isBranch}))},shouldFlattenOptions:function(){return this.localSearch.active&&this.flattenSearchResults}},watch:{alwaysOpen:function(t){t?this.openMenu():this.closeMenu()},branchNodesFirst:function(){this.initialize()},disabled:function(t){t&&this.menu.isOpen?this.closeMenu():t||this.menu.isOpen||!this.alwaysOpen||this.openMenu()},flat:function(){this.initialize()},internalValue:function(t,e){var n=K(t,e);n&&this.$emit("input",this.getValue(),this.getInstanceId())},matchKeys:function(){this.initialize()},multiple:function(t){t&&this.buildForestState()},options:{handler:function(){this.async||(this.initialize(),this.rootOptionsStates.isLoaded=Array.isArray(this.options))},deep:!0,immediate:!0},"trigger.searchQuery":function(){this.async?this.handleRemoteSearch():this.handleLocalSearch(),this.$emit("search-change",this.trigger.searchQuery,this.getInstanceId())},value:function(){var t=this.extractCheckedNodeIdsFromValue(),e=K(t,this.internalValue);e&&this.fixSelectedNodeIds(t)}},methods:{verifyProps:function(){var t=this;if(f((function(){return!t.async||t.searchable}),(function(){return'For async search mode, the value of "searchable" prop must be true.'})),null!=this.options||this.loadOptions||f((function(){return!1}),(function(){return'Are you meant to dynamically load options? You need to use "loadOptions" prop.'})),this.flat&&f((function(){return t.multiple}),(function(){return'You are using flat mode. But you forgot to add "multiple=true"?'})),!this.flat){var e=["autoSelectAncestors","autoSelectDescendants","autoDeselectAncestors","autoDeselectDescendants"];e.forEach((function(e){f((function(){return!t[e]}),(function(){return'"'.concat(e,'" only applies to flat mode.')}))}))}},resetFlags:function(){this._blurOnSelect=!1},initialize:function(){var t=this.async?this.getRemoteSearchEntry().options:this.options;if(Array.isArray(t)){var e=this.forest.nodeMap;this.forest.nodeMap=$(),this.keepDataOfSelectedNodes(e),this.forest.normalizedOptions=this.normalize(Q,t,e),this.fixSelectedNodeIds(this.internalValue)}else this.forest.normalizedOptions=[]},getInstanceId:function(){return null==this.instanceId?this.id:this.instanceId},getValue:function(){var t=this;if("id"===this.valueFormat)return this.multiple?this.internalValue.slice():this.internalValue[0];var e=this.internalValue.map((function(e){return t.getNode(e).raw}));return this.multiple?e:e[0]},getNode:function(t){return f((function(){return null!=t}),(function(){return"Invalid node id: ".concat(t)})),null==t?null:t in this.forest.nodeMap?this.forest.nodeMap[t]:this.createFallbackNode(t)},createFallbackNode:function(t){var e=this.extractNodeFromValue(t),n=this.enhancedNormalizer(e).label||"".concat(t," (unknown)"),r={id:t,label:n,ancestors:[],parentNode:Q,isFallbackNode:!0,isRootNode:!0,isLeaf:!0,isBranch:!1,isDisabled:!1,isNew:!1,index:[-1],level:0,raw:e};return this.$set(this.forest.nodeMap,t,r)},extractCheckedNodeIdsFromValue:function(){var t=this;return null==this.value?[]:"id"===this.valueFormat?this.multiple?this.value.slice():[this.value]:(this.multiple?this.value:[this.value]).map((function(e){return t.enhancedNormalizer(e)})).map((function(t){return t.id}))},extractNodeFromValue:function(t){var e=this,n={id:t};if("id"===this.valueFormat)return n;var r=this.multiple?Array.isArray(this.value)?this.value:[]:this.value?[this.value]:[],i=Y(r,(function(n){return n&&e.enhancedNormalizer(n).id===t}));return i||n},fixSelectedNodeIds:function(t){var e=this,n=[];if(this.single||this.flat||this.disableBranchNodes||this.valueConsistsOf===ut)n=t;else if(this.valueConsistsOf===ct)t.forEach((function(t){n.push(t);var r=e.getNode(t);r.isBranch&&e.traverseDescendantsBFS(r,(function(t){n.push(t.id)}))}));else if(this.valueConsistsOf===dt){var r=$(),i=t.slice();while(i.length){var a=i.shift(),o=this.getNode(a);n.push(a),o.isRootNode||(o.parentNode.id in r||(r[o.parentNode.id]=o.parentNode.children.length),0===--r[o.parentNode.id]&&i.push(o.parentNode.id))}}else if(this.valueConsistsOf===ht){var s=$(),l=t.filter((function(t){var n=e.getNode(t);return n.isLeaf||0===n.children.length}));while(l.length){var u=l.shift(),c=this.getNode(u);n.push(u),c.isRootNode||(c.parentNode.id in s||(s[c.parentNode.id]=c.parentNode.children.length),0===--s[c.parentNode.id]&&l.push(c.parentNode.id))}}var d=K(this.forest.selectedNodeIds,n);d&&(this.forest.selectedNodeIds=n),this.buildForestState()},keepDataOfSelectedNodes:function(t){var e=this;this.forest.selectedNodeIds.forEach((function(n){if(t[n]){var r=wt({},t[n],{isFallbackNode:!0});e.$set(e.forest.nodeMap,n,r)}}))},isSelected:function(t){return!0===this.forest.selectedNodeMap[t.id]},traverseDescendantsBFS:function(t,e){if(t.isBranch){var n=t.children.slice();while(n.length){var r=n[0];r.isBranch&&n.push.apply(n,o()(r.children)),e(r),n.shift()}}},traverseDescendantsDFS:function(t,e){var n=this;t.isBranch&&t.children.forEach((function(t){n.traverseDescendantsDFS(t,e),e(t)}))},traverseAllNodesDFS:function(t){var e=this;this.forest.normalizedOptions.forEach((function(n){e.traverseDescendantsDFS(n,t),t(n)}))},traverseAllNodesByIndex:function(t){var e=function e(n){n.children.forEach((function(n){!1!==t(n)&&n.isBranch&&e(n)}))};e({children:this.forest.normalizedOptions})},toggleClickOutsideEvent:function(t){t?document.addEventListener("mousedown",this.handleClickOutside,!1):document.removeEventListener("mousedown",this.handleClickOutside,!1)},getValueContainer:function(){return this.$refs.control.$refs["value-container"]},getInput:function(){return this.getValueContainer().$refs.input},focusInput:function(){this.getInput().focus()},blurInput:function(){this.getInput().blur()},handleMouseDown:p((function(t){if(t.preventDefault(),t.stopPropagation(),!this.disabled){var e=this.getValueContainer().$el.contains(t.target);e&&!this.menu.isOpen&&(this.openOnClick||this.trigger.isFocused)&&this.openMenu(),this._blurOnSelect?this.blurInput():this.focusInput(),this.resetFlags()}})),handleClickOutside:function(t){this.$refs.wrapper&&!this.$refs.wrapper.contains(t.target)&&(this.blurInput(),this.closeMenu())},handleLocalSearch:function(){var t=this,e=this.trigger.searchQuery,n=function(){return t.resetHighlightedOptionWhenNecessary(!0)};if(!e)return this.localSearch.active=!1,n();this.localSearch.active=!0,this.localSearch.noResults=!0,this.traverseAllNodesDFS((function(e){var n;e.isBranch&&(e.isExpandedOnSearch=!1,e.showAllChildrenOnSearch=!1,e.isMatched=!1,e.hasMatchedDescendants=!1,t.$set(t.localSearch.countMap,e.id,(n={},l()(n,nt,0),l()(n,rt,0),l()(n,it,0),l()(n,at,0),n)))}));var r=e.trim().toLocaleLowerCase(),i=r.replace(/\s+/g," ").split(" ");this.traverseAllNodesDFS((function(e){t.searchNested&&i.length>1?e.isMatched=i.every((function(t){return kt(!1,t,e.nestedSearchLabel)})):e.isMatched=t.matchKeys.some((function(n){return kt(!t.disableFuzzyMatching,r,e.lowerCased[n])})),e.isMatched&&(t.localSearch.noResults=!1,e.ancestors.forEach((function(e){return t.localSearch.countMap[e.id][rt]++})),e.isLeaf&&e.ancestors.forEach((function(e){return t.localSearch.countMap[e.id][at]++})),e.parentNode!==Q&&(t.localSearch.countMap[e.parentNode.id][nt]+=1,e.isLeaf&&(t.localSearch.countMap[e.parentNode.id][it]+=1))),(e.isMatched||e.isBranch&&e.isExpandedOnSearch)&&e.parentNode!==Q&&(e.parentNode.isExpandedOnSearch=!0,e.parentNode.hasMatchedDescendants=!0)})),n()},handleRemoteSearch:function(){var t=this,e=this.trigger.searchQuery,n=this.getRemoteSearchEntry(),r=function(){t.initialize(),t.resetHighlightedOptionWhenNecessary(!0)};if((""===e||this.cacheOptions)&&n.isLoaded)return r();this.callLoadOptionsProp({action:lt,args:{searchQuery:e},isPending:function(){return n.isLoading},start:function(){n.isLoading=!0,n.isLoaded=!1,n.loadingError=""},succeed:function(i){n.isLoaded=!0,n.options=i,t.trigger.searchQuery===e&&r()},fail:function(t){n.loadingError=Et(t)},end:function(){n.isLoading=!1}})},getRemoteSearchEntry:function(){var t=this,e=this.trigger.searchQuery,n=this.remoteSearch[e]||wt({},St(),{options:[]});if(this.$watch((function(){return n.options}),(function(){t.trigger.searchQuery===e&&t.initialize()}),{deep:!0}),""===e){if(Array.isArray(this.defaultOptions))return n.options=this.defaultOptions,n.isLoaded=!0,n;if(!0!==this.defaultOptions)return n.isLoaded=!0,n}return this.remoteSearch[e]||this.$set(this.remoteSearch,e,n),n},shouldExpand:function(t){return this.localSearch.active?t.isExpandedOnSearch:t.isExpanded},shouldOptionBeIncludedInSearchResult:function(t){return!!t.isMatched||(!(!t.isBranch||!t.hasMatchedDescendants||this.flattenSearchResults)||!(t.isRootNode||!t.parentNode.showAllChildrenOnSearch))},shouldShowOptionInMenu:function(t){return!(this.localSearch.active&&!this.shouldOptionBeIncludedInSearchResult(t))},getControl:function(){return this.$refs.control.$el},getMenu:function(){var t=this.appendToBody?this.$refs.portal.portalTarget:this,e=t.$refs.menu.$refs.menu;return e&&"#comment"!==e.nodeName?e:null},setCurrentHighlightedOption:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this.menu.current;if(null!=r&&r in this.forest.nodeMap&&(this.forest.nodeMap[r].isHighlighted=!1),this.menu.current=t.id,t.isHighlighted=!0,this.menu.isOpen&&n){var i=function(){var n=e.getMenu(),r=n.querySelector('.vue-treeselect__option[data-id="'.concat(t.id,'"]'));r&&g(n,r)};this.getMenu()?i():this.$nextTick(i)}},resetHighlightedOptionWhenNecessary:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.menu.current;!t&&null!=e&&e in this.forest.nodeMap&&this.shouldShowOptionInMenu(this.getNode(e))||this.highlightFirstOption()},highlightFirstOption:function(){if(this.hasVisibleOptions){var t=this.visibleOptionIds[0];this.setCurrentHighlightedOption(this.getNode(t))}},highlightPrevOption:function(){if(this.hasVisibleOptions){var t=this.visibleOptionIds.indexOf(this.menu.current)-1;if(-1===t)return this.highlightLastOption();this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[t]))}},highlightNextOption:function(){if(this.hasVisibleOptions){var t=this.visibleOptionIds.indexOf(this.menu.current)+1;if(t===this.visibleOptionIds.length)return this.highlightFirstOption();this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[t]))}},highlightLastOption:function(){if(this.hasVisibleOptions){var t=Z()(this.visibleOptionIds);this.setCurrentHighlightedOption(this.getNode(t))}},resetSearchQuery:function(){this.trigger.searchQuery=""},closeMenu:function(){!this.menu.isOpen||!this.disabled&&this.alwaysOpen||(this.saveMenuScrollPosition(),this.menu.isOpen=!1,this.toggleClickOutsideEvent(!1),this.resetSearchQuery(),this.$emit("close",this.getValue(),this.getInstanceId()))},openMenu:function(){this.disabled||this.menu.isOpen||(this.menu.isOpen=!0,this.$nextTick(this.resetHighlightedOptionWhenNecessary),this.$nextTick(this.restoreMenuScrollPosition),this.options||this.async||this.loadRootOptions(),this.toggleClickOutsideEvent(!0),this.$emit("open",this.getInstanceId()))},toggleMenu:function(){this.menu.isOpen?this.closeMenu():this.openMenu()},toggleExpanded:function(t){var e;this.localSearch.active?(e=t.isExpandedOnSearch=!t.isExpandedOnSearch,e&&(t.showAllChildrenOnSearch=!0)):e=t.isExpanded=!t.isExpanded,e&&!t.childrenStates.isLoaded&&this.loadChildrenOptions(t)},buildForestState:function(){var t=this,e=$();this.forest.selectedNodeIds.forEach((function(t){e[t]=!0})),this.forest.selectedNodeMap=e;var n=$();this.multiple&&(this.traverseAllNodesByIndex((function(t){n[t.id]=J})),this.selectedNodes.forEach((function(e){n[e.id]=et,t.flat||t.disableBranchNodes||e.ancestors.forEach((function(e){t.isSelected(e)||(n[e.id]=tt)}))}))),this.forest.checkedStateMap=n},enhancedNormalizer:function(t){return wt({},t,{},this.normalizer(t,this.getInstanceId()))},normalize:function(t,e,n){var r=this,a=e.map((function(t){return[r.enhancedNormalizer(t),t]})).map((function(e,a){var o=i()(e,2),s=o[0],u=o[1];r.checkDuplication(s),r.verifyNodeShape(s);var c=s.id,d=s.label,h=s.children,p=s.isDefaultExpanded,g=t===Q,m=g?0:t.level+1,v=Array.isArray(h)||null===h,y=!v,b=!!s.isDisabled||!r.flat&&!g&&t.isDisabled,x=!!s.isNew,w=r.matchKeys.reduce((function(t,e){return wt({},t,l()({},e,At(s[e]).toLocaleLowerCase()))}),{}),_=g?w.label:t.nestedSearchLabel+" "+w.label,C=r.$set(r.forest.nodeMap,c,$());if(r.$set(C,"id",c),r.$set(C,"label",d),r.$set(C,"level",m),r.$set(C,"ancestors",g?[]:[t].concat(t.ancestors)),r.$set(C,"index",(g?[]:t.index).concat(a)),r.$set(C,"parentNode",t),r.$set(C,"lowerCased",w),r.$set(C,"nestedSearchLabel",_),r.$set(C,"isDisabled",b),r.$set(C,"isNew",x),r.$set(C,"isMatched",!1),r.$set(C,"isHighlighted",!1),r.$set(C,"isBranch",v),r.$set(C,"isLeaf",y),r.$set(C,"isRootNode",g),r.$set(C,"raw",u),v){var S,A=Array.isArray(h);r.$set(C,"childrenStates",wt({},St(),{isLoaded:A})),r.$set(C,"isExpanded","boolean"===typeof p?p:m=0&&i.top<=o||i.top<0&&i.bottom>0,c=l>a+bt,d=s>a+bt;u?"auto"!==t.openDirection?t.menu.placement=Je[t.openDirection]:t.menu.placement=c||!d?"bottom":"top":t.closeMenu()}},setupMenuSizeWatcher:function(){var t=this.instance,e=t.getMenu();this.menuSizeWatcher||(this.menuSizeWatcher={remove:D(e,this.adjustMenuOpenDirection)})},setupMenuResizeAndScrollEventListeners:function(){var t=this.instance,e=t.getControl();this.menuResizeAndScrollEventListeners||(this.menuResizeAndScrollEventListeners={remove:O(e,this.adjustMenuOpenDirection)})},removeMenuSizeWatcher:function(){this.menuSizeWatcher&&(this.menuSizeWatcher.remove(),this.menuSizeWatcher=null)},removeMenuResizeAndScrollEventListeners:function(){this.menuResizeAndScrollEventListeners&&(this.menuResizeAndScrollEventListeners.remove(),this.menuResizeAndScrollEventListeners=null)}},render:function(){var t=arguments[0];return t("div",{ref:"menu-container",class:"vue-treeselect__menu-container",style:this.menuContainerStyle},[t("transition",{attrs:{name:"vue-treeselect__menu--transition"}},[this.renderMenu()])])}},en=tn,nn=It(en,Ye,Ke,!1,null,null,null);nn.options.__file="src/components/Menu.vue";var rn=nn.exports,an=n(14),on=n.n(an);function sn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ln(t){for(var e=1;e0&&(t.classList2=e.data[0].children)}))}}}),c=u,d=n(1001),h=(0,d.Z)(c,s,l,!1,null,"56654634",null),f=h.exports,p=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-button",{attrs:{slot:"reference",size:"small",type:"text"},on:{click:t.open},slot:"reference"},[t._v("删除")])},g=[],m={props:["data"],methods:{open:function(){var t=this;this.$confirm("此操作将永久删除该分类, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){return t.deleteRow()}))},deleteRow:function(){var t=this;this.$api.requested({classname:"webmanage.saletool.sharematerial.sharematerialClass",method:"delete",content:{sat_sharematerial_classid:this.data.sat_sharematerial_classid}}).then((function(e){t.tool.showMessage(e),1===e.code&&t.$emit("onSuccess")}))}}},v=m,y=(0,d.Z)(v,p,g,!1,null,null,null),b=y.exports,x=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-switch",{attrs:{"active-color":"#3874F6","inactive-color":"#ff4949",disabled:!t.disabled},on:{change:t.releaseNotice},model:{value:t.value,callback:function(e){t.value=e},expression:"value"}})},w=[],_=n(16198),C=(n(35666),{props:["value","data","disabled"],data:function(){return{}},methods:{releaseNotice:function(){var t=this;return(0,_.Z)(regeneratorRuntime.mark((function e(){var n,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.data,delete n.children,n.isenable=1==n.isenable?0:1,n.issystem=!0,e.next=6,t.$api.requested({classname:"webmanage.saletool.sharematerial.sharematerialClass",method:"insertOrUpdate",content:(0,a.Z)({},n)});case 6:r=e.sent,t.tool.showMessage(r),1===r.code&&t.$emit("onSuccess");case 9:case"end":return e.stop()}}),e)})))()}}}),S=C,A=(0,d.Z)(S,x,w,!1,null,null,null),k=A.exports,E={components:{list:f,Header:o.Z,onDel:b,release:k},data:function(){return{dialogFormVisible:!1,dialogTitle:"",form:{classname:"",parentid:0,sat_sharematerial_classid:0,issystem:!0,isenable:!0}}},methods:{onSuccess:function(){this.$refs.list.selectList()},openDialog:function(t,e){this.dialogTitle=t,this.dialogFormVisible=!0,"新增分类"==t?(this.form.parentid=e?e.sat_sharematerial_classid:0,this.form.sat_sharematerial_classid=0,this.form.classname=""):e&&(this.form=(0,a.Z)((0,a.Z)({},e),{},{issystem:!0}))},handleRequest:function(){var t=this;if(""==this.form.classname)return this.$message.error("分类名称不可为空!");this.$api.requested({classname:"webmanage.saletool.sharematerial.sharematerialClass",method:"insertOrUpdate",content:this.form}).then((function(e){t.tool.showMessage(e),t.dialogFormVisible=!1,1===e.code&&t.onSuccess()}))}}},D=E,F=(0,d.Z)(D,r,i,!1,null,"77a5b4f2",null),M=F.exports},35531:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return F}});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("el-tabs",{on:{"tab-click":t.handleClick},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[n("el-tab-pane",{attrs:{label:"经销商分析",name:"first"}},[n("read-data",{attrs:{type:"agency"}}),n("downloadData",{attrs:{type:"agency"}})],1),n("el-tab-pane",{attrs:{label:"团队内部分析",name:"second"}},[n("read-data",{attrs:{type:"team"}}),n("downloadData",{attrs:{type:"team"}})],1)],1)],1)},i=[],a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"content"},[n("header",[t._v("分享数据")]),n("div",{staticClass:"chart"},[n("div",{staticClass:"box"},[n("div",{staticClass:"title-box"},[n("div",{staticClass:"title"},[t._v("分享次数")]),n("el-radio-group",{staticStyle:{"margin-right":"33px"},attrs:{size:"small"},model:{value:t.tabPosition,callback:function(e){t.tabPosition=e},expression:"tabPosition"}},[n("el-radio-button",{attrs:{label:"year"}},[t._v("年")]),n("el-radio-button",{attrs:{label:"month"}},[t._v("月")]),n("el-radio-button",{attrs:{label:"day"}},[t._v("日")])],1)],1),n("div",{staticStyle:{width:"calc(100% - 33px)",height:"374px","margin-top":"40px"},attrs:{id:"container"}})]),t._m(0)])])},o=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"box"},[n("div",{staticClass:"title-box"},[n("div",{staticClass:"title"},[t._v("分享渠道")])]),n("div",{staticStyle:{width:"calc(100% - 33px)",height:"374px","margin-top":"40px"},attrs:{id:"pie"}})])}],s=(n(41539),n(42581)),l={name:"adShareData",data:function(){return{tabPosition:"year"}},mounted:function(){fetch("https://gw.alipayobjects.com/os/bmw-prod/1d565782-dde4-4bb6-8946-ea6a38ccf184.json").then((function(t){return t.json()})).then((function(t){var e=new s.Line("container",{data:t,padding:"0",xField:"Date",yField:"scales",xAxis:{tickCount:12},yAxis:{tickCount:9}});e.render()}));var t=[{type:"分类一",value:27},{type:"分类二",value:25}],e=new s.Pie("pie",{appendPadding:10,data:t,angleField:"value",colorField:"type",radius:.75,legend:{position:"leftTop"},label:{type:"spider",labelHeight:28,content:"{name}\n{percentage}"},interactions:[{type:"element-selected"},{type:"element-active"}]});e.render()}},u=l,c=n(1001),d=(0,c.Z)(u,a,o,!1,null,"40b49d9c",null),h=d.exports,f=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"content"},[n("header",[t._v("浏览数据")]),n("div",{staticClass:"chart-box"},[n("div",{staticStyle:{width:"50%"},attrs:{id:t.type+"pie1"}})]),n("div",{staticClass:"title-box"},[n("div",{staticClass:"title"},[t._v("未浏览"+t._s("agency"==t.type?"经销商":"业务员"))]),n("exportExcel",{attrs:{tablecols:t.unReadData.tablecols,param:t.unReadData.params,excelTitle:"agency"==t.type?"推广素材经销商未浏览表":"推广素材团队未浏览表"}})],1),n("tableLayout",{staticStyle:{"margin-top":"16px"},attrs:{layout:t.unReadData.tablecols,data:t.unReadData.list,custom:!0},scopedSlots:t._u([{key:"customcol",fn:function(e){return["region"==e.column.columnname?n("div",[t._v(" "+t._s(e.column.data.province)+t._s(e.column.data.city)+t._s(e.column.data.county)+" ")]):n("p",[t._v(t._s(e.column.data[e.column.columnname]))])]}}])}),n("div",{staticStyle:{"margin-top":"16px","text-align":"right"}},[n("el-pagination",{attrs:{background:"",small:"","current-page":t.unReadData.pageNumber,"page-size":t.unReadData.pageSize,layout:"total, prev, pager, next, jumper",total:t.unReadData.total},on:{"current-change":t.handlUnReadCurrentChange}})],1),n("div",{staticClass:"title-box",staticStyle:{"margin-top":"30px"}},[n("div",{staticClass:"title"},[t._v("已浏览"+t._s("agency"==t.type?"经销商":"业务员"))]),n("exportExcel",{attrs:{tablecols:t.readData.tablecols,param:t.readData.params,excelTitle:"agency"==t.type?"推广素材经销商已浏览表":"推广素材团队已浏览表"}})],1),n("tableLayout",{staticStyle:{"margin-top":"16px"},attrs:{layout:t.readData.tablecols,data:t.readData.list,custom:!0},scopedSlots:t._u([{key:"customcol",fn:function(e){return["region"==e.column.columnname?n("div",[t._v(" "+t._s(e.column.data.province)+t._s(e.column.data.city)+t._s(e.column.data.county)+" ")]):"isdownloadfile"==e.column.columnname?n("div",[t._v(" "+t._s(1==e.column.data.isdownloadfile?"是":"否")+" ")]):n("p",[t._v(t._s(e.column.data[e.column.columnname]))])]}}])}),n("div",{staticStyle:{"margin-top":"16px","text-align":"right"}},[n("el-pagination",{attrs:{background:"",small:"","current-page":t.readData.pageNumber,"page-size":t.readData.pageSize,layout:"total, prev, pager, next, jumper",total:t.readData.total},on:{"current-change":t.handlReadCurrentChange}})],1)],1)},p=[],g=n(4906),m={props:["type"],components:{exportExcel:g.Z},data:function(){return{readData:{tablecols:[],list:[],pageNumber:1,pageSize:10,total:0},unReadData:{tablecols:[],list:[],pageNumber:1,pageSize:10,total:0}}},methods:{getReadList:function(){var t=this,e={classname:this.classname,method:"getReadList",content:{sat_sharematerialid:this.$route.query.id,pageNumber:this.readData.pageNumber,pageSize:this.readData.pageSize,isAll:!1}};this.$api.requested(e).then((function(n){if(console.log(t.type,"read",n),"成功"!=n.msg)return t.$message.error(n.data);t.readData.params=e,t.readData.list=n.data,t.readData.pageNumber=n.pageNumber,t.readData.total=n.total}))},getUnReadList:function(){var t=this,e={classname:this.classname,method:"getUnReadList",content:{sat_sharematerialid:this.$route.query.id,pageNumber:this.unReadData.pageNumber,pageSize:this.unReadData.pageSize,isAll:!1}};this.$api.requested(e).then((function(n){if(console.log(t.type,"unread",n),"成功"!=n.msg)return t.$message.error(n.data);t.unReadData.params=e,t.unReadData.list=n.data,t.unReadData.pageNumber=n.pageNumber,t.unReadData.total=n.total}))},handlReadCurrentChange:function(t){this.readData.pageNumber=t,this.getReadList()},handlUnReadCurrentChange:function(t){this.unReadData.pageNumber=t,this.getUnReadList()},renderer:function(t){var e=new s.Pie(this.type+"pie1",{appendPadding:10,data:t,angleField:"value",colorField:"type",radius:.75,legend:{position:"leftTop"},label:{type:"spider",labelHeight:28,content:"{name}\n{percentage}"},interactions:[{type:"element-selected"},{type:"element-active"}]});e.render()}},created:function(){this.readData.tablecols=this.tool.tabelCol("archives_adlist")["".concat(this.type,"ReadTable")].tablecols,this.unReadData.tablecols=this.tool.tabelCol("archives_adlist")["".concat(this.type,"UnreadTable")].tablecols,this.classname="agency"==this.type?"webmanage.saletool.sharematerial.statistics.agent":"webmanage.saletool.sharematerial.statistics.team",this.getUnReadList(),this.getReadList()},mounted:function(){var t=this;this.$api.requested({classname:"agency"==this.type?"webmanage.saletool.sharematerial.statistics.agent":"webmanage.saletool.sharematerial.statistics.team",method:"getData",content:{sat_sharematerialid:this.$route.query.id}}).then((function(e){if("成功"!=e.msg)return t.$message.error(e.data);var n=[{type:"未浏览",value:e.data.unreadNum},{type:"已浏览",value:e.data.readNum}];t.renderer(n)}))}},v=m,y=(0,c.Z)(v,f,p,!1,null,"4aa16784",null),b=y.exports,x=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"content"},[n("header",[t._v("下载数据")]),n("div",{staticClass:"chart-box"},[n("div",{staticStyle:{width:"50%"},attrs:{id:t.type+"pie2"}})]),n("div",{staticClass:"title-box"},[n("div",{staticClass:"title"},[t._v("未下载"+t._s("agency"==t.type?"经销商":"业务员"))]),n("exportExcel",{attrs:{tablecols:t.unDownload.tablecols,param:t.unDownload.params,excelTitle:"agency"==t.type?"推广素材经销商未下载表":"推广素材团队未下载表"}})],1),n("tableLayout",{staticStyle:{"margin-top":"16px"},attrs:{layout:t.unDownload.tablecols,data:t.unDownload.list,custom:!0},scopedSlots:t._u([{key:"customcol",fn:function(e){return["region"==e.column.columnname?n("div",[t._v(" "+t._s(e.column.data.province)+t._s(e.column.data.city)+t._s(e.column.data.county)+" ")]):n("p",[t._v(t._s(e.column.data[e.column.columnname]))])]}}])}),n("div",{staticStyle:{"margin-top":"16px","text-align":"right"}},[n("el-pagination",{attrs:{background:"",small:"","current-page":t.unDownload.pageNumber,"page-size":t.unDownload.pageSize,layout:"total, prev, pager, next, jumper",total:t.unDownload.total},on:{"current-change":t.handlUnCurrentChange}})],1),n("div",{staticClass:"title-box",staticStyle:{"margin-top":"30px"}},[n("div",{staticClass:"title"},[t._v("已下载"+t._s("agency"==t.type?"经销商":"业务员"))]),n("exportExcel",{attrs:{tablecols:t.download.tablecols,param:t.download.params,excelTitle:"agency"==t.type?"推广素材经销商已下载表":"推广素材团队已下载表"}})],1),n("tableLayout",{staticStyle:{"margin-top":"16px"},attrs:{layout:t.download.tablecols,data:t.download.list,custom:!0},scopedSlots:t._u([{key:"customcol",fn:function(e){return["region"==e.column.columnname?n("div",[t._v(" "+t._s(e.column.data.province)+t._s(e.column.data.city)+t._s(e.column.data.county)+" ")]):"isdownloadfile"==e.column.columnname?n("div",[t._v(" "+t._s(1==e.column.data.isdownloadfile?"是":"否")+" ")]):n("p",[t._v(t._s(e.column.data[e.column.columnname]))])]}}])}),n("div",{staticStyle:{"margin-top":"16px","text-align":"right"}},[n("el-pagination",{attrs:{background:"",small:"","current-page":t.download.pageNumber,"page-size":t.download.pageSize,layout:"total, prev, pager, next, jumper",total:t.download.total},on:{"current-change":t.handlCurrentChange}})],1)],1)},w=[],_={props:["type"],components:{exportExcel:g.Z},data:function(){return{download:{tablecols:[],list:[],pageNumber:1,pageSize:10,total:0},unDownload:{tablecols:[],list:[],pageNumber:1,pageSize:10,total:0}}},methods:{renderer:function(t){var e=new s.Pie(this.type+"pie2",{appendPadding:10,data:t,angleField:"value",colorField:"type",radius:.75,legend:{position:"leftTop"},label:{type:"spider",labelHeight:28,content:"{name}\n{percentage}"},interactions:[{type:"element-selected"},{type:"element-active"}]});e.render()},getDownloadList:function(){var t=this,e={classname:this.classname,method:"getDownloadList",content:{sat_sharematerialid:this.$route.query.id,pageNumber:this.download.pageNumber,pageSize:this.download.pageSize,isAll:!1}};this.$api.requested(e).then((function(n){if(console.log(t.type,"下载",n),"成功"!=n.msg)return t.$message.error(n.data);t.download.params=e,t.download.list=n.data,t.download.pageNumber=n.pageNumber,t.download.total=n.total}))},getUnDownloadList:function(){var t=this,e={classname:this.classname,method:"getUnDownloadList",content:{sat_sharematerialid:this.$route.query.id,pageNumber:this.unDownload.pageNumber,pageSize:this.unDownload.pageSize,isAll:!1}};this.$api.requested(e).then((function(n){if(console.log(t.type,"未下载",n),"成功"!=n.msg)return t.$message.error(n.data);t.unDownload.params=e,t.unDownload.list=n.data,t.unDownload.pageNumber=n.pageNumber,t.unDownload.total=n.total}))},handlCurrentChange:function(t){this.download.pageNumber=t,this.getDownloadList()},handlUnCurrentChange:function(t){this.unDownload.pageNumber=t,this.getUnDownloadList()}},created:function(){this.download.tablecols=this.tool.tabelCol("archives_adlist")["".concat(this.type,"DownloadTable")].tablecols,this.unDownload.tablecols=this.tool.tabelCol("archives_adlist")["".concat(this.type,"UndownloadTable")].tablecols,this.classname="webmanage.saletool.sharematerial.statistics".concat("agency"==this.type?".agent":".team"),this.getDownloadList(),this.getUnDownloadList()},mounted:function(){var t=this;this.$api.requested({classname:"agency"==this.type?"webmanage.saletool.sharematerial.statistics.agent":"webmanage.saletool.sharematerial.statistics.team",method:"getData",content:{sat_sharematerialid:this.$route.query.id}}).then((function(e){if("成功"!=e.msg)return t.$message.error(e.data);var n=[{type:"未下载",value:e.data.unDownloadNum},{type:"已下载",value:e.data.downloadNum}];t.renderer(n)}))}},C=_,S=(0,c.Z)(C,x,w,!1,null,"2ab3af2e",null),A=S.exports,k={components:{shareData:h,readData:b,downloadData:A},data:function(){return{activeName:"first"}},methods:{handleClick:function(t,e){console.log(t,e)}},mounted:function(){}},E=k,D=(0,c.Z)(E,r,i,!1,null,"830f7e58",null),F=D.exports},61373:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return z}});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("list",{ref:"list",scopedSlots:t._u([{key:"detail",fn:function(t){return[n("detail",{attrs:{id:t.data.data.sat_sharematerialid}})]}},t.tool.checkAuth(t.$route.name,"update")?{key:"edit",fn:function(e){return[n("el-button",{staticClass:"inline-16",attrs:{slot:"edit",type:"text",size:"small",disabled:"审核"==e.data.data.status},on:{click:function(n){return t.editData(e.data.data)}},slot:"edit"},[t._v("编辑")])]}}:null,t.tool.checkAuth(t.$route.name,"release")?{key:"release",fn:function(e){return[n("release",{attrs:{data:e.data.data},on:{onSuccess:t.onSuccess}})]}}:null,t.tool.checkAuth(t.$route.name,"analysis")?{key:"data_statistics",fn:function(e){return[n("el-button",{attrs:{type:"text",size:"small"},on:{click:function(n){return t.$router.push({path:"/archives_ad_analysis?id="+e.data.data.sat_sharematerialid})}}},[t._v("数据统计")])]}}:null,t.tool.checkAuth(t.$route.name,"delete")?{key:"del",fn:function(e){return[n("on-del",{attrs:{data:e.data.data},on:{onSuccess:t.onSuccess}})]}}:null],null,!0)},[t.tool.checkAuth(t.$route.name,"insert")?n("Header",{attrs:{slot:"add"},slot:"add"},[n("save",{attrs:{slot:"save",type:"upload_image"},slot:"save"}),n("save",{attrs:{slot:"save",type:"upload_video"},slot:"save"}),n("save",{attrs:{slot:"save",type:"upload_fwb"},slot:"save"})],1):t._e()],1)],1)},i=[],a=n(16198),o=(n(35666),n(38862),n(64166)),s=n(87747),l=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t._t("add"),n("div",{staticClass:"container normal-panel"},[n("div",{staticClass:"flex-align-center search-panel",staticStyle:{"margin-bottom":"16px"}},[n("div",{staticClass:"flex-align-center"},[n("p",{staticStyle:{flex:"1 0 auto","font-size":"14px"}},[t._v("素材分类: ")]),n("el-cascader",{staticClass:"cascader",attrs:{size:"small",options:t.selectList,props:{expandTrigger:"hover",label:"classname",value:"sat_sharematerial_classid"},clearable:""},on:{change:t.handleChange},model:{value:t.selectClassId,callback:function(e){t.selectClassId=e},expression:"selectClassId"}}),n("el-input",{staticClass:"input-with-select",staticStyle:{width:"270px"},attrs:{placeholder:"请输入内容",size:"small",clearable:""},on:{change:function(e){return t.getList(!0)},clear:function(e){return t.getList(!0)}},model:{value:t.params.content.where.condition,callback:function(e){t.$set(t.params.content.where,"condition",e)},expression:"params.content.where.condition"}},[n("el-button",{staticStyle:{width:"82px"},attrs:{slot:"append",icon:"el-icon-search"},slot:"append"},[t._v("查 询 ")])],1)],1)]),n("tableLayout",{attrs:{layout:t.tablecols,data:t.list,custom:!0,height:t.tableHieght},scopedSlots:t._u([{key:"customcol",fn:function(e){return["status"===e.column.columnname?n("div",[n("span",{style:"审核"===e.column.data.status?"color:#52C41A":""},[t._v(t._s("审核"==e.column.data.status?"发布":e.column.data.status))])]):n("p",[t._v(t._s(e.column.data[e.column.columnname]))])]}},{key:"opreation",fn:function(e){return[t._t("detail",null,{data:e}),t._t("edit",null,{data:e}),t._t("release",null,{data:e}),t._t("data_statistics",null,{data:e}),t._t("del",null,{data:e})]}}],null,!0)}),n("div",{staticStyle:{"margin-top":"16px","text-align":"right"}},[n("el-pagination",{attrs:{background:"",small:"","current-page":t.currentPage,"page-size":t.params.content.pageSize,layout:"total, prev, pager, next, jumper",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)],1)],2)},u=[],c=(n(68309),n(41539),n(54747),{name:"list",components:{},data:function(){return{list:[],tablecols:[],params:{classname:"webmanage.saletool.sharematerial.sharematerial",method:"select",content:{nocache:!0,pageNumber:1,pageSize:20,where:{condition:""}}},currentPage:1,total:0,selectList:[],selectClassId:""}},created:function(){this.tablecols=this.tool.tabelCol(this.$route.name)["listTable"].tablecols,this.getList(),this.getSelectList()},methods:{getSelectList:function(){var t=this;this.$api.requested({classname:"webmanage.saletool.sharematerial.sharematerialClass",method:"select",content:{parentid:0}}).then((function(e){if("成功"!=e.msg)return t.$message.error(e.data);t.selectList=e.data}))},getList:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n="9999"+JSON.parse(window.sessionStorage.getItem("active_account")).userid;e&&(this.currentPage=1),this.selectClassId?this.params.content.where.sat_sharematerial_classid=this.selectClassId:delete this.params.content.where.sat_sharematerial_classid,this.$api.requested(this.params).then((function(e){if(console.log("素材列表",e),"成功"!=e.msg)return t.$message.error(e.data);var r=[];e.data.forEach((function(t){return n==t.sat_sharematerial_classid&&""==t.title?r.push(t.sat_sharematerialid):""})),0!=r.length&&t.handleDelete(r),t.list=e.data,t.total=e.total,t.params.content.pageNumber=e.pageNumber}))},handleDelete:function(t){var e=this;this.$api.requested({classname:"webmanage.saletool.sharematerial.sharematerial",method:"delete",content:{sat_sharematerialid:t}}).then((function(t){console.log("处理删除",t),"成功"==t.msg&&e.getList()}))},handleCurrentChange:function(t){this.currentPage=t,this.params.content.pageNumber=t,this.getList()},handleChange:function(t){this.selectClassId=t[1]?t[1]:"",this.getList(!0)}}}),d=c,h=n(1001),f=(0,h.Z)(d,l,u,!1,null,"4161d50c",null),p=f.exports,g=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("span",[n("div",{staticClass:"inline-16"},[n("el-button",{attrs:{type:"text",size:"mini"},on:{click:t.open}},[t._v("详情")])],1),n("el-drawer",{attrs:{title:"详情",size:1080,visible:t.show,direction:"rtl","before-close":t.onClose},on:{"update:visible":function(e){t.show=e}}},[n("div",{staticClass:"drawer-box"},[n("div",{staticClass:"detail-head"},[n("div",{staticClass:"title"},[t._v(t._s(t.detail.title))]),n("div",{staticClass:"data-display"},[n("span",[t._v("浏览数:"+t._s(t.detail.readcount))]),n("span",[t._v("分享数:"+t._s(t.detail.sharecount))]),n("span",[t._v("拉新数:"+t._s(t.detail.newcount))])])]),1==t.detail.type?t._l(t.detail.attinfos,(function(e){return n("el-image",{key:e.linksid,staticClass:"file-style",attrs:{src:e.url,"preview-src-list":t.srcList,lazy:"",fit:"cover"}})})):t._e(),2==t.detail.type?t._l(t.detail.attinfos,(function(t){return n("video",{key:t.linksid,staticClass:"file-style",attrs:{width:"1020px",height:"428px",controls:"",poster:t.subfiles.length>0?t.subfiles[0].url:"",src:t.url}})})):t._e(),3==t.detail.type?n("div",{attrs:{id:"richtext"}}):t._e(),n("div",{staticStyle:{height:"30px"}})],2)])],1)},m=[],v=n(82761),y=n(6430),b=n(36292),x={props:["id"],components:{fileBlock:b.Z},data:function(){return{show:!1,detail:{},itemStyle:{img:{width:52.75,height:63.83},title:16,descript:12}}},methods:{open:function(){var t=this;this.$api.requested({classname:"webmanage.saletool.sharematerial.sharematerial",method:"selectDetail",content:{sat_sharematerialid:this.id}}).then((function(e){if("成功"!=e.msg)return t.$message.error(e.data);if(console.log("详情",e),e.data.attinfos=y.Z.fileList(e.data.attinfos),t.detail=e.data,t.show=!0,1==e.data.type){var n=[];e.data.attinfos.forEach((function(t){n.push(t.url)})),t.srcList=n}else 3==e.data.type&&setTimeout((function(){return document.querySelector("#richtext").innerHTML=(0,v.weAtob)(e.data.content)}),10)}))},onClose:function(){this.show=!1}}},w=x,_=(0,h.Z)(w,g,m,!1,null,"0eff11aa",null),C=_.exports,S=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"inline-16"},[n("el-button",{attrs:{type:"text",size:"mini"},on:{click:t.releaseNotice}},[t._v(t._s("新建"===t.data.status?"发布":"取消发布"))])],1)},A=[],k={props:["data"],data:function(){return{}},methods:{releaseNotice:function(){var t=this;return(0,a.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested({classname:"webmanage.saletool.sharematerial.sharematerial",method:"audit",content:{sat_sharematerialid:t.data.sat_sharematerialid,type:"新建"===t.data.status?1:0}});case 2:n=e.sent,t.tool.showMessage(n),1===n.code&&t.$emit("onSuccess");case 5:case"end":return e.stop()}}),e)})))()}}},E=k,D=(0,h.Z)(E,S,A,!1,null,null,null),F=D.exports,M=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticStyle:{display:"inline",margin:"0 16px"}},[n("el-button",{attrs:{slot:"reference",size:"small",type:"text"},on:{click:t.open},slot:"reference"},[t._v("删除")])],1)},O=[],B={props:["data"],methods:{open:function(){var t=this;this.$confirm("此操作将永久删除该文件, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){return t.deleteRow()}))},deleteRow:function(){var t=this;this.$api.requested({classname:"webmanage.saletool.sharematerial.sharematerial",method:"delete",content:{sat_sharematerialid:[this.data.sat_sharematerialid]}}).then((function(e){t.tool.showMessage(e),1===e.code&&t.$emit("onSuccess")}))}}},T=B,P=(0,h.Z)(T,M,O,!1,null,null,null),I=P.exports,L={name:"archives_adlist",components:{list:p,release:F,onDel:I,detail:C,Header:o.Z,save:s.Z},methods:{onSuccess:function(){this.$refs.list.getList()},editData:function(t){window.sessionStorage.setItem("newMaterial",JSON.stringify(t)),this.$router.push({path:"/upload_archives",query:{id:t.sat_sharematerialid}})},getAgentData:function(){var t=this;return(0,a.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested({classname:"webmanage.saletool.courseware.statistics.agent",method:"getAgentStudyData",content:{sat_coursewareid:t.$route.query.id}});case 2:n=e.sent,t.pieStudyData=[{type:"已学习",num:n.data.studyNum},{type:"未学习",num:n.data.unStudyNum}],t.pieDownloadData=[{type:"已下载",num:n.data.downloadNum},{type:"未下载",num:n.data.unDownloadNum}],t.$refs.studyPie.piePlot.changeData(t.pieStudyData),t.$refs.downloadPie.piePlot.changeData(t.pieDownloadData);case 7:case"end":return e.stop()}}),e)})))()}}},R=L,N=(0,h.Z)(R,r,i,!1,null,"6b0344d4",null),z=N.exports},1766:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return G}});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("add",{on:{onSuccess:t.onSuccess}}),n("list",{ref:"list",scopedSlots:t._u([{key:"start",fn:function(t){return[n("start",{attrs:{data:t.data.column.data}})]}},{key:"edit",fn:function(e){return[n("edit",{staticClass:"inline-16",attrs:{data:e.data.data},on:{onSuccess:t.onSuccess}})]}},{key:"addChild",fn:function(e){return[n("addChild",{staticClass:"inline-16",attrs:{data:e.data.data},on:{onSuccess:t.onSuccess}})]}},{key:"del",fn:function(e){return[n("ondel",{staticClass:"inline-16",attrs:{data:e.data.data},on:{onSuccess:t.onSuccess}})]}},{key:"childedit",fn:function(e){return[n("edit",{staticClass:"inline-16",attrs:{data:e.data.data},on:{onSuccess:t.onSuccess}})]}},{key:"childdel",fn:function(e){return[n("ondel",{staticClass:"inline-16",attrs:{data:e.data.data},on:{onSuccess:t.onSuccess}})]}}])})],1)},i=[],a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container normal-panel normal-margin"},[n("el-button",{attrs:{icon:"el-icon-plus",size:"small",type:"primary"},on:{click:function(e){t.dialogFormVisible=!0}}},[t._v("新 建")]),n("el-dialog",{attrs:{title:"新建分类",visible:t.dialogFormVisible,width:"600px"},on:{"update:visible":function(e){t.dialogFormVisible=e}}},[n("el-form",{attrs:{model:t.form,size:"small"}},[n("el-form-item",{attrs:{label:"分类名称","label-width":"80px"}},[n("el-input",{attrs:{autocomplete:"off",placeholder:"输入分类名称"},model:{value:t.form.classname,callback:function(e){t.$set(t.form,"classname",e)},expression:"form.classname"}})],1)],1),n("div",{staticClass:"dialog-footer"},[n("el-button",{staticClass:"normal-btn-width",attrs:{size:"small"},on:{click:function(e){t.dialogFormVisible=!1}}},[t._v("取 消")]),n("el-button",{staticClass:"normal-btn-width btn-warning",attrs:{size:"small",type:"warning"},on:{click:t.submit}},[t._v("确 定")])],1)],1)],1)},o=[],s=n(16198),l=(n(35666),{data:function(){return{dialogFormVisible:!1,form:{classname:"",parentid:0,issystem:!1,sat_courseware_classid:0,isenable:!0}}},methods:{submit:function(){var t=this;return(0,s.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested({classname:"webmanage.saletool.courseware.coursewareclass",method:"insertOrUpdate",content:t.form});case 2:n=e.sent,t.tool.showMessage(n),1===n.code&&(t.dialogFormVisible=!1),t.$emit("onSuccess");case 6:case"end":return e.stop()}}),e)})))()}}}),u=l,c=n(1001),d=(0,c.Z)(u,a,o,!1,null,null,null),h=d.exports,f=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("el-button",{attrs:{type:"text",size:"mini"},on:{click:function(e){return t.onShow(t.dialogFormVisible=!0)}}},[t._v("编 辑")]),n("el-dialog",{attrs:{title:"编辑分类",visible:t.dialogFormVisible,width:"600px"},on:{"update:visible":function(e){t.dialogFormVisible=e}}},[n("el-form",{attrs:{model:t.form,size:"small"}},[n("el-form-item",{attrs:{label:"分类名称","label-width":"80px"}},[n("el-input",{attrs:{autocomplete:"off",placeholder:"输入分类名称"},model:{value:t.form.classname,callback:function(e){t.$set(t.form,"classname",e)},expression:"form.classname"}})],1)],1),n("div",{staticClass:"dialog-footer"},[n("el-button",{staticClass:"normal-btn-width",attrs:{size:"small"},on:{click:function(e){t.dialogFormVisible=!1}}},[t._v("取 消")]),n("el-button",{staticClass:"normal-btn-width btn-warning",attrs:{size:"small",type:"warning"},on:{click:t.submit}},[t._v("确 定")])],1)],1)],1)},p=[],g={props:["data"],data:function(){return{dialogFormVisible:!1,form:{issystem:!1}}},methods:{onShow:function(){console.log(this.data),this.form=Object.assign({},this.form,this.data)},submit:function(){var t=this;return(0,s.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested({classname:"webmanage.saletool.courseware.coursewareclass",method:"insertOrUpdate",content:t.form});case 2:n=e.sent,t.tool.showMessage(n),1===n.code&&(t.dialogFormVisible=!1),t.$emit("onSuccess");case 6:case"end":return e.stop()}}),e)})))()}}},m=g,v=(0,c.Z)(m,f,p,!1,null,null,null),y=v.exports,b=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("el-switch",{attrs:{"active-color":"#6F9BFC","inactive-color":"#999","active-value":1,"inactive-value":0},on:{change:function(e){return t.switchChnage(t.data)}},model:{value:t.data.isenable,callback:function(e){t.$set(t.data,"isenable",e)},expression:"data.isenable"}})],1)},x=[],w={props:["data"],data:function(){return{form:{}}},methods:{switchChnage:function(t){this.form=Object.assign({},this.form,this.data),this.form.isenable=t.isenable,this.form.issystem=!1,this.submit()},submit:function(){var t=this;return(0,s.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested({classname:"webmanage.saletool.courseware.coursewareclass",method:"insertOrUpdate",content:t.form});case 2:n=e.sent,t.tool.showMessage(n),t.$emit("onSuccess");case 5:case"end":return e.stop()}}),e)})))()}}},_=w,C=(0,c.Z)(_,b,x,!1,null,null,null),S=C.exports,A=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticStyle:{display:"inline",margin:"0 16px"}},[n("el-popconfirm",{attrs:{title:"确定删除当前分类吗?"},on:{confirm:function(e){return t.deleteRow()}}},[n("el-button",{attrs:{slot:"reference",size:"small",type:"text"},slot:"reference"},[t._v("删 除")])],1)],1)},k=[],E={props:["data"],methods:{deleteRow:function(){var t=this;this.$api.requested({classname:"webmanage.saletool.courseware.coursewareclass",method:"delete",content:{sat_courseware_classid:this.data.sat_courseware_classid}}).then((function(e){t.$emit("onSuccess")}))}}},D=E,F=(0,c.Z)(D,A,k,!1,null,null,null),M=F.exports,O=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("el-button",{attrs:{type:"text",size:"mini"},on:{click:function(e){return t.onShow(t.dialogFormVisible=!0)}}},[t._v("新增子类")]),n("el-dialog",{attrs:{title:"新增子类",visible:t.dialogFormVisible,width:"600px"},on:{"update:visible":function(e){t.dialogFormVisible=e}}},[n("el-form",{attrs:{model:t.form,size:"small"}},[n("el-form-item",{attrs:{label:"子类名称","label-width":"80px"}},[n("el-input",{attrs:{autocomplete:"off",placeholder:"输入分类名称"},model:{value:t.form.classname,callback:function(e){t.$set(t.form,"classname",e)},expression:"form.classname"}})],1)],1),n("div",{staticClass:"dialog-footer"},[n("el-button",{staticClass:"normal-btn-width",attrs:{size:"small"},on:{click:function(e){t.dialogFormVisible=!1}}},[t._v("取 消")]),n("el-button",{staticClass:"normal-btn-width btn-warning",attrs:{size:"small",type:"warning"},on:{click:t.submit}},[t._v("确 定")])],1)],1)],1)},B=[],T={props:["data"],data:function(){return{dialogFormVisible:!1,form:{classname:"",parentid:0,issystem:!1,sat_courseware_classid:0,isenable:!0}}},methods:{onShow:function(){this.form.parentid=this.data.sat_courseware_classid},submit:function(){var t=this;return(0,s.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested({classname:"webmanage.saletool.courseware.coursewareclass",method:"insertOrUpdate",content:t.form});case 2:n=e.sent,t.tool.showMessage(n),1===n.code&&(t.dialogFormVisible=!1),t.$emit("onSuccess");case 6:case"end":return e.stop()}}),e)})))()}}},P=T,I=(0,c.Z)(P,O,B,!1,null,null,null),L=I.exports,R=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticStyle:{"overflow-x":"hidden"}},[n("el-row",{attrs:{gutter:16}},[n("el-col",{attrs:{span:12}},[n("div",{staticClass:"container normal-panel"},[n("tableLayout",{attrs:{layout:t.tablecols,data:t.list,custom:!0,height:"calc(100vh - 212px)"},on:{rowClick:t.rowClick},scopedSlots:t._u([{key:"customcol",fn:function(e){return["classname"===e.column.columnname?n("div",[n("p",[t._v(t._s(e.column.data.classname))]),e.column.data.sat_courseware_classid===t.activeid?n("el-input",{ref:"saveTagInput",staticClass:"input-new-tag",attrs:{size:"mini"},on:{blur:t.handleInputConfirm},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleInputConfirm.apply(null,arguments)}},model:{value:t.inputValue,callback:function(e){t.inputValue=e},expression:"inputValue"}}):t._e()],1):"isenable"===e.column.columnname?n("div",[t._t("start",null,{data:e})],2):n("p",[t._v(t._s(e.column.data[e.column.columnname]))])]}},{key:"opreation",fn:function(e){return[t._t("edit",null,{data:e}),t._t("addChild",null,{data:e}),t._t("del",null,{data:e})]}}],null,!0)})],1)]),n("el-col",{attrs:{span:12}},[n("div",{staticClass:"container normal-panel"},[n("tableLayout",{attrs:{layout:t.tablecolsChild,data:t.childClass,custom:!0,height:"calc(100vh - 212px)"},scopedSlots:t._u([{key:"customcol",fn:function(e){return["isenable"===e.column.columnname?n("div",[n("el-switch",{attrs:{"active-color":"#6F9BFC","inactive-color":"#999"},on:{change:function(n){return t.switchChnage(e.column.data)}},model:{value:e.column.data.isenable,callback:function(n){t.$set(e.column.data,"isenable",n)},expression:"scope.column.data.isenable"}})],1):n("p",[t._v(t._s(e.column.data[e.column.columnname]))])]}},{key:"opreation",fn:function(e){return[t._t("childedit",null,{data:e}),t._t("childdel",null,{data:e})]}}],null,!0)})],1)])],1)],1)},N=[],z=(n(68309),{data:function(){return{inputVisible:!1,list:[],childClass:[],act_index:null,inputValue:"",activeid:0}},methods:{coursewareclass:function(){var t=this;return(0,s.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested({classname:"webmanage.saletool.courseware.coursewareclass",method:"select",content:{parentid:0}});case 2:n=e.sent,t.list=n.data,t.act_index?t.act_index:t.act_index=0,t.rowClick(n.data[t.act_index]);case 6:case"end":return e.stop()}}),e)})))()},showInput:function(t){var e=this;this.activeid=t.sat_courseware_classid,this.$nextTick((function(t){e.$refs.saveTagInput.$refs.input.focus()}))},handleInputConfirm:function(){var t=this.inputValue;t&&this.dynamicTags.push(t),this.activeid=null,this.inputValue=""},updateClass:function(){var t=this;return(0,s.Z)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested({classname:"webmanage.saletool.courseware.coursewareclass",method:"insertOrUpdate",content:t.form});case 2:e.sent;case 3:case"end":return e.stop()}}),e)})))()},rowClick:function(t){this.act_index=t.index,this.childClass=t.children}},mounted:function(){this.coursewareclass()},created:function(){this.tablecols=this.tool.tabelCol(this.$route.name)["tableSCclass"].tablecols,this.tablecolsChild=this.tool.tabelCol(this.$route.name)["tableSCChildclass"].tablecols}}),j=z,$=(0,c.Z)(j,R,N,!1,null,null,null),V=$.exports,q={components:{add:h,list:V,start:S,edit:y,addChild:L,ondel:M},methods:{onSuccess:function(){this.$refs.list.coursewareclass()}}},H=q,U=(0,c.Z)(H,r,i,!1,null,null,null),G=U.exports},27550:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return Vt}});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"tabs normal-panel normal-margin"},[n("el-tabs",{model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[n("el-tab-pane",{attrs:{label:"经销商分析",name:"first"}}),n("el-tab-pane",{attrs:{label:"团队内部分析",name:"second"}})],1)],1),"first"===t.activeName?n("agent"):n("group")],1)},i=[],a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("pieStudy",{ref:"studyPie",attrs:{pieStudyData:t.pieStudyData}}),n("tableUnstudy"),n("tableStudy"),n("pieDownload",{ref:"downloadPie"}),n("tableUndownload"),n("tableDownload"),n("barScore")],1)},o=[],s=n(16198),l=(n(68309),n(35666),function(){var t=this,e=t.$createElement;t._self._c;return t._m(0)}),u=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container normal-panel"},[n("p",{staticClass:"normal-margin normal-title"},[t._v("学习数据")]),n("div",{staticStyle:{width:"800px",margin:"0 auto"},attrs:{id:"containerStudy"}})])}],c=n(42581),d={props:["pieStudyData"],data:function(){return{piePlot:function(){}}},methods:{renderBar:function(){this.piePlot=new c.Pie("containerStudy",{appendPadding:10,data:[],angleField:"num",colorField:"type",color:["#FBB33B","#F77655"],legend:{position:"leftTop"},radius:.9,label:{type:"spider",labelHeight:28,content:"{name}\n{percentage}",style:{fontSize:14,textAlign:"center"}},interactions:[{type:"element-active"}]}),this.piePlot.render()}},mounted:function(){this.renderBar()}},h=d,f=n(1001),p=(0,f.Z)(h,l,u,!1,null,null,null),g=p.exports,m=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container normal-panel"},[n("div",{staticClass:"flex-align-center flex-between normal-margin"},[n("p",{staticClass:"title"},[t._v("未学习经销商")]),n("excel",{attrs:{tablecols:t.tablecols,param:t.params,excelTitle:"未学习经销商"}})],1),n("tableLayout",{attrs:{layout:t.tablecols,data:t.list,custom:!0,height:310},scopedSlots:t._u([{key:"customcol",fn:function(e){return["province"===e.column.columnname?n("div",[t._v(" "+t._s(e.column.data.province)+"-"+t._s(e.column.data.city)+"-"+t._s(e.column.data.county)+" ")]):n("p",[t._v(t._s(e.column.data[e.column.columnname]?e.column.data[e.column.columnname]:"--"))])]}}])}),n("div",{staticStyle:{"margin-top":"16px","text-align":"right"}},[n("el-pagination",{attrs:{background:"",small:"","current-page":t.currentPage,"page-size":t.params.content.pageSize,layout:"total, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)],1)},v=[],y=n(4906),b={components:{excel:y.Z},data:function(){return{params:{classname:"webmanage.saletool.courseware.statistics.agent",method:"getUnStudyList",content:{sat_coursewareid:this.$route.query.id,pageNumber:1,pageSize:10,isAll:!1}},tablecols:[],list:[],tableData:[],total:0,currentPage:0}},methods:{getUnStudyList:function(){var t=this;return(0,s.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested(t.params);case 2:n=e.sent,t.list=n.data,t.total=n.total,t.currentPage=n.pageNumber;case 6:case"end":return e.stop()}}),e)})))()},handleSizeChange:function(t){this.params.content.pageSize=t,this.getUnStudyList()},handleCurrentChange:function(t){this.params.content.pageNumber=t,this.getUnStudyList()}},mounted:function(){this.getUnStudyList()},created:function(){this.tablecols=this.tool.tabelCol(this.$route.name)["tableUnstudy"].tablecols}},x=b,w=(0,f.Z)(x,m,v,!1,null,"46a71536",null),_=w.exports,C=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container normal-panel normal-margin"},[n("div",{staticClass:"flex-align-center flex-between normal-margin"},[n("p",{staticClass:"title"},[t._v("已学习经销商")]),n("excel",{attrs:{tablecols:t.tablecols,param:t.params,excelTitle:"已学习经销商"}})],1),n("tableLayout",{attrs:{layout:t.tablecols,data:t.list,custom:!0,height:310},scopedSlots:t._u([{key:"customcol",fn:function(e){return["province"===e.column.columnname?n("div",[t._v(" "+t._s(e.column.data.province)+"-"+t._s(e.column.data.city)+"-"+t._s(e.column.data.county)+" ")]):"isdownloadfile"===e.column.columnname?n("div",[t._v(" "+t._s(1===e.column.data.isdownloadfile?"是":"否")+" ")]):n("p",[t._v(t._s(e.column.data[e.column.columnname]?e.column.data[e.column.columnname]:"--"))])]}}])}),n("div",{staticStyle:{"margin-top":"16px","text-align":"right"}},[n("el-pagination",{attrs:{background:"",small:"","current-page":t.currentPage,"page-size":t.params.content.pageSize,layout:"total, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)],1)},S=[],A={components:{excel:y.Z},data:function(){return{params:{classname:"webmanage.saletool.courseware.statistics.agent",method:"getstudyList",content:{sat_coursewareid:this.$route.query.id,pageNumber:1,pageSize:10,isAll:!1}},tablecols:[],list:[],total:0,currentPage:0}},methods:{getStudyList:function(){var t=this;return(0,s.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested(t.params);case 2:n=e.sent,t.list=n.data,t.total=n.total,t.currentPage=n.pageNumber;case 6:case"end":return e.stop()}}),e)})))()},handleSizeChange:function(t){this.params.content.pageSize=t,this.getStudyList()},handleCurrentChange:function(t){this.params.content.pageNumber=t,this.getStudyList()}},mounted:function(){this.getStudyList()},created:function(){this.tablecols=this.tool.tabelCol(this.$route.name)["tableStudy"].tablecols}},k=A,E=(0,f.Z)(k,C,S,!1,null,"5ddfc29a",null),D=E.exports,F=function(){var t=this,e=t.$createElement;t._self._c;return t._m(0)},M=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container normal-panel"},[n("p",{staticClass:"normal-margin normal-title"},[t._v("下载数据")]),n("div",{staticStyle:{width:"800px",margin:"0 auto"},attrs:{id:"containerDownload"}})])}],O={props:["pieDownloadData"],data:function(){return{piePlot:function(){}}},methods:{renderBar:function(){this.piePlot=new c.Pie("containerDownload",{appendPadding:10,data:[],angleField:"num",colorField:"type",color:["#38C2F6","#5D76E4"],legend:{position:"leftTop"},radius:.9,label:{type:"spider",labelHeight:28,content:"{name}\n{percentage}",style:{fontSize:14,textAlign:"center"}},interactions:[{type:"element-active"}]}),this.piePlot.render()}},mounted:function(){this.renderBar()}},B=O,T=(0,f.Z)(B,F,M,!1,null,null,null),P=T.exports,I=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container normal-panel"},[n("div",{staticClass:"flex-align-center flex-between normal-margin"},[n("p",{staticClass:"title"},[t._v("未下载经销商")]),n("excel",{attrs:{tablecols:t.tablecols,param:t.params,excelTitle:"未下载经销商"}})],1),n("tableLayout",{attrs:{layout:t.tablecols,data:t.list,custom:!0,height:310},scopedSlots:t._u([{key:"customcol",fn:function(e){return["province"===e.column.columnname?n("div",[t._v(" "+t._s(e.column.data.province)+"-"+t._s(e.column.data.city)+"-"+t._s(e.column.data.county)+" ")]):n("p",[t._v(t._s(e.column.data[e.column.columnname]?e.column.data[e.column.columnname]:"--"))])]}}])}),n("div",{staticStyle:{"margin-top":"16px","text-align":"right"}},[n("el-pagination",{attrs:{background:"",small:"","current-page":t.currentPage,"page-size":t.params.content.pageSize,layout:"total, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)],1)},L=[],R={components:{excel:y.Z},data:function(){return{params:{classname:"webmanage.saletool.courseware.statistics.agent",method:"getUnDownloadList",content:{sat_coursewareid:this.$route.query.id,pageNumber:1,pageSize:10,isAll:!1}},tablecols:[],list:[],total:0,currentPage:0}},methods:{getUnDownloadList:function(){var t=this;return(0,s.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested(t.params);case 2:n=e.sent,t.list=n.data,t.total=n.total,t.currentPage=n.pageNumber;case 6:case"end":return e.stop()}}),e)})))()},handleSizeChange:function(t){this.params.content.pageSize=t,this.getUnDownloadList()},handleCurrentChange:function(t){this.params.content.pageNumber=t,this.getUnDownloadList()}},mounted:function(){this.getUnDownloadList()},created:function(){this.tablecols=this.tool.tabelCol(this.$route.name)["tableUndownload"].tablecols}},N=R,z=(0,f.Z)(N,I,L,!1,null,"5dd88035",null),j=z.exports,$=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container normal-panel normal-margin"},[n("div",{staticClass:"flex-align-center flex-between normal-margin"},[n("p",{staticClass:"title"},[t._v("已下载经销商")]),n("excel",{attrs:{tablecols:t.tablecols,param:t.params,excelTitle:"已下载经销商"}})],1),n("tableLayout",{attrs:{layout:t.tablecols,data:t.list,custom:!0,height:310},scopedSlots:t._u([{key:"customcol",fn:function(e){return["province"===e.column.columnname?n("div",[t._v(" "+t._s(e.column.data.province)+"-"+t._s(e.column.data.city)+"-"+t._s(e.column.data.county)+" ")]):n("p",[t._v(t._s(e.column.data[e.column.columnname]?e.column.data[e.column.columnname]:"--"))])]}}])}),n("div",{staticStyle:{"margin-top":"16px","text-align":"right"}},[n("el-pagination",{attrs:{background:"",small:"","current-page":t.currentPage,"page-size":t.params.content.pageSize,layout:"total, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)],1)},V=[],q={components:{excel:y.Z},data:function(){return{params:{classname:"webmanage.saletool.courseware.statistics.agent",method:"getDownloadList",content:{sat_coursewareid:this.$route.query.id,pageNumber:1,pageSize:10,isAll:!1}},tablecols:[],list:[],total:0,currentPage:0}},methods:{getDownloadList:function(){var t=this;return(0,s.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested(t.params);case 2:n=e.sent,t.list=n.data,t.total=n.total,t.currentPage=n.pageNumber;case 6:case"end":return e.stop()}}),e)})))()},handleSizeChange:function(t){this.params.content.pageSize=t,this.getDownloadList()},handleCurrentChange:function(t){this.params.content.pageNumber=t,this.getDownloadList()}},mounted:function(){this.getDownloadList()},created:function(){this.tablecols=this.tool.tabelCol(this.$route.name)["tableDownload"].tablecols}},H=q,U=(0,f.Z)(H,$,V,!1,null,"4e239262",null),G=U.exports,W={components:{pieStudy:g,tableUnstudy:_,tableStudy:D,pieDownload:P,tableUndownload:j,tableDownload:G},data:function(){return{pieStudyData:[],pieDownloadData:[]}},methods:{getAgentData:function(){var t=this;return(0,s.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested({classname:"webmanage.saletool.courseware.statistics.agent",method:"getAgentStudyData",content:{sat_coursewareid:t.$route.query.id}});case 2:n=e.sent,t.pieStudyData=[{type:"已学习",num:n.data.studyNum},{type:"未学习",num:n.data.unStudyNum}],t.pieDownloadData=[{type:"已下载",num:n.data.downloadNum},{type:"未下载",num:n.data.unDownloadNum}],t.$refs.studyPie.piePlot.changeData(t.pieStudyData),t.$refs.downloadPie.piePlot.changeData(t.pieDownloadData);case 7:case"end":return e.stop()}}),e)})))()}},created:function(){this.getAgentData(),!this.tool.checkAuth(this.$route.name,"data_analysis")&&this.$router.go(-1)}},Z=W,X=(0,f.Z)(Z,a,o,!1,null,null,null),Y=X.exports,K=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("pieStudy",{ref:"studyPie",attrs:{pieStudyData:t.pieStudyData}}),n("tableUnstudy"),n("tableStudy"),n("pieDownload",{ref:"downloadPie"}),n("tableUndownload"),n("tableDownload")],1)},Q=[],J=function(){var t=this,e=t.$createElement;t._self._c;return t._m(0)},tt=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container normal-panel"},[n("p",{staticClass:"normal-margin normal-title"},[t._v("学习数据")]),n("div",{staticStyle:{width:"800px",margin:"0 auto"},attrs:{id:"containerStudy"}})])}],et={props:["pieStudyData"],data:function(){return{piePlot:function(){}}},methods:{renderBar:function(){this.piePlot=new c.Pie("containerStudy",{appendPadding:10,data:[],angleField:"num",colorField:"type",color:["#FBB33B","#F77655"],legend:{position:"leftTop"},radius:.9,label:{type:"spider",labelHeight:28,content:"{name}\n{percentage}",style:{fontSize:14,textAlign:"center"}},interactions:[{type:"element-active"}]}),this.piePlot.render()}},mounted:function(){this.renderBar()}},nt=et,rt=(0,f.Z)(nt,J,tt,!1,null,null,null),it=rt.exports,at=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container normal-panel"},[n("div",{staticClass:"flex-align-center flex-between normal-margin"},[n("p",{staticClass:"title"},[t._v("未浏览业务员")]),n("excel",{attrs:{tablecols:t.tablecols,param:t.params,excelTitle:"未学习业务员"}})],1),n("tableLayout",{attrs:{layout:t.tablecols,data:t.list,custom:!0,height:310},scopedSlots:t._u([{key:"customcol",fn:function(e){return["province"===e.column.columnname?n("div",[t._v(" "+t._s(e.column.data.province)+"-"+t._s(e.column.data.city)+"-"+t._s(e.column.data.county)+" ")]):n("p",[t._v(t._s(e.column.data[e.column.columnname]?e.column.data[e.column.columnname]:"--"))])]}}])}),n("div",{staticStyle:{"margin-top":"16px","text-align":"right"}},[n("el-pagination",{attrs:{background:"",small:"","current-page":t.currentPage,"page-size":t.params.content.pageSize,layout:"total, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)],1)},ot=[],st={components:{excel:y.Z},data:function(){return{params:{classname:"webmanage.saletool.courseware.statistics.team",method:"getUnStudyList",content:{sat_coursewareid:this.$route.query.id,pageNumber:1,pageSize:10,isAll:!1}},tablecols:[],list:[],tableData:[],total:0,currentPage:0}},methods:{getUnStudyList:function(){var t=this;return(0,s.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested(t.params);case 2:n=e.sent,t.list=n.data,t.total=n.total,t.currentPage=n.pageNumber;case 6:case"end":return e.stop()}}),e)})))()},handleSizeChange:function(t){this.params.content.pageSize=t,this.getUnStudyList()},handleCurrentChange:function(t){this.params.content.pageNumber=t,this.getUnStudyList()}},mounted:function(){this.getUnStudyList()},created:function(){this.tablecols=this.tool.tabelCol(this.$route.name)["groupUNTableStudy"].tablecols}},lt=st,ut=(0,f.Z)(lt,at,ot,!1,null,"d36b959a",null),ct=ut.exports,dt=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container normal-panel normal-margin"},[n("div",{staticClass:"flex-align-center flex-between normal-margin"},[n("p",{staticClass:"title"},[t._v("已浏览业务员")]),n("excel",{attrs:{tablecols:t.tablecols,param:t.params,excelTitle:"已学习业务员"}})],1),n("tableLayout",{attrs:{layout:t.tablecols,data:t.list,custom:!0,height:310},scopedSlots:t._u([{key:"customcol",fn:function(e){return["province"===e.column.columnname?n("div",[t._v(" "+t._s(e.column.data.province)+"-"+t._s(e.column.data.city)+"-"+t._s(e.column.data.county)+" ")]):"isdownloadfile"===e.column.columnname?n("div",[t._v(" "+t._s(1===e.column.data.isdownloadfile?"是":"否")+" ")]):n("p",[t._v(t._s(e.column.data[e.column.columnname]?e.column.data[e.column.columnname]:"--"))])]}}])}),n("div",{staticStyle:{"margin-top":"16px","text-align":"right"}},[n("el-pagination",{attrs:{background:"",small:"","current-page":t.currentPage,"page-size":t.params.content.pageSize,layout:"total, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)],1)},ht=[],ft={components:{excel:y.Z},data:function(){return{params:{classname:"webmanage.saletool.courseware.statistics.team",method:"getstudyList",content:{sat_coursewareid:this.$route.query.id,pageNumber:1,pageSize:10,isAll:!1}},tablecols:[],list:[],total:0,currentPage:0}},methods:{getStudyList:function(){var t=this;return(0,s.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested(t.params);case 2:n=e.sent,t.list=n.data,t.total=n.total,t.currentPage=n.pageNumber;case 6:case"end":return e.stop()}}),e)})))()},handleSizeChange:function(t){this.params.content.pageSize=t,this.getStudyList()},handleCurrentChange:function(t){this.params.content.pageNumber=t,this.getStudyList()}},mounted:function(){this.getStudyList()},created:function(){this.tablecols=this.tool.tabelCol(this.$route.name)["groupTableStudy"].tablecols}},pt=ft,gt=(0,f.Z)(pt,dt,ht,!1,null,"226fb9c2",null),mt=gt.exports,vt=function(){var t=this,e=t.$createElement;t._self._c;return t._m(0)},yt=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container normal-panel"},[n("p",{staticClass:"normal-margin normal-title"},[t._v("下载数据")]),n("div",{staticStyle:{width:"800px",margin:"0 auto"},attrs:{id:"containerDownload"}})])}],bt={props:["pieDownloadData"],data:function(){return{piePlot:function(){}}},methods:{renderBar:function(){this.piePlot=new c.Pie("containerDownload",{appendPadding:10,data:[],angleField:"num",colorField:"type",color:["#38C2F6","#5D76E4"],legend:{position:"leftTop"},radius:.9,label:{type:"spider",labelHeight:28,content:"{name}\n{percentage}",style:{fontSize:14,textAlign:"center"}},interactions:[{type:"element-active"}]}),this.piePlot.render()}},mounted:function(){this.renderBar()}},xt=bt,wt=(0,f.Z)(xt,vt,yt,!1,null,null,null),_t=wt.exports,Ct=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container normal-panel"},[n("div",{staticClass:"flex-align-center flex-between normal-margin"},[n("p",{staticClass:"title"},[t._v("未下载业务员")]),n("excel",{attrs:{tablecols:t.tablecols,param:t.params,excelTitle:"未下载业务员"}})],1),n("tableLayout",{attrs:{layout:t.tablecols,data:t.list,custom:!0,height:310},scopedSlots:t._u([{key:"customcol",fn:function(e){return["province"===e.column.columnname?n("div",[t._v(" "+t._s(e.column.data.province)+"-"+t._s(e.column.data.city)+"-"+t._s(e.column.data.county)+" ")]):n("p",[t._v(t._s(e.column.data[e.column.columnname]?e.column.data[e.column.columnname]:"--"))])]}}])}),n("div",{staticStyle:{"margin-top":"16px","text-align":"right"}},[n("el-pagination",{attrs:{background:"",small:"","current-page":t.currentPage,"page-size":t.params.content.pageSize,layout:"total, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)],1)},St=[],At={components:{excel:y.Z},data:function(){return{params:{classname:"webmanage.saletool.courseware.statistics.team",method:"getUnDownloadList",content:{sat_coursewareid:this.$route.query.id,pageNumber:1,pageSize:10,isAll:!1}},tablecols:[],list:[],total:0,currentPage:0}},methods:{getUnDownloadList:function(){var t=this;return(0,s.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested(t.params);case 2:n=e.sent,t.list=n.data,t.total=n.total,t.currentPage=n.pageNumber;case 6:case"end":return e.stop()}}),e)})))()},handleSizeChange:function(t){this.params.content.pageSize=t,this.getUnDownloadList()},handleCurrentChange:function(t){this.params.content.pageNumber=t,this.getUnDownloadList()}},mounted:function(){this.getUnDownloadList()},created:function(){this.tablecols=this.tool.tabelCol(this.$route.name)["groupTableUndownload"].tablecols}},kt=At,Et=(0,f.Z)(kt,Ct,St,!1,null,"2ec3fb64",null),Dt=Et.exports,Ft=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container normal-panel normal-margin"},[n("div",{staticClass:"flex-align-center flex-between normal-margin"},[n("p",{staticClass:"title"},[t._v("已下载业务员")]),n("excel",{attrs:{tablecols:t.tablecols,param:t.params,excelTitle:"已下载业务员"}})],1),n("tableLayout",{attrs:{layout:t.tablecols,data:t.list,custom:!0,height:310},scopedSlots:t._u([{key:"customcol",fn:function(e){return["province"===e.column.columnname?n("div",[t._v(" "+t._s(e.column.data.province)+"-"+t._s(e.column.data.city)+"-"+t._s(e.column.data.county)+" ")]):n("p",[t._v(t._s(e.column.data[e.column.columnname]?e.column.data[e.column.columnname]:"--"))])]}}])}),n("div",{staticStyle:{"margin-top":"16px","text-align":"right"}},[n("el-pagination",{attrs:{background:"",small:"","current-page":t.currentPage,"page-size":t.params.content.pageSize,layout:"total, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)],1)},Mt=[],Ot={components:{excel:y.Z},data:function(){return{params:{classname:"webmanage.saletool.courseware.statistics.team",method:"getDownloadList",content:{sat_coursewareid:this.$route.query.id,pageNumber:1,pageSize:10,isAll:!1}},tablecols:[],list:[],total:0,currentPage:0}},methods:{getDownloadList:function(){var t=this;return(0,s.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested(t.params);case 2:n=e.sent,t.list=n.data,t.total=n.total,t.currentPage=n.pageNumber;case 6:case"end":return e.stop()}}),e)})))()},handleSizeChange:function(t){this.params.content.pageSize=t,this.getDownloadList()},handleCurrentChange:function(t){this.params.content.pageNumber=t,this.getDownloadList()}},mounted:function(){this.getDownloadList()},created:function(){this.tablecols=this.tool.tabelCol(this.$route.name)["tableDownload"].tablecols}},Bt=Ot,Tt=(0,f.Z)(Bt,Ft,Mt,!1,null,"313f7706",null),Pt=Tt.exports,It={components:{pieStudy:it,tableUnstudy:ct,tableStudy:mt,pieDownload:_t,tableUndownload:Dt,tableDownload:Pt},data:function(){return{pieStudyData:[],pieDownloadData:[]}},methods:{getAgentData:function(){var t=this;return(0,s.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested({classname:"webmanage.saletool.courseware.statistics.team",method:"getTeamStudyData",content:{sat_coursewareid:t.$route.query.id}});case 2:n=e.sent,t.pieStudyData=[{type:"已学习",num:n.data.studyNum},{type:"未学习",num:n.data.unStudyNum}],t.pieDownloadData=[{type:"已下载",num:n.data.downloadNum},{type:"未下载",num:n.data.unDownloadNum}],t.$refs.studyPie.piePlot.changeData(t.pieStudyData),t.$refs.downloadPie.piePlot.changeData(t.pieDownloadData);case 7:case"end":return e.stop()}}),e)})))()}},created:function(){this.getAgentData(),!this.tool.checkAuth(this.$route.name,"data_analysis")&&this.$router.go(-1)}},Lt=It,Rt=(0,f.Z)(Lt,K,Q,!1,null,null,null),Nt=Rt.exports,zt={components:{agent:Y,group:Nt},data:function(){return{activeName:"first"}}},jt=zt,$t=(0,f.Z)(jt,r,i,!1,null,null,null),Vt=$t.exports},63747:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return D}});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("list",{ref:"list",scopedSlots:t._u([{key:"detail",fn:function(e){return[n("el-button",{attrs:{type:"text",size:"small"},on:{click:function(n){return t.$router.push({path:"/archives_scdetails",query:{id:e.data.data.sat_coursewareid}})}}},[t._v("详 情")])]}},t.tool.checkAuth(t.$route.name,"update")?{key:"edit",fn:function(e){return[n("el-button",{staticClass:"inline-16",attrs:{slot:"edit",type:"text",size:"small"},on:{click:function(n){return t.$router.push({path:"/archives_scedit",query:{id:e.data.data.sat_coursewareid}})}},slot:"edit"},[t._v("编 辑")])]}}:null,t.tool.checkAuth(t.$route.name,"update")?{key:"release",fn:function(e){return[n("release",{attrs:{data:e.data.data},on:{onSuccess:t.onSuccess}})]}}:null,t.tool.checkAuth(t.$route.name,"data_analysis")?{key:"data_statistics",fn:function(e){return[n("el-button",{attrs:{type:"text",size:"small"},on:{click:function(n){return t.$router.push({path:"/archives_sc_analysis",query:{id:e.data.data.sat_coursewareid}})}}},[t._v("数据分析")])]}}:null,t.tool.checkAuth(t.$route.name,"delete")?{key:"del",fn:function(e){return[n("on-del",{attrs:{data:e.data.data},on:{onSuccess:t.onSuccess}})]}}:null],null,!0)},[t.tool.checkAuth(t.$route.name,"insert")?n("el-button",{attrs:{slot:"add",icon:"el-icon-plus",type:"primary",size:"small"},on:{click:function(e){return t.$router.push({path:"/archives_scadd"})}},slot:"add"},[t._v("新 增")]):t._e()],1)],1)},i=[],a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"container normal-panel normal-margin"},[t._t("add")],2),n("div",{staticClass:"container normal-panel"},[n("div",{staticClass:"flex-align-center search-panel",staticStyle:{"margin-bottom":"16px"}},[n("div",{staticClass:"flex-align-center"},[n("p",{staticStyle:{flex:"1 0 auto","font-size":"14px"}},[t._v("一级分类: ")]),n("el-select",{staticStyle:{width:"120px","margin-right":"16px"},attrs:{size:"small",clearable:""},on:{change:function(e){return t.listData(t.params.content.pageNumber=1)}},model:{value:t.params.content.where.sat_courseware_classid_1,callback:function(e){t.$set(t.params.content.where,"sat_courseware_classid_1",e)},expression:"params.content.where.sat_courseware_classid_1"}},t._l(t.options1,(function(e){return n("el-option",{key:e.index,attrs:{value:e.sat_courseware_classid,label:e.classname},nativeOn:{click:function(n){return t.handelSelectClick(e)}}})})),1),n("p",{staticStyle:{flex:"1 0 auto","font-size":"14px"}},[t._v("二级分类: ")]),n("el-select",{staticStyle:{width:"120px","margin-right":"16px"},attrs:{size:"small",clearable:""},on:{change:function(e){return t.listData(t.params.content.pageNumber=1)}},model:{value:t.params.content.where.sat_courseware_classid_2,callback:function(e){t.$set(t.params.content.where,"sat_courseware_classid_2",e)},expression:"params.content.where.sat_courseware_classid_2"}},t._l(t.options2,(function(t){return n("el-option",{key:t.index,attrs:{value:t.sat_courseware_classid,label:t.classname}})})),1),n("el-input",{staticClass:"input-with-select",staticStyle:{width:"270px"},attrs:{placeholder:"请输入内容",size:"small",clearable:""},model:{value:t.params.content.where.condition,callback:function(e){t.$set(t.params.content.where,"condition",e)},expression:"params.content.where.condition"}},[n("el-button",{attrs:{slot:"append",icon:"el-icon-search"},on:{click:function(e){return t.listData(t.params.content.pageNumber=1)}},slot:"append"},[t._v("查 询")])],1)],1)]),n("tableLayout",{attrs:{layout:t.tablecols,data:t.list,custom:!0,height:t.tableHieght},scopedSlots:t._u([{key:"customcol",fn:function(e){return["status"===e.column.columnname?n("div",[n("span",{style:"新建"===e.column.data.status?"color:#52C41A":""},[t._v(t._s(e.column.data.status))])]):n("p",[t._v(t._s(e.column.data[e.column.columnname]))])]}},{key:"opreation",fn:function(e){return[t._t("detail",null,{data:e}),t._t("edit",null,{data:e}),t._t("release",null,{data:e}),t._t("data_statistics",null,{data:e}),t._t("del",null,{data:e})]}}],null,!0)}),n("div",{staticStyle:{"margin-top":"16px","text-align":"right"}},[n("el-pagination",{attrs:{background:"",small:"","current-page":t.currentPage,"page-size":t.params.content.pageSize,layout:"total, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)],1)])},o=[],s=n(16198),l=(n(68309),n(35666),{data:function(){return{params:{classname:"webmanage.saletool.courseware.courseware",method:"select",content:{pageNumber:1,pageSize:10,where:{condition:"",sat_courseware_classid_1:"",sat_courseware_classid_2:""}}},options1:[],options2:[],tablecols:[],list:[],total:0,currentPage:0}},methods:{listData:function(){var t=this;return(0,s.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested(t.params);case 2:n=e.sent,t.list=n.data,t.total=n.total,t.currentPage=n.pageNumber;case 6:case"end":return e.stop()}}),e)})))()},handleSizeChange:function(t){this.params.content.pageSize=t,this.listData()},handleCurrentChange:function(t){this.params.content.pageNumber=t,this.listData()},coursewareclass:function(){var t=this;return(0,s.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested({classname:"webmanage.saletool.courseware.coursewareclass",method:"select",content:{parentid:0}});case 2:n=e.sent,t.options1=n.data;case 4:case"end":return e.stop()}}),e)})))()},handelSelectClick:function(t){this.options2=t.children,this.params.content.where.sat_courseware_classid_2=""}},mounted:function(){this.listData(),this.coursewareclass()},created:function(){this.tablecols=this.tool.tabelCol(this.$route.name)["coursewaretTable"].tablecols}}),u=l,c=n(1001),d=(0,c.Z)(u,a,o,!1,null,null,null),h=d.exports,f=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"inline-16"},[n("el-button",{attrs:{type:"text",size:"mini"},on:{click:t.releaseNotice}},[t._v(t._s("新建"===t.data.status?"审 核":"退 回"))])],1)},p=[],g={props:["data"],data:function(){return{}},methods:{releaseNotice:function(){var t=this;return(0,s.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested({classname:"webmanage.saletool.courseware.courseware",method:"audit",content:{sat_coursewareid:t.data.sat_coursewareid,type:"新建"===t.data.status?1:0}});case 2:n=e.sent,t.tool.showMessage(n),1===n.code&&t.$emit("onSuccess");case 5:case"end":return e.stop()}}),e)})))()}}},m=g,v=(0,c.Z)(m,f,p,!1,null,null,null),y=v.exports,b=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticStyle:{display:"inline",margin:"0 16px"}},[n("el-popconfirm",{attrs:{title:"确定删除当前通告吗?"},on:{confirm:function(e){return t.deleteRow()}}},[n("el-button",{attrs:{slot:"reference",size:"small",type:"text"},slot:"reference"},[t._v("删 除")])],1)],1)},x=[],w={props:["data"],methods:{deleteRow:function(){var t=this;this.$api.requested({classname:"webmanage.saletool.courseware.courseware",method:"delete",content:{sat_coursewareid:this.data.sat_coursewareid}}).then((function(e){t.tool.showMessage(e),1===e.code&&t.$emit("onSuccess")}))}}},_=w,C=(0,c.Z)(_,b,x,!1,null,null,null),S=C.exports,A={components:{list:h,release:y,onDel:S},methods:{onSuccess:function(){this.$refs.list.listData()}},created:function(){}},k=A,E=(0,c.Z)(k,r,i,!1,null,"0a7eb9b0",null),D=E.exports},15586:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return d}});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"container normal-panel normal-margin"},[n("el-button",{staticStyle:{background:"#FA8C16"},attrs:{type:"warning",size:"small",icon:"el-icon-s-claim"},on:{click:t.onSubmit}},[t._v("保 存")])],1),n("div",{staticStyle:{overflow:"hidden"}},[n("el-row",{attrs:{gutter:16}},[n("el-col",{attrs:{span:12}},[n("div",{staticClass:"container normal-panel normal-margin"},[n("p",{staticClass:"normal-title normal-margin",staticStyle:{"line-height":"32px"}},[t._v("课程设置")]),n("el-row",{attrs:{gutter:20}},[n("el-form",{staticClass:"demo-ruleForm",attrs:{model:t.form,size:"small","status-icon":"","label-position":"left","label-width":"100px"}},[n("el-col",{attrs:{span:24}},[n("el-form-item",{attrs:{label:"标题"}},[n("el-input",{attrs:{placeholder:"请输入标题"},model:{value:t.form.title,callback:function(e){t.$set(t.form,"title",e)},expression:"form.title"}})],1)],1),n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:"开始时间"}},[n("el-date-picker",{staticStyle:{width:"100%"},attrs:{"value-format":"yyyy-MM-dd",type:"date",placeholder:"开始日期"},model:{value:t.form.begdate,callback:function(e){t.$set(t.form,"begdate",e)},expression:"form.begdate"}})],1)],1),n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:"下架时间"}},[n("el-date-picker",{staticStyle:{width:"100%"},attrs:{"value-format":"yyyy-MM-dd",type:"date",placeholder:"下架日期"},model:{value:t.form.enddate,callback:function(e){t.$set(t.form,"enddate",e)},expression:"form.enddate"}})],1)],1),n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:"一级分类"}},[n("el-select",{staticStyle:{width:"100%","margin-right":"16px"},attrs:{size:"small",clearable:""},model:{value:t.form.class,callback:function(e){t.$set(t.form,"class",e)},expression:"form.class"}},t._l(t.options1,(function(e){return n("el-option",{key:e.index,attrs:{value:e.sat_courseware_classid,label:e.classname},nativeOn:{click:function(n){return t.handelSelectClick(e)}}})})),1)],1)],1),n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:"二级分类"}},[n("el-select",{staticStyle:{width:"100%","margin-right":"16px"},attrs:{size:"small",clearable:""},model:{value:t.form.sat_courseware_classid,callback:function(e){t.$set(t.form,"sat_courseware_classid",e)},expression:"form.sat_courseware_classid"}},t._l(t.options2,(function(t){return n("el-option",{key:t.index,attrs:{value:t.sat_courseware_classid,label:t.classname}})})),1)],1)],1),n("el-col",{attrs:{span:24}},[n("el-form-item",{attrs:{label:"备注"}},[n("el-input",{attrs:{placeholder:"请输入标备注"},model:{value:t.form.title,callback:function(e){t.$set(t.form,"title",e)},expression:"form.title"}})],1)],1),n("el-col",{attrs:{span:24}},[n("el-form-item",{attrs:{label:"封面"}},[n("upload",{attrs:{btntype:"limage",folderid:t.folderid,accept:".JPG,.PNG",bindData:{ownertable:"SAT_COURSEWARE",ownerid:"",usetype:"cover"}}}),n("p",{staticClass:"info"},[t._v("注:建议上传图片大小212x118像素,大小不超过2M,格式为JPG/PNG")])],1)],1)],1)],1)],1)])],1)],1)])},i=[],a=n(16198),o=(n(35666),n(74916),n(15306),n(35366)),s={components:{upload:o.Z},data:function(){return{options1:[],options2:[],folderid:JSON.parse(sessionStorage.getItem("folderid")).appfolderid,form:{sat_coursewareid:0,title:"测试数据2",sat_courseware_classid:"",notes:"备注1",canfiledownload:1,begdate:"2022-05-16 15:01:42",enddate:"2022-05-16 15:01:42",tag:[]}}},methods:{onSubmit:function(){var t=this;return(0,a.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested({classname:"webmanage.saletool.courseware.courseware",method:"insertOrUpdate",content:t.form});case 2:n=e.sent,1===n.code&&t.$router.replace({path:"/archives_scedit",query:{id:n.data.sat_coursewareid}});case 4:case"end":return e.stop()}}),e)})))()},coursewareclass:function(){var t=this;return(0,a.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested({classname:"webmanage.saletool.courseware.coursewareclass",method:"select",content:{parentid:0}});case 2:n=e.sent,t.options1=n.data;case 4:case"end":return e.stop()}}),e)})))()},handelSelectClick:function(t){this.options2=t.children,this.params.content.where.sat_courseware_classid_2=""}},mounted:function(){this.coursewareclass(),this.onSubmit()}},l=s,u=n(1001),c=(0,u.Z)(l,r,i,!1,null,null,null),d=c.exports},37310:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return p}});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"container normal-panel normal-margin"},[n("el-button",{attrs:{disabled:"",type:"info",size:"small",icon:"el-icon-s-claim"},on:{click:t.onSubmit}},[t._v("保 存")])],1),n("div",{staticStyle:{"overflow-x":"hidden"}},[n("el-row",{attrs:{gutter:16}},[n("el-col",{attrs:{span:12}},[n("div",{staticClass:"container normal-panel normal-margin"},[n("p",{staticClass:"normal-title normal-margin",staticStyle:{"line-height":"32px"}},[t._v("课程设置")]),n("el-row",{attrs:{gutter:20}},[n("el-form",{ref:"form",staticClass:"demo-ruleForm",attrs:{model:t.form,disabled:"",rules:t.rules,size:"small","status-icon":"","label-position":"left","label-width":"100px"}},[n("el-col",{attrs:{span:24}},[n("el-form-item",{attrs:{label:"标题",prop:"title"}},[n("el-input",{attrs:{placeholder:"请输入标题"},model:{value:t.form.title,callback:function(e){t.$set(t.form,"title",e)},expression:"form.title"}})],1)],1),n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:"开始时间",prop:"begdate"}},[n("el-date-picker",{staticStyle:{width:"100%"},attrs:{"value-format":"yyyy-MM-dd",type:"date",placeholder:"开始日期"},model:{value:t.form.begdate,callback:function(e){t.$set(t.form,"begdate",e)},expression:"form.begdate"}})],1)],1),n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:"下架时间",prop:"enddate"}},[n("el-date-picker",{staticStyle:{width:"100%"},attrs:{"value-format":"yyyy-MM-dd",type:"date",placeholder:"下架日期"},model:{value:t.form.enddate,callback:function(e){t.$set(t.form,"enddate",e)},expression:"form.enddate"}})],1)],1),n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:"一级分类",prop:"sat_courseware_classid_1"}},[n("el-select",{staticStyle:{width:"100%","margin-right":"16px"},attrs:{size:"small",clearable:""},model:{value:t.form.sat_courseware_classid_1,callback:function(e){t.$set(t.form,"sat_courseware_classid_1",e)},expression:"form.sat_courseware_classid_1"}},t._l(t.options1,(function(e){return n("el-option",{key:e.index,attrs:{value:e.sat_courseware_classid,label:e.classname},nativeOn:{click:function(n){return t.handelSelectClick(e)}}})})),1)],1)],1),n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:"二级分类",prop:"sat_courseware_classid_2"}},[n("el-select",{staticStyle:{width:"100%","margin-right":"16px"},attrs:{size:"small",clearable:""},model:{value:t.form.sat_courseware_classid_2,callback:function(e){t.$set(t.form,"sat_courseware_classid_2",e)},expression:"form.sat_courseware_classid_2"}},t._l(t.options2,(function(t){return n("el-option",{key:t.index,attrs:{value:t.sat_courseware_classid,label:t.classname}})})),1)],1)],1),n("el-col",{attrs:{span:24}},[n("el-form-item",{attrs:{label:"备注"}},[n("el-input",{attrs:{placeholder:"请输入标备注"},model:{value:t.form.notes,callback:function(e){t.$set(t.form,"notes",e)},expression:"form.notes"}})],1)],1),n("el-col",{attrs:{span:24}},[n("el-form-item",{attrs:{label:"封面",prop:"cover"}},[t.form.cover?n("previewImage",{staticStyle:{width:"386px"},attrs:{image:t.image},on:{onSuccess:t.clearCover}}):n("upload",{attrs:{btntype:"limage",folderid:t.folderid,accept:".JPG,.PNG",bindData:{ownertable:"SAT_COURSEWARE",ownerid:t.form.sat_coursewareid,usetype:"cover"}},on:{onSuccess:t.onCoverSubmit}}),n("p",{staticClass:"info"},[t._v("注:建议上传图片大小212x118像素,大小不超过2M,格式为JPG/PNG")])],1)],1)],1)],1)],1),n("div",{staticClass:"container normal-panel"},[n("attachmentList",{attrs:{attinfos:t.form.attinfos,onlyread:!0},on:{onSuccess:t.selectDetail}})],1)]),n("el-col",{attrs:{span:12}},[n("scopeOfauth",{attrs:{onlyread:!0,defaultData:t.defaultData,appidname:"sat_coursewareid",dataid:t.$route.query.id},on:{onChecked:t.onChecked}})],1)],1)],1)])},i=[],a=n(16198),o=(n(41539),n(54747),n(68309),n(35666),n(35366)),s=n(85913),l=n(65570),u=n(72768),c={components:{upload:o.Z,previewImage:s.Z,attachmentList:l.Z,scopeOfauth:u.Z},data:function(){return{rules:{title:[{required:!0,message:"请输入课程名称",trigger:"blur"}],begdate:[{required:!0,message:"请选择开始日期",trigger:"change"}],enddate:[{required:!0,message:"请选择下架时间",trigger:"change"}],sat_courseware_classid_1:[{required:!0,message:"请选择一级分类",trigger:"change"}],sat_courseware_classid_2:[{required:!0,message:"请选择二级分类",trigger:"change"}],cover:[{required:!0,message:"请上传封面",trigger:"blur"}]},options1:[],options2:[],form:{},image:{},authData:{},defaultData:{},folderid:JSON.parse(sessionStorage.getItem("folderid")).appfolderid}},methods:{onSubmit:function(){var t=this;this.form.sat_courseware_classid=this.form.sat_courseware_classid_2,this.$refs["form"].validate(function(){var e=(0,a.Z)(regeneratorRuntime.mark((function e(n){var r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n){e.next=2;break}return e.abrupt("return",!1);case 2:return e.next=4,t.$api.requested({classname:"webmanage.saletool.courseware.courseware",method:"insertOrUpdate",content:t.form});case 4:r=e.sent,t.tool.showMessage(r),t.selectDetail(),t.insertCoursewareauth();case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())},selectDetail:function(){var t=this;return(0,a.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested({classname:"webmanage.saletool.courseware.courseware",method:"selectDetail",content:{sat_coursewareid:t.$route.query.id}});case 2:n=e.sent,t.form=Object.assign({},t.form,n.data),t.options1.forEach((function(e){e.sat_courseware_classid===n.data.sat_courseware_classid_1&&(t.options2=e.children)})),t.queryFileLink();case 6:case"end":return e.stop()}}),e)})))()},coursewareclass:function(){var t=this;return(0,a.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested({classname:"webmanage.saletool.courseware.coursewareclass",method:"select",content:{parentid:0}});case 2:n=e.sent,t.options1=n.data;case 4:case"end":return e.stop()}}),e)})))()},handelSelectClick:function(t){this.options2=t.children,this.form.sat_courseware_classid_2=""},queryFileLink:function(){var t=this;return(0,a.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.dialogEditVisible=!0,e.next=3,t.$api.requested({classname:"system.attachment.Attachment",method:"queryFileLink",content:{ownertable:"SAT_COURSEWARE",ownerid:t.form.sat_coursewareid,usetype:"cover"}});case 3:n=e.sent,n.data[0]?t.image=n.data[0]:t.image={url:""};case 5:case"end":return e.stop()}}),e)})))()},onCoverSubmit:function(t){this.form.cover=JSON.parse(t.attinfos).data[0].url,this.image=JSON.parse(t.attinfos).data[0]},clearCover:function(){this.form.cover=null,this.image={}},onChecked:function(t){this.authData=t},insertCoursewareauth:function(){var t=this;return(0,a.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested({classname:"webmanage.saletool.courseware.coursewareauth",method:"insert",content:t.authData});case 2:n=e.sent,0===n.code&&t.$notify({title:"失败",message:n.data,type:"error"});case 4:case"end":return e.stop()}}),e)})))()},query_auth:function(){var t=this;return(0,a.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested({classname:"webmanage.saletool.courseware.coursewareauth",method:"selectList",content:{sat_coursewareid:t.$route.query.id}});case 2:n=e.sent,t.defaultData=n.data;case 4:case"end":return e.stop()}}),e)})))()}},created:function(){!this.tool.checkAuth(this.$route.name,"data_analysis")&&this.$router.go(-1),sessionStorage.setItem("pageOnlyRead",!0)},beforeRouteLeave:function(t,e,n){sessionStorage.setItem("pageOnlyRead",!1),n()},mounted:function(){this.coursewareclass(),this.selectDetail(),this.query_auth()}},d=c,h=n(1001),f=(0,h.Z)(d,r,i,!1,null,"1aca84e1",null),p=f.exports},36251:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return p}});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"container normal-panel normal-margin"},[n("el-button",{staticStyle:{background:"#FA8C16"},attrs:{type:"warning",size:"small",icon:"el-icon-s-claim"},on:{click:t.onSubmit}},[t._v("保 存")])],1),n("div",{staticStyle:{"overflow-x":"hidden"}},[n("el-row",{attrs:{gutter:16}},[n("el-col",{attrs:{span:12}},[n("div",{staticClass:"container normal-panel normal-margin"},[n("p",{staticClass:"normal-title normal-margin",staticStyle:{"line-height":"32px"}},[t._v("课程设置")]),n("el-row",{attrs:{gutter:20}},[n("el-form",{ref:"form",staticClass:"demo-ruleForm",attrs:{model:t.form,rules:t.rules,size:"small","status-icon":"","label-position":"left","label-width":"100px"}},[n("el-col",{attrs:{span:24}},[n("el-form-item",{attrs:{label:"标题",prop:"title"}},[n("el-input",{attrs:{placeholder:"请输入标题"},model:{value:t.form.title,callback:function(e){t.$set(t.form,"title",e)},expression:"form.title"}})],1)],1),n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:"开始时间",prop:"begdate"}},[n("el-date-picker",{staticStyle:{width:"100%"},attrs:{"value-format":"yyyy-MM-dd",type:"date",placeholder:"开始日期"},model:{value:t.form.begdate,callback:function(e){t.$set(t.form,"begdate",e)},expression:"form.begdate"}})],1)],1),n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:"下架时间",prop:"enddate"}},[n("el-date-picker",{staticStyle:{width:"100%"},attrs:{"value-format":"yyyy-MM-dd",type:"date",placeholder:"下架日期"},model:{value:t.form.enddate,callback:function(e){t.$set(t.form,"enddate",e)},expression:"form.enddate"}})],1)],1),n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:"一级分类",prop:"sat_courseware_classid_1"}},[n("el-select",{staticStyle:{width:"100%","margin-right":"16px"},attrs:{size:"small",clearable:""},model:{value:t.form.sat_courseware_classid_1,callback:function(e){t.$set(t.form,"sat_courseware_classid_1",e)},expression:"form.sat_courseware_classid_1"}},t._l(t.options1,(function(e){return n("el-option",{key:e.index,attrs:{value:e.sat_courseware_classid,label:e.classname},nativeOn:{click:function(n){return t.handelSelectClick(e)}}})})),1)],1)],1),n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:"二级分类",prop:"sat_courseware_classid_2"}},[n("el-select",{staticStyle:{width:"100%","margin-right":"16px"},attrs:{size:"small",clearable:""},model:{value:t.form.sat_courseware_classid_2,callback:function(e){t.$set(t.form,"sat_courseware_classid_2",e)},expression:"form.sat_courseware_classid_2"}},t._l(t.options2,(function(t){return n("el-option",{key:t.index,attrs:{value:t.sat_courseware_classid,label:t.classname}})})),1)],1)],1),n("el-col",{attrs:{span:24}},[n("el-form-item",{attrs:{label:"备注"}},[n("el-input",{attrs:{placeholder:"请输入标备注"},model:{value:t.form.notes,callback:function(e){t.$set(t.form,"notes",e)},expression:"form.notes"}})],1)],1),n("el-col",{attrs:{span:24}},[n("el-form-item",{attrs:{label:"封面",prop:"cover"}},[t.form.cover?n("previewImage",{staticStyle:{width:"386px"},attrs:{image:t.image,deletebtn:!0},on:{onSuccess:t.clearCover}}):n("upload",{attrs:{btntype:"limage",folderid:t.folderid,accept:".JPG,.PNG",bindData:{ownertable:"SAT_COURSEWARE",ownerid:t.form.sat_coursewareid,usetype:"cover"}},on:{onSuccess:t.onCoverSubmit}}),n("p",{staticClass:"info"},[t._v("注:建议上传图片大小212x118像素,大小不超过2M,格式为JPG/PNG")])],1)],1)],1)],1)],1),n("div",{staticClass:"container normal-panel"},[n("attachmentList",{attrs:{attinfos:t.form.attinfos},on:{onSuccess:t.selectDetail}},[n("upload",{attrs:{slot:"upload",folderid:t.folderid,bindData:{ownertable:"SAT_COURSEWARE",ownerid:t.form.sat_coursewareid,usetype:"default"}},on:{onSuccess:t.onSubmit},slot:"upload"})],1)],1)]),n("el-col",{attrs:{span:12}},[n("scopeOfauth",{attrs:{defaultData:t.defaultData,appidname:"sat_coursewareid",dataid:t.$route.query.id},on:{onChecked:t.onChecked}})],1)],1)],1)])},i=[],a=n(16198),o=(n(41539),n(54747),n(68309),n(35666),n(35366)),s=n(85913),l=n(65570),u=n(72768),c={components:{upload:o.Z,previewImage:s.Z,attachmentList:l.Z,scopeOfauth:u.Z},data:function(){return{rules:{title:[{required:!0,message:"请输入课程名称",trigger:"blur"}],begdate:[{required:!0,message:"请选择开始日期",trigger:"change"}],enddate:[{required:!0,message:"请选择下架时间",trigger:"change"}],sat_courseware_classid_1:[{required:!0,message:"请选择一级分类",trigger:"change"}],sat_courseware_classid_2:[{required:!0,message:"请选择二级分类",trigger:"change"}],cover:[{required:!0,message:"请上传封面",trigger:"blur"}]},options1:[],options2:[],form:{},image:{},authData:{},defaultData:{},folderid:JSON.parse(sessionStorage.getItem("folderid")).appfolderid}},methods:{onSubmit:function(){var t=this;this.form.sat_courseware_classid=this.form.sat_courseware_classid_2,this.$refs["form"].validate(function(){var e=(0,a.Z)(regeneratorRuntime.mark((function e(n){var r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n){e.next=2;break}return e.abrupt("return",!1);case 2:return e.next=4,t.$api.requested({classname:"webmanage.saletool.courseware.courseware",method:"insertOrUpdate",content:t.form});case 4:r=e.sent,t.tool.showMessage(r),t.selectDetail(),t.insertCoursewareauth();case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())},selectDetail:function(){var t=this;return(0,a.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested({classname:"webmanage.saletool.courseware.courseware",method:"selectDetail",content:{sat_coursewareid:t.$route.query.id}});case 2:n=e.sent,t.form=Object.assign({},t.form,n.data),t.options1.forEach((function(e){e.sat_courseware_classid===n.data.sat_courseware_classid_1&&(t.options2=e.children)})),t.queryFileLink();case 6:case"end":return e.stop()}}),e)})))()},coursewareclass:function(){var t=this;return(0,a.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested({classname:"webmanage.saletool.courseware.coursewareclass",method:"select",content:{parentid:0}});case 2:n=e.sent,t.options1=n.data;case 4:case"end":return e.stop()}}),e)})))()},handelSelectClick:function(t){this.options2=t.children,this.form.sat_courseware_classid_2=""},queryFileLink:function(){var t=this;return(0,a.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.dialogEditVisible=!0,e.next=3,t.$api.requested({classname:"system.attachment.Attachment",method:"queryFileLink",content:{ownertable:"SAT_COURSEWARE",ownerid:t.form.sat_coursewareid,usetype:"cover"}});case 3:n=e.sent,n.data[0]?t.image=n.data[0]:t.image={url:""};case 5:case"end":return e.stop()}}),e)})))()},onCoverSubmit:function(t){this.form.cover=JSON.parse(t.attinfos).data[0].url,this.image=JSON.parse(t.attinfos).data[0]},clearCover:function(){this.form.cover=null,this.image={}},onChecked:function(t){this.authData=t},insertCoursewareauth:function(){var t=this;return(0,a.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested({classname:"webmanage.saletool.courseware.coursewareauth",method:"insert",content:t.authData});case 2:n=e.sent,0===n.code&&t.$notify({title:"失败",message:n.data,type:"error"});case 4:case"end":return e.stop()}}),e)})))()},query_auth:function(){var t=this;return(0,a.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested({classname:"webmanage.saletool.courseware.coursewareauth",method:"selectList",content:{sat_coursewareid:t.$route.query.id}});case 2:n=e.sent,t.defaultData=n.data;case 4:case"end":return e.stop()}}),e)})))()}},created:function(){!this.tool.checkAuth(this.$route.name,"data_analysis")&&this.$router.go(-1)},mounted:function(){this.coursewareclass(),this.selectDetail(),this.query_auth()}},d=c,h=n(1001),f=(0,h.Z)(d,r,i,!1,null,"4285d813",null),p=f.exports},39572:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return ot}});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-row",[n("el-col",{attrs:{span:24}},[n("list",{ref:"list",on:{onNameChange:t.onNameChange,folderChecked:t.folderChecked,toFolderDetail:t.toFolderDetail}},[t.showBtnGroup?[n("el-button-group",{attrs:{slot:"btngroup"},slot:"btngroup"},[t.tool.checkAuth(t.$route.name,"download")?n("download",{attrs:{checklist:t.checklist}}):t._e(),t.tool.checkAuth(t.$route.name,"delete")?n("delete-file",{attrs:{checklist:t.checklist},on:{onSuccess:t.onSuccess}}):t._e(),t.tool.checkAuth(t.$route.name,"update")?n("more-operation",{ref:"edit",attrs:{checklist:t.checklist},on:{restName:t.restName,onSuccess:t.onSuccess,changeAuthData:t.changeAuth}}):t._e()],1)]:[t.tool.checkAuth(t.$route.name,"upload")?n("h-upload",{attrs:{slot:"upload",folderid:t.folderid},on:{onSuccess:t.onSuccess},slot:"upload"}):t._e(),t.tool.checkAuth(t.$route.name,"insert")?n("add",{ref:"add",staticStyle:{"margin-left":"10px"},attrs:{slot:"add"},on:{onSuccess:t.onSuccess},slot:"add"}):t._e()]],2),n("edit",{ref:"edits",attrs:{checklist:t.checklist}})],1)],1)},i=[],a=(n(41539),n(54747),n(35366)),o=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("div",{staticClass:"flex-align-center flex-between border-bottom container normal-panel"},[r("div",{staticClass:"flex-align-center"},[t._t("upload"),t._t("add"),t._t("btngroup")],2),r("div",{staticClass:"flex-align-center"},[r("el-input",{staticStyle:{width:"160px","margin-right":"16px"},attrs:{size:"small","prefix-icon":"el-icon-search",placeholder:"搜索全部",clearable:""},on:{clear:function(e){return t.queryAttachment(t.params.content.pageNumber=1)}},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.queryAttachment(t.params.content.pageNumber=1)}},model:{value:t.params.content.where.condition,callback:function(e){t.$set(t.params.content.where,"condition",e)},expression:"params.content.where.condition"}}),r("sort",{attrs:{sort:t.sort},on:{onSort:t.onSort}}),r("i",{staticClass:"el-icon-refresh",staticStyle:{"margin-left":"16px"},on:{click:function(e){return t.queryAttachment(t.params.content.where.condition="")}}})],1)]),r("div",{staticClass:"container normal-panel",staticStyle:{height:"calc(100vh - 255px)","overflow-y":"scroll"}},[r("el-row",{staticClass:"folder-list",attrs:{gutter:10}},t._l(t.list,(function(e){return r("el-col",{directives:[{name:"show",rawName:"v-show",value:"FOLDER"===e.postfix,expression:"folder.postfix === 'FOLDER'"}],key:e.id,attrs:{span:2}},[r("div",{staticClass:"folder-item",class:e.ischeck?"checked":""},[r("el-checkbox",{staticClass:"folder-checkbox",on:{change:function(n){return t.onChange(e)}},model:{value:e.ischeck,callback:function(n){t.$set(e,"ischeck",n)},expression:"folder.ischeck"}}),r("div",{staticClass:"img-panel"},[r("img",{attrs:{src:n(95609),alt:""},on:{click:function(n){return t.folderDetails(e.attachmentid)}}})]),e.newfolder?r("input",{directives:[{name:"model",rawName:"v-model",value:e.document,expression:"folder.document"}],attrs:{type:"text",autofocus:"",size:"mini"},domProps:{value:e.document},on:{blur:function(n){return t.changeFolderName(e)},input:function(n){n.target.composing||t.$set(e,"document",n.target.value)}}}):r("p",{on:{click:function(n){return t.folderDetails(e.attachmentid)}}},[t._v(t._s(e.document))])],1)])})),1),r("el-row",{staticClass:"folder-list",attrs:{gutter:10}},t._l(t.list,(function(e){return r("el-col",{directives:[{name:"show",rawName:"v-show",value:"FOLDER"!==e.postfix,expression:"folder.postfix !== 'FOLDER'"}],key:e.id,attrs:{span:2}},[r("div",{staticClass:"folder-item",class:e.ischeck?"checked":""},[r("el-checkbox",{staticClass:"folder-checkbox",on:{change:function(n){return t.onChange(e)}},model:{value:e.ischeck,callback:function(n){t.$set(e,"ischeck",n)},expression:"folder.ischeck"}}),r("div",{staticClass:"img-panel"},["DOC"===e.postfix||"DOCX"===e.postfix?r("img",{attrs:{src:n(12349),alt:""}}):"PDF"===e.postfix?r("img",{attrs:{src:n(58813),alt:""}}):"MP4"===e.postfix||"AVI"===e.postfix?r("img",{attrs:{src:n(29902),alt:""}}):"XLS"===e.postfix||"XLSX"===e.postfix?r("img",{attrs:{src:n(54005),alt:""}}):"PNG"===e.postfix||"JPG"===e.postfix||"JPEG"===e.postfix?r("img",{attrs:{src:n(45968),alt:""}}):"PPT"===e.postfix||"PPTX"===e.postfix?r("img",{attrs:{src:n(4858),alt:""}}):"FOLDER"===e.postfix?r("img",{attrs:{src:n(95609),alt:""}}):r("img",{attrs:{src:n(63899),alt:""}})]),e.newfolder?r("input",{directives:[{name:"model",rawName:"v-model",value:e.document,expression:"folder.document"}],attrs:{type:"text",autofocus:"",size:"mini"},domProps:{value:e.document},on:{blur:function(n){return t.changeFolderName(e)},input:function(n){n.target.composing||t.$set(e,"document",n.target.value)}}}):r("p",[t._v(t._s(e.document))])],1)])})),1),0===t.list.length?r("div",{staticClass:"flex-align-center",staticStyle:{height:"calc(100vh - 200px)","justify-content":"space-around"}},[r("el-empty",{attrs:{description:"暂无文件,请点击左上角的“上传”按钮添加"}})],1):t._e()],1),r("div",{staticStyle:{margin:"16px 0","text-align":"right"}},[r("el-pagination",{attrs:{background:"",small:"","current-page":t.currentPage,"page-size":t.params.content.pageSize,layout:"total, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)])},s=[],l=n(16198),u=(n(35666),n(2707),n(21249),{data:function(){return{params:{classname:"webmanage.saletool.salematerial.salematerial",method:"selectList",content:{parentid:0,pageNumber:1,pageSize:20,where:{condition:""}}},list:[],sort:[],total:0,currentPage:0}},methods:{onSort:function(t){this.params.content.sort=[t],this.queryAttachment(this.params.content.parentid)},queryAttachment:function(){var t=this;return(0,l.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.params.content.parentid=t.$route.query.id?t.$route.query.id:JSON.parse(sessionStorage.getItem("folderid")).appfolderid,e.next=3,t.$api.requested(t.params);case 3:n=e.sent,n.data.map((function(t){t.postfix=t.postfix.toUpperCase(),t.ischeck=!1})),t.list=n.data,t.total=n.total,t.currentPage=n.pageNumber,t.sort=n.sort;case 9:case"end":return e.stop()}}),e)})))()},handleSizeChange:function(t){this.params.content.pageSize=t,this.queryAttachment(this.params.content.parentid)},handleCurrentChange:function(t){this.params.content.pageNumber=t,this.queryAttachment(this.params.content.parentid)},changeFolderName:function(t){this.$emit("onNameChange",t)},onChange:function(t){var e=[];this.list.forEach((function(t,n){!0===t.ischeck&&e.push(t)})),this.$emit("folderChecked",e)},folderDetails:function(t){this.$router.push({path:"/archvies_mag",query:{id:t}}),this.$emit("toFolderDetail",t),this.queryAttachment(t)},restChecked:function(){this.list.forEach((function(t,e){t.ischeck=!1}))}},mounted:function(){this.queryAttachment()},watch:{$route:function(){this.queryAttachment(),this.$emit("folderChecked",[])}}}),c=u,d=n(1001),h=(0,d.Z)(c,o,s,!1,null,"13aadae4",null),f=h.exports,p=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("el-button",{attrs:{size:"small",icon:"el-icon-plus"},on:{click:function(e){return t.createFolder(t.dialogFolderVisible=!0)}}},[t._v("新建文件夹")]),n("el-dialog",{attrs:{title:"新建文件夹",visible:t.dialogFolderVisible},on:{"update:visible":function(e){t.dialogFolderVisible=e}}},[n("div",{staticClass:"flex-align-center container"},[n("p",{staticStyle:{width:"100px"}},[t._v("文件夹名称")]),n("el-input",{attrs:{size:"small",placeholder:"输入文件夹名称"},model:{value:t.folder.document,callback:function(e){t.$set(t.folder,"document",e)},expression:"folder.document"}})],1),n("scopeOfauth",{attrs:{scrollHeight:"200px",defaultData:t.defaultData,appidname:"attachmentid"},on:{onChecked:t.onChecked}},[n("p",{attrs:{slot:"title"},slot:"title"},[t._v("授权文件夹")])]),n("div",{staticClass:"dialog-footer"},[n("el-button",{staticClass:"normal-btn-width",attrs:{size:"small"},on:{click:function(e){t.dialogFolderVisible=!1}}},[t._v("取 消")]),n("el-button",{staticClass:"normal-btn-width btn-warning",attrs:{size:"small",type:"warning"},on:{click:function(e){return t.createFolderComplete(t.folder)}}},[t._v("确 定")])],1)],1)],1)},g=[],m=n(72768),v={components:{scopeOfauth:m.Z},data:function(){return{dialogFolderVisible:!1,defaultData:{},folder:{document:""},attachmentid:null,params:{classname:"system.attachment.MediaCenter",method:"createFolder",content:{foldername:"文件夹名称",parentid:""}}}},methods:{createFolder:function(){},onChecked:function(t){this.authData=t},createFolderComplete:function(t){var e=this;return(0,l.Z)(regeneratorRuntime.mark((function n(){var r,i;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return r=e.$route.query.id?e.$route.query.id:JSON.parse(sessionStorage.getItem("folderid")).appfolderid,e.params.content.parentid=r,e.params.content.foldername=t.document,n.next=5,e.$api.requested(e.params);case 5:i=n.sent,e.$emit("onSuccess"),e.tool.showMessage(i,(function(){e.dialogFolderVisible=!1})),1===i.code&&e.insertCoursewareauth(i.data.attachmentid);case 9:case"end":return n.stop()}}),n)})))()},insertCoursewareauth:function(t){var e=this;return(0,l.Z)(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return e.authData.attachmentid=t,n.next=3,e.$api.requested({classname:"webmanage.saletool.salematerial.salematerialAuth",method:"insertOrUpdate",content:e.authData});case 3:r=n.sent,0===r.code&&e.$notify({title:"失败",message:r.data,type:"error"});case 5:case"end":return n.stop()}}),n)})))()}}},y=v,b=(0,d.Z)(y,p,g,!1,null,null,null),x=b.exports,w=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("el-dialog",{attrs:{title:"编辑文件夹",visible:t.dialogFolderVisible},on:{"update:visible":function(e){t.dialogFolderVisible=e}}},[n("div",{staticClass:"flex-align-center container"},[n("p",{staticStyle:{width:"100px"}},[t._v("文件夹名称")]),n("el-input",{attrs:{readonly:"",size:"small"},model:{value:t.folder.document,callback:function(e){t.$set(t.folder,"document",e)},expression:"folder.document"}})],1),n("scopeOfauth",{attrs:{scrollHeight:"200px",defaultData:t.defaultData,appidname:"attachmentid",dataid:t.folder.attachmentid},on:{onChecked:t.onChecked}},[n("p",{attrs:{slot:"title"},slot:"title"},[t._v("授权文件夹")])]),n("div",{staticClass:"dialog-footer"},[n("el-button",{staticClass:"normal-btn-width",attrs:{size:"small"},on:{click:function(e){t.dialogFolderVisible=!1}}},[t._v("取 消")]),n("el-button",{staticClass:"normal-btn-width btn-warning",attrs:{size:"small",type:"warning"},on:{click:function(e){return t.insertCoursewareauth(t.folder)}}},[t._v("确 定")])],1)],1)],1)},_=[],C={props:["checklist"],components:{scopeOfauth:m.Z},data:function(){return{dialogFolderVisible:!1,defaultData:{},folder:{document:""},params:{classname:"system.attachment.MediaCenter",method:"createFolder",content:{foldername:"文件夹名称",parentid:""}}}},methods:{onShow:function(){this.folder=Object.assign({},this.folder,this.checklist[0]),this.dialogFolderVisible=!0,this.query_auth()},onChecked:function(t){this.authData=t},insertCoursewareauth:function(){var t=this;return(0,l.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested({classname:"webmanage.saletool.salematerial.salematerialAuth",method:"insertOrUpdate",content:t.authData});case 2:n=e.sent,t.tool.showMessage(n,(function(e){t.dialogFolderVisible=!1}));case 4:case"end":return e.stop()}}),e)})))()},query_auth:function(){var t=this;return(0,l.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested({classname:"webmanage.saletool.salematerial.salematerialAuth",method:"selectAuth",content:{attachmentid:t.checklist[0].attachmentid}});case 2:n=e.sent,t.defaultData=n.data;case 4:case"end":return e.stop()}}),e)})))()}}},S=C,A=(0,d.Z)(S,w,_,!1,null,null,null),k=A.exports,E=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-button",{attrs:{icon:"el-icon-download",size:"small"},on:{click:t.clickDownload}},[t._v("下 载")])},D=[],F={props:["checklist"],data:function(){return{}},methods:{clickDownload:function(){var t=this;this.checklist.forEach((function(e){"FOLDER"===e.postfix?(t.downLoadFolder(e.attachmentid),t.$store.dispatch("createdownlog",{linksid:"",attachmentid:e.attachmentid})):(t.dowFile(e.url),t.$store.dispatch("createdownlog",{linksid:"",attachmentid:e.attachmentid}))}))},downLoadFolder:function(t){var e=this;return(0,l.Z)(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,e.$api.requested({classname:"system.attachment.huawei.OBS",method:"createAndGetPackFileUrl",content:{attachmentid:t}});case 2:r=n.sent,window.open(r.url,"_self");case 4:case"end":return n.stop()}}),n)})))()},dowFile:function(t){window.open(t,"_self")}}},M=F,O=(0,d.Z)(M,E,D,!1,null,null,null),B=O.exports,T=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-button",{attrs:{icon:"el-icon-delete",size:"small"},on:{click:t.clickDelete}},[t._v("删 除")])},P=[],I={props:["checklist"],data:function(){return{filecount:0}},methods:{clickDelete:function(){var t=this;this.filecount=0,this.$confirm("确定删除这".concat(this.checklist.length,"个文件吗?"),"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){t.checklist.forEach((function(e){t.deleteFiles(e.attachmentid)}))})).catch((function(){t.$message({type:"info",message:"已取消删除"})}))},deleteFiles:function(t){var e=this;return(0,l.Z)(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return e.filecount++,r={classname:"system.attachment.MediaCenter",method:"deleteAttachment",content:{attachmentid:t}},n.next=4,e.$api.requested(r);case 4:n.sent,e.checklist.length===e.filecount&&e.$emit("onSuccess");case 6:case"end":return n.stop()}}),n)})))()}},watch:{filecount:function(t){this.checklist.length===t&&this.$message({message:"成功,共删除".concat(this.checklist.length,"个文件"),type:"success"})}}},L=I,R=(0,d.Z)(L,T,P,!1,null,null,null),N=R.exports,z=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-dropdown",{directives:[{name:"show",rawName:"v-show",value:1===t.checklist.length,expression:"checklist.length === 1"}],staticStyle:{"border-left":"1px solid #dcdfe6"}},[n("el-button",{attrs:{size:"small"}},[n("i",{staticClass:"el-icon-more"})]),n("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},["FOLDER"!==t.checklist[0].postfix?n("el-dropdown-item",{nativeOn:{click:function(e){return t.showShareurl.apply(null,arguments)}}},[t._v("分 享")]):t._e(),n("el-dropdown-item",{nativeOn:{click:function(e){return t.restName.apply(null,arguments)}}},[t._v("重命名")]),n("el-dropdown-item",{nativeOn:{click:function(e){return t.changeAuthData.apply(null,arguments)}}},[t._v("修改授权")]),n("el-dropdown-item",{nativeOn:{click:function(e){return t.showFileTree.apply(null,arguments)}}},[t._v("移动到")])],1),n("modifyLocation",{ref:"modefy",attrs:{checklist:t.checklist},on:{onChangeFolderModify:t.onChangeFolderModify}}),n("el-dialog",{attrs:{title:"分享",visible:t.urlDialog,width:"500px"},on:{"update:visible":function(e){t.urlDialog=e}}},[n("div",{staticClass:"border"},[n("el-input",{attrs:{placeholder:"链接地址"},model:{value:t.checklist[0].url,callback:function(e){t.$set(t.checklist[0],"url",e)},expression:"checklist[0].url"}},[n("el-button",{attrs:{slot:"append"},on:{click:t.test},slot:"append"},[t._v("复制")])],1)],1)])],1)},j=[],$=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("el-dialog",{attrs:{title:"移动到",visible:t.dialogTreeVisible,width:"500px"},on:{"update:visible":function(e){t.dialogTreeVisible=e}}},[r("div",{staticClass:"border"},[r("el-tree",{attrs:{data:t.data,props:t.defaultProps,load:t.loadNode,lazy:"","highlight-current":"",accordion:""},on:{"node-click":t.handleNodeClick},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.node,a=e.data;return r("div",{class:a.class},[r("div",{staticClass:"flex-align-center"},[r("img",{staticStyle:{"margin-right":"10px"},attrs:{src:n(95609),width:"15",alt:""}}),r("p",[t._v(t._s(i.label))])])])}}])})],1),t.errormsg?r("el-alert",{staticStyle:{"margin-top":"10px"},attrs:{title:"不能将文件移动到自身或其子文件夹下",type:"error","show-icon":""}}):t._e(),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{attrs:{size:"small"},on:{click:function(e){t.dialogTreeVisible=!1}}},[t._v("取 消")]),r("el-button",{attrs:{type:"primary",disabled:t.errormsg,size:"small"},on:{click:t.changeAttachment}},[t._v("确 定")])],1)],1)},V=[],q={props:["checklist"],data:function(){return{dialogTreeVisible:!1,errormsg:!1,activeid:0,data:[],children:[],defaultProps:{children:"children",label:"document"},params:{classname:"system.attachment.MediaCenter",method:"queryAttachment",content:{where:{condition:"",parentid:0,isonlyfolder:1}}}}},methods:{queryAttachment:function(t){var e=this;return new Promise(function(){var n=(0,l.Z)(regeneratorRuntime.mark((function n(r,i){var a;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return e.params.content.where.parentid=t,n.next=3,e.$api.requested(e.params);case 3:a=n.sent,t===JSON.parse(sessionStorage.getItem("folderid")).appfolderid?(e.data=a.data,e.data.forEach((function(t){t.children=[]}))):(e.children=a.data,a.data.forEach((function(t){t.isLeaf=!0}))),r();case 6:case"end":return n.stop()}}),n)})));return function(t,e){return n.apply(this,arguments)}}())},handleNodeClick:function(t){var e=this;return(0,l.Z)(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return e.checklist[0].attachmentid!==t.attachmentid?(e.activeid=t.attachmentid,e.errormsg=!1):e.errormsg=!0,n.next=3,e.queryAttachment(t.attachmentid);case 3:case"end":return n.stop()}}),n)})))()},loadNode:function(t,e){var n=this;if(0===t.level)return e(this.data);setTimeout((function(){e(n.children)}),1e3)},changeAttachment:function(){var t=this;return(0,l.Z)(regeneratorRuntime.mark((function e(){var n,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=[{attachmentid:t.checklist[0].attachmentid,document:t.checklist[0].document,parentid:t.activeid}],e.next=3,t.$api.requested({classname:"system.attachment.MediaCenter",method:"changeAttachment",content:{files:n}});case 3:r=e.sent,1===r.code&&(t.$emit("onChangeFolderModify"),t.$message({message:"移动成功",type:"success"}));case 5:case"end":return e.stop()}}),e)})))()}},mounted:function(){}},H=q,U=(0,d.Z)(H,$,V,!1,null,"f95b58bc",null),G=U.exports,W={components:{modifyLocation:G},props:["checklist"],data:function(){return{urlDialog:!1}},methods:{showShareurl:function(){this.urlDialog=!0},restName:function(){this.$emit("restName")},changeAuthData:function(){console.log("edit"),this.$emit("changeAuthData")},confirmRestName:function(t){var e=this;return(0,l.Z)(regeneratorRuntime.mark((function n(){var r,i;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return r={classname:"system.attachment.MediaCenter",method:"changeAttachment",content:{files:[{attachmentid:t.attachmentid,document:t.document,parentid:t.parentid}]}},n.next=3,e.$api.requested(r);case 3:i=n.sent,1===i.code?(e.$emit("onSuccess"),e.$message({message:"重命名成功",type:"success"})):e.$message({message:i.data,type:"error"});case 5:case"end":return n.stop()}}),n)})))()},showFileTree:function(){this.$refs.modefy.dialogTreeVisible=!0;var t=JSON.parse(sessionStorage.getItem("folderid")).appfolderid;this.$refs.modefy.queryAttachment(t)},onChangeFolderModify:function(){this.$emit("onSuccess")},test:function(){var t=document.createElement("input");t.value=this.checklist[0].url,document.body.appendChild(t),t.select(),document.execCommand("Copy"),document.body.removeChild(t),this.$message({message:"复制成功,快去分享给好友吧!",type:"success"})}}},Z=W,X=(0,d.Z)(Z,z,j,!1,null,null,null),Y=X.exports,K=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"info-panel"},[t.filelist.length>1?r("div",[r("p",{staticClass:"bold"},[t._v("多选")]),r("p",{staticClass:"explan"},[t._v("已选"+t._s(t.filelist.length)+"个")])]):r("div",[r("p",{staticClass:"bold"},[t._v(t._s(t.file.document))]),r("p",{staticClass:"info-text"},[t._v(t._s(t.file.postfix))]),"DOC"===t.file.postfix||"DOCX"===t.file.postfix?r("img",{attrs:{src:n(12349),alt:""}}):"PDF"===t.file.postfix?r("img",{attrs:{src:n(58813),alt:""}}):"MP4"===t.file.postfix||"AVI"===t.file.postfix?r("img",{attrs:{src:n(29902),alt:""}}):"XLS"===t.file.postfix||"XLSX"===t.file.postfix?r("img",{attrs:{src:n(54005),alt:""}}):"PNG"===t.file.postfix||"JPG"===t.file.postfix||"JPEG"===t.file.postfix?r("img",{attrs:{src:n(45968),alt:""}}):"PPT"===t.file.postfix||"PPTX"===t.file.postfix?r("img",{attrs:{src:n(4858),alt:""}}):"TXT"===t.file.postfix?r("img",{attrs:{src:n(7244),alt:""}}):"FOLDER"===t.file.postfix?r("img",{attrs:{src:n(95609),alt:""}}):r("img",{attrs:{src:n(63899),alt:""}}),t.file.contentlength?r("p",{staticClass:"info-text"},[t._v("大小: "+t._s(t.file.contentlength>1073741824?(t.file.contentlength/Math.pow(1024,3)).toFixed(2)+"GB":t.file.contentlength>1048576?(t.file.contentlength/Math.pow(1024,2)).toFixed(2)+"MB":t.file.contentlength>1024?(t.file.contentlength/Math.pow(1024,1)).toFixed(2)+"KB":t.file.contentlength+"B"))]):r("p",{staticClass:"info-text"},[t._v("大小:0")]),r("p",{staticClass:"info-text"},[t._v("上传人: "+t._s(t.file.createby))]),r("p",{staticClass:"info-text normal-margin"},[t._v("上传时间: "+t._s(t.file.createdate))]),r("tableLayout",{attrs:{layout:t.tablecols,data:t.list,custom:!0},scopedSlots:t._u([{key:"customcol",fn:function(e){return["appdata"===e.column.columnname?r("p",[r("span",[t._v(t._s(e.column.data.data.appdata))])]):t._e(),"appname"===e.column.columnname?r("p",[r("span",[t._v(t._s(e.column.data.data.appname))])]):r("p",[t._v(t._s(e.column.data[e.column.columnname]))])]}}])})],1)])},Q=[],J={props:["filelist"],data:function(){return{file:{},tablecols:[],list:[]}},methods:{setFileInfo:function(t){t.length>0?(this.file=t[0],this.queryAttachment_LinkData(t[0].attachmentid)):(this.file={},this.list=[])},queryAttachment_LinkData:function(t){var e=this;return(0,l.Z)(regeneratorRuntime.mark((function n(){var r,i;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return r={classname:"system.attachment.MediaCenter",method:"queryAttachment_LinkData",content:{attachmentid:t}},n.next=3,e.$api.requested(r);case 3:i=n.sent,e.list=i.data;case 5:case"end":return n.stop()}}),n)})))()}},mounted:function(){}},tt=J,et=(0,d.Z)(tt,K,Q,!1,null,"090d9fb8",null),nt=et.exports,rt={components:{hUpload:a.Z,list:f,add:x,download:B,deleteFile:N,moreOperation:Y,fileInfo:nt,edit:k},data:function(){return{showBtnGroup:!1,folderid:"",checklist:[]}},methods:{onNameChange:function(t){t.attachmentid?this.$refs.edit.confirmRestName(t):this.$refs.add.createFolderComplete(t)},onSuccess:function(){var t=this.$route.query.id?this.$route.query.id:0;this.$refs.list.queryAttachment(t),this.$refs.list.restChecked(),this.folderChecked([])},folderChecked:function(t){this.checklist=t,t.length>0?this.showBtnGroup=!0:this.showBtnGroup=!1},toFolderDetail:function(t){this.folderid=t},restName:function(){var t=this;this.checklist[0].newfolder=!0;var e=this.checklist[0];this.$refs.list.list.forEach((function(n,r){n.attachmentid===t.checklist[0].attachmentid&&t.$set(t.$refs.list.list,r,e)}))},changeAuth:function(){this.$refs["edits"].onShow()}}},it=rt,at=(0,d.Z)(it,r,i,!1,null,null,null),ot=at.exports},62627:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return pt}});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"flex"},[n("dep-list",{ref:"list",staticStyle:{flex:"1 1 auto","min-width":"240px"},on:{onClick:t.onClick},scopedSlots:t._u([{key:"operation",fn:function(e){return[t.tool.checkAuth(t.$route.name,"addDep")?n("addDep",{staticClass:"inline-16",attrs:{data:e.data},on:{onSuccess:t.onSuccess}}):t._e()]}}])}),n("div",{staticStyle:{flex:"0 1 1"}},[n("div",{staticClass:"container normal-panel normal-margin"},[t.tool.checkAuth(t.$route.name,"editDep")?n("editDep",{staticClass:"inline-16",attrs:{data:t.depInfo.data},on:{onSuccess:t.onSuccess}}):t._e(),t.tool.checkAuth(t.$route.name,"delDep")?n("delDep",{staticClass:"inline-16",attrs:{data:t.depInfo.data},on:{onSuccess:t.onSuccess}}):t._e(),t.tool.checkAuth(t.$route.name,"editDep")?n("startDep",{staticClass:"inline-16",attrs:{data:t.depInfo.data},on:{onSuccess:t.onSuccess}}):t._e()],1),n("dep-info-card",{staticClass:"normal-margin",attrs:{depInfo:t.depInfo}}),n("staffList",{ref:"staff",attrs:{depInfo:t.depInfo},scopedSlots:t._u([{key:"detail",fn:function(e){return[n("div",{staticClass:"inline-16"},[n("el-button",{attrs:{type:"text",size:"mini"},on:{click:function(n){return t.$router.push({path:"/depManage/staffDetail",query:{id:e.data.hrid}})}}},[t._v("详 情")])],1)]}},{key:"del",fn:function(e){return[t.tool.checkAuth(t.$route.name,"delStaff")?n("del-staff",{attrs:{slot:"del",data:e.data},on:{onSuccess:t.onStaffSuccess},slot:"del"}):t._e()]}},{key:"edit",fn:function(e){return[t.tool.checkAuth(t.$route.name,"editStaff")?n("edit-staff",{attrs:{slot:"edit",data:e.data},on:{onSuccess:t.onStaffSuccess},slot:"edit"}):t._e()]}}])},[t.tool.checkAuth(t.$route.name,"addStaff")?n("add-staff",{attrs:{slot:"staff",depInfo:t.depInfo},on:{onSuccess:t.onStaffSuccess},slot:"staff"}):t._e()],1)],1)],1)},i=[],a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"tree-panel"},[n("el-tree",{attrs:{data:t.deplist,"node-key":"id","default-expand-all":"","highlight-current":"","expand-on-click-node":!1},on:{"node-click":t.handleClick},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.node,i=e.data;return n("span",{staticClass:"custom-tree-node"},[n("span",[t._v(t._s(r.label))]),n("span",[t._t("operation",null,{data:i})],2)])}}],null,!0)})],1)},o=[],s=n(16198),l=(n(41539),n(54747),n(35666),{components:{},data:function(){return{deplist:[]}},methods:{department:function(){var t=this;return(0,s.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested({classname:"webmanage.department.department",method:"querydepartment",content:{}});case 2:n=e.sent,t.deplist=t.createMenu(n.data),t.$store.dispatch("setDeplistData",t.deplist),t.$emit("onClick",{data:t.deplist[0],parent:[]});case 6:case"end":return e.stop()}}),e)})))()},createMenu:function(t){var e=[];function n(t){var e={label:t["depname"],parentid:t["parentid"],departmentid:t["departmentid"],value:t["departmentid"],remarks:t["remarks"],isused:t["isused"],changedate:t["changedate"],changeby:t["changeby"],createdate:t["createdate"],createby:t["createby"],depno:t["depno"],children:[]};if(t.subdep&&t.subdep.length>0)for(var r=0;r0)for(var r=0;r0)for(var r=0;r0&&this.$refs.multipleTable.clearSelection(),this.field_selection.length>0&&this.$refs.multipleTable2.clearSelection()},query_all_auth:function(){var t=this;this.$api.requested(this.param).then((function(e){t.list=e.data,console.log(t.list),t.total=e.total,t.currentPage=e.pageNumber}))},handleSizeChange:function(t){this.param.content.pageSize=t,this.query_all_auth()},handleCurrentChange:function(t){this.param.content.pageNumber=t,this.query_all_auth()},onRowClick:function(t){this.systemappid=t.systemappid,this.query_function_list(t),this.query_field_list(t)},query_function_list:function(t){var e=this;this.$api.requested({classname:"webmanage.role.role",method:"query_appoptionselect",content:{roleid:this.data.roleid,systemappid:t.systemappid}}).then((function(t){e.fun_list=t.data,console.log(e.fun_list)}))},query_field_list:function(t){var e=this;this.$api.requested({classname:"webmanage.role.role",method:"query_apphiddenfieldselect",content:{roleid:this.data.roleid,systemappid:t.systemappid}}).then((function(t){e.hide_field_list=t.data,console.log(e.hide_field_list)}))},onFuncSelection:function(t){this.func_selection=t},onFieldSelection:function(t){this.field_selection=t},insert_opt_hid_select:function(){var t=this,e=function(t,e){var n=[];return t.filter((function(t){n.push(t[e])})),n};console.log(e(this.func_selection,"optionid")),this.$api.requested({classname:"webmanage.role.role",method:"add_appauth",content:{roleid:this.data.roleid,systemapps:[{systemappid:this.systemappid,optionids:this.func_selection.length>0?e(this.func_selection,"optionid"):[],hiddenfields:this.field_selection.length>0?e(this.field_selection,"hiddenfieldid"):[]}]}}).then((function(e){1===e.code?(t.$notify({title:"成功",message:"first"===t.activeName?"功能授权成功":"设置成功",type:"success"}),t.$emit("onSuccess")):t.$notify({title:"失败",message:e.data,type:"error"})}))}}}),u=l,c=n(1001),d=(0,c.Z)(u,o,s,!1,null,null,null),h=d.exports,f=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("el-popconfirm",{attrs:{title:"确定取消吗?"},on:{confirm:function(e){return t.delete_appauth("func")}}},[n("el-button",{attrs:{slot:"reference",type:"text",size:"small"},slot:"reference"},[t._v("删 除")])],1)],1)},p=[],g={props:["data"],methods:{delete_appauth:function(){var t=this;this.$api.requested({classname:"webmanage.role.role",method:"delete_appauth",content:{roleid:this.data.roleid,systemapps:[{systemappid:this.data.systemappid,optionids:[this.data.optionid],hiddenfields:[]}]}}).then((function(e){1===e.code?(t.$notify({title:"成功",message:"取消成功",type:"success"}),t.$emit("onSuccess")):t.$notify({title:"失败",message:e.data,type:"error"})}))}}},m=g,v=(0,c.Z)(m,f,p,!1,null,null,null),y=v.exports,b=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("el-popconfirm",{attrs:{title:"确定取消吗?"},on:{confirm:function(e){return t.delete_appauth()}}},[n("el-button",{attrs:{slot:"reference",type:"text",size:"small"},slot:"reference"},[t._v("删 除")])],1)],1)},x=[],w={props:["data"],methods:{delete_appauth:function(){var t=this;this.$api.requested({classname:"webmanage.role.role",method:"delete_appauth",content:{roleid:this.data.roleid,systemapps:[{systemappid:this.data.systemappid,optionids:[],hiddenfields:[this.data.hiddenfieldid]}]}}).then((function(e){1===e.code?(t.$notify({title:"成功",message:"取消成功",type:"success"}),t.$emit("onSuccess")):t.$notify({title:"失败",message:e.data,type:"error"})}))}}},_=w,C=(0,c.Z)(_,b,x,!1,null,null,null),S=C.exports,A={props:["data"],components:{auth:h,cancelAuth:y,cancelFields:S},data:function(){return{rules:{rolename:[{required:!0,message:"请输入角色名称",trigger:"blur"}],remarks:[{required:!0,message:"请输入角色描述",trigger:"blur"}],usertype:[{required:!0,message:"请选择角色类型",trigger:"change"}]},form:{roleid:0,rolename:"",remarks:""},roleMainInfo:{},options:[],tablecols:[],appoptions:[],hiddenfields:[],roleid:0,active_systemappid:""}},methods:{roleMain:function(){var t=this;return(0,a.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested({classname:"webmanage.role.role",method:"query_roleMain",content:{roleid:t.roleid}});case 2:n=e.sent,t.form={roleid:n.data.roleid,rolename:n.data.rolename,remarks:n.data.remarks,usertype:n.data.usertype},t.roleMainInfo=n.data,t.appoptionselect(n.data.apps[0]);case 6:case"end":return e.stop()}}),e)})))()},usertype:function(){var t=this;return(0,a.Z)(regeneratorRuntime.mark((function e(){var n,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n={classname:"sysmanage.develop.optiontype.optiontype",method:"optiontypeselect",content:{pageNumber:1,pageSize:20,typename:"usertype",parameter:{}}},e.next=3,t.$api.requested(n);case 3:r=e.sent,t.options=r.data;case 5:case"end":return e.stop()}}),e)})))()},appoptionselect:function(t){var e=this;return(0,a.Z)(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:e.active_systemappid=t.systemappid,e.appoptions=t.options,e.hiddenfields=t.hiddenfields;case 3:case"end":return n.stop()}}),n)})))()},onSubmit:function(){var t=this;this.$refs["form"].validate((function(e){if(!e)return!1;t.$api.requested({classname:"webmanage.role.role",method:"insertormodify_role",content:t.form}).then((function(e){1===e.code?(t.$notify({title:"成功",message:"保存成功",type:"success"}),t.$router.replace({path:"/roleEdit",query:{id:e.data.roleid}})):t.$notify({title:"失败",message:e.data,type:"error"})}))}))}},mounted:function(){this.tablecols=this.tool.tabelCol(this.$route.name).detailsAppsTable.tablecols,this.roleid=this.$route.query.id,"0"!==this.roleid&&this.roleMain(),this.usertype()},created:function(){!this.tool.checkAuth(this.$route.name,"update")&&this.$router.go(-1)}},k=A,E=(0,c.Z)(k,r,i,!1,null,"0eba4d5c",null),D=E.exports},4949:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return m}});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"container normal-panel mb-16"},[t.tool.checkAuth(t.$route.name,"update")?n("el-button",{attrs:{size:"small",icon:"el-icon-edit"},on:{click:function(e){return t.$router.replace({path:"/roleEdit",query:{id:t.roleid}})}}},[t._v("编 辑")]):t._e(),t.tool.checkAuth(t.$route.name,"delete")?n("onDel",{attrs:{data:{roleid:t.roleid}}}):t._e()],1),n("div",{staticClass:"container normal-panel mb-16"},[n("p",{staticClass:"normal-title mb-16"},[t._v("角色信息")]),n("el-row",[n("el-form",{ref:"form",staticClass:"demo-form-inline",attrs:{inline:!0,model:t.form,size:"small","label-position":"left"}},[n("el-col",{attrs:{span:8}},[n("el-form-item",{attrs:{label:"角色名称:"}},[n("p",[t._v(t._s(t.form.rolename))])])],1),n("el-col",{attrs:{span:8}},[n("el-form-item",{attrs:{label:"角色描述:"}},[n("p",[t._v(t._s(t.form.remarks))])])],1),n("el-col",{attrs:{span:8}},[n("el-form-item",{attrs:{label:"角色类型:"}},[n("p",[t._v(t._s(t.form.usertypename))])])],1)],1)],1)],1),n("div",{staticClass:"container normal-panel mb-16"},[n("p",{staticClass:"normal-title mb-16"},[t._v("角色授权")]),n("el-row",{attrs:{gutter:20}},[n("el-col",{attrs:{span:12}},[n("tableLayout",{attrs:{layout:t.tablecols,data:t.roleMainInfo.apps,opwidth:200,custom:!1},on:{rowClick:t.appoptionselect}})],1),n("el-col",{attrs:{span:12}},[n("el-row",{attrs:{gutter:40}},[n("el-col",{attrs:{span:12}},[n("p",{staticClass:"title"},[t._v("功能")]),t._l(t.appoptions,(function(e){return n("div",{key:e.index,staticClass:"flex-align-center flex-between option-item"},[n("p",[t._v(t._s(e.optionname))])])}))],2),n("el-col",{attrs:{span:12}},[n("p",{staticClass:"title"},[t._v("隐藏字段")]),t._l(t.hiddenfields,(function(e){return n("div",{key:e.index,staticClass:"flex-align-center flex-between option-item"},[n("p",[t._v(t._s(e.fieldname))])])}))],2)],1)],1)],1)],1)])},i=[],a=n(16198),o=(n(68309),n(35666),function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticStyle:{display:"inline","margin-left":"10px"}},[n("el-popconfirm",{attrs:{title:"确定删除吗?"},on:{confirm:t.deleteRow}},[n("el-button",{attrs:{slot:"reference",size:"small",icon:"el-icon-delete"},slot:"reference"},[t._v("删 除")])],1)],1)}),s=[],l={props:["data"],methods:{deleteRow:function(){var t=this;this.$api.requested({classname:"webmanage.role.role",method:"delete_role",content:{roleid:this.data.roleid}}).then((function(e){t.$router.go(-1)}))}}},u=l,c=n(1001),d=(0,c.Z)(u,o,s,!1,null,null,null),h=d.exports,f={components:{onDel:h},data:function(){return{form:{roleid:0,rolename:"",remarks:""},roleMainInfo:{},tablecols:[],appoptions:[],hiddenfields:[],roleid:0,active_systemappid:""}},created:function(){},methods:{roleMain:function(){var t=this;return(0,a.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return console.log(11111),e.next=3,t.$api.requested({classname:"webmanage.role.role",method:"query_roleMain",content:{roleid:t.roleid}});case 3:n=e.sent,t.form={roleid:n.data.roleid,rolename:n.data.rolename,remarks:n.data.remarks,usertype:n.data.usertype,usertypename:n.data.usertypename},t.roleMainInfo=n.data,t.appoptionselect(n.data.apps[0]);case 7:case"end":return e.stop()}}),e)})))()},appoptionselect:function(t){var e=this;return(0,a.Z)(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:e.active_systemappid=t.systemappid,e.appoptions=t.options,e.hiddenfields=t.hiddenfields;case 3:case"end":return n.stop()}}),n)})))()}},mounted:function(){this.tablecols=this.tool.tabelCol(this.$route.name).detailsAppsTable.tablecols,this.roleid=this.$route.query.id,"0"!==this.roleid&&this.roleMain()}},p=f,g=(0,c.Z)(p,r,i,!1,null,"996b10ea",null),m=g.exports},69127:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return G}});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"container normal-panel normal-margin flex-align-center flex-between"},[t.tool.checkAuth(t.$route.name,"update")?n("edit",{attrs:{basicInfo:t.siteinfo},on:{onSuccess:t.infoData}}):t._e(),n("i",{staticClass:"el-icon-refresh",on:{click:t.infoData}})],1),n("basicInfo"),n("div",{staticClass:"container normal-panel"},[n("el-descriptions",{attrs:{title:"安全配置"}})],1),n("div",{staticClass:"panel"},[n("div",{staticClass:"flex-align-center flex-between"},[t._m(0),t.tool.checkAuth(t.$route.name,"psdValidate")?n("set-password"):t._e()],1)]),n("div",{staticClass:"panel"},[n("div",{staticClass:"flex-align-center flex-between"},[t._m(1),t.tool.checkAuth(t.$route.name,"setWatermark")?n("set-watermark",{attrs:{basicInfo:t.basicInfo}}):t._e()],1)]),n("div",{staticClass:"panel"},[n("div",{staticClass:"flex-align-center flex-between"},[t._m(2),t.tool.checkAuth(t.$route.name,"loginType")?n("login-select"):t._e()],1)])],1)},i=[function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"flex-align-stretch"},[r("img",{attrs:{width:"72",height:"72",src:n(75090),alt:""}}),r("div",{staticClass:"text-panel"},[r("p",{staticClass:"explain-title"},[t._v("密码安全强制要求")]),r("p",{staticClass:"explain-tips"},[t._v("当前设置:"),r("span",{staticClass:"color-yellow"},[t._v("密码6位数,数字0-9,特殊符号~,!,@,#,$,%,^;")])])])])},function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"flex-align-stretch"},[r("img",{attrs:{width:"72",height:"72",src:n(16058),alt:""}}),r("div",{staticClass:"text-panel"},[r("p",{staticClass:"explain-title"},[t._v("企业水印图片")]),r("p",{staticClass:"explain-tips"},[t._v("当前设置:已上传水印图片")])])])},function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"flex-align-stretch"},[r("img",{attrs:{width:"72",height:"72",src:n(25141),alt:""}}),r("div",{staticClass:"text-panel"},[r("p",{staticClass:"explain-title"},[t._v("登录方式")]),r("p",{staticClass:"explain-tips"},[t._v("当前设置:账号登录,微信登录")])])])}],a=n(16198),o=n(4367),s=(n(35666),n(20629)),l=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container normal-panel normal-margin"},[n("el-descriptions",{attrs:{title:"企业信息"}},[n("el-descriptions-item",{attrs:{label:"企业名称"}},[t._v(t._s(t.siteinfo.enterprisename?t.siteinfo.enterprisename:"--"))]),n("el-descriptions-item",{attrs:{label:"企业简称"}},[t._v(t._s(t.siteinfo.sitename))])],1),n("el-descriptions",{attrs:{direction:"vertical"}},[n("el-descriptions-item",{attrs:{label:"企业操作页LOGO"}},[n("div",{staticClass:"image-panel"},t._l(t.siteinfo.attinfos,(function(t){return n("img",{directives:[{name:"show",rawName:"v-show",value:"actionlogo"===t.usetype,expression:"img.usetype === 'actionlogo'"}],key:t.index,staticStyle:{width:"100%"},attrs:{src:t.url,alt:""}})})),0)])],1)],1)},u=[],c={data:function(){return{}},computed:(0,o.Z)({},(0,s.Se)({siteinfo:"siteinfo"})),methods:{},mounted:function(){}},d=c,h=n(1001),f=(0,h.Z)(d,l,u,!1,null,null,null),p=f.exports,g=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("el-button",{attrs:{icon:"el-icon-edit",size:"small"},on:{click:t.onShow}},[t._v("编 辑")]),n("el-dialog",{attrs:{title:"编辑",top:"30px",visible:t.dialogEditVisible},on:{"update:visible":function(e){t.dialogEditVisible=e}}},[n("el-row",{attrs:{gutter:16}},[n("el-form",{ref:"form",staticClass:"demo-ruleForm",attrs:{model:t.form,rules:t.rules,size:"small",inline:""}},[n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:"企业名称",prop:"enterprisename"}},[n("el-input",{staticClass:"normal_input-width",attrs:{placeholder:"请输入企业名称"},model:{value:t.form.enterprisename,callback:function(e){t.$set(t.form,"enterprisename",e)},expression:"form.enterprisename"}})],1)],1),n("el-col",{attrs:{span:12}},[n("el-form-item",{attrs:{label:"企业简称",prop:"sitename"}},[n("el-input",{staticClass:"normal_input-width",attrs:{placeholder:"请输入企业简称"},model:{value:t.form.sitename,callback:function(e){t.$set(t.form,"sitename",e)},expression:"form.sitename"}})],1)],1)],1)],1),n("el-row",{staticStyle:{margin:"32px 0 0 0"},attrs:{gutter:16}},[n("el-col",{attrs:{span:12}},[n("p",[t._v("企业操作页LOGO:")]),t.show?n("uploadFile",{staticStyle:{"margin-top":"10px"},attrs:{folderid:t.folderid,accept:".JPG,.PNG",btntype:"image",bindData:{ownertable:"sys_site",ownerid:t.siteinfo.siteuid,usetype:"actionlogo"}},on:{onSuccess:t.uploadSuccess}}):n("div",{staticClass:"image-panel"},[n("i",{staticClass:"el-icon-error close-btn",on:{click:t.deleteFileLink}}),t._l(t.siteinfo.attinfos,(function(t){return n("img",{directives:[{name:"show",rawName:"v-show",value:"actionlogo"===t.usetype,expression:"img.usetype === 'actionlogo'"}],key:t.index,staticStyle:{width:"100%"},attrs:{src:t.url,alt:""}})}))],2),n("small",{staticClass:"info",staticStyle:{display:"block","margin-top":"20px"}},[t._v("注:建议上传图片大小1024x1024,大小不超过2M,格式为JPG/PNG")])],1)],1),n("div",{staticClass:"dialog-footer"},[n("el-button",{staticClass:"normal-btn-width",attrs:{size:"small"},on:{click:function(e){t.dialogEditVisible=!1}}},[t._v("取 消")]),n("el-button",{staticClass:"normal-btn-width btn-warning",attrs:{size:"small",type:"warning"},on:{click:t.submit}},[t._v("确 定")])],1)],1)],1)},m=[],v=(n(41539),n(35366)),y={props:["basicInfo"],components:{uploadFile:v.Z},computed:(0,o.Z)((0,o.Z)({},(0,s.Se)({siteinfo:"siteinfo"})),{},{show:function(){return!this.siteinfo.attinfos.some((function(t){return"actionlogo"===t.usetype}))}}),data:function(){return{dialogEditVisible:!1,form:{},rules:{enterprisename:[{required:!0,message:"请输入企业名称",trigger:"blur"}],sitename:[{required:!0,message:"请输入企业简称",trigger:"blur"}]},folderid:JSON.parse(sessionStorage.getItem("folderid")).appfolderid}},methods:{onShow:function(){this.dialogEditVisible=!0,this.form=Object.assign({},this.form,this.siteinfo)},submit:function(){var t=this;this.$refs["form"].validate(function(){var e=(0,a.Z)(regeneratorRuntime.mark((function e(n){var r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n){e.next=2;break}return e.abrupt("return",!1);case 2:return e.next=4,t.$api.requested({classname:"webmanage.site.site",method:"updateSite",content:t.form});case 4:r=e.sent,1===r.code?(t.$notify({title:"成功",message:"修改成功",type:"success"}),t.dialogEditVisible=!1,t.$emit("onSuccess")):t.$notify({title:"失败",message:r.data,type:"error"});case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())},deleteFileLink:function(){var t=this;return(0,a.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested({classname:"system.attachment.Attachment",method:"deleteFileLink",content:{linksids:[t.form.attinfos[0].linksid]}});case 2:n=e.sent,1===n.code&&t.$emit("onSuccess");case 4:case"end":return e.stop()}}),e)})))()},uploadSuccess:function(){this.$emit("onSuccess")}}},b=y,x=(0,h.Z)(b,g,m,!1,null,"73fbd18c",null),w=x.exports,_=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("el-button",{staticStyle:{width:"120px"},attrs:{size:"small",type:"primary"},on:{click:t.querySite_Parameter}},[t._v("设 置")]),n("el-dialog",{attrs:{title:"设 置",visible:t.dialogFormVisible,width:"860px"},on:{"update:visible":function(e){t.dialogFormVisible=e}}},[n("el-form",{staticStyle:{padding:"0 30px"},attrs:{model:t.form,"label-position":"left"}},[n("el-form-item",{attrs:{label:"默认密码"}},[n("div",{staticClass:"flex-align-center"},[n("el-input",{staticStyle:{width:"300px"},attrs:{size:"small",disabled:t.disabled,type:"password",placeholder:"请输入默认密码"},model:{value:t.password_default,callback:function(e){t.password_default=e},expression:"password_default"}}),n("el-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"text",size:"small"},on:{click:t.setPassword}},[t._v("重新设置")])],1)]),n("el-form-item",{attrs:{label:"密码位数"}},[n("div",{staticClass:"flex-align-center"},[n("el-input",{staticStyle:{width:"300px"},attrs:{size:"small",placeholder:"请输入密码位数"},model:{value:t.form.password_length,callback:function(e){t.$set(t.form,"password_length",e)},expression:"form.password_length"}})],1)]),n("el-form-item",{attrs:{label:"包含字符类型"}},[n("div",{staticClass:"flex-align-center"},[n("div",[n("el-checkbox-group",{attrs:{disabled:0===t.radio2},on:{change:t.checkboxChange},model:{value:t.checkList,callback:function(e){t.checkList=e},expression:"checkList"}},[n("el-checkbox",{attrs:{label:"password_needcapital"}},[t._v("大写英文字母")]),n("el-checkbox",{attrs:{label:"password_needlowercase"}},[t._v("小写英文字母")]),n("el-checkbox",{attrs:{label:"password_neednum"}},[t._v("数字0-9")]),n("el-checkbox",{attrs:{label:"password_needspecialchar"}},[t._v("特殊符号~,!,@,#,$,%,^;")])],1)],1)])])],1),n("div",{staticClass:"dialog-footer"},[n("el-button",{staticClass:"normal-btn-width",attrs:{size:"small"},on:{click:function(e){t.dialogFormVisible=!1}}},[t._v("取 消")]),n("el-button",{staticClass:"normal-btn-width btn-warning",attrs:{size:"small",type:"warning"},on:{click:t.updateSite_Parameter}},[t._v("确 定")])],1)],1)],1)},C=[],S=(n(21249),n(47941),n(88495)),A=n.n(S),k={data:function(){return{dialogFormVisible:!1,disabled:!0,radio:1,radio2:1,form:{loginmode_phonenumber:1,loginmode_wechat:0,loginmode_account:1},checkList:[],password_default:""}},mounted:function(){},methods:{querySite_Parameter:function(){var t=this;return(0,a.Z)(regeneratorRuntime.mark((function e(){var n,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.dialogFormVisible=!0,t.disabled=!0,e.next=4,t.$api.requested({classname:"webmanage.site.site",method:"querySite_Parameter",content:{}});case 4:n=e.sent,r={password_needcapital:n.data.password_needcapital,password_needlowercase:n.data.password_needlowercase,password_neednum:n.data.password_neednum,password_needspecialchar:n.data.password_needspecialchar,password_length:n.data.password_length},t.password_default=n.data.password_default,t.form=Object.assign({},t.form,r),Object.keys(n.data).map((function(e,r){1===n.data[e]&&t.checkList.push(e)}));case 9:case"end":return e.stop()}}),e)})))()},checkboxChange:function(){var t=this;Object.keys(this.form).map((function(e,n){if("password_length"!==e)return t.form[e]=t.checkList.some((function(t){return t===e}))?1:0}))},updateSite_Parameter:function(){var t=this;return(0,a.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!(t.form.password_length<=0)){e.next=2;break}return e.abrupt("return",t.$message({message:"密码长度必须大于0",type:"error"}));case 2:return e.next=4,t.$api.requested({classname:"webmanage.site.site",method:"updateSite_Parameter",content:t.form});case 4:n=e.sent,1===n.code?(t.disabled?t.$message({message:"修改成功",type:"success"}):t.setDefaultPassword(),t.disabled&&(t.dialogFormVisible=!1)):t.$message({message:n.data,type:"error"});case 6:case"end":return e.stop()}}),e)})))()},setDefaultPassword:function(){var t=this;return(0,a.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!(t.password_default.length1073741824?(e.row.contentlength/Math.pow(1024,3)).toFixed(2)+"GB":e.row.contentlength>1048576?(e.row.contentlength/Math.pow(1024,2)).toFixed(2)+"MB":e.row.contentlength>1024?(e.row.contentlength/Math.pow(1024,1)).toFixed(2)+"KB":e.row.contentlength+"B")+" ")]}}])}),n("el-table-column",{attrs:{prop:"contentlength",label:"操作",width:"90"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("a",{staticClass:"inline-16",staticStyle:{color:"#3874F6"},attrs:{href:e.row.url}},[t._v("下 载")])]}}])})],1)],1)],1)},g=[],m=(n(68309),n(4906)),v={components:{excel:m.Z},data:function(){return{dialogTableVisible:!1,params:{classname:"webmanage.saletool.submitedit.statistics.agent",method:"getSubmitList",content:{sat_submiteditmodelid:this.$route.query.id,pageNumber:1,pageSize:20}},tablecols:[],attinfos:[],list:[],total:0,currentPage:0}},methods:{getSubmitList:function(){var t=this;return(0,s.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested(t.params);case 2:n=e.sent,t.list=n.data,t.total=n.total,t.currentPage=n.pageNumber;case 6:case"end":return e.stop()}}),e)})))()},handleSizeChange:function(t){this.params.content.pageSize=t,this.getSubmitList()},handleCurrentChange:function(t){this.params.content.pageNumber=t,this.getSubmitList()},showAttinfos:function(t){this.dialogTableVisible=!0,this.attinfos=t.attinfos}},mounted:function(){this.getSubmitList()},created:function(){this.tablecols=this.tool.tabelCol(this.$route.name)["tableSubmit"].tablecols}},y=v,b=(0,d.Z)(y,p,g,!1,null,"0ba17868",null),x=b.exports,w=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container normal-panel normal-margin"},[n("div",{staticClass:"flex-align-center flex-between normal-margin"},[n("p",{staticClass:"title"},[t._v("未提报经销商")]),n("excel",{attrs:{tablecols:t.tablecols,param:t.params,excelTitle:"未提报经销商"}})],1),n("tableLayout",{attrs:{layout:t.tablecols,data:t.list,custom:!0,height:310},scopedSlots:t._u([{key:"customcol",fn:function(e){return["province"===e.column.columnname?n("div",[t._v(" "+t._s(e.column.data.province)+"-"+t._s(e.column.data.city)+"-"+t._s(e.column.data.county)+" ")]):n("p",[t._v(t._s(e.column.data[e.column.columnname]?e.column.data[e.column.columnname]:"--"))])]}}])}),n("div",{staticStyle:{"margin-top":"16px","text-align":"right"}},[n("el-pagination",{attrs:{background:"",small:"","current-page":t.currentPage,"page-size":t.params.content.pageSize,layout:"total, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)],1)},_=[],C={components:{excel:m.Z},data:function(){return{params:{classname:"webmanage.saletool.submitedit.statistics.agent",method:"getUnSubmitList",content:{sat_submiteditmodelid:this.$route.query.id,pageNumber:1,pageSize:20}},tablecols:[],list:[],total:0,currentPage:0}},methods:{getUnSubmitList:function(){var t=this;return(0,s.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested(t.params);case 2:n=e.sent,t.list=n.data,t.total=n.total,t.currentPage=n.pageNumber;case 6:case"end":return e.stop()}}),e)})))()},handleSizeChange:function(t){this.params.content.pageSize=t,this.getUnSubmitList()},handleCurrentChange:function(t){this.params.content.pageNumber=t,this.getUnSubmitList()}},mounted:function(){this.getUnSubmitList()},created:function(){this.tablecols=this.tool.tabelCol(this.$route.name)["tablUnSubmit"].tablecols}},S=C,A=(0,d.Z)(S,w,_,!1,null,"75f3a368",null),k=A.exports,E={components:{pieSubmit:f,tableSubmit:x,tableUnsubmit:k}},D=E,F=(0,d.Z)(D,r,i,!1,null,null,null),M=F.exports},44453:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return D}});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("list",{ref:"list",scopedSlots:t._u([t.tool.checkAuth(t.$route.name,"read")?{key:"detail",fn:function(e){return[n("el-button",{staticClass:"inline-16",attrs:{type:"text",size:"mini"},on:{click:function(n){return t.$router.replace({path:"/submit_detail",query:{id:e.data.data.sat_submiteditmodelid}})}}},[t._v("明 细")])]}}:null,t.tool.checkAuth(t.$route.name,"update")?{key:"edit",fn:function(e){return[n("el-button",{staticClass:"inline-16",attrs:{type:"text",size:"mini"},on:{click:function(n){return t.$router.replace({path:"/submit_edit",query:{id:e.data.data.sat_submiteditmodelid}})}}},[t._v("编 辑")])]}}:null,t.tool.checkAuth(t.$route.name,"update")?{key:"release",fn:function(e){return[n("release",{attrs:{data:e.data.data},on:{onSuccess:t.onSuccess}})]}}:null,t.tool.checkAuth(t.$route.name,"update")?{key:"data_statistics",fn:function(e){return[n("el-button",{staticClass:"inline-16",attrs:{type:"text",size:"mini"},on:{click:function(n){return t.$router.push({path:"/submit_statistics",query:{id:e.data.data.sat_submiteditmodelid}})}}},[t._v("数据分析")])]}}:null,t.tool.checkAuth(t.$route.name,"delete")?{key:"del",fn:function(e){return[n("on-del",{staticClass:"inline-16",attrs:{data:e.data.data},on:{onSuccess:t.onSuccess}})]}}:null],null,!0)},[n("el-button",{attrs:{slot:"add",icon:"el-icon-plus",type:"primary",size:"small"},on:{click:function(e){return t.$router.push({path:"/submit_add"})}},slot:"add"},[t._v("新 增")])],1)],1)},i=[],a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"container normal-panel normal-margin"},[t._t("add")],2),n("div",{staticClass:"container normal-panel"},[n("div",{staticClass:"flex-align-center search-panel",staticStyle:{"margin-bottom":"16px"}},[n("el-input",{staticClass:"input-with-select",staticStyle:{width:"270px"},attrs:{placeholder:"请输入内容",size:"small",clearable:""},model:{value:t.params.content.where.condition,callback:function(e){t.$set(t.params.content.where,"condition",e)},expression:"params.content.where.condition"}},[n("el-button",{attrs:{slot:"append",icon:"el-icon-search"},on:{click:function(e){return t.listData(t.params.content.pageNumber=1)}},slot:"append"},[t._v("查 询")])],1)],1),n("tableLayout",{attrs:{layout:t.tablecols,data:t.list,custom:!0,height:t.tableHieght},scopedSlots:t._u([{key:"customcol",fn:function(e){return["status"===e.column.columnname?n("div",[n("span",{style:"发布"===e.column.data.status?"color:#52C41A":""},[t._v(t._s(e.column.data.status))])]):"onceonly"===e.column.columnname?n("div",[n("span",[t._v(t._s("1"===e.column.data.onceonly?"一事一报":"一事多报"))])]):n("p",[t._v(t._s(e.column.data[e.column.columnname]))])]}},{key:"opreation",fn:function(e){return[t._t("detail",null,{data:e}),t._t("edit",null,{data:e}),t._t("release",null,{data:e}),t._t("data_statistics",null,{data:e}),t._t("del",null,{data:e})]}}],null,!0)}),n("div",{staticStyle:{"margin-top":"16px","text-align":"right"}},[n("el-pagination",{attrs:{background:"",small:"","current-page":t.currentPage,"page-size":t.params.content.pageSize,layout:"total, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)],1)])},o=[],s=n(16198),l=(n(68309),n(35666),{data:function(){return{params:{classname:"webmanage.saletool.submitedit.submitedit",method:"selectsubmitlist",content:{pageNumber:1,pageSize:10,where:{condition:""}}},tablecols:[],list:[],total:0,currentPage:0}},methods:{listData:function(){var t=this;return(0,s.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested(t.params);case 2:n=e.sent,t.list=n.data,t.total=n.total,t.currentPage=n.pageNumber;case 6:case"end":return e.stop()}}),e)})))()},handleSizeChange:function(t){this.params.content.pageSize=t,this.listData()},handleCurrentChange:function(t){this.params.content.pageNumber=t,this.listData()}},mounted:function(){this.listData()},created:function(){this.tablecols=this.tool.tabelCol(this.$route.name)["tableSubmitlist"].tablecols}}),u=l,c=n(1001),d=(0,c.Z)(u,a,o,!1,null,null,null),h=d.exports,f=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("el-popconfirm",{attrs:{title:"确定删除当前提报吗?"},on:{confirm:function(e){return t.deleteRow()}}},[n("el-button",{attrs:{slot:"reference",size:"small",type:"text"},slot:"reference"},[t._v("删 除")])],1)],1)},p=[],g={props:["data"],methods:{deleteRow:function(){var t=this;this.$api.requested({classname:"webmanage.saletool.submitedit.submitedit",method:"delete",content:{sat_submiteditmodelid:this.data.sat_submiteditmodelid}}).then((function(e){t.tool.showMessage(e),1===e.code&&t.$emit("onSuccess")}))}}},m=g,v=(0,c.Z)(m,f,p,!1,null,null,null),y=v.exports,b=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"inline-16"},[n("el-button",{attrs:{type:"text",size:"mini"},on:{click:t.releaseNotice}},[t._v(t._s("新建"===t.data.status?"发 布":"取消发布"))])],1)},x=[],w={props:["data"],data:function(){return{}},methods:{releaseNotice:function(){var t=this;return(0,s.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested({classname:"webmanage.saletool.submitedit.submitedit",method:"releasesubmit",content:{sat_submiteditmodelid:t.data.sat_submiteditmodelid,isrelease:"新建"===t.data.status?1:0}});case 2:n=e.sent,t.tool.showMessage(n),1===n.code&&t.$emit("onSuccess");case 5:case"end":return e.stop()}}),e)})))()}}},_=w,C=(0,c.Z)(_,b,x,!1,null,null,null),S=C.exports,A={components:{list:h,onDel:y,release:S},methods:{onSuccess:function(){this.$refs.list.listData()}}},k=A,E=(0,c.Z)(k,r,i,!1,null,null,null),D=E.exports},25388:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return c}});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container normal-panel"},[n("tableLayout",{attrs:{layout:t.tablecols,data:t.list,custom:!1,height:"calc(100vh - 131px)"},scopedSlots:t._u([{key:"customcol",fn:function(e){return[n("p",[t._v(t._s(e.column.data[e.column.columnname]))])]}},{key:"opreation",fn:function(e){return[n("el-button",{staticClass:"inline-16",attrs:{type:"text",size:"mini"},on:{click:function(n){return t.getFileData(e.data)}}},[t._v("附 件")]),n("el-popconfirm",{attrs:{title:"确定删除当前提报吗?"},on:{confirm:function(n){return t.returnSubmit(e.data)}}},[n("el-button",{attrs:{slot:"reference",size:"small",type:"text"},slot:"reference"},[t._v("退 回")])],1)]}}])}),n("el-dialog",{attrs:{title:"附件列表",visible:t.dialogTableVisible},on:{"update:visible":function(e){t.dialogTableVisible=e}}},[n("el-table",{attrs:{size:"small",data:t.attinfos}},[n("el-table-column",{attrs:{property:"document",label:"文件名称"}}),n("el-table-column",{attrs:{property:"createdate",label:"上传时间"}}),n("el-table-column",{attrs:{prop:"contentlength",label:"文件大小",width:"90"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.contentlength>1073741824?(e.row.contentlength/Math.pow(1024,3)).toFixed(2)+"GB":e.row.contentlength>1048576?(e.row.contentlength/Math.pow(1024,2)).toFixed(2)+"MB":e.row.contentlength>1024?(e.row.contentlength/Math.pow(1024,1)).toFixed(2)+"KB":e.row.contentlength+"B")+" ")]}}])}),n("el-table-column",{attrs:{prop:"contentlength",label:"操作",width:"90"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("a",{staticClass:"inline-16",staticStyle:{color:"#3874F6"},attrs:{href:e.row.url}},[t._v("下 载")])]}}])})],1)],1)],1)},i=[],a=n(16198),o=(n(68309),n(35666),{data:function(){return{dialogTableVisible:!1,list:[],tablecols:[],attinfos:[]}},methods:{selectSubmitDetailList:function(){var t=this;return(0,a.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested({classname:"webmanage.saletool.submitedit.submitedit",method:"selectSubmitDetailList",content:{sat_submiteditmodelid:t.$route.query.id}});case 2:n=e.sent,t.list=n.data;case 4:case"end":return e.stop()}}),e)})))()},getFileData:function(t){this.dialogTableVisible=!0,this.attinfos=t.attinfos},returnSubmit:function(t){var e=this;return(0,a.Z)(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return console.log(t),n.next=3,e.$api.requested({classname:"webmanage.saletool.submitedit.submitedit",method:"returnsubmitdetailed",content:{sat_submiteditmodelid:t.sat_submiteditmodelid,sat_submiteditid:t.sat_submiteditid}});case 3:r=n.sent,e.tool.showMessage(r,e.selectSubmitDetailList);case 5:case"end":return n.stop()}}),n)})))()}},mounted:function(){this.selectSubmitDetailList()},created:function(){this.tablecols=this.tool.tabelCol(this.$route.name)["tablePateContent"].tablecols}}),s=o,l=n(1001),u=(0,l.Z)(s,r,i,!1,null,null,null),c=u.exports},62325:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return c}});var r=function(){var t=this,e=t.$createElement;t._self._c;return t._m(0)},i=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("p",[t._v("创建提报中....")])])}],a=n(16198),o=(n(35666),n(74916),n(15306),{components:{},data:function(){return{defaultData:{},folderid:JSON.parse(sessionStorage.getItem("folderid")).appfolderid,form:{title:"",notes:"",istextrequired:1,isattrequired:1,onceonly:1,sat_submiteditmodelid:"0",begdate:"2022-05-17",enddate:"2022-05-18"}}},methods:{onChecked:function(){},onSubmit:function(){var t=this;return(0,a.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested({classname:"webmanage.saletool.submitedit.submitedit",method:"insertorupdate",content:t.form});case 2:n=e.sent,1===n.code&&t.$router.replace({path:"/submit_edit",query:{id:n.data.sat_submiteditmodelid}});case 4:case"end":return e.stop()}}),e)})))()}},mounted:function(){this.onSubmit()}}),s=o,l=n(1001),u=(0,l.Z)(s,r,i,!1,null,null,null),c=u.exports},38730:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return f}});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"container normal-panel normal-margin"},[n("el-button",{staticStyle:{background:"#FA8C16"},attrs:{type:"warning",size:"small",icon:"el-icon-s-claim"},on:{click:t.onSubmit}},[t._v("保 存")])],1),n("div",{staticStyle:{"overflow-x":"hidden"}},[n("el-row",{attrs:{gutter:16}},[n("el-col",{attrs:{span:13}},[n("div",{staticClass:"container normal-panel normal-margin"},[n("p",{staticClass:"normal-title normal-margin"},[t._v("通告设置")]),n("el-row",{attrs:{gutter:16}},[n("el-form",{ref:"form",attrs:{model:t.form,rules:t.rules,"label-width":"80px","label-position":"left",size:"small"}},[n("el-col",{attrs:{span:24}},[n("el-form-item",{attrs:{label:"标题",prop:"title"}},[n("el-input",{attrs:{placeholder:"标题"},model:{value:t.form.title,callback:function(e){t.$set(t.form,"title",e)},expression:"form.title"}})],1)],1),n("el-col",{attrs:{span:8}},[n("el-form-item",{attrs:{label:"提报类型",prop:"onceonly"}},[n("el-select",{attrs:{placeholder:"选择提报类型"},model:{value:t.form.onceonly,callback:function(e){t.$set(t.form,"onceonly",e)},expression:"form.onceonly"}},[n("el-option",{attrs:{label:"一事一报",value:1}}),n("el-option",{attrs:{label:"一事多报",value:0}})],1)],1)],1),n("el-col",{attrs:{span:8}},[n("el-form-item",{attrs:{label:"生效日期",prop:"begdate"}},[n("el-date-picker",{staticStyle:{width:"100%"},attrs:{"value-format":"yyyy-MM-dd",type:"date",placeholder:"生效日期"},model:{value:t.form.begdate,callback:function(e){t.$set(t.form,"begdate",e)},expression:"form.begdate"}})],1)],1),n("el-col",{attrs:{span:8}},[n("el-form-item",{attrs:{label:"截止日期",prop:"enddate"}},[n("el-date-picker",{staticStyle:{width:"100%"},attrs:{"value-format":"yyyy-MM-dd",type:"date",placeholder:"截止日期"},model:{value:t.form.enddate,callback:function(e){t.$set(t.form,"enddate",e)},expression:"form.enddate"}})],1)],1),n("el-col",{attrs:{span:24}},[n("el-form-item",{attrs:{label:"提报要求",prop:"notes"}},[n("el-input",{attrs:{placeholder:"提报要求"},model:{value:t.form.notes,callback:function(e){t.$set(t.form,"notes",e)},expression:"form.notes"}})],1)],1),n("el-col",{attrs:{span:24}},[n("el-form-item",{attrs:{label:"提报形式",prop:"type"}},[n("el-checkbox-group",{on:{change:t.onCheckboxChange},model:{value:t.form.type,callback:function(e){t.$set(t.form,"type",e)},expression:"form.type"}},[n("el-checkbox",{attrs:{label:"附件提报",name:"isattrequired"}}),n("el-checkbox",{attrs:{label:"文字提报",name:"istextrequired"}})],1)],1)],1)],1)],1)],1),n("div",{staticClass:"container normal-panel normal-margin"},[n("attachmentList",{attrs:{attinfos:t.form.attinfos},on:{onSuccess:t.querySubmitMain}},[n("upload",{attrs:{slot:"upload",folderid:t.folderid,bindData:{ownertable:"sat_submiteditmodel",ownerid:t.form.sat_submiteditmodelid,usetype:"default"}},on:{onSuccess:t.onSubmit},slot:"upload"})],1)],1)]),n("el-col",{attrs:{span:11}},[n("scopeOfauth",{attrs:{defaultData:t.defaultData,appidname:"sat_submiteditmodelid",dataid:t.$route.query.id},on:{onChecked:t.onChecked}})],1)],1)],1)])},i=[],a=n(16198),o=(n(35666),n(65570)),s=n(35366),l=n(72768),u={components:{attachmentList:o.Z,upload:s.Z,scopeOfauth:l.Z},data:function(){return{folderid:JSON.parse(sessionStorage.getItem("folderid")).appfolderid,defaultData:{},rules:{title:[{required:!0,message:"请输入课程名称",trigger:"blur"}],begdate:[{required:!0,message:"请选择生效日期",trigger:"change"}],enddate:[{required:!0,message:"请选择截止日期",trigger:"change"}],onceonly:[{required:!0,message:"请选择版块",trigger:"change"}],notes:[{required:!0,message:"请输入提报要求",trigger:"blur"}],type:[{type:"array",required:!0,message:"请至少选择一个提报形式",trigger:"change"}]},form:{title:"",notes:"",istextrequired:1,isattrequired:1,onceonly:1,sat_submiteditmodelid:"0",begdate:"",enddate:"",type:[]}}},methods:{querySubmitMain:function(){var t=this;return(0,a.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested({classname:"webmanage.saletool.submitedit.submitedit",method:"select_submitdetailed",content:{sat_submiteditmodelid:t.$route.query.id}});case 2:n=e.sent,t.form=Object.assign({},t.form,n.data),1===t.form.isattrequired&&t.form.type.push("附件提报"),1===t.form.istextrequired&&t.form.type.push("文字提报");case 6:case"end":return e.stop()}}),e)})))()},onSubmit:function(){var t=this;this.$refs["form"].validate(function(){var e=(0,a.Z)(regeneratorRuntime.mark((function e(n){var r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n){e.next=2;break}return e.abrupt("return",!1);case 2:return e.next=4,t.$api.requested({classname:"webmanage.saletool.submitedit.submitedit",method:"insertorupdate",content:t.form});case 4:r=e.sent,t.tool.showMessage(r),t.insertCoursewareauth();case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())},onCheckboxChange:function(t){this.form.isattrequired=-1===t.indexOf("附件提报")?0:1,this.form.istextrequired=-1===t.indexOf("文字提报")?0:1},onChecked:function(t){this.authData=t,console.log(this.authData)},insertCoursewareauth:function(){var t=this;return(0,a.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested({classname:"webmanage.saletool.submitedit.submiteditauth",method:"insertOrUpdate",content:t.authData});case 2:n=e.sent,0===n.code?t.$notify({title:"失败",message:n.data,type:"error"}):t.querySubmitMain();case 4:case"end":return e.stop()}}),e)})))()},query_auth:function(){var t=this;return(0,a.Z)(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.requested({classname:"webmanage.saletool.submitedit.submiteditauth",method:"selectAuth",content:{sat_submiteditmodelid:t.$route.query.id}});case 2:n=e.sent,t.defaultData=n.data;case 4:case"end":return e.stop()}}),e)})))()}},mounted:function(){this.querySubmitMain(),this.query_auth()}},c=u,d=n(1001),h=(0,d.Z)(c,r,i,!1,null,null,null),f=h.exports},10181:function(t,e,n){"use strict";n.d(e,{Z:function(){return c}});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-drawer",{attrs:{title:"详情",visible:t.isFileInfoPanlShow,"with-header":!0},on:{"update:visible":function(e){t.isFileInfoPanlShow=e}}},[n("p",{staticClass:"title"},[t._v(t._s(t.currentSelectFile.siteid))]),n("p",{staticClass:"people"},[t._v("浏览数:"+t._s(t.currentSelectFile.readcount))]),n("file-item",{attrs:{itemStyle:t.itemStyle,fileData:[t.currentSelectFile],isDownLoad:!0}})],1)},i=[],a=n(36292),o={name:"Drawer",data:function(){return{isFileInfoPanlShow:!1,itemStyle:{itemWidth:486,img:{width:64,height:64},title:16,descript:14}}},components:{FileItem:a.Z},props:{currentSelectFile:{default:function(){return{}}}},computed:{},watch:{},created:function(){},methods:{downLoad:function(){window.open(this.currentSelectFile.url)},seeClick:function(){}}},s=o,l=n(1001),u=(0,l.Z)(s,r,i,!1,null,"6cef64cc",null),c=u.exports},9857:function(t,e,n){"use strict";n.d(e,{Z:function(){return c}});var r=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"file-list"},[0==t.fileData.length?r("el-empty",{attrs:{description:"暂无文件"}}):t._e(),t._l(t.fileData,(function(e,i){return r("div",{key:i,staticClass:"file-item",on:{mouseenter:function(e){t.isIconShowIndex=i},mouseleave:function(e){t.isIconShowIndex=1e10},click:function(n){return t.fileClick(e)}}},[r("div",{staticClass:"image"},[r("el-image",{staticStyle:{width:"100%",height:"100%"},attrs:{src:e.cover,fit:"fill"}})],1),r("p",[t._v(t._s(e.document))]),r("div",{directives:[{name:"show",rawName:"v-show",value:"folder"!=e.fileType&&1==t.isCollect&&t.isIconShowIndex===i||"/archivesmag_list"==t.$route.path,expression:"item.fileType != 'folder' && isCollect == true && isIconShowIndex === index || $route.path == '/archivesmag_list'"}],staticClass:"icon"},[r("img",{directives:[{name:"show",rawName:"v-show",value:1==e.isCollect||"/archivesmag_list"==t.$route.path,expression:"item.isCollect == 1 || $route.path == '/archivesmag_list'"}],attrs:{src:n(21027),alt:""},on:{click:function(n){return n.stopPropagation(),t.collectClick(e)}}}),r("img",{directives:[{name:"show",rawName:"v-show",value:0==e.isCollect,expression:"item.isCollect == 0"}],attrs:{src:n(96464),alt:""},on:{click:function(n){return n.stopPropagation(),t.collectClick(e)}}})])])})),r("drawer",{directives:[{name:"show",rawName:"v-show",value:t.currentSelectFile,expression:"currentSelectFile"}],ref:"drawer",attrs:{currentSelectFile:t.currentSelectFile},on:{downLoad:function(e){t.dialogVisible=!0}}})],2)},i=[],a=n(10181),o={name:"FileList",data:function(){return{params:{accesstoken:"6de4ba3e3e8967a875ae42ab24c2da48",classname:"system.attachment.MediaCenter",method:"collectAttachment",content:{collecttype:"营销物料",attachmentid:1}},isIconShowIndex:"",currentSelectFile:""}},components:{Drawer:a.Z},props:{fileData:{default:function(){return[]}},isCollect:{type:Boolean}},computed:{},watch:{},created:function(){},methods:{fileClick:function(t){"folder"==t.postfix?this.$emit("upFileData",t.parentid,t.document,t.attachmentid):(this.currentSelectFile=this.fileType.fileList(t),this.$refs.drawer.isFileInfoPanlShow=!0)},collectClick:function(t){var e=this,n=0==t.isCollect?1:0;0==t.isCollect?(this.params.method="collectAttachment",this.params.content.collecttype="营销物料",this.params.content.attachmentid=t.attachmentid):(this.params.method="uncollectAttachment",this.params.content.attachmentid=t.attachmentid),this.$api.requested(this.params).then((function(r){1==r.code?(e.$emit("statusChange",n,t),"collectAttachment"==e.params.method?e.$notify({title:"提示",message:"收藏成功",type:"success"}):e.$notify({title:"提示",message:"取消收藏",type:"success"})):e.$notify({title:"提示",message:"修改失败",type:"error"})}))}}},s=o,l=n(1001),u=(0,l.Z)(s,r,i,!1,null,"0ef98985",null),c=u.exports},53906:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return p}});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"normal-card"},[n("bread-crumbs",{attrs:{tempFileData:t.tempFileData},on:{BreadCrumbsChange:t.BreadCrumbsChange}}),n("div",{staticClass:"header-panl"},[t.tool.checkAuth(t.$route.name,"read")?n("select-panl",{ref:"selectPanl",attrs:{titleLists:t.titleLists},on:{CurrentSelectType:t.CurrentSelectType}}):t._e(),t.tool.checkAuth(t.$route.name,"read")?n("hot-new-control",{on:{sortTypeChange:t.sortTypeChange}}):t._e()],1),t.tool.checkAuth(t.$route.name,"read")?n("file-list",{attrs:{fileData:t.fileData,isCollect:!0},on:{upFileData:t.upFileData,statusChange:t.statusChange}}):t._e()],1)},i=[],a=n(16198),o=(n(35666),n(2707),n(40561),n(69826),n(41539),n(57327),n(9857)),s=n(30203),l=n(29963),u=n(47223),c={name:"index",data:function(){return{params:{accesstoken:"14fed62faa62714a6a1e2ebe2d3997e3",classname:"saletool.salematerial.salematerial",method:"selectList",content:{pageNumber:1,pageSize:9999999999999,parentid:1,where:{condition:""}}},tempFileData:[{filename:"文件",id:null}],titleLists:[{name:"全部",type:"all"},{name:"Word",type:"word"},{name:"Excel",type:"excel"},{name:"PPT",type:"ppt"},{name:"PDF",type:"pdf"},{name:"图片",type:"image"},{name:"视频",type:"video"},{name:"压缩包",type:"zip"},{name:"文本",type:"txt"}],fileData:[],allFileData:[],isType:"all",currentFileIndex:0,isFileInfoPanlShow:!0,total:0,sort:""}},components:{SelectPanl:s.Z,FileList:o.Z,HotNewControl:l.Z,BreadCrumbs:u.Z},computed:{},watch:{},created:function(){this.getFileList(),this.tempFileData[0].id=1},methods:{getFileList:function(){var t=this;this.$api.requested(this.params).then((function(e){t.total=e.total,t.params.content.sort=e.sort,t.allFileData=t.fileType.fileList(e.data),t.fileData=t.filterFileData(t.allFileData,t.isType)}))},upFileData:function(t,e,n){this.params.content.parentid=n,this.currentFileIndex=n,this.tempFileData[this.tempFileData.length-1].id=t,this.getFileList(),this.tempFileData.push({filename:e,id:n})},CurrentSelectType:function(t){this.isType=t,this.fileData=this.filterFileData(this.allFileData,t)},BreadCrumbsChange:function(t){var e=this;return(0,a.Z)(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(!(e.tempFileData.length<=1)){n.next=2;break}return n.abrupt("return");case 2:e.isType="all",e.params.content.parentid=t,e.$refs.selectPanl.currentName="all",e.tempFileData.splice(e.tempFileData.indexOf(e.tempFileData.find((function(e){return e.id==t})))+1),e.getFileList();case 7:case"end":return n.stop()}}),n)})))()},statusChange:function(t,e){this.params.content.parentid=e.parentid,this.getFileList()},sortTypeChange:function(t){for(var e=0;e

    "!=decodeURIComponent(this.currentSelectFile.content)?n("div",{staticClass:"content"},[n("div",{ref:"fwb",staticClass:"fwb"})]):t._e(),n("div",{staticClass:"file2"},t._l(t.currentSelectFile.attinfos,(function(e,r){return n("div",{key:r,staticClass:"file-item"},[n("file-item",{attrs:{itemStyle:t.itemStyle,fileData:[e],isDownLoad:!0},on:{updateDownLoadRecord:t.updateDownLoadRecord}})],1)})),0)]):t._e()},i=[],a=n(36292),o=(n(6430),{name:"Drawer",data:function(){return{isFileInfoPanlShow:!1,itemStyle:{itemWidth:1020,img:{width:64,height:64},title:16,descript:12}}},props:{currentSelectFile:{default:function(){return{}}}},components:{FileItem:a.Z},computed:{},watch:{currentSelectFile:{handler:function(t){}}},updated:function(){this.$refs.fwb&&(this.$refs.fwb.innerHTML=this.currentSelectFile.content)},methods:{updateDownLoadRecord:function(t){var e=this;this.$api.requested({classname:"saletool.sharematerial.sharematerial",method:"updateDownloadLog",content:{sat_sharematerialid:this.currentSelectFile.sat_sharematerialid}}).then((function(t){1!=t.code&&e.$notify({title:"提示",message:"下载更新记录失败",type:"warning"})}))}}}),s=o,l=n(1001),u=(0,l.Z)(s,r,i,!1,null,"130a6662",null),c=u.exports},80181:function(t,e,n){"use strict";n.d(e,{Z:function(){return u}});var r=function(){var t=this,e=t.$createElement,r=t._self._c||e;return 0!=t.fileData.length?r("div",{staticClass:"list-box"},t._l(t.fileData,(function(e,i){return r("div",{key:i,staticClass:"list",on:{click:function(n){return t.itemClick(e)}}},[r("div",{staticClass:"top"},[r("img",{attrs:{src:t.getCover(e),alt:""}})]),r("div",{staticClass:"bottom"},[r("p",{staticClass:"title"},[t._v(t._s(e.title))]),r("div",{staticClass:"icon-box"},[r("div",{staticClass:"item"},[r("img",{attrs:{src:n(77708),alt:""}}),r("span",[t._v(t._s(e.readcount))])]),r("div",{staticClass:"item"},[r("img",{attrs:{src:n(52728),alt:""}}),r("span",[t._v(t._s(e.sharecount))])]),r("div",{staticClass:"item"},[r("img",{attrs:{src:n(36697),alt:""}}),r("span",[t._v(t._s(e.newcount))])])]),t.isHandle?r("div",{staticClass:"handle"},[t._t("edit",null,{data:e}),t._t("delete",null,{data:e})],2):t._e()])])})),0):r("el-empty",{attrs:{description:"暂无数据"}})},i=[],a=(n(69826),n(41539),{name:"list",data:function(){return{dialogVisible:!1,currentItem:[]}},props:["fileData","isHandle"],computed:{},components:{},watch:{},created:function(){},methods:{getCover:function(t){var e=t.attinfos.find((function(t){return"image"==t.fileType}));return e?t.attinfos.find((function(t){return t==e})).cover:t.attinfos[0]&&t.attinfos[0].subfiles[0]?t.attinfos[0].subfiles[0].url:n(39235)},itemClick:function(t){this.$emit("listItemClick",t)}}}),o=a,s=n(1001),l=(0,s.Z)(o,r,i,!1,null,"089a1229",null),u=l.exports},19924:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return v}});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticStyle:{height:"100%"}},[n("div",{staticClass:"normal-card"},[n("div",{staticClass:"header-panl"},[n("div",{staticClass:"left"},[t.tool.checkAuth(t.$route.name,"read")?n("search",{on:{searchActive:t.searchActive,clearData:function(e){return t.clearData()}}}):t._e(),t.tool.checkAuth(t.$route.name,"read")?n("category-select",{attrs:{label:"素材分类",selectList:t.selectList},on:{changeSelect:t.changeSelect,clearSelect:function(e){return t.clearSelect()}}}):t._e()],1),t.tool.checkAuth(t.$route.name,"read")?n("hot-new-control",{on:{sortTypeChange:t.sortTypeChange}}):t._e()],1),t.tool.checkAuth(t.$route.name,"read")?n("list",{attrs:{fileData:t.fileData,isHandle:!1},on:{listItemClick:t.listItemClick,itemEdit:t.itemEdit}}):t._e(),n("pagination",{attrs:{total:t.total,pageSize:t.params.content.pageSize,currentPage:t.params.content.pageNumber},on:{pageChange:t.pageChange}}),t.currentFile?n("detail",{ref:"detail",attrs:{currentSelectFile:t.currentFile}}):t._e()],1)])},i=[],a=(n(69826),n(41539),n(54747),n(2707),n(75505),n(87714),n(82801),n(1174),n(38862),n(29963)),o=n(24970),s=n(80181),l=n(76857),u=n(4748),c=n(20969),d=n(37265),h=n(5283),f={name:"index",data:function(){return{params:{classname:"saletool.sharematerial.sharematerial",method:"selectList",content:{pageNumber:1,pageSize:12,where:{condition:"",sat_sharematerial_classid:null}}},select:{accesstoken:"0b62a25619912a732160863854a9f19d",classname:"saletool.sharematerial.sharematerial",method:"select",content:{parentid:0}},fileData:[],list:[],selectList:[],total:20,currentFile:""}},components:{HotNewControl:a.Z,CategorySelect:o.Z,Pagination:h.Z,list:s.Z,search:l.Z,detail:u.Z,Delete:c.Z,Edit:d.Z},computed:{},created:function(){this.getFileList(),this.getSelectList()},methods:{getFileList:function(){var t=this;this.$api.requested(this.params).then((function(e){t.total=e.total;for(var n=0;n0?n("div",{staticClass:"file-content"},[n("div",{staticClass:"file-download"},[n("p",{staticClass:"title"},[t._v("附件下载")]),t.tool.checkAuth(t.$route.name,"read")?n("div",{staticClass:"file-list"},[n("file-item",{attrs:{isDownLoad:!0,itemStyle:t.itemStyle,sat_noticeid:t.detailData.sat_noticeid,fileData:t.detailData.attinfos},on:{updateDownLoadRecord:t.updateDownLoadRecord}})],1):t._e()])]):t._e(),n("div",{staticClass:"comments"},[n("div",{staticClass:"score-box"},[n("p",[t._v("评分反馈")]),n("div",{staticClass:"handle"},[n("p",[t._v("总体")]),n("el-rate",{attrs:{disabled:0==!t.commentData.leavemessage,colors:t.scoreColor},model:{value:t.send.content.score,callback:function(e){t.$set(t.send.content,"score",e)},expression:"send.content.score"}}),n("p",[t._v("满意")])],1),n("p",[t._v(t._s(t.detailData.readpersoncount)+"人评分")])]),n("div",{staticClass:"text-box"},[n("p",[t._v("留言反馈")]),n("div",{staticClass:"comment-panl"},[n("el-input",{attrs:{type:"textarea",rows:4,placeholder:"请填写留言",resize:"none",disabled:0==!t.commentData.leavemessage},model:{value:t.send.content.leavemessage,callback:function(e){t.$set(t.send.content,"leavemessage",e)},expression:"send.content.leavemessage"}}),t.tool.checkAuth(t.$route.name,"insert")?n("el-button",{attrs:{type:"success",size:"small",disabled:0==!t.commentData.leavemessage},nativeOn:{click:function(e){return t.sendComment()}}},[t._v("发表")]):t._e()],1)])])])},i=[],a=n(36292),o=(n(82761),{name:"NoticeDetail",data:function(){return{param:{accesstoken:"c94ae676c321f1ce91e05797ba2f9bc3",classname:"saletool.notice.notice",method:"queryNoticeMain",content:{sat_noticeid:4}},send:{accesstoken:"2337e72d40da54ce343c631b509ca873",classname:"saletool.notice.notice",method:"updateReadRecord",content:{sat_noticeid:this.$route.query.sat_noticeid,score:0,leavemessage:""}},itemStyle:{itemWidth:360,margin:20,img:{width:29,height:29},title:14,descript:10},score:0,scoreColor:["#99A9BF","#F7BA2A","#FADB14"],textarea:"",detailData:"",commentData:""}},components:{FileItem:a.Z},filters:{},computed:{},watch:{},created:function(){this.getNoticeDetail(),this.getCommentDetail()},mounted:function(){},methods:{compileFWB:function(){document.getElementById("fwb").innerHTML=this.detailData.content},getNoticeDetail:function(){var t=this;this.param.content.sat_noticeid=this.$route.query.sat_noticeid,this.$api.requested(this.param).then((function(e){console.log(e),t.detailData=e.data,console.log(t.detailData),t.detailData.attinfos=t.fileType.fileList(t.detailData.attinfos),t.compileFWB()}))},sendComment:function(){var t=this;1!=!this.send.content.leavemessage&&0!=this.send.content.score?this.$api.requested(this.send).then((function(e){1==e.code&&(t.$notify({title:"提示",message:"发表成功",type:"success"}),t.getCommentDetail())})):this.$notify({title:"提示",message:"请填写评论或评分",type:"warning"})},getCommentDetail:function(){var t=this;this.$api.requested({accesstoken:"148928f55b25f5c4636d5ae7cd339f93",classname:"saletool.notice.notice",method:"queryReadRecord",content:{sat_noticeid:this.$route.query.sat_noticeid}}).then((function(e){t.commentData=e.data[0],t.send.content.score=e.data[0].score,t.send.content.leavemessage=e.data[0].leavemessage}))},updateDownLoadRecord:function(t){var e=this;this.$api.requested({classname:"saletool.notice.notice",method:"updateDownloadRecord",content:{sat_noticeid:this.$route.query.sat_noticeid}}).then((function(t){1!=t.code&&e.$notify({title:"提示",message:"下载更新记录失败",type:"warning"})}))}}}),s=o,l=n(1001),u=(0,l.Z)(s,r,i,!1,null,"e3b20b82",null),c=u.exports},43167:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return A}});var r=function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.detailData?r("div",{staticClass:"index"},[r("div",{staticClass:"normal-card"},[t.tool.checkAuth(t.$route.name,"insert")?r("submit-action",{ref:"submitAction",attrs:{detailData:t.detailData,editData:t.editData,disabled:1!=t.$route.query.history}}):t._e(),r("img",{staticStyle:{cursor:"pointer"},attrs:{src:n(29046),alt:""},on:{click:function(e){return t.$router.go(0)}}})],1),r("div",{staticClass:"normal-card"},[r("p",[t._v(t._s(t.detailData.title))]),r("p",[t._v("时间: "+t._s(t.detailData.createdate))]),r("p",[t._v("提报要求: "+t._s(t.detailData.notes))]),t.detailData.attinfos&&t.detailData.attinfos.length>0?r("p",[t._v("附件下载")]):t._e(),r("file-item",{attrs:{isDownLoad:!0,itemStyle:t.itemStyle,fileData:t.detailData.attinfos}})],1),t.tool.checkAuth(t.$route.name,"read")?r("submit-item-info",{ref:"submitDetail",attrs:{fileData:t.calcList(t.detailData.submitedit)},on:{submitEdit:t.submitEdit}},[t.detailData.submitedit&&"more"==t.$route.query.type?r("pagination",{attrs:{slot:"page",total:t.detailData.submitedit.length,pageSize:t.pageSize,currentPage:t.currentIndex},on:{pageChange:t.pageChange},slot:"page"}):t._e()],1):t._e()],1):t._e()},i=[],a=(n(41539),n(54747),n(57327),n(47042),n(36292)),o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"box"},[t.fileData?n("div",{staticClass:"normal-card"},[n("p",{staticClass:"title"},[t._v("提报记录")]),t.fileData.length>0?n("div",{staticClass:"list"},t._l(t.fileData,(function(e,r){return n("div",{key:r,staticClass:"list-item",on:{click:function(n){return t.itemClick(e)}}},[n("div",{staticClass:"decript"},[t._v(t._s(e.content))]),n("div",{staticClass:"time"},[n("span",[t._v("提交时间:")]),t._v(t._s(e.createdate))]),n("div",{staticClass:"footer"},[n("p",{staticClass:"submit"},[n("span",[t._v("附件数:")]),t._v(t._s(e.attinfos.length))])]),"退回"==e.status&&e.content?n("div",{staticClass:"handle"},[n("span",{staticClass:"back"},[t._v("退回")])]):t._e()])})),0):n("el-empty",{attrs:{description:"暂无数据"}}),n("div",{staticClass:"pagin"},[t._t("page")],2)],1):t._e(),n("el-drawer",{attrs:{title:"详情",visible:t.isFileInfoPanlShow},on:{"update:visible":function(e){t.isFileInfoPanlShow=e}}},[n("div",{staticClass:"content",staticStyle:{"word-break":"break-all"}},[n("p",[t._v("提报内容")]),n("p",[t._v(" "+t._s(t.currentFile.content)+" ")])]),t.currentFile.attinfos&&t.currentFile.attinfos.length>0?n("div",{staticClass:"file-box"},[n("p",[t._v("提报附件")]),n("div",{staticClass:"file1"},[n("file-item",{attrs:{isDownLoad:!0,itemStyle:t.itemDrawerStyle,fileData:t.currentFile.attinfos}})],1)]):t._e(),"退回"==t.currentFile.status?n("el-button",{staticStyle:{margin:"16px 0 0 16px"},attrs:{type:"warning",size:"small"},on:{click:t.submitEdit}},[t._v("重新提交")]):t._e()],1)],1)},s=[],l={name:"SubmiteditItemInfo",data:function(){return{isFileInfoPanlShow:!1,itemDrawerStyle:{img:{width:53,height:64},title:16,descript:12},currentFile:[]}},components:{FileItem:a.Z},props:["fileData"],computed:{},watch:{},created:function(){},methods:{itemClick:function(t){this.isFileInfoPanlShow=!0,this.currentFile=t,this.currentFile.attinfos=this.fileType.fileList(this.currentFile.attinfos)},submitEdit:function(){this.isFileInfoPanlShow=!1,this.$emit("submitEdit",this.currentFile)}}},u=l,c=n(1001),d=(0,c.Z)(u,o,s,!1,null,"b9d885fe",null),h=d.exports,f=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t.disabled?n("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.actionSubmit}},[t._v("提报")]):n("el-button",{attrs:{type:"primary",size:"small",disabled:""}},[t._v("提报")]),n("el-drawer",{attrs:{title:"提报上传",visible:t.isFileInfoPanlShow},on:{"update:visible":function(e){t.isFileInfoPanlShow=e}}},[n("el-button",{staticClass:"btn1",attrs:{type:"warning",size:"small"},on:{click:function(e){return t.save()}}},[t._v("保存")]),n("div",{staticClass:"content",staticStyle:{"word-break":"break-all"}},[n("p",[t._v("提报内容")]),n("el-input",{attrs:{type:"textarea",autosize:{minRows:2,maxRows:4},placeholder:"请输入内容"},model:{value:t.param.content.content,callback:function(e){t.$set(t.param.content,"content",e)},expression:"param.content.content"}})],1),n("div",{staticClass:"bottom"},[n("div",{staticClass:"file-box"},[n("p",[t._v("提报附件")]),n("file-item",{attrs:{isDownLoad:!1,isDelete:!0,itemStyle:t.itemDrawerStyle,fileData:t.upload_panl.attinfos},on:{deleteSuccess:t.deleteSuccess}})],1),n("upload",{attrs:{target:"submit"},on:{onSuccess:t.onSuccess}})],1)],1)],1)},p=[],g=(n(92222),n(40561),n(29123)),m=n(575),v={name:"SubmiteditItemInfo",data:function(){return{param:{classname:"saletool.submitedit.submitedit",method:"insertorupdate",content:{sat_submiteditmodelid:"",content:"",sat_submiteditid:"0"}},isFileInfoPanlShow:!1,itemDrawerStyle:{img:{width:53,height:64},title:16,descript:12},textarea2:"",upload_panl:0}},props:["detailData","disabled","editData"],components:{FileItem:a.Z,upload:g.Z},computed:{},watch:{isFileInfoPanlShow:{handler:function(t){0==t&&"未提报"==this.upload_panl.status&&(this.deleteSubmit(),0!=this.upload_panl.attinfos.length&&m.Z.removeFileList(this.upload_panl.attinfos))}},editData:{handler:function(t){this.upload_panl=t,this.param.content.content=t.content}}},methods:{actionSubmit:function(){this.isFileInfoPanlShow=!0,this.getSubmitPanl()},getSubmitPanl:function(){var t=this;this.param.content.sat_submiteditmodelid=this.detailData.sat_submiteditmodelid,this.$api.requested(this.param).then((function(e){t.upload_panl=e.data}))},deleteSubmit:function(){this.param.content.content="",this.upload_panl.attinfos="";var t={classname:"saletool.submitedit.submitedit",method:"delete_submitdetailed",content:{sat_submiteditid:this.upload_panl.sat_submiteditid}};this.$api.requested(t).then((function(t){1!=t.code&&console.log("提报删除失败")}))},save:function(){var t=this;0!=this.param.content.content?(this.param.content.sat_submiteditmodelid=this.editData?this.upload_panl.sat_submiteditmodelid:this.detailData.sat_submiteditmodelid,this.param.content.sat_submiteditid=this.upload_panl.sat_submiteditid,this.editData.attinfos?this.$api.requested(this.param).then((function(e){1==e.code&&(t.$notify({title:"提示",message:"修改成功",type:"success"}),t.isFileInfoPanlShow=!1,t.$parent.getDetailData(),t.upload_panl="",t.param.content.content="",t.param={classname:"saletool.submitedit.submitedit",method:"insertorupdate",content:{sat_submiteditmodelid:"",content:"",sat_submiteditid:"0"}})})):this.$api.requested(this.param).then((function(e){if(t.upload_panl.status="发布",1==e.code){var n={classname:"saletool.submitedit.submitedit",method:"sub_submitdetailed",content:{onceonly:0,sat_submiteditmodelid:t.detailData.sat_submiteditmodelid,sat_submiteditid:t.upload_panl.sat_submiteditid}};t.$api.requested(n).then((function(e){1==e.code&&(t.upload_panl.status="发布",t.upload_panl.attinfos=null,t.param={classname:"saletool.submitedit.submitedit",method:"insertorupdate",content:{sat_submiteditmodelid:"",content:"",sat_submiteditid:"0"}},t.isFileInfoPanlShow=!1,t.$parent.getDetailData())}))}}))):this.$notify({title:"提示",message:"请编辑内容",type:"warning"})},onSuccess:function(t){var e=this;this.fileId=t;var n={classname:"system.attachment.Attachment",method:"createFileLink",content:{ownertable:"sat_submitedit",ownerid:this.upload_panl.sat_submiteditid,usetype:"default",attachmentids:[t]}};this.$api.requested(n).then((function(t){"成功"!=t.msg?e.$notify({title:"提示",message:"上传失败",type:"error"}):e.upload_panl.attinfos=e.fileType.fileList(e.upload_panl.attinfos.concat(t.data[0]))}))},deleteSuccess:function(t){this.upload_panl.attinfos.splice(t,1)}}},y=v,b=(0,c.Z)(y,f,p,!1,null,"52c39820",null),x=b.exports,w=n(5283),_={name:"index",data:function(){return{param:{accesstoken:"f7a9c8b3d7bb1e7372bd91dcb848e624",classname:"saletool.submitedit.submitedit",method:"select_submitdetailed",content:{sat_submiteditmodelid:""}},itemStyle:{itemWidth:366,margin:16,img:{width:29,height:29},title:14,descript:10},detailData:[],editData:[],currentIndex:1,pageSize:6}},components:{FileItem:a.Z,SubmitItemInfo:h,SubmitAction:x,Pagination:w.Z},computed:{},watch:{},created:function(){this.getDetailData()},methods:{getDetailData:function(){var t=this;this.param.content.sat_submiteditmodelid=this.$route.query.id,this.$api.requested(this.param).then((function(e){t.detailData=e.data,t.deteleNoSubmit(),t.detailData.attinfos=t.fileType.fileList(t.detailData.attinfos)}))},deteleNoSubmit:function(){var t=this;this.detailData.submitedit.forEach((function(e){if("未提报"==e.status){var n={classname:"saletool.submitedit.submitedit",method:"delete_submitdetailed",content:{sat_submiteditid:e.sat_submiteditid}};t.$api.requested(n).then((function(t){})),t.detailData.submitedit=t.detailData.submitedit.filter((function(t){return"未提报"!=t.status}))}}))},submitEdit:function(t){t.attinfos=this.fileType.fileList(t.attinfos),this.editData=t,this.$refs.submitAction.isFileInfoPanlShow=!0},pageChange:function(t){this.currentIndex=t},calcList:function(t){if(t)return t.slice((this.currentIndex-1)*this.pageSize,this.currentIndex*this.pageSize)}}},C=_,S=(0,c.Z)(C,r,i,!1,null,"6bed22e8",null),A=S.exports},36e3:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return f}});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"normal-card"},[t.tool.checkAuth(t.$route.name,"read")?n("time-select",{on:{timeChange:t.timeChange,clearSelect:t.clearSelect}}):t._e(),t.tool.checkAuth(t.$route.name,"read")?n("list",{attrs:{list:t.oneData,type:"more"}}):t._e(),n("pagination",{attrs:{total:t.total,pageSize:t.param.content.pageSize,currentPage:t.param.content.pageNumber},on:{pageChange:t.pageChange}})],1)},i=[],a=n(5283),o=n(30203),s=n(38347),l=n(6122),u={name:"index",data:function(){return{param:{classname:"saletool.submitedit.submitedit",method:"select_submitlist",content:{onceonly:0,pageNumber:1,pageSize:4,where:{begdate:"",enddate:""}}},oneData:[],total:0}},components:{Pagination:a.Z,SelectPanl:o.Z,list:l.Z,TimeSelect:s.Z},computed:{},watch:{},created:function(){this.getSubmitEditAction()},methods:{getSubmitEditAction:function(){var t=this;this.$api.requested(this.param).then((function(e){t.oneData=e.data,t.total=e.total}))},pageChange:function(t){this.param.content.pageNumber=t,this.getSubmitEditAction()},timeChange:function(t){this.param.content.where.begdate=t[0],this.param.content.where.enddate=t[1],this.param.content.pageNumber=1,this.getSubmitEditAction()},clearSelect:function(){this.param.content.where.begdate="",this.param.content.where.enddate="",this.param.content.pageNumber=1,this.getSubmitEditAction()}}},c=u,d=n(1001),h=(0,d.Z)(c,r,i,!1,null,"cc7316b0",null),f=h.exports},30203:function(t,e,n){"use strict";n.d(e,{Z:function(){return u}});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"select-panl"},t._l(t.titleLists,(function(e,r){return n("div",{key:r,class:["item",{active:t.currentName==e.type}],on:{click:function(n){return t.itemClick(e)}}},[t._v(t._s(e.name))])})),0)},i=[],a={name:"SelectPanl",data:function(){return{currentName:"all"}},props:{titleLists:{type:Array,default:function(){return[]}}},computed:{},watch:{},created:function(){this.currentName=this.titleLists[0].type},methods:{itemClick:function(t){this.currentName!=t.type&&(this.currentName=t.type,this.$emit("CurrentSelectType",t.type))}}},o=a,s=n(1001),l=(0,s.Z)(o,r,i,!1,null,"74e3b14a",null),u=l.exports},38347:function(t,e,n){"use strict";n.d(e,{Z:function(){return u}});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("el-date-picker",{attrs:{type:"daterange","start-placeholder":"开始日期","end-placeholder":"结束日期"},on:{change:t.timeChange},model:{value:t.time,callback:function(e){t.time=e},expression:"time"}})],1)},i=[],a=(n(21249),{name:"TimeSelect",data:function(){return{start:"",over:"",time:""}},computed:{},watch:{},methods:{timeChange:function(t){var e=this;if(t){var n=t.map((function(t){return e.changeTimeFormat(t.getTime())}));this.$emit("timeChange",n)}else this.$emit("clearSelect")},changeTimeFormat:function(t){var e=new Date(t),n=e.getMonth()+1<10?"0"+(e.getMonth()+1):e.getMonth()+1,r=e.getDate()<10?"0"+e.getDate():e.getDate();return e.getFullYear()+"-"+n+"-"+r}}}),o=a,s=n(1001),l=(0,s.Z)(o,r,i,!1,null,"7c5cf89e",null),u=l.exports},6122:function(t,e,n){"use strict";n.d(e,{Z:function(){return u}});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return 0!=t.list.length?n("div",{staticClass:"list"},t._l(t.list,(function(e,r){return n("div",{key:r,staticClass:"list-item",on:{click:function(n){return t.itemClick(e.sat_submiteditmodelid,e.ishistory)}}},[n("div",{staticClass:"header1"},[n("div",{staticClass:"handle",class:0==e.ishistory?"action":"no-action"},[t._v(" "+t._s(0==e.ishistory?"进行中":"已结束")+" ")]),n("p",{staticClass:"title"},[t._v(t._s(e.title))])]),n("div",{staticClass:"decript"},[t._v(t._s(e.notes))]),n("div",{staticClass:"time"},[t._v("有效期:"+t._s(e.begdate)+"~"+t._s(e.enddate))]),n("div",{staticClass:"footer"},[n("p",{staticClass:"submit"},[t._v("已提报:"+t._s(e.submitcount))]),n("div",{staticClass:"status",class:0==e.isRead?"no-raed":"read"},[t._v(t._s(0==e.isRead?"未读":"已读"))])])])})),0):n("el-empty",{attrs:{description:"暂无数据"}})},i=[],a={name:"list",data:function(){return{}},props:{list:{type:Array},type:{default:function(){return""}}},computed:{},watch:{},mounted:function(){console.log(this.list)},methods:{itemClick:function(t,e){window.sessionStorage.setItem("currentPath",this.$route.path),this.$router.push({path:"/submiteditmag_detail",query:{id:t,history:e,type:this.type}})}}},o=a,s=n(1001),l=(0,s.Z)(o,r,i,!1,null,"1a08e033",null),u=l.exports},27022:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return f}});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"normal-card"},[t.tool.checkAuth(t.$route.name,"read")?n("time-select",{on:{timeChange:t.timeChange,clearSelect:t.clearSelect}}):t._e(),t.tool.checkAuth(t.$route.name,"read")?n("list",{attrs:{list:t.oneData}}):t._e(),n("pagination",{attrs:{total:t.total,pageSize:t.param.content.pageSize,currentPage:t.param.content.pageNumber},on:{pageChange:t.pageChange}})],1)},i=[],a=n(5283),o=n(30203),s=n(38347),l=n(6122),u={name:"index",data:function(){return{param:{classname:"saletool.submitedit.submitedit",method:"select_submitlist",content:{onceonly:1,pageNumber:1,pageSize:9,where:{begdate:"",enddate:""}}},oneData:[],total:0}},components:{Pagination:a.Z,SelectPanl:o.Z,list:l.Z,TimeSelect:s.Z},computed:{},watch:{},created:function(){this.getSubmitEditAction()},methods:{getSubmitEditAction:function(){var t=this;this.$api.requested(this.param).then((function(e){t.oneData=e.data,t.total=e.total,console.log(t.oneData)}))},pageChange:function(t){this.param.content.pageNumber=t,this.getSubmitEditAction()},timeChange:function(t){this.param.content.where.begdate=t[0],this.param.content.where.enddate=t[1],this.param.content.pageNumber=1,console.log(this.param.content.where),this.getSubmitEditAction()},clearSelect:function(){this.param.content.where.begdate="",this.param.content.where.enddate="",this.param.content.pageNumber=1,this.getSubmitEditAction()}}},c=u,d=n(1001),h=(0,d.Z)(c,r,i,!1,null,"d7ac09cc",null),f=h.exports},31807:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return T}});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"role-edit"},[n("handle-top",[n("save",{attrs:{slot:"btn"},nativeOn:{click:function(e){return t.save()}},slot:"btn"})],1),n("role-info-handle",{ref:"info"}),n("role-power-select",{ref:"power"})],1)},i=[],a=(n(68309),n(41539),n(54747),n(69826),function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"header"},[r("div",{staticClass:"left"},[t._t("btn")],2),r("div",{staticClass:"right"},[r("img",{staticStyle:{cursor:"pointer"},attrs:{src:n(46901),alt:""},on:{click:function(e){return t.$router.go(0)}}})])])}),o=[],s={name:"Header",data:function(){return{}},computed:{},watch:{},methods:{}},l=s,u=n(1001),c=(0,u.Z)(l,a,o,!1,null,"5ddc1046",null),d=c.exports,h=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"info"},[n("p",{staticClass:"title"},[t._v("角色信息")]),n("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:t.ruleForm,rules:t.rules,"label-width":"100px"}},[n("el-form-item",{attrs:{label:"角色名称:",prop:"name"}},[n("el-input",{model:{value:t.ruleForm.name,callback:function(e){t.$set(t.ruleForm,"name",e)},expression:"ruleForm.name"}})],1),n("el-form-item",{attrs:{label:"角色描述:",prop:"descript"}},[n("el-input",{model:{value:t.ruleForm.descript,callback:function(e){t.$set(t.ruleForm,"descript",e)},expression:"ruleForm.descript"}})],1)],1)],1)},f=[],p={name:"roleInfoHandle",data:function(){return{ruleForm:{name:"",descript:""},rules:{name:[{required:!0,message:"请输入角色名称",trigger:"blur"}],descript:[{required:!0,message:"请输入角色描述",trigger:"blur"}]}}},computed:{},watch:{},methods:{}},g=p,m=(0,u.Z)(g,h,f,!1,null,"efb85748",null),v=m.exports,y=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"role-power-select"},[n("el-row",[n("el-col",{attrs:{span:24}},[n("p",{staticClass:"title"},[t._v("角色授权")])]),n("el-col",{staticStyle:{"margin-right":"16px"},attrs:{span:11}},[n("search",{on:{searchActive:t.searchActive,clearData:t.clearData}}),n("table-layout",{attrs:{layout:t.tablecols,data:t.powerList},on:{rowClick:t.rowClick}}),n("div",{staticClass:"page"},[n("pagination",{attrs:{total:t.total,pageSize:t.power.content.pageSize,currentPage:t.power.content.pageNumber},on:{pageChange:t.pageChange}})],1)],1),n("el-col",{attrs:{span:12}},[n("el-row",[n("el-col",{attrs:{span:8}},[n("div",{staticClass:"power-block"},[n("div",{staticClass:"title",on:{click:function(e){t.aaa=!0}}},[t._v("功能")]),n("el-checkbox-group",{staticClass:"padd",on:{change:t.groupChange},model:{value:t.checkList,callback:function(e){t.checkList=e},expression:"checkList"}},[t.aaa?t._l(t.currentItem.options,(function(e,r){return n("el-checkbox",{key:r,attrs:{label:e.optionid,checked:t.isCheck(e)}},[t._v(" "+t._s(e.optionname)+" ")])})):t._e()],2),n("div",{staticClass:"footer padd"},[t.bbb?n("el-checkbox",{attrs:{label:"",checked:t.allCheck},on:{change:t.allCheckClick}},[t._v(t._s(t.checkAll))]):t._e()],1)],1)]),n("el-col",{attrs:{span:8}},[n("div",{staticClass:"power-block"},[n("p",{staticClass:"title"},[t._v("隐藏字段")])])]),n("el-col",{attrs:{span:8}},[n("div",{staticClass:"power-block"},[n("p",{staticClass:"title"},[t._v("基础数据")])])])],1)],1)],1)],1)},b=[],x=n(74479),w=n(23796),_=(n(57327),n(76857)),C=n(5283),S=n(44044),A=(n(52266),{name:"RolePowerSelect",data:function(){var t;return t={aaa:!0,bbb:!0,power:{classname:"sale.role.role",method:"query_appselect_web",content:{pageNumber:1,pageSize:10,roleid:0==parseInt(window.sessionStorage.getItem("currentEditRole"))?0:JSON.parse(window.sessionStorage.getItem("currentEditRole")).roleid,where:{condition:""}}},currentItem:0,total:2,powerList:[],tempPowerList:[],tablecols:[],checkList:[],systemapps:[]},(0,w.Z)(t,"currentItem",[]),(0,w.Z)(t,"allCheck",!1),t},props:[],components:{search:_.Z,pagination:C.Z,tableLayout:S.Z},computed:{isCheck:function(){var t=this;return function(e){return void 0!=t.currentItem.optionids.find((function(t){return t==e.optionid}))}},checkAll:function(){var t=this.currentItem.optionids?this.currentItem.optionids.length:0,e=this.currentItem.options?this.currentItem.options.length:0;return t+"/"+e}},watch:{},created:function(){this.getAllHavePower()},mounted:function(){this.tablecols=this.tool.tabelCol("roleManagent").roleTable.tablecols},methods:{getAllHavePower:function(){var t=this;0!=parseInt(window.sessionStorage.getItem("currentEditRole"))?this.$api.requested({classname:"sale.role.role",method:"query_appselect_web",content:{roleid:JSON.parse(window.sessionStorage.getItem("currentEditRole")).roleid,where:{condition:""}}}).then((function(e){var n,r=e.data.filter((function(t){return t.optionids.length>0}));t.tempPowerList.forEach((function(e,i){n=r.find((function(t){return t.systemappid==e.systemappid})),t.tempPowerList.push(n)})),t.getPowerList()})):this.getPowerList()},getPowerList:function(){var t=this;this.$api.requested(this.power).then((function(e){t.powerList=e.data,t.handleHavePower(),t.calcHavePower(t.powerList),t.currentItem=t.powerList[0],t.allCheck=t.currentItem.optionids.length==t.currentItem.options.length,t.refreshItem(t),t.total=e.total}))},handleHavePower:function(){var t,e=this;if(0==this.tempPowerList.length)(t=this.tempPowerList).push.apply(t,(0,x.Z)(this.powerList));else for(var n=function(t){var n=e.tempPowerList.find((function(n){return n.systemappid==e.powerList[t].systemappid}));if(void 0!=n)return"continue";e.tempPowerList.push(e.powerList[t])},r=0;r0){for(var n,r=function(r){n=e.tempPowerList.find((function(e){return e.systemappid==t[r].systemappid})),void 0!=n&&(t[r]=n)},i=0;i0},on:{click:function(e){return t.countDown()}}},[t._v(t._s(0==t.count?"获取验证码":t.count+"s"))])],1)],1),n("div",{staticClass:"footer"},[n("el-button",{on:{click:function(e){t.dialogVisible=!1}}},[t._v("取消")]),n("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.phoneEdit()}}},[t._v("提交")])],1)],1)],1)},p=[],g=(n(21703),n(88495)),m=n.n(g),v={name:"PhoneEdit",data:function(){var t=this,e=function(e,n,r){if(!t.tool.checkPhoneFun(n))return r(new Error("请填写正确的手机号"));r()};return{dialogVisible:!1,form:{phonenumber:""},count:0,logCode:"",rules:{phonenumber:[{required:!0,message:"请输入手机号",trigger:"blur"},{validator:e,trigger:"blur"}]}}},props:["userInfo"],computed:{},watch:{},methods:{countDown:function(){var t=this;this.getPhoneCode(),this.count=5;var e=setInterval((function(){t.count--,0==t.count&&clearInterval(e)}),1e3)},getPhoneCode:function(){var t=this;0!=this.form.phonenumber&&this.$api.requested({classname:"common.usercenter.usercenter",method:"updateUserMsg_getPassWord",content:{phonenumber:this.form.phonenumber}}).then((function(e){var n=t.$createElement;1===e.code?t.$notify({title:"获取验证码成功!",message:n("i",{style:"color: teal"},e.msg)}):t.$notify({title:"失败",message:e.msg,type:"error"})}))},phoneEdit:function(){var t=this;0!=this.logCode?this.$api.requested({accesstoken:"299697db3f25396622f7f4a7f1673405",classname:"common.usercenter.usercenter",method:"updateUserMsg",content:{name:this.userInfo.name,phonenumber:this.form.phonenumber,password:m()(this.logCode)}}).then((function(e){1==e.code?(t.$notify({title:"提示",message:"修改成功",type:"success"}),t.$emit("phoneChange",t.form.phonenumber),t.dialogVisible=!1,t.logCode="",t.form.phonenumber=""):t.$notify({title:"提示",message:"修改失败",type:"error"})})):this.$notify({title:"提示",message:"请先获取验证码",type:"warning"})},handleClose:function(){this.dialogVisible=!1}}},y=v,b=(0,c.Z)(y,f,p,!1,null,"518b28c7",null),x=b.exports,w=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"password"},[n("span",{on:{click:function(e){t.dialogVisible=!0}}},[t._v("编辑")]),n("el-dialog",{attrs:{title:"修改密码",visible:t.dialogVisible,"before-close":t.handleClose},on:{"update:visible":function(e){t.dialogVisible=e}}},[n("el-form",{ref:"form",attrs:{rules:t.rules,model:t.form,"label-width":"80px"}},[n("el-form-item",{attrs:{label:"原密码",prop:"pass"}},[n("el-input",{attrs:{placeholder:"请输入原密码"},model:{value:t.form.pass,callback:function(e){t.$set(t.form,"pass",e)},expression:"form.pass"}})],1),n("el-form-item",{attrs:{label:"新密码",prop:"newpass"}},[n("el-input",{attrs:{placeholder:"请输入新密码","show-password":""},model:{value:t.form.newpass,callback:function(e){t.$set(t.form,"newpass",e)},expression:"form.newpass"}})],1),n("el-form-item",{attrs:{label:"确认密码",prop:"checkpass"}},[n("el-input",{attrs:{placeholder:"请再次输入密码","show-password":""},model:{value:t.form.checkpass,callback:function(e){t.$set(t.form,"checkpass",e)},expression:"form.checkpass"}})],1)],1),n("div",{staticClass:"footer"},[n("el-button",{on:{click:function(e){t.dialogVisible=!1}}},[t._v("取消")]),n("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.passEdit()}}},[t._v("提交")])],1)],1)],1)},_=[],C={name:"PassEdit",data:function(){var t=this,e=function(e,n,r){t.form.newpass!=t.form.checkpass?r(new Error("两次输入密码不一致")):r()};return{dialogVisible:!1,form:{pass:"",newpass:"",checkpass:""},rules:{pass:[{required:!0,message:"请输入密码",trigger:"blur"}],newpass:[{required:!0,message:"请输入密码",trigger:"blur"}],checkpass:[{required:!0,message:"请输入密码",trigger:"blur"},{validator:e,trigger:"blur"}]}}},props:["userInfo"],computed:{},watch:{},methods:{handleClose:function(){this.dialogVisible=!1},passEdit:function(){var t=this;this.$refs.form.validate((function(e){e?t.$api.requested({accesstoken:"299697db3f25396622f7f4a7f1673405",classname:"common.usercenter.usercenter",method:"changePassWord",content:{password:m()(t.form.pass),newpassword:m()(t.form.checkpass)}}).then((function(e){1==e.code?(t.$notify({title:"提示",message:"密码修改成功",type:"success"}),t.$refs.form.resetFields()):(t.$notify({title:"提示",message:"密码修改失败",type:"warning"}),t.$refs.form.resetFields())})):t.$notify({title:"提示",message:"请按照要求修改密码",type:"warning"})}))}}},S=C,A=(0,c.Z)(S,w,_,!1,null,"e72555a0",null),k=A.exports,E=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"logout"},[n("el-button",{staticStyle:{border:"1px solid #ff3b30",color:"#ff3b30"},attrs:{round:""},on:{click:function(e){t.dialogVisible=!0}}},[t._v("退出登录")]),n("el-dialog",{attrs:{title:"提示",visible:t.dialogVisible,width:"30%","before-close":t.handleClose},on:{"update:visible":function(e){t.dialogVisible=e}}},[n("span",[t._v("确定永久退出登录?")]),n("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:function(e){t.dialogVisible=!1}}},[t._v("取 消")]),n("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.logout()}}},[t._v("确 定")])],1)])],1)},D=[],F={name:"",data:function(){return{dialogVisible:!1}},computed:{},props:["userInfo"],watch:{},methods:{aaa:function(){this.dialogVisible=!0},logout:function(){this.$router.push("/"),window.sessionStorage.clear()},handleClose:function(){this.dialogVisible=!1}}},M=F,O=(0,c.Z)(M,E,D,!1,null,"6cf2d618",null),B=O.exports,T=function(){var t=this,e=t.$createElement;t._self._c;return t._m(0)},P=[function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"wx"},[r("p",{staticClass:"title"},[t._v("绑定微信")]),r("div",{staticClass:"no-bind"},[r("div",{staticClass:"left"},[r("img",{attrs:{src:n(96004),alt:""}}),r("span",[t._v("未绑定")])])])])}],I={name:"",data:function(){return{}},props:["userInfo"],computed:{},watch:{},methods:{}},L=I,R=(0,c.Z)(L,T,P,!1,null,"1d4892d6",null),N=R.exports,z=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"panl"},[n("span",{on:{click:function(e){t.dialogVisible=!0}}},[t._v("绑定")]),n("el-dialog",{attrs:{title:"绑定微信",visible:t.dialogVisible,"before-close":t.handleClose},on:{"update:visible":function(e){t.dialogVisible=e}}},[n("div",{staticClass:"content"},[n("div",{staticClass:"codeWx"},[t._v("微信二维码")]),n("p",[t._v("微信扫码绑定")]),n("p",[t._v("微信扫码登录")])])])],1)},j=[],$={name:"VxPanl",data:function(){return{dialogVisible:!1}},computed:{},watch:{},methods:{handleClose:function(){this.dialogVisible=!1},bindVx:function(){this.$refs.vxPanl.dialogVisible=!0}}},V=$,q=(0,c.Z)(V,z,j,!1,null,"2bbe0521",null),H=q.exports,U=n(575),G={name:"UserInfo",data:function(){return{param:{accesstoken:"299697db3f25396622f7f4a7f1673405",classname:"common.usercenter.usercenter",method:"queryUserMsg",content:{}},userInfo:""}},components:{upLoad:a.Z,baseInfo:h,phoneEdit:x,passEdit:k,wxBind:N,wxPanl:H,logOut:B},computed:{getAvatar:function(){if(this.userInfo&&this.userInfo.attinfos.length>0)return this.userInfo.attinfos[0].url}},watch:{},created:function(){this.getUserInfo()},methods:{getUserInfo:function(){var t=this;this.$api.requested(this.param).then((function(e){t.userInfo=e.data}))},onSuccess:function(t){var e=this,n=!0;this.userInfo.attinfos.length>0&&(n=!1,U.Z.removeFileList(this.userInfo.attinfos).then((function(n){e.bindFile(t)}))),n&&this.bindFile(t)},bindFile:function(t){var e=this;this.$api.requested({classname:"system.attachment.Attachment",method:"createFileLink",content:{ownertable:"sys_users",ownerid:JSON.parse(window.sessionStorage.getItem("active_account")).userid,usetype:"defaultheadportrait",attachmentids:[t]}}).then((function(t){"成功"!=t.msg?e.$notify({title:"提示",message:"上传失败",type:"error"}):e.getUserInfo()}))},phoneChange:function(t){this.$refs.userInfo.ruleForm.phonenumber=t}}},W=G,Z=(0,c.Z)(W,r,i,!1,null,"71ab1f3e",null),X=Z.exports},65570:function(t,e,n){"use strict";n.d(e,{Z:function(){return c}});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"flex-align-center flex-between normal-margin"},[t.$slots.title?n("div",[t._t("title")],2):n("p",[t._v("附件列表")]),t._t("upload")],2),n("el-table",{staticStyle:{width:"100%"},attrs:{"header-cell-style":{background:"#EEEEEE",color:"#333"},size:"mini",border:"",data:t.attinfos}},[n("el-table-column",{attrs:{prop:"document",label:"文件名称"},scopedSlots:t._u([{key:"default",fn:function(e){return[t.actid===e.row.attachmentid?n("el-input",{attrs:{size:"mini"},model:{value:e.row.document,callback:function(n){t.$set(e.row,"document",n)},expression:"scope.row.document"}}):n("span",[t._v(t._s(e.row.document))])]}}])}),n("el-table-column",{attrs:{prop:"createdate",label:"上传时间"}}),n("el-table-column",{attrs:{prop:"contentlength",label:"文件大小",width:"90"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.contentlength>1073741824?(e.row.contentlength/Math.pow(1024,3)).toFixed(2)+"GB":e.row.contentlength>1048576?(e.row.contentlength/Math.pow(1024,2)).toFixed(2)+"MB":e.row.contentlength>1024?(e.row.contentlength/Math.pow(1024,1)).toFixed(2)+"KB":e.row.contentlength+"B")+" ")]}}])}),n("el-table-column",{attrs:{label:"操作",width:"140"},scopedSlots:t._u([{key:"default",fn:function(e){return[t.actid===e.row.attachmentid?n("div",[n("el-button",{attrs:{type:"text",size:"small"},on:{click:function(n){return t.saveEdit(e.row)}}},[t._v("保 存")]),n("el-button",{attrs:{type:"text",size:"small"},on:{click:function(e){t.actid=0}}},[t._v("取 消")])],1):n("div",[n("el-button",{attrs:{type:"text",size:"small"},on:{click:function(n){return t.download(e.row)}}},[t._v("下 载")]),n("el-button",{staticClass:"inline-16",attrs:{disabled:t.onlyread,type:"text",size:"small"},on:{click:function(n){return t.editAttachment(e.row)}}},[t._v("编 辑")]),n("el-popconfirm",{attrs:{title:"确定删除当前附件吗?"},on:{confirm:function(n){return t.deleteAttachment(e.row)}}},[n("el-button",{attrs:{slot:"reference",disabled:t.onlyread,size:"small",type:"text"},slot:"reference"},[t._v("删 除")])],1)],1)]}}])})],1)],1)},i=[],a=n(16198),o=(n(35666),{props:["attinfos","onlyread"],data:function(){return{actid:null}},methods:{editAttachment:function(t){this.actid=t.attachmentid},download:function(t){window.open(t.url)},saveEdit:function(t){var e=this;return(0,a.Z)(regeneratorRuntime.mark((function n(){var r,i;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return r={classname:"system.attachment.MediaCenter",method:"changeAttachment",content:{files:[{attachmentid:t.attachmentid,document:t.document,parentid:t.parentid}]}},n.next=3,e.$api.requested(r);case 3:i=n.sent,1===i.code&&e.$emit("onSuccess"),1===i.code&&(e.actid="");case 6:case"end":return n.stop()}}),n)})))()},deleteAttachment:function(t){var e=this;return(0,a.Z)(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,e.$api.requested({classname:"system.attachment.MediaCenter",method:"deleteAttachment",content:{attachmentid:t.attachmentid}});case 2:r=n.sent,1===r.code&&e.tool.showMessage(r),1===r.code&&e.$emit("onSuccess");case 5:case"end":return n.stop()}}),n)})))()}}}),s=o,l=n(1001),u=(0,l.Z)(s,r,i,!1,null,null,null),c=u.exports},47223:function(t,e,n){"use strict";n.d(e,{Z:function(){return u}});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-breadcrumb",{attrs:{separator:">"}},t._l(t.tempFileData,(function(e,r){return n("el-breadcrumb-item",{key:r,attrs:{to:{}},nativeOn:{click:function(n){return t.goPositionFile(e.id)}}},[t._v(t._s(e.filename))])})),1)},i=[],a={name:"BreadCrumbs",data:function(){return{}},props:{tempFileData:{type:Array}},computed:{},watch:{},methods:{goPositionFile:function(t){this.$emit("BreadCrumbsChange",t)}}},o=a,s=n(1001),l=(0,s.Z)(o,r,i,!1,null,"2722927f",null),u=l.exports},24970:function(t,e,n){"use strict";n.d(e,{Z:function(){return d}});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"select"},[n("span",[t._v(t._s(t.label)+" ")]),n("el-cascader",{attrs:{options:t.selectList,"show-all-levels":!1,props:t.prop,clearable:"",size:"small"},on:{change:t.changeSelect,clear:function(e){return t.clearSelete()}}})],1)},i=[],a=n(4301),o=n.n(a),s={name:"CategorySelect",data:function(){return{}},props:{selectList:{default:function(){return[]}},prop:{type:Object,default:function(){return{value:"sat_sharematerial_classid",label:"classname"}}},label:String},components:{TreeSelect:o()},computed:{},watch:{},created:function(){},methods:{changeSelect:function(t){this.$emit("changeSelect",t)},clearSelete:function(){this.$emit("clearSelect")}}},l=s,u=n(1001),c=(0,u.Z)(l,r,i,!1,null,"52067120",null),d=c.exports},4906:function(t,e,n){"use strict";n.d(e,{Z:function(){return c}});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("el-button",{attrs:{type:"success",size:"small",icon:"el-icon-download"},on:{click:function(e){return t.submit()}}},[t._v("导 出")])],1)},i=[],a=n(16198),o=(n(35666),n(38862),n(41539),n(54747),n(40561),n(21249),{props:["tablecols","param","excelTitle"],data:function(){return{}},methods:{submit:function(){var t=this;return(0,a.Z)(regeneratorRuntime.mark((function e(){var n,r,i,a,o;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n={},n=JSON.parse(JSON.stringify(t.param)),n.content.isAll=!0,console.log(n,t.param),e.next=6,t.$api.requested(n);case 6:r=e.sent,i=JSON.parse(JSON.stringify(t.tablecols)),i.forEach((function(t,e){"省市县"===t.title&&(i[e].title="省",i.splice(e+1,0,{title:"市",columnname:"city"},{title:"县",columnname:"county"}))})),a=i.map((function(t){return t.title})),o=i.map((function(t){return t.columnname})),t.tool.exportExcel(a,o,r.data,t.excelTitle);case 12:case"end":return e.stop()}}),e)})))()}}}),s=o,l=n(1001),u=(0,l.Z)(s,r,i,!1,null,null,null),c=u.exports},36292:function(t,e,n){"use strict";n.d(e,{Z:function(){return m}});var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.fileData?n("div",{staticClass:"file10"},[t._l(t.fileData,(function(e,r){return n("div",{key:r,staticClass:"item-file",style:[{width:t.itemStyle.itemWidth?t.itemStyle.itemWidth+"px":"100%"},{"margin-right":t.itemStyle.margin+"px"}]},[n("div",{staticClass:"left"},[n("div",{staticClass:"icon",style:{width:t.itemStyle.img.width+"px",height:t.itemStyle.img.height+"px"}},[n("img",{attrs:{src:e.cover,alt:""}})]),n("div",{staticClass:"text"},[n("p",[t._v(t._s(e.document))]),n("p",[t._v(t._s(e.createdate))])])]),n("div",{staticClass:"right"},[t.tool.checkAuth(t.$route.name,"read")?n("p",{staticClass:"see",on:{click:function(n){return t.seeClick(e)}}},[t._v("预览")]):t._e(),t.isDelete&&t.tool.checkAuth(t.$route.name,"delete")?n("p",{staticClass:"delete",on:{click:function(n){return t.deleteFile(e)}}},[t._v("删除")]):t._e(),t.isDownLoad&&t.tool.checkAuth(t.$route.name,"download")?n("button",{on:{click:function(n){return t.downLoad(e)}}},[t._v("下载")]):t._e()])])})),n("see-File",{ref:"seeFile",attrs:{fileData:t.seeFile}})],2):t._e()},i=[],a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.fileData?n("el-dialog",{attrs:{"append-to-body":"",title:"预览",visible:t.dialogVisible,"before-close":t.handleClose},on:{"update:visible":function(e){t.dialogVisible=e}}},["video"==t.fileData.fileType?n("video",{attrs:{src:t.fileData.url,controls:""}}):t._e(),"image"==t.fileData.fileType?n("el-image",{attrs:{src:t.fileData.url}}):t._e()],1):t._e()},o=[],s={name:"",data:function(){return{dialogVisible:!1}},props:["fileData"],computed:{},watch:{},created:function(){},methods:{handleClose:function(){this.dialogVisible=!1}}},l=s,u=n(1001),c=(0,u.Z)(l,a,o,!1,null,"ec4f6dde",null),d=c.exports,h=n(575),f={name:"index",data:function(){return{seeFile:"",isSeeFileShow:!1}},props:{isDownLoad:Boolean,itemStyle:Object,isDelete:Boolean,fileData:{default:function(){return[]}},sat_noticeid:""},components:{SeeFile:d},computed:{},watch:{},created:function(){},methods:{deleteFile:function(t){var e=this,n=t;h.Z.removeFileList([t]).then((function(t){1==t?(e.$notify({title:"提示",message:"删除成功",type:"success"}),e.$emit("deleteSuccess",n)):e.$notify({title:"提示",message:"删除失败",type:"error"})}))},seeClick:function(t){"image"==t.fileType||"pdf"==t.fileType||"video"==t.fileType?(this.seeFile=t,this.$refs.seeFile.dialogVisible=!0):this.$notify({title:"提示",message:"该文件暂不支持",type:"warning"})},downLoad:function(t){this.$emit("updateDownLoadRecord",t),window.open(t.url,"_self")}}},p=f,g=(0,u.Z)(p,r,i,!1,null,"3b5ea32b",null),m=g.exports},29963:function(t,e,n){"use strict";n.d(e,{Z:function(){return u}});var r=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("el-dropdown",{attrs:{trigger:"click"}},[r("span",{staticClass:"el-dropdown-link"},[t._v(" "+t._s(1==t.sortType?"最新":"最热")+" "),r("div",{staticClass:"select"},[r("img",{directives:[{name:"show",rawName:"v-show",value:2==t.sortType,expression:"sortType == 2"}],attrs:{src:n(43431),alt:""}}),r("img",{directives:[{name:"show",rawName:"v-show",value:1==t.sortType,expression:"sortType == 1"}],attrs:{src:n(2979),alt:""}})])]),r("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[r("el-dropdown-item",{staticClass:"clearfix",nativeOn:{click:function(e){return t.sortTypeClick("最新")}}},[t._v(" 最新 "),r("el-badge",{directives:[{name:"show",rawName:"v-show",value:1==t.sortType,expression:"sortType == 1"}],staticClass:"iconfont icon-paixushaixuanxuanzhong"})],1),r("el-dropdown-item",{staticClass:"clearfix",nativeOn:{click:function(e){return t.sortTypeClick("最热")}}},[t._v(" 最热 "),r("el-badge",{directives:[{name:"show",rawName:"v-show",value:2==t.sortType,expression:"sortType == 2"}],staticClass:"iconfont icon-paixushaixuanxuanzhong"})],1)],1)],1)},i=[],a={name:"HotNewControl",data:function(){return{sortType:1}},props:{},computed:{},watch:{},methods:{sortTypeClick:function(t){this.sortType="最新"==t?1:2,this.$emit("sortTypeChange",t)}}},o=a,s=n(1001),l=(0,s.Z)(o,r,i,!1,null,"8a9a931e",null),u=l.exports},69354:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return C}});var r=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"flex-align-center"},[r("div",{staticClass:"nav-list"},[r("div",{staticClass:"nav-top-item"},[r("div",{staticClass:"logo-avatar"},t._l(t.siteinfo.attinfos,(function(t){return r("img",{directives:[{name:"show",rawName:"v-show",value:"actionlogo"===t.usetype,expression:"img.usetype === 'actionlogo'"}],key:t.index,staticStyle:{width:"100%"},attrs:{src:t.url,alt:""}})})),0),r("div",{staticClass:"item active",on:{click:function(e){return t.$router.push("/home")}}},[r("img",{attrs:{width:"30",src:n(82024),alt:""}}),r("p",[t._v("工作台")])]),t._m(0)]),t._m(1)]),r("el-container",[r("el-header",[r("myheader",{attrs:{siteinfo:t.siteinfo}})],1),r("div",{staticClass:"modules-panel flex-align-center flex-between"},[r("p",[t._v(t._s(t.routerName))]),r("el-button",{attrs:{size:"mini"},on:{click:function(e){return t.$router.go(-1)}}},[t._v("返 回")])],1),r("el-container",{staticClass:"mymain"},[t.ast_nav?r("el-aside",{attrs:{width:"200px"}},[r("myaside")],1):t._e(),r("el-container",[r("el-main",[r("router-view")],1)],1)],1)],1)],1)},i=[function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"item"},[r("img",{attrs:{width:"30",src:n(82024),alt:""}}),r("p",[t._v("消息")])])},function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"nav-bottom-item"},[r("div",{staticClass:"item"},[r("img",{attrs:{width:"30",src:n(15526),alt:""}})])])}],a=n(4367),o=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"flex"},[r("div",{staticClass:"logo"},[t._v("YOS后端管理平台")]),r("div",{staticClass:"right-operation"},[r("el-dropdown",[r("span",{staticClass:"el-dropdown-link"},[r("div",{staticClass:"flex"},[r("img",{attrs:{height:"30",src:n(38308),alt:""}}),t._v(" "+t._s(t.siteinfo.enterprisename)),r("i",{staticClass:"el-icon-arrow-down el-icon--right"})])]),r("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[r("el-dropdown-item",[t._v("切换账号")]),r("el-dropdown-item",{attrs:{divided:""},nativeOn:{click:function(e){return t.loginOut()}}},[t._v("退出登录")])],1)],1)],1)])},s=[],l={props:["siteinfo"],data:function(){return{activeIndex:"",accountInfo:{}}},methods:{handleSelect:function(){},loginOut:function(){var t=this;this.$confirm("是否要退出当前账号?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){t.$router.push("/"),sessionStorage.clear()})).catch((function(){t.$message({type:"info",message:"已取消"})}))},changeAccount:function(){this.$router.push("/accounts")}},mounted:function(){this.accountInfo=JSON.parse(sessionStorage.getItem("active_account"))}},u=l,c=n(1001),d=(0,c.Z)(u,o,s,!1,null,"468b2379",null),h=d.exports,f=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-menu",{staticClass:"el-menu-vertical-demo",staticStyle:{height:"calc(100vh - 100px)","overflow-y":"scroll"},attrs:{"default-active":t.getCurrentPath,"background-color":"#F5F5F5","text-color":"#666","active-text-color":"#fff",router:""},on:{open:t.handleOpen,close:t.handleClose}},t._l(t.auth_data,(function(e){return n("el-menu-item",{key:e.systemappid,attrs:{index:e.path},on:{click:function(n){return t.itemClick(e.path)}}},[n("span",{attrs:{slot:"title"},slot:"title"},[t._v(t._s(e.meta.title))])])})),1)},p=[],g={data:function(){return{activePath:"",auth_data:""}},computed:{getCurrentPath:function(){if(this.activePath)return window.sessionStorage.getItem("currentPath")}},methods:{handleOpen:function(){},handleClose:function(){},getAuthList:function(){var t=JSON.parse(sessionStorage.getItem("active_modules"));this.auth_data=t.apps,this.activePath=t.apps[0].path},itemClick:function(t){window.sessionStorage.setItem("currentPath",t)}},created:function(){this.activePath=this.$route.path,this.getAuthList()},watch:{$route:function(){"/submiteditmag_detail"!=this.$route.path&&"/upload_archives"!=this.$route.path&&"/role_edit"!=this.$route.path&&(this.activePath=this.$route.path)},activePath:{handler:function(t){window.sessionStorage.setItem("currentPath",this.$route.path)}}}},m=g,v=(0,c.Z)(m,f,p,!1,null,"ee92aa3c",null),y=v.exports,b=n(20629),x={components:{myheader:h,myaside:y},computed:(0,a.Z)({},(0,b.Se)({siteinfo:"siteinfo"})),data:function(){return{routerName:""}},methods:{siteInfos:function(){this.$store.dispatch("querySiteInfo",{classname:"webmanage.site.site",method:"querySite",content:{}})}},created:function(){this.siteInfos(),this.routerName=this.$route.meta.title,this.ast_nav=this.$route.meta.ast_nav},watch:{$route:function(t){this.routerName=t.meta.title,this.ast_nav=t.meta.ast_nav}}},w=x,_=(0,c.Z)(w,r,i,!1,null,"36d0b7d8",null),C=_.exports},55663:function(t,e,n){"use strict";n.d(e,{Z:function(){return dut}});var r,i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticStyle:{border:"1px solid #ccc"}},[n("Toolbar",{staticStyle:{"border-bottom":"1px solid #ccc"},attrs:{editor:t.editor,defaultConfig:t.toolbarConfig,mode:t.mode}}),n("Editor",{staticStyle:{height:"500px","overflow-y":"hidden"},attrs:{defaultConfig:t.editorConfig,mode:t.mode},on:{onCreated:t.onCreated},model:{value:t.html,callback:function(e){t.html=e},expression:"html"}})],1)},a=[],o=(n(60514),n(68309),n(20144));if("undefined"===typeof n.g){if("ActiveXObject"in window){var s="抱歉,wangEditor V5+ 版本开始,不在支持 IE 浏览器";s+="\n Sorry, wangEditor V5+ versions do not support IE browser.",console.error(s)}l(),u()}else n.g&&(null===(r=n.g.navigator)||void 0===r?void 0:r.userAgent.match("QQBrowser"))&&(l(),u());function l(){"undefined"===typeof globalThis&&(window.globalThis=window)}function u(){"undefined"===typeof AggregateError&&(window.AggregateError=function(t,e){var n=new Error(e);return n.errors=t,n})}if("object"===typeof n.g){var c=Object.getOwnPropertyDescriptor(n.g,"window");n.g.window&&!c.set||(n.g.window=n.g,n.g.requestAnimationFrame=function(){},n.g.navigator={userAgent:""},n.g.location={hostname:"0.0.0.0",port:0,protocol:"http:"},n.g.btoa=function(){},n.g.crypto={getRandomValues:function(t){return nodeCrypto.randomFillSync(t)}})} /*! * is-plain-object * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. */function d(t){return"[object Object]"===Object.prototype.toString.call(t)}function h(t){var e,n;return!1!==d(t)&&(e=t.constructor,void 0===e||(n=e.prototype,!1!==d(n)&&!1!==n.hasOwnProperty("isPrototypeOf")))}function f(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r3?e.i-4:e.i:Array.isArray(t)?1:_(t)?2:C(t)?3:0}function y(t,e){return 2===v(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function b(t,e){return 2===v(t)?t.get(e):t[e]}function x(t,e,n){var r=v(t);2===r?t.set(e,n):3===r?(t.delete(e),t.add(n)):t[e]=n}function w(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function _(t){return Y&&t instanceof Map}function C(t){return K&&t instanceof Set}function S(t){return t.o||t.t}function A(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=at(t);delete e[et];for(var n=it(e),r=0;r1&&(t.set=t.add=t.clear=t.delete=E),Object.freeze(t),e&&m(t,(function(t,e){return k(e,!0)}),!0)),t}function E(){f(2)}function D(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function F(t){var e=ot[t];return e||f(18,t),e}function M(){return Z||f(0),Z}function O(t,e){e&&(F("Patches"),t.u=[],t.s=[],t.v=e)}function B(t){T(t),t.p.forEach(I),t.p=null}function T(t){t===Z&&(Z=t.l)}function P(t){return Z={p:[],l:Z,h:t,m:!0,_:0}}function I(t){var e=t[et];0===e.i||1===e.i?e.j():e.O=!0}function L(t,e){e._=e.p.length;var n=e.p[0],r=void 0!==t&&t!==n;return e.h.g||F("ES5").S(e,t,r),r?(n[et].P&&(B(e),f(4)),g(t)&&(t=R(e,t),e.l||z(e,t)),e.u&&F("Patches").M(n[et],t,e.u,e.s)):t=R(e,n,[]),B(e),e.u&&e.v(e.u,e.s),t!==J?t:void 0}function R(t,e,n){if(D(e))return e;var r=e[et];if(!r)return m(e,(function(i,a){return N(t,r,e,i,a,n)}),!0),e;if(r.A!==t)return e;if(!r.P)return z(t,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=4===r.i||5===r.i?r.o=A(r.k):r.o;m(3===r.i?new Set(i):i,(function(e,a){return N(t,r,i,e,a,n)})),z(t,i,!1),n&&t.u&&F("Patches").R(r,n,t.u,t.s)}return r.o}function N(t,e,n,r,i,a){if(i===n&&f(5),p(i)){var o=R(t,i,a&&e&&3!==e.i&&!y(e.D,r)?a.concat(r):void 0);if(x(n,r,o),!p(o))return;t.m=!1}if(g(i)&&!D(i)){if(!t.h.F&&t._<1)return;R(t,i),e&&e.A.l||z(t,i)}}function z(t,e,n){void 0===n&&(n=!1),t.h.F&&t.m&&k(e,n)}function j(t,e){var n=t[et];return(n?S(n):t)[e]}function $(t,e){if(e in t)for(var n=Object.getPrototypeOf(t);n;){var r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function V(t){t.P||(t.P=!0,t.l&&V(t.l))}function q(t){t.o||(t.o=A(t.t))}function H(t,e,n){var r=_(e)?F("MapSet").N(e,n):C(e)?F("MapSet").T(e,n):t.g?function(t,e){var n=Array.isArray(t),r={i:n?1:0,A:e?e.A:M(),P:!1,I:!1,D:{},l:e,t:t,k:null,o:null,j:null,C:!1},i=r,a=st;n&&(i=[r],a=lt);var o=Proxy.revocable(i,a),s=o.revoke,l=o.proxy;return r.k=l,r.j=s,l}(e,n):F("ES5").J(e,n);return(n?n.A:M()).p.push(r),r}function U(t){return p(t)||f(22,t),function t(e){if(!g(e))return e;var n,r=e[et],i=v(e);if(r){if(!r.P&&(r.i<4||!F("ES5").K(r)))return r.t;r.I=!0,n=G(e,i),r.I=!1}else n=G(e,i);return m(n,(function(e,i){r&&b(r.t,e)===i||x(n,e,t(i))})),3===i?new Set(n):n}(t)}function G(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return A(t)}var W,Z,X="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Y="undefined"!=typeof Map,K="undefined"!=typeof Set,Q="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,J=X?Symbol.for("immer-nothing"):((W={})["immer-nothing"]=!0,W),tt=X?Symbol.for("immer-draftable"):"__$immer_draftable",et=X?Symbol.for("immer-state"):"__$immer_state",nt={0:"Illegal state",1:"Immer drafts cannot have computed properties",2:"This object has been frozen and should not be mutated",3:function(t){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+t},4:"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",5:"Immer forbids circular references",6:"The first or second argument to `produce` must be a function",7:"The third argument to `produce` must be a function or undefined",8:"First argument to `createDraft` must be a plain object, an array, or an immerable object",9:"First argument to `finishDraft` must be a draft returned by `createDraft`",10:"The given draft is already finalized",11:"Object.defineProperty() cannot be used on an Immer draft",12:"Object.setPrototypeOf() cannot be used on an Immer draft",13:"Immer only supports deleting array indices",14:"Immer only supports setting array indices and the 'length' property",15:function(t){return"Cannot apply patch, path doesn't resolve: "+t},16:'Sets cannot have "replace" patches.',17:function(t){return"Unsupported patch operation: "+t},18:function(t){return"The plugin for '"+t+"' has not been loaded into Immer. To enable the plugin, import and call `enable"+t+"()` when initializing your application."},20:"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available",21:function(t){return"produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '"+t+"'"},22:function(t){return"'current' expects a draft, got: "+t},23:function(t){return"'original' expects a draft, got: "+t},24:"Patching reserved attributes like __proto__, prototype and constructor is not allowed"},rt=""+Object.prototype.constructor,it="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,at=Object.getOwnPropertyDescriptors||function(t){var e={};return it(t).forEach((function(n){e[n]=Object.getOwnPropertyDescriptor(t,n)})),e},ot={},st={get:function(t,e){if(e===et)return t;var n=S(t);if(!y(n,e))return function(t,e,n){var r,i=$(e,n);return i?"value"in i?i.value:null===(r=i.get)||void 0===r?void 0:r.call(t.k):void 0}(t,n,e);var r=n[e];return t.I||!g(r)?r:r===j(t.t,e)?(q(t),t.o[e]=H(t.A.h,r,t)):r},has:function(t,e){return e in S(t)},ownKeys:function(t){return Reflect.ownKeys(S(t))},set:function(t,e,n){var r=$(S(t),e);if(null==r?void 0:r.set)return r.set.call(t.k,n),!0;if(!t.P){var i=j(S(t),e),a=null==i?void 0:i[et];if(a&&a.t===n)return t.o[e]=n,t.D[e]=!1,!0;if(w(n,i)&&(void 0!==n||y(t.t,e)))return!0;q(t),V(t)}return t.o[e]===n&&"number"!=typeof n&&(void 0!==n||e in t.o)||(t.o[e]=n,t.D[e]=!0,!0)},deleteProperty:function(t,e){return void 0!==j(t.t,e)||e in t.t?(t.D[e]=!1,q(t),V(t)):delete t.D[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var n=S(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:r.enumerable,value:n[e]}:r},defineProperty:function(){f(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){f(12)}},lt={};m(st,(function(t,e){lt[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),lt.deleteProperty=function(t,e){return isNaN(parseInt(e))&&f(13),st.deleteProperty.call(this,t[0],e)},lt.set=function(t,e,n){return"length"!==e&&isNaN(parseInt(e))&&f(14),st.set.call(this,t[0],e,n,t[0])};var ut=function(){function t(t){var e=this;this.g=Q,this.F=!0,this.produce=function(t,n,r){if("function"==typeof t&&"function"!=typeof n){var i=n;n=t;var a=e;return function(t){var e=this;void 0===t&&(t=i);for(var r=arguments.length,o=Array(r>1?r-1:0),s=1;s1?r-1:0),a=1;a=0;n--){var r=e[n];if(0===r.path.length&&"replace"===r.op){t=r.value;break}}n>-1&&(e=e.slice(n+1));var i=F("Patches").$;return p(t)?i(t,e):this.produce(t,(function(t){return i(t,e)}))},t}(),ct=new ut,dt=ct.produce;ct.produceWithPatches.bind(ct),ct.setAutoFreeze.bind(ct),ct.setUseProxies.bind(ct),ct.applyPatches.bind(ct);var ht=ct.createDraft.bind(ct),ft=ct.finishDraft.bind(ct);function pt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var gt=new WeakMap,mt=new WeakMap,vt=new WeakMap,yt=new WeakMap,bt=new WeakMap,xt=new WeakMap;function wt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function _t(t){for(var e=1;e{var t={children:[],operations:[],selection:null,marks:null,isInline:()=>!1,isVoid:()=>!1,onChange:()=>{},apply:e=>{for(var n of le.pathRefs(t))ye.transform(n,e);for(var r of le.pointRefs(t))_e.transform(r,e);for(var i of le.rangeRefs(t))Ee.transform(i,e);var a=new Set,o=[],s=t=>{if(t){var e=t.join(",");a.has(e)||(a.add(e),o.push(t))}},l=gt.get(t)||[],u=St(e);for(var c of l){var d=ve.transform(c,e);s(d)}for(var h of u)s(h);gt.set(t,o),Qe.transform(t,e),t.operations.push(e),le.normalize(t),"set_selection"===e.type&&(t.marks=null),mt.get(t)||(mt.set(t,!0),Promise.resolve().then((()=>{mt.set(t,!1),t.onChange(),t.operations=[]})))},addMark:(e,n)=>{var{selection:r}=t;if(r)if(ke.isExpanded(r))Qe.setNodes(t,{[e]:n},{match:Te.isText,split:!0});else{var i=_t(_t({},le.marks(t)||{}),{},{[e]:n});t.marks=i,mt.get(t)||t.onChange()}},deleteBackward:e=>{var{selection:n}=t;n&&ke.isCollapsed(n)&&Qe.delete(t,{unit:e,reverse:!0})},deleteForward:e=>{var{selection:n}=t;n&&ke.isCollapsed(n)&&Qe.delete(t,{unit:e})},deleteFragment:e=>{var{selection:n}=t;n&&ke.isExpanded(n)&&Qe.delete(t,{reverse:"backward"===e})},getFragment:()=>{var{selection:e}=t;return e?fe.fragment(t,e):[]},insertBreak:()=>{Qe.splitNodes(t,{always:!0})},insertFragment:e=>{Qe.insertFragment(t,e)},insertNode:e=>{Qe.insertNodes(t,e)},insertText:e=>{var{selection:n,marks:r}=t;if(n){if(r){var i=_t({text:e},r);Qe.insertNodes(t,i)}else Qe.insertText(t,e);t.marks=null}},normalizeNode:e=>{var[n,r]=e;if(!Te.isText(n))if(ne.isElement(n)&&0===n.children.length){var i={text:""};Qe.insertNodes(t,i,{at:r.concat(0),voids:!0})}else for(var a=!le.isEditor(n)&&(ne.isElement(n)&&(t.isInline(n)||0===n.children.length||Te.isText(n.children[0])||t.isInline(n.children[0]))),o=0,s=0;s{var{selection:n}=t;if(n)if(ke.isExpanded(n))Qe.unsetNodes(t,e,{match:Te.isText,split:!0});else{var r=_t({},le.marks(t)||{});delete r[e],t.marks=r,mt.get(t)||t.onChange()}}};return t},St=t=>{switch(t.type){case"insert_text":case"remove_text":case"set_node":var{path:e}=t;return ve.levels(e);case"insert_node":var{node:n,path:r}=t,i=ve.levels(r),a=Te.isText(n)?[]:Array.from(fe.nodes(n),(t=>{var[,e]=t;return r.concat(e)}));return[...i,...a];case"merge_node":var{path:o}=t,s=ve.ancestors(o),l=ve.previous(o);return[...s,l];case"move_node":var{path:u,newPath:c}=t;if(ve.equals(u,c))return[];var d=[],h=[];for(var f of ve.ancestors(u)){var p=ve.transform(f,t);d.push(p)}for(var g of ve.ancestors(c)){var m=ve.transform(g,t);h.push(m)}var v=h[h.length-1],y=c[c.length-1],b=v.concat(y);return[...d,...h,b];case"remove_node":var{path:x}=t,w=ve.ancestors(x);return[...w];case"split_node":var{path:_}=t,C=ve.levels(_),S=ve.next(_);return[...C,S];default:return[]}};function At(t,e){if(null==t)return{};var n,r,i={},a=Object.keys(t);for(r=0;r=0||(i[n]=t[n]);return i}function kt(t,e){if(null==t)return{};var n,r,i=At(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}var Et,Dt=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!e,r=e?It(t):t,i=Et.None,a=Et.None,o=0,s=null,l=null;for(var u of r){var c=u.codePointAt(0);if(!c)break;var d=Wt(u,c);if([i,a]=n?[a,d]:[d,i],Zt(i,Et.ZWJ)&&Zt(a,Et.ExtPict)&&(s=Qt(n?t.substring(0,o):t.substring(0,t.length-o)),!s))break;if(Zt(i,Et.RI)&&Zt(a,Et.RI)&&(l=null!==l?!l:!!n||te(t.substring(0,t.length-o)),!l))break;if(i!==Et.None&&a!==Et.None&&Yt(i,a))break;o+=u.length}return o||1},Ft=/\s/,Mt=/[\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,Ot=/['\u2018\u2019]/,Bt=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=0,r=!1;while(t.length>0){var i=Dt(t,e),[a,o]=Tt(t,i,e);if(Pt(a,o,e))r=!0,n+=i;else{if(r)break;n+=i}t=o}return n},Tt=(t,e,n)=>{if(n){var r=t.length-e;return[t.slice(r,t.length),t.slice(0,r)]}return[t.slice(0,e),t.slice(e)]},Pt=function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(Ft.test(e))return!1;if(Ot.test(e)){var i=Dt(n,r),[a,o]=Tt(n,i,r);if(t(a,o,r))return!0}return!Mt.test(e)},It=function*(t){for(var e=t.length-1,n=0;nt>=55296&&t<=56319,Rt=t=>t>=56320&&t<=57343;(function(t){t[t["None"]=0]="None",t[t["Extend"]=1]="Extend",t[t["ZWJ"]=2]="ZWJ",t[t["RI"]=4]="RI",t[t["Prepend"]=8]="Prepend",t[t["SpacingMark"]=16]="SpacingMark",t[t["L"]=32]="L",t[t["V"]=64]="V",t[t["T"]=128]="T",t[t["LV"]=256]="LV",t[t["LVT"]=512]="LVT",t[t["ExtPict"]=1024]="ExtPict",t[t["Any"]=2048]="Any"})(Et||(Et={}));var Nt=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AC0\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,zt=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,jt=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,$t=/^[\u1100-\u115F\uA960-\uA97C]$/,Vt=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,qt=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,Ht=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,Ut=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,Gt=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,Wt=(t,e)=>{var n=Et.Any;return-1!==t.search(Nt)&&(n|=Et.Extend),8205===e&&(n|=Et.ZWJ),e>=127462&&e<=127487&&(n|=Et.RI),-1!==t.search(zt)&&(n|=Et.Prepend),-1!==t.search(jt)&&(n|=Et.SpacingMark),-1!==t.search($t)&&(n|=Et.L),-1!==t.search(Vt)&&(n|=Et.V),-1!==t.search(qt)&&(n|=Et.T),-1!==t.search(Ht)&&(n|=Et.LV),-1!==t.search(Ut)&&(n|=Et.LVT),-1!==t.search(Gt)&&(n|=Et.ExtPict),n};function Zt(t,e){return 0!==(t&e)}var Xt=[[Et.L,Et.L|Et.V|Et.LV|Et.LVT],[Et.LV|Et.V,Et.V|Et.T],[Et.LVT|Et.T,Et.T],[Et.Any,Et.Extend|Et.ZWJ],[Et.Any,Et.SpacingMark],[Et.Prepend,Et.Any],[Et.ZWJ,Et.ExtPict],[Et.RI,Et.RI]];function Yt(t,e){return-1===Xt.findIndex((n=>Zt(t,n[0])&&Zt(e,n[1])))}var Kt=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AC0\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,Qt=t=>-1!==t.search(Kt),Jt=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,te=t=>{var e=t.match(Jt);if(null===e)return!1;var n=e[0].length/2;return n%2===1},ee=t=>h(t)&&fe.isNodeList(t.children)&&!le.isEditor(t),ne={isAncestor(t){return h(t)&&fe.isNodeList(t.children)},isElement:ee,isElementList(t){return Array.isArray(t)&&t.every((t=>ne.isElement(t)))},isElementProps(t){return void 0!==t.children},isElementType:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"type";return ee(t)&&t[n]===e},matches(t,e){for(var n in e)if("children"!==n&&t[n]!==e[n])return!1;return!0}},re=["text"],ie=["text"];function ae(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function oe(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{},{voids:n=!1,mode:r="lowest",at:i=t.selection,match:a}=e;if(i){var o=le.path(t,i),s="lowest"===r;for(var[l,u]of le.levels(t,{at:o,voids:n,match:a,reverse:s}))if(!Te.isText(l)&&!ve.equals(o,u))return[l,u]}},addMark(t,e,n){t.addMark(e,n)},after(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=le.point(t,e,{edge:"end"}),a=le.end(t,[]),o={anchor:i,focus:a},{distance:s=1}=r,l=0;for(var u of le.positions(t,oe(oe({},r),{},{at:o}))){if(l>s)break;0!==l&&(n=u),l++}return n},before(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=le.start(t,[]),a=le.point(t,e,{edge:"start"}),o={anchor:i,focus:a},{distance:s=1}=r,l=0;for(var u of le.positions(t,oe(oe({},r),{},{at:o,reverse:!0}))){if(l>s)break;0!==l&&(n=u),l++}return n},deleteBackward(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{unit:n="character"}=e;t.deleteBackward(n)},deleteForward(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{unit:n="character"}=e;t.deleteForward(n)},deleteFragment(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{direction:n="forward"}=e;t.deleteFragment(n)},edges(t,e){return[le.start(t,e),le.end(t,e)]},end(t,e){return le.point(t,e,{edge:"end"})},first(t,e){var n=le.path(t,e,{edge:"start"});return le.node(t,n)},fragment(t,e){var n=le.range(t,e),r=fe.fragment(t,n);return r},hasBlocks(t,e){return e.children.some((e=>le.isBlock(t,e)))},hasInlines(t,e){return e.children.some((e=>Te.isText(e)||le.isInline(t,e)))},hasTexts(t,e){return e.children.every((t=>Te.isText(t)))},insertBreak(t){t.insertBreak()},insertFragment(t,e){t.insertFragment(e)},insertNode(t,e){t.insertNode(e)},insertText(t,e){t.insertText(e)},isBlock(t,e){return ne.isElement(e)&&!t.isInline(e)},isEditor(t){if(!h(t))return!1;var e=se.get(t);if(void 0!==e)return e;var n="function"===typeof t.addMark&&"function"===typeof t.apply&&"function"===typeof t.deleteBackward&&"function"===typeof t.deleteForward&&"function"===typeof t.deleteFragment&&"function"===typeof t.insertBreak&&"function"===typeof t.insertFragment&&"function"===typeof t.insertNode&&"function"===typeof t.insertText&&"function"===typeof t.isInline&&"function"===typeof t.isVoid&&"function"===typeof t.normalizeNode&&"function"===typeof t.onChange&&"function"===typeof t.removeMark&&(null===t.marks||h(t.marks))&&(null===t.selection||ke.isRange(t.selection))&&fe.isNodeList(t.children)&&me.isOperationList(t.operations);return se.set(t,n),n},isEnd(t,e,n){var r=le.end(t,n);return we.equals(e,r)},isEdge(t,e,n){return le.isStart(t,e,n)||le.isEnd(t,e,n)},isEmpty(t,e){var{children:n}=e,[r]=n;return 0===n.length||1===n.length&&Te.isText(r)&&""===r.text&&!t.isVoid(e)},isInline(t,e){return ne.isElement(e)&&t.isInline(e)},isNormalizing(t){var e=vt.get(t);return void 0===e||e},isStart(t,e,n){if(0!==e.offset)return!1;var r=le.start(t,n);return we.equals(e,r)},isVoid(t,e){return ne.isElement(e)&&t.isVoid(e)},last(t,e){var n=le.path(t,e,{edge:"end"});return le.node(t,n)},leaf(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=le.path(t,e,n),i=fe.leaf(t,r);return[i,r]},*levels(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{at:n=t.selection,reverse:r=!1,voids:i=!1}=e,{match:a}=e;if(null==a&&(a=()=>!0),n){var o=[],s=le.path(t,n);for(var[l,u]of fe.levels(t,s))if(a(l,u)&&(o.push([l,u]),!i&&le.isVoid(t,l)))break;r&&o.reverse(),yield*o}},marks(t){var{marks:e,selection:n}=t;if(!n)return null;if(e)return e;if(ke.isExpanded(n)){var[r]=le.nodes(t,{match:Te.isText});if(r){var[i]=r,a=kt(i,re);return a}return{}}var{anchor:o}=n,{path:s}=o,[l]=le.leaf(t,s);if(0===o.offset){var u=le.previous(t,{at:s,match:Te.isText}),c=le.above(t,{match:e=>le.isBlock(t,e)});if(u&&c){var[d,h]=u,[,f]=c;ve.isAncestor(f,h)&&(l=d)}}var p=kt(l,ie);return p},next(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{mode:n="lowest",voids:r=!1}=e,{match:i,at:a=t.selection}=e;if(a){var o=le.after(t,a,{voids:r});if(o){var[,s]=le.last(t,[]),l=[o.path,s];if(ve.isPath(a)&&0===a.length)throw new Error("Cannot get the next node from the root node!");if(null==i)if(ve.isPath(a)){var[u]=le.parent(t,a);i=t=>u.children.includes(t)}else i=()=>!0;var[c]=le.nodes(t,{at:l,match:i,mode:n,voids:r});return c}}},node(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=le.path(t,e,n),i=fe.get(t,r);return[i,r]},*nodes(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{at:n=t.selection,mode:r="all",universal:i=!1,reverse:a=!1,voids:o=!1}=e,{match:s}=e;if(s||(s=()=>!0),n){var l,u;if(ue.isSpan(n))l=n[0],u=n[1];else{var c=le.path(t,n,{edge:"start"}),d=le.path(t,n,{edge:"end"});l=a?d:c,u=a?c:d}var h,f=fe.nodes(t,{reverse:a,from:l,to:u,pass:e=>{var[n]=e;return!o&&le.isVoid(t,n)}}),p=[];for(var[g,m]of f){var v=h&&0===ve.compare(m,h[1]);if("highest"!==r||!v)if(s(g,m))if("lowest"===r&&v)h=[g,m];else{var y="lowest"===r?h:[g,m];y&&(i?p.push(y):yield y),h=[g,m]}else if(i&&!v&&Te.isText(g))return}"lowest"===r&&h&&(i?p.push(h):yield h),i&&(yield*p)}},normalize(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{force:n=!1}=e,r=t=>gt.get(t)||[];if(le.isNormalizing(t)){if(n){var i=Array.from(fe.nodes(t),(t=>{var[,e]=t;return e}));gt.set(t,i)}0!==r(t).length&&le.withoutNormalizing(t,(()=>{for(var e of r(t))if(fe.has(t,e)){var n=le.node(t,e),[i,a]=n;ne.isElement(i)&&0===i.children.length&&t.normalizeNode(n)}var o=42*r(t).length,s=0;while(0!==r(t).length){if(s>o)throw new Error("\n Could not completely normalize the editor after ".concat(o," iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state.\n "));var l=r(t).pop();if(fe.has(t,l)){var u=le.node(t,l);t.normalizeNode(u)}s++}}))}},parent(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=le.path(t,e,n),i=ve.parent(r),a=le.node(t,i);return a},path(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{depth:r,edge:i}=n;if(ve.isPath(e))if("start"===i){var[,a]=fe.first(t,e);e=a}else if("end"===i){var[,o]=fe.last(t,e);e=o}return ke.isRange(e)&&(e="start"===i?ke.start(e):"end"===i?ke.end(e):ve.common(e.anchor.path,e.focus.path)),we.isPoint(e)&&(e=e.path),null!=r&&(e=e.slice(0,r)),e},hasPath(t,e){return fe.has(t,e)},pathRef(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{affinity:r="forward"}=n,i={current:e,affinity:r,unref(){var{current:e}=i,n=le.pathRefs(t);return n.delete(i),i.current=null,e}},a=le.pathRefs(t);return a.add(i),i},pathRefs(t){var e=yt.get(t);return e||(e=new Set,yt.set(t,e)),e},point(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{edge:r="start"}=n;if(ve.isPath(e)){var i;if("end"===r){var[,a]=fe.last(t,e);i=a}else{var[,o]=fe.first(t,e);i=o}var s=fe.get(t,i);if(!Te.isText(s))throw new Error("Cannot get the ".concat(r," point in the node at path [").concat(e,"] because it has no ").concat(r," text node."));return{path:i,offset:"end"===r?s.text.length:0}}if(ke.isRange(e)){var[l,u]=ke.edges(e);return"start"===r?l:u}return e},pointRef(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{affinity:r="forward"}=n,i={current:e,affinity:r,unref(){var{current:e}=i,n=le.pointRefs(t);return n.delete(i),i.current=null,e}},a=le.pointRefs(t);return a.add(i),i},pointRefs(t){var e=bt.get(t);return e||(e=new Set,bt.set(t,e)),e},*positions(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{at:n=t.selection,unit:r="offset",reverse:i=!1,voids:a=!1}=e;if(n){var o=le.range(t,n),[s,l]=ke.edges(o),u=i?l:s,c=!1,d="",h=0,f=0,p=0;for(var[g,m]of le.nodes(t,{at:n,reverse:i,voids:a})){if(ne.isElement(g)){if(!a&&t.isVoid(g)){yield le.start(t,m);continue}if(t.isInline(g))continue;if(le.hasInlines(t,g)){var v=ve.isAncestor(m,l.path)?l:le.end(t,m),y=ve.isAncestor(m,s.path)?s:le.start(t,m);d=le.string(t,{anchor:y,focus:v},{voids:a}),c=!0}}if(Te.isText(g)){var b=ve.equals(m,u.path);b?(f=i?u.offset:g.text.length-u.offset,p=u.offset):(f=g.text.length,p=i?f:0),(b||c||"offset"===r)&&(yield{path:m,offset:p},c=!1);while(1){if(0===h){if(""===d)break;h=x(d,r,i),d=Tt(d,h,i)[1]}if(p=i?p-h:p+h,f-=h,f<0){h=-f;break}h=0,yield{path:m,offset:p}}}}}function x(t,e,n){return"character"===e?Dt(t,n):"word"===e?Bt(t,n):"line"===e||"block"===e?t.length:1}},previous(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{mode:n="lowest",voids:r=!1}=e,{match:i,at:a=t.selection}=e;if(a){var o=le.before(t,a,{voids:r});if(o){var[,s]=le.first(t,[]),l=[o.path,s];if(ve.isPath(a)&&0===a.length)throw new Error("Cannot get the previous node from the root node!");if(null==i)if(ve.isPath(a)){var[u]=le.parent(t,a);i=t=>u.children.includes(t)}else i=()=>!0;var[c]=le.nodes(t,{reverse:!0,at:l,match:i,mode:n,voids:r});return c}}},range(t,e,n){if(ke.isRange(e)&&!n)return e;var r=le.start(t,e),i=le.end(t,n||e);return{anchor:r,focus:i}},rangeRef(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{affinity:r="forward"}=n,i={current:e,affinity:r,unref(){var{current:e}=i,n=le.rangeRefs(t);return n.delete(i),i.current=null,e}},a=le.rangeRefs(t);return a.add(i),i},rangeRefs(t){var e=xt.get(t);return e||(e=new Set,xt.set(t,e)),e},removeMark(t,e){t.removeMark(e)},setNormalizing(t,e){vt.set(t,e)},start(t,e){return le.point(t,e,{edge:"start"})},string(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{voids:r=!1}=n,i=le.range(t,e),[a,o]=ke.edges(i),s="";for(var[l,u]of le.nodes(t,{at:i,match:Te.isText,voids:r})){var c=l.text;ve.equals(u,o.path)&&(c=c.slice(0,o.offset)),ve.equals(u,a.path)&&(c=c.slice(a.offset)),s+=c}return s},unhangRange(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{voids:r=!1}=n,[i,a]=ke.edges(e);if(0!==i.offset||0!==a.offset||ke.isCollapsed(e))return e;var o=le.above(t,{at:a,match:e=>le.isBlock(t,e)}),s=o?o[1]:[],l=le.start(t,[]),u={anchor:l,focus:a},c=!0;for(var[d,h]of le.nodes(t,{at:u,match:Te.isText,reverse:!0,voids:r}))if(c)c=!1;else if(""!==d.text||ve.isBefore(h,s)){a={path:h,offset:d.text.length};break}return{anchor:i,focus:a}},void(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return le.above(t,oe(oe({},e),{},{match:e=>le.isVoid(t,e)}))},withoutNormalizing(t,e){var n=le.isNormalizing(t);le.setNormalizing(t,!1);try{e()}finally{le.setNormalizing(t,n)}le.normalize(t)}},ue={isSpan(t){return Array.isArray(t)&&2===t.length&&t.every(ve.isPath)}},ce=["children"],de=["text"],he=new WeakMap,fe={ancestor(t,e){var n=fe.get(t,e);if(Te.isText(n))throw new Error("Cannot get the ancestor node at path [".concat(e,"] because it refers to a text node instead: ").concat(n));return n},*ancestors(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};for(var r of ve.ancestors(e,n)){var i=fe.ancestor(t,r),a=[i,r];yield a}},child(t,e){if(Te.isText(t))throw new Error("Cannot get the child of a text node: ".concat(JSON.stringify(t)));var n=t.children[e];if(null==n)throw new Error("Cannot get child at index `".concat(e,"` in node: ").concat(JSON.stringify(t)));return n},*children(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{reverse:r=!1}=n,i=fe.ancestor(t,e),{children:a}=i,o=r?a.length-1:0;while(r?o>=0:o1&&void 0!==arguments[1]?arguments[1]:{};for(var[n,r]of fe.nodes(t,e))0!==r.length&&(yield[n,r])},*elements(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var[n,r]of fe.nodes(t,e))ne.isElement(n)&&(yield[n,r])},extractProps(t){if(ne.isAncestor(t)){var e=kt(t,ce);return e}e=kt(t,de);return e},first(t,e){var n=e.slice(),r=fe.get(t,n);while(r){if(Te.isText(r)||0===r.children.length)break;r=r.children[0],n.push(0)}return[r,n]},fragment(t,e){if(Te.isText(t))throw new Error("Cannot get a fragment starting from a root text node: ".concat(JSON.stringify(t)));var n=dt({children:t.children},(t=>{var[n,r]=ke.edges(e),i=fe.nodes(t,{reverse:!0,pass:t=>{var[,n]=t;return!ke.includes(e,n)}});for(var[,a]of i){if(!ke.includes(e,a)){var o=fe.parent(t,a),s=a[a.length-1];o.children.splice(s,1)}if(ve.equals(a,r.path)){var l=fe.leaf(t,a);l.text=l.text.slice(0,r.offset)}if(ve.equals(a,n.path)){var u=fe.leaf(t,a);u.text=u.text.slice(n.offset)}}le.isEditor(t)&&(t.selection=null)}));return n.children},get(t,e){for(var n=t,r=0;rfe.isNode(t)));return he.set(t,n),n},last(t,e){var n=e.slice(),r=fe.get(t,n);while(r){if(Te.isText(r)||0===r.children.length)break;var i=r.children.length-1;r=r.children[i],n.push(i)}return[r,n]},leaf(t,e){var n=fe.get(t,e);if(!Te.isText(n))throw new Error("Cannot get the leaf node at path [".concat(e,"] because it refers to a non-leaf node: ").concat(n));return n},*levels(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};for(var r of ve.levels(e,n)){var i=fe.get(t,r);yield[i,r]}},matches(t,e){return ne.isElement(t)&&ne.isElementProps(e)&&ne.matches(t,e)||Te.isText(t)&&Te.isTextProps(e)&&Te.matches(t,e)},*nodes(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{pass:n,reverse:r=!1}=e,{from:i=[],to:a}=e,o=new Set,s=[],l=t;while(1){if(a&&(r?ve.isBefore(s,a):ve.isAfter(s,a)))break;if(o.has(l)||(yield[l,s]),o.has(l)||Te.isText(l)||0===l.children.length||null!=n&&!1!==n([l,s])){if(0===s.length)break;if(!r){var u=ve.next(s);if(fe.has(t,u)){s=u,l=fe.get(t,s);continue}}if(r&&0!==s[s.length-1]){var c=ve.previous(s);s=c,l=fe.get(t,s)}else s=ve.parent(s),l=fe.get(t,s),o.add(l)}else{o.add(l);var d=r?l.children.length-1:0;ve.isAncestor(s,i)&&(d=i[s.length]),s=s.concat(d),l=fe.get(t,s)}}},parent(t,e){var n=ve.parent(e),r=fe.get(t,n);if(Te.isText(r))throw new Error("Cannot get the parent of path [".concat(e,"] because it does not exist in the root."));return r},string(t){return Te.isText(t)?t.text:t.children.map(fe.string).join("")},*texts(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var[n,r]of fe.nodes(t,e))Te.isText(n)&&(yield[n,r])}};function pe(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ge(t){for(var e=1;eme.isOperation(t)))},isSelectionOperation(t){return me.isOperation(t)&&t.type.endsWith("_selection")},isTextOperation(t){return me.isOperation(t)&&t.type.endsWith("_text")},inverse(t){switch(t.type){case"insert_node":return ge(ge({},t),{},{type:"remove_node"});case"insert_text":return ge(ge({},t),{},{type:"remove_text"});case"merge_node":return ge(ge({},t),{},{type:"split_node",path:ve.previous(t.path)});case"move_node":var{newPath:e,path:n}=t;if(ve.equals(e,n))return t;if(ve.isSibling(n,e))return ge(ge({},t),{},{path:e,newPath:n});var r=ve.transform(n,t),i=ve.transform(ve.next(n),t);return ge(ge({},t),{},{path:r,newPath:i});case"remove_node":return ge(ge({},t),{},{type:"insert_node"});case"remove_text":return ge(ge({},t),{},{type:"insert_text"});case"set_node":var{properties:a,newProperties:o}=t;return ge(ge({},t),{},{properties:o,newProperties:a});case"set_selection":var{properties:s,newProperties:l}=t;return ge(ge({},t),{},null==s?{properties:l,newProperties:null}:null==l?{properties:null,newProperties:s}:{properties:l,newProperties:s});case"split_node":return ge(ge({},t),{},{type:"merge_node",path:ve.next(t.path)})}}},ve={ancestors(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reverse:n=!1}=e,r=ve.levels(t,e);return r=n?r.slice(1):r.slice(0,-1),r},common(t,e){for(var n=[],r=0;re[r])return 1}return 0},endsAfter(t,e){var n=t.length-1,r=t.slice(0,n),i=e.slice(0,n),a=t[n],o=e[n];return ve.equals(r,i)&&a>o},endsAt(t,e){var n=t.length,r=t.slice(0,n),i=e.slice(0,n);return ve.equals(r,i)},endsBefore(t,e){var n=t.length-1,r=t.slice(0,n),i=e.slice(0,n),a=t[n],o=e[n];return ve.equals(r,i)&&at===e[n]))},hasPrevious(t){return t[t.length-1]>0},isAfter(t,e){return 1===ve.compare(t,e)},isAncestor(t,e){return t.lengthe.length&&0===ve.compare(t,e)},isParent(t,e){return t.length+1===e.length&&0===ve.compare(t,e)},isPath(t){return Array.isArray(t)&&(0===t.length||"number"===typeof t[0])},isSibling(t,e){if(t.length!==e.length)return!1;var n=t.slice(0,-1),r=e.slice(0,-1),i=t[t.length-1],a=e[e.length-1];return i!==a&&ve.equals(n,r)},levels(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reverse:n=!1}=e,r=[],i=0;i<=t.length;i++)r.push(t.slice(0,i));return n&&r.reverse(),r},next(t){if(0===t.length)throw new Error("Cannot get the next path of a root path [".concat(t,"], because it has no next index."));var e=t[t.length-1];return t.slice(0,-1).concat(e+1)},parent(t){if(0===t.length)throw new Error("Cannot get the parent path of the root path [".concat(t,"]."));return t.slice(0,-1)},previous(t){if(0===t.length)throw new Error("Cannot get the previous path of a root path [".concat(t,"], because it has no previous index."));var e=t[t.length-1];if(e<=0)throw new Error("Cannot get the previous path of a first child path [".concat(t,"] because it would result in a negative index."));return t.slice(0,-1).concat(e-1)},relative(t,e){if(!ve.isAncestor(e,t)&&!ve.equals(t,e))throw new Error("Cannot get the relative path of [".concat(t,"] inside ancestor [").concat(e,"], because it is not above or equal to the path."));return t.slice(e.length)},transform(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return dt(t,(r=>{var{affinity:i="forward"}=n;if(t&&0!==(null===t||void 0===t?void 0:t.length)){if(null===r)return null;switch(e.type){case"insert_node":var{path:a}=e;(ve.equals(a,r)||ve.endsBefore(a,r)||ve.isAncestor(a,r))&&(r[a.length-1]+=1);break;case"remove_node":var{path:o}=e;if(ve.equals(o,r)||ve.isAncestor(o,r))return null;ve.endsBefore(o,r)&&(r[o.length-1]-=1);break;case"merge_node":var{path:s,position:l}=e;ve.equals(s,r)||ve.endsBefore(s,r)?r[s.length-1]-=1:ve.isAncestor(s,r)&&(r[s.length-1]-=1,r[s.length]+=l);break;case"split_node":var{path:u,position:c}=e;if(ve.equals(u,r)){if("forward"===i)r[r.length-1]+=1;else if("backward"!==i)return null}else ve.endsBefore(u,r)?r[u.length-1]+=1:ve.isAncestor(u,r)&&t[u.length]>=c&&(r[u.length-1]+=1,r[u.length]-=c);break;case"move_node":var{path:d,newPath:h}=e;if(ve.equals(d,h))return;if(ve.isAncestor(d,r)||ve.equals(d,r)){var f=h.slice();return ve.endsBefore(d,h)&&d.lengthe.offset?1:0:n},isAfter(t,e){return 1===we.compare(t,e)},isBefore(t,e){return-1===we.compare(t,e)},equals(t,e){return t.offset===e.offset&&ve.equals(t.path,e.path)},isPoint(t){return h(t)&&"number"===typeof t.offset&&ve.isPath(t.path)},transform(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return dt(t,(t=>{if(null===t)return null;var{affinity:r="forward"}=n,{path:i,offset:a}=t;switch(e.type){case"insert_node":case"move_node":t.path=ve.transform(i,e,n);break;case"insert_text":ve.equals(e.path,i)&&e.offset<=a&&(t.offset+=e.text.length);break;case"merge_node":ve.equals(e.path,i)&&(t.offset+=e.position),t.path=ve.transform(i,e,n);break;case"remove_text":ve.equals(e.path,i)&&e.offset<=a&&(t.offset-=Math.min(a-e.offset,e.text.length));break;case"remove_node":if(ve.equals(e.path,i)||ve.isAncestor(e.path,i))return null;t.path=ve.transform(i,e,n);break;case"split_node":if(ve.equals(e.path,i)){if(e.position===a&&null==r)return null;(e.position1&&void 0!==arguments[1]?arguments[1]:{},{reverse:n=!1}=e,{anchor:r,focus:i}=t;return ke.isBackward(t)===n?[r,i]:[i,r]},end(t){var[,e]=ke.edges(t);return e},equals(t,e){return we.equals(t.anchor,e.anchor)&&we.equals(t.focus,e.focus)},includes(t,e){if(ke.isRange(e)){if(ke.includes(t,e.anchor)||ke.includes(t,e.focus))return!0;var[n,r]=ke.edges(t),[i,a]=ke.edges(e);return we.isBefore(n,i)&&we.isAfter(r,a)}var[o,s]=ke.edges(t),l=!1,u=!1;return we.isPoint(e)?(l=we.compare(e,o)>=0,u=we.compare(e,s)<=0):(l=ve.compare(e,o.path)>=0,u=ve.compare(e,s.path)<=0),l&&u},intersection(t,e){var n=kt(t,Ce),[r,i]=ke.edges(t),[a,o]=ke.edges(e),s=we.isBefore(r,a)?a:r,l=we.isBefore(i,o)?i:o;return we.isBefore(l,s)?null:Ae({anchor:s,focus:l},n)},isBackward(t){var{anchor:e,focus:n}=t;return we.isAfter(e,n)},isCollapsed(t){var{anchor:e,focus:n}=t;return we.equals(e,n)},isExpanded(t){return!ke.isCollapsed(t)},isForward(t){return!ke.isBackward(t)},isRange(t){return h(t)&&we.isPoint(t.anchor)&&we.isPoint(t.focus)},*points(t){yield[t.anchor,"anchor"],yield[t.focus,"focus"]},start(t){var[e]=ke.edges(t);return e},transform(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return dt(t,(t=>{if(null===t)return null;var r,i,{affinity:a="inward"}=n;if("inward"===a){var o=ke.isCollapsed(t);ke.isForward(t)?(r="forward",i=o?r:"backward"):(r="backward",i=o?r:"forward")}else"outward"===a?ke.isForward(t)?(r="backward",i="forward"):(r="forward",i="backward"):(r=a,i=a);var s=we.transform(t.anchor,e,{affinity:r}),l=we.transform(t.focus,e,{affinity:i});if(!s||!l)return null;t.anchor=s,t.focus=l}))}},Ee={transform(t,e){var{current:n,affinity:r}=t;if(null!=n){var i=ke.transform(n,e,{affinity:r});t.current=i,null==i&&t.unref()}}},De=(t,e)=>{for(var n in t){var r=t[n],i=e[n];if(h(r)&&h(i)){if(!De(r,i))return!1}else if(Array.isArray(r)&&Array.isArray(i)){if(r.length!==i.length)return!1;for(var a=0;a2&&void 0!==arguments[2]?arguments[2]:{},{loose:r=!1}=n;function i(t){var e=kt(t,Fe);return e}return De(r?i(t):t,r?i(e):e)},isText(t){return h(t)&&"string"===typeof t.text},isTextList(t){return Array.isArray(t)&&t.every((t=>Te.isText(t)))},isTextProps(t){return void 0!==t.text},matches(t,e){for(var n in e)if("text"!==n&&(!t.hasOwnProperty(n)||t[n]!==e[n]))return!1;return!0},decorations(t,e){var n=[Be({},t)];for(var r of e){var i=kt(r,Me),[a,o]=ke.edges(r),s=[],l=0;for(var u of n){var{length:c}=u.text,d=l;if(l+=c,a.offset<=d&&o.offset>=l)Object.assign(u,i),s.push(u);else if(a.offset!==o.offset&&(a.offset===l||o.offset===d)||a.offset>l||o.offsetd){var m=a.offset-d;f=Be(Be({},h),{},{text:h.text.slice(0,m)}),h=Be(Be({},h),{},{text:h.text.slice(m)})}Object.assign(h,i),f&&s.push(f),s.push(h),p&&s.push(p)}}n=s}return n}};function Pe(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ie(t){for(var e=1;e{switch(n.type){case"insert_node":var{path:r,node:i}=n,a=fe.parent(t,r),o=r[r.length-1];if(o>a.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(r,"] because the destination is past the end of the node."));if(a.children.splice(o,0,i),e)for(var[s,l]of ke.points(e))e[l]=we.transform(s,n);break;case"insert_text":var{path:u,offset:c,text:d}=n;if(0===d.length)break;var h=fe.leaf(t,u),f=h.text.slice(0,c),p=h.text.slice(c);if(h.text=f+d+p,e)for(var[g,m]of ke.points(e))e[m]=we.transform(g,n);break;case"merge_node":var{path:v}=n,y=fe.get(t,v),b=ve.previous(v),x=fe.get(t,b),w=fe.parent(t,v),_=v[v.length-1];if(Te.isText(y)&&Te.isText(x))x.text+=y.text;else{if(Te.isText(y)||Te.isText(x))throw new Error('Cannot apply a "merge_node" operation at path ['.concat(v,"] to nodes of different interfaces: ").concat(y," ").concat(x));x.children.push(...y.children)}if(w.children.splice(_,1),e)for(var[C,S]of ke.points(e))e[S]=we.transform(C,n);break;case"move_node":var{path:A,newPath:k}=n;if(ve.isAncestor(A,k))throw new Error("Cannot move a path [".concat(A,"] to new path [").concat(k,"] because the destination is inside itself."));var E=fe.get(t,A),D=fe.parent(t,A),F=A[A.length-1];D.children.splice(F,1);var M=ve.transform(A,n),O=fe.get(t,ve.parent(M)),B=M[M.length-1];if(O.children.splice(B,0,E),e)for(var[T,P]of ke.points(e))e[P]=we.transform(T,n);break;case"remove_node":var{path:I}=n,L=I[I.length-1],R=fe.parent(t,I);if(R.children.splice(L,1),e)for(var[N,z]of ke.points(e)){var j=we.transform(N,n);if(null!=e&&null!=j)e[z]=j;else{var $=void 0,V=void 0;for(var[q,H]of fe.texts(t)){if(-1!==ve.compare(H,I)){V=[q,H];break}$=[q,H]}var U=!1;$&&V&&(U=ve.equals(V[1],I)?!ve.hasPrevious(V[1]):ve.common($[1],I).length2&&void 0!==arguments[2]?arguments[2]:{};le.withoutNormalizing(t,(()=>{var{hanging:r=!1,voids:i=!1,mode:a="lowest"}=n,{at:o,match:s,select:l}=n;if(fe.isNode(e)&&(e=[e]),0!==e.length){var[u]=e;if(o||(o=t.selection?t.selection:t.children.length>0?le.end(t,[]):[0],l=!0),null==l&&(l=!1),ke.isRange(o))if(r||(o=le.unhangRange(t,o)),ke.isCollapsed(o))o=o.anchor;else{var[,c]=ke.edges(o),d=le.pointRef(t,c);Qe.delete(t,{at:o}),o=d.unref()}if(we.isPoint(o)){null==s&&(s=Te.isText(u)?t=>Te.isText(t):t.isInline(u)?e=>Te.isText(e)||le.isInline(t,e):e=>le.isBlock(t,e));var[h]=le.nodes(t,{at:o.path,match:s,mode:a,voids:i});if(!h)return;var[,f]=h,p=le.pathRef(t,f),g=le.isEnd(t,o,f);Qe.splitNodes(t,{at:o,match:s,mode:a,voids:i});var m=p.unref();o=g?ve.next(m):m}var v=ve.parent(o),y=o[o.length-1];if(i||!le.void(t,{at:v})){for(var b of e){var x=v.concat(y);y++,t.apply({type:"insert_node",path:x,node:b}),o=ve.next(o)}if(o=ve.previous(o),l){var w=le.end(t,o);w&&Qe.select(t,w)}}}}))},liftNodes(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};le.withoutNormalizing(t,(()=>{var{at:n=t.selection,mode:r="lowest",voids:i=!1}=e,{match:a}=e;if(null==a&&(a=ve.isPath(n)?Ue(t,n):e=>le.isBlock(t,e)),n){var o=le.nodes(t,{at:n,match:a,mode:r,voids:i}),s=Array.from(o,(e=>{var[,n]=e;return le.pathRef(t,n)}));for(var l of s){var u=l.unref();if(u.length<2)throw new Error("Cannot lift node at a path [".concat(u,"] because it has a depth of less than `2`."));var c=le.node(t,ve.parent(u)),[d,h]=c,f=u[u.length-1],{length:p}=d.children;if(1===p){var g=ve.next(h);Qe.moveNodes(t,{at:u,to:g,voids:i}),Qe.removeNodes(t,{at:h,voids:i})}else if(0===f)Qe.moveNodes(t,{at:u,to:h,voids:i});else if(f===p-1){var m=ve.next(h);Qe.moveNodes(t,{at:u,to:m,voids:i})}else{var v=ve.next(u),y=ve.next(h);Qe.splitNodes(t,{at:v,voids:i}),Qe.moveNodes(t,{at:u,to:y,voids:i})}}}}))},mergeNodes(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};le.withoutNormalizing(t,(()=>{var{match:n,at:r=t.selection}=e,{hanging:i=!1,voids:a=!1,mode:o="lowest"}=e;if(r){if(null==n)if(ve.isPath(r)){var[s]=le.parent(t,r);n=t=>s.children.includes(t)}else n=e=>le.isBlock(t,e);if(!i&&ke.isRange(r)&&(r=le.unhangRange(t,r)),ke.isRange(r))if(ke.isCollapsed(r))r=r.anchor;else{var[,l]=ke.edges(r),u=le.pointRef(t,l);Qe.delete(t,{at:r}),r=u.unref(),null==e.at&&Qe.select(t,r)}var[c]=le.nodes(t,{at:r,match:n,voids:a,mode:o}),d=le.previous(t,{at:r,match:n,voids:a,mode:o});if(c&&d){var[h,f]=c,[p,g]=d;if(0!==f.length&&0!==g.length){var m,v,y=ve.next(g),b=ve.common(f,g),x=ve.isSibling(f,g),w=Array.from(le.levels(t,{at:f}),(t=>{var[e]=t;return e})).slice(b.length).slice(0,-1),_=le.above(t,{at:f,mode:"highest",match:e=>w.includes(e)&&qe(t,e)}),C=_&&le.pathRef(t,_[1]);if(Te.isText(h)&&Te.isText(p)){var S=kt(h,Ne);v=p.text.length,m=S}else{if(!ne.isElement(h)||!ne.isElement(p))throw new Error("Cannot merge the node at path [".concat(f,"] with the previous sibling because it is not the same kind: ").concat(JSON.stringify(h)," ").concat(JSON.stringify(p)));S=kt(h,ze);v=p.children.length,m=S}x||Qe.moveNodes(t,{at:f,to:y,voids:a}),C&&Qe.removeNodes(t,{at:C.current,voids:a}),ne.isElement(p)&&le.isEmpty(t,p)||Te.isText(p)&&""===p.text&&0!==g[g.length-1]?Qe.removeNodes(t,{at:g,voids:a}):t.apply({type:"merge_node",path:y,position:v,properties:m}),C&&C.unref()}}}}))},moveNodes(t,e){le.withoutNormalizing(t,(()=>{var{to:n,at:r=t.selection,mode:i="lowest",voids:a=!1}=e,{match:o}=e;if(r){null==o&&(o=ve.isPath(r)?Ue(t,r):e=>le.isBlock(t,e));var s=le.pathRef(t,n),l=le.nodes(t,{at:r,match:o,mode:i,voids:a}),u=Array.from(l,(e=>{var[,n]=e;return le.pathRef(t,n)}));for(var c of u){var d=c.unref(),h=s.current;0!==d.length&&t.apply({type:"move_node",path:d,newPath:h}),s.current&&ve.isSibling(h,d)&&ve.isAfter(h,d)&&(s.current=ve.next(s.current))}s.unref()}}))},removeNodes(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};le.withoutNormalizing(t,(()=>{var{hanging:n=!1,voids:r=!1,mode:i="lowest"}=e,{at:a=t.selection,match:o}=e;if(a){null==o&&(o=ve.isPath(a)?Ue(t,a):e=>le.isBlock(t,e)),!n&&ke.isRange(a)&&(a=le.unhangRange(t,a));var s=le.nodes(t,{at:a,match:o,mode:i,voids:r}),l=Array.from(s,(e=>{var[,n]=e;return le.pathRef(t,n)}));for(var u of l){var c=u.unref();if(c){var[d]=le.node(t,c);t.apply({type:"remove_node",path:c,node:d})}}}}))},setNodes(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};le.withoutNormalizing(t,(()=>{var{match:r,at:i=t.selection}=n,{hanging:a=!1,mode:o="lowest",split:s=!1,voids:l=!1}=n;if(i){if(null==r&&(r=ve.isPath(i)?Ue(t,i):e=>le.isBlock(t,e)),!a&&ke.isRange(i)&&(i=le.unhangRange(t,i)),s&&ke.isRange(i)){if(ke.isCollapsed(i)&&le.leaf(t,i.anchor)[0].text.length>0)return;var u=le.rangeRef(t,i,{affinity:"inward"}),[c,d]=ke.edges(i),h="lowest"===o?"lowest":"highest",f=le.isEnd(t,d,d.path);Qe.splitNodes(t,{at:d,match:r,mode:h,voids:l,always:!f});var p=le.isStart(t,c,c.path);Qe.splitNodes(t,{at:c,match:r,mode:h,voids:l,always:!p}),i=u.unref(),null==n.at&&Qe.select(t,i)}for(var[g,m]of le.nodes(t,{at:i,match:r,mode:o,voids:l})){var v={},y={};if(0!==m.length){var b=!1;for(var x in e)"children"!==x&&"text"!==x&&e[x]!==g[x]&&(b=!0,g.hasOwnProperty(x)&&(v[x]=g[x]),null!=e[x]&&(y[x]=e[x]));b&&t.apply({type:"set_node",path:m,properties:v,newProperties:y})}}}}))},splitNodes(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};le.withoutNormalizing(t,(()=>{var{mode:n="lowest",voids:r=!1}=e,{match:i,at:a=t.selection,height:o=0,always:s=!1}=e;if(null==i&&(i=e=>le.isBlock(t,e)),ke.isRange(a)&&(a=He(t,a)),ve.isPath(a)){var l=a,u=le.point(t,l),[c]=le.parent(t,l);i=t=>t===c,o=u.path.length-l.length+1,a=u,s=!0}if(a){var d=le.pointRef(t,a,{affinity:"backward"}),[h]=le.nodes(t,{at:a,match:i,mode:n,voids:r});if(h){var f=le.void(t,{at:a,mode:"highest"}),p=0;if(!r&&f){var[g,m]=f;if(ne.isElement(g)&&t.isInline(g)){var v=le.after(t,m);if(!v){var y={text:""},b=ve.next(m);Qe.insertNodes(t,y,{at:b,voids:r}),v=le.point(t,b)}a=v,s=!0}var x=a.path.length-m.length;o=x+1,s=!0}var w=le.pointRef(t,a),_=a.path.length-o,[,C]=h,S=a.path.slice(0,_),A=0===o?a.offset:a.path[_]+p;for(var[k,E]of le.levels(t,{at:S,reverse:!0,voids:r})){var D=!1;if(E.length2&&void 0!==arguments[2]?arguments[2]:{};Array.isArray(e)||(e=[e]);var r={};for(var i of e)r[i]=null;Qe.setNodes(t,r,n)},unwrapNodes(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};le.withoutNormalizing(t,(()=>{var{mode:n="lowest",split:r=!1,voids:i=!1}=e,{at:a=t.selection,match:o}=e;if(a){null==o&&(o=ve.isPath(a)?Ue(t,a):e=>le.isBlock(t,e)),ve.isPath(a)&&(a=le.range(t,a));var s=ke.isRange(a)?le.rangeRef(t,a):null,l=le.nodes(t,{at:a,match:o,mode:n,voids:i}),u=Array.from(l,(e=>{var[,n]=e;return le.pathRef(t,n)})).reverse(),c=function(e){var n=e.unref(),[a]=le.node(t,n),o=le.range(t,n);r&&s&&(o=ke.intersection(s.current,o)),Qe.liftNodes(t,{at:o,match:t=>ne.isAncestor(a)&&a.children.includes(t),voids:i})};for(var d of u)c(d);s&&s.unref()}}))},wrapNodes(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};le.withoutNormalizing(t,(()=>{var{mode:r="lowest",split:i=!1,voids:a=!1}=n,{match:o,at:s=t.selection}=n;if(s){if(null==o&&(o=ve.isPath(s)?Ue(t,s):t.isInline(e)?e=>le.isInline(t,e)||Te.isText(e):e=>le.isBlock(t,e)),i&&ke.isRange(s)){var[l,u]=ke.edges(s),c=le.rangeRef(t,s,{affinity:"inward"});Qe.splitNodes(t,{at:u,match:o,voids:a}),Qe.splitNodes(t,{at:l,match:o,voids:a}),s=c.unref(),null==n.at&&Qe.select(t,s)}var d=Array.from(le.nodes(t,{at:s,match:t.isInline(e)?e=>le.isBlock(t,e):t=>le.isEditor(t),mode:"lowest",voids:a}));for(var[,h]of d){var f=ke.isRange(s)?ke.intersection(s,le.range(t,h)):s;if(f){var p=Array.from(le.nodes(t,{at:f,match:o,mode:r,voids:a}));if(p.length>0){var g=function(){var[n]=p,r=p[p.length-1],[,i]=n,[,o]=r;if(0===i.length&&0===o.length)return"continue";var s=ve.equals(i,o)?ve.parent(i):ve.common(i,o),l=le.range(t,i,o),u=le.node(t,s),[c]=u,d=s.length+1,h=ve.next(o.slice(0,d)),f=$e($e({},e),{},{children:[]});Qe.insertNodes(t,f,{at:h,voids:a}),Qe.moveNodes(t,{at:l,match:t=>ne.isAncestor(c)&&c.children.includes(t),to:h.concat(0),voids:a})}();if("continue"===g)continue}}}}}))}},qe=(t,e)=>{if(ne.isElement(e)){var n=e;return!!le.isVoid(t,e)||1===n.children.length&&qe(t,n.children[0])}return!le.isEditor(e)},He=(t,e)=>{if(ke.isCollapsed(e))return e.anchor;var[,n]=ke.edges(e),r=le.pointRef(t,n);return Qe.delete(t,{at:e}),r.unref()},Ue=(t,e)=>{var[n]=le.node(t,e);return t=>t===n};function Ge(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function We(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{},{edge:n="anchor"}=e,{selection:r}=t;if(r)if("anchor"===n)Qe.select(t,r.anchor);else if("focus"===n)Qe.select(t,r.focus);else if("start"===n){var[i]=ke.edges(r);Qe.select(t,i)}else if("end"===n){var[,a]=ke.edges(r);Qe.select(t,a)}},deselect(t){var{selection:e}=t;e&&t.apply({type:"set_selection",properties:e,newProperties:null})},move(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{selection:n}=t,{distance:r=1,unit:i="character",reverse:a=!1}=e,{edge:o=null}=e;if(n){"start"===o&&(o=ke.isBackward(n)?"focus":"anchor"),"end"===o&&(o=ke.isBackward(n)?"anchor":"focus");var{anchor:s,focus:l}=n,u={distance:r,unit:i},c={};if(null==o||"anchor"===o){var d=a?le.before(t,s,u):le.after(t,s,u);d&&(c.anchor=d)}if(null==o||"focus"===o){var h=a?le.before(t,l,u):le.after(t,l,u);h&&(c.focus=h)}Qe.setSelection(t,c)}},select(t,e){var{selection:n}=t;if(e=le.range(t,e),n)Qe.setSelection(t,e);else{if(!ke.isRange(e))throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat(JSON.stringify(e)));t.apply({type:"set_selection",properties:n,newProperties:e})}},setPoint(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{selection:r}=t,{edge:i="both"}=n;if(r){"start"===i&&(i=ke.isBackward(r)?"focus":"anchor"),"end"===i&&(i=ke.isBackward(r)?"anchor":"focus");var{anchor:a,focus:o}=r,s="anchor"===i?a:o;Qe.setSelection(t,{["anchor"===i?"anchor":"focus"]:We(We({},s),e)})}},setSelection(t,e){var{selection:n}=t,r={},i={};if(n){for(var a in e)("anchor"===a&&null!=e.anchor&&!we.equals(e.anchor,n.anchor)||"focus"===a&&null!=e.focus&&!we.equals(e.focus,n.focus)||"anchor"!==a&&"focus"!==a&&e[a]!==n[a])&&(r[a]=n[a],i[a]=e[a]);Object.keys(r).length>0&&t.apply({type:"set_selection",properties:r,newProperties:i})}}},Xe={delete(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};le.withoutNormalizing(t,(()=>{var{reverse:n=!1,unit:r="character",distance:i=1,voids:a=!1}=e,{at:o=t.selection,hanging:s=!1}=e;if(o){if(ke.isRange(o)&&ke.isCollapsed(o)&&(o=o.anchor),we.isPoint(o)){var l=le.void(t,{at:o,mode:"highest"});if(!a&&l){var[,u]=l;o=u}else{var c={unit:r,distance:i},d=n?le.before(t,o,c)||le.start(t,[]):le.after(t,o,c)||le.end(t,[]);o={anchor:o,focus:d},s=!0}}if(ve.isPath(o))Qe.removeNodes(t,{at:o,voids:a});else if(!ke.isCollapsed(o)){if(!s){var[,h]=ke.edges(o),f=le.end(t,[]);we.equals(h,f)||(o=le.unhangRange(t,o,{voids:a}))}var[p,g]=ke.edges(o),m=le.above(t,{match:e=>le.isBlock(t,e),at:p,voids:a}),v=le.above(t,{match:e=>le.isBlock(t,e),at:g,voids:a}),y=m&&v&&!ve.equals(m[1],v[1]),b=ve.equals(p.path,g.path),x=a?null:le.void(t,{at:p,mode:"highest"}),w=a?null:le.void(t,{at:g,mode:"highest"});if(x){var _=le.before(t,p);_&&m&&ve.isAncestor(m[1],_.path)&&(p=_)}if(w){var C=le.after(t,g);C&&v&&ve.isAncestor(v[1],C.path)&&(g=C)}var S,A=[];for(var k of le.nodes(t,{at:o,voids:a})){var[E,D]=k;S&&0===ve.compare(D,S)||(!a&&le.isVoid(t,E)||!ve.isCommon(D,p.path)&&!ve.isCommon(D,g.path))&&(A.push(k),S=D)}var F=Array.from(A,(e=>{var[,n]=e;return le.pathRef(t,n)})),M=le.pointRef(t,p),O=le.pointRef(t,g);if(!b&&!x){var B=M.current,[T]=le.leaf(t,B),{path:P}=B,{offset:I}=p,L=T.text.slice(I);L.length>0&&t.apply({type:"remove_text",path:P,offset:I,text:L})}for(var R of F){var N=R.unref();Qe.removeNodes(t,{at:N,voids:a})}if(!w){var z=O.current,[j]=le.leaf(t,z),{path:$}=z,V=b?p.offset:0,q=j.text.slice(V,g.offset);q.length>0&&t.apply({type:"remove_text",path:$,offset:V,text:q})}!b&&y&&O.current&&M.current&&Qe.mergeNodes(t,{at:O.current,hanging:!0,voids:a});var H=n?M.unref()||O.unref():O.unref()||M.unref();null==e.at&&H&&Qe.select(t,H)}}}))},insertFragment(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};le.withoutNormalizing(t,(()=>{var{hanging:r=!1,voids:i=!1}=n,{at:a=t.selection}=n;if(e.length&&a){if(ke.isRange(a))if(r||(a=le.unhangRange(t,a)),ke.isCollapsed(a))a=a.anchor;else{var[,o]=ke.edges(a);if(!i&&le.void(t,{at:o}))return;var s=le.pointRef(t,o);Qe.delete(t,{at:a}),a=s.unref()}else ve.isPath(a)&&(a=le.start(t,a));if(i||!le.void(t,{at:a})){var l=le.above(t,{at:a,match:e=>le.isInline(t,e),mode:"highest",voids:i});if(l){var[,u]=l;if(le.isEnd(t,a,u)){var c=le.after(t,u);a=c}else if(le.isStart(t,a,u)){var d=le.before(t,u);a=d}}var h=le.above(t,{match:e=>le.isBlock(t,e),at:a,voids:i}),[,f]=h,p=le.isStart(t,a,f),g=le.isEnd(t,a,f),m=p&&g,v=!p||p&&g,y=!g,[,b]=fe.first({children:e},[]),[,x]=fe.last({children:e},[]),w=[],_=e=>{var[n,r]=e,i=0===r.length;return!i&&(!!m||!(v&&ve.isAncestor(r,b)&&ne.isElement(n)&&!t.isVoid(n)&&!t.isInline(n))&&!(y&&ve.isAncestor(r,x)&&ne.isElement(n)&&!t.isVoid(n)&&!t.isInline(n)))};for(var C of fe.nodes({children:e},{pass:_}))_(C)&&w.push(C);var S=[],A=[],k=[],E=!0,D=!1;for(var[F]of w)ne.isElement(F)&&!t.isInline(F)?(E=!1,D=!0,A.push(F)):E?S.push(F):k.push(F);var[M]=le.nodes(t,{at:a,match:e=>Te.isText(e)||le.isInline(t,e),mode:"highest",voids:i}),[,O]=M,B=le.isStart(t,a,O),T=le.isEnd(t,a,O),P=le.pathRef(t,g?ve.next(f):f),I=le.pathRef(t,T?ve.next(O):O),L=le.pathRef(t,f);Qe.splitNodes(t,{at:a,match:e=>D?le.isBlock(t,e):Te.isText(e)||le.isInline(t,e),mode:D?"lowest":"highest",voids:i});var R=le.pathRef(t,!B||B&&T?ve.next(O):O);if(Qe.insertNodes(t,S,{at:R.current,match:e=>Te.isText(e)||le.isInline(t,e),mode:"highest",voids:i}),m&&A.length&&Qe.delete(t,{at:L.unref(),voids:i}),Qe.insertNodes(t,A,{at:P.current,match:e=>le.isBlock(t,e),mode:"lowest",voids:i}),Qe.insertNodes(t,k,{at:I.current,match:e=>Te.isText(e)||le.isInline(t,e),mode:"highest",voids:i}),!n.at){var N;N=k.length>0?ve.previous(I.current):A.length>0?ve.previous(P.current):ve.previous(R.current);var z=le.end(t,N);Qe.select(t,z)}R.unref(),P.unref(),I.unref()}}}))},insertText(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};le.withoutNormalizing(t,(()=>{var{voids:r=!1}=n,{at:i=t.selection}=n;if(i){if(ve.isPath(i)&&(i=le.range(t,i)),ke.isRange(i))if(ke.isCollapsed(i))i=i.anchor;else{var a=ke.end(i);if(!r&&le.void(t,{at:a}))return;var o=le.pointRef(t,a);Qe.delete(t,{at:i,voids:r}),i=o.unref(),Qe.setSelection(t,{anchor:i,focus:i})}if(r||!le.void(t,{at:i})){var{path:s,offset:l}=i;e.length>0&&t.apply({type:"insert_text",path:s,offset:l,text:e})}}}))}};function Ye(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ke(t){for(var e=1;e-1&&t%1==0&&t-1&&t%1==0&&t<=en}function Lr(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Rr(t){return!!t&&"object"==typeof t}function Nr(t){return"string"==typeof t||!Or(t)&&Rr(t)&&rr.call(t)==cn}function zr(t){if(!t)return[];if(Br(t))return Nr(t)?Xn(t):Cr(t);if(or&&t[or])return Un(t[or]());var e=Ar(t),n=e==on?Gn:e==un?Zn:$r;return n(t)}function jr(t){return Br(t)?br(t):_r(t)}function $r(t){return t?$n(t,jr(t)):[]}var Vr=zr;function qr(t){return null!==t&&"object"===typeof t&&"constructor"in t&&t.constructor===Object}function Hr(t,e){void 0===t&&(t={}),void 0===e&&(e={}),Object.keys(e).forEach((function(n){"undefined"===typeof t[n]?t[n]=e[n]:qr(e[n])&&qr(t[n])&&Object.keys(e[n]).length>0&&Hr(t[n],e[n])}))}var Ur={body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},createElementNS:function(){return{}},importNode:function(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function Gr(){var t="undefined"!==typeof document?document:{};return Hr(t,Ur),t}var Wr={document:Ur,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState:function(){},pushState:function(){},go:function(){},back:function(){}},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){},matchMedia:function(){return{}},requestAnimationFrame:function(t){return"undefined"===typeof setTimeout?(t(),null):setTimeout(t,0)},cancelAnimationFrame:function(t){"undefined"!==typeof setTimeout&&clearTimeout(t)}};function Zr(){var t="undefined"!==typeof window?window:{};return Hr(t,Wr),t}function Xr(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function Yr(t){return Yr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Yr(t)}function Kr(t,e){return Kr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Kr(t,e)}function Qr(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function Jr(t,e,n){return Jr=Qr()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=Function.bind.apply(t,r),a=new i;return n&&Kr(a,n.prototype),a},Jr.apply(null,arguments)}function ti(t){return-1!==Function.toString.call(t).indexOf("[native code]")}function ei(t){var e="function"===typeof Map?new Map:void 0;return ei=function(t){if(null===t||!ti(t))return t;if("function"!==typeof t)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return Jr(t,arguments,Yr(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Kr(n,t)},ei(t)}function ni(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ri(t){var e=t.__proto__;Object.defineProperty(t,"__proto__",{get:function(){return e},set:function(t){e.__proto__=t}})}var ii=function(t){function e(e){var n;return n=t.call.apply(t,[this].concat(e))||this,ri(ni(n)),n}return Xr(e,t),e}(ei(Array));function ai(t){void 0===t&&(t=[]);var e=[];return t.forEach((function(t){Array.isArray(t)?e.push.apply(e,ai(t)):e.push(t)})),e}function oi(t,e){return Array.prototype.filter.call(t,e)}function si(t){for(var e=[],n=0;n=0&&a.indexOf(">")>=0){var o="div";0===a.indexOf("0})).length>0}function pi(t,e){if(1===arguments.length&&"string"===typeof t)return this[0]?this[0].getAttribute(t):void 0;for(var n=0;n=0&&(e[li(i.name.split("data-")[1])]=i.value)}for(var a in e)"false"===e[a]?e[a]=!1:"true"===e[a]?e[a]=!0:parseFloat(e[a])===1*e[a]&&(e[a]*=1);return e}}function vi(t){if("undefined"===typeof t){var e=this[0];if(!e)return;if(e.multiple&&"select"===e.nodeName.toLowerCase()){for(var n=[],r=0;r=0;else a.value=t}return this}function yi(){for(var t=arguments.length,e=new Array(t),n=0;n=0;f-=1){var p=h[f];a&&p.listener===a||a&&p.listener&&p.listener.dom7proxy&&p.listener.dom7proxy===a?(d.removeEventListener(u,p.proxyListener,o),h.splice(f,1)):a||(d.removeEventListener(u,p.proxyListener,o),h.splice(f,1))}}return this}function xi(){var t=Zr();return this[0]===t?t.innerWidth:this.length>0?parseFloat(this.css("width")):null}function wi(){var t=Zr();return this[0]===t?t.innerHeight:this.length>0?parseFloat(this.css("height")):null}function _i(){if(this.length>0){var t=Zr(),e=Gr(),n=this[0],r=n.getBoundingClientRect(),i=e.body,a=n.clientTop||i.clientTop||0,o=n.clientLeft||i.clientLeft||0,s=n===t?t.scrollY:n.scrollTop,l=n===t?t.scrollX:n.scrollLeft;return{top:r.top+s-a,left:r.left+l-o}}return null}function Ci(){for(var t=0;t=0;n-=1)this[e].insertBefore(i.childNodes[n],this[e].childNodes[0])}else if(t instanceof ii)for(n=0;n-1&&t%1==0&&t-1&&t%1==0&&t<=qi}function ya(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function ba(t){return!!t&&"object"==typeof t}function xa(t){return pa(t)?na(t):oa(t)}function wa(t){return t}var _a=da;if("undefined"!==typeof navigator&&"ReactNative"===navigator.product&&"undefined"===typeof crypto)throw new Error("React Native does not have a built-in secure random generator. If you don’t need unpredictable IDs use `nanoid/non-secure`. For secure IDs, import `react-native-get-random-values` before Nano ID.");if("undefined"!==typeof msCrypto&&"undefined"===typeof crypto)throw new Error("Import file with `if (!window.crypto) window.crypto = window.msCrypto` before importing Nano ID to fix IE 11 support");if("undefined"===typeof crypto)throw new Error("Your browser does not have secure random generator. If you don’t need unpredictable IDs, you can use nanoid/non-secure.");let Ca=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t));while(t--){let r=63&n[t];e+=r<36?r.toString(36):r<62?(r-26).toString(36).toUpperCase():r<63?"_":"-"}return e};var Sa="Expected a function",Aa=NaN,ka="[object Symbol]",Ea=/^\s+|\s+$/g,Da=/^[-+]0x[0-9a-f]+$/i,Fa=/^0b[01]+$/i,Ma=/^0o[0-7]+$/i,Oa=parseInt,Ba="object"==typeof Je&&Je&&Je.Object===Object&&Je,Ta="object"==typeof self&&self&&self.Object===Object&&self,Pa=Ba||Ta||Function("return this")(),Ia=Object.prototype,La=Ia.toString,Ra=Math.max,Na=Math.min,za=function(){return Pa.Date.now()};function ja(t,e,n){var r,i,a,o,s,l,u=0,c=!1,d=!1,h=!0;if("function"!=typeof t)throw new TypeError(Sa);function f(e){var n=r,a=i;return r=i=void 0,u=e,o=t.apply(a,n),o}function p(t){return u=t,s=setTimeout(v,e),c?f(t):o}function g(t){var n=t-l,r=t-u,i=e-n;return d?Na(i,a-r):i}function m(t){var n=t-l,r=t-u;return void 0===l||n>=e||n<0||d&&r>=a}function v(){var t=za();if(m(t))return y(t);s=setTimeout(v,g(t))}function y(t){return s=void 0,h&&r?f(t):(r=i=void 0,o)}function b(){void 0!==s&&clearTimeout(s),u=0,r=l=i=s=void 0}function x(){return void 0===s?o:y(za())}function w(){var t=za(),n=m(t);if(r=arguments,i=this,l=t,n){if(void 0===s)return p(l);if(d)return s=setTimeout(v,e),f(l)}return void 0===s&&(s=setTimeout(v,e)),o}return e=Ua(e)||0,Va(n)&&(c=!!n.leading,d="maxWait"in n,a=d?Ra(Ua(n.maxWait)||0,e):a,h="trailing"in n?!!n.trailing:h),w.cancel=b,w.flush=x,w}function $a(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new TypeError(Sa);return Va(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),ja(t,e,{leading:r,maxWait:e,trailing:i})}function Va(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function qa(t){return!!t&&"object"==typeof t}function Ha(t){return"symbol"==typeof t||qa(t)&&La.call(t)==ka}function Ua(t){if("number"==typeof t)return t;if(Ha(t))return Aa;if(Va(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Va(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Ea,"");var n=Fa.test(t);return n||Ma.test(t)?Oa(t.slice(2),n?2:8):Da.test(t)?Aa:+t}var Ga=$a;function Wa(t,e){return document.createElement(t,e)}function Za(t,e,n){return document.createElementNS(t,e,n)}function Xa(t){return document.createTextNode(t)}function Ya(t){return document.createComment(t)}function Ka(t,e,n){t.insertBefore(e,n)}function Qa(t,e){t.removeChild(e)}function Ja(t,e){t.appendChild(e)}function to(t){return t.parentNode}function eo(t){return t.nextSibling}function no(t){return t.tagName}function ro(t,e){t.textContent=e}function io(t){return t.textContent}function ao(t){return 1===t.nodeType}function oo(t){return 3===t.nodeType}function so(t){return 8===t.nodeType}const lo={createElement:Wa,createElementNS:Za,createTextNode:Xa,createComment:Ya,insertBefore:Ka,removeChild:Qa,appendChild:Ja,parentNode:to,nextSibling:eo,tagName:no,setTextContent:ro,getTextContent:io,isElement:ao,isText:oo,isComment:so};function uo(t,e,n,r,i){const a=void 0===e?void 0:e.key;return{sel:t,data:e,children:n,text:r,elm:i,key:a}}const co=Array.isArray;function ho(t){return"string"===typeof t||"number"===typeof t||t instanceof String||t instanceof Number}function fo(t){return void 0===t}function po(t){return void 0!==t}const go=uo("",{},[],void 0,void 0);function mo(t,e){var n,r;const i=t.key===e.key,a=(null===(n=t.data)||void 0===n?void 0:n.is)===(null===(r=e.data)||void 0===r?void 0:r.is),o=t.sel===e.sel;return o&&i&&a}function vo(t){return void 0!==t.sel}function yo(t,e,n){var r;const i={};for(let a=e;a<=n;++a){const e=null===(r=t[a])||void 0===r?void 0:r.key;void 0!==e&&(i[e]=a)}return i}const bo=["create","update","remove","destroy","pre","post"];function xo(t,e){const n={create:[],update:[],remove:[],destroy:[],pre:[],post:[]},r=void 0!==e?e:lo;for(const h of bo)for(const e of t){const t=e[h];void 0!==t&&n[h].push(t)}function i(t){const e=t.id?"#"+t.id:"",n=t.getAttribute("class"),i=n?"."+n.split(" ").join("."):"";return uo(r.tagName(t).toLowerCase()+e+i,{},[],void 0,t)}function a(t,e){return function(){if(0===--e){const e=r.parentNode(t);r.removeChild(e,t)}}}function o(t,e){var i,a;let s,l=t.data;if(void 0!==l){const e=null===(i=l.hook)||void 0===i?void 0:i.init;po(e)&&(e(t),l=t.data)}const u=t.children,c=t.sel;if("!"===c)fo(t.text)&&(t.text=""),t.elm=r.createComment(t.text);else if(void 0!==c){const i=c.indexOf("#"),d=c.indexOf(".",i),h=i>0?i:c.length,f=d>0?d:c.length,p=-1!==i||-1!==d?c.slice(0,Math.min(h,f)):c,g=t.elm=po(l)&&po(s=l.ns)?r.createElementNS(s,p,l):r.createElement(p,l);for(h0&&g.setAttribute("class",c.slice(f+1).replace(/\./g," ")),s=0;sg?(h=null==n[y+1]?null:n[y+1].elm,s(t,h,n,p,y,i)):u(t,e,f,g))}function d(t,e,i){var a,o,l,d,h;const f=null===(a=e.data)||void 0===a?void 0:a.hook;null===(o=null===f||void 0===f?void 0:f.prepatch)||void 0===o||o.call(f,t,e);const p=e.elm=t.elm,g=t.children,m=e.children;if(t!==e){if(void 0!==e.data){for(let r=0;ri?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;var a=Array(i);while(++r=r?t:il(t,e,n)}function sl(t){return function(e){e=dl(e);var n=Zs(e)?Ys(e):void 0,r=n?n[0]:e.charAt(0),i=n?ol(n,1).join(""):e.slice(1);return r[t]()+i}}function ll(t){return function(e){return qs(ml(pl(e).replace(Ts,"")),t,"")}}function ul(t){return!!t&&"object"==typeof t}function cl(t){return"symbol"==typeof t||ul(t)&&tl.call(t)==Wo}function dl(t){return null==t?"":al(t)}var hl=ll((function(t,e,n){return e=e.toLowerCase(),t+(n?fl(e):e)}));function fl(t){return gl(dl(t).toLowerCase())}function pl(t){return t=dl(t),t&&t.replace(Xo,Ws).replace(Ps,"")}var gl=sl("toUpperCase");function ml(t,e,n){return t=dl(t),e=n?void 0:e,void 0===e?Xs(t)?Qs(t):Us(t):t.match(e)||[]}for(var vl=hl,yl="undefined"!=typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),bl={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},xl={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:yl?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},wl={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},_l=1;_l<20;_l++)wl["f"+_l]=111+_l;function Cl(t,e,n){e&&!("byKey"in e)&&(n=e,e=null),Array.isArray(t)||(t=[t]);var r=t.map((function(t){return Al(t,e)})),i=function(t){return r.some((function(e){return kl(e,t)}))},a=null==n?i:i(n);return a}function Sl(t,e){return Cl(t,{byKey:!0},e)}function Al(t,e){var n=e&&e.byKey,r={};t=t.replace("++","+add");var i=t.split("+"),a=i.length;for(var o in bl)r[bl[o]]=!1;var s=!0,l=!1,u=void 0;try{for(var c,d=i[Symbol.iterator]();!(s=(c=d.next()).done);s=!0){var h=c.value,f=h.endsWith("?")&&h.length>1;f&&(h=h.slice(0,-1));var p=Dl(h),g=bl[p];if(h.length>1&&!g&&!xl[h]&&!wl[p])throw new TypeError('Unknown modifier: "'+h+'"');1!==a&&g||(n?r.key=p:r.which=El(h)),g&&(r[g]=!f||null)}}catch(m){l=!0,u=m}finally{try{!s&&d.return&&d.return()}finally{if(l)throw u}}return r}function kl(t,e){for(var n in t){var r=t[n],i=void 0;if(null!=r&&(i="key"===n&&null!=e.key?e.key.toLowerCase():"which"===n?91===r&&93===e.which?91:e.which:e[n],(null!=i||!1!==r)&&i!==r))return!1}return!0}function El(t){t=Dl(t);var e=wl[t]||t.toUpperCase().charCodeAt(0);return e}function Dl(t){return t=t.toLowerCase(),t=xl[t]||t,t}var Fl=Cl,Ml=Sl,Ol="Expected a function",Bl=NaN,Tl="[object Symbol]",Pl=/^\s+|\s+$/g,Il=/^[-+]0x[0-9a-f]+$/i,Ll=/^0b[01]+$/i,Rl=/^0o[0-7]+$/i,Nl=parseInt,zl="object"==typeof Je&&Je&&Je.Object===Object&&Je,jl="object"==typeof self&&self&&self.Object===Object&&self,$l=zl||jl||Function("return this")(),Vl=Object.prototype,ql=Vl.toString,Hl=Math.max,Ul=Math.min,Gl=function(){return $l.Date.now()};function Wl(t,e,n){var r,i,a,o,s,l,u=0,c=!1,d=!1,h=!0;if("function"!=typeof t)throw new TypeError(Ol);function f(e){var n=r,a=i;return r=i=void 0,u=e,o=t.apply(a,n),o}function p(t){return u=t,s=setTimeout(v,e),c?f(t):o}function g(t){var n=t-l,r=t-u,i=e-n;return d?Ul(i,a-r):i}function m(t){var n=t-l,r=t-u;return void 0===l||n>=e||n<0||d&&r>=a}function v(){var t=Gl();if(m(t))return y(t);s=setTimeout(v,g(t))}function y(t){return s=void 0,h&&r?f(t):(r=i=void 0,o)}function b(){void 0!==s&&clearTimeout(s),u=0,r=l=i=s=void 0}function x(){return void 0===s?o:y(Gl())}function w(){var t=Gl(),n=m(t);if(r=arguments,i=this,l=t,n){if(void 0===s)return p(l);if(d)return s=setTimeout(v,e),f(l)}return void 0===s&&(s=setTimeout(v,e)),o}return e=Kl(e)||0,Zl(n)&&(c=!!n.leading,d="maxWait"in n,a=d?Hl(Kl(n.maxWait)||0,e):a,h="trailing"in n?!!n.trailing:h),w.cancel=b,w.flush=x,w}function Zl(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Xl(t){return!!t&&"object"==typeof t}function Yl(t){return"symbol"==typeof t||Xl(t)&&ql.call(t)==Tl}function Kl(t){if("number"==typeof t)return t;if(Yl(t))return Bl;if(Zl(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Zl(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Pl,"");var n=Ll.test(t);return n||Rl.test(t)?Nl(t.slice(2),n?2:8):Il.test(t)?Bl:+t}var Ql,Jl=Wl,tu=tn((function(t,e){var n=200,r="__lodash_hash_undefined__",i=9007199254740991,a="[object Arguments]",o="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",c="[object Function]",d="[object GeneratorFunction]",h="[object Map]",f="[object Number]",p="[object Object]",g="[object Promise]",m="[object RegExp]",v="[object Set]",y="[object String]",b="[object Symbol]",x="[object WeakMap]",w="[object ArrayBuffer]",_="[object DataView]",C="[object Float32Array]",S="[object Float64Array]",A="[object Int8Array]",k="[object Int16Array]",E="[object Int32Array]",D="[object Uint8Array]",F="[object Uint8ClampedArray]",M="[object Uint16Array]",O="[object Uint32Array]",B=/[\\^$.*+?()[\]{}|]/g,T=/\w*$/,P=/^\[object .+?Constructor\]$/,I=/^(?:0|[1-9]\d*)$/,L={};L[a]=L[o]=L[w]=L[_]=L[s]=L[l]=L[C]=L[S]=L[A]=L[k]=L[E]=L[h]=L[f]=L[p]=L[m]=L[v]=L[y]=L[b]=L[D]=L[F]=L[M]=L[O]=!0,L[u]=L[c]=L[x]=!1;var R="object"==typeof Je&&Je&&Je.Object===Object&&Je,N="object"==typeof self&&self&&self.Object===Object&&self,z=R||N||Function("return this")(),j=e&&!e.nodeType&&e,$=j&&t&&!t.nodeType&&t,V=$&&$.exports===j;function q(t,e){return t.set(e[0],e[1]),t}function H(t,e){return t.add(e),t}function U(t,e){var n=-1,r=t?t.length:0;while(++n-1}function qt(t,e){var n=this.__data__,r=ie(n,t);return r<0?n.push([t,e]):n[r][1]=e,this}function Ht(t){var e=-1,n=t?t.length:0;this.clear();while(++e-1&&t%1==0&&t-1&&t%1==0&&t<=i}function Ue(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Ge(t){return!!t&&"object"==typeof t}function We(t){return je(t)?ne(t):de(t)}function Ze(){return[]}function Xe(){return!1}t.exports=Le})),eu=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};function nu(t,e){if(!Object.prototype.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}var ru=0;function iu(t){return"__private_"+ru+++"_"+t}function au(t,e,n){const r=[];return t.forEach((t=>"string"!==typeof t?r.push(t):e[Symbol.split](t).forEach(((t,e,i)=>{""!==t&&r.push(t),ecrypto.getRandomValues(new Uint8Array(t)),pu=(t,e,n)=>{let r=(2<{let a="";while(1){let o=n(i),s=i;while(s--)if(a+=t[o[s]&r]||"",a.length===e)return a}}},gu=(t,e)=>pu(t,e,fu),mu=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t));while(t--){let r=63&n[t];e+=r<36?r.toString(36):r<62?(r-26).toString(36).toUpperCase():r<63?"_":"-"}return e};var vu={nanoid:mu,customAlphabet:gu,customRandom:pu,urlAlphabet:hu,random:fu},yu=function(t){if("number"!==typeof t||isNaN(t))throw new TypeError("Expected a number, got "+typeof t);var e=t<0,n=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(e&&(t=-t),t<1)return(e?"-":"")+t+" B";var r=Math.min(Math.floor(Math.log(t)/Math.log(1024)),n.length-1);t=Number(t/Math.pow(1024,r));var i=n[r];return t>=10||t%1===0?(e?"-":"")+t.toFixed(0)+" "+i:(e?"-":"")+t.toFixed(1)+" "+i};function bu(t,e){this.text=t=t||"",this.hasWild=~t.indexOf("*"),this.separator=e,this.parts=t.split(e)}bu.prototype.match=function(t){var e,n,r=!0,i=this.parts,a=i.length;if("string"==typeof t||t instanceof String)if(this.hasWild||this.text==t){for(n=(t||"").split(this.separator),e=0;r&&e=2}return e?n(e.split(";")[0]):n};function Cu(t,e){if(!Object.prototype.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}var Su=0;function Au(t){return"__private_"+Su+++"_"+t}var ku=Au("publish");class Eu{constructor(){Object.defineProperty(this,ku,{value:Du}),this.state={},this.callbacks=[]}getState(){return this.state}setState(t){const e={...this.state},n={...this.state,...t};this.state=n,Cu(this,ku)[ku](e,n,t)}subscribe(t){return this.callbacks.push(t),()=>{this.callbacks.splice(this.callbacks.indexOf(t),1)}}}function Du(){for(var t=arguments.length,e=new Array(t),n=0;n{t(...e)}))}Eu.VERSION="2.0.3";var Fu=function(){return new Eu},Mu=function(t){const e=t.lastIndexOf(".");return-1===e||e===t.length-1?{name:t,extension:void 0}:{name:t.slice(0,e),extension:t.slice(e+1)}},Ou={md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",doc:"application/msword",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"},Bu=function(t){var e;if(t.type)return t.type;const n=t.name?null==(e=Mu(t.name).extension)?void 0:e.toLowerCase():null;return n&&n in Ou?Ou[n]:"application/octet-stream"};function Tu(t){return t.charCodeAt(0).toString(32)}function Pu(t){let e="";return t.replace(/[^A-Z0-9]/gi,(t=>(e+=`-${Tu(t)}`,"/")))+e}var Iu=function(t){let e="uppy";return"string"===typeof t.name&&(e+=`-${Pu(t.name.toLowerCase())}`),void 0!==t.type&&(e+=`-${t.type}`),t.meta&&"string"===typeof t.meta.relativePath&&(e+=`-${Pu(t.meta.relativePath.toLowerCase())}`),void 0!==t.data.size&&(e+=`-${t.data.size}`),void 0!==t.data.lastModified&&(e+=`-${t.data.lastModified}`),e},Lu=function(t){if(null==t&&(t="undefined"!==typeof navigator?navigator.userAgent:null),!t)return!0;const e=/Edge\/(\d+\.\d+)/.exec(t);if(!e)return!0;const n=e[1];let[r,i]=n.split(".");return r=parseInt(r,10),i=parseInt(i,10),r<15||15===r&&i<15063||(r>18||18===r&&i>=18218)},Ru=function(t,e){return e.name?e.name:"image"===t.split("/")[0]?`${t.split("/")[0]}.${t.split("/")[1]}`:"noname"};function Nu(t){return t<10?`0${t}`:t.toString()}var zu=function(){const t=new Date,e=Nu(t.getHours()),n=Nu(t.getMinutes()),r=Nu(t.getSeconds());return`${e}:${n}:${r}`};const ju={debug:()=>{},warn:()=>{},error:function(){for(var t=arguments.length,e=new Array(t),n=0;nt,onBeforeUpload:t=>t,store:Fu(),logger:Ku,infoTimeout:5e3};if(this.opts={...e,...t,restrictions:{...e.restrictions,...t&&t.restrictions}},t&&t.logger&&t.debug?this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.","warning"):t&&t.debug&&(this.opts.logger=Qu),this.log(`Using Core v${this.constructor.VERSION}`),this.opts.restrictions.allowedFileTypes&&null!==this.opts.restrictions.allowedFileTypes&&!Array.isArray(this.opts.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");this.i18nInit(),this.calculateProgress=Ga(this.calculateProgress.bind(this),500,{leading:!0,trailing:!0}),this.store=this.opts.store,this.setState({plugins:{},files:{},currentUploads:{},allowNewUpload:!0,capabilities:{uploadProgress:Lu(),individualCancellation:!0,resumableUploads:!1},totalProgress:0,meta:{...this.opts.meta},info:[],recoveredState:null}),Wu(this,nc)[nc]=this.store.subscribe(((t,e,n)=>{this.emit("state-update",t,e,n),this.updateAll(e)})),this.opts.debug&&"undefined"!==typeof window&&(window[this.opts.id]=this),Wu(this,gc)[gc]()}emit(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r{e.update(t)}))}setState(t){this.store.setState(t)}getState(){return this.store.getState()}get state(){return this.getState()}setFileState(t,e){if(!this.getState().files[t])throw new Error(`Can’t set state for ${t} (the file could have been removed)`);this.setState({files:{...this.getState().files,[t]:{...this.getState().files[t],...e}}})}i18nInit(){const t=new su([this.defaultLocale,this.opts.locale]);this.i18n=t.translate.bind(t),this.i18nArray=t.translateArray.bind(t),this.locale=t.locale}setOptions(t){this.opts={...this.opts,...t,restrictions:{...this.opts.restrictions,...t&&t.restrictions}},t.meta&&this.setMeta(t.meta),this.i18nInit(),t.locale&&this.iteratePlugins((t=>{t.setOptions()})),this.setState()}resetProgress(){const t={percentage:0,bytesUploaded:0,uploadComplete:!1,uploadStarted:null},e={...this.getState().files},n={};Object.keys(e).forEach((r=>{const i={...e[r]};i.progress={...i.progress,...t},n[r]=i})),this.setState({files:n,totalProgress:0}),this.emit("reset-progress")}addPreProcessor(t){Wu(this,ic)[ic].add(t)}removePreProcessor(t){return Wu(this,ic)[ic].delete(t)}addPostProcessor(t){Wu(this,oc)[oc].add(t)}removePostProcessor(t){return Wu(this,oc)[oc].delete(t)}addUploader(t){Wu(this,ac)[ac].add(t)}removeUploader(t){return Wu(this,ac)[ac].delete(t)}setMeta(t){const e={...this.getState().meta,...t},n={...this.getState().files};Object.keys(n).forEach((e=>{n[e]={...n[e],meta:{...n[e].meta,...t}}})),this.log("Adding metadata:"),this.log(t),this.setState({meta:e,files:n})}setFileMeta(t,e){const n={...this.getState().files};if(!n[t])return void this.log("Was trying to set metadata for a file that has been removed: ",t);const r={...n[t].meta,...e};n[t]={...n[t],meta:r},this.setState({files:n})}getFile(t){return this.getState().files[t]}getFiles(){const{files:t}=this.getState();return Object.values(t)}getObjectOfFilesPerState(){const{files:t,totalProgress:e,error:n}=this.getState(),r=Object.values(t),i=r.filter((t=>{let{progress:e}=t;return!e.uploadComplete&&e.uploadStarted})),a=r.filter((t=>!t.progress.uploadStarted)),o=r.filter((t=>t.progress.uploadStarted||t.progress.preprocess||t.progress.postprocess)),s=r.filter((t=>t.progress.uploadStarted)),l=r.filter((t=>t.isPaused)),u=r.filter((t=>t.progress.uploadComplete)),c=r.filter((t=>t.error)),d=i.filter((t=>!t.isPaused)),h=r.filter((t=>t.progress.preprocess||t.progress.postprocess));return{newFiles:a,startedFiles:o,uploadStartedFiles:s,pausedFiles:l,completeFiles:u,erroredFiles:c,inProgressFiles:i,inProgressNotPausedFiles:d,processingFiles:h,isUploadStarted:s.length>0,isAllComplete:100===e&&u.length===r.length&&0===h.length,isAllErrored:!!n&&c.length===r.length,isAllPaused:0!==i.length&&l.length===i.length,isUploadInProgress:i.length>0,isSomeGhost:r.some((t=>t.isGhost))}}validateRestrictions(t,e){try{return Wu(this,sc)[sc](t,e),{result:!0}}catch(n){return{result:!1,reason:n.message}}}checkIfFileAlreadyExists(t){const{files:e}=this.getState();return!(!e[t]||e[t].isGhost)}addFile(t){Wu(this,hc)[hc](t);const{files:e}=this.getState();let n=Wu(this,fc)[fc](e,t);return e[n.id]&&e[n.id].isGhost&&(n={...e[n.id],data:t.data,isGhost:!1},this.log(`Replaced the blob in the restored ghost file: ${n.name}, ${n.id}`)),this.setState({files:{...e,[n.id]:n}}),this.emit("file-added",n),this.emit("files-added",[n]),this.log(`Added file: ${n.name}, ${n.id}, mime type: ${n.type}`),Wu(this,pc)[pc](),n.id}addFiles(t){Wu(this,hc)[hc]();const e={...this.getState().files},n=[],r=[];for(let a=0;a{this.emit("file-added",t)})),this.emit("files-added",n),n.length>5?this.log(`Added batch of ${n.length} files`):Object.keys(n).forEach((t=>{this.log(`Added file: ${n[t].name}\n id: ${n[t].id}\n type: ${n[t].type}`)})),n.length>0&&Wu(this,pc)[pc](),r.length>0){let t="Multiple errors occurred while adding files:\n";if(r.forEach((e=>{t+=`\n * ${e.message}`})),this.info({message:this.i18n("addBulkFilesFailed",{smart_count:r.length}),details:t},"error",this.opts.infoTimeout),"function"===typeof AggregateError)throw new AggregateError(r,t);{const e=new Error(t);throw e.errors=r,e}}}removeFiles(t,e){const{files:n,currentUploads:r}=this.getState(),i={...n},a={...r},o=Object.create(null);function s(t){return void 0===o[t]}t.forEach((t=>{n[t]&&(o[t]=n[t],delete i[t])})),Object.keys(a).forEach((t=>{const e=r[t].fileIDs.filter(s);0!==e.length?a[t]={...r[t],fileIDs:e}:delete a[t]}));const l={currentUploads:a,files:i};0===Object.keys(i).length&&(l.allowNewUpload=!0,l.error=null,l.recoveredState=null),this.setState(l),this.calculateTotalProgress();const u=Object.keys(o);u.forEach((t=>{this.emit("file-removed",o[t],e)})),u.length>5?this.log(`Removed ${u.length} files`):this.log(`Removed files: ${u.join(", ")}`)}removeFile(t,e){void 0===e&&(e=null),this.removeFiles([t],e)}pauseResume(t){if(!this.getState().capabilities.resumableUploads||this.getFile(t).uploadComplete)return;const e=this.getFile(t).isPaused||!1,n=!e;return this.setFileState(t,{isPaused:n}),this.emit("upload-pause",t,n),n}pauseAll(){const t={...this.getState().files},e=Object.keys(t).filter((e=>!t[e].progress.uploadComplete&&t[e].progress.uploadStarted));e.forEach((e=>{const n={...t[e],isPaused:!0};t[e]=n})),this.setState({files:t}),this.emit("pause-all")}resumeAll(){const t={...this.getState().files},e=Object.keys(t).filter((e=>!t[e].progress.uploadComplete&&t[e].progress.uploadStarted));e.forEach((e=>{const n={...t[e],isPaused:!1,error:null};t[e]=n})),this.setState({files:t}),this.emit("resume-all")}retryAll(){const t={...this.getState().files},e=Object.keys(t).filter((e=>t[e].error));if(e.forEach((e=>{const n={...t[e],isPaused:!1,error:null};t[e]=n})),this.setState({files:t,error:null}),this.emit("retry-all",e),0===e.length)return Promise.resolve({successful:[],failed:[]});const n=Wu(this,vc)[vc](e,{forceAllowNewUpload:!0});return Wu(this,xc)[xc](n)}cancelAll(){this.emit("cancel-all");const{files:t}=this.getState(),e=Object.keys(t);e.length&&this.removeFiles(e,"cancel-all"),this.setState({totalProgress:0,error:null,recoveredState:null})}retryUpload(t){this.setFileState(t,{error:null,isPaused:!1}),this.emit("upload-retry",t);const e=Wu(this,vc)[vc]([t],{forceAllowNewUpload:!0});return Wu(this,xc)[xc](e)}reset(){this.cancelAll()}logout(){this.iteratePlugins((t=>{t.provider&&t.provider.logout&&t.provider.logout()}))}calculateProgress(t,e){if(!this.getFile(t.id))return void this.log(`Not setting progress for a file that has been removed: ${t.id}`);const n=Number.isFinite(e.bytesTotal)&&e.bytesTotal>0;this.setFileState(t.id,{progress:{...this.getFile(t.id).progress,bytesUploaded:e.bytesUploaded,bytesTotal:e.bytesTotal,percentage:n?Math.round(e.bytesUploaded/e.bytesTotal*100):0}}),this.calculateTotalProgress()}calculateTotalProgress(){const t=this.getFiles(),e=t.filter((t=>t.progress.uploadStarted||t.progress.preprocess||t.progress.postprocess));if(0===e.length)return this.emit("progress",0),void this.setState({totalProgress:0});const n=e.filter((t=>null!=t.progress.bytesTotal)),r=e.filter((t=>null==t.progress.bytesTotal));if(0===n.length){const t=100*e.length,n=r.reduce(((t,e)=>t+e.progress.percentage),0),i=Math.round(n/t*100);return void this.setState({totalProgress:i})}let i=n.reduce(((t,e)=>t+e.progress.bytesTotal),0);const a=i/n.length;i+=a*r.length;let o=0;n.forEach((t=>{o+=t.progress.bytesUploaded})),r.forEach((t=>{o+=a*(t.progress.percentage||0)/100}));let s=0===i?0:Math.round(o/i*100);s>100&&(s=100),this.setState({totalProgress:s}),this.emit("progress",s)}updateOnlineStatus(){const t="undefined"===typeof window.navigator.onLine||window.navigator.onLine;t?(this.emit("is-online"),this.wasOffline&&(this.emit("back-online"),this.info(this.i18n("connectedToInternet"),"success",3e3),this.wasOffline=!1)):(this.emit("is-offline"),this.info(this.i18n("noInternetConnection"),"error",0),this.wasOffline=!0)}getID(){return this.opts.id}use(t,e){if("function"!==typeof t){const e=`Expected a plugin class, but got ${null===t?"null":typeof t}. Please verify that the plugin was imported and spelled correctly.`;throw new TypeError(e)}const n=new t(this,e),r=n.id;if(!r)throw new Error("Your plugin must have an id");if(!n.type)throw new Error("Your plugin must have a type");const i=this.getPlugin(r);if(i){const t=`Already found a plugin named '${i.id}'. Tried to use: '${r}'.\nUppy plugins must have unique \`id\` options. See https://uppy.io/docs/plugins/#id.`;throw new Error(t)}return t.VERSION&&this.log(`Using ${r} v${t.VERSION}`),n.type in Wu(this,ec)[ec]?Wu(this,ec)[ec][n.type].push(n):Wu(this,ec)[ec][n.type]=[n],n.install(),this}getPlugin(t){for(const e of Object.values(Wu(this,ec)[ec])){const n=e.find((e=>e.id===t));if(null!=n)return n}}[Uu](t){return Wu(this,ec)[ec][t]}iteratePlugins(t){Object.values(Wu(this,ec)[ec]).flat(1).forEach(t)}removePlugin(t){this.log(`Removing plugin ${t.id}`),this.emit("plugin-remove",t),t.uninstall&&t.uninstall();const e=Wu(this,ec)[ec][t.type],n=e.findIndex((e=>e.id===t.id));-1!==n&&e.splice(n,1);const r=this.getState(),i={plugins:{...r.plugins,[t.id]:void 0}};this.setState(i)}close(){this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.reset(),Wu(this,nc)[nc](),this.iteratePlugins((t=>{this.removePlugin(t)})),"undefined"!==typeof window&&window.removeEventListener&&(window.removeEventListener("online",Wu(this,mc)[mc]),window.removeEventListener("offline",Wu(this,mc)[mc]))}hideInfo(){const{info:t}=this.getState();this.setState({info:t.slice(1)}),this.emit("info-hidden")}info(t,e,n){void 0===e&&(e="info"),void 0===n&&(n=3e3);const r="object"===typeof t;this.setState({info:[...this.getState().info,{type:e,message:r?t.message:t,details:r?t.details:null}]}),setTimeout((()=>this.hideInfo()),n),this.emit("info-visible")}log(t,e){const{logger:n}=this.opts;switch(e){case"error":n.error(t);break;case"warning":n.warn(t);break;default:n.debug(t);break}}restore(t){return this.log(`Core: attempting to restore upload "${t}"`),this.getState().currentUploads[t]?Wu(this,xc)[xc](t):(Wu(this,bc)[bc](t),Promise.reject(new Error("Nonexistent upload")))}[Gu](){return Wu(this,vc)[vc](...arguments)}addResultData(t,e){if(!Wu(this,yc)[yc](t))return void this.log(`Not setting result for an upload that has been removed: ${t}`);const{currentUploads:n}=this.getState(),r={...n[t],result:{...n[t].result,...e}};this.setState({currentUploads:{...n,[t]:r}})}upload(){var t;null!=(t=Wu(this,ec)[ec].uploader)&&t.length||this.log("No uploader type plugins are used","warning");let{files:e}=this.getState();const n=this.opts.onBeforeUpload(e);return!1===n?Promise.reject(new Error("Not starting the upload because onBeforeUpload returned false")):(n&&"object"===typeof n&&(e=n,this.setState({files:e})),Promise.resolve().then((()=>{Wu(this,lc)[lc](e),Wu(this,cc)[cc](e)})).catch((t=>{Wu(this,dc)[dc](t)})).then((()=>{const{currentUploads:t}=this.getState(),n=Object.values(t).flatMap((t=>t.fileIDs)),r=[];Object.keys(e).forEach((t=>{const e=this.getFile(t);e.progress.uploadStarted||-1!==n.indexOf(t)||r.push(e.id)}));const i=Wu(this,vc)[vc](r);return Wu(this,xc)[xc](i)})).catch((t=>{Wu(this,dc)[dc](t,{showInformer:!1})})))}}function _c(t,e){void 0===e&&(e=this.getFiles());const{maxFileSize:n,minFileSize:r,maxTotalFileSize:i,maxNumberOfFiles:a,allowedFileTypes:o}=this.opts.restrictions;if(a&&e.length+1>a)throw new Ju(`${this.i18n("youCanOnlyUploadX",{smart_count:a})}`);if(o){const e=o.some((e=>e.indexOf("/")>-1?!!t.type&&_u(t.type.replace(/;.*?$/,""),e):!("."!==e[0]||!t.extension)&&t.extension.toLowerCase()===e.substr(1).toLowerCase()));if(!e){const t=o.join(", ");throw new Ju(this.i18n("youCanOnlyUploadFileTypes",{types:t}))}}if(i&&null!=t.size){let n=0;if(n+=t.size,e.forEach((t=>{n+=t.size})),n>i)throw new Ju(this.i18n("exceedsSize",{size:yu(i),file:t.name}))}if(n&&null!=t.size&&t.size>n)throw new Ju(this.i18n("exceedsSize",{size:yu(n),file:t.name}));if(r&&null!=t.size&&t.size{const e=this.getFile(t);return Wu(this,uc)[uc](e)}));if(e.length)throw new tc(e,`${this.i18n("missingRequiredMetaField")}`)}function kc(t,e){let{showInformer:n=!0,file:r=null,throwErr:i=!0}=void 0===e?{}:e;const a="object"===typeof t?t.message:t,o="object"===typeof t&&t.details?t.details:"";let s=a;if(o&&(s+=` ${o}`),t.isRestriction?(this.log(s),this.emit("restriction-failed",r,t)):this.log(s,"error"),n&&this.info({message:a,details:o},"error",this.opts.infoTimeout),i)throw"object"===typeof t?t:new Error(t)}function Ec(t){const{allowNewUpload:e}=this.getState();!1===e&&Wu(this,dc)[dc](new Ju(this.i18n("noMoreFilesAllowed")),{file:t})}function Dc(t,e){const n=Bu(e),r=Ru(n,e),i=Mu(r).extension,a=Boolean(e.isRemote),o=Iu({...e,type:n});if(this.checkIfFileAlreadyExists(o)){const t=new Ju(this.i18n("noDuplicates",{fileName:r}));Wu(this,dc)[dc](t,{file:e})}const s=e.meta||{};s.name=r,s.type=n;const l=Number.isFinite(e.data.size)?e.data.size:null;let u={source:e.source||"",id:o,name:r,extension:i||"",meta:{...this.getState().meta,...s},type:n,data:e.data,progress:{percentage:0,bytesUploaded:0,bytesTotal:l,uploadComplete:!1,uploadStarted:null},size:l,isRemote:a,remote:e.remote||"",preview:e.preview};const c=this.opts.onBeforeFileAdded(u,t);!1===c?Wu(this,dc)[dc](new Ju("Cannot add the file because onBeforeFileAdded returned false."),{showInformer:!1,fileDescriptor:e}):"object"===typeof c&&null!==c&&(u=c);try{const e=Object.keys(t).map((e=>t[e]));Wu(this,sc)[sc](u,e)}catch(d){Wu(this,dc)[dc](d,{file:u})}return u}function Fc(){this.opts.autoProceed&&!this.scheduledAutoProceed&&(this.scheduledAutoProceed=setTimeout((()=>{this.scheduledAutoProceed=null,this.upload().catch((t=>{t.isRestriction||this.log(t.stack||t.message||t)}))}),4))}function Mc(){const t=(t,e,n)=>{let r=t.message||"Unknown error";t.details&&(r+=` ${t.details}`),this.setState({error:r}),null!=e&&e.id in this.getState().files&&this.setFileState(e.id,{error:r,response:n})};this.on("error",t),this.on("upload-error",((e,n,r)=>{if(t(n,e,r),"object"===typeof n&&n.message){const t=new Error(n.message);t.details=n.message,n.details&&(t.details+=` ${n.details}`),t.message=this.i18n("failedToUpload",{file:e.name}),Wu(this,dc)[dc](t,{throwErr:!1})}else Wu(this,dc)[dc](n,{throwErr:!1})})),this.on("upload",(()=>{this.setState({error:null})})),this.on("upload-started",(t=>{this.getFile(t.id)?this.setFileState(t.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,percentage:0,bytesUploaded:0,bytesTotal:t.size}}):this.log(`Not setting progress for a file that has been removed: ${t.id}`)})),this.on("upload-progress",this.calculateProgress),this.on("upload-success",((t,e)=>{if(!this.getFile(t.id))return void this.log(`Not setting progress for a file that has been removed: ${t.id}`);const n=this.getFile(t.id).progress;this.setFileState(t.id,{progress:{...n,postprocess:Wu(this,oc)[oc].size>0?{mode:"indeterminate"}:null,uploadComplete:!0,percentage:100,bytesUploaded:n.bytesTotal},response:e,uploadURL:e.uploadURL,isPaused:!1}),null==t.size&&this.setFileState(t.id,{size:e.bytesUploaded||n.bytesTotal}),this.calculateTotalProgress()})),this.on("preprocess-progress",((t,e)=>{this.getFile(t.id)?this.setFileState(t.id,{progress:{...this.getFile(t.id).progress,preprocess:e}}):this.log(`Not setting progress for a file that has been removed: ${t.id}`)})),this.on("preprocess-complete",(t=>{if(!this.getFile(t.id))return void this.log(`Not setting progress for a file that has been removed: ${t.id}`);const e={...this.getState().files};e[t.id]={...e[t.id],progress:{...e[t.id].progress}},delete e[t.id].progress.preprocess,this.setState({files:e})})),this.on("postprocess-progress",((t,e)=>{this.getFile(t.id)?this.setFileState(t.id,{progress:{...this.getState().files[t.id].progress,postprocess:e}}):this.log(`Not setting progress for a file that has been removed: ${t.id}`)})),this.on("postprocess-complete",(t=>{if(!this.getFile(t.id))return void this.log(`Not setting progress for a file that has been removed: ${t.id}`);const e={...this.getState().files};e[t.id]={...e[t.id],progress:{...e[t.id].progress}},delete e[t.id].progress.postprocess,this.setState({files:e})})),this.on("restored",(()=>{this.calculateTotalProgress()})),this.on("dashboard:file-edit-complete",(t=>{t&&Wu(this,uc)[uc](t)})),"undefined"!==typeof window&&window.addEventListener&&(window.addEventListener("online",Wu(this,mc)[mc]),window.addEventListener("offline",Wu(this,mc)[mc]),setTimeout(Wu(this,mc)[mc],3e3))}function Oc(t,e){void 0===e&&(e={});const{forceAllowNewUpload:n=!1}=e,{allowNewUpload:r,currentUploads:i}=this.getState();if(!r&&!n)throw new Error("Cannot create a new upload: already uploading.");const a=Yu();return this.emit("upload",{id:a,fileIDs:t}),this.setState({allowNewUpload:!1!==this.opts.allowMultipleUploadBatches&&!1!==this.opts.allowMultipleUploads,currentUploads:{...i,[a]:{fileIDs:t,step:0,result:{}}}}),a}function Bc(t){const{currentUploads:e}=this.getState();return e[t]}function Tc(t){const e={...this.getState().currentUploads};delete e[t],this.setState({currentUploads:e})}async function Pc(t){let{currentUploads:e}=this.getState(),n=e[t];const r=n.step||0,i=[...Wu(this,ic)[ic],...Wu(this,ac)[ac],...Wu(this,oc)[oc]];try{for(let a=r;a{const e=this.getFile(t);e&&e.progress.postprocess&&this.emit("postprocess-complete",e)}));const r=n.fileIDs.map((t=>this.getFile(t))),i=r.filter((t=>!t.error)),a=r.filter((t=>t.error));await this.addResultData(t,{successful:i,failed:a,uploadID:t}),e=this.getState().currentUploads,n=e[t]}let a;return n&&(a=n.result,this.emit("complete",a),Wu(this,bc)[bc](t)),null==a&&this.log(`Not setting result for an upload that has been removed: ${t}`),a}wc.VERSION="2.1.3";var Ic=wc,Lc=tn((function(t,e){var n,r,i,a,o,s,l,u,c={},d=[],h=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function f(t,e){for(var n in e)t[n]=e[n];return t}function p(t){var e=t.parentNode;e&&e.removeChild(t)}function g(t,e,r){var i,a,o,s={};for(o in e)"key"==o?i=e[o]:"ref"==o?a=e[o]:s[o]=e[o];if(arguments.length>2&&(s.children=arguments.length>3?n.call(arguments,2):r),"function"==typeof t&&null!=t.defaultProps)for(o in t.defaultProps)void 0===s[o]&&(s[o]=t.defaultProps[o]);return m(t,s,i,a,null)}function m(t,e,n,a,o){var s={type:t,props:e,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++i:o};return null==o&&null!=r.vnode&&r.vnode(s),s}function v(t){return t.children}function y(t,e){this.props=t,this.context=e}function b(t,e){if(null==e)return t.__?b(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e0?m(g.type,g.props,g.key,null,g.__v):g)){if(g.__=n,g.__b=n.__b+1,null===(p=_[h])||p&&g.key==p.key&&g.type===p.type)_[h]=void 0;else for(f=0;f2&&(s.children=arguments.length>3?n.call(arguments,2):r),m(t.type,s,i||t.key,a||t.ref,null)},e.createContext=function(t,e){var n={__c:e="__cC"+u++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var n,r;return this.getChildContext||(n=[],(r={})[e]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&n.some(w)},this.sub=function(t){n.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){n.splice(n.indexOf(t),1),e&&e.call(t)}}),t.children}};return n.Provider.__=n.Consumer.contextType=n},e.createElement=g,e.createRef=function(){return{current:null}},e.h=g,e.hydrate=function t(e,n){R(e,n,t)},e.isValidElement=a,e.options=r,e.render=R,e.toChildArray=function t(e,n){return n=n||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){t(e,n)})):n.push(e)),n}})),Rc=function(t){return(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE},Nc=function(t,e){return void 0===e&&(e=document),"string"===typeof t?e.querySelector(t):Rc(t)?t:null},zc=class{constructor(t,e){void 0===e&&(e={}),this.uppy=t,this.opts=e}getPluginState(){const{plugins:t}=this.uppy.getState();return t[this.id]||{}}setPluginState(t){const{plugins:e}=this.uppy.getState();this.uppy.setState({plugins:{...e,[this.id]:{...e[this.id],...t}}})}setOptions(t){this.opts={...this.opts,...t},this.setPluginState(),this.i18nInit()}i18nInit(){const t=new su([this.defaultLocale,this.uppy.locale,this.opts.locale]);this.i18n=t.translate.bind(t),this.i18nArray=t.translateArray.bind(t),this.setPluginState()}addTarget(){throw new Error("Extend the addTarget method to add your plugin to another plugin's target")}install(){}uninstall(){}render(){throw new Error("Extend the render method to add your plugin to a DOM element")}update(){}afterUpdate(){}};function jc(t,e){if(!Object.prototype.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}var $c=0;function Vc(t){return"__private_"+$c+++"_"+t}const{render:qc}=Lc;function Hc(t){let e=null,n=null;return function(){for(var r=arguments.length,i=new Array(r),a=0;a(e=null,t(...n))))),e}}var Uc=Vc("updateUI");class Gc extends zc{constructor(){super(...arguments),Object.defineProperty(this,Uc,{writable:!0,value:void 0})}mount(t,e){const n=e.id,r=Nc(t);if(r){this.isTargetDOMEl=!0;const e=document.createDocumentFragment();return jc(this,Uc)[Uc]=Hc((t=>{this.uppy.getPlugin(this.id)&&(qc(this.render(t),e),this.afterUpdate())})),this.uppy.log(`Installing ${n} to a DOM element '${t}'`),this.opts.replaceTargetContent&&(r.innerHTML=""),qc(this.render(this.uppy.getState()),e),this.el=e.firstElementChild,r.appendChild(e),this.onMount(),this.el}let i;if("object"===typeof t&&t instanceof Gc)i=t;else if("function"===typeof t){const e=t;this.uppy.iteratePlugins((t=>{if(t instanceof e)return i=t,!1}))}if(i)return this.uppy.log(`Installing ${n} to ${i.id}`),this.parent=i,this.el=i.addTarget(e),this.onMount(),this.el;this.uppy.log(`Not installing ${n}`);let a=`Invalid target option given to ${n}.`;throw a+="function"===typeof t?" The given target is not a Plugin class. Please check that you're not specifying a React Component instead of a plugin. If you are using @uppy/* packages directly, make sure you have only 1 version of @uppy/core installed: run `npm ls @uppy/core` on the command line and verify that all the versions match and are deduped correctly.":"If you meant to target an HTML element, please make sure that the element exists. Check that the