realchart 1.4.33 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
 
2
2
  /**
3
- * RealChart Pictogram v1.4.33
3
+ * RealChart Pictogram v1.5.0
4
4
  * Copyright (C) 2023-2026 WooriTech Inc.
5
5
  * All Rights Reserved.
6
6
  */
7
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("realchart")):"function"==typeof define&&define.amd?define(["exports","realchart"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).RealChartPictogram={},t.RealChart)}(this,function(t,e){"use strict";function i(t){var e=Object.create(null);return t&&Object.keys(t).forEach(function(i){if("default"!==i){var r=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,r.get?r:{enumerable:!0,get:function(){return t[i]}})}}),e.default=t,Object.freeze(e)}var r,o=i(e),n=(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),s=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i.prototype._createLegendMarker=function(t,i){return e.RectElement.create(t,e.Series.LEGEND_MARKER,0,0,i,i,2)},i.type=e.PictogramSeriesType,i.defaults=e.extend(e.BasedSeries.defaults,{iconGap:2,integral:!1,integralThreshold:.5}),i}(e.BasedSeries),a=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),l=function(t){function i(i){var r=t.call(this,i,e.SeriesView.POINT_CLASS)||this;return r.add(r._back=new e.RectElement(i)),r._back.setTransparent(!0),r}return a(i,t),i.prototype.preppareIcons=function(t,e,i,r){},i.prototype.layout=function(t,e,i){var r=this.wPoint,o=this.hPoint;e-=r/2,o<0&&(t=t.map(function(t){return-t})),this._back.setBounds(e,i-o,r,o)},i}(e.RcElement),h=function(t){function i(i){var r=t.call(this,i,"rct-pictogram-series")||this;return r._bars=new e.PointViewPool(r._pointContainer,l),r}return a(i,t),i.prototype._getPointPool=function(){return this._bars},i.prototype._preparePoints=function(t,e,i){},i.prototype._shrinkPoint=function(t){},i.prototype._layoutPoint=function(t,e,i,r,o,n){},i}(e.BasedSeriesView),u=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),p=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return u(i,t),i.prototype._readObject=function(i,r){t.prototype._readObject.call(this,i,r),this.figure=e.pickProp(i._figureFielder(r),r.figure)},i.prototype._readArray=function(e,i){t.prototype._readArray.call(this,e,i);var r=+e.prop("figureField");isNaN(r)||(this.figure=i[r])},i}(e.BarSeriesPoint),c=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return u(i,t),i.prototype.getMode=function(){return this._mode},i.prototype.getFigure=function(){return this._figurePath},i.prototype.getImage=function(t){var e=t.figure;return"number"==typeof e&&(e=this._imageUrls[e]),!e&&this.prop("figureByPoint")&&(e=this._imageUrls[t.vindex%this._imageUrls.length]),this._imageRoot+(e||this._imageUrls[0])},i.prototype.getFigureWidth=function(t){return e.calcPercent(this._widthDim,t,t)},i.prototype.getFigureGap=function(){return this._figureGap},i.prototype._createPoint=function(t){return new p(t)},i.prototype._createLegendMarker=function(t,i){return e.RectElement.create(t,e.Series.LEGEND_MARKER,0,0,i,i,2)},i.prototype._doApply=function(i){t.prototype._doApply.call(this,i),this._figureFielder=this._createFielder(i.figureField||"figure"),this._figurePath=e.isArray(i.figurePath)?i.figurePath.join(" "):i.figurePath;var r=i.figureImage;e.isArray(r)?this._imageUrls=r.slice(0):e.isString(r)?this._imageUrls=[r]:this._imageUrls=[],this._imageRoot=e.isString(i.figureImageRoot)?i.figureImageRoot:"",this._mode="both"===i.mode||"figure"===i.mode?i.mode:i.figurePath?"both":"figure",this._figureGap=e.pickNum(i.figureGap,0),this._widthDim=e.parsePercentSize(i.figureWidth,!0)},i.type=e.PictorialBarSeriesType,i.defaults=e.extend(e.BarSeriesBase.defaults,{mode:"auto",figureWidth:"100%"}),i}(e.BarSeriesBase),f=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return f(e,t),e}(e.WidgetSeriesPoint),y=function(t){function e(e,i){var r=t.call(this,e)||this;return r.points=i,r}return f(e,t),e}(_),d=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return f(e,t),e.prototype.getDistance=function(){var t=this.num("distance");return isNaN(t)?"far"===this.prop("align")?e.ENDED_DIST:e.OUTSIDE_DIST:t||0},e.OUTSIDE_DIST=25,e.ENDED_DIST=10,e}(e.WidgetSeriesLabel),g=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return f(i,t),Object.defineProperty(i.prototype,"paths",{get:function(){return this._paths},enumerable:!1,configurable:!0}),i.prototype.getPictorialSize=function(t,i,r){var o=e.calcPercent(this._sizeDim,1),n=e.minv(i*o/t.width,r*o/t.height);return{width:e.pickNum(e.calcPercent(this._widthDim,i),t.width*n),height:e.pickNum(e.calcPercent(this._heightDim,r),t.height*n)}},Object.defineProperty(i.prototype,"pointLabel",{get:function(){return this._pointLabel},enumerable:!1,configurable:!0}),i.prototype._createLabel=function(t){return new d(t)},i.prototype._createPoint=function(t){return new _(t)},i.prototype._createOthersPoint=function(t,e){return t.y=e.map(function(t){return t.y}).reduce(function(t,e){return t+e}),new y(t,e)},i.prototype.needClip=function(t){return!1},i.prototype.getTotal=function(){var i=t.prototype.getSum.call(this);return Math.max(i,e.calcPercent(this._totalDim,i))},i.prototype.getSum=function(){var i=t.prototype.getSum.call(this),r=e.calcPercent(this._totalDim,i);return Math.max(i,e.pickNum(r,i))},i.prototype._doApply=function(i){t.prototype._doApply.call(this,i),this._paths=e.isArray(i.figure)?i.figure:[i.figure||""],this._setDims(i,"total","width","height"),this._sizeDim=e.parsePercentSize(this.prop("size"),!1)},i.prototype._createLegendMarker=function(t,i){return e.RectElement.create(t,e.Series.LEGEND_MARKER,0,0,i,i,2)},i.type=e.PictorialSeriesType,i.defaults=e.extend(e.WidgetSeries.defaults,{size:"90%",reversed:!1}),i}(e.WidgetSeries),m=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),v=function(t){function i(i){var r=t.call(this,i)||this;return r.add(r._figureLayer=new e.RcElement(i,"")),r._figureLayer.add(r._figureView=new e.PathElement(i,"")),r.add(r._imageLayer=new e.RcElement(i,"")),r._imageLayer.add(r._imageView=new e.ImageElement(i,!1,"")),r._imageView.setAttr("preserveAspectRatio","none"),r.add(r._boxView=new e.PathElement(i,"")),r._figureView.setAttr("vector-effect","non-scaling-stroke"),r}return m(i,t),i.prototype.renderSvg=function(t,e,i,r,o){var n,s=this._figureView;this._imageLayer.setVis(!1),this._figureLayer.setVis(!0),s.scale(1),s.setPath(r),n=s.getBounds(),t.both?s.scale(o/(t.inverted?n.height:n.width)):t.inverted?s.scale(o/n.height,(t.reversed?-1:1)*this.hPoint/n.width):s.scale(o/n.width,(t.reversed?-1:1)*this.hPoint/n.height),this.$_layoutFigure(t,this._figureLayer,this._figureView,e,i)},i.prototype.renderImage=function(t,e,i,r,o){var n=this._imageView;this._figureLayer.setVis(!1),this._imageLayer.setVis(!0),n.url=r,n.width=o,n.height=t.both?void 0:Math.abs(this.hPoint),this.$_layoutFigure(t,this._imageLayer,n,e,i)},i.prototype.$_layoutFigure=function(t,i,r,o,n){var s=r.getBounds(),a=!t.upperClip,l=this.hPoint,h=!1;t.inverted?t.reversed?a?(r.trans(o+s.height/2,n-l),this._dir="left"):l<0?(r.trans(o+s.height/2,-t.yBase-l),this._dir="left"):(r.trans(o-s.height/2,-t.yBase-l),this._dir="right"):a?(r.trans(o-s.height/2,-l),this._dir="right"):l<0?(r.trans(o+s.height/2,-t.yBase-l),this._dir="left"):(r.trans(o-s.height/2,-t.yBase-l),this._dir="right"):t.reversed?a?(r.trans(o+s.width/2,-l),this._dir="bottom"):l<0?(r.trans(o+s.width/2,t.yLen-t.yBase-l),this._dir="bottom"):(r.trans(o-s.width/2,t.yLen-t.yBase-l),this._dir="top"):a?(r.trans(o-s.width/2,n-l),this._dir="top"):l<0?(r.trans(o+s.width/2,t.yLen-t.yBase-l),this._dir="bottom"):(r.trans(o-s.width/2,t.yLen-t.yBase-l),this._dir="top"),a?(r.rotate(t.reversed?180:0),i.removeAttr("clip-path")):(h=this.point.yValue<t.base,t.reversed&&(h=!h),e.Dom.setClipPath(i.dom,h?t.lowerClip:t.upperClip),r.rotate(h?180:0)),this._boxView.setVis(t.both)&&(h||(h=a&&t.reversed),l-=(h?-1:1)*((t.inverted?s.width:s.height)+t.gap),this.$_layoutBox(t,h,o,n,l))},i.prototype.$_layoutBox=function(t,i,r,o,n){this._boxView.setVis(i?n<0:n>0)&&this._boxView.setPath(e.SvgShapes.bar(r-this.wPoint/2,o,this.wPoint,-n,t.rTop,t.rBottom))},i}(e.BoxPointElementEx),w=function(t){function i(e){return t.call(this,e,"rct-pictorialbar-series")||this}return m(i,t),i.prototype._createBarPool=function(t,i){return new e.PointViewPool(t,v)},i.prototype._prepareLayoutPoints=function(t,i){var r=this.model,o=this._yBase,n=this._baseVal>r._yAxisObj.axisMin();if(this._info={inverted:this._inverted,reversed:this._yReversed,base:this._baseVal,yBase:o,both:"both"===r.getMode(),gap:r.getFigureGap(),yLen:this._yLen,rTop:+r.prop("topRadius")||0,rBottom:+r.prop("bottomRadius")||0,upperClip:"",lowerClip:""},n){if(!this._upperClip){var s=this.doc,a=this.dom.querySelector("defs")||s.createElementNS(e.SVGNS,"defs"),l=e.Utils.uniqueKey()+"-";this.insertDom(a,this._pointContainer.dom),a.appendChild(this._upperClip=e.Dom.createClipRect(s,l+"upper")),a.appendChild(this._lowerClip=e.Dom.createClipRect(s,l+"lower"))}var h=this._upperClip.firstElementChild,u=this._lowerClip.firstElementChild;this._inverted?(e.Dom.setBounds(h,0,-t,i,t-o),e.Dom.setBounds(u,0,-o,i,t)):(e.Dom.setBounds(h,0,0,t,i-o),e.Dom.setBounds(u,0,i-o,t,o)),this._info.upperClip=this._upperClip.id,this._info.lowerClip=this._lowerClip.id}},i.prototype._shrinkPoint=function(t){},i.prototype._layoutPoint=function(t,i,r,o,n,s){var a=t.point,l=this.model.getFigure();this._needMask=l&&this._info.both,t.wPoint=n*e.pickNum(a.width,1),t.hPoint=s,t.x=r,l?t.renderSvg(this._info,r,o,l,this._model.getFigureWidth(n)):t.renderImage(this._info,r,o,this._model.getImage(a),this._model.getFigureWidth(n))},i.prototype.setHoverStyle=function(i){if(t.prototype.setHoverStyle.call(this,i),this._needMask){var r=getComputedStyle(i.dom),o="none"!==r.stroke?parseFloat(r.strokeWidth):0;if(this._hoverFigureView.parent.setVis(o>0&&this._info.gap<o)){e.Dom.setImportantStyle(i.dom.style,"stroke-width",e.pixel(o+o/2|0));var n=0;switch(i._dir){case"top":case"right":n=-o/2;break;case"bottom":case"left":n=o/2}this._hoverBoxView.setAttribute("transform","translate(".concat(0,", ").concat(n,")"))}}},i.prototype.focusPointView=function(t,e){e&&this._needMask?this.$_showHoverView(this._hoverPoint=t).setVis(!0):this._hoverFigureView&&(this._hoverFigureView.parent.setVis(!1),this._hoverPoint=null)},i.prototype._renderSeries=function(e,i){t.prototype._renderSeries.call(this,e,i),this._hoverPoint&&this._hoverFigureView&&this._hoverFigureView.parent.visible&&this.$_showHoverView(this._hoverPoint)},i.prototype.$_showHoverView=function(t){var i=this._hoverFigureView;if(!i){var r=this.doc,o=void 0;this.add(new e.RcElement(r,"")).add(i=this._hoverFigureView=new e.RcElement(r,"")),i.parent.dom.style.pointerEvents="none",i.appendDom(o=r.createElementNS(e.SVGNS,"path")),o.style.stroke="none",i.parent.appendDom(o=this._hoverBoxView=r.createElementNS(e.SVGNS,"path")),o.style.stroke="none"}var n=i.dom.firstElementChild,s=this._hoverBoxView;return i.parent.setAttr("clip-path",this._pointContainer.getAttr("clip-path")),i.setAttr("clip-path",t._figureLayer.getAttr("clip-path")),n.setAttribute("d",t._figureView.getAttr("d")),n.style.fill=getComputedStyle(t._figureView.dom).fill,n.setAttribute("transform",t._figureView.getTransform()),e.Dom.setVisible(s,t._boxView.visible)&&(s.setAttribute("d",t._boxView.getAttr("d")),s.style.fill=getComputedStyle(t._boxView.dom).fill),this._inverted&&i.parent.setAttr("transform","rotate(90) translate(".concat(this.height,",").concat(0,") scale(-1, 1)")),i},i}(e.BarSeriesViewBase),P=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),b=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return P(e,t),e.prototype.getTooltipPos=function(){return{x:this.point.xPos+this.parent.parent.tx,y:this.point.yPos+this.parent.parent.ty}},e}(e.PointElement),S=function(t){function i(i){var r=t.call(this,i,"rct-pictorial-series")||this,o=e.Utils.uniqueKey()+"-",n=o+"figure",s=o+"clip",a=o+"hover";r._figurelView=i.createElementNS(e.SVGNS,"use"),r._figurelView.setAttribute("href","#".concat(n)),r._figurelView.setAttribute("class","rct-pictorial-series-figure"),r.insertDom(r._figurelView,r._pointContainer.dom);var l=i.createElementNS(e.SVGNS,"defs");r.insertDom(l,r._figurelView),r._sourceView=new e.PathElement(i),r._sourceView.setAttr("vector-effect","non-scaling-stroke"),r._sourceView.dom.id=n,l.appendChild(r._sourceView.dom);var h=i.createElementNS(e.SVGNS,"use"),u=i.createElementNS(e.SVGNS,"clipPath"),p=i.createElementNS(e.SVGNS,"clipPath");return h.setAttribute("href","#".concat(n)),u.appendChild(h),u.id=s,l.appendChild(u),p.appendChild(r._hoverRect=i.createElementNS(e.SVGNS,"path")),p.id=a,l.appendChild(p),r._hoverView=i.createElementNS(e.SVGNS,"use"),r._hoverView.setAttribute("href","#".concat(n)),r._hoverView.setAttribute("clip-path","url(#".concat(a)),r._hoverView.style.stroke="none",r._hoverView.style.fill="none",r.appendDom(r._hoverView),r._pointContainer.add(r._sliceLayer=new e.LayerElement(i,null)),r._pointContainer.setAttr("clip-path","url(#".concat(s,")")),r._slices=new e.PointViewPool(r._sliceLayer,b),r.add(r._lineContainer=new e.PointLabelLineContainer(i)),r}return P(i,t),i.prototype._getPointPool=function(){return this._slices},i.prototype.getClipContainer=function(){return null},i.prototype._prepareSeries=function(e,i){t.prototype._prepareSeries.call(this,e,i),this.$_prepareSlices(e,i,this._visPoints),this._lineContainer.prepare(i)},i.prototype._renderSeries=function(t,i){this.$_renderFigure(this._sourceView,this._model,t,i);var r=this._visPoints,o=this.model.getCenter(t,i),n=this._figurelView.getBoundingClientRect(),s=o.x-n.width/2,a=o.y-n.height/2,l="translate(".concat(s,",").concat(a,")");e.Dom.hasFill(this._figurelView)||(this._figurelView.style.fill="transparent"),this._figurelView.setAttribute("transform",l),this._hoverView.setAttribute("transform",l),n.x=s,n.y=a,this.$_layoutSlices(r,n,t,i),this._pointContainer.trans(s,a),this._labelContainer.trans(s,a),this._lineContainer.trans(s,a),this.resize(n.width,n.height),this._rSave=n,this._wSave=t,this._hSave=i},i.prototype._runShowEffect=function(t){var i=this.model.prop("reversed");t&&e.SeriesAnimation.reveal(this,{from:"column"===this.model.prop("direction")?i?"right":"left":i?"top":"bottom",view:this._sliceLayer})},i.prototype._refreshZombie=function(){this.$_layoutSlices(this._visPoints,this._rSave,this._wSave,this._hSave),this._hoverPoint&&!e.Dom.isHidden(this._hoverView)&&this.$_showHoverView(this._hoverPoint)},i.prototype._animationStarted=function(e){t.prototype._animationStarted.call(this,e),this._lineContainer.setVis(this._labelContainer.visible)},i.prototype.setHoverStyle=function(i){t.prototype.setHoverStyle.call(this,i);var r=getComputedStyle(i.dom),o="none"!==r.stroke&&parseFloat(r.strokeWidth)>0;e.Dom.setVisible(this._hoverView,o)&&Object.assign(this._hoverView.style,{stroke:r.stroke,strokeWidth:r.strokeWidth,strokeDasharray:r.strokeDasharray})},i.prototype.focusPointView=function(t,e){this._hoverView.style.display=e?"":"none",e&&this.$_showHoverView(t),this._hoverPoint=e?t:null},i.prototype.$_showHoverView=function(t){this._hoverRect.setAttribute("d",t.getAttr("d"))},i.prototype.$_prepareSlices=function(t,e,i){var r=this;this._slices.prepare(i.length,function(o,n){var s=o.point=i[n];r._preparePoint(t,e,s,o)})},i.prototype.$_renderFigure=function(t,i,r,o){var n,s;t.setPath(i.paths),n=t.getBBox(),s=i.getPictorialSize(n,r,o),t.scale(s.width/n.width,s.height/n.height),e.isIE&&this.$_prepareOutline(this._sourceView.dom,r,o,s.width/n.width,s.height/n.height)},i.prototype.$_layoutSlices=function(t,e,i,r){var o=this._model,n=o.pointLabel,s=o.prop("reversed");this.$_calcRates(t),this._lineContainer.setStyleOrClass(n.connector.prop("style")),"column"===o.prop("direction")?this.$_renderHorz(s,e,r):this.$_renderVert(s,e,i)},i.prototype.$_calcRates=function(t){var i=this._zombie,r=this._zombieRate,o=t.length,n=this.model.getTotal();(isNaN(n)||t.find(function(t){return t._isDeleted()}))&&(n=t.filter(function(t){return(t.visible||t===i)&&!t.isNull}).map(function(t){return t.yValue*(t===i?r:t._isDeleted()?t._vr:1)}).reduce(function(t,e){return t+e},0)),o>1||o>0&&!i?1==o&&t[0]._isDeleted()||1===o&&t[0]._vr<1?t[0].yRate=1:t.forEach(function(t){var o=e.fixnum(t.yValue*(t===i?r:t._isDeleted()?t._vr:1)/n)||0;t.yRate=o}):1==o&&(t[0].yRate=e.fixnum(r))},i.prototype.$_createLabelInfo=function(t){var e=t.getCTM(),i=e.a,r=e.d,o=t.getBBox();return{dom:t,sx:i,sy:r,wFigure:o.width,hFigure:o.height}},i.prototype.$_renderVert=function(t,i,r){var o,n,s=this,a=this.model,l=i.width,h=i.height,u=this._labelViews(),p=a.pointLabel,c="inside"===a.getLabelPos(p),f=p.getOffset(),_=p.getDistance(),y=p.getWidgetAlign(),d=null==u?void 0:u.textAlign(),g=[],m=p.prop("opposite"),v=this._lineContainer.setVis(p.connector.visible)?this._lineContainer:null,w=new e.PathBuilder,P=a.getCenter(r,h).x-i.x,b=l/2,S=t?0:h,V=u?u.getWidth(0):0,x=g&&!c&&this.$_createLabelInfo(this._sourceView.dom);this._slices.forEach(function(a){var p=a.point;if(a.setVis(!p.isNull)){var L=h*p.yRate;if(t?(a.setPath(e.SvgShapes.rectangle(0,S,l,L)),p.yPos=S+L/2,S+=L):(p.yPos=S-L/2,S-=L,a.setPath(e.SvgShapes.rectangle(0,S,l,L))),p.xPos=b,n=null==v?void 0:v.get(p),u&&(o=u.get(p,0))&&o.visible){if(c){var E=o.isDomAnimating(),C=o.getBBox();!E&&o.layout(d||"center"),null==n||n.setVis(!1),o.trans(p.xPos-C.width/2,p.yPos-C.height/2)}else-1===y?s.$_layoutLabelNearVert(x,a,o,d,m,n,w,l,P,f,_):1==y?s.$_layoutLabelFarVert(x,a,o,d,m,n,w,f,_,V,i,r):s.$_layoutLabelOutVert(x,a,o,d,m,n,w,f,_);o.setContrast(c&&a.dom),g.push(o),o.setPosY(o.ty),s._layoutLabelRotation(o)}else n&&n.setVis(!1)}})},i.prototype.$_renderHorz=function(t,i,r){var o,n,s=this,a=this.model,l=i.width,h=i.height,u=this._labelViews(),p=a.pointLabel,c="inside"===a.getLabelPos(p),f=p.getOffset(),_=p.getDistance(),y=p.getWidgetAlign(),d=null==u?void 0:u.textAlign(),g=[],m=p.prop("opposite"),v=this._lineContainer.setVis(p.connector.visible)?this._lineContainer:null,w=new e.PathBuilder,P=a.getCenter(l,r).y-i.y,b=h/2,S=u?u.getWidth(0):0,V=g&&!c&&this.$_createLabelInfo(this._sourceView.dom),x=t?l:0;this._slices.forEach(function(a){var p=a.point;if(a.setVis(!p.isNull)){var L=l*p.yRate;if(t?(p.xPos=x-L/2,x-=L,a.setPath(e.SvgShapes.rectangle(x,0,L,h))):(p.xPos=x+L/2,a.setPath(e.SvgShapes.rectangle(x,0,L,h)),x+=L),p.yPos=b,n=null==v?void 0:v.get(p),u&&(o=u.get(p,0))&&o.visible){if(c){var E=o.isDomAnimating(),C=o.getBBox();!E&&o.layout(d||"center"),o.trans(p.xPos-C.width/2,p.yPos-C.height/2),null==n||n.setVis(!1)}else-1===y?s.$_layoutLabelNearHorz(V,a,o,d,m,n,w,h,P,f,_):1==y?s.$_layoutLabelFarHorz(V,a,o,d,m,n,w,f,_,S,i,r):s.$_layoutLabelOutHorz(V,a,o,d,m,n,w,f,_);o.setContrast(c&&a.dom),g.push(o),o.setPosY(o.ty),s._layoutLabelRotation(o)}else n&&n.setVis(!1)}})},i.prototype.$_prepareOutline=function(t,i,r,o,n){var s,a=+new Date,l=this.control.canvasCtx(),h=t.getTotalLength(),u=e.maxv(1,Math.round(h/500));l.setTransform(1,0,0,1,0,0),l.clearRect(0,0,i,r),l.scale(o,n),l.fillStyle="red",l.beginPath(),s=t.getPointAtLength(0),l.moveTo(s.x,s.y);for(var p=0;p<h;p+=u)s=t.getPointAtLength(p),l.lineTo(s.x,s.y);l.closePath(),l.fill(),console.log("canvas",+new Date-a,"ms.")},i.prototype.$_calcLabelPosVert=function(t,e,i){var r=t.dom,o=r.ownerSVGElement.createSVGPoint(),n=t.wFigure,s=t.sx,a=2*(t.sx<0?1:1/t.sx),l=i?0:t.wFigure;if(o.y=e.point.yPos/t.sy,i){for(;l<n;l+=a)if(o.x=l,r.isPointInFill(o))return l>0&&(o.x-=a/2,r.isPointInFill(o)&&(l=o.x)),l*s}else for(;l>=0;l-=a)if(o.x=l,r.isPointInFill(o))return l<n&&(o.x+=a/2,r.isPointInFill(o)&&(l=o.x)),l*s;return t.wFigure*t.sx/2},i.prototype.$_calcLabelPosVertIE=function(t,e,i){var r=this.control.canvasCtx(),o={x:0,y:0},n=t.wFigure,s=t.sx,a=2*(s<0?1:1/s),l=o.y=e.point.yPos,h=i?0:n*s;if(i){for(var u=n*s;h<u;h+=a)if(o.x=h,r.isPointInPath(o.x,l))return h>0&&(o.x-=a/2,r.isPointInPath(o.x,l)&&(h=o.x)),h}else for(;h>=0;h-=a)if(o.x=h,r.isPointInPath(h,l))return h<n*s&&(o.x+=a/2,r.isPointInPath(o.x,l)&&(h=o.x)),h;return n/2},i.prototype.$_layoutLabelOutVert=function(t,i,r,o,n,s,a,l,h){var u=i.point,p=r.isDomAnimating(),c=r.getBBox(),f=u.yPos;!p&&r.layout(o||(n?"right":"left"));var _=e.isIE?this.$_calcLabelPosVertIE(t,i,n):this.$_calcLabelPosVert(t,i,n);s&&(n?s.setLine(a.reset(0,0).line(-h,0).end()):s.setLine(a.reset(0,0).line(h,0).end()),s.trans(_,f)),n?_-=h+l+c.width:_+=h+l,r.trans(_,f-c.height/2)},i.prototype.$_layoutLabelNearVert=function(t,i,r,o,n,s,a,l,h,u,p){var c=i.point,f=r.isDomAnimating(),_=r.getBBox(),y=c.yPos;!f&&r.layout(o||(n?"right":"left"));var d=e.isIE?this.$_calcLabelPosVertIE(t,i,n):this.$_calcLabelPosVert(t,i,n),g=h;n?g-=l/2:g+=l/2,s&&(n?s.setLine(a.reset(0,0).line(g-d-p,0).end()):s.setLine(a.reset(0,0).line(g+p-d,0).end()),s.trans(d,y)),n?g-=u+p+_.width:g+=p+u,r.trans(g,y-_.height/2)},i.prototype.$_layoutLabelFarVert=function(t,i,r,o,n,s,a,l,h,u,p,c){var f=i.point,_=r.isDomAnimating(),y=r.getBBox(),d=f.yPos;!_&&r.layout(o||(n?"right":"left"));var g,m=e.isIE?this.$_calcLabelPosVertIE(t,i,n):this.$_calcLabelPosVert(t,i,n);g=n?h+l+u-p.x:c-p.x-h-u-l,s&&(n?s.setLine(a.reset(0,0).line(g-m-h,0).end()):s.setLine(a.reset(0,0).line(g+h-m,0).end()),s.trans(m,d)),n?g-=l+h+y.width:g+=h+l,r.trans(g,d-y.height/2)},i.prototype.$_calcLabelPosHorz=function(t,e,i){var r=t.dom,o=r.ownerSVGElement.createSVGPoint(),n=t.hFigure,s=t.sy,a=2*(t.sy<0?1:1/t.sy),l=i?t.hFigure:0;if(o.x=e.point.xPos/t.sx,i){for(;l>=0;l-=a)if(o.y=l,r.isPointInFill(o))return l<t.hFigure&&(o.y+=a/2,r.isPointInFill(o)&&(l=o.y)),l*s}else for(;l<n;l+=a)if(o.y=l,r.isPointInFill(o))return l>0&&(o.y-=a/2,r.isPointInFill(o)&&(l=o.y)),l*s;return t.hFigure*t.sy/2},i.prototype.$_calcLabelPosHorzIE=function(t,e,i){var r=this.control.canvasCtx(),o={x:0,y:0},n=t.hFigure,s=t.sy,a=2*(t.sy<0?1:1/t.sy),l=o.x=e.point.xPos,h=i?n*s:0;if(i){for(;h>=0;h-=a)if(o.y=h,r.isPointInPath(l,o.y))return h<n*s&&(o.y+=a/2,r.isPointInPath(l,o.y)&&(h=o.y)),h}else for(;h<n;h+=a)if(o.y=h,r.isPointInPath(l,o.y))return h>0&&(o.y-=a/2,r.isPointInPath(l,o.y)&&(h=o.y)),h;return t.hFigure*t.sy/2},i.prototype.$_layoutLabelOutHorz=function(t,i,r,o,n,s,a,l,h){var u=i.point,p=r.isDomAnimating(),c=r.getBBox(),f=u.xPos;!p&&r.layout(o);var _=e.isIE?this.$_calcLabelPosHorzIE(t,i,n):this.$_calcLabelPosHorz(t,i,n);s&&(n?s.setLine(a.reset(0,0).line(0,h).end()):s.setLine(a.reset(0,0).line(0,-h).end()),s.trans(f,_)),n?_+=h+l:_-=h+l,r.trans(f-c.width/2,n?_:_-c.height)},i.prototype.$_layoutLabelNearHorz=function(t,i,r,o,n,s,a,l,h,u,p){var c=i.point,f=r.isDomAnimating(),_=r.getBBox(),y=c.xPos;!f&&r.layout(o||(n?"right":"left"));var d=e.isIE?this.$_calcLabelPosHorzIE(t,i,n):this.$_calcLabelPosHorz(t,i,n),g=h;n?g+=l/2:g-=l/2,s&&(n?s.setLine(a.reset(0,0).line(0,g+p-d).end()):s.setLine(a.reset(0,0).line(0,g-d-p).end()),s.trans(y,d)),n?g+=p+u:g-=u+p+_.height,r.trans(y-_.width/2,g)},i.prototype.$_layoutLabelFarHorz=function(t,i,r,o,n,s,a,l,h,u,p,c){var f=i.point,_=r.isDomAnimating(),y=r.getBBox(),d=f.xPos;!_&&r.layout(o||(n?"right":"left"));var g,m=e.isIE?this.$_calcLabelPosHorzIE(t,i,n):this.$_calcLabelPosHorz(t,i,n);g=n?c-p.y-h-u-l:h+l+u-p.y,s&&(n?s.setLine(a.reset(0,0).line(0,g+h-m).end()):s.setLine(a.reset(0,0).line(0,g-m-h).end()),s.trans(d,m)),n?g+=h+l:g-=l+h+y.height,r.trans(d-y.width/2,g)},i}(e.WidgetSeriesView);function V(t){(function(t){return t.Series&&t.SeriesView})(t)&&(t.Series.register(s),t.Series.register(c),t.Series.register(g),t.SeriesView.register([s,h]),t.SeriesView.register([c,w]),t.SeriesView.register([g,S]))}V(o),t.PictogramSeries=s,t.PictorialBarSeries=c,t.PictorialSeries=g,t.default=V,Object.defineProperty(t,"__esModule",{value:!0})});
7
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("realchart")):"function"==typeof define&&define.amd?define(["exports","realchart"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).RealChartPictogram={},t.RealChart)}(this,function(t,e){"use strict";function i(t){var e=Object.create(null);return t&&Object.keys(t).forEach(function(i){if("default"!==i){var r=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,r.get?r:{enumerable:!0,get:function(){return t[i]}})}}),e.default=t,Object.freeze(e)}var r,o=i(e),n=(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),s=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i.prototype._createLegendMarker=function(t,i){return e.RectElement.create(t,e.Series.LEGEND_MARKER,0,0,i,i,2)},i.type=e.PictogramSeriesType,i.defaults=e.extend(e.BasedSeries.defaults,{iconGap:2,integral:!1,integralThreshold:.5}),i}(e.BasedSeries),a=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),l=function(t){function i(i){var r=t.call(this,i,e.SeriesView.POINT_CLASS)||this;return r.add(r._back=new e.RectElement(i)),r._back.setTransparent(!0),r}return a(i,t),i.prototype.preppareIcons=function(t,e,i,r){},i.prototype.layout=function(t,e,i){var r=this.wPoint,o=this.hPoint;e-=r/2,o<0&&(t=t.map(function(t){return-t})),this._back.setBounds(e,i-o,r,o)},i}(e.RcElement),h=function(t){function i(i){var r=t.call(this,i,"rct-pictogram-series")||this;return r._bars=new e.PointViewPool(r._pointContainer,l),r}return a(i,t),i.prototype._getPointPool=function(){return this._bars},i.prototype._preparePoints=function(t,e,i){var r=this;this._bars.prepare(i.length,function(t,o){var n=t.point=i[o];r._setPointStyle(t,e,n)})},i.prototype._shrinkPoint=function(t){},i.prototype._layoutPoint=function(t,e,i,r,o,n){t.wPoint=o,t.hPoint=n,t.layout(this._pts||[],i,r)},i}(e.BasedSeriesView),u=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),p=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return u(i,t),i.prototype._readObject=function(i,r){t.prototype._readObject.call(this,i,r),this.figure=e.pickProp(i._figureFielder(r),r.figure)},i.prototype._readArray=function(e,i){t.prototype._readArray.call(this,e,i);var r=+e.prop("figureField");isNaN(r)||(this.figure=i[r])},i}(e.BarSeriesPoint),c=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return u(i,t),i.prototype.getMode=function(){return this._mode},i.prototype.getFigure=function(){return this._figurePath},i.prototype.getImage=function(t){var e=t.figure;return"number"==typeof e&&(e=this._imageUrls[e]),!e&&this.prop("figureByPoint")&&(e=this._imageUrls[t.vindex%this._imageUrls.length]),this._imageRoot+(e||this._imageUrls[0])},i.prototype.getFigureWidth=function(t){return e.calcPercent(this._widthDim,t,t)},i.prototype.getFigureGap=function(){return this._figureGap},i.prototype._createPoint=function(t){return new p(t)},i.prototype._createLegendMarker=function(t,i){return e.RectElement.create(t,e.Series.LEGEND_MARKER,0,0,i,i,2)},i.prototype._doApply=function(i){t.prototype._doApply.call(this,i),this._figureFielder=this._createFielder(i.figureField||"figure"),this._figurePath=e.isArray(i.figurePath)?i.figurePath.join(" "):i.figurePath;var r=i.figureImage;e.isArray(r)?this._imageUrls=r.slice(0):e.isString(r)?this._imageUrls=[r]:this._imageUrls=[],this._imageRoot=e.isString(i.figureImageRoot)?i.figureImageRoot:"",this._mode="both"===i.mode||"figure"===i.mode?i.mode:i.figurePath?"both":"figure",this._figureGap=e.pickNum(i.figureGap,0),this._widthDim=e.parsePercentSize(i.figureWidth,!0)},i.type=e.PictorialBarSeriesType,i.defaults=e.extend(e.BarSeriesBase.defaults,{mode:"auto",figureWidth:"100%"}),i}(e.BarSeriesBase),f=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return f(e,t),e}(e.WidgetSeriesPoint),y=function(t){function e(e,i){var r=t.call(this,e)||this;return r.points=i,r}return f(e,t),e}(_),d=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return f(e,t),e.prototype.getDistance=function(){var t=this.num("distance");return isNaN(t)?"far"===this.prop("align")?e.ENDED_DIST:e.OUTSIDE_DIST:t||0},e.OUTSIDE_DIST=25,e.ENDED_DIST=10,e}(e.WidgetSeriesLabel),g=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return f(i,t),Object.defineProperty(i.prototype,"paths",{get:function(){return this._paths},enumerable:!1,configurable:!0}),i.prototype.getPictorialSize=function(t,i,r){var o=e.calcPercent(this._sizeDim,1),n=e.minv(i*o/t.width,r*o/t.height);return{width:e.pickNum(e.calcPercent(this._widthDim,i),t.width*n),height:e.pickNum(e.calcPercent(this._heightDim,r),t.height*n)}},Object.defineProperty(i.prototype,"pointLabel",{get:function(){return this._pointLabel},enumerable:!1,configurable:!0}),i.prototype._createLabel=function(t){return new d(t)},i.prototype._createPoint=function(t){return new _(t)},i.prototype._createOthersPoint=function(t,e){return t.y=e.map(function(t){return t.y}).reduce(function(t,e){return t+e}),new y(t,e)},i.prototype.needClip=function(t){return!1},i.prototype.getTotal=function(){var i=t.prototype.getSum.call(this);return Math.max(i,e.calcPercent(this._totalDim,i))},i.prototype.getSum=function(){var i=t.prototype.getSum.call(this),r=e.calcPercent(this._totalDim,i);return Math.max(i,e.pickNum(r,i))},i.prototype._doApply=function(i){t.prototype._doApply.call(this,i),this._paths=e.isArray(i.figure)?i.figure:[i.figure||""],this._setDims(i,"total","width","height"),this._sizeDim=e.parsePercentSize(this.prop("size"),!1)},i.prototype._createLegendMarker=function(t,i){return e.RectElement.create(t,e.Series.LEGEND_MARKER,0,0,i,i,2)},i.type=e.PictorialSeriesType,i.defaults=e.extend(e.WidgetSeries.defaults,{size:"90%",reversed:!1}),i}(e.WidgetSeries),m=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),v=function(t){function i(i){var r=t.call(this,i)||this;return r.add(r._figureLayer=new e.RcElement(i,"")),r._figureLayer.add(r._figureView=new e.PathElement(i,"")),r.add(r._imageLayer=new e.RcElement(i,"")),r._imageLayer.add(r._imageView=new e.ImageElement(i,!1,"")),r._imageView.setAttr("preserveAspectRatio","none"),r.add(r._boxView=new e.PathElement(i,"")),r._figureView.setAttr("vector-effect","non-scaling-stroke"),r}return m(i,t),i.prototype.renderSvg=function(t,e,i,r,o){var n,s=this._figureView;this._imageLayer.setVis(!1),this._figureLayer.setVis(!0),s.scale(1),s.setPath(r),n=s.getBounds(),t.both?s.scale(o/(t.inverted?n.height:n.width)):t.inverted?s.scale(o/n.height,(t.reversed?-1:1)*this.hPoint/n.width):s.scale(o/n.width,(t.reversed?-1:1)*this.hPoint/n.height),this.$_layoutFigure(t,this._figureLayer,this._figureView,e,i)},i.prototype.renderImage=function(t,e,i,r,o){var n=this._imageView;this._figureLayer.setVis(!1),this._imageLayer.setVis(!0),n.url=r,n.width=o,n.height=t.both?void 0:Math.abs(this.hPoint),this.$_layoutFigure(t,this._imageLayer,n,e,i)},i.prototype.$_layoutFigure=function(t,i,r,o,n){var s=r.getBounds(),a=!t.upperClip,l=this.hPoint,h=!1;t.inverted?t.reversed?a?(r.trans(o+s.height/2,n-l),this._dir="left"):l<0?(r.trans(o+s.height/2,-t.yBase-l),this._dir="left"):(r.trans(o-s.height/2,-t.yBase-l),this._dir="right"):a?(r.trans(o-s.height/2,-l),this._dir="right"):l<0?(r.trans(o+s.height/2,-t.yBase-l),this._dir="left"):(r.trans(o-s.height/2,-t.yBase-l),this._dir="right"):t.reversed?a?(r.trans(o+s.width/2,-l),this._dir="bottom"):l<0?(r.trans(o+s.width/2,t.yLen-t.yBase-l),this._dir="bottom"):(r.trans(o-s.width/2,t.yLen-t.yBase-l),this._dir="top"):a?(r.trans(o-s.width/2,n-l),this._dir="top"):l<0?(r.trans(o+s.width/2,t.yLen-t.yBase-l),this._dir="bottom"):(r.trans(o-s.width/2,t.yLen-t.yBase-l),this._dir="top"),a?(r.rotate(t.reversed?180:0),i.removeAttr("clip-path")):(h=this.point.yValue<t.base,t.reversed&&(h=!h),e.Dom.setClipPath(i.dom,h?t.lowerClip:t.upperClip),r.rotate(h?180:0)),this._boxView.setVis(t.both)&&(h||(h=a&&t.reversed),l-=(h?-1:1)*((t.inverted?s.width:s.height)+t.gap),this.$_layoutBox(t,h,o,n,l))},i.prototype.$_layoutBox=function(t,i,r,o,n){this._boxView.setVis(i?n<0:n>0)&&this._boxView.setPath(e.SvgShapes.bar(r-this.wPoint/2,o,this.wPoint,-n,t.rTop,t.rBottom))},i}(e.BoxPointElementEx),w=function(t){function i(e){return t.call(this,e,"rct-pictorialbar-series")||this}return m(i,t),i.prototype._createBarPool=function(t,i){return new e.PointViewPool(t,v)},i.prototype._prepareLayoutPoints=function(t,i){var r=this.model,o=this._yBase,n=this._baseVal>r._yAxisObj.axisMin();if(this._info={inverted:this._inverted,reversed:this._yReversed,base:this._baseVal,yBase:o,both:"both"===r.getMode(),gap:r.getFigureGap(),yLen:this._yLen,rTop:+r.prop("topRadius")||0,rBottom:+r.prop("bottomRadius")||0,upperClip:"",lowerClip:""},n){if(!this._upperClip){var s=this.doc,a=this.dom.querySelector("defs")||s.createElementNS(e.SVGNS,"defs"),l=e.Utils.uniqueKey()+"-";this.insertDom(a,this._pointContainer.dom),a.appendChild(this._upperClip=e.Dom.createClipRect(s,l+"upper")),a.appendChild(this._lowerClip=e.Dom.createClipRect(s,l+"lower"))}var h=this._upperClip.firstElementChild,u=this._lowerClip.firstElementChild;this._inverted?(e.Dom.setBounds(h,0,-t,i,t-o),e.Dom.setBounds(u,0,-o,i,t)):(e.Dom.setBounds(h,0,0,t,i-o),e.Dom.setBounds(u,0,i-o,t,o)),this._info.upperClip=this._upperClip.id,this._info.lowerClip=this._lowerClip.id}},i.prototype._shrinkPoint=function(t){},i.prototype._layoutPoint=function(t,i,r,o,n,s){var a=t.point,l=this.model.getFigure();this._needMask=l&&this._info.both,t.wPoint=n*e.pickNum(a.width,1),t.hPoint=s,t.x=r,l?t.renderSvg(this._info,r,o,l,this._model.getFigureWidth(n)):t.renderImage(this._info,r,o,this._model.getImage(a),this._model.getFigureWidth(n))},i.prototype.setHoverStyle=function(i){if(t.prototype.setHoverStyle.call(this,i),this._needMask){var r=getComputedStyle(i.dom),o="none"!==r.stroke?parseFloat(r.strokeWidth):0;if(this._hoverFigureView.parent.setVis(o>0&&this._info.gap<o)){e.Dom.setImportantStyle(i.dom.style,"stroke-width",e.pixel(o+o/2|0));var n=0;switch(i._dir){case"top":case"right":n=-o/2;break;case"bottom":case"left":n=o/2}this._hoverBoxView.setAttribute("transform","translate(".concat(0,", ").concat(n,")"))}}},i.prototype.focusPointView=function(t,e){e&&this._needMask?this.$_showHoverView(this._hoverPoint=t).setVis(!0):this._hoverFigureView&&(this._hoverFigureView.parent.setVis(!1),this._hoverPoint=null)},i.prototype._renderSeries=function(e,i){t.prototype._renderSeries.call(this,e,i),this._hoverPoint&&this._hoverFigureView&&this._hoverFigureView.parent.visible&&this.$_showHoverView(this._hoverPoint)},i.prototype.$_showHoverView=function(t){var i=this._hoverFigureView;if(!i){var r=this.doc,o=void 0;this.add(new e.RcElement(r,"")).add(i=this._hoverFigureView=new e.RcElement(r,"")),i.parent.dom.style.pointerEvents="none",i.appendDom(o=r.createElementNS(e.SVGNS,"path")),o.style.stroke="none",i.parent.appendDom(o=this._hoverBoxView=r.createElementNS(e.SVGNS,"path")),o.style.stroke="none"}var n=i.dom.firstElementChild,s=this._hoverBoxView;return i.parent.setAttr("clip-path",this._pointContainer.getAttr("clip-path")),i.setAttr("clip-path",t._figureLayer.getAttr("clip-path")),n.setAttribute("d",t._figureView.getAttr("d")),n.style.fill=getComputedStyle(t._figureView.dom).fill,n.setAttribute("transform",t._figureView.getTransform()),e.Dom.setVisible(s,t._boxView.visible)&&(s.setAttribute("d",t._boxView.getAttr("d")),s.style.fill=getComputedStyle(t._boxView.dom).fill),this._inverted&&i.parent.setAttr("transform","rotate(90) translate(".concat(this.height,",").concat(0,") scale(-1, 1)")),i},i}(e.BarSeriesViewBase),P=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),b=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return P(e,t),e.prototype.getTooltipPos=function(){return{x:this.point.xPos+this.parent.parent.tx,y:this.point.yPos+this.parent.parent.ty}},e}(e.PointElement),S=function(t){function i(i){var r=t.call(this,i,"rct-pictorial-series")||this,o=e.Utils.uniqueKey()+"-",n=o+"figure",s=o+"clip",a=o+"hover";r._figurelView=i.createElementNS(e.SVGNS,"use"),r._figurelView.setAttribute("href","#".concat(n)),r._figurelView.setAttribute("class","rct-pictorial-series-figure"),r.insertDom(r._figurelView,r._pointContainer.dom);var l=i.createElementNS(e.SVGNS,"defs");r.insertDom(l,r._figurelView),r._sourceView=new e.PathElement(i),r._sourceView.setAttr("vector-effect","non-scaling-stroke"),r._sourceView.dom.id=n,l.appendChild(r._sourceView.dom);var h=i.createElementNS(e.SVGNS,"use"),u=i.createElementNS(e.SVGNS,"clipPath"),p=i.createElementNS(e.SVGNS,"clipPath");return h.setAttribute("href","#".concat(n)),u.appendChild(h),u.id=s,l.appendChild(u),p.appendChild(r._hoverRect=i.createElementNS(e.SVGNS,"path")),p.id=a,l.appendChild(p),r._hoverView=i.createElementNS(e.SVGNS,"use"),r._hoverView.setAttribute("href","#".concat(n)),r._hoverView.setAttribute("clip-path","url(#".concat(a)),r._hoverView.style.stroke="none",r._hoverView.style.fill="none",r.appendDom(r._hoverView),r._pointContainer.add(r._sliceLayer=new e.LayerElement(i,null)),r._pointContainer.setAttr("clip-path","url(#".concat(s,")")),r._slices=new e.PointViewPool(r._sliceLayer,b),r.add(r._lineContainer=new e.PointLabelLineContainer(i)),r}return P(i,t),i.prototype._getPointPool=function(){return this._slices},i.prototype.getClipContainer=function(){return null},i.prototype._prepareSeries=function(e,i){t.prototype._prepareSeries.call(this,e,i),this.$_prepareSlices(e,i,this._visPoints),this._lineContainer.prepare(i)},i.prototype._renderSeries=function(t,i){this.$_renderFigure(this._sourceView,this._model,t,i);var r=this._visPoints,o=this.model.getCenter(t,i),n=this._figurelView.getBoundingClientRect(),s=o.x-n.width/2,a=o.y-n.height/2,l="translate(".concat(s,",").concat(a,")");e.Dom.hasFill(this._figurelView)||(this._figurelView.style.fill="transparent"),this._figurelView.setAttribute("transform",l),this._hoverView.setAttribute("transform",l),n.x=s,n.y=a,this.$_layoutSlices(r,n,t,i),this._pointContainer.trans(s,a),this._labelContainer.trans(s,a),this._lineContainer.trans(s,a),this.resize(n.width,n.height),this._rSave=n,this._wSave=t,this._hSave=i},i.prototype._runShowEffect=function(t){var i=this.model.prop("reversed");t&&e.SeriesAnimation.reveal(this,{from:"column"===this.model.prop("direction")?i?"right":"left":i?"top":"bottom",view:this._sliceLayer})},i.prototype._refreshZombie=function(){this.$_layoutSlices(this._visPoints,this._rSave,this._wSave,this._hSave),this._hoverPoint&&!e.Dom.isHidden(this._hoverView)&&this.$_showHoverView(this._hoverPoint)},i.prototype._animationStarted=function(e){t.prototype._animationStarted.call(this,e),this._lineContainer.setVis(this._labelContainer.visible)},i.prototype.setHoverStyle=function(i){t.prototype.setHoverStyle.call(this,i);var r=getComputedStyle(i.dom),o="none"!==r.stroke&&parseFloat(r.strokeWidth)>0;e.Dom.setVisible(this._hoverView,o)&&Object.assign(this._hoverView.style,{stroke:r.stroke,strokeWidth:r.strokeWidth,strokeDasharray:r.strokeDasharray})},i.prototype.focusPointView=function(t,e){this._hoverView.style.display=e?"":"none",e&&this.$_showHoverView(t),this._hoverPoint=e?t:null},i.prototype.$_showHoverView=function(t){this._hoverRect.setAttribute("d",t.getAttr("d"))},i.prototype.$_prepareSlices=function(t,e,i){var r=this;this._slices.prepare(i.length,function(o,n){var s=o.point=i[n];r._preparePoint(t,e,s,o)})},i.prototype.$_renderFigure=function(t,i,r,o){var n,s;t.setPath(i.paths),n=t.getBBox(),s=i.getPictorialSize(n,r,o),t.scale(s.width/n.width,s.height/n.height),e.isIE&&this.$_prepareOutline(this._sourceView.dom,r,o,s.width/n.width,s.height/n.height)},i.prototype.$_layoutSlices=function(t,e,i,r){var o=this._model,n=o.pointLabel,s=o.prop("reversed");this.$_calcRates(t),this._lineContainer.setStyleOrClass(n.connector.prop("style")),"column"===o.prop("direction")?this.$_renderHorz(s,e,r):this.$_renderVert(s,e,i)},i.prototype.$_calcRates=function(t){var i=this._zombie,r=this._zombieRate,o=t.length,n=this.model.getTotal();(isNaN(n)||t.find(function(t){return t._isDeleted()}))&&(n=t.filter(function(t){return(t.visible||t===i)&&!t.isNull}).map(function(t){return t.yValue*(t===i?r:t._isDeleted()?t._vr:1)}).reduce(function(t,e){return t+e},0)),o>1||o>0&&!i?1==o&&t[0]._isDeleted()||1===o&&t[0]._vr<1?t[0].yRate=1:t.forEach(function(t){var o=e.fixnum(t.yValue*(t===i?r:t._isDeleted()?t._vr:1)/n)||0;t.yRate=o}):1==o&&(t[0].yRate=e.fixnum(r))},i.prototype.$_createLabelInfo=function(t){var e=t.getCTM(),i=e.a,r=e.d,o=t.getBBox();return{dom:t,sx:i,sy:r,wFigure:o.width,hFigure:o.height}},i.prototype.$_renderVert=function(t,i,r){var o,n,s=this,a=this.model,l=i.width,h=i.height,u=this._labelViews(),p=a.pointLabel,c="inside"===a.getLabelPos(p),f=p.getDistance(),_=p.getWidgetAlign(),y=null==u?void 0:u.textAlign(),d=[],g=p.prop("opposite"),m=this._lineContainer.setVis(p.connector.visible)?this._lineContainer:null,v=new e.PathBuilder,w=a.getCenter(r,h).x-i.x,P=l/2,b=t?0:h,S=u?u.getWidth(0):0,V=d&&!c&&this.$_createLabelInfo(this._sourceView.dom);this._slices.forEach(function(p){var x=p.point;if(p.setVis(!x.isNull)){var L=h*x.yRate;if(t?(p.setPath(e.SvgShapes.rectangle(0,b,l,L)),x.yPos=b+L/2,b+=L):(x.yPos=b-L/2,b-=L,p.setPath(e.SvgShapes.rectangle(0,b,l,L))),x.xPos=P,n=null==m?void 0:m.get(x),u&&(o=u.get(x,0))&&o.visible){var E=a.getLabelOff2(x);if(c){var C=o.isDomAnimating(),B=o.getBBox();!C&&o.layout(y||"center"),null==n||n.setVis(!1),o.trans(x.xPos-B.width/2,x.yPos-B.height/2)}else-1===_?s.$_layoutLabelNearVert(V,p,o,y,g,n,v,l,w,E,f):1==_?s.$_layoutLabelFarVert(V,p,o,y,g,n,v,E,f,S,i,r):s.$_layoutLabelOutVert(V,p,o,y,g,n,v,E,f);o.setContrast(c&&p.dom),d.push(o),o.setPosY(o.ty),s._layoutLabelRotation(o)}else n&&n.setVis(!1)}})},i.prototype.$_renderHorz=function(t,i,r){var o,n,s=this,a=this.model,l=i.width,h=i.height,u=this._labelViews(),p=a.pointLabel,c="inside"===a.getLabelPos(p),f=p.getDistance(),_=p.getWidgetAlign(),y=null==u?void 0:u.textAlign(),d=[],g=p.prop("opposite"),m=this._lineContainer.setVis(p.connector.visible)?this._lineContainer:null,v=new e.PathBuilder,w=a.getCenter(l,r).y-i.y,P=h/2,b=u?u.getWidth(0):0,S=d&&!c&&this.$_createLabelInfo(this._sourceView.dom),V=t?l:0;this._slices.forEach(function(p){var x=p.point;if(p.setVis(!x.isNull)){var L=l*x.yRate;if(t?(x.xPos=V-L/2,V-=L,p.setPath(e.SvgShapes.rectangle(V,0,L,h))):(x.xPos=V+L/2,p.setPath(e.SvgShapes.rectangle(V,0,L,h)),V+=L),x.yPos=P,n=null==m?void 0:m.get(x),u&&(o=u.get(x,0))&&o.visible){var E=a.getLabelOff2(x);if(c){var C=o.isDomAnimating(),B=o.getBBox();!C&&o.layout(y||"center"),o.trans(x.xPos-B.width/2,x.yPos-B.height/2),null==n||n.setVis(!1)}else-1===_?s.$_layoutLabelNearHorz(S,p,o,y,g,n,v,h,w,E,f):1==_?s.$_layoutLabelFarHorz(S,p,o,y,g,n,v,E,f,b,i,r):s.$_layoutLabelOutHorz(S,p,o,y,g,n,v,E,f);o.setContrast(c&&p.dom),d.push(o),o.setPosY(o.ty),s._layoutLabelRotation(o)}else n&&n.setVis(!1)}})},i.prototype.$_prepareOutline=function(t,i,r,o,n){var s,a=+new Date,l=this.control.canvasCtx(),h=t.getTotalLength(),u=e.maxv(1,Math.round(h/500));l.setTransform(1,0,0,1,0,0),l.clearRect(0,0,i,r),l.scale(o,n),l.fillStyle="red",l.beginPath(),s=t.getPointAtLength(0),l.moveTo(s.x,s.y);for(var p=0;p<h;p+=u)s=t.getPointAtLength(p),l.lineTo(s.x,s.y);l.closePath(),l.fill(),console.log("canvas",+new Date-a,"ms.")},i.prototype.$_calcLabelPosVert=function(t,e,i){var r=t.dom,o=r.ownerSVGElement.createSVGPoint(),n=t.wFigure,s=t.sx,a=2*(t.sx<0?1:1/t.sx),l=i?0:t.wFigure;if(o.y=e.point.yPos/t.sy,i){for(;l<n;l+=a)if(o.x=l,r.isPointInFill(o))return l>0&&(o.x-=a/2,r.isPointInFill(o)&&(l=o.x)),l*s}else for(;l>=0;l-=a)if(o.x=l,r.isPointInFill(o))return l<n&&(o.x+=a/2,r.isPointInFill(o)&&(l=o.x)),l*s;return t.wFigure*t.sx/2},i.prototype.$_calcLabelPosVertIE=function(t,e,i){var r=this.control.canvasCtx(),o={x:0,y:0},n=t.wFigure,s=t.sx,a=2*(s<0?1:1/s),l=o.y=e.point.yPos,h=i?0:n*s;if(i){for(var u=n*s;h<u;h+=a)if(o.x=h,r.isPointInPath(o.x,l))return h>0&&(o.x-=a/2,r.isPointInPath(o.x,l)&&(h=o.x)),h}else for(;h>=0;h-=a)if(o.x=h,r.isPointInPath(h,l))return h<n*s&&(o.x+=a/2,r.isPointInPath(o.x,l)&&(h=o.x)),h;return n/2},i.prototype.$_layoutLabelOutVert=function(t,i,r,o,n,s,a,l,h){var u=i.point,p=r.isDomAnimating(),c=r.getBBox(),f=u.yPos;!p&&r.layout(o||(n?"right":"left"));var _=e.isIE?this.$_calcLabelPosVertIE(t,i,n):this.$_calcLabelPosVert(t,i,n);s&&(n?s.setLine(a.reset(0,0).line(-h,0).end()):s.setLine(a.reset(0,0).line(h,0).end()),s.trans(_,f)),n?_-=h+l+c.width:_+=h+l,r.trans(_,f-c.height/2)},i.prototype.$_layoutLabelNearVert=function(t,i,r,o,n,s,a,l,h,u,p){var c=i.point,f=r.isDomAnimating(),_=r.getBBox(),y=c.yPos;!f&&r.layout(o||(n?"right":"left"));var d=e.isIE?this.$_calcLabelPosVertIE(t,i,n):this.$_calcLabelPosVert(t,i,n),g=h;n?g-=l/2:g+=l/2,s&&(n?s.setLine(a.reset(0,0).line(g-d-p,0).end()):s.setLine(a.reset(0,0).line(g+p-d,0).end()),s.trans(d,y)),n?g-=u+p+_.width:g+=p+u,r.trans(g,y-_.height/2)},i.prototype.$_layoutLabelFarVert=function(t,i,r,o,n,s,a,l,h,u,p,c){var f=i.point,_=r.isDomAnimating(),y=r.getBBox(),d=f.yPos;!_&&r.layout(o||(n?"right":"left"));var g,m=e.isIE?this.$_calcLabelPosVertIE(t,i,n):this.$_calcLabelPosVert(t,i,n);g=n?h+l+u-p.x:c-p.x-h-u-l,s&&(n?s.setLine(a.reset(0,0).line(g-m-h,0).end()):s.setLine(a.reset(0,0).line(g+h-m,0).end()),s.trans(m,d)),n?g-=l+h+y.width:g+=h+l,r.trans(g,d-y.height/2)},i.prototype.$_calcLabelPosHorz=function(t,e,i){var r=t.dom,o=r.ownerSVGElement.createSVGPoint(),n=t.hFigure,s=t.sy,a=2*(t.sy<0?1:1/t.sy),l=i?t.hFigure:0;if(o.x=e.point.xPos/t.sx,i){for(;l>=0;l-=a)if(o.y=l,r.isPointInFill(o))return l<t.hFigure&&(o.y+=a/2,r.isPointInFill(o)&&(l=o.y)),l*s}else for(;l<n;l+=a)if(o.y=l,r.isPointInFill(o))return l>0&&(o.y-=a/2,r.isPointInFill(o)&&(l=o.y)),l*s;return t.hFigure*t.sy/2},i.prototype.$_calcLabelPosHorzIE=function(t,e,i){var r=this.control.canvasCtx(),o={x:0,y:0},n=t.hFigure,s=t.sy,a=2*(t.sy<0?1:1/t.sy),l=o.x=e.point.xPos,h=i?n*s:0;if(i){for(;h>=0;h-=a)if(o.y=h,r.isPointInPath(l,o.y))return h<n*s&&(o.y+=a/2,r.isPointInPath(l,o.y)&&(h=o.y)),h}else for(;h<n;h+=a)if(o.y=h,r.isPointInPath(l,o.y))return h>0&&(o.y-=a/2,r.isPointInPath(l,o.y)&&(h=o.y)),h;return t.hFigure*t.sy/2},i.prototype.$_layoutLabelOutHorz=function(t,i,r,o,n,s,a,l,h){var u=i.point,p=r.isDomAnimating(),c=r.getBBox(),f=u.xPos;!p&&r.layout(o);var _=e.isIE?this.$_calcLabelPosHorzIE(t,i,n):this.$_calcLabelPosHorz(t,i,n);s&&(n?s.setLine(a.reset(0,0).line(0,h).end()):s.setLine(a.reset(0,0).line(0,-h).end()),s.trans(f,_)),n?_+=h+l:_-=h+l,r.trans(f-c.width/2,n?_:_-c.height)},i.prototype.$_layoutLabelNearHorz=function(t,i,r,o,n,s,a,l,h,u,p){var c=i.point,f=r.isDomAnimating(),_=r.getBBox(),y=c.xPos;!f&&r.layout(o||(n?"right":"left"));var d=e.isIE?this.$_calcLabelPosHorzIE(t,i,n):this.$_calcLabelPosHorz(t,i,n),g=h;n?g+=l/2:g-=l/2,s&&(n?s.setLine(a.reset(0,0).line(0,g+p-d).end()):s.setLine(a.reset(0,0).line(0,g-d-p).end()),s.trans(y,d)),n?g+=p+u:g-=u+p+_.height,r.trans(y-_.width/2,g)},i.prototype.$_layoutLabelFarHorz=function(t,i,r,o,n,s,a,l,h,u,p,c){var f=i.point,_=r.isDomAnimating(),y=r.getBBox(),d=f.xPos;!_&&r.layout(o||(n?"right":"left"));var g,m=e.isIE?this.$_calcLabelPosHorzIE(t,i,n):this.$_calcLabelPosHorz(t,i,n);g=n?c-p.y-h-u-l:h+l+u-p.y,s&&(n?s.setLine(a.reset(0,0).line(0,g+h-m).end()):s.setLine(a.reset(0,0).line(0,g-m-h).end()),s.trans(d,m)),n?g+=h+l:g-=l+h+y.height,r.trans(d-y.width/2,g)},i}(e.WidgetSeriesView);function V(t){(function(t){return!!(t&&t.Series&&t.SeriesView)})(t)&&(t.Series.register(s),t.Series.register(c),t.Series.register(g),t.SeriesView.register([s,h]),t.SeriesView.register([c,w]),t.SeriesView.register([g,S]))}V(o),t.PictogramSeries=s,t.PictorialBarSeries=c,t.PictorialSeries=g,t.default=V,Object.defineProperty(t,"__esModule",{value:!0})});
package/ie/split.ie.js CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  /**
3
- * RealChart Split v1.4.33
3
+ * RealChart Split v1.5.0
4
4
  * Copyright (C) 2023-2026 WooriTech Inc.
5
5
  * All Rights Reserved.
6
6
  */
7
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("realchart")):"function"==typeof define&&define.amd?define(["exports","realchart"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).RealChartSplit={},t.RealChart)}(this,function(t,e){"use strict";function o(t){var e=Object.create(null);return t&&Object.keys(t).forEach(function(o){if("default"!==o){var r=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(e,o,r.get?r:{enumerable:!0,get:function(){return t[o]}})}}),e.default=t,Object.freeze(e)}var r,i=o(e),n=(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),s=function(){function t(t,e){this.row=t,this.col=e,this._axes=[]}return t.prototype.sort=function(t,e){var o=this,r=e&&!t||!e&&t;this._axes.length>1&&(r?this._axes.sort(function(t,e){var r=t._posValue(),i=e._posValue();return r===i?r<0?e._index-t._index:r>0?t._index-e._index:t.row!==e.row?e.row-t.row:t.row<o.row?e._index-t._index:t._index-e._index:i-r}):this._axes.sort(function(t,e){var r=t._posValue(),i=e._posValue();return r===i?r<0?t._index-e._index:r>0?e._index-t._index:t.col!==e.col?t.col-t.col:t.col<o.col?t._index-e._index:e._index-t._index:r-i}))},t}(),a=function(){function t(t,e){this.chart=t,this.isX=e}return t.prototype.rows=function(){return this._matrix.length},t.prototype.cols=function(){return this._matrix[0].length},t.prototype._prepare=function(t,e,o,r){var i=this;this._doPrepare(t,e,o),this._matrix.forEach(function(t){t.forEach(function(t){return t.sort(i.isX,r)})})},t.prototype.get=function(t,e){return this._matrix[t][e]},t.prototype.getRow=function(t){return this._matrix[t]},t.prototype.getColumn=function(t){return this._matrix.map(function(e){return e[t]})},t.prototype._buildTicks=function(t,e){var o=this.isX;this._matrix.forEach(function(r,i){r.forEach(function(r,i){r._axes.forEach(function(r){!r.isBased()&&(e<2||o)&&r._buildTicks(t[o?r.prop("col"):r.prop("row")],e)})})}),this._matrix.forEach(function(r,i){r.forEach(function(r,i){r._axes.forEach(function(r){r.isBased()&&(e<2||o)&&r._buildTicks(t[o?r.prop("col"):r.prop("row")],e)})})})},t.prototype._calcPoints=function(t,e){var o=this.isX;this._matrix.forEach(function(r){r.forEach(function(r,i){r._axes.forEach(function(r){if(e<2||o){var i=o?r.prop("col"):r.prop("row");r._calcPoints(t[i],e)}})})})},t}(),c=function(t){function e(e){return t.call(this,e,!0)||this}return n(e,t),e.prototype._doPrepare=function(t,e,o){for(var r=this._matrix=new Array(e+1),i=0;i<r.length;i++){r[i]=[];for(var n=0;n<o;n++)r[i].push(new s(i,n))}t.forEach(function(t){var o,i,n=t.prop("position"),s=t.row;"opposite"===n?(s++,t._runPos=n):s<e-1&&"between"===n?(s++,t._runPos="normal"):t._runPos=n,null===(i=null===(o=r[s])||void 0===o?void 0:o[t.col])||void 0===i||i._axes.push(t)})},e}(a),h=function(t){function e(e){return t.call(this,e,!1)||this}return n(e,t),e.prototype._doPrepare=function(t,e,o){for(var r=this._matrix=new Array(e),i=0;i<r.length;i++){r[i]=[];for(var n=0;n<=o;n++)r[i].push(new s(i,n))}t.forEach(function(t){var e,i,n=t.prop("position"),s=t.col;"opposite"===n?(s++,t._runPos=n):t.col<o-1&&"between"===n?(s++,t._runPos="normal"):t._runPos=n,null===(i=null===(e=r[t.row])||void 0===e?void 0:e[s])||void 0===i||i._axes.push(t)})},e}(a),u=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),p=function(t){function o(e){var o=t.call(this,e.chart)||this;return o.pane=e,o}return u(o,t),o.prototype.contains=function(t){return t.col===this.pane.col||t.row===this.pane.row},o.defaults=e.extend(e.Body.defaults,{extended:!0,radius:void 0,centerX:void 0,centerY:void 0}),o}(e.Body),f=function(t){function e(e){var o=t.call(this,e.chart)||this;return o.pane=e,o}return u(e,t),e.prototype._doPrepareRender=function(e){t.prototype._doPrepareRender.call(this,e),this._location="body"},e.prototype._getLegendSources=function(){return this.prop("visible")?this.chart._getSeries().getLegendSources(this.pane.row,this.pane.col):[]},e}(e.Legend),l=function(t){function e(e,o,r){var i=t.call(this,e)||this;return i.row=o,i.col=r,i}return u(e,t),e.prototype._doInit=function(t){this._body=this._addChild("body",new p(this)),this._legend=this._addChild("legend",new f(this))},Object.defineProperty(e.prototype,"body",{get:function(){return this._body},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"legend",{get:function(){return this._legend},enumerable:!1,configurable:!0}),e.prototype._prepareRender=function(){this._body._prepareRender(),this._legend._prepareRender()},e}(e.ChartItem),_=function(t){function o(e){var o=t.call(this,e)||this;return o._cols=1,o._rows=1,o._paneDic={},o._panes=[],o._xAxes=new c(e),o._yAxes=new h(e),o}return u(o,t),Object.defineProperty(o.prototype,"count",{get:function(){return this._rows*this._cols},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"rowCount",{get:function(){return this._rows},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"colCount",{get:function(){return this._cols},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"paneCount",{get:function(){return this._rows*this._cols},enumerable:!1,configurable:!0}),o.prototype.colSizes=function(){return this._colSizes},o.prototype.rowSizes=function(){return this._rowSizes},o.prototype.getPane=function(t,e){return this._panes[t][e]},o.prototype.getRow=function(t){return this._panes[t]},o.prototype.getColumn=function(t){return this._panes.map(function(e){return e[t]})},o.prototype.getAxisOf=function(t,e){var o,r,i=this.chart,n=t.body;if(n){var s=n.pane;return e?i._getXAxes().get(t.prop("xAxis"))||this._xAxes.get(s.row,s.col)._axes[0]||(null===(o=i._getSeries().getPaneSeries(s.row,s.col)[0])||void 0===o?void 0:o._xAxisObj):i._getXAxes().get(t.prop("yAxis"))||this._yAxes.get(n.pane.row,n.pane.col)._axes[0]||(null===(r=i._getSeries().getPaneSeries(s.row,s.col)[0])||void 0===r?void 0:r._yAxisObj)}},o.prototype.isValidAxis=function(t){return t&&t.row<this._rows&&t.col<this._cols},o.prototype._doLoadProp=function(e,o){return["panes","cols","rows"].indexOf(e)>=0||t.prototype._doLoadProp.call(this,e,o)},o.prototype._doSetSimple=function(o,r){var i=arguments.length<2?o:r;if(e.isArray(i)&&i.length>0){var n=e.maxv(1,+i[0]),s=e.maxv(1,e.pickNum(+i[1],n));return n>0&&s>0&&(this.$_parsePanes(n,s),this.visible=!0),!0}return t.prototype._doSetSimple.call(this,o,i)},o.prototype._load=function(o){return t.prototype._load.call(this,o),e.isObject(o)&&(this.$_parsePanes(o.rows,o.cols),this._paneDic=this.$_loadPanes(o.panes)),this},o.prototype._doPrepareRender=function(t){this._panes=this.$_collectPanes(t),this._panes.forEach(function(t){return t.forEach(function(t){return t._prepareRender()})})},o.prototype._calcSizes=function(t,o){var r=t.length,i=new Array(r),n=0;if(r>1){var s=o,a=0;for(n=0;n<r;n++){var c=t[n];e.isNumber(c)?s-=i[n]=Math.max(0,Math.min(s,c)):a+=c.size}if(a>0)for(n=0;n<r;n++){c=t[n];e.isNumber(c)||(i[n]=s*c.size/a)}}else i[n]=o;return i},o.prototype.getXLens=function(t){return this._calcSizes(this._colSizes,t)},o.prototype.getYLens=function(t){return this._calcSizes(this._rowSizes,t)},o.prototype.measureAxes=function(t,e,o,r){var i=this.getXLens(o?e:t),n=this.getYLens(o?t:e);this._xAxes._buildTicks(i,r),this._yAxes._buildTicks(n,r),this.$_calcAxesPoints(i,n,r)},o.prototype.$_calcAxesPoints=function(t,e,o){this._xAxes._calcPoints(t,o),this._yAxes._calcPoints(e,o)},o.prototype.completeAxesPoints=function(t,e){this.$_calcAxesPoints(t,e,101)},o.prototype.getBodyAnnotation=function(t){for(var e in this._paneDic){var o=this._paneDic[e].body.getAnnotation(t);if(o)return o}},o.prototype.prepareRender=function(t,e){var o=this.chart.isInverted();this._prepareRender(),this._xAxes._prepare(t,this._rows,this._cols,o),this._yAxes._prepare(e,this._rows,this._cols,o)},o.prototype.$_parseSizes=function(t){return(e.isArray(t)&&t.length>0?t.slice(0):t>0?new Array(t).fill("*"):["*"]).map(function(t){if(e.isString(t)){var o=t.trim();return{size:"*"===o?1:e.pickNum(parseFloat(o),1)}}return e.pickNum(+t,1)})},o.prototype.$_parsePanes=function(t,e){this._colSizes=this.$_parseSizes(e),this._rowSizes=this.$_parseSizes(t),this._cols=this._colSizes.length,this._rows=this._rowSizes.length},o.prototype.$_loadPanes=function(t){var o=this,r=this.chart,i=this.prop("extendBody")?r._body._config:void 0,n={};if(t=e.isArray(t)?t:e.isObject(t)?[t]:null,e.isArray(t)&&t.forEach(function(t){var e=+t.row||0,s=+t.col||0;if(s>=0&&s<o._cols&&e>=0&&e<o._rows){var a=new l(r,e,s),c=t;a.init(),!i||t&&t.body&&!1===t.body.extended||(t?(c=Object.assign({},t),t.body?!1!==t.body.extended&&(c.body=Object.assign({},i,t.body)):c.body=i):c={body:i}),a._load(c),n[e+","+s]=a}}),i)for(var s=0;s<this._rows;s++)for(var a=0;a<this._cols;a++){var c=s+","+a;if(!n[c]){var h=new l(r,s,a);h.init(),h._load({body:i}),n[c]=h}}return n},o.prototype.$_collectPanes=function(t){for(var e=[],o=0;o<this._rows;o++){for(var r=[],i=0;i<this._cols;i++){var n=this._paneDic[o+","+i]||new l(t,o,i)._initObject();r.push(n)}e.push(r)}return e},o.defaults=e.extend(e.ChartItem.defaults,{visible:!1,extendBody:!0,gap:0}),o}(e.ChartItem),d=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.views=[],e._gap=0,e}return d(e,t),e.prototype.isEmpty=function(){return 0===this.views.length},e.prototype.prepare=function(t,e,o,r,i){var n=this.views,s=[];for(this.isX=r,i._axes.forEach(function(t){t.checkVisible()&&o.isValidAxis(t)&&s.push(t)});n.length<s.length;){var a=e.createAxisView(t);this.add(a),n.push(a)}for(;n.length>s.length;)n.pop().remove();if(n.forEach(function(t,e){t.setModel(s[e])}),this.axes=s,this.setVis(n.length>0)){var c=n[0].model;this._gap=c.chart.getAxesGap()}},e.prototype.prepareGuides=function(t,e,o){var r=this,i=this.views,n=this.axes;i.forEach(function(o,i){var s=n[i];e.forEach(function(e){e.forEach(function(e){e.isConnected(s)&&o.setVis(r.visible)&&(o.prepareGuides(t,e.row,e.col,e._guideContainer,e._frontGuideContainer),s._isHorz||(e._axes||(e._axes=[]),e._axes.push(s)))})})}),e.forEach(function(e){e.forEach(function(e){e._axes&&(e._gridRowContainer.addAll(t,e._axes),e._axes=[])})})},e.prototype.checkHeights=function(t,e,o){return this.views.length>0?this.$_checkHeights(this.views,t,e,o):0},e.prototype.$_checkHeights=function(t,e,o,r){var i=0;return t&&(t.forEach(function(t){i+=t.checkHeight(e,o,r)}),i+=(this.views.length-1)*this._gap),i},e.prototype.checkWidths=function(t,e,o){return this.views.length>0?this.$_checkWidths(this.views,t,e,o):0},e.prototype.$_checkWidths=function(t,e,o,r){var i=0;return t&&(t.forEach(function(t){i+=t.checkWidth(e,o,r)}),i+=(this.views.length-1)*this._gap),i},e.prototype.getScrollView=function(t){for(var e,o=0,r=this.views;o<r.length;o++){var i=r[o];if(null===(e=i._scrollView)||void 0===e?void 0:e.contains(t))return i._scrollView}},e.prototype.setMargins=function(t,e,o,r){this.views.forEach(function(i){return i.setMargins(t,e,o,r)})},e.prototype._setInverted=function(e){t.prototype._setInverted.call(this,e),this.isHorz=e&&!this.isX||!e&&this.isX},e.prototype._doMeasure=function(t,e,o,r,i){var n=this.axes;if(this.isHorz){var s=0;return this.views.forEach(function(e,a){s+=e.measure(t,n[a],o,r,i).height}),{width:o,height:s}}var a=0;return this.views.forEach(function(e,s){a+=e.measure(t,n[s],o,r,i).width}),{width:a,height:r}},e.prototype._doLayout=function(t){var e=this.views,o=this.width,r=this.height,i=e.length,n=0,s=i-1;if(this.isHorz){for(var a=0,c=void 0;n<i;n++){if((d=e[n]).model._posValue()<1)break;d.trans(0,a),a+=d.mh}for(c=a,a=r;s>=0;s--){if((d=e[s]).model._posValue()>-1)break;a-=d.mh,d.trans(0,a)}for(var h=a-c,u=0,p=n;p<=s;p++)u+=e[p].mh;c+=(h-u)/2;for(p=n;p<=s;p++){(d=e[p]).trans(0,c),c+=d.mh}e.forEach(function(t){t.resize(o,t.mh),t.model._calcPoints(o,999),t.layout()})}else{for(var f=0,l=void 0;n<i;n++){if((d=e[n]).model._posValue()>-1)break;d.trans(f,0),f+=d.mw}for(l=f,f=o;s>=0;s--){if((d=e[s]).model._posValue()<1)break;f-=d.mw,d.trans(f,0)}var _=f-l;for(u=0,p=n;p<=s;p++)u+=e[p].mw;l+=(_-u)/2;for(p=n;p<=s;p++){var d;(d=e[p]).trans(l,0),l+=d.mw}e.forEach(function(t){t.resize(t.mw,r),t.model._calcPoints(r,999),t.layout()})}},e}(e.SectionView),g=function(t){function o(e,o){var r=t.call(this,e,"rct-axis-container")||this;return r.isX=o,r.sections=[],r}return d(o,t),o.prototype.prepare=function(t,e,o,r,i,n){for(var s=this,a=this.isX?r.getRow(i):r.getColumn(i);this.sections.length<a.length;){var c=new y(t);this.add(c),this.sections.push(c)}for(;this.sections.length>a.length;)this.sections.pop().remove();this.sections.forEach(function(r,n){s.isX?(r.row=i,r.col=n):(r.col=i,r.row=n),r.prepare(t,e,o,s.isX,a[n])}),this._setInverted(n)},o.prototype.prepareGuides=function(t,e,o,r){for(var i=this,n=this.isX?o.getRow(r):o.getColumn(r);this.sections.length<n.length;){var s=new y(t);this.add(s),this.sections.push(s)}for(;this.sections.length>n.length;)this.sections.pop().remove();this.sections.forEach(function(n,s){i.isX?(n.row=r,n.col=s):(n.col=r,n.row=s),n.prepareGuides(t,e,o)})},o.prototype.checkWidths=function(t,e,o){return this.sections.length>0?this._isHorz?this.sections.reduce(function(r,i){return r+i.checkWidths(t,e,o)},0):this.sections.reduce(function(r,i){return Math.max(r,i.checkWidths(t,e,o))},0):0},o.prototype.checkHeights=function(t,e,o){return this.sections.length>0?this._isHorz?this.sections.reduce(function(r,i){return Math.max(r,i.checkHeights(t,e,o))},0):this.sections.reduce(function(r,i){return r+i.checkHeights(t,e,o)},0):0},o.prototype._setInverted=function(e){t.prototype._setInverted.call(this,e),this._isHorz=e&&!this.isX||!e&&this.isX},o.prototype._doMeasure=function(t,o,r,i,n){var s=0,a=0;return this._isHorz?this.sections.forEach(function(s){a=e.maxv(a,s.measure(t,o,r,i,n).height)}):this.sections.forEach(function(a){s=e.maxv(s,a.measure(t,o,r,i,n).width)}),{width:s,height:a}},o.prototype._doLayout=function(t){var e=this;this._isHorz?this.height>0&&this.sections.forEach(function(o,r){o.resize(t[2*(r+1)]-t[2*(r+1)-1],e.height),o.trans(t[2*r+1]-t[1],0),o.layout()}):this.width>0&&this.sections.forEach(function(o,r){o.resize(e.width,t[2*(r+1)]-t[2*(r+1)-1]),o.trans(0,e.height-(t[2*(r+1)]-t[1])),o.layout()})},o.prototype.layoutPanes=function(t,e){var o=this;this.sections.forEach(function(r,i){var n=t[i],s=n[0],a=n[1],c=a-s;o._isHorz?(r.resize(c,o.height),r.trans(s-e,0)):(r.resize(o.width,c),r.trans(0,o.height-(a-e))),r.layout()})},o}(e.SectionView),v=function(t){function o(o,r){var i=t.call(this,o,r)||this;return i.row=0,i.col=0,i.add(i._legendView=new e.LegendView(o)),i}return d(o,t),o.prototype.getCol=function(){return this.col},o.prototype.getRow=function(){return this.row},o.prototype.getTooltipPos=function(){return{x:this.parent.parent.tx+this.tx,y:this.parent.parent.ty+this.ty}},o.prototype.prepareRender=function(t,o){var r=o.chart,i=o.depth.visible,n=this.row,s=this.col,a=r._split.getPane(n,s).body;this._animatable=e.RcControl._animatable&&r.animatable(),this._prepareSeries(t,o,r._getSeries().getPaneSeries(n,s),i),this._prepareGauges(t,r,r._getGauges().getPaneVisibles(n,s)),this._prepareAnnotations(t,a.getAnnotations().concat(r._getAnnotations().getPaneVisibles(n,s)))},o.prototype._doMeasure=function(e,o,r,i,n){return this._legendView.setVis(o.pane.legend.visible)&&this._legendView.measure(e,o.pane.legend,r,i,n),t.prototype._doMeasure.call(this,e,o,r,i,n)},o.prototype._doLayout=function(){t.prototype._doLayout.call(this);var e=this._legendView;if(e.visible){this._seriesViews.forEach(function(t){if(t.needDecoreateLegend()){var o=e.legendOfSeries(t.model);o&&t.decoreateLegend(o)}});var o=e.model,r=o.prop("align"),i=o.prop("verticalAlign"),n=0,s=0,a=+o.prop("offsetX")||0;switch(r){case"right":n+=this.width-e.mw-a;break;case"center":n+=(this.width-e.mw)/2+a;break;default:n+=a}switch(a=+o.prop("offsetY")||0,i){case"bottom":s+=this.height-e.mh-a;break;case"middle":s+=(this.height-e.mh)/2+a;break;default:s+=a}e.trans(n,s).resize(e.mw,e.mh),e.layout()}},o}(e.BodyView),w=function(t){function o(e,r){var i=t.call(this,e,o.STYLE_NAME)||this;return i._bodies=[],i._xContainers=[],i._yContainers=[],i._owner=r,i}return d(o,t),Object.defineProperty(o.prototype,"bodies",{get:function(){return this._bodies},enumerable:!1,configurable:!0}),o.prototype.bodyViewOf=function(t){return this._bodies.find(function(e){return e.contains(t)})},o.prototype.axisViewOf=function(t){for(var e=0,o=[this._xContainers,this._yContainers];e<o.length;e++)for(var r=0,i=o[e];r<i.length;r++)for(var n=0,s=i[r].sections;n<s.length;n++){var a=s[n].views.find(function(e){return e.model===t});if(a)return a}},o.prototype.prepare=function(t,e){e.chart,this.$_init(t),this._model=e,this.$_prepareBodies(t,e)},o.prototype.measure=function(t,e,o,r,i){var n=e.chart,s=this._inverted=e.chart.isInverted(),a=e._xAxes,c=e._yAxes,h=o,u=r;this.$_prepareAxes(t,a,!0,s),this.$_prepareAxes(t,c,!1,s),e.measureAxes(o,r,s,i),s?(o-=this._xContainers.reduce(function(e,i){return e+i.checkWidths(t,o,r)},0),r-=this._yContainers.reduce(function(e,i){return e+i.checkHeights(t,o,r)},0)):(r-=this._xContainers.reduce(function(e,i){return e+i.checkHeights(t,o,r)},0),o-=this._yContainers.reduce(function(e,i){return e+i.checkWidths(t,o,r)},0)),e.measureAxes(o,r,s,i),this._xContainers.forEach(function(e){return e.measure(t,n,o,r,i)}),this._yContainers.forEach(function(e){return e.measure(t,n,o,r,i)}),o=h,r=u,s?(o-=this._xContainers.reduce(function(t,e){return t+e.mw},0),r-=this._yContainers.reduce(function(t,e){return t+e.mh},0)):(r-=this._xContainers.reduce(function(t,e){return t+e.mh},0),o-=this._yContainers.reduce(function(t,e){return t+e.mw},0)),i++,e.measureAxes(o,r,s,i),this.$_prepareAxisGuides(t,a,!0),this.$_prepareAxisGuides(t,c,!1),this._xContainers.forEach(function(e){e.measure(t,n,o,r,i)}),this._yContainers.forEach(function(e){e.measure(t,n,o,r,i)});var p=e.getXLens(s?r:o),f=e.getYLens(s?o:r);e.completeAxesPoints(p,f)},o.prototype.layout=function(){var t=this._model,e=this.width,o=this.height;this._back.resize(e,o),this.$_calcExtents(t,e,o),this.$_layoutAxes(t,!0,e,o),this.$_layoutAxes(t,!1,e,o),this.$_layoutBodies(t,e,o)},o.prototype.seriesByDom=function(t){for(var e=0,o=this._bodies;e<o.length;e++){var r=o[e].seriesByDom(t);if(r)return r}},o.prototype.annotationByDom=function(t){for(var e=0,o=this._bodies;e<o.length;e++){var r=o[e].annotationByDom(t);if(r)return r}},o.prototype.getSeries=function(t){for(var e=0,o=this.bodies;e<o.length;e++){var r=o[e].findSeries(t);if(r)return r}},o.prototype.legendByDom=function(t){for(var e=0,o=this.bodies;e<o.length;e++){var r=o[e]._legendView.legendByDom(t);if(r)return r}},o.prototype.$_init=function(t){this._back||(this.add(this._back=new e.RectElement(t)),this._back.setStyles({fill:"none"}),this.add(this._bodyContainer=new e.LayerElement(t,void 0)),this.add(this._axisContainer=new e.LayerElement(t,void 0)))},o.prototype.$_prepareBodies=function(t,e){e.chart;for(var o=e.paneCount,r=e.rowCount,i=e.colCount,n=this._bodies,s=this._bodyMap=[];n.length<o;){var a=new v(t,this._owner);this._bodyContainer.add(a),n.push(a)}for(;n.length>o;)n.pop().remove();for(var c=0;c<r;c++){for(var h=[],u=0;u<i;u++){var p=n[c*i+u];h.push(p),p.row=c,p.col=u}s.push(h)}n.forEach(function(o){o.prepareRender(t,e.getPane(o.row,o.col).body),o.prepareGuideContainers(),o._gridRowContainer.prepare()})},o.prototype.$_prepareAxes=function(t,e,o,r){for(var i=this,n=this._model.chart,s=o?this._xContainers:this._yContainers,a=o?e.rows():e.cols();s.length<a;){var c=new g(t,o);this._axisContainer.add(c),s.push(c)}for(;s.length>a;)s.pop().remove();s.forEach(function(o,s){o.prepare(t,i._owner,n,e,s,r)})},o.prototype.$_prepareAxisGuides=function(t,e,o){var r=this;(o?this._xContainers:this._yContainers).forEach(function(o,i){o.prepareGuides(t,r._bodyMap,e,i)})},o.prototype.$_calc=function(t,o,r,i){var n=r.length,s=new Array(2*(n+1)),a=Math.max(0,e.pickNum(this._model.prop("gap"),0)),c=o-t.reduce(function(t,e){return t+e[i]},0)-(n>1?(n-1)*a:0),h=this._model._calcSizes(r,c),u=0,p=0;for(p=0;p<n;p++)s[2*p]=u,s[2*p+1]=u+=t[p][i],u+=h[p],p<n-1&&(u+=a);return s[2*p]=u,s[2*p+1]=u+t[p][i],{pts:s,sizes:h}},o.prototype.$_paneBounds=function(t,e){return e.map(function(e,o){return[t[2*o+1],t[2*o+1]+e]})},o.prototype.$_calcExtents=function(t,e,o){if(this._inverted){var r=this.$_calc(this._xContainers,e,t.rowSizes(),"mw"),i=this.$_calc(this._yContainers,o,t.colSizes(),"mh");this._rowPoints=r.pts,this._colPoints=i.pts,this._rowPaneSizes=r.sizes,this._colPaneSizes=i.sizes}else{r=this.$_calc(this._xContainers,o,t.rowSizes(),"mh"),i=this.$_calc(this._yContainers,e,t.colSizes(),"mw");this._rowPoints=r.pts,this._colPoints=i.pts,this._rowPaneSizes=r.sizes,this._colPaneSizes=i.sizes}},o.prototype.$_layoutAxes=function(t,e,o,r){var i=this,n=this.control._padding,s=this._rowPoints,a=this._colPoints,c=e?this._xContainers:this._yContainers;if(this._inverted)if(e){var h=a[1],u=a[a.length-2]-h;c.forEach(function(t,e){t.resize(t.mw,u),t.trans(s[2*e],r-a[a.length-2]),t.layoutPanes(i.$_paneBounds(a,i._colPaneSizes),a[1])})}else{var p=s[1],f=s[s.length-2]-p;c.forEach(function(t,e){for(var o=t.sections,c=0,h=o.length;c<h;c++){var u=o[c],l=0===c?n.left:0,_=c===h-1?n.right:0,d=0,y=0;h>1&&(d=s[2*c+1]-s[2*c],y=s[2*(c+1)+1]-s[2*(c+1)],0===c?o[c+1].isEmpty()?y=s[2*(c+1)]-s[2*(c+1)-1]:y/=2:c===h-1?o[c-1].isEmpty()?d=s[2*(c-1)]-s[2*(c-1)-1]:d/=2:(o[c-1].isEmpty()?d=s[2*(c-1)]-s[2*(c-1)-1]:d/=2,o[c+1].isEmpty()?y=s[2*(c+1)]-s[2*(c+1)-1]:y/=2)),u.setMargins(l,d,y,_)}t.resize(f,t.mh),t.trans(p,r-a[2*e+1]),t.layoutPanes(i.$_paneBounds(s,i._rowPaneSizes),s[1])})}else if(e){var l=a[1];o=a[a.length-2]-l,c.forEach(function(t,e){for(var h=t.sections,u=0,p=h.length;u<p;u++){var f=h[u],_=0===e?n.left:0,d=e===c.length-1?n.right:0,y=0,g=0;p>1&&(y=a[2*u+1]-a[2*u],g=a[2*(u+1)+1]-a[2*(u+1)],0===u?h[u+1].isEmpty()?g=a[2*(u+1)]-a[2*(u+1)-1]:g/=2:u===p-1?h[u-1].isEmpty()?y=a[2*(u-1)]-a[2*(u-1)-1]:y/=2:(h[u-1].isEmpty()?y=a[2*(u-1)]-a[2*(u-1)-1]:y/=2,h[u+1].isEmpty()?g=a[2*(u+1)]-s[2*(u+1)-1]:g/=2)),f.setMargins(_,y,g,d)}t.resize(o,t.mh),t.trans(l,r-s[2*e+1]),t.layoutPanes(i.$_paneBounds(a,i._colPaneSizes),a[1])})}else{var _=s[s.length-2],d=_-s[1];c.forEach(function(t,e){t.resize(t.mw,d),t.trans(a[2*e],r-_),t.layoutPanes(i.$_paneBounds(s,i._rowPaneSizes),s[1])})}},o.prototype.$_layoutBodies=function(t,e,o){var r=t.rowCount,i=t.colCount,n=this.$_paneBounds(this._rowPoints,this._rowPaneSizes),s=this.$_paneBounds(this._colPoints,this._colPaneSizes),a=this._bodies;if(this._inverted)for(var c=0;c<r;c++)for(var h=n[c],u=h[0],p=h[1],f=0;f<i;f++){var l=a[c*i+f],_=s[f],d=_[0],y=_[1];l.measure(this.doc,t.getPane(c,f).body,p-u,y-d,1),l.resize(p-u,y-d),l.trans(u,this.height-y),l.layout()}else for(c=0;c<r;c++){var g=n[c];for(d=g[0],y=g[1],f=0;f<i;f++){l=a[c*i+f];var v=s[f];u=v[0],p=v[1];l.measure(this.doc,t.getPane(c,f).body,p-u,y-d,1),l.resize(p-u,y-d),l.trans(u,o-y),l.layout()}}},o.STYLE_NAME="rct-panes",o}(e.PaneContainer);function m(t){(function(t){return t.Series&&t.SeriesView})(t)&&(t.ChartObject.registerSplitClass(_),t.ChartView.registerPaneClass(w))}m(i),t.Split=_,t.default=m,Object.defineProperty(t,"__esModule",{value:!0})});
7
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("realchart")):"function"==typeof define&&define.amd?define(["exports","realchart"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).RealChartSplit={},t.RealChart)}(this,function(t,e){"use strict";function o(t){var e=Object.create(null);return t&&Object.keys(t).forEach(function(o){if("default"!==o){var r=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(e,o,r.get?r:{enumerable:!0,get:function(){return t[o]}})}}),e.default=t,Object.freeze(e)}var r,i=o(e),n=(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),s=function(){function t(t,e){this.row=t,this.col=e,this._axes=[]}return t.prototype.sort=function(t,e){var o=this,r=e&&!t||!e&&t;this._axes.length>1&&(r?this._axes.sort(function(t,e){var r=t._posValue(),i=e._posValue();return r===i?r<0?e._index-t._index:r>0?t._index-e._index:t.row!==e.row?e.row-t.row:t.row<o.row?e._index-t._index:t._index-e._index:i-r}):this._axes.sort(function(t,e){var r=t._posValue(),i=e._posValue();return r===i?r<0?t._index-e._index:r>0?e._index-t._index:t.col!==e.col?t.col-t.col:t.col<o.col?t._index-e._index:e._index-t._index:r-i}))},t}(),a=function(){function t(t,e){this.chart=t,this.isX=e}return t.prototype.rows=function(){return this._matrix.length},t.prototype.cols=function(){return this._matrix[0].length},t.prototype._prepare=function(t,e,o,r){var i=this;this._doPrepare(t,e,o),this._matrix.forEach(function(t){t.forEach(function(t){return t.sort(i.isX,r)})})},t.prototype.get=function(t,e){return this._matrix[t][e]},t.prototype.getRow=function(t){return this._matrix[t]},t.prototype.getColumn=function(t){return this._matrix.map(function(e){return e[t]})},t.prototype._buildTicks=function(t,e){var o=this.isX;this._matrix.forEach(function(r,i){r.forEach(function(r,i){r._axes.forEach(function(r){!r.isBased()&&(e<2||o)&&r._buildTicks(t[o?r.prop("col"):r.prop("row")],e)})})}),this._matrix.forEach(function(r,i){r.forEach(function(r,i){r._axes.forEach(function(r){r.isBased()&&(e<2||o)&&r._buildTicks(t[o?r.prop("col"):r.prop("row")],e)})})})},t.prototype._calcPoints=function(t,e){var o=this.isX;this._matrix.forEach(function(r){r.forEach(function(r,i){r._axes.forEach(function(r){if(e<2||o){var i=o?r.prop("col"):r.prop("row");r._calcPoints(t[i],e)}})})})},t}(),c=function(t){function e(e){return t.call(this,e,!0)||this}return n(e,t),e.prototype._doPrepare=function(t,e,o){for(var r=this._matrix=new Array(e+1),i=0;i<r.length;i++){r[i]=[];for(var n=0;n<o;n++)r[i].push(new s(i,n))}t.forEach(function(t){var o,i,n=t.prop("position"),s=t.row;"opposite"===n?(s++,t._runPos=n):s<e-1&&"between"===n?(s++,t._runPos="normal"):t._runPos=n,null===(i=null===(o=r[s])||void 0===o?void 0:o[t.col])||void 0===i||i._axes.push(t)})},e}(a),h=function(t){function e(e){return t.call(this,e,!1)||this}return n(e,t),e.prototype._doPrepare=function(t,e,o){for(var r=this._matrix=new Array(e),i=0;i<r.length;i++){r[i]=[];for(var n=0;n<=o;n++)r[i].push(new s(i,n))}t.forEach(function(t){var e,i,n=t.prop("position"),s=t.col;"opposite"===n?(s++,t._runPos=n):t.col<o-1&&"between"===n?(s++,t._runPos="normal"):t._runPos=n,null===(i=null===(e=r[t.row])||void 0===e?void 0:e[s])||void 0===i||i._axes.push(t)})},e}(a),u=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),p=function(t){function o(e){var o=t.call(this,e.chart)||this;return o.pane=e,o}return u(o,t),o.prototype.contains=function(t){return t.col===this.pane.col||t.row===this.pane.row},o.defaults=e.extend(e.Body.defaults,{extended:!0,radius:void 0,centerX:void 0,centerY:void 0}),o}(e.Body),l=function(t){function e(e){var o=t.call(this,e.chart)||this;return o.pane=e,o}return u(e,t),e.prototype._doPrepareRender=function(e){t.prototype._doPrepareRender.call(this,e),this._location="body"},e.prototype._getLegendSources=function(){return this.prop("visible")?this.chart._getSeries().getLegendSources(this.pane.row,this.pane.col):[]},e}(e.Legend),f=function(t){function e(e,o,r){var i=t.call(this,e)||this;return i.row=o,i.col=r,i}return u(e,t),e.prototype._doInit=function(t){this._body=this._addChild("body",new p(this)),this._legend=this._addChild("legend",new l(this))},Object.defineProperty(e.prototype,"body",{get:function(){return this._body},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"legend",{get:function(){return this._legend},enumerable:!1,configurable:!0}),e.prototype._prepareRender=function(){this._body._prepareRender(),this._legend._prepareRender()},e}(e.ChartItem),_=function(t){function o(e){var o=t.call(this,e)||this;return o._cols=1,o._rows=1,o._paneDic={},o._panes=[],o._xAxes=new c(e),o._yAxes=new h(e),o}return u(o,t),Object.defineProperty(o.prototype,"count",{get:function(){return this._rows*this._cols},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"rowCount",{get:function(){return this._rows},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"colCount",{get:function(){return this._cols},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"paneCount",{get:function(){return this._rows*this._cols},enumerable:!1,configurable:!0}),o.prototype.colSizes=function(){return this._colSizes},o.prototype.rowSizes=function(){return this._rowSizes},o.prototype.getPane=function(t,e){return this._panes[t][e]},o.prototype.getRow=function(t){return this._panes[t]},o.prototype.getColumn=function(t){return this._panes.map(function(e){return e[t]})},o.prototype.getAxisOf=function(t,e){var o,r,i=this.chart,n=t.body;if(n){var s=n.pane;return e?i._getXAxes().get(t.prop("xAxis"))||this._xAxes.get(s.row,s.col)._axes[0]||(null===(o=i._getSeries().getPaneSeries(s.row,s.col)[0])||void 0===o?void 0:o._xAxisObj):i._getXAxes().get(t.prop("yAxis"))||this._yAxes.get(n.pane.row,n.pane.col)._axes[0]||(null===(r=i._getSeries().getPaneSeries(s.row,s.col)[0])||void 0===r?void 0:r._yAxisObj)}},o.prototype.isValidAxis=function(t){return t&&t.row<this._rows&&t.col<this._cols},o.prototype._doLoadProp=function(e,o){return"panes"===e||"cols"===e||"rows"===e||t.prototype._doLoadProp.call(this,e,o)},o.prototype._doUpdateProp=function(e,o){return"rows"!==e&&"cols"!==e&&"panes"!==e?t.prototype._doUpdateProp.call(this,e,o):o!==this._op[e]&&(this._op[e]=o,"panes"===e?this._paneDic=this.$_loadPanes(o):this.$_parsePanes(this._op.rows,this._op.cols),!0)},o.prototype._doSaveProp=function(e,o,r){return"rows"===o||"cols"===o||"panes"===o?(e[o]=r,!0):t.prototype._doSaveProp.call(this,e,o,r)},o.prototype._doSetSimple=function(o,r){var i=arguments.length<2?o:r;if(e.isArray(i)&&i.length>0){var n=e.maxv(1,+i[0]),s=e.maxv(1,e.pickNum(+i[1],n));return n>0&&s>0&&(this.$_parsePanes(n,s),this.visible=!0),!0}return t.prototype._doSetSimple.call(this,o,i)},o.prototype._load=function(o){return t.prototype._load.call(this,o),e.isObject(o)&&(this.$_parsePanes(o.rows,o.cols),this._paneDic=this.$_loadPanes(o.panes)),this},o.prototype._doPrepareRender=function(t){this._panes=this.$_collectPanes(t),this._panes.forEach(function(t){return t.forEach(function(t){return t._prepareRender()})})},o.prototype._calcSizes=function(t,o){var r=t.length,i=new Array(r),n=0;if(r>1){var s=o,a=0;for(n=0;n<r;n++){var c=t[n];e.isNumber(c)?s-=i[n]=Math.max(0,Math.min(s,c)):a+=c.size}if(a>0)for(n=0;n<r;n++){c=t[n];e.isNumber(c)||(i[n]=s*c.size/a)}}else i[n]=o;return i},o.prototype.getXLens=function(t){return this._calcSizes(this._colSizes,t)},o.prototype.getYLens=function(t){return this._calcSizes(this._rowSizes,t)},o.prototype.measureAxes=function(t,e,o,r){var i=this.getXLens(o?e:t),n=this.getYLens(o?t:e);this._xAxes._buildTicks(i,r),this._yAxes._buildTicks(n,r),this.$_calcAxesPoints(i,n,r)},o.prototype.$_calcAxesPoints=function(t,e,o){this._xAxes._calcPoints(t,o),this._yAxes._calcPoints(e,o)},o.prototype.completeAxesPoints=function(t,e){this.$_calcAxesPoints(t,e,101)},o.prototype.getBodyAnnotation=function(t){for(var e in this._paneDic){var o=this._paneDic[e].body.getAnnotation(t);if(o)return o}},o.prototype.prepareRender=function(t,e){var o=this.chart.isInverted();this._prepareRender(),this._xAxes._prepare(t,this._rows,this._cols,o),this._yAxes._prepare(e,this._rows,this._cols,o)},o.prototype.$_parseSizes=function(t){return(e.isArray(t)&&t.length>0?t.slice(0):t>0?new Array(t).fill("*"):["*"]).map(function(t){if(e.isString(t)){var o=t.trim();return{size:"*"===o?1:e.pickNum(parseFloat(o),1)}}return e.pickNum(+t,1)})},o.prototype.$_parsePanes=function(t,e){this._colSizes=this.$_parseSizes(e),this._rowSizes=this.$_parseSizes(t),this._cols=this._colSizes.length,this._rows=this._rowSizes.length},o.prototype.$_loadPanes=function(t){var o=this,r=this.chart,i=this.prop("extendBody")?r._body._config:void 0,n={};if(t=e.isArray(t)?t:e.isObject(t)?[t]:null,e.isArray(t)&&t.forEach(function(t){var e=+t.row||0,s=+t.col||0;if(s>=0&&s<o._cols&&e>=0&&e<o._rows){var a=new f(r,e,s),c=t;a.init(),!i||t&&t.body&&!1===t.body.extended||(t?(c=Object.assign({},t),t.body?!1!==t.body.extended&&(c.body=Object.assign({},i,t.body)):c.body=i):c={body:i}),a._load(c),n[e+","+s]=a}}),i)for(var s=0;s<this._rows;s++)for(var a=0;a<this._cols;a++){var c=s+","+a;if(!n[c]){var h=new f(r,s,a);h.init(),h._load({body:i}),n[c]=h}}return n},o.prototype.$_collectPanes=function(t){for(var e=[],o=0;o<this._rows;o++){for(var r=[],i=0;i<this._cols;i++){var n=this._paneDic[o+","+i]||new f(t,o,i)._initObject();r.push(n)}e.push(r)}return e},o.defaults=e.extend(e.ChartItem.defaults,{visible:!1,extendBody:!0,gap:0}),o}(e.ChartItem),d=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},t(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.views=[],e._gap=0,e}return d(e,t),e.prototype.isEmpty=function(){return 0===this.views.length},e.prototype.prepare=function(t,e,o,r,i){var n=this.views,s=[];for(this.isX=r,i._axes.forEach(function(t){t.checkVisible()&&o.isValidAxis(t)&&s.push(t)});n.length<s.length;){var a=e.createAxisView(t);this.add(a),n.push(a)}for(;n.length>s.length;)n.pop().remove();if(n.forEach(function(t,e){t.setModel(s[e])}),this.axes=s,this.setVis(n.length>0)){var c=n[0].model;this._gap=c.chart.getAxesGap()}},e.prototype.prepareGuides=function(t,e,o){var r=this,i=this.views,n=this.axes;i.forEach(function(o,i){var s=n[i];e.forEach(function(e){e.forEach(function(e){e.isConnected(s)&&o.setVis(r.visible)&&(o.prepareGuides(t,e.row,e.col,e._guideContainer,e._frontGuideContainer),s._isHorz||(e._axes||(e._axes=[]),e._axes.push(s)))})})}),e.forEach(function(e){e.forEach(function(e){e._axes&&(e._gridRowContainer.addAll(t,e._axes),e._axes=[])})})},e.prototype.checkHeights=function(t,e,o){return this.views.length>0?this.$_checkHeights(this.views,t,e,o):0},e.prototype.$_checkHeights=function(t,e,o,r){var i=0;return t&&(t.forEach(function(t){i+=t.checkHeight(e,o,r)}),i+=(this.views.length-1)*this._gap),i},e.prototype.checkWidths=function(t,e,o){return this.views.length>0?this.$_checkWidths(this.views,t,e,o):0},e.prototype.$_checkWidths=function(t,e,o,r){var i=0;return t&&(t.forEach(function(t){i+=t.checkWidth(e,o,r)}),i+=(this.views.length-1)*this._gap),i},e.prototype.getScrollView=function(t){for(var e,o=0,r=this.views;o<r.length;o++){var i=r[o];if(null===(e=i._scrollView)||void 0===e?void 0:e.contains(t))return i._scrollView}},e.prototype.setMargins=function(t,e,o,r){this.views.forEach(function(i){return i.setMargins(t,e,o,r)})},e.prototype._setInverted=function(e){t.prototype._setInverted.call(this,e),this.isHorz=e&&!this.isX||!e&&this.isX},e.prototype._doMeasure=function(t,e,o,r,i){var n=this.axes;if(this.isHorz){var s=0;return this.views.forEach(function(e,a){s+=e.measure(t,n[a],o,r,i).height}),{width:o,height:s}}var a=0;return this.views.forEach(function(e,s){a+=e.measure(t,n[s],o,r,i).width}),{width:a,height:r}},e.prototype._doLayout=function(t){var e=this.views,o=this.width,r=this.height,i=e.length,n=0,s=i-1;if(this.isHorz){for(var a=0,c=void 0;n<i;n++){if((d=e[n]).model._posValue()<1)break;d.trans(0,a),a+=d.mh}for(c=a,a=r;s>=0;s--){if((d=e[s]).model._posValue()>-1)break;a-=d.mh,d.trans(0,a)}for(var h=a-c,u=0,p=n;p<=s;p++)u+=e[p].mh;c+=(h-u)/2;for(p=n;p<=s;p++){(d=e[p]).trans(0,c),c+=d.mh}e.forEach(function(t){t.resize(o,t.mh),t.model._calcPoints(o,999),t.layout()})}else{for(var l=0,f=void 0;n<i;n++){if((d=e[n]).model._posValue()>-1)break;d.trans(l,0),l+=d.mw}for(f=l,l=o;s>=0;s--){if((d=e[s]).model._posValue()<1)break;l-=d.mw,d.trans(l,0)}var _=l-f;for(u=0,p=n;p<=s;p++)u+=e[p].mw;f+=(_-u)/2;for(p=n;p<=s;p++){var d;(d=e[p]).trans(f,0),f+=d.mw}e.forEach(function(t){t.resize(t.mw,r),t.model._calcPoints(r,999),t.layout()})}},e}(e.SectionView),g=function(t){function o(e,o){var r=t.call(this,e,"rct-axis-container")||this;return r.isX=o,r.sections=[],r}return d(o,t),o.prototype.prepare=function(t,e,o,r,i,n){for(var s=this,a=this.isX?r.getRow(i):r.getColumn(i);this.sections.length<a.length;){var c=new y(t);this.add(c),this.sections.push(c)}for(;this.sections.length>a.length;)this.sections.pop().remove();this.sections.forEach(function(r,n){s.isX?(r.row=i,r.col=n):(r.col=i,r.row=n),r.prepare(t,e,o,s.isX,a[n])}),this._setInverted(n)},o.prototype.prepareGuides=function(t,e,o,r){for(var i=this,n=this.isX?o.getRow(r):o.getColumn(r);this.sections.length<n.length;){var s=new y(t);this.add(s),this.sections.push(s)}for(;this.sections.length>n.length;)this.sections.pop().remove();this.sections.forEach(function(n,s){i.isX?(n.row=r,n.col=s):(n.col=r,n.row=s),n.prepareGuides(t,e,o)})},o.prototype.checkWidths=function(t,e,o){return this.sections.length>0?this._isHorz?this.sections.reduce(function(r,i){return r+i.checkWidths(t,e,o)},0):this.sections.reduce(function(r,i){return Math.max(r,i.checkWidths(t,e,o))},0):0},o.prototype.checkHeights=function(t,e,o){return this.sections.length>0?this._isHorz?this.sections.reduce(function(r,i){return Math.max(r,i.checkHeights(t,e,o))},0):this.sections.reduce(function(r,i){return r+i.checkHeights(t,e,o)},0):0},o.prototype._setInverted=function(e){t.prototype._setInverted.call(this,e),this._isHorz=e&&!this.isX||!e&&this.isX},o.prototype._doMeasure=function(t,o,r,i,n){var s=0,a=0;return this._isHorz?this.sections.forEach(function(s){a=e.maxv(a,s.measure(t,o,r,i,n).height)}):this.sections.forEach(function(a){s=e.maxv(s,a.measure(t,o,r,i,n).width)}),{width:s,height:a}},o.prototype._doLayout=function(t){var e=this;this._isHorz?this.height>0&&this.sections.forEach(function(o,r){o.resize(t[2*(r+1)]-t[2*(r+1)-1],e.height),o.trans(t[2*r+1]-t[1],0),o.layout()}):this.width>0&&this.sections.forEach(function(o,r){o.resize(e.width,t[2*(r+1)]-t[2*(r+1)-1]),o.trans(0,e.height-(t[2*(r+1)]-t[1])),o.layout()})},o.prototype.layoutPanes=function(t,e){var o=this;this.sections.forEach(function(r,i){var n=t[i],s=n[0],a=n[1],c=a-s;o._isHorz?(r.resize(c,o.height),r.trans(s-e,0)):(r.resize(o.width,c),r.trans(0,o.height-(a-e))),r.layout()})},o}(e.SectionView),v=function(t){function o(o,r){var i=t.call(this,o,r)||this;return i.row=0,i.col=0,i.add(i._legendView=new e.LegendView(o)),i}return d(o,t),o.prototype.getCol=function(){return this.col},o.prototype.getRow=function(){return this.row},o.prototype.getTooltipPos=function(){return{x:this.parent.parent.tx+this.tx,y:this.parent.parent.ty+this.ty}},o.prototype.prepareRender=function(t,o){var r=o.chart,i=o.depth.visible,n=this.row,s=this.col,a=r._split.getPane(n,s).body;this._animatable=e.RcControl._animatable&&r.animatable(),this._prepareSeries(t,o,r._getSeries().getPaneSeries(n,s),i),this._prepareGauges(t,r,r._getGauges().getPaneVisibles(n,s)),this._prepareAnnotations(t,a.getAnnotations().concat(r._getAnnotations().getPaneVisibles(n,s)))},o.prototype._doMeasure=function(e,o,r,i,n){return this._legendView.setVis(o.pane.legend.visible)&&this._legendView.measure(e,o.pane.legend,r,i,n),t.prototype._doMeasure.call(this,e,o,r,i,n)},o.prototype._doLayout=function(){t.prototype._doLayout.call(this);var e=this._legendView;if(e.visible){this._seriesViews.forEach(function(t){if(t.needDecoreateLegend()){var o=e.legendOfSeries(t.model);o&&t.decoreateLegend(o)}});var o=e.model,r=o.prop("align"),i=o.prop("verticalAlign"),n=0,s=0,a=+o.prop("offsetX")||0;switch(r){case"right":n+=this.width-e.mw-a;break;case"center":n+=(this.width-e.mw)/2+a;break;default:n+=a}switch(a=+o.prop("offsetY")||0,i){case"bottom":s+=this.height-e.mh-a;break;case"middle":s+=(this.height-e.mh)/2+a;break;default:s+=a}e.trans(n,s).resize(e.mw,e.mh),e.layout()}},o}(e.BodyView),w=function(t){function o(e,r){var i=t.call(this,e,o.STYLE_NAME)||this;return i._bodies=[],i._xContainers=[],i._yContainers=[],i._owner=r,i}return d(o,t),Object.defineProperty(o.prototype,"bodies",{get:function(){return this._bodies},enumerable:!1,configurable:!0}),o.prototype.bodyViewOf=function(t){return this._bodies.find(function(e){return e.contains(t)})},o.prototype.axisViewOf=function(t){for(var e=0,o=[this._xContainers,this._yContainers];e<o.length;e++)for(var r=0,i=o[e];r<i.length;r++)for(var n=0,s=i[r].sections;n<s.length;n++){var a=s[n].views.find(function(e){return e.model===t});if(a)return a}},o.prototype.prepare=function(t,e){e.chart,this.$_init(t),this._model=e,this.$_prepareBodies(t,e)},o.prototype.measure=function(t,e,o,r,i){var n=e.chart,s=this._inverted=e.chart.isInverted(),a=e._xAxes,c=e._yAxes,h=o,u=r;this.$_prepareAxes(t,a,!0,s),this.$_prepareAxes(t,c,!1,s),e.measureAxes(o,r,s,i),s?(o-=this._xContainers.reduce(function(e,i){return e+i.checkWidths(t,o,r)},0),r-=this._yContainers.reduce(function(e,i){return e+i.checkHeights(t,o,r)},0)):(r-=this._xContainers.reduce(function(e,i){return e+i.checkHeights(t,o,r)},0),o-=this._yContainers.reduce(function(e,i){return e+i.checkWidths(t,o,r)},0)),e.measureAxes(o,r,s,i),this._xContainers.forEach(function(e){return e.measure(t,n,o,r,i)}),this._yContainers.forEach(function(e){return e.measure(t,n,o,r,i)}),o=h,r=u,s?(o-=this._xContainers.reduce(function(t,e){return t+e.mw},0),r-=this._yContainers.reduce(function(t,e){return t+e.mh},0)):(r-=this._xContainers.reduce(function(t,e){return t+e.mh},0),o-=this._yContainers.reduce(function(t,e){return t+e.mw},0)),i++,e.measureAxes(o,r,s,i),this.$_prepareAxisGuides(t,a,!0),this.$_prepareAxisGuides(t,c,!1),this._xContainers.forEach(function(e){e.measure(t,n,o,r,i)}),this._yContainers.forEach(function(e){e.measure(t,n,o,r,i)});var p=e.getXLens(s?r:o),l=e.getYLens(s?o:r);e.completeAxesPoints(p,l)},o.prototype.layout=function(){var t=this._model,e=this.width,o=this.height;this._back.resize(e,o),this.$_calcExtents(t,e,o),this.$_layoutAxes(t,!0,e,o),this.$_layoutAxes(t,!1,e,o),this.$_layoutBodies(t,e,o)},o.prototype.seriesByDom=function(t){for(var e=0,o=this._bodies;e<o.length;e++){var r=o[e].seriesByDom(t);if(r)return r}},o.prototype.annotationByDom=function(t){for(var e=0,o=this._bodies;e<o.length;e++){var r=o[e].annotationByDom(t);if(r)return r}},o.prototype.getSeries=function(t){for(var e=0,o=this.bodies;e<o.length;e++){var r=o[e].findSeries(t);if(r)return r}},o.prototype.legendByDom=function(t){for(var e=0,o=this.bodies;e<o.length;e++){var r=o[e]._legendView.legendByDom(t);if(r)return r}},o.prototype.$_init=function(t){this._back||(this.add(this._back=new e.RectElement(t)),this._back.setStyles({fill:"none"}),this.add(this._bodyContainer=new e.LayerElement(t,void 0)),this.add(this._axisContainer=new e.LayerElement(t,void 0)))},o.prototype.$_prepareBodies=function(t,e){e.chart;for(var o=e.paneCount,r=e.rowCount,i=e.colCount,n=this._bodies,s=this._bodyMap=[];n.length<o;){var a=new v(t,this._owner);this._bodyContainer.add(a),n.push(a)}for(;n.length>o;)n.pop().remove();for(var c=0;c<r;c++){for(var h=[],u=0;u<i;u++){var p=n[c*i+u];h.push(p),p.row=c,p.col=u}s.push(h)}n.forEach(function(o){o.prepareRender(t,e.getPane(o.row,o.col).body),o.prepareGuideContainers(),o._gridRowContainer.prepare()})},o.prototype.$_prepareAxes=function(t,e,o,r){for(var i=this,n=this._model.chart,s=o?this._xContainers:this._yContainers,a=o?e.rows():e.cols();s.length<a;){var c=new g(t,o);this._axisContainer.add(c),s.push(c)}for(;s.length>a;)s.pop().remove();s.forEach(function(o,s){o.prepare(t,i._owner,n,e,s,r)})},o.prototype.$_prepareAxisGuides=function(t,e,o){var r=this;(o?this._xContainers:this._yContainers).forEach(function(o,i){o.prepareGuides(t,r._bodyMap,e,i)})},o.prototype.$_calc=function(t,o,r,i){var n=r.length,s=new Array(2*(n+1)),a=Math.max(0,e.pickNum(this._model.prop("gap"),0)),c=o-t.reduce(function(t,e){return t+e[i]},0)-(n>1?(n-1)*a:0),h=this._model._calcSizes(r,c),u=0,p=0;for(p=0;p<n;p++)s[2*p]=u,s[2*p+1]=u+=t[p][i],u+=h[p],p<n-1&&(u+=a);return s[2*p]=u,s[2*p+1]=u+t[p][i],{pts:s,sizes:h}},o.prototype.$_paneBounds=function(t,e){return e.map(function(e,o){return[t[2*o+1],t[2*o+1]+e]})},o.prototype.$_calcExtents=function(t,e,o){if(this._inverted){var r=this.$_calc(this._xContainers,e,t.rowSizes(),"mw"),i=this.$_calc(this._yContainers,o,t.colSizes(),"mh");this._rowPoints=r.pts,this._colPoints=i.pts,this._rowPaneSizes=r.sizes,this._colPaneSizes=i.sizes}else{r=this.$_calc(this._xContainers,o,t.rowSizes(),"mh"),i=this.$_calc(this._yContainers,e,t.colSizes(),"mw");this._rowPoints=r.pts,this._colPoints=i.pts,this._rowPaneSizes=r.sizes,this._colPaneSizes=i.sizes}},o.prototype.$_layoutAxes=function(t,e,o,r){var i=this,n=this.control._padding,s=this._rowPoints,a=this._colPoints,c=e?this._xContainers:this._yContainers;if(this._inverted)if(e){var h=a[1],u=a[a.length-2]-h;c.forEach(function(t,e){t.resize(t.mw,u),t.trans(s[2*e],r-a[a.length-2]),t.layoutPanes(i.$_paneBounds(a,i._colPaneSizes),a[1])})}else{var p=s[1],l=s[s.length-2]-p;c.forEach(function(t,e){for(var o=t.sections,c=0,h=o.length;c<h;c++){var u=o[c],f=0===c?n.left:0,_=c===h-1?n.right:0,d=0,y=0;h>1&&(d=s[2*c+1]-s[2*c],y=s[2*(c+1)+1]-s[2*(c+1)],0===c?o[c+1].isEmpty()?y=s[2*(c+1)]-s[2*(c+1)-1]:y/=2:c===h-1?o[c-1].isEmpty()?d=s[2*(c-1)]-s[2*(c-1)-1]:d/=2:(o[c-1].isEmpty()?d=s[2*(c-1)]-s[2*(c-1)-1]:d/=2,o[c+1].isEmpty()?y=s[2*(c+1)]-s[2*(c+1)-1]:y/=2)),u.setMargins(f,d,y,_)}t.resize(l,t.mh),t.trans(p,r-a[2*e+1]),t.layoutPanes(i.$_paneBounds(s,i._rowPaneSizes),s[1])})}else if(e){var f=a[1];o=a[a.length-2]-f,c.forEach(function(t,e){for(var h=t.sections,u=0,p=h.length;u<p;u++){var l=h[u],_=0===e?n.left:0,d=e===c.length-1?n.right:0,y=0,g=0;p>1&&(y=a[2*u+1]-a[2*u],g=a[2*(u+1)+1]-a[2*(u+1)],0===u?h[u+1].isEmpty()?g=a[2*(u+1)]-a[2*(u+1)-1]:g/=2:u===p-1?h[u-1].isEmpty()?y=a[2*(u-1)]-a[2*(u-1)-1]:y/=2:(h[u-1].isEmpty()?y=a[2*(u-1)]-a[2*(u-1)-1]:y/=2,h[u+1].isEmpty()?g=a[2*(u+1)]-s[2*(u+1)-1]:g/=2)),l.setMargins(_,y,g,d)}t.resize(o,t.mh),t.trans(f,r-s[2*e+1]),t.layoutPanes(i.$_paneBounds(a,i._colPaneSizes),a[1])})}else{var _=s[s.length-2],d=_-s[1];c.forEach(function(t,e){t.resize(t.mw,d),t.trans(a[2*e],r-_),t.layoutPanes(i.$_paneBounds(s,i._rowPaneSizes),s[1])})}},o.prototype.$_layoutBodies=function(t,e,o){var r=t.rowCount,i=t.colCount,n=this.$_paneBounds(this._rowPoints,this._rowPaneSizes),s=this.$_paneBounds(this._colPoints,this._colPaneSizes),a=this._bodies;if(this._inverted)for(var c=0;c<r;c++)for(var h=n[c],u=h[0],p=h[1],l=0;l<i;l++){var f=a[c*i+l],_=s[l],d=_[0],y=_[1];f.measure(this.doc,t.getPane(c,l).body,p-u,y-d,1),f.resize(p-u,y-d),f.trans(u,this.height-y),f.layout()}else for(c=0;c<r;c++){var g=n[c];for(d=g[0],y=g[1],l=0;l<i;l++){f=a[c*i+l];var v=s[l];u=v[0],p=v[1];f.measure(this.doc,t.getPane(c,l).body,p-u,y-d,1),f.resize(p-u,y-d),f.trans(u,o-y),f.layout()}}},o.STYLE_NAME="rct-panes",o}(e.PaneContainer);function m(t){(function(t){return!!(t&&t.ChartObject&&t.ChartView)})(t)&&(t.ChartObject.registerSplitClass(_),t.ChartView.registerPaneClass(w))}m(i),t.Split=_,t.default=m,Object.defineProperty(t,"__esModule",{value:!0})});
package/ie/treemap.ie.js CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  /**
3
- * RealChart Treemap v1.4.33
3
+ * RealChart Treemap v1.5.0
4
4
  * Copyright (C) 2023-2026 WooriTech Inc.
5
5
  * All Rights Reserved.
6
6
  */
7
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("realchart")):"function"==typeof define&&define.amd?define(["exports","realchart"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).RealChartTreemap={},t.RealChart)}(this,function(t,e){"use strict";function i(t){var e=Object.create(null);return t&&Object.keys(t).forEach(function(i){if("default"!==i){var r=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,r.get?r:{enumerable:!0,get:function(){return t[i]}})}}),e.default=t,Object.freeze(e)}var r,o=i(e),n=(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),h=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i.prototype._assignTo=function(i){return e.assignObj(t.prototype._assignTo.call(this,i),{id:this.id,group:this.group})},i.prototype._readArray=function(t,i){if(i.length<=2)this.isNull=!0;else{var r=i.length>3?1:0;r>0&&(this.x=i[e.pickNum(t.prop("xField"),0)]),this.y=i[e.pickNum(t.prop("yField"),0+r)],this.id=e.toStr(i[e.pickNum(t.prop("idField"),1+r)]),this.group=e.toStr(i[e.pickNum(t.prop("groupField"),2+r)])}},i.prototype._readObject=function(i,r){t.prototype._readObject.call(this,i,r),this.id=e.toStr(r[i.prop("idField")]),this.group=e.toStr(r[i.prop("groupField")])},i}(e.DataPoint),s=function(t){function i(e){var i=t.call(this,e.chart)||this;return i.level=e,i.floating=!0,i}return n(i,t),i.defaults=e.extend(e.ChartItem.defaults,{visible:!1}),i}(e.ChartItem);!function(t){function e(e,i){var r=t.call(this,e.chart)||this;return r.series=e,r.level=i,r.head=new s(r),r}n(e,t)}(e.ChartItem);var u=function(){function t(t){this.point=t}return t.prototype.level=function(){return this.parent?this.parent.level()+1:0},t.prototype.getArea=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.setArea=function(t,e,i,r){this.x=t,this.y=e,this.width=i,this.height=r},t.prototype.getTotal=function(){return this.children.reduce(function(t,e){return t+e.value},0)},t}(),a=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e._map={},e._levels=1,e}return n(i,t),i.prototype.buildMap=function(t,i){function r(t){if(t.children){var i=0;t.children.forEach(function(t,e){r(t),i+=t.value}),t.value=i,t.children=t.children.sort(function(t,e){return e.value-t.value}),t.children.forEach(function(t,e){t.index=e}),h=e.maxv(h,t.level()+1+1)}else n.push(t),t.value=t.point?t.point.yValue:0}var o="vertical"===this.prop("startDir")||i>t,n=this._leafs=[],h=1;return this._roots.forEach(function(t,e){r(t)}),this._roots=this._roots.sort(function(t,e){return e.value-t.value}),this._roots.forEach(function(t,e){t.index=e}),(this[this.prop("algorithm")]||this.squarify).call(this,this._roots,t,i,o),this._levels=h,{roots:this._roots,leafs:this._leafs}},i.prototype.needAxes=function(){return!1},i.prototype.canMixWith=function(t){return!1},i.prototype._createPoint=function(t){return new h(t)},i.prototype._getLabeledPoints=function(){return this._leafs.map(function(t){return t.point})},i.prototype._doPrepareRender=function(){t.prototype._doPrepareRender.call(this),this._roots=this.$_buildTree(this._runPoints)},i.prototype.$_buildTree=function(t){var e=[],i=[],r=this._map;t.forEach(function(t){if(t.id||!t.isNull){var o=new u(t);t.id&&(r[t.id]=o),t.group?i.push(o):e.push(o)}});for(var o=i.length-1;o>=0;o--){var n=i[o],h=r[n.point.group];(n.parent=h)?(h.children||(h.children=[]),h.children.push(n),n.children&&i.splice(o,1)):(e.push(n),i.splice(o,1))}return e},i.prototype.$_squarifyRow=function(t,i,r,o){var n=i.width*i.height,h=i.width,s=i.height,u=i.x,a=i.y,l=Number.MAX_VALUE,p=0,c=[];if(2===t.length)return(1===r?h>s:h>=s)?t.forEach(function(t){t.setArea(u,a,h*t.value/o,s),u+=t.width}):t.forEach(function(t){t.setArea(u,a,h,s*t.value/o),a+=t.height}),0;for(var f=function(){var f,d,y,_,g=void 0;return f=t.shift(),g=(p+=f.value)*n/o,1===r?(d=g/s,y=s*f.value/p):(y=g/h,d=h*f.value/p),_=e.maxv(d/y,y/d),t.length>0&&_>l?(t.unshift(f),p-=f.value,g=n*p/o,1===r?d=g/(y=s):y=g/(d=h),c.forEach(function(t){1===r?(t.setArea(u,a,d,s*t.value/p),a+=t.height):(t.setArea(u,a,h*t.value/p,y),u+=t.width)}),1===r?(i.x+=d,i.width-=d):(i.y+=y,i.height-=y),{value:o-p}):0===t.length?(g=n*p/o,1===r?d=g/(y=s):y=g/(d=h),c.push(f),c.forEach(function(t){1===r?(t.setArea(u,a,d,s*t.value/p),a+=t.height):(t.setArea(u,a,h*t.value/p,y),u+=t.width)}),{value:0}):(l=_,void c.push(f))};t.length>0;){var d=f();if("object"==typeof d)return d.value}},i.prototype.$_squarify=function(t,e,i,r){var o=this,n=t.slice(0),h=i?1:0,s=t.reduce(function(t,e){return t+e.value},0);do{s=this.$_squarifyRow(n,e,h,s),r&&(h=1-h)}while(s>0);t.forEach(function(t){t.children&&o.$_squarify(t.children,t.getArea(),!i,!0)})},i.prototype.squarify=function(t,e,i,r){this.$_squarify(t,{x:0,y:0,width:e,height:i},r,!0)},i.prototype.strip=function(t,e,i,r){this.$_squarify(t,{x:0,y:0,width:e,height:i},r,!1)},i.prototype.$_sliceNext=function(t,e,i,r){if(t.x=e.x,t.y=e.y,1===i){var o=e.height*t.value/r;t.width=e.width,t.height=o,e.y+=o,e.height-=o}else{var n=e.width*t.value/r;t.height=e.height,t.width=n,e.x+=n,e.width-=n}t.children&&this.$_slice(t.children,t.getArea(),0===i,!0)},i.prototype.$_slice=function(t,e,i,r){var o=this,n=t.reduce(function(t,e){return t+e.value},0),h=i?1:0;t.forEach(function(t){o.$_sliceNext(t,e,h,n),n-=t.value,r&&(h=1-h)})},i.prototype.slice=function(t,e,i,r){this.$_slice(t,{x:0,y:0,width:e,height:i},r,!1)},i.prototype.sliceDice=function(t,e,i,r){this.$_slice(t,{x:0,y:0,width:e,height:i},r,!0)},i.type=e.TreemapSeriesType,i.defaults=e.extend(e.Series.defaults,{idField:"id",groupField:"group",algorithm:"squarify",alternate:!0,groupMode:!0}),i}(e.Series),l=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),p=function(t){function i(i){return t.call(this,i,e.SeriesView.POINT_CLASS)||this}return l(i,t),Object.defineProperty(i.prototype,"point",{get:function(){return this.node.point},enumerable:!1,configurable:!0}),i.prototype.render=function(t){if(1!==t){var e=Object.assign({},this.node);e.width*=t,e.height*=t,e.x+=(this.node.width-e.width)/2,e.y+=(this.node.height-e.height)/2,this.setRect(e)}else this.setRect(this.node)},i}(e.RectElement);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}l(e,t)}(p);var c=function(t){function i(i){var r=t.call(this,i,"rct-treemap-series")||this;return r._nodeViews=new e.PointViewPool(r._pointContainer,p),r}return l(i,t),i.prototype._lazyPrepareLabels=function(){return!0},i.prototype._getPointPool=function(){return this._nodeViews},i.prototype._prepareSeries=function(t,e){},i.prototype._renderSeries=function(t,e){this._pointContainer.invert(this._inverted,e),this._rootView?this.$_renderGroups(t,e):this.$_renderLeafs(t,e)},i.prototype._runShowEffect=function(t){t&&e.SeriesAnimation.grow(this)},i.prototype._doViewRateChanged=function(t){this._rootView?this.$_renderGroups(this.width,this.height):this.$_renderLeafs(this.width,this.height)},i.prototype.$_renderLeafs=function(t,i){var r=this,o=this.model,n=o._xAxisObj,h=o._yAxisObj,s=this._inverted;o.pointLabel;var u=this._getGrowRate(),a=this._labelViews(),l=s?t:i,p=s?i:t,c=o.buildMap(p,l);c.roots;var f,d=c.leafs,y=new e.Color(o._calcedColor),_=[{fill:""}];null==a||a.prepare(this.doc,this);var g=this._labelContainer._textAlign;this._nodeViews.prepare(d.length,function(t,i,c){var v=d[i],w=v.point,x=v.parent,b=y;x&&(!x._color&&x.point.color?b=x._color=new e.Color(x.point.color):x._color&&(b=x._color)),t.node=v,_[0].fill=b.brighten(v.index/c).toString(),r._setPointStyle(t,o,w,_),n.prop("reversed")&&(v.x=p-v.x-v.width),h.prop("reversed")&&(v.y=l-v.y-v.height),s&&(v.y=v.y-l),t.render(u);var m=v.x+v.width/2,O=v.y+v.height/2;if(w.xPos=s?-v.y-v.height/2:m,w.yPos=s?p-v.x-v.width/2:O,a&&(f=a.get(w,0))){f.setContrast(t.dom).layout(g);var S=f.getBBox();f.setVis(v.width>=S.height&&v.height>=S.height)&&(s?(m=-v.y-v.height/2-S.width/2,O=p-v.x-(v.width+S.height)/2):(m-=S.width/2,O-=S.height/2),f.trans(m,O),r._layoutLabelRotation(f))}})},i.prototype.$_renderGroups=function(t,e){},i}(e.SeriesView);function f(t){(function(t){return t.Series&&t.SeriesView})(t)&&(t.Series.register(a),t.SeriesView.register([a,c]))}f(o),t.TreemapSeries=a,t.default=f,Object.defineProperty(t,"__esModule",{value:!0})});
7
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("realchart")):"function"==typeof define&&define.amd?define(["exports","realchart"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).RealChartTreemap={},t.RealChart)}(this,function(t,e){"use strict";function i(t){var e=Object.create(null);return t&&Object.keys(t).forEach(function(i){if("default"!==i){var r=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,r.get?r:{enumerable:!0,get:function(){return t[i]}})}}),e.default=t,Object.freeze(e)}var r,o=i(e),n=(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),h=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n(i,t),i.prototype._assignTo=function(i){return e.assignObj(t.prototype._assignTo.call(this,i),{id:this.id,group:this.group})},i.prototype._readArray=function(t,i){if(i.length<=2)this.isNull=!0;else{var r=i.length>3?1:0;r>0&&(this.x=i[e.pickNum(t.prop("xField"),0)]),this.y=i[e.pickNum(t.prop("yField"),0+r)],this.id=e.toStr(i[e.pickNum(t.prop("idField"),1+r)]),this.group=e.toStr(i[e.pickNum(t.prop("groupField"),2+r)])}},i.prototype._readObject=function(i,r){t.prototype._readObject.call(this,i,r),this.id=e.toStr(r[i.prop("idField")]),this.group=e.toStr(r[i.prop("groupField")])},i}(e.DataPoint),s=function(t){function i(e){var i=t.call(this,e.chart)||this;return i.level=e,i.floating=!0,i}return n(i,t),i.defaults=e.extend(e.ChartItem.defaults,{visible:!1}),i}(e.ChartItem);!function(t){function e(e,i){var r=t.call(this,e.chart)||this;return r.series=e,r.level=i,r.head=new s(r),r}n(e,t)}(e.ChartItem);var u=function(){function t(t){this.point=t}return t.prototype.level=function(){return this.parent?this.parent.level()+1:0},t.prototype.getArea=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.setArea=function(t,e,i,r){this.x=t,this.y=e,this.width=i,this.height=r},t.prototype.getTotal=function(){return this.children.reduce(function(t,e){return t+e.value},0)},t}(),a=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e._map={},e._levels=1,e}return n(i,t),i.prototype.buildMap=function(t,i){function r(t){if(t.children){var i=0;t.children.forEach(function(t,e){r(t),i+=t.value}),t.value=i,t.children=t.children.sort(function(t,e){return e.value-t.value}),t.children.forEach(function(t,e){t.index=e}),h=e.maxv(h,t.level()+1+1)}else n.push(t),t.value=t.point?t.point.yValue:0}var o="vertical"===this.prop("startDir")||i>t,n=this._leafs=[],h=1;return this._roots.forEach(function(t,e){r(t)}),this._roots=this._roots.sort(function(t,e){return e.value-t.value}),this._roots.forEach(function(t,e){t.index=e}),(this[this.prop("algorithm")]||this.squarify).call(this,this._roots,t,i,o),this._levels=h,{roots:this._roots,leafs:this._leafs}},i.prototype.needAxes=function(){return!1},i.prototype.canMixWith=function(t){return!1},i.prototype._createPoint=function(t){return new h(t)},i.prototype._getLabeledPoints=function(){return this._leafs.map(function(t){return t.point})},i.prototype._doPrepareRender=function(){t.prototype._doPrepareRender.call(this),this._roots=this.$_buildTree(this._runPoints)},i.prototype.$_buildTree=function(t){var e=[],i=[],r=this._map;t.forEach(function(t){if(t.id||!t.isNull){var o=new u(t);t.id&&(r[t.id]=o),t.group?i.push(o):e.push(o)}});for(var o=i.length-1;o>=0;o--){var n=i[o],h=r[n.point.group];(n.parent=h)?(h.children||(h.children=[]),h.children.push(n),n.children&&i.splice(o,1)):(e.push(n),i.splice(o,1))}return e},i.prototype.$_squarifyRow=function(t,i,r,o){var n=i.width*i.height,h=i.width,s=i.height,u=i.x,a=i.y,l=Number.MAX_VALUE,p=0,c=[];if(2===t.length)return(1===r?h>s:h>=s)?t.forEach(function(t){t.setArea(u,a,h*t.value/o,s),u+=t.width}):t.forEach(function(t){t.setArea(u,a,h,s*t.value/o),a+=t.height}),0;for(var f=function(){var f,d,y,_,g=void 0;return f=t.shift(),g=(p+=f.value)*n/o,1===r?(d=g/s,y=s*f.value/p):(y=g/h,d=h*f.value/p),_=e.maxv(d/y,y/d),t.length>0&&_>l?(t.unshift(f),p-=f.value,g=n*p/o,1===r?d=g/(y=s):y=g/(d=h),c.forEach(function(t){1===r?(t.setArea(u,a,d,s*t.value/p),a+=t.height):(t.setArea(u,a,h*t.value/p,y),u+=t.width)}),1===r?(i.x+=d,i.width-=d):(i.y+=y,i.height-=y),{value:o-p}):0===t.length?(g=n*p/o,1===r?d=g/(y=s):y=g/(d=h),c.push(f),c.forEach(function(t){1===r?(t.setArea(u,a,d,s*t.value/p),a+=t.height):(t.setArea(u,a,h*t.value/p,y),u+=t.width)}),{value:0}):(l=_,void c.push(f))};t.length>0;){var d=f();if("object"==typeof d)return d.value}},i.prototype.$_squarify=function(t,e,i,r){var o=this,n=t.slice(0),h=i?1:0,s=t.reduce(function(t,e){return t+e.value},0);do{s=this.$_squarifyRow(n,e,h,s),r&&(h=1-h)}while(s>0);t.forEach(function(t){t.children&&o.$_squarify(t.children,t.getArea(),!i,!0)})},i.prototype.squarify=function(t,e,i,r){this.$_squarify(t,{x:0,y:0,width:e,height:i},r,!0)},i.prototype.strip=function(t,e,i,r){this.$_squarify(t,{x:0,y:0,width:e,height:i},r,!1)},i.prototype.$_sliceNext=function(t,e,i,r){if(t.x=e.x,t.y=e.y,1===i){var o=e.height*t.value/r;t.width=e.width,t.height=o,e.y+=o,e.height-=o}else{var n=e.width*t.value/r;t.height=e.height,t.width=n,e.x+=n,e.width-=n}t.children&&this.$_slice(t.children,t.getArea(),0===i,!0)},i.prototype.$_slice=function(t,e,i,r){var o=this,n=t.reduce(function(t,e){return t+e.value},0),h=i?1:0;t.forEach(function(t){o.$_sliceNext(t,e,h,n),n-=t.value,r&&(h=1-h)})},i.prototype.slice=function(t,e,i,r){this.$_slice(t,{x:0,y:0,width:e,height:i},r,!1)},i.prototype.sliceDice=function(t,e,i,r){this.$_slice(t,{x:0,y:0,width:e,height:i},r,!0)},i.type=e.TreemapSeriesType,i.defaults=e.extend(e.Series.defaults,{idField:"id",groupField:"group",algorithm:"squarify",alternate:!0,groupMode:!0}),i}(e.Series),l=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),p=function(t){function i(i){return t.call(this,i,e.SeriesView.POINT_CLASS)||this}return l(i,t),Object.defineProperty(i.prototype,"point",{get:function(){return this.node.point},enumerable:!1,configurable:!0}),i.prototype.render=function(t){if(1!==t){var e=Object.assign({},this.node);e.width*=t,e.height*=t,e.x+=(this.node.width-e.width)/2,e.y+=(this.node.height-e.height)/2,this.setRect(e)}else this.setRect(this.node)},i}(e.RectElement);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}l(e,t)}(p);var c=function(t){function i(i){var r=t.call(this,i,"rct-treemap-series")||this;return r._nodeViews=new e.PointViewPool(r._pointContainer,p),r}return l(i,t),i.prototype._lazyPrepareLabels=function(){return!0},i.prototype._getPointPool=function(){return this._nodeViews},i.prototype._prepareSeries=function(t,e){},i.prototype._renderSeries=function(t,e){this._pointContainer.invert(this._inverted,e),this._rootView?this.$_renderGroups(t,e):this.$_renderLeafs(t,e)},i.prototype._runShowEffect=function(t){t&&e.SeriesAnimation.grow(this)},i.prototype._doViewRateChanged=function(t){this._rootView?this.$_renderGroups(this.width,this.height):this.$_renderLeafs(this.width,this.height)},i.prototype.$_renderLeafs=function(t,i){var r=this,o=this.model,n=o._xAxisObj,h=o._yAxisObj,s=this._inverted;o.pointLabel;var u=this._getGrowRate(),a=this._labelViews(),l=s?t:i,p=s?i:t,c=o.buildMap(p,l);c.roots;var f,d=c.leafs,y=new e.Color(o._calcedColor),_=[{fill:""}];null==a||a.prepare(this.doc,this);var g=this._labelContainer._textAlign;this._nodeViews.prepare(d.length,function(t,i,c){var v=d[i],w=v.point,x=v.parent,b=y;x&&(!x._color&&x.point.color?b=x._color=new e.Color(x.point.color):x._color&&(b=x._color)),t.node=v,_[0].fill=b.brighten(v.index/c).toString(),r._setPointStyle(t,o,w,_),n.prop("reversed")&&(v.x=p-v.x-v.width),h.prop("reversed")&&(v.y=l-v.y-v.height),s&&(v.y=v.y-l),t.render(u);var m=v.x+v.width/2,O=v.y+v.height/2;if(w.xPos=s?-v.y-v.height/2:m,w.yPos=s?p-v.x-v.width/2:O,a&&(f=a.get(w,0))){f.setContrast(t.dom).layout(g);var S=f.getBBox();f.setVis(v.width>=S.height&&v.height>=S.height)&&(s?(m=-v.y-v.height/2-S.width/2,O=p-v.x-(v.width+S.height)/2):(m-=S.width/2,O-=S.height/2),f.trans(m,O),r._layoutLabelRotation(f))}})},i.prototype.$_renderGroups=function(t,e){},i}(e.SeriesView);function f(t){(function(t){return!!(t&&t.Series&&t.SeriesView)})(t)&&(t.Series.register(a),t.SeriesView.register([a,c]))}f(o),t.TreemapSeries=a,t.default=f,Object.defineProperty(t,"__esModule",{value:!0})});
package/ie/vector.ie.js CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  /**
3
- * RealChart Vector v1.4.33
3
+ * RealChart Vector v1.5.0
4
4
  * Copyright (C) 2023-2026 WooriTech Inc.
5
5
  * All Rights Reserved.
6
6
  */
7
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("realchart")):"function"==typeof define&&define.amd?define(["exports","realchart"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).RealChartVector={},t.RealChart)}(this,function(t,e){"use strict";function n(t){var e=Object.create(null);return t&&Object.keys(t).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}}),e.default=t,Object.freeze(e)}var r,o=n(e),i=(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i(n,t),n.prototype._assignTo=function(n){return e.assignObj(t.prototype._assignTo.call(this,n),{length:this.length,angle:this.angle,lengthValue:this.lengthValue,angleValue:this.angleValue})},n.prototype._valuesChangd=function(e){return this.length!==e.length||this.angle!==e.angle||t.prototype._valuesChangd.call(this,e)},n.prototype._readArray=function(t,n){if(n.length<=2)this.isNull=!0;else{var r=n.length>3?1:0;r>0&&(this.x=n[e.pickNum(t.prop("xField"),0)]),this.y=n[e.pickNum(t.prop("yField"),0+r)],this.length=n[e.pickNum(t.prop("lengthField"),1+r)],this.angle=n[e.pickNum(t.prop("angleField"),2+r)]}},n.prototype._readObject=function(n,r){t.prototype._readObject.call(this,n,r),this.length=e.pickProp(r[n.prop("lengthField")],r.length),this.angle=e.pickProp(r[n.prop("angleField")],r.angle),this.y=e.pickProp3(n._yFielder(r),r.y,r.value)},n.prototype._readSingle=function(e){t.prototype._readSingle.call(this,e),this.length=this.angle=this.y},n.prototype.parse=function(e){t.prototype.parse.call(this,e),this.isNull||(this.isNull=isNaN(this.lengthValue)||isNaN(this.angleValue))},n.prototype.initValues=function(){this.lengthValue=parseFloat(this.length),this.angleValue=parseFloat(this.angle)},n.prototype.initPrev=function(t,e){e.yValue=this.yValue,e.lengthValue=.001},n.prototype.applyValueRate=function(t,n){this.lengthValue=e.incv(t.lengthValue,this.lengthValue,n)},n}(e.DataPoint),s=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i(n,t),n.prototype._createPoint=function(t){return new a(t)},n.prototype._doPrepareRender=function(){t.prototype._doPrepareRender.call(this);var n=this._runPoints;if(n.length>0){var r=this.num("maxLength"),o=this.prop("origin"),i=n.map(function(t){return t.length}).reduce(function(t,n){return e.maxv(t,n)});n.forEach(function(t){var e=t.length/i;switch(t._len=e*r,o){case"start":t._off=-t._len/2;break;case"end":t._off=t._len/2;break;default:t._off=0}})}},n.prototype._createLegendMarker=function(t,n){for(var r=.3,o=.7*n,i=[0,-r*n,-.2*n,-r*n,0,-.6*n,.2*n,-r*n,0,-r*n,0,.6*n],a=["M",i[0],i[1]+o],s=2;s<i.length;s+=2)a.push("L",i[s],i[s+1]+o);var l=new e.PathElement(t,e.Series.LEGEND_MARKER).setPath(a);return l.setStyle("strokeWidth","2px"),l.rotation=30,l},n.type=e.VectorSeriesType,n.defaults=e.extend(e.Series.defaults,{origin:"center",maxLength:20,startAngle:0,arrowHead:"close"}),n}(e.ConnectableSeries),l=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),p=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype.layout=function(t,e,n){var r,o=this.point._len,i=o*n,a=.5,s=(o-i)/2;switch(t){case"none":r=[0,s-a*i,0,s+a*i];break;case"open":r=[0,s-.45*i,0-.15*i,s-.2*i,0,s-a*i,0+.15*i,s-.2*i,0,s-.45*i,0,s+a*i];break;default:var l=.3;r=[0,s-l*i,0-.1*i,s-l*i,0,s-a*i,0+.1*i,s-l*i,0,s-l*i,0,s+a*i]}for(var p=this.point._off*n,u=["M",r[0],r[1]+p],c=2;c<r.length;c+=2)u.push("L",r[c],r[c+1]+p);this.rotation=e,this.setPath(u)},e}(e.PointElement),u=function(t){function n(n){var r=t.call(this,n,"rct-vector-series")||this;return r._arrows=new e.PointViewPool(r._pointContainer,p),r}return l(n,t),n.prototype._getPointPool=function(){return this._arrows},n.prototype._prepareSeries=function(t,e){this.$_prepareArrows(e,this._visPoints)},n.prototype._renderSeries=function(t,e){var n=this.model,r=n.prop("startAngle"),o=n.prop("arrowHead"),i=n._xAxisObj,a=n._yAxisObj,s=this._inverted,l=s?t:e,p=s?e:t,u=this._getGrowRate(),c=s?0:e,h=i.prop("reversed")?-1:1,f=a.prop("reversed");this._pointContainer.invert(s,e),this._arrows.forEach(function(t){var e=t.point;if(t.setVis(!e.isNull)){var n=i.getPos(p,e.xValue),g=c-a.getPos(l,e.yValue),y=r+e.angleValue*h;f&&(y=180-y),e.xPos=s?c+a.getPos(l,e.yValue):n,e.yPos=s?p-i.getPos(p,e.xValue):g,t.trans(n,g),t.layout(o,y,u)}})},n.prototype._runShowEffect=function(t){t&&e.SeriesAnimation.grow(this)},n.prototype._doViewRateChanged=function(t){this._renderSeries(this.width,this.height)},n.prototype.getPointsAt=function(t,e){return[]},n.prototype.$_prepareArrows=function(t,e){var n=this;this._arrows.prepare(e.length,function(r,o){var i=r.point=e[o];n._setPointStyle(r,t,i)})},n}(e.SeriesView);function c(t){(function(t){return t.Series&&t.SeriesView})(t)&&(t.Series.register(s),t.SeriesView.register([s,u]))}c(o),t.VectorSeries=s,t.default=c,Object.defineProperty(t,"__esModule",{value:!0})});
7
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("realchart")):"function"==typeof define&&define.amd?define(["exports","realchart"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).RealChartVector={},t.RealChart)}(this,function(t,e){"use strict";function n(t){var e=Object.create(null);return t&&Object.keys(t).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}}),e.default=t,Object.freeze(e)}var r,o=n(e),i=(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i(n,t),n.prototype._assignTo=function(n){return e.assignObj(t.prototype._assignTo.call(this,n),{length:this.length,angle:this.angle,lengthValue:this.lengthValue,angleValue:this.angleValue})},n.prototype._valuesChangd=function(e){return this.length!==e.length||this.angle!==e.angle||t.prototype._valuesChangd.call(this,e)},n.prototype._readArray=function(t,n){if(n.length<=2)this.isNull=!0;else{var r=n.length>3?1:0;r>0&&(this.x=n[e.pickNum(t.prop("xField"),0)]),this.y=n[e.pickNum(t.prop("yField"),0+r)],this.length=n[e.pickNum(t.prop("lengthField"),1+r)],this.angle=n[e.pickNum(t.prop("angleField"),2+r)]}},n.prototype._readObject=function(n,r){t.prototype._readObject.call(this,n,r),this.length=e.pickProp(r[n.prop("lengthField")],r.length),this.angle=e.pickProp(r[n.prop("angleField")],r.angle),this.y=e.pickProp3(n._yFielder(r),r.y,r.value)},n.prototype._readSingle=function(e){t.prototype._readSingle.call(this,e),this.length=this.angle=this.y},n.prototype.parse=function(e){t.prototype.parse.call(this,e),this.isNull||(this.isNull=isNaN(this.lengthValue)||isNaN(this.angleValue))},n.prototype.initValues=function(){this.lengthValue=parseFloat(this.length),this.angleValue=parseFloat(this.angle)},n.prototype.initPrev=function(t,e){e.yValue=this.yValue,e.lengthValue=.001},n.prototype.applyValueRate=function(t,n){this.lengthValue=e.incv(t.lengthValue,this.lengthValue,n)},n}(e.DataPoint),s=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i(n,t),n.prototype._createPoint=function(t){return new a(t)},n.prototype._doPrepareRender=function(){t.prototype._doPrepareRender.call(this);var n=this._runPoints;if(n.length>0){var r=this.num("maxLength"),o=this.prop("origin"),i=n.map(function(t){return t.length}).reduce(function(t,n){return e.maxv(t,n)});n.forEach(function(t){var e=t.length/i;switch(t._len=e*r,o){case"start":t._off=-t._len/2;break;case"end":t._off=t._len/2;break;default:t._off=0}})}},n.prototype._createLegendMarker=function(t,n){for(var r=.3,o=.7*n,i=[0,-r*n,-.2*n,-r*n,0,-.6*n,.2*n,-r*n,0,-r*n,0,.6*n],a=["M",i[0],i[1]+o],s=2;s<i.length;s+=2)a.push("L",i[s],i[s+1]+o);var l=new e.PathElement(t,e.Series.LEGEND_MARKER).setPath(a);return l.setStyle("strokeWidth","2px"),l.rotation=30,l},n.type=e.VectorSeriesType,n.defaults=e.extend(e.Series.defaults,{origin:"center",maxLength:20,startAngle:0,arrowHead:"close"}),n}(e.ConnectableSeries),l=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),p=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype.layout=function(t,e,n){var r,o=this.point._len,i=o*n,a=.5,s=(o-i)/2;switch(t){case"none":r=[0,s-a*i,0,s+a*i];break;case"open":r=[0,s-.45*i,0-.15*i,s-.2*i,0,s-a*i,0+.15*i,s-.2*i,0,s-.45*i,0,s+a*i];break;default:var l=.3;r=[0,s-l*i,0-.1*i,s-l*i,0,s-a*i,0+.1*i,s-l*i,0,s-l*i,0,s+a*i]}for(var p=this.point._off*n,u=["M",r[0],r[1]+p],h=2;h<r.length;h+=2)u.push("L",r[h],r[h+1]+p);this.rotation=e,this.setPath(u)},e}(e.PointElement),u=function(t){function n(n){var r=t.call(this,n,"rct-vector-series")||this;return r._arrows=new e.PointViewPool(r._pointContainer,p),r}return l(n,t),n.prototype._getPointPool=function(){return this._arrows},n.prototype._prepareSeries=function(t,e){this.$_prepareArrows(e,this._visPoints)},n.prototype._renderSeries=function(t,e){var n=this,r=this.model,o=r.prop("startAngle"),i=r.prop("arrowHead"),a=r._xAxisObj,s=r._yAxisObj,l=this._inverted,p=l?t:e,u=l?e:t,h=this._getGrowRate(),c=l?0:e,f=a.prop("reversed")?-1:1,g=s.prop("reversed"),y=r.pointLabel,_=this._labelViews(),d=this._labelContainer._textAlign,v=y.prop("position");this._pointContainer.invert(l,e),this._arrows.forEach(function(t){var e=t.point,y=_&&_.get(e,0);if(t.setVis(!e.isNull)){var P=a.getPos(u,e.xValue),w=c-s.getPos(p,e.yValue),V=o+e.angleValue*f;if(g&&(V=180-V),e.xPos=l?c+s.getPos(p,e.yValue):P,e.yPos=l?u-a.getPos(u,e.xValue):w,t.trans(P,w),t.layout(i,V,h),y){y.setContrast(t.dom),y.layout(d);var b=y.getBBox(),O=r.getLabelOff2(e),x=e.xPos-b.width/2,S="inside"===v?e.yPos-b.height/2:e.yPos-b.height-O;y.trans(x,S),n._layoutLabelRotation(y,b,x,S)}}else y&&y.setVis(!1)})},n.prototype._runShowEffect=function(t){t&&e.SeriesAnimation.grow(this)},n.prototype._doViewRateChanged=function(t){this._renderSeries(this.width,this.height)},n.prototype.getPointsAt=function(t,e){return[]},n.prototype.$_prepareArrows=function(t,e){var n=this;this._arrows.prepare(e.length,function(r,o){var i=r.point=e[o];n._setPointStyle(r,t,i)})},n}(e.SeriesView);function h(t){(function(t){return!!(t&&t.Series&&t.SeriesView)})(t)&&(t.Series.register(s),t.SeriesView.register([s,u]))}h(o),t.VectorSeries=s,t.default=h,Object.defineProperty(t,"__esModule",{value:!0})});
@@ -1,7 +1,7 @@
1
1
 
2
2
  /**
3
- * RealChart Wordcloud v1.4.33
3
+ * RealChart Wordcloud v1.5.0
4
4
  * Copyright (C) 2023-2026 WooriTech Inc.
5
5
  * All Rights Reserved.
6
6
  */
7
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("realchart")):"function"==typeof define&&define.amd?define(["exports","realchart"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).RealChartWordCloud={},t.RealChart)}(this,function(t,e){"use strict";function n(t){var e=Object.create(null);return t&&Object.keys(t).forEach(function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}}),e.default=t,Object.freeze(e)}var i,r=n(e),o=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(e.WidgetSeriesPoint),s=function(t){function e(e,n){var i=t.call(this,e)||this;return i.points=n,i}return o(e,t),e}(a),h=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.$_denormalizeFontSize=function(t,i,r){var o,a;return"min"==t?(o=e.calcPercent(e.parsePercentSize(n.MinFontSize,!1),i),a=e.calcPercent(e.parsePercentSize(n.MaxMinFontSize,!1),i)):(o=e.calcPercent(e.parsePercentSize(n.MinMaxFontSize,!1),i),a=e.calcPercent(e.parsePercentSize(n.MaxFontSize,!1),i)),r>1?a:r<0?o:r*(a-o)+o},n.prototype.calcFontRatio=function(t,n,i,r){return e.calcPercent(n,i,r)},n.prototype.getMinFontSize=function(t,i){var r=this._minFontSizeDim,o=r.fixed,a=r.size,s=o&&a<=1?this.$_denormalizeFontSize("min",t,a):e.calcPercent(this._minFontSizeDim,t,i);return Math.max(e.calcPercent(e.parsePercentSize(n.MinFontSize,!1),t),s)},n.prototype.getMaxFontSize=function(t,i){var r=this._maxFontSizeDim,o=r.fixed,a=r.size,s=o&&a<=1?this.$_denormalizeFontSize("max",t,a):e.calcPercent(this._maxFontSizeDim,t,i);return Math.min(e.calcPercent(e.parsePercentSize(n.MaxFontSize,!1),t),s)},n.prototype.getLogFunc=function(){var t=this.prop("logBase");return t>=2?function(e){return Math.max(Math.log(e)/Math.log(t))}:function(t){return t}},n.prototype._colorByPoint=function(){return this.prop("colorByPoint")},n.prototype._createPoint=function(t){return new a(t)},n.prototype._createOthersPoint=function(t,e){return t.y=e.map(function(t){return t.y}).reduce(function(t,e){return t+e}),new s(t,e)},n.prototype._doApply=function(n){var i;t.prototype._doApply.call(this,n),(n.text!==this._text||e.Utils.equalArrays(this._excludes,n.excludes))&&(this._text=n.text,this._excludes=null===(i=n.excludes)||void 0===i?void 0:i.slice(),this._dataSourceDirty=!0),this._setDims(n,"minFontSize","maxFontSize")},n.prototype._doLoadPoints=function(n){var i=this.prop("text"),r=[];if(i){var o=Math.max(this.num("minLength")||1,1),a={},s=this.prop("excludes"),h=i.split(/\s+/g);for(var c in Array.isArray(s)&&s.length>0&&(h=h.filter(function(t){return s.indexOf(t)<0})),h.forEach(function(t){t.length>=o&&(t in a?a[t]++:a[t]=1)}),a)r.push({x:c,y:a[c]})}else if(Array.isArray(n)&&!(n.length>0&&"object"==typeof n[0]&&null!==n[0]))for(var u=0;u<n.length;u+=2)r.push({x:e.toStr(n[u]),y:n[u+1]||0});r.length>0&&(n=r.sort(function(t,e){return e.y-t.y})),t.prototype._doLoadPoints.call(this,n)},n.prototype.isPointLabelVisible=function(t){return!1},n.prototype._prepareRender=function(){t.prototype._prepareRender.call(this),this.collectValues(null,null),this.prepareReferents(null),this.collectRanges(null,null)},n.type=e.WordCloudSeriesType,n.MinFontSize=8,n.MaxMinFontSize=15,n.MaxFontSize="15%",n.MinMaxFontSize="5%",n.defaults=e.extend(e.WidgetSeries.defaults,{frame:"rectangle",maxCount:100,maxFontSize:1,minFontSize:0,colorByPoint:!0,autoScale:!0,drawTimeout:2e4}),n}(e.WidgetSeries),c=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),u=Math.floor,p=function(){function t(t){this._series=t}return t.prototype.start=function(t,n,i,r,o,a){var s=this;this._series=i,this._container=t;var h=i.prop("frame"),c="circle"===h||"ellipse"===h,u=i.prop("autoScale"),p=e.pickNum(i.num("seed"),0)*Math.PI*2/360,l=Math.max(0,e.pickNum(i.num("wordGap"),0)),f=r,_=0,d=o,y=0,x=0;this._prepare(i,r,o),this._unit,this._startTime=Date.now(),n.forEach(function(t){var e=t.point;if(s._findPos(t,c,i.prop("shuffle"),s._radius,p,l)){var n=t.box.bounds,r=n.x,o=n.y,a=n.width,h=n.height;s.$_placeWord(t),e.xPos=r+a/2,e.yPos=o,f=Math.min(f,r),_=Math.max(_,r+a),d=Math.min(d,o),y=Math.max(y,o+h),x++}else t.setVis(!1)}),e.Utils.log("Words placed.",x,"of",n.length);var m=_-f,g=y-d,M=r/2,v=o/2,w=u?1/(Math.max(m/r,g/o)+.02):1,P=~~((f+m/2-M)*w),S=~~((d+g/2-v)*w);return this._trans={x:P,y:S,cx:M,cy:v,rate:w},n.forEach(function(t){var e=t.point;e.xPos=M-P+(e.xPos-M)*w,e.yPos=v-S+(e.yPos-v)*w}),this.$_transform(),null==a||a(n),this},t.prototype.stop=function(){},t.prototype.$_transform=function(t){void 0===t&&(t=1);var n=this._trans,i=n.x,r=n.y,o=n.cx,a=n.cy,s=n.rate;if(i=~~(i*t),r=~~(r*t),e.isIE){var h=s*t,c=o*(1-h),u=a*(1-h);this._container.trans(-i+c,-r+u),this._container.scale(h)}else this._container.dom.setAttribute("transform-origin","".concat(o," ").concat(a)),this._container.trans(-i,-r),this._container.scale(s*t)},t.prototype._prepare=function(t,e,n){var i=this._unit=8;this._grid=[],this._cols=u(e/i),this._rows=u(n/i),this._radius=u(Math.sqrt(this._cols*this._cols+this._rows*this._rows)/2);var r=2*this._radius;this._center={c:this._radius,r:this._radius};for(var o=0;o<r;o++)this._grid.push([]);this._rdPoints=[];var a=t.prop("frame");this._ellipticity="ellipse"===a||"rectangle"===a?n/e:1},t.prototype._isOverlapping=function(t){for(var e=this._grid,n=t.r1;n<=t.r2;n++)for(var i=t.c1;i<=t.c2;i++)if(e[n]||(e[n]=[]),e[n][i])return!0;return!1},t.prototype.$_placeWord=function(t){for(var e=this._grid,n=t.box,i=n.r1;i<=n.r2;i++)for(var r=n.c1;r<=n.c2;r++)e[i][r]=t},t.prototype._getPoints=function(t,e,n){if(this._rdPoints[t])return this._rdPoints[t];var i=this._center,r=this._ellipticity,o=Math.min(t*this._unit,64),a=0,s=[];for(0===t&&s.push([i.c,i.r]);a<o;){var h=a/o*2*Math.PI+n,c=t*Math.cos(h)/r,u=t*Math.sin(h);if(!e){var p=Math.max(Math.abs(Math.cos(h)),Math.abs(Math.sin(h)));c/=p,u/=p}s.push([~~(i.c+c),~~(i.r+u)]),a++}return this._rdPoints[t]=s},t.prototype._rotatePoint=function(t,e,n){var i=e*Math.PI/180,r=Math.cos(i),o=Math.sin(i),a=t.x,s=t.y,h=t.width,c=t.height,u=a+h,p=s+c,l=a+h/2,f=s+c/2,_=[{x:a,y:s},{x:u,y:s},{x:a,y:p},{x:u,y:p}].map(function(t){return{x:l+(t.x-l)*r-(t.y-f)*o,y:f+(t.x-l)*o+(t.y-f)*r}}),d=Math.min.apply(Math,_.map(function(t){return t.x})),y=Math.min.apply(Math,_.map(function(t){return t.y})),x=Math.max.apply(Math,_.map(function(t){return t.x})),m=Math.max.apply(Math,_.map(function(t){return t.y})),g=this._unit,M=x-d,v=m-y;return{c1:Math.max(0,~~(d/g)),r1:Math.max(0,~~(y/g)),c2:~~(x/g),r2:~~(m/g)+n,bounds:{x:d,y:y,width:M,height:v}}},t.prototype._getBox=function(t,e,n,i,r){void 0===r&&(r=0);var o=this._unit,a=t.getBBox().width,s=t.hText,h=a/o,c=s/o,u=Math.ceil(h/2),p=Math.ceil(c/2),l=Math.max(0,e-u),f=Math.max(0,n-p),_=l+Math.ceil(h),d=f+Math.ceil(c),y={x:(e-u)*o,y:(n-p)*o,width:a,height:s};return r?this._rotatePoint(y,r,i):{c1:l,r1:f,c2:_+i,r2:d,bounds:y}},t.prototype.$_drawDebugBox=function(t,n){var i=this._container.doc,r=t.bounds,o=r.x,a=r.y,s=r.width,h=r.height,c=e.RectElement.create(i,"",o,a,s,h);c.setFill((null==n?void 0:n.fill)||"#ff000055"),c.setStroke((null==n?void 0:n.stroke)||"none"),c.setAttr("stroke-dasharray",(null==n?void 0:n.strokeDashArray)||"4"),this._container.add(c)},t.prototype._findPos=function(t,n,i,r,o,a){var s=this,h=0,c=0;r=Math.max(r,this._grid.length+1);for(var u=[0,-90],p=u.length;h<r;){var l=Date.now()-this._startTime;if(l>e.pickNum(this._series.num("drawTimeout"),5e3))throw new Error("단어배치 시간이 ".concat(l," ms 경과하여 중단합니다."));var f=this._getPoints(h,n,o+c++%4*(Math.PI/4));if(i&&e.Utils.shuffle(f),f.some(function(n,i){var r=s._series.prop("rotation")?u[~~(e.Utils.randomLike(i+o)*p)]:0,h=s._getBox(t,n[0],n[1],a,r);if(!s._isOverlapping(h)){if(h.bounds.x<0||h.bounds.y<0)return!1;var c=s._getBox(t,n[0],n[1],a).bounds,l={x:c.width/2,y:c.height/2};return t.wx=c.x,t.wy=c.y,t.setRotation(l.x,l.y,r),t.box=h,!0}}))return!0;h++}},t}(),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.prototype._findPos=function(t,e,n,i,r,o){var a=this;if(this._getPoints(i,e,n?Math.random()*Math.PI*2:r).some(function(e){var n=a._getBox(t,e[0],e[1],o);if(!a._isOverlapping(n))return t.box=n,!0}))return!0},e.prototype._getPoints=function(t,e,n){var i=this._center,r=this._ellipticity,o=2*t*this._unit,a=-1,s=[];0===t&&s.push([i.c,i.r]);var h=n>Math.PI?1:-1;if(e)for(;++a<o;){var c=a/o,u=n+a*c*h,p=t*c;f=p*Math.cos(u)/r,l=p*Math.sin(u),_=i.c+f,d=i.r+l;s.push([~~_,~~d])}else for(var l,f=(l=this._unit>>1)/r,_=i.c+f*Math.cos(n),d=i.r+l*Math.sin(n),y=Math.max(1,this._unit>>1),x=y-Math.max(1,y>>1);++a>=0;){switch(f=(l=1+x*Math.pow(.99,a))/r,3&(h*Math.sqrt(1+8*a)-1)/2){case 0:_+=f;break;case 1:d+=l;break;case 2:_-=f;break;default:d-=l}if(Math.max(Math.abs(_-t),Math.abs(d-t))>t)break;s.push([~~_,~~d])}return s},e.prototype._getBox=function(t,e,n,i){var r=this._unit,o=t.getBBox(),a=t.hText,s=Math.min(2*this._radius,Math.max(0,e-u(o.width/2/r))),h=Math.min(2*this._radius,Math.max(0,n-u(a/2/r)));return{c1:s,r1:h,c2:s+u(o.width/r)+i,r2:h+u(a/r),w:t.width,h:a}},e}(p),f=function(t){function n(n){var i=t.call(this,n,e.SeriesView.POINT_CLASS)||this;return i.add(i.hintView=new e.RectElement(n)),i.hintView.setStyles({stroke:"none",fill:"transparent"}),i.add(i.textView=new e.TextElement(n)),i.textView.setStyle("pointerEvents","none"),i}return c(n,t),n.prototype.getBBox=function(){return this._bbox?this._bbox:this._bbox=this.textView.getBBox()},n.prototype.layout=function(){var t=this.getBBox();this.hintView.setRect({x:0,y:this.yText*n.TOP_PAD,width:t.width,height:this.hText-this.yText}),this.textView.transY(-this.yText*n.TOP_PAD)},n.TOP_PAD=.5,n}(e.RcElement),_=function(t){function n(n){var i=t.call(this,n,"rct-wordcloud-series")||this;return i._pointContainer.add(i._wordContainer=new e.LayerElement(n,null)),i._words=new e.PointViewPool(i._wordContainer,f),i}return c(n,t),n.prototype._getPointPool=function(){return this._words},n.prototype.needFronting=function(){return!1},n.prototype.getClipContainer=function(){return null},n.prototype.isEmptyView=function(){return this._empty},n.prototype._refreshZombie=function(){},n.prototype._renderSeries=function(t,n){var i=this,r=this.model,o=r.prop("text");if(t!==this._wSave||n!==this._hSave||o!==this._tSave){var a=+new Date,s=this._visPoints.slice();r.num("minWeight")>0&&(s=s.filter(function(t){return t.yValue>=r.num("minWeight")})),r.num("minLength")>1&&(s=s.filter(function(t){return t.x.length>=r.num("minLength")}));var h=r.num("maxCount");if(h<s.length&&(s.length=Math.max(0,h)),this.$_prepareWords(this.doc,r,s),"spiral"===r.prop("placer"))this._placer=new l(r).start(this._wordContainer,this._words._internalItems(),r,t,n,function(e){i.$_layoutWords(t,n)});else this._placer=new p(r).start(this._wordContainer,this._words._internalItems(),r,t,n,function(e){i.$_layoutWords(t,n)});this._wSave=t,this._hSave=n,this._tSave=o,this._empty=s.length<1,e.Utils.log(s.length+" words placed in "+(+new Date-a)+"ms.")}else this.$_layoutWords(t,n)},n.prototype._runShowEffect=function(t){t&&e.SeriesAnimation.spread(this,function(){})},n.prototype._doPosRateChanged=function(t){this.$_layoutWords(this.width,this.height)},n.prototype.$_prepareWords=function(t,n,i){var r,o=this,a=n._minY,s=n._maxY,h=s-a,c=this.height,u=n.getMaxFontSize(c,1),p=Math.min(u,n.getMinFontSize(c,0)),l=a===s||p===u,_=l?NaN:n.prop("logBase"),d=getComputedStyle(this._wordContainer.dom).fontFamily,y=Math.min(2,Math.max(.1,+n.prop("textHeight"))),x=isNaN(y)?t.createElement("canvas").getContext("2d"):null,m=1-f.TOP_PAD;this._words.prepare(i.length,function(s,c){var f=s.point=i[c],g=s.textView;s._bbox=null;var M=(f.y-a)/h;_>1&&(M=1-(Math.pow(_,1-M)-1)/(_-1));var v=p+(l?(u-p)/2:M*(u-p)),w=f.x;o._preparePoint(t,n,f,s),delete s.box,g.text=w,g.anchor=e.TextAnchor.START,g.setStyles({fontSize:e.pixel(v)}),g.layoutText(),x?(x.font="".concat(e.pixel(v)," ").concat(d),r=x.measureText(w),s.yText=.9*Math.max(0,r.fontBoundingBoxAscent-r.actualBoundingBoxAscent),s.hText=Math.ceil((r.actualBoundingBoxAscent+r.actualBoundingBoxDescent)*(v<=10?1.1:1.08)-.1)+s.yText*m):(s.yText=0,s.hText=s.getBBox().height*y),s.layout(),s.setVis(!0)})},n.prototype.$_layoutWords=function(t,e){var n,i=this._getPosRate();null===(n=this._placer)||void 0===n||n.$_transform(i),i=1-i,this._words.forEach(function(n){var r=n.box.bounds,o=r.width,a=r.height,s=(t-o)/2,h=(e-a)/2;n.trans(n.wx-(n.wx-s)*i,n.wy-(n.wy-h)*i)})},n}(e.WidgetSeriesView);function d(t){(function(t){return t.Series&&t.SeriesView})(t)&&(t.Series.register(h),t.SeriesView.register([h,_]))}d(r),t.WordCloudSeries=h,t.default=d,Object.defineProperty(t,"__esModule",{value:!0})});
7
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("realchart")):"function"==typeof define&&define.amd?define(["exports","realchart"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).RealChartWordCloud={},t.RealChart)}(this,function(t,e){"use strict";function n(t){var e=Object.create(null);return t&&Object.keys(t).forEach(function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}}),e.default=t,Object.freeze(e)}var i,r=n(e),o=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(e.WidgetSeriesPoint),s=function(t){function e(e,n){var i=t.call(this,e)||this;return i.points=n,i}return o(e,t),e}(a),h=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.$_denormalizeFontSize=function(t,i,r){var o,a;return"min"==t?(o=e.calcPercent(e.parsePercentSize(n.MinFontSize,!1),i),a=e.calcPercent(e.parsePercentSize(n.MaxMinFontSize,!1),i)):(o=e.calcPercent(e.parsePercentSize(n.MinMaxFontSize,!1),i),a=e.calcPercent(e.parsePercentSize(n.MaxFontSize,!1),i)),r>1?a:r<0?o:r*(a-o)+o},n.prototype.calcFontRatio=function(t,n,i,r){return e.calcPercent(n,i,r)},n.prototype.getMinFontSize=function(t,i){var r=this._minFontSizeDim,o=r.fixed,a=r.size,s=o&&a<=1?this.$_denormalizeFontSize("min",t,a):e.calcPercent(this._minFontSizeDim,t,i);return Math.max(e.calcPercent(e.parsePercentSize(n.MinFontSize,!1),t),s)},n.prototype.getMaxFontSize=function(t,i){var r=this._maxFontSizeDim,o=r.fixed,a=r.size,s=o&&a<=1?this.$_denormalizeFontSize("max",t,a):e.calcPercent(this._maxFontSizeDim,t,i);return Math.min(e.calcPercent(e.parsePercentSize(n.MaxFontSize,!1),t),s)},n.prototype.getLogFunc=function(){var t=this.prop("logBase");return t>=2?function(e){return Math.max(Math.log(e)/Math.log(t))}:function(t){return t}},n.prototype._colorByPoint=function(){return this.prop("colorByPoint")},n.prototype._createPoint=function(t){return new a(t)},n.prototype._createOthersPoint=function(t,e){return t.y=e.map(function(t){return t.y}).reduce(function(t,e){return t+e}),new s(t,e)},n.prototype._doApply=function(n){var i;t.prototype._doApply.call(this,n),(n.text!==this._text||e.Utils.equalArrays(this._excludes,n.excludes))&&(this._text=n.text,this._excludes=null===(i=n.excludes)||void 0===i?void 0:i.slice(),this._dataSourceDirty=!0),this._setDims(n,"minFontSize","maxFontSize")},n.prototype._doLoadPoints=function(n){var i=this.prop("text"),r=[];if(i){var o=Math.max(this.num("minLength")||1,1),a={},s=this.prop("excludes"),h=i.split(/\s+/g);for(var c in Array.isArray(s)&&s.length>0&&(h=h.filter(function(t){return s.indexOf(t)<0})),h.forEach(function(t){t.length>=o&&(t in a?a[t]++:a[t]=1)}),a)r.push({x:c,y:a[c]})}else if(Array.isArray(n)&&!(n.length>0&&"object"==typeof n[0]&&null!==n[0]))for(var u=0;u<n.length;u+=2)r.push({x:e.toStr(n[u]),y:n[u+1]||0});r.length>0&&(n=r.sort(function(t,e){return e.y-t.y})),t.prototype._doLoadPoints.call(this,n)},n.prototype.isPointLabelVisible=function(t){return!1},n.prototype._prepareRender=function(){t.prototype._prepareRender.call(this),this.collectValues(null,null),this.prepareReferents(null),this.collectRanges(null,null)},n.type=e.WordCloudSeriesType,n.MinFontSize=8,n.MaxMinFontSize=15,n.MaxFontSize="15%",n.MinMaxFontSize="5%",n.defaults=e.extend(e.WidgetSeries.defaults,{frame:"rectangle",maxCount:100,maxFontSize:1,minFontSize:0,colorByPoint:!0,autoScale:!0,drawTimeout:2e4}),n}(e.WidgetSeries),c=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),u=Math.floor,p=function(){function t(t){this._series=t}return t.prototype.start=function(t,n,i,r,o,a){var s=this;this._series=i,this._container=t;var h=i.prop("frame"),c="circle"===h||"ellipse"===h,u=i.prop("autoScale"),p=e.pickNum(i.num("seed"),0)*Math.PI*2/360,l=Math.max(0,e.pickNum(i.num("wordGap"),0)),f=r,_=0,d=o,y=0,x=0;this._prepare(i,r,o),this._unit,this._startTime=Date.now(),n.forEach(function(t){var e=t.point;if(s._findPos(t,c,i.prop("shuffle"),s._radius,p,l)){var n=t.box.bounds,r=n.x,o=n.y,a=n.width,h=n.height;s.$_placeWord(t),e.xPos=r+a/2,e.yPos=o,f=Math.min(f,r),_=Math.max(_,r+a),d=Math.min(d,o),y=Math.max(y,o+h),x++}else t.setVis(!1)}),e.Utils.log("Words placed.",x,"of",n.length);var m=_-f,g=y-d,M=r/2,v=o/2,w=u?1/(Math.max(m/r,g/o)+.02):1,P=~~((f+m/2-M)*w),S=~~((d+g/2-v)*w);return this._trans={x:P,y:S,cx:M,cy:v,rate:w},n.forEach(function(t){var e=t.point;e.xPos=M-P+(e.xPos-M)*w,e.yPos=v-S+(e.yPos-v)*w}),this.$_transform(),null==a||a(n),this},t.prototype.stop=function(){},t.prototype.$_transform=function(t){void 0===t&&(t=1);var n=this._trans,i=n.x,r=n.y,o=n.cx,a=n.cy,s=n.rate;if(i=~~(i*t),r=~~(r*t),e.isIE){var h=s*t,c=o*(1-h),u=a*(1-h);this._container.trans(-i+c,-r+u),this._container.scale(h)}else this._container.dom.setAttribute("transform-origin","".concat(o," ").concat(a)),this._container.trans(-i,-r),this._container.scale(s*t)},t.prototype._prepare=function(t,e,n){var i=this._unit=8;this._grid=[],this._cols=u(e/i),this._rows=u(n/i),this._radius=u(Math.sqrt(this._cols*this._cols+this._rows*this._rows)/2);var r=2*this._radius;this._center={c:this._radius,r:this._radius};for(var o=0;o<r;o++)this._grid.push([]);this._rdPoints=[];var a=t.prop("frame");this._ellipticity="ellipse"===a||"rectangle"===a?n/e:1},t.prototype._isOverlapping=function(t){for(var e=this._grid,n=t.r1;n<=t.r2;n++)for(var i=t.c1;i<=t.c2;i++)if(e[n]||(e[n]=[]),e[n][i])return!0;return!1},t.prototype.$_placeWord=function(t){for(var e=this._grid,n=t.box,i=n.r1;i<=n.r2;i++)for(var r=n.c1;r<=n.c2;r++)e[i][r]=t},t.prototype._getPoints=function(t,e,n){if(this._rdPoints[t])return this._rdPoints[t];var i=this._center,r=this._ellipticity,o=Math.min(t*this._unit,64),a=0,s=[];for(0===t&&s.push([i.c,i.r]);a<o;){var h=a/o*2*Math.PI+n,c=t*Math.cos(h)/r,u=t*Math.sin(h);if(!e){var p=Math.max(Math.abs(Math.cos(h)),Math.abs(Math.sin(h)));c/=p,u/=p}s.push([~~(i.c+c),~~(i.r+u)]),a++}return this._rdPoints[t]=s},t.prototype._rotatePoint=function(t,e,n){var i=e*Math.PI/180,r=Math.cos(i),o=Math.sin(i),a=t.x,s=t.y,h=t.width,c=t.height,u=a+h,p=s+c,l=a+h/2,f=s+c/2,_=[{x:a,y:s},{x:u,y:s},{x:a,y:p},{x:u,y:p}].map(function(t){return{x:l+(t.x-l)*r-(t.y-f)*o,y:f+(t.x-l)*o+(t.y-f)*r}}),d=Math.min.apply(Math,_.map(function(t){return t.x})),y=Math.min.apply(Math,_.map(function(t){return t.y})),x=Math.max.apply(Math,_.map(function(t){return t.x})),m=Math.max.apply(Math,_.map(function(t){return t.y})),g=this._unit,M=x-d,v=m-y;return{c1:Math.max(0,~~(d/g)),r1:Math.max(0,~~(y/g)),c2:~~(x/g),r2:~~(m/g)+n,bounds:{x:d,y:y,width:M,height:v}}},t.prototype._getBox=function(t,e,n,i,r){void 0===r&&(r=0);var o=this._unit,a=t.getBBox().width,s=t.hText,h=a/o,c=s/o,u=Math.ceil(h/2),p=Math.ceil(c/2),l=Math.max(0,e-u),f=Math.max(0,n-p),_=l+Math.ceil(h),d=f+Math.ceil(c),y={x:(e-u)*o,y:(n-p)*o,width:a,height:s};return r?this._rotatePoint(y,r,i):{c1:l,r1:f,c2:_+i,r2:d,bounds:y}},t.prototype.$_drawDebugBox=function(t,n){var i=this._container.doc,r=t.bounds,o=r.x,a=r.y,s=r.width,h=r.height,c=e.RectElement.create(i,"",o,a,s,h);c.setFill((null==n?void 0:n.fill)||"#ff000055"),c.setStroke((null==n?void 0:n.stroke)||"none"),c.setAttr("stroke-dasharray",(null==n?void 0:n.strokeDashArray)||"4"),this._container.add(c)},t.prototype._findPos=function(t,n,i,r,o,a){var s=this,h=0,c=0;r=Math.max(r,this._grid.length+1);for(var u=[0,-90],p=u.length;h<r;){var l=Date.now()-this._startTime;if(l>e.pickNum(this._series.num("drawTimeout"),5e3))throw new Error("단어배치 시간이 ".concat(l," ms 경과하여 중단합니다."));var f=this._getPoints(h,n,o+c++%4*(Math.PI/4));if(i&&e.Utils.shuffle(f),f.some(function(n,i){var r=s._series.prop("rotation")?u[~~(e.Utils.randomLike(i+o)*p)]:0,h=s._getBox(t,n[0],n[1],a,r);if(!s._isOverlapping(h)){if(h.bounds.x<0||h.bounds.y<0)return!1;var c=s._getBox(t,n[0],n[1],a).bounds,l={x:c.width/2,y:c.height/2};return t.wx=c.x,t.wy=c.y,t.setRotation(l.x,l.y,r),t.box=h,!0}}))return!0;h++}},t}(),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.prototype._findPos=function(t,e,n,i,r,o){var a=this;if(this._getPoints(i,e,n?Math.random()*Math.PI*2:r).some(function(e){var n=a._getBox(t,e[0],e[1],o);if(!a._isOverlapping(n))return t.box=n,!0}))return!0},e.prototype._getPoints=function(t,e,n){var i=this._center,r=this._ellipticity,o=2*t*this._unit,a=-1,s=[];0===t&&s.push([i.c,i.r]);var h=n>Math.PI?1:-1;if(e)for(;++a<o;){var c=a/o,u=n+a*c*h,p=t*c;f=p*Math.cos(u)/r,l=p*Math.sin(u),_=i.c+f,d=i.r+l;s.push([~~_,~~d])}else for(var l,f=(l=this._unit>>1)/r,_=i.c+f*Math.cos(n),d=i.r+l*Math.sin(n),y=Math.max(1,this._unit>>1),x=y-Math.max(1,y>>1);++a>=0;){switch(f=(l=1+x*Math.pow(.99,a))/r,3&(h*Math.sqrt(1+8*a)-1)/2){case 0:_+=f;break;case 1:d+=l;break;case 2:_-=f;break;default:d-=l}if(Math.max(Math.abs(_-t),Math.abs(d-t))>t)break;s.push([~~_,~~d])}return s},e.prototype._getBox=function(t,e,n,i){var r=this._unit,o=t.getBBox(),a=t.hText,s=Math.min(2*this._radius,Math.max(0,e-u(o.width/2/r))),h=Math.min(2*this._radius,Math.max(0,n-u(a/2/r)));return{c1:s,r1:h,c2:s+u(o.width/r)+i,r2:h+u(a/r),w:t.width,h:a}},e}(p),f=function(t){function n(n){var i=t.call(this,n,e.SeriesView.POINT_CLASS)||this;return i.add(i.hintView=new e.RectElement(n)),i.hintView.setStyles({stroke:"none",fill:"transparent"}),i.add(i.textView=new e.TextElement(n)),i.textView.setStyle("pointerEvents","none"),i}return c(n,t),n.prototype.getBBox=function(){return this._bbox?this._bbox:this._bbox=this.textView.getBBox()},n.prototype.layout=function(){var t=this.getBBox();this.hintView.setRect({x:0,y:this.yText*n.TOP_PAD,width:t.width,height:this.hText-this.yText}),this.textView.transY(-this.yText*n.TOP_PAD)},n.TOP_PAD=.5,n}(e.RcElement),_=function(t){function n(n){var i=t.call(this,n,"rct-wordcloud-series")||this;return i._pointContainer.add(i._wordContainer=new e.LayerElement(n,null)),i._words=new e.PointViewPool(i._wordContainer,f),i}return c(n,t),n.prototype._getPointPool=function(){return this._words},n.prototype.needFronting=function(){return!1},n.prototype.getClipContainer=function(){return null},n.prototype.isEmptyView=function(){return this._empty},n.prototype._refreshZombie=function(){},n.prototype._renderSeries=function(t,n){var i=this,r=this.model,o=r.prop("text");if(t!==this._wSave||n!==this._hSave||o!==this._tSave){var a=+new Date,s=this._visPoints.slice();r.num("minWeight")>0&&(s=s.filter(function(t){return t.yValue>=r.num("minWeight")})),r.num("minLength")>1&&(s=s.filter(function(t){return t.x.length>=r.num("minLength")}));var h=r.num("maxCount");if(h<s.length&&(s.length=Math.max(0,h)),this.$_prepareWords(this.doc,r,s),"spiral"===r.prop("placer"))this._placer=new l(r).start(this._wordContainer,this._words._internalItems(),r,t,n,function(e){i.$_layoutWords(t,n)});else this._placer=new p(r).start(this._wordContainer,this._words._internalItems(),r,t,n,function(e){i.$_layoutWords(t,n)});this._wSave=t,this._hSave=n,this._tSave=o,this._empty=s.length<1,e.Utils.log(s.length+" words placed in "+(+new Date-a)+"ms.")}else this.$_layoutWords(t,n)},n.prototype._runShowEffect=function(t){t&&e.SeriesAnimation.spread(this,function(){})},n.prototype._doPosRateChanged=function(t){this.$_layoutWords(this.width,this.height)},n.prototype.$_prepareWords=function(t,n,i){var r,o=this,a=n._minY,s=n._maxY,h=s-a,c=this.height,u=n.getMaxFontSize(c,1),p=Math.min(u,n.getMinFontSize(c,0)),l=a===s||p===u,_=l?NaN:n.prop("logBase"),d=getComputedStyle(this._wordContainer.dom).fontFamily,y=Math.min(2,Math.max(.1,+n.prop("textHeight"))),x=isNaN(y)?t.createElement("canvas").getContext("2d"):null,m=1-f.TOP_PAD;this._words.prepare(i.length,function(s,c){var f=s.point=i[c],g=s.textView;s._bbox=null;var M=(f.y-a)/h;_>1&&(M=1-(Math.pow(_,1-M)-1)/(_-1));var v=p+(l?(u-p)/2:M*(u-p)),w=f.x;o._preparePoint(t,n,f,s),delete s.box,g.text=w,g.anchor=e.TextAnchor.START,g.setStyles({fontSize:e.pixel(v)}),g.layoutText(),x?(x.font="".concat(e.pixel(v)," ").concat(d),r=x.measureText(w),s.yText=.9*Math.max(0,r.fontBoundingBoxAscent-r.actualBoundingBoxAscent),s.hText=Math.ceil((r.actualBoundingBoxAscent+r.actualBoundingBoxDescent)*(v<=10?1.1:1.08)-.1)+s.yText*m):(s.yText=0,s.hText=s.getBBox().height*y),s.layout(),s.setVis(!0)})},n.prototype.$_layoutWords=function(t,e){var n,i=this._getPosRate();null===(n=this._placer)||void 0===n||n.$_transform(i),i=1-i,this._words.forEach(function(n){var r=n.box.bounds,o=r.width,a=r.height,s=(t-o)/2,h=(e-a)/2;n.trans(n.wx-(n.wx-s)*i,n.wy-(n.wy-h)*i)})},n}(e.WidgetSeriesView);function d(t){(function(t){return!!(t&&t.Series&&t.SeriesView)})(t)&&(t.Series.register(h),t.SeriesView.register([h,_]))}d(r),t.WordCloudSeries=h,t.default=d,Object.defineProperty(t,"__esModule",{value:!0})});