'),i||(i=t);var o=this.adapter.apply("dataFieldsOrder",{dataFieldsOrder:this.dataFieldsOrder,format:"html"}).dataFieldsOrder,l=r?"th":"td",h=!0;return Ht(i,(function(i,r){var o=a.convertEmptyValue(i,t[i],e),p=n?o:a.convertToSpecialFormat(i,o,e);p=(p=""+p).replace(/[\u00A0-\u9999<>\&]/gim,(function(t){return""+t.charCodeAt(0)+";"}));var u=l;e.pivot&&h&&(u="th"),e.cellClass?s+="\n\t\t<"+u+' class="'+e.cellClass+'">'+p+""+u+">":s+="\n\t\t<"+u+">"+p+""+u+">",h=!1}),(function(t,e){var i=o.indexOf(t),n=o.indexOf(e);return i>n?1:i"},e.prototype.getJSON=function(t,e,i){return void 0===i&&(i=!0),o(this,void 0,void 0,(function(){var n,r,a,s,o,h,p,u,d=this;return l(this,(function(l){if(_(e)||(e=this.getFormatOptions("json")),r=this.adapter.apply("formatDataFields",{dataFields:this.dataFields,format:"json"}).dataFields,this._dynamicDataFields)n=this.data;else for(n=[],a=this.data,s=function(t,i){var s=a[i];if("object"==typeof s){var o={};Nt(s,(function(t,i){_(r[t])&&(o[r[t]]=d.convertToSpecialFormat(t,i,e))})),n.push(o)}},o=a.length,h=0;h'+this.language.translate('To save the image, right-click thumbnail on the left and choose "Save picture as..."')+'
'+this.language.translate("(Press ESC to close this message)")+"
",this.language.translate("Image Export Complete")):(m=void 0,e.match(/\.svg$/)?m="image/svg+xml":(m="text/plain",e+=".txt"),(y=document.createElement("iframe")).width="1px",y.height="1px",y.style.display="none",document.body.appendChild(y),(v=y.contentDocument).open(m,"replace"),v.write(decodeURIComponent(g[3])),v.close(),v.execCommand("SaveAs",!0,e),document.body.removeChild(y))):window.location.href=t;return[2,!0]}))}))},e.prototype.downloadSupport=function(){return this.linkDownloadSupport()||this.msBlobDownloadSupport()},e.prototype.linkDownloadSupport=function(){var t=se.getCache("linkDownloadSupport");if(!1===t||!0===t)return t;var e=void 0!==document.createElement("a").download;return se.setCache("linkDownloadSupport",e),e},e.prototype.blobDownloadSupport=function(){return _(window.Blob)},e.prototype.msBlobDownloadSupport=function(){return _(window.navigator.msSaveOrOpenBlob)},e.prototype.legacyIE=function(){var t=document.createElement("div");return t.innerHTML="\x3c!--[if lt IE 10]> *",{display:"none",position:"fixed",visibility:"hidden",opacity:"0",clipPath:"polygon(0px 0px,0px 0px,0px 0px,0px 0px);"}),i&&document&&document.title&&(a=document.title,document.title=i),(s=new Image).src=t,s.style.maxWidth="100%",s.style.display="block",s.style.position="relative",s.style.visibility="visible",s.style.opacity="1",s.style.clipPath="none",document.body.appendChild(s),this.setTimeout((function(){window.print()}),50),/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&e.delay<1e3?e.delay=1e3:e.delay<100&&(e.delay=100),this.setTimeout((function(){document.body.removeChild(s),r.dispose(),a&&(document.title=document.title),document.documentElement.scrollTop=document.body.scrollTop=n}),e.delay||500),[2,!0]}))}))},e.prototype.printViaIframe=function(t,e,i){return o(this,void 0,void 0,(function(){var n,r;return l(this,(function(a){return(n=document.createElement("iframe")).style.visibility="hidden",document.body.appendChild(n),n.contentWindow.document.open(),n.contentWindow.document.close(),(r=new Image).src=t,r.style.maxWidth="100%",r.style.height="auto",i&&(n.contentWindow.document.title=i),n.contentWindow.document.body.appendChild(r),n.load=function(){n.contentWindow.document.body.appendChild(r)},this.setTimeout((function(){try{n.contentWindow.document.execCommand("print",!1,null)||n.contentWindow.print()}catch(t){n.contentWindow.print()}}),e.delay||50),/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&e.delay<1e3?e.delay=1e3:e.delay<100&&(e.delay=100),this.setTimeout((function(){document.body.removeChild(n)}),e.delay+50||100),[2,!0]}))}))},e.prototype.findBackgroundColor=function(t){var e=1,i=sn(t,"background-color");if((i.match(/[^,]*,[^,]*,[^,]*,[ ]?0/)||"transparent"==i)&&(e=0),0==e){var n=t.parentElement;return n?this.findBackgroundColor(n):ke("#fff")}return ke(i,e)},Object.defineProperty(e.prototype,"container",{get:function(){return this.adapter.apply("container",{container:this._container}).container},set:function(t){this._container=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sprite",{get:function(){return this.adapter.apply("sprite",{sprite:this._sprite}).sprite},set:function(t){this._sprite=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"extraSprites",{get:function(){return this.adapter.apply("extraSprites",{extraSprites:this._extraSprites}).extraSprites},set:function(t){this._extraSprites=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"validateSprites",{get:function(){return this.adapter.apply("validateSprites",{validateSprites:this._validateSprites}).validateSprites},set:function(t){this._validateSprites=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this.adapter.apply("data",{data:this._data}).data},set:function(t){this._data=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dataFields",{get:function(){return this._dataFields||this.generateDataFields(),this.adapter.apply("dataFields",{dataFields:this._dataFields}).dataFields},set:function(t){this._dataFields=t,this._dynamicDataFields=!1},enumerable:!0,configurable:!0}),e.prototype.handleDataUpdated=function(){this._dynamicDataFields&&(this._dataFields=void 0);var t=this.data.length>0;this._prevHasData!=t&&(this._prevHasData=t,this.menu&&this.menu.invalidate())},Object.defineProperty(e.prototype,"dateFormatter",{get:function(){return this._dateFormatter||(this._dateFormatter=new sr,this._dateFormatter.language=this.language),this.adapter.apply("dateFormatter",{dateFormatter:this._dateFormatter}).dateFormatter},set:function(t){this._dateFormatter=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dateFormat",{get:function(){return this.adapter.apply("dateFormat",{dateFormat:this._dateFormat}).dateFormat},set:function(t){this._dateFormat=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dateFields",{get:function(){return this._dateFields||(this._dateFields=new pe),this.adapter.apply("dateFields",{dateFields:this._dateFields}).dateFields},set:function(t){this._dateFields=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numberFormatter",{get:function(){return this._numberFormatter||(this._numberFormatter=new ar,this._numberFormatter.language=this.language),this.adapter.apply("numberFormatter",{numberFormatter:this._numberFormatter}).numberFormatter},set:function(t){this._numberFormatter=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numberFormat",{get:function(){return this.adapter.apply("numberFormat",{numberFormat:this._numberFormat}).numberFormat},set:function(t){this._numberFormat=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numberFields",{get:function(){return this._numberFields||(this._numberFields=new pe),this.adapter.apply("numberFields",{numberFields:this._numberFields}).numberFields},set:function(t){this._numberFields=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"durationFormatter",{get:function(){return this._durationFormatter||(this._durationFormatter=new or,this._durationFormatter.language=this.language),this.adapter.apply("durationFormatter",{durationFormatter:this._durationFormatter}).durationFormatter},set:function(t){this._durationFormatter=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"durationFormat",{get:function(){return this.adapter.apply("durationFormat",{durationFormat:this._durationFormat}).durationFormat},set:function(t){this._durationFormat=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"durationFields",{get:function(){return this._durationFields||(this._durationFields=new pe),this.adapter.apply("durationFields",{durationFields:this._durationFields}).durationFields},set:function(t){this._durationFields=t},enumerable:!0,configurable:!0}),e.prototype.generateDataFields=function(){var t=this;this._dataFields={},this.data.length&&pt(this.data,(function(e){Nt(e,(function(e,i){_(t._dataFields[e])||(t._dataFields[e]=t.adapter.apply("dataFieldName",{name:e,field:e}).name)}))}))},e.prototype.isDateField=function(t){return this.adapter.apply("isDateField",{isDateField:this.dateFields.contains(t),field:t}).isDateField},e.prototype.isNumberField=function(t){return this.adapter.apply("isNumberField",{isNumberField:this.numberFields.contains(t),field:t}).isNumberField},e.prototype.isDurationField=function(t){return this.adapter.apply("isDurationField",{isDurationField:this.durationFields.contains(t),field:t}).isDurationField},e.prototype.getContentType=function(t){var e="";switch(t){case"png":case"gif":e="image/"+t;break;case"jpg":e="image/jpeg";break;case"svg":e="image/svg+xml";break;case"csv":e="text/csv";break;case"json":e="application/json";break;case"html":e="text/html";break;case"pdf":case"pdfdata":e="application/pdf";break;case"xlsx":e="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}return this.adapter.apply("contentType",{contentType:e,type:t}).contentType},Object.defineProperty(e.prototype,"filePrefix",{get:function(){return this.adapter.apply("filePrefix",{filePrefix:this._filePrefix}).filePrefix},set:function(t){this._filePrefix=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"backgroundColor",{get:function(){return this.adapter.apply("backgroundColor",{backgroundColor:this._backgroundColor}).backgroundColor},set:function(t){this._backgroundColor=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this.adapter.apply("title",{title:this._title}).title},set:function(t){this._title=t},enumerable:!0,configurable:!0}),e.prototype.showPreloader=function(){var t=this.preloader;t&&(t.progress=.5,t.label.text="...")},e.prototype.hidePreloader=function(){var t=this.preloader;t&&(t.progress=1)},Object.defineProperty(e.prototype,"preloader",{get:function(){return this._sprite&&this._sprite.parent&&this._sprite.parent.preloader?this._sprite.parent.preloader:void 0},enumerable:!0,configurable:!0}),e.prototype.showTimeout=function(){this.showModal(this.adapter.apply("timeoutMessage",{message:this.language.translate("Export operation took longer than expected. Something might have gone wrong.")}).message)},e.prototype.hideTimeout=function(){this._timeoutTimeout&&(this.removeDispose(this._timeoutTimeout),this._timeoutTimeout=null),this.hideModal()},Object.defineProperty(e.prototype,"language",{get:function(){return this._language||(this._language=new ir),this._language},set:function(t){this._language=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"modal",{get:function(){return this._modal||(this._modal=new Bn,this._modal.adapter.add("classPrefix",(function(t){return t=Yi.classNamePrefix+t}))),this._modal},enumerable:!0,configurable:!0}),e.prototype.showModal=function(t,e){this.hideModal(),this.hidePreloader();var i=this.modal;i.container=this.sprite.svgContainer.SVGContainer,i.content=t,i.readerTitle=e,i.open()},e.prototype.hideModal=function(){this._modal&&this.modal.close()},e.prototype._canvg=function(){return o(this,void 0,void 0,(function(){var t;return l(this,(function(e){switch(e.label){case 0:return[4,i.e(265).then(i.bind(i,9258))];case 1:return null!=(t=e.sent()).default?[2,t.default]:[2,t]}}))}))},Object.defineProperty(e.prototype,"canvg",{get:function(){return this._canvg()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pdfmake",{get:function(){return null==hr&&(hr=function(){return o(this,void 0,void 0,(function(){var t,e,n,r;return l(this,(function(a){switch(a.label){case 0:return[4,Promise.all([i.e(643).then(i.t.bind(i,6727,23)),i.e(643).then(i.bind(i,4995))])];case 1:return t=a.sent(),e=t[0],n=t[1],(r=window).pdfMake=r.pdfMake||{},r.pdfMake.vfs=n.default,e.vfs=n.default,[2,e]}}))}))}()),hr},enumerable:!0,configurable:!0}),e.prototype._xlsx=function(){return o(this,void 0,void 0,(function(){return l(this,(function(t){switch(t.label){case 0:return[4,i.e(297).then(i.t.bind(i,7739,23))];case 1:return[2,t.sent()]}}))}))},Object.defineProperty(e.prototype,"xlsx",{get:function(){return this._xlsx()},enumerable:!0,configurable:!0}),e.prototype.setFormatOptions=function(t,e){this._formatOptions.setKey(t,e)},e.prototype.getFormatOptions=function(t){return this._formatOptions.getKey(t)},Object.defineProperty(e.prototype,"formatOptions",{get:function(){return this._formatOptions},enumerable:!0,configurable:!0}),e.prototype._disablePointers=function(){_(this._spriteInteractionsEnabled)||(this._spriteInteractionsEnabled=this.sprite.interactionsEnabled),this.sprite.interactionsEnabled=!1},e.prototype._releasePointers=function(){_(this._spriteInteractionsEnabled)&&!this._exportRunning&&(this.sprite.interactionsEnabled=this._spriteInteractionsEnabled)},e.prototype.hideNonExportableSprites=function(){var t=this;if(!this._objectsAlreadyHidden){var e=this.sprite.svgContainer;e&&pt(e.nonExportableSprites,(function(e){e.isHidden||e.isHiding||!e.visible||t._hiddenObjects.push(e),e.hide(0)})),this._objectsAlreadyHidden=!0}},e.prototype.restoreNonExportableSprites=function(){this._objectsAlreadyHidden&&(pt(this._hiddenObjects,(function(t){t.show(0)})),this._hiddenObjects=[],this._objectsAlreadyHidden=!1)},e.prototype.awaitValidSprites=function(){return o(this,void 0,void 0,(function(){var t;return l(this,(function(e){switch(e.label){case 0:return t=[],this.validateSprites.length&&pt(this.validateSprites,(function(e,i){e.invalid&&t.push(new Promise((function(t,i){e.events.once("validated",(function(e){t()}))})))})),t.length?[4,Promise.all(t)]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}))}))},e.prototype.processConfig=function(e){se.registeredClasses.ExportMenu=ur,e&&(_(e.menu)&&!_(e.menu.type)&&(e.menu.type="ExportMenu"),_(e.dataFields)&&S(e.dataFields)&&(this.dataFields=e.dataFields,delete e.dataFields)),t.prototype.processConfig.call(this,e)},e.XLINK="http://www.w3.org/1999/xlink",e}(pr),br=["fill","fillOpacity","stroke","strokeOpacity","strokeWidth","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin"],xr=function(t){function e(){var e=t.call(this)||this;return e.properties={},e._eventDispatcher=new Hi(e),e._bindings={},e._isTemplate=!1,e._isPath=!1,e._inited=!1,e._ready=!1,e.isHiding=!1,e._isHidden=!1,e.isShowing=!1,e.isStandaloneInstance=!1,e._isActive=!1,e._mask=new Ct,e._positionPrecision=3,e._language=new Ct,e._exporting=new Ct,e._exportable=!0,e._bbox={x:0,y:0,width:0,height:0},e.invalid=!1,e.positionInvalid=!1,e.propertyFields={},e.applyOnClones=!1,e._measuredWidthSelf=0,e._measuredHeightSelf=0,e.maxLeft=0,e.maxRight=0,e.maxTop=0,e.maxBottom=0,e.maxLeftSelf=0,e.maxRightSelf=0,e.maxTopSelf=0,e.maxBottomSelf=0,e._isDragged=!1,e._isResized=!1,e._disabled=!1,e._internalDisabled=!1,e._updateDisabled=!1,e._internalDefaultsApplied=!1,e.rollOutDelay=0,e.isBaseSprite=!1,e.shouldClone=!0,e.appeared=!1,e.ex=0,e.ey=0,e.dragWhileResize=!1,e.measureFailed=!1,e.preventShow=!1,e.cloneTooltip=!0,e.className="Sprite",e._disposers.push(e._eventDispatcher),e.uid,e.group=e.paper.addGroup("g"),e.setPropertyValue("scale",1),e.setPropertyValue("rotation",0),e.setPropertyValue("align","none"),e.setPropertyValue("valign","none"),e.setPropertyValue("pixelPerfect",!1),e.setPropertyValue("visible",!0),e.setPropertyValue("tooltipPosition","fixed"),e.setPropertyValue("verticalCenter","none"),e.setPropertyValue("horizontalCenter","none"),e.setPropertyValue("tooltipX",c(50)),e.setPropertyValue("tooltipX",c(50)),e.setPropertyValue("marginTop",0),e.setPropertyValue("marginBottom",0),e.setPropertyValue("marginLeft",0),e.setPropertyValue("marginRight",0),e.setPropertyValue("dx",0),e.setPropertyValue("dy",0),e.setPropertyValue("paddingTop",0),e.setPropertyValue("paddingBottom",0),e.setPropertyValue("paddingRight",0),e.setPropertyValue("paddingLeft",0),e.setPropertyValue("togglable",!1),e.setPropertyValue("hidden",!1),e.setPropertyValue("urlTarget","_self"),e.setPropertyValue("alwaysShowTooltip",!1),e.setPropertyValue("showTooltipOn","hover"),e._prevMeasuredWidth=0,e._prevMeasuredHeight=0,e._measuredWidth=0,e._measuredHeight=0,e._isMeasured=!0,e.invalidate(),e.applyTheme(),e._disposers.push(e.events),e._disposers.push(e.group),e._disposers.push(e._mask),e._disposers.push(e._language),e._disposers.push(e._exporting),e._disposers.push(new Pt((function(){Nt(e._bindings,(function(t,e){e.dispose()}))}))),e.setPropertyValue("interactionsEnabled",!0),e}return a(e,t),Object.defineProperty(e.prototype,"events",{get:function(){return this._eventDispatcher},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"adapter",{get:function(){return this._adapterO||(this._adapterO=new xe(this)),this._adapterO},enumerable:!0,configurable:!0}),e.prototype.applyTheme=function(){t.prototype.applyTheme.call(this),Yi.autoSetClassName&&this.setClassName()},e.prototype.getCurrentThemes=function(){var t=this._themes;if(t)return t;var e=this._parent;return e?e.getCurrentThemes():se.themes},e.prototype.applyInternalDefaults=function(){this._internalDefaultsApplied=!0},e.prototype.invalidate=function(){this.disabled||this._isTemplate||this.__disabled||this.invalid||(this.invalid=!0,se.addToInvalidSprites(this),Cr.requestFrame())},e.prototype.validate=function(){this.dispatchImmediately("beforevalidated"),this._internalDefaultsApplied||this.applyInternalDefaults(),this.beforeDraw(),this.draw(),this.invalid=!1,se.removeFromInvalidSprites(this),this.afterDraw()},e.prototype.invalidatePosition=function(){this.disabled||this._isTemplate||this.positionInvalid||(this.positionInvalid=!0,se.addToInvalidPositions(this),Cr.requestFrame())},e.prototype.validatePosition=function(){var t=this.pixelX,e=this.pixelY,i=this.dx,n=this.dy,r=t+i,a=e+n;this._updateDisabled&&(this._internalDisabled?this.group.attr({display:"none"}):this.disabled||this.removeSVGAttribute("display"),this._updateDisabled=!1);var s=this.measure(),o=this.group.transformString;this.group.moveTo({x:r,y:a}),this.group.rotation=this.rotation,this.nonScaling?this.group.scale=this.scale/this.globalScale:this.group.scale=this.scale,(o!=this.group.transformString||s)&&(null==o?this.dispatch("transformed"):this.dispatchImmediately("transformed"),this.dispatch("positionchanged"),"hit"!=this.showTooltipOn&&"always"!=this.showTooltipOn||this.updateTooltipPosition()),t+i==r&&e+n==a&&(se.removeFromInvalidPositions(this),this.positionInvalid=!1);var l=this._maskRectangle;l&&this._clipElement.moveTo({x:l.x-t,y:l.y-e})},e.prototype.beforeDraw=function(){},e.prototype.draw=function(){},e.prototype.afterDraw=function(){var t,e;if((this.isMeasured||"none"!==this.horizontalCenter||"none"!==this.verticalCenter)&&this.measureElement(),this._inited)this.dispatch("validated");else{if(this._adapterO)try{for(var i=h(this._adapterO.keys()),n=i.next();!n.done;n=i.next()){var r=n.value;switch(r){case"mask":case"fill":case"opacity":case"fillOpacity":case"stroke":case"strokeOpacity":case"strokeWidth":case"shapeRendering":case"strokeDasharray":case"strokeDashoffset":case"strokeLinecap":case"strokeLinejoin":case"textDecoration":case"fontSize":case"fontFamily":case"fontWeight":this[r]=this[r]}}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}this.applyFilters(),this.visible=this.visible,this.interactionsEnabled=this.getPropertyValue("interactionsEnabled"),this._inited=!0,this.showOnInit||(this.appeared=!0),this.hidden&&this.hide(0),this.applyMask(),this.dispatch("validated"),this.dispatch("inited"),this.dispatchReady()}"always"==this.showTooltipOn&&(!this.visible||this.disabled||this.__disabled?this.hideTooltip(0):this.showTooltip())},e.prototype.dispatchReady=function(){this.isReady()||(this._ready=!0,this.dispatch("ready"))},e.prototype.reinit=function(){this._inited=!1,this.setState(this.defaultState),this.invalidate()},e.prototype.handleGlobalScale=function(){this.dispatch("globalscalechanged"),this.nonScalingStroke&&(this.strokeWidth=this.strokeWidth),this.nonScaling&&this.validatePosition(),this.updateFilterScale()},e.prototype.updateFilterScale=function(){var t=this;Kt(this.filters.iterator(),(function(e){e.scale=t.globalScale}))},e.prototype.removeFromInvalids=function(){se.removeFromInvalidSprites(this),se.removeFromInvalidPositions(this)},e.prototype.copyFrom=function(e){var i=this;t.prototype.copyFrom.call(this,e),this.isMeasured=e.isMeasured,this.states.copyFrom(e.states),e.filters.length>0&&e.filters.each((function(t){i.filters.push(t.clone())})),e._adapterO&&this.adapter.copyFrom(e._adapterO),e._interaction&&this.interactions.copyFrom(e.interactions),e._plugins&&this.plugins.copyFrom(e.plugins),this.configField=e.configField,this.applyOnClones=e.applyOnClones,this.disabled=e.disabled,this.virtualParent=e.virtualParent,this.exportable=e.exportable,e._tooltip&&(this._tooltip?this._tooltip.copyFrom(e.tooltip):e.cloneTooltip?this.tooltip=e.tooltip.clone():this._tooltip=e.tooltip),this._showSystemTooltip=e.showSystemTooltip,Be(e.propertyFields,this.propertyFields),Be(e.properties,this),e.fillModifier&&(this.fillModifier=e.fillModifier.clone()),e.strokeModifier&&(this.strokeModifier=e.strokeModifier.clone())},e.prototype.dispose=function(){if(!this.isDisposed()){if("always"==this.showTooltipOn&&this.tooltip&&this.tooltip.hide(),this.dispatchImmediately("beforedisposed"),this.isBaseSprite){if(this.htmlContainer)for(;this.htmlContainer.childNodes.length>0;)this.htmlContainer.removeChild(this.htmlContainer.firstChild);this.isBaseSprite=!1}if(t.prototype.dispose.call(this),this._adapterO&&this._adapterO.clear(),this.applyOnClones&&this._clones)for(var e=this._clones.length-1;e>=0;e--){this._clones.getIndex(e).dispose()}this._svgContainer&&this._svgContainer.dispose(),this._interactionDisposer&&(this._interactionDisposer.dispose(),this._interactionDisposer=void 0),this._urlDisposer&&this._urlDisposer.dispose(),this.removeFromInvalids(),this.element&&this.element.dispose(),this.group&&this.group.dispose(),this._numberFormatter&&this._numberFormatter.dispose(),this._focusFilter&&this._focusFilter.dispose();var i=this.stroke;!i||i instanceof Ie||!i.dispose||this.clonedFrom&&this.clonedFrom.stroke==i||i.dispose();var n=this.fill;if(!n||n instanceof Ie||!n.dispose||this.clonedFrom&&this.clonedFrom.fill==n||n.dispose(),_(this.id)&&this.map.removeKey(this.id),this.parent=void 0,this._filters)for(;this._filters.length>0;){var r=this._filters.getIndex(0);r.dispose(),this._filters.removeValue(r)}this._alwaysShowDisposers=void 0}},Object.defineProperty(e.prototype,"isTemplate",{get:function(){return this._isTemplate},set:function(t){t=y(t),this._isTemplate!=t&&(this._isTemplate=t,this instanceof Pr&&Kt(this.children.iterator(),(function(e){e.isTemplate=t})),t?(this.parent=this._parent,this.removeFromInvalids()):this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"showSystemTooltip",{get:function(){return _(this._showSystemTooltip)?this._showSystemTooltip:this.virtualParent?this.virtualParent.showSystemTooltip:!!this._parent&&this._parent.showSystemTooltip},set:function(t){t=y(t),this._showSystemTooltip!=t&&(this._showSystemTooltip=t,this.applyAccessibility())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"topParent",{get:function(){return this._topParent?this._topParent:this._parent?this._parent.topParent:void 0},set:function(t){this._topParent=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},set:function(t){if(!this._isTemplate){this.paper;var e=this._parent;e!=t&&(e&&e.children.removeValue(this),this._parent=t,t?(this.topParent=t.topParent,t.isTemplate&&(this.isTemplate=!0),this.baseId=t.baseId,t.children.push(this),this._tooltip&&!this._tooltipContainer&&(this._tooltip.parent=t.tooltipContainer),this._dataItem||(this.dataItem=t.dataItem),this.handleAlwaysShowTooltip(),this.dataItem&&this.applyAccessibility(),this.dispatchImmediately("parentset")):this.topParent=void 0)}},enumerable:!0,configurable:!0}),e.prototype.handleAlwaysShow=function(){this.showTooltip()},e.prototype.handleAlwaysShowTooltip=function(){var t=this,e=this._alwaysShowDisposers;if(e&&pt(e,(function(t){t.dispose()})),this._alwaysShowDisposers=[],"always"==this.showTooltipOn)for(;null!=t;){var i=t.events.on("visibilitychanged",this.handleAlwaysShow,this,!1);this.addDisposer(i),this._alwaysShowDisposers.push(i),t=t.parent}},Object.defineProperty(e.prototype,"virtualParent",{get:function(){return this._virtualParent},set:function(t){this._virtualParent=t,this.dataItem&&this.applyAccessibility()},enumerable:!0,configurable:!0}),e.prototype.appendDefs=function(){this.filterElement&&this.paper.appendDef(this.filterElement);var t=this.fill;t&&t.element&&this.paper.appendDef(t.element);var e=this.stroke;if(e&&e.element&&this.paper.appendDef(e.element),this.fillModifier&&this.fill instanceof Ie){var i=this.fillModifier.modify(this.fill);i&&i.element&&this.paper.appendDef(i.element)}if(this.strokeModifier&&this.stroke instanceof Ie){var n=this.strokeModifier.modify(this.stroke);n&&n.element&&this.paper.appendDef(n.element)}this._clipPath&&this.paper.appendDef(this._clipPath),!1===this._exportable&&(this.exportable=!1)},Object.defineProperty(e.prototype,"map",{get:function(){var t=this.topParent;return t?t.map:(this._map||(this._map=new ne),this._map)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"delayedMap",{get:function(){var t=this.topParent;return t?t.delayedMap:(this._delayedMap||(this._delayedMap=new ne),this._delayedMap)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},set:function(t){if(this._id!=t){if(this._id=t,this.map.hasKey(t))throw Error("Duplicate id ("+t+") used on multiple objects.");this.map.setKey(t,this),Yi.autoSetClassName&&this.setClassName()}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dom",{get:function(){return this.group.node},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"paper",{get:function(){if(this._paper)return this._paper;var t=this._parent;return t?t.paper:Zn()},set:function(t){this.setPaper(t)},enumerable:!0,configurable:!0}),e.prototype.setPaper=function(t){return this._paper!=t&&(this._paper=t,this.appendDefs(),!0)},Object.defineProperty(e.prototype,"htmlContainer",{get:function(){if(this._htmlContainer)return this._htmlContainer;var t=this._parent;return t?t.htmlContainer:void 0},set:function(t){this._htmlContainer=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"titleElement",{get:function(){return this._titleElement||(this._titleElement=this.paper.add("title"),this.group.add(this._titleElement)),this._titleElement},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"descriptionElement",{get:function(){return this._descriptionElement||(this._descriptionElement=this.paper.add("desc"),this.group.add(this._descriptionElement)),this._descriptionElement},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filters",{get:function(){return this._filters||(this._filters=new pe,this._disposers.push(this._filters.events.onAll(this.applyFilters,this)),this._disposers.push(new le(this._filters))),this._filters},enumerable:!0,configurable:!0}),e.prototype.setSVGAttributes=function(){this.fill=this.fill,this.opacity=this.opacity,this.fillOpacity=this.fillOpacity,this.stroke=this.stroke,this.strokeOpacity=this.strokeOpacity,this.shapeRendering=this.shapeRendering,this.strokeDasharray=this.strokeDasharray,this.strokeDashoffset=this.strokeDashoffset,this.strokeLinecap=this.strokeLinecap,this.strokeLinejoin=this.strokeLinejoin,this.focusable=this.focusable,this.tabindex=this.tabindex,this.role=this.role},e.prototype.setSVGAttribute=function(t){this.group.attr(t)},e.prototype.removeSVGAttribute=function(t){this.group.removeAttr(t)},e.prototype.setClassName=function(){var t=this.className,e=Yi.classNamePrefix;this.element&&this.element.addClass(e+t),this.group.addClass(e+t+"-group"),_(this.id)&&this.group.addClass(e+this.id),this.userClassName&&this.group.addClass(this.userClassName)},e.prototype.uidAttr=function(){return this.setSVGAttribute({id:this.uid}),this.uid},e.prototype.updateClipPath=function(){var t=this._clipElement;t&&t.moveTo({x:this.mask.pixelX,y:this.mask.pixelY})},e.prototype.createClipPath=function(){if(!this._clipPath){this._clipPath=this.paper.addGroup("clipPath"),this.paper.appendDef(this._clipPath),this._disposers.push(this._clipPath);var t=se.getUniqueId();this._clipPath.attr({id:t}),this.group.attr({"clip-path":'url("'+He()+t+'")'})}},e.prototype.applyMask=function(){var t=this.mask;if(this._clipPath&&t)if(t instanceof Pr){this._clipElement.attr({width:N(0,t.pixelWidth),height:N(0,t.pixelHeight)});var e=fi({x:t.pixelX,y:t.pixelY},t.parent,this);this._clipPath.x=e.x,this._clipPath.y=e.y}else t.element&&t.element!=this._clipElement&&(this._clipElement=t.element,this._clipPath.add(this._clipElement)),this._clipPath.scale=t.scale,this._clipPath.x=t.pixelX,this._clipPath.y=t.pixelY,this._clipPath.rotation=t.rotation},e.prototype.applyFilters=function(){var t=this;if(this._filters&&this._filters.length>0){var e=100,i=100;this.filterElement?this.filterElement.removeChildNodes():(this.filterElement=this.paper.addGroup("filter"),this._disposers.push(this.filterElement)),this.paper.appendDef(this.filterElement);var n="filter-"+this.uid;this.filterElement.attr({id:n}),Kt(this.filters.iterator(),(function(n){n.sprite=t,n.paper=t.paper,t.filterElement.attr({filterUnits:n.filterUnits}),n.appendPrimitives(t.filterElement),n.width>e&&(e=n.width),n.height>i&&(i=n.height),n.scale=t.globalScale}));var r=e+"%",a=i+"%";this.filterElement.attr({width:r,height:a,x:-(e-100)/2+"%",y:-(i-100)/2+"%"}),this.group.attr({filter:'url("'+He()+n+'")'})}else this.filterElement&&(this.group.removeAttr("filter"),this.filterElement.removeChildNodes())},e.prototype.removeClipPath=function(){this._clipPath&&(this.removeDispose(this._clipPath),this._clipPath=void 0)},e.prototype.setElement=function(t){this.element=t,this.setSVGAttributes(),this.applyAccessibility()},Object.defineProperty(e.prototype,"element",{get:function(){return this._element},set:function(t){this.removeElement(),this._element=t,this.group.add(t),t.node instanceof SVGPathElement&&(this._isPath=!0),this.invalid||this.validate(),Yi.autoSetClassName&&this.setClassName()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"svgContainer",{get:function(){return this._svgContainer?this._svgContainer:this._parent?this._parent.svgContainer:void 0},set:function(t){this._svgContainer=t},enumerable:!0,configurable:!0}),e.prototype.measureElement=function(){if(this.element)if(this.definedBBox)this._bbox=this.definedBBox;else{var t=this.element.getBBox();this._bbox={x:t.x,y:t.y,width:t.width,height:t.height}}},e.prototype.updateCenter=function(){if(this.element){var t=this.element.transformString,e=this.bbox,i=0,n=0,r=e.x,a=e.y,s=e.width,o=e.height,l=this.pixelPaddingLeft,h=this.pixelPaddingRight,p=this.pixelPaddingTop,u=this.pixelPaddingBottom,d=N(s+l+h,this.pixelWidth),c=N(o+p+u,this.pixelHeight),f=e.x,g=e.x+d,m=e.y,y=e.y+c,v=this.horizontalCenter,b=this.verticalCenter;switch(v){case"none":i=r+l;break;case"left":i=l;break;case"middle":i=l-(s+h+l)/2;break;case"right":i=-h-s}switch(b){case"none":n=a+p;break;case"top":n=p;break;case"middle":n=p-(o+u+p)/2;break;case"bottom":n=-u-o}this._measuredHeight=c,this._measuredWidth=d;var x=F(i-r,this._positionPrecision,!0),_=F(n-a,this._positionPrecision,!0);this.ex=x-l,this.ey=_-p,this.maxLeft=f+x-l,this.maxRight=g+x-l,this.maxTop=m+_-p,this.maxBottom=y+_-p,this.pixelPerfect&&0==Yi.pixelPerfectPrecision&&(x-=.5,_-=.5),this.element.moveTo({x,y:_}),t!=this.element.transformString&&this.dispatchImmediately("transformed")}},e.prototype.measure=function(){this.updateCenter();var t=this._measuredWidth,e=this._measuredHeight,i=this.maxLeft,n=this.maxRight,r=this.maxTop,a=this.maxBottom;this._measuredWidthSelf=t,this._measuredHeightSelf=e;var s=this._positionPrecision;if(this.maxLeftSelf=this.maxLeft,this.maxRightSelf=this.maxRight,this.maxTopSelf=this.maxTop,this.maxBottomSelf=this.maxBottom,0!==this.rotation||1!==this.scale||this.nonScaling){this.nonScalingStroke&&(this.strokeWidth=this.strokeWidth);var o=this.paper.svg,l=o.createSVGMatrix(),h=this.rotation,p=this.scale;this.nonScaling&&(p=this.scale/this.globalScale),l.a=B(h)*p,l.c=-E(h)*p,l.e=0,l.b=E(h)*p,l.d=B(h)*p,l.f=0;var u=o.createSVGPoint();u.x=i,u.y=r;var d=o.createSVGPoint();d.x=n,d.y=r;var c=o.createSVGPoint();c.x=n,c.y=a;var f=o.createSVGPoint();f.x=i,f.y=a;var g=u.matrixTransform(l),m=d.matrixTransform(l),y=c.matrixTransform(l),v=f.matrixTransform(l);i=Math.min(g.x,m.x,y.x,v.x),n=Math.max(g.x,m.x,y.x,v.x),r=Math.min(g.y,m.y,y.y,v.y),t=n-i,e=(a=Math.max(g.y,m.y,y.y,v.y))-r,this.maxLeft=F(i,s,!0),this.maxRight=F(n,s,!0),this.maxTop=F(r,s,!0),this.maxBottom=F(a,s,!0)}return this._measuredWidth=F(t,s,!0),this._measuredHeight=F(e,s,!0),(this._measuredWidth!=this._prevMeasuredWidth||this._measuredHeight!=this._prevMeasuredHeight)&&(this._prevMeasuredHeight=this._measuredHeight,this._prevMeasuredWidth=this._measuredWidth,this.dispatch("sizechanged"),(this.isHover||"hit"==this.showTooltipOn||"always"==this.showTooltipOn)&&this.tooltip&&this.tooltip.visible&&(_(this.tooltipText)||_(this.tooltipHTML))&&this.updateTooltipPosition(),!0)},e.prototype.insertBefore=function(t){var e=this._parent;if(e){var i=e.children.indexOf(t);-1!==i&&(e.children.moveValue(this,i),e.sortChildren())}return this},e.prototype.insertAfter=function(t){var e=this._parent;if(e){var i=e.children.indexOf(t);-1!==i&&(e.children.moveValue(this,i+1),e.sortChildren())}return this},e.prototype.removeElement=function(){this._element&&(this.removeDispose(this._element),this._element=void 0)},e.prototype.getRelativeX=function(t){return t instanceof d?t.value:this._parent?t/this._parent.innerWidth:0},e.prototype.getRelativeY=function(t){return t instanceof d?t.value:this._parent?t/this._parent.innerHeight:0},e.prototype.getPixelX=function(t){var e=0;if(D(t))e=t;else if(t instanceof d){var i=t.value;this._parent&&(e=F(this._parent.innerWidth*i,this._positionPrecision,!0))}return e},e.prototype.getPixelY=function(t){var e=0;if(D(t))e=t;else if(t instanceof d){var i=t.value;this._parent&&(e=F(this._parent.innerHeight*i,this._positionPrecision,!0))}return e},e.prototype.moveTo=function(t,e,i,n){this.isDragged&&!n||(t&&(D(t.x)&&this.setPropertyValue("x",F(t.x,this._positionPrecision,!0)),D(t.y)&&this.setPropertyValue("y",F(t.y,this._positionPrecision,!0))),D(e)&&(this.rotation=e),D(i)&&(this.scale=i),this.invalidatePosition())},Object.defineProperty(e.prototype,"mask",{get:function(){return this._adapterO?this._adapterO.apply("mask",this._mask.get()):this._mask.get()},set:function(t){var e=this;this._mask.get()!==t&&(t?(this.createClipPath(),t instanceof Pr?this._clipElement=this.paper.add("rect"):(t.isMeasured=!1,t.element&&(this._clipElement=t.element)),this._clipElement&&this._clipPath.add(this._clipElement),this._mask.set(t,new wt([t.events.on("maxsizechanged",(function(){e.inited&&e.applyMask()}),void 0,!1),t.events.on("validated",this.applyMask,this,!1),t.events.on("positionchanged",this.applyMask,this,!1)])),this.applyMask()):(this._mask.reset(),this.group.removeAttr("clip-path"),this.removeClipPath()))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maskRectangle",{get:function(){return this._maskRectangle},set:function(t){t?(this.createClipPath(),this._clipElement||(this._clipElement=this.paper.add("rect"),this._clipPath.add(this._clipElement)),this._clipElement.attr({width:t.width,height:t.height})):(this.removeClipPath(),this._clipElement=void 0),this._maskRectangle=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isMeasured",{get:function(){return this._isMeasured},set:function(t){(t=y(t))||(this._measuredWidth=0,this._measuredHeight=0),this._isMeasured!=t&&(this._isMeasured=t,this.invalidatePosition())},enumerable:!0,configurable:!0}),e.prototype.hitTest=function(t){this.invalid&&this.validate(),t.invalid&&t.validate();var e=this.pixelX+this.maxLeft,i=this.pixelY+this.maxTop,n=e+this.maxRight,r=i+this.maxBottom,a=t.pixelX+t.maxLeft,s=t.pixelY+t.maxTop,o=a+t.maxRight,l=s+t.maxBottom;return!(a>n||or||l0&&((n=this.animate(a,e,i))&&!n.isFinished()?this._disposers.push(n.events.on("animationended",(function(){r.dispatchImmediately("transitionended")}))):this.dispatchImmediately("transitionended")),t.filters.length>0){var s=[];Kt(t.filters.iterator(),(function(t){var n=t.clone();s.push(n);var a=[];Kt(r.filters.iterator(),(function(t){t.className==n.className&&(Jt(r.defaultState.filters.iterator(),(function(t){return t.className===n.className}))||r.defaultState.filters.push(t),Nt(n.properties,(function(e,i){var n=t.properties[e];n!=i&&a.push({property:e,from:n,to:i})})))})),n.animate(a,e,i)})),this.filters.clear(),this.filters.pushAll(s)}return n},e.prototype.isInTransition=function(){return this.animations.length>0},Object.defineProperty(e.prototype,"isHover",{get:function(){return!!this.isInteractive()&&this.interactions.isHover},set:function(t){(t=y(t))!==this.isHover&&this.isInteractive()&&(this.interactions.isHover=t,t?this.handleOver():(this.interactions.isRealHover=!1,this.handleOut()))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isDragged",{get:function(){return this._isDragged},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isResized",{get:function(){return this._isResized},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isDown",{get:function(){return!!this.isInteractive()&&this.interactions.isDown},set:function(t){t=y(t),this.isInteractive()&&this.isDown!=t&&(this.interactions.isDown=t,t?this.handleDown():this.handleUp())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isFocused",{get:function(){return!!this.isInteractive()&&this.interactions.isFocused},set:function(t){t=y(t),this.focusable&&this.isFocused!=t&&this.isInteractive()&&(this.interactions.isFocused=t,!0===t?this.handleFocus():this.handleBlur())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isActive",{get:function(){return this._isActive},set:function(t){this.setActive(t)},enumerable:!0,configurable:!0}),e.prototype.setActive=function(t){t=y(t),this._isActive!==t&&(this._isActive=t,t&&this.states.hasKey("active")?(this.setState("active"),this.isHover&&this.states.hasKey("hoverActive")&&this.setState("hoverActive")):this.applyCurrentState(),this.dispatchImmediately("toggled"))},Object.defineProperty(e.prototype,"disabled",{get:function(){var t=this.getPropertyValue("disabled");return _(t)?t:this.virtualParent?this.virtualParent.disabled:!!this._parent&&this._parent.disabled},set:function(t){this.setDisabled(t)},enumerable:!0,configurable:!0}),e.prototype.setDisabled=function(t){if(t=y(t),this.getPropertyValue("disabled")!=t){if(this.setPropertyValue("disabled",t,!0),t)this.parent=this._parent,this.removeFromInvalids(),this.group.attr({display:"none"}),this.dispatch("disabled");else{if(this._parent){var e=this._parent.element;e.hasChild(this.group)||e.add(this.group)}this instanceof Pr?(this.deepInvalidate(),this._background&&this._background.invalidate()):this.invalidate(),this.__disabled||this.removeSVGAttribute("display"),this.dispatch("enabled")}return this.dispatch("transformed"),Cr.requestFrame(),!0}return!1},Object.defineProperty(e.prototype,"__disabled",{get:function(){return this._internalDisabled},set:function(t){this._internalDisabled!=t&&(this._internalDisabled=t,this._updateDisabled=!0,this.invalidatePosition(),t||this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numberFormatter",{get:function(){return this._numberFormatter?this._numberFormatter:this.virtualParent?this.virtualParent.numberFormatter:this._parent?this._parent.numberFormatter:(this._numberFormatter=new ar,this._numberFormatter.language=this.language,this.numberFormatter)},set:function(t){this._numberFormatter=t,this._numberFormatter.language=this.language},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dateFormatter",{get:function(){return this._dateFormatter?this._dateFormatter:this.virtualParent?this.virtualParent.dateFormatter:this._parent?this._parent.dateFormatter:(this._dateFormatter=new sr,this._dateFormatter.language=this.language,this.dateFormatter)},set:function(t){this._dateFormatter=t,this._dateFormatter.language=this.language},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"durationFormatter",{get:function(){return this._durationFormatter?this._durationFormatter:this.virtualParent?this.virtualParent.durationFormatter:this._parent?this._parent.durationFormatter:(this._durationFormatter=new or,this._durationFormatter.language=this.language,this.durationFormatter)},set:function(t){this._durationFormatter=t,this._durationFormatter.language=this.language},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"language",{get:function(){var t=this._language.get();return t||(this.virtualParent?this.virtualParent.language:this._parent?this._parent.language:(t=new ir,this.language=t,t))},set:function(t){var e=this;this._language.get()!==t&&this._language.set(t,t.events.on("localechanged",(function(t){if(e._numberFormatter&&(e._numberFormatter.language=e.language),e._dateFormatter&&(e._dateFormatter.language=e.language),e._durationFormatter&&(e._durationFormatter.language=e.language),e._exporting.get()){var i=e._exporting.get();i.numberFormatter.language=e.language,i.dateFormatter.language=e.language,i.durationFormatter.language=e.language,i.language=e.language}e instanceof Pr&&e.deepInvalidate()})))},enumerable:!0,configurable:!0}),e.prototype.populateString=function(t,e){if(_(t)){t=m(t);var i=(t=rr().escape(t)).match(/\{([^}]+)\}/g),n=void 0;if(i)for(n=0;n-1||void 0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inertiaOptions",{get:function(){return!this.interactions.inertiaOptions&&this._parent?this._parent.inertiaOptions:this.interactions.inertiaOptions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"draggable",{get:function(){return this.getPropertyValue("draggable")},set:function(t){var e=this;t=y(t),this.setPropertyValue("draggable",t)&&(t||this.isInteractive())&&(this.applyCursorStyle(),this.interactions.draggable=t,this.interactions.setEventDisposer("sprite-draggable",t,(function(){return new wt([e.events.on("down",e.handleDown,e,!1),e.events.on("dragstart",e.handleDragStart,e,!1),e.events.on("drag",e.handleDragMove,e,!1),e.events.on("dragstop",e.handleDragStop,e,!1)])})))},enumerable:!0,configurable:!0}),e.prototype.handleDragStart=function(t){this.interactions.isTouchProtected&&t.touch||(this.interactions.originalPosition={x:this.pixelX,y:this.pixelY},this._isDragged=!0,this.hideTooltip(0))},e.prototype.dragStart=function(t){this._isDragged=!0,En().dragStart(this.interactions,t)},e.prototype.handleDragStop=function(t){this.interactions.isTouchProtected&&t.touch||(this._isDragged=!1,this.showTooltip(),this.interactions.originalPosition=void 0)},e.prototype.dragStop=function(t,e){this._isDragged=!1,En().dragStop(this.interactions,t,e)},e.prototype.handleDragMove=function(t){if(!this.interactions.isTouchProtected||!t.touch){var e=this.interactions.originalPosition;if(e&&this._isDragged){var i=this._parent.globalScale*this.svgContainer.cssScale;this.moveTo({x:e.x+t.shift.x/i,y:e.y+t.shift.y/i},void 0,void 0,!0)}this.dispatchImmediately("dragged",t)}},Object.defineProperty(e.prototype,"inert",{get:function(){return this.getPropertyValue("inert")},set:function(t){t=y(t),this.setPropertyValue("inert",t)&&(t||this.isInteractive())&&(this.interactions.inert=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hoverOptions",{get:function(){if(!this.interactions.hoverOptions){if(this.virtualParent)return this.virtualParent.hoverOptions;if(this._parent)return this._parent.hoverOptions}return this.interactions.hoverOptions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hoverable",{get:function(){return this.getPropertyValue("hoverable")},set:function(t){var e=this;t=y(t),this.setPropertyValue("hoverable",t)&&(t||this.isInteractive())&&(this.applyCursorStyle(),this.interactions.hoverable=t,this.interactions.setEventDisposer("sprite-hoverable",t,(function(){return new wt([e.events.on("over",e.handleOver,e,!1),e.events.on("out",e.handleOut,e,!1)])})))},enumerable:!0,configurable:!0}),e.prototype.handleOver=function(t){if(this._outTimeout&&this._outTimeout.dispose(),this.isHover){this.states.hasKey("hover")&&(this.isHidden||this.applyCurrentState());var e=void 0;t&&t.pointer&&(e=mi(t.pointer.point,this.svgContainer.SVGContainer,this.svgContainer.cssScale)),"hover"==this.showTooltipOn&&this.showTooltip(e)}else"hover"==this.showTooltipOn&&this.hideTooltip(),!this.isHidden&&this.states.hasKey("hover")&&this.applyCurrentState()},e.prototype.handleOut=function(t){var e=this;this.tooltip&&this.tooltip.targetSprite==this&&this.tooltip.keepTargetHover?this._outTimeout=this.setTimeout((function(){e.tooltip.isHover||(e.tooltip.targetSprite==e&&e.hideTooltip(),e._outTimeout=e.setTimeout(e.handleOutReal.bind(e),e.rollOutDelay))}),10):("hover"==this.showTooltipOn&&this.hideTooltip(),this._outTimeout=this.setTimeout(this.handleOutReal.bind(this),this.rollOutDelay))},e.prototype.handleOutReal=function(){this.isHidden||this.isHiding||!this.states.hasKey("hover")||this.applyCurrentState()},Object.defineProperty(e.prototype,"hitOptions",{get:function(){if(!this.interactions.hitOptions){if(this.virtualParent)return this.virtualParent.hitOptions;if(this._parent)return this._parent.hitOptions}return this.interactions.hitOptions},enumerable:!0,configurable:!0}),e.prototype.handleDown=function(t){1===this.interactions.downPointers.length&&(this.interactions.originalPosition={x:this.pixelX,y:this.pixelY},this.interactions.originalAngle=this.rotation,this.interactions.originalScale=this.scale,this.states.hasKey("down")&&this.setState("down"))},e.prototype.handleUp=function(t){var e=this;this._isResized=!1,this.states.hasKey("down")&&this.applyCurrentState(),"hit"==this.showTooltipOn&&(this.updateTooltipPosition(t.pointer?t.pointer.point:void 0),this._disposers.push(se.events.once("exitframe",(function(){e.showTooltip()}))),this._disposers.push(En().body.events.once("down",(function(t){e.hideTooltip()}))))},Object.defineProperty(e.prototype,"clickable",{get:function(){return this.getPropertyValue("clickable")},set:function(t){var e=this;t=y(t),this.setPropertyValue("clickable",t)&&(t||this.isInteractive())&&(this.applyCursorStyle(),this.interactions.clickable=t,this.interactions.setEventDisposer("sprite-clickable",t,(function(){return new wt([e.events.on("down",e.handleDown,e,!1),e.events.on("up",e.handleUp,e,!1)])})))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"togglable",{get:function(){return this.getPropertyValue("togglable")},set:function(t){var e=this;t=y(t),this.setPropertyValue("togglable",t)&&(t||this.isInteractive())&&this.interactions.setEventDisposer("sprite-togglable",t,(function(){return e.events.on("hit",e.handleToggle,e,!1)}))},enumerable:!0,configurable:!0}),e.prototype.handleToggle=function(t){this.isActive=!this.isActive},Object.defineProperty(e.prototype,"contextMenuDisabled",{get:function(){return this.getPropertyValue("contextMenuDisabled")},set:function(t){t=y(t),this.setPropertyValue("contextMenuDisabled",t)&&(this.interactions.contextMenuDisabled=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this.getPropertyValue("url")},set:function(t){this.setPropertyValue("url",t)&&(this._urlDisposer&&this._urlDisposer.dispose(),We(t)&&(this._urlDisposer=this.events.on("hit",this.urlHandler,this,!1),this.clickable=!0,this.cursorOverStyle=Qn.pointer))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"baseId",{get:function(){return!this._baseId&&this._parent&&(this.baseId=this._parent.baseId),this._baseId},set:function(t){this.setBaseId(t)},enumerable:!0,configurable:!0}),e.prototype.setBaseId=function(t){t!=this._baseId&&(this.invalid&&(this.invalid=!1,se.removeFromInvalidSprites(this),this.invalidate()),this._baseId=t)},Object.defineProperty(e.prototype,"baseSprite",{get:function(){return this.isBaseSprite?this:this._parent?this._parent.baseSprite:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"urlTarget",{get:function(){return this.getPropertyValue("urlTarget")},set:function(t){this.setPropertyValue("urlTarget",t)},enumerable:!0,configurable:!0}),e.prototype.urlHandler=function(t){if(We(this.url)){var e=this.populateString(this.url);"_self"===this.urlTarget?window.location.href=e:window.open(e,this.urlTarget)}},Object.defineProperty(e.prototype,"swipeOptions",{get:function(){if(!this.interactions.swipeOptions){if(this.virtualParent)return this.virtualParent.swipeOptions;if(this._parent)return this._parent.swipeOptions}return this.interactions.swipeOptions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"swipeable",{get:function(){return this.getPropertyValue("swipeable")},set:function(t){t=y(t),this.setPropertyValue("swipeable",t)&&(this.applyCursorStyle(),(t||this.isInteractive())&&(this.interactions.swipeable=t))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"trackable",{get:function(){return this.getPropertyValue("trackable")},set:function(t){t=y(t),this.setPropertyValue("trackable",t)&&(t||this.isInteractive())&&(this.applyCursorStyle(),this.interactions.trackable=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"wheelable",{get:function(){return this.getPropertyValue("wheelable")},set:function(t){this.setPropertyValue("wheelable",t)&&(t||this.isInteractive())&&(this.applyCursorStyle(),this.interactions.wheelable=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"resizable",{get:function(){return this.getPropertyValue("resizable")},set:function(t){var e=this;t=y(t),this.setPropertyValue("resizable",t)&&(t||this.isInteractive())&&(this.applyCursorStyle(),this.interactions.resizable=t,this.interactions.setEventDisposer("sprite-resizable",t,(function(){return new wt([e.events.on("down",e.handleDown,e,!1),e.events.on("resize",e.handleResize,e,!1)])})))},enumerable:!0,configurable:!0}),e.prototype.handleResize=function(t){if((!this.interactions.isTouchProtected||!t.touch)&&(this._isResized=!0,this.scale=this.interactions.originalScale*t.scale,this.validatePosition(),this.draggable||this.dragWhileResize)){this._isDragged=!1;var e=G(mi(t.point1,this.htmlContainer,this.svgContainer.cssScale),mi(t.point2,this.htmlContainer,this.svgContainer.cssScale)),i=vi(t.startPoint1,this._parent),n=vi(t.startPoint2,this._parent),r=this.interactions.originalPosition,a=this.interactions.originalScale;if(r){var s=G({x:(i.x-r.x)/a,y:(i.y-r.y)/a},{x:(n.x-r.x)/a,y:(n.y-r.y)/a}),o=di(e,this._parent);this.moveTo({x:o.x-s.x*this.scale,y:o.y-s.y*this.scale},void 0,void 0,!0)}}},Object.defineProperty(e.prototype,"cursorOptions",{get:function(){if(!this.interactions.cursorOptions){if(this.virtualParent)return this.virtualParent.cursorOptions;if(this._parent)return this._parent.cursorOptions}return this.interactions.cursorOptions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cursorOverStyle",{set:function(t){this.cursorOptions.overStyle||(this.interactions.cursorOptions={defaultStyle:this.cursorOptions.defaultStyle}),this.cursorOptions.overStyle=t,En().applyCursorOverStyle(this.interactions)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cursorDownStyle",{set:function(t){this.cursorOptions.downStyle=t},enumerable:!0,configurable:!0}),e.prototype.applyCursorStyle=function(){},Object.defineProperty(e.prototype,"interactionsEnabled",{get:function(){return!1!==this.getPropertyValue("interactionsEnabled")&&(this.virtualParent?this.virtualParent.interactionsEnabled:!this._parent||this._parent.interactionsEnabled)},set:function(t){if(t=y(t),this.setPropertyValue("interactionsEnabled",t)){var e=null;t?this.group.node.style.pointerEvents="":e="none",this.group.node.style.pointerEvents=e}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"exporting",{get:function(){return this.getExporting()},set:function(t){this._exporting.set(t,t)},enumerable:!0,configurable:!0}),e.prototype.getExporting=function(){var t=this._exporting.get();return t||(!this.isStandaloneInstance&&this._parent?this._parent.exporting:((t=new vr(this.svgContainer.SVGContainer)).sprite=this,t.language=this.language,t.numberFormatter=this.numberFormatter,t.dateFormatter=this.dateFormatter,t.durationFormatter=this.durationFormatter,this._exporting.set(t,t),t))},Object.defineProperty(e.prototype,"exportable",{get:function(){return this._exportable},set:function(t){var e=this.svgContainer;this._exportable=t,e&&(t?dt(e.nonExportableSprites,this):-1==ot(e.nonExportableSprites,this)&&e.nonExportableSprites.push(this))},enumerable:!0,configurable:!0}),e.prototype.modalPrefix=function(t){return t=Yi.classNamePrefix+t},Object.defineProperty(e.prototype,"modal",{get:function(){var t=this.svgContainer;if(t){var e=t.modal;return e.adapter.has("classPrefix",this.modalPrefix)||e.adapter.add("classPrefix",this.modalPrefix),e}},enumerable:!0,configurable:!0}),e.prototype.openModal=function(t,e){var i=this.svgContainer;if(i)return i.openModal(t,e)},e.prototype.closeModal=function(){var t=this.svgContainer;t&&t.closeModal()},Object.defineProperty(e.prototype,"popups",{get:function(){var t=this.svgContainer;if(t){var e=t.popups;return e.template.sprite=this,e.template.adapter.has("classPrefix",this.modalPrefix)||e.template.adapter.add("classPrefix",this.modalPrefix),e}},enumerable:!0,configurable:!0}),e.prototype.openPopup=function(t,e){var i=this.svgContainer;if(i)return i.openPopup(t,e)},e.prototype.closeAllPopups=function(){var t=this.svgContainer;t&&t.closeAllPopups()},Object.defineProperty(e.prototype,"x",{get:function(){return this.getPropertyValue("x")},set:function(t){this.isDragged||this.setPercentProperty("x",t,!1,!0,this._positionPrecision,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pixelX",{get:function(){var t=L(this.getPixelX(this.x),this.minX,this.maxX);return this._adapterO?this._adapterO.apply("pixelX",t):t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"relativeX",{get:function(){return this._adapterO?this._adapterO.apply("relativeX",this.getRelativeX(this.x)):this.getRelativeX(this.x)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minX",{get:function(){return this.getPropertyValue("minX")},set:function(t){D(t)&&(t=F(t,this._positionPrecision,!0),this.setPropertyValue("minX",t,!1,!0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxX",{get:function(){return this.getPropertyValue("maxX")},set:function(t){D(t)&&(t=F(t,this._positionPrecision,!0),this.setPropertyValue("maxX",t,!1,!0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this.getPropertyValue("y")},set:function(t){this.isDragged||this.setPercentProperty("y",t,!1,!0,this._positionPrecision,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pixelY",{get:function(){var t=L(this.getPixelY(this.y),this.minY,this.maxY);return this._adapterO?this._adapterO.apply("pixelY",t):t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"relativeY",{get:function(){return this._adapterO?this._adapterO.apply("relativeY",this.getRelativeX(this.y)):this.getRelativeX(this.y)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minY",{get:function(){return this.getPropertyValue("minY")},set:function(t){D(t)&&(t=F(t,this._positionPrecision,!0),this.setPropertyValue("minY",t,!1,!0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxY",{get:function(){return this.getPropertyValue("maxY")},set:function(t){D(t)&&(t=F(t,this._positionPrecision,!0),this.setPropertyValue("maxY",t,!1,!0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dx",{get:function(){return this.getPropertyValue("dx")},set:function(t){D(t)&&(t=F(t,this._positionPrecision,!0),this.setPropertyValue("dx",t,!1,!0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dy",{get:function(){return this.getPropertyValue("dy")},set:function(t){D(t)&&(t=F(t,this._positionPrecision,!0),this.setPropertyValue("dy",t,!1,!0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rotation",{get:function(){return this.getPropertyValue("rotation")},set:function(t){D(t=v(t))||(t=0),this.setPropertyValue("rotation",t,!1,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"align",{get:function(){return this.getPropertyValue("align")},set:function(t){t=b(t),this.setPropertyValue("align",t)&&this._parent&&this._parent.invalidateLayout()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"valign",{get:function(){return this.getPropertyValue("valign")},set:function(t){t=b(t),this.setPropertyValue("valign",t)&&this._parent&&this._parent.invalidateLayout()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"horizontalCenter",{get:function(){return this.getPropertyValue("horizontalCenter")},set:function(t){t=b(t),this.setPropertyValue("horizontalCenter",t)&&this.updateCenter()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"verticalCenter",{get:function(){return this.getPropertyValue("verticalCenter")},set:function(t){t=b(t),this.setPropertyValue("verticalCenter",t)&&this.updateCenter()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxWidth",{get:function(){var t=this.getPropertyValue("maxWidth");if(!D(t)&&this._parent){var e=this._parent.maxWidth;return"absolute"!=this._parent.layout&&"none"!=this.align&&null!=this.align&&(e=e-this.pixelMarginLeft-this.pixelMarginRight),e}return t},set:function(t){this.setMaxWidth(t)},enumerable:!0,configurable:!0}),e.prototype.setMaxWidth=function(t){var e=this.maxWidth,i=this.maxHeight;if(this.setPropertyValue("maxWidth",t)){D(this.relativeWidth)&&this.invalidate();var n={type:"maxsizechanged",target:this,previousWidth:e,previousHeight:i};this.dispatchImmediately("maxsizechanged",n)}},Object.defineProperty(e.prototype,"maxHeight",{get:function(){var t=this.getPropertyValue("maxHeight");if(!D(t)&&this._parent){var e=this._parent.maxHeight;return"absolute"!=this._parent.layout&&"none"!=this.valign&&null!=this.valign&&(e=e-this.pixelMarginTop-this.pixelMarginBottom),e}return t},set:function(t){this.setMaxHeight(t)},enumerable:!0,configurable:!0}),e.prototype.setMaxHeight=function(t){var e=this.maxWidth,i=this.maxHeight;if(this.setPropertyValue("maxHeight",t)){D(this.relativeHeight)&&this.invalidate();var n={type:"maxsizechanged",target:this,previousWidth:e,previousHeight:i};this.dispatchImmediately("maxsizechanged",n)}},Object.defineProperty(e.prototype,"minWidth",{get:function(){return this.getPropertyValue("minWidth")},set:function(t){this.setPropertyValue("minWidth",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minHeight",{get:function(){return this.getPropertyValue("minHeight")},set:function(t){this.setPropertyValue("minHeight",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.getPropertyValue("width")},set:function(t){this.setPercentProperty("width",t,!0,!1,this._positionPrecision,!0)&&(this.percentWidth=void 0,this.relativeWidth=void 0,t instanceof d?(this.percentWidth=t.percent,D(this._pixelWidth)&&(this.maxWidth=void 0),this._pixelWidth=void 0):(this._pixelWidth=Number(t),this.maxWidth=this._pixelWidth),this.invalidatePosition())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.getPropertyValue("height")},set:function(t){this.setPercentProperty("height",t,!0,!1,this._positionPrecision,!0)&&(this.percentHeight=void 0,this._relativeHeight=void 0,t instanceof d?(this.percentHeight=t.percent,D(this._pixelHeight)&&(this.maxHeight=void 0),this._pixelHeight=void 0):(this._pixelHeight=Number(t),this.maxHeight=this._pixelHeight),this.invalidatePosition())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pixelWidth",{get:function(){var t;t=D(this.percentWidth)?this.maxWidth:D(this._pixelWidth)?this._pixelWidth:0;var e=this.minWidth;null!=e&&tn?1:t.idx-e.idx})),t=e.map((function(t){return t.data}));var i=this.element,n=!0;if(i.node&&i.node.childNodes)for(var r=0,a=i.node.childNodes.length;r0;){var t=this.children.getIndex(0);t.parent=void 0,this.children.removeValue(t)}},e.prototype.disposeChildren=function(){for(;this.children.length>0;){var t=this.children.getIndex(0);t.dispose(),this.children.removeValue(t)}},Object.defineProperty(e.prototype,"background",{get:function(){return this._background||(this._background=this.createBackground(),this.processBackground()),this._background},set:function(t){this._background&&this.background!=t&&this.removeDispose(this._background),t&&(this._background=t,this._disposers.push(t),this.processBackground())},enumerable:!0,configurable:!0}),e.prototype.handleGlobalScale=function(){t.prototype.handleGlobalScale.call(this),this.children.each((function(t){t.handleGlobalScale()}))},e.prototype.createBackground=function(){return new _r},e.prototype.processBackground=function(){var t=this._background;t&&(t.isMeasured=!1,this._background.fill=(new bn).getFor("background"),t.parent=this,t.isMeasured=!1,this.children.removeValue(t),this._disposers.push(t),this.group.addToBack(this._background.group))},e.prototype.validateLayout=function(){var t=this;se.removeFromInvalidLayouts(this),this.layoutInvalid=!1,this._availableWidth=this.innerWidth,this._availableHeight=this.innerHeight;var e=0,i=0,n=!0;this.children&&(this.sortChildren(),pt(this._childrenByLayout,(function(r){var a,s;if(D(r.relativeWidth)?(a=F(t._availableWidth*r.relativeWidth,2),"horizontal"==t.layout&&(a-=r.pixelMarginRight+r.pixelMarginLeft)):"horizontal"==t.layout&&r.invalid&&r.validate(),D(r.relativeHeight)?(s=F(t._availableHeight*r.relativeHeight,2),"vertical"==t.layout&&(s-=r.pixelMarginTop+r.pixelMarginBottom)):"vertical"==t.layout&&r.invalid&&r.validate(),0==r.invalid){if(D(r.relativeWidth)&&(r.maxWidth=a),D(r.relativeHeight)&&(r.maxHeight=s),r.isMeasured){"horizontal"==t.layout&&(D(r.percentWidth)||r.measuredWidth>0&&(t._availableWidth-=r.measuredWidth+r.pixelMarginLeft+r.pixelMarginRight)),"vertical"==t.layout&&(D(r.percentHeight)||r.measuredHeight>0&&(t._availableHeight-=r.measuredHeight+r.pixelMarginTop+r.pixelMarginBottom));var o=r.measuredWidth,l=r.measuredHeight;"none"!=r.align&&(o+=r.pixelMarginLeft+r.pixelMarginRight),"none"!=r.valign&&(l+=r.pixelMarginTop+r.pixelMarginBottom),e=Math.max(e,o),i=Math.max(i,l)}}else r.isMeasured&&(D(r.relativeWidth)&&r.maxWidth!=a&&(r.maxWidth=a,n=!1),D(r.relativeHeight)&&r.maxHeight!=s&&(r.maxHeight=s,n=!1))}))),this._absoluteWidth=e,this._absoluteHeight=i,n&&this.arrange()},e.prototype.arrange=function(){var t,e,i,n,r,a,s,o,l,h,p,u=this,c=this.children,f=0,g=0,m=N(this.innerWidth,this._absoluteWidth),y=N(this.innerHeight,this._absoluteHeight),v=this.pixelPaddingLeft,b=this.pixelPaddingRight,x=this.pixelPaddingTop,_=this.pixelPaddingBottom,P=0,w=0,C=0,O=0,S=[],I=[],k=this.maxWidth,T=this.maxHeight,A=this.minWidth,M=this.minHeight,V=mt(c.values);if(this.reverseOrder&&V.reverse(),"grid"==this.layout){a=k,r=1;for(var F=0,j=V.length;Fr&&(r=E)}}a=L(a,1,k),r=L(r,1,k),s=this.fixedWidthGrid?k/r:k/a,s=N(1,Math.floor(s)),s=H(this.maxColumns,s),S=this.getColumnWidth(V,s,r)}for(F=0,j=V.length;FH(this.innerWidth,k)-Q+1&&O=s&&(O=0,w+=I[C],C++,P=0)}"none"!==this.layout&&(R.moveTo({x:B,y:W}),Z=B+R.maxLeft-Y,q=B+R.maxRight+X,$=W+R.maxTop-z,J=W+R.maxBottom+U,(q>e||!D(e))&&(e=q),(Zn||!D(n))&&(n=J),(q>l||!D(l))&&(l=q),(Zp||!D(p))&&(p=p))}}if("none"==this.layout){var tt=this.bbox;t=tt.x,e=tt.x+tt.width,i=tt.y,n=tt.y+tt.height}D(t)||(t=0,o=0),D(e)||(l=e=this._availableWidth),D(i)||(i=0,h=0),D(n)||(p=n=this._availableHeight),D(h)||(h=0),D(p)||(p=h),D(o)||(o=0),D(l)||(l=o),f=e-t,g=n-i,D(this.relativeWidth)&&(t=0,e=f=k-v-b),D(this.relativeHeight)&&(i=0,n=g=T-x-_),D(this._pixelWidth)&&(t=0,f=this._pixelWidth-v-b),D(A)&&f0){var nt,rt,at=f,st=g;at=-.5&&e<=this.pixelWidth+n&&i>=-.5&&i<=this.pixelHeight+n},e.prototype.copyFrom=function(e){var i=this;t.prototype.copyFrom.call(this,e),this.layout=e.layout,this.setStateOnChildren=e.setStateOnChildren,e._background&&(this.background=e._background.clone(),this.background.copyFrom(e._background)),Kt(e.children.iterator(),(function(t){t.shouldClone&&(t.clone().parent=i)}))},Object.defineProperty(e.prototype,"preloader",{get:function(){var t=this._preloader;return t||(this.parent?this.parent.preloader:void 0)},set:function(t){this._preloader&&this.removeDispose(this._preloader),this._preloader=t,t&&(t.parent=this.tooltipContainer,this._disposers.push(t))},enumerable:!0,configurable:!0}),e.prototype.setPaper=function(e){var i=this,n=t.prototype.setPaper.call(this,e);return n&&(this._background&&(this._background.paper=e,this._background.topParent=this.topParent),this.children.each((function(t){t.setPaper(e),t.topParent=i.topParent}))),n},e.prototype.removeFromInvalids=function(){t.prototype.removeFromInvalids.call(this),se.removeFromInvalidLayouts(this)},e.prototype.setDataItem=function(e){this._dataItem!=e&&(Kt(this.children.iterator(),(function(t){t.dataItem=e})),this._background&&(this._background.dataItem=e)),t.prototype.setDataItem.call(this,e)},e.prototype.measureElement=function(){this.disabled||this.isTemplate||"none"==this.layout||this.__disabled||this.validateLayout()},Object.defineProperty(e.prototype,"fontFamily",{get:function(){return this.getPropertyValue("fontFamily")},set:function(t){this.setPropertyValue("fontFamily",t,!0)&&(this.setSVGAttribute({"font-family":t}),this.invalidateLabels())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fontSize",{get:function(){return this.getPropertyValue("fontSize")},set:function(t){this.setPropertyValue("fontSize",t,!0)&&(this.setSVGAttribute({"font-size":t}),this.invalidateLabels())},enumerable:!0,configurable:!0}),e.prototype.invalidateLabels=function(){this.children.each((function(t){t.hardInvalidate?(t.hardInvalidate(),t.events.once("validated",t.handleValidate,t,!1)):t instanceof e&&t.invalidateLabels()}))},Object.defineProperty(e.prototype,"fontWeight",{get:function(){return this.getPropertyValue("fontWeight")},set:function(t){this.setPropertyValue("fontWeight",t),this.setSVGAttribute({"font-weight":t})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textDecoration",{get:function(){return this.getPropertyValue("textDecoration")},set:function(t){this.setPropertyValue("textDecoration",t),this.setSVGAttribute({"text-decoration":t})},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._background&&this._background.dispose(),this._shouldBeReady=[],this.disposeChildren(),t.prototype.dispose.call(this)},e.prototype.setState=function(e,i,n){var r=e;return e instanceof Ni&&(r=e.name),this.setStateOnChildren&&Kt(this.children.iterator(),(function(t){t.setState(r,i,n),"active"!=r&&(t.isActive=!1)})),this._background&&this._background.setState(r),this.setStateOnSprites.length&&pt(this.setStateOnSprites,(function(t){t.setState(r,i,n)})),t.prototype.setState.call(this,e,i,n)},e.prototype.setActive=function(e){t.prototype.setActive.call(this,e),this._background&&(this._background.isActive=e)},e.prototype.dispatchReady=function(){var e=this;if(!this.isReady()&&!this.isDisposed()){var i=!0;Gt(this.children.iterator(),(function(t){return!!(t.__disabled||t.disabled||t.isReady())||(i=!1,!1)})),ut(this._shouldBeReady,(function(t){return!!(t.__disabled||t.disabled||t.isReady())||(i=!1,!1)})),i?t.prototype.dispatchReady.call(this):se.events.once("exitframe",(function(){e.dispatchReady(),Cr.requestFrame()}),void 0,!1)}},e.prototype._systemUpdate=function(e){this.children.each((function(t){t.invalid&&(t._systemCheckIfValidate()?t.dataItem&&t.dataItem.component&&t.dataItem.component.dataInvalid?e.push(t):t.validate():e.push(t))})),t.prototype._systemUpdate.call(this,e)},e.prototype._systemValidatePositions=function(){this.children.each((function(t){t.positionInvalid&&t.validatePosition()})),t.prototype._systemValidatePositions.call(this)},e.prototype._systemValidateLayouts=function(){this.layoutInvalid&&!this.isDisposed()&&this.validateLayout()},Object.defineProperty(e.prototype,"tapToActivate",{get:function(){return this._tapToActivate},set:function(t){this._tapToActivate!=t&&this.setTapToActivate(t)},enumerable:!0,configurable:!0}),e.prototype.setTapToActivate=function(t){var e=this;this._tapToActivate=t,this.interactions.isTouchProtected=t,t&&this.interactions.setEventDisposer("container-tapToActivate",t,(function(){return new wt([e.events.on("hit",e.handleTapToActivate,e,!1),e.events.on("down",e.initTapTimeout,e,!1),e.events.on("track",e.initTapTimeout,e,!1),En().body.events.on("down",(function(t){En().isLocalElement(t.pointer,e.paper.svg,e.uid)||e.handleTapToActivateDeactivation()}),e,!1)])})),En()},e.prototype.handleTapToActivate=function(){this.interactions.isTouchProtected=!1,this.initTapTimeout()},e.prototype.handleTapToActivateDeactivation=function(){this.interactions.isTouchProtected=!0},e.prototype.initTapTimeout=function(){var t=this;this._tapToActivateTimeout&&this._tapToActivateTimeout.dispose(),this.tapToActivate&&!this.interactions.isTouchProtected&&this.tapTimeout&&(this._tapToActivateTimeout=this.setTimeout((function(){t.handleTapToActivateDeactivation()}),this.tapTimeout))},e.prototype.moveHtmlContainer=function(t){var e=en(t);if(e){this.htmlContainer=e;var i=this.svgContainer;i.htmlElement=e,i.htmlElement.appendChild(i.SVGContainer),i.initSensor(),i.measure()}else O(t)&&""!=t&&Cr.log("html container '"+t+"' not found")},e.prototype.hasLicense=function(){if(Yi.commercialLicense)return!0;for(var t=0;t0;){var r=(a=n[0]).dataProvider;if(a.isDisposed())dt(n,a);else if(r&&r.dataInvalid)try{if(r.validateData(),r.dataValidationProgress<1)break}catch(t){dt(n,r),r.raiseCriticalError(t)}else try{if(a.validateData(),a.dataValidationProgress<1)break}catch(t){dt(n,a),a.raiseCriticalError(t)}}if(Date.now()-e>this.updateStepDuration)break}for(;se.invalidRawDatas.length>0;){if((a=se.invalidRawDatas[0]).isDisposed())dt(se.invalidRawDatas,a);else try{a.validateRawData()}catch(t){dt(se.invalidRawDatas,a),a.raiseCriticalError(t)}}for(;se.invalidDataItems.length>0;){r=(a=se.invalidDataItems[0]).dataProvider;if(a.isDisposed()||a.dataInvalid||r&&r.dataInvalid);else try{a.validateDataItems()}catch(t){dt(se.invalidDataItems,a),a.raiseCriticalError(t)}dt(se.invalidDataItems,a)}for(;se.invalidDataRange.length>0;){var a;r=(a=se.invalidDataRange[0]).dataProvider;if(a.isDisposed()||a.dataInvalid||r&&r.dataInvalid);else try{a.validateDataRange(),a.skipRangeEvent||a.dispatchImmediately("datarangechanged"),a.skipRangeEvent=!1}catch(t){dt(se.invalidDataRange,a),a.raiseCriticalError(t)}dt(se.invalidDataRange,a)}var s=[];Nt(se.invalidLayouts,(function(e){t.validateLayouts(e)})),Nt(se.invalidPositions,(function(e){t.validatePositions(e)}));var o=!1;if(e=Date.now(),Nt(se.invalidSprites,(function(i,n){for(var r=0;n.length>0;){if(t.validateLayouts(i),t.validatePositions(i),5==++r){if(Date.now()-e>t.updateStepDuration)break;r=0}var a=n[n.length-1];if(a&&!a.isDisposed()){if(a._systemCheckIfValidate())if(t.checkIfValidate2(a))try{a._systemUpdate(s)}catch(t){a.invalid=!1,dt(n,a),a.raiseCriticalError(t)}else s.push(a);else s.push(a);a.invalid=!1}dt(n,a)}se.invalidSprites[i]=se.invalidSprites[i].concat(s)})),Nt(se.invalidSprites,(function(t,e){e.length>0&&(o=!0)})),Nt(se.invalidDatas,(function(t,e){e.length>0&&(o=!0)})),pt(mt(this.animations),(function(t){t.update()})),Nt(se.invalidLayouts,(function(e){t.validateLayouts(e)})),Nt(se.invalidPositions,(function(e){t.validatePositions(e)})),function(){for(var t=Date.now(),e=Tt.length,i=0;i0||[].length>0)&&this.requestFrame(),this.updateStepDuration<200){var l=!0;Nt(se.invalidDatas,(function(t,e){e.length>0&&(l=!1)})),Nt(se.invalidSprites,(function(t,e){e.length>0&&(l=!1)})),l&&(this.updateStepDuration=200)}}},t.prototype.checkIfValidate2=function(t){return!(t.dataItem&&t.dataItem.component&&t.dataItem.component.dataInvalid&&!t.dataItem.component.isTemplate)},t.prototype.requestFrame=function(){var t=this;this._frameRequested||(At((function(){t.update()})),this._frameRequested=!0)},t.prototype.softInvalidate=function(t){var e=this;t.children.each((function(t){var i,n,r;t instanceof Pr&&e.softInvalidate(t),t.measureFailed&&(i=t,n="Label",null!=(r=se.registeredClasses[n])&&i instanceof r?t.hardInvalidate():t.invalidate(),t.measureFailed=!1)}))},t.prototype.validatePositions=function(t){for(var e=se.invalidPositions[t];e.length>0;){var i=e[e.length-1];if(i.isDisposed())dt(e,i);else try{i._systemValidatePositions()}catch(t){i.positionInvalid=!1,dt(e,i),i.raiseCriticalError(t)}}},t.prototype.validateLayouts=function(t){for(var e=se.invalidLayouts[t];e.length>0;){var i=e[e.length-1];if(i.isDisposed())dt(e,i);else try{i.children.each((function(t){t._systemValidateLayouts()})),i.validateLayout()}catch(t){i.layoutInvalid=!1,dt(e,i),i.raiseCriticalError(t)}}},t.prototype.log=function(t){!function(){for(var t=[],e=0;e0},enumerable:!0,configurable:!0}),t.prototype.maybeToNumber=function(t,e){return-1!==this.options.numberFields.indexOf(t)?ri(e):e},Object.defineProperty(t.prototype,"parsableDates",{get:function(){return this.options.dateFields&&this.options.dateFields.length>0},enumerable:!0,configurable:!0}),t.prototype.maybeToDate=function(t,e){return-1!==this.options.dateFields.indexOf(t)?this.options.dateFormatter.parse(e,this.dateFormat):e},t.prototype.maybeToEmpty=function(t){return _(t)&&""!=t||!_(this.options.emptyAs)?t:this.options.emptyAs},Object.defineProperty(t.prototype,"dateFormatter",{get:function(){return this.options.dateFormatter||(this.options.dateFormatter=new sr,this.options.dateFormat&&(this.options.dateFormat=this.options.dateFormat)),this.options.dateFormatter},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dateFormat",{get:function(){return this.options.dateFormat||this.dateFormatter.inputDateFormat},enumerable:!0,configurable:!0}),t}(),Dr=[",",";","\t"],Sr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.contentType="text/csv",e.options={delimiter:"",reverse:!1,skipRows:0,skipEmpty:!0,useColumnNames:!1},e}return a(e,t),e.isCSV=function(t){return!!e.getDelimiterFromData(t)},e.getDelimiterFromData=function(t){var e,i=t.split("\n"),n=i.length;return pt(Dr,(function(t){for(var r=0,a=0,s=0;s1)){a=0;break}if(0===a)a=r;else if(r!=a){a=0;break}}a&&(e=t)})),e},e.prototype.parse=function(t){this.options.delimiter||(this.options.delimiter=e.getDelimiterFromData(t));var i,n,r,a=this.CSVToArray(t,this.options.delimiter),s=_(this.options.emptyAs),o=this.parsableNumbers,l=this.parsableDates,h=[],p=[];for(n=0;n0&&n.delay(e))})),n},e.prototype.dispose=function(){t.prototype.dispose.call(this),pt(this.sprites,(function(t){t.dispose()})),this.sprites=[]},e.prototype.hide=function(t,e,i,n){var r=this;if(this.isHiding=!0,pt(this.sprites,(function(i){var n=i.hide(t);null==n||n.isFinished()||(r._disposers.push(n),null!=e&&e>0&&n.delay(e))})),D(i)&&n){var a;if(pt(n,(function(n){var s=r.setWorkingValue(n,i,t,e);s&&(a=s)})),a&&!a.isFinished())return this._hideDisposer=a.events.on("animationended",(function(){r.setVisibility(!1,!0),r.isHiding=!1})),this._disposers.push(this._hideDisposer),a;this.isHiding=!1,this.setVisibility(!1,!0)}else this.isHiding=!1,this.setVisibility(!1)},e.prototype.getDuration=function(t){if(!D(t)){var e=this.component;e&&(t=e.interpolationDuration)}if(null!=t)return this._adapterO?this._adapterO.apply("duration",t):t},e.prototype.getValue=function(t,e){if(t&&this.component){e||(e=this.component.dataFields[t+"Show"])||(e="value");var i=this.values[t][e];return this._adapterO&&this._adapterO.isEnabled("value")?this._adapterO.apply("value",{value:i,field:t}).value:i}},e.prototype.getWorkingValue=function(t){if(t&&this.component){var e=this.component.dataFields[t+"Show"];return e||(e="workingValue"),this._adapterO?this._adapterO.apply("workingValue",{workingValue:this.values[t][e],field:t}).workingValue:this.values[t][e]}},e.prototype.getActualWorkingValue=function(t){return this.values[t].workingValue},e.prototype.setValue=function(t,e,i,n){var r=this.values[t].value,a=this.getDuration(i);if(r!==(e=v(e))){if(this.values[t].value=e,this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("valuechanged")){var s={type:"valuechanged",target:this,property:t};this.events.dispatchImmediately("valuechanged",s)}this.component&&this.component.handleDataItemValueChange(this,t)}this.setWorkingValue(t,e,a,n)},e.prototype.setCalculatedValue=function(t,e,i){if(this.values[t][i]!==e&&D(e)){if(this.values[t][i]=e,this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("calculatedvaluechanged")){var n={type:"calculatedvaluechanged",target:this,property:t};this.events.dispatchImmediately("calculatedvaluechanged",n)}this.component&&this.component.handleDataItemCalculatedValueChange(this,t)}},e.prototype.setWorkingValue=function(t,e,i,n){if(D(this.values[t].value)){var r=this.getDuration(i),a=this.values[t].workingValue;if(null!=r&&r>0&&D(a)&&this.component){if(a!=e){var s=this.animate({childObject:this.values[t],property:"workingValue",from:a,to:e,dummyData:t},r,this.component.interpolationEasing);return null!=n&&s.delay(n),s.events.on("animationstarted",this.handleInterpolationProgress,this),s.events.on("animationprogress",this.handleInterpolationProgress,this),s.events.on("animationended",this.handleInterpolationProgress,this),this._valueAnimations[t]=s,s}(o=this._valueAnimations[t])&&o.stop(),this.values[t].workingValue=e}else{var o;if((o=this._valueAnimations[t])&&o.stop(),this.values[t].workingValue=e,this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("workingvaluechanged")){var l={type:"workingvaluechanged",target:this,property:t};this.events.dispatchImmediately("workingvaluechanged",l)}this.component&&this.component.handleDataItemWorkingValueChange(this,t)}}},e.prototype.setLocation=function(t,e,i,n){if(this.locations[t]!==e){if(this.locations[t]=e,this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("locationchanged")){var r={type:"locationchanged",target:this,property:t};this.events.dispatchImmediately("locationchanged",r)}this.component&&this.component.handleDataItemValueChange(this,t),this.setWorkingLocation(t,e,i,n)}},e.prototype.setWorkingLocation=function(t,e,i,n){var r=this.getDuration(i),a=this.workingLocations[t];if(null!=r&&r>0&&D(a)&&this.component){if(a!=e){var s=this.animate({childObject:this.workingLocations,property:t,from:a,to:e,dummyData:t},r,this.component.interpolationEasing);return null!=n&&s.delay(n),s.events.on("animationstarted",this.handleInterpolationProgress,this),s.events.on("animationprogress",this.handleInterpolationProgress,this),s.events.on("animationended",this.handleInterpolationProgress,this),this._locationAnimations[t]=s,s}(o=this._locationAnimations[t])&&o.stop(),this.workingLocations[t]=e}else{var o;if((o=this._locationAnimations[t])&&o.stop(),this.workingLocations[t]=e,this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("workinglocationchanged")){var l={type:"workinglocationchanged",target:this,property:t};this.events.dispatchImmediately("workinglocationchanged",l)}this.component&&this.component.handleDataItemWorkingLocationChange(this,t)}},e.prototype.setDate=function(t,e,i){!C(e)&&this.component&&(e=this.component.dateFormatter.parse(e)),this.dates[t]!==e&&(this.dates[t]=e,this.setValue(t,e.getTime(),i))},e.prototype.getDate=function(t){return this._adapterO?this._adapterO.apply("date",{date:this.dates[t],field:t}).date:this.dates[t]},e.prototype.setProperty=function(t,e){if(this.properties[t]!==e){if(this.hasProperties=!0,this.properties[t]=e,this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("propertychanged")){var i={type:"propertychanged",target:this,property:t,value:e};this.events.dispatchImmediately("propertychanged",i)}this.component&&this.component.handleDataItemPropertyChange(this,t)}},e.prototype.setCategory=function(t,e){O(e)||(e=m(e)),this.categories[t]!==e&&(this.categories[t]=e)},e.prototype.copyFrom=function(e){t.prototype.copyFrom.call(this,e),e.dataContext&&(this.dataContext=function(t,e){return Nt(t,(function(t,i){e[t]=i})),e}(e.dataContext,{})),Be(e.locations,this.locations),e._adapterO&&this.adapter.copyFrom(e._adapterO),this.component=e.component},Object.defineProperty(e.prototype,"opacity",{set:function(t){pt(this.sprites,(function(e){e.opacity=t}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ignoreMinMax",{get:function(){return this._ignoreMinMax},set:function(t){if(this._ignoreMinMax=t,this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("propertychanged")){var e={type:"propertychanged",target:this,property:"ignoreMinMax",value:t};this.events.dispatchImmediately("propertychanged",e)}this.component&&this.component.handleDataItemPropertyChange(this,"ignoreMinMax")},enumerable:!0,configurable:!0}),e.prototype.animate=function(t,e,i){return new qi(this,t,e,i).start()},e.prototype.handleInterpolationProgress=function(t){var e=t.target.animationOptions[0];if(e){if(this._eventDispatcher&&!this.__disabled&&this.events.isEnabled("workingvaluechanged")){var i={type:"workingvaluechanged",target:this,property:e.dummyData};this.events.dispatchImmediately("workingvaluechanged",i)}this.component&&this.component.handleDataItemWorkingValueChange(this,e.dummyData)}},e.prototype.hasValue=function(t){for(var e=0,i=t.length;e0;)this.data.shift(),e--;this.invalidateData()},e.prototype.removeData=function(t,e){if(D(t)&&t>0){for(;t>0;){var i=this.mainDataSet.getIndex(0);i&&this.mainDataSet.remove(i),this.dataUsers.each((function(t){if(!t.data||0==t.data.length){var e=t.mainDataSet.getIndex(0);e&&t.mainDataSet.remove(e)}})),e||this.data.shift(),this._parseDataFrom>0&&this._parseDataFrom--,t--}this.invalidateDataItems()}},e.prototype.invalidateData=function(){this.disabled||this.isTemplate||(se.addToInvalidComponents(this),Cr.requestFrame(),this.dataInvalid=!0,Kt(this.dataUsers.iterator(),(function(t){t.invalidateDataItems()})))},e.prototype.invalidateDataUsers=function(){Kt(this.dataUsers.iterator(),(function(t){t.invalidate()}))},e.prototype.invalidateDataItems=function(){this.disabled||this.isTemplate||(ct(se.invalidDataItems,this),Cr.requestFrame(),this.dataItemsInvalid=!0,Kt(this.dataUsers.iterator(),(function(t){t.invalidateDataItems()})))},e.prototype.invalidateDataRange=function(){this.disabled||this.isTemplate||(this.dataRangeInvalid=!0,ct(se.invalidDataRange,this),Cr.requestFrame())},e.prototype.validateDataRange=function(){dt(se.invalidDataRange,this),this.dataRangeInvalid=!1,this.startIndex==this._prevStartIndex&&this.endIndex==this._prevEndIndex||(this.rangeChangeUpdate(),this.appendDataItems(),this.invalidate(),this.dispatchImmediately("datarangechanged"))},e.prototype.sliceData=function(){this._workingStartIndex=this.startIndex,this._workingEndIndex=this.endIndex},e.prototype.rangeChangeUpdate=function(){this.sliceData(),this._prevStartIndex=this.startIndex,this._prevEndIndex=this.endIndex},e.prototype.appendDataItems=function(){for(var t=this.endIndex,e=this.startIndex;e0&&this.disposeData(),this.data.length>0){var e=this.preloader;Kt(this.dataUsers.iterator(),(function(t){t._startIndex=void 0,t._endIndex=void 0}));for(var i=0,n=Date.now(),r=this._parseDataFrom,a=this.data.length,s=function(){var t=o.data[r];if(o._usesData){var a=o.getDataItem(t);o.processDataItem(a,t)}if((o.dataUsers.each((function(e){if(0==e.data.length){var i=e.getDataItem(t);e.processDataItem(i,t)}})),100==++i)&&(i=0,Date.now()-n>o.parsingStepDuration&&r.5&&!e.visible||(e.progress=r/o.data.length)),o.dataValidationProgress=r/o.data.length,r=o.data.length,o.invalidateData(),{value:void 0}},o=this;r0?this.invalidateData():(this.dispatchImmediately("beforedatavalidated"),this.dispatch("datavalidated")))},e.prototype.getDataSource=function(t){var e=this;return _(this._dataSources[t])||(this._dataSources[t]=new Tr,this._dataSources[t].component=this,this.setDataSourceEvents(this._dataSources[t],t),this._dataSources[t].adapter.add("dateFields",(function(t){return e.dataSourceDateFields(t)})),this._dataSources[t].adapter.add("numberFields",(function(t){return e.dataSourceNumberFields(t)})),this.events.on("inited",(function(){e.loadData(t)}),this,!1)),this._dataSources[t]},Object.defineProperty(e.prototype,"dataSource",{get:function(){return this._dataSources.data||this.getDataSource("data"),this._dataSources.data},set:function(t){var e=this;this._dataSources.data&&this.removeDispose(this._dataSources.data),this._dataSources.data=t,this._dataSources.data.component=this,this.events.on("inited",(function(){e.loadData("data")}),this,!1),this.setDataSourceEvents(t,"data")},enumerable:!0,configurable:!0}),e.prototype.loadData=function(t){this._dataSources[t].load()},e.prototype.dataSourceDateFields=function(t){return t},e.prototype.dataSourceNumberFields=function(t){return t},e.prototype.populateDataSourceFields=function(t,e,i){return pt(i,(function(i){e[i]&&-1===ot(t,e[i])&&t.push(e[i])})),t},e.prototype.setDataSourceEvents=function(t,e){var i=this;t.events.on("started",(function(t){var e=i.preloader;e&&(e.progress=0)}),void 0,!1),t.events.on("loadstarted",(function(t){var e=i.preloader;e&&(e.progress=.25)}),void 0,!1),t.events.on("loadended",(function(t){var e=i.preloader;e&&(e.progress=.5)}),void 0,!1),t.events.on("parseended",(function(t){var e=i.preloader;e&&(e.progress=.75)}),void 0,!1),t.events.on("ended",(function(t){var e=i.preloader;e&&(e.progress=1)}),void 0,!1),t.events.on("error",(function(t){var e=i.preloader;e&&(e.progress=1),i.openModal(t.message)}),void 0,!1),e&&t.events.on("done",(function(n){var r=i.preloader;r&&(r.progress=1),"data"!=e||I(n.data)||(n.data=[n.data]),t.incremental&&"data"==e&&i.data.length?i.addData(n.data,t.keepCount?n.data.length:0):t.updateCurrentData&&"data"==e&&i.data.length?(pt(i.data,(function(t,e){_(n.data[e])&&Nt(t,(function(i,r){_(n.data[e][i])&&(t[i]=n.data[e][i])}))})),i.invalidateRawData()):i[e]=n.data}))},Object.defineProperty(e.prototype,"responsive",{get:function(){return this._responsive||(this._responsive=new Ar,this._responsive.component=this),this._responsive},set:function(t){this._responsive=t,this._responsive.component=this},enumerable:!0,configurable:!0}),e.prototype.zoom=function(t,e,i,n){var r=this;void 0===e&&(e=!1),void 0===i&&(i=!1);var a=t.start,s=t.end,o=t.priority;if(t.start==t.end&&(t.start=t.start-.5/this.maxZoomFactor,t.end=t.end+.5/this.maxZoomFactor),"end"==o&&1==s&&0!=a&&athis.end&&(o="end"),D(n)||(n=this.maxZoomDeclination),!D(a)||!D(s))return{start:this.start,end:this.end};if(this._finalStart!=a||this._finalEnd!=s){var l=this.maxZoomFactor/this.minZoomCount,h=this.maxZoomFactor/this.maxZoomCount;if("start"==o?(this.maxZoomCount>0&&1/(s-a)l&&(s=a+1/l),s>1&&s-a<1/l&&(a=s-1/l)):(this.maxZoomCount>0&&1/(s-a)l&&(a=s-1/l),a<0&&s-a<1/l&&(s=a+1/l)),a<-n&&(a=-n),1/(s-a)>l&&(s=a+1/l),s>1+n&&(s=1+n),1/(s-a)>l&&(a=s-1/l),this._finalEnd=s,this._finalStart=a,this.skipRangeEvent=e,this.dispatchImmediately("rangechangestarted"),this.rangeChangeDuration>0&&!i){var p=this.rangeChangeAnimation;if(p&&p.progress<1){var u=p.animationOptions;if(u.length>1){if(u[0].to==a&&u[1].to==s)return{start:a,end:s};p.isDisposed()||p.stop()}}this.rangeChangeAnimation&&this.rangeChangeAnimation.kill(),p=this.animate([{property:"start",to:a},{property:"end",to:s}],this.rangeChangeDuration,this.rangeChangeEasing),this.rangeChangeAnimation=p,p&&!p.isFinished()?p.events.on("animationended",(function(){r.dispatchImmediately("rangechangeended")})):this.dispatchImmediately("rangechangeended")}else this.start=a,this.end=s,this.dispatch("rangechangeended")}return{start:a,end:s}},e.prototype.zoomToIndexes=function(t,e,i,n){if(D(t)&&D(e)){var r=t/this.dataItems.length,a=e/this.dataItems.length;this.zoom({start:r,end:a},i,n)}},Object.defineProperty(e.prototype,"zoomFactor",{get:function(){return L(1/(this.end-this.start),1,this.maxZoomFactor)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxZoomFactor",{get:function(){return this.getPropertyValue("maxZoomFactor")},set:function(t){this.setPropertyValue("maxZoomFactor",t)&&(1==t&&(this.maxZoomDeclination=0),this.invalidateDataRange())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxZoomDeclination",{get:function(){return this.getPropertyValue("maxZoomDeclination")},set:function(t){this.setPropertyValue("maxZoomDeclination",t)&&this.invalidateDataRange()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startIndex",{get:function(){return D(this._startIndex)||(this._startIndex=0),this._startIndex},set:function(t){this._startIndex=L(Math.round(t),0,this.dataItems.length),this.start=this.indexToPosition(this._startIndex)},enumerable:!0,configurable:!0}),e.prototype.indexToPosition=function(t){return t/this.dataItems.length},Object.defineProperty(e.prototype,"endIndex",{get:function(){var t=this.dataItems.length;return(!D(this._endIndex)||this._endIndex>t)&&(this._endIndex=t),this._endIndex},set:function(t){this._endIndex=L(Math.round(t),0,this.dataItems.length),this.end=this.indexToPosition(this._endIndex)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"start",{get:function(){return this._adapterO?this._adapterO.apply("start",this._start):this._start},set:function(t){if(this._start!=t){this._start=t;var e=Math.max(0,Math.floor(this.dataItems.length*t)||0);this._startIndex=Math.min(e,this.dataItems.length),this.invalidateDataRange(),this.invalidate(),this.dispatchImmediately("startchanged"),this.dispatch("startendchanged")}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this._adapterO?this._adapterO.apply("end",this._end):this._end},set:function(t){this._end!=t&&(this._end=t,this._endIndex=Math.min(this.dataItems.length,Math.ceil(this.dataItems.length*t)||0),this.invalidateDataRange(),this.invalidate(),this.dispatchImmediately("endchanged"),this.dispatch("startendchanged"))},enumerable:!0,configurable:!0}),e.prototype.removeFromInvalids=function(){t.prototype.removeFromInvalids.call(this),se.removeFromInvalidComponents(this),dt(se.invalidDataItems,this),dt(se.invalidDataRange,this),dt(se.invalidRawDatas,this)},Object.defineProperty(e.prototype,"dataItems",{get:function(){if(""!=this._currentDataSetId){var t=this.dataSets.getKey(this._currentDataSetId);if(t)return t}return this._dataItems},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dataSets",{get:function(){return this._dataSets||(this._dataSets=new ne),this._dataSets},enumerable:!0,configurable:!0}),e.prototype.setDataSet=function(t){if(this._currentDataSetId!=t){if(this.dataSets.getKey(t))return this.dataItems.each((function(t){t.__disabled=!0})),this._currentDataSetId=t,this.invalidateDataRange(),this._prevStartIndex=void 0,this.dataItems.each((function(t){t.__disabled=!1})),!0;if(""!=this._currentDataSetId)return this.dataItems.each((function(t){t.__disabled=!0})),this._currentDataSetId="",this.invalidateDataRange(),this._prevStartIndex=void 0,this.dataItems.each((function(t){t.__disabled=!1})),!0}return!1},Object.defineProperty(e.prototype,"currentDataSetId",{get:function(){return this._currentDataSetId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mainDataSet",{get:function(){return this._dataItems},enumerable:!0,configurable:!0}),e.prototype._updateDataItemIndexes=function(t){for(var e=this.mainDataSet.values,i=e.length,n=t;nthis.availableWidth||this.bbox.widththis.availableHeight||this.bbox.heightr){this.isOversized=!0;var C=x.element.textContent,O=x.bbox.width/C.length,D=H(Math.ceil((x.bbox.width-r)/O),C.length);if(this.truncate){var S=!1,I=x.element.node;if(I&&I.childNodes)for(var k=x.element.node.childNodes.length-1;k>=0;k--){var T=x.element.node.childNodes[k];if(S&&x.bbox.width<=r&&(T.textContent+=" "+this.ellipsis,x.bbox=x.element.getBBox(),x.bbox.width=Math.floor(x.bbox.width),x.bbox.width<=r))break;S=!1;var A=T.textContent;for(C=x.element.textContent,D=H(Math.ceil((x.bbox.width-r)/O),C.length);x.bbox.width>r&&D<=C.length&&D>0;){(j=N(C.length-D-this.ellipsis.length,1))<=1&&(D=0,k>0&&(S=!0,x.element.node.removeChild(T))),(A=Ze(A,j,this.ellipsis,this.fullWords,this.rtl)).length>j&&this.fullWords&&(A=Ze(A,j,this.ellipsis,!1,this.rtl)),T.textContent=A,x.bbox=x.element.getBBox(),x.bbox.width=Math.floor(x.bbox.width),D=Math.ceil(1.1*D)}b=!0}}else{if(x.element.node){for(var M=x.element.node.lastChild,V=void 0;x.bbox.width>r&&D<=C.length&&D>0;){var j=N(w.text.length-D,1);if(v?V=Ke(w.text,j,!0,this.rtl):((V=Ke(w.text,j,!0,this.rtl,!1))[0].length>j||1===j)&&(x.element.node.removeChild(M),D=0),D>0){var L=V.shift();v&&(L=qe(L)),M.textContent=rr().cleanUp(L)}x.bbox=x.element.getBBox(),x.bbox.width=Math.floor(x.bbox.width),D++}if(V.length>0){var E="";_(V)&&(this.rtl?E+=V.join("")+c:E+=c+V.join("").replace(/([\[\]]{1})/g,"$1$1"));for(var R=P+1;R0&&(d+=Y),u.removeElement(W);var X=this.getLineInfo(f);X&&(X.text="",X.element.textContent="")}}this.maybeHideOversized(),this.measureFailed=!1,0!=this.bbox.width&&0!=this.bbox.height||(this.measureFailed=!0),this._measuredWidth=F(N(this.bbox.width,this.pixelWidth-this.pixelPaddingLeft-this.pixelPaddingRight)),this._measuredHeight=F(N(this.bbox.height,this.pixelHeight-this.pixelPaddingTop-this.pixelPaddingBottom)),this.alignSVGText(),this.bbox.width=this._measuredWidth,this.bbox.height=this._measuredHeight,i==this._measuredHeight&&e==this._measuredWidth||this.dispatch("transformed"),this.hideUnused(h.length)}else{this.element.removeAttr("display"),this.resetBBox(),(u=this.element).removeChildren();var z=this.paper.foreignObject();u.add(z),this.maxWidth&&z.attr({width:this.maxWidth-this.pixelPaddingLeft-this.pixelPaddingRight}),this.maxHeight&&z.attr({height:this.maxHeight-this.pixelPaddingTop-this.pixelPaddingBottom});var U=this.getHTMLLineElement(l);z.node.appendChild(U),U.style.display="inline-block";var G=U.clientWidth,K=U.clientHeight;U.style.display="block",this._bbox={x:0,y:0,width:G,height:K},z.attr({width:G+1,height:K}),this.maybeHideOversized(),this._measuredWidth=N(this.bbox.width,this.pixelWidth-this.pixelPaddingLeft-this.pixelPaddingRight),this._measuredHeight=N(this.bbox.height,this.pixelHeight-this.pixelPaddingTop-this.pixelPaddingBottom),this.bbox.width=this._measuredWidth,this.bbox.height=this._measuredHeight,this.truncate&&(U.style.overflow="hidden"),(G>r||K>a)&&(this.isOversized=!0)}this.setStyles(),this.updateCenter(),this.updateBackground(),"none"==p&&this.group.attr({display:"none"}),this.pathElement&&this.paper.appendDef(this.pathElement)}else this.element.attr({display:"none"})}}else n.events.once("maxsizechanged",this.hardInvalidate,this,!1)},e.prototype.maybeHideOversized=function(){this.hideOversized&&(this.availableWidth=0;r--){var a=e[r];if(a.setAttribute("text-anchor",this.textAlign),this.textPathElement)a.removeAttribute("x"),a.removeAttribute("y");else{switch(this.textAlign){case"middle":a.setAttribute("x",(i/2).toString()+"px");break;case"end":this.rtl||a.setAttribute("x",i.toString());break;default:this.rtl?a.setAttribute("x",i.toString()):a.removeAttribute("text-anchor")}var s=v(a.getAttribute("y"));switch(this.textValign){case"middle":a.setAttribute("y",((s||0)+(n-this.bbox.height)/2).toString());break;case"bottom":a.setAttribute("y",((s||0)+n-this.bbox.height).toString());break;default:a.setAttribute("y",(s||0).toString())}}}}},e.prototype.getSVGLineElement=function(t,e){var i=this.paper.addGroup("text");return i.textContent=t,i.attr({x:"0"}),_(e)&&i.attr({y:e.toString()}),(this.truncate||this.wrap)&&i.attr({overflow:"hidden"}),i},Object.defineProperty(e.prototype,"rtl",{get:function(){return _(this._rtl)?this._rtl:!!this._topParent&&this._topParent.rtl},set:function(t){t=y(t),this._rtl=t,this.element&&this.alignSVGText()},enumerable:!0,configurable:!0}),e.prototype.resetBBox=function(){this._bbox={x:0,y:0,width:0,height:0}},e.prototype.getHTMLLineElement=function(t){var e=document.createElement("div");switch(e.innerHTML=t,this.textAlign){case"middle":e.style.textAlign="center";break;case"end":e.style.textAlign="right"}return this.wrap?e.style.wordWrap="break-word":e.style.whiteSpace="nowrap",this.rtl&&(e.style.direction="rtl"),_(this.fill)&&(e.style.color=this.fill.toString()),e},e.prototype.setStyles=function(){var t=this.element;!this.selectable||this.draggable||this.resizable||this.swipeable?t.addStyle({webkitUserSelect:"none",msUserSelect:"none"}):this.selectable&&(t.removeStyle("webkitUserSelect"),t.removeStyle("msUserSelect"))},e.prototype.hideUnused=function(t){this.initLineCache();var e=this.getCache("lineInfo");if(e.length>=t)for(var i=t;it?e[t]:void 0},e.prototype.addLineInfo=function(t,e){this.initLineCache(),this.getCache("lineInfo")[e]=t},e.prototype.initLineCache=function(){_(this.getCache("lineInfo"))||this.setCache("lineInfo",[],0)},e.prototype.setDataItem=function(e){this._sourceDataItemEvents&&this._sourceDataItemEvents.dispose(),e&&(this._sourceDataItemEvents=new wt([e.events.on("valuechanged",this.invalidate,this,!1),e.events.on("workingvaluechanged",this.invalidate,this,!1),e.events.on("calculatedvaluechanged",this.invalidate,this,!1),e.events.on("propertychanged",this.invalidate,this,!1)])),t.prototype.setDataItem.call(this,e)},Object.defineProperty(e.prototype,"availableWidth",{get:function(){return _(this.maxWidth)?this.maxWidth:this.pixelWidth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"availableHeight",{get:function(){return _(this.maxHeight)?this.maxHeight:this.pixelHeight},enumerable:!0,configurable:!0}),e.prototype.getSvgElement=function(t,e,i){var n=this.paper.add("tspan");if(n.textContent=t,e)if(Yi.nonce&&i){var r="amcharts_element_style_"+btoa(e).replace(/[^\w]*/g,"");n.node.setAttribute("class",r);var a=document.createElementNS($i,"defs");i.node.appendChild(a);var s=document.createElement("style");s.type="text/css",s.innerHTML="."+r+" { "+e+"}",s.setAttribute("nonce",Yi.nonce),a.appendChild(s)}else n.node.setAttribute("style",e);return i&&i.add(n),n},e.prototype.deepInvalidate=function(){t.prototype.deepInvalidate.call(this),this.hardInvalidate()},Object.defineProperty(e.prototype,"readerTitle",{get:function(){var t=this.getPropertyValue("readerTitle");return t?this.dataItem&&(t=this.populateString(t)):t=this.populateString(ii(We(this.html)?this.html:this.text)),t},set:function(t){t=b(t),this.setPropertyValue("readerTitle",t)&&this.applyAccessibility()},enumerable:!0,configurable:!0}),e}(Pr);se.registeredClasses.Label=Lr,Mr.push({relevant:Vr.heightXS,state:function(t,e){if(t instanceof Lr&&t.parent&&t.parent.isBaseSprite){var i=t.states.create(e);return i.properties.disabled=!0,i}return null}});var Er=function(t){function e(){var e=t.call(this)||this;return e.className="RoundedRectangle",e.element=e.paper.add("path"),e.cornerRadius(3,3,3,3),e.applyTheme(),e}return a(e,t),e.prototype.draw=function(){t.prototype.draw.call(this);var e=this.innerWidth,i=this.innerHeight;if(D(e)&&D(i)){var n=H(e,i)/2,r=Ye(this.cornerRadiusTopLeft,n),a=Ye(this.cornerRadiusTopRight,n),s=Ye(this.cornerRadiusBottomRight,n),o=Ye(this.cornerRadiusBottomLeft,n),l=H(Math.abs(e/2),Math.abs(i/2)),h=L(r,0,l),p=L(a,0,l),u=L(s,0,l),d=L(o,0,l),c="M"+h+",0 L"+(e-p)+",0"+(" a"+p+","+p+" 0 0 1 "+p+","+p)+(" L"+e+","+(i-u))+(" a"+u+","+u+" 0 0 1 -"+u+","+u)+(" L"+d+","+i)+(" a"+d+","+d+" 0 0 1 -"+d+",-"+d)+(" L0,"+h)+(" a"+h+","+h+" 0 0 1 "+h+",-"+h)+" Z";this.path=c}},e.prototype.cornerRadius=function(t,e,i,n){this.cornerRadiusTopLeft=t,this.cornerRadiusTopRight=e,this.cornerRadiusBottomLeft=i,this.cornerRadiusBottomRight=n},Object.defineProperty(e.prototype,"cornerRadiusTopLeft",{get:function(){return this.getPropertyValue("cornerRadiusTopLeft")},set:function(t){this.setPercentProperty("cornerRadiusTopLeft",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cornerRadiusTopRight",{get:function(){return this.getPropertyValue("cornerRadiusTopRight")},set:function(t){this.setPercentProperty("cornerRadiusTopRight",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cornerRadiusBottomRight",{get:function(){return this.getPropertyValue("cornerRadiusBottomRight")},set:function(t){this.setPercentProperty("cornerRadiusBottomRight",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cornerRadiusBottomLeft",{get:function(){return this.getPropertyValue("cornerRadiusBottomLeft")},set:function(t){this.setPercentProperty("cornerRadiusBottomLeft",t,!0)},enumerable:!0,configurable:!0}),e.prototype.measureElement=function(){},Object.defineProperty(e.prototype,"bbox",{get:function(){return this.definedBBox?this.definedBBox:this.isMeasured?{x:0,y:0,width:this.innerWidth,height:this.innerHeight}:{x:0,y:0,width:0,height:0}},enumerable:!0,configurable:!0}),e}(xr);se.registeredClasses.RoundedRectangle=Er;var Rr=function(t){function e(){var e=t.call(this)||this;e.className="Button",e.tooltipY=0,e.iconPosition="left",e.layout="horizontal",e.contentAlign="center",e.contentValign="middle",e.padding(8,16,8,16),e.setStateOnChildren=!0;var i=new bn,n=e.background;n.fill=i.getFor("secondaryButton"),n.stroke=i.getFor("secondaryButtonStroke"),n.fillOpacity=1,n.strokeOpacity=1,n.cornerRadius(3,3,3,3),e.label=new Lr,e.label.fill=i.getFor("secondaryButtonText"),e.label.shouldClone=!1;var r=n.states.create("hover");r.properties.fillOpacity=1,r.properties.fill=i.getFor("secondaryButtonHover");var a=n.states.create("down");return a.transitionDuration=100,a.properties.fill=i.getFor("secondaryButtonDown"),a.properties.fillOpacity=1,e.role="button",e.focusable=!0,e.applyTheme(),e}return a(e,t),Object.defineProperty(e.prototype,"icon",{get:function(){return this._icon},set:function(t){var e=this._icon;e&&(e.parent=void 0),t&&(this._icon=t,t.parent=this,t.interactionsEnabled=!1,t.shouldClone=!1,this.iconPosition=this.iconPosition,this._disposers.push(t))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"iconPosition",{get:function(){return this.getPropertyValue("iconPosition")},set:function(t){this.setPropertyValue("iconPosition",t),this.icon&&("left"==t?this.icon.toBack():this.icon.toFront())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){return this._label},set:function(t){this._label&&this.removeDispose(this._label),this._label=t,t&&(t.parent=this,t.interactionsEnabled=!1,this._disposers.push(this._label))},enumerable:!0,configurable:!0}),e.prototype.createBackground=function(){return new Er},e.prototype.copyFrom=function(e){t.prototype.copyFrom.call(this,e),e.label&&this.label.copyFrom(e.label),e.icon&&(this.icon=e.icon.clone())},e}(Pr);se.registeredClasses.Button=Rr;var Br=function(t){function e(){var e=t.call(this)||this;return e.className="Circle",e.element=e.paper.add("circle"),e.setPercentProperty("radius",c(100)),e.setPropertyValue("horizontalCenter","middle"),e.setPropertyValue("verticalCenter","middle"),e.applyTheme(),e}return a(e,t),e.prototype.draw=function(){t.prototype.draw.call(this),this.element.attr({r:this.pixelRadius})},Object.defineProperty(e.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(t){this.setPercentProperty("radius",t,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pixelRadius",{get:function(){return Ye(this.radius,H(this.innerWidth/2,this.innerHeight/2))},enumerable:!0,configurable:!0}),e.prototype.measureElement=function(){var t=this.pixelRadius;this._bbox={x:-t,y:-t,width:2*t,height:2*t}},e}(xr);se.registeredClasses.Circle=Br;var Nr=function(t){function e(){var e=t.call(this)||this;return e.className="Ellipse",e.element=e.paper.add("ellipse"),e.applyTheme(),e}return a(e,t),e.prototype.draw=function(){t.prototype.draw.call(this),this.element.attr({rx:this.radius}),this.element.attr({ry:this.radiusY})},Object.defineProperty(e.prototype,"radiusY",{get:function(){return this.innerHeight/2},set:function(t){this.height=2*t,this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"radius",{get:function(){return this.innerWidth/2},set:function(t){this.width=2*t,this.invalidate()},enumerable:!0,configurable:!0}),e}(Br);se.registeredClasses.Ellipse=Nr;var Hr=function(t){function e(){var e=t.call(this)||this;return e.className="Image",e.element=e.paper.add("image"),e.applyTheme(),e.width=50,e.height=50,e}return a(e,t),e.prototype.draw=function(){if(t.prototype.draw.call(this),this.href){var e=this.innerWidth,i=this.innerHeight;D(this.widthRatio)&&(e=i*this.widthRatio,this.width=e),D(this.heightRatio)&&(i=e*this.heightRatio,this.height=i),this.element.attr({width:e,height:i}),this.element.attrNS(Qi,"xlink:href",this.href)}},Object.defineProperty(e.prototype,"href",{get:function(){return this.getPropertyValue("href")},set:function(t){this.setPropertyValue("href",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"widthRatio",{get:function(){return this.getPropertyValue("widthRatio")},set:function(t){this.setPropertyValue("widthRatio",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"heightRatio",{get:function(){return this.getPropertyValue("heightRatio")},set:function(t){this.setPropertyValue("heightRatio",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bbox",{get:function(){return{x:0,y:0,width:this.pixelWidth,height:this.pixelHeight}},enumerable:!0,configurable:!0}),e}(xr);se.registeredClasses.Image=Hr;var Wr=function(t){function e(){var e=t.call(this)||this;return e.className="Line",e.element=e.paper.add("line"),e.fill=ke(),e.x1=0,e.y1=0,e.applyTheme(),e}return a(e,t),e.prototype.draw=function(){t.prototype.draw.call(this),this.x1==this.x2||this.y1==this.y2?this.pixelPerfect=!0:this.pixelPerfect=!1,this.x1=this.x1,this.x2=this.x2,this.y1=this.y1,this.y2=this.y2},Object.defineProperty(e.prototype,"x1",{get:function(){return this.getPropertyValue("x1")},set:function(t){D(t)||(t=0);var e=0;this.pixelPerfect&&this.stroke instanceof $n&&(e=1e-5),this.setPropertyValue("x1",t,!0),this.element.attr({x1:t+e})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"x2",{get:function(){var t=this.getPropertyValue("x2");return D(t)||(t=this.pixelWidth),t},set:function(t){D(t)||(t=0),this.setPropertyValue("x2",t,!0),this.element.attr({x2:t})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y1",{get:function(){return this.getPropertyValue("y1")},set:function(t){D(t)||(t=0);var e=0;this.pixelPerfect&&this.stroke instanceof $n&&(e=1e-5),this.setPropertyValue("y1",t,!0),this.element.attr({y1:t+e})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y2",{get:function(){var t=this.getPropertyValue("y2");return D(t)||(t=this.pixelHeight),t},set:function(t){D(t)||(t=0),this.setPropertyValue("y2",t,!0),this.element.attr({y2:t})},enumerable:!0,configurable:!0}),e.prototype.positionToPoint=function(t){var e={x:this.x1,y:this.y1},i={x:this.x2,y:this.y2},n=G(e,i,t),r=K(e,i);return{x:n.x,y:n.y,angle:r}},e}(xr);se.registeredClasses.Line=Wr;var Yr=function(t){function e(){var e=t.call(this)||this;return e.className="PointedRectangle",e.element=e.paper.add("path"),e.cornerRadius=6,e.applyTheme(),e}return a(e,t),e.prototype.draw=function(){t.prototype.draw.call(this);var e=this.cornerRadius,i=this.innerWidth,n=this.innerHeight;if(i>0&&n>0){var r,a,s=this.pointerX,o=this.pointerY,l=this.pointerBaseWidth/2,h=H(i/2,n/2),p=L(e,0,h),u=L(e,0,h),d=L(e,0,h),c=L(e,0,h),f=void 0,g=void 0,m=void 0,y=void 0,v=(s-0)*(n-0)-(o-0)*(i-0),b=(s-0)*(0-n)-(o-n)*(i-0);if(v>0&&b>0)f="M"+p+",0 L"+((r=L(s,p+l,i-l-u))-l)+",0 L"+s+","+(o=L(o,-1/0,0))+" L"+(r+l)+",0 L"+(i-u)+",0";else f="M"+p+",0 L"+(i-u)+",0";if(v<0&&b<0)m=" L"+(i-d)+","+n+" L"+((r=L(s,c+l,i-l-d))+l)+","+n+" L"+s+","+(o=L(o,n,1/0))+" L"+(r-l)+","+n+" L"+c+","+n;else m=" L"+c+","+n;if(v<0&&b>0)y=" L0,"+(n-c)+" L0,"+((a=L(o,p+l,n-c-l))+l)+" L"+(s=L(s,-1/0,0))+","+o+" L0,"+(a-l)+" L0,"+p;else y=" L0,"+p;if(v>0&&b<0)g=" L"+i+","+u+" L"+i+","+((a=L(o,u+l,n-l-d))-l)+" L"+(s=L(s,i,1/0))+","+o+" L"+i+","+(a+l)+" L"+i+","+(n-d);else g=" L"+i+","+(n-d);var x=" a"+u+","+u+" 0 0 1 "+u+","+u,_=" a"+d+","+d+" 0 0 1 -"+d+","+d,P=" a"+c+","+c+" 0 0 1 -"+c+",-"+c,w=" a"+p+","+p+" 0 0 1 "+p+",-"+p;this.path=f+x+g+_+m+P+y+w}},Object.defineProperty(e.prototype,"cornerRadius",{get:function(){return this.getPropertyValue("cornerRadius")},set:function(t){this.setPropertyValue("cornerRadius",t,!0)},enumerable:!0,configurable:!0}),e}(function(t){function e(){var e=t.call(this)||this;return e.className="PointedShape",e.pointerBaseWidth=15,e.pointerLength=10,e.pointerY=0,e.pointerX=0,e.applyTheme(),e}return a(e,t),e.prototype.draw=function(){t.prototype.draw.call(this),D(this.pointerX)||(this.pointerX=this.pixelWidth/2),D(this.pointerY)||(this.pointerY=this.pixelHeight+10)},Object.defineProperty(e.prototype,"pointerBaseWidth",{get:function(){return this.getPropertyValue("pointerBaseWidth")},set:function(t){this.setPropertyValue("pointerBaseWidth",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pointerLength",{get:function(){return this.getPropertyValue("pointerLength")},set:function(t){this.setPropertyValue("pointerLength",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pointerX",{get:function(){return this.getPropertyValue("pointerX")},set:function(t){this.setPropertyValue("pointerX",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pointerY",{get:function(){return this.getPropertyValue("pointerY")},set:function(t){this.setPropertyValue("pointerY",t,!0)},enumerable:!0,configurable:!0}),e}(xr));function Xr(t){var e=Ur(t[0]),i={x:0,y:0},n=Yi.minPolylineStep;D(n)||(n=.5);for(var r=0,a=t.length;rn&&(e+=Ur(s),i=s)}return e}function zr(t){return" M"+F(t.x,4)+","+F(t.y,4)+" "}function Ur(t){return" L"+F(t.x,4)+","+F(t.y,4)+" "}function Gr(t,e){return" Q"+F(e.x,4)+","+F(e.y,4)+" "+F(t.x,4)+","+F(t.y,4)}function Kr(t,e,i){return" C"+F(e.x,4)+","+F(e.y,4)+" "+F(i.x,4)+","+F(i.y,4)+" "+F(t.x,4)+","+F(t.y,4)}function Zr(t,e,i,n){if(0==e)return"";D(n)||(n=i);var r="",a=",",s=Math.ceil(Math.abs(e)/180),o=1;e<0&&(o=0);var l=0,h=0,p=-B(t)*i,u=-E(t)*n;if(e<.5&&i>3e3)return Ur({x:f=F(B(c=t+e)*i,4),y:g=F(E(c)*n,4)});for(var d=0;d(l-t)/2&&(C=v);var O="";return 360==e?O=zr(x):(O=zr(b),O+=Ur(x),O+=$r(w,a,u,!0)),O+=Zr(t+c,e-2*c,i,r),D(n)&&0!=n?(360==e&&0==a?O+=zr(P):(O+=$r(_,a,u,!0),O+=Ur(P),O+=$r(C,s,d,!0)),O+=Zr(l-g,-(e-2*g),n,p),(e<360||a>0)&&(O+=$r(b,s,d,!0)),O+=Ur(b)):(O+=$r(_,a,u,!0),e<360&&(O+=Ur(b))),O}function $r(t,e,i,n,r,a){if(0==e)return"";var s=",";return" A"+e+s+i+s+(a=a||0)+s+ +(r=Boolean(r))+s+ +(n=Boolean(n))+s+F(t.x,4)+s+F(t.y,4)}function Jr(t,e,i,n){return D(i)||(i=0),D(n)||(n=0),zr({x:i,y:n})+Ur({x:i+t,y:n})+Ur({x:i+t,y:n+e})+Ur({x:i,y:n+e})+" Z"}function Qr(t,e){var i=",",n=" L";return e?"M"+t.x+i+t.y+n+t.x+i+(t.y+t.height)+n+(t.x+t.width)+i+(t.y+t.height)+n+(t.x+t.width)+i+t.y+n+t.x+i+t.y:"M"+t.x+i+t.y+n+(t.x+t.width)+i+t.y+n+(t.x+t.width)+i+(t.y+t.height)+n+t.x+i+(t.y+t.height)+n+t.x+i+t.y}var ta=function(t){function e(){var e=t.call(this)||this;return e._distance=0,e.className="Polyline",e.element=e.paper.add("path"),e.shapeRendering="auto",e.fill=ke(),e.strokeOpacity=1,e.applyTheme(),e}return a(e,t),e.prototype.makePath=function(){this._distance=0;var t=this.segments;if(t&&t.length>0){for(var e="",i=0,n=t.length;i0){e+=zr(r[0]);for(var a=1;a1){for(var u=1;ut){h=i.length;break}}else 1==p.length&&(o=p[0],l=p[0],a=0,s=1)}if(o&&l){var d=G(o,l,(t-a)/(s-a));return{x:d.x,y:d.y,angle:e+K(o,l)}}}return{x:0,y:0,angle:0}},Object.defineProperty(e.prototype,"realSegments",{get:function(){return this._realSegments},enumerable:!0,configurable:!0}),e}(xr);se.registeredClasses.Polyline=ta;var ea=function(t){function e(){var e=t.call(this)||this;return e.className="Polyarc",e.controlPointDistance=.5,e.controlPointPosition=.5,e.applyTheme(),e}return a(e,t),e.prototype.makePath=function(){this._distance=0;var t=this.segments;if(t&&t.length>0){var e="";this._realSegments=[];for(var i=0,n=t.length;i0){e+=zr(r[0]);for(var s=1;s0)for(var y=0;y<=g;y++){var v=J(o,l,c,f,y/g);a.push(v),this._distance+=X(m,v),m=v}else a.push(o)}}}this.path=e}},Object.defineProperty(e.prototype,"controlPointPosition",{get:function(){return this.getPropertyValue("controlPointPosition")},set:function(t){this.setPropertyValue("controlPointPosition",t),this.makePath()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"controlPointDistance",{get:function(){return this.getPropertyValue("controlPointDistance")},set:function(t){this.setPropertyValue("controlPointDistance",t),this.makePath()},enumerable:!0,configurable:!0}),e}(ta);se.registeredClasses.Polyarc=ea;var ia=function(t){function e(e){var i=t.call(this)||this;return i._bboxes=[],i.morphDuration=800,i.morphEasing=Vi,i.morphToSingle=!0,i.scaleRatio=1,i.className="Morpher",i.morphable=e,i.applyTheme(),i}return a(e,t),e.prototype.morphToPolygon=function(t,e,i){var n=this.morphable.currentPoints;if(n&&t){this.sortPoints(n),this.sortPoints(t),this._morphFromPointsReal=[],this._morphToPointsReal=[],_(e)||(e=this.morphDuration),_(i)||(i=this.morphEasing),this._morphFromPointsReal=this.normalizePoints(t,n),this._morphToPointsReal=this.normalizePoints(n,t),this.morphable.currentPoints=this._morphFromPointsReal;var r=new qi(this,{property:"morphProgress",from:0,to:1},e,i);return this._disposers.push(r),r.start(),r}},e.prototype.normalizePoints=function(t,e){for(var i=0,n=t.length;in.width*n.height?-1:1}));for(var e=[],i=0,n=t.length;im&&(m=o.length);for(var y=360/((m=(p=this.addPoints(o,m)).length)-1),v=0;v0)for(var w=0,C=l.length;w0){var u=t[t.length-1];for(l=n.length;l0)for(var y=u.x+u.width/2,v=u.y+u.height/2,b=0,x=l.length;b0&&h&&h.length>0){for(var u=[],d=0,c=o.length;d0&&p&&p.length>0){for(var y=[],v=0,b=l.length;v0){var a=r.split("M"),s=a[0],o=a[1];if(s&&s.length>0){var l=s.split("L");if(l.length>0){var h=[],p=[h];t.push(p);for(var u=0;u0){var c=o.split("L");if(c.length>0){var f=[];p.push(f);for(u=c.length-1;u>=0;u--){d=c[u].split(",");f.push({x:+d[0],y:+d[1]})}}}}}}}this.setPropertyValue("points",t),this._currentPoints=t}return t},set:function(t){this.setPropertyValue("points",t,!0),this._currentPoints=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentPoints",{get:function(){return this._currentPoints&&0!=this._currentPoints.length||!this.path||(this._currentPoints=this.points),this._currentPoints},set:function(t){this._currentPoints!=t&&(this._currentPoints=t,this.draw())},enumerable:!0,configurable:!0}),e.prototype.draw=function(){var e,i,n,r,a="",s=this._currentPoints;if(s.length>0){for(var o=0,l=s.length;o0){a+=zr(d=h[0]);for(var u=0;ud.x)&&(e=d.x),(!D(n)||n>d.y)&&(n=d.y),(!D(r)||r0){var d;a+=zr(d=p[0]);for(var c=0,f=p.length;c0){var n="";this._realSegments=[];for(var r=0,a=t.length;r0){var l=s[0],h=s[s.length-1],p=!1;F(l.x,3)==F(h.x)&&F(l.y)==F(h.y)&&(p=!0),n+=zr(s[0]);for(var u=0;u0)for(var x=0;x<=v;x++){var _=J(c,f,m,y,x/v);if(_.x!=b.x||_.y!=b.y){o.push(_);var P=F(K(b,_),5);this._distance+=X(b,_),this.allPoints[Math.floor(this._distance)]={x:_.x,y:_.y,angle:P},b=_}}else o.push(d)}}var w=this.allPoints;if(w.length>1)for(var C=0;C1)w[C]=w[C-1];else for(var O=1;O1)for(var r=1;r1){if(e&&r>3){if(t<0){t<-.01&&(t=-.01);var a=n[0],s=n[1];return{x:o=a.x-(a.x-s.x)*r*t,y:l=a.y-(a.y-s.y)*r*t,angle:K(a,s)}}if(t>1){t>1.01&&(t=1.01);var o,l;a=n[n.length-2],s=n[n.length-3];return{x:o=a.x+(a.x-s.x)*r*(t-1),y:l=a.y+(a.y-s.y)*r*(t-1),angle:K(a,{x:o,y:l})}}if(1==t){var h=n[n.length-1];return{x:h.x,y:h.y,angle:h.angle}}}else t<0&&(t=Math.abs(t),i=180),t>=1&&(t=.9999999999999);var p;return{x:(p=n[Math.floor(t*r)]).x,y:p.y,angle:p.angle+i}}return 1==r?{x:(p=n[0]).x,y:p.y,angle:p.angle}:{x:0,y:0,angle:0}},e}(ta);se.registeredClasses.Polyspline=ra;var aa=function(t){function e(){var e=t.call(this)||this;return e.className="Slice",e.setPropertyValue("cornerRadius",0),e.setPropertyValue("startAngle",0),e.setPercentProperty("innerRadius",0),e.setPercentProperty("radius",0),e.setPropertyValue("arc",0),e.setPropertyValue("shiftRadius",0),e.strokeOpacity=1,e.setPropertyValue("layout","none"),e.slice=e.createChild(xr),e.slice.isMeasured=!1,e._disposers.push(e.slice),e.applyTheme(),e}return a(e,t),e.prototype.draw=function(){t.prototype.draw.call(this);var e=this.radiusY;this.radius>0&&0==e&&(e=.01),this.slice.path=qr(this.startAngle,this.arc,this.radius,this.pixelInnerRadius,e,this.cornerRadius,this.innerCornerRadius),this.slice.invalidate(),this.shiftRadius=this.shiftRadius,this.realFill instanceof Jn&&this.updateGradient(this.realFill),this.realStroke instanceof Jn&&this.updateGradient(this.realStroke)},e.prototype.updateGradient=function(t){t.element.attr({gradientUnits:"userSpaceOnUse"}),t.element.attr({r:this.radius}),t.cx=0,t.cy=0,t.element.attr({radius:this.radius})},Object.defineProperty(e.prototype,"bbox",{get:function(){return this.definedBBox?this.definedBBox:this.isMeasured?q([rt(this.startAngle,this.startAngle+this.arc,this.pixelInnerRadius),rt(this.startAngle,this.startAngle+this.arc,this.radius)]):{x:0,y:0,width:0,height:0}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startAngle",{get:function(){return this.getPropertyValue("startAngle")},set:function(t){this.setPropertyValue("startAngle",it(t),!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"arc",{get:function(){return this.getPropertyValue("arc")},set:function(t){D(t)||(t=0),this.setPropertyValue("arc",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"radius",{get:function(){var t=this.getPropertyValue("radius");return D(t)||(t=0),t},set:function(t){this.setPropertyValue("radius",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"radiusY",{get:function(){var t=this.getPropertyValue("radiusY");return D(t)||(t=this.radius),t},set:function(t){this.setPropertyValue("radiusY",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"innerRadius",{get:function(){return this.getPropertyValue("innerRadius")},set:function(t){this.setPercentProperty("innerRadius",t,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pixelInnerRadius",{get:function(){return Ye(this.innerRadius,this.radius)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cornerRadius",{get:function(){return this.getPropertyValue("cornerRadius")},set:function(t){this.setPropertyValue("cornerRadius",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"innerCornerRadius",{get:function(){return this.getPropertyValue("innerCornerRadius")},set:function(t){this.setPropertyValue("innerCornerRadius",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shiftRadius",{get:function(){return this.getPropertyValue("shiftRadius")},set:function(t){this.setPropertyValue("shiftRadius",t),t=this.getPropertyValue("shiftRadius"),this.dx=t*this.radius*this.ix,this.dy=t*this.radiusY*this.iy},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ix",{get:function(){return B(this.middleAngle)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"iy",{get:function(){return E(this.middleAngle)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"middleAngle",{get:function(){return this.startAngle+this.arc/2},enumerable:!0,configurable:!0}),e.prototype.getTooltipX=function(){var t=this.getPropertyValue("tooltipX");if(D(t))return t;var e=.5;t instanceof d&&(e=t.value);var i=Ye(this.innerRadius,this.radius);return this.ix*(i+(this.radius-i)*e)},e.prototype.getTooltipY=function(){var t=this.getPropertyValue("tooltipY");if(D(t))return t;var e=.5;t instanceof d&&(e=t.value);var i=Ye(this.innerRadius,this.radius);return this.iy*(i+(this.radius-i)*e)+this.slice.dy},e}(Pr);se.registeredClasses.Slice=aa;var sa=function(t){function e(){var e=t.call(this)||this;e.className="Preloader",e.width=c(100),e.height=c(100);var i=new bn,n=e.createChild(Pr);n.shouldClone=!1;var r=n.createChild(aa);r.shouldClone=!1,r.radius=53,r.arc=360,r.fill=i.getFor("fill"),r.fillOpacity=.8,r.innerRadius=42,r.isMeasured=!1,e.backgroundSlice=r;var a=n.createChild(aa);a.shouldClone=!1,a.radius=50,a.innerRadius=45,a.fill=i.getFor("alternativeBackground"),a.fillOpacity=.2,a.isMeasured=!1,e.progressSlice=a;var s=n.createChild(Lr);return s.shouldClone=!1,s.horizontalCenter="middle",s.verticalCenter="middle",s.isMeasured=!1,s.fill=i.getFor("text"),s.align="center",s.valign="middle",s.textAlign="middle",s.fillOpacity=.4,e.label=s,e.background.opacity=1,e.background.fill=i.getFor("background"),e.contentAlign="center",e.contentValign="middle",e.delay=300,e.states.create("hidden").properties.opacity=0,e.visible=!1,e.hide(0),e.__disabled=!0,e._disposers.push(e.backgroundSlice),e._disposers.push(e.progressSlice),e._disposers.push(e.label),e._disposers.push(n),e}return a(e,t),Object.defineProperty(e.prototype,"progress",{get:function(){return this.getPropertyValue("progress")},set:function(t){var e=this;this.__disabled=!1,this.validateLayout(),this.setPropertyValue("progress",t),this.progressSlice.arc=360*t,this.label&&(this.label.text=Math.round(100*t)+"%"),t>=1?(this._started&&(this._started=void 0),se.events.once("enterframe",(function(){var t=e.hide();t&&!t.isFinished()?t.events.once("animationended",(function(){e.__disabled=!0})):e.__disabled=!0})),this.interactionsEnabled=!1,this.setPropertyValue("progress",0)):t>0&&(this.delay?this._started?this._started+this.delay<=(new Date).getTime()&&(this.__disabled=!1,this.show(),this.interactionsEnabled=!0):this._started=(new Date).getTime():(this.__disabled=!1,this.show(),this.interactionsEnabled=!0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"delay",{get:function(){return this.getPropertyValue("delay")},set:function(t){this.setPropertyValue("delay",t)},enumerable:!0,configurable:!0}),e}(Pr);se.registeredClasses.Preloader=sa;var oa=function(t){function e(){var e=t.call(this)||this;e.className="ResizeButton",e.orientation="horizontal",e.layout="absolute",e.horizontalCenter="middle",e.verticalCenter="middle",e.draggable=!0,e.padding(8,8,8,8),e.background.cornerRadius(20,20,20,20);var i=new xr;i.element=e.paper.add("path");var n=zr({x:-2,y:-6});return n+=Ur({x:-2,y:6}),n+=zr({x:2,y:-6}),n+=Ur({x:2,y:6}),i.path=n,i.pixelPerfect=!0,i.padding(0,4,0,4),i.stroke=(new bn).getFor("alternativeText"),i.strokeOpacity=.7,e.icon=i,e.label.dispose(),e.label=void 0,e.applyTheme(),e}return a(e,t),Object.defineProperty(e.prototype,"orientation",{set:function(t){var e=this.icon;e&&(e.rotation="horizontal"==t?0:-90)},enumerable:!0,configurable:!0}),e}(Rr);se.registeredClasses.ResizeButton=oa;var la=function(t){function e(){var e=t.call(this)||this;e.className="CloseButton",e.padding(8,8,8,8),e.showSystemTooltip=!0,e.width=30,e.height=30;var i=new bn;e.cursorOverStyle=Qn.pointer;var n=e.background;n.cornerRadius(20,20,20,20);var r=i.getFor("background");n.fill=r,n.stroke=i.getFor("primaryButton"),n.strokeOpacity=1,n.strokeWidth=1;var a=i.getFor("primaryButtonActive"),s=n.states.getKey("hover");s.properties.strokeWidth=3,s.properties.fill=r;var o=n.states.getKey("down");o.properties.stroke=a,o.properties.fill=r;var l=new xr;return l.element=e.paper.add("path"),l.stroke=n.stroke,e.icon=l,e.applyTheme(),e}return a(e,t),e.prototype.validate=function(){t.prototype.validate.call(this);var e=this.pixelWidth/3,i=this.pixelHeight/3,n=zr({x:-e/2,y:-i/2});n+=Ur({x:e/2,y:i/2}),n+=zr({x:e/2,y:-i/2}),n+=Ur({x:-e/2,y:i/2}),this.icon.path=n,this.invalidateLayout()},e.prototype.applyInternalDefaults=function(){t.prototype.applyInternalDefaults.call(this),_(this.readerTitle)||(this.readerTitle=this.language.translate("Close"))},e}(Rr);se.registeredClasses.CloseButton=la;var ha=function(t){function e(){var e=t.call(this)||this;e.className="SwitchButton",e.tooltipY=0,e.layout="horizontal",e.contentAlign="center",e.contentValign="middle",e.padding(8,16,8,16),e.setStateOnChildren=!0,e.states.create("active");var i=new bn,n=new Lr;n.fillOpacity=.3,n.states.create("active").properties.fillOpacity=1,n.isActive=!0,e.leftLabel=n;var r=new Rr,a=new Br;r.contentValign="none",r.padding(0,0,0,0),a.radius=10,r.icon=a,r.icon.valign="middle",r.label=void 0;var s=c(100);r.background.cornerRadius(s,s,s,s),r.width=3.5*a.radius,r.height=2.1*a.radius,r.marginLeft=8,r.marginRight=8,r.togglable=!0,a.dx=.7*-a.radius,a.fill=i.getFor("primaryButton"),a.states.create("hover").properties.fill=i.getFor("primaryButtonHover");var o=a.states.create("active");o.properties.fill=i.getFor("primaryButtonActive"),o.properties.dx=.7*a.radius,e.switchButton=r,e.events.on("toggled",(function(){e.leftLabel.isActive=!e.isActive,e.rightLabel.isActive=e.isActive}));var l=new Lr;return l.fillOpacity=.3,l.states.create("active").properties.fillOpacity=1,e.rightLabel=l,e.role="button",e.focusable=!0,l.valign="middle",n.valign="middle",r.valign="middle",e.applyTheme(),e}return a(e,t),Object.defineProperty(e.prototype,"leftLabel",{get:function(){return this._leftLabel},set:function(t){this._leftLabel&&this.removeDispose(this._leftLabel),this._leftLabel=t,t&&(t.parent=this,t.interactionsEnabled=!1,t.shouldClone=!1,this._disposers.push(this._leftLabel))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rightLabel",{get:function(){return this._rightLabel},set:function(t){this._rightLabel&&this.removeDispose(this._rightLabel),this._rightLabel=t,t&&(t.parent=this,t.interactionsEnabled=!1,t.shouldClone=!1,this._disposers.push(this._rightLabel))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"switch",{get:function(){return this._switchButton},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"switchButton",{get:function(){return this._switchButton},set:function(t){this._switchButton&&this.removeDispose(this._switchButton),this._switchButton=t,t&&(t.parent=this,t.shouldClone=!1,this._disposers.push(this._switchButton))},enumerable:!0,configurable:!0}),e.prototype.copyFrom=function(e){t.prototype.copyFrom.call(this,e),e.leftLabel&&this.leftLabel.copyFrom(e.leftLabel),e.rightLabel&&this.rightLabel.copyFrom(e.rightLabel),e.switchButton&&this.switchButton.copyFrom(e.switchButton)},e}(Pr);se.registeredClasses.SwitchButton=ha;var pa=function(t){function e(){var e=t.call(this)||this;e._previousStart=0,e._previousEnd=1,e._prevStart=0,e._prevEnd=1,e._isBusy=!1,e._skipRangeEvents=!1,e.updateWhileMoving=!0,e.className="Scrollbar",e.minHeight=12,e.minWidth=12,e.animationDuration=0,e.animationEasing=Vi,e.margin(10,10,10,10);var i=new bn,n=e.background;return n.cornerRadius(10,10,10,10),n.fill=i.getFor("fill"),n.fillOpacity=.5,e.showSystemTooltip=!0,e.startGrip=new oa,e.endGrip=new oa,e.events.on("transformed",(function(){e.updateThumb()}),e,!1),e.start=0,e.end=1,e.role="scrollbar",e.thumb.role="slider",e.thumb.readerLive="polite",e.startGrip.role="slider",e.endGrip.role="slider",e.events.once("inited",(function(){e._previousStart=void 0,e.dispatchRangeChange()}),void 0,!1),e.hideGrips=!1,e.orientation="horizontal",e.setSVGAttribute({"aria-valuemin":"0"}),e.setSVGAttribute({"aria-valuemax":"100"}),e.applyTheme(),e}return a(e,t),e.prototype.applyInternalDefaults=function(){t.prototype.applyInternalDefaults.call(this),"horizontal"===this.orientation?(_(this.readerTitle)||(this.readerTitle=this.language.translate("Use TAB to select grip buttons or left and right arrows to change selection")),_(this.thumb.readerDescription)||(this.thumb.readerDescription=this.language.translate("Use left and right arrows to move selection")),_(this.startGrip.readerDescription)||(this.startGrip.readerDescription=this.language.translate("Use left and right arrows to move left selection")),_(this.endGrip.readerDescription)||(this.endGrip.readerDescription=this.language.translate("Use left and right arrows to move right selection")),this.readerOrientation="horizontal"):(_(this.readerTitle)||(this.readerTitle=this.language.translate("Use TAB select grip buttons or up and down arrows to change selection")),_(this.thumb.readerDescription)||(this.thumb.readerDescription=this.language.translate("Use up and down arrows to move selection")),_(this.startGrip.readerDescription)||(this.startGrip.readerDescription=this.language.translate("Use up and down arrows to move upper selection")),_(this.endGrip.readerDescription)||(this.endGrip.readerDescription=this.language.translate("Use up and down arrows to move lower selection")),this.readerOrientation="vertical"),this.readerControls=this.baseSprite.uidAttr()},e.prototype.validateLayout=function(){this.updateSize(),t.prototype.validateLayout.call(this),this.updateExtremes()},e.prototype.processBackground=function(){t.prototype.processBackground.call(this);var e=this.background;e.clickable=!0,e.events.on("hit",this.handleBgHit,this,void 0)},e.prototype.handleBgHit=function(t){this.makeBusy();var e=t.spritePoint;e=fi(e,this.background,this);var i=this.thumb;if("horizontal"==this.orientation){var n=e.x-i.pixelWidth/2;n=L(n,0,this.innerWidth-i.pixelWidth),this._thumbAnimation=i.animate({property:"x",to:n},this.animationDuration,this.animationEasing)}else{var r=e.y-i.pixelHeight/2;r=L(r,0,this.innerHeight-i.pixelHeight),this._thumbAnimation=i.animate({property:"y",to:r},this.animationDuration,this.animationEasing)}this.animationDuration>0?this._thumbAnimation.events.on("animationended",this.makeUnbusy,this,!1):(this._thumb.validate(),this.makeUnbusy())},e.prototype.makeBusy=function(){this._isBusy=!0,this._skipRangeEvents=!1,this._unbusyTimeout&&this.removeDispose(this._unbusyTimeout),this._unbusyTimeout=void 0,this.stopAnimations()},e.prototype.stopAnimations=function(){this._thumbAnimation&&this._thumbAnimation.stop(!0),this._zoomAnimation&&this._zoomAnimation.stop(!0)},e.prototype.makeUnbusy=function(){this._unbusyTimeout=this.setTimeout(this.makeUnbusyReal.bind(this),1.1*this.animationDuration)},e.prototype.makeUnbusyReal=function(){this._usingGrip=void 0,this._isBusy=!1,this.updateWhileMoving||this.dispatchRangeChange()},e.prototype.dispatchRangeChange=function(){this._previousEnd==this.end&&this._previousStart==this.start||(this._previousStart=this.start,this._previousEnd=this.end,this.dispatch("rangechanged"))},e.prototype.updateThumb=function(t){if(void 0===t&&(t=!0),this.parent){var e=this.thumb,i=this.start,n=this.end,r=this.startGrip,a=this.endGrip;if("horizontal"==this.orientation){var s=this.innerWidth;e.width=s*(n-i),e.maxX=s-e.pixelWidth,e.x=i*s,r.moveTo({x:e.pixelX,y:0},void 0,void 0,!0),a.moveTo({x:e.pixelX+e.pixelWidth,y:0},void 0,void 0,!0),r.readerTitle=this.language.translate("From %1",void 0,this.adapter.apply("positionValue",{value:Math.round(100*i)+"%",position:i}).value),r.readerValueNow=""+Math.round(100*i),r.readerValueText=r.readerTitle,a.readerTitle=this.language.translate("To %1",void 0,this.adapter.apply("positionValue",{value:Math.round(100*n)+"%",position:n}).value),a.readerValueNow=""+Math.round(100*n),a.readerValueText=a.readerTitle}else{var o=this.innerHeight;e.height=o*(n-i),e.maxY=o-e.pixelHeight,e.y=(1-n)*o,r.moveTo({x:0,y:e.pixelY+e.pixelHeight},void 0,void 0,!0),a.moveTo({x:0,y:e.pixelY},void 0,void 0,!0),r.readerTitle=this.language.translate("To %1",void 0,this.adapter.apply("positionValue",{value:Math.round(100*(1-i))+"%",position:1-i}).value),r.readerValueNow=""+Math.round(100*i),r.readerValueText=r.readerTitle,a.readerTitle=this.language.translate("From %1",void 0,this.adapter.apply("positionValue",{value:Math.round(100*(1-n))+"%",position:1-n}).value),a.readerValueNow=""+Math.round(100*n),a.readerValueText=a.readerTitle}e.readerTitle=this.language.translate("From %1 to %2",void 0,this.adapter.apply("positionValue",{value:Math.round(100*i)+"%",position:i}).value,this.adapter.apply("positionValue",{value:Math.round(100*n)+"%",position:n}).value),e.readerValueNow=""+Math.round(100*i),e.readerValueText=e.readerTitle,this.readerValueNow=""+Math.round(100*i),this.readerValueText=e.readerTitle,!this._skipRangeEvents&&this.updateWhileMoving&&t&&this.dispatchRangeChange()}},e.prototype.updateExtremes=function(){var t=0,e=0,i=0,n=0;"horizontal"==this.orientation?(i=this.innerWidth,e=n=this.innerHeight/2):(n=this.innerHeight,t=i=this.innerWidth/2);var r=this.startGrip;r.minX=t,r.maxX=i,r.minY=e,r.maxY=n;var a=this.endGrip;a.minX=t,a.maxX=i,a.minY=e,a.maxY=n;var s=this.thumb;s.minX=t,s.maxX=i,s.minY=e,s.maxY=n},e.prototype.updateSize=function(){var t=this.orientation,e=this.startGrip;e&&(e.orientation=t),this.endGrip&&(this.endGrip.orientation=t);var i=this.thumb;i&&("horizontal"==t?(D(this._pixelWidth)||this.width instanceof d||(this.width=c(100)),_(this.percentHeight)&&(this.height=this.minHeight),i.height=this.innerHeight,i.verticalCenter="middle",i.horizontalCenter="left"):(D(this._pixelHeight)||this.height instanceof d||(this.height=c(100)),_(this.percentWidth)&&(this.width=this.minWidth),i.width=this.innerWidth,i.verticalCenter="top",i.horizontalCenter="middle"))},Object.defineProperty(e.prototype,"isBusy",{get:function(){return this._isBusy},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"start",{get:function(){return Math.min(this.getPosition(this._start),this.getPosition(this._end))},set:function(t){this._isBusy||(this.__start=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"__start",{get:function(){return this._start},set:function(t){this._start=this.getPosition(t),this.updateThumb()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return Math.max(this.getPosition(this._start),this.getPosition(this._end))},set:function(t){this._isBusy||(this.__end=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"__end",{get:function(){return this._end},set:function(t){this._end=this.getPosition(t),this.updateThumb()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"range",{get:function(){return{start:this.start,end:this.end,priority:this._usingGrip}},enumerable:!0,configurable:!0}),e.prototype.skipRangeEvents=function(){this._isBusy||(this._skipRangeEvents=!0)},e.prototype.fixRange=function(t){t.start==F(this._start,2)&&t.end==F(this._end,2)||(this._start=t.start,this._end=t.end,this._skipRangeEvents=!0,this.updateThumb(),this._skipRangeEvents=!1,this.thumb.validate(),this.thumb.background.validate())},e.prototype.getPosition=function(t){return L(F(t,4),0,1)},Object.defineProperty(e.prototype,"orientation",{get:function(){return this.getPropertyValue("orientation")},set:function(t){this.setPropertyValue("orientation",t)&&("horizontal"===t?(this.startGrip.cursorOverStyle=Qn.horizontalResize,this.endGrip.cursorOverStyle=Qn.horizontalResize):(this.startGrip.cursorOverStyle=Qn.verticalResize,this.endGrip.cursorOverStyle=Qn.verticalResize),this.updateByOrientation(),this.invalidate())},enumerable:!0,configurable:!0}),e.prototype.updateByOrientation=function(){},Object.defineProperty(e.prototype,"startGrip",{get:function(){return this._startGrip},set:function(t){this._startGrip&&this.removeDispose(this._startGrip),this._startGrip=t,this.processGrip(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endGrip",{get:function(){return this._endGrip},set:function(t){this._endGrip&&this.removeDispose(this._endGrip),this._endGrip=t,this.processGrip(t)},enumerable:!0,configurable:!0}),e.prototype.processGrip=function(t){t.parent=this,t.isMeasured=!1,t.focusable=!0,t.shouldClone=!1,t.zIndex=100,t.events.on("drag",this.handleGripDrag,this,!1),t.events.on("dragstop",this.makeUnbusy,this,!1),t.events.on("down",this.makeBusy,this,!1),t.events.on("up",this.makeUnbusy,this,!1),this._disposers.push(t)},e.prototype.handleGripDrag=function(t){this.makeBusy(),t.target===this._startGrip?this._usingGrip="start":this._usingGrip="end","horizontal"==this.orientation?(this._start=this.startGrip.pixelX/this.innerWidth,this._end=this.endGrip.pixelX/this.innerWidth):(this._start=1-this.startGrip.pixelY/this.innerHeight,this._end=1-this.endGrip.pixelY/this.innerHeight),this.updateThumb()},Object.defineProperty(e.prototype,"thumb",{get:function(){if(!this._thumb){var t=new Rr;t.background.cornerRadius(10,10,10,10),t.padding(0,0,0,0),this.thumb=t}return this._thumb},set:function(t){var e=this;t&&(this._thumb&&this.removeDispose(this._thumb),this._thumb=t,t.parent=this,t.isMeasured=!1,t.inert=!0,t.draggable=!0,t.clickable=!0,t.hoverable=!0,t.focusable=!0,t.shouldClone=!1,t.zIndex=0,t.cursorOverStyle=Qn.grab,t.cursorDownStyle=Qn.grabbing,t.events.on("dragstart",this.makeBusy,this,!1),t.events.on("dragstop",this.makeUnbusy,this,!1),t.events.on("positionchanged",this.handleThumbPosition,this,!1),t.events.on("sizechanged",this.handleThumbPosition,this,!1),t.events.on("doublehit",this.handleDoubleClick,this,!1),this._disposers.push(En().body.events.on("keyup",(function(t){On.isKey(t.event,["space","enter"])&&e.thumb.isFocused&&(t.event.preventDefault(),e.handleDoubleClick())}))),this._disposers.push(this._thumb))},enumerable:!0,configurable:!0}),e.prototype.handleDoubleClick=function(){this.makeBusy();var t=0,e=1;0!=this.start||1!=this.end?(this._prevStart=this.start,this._prevEnd=this.end):(t=this._prevStart,e=this._prevEnd);var i=this.animate([{property:"__start",to:t},{property:"__end",to:e}],this.animationDuration,this.animationEasing);i&&!i.isFinished()?(i.events.on("animationended",this.makeUnbusy,this,!1),this._zoomAnimation=i):this.makeUnbusy()},e.prototype.handleThumbPosition=function(){var t=this.thumb;if("horizontal"==this.orientation){var e=this.innerWidth,i=t.innerWidth,n=t.pixelX;this._start=n/e,this._end=(n+i)/e,this.updateThumb()}else{var r=this.innerHeight,a=t.innerHeight,s=t.pixelY;this._start=1-(s+a)/r,this._end=1-s/r,this.updateThumb()}},e.prototype.createBackground=function(){return new Er},Object.defineProperty(e.prototype,"hideGrips",{get:function(){return this._hideGrips},set:function(t){var e=this;this._hideGrips=t,this._overDisposer&&this.removeDispose(this._overDisposer),this._outDisposer&&this.removeDispose(this._outDisposer),t?(this._overDisposer=this.events.on("over",(function(){e.startGrip.show(),e.endGrip.show()}),void 0,!1),this._outDisposer=this.events.on("out",(function(){e.startGrip.hide(),e.endGrip.hide()}),void 0,!1),this.startGrip.hide(),this.endGrip.hide()):(this.startGrip.show(),this.endGrip.show())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"animationDuration",{get:function(){return this.getPropertyValue("animationDuration")},set:function(t){this.setPropertyValue("animationDuration",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"animationEasing",{get:function(){return this.getPropertyValue("animationEasing")},set:function(t){this.setPropertyValue("animationEasing",t)},enumerable:!0,configurable:!0}),e.prototype.asFunction=function(e){return"animationEasing"==e||t.prototype.asIs.call(this,e)},e}(Pr);se.registeredClasses.Scrollbar=pa;var ua=function(t){function e(){var e=t.call(this)||this;return e.className="Slider",e.thumb.opacity=0,e.thumb.interactionsEnabled=!1,e.endGrip.opacity=0,e.endGrip.interactionsEnabled=!1,e.startGrip.events.on("drag",(function(){e.endGrip.x=e.startGrip.x,e.endGrip.y=e.startGrip.y})),e.applyTheme(),e}return a(e,t),Object.defineProperty(e.prototype,"__end",{get:function(){return this._start},set:function(t){},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this._start},set:function(t){},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"start",{get:function(){return this._start},set:function(t){this._isBusy||(this.__start=t)},enumerable:!0,configurable:!0}),e}(pa);se.registeredClasses.Slider=ua;var da=function(t){function e(){var e=t.call(this)||this;e.className="TextLink",e.selectable=!0;var i=new bn;return e.fill=i.getFor("primaryButton").brighten(.3),e.states.create("hover").properties.fill=i.getFor("primaryButtonHover").brighten(.3),e.states.create("down").properties.fill=i.getFor("primaryButtonDown").brighten(.3),e.cursorOverStyle=Qn.pointer,e.applyTheme(),e}return a(e,t),e}(Lr);se.registeredClasses.TextLink=da;var ca=function(t){function e(){var e=t.call(this)||this;return e.properties={},e.isTemplate=!1,e._scale=1,e._nonScaling=!0,e.className="Filter",e.filterPrimitives=new pe,e.properties.filterUnits="objectBoundingBox",e.filterPrimitives.events.on("inserted",(function(t){e._disposers.push(t.newValue)})),e.width=120,e.height=120,e.applyTheme(),e}return a(e,t),e.prototype.appendPrimitives=function(t){Kt(this.filterPrimitives.iterator(),(function(e){t.add(e)}))},e.prototype.animate=function(t,e,i){return new qi(this,t,e,i).start()},Object.defineProperty(e.prototype,"width",{get:function(){return this.properties.width},set:function(t){this.properties.width=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.properties.height},set:function(t){this.properties.height=t},enumerable:!0,configurable:!0}),e.prototype.copyFrom=function(e){var i=this;t.prototype.copyFrom.call(this,e),Nt(e.properties,(function(t,e){i[t]=e}))},Object.defineProperty(e.prototype,"paper",{get:function(){return this._paper?this._paper:Zn()},set:function(t){this._paper!=t&&(this._paper=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"animations",{get:function(){return this._animations||(this._animations=[],this._disposers.push(new Zi(this._animations))),this._animations},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scale",{get:function(){return this._scale},set:function(t){this._scale=t,this.updateScale()},enumerable:!0,configurable:!0}),e.prototype.updateScale=function(){},Object.defineProperty(e.prototype,"filterUnits",{get:function(){return this.properties.filterUnits},set:function(t){this.properties.filterUnits=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nonScaling",{get:function(){return this._nonScaling},set:function(t){this._nonScaling=t,t||(this._scale=1),this.updateScale()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sprite",{set:function(t){this.setSprite(t)},enumerable:!0,configurable:!0}),e.prototype.setSprite=function(t){this._sprite&&this._sprite!=t&&this._sprite.filters.removeValue(this),this._sprite=t},e}(Ae),fa=function(t){function e(){var e=t.call(this)||this;return e.className="DropShadowFilter",e.color=ke("#000"),e.feGaussianBlur=e.paper.add("feGaussianBlur"),e.feGaussianBlur.attr({result:"blurOut",in:"SourceGraphic"}),e.filterPrimitives.push(e.feGaussianBlur),e.feOffset=e.paper.add("feOffset"),e.feOffset.attr({result:"offsetBlur"}),e.filterPrimitives.push(e.feOffset),e.feFlood=e.paper.add("feFlood"),e.feFlood.attr({"flood-color":e.color}),e.filterPrimitives.push(e.feFlood),e.feComposite=e.paper.add("feComposite"),e.feComposite.attr({in2:"offsetBlur",operator:"in"}),e.filterPrimitives.push(e.feComposite),e.feMerge=e.paper.addGroup("feMerge"),e.feMerge.add(e.paper.add("feMergeNode")),e.feMerge.add(e.paper.add("feMergeNode").attr({in:"SourceGraphic"})),e.filterPrimitives.push(e.feMerge),e.width=200,e.height=200,e.blur=1.5,e.dx=3,e.dy=3,e.opacity=.5,e.applyTheme(),e}return a(e,t),Object.defineProperty(e.prototype,"color",{get:function(){return this.properties.color},set:function(t){this.properties.color=t,this.feFlood&&this.feFlood.attr({"flood-color":t})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"opacity",{get:function(){return this.properties.opacity},set:function(t){this.properties.opacity=t,this.feFlood.attr({"flood-opacity":t})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dx",{get:function(){return this.properties.dx},set:function(t){this.properties.dx=t,this.feOffset.attr({dx:t/this.scale})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dy",{get:function(){return this.properties.dy},set:function(t){this.properties.dy=t,this.feOffset.attr({dy:t/this.scale})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"blur",{get:function(){return this.properties.blur},set:function(t){this.properties.blur=t,this.feGaussianBlur.attr({stdDeviation:t/this.scale})},enumerable:!0,configurable:!0}),e.prototype.updateScale=function(){this.dx=this.dx,this.dy=this.dy,this.blur=this.blur},e}(ca);se.registeredClasses.DropShadowFilter=fa;var ga=function(t){function e(){var e=t.call(this)||this;e._boundingRect={x:-4e4,y:-4e4,width:8e4,height:8e4},e._pointTo={x:0,y:0},e.fitPointerToBounds=!1,e._verticalOrientation="up",e.fixDoc=!0,e.className="Tooltip",e.isMeasured=!1,e.getFillFromObject=!0,e.margin(5,5,5,5),e.defaultState.transitionDuration=1,e.hiddenState.transitionDuration=1;var i=e.background;i.interactionsEnabled=!1,i.fillOpacity=.9,i.strokeWidth=1,i.strokeOpacity=1,i.stroke=ke("#ffffff"),i.cornerRadius=3,i.pointerLength=6,i.pointerBaseWidth=10;var n=new fa;n.dy=1,n.dx=1,n.opacity=.5,i.filters.push(n),e.autoTextColor=!0;var r=e.createChild(Lr);return r.shouldClone=!1,e.label=r,r.padding(7,12,4,12),r.interactionsEnabled=!1,r.horizontalCenter="middle",r.fill=ke("#ffffff"),e._disposers.push(r),e.label.events.on("sizechanged",e.drawBackground,e),e.label.zIndex=1,e.pointerOrientation="vertical",e.animationDuration=0,e.animationEasing=Vi,e.setPropertyValue("showInViewport",!1),e.role="tooltip",e.visible=!1,e.opacity=0,e.x=0,e.y=0,e.events.on("visibilitychanged",e.handleVisibility,e),e.applyTheme(),e}return a(e,t),e.prototype.handleVisibility=function(){this.visible&&this.label.invalidate()},Object.defineProperty(e.prototype,"getStrokeFromObject",{get:function(){return this.getPropertyValue("getStrokeFromObject")},set:function(t){this.setPropertyValue("getStrokeFromObject",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"autoTextColor",{get:function(){return this.getPropertyValue("autoTextColor")},set:function(t){this.setPropertyValue("autoTextColor",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"keepTargetHover",{get:function(){return this.getPropertyValue("keepTargetHover")},set:function(t){var e=this;this.setPropertyValue("keepTargetHover",t,!0)&&t&&(this.hoverable=!0,this.background.interactionsEnabled=!0,this._disposers.push(this.events.on("over",(function(t){e.targetSprite&&e.targetSprite.hoverable&&(e.targetSprite.isHover=!0)}))),this._disposers.push(this.events.on("out",(function(t){e.targetSprite&&e.targetSprite.hoverable&&(e.targetSprite.isHover=!1)}))))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"showInViewport",{get:function(){return this.getPropertyValue("showInViewport")},set:function(t){this.setPropertyValue("showInViewport",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"getFillFromObject",{get:function(){return this.getPropertyValue("getFillFromObject")},set:function(t){this.setPropertyValue("getFillFromObject",t,!0)},enumerable:!0,configurable:!0}),e.prototype.createBackground=function(){return new Yr},Object.defineProperty(e.prototype,"pointerOrientation",{get:function(){return this.getPropertyValue("pointerOrientation")},set:function(t){this.setPropertyValue("pointerOrientation",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"animationDuration",{get:function(){return this.getPropertyValue("animationDuration")},set:function(t){this.setPropertyValue("animationDuration",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"animationEasing",{get:function(){return this.getPropertyValue("animationEasing")},set:function(t){this.setPropertyValue("animationEasing",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"html",{get:function(){return this.label.html},set:function(t){this.label.html!=t&&(this.label.html=t,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return this.label.text},set:function(t){this.label.text!=t&&(this.label.text=t,this.invalidate())},enumerable:!0,configurable:!0}),e.prototype.draw=function(){t.prototype.draw.call(this);var e=this.label;e.invalid&&e.validate();var i,n,r=this._pointTo.x,a=this._pointTo.y,s=this._boundingRect,o=e.measuredWidth,l=e.measuredHeight,h=this.background.pointerLength;if(this.ignoreBounds&&(s=void 0),s&&this.fixDoc&&o>s.width){bi({x:s.x,y:s.y},this.parent);var p=bi({x:s.x+s.width,y:s.y+s.height},this.parent),u=document.body.offsetWidth;document.body.offsetHeight,p.x>u/2?s.x=s.width-o:s.width=s.x+o}var d=this.pointerOrientation;"horizontal"==d||"left"==d||"right"==d?(n=-l/2,i="horizontal"==d?s&&r>s.x+s.width/2?-o/2-h:o/2+h:"left"==d?o/2+h:-o/2-h):(s&&(i=L(0,s.x-r+o/2,s.x-r+s.width-o/2)),"vertical"==d?s&&a>s.y+l+h?(n=-l-h,this._verticalOrientation="up"):(n=h,this._verticalOrientation="down"):"down"==d?(n=-l-h,this._verticalOrientation="up"):(n=h,this._verticalOrientation="down")),s&&(n=L(n,s.y-a,s.y+s.height-l-a)),e.x=i,e.y=n,this.drawBackground()},e.prototype.updateBackground=function(){this.group.addToBack(this.background.group)},e.prototype.drawBackground=function(){var t=this.label,e=this.background,i=t.measuredWidth,n=t.measuredHeight,r=this._boundingRect,a=i,s=t.pixelX-i/2,o=n,l=t.pixelY,h=this._pointTo.x,p=this._pointTo.y,u=r.x-h,d=u+r.width,c=r.y-p,f=c+r.height;e.x=s,e.y=l,e.width=a,e.height=o,this.fitPointerToBounds?(e.pointerX=L(-e.x,u-e.x,d-e.x),e.pointerY=L(-e.y,c-e.y,f-e.y)):(e.pointerX=-e.x,e.pointerY=-e.y),e.validate()},e.prototype.delayedPointTo=function(t,e){var i=this;this._pointToDisposer&&this._pointToDisposer.dispose(),this._pointToDisposer=se.events.once("exitframe",(function(){i.pointTo(t,e)})),this.addDisposer(this._pointToDisposer)},e.prototype.pointTo=function(t,e){this._pointTo.x==t.x&&this._pointTo.y==t.y||(this._pointTo=t,this.invalidate(),!this.visible||e?(this.moveTo(this._pointTo),this._animation&&this._animation.kill()):0==this.pixelX&&0==this.pixelY?this.moveTo(this._pointTo):(this._animation&&this._animation.kill(),this._animation=new qi(this,[{property:"x",to:t.x,from:this.pixelX},{property:"y",to:t.y,from:this.pixelY}],this.animationDuration,this.animationEasing).start()))},e.prototype.setBounds=function(t){var e=this._boundingRect;e.x==t.x&&e.y==t.y&&e.width==t.width&&e.height==t.height||(this._boundingRect=t,this.invalidate())},Object.defineProperty(e.prototype,"boundingContainer",{set:function(t){this._boundingContainer=t,t.events.on("sizechanged",this.updateBounds,this),t.events.on("positionchanged",this.updateBounds,this)},enumerable:!0,configurable:!0}),e.prototype.updateBounds=function(){var t=this._boundingContainer,e=gi({x:t.pixelX,y:t.pixelY,width:t.maxWidth,height:t.maxHeight},t);this.setBounds(e)},Object.defineProperty(e.prototype,"ignoreBounds",{get:function(){return this.getPropertyValue("ignoreBounds")},set:function(t){this.setPropertyValue("ignoreBounds",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"verticalOrientation",{get:function(){return this._verticalOrientation},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tooltip",{get:function(){},enumerable:!0,configurable:!0}),e.prototype.copyFrom=function(e){t.prototype.copyFrom.call(this,e),this.label.copyFrom(e.label),e._boundingRect&&(this._boundingRect=e._boundingRect)},e.prototype.asFunction=function(e){return"animationEasing"==e||t.prototype.asIs.call(this,e)},e}(Pr);se.registeredClasses.Tooltip=ga;var ma=function(t){function e(){var e=t.call(this)||this;return e.className="Trapezoid",e.element=e.paper.add("path"),e.topSide=c(100),e.bottomSide=c(100),e.leftSide=c(100),e.rightSide=c(100),e.isMeasured=!1,e.applyTheme(),e}return a(e,t),e.prototype.draw=function(){t.prototype.draw.call(this);var e=this.pixelWidth,i=this.pixelHeight,n=Ye(this.topSide,e),r=Ye(this.bottomSide,e),a=Ye(this.leftSide,i),s=Ye(this.rightSide,i),o=(e-n)/2,l=(i-a)/2,h=e-(e-n)/2,p=(i-s)/2,u=e-(e-r)/2,d=i-(i-s)/2,c=(e-r)/2,f=i-(i-a)/2,g="",m="",y="",v="";if(_(this.horizontalNeck)){var b=this.horizontalNeck.value;g=Ur({x:e*b,y:Math.max(l,p)}),y=Ur({x:e*b,y:Math.min(d,f)})}if(_(this.verticalNeck)){var x=this.verticalNeck.value;m=Ur({x:Math.min(h,u),y:i*x}),v=Ur({x:Math.max(o,c),y:i*x})}var P=zr({x:o,y:l})+g+Ur({x:h,y:p})+m+Ur({x:u,y:d})+y+Ur({x:c,y:f})+v;this.path=P},Object.defineProperty(e.prototype,"topSide",{get:function(){return this.getPropertyValue("topSide")},set:function(t){this.setPercentProperty("topSide",t,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bottomSide",{get:function(){return this.getPropertyValue("bottomSide")},set:function(t){this.setPercentProperty("bottomSide",t,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"leftSide",{get:function(){return this.getPropertyValue("leftSide")},set:function(t){this.setPercentProperty("leftSide",t,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rightSide",{get:function(){return this.getPropertyValue("rightSide")},set:function(t){this.setPercentProperty("rightSide",t,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"horizontalNeck",{get:function(){return this.getPropertyValue("horizontalNeck")},set:function(t){this.setPropertyValue("horizontalNeck",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"verticalNeck",{get:function(){return this.getPropertyValue("verticalNeck")},set:function(t){this.setPropertyValue("verticalNeck",t,!0)},enumerable:!0,configurable:!0}),e}(xr);se.registeredClasses.Trapezoid=ma;var ya=function(t){function e(){var e=t.call(this)||this;return e.className="Triangle",e.element=e.paper.add("path"),e.direction="top",e.applyTheme(),e}return a(e,t),e.prototype.draw=function(){t.prototype.draw.call(this);var e,i=this.pixelWidth,n=this.pixelHeight;switch(this.direction){case"right":e=zr({x:0,y:0})+Ur({x:i,y:n/2})+Ur({x:0,y:n})+" Z";break;case"left":e=zr({x:i,y:0})+Ur({x:0,y:n/2})+Ur({x:i,y:n})+" Z";break;case"bottom":e=zr({x:0,y:0})+Ur({x:i,y:0})+Ur({x:i/2,y:n})+" Z";break;case"top":e=zr({x:i/2,y:0})+Ur({x:i,y:n})+Ur({x:0,y:n})+" Z"}this.path=e},Object.defineProperty(e.prototype,"direction",{get:function(){return this.getPropertyValue("direction")},set:function(t){this.setPropertyValue("direction",t,!0)},enumerable:!0,configurable:!0}),e}(xr);se.registeredClasses.Triangle=ya;var va=function(){function t(t,e){this._tensionX=t,this._tensionY=e}return t.prototype.smooth=function(t){for(var e=t.length-1;e>0;e--){var i=t[e],n=t[e-1];Math.abs(i.x-n.x)<.1&&Math.abs(i.y-n.y)<.1&&t.splice(e-1,1)}var r=this._tensionX,a=this._tensionY;if(t.length<3||r>=1&&a>=1)return Xr(t);var s=t[0],o=t[t.length-1],l=!1;F(s.x,3)==F(o.x)&&F(s.y)==F(o.y)&&(l=!0);for(var h="",p=(e=0,t.length-1);e0){var d=Math.atan2(h-o,l-s),c=Math.cos(d),f=Math.sin(d),g=i*c,m=i*f;if(i<=1||n<=1)u=Ur(e);else{var y=Math.round(2*p/i),v=[],b=1;l0&&(t=zr((i=this.getPoints(e))[0])+new va(this.tension,this.tension).smooth(i));var i,n=this.pixelInnerRadius;n>0&&((i=this.getPoints(n)).reverse(),t+=zr(i[0])+new va(this.tension,this.tension).smooth(i));this.path=t},e.prototype.getPoints=function(t){for(var e=t*Math.PI*2,i=this.waveHeight/2,n=e/Math.round(e/this.waveLength),r=n/2,a=[],s=e/n,o=0;o<=s;o++){var l=o*n/e*360,h=(o*n+r)/e*360;a.push({x:(t-i)*B(l),y:(t-i)*E(l)}),a.push({x:(t+i)*B(h),y:(t+i)*E(h)})}return a.pop(),a},Object.defineProperty(e.prototype,"innerRadius",{get:function(){return this.getPropertyValue("innerRadius")},set:function(t){this.setPercentProperty("innerRadius",t,!0,!1,10,!1),this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pixelInnerRadius",{get:function(){return Ye(this.innerRadius,H(this.innerWidth/2,this.innerHeight/2))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"waveLength",{get:function(){return this.getPropertyValue("waveLength")},set:function(t){this.setPropertyValue("waveLength",t),this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"waveHeight",{get:function(){return this.getPropertyValue("waveHeight")},set:function(t){this.setPropertyValue("waveHeight",t),this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tension",{get:function(){return this.getPropertyValue("tension")},set:function(t){this.setPropertyValue("tension",t),this.invalidate()},enumerable:!0,configurable:!0}),e}(Br));se.registeredClasses.WavedCircle=Da;var Sa=function(t){function e(){var e=t.call(this)||this;return e.className="WavedLine",e.element=e.paper.add("path"),e.waveLength=16,e.waveHeight=4,e.tension=.8,e.pixelPerfect=!1,e.fill=ke(),e.applyTheme(),e}return a(e,t),e.prototype.draw=function(){var t={x:this.x1,y:this.y1},e={x:this.x2,y:this.y2};this.path=zr(t)+ba(t,e,this.waveLength,this.waveHeight,this.tension,!0)},Object.defineProperty(e.prototype,"waveLength",{get:function(){return this.getPropertyValue("waveLength")},set:function(t){this.setPropertyValue("waveLength",t),this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"waveHeight",{get:function(){return this.getPropertyValue("waveHeight")},set:function(t){this.setPropertyValue("waveHeight",t),this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tension",{get:function(){return this.getPropertyValue("tension")},set:function(t){this.setPropertyValue("tension",t),this.invalidate()},enumerable:!0,configurable:!0}),e}(Wr),Ia=function(t){function e(){var e=t.call(this)||this;return e.className="WavedRectangle",e.element=e.paper.add("path"),e.waveLength=16,e.waveHeight=4,e.tension=.8,e.setPropertyValue("wavedLeft",!0),e.setPropertyValue("wavedRight",!0),e.setPropertyValue("wavedTop",!0),e.setPropertyValue("wavedBottom",!0),e.applyTheme(),e}return a(e,t),e.prototype.draw=function(){t.prototype.draw.call(this);var e=this.pixelWidth,i=this.pixelHeight;if(e>0&&i>0){var n={x:0,y:0},r={x:e,y:0},a={x:e,y:i},s={x:0,y:i},o=Math.min(e,this.waveLength),l=Math.min(i,this.waveHeight),h=Math.min(i,this.waveLength),p=Math.min(e,this.waveHeight),u="",d="",c="",f="";this.wavedTop&&(u=ba(n,r,o,l,this.tension,!0)),this.wavedRight&&(d=ba(r,a,h,p,this.tension,!0)),this.wavedBottom&&(c=ba(a,s,o,l,this.tension,!0)),this.wavedLeft&&(f=ba(s,n,h,p,this.tension,!0)),this.path=zr(n)+u+Ur(r)+d+Ur(a)+c+Ur(s)+f+"z"}},Object.defineProperty(e.prototype,"waveLength",{get:function(){return this.getPropertyValue("waveLength")},set:function(t){this.setPropertyValue("waveLength",t),this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"waveHeight",{get:function(){return this.getPropertyValue("waveHeight")},set:function(t){this.setPropertyValue("waveHeight",t),this.invalidate()},enumerable:!0,configurable:!0}),e.prototype.setWavedSides=function(t,e,i,n){this.wavedTop=t,this.wavedRight=e,this.wavedBottom=i,this.wavedLeft=n},Object.defineProperty(e.prototype,"tension",{get:function(){return this.getPropertyValue("tension")},set:function(t){this.setPropertyValue("tension",t),this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"wavedRight",{get:function(){return this.getPropertyValue("wavedRight")},set:function(t){this.setPropertyValue("wavedRight",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"wavedLeft",{get:function(){return this.getPropertyValue("wavedLeft")},set:function(t){this.setPropertyValue("wavedLeft",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"wavedTop",{get:function(){return this.getPropertyValue("wavedTop")},set:function(t){this.setPropertyValue("wavedTop",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"wavedBottom",{get:function(){return this.getPropertyValue("wavedBottom")},set:function(t){this.setPropertyValue("wavedBottom",t,!0)},enumerable:!0,configurable:!0}),e}(_r),ka=function(t){function e(){var e=t.call(this)||this;e.className="ZoomOutButton",e.padding(9,9,9,9),e.showSystemTooltip=!0;var i=new bn,n=e.background;n.cornerRadius(20,20,20,20),n.fill=i.getFor("primaryButton"),n.stroke=i.getFor("primaryButtonStroke"),n.strokeOpacity=0,n.states.getKey("hover").properties.fill=i.getFor("primaryButtonHover"),n.states.getKey("down").properties.fill=i.getFor("primaryButtonActive");var r=new xr;r.element=e.paper.add("path");var a=zr({x:0,y:0});return a+=Ur({x:11,y:0}),r.path=a,r.pixelPerfect=!0,r.padding(8,3,8,3),r.stroke=i.getFor("primaryButtonText"),e.icon=r,e.applyTheme(),e}return a(e,t),e.prototype.applyInternalDefaults=function(){t.prototype.applyInternalDefaults.call(this),_(this.readerTitle)||(this.readerTitle=this.language.translate("Zoom Out"))},e}(Rr);se.registeredClasses.ZoomOutButton=ka;var Ta=function(t){function e(){var e=t.call(this)||this;e.className="PlayButton",e.padding(12,12,12,12),e.showSystemTooltip=!0;var i=new bn,n=e.background;n.cornerRadius(25,25,25,25),n.fill=i.getFor("primaryButton"),n.stroke=i.getFor("primaryButtonStroke"),n.strokeOpacity=0,n.states.getKey("hover").properties.fill=i.getFor("primaryButtonHover"),n.states.getKey("down").properties.fill=i.getFor("primaryButtonActive");var r=new ya;r.direction="right",r.width=9,r.height=11,r.marginLeft=1,r.marginRight=1,r.horizontalCenter="middle",r.verticalCenter="middle",r.stroke=i.getFor("primaryButtonText"),r.fill=r.stroke,e.icon=r;var a=new Er;a.width=11,a.height=11,a.horizontalCenter="middle",a.verticalCenter="middle",a.cornerRadius(0,0,0,0),a.stroke=i.getFor("primaryButtonText"),a.fill=r.stroke,e.togglable=!0;var s=e.states.create("active");return s.transitionDuration=0,s.properties.icon=a,e.defaultState.transitionDuration=0,e.applyTheme(),e}return a(e,t),e.prototype.applyInternalDefaults=function(){t.prototype.applyInternalDefaults.call(this),_(this.readerTitle)||(this.readerTitle=this.language.translate("Play"))},e}(Rr);se.registeredClasses.PlayButton=Ta;var Aa=function(t){function e(){var e=t.call(this)||this;return e.className="ColorModifier",e.applyTheme(),e}return a(e,t),e.prototype.modify=function(t){return t},e}(Ae);se.registeredClasses.ColorModifier=Aa;var Ma=function(t){function e(){var e=t.call(this)||this;return e.lightnesses=[],e.brightnesses=[],e.opacities=[],e.offsets=[],e.className="GradientModifier",e.applyTheme(),e}return a(e,t),Object.defineProperty(e.prototype,"lightnesses",{get:function(){return this._lightnesses},set:function(t){this._lightnesses=t,this._brightnesses=[]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"brightnesses",{get:function(){return this._brightnesses},set:function(t){this._brightnesses=t,this._lightnesses=[]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"opacities",{get:function(){return this._opacities},set:function(t){this._opacities=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"offsets",{get:function(){return this._offsets},set:function(t){this._offsets=t},enumerable:!0,configurable:!0}),e.prototype.modify=function(t){this.gradient.clear();var e=0;this.opacities&&(e=N(e,this.opacities.length)),this.lightnesses&&(e=N(e,this.lightnesses.length)),this.brightnesses&&(e=N(e,this.brightnesses.length));for(var i,n,r=1,a=0;a0&&this.depth>0){this.sideB.show(0),this.sideA.show(0),this.edge.show(0);for(var e=this.startAngle,i=this.arc,n=this.pixelInnerRadius||0,r=this.radiusY||0,a=this.radius,s=e+i,o=r/a*n,l={x:B(e)*n,y:E(e)*o},h={x:B(e)*a,y:E(e)*r},p={x:B(s)*a,y:E(s)*r},u={x:B(s)*n,y:E(s)*o},d=this.depth,c={x:l.x,y:l.y-d},f={x:h.x,y:h.y-d},g={x:p.x,y:p.y-d},m={x:u.x,y:u.y-d},y="",v=Math.ceil(i/5),b=i/v,x=e,_=f,P=0;P0&&x<180){y+=zr(_);var w={x:B(x)*a,y:E(x)*r-d};y+=Ur({x:_.x,y:_.y+d}),y+=$r({x:w.x,y:w.y+d},a,r,!0),y+=Ur(w),y+=$r(_,a,r),y+="z",_=w}else{y+=zr(_),y+=$r(w={x:B(x)*a,y:E(x)*r-d},a,r,!0),y+=Ur({x:w.x,y:w.y+d}),y+=$r({x:_.x,y:_.y+d},a,r),y+=Ur(_),y+="z",_=w}_=c,x=e;for(P=0;P0&&x<180){y+=zr(_);w={x:B(x)*n,y:E(x)*o-d};y+=Ur({x:_.x,y:_.y+d}),y+=$r({x:w.x,y:w.y+d},n,o,!0),y+=Ur(w),y+=$r(_,n,o),y+="z",_=w}else{y+=zr(_),y+=$r(w={x:B(x)*n,y:E(x)*o-d},n,o,!0),y+=Ur({x:w.x,y:w.y+d}),y+=$r({x:_.x,y:_.y+d},n,o),y+=Ur(_),y+="z",_=w}this.edge.path=y,this.sideA.path=zr(l)+Ur(h)+Ur(f)+Ur(c)+" Z",this.sideB.path=zr(p)+Ur(u)+Ur(m)+Ur(g)+" Z",this.startAngle<90?this.sideA.toBack():this.sideA.toFront(),this.startAngle+this.arc>90?this.sideB.toBack():this.sideB.toFront(),this.slice.dy=-d}else this.sideA.hide(0),this.sideB.hide(0),this.edge.hide(0)},Object.defineProperty(e.prototype,"depth",{get:function(){return this.getPropertyValue("depth")},set:function(t){this.setPropertyValue("depth",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"angle",{get:function(){var t=this.getPropertyValue("angle");return D(t)||(t=0),t},set:function(t){this.setPropertyValue("angle",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"radiusY",{get:function(){var t=this.getPropertyValue("radiusY");return D(t)||(t=this.radius-this.radius*this.angle/90),t},set:function(t){this.setPropertyValue("radiusY",t,!0)},enumerable:!0,configurable:!0}),e.prototype.copyFrom=function(e){t.prototype.copyFrom.call(this,e),this.edge.copyFrom(e.edge),this.sideA.copyFrom(e.sideA),this.sideB.copyFrom(e.sideB)},e}(aa),Ra=function(t){function e(){var e=t.call(this)||this;return e.className="RadialGradientModifier",e.gradient=new Jn,e.applyTheme(),e}return a(e,t),e.prototype.copyFrom=function(e){t.prototype.copyFrom.call(this,e),this.gradient=e.gradient.clone()},e}(Ma);se.registeredClasses.RadialGradientModifier=Ra;var Ba=function(t){function e(){var e=t.call(this)||this;return e.properties.gap=0,e._line=e.paper.add("path"),e.addElement(e._line),e}return a(e,t),e.prototype.draw=function(){if(t.prototype.draw.call(this),Math.round(this.rotation/90)!=this.rotation/90&&(this.properties.shapeRendering="auto"),this._line){var e=this.width,i=this.height,n="";if(this.gap)for(var r=this.gap+this.strokeWidth,a=this.height/r,s=-a/2;s<1.5*a;s++)Math.round(this.rotation/90)!=this.rotation/90?(n+=zr({x:-e,y:(s+.5)*r})+Ur({x:2*e,y:(s+.5)*r}),this.properties.rotationX=this.width/2,this.properties.rotationY=this.height/2):n+=zr({x:-e,y:s*r})+Ur({x:2*e,y:s*r});else Math.round(this.rotation/90)!=this.rotation/90?(n=zr({x:-e,y:i/2})+Ur({x:2*e,y:i/2}),this.properties.rotationX=this.width/2,this.properties.rotationY=this.height/2):n=zr({x:0,y:0})+Ur({x:e,y:0});this._line.attr({d:n})}},Object.defineProperty(e.prototype,"gap",{get:function(){return this.properties.gap},set:function(t){this.properties.gap=t,this.draw()},enumerable:!0,configurable:!0}),e}(qn);se.registeredClasses.LinePattern=Ba;var Na=function(t){function e(){var e=t.call(this)||this;return e.properties.radius=2,e._circle=e.paper.add("circle"),e.addElement(e._circle),e.shapeRendering="auto",e}return a(e,t),e.prototype.draw=function(){t.prototype.draw.call(this),this._circle&&this._circle.attr({r:this.radius,cx:this.width/2,cy:this.height/2})},Object.defineProperty(e.prototype,"radius",{get:function(){return this.properties.radius},set:function(t){this.properties.radius=t,this.draw()},enumerable:!0,configurable:!0}),e}(qn);se.registeredClasses.CirclePattern=Na;var Ha=function(t){function e(){var e=t.call(this)||this;return e.rectHeight=1,e.rectWidth=1,e._rect=e.paper.add("rect"),e.addElement(e._rect),e}return a(e,t),e.prototype.draw=function(){t.prototype.draw.call(this),this.properties.rotationX=this.width/2,this.properties.rotationY=this.height/2,this._rect&&this._rect.attr({width:this.rectWidth,height:this.rectHeight,x:(this.width-this.rectWidth)/2,y:(this.height-this.rectHeight)/2})},Object.defineProperty(e.prototype,"rectWidth",{get:function(){return this.properties.rectWidth},set:function(t){this.properties.rectWidth=t,this.draw()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rectHeight",{get:function(){return this.properties.rectHeight},set:function(t){this.properties.rectHeight=t,this.draw()},enumerable:!0,configurable:!0}),e}(qn);se.registeredClasses.RectPattern=Ha;var Wa=function(t){function e(){var e=t.call(this)||this;return e.className="ColorizeFilter",e.feColorMatrix=e.paper.add("feColorMatrix"),e.feColorMatrix.attr({type:"matrix"}),e.filterPrimitives.push(e.feColorMatrix),e.intensity=1,e.applyTheme(),e}return a(e,t),e.prototype.applyFilter=function(){var t,e,i,n=this.intensity,r=1-n,a=this.color;a&&a.rgb?(t=a.rgb.r/255*n,e=a.rgb.g/255*n,i=a.rgb.b/255*n):(t=0,e=0,i=0),this.feColorMatrix.attr({values:r+" 0 0 0 "+t+" 0 "+r+" 0 0 "+e+" 0 0 "+r+" 0 "+i+" 0 0 0 1 0"})},Object.defineProperty(e.prototype,"color",{get:function(){return this.properties.color},set:function(t){this.properties.color=t,this.applyFilter()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"intensity",{get:function(){return this.properties.intensity},set:function(t){this.properties.intensity=t,this.applyFilter()},enumerable:!0,configurable:!0}),e}(ca);se.registeredClasses.ColorizeFilter=Wa;var Ya=function(t){function e(){var e=t.call(this)||this;return e.className="DesaturateFilter",e.feColorMatrix=e.paper.add("feColorMatrix"),e.feColorMatrix.attr({type:"saturate"}),e.filterPrimitives.push(e.feColorMatrix),e.width=120,e.height=120,e.saturation=0,e.applyTheme(),e}return a(e,t),Object.defineProperty(e.prototype,"saturation",{get:function(){return this.properties.saturation},set:function(t){this.properties.saturation=t,this.feColorMatrix.attr({values:t.toString()})},enumerable:!0,configurable:!0}),e}(ca);se.registeredClasses.DesaturateFilter=Ya;var Xa=function(t){function e(){var e=t.call(this)||this;return e.className="BlurFilter",e.feGaussianBlur=e.paper.add("feGaussianBlur"),e.feGaussianBlur.attr({result:"blurOut",in:"SourceGraphic"}),e.filterPrimitives.push(e.feGaussianBlur),e.width=200,e.height=200,e.blur=1.5,e.applyTheme(),e}return a(e,t),Object.defineProperty(e.prototype,"blur",{get:function(){return this.properties.blur},set:function(t){this.properties.blur=t,this.feGaussianBlur.attr({stdDeviation:t/this.scale})},enumerable:!0,configurable:!0}),e}(ca);se.registeredClasses.BlurFilter=Xa;var za=function(t){function e(){var e=t.call(this)||this;return e.className="FocusFilter",e.feFlood=e.paper.add("feFlood"),e.feFlood.attr({"flood-color":(new bn).getFor("primaryButtonHover"),result:"base"}),e.filterPrimitives.push(e.feFlood),e.feMorphology=e.paper.add("feMorphology"),e.feMorphology.attr({result:"bigger",in:"SourceGraphic",operator:"dilate",radius:"2"}),e.filterPrimitives.push(e.feMorphology),e.feColorMatrix=e.paper.add("feColorMatrix"),e.feColorMatrix.attr({result:"mask",in:"bigger",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0"}),e.filterPrimitives.push(e.feColorMatrix),e.feComposite=e.paper.add("feComposite"),e.feComposite.attr({result:"drop",in:"base",in2:"mask",operator:"in"}),e.filterPrimitives.push(e.feComposite),e.feBlend=e.paper.add("feBlend"),e.feBlend.attr({in:"SourceGraphic",in2:"drop",mode:"normal"}),e.filterPrimitives.push(e.feBlend),e.width=130,e.height=130,e.applyTheme(),e}return a(e,t),Object.defineProperty(e.prototype,"stroke",{get:function(){return this.properties.stroke},set:function(t){this.properties.stroke=t,this.feFlood.attr({"flood-color":t})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"strokeWidth",{get:function(){return this.properties.strokeWidth},set:function(t){this.properties.strokeWidth=t,this.feMorphology.attr({radius:t})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"opacity",{get:function(){return this.properties.opacity},set:function(t){this.properties.opacity=t,this.feColorMatrix.attr({values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 "+t+" 0"})},enumerable:!0,configurable:!0}),e.prototype.setSprite=function(e){this._sprite&&this._sprite!=e&&this._sprite.group.removeStyle("outline"),e.group.addStyle({outline:"none"}),t.prototype.setSprite.call(this,e)},e}(ca),Ua=function(t){function e(){var e=t.call(this)||this;return e._list=[],e._currentStep=0,e._startIndex=0,e._currentPass=0,e.baseColor=new Ie({r:103,g:183,b:220}),e.stepOptions={},e.passOptions={brighten:-.2},e.step=1,e.minColors=20,e.minLightness=.2,e.maxLightness=.9,e.shuffle=!1,e.wrap=!0,e.reuse=!1,e.saturation=1,e.className="ColorSet",e.applyTheme(),e}return a(e,t),Object.defineProperty(e.prototype,"list",{get:function(){return this._list||this.generate(this.minColors),this._list},set:function(t){this._list=t,this.reset()},enumerable:!0,configurable:!0}),e.prototype.getReusableColor=function(t){if(0==this._list.length)return this.generate(1),this.list[0];var e=t-Math.floor(t/this._list.length)*this.list.length;return this.list[e]},e.prototype.next=function(){var t;return this.list.length<=this._currentStep?this.reuse?t=this.getReusableColor(this._currentStep):(this.generate(N(this.minColors,this._currentStep+1)),t=this.list[this._currentStep]):t=this.list[this._currentStep],this._currentStep+=this.step,t.saturate(this.saturation)},e.prototype.getIndex=function(t){var e;return this.list.length<=t?this.reuse?e=this.getReusableColor(t):(this.generate(this.minColors),e=this.getIndex(t)):e=this.list[t],e.saturate(this.saturation)},e.prototype.reset=function(){this._currentStep=this._startIndex},Object.defineProperty(e.prototype,"currentStep",{get:function(){return this._currentStep},set:function(t){this._currentStep=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startIndex",{get:function(){return this._startIndex},set:function(t){this._startIndex=t,this.reset()},enumerable:!0,configurable:!0}),e.prototype.generate=function(t){var e=Se(P(this.currentColor.rgb)),i=_(this.stepOptions.hue)?this.stepOptions.hue:1/t,n={brighten:0,lighten:0,hue:e.h,lightness:e.l,saturation:e.s},r=[],a=0==this.list.length?0:1;if(this.reuse)for(var s=a;s<=t;s++)r.push(Se(P(this._list[s].rgb)).h);else for(s=a;s<=t;s++){var o=e.h+i*s;this.wrap&&o>1&&(o-=1),r.push(o)}this.shuffle&&r.sort((function(t,e){return Math.random()-.5}));for(s=0;s1?t.l=t.l-Math.floor(t.l):t.l<0&&(t.l=-(t.l-Math.floor(t.l))),t.l=ui(t.l,this.minLightness,this.maxLightness)):(t.l>1?t.l=1:t.l<0&&(t.l=0),t.l=pi(t.l,this.minLightness,this.maxLightness))},e.prototype.processConfig=function(e){if(e){if(_(e.list)&&I(e.list))for(var i=0,n=e.list.length;i=0){se.queue.splice(se.queue.indexOf(t),1);var i=se.queue[e];i&&Qa(i)}}function Ja(t){t.__disabled&&mn(t.htmlContainer,Yi.viewportTarget)&&(t.vpDisposer&&t.vpDisposer.dispose(),qa(t))}function Qa(t){t&&t.tooltipContainer&&(t.__disabled=!1,t.tooltipContainer.__disabled=!1,t.events.enableType("appeared"),t.dispatch("removedfromqueue"),t.showOnInit&&t.events.on("appeared",(function(){$a(t)})),t.vpDisposer&&t.vpDisposer.dispose(),t instanceof Pr&&t.invalidateLabels(),t.tooltipContainer&&t.tooltipContainer.invalidateLayout(),t instanceof jr?(t.invalidateData(),t.reinit(),t.events.once("datavalidated",(function(){t.showOnInit?t.appear():$a(t)}))):(t.reinit(),t.events.once("inited",(function(){$a(t)})),t.showOnInit&&t.appear()))}var ts=function(t){function e(){var e=t.call(this)||this;e.className="Grip";var i=new bn;e.layout="absolute",e.padding(10,10,10,10),e.margin(3,3,3,3),e.background.fillOpacity=.3,e.background.cornerRadius(10,10,10,10);var n=new xr;n.element=e.paper.add("path");var r=zr({x:-6,y:0});return r+=Ur({x:6,y:0}),r+=zr({x:-8,y:-6}),r+=Ur({x:0,y:-12}),r+=Ur({x:8,y:-6}),r+=zr({x:-8,y:6}),r+=Ur({x:0,y:12}),r+=Ur({x:8,y:6}),n.path=r,n.strokeWidth=2,n.fillOpacity=0,n.pixelPerfect=!0,n.padding(0,4,0,4),n.stroke=i.getFor("text"),n.strokeOpacity=.7,n.align="center",n.valign="middle",e.icon=n,e.label.dispose(),e.label=void 0,e.position="right",e.autoHideDelay=3e3,e.events.on("shown",(function(t){e._autoHideTimeout&&e._autoHideTimeout.dispose(),e.autoHideDelay&&(e._autoHideTimeout=e.setTimeout((function(){e.hide()}),e.autoHideDelay))})),e.events.on("down",(function(t){e._autoHideTimeout&&e._autoHideTimeout.dispose()})),e.events.on("out",(function(t){e.autoHideDelay&&(e._autoHideTimeout=e.setTimeout((function(){e.hide()}),e.autoHideDelay))})),e.applyTheme(),e}return a(e,t),Object.defineProperty(e.prototype,"position",{get:function(){return this.getPropertyValue("position")},set:function(t){if(this.setPropertyValue("position",t))switch(t){case"left":this.align="left",this.valign="middle",this.horizontalCenter="left",this.verticalCenter="middle",this.icon.rotation=0,this.width=void 0,this.height=c(30);break;case"right":this.align="right",this.valign="middle",this.horizontalCenter="right",this.verticalCenter="middle",this.icon.rotation=0,this.width=void 0,this.height=c(30);break;case"top":this.align="center",this.valign="top",this.horizontalCenter="middle",this.verticalCenter="top",this.icon.rotation=90,this.width=c(30),this.height=void 0;break;case"bottom":this.align="center",this.valign="bottom",this.horizontalCenter="middle",this.verticalCenter="bottom",this.icon.rotation=90,this.width=c(30),this.height=void 0;break;default:this.align="center",this.valign="middle",this.horizontalCenter="middle",this.verticalCenter="middle",this.icon.rotation=90,this.width=c(30),this.height=void 0}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"autoHideDelay",{get:function(){return this.getPropertyValue("autoHideDelay")},set:function(t){this.setPropertyValue("autoHideDelay",t)},enumerable:!0,configurable:!0}),e}(Rr);se.registeredClasses.Grip=ts;var es=function(t){function e(){var e=t.call(this)||this;return e.className="ChartDataItem",e.applyTheme(),e}return a(e,t),e}(Fr),is=function(t){function e(){var i=t.call(this)||this;if(i._legend=new Ct,i.constructor===e)throw new Error("'Chart' cannot be instantiated directly. Please use a specific chart type.");i.className="Chart";var n=new Lr;i.titles=new ue(n),i._disposers.push(new le(i.titles)),i._disposers.push(n),i.width=c(100),i.height=c(100),i.layout="vertical";var r=i.createChild(Pr);r.shouldClone=!1,r.layout="vertical",r.width=c(100),r.height=c(100),i.chartAndLegendContainer=r;var a=r.createChild(Pr);return a.shouldClone=!1,a.width=c(100),a.height=c(100),i.chartContainer=a,i.showOnInit=!0,i._disposers.push(i._legend),i.titles.events.on("inserted",(function(t){i.processTitle(t),i.updateReaderTitleReferences()}),i,!1),i.titles.events.on("removed",(function(t){i.updateReaderTitleReferences()}),i,!1),i.role="region",i.defaultState.transitionDuration=1,i.applyTheme(),i}return a(e,t),e.prototype.applyInternalDefaults=function(){t.prototype.applyInternalDefaults.call(this),_(this.readerTitle)||(this.readerTitle=this.language.translate("Chart"))},e.prototype.draw=function(){this.fixLayout(),t.prototype.draw.call(this)},e.prototype.fixLayout=function(){var t=this.legend;if(t){var e=this.chartAndLegendContainer,i=this.chartContainer;switch(i.x=void 0,i.y=void 0,"absolute"!=t.position&&(t.x=void 0,t.y=void 0),t.position){case"left":e.layout="horizontal",t.toBack();break;case"right":e.layout="horizontal",t.toFront();break;case"top":e.layout="vertical",t.toBack();break;case"bottom":e.layout="vertical",t.toFront();break;case"absolute":t.isMeasured=!1}}},e.prototype.feedLegend=function(){},e.prototype.processTitle=function(t){var e=t.newValue;return e.parent=this,e.toBack(),e.shouldClone=!1,e.align="center",e.uidAttr(),e},e.prototype.updateReaderTitleReferences=function(){if(this.titles.length){var t=[];Kt(this.titles.iterator(),(function(e){t.push(e.uid)})),this.setSVGAttribute({"aria-labelledby":t.join(" ")})}else this.removeSVGAttribute("aria-labelledby")},Object.defineProperty(e.prototype,"legend",{get:function(){return this._legend.get()},set:function(t){this.setLegend(t)},enumerable:!0,configurable:!0}),e.prototype.setLegend=function(t){var e=this;this._legend.get()!==t&&(t?(t.parent=this.chartAndLegendContainer,this._legend.set(t,t.events.on("propertychanged",(function(t){"position"==t.property&&e.fixLayout()}),void 0,!1)),t.addDisposer(new Pt((function(){e.legend=void 0})))):this._legend.reset(),this.feedLegend())},e.prototype.dispose=function(){this.legend&&this.legend.dispose(),t.prototype.dispose.call(this)},e.prototype.processConfig=function(e){e&&_(e.legend)&&!_(e.legend.type)&&(e.legend.type="Legend"),t.prototype.processConfig.call(this,e)},e.prototype.copyFrom=function(e){this.titles.copyFrom(e.titles),this.chartContainer.copyFrom(e.chartContainer),e.legend&&(this.legend=e.legend.clone(),this.legend.removeChildren()),t.prototype.copyFrom.call(this,e)},Object.defineProperty(e.prototype,"dragGrip",{get:function(){var t=this;if(!this._dragGrip){var e=this.tooltipContainer.createChild(ts);e.align="right",e.valign="middle",e.hide(0),e.events.on("down",(function(e){e.touch&&(t.interactionsEnabled=!1)})),e.events.on("up",(function(e){t.interactionsEnabled=!0})),this.events.on("down",(function(t){t.touch&&e.show()})),this._dragGrip=e}return this._dragGrip},set:function(t){this._dragGrip=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"focusable",{get:function(){return this.parent.focusable},set:function(t){this.parent.focusable=t},enumerable:!0,configurable:!0}),e}(jr);se.registeredClasses.Chart=is,Mr.push({relevant:Vr.widthXS,state:function(t,e){if(t instanceof is){var i=t.states.create(e);return t.pixelPaddingLeft>10&&(i.properties.paddingLeft=10),t.pixelPaddingRight>10&&(i.properties.paddingRight=10),i}return null}}),Mr.push({relevant:Vr.heightXS,state:function(t,e){if(t instanceof is){var i=t.states.create(e);return t.pixelPaddingTop>10&&(i.properties.paddingTop=10),t.pixelPaddingBottom>10&&(i.properties.paddingBottom=10),i}return null}}),Mr.push({relevant:Vr.widthXXS,state:function(t,e){if(t instanceof is){var i=t.states.create(e);return i.properties.paddingLeft=0,i.properties.paddingRight=0,i}return null}}),Mr.push({relevant:Vr.heightXXS,state:function(t,e){if(t instanceof is){var i=t.states.create(e);return i.properties.paddingTop=0,i.properties.paddingBottom=0,i}return null}});var ns=function(t){function e(){var e=t.call(this)||this;return e.className="Bullet",e.isMeasured=!1,e.tooltipX=0,e.tooltipY=0,e.layout="none",e.applyOnClones=!0,e.copyToLegendMarker=!0,e.applyTheme(),e}return a(e,t),Object.defineProperty(e.prototype,"locationX",{get:function(){return this.getPropertyValue("locationX")},set:function(t){if(this.setPropertyValue("locationX",t)){var e=this.dataItem;e&&e.component&&e.component.invalidate()}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"locationY",{get:function(){return this.getPropertyValue("locationY")},set:function(t){if(this.setPropertyValue("locationY",t)){var e=this.dataItem;e&&e.component&&e.component.invalidate()}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"xField",{get:function(){return this.getPropertyValue("xField")},set:function(t){this.setPropertyValue("xField",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"yField",{get:function(){return this.getPropertyValue("yField")},set:function(t){this.setPropertyValue("yField",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isDynamic",{get:function(){return this.getPropertyValue("isDynamic")},set:function(t){this.setPropertyValue("isDynamic",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"copyToLegendMarker",{get:function(){return this.getPropertyValue("copyToLegendMarker")},set:function(t){this.setPropertyValue("copyToLegendMarker",t)},enumerable:!0,configurable:!0}),e}(Pr);se.registeredClasses.Bullet=ns,Mr.push({relevant:Vr.isXS,state:function(t,e){if(t instanceof ns){var i=t.states.create(e);return i.properties.disabled=!0,i}return null}});var rs=function(t){function e(){var e=t.call(this)||this;return e.childrenCreated=!1,e.className="LegendDataItem",e.applyTheme(),e}return a(e,t),Object.defineProperty(e.prototype,"label",{get:function(){var t=this;if(!this._label){var e=this.component.labels.create();this._label=e,this.addSprite(e),this._disposers.push(e),e.parent=this.itemContainer,this._disposers.push(new Pt((function(){_(t.component)&&t.component.labels.removeValue(e)})))}return this._label},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return this.properties.color},set:function(t){this.setProperty("color",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"valueLabel",{get:function(){var t=this;if(!this._valueLabel){var e=this.component.valueLabels.create();this._valueLabel=e,this.addSprite(e),this._disposers.push(e),e.parent=this.itemContainer,this._disposers.push(new Pt((function(){_(t.component)&&t.component.valueLabels.removeValue(e)})))}return this._valueLabel},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"itemContainer",{get:function(){var t=this;if(!this._itemContainer){var e=this.component,i=e.itemContainers.create();i.parent=e,this._itemContainer=i,this.addSprite(i),this._disposers.push(i),i.togglable&&i.events.on("toggled",(function(t){e.toggleDataItem(t.target.dataItem)}),void 0,!1),i.focusable&&(i.events.on("hit",(function(t){e.focusedItem=void 0}),void 0,!1),i.events.on("focus",(function(t){e.focusedItem=t.target.dataItem}),void 0,!1),i.events.on("blur",(function(t){e.focusedItem=void 0}),void 0,!1)),this._disposers.push(new Pt((function(){_(t.component)&&t.component.itemContainers.removeValue(i)}))),this.dataContext.uidAttr&&(i.readerControls=this.dataContext.uidAttr(),i.readerLabelledBy=this.dataContext.uidAttr());var n=this.dataContext;if((n instanceof Fr||n instanceof xr)&&!n.isDisposed()){var r=function(t){i.readerChecked=t.visible,i.events.disableType("toggled"),i.isActive=!t.visible,i.events.enableType("toggled")};n.addDisposer(new Pt((function(){t.component&&t.component.dataItems.remove(t)}))),n instanceof xr?(i.addDisposer(n.events.on("visibilitychanged",r,void 0,!1)),i.addDisposer(n.events.on("hidden",(function(t){i.readerChecked=!1,i.events.disableType("toggled"),i.isActive=!0,i.events.enableType("toggled")}),void 0,!1)),i.addDisposer(n.events.on("shown",(function(t){i.readerChecked=!0,i.events.disableType("toggled"),i.isActive=!1,i.events.enableType("toggled")}),void 0,!1))):i.addDisposer(n.events.on("visibilitychanged",r,void 0,!1))}}return this._itemContainer},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"marker",{get:function(){var t=this;if(!this._marker){var e=this.component.markers.create();this._marker=e,e.parent=this.itemContainer,this.addSprite(e),this._disposers.push(e),this._disposers.push(new Pt((function(){_(t.component)&&t.component.markers.removeValue(e)})))}return this._marker},enumerable:!0,configurable:!0}),e}(Fr),as=function(){this.createMarker=!0},ss=function(t){function e(){var e=t.call(this)||this;e.className="Legend",e.layout="grid",e.setPropertyValue("useDefaultMarker",!1),e.setPropertyValue("scrollable",!1),e.setPropertyValue("contentAlign","center");var i=new Pr;i.applyOnClones=!0,i.padding(8,0,8,0),i.margin(0,10,0,10),i.layout="horizontal",i.clickable=!0,i.focusable=!0,i.role="switch",i.togglable=!0,i.cursorOverStyle=Qn.pointer,i.background.fillOpacity=0,e.itemContainers=new ue(i),e._disposers.push(new le(e.itemContainers)),e._disposers.push(e.itemContainers.template),e._disposers.push(En().body.events.on("keyup",(function(t){if(On.isKey(t.event,"enter")&&e.focusedItem){var i=e.focusedItem,n=i.itemContainer;n.togglable?e.toggleDataItem(i):n.clickable&&n.events.isEnabled("hit")&&(n.dispatchImmediately("hit",{event:t}),e.focusedItem=i)}}),e));var n=new bn,r=new Pr;r.width=23,r.height=23,r.interactionsEnabled=!1,r.applyOnClones=!0,r.setStateOnChildren=!0,r.background.fillOpacity=0,r.background.strokeOpacity=0,r.propertyFields.fill="fill",r.valign="middle";var a=n.getFor("disabledBackground");r.events.on("childadded",(function(t){var e=t.newValue.states.create("active");e.properties.stroke=a,e.properties.fill=a})),e.markers=new ue(r),e._disposers.push(new le(e.markers)),e._disposers.push(e.markers.template);var s=r.createChild(Er);s.width=c(100),s.height=c(100),s.applyOnClones=!0,s.propertyFields.fill="fill",s.strokeOpacity=0;var o=new Lr;o.text="{name}",o.margin(0,5,0,5),o.valign="middle",o.applyOnClones=!0,o.states.create("active").properties.fill=n.getFor("disabledBackground"),e.labels=new ue(o),e._disposers.push(new le(e.labels)),e._disposers.push(e.labels.template),o.interactionsEnabled=!1,o.truncate=!0,o.fullWords=!1;var l=new Lr;return l.margin(0,5,0,0),l.valign="middle",l.width=50,l.align="right",l.textAlign="end",l.applyOnClones=!0,l.states.create("active").properties.fill=n.getFor("disabledBackground"),l.interactionsEnabled=!1,e.valueLabels=new ue(l),e._disposers.push(new le(e.valueLabels)),e._disposers.push(e.valueLabels.template),e.position="bottom",i.states.create("active"),i.setStateOnChildren=!0,e.role="group",e.events.on("layoutvalidated",e.handleScrollbar,e,!1),e.applyTheme(),e}return a(e,t),e.prototype.applyInternalDefaults=function(){t.prototype.applyInternalDefaults.call(this),_(this.readerTitle)||(this.readerTitle=this.language.translate("Legend"))},e.prototype.createDataItem=function(){return new rs},e.prototype.validateDataElements=function(){this.scrollbar&&(this.scrollbar.start=0,this.scrollbar.end=1),t.prototype.validateDataElements.call(this)},e.prototype.validateDataElement=function(e){t.prototype.validateDataElement.call(this,e);var i=e.itemContainer,n=e.marker;e.label;var r=e.valueLabel;i.readerChecked=e.dataContext.visible,e.dataContext.legendDataItem=e;var a=e.label.maxWidth;e.label.width instanceof d||(e.label.width=void 0),a>0&&(e.label.maxWidth=a),"right"==r.align&&(r.width=void 0);var s=e.dataContext.legendSettings,o=e.dataContext;!o.createLegendMarker||this.useDefaultMarker&&o instanceof xr?this.markers.template.propertyFields.fill=void 0:e.childrenCreated||(o.createLegendMarker(n),e.childrenCreated=!0),o.updateLegendValue&&o.updateLegendValue(),o.component&&o.component.updateLegendValue&&o.component.updateLegendValue(o),r.invalid&&r.validate(),""==r.text||null==r.text?r.__disabled=!0:r.__disabled=!1,!s||null==s.itemValueText&&null==s.valueText||(r.__disabled=!1);var l=e.dataContext.visible;void 0===l&&(l=!0),l=y(l),e.dataContext.visible=l,i.events.disableType("toggled"),i.isActive=!l,i.isActive?i.setState("active",0):i.setState("default",0),i.events.enableType("toggled")},e.prototype.afterDraw=function(){var e=this,i=this.getPropertyValue("maxWidth"),n=0;this.labels.each((function(t){t.invalid&&(t.maxWidth=void 0,t.validate()),t.measuredWidth+t.pixelMarginLeft+t.pixelMarginRight>n&&(n=t.measuredWidth+t.pixelMarginLeft+t.pixelMarginRight)}));var r=0;this.valueLabels.each((function(t){t.invalid&&t.validate(),t.measuredWidth+t.pixelMarginLeft+t.pixelMarginRight>r&&(r=t.measuredWidth+t.pixelMarginLeft+t.pixelMarginRight)}));var a=0;this.markers.each((function(t){t.invalid&&t.validate(),t.measuredWidth+t.pixelMarginLeft+t.pixelMarginRight>a&&(a=t.measuredWidth+t.pixelMarginLeft+t.pixelMarginRight)}));var s,o=this.itemContainers.template,l=o.pixelMarginRight+o.pixelMarginLeft,h=n+r+a;D(i)?((i-=l)>h&&(i=h),s=i-a-r):s=n,this.labels.each((function(t){("right"==e.valueLabels.template.align||t.measuredWidth>s)&&(t.width instanceof d||(t.width=Math.min(t.maxWidth,s-t.pixelMarginLeft-t.pixelMarginRight),t.maxWidth=t.width))})),"right"==this.valueLabels.template.align&&this.valueLabels.each((function(t){t.width=r-t.pixelMarginRight-t.pixelMarginLeft})),t.prototype.afterDraw.call(this)},e.prototype.handleScrollbar=function(){var t=this.scrollbar;this.scrollable&&t&&(t.height=this.measuredHeight,t.x=this.measuredWidth-t.pixelWidth-t.pixelMarginLeft,this.contentHeight>this.measuredHeight?(t.visible=!0,t.thumb.height=t.height*this.measuredHeight/this.contentHeight,this.paddingRight=t.pixelWidth+t.pixelMarginLeft+ +t.pixelMarginRight):t.visible=!1,this.updateMasks())},Object.defineProperty(e.prototype,"position",{get:function(){return this.getPropertyValue("position")},set:function(t){this.setPropertyValue("position",t)&&("left"==t||"right"==t?(this.margin(10,5,10,10),this.valign="middle",this.contentAlign="none",this.valueLabels.template.align="right",D(this.maxColumns)||(this.maxColumns=1),this.width=void 0,this.maxWidth=220):(this.maxColumns=void 0,this.width=c(100),this.valueLabels.template.align="left"),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"useDefaultMarker",{get:function(){return this.getPropertyValue("useDefaultMarker")},set:function(t){this.setPropertyValue("useDefaultMarker",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollable",{get:function(){return this.getPropertyValue("scrollable")},set:function(t){if(this.setPropertyValue("scrollable",t,!0))if(t){var e=this.createChild(pa);this.scrollbar=e,e.isMeasured=!1,e.orientation="vertical",e.endGrip.__disabled=!0,e.startGrip.__disabled=!0,e.visible=!1,e.marginLeft=5,this._mouseWheelDisposer=this.events.on("wheel",this.handleWheel,this,!1),this._disposers.push(this._mouseWheelDisposer),this._disposers.push(e.events.on("rangechanged",this.updateMasks,this,!1))}else this._mouseWheelDisposer&&(this._mouseWheelDisposer.dispose(),this.scrollbar&&(this.scrollbar.dispose(),this.scrollbar=void 0))},enumerable:!0,configurable:!0}),e.prototype.handleWheel=function(t){var e=t.shift.y,i=this.scrollbar;if(i){var n=e/1e3*this.measuredHeight/this.contentHeight,r=i.end-i.start;e>0?(i.start=N(0,i.start-n),i.end=i.start+r):(i.end=H(1,i.end-n),i.start=i.end-r)}},e.prototype.updateMasks=function(){var t=this;this.scrollbar&&this.itemContainers.each((function(e){e.dy=-t.scrollbar.thumb.pixelY*t.contentHeight/t.measuredHeight,e.maskRectangle={x:0,y:-e.dy,width:t.measuredWidth,height:t.measuredHeight}}))},e.prototype.toggleDataItem=function(t){var e=t.dataContext;!e.visible||e.isHiding||e instanceof xr&&e.isHidden?(t.color=t.colorOrig,e.appeared=!0,t.itemContainer.isActive=!1,!0===e.hidden&&(e.hidden=!1),e.show?e.show():e.visible=!0,this.svgContainer.readerAlert(this.language.translate("%1 shown",this.language.locale,t.label.readerTitle))):(t.itemContainer.isActive=!0,e.appeared=!0,e.hide?e.hide():e.visible=!1,this.svgContainer.readerAlert(this.language.translate("%1 hidden",this.language.locale,t.label.readerTitle)),t.color=(new bn).getFor("disabledBackground"))},Object.defineProperty(e.prototype,"preloader",{get:function(){},enumerable:!0,configurable:!0}),e.prototype.handleDataItemPropertyChange=function(t,e){t.valueLabel.invalidate(),t.label.invalidate()},e}(jr);se.registeredClasses.Legend=ss,Mr.push({relevant:Vr.widthXS,state:function(t,e){if(t instanceof ss&&("left"==t.position||"right"==t.position)){var i=t.states.create(e);return i.properties.position="bottom",i}return null}}),Mr.push({relevant:Vr.heightXS,state:function(t,e){if(t instanceof ss&&("top"==t.position||"bottom"==t.position)){var i=t.states.create(e);return i.properties.position="right",i}return null}}),Mr.push({relevant:Vr.isXS,state:function(t,e){if(t instanceof ss){var i=t.states.create(e);return i.properties.disabled=!0,i}return null}});var os=function(t){function e(){var e=t.call(this)||this;return e.className="SeriesDataItem",e.values.value={},e.values.value={},e.applyTheme(),e}return a(e,t),Object.defineProperty(e.prototype,"bullets",{get:function(){return this._bullets||(this._bullets=new ne,this._disposers.push(new ie(this._bullets))),this._bullets},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.bullets.clear(),t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"value",{get:function(){return this.values.value.value},set:function(t){this.setValue("value",t)},enumerable:!0,configurable:!0}),e}(Fr),ls=function(t){function e(){var i=t.call(this)||this;if(i._ignoreMinMax=!1,i._showBullets=!0,i.legendSettings=new as,i._tmin=new ne,i._tmax=new ne,i._smin=new ne,i._smax=new ne,i.dataItemsByAxis=new ne,i.skipFocusThreshold=20,i._itemReaderTextChanged=!1,i.calculatePercent=!1,i.usePercentHack=!0,i.autoDispose=!0,i.simplifiedProcessing=!1,i.constructor===e)throw new Error("'Series' cannot be instantiated directly. Please use a specific series type.");i.className="Series",i.isMeasured=!1,i.layout="none",i.shouldClone=!1,i.setPropertyValue("hidden",!1),i.axisRanges=new pe,i.axisRanges.events.on("inserted",i.processAxisRange,i,!1),i.minBulletDistance=0,i.mainContainer=i.createChild(Pr),i.mainContainer.shouldClone=!1,i.mainContainer.mask=i.createChild(xr),i._disposers.push(i.mainContainer);var n=i.mainContainer.createChild(Pr);return i._shouldBeReady.push(n),n.shouldClone=!1,n.layout="none",n.virtualParent=i,i._disposers.push(n),i.bulletsContainer=n,i.tooltip=new ga,i.tooltip.virtualParent=i,i._disposers.push(i.tooltip),i.hiddenState.transitionEasing=Mi,i.dataItem=i.createDataItem(),i._disposers.push(i.dataItem),i.dataItem.component=i,i.role="group",i.applyTheme(),i}return a(e,t),e.prototype.applyTheme=function(){t.prototype.applyTheme.call(this),Yi.autoSetClassName&&this.bulletsContainer&&(this.bulletsContainer.className=this.className+"-bullets",this.bulletsContainer.setClassName())},e.prototype.applyInternalDefaults=function(){t.prototype.applyInternalDefaults.call(this),_(this.readerTitle)||(this.readerTitle=this.language.translate("Series"))},e.prototype.createDataItem=function(){return new os},Object.defineProperty(e.prototype,"chart",{get:function(){return this._chart},set:function(t){this._chart=t},enumerable:!0,configurable:!0}),e.prototype.positionBullet=function(t){},e.prototype.processBullet=function(t){var e=this,i=t.newValue;i.isTemplate=!0,this.events.once("datavalidated",(function(t){e.itemsFocusable()&&(i.focusable=!0)})),this.invalidate()},e.prototype.removeBullet=function(t){var e=t.oldValue;this.dataItems.each((function(t){var i=t.bullets.getKey(e.uid);i&&i.dispose()})),this.invalidate()},e.prototype.validateDataItems=function(){t.prototype.validateDataItems.call(this),this.processValues(!1)},e.prototype.getFirstValue=function(t,e){for(var i=e;i>=0;i--){var n=this.dataItems.getIndex(i).getActualWorkingValue(t);if(D(n))return n}return null},e.prototype.getAbsoluteFirstValue=function(t){for(var e=0;e0){var g=i.getIndex(c-1);Nt(g.values,(function(t,e){var i=g.getActualWorkingValue(t);D(i)&&(p[t]=i)}))}for(var m=function(t){var f=i.getIndex(t);Nt(f.values,(function(t,i){var g=f.getActualWorkingValue(t);if(D(g)){D(n[t])||(n[t]=0),n[t]++,D(r[t])||(r[t]=0),r[t]+=g,D(a[t])||(a[t]=0),a[t]+=Math.abs(g),D(l[t])||(l[t]=g),h[t]=g,D(s[t])?s[t]>g&&(s[t]=g):s[t]=g,D(o[t])?o[t]0){e.usePercentHack&&r==i&&(i=n.values[t].value);var s=r/i*100;n.setCalculatedValue(t,s,"percent")}else n.setCalculatedValue(t,0,"percent")}))};for(y=c;y0){var b=i.getIndex(c-1);Nt(b.values,(function(t){var e=b.values[t].value;b.setCalculatedValue(t,e-l[t],"change"),b.setCalculatedValue(t,(e-l[t])/l[t]*100,"changePercent")}))}var x=this.dataItem;Nt(x.values,(function(t){x.setCalculatedValue(t,r[t],"sum"),x.setCalculatedValue(t,a[t],"absoluteSum"),x.setCalculatedValue(t,r[t]/n[t],"average"),x.setCalculatedValue(t,l[t],"open"),x.setCalculatedValue(t,h[t],"close"),x.setCalculatedValue(t,s[t],"low"),x.setCalculatedValue(t,o[t],"high"),x.setCalculatedValue(t,n[t],"count")}))}},e.prototype.validate=function(){Oi()&&this.filters.clear(),Kt(this.axisRanges.iterator(),(function(t){t.validate()})),t.prototype.validate.call(this);var e=this.bulletsContainer;if(e.fill=this.fill,e.stroke=this.stroke,e.x=this.pixelX,e.y=this.pixelY,this.bulletsContainer.children.length>0)if(this._showBullets){for(var i=0;ithis.endIndex;i--){var n;(n=this.dataItems.getIndex(i))&&n.bullets.each((function(t,e){e.__disabled=!0}))}}else this.bulletsContainer.children.each((function(t){t.__disabled=!0}));this.updateTooltipBounds()},e.prototype.updateTooltipBounds=function(){if(this.topParent){var t={x:0,y:0,width:this.topParent.maxWidth,height:this.topParent.maxHeight};this.tooltip.setBounds(t)}},e.prototype.shouldCreateBullet=function(t,e){return!0},e.prototype.validateDataElement=function(e){var i=this;t.prototype.validateDataElement.call(this,e),this._showBullets?(this.isHidden||(this.bulletsContainer.visible=!0),this.bullets.each((function(t){var n=e.bullets.getKey(t.uid);if(i.shouldCreateBullet(e,t)){if(!n){var r=t.propertyFields.disabled,a=e.dataContext;r&&a&&!1===a[r]?(t.applyOnClones=!1,t.disabled=!1,n=t.clone(),t.disabled=!0,t.applyOnClones=!0):n=t.clone(),n.shouldClone=!1,e.addSprite(n),i.visible&&!i.isHiding||n.hide(0)}var s=n.dataItem;if(s!=e){s&&s.bullets.setKey(t.uid,void 0);var o=i.itemReaderText;n instanceof ns&&(o||(o="{"+n.xField+"}: {"+n.yField+"}"),n.isDynamic&&(e.events.on("workingvaluechanged",n.deepInvalidate,n,!1),i.dataItem.events.on("workingvaluechanged",n.deepInvalidate,n,!1)),n.deepInvalidate()),n.focusable&&(n.events.on("focus",(function(t){n.readerTitle=i.populateString(o,n.dataItem)}),void 0,!1),n.events.on("blur",(function(t){n.readerTitle=""}),void 0,!1)),n.hoverable&&(n.events.on("over",(function(t){n.readerTitle=i.populateString(o,n.dataItem)}),void 0,!1),n.events.on("out",(function(t){n.readerTitle=""}),void 0,!1))}n.parent=i.bulletsContainer,e.bullets.setKey(t.uid,n),n.maxWidth=e.itemWidth,n.maxHeight=e.itemHeight,n.__disabled=!1,i.positionBullet(n)}else n&&(n.__disabled=!0)}))):this.bulletsContainer.visible=!1},e.prototype.handleDataItemWorkingValueChange=function(t,e){this.dataRangeInvalid||this.invalidateProcessedData()},Object.defineProperty(e.prototype,"ignoreMinMax",{get:function(){return this._ignoreMinMax},set:function(t){this._ignoreMinMax=t,this.invalidateDataItems()},enumerable:!0,configurable:!0}),e.prototype.createMask=function(){},e.prototype.processAxisRange=function(t){this.rangesContainer||(this.rangesContainer=this.createChild(Pr),this.rangesContainer.shouldClone=!1,this.rangesContainer.isMeasured=!1);var e=t.newValue;e&&(e.contents.parent=this.rangesContainer,e.isRange=!0,e.events.on("valuechanged",this.invalidateDataItems,this,!1))},e.prototype.getAxisField=function(t){},e.prototype.showTooltipAtPosition=function(t,e){},Object.defineProperty(e.prototype,"minBulletDistance",{get:function(){return this.getPropertyValue("minBulletDistance")},set:function(t){this.setPropertyValue("minBulletDistance",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bullets",{get:function(){return this._bullets||(this._bullets=new ue(new ns),this._bullets.template.virtualParent=this,this._bullets.events.on("inserted",this.processBullet,this,!1),this._bullets.events.on("removed",this.removeBullet,this,!1),this._disposers.push(new le(this._bullets)),this._disposers.push(this._bullets.template)),this._bullets},enumerable:!0,configurable:!0}),e.prototype.createLegendMarker=function(t){},Object.defineProperty(e.prototype,"hiddenInLegend",{get:function(){return this.getPropertyValue("hiddenInLegend")},set:function(t){this.setPropertyValue("hiddenInLegend",t)&&this.chart&&this.chart.feedLegend()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this.getPropertyValue("name")},set:function(t){this.setPropertyValue("name",t);var e=this.legendDataItem;e&&(e.component.invalidate(),e.component.invalidateRawData()),this.readerTitle=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"itemReaderText",{get:function(){var t=this._itemReaderText;return t||(this.tooltipText?t=ii(this.tooltipText):this.tooltipHTML&&(t=ii(this.tooltipHTML))),this._adapterO?this._adapterO.apply("itemReaderText",t):t},set:function(t){this._itemReaderText=t,this._itemReaderTextChanged=!0},enumerable:!0,configurable:!0}),e.prototype.itemsFocusable=function(){return!(this.dataItems.length>=this.skipFocusThreshold)},Object.defineProperty(e.prototype,"legendDataItem",{get:function(){return this._legendDataItem},set:function(t){this._legendDataItem=t,this._legendDataItem.itemContainer.deepInvalidate()},enumerable:!0,configurable:!0}),e.prototype.updateLegendValue=function(t,e){if(this.legendDataItem){var i=this.legendSettings,n=this.legendDataItem,r=n.label,a=n.valueLabel;t&&!t.isDisposed()||e?(a&&(i.itemValueText&&(a.text=i.itemValueText),a.dataItem=t),r&&(i.itemLabelText&&(r.text=i.itemLabelText),r.dataItem=t)):(r&&((i.labelText||null!=i.itemLabelText)&&(r.text=i.labelText),r.dataItem=this.dataItem),a&&((i.valueText||null!=i.itemValueText)&&(a.text=i.valueText),a.dataItem=this.dataItem))}},e.prototype.copyFrom=function(e){this.bullets.copyFrom(e.bullets),this.bulletsContainer.copyFrom(e.bulletsContainer),this.calculatePercent=e.calculatePercent,this.usePercentHack=e.usePercentHack,this.simplifiedProcessing=e.simplifiedProcessing,t.prototype.copyFrom.call(this,e)},e.prototype.raiseCriticalError=function(t){this._chart&&this._chart.modal&&(this._chart.modal.content=this._chart.adapter.apply("criticalError",t).message,this._chart.modal.closable=!1,Yi.suppressErrors||this._chart.modal.open(),this._chart.disabled=!0),Yi.verbose&&console.log(t)},e.prototype.applyFilters=function(){var e=this;t.prototype.applyFilters.call(this),this.bulletsContainer.filters.clear(),Kt(this.filters.iterator(),(function(t){e.bulletsContainer.filters.push(t.clone())}))},Object.defineProperty(e.prototype,"heatRules",{get:function(){var t=this;return this._heatRules||(this._heatRules=new pe,this._heatRules.events.on("inserted",(function(e){var i=e.newValue,n=i.target;if(n){var r=i.dataField;_(r)||(r="value");var a=t.dataItem,s=i.property,o=v(i.minValue),l=v(i.maxValue);D(o)||D(l)||t.dataItem.events.on("calculatedvaluechanged",(function(e){e.property==r&&Kt(t.dataItems.iterator(),(function(t){var e=!1;pt(t.sprites,(function(t){if(t.clonedFrom==n){var i=t;i[s]=i[s],e=!0}})),e||pt(t.sprites,(function(t){t instanceof Pr&&Kt(t.children.iterator(),(function(t){if(t.className==n.className){var e=t;e[s]=e[s]}else t instanceof Pr&&t.deepInvalidate()}))}))}))})),t.dataItems.template.events.on("workingvaluechanged",(function(t){if(t.property==r){var e=t.target,i=!1;pt(e.sprites,(function(t){if(t.clonedFrom==n){var e=t;e[s]=e[s],i=!0}})),i||pt(e.sprites,(function(t){t instanceof Pr&&Kt(t.children.iterator(),(function(t){if(t.className==n.className){var e=t;e[s]=e[s]}else t instanceof Pr&&t.deepInvalidate()}))}))}})),n.adapter.add(s,(function(t,e,n){var s=v(i.minValue),o=v(i.maxValue),l=i.min,h=i.max;if(e instanceof xr){var p=e.propertyFields[n];if(p&&e.dataItem){var u=e.dataItem.dataContext;if(u&&_(u[p]))return t}}var d=e.dataItem;if((D(s)||(s=a.values[r].low),D(o)||(o=a.values[r].high),d)&&d.values[r]){var c=d.getActualWorkingValue(r);if(_(l)&&_(h)&&D(s)&&D(o)&&D(c)){var f=void 0;if(f=i.logarithmic?(Math.log(c)*Math.LOG10E-Math.log(s)*Math.LOG10E)/(Math.log(o)*Math.LOG10E-Math.log(s)*Math.LOG10E):(c-s)/(o-s),!D(c)||D(f)&&Math.abs(f)!=1/0||(f=.5),D(l))return l+(h-l)*f;if(l instanceof Ie)return new Ie(Ce(l.rgb,h.rgb,f))}}return t}))}}))),this._heatRules},enumerable:!0,configurable:!0}),e.prototype.processConfig=function(e){var i;if(e){if(_(e.bullets)&&I(e.bullets))for(var n=0,r=e.bullets.length;n=0;r--){var a=n.getIndex(r);a&&a.dataContext==e&&i.dataItems.remove(a)}for(r=i.data.length-1;r>=0;r--){var s=i.data[r];s&&s==e&&dt(i.data,s)}}},e.prototype.handleSeriesAdded=function(t){var e=this,i=t.newValue;i.isDisposed()||(i.chart=this,i.parent=this.seriesContainer,i.bulletsContainer.parent=this.bulletsContainer,this._dataUsers.moveValue(i),i.addDisposer(new Pt((function(){e.dataUsers.removeValue(i)}))),this.handleSeriesAdded2(i),this.handleLegendSeriesAdded(i))},e.prototype.handleLegendSeriesAdded=function(t){t.hiddenInLegend||this.legend&&this.legend.addData(t)},e.prototype.handleSeriesAdded2=function(t){var e=this;this.dataInvalid||this._disposers.push(se.events.once("exitframe",(function(){t.data&&0!=t.data.length||(t.data=e.data,t.showOnInit&&(t.reinit(),t.setPropertyValue("showOnInit",!1),t.showOnInit=!0),t.isDisposed()||t.events.once("datavalidated",(function(){t.data==e.data&&(t._data=[])})))})))},e.prototype.feedLegend=function(){var t=this.legend;if(t){var e=[];Kt(this.series.iterator(),(function(t){t.hiddenInLegend||e.push(t)})),t.dataFields.name="name",t.data=e}},e.prototype.createSeries=function(){return new ls},Object.defineProperty(e.prototype,"colors",{get:function(){return this.getPropertyValue("colors")},set:function(t){this.setPropertyValue("colors",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"patterns",{get:function(){return this.getPropertyValue("patterns")},set:function(t){this.setPropertyValue("patterns",t,!0)},enumerable:!0,configurable:!0}),e.prototype.copyFrom=function(e){t.prototype.copyFrom.call(this,e),this.series.copyFrom(e.series)},e.prototype.appear=function(){t.prototype.appear.call(this),this.series.each((function(t){t.showOnInit&&t.inited&&t.appear()}))},e}(is);se.registeredClasses.SerialChart=ps;var us=function(t){function e(){var e=t.call(this)||this;e._axis=new Ct,e.dataItems=new pe,e.className="AxisBreak",e.breakSize=.01,e.marginLeft=-5,e.marginRight=-5,e.marginTop=-5,e.marginBottom=-5;var i=new bn,n=new Sa;n.fill=i.getFor("background"),n.stroke=ke(),n.fillOpacity=.9,n.zIndex=0,e._fillShape=n;var r=new Sa;r.fill=ke(),r.stroke=i.getFor("grid"),r.strokeOpacity=.3,r.zIndex=1,e._startLine=r;var a=new Sa;return a.fill=ke(),a.stroke=ke("#000000"),a.strokeOpacity=.3,a.zIndex=2,e._endLine=a,e._disposers.push(e._axis),e.applyTheme(),e}return a(e,t),e.prototype.dispose=function(){t.prototype.dispose.call(this),this._fillShape&&this._fillShape.dispose(),this._startLine&&this._startLine.dispose(),this._endLine&&this._endLine.dispose()},Object.defineProperty(e.prototype,"startLine",{get:function(){return this._startLine},set:function(t){this._startLine&&this._startLine.dispose(),this._startLine=t,this.addBreakSprite(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endLine",{get:function(){return this._endLine},set:function(t){this._endLine&&this._endLine.dispose(),this._endLine=t,this.addBreakSprite(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fillShape",{get:function(){return this._fillShape},set:function(t){this._fillShape&&this._fillShape.dispose(),this._fillShape=t,this.addBreakSprite(t)},enumerable:!0,configurable:!0}),e.prototype.addBreakSprite=function(t){t.parent=this,t.isMeasured=!1,this._disposers.push(t)},Object.defineProperty(e.prototype,"axis",{get:function(){return this._axis.get()},set:function(t){if(this._axis.get()!==t){this._axis.set(t,t.renderer.gridContainer.events.on("transformed",this.invalidate,this,!1)),t.renderer.createBreakSprites(this);var e=t.axisBreaks.template;this.startLine.copyFrom(e.startLine),this.endLine.copyFrom(e.endLine),this.fillShape.copyFrom(e.fillShape)}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"breakSize",{get:function(){return this.getPropertyValue("breakSize")},set:function(t){this.setPropertyValue("breakSize",t)&&this.axis&&(this.axis.invalidate(),this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startPoint",{get:function(){var t=this.axis.renderer;if(t)return t.positionToPoint(this.startPosition)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endPoint",{get:function(){var t=this.axis.renderer;if(t)return t.positionToPoint(this.endPosition)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startPosition",{get:function(){},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endPosition",{get:function(){},enumerable:!0,configurable:!0}),e.prototype.draw=function(){(t.prototype.draw.call(this),this.axis)&&this.axis.renderer.updateBreakElement(this)},Object.defineProperty(e.prototype,"startValue",{get:function(){return this.getPropertyValue("startValue")},set:function(t){this.setPropertyValue("startValue",t)&&this.axis&&(this.axis.invalidate(),this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endValue",{get:function(){return this.getPropertyValue("endValue")},set:function(t){this.setPropertyValue("endValue",t)&&this.axis&&(this.axis.invalidate(),this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),e}(Pr);se.registeredClasses.AxisBreak=us;var ds,cs=function(t){function e(){var e=t.call(this)||this;return e.className="AxisDataItem",e.applyTheme(),e}return a(e,t),Object.defineProperty(e.prototype,"grid",{get:function(){if(!this._grid){var t=this.component;if(t){var e,i=void 0;if(this.isRange){if((i=t.axisRanges.template.grid).disabled)return;e=i.clone()}else{if((i=t.renderer.grid.template).disabled)return;e=t.renderer.grid.create(),this._disposers.push(new Pt((function(){t.renderer.grid.removeValue(e)})))}this.grid=e,e.shouldClone=!1,this._disposers.push(e),e.axis=this.component}}return this._grid},set:function(t){this._grid&&this._grid!=t&&(dt(this.sprites,this._grid),this._grid.dataItem=void 0),t&&(t.dataItem&&t.dataItem!=this&&(dt(t.dataItem.sprites,t),t.dataItem.grid=void 0),this.addSprite(t)),this._grid=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tick",{get:function(){if(!this._tick){var t=this.component;if(t){var e,i=void 0;if(this.isRange){if((i=t.axisRanges.template.tick).disabled)return;e=i.clone()}else{if((i=t.renderer.ticks.template).disabled)return;e=t.renderer.ticks.create(),this._disposers.push(new Pt((function(){t.renderer.ticks.removeValue(e)})))}this.tick=e,e.axis=this.component,e.shouldClone=!1,this._disposers.push(e)}}return this._tick},set:function(t){this._tick&&this._tick!=t&&(dt(this.sprites,this._tick),this._tick.dataItem=void 0),t&&(t.dataItem&&t.dataItem!=this&&(dt(t.dataItem.sprites,t),t.dataItem.tick=void 0),this.addSprite(t)),this._tick=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){if(!this._label){var t=this.component;if(t){var e,i=void 0;if(this.isRange){if((i=t.axisRanges.template.label).disabled)return;e=i.clone()}else{if((i=t.renderer.labels.template).disabled)return;e=t.renderer.labels.create(),this._disposers.push(new Pt((function(){t.renderer.labels.removeValue(e)})))}this._disposers.push(e),this.label=e,e.shouldClone=!1,e.axis=this.component,e.virtualParent=t}}return this._label},set:function(t){this._label&&this._label!=t&&(dt(this.sprites,this._label),this._label.dataItem=void 0),t&&(t.dataItem&&t.dataItem!=this&&(dt(t.dataItem.sprites,t),t.dataItem.label=void 0),this.addSprite(t)),this._label=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"axisFill",{get:function(){if(!this._axisFill){var t=this.component;if(t){var e,i=void 0;if(this.isRange){if(i=t.axisRanges.template.axisFill,!this.isTemplate&&i.disabled)return;e=i.clone()}else{if((i=t.renderer.axisFills.template).disabled)return;e=t.renderer.axisFills.create(),this._disposers.push(new Pt((function(){t.renderer.axisFills.removeValue(e)})))}this.axisFill=e,e.shouldClone=!1,this._disposers.push(e)}}return this._axisFill},set:function(t){this._axisFill&&this._axisFill!=t&&(dt(this.sprites,this._axisFill),this._axisFill.dataItem=void 0),t&&(t.dataItem&&t.dataItem!=this&&(dt(t.dataItem.sprites,t),t.dataItem.axisFill=void 0),t.axis=this.component,this.addSprite(t)),this._axisFill=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return this._text},set:function(t){this._text=t,this._label&&(this._label.text=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mask",{get:function(){return this._mask},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contents",{get:function(){if(!this._contents){var t=new Pr;this.addSprite(t),t.isMeasured=!1,this._contents=t;var e=this.component;if(e){var i=e.renderer.createFill(this.component);i.disabled=!1,i.axis=e,this.addSprite(i),this._mask=i,t.mask=i}}return this._contents},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"axisBreak",{get:function(){return this._axisBreak},set:function(t){this._axisBreak&&this._axisBreak.dataItems.removeValue(this),t&&t.dataItems.push(this),this._axisBreak=t},enumerable:!0,configurable:!0}),e.prototype.validate=function(){this.component&&this.component.validateDataElement(this)},e.prototype.appendChildren=function(){this.component&&this.component.appendDataItem(this)},e.prototype.hasProperty=function(e){return"component"==e||t.prototype.hasProperty.call(this,e)},e.prototype.copyFrom=function(e){t.prototype.copyFrom.call(this,e),this.text=e.text,e.bullet&&(this.bullet=e.bullet.clone()),this.minPosition=e.minPosition,this.maxPosition=e.maxPosition},e.prototype.setVisibility=function(e,i){t.prototype.setVisibility.call(this,e,i),this._contents&&(this._contents.visible=e)},Object.defineProperty(e.prototype,"bullet",{get:function(){return this._bullet},set:function(t){this._bullet&&this._bullet!=t&&(dt(this.sprites,this._bullet),this._bullet.dataItem=void 0),this._bullet=t,t&&this.addSprite(t)},enumerable:!0,configurable:!0}),e}(Fr);!function(t){t[t.Start=0]="Start",t[t.Middle=.5]="Middle",t[t.End=1]="End"}(ds||(ds={}));var fs=function(t){function e(){var i=t.call(this)||this;if(i._gridCount=10,i._series=new pe,i.autoDispose=!0,i._axisItemCount=0,i.constructor===e)throw new Error("'Axis' cannot be instantiated directly. Please use a specific axis type.");i.hideTooltipWhileZooming=!0,i.minWidth=1e-4,i.minHeight=1e-4,i.className="Axis",i.shouldClone=!1,i.setPropertyValue("cursorTooltipEnabled",!0),i.toggleZoomOutButton=!0,i.zoomable=!0;var n=new bn;i.title=new Lr,i.title.shouldClone=!1,i._disposers.push(i.title),i.setPropertyValue("startLocation",0),i.setPropertyValue("endLocation",1),i._dataItemsIterator=new Qt(i.dataItems,(function(){return i.dataItems.create()})),i._dataItemsIterator.createNewItems=!0;var r=new ga;i._disposers.push(r),r.label.padding(5,10,5,10),r.background.pointerLength=5,r.fitPointerToBounds=!0,r.background.filters.clear(),r.virtualParent=i;var a=r.background;return a.cornerRadius=0,a.fill=n.getFor("alternativeBackground"),a.stroke=a.fill,a.strokeWidth=1,a.fillOpacity=1,r.label.fill=n.getFor("alternativeText"),i.tooltip=r,i.readerHidden=!0,i.events.on("rangechangestarted",(function(){i.series.each((function(t){t.hideTooltipWhileZooming&&(t.tooltip.hide(),t.tooltip.preventShow=!0)})),i.hideTooltipWhileZooming&&(i.tooltip.hide(),i.tooltip.preventShow=!0)}),void 0,!1),i.events.on("rangechangeended",(function(){i.series.each((function(t){t.hideTooltipWhileZooming&&(t.tooltip.hide(),t.tooltip.preventShow=!1)})),i.hideTooltipWhileZooming&&(i.tooltip.hide(),i.tooltip.preventShow=!1)}),void 0,!1),i.applyTheme(),i}return a(e,t),e.prototype.fillRule=function(t,e){D(e)||(e=t.index),e/2==Math.round(e/2)?(t.axisFill.__disabled=!0,t.axisFill.opacity=0):(t.axisFill.opacity=1,t.axisFill.__disabled=!1)},e.prototype.createDataItem=function(){return new cs},e.prototype.invalidateLayout=function(){t.prototype.invalidateLayout.call(this),Kt(this.series.iterator(),(function(t){t.invalidateLayout()}))},e.prototype.invalidateSeries=function(){Kt(this.series.iterator(),(function(t){t.invalidate()}))},e.prototype.validateDataElements=function(){this._axisItemCount=0,this.ghostLabel&&(this.renderer.updateLabelElement(this.ghostLabel,this.start,this.end),this.ghostLabel.validate())},e.prototype.updateGridCount=function(){if(this.renderer){var t=this.axisLength/this.renderer.minGridDistance;t!=this._gridCount&&(this._gridCount=t,this.clearCache())}},e.prototype.validateLayout=function(){this.axisFullLength=this.axisLength/(this.end-this.start),t.prototype.validateLayout.call(this),this.updateGridCount();var e=this.renderer;e&&(e.updateAxisLine(),e.updateTooltip(),e.updateBaseGridElement()),this._prevLength!=this.axisLength&&(this.dispatchImmediately("lengthchanged"),this._prevLength=this.axisLength)},e.prototype.initRenderer=function(){},e.prototype.appendDataItem=function(t){var e=this.renderer,i=t.tick;i&&(i.above?i.parent=e.bulletsContainer:i.parent=e.gridContainer),t.label&&(t.label.parent=e);var n=t.axisFill;n&&(n.above?n.parent=e.bulletsContainer:n.parent=e.gridContainer);var r=t.grid;r&&(r.above?r.parent=e.bulletsContainer:r.parent=e.gridContainer),t.bullet&&(t.bullet.parent=e.bulletsContainer)},e.prototype.validate=function(){t.prototype.validate.call(this),this.validateLayout(),this.renderer.updateGridContainer()},e.prototype.validateAxisRanges=function(){var t=this;Kt(this.axisRanges.iterator(),(function(e){t.appendDataItem(e),t.validateDataElement(e),e.grid&&e.grid.validate(),e.tick&&e.tick.validate(),e.axisFill&&e.axisFill.validate(),e.label&&e.label.validate()}))},e.prototype.validateBreaks=function(){this._axisBreaks&&Kt(this._axisBreaks.iterator(),(function(t){t.invalidate()}))},e.prototype.processBreak=function(t){var e=t.newValue;e.parent=this.renderer.breakContainer,e.axis=this},e.prototype.registerSeries=function(t){var e=this;return this.series.moveValue(t),new wt([new Pt((function(){e.series.removeValue(t)})),this.events.on("lengthchanged",t.invalidate,t,!1),this.events.on("lengthchanged",t.createMask,t,!1),this.events.on("startchanged",t.invalidate,t,!1),this.events.on("endchanged",t.invalidate,t,!1)])},Object.defineProperty(e.prototype,"renderer",{get:function(){return this._renderer},set:function(t){if(t!=this._renderer){this._renderer=t,t.chart=this.chart,t.axis=this,t.parent=this,this.title.parent=this,this.initRenderer(),this._disposers.push(t.gridContainer.events.on("maxsizechanged",this.invalidate,this,!1));var e=this.renderer.labels.create();this._disposers.push(e),e.dataItem=this.dataItems.template.clone(),e.text="L",e.parent=this.renderer,e.shouldClone=!1,e.fillOpacity=0,e.opacity=0,e.strokeOpacity=0,e.interactionsEnabled=!1,e.validate(),this.ghostLabel=e,this.events.on("beforedatavalidated",(function(){e.text="L"}),void 0,!1)}},enumerable:!0,configurable:!0}),e.prototype.positionToAngle=function(t){return this.renderer.positionToAngle(t)},e.prototype.pointToPosition=function(t){return this.renderer.pointToPosition(t)},e.prototype.positionToCoordinate=function(t){return this.renderer.positionToCoordinate(t)},e.prototype.getAnyRangePath=function(t,e){return this.renderer.getPositionRangePath(t,e)},e.prototype.anyToPosition=function(t){return 0},e.prototype.anyToPoint=function(t){return{x:0,y:0,angle:0}},e.prototype.getPositionRangePath=function(t,e){return this.renderer?this.renderer.getPositionRangePath(t,e):""},Object.defineProperty(e.prototype,"axisLength",{get:function(){return this.renderer?this.renderer.axisLength:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cursorTooltipEnabled",{get:function(){return this.getPropertyValue("cursorTooltipEnabled")},set:function(t){this.setPropertyValue("cursorTooltipEnabled",t)&&(t&&this.renderer?this.renderer.updateTooltip():this.tooltip&&this.tooltip.hide(0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"toggleZoomOutButton",{get:function(){return this.getPropertyValue("toggleZoomOutButton")},set:function(t){this.setPropertyValue("toggleZoomOutButton",t)},enumerable:!0,configurable:!0}),e.prototype.hideTooltip=function(e){t.prototype.hideTooltip.call(this,e),this._tooltipPosition=void 0},e.prototype.showTooltipAtPosition=function(t,e){var i=this._tooltip;if(!i||this.dataItems.length<=0)this._tooltipPosition=void 0;else{if(e||(t=this.toAxisPosition(t)),!D(t)||tthis.end)return i.hide(0),void(this._tooltipPosition=void 0);var n=this.renderer;i.parent||(i.parent=this.tooltipContainer);var r=n.tooltipLocation,a=this.getCellStartPosition(t),s=this.getCellEndPosition(t);if("fixed"==this.tooltipPosition&&(t=a+(s-a)*r),t=L(t,this.start,this.end),this._tooltipPosition!=t){this._tooltipPosition=t;var o=n.tooltipLocation2,l=n.positionToPoint(a,o),h=n.positionToPoint(s,o);this.currentItemStartPoint=l,this.currentItemEndPoint=h,n.fullWidthTooltip&&(i.width=h.x-l.x,i.height=h.y-l.y);var p=ci(n.positionToPoint(t,o),this.renderer.line);i.text=this.getTooltipText(t),i.text&&(i.delayedPointTo(p),i.show())}this.cursorTooltipEnabled&&!this.tooltip.disabled||i.hide(0)}},e.prototype.toAxisPosition=function(t){if(null!=(t=this.renderer.toAxisPosition(t)))return t*=this.end-this.start,t=this.renderer.inversed?this.end-t:this.start+t},e.prototype.toGlobalPosition=function(t){return this.renderer.inversed?t=this.end-t:t-=this.start,t/(this.end-this.start)},e.prototype.getTooltipText=function(t){},e.prototype.updateTooltip=function(t,e){var i=this._tooltip;i&&(i.fixDoc=!1,i.pointerOrientation=t,i.setBounds(gi(e,this.renderer.line)))},e.prototype.roundPosition=function(t,e,i){return t},e.prototype.getCellStartPosition=function(t){return t},e.prototype.getCellEndPosition=function(t){return t},Object.defineProperty(e.prototype,"axisRanges",{get:function(){if(!this._axisRanges){var t=this.createDataItem();t.isRange=!0,t.axisFill=this.renderer.axisFills.template.clone(),t.grid=this.renderer.grid.template.clone(),t.tick=this.renderer.ticks.template.clone(),t.label=this.renderer.labels.template.clone(),t.isTemplate=!0,t.component=this,t.axisFill.disabled=!1,t.tick.disabled=!1,t.grid.disabled=!1,t.label.disabled=!1,this._axisRanges=new ue(t),this._axisRanges.events.on("inserted",this.processAxisRange,this,!1),this._disposers.push(new le(this._axisRanges)),this._disposers.push(this._axisRanges.template)}return this._axisRanges},enumerable:!0,configurable:!0}),e.prototype.processAxisRange=function(t){var e=t.newValue;e.component=this,e.isRange=!0},Object.defineProperty(e.prototype,"axisBreaks",{get:function(){return this._axisBreaks||(this._axisBreaks=new ge(this.createAxisBreak(),(function(t,e){return me(t.adjustedStartValue,e.adjustedStartValue)})),this._axisBreaks.events.on("inserted",this.processBreak,this,!1),this._disposers.push(new le(this._axisBreaks)),this._disposers.push(this._axisBreaks.template)),this._axisBreaks},enumerable:!0,configurable:!0}),e.prototype.createAxisBreak=function(){return new us},Object.defineProperty(e.prototype,"series",{get:function(){return this._series||(this._series=new pe),this._series},enumerable:!0,configurable:!0}),e.prototype.processSeriesDataItems=function(){},e.prototype.processSeriesDataItem=function(t,e){},e.prototype.postProcessSeriesDataItems=function(t){},e.prototype.postProcessSeriesDataItem=function(t){},e.prototype.updateAxisBySeries=function(){},e.prototype.hideUnusedDataItems=function(){var t=this,e=this._dataItemsIterator;e.createNewItems=!1,Kt(e.iterator(),(function(e){t.validateDataElement(e),e.__disabled=!0})),e.clear(),e.createNewItems=!0},e.prototype.getSeriesDataItem=function(t,e,i){},e.prototype.getAngle=function(t,e,i,n,r){},e.prototype.getX=function(t,e,i,n,r){},e.prototype.getPositionX=function(t,e,i,n,r){},e.prototype.getY=function(t,e,i,n,r){},e.prototype.getPositionY=function(t,e,i,n,r){},Object.defineProperty(e.prototype,"basePoint",{get:function(){return{x:0,y:0}},enumerable:!0,configurable:!0}),e.prototype.dataChangeUpdate=function(){},e.prototype.seriesDataChangeUpdate=function(t){},e.prototype.adjustDifference=function(t,e){var i=e-t;if(D(i))return this._axisBreaks&&Gt(this._axisBreaks.iterator(),(function(n){var r,a,s,o,l,h,p,u,d=n.adjustedStartValue,c=n.adjustedEndValue;if(D(d)&&D(c)){if(d>e)return!1;if(c>=t&&D(d)&&D(c)){var f=n.breakSize,g=(a={start:t,end:e},s=P((r={start:d,end:c}).start),o=P(a.start),l=P(r.end),h=P(a.end),p=Math.max(s,o),(u=Math.min(l,h))=e.adjustedStartValue&&t<=e.adjustedEndValue},e((function(t){return!i(t)||(n=t,!1)})),n;var e,i,n},e.prototype.fixAxisBreaks=function(){var t=this;if(this._axisBreaks){var e=this._axisBreaks;if(e.length>0){pt(Ut(e.iterator()),(function(e){var i=H(e.startValue,e.endValue),n=N(e.startValue,e.endValue);e.adjustedStartValue=i,e.adjustedEndValue=n,t._axisBreaks.update(e)}));var i=e.first,n=Math.min(i.startValue,i.endValue);Kt(e.iterator(),(function(t){var e=t.adjustedStartValue,i=t.adjustedEndValue;eo)},e.prototype.createBreakSprites=function(t){},Object.defineProperty(e.prototype,"axisFills",{get:function(){if(!this._axisFills){var t=this.createFill(this.axis);this._axisFills=new ue(t),t.applyOnClones=!0,t.events.on("enabled",this.invalidateAxisItems,this,!1),this._disposers.push(new le(this._axisFills)),this._disposers.push(this._axisFills.template)}return this._axisFills},enumerable:!0,configurable:!0}),e.prototype.createFill=function(t){return new ms(t)},Object.defineProperty(e.prototype,"grid",{get:function(){if(!this._grid){var t=this.createGrid();this._grid=new ue(t),t.applyOnClones=!0,t.events.on("enabled",this.invalidateAxisItems,this,!1),this._disposers.push(new le(this._grid)),this._disposers.push(this._grid.template)}return this._grid},enumerable:!0,configurable:!0}),e.prototype.createGrid=function(){return new ys},Object.defineProperty(e.prototype,"ticks",{get:function(){if(!this._ticks){var t=this.createTick();t.applyOnClones=!0,t.isMeasured=!1,t.events.on("enabled",this.invalidateAxisItems,this,!1),this._ticks=new ue(t),this._disposers.push(new le(this._ticks)),this._disposers.push(this._ticks.template)}return this._ticks},enumerable:!0,configurable:!0}),e.prototype.createTick=function(){return new xs},Object.defineProperty(e.prototype,"labels",{get:function(){if(!this._labels){var t=this.createLabel();this._labels=new ue(t),t.applyOnClones=!0,t.events.on("enabled",this.invalidateAxisItems,this,!1),this._disposers.push(new le(this._labels)),this._disposers.push(this._labels.template)}return this._labels},enumerable:!0,configurable:!0}),e.prototype.createLabel=function(){return new vs},Object.defineProperty(e.prototype,"inside",{get:function(){return this.getPropertyValue("inside")},set:function(t){this.setPropertyValue("inside",t)&&this.axis&&this.axis.invalidate(),t?(this.width=0,this.height=0):(this.width=void 0,this.height=void 0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"opposite",{get:function(){return this.getPropertyValue("opposite")},set:function(t){this.setPropertyValue("opposite",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fullWidthTooltip",{get:function(){return this.getPropertyValue("fullWidthTooltip")},set:function(t){this.setPropertyValue("fullWidthTooltip",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tooltipLocation",{get:function(){return this.getPropertyValue("tooltipLocation")},set:function(t){this.setPropertyValue("tooltipLocation",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tooltipLocation2",{get:function(){return this.getPropertyValue("tooltipLocation2")},set:function(t){this.setPropertyValue("tooltipLocation2",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cellStartLocation",{get:function(){return this.getPropertyValue("cellStartLocation")},set:function(t){this.setPropertyValue("cellStartLocation",t)&&this.axis&&this.axis.invalidateSeries()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cellEndLocation",{get:function(){return this.getPropertyValue("cellEndLocation")},set:function(t){this.setPropertyValue("cellEndLocation",t)&&this.axis&&this.axis.invalidateSeries()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inversed",{get:function(){return this.getPropertyValue("inversed")},set:function(t){this.setPropertyValue("inversed",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minLabelPosition",{get:function(){return this.getPropertyValue("minLabelPosition")},set:function(t){this.setPropertyValue("minLabelPosition",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxLabelPosition",{get:function(){return this.getPropertyValue("maxLabelPosition")},set:function(t){this.setPropertyValue("maxLabelPosition",t,!0)},enumerable:!0,configurable:!0}),e.prototype.copyFrom=function(e){t.prototype.copyFrom.call(this,e),this.grid.template.copyFrom(e.grid.template),this.ticks.template.copyFrom(e.ticks.template),this.labels.template.copyFrom(e.labels.template),this.axisFills.template.copyFrom(e.axisFills.template),this.line.copyFrom(e.line),this.baseGrid.copyFrom(e.baseGrid)},e.prototype.toAxisPosition=function(t){return t},e.prototype.setVisibility=function(e){t.prototype.setVisibility.call(this,e),this.bulletsContainer.visible=e},e}(Pr);se.registeredClasses.AxisRenderer=_s;var Ps=function(t){function e(){var e=t.call(this)||this;return e.className="AxisBullet",e.location=.5,e.isMeasured=!1,e.applyTheme(),e}return a(e,t),Object.defineProperty(e.prototype,"location",{get:function(){return this.getPropertyValue("location")},set:function(t){this.setPropertyValue("location",t,!0)},enumerable:!0,configurable:!0}),e.prototype.setDisabled=function(e){var i=t.prototype.setDisabled.call(this,e);return this.axis&&this.axis.invalidateDataItems(),i},e}(Pr);se.registeredClasses.AxisBullet=Ps;var ws=function(t){function e(){var e=t.call(this)||this;return e.className="AxisRendererY",e.minGridDistance=40,e.opposite=!1,e.height=c(100),e.labels.template.verticalCenter="middle",e.applyTheme(),e}return a(e,t),e.prototype.setAxis=function(e){t.prototype.setAxis.call(this,e),e.layout="horizontal"},e.prototype.updateGridContainer=function(){var t=this.axis;if(t){var e=this.gridContainer;e.y=t.pixelY,e.height=t.axisLength}},e.prototype.toAxisPosition=function(t){var e=this.axis;if(e){var i=1-t,n=e.relativePositionSprite,r=e.pixelY;if(n?r=fi({x:0,y:this.pixelY},this.parent,n).y:n=e.parent,n)return 1-(i-r/n.innerHeight)/(e.axisLength/n.innerHeight)}return t},e.prototype.processRenderer=function(){t.prototype.processRenderer.call(this);var e=this.axis;if(e){var i=e.title;i.valign="middle",e.height instanceof d||(e.height=c(100)),this.opposite?(i.rotation=90,this.line.toBack(),i.toFront()):(i.rotation=-90,i.toBack(),this.line.toFront())}},e.prototype.updateTooltip=function(){if(this.axis){var t=2e3,e=0,i=t,n=this.axisLength;this.opposite?this.inside&&(e=-2e3,i=t):this.inside||(e=-2e3,i=t),this.axis.updateTooltip("horizontal",{x:e,y:0,width:i,height:n})}},Object.defineProperty(e.prototype,"axisLength",{get:function(){var t=this.axis;return t.measuredHeight-t.pixelPaddingTop-t.pixelPaddingBottom||0},enumerable:!0,configurable:!0}),e.prototype.positionToPoint=function(t,e){return{x:0,y:this.positionToCoordinate(t)}},e.prototype.pointToPosition=function(t){return this.coordinateToPosition(t.y,t.x)},e.prototype.coordinateToPosition=function(t,e){var i=this.axis,n=i.axisFullLength;return F(i.renderer.inversed?1-i.start-t/n:t/n+(1-i.end),5)},e.prototype.getPositionRangePath=function(t,e){var i=L(this.positionToCoordinate(t),0,this.axisLength),n=L(this.positionToCoordinate(e),0,this.axisLength),r=Math.abs(n-i),a=this.getWidth();return Qr({x:0,y:Math.min(i,n),width:a,height:r},!0)},e.prototype.updateGridElement=function(t,e,i){e+=(i-e)*t.location;var n=this.positionToPoint(e);t.path=zr({x:0,y:0})+Ur({x:this.getWidth(),y:0}),this.positionItem(t,n),this.toggleVisibility(t,e,0,1)},e.prototype.updateTickElement=function(t,e,i){e+=(i-e)*t.location;var n=this.positionToPoint(e),r=t.length;try{this.axis.title.measuredWidth}catch(t){}n.x=fi({x:this.line.pixelX,y:0},this.line.parent,this.gridContainer).x,this.opposite?r*=t.inside?-1:1:r*=t.inside?1:-1,t.path=zr({x:0,y:0})+Ur({x:r,y:0}),this.positionItem(t,n),this.toggleVisibility(t,e,0,1)},e.prototype.updateAxisLine=function(){this.line.path=zr({x:0,y:0})+Ur({x:0,y:this.axisLength})},e.prototype.updateBaseGridElement=function(){t.prototype.updateBaseGridElement.call(this);var e=this.axis,i=this.getWidth(),n=this.axisLength,r=e.basePoint.y,a=this.baseGrid;if(r<-.2||r>n+.2)a.hide(0);else{var s=fi({x:0,y:0},this.gridContainer,a.parent).x;a.path=zr({x:0,y:0})+Ur({x:i,y:0}),a.moveTo({x:s,y:r}),a.show(0)}},e.prototype.updateLabelElement=function(t,e,i,n){_(n)||(n=t.location),e+=(i-e)*n,t.isMeasured=!t.inside;var r,a=this.positionToPoint(e),s=0,o=this.gridContainer.maxWidth;this.opposite?(t.inside?(r="right","left"==t.align&&(s=-o,r="left"),"center"==t.align&&(s=-o/2,r="middle")):r="left",a.x=0+s):(t.inside?(r="left","right"==t.align&&(s=o,r="right"),"center"==t.align&&(s=o/2,r="middle")):r="right",a.x=this.measuredWidth+s),0==t.rotation&&(t.horizontalCenter=r),this.positionItem(t,a),this.toggleVisibility(t,e,this.minLabelPosition,this.maxLabelPosition)},e.prototype.updateBreakElement=function(e){t.prototype.updateBreakElement.call(this,e);var i=e.startLine,n=e.endLine,r=e.fillShape,a=e.startPoint,s=e.endPoint,o=e.pixelMarginLeft,l=this.getWidth()-e.pixelMarginLeft-e.pixelMarginRight;a.y=L(a.y,-1,this.axisLength+1),s.y=L(s.y,-1,this.axisLength+1),a.y==s.y&&(a.y<0||a.y>this.axisLength)?e.fillShape.__disabled=!0:e.fillShape.__disabled=!1;var h=Math.abs(l-o);i.x=o,i.height=0,i.width=h,n.x=o,n.height=0,n.width=h,r.width=h,r.height=Math.abs(s.y-a.y),r.x=o,r.y=s.y},e.prototype.createBreakSprites=function(t){t.startLine=new Sa,t.endLine=new Sa;var e=new Ia;e.setWavedSides(!0,!1,!0,!1),t.fillShape=e},e.prototype.positionToCoordinate=function(t){var e=this.axis,i=e.axisFullLength;return e.renderer.inversed?(t-e.start)*i:(e.end-t)*i},e.prototype.updateBullet=function(t,e,i){var n=.5;t instanceof Ps&&(n=t.location),e+=(i-e)*n;var r=this.positionToPoint(e);r.x=fi({x:this.line.pixelX,y:0},this.line.parent,this.gridContainer).x,this.positionItem(t,r),this.toggleVisibility(t,e,0,1)},e}(_s);se.registeredClasses.AxisRendererY=ws,Mr.push({relevant:Vr.widthS,state:function(t,e){if(t instanceof ws){var i=t.states.create(e);return i.properties.inside=!0,i.properties.maxLabelPosition=.9,i.properties.minLabelPosition=.1,i}return null}}),Mr.push({relevant:Vr.widthXS,state:function(t,e){if(t instanceof ws){var i=t.states.create(e);return i.properties.disabled=!0,i}return null}});var Cs=function(t){function e(){var e=t.call(this)||this;return e.className="ValueAxisBreak",e.applyTheme(),e}return a(e,t),Object.defineProperty(e.prototype,"startPosition",{get:function(){if(this.axis)return this.axis.valueToPosition(this.adjustedStartValue)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endPosition",{get:function(){if(this.axis)return this.axis.valueToPosition(this.adjustedEndValue)},enumerable:!0,configurable:!0}),e}(us);se.registeredClasses.ValueAxisBreak=Cs;var Os=function(t){function e(){var e=t.call(this)||this;return e.className="ValueAxisDataItem",e.values.value={},e.values.endValue={},e.applyTheme(),e}return a(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.values.value.value},set:function(t){this.setValue("value",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endValue",{get:function(){return this.values.endValue.value},set:function(t){this.setValue("endValue",t)},enumerable:!0,configurable:!0}),e}(cs),Ds=function(t){function e(){var e=t.call(this)||this;return e._stepDecimalPlaces=0,e._prevStepDecimalPlaces=0,e._adjustLabelPrecision=!0,e._baseValue=0,e._adjustedStart=0,e._adjustedEnd=1,e._extremesChanged=!1,e._deltaMinMax=1,e._dsc=!1,e.calculateTotals=!1,e.className="ValueAxis",e.axisFieldName="value",e.setPropertyValue("maxZoomFactor",1e3),e.setPropertyValue("extraMin",0),e.setPropertyValue("extraMax",0),e.setPropertyValue("strictMinMax",!1),e.setPropertyValue("maxPrecision",Number.MAX_VALUE),e.setPropertyValue("adjustLabelPrecision",!0),e.setPropertyValue("extraTooltipPrecision",0),e.keepSelection=!1,e.includeRangesInMinMax=!1,e.applyTheme(),e}return a(e,t),e.prototype.fillRule=function(t){var e=t.value,i=t.component;t.axisFill.disabled||(F(e/i.step/2,5)==Math.round(e/i.step/2)?t.axisFill.__disabled=!0:t.axisFill.__disabled=!1)},e.prototype.createDataItem=function(){return new Os},e.prototype.createAxisBreak=function(){return new Cs},e.prototype.dataChangeUpdate=function(){this.clearCache(),this.keepSelection?(0!=this._start&&this.dispatchImmediately("startchanged"),1!=this._end&&this.dispatchImmediately("endchanged"),0==this._start&&1==this._end||this.dispatchImmediately("startendchanged")):0==this._start&&1==this._end||(this._start=0,this._end=1,this.dispatchImmediately("startendchanged")),this._maxZoomed=this._maxDefined,this._minZoomed=this._minDefined,this._maxAdjusted=this._maxDefined,this._minAdjusted=this._minDefined},e.prototype.processSeriesDataItems=function(){if(this.calculateTotals){var t=this.series.getIndex(0),e=t.startIndex;if(t.dataItems.length>0){e>0&&e--;var i=t.endIndex;i1?e=Math.pow(10,Math.log(this.min)*Math.LOG10E):0==(e=Math.floor(this.minZoomed/this._step)*this._step)&&(e=this.minZoomed);else e=Math.floor(e/this._step)*this._step;var i=this._maxZoomed+this._step;this.resetIterators();var n=this._dataItemsIterator;if(0==this._step)return;this._step=this.fixSmallStep(this._step);var r=0,a=this._prevStepDecimalPlaces!=this._stepDecimalPlaces;for(this._prevStepDecimalPlaces=this._stepDecimalPlaces;e<=i;){if(!this.isInBreak(e)){var s=n.find((function(t){return t.value===e}));s.__disabled&&(s.__disabled=!1),this.appendDataItem(s),s.axisBreak=void 0,(s.value!=e||a)&&(s.value=e,s.text=this.formatLabel(e),s.label&&s.label.invalid&&s.label.validate(),s.value>=this.min&&s.value<=this.max&&s.label&&("Y"==this.axisLetter&&s.label.measuredWidth>this.ghostLabel.measuredWidth||"X"==this.axisLetter&&s.label.measuredHeight>this.ghostLabel.measuredHeight)&&(this.ghostLabel.text=s.label.currentText,this.ghostLabel.validate())),this.validateDataElement(s)}r++;var o=e;if(this.logarithmic)Math.log(this.max)*Math.LOG10E-Math.log(this.min)*Math.LOG10E>1?e=Math.pow(10,Math.log(this.min)*Math.LOG10E+r):e+=this._step;else e+=this._step;var l=Math.pow(10,Math.floor(Math.log(Math.abs(this._step))*Math.LOG10E));if(l<1){var h=Math.round(Math.abs(Math.log(Math.abs(l))*Math.LOG10E))+2;if(h=Math.min(13,h),o==(e=F(e,h))){e=i;break}}}var p=this._axisBreaks;if(p){var u=this.renderer;Kt(p.iterator(),(function(e){if(e.breakSize>0&&X(e.startPoint,e.endPoint)>u.minGridDistance)for(var i=e.adjustedMin;i<=e.adjustedMax;){if(i>=e.adjustedStartValue&&i<=e.adjustedEndValue){var r=n.find((function(t){return t.value===i}));r.__disabled&&(r.__disabled=!1),t.appendDataItem(r),r.axisBreak=e,r.value!=i&&(r.value=i,r.text=t.formatLabel(i),r.label&&r.label.invalid&&r.label.validate()),t.validateDataElement(r)}i+=e.adjustedStep}}))}}},e.prototype.validateDataElement=function(e){t.prototype.validateDataElement.call(this,e),e.itemIndex=this._axisItemCount,this._axisItemCount++;var i=this.renderer,n=e.value,r=e.endValue,a=this.valueToPosition(n);e.position=a;var s=a,o=this.valueToPosition(n+this._step);D(r)&&(o=s=this.valueToPosition(r)),e.point=i.positionToPoint(a);var l=e.tick;l&&!l.disabled&&i.updateTickElement(l,a,s);var h=e.grid;h&&!h.disabled&&i.updateGridElement(h,a,s);var p=e.label;p&&!p.disabled&&i.updateLabelElement(p,a,s);var u=e.axisFill;u&&!u.disabled&&(i.updateFillElement(u,a,o),e.isRange||this.fillRule(e)),e.bullet&&i.updateBullet(e.bullet,a,s);var d=e.mask;d&&i.updateFillElement(d,a,o)},e.prototype.formatLabel=function(t){return this.adjustLabelPrecision&&0!=t?this.numberFormatter.format(t,void 0,this._stepDecimalPlaces):this.numberFormatter.format(t)},Object.defineProperty(e.prototype,"basePoint",{get:function(){var t=this.baseValue,e=this.valueToPosition(t);return this.renderer.positionToPoint(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"baseValue",{get:function(){var t=this._baseValue;return this.logarithmic&&(t=this.min),this._adapterO?this._adapterO.apply("baseValue",t):t},set:function(t){this._baseValue=t,this.invalidateLayout(),this.invalidateSeries()},enumerable:!0,configurable:!0}),e.prototype.anyToPosition=function(t){return this.valueToPosition(t)},e.prototype.valueToPoint=function(t){var e=this.valueToPosition(t),i=this.renderer.positionToPoint(e),n=this.renderer.positionToAngle(e);return{x:i.x,y:i.y,angle:n}},e.prototype.anyToPoint=function(t){return this.valueToPoint(t)},e.prototype.valueToPosition=function(t){if(D(t)){var e=this.min,i=this.max;if(D(e)&&D(i)){var n=this._difference,r=this._axisBreaks;r&&r.length>0&&Gt(r.iterator(),(function(n){var r=n.adjustedStartValue,a=n.adjustedEndValue;if(D(r)&&D(a)){if(ta?e+=(a-r)*(1-s):t0&&Gt(a.iterator(),(function(a){var s=a.startPosition,o=a.endPosition,l=a.adjustedStartValue,h=a.adjustedEndValue;if(D(l)&&D(h)){if(l>i)return!1;if(W({start:l,end:h},{start:e,end:i})){l=N(l,e),h=H(h,i);var p=a.breakSize;if(n-=(h-l)*(1-p),t>o)e+=(h-l)*(1-p);else if(!(ti&&(i=a)}})),this.includeRangesInMinMax&&this.axisRanges.each((function(t){if(!t.ignoreMinMax){var n=H(t.value,t.endValue),r=N(t.value,t.endValue);(ni||!D(i))&&(i=r)}}))),this.logarithmic){var n=this.treatZeroAs;D(n)&&e<=0&&(e=n),e<=0&&this.raiseCriticalError(new Error("Logarithmic value axis can not have values <= 0."),!0)}if(0==e&&0==i&&(i=.9,e=-.9),D(this._minDefined)&&(e=this._minDefined),D(this._maxDefined)&&(i=this._maxDefined),this._adapterO&&(e=this._adapterO.apply("min",e)),this._adapterO&&(i=this._adapterO.apply("max",i)),D(e)&&D(i)){this._minReal=e,this._maxReal=i,e==Number.POSITIVE_INFINITY&&(e=void 0),i==Number.NEGATIVE_INFINITY&&(i=void 0);var r=this.adjustDifference(e,i);if(e=this.fixMin(e),(i=this.fixMax(i))-e<=1/Math.pow(10,15)){if(i-e!=0)this._deltaMinMax=(i-e)/2;else{var a=Math.log(Math.abs(i))*Math.LOG10E,s=Math.pow(10,Math.floor(a));s/=10,this._deltaMinMax=s}e-=this._deltaMinMax,i+=this._deltaMinMax}e-=(i-e)*this.extraMin,i+=(i-e)*this.extraMax;var o=this.strictMinMax;D(this._maxDefined)&&(o=!0);var l=this.adjustMinMax(e,i,r,this._gridCount,o);if(e=l.min,r=(i=l.max)-e,l=this.adjustMinMax(e,i,i-e,this._gridCount,!0),e=l.min,i=l.max,this.strictMinMax&&(e=D(this._minDefined)?this._minDefined:this._minReal,(i=D(this._maxDefined)?this._maxDefined:this._maxReal)-e<=1e-8&&(e-=this._deltaMinMax,i+=this._deltaMinMax),e-=(i-e)*this.extraMin,i+=(i-e)*this.extraMax),this._adapterO&&(e=this._adapterO.apply("min",e)),this._adapterO&&(i=this._adapterO.apply("max",i)),this._step=l.step,D(e)||D(i)||(this.start=0,this.end=1,this.renderer.labels.each((function(t){t.dataItem.text=""}))),(this._minAdjusted!=e||this._maxAdjusted!=i)&&D(e)&&D(i)){var h=this._minMaxAnimation;if(this._extremesChanged&&D(this._minAdjusted)&&D(this._maxAdjusted)&&this.inited){if(h&&!h.isFinished()&&this._finalMax==i&&this._finalMin==e)return;this._finalMin=e,this._finalMax=i,(h=this.animateMinMax(e,i))&&!h.isFinished()?(h.events.on("animationprogress",this.validateDataItems,this),h.events.on("animationended",(function(){t.series.each((function(t){t.validate()})),t.validateDataItems(),t.handleSelectionExtremesChange()})),this._minMaxAnimation=h):this.series.each((function(t){t.invalidate()})),this.validateDataItems(),this.dispatchImmediately("extremeschanged"),this.handleSelectionExtremesChange()}else{if(h&&!h.isFinished()&&this._finalMax==i&&this._finalMin==e)return;this._minAdjusted=e,this._maxAdjusted=i,this._finalMin=e,this._finalMax=i,this.invalidateDataItems(),this.dispatchImmediately("extremeschanged")}}this._extremesChanged=!1,this._difference=this.adjustDifference(e,i)}},e.prototype.fixMin=function(t){return t},e.prototype.fixMax=function(t){return t},e.prototype.adjustMinMax=function(t,e,i,n,r){n<=1&&(n=1),n=Math.round(n);var a=t,s=e;0===i&&(i=Math.abs(e));var o=Math.log(Math.abs(i))*Math.LOG10E,l=Math.pow(10,Math.floor(o)),h=l/=10;r&&(h=0),this.logarithmic?(t<=0&&(t=this.baseValue),t==1/0&&(t=1),e==-1/0&&(e=10),this.strictMinMax?(t=this._minDefined>0?this._minDefined:t,this._maxDefined>0&&(e=e)):(t=Math.pow(10,Math.floor(Math.log(Math.abs(t))*Math.LOG10E)),e=Math.pow(10,Math.ceil(Math.log(Math.abs(e))*Math.LOG10E)))):(r?(t=Math.floor(t/l)*l,e=Math.ceil(e/l)*l):(t=Math.ceil(t/l)*l-h,e=Math.floor(e/l)*l+h),t<0&&a>=0&&(t=0),e>0&&s<=0&&(e=0)),o=Math.log(Math.abs(i))*Math.LOG10E,l=Math.pow(10,Math.floor(o)),l/=10;var p=Math.ceil(i/n/l)*l,u=Math.pow(10,Math.floor(Math.log(Math.abs(p))*Math.LOG10E)),d=Math.ceil(p/u);d>5?d=10:d<=5&&d>2&&(d=5),p=Math.ceil(p/(u*d))*u*d,this.maxPrecisiona&&(t-=p)}return{min:t,max:e,step:p}},Object.defineProperty(e.prototype,"min",{get:function(){var t=this._minAdjusted;return D(t)||(t=this._minDefined),t},set:function(t){this._minDefined!=t&&(this._minDefined=t,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minDefined",{get:function(){return this._minDefined},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxDefined",{get:function(){return this._maxDefined},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"extraMin",{get:function(){return this.getPropertyValue("extraMin")},set:function(t){this.setPropertyValue("extraMin",t)&&this.invalidateDataItems()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"extraMax",{get:function(){return this.getPropertyValue("extraMax")},set:function(t){this.setPropertyValue("extraMax",t)&&this.invalidateDataItems()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"step",{get:function(){return this._step},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){var t=this._maxAdjusted;return D(t)||(t=this._maxDefined),t},set:function(t){this._maxDefined!=t&&(this._maxDefined=t,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"adjustLabelPrecision",{get:function(){return this.getPropertyValue("adjustLabelPrecision")},set:function(t){this.setPropertyValue("adjustLabelPrecision",t)&&this.invalidate()},enumerable:!0,configurable:!0}),e.prototype.registerSeries=function(e){return new wt([t.prototype.registerSeries.call(this,e),e.events.on("extremeschanged",this.handleExtremesChange,this,!1),e.events.on("selectionextremeschanged",this.handleSelectionExtremesChange,this,!1),this.events.on("extremeschanged",e.invalidate,e,!1)])},e.prototype.handleSelectionExtremesChange=function(){var t,e,i=this,n=!0;if(Kt(this.series.iterator(),(function(r){if(!r.ignoreMinMax&&!r.isHidden&&!r.outOfRange){r.visible&&!r.isHiding&&(n=!1);var a=r.selectionMin(i),s=r.selectionMax(i);D(a)&&(!D(t)||ae)&&(e=s)}})),this.includeRangesInMinMax&&this.axisRanges.each((function(i){if(!i.ignoreMinMax){var n=H(i.value,i.endValue),r=N(i.value,i.endValue);ne&&(e=r)}})),D(this._minDefined)?t=this.strictMinMax?this._minDefined:this.min:this.strictMinMax&&(t=this._minReal),D(this._maxDefined)?e=this.strictMinMax?this._maxDefined:this.max:this.strictMinMax&&(e=this._maxReal),t==e){t-=this._deltaMinMax,e+=this._deltaMinMax;var r=this.adjustMinMax(t,e,0,this._gridCount,this.strictMinMax);t=r.min,e=r.max}var a=this.adjustDifference(t,e),s=this.adjustMinMax(t,e,a,this._gridCount);t=s.min,e=s.max,t-=(e-t)*this.extraMin,e+=(e-t)*this.extraMax,t=L(t,this.min,this.max),e=L(e,this.min,this.max),a=this.adjustDifference(t,e),s=this.adjustMinMax(t,e,a,this._gridCount,!0),t=s.min,e=s.max,this.strictMinMax&&(t=N(t,this._minDefined),e=H(e,this._maxDefined));var o=s.step;this.syncWithAxis&&(s=this.syncAxes(t,e,o),t=s.min,e=s.max,this.invalidate()),o=s.step,this._difference=this.adjustDifference(this.min,this.max);var l=this.valueToPosition(t),h=this.valueToPosition(e);n&&!this.syncWithAxis&&(l=0,h=1);var p=0;this.syncWithAxis?(p=5,this.setCache(t+"-"+e,o)):(this._step==o&&this._minZoomed==t&&this._maxZoomed==e||(this._dsc=!0),this._step=o,this._minZoomed=t,this._maxZoomed=e),this.keepSelection||this.zoom({start:l,end:h},!1,!1,p)},Object.defineProperty(e.prototype,"strictMinMax",{get:function(){return this.getPropertyValue("strictMinMax")},set:function(t){this.setPropertyValue("strictMinMax",t)&&this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"logarithmic",{get:function(){return this.getPropertyValue("logarithmic")},set:function(t){this.setPropertyValue("logarithmic",t)&&(this.invalidate(),this.series.each((function(t){t.invalidateDataItems()})))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"keepSelection",{get:function(){return this.getPropertyValue("keepSelection")},set:function(t){this.setPropertyValue("keepSelection",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"includeRangesInMinMax",{get:function(){return this.getPropertyValue("includeRangesInMinMax")},set:function(t){this.setPropertyValue("includeRangesInMinMax",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxPrecision",{get:function(){return this.getPropertyValue("maxPrecision")},set:function(t){this.setPropertyValue("maxPrecision",t)&&this.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"extraTooltipPrecision",{get:function(){return this.getPropertyValue("extraTooltipPrecision")},set:function(t){this.setPropertyValue("extraTooltipPrecision",t)&&this.invalidate()},enumerable:!0,configurable:!0}),e.prototype.handleExtremesChange=function(){var t=this;if(this._extremesChanged=!0,this.getMinMax(),this.ghostLabel){this.dataItems.each((function(e){e.label&&e.label.pixelWidth>0&&(t.ghostLabel.text=e.label.currentText)}))}},e.prototype.getX=function(t,e,i,n,r){return this.renderer.positionToPoint(this.getPositionX(t,e,i,n,r)).x},e.prototype.getPositionX=function(t,e,i,n,r){var a=t.getWorkingValue(e);_(n)||(n="valueX");var s=t.getValue(n,"stack");D(a)||(a=this.baseValue,this.logarithmic&&s>0&&(a=0));var o=this.valueToPosition(a+s);return r&&(o=L(o,r.start,r.end)),o},e.prototype.getY=function(t,e,i,n,r){return this.renderer.positionToPoint(this.getPositionY(t,e,i,n,r)).y},e.prototype.getPositionY=function(t,e,i,n,r){var a=t.getWorkingValue(e);_(n)||(n="valueY");var s=t.getValue(n,"stack");D(a)||(a=this.baseValue,this.logarithmic&&s>0&&(a=0));var o=this.valueToPosition(a+s);return r&&(o=L(o,r.start,r.end)),o},e.prototype.getAngle=function(t,e,i,n,r){var a=t.getWorkingValue(e),s=t.getValue(n,"stack");D(a)||(a=this.baseValue);var o=this.valueToPosition(a+s);return r&&(o=L(o,r.start,r.end)),this.positionToAngle(o)},e.prototype.getAnyRangePath=function(t,e,i){var n=this.valueToPosition(t),r=this.valueToPosition(e);return this.getPositionRangePath(n,r)},e.prototype.getTooltipText=function(t){var e=F(this.positionToValue(t),this._stepDecimalPlaces+this.extraTooltipPrecision),i=this.tooltip.numberFormatter.format(e);return this._adapterO?this._adapterO.apply("getTooltipText",i):i},e.prototype.zoomToValues=function(t,e,i,n){var r=(t-this.min)/(this.max-this.min),a=(e-this.min)/(this.max-this.min);this.zoom({start:r,end:a},i,n)},Object.defineProperty(e.prototype,"minZoomed",{get:function(){return this.syncWithAxis?this._minZoomed:N(this.min,this._minZoomed)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxZoomed",{get:function(){return this.syncWithAxis?this._maxZoomed:H(this.max,this._maxZoomed)},enumerable:!0,configurable:!0}),e.prototype.fixAxisBreaks=function(){var e=this;t.prototype.fixAxisBreaks.call(this);var i=this._axisBreaks;i&&i.length>0&&i.each((function(t){var i=t.adjustedStartValue,n=t.adjustedEndValue,r=n-i,a=Math.ceil(r*t.breakSize)*e._gridCount/(e.max-e.min),s=e.adjustMinMax(i,n,r,a,!0);t.adjustedStep=s.step,t.adjustedMin=s.min,t.adjustedMax=s.max})),this._difference=this.adjustDifference(this.min,this.max)},e.prototype.getPositionLabel=function(t){var e=this.positionToValue(t);return this.numberFormatter.format(e)},e.prototype.showTooltipAt=function(t){this.showTooltipAtPosition(this.valueToPosition(t))},e.prototype.copyFrom=function(e){t.prototype.copyFrom.call(this,e),this.min=e.min,this.max=e.max,this.calculateTotals=e.calculateTotals,this._baseValue=e.baseValue},Object.defineProperty(e.prototype,"syncWithAxis",{get:function(){return this.getPropertyValue("syncWithAxis")},set:function(t){var e=this;this.setPropertyValue("syncWithAxis",t,!0)&&t&&(this._disposers.push(t.events.on("extremeschanged",this.handleSelectionExtremesChange,this,!1)),this._disposers.push(t.events.on("selectionextremeschanged",this.handleSelectionExtremesChange,this,!1)),this._disposers.push(t.events.on("startendchanged",this.handleSelectionExtremesChange,this,!1)),this.events.on("shown",this.handleSelectionExtremesChange,this,!1),this.events.on("maxsizechanged",(function(){e.clearCache(),e._disposers.push(se.events.once("exitframe",(function(){e.handleSelectionExtremesChange()})))}),this,!1))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"treatZeroAs",{get:function(){return this.getPropertyValue("treatZeroAs")},set:function(t){this.setPropertyValue("treatZeroAs",t,!0)},enumerable:!0,configurable:!0}),e.prototype.syncAxes=function(t,e,i){var n=this.syncWithAxis;if(n){D(t)||(t=this.min),D(e)||(e=this.max),D(i)||(i=this._step);var r=Math.round((n.maxZoomed-n.minZoomed)/n.step),a=Math.round((e-t)/i);if(D(r)&&D(a))for(var s=!1,o=0,l=.01*(e-t),h=t,p=e,u=i;1!=s;)if(s=this.checkSync(h,p,u,r),++o>1e3&&(s=!0),s)t=h,e=p,i=u;else{o/3==Math.round(o/3)?(h=t-l*o,t>=0&&h<0&&(h=0)):(p=e+l*o)<=0&&p>0&&(p=0);var d=this.adjustMinMax(h,p,p-h,this._gridCount,!0);h=d.min,p=d.max,u=d.step}}return{min:t,max:e,step:i}},e.prototype.checkSync=function(t,e,i,n){for(var r=(e-t)/i,a=1;ah?(t.startIndex=0,t.endIndex=0,t.outOfRange=!0):(t.outOfRange=!1,t.startIndex=o,t.endIndex=d),!n&&t.dataRangeInvalid&&t.validateDataRange()}}))},e.prototype.findFirst=function(t,e,i){var n=t.index;if(n>0){var r=t.component.dataItems.getIndex(n-1),a=r[i];return!a||a.getTime()t._minDifference[i.uid]&&(e=t._minDifference[i.uid])})),e!=Number.MAX_VALUE&&0!=e||(e=In("day")),e},enumerable:!0,configurable:!0}),e.prototype.seriesDataChangeUpdate=function(t){this._minDifference[t.uid]=Number.MAX_VALUE},e.prototype.postProcessSeriesDataItems=function(t){var e=this;this._firstWeekDay=this.getFirstWeekDay(),t?this.seriesGroupUpdate(t):this.series.each((function(t){e.seriesGroupUpdate(t)})),this.addEmptyUnitsBreaks()},e.prototype.seriesGroupUpdate=function(t){var e=this;JSON.stringify(t._baseInterval[this.uid])!=JSON.stringify(this.mainBaseInterval)&&(t._baseInterval[this.uid]=this.mainBaseInterval,t.mainDataSet.each((function(t){e.postProcessSeriesDataItem(t)})),this.groupData&&this.groupSeriesData(t))},e.prototype.groupSeriesData=function(t){var e=this;if(t.baseAxis==this&&t.dataItems.length>0&&!t.dataGrouped){t.bulletsContainer.removeChildren();var i=[],n=this.mainBaseInterval,r=In(n.timeUnit,n.count);this.groupIntervals.each((function(t){var n=In(t.timeUnit,t.count);(n>r&&nl||!D(h.low))&&(h.low=l),(h.high0&&i.each((function(t){var i=Math.ceil(e._gridCount*(Math.min(e.end,t.endPosition)-Math.max(e.start,t.startPosition))/(e.end-e.start));t.gridInterval=e.chooseInterval(0,t.adjustedEndValue-t.adjustedStartValue,i);var n=Vn(new Date(t.adjustedStartValue),t.gridInterval.timeUnit,t.gridInterval.count,e._firstWeekDay,e._df.utc,void 0,e._df.timezoneMinutes,e._df.timezone);n.getTime()>t.startDate.getTime()&&Mn(n,t.gridInterval.timeUnit,t.gridInterval.count,e._df.utc),t.gridDate=n}))},e.prototype.getFirstWeekDay=function(){return this._df?this._df.firstDayOfWeek:1},e.prototype.getGridDate=function(t,e){var i=this._gridInterval.timeUnit,n=this._gridInterval.count;Vn(t,i,1,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone);var r=t.getTime(),a=Tn(t),s=Mn(a,i,e,this._df.utc).getTime(),o=this.isInBreak(s);o&&o.endDate&&(Vn(a=new Date(o.endDate.getTime()),i,n,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone),a.getTime()0){var i=e.gridInterval.timeUnit,n=e.gridInterval.count;if(X(e.startPoint,e.endPoint)>4*l.minGridDistance)for(var r,s=e.gridDate.getTime(),o=0,h=function(){var l=Tn(e.gridDate);if(s=Mn(l,i,n*o,t._df.utc).getTime(),o++,s>e.adjustedStartValue&&sthis.baseInterval.count&&(a=r+(a-r)/(this._gridInterval.count/this.baseInterval.count)),t.position=r;var o=t.tick;o&&!o.disabled&&e.updateTickElement(o,r,a);var l=t.grid;l&&!l.disabled&&e.updateGridElement(l,r,a);var h=t.axisFill;h&&!h.disabled&&(e.updateFillElement(h,r,s),t.isRange||this.fillRule(t));var p=t.mask;p&&e.updateFillElement(p,r,a),t.bullet&&e.updateBullet(t.bullet,r,a);var u=t.label;if(u&&!u.disabled){var d=u.location;0==d&&(d=1!=this._gridInterval.count||"week"==this._gridInterval.timeUnit||t.isRange?0:.5),e.updateLabelElement(u,r,a,d)}}},Object.defineProperty(e.prototype,"baseDuration",{get:function(){return In(this.baseInterval.timeUnit,this.baseInterval.count)},enumerable:!0,configurable:!0}),e.prototype.adjustMinMax=function(t,e){return{min:t,max:e,step:this.baseDuration}},e.prototype.fixMin=function(t){var e=this.baseInterval,i=Vn(new Date(t),e.timeUnit,e.count,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone).getTime();return i+(Mn(new Date(i),e.timeUnit,e.count,this._df.utc).getTime()-i)*this.startLocation},e.prototype.fixMax=function(t){var e=this.baseInterval,i=Vn(new Date(t),e.timeUnit,e.count,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone).getTime();return i+(Mn(new Date(i),e.timeUnit,e.count,this._df.utc).getTime()-i)*this.endLocation},e.prototype.chooseInterval=function(t,e,i,n){n||(n=this.gridIntervals);var r=n.getIndex(t),a=In(r.timeUnit,r.count),o=n.length-1;if(t>=o)return s({},n.getIndex(o));var l=Math.ceil(e/a);return e0?s({},n.getIndex(t-1)):l<=i?s({},n.getIndex(t)):t+1l&&(this._minDifference[n.uid]=l)}var h=i-o;h>0&&this._minDifference[n.uid]>h&&(this._minDifference[n.uid]=h),this._prevSeriesTime[n.uid]=i,n._baseInterval[this.uid]&&this.postProcessSeriesDataItem(t)}},e.prototype.updateAxisBySeries=function(){t.prototype.updateAxisBySeries.call(this);var e=this.chooseInterval(0,this.minDifference,1);this.minDifference>=In("day",27)&&"week"==e.timeUnit&&(e.timeUnit="month",e.count=1),"month"==e.timeUnit&&(this.minDifference>=In("day",58)&&1==e.count&&(e.count=2),this.minDifference>=In("day",87)&&2==e.count&&(e.count=3),this.minDifference>=In("day",174)&&5==e.count&&(e.count=6)),this.minDifference>=In("hour",23)&&"hour"==e.timeUnit&&(e.timeUnit="day",e.count=1),this.minDifference>=In("week",1)-In("hour",1)&&"day"==e.timeUnit&&(e.timeUnit="week",e.count=1),this.minDifference>=In("year",1)-In("day",1.01)&&"month"==e.timeUnit&&(e.timeUnit="year",e.count=1),this._baseIntervalReal=e,this._mainBaseInterval=e},Object.defineProperty(e.prototype,"baseInterval",{get:function(){return this._groupInterval?this._groupInterval:this._baseInterval?this._baseInterval:this._baseIntervalReal},set:function(t){JSON.stringify(this._baseInterval)!=JSON.stringify(t)&&(this._baseInterval=t,this._mainBaseInterval=t,D(t.count)||(t.count=1),this.invalidate(),this.postProcessSeriesDataItems())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mainBaseInterval",{get:function(){return this._baseInterval?this._baseInterval:this._mainBaseInterval?this._mainBaseInterval:this._baseIntervalReal},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"skipEmptyPeriods",{get:function(){return this.getPropertyValue("skipEmptyPeriods")},set:function(t){if(t){var e=this.axisBreaks.template;e.startLine.disabled=!0,e.endLine.disabled=!0,e.fillShape.disabled=!0,e.breakSize=0}else this._gapBreaks&&(this.axisBreaks.clear(),this._gapBreaks=!1);this.setPropertyValue("skipEmptyPeriods",t)&&(this.invalidate(),this.postProcessSeriesDataItems(),this.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tooltipDateFormat",{get:function(){return this.getPropertyValue("tooltipDateFormat")},set:function(t){this.setPropertyValue("tooltipDateFormat",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"markUnitChange",{get:function(){return this.getPropertyValue("markUnitChange")},set:function(t){this.setPropertyValue("markUnitChange",t)&&this.invalidateData()},enumerable:!0,configurable:!0}),e.prototype.getTooltipText=function(t){var e,i=this.positionToDate(t);if(i=Vn(i,this.baseInterval.timeUnit,this.baseInterval.count,this._firstWeekDay,this._df.utc,new Date(this.min),this._df.timezoneMinutes,this._df.timezone),this.tooltipDate=i,_(this.tooltipDateFormat))e=this._df.format(i,this.tooltipDateFormat,-1==["day","month","week","year"].indexOf(this.baseInterval.timeUnit));else{var n=this.dateFormats.getKey(this.baseInterval.timeUnit);e=n?this._df.format(i,n):this.getPositionLabel(t)}return this._adapterO?this._adapterO.apply("getTooltipText",e):e},e.prototype.roundPosition=function(t,e,i){var n=this.baseInterval,r=n.timeUnit,a=n.count,s=this.positionToDate(t);if(Vn(s,r,a,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone),e>0&&Mn(s,r,e*a,this._df.utc),i>0&&i<1&&s.setTime(s.getTime()+this.baseDuration*i),this.isInBreak(s.getTime()))for(;s.getTime()a.getTime()&&Math.abs(s.getTime()-r)f&&(f=i)})),this.groupMin[d]=c,this.groupMax[d]=f),t=L(t,c,f),e=L(e,c,f),r&&(l&&(t=L(t=e-o,c,f)),h&&(e=L(e=t+o,c,f)));g=(t-c)/(f-c),m=(e-c)/(f-c);this.zoom({start:g,end:m},i,n)}}else{var g=this.valueToPosition(t),m=this.valueToPosition(e);this.zoom({start:g,end:m},i,n)}},e.prototype.asIs=function(e){return"baseInterval"==e||t.prototype.asIs.call(this,e)},e.prototype.copyFrom=function(e){var i=this;t.prototype.copyFrom.call(this,e),this.dateFormats=e.dateFormats,this.periodChangeDateFormats=e.periodChangeDateFormats,this.groupIntervals.clear(),e.groupIntervals.each((function(t){i.groupIntervals.push(s({},t))})),this.gridIntervals.clear(),e.gridIntervals.each((function(t){i.gridIntervals.push(s({},t))})),e._baseInterval&&(this.baseInterval=e._baseInterval)},e.prototype.showTooltipAtPosition=function(e,i){var n=this;if(i||(e=this.toAxisPosition(e)),this.snapTooltip){var r,a=this.positionToDate(e).getTime();if(this.series.each((function(t){if(t.baseAxis==n){var i=n.getSeriesDataItem(t,e,!0);if(i){var s=void 0;t.xAxis==n&&(s=i.dateX),t.yAxis==n&&(s=i.dateY),r?Math.abs(r.getTime()-a)>Math.abs(s.getTime()-a)&&(r=s):r=s}}})),r){var s=r.getTime();r=Vn(new Date(s),this.baseInterval.timeUnit,this.baseInterval.count,this._firstWeekDay,this._df.utc,void 0,this._df.timezoneMinutes,this._df.timezone),s=r.getTime();var o=this.renderer.tooltipLocation;0==o&&(o=1e-4),r=new Date(r.getTime()+this.baseDuration*o),e=this.dateToPosition(r),this.chart.cursor&&this.chart.cursor.snapToSeries||this.series.each((function(t){var e=t.dataItemsByAxis.getKey(n.uid).getKey(s+t.currentDataSetId),i=t.showTooltipAtDataItem(e);i?n.chart._seriesPoints.push({series:t,point:i}):(t.tooltipText||t.tooltipHTML)&&t.hideTooltip()}))}}t.prototype.showTooltipAtPosition.call(this,e,!0)},Object.defineProperty(e.prototype,"snapTooltip",{get:function(){return this.getPropertyValue("snapTooltip")},set:function(t){this.setPropertyValue("snapTooltip",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"groupData",{get:function(){return this.getPropertyValue("groupData")},set:function(t){var e=this;this.setPropertyValue("groupData",t)&&(this.series.each((function(i){i.setDataSet(""),t&&!i.dataGrouped&&i.inited&&(i._baseInterval[e.uid]=e.mainBaseInterval,e.groupSeriesData(i))})),this._currentDataSetId="",this._groupInterval=void 0,this.invalidate(),this.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"groupInterval",{get:function(){return this.getPropertyValue("groupInterval")},set:function(t){this.setPropertyValue("groupInterval",t)&&(this.invalidate(),this.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"groupCount",{get:function(){return this.getPropertyValue("groupCount")},set:function(t){this.setPropertyValue("groupCount",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"timezoneOffset",{get:function(){return this.getPropertyValue("timezoneOffset")},set:function(t){this.setPropertyValue("timezoneOffset",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"timezone",{get:function(){return this.getPropertyValue("timezone")},set:function(t){this.setPropertyValue("timezone",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gridInterval",{get:function(){return this._gridInterval},enumerable:!0,configurable:!0}),e.prototype.makeGap=function(t,e){var i=t.component;if(t&&e&&!i.connect&&D(i.autoGapCount)&&i.baseAxis==this){var n=t.dates["date"+this.axisLetter],r=e.dates["date"+this.axisLetter];if(n&&r)if(n.getTime()-r.getTime()>i.autoGapCount*this.baseDuration)return!0}return!1},Object.defineProperty(e.prototype,"baseValue",{get:function(){return this.min},enumerable:!0,configurable:!0}),e}(Ds);se.registeredClasses.DateAxis=ks,se.registeredClasses.DateAxisDataItem=Is;var Ts=function(t){function e(){var e=t.call(this)||this;return e.className="AxisRendererX",e.minGridDistance=120,e.opposite=!1,e.rotation=0,e.width=c(100),e.labels.template.horizontalCenter="middle",e.applyTheme(),e}return a(e,t),e.prototype.setAxis=function(e){t.prototype.setAxis.call(this,e),e.layout="vertical"},e.prototype.updateGridContainer=function(){var t=this.axis;if(t){var e=this.gridContainer;e.x=t.pixelX,e.width=t.axisLength}},e.prototype.processRenderer=function(){t.prototype.processRenderer.call(this);var e=this.axis;if(e){e.width instanceof d||(e.width=c(100)),this.line;var i=e.title;i.rotation=0,i.align="center",this.opposite?(this.line.toFront(),i.toBack()):(i.toFront(),this.toBack(),this.line.toBack())}},e.prototype.updateTooltip=function(){if(this.axis){var t=1e3,e=this.line.pixelX,i=this.line.pixelY,n=this.axisLength,r=t;this.opposite?this.inside||(i=-1e3,r=t):this.inside&&(i=-1e3,r=t),this.axis.updateTooltip("vertical",{x:e,y:i,width:n,height:r})}},e.prototype.updateLabelElement=function(t,e,i,n){_(n)||(n=t.location),e+=(i-e)*n;var r=this.positionToPoint(e);t.isMeasured=!t.inside;var a,s=0,o=this.gridContainer.maxHeight;this.opposite?(t.inside?(a="top","bottom"==t.valign&&(s=o,a="bottom"),"middle"==t.valign&&(s=o/2,a="middle")):a="bottom",r.y=s):(t.inside?(a="bottom","top"==t.valign&&(s=-o,a="top"),"middle"==t.valign&&(s=-o/2,a="middle")):a="top",r.y+=s),0==t.rotation&&(t.verticalCenter=a),this.positionItem(t,r),this.toggleVisibility(t,e,this.minLabelPosition,this.maxLabelPosition)},Object.defineProperty(e.prototype,"axisLength",{get:function(){var t=this.axis;return t.measuredWidth-t.pixelPaddingRight-t.pixelPaddingLeft||0},enumerable:!0,configurable:!0}),e.prototype.positionToPoint=function(t,e){return{x:this.positionToCoordinate(t),y:0}},e.prototype.pointToPosition=function(t){return this.coordinateToPosition(t.x,t.y)},e.prototype.getPositionRangePath=function(t,e){var i=L(this.positionToCoordinate(t),0,this.axisLength),n=L(this.positionToCoordinate(e),0,this.axisLength),r=Math.abs(n-i),a=this.getHeight();return Qr({x:Math.min(i,n),y:0,width:r,height:a},!0)},e.prototype.updateBreakElement=function(e){t.prototype.updateBreakElement.call(this,e);var i=e.startLine,n=e.endLine,r=e.fillShape,a=e.startPoint,s=e.endPoint,o=e.pixelMarginLeft,l=this.getHeight()-e.pixelMarginTop-e.pixelMarginBottom;a.x=L(a.x,-1,this.axisLength+1),s.x=L(s.x,-1,this.axisLength+1),a.x==s.x&&(a.x<0||a.x>this.axisLength)?e.fillShape.__disabled=!0:e.fillShape.__disabled=!1,i.y=o,i.width=0,i.height=l,n.y=o,n.width=0,n.height=l,r.height=l,r.width=Math.abs(s.x-a.x),r.y=o,r.x=a.x},e.prototype.updateGridElement=function(t,e,i){e+=(i-e)*t.location;var n=this.positionToPoint(e);t.path=zr({x:0,y:0})+Ur({x:0,y:this.getHeight()}),this.positionItem(t,n),this.toggleVisibility(t,e,0,1)},e.prototype.updateTickElement=function(t,e,i){e+=(i-e)*t.location;var n=this.positionToPoint(e),r=t.length;n.y=fi({x:0,y:this.line.pixelY},this.line.parent,this.gridContainer).y,this.opposite?r*=t.inside?1:-1:r*=t.inside?-1:1,t.path=zr({x:0,y:0})+Ur({x:0,y:r}),this.positionItem(t,n),this.toggleVisibility(t,e,0,1)},e.prototype.updateAxisLine=function(){this.line.path=zr({x:0,y:0})+Ur({x:this.axisLength,y:0})},e.prototype.updateBaseGridElement=function(){t.prototype.updateBaseGridElement.call(this);var e=this.axis,i=this.getHeight(),n=this.axisLength,r=this.baseGrid,a=e.basePoint.x;if(a<-.2||a>n+.2)r.hide(0);else{var s=fi({x:0,y:0},this.gridContainer,r.parent).y;r.path=zr({x:0,y:0})+Ur({x:0,y:i}),r.moveTo({x:a,y:s}),r.show(0)}},e.prototype.createBreakSprites=function(t){t.startLine=new Sa,t.endLine=new Sa;var e=new Ia;e.setWavedSides(!1,!0,!1,!0),t.fillShape=e},e.prototype.toAxisPosition=function(t){var e=t,i=this.axis;if(i){var n=i.relativePositionSprite,r=i.pixelX;if(n?r=fi({x:this.pixelX,y:0},this.parent,n).x:n=i.parent,n)return(e-r/n.innerWidth)/(i.axisLength/n.innerWidth)}return t},e.prototype.updateBullet=function(t,e,i){var n=.5;t instanceof Ps&&(n=t.location),e+=(i-e)*n;var r=this.positionToPoint(e);r.y=fi({x:0,y:this.line.pixelY},this.line.parent,this.gridContainer).y,this.positionItem(t,r),this.toggleVisibility(t,e,0,1)},e}(_s);se.registeredClasses.AxisRendererX=Ts,Mr.push({relevant:Vr.heightXS,state:function(t,e){if(t instanceof Ts){var i=t.states.create(e);return i.properties.inside=!0,i.properties.maxLabelPosition=.9,i.properties.minLabelPosition=.1,i}return null}}),Mr.push({relevant:Vr.heightXXS,state:function(t,e){if(t instanceof Ts){var i=t.states.create(e);return i.properties.disabled=!0,i}return null}});var As=function(t){function e(){var e=t.call(this)||this;return e.className="CategoryAxisBreak",e.properties.startLocation=.5,e.properties.endLocation=.5,e.applyTheme(),e}return a(e,t),Object.defineProperty(e.prototype,"startPosition",{get:function(){if(this.axis)return this.axis.indexToPosition(this.adjustedStartValue,this.startLocation)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endPosition",{get:function(){if(this.axis)return this.axis.indexToPosition(this.adjustedEndValue,this.endLocation)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startCategory",{get:function(){return this.getPropertyValue("startCategory")},set:function(t){this.setPropertyValue("startCategory",t)&&this.axis&&(this.axis.invalidateDataItems(),this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endCategory",{get:function(){return this.getPropertyValue("endCategory")},set:function(t){this.setPropertyValue("endCategory",t)&&this.axis&&(this.axis.invalidateDataItems(),this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startValue",{get:function(){var t=this.getPropertyValue("startCategory");return t?this.axis.categoryToIndex(t):this.getPropertyValue("startValue")},set:function(t){this.setPropertyValue("startValue",t)&&this.axis&&(this.axis.invalidateDataItems(),this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endValue",{get:function(){var t=this.getPropertyValue("endCategory");return t?this.axis.categoryToIndex(t):this.getPropertyValue("endValue")},set:function(t){this.setPropertyValue("endValue",t)&&this.axis&&(this.axis.invalidateDataItems(),this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startLocation",{get:function(){return this.getPropertyValue("startLocation")},set:function(t){this.setPropertyValue("startLocation",t)&&this.axis&&(this.axis.invalidateDataItems(),this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endLocation",{get:function(){return this.getPropertyValue("endLocation")},set:function(t){this.setPropertyValue("endLocation",t)&&this.axis&&(this.axis.invalidateDataItems(),this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),e}(us);se.registeredClasses.CategoryAxisBreak=As;var Ms=function(t){function e(){var e=t.call(this)||this;return e.seriesDataItems={},e.className="CategoryAxisDataItem",e.text="{category}",e.locations.category=0,e.locations.endCategory=1,e.deltaPosition=0,e.applyTheme(),e}return a(e,t),Object.defineProperty(e.prototype,"category",{get:function(){return this._adapterO&&this._adapterO.isEnabled("category")?this._adapterO.apply("category",this.properties.category):this.properties.category},set:function(t){var e=this.properties.category;this.setProperty("category",t),_(e)&&e!=t&&this.component&&this.component.validateDataElement(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endCategory",{get:function(){return this.properties.endCategory},set:function(t){this.setProperty("endCategory",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"deltaPosition",{get:function(){return this.properties.deltaCoordinate},set:function(t){t!=this.properties.deltaCoordinate&&(this.setProperty("deltaCoordinate",t),this.component&&(this.component.invalidateDataItems(),this.component.invalidateSeries()))},enumerable:!0,configurable:!0}),e}(cs),Vs=function(t){function e(){var e=t.call(this)||this;e.dataItemsByCategory=new ne,e.className="CategoryAxis",e.axisFieldName="category",e._lastDataItem=e.createDataItem(),e._lastDataItem.component=e,e._disposers.push(e._lastDataItem),e.applyTheme();var i=e.dataItemsByCategory;return e.addDisposer(e.mainDataSet.events.on("removed",(function(t){i.removeKey(t.oldValue.category)}))),e}return a(e,t),e.prototype.createDataItem=function(){return new Ms},e.prototype.createAxisBreak=function(){return new As},e.prototype.processSeriesDataItem=function(e,i){t.prototype.processSeriesDataItem.call(this,e,i);var n=e["category"+this.axisLetter];if(_(n)){var r=this.dataItemsByCategory.getKey(n);if(r){var a=e.component.uid,s=r.seriesDataItems[a];s||(s=[],r.seriesDataItems[a]=s),s.push(e)}}else e.component.dataItems.remove(e)},e.prototype.validateDataRange=function(){var i=this;t.prototype.validateDataRange.call(this),Kt(this._series.iterator(),(function(t){if(t.xAxis instanceof e&&t.yAxis instanceof e)t.invalidateDataRange();else{var n=i.positionToIndex(i.start),r=i.positionToIndex(i.end);r>=i.dataItems.length&&r--;for(var a=t.uid,s=void 0,o=void 0,l=n;l<=r;l++){var h=i.dataItems.getIndex(l);if(h){var p=h.seriesDataItems[a];if(p)for(var u=0;uo)&&(o=c)}}}}D(s)?t.startIndex=s:t.start=i.start,D(o)?t.endIndex=o+1:t.end=i.end,i._axisBreaks&&i._axisBreaks.length>0&&t.invalidateDataRange()}}))},e.prototype.validate=function(){var e=this;t.prototype.validate.call(this);var i=this.dataItems.length,n=L(Math.floor(this.start*i-1),0,i),r=L(Math.ceil(this.end*i),0,i);this.renderer.invalid&&this.renderer.validate();var a=this.renderer.axisLength/Math.max(this.renderer.minGridDistance,1/Number.MAX_SAFE_INTEGER),s=Math.min(this.dataItems.length,Math.ceil((r-n)/a));if(this._startIndex=Math.floor(n/s)*s,this._endIndex=Math.ceil(this.end*i),this.fixAxisBreaks(),this._startIndex==this._endIndex&&this._endIndex++,this._frequency=s,!(this.axisLength<=0)){this.maxZoomFactor=this.dataItems.length,this.dataItems.length<=0&&(this.maxZoomFactor=1),this.resetIterators(),n=N(0,this._startIndex-this._frequency),r=H(this.dataItems.length,this._endIndex+this._frequency);for(var o=0,l=0;l0)for(r=i;r<=n;r+=a){var o;(o=e.dataItems.getIndex(r)).__disabled=!1,e.appendDataItem(o),e.validateDataElement(o,s),s++}}}));this.validateBreaks(),this.validateAxisRanges(),this.ghostLabel.invalidate(),this.renderer.invalidateLayout()}},e.prototype.validateDataElement=function(e,i,n){t.prototype.validateDataElement.call(this,e),e.itemIndex=this._axisItemCount,this._axisItemCount++;var r=this.renderer;D(n)||(n=this.categoryToIndex(e.category));var a=this.categoryToIndex(e.endCategory);D(a)||(a=n);var s,o,l,h=this.indexToPosition(n,e.locations.category),p=this.indexToPosition(a,e.locations.endCategory);e.position=h,e.isRange&&(s=a,o=this.indexToPosition(n,e.locations.category),l=this.indexToPosition(s,e.locations.endCategory)),e.point=r.positionToPoint(h);var u=e.tick;u&&!u.disabled&&r.updateTickElement(u,h,p);var d=e.grid;d&&!d.disabled&&r.updateGridElement(d,h,p);var c=e.label;c&&!c.disabled&&(e.isRange&&null!=c.text||(e.text=e.text),r.updateLabelElement(c,h,p),(r instanceof ws&&e.label.measuredWidth>this.ghostLabel.measuredWidth||r instanceof Ts&&e.label.measuredHeight>this.ghostLabel.measuredHeight)&&(e.label.html?this.ghostLabel.html=e.label.currentText:this.ghostLabel.text=e.label.currentText));var f=e.axisFill;f&&!f.disabled&&(e.isRange||(s=n+this._frequency,o=this.indexToPosition(n,f.location),l=this.indexToPosition(s,f.location)),r.updateFillElement(f,o,l),e.isRange||this.fillRule(e,i)),e.bullet&&r.updateBullet(e.bullet,h,p);var g=e.mask;g&&r.updateFillElement(g,o,l)},e.prototype.disposeData=function(){this.dataItemsByCategory.clear(),t.prototype.disposeData.call(this)},e.prototype.processDataItem=function(e,i){e&&(t.prototype.processDataItem.call(this,e,i),_(e.category)&&this.dataItemsByCategory.setKey(e.category,e))},e.prototype.getDataItem=function(t){var e=t[this.dataFields.category];if(_(e)){var i=this.dataItemsByCategory.getKey(e);return i||this.dataItems.create()}},e.prototype.indexToPosition=function(t,e){D(e)||(e=.5);var i=this.startIndex,n=this.endIndex,r=this.adjustDifference(i,n),a=this.startLocation;(r-=a,r-=1-this.endLocation,this._axisBreaks)&&Gt(this._axisBreaks.iterator(),(function(e){var r=e.adjustedStartValue,a=e.adjustedEndValue;if(ta?i+=(a-r)*(1-s):t=0;i--){var n=t.dataItems.getIndex(i);if(t.xAxis==this&&n.categoryX==e)return n;if(t.yAxis==this&&n.categoryY==e)return n}},e.prototype.getSeriesDataItemByCategory=function(t,e){var i,n=this;return e.dataItems.each((function(r){e.xAxis==n?r.categoryX==t&&(i=r):e.yAxis==n&&r.categoryY==t&&(i=r)})),i},e.prototype.getSeriesDataItem=function(t,e,i){var n=this;if(D(e)){var r=this.positionToIndex(e);r>=this.dataItems.length&&r--;var a=this.dataItems.getIndex(r);if(a){var s,o=a.category,l=t.dataItems.getIndex(r);if(l){if(t.xAxis==this&&l.categoryX==o)return l;if(t.yAxis==this&&l.categoryY==o)return l}return t.dataItems.each((function(e){t.xAxis==n&&e.categoryX==o&&(s||(s=e),Math.abs(r-s.index)>Math.abs(r-e.index)&&(s=e)),t.yAxis==n&&e.categoryY==o&&(s||(s=e),Math.abs(r-s.index)>Math.abs(r-e.index)&&(s=e))})),s}}},e.prototype.getX=function(t,e,i,n,r){var a=this.getPositionX(t,e,i,n,r);return f(a)?this.basePoint.x:this.renderer.positionToPoint(a).x},e.prototype.getPositionX=function(t,e,i,n,r){var a;return _(e)&&(a=this.categoryToPosition(t.categories[e],i)),r&&(a=L(a,r.start,r.end)),a},e.prototype.getY=function(t,e,i,n,r){var a=this.getPositionY(t,e,i,n,r);return f(a)?this.basePoint.y:this.renderer.positionToPoint(a).y},e.prototype.getPositionY=function(t,e,i,n,r){var a;return _(e)&&(a=this.categoryToPosition(t.categories[e],i)),r&&(a=L(a,r.start,r.end)),a},e.prototype.getAngle=function(t,e,i,n,r){var a=this.categoryToPosition(t.categories[e],i);return r&&(a=L(a,r.start,r.end)),this.positionToAngle(a)},e.prototype.getCellStartPosition=function(t){return this.roundPosition(t,0)},e.prototype.getCellEndPosition=function(t){return this.roundPosition(t,1)},e.prototype.getTooltipText=function(t){var e=this.dataItems.getIndex(this.positionToIndex(t));if(e)return this.tooltipDataItem=e,this.tooltip.dataItem=e,this.tooltipText?this.tooltipText:this._adapterO?this._adapterO.apply("getTooltipText",e.category):e.category},e.prototype.positionToIndex=function(t){(t=F(t,10))<0&&(t=0),t>1&&(t=1);var e=this.startIndex,i=this.endIndex,n=i-e-this.startLocation-(1-this.endLocation);t+=1/n*this.startLocation;var r=null;this._axisBreaks&&Gt(this._axisBreaks.iterator(),(function(a){var s=a.startPosition,o=a.endPosition,l=a.adjustedStartValue,h=a.adjustedEndValue;l=N(l,e),h=H(h,i);var p=a.breakSize;if(n-=(h-l)*(1-p),t>o)e+=(h-l)*(1-p);else if(!(t=this.dataItems.length&&(r=this.dataItems.length-1),r},e.prototype.positionToCategory=function(t){return this.getPositionLabel(t)},e.prototype.getPositionLabel=function(t){var e=this.dataItems.getIndex(this.positionToIndex(t));if(e)return e.category},Object.defineProperty(e.prototype,"basePoint",{get:function(){return this.renderer.positionToPoint(1)},enumerable:!0,configurable:!0}),e.prototype.initRenderer=function(){t.prototype.initRenderer.call(this),this.renderer.baseGrid.disabled=!0},Object.defineProperty(e.prototype,"frequency",{get:function(){return this._frequency},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sortBySeries",{get:function(){return this.getPropertyValue("sortBySeries")},set:function(t){this.setPropertyValue("sortBySeries",t,!0)},enumerable:!0,configurable:!0}),e.prototype.processConfig=function(e){e&&_(e.sortBySeries)&&O(e.sortBySeries)&&(this.map.hasKey(e.sortBySeries)?e.sortBySeries=this.map.getKey(e.sortBySeries):(this.addDelayedMap("sortBySeries",e.sortBySeries),delete e.sortBySeries)),t.prototype.processConfig.call(this,e)},e}(fs);se.registeredClasses.CategoryAxis=Vs,se.registeredClasses.CategoryAxisDataItem=Ms;var Fs=function(t){function e(){var e=t.call(this)||this;return e.className="XYSeriesDataItem",e.values.customValue={},e.values.valueX={stack:0},e.values.valueY={stack:0},e.values.openValueX={},e.values.openValueY={},e.values.dateX={},e.values.dateY={},e.values.openDateX={},e.values.openDateY={},e.setLocation("dateX",.5,0),e.setLocation("dateY",.5,0),e.setLocation("categoryX",.5,0),e.setLocation("categoryY",.5,0),e.applyTheme(),e}return a(e,t),Object.defineProperty(e.prototype,"valueX",{get:function(){return this.values.valueX.value},set:function(t){this.setValue("valueX",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"customValue",{get:function(){return this.values.customValue.value},set:function(t){this.setValue("customValue",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"valueY",{get:function(){return this.values.valueY.value},set:function(t){this.setValue("valueY",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dateX",{get:function(){return this.getDate("dateX")},set:function(t){this.setDate("dateX",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dateY",{get:function(){return this.getDate("dateY")},set:function(t){this.setDate("dateY",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"categoryX",{get:function(){return this.categories.categoryX},set:function(t){this.setCategory("categoryX",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"categoryY",{get:function(){return this.categories.categoryY},set:function(t){this.setCategory("categoryY",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"openValueX",{get:function(){return this.values.openValueX.value},set:function(t){this.setValue("openValueX",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"openValueY",{get:function(){return this.values.openValueY.value},set:function(t){this.setValue("openValueY",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"openDateX",{get:function(){return this.getDate("openDateX")},set:function(t){this.setDate("openDateX",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"openDateY",{get:function(){return this.getDate("openDateY")},set:function(t){this.setDate("openDateY",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"openCategoryX",{get:function(){return this.categories.openCategoryX},set:function(t){this.setCategory("openCategoryX",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"openCategoryY",{get:function(){return this.categories.openCategoryY},set:function(t){this.setCategory("openCategoryY",t)},enumerable:!0,configurable:!0}),e.prototype.getMin=function(t,e,i){var n,r=this;return D(i)||(i=0),pt(t,(function(t){var a;a=e?r.getWorkingValue(t):r.getValue(t),((a+=i)n||!D(n))&&(n=a)})),n},e}(os),js=function(t){function e(){var e=t.call(this)||this;return e.groupFields={},e._xAxis=new Ct,e._yAxis=new Ct,e._xValueFields=[],e._yValueFields=[],e._baseInterval={},e.dataGrouped=!1,e.usesShowFields=!1,e._dataSetChanged=!1,e._maxxX=1e5,e._maxxY=1e5,e._propertiesChanged=!1,e.outOfRange=!1,e.className="XYSeries",e.isMeasured=!1,e.groupFields.valueX="close",e.groupFields.valueY="close",e.groupFields.customValue="close",e.groupFields.openValueX="open",e.groupFields.openValueY="open",e.cursorTooltipEnabled=!0,e.cursorHoverEnabled=!0,e.excludeFromTotal=!1,e.mainContainer.mask=new xr,e.mainContainer.mask.setElement(e.paper.add("path")),e.stacked=!1,e.snapTooltip=!1,e._showBullets=!1,e.tooltip.pointerOrientation="horizontal",e.properties.stackToNegative=!0,e.hideTooltipWhileZooming=!0,e.setPropertyValue("maskBullets",!0),e.tooltip.events.on("hidden",(function(){e.returnBulletDefaultState()}),void 0,!1),e._disposers.push(e._xAxis),e._disposers.push(e._yAxis),e.observe(br,(function(){e.inited&&(e._propertiesChanged=!0,e.legendDataItem&&(e.legendDataItem.childrenCreated=!1),e.chart&&e.chart.legend&&e.chart.legend.invalidateDataItems(),e.invalidate())}),void 0,!1),e.applyTheme(),e}return a(e,t),e.prototype.applyInternalDefaults=function(){t.prototype.applyInternalDefaults.call(this),_(this.readerTitle)||(this.readerTitle=this.language.translate("X/Y Series"))},e.prototype.createDataItem=function(){return new Fs},e.prototype.resetExtremes=function(){this._tmin.clear(),this._tmax.clear(),this._smin.clear(),this._smax.clear()},e.prototype.dataChangeUpdate=function(){this.dataGrouped=!1,this._baseInterval={},this._currentDataSetId="",this.resetExtremes(),this.xAxis&&this.xAxis.seriesDataChangeUpdate(this),this.yAxis&&this.yAxis.seriesDataChangeUpdate(this)},e.prototype.validateData=function(){this._baseInterval={};var e=this.dataFields;if(e.valueYShow||e.openValueXShow||e.openValueXShow||e.openValueYShow?this.usesShowFields=!0:this.usesShowFields=!1,this.defineFields(),this.data.length>0&&this.dataChangeUpdate(),t.prototype.validateData.call(this),this.updateItemReaderText(),this.chart&&(!_(this.dataFields[this._xField])||!_(this.dataFields[this._yField])))throw Error('Data fields for series "'+(this.name?this.name:this.uid)+'" are not properly defined.');this.inited&&this.isHidden&&this.hide(0),this.dataGrouped=!1},e.prototype.processDataItem=function(e,i){try{t.prototype.processDataItem.call(this,e,i),this.xAxis.processSeriesDataItem(e,"X"),this.yAxis.processSeriesDataItem(e,"Y"),this.setInitialWorkingValues(e)}catch(t){this._chart&&this._chart.raiseCriticalError(t)}},e.prototype.updateDataItem=function(e){t.prototype.updateDataItem.call(this,e),this.xAxis.processSeriesDataItem(e,"X"),this.yAxis.processSeriesDataItem(e,"Y")},e.prototype.setInitialWorkingValues=function(t){},e.prototype.disposeData=function(){t.prototype.disposeData.call(this);var e=this.xAxis,i=this.yAxis;if(e){var n=this.dataItemsByAxis.getKey(e.uid);n&&n.clear(),e instanceof Vs&&this.clearCatAxis(e)}if(i){var r=this.dataItemsByAxis.getKey(i.uid);r&&r.clear(),i instanceof Vs&&this.clearCatAxis(i)}},e.prototype.clearCatAxis=function(t){var e=this.uid;t.dataItems.each((function(t){t.seriesDataItems[e]&&(t.seriesDataItems[e]=[])}))},e.prototype.defineFields=function(){var t=this.xAxis,e=this.yAxis;if(t&&e){var i=t.axisFieldName,n=i+"X",r="open"+ze(i)+"X",a=e.axisFieldName,s=a+"Y",o="open"+ze(a)+"Y";this._xField=n,this._yField=s,this.dataFields[r]&&(this._xOpenField=r),this.dataFields[o]&&(this._yOpenField=o),this.dataFields[o]||this.baseAxis!=e||(this._yOpenField=s),this.dataFields[r]||this.baseAxis!=t||(this._xOpenField=n),this.stacked&&this.baseAxis==t&&(this._xOpenField=n),this.stacked&&this.baseAxis==e&&(this._yOpenField=s),t instanceof Vs&&e instanceof Vs&&(this._yOpenField||(this._yOpenField=s)),this._xValueFields=[],this._yValueFields=[],this.addValueField(t,this._xValueFields,this._xField),this.addValueField(t,this._xValueFields,this._xOpenField),this.addValueField(e,this._yValueFields,this._yField),this.addValueField(e,this._yValueFields,this._yOpenField)}},e.prototype.addValueField=function(t,e,i){t instanceof Ds&&_(this.dataFields[i])&&-1==e.indexOf(i)&&e.push(i)},e.prototype.setCategoryAxisField=function(t,e){_(this.dataFields[t])||(this.dataFields[t]=e.dataFields.category)},e.prototype.setDateAxisField=function(t,e){_(this.dataFields[t])||(this.dataFields[t]=e.dataFields.date)},e.prototype.afterDraw=function(){t.prototype.afterDraw.call(this),this.createMask()},e.prototype.createMask=function(){if(this.mainContainer.mask){var t=this.getMaskPath();Kt(this.axisRanges.iterator(),(function(e){e.axisFill.fillPath&&(e.axisFill.validate(),t+=e.axisFill.fillPath)})),this.mainContainer.mask.path=t}},e.prototype.getMaskPath=function(){return this.xAxis&&this.yAxis?Qr({x:0,y:0,width:this.xAxis.axisLength,height:this.yAxis.axisLength}):""},e.prototype.getAxisField=function(t){return t==this.xAxis?this.xField:t==this.yAxis?this.yField:void 0},e.prototype.validateDataItems=function(){var e=this.chart;e&&(this._maxxX=N(1e5,2*e.plotContainer.maxWidth),this._maxxY=N(1e5,2*e.plotContainer.maxHeight));var i=this.xAxis,n=this.yAxis;i&&n&&(i.updateAxisBySeries(),n.updateAxisBySeries()),t.prototype.validateDataItems.call(this),i&&n&&(i.postProcessSeriesDataItems(this),n.postProcessSeriesDataItems(this))},e.prototype.validateDataRange=function(){var e=this.xAxis,i=this.yAxis;e&&i&&(e.dataRangeInvalid&&e.validateDataRange(),i.dataRangeInvalid&&i.validateDataRange()),t.prototype.validateDataRange.call(this)},e.prototype.validate=function(){var e=this.xAxis,i=this.yAxis;if(e&&i){e.invalid&&e.validate(),i.invalid&&i.validate(),this.y=i.pixelY,this.x=e.pixelX,this._showBullets=!0;var n=this.minBulletDistance;D(n)&&this.baseAxis.axisLength/(this.endIndex-this.startIndex)0){var r=this.xAxis,a=this.yAxis;this._prevStartIndex=void 0,this._prevEndIndex=void 0,this._startIndex=void 0,this._endIndex=void 0,this.appeared||this.processValues(!1),r instanceof ks&&r==this.baseAxis&&(this._tmin.setKey(r.uid,n.getIndex(0).dateX.getTime()),this._tmax.setKey(r.uid,n.getIndex(n.length-1).dateX.getTime()),this.dispatch("extremeschanged")),a instanceof ks&&a==this.baseAxis&&(this._tmin.setKey(a.uid,n.getIndex(0).dateY.getTime()),this._tmax.setKey(a.uid,n.getIndex(n.length-1).dateY.getTime()),this.dispatch("extremeschanged"))}}return i},e.prototype.processValues=function(e){t.prototype.processValues.call(this,e);var i=this.xAxis,n=this.yAxis;if(i&&n){var r=this.dataItems,a=1/0,s=-1/0,o=1/0,l=-1/0,h=this.startIndex,p=this.endIndex,u=h,d=p;e||(h=0,p=this.dataItems.length);for(var c=h;cl&&(l=m)),this.baseAxis==n&&(gs&&(s=g)))}i.processSeriesDataItems(),n.processSeriesDataItems();var y=i.uid,v=n.uid;if(this.xAxis instanceof Ds&&(a==1/0||s==-1/0))return this._smin.setKey(y,void 0),this._smax.setKey(y,void 0),void this.dispatchImmediately("selectionextremeschanged");if(this.yAxis instanceof Ds&&(o==1/0||l==-1/0))return this._smin.setKey(v,void 0),this._smax.setKey(v,void 0),void this.dispatchImmediately("selectionextremeschanged");if(!e&&(this._tmin.getKey(y)!=a||this._tmax.getKey(y)!=s||this._tmin.getKey(v)!=o||this._tmax.getKey(v)!=l)){this._tmin.setKey(y,a),this._tmax.setKey(y,s),this._tmin.setKey(v,o),this._tmax.setKey(v,l);var b=this.stackedSeries;b&&(b.isDisposed()?this.stackedSeries=void 0:b.processValues(!1)),this.dispatchImmediately("extremeschanged")}if(h!=u||p!=d){a=1/0,s=-1/0,o=1/0,l=-1/0;for(c=u;cl&&(l=m)),this.baseAxis==n&&(gs&&(s=g)))}}if(this.xAxis instanceof Ds&&(a==1/0||s==-1/0))return this._smin.setKey(y,void 0),this._smax.setKey(y,void 0),void this.dispatchImmediately("selectionextremeschanged");if(this.yAxis instanceof Ds&&(o==1/0||l==-1/0))return this._smin.setKey(v,void 0),this._smax.setKey(v,void 0),void this.dispatchImmediately("selectionextremeschanged");if((this._smin.getKey(y)!=a||this._smax.getKey(y)!=s||this._smin.getKey(v)!=o||this._smax.getKey(v)!=l)&&(this._smin.setKey(y,a),this._smax.setKey(y,s),this._smin.setKey(v,o),this._smax.setKey(v,l),this.appeared||0!=this.start||1!=this.end||this.dataItems!=this.mainDataSet)){var x,_,P=!1;if(n instanceof Ds&&!(n instanceof ks))(!D(x=this._tmin.getKey(v))||(this.usesShowFields||this._dataSetChanged||i instanceof ks&&i.groupData&&this.isShowing)&&o_||this.stackedSeries&&!this.isHidden)&&(this._tmax.setKey(v,l),P=!0);if(i instanceof Ds&&!(i instanceof ks))(!D(x=this._tmin.getKey(y))||(this.usesShowFields||this._dataSetChanged||n instanceof ks&&n.groupData&&this.isShowing)&&a_||this.stackedSeries&&!this.isHidden)&&(this._tmax.setKey(y,s),P=!0);P&&this.dispatchImmediately("extremeschanged"),0==this.start&&1==this.end&&(this._dataSetChanged=!1),this.dispatchImmediately("selectionextremeschanged")}!e&&this.stacked&&this.processValues(!0)}},e.prototype.hideTooltip=function(e){t.prototype.hideTooltip.call(this,e),this.returnBulletDefaultState(),this._prevTooltipDataItem=void 0},e.prototype.showTooltipAtPosition=function(t,e){var i;if(this.visible&&!this.isHiding&&!this.isShowing){var n=this._xAxis.get(),r=this._yAxis.get();n==this.baseAxis&&(i=n.getSeriesDataItem(this,n.toAxisPosition(t),this.snapTooltip)),r==this.baseAxis&&(i=r.getSeriesDataItem(this,r.toAxisPosition(e),this.snapTooltip));var a=this.showTooltipAtDataItem(i);if(a)return a;if(!this.tooltipText&&!this.tooltipHTML)return}this.hideTooltip()},e.prototype.getAdjustedXLocation=function(t,e,i){return t.locations[e]},e.prototype.getAdjustedYLocation=function(t,e,i){return t.locations[e]},e.prototype.showTooltipAtDataItem=function(t){var e,i,n=this.chart.cursor;if(n&&n.hideSeriesTooltipsOnSelection&&n.selection.visible&&n.downPoint)this.hideTooltip();else if(this.returnBulletDefaultState(t),t&&t.visible){if(this.updateLegendValue(t),this.cursorTooltipEnabled){this.tooltipDataItem=t;var r=this.tooltipXField,a=this.tooltipYField;if(_(t[r])&&_(t[a])){var s=this.getPoint(t,r,a,this.getAdjustedXLocation(t,r),this.getAdjustedYLocation(t,a));if(s&&("XYChart"!=this.chart.className||!(s.y<-1||s.y>this.yAxis.pixelHeight+1||s.x<-1||s.x>this.xAxis.pixelWidth+1))){if(this.tooltipX=s.x,this.tooltipY=s.y,this._prevTooltipDataItem!=t&&(this.dispatchImmediately("tooltipshownat",{type:"tooltipshownat",target:this,dataItem:t}),this._prevTooltipDataItem=t),this.cursorHoverEnabled)try{for(var o=h(t.sprites),l=o.next();!l.done;l=o.next()){var p=l.value;!p.parent.visible||p.isHidden||p.__disabled||p.disabled||p.isHiding||(p.interactions.isRealHover||(p.dispatchImmediately("over"),p.interactions.isRealHover=!0),p.isHover=!0)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(i=o.return)&&i.call(o)}finally{if(e)throw e.error}}return this.showTooltip()?ci({x:s.x,y:s.y},this):void 0}}}}else this.updateLegendValue(t,!0)},e.prototype.returnBulletDefaultState=function(t){var e,i;if(this._prevTooltipDataItem&&this._prevTooltipDataItem!=t)try{for(var n=h(this._prevTooltipDataItem.sprites),r=n.next();!r.done;r=n.next()){var a=r.value;if(a.isDisposed())this._prevTooltipDataItem=void 0;else{var s=a.interactions.isRealHover;a.isHover=!1,s&&a.dispatchImmediately("out")}}}catch(t){e={error:t}}finally{try{r&&!r.done&&(i=n.return)&&i.call(n)}finally{if(e)throw e.error}}},e.prototype.shouldCreateBullet=function(t,e){var i=e.xField;_(i)||(i=this.xField);var n=e.yField;if(_(n)||(n=this.yField),this.xAxis instanceof Ds&&!t.hasValue([i])||this.yAxis instanceof Ds&&!t.hasValue([n]))return!1;if(e.disabled){var r=e.propertyFields.disabled,a=t.dataContext;return!(!a||!1!==a[r])}return!0},e.prototype.updateTooltip=function(){this.hideTooltipWhileZooming||!this.tooltip||this.tooltip.isHidden||this.isHiding||this.isHidden||!this.tooltipDataItem||this.showTooltipAtDataItem(this.tooltipDataItem)},e.prototype.positionBullet=function(e){t.prototype.positionBullet.call(this,e);var i=e.dataItem,n=e.xField;_(n)||(n=this.xField);var r=e.yField;_(r)||(r=this.yField);var a=this.xAxis,s=this.yAxis;if(a instanceof Ds&&!i.hasValue([n])||s instanceof Ds&&!i.hasValue([r]))e.visible=!1;else{var o=this.getBulletLocationX(e,n),l=this.getBulletLocationY(e,r);if(this.getPoint(i,n,r,o,l)){var h=this.xOpenField,p=this.yOpenField,u=void 0,d=void 0;if(a instanceof ks){D(o)||(o=0);var c=void 0,f=i.getWorkingValue(n);if(h?c=i.getWorkingValue(h):a==this.baseAxis&&(c=a.baseValue),D(c)||(c=f),(c+=P=i.getValue("valueX","stack"))==(f+=P)){var g=a.baseInterval,m=a.dateFormatter;c=Vn(new Date(c),g.timeUnit,g.count,m.firstDayOfWeek,m.utc,void 0,m.timezoneMinutes,m.timezone).getTime(),f=Mn(new Date(c),g.timeUnit,g.count,m.utc).getTime()}var y=void 0;y=a==this.baseAxis?c+(f-c)*o:c+(f-c)*(1-o),u=a.valueToPosition(y)}else if(a instanceof Ds){D(o)||(o=0);c=void 0,f=i.getWorkingValue(n);c=h?i.getWorkingValue(h):a.baseValue;y=(c+=P=i.getValue("valueX","stack"))+((f+=P)-c)*(1-o);u=a.valueToPosition(y)}else if(a instanceof Vs){var v=this.getAdjustedXLocation(i,n,e.locationX),b=this.getAdjustedXLocation(i,h,e.locationX);u=a.categoryToPosition(i[n],v);var x=void 0;h&&(x=a.categoryToPosition(i[h],b)),D(x)||(x=1),u=x+(u-x)*o}if(s instanceof ks){D(l)||(l=0);c=void 0,f=i.getWorkingValue(r);if(p?c=i.getWorkingValue(p):s==this.baseAxis&&(c=s.baseValue),D(c)||(c=f),(c+=P=i.getValue("valueY","stack"))==(f+=P)){g=s.baseInterval,m=s.dateFormatter;c=Vn(new Date(c),g.timeUnit,g.count,m.firstDayOfWeek,m.utc,void 0,m.timezoneMinutes,m.timezone).getTime(),f=Mn(new Date(c),g.timeUnit,g.count,m.utc).getTime()}y=void 0;y=s==this.baseAxis?c+(f-c)*l:c+(f-c)*(1-l),d=s.valueToPosition(y)}else if(s instanceof Ds){D(l)||(l=0);var P;c=void 0,f=i.getWorkingValue(r);c=p?i.getWorkingValue(p):s.baseValue;y=(c+=P=i.getValue("valueY","stack"))+((f+=P)-c)*(1-l);d=s.valueToPosition(y)}else if(s instanceof Vs){d=s.categoryToPosition(i[r],l);var w=this.getAdjustedYLocation(i,r,e.locationY),C=this.getAdjustedYLocation(i,p,e.locationY);d=s.categoryToPosition(i[r],w);var O=void 0;p&&(O=s.categoryToPosition(i[p],C)),D(O)||(O=1),d=O+(d-O)*l}e.visible=!0,this.positionBulletReal(e,u,d)}else e.visible=!1}},e.prototype.positionBulletReal=function(t,e,i){t.x=this.xAxis.renderer.positionToPoint(e,i).x,t.y=this.yAxis.renderer.positionToPoint(i,e).y},e.prototype.getBulletLocationX=function(t,e){var i=t.locationX,n=t.dataItem;return D(i)||(i=n.workingLocations[e]),i},e.prototype.getBulletLocationY=function(t,e){var i=t.locationY,n=t.dataItem;return D(i)||(i=n.workingLocations[e]),i},e.prototype.updateStacking=function(){var t=this;this.invalidateDataItems(),this.chart&&this.chart.series.each((function(e){e.baseAxis==t.baseAxis&&(e.stackedSeries=void 0,e.invalidateDataItems(),e.invalidateProcessedData())}))},Object.defineProperty(e.prototype,"stacked",{get:function(){return this.getPropertyValue("stacked")},set:function(t){if(this.setPropertyValue("stacked",t,!0)){this.updateStacking();var e,i=this.xAxis,n=this.yAxis;if(!t)i!=this.baseAxis&&i instanceof Ds&&(e=this.xField),n!=this.baseAxis&&n instanceof Ds&&(e=this.yField),e&&this.dataItems.each((function(t){t.setCalculatedValue(e,0,"stack")}))}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"snapTooltip",{get:function(){return this.getPropertyValue("snapTooltip")},set:function(t){this.setPropertyValue("snapTooltip",t)},enumerable:!0,configurable:!0}),e.prototype.show=function(e){var i,n=this;this.isHidden&&(this.appeared&&this.xAxis instanceof ks&&this.xAxis.groupData&&(this._tmin.setKey(this.yAxis.uid,void 0),this._tmax.setKey(this.yAxis.uid,void 0)),this.appeared&&this.yAxis instanceof ks&&this.yAxis.groupData&&(this._tmin.setKey(this.xAxis.uid,void 0),this._tmax.setKey(this.xAxis.uid,void 0))),this.xAxis instanceof Ds&&this.xAxis!=this.baseAxis&&(i=this._xValueFields),this.yAxis instanceof Ds&&this.yAxis!=this.baseAxis&&(i=this._yValueFields);var r,a=this.startIndex,s=this.endIndex,o=0,l=this.defaultState.transitionDuration;D(e)&&(l=e),Yi.animationsEnabled||(l=0),Kt($t(this.dataItems.iterator()),(function(t){var e=t[0],h=t[1],p=l;(en.endIndex+10)&&(p=0,o=0),n.sequencedInterpolation&&p>0&&(o=n.sequencedInterpolationDelay*e+l*(e-a)/(s-a)),r=h.show(p,o,i)})),this.dataSets.each((function(t,e){e!=n.dataItems&&e.each((function(t){t.events.disable(),t.show(0,0,i),t.events.enable()}))})),this.mainDataSet!=this.dataItems&&this.mainDataSet.each((function(t){t.events.disable(),t.show(0,0,i),t.events.enable()}));var h=t.prototype.show.call(this,e);return r&&!r.isFinished()&&(h=r),this.hidden&&(this.dispatchImmediately("selectionextremeschanged"),this.hidden=!1),h},e.prototype.hide=function(e){var i,n,r=this,a=this.xAxis;a instanceof Ds&&a!=this.baseAxis&&(i=this._xValueFields,n=this.stacked||a.minZoomeda.baseValue||this.stackedSeries?a.baseValue:a.min);var s=this.yAxis;s instanceof Ds&&s!=this.baseAxis&&(i=this._yValueFields,n=this.stacked||s.minZoomeds.baseValue||this.stackedSeries?s.baseValue:s.min);var o=this.startIndex,l=this.endIndex,h=this.hiddenState.transitionDuration;D(e)&&(h=e),Yi.animationsEnabled||(h=0);var p,u=0;Kt($t(this.dataItems.iterator()),(function(t){var e=t[0],a=t[1],s=h;(er.endIndex+10)&&(s=0),0==s?a.hide(0,0,n,i):(r.sequencedInterpolation&&s>0&&(u=r.sequencedInterpolationDelay*e+h*(e-o)/(l-o)),p=a.hide(s,u,n,i))})),this.dataSets.each((function(t,e){e!=r.dataItems&&e.each((function(t){t.events.disable(),t.hide(0,0,n,i),t.events.enable()}))})),this.mainDataSet!=this.dataItems&&this.mainDataSet.each((function(t){t.events.disable(),t.hide(0,0,n,i),t.events.enable()}));var d=t.prototype.hide.call(this,h);return d&&!d.isFinished()&&d.delay(u),p&&!p.isFinished()&&(d=p),this.validateDataElements(),d},e.prototype.handleDataItemWorkingValueChange=function(e,i){t.prototype.handleDataItemWorkingValueChange.call(this,e,i),Kt(this.baseAxis.series.iterator(),(function(t){(t.stacked||t.stackedSeries)&&t.invalidateProcessedData()}))},e.prototype.getStackValue=function(t,e){var i=this,n=this.xAxis,r=this.yAxis;if(this.stacked&&n&&r){var a,s=this.chart,o=s.series.indexOf(this);n!=this.baseAxis&&n instanceof Ds&&(a=this.xField),r!=this.baseAxis&&r instanceof Ds&&(a=this.yField),a&&(t.setCalculatedValue(a,0,"stack"),Gt(s.series.range(0,o).backwards().iterator(),(function(s){if(s.xAxis==n&&s.yAxis==r&&s.className==i.className){s.stackedSeries=i;var o=s.dataItems.getIndex(t.index);if(o&&o.hasValue(i._xValueFields)&&o.hasValue(i._yValueFields)){var l=t.getValue(a),h=void 0,p=o.getValue(a)+o.getValue(a,"stack");if(h=e?o.getWorkingValue(a)+o.getValue(a,"stack"):o.getValue(a)+o.getValue(a,"stack"),!i.stackToNegative)return t.setCalculatedValue(a,h,"stack"),!1;if(l>=0&&p>=0||l<0&&p<0)return t.setCalculatedValue(a,h,"stack"),!1;if(!s.stacked)return!1}else if(!s.stacked)return!1}return!0})))}},Object.defineProperty(e.prototype,"stackToNegative",{get:function(){return this.getPropertyValue("stackToNegative")},set:function(t){this.setPropertyValue("stackToNegative",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"xField",{get:function(){return this._xField},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"yField",{get:function(){return this._yField},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"xOpenField",{get:function(){return this._xOpenField},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"yOpenField",{get:function(){return this._yOpenField},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tooltipXField",{get:function(){return this._tooltipXField?this._tooltipXField:this._xField},set:function(t){this._tooltipXField=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tooltipYField",{get:function(){return this._tooltipYField?this._tooltipYField:this._yField},set:function(t){this._tooltipYField=t},enumerable:!0,configurable:!0}),e.prototype.min=function(t){return this._tmin.getKey(t.uid)},e.prototype.max=function(t){return this._tmax.getKey(t.uid)},e.prototype.selectionMin=function(t){return this._smin.getKey(t.uid)},e.prototype.selectionMax=function(t){return this._smax.getKey(t.uid)},e.prototype.processConfig=function(e){if(e){if(_(e.baseAxis)&&O(e.baseAxis)&&(this.map.hasKey(e.baseAxis)?e.baseAxis=this.map.getKey(e.baseAxis):(this.processingErrors.push("[XYSeries ("+(this.name||"unnamed")+')] No axis with id "'+e.baseAxis+'" found for `baseAxis`.'),delete e.baseAxis)),_(e.xAxis)&&O(e.xAxis)&&(this.map.hasKey(e.xAxis)?e.xAxis=this.map.getKey(e.xAxis):(this.processingErrors.push("[XYSeries ("+(this.name||"unnamed")+')] No axis with id "'+e.xAxis+'" found for `xAxis`.'),delete e.xAxis)),_(e.yAxis)&&O(e.yAxis)&&(this.map.hasKey(e.yAxis)?e.yAxis=this.map.getKey(e.yAxis):(this.processingErrors.push("[XYSeries ("+(this.name||"unnamed")+')] No axis with id "'+e.yAxis+'" found for `yAxis`.'),delete e.yAxis)),_(e.axisRanges)&&I(e.axisRanges))for(var i=0,n=e.axisRanges.length;i0&&(r=!1),t.yAxis==i.yAxis&&e.scrollbarChart.yAxes.length>0&&(a=!1))})),i.events.on("beforedisposed",(function(){e.series.removeValue(i)}));var s=new bn,o=i.clone();if((Yi.onlyShowOnViewport||Yi.queue)&&this.addDisposer(this.chart.events.on("removedfromqueue",(function(){n.invalidateData()}))),Oi()&&(o.stroke=ke("#aaaaaa"),o.fill=o.stroke,o.propertyFields.fill=void 0,o.propertyFields.stroke=void 0),i.scrollbarSeries=o,r){var l=i.xAxis.clone();if(n.xAxes.moveValue(l),l.title.disabled=!0,l.rangeChangeDuration=0,(d=l.renderer).ticks.template.disabled=!0,d.inside=!0,d.labels.template.inside=!0,d.line.strokeOpacity=0,d.minLabelPosition=.02,d.maxLabelPosition=.98,d.line.disabled=!0,d.axisFills.template.disabled=!0,d.baseGrid.disabled=!0,d.grid.template.strokeOpacity=.05,d.minWidth=void 0,d.minHeight=void 0,d.padding(0,0,0,0),d.chart=n,d.margin(0,0,0,0),l.width=c(100),d.labels.template.fillOpacity=.5,l.maxZoomCount=void 0,l.minZoomCount=void 0,l instanceof ks){var h=l,p=i.xAxis;h.groupCount=5*p.groupCount,h.min=void 0,h.max=void 0,this._disposers.push(h.clonedFrom.events.on("extremeschanged",(function(){D(h.clonedFrom.minDefined)&&(h.min=h.clonedFrom.minDefined),D(h.clonedFrom.maxDefined)&&(h.max=h.clonedFrom.maxDefined)}),void 0,!1))}else if(l instanceof Ds){var u=l;u.min=void 0,u.max=void 0,D(u.clonedFrom.minDefined)||(u.min=void 0),D(u.clonedFrom.maxDefined)||(u.max=void 0),this._disposers.push(u.clonedFrom.events.on("extremeschanged",(function(){D(u.clonedFrom.minDefined)&&(u.min=u.clonedFrom.min),D(u.clonedFrom.maxDefined)&&(u.max=u.clonedFrom.max)}),void 0,!1))}o.xAxis=l}else this.scrollbarChart.xAxes.each((function(t){t.clonedFrom==i.xAxis&&(o.xAxis=t)}));if(a){var d,f=i.yAxis.clone();if(n.yAxes.moveValue(f),f.title.disabled=!0,f.rangeChangeDuration=0,(d=f.renderer).ticks.template.disabled=!0,d.inside=!0,d.labels.template.inside=!0,d.line.strokeOpacity=0,d.minLabelPosition=.02,d.maxLabelPosition=.98,d.line.disabled=!0,d.axisFills.template.disabled=!0,d.grid.template.stroke=s.getFor("background"),d.baseGrid.disabled=!0,d.grid.template.strokeOpacity=.05,d.minWidth=void 0,d.minHeight=void 0,d.chart=n,d.padding(0,0,0,0),d.margin(0,0,0,0),f.height=c(100),d.labels.template.fillOpacity=.5,o.yAxis=f,f.maxZoomCount=void 0,f.minZoomCount=void 0,f instanceof ks){var g=f;g.min=void 0,g.max=void 0;p=i.yAxis;f.groupCount=5*p.groupCount,this._disposers.push(g.clonedFrom.events.on("extremeschanged",(function(){D(g.clonedFrom.minDefined)&&(g.min=g.clonedFrom.minDefined),D(g.clonedFrom.maxDefined)&&(g.max=g.clonedFrom.maxDefined)})))}else if(f instanceof Ds){var m=f;m.min=void 0,m.max=void 0,D(m.clonedFrom.minDefined)||(m.min=void 0),D(m.clonedFrom.maxDefined)||(m.max=void 0),this._disposers.push(m.clonedFrom.events.on("extremeschanged",(function(){D(m.clonedFrom.minDefined)&&(m.min=m.clonedFrom.minDefined),D(m.clonedFrom.maxDefined)&&(m.max=m.clonedFrom.maxDefined)})))}}else this.scrollbarChart.yAxes.each((function(t){t.clonedFrom==i.yAxis&&(o.yAxis=t)}));o.rangeChangeDuration=0,o.interpolationDuration=0,o.defaultState.transitionDuration=0,o.showOnInit=!1,this._disposers.push(o.events.on("validated",this.zoomOutAxes,this,!1)),this._disposers.push(i.events.on("datavalidated",(function(){o.data!=i.data&&(o.data=i.data)}),void 0,!1)),o.defaultState.properties.visible=!0,n.series.push(o),this.updateByOrientation()}},e.prototype.updateByOrientation=function(){var t=this;this._scrollbarChart&&(Kt(this._scrollbarChart.xAxes.iterator(),(function(e){var i=e.renderer;"vertical"==t.orientation?(i.grid.template.disabled=!0,i.labels.template.disabled=!0,i.minGridDistance=10):(i.grid.template.disabled=!1,i.labels.template.disabled=!1,i.minGridDistance=e.clonedFrom.renderer.minGridDistance)})),Kt(this._scrollbarChart.yAxes.iterator(),(function(e){var i=e.renderer;"horizontal"==t.orientation?(i.grid.template.disabled=!0,i.labels.template.disabled=!0,i.minGridDistance=10):(i.grid.template.disabled=!1,i.labels.template.disabled=!1,i.minGridDistance=e.clonedFrom.renderer.minGridDistance)})))},e.prototype.handleSeriesRemoved=function(t){var e=t.oldValue,i=this.scrollbarChart;i.series.each((function(t){t&&t.clonedFrom==e&&i.series.removeValue(t)})),0==i.series.length&&(i.xAxes.clear(),i.yAxes.clear());try{e.events.off("validated",this.zoomOutAxes,this)}catch(t){}},Object.defineProperty(e.prototype,"scrollbarChart",{get:function(){return this._scrollbarChart},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"chart",{get:function(){return this._chart.get()},set:function(t){this._chart.get()!==t&&(this._chart.set(t,t.events.on("datavalidated",this.handleDataChanged,this,!1)),this.handleDataChanged(),this._scrollbarChart.dataProvider=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"unselectedOverlay",{get:function(){return this._unselectedOverlay},enumerable:!0,configurable:!0}),e.prototype.handleDataChanged=function(){this.chart.data!=this.scrollbarChart.data?this.scrollbarChart.data=this.chart.data:this.scrollbarChart.invalidateRawData()},e.prototype.zoomOutAxes=function(){var t=this.scrollbarChart;Kt(t.xAxes.iterator(),(function(t){t.zoom({start:0,end:1},!0,!0)})),Kt(t.yAxes.iterator(),(function(t){t.zoom({start:0,end:1},!0,!0)}))},e.prototype.updateThumb=function(e){if(void 0===e&&(e=!0),t.prototype.updateThumb.call(this,e),this._unselectedOverlay){var i=this.thumb,n=i.pixelX||0,r=i.pixelY||0,a=i.pixelWidth||0,s=i.pixelHeight||0,o="";"horizontal"==this.orientation?(o=Qr({x:-1,y:0,width:n,height:s}),o+=Qr({x:n+a,y:0,width:(this.pixelWidth||0)-n-a,height:s})):(o=Qr({x:0,y:0,width:a,height:r}),o+=Qr({x:0,y:r+s,width:a,height:(this.pixelHeight||0)-r-s})),this._unselectedOverlay.path=o}},e.prototype.processConfig=function(e){if(e&&_(e.series)&&I(e.series))for(var i=0,n=e.series.length;i0){var i=e.maxZoomFactor/e.maxZoomCount;if(F(e.end-e.start,3)<1/i)return t=!0,!1}else if(F(e.start,3)>0||F(e.end,3)<1)return t=!0,!1;return!0})),Gt(this.yAxes.iterator(),(function(e){if(e.toggleZoomOutButton){if(e.maxZoomCount>0){var i=e.maxZoomFactor/e.maxZoomCount;if(F(e.end-e.start,3)<1/i)return t=!0,!1}else if(F(e.start,3)>0||F(e.end,3)<1)return t=!0,!1;return!0}})),this.seriesAppeared||(t=!1),t?this.zoomOutButton.show():this.zoomOutButton.hide()}},e.prototype.seriesAppeared=function(){var t=!1;return Kt(this.series.iterator(),(function(e){if(!e.appeared)return t=!1,!1})),t},e.prototype.handleYAxisRangeChange=function(){var t=this.getCommonAxisRange(this.yAxes);this.scrollbarY&&this.zoomAxes(this.yAxes,t,!0),this.toggleZoomOutButton(),this.updateScrollbar(this.scrollbarY,t)},e.prototype.updateScrollbar=function(t,e){t&&(t.skipRangeEvents(),t.start=e.start,t.end=e.end)},e.prototype.getCommonAxisRange=function(t){var e,i;return t.each((function(t){if(!t.zoomable||t instanceof Ds&&t.syncWithAxis);else{var n=t.start,r=t.end;t.renderer.inversed&&(n=1-t.end,r=1-t.start),(!D(e)||ni)&&(i=r)}})),{start:e,end:i}},e.prototype.updateXAxis=function(t){var e=t.axis;t.opposite?(e.parent=this.topAxesContainer,e.toFront()):(e.parent=this.bottomAxesContainer,e.toBack()),e.renderer&&e.renderer.processRenderer()},e.prototype.updateYAxis=function(t){var e=t.axis;t.opposite?(e.parent=this.rightAxesContainer,e.toBack()):(e.parent=this.leftAxesContainer,e.toFront()),e.renderer&&e.renderer.processRenderer()},e.prototype.processAxis=function(t){var e=this;t instanceof Vs&&this._dataUsers.moveValue(t);var i=t.renderer;i.gridContainer.parent=this.plotContainer,i.gridContainer.toBack(),i.breakContainer.parent=this.plotContainer,i.breakContainer.toFront(),i.breakContainer.zIndex=10,t.addDisposer(new Pt((function(){e.dataUsers.removeValue(t)}))),i.bulletsContainer.parent=this.axisBulletsContainer,this._disposers.push(t.events.on("positionchanged",(function(){var n=fi({x:0,y:0},t,e.axisBulletsContainer);t.renderer instanceof ws&&(i.bulletsContainer.y=n.y),t.renderer instanceof Ts&&(i.bulletsContainer.x=n.x)}),void 0,!1)),this.plotContainer.events.on("maxsizechanged",(function(){e.inited&&(t.invalidateDataItems(),e.updateSeriesMasks())}),t,!1)},e.prototype.updateSeriesMasks=function(){Oi()&&this.series.each((function(t){var e=t.mainContainer.mask;t.mainContainer.mask=void 0,t.mainContainer.mask=e}))},e.prototype.handleSeriesRemoved=function(e){var i=e.oldValue;i&&(i.xAxis&&(i.xAxis.series.removeValue(i),i.xAxis.invalidateProcessedData()),i.yAxis&&(i.yAxis.series.removeValue(i),i.yAxis.invalidateProcessedData()),this.series.each((function(t){t.resetExtremes()}))),t.prototype.handleSeriesRemoved.call(this,e)},Object.defineProperty(e.prototype,"xAxes",{get:function(){return this._xAxes||(this._xAxes=new pe,this._xAxes.events.on("inserted",this.processXAxis,this,!1),this._xAxes.events.on("removed",this.handleAxisRemoval,this,!1),this._disposers.push(new le(this._xAxes,!1))),this._xAxes},enumerable:!0,configurable:!0}),e.prototype.handleAxisRemoval=function(t){var e=t.oldValue;this.dataUsers.removeValue(e),e.autoDispose&&e.dispose()},Object.defineProperty(e.prototype,"yAxes",{get:function(){return this._yAxes||(this._yAxes=new pe,this._yAxes.events.on("inserted",this.processYAxis,this,!1),this._yAxes.events.on("removed",this.handleAxisRemoval,this,!1),this._disposers.push(new le(this._yAxes,!1))),this._yAxes},enumerable:!0,configurable:!0}),e.prototype.handleSeriesAdded=function(e){try{t.prototype.handleSeriesAdded.call(this,e);var i=e.newValue;0!=this.xAxes.length&&0!=this.yAxes.length||(se.removeFromInvalidComponents(i),i.dataInvalid=!1),i.xAxis,i.yAxis,i.maskBullets=i.maskBullets,null==i.fill&&(this.patterns?(_(i.stroke)||(i.stroke=this.colors.next()),i.fill=this.patterns.next(),_(i.fillOpacity)&&(i.fill.backgroundOpacity=i.fillOpacity),i.stroke instanceof Ie&&(i.fill.stroke=i.stroke,i.fill.fill=i.stroke)):i.fill=this.colors.next()),_(i.stroke)||(i.stroke=i.fill)}catch(t){this.raiseCriticalError(t)}},Object.defineProperty(e.prototype,"cursor",{get:function(){return this._cursor},set:function(t){this._cursor!=t&&(this._cursor&&this.removeDispose(this._cursor),this._cursor=t,t&&(this._disposers.push(t),t.chart=this,t.shouldClone=!1,t.parent=this._cursorContainer,t.events.on("cursorpositionchanged",this.handleCursorPositionChange,this,!1),t.events.on("zoomstarted",this.handleCursorZoomStart,this,!1),t.events.on("zoomended",this.handleCursorZoomEnd,this,!1),t.events.on("panstarted",this.handleCursorPanStart,this,!1),t.events.on("panning",this.handleCursorPanning,this,!1),t.events.on("panended",this.handleCursorPanEnd,this,!1),t.events.on("behaviorcanceled",this.handleCursorCanceled,this,!1),t.events.on("hidden",this.handleHideCursor,this,!1),t.zIndex=Number.MAX_SAFE_INTEGER-1,this.tapToActivate&&this.setTapToActivate(this.tapToActivate)))},enumerable:!0,configurable:!0}),e.prototype.handleCursorPositionChange=function(){var t=this.cursor;if(t.visible&&!t.isHiding){var e=this.cursor.xPosition,i=this.cursor.yPosition;this.showSeriesTooltip({x:e,y:i});var n=[],r=t.snapToSeries;if(r&&!t.downPoint){r instanceof js&&(r=[r]);var a=[];pt(r,(function(t){if(!t.isHidden&&!t.isHiding){var r=t.xAxis,s=t.yAxis;r instanceof Ds&&!(r instanceof ks)&&s instanceof Ds&&!(s instanceof ks)?(t.dataItems.each((function(t){a.push(t)})),ct(n,t.yAxis),ct(n,t.xAxis)):(t.baseAxis==t.xAxis&&(ct(n,t.yAxis),a.push(r.getSeriesDataItem(t,r.toAxisPosition(e),!0))),t.baseAxis==t.yAxis&&(ct(n,t.xAxis),a.push(s.getSeriesDataItem(t,s.toAxisPosition(i),!0))))}}));var s=this.getClosest(a,e,i);s&&(this.series.each((function(t){var e=s.component;t!=e&&(t.hideTooltip(),t.xAxis!=e.xAxis&&(t.xAxis.hideTooltip(),n.push(t.xAxis)),t.yAxis!=e.yAxis&&(t.yAxis.hideTooltip(),n.push(t.yAxis)))})),s.component.showTooltipAtDataItem(s),t.handleSnap(s.component))}this._seriesPoints=[],this._cursorXPosition!=e&&this.showAxisTooltip(this.xAxes,e,n),this._cursorYPosition!=i&&this.showAxisTooltip(this.yAxes,i,n),this.arrangeTooltips&&this.sortSeriesTooltips(this._seriesPoints),this.legend&&this.legend.afterDraw()}},e.prototype.getClosest=function(t,e,i){var n,r=1/0;return ut(t,(function(t){if(t){var a=t.component.xAxis,s=t.component.yAxis,o=a.positionToCoordinate(a.toGlobalPosition(a.toAxisPosition(e))),l=s.positionToCoordinate(s.toGlobalPosition(s.toAxisPosition(i))),h=t.component.xField,p=t.component.yField;if(a instanceof Ds&&!D(t.getValue(h)))return!0;if(s instanceof Ds&&!D(t.getValue(p)))return!0;var u=a.positionToCoordinate(a.toGlobalPosition(a.getPositionX(t,h,t.locations[h],"valueX"))),d=s.positionToCoordinate(s.toGlobalPosition(s.getPositionY(t,p,t.locations[p],"valueY"))),c=Math.sqrt(Math.pow(o-u,2)+Math.pow(l-d,2));return c0){var e=this.cursor;if(e&&D(e.maxTooltipDistance)){var i,n,r=ci({x:e.point.x,y:e.point.y},e),a=1/0;pt(t,(function(t){var e=t.series,s=t.point;if(s){var o={x:s.x,y:s.y},l=Math.abs(X(o,r));l0&&pt(s,(function(t){i!=t.series&&t.series.hideTooltip(0)})),s=[{series:i,point:n}])),t=s}var o=ci({x:-.5,y:-.5},this.plotContainer),l=ci({x:this.plotContainer.pixelWidth+.5,y:this.plotContainer.pixelHeight+.5},this.plotContainer),h=0,p=[];pt(t,(function(t){var e=t.point;e&&st(e,{x:o.x,y:o.y,width:l.x-o.x,height:l.y-o.y})&&(p.push({point:e,series:t.series}),h+=e.y)})),t=p;var u=this.series.getIndex(0),d=!1;u&&u.yAxis&&u.yAxis.renderer.inversed&&(d=!0),d?t.sort((function(t,e){return me(t.point.y,e.point.y)})):(t.sort((function(t,e){return me(e.point.y,t.point.y)})),t.reverse());var c=h/t.length,f=yi({x:0,y:0},this.svgContainer.SVGContainer).y;if(t.length>0){var g=o.y,m=l.y;bi({x:0,y:g},this);var y=!1;if(c>g+(m-g)/2)for(var v=m,b=t.length-1;b>=0;b--){var x=(C=t[b].series).tooltip,_=t[b].point.y;if(x.setBounds({x:0,y:-f,width:this.pixelWidth,height:v+f}),x.invalid&&x.validate(),x.toBack(),(v=ci({x:0,y:x.label.pixelY-x.pixelY+_-x.pixelMarginTop},x).y)<-f){y=!0;break}}if(c<=g+(m-g)/2||y)for(var P=g,w=(b=0,t.length);b0||t.dataItems.length>0)&&t.showTooltipAtPosition(e)}))},e.prototype.getUpdatedRange=function(t,e){if(t){var i,n;t.renderer.inversed?(Y(e),i=1-t.end,n=1-t.start):(i=t.start,n=t.end);var r=n-i;return{start:i+e.start*r,end:i+e.end*r}}},e.prototype.handleCursorZoomEnd=function(t){var e=this.cursor,i=e.behavior;if("zoomX"==i||"zoomXY"==i){var n=e.xRange;n&&this.xAxes.length>0&&((n=this.getUpdatedRange(this.xAxes.getIndex(0),n)).priority="start",this.zoomAxes(this.xAxes,n))}if("zoomY"==i||"zoomXY"==i){var r=e.yRange;r&&this.yAxes.length>0&&((r=this.getUpdatedRange(this.yAxes.getIndex(0),r)).priority="start",this.zoomAxes(this.yAxes,r))}this.handleHideCursor()},e.prototype.handleCursorPanStart=function(t){var e=this.xAxes.getIndex(0);e&&(this._panStartXRange={start:e.start,end:e.end},e.renderer.inversed&&(this._panStartXRange=Y(this._panStartXRange)));var i=this.yAxes.getIndex(0);i&&(this._panStartYRange={start:i.start,end:i.end},i.renderer.inversed&&(this._panStartYRange=Y(this._panStartYRange)))},e.prototype.handleCursorPanEnd=function(t){var e=this.cursor,i=e.behavior;if(this._panEndXRange&&("panX"==i||"panXY"==i)){var n=this._panEndXRange,r=this._panStartXRange,a=0;n.start<0&&(a=n.start),r.end>1?n.end>r.end&&(a=n.end-r.end):n.end>1&&(a=n.end-1),this.zoomAxes(this.xAxes,{start:n.start-a,end:n.end-a},!1,e.snapOnPan),this._panEndXRange=void 0,this._panStartXRange=void 0}if(this._panEndYRange&&("panY"==i||"panXY"==i)){a=0;(n=this._panEndYRange).start<0&&(a=n.start),n.end>1&&(a=n.end-1),this.zoomAxes(this.yAxes,{start:n.start-a,end:n.end-a},!1,e.snapOnPan),this._panEndYRange=void 0,this._panStartYRange=void 0}},e.prototype.handleCursorCanceled=function(){this._panEndXRange=void 0,this._panStartXRange=void 0},e.prototype.handleCursorPanning=function(t){var e=this.cursor,i=e.behavior,n=e.maxPanOut;if(this._panStartXRange&&("panX"==i||"panXY"==i)){var r=this._panStartXRange,a=e.xRange,s=this.getCommonAxisRange(this.xAxes),o=r.end-r.start,l=a.start*(s.end-s.start),h=Math.max(-n,l+r.start),p=Math.min(l+r.end,1+n);h<=0&&(p=h+o),p>=1&&(h=p-o);var u={start:h,end:p};this._panEndXRange=u,this.zoomAxes(this.xAxes,u,!1,!1,e.maxPanOut)}if(this._panStartYRange&&("panY"==i||"panXY"==i)){r=this._panStartYRange,a=e.yRange,s=this.getCommonAxisRange(this.yAxes),o=r.end-r.start,l=a.start*(s.end-s.start),h=Math.max(-n,l+r.start),p=Math.min(l+r.end,1+n);h<=0&&(p=h+o),p>=1&&(h=p-o);u={start:h,end:p};this._panEndYRange=u,this.zoomAxes(this.yAxes,u,!1,!1,e.maxPanOut)}this.handleHideCursor()},e.prototype.handleYAxisSet=function(t){},e.prototype.handleCursorZoomStart=function(t){},Object.defineProperty(e.prototype,"scrollbarX",{get:function(){return this._scrollbarX},set:function(t){var e=this;this._scrollbarX&&this.removeDispose(this._scrollbarX),this._scrollbarX=t,t&&(this._disposers.push(t),t.parent=this.topAxesContainer,t.shouldClone=!1,t.startGrip.exportable=!1,t.endGrip.exportable=!1,t.toBack(),t.orientation="horizontal",t.events.on("rangechanged",this.handleXScrollbarChange,this,!1),this.events.on("datavalidated",(function(){return t.updateThumb(!1)}),this,!1),t.adapter.add("positionValue",(function(t){var i=e.xAxes.getIndex(0);return i&&(t.value=i.getPositionLabel(i.renderer.inversed?1-t.position:t.position)),t})))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollbarY",{get:function(){return this._scrollbarY},set:function(t){var e=this;this._scrollbarY&&this.removeDispose(this._scrollbarY),this._scrollbarY=t,t&&(this._disposers.push(t),t.parent=this.rightAxesContainer,t.startGrip.exportable=!1,t.shouldClone=!1,t.endGrip.exportable=!1,t.toFront(),t.orientation="vertical",t.events.on("rangechanged",this.handleYScrollbarChange,this,!1),this.events.on("datavalidated",(function(){return t.updateThumb(!1)}),this,!1),t.adapter.add("positionValue",(function(t){var i=e.yAxes.getIndex(0);return i&&(t.value=i.getPositionLabel(t.position)),t})))},enumerable:!0,configurable:!0}),e.prototype.handleXScrollbarChange=function(t){if(this.inited){var e=t.target,i=e.range;0==i.start&&(i.priority="start"),1==i.end&&(i.priority="end"),i=this.zoomAxes(this.xAxes,i),e.fixRange(i)}},e.prototype.handleYScrollbarChange=function(t){if(this.inited){var e=t.target,i=e.range;1==i.end&&(i.priority="end"),0==i.start&&(i.priority="start"),i=this.zoomAxes(this.yAxes,i),e.fixRange(i)}},e.prototype.zoomAxes=function(t,e,i,n,r,a){var s={start:0,end:1};this.showSeriesTooltip();var o=e;return this.dataInvalid||Kt(t.iterator(),(function(t){var l=t.maxZoomFactor;if(D(t.minZoomCount)&&(l/=t.minZoomCount),a&&1/(e.end-e.start)>=l);else if(t.zoomable){if(e=t.renderer.inversed?Y(o):o,t.hideTooltip(0),n)if(t instanceof Vs){var h=t.getCellEndPosition(0)-t.getCellStartPosition(0);e.start=t.roundPosition(e.start+h/2-t.startLocation*h,t.startLocation),e.end=t.roundPosition(e.end-h/2+(1-t.endLocation)*h,t.endLocation)}else e.start=t.roundPosition(e.start+1e-4,0,t.startLocation),e.end=t.roundPosition(e.end+1e-4,0,t.endLocation);var p=t.zoom(e,i,i,r);t.renderer.inversed&&(p=Y(p)),s=p}})),s},Object.defineProperty(e.prototype,"maskBullets",{get:function(){return this.getPropertyValue("maskBullets")},set:function(t){this.setPropertyValue("maskBullets",t,!0)&&this.bulletsContainer&&(this.bulletsContainer.mask=t?this._bulletMask:void 0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"arrangeTooltips",{get:function(){return this.getPropertyValue("arrangeTooltips")},set:function(t){this.setPropertyValue("arrangeTooltips",t,!0)},enumerable:!0,configurable:!0}),e.prototype.handleWheel=function(t){var e=this.plotContainer,i=di(mi(t.point,this.htmlContainer,this.svgContainer.cssScale),e),n=t.shift.y;this.handleWheelReal(n,this.mouseWheelBehavior,i)},e.prototype.handleHorizontalWheel=function(t){var e=this.plotContainer,i=di(mi(t.point,this.htmlContainer,this.svgContainer.cssScale),e);this.handleWheelReal(t.shift.x,this.horizontalMouseWheelBehavior,i)},e.prototype.handleWheelReal=function(t,e,i){if(0!=t){var n=this.plotContainer,r=this.getCommonAxisRange(this.xAxes),a=this.getCommonAxisRange(this.yAxes),s=.1;if("panX"==e||"panXY"==e){var o=r.end-r.start,l=Math.max(-0,r.start+s*t/100*(r.end-r.start)),h=Math.min(r.end+s*t/100*(r.end-r.start),1);l<=0&&(h=l+o),h>=1&&(l=h-o),this.zoomAxes(this.xAxes,{start:l,end:h})}if("panY"==e||"panXY"==e){t*=-1;var p=a.end-a.start,u=Math.max(-0,a.start+s*t/100*(a.end-a.start)),d=Math.min(a.end+s*t/100*(a.end-a.start),1);u<=0&&(d=u+p),d>=1&&(u=d-p),this.zoomAxes(this.yAxes,{start:u,end:d})}if("zoomX"==e||"zoomXY"==e){var c=i.x/n.maxWidth,f=this.xAxes.getIndex(0).toAxisPosition(c);l=Math.max(-0,r.start-s*(r.end-r.start)*t/100*c);l=Math.min(l,f);h=Math.min(r.end+s*(r.end-r.start)*t/100*(1-c),1);h=Math.max(h,f),this.zoomAxes(this.xAxes,{start:l,end:h},void 0,void 0,void 0,!0)}if("zoomY"==e||"zoomXY"==e){var g=i.y/n.maxHeight,m=this.yAxes.getIndex(0).toAxisPosition(g);u=Math.max(-0,a.start-s*(a.end-a.start)*t/100*(1-g));u=Math.min(u,m);d=Math.min(a.end+s*t/100*g*(a.end-a.start),1);d=Math.max(d,m),this.zoomAxes(this.yAxes,{start:u,end:d},void 0,void 0,void 0,!0)}}},Object.defineProperty(e.prototype,"mouseWheelBehavior",{get:function(){return this.getPropertyValue("mouseWheelBehavior")},set:function(t){this.setPropertyValue("mouseWheelBehavior",t)&&("none"!=t?(this._mouseWheelDisposer=this.plotContainer.events.on("wheel",this.handleWheel,this,!1),this._disposers.push(this._mouseWheelDisposer)):this._mouseWheelDisposer&&(this.plotContainer.wheelable=!1,this.plotContainer.hoverable=!1,this._mouseWheelDisposer.dispose()))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"horizontalMouseWheelBehavior",{get:function(){return this.getPropertyValue("horizontalMouseWheelBehavior")},set:function(t){this.setPropertyValue("horizontalMouseWheelBehavior",t)&&("none"!=t?(this._mouseWheelDisposer2=this.plotContainer.events.on("wheel",this.handleHorizontalWheel,this,!1),this._disposers.push(this._mouseWheelDisposer2)):this._mouseWheelDisposer2&&(this.plotContainer.wheelable=!1,this.plotContainer.hoverable=!1,this._mouseWheelDisposer2.dispose()))},enumerable:!0,configurable:!0}),e.prototype.dataSourceDateFields=function(e){var i=this;return e=t.prototype.dataSourceDateFields.call(this,e),Kt(this.series.iterator(),(function(t){e=i.populateDataSourceFields(e,t.dataFields,["dateX","dateY","openDateX","openDateY"])})),e},e.prototype.dataSourceNumberFields=function(e){var i=this;return e=t.prototype.dataSourceDateFields.call(this,e),Kt(this.series.iterator(),(function(t){e=i.populateDataSourceFields(e,t.dataFields,["valueX","valueY","openValueX","openValueY"])})),e},e.prototype.processConfig=function(e){if(e){var i=[],n=[];if(_(e.xAxes)&&I(e.xAxes))for(var r=0,a=e.xAxes.length;r0;){var n=this.dataItems.getIndex(0);n&&i.dataItems.remove(n),i.dataUsers.each((function(t){var e=t.dataItems.getIndex(0);e&&t.dataItems.remove(e)})),i._parseDataFrom--,e--}i.invalidateData()}},e.prototype.removeData=function(e){this.scrollbarX instanceof Ls&&this.removeScrollbarData(this.scrollbarX,e),this.scrollbarY instanceof Ls&&this.removeScrollbarData(this.scrollbarY,e),t.prototype.removeData.call(this,e)},e.prototype.setTapToActivate=function(e){t.prototype.setTapToActivate.call(this,e),this.cursor&&(this.cursor.interactions.isTouchProtected=e,this.plotContainer.interactions.isTouchProtected=e)},e.prototype.handleTapToActivate=function(){t.prototype.handleTapToActivate.call(this),this.cursor&&(this.cursor.interactions.isTouchProtected=!1,this.plotContainer.interactions.isTouchProtected=!1)},e.prototype.handleTapToActivateDeactivation=function(){t.prototype.handleTapToActivateDeactivation.call(this),this.cursor&&(this.cursor.interactions.isTouchProtected=!0,this.plotContainer.interactions.isTouchProtected=!0)},e}(ps);se.registeredClasses.XYChart=Rs,Mr.push({relevant:Vr.maybeXS,state:function(t,e){if(t instanceof Rs&&t.scrollbarX){var i=t.states.create(e);return t.scrollbarX.states.create(e).properties.disabled=!0,i}return null}}),Mr.push({relevant:Vr.maybeXS,state:function(t,e){if(t instanceof Rs&&t.scrollbarY){var i=t.states.create(e);return t.scrollbarY.states.create(e).properties.disabled=!0,i}return null}});var Bs=function(t){function e(){var e=t.call(this)||this;e.className="LineSeriesSegment",e.isMeasured=!1,e.interactionsEnabled=!1,e.layout="none";var i=e.createChild(xr);e.fillSprite=i,i.shouldClone=!1,i.setElement(e.paper.add("path")),i.isMeasured=!1,e._disposers.push(i);var n=e.createChild(xr);return e.strokeSprite=n,n.shouldClone=!1,n.fill=ke(),n.setElement(e.paper.add("path")),n.isMeasured=!1,e._disposers.push(n),e}return a(e,t),e.prototype.drawSegment=function(t,e,i,n){if(!this.disabled)if(t.length>0&&e.length>0&&D(t[0].x)&&D(t[0].y)){var r=zr({x:t[0].x-.2,y:t[0].y-.2})+zr(t[0]),a=this.series;"bezier"==a.smoothing?r+=new va(i,n).smooth(t):"monotoneX"==a.smoothing?r+=new Ca({closed:!1}).smooth(t):"monotoneY"==a.smoothing&&(r+=new Oa({closed:!1}).smooth(t)),0==this.strokeOpacity||0==this.strokeSprite.strokeOpacity||(this.strokeSprite.path=r),(this.fillOpacity>0||this.fillSprite.fillOpacity>0)&&D(e[0].x)&&D(e[0].y)&&(r+=Ur(e[0]),"bezier"==a.smoothing?r+=new va(i,n).smooth(e):"monotoneX"==a.smoothing?r+=new Ca({closed:!1}).smooth(e):"monotoneY"==a.smoothing&&(r+=new Oa({closed:!1}).smooth(e)),r+=Ur(t[0]),r+=" Z",this.fillSprite.path=r)}else this.fillSprite.path="",this.strokeSprite.path=""},e.prototype.copyFrom=function(e){t.prototype.copyFrom.call(this,e);var i=this.strokeSprite;Yt(e,i.properties,br),i.events.copyFrom(e.strokeSprite.events),i.fillOpacity=0;var n=this.fillSprite;Yt(e,n.properties,br),n.events.copyFrom(e.fillSprite.events),n.strokeOpacity=0},e}(Pr);se.registeredClasses.LineSeriesSegment=Bs;var Ns=function(t){function e(){var e=t.call(this)||this;return e.className="DurationAxisDataItem",e.applyTheme(),e}return a(e,t),e}(Os),Hs=function(t){function e(){var e=t.call(this)||this;return e._baseUnit="second",e.className="DurationAxis",e.setPropertyValue("maxZoomFactor",1e6),e.applyTheme(),e}return a(e,t),e.prototype.formatLabel=function(t,e){return this.durationFormatter.format(t,e||this.axisDurationFormat)},e.prototype.adjustMinMax=function(e,i,n,r,a){var s,o,l,p,u=this.baseUnit;if(this.setPropertyValue("maxPrecision",0),"millisecond"==u||"second"==u||"minute"==u||"hour"==u){r<=1&&(r=1),r=Math.round(r);var d=e,c=i;0===n&&(n=Math.abs(i));var f,g=[60,30,20,15,10,2,1],m=1;"hour"==u&&(g=[24,12,6,4,2,1]);try{for(var y=h(g),v=y.next();!v.done;v=y.next()){var b=v.value;if(n/b>r){m=b;break}}}catch(t){s={error:t}}finally{try{v&&!v.done&&(o=y.return)&&o.call(y)}finally{if(s)throw s.error}}var x=Math.ceil((i-e)/m/r),_=Math.log(Math.abs(x))*Math.LOG10E,P=Math.pow(10,Math.floor(_))/10;f=m*(x=(p=x/P,g.reduce((function(t,e){return Math.abs(e-p)=0&&(e=0),(i+=f)>0&&c<=0&&(i=0)),l={min:e,max:i,step:f}}else l=t.prototype.adjustMinMax.call(this,e,i,n,r,a);return this.axisDurationFormat=this.durationFormatter.getFormat(l.step,l.max,this.baseUnit),l},Object.defineProperty(e.prototype,"tooltipDurationFormat",{get:function(){return this._tooltipDurationFormat},set:function(t){this._tooltipDurationFormat=t},enumerable:!0,configurable:!0}),e.prototype.getTooltipText=function(t){var e=F(this.positionToValue(t),this._stepDecimalPlaces),i=this.formatLabel(e,this.tooltipDurationFormat);return this._adapterO?this._adapterO.apply("getTooltipText",i):i},Object.defineProperty(e.prototype,"baseUnit",{get:function(){return this._baseUnit},set:function(t){this._baseUnit!=t&&(this._baseUnit=t,this.durationFormatter.baseUnit=t,this.invalidate())},enumerable:!0,configurable:!0}),e.prototype.copyFrom=function(e){t.prototype.copyFrom.call(this,e),this.baseUnit=e.baseUnit},e}(Ds);se.registeredClasses.DurationAxis=Hs,se.registeredClasses.DurationAxisDataItem=Ns;var Ws=function(t){function e(){var e=t.call(this)||this;return e.className="LineSeriesDataItem",e}return a(e,t),e}(Fs),Ys=function(t){function e(){var e=t.call(this)||this;return e.minDistance=.5,e.segments=new ue(e.createSegment()),e.segments.template.applyOnClones=!0,e._disposers.push(new le(e.segments)),e._disposers.push(e.segments.template),e._segmentsIterator=new Qt(e.segments,(function(){return e.segments.create()})),e._segmentsIterator.createNewItems=!0,e.className="LineSeries",e.strokeOpacity=1,e.fillOpacity=0,e.connect=!0,e.tensionX=1,e.tensionY=1,e.autoGapCount=1.1,e.smoothing="bezier",e.segmentsContainer=e.mainContainer.createChild(Pr),e.segmentsContainer.isMeasured=!1,e.bulletsContainer.toFront(),e.applyTheme(),e}return a(e,t),e.prototype.applyInternalDefaults=function(){t.prototype.applyInternalDefaults.call(this),_(this.readerTitle)||(this.readerTitle=this.language.translate("Line Series"))},e.prototype.createSegment=function(){return new Bs},e.prototype.createDataItem=function(){return new Ws},e.prototype.setInitialWorkingValues=function(t){var e=this._yAxis.get(),i=this._xAxis.get();if(this.appeared&&this.visible){var n=this.dataItems.getIndex(t.index-1);if(t.component=this,this.baseAxis==i&&e instanceof Ds){var r=e.minZoomed;if(n&&(r=n.values.valueY.workingValue),t.setWorkingValue("valueY",r,0),t.setWorkingValue("valueY",t.values.valueY.value),i instanceof ks)t.setWorkingLocation("dateX",t.locations.dateX-1,0),t.setWorkingLocation("dateX",t.locations.dateX);else if(i instanceof Hs&&n){var a=t.valueX;t.setWorkingValue("valueX",n.valueX,0),t.setWorkingValue("valueX",a)}}if(this.baseAxis==e&&i instanceof Ds){var s=i.minZoomed;if(n&&(s=n.values.valueX.workingValue),t.setWorkingValue("valueX",s,0),t.setWorkingValue("valueX",t.values.valueX.value),e instanceof ks)t.setWorkingLocation("dateY",t.locations.dateX-1,0),t.setWorkingLocation("dateY",t.locations.dateY);else if(e instanceof Hs&&n){a=t.valueY;t.setWorkingValue("valueY",n.valueY,0),t.setWorkingValue("valueY",a)}}}else this.baseAxis==i&&e instanceof Ds&&(i instanceof ks&&t.setWorkingLocation("dateX",t.locations.dateX),i instanceof Vs&&t.setWorkingLocation("categoryX",t.locations.categoryX)),this.baseAxis==e&&i instanceof Ds&&(e instanceof ks&&t.setWorkingLocation("dateY",t.locations.dateY),e instanceof Vs&&t.setWorkingLocation("categoryY",t.locations.categoryY))},e.prototype.updateLegendValue=function(e,i){t.prototype.updateLegendValue.call(this,e,i),e&&e.segment&&(this.tooltipColorSource=e.segment)},e.prototype.validate=function(){var e=this;t.prototype.validate.call(this),this.xAxis&&this.yAxis&&(this._segmentsIterator.reset(),this.openSegmentWrapper(this._adjustedStartIndex),Kt(this.axisRanges.iterator(),(function(t){e.openSegmentWrapper(e._adjustedStartIndex,t)})),Kt(this._segmentsIterator.iterator(),(function(t){t.__disabled=!0})))},e.prototype.sliceData=function(){for(var t=this.startIndex,e=this.endIndex,i=this.startIndex-1;i>=0;i--){if((r=this.dataItems.getIndex(i))&&r.hasValue(this._xValueFields)&&r.hasValue(this._yValueFields)){t=i;break}}this._adjustedStartIndex=this.findAdjustedIndex(t,["stroke","strokeWidth","strokeDasharray","strokeOpacity","fill","fillOpacity","opacity"]);i=this.endIndex;for(var n=this.dataItems.length;i=0;a--){var s=i.dataItems.getIndex(a);if(s&&_(s.properties[e])){t>a&&(t=a);break}}})),t},e.prototype.openSegmentWrapper=function(t,e){var i={index:t,axisRange:e};do{i=this.openSegment(i.index,i.axisRange)}while(i)},e.prototype.getSegment=function(){var t=this._segmentsIterator.getFirst();return t.series=this,t.isDisposed()?(this.segments.removeValue(t),this.getSegment()):t},e.prototype.openSegment=function(t,e){var i=!1,n=[];t=Math.min(t,this.dataItems.length);var r,a=Math.min(this._workingEndIndex,this.dataItems.length);this._workingEndIndex=Math.min(this._workingEndIndex,this.dataItems.length);var s=!1,o=this.getSegment();o.strokeDasharray=void 0,o.__disabled=!1,e?(o.parent=e.contents,Yt(e.contents,o,br)):(Yt(this,o,br),o.filters.clear(),o.parent=this.segmentsContainer),this.group.node.removeAttribute("fill");for(var l=this.connect,h=!1,p=t;p=i;o--){var l=this.dataItems.getIndex(o);l.hasValue(this._xValueFields)&&l.hasValue(this._yValueFields)&&this.addPoints(s,l,this.xOpenField,this.yOpenField,!0)}else{var h=this.baseAxis,p=e.length,u=this.xAxis,d=this.yAxis;p>0&&(h==u?(s.push({x:e[p-1].x,y:d.basePoint.y}),s.push({x:e[0].x,y:d.basePoint.y})):(s.push({x:u.basePoint.x,y:e[p-1].y}),s.push({x:u.basePoint.x,y:e[0].y})))}return this.drawSegment(t,e,s),a&&n++,n0){var a=t.createChild(_r);Yt(this,a,br),a.width=i,a.height=n,a.y=0,a.strokeOpacity=0,a.visible=!0,r.y=0}var s=t.dataItem;s.color=this.stroke,s.colorOrig=this.fill,Gt(this.bullets.iterator(),(function(r){if(r instanceof ns&&!r.copyToLegendMarker)return!1;var a=!1;if(r instanceof Pr&&Kt(r.children.iterator(),(function(t){if(t instanceof Lr)return a=!0,!0})),!a){var s=r.clone();return s.parent=t,s.isMeasured=!0,s.tooltipText=void 0,s.x=i/2,e.fillOpacity>0?s.y=0:s.y=n/2,s.visible=!0,_(s.fill)||(s.fill=e.fill),_(s.stroke)||(s.stroke=e.stroke),!1}}))},e.prototype.disposeData=function(){t.prototype.disposeData.call(this),this.segments.clear()},Object.defineProperty(e.prototype,"autoGapCount",{get:function(){return this.getPropertyValue("autoGapCount")},set:function(t){this.setPropertyValue("autoGapCount",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"smoothing",{get:function(){return this.getPropertyValue("smoothing")},set:function(t){this.setPropertyValue("smoothing",t,!0)},enumerable:!0,configurable:!0}),e}(js);se.registeredClasses.LineSeries=Ys,se.registeredClasses.LineSeriesDataItem=Ws;var Xs=function(t){function e(){var e=t.call(this)||this;return e.className="RadarSeriesDataItem",e.setLocation("dateX",0,0),e.setLocation("dateY",0,0),e.setLocation("categoryX",0,0),e.setLocation("categoryY",0,0),e.applyTheme(),e}return a(e,t),e}(Ws),zs=function(t){function e(){var e=t.call(this)||this;return e.className="RadarSeries",e.connectEnds=!0,e.applyTheme(),e}return a(e,t),e.prototype.validate=function(){this.chart.invalid&&this.chart.validate(),t.prototype.validate.call(this)},e.prototype.createDataItem=function(){return new Xs},e.prototype.getPoint=function(t,e,i,n,r,a,s){a||(a="valueX"),s||(s="valueY");var o=X({x:this.yAxis.getX(t,i,r,s),y:this.yAxis.getY(t,i,r,s)});0==o&&(o=1e-5);var l=this.xAxis.getAngle(t,e,n,a),h=this.chart.startAngle,p=this.chart.endAngle;return lp?void 0:{x:o*B(l),y:o*E(l)}},e.prototype.addPoints=function(t,e,i,n,r){var a=this.getPoint(e,i,n,e.locations[i],e.locations[n]);a&&t.push(a)},e.prototype.getMaskPath=function(){var t=this.yAxis.renderer;return qr(t.startAngle,t.endAngle-t.startAngle,t.pixelRadius,t.pixelInnerRadius)},e.prototype.drawSegment=function(e,i,n){var r=this.yAxis.renderer;this.connectEnds&&360==Math.abs(r.endAngle-r.startAngle)&&(this.dataFields[this._xOpenField]||this.dataFields[this._yOpenField]||this.stacked)&&(i.push(i[0]),n.length>0&&n.unshift(n[n.length-1])),t.prototype.drawSegment.call(this,e,i,n)},Object.defineProperty(e.prototype,"connectEnds",{get:function(){return this.getPropertyValue("connectEnds")},set:function(t){this.setPropertyValue("connectEnds",t,!0)},enumerable:!0,configurable:!0}),e.prototype.positionBulletReal=function(t,e,i){var n=this.xAxis,r=this.yAxis;(en.end||ir.end)&&(t.visible=!1),t.moveTo(this.xAxis.renderer.positionToPoint(e,i))},e.prototype.setXAxis=function(e){t.prototype.setXAxis.call(this,e),this.updateRendererRefs()},e.prototype.setYAxis=function(e){t.prototype.setYAxis.call(this,e),this.updateRendererRefs()},e.prototype.updateRendererRefs=function(){var t=this.xAxis.renderer,e=this.yAxis.renderer;t.axisRendererY=e},e}(Ys);se.registeredClasses.RadarSeries=zs,se.registeredClasses.RadarSeriesDataItem=Xs;var Us=function(t){function e(e){var i=t.call(this,e)||this;return i.className="AxisFillCircular",i.element=i.paper.add("path"),i.radius=c(100),i.applyTheme(),i}return a(e,t),e.prototype.draw=function(){if(t.prototype.draw.call(this),!this.__disabled&&!this.disabled&&this.axis){var e=this.axis.renderer;this.fillPath=e.getPositionRangePath(this.startPosition,this.endPosition,this.radius,_(this.innerRadius)?this.innerRadius:e.innerRadius,this.cornerRadius),this.path=this.fillPath}},Object.defineProperty(e.prototype,"innerRadius",{get:function(){return this.getPropertyValue("innerRadius")},set:function(t){this.setPercentProperty("innerRadius",t,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(t){this.setPercentProperty("radius",t,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cornerRadius",{get:function(){return this.getPropertyValue("cornerRadius")},set:function(t){this.setPropertyValue("cornerRadius",t,!0)},enumerable:!0,configurable:!0}),e}(ms);se.registeredClasses.AxisFillCircular=Us;var Gs=function(t){function e(){var e=t.call(this)||this;return e.className="GridCircular",e.pixelPerfect=!1,e.applyTheme(),e}return a(e,t),Object.defineProperty(e.prototype,"innerRadius",{get:function(){return this.getPropertyValue("innerRadius")},set:function(t){this.setPercentProperty("innerRadius",t,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(t){this.setPercentProperty("radius",t,!0,!1,10,!1)},enumerable:!0,configurable:!0}),e}(ys);se.registeredClasses.GridCircular=Gs;var Ks=function(t){function e(){var e=t.call(this)||this;return e.fdx=0,e.fdy=0,e.className="AxisLabelCircular",e.padding(0,0,0,0),e.location=.5,e.locationOnPath=.5,e.radius=0,e.isMeasured=!1,e.applyTheme(),e}return a(e,t),Object.defineProperty(e.prototype,"relativeRotation",{get:function(){return this.getPropertyValue("relativeRotation")},set:function(t){if(this.setPropertyValue("relativeRotation",t,!0),!_(t)){this.rotation=void 0;var e=this.dataItem;e&&e.component&&e.component.invalidateDataItems()}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(t){this.setPercentProperty("radius",t,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bent",{get:function(){return this.getPropertyValue("bent")},set:function(t){this.setPropertyValue("bent",t,!0),this.setPropertyValue("wrap",!1),this.setPropertyValue("horizontalCenter","none"),this.setPropertyValue("verticalCenter","none"),t?(this.setPropertyValue("dx",0),this.setPropertyValue("dy",0),this.setPropertyValue("x",0),this.setPropertyValue("y",0),this.setPropertyValue("rotation",0),this.fdx=0,this.fdy=0,this.textAlign="middle"):this.textPathElement&&(this.textPathElement.dispose(),this.textPathElement=void 0)},enumerable:!0,configurable:!0}),e.prototype.pixelRadius=function(t){var e=1;return this.inside&&(e=-1),Ye(this.radius,t)*e},e.prototype.pixelRadiusY=function(t,e){var i=1;this.inside&&(i=-1);var n=this.radius;return D(n)?Ye(n*=e/t,t)*i:Ye(n,e)*i},e.prototype.fixPosition=function(t,e,i,n,r){D(i)||(i=e),D(n)||(n=0),D(r)||(r=0);var a={x:e*B(t),y:i*E(t)};this.invalid&&this.validate();var s=!1,o=this.radius;(o instanceof d&&o.value<0||o<0)&&(s=!0);var l=this.relativeRotation,h=this.pixelRadius(e);if(this.bent){var p={x:(e+h)*B(t+180),y:(i+h*i/e)*E(t+180)};return this.path=zr(p)+Zr(t+180,360,e+h,i+h*i/e),void(this.textPathElement&&this.textPathElement.attr({startOffset:100*this.locationOnPath+"%"}))}if(D(l)){this.horizontalCenter="none",this.verticalCenter="none",t=nt(t,-180,180);var u=this.bbox.width,c=this.bbox.height,f=this.pixelPaddingBottom,g=this.pixelPaddingTop,m=this.pixelPaddingLeft,y=this.pixelPaddingRight;t>90||t<-90?-90==l&&(l=90,u=0):(-90==l&&(c=-c),90==l&&(l=-90,u=-m-y,c=-c-g-f)),this.rotation=l+t+90;var v=E(l)/2,b=B(l)/2,x=this.rotation;this.dx=c*v*E(x)-u*b*B(x),this.dy=-c*v*B(x)-u*b*E(x),this.inside?t>90||t<-90?h-=(f+g)*B(l)+(m+y)*E(l):h+=(f+this.bbox.height+g)*B(l)+(m+y+this.bbox.width)*E(l):h+=(c+f+g)*B(l)+(u+m+y)*E(l),a.x+=B(t)*h,a.y+=E(t)*h*i/e}else this.horizontalCenter="middle",this.verticalCenter="middle",s?(this.dx=0,this.dy=0,a.x=(e+h)*B(t),a.y=(i+h*i/e)*E(t)):(this.dy=this._measuredHeight/2*E(t),this.dx=this._measuredWidth/2*B(t),a.x+=B(t)*h,a.y+=E(t)*h*i/e);a.x+=n,a.y+=r,this.fdx=this.dx,this.fdy=this.dy,this.moveTo(a)},e}(vs);se.registeredClasses.AxisLabelCircular=Ks;var Zs=function(t){function e(){var e=t.call(this)||this;return e.pixelRadiusReal=0,e.layout="none",e.className="AxisRendererCircular",e.isMeasured=!1,e.startAngle=-90,e.endAngle=270,e.useChartAngles=!0,e.radius=c(100),e.isMeasured=!1,e.grid.template.location=0,e.labels.template.location=0,e.labels.template.radius=15,e.ticks.template.location=0,e.ticks.template.pixelPerfect=!1,e.tooltipLocation=0,e.line.strokeOpacity=0,e.applyTheme(),e}return a(e,t),e.prototype.setAxis=function(e){var i=this;t.prototype.setAxis.call(this,e),e.isMeasured=!1;var n=e.tooltip;n.adapter.add("dx",(function(t,e){var n=di({x:e.pixelX,y:e.pixelY},i);return i.pixelRadius*Math.cos(Math.atan2(n.y,n.x))-n.x})),n.adapter.add("dy",(function(t,e){var n=di({x:e.pixelX,y:e.pixelY},i);return i.pixelRadius*Math.sin(Math.atan2(n.y,n.x))-n.y}))},e.prototype.validate=function(){this.chart&&this.chart.invalid&&this.chart.validate(),t.prototype.validate.call(this)},Object.defineProperty(e.prototype,"axisLength",{get:function(){return 2*Math.PI*this.pixelRadius},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(t){this.setPercentProperty("radius",t,!1,!1,10,!1)&&this.axis&&this.axis.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pixelRadius",{get:function(){return Xe(this.radius,this.pixelRadiusReal)||0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"innerRadius",{get:function(){var t=this.chart,e=this.getPropertyValue("innerRadius");if(t){if(_(e)){if(e instanceof d&&t){var i=t.mr,n=e.value;e=c(100*(n=Math.max(i*n,i-Math.min(t.plotContainer.innerHeight,t.plotContainer.innerWidth))/i))}}else(e=t.innerRadius)instanceof d&&t&&(e=c(e.value*t.innerRadiusModifyer*100));return e}},set:function(t){this.setPercentProperty("innerRadius",t,!1,!1,10,!1)&&this.axis&&this.axis.invalidate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"useChartAngles",{get:function(){return this.getPropertyValue("useChartAngles")},set:function(t){this.setPropertyValue("useChartAngles",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pixelInnerRadius",{get:function(){return Xe(this.innerRadius,this.pixelRadiusReal)||0},enumerable:!0,configurable:!0}),e.prototype.positionToPoint=function(t,e){D(e)||(e=1);var i=this.positionToCoordinate(t),n=this.startAngle+(this.endAngle-this.startAngle)*i/this.axisLength,r=this.pixelRadius,a=this.pixelInnerRadius;if(this.axisRendererY){var s=L(this.axisRendererY.positionToCoordinate(e),0,1/0);return 0==s&&(s=1e-6),{x:s*B(n),y:s*E(n)}}return{x:B(n)*a+(r-a)*B(n)*e,y:E(n)*a+(r-a)*E(n)*e}},e.prototype.positionToAngle=function(t){var e=this.axis,i=(this.endAngle-this.startAngle)/(e.end-e.start);return F(e.renderer.inversed?this.startAngle+(e.end-t)*i:this.startAngle+(t-e.start)*i,3)},e.prototype.angleToPosition=function(t){var e=this.axis,i=(this.endAngle-this.startAngle)/(e.end-e.start);return F(e.renderer.inversed?e.end-(t-this.startAngle)/i:(t-this.startAngle)/i+e.start,5)},e.prototype.updateAxisLine=function(){var t=this.pixelRadius,e=this.startAngle,i=H(360,this.endAngle-e);this.line.path=zr({x:t*B(e),y:t*E(e)})+Zr(e,i,t,t)},e.prototype.updateGridElement=function(t,e,i){e+=(i-e)*t.location;var n=this.positionToPoint(e);if(D(n.x)&&D(n.y)&&t.element){var r=M*Math.atan2(n.y,n.x),a=Xe(_(t.radius)?t.radius:c(100),this.pixelRadius),s=Xe(t.innerRadius,this.pixelRadius);t.zIndex=0;var o=Xe(D(s)?s:this.innerRadius,this.pixelRadiusReal,!0);D(o)||(o=0),t.path=zr({x:o*B(r),y:o*E(r)})+Ur({x:a*B(r),y:a*E(r)})}this.toggleVisibility(t,e,0,1)},e.prototype.updateTickElement=function(t,e,i){e+=(i-e)*t.location;var n=this.positionToPoint(e);if(t.element){var r=this.pixelRadius,a=M*Math.atan2(n.y,n.x),s=t.length;t.inside&&(s=-s),t.zIndex=1,t.path=zr({x:r*B(a),y:r*E(a)})+Ur({x:(r+s)*B(a),y:(r+s)*E(a)})}this.toggleVisibility(t,e,0,1)},e.prototype.updateBullet=function(t,e,i){var n=.5;t instanceof Ps&&(n=t.location),e+=(i-e)*n;var r=this.positionToPoint(e),a=this.pixelRadius,s=M*Math.atan2(r.y,r.x);r={x:a*B(s),y:a*E(s)},this.positionItem(t,r),this.toggleVisibility(t,e,0,1)},e.prototype.updateLabelElement=function(t,e,i,n){_(n)||(n=t.location),e+=(i-e)*n,t.fixPosition(this.positionToAngle(e),this.pixelRadius),t.zIndex=2,this.toggleVisibility(t,e,this.minLabelPosition,this.maxLabelPosition)},e.prototype.fitsToBounds=function(t){return!0},Object.defineProperty(e.prototype,"startAngle",{get:function(){return this.getPropertyValue("startAngle")},set:function(t){this.setPropertyValue("startAngle",t)&&(this.invalidateAxisItems(),this.axis&&this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endAngle",{get:function(){return this.getPropertyValue("endAngle")},set:function(t){this.setPropertyValue("endAngle",t)&&(this.invalidateAxisItems(),this.axis&&this.axis.invalidateSeries())},enumerable:!0,configurable:!0}),e.prototype.getPositionRangePath=function(t,e,i,n,r){var a="";if(D(t)&&D(e)){_(i)||(i=this.radius),t=N(t,this.axis.start),(e=H(e,this.axis.end))0&&p&&l&&l instanceof Vs){var u=l.renderer.grid.template.location,d=l.getAngle(p.dataItems.getIndex(0),"categoryX",u);n=zr({x:r*B(d),y:r*E(d)});for(var c=1;c0&&u&&p&&p instanceof Vs){var c=p.renderer.grid.template.location,f=p.getAngle(u.dataItems.getIndex(0),"categoryX",c);i=zr({x:s*B(f),y:s*E(f)});for(var g=1;g=0;g--)i+=Ur({x:a*B(f=p.getAngle(u.dataItems.getIndex(g),"categoryX",c)),y:a*E(f)})}else i=qr(o,l,s,a);return i},e.prototype.updateBreakElement=function(t){var e=t.startLine,i=t.endLine,n=t.fillShape,r=t.startPoint,a=t.endPoint;e.radius=Math.abs(r.y),i.radius=Math.abs(a.y),n.radius=Math.abs(a.y),n.innerRadius=Math.abs(r.y)},e.prototype.createBreakSprites=function(t){t.startLine=new Da,t.endLine=new Da,t.fillShape=new Da},e.prototype.updateTooltip=function(){if(this.axis){var t=this.axisAngle;t<0&&(t+=360);var e="vertical";(t>45&&t<135||t>225&&t<315)&&(e="horizontal"),this.axis.updateTooltip(e,{x:-4e3,y:-4e3,width:8e3,height:8e3})}},e.prototype.updateTickElement=function(t,e,i){e+=(i-e)*t.location;var n=this.positionToPoint(e);if(t.element){var r=it(this.axisAngle+90);r/90!=Math.round(r/90)?t.pixelPerfect=!1:t.pixelPerfect=!0;var a=-t.length;t.inside&&(a*=-1),t.path=zr({x:0,y:0})+Ur({x:a*B(r),y:a*E(r)})}this.positionItem(t,n),this.toggleVisibility(t,e,0,1)},e.prototype.updateBullet=function(t,e,i){var n=.5;t instanceof Ps&&(n=t.location),e+=(i-e)*n;var r=this.positionToPoint(e);this.positionItem(t,r),this.toggleVisibility(t,e,0,1)},e.prototype.positionToCoordinate=function(t){var e=this.axis,i=e.axisFullLength,n=this.pixelInnerRadius;return F(e.renderer.inversed?(e.end-t)*i+n:(t-e.start)*i+n,1)},e.prototype.pointToPosition=function(t){var e=X(t)-this.pixelInnerRadius;return this.coordinateToPosition(e)},Object.defineProperty(e.prototype,"chart",{get:function(){return this._chart.get()},set:function(t){this._chart.set(t,null)},enumerable:!0,configurable:!0}),e}(ws);se.registeredClasses.AxisRendererRadial=qs;var $s=function(t){function e(){var e=t.call(this)||this;return e.className="RadarChartDataItem",e.applyTheme(),e}return a(e,t),e}(Es),Js=function(t){function e(){var e=t.call(this)||this;e._axisRendererX=Zs,e._axisRendererY=qs,e.innerRadiusModifyer=1,e.mr=1,e.className="RadarChart",e.startAngle=-90,e.endAngle=270,e.radius=c(80),e.innerRadius=0;var i=e.plotContainer.createChild(Pr);return i.shouldClone=!1,i.layout="absolute",i.align="center",i.valign="middle",e.seriesContainer.parent=i,e.radarContainer=i,e.bulletsContainer.parent=i,e.axisBulletsContainer=i,e._cursorContainer=i,e.chartContainer.events.on("maxsizechanged",e.invalidate,e,!1),e._bulletMask=i.createChild(Br),e._bulletMask.shouldClone=!1,e._bulletMask.element=e.paper.add("path"),e._bulletMask.opacity=0,e.applyTheme(),e}return a(e,t),e.prototype.applyInternalDefaults=function(){t.prototype.applyInternalDefaults.call(this),_(this.readerTitle)||(this.readerTitle=this.language.translate("Radar chart"))},e.prototype.processAxis=function(e){t.prototype.processAxis.call(this,e);var i=e.renderer;i.gridContainer.parent=i,i.breakContainer.parent=i,e.parent=this.radarContainer,i.toBack()},e.prototype.handleXAxisRangeChange=function(){t.prototype.handleXAxisRangeChange.call(this),Kt(this.yAxes.iterator(),(function(t){t.invalidate()}))},e.prototype.handleYAxisRangeChange=function(){t.prototype.handleYAxisRangeChange.call(this),Kt(this.xAxes.iterator(),(function(t){t.invalidate()}))},e.prototype.processConfig=function(e){if(e&&(_(e.cursor)&&!_(e.cursor.type)&&(e.cursor.type="RadarCursor"),_(e.series)&&I(e.series)))for(var i=0,n=e.series.length;ir&&(this.rotation=r+360),this.animate({property:"rotation",to:n},e,i)}},Object.defineProperty(e.prototype,"currentPosition",{get:function(){if(this.axis)return this.axis.renderer.angleToPosition(this.rotation)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(t){this.showValue(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"axis",{get:function(){return this._axis.get()},set:function(t){if(this.axis!=t&&this._axis.set(t,new wt([t.events.on("datavalidated",this.updateValue,this,!1),t.events.on("datarangechanged",this.updateValue,this,!1),t.events.on("dataitemsvalidated",this.updateValue,this,!1),t.events.on("propertychanged",this.invalidate,this,!1)])),t){var e=t.chart;e&&(this.rotation=e.startAngle)}this.parent=t.renderer,this.zIndex=5},enumerable:!0,configurable:!0}),e.prototype.updateValue=function(){this.value=this.value},e.prototype.processConfig=function(e){e&&_(e.axis)&&O(e.axis)&&this.map.hasKey(e.axis)&&(e.axis=this.map.getKey(e.axis)),t.prototype.processConfig.call(this,e)},e}(Pr);se.registeredClasses.ClockHand=Qs;!function(t){function e(){var e=t.call(this)||this;return e.className="GaugeChartDataItem",e.applyTheme(),e}a(e,t)}($s);var to=function(t){function e(){var e=t.call(this)||this;return e.className="GaugeChart",e.startAngle=180,e.endAngle=360,e.hands=new ue(new Qs),e.hands.events.on("inserted",e.processHand,e,!1),e._disposers.push(new le(e.hands)),e._disposers.push(e.hands.template),e.applyTheme(),e}return a(e,t),e.prototype.applyInternalDefaults=function(){t.prototype.applyInternalDefaults.call(this),_(this.readerTitle)||(this.readerTitle=this.language.translate("Gauge chart"))},e.prototype.processHand=function(t){var e=t.newValue;e.axis||(e.axis=this.xAxes.getIndex(0))},e.prototype.configOrder=function(e,i){return e==i?0:"hands"==e?1:"hands"==i?-1:t.prototype.configOrder.call(this,e,i)},e}(Js);se.registeredClasses.GaugeChart=to;var eo=function(t){function e(){var e=t.call(this)||this;return e.className="PercentSeriesDataItem",e.applyTheme(),e}return a(e,t),e.prototype.uidAttr=function(){return this.slice.uidAttr()},e.prototype.hide=function(e,i,n,r){return r||(r=["value"]),t.prototype.hide.call(this,e,i,0,r)},e.prototype.setVisibility=function(e,i){i||(e?this.setWorkingValue("value",this.values.value.value,0,0):this.setWorkingValue("value",0,0,0)),t.prototype.setVisibility.call(this,e,i)},e.prototype.show=function(e,i,n){return n||(n=["value"]),t.prototype.show.call(this,e,i,n)},Object.defineProperty(e.prototype,"category",{get:function(){return this.properties.category},set:function(t){this.setProperty("category",t)},enumerable:!0,configurable:!0}),e.prototype.createLegendMarker=function(t){this.component.createLegendMarker(t,this)},Object.defineProperty(e.prototype,"legendDataItem",{get:function(){return this._legendDataItem},set:function(t){this._legendDataItem=t,t.label&&(t.label.dataItem=this),t.valueLabel&&(t.valueLabel.dataItem=this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tick",{get:function(){var t=this;if(!this._tick){var e=this.component.ticks.create();this._tick=e,this.addSprite(e),this._disposers.push(e),e.parent=this.component.ticksContainer,this._disposers.push(new Pt((function(){t.component&&t.component.ticks.removeValue(e)}))),e.visible=this.visible}return this._tick},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){var t=this;if(!this._label){var e=this.component.labels.create();this.addSprite(e),this._label=e,this._disposers.push(e),e.parent=this.component.labelsContainer,this._disposers.push(new Pt((function(){t.component&&t.component.labels.removeValue(e)}))),e.visible=this.visible}return this._label},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"slice",{get:function(){var t=this;if(!this._slice){var e=this.component,i=e.slices.create();this.addSprite(i),this._slice=i,this._disposers.push(i),i.parent=e.slicesContainer,this._disposers.push(new Pt((function(){e.slices.removeValue(i)}))),i.visible=this.visible,e.itemsFocusable()?(_(this.component.role)||(this.component.role="menu"),_(i.role)||(i.role="menuitem"),i.focusable=!0):(_(this.component.role)||(this.component.role="list"),_(i.role)||(i.role="listitem"),i.focusable=!1),i.focusable&&(i.events.on("focus",(function(n){i.readerTitle=e.populateString(e.itemReaderText,t)}),void 0,!1),i.events.on("blur",(function(t){i.readerTitle=""}),void 0,!1)),i.hoverable&&(i.events.on("over",(function(n){i.readerTitle=e.populateString(e.itemReaderText,t)}),void 0,!1),i.events.on("out",(function(t){i.readerTitle=""}),void 0,!1))}return this._slice},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hiddenInLegend",{get:function(){return this.properties.hiddenInLegend},set:function(t){this.setProperty("hiddenInLegend",t)},enumerable:!0,configurable:!0}),e}(os),io=function(t){function e(){var e=t.call(this)||this;e.className="PercentSeries",e._addAllDataItems=!1,e.colors=new Ua,e.colors.step=1,e.isMeasured=!0,e.calculatePercent=!0;var i=e.createChild(Pr);i.shouldClone=!1,i.isMeasured=!1,e.slicesContainer=i;var n=e.createChild(Pr);n.shouldClone=!1,n.isMeasured=!1,n.layout="none",e.ticksContainer=n;var r=e.createChild(Pr);return r.shouldClone=!1,r.isMeasured=!1,r.layout="none",e.labelsContainer=r,e.alignLabels=!1,e.bulletsContainer.toFront(),e.skipFocusThreshold=50,e.defaultState.transitionEasing=Ai,e.itemReaderText="{category}: {value.percent.formatNumber('#.#')}%",e.applyTheme(),e}return a(e,t),e.prototype.createSlice=function(){return new xr},e.prototype.createTick=function(){return new bs},e.prototype.createLabel=function(){return new Lr},Object.defineProperty(e.prototype,"slices",{get:function(){if(!this._slices){var t=this.createSlice();t.applyOnClones=!0,this._disposers.push(t),this.initSlice(t),this._slices=new ue(t),this._disposers.push(new le(this._slices))}return this._slices},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ticks",{get:function(){if(!this._ticks){var t=this.createTick();t.applyOnClones=!0,this._disposers.push(t),this.initTick(t),this._ticks=new ue(t),this._disposers.push(new le(this._ticks))}return this._ticks},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"labels",{get:function(){if(!this._labels){var t=this.createLabel();t.applyOnClones=!0,this._disposers.push(t),this.initLabel(t),this._labels=new ue(t),this._disposers.push(new le(this._labels))}return this._labels},enumerable:!0,configurable:!0}),e.prototype.createDataItem=function(){return new eo},e.prototype.initSlice=function(t){},e.prototype.initLabel=function(t){t.text="{category}: {value.percent.formatNumber('#.0')}%",t.isMeasured=!1,t.padding(5,5,5,5)},e.prototype.initTick=function(t){},e.prototype.validateDataItems=function(){this.colors.reset(),this.patterns&&this.patterns.reset(),t.prototype.validateDataItems.call(this)},e.prototype.validateDataElement=function(e){var i=e.slice;i&&(null==i.fill?this.patterns?(_(i.stroke)||(i.stroke=this.colors.next()),i.fill=this.patterns.next(),_(i.fillOpacity)&&(i.fill.backgroundOpacity=i.fillOpacity),i.stroke instanceof Ie&&(i.fill.stroke=i.stroke,i.fill.fill=i.stroke)):i.fill=this.colors.next():this.colors.currentStep+=this.colors.step,null==i.stroke&&(i.stroke=i.fill)),t.prototype.validateDataElement.call(this,e),i&&e.bullets.each((function(t,e){null==e.fill&&(e.fill=i.fill),null==e.stroke&&(e.stroke=i.stroke)})),this.updateLegendValue(e)},e.prototype.validateData=function(){t.prototype.validateData.call(this),this.chart&&this.chart.feedLegend()},e.prototype.arrangeLabels=function(t){for(var e=0,i=t.length;e=0;i--){var n=t[i].label;if(n){n.invalid&&n.validate();var r=n.measuredHeight;n.visible||(r=0),i==t.length-1&&(e+=r/2),n.pixelY+r>e&&(n.y=e-r,e=n.y)}}},e.prototype.getNextLabel=function(t,e){if(e.length>=t){var i=e[t];if(i)return i.label&&i.visible?i.label:this.getNextLabel(t+1,e)}},Object.defineProperty(e.prototype,"colors",{get:function(){return this.getPropertyValue("colors")},set:function(t){this.setPropertyValue("colors",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"patterns",{get:function(){return this.getPropertyValue("patterns")},set:function(t){this.setPropertyValue("patterns",t,!0)},enumerable:!0,configurable:!0}),e.prototype.createLegendMarker=function(t,e){Kt(t.children.iterator(),(function(i){var n=e.slice;i.defaultState.properties.fill=n.fill,i.defaultState.properties.stroke=n.stroke,i.defaultState.properties.fillOpacity=n.fillOpacity,i.defaultState.properties.strokeOpacity=n.strokeOpacity,i.fill=n.fill,i.stroke=n.stroke,i.fillOpacity=n.fillOpacity,i.strokeOpacity=n.strokeOpacity,null==i.fill&&(i.__disabled=!0);var r=t.dataItem;r.color=n.fill,r.colorOrig=n.fill,i.addDisposer(n.events.on("propertychanged",(function(t){"fill"==t.property&&(i.__disabled=!1,i.isActive||(i.fill=n.fill),i.defaultState.properties.fill=n.fill,r.color=n.fill,r.colorOrig=n.fill),"stroke"==t.property&&(i.isActive||(i.stroke=n.stroke),i.defaultState.properties.stroke=n.stroke)}),void 0,!1))}))},e.prototype.handleSliceScale=function(t){var e=this,i=t.target.dataItem;i&&i.bullets&&Kt(i.bullets.iterator(),(function(t){var i=t[1];e.positionBullet(i)}))},e.prototype.handleSliceMove=function(t){},e.prototype.copyFrom=function(e){t.prototype.copyFrom.call(this,e),this.slices.template.copyFrom(e.slices.template),this.labels.template.copyFrom(e.labels.template),this.ticks.template.copyFrom(e.ticks.template),this.colors=e.colors.clone()},Object.defineProperty(e.prototype,"alignLabels",{get:function(){return this.getPropertyValue("alignLabels")},set:function(t){this.setAlignLabels(t)},enumerable:!0,configurable:!0}),e.prototype.setAlignLabels=function(t){this.setPropertyValue("alignLabels",t,!0)},Object.defineProperty(e.prototype,"ignoreZeroValues",{get:function(){return this.getPropertyValue("ignoreZeroValues")},set:function(t){this.setPropertyValue("ignoreZeroValues",t,!0)},enumerable:!0,configurable:!0}),e.prototype.updateLegendValue=function(t){if(t){var e=t.legendDataItem,i=t.legendSettings;e&&i&&i&&(i.labelText&&(e.label.text=i.labelText),i.itemLabelText&&(e.label.text=i.itemLabelText),i.valueText&&(e.valueLabel.text=i.valueText),i.itemValueText&&(e.valueLabel.text=i.itemValueText))}},e}(ls);se.registeredClasses.PercentSeries=io,se.registeredClasses.PercentSeriesDataItem=eo,Mr.push({relevant:Vr.maybeXS,state:function(t,e){if(t instanceof io){var i=t.states.create(e);return t.labels.template.states.create(e).properties.disabled=!0,t.ticks.template.states.create(e).properties.disabled=!0,i}return null}});var no=function(t){function e(){var e=t.call(this)||this;return e.className="PercentChartDataItem",e.applyTheme(),e}return a(e,t),e}(hs),ro=function(t){function e(){var e=t.call(this)||this;return e.className="PercentChart",e.align="none",e.valign="none",e.chartContainer.minHeight=50,e.chartContainer.minWidth=50,e.applyTheme(),e}return a(e,t),e.prototype.validateData=function(){t.prototype.validateData.call(this),this.feedLegend()},e.prototype.feedLegend=function(){var t=this.legend;if(t){var e=[];Kt(this.series.iterator(),(function(t){t.hiddenInLegend||Kt(t.dataItems.iterator(),(function(i){i.hiddenInLegend||(e.push(i),i.legendSettings||(i.legendSettings=t.legendSettings))}))})),t.data=e,t.dataFields.name="category"}},e.prototype.createSeries=function(){return new io},e.prototype.setLegend=function(e){t.prototype.setLegend.call(this,e),e&&(e.labels.template.text="{category}",e.valueLabels.template.text="{value.percent.formatNumber('#.0')}%",e.itemContainers.template.events.on("over",(function(t){var e=t.target.dataItem.dataContext;if(e.visible&&!e.isHiding){var i=e.slice;i.dispatchImmediately("over"),i.isHover=!0,i.interactions.isRealHover=!0}})),e.itemContainers.template.events.on("out",(function(t){var e=t.target.dataItem.dataContext.slice;e.dispatchImmediately("out"),e.isHover=!1})))},e}(ps);se.registeredClasses.PercentChart=ro,se.registeredClasses.PercentChartDataItem=no;var ao=function(t){function e(){var e=t.call(this)||this;return e._label=new Ct,e._slice=new Ct,e.className="PieTick",e.element=e.paper.add("polyline"),e._disposers.push(e._label),e._disposers.push(e._slice),e.applyTheme(),e}return a(e,t),e.prototype.draw=function(){t.prototype.draw.call(this);var e=this.slice,i=this.label,n=e.dataItem.component;if(e&&e.radius>0&&i&&i.text){var r=e.dx+e.slice.dx+e.pixelX+e.ix*e.radius*e.scale,a=e.dy+e.slice.dy+e.pixelY+e.iy*e.radiusY*e.scale,s=void 0,o=void 0,l=void 0,h=void 0;if(n.alignLabels)s=i.pixelX-this.length,o=i.pixelY,l=i.pixelX,h=o,"right"==i.horizontalCenter&&(l=(s+=2*this.length)-this.length);else{var p=i.pixelRadius(e.radius);l=s=r+p*e.ix,h=o=a+p*e.iy}this.element.attr({points:[r,a,s,o,l,h]})}},Object.defineProperty(e.prototype,"slice",{get:function(){return this._slice.get()},set:function(t){this._slice.set(t,new wt([t.events.on("transformed",this.invalidate,this),t.events.on("validated",this.invalidate,this)]))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){return this._label.get()},set:function(t){this._label.set(t,t.events.on("transformed",this.invalidate,this,!1))},enumerable:!0,configurable:!0}),e}(bs);se.registeredClasses.PieTick=ao;var so=function(t){function e(){var e=t.call(this)||this;return e.className="PieSeriesDataItem",e.values.radiusValue={},e.applyTheme(),e}return a(e,t),Object.defineProperty(e.prototype,"radiusValue",{get:function(){return this.values.radiusValue.value},set:function(t){this.setValue("radiusValue",t)},enumerable:!0,configurable:!0}),e.prototype.hide=function(e,i,n,r){return t.prototype.hide.call(this,e,i,0,["value","radiusValue"])},e.prototype.show=function(e,i,n){return t.prototype.show.call(this,e,i,["value","radiusValue"])},e}(eo),oo=function(t){function e(){var e=t.call(this)||this;return e.className="PieSeries",e.alignLabels=!0,e.layout="none",e.labels.template.radius=c(5),e.addDisposer(e.labels.template.events.on("enabled",e.invalidate,e,!1)),e.applyTheme(),e}return a(e,t),e.prototype.createSlice=function(){return new aa},e.prototype.createTick=function(){return new ao},e.prototype.createLabel=function(){return new Ks},e.prototype.applyInternalDefaults=function(){t.prototype.applyInternalDefaults.call(this),_(this.readerTitle)||(this.readerTitle=this.language.translate("Pie Slice Series"))},e.prototype.createDataItem=function(){return new so},e.prototype.initSlice=function(t){t.isMeasured=!1,t.defaultState.properties.scale=1,t.observe("scale",this.handleSliceScale,this),t.observe(["dx","dy","x","y","shiftRadius"],this.handleSliceMove,this),t.tooltipText="{category}: {value.percent.formatNumber('#.#')}% ({value.value})",t.states.create("hover").properties.scale=1.05,t.defaultState.properties.shiftRadius=0,t.togglable=!0,t.events.on("toggled",(function(t){t.target.hideTooltip(),t.target.interactions.lastHitPointer&&t.target.interactions.lastHitPointer.touch&&!t.target.isActive&&(t.target.isHover=!1)})),t.states.create("active").properties.shiftRadius=.1},e.prototype.validate=function(){this._leftItems=[],this._rightItems=[],this._currentStartAngle=this.startAngle,this._arcRect=rt(this.startAngle,this.endAngle),this._maxRadiusPercent=0;for(var e=this.startIndex;ethis._maxRadiusPercent&&(this._maxRadiusPercent=i)}t.prototype.validate.call(this),this.alignLabels&&(this.startAngle>this.endAngle?this._rightItems.reverse():this._leftItems.reverse(),this._rightItems.sort((function(t,e){var i=(t.slice.middleAngle+360)%360,n=(e.slice.middleAngle+360)%360;return i>270&&(i-=360),n>270&&(n-=360),in?1:0})),this._leftItems.sort((function(t,e){var i=(t.slice.middleAngle+360)%360,n=(e.slice.middleAngle+360)%360;return in?-1:0})),this.arrangeLabels(this._rightItems),this.arrangeLabels2(this._rightItems),this.arrangeLabels(this._leftItems),this.arrangeLabels2(this._leftItems))},e.prototype.validateDataElement=function(e){if(this.pixelRadius>0){!this.ignoreZeroValues||0!=e.value&&null!=e.value?e.__disabled=!1:e.__disabled=!0;var i=e.slice;if(i.radius=this.pixelRadius,D(e.radiusValue)&&(i.radius=this.pixelInnerRadius+(this.pixelRadius-this.pixelInnerRadius)*e.values.radiusValue.percent/this._maxRadiusPercent),i.innerRadius instanceof d||(i.innerRadius=this.pixelInnerRadius),i.startAngle=this._currentStartAngle,i.arc=Math.abs(e.values.value.percent)*(this.endAngle-this.startAngle)/100,!this.labels.template.disabled){var n=e.label,r=e.tick;r.slice=i,r.label=n;var a=(i.middleAngle+360)%360,s=void 0;if(this.alignLabels){var o=n.pixelRadius(i.radius),l=r.length+o;n.dx=0,n.dy=0,n.verticalCenter="middle";var h=this._arcRect;a>270||a<=90?(l+=(h.width+h.x)*this.pixelRadius,n.horizontalCenter="left",this._rightItems.push(e)):(l-=h.x*this.pixelRadius,n.horizontalCenter="right",this._leftItems.push(e),l*=-1);var p=i.radius+r.length+o;s={x:l,y:i.iy*p},n.moveTo(s)}else{var u=i.depth;D(u)||(u=0),n.fixPosition(i.middleAngle,i.radius,i.radiusY,0,-u)}}this._currentStartAngle+=i.arc,t.prototype.validateDataElement.call(this,e)}},Object.defineProperty(e.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(t){this.setPercentProperty("radius",t,!0,!1,10,!1)&&this.invalidateDataItems()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pixelRadius",{get:function(){return this._pixelRadius},set:function(t){this._pixelRadius!=t&&(this._pixelRadius=t,this.invalidateDataItems())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pixelInnerRadius",{get:function(){return this._pixelInnerRadius},set:function(t){this._pixelInnerRadius!=t&&(this._pixelInnerRadius=t,this.invalidateDataItems())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"innerRadius",{get:function(){return this.getPropertyValue("innerRadius")},set:function(t){this.setPercentProperty("innerRadius",t,!0,!1,10,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startAngle",{get:function(){var t=this.getPropertyValue("startAngle");return D(t)?t:this._startAngleInternal},set:function(t){this.setPropertyValue("startAngle",it(t),!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endAngle",{get:function(){var t=this.getPropertyValue("endAngle");return D(t)?t:this._endAngleInternal},set:function(t){this.setPropertyValue("endAngle",t,!0)},enumerable:!0,configurable:!0}),e.prototype.positionBullet=function(e){t.prototype.positionBullet.call(this,e);var i=e.dataItem.slice,n=e.locationX;D(n)||(n=.5);var r=e.locationY;D(r)||(r=1);var a=i.startAngle+i.arc*n;e.x=r*i.radius*B(a),e.y=r*i.radiusY*E(a)},e.prototype.handleSliceMove=function(t){if(!this.alignLabels){var e=t.target,i=e.dataItem;if(i){var n=i.label;n&&(n.dx=n.fdx+e.dx+e.pixelX,n.dy=n.fdy+e.dy+e.pixelY)}}},Object.defineProperty(e.prototype,"bbox",{get:function(){if(this.definedBBox)return this.definedBBox;var t=this.chart;return t?rt(t.startAngle,t.endAngle,this.pixelRadius):rt(this.startAngle,this.endAngle,this.pixelRadius)},enumerable:!0,configurable:!0}),e}(io);se.registeredClasses.PieSeries=oo,se.registeredClasses.PieSeriesDataItem=so;var lo=function(t){function e(){var e=t.call(this)||this;return e.className="PieChartDataItem",e.applyTheme(),e}return a(e,t),e}(no),ho=function(t){function e(){var e=t.call(this)||this;e.className="PieChart",e.innerRadius=0,e.radius=c(80),e.align="none",e.valign="none",e.startAngle=-90,e.endAngle=270;var i=e.seriesContainer;return i.isMeasured=!0,i.valign="middle",i.align="center",i.layout="absolute",i.width=void 0,i.height=void 0,e.chartContainer.minHeight=50,e.chartContainer.minWidth=50,e.chartContainer.events.on("maxsizechanged",e.updateRadius,e,!1),e.applyTheme(),e}return a(e,t),e.prototype.applyInternalDefaults=function(){t.prototype.applyInternalDefaults.call(this),_(this.readerTitle)||(this.readerTitle=this.language.translate("Pie chart"))},e.prototype.validateLayout=function(){t.prototype.validateLayout.call(this),this.updateRadius()},e.prototype.handleSeriesAdded=function(e){t.prototype.handleSeriesAdded.call(this,e),this._chartPixelRadius=void 0,this.updateSeriesAngles()},e.prototype.updateSeriesAngles=function(){var t=this;this.series.each((function(e){e._startAngleInternal=t.startAngle,e._endAngleInternal=t.endAngle}))},e.prototype.updateRadius=function(){var t=this.chartContainer,e=rt(this.startAngle,this.endAngle,1),i={x:0,y:0,width:0,height:0},n=this.innerRadius;n instanceof d&&(i=rt(this.startAngle,this.endAngle,n.value)),e=q([e,i]);var r=Math.min(t.innerWidth/e.width,t.innerHeight/e.height);D(r)||(r=0);var a=Xe(this.radius,r),s=Xe(this.innerRadius,r),o=(a-s)/this.series.length;a==this._chartPixelRadius&&s==this._chartPixelInnerRadius||(this._chartPixelRadius=a,this._chartPixelInnerRadius=s,Kt($t(this.series.iterator()),(function(t){var e=t[0],i=t[1],n=s+Xe(i.radius,a-s),r=s+Xe(i.innerRadius,a-s);D(n)||(n=s+o*(e+1)),D(r)||(r=s+o*e),i.pixelRadius=n,i.pixelInnerRadius=r})),this.seriesContainer.definedBBox={x:a*e.x,y:a*e.y,width:a*e.width,height:a*e.height},this.seriesContainer.invalidateLayout(),this.bulletsContainer.x=this.seriesContainer.x,this.bulletsContainer.y=this.seriesContainer.y)},Object.defineProperty(e.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(t){this.setPercentProperty("radius",t,!0,!1,10,!1)&&this.invalidateLayout()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"innerRadius",{get:function(){return this.getPropertyValue("innerRadius")},set:function(t){this.setPercentProperty("innerRadius",t,!0,!1,10,!1)},enumerable:!0,configurable:!0}),e.prototype.createSeries=function(){return new oo},Object.defineProperty(e.prototype,"startAngle",{get:function(){return this.getPropertyValue("startAngle")},set:function(t){this.setPropertyValue("startAngle",t)&&(this.updateRadius(),this.updateSeriesAngles())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endAngle",{get:function(){return this.getPropertyValue("endAngle")},set:function(t){this.setPropertyValue("endAngle",t)&&(this.updateRadius(),this.updateSeriesAngles())},enumerable:!0,configurable:!0}),e}(ro);se.registeredClasses.PieChart=ho,se.registeredClasses.PieChartDataItem=lo;var po=function(t){function e(){var e=t.call(this)||this;return e.className="PieSeries3DDataItem",e.values.depthValue={},e.applyTheme(),e}return a(e,t),Object.defineProperty(e.prototype,"depthValue",{get:function(){return this.values.depthValue.value},set:function(t){this.setValue("depthValue",t)},enumerable:!0,configurable:!0}),e}(so),uo=function(t){function e(){var e=t.call(this)||this;return e.className="PieSeries3D",e.applyTheme(),e}return a(e,t),e.prototype.createDataItem=function(){return new po},e.prototype.createSlice=function(){return new Ea},e.prototype.validateDataElement=function(e){var i=e.slice,n=this.depth;D(n)||(n=this.chart.depth);var r=e.values.depthValue.percent;D(r)||(r=100),i.depth=r*n/100;var a=this.angle;D(a)||(a=this.chart.angle),i.angle=a,t.prototype.validateDataElement.call(this,e)},e.prototype.validate=function(){t.prototype.validate.call(this);for(var e=this._workingStartIndex;e=-90&&n<90?i.toFront():n>=90&&i.toBack()}},Object.defineProperty(e.prototype,"depth",{get:function(){return this.getPropertyValue("depth")},set:function(t){this.setPropertyValue("depth",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"angle",{get:function(){return this.getPropertyValue("angle")},set:function(t){this.setPropertyValue("angle",t)},enumerable:!0,configurable:!0}),e.prototype.positionBullet=function(e){t.prototype.positionBullet.call(this,e);var i=e.dataItem.slice;e.y=e.pixelY-i.depth},e}(oo);se.registeredClasses.PieSeries3D=uo,se.registeredClasses.PieSeries3DDataItem=po;!function(t){function e(){var e=t.call(this)||this;return e.className="PieChart3DDataItem",e.applyTheme(),e}a(e,t)}(lo);var co=function(t){function e(){var e=t.call(this)||this;return e.className="PieChart3D",e.depth=20,e.angle=10,e.applyTheme(),e}return a(e,t),Object.defineProperty(e.prototype,"depth",{get:function(){return this.getPropertyValue("depth")},set:function(t){this.setPropertyValue("depth",t)&&this.invalidateDataUsers()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"angle",{get:function(){return this.getPropertyValue("angle")},set:function(t){t=L(t,0,90),this.setPropertyValue("angle",t)&&this.invalidateDataUsers()},enumerable:!0,configurable:!0}),e.prototype.createSeries=function(){return new uo},e}(ho);se.registeredClasses.PieChart3D=co;var fo=function(t){function e(){var e=t.call(this)||this;return e.className="SlicedChartDataItem",e.applyTheme(),e}return a(e,t),e}(no),go=function(t){function e(){var e=t.call(this)||this;return e.className="SlicedChart",e.seriesContainer.layout="horizontal",e.padding(15,15,15,15),e.applyTheme(),e}return a(e,t),e.prototype.applyInternalDefaults=function(){t.prototype.applyInternalDefaults.call(this),_(this.readerTitle)||(this.readerTitle=this.language.translate("Sliced chart"))},e.prototype.validate=function(){t.prototype.validate.call(this)},e}(ro);se.registeredClasses.SlicedChart=go,se.registeredClasses.SlicedChartDataItem=fo;var mo=function(t){function e(){var e=t.call(this)||this;return e.legendSettings=new as,e.className="FlowDiagramNode",e.isMeasured=!1,new bn,e.draggable=!0,e.inert=!0,e.setStateOnChildren=!0,e.events.on("positionchanged",e.invalidateLinks,e,!1),e.events.on("sizechanged",e.invalidateLinks,e,!1),e}return a(e,t),e.prototype.handleHit=function(t){this.isHidden||this.isHiding?this.show():this.hide()},e.prototype.show=function(e){var i=t.prototype.show.call(this,e);return this.outgoingDataItems.each((function(t){(!t.toNode||t.toNode&&!t.toNode.isHidden)&&(t.setWorkingValue("value",t.getValue("value"),e),t.link.show())})),this.incomingDataItems.each((function(t){(!t.fromNode||t.fromNode&&!t.fromNode.isHidden)&&(t.setWorkingValue("value",t.getValue("value"),e),t.link.show())})),i},e.prototype.hide=function(e){var i=t.prototype.hide.call(this,e);return this.outgoingDataItems.each((function(t){t.setWorkingValue("value",0,e),t.link.hide()})),this.incomingDataItems.each((function(t){t.setWorkingValue("value",0,e),t.link.hide()})),i},e.prototype.validate=function(){this.isDisposed()||(t.prototype.validate.call(this),this.invalidateLinks())},e.prototype.invalidateLinks=function(){var t=this;this.outgoingDataItems.each((function(e){var i=e.link;if("fromNode"==i.colorMode&&(i.fill=i.dataItem.fromNode.color),"gradient"==i.colorMode){i.fill=i.gradient,i.stroke=i.gradient;var n=i.gradient.stops.getIndex(0);n&&(n.color=t.color,i.gradient.validate())}})),this.incomingDataItems.each((function(e){var i=e.link;if("toNode"==i.colorMode&&(i.fill=i.dataItem.toNode.color),"gradient"==i.colorMode){i.fill=i.gradient,i.stroke=i.gradient;var n=i.gradient.stops.getIndex(1);n&&(n.color=t.color,i.gradient.validate())}}))},Object.defineProperty(e.prototype,"incomingDataItems",{get:function(){var t=this;if(!this._incomingDataItems){var e=new pe;e.events.on("inserted",(function(){"name"==t.chart.sortBy?t._incomingSorted=Zt(t._incomingDataItems.iterator(),(function(t,e){return te(t.fromName,e.fromName)})):"value"==t.chart.sortBy?t._incomingSorted=Zt(t._incomingDataItems.iterator(),(function(t,e){return ye(me(t.value,e.value))})):t._incomingSorted=t._incomingDataItems.iterator()}),void 0,!1),this._incomingDataItems=e}return this._incomingDataItems},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"outgoingDataItems",{get:function(){var t=this;if(!this._outgoingDataItems){var e=new pe;e.events.on("inserted",(function(){"name"==t.chart.sortBy?t._outgoingSorted=Zt(t._outgoingDataItems.iterator(),(function(t,e){return te(t.fromName,e.fromName)})):"value"==t.chart.sortBy?t._outgoingSorted=Zt(t._outgoingDataItems.iterator(),(function(t,e){return ye(me(t.value,e.value))})):t._outgoingSorted=t._outgoingDataItems.iterator()}),void 0,!1),this._outgoingDataItems=e}return this._outgoingDataItems},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this.getPropertyValue("name")},set:function(t){this.setPropertyValue("name",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"total",{get:function(){return this.getPropertyValue("total")},set:function(t){this.setPropertyValue("total",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalIncoming",{get:function(){return this.getPropertyValue("totalIncoming")},set:function(t){this.setPropertyValue("totalIncoming",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalOutgoing",{get:function(){return this.getPropertyValue("totalOutgoing")},set:function(t){this.setPropertyValue("totalOutgoing",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return this.getPropertyValue("color")},set:function(t){this.setColorProperty("color",t),this._background&&(this._background.fill=t),this.fill=t},enumerable:!0,configurable:!0}),e.prototype.createLegendMarker=function(t){var e=t.pixelWidth,i=t.pixelHeight;t.removeChildren();var n=t.createChild(Er);n.shouldClone=!1,Yt(this,n,br),n.stroke=this.fill,n.copyFrom(this),n.padding(0,0,0,0),n.width=e,n.height=i;var r=t.dataItem;r.color=n.fill,r.colorOrig=n.fill},Object.defineProperty(e.prototype,"legendDataItem",{get:function(){return this._legendDataItem},set:function(t){this._legendDataItem=t,this._legendDataItem.itemContainer.deepInvalidate()},enumerable:!0,configurable:!0}),e}(Pr);se.registeredClasses.FlowDiagramNode=mo;var yo=function(t){function e(){var e=t.call(this)||this;e.className="FlowDiagramLink";var i=new bn;return e.maskBullets=!1,e.colorMode="fromNode",e.layout="none",e.isMeasured=!1,e.startAngle=0,e.endAngle=0,e.strokeOpacity=0,e.verticalCenter="none",e.horizontalCenter="none",e.tooltipText="{fromName}→{toName}:{value.value}",e.tooltipLocation=.5,e.link=e.createChild(xr),e.link.shouldClone=!1,e.link.setElement(e.paper.add("path")),e.link.isMeasured=!1,e.fillOpacity=.2,e.fill=i.getFor("alternativeBackground"),e.applyTheme(),e}return a(e,t),e.prototype.positionBullets=function(){var t=this;Kt(this.bullets.iterator(),(function(e){e.parent=t.bulletsContainer,e.maxWidth=t.maxWidth,e.maxHeight=t.maxHeight,t.positionBullet(e)}))},Object.defineProperty(e.prototype,"bulletsContainer",{get:function(){if(!this._bulletsContainer){var t=this.createChild(Pr);t.shouldClone=!1,t.layout="none",this._bulletsContainer=t}return this._bulletsContainer},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bulletsMask",{get:function(){if(!this._bulletsMask){var t=this.createChild(xr);t.shouldClone=!1,t.setElement(this.paper.add("path")),t.isMeasured=!1,this._bulletsMask=t}return this._bulletsMask},enumerable:!0,configurable:!0}),e.prototype.positionBullet=function(t){var e=t.locationX;D(e)||(e=t.locationY),D(e)||(e=.5);var i=this.middleLine.positionToPoint(e);t.moveTo(i);var n,r=t.propertyFields.rotation;t.dataItem&&(n=t.dataItem.dataContext[r]);D(n)||(n=i.angle),t.rotation=n},Object.defineProperty(e.prototype,"startAngle",{get:function(){return this.getPropertyValue("startAngle")},set:function(t){this.setPropertyValue("startAngle",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endAngle",{get:function(){return this.getPropertyValue("endAngle")},set:function(t){this.setPropertyValue("endAngle",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"colorMode",{get:function(){return this.getPropertyValue("colorMode")},set:function(t){if("gradient"==t){var e=this.fill;this.gradient.stops.clear(),e instanceof Ie&&(this.gradient.addColor(e),this.gradient.addColor(e)),this.fill=this.gradient,this.stroke=this.gradient}this.setPropertyValue("colorMode",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maskBullets",{get:function(){return this.getPropertyValue("maskBullets")},set:function(t){this.setPropertyValue("maskBullets",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tooltipLocation",{get:function(){return this.getPropertyValue("tooltipLocation")},set:function(t){this.setPropertyValue("tooltipLocation",t,!0)},enumerable:!0,configurable:!0}),e.prototype.setFill=function(e){t.prototype.setFill.call(this,e);var i=this._gradient;i&&e instanceof Ie&&(i.stops.clear(),i.addColor(e),i.addColor(e))},e.prototype.measureElement=function(){},Object.defineProperty(e.prototype,"bullets",{get:function(){var t=this;return this._bullets||(this._bullets=new ue(new ns),this._disposers.push(new le(this._bullets)),this._disposers.push(this._bullets.template),this._bullets.events.on("inserted",(function(e){e.newValue.events.on("propertychanged",(function(e){"locationX"!=e.property&&"locationY"!=e.property||t.positionBullet(e.target)}),void 0,!1)}),void 0,!1)),this._bullets},enumerable:!0,configurable:!0}),e.prototype.copyFrom=function(e){t.prototype.copyFrom.call(this,e),this.bullets.copyFrom(e.bullets);var i=this.middleLine;i&&(i instanceof Wr&&e.middleLine instanceof Wr&&i.copyFrom(e.middleLine),i instanceof ta&&e.middleLine instanceof ta&&i.copyFrom(e.middleLine)),this.link.copyFrom(e.link)},e.prototype.getTooltipX=function(){if(this.middleLine)return this.middleLine.positionToPoint(this.tooltipLocation).x},e.prototype.getTooltipY=function(){if(this.middleLine)return this.middleLine.positionToPoint(this.tooltipLocation).y},Object.defineProperty(e.prototype,"gradient",{get:function(){return this._gradient||(this._gradient=new $n),this._gradient},enumerable:!0,configurable:!0}),e}(Pr);se.registeredClasses.FlowDiagramLink=yo;var vo=function(t){function e(){var e=t.call(this)||this;return e.className="FlowDiagramDataItem",e.values.value={},e.applyTheme(),e}return a(e,t),Object.defineProperty(e.prototype,"fromName",{get:function(){return this.properties.fromName},set:function(t){this.setProperty("fromName",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"toName",{get:function(){return this.properties.toName},set:function(t){this.setProperty("toName",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return this.properties.color},set:function(t){this.setProperty("color",Te(t))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.values.value.value},set:function(t){this.setValue("value",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"link",{get:function(){var t=this;if(!this._link){var e=this.component.links.create();this._link=e,this.addSprite(e),this._disposers.push(new Pt((function(){t.component&&t.component.links.removeValue(e)})))}return this._link},enumerable:!0,configurable:!0}),e}(es),bo=function(t){function e(){var e=t.call(this)||this;e.colors=new Ua,e.className="FlowDiagram",e.nodePadding=20,e.sortBy="none",e.sequencedInterpolation=!0,e.colors.step=2,e.minNodeSize=.02;var i=e.chartContainer.createChild(Pr);i.shouldClone=!1,i.layout="none",i.isMeasured=!1,e.linksContainer=i;var n=e.chartContainer.createChild(Pr);return n.shouldClone=!1,n.layout="none",n.isMeasured=!1,e.nodesContainer=n,e.dataItem=e.createDataItem(),e.dataItem.component=e,e.applyTheme(),e}return a(e,t),e.prototype.dispose=function(){t.prototype.dispose.call(this),this.dataItem.dispose()},e.prototype.validateData=function(){var e=this;0==this._parseDataFrom&&this.nodes.clear(),this.sortNodes(),this.colors.reset(),t.prototype.validateData.call(this);var i,n,r=0,a=0;Kt(this.dataItems.iterator(),(function(t){var s=t.fromName;s&&((o=e.nodes.getKey(s))||((o=e.nodes.create(s)).name=s,o.chart=e,o.dataItem=t),t.fromNode=o,t.fromNode.outgoingDataItems.push(t));var o,l=t.toName;l&&((o=e.nodes.getKey(l))||((o=e.nodes.create(l)).name=l,o.chart=e,o.dataItem=t),t.toNode=o,t.toNode.incomingDataItems.push(t));if(!t.fromNode){var h=new Va;h.opacities=[0,1],t.link.strokeModifier=h}if(!t.toNode){var p=new Va;p.opacities=[1,0],t.link.strokeModifier=p}var u=t.value;D(u)&&(r+=u,a++,(i>u||!D(i))&&(i=u),(nthis.dataItems.length||Kt(t.incomingDataItems.iterator(),(function(t){e.checkLoop(t.fromNode)}))},e.prototype.calculateValueHeight=function(){var t=this;this._levelSum={},this._levelNodesCount={},this.maxSum=0;var e,i,n,r=this.dataItem.values.value.sum;Kt(this._sorted,(function(e){var i=e[1];t.getNodeValue(i)})),this.nodes.each((function(e,i){var n=i.level,a=Math.max(i.totalIncoming,i.totalOutgoing);a/rl||!D(n))&&(n=l,t.maxSum=s,i=v(r))})),this._maxSumLevel=i;var a=this._levelNodesCount[this._maxSumLevel],s=(e-(a-1)*this.nodePadding)/this.maxSum;if(s==1/0&&(s=0),D(this.valueHeight)){var o=void 0;try{o=this._heightAnimation.animationOptions[0].to}catch(t){}if(o!=s){var l=this.interpolationDuration;try{l=this.nodes.template.states.getKey("active").transitionDuration}catch(t){}this._heightAnimation=new qi(this,{property:"valueHeight",from:this.valueHeight,to:s},l,this.interpolationEasing).start(),this._disposers.push(this._heightAnimation)}}else this.valueHeight=s},e.prototype.validate=function(){var e=this;t.prototype.validate.call(this),this.calculateValueHeight();var i,n=this.nodesContainer,r={},a=this._levelNodesCount[this._maxSumLevel],s=this.dataItem.values.value.sum;i="horizontal"==this.orientation?this.chartContainer.maxHeight-1:this.chartContainer.maxWidth-1,Kt(this._sorted,(function(t){var o,l,h,p=t[1],u=p.level,d=0,c=e._levelNodesCount[u];switch(e.nodeAlign){case"bottom":d=(e.maxSum-e._levelSum[u])*e.valueHeight-(c-a)*e.nodePadding;break;case"middle":d=(e.maxSum-e._levelSum[u])*e.valueHeight/2-(c-a)*e.nodePadding/2}if(0==e.maxSum)switch(e.nodeAlign){case"bottom":d=i-c*(e.minNodeSize*i+e.nodePadding);break;case"middle":d=i/2-c/2*(e.minNodeSize*i+e.nodePadding)}p.parent=n;var f=Math.max(p.totalIncoming,p.totalOutgoing);if(f/s0){var n=this.nodesContainer,r=0;Kt(this.links.iterator(),(function(t){t.hide(0)})),Kt(this._sorted,(function(t){var e,a=t[1];"horizontal"==i.orientation?(a.dx=-(n.pixelWidth-a.pixelWidth)/Math.max(i._levelCount,1),e="dx"):(a.dy=-(n.pixelHeight-a.pixelHeight)/Math.max(i._levelCount,1),e="dy");var s,o,l=0,h=i.interpolationDuration;i.sequencedInterpolation&&(l=i.sequencedInterpolationDelay*r+h*r/(s=i.nodes.iterator(),o=0,s((function(t){return++o,!0})),o)),a.opacity=0,a.invalidateLinks(),a.animate([{property:"opacity",from:0,to:1},{property:e,to:0}],i.interpolationDuration,i.interpolationEasing).delay(l),Kt(a.outgoingDataItems.iterator(),(function(t){var e=t.link.show(i.interpolationDuration);e&&!e.isFinished()&&e.delay(l)})),Kt(a.incomingDataItems.iterator(),(function(t){if(!t.fromNode){var e=t.link.show(i.interpolationDuration);e&&!e.isFinished()&&e.delay(l)}})),r++}))}return t.prototype.showReal.call(this)}},e.prototype.changeSorting=function(){var t=this;this.sortNodes();var e={};Kt(this._sorted,(function(i){var n,r,a=i[1],s=a.level,o=(t.maxSum-t._levelSum[s])*t.valueHeight/2;"horizontal"==t.orientation?(n="y",r=a.pixelHeight):(n="x",r=a.pixelWidth),a.animate({property:n,to:e[s]||o},t.interpolationDuration,t.interpolationEasing),e[s]=(e[s]||o)+r+t.nodePadding,a.invalidateLinks()}))},e.prototype.applyInternalDefaults=function(){t.prototype.applyInternalDefaults.call(this),_(this.readerTitle)||(this.readerTitle=this.language.translate("Sankey diagram"))},e.prototype.createDataItem=function(){return new wo},Object.defineProperty(e.prototype,"nodeAlign",{get:function(){return this.getPropertyValue("nodeAlign")},set:function(t){this.setPropertyValue("nodeAlign",t),this.changeSorting()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"orientation",{get:function(){return this.getPropertyValue("orientation")},set:function(t){this.setPropertyValue("orientation",t,!0);var e=this.nodes.template.nameLabel;"vertical"==t?(this.nodes.template.width=void 0,e.label.horizontalCenter="middle",e.locationX=.5):(this.nodes.template.height=void 0,e.label.horizontalCenter="left",e.locationX=1)},enumerable:!0,configurable:!0}),e.prototype.createNode=function(){var t=new _o;return this._disposers.push(t),t},e.prototype.createLink=function(){var t=new Po;return this._disposers.push(t),t},Object.defineProperty(e.prototype,"valueHeight",{get:function(){return this._valueHeight},set:function(t){t!=this._valueHeight&&(this._valueHeight=t,this.invalidate())},enumerable:!0,configurable:!0}),e.prototype.disposeData=function(){t.prototype.disposeData.call(this),this._sorted=this.nodes.iterator()},e}(bo);se.registeredClasses.SankeyDiagram=Co;var Oo=function(t){function e(){var e=t.call(this)||this;e.className="ChordNode";var i=e.createChild(Ks);i.location=.5,i.radius=5,i.text="{name}",i.zIndex=1,i.shouldClone=!1,e.label=i,e.layout="none",e.events.on("positionchanged",e.updateRotation,e,!1),e.isMeasured=!1,e.slice=e.createChild(aa),e.slice.isMeasured=!1;var n=e.hiddenState;return n.properties.fill=(new bn).getFor("disabledBackground"),n.properties.opacity=.5,n.properties.visible=!0,e.setStateOnChildren=!1,e.slice.hiddenState.properties.visible=!0,e.adapter.add("tooltipX",(function(t,e){return e.slice.ix*(e.slice.radius-(e.slice.radius-e.slice.pixelInnerRadius)/2)})),e.adapter.add("tooltipY",(function(t,e){return e.slice.iy*(e.slice.radius-(e.slice.radius-e.slice.pixelInnerRadius)/2)})),e}return a(e,t),e.prototype.invalidateLinks=function(){var e=this;t.prototype.invalidateLinks.call(this);var i=this.label,n=this.slice,r=this.chart;if(r&&n){var a=this.total,s=n.arc,o=n.startAngle;this.children.each((function(t){if(t instanceof ns){var e=t.locationX;D(e)||(e=.5);var i=t.locationY;D(i)||(i=1);var r=o+s*e,a=i*n.radius;t.x=a*B(r),t.y=a*E(r)}}));var l=o+s*i.location,h=o+(1-a/this.adjustedTotal)*s*.5;f(h)&&(h=o),i.fixPosition(l,n.radius),this.nextAngle=h,this._outgoingSorted&&Kt(this._outgoingSorted,(function(t){var i=t.link;i.parent=e.chart.linksContainer;var a=t.getWorkingValue("value");if(D(a)){if(r.nonRibbon){var l=i.percentWidth;D(l)||(l=5),l/=100,i.startAngle=o+s/2-s/2*l,i.arc=s*l}else i.arc=a*r.valueAngle,i.startAngle=e.nextAngle,e.nextAngle+=i.arc;t.toNode||(i.endAngle=i.startAngle),i.radius=n.pixelInnerRadius}})),this._incomingSorted&&Kt(this._incomingSorted,(function(t){var i=t.link;if(i.radius=n.pixelInnerRadius,r.nonRibbon){var a=i.percentWidth;D(a)||(a=5),a/=100,i.endAngle=o+s/2-s/2*a,i.arc=s*a}else{i.endAngle=e.nextAngle;var l=t.getWorkingValue("value");D(l)&&(i.arc=l*r.valueAngle,e.nextAngle+=i.arc)}t.fromNode||(i.startAngle=i.endAngle)}))}},e.prototype.updateRotation=function(){var t=this.slice,e=this.trueStartAngle+t.arc/2,i=t.radius,n=i*B(e),r=i*E(e),a=K({x:n+this.pixelX,y:r+this.pixelY});t.startAngle=this.trueStartAngle+(a-e),this.dx=-this.pixelX,this.dy=-this.pixelY},e.prototype.copyFrom=function(e){t.prototype.copyFrom.call(this,e),this.label.copyFrom(e.label),this.slice.copyFrom(e.slice)},e}(mo);se.registeredClasses.ChordNode=Oo;var Do=function(t){function e(){var e=t.call(this)||this;return e.className="QuadraticCurve",e.element=e.paper.add("path"),e.pixelPerfect=!1,e.fill=ke(),e.applyTheme(),e}return a(e,t),e.prototype.draw=function(){if(D(this.x1+this.x2+this.y1+this.y2+this.cpx+this.cpy)){var t={x:this.x1,y:this.y1},e={x:this.x2,y:this.y2},i={x:this.cpx,y:this.cpy},n=zr(t)+Gr(e,i);this.path=n}},Object.defineProperty(e.prototype,"cpx",{get:function(){return this.getPropertyValue("cpx")},set:function(t){this.setPropertyValue("cpx",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cpy",{get:function(){return this.getPropertyValue("cpy")},set:function(t){this.setPropertyValue("cpy",t,!0)},enumerable:!0,configurable:!0}),e.prototype.positionToPoint=function(t){var e={x:this.x1,y:this.y1},i={x:this.cpx,y:this.cpy},n={x:this.x2,y:this.y2},r=$(e,n,i,t),a=$(e,n,i,t+.001);return{x:r.x,y:r.y,angle:K(r,a)}},e}(Wr),So=function(t){function e(){var e=t.call(this)||this;return e.className="ChordLink",e.middleLine=e.createChild(Do),e.middleLine.shouldClone=!1,e.middleLine.strokeOpacity=0,e.applyTheme(),e}return a(e,t),e.prototype.validate=function(){if(t.prototype.validate.call(this),!this.isTemplate){var e=this.startAngle,i=this.endAngle,n=this.arc,r=this.radius,a=this.dataItem.fromNode,s=this.dataItem.toNode,o=0,l=0;a&&(o=a.pixelX+a.dx,l=a.pixelY+a.dy);var h=0,p=0;if(s&&(h=s.pixelX+s.dx,p=s.pixelY+s.dy),r>0){var u=r*B(e)+o,d=r*E(e)+l,c=r*B(i)+h,f=r*E(i)+p,g={x:0,y:0},m=zr({x:u,y:d});m+=Zr(e,n,r),m+=Gr({x:c,y:f},g),m+=Zr(i,n,r),m+=Gr({x:u,y:d},g),this.link.path=n>0?m:"",this.maskBullets&&(this.bulletsMask.path=m,this.bulletsContainer.mask=this.bulletsMask);var y=e+n/2,v=i+n/2,b=this.middleLine;b.x1=r*B(y)+o,b.y1=r*E(y)+l,b.x2=r*B(v)+h,b.y2=r*E(v)+p,b.cpx=0,b.cpy=0,b.stroke=this.fill,this.positionBullets()}}},Object.defineProperty(e.prototype,"radius",{get:function(){return this.getPropertyValue("radius")},set:function(t){this.setPropertyValue("radius",t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"arc",{get:function(){return this.getPropertyValue("arc")},set:function(t){this.setPropertyValue("arc",t,!0)},enumerable:!0,configurable:!0}),e}(yo);se.registeredClasses.ChordLink=So;var Io=function(t){function e(){var e=t.call(this)||this;return e.className="ChordDiagramDataItem",e.applyTheme(),e}return a(e,t),e}(vo),ko=function(t){function e(){var e=t.call(this)||this;e.valueAngle=0,e.className="ChordDiagram",e.startAngle=-90,e.endAngle=270,e.radius=c(80),e.innerRadius=-15,e.nodePadding=5;var i=e.chartContainer.createChild(Pr);return i.align="center",i.valign="middle",i.shouldClone=!1,i.layout="absolute",e.chordContainer=i,e.nodesContainer.parent=i,e.linksContainer.parent=i,e.chartContainer.events.on("maxsizechanged",e.invalidate,e,!1),e.applyTheme(),e}return a(e,t),e.prototype.validate=function(){var e=this,i=this.chartContainer,n=this.endAngle,r=this.startAngle+this.nodePadding/2,a=rt(this.startAngle,this.endAngle,1);a=q([a,{x:0,y:0,width:0,height:0}]);var s=Math.min(i.innerWidth/a.width,i.innerHeight/a.height);D(s)||(s=0);var o=Xe(this.radius,s),l=Xe(this.innerRadius,o,!0),h=this.dataItem.values.value.sum,p=0,u=0;Kt(this._sorted,(function(t){var i=t[1];e.getNodeValue(i),p++;var n=i.total;i.total/hthis.endIndex;c--){f=this.dataItems.getIndex(c);this.disableUnusedColumns(f)}this._propertiesChanged=!1},e.prototype.sortCategoryAxis=function(t,e){var i=this;this.dataItems.values.sort((function(t,i){return i.values[e].workingValue-t.values[e].workingValue}));var n=0;this.dataItems.each((function(t){t._index=n,n++})),t.dataItems.each((function(t){var e=t.component,n=e.categoryToPosition(t.category)-t.deltaPosition,r=e.getSeriesDataItemByCategory(t.category,i);if(r){var a=i.dataItems.indexOf(r);t._index=a;var s=F((a+.5)/i.dataItems.length-n,3);t.deltaAnimation&&!t.deltaAnimation.isDisposed()&&t.deltaAnimation.animationOptions[0].to==s||s!=F(t.deltaPosition,3)&&(t.deltaAnimation&&t.deltaAnimation.stop(),t.deltaAnimation=t.animate({property:"deltaPosition",from:-s,to:0},e.interpolationDuration,e.interpolationEasing),i._disposers.push(t.deltaAnimation))}})),t.dataItems.values.sort((function(t,e){return t.index-e.index}))},e.prototype.validateDataElement=function(e){this.chart&&this.xAxis&&this.yAxis&&(this.validateDataElementReal(e),t.prototype.validateDataElement.call(this,e))},e.prototype.getStartLocation=function(t){var e=this._startLocation;return this.baseAxis==this.xAxis?e+=t.locations[this.xOpenField]-.5:e+=t.locations[this.yOpenField]-.5,e},e.prototype.getEndLocation=function(t){var e=this._endLocation;return this.baseAxis==this.xAxis?e+=t.locations[this.xField]-.5:e+=t.locations[this.yField]-.5,e},e.prototype.validateDataElementReal=function(t){var e,i,n,r,a=this,s=this.getStartLocation(t),o=this.getEndLocation(t),l=this.xField,h=this.xOpenField,p=this.yField,u=this.yOpenField,c=this.columns.template,g=c.percentWidth,m=c.percentHeight,y=c.pixelWidth,v=c.pixelHeight,b=c.maxWidth,x=c.maxHeight,P=c.pixelPaddingLeft,w=c.pixelPaddingRight,C=c.pixelPaddingTop,O=c.pixelPaddingBottom,S=!1,I=t.width;_(I)&&(D(I)&&(y=I),I instanceof d&&(g=100*I.value));var k=t.height;if(_(k)&&(D(k)&&(v=k),k instanceof d&&(m=100*k.value)),this.xAxis instanceof Vs&&this.yAxis instanceof Vs){if(!t.hasValue(this._xValueFields)||!t.hasValue(this._yValueFields))return;if(s=0,o=1,!f(g))s+=V=F((o-s)*(1-g/100)/2,5),o-=V;if(e=this.xAxis.getX(t,h,s),i=this.xAxis.getX(t,l,o),f(g))e+=V=(i-e-y)/2,i-=V;if(!f(b)&&bM&&r>M)&&(S=!0),n=this.fixVerticalCoordinate(n),r=this.fixVerticalCoordinate(r),Math.abs(i-e)-P-w==0&&(S=!0)}else{if(!t.hasValue(this._xValueFields))return;var V;if(!f(m))s+=V=F((o-s)*(1-m/100)/2,5),o-=V;if(n=this.yAxis.getY(t,u,s),r=this.yAxis.getY(t,p,o),f(m))r-=V=(r-n-v)/2,n+=V;if(!f(x)&&xM&&e>M)&&(S=!0),i=this.fixHorizontalCoordinate(i),e=this.fixHorizontalCoordinate(e),Math.abs(n-r)-C-O==0&&(S=!0)}var E,R=Math.abs(i-e),B=Math.abs(r-n),N=Math.min(e,i),H=Math.min(n,r);S?this.disableUnusedColumns(t):(t.column?(E=t.column,this._propertiesChanged&&(Yt(this,E,br),Yt(this.columns.template,E,br),pt(br,(function(t){E[t]=E[t]})))):(Yt(this,E=this.columns.create(),br),Yt(this.columns.template,E,br),t.addSprite(E),t.column=E,E.paper=this.paper,this.itemsFocusable()?(_(this.role)||(this.role="menu"),_(E.role)||(E.role="menuitem"),E.focusable=!0):(_(this.role)||(this.role="list"),_(E.role)||(E.role="listitem"),E.focusable=!1),E.focusable&&(E.events.on("focus",(function(e){E.readerTitle=a.populateString(a.itemReaderText,t)}),void 0,!1),E.events.on("blur",(function(t){E.readerTitle=""}),void 0,!1)),E.hoverable&&(E.events.on("over",(function(e){E.readerTitle=a.populateString(a.itemReaderText,t)}),void 0,!1),E.events.on("out",(function(t){E.readerTitle=""}),void 0,!1)),E.parent=this.columnsContainer,E.virtualParent=this),E.width=R,E.height=B,E.x=N,E.y=H,E.realX=e,E.realY=n,E.realWidth=i-e,E.realHeight=r-n,this.setColumnStates(E),E.invalid&&E.validate(),E.__disabled=!1,Kt(this.axisRanges.iterator(),(function(e){var i=t.rangesColumns.getKey(e.uid);i||(i=a.columns.create(),Yt(e.contents,i,br),t.addSprite(i),t.rangesColumns.setKey(e.uid,i),i.paper=a.paper),i.parent=e.contents,i.width=R,i.height=B,i.x=N,i.y=H,a.setColumnStates(i),i.invalid&&i.validate(),i.__disabled=!1})));t.itemWidth=R,t.itemHeight=B},e.prototype.disableUnusedColumns=function(t){t&&(t.column&&(t.column.width=0,t.column.height=0,t.column.__disabled=!0),Kt(this.axisRanges.iterator(),(function(e){var i=t.rangesColumns.getKey(e.uid);i&&(i.width=0,i.height=0,i.__disabled=!0)})))},e.prototype.setColumnStates=function(t){if(this._dropFromOpenState||this._dropFromPreviousState||this._riseFromOpenState||this._riseFromPreviousState){var e=t.dataItem;if(this.xAxis instanceof Ds||this.yAxis instanceof Ds){var i,n=void 0,r=void 0;this.baseAxis==this.yAxis?(this.xOpenField&&this.xField&&this.xAxis instanceof Ds&&(i=e.getValue(this.xOpenField),n=e.getValue(this.xField)),r=e.getValue(this.xAxis.axisFieldName+"X","previousChange")):(this.yOpenField&&this.yField&&this.yAxis instanceof Ds&&(i=e.getValue(this.yOpenField),n=e.getValue(this.yField)),r=e.getValue(this.yAxis.axisFieldName+"Y","previousChange")),nthis.currentLevel||t.children&&t.children.length>0)&&(i.columns.template.cursorOverStyle=Qn.pointer,this.zoomable&&i.columns.template.events.on("hit",(function(i){var n=i.target.dataItem;t.level>e.currentLevel?e.zoomToChartDataItem(n.treeMapDataItem.parent):e.zoomToSeriesDataItem(n)}),this,void 0))}this._tempSeries.push(t.series)},e.prototype.toggleBullets=function(t){var e=this;Kt(this.series.iterator(),(function(i){-1==e._tempSeries.indexOf(i)?(i.columnsContainer.hide(),i.bulletsContainer.hide(t)):(i.columnsContainer.show(),i.bulletsContainer.show(t),i.dataItems.each((function(t){t.bullets.each((function(t,e){e.show()}))})),i.level