Files
sigpro-grid/node_modules/ag-charts-enterprise/dist/package/main.cjs.min.js
2026-03-17 08:44:54 +01:00

9 lines
1.1 MiB
Executable File

"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var i in t)__defProp(e,i,{get:t[i],enumerable:!0})},__copyProps=(e,t,i,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of __getOwnPropNames(t))!__hasOwnProp.call(e,r)&&r!==i&&__defProp(e,r,{get:()=>t[r],enumerable:!(o=__getOwnPropDesc(t,r))||o.enumerable});return e},__reExport=(e,t,i)=>(__copyProps(e,t,"default"),i&&__copyProps(i,t,"default")),__toESM=(e,t,i)=>(i=e!=null?__create(__getProtoOf(e)):{},__copyProps(t||!e||!e.__esModule?__defProp(i,"default",{value:e,enumerable:!0}):i,e)),__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),__decorateClass=(e,t,i,o)=>{for(var r=o>1?void 0:o?__getOwnPropDesc(t,i):t,s=e.length-1,a;s>=0;s--)(a=e[s])&&(r=(o?a(t,i,r):a(r))||r);return o&&r&&__defProp(t,i,r),r},main_exports={};__export(main_exports,{AgChartsEnterpriseModule:()=>AgChartsEnterpriseModule,AgTooltipAnchorToType:()=>AgTooltipAnchorToType,AgTooltipPlacementType:()=>AgTooltipPlacementType,AllCartesianAxesModule:()=>AllCartesianAxesModule,AllCartesianModule:()=>AllCartesianModule,AllCartesianSeriesModule:()=>AllCartesianSeriesModule,AllEnterpriseModule:()=>AllEnterpriseModule,AllGaugeModule:()=>AllGaugeModule,AllMapSeriesModule:()=>AllMapSeriesModule,AllPolarModule:()=>AllPolarModule,AngleCategoryAxisModule:()=>AngleCategoryAxisModule,AngleNumberAxisModule:()=>AngleNumberAxisModule,AnimationModule:()=>AnimationModule,AnnotationsModule:()=>AnnotationsModule,BandHighlightModule:()=>BandHighlightModule,BoxPlotSeriesModule:()=>BoxPlotSeriesModule,CandlestickSeriesModule:()=>CandlestickSeriesModule,ChartToolbarModule:()=>ChartToolbarModule,ChordSeriesModule:()=>ChordSeriesModule,ConeFunnelSeriesModule:()=>ConeFunnelSeriesModule,ContextMenuModule:()=>ContextMenuModule,CrosshairModule:()=>CrosshairModule,DataSourceModule:()=>DataSourceModule,ErrorBarsModule:()=>ErrorBarsModule,FinancialChartModule:()=>FinancialChartModule,FlashOnUpdateModule:()=>FlashOnUpdateModule,FunnelSeriesModule:()=>FunnelSeriesModule,GradientLegendModule:()=>GradientLegendModule,HeatmapSeriesModule:()=>HeatmapSeriesModule,LicenseManager:()=>LicenseManager2,LinearGaugeModule:()=>LinearGaugeModule,MapLineBackgroundSeriesModule:()=>MapLineBackgroundSeriesModule,MapLineSeriesModule:()=>MapLineSeriesModule,MapMarkerSeriesModule:()=>MapMarkerSeriesModule,MapShapeBackgroundSeriesModule:()=>MapShapeBackgroundSeriesModule,MapShapeSeriesModule:()=>MapShapeSeriesModule,NavigatorModule:()=>NavigatorModule,NightingaleSeriesModule:()=>NightingaleSeriesModule,OhlcSeriesModule:()=>OhlcSeriesModule,OrdinalTimeAxisModule:()=>OrdinalTimeAxisModule,PyramidSeriesModule:()=>PyramidSeriesModule,RadarAreaSeriesModule:()=>RadarAreaSeriesModule,RadarLineSeriesModule:()=>RadarLineSeriesModule,RadialBarSeriesModule:()=>RadialBarSeriesModule,RadialColumnSeriesModule:()=>RadialColumnSeriesModule,RadialGaugeModule:()=>RadialGaugeModule,RadiusCategoryAxisModule:()=>RadiusCategoryAxisModule,RadiusNumberAxisModule:()=>RadiusNumberAxisModule,RangeAreaSeriesModule:()=>RangeAreaSeriesModule,RangeBarSeriesModule:()=>RangeBarSeriesModule,RangesModule:()=>RangesModule,SankeySeriesModule:()=>SankeySeriesModule,ScrollbarModule:()=>ScrollbarModule,StatusBarModule:()=>StatusBarModule,SunburstSeriesModule:()=>SunburstSeriesModule,SyncModule:()=>SyncModule,TreemapSeriesModule:()=>TreemapSeriesModule,WaterfallSeriesModule:()=>WaterfallSeriesModule,ZoomModule:()=>ZoomModule}),module.exports=__toCommonJS(main_exports);var import_ag_charts_core288=require("ag-charts-core"),import_ag_charts_community2=require("ag-charts-community"),import_ag_charts_core2=require("ag-charts-core"),import_ag_charts_community=require("ag-charts-community"),import_ag_charts_core=require("ag-charts-core"),Image=class extends import_ag_charts_core.BaseProperties{constructor(){super(),this.opacity=1,this.loadedSynchronously=!0,this.containerWidth=0,this.containerHeight=0,this.onLoad=void 0,this.onImageLoad=()=>{this.loadedSynchronously||(this.node.visible=!1,this.performLayout(this.containerWidth,this.containerHeight),this.onLoad?.())},this.imageElement=(0,import_ag_charts_core.createElement)("img"),this.imageElement.onload=this.onImageLoad,this.node=new import_ag_charts_community._ModuleSupport.Image(this.imageElement)}get complete(){return this.imageElement.width>0&&this.imageElement.height>0}performLayout(e,t){this.containerWidth=e,this.containerHeight=t;const i={width:e,height:t},o=(0,import_ag_charts_core.calculatePlacement)(this.imageElement.width,this.imageElement.height,i,this);return this.node.setProperties(this.complete?{visible:!0,opacity:this.opacity,...o}:{visible:!1}),o}};__decorateClass([import_ag_charts_core.Property],Image.prototype,"top",2),__decorateClass([import_ag_charts_core.Property],Image.prototype,"right",2),__decorateClass([import_ag_charts_core.Property],Image.prototype,"bottom",2),__decorateClass([import_ag_charts_core.Property],Image.prototype,"left",2),__decorateClass([import_ag_charts_core.Property],Image.prototype,"width",2),__decorateClass([import_ag_charts_core.Property],Image.prototype,"height",2),__decorateClass([import_ag_charts_core.Property],Image.prototype,"opacity",2),__decorateClass([(0,import_ag_charts_core.ProxyProperty)("imageElement.src"),(0,import_ag_charts_core.ObserveChanges)(e=>e.loadedSynchronously=e.complete)],Image.prototype,"url",2);var Background=class extends import_ag_charts_community2._ModuleSupport.Background{constructor(){super(...arguments),this.image=new Image}onLayoutComplete(e){if(super.onLayoutComplete(e),this.image){const{width:t,height:i}=e.chart;this.image.performLayout(t,i)}}onImageLoad(){this.ctx.updateService.update(import_ag_charts_core2.ChartUpdateType.SCENE_RENDER)}};__decorateClass([import_ag_charts_core2.Property,(0,import_ag_charts_core2.ActionOnSet)({newValue(e){this.node.appendChild(e.node),e.onLoad=()=>this.onImageLoad()},oldValue(e){e.node.remove(),e.onLoad=void 0}})],Background.prototype,"image",2);var import_ag_charts_community3=require("ag-charts-community"),import_ag_charts_core3=require("ag-charts-core"),Foreground=class extends import_ag_charts_community3._ModuleSupport.Background{constructor(){super(...arguments),this.image=new Image,this.fill="transparent",this.fillOpacity=void 0}createNode(){return new import_ag_charts_community3._ModuleSupport.Group({name:"foreground",zIndex:import_ag_charts_core3.ZIndexMap.FOREGROUND})}onLayoutComplete(e){super.onLayoutComplete(e);const{width:t,height:i}=e.chart,o=this.image.performLayout(t,i);this.text&&this.updateTextNode(o)}onImageLoad(){this.ctx.updateService.update(import_ag_charts_core3.ChartUpdateType.SCENE_RENDER)}updateTextNode(e){const{textNode:t}=this;t.fontWeight="bold",t.fontFamily="Impact, sans-serif",t.fontSize=19,t.opacity=.7,t.fill="#9b9b9b",t.textBaseline="top";const{width:i}=t.getBBox(),o=10;t.x=e.x+e.width/2-i/2,t.y=e.y+e.height+o}};__decorateClass([import_ag_charts_core3.Property,(0,import_ag_charts_core3.ActionOnSet)({newValue(e){this.node.appendChild(e.node),e.onLoad=()=>this.onImageLoad()},oldValue(e){e.node.remove(),e.onLoad=void 0}})],Foreground.prototype,"image",2),__decorateClass([import_ag_charts_core3.Property,(0,import_ag_charts_core3.ProxyPropertyOnWrite)("rectNode","fill")],Foreground.prototype,"fill",2),__decorateClass([import_ag_charts_core3.Property,(0,import_ag_charts_core3.ProxyPropertyOnWrite)("rectNode","fillOpacity")],Foreground.prototype,"fillOpacity",2);var MD5=class{constructor(){this.ieCompatibility=!1}init(){this.ieCompatibility=this.md5("hello")!="5d41402abc4b2a76b9719d911017c592"}md5cycle(e,t){let i=e[0],o=e[1],r=e[2],s=e[3];i=this.ff(i,o,r,s,t[0],7,-680876936),s=this.ff(s,i,o,r,t[1],12,-389564586),r=this.ff(r,s,i,o,t[2],17,606105819),o=this.ff(o,r,s,i,t[3],22,-1044525330),i=this.ff(i,o,r,s,t[4],7,-176418897),s=this.ff(s,i,o,r,t[5],12,1200080426),r=this.ff(r,s,i,o,t[6],17,-1473231341),o=this.ff(o,r,s,i,t[7],22,-45705983),i=this.ff(i,o,r,s,t[8],7,1770035416),s=this.ff(s,i,o,r,t[9],12,-1958414417),r=this.ff(r,s,i,o,t[10],17,-42063),o=this.ff(o,r,s,i,t[11],22,-1990404162),i=this.ff(i,o,r,s,t[12],7,1804603682),s=this.ff(s,i,o,r,t[13],12,-40341101),r=this.ff(r,s,i,o,t[14],17,-1502002290),o=this.ff(o,r,s,i,t[15],22,1236535329),i=this.gg(i,o,r,s,t[1],5,-165796510),s=this.gg(s,i,o,r,t[6],9,-1069501632),r=this.gg(r,s,i,o,t[11],14,643717713),o=this.gg(o,r,s,i,t[0],20,-373897302),i=this.gg(i,o,r,s,t[5],5,-701558691),s=this.gg(s,i,o,r,t[10],9,38016083),r=this.gg(r,s,i,o,t[15],14,-660478335),o=this.gg(o,r,s,i,t[4],20,-405537848),i=this.gg(i,o,r,s,t[9],5,568446438),s=this.gg(s,i,o,r,t[14],9,-1019803690),r=this.gg(r,s,i,o,t[3],14,-187363961),o=this.gg(o,r,s,i,t[8],20,1163531501),i=this.gg(i,o,r,s,t[13],5,-1444681467),s=this.gg(s,i,o,r,t[2],9,-51403784),r=this.gg(r,s,i,o,t[7],14,1735328473),o=this.gg(o,r,s,i,t[12],20,-1926607734),i=this.hh(i,o,r,s,t[5],4,-378558),s=this.hh(s,i,o,r,t[8],11,-2022574463),r=this.hh(r,s,i,o,t[11],16,1839030562),o=this.hh(o,r,s,i,t[14],23,-35309556),i=this.hh(i,o,r,s,t[1],4,-1530992060),s=this.hh(s,i,o,r,t[4],11,1272893353),r=this.hh(r,s,i,o,t[7],16,-155497632),o=this.hh(o,r,s,i,t[10],23,-1094730640),i=this.hh(i,o,r,s,t[13],4,681279174),s=this.hh(s,i,o,r,t[0],11,-358537222),r=this.hh(r,s,i,o,t[3],16,-722521979),o=this.hh(o,r,s,i,t[6],23,76029189),i=this.hh(i,o,r,s,t[9],4,-640364487),s=this.hh(s,i,o,r,t[12],11,-421815835),r=this.hh(r,s,i,o,t[15],16,530742520),o=this.hh(o,r,s,i,t[2],23,-995338651),i=this.ii(i,o,r,s,t[0],6,-198630844),s=this.ii(s,i,o,r,t[7],10,1126891415),r=this.ii(r,s,i,o,t[14],15,-1416354905),o=this.ii(o,r,s,i,t[5],21,-57434055),i=this.ii(i,o,r,s,t[12],6,1700485571),s=this.ii(s,i,o,r,t[3],10,-1894986606),r=this.ii(r,s,i,o,t[10],15,-1051523),o=this.ii(o,r,s,i,t[1],21,-2054922799),i=this.ii(i,o,r,s,t[8],6,1873313359),s=this.ii(s,i,o,r,t[15],10,-30611744),r=this.ii(r,s,i,o,t[6],15,-1560198380),o=this.ii(o,r,s,i,t[13],21,1309151649),i=this.ii(i,o,r,s,t[4],6,-145523070),s=this.ii(s,i,o,r,t[11],10,-1120210379),r=this.ii(r,s,i,o,t[2],15,718787259),o=this.ii(o,r,s,i,t[9],21,-343485551),e[0]=this.add32(i,e[0]),e[1]=this.add32(o,e[1]),e[2]=this.add32(r,e[2]),e[3]=this.add32(s,e[3])}cmn(e,t,i,o,r,s){return t=this.add32(this.add32(t,e),this.add32(o,s)),this.add32(t<<r|t>>>32-r,i)}ff(e,t,i,o,r,s,a){return this.cmn(t&i|~t&o,e,t,r,s,a)}gg(e,t,i,o,r,s,a){return this.cmn(t&o|i&~o,e,t,r,s,a)}hh(e,t,i,o,r,s,a){return this.cmn(t^i^o,e,t,r,s,a)}ii(e,t,i,o,r,s,a){return this.cmn(i^(t|~o),e,t,r,s,a)}md51(e){const t=e.length,i=[1732584193,-271733879,-1732584194,271733878];let o;for(o=64;o<=e.length;o+=64)this.md5cycle(i,this.md5blk(e.substring(o-64,o)));e=e.substring(o-64);const r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(o=0;o<e.length;o++)r[o>>2]|=e.charCodeAt(o)<<(o%4<<3);if(r[o>>2]|=128<<(o%4<<3),o>55)for(this.md5cycle(i,r),o=0;o<16;o++)r[o]=0;return r[14]=t*8,this.md5cycle(i,r),i}md5blk(e){const t=[];for(let i=0;i<64;i+=4)t[i>>2]=e.charCodeAt(i)+(e.charCodeAt(i+1)<<8)+(e.charCodeAt(i+2)<<16)+(e.charCodeAt(i+3)<<24);return t}rhex(e){const t="0123456789abcdef".split("");let i="",o=0;for(;o<4;o++)i+=t[e>>o*8+4&15]+t[e>>o*8&15];return i}hex(e){for(let t=0;t<e.length;t++)e[t]=this.rhex(e[t]);return e.join("")}md5(e){return this.hex(this.md51(e))}add32(e,t){return this.ieCompatibility?this.add32Compat(e,t):this.add32Std(e,t)}add32Std(e,t){return e+t&4294967295}add32Compat(e,t){const i=(e&65535)+(t&65535);return(e>>16)+(t>>16)+(i>>16)<<16|i&65535}};function missingOrEmpty(e){return e==null||e.length===0}var WATERMARK_SVG_DATA_URL="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjU4IiBoZWlnaHQ9IjQwIiB2aWV3Qm94PSIwIDAgMjU4IDQwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMjUuNzc5IDI4LjY1N0gxMy4zNTlMMTEuMTczIDM0LjAxMkg1LjY3Mjk3TDE3LjE4MiA3LjA1OTk5SDIxLjk1M0wzMy40NjIgMzQuMDEySDI3Ljk2MkwyNS43NzYgMjguNjU3SDI1Ljc3OVpNMjQuMDY4IDI0LjM5N0wxOS41ODggMTMuNDM0TDE1LjEwNyAyNC4zOTdIMjQuMDY4Wk02Mi4wOTIgMTguODIzSDQ5LjgxN1YyMy4wODZINTYuNzc1QzU2LjU1NSAyNS4yMjIgNTUuNzU1IDI2LjkyNyA1NC4zNzIgMjguMjAyQzUyLjk4OSAyOS40NzYgNTEuMTY2IDMwLjExNSA0OC45MDkgMzAuMTE1QzQ3LjYyMiAzMC4xMTUgNDYuNDUgMjkuODg1IDQ1LjM5MyAyOS40MjNDNDQuMzU4MyAyOC45NzgxIDQzLjQzMjYgMjguMzEzOCA0Mi42OCAyNy40NzZDNDEuOTI3IDI2LjYzOSA0MS4zNDQgMjUuNjMxIDQwLjkzMSAyNC40NTNDNDAuNTE5IDIzLjI3NSA0MC4zMTEgMjEuOTcgNDAuMzExIDIwLjUzN0M0MC4zMTEgMTkuMTA1IDQwLjUxNiAxNy44IDQwLjkzMSAxNi42MjFDNDEuMzQ0IDE1LjQ0MyA0MS45MjcgMTQuNDM2IDQyLjY4IDEzLjU5OEM0My40Mzc2IDEyLjc1NzcgNDQuMzY5NiAxMi4wOTMyIDQ1LjQxMSAxMS42NTFDNDYuNDc4IDExLjE4OSA0Ny42NTYgMTAuOTYgNDguOTQ2IDEwLjk2QzUxLjYxMiAxMC45NiA1My42MzcgMTEuNjAyIDU1LjAyIDEyLjg4NUw1OC4zIDkuNjA0OTlDNTUuODE3IDcuNjY5OTkgNTIuNjc2IDYuNjk5OTkgNDguODcyIDYuNjk5OTlDNDYuNzYgNi42OTk5OSA0NC44NTMgNy4wMzQ5OSA0My4xNTQgNy43MDA5OUM0MS40NTUgOC4zNjc5OSAzOS45OTggOS4zMDM5OSAzOC43ODMgMTAuNTA0QzM3LjU2NyAxMS43MDcgMzYuNjM0IDEzLjE1OCAzNS45NzcgMTQuODU3QzM1LjMxOSAxNi41NTYgMzQuOTk0IDE4LjQ1MSAzNC45OTQgMjAuNTRDMzQuOTk0IDIyLjYzIDM1LjMyOSAyNC40OTQgMzUuOTk1IDI2LjIwNUMzNi42NjIgMjcuOTE2IDM3LjYwNSAyOS4zNzQgMzguODE3IDMwLjU3N0M0MC4wMzIgMzEuNzggNDEuNDg2IDMyLjcxMyA0My4xODggMzMuMzgzQzQ0Ljg4OCAzNC4wNDkgNDYuNzgyIDM0LjM4NCA0OC44NzIgMzQuMzg0QzUwLjk2MSAzNC4zODQgNTIuNzUgMzQuMDQ5IDU0LjM5IDMzLjM4M0M1Ni4wMzEgMzIuNzE2IDU3LjQyNiAzMS43OCA1OC41NzkgMzAuNTc3QzU5LjczMyAyOS4zNzQgNjAuNjE5IDI3LjkxNiA2MS4yMzkgMjYuMjA1QzYxLjg2IDI0LjQ5NCA2Mi4xNyAyMi42MDUgNjIuMTcgMjAuNTRDNjIuMTY5NiAxOS45Njg4IDYyLjE0NDUgMTkuMzk4IDYyLjA5NSAxOC44MjlMNjIuMDkyIDE4LjgyM1pNMTUxLjgxIDE2Ljk4MUMxNTMuNDEgMTQuNjA5IDE1Ny40MTkgMTQuMzU4IDE1OS4wMjIgMTQuMzU4VjE4LjkxQzE1Ni45NTcgMTguOTEgMTU0Ljk4NSAxOC45OTYgMTUzLjc1NyAxOS44OTJDMTUyLjUyOSAyMC43OTIgMTUxLjkxOSAyMS45ODIgMTUxLjkxOSAyMy40NjRWMzMuOTlIMTQ2Ljk2NFYxNC4zNThIMTUxLjczNkwxNTEuODEgMTYuOTgxWk0xNDMuMDExIDE0LjM2MVYzNC4wMzFIMTM4LjI0TDEzOC4xMzEgMzEuMDQ1QzEzNy40NjYgMzIuMDc2IDEzNi41NTEgMzIuOTIxOSAxMzUuNDcxIDMzLjUwNEMxMzQuMzc2IDM0LjA5OSAxMzMuMDY4IDM0LjM5NiAxMzEuNTM2IDM0LjM5NkMxMzAuMiAzNC4zOTYgMTI4Ljk2MyAzNC4xNTIgMTI3LjgyMiAzMy42NjhDMTI2LjcgMzMuMTk2NCAxMjUuNjg5IDMyLjQ5NSAxMjQuODU1IDMxLjYwOUMxMjQuMDE4IDMwLjcyMiAxMjMuMzU0IDI5LjY2MiAxMjIuODcxIDI4LjQyMkMxMjIuMzg0IDI3LjE4NSAxMjIuMTQyIDI1LjgxMSAxMjIuMTQyIDI0LjMwNEMxMjIuMTQyIDIyLjc5OCAxMjIuMzg0IDIxLjM3OCAxMjIuODcxIDIwLjExNkMxMjMuMzU3IDE4Ljg1NCAxMjQuMDE4IDE3Ljc3MiAxMjQuODU1IDE2Ljg3M0MxMjUuNjg4IDE1Ljk3NjQgMTI2LjY5OCAxNS4yNjM2IDEyNy44MjIgMTQuNzhDMTI4Ljk2MyAxNC4yODEgMTMwLjIwMyAxNC4wMzMgMTMxLjUzNiAxNC4wMzNDMTMzLjA0MyAxNC4wMzMgMTM0LjMzIDE0LjMxOCAxMzUuMzk3IDE0Ljg4OEMxMzYuNDYyIDE1LjQ1ODkgMTM3LjM3NSAxNi4yNzggMTM4LjA1NyAxNy4yNzZWMTQuMzYxSDE0My4wMTFaTTEzMi42MzEgMzAuMTMzQzEzNC4yNTYgMzAuMTMzIDEzNS41NjcgMjkuNTk0IDEzNi41NjUgMjguNTEyQzEzNy41NjEgMjcuNDMgMTM4LjA2IDI1Ljk5MSAxMzguMDYgMjQuMTk2QzEzOC4wNiAyMi40MDEgMTM3LjU2MSAyMC45OSAxMzYuNTY1IDE5Ljg5OUMxMzUuNTcgMTguODA3IDEzNC4yNTkgMTguMjU4IDEzMi42MzEgMTguMjU4QzEzMS4wMDMgMTguMjU4IDEyOS43MjkgMTguODA0IDEyOC43MzQgMTkuODk5QzEyNy43MzggMjAuOTkzIDEyNy4yMzkgMjIuNDM4IDEyNy4yMzkgMjQuMjMzQzEyNy4yMzkgMjYuMDI4IDEyNy43MzUgMjcuNDMzIDEyOC43MzQgMjguNTE1QzEyOS43MjkgMjkuNTk0IDEzMS4wMjggMzAuMTM2IDEzMi42MzEgMzAuMTM2VjMwLjEzM1pNOTMuNjk4IDI3Ljg3NkM5My41Nzk1IDI4LjAwMjUgOTMuNDU2NCAyOC4xMjQ2IDkzLjMyOSAyOC4yNDJDOTEuOTQ3IDI5LjUxNiA5MC4xMjMgMzAuMTU1IDg3Ljg2NiAzMC4xNTVDODYuNTggMzAuMTU1IDg1LjQwOCAyOS45MjYgODQuMzUgMjkuNDY0QzgzLjMxNTUgMjkuMDE4OSA4Mi4zODk4IDI4LjM1NDYgODEuNjM3IDI3LjUxN0M4MC44ODQgMjYuNjc5IDgwLjMwMSAyNS42NzIgNzkuODg5IDI0LjQ5NEM3OS40NzYgMjMuMzE1IDc5LjI2OSAyMi4wMSA3OS4yNjkgMjAuNTc4Qzc5LjI2OSAxOS4xNDUgNzkuNDczIDE3Ljg0IDc5Ljg4OSAxNi42NjJDODAuMzAxIDE1LjQ4NCA4MC44ODQgMTQuNDc2IDgxLjYzNyAxMy42MzlDODIuMzk0OSAxMi43OTg3IDgzLjMyNzMgMTIuMTM0MiA4NC4zNjkgMTEuNjkyQzg1LjQzNiAxMS4yMyA4Ni42MTQgMTEgODcuOTAzIDExQzkwLjU3IDExIDkyLjU5NSAxMS42NDIgOTMuOTc3IDEyLjkyNkw5Ny4yNTggOS42NDQ5OUM5NC43NzQgNy43MTA5OSA5MS42MzMgNi43Mzk5OSA4Ny44MjkgNi43Mzk5OUM4NS43MTggNi43Mzk5OSA4My44MTEgNy4wNzQ5OSA4Mi4xMTIgNy43NDE5OUM4MC40MTMgOC40MDc5OSA3OC45NTYgOS4zNDQ5OSA3Ny43NCAxMC41NDVDNzYuNTI1IDExLjc0NyA3NS41OTIgMTMuMTk5IDc0LjkzNCAxNC44OThDNzQuMjc3IDE2LjU5NyA3My45NTEgMTguNDkxIDczLjk1MSAyMC41ODFDNzMuOTUxIDIyLjY3IDc0LjI4NiAyNC41MzQgNzQuOTUzIDI2LjI0NUM3NS42MTkgMjcuOTU3IDc2LjU2MiAyOS40MTQgNzcuNzc0IDMwLjYxN0M3OC45OSAzMS44MiA4MC40NDQgMzIuNzUzIDgyLjE0NiAzMy40MjNDODMuODQ1IDM0LjA5IDg1LjczOSAzNC40MjQgODcuODI5IDM0LjQyNEM4OS45MTkgMzQuNDI0IDkxLjcwOCAzNC4wOSA5My4zNDggMzMuNDIzQzk0LjcxOCAzMi44NjUgOTUuOTE4IDMyLjEyMSA5Ni45NDggMzEuMTkxQzk3LjE0OSAzMS4wMDggOTcuMzQ4IDMwLjgxNSA5Ny41MzcgMzAuNjJMOTMuNzAxIDI3Ljg4NUw5My42OTggMjcuODc2Wk0xMTAuODAyIDE0LjAxNUMxMDkuMTk5IDE0LjAxNSAxMDYuODM2IDE0LjQ3MSAxMDUuNjExIDE2LjE1OEwxMDUuNTM3IDYuMDE1OTlIMTAwLjc2NVYzMy45MzlIMTA1LjcyVjIyLjY0MUMxMDUuNzcxIDIxLjQ2MDcgMTA2LjI4OCAyMC4zNDg4IDEwNy4xNTcgMTkuNTQ4OUMxMDguMDI3IDE4Ljc0OTEgMTA5LjE3OCAxOC4zMjY2IDExMC4zNTggMTguMzc0QzExMy4zOTcgMTguMzc0IDExNC4yNjggMjEuMTU5IDExNC4yNjggMjIuNjQxVjMzLjkzOUgxMTkuMjIzVjIxLjA1OUMxMTkuMjIzIDIxLjA1OSAxMTkuMTQyIDE0LjAxNSAxMTAuODAyIDE0LjAxNVpNMTczLjc2MyAxNC4zNThIMTY5Ljk5OVY4LjcxNDk5SDE2NS4wNDhWMTQuMzU4SDE2MS4yODRWMTguOTE2SDE2NS4wNDhWMzQuMDAzSDE2OS45OTlWMTguOTE2SDE3My43NjNWMTQuMzU4Wk0xOTAuNzg3IDI1LjI2MkMxOTAuMTI5IDI0LjUwMTQgMTg5LjMwNyAyMy44OTk0IDE4OC4zODQgMjMuNTAxQzE4Ny40ODggMjMuMTE3IDE4Ni4zMzEgMjIuNzMyIDE4NC45NDggMjIuMzY0QzE4NC4xNjUgMjIuMTQzOSAxODMuMzkgMjEuODk3OCAxODIuNjIzIDIxLjYyNkMxODIuMTYzIDIxLjQ2MjEgMTgxLjc0MSAyMS4yMDY2IDE4MS4zODMgMjAuODc1QzE4MS4yMzUgMjAuNzQyMSAxODEuMTE4IDIwLjU3ODkgMTgxLjAzOSAyMC4zOTY0QzE4MC45NjEgMjAuMjE0IDE4MC45MjIgMjAuMDE2NiAxODAuOTI3IDE5LjgxOEMxODAuOTI3IDE5LjI3MiAxODEuMTU2IDE4Ljg0NCAxODEuNjI1IDE4LjUxQzE4Mi4xMjEgMTguMTU2IDE4Mi44NjIgMTcuOTc2IDE4My44MjYgMTcuOTc2QzE4NC43OSAxNy45NzYgMTg1LjU4NyAxOC4yMDkgMTg2LjE0OCAxOC42NjhDMTg2LjcwNiAxOS4xMjQgMTg3LjAwNyAxOS43MjUgMTg3LjA3MiAyMC41TDE4Ny4wOTQgMjAuNzgySDE5MS42MzNMMTkxLjYxNyAyMC40NkMxOTEuNTIxIDE4LjQ4NSAxOTAuNzcxIDE2LjkgMTg5LjM4NSAxNS43NUMxODguMDEyIDE0LjYxMiAxODYuMTg1IDE0LjAzMyAxODMuOTYyIDE0LjAzM0MxODIuNDc3IDE0LjAzMyAxODEuMTQxIDE0LjI4NyAxNzkuOTk0IDE0Ljc4NkMxNzguODMxIDE1LjI5MSAxNzcuOTI2IDE1Ljk5NSAxNzcuMjk2IDE2Ljg4MkMxNzYuNjczIDE3Ljc0NTUgMTc2LjMzOCAxOC43ODQgMTc2LjM0MSAxOS44NDlDMTc2LjM0MSAyMS4xNjcgMTc2LjY5OCAyMi4yNDkgMTc3LjM5OSAyMy4wNjRDMTc4LjA2IDIzLjg0MzIgMTc4Ljg5OCAyNC40NTM0IDE3OS44NDIgMjQuODQ0QzE4MC43NDQgMjUuMjE2IDE4MS45MjggMjUuNjA3IDE4My4zNjEgMjZDMTg0LjgwNiAyNi40MSAxODUuODcyIDI2Ljc4NSAxODYuNTMgMjcuMTIzQzE4Ny4xIDI3LjQxNCAxODcuMzc5IDI3Ljg0NSAxODcuMzc5IDI4LjQ0NEMxODcuMzc5IDI5LjA0MiAxODcuMTIyIDI5LjQ2NyAxODYuNTk1IDI5LjgzOUMxODYuMDQzIDMwLjIyNiAxODUuMjM3IDMwLjQyNSAxODQuMjAxIDMwLjQyNUMxODMuMTY2IDMwLjQyNSAxODIuMzk0IDMwLjE3NCAxODEuNzQ5IDI5LjY3NEMxODEuMTEzIDI5LjE4MSAxODAuNzcyIDI4LjU4OSAxODAuNzEgMjcuODY0TDE4MC42ODUgMjcuNTgySDE3Ni4wMTNMMTc2LjAyNSAyNy45MDFDMTc2LjA2NyAyOS4wOTU1IDE3Ni40NzIgMzAuMjQ4NyAxNzcuMTg4IDMxLjIwNkMxNzcuOTA3IDMyLjE4IDE3OC44OTMgMzIuOTU4IDE4MC4xMTggMzMuNTE5QzE4MS4zMzYgMzQuMDc3IDE4Mi43MzIgMzQuMzYyIDE4NC4yNjYgMzQuMzYyQzE4NS44MDEgMzQuMzYyIDE4Ny4xMDkgMzQuMTA4IDE4OC4yMzggMzMuNjA5QzE4OS4zNzYgMzMuMTA0IDE5MC4yNzIgMzIuMzk0IDE5MC45MDEgMzEuNDk0QzE5MS41MzQgMzAuNTkyIDE5MS44NTMgMjkuNTU0IDE5MS44NTMgMjguNDAzQzE5MS44MjggMjcuMTEgMTkxLjQ2NiAyNi4wNTMgMTkwLjc3NyAyNS4yNjJIMTkwLjc4N1oiIGZpbGw9IiM5QjlCOUIiLz4KPHBhdGggZD0iTTI0MS45ODIgMjUuNjU4MlYxNy43MTE3SDIyOC40NDFMMjIwLjQ5NCAyNS42NTgySDI0MS45ODJaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0yNTcuMjM5IDUuOTUwODFIMjQwLjI2NUwyMzIuMjU1IDEzLjg5NzNIMjU3LjIzOVY1Ljk1MDgxWiIgZmlsbD0iIzlCOUI5QiIvPgo8cGF0aCBkPSJNMjEyLjYxMSAzMy42MDQ4TDIxNi42OCAyOS41MzYxSDIzMC40MTJWMzcuNDgyN0gyMTIuNjExVjMzLjYwNDhaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0yMTUuNTk5IDIxLjc4MDNIMjI0LjM3MkwyMzIuMzgyIDEzLjgzMzdIMjE1LjU5OVYyMS43ODAzWiIgZmlsbD0iIzlCOUI5QiIvPgo8cGF0aCBkPSJNMjA2IDMzLjYwNDdIMjEyLjYxMUwyMjAuNDk0IDI1LjY1ODJIMjA2VjMzLjYwNDdaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0yNDAuMjY1IDUuOTUwODFMMjM2LjE5NyAxMC4wMTk0SDIxMC4yNTlWMi4wNzI4OEgyNDAuMjY1VjUuOTUwODFaIiBmaWxsPSIjOUI5QjlCIi8+Cjwvc3ZnPgo=",LICENSE_TYPES={"01":"GRID","02":"CHARTS","0102":"BOTH"},LICENSING_HELP_URL="https://www.ag-grid.com/charts/licensing/",_LicenseManager=class ie{constructor(t){this.watermarkMessage=void 0,this.totalMessageLength=124,this.document=t,this.md5=new MD5,this.md5.init()}validateLicense(){const t=this.getLicenseDetails(ie.licenseKey,ie.gridContext),i=`AG ${t.currentLicenseType==="BOTH"?"Grid and ":""}Charts Enterprise`;let o="";if(t.suppliedLicenseType==="BOTH"?o="AG Grid and AG Charts Enterprise":t.suppliedLicenseType==="GRID"?o="AG Grid Enterprise":t.suppliedLicenseType!==void 0&&(o="AG Charts Enterprise"),t.missing)(!this.isWebsiteUrl()||this.isForceWatermark())&&this.outputMissingLicenseKey(i);else if(t.expired){const r=ie.getChartsReleaseDate(),s=ie.formatDate(r);this.outputExpiredKey(t.expiry,s,o)}else t.valid?t.isTrial&&t.trialExpired&&this.outputExpiredTrialKey(t.expiry,i,o):this.outputInvalidLicenseKey(!!t.incorrectLicenseType,i,o)}static extractExpiry(t){const i=t.substring(t.lastIndexOf("_")+1,t.length);return new Date(Number.parseInt(ie.decode(i),10))}static extractLicenseComponents(t){let i=t.replaceAll(/[\u200B-\u200D\uFEFF]/g,"");if(i=i.replaceAll(/\r?\n|\r/g,""),t.length<=32)return{md5:null,license:t,version:null,isTrial:null};const o=i.length-32,r=i.substring(o),s=i.substring(0,o),[a,n,l]=ie.extractBracketedInformation(i);return{md5:r,license:s,version:a,isTrial:n,type:l}}getLicenseDetails(t,i=!1){const o="CHARTS";if(missingOrEmpty(t))return{licenseKey:t,valid:!1,missing:!0,currentLicenseType:o};const r=ie.getChartsReleaseDate(),{md5:s,license:a,version:n,isTrial:l,type:c}=ie.extractLicenseComponents(t);let h=s===this.md5.md5(a)&&!t.includes("For_Trialing_ag-Grid_Only"),u,d,p=null,g=!1,y;function x(){u=p<new Date,d=void 0}if(h&&(p=ie.extractExpiry(a),h=!Number.isNaN(p.getTime()),h))switch(d=r>p,n){case"legacy":case"2":{h=!1;break}case"3":missingOrEmpty(c)?h=!1:(y=c,c!==LICENSE_TYPES["02"]&&c!==LICENSE_TYPES["0102"]?(h=!1,g=!0):l&&x())}return h?{licenseKey:t,valid:h,expiry:ie.formatDate(p),expired:d,version:n,isTrial:l,trialExpired:u,invalidLicenseTypeForCombo:i?y!=="BOTH":void 0,incorrectLicenseType:g,currentLicenseType:o,suppliedLicenseType:y}:{licenseKey:t,valid:h,incorrectLicenseType:g,currentLicenseType:o,suppliedLicenseType:y}}isDisplayWatermark(){return this.isForceWatermark()||!this.isLocalhost()&&!this.isE2ETest()&&!this.isWebsiteUrl()&&!missingOrEmpty(this.watermarkMessage)}getWatermarkMessage(){return this.watermarkMessage??""}getWatermarkForegroundConfig(){const t=this.getWatermarkMessage();if(t)return this.buildWatermarkConfig(t)}getWatermarkForegroundConfigForBrowser(){if(!this.isDisplayWatermark())return;const t=this.getWatermarkMessage();if(t)return this.buildWatermarkConfig(t)}buildWatermarkConfig(t){return{text:t,image:{url:WATERMARK_SVG_DATA_URL,width:170,height:25,right:25,bottom:50,opacity:.7}}}getHostname(){if(!this.document)return"localhost";const t=this.document.defaultView??globalThis;if(!t)return"localhost";try{return(t.location?.hostname??"")||"localhost"}catch{return"localhost"}}isForceWatermark(){if(!this.document)return!1;const t=this.document?.defaultView??globalThis.window!=null?globalThis:void 0;if(!t)return!1;const i=t.location?.pathname;return i?i.includes("forceWatermark"):!1}isWebsiteUrl(){const t=this.getHostname();return/^((?:[\w-]+\.)?ag-grid\.com)$/.exec(t)!==null}isLocalhost(){const t=this.getHostname();return/^(?:127\.0\.0\.1|localhost)$/.exec(t)!==null}isE2ETest(){const t=this.getHostname();return/^(?:172\.17\.0\.1|host\.docker\.internal)$/.exec(t)!==null}static formatDate(t){const i=["January","February","March","April","May","June","July","August","September","October","November","December"],o=t.getDate(),r=t.getMonth(),s=t.getFullYear();return o+" "+i[r]+" "+s}static getChartsReleaseDate(){return new Date(Number.parseInt(ie.decode(ie.RELEASE_INFORMATION),10))}static decode(t){const i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let o="",r,s,a,n,l,c,h,u=0;const d=t.replaceAll(/[^A-Za-z0-9+/=]/g,"");for(;u<d.length;)n=i.indexOf(d.charAt(u++)),l=i.indexOf(d.charAt(u++)),c=i.indexOf(d.charAt(u++)),h=i.indexOf(d.charAt(u++)),r=n<<2|l>>4,s=(l&15)<<4|c>>2,a=(c&3)<<6|h,o=o+String.fromCodePoint(r),c!=64&&(o=o+String.fromCodePoint(s)),h!=64&&(o=o+String.fromCodePoint(a));return o=ie.utf8_decode(o),o}static utf8_decode(t){t=t.replaceAll("rn","n");let i="";for(let o=0;o<t.length;o++){const r=t.codePointAt(o);r<128?i+=String.fromCodePoint(r):r>127&&r<2048?(i+=String.fromCodePoint(r>>6|192),i+=String.fromCodePoint(r&63|128)):(i+=String.fromCodePoint(r>>12|224),i+=String.fromCodePoint(r>>6&63|128),i+=String.fromCodePoint(r&63|128))}return i}static setGridContext(t=!1){ie.gridContext=t}static setLicenseKey(t){this.licenseKey&&this.licenseKey!==t&&console.warn("License Key being set multiple times with different values. This can result in an incorrect license key being used."),ie.licenseKey=t}static extractBracketedInformation(t){if(!t.includes("["))return["legacy",!1,void 0];const i=t.match(/\[(.*?)\]/g).map(n=>n.replace("[","").replace("]",""));if(!i||i.length===0)return["legacy",!1,void 0];const o=i.filter(n=>n==="TRIAL").length===1,r=i.find(n=>n.startsWith("v")),s=r?r.replace("v",""):"legacy",a=LICENSE_TYPES[i.find(n=>LICENSE_TYPES[n])];return[s,o,a]}centerPadAndOutput(t){const i=this.totalMessageLength-t.length;console.error(t.padStart(i/2+t.length,"*").padEnd(this.totalMessageLength,"*"))}padAndOutput(t,i="*",o=""){console.error(t.padEnd(this.totalMessageLength-o.length,i)+o)}outputInvalidLicenseKey(t,i,o){ie.gridContext||(t?(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${i} License `),this.centerPadAndOutput(" Incompatible License Key "),this.padAndOutput(`* Your license key is for ${o} only and does not cover you for ${i}.`," ","*"),this.padAndOutput(`* To troubleshoot your license key visit ${LICENSING_HELP_URL}.`," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")):(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${i} License `),this.centerPadAndOutput(" Invalid License Key "),this.padAndOutput("* Your license key is not valid."," ","*"),this.padAndOutput(`* To troubleshoot your license key visit ${LICENSING_HELP_URL}.`," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""))),this.watermarkMessage="Invalid License"}outputExpiredTrialKey(t,i,o){ie.gridContext||(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${i} License `),this.centerPadAndOutput(" Trial Period Expired. "),this.padAndOutput(`* Your trial only license for ${o} expired on ${t}.`," ","*"),this.padAndOutput("* Please email info@ag-grid.com to purchase a license."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")),this.watermarkMessage="Trial Period Expired"}outputMissingLicenseKey(t){ie.gridContext||(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${t} License `),this.centerPadAndOutput(" License Key Not Found "),this.padAndOutput(`* All ${t} features are unlocked for trial.`," ","*"),this.padAndOutput("* If you want to hide the watermark please email info@ag-grid.com for a trial license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")),this.watermarkMessage="For Trial Use Only"}outputExpiredKey(t,i,o){ie.gridContext||(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${o} License `),this.centerPadAndOutput(" Incompatible Software Version "),this.padAndOutput(`* Your license key works with versions of ${o} released before ${t}.`," ","*"),this.padAndOutput(`* The version you are trying to use was released on ${i}.`," ","*"),this.padAndOutput("* Please contact info@ag-grid.com to renew your license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")),this.watermarkMessage="License Expired"}};_LicenseManager.RELEASE_INFORMATION="MTc3MDgwNzY1NDM4MQ==",_LicenseManager.gridContext=!1;var LicenseManager=_LicenseManager,import_ag_charts_core4=require("ag-charts-core");function injectWatermark(e,t){const i=e.addChild("canvas-overlay","watermark"),o=(0,import_ag_charts_core4.createElement)("span");o.innerText=t,i.addEventListener("animationend",()=>{e.removeChild("canvas-overlay","watermark"),e.removeStyles("watermark")}),i.classList.add("ag-watermark"),i.appendChild(o)}var styles_default=`.ag-watermark{position:absolute;bottom:20px;right:25px;font-weight:700;font-family:Impact,sans-serif;font-size:19px;opacity:.7;animation:1s ease-out 3s ag-watermark-fadeout;color:#9b9b9b;pointer-events:none;&:before{content:"";display:block;height:40px;width:170px;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjU4IiBoZWlnaHQ9IjQwIiB2aWV3Qm94PSIwIDAgMjU4IDQwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMjUuNzc5IDI4LjY1N0gxMy4zNTlMMTEuMTczIDM0LjAxMkg1LjY3Mjk3TDE3LjE4MiA3LjA1OTk5SDIxLjk1M0wzMy40NjIgMzQuMDEySDI3Ljk2MkwyNS43NzYgMjguNjU3SDI1Ljc3OVpNMjQuMDY4IDI0LjM5N0wxOS41ODggMTMuNDM0TDE1LjEwNyAyNC4zOTdIMjQuMDY4Wk02Mi4wOTIgMTguODIzSDQ5LjgxN1YyMy4wODZINTYuNzc1QzU2LjU1NSAyNS4yMjIgNTUuNzU1IDI2LjkyNyA1NC4zNzIgMjguMjAyQzUyLjk4OSAyOS40NzYgNTEuMTY2IDMwLjExNSA0OC45MDkgMzAuMTE1QzQ3LjYyMiAzMC4xMTUgNDYuNDUgMjkuODg1IDQ1LjM5MyAyOS40MjNDNDQuMzU4MyAyOC45NzgxIDQzLjQzMjYgMjguMzEzOCA0Mi42OCAyNy40NzZDNDEuOTI3IDI2LjYzOSA0MS4zNDQgMjUuNjMxIDQwLjkzMSAyNC40NTNDNDAuNTE5IDIzLjI3NSA0MC4zMTEgMjEuOTcgNDAuMzExIDIwLjUzN0M0MC4zMTEgMTkuMTA1IDQwLjUxNiAxNy44IDQwLjkzMSAxNi42MjFDNDEuMzQ0IDE1LjQ0MyA0MS45MjcgMTQuNDM2IDQyLjY4IDEzLjU5OEM0My40Mzc2IDEyLjc1NzcgNDQuMzY5NiAxMi4wOTMyIDQ1LjQxMSAxMS42NTFDNDYuNDc4IDExLjE4OSA0Ny42NTYgMTAuOTYgNDguOTQ2IDEwLjk2QzUxLjYxMiAxMC45NiA1My42MzcgMTEuNjAyIDU1LjAyIDEyLjg4NUw1OC4zIDkuNjA0OTlDNTUuODE3IDcuNjY5OTkgNTIuNjc2IDYuNjk5OTkgNDguODcyIDYuNjk5OTlDNDYuNzYgNi42OTk5OSA0NC44NTMgNy4wMzQ5OSA0My4xNTQgNy43MDA5OUM0MS40NTUgOC4zNjc5OSAzOS45OTggOS4zMDM5OSAzOC43ODMgMTAuNTA0QzM3LjU2NyAxMS43MDcgMzYuNjM0IDEzLjE1OCAzNS45NzcgMTQuODU3QzM1LjMxOSAxNi41NTYgMzQuOTk0IDE4LjQ1MSAzNC45OTQgMjAuNTRDMzQuOTk0IDIyLjYzIDM1LjMyOSAyNC40OTQgMzUuOTk1IDI2LjIwNUMzNi42NjIgMjcuOTE2IDM3LjYwNSAyOS4zNzQgMzguODE3IDMwLjU3N0M0MC4wMzIgMzEuNzggNDEuNDg2IDMyLjcxMyA0My4xODggMzMuMzgzQzQ0Ljg4OCAzNC4wNDkgNDYuNzgyIDM0LjM4NCA0OC44NzIgMzQuMzg0QzUwLjk2MSAzNC4zODQgNTIuNzUgMzQuMDQ5IDU0LjM5IDMzLjM4M0M1Ni4wMzEgMzIuNzE2IDU3LjQyNiAzMS43OCA1OC41NzkgMzAuNTc3QzU5LjczMyAyOS4zNzQgNjAuNjE5IDI3LjkxNiA2MS4yMzkgMjYuMjA1QzYxLjg2IDI0LjQ5NCA2Mi4xNyAyMi42MDUgNjIuMTcgMjAuNTRDNjIuMTY5NiAxOS45Njg4IDYyLjE0NDUgMTkuMzk4IDYyLjA5NSAxOC44MjlMNjIuMDkyIDE4LjgyM1pNMTUxLjgxIDE2Ljk4MUMxNTMuNDEgMTQuNjA5IDE1Ny40MTkgMTQuMzU4IDE1OS4wMjIgMTQuMzU4VjE4LjkxQzE1Ni45NTcgMTguOTEgMTU0Ljk4NSAxOC45OTYgMTUzLjc1NyAxOS44OTJDMTUyLjUyOSAyMC43OTIgMTUxLjkxOSAyMS45ODIgMTUxLjkxOSAyMy40NjRWMzMuOTlIMTQ2Ljk2NFYxNC4zNThIMTUxLjczNkwxNTEuODEgMTYuOTgxWk0xNDMuMDExIDE0LjM2MVYzNC4wMzFIMTM4LjI0TDEzOC4xMzEgMzEuMDQ1QzEzNy40NjYgMzIuMDc2IDEzNi41NTEgMzIuOTIxOSAxMzUuNDcxIDMzLjUwNEMxMzQuMzc2IDM0LjA5OSAxMzMuMDY4IDM0LjM5NiAxMzEuNTM2IDM0LjM5NkMxMzAuMiAzNC4zOTYgMTI4Ljk2MyAzNC4xNTIgMTI3LjgyMiAzMy42NjhDMTI2LjcgMzMuMTk2NCAxMjUuNjg5IDMyLjQ5NSAxMjQuODU1IDMxLjYwOUMxMjQuMDE4IDMwLjcyMiAxMjMuMzU0IDI5LjY2MiAxMjIuODcxIDI4LjQyMkMxMjIuMzg0IDI3LjE4NSAxMjIuMTQyIDI1LjgxMSAxMjIuMTQyIDI0LjMwNEMxMjIuMTQyIDIyLjc5OCAxMjIuMzg0IDIxLjM3OCAxMjIuODcxIDIwLjExNkMxMjMuMzU3IDE4Ljg1NCAxMjQuMDE4IDE3Ljc3MiAxMjQuODU1IDE2Ljg3M0MxMjUuNjg4IDE1Ljk3NjQgMTI2LjY5OCAxNS4yNjM2IDEyNy44MjIgMTQuNzhDMTI4Ljk2MyAxNC4yODEgMTMwLjIwMyAxNC4wMzMgMTMxLjUzNiAxNC4wMzNDMTMzLjA0MyAxNC4wMzMgMTM0LjMzIDE0LjMxOCAxMzUuMzk3IDE0Ljg4OEMxMzYuNDYyIDE1LjQ1ODkgMTM3LjM3NSAxNi4yNzggMTM4LjA1NyAxNy4yNzZWMTQuMzYxSDE0My4wMTFaTTEzMi42MzEgMzAuMTMzQzEzNC4yNTYgMzAuMTMzIDEzNS41NjcgMjkuNTk0IDEzNi41NjUgMjguNTEyQzEzNy41NjEgMjcuNDMgMTM4LjA2IDI1Ljk5MSAxMzguMDYgMjQuMTk2QzEzOC4wNiAyMi40MDEgMTM3LjU2MSAyMC45OSAxMzYuNTY1IDE5Ljg5OUMxMzUuNTcgMTguODA3IDEzNC4yNTkgMTguMjU4IDEzMi42MzEgMTguMjU4QzEzMS4wMDMgMTguMjU4IDEyOS43MjkgMTguODA0IDEyOC43MzQgMTkuODk5QzEyNy43MzggMjAuOTkzIDEyNy4yMzkgMjIuNDM4IDEyNy4yMzkgMjQuMjMzQzEyNy4yMzkgMjYuMDI4IDEyNy43MzUgMjcuNDMzIDEyOC43MzQgMjguNTE1QzEyOS43MjkgMjkuNTk0IDEzMS4wMjggMzAuMTM2IDEzMi42MzEgMzAuMTM2VjMwLjEzM1pNOTMuNjk4IDI3Ljg3NkM5My41Nzk1IDI4LjAwMjUgOTMuNDU2NCAyOC4xMjQ2IDkzLjMyOSAyOC4yNDJDOTEuOTQ3IDI5LjUxNiA5MC4xMjMgMzAuMTU1IDg3Ljg2NiAzMC4xNTVDODYuNTggMzAuMTU1IDg1LjQwOCAyOS45MjYgODQuMzUgMjkuNDY0QzgzLjMxNTUgMjkuMDE4OSA4Mi4zODk4IDI4LjM1NDYgODEuNjM3IDI3LjUxN0M4MC44ODQgMjYuNjc5IDgwLjMwMSAyNS42NzIgNzkuODg5IDI0LjQ5NEM3OS40NzYgMjMuMzE1IDc5LjI2OSAyMi4wMSA3OS4yNjkgMjAuNTc4Qzc5LjI2OSAxOS4xNDUgNzkuNDczIDE3Ljg0IDc5Ljg4OSAxNi42NjJDODAuMzAxIDE1LjQ4NCA4MC44ODQgMTQuNDc2IDgxLjYzNyAxMy42MzlDODIuMzk0OSAxMi43OTg3IDgzLjMyNzMgMTIuMTM0MiA4NC4zNjkgMTEuNjkyQzg1LjQzNiAxMS4yMyA4Ni42MTQgMTEgODcuOTAzIDExQzkwLjU3IDExIDkyLjU5NSAxMS42NDIgOTMuOTc3IDEyLjkyNkw5Ny4yNTggOS42NDQ5OUM5NC43NzQgNy43MTA5OSA5MS42MzMgNi43Mzk5OSA4Ny44MjkgNi43Mzk5OUM4NS43MTggNi43Mzk5OSA4My44MTEgNy4wNzQ5OSA4Mi4xMTIgNy43NDE5OUM4MC40MTMgOC40MDc5OSA3OC45NTYgOS4zNDQ5OSA3Ny43NCAxMC41NDVDNzYuNTI1IDExLjc0NyA3NS41OTIgMTMuMTk5IDc0LjkzNCAxNC44OThDNzQuMjc3IDE2LjU5NyA3My45NTEgMTguNDkxIDczLjk1MSAyMC41ODFDNzMuOTUxIDIyLjY3IDc0LjI4NiAyNC41MzQgNzQuOTUzIDI2LjI0NUM3NS42MTkgMjcuOTU3IDc2LjU2MiAyOS40MTQgNzcuNzc0IDMwLjYxN0M3OC45OSAzMS44MiA4MC40NDQgMzIuNzUzIDgyLjE0NiAzMy40MjNDODMuODQ1IDM0LjA5IDg1LjczOSAzNC40MjQgODcuODI5IDM0LjQyNEM4OS45MTkgMzQuNDI0IDkxLjcwOCAzNC4wOSA5My4zNDggMzMuNDIzQzk0LjcxOCAzMi44NjUgOTUuOTE4IDMyLjEyMSA5Ni45NDggMzEuMTkxQzk3LjE0OSAzMS4wMDggOTcuMzQ4IDMwLjgxNSA5Ny41MzcgMzAuNjJMOTMuNzAxIDI3Ljg4NUw5My42OTggMjcuODc2Wk0xMTAuODAyIDE0LjAxNUMxMDkuMTk5IDE0LjAxNSAxMDYuODM2IDE0LjQ3MSAxMDUuNjExIDE2LjE1OEwxMDUuNTM3IDYuMDE1OTlIMTAwLjc2NVYzMy45MzlIMTA1LjcyVjIyLjY0MUMxMDUuNzcxIDIxLjQ2MDcgMTA2LjI4OCAyMC4zNDg4IDEwNy4xNTcgMTkuNTQ4OUMxMDguMDI3IDE4Ljc0OTEgMTA5LjE3OCAxOC4zMjY2IDExMC4zNTggMTguMzc0QzExMy4zOTcgMTguMzc0IDExNC4yNjggMjEuMTU5IDExNC4yNjggMjIuNjQxVjMzLjkzOUgxMTkuMjIzVjIxLjA1OUMxMTkuMjIzIDIxLjA1OSAxMTkuMTQyIDE0LjAxNSAxMTAuODAyIDE0LjAxNVpNMTczLjc2MyAxNC4zNThIMTY5Ljk5OVY4LjcxNDk5SDE2NS4wNDhWMTQuMzU4SDE2MS4yODRWMTguOTE2SDE2NS4wNDhWMzQuMDAzSDE2OS45OTlWMTguOTE2SDE3My43NjNWMTQuMzU4Wk0xOTAuNzg3IDI1LjI2MkMxOTAuMTI5IDI0LjUwMTQgMTg5LjMwNyAyMy44OTk0IDE4OC4zODQgMjMuNTAxQzE4Ny40ODggMjMuMTE3IDE4Ni4zMzEgMjIuNzMyIDE4NC45NDggMjIuMzY0QzE4NC4xNjUgMjIuMTQzOSAxODMuMzkgMjEuODk3OCAxODIuNjIzIDIxLjYyNkMxODIuMTYzIDIxLjQ2MjEgMTgxLjc0MSAyMS4yMDY2IDE4MS4zODMgMjAuODc1QzE4MS4yMzUgMjAuNzQyMSAxODEuMTE4IDIwLjU3ODkgMTgxLjAzOSAyMC4zOTY0QzE4MC45NjEgMjAuMjE0IDE4MC45MjIgMjAuMDE2NiAxODAuOTI3IDE5LjgxOEMxODAuOTI3IDE5LjI3MiAxODEuMTU2IDE4Ljg0NCAxODEuNjI1IDE4LjUxQzE4Mi4xMjEgMTguMTU2IDE4Mi44NjIgMTcuOTc2IDE4My44MjYgMTcuOTc2QzE4NC43OSAxNy45NzYgMTg1LjU4NyAxOC4yMDkgMTg2LjE0OCAxOC42NjhDMTg2LjcwNiAxOS4xMjQgMTg3LjAwNyAxOS43MjUgMTg3LjA3MiAyMC41TDE4Ny4wOTQgMjAuNzgySDE5MS42MzNMMTkxLjYxNyAyMC40NkMxOTEuNTIxIDE4LjQ4NSAxOTAuNzcxIDE2LjkgMTg5LjM4NSAxNS43NUMxODguMDEyIDE0LjYxMiAxODYuMTg1IDE0LjAzMyAxODMuOTYyIDE0LjAzM0MxODIuNDc3IDE0LjAzMyAxODEuMTQxIDE0LjI4NyAxNzkuOTk0IDE0Ljc4NkMxNzguODMxIDE1LjI5MSAxNzcuOTI2IDE1Ljk5NSAxNzcuMjk2IDE2Ljg4MkMxNzYuNjczIDE3Ljc0NTUgMTc2LjMzOCAxOC43ODQgMTc2LjM0MSAxOS44NDlDMTc2LjM0MSAyMS4xNjcgMTc2LjY5OCAyMi4yNDkgMTc3LjM5OSAyMy4wNjRDMTc4LjA2IDIzLjg0MzIgMTc4Ljg5OCAyNC40NTM0IDE3OS44NDIgMjQuODQ0QzE4MC43NDQgMjUuMjE2IDE4MS45MjggMjUuNjA3IDE4My4zNjEgMjZDMTg0LjgwNiAyNi40MSAxODUuODcyIDI2Ljc4NSAxODYuNTMgMjcuMTIzQzE4Ny4xIDI3LjQxNCAxODcuMzc5IDI3Ljg0NSAxODcuMzc5IDI4LjQ0NEMxODcuMzc5IDI5LjA0MiAxODcuMTIyIDI5LjQ2NyAxODYuNTk1IDI5LjgzOUMxODYuMDQzIDMwLjIyNiAxODUuMjM3IDMwLjQyNSAxODQuMjAxIDMwLjQyNUMxODMuMTY2IDMwLjQyNSAxODIuMzk0IDMwLjE3NCAxODEuNzQ5IDI5LjY3NEMxODEuMTEzIDI5LjE4MSAxODAuNzcyIDI4LjU4OSAxODAuNzEgMjcuODY0TDE4MC42ODUgMjcuNTgySDE3Ni4wMTNMMTc2LjAyNSAyNy45MDFDMTc2LjA2NyAyOS4wOTU1IDE3Ni40NzIgMzAuMjQ4NyAxNzcuMTg4IDMxLjIwNkMxNzcuOTA3IDMyLjE4IDE3OC44OTMgMzIuOTU4IDE4MC4xMTggMzMuNTE5QzE4MS4zMzYgMzQuMDc3IDE4Mi43MzIgMzQuMzYyIDE4NC4yNjYgMzQuMzYyQzE4NS44MDEgMzQuMzYyIDE4Ny4xMDkgMzQuMTA4IDE4OC4yMzggMzMuNjA5QzE4OS4zNzYgMzMuMTA0IDE5MC4yNzIgMzIuMzk0IDE5MC45MDEgMzEuNDk0QzE5MS41MzQgMzAuNTkyIDE5MS44NTMgMjkuNTU0IDE5MS44NTMgMjguNDAzQzE5MS44MjggMjcuMTEgMTkxLjQ2NiAyNi4wNTMgMTkwLjc3NyAyNS4yNjJIMTkwLjc4N1oiIGZpbGw9IiM5QjlCOUIiLz4KPHBhdGggZD0iTTI0MS45ODIgMjUuNjU4MlYxNy43MTE3SDIyOC40NDFMMjIwLjQ5NCAyNS42NTgySDI0MS45ODJaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0yNTcuMjM5IDUuOTUwODFIMjQwLjI2NUwyMzIuMjU1IDEzLjg5NzNIMjU3LjIzOVY1Ljk1MDgxWiIgZmlsbD0iIzlCOUI5QiIvPgo8cGF0aCBkPSJNMjEyLjYxMSAzMy42MDQ4TDIxNi42OCAyOS41MzYxSDIzMC40MTJWMzcuNDgyN0gyMTIuNjExVjMzLjYwNDhaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0yMTUuNTk5IDIxLjc4MDNIMjI0LjM3MkwyMzIuMzgyIDEzLjgzMzdIMjE1LjU5OVYyMS43ODAzWiIgZmlsbD0iIzlCOUI5QiIvPgo8cGF0aCBkPSJNMjA2IDMzLjYwNDdIMjEyLjYxMUwyMjAuNDk0IDI1LjY1ODJIMjA2VjMzLjYwNDdaIiBmaWxsPSIjOUI5QjlCIi8+CjxwYXRoIGQ9Ik0yNDAuMjY1IDUuOTUwODFMMjM2LjE5NyAxMC4wMTk0SDIxMC4yNTlWMi4wNzI4OEgyNDAuMjY1VjUuOTUwODFaIiBmaWxsPSIjOUI5QjlCIi8+Cjwvc3ZnPgo=);background-repeat:no-repeat;background-size:170px 40px}>span{padding-left:.7rem}}@keyframes ag-watermark-fadeout{0%{opacity:.5}to{opacity:0}}.ag-charts-dialog{display:flex;flex-direction:column;font-size:var(--ag-charts-chrome-font-size-large)}.ag-charts-dialog__tabs{display:flex;flex-direction:column}.ag-charts-dialog__header{border-bottom:1px solid var(--ag-charts-border-color);display:flex}.ag-charts-dialog__tab-list{display:flex;gap:calc(var(--ag-charts-spacing) * 2)}.ag-charts-dialog__drag-handle{align-items:center;color:inherit;cursor:grab;display:flex;padding:1px 6px;text-align:center}.ag-charts-dialog__drag-handle--dragging{cursor:grabbing}.ag-charts-dialog__tab-button{background:none;border:0;border-bottom:2px solid transparent;border-radius:0;color:var(--ag-charts-panel-subtle-text-color);margin-bottom:-1px;padding:var(--input-padding) calc(var(--input-padding) / 2)}.ag-charts-dialog__tab-button:hover{background:none}.ag-charts-dialog__tab-button--active{border-color:var(--ag-charts-accent-color);color:inherit}.ag-charts-dialog__drag-handle+.ag-charts-dialog__tab-button{margin-left:calc(var(--ag-charts-spacing) * -2)}.ag-charts-button.ag-charts-dialog__close-button{background:none;border:0;margin-left:auto;padding:1px 6px}.ag-charts-dialog__close-button:focus-visible{outline:var(--ag-charts-focus-border);box-shadow:var(--ag-charts-focus-border-shadow);z-index:calc(var(--ag-charts-layer-ui-overlay) + 1)}.ag-charts-dialog__tab-panel{display:none;flex-direction:column;gap:calc(var(--ag-charts-spacing) * 4);margin:0 calc(var(--ag-charts-spacing) * 4);padding:calc(var(--ag-charts-spacing) * 4) 0}.ag-charts-dialog__tab-panel--active{display:flex}.ag-charts-dialog__input-group-line{display:flex;gap:16px 18px;flex-wrap:wrap}.ag-charts-dialog__input-group{align-items:center;display:flex;font-size:var(--ag-charts-chrome-font-size)}.ag-charts-dialog__input-group-label{color:var(--ag-charts-panel-subtle-text-color);margin-right:5px}.ag-charts-dialog__input-group-label[for]{cursor:pointer}.ag-charts-dialog__button{border-radius:0;margin-right:-1px}.ag-charts-dialog__button.ag-charts-dialog__button--active{background:var(--ag-charts-button-focus-background-color);border-color:var(--ag-charts-input-focus-border-color);color:var(--ag-charts-input-focus-text-color);z-index:var(--input-layer-active)}.ag-charts-dialog__button:first-child,.ag-charts-dialog__input-group-label+.ag-charts-dialog__button{border-bottom-left-radius:var(--ag-charts-input-border-radius);border-top-left-radius:var(--ag-charts-input-border-radius)}.ag-charts-dialog__button:last-child{border-bottom-right-radius:var(--ag-charts-input-border-radius);border-top-right-radius:var(--ag-charts-input-border-radius)}.ag-charts-dialog__color-picker-button{--color: #000;background:var(--color);border:none;color:transparent;height:26px;width:26px}.ag-charts-dialog__color-picker-button:hover{background:var(--color)}.ag-charts-dialog__color-picker-button--multi-color,.ag-charts-dialog__color-picker-button--multi-color:hover{background:linear-gradient(135deg,red 0%,#ff0 calc(100% * 1 / 6),#0f0 calc(100% * 2 / 6),#0ff 50%,#00f calc(100% * 4 / 6),#f0f calc(100% * 5 / 6),red 100%)}.ag-charts-color-picker{width:190px;padding:8px;cursor:default;--h: 0;--s: 0;--v: 0;--a: 0;--color: #000;--color-a: #000;--thumb-size: 18px;--inner-width: 172px;--track-height: 12px;--palette-height: 136px;--checker: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4"><rect x="0" y="0" width="4" height="4" fill="%23fff"/><path d="M0 0H2V4H4V2H0Z" fill="%23b2b2b2"/></svg>');--multi-color: linear-gradient( 135deg, #f00 0% , #ff0 calc(100% * 1 / 6), #0f0 calc(100% * 2 / 6), #0ff 50% , #00f calc(100% * 4 / 6), #f0f calc(100% * 5 / 6), #f00 100% )}.ag-charts-color-picker__content{display:flex;flex-direction:column}.ag-charts-color-picker__palette{position:relative;width:100%;height:var(--palette-height);margin-bottom:8px;background:linear-gradient(to bottom,#0000,#000),linear-gradient(to right,#fff,#fff0) hsl(var(--h),100%,50%);border-radius:calc(var(--ag-charts-border-radius) * 1.5);box-shadow:inset 0 0 0 1px #0003}.ag-charts-color-picker__palette:after{content:"";position:absolute;display:block;top:calc(var(--thumb-size) * -.5 + (1 - var(--v)) * 100%);left:calc(var(--thumb-size) * -.5 + var(--s) * 100%);background:var(--color);width:var(--thumb-size);height:var(--thumb-size);border-radius:calc(var(--ag-charts-border-radius) * 99);box-shadow:var(--box-shadow);--box-shadow: inset 0 0 0 3px white, inset 0 0 1px 3px #0006, 0 0 5px #00000038}.ag-charts-color-picker__palette:focus-visible:after{outline:var(--ag-charts-focus-border);box-shadow:var(--box-shadow),0 0 0 2px #fff8,var(--ag-charts-focus-border-shadow)}.ag-charts-color-picker__color-row{display:flex;gap:8px;align-items:center;margin-bottom:4px;--inset: calc((var(--thumb-size) - var(--track-height)) / 2)}.ag-charts-color-picker__hue-input,.ag-charts-color-picker__alpha-input{-webkit-appearance:none;display:block;position:relative;padding:0;margin:0 calc(var(--inset) * -1);border:0;height:var(--thumb-size);width:auto;background:transparent;--inset: calc((var(--thumb-size) - var(--track-height)) / 2)}.ag-charts-color-picker__hue-input::-moz-range-thumb,.ag-charts-color-picker__alpha-input::-moz-range-thumb{appearance:none;width:var(--thumb-size);height:var(--thumb-size);border-radius:calc(var(--ag-charts-border-radius) * 99);box-shadow:var(--box-shadow);--box-shadow: inset 0 0 0 3px white, inset 0 0 1px 3px #0006, 0 0 5px #00000038}.ag-charts-color-picker__hue-input::-webkit-slider-thumb,.ag-charts-color-picker__alpha-input::-webkit-slider-thumb{-webkit-appearance:none;width:var(--thumb-size);height:var(--thumb-size);border-radius:calc(var(--ag-charts-border-radius) * 99);box-shadow:var(--box-shadow);--box-shadow: inset 0 0 0 3px white, inset 0 0 1px 3px #0006, 0 0 5px #00000038;transform:translateZ(0)}.ag-charts-color-picker__hue-input::-moz-range-thumb{background:hsl(var(--h),100%,50%)}.ag-charts-color-picker__hue-input::-webkit-slider-thumb{background:hsl(var(--h),100%,50%)}.ag-charts-color-picker__alpha-input::-moz-range-thumb{background:transparent}.ag-charts-color-picker__alpha-input::-webkit-slider-thumb{background:transparent}.ag-charts-color-picker__alpha-input--opaque::-moz-range-thumb{background:var(--color)}.ag-charts-color-picker__alpha-input--opaque::-webkit-slider-thumb{background:var(--color)}.ag-charts-color-picker__hue-input:focus-visible::-moz-range-thumb,.ag-charts-color-picker__alpha-input:focus-visible::-moz-range-thumb{outline:var(--ag-charts-focus-border);box-shadow:var(--box-shadow),var(--ag-charts-focus-border-shadow)}.ag-charts-color-picker__hue-input:focus-visible::-webkit-slider-thumb,.ag-charts-color-picker__alpha-input:focus-visible::-webkit-slider-thumb{outline:var(--ag-charts-focus-border);box-shadow:var(--box-shadow),var(--ag-charts-focus-border-shadow)}.ag-charts-color-picker__hue-input::-moz-range-track,.ag-charts-color-picker__alpha-input::-moz-range-track{position:absolute;content:"";display:block;top:calc(50% - var(--track-height) / 2);left:var(--inset);right:var(--inset);height:var(--track-height);border-radius:calc(var(--ag-charts-border-radius) * 99);box-shadow:inset 0 0 0 1px #0003}.ag-charts-color-picker__hue-input:before,.ag-charts-color-picker__alpha-input:before{position:absolute;content:"";display:block;top:calc(50% - var(--track-height) / 2);left:var(--inset);right:var(--inset);height:var(--track-height);border-radius:calc(var(--ag-charts-border-radius) * 99);box-shadow:inset 0 0 0 1px #0003}.ag-charts-color-picker__multi-color-button{width:36px;margin-left:var(--inset);height:var(--track-height);border-radius:calc(var(--ag-charts-border-radius) * 99);border:0;background:var(--multi-color);box-shadow:inset 0 0 0 1px #0003}.ag-charts-color-picker__multi-color-button--hidden{display:none}.ag-charts-color-picker__multi-color-button--active{box-shadow:inset 0 0 0 1px #0003;outline-offset:1px;outline:2px solid #2196f3}.ag-charts-color-picker__hue-input{flex:1 0 0}.ag-charts-color-picker__hue-input::-moz-range-track{background:linear-gradient(to right,red,red calc((100% - var(--track-height)) * 0 / 6 + var(--track-height) / 2),#ff0 calc((100% - var(--track-height)) * 1 / 6 + var(--track-height) / 2),#0f0 calc((100% - var(--track-height)) * 2 / 6 + var(--track-height) / 2),#0ff calc((100% - var(--track-height)) * 3 / 6 + var(--track-height) / 2),#00f calc((100% - var(--track-height)) * 4 / 6 + var(--track-height) / 2),#f0f calc((100% - var(--track-height)) * 5 / 6 + var(--track-height) / 2),red calc((100% - var(--track-height)) * 6 / 6 + var(--track-height) / 2))}.ag-charts-color-picker__hue-input:before{background:linear-gradient(to right,red,red calc((100% - var(--track-height)) * 0 / 6 + var(--track-height) / 2),#ff0 calc((100% - var(--track-height)) * 1 / 6 + var(--track-height) / 2),#0f0 calc((100% - var(--track-height)) * 2 / 6 + var(--track-height) / 2),#0ff calc((100% - var(--track-height)) * 3 / 6 + var(--track-height) / 2),#00f calc((100% - var(--track-height)) * 4 / 6 + var(--track-height) / 2),#f0f calc((100% - var(--track-height)) * 5 / 6 + var(--track-height) / 2),red calc((100% - var(--track-height)) * 6 / 6 + var(--track-height) / 2))}.ag-charts-color-picker__alpha-input{margin-bottom:7px}.ag-charts-color-picker__alpha-input::-moz-range-track{background:linear-gradient(to right,transparent,var(--color)),var(--checker) top left / 4px 4px}.ag-charts-color-picker__alpha-input:before{background:linear-gradient(to right,transparent,var(--color)),var(--checker) top left / 4px 4px}.ag-charts-color-picker__color-field{display:flex;border:var(--ag-charts-border);background:var(--ag-charts-background-color);border-radius:var(--ag-charts-border-radius);overflow:hidden}.ag-charts-color-picker__color-field:has(:focus-visible){border-color:var(--ag-charts-accent-color);box-shadow:var(--ag-charts-focus-border-shadow)}.ag-charts-color-picker__color-label{width:16px;height:16px;margin:7px 0 7px 7px;color:transparent;background:linear-gradient(to right,var(--color-a),var(--color-a)),var(--checker) top left / 4px 4px;border-radius:calc(var(--ag-charts-border-radius) / 2);box-shadow:inset 0 0 0 1px #0003}.ag-charts-color-picker__color-label--multi-color{background:var(--multi-color)}.ag-charts-color-picker__color-input{flex:1;min-width:0;padding:7px 7px 7px 8px;border:0;margin:0;color:inherit;background:transparent;font-variant:tabular-nums}.ag-charts-color-picker__color-input:focus-visible{border:none;outline:none}.ag-charts-annotations__line-stroke-width-menu,.ag-charts-annotations__line-style-type-menu,.ag-charts-annotations__text-size-menu{border-top-left-radius:0;border-top-right-radius:0;.ag-charts-menu__row:first-child{border-radius:0}}.ag-charts-annotations__text-size-menu{--item-padding: 4px 8px;min-width:34px;text-align:center}.ag-charts-annotations__line-stroke-width-menu{--item-padding: 6px;column-gap:6px}.ag-charts-annotations__line-style-type-menu{--item-padding: 6px;column-gap:0}.ag-charts-annotations__stroke-width-button:before{background:var(--ag-charts-foreground-color);content:"";margin-right:var(--toolbar-button-padding);height:min(var(--stroke-width),20px);width:12px}.ag-charts-annotations__stroke-width-button[aria-disabled=true]:before{filter:grayscale(1);opacity:.5}.ag-charts-annotations__color-picker-button{--emblem: var(--color)}.ag-charts-annotations__color-picker-button--multi-color{--emblem: linear-gradient( to right, #f00 0% , #ff0 calc(100% * 1 / 6), #0f0 calc(100% * 2 / 6), #0ff 50% , #00f calc(100% * 4 / 6), #f0f calc(100% * 5 / 6), #f00 100% )}.ag-charts-annotations__color-picker-button:after{content:"";display:block;position:absolute;bottom:3px;left:5px;right:5px;height:4px;border-radius:99px;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ag-charts-foreground-color) 10%,transparent);background:var(--emblem)}.ag-charts-annotations__color-picker-button[aria-disabled=true]:after{filter:grayscale(1);opacity:.5}.ag-charts-annotations__toolbar-menu{min-width:200px}.ag-charts-annotations__axis-button--hidden{display:none}.ag-charts-annotations__axis-button{background-color:var(--ag-charts-crosshair-label-background-color);border-radius:calc(var(--ag-charts-border-radius) / 2);border:none;box-sizing:border-box;color:var(--ag-charts-crosshair-label-text-color);cursor:pointer;font-family:var(--ag-charts-button-font-family);font-size:var(--ag-charts-button-font-size);font-weight:var(--ag-charts-button-font-weight);left:0;line-height:16px;overflow:hidden;padding:0;position:absolute;top:0;user-select:none;white-space:nowrap;z-index:var(--ag-charts-layer-annotations)}.ag-charts-annotations__axis-button:hover{opacity:.8;color:var(--ag-charts-background-color)}.ag-charts-dialog--annotation-settings{min-height:233px;width:289px}.ag-charts-dialog--annotation-settings .ag-charts-textarea{height:calc(10px * 2 + var(--textarea-line-height) * 1em * 3 + 2px);overflow-y:auto;resize:vertical}.ag-charts-context-menu{font-family:var(--ag-charts-chrome-font-family);font-size:var(--ag-charts-chrome-font-size);font-weight:var(--ag-charts-chrome-font-weight);z-index:var(--ag-charts-layer-ui-overlay)}.ag-charts-context-menu__cover{position:fixed;left:0;top:0}.ag-charts-context-menu__menu{background:var(--ag-charts-menu-background-color);border-radius:var(--ag-charts-border-radius);border:var(--ag-charts-menu-border);box-shadow:var(--ag-charts-popup-shadow);color:var(--ag-charts-menu-text-color);display:flex;flex-direction:column;padding:.5em 0;transition:transform .1s ease;white-space:nowrap}.ag-charts-context-menu__menu:focus{outline:none}.ag-charts-context-menu__item{align-items:center;background:none;border:none;box-sizing:border-box;color:inherit;cursor:pointer;display:flex;font:inherit;justify-content:space-between;text-align:left;width:100%;-webkit-appearance:none;-moz-appearance:none}.ag-charts-context-menu__icon>img{width:var(--ag-charts-icon-size);height:var(--ag-charts-icon-size)}.ag-charts-context-menu__icon,.ag-charts-context-menu__cell{display:flex;align-items:center;flex-shrink:0}.ag-charts-context-menu__cell{flex-grow:1}.ag-charts-context-menu__cellpadding{padding:.5em 1em}.ag-charts-context-menu__icon{padding-right:0}.ag-charts-context-menu__item[data-focus-override=true],.ag-charts-context-menu__item:focus,.ag-charts-context-menu__item:active{background:var(--ag-charts-focus-color)}.ag-charts-context-menu__item[data-focus-override=false]{background:inherit}.ag-charts-context-menu__item[data-focus-visible-override=true]:focus,.ag-charts-context-menu__item:focus-visible{outline:var(--ag-charts-focus-border);box-shadow:var(--ag-charts-focus-border-shadow);z-index:calc(var(--ag-charts-layer-ui-overlay) + 1)}.ag-charts-context-menu__item[data-focus-visible-override=false]{outline:inherit;box-shadow:inherit;z-index:inherit}.ag-charts-context-menu__item[aria-disabled=true]{border:none;color:color-mix(in srgb,var(--ag-charts-input-text-color) 50%,transparent)}.ag-charts-context-menu__item[aria-disabled=true]:focus{background:inherit;cursor:inherit}.ag-charts-context-menu__divider{padding:5px 0}.ag-charts-context-menu__divider:after{content:"";display:block;border-top:1px solid var(--ag-charts-border-color)}.ag-charts-crosshair-label{position:absolute;left:0;top:0;user-select:none;pointer-events:none;font-family:var(--ag-charts-font-family);font-size:var(--ag-charts-font-size);font-weight:var(--ag-charts-font-weight);overflow:hidden;white-space:nowrap;z-index:var(--ag-charts-layer-crosshair);box-sizing:border-box}.ag-charts-crosshair-label-content{padding:0 8px;border-radius:calc(var(--ag-charts-border-radius) / 2);line-height:calc(var(--ag-charts-font-size) + 8px);background-color:var(--ag-charts-crosshair-label-background-color);color:var(--ag-charts-crosshair-label-text-color)}.ag-charts-crosshair-label--hidden{visibility:hidden!important}.ag-charts-text-input{position:absolute}.ag-charts-text-input__textarea{--placeholder-text-color: var(--ag-charts-input-placeholder-text-color);display:block;height:100%;width:100%;border:0;background:none;line-height:1.38;outline:none;transform:translateY(.09em)}.ag-charts-text-input__textarea[placeholder]:empty:before{content:attr(placeholder);color:var(--placeholder-text-color);font-weight:400}.ag-charts-text-input__textarea[placeholder]:not(:empty):before{content:""}.ag-charts-chart-toolbar__menu{min-width:200px}.ag-charts-range-buttons .ag-charts-toolbar__button{padding:var(--toolbar-button-padding) calc(var(--toolbar-button-padding) * 1.5)}.ag-charts-zoom-buttons{align-items:center;display:flex;height:44px;justify-content:center;overflow:hidden;padding-bottom:10px;pointer-events:none;width:100%;.ag-charts-toolbar{--toolbar-size: 24px;--toolbar-button-padding: 1px;display:flex;font-size:var(--ag-charts-chrome-font-size);height:var(--toolbar-size);justify-content:center;opacity:1;pointer-events:auto;transition:opacity .2s ease-in-out,transform .4s ease-in-out;.ag-charts-toolbar__button--first{border-bottom-left-radius:var(--ag-charts-border-radius);border-top-left-radius:var(--ag-charts-border-radius)}.ag-charts-toolbar__button--last{border-bottom-right-radius:var(--ag-charts-border-radius);border-top-right-radius:var(--ag-charts-border-radius)}.ag-charts-toolbar__label{padding-left:var(--ag-charts-spacing);padding-right:var(--ag-charts-spacing)}.ag-charts-toolbar__icon+.ag-charts-toolbar__label{padding-left:0}.ag-charts-toolbar__button--gap{margin-left:var(--toolbar-gap)}&.ag-charts-zoom-buttons__toolbar--hidden{opacity:0;transition:opacity .4s ease-in-out,transform .4s ease-in-out}}}.ag-charts-shared-toolbar{gap:var(--toolbar-gap);.ag-charts-toolbar__button{border-radius:var(--ag-charts-border-radius);margin:0}.ag-charts-toolbar__button--active+.ag-charts-toolbar__button{border-left-color:var(--ag-charts-border-color)}}
`,__MINI_CHART_SERIES_OPTIONS=void 0,__VERIFY_MINI_CHART_SERIES_OPTIONS=void 0;__VERIFY_MINI_CHART_SERIES_OPTIONS=__MINI_CHART_SERIES_OPTIONS;var __THEME_OVERRIDES=void 0,__VERIFY_THEME_OVERRIDES=void 0;__VERIFY_THEME_OVERRIDES=__THEME_OVERRIDES;var AgTooltipAnchorToType=(e=>(e.POINTER="pointer",e.NODE="node",e.CHART="chart",e))(AgTooltipAnchorToType||{}),AgTooltipPlacementType=(e=>(e.TOP="top",e.RIGHT="right",e.BOTTOM="bottom",e.LEFT="left",e.TOP_RIGHT="top-right",e.BOTTOM_RIGHT="bottom-right",e.BOTTOM_LEFT="bottom-left",e.TOP_LEFT="top-left",e.CENTER="center",e))(AgTooltipPlacementType||{}),__THEMEABLE_OPTIONS=void 0,__VERIFY_THEMEABLE_OPTIONS=void 0;__VERIFY_THEMEABLE_OPTIONS=__THEMEABLE_OPTIONS;var __AXIS_LABEL_OPTIONS=void 0,__VERIFY_AXIS_LABEL_OPTIONS=void 0;__VERIFY_AXIS_LABEL_OPTIONS=__AXIS_LABEL_OPTIONS,__reExport(main_exports,require("ag-charts-community"),module.exports);var import_ag_charts_community9=require("ag-charts-community"),import_ag_charts_community8=require("ag-charts-community"),import_ag_charts_core9=require("ag-charts-core");function walkPairsOutward(e,t,i){const o=Math.floor(e.length/2);return walkPairsByStep(e,t,o,t,i)||walkPairsByStep(e,e.length-t,o,-t,i)}function walkPairsByStep(e,t,i,o,r){let s=e[0];for(let a=t;o>0?a<=i:a>i;a+=o){const n=e[a];if(r(s,n))return!0;s=n}return!1}var import_ag_charts_community4=require("ag-charts-community"),import_ag_charts_core5=require("ag-charts-core"),{AxisInterval}=import_ag_charts_community4._ModuleSupport,AngleAxisInterval=class extends AxisInterval{};__decorateClass([import_ag_charts_core5.Property],AngleAxisInterval.prototype,"minSpacing",2);var import_ag_charts_community7=require("ag-charts-community"),import_ag_charts_core8=require("ag-charts-core"),import_ag_charts_community6=require("ag-charts-community"),import_ag_charts_core7=require("ag-charts-core"),import_ag_charts_community5=require("ag-charts-community"),import_ag_charts_core6=require("ag-charts-core"),{Group,LabelStyle}=import_ag_charts_community5._ModuleSupport,PolarCrossLineLabel=class extends LabelStyle{constructor(){super(...arguments),this.padding=5}};__decorateClass([import_ag_charts_core6.Property],PolarCrossLineLabel.prototype,"enabled",2),__decorateClass([import_ag_charts_core6.Property],PolarCrossLineLabel.prototype,"padding",2),__decorateClass([import_ag_charts_core6.Property],PolarCrossLineLabel.prototype,"text",2),__decorateClass([import_ag_charts_core6.Property],PolarCrossLineLabel.prototype,"parallel",2);var PolarCrossLine=class extends import_ag_charts_core6.BaseProperties{constructor(){super(...arguments),this.id=(0,import_ag_charts_core6.createId)(this),this.defaultColorRange=[],this.shape="polygon",this.label=new PolarCrossLineLabel,this.scale=void 0,this.clippedRange=[-1/0,1/0],this.gridLength=0,this.sideFlag=-1,this.parallelFlipRotation=0,this.regularFlipRotation=0,this.direction=import_ag_charts_core6.ChartAxisDirection.Angle,this.axisInnerRadius=0,this.axisOuterRadius=0,this.lineGroup=new Group({name:this.id}),this.rangeGroup=new Group({name:this.id}),this.labelGroup=new Group({name:this.id}),this._isRange=void 0}assignCrossLineGroup(e,t){e!==this._isRange&&(e?this.rangeGroup.appendChild(t):this.lineGroup.appendChild(t)),this._isRange=e}setSectorNodeProps(e){e.fill=this.fill,e.fillOpacity=this.fillOpacity??1,e.stroke=this.stroke,e.strokeOpacity=this.strokeOpacity??1,e.strokeWidth=this.strokeWidth??1,e.lineDash=this.lineDash}setLabelNodeProps(e,t,i,o,r){const{label:s}=this;e.x=t,e.y=i,e.text=s.text,e.textAlign="center",e.textBaseline=o,e.rotation=r,e.rotationCenterX=t,e.rotationCenterY=i,e.fill=s.color,e.setFont(s),e.setBoxing(s),e.visible=!0}};PolarCrossLine.className="PolarCrossLine",__decorateClass([import_ag_charts_core6.Property],PolarCrossLine.prototype,"enabled",2),__decorateClass([import_ag_charts_core6.Property],PolarCrossLine.prototype,"type",2),__decorateClass([import_ag_charts_core6.Property],PolarCrossLine.prototype,"range",2),__decorateClass([import_ag_charts_core6.Property],PolarCrossLine.prototype,"value",2),__decorateClass([import_ag_charts_core6.Property],PolarCrossLine.prototype,"defaultColorRange",2),__decorateClass([import_ag_charts_core6.Property],PolarCrossLine.prototype,"fill",2),__decorateClass([import_ag_charts_core6.Property],PolarCrossLine.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core6.Property],PolarCrossLine.prototype,"stroke",2),__decorateClass([import_ag_charts_core6.Property],PolarCrossLine.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core6.Property],PolarCrossLine.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core6.Property],PolarCrossLine.prototype,"lineDash",2),__decorateClass([import_ag_charts_core6.Property],PolarCrossLine.prototype,"shape",2),__decorateClass([import_ag_charts_core6.Property],PolarCrossLine.prototype,"label",2);var{getCrossLineValue,validateCrossLineValue,Group:Group2,Path,Sector,RotatableText,ContinuousScale}=import_ag_charts_community6._ModuleSupport,AngleCrossLine=class extends PolarCrossLine{constructor(){super(),this.direction=import_ag_charts_core7.ChartAxisDirection.Angle,this.polygonNode=new Path,this.sectorNode=new Sector,this.lineNode=new Path,this.crossLineRange=new Group2,this.labelNode=new RotatableText,this.ticks=[],this.crossLineRange.append(this.polygonNode),this.crossLineRange.append(this.sectorNode),this.crossLineRange.append(this.lineNode),this.labelGroup.append(this.labelNode)}visibilityCheck(){if(!ContinuousScale.is(this.scale))return!0;const[e,t]=this.scale.domain,i=getCrossLineValue(this);if(this.type==="range"){const[o,r]=i;return o>=e&&o<=t&&r>=o&&r<=t}else return i>=e&&i<=t}update(e){const{scale:t}=this;if(!t||!validateCrossLineValue(this,t)||!this.visibilityCheck()){this.rangeGroup.visible=!1,this.lineGroup.visible=!1,this.labelGroup.visible=!1;return}this.rangeGroup.visible=e,this.lineGroup.visible=e,this.labelGroup.visible=e,this.updateLineNode(e),this.updatePolygonNode(e),this.updateSectorNode(e),this.updateLabelNode(e)}updateLineNode(e){const{scale:t,type:i,value:o,lineNode:r}=this;if(!e||i!=="line"||!t){r.visible=!1;return}const s=t.convert(o);if(Number.isNaN(s)){r.visible=!1;return}const{axisInnerRadius:a,axisOuterRadius:n}=this;r.visible=!0,r.stroke=this.stroke,r.strokeOpacity=this.strokeOpacity??1,r.strokeWidth=this.strokeWidth??1,r.fill=void 0,r.lineDash=this.lineDash;const l=n*Math.cos(s),c=n*Math.sin(s),h=a*Math.cos(s),u=a*Math.sin(s);r.path.clear(!0),r.path.moveTo(h,u),r.path.lineTo(l,c),this.assignCrossLineGroup(!1,this.crossLineRange)}updatePolygonNode(e){const{polygonNode:t,range:i,scale:o,shape:r,type:s,ticks:a}=this;if(!e||s!=="range"||r!=="polygon"||!o||!i){t.visible=!1;return}const{axisInnerRadius:n,axisOuterRadius:l}=this,c=a.indexOf(i[0]),h=a.indexOf(i[1]),d=(c<=h?a.slice(c,h+1):a.slice(c).concat(a.slice(0,h+1))).map(g=>o.convert(g));t.visible=!0,this.setSectorNodeProps(t);const{path:p}=t;p.clear(!0);for(const[g,y]of d.entries()){const x=l*Math.cos(y),f=l*Math.sin(y);g===0?p.moveTo(x,f):p.lineTo(x,f)}if(n===0)p.lineTo(0,0);else{const g=d.slice().reverse();for(const y of g){const x=n*Math.cos(y),f=n*Math.sin(y);p.lineTo(x,f)}}t.path.closePath(),this.assignCrossLineGroup(!0,this.crossLineRange)}updateSectorNode(e){const{sectorNode:t,range:i,scale:o,shape:r,type:s}=this;if(!e||s!=="range"||r!=="circle"||!o||!i){t.visible=!1;return}const{axisInnerRadius:a,axisOuterRadius:n}=this,l=i.map(u=>o.convert(u)),c=o.step??0,h=o instanceof import_ag_charts_community6._ModuleSupport.BandScale?c/2:0;t.visible=!0,this.setSectorNodeProps(t),t.centerX=0,t.centerY=0,t.innerRadius=a,t.outerRadius=n,t.startAngle=l[0]-h,t.endAngle=l[1]+h,this.assignCrossLineGroup(!0,this.crossLineRange)}updateLabelNode(e){const{label:t,labelNode:i,range:o,scale:r,type:s,ticks:a}=this;if(!e||t.enabled===!1||!t.text||!r||s==="range"&&!o){i.visible=!1;return}i.visible=!0;const{axisInnerRadius:n,axisOuterRadius:l}=this;let c,h,u,d;if(s==="line"){const p=(0,import_ag_charts_core7.normalizeAngle360)(r.convert(this.value)),g=1.5*Math.PI,y=(0,import_ag_charts_core7.isNumberEqual)(p,g)||p>g||p<Math.PI/2,x=(n+l)/2*Math.cos(p),f=(n+l)/2*Math.sin(p);c=x+t.padding*Math.cos(p+Math.PI/2),h=f+t.padding*Math.sin(p+Math.PI/2),d=y?"top":"bottom",u=y?p:p-Math.PI}else{const[p,g]=o.map(S=>(0,import_ag_charts_core7.normalizeAngle360)(r.convert(S)));let y=(p+g)/2;p>g&&(y-=Math.PI),y=(0,import_ag_charts_core7.normalizeAngle360)(y);const x=((0,import_ag_charts_core7.isNumberEqual)(y,0)||y>0)&&y<Math.PI;let f;this.shape==="circle"||a.length<3?f=l-t.padding:f=l*Math.cos(Math.PI/a.length)-t.padding,c=f*Math.cos(y),h=f*Math.sin(y),d=x?"bottom":"top",u=x?y-Math.PI/2:y+Math.PI/2}this.setLabelNodeProps(i,c,h,d,u)}};AngleCrossLine.className="AngleCrossLine";var{Path:Path2,RotatableText:RotatableText2,Transformable,BBox,Selection,Line}=import_ag_charts_community7._ModuleSupport,AngleAxisLabel=class extends import_ag_charts_community7._ModuleSupport.AxisLabel{constructor(){super(...arguments),this.orientation="fixed"}};__decorateClass([import_ag_charts_core8.Property],AngleAxisLabel.prototype,"orientation",2);var AngleAxis=class extends import_ag_charts_community7._ModuleSupport.PolarAxis{constructor(e,t){super(e,t),this.startAngle=0,this.endAngle=void 0,this.tickLineGroupSelection=Selection.select(this.tickLineGroup,Line,!1),this.gridLineGroupSelection=Selection.select(this.gridLineGroup,Line,!1),this.labelData=[],this.tickData=[],this.radiusLineGroup=this.axisGroup.appendChild(new import_ag_charts_community7._ModuleSupport.TransformableGroup),this.radiusLine=this.radiusLineGroup.appendChild(new Path2),this.includeInvisibleDomains=!0}get direction(){return import_ag_charts_core8.ChartAxisDirection.Angle}createLabel(){return new AngleAxisLabel}calculateRotations(){const e=(0,import_ag_charts_core8.toRadians)(this.startAngle),t=(0,import_ag_charts_core8.normalizeAngle360)(e),i=(0,import_ag_charts_core8.normalizeAngle360)(e-Math.PI/2);return{rotation:e,parallelFlipRotation:t,regularFlipRotation:i}}calculateTickLayout(e){const{nice:t,scale:i}=this,o={nice:[t,t],interval:void 0,tickCount:void 0,minTickCount:0,maxTickCount:1/0},r=t?i.niceDomain(o,e):e,s=this.generateAngleTicks(r);this.tickData=s;const a=s.map(l=>l.value),n=a.reduce((l,c)=>Math.max(typeof c=="number"?(0,import_ag_charts_core8.countFractionDigits)(c):0,l),0);return{niceDomain:r,tickDomain:r,ticks:a,rawTickCount:void 0,fractionDigits:n,timeInterval:void 0,bbox:this.getBBox()}}update(){super.update(),this.updateRadiusLine(),this.updateGridLines(),this.updateTickLines()}normalizedAngles(){const e=(0,import_ag_charts_core8.normalizeAngle360)(-Math.PI/2+(0,import_ag_charts_core8.toRadians)(this.startAngle)),t=this.endAngle==null?2*Math.PI:(0,import_ag_charts_core8.normalizeAngle360Inclusive)((0,import_ag_charts_core8.toRadians)(this.endAngle)-(0,import_ag_charts_core8.toRadians)(this.startAngle)),i=e+t;return[e,i]}computeRange(){this.range=this.normalizedAngles()}updateSelections(){const e=this.tickData;this.gridLineGroupSelection.update(this.gridLength&&this.gridLine.enabled?e:[]),this.tickLineGroupSelection.update(this.tick.enabled?e:[]),this.tickLabelGroupSelection.update(this.label.enabled?e:[]),this.gridLineGroupSelection.cleanup(),this.tickLineGroupSelection.cleanup(),this.tickLabelGroupSelection.cleanup()}updatePosition(){super.updatePosition();const{translation:e,radiusLineGroup:t}=this,i=Math.floor(e.x),o=Math.floor(e.y);t.translationX=i,t.translationY=o}updateRadiusLine(){const e=this.radiusLine,{path:t}=e;t.clear(!0);const{points:i,closePath:o}=this.getAxisLinePoints();for(const{x:r,y:s,moveTo:a,arc:n,radius:l=0,startAngle:c=0,endAngle:h=0}of i)n?t.arc(r,s,l,c,h):a?t.moveTo(r,s):t.lineTo(r,s);o&&t.closePath(),e.visible=this.line.enabled,e.stroke=this.line.stroke,e.strokeWidth=this.line.width,e.fill=void 0}getAxisLinePoints(){const{scale:e,shape:t,gridLength:i}=this,[o,r]=this.range,s=(0,import_ag_charts_core8.isNumberEqual)(r-o,2*Math.PI),a=[];if(t==="circle")s?a.push({x:i,y:0,moveTo:!0},{x:0,y:0,radius:i,startAngle:0,endAngle:2*Math.PI,arc:!0,moveTo:!1}):a.push({x:i*Math.cos(o),y:i*Math.sin(o),moveTo:!0},{x:0,y:0,radius:i,startAngle:(0,import_ag_charts_core8.normalizeAngle360)(o),endAngle:(0,import_ag_charts_core8.normalizeAngle360)(r),arc:!0,moveTo:!1});else if(t==="polygon"){const n=e.ticks({nice:[this.nice,this.nice],interval:void 0,tickCount:void 0,minTickCount:0,maxTickCount:1/0})?.ticks?.map(l=>e.convert(l));if(n&&n.length>2)for(const[l,c]of n.entries()){const h=i*Math.cos(c),u=i*Math.sin(c),d=l===0;a.push({x:h,y:u,moveTo:d})}}return{points:a,closePath:s}}updateGridLines(){const{scale:e,gridLength:t,gridLine:{style:i,width:o},innerRadiusRatio:r}=this;if(!(i&&t>0))return;const s=t*r,a=i.length;this.gridLineGroupSelection.each((n,l,c)=>{const{value:h}=l,{stroke:u,lineDash:d}=i[c%a],p=e.convert(h);n.x1=s*Math.cos(p),n.y1=s*Math.sin(p),n.x2=t*Math.cos(p),n.y2=t*Math.sin(p),n.stroke=u,n.strokeWidth=o,n.lineDash=d,n.fill=void 0}),this.gridLineGroupSelection.cleanup()}updateLabels(){const{label:e,tickLabelGroupSelection:t}=this;t.each((i,o,r)=>{const s=this.labelData[r];if(!s||s.hidden){i.visible=!1;return}i.text=s.text,i.setFont(e),i.fill=e.color,i.x=s.x,i.y=s.y,i.setAlign(s),i.setBoxing(e),i.visible=!0,s.rotation?(i.rotation=s.rotation,i.rotationCenterX=s.x,i.rotationCenterY=s.y):i.rotation=0})}updateTickLines(){const{scale:e,gridLength:t,tick:i,tickLineGroupSelection:o}=this;o.each((r,s)=>{const{value:a}=s,n=e.convert(a),l=Math.cos(n),c=Math.sin(n);r.x1=t*l,r.y1=t*c,r.x2=(t+i.size)*l,r.y2=(t+i.size)*c,r.stroke=i.stroke,r.strokeWidth=i.width})}createLabelNodeData(e,t,i){const{label:o,gridLength:r,scale:s,tick:a}=this;if(!o.enabled)return[];const n=new RotatableText2,l=i.x-this.translation.x,c=i.x+i.width-this.translation.x,{fractionDigits:h}=this.layout.label,u=this.tickFormatter(this.scale.domain,this.tickData,!1,h),d=e.map((p,g)=>{const{value:y}=p,x=r+o.spacing+a.size,f=s.convert(y),S=Math.cos(f),m=Math.sin(f),v=x*S,b=x*m,{textAlign:D,textBaseline:k}=this.getLabelAlign(f),A=g===e.length-1&&y!==e[0]&&(0,import_ag_charts_core8.isNumberEqual)((0,import_ag_charts_core8.normalizeAngle360)(f),(0,import_ag_charts_core8.normalizeAngle360)(s.convert(e[0]))),M=this.getLabelRotation(f);let I=u(y,g);n.text=I,n.x=v,n.y=b,n.setFont(o),n.textAlign=D,n.textBaseline=k,n.rotation=M,M&&(n.rotationCenterX=v,n.rotationCenterY=b);let _=M?Transformable.toCanvas(n):n.getBBox();if(_&&t.hideWhenNecessary&&!M){const P=l-_.x,O=_.x+_.width-c,C=1;if(P>C||O>C){const E={maxWidth:_.width-Math.max(P,O),font:o,textWrap:"never"};I=(0,import_ag_charts_core8.wrapTextOrSegments)(I,E),n.text=I,_=n.getBBox()}}return{text:I,x:v,y:b,textAlign:D,textBaseline:k,hidden:I===""||(p.hidden??A),rotation:M,box:_}});return o.avoidCollisions&&this.avoidLabelCollisions(d),d}computeLabelsBBox(e,t){this.labelData=this.createLabelNodeData(this.tickData,e,t);const i=this.labelData.map(({box:o})=>o).filter(o=>o!=null);return!this.label.enabled||i.length===0?null:BBox.merge(i)}getLabelOrientation(){const{label:e}=this;return e instanceof AngleAxisLabel?e.orientation:"fixed"}getLabelRotation(e){let t=(0,import_ag_charts_core8.toRadians)(this.label.rotation??0);e=(0,import_ag_charts_core8.normalizeAngle360)(e);const i=this.getLabelOrientation();return i==="parallel"?(t+=e,e>=0&&e<Math.PI?t-=Math.PI/2:t+=Math.PI/2):i==="perpendicular"&&(t+=e,e>=Math.PI/2&&e<1.5*Math.PI&&(t+=Math.PI)),t}getLabelAlign(e){const t=Math.cos(e),i=Math.sin(e);let o,r;const s=this.getLabelOrientation(),a=(0,import_ag_charts_core8.isNumberEqual)(t,0),n=(0,import_ag_charts_core8.isNumberEqual)(i,0),l=(0,import_ag_charts_core8.isNumberEqual)(t,1),c=(0,import_ag_charts_core8.isNumberEqual)(i,-1),h=t>0&&!a,u=i>0&&!n;return s==="parallel"?(o="center",r=l&&n||u?"top":"bottom"):s==="perpendicular"?(o=c||h?"left":"right",r="middle"):(o="right",a?o="center":h&&(o="left"),r="bottom",n?r="middle":u&&(r="top")),{textAlign:o,textBaseline:r}}updateCrossLines(){const{shape:e,gridLength:t,innerRadiusRatio:i}=this;for(const o of this.crossLines)o instanceof AngleCrossLine&&(o.ticks=this.tickData.map(r=>r.value),o.shape=e,o.axisOuterRadius=t,o.axisInnerRadius=t*i);super.updateCrossLines()}};AngleAxis.CrossLineConstructor=AngleCrossLine,__decorateClass([import_ag_charts_core8.Property],AngleAxis.prototype,"startAngle",2),__decorateClass([import_ag_charts_core8.Property],AngleAxis.prototype,"endAngle",2);var{CategoryScale}=import_ag_charts_community8._ModuleSupport,AngleCategoryAxis=class extends AngleAxis{constructor(e){super(e,new CategoryScale),this.groupPaddingInner=0,this.paddingInner=0,this.interval=new AngleAxisInterval}hasDefinedDomain(){return!1}generateAngleTicks(e){const{scale:t,gridLength:i}=this,{values:o,minSpacing:r}=this.interval,s={nice:[this.nice,this.nice],interval:void 0,tickCount:void 0,minTickCount:0,maxTickCount:1/0},a=o??t.ticks(s,e)?.ticks??[];if(a.length<2||r==null)return a.map(u=>({value:u,visible:!0}));const n=a[0],l=t.convert(n),c=i*Math.cos(l),h=i*Math.sin(l);for(let u=1;u<a.length-1;u++){const d=a[u],p=t.convert(d);if(p-l>Math.PI)break;const g=i*Math.cos(p),y=i*Math.sin(p);if(Math.hypot(g-c,y-h)>r){const f=new Set([n]);return walkPairsOutward(a,u,(S,m)=>{f.add(m)}),a.map(S=>{const m=f.has(S);return{value:S,visible:m}})}}return[{value:n,visible:!0}]}avoidLabelCollisions(e){const{minSpacing:t}=this.label;if(e.length<3)return;const i=(l,c)=>{if(l.hidden||c.hidden)return!1;if(t==null)return l.box.collidesBBox(c.box);const h=l.box.clone().grow(t/2),u=c.box.clone().grow(t/2);return h.collidesBBox(u)},o=e[0],r=e.at(-1),s=new Set([o]),a=(0,import_ag_charts_core9.isNumberEqual)(o.x,r.x)&&(0,import_ag_charts_core9.isNumberEqual)(o.y,r.y),n=Math.floor(e.length/2);for(let l=1;l<=n;l++){const c=a?e.slice(0,-1):e;if(!walkPairsOutward(c,l,i)){walkPairsOutward(c,l,(u,d)=>{s.add(d)});break}}for(const l of e)s.has(l)||(l.hidden=!0,l.box=void 0)}tickFormatParams(){return{type:"category"}}datumFormatParams(e,t){const{datum:i,seriesId:o,legendItemName:r,key:s,source:a,property:n,domain:l,boundSeries:c}=t;return{type:"category",value:e,datum:i,seriesId:o,legendItemName:r,key:s,source:a,property:n,domain:l,boundSeries:c}}};AngleCategoryAxis.className="AngleCategoryAxis",AngleCategoryAxis.type="angle-category",__decorateClass([import_ag_charts_core9.Property],AngleCategoryAxis.prototype,"groupPaddingInner",2),__decorateClass([import_ag_charts_core9.Property],AngleCategoryAxis.prototype,"paddingInner",2),__decorateClass([import_ag_charts_core9.Property],AngleCategoryAxis.prototype,"interval",2);var AngleCategoryAxisModule={type:"axis",name:"angle-category",chartType:"polar",enterprise:!0,version:import_ag_charts_community9.VERSION,options:import_ag_charts_community9._ModuleSupport.angleCategoryAxisOptionsDefs,themeTemplate:{label:{spacing:5},gridLine:{enabled:!1},shape:{$findFirstSiblingNotOperation:void 0}},create:e=>new AngleCategoryAxis(e)},import_ag_charts_community12=require("ag-charts-community"),import_ag_charts_community11=require("ag-charts-community"),import_ag_charts_core11=require("ag-charts-core"),import_ag_charts_community10=require("ag-charts-community"),import_ag_charts_core10=require("ag-charts-core"),{LinearScale}=import_ag_charts_community10._ModuleSupport,LinearAngleScale=class fe extends LinearScale{constructor(){super(...arguments),this.arcLength=0}static getNiceStepAndTickCount(t,i){const[o,r]=i;let s=LinearScale.getTickStep(o,r,t);const a=Number.isNaN(t.maxTickCount)?1/0:t.maxTickCount,n=Math.abs(r-o)/s;let l=Math.pow(2,Math.ceil(Math.log(n)/Math.log(2)));return l>a&&(l/=2,s*=2),{count:l,step:s}}ticks(t,i=this.domain){const{arcLength:o}=this;if(!i||i.length<2||i.some(h=>!Number.isFinite(h))||o<=0)return{ticks:[],count:0};const{nice:r,interval:s}=t,[a,n]=i;if(s){const h=Math.abs(s),u=this.getPixelRange();if(!(0,import_ag_charts_core10.isDenseInterval)((n-a)/h,u)){const d=(0,import_ag_charts_core10.range)(a,n,h);return{ticks:d.ticks,count:d.count}}}let l;if(r&&this.hasNiceRange()){const h=super.niceDomain(t,i);l=fe.getNiceStepAndTickCount(t,h).step}else l=LinearScale.getTickStep(a,n,t);const c=(0,import_ag_charts_core10.range)(a,n,l);return{ticks:c.ticks,count:c.count}}hasNiceRange(){const t=this.range.slice().sort((o,r)=>o-r);return[Math.PI,2*Math.PI].some(o=>(0,import_ag_charts_core10.isNumberEqual)(o,t[1]-t[0]))}niceDomain(t,i=this.domain){const o=super.niceDomain(t,i);if(!this.hasNiceRange())return o;const r=o[0]>o[1],s=r?o[1]:o[0],{step:a,count:n}=fe.getNiceStepAndTickCount(t,o),l=1/a,c=a>=1?Math.ceil(s/a+n)*a:Math.ceil((s+n*a)*l)/l;return r?[c,s]:[s,c]}getPixelRange(){return this.arcLength}},AngleNumberAxis=class extends AngleAxis{constructor(e){super(e,new LinearAngleScale),this.shape="circle",this.interval=new AngleAxisInterval}hasDefinedDomain(){const{min:e,max:t}=this;return e!=null&&t!=null&&e<t}normaliseDataDomain(e){const{min:t,max:i,preferredMin:o,preferredMax:r}=this,{extent:s,clipped:a}=(0,import_ag_charts_core11.normalisedExtentWithMetadata)(e.domain,t,i,o,r,void 0,e.sortMetadata?.sortOrder);return{domain:s,clipped:a}}getDomainExtentsNice(){return[this.min==null&&this.nice,this.max==null&&this.nice]}updateScale(){super.updateScale(),this.scale.arcLength=this.getRangeArcLength()}getRangeArcLength(){const{range:e}=this,t=Math.min(...e),i=Math.max(...e),o=(0,import_ag_charts_core11.angleBetween)(t,i)||2*Math.PI,r=this.gridLength;return o*r}generateAngleTicks(e){const{scale:t,range:i,nice:o}=this,{values:r,step:s,minSpacing:a,maxSpacing:n}=this.interval;let l;if(r==null){const{arcLength:c}=t,h=n?Math.floor(c/n):1,u=a?Math.floor(c/a):1/0,d=Math.floor(4/Math.PI*Math.abs(i[0]-i[1])),p=Math.max(h,Math.min(u,d)),g={nice:[o,o],interval:s,tickCount:p,minTickCount:h,maxTickCount:u};l=t.ticks(g,e)?.ticks??[]}else{const[c,h]=(0,import_ag_charts_core11.findMinMax)(e.map(Number));l=r.filter(u=>u>=c&&u<=h).sort((u,d)=>u-d)}return l.map(c=>({value:c,visible:!0}))}avoidLabelCollisions(e){const{minSpacing:t}=this.label,i=(s,a)=>{if(s.hidden||a.hidden)return!1;if(t==null)return s.box.collidesBBox(a.box);const n=s.box.clone().grow(t/2),l=a.box.clone().grow(t/2);return n.collidesBBox(l)},o=e[0],r=e.at(-1);o!==r&&(0,import_ag_charts_core11.isNumberEqual)(o.x,r.x)&&(0,import_ag_charts_core11.isNumberEqual)(o.y,r.y)&&(r.hidden=!0);for(let s=1;s<e.length;s*=2){let a=!1;for(let n=s;n<e.length;n+=s){const l=e[n],c=e[n-s];if(i(c,l)){a=!0;break}}if(!a){for(const[n,l]of e.entries())n%s>0&&(l.hidden=!0,l.box=void 0);return}}for(const[s,a]of e.entries())s>0&&(a.hidden=!0,a.box=void 0)}tickFormatParams(e,t,i){return{type:"number",visibleDomain:void 0,fractionDigits:i}}datumFormatParams(e,t,i){const{datum:o,seriesId:r,legendItemName:s,key:a,source:n,property:l,domain:c,boundSeries:h}=t;return{type:"number",value:e,datum:o,seriesId:r,legendItemName:s,key:a,source:n,property:l,domain:c,boundSeries:h,fractionDigits:i,visibleDomain:void 0}}};AngleNumberAxis.className="AngleNumberAxis",AngleNumberAxis.type="angle-number",__decorateClass([import_ag_charts_core11.Property],AngleNumberAxis.prototype,"min",2),__decorateClass([import_ag_charts_core11.Property],AngleNumberAxis.prototype,"max",2),__decorateClass([import_ag_charts_core11.Property],AngleNumberAxis.prototype,"preferredMin",2),__decorateClass([import_ag_charts_core11.Property],AngleNumberAxis.prototype,"preferredMax",2),__decorateClass([import_ag_charts_core11.Property],AngleNumberAxis.prototype,"interval",2);var AngleNumberAxisModule={type:"axis",name:"angle-number",chartType:"polar",enterprise:!0,version:import_ag_charts_community12.VERSION,options:import_ag_charts_community12._ModuleSupport.angleNumberAxisOptionsDefs,themeTemplate:{label:{spacing:5},gridLine:{enabled:!1}},create:e=>new AngleNumberAxis(e)},import_ag_charts_community14=require("ag-charts-community"),import_ag_charts_community13=require("ag-charts-community"),import_ag_charts_core12=require("ag-charts-core"),{OrdinalTimeScale,ApproximateOrdinalTimeScale,APPROXIMATE_THRESHOLD,TimeAxisParentLevel,minimumTimeAxisDatumGranularity}=import_ag_charts_community13._ModuleSupport,OrdinalTimeAxis=class extends import_ag_charts_community13._ModuleSupport.DiscreteTimeAxis{constructor(e){const t=new OrdinalTimeScale;super(e,t),this.parentLevel=new TimeAxisParentLevel,this.accurateScale=t,this.approximateScale=new ApproximateOrdinalTimeScale,this.approximateScale.setSourceScale(t),Object.defineProperty(this,"scale",{get:()=>this.getActiveScale(),configurable:!0})}get primaryLabel(){return this.parentLevel.enabled?this.parentLevel.label:void 0}get primaryTick(){return this.parentLevel.enabled?this.parentLevel.tick:void 0}getActiveScale(){const e=this.accurateScale.bandCount(this.visibleRange);return(this.accurateScale.getUniformityCache(this.visibleRange)?.isUniform??!1)&&e>=APPROXIMATE_THRESHOLD?this.approximateScale:this.accurateScale}processData(){super.processData();const{boundSeries:e,direction:t}=this;this.minimumTimeGranularity=minimumTimeAxisDatumGranularity(e,t,void 0,void 0)}tickFormatParams(e,t,i,o){o??(o=(0,import_ag_charts_core12.lowestGranularityUnitForTicks)(t));const r=(0,import_ag_charts_core12.dateTruncationForDomain)(e),s=(0,import_ag_charts_core12.intervalUnit)(o),a=(0,import_ag_charts_core12.intervalStep)(o),n=(0,import_ag_charts_core12.intervalEpoch)(o);return{type:"date",unit:s,step:a,epoch:n,truncateDate:r}}datumFormatParams(e,t,i,o,r){if(typeof e=="number"&&(e=new Date(e)),o==null){const{minimumTimeGranularity:x}=this,f=(0,import_ag_charts_core12.lowestGranularityUnitForValue)(e);x!=null&&(0,import_ag_charts_core12.intervalMilliseconds)(x)<(0,import_ag_charts_core12.intervalMilliseconds)(f)?o=x:o=f}const{datum:s,seriesId:a,legendItemName:n,key:l,source:c,property:h,domain:u,boundSeries:d}=t,p=(0,import_ag_charts_core12.intervalUnit)(o),g=(0,import_ag_charts_core12.intervalStep)(o),y=(0,import_ag_charts_core12.intervalEpoch)(o);return{type:"date",value:e,datum:s,seriesId:a,legendItemName:n,key:l,source:c,property:h,domain:u,boundSeries:d,unit:p,step:g,epoch:y,style:r}}};OrdinalTimeAxis.className="OrdinalTimeAxis",OrdinalTimeAxis.type="ordinal-time",__decorateClass([import_ag_charts_core12.Property],OrdinalTimeAxis.prototype,"parentLevel",2);var OrdinalTimeAxisModule={type:"axis",name:"ordinal-time",chartType:"cartesian",enterprise:!0,version:import_ag_charts_community14.VERSION,options:import_ag_charts_community14._ModuleSupport.ordinalTimeAxisOptionsDefs,themeTemplate:{groupPaddingInner:0,label:{autoRotate:!1,minSpacing:40},gridLine:{enabled:!1},interval:{placement:"between"}},create:e=>new OrdinalTimeAxis(e)},import_ag_charts_community18=require("ag-charts-community"),import_ag_charts_community17=require("ag-charts-community"),import_ag_charts_core15=require("ag-charts-core"),import_ag_charts_community16=require("ag-charts-community"),import_ag_charts_core14=require("ag-charts-core"),import_ag_charts_community15=require("ag-charts-community"),import_ag_charts_core13=require("ag-charts-core"),{validateCrossLineValue:validateCrossLineValue2,Group:Group3,Path:Path3,Sector:Sector2,RotatableText:RotatableText3}=import_ag_charts_community15._ModuleSupport,RadiusCrossLineLabel=class extends PolarCrossLineLabel{constructor(){super(...arguments),this.positionAngle=void 0}};__decorateClass([import_ag_charts_core13.Property],RadiusCrossLineLabel.prototype,"positionAngle",2);var RadiusCrossLine=class extends PolarCrossLine{constructor(){super(),this.direction=import_ag_charts_core13.ChartAxisDirection.Radius,this.label=new RadiusCrossLineLabel,this.polygonNode=new Path3,this.sectorNode=new Sector2,this.crossLineRange=new Group3,this.labelNode=new RotatableText3,this.outerRadius=0,this.innerRadius=0,this.crossLineRange.append(this.polygonNode),this.crossLineRange.append(this.sectorNode),this.labelGroup.append(this.labelNode)}update(e){const{scale:t}=this;if(!t||!validateCrossLineValue2(this,t)){this.rangeGroup.visible=!1,this.lineGroup.visible=!1,this.labelGroup.visible=!1;return}this.updateRadii();const{innerRadius:i,outerRadius:o}=this;e&&(e=i>=this.axisInnerRadius&&o<=this.axisOuterRadius),this.rangeGroup.visible=e,this.lineGroup.visible=e,this.labelGroup.visible=e,this.updatePolygonNode(e),this.updateSectorNode(e),this.updateLabelNode(e),this.assignCrossLineGroup(this.type==="range",this.crossLineRange)}updateRadii(){const{range:e,scale:t,type:i,axisInnerRadius:o,axisOuterRadius:r}=this;if(!t)return{innerRadius:0,outerRadius:0};const s=l=>r+o-l;let a,n;if(i==="line")a=s(t.convert(this.value)),n=a;else{const l=Math.abs(t?.bandwidth??0),c=e.map(h=>t.convert(h));a=s(Math.max(...c)),n=s(Math.min(...c))+l}this.outerRadius=a,this.innerRadius=n}drawPolygon(e,t,i){for(const[o,r]of t.entries()){const s=e*Math.cos(r),a=e*Math.sin(r);o===0?i.path.moveTo(s,a):i.path.lineTo(s,a)}i.path.closePath()}updatePolygonNode(e){const{gridAngles:t,polygonNode:i,scale:o,shape:r,type:s,innerRadius:a,outerRadius:n}=this;if(!e||r!=="polygon"||!o||!t){i.visible=!1;return}i.visible=!0;const l=this.getPadding();i.path.clear(!0),this.drawPolygon(n-l,t,i);const c=t.slice().reverse(),h=s==="line"?n-l:a+l;this.drawPolygon(h,c,i),this.setSectorNodeProps(i)}updateSectorNode(e){const{axisInnerRadius:t,axisOuterRadius:i,scale:o,sectorNode:r,shape:s,innerRadius:a,outerRadius:n}=this;if(!e||s!=="circle"||!o){r.visible=!1;return}r.visible=!0,r.startAngle=0,r.endAngle=2*Math.PI;const l=this.getPadding(),c=(0,import_ag_charts_core13.clamp)(t,a+l,i),h=(0,import_ag_charts_core13.clamp)(t,n-l,i);r.innerRadius=Math.min(c,h),r.outerRadius=Math.max(c,h),this.setSectorNodeProps(r)}updateLabelNode(e){const{innerRadius:t,label:i,labelNode:o,scale:r,shape:s,type:a}=this;if(!e||i.enabled===!1||!i.text||!r){o.visible=!1;return}const n=(0,import_ag_charts_core13.normalizeAngle360FromDegrees)((i.positionAngle??0)-90),l=((0,import_ag_charts_core13.isNumberEqual)(n,0)||n>0)&&n<Math.PI,c=l?n-Math.PI/2:n+Math.PI/2;let h;const u=this.gridAngles??[];a==="line"?h=t+i.padding:s==="circle"||u.length<3?h=t-i.padding:h=t*Math.cos(Math.PI/u.length)-i.padding;const d=h*Math.cos(n),p=h*Math.sin(n);let g;a==="line"?g=l?"top":"bottom":g=l?"bottom":"top",this.setLabelNodeProps(o,d,p,g,c)}getPadding(){const{scale:e}=this;if(!e)return 0;const t=Math.abs(e.bandwidth??0),i=Math.abs(e.step??0);return e instanceof import_ag_charts_community15._ModuleSupport.BandScale?(i-t)/2:0}};RadiusCrossLine.className="RadiusCrossLine";var{Caption,Group:Group4,TransformableGroup,Path:Path4,Line:Line2,Selection:Selection2,generateTicks,AxisGroupZIndexMap}=import_ag_charts_community16._ModuleSupport,RadiusAxisLabel=class extends import_ag_charts_community16._ModuleSupport.AxisLabel{constructor(){super(...arguments),this.autoRotateAngle=335}};__decorateClass([import_ag_charts_core14.Property],RadiusAxisLabel.prototype,"autoRotate",2),__decorateClass([import_ag_charts_core14.Property],RadiusAxisLabel.prototype,"autoRotateAngle",2);var RadiusAxis=class extends import_ag_charts_community16._ModuleSupport.PolarAxis{constructor(e,t){super(e,t),this.positionAngle=0,this.gridLineGroupSelection=Selection2.select(this.gridLineGroup,Line2,!1),this.generatedTicks=void 0,this.headingLabelGroup=this.axisGroup.appendChild(new TransformableGroup({name:`${this.id}-Axis-heading`})),this.lineNodeGroup=this.axisGroup.appendChild(new TransformableGroup({name:`${this.id}-Axis-line`})),this.lineNode=this.lineNodeGroup.appendChild(new Line2({name:`${this.id}-Axis-line`,zIndex:AxisGroupZIndexMap.AxisLine})),this.gridPathGroup=this.gridGroup.appendChild(new Group4({name:`${this.id}-gridPaths`,zIndex:import_ag_charts_core14.ZIndexMap.AXIS_GRID})),this.gridPathSelection=Selection2.select(this.gridPathGroup,Path4),this.headingLabelGroup.appendChild(this.title.caption.node),this.cleanup.register(this.title.caption.registerInteraction(this.moduleCtx,"afterend"))}get direction(){return import_ag_charts_core14.ChartAxisDirection.Radius}getAxisTransform(){const e=this.scale.range[0],{translation:t,positionAngle:i,innerRadiusRatio:o}=this,r=e*o,s=(0,import_ag_charts_core14.toRadians)(i);return{translationX:t.x,translationY:t.y-e-r,rotation:s,rotationCenterX:0,rotationCenterY:e+r}}update(){super.update(),this.updateTitle(),this.updateGridLines();const{enabled:e,stroke:t,width:i}=this.line;this.lineNode.setProperties({stroke:t,strokeWidth:e?i:0,x1:0,y1:this.range[0],x2:0,y2:this.range[1]})}updatePosition(){super.updatePosition();const e=this.getAxisTransform();this.tickLineGroup.setProperties(e),this.tickLabelGroup.setProperties(e),this.lineNodeGroup.setProperties(e),this.headingLabelGroup.setProperties(e)}calculateRotations(){return{rotation:0,parallelFlipRotation:0,regularFlipRotation:-Math.PI/2}}calculateTickLayout(e,t,i){const o=[0,1],r=this.label.getSideFlag(),s=r*(this.getTickSize()+this.label.spacing+this.seriesAreaPadding),{range:a,reverse:n,defaultTickMinSpacing:l}=this,c=generateTicks({scale:this.scale,label:this.label,interval:this.interval,tickFormatter:(...S)=>this.tickFormatter(...S),domain:e,range:a,reverse:n,niceMode:t,visibleRange:o,defaultTickMinSpacing:l,labelOffset:s,sideFlag:r,axisRotation:0,sizeLimit:void 0,primaryTickCount:void 0}),{tickData:h}=c,{ticks:u,rawTicks:d,rawTickCount:p,tickDomain:g,fractionDigits:y,niceDomain:x=e}=h,f=u.map(S=>this.getTickLabelProps(S,c));return this.generatedTicks={ticks:u,labels:f},{ticks:d,tickDomain:g,niceDomain:x,rawTickCount:p,fractionDigits:y,timeInterval:void 0}}updateSelections(){const{generatedTicks:e}=this;if(!e)return;const{ticks:t,labels:i}=e;this.gridLineGroupSelection.update(this.gridLength?t:[]),this.tickLabelGroupSelection.update(i),this.gridPathSelection.update(this.gridLine.enabled?this.prepareGridPathTickData(t):[]),this.gridLineGroupSelection.cleanup(),this.tickLabelGroupSelection.cleanup(),this.gridPathSelection.cleanup()}updateLabels(){if(!this.label.enabled)return;const e=import_ag_charts_community16._ModuleSupport.resetAxisLabelSelectionFn();this.tickLabelGroupSelection.each((t,i)=>{t.fill=i.color,t.text=i.text,t.textBaseline=i.textBaseline,t.textAlign=i.textAlign??"center",t.setFont(i),t.setBoxing(i),t.setProperties(e(t,i))})}updateGridLines(){const{gridLine:{style:e,width:t},shape:i,generatedTicks:o}=this;if(!e||!o)return;const r=e.length,s=(d,p)=>{const{stroke:g,lineDash:y}=e[p%r];d.stroke=g,d.strokeWidth=t,d.lineDash=y,d.fill=void 0},[a,n]=this.gridRange??[0,2*Math.PI],l=(0,import_ag_charts_core14.isNumberEqual)(n-a,2*Math.PI),u=i==="circle"?(d,p)=>{const{path:g}=d;g.clear(!0);const y=this.getTickRadius(p);l?(g.moveTo(y,0),g.arc(0,0,y,0,2*Math.PI)):(g.moveTo(y*Math.cos(a),y*Math.sin(a)),g.arc(0,0,y,(0,import_ag_charts_core14.normalizeAngle360)(a),(0,import_ag_charts_core14.normalizeAngle360)(n))),l&&g.closePath()}:(d,p)=>{const{path:g}=d,y=this.gridAngles;if(g.clear(!0),!y||y.length<3)return;const x=this.getTickRadius(p);for(const[f,S]of y.entries()){const m=x*Math.cos(S),v=x*Math.sin(S);f===0?g.moveTo(m,v):g.lineTo(m,v);for(const[b,D]of y.entries()){const k=x*Math.cos(D),A=x*Math.sin(D);b===0?g.moveTo(k,A):g.lineTo(k,A)}g.closePath()}g.closePath()};this.gridPathSelection.each((d,p,g)=>{s(d,g),u(d,p)})}updateTitle(){const e=a=>a.defaultValue,{title:t,range:i}=this,{formatter:o=e}=this.title;t.caption.enabled=t.enabled,t.caption.fontFamily=t.fontFamily,t.caption.fontSize=t.fontSize,t.caption.fontStyle=t.fontStyle,t.caption.fontWeight=t.fontWeight,t.caption.color=t.color,t.caption.wrapping=t.wrapping;let r=!1;const s=t.caption.node;t.enabled&&(r=!0,s.rotation=Math.PI/2,s.x=Math.floor((i[0]+i[1])/2),s.y=-Caption.SMALL_PADDING,s.textAlign="center",s.textBaseline="bottom",s.text=this.cachedCallWithContext(o,this.getTitleFormatterParams(this.scale.domain))),s.visible=r}updateCrossLines(){for(const e of this.crossLines)if(e instanceof RadiusCrossLine){const{shape:t,gridAngles:i,range:o,innerRadiusRatio:r}=this,s=o[0];e.shape=t,e.gridAngles=i,e.axisOuterRadius=s,e.axisInnerRadius=s*r}super.updateCrossLines()}createLabel(){return new RadiusAxisLabel}getTickLabelProps(e,t){const{label:i}=this,{rotation:o,textBaseline:r,textAlign:s}=t,a=this.scale.range,n=e.tickLabel??"",c=i.getSideFlag()*(this.getTickSize()+i.spacing+this.seriesAreaPadding),h=n!==""&&n!=null,u=o;return{...this.getLabelStyles({value:e.tick,formattedValue:e.tickLabel}),tickId:e.tickId,rotation:u,text:n,textAlign:s,textBaseline:r,visible:h,x:c,y:e.translation,rotationCenterX:c,rotationCenterY:e.translation,range:a}}};RadiusAxis.CrossLineConstructor=RadiusCrossLine,__decorateClass([import_ag_charts_core14.Property],RadiusAxis.prototype,"positionAngle",2);var{CategoryScale:CategoryScale2}=import_ag_charts_community17._ModuleSupport,RadiusCategoryAxis=class extends RadiusAxis{constructor(e){super(e,new CategoryScale2),this.shape="circle",this.groupPaddingInner=0,this.paddingInner=0,this.paddingOuter=0}hasDefinedDomain(){return!1}normaliseDataDomain(e){return{domain:e.domain,clipped:!1}}prepareGridPathTickData(e){return e.slice().reverse()}getTickRadius(e){const{scale:t,innerRadiusRatio:i}=this,o=t.range[0],r=o*i;if(CategoryScale2.is(t)){const s=t.domain,a=s.length-1-s.indexOf(e.tick);return a===0?r:t.inset+t.step*(a-.5)+t.bandwidth/2}else{const s=(o-r)/t.domain.length;return o-e.translation+r-s/2}}tickFormatParams(){return{type:"category"}}datumFormatParams(e,t){const{datum:i,seriesId:o,legendItemName:r,key:s,source:a,property:n,domain:l,boundSeries:c}=t;return{type:"category",value:e,datum:i,seriesId:o,legendItemName:r,key:s,source:a,property:n,domain:l,boundSeries:c}}};RadiusCategoryAxis.className="RadiusCategoryAxis",RadiusCategoryAxis.type="radius-category",__decorateClass([import_ag_charts_core15.Property],RadiusCategoryAxis.prototype,"groupPaddingInner",2),__decorateClass([(0,import_ag_charts_core15.ProxyPropertyOnWrite)("scale","paddingInner"),import_ag_charts_core15.Property],RadiusCategoryAxis.prototype,"paddingInner",2),__decorateClass([(0,import_ag_charts_core15.ProxyPropertyOnWrite)("scale","paddingOuter"),import_ag_charts_core15.Property],RadiusCategoryAxis.prototype,"paddingOuter",2);var RadiusCategoryAxisModule={type:"axis",name:"radius-category",chartType:"polar",enterprise:!0,version:import_ag_charts_community18.VERSION,options:import_ag_charts_community18._ModuleSupport.radiusCategoryAxisOptionsDefs,themeTemplate:{positionAngle:0,line:{enabled:!1},label:{minSpacing:5}},create:e=>new RadiusCategoryAxis(e)},import_ag_charts_community20=require("ag-charts-community"),import_ag_charts_community19=require("ag-charts-community"),import_ag_charts_core16=require("ag-charts-core"),{LinearScale:LinearScale2}=import_ag_charts_community19._ModuleSupport,RadiusNumberAxis=class extends RadiusAxis{constructor(e){super(e,new LinearScale2),this.shape="polygon"}hasDefinedDomain(){const{min:e,max:t}=this;return e!=null&&t!=null&&e<t}prepareGridPathTickData(e){const{scale:t}=this,i=t.domain[1];return e.filter(({tick:o})=>o!==i).sort((o,r)=>r.tick-o.tick)}getTickRadius(e){const{scale:t}=this,i=t.range[0],o=i*this.innerRadiusRatio;return i-e.translation+o}normaliseDataDomain(e){const{min:t,max:i,preferredMin:o,preferredMax:r}=this,{extent:s,clipped:a}=(0,import_ag_charts_core16.normalisedExtentWithMetadata)(e.domain,t,i,o,r,void 0,e.sortMetadata?.sortOrder);return{domain:s,clipped:a}}getDomainExtentsNice(){return[this.min==null&&this.nice,this.max==null&&this.nice]}tickFormatParams(e,t,i){return{type:"number",visibleDomain:void 0,fractionDigits:i}}datumFormatParams(e,t,i){const{datum:o,seriesId:r,legendItemName:s,key:a,source:n,property:l,domain:c,boundSeries:h}=t;return{type:"number",value:e,datum:o,seriesId:r,legendItemName:s,key:a,source:n,property:l,domain:c,boundSeries:h,fractionDigits:i,visibleDomain:void 0}}};RadiusNumberAxis.className="RadiusNumberAxis",RadiusNumberAxis.type="radius-number",__decorateClass([import_ag_charts_core16.Property],RadiusNumberAxis.prototype,"min",2),__decorateClass([import_ag_charts_core16.Property],RadiusNumberAxis.prototype,"max",2),__decorateClass([import_ag_charts_core16.Property],RadiusNumberAxis.prototype,"preferredMin",2),__decorateClass([import_ag_charts_core16.Property],RadiusNumberAxis.prototype,"preferredMax",2);var RadiusNumberAxisModule={type:"axis",name:"radius-number",chartType:"polar",enterprise:!0,version:import_ag_charts_community20.VERSION,options:import_ag_charts_community20._ModuleSupport.radiusNumberAxisOptionsDefs,themeTemplate:{positionAngle:0,line:{enabled:!1},shape:{$findFirstSiblingNotOperation:void 0},label:{minSpacing:5}},create:e=>new RadiusNumberAxis(e)},import_ag_charts_community22=require("ag-charts-community"),import_ag_charts_core18=require("ag-charts-core"),import_ag_charts_community21=require("ag-charts-community"),import_ag_charts_core17=require("ag-charts-core"),Animation=class extends import_ag_charts_core17.AbstractModuleInstance{constructor(e){super(),this.ctx=e,this.enabled=!0,e.animationManager.skip(!1),this.cleanup.register(()=>e.animationManager.skip(!0))}};__decorateClass([(0,import_ag_charts_core17.ObserveChanges)((e,t)=>{e.ctx.animationManager.skip(!t)}),import_ag_charts_core17.Property],Animation.prototype,"enabled",2),__decorateClass([(0,import_ag_charts_core17.ObserveChanges)((e,t)=>{t!=null&&(e.ctx.animationManager.defaultDuration=t)}),import_ag_charts_core17.Property],Animation.prototype,"duration",2),__decorateClass([(0,import_ag_charts_core17.ObserveChanges)((e,t)=>{e.ctx.animationManager.maxAnimatableItems=t??1/0}),import_ag_charts_core17.Property],Animation.prototype,"maxAnimatableItems",2);var AnimationModule={type:"plugin",name:"animation",enterprise:!0,version:import_ag_charts_community22.VERSION,options:{enabled:import_ag_charts_core18.boolean,duration:import_ag_charts_core18.positiveNumber},themeTemplate:{enabled:!0},create:e=>new Animation(e)};AnimationModule.options.maxAnimatableItems=(0,import_ag_charts_core18.undocumented)(import_ag_charts_core18.positiveNumber);var import_ag_charts_community69=require("ag-charts-community"),import_ag_charts_core88=require("ag-charts-core"),import_ag_charts_community23=require("ag-charts-community"),import_ag_charts_core19=require("ag-charts-core"),_SharedToolbar=class pe extends import_ag_charts_core19.AbstractModuleInstance{constructor(t){super(),this.ctx=t,this.activeSections=new Set,this.sectionButtons={annotations:[],chartToolbar:[]},this.container=this.ctx.domManager.addChild("canvas-overlay","shared-toolbar"),this.container.role="presentation"}getSharedToolbar(t){return this.sharedToolbar||this.createSharedToolbar(),t==="chartToolbar"&&this.sharedToolbar&&this.sharedToolbar.setAriaLabelId("ariaLabelFinancialCharts"),this.toolbarWithSection(t)}createSharedToolbar(){this.sharedToolbar=new import_ag_charts_community23._ModuleSupport.Toolbar(this.ctx,"ariaLabelAnnotationsToolbar","vertical"),this.sharedToolbar.addClass("ag-charts-shared-toolbar"),this.container.append(this.sharedToolbar.getElement()),this.cleanup.register(()=>{this.sharedToolbar&&(this.sharedToolbar.getElement().remove(),this.sharedToolbar.destroy(),this.sharedToolbar=void 0)})}toolbarWithSection(t){const i=this.sharedToolbar,o={layout:(r,s)=>{if(this.firstLayoutSection!=null&&this.firstLayoutSection!==t&&this.activeSections.has(this.firstLayoutSection))return;this.firstLayoutSection=t;const a=i.getBounds().width;i.setBounds({x:r.x,y:r.y,width:a}),r.shrink({left:a+i.horizontalSpacing+(s??0)})},addToolbarListener:(r,s)=>i.addToolbarListener(r,a=>{const n=this.getSectionIndex(t,a.button.index);if(n<0)return;const l={...a,button:this.sectionButtons[t][n]};s(l)}),updateButtons:r=>{this.sectionButtons[t]=r;const s=pe.SECTION_ORDER.flatMap(a=>this.sectionButtons[a]);i.updateButtons(s)},updateButtonByIndex:(r,s)=>{i.updateButtonByIndex(this.getIndex(t,r),s)},toggleActiveButtonByIndex:r=>{i.toggleActiveButtonByIndex(this.getIndex(t,r))},toggleButtonEnabledByIndex:(r,s)=>{i.toggleButtonEnabledByIndex(this.getIndex(t,r),s)},setHidden:r=>{r?this.activeSections.delete(t):this.activeSections.add(t);let s=0;for(const a of pe.SECTION_ORDER){if(a!==t){s+=this.sectionButtons[a].length;continue}for(const n of this.sectionButtons[t].keys())i.setButtonHiddenByIndex(s+n,r)}},destroy:()=>{o.setHidden(!0),this.activeSections.size===0&&this.destroy()},clearActiveButton:i.clearActiveButton.bind(i),addListener:i.addListener.bind(i),removeListener:i.removeListener.bind(i)};return o.setHidden(!1),o}getIndex(t,i){let o=0;for(const r of pe.SECTION_ORDER){if(r===t)return o+i;o+=this.sectionButtons[r].length}return-1}getSectionIndex(t,i){let o=0;for(const r of pe.SECTION_ORDER){if(r===t)return i>=o+this.sectionButtons[t].length?-1:i-o;o+=this.sectionButtons[r].length}return-1}};_SharedToolbar.SECTION_ORDER=["chartToolbar","annotations"];var SharedToolbar=_SharedToolbar,import_ag_charts_community67=require("ag-charts-community"),import_ag_charts_core86=require("ag-charts-core"),import_ag_charts_community24=require("ag-charts-community"),import_ag_charts_core20=require("ag-charts-core"),textInputTemplate_default='<div contenteditable="plaintext-only" class="ag-charts-text-input__textarea" tabindex="0"></div>',moduleId="text-input",canvasOverlay="canvas-overlay",TextInput=class{constructor(e){this.ctx=e,this.cleanup=new import_ag_charts_core20.CleanupRegistry,this.layout={getTextInputCoords:()=>({x:0,y:0}),getTextPosition:()=>"center",alignment:"center",textAlign:"center"},this.visible=!1,this.element=e.domManager.addChild(canvasOverlay,moduleId),this.element.classList.add("ag-charts-text-input"),this.cleanup.register(()=>e.domManager.removeChild(canvasOverlay,moduleId))}setKeyDownHandler(e){this.cleanup.register((0,import_ag_charts_core20.attachListener)(this.element,"keydown",e))}show(e){this.element.innerHTML=textInputTemplate_default;const t=this.element.firstElementChild;(0,import_ag_charts_core20.setAttributes)(t,{role:"textbox","data-preventdefault":!1}),t.isContentEditable||(t.contentEditable="true"),t.setAttribute("placeholder",this.ctx.localeManager.t(e.placeholderText??"inputTextareaPlaceholder")),e.styles?.placeholderColor&&t.style.setProperty("--placeholder-text-color",e.styles?.placeholderColor),t.innerText=e.text??"",t.style.color=e.styles?.color??"inherit",t.style.fontFamily=e.styles?.fontFamily??"inherit",t.style.fontSize=e.styles?.fontSize?`${e.styles.fontSize}px`:"inherit",t.style.fontStyle=e.styles?.fontStyle??"inherit",t.style.fontWeight=typeof e.styles?.fontWeight=="number"?`${e.styles.fontWeight}`:e.styles?.fontWeight??"inherit",(0,import_ag_charts_core20.focusCursorAtEnd)(t),t.addEventListener("input",()=>{this.updatePosition(),e.onChange?.(this.getValue(),this.getBBox())}),t.addEventListener("click",i=>{i.stopPropagation()}),e.layout&&(this.layout=e.layout,this.updatePosition()),e.onChange?.(this.getValue(),this.getBBox()),this.visible=!0}hide(){this.element.innerHTML="",this.layout={getTextInputCoords:()=>({x:0,y:0}),getTextPosition:()=>"center",alignment:"center",textAlign:"center"},this.visible=!1}isVisible(){return this.visible}updateColor(e){this.element.firstElementChild&&(this.element.firstElementChild.style.color=e)}updateFontSize(e){if(this.element.firstElementChild)return this.element.firstElementChild.style.fontSize=`${e}px`,this.updatePosition(),this.getBBox()}getValue(){if(this.element.firstElementChild)return this.element.firstElementChild.innerText.trim()}updatePosition(){const{element:e}=this,t=e.firstElementChild;if(!t)return;const i=this.ctx.domManager.getBoundingClientRect(),{width:o,getTextInputCoords:r,getTextPosition:s,alignment:a,textAlign:n}=this.layout;e.style.setProperty("width",o?`${o}px`:"unset");const l=t.getBoundingClientRect(),c=r(l.height);let h=c.x;a==="center"?h-=(o??l.width)/2:a==="right"&&(h-=o??l.width);const u=s();let d=c.y;u==="center"?d-=l.height/2:u==="bottom"&&(d-=l.height),e.style.setProperty("top",`${d}px`),e.style.setProperty("left",`${h}px`),e.style.setProperty("max-width",`${i.width-h}px`),e.style.setProperty("text-align",a),t.style.setProperty("text-align",n)}getBBox(){const{left:e,top:t,width:i,height:o}=this.element.getBoundingClientRect();return new import_ag_charts_community24._ModuleSupport.BBox(e,t,(0,import_ag_charts_core20.ceilTo)(i,2),o)}destroy(){this.cleanup.flush()}},import_ag_charts_core21=require("ag-charts-core"),AxesButtons=class extends import_ag_charts_core21.BaseProperties{constructor(){super(...arguments),this.enabled=!1,this.axes="y"}};__decorateClass([import_ag_charts_core21.Property],AxesButtons.prototype,"enabled",2),__decorateClass([import_ag_charts_core21.Property],AxesButtons.prototype,"axes",2);var import_ag_charts_community32=require("ag-charts-community"),import_ag_charts_core43=require("ag-charts-core"),AnnotationType=(e=>(e.Line="line",e.HorizontalLine="horizontal-line",e.VerticalLine="vertical-line",e.DisjointChannel="disjoint-channel",e.ParallelChannel="parallel-channel",e.FibonacciRetracement="fibonacci-retracement",e.FibonacciRetracementTrendBased="fibonacci-retracement-trend-based",e.Callout="callout",e.Comment="comment",e.Note="note",e.Text="text",e.Arrow="arrow",e.ArrowUp="arrow-up",e.ArrowDown="arrow-down",e.DateRange="date-range",e.PriceRange="price-range",e.DatePriceRange="date-price-range",e.QuickDatePriceRange="quick-date-price-range",e))(AnnotationType||{}),ANNOTATION_TYPES=Object.values(AnnotationType);function stringToAnnotationType(e){for(const t of ANNOTATION_TYPES)if(t===e)return t}var import_ag_charts_core42=require("ag-charts-core"),import_ag_charts_core26=require("ag-charts-core"),import_ag_charts_community25=require("ag-charts-community"),import_ag_charts_core22=require("ag-charts-core"),PointProperties=class extends import_ag_charts_core22.BaseProperties{};__decorateClass([import_ag_charts_core22.Property],PointProperties.prototype,"x",2),__decorateClass([import_ag_charts_core22.Property],PointProperties.prototype,"y",2);var ChannelAnnotationMiddleProperties=class extends Stroke(LineStyle(Visible(import_ag_charts_core22.BaseProperties))){},AxisLabelProperties=class extends Stroke(LineStyle(Fill(Label(Font(import_ag_charts_core22.BaseProperties))))){constructor(){super(...arguments),this.cornerRadius=2}};__decorateClass([import_ag_charts_core22.Property],AxisLabelProperties.prototype,"enabled",2),__decorateClass([import_ag_charts_core22.Property],AxisLabelProperties.prototype,"cornerRadius",2);var BackgroundProperties=class extends Fill(import_ag_charts_core22.BaseProperties){},HandleProperties=class extends Stroke(LineStyle(Fill(import_ag_charts_core22.BaseProperties))){},LineTextProperties=class extends Font(import_ag_charts_core22.BaseProperties){constructor(){super(...arguments),this.label="",this.position="top",this.alignment="left"}};__decorateClass([import_ag_charts_core22.Property],LineTextProperties.prototype,"label",2),__decorateClass([import_ag_charts_core22.Property],LineTextProperties.prototype,"position",2),__decorateClass([import_ag_charts_core22.Property],LineTextProperties.prototype,"alignment",2);var LabelTextProperties=class extends Font(import_ag_charts_core22.BaseProperties){},ChannelTextProperties=class extends Font(import_ag_charts_core22.BaseProperties){constructor(){super(...arguments),this.label=""}};__decorateClass([import_ag_charts_core22.Property],ChannelTextProperties.prototype,"label",2),__decorateClass([import_ag_charts_core22.Property],ChannelTextProperties.prototype,"position",2),__decorateClass([import_ag_charts_core22.Property],ChannelTextProperties.prototype,"alignment",2);function Annotation(e){class t extends Writeable(Visible(e)){constructor(){super(...arguments),this.id=(0,import_ag_charts_core22.generateUUID)()}}return t}function Line3(e){class t extends e{constructor(){super(...arguments),this.start=new PointProperties,this.end=new PointProperties}}return __decorateClass([import_ag_charts_core22.Property],t.prototype,"start",2),__decorateClass([import_ag_charts_core22.Property],t.prototype,"end",2),t}function Point(e){class t extends e{}return __decorateClass([import_ag_charts_core22.Property],t.prototype,"x",2),__decorateClass([import_ag_charts_core22.Property],t.prototype,"y",2),t}function Value(e){class t extends e{}return __decorateClass([import_ag_charts_core22.Property],t.prototype,"value",2),t}function Background2(e){class t extends e{constructor(){super(...arguments),this.background=new BackgroundProperties}}return __decorateClass([import_ag_charts_core22.Property],t.prototype,"background",2),t}function Handle(e){class t extends e{constructor(){super(...arguments),this.handle=new HandleProperties}}return __decorateClass([import_ag_charts_core22.Property],t.prototype,"handle",2),t}function AxisLabel(e){class t extends e{constructor(){super(...arguments),this.axisLabel=new AxisLabelProperties}}return __decorateClass([import_ag_charts_core22.Property],t.prototype,"axisLabel",2),t}function Label(e){class t extends e{constructor(){super(...arguments),this.padding=void 0,this.textAlign="center",this.formatter=void 0}}return __decorateClass([import_ag_charts_core22.Property],t.prototype,"padding",2),__decorateClass([import_ag_charts_core22.Property],t.prototype,"textAlign",2),__decorateClass([import_ag_charts_core22.Property],t.prototype,"formatter",2),t}function Cappable(e){class t extends e{}return t}function Extendable(e){class t extends e{}return __decorateClass([import_ag_charts_core22.Property],t.prototype,"extendStart",2),__decorateClass([import_ag_charts_core22.Property],t.prototype,"extendEnd",2),t}function Writeable(e){class t extends e{isWriteable(){return!this.locked&&!this.readOnly}isHoverable(){return!this.readOnly}}return __decorateClass([import_ag_charts_core22.Property],t.prototype,"locked",2),__decorateClass([import_ag_charts_core22.Property],t.prototype,"readOnly",2),t}function Localisable(e){class t extends e{setLocaleManager(o){this.localeManager??(this.localeManager=o)}}return t}function Visible(e){class t extends e{}return __decorateClass([import_ag_charts_core22.Property],t.prototype,"visible",2),t}function Fill(e){class t extends e{}return __decorateClass([import_ag_charts_core22.Property],t.prototype,"fill",2),__decorateClass([import_ag_charts_core22.Property],t.prototype,"fillOpacity",2),t}function Stroke(e){class t extends e{}return __decorateClass([import_ag_charts_core22.Property],t.prototype,"stroke",2),__decorateClass([import_ag_charts_core22.Property],t.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core22.Property],t.prototype,"strokeWidth",2),t}function LineStyle(e){class t extends e{constructor(){super(...arguments),this.lineCap=void 0,this.computedLineDash=void 0}}return __decorateClass([import_ag_charts_core22.Property],t.prototype,"lineDash",2),__decorateClass([import_ag_charts_core22.Property],t.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core22.Property],t.prototype,"lineStyle",2),t}function Font(e){class t extends e{constructor(){super(...arguments),this.fontSize=import_ag_charts_core22.FONT_SIZE.SMALL,this.fontFamily="Verdana, sans-serif"}}return __decorateClass([import_ag_charts_core22.Property],t.prototype,"fontStyle",2),__decorateClass([import_ag_charts_core22.Property],t.prototype,"fontWeight",2),__decorateClass([import_ag_charts_core22.Property],t.prototype,"fontSize",2),__decorateClass([import_ag_charts_core22.Property],t.prototype,"fontFamily",2),__decorateClass([import_ag_charts_core22.Property],t.prototype,"color",2),t}var import_ag_charts_core25=require("ag-charts-core"),import_ag_charts_core23=require("ag-charts-core");function getGrouping(e){return(0,import_ag_charts_core23.isNumber)(e)||(0,import_ag_charts_core23.isString)(e)||(0,import_ag_charts_core23.isDate)(e)?{value:e,groupPercentage:0}:e??{value:void 0,groupPercentage:0}}function getGroupingValue(e){return getGrouping(e)?.value}function convertLine(e,t){if(e.start==null||e.end==null)return;const i=convertPoint(e.start,t),o=convertPoint(e.end,t);if(!(i==null||o==null))return{x1:i.x,y1:i.y,x2:o.x,y2:o.y}}function convertPoint(e,t){const i=convert(e.x,t.xAxis),o=convert(e.y,t.yAxis);return{x:i,y:o}}function convert(e,t){if(e==null)return 0;const{value:i,groupPercentage:o}=getGrouping(e),{scale:r,snapToGroup:s}=t,a=r.bandwidth===0?r.step??0:r.bandwidth??0,n=s?a/2:a*o;return r.convert(i)+n}function invertCoords(e,t){const i=invert(e.x,t.xAxis),o=invert(e.y,t.yAxis);return{x:i,y:o}}function invert(e,t){const{scale:i}=t;if(t.continuous&&i.step==null)return t.scaleInvert(e);const o=t.scaleInvertNearest(e),r=i.bandwidth===0?i.step:i.bandwidth??0,s=i.convert(o),a=s+r,n=s===a?0:(e-s)/(a-s);return{value:o,groupPercentage:n}}var import_ag_charts_core24=require("ag-charts-core"),StartEndProperties=class extends Annotation(Line3(Handle(import_ag_charts_core24.BaseProperties))){constructor(){super(...arguments),this.snapToAngle=45}getDefaultColor(e){}getDefaultOpacity(e){}},TextualStartEndProperties=class extends Localisable(Label(Font(StartEndProperties))){constructor(){super(...arguments),this.text="",this.position="top",this.alignment="left",this.placement="inside",this.placeholderText="inputTextareaPlaceholder"}getDefaultColor(e){return this.color}getDefaultOpacity(e){}getPlaceholderColor(){}getPadding(){const{padding:e=0}=this;return{top:e,right:e,bottom:e,left:e}}getText(){const e=this.text.length==0;let t=this.text;return e&&(t=this.placeholderText??"",this.localeManager&&(t=this.localeManager.t(t))),{text:t,isPlaceholder:e}}getTextInputCoords(e,t){return convertPoint(this.end,e)}getTextPosition(){return this.position}};__decorateClass([import_ag_charts_core25.Property],TextualStartEndProperties.prototype,"text",2);var DEFAULT_CALLOUT_PADDING={top:6,right:12,bottom:9,left:12},CalloutProperties=class extends Fill(Stroke(TextualStartEndProperties)){constructor(){super(...arguments),this.type="callout",this.position="bottom",this.alignment="left"}static is(e){return(0,import_ag_charts_core26.isObject)(e)&&e.type==="callout"}getDefaultColor(e){switch(e){case"fill-color":return this.fill;case"line-color":return this.stroke;case"text-color":default:return this.color}}getDefaultOpacity(e){switch(e){case"fill-color":return this.fillOpacity;case"line-color":return this.strokeOpacity;case"text-color":default:return}}getPlaceholderColor(){const{r:e,g:t,b:i}=import_ag_charts_core26.Color.fromString(this.color??"#888888");return new import_ag_charts_core26.Color(e,t,i,.66).toString()}getPadding(){const{padding:e}=this;return e==null?{...DEFAULT_CALLOUT_PADDING}:{top:e,right:e,bottom:e,left:e}}getTextInputCoords(e,t){const i=super.getTextInputCoords(e,t),o=this.getPadding(),r=o.left??0,s=o.bottom??0;return{x:i.x+r,y:i.y-s}}};__decorateClass([import_ag_charts_core26.Property],CalloutProperties.prototype,"type",2);var import_ag_charts_core28=require("ag-charts-core"),import_ag_charts_core27=require("ag-charts-core"),TextualPointProperties=class extends Annotation(Point(Handle(Label(Font(import_ag_charts_core27.BaseProperties))))){constructor(){super(...arguments),this.text="",this.position="top",this.alignment="left",this.placement="inside",this.placeholderText="inputTextareaPlaceholder"}getDefaultColor(e){return this.color}getDefaultOpacity(e){}getPlaceholderColor(){}getPadding(){const{padding:e=0}=this;return{top:e,right:e,bottom:e,left:e}}getText(){const e=this.text.length==0;return{text:e?this.placeholderText??"":this.text,isPlaceholder:e}}getTextInputCoords(e,t){return convertPoint(this,e)}getTextPosition(){return this.position}};__decorateClass([import_ag_charts_core27.Property],TextualPointProperties.prototype,"text",2);var DEFAULT_COMMENT_PADDING={top:8,right:14,bottom:8,left:14},CommentProperties=class extends Fill(Stroke(TextualPointProperties)){constructor(){super(...arguments),this.type="comment",this.position="bottom",this.alignment="left"}static is(e){return(0,import_ag_charts_core28.isObject)(e)&&e.type==="comment"}getDefaultColor(e){switch(e){case"fill-color":return this.fill;case"line-color":return this.stroke;case"text-color":default:return this.color}}getDefaultOpacity(e){switch(e){case"fill-color":return this.fillOpacity;case"line-color":return this.strokeOpacity;case"text-color":default:return}}getPlaceholderColor(){const{r:e,g:t,b:i}=import_ag_charts_core28.Color.fromString(this.color??"#888888");return new import_ag_charts_core28.Color(e,t,i,.66).toString()}getPadding(){const{padding:e,fontSize:t}=this;return e==null?{top:Math.max(t*.4,DEFAULT_COMMENT_PADDING.top),bottom:Math.max(t*.4,DEFAULT_COMMENT_PADDING.bottom),left:Math.max(t*.8,DEFAULT_COMMENT_PADDING.left),right:Math.max(t*.8,DEFAULT_COMMENT_PADDING.right)}:{top:e,right:e,bottom:e,left:e}}getTextInputCoords(e,t){const i=super.getTextInputCoords(e,t),o=this.getPadding();return{x:i.x+o.left,y:i.y-o.bottom}}};__decorateClass([import_ag_charts_core28.Property],CommentProperties.prototype,"type",2);var import_ag_charts_community26=require("ag-charts-community"),import_ag_charts_core30=require("ag-charts-core"),import_ag_charts_core29=require("ag-charts-core");function getLineStyle(e,t){return e?"dashed":t??"solid"}function getComputedLineDash(e,t){switch(t){case"solid":return[];case"dashed":return[e*4,e*2];case"dotted":return[0,e*2]}}function getLineDash(e,t,i,o){const r=getLineStyle(e,i);return t??e??getComputedLineDash(o??1,r)}function getLineCap(e,t,i){const o=getLineStyle(t,i);return e??o==="dotted"?"round":void 0}function boundsIntersections(e,t){const[i,o]=import_ag_charts_core29.Vec2.from(e),r=t.height,s=import_ag_charts_core29.Vec2.gradient(o,i,r),a=import_ag_charts_core29.Vec2.intercept(o,s,r),n=[{x:i.x,y:r??0},{x:i.x,y:r==null?t.height:r-t.height}];if(s===1/0)return n;let l=[import_ag_charts_core29.Vec2.intersectAtY(s,a,0,r),import_ag_charts_core29.Vec2.intersectAtY(s,a,t.height,r),import_ag_charts_core29.Vec2.intersectAtX(s,a,0,r),import_ag_charts_core29.Vec2.intersectAtX(s,a,t.width,r)];return l=l.filter(c=>c.x>=t.x&&c.x<=t.width&&c.y>=t.y&&c.y<=t.height).sort((c,h)=>c.x===h.x?0:c.x<h.x?-1:1),l.length!==2?n:l}var MeasurerStatisticsDivider=class extends Stroke(import_ag_charts_core30.BaseProperties){},MeasurerStatistics=class extends Font(Fill(Stroke(import_ag_charts_core30.BaseProperties))){constructor(){super(...arguments),this.divider=new MeasurerStatisticsDivider}};__decorateClass([import_ag_charts_core30.Property],MeasurerStatistics.prototype,"divider",2);var MeasurerDirectionProperties=class extends Fill(Stroke(Handle(import_ag_charts_core30.BaseProperties))){constructor(){super(...arguments),this.statistics=new MeasurerStatistics}};__decorateClass([import_ag_charts_core30.Property],MeasurerDirectionProperties.prototype,"statistics",2);var MeasurerTypeProperties=class extends Localisable(Background2(Stroke(LineStyle(StartEndProperties)))){constructor(){super(...arguments),this.direction="both",this.hasDateRange=!1,this.hasPriceRange=!1,this.statistics=new MeasurerStatistics,this.getVolume=()=>{},this.text=new LineTextProperties}getDefaultColor(e){switch(e){case"fill-color":return this.background.fill;case"line-color":return this.stroke;case"text-color":return this.text.color}}getDefaultOpacity(e){switch(e){case"fill-color":return this.background.fillOpacity;case"line-color":return this.strokeOpacity}}getLineDash(){return getLineDash(this.lineDash,this.computedLineDash,this.lineStyle,this.strokeWidth)}getLineCap(){return getLineCap(this.lineCap,this.lineDash,this.lineStyle)}};__decorateClass([import_ag_charts_core30.Property],MeasurerTypeProperties.prototype,"statistics",2),__decorateClass([import_ag_charts_core30.Property],MeasurerTypeProperties.prototype,"text",2);function DateRange(e){class t extends e{constructor(){super(...arguments),this.hasDateRange=!0}}return t}function PriceRange(e){class t extends e{constructor(){super(...arguments),this.hasPriceRange=!0}}return t}var DateRangeProperties=class extends DateRange(MeasurerTypeProperties){constructor(){super(...arguments),this.type="date-range",this.direction="horizontal"}static is(e){return(0,import_ag_charts_core30.isObject)(e)&&e.type==="date-range"}};__decorateClass([import_ag_charts_core30.Property],DateRangeProperties.prototype,"type",2),__decorateClass([import_ag_charts_core30.Property],DateRangeProperties.prototype,"extendAbove",2),__decorateClass([import_ag_charts_core30.Property],DateRangeProperties.prototype,"extendBelow",2);var PriceRangeProperties=class extends PriceRange(MeasurerTypeProperties){constructor(){super(...arguments),this.type="price-range",this.direction="vertical"}static is(e){return(0,import_ag_charts_core30.isObject)(e)&&e.type==="price-range"}};__decorateClass([import_ag_charts_core30.Property],PriceRangeProperties.prototype,"type",2),__decorateClass([import_ag_charts_core30.Property],PriceRangeProperties.prototype,"extendLeft",2),__decorateClass([import_ag_charts_core30.Property],PriceRangeProperties.prototype,"extendRight",2);var DatePriceRangeProperties=class extends DateRange(PriceRange(MeasurerTypeProperties)){constructor(){super(...arguments),this.type="date-price-range",this.direction="both"}static is(e){return(0,import_ag_charts_core30.isObject)(e)&&e.type==="date-price-range"}};__decorateClass([import_ag_charts_core30.Property],DatePriceRangeProperties.prototype,"type",2);var QuickDatePriceRangeProperties=class extends DateRange(PriceRange(MeasurerTypeProperties)){constructor(){super(...arguments),this.type="quick-date-price-range",this.up=new MeasurerDirectionProperties,this.down=new MeasurerDirectionProperties,this.direction="both"}static is(e){return(0,import_ag_charts_core30.isObject)(e)&&e.type==="quick-date-price-range"}};__decorateClass([import_ag_charts_core30.Property],QuickDatePriceRangeProperties.prototype,"type",2),__decorateClass([import_ag_charts_core30.Property],QuickDatePriceRangeProperties.prototype,"up",2),__decorateClass([import_ag_charts_core30.Property],QuickDatePriceRangeProperties.prototype,"down",2);var import_ag_charts_core32=require("ag-charts-core"),import_ag_charts_community27=require("ag-charts-community"),import_ag_charts_core31=require("ag-charts-core"),{BBox:BBox2}=import_ag_charts_community27._ModuleSupport,ANNOTATION_TEXT_LINE_HEIGHT=1.38;function maybeWrapText(e,t,i){return i?(0,import_ag_charts_core31.wrapText)(t,{maxWidth:i,font:e,textWrap:"always",avoidOrphans:!1}):t}function measureAnnotationText(e,t){const{lineMetrics:i,width:o}=(0,import_ag_charts_core31.cachedTextMeasurer)(e).measureLines(t),r=i.length*(0,import_ag_charts_core31.calcLineHeight)(e.fontSize,ANNOTATION_TEXT_LINE_HEIGHT);return{width:o,height:r}}function getBBox(e,t,i,o){let r=o?.width??0,s=o?.height??0;if(!o){const a=e.width==null?t:maybeWrapText(e,t,e.width);({width:r,height:s}=measureAnnotationText(e,a))}return new BBox2(i.x,i.y,r,s)}function updateTextNode(e,t,i,o,{x:r,y:s},a){const{visible:n=!0,fontFamily:l,fontSize:c=14,fontStyle:h,fontWeight:u,textAlign:d}=o,p=(0,import_ag_charts_core31.calcLineHeight)(c,ANNOTATION_TEXT_LINE_HEIGHT);a??(a=o.position=="center"?"middle":o.position);const g=i?o.getPlaceholderColor():o.color;e.setProperties({x:r,y:s,visible:n,text:t,fill:g,fontFamily:l,fontSize:c,fontStyle:h,fontWeight:u,textAlign:d,lineHeight:p,textBaseline:a})}var DEFAULT_NOTE_PADDING=10,HANDLE_SIZE=11,ICON_HEIGHT=20,ICON_WIDTH=22,ICON_SPACING=10,LABEL_OFFSET=ICON_HEIGHT+ICON_SPACING,TOOLBAR_OFFSET=34,NoteBackgroundProperties=class extends Fill(Stroke(import_ag_charts_core32.BaseProperties)){},NoteProperties=class extends Fill(Stroke(TextualPointProperties)){constructor(){super(...arguments),this.type="note",this.background=new NoteBackgroundProperties,this.position="bottom",this.alignment="center",this.width=200}static is(e){return(0,import_ag_charts_core32.isObject)(e)&&e.type==="note"}getDefaultColor(e){switch(e){case"line-color":return this.fill;case"text-color":return this.color}}getDefaultOpacity(e){switch(e){case"line-color":return this.fillOpacity;case"text-color":return}}getPadding(){const e=this.padding??DEFAULT_NOTE_PADDING;return{top:e,right:e,bottom:e,left:e}}getTextInputCoords(e,t){const{width:i,text:o}=this,r=super.getTextInputCoords(e,t),s=this.getPadding().top,a=getBBox(this,o,r);a.x=(0,import_ag_charts_core32.clamp)(i/2,a.x,e.seriesRect.width-i/2);const n=a.y-LABEL_OFFSET-s*2,l=a.y+HANDLE_SIZE+s*2,c=Math.max(a.height,t);return n-c-TOOLBAR_OFFSET<0?(a.y=l,this.position="top"):(a.y=n+s,this.position="bottom"),{x:a.x,y:a.y}}isHoverable(){return!0}};__decorateClass([import_ag_charts_core32.Property],NoteProperties.prototype,"type",2),__decorateClass([import_ag_charts_core32.Property],NoteProperties.prototype,"background",2);var import_ag_charts_core33=require("ag-charts-core"),PointProperties2=class extends Annotation(Point(Handle(import_ag_charts_core33.BaseProperties))){getDefaultColor(e){}getDefaultOpacity(e){}},ShapePointProperties=class De extends Fill(PointProperties2){constructor(){super(...arguments),this.size=32}static is(t){return t instanceof De}getDefaultColor(t){return t==="fill-color"?this.fill:void 0}getDefaultOpacity(t){return t==="fill-color"?this.fillOpacity:void 0}},import_ag_charts_community28=require("ag-charts-community"),import_ag_charts_core34=require("ag-charts-core"),HorizontalLineProperties=class extends Annotation(Value(Handle(AxisLabel(Stroke(LineStyle(import_ag_charts_core34.BaseProperties)))))){constructor(){super(...arguments),this.direction="horizontal",this.type="horizontal-line",this.text=new LineTextProperties}static is(e){return(0,import_ag_charts_core34.isObject)(e)&&e.type==="horizontal-line"}getDefaultColor(){return this.stroke}getDefaultOpacity(){return this.strokeOpacity}getLineDash(){return getLineDash(this.lineDash,this.computedLineDash,this.lineStyle,this.strokeWidth)}getLineCap(){return getLineCap(this.lineCap,this.lineDash,this.lineStyle)}};__decorateClass([import_ag_charts_core34.Property],HorizontalLineProperties.prototype,"type",2),__decorateClass([import_ag_charts_core34.Property],HorizontalLineProperties.prototype,"text",2);var VerticalLineProperties=class extends Annotation(Value(Handle(AxisLabel(Stroke(LineStyle(import_ag_charts_core34.BaseProperties)))))){constructor(){super(...arguments),this.direction="vertical",this.type="vertical-line",this.text=new LineTextProperties}static is(e){return(0,import_ag_charts_core34.isObject)(e)&&e.type==="vertical-line"}getDefaultColor(){return this.stroke}getDefaultOpacity(){return this.strokeOpacity}getLineDash(){return getLineDash(this.lineDash,this.computedLineDash,this.lineStyle,this.strokeWidth)}getLineCap(){return getLineCap(this.lineCap,this.lineDash,this.lineStyle)}};__decorateClass([import_ag_charts_core34.Property],VerticalLineProperties.prototype,"type",2),__decorateClass([import_ag_charts_core34.Property],VerticalLineProperties.prototype,"text",2);var import_ag_charts_community29=require("ag-charts-community"),import_ag_charts_core35=require("ag-charts-core"),DisjointChannelProperties=class extends Annotation(Background2(Line3(Handle(Extendable(Stroke(LineStyle(import_ag_charts_core35.BaseProperties))))))){constructor(){super(...arguments),this.type="disjoint-channel",this.text=new ChannelTextProperties,this.snapToAngle=45}static is(e){return(0,import_ag_charts_core35.isObject)(e)&&e.type==="disjoint-channel"}get bottom(){const e={start:{x:this.start.x,y:this.start.y},end:{x:this.end.x,y:this.end.y}};return typeof e.start.y=="number"&&typeof e.end.y=="number"?(e.start.y-=this.startHeight,e.end.y-=this.endHeight):import_ag_charts_core35.Logger.warnOnce(`Annotation [${this.type}] can only be used with a numeric y-axis.`),e}getDefaultColor(e){switch(e){case"fill-color":return this.background.fill;case"line-color":return this.stroke;case"text-color":return this.text.color}}getDefaultOpacity(e){switch(e){case"fill-color":return this.background.fillOpacity;case"line-color":return this.strokeOpacity}}getLineDash(){return getLineDash(this.lineDash,this.computedLineDash,this.lineStyle,this.strokeWidth)}getLineCap(){return getLineCap(this.lineCap,this.lineDash,this.lineStyle)}};__decorateClass([import_ag_charts_core35.Property],DisjointChannelProperties.prototype,"type",2),__decorateClass([import_ag_charts_core35.Property],DisjointChannelProperties.prototype,"startHeight",2),__decorateClass([import_ag_charts_core35.Property],DisjointChannelProperties.prototype,"endHeight",2),__decorateClass([import_ag_charts_core35.Property],DisjointChannelProperties.prototype,"text",2);var import_ag_charts_core38=require("ag-charts-core"),import_ag_charts_core37=require("ag-charts-core"),import_ag_charts_community30=require("ag-charts-community"),import_ag_charts_core36=require("ag-charts-core"),LineTypeProperties=class extends Localisable(Cappable(Extendable(Stroke(LineStyle(StartEndProperties))))){constructor(){super(...arguments),this.text=new LineTextProperties}getDefaultColor(e){switch(e){case"line-color":return this.stroke;case"text-color":return this.text.color}}getDefaultOpacity(){return this.strokeOpacity}getLineDash(){return getLineDash(this.lineDash,this.computedLineDash,this.lineStyle,this.strokeWidth)}getLineCap(){return getLineCap(this.lineCap,this.lineDash,this.lineStyle)}};__decorateClass([import_ag_charts_core36.Property],LineTypeProperties.prototype,"text",2);var ArrowProperties=class extends LineTypeProperties{constructor(){super(...arguments),this.type="arrow",this.endCap="arrow"}static is(e){return(0,import_ag_charts_core36.isObject)(e)&&e.type==="arrow"}};__decorateClass([import_ag_charts_core36.Property],ArrowProperties.prototype,"type",2);var LineProperties=class extends LineTypeProperties{constructor(){super(...arguments),this.type="line"}static is(e){return(0,import_ag_charts_core36.isObject)(e)&&e.type==="line"}};__decorateClass([import_ag_charts_core36.Property],LineProperties.prototype,"type",2);var FibonacciProperties=class extends LineTypeProperties{constructor(){super(...arguments),this.label=new LabelTextProperties,this.reverse=!1,this.showFill=!0,this.isMultiColor=!0,this.strokes=[],this.bands=10}getDefaultColor(e){switch(e){case"line-color":return this.rangeStroke??this.stroke;case"text-color":return this.text.color}}};__decorateClass([import_ag_charts_core37.Property],FibonacciProperties.prototype,"label",2),__decorateClass([import_ag_charts_core37.Property],FibonacciProperties.prototype,"reverse",2),__decorateClass([import_ag_charts_core37.Property],FibonacciProperties.prototype,"showFill",2),__decorateClass([import_ag_charts_core37.Property],FibonacciProperties.prototype,"isMultiColor",2),__decorateClass([import_ag_charts_core37.Property],FibonacciProperties.prototype,"strokes",2),__decorateClass([import_ag_charts_core37.Property],FibonacciProperties.prototype,"rangeStroke",2),__decorateClass([import_ag_charts_core37.Property],FibonacciProperties.prototype,"bands",2);var FibonacciRetracementTrendBasedProperties=class extends FibonacciProperties{constructor(){super(...arguments),this.type="fibonacci-retracement-trend-based",this.endRetracement=new PointProperties}static is(e){return(0,import_ag_charts_core38.isObject)(e)&&e.type==="fibonacci-retracement-trend-based"}};__decorateClass([import_ag_charts_core38.Property],FibonacciRetracementTrendBasedProperties.prototype,"type",2),__decorateClass([import_ag_charts_core38.Property],FibonacciRetracementTrendBasedProperties.prototype,"endRetracement",2);var import_ag_charts_core39=require("ag-charts-core"),FibonacciRetracementProperties=class extends FibonacciProperties{constructor(){super(...arguments),this.type="fibonacci-retracement"}static is(e){return(0,import_ag_charts_core39.isObject)(e)&&e.type==="fibonacci-retracement"}};__decorateClass([import_ag_charts_core39.Property],FibonacciRetracementProperties.prototype,"type",2);var import_ag_charts_community31=require("ag-charts-community"),import_ag_charts_core40=require("ag-charts-core"),ParallelChannelProperties=class extends Annotation(Background2(Line3(Handle(Extendable(Stroke(LineStyle(import_ag_charts_core40.BaseProperties))))))){constructor(){super(...arguments),this.type="parallel-channel",this.middle=new ChannelAnnotationMiddleProperties,this.text=new ChannelTextProperties,this.snapToAngle=45}static is(e){return(0,import_ag_charts_core40.isObject)(e)&&e.type==="parallel-channel"}get bottom(){const e={start:{x:this.start.x,y:this.start.y},end:{x:this.end.x,y:this.end.y}};return typeof e.start.y=="number"&&typeof e.end.y=="number"?(e.start.y-=this.height,e.end.y-=this.height):import_ag_charts_core40.Logger.warnOnce(`Annotation [${this.type}] can only be used with a numeric y-axis.`),e}getDefaultColor(e){switch(e){case"fill-color":return this.background.fill;case"line-color":return this.stroke;case"text-color":return this.text.color}}getDefaultOpacity(e){switch(e){case"fill-color":return this.background.fillOpacity;case"line-color":return this.strokeOpacity}}getLineDash(){return getLineDash(this.lineDash,this.computedLineDash,this.lineStyle,this.strokeWidth)}getLineCap(){return getLineCap(this.lineCap,this.lineDash,this.lineStyle)}};__decorateClass([import_ag_charts_core40.Property],ParallelChannelProperties.prototype,"type",2),__decorateClass([import_ag_charts_core40.Property],ParallelChannelProperties.prototype,"height",2),__decorateClass([import_ag_charts_core40.Property],ParallelChannelProperties.prototype,"middle",2),__decorateClass([import_ag_charts_core40.Property],ParallelChannelProperties.prototype,"text",2);var import_ag_charts_core41=require("ag-charts-core"),TextProperties=class extends TextualPointProperties{constructor(){super(...arguments),this.type="text",this.position="bottom"}static is(e){return(0,import_ag_charts_core41.isObject)(e)&&e.type==="text"}};__decorateClass([import_ag_charts_core41.Property],TextProperties.prototype,"type",2);function isEphemeralType(e){return QuickDatePriceRangeProperties.is(e)}function isLineType(e){return LineProperties.is(e)||HorizontalLineProperties.is(e)||VerticalLineProperties.is(e)||ArrowProperties.is(e)||isFibonacciType(e)}function isChannelType(e){return DisjointChannelProperties.is(e)||ParallelChannelProperties.is(e)}function isFibonacciType(e){return FibonacciRetracementProperties.is(e)||FibonacciRetracementTrendBasedProperties.is(e)}function isTextType(e){return CalloutProperties.is(e)||CommentProperties.is(e)||NoteProperties.is(e)||TextProperties.is(e)}function isMeasurerType(e){return DateRangeProperties.is(e)||PriceRangeProperties.is(e)||DatePriceRangeProperties.is(e)||QuickDatePriceRangeProperties.is(e)}function hasFontSize(e){return isTextType(e)&&!NoteProperties.is(e)}function hasLineStyle(e){return isLineType(e)||isChannelType(e)||isMeasurerType(e)&&!QuickDatePriceRangeProperties.is(e)}function hasLineColor(e){return isLineType(e)||isChannelType(e)||isMeasurerType(e)||CalloutProperties.is(e)||NoteProperties.is(e)}function hasIconColor(e){return NoteProperties.is(e)}function hasFillColor(e){return isChannelType(e)||isMeasurerType(e)||CalloutProperties.is(e)||CommentProperties.is(e)||ShapePointProperties.is(e)}function hasTextColor(e){return isTextType(e)&&!NoteProperties.is(e)}function hasLineText(e){return(isLineType(e)||isChannelType(e)||isMeasurerType(e))&&!isEphemeralType(e)&&(0,import_ag_charts_core42.isObject)(e.text)}function setFontSize(e,t){"fontSize"in e&&(e.fontSize=t),hasLineText(e)&&(e.text.fontSize=t)}function setLineStyle(e,t){const i=t?.strokeWidth??e.strokeWidth??1,o=t?.type??e.lineStyle,r=o??getLineStyle(e.lineDash,o),s=getComputedLineDash(i,r);e.strokeWidth=i,e.computedLineDash=s,e.lineStyle=r,e.lineCap=r==="dotted"?"round":void 0}function setColor(e,t,i,o,r,s){switch(t){case"fill-color":{"fill"in e&&(e.fill=o),"fillOpacity"in e&&(e.fillOpacity=r),"background"in e&&(e.background.fill=o,e.background.fillOpacity=r);break}case"line-color":{"axisLabel"in e&&(e.axisLabel.fill=o,e.axisLabel.fillOpacity=r,e.axisLabel.stroke=o,e.axisLabel.strokeOpacity=r),"fill"in e&&"fillOpacity"in e&&hasIconColor(e)?(e.fill=o,e.fillOpacity=r):("strokeOpacity"in e&&(e.strokeOpacity=r),"isMultiColor"in e&&"rangeStroke"in e?(e.isMultiColor=s,e.rangeStroke=o):"stroke"in e&&(e.stroke=o));break}case"text-color":{"color"in e&&(e.color=i),hasLineText(e)&&(e.text.color=o);break}}}var AnnotationDefaults=class{constructor(){this.mementoOriginatorKey="annotation-defaults",this.colors=new Map(Object.values(AnnotationType).map(e=>[e,new Map([["line-color",void 0],["fill-color",void 0],["text-color",void 0]])])),this.fontSizes=new Map([["callout",void 0],["comment",void 0],["text",void 0],["arrow",void 0],["line",void 0],["disjoint-channel",void 0],["parallel-channel",void 0],["date-range",void 0],["price-range",void 0],["date-price-range",void 0]]),this.lineStyles=new Map([["line",void 0],["horizontal-line",void 0],["vertical-line",void 0],["disjoint-channel",void 0],["parallel-channel",void 0],["arrow",void 0],["date-range",void 0],["price-range",void 0],["date-price-range",void 0]]),this.lineTextAlignments=new Map([["line",void 0],["horizontal-line",void 0],["vertical-line",void 0],["disjoint-channel",void 0],["parallel-channel",void 0],["arrow",void 0],["date-range",void 0],["price-range",void 0],["date-price-range",void 0]]),this.lineTextPositions=new Map([["line",void 0],["horizontal-line",void 0],["vertical-line",void 0],["disjoint-channel",void 0],["parallel-channel",void 0],["arrow",void 0],["date-range",void 0],["price-range",void 0],["date-price-range",void 0]]),this.fibonacciOptions=new Map([["fibonacci-retracement",{bands:void 0,reverse:void 0,showFill:void 0}],["fibonacci-retracement-trend-based",{bands:void 0,reverse:void 0,showFill:void 0}]])}createMemento(){return{colors:(0,import_ag_charts_core43.deepClone)(this.colors),fontSizes:(0,import_ag_charts_core43.deepClone)(this.fontSizes),lineStyles:(0,import_ag_charts_core43.deepClone)(this.lineStyles),lineTextAlignments:(0,import_ag_charts_core43.deepClone)(this.lineTextAlignments),lineTextPositions:(0,import_ag_charts_core43.deepClone)(this.lineTextPositions),fibonacciOptions:(0,import_ag_charts_core43.deepClone)(this.fibonacciOptions)}}guardMemento(e){return!0}restoreMemento(e,t,i){this.colors=(0,import_ag_charts_core43.deepClone)(i.colors),this.fontSizes=(0,import_ag_charts_core43.deepClone)(i.fontSizes),this.lineStyles=(0,import_ag_charts_core43.deepClone)(i.lineStyles),this.lineTextAlignments=(0,import_ag_charts_core43.deepClone)(i.lineTextAlignments),this.lineTextPositions=(0,import_ag_charts_core43.deepClone)(i.lineTextPositions),this.fibonacciOptions=(0,import_ag_charts_core43.deepClone)(i.fibonacciOptions)}setDefaultColor(e,t,i,o,r,s){this.colors.get(e)?.set(t,[i,o,r,s])}setDefaultFontSize(e,t){this.fontSizes.set(e,t)}setDefaultLineStyleType(e,t){const i=this.lineStyles.get(e);i?i.type=t:this.lineStyles.set(e,{type:t})}setDefaultLineStyleWidth(e,t){const i=this.lineStyles.get(e);i?i.strokeWidth=t:this.lineStyles.set(e,{strokeWidth:t})}setDefaultLineTextAlignment(e,t){this.lineTextAlignments.set(e,t)}setDefaultLineTextPosition(e,t){this.lineTextPositions.set(e,t)}setDefaultFibonacciOptions(e,t,i){if(e!="fibonacci-retracement"&&e!="fibonacci-retracement-trend-based")return;const o=this.fibonacciOptions.get(e);o[t]=i,this.fibonacciOptions.set(e,o)}applyDefaults(e){for(const[t,i]of this.colors)if(e.type===t)for(const[o,[r,s,a,n]=[]]of i)r&&s&&a!=null&&n!=null&&setColor(e,o,r,s,a,n);for(const[t,i]of this.fontSizes)e.type!==t||i==null||setFontSize(e,i);for(const[t,i]of this.lineStyles)e.type!==t||i==null||setLineStyle(e,i);for(const[t,i]of this.lineTextPositions)e.type!==t||i==null||(e.text.position=i);for(const[t,i]of this.lineTextAlignments)e.type!==t||i==null||(e.text.alignment=i);for(const[t,i]of this.fibonacciOptions)if(!(e.type!==t||i==null))for(const o of Object.keys(i)){const r=i[o];r!=null&&e.set({[o]:r})}}},import_ag_charts_community35=require("ag-charts-community"),import_ag_charts_core46=require("ag-charts-core"),import_ag_charts_community33=require("ag-charts-community"),import_ag_charts_core44=require("ag-charts-core"),colorPickerTemplate_default='<div class="ag-charts-color-picker__palette" role="slider" tabindex="0"></div><div class="ag-charts-color-picker__color-row" role="presentation"><button class="ag-charts-color-picker__multi-color-button" tabindex="0" type="button" role="switch"></button> <input class="ag-charts-color-picker__hue-input" tabindex="0" type="range" min="0" max="360" value="0"></div><input class="ag-charts-color-picker__alpha-input" tabindex="0" type="range" min="0" max="1" value="1" step="0.01"> <label class="ag-charts-color-picker__color-field" role="presentation"><span class="ag-charts-color-picker__color-label" aria-hidden="true"></span> <input class="ag-charts-color-picker__color-input" tabindex="0" value="#000"></label>',getHsva=e=>{try{const t=import_ag_charts_core44.Color.fromString(e),[i,o,r]=t.toHSB();return[i,o,r,t.a]}catch{return}},ColorPicker=class extends import_ag_charts_community33._ModuleSupport.AnchoredPopover{constructor(e,t){super(e,"color-picker",t),this.hasChanged=!1,this.hideFns.push(()=>{this.i18nUpdater=void 0,this.hasChanged&&this.onChangeHide?.()}),this.cleanup.register(this.ctx.eventsHub.on("locale:change",()=>this.i18nUpdater?.()))}show(e){this.hasChanged=!1,this.onChangeHide=e.onChangeHide;const{element:t,initialFocus:i}=this.createColorPicker(e),o=this.showWithChildren([t],{initialFocus:i,...e});o.classList.add("ag-charts-color-picker"),o.setAttribute("role","dialog")}createColorPicker(e){const{localeManager:t}=this.ctx;let i=e.isMultiColor??!1,[o,r,s,a]=getHsva(e.color??"#f00")??[0,1,.5,1];a=e.opacity??a;const n=(0,import_ag_charts_core44.createElement)("div","ag-charts-color-picker__content");n.innerHTML=colorPickerTemplate_default,n.ariaLabel=this.ctx.localeManager.t("ariaLabelColorPicker");const l=n.querySelector(".ag-charts-color-picker__palette"),c=n.querySelector(".ag-charts-color-picker__hue-input"),h=n.querySelector(".ag-charts-color-picker__multi-color-button"),u=n.querySelector(".ag-charts-color-picker__alpha-input"),d=n.querySelector(".ag-charts-color-picker__color-input"),p=n.querySelector(".ag-charts-color-picker__color-label"),g=m=>{const v={s:"ariaValueColorPalette",v:"ariaValueColorPaletteFirstV"}[m];l.ariaValueText=t.t(v,{s:r,v:s})};this.i18nUpdater=()=>{l.ariaRoleDescription=t.t("ariaRoleDescription2DSlider"),l.ariaLabel=t.t("ariaLabelColorPickerPalette"),c.ariaLabel=t.t("ariaLabelColorPickerHue"),h.ariaLabel=t.t("ariaLabelColorPickerMultiColor"),u.ariaLabel=t.t("ariaLabelColorPickerAlpha"),d.ariaLabel=t.t("ariaLabelColor"),g("s")},this.i18nUpdater(),h.classList.toggle("ag-charts-color-picker__multi-color-button--hidden",!e.hasMultiColorOption);const y=(m=!0)=>{const b=import_ag_charts_core44.Color.fromHSB(o,r,s,a).toHexString();if(n.style.setProperty("--h",`${o}`),n.style.setProperty("--s",`${r}`),n.style.setProperty("--v",`${s}`),n.style.setProperty("--a",`${a}`),n.style.setProperty("--color",b.slice(0,7)),n.style.setProperty("--color-a",b),c.value=`${o}`,u.value=`${a}`,u.classList.toggle("ag-charts-color-picker__alpha-input--opaque",a===1),h.classList.toggle("ag-charts-color-picker__multi-color-button--active",i),p.classList.toggle("ag-charts-color-picker__color-label--multi-color",i),document.activeElement!==d&&(h.ariaChecked=i.toString(),d.value=i?t.t("ariaLabelColorPickerMultiColor"):b.toUpperCase()),m||e.color==null){const D=import_ag_charts_core44.Color.fromHSB(o,r,s,1).toHexString();e.onChange?.(b,D,a,i)}m&&(this.hasChanged=!0)};y(!1);const x=m=>m.preventDefault(),f=m=>m.stopPropagation(),S=m=>{m.preventDefault();const v=m.currentTarget;v.focus();const b=v.getBoundingClientRect(),D=({clientX:A,clientY:M})=>{i=!1,r=Math.min(Math.max((A-b.left)/b.width,0),1),s=1-Math.min(Math.max((M-b.top)/b.height,0),1),y(),g("s")};D(m);const k=(0,import_ag_charts_core44.attachListener)((0,import_ag_charts_core44.getWindow)(),"pointermove",D);(0,import_ag_charts_core44.getWindow)().addEventListener("pointerup",k,{once:!0})};return n.addEventListener("mousedown",f),n.addEventListener("touchstart",f),n.addEventListener("touchmove",f),n.addEventListener("keydown",m=>{switch(m.stopPropagation(),m.key){case"Enter":case"Escape":this.hide();break;default:return}m.preventDefault()}),l.addEventListener("pointerdown",S),l.addEventListener("touchstart",x,{passive:!1}),l.addEventListener("touchmove",x,{passive:!1}),l.addEventListener("keydown",m=>{if(m.key==="ArrowLeft")r=(0,import_ag_charts_core44.clamp)(0,r-.01,1),g("s");else if(m.key==="ArrowRight")r=(0,import_ag_charts_core44.clamp)(0,r+.01,1),g("s");else if(m.key==="ArrowUp")s=(0,import_ag_charts_core44.clamp)(0,s+.01,1),g("v");else if(m.key==="ArrowDown")s=(0,import_ag_charts_core44.clamp)(0,s-.01,1),g("v");else return;m.preventDefault(),y()}),l.addEventListener("focus",()=>{g("s")}),h.addEventListener("click",()=>{i=!i,y()}),c.addEventListener("input",m=>{i=!1,o=m.currentTarget.valueAsNumber??0,y()}),u.addEventListener("input",m=>{i=!1,a=m.currentTarget.valueAsNumber??0,y()}),d.addEventListener("input",m=>{i=!1;const v=getHsva(m.currentTarget.value);v!=null&&([o,r,s,a]=v,y())}),d.addEventListener("blur",()=>y()),d.addEventListener("keydown",m=>{m.key==="Enter"&&(m.currentTarget.blur(),y())}),{element:n,initialFocus:l}}},import_ag_charts_core45=require("ag-charts-core"),ToolbarButtonProperties=class extends import_ag_charts_core45.BaseProperties{};__decorateClass([import_ag_charts_core45.Property],ToolbarButtonProperties.prototype,"icon",2),__decorateClass([import_ag_charts_core45.Property],ToolbarButtonProperties.prototype,"label",2),__decorateClass([import_ag_charts_core45.Property],ToolbarButtonProperties.prototype,"ariaLabel",2),__decorateClass([import_ag_charts_core45.Property],ToolbarButtonProperties.prototype,"tooltip",2);var import_ag_charts_community34=require("ag-charts-community");function channelMenuItemVisible(e){return!(e instanceof import_ag_charts_community34._ModuleSupport.LogScale)&&!(e instanceof import_ag_charts_community34._ModuleSupport.BandScale)}var LINE_ANNOTATION_ITEMS=[{label:"toolbarAnnotationsTrendLine",icon:"trend-line-drawing",value:"line"},{label:"toolbarAnnotationsHorizontalLine",icon:"horizontal-line-drawing",value:"horizontal-line"},{label:"toolbarAnnotationsVerticalLine",icon:"vertical-line-drawing",value:"vertical-line"},{label:"toolbarAnnotationsParallelChannel",icon:"parallel-channel-drawing",value:"parallel-channel",visible:channelMenuItemVisible},{label:"toolbarAnnotationsDisjointChannel",icon:"disjoint-channel-drawing",value:"disjoint-channel",visible:channelMenuItemVisible}],FIBONACCI_ANNOTATION_ITEMS=[{label:"toolbarAnnotationsFibonacciRetracement",icon:"fibonacci-retracement-drawing",value:"fibonacci-retracement"},{label:"toolbarAnnotationsFibonacciRetracementTrendBased",icon:"fibonacci-retracement-trend-based-drawing",value:"fibonacci-retracement-trend-based"}],FIBONACCI_RATIO_ITEMS=[{label:"Fibonacci - Extended",value:10},{label:"Fibonacci - 6 Band",value:6},{label:"Fibonacci - 4 Band",value:4}],TEXT_ANNOTATION_ITEMS=[{label:"toolbarAnnotationsText",icon:"text-annotation",value:"text"},{label:"toolbarAnnotationsComment",icon:"comment-annotation",value:"comment"},{label:"toolbarAnnotationsCallout",icon:"callout-annotation",value:"callout"},{label:"toolbarAnnotationsNote",icon:"note-annotation",value:"note"}],SHAPE_ANNOTATION_ITEMS=[{label:"toolbarAnnotationsArrow",icon:"arrow-drawing",value:"arrow"},{label:"toolbarAnnotationsArrowUp",icon:"arrow-up-drawing",value:"arrow-up"},{label:"toolbarAnnotationsArrowDown",icon:"arrow-down-drawing",value:"arrow-down"}],MEASURER_ANNOTATION_ITEMS=[{label:"toolbarAnnotationsQuickDatePriceRange",icon:"measurer-drawing",value:"quick-date-price-range"},{label:"toolbarAnnotationsDateRange",icon:"date-range-drawing",value:"date-range"},{label:"toolbarAnnotationsPriceRange",icon:"price-range-drawing",value:"price-range"},{label:"toolbarAnnotationsDatePriceRange",icon:"date-price-range-drawing",value:"date-price-range"}],LINE_STROKE_WIDTH_ITEMS=[{strokeWidth:1,label:"1",value:1},{strokeWidth:2,label:"2",value:2},{strokeWidth:3,label:"3",value:3},{strokeWidth:4,label:"4",value:4},{strokeWidth:8,label:"8",value:8}],LINE_STYLE_TYPE_ITEMS=[{icon:"line-style-solid",altText:"iconAltTextLineStyleSolid",value:"solid"},{icon:"line-style-dashed",altText:"iconAltTextLineStyleDashed",value:"dashed"},{icon:"line-style-dotted",altText:"iconAltTextLineStyleDotted",value:"dotted"}],TEXT_SIZE_ITEMS=[{label:"10",value:10},{label:"12",value:12},{label:"14",value:14},{label:"16",value:16},{label:"18",value:18},{label:"22",value:22},{label:"28",value:28},{label:"36",value:36},{label:"46",value:46}],{FloatingToolbar,Menu,ToolbarButtonWidget}=import_ag_charts_community35._ModuleSupport,AnnotationOptionsButtonProperties=class extends ToolbarButtonProperties{constructor(){super(...arguments),this.checkedOverrides=new ToolbarButtonProperties}};__decorateClass([import_ag_charts_core46.Property],AnnotationOptionsButtonProperties.prototype,"value",2),__decorateClass([import_ag_charts_core46.Property],AnnotationOptionsButtonProperties.prototype,"checkedOverrides",2),__decorateClass([import_ag_charts_core46.Property],AnnotationOptionsButtonProperties.prototype,"color",2),__decorateClass([import_ag_charts_core46.Property],AnnotationOptionsButtonProperties.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core46.Property],AnnotationOptionsButtonProperties.prototype,"isMultiColor",2);var AnnotationOptionsButtonWidget=class extends ToolbarButtonWidget{update(e){super.update(e),e.value==="line-stroke-width"&&this.updateLineStrokeWidth(e),(e.value==="fill-color"||e.value==="line-color"||e.value==="text-color")&&this.updateFillColor(e)}updateFillColor(e){const t=this.getElement();t.classList.add("ag-charts-annotations__color-picker-button"),t.classList.toggle("ag-charts-annotations__color-picker-button--multi-color",e.isMultiColor),t.style.setProperty("--color",e.color??null)}updateLineStrokeWidth(e){const t=this.getElement();t.classList.add("ag-charts-annotations__stroke-width-button"),t.style.setProperty("--stroke-width",`${e.strokeWidth}px`)}},FloatingAnnotationOptionsToolbar=class extends FloatingToolbar{createButtonWidget(){return new AnnotationOptionsButtonWidget(this.localeManager)}},AnnotationOptionsToolbar=class extends import_ag_charts_core46.BaseProperties{constructor(e,t){super(),this.ctx=e,this.getActiveDatum=t,this.enabled=!0,this.buttons=new import_ag_charts_core46.PropertiesArray(AnnotationOptionsButtonProperties),this.cleanup=new import_ag_charts_core46.CleanupRegistry,this.events=new import_ag_charts_core46.EventEmitter,this.visibleButtons=[],this.toolbar=new FloatingAnnotationOptionsToolbar(this.ctx,"ariaLabelAnnotationOptionsToolbar","annotation-options"),this.colorPicker=new ColorPicker(this.ctx),this.textSizeMenu=new Menu(this.ctx,"text-size"),this.lineStyleTypeMenu=new Menu(this.ctx,"annotations-line-style-type"),this.lineStrokeWidthMenu=new Menu(this.ctx,"annotations-line-stroke-width"),this.cleanup.register(this.toolbar.addToolbarListener("button-pressed",this.onButtonPress.bind(this)),this.toolbar.addToolbarListener("toolbar-moved",this.onToolbarMoved.bind(this)),e.widgets.seriesWidget.addListener("drag-start",this.onDragStart.bind(this)),e.widgets.seriesWidget.addListener("drag-end",this.onDragEnd.bind(this)),()=>{this.colorPicker.destroy(),this.toolbar.destroy()})}onDragStart(){this.toolbar.ignorePointerEvents()}onDragEnd(){this.toolbar.capturePointerEvents()}destroy(){this.cleanup.flush()}show(){this.enabled&&this.toolbar.show()}hide(){this.toolbar.hide()}updateButtons(e){if(!this.enabled)return;const t={"line-style-type":hasLineStyle(e),"line-stroke-width":hasLineStyle(e),"line-color":hasLineColor(e),"text-color":hasTextColor(e),"fill-color":hasFillColor(e),"text-size":hasFontSize(e),settings:hasLineText(e),lock:!0,delete:!0};this.visibleButtons=this.buttons.filter(i=>t[i.value]),this.toolbar.clearButtons(),this.toolbar.updateButtons(this.visibleButtons),this.refreshButtons(e)}setAnchorScene(e){this.toolbar.hasBeenDragged()||this.toolbar.setAnchor(e.getAnchor())}hideOverlays(){this.toolbar.clearActiveButton(),this.colorPicker.hide({lastFocus:null}),this.textSizeMenu.hide(),this.lineStyleTypeMenu.hide(),this.lineStrokeWidthMenu.hide(),this.events.emit("hid-overlays",null)}clearActiveButton(){this.toolbar.clearActiveButton()}updateColors(e){this.updateColorPickerColor("line-color",e.getDefaultColor("line-color"),e.getDefaultOpacity("line-color"),"isMultiColor"in e&&e?.isMultiColor),this.updateColorPickerColor("fill-color",e.getDefaultColor("fill-color"),e.getDefaultOpacity("fill-color"),"isMultiColor"in e&&e?.isMultiColor),this.updateColorPickerColor("text-color",e.getDefaultColor("text-color"),e.getDefaultOpacity("text-color"),"isMultiColor"in e&&e?.isMultiColor)}updateColorPickerColor(e,t,i,o){if(t!=null&&i!=null){const{r,g:s,b:a}=import_ag_charts_core46.Color.fromString(t);t=import_ag_charts_core46.Color.fromArray([r,s,a,i]).toHexString()}this.updateButtonByValue(e,{color:t,isMultiColor:o})}updateFontSize(e){this.updateButtonByValue("text-size",{label:e==null?void 0:String(e)})}updateLineStyleType(e){this.updateButtonByValue("line-style-type",{icon:e.icon})}updateStrokeWidth(e){this.updateButtonByValue("line-stroke-width",{label:e.label,strokeWidth:e.value})}onButtonPress({event:e,button:t,buttonWidget:i}){const o=this.getActiveDatum();if(o)switch(this.hideOverlays(),t.value){case"line-style-type":{const r=hasLineStyle(o)?getLineStyle(o.lineDash,o.lineStyle):void 0;this.lineStyleTypeMenu.show(i,{items:LINE_STYLE_TYPE_ITEMS,ariaLabel:this.ctx.localeManager.t("toolbarAnnotationsLineStyle"),value:r,onPress:s=>this.onLineStyleTypeMenuPress(s,o),class:"ag-charts-annotations__line-style-type-menu"});break}case"line-stroke-width":{const r=hasLineStyle(o)?o.strokeWidth:void 0;this.lineStrokeWidthMenu.show(i,{items:LINE_STROKE_WIDTH_ITEMS,ariaLabel:this.ctx.localeManager.t("toolbarAnnotationsLineStrokeWidth"),value:r,onPress:s=>this.onLineStrokeWidthMenuPress(s,o),class:"ag-charts-annotations__line-stroke-width-menu"});break}case"line-color":case"fill-color":case"text-color":{this.toolbar.toggleActiveButtonByIndex(t.index),this.colorPicker.show({color:o?.getDefaultColor(t.value),opacity:o?.getDefaultOpacity(t.value),sourceEvent:e.sourceEvent,hasMultiColorOption:"isMultiColor"in o,isMultiColor:"isMultiColor"in o&&o?.isMultiColor,onChange:o==null?void 0:this.onColorPickerChange.bind(this,t.value,o),onChangeHide:(r=>{this.events.emit("saved-color",{type:o.type,colorPickerType:t.value,color:o.getDefaultColor(r)})}).bind(this,t.value)});break}case"text-size":{const r=isTextType(o)?o.fontSize:void 0;this.textSizeMenu.show(i,{items:TEXT_SIZE_ITEMS,ariaLabel:this.ctx.localeManager.t("toolbarAnnotationsTextSize"),value:r,onPress:s=>this.onTextSizeMenuPress(s,o),class:"ag-charts-annotations__text-size-menu"});break}case"delete":{this.events.emit("pressed-delete",null);break}case"lock":{o.locked=!o.locked,this.refreshButtons(o),this.events.emit("pressed-lock",{locked:o.locked});break}case"settings":{this.toolbar.toggleActiveButtonByIndex(t.index),this.events.emit("pressed-settings",e);break}}}onToolbarMoved(e){const{buttonBounds:t,popoverBounds:i}=e,o={x:i.x,y:i.y+i.height+4},r={y:i.y-4};this.colorPicker.setAnchor(o,r);for(const[s,a]of t.entries()){const n=this.visibleButtons.at(s);if(!n)continue;const l={x:a.x,y:a.y+a.height-1},c={y:a.y};switch(n.value){case"line-stroke-width":this.lineStrokeWidthMenu.setAnchor(l,c);break;case"line-style-type":this.lineStyleTypeMenu.setAnchor(l,c);break;case"text-size":this.textSizeMenu.setAnchor(l,c);break}}}onColorPickerChange(e,t,i,o,r,s){this.events.emit("updated-color",{type:t.type,colorPickerType:e,colorOpacity:i,color:o,opacity:r,isMultiColor:s}),this.updateColorPickerColor(e,i,r,s)}onTextSizeMenuPress(e,t){if(!hasFontSize(t))return;const i=e.value;this.events.emit("updated-font-size",{type:t.type,fontSize:i}),this.textSizeMenu.hide(),this.updateFontSize(i)}onLineStyleTypeMenuPress(e,t){if(!hasLineStyle(t))return;const i=e.value;this.events.emit("updated-line-style",{type:t.type,lineStyleType:i}),this.lineStyleTypeMenu.hide(),this.updateLineStyleType(e)}onLineStrokeWidthMenuPress(e,t){if(!hasLineStyle(t))return;const i=e.value;this.events.emit("updated-line-width",{type:t.type,strokeWidth:i}),this.lineStrokeWidthMenu.hide(),this.updateStrokeWidth(e)}refreshButtons(e){const t=e.locked??!1;for(const[i,o]of this.visibleButtons.entries())o&&(o.value==="lock"?(this.toolbar.toggleSwitchCheckedByIndex(i,t),this.updateButtonByIndex(i,t?o.checkedOverrides.toJson():o.toJson())):this.toolbar.toggleButtonEnabledByIndex(i,!t));hasFontSize(e)&&this.updateFontSize(e.fontSize),this.updateColors(e),this.updateLineStyles(e)}updateLineStyles(e){if(!hasLineStyle(e))return;const t=e.strokeWidth??1,i=getLineStyle(e.lineDash,e.lineStyle);this.updateStrokeWidth({strokeWidth:t,value:t,label:String(t)}),this.updateLineStyleType(LINE_STYLE_TYPE_ITEMS.find(o=>o.value===i)??LINE_STYLE_TYPE_ITEMS[0])}updateButtonByValue(e,t){const i=this.visibleButtons.findIndex(o=>o.value===e);i!==-1&&this.updateButtonByIndex(i,t)}updateButtonByIndex(e,t){const i=this.visibleButtons.at(e);i&&this.toolbar.updateButtonByIndex(e,{...i.toJson(),...t,value:t.value??i.value})}};__decorateClass([import_ag_charts_core46.Property],AnnotationOptionsToolbar.prototype,"enabled",2),__decorateClass([import_ag_charts_core46.Property],AnnotationOptionsToolbar.prototype,"buttons",2);var import_ag_charts_core47=require("ag-charts-core"),DragStateMachine=class extends import_ag_charts_core47.StateMachine{constructor(e){const t=({context:i})=>{this.node?.drag(this.datum,this.offset,i,this.snapping),e.update()};super("idle",{idle:{dragStart:{target:"dragging",action:({offset:i,context:o})=>{this.hasMoved=!1,this.dragStart=i,this.offset=i,this.node?.dragStart(this.datum,i,o)}}},dragging:{keyDown:t,keyUp:t,drag:({offset:i,context:o})=>{this.hasMoved=import_ag_charts_core47.Vec2.lengthSquared(import_ag_charts_core47.Vec2.sub(i,this.dragStart))>0,this.offset=i,this.node?.drag(this.datum,i,o,this.snapping),e.update()},dragEnd:{target:import_ag_charts_core47.StateMachine.parent,action:()=>{this.node?.stopDragging(),this.hasMoved&&e.recordAction("Move annotation"),e.update()}}}}),this.debug=import_ag_charts_core47.Debug.create(!0,"annotations"),this.hasMoved=!1,this.snapping=!1}};__decorateClass([(0,import_ag_charts_core47.StateMachineProperty)()],DragStateMachine.prototype,"snapping",2),__decorateClass([(0,import_ag_charts_core47.StateMachineProperty)()],DragStateMachine.prototype,"datum",2),__decorateClass([(0,import_ag_charts_core47.StateMachineProperty)()],DragStateMachine.prototype,"node",2);var import_ag_charts_core48=require("ag-charts-core"),ArrowDownProperties=class extends ShapePointProperties{constructor(){super(...arguments),this.type="arrow-down"}static is(e){return(0,import_ag_charts_core48.isObject)(e)&&e.type==="arrow-down"}};__decorateClass([import_ag_charts_core48.Property],ArrowDownProperties.prototype,"type",2);var import_ag_charts_community41=require("ag-charts-community"),import_ag_charts_community40=require("ag-charts-community"),import_ag_charts_community38=require("ag-charts-community"),import_ag_charts_core49=require("ag-charts-core"),import_ag_charts_community37=require("ag-charts-community"),import_ag_charts_community36=require("ag-charts-community"),AnnotationShape=class extends import_ag_charts_community36._ModuleSupport.Marker{isPointInPath(e,t){return this.updatePathIfDirty(),this.path.closedPath&&this.path.isPointInPath(e,t)}},_Handle=class Me extends import_ag_charts_community37._ModuleSupport.Group{constructor(){super(...arguments),this.active=!1,this.locked=!1,this.visible=!1,this.zIndex=1}drag(t){const{handle:i,locked:o}=this;return o?{point:{x:i.x,y:i.y},offset:{x:0,y:0}}:{point:t,offset:{x:t.x-i.x,y:t.y-i.y}}}toggleActive(t){this.active=t,t||(this.handle.strokeWidth=Me.INACTIVE_STROKE_WIDTH)}toggleHovered(t){this.glow.visible=!this.locked&&t,this.glow.dirtyPath=!0}toggleDragging(t){this.locked||(this.handle.visible=!t,this.glow.visible=this.glow.visible&&!t,this.handle.dirtyPath=!0,this.glow.dirtyPath=!0)}toggleLocked(t){this.locked=t}getCursor(){}containsPoint(t,i){return this.handle.containsPoint(t,i)}};_Handle.INACTIVE_STROKE_WIDTH=2;var Handle2=_Handle,_InvariantHandle=class ke extends Handle2{constructor(){super(),this.handle=new AnnotationShape({shape:"circle"}),this.glow=new AnnotationShape({shape:"circle"}),this.append([this.handle]),this.handle.size=ke.HANDLE_SIZE,this.handle.strokeWidth=Handle2.INACTIVE_STROKE_WIDTH,this.handle.zIndex=2}update(t){this.handle.setProperties({...t,strokeWidth:Handle2.INACTIVE_STROKE_WIDTH})}drag(t){return{point:t,offset:{x:0,y:0}}}};_InvariantHandle.HANDLE_SIZE=7,_InvariantHandle.GLOW_SIZE=9;var InvariantHandle=_InvariantHandle,_UnivariantHandle=class ne extends Handle2{constructor(){super(),this.handle=new import_ag_charts_community37._ModuleSupport.Rect,this.glow=new import_ag_charts_community37._ModuleSupport.Rect,this.gradient="horizontal",this.append([this.glow,this.handle]),this.handle.cornerRadius=ne.CORNER_RADIUS,this.handle.width=ne.HANDLE_SIZE,this.handle.height=ne.HANDLE_SIZE,this.handle.strokeWidth=Handle2.INACTIVE_STROKE_WIDTH,this.handle.zIndex=2,this.glow.cornerRadius=ne.CORNER_RADIUS,this.glow.width=ne.GLOW_SIZE,this.glow.height=ne.GLOW_SIZE,this.glow.strokeWidth=0,this.glow.fillOpacity=.2,this.glow.zIndex=1,this.glow.visible=!1}toggleLocked(t){if(super.toggleLocked(t),t){const i=(ne.HANDLE_SIZE-InvariantHandle.HANDLE_SIZE)/2;this.handle.cornerRadius=1,this.handle.fill=this.handle.stroke,this.handle.strokeWidth=0,this.handle.x+=i,this.handle.y+=i,this.handle.width=InvariantHandle.HANDLE_SIZE,this.handle.height=InvariantHandle.HANDLE_SIZE,this.glow.width=InvariantHandle.GLOW_SIZE,this.glow.height=InvariantHandle.GLOW_SIZE}else this.handle.cornerRadius=ne.CORNER_RADIUS,this.handle.width=ne.HANDLE_SIZE,this.handle.height=ne.HANDLE_SIZE,this.glow.width=ne.GLOW_SIZE,this.glow.height=ne.GLOW_SIZE,this.cachedStyles&&this.handle.setProperties(this.cachedStyles)}update(t){if(this.cachedStyles={...t},this.active||delete t.strokeWidth,this.locked){delete t.fill,delete t.strokeWidth;const i=(ne.HANDLE_SIZE-InvariantHandle.HANDLE_SIZE)/2;t.x-=i,t.y-=i,this.cachedStyles.x-=i,this.cachedStyles.y-=i}this.handle.setProperties(t),this.glow.setProperties({...t,x:(t.x??this.glow.x)-2,y:(t.y??this.glow.y)-2,strokeWidth:0,fill:t.stroke})}drag(t){return this.locked?{point:t,offset:{x:0,y:0}}:this.gradient==="vertical"?{point:{x:t.x,y:this.handle.y},offset:{x:t.x-this.handle.x,y:0}}:{point:{x:this.handle.x,y:t.y},offset:{x:0,y:t.y-this.handle.y}}}getCursor(){if(!this.locked)return this.gradient==="vertical"?"col-resize":"row-resize"}};_UnivariantHandle.HANDLE_SIZE=12,_UnivariantHandle.GLOW_SIZE=16,_UnivariantHandle.CORNER_RADIUS=4;var UnivariantHandle=_UnivariantHandle,_DivariantHandle=class ge extends Handle2{constructor(){super(),this.handle=new AnnotationShape({shape:"circle"}),this.glow=new AnnotationShape({shape:"circle"}),this.append([this.glow,this.handle]),this.handle.size=ge.HANDLE_SIZE,this.handle.strokeWidth=Handle2.INACTIVE_STROKE_WIDTH,this.handle.zIndex=2,this.glow.size=ge.GLOW_SIZE,this.glow.strokeWidth=0,this.glow.fillOpacity=.2,this.glow.zIndex=1,this.glow.visible=!1}toggleLocked(t){super.toggleLocked(t),t?(this.handle.fill=this.handle.stroke,this.handle.strokeWidth=0,this.handle.size=InvariantHandle.HANDLE_SIZE,this.glow.size=InvariantHandle.GLOW_SIZE):(this.handle.size=ge.HANDLE_SIZE,this.glow.size=ge.GLOW_SIZE,this.cachedStyles&&this.handle.setProperties(this.cachedStyles))}update(t){this.cachedStyles={...t},this.active||delete t.strokeWidth,this.locked&&(delete t.fill,delete t.strokeWidth),this.handle.setProperties(t),this.glow.setProperties({...t,strokeWidth:0,fill:t.stroke})}getCursor(){return"pointer"}};_DivariantHandle.HANDLE_SIZE=11,_DivariantHandle.GLOW_SIZE=17;var DivariantHandle=_DivariantHandle,AnnotationScene=class extends import_ag_charts_community38._ModuleSupport.Group{constructor(){super(...arguments),this.name="AnnotationScene",this.zIndex=import_ag_charts_core49.ZIndexMap.CHART_ANNOTATION}static isCheck(e,t){return(0,import_ag_charts_core49.isObject)(e)&&Object.hasOwn(e,"type")&&e.type===t}toggleHovered(e,t,i){i!==!0&&this.toggleHandles(e||t)}computeBBoxWithoutHandles(){return import_ag_charts_community38._ModuleSupport.Transformable.toCanvas(this,import_ag_charts_community38._ModuleSupport.Group.computeChildrenBBox(this.excludeChildren({instance:Handle2})))}updateNode(e,t,i){if(!i&&t){t.remove();return}return i&&t==null&&(t=new e,this.appendChild(t)),t}},import_ag_charts_core51=require("ag-charts-core"),import_ag_charts_community39=require("ag-charts-community"),import_ag_charts_core50=require("ag-charts-core"),{ContinuousScale:ContinuousScale2}=import_ag_charts_community39._ModuleSupport;function snapPoint(e,t,i=!1,o,r=1){if(!i)return invertCoords(e,t);const s=o?convertPoint(o,t):import_ag_charts_core50.Vec2.origin();return invertCoords(snapToAngle(e,s,r),t)}function snapToAngle(e,t,i){const o=import_ag_charts_core50.Vec2.sub(e,t),r=(0,import_ag_charts_core50.toRadians)(i),s=Math.round(import_ag_charts_core50.Vec2.angle(o)/r)*r;return import_ag_charts_core50.Vec2.rotate(o,s,t)}function getDragStartState(e,t){const i={};for(const[o,r]of(0,import_ag_charts_core50.entries)(e))i[o]=convertPoint(r,t);return i}function translate(e,t,i,o={overflowContinuous:0,translateVectors:void 0,invertYVectors:void 0,snap:void 0}){const{xAxis:r,yAxis:s}=i,a=Object.keys(e),n=[],l=[],c=new Set(o.translateVectors??a),h=new Set(o.invertYVectors??[]),u=new Set([...c,...h]),d=import_ag_charts_core50.Vec2.multiply(t,import_ag_charts_core50.Vec2.from(1,-1));for(const f of a)u.has(f)&&(e[f]=import_ag_charts_core50.Vec2.add(e[f],h.has(f)?d:t),o.snap&&(e[f]=snapToAngle(e[f],o.snap.vectors[f],o.snap.angle))),n.push(r.getRangeOverflow(e[f].x)),l.push(s.getRangeOverflow(e[f].y));const p=(f,S)=>Math.abs(f)-Math.abs(S),g=(f,S,m)=>o.overflowContinuous===0||!ContinuousScale2.is(f)?m.toSorted(p).at(-1)??0:a.length===u.size?m.toSorted(p).at(-o.overflowContinuous-1)??0:m.filter(b=>b!==0).length<=o.overflowContinuous?0:m.filter((b,D)=>b!==0&&Math.abs(b)<=Math.abs(S)&&u.has(a[D])).toSorted(p).at(-1)??0,y=import_ag_charts_core50.Vec2.from(g(r.scale,t.x,n),g(s.scale,t.y,l));if(!import_ag_charts_core50.Vec2.equal(y,import_ag_charts_core50.Vec2.origin()))for(const f of a)u.has(f)&&(e[f]=import_ag_charts_core50.Vec2.round(import_ag_charts_core50.Vec2.sub(e[f],y),4));const x={};for(const f of a)x[f]=invertCoords(e[f],i);return x}var PointScene=class extends AnnotationScene{constructor(){super(...arguments),this.handle=new DivariantHandle,this.anchor={x:0,y:0,position:"above"}}update(e,t){const i=convertPoint(e,t);this.updateHandle(e,i),this.anchor=this.updateAnchor(e,i,t)}dragStart(e,t,i){this.dragState={offset:t,...getDragStartState({handle:e},i)}}drag(e,t,i){const{dragState:o}=this;if(!e.isWriteable()||!o)return;const{point:r}=translate({point:o.handle},import_ag_charts_core51.Vec2.sub(t,o.offset),i);e.x=r.x,e.y=r.y}translate(e,t,i){if(!e.isWriteable())return;const{point:o}=translate({point:convertPoint(e,i)},t,i);e.x=o.x,e.y=o.y}toggleHandles(e){this.handle.visible=!!e,this.handle.toggleHovered(this.activeHandle==="handle")}toggleActive(e){this.toggleHandles(e),this.handle.toggleActive(e)}stopDragging(){this.handle.toggleDragging(!1)}copy(e,t,i){const o=convertPoint(e,i),r=invertCoords({x:o.x-30,y:o.y-30},i);return t.x=r.x,t.y=r.y,t}getAnchor(){return this.anchor}getCursor(){return"pointer"}containsPoint(e,t){const{handle:i}=this;return this.activeHandle=void 0,i.containsPoint(e,t)?(this.activeHandle="handle",!0):!1}getNodeAtCoords(e,t){if(this.handle.containsPoint(e,t))return"handle"}updateHandle(e,t,i){const{x:o,y:r}=this.getHandleCoords(e,t,i),s=this.getHandleStyles(e);this.handle.update({...s,x:o,y:r}),this.handle.toggleLocked(e.locked??!1)}updateAnchor(e,t,i){const o=this.getHandleCoords(e,t);return{x:o.x+i.seriesRect.x,y:o.y+i.seriesRect.y,position:this.anchor.position}}getHandleCoords(e,t,i){return{x:t.x,y:t.y}}getHandleStyles(e){return{fill:e.handle.fill,stroke:e.handle.stroke,strokeOpacity:e.handle.strokeOpacity,strokeWidth:e.handle.strokeWidth}}},ShapePointScene=class extends PointScene{constructor(){super(),this.append([this.handle])}update(e,t){super.update(e,t);const i=convertPoint(e,t);this.updateShape(e,i)}updateShape(e,t){this.updateShapeStyles(e),this.updateShapePath(e,t)}updateShapeStyles(e){const{shape:t}=this;t.fill=e.fill,t.fillOpacity=e.fillOpacity??1}updateShapePath(e,t){const{shape:i}=this;i.x=t.x,i.y=t.y,i.size=e.size}containsPoint(e,t){return super.containsPoint(e,t)||this.shape.containsPoint(e,t)}getNodeAtCoords(e,t){return this.shape.containsPoint(e,t)?"shape":super.getNodeAtCoords(e,t)}},arrowUpPoints=[[.5,0],[1,.5],[.75,.5],[.75,1],[.25,1],[.25,.5],[0,.5]];function arrowUp(e){import_ag_charts_community40._ModuleSupport.drawMarkerUnitPolygon(e,arrowUpPoints)}arrowUp.anchor={x:.5,y:0};var ArrowUpScene=class extends ShapePointScene{constructor(){super(),this.type="arrow-up",this.shape=new AnnotationShape({shape:arrowUp}),this.append([this.shape])}static is(e){return AnnotationScene.isCheck(e,"arrow-up")}getHandleCoords(e,t){const i=DivariantHandle.HANDLE_SIZE/2,o=super.getHandleCoords(e,t);return o.y-=i,o}},arrowDownPoints=arrowUpPoints.map(([e,t])=>[e,1-t]);function arrowDown(e){import_ag_charts_community41._ModuleSupport.drawMarkerUnitPolygon(e,arrowDownPoints)}arrowDown.anchor={x:.5,y:1};var ArrowDownScene=class extends ShapePointScene{constructor(){super(),this.type="arrow-down",this.shape=new AnnotationShape({shape:arrowDown}),this.append([this.shape])}static is(e){return AnnotationScene.isCheck(e,"arrow-down")}updateAnchor(e,t,i){const o=super.updateAnchor(e,t,i);return o.y-=e.size,o}getHandleCoords(e,t){const i=DivariantHandle.HANDLE_SIZE/2,o=super.getHandleCoords(e,t);return o.y+=i,o}},import_ag_charts_core52=require("ag-charts-core"),PointStateMachine=class extends import_ag_charts_core52.StateMachine{constructor(e){const t=({point:o})=>{const r=this.createDatum();r.set({x:o.x,y:o.y}),e.create(r)},i=()=>{this.node?.toggleActive(!0),e.showAnnotationOptions(),e.update()};super("start",{start:{click:{target:"waiting-first-render",action:t},drag:{target:"waiting-first-render",action:t},cancel:import_ag_charts_core52.StateMachine.parent,reset:import_ag_charts_core52.StateMachine.parent},"waiting-first-render":{render:{target:import_ag_charts_core52.StateMachine.parent,action:i}}}),this.debug=import_ag_charts_core52.Debug.create(!0,"annotations")}};__decorateClass([(0,import_ag_charts_core52.StateMachineProperty)()],PointStateMachine.prototype,"node",2);var ArrowDownStateMachine=class extends PointStateMachine{createDatum(){return new ArrowDownProperties}},arrowDownConfig={type:"arrow-down",datum:ArrowDownProperties,scene:ArrowDownScene,isDatum:ArrowDownProperties.is,translate:(e,t,i,o)=>{ArrowDownProperties.is(t)&&ArrowDownScene.is(e)&&e.translate(t,i,o)},copy:(e,t,i,o)=>{if(ArrowDownProperties.is(t)&&ArrowDownProperties.is(i)&&ArrowDownScene.is(e))return e.copy(t,i,o)},update:(e,t,i)=>{ArrowDownProperties.is(t)&&ArrowDownScene.is(e)&&e.update(t,i)},createState:(e,{createDatum:t})=>new ArrowDownStateMachine({...e,create:t("arrow-down")}),dragState:e=>new DragStateMachine(e)},import_ag_charts_core53=require("ag-charts-core"),ArrowUpProperties=class extends ShapePointProperties{constructor(){super(...arguments),this.type="arrow-up"}static is(e){return(0,import_ag_charts_core53.isObject)(e)&&e.type==="arrow-up"}};__decorateClass([import_ag_charts_core53.Property],ArrowUpProperties.prototype,"type",2);var ArrowUpStateMachine=class extends PointStateMachine{createDatum(){return new ArrowUpProperties}},arrowUpConfig={type:"arrow-up",datum:ArrowUpProperties,scene:ArrowUpScene,isDatum:ArrowUpProperties.is,translate:(e,t,i,o)=>{ArrowUpProperties.is(t)&&ArrowUpScene.is(e)&&e.translate(t,i,o)},copy:(e,t,i,o)=>{if(ArrowUpProperties.is(t)&&ArrowUpProperties.is(i)&&ArrowUpScene.is(e))return e.copy(t,i,o)},update:(e,t,i)=>{ArrowUpProperties.is(t)&&ArrowUpScene.is(e)&&e.update(t,i)},createState:(e,{createDatum:t})=>new ArrowUpStateMachine({...e,create:t("arrow-up")}),dragState:e=>new DragStateMachine(e)},import_ag_charts_community43=require("ag-charts-community"),import_ag_charts_community42=require("ag-charts-community"),import_ag_charts_core56=require("ag-charts-core"),import_ag_charts_core55=require("ag-charts-core"),import_ag_charts_core54=require("ag-charts-core"),LinearScene=class extends AnnotationScene{constructor(){super(...arguments),this.overflowContinuous=0}extendLine({x1:e,y1:t,x2:i,y2:o},r,s){const a={x1:e,y1:t,x2:i,y2:o};if(!r.extendStart&&!r.extendEnd)return a;const[n,l]=boundsIntersections(a,s.yAxis.bounds),c=a.x2<a.x1,h=a.y1>=a.y2,u=a.x2===a.x1;return r.extendEnd&&(u?a.y2=h?l.y:n.y:(a.x2=c?n.x:l.x,a.y2=c?n.y:l.y)),r.extendStart&&(u?a.y1=h?n.y:l.y:(a.x1=c?l.x:n.x,a.y1=c?l.y:n.y)),a}dragStart(e,t,i){this.dragState={offset:t,...getDragStartState({start:e.start,end:e.end},i)}}drag(e,t,i,o){e.isWriteable()&&(this.activeHandle?this.dragHandle(e,t,i,o):this.dragAll(e,t,i))}dragAll(e,t,i){const{dragState:o}=this;o&&this.translatePoints(e,o.start,o.end,import_ag_charts_core54.Vec2.sub(t,o.offset),i)}translate(e,t,i){e.isWriteable()&&this.translatePoints(e,convertPoint(e.start,i),convertPoint(e.end,i),t,i)}copy(e,t,i){const o=convertLine(e,i);if(!o)return;const r=this.computeBBoxWithoutHandles(),s={x:-r.width/2,y:-r.height/2};return this.translatePoints(t,import_ag_charts_core54.Vec4.start(o),import_ag_charts_core54.Vec4.end(o),s,i),t}translatePoints(e,t,i,o,r){const s=this.getTranslatePointsVectors(t,i),a=translate(s,o,r,{overflowContinuous:this.overflowContinuous});e.start.x=a.start.x,e.end.x=a.end.x,e.start.y=a.start.y,e.end.y=a.end.y}getTranslatePointsVectors(e,t){return{start:e,end:t}}},StartEndScene=class extends LinearScene{constructor(){super(...arguments),this.start=new DivariantHandle,this.end=new DivariantHandle,this.anchor={x:0,y:0,position:"above"}}update(e,t){const i=convertLine(e,t);i!=null&&(this.updateHandles(e,i),this.updateAnchor(e,i,t))}toggleHandles(e){if(typeof e=="boolean")this.start.visible=e,this.end.visible=e;else for(const[t,i]of(0,import_ag_charts_core55.entries)(e))this[t].visible=i;this.start.toggleHovered(this.activeHandle==="start"),this.end.toggleHovered(this.activeHandle==="end")}toggleActive(e){this.toggleHandles(e),this.start.toggleActive(e),this.end.toggleActive(e)}dragHandle(e,t,i,o){const{activeHandle:r,dragState:s}=this;if(!r||!s)return;this[r].toggleDragging(!0);const a=r==="start"?"end":"start",n=o?{vectors:{[r]:convertPoint(e[a],i)},angle:e.snapToAngle}:void 0,{[r]:l}=translate({[r]:s[r]},import_ag_charts_core55.Vec2.sub(t,s.offset),i,{overflowContinuous:0,snap:n});e[r].x=l.x,e[r].y=l.y}stopDragging(){this.start.toggleDragging(!1),this.end.toggleDragging(!1)}getAnchor(){return this.anchor}getCursor(){return"pointer"}containsPoint(e,t){const{start:i,end:o}=this;return this.activeHandle=void 0,i.containsPoint(e,t)?(this.activeHandle="start",!0):o.containsPoint(e,t)?(this.activeHandle="end",!0):!1}getNodeAtCoords(e,t){if(this.start.containsPoint(e,t)||this.end.containsPoint(e,t))return"handle"}updateHandles(e,t,i){this.start.update({...this.getHandleStyles(e,"start"),...this.getHandleCoords(e,t,"start")}),this.end.update({...this.getHandleStyles(e,"end"),...this.getHandleCoords(e,t,"end",i)}),this.start.toggleLocked(e.locked??!1),this.end.toggleLocked(e.locked??!1)}updateAnchor(e,t,i,o){this.anchor={x:t.x1+i.seriesRect.x,y:t.y1+i.seriesRect.y,position:this.anchor.position}}getHandleCoords(e,t,i,o){return i==="start"?import_ag_charts_core55.Vec4.start(t):import_ag_charts_core55.Vec4.end(t)}getHandleStyles(e,t){return{fill:e.handle.fill,stroke:e.handle.stroke,strokeOpacity:e.handle.strokeOpacity,strokeWidth:e.handle.strokeWidth}}},TextualStartEndScene=class extends StartEndScene{constructor(){super(...arguments),this.label=new import_ag_charts_community42._ModuleSupport.Text({zIndex:1}),this.anchor={x:0,y:0,position:"above-left"}}setTextInputBBox(e){this.textInputBBox=e,this.markDirty("TextualStartEndScene")}update(e,t){const i=convertLine(e,t);if(i==null)return;const o=this.getTextBBox(e,i);this.updateLabel(e,o,i),this.updateHandles(e,i,o),this.updateShape(e,o,i),this.updateAnchor(e,i,t,o)}containsPoint(e,t){return super.containsPoint(e,t)||this.label.containsPoint(e,t)}getNodeAtCoords(e,t){return this.label.containsPoint(e,t)?"text":super.getNodeAtCoords(e,t)}getTextBBox(e,t){const{text:i}=e.getText();return getBBox(e,i,import_ag_charts_core56.Vec4.end(t),this.textInputBBox)}updateLabel(e,t,i){const{text:o,isPlaceholder:r}=e.getText();updateTextNode(this.label,o,r,e,this.getLabelCoords(e,t,i))}updateShape(e,t,i){}getLabelCoords(e,t,i){return import_ag_charts_core56.Vec4.end(i)}getHandleStyles(e,t){return{...super.getHandleStyles(e,t),stroke:e.handle.stroke??e.color}}},{drawCorner,Path:Path5}=import_ag_charts_community43._ModuleSupport,CalloutScene=class extends TextualStartEndScene{constructor(){super(),this.type="callout",this.shape=new Path5,this.append([this.shape,this.label,this.start,this.end])}static is(e){return AnnotationScene.isCheck(e,"callout")}drag(e,t,i,o){e.isWriteable()&&(this.activeHandle==="end"?this.dragHandle(e,t,i,o):this.dragAll(e,t,i))}getLabelCoords(e,t,i){const o=e.getPadding(),{bodyBounds:r={x:0,y:0,width:0,height:0}}=this.getDimensions(e,t,i)??{};return{x:r.x+o.left,y:r.y-o.bottom}}getHandleStyles(e,t){return t==="start"?{fill:e.handle.fill,stroke:e.handle.stroke??e.stroke,strokeOpacity:e.handle.strokeOpacity,strokeWidth:e.handle.strokeWidth}:{fill:void 0,strokeWidth:0}}updateAnchor(e,t,i,o){const{bodyBounds:r}=this.getDimensions(e,o,t)??{},s=r??o;this.anchor={x:s.x+i.seriesRect.x,y:s.y+i.seriesRect.y-s.height,position:this.anchor.position}}updateShape(e,t,i){const{shape:o}=this;o.fill=e.fill,o.fillOpacity=e.fillOpacity??1,o.stroke=e.stroke,o.strokeWidth=e.strokeWidth??1,o.strokeOpacity=e.strokeOpacity??1;const{tailPoint:r,bodyBounds:s}=this.getDimensions(e,t,i)??{};!r||!s||this.updatePath(r,s)}updatePath(e,t){const{x:i,y:o}=e,{x:r,y:s,width:a,height:n}=t,l=s-n,c=r+a,h=this.calculateCalloutPlacement({x:i,y:o},t),u=8,d=[{coordinates:{x0:r,x1:r+u,y0:l+u,y1:l,cx:h==="topLeft"?i:r+u,cy:h==="topLeft"?o:l+u},type:h==="topLeft"?"calloutCorner":"corner"},{coordinates:{x0:r+u,x1:c-u,y0:l,y1:l,cx:i,cy:o},type:h==="top"?"calloutSide":"side"},{coordinates:{x0:c-u,x1:c,y0:l,y1:l+u,cx:h==="topRight"?i:c-u,cy:h==="topRight"?o:l+u},type:h==="topRight"?"calloutCorner":"corner"},{coordinates:{x0:c,x1:c,y0:l+u,y1:s-u,cx:i,cy:o},type:h==="right"?"calloutSide":"side"},{coordinates:{x0:c,x1:c-u,y0:s-u,y1:s,cx:h==="bottomRight"?i:c-u,cy:h==="bottomRight"?o:s-u},type:h==="bottomRight"?"calloutCorner":"corner"},{coordinates:{x0:c-u,x1:r+u,y0:s,y1:s,cx:i,cy:o},type:h==="bottom"?"calloutSide":"side"},{coordinates:{x0:r+u,x1:r,y0:s,y1:s-u,cx:h==="bottomLeft"?i:r+u,cy:h==="bottomLeft"?o:s-u},type:h==="bottomLeft"?"calloutCorner":"corner"},{coordinates:{x0:r,x1:r,y0:s-u,y1:l+u,cx:i,cy:o},type:h==="left"?"calloutSide":"side"}],{path:p}=this.shape;p.clear(),p.moveTo(r,l+u);for(const{coordinates:g,type:y}of d)this.drawPath(p,g,u,y);p.closePath()}drawPath(e,{x0:t,y0:i,x1:o,y1:r,cx:s,cy:a},n,l){switch(l){case"calloutCorner":{e.lineTo(s,a),e.lineTo(o,r);break}case"corner":{drawCorner(e,{x0:t,x1:o,y0:i,y1:r,cx:s,cy:a},n,!1);break}case"calloutSide":{if(t===o){const h=i>r?-1:1,u=Math.min(i,r)+Math.abs(i-r)/2;e.lineTo(t,u-6*h),e.lineTo(s,a),e.lineTo(t,u+6*h),e.lineTo(o,r)}else{const h=t>o?-1:1,u=Math.min(t,o)+Math.abs(o-t)/2;e.lineTo(u-6*h,i),e.lineTo(s,a),e.lineTo(u+6*h,i),e.lineTo(o,r)}break}case"side":default:{e.lineTo(o,r);break}}}calculateCalloutPlacement(e,t){const i=t.x+t.width,o=t.y-t.height;let r,s;return e.x>i?r="right":e.x<t.x&&(r="left"),e.y>t.y?s="bottom":e.y<o&&(s="top"),r&&s?`${s}${r[0].toUpperCase()}${r.substring(1)}`:s??r}getDimensions(e,t,i){const{fontSize:o}=e,r=e.getPadding(),s=r.left+r.right,a=r.top+r.bottom,n=t.width+s,l=Math.max(t.height+a,o+a);return{tailPoint:{x:i.x1,y:i.y1},bodyBounds:{x:t.x,y:t.y,width:n,height:l}}}containsPoint(e,t){const{start:i,end:o,shape:r}=this;if(this.activeHandle=void 0,i.containsPoint(e,t))return this.activeHandle="start",!0;const s=o.containsPoint(e,t)||r.containsPoint(e,t);return s&&(this.activeHandle="end"),s}},import_ag_charts_community44=require("ag-charts-community"),import_ag_charts_core57=require("ag-charts-core");function guardCancelAndExit({key:e}){return e==="Escape"}function guardSaveAndExit({key:e,shiftKey:t}){return!t&&e==="Enter"}var TextualStartEndStateMachine=class extends import_ag_charts_core57.StateMachine{constructor(e){const t=({point:d})=>{const p=this.createDatum();p.set({start:d,end:d,visible:!0}),e.create(p)},i=()=>{const{node:d}=this;d?.toggleActive(!0),d?.toggleHandles({start:!0})},o=()=>{e.showTextInput(),this.datum&&(this.datum.visible=!1)},r=()=>{e.hideTextInput(),this.datum&&(this.datum.visible=!0),e.deselect()},s=d=>{this.node?.setTextInputBBox(d),e.update()},a=({point:d})=>{const{datum:p,node:g}=this;p?.set({end:d}),g?.toggleActive(!0),g?.toggleHandles({end:!1}),e.update()},n=()=>{e.showAnnotationOptions(),this.node?.toggleHandles({end:!0})},l=({colorPickerType:d,colorOpacity:p,color:g,opacity:y,isMultiColor:x})=>{const{datum:f}=this;f&&(d==="text-color"&&e.updateTextInputColor(g),setColor(f,d,p,g,y,x),e.update())},c=d=>{const{datum:p,node:g}=this;!p||!g||!isTextType(p)||(p.fontSize=d,e.updateTextInputFontSize(d),e.update())},h=()=>{e.delete()},u=({textInputValue:d,bbox:p})=>{const{datum:g}=this;if(p!=null&&d!=null&&d.length>0){if(!isTextType(g))return;const y=maybeWrapText(g,d,p.width);g?.set({text:y}),e.update(),e.recordAction(`Create ${g?.type} annotation`)}else e.delete()};super("start",{start:{click:{target:"waiting-first-render",action:t},dragStart:{target:"waiting-first-render",action:t},cancel:import_ag_charts_core57.StateMachine.parent,reset:import_ag_charts_core57.StateMachine.parent},"waiting-first-render":{render:{target:"end",action:i}},end:{hover:a,drag:a,click:{target:"edit",action:n},dragEnd:{target:"edit",action:n},reset:{target:import_ag_charts_core57.StateMachine.parent,action:h},cancel:{target:import_ag_charts_core57.StateMachine.parent,action:h}},edit:{onEnter:o,updateTextInputBBox:s,color:l,fontSize:c,textInput:[{guard:guardCancelAndExit,target:import_ag_charts_core57.StateMachine.parent,action:h},{guard:guardSaveAndExit,target:import_ag_charts_core57.StateMachine.parent,action:u}],click:{target:import_ag_charts_core57.StateMachine.parent,action:u},dragStart:{target:import_ag_charts_core57.StateMachine.parent,action:u},resize:{target:import_ag_charts_core57.StateMachine.parent,action:u},onExit:r,cancel:{target:import_ag_charts_core57.StateMachine.parent,action:h}}}),this.debug=import_ag_charts_core57.Debug.create(!0,"annotations")}};__decorateClass([(0,import_ag_charts_core57.StateMachineProperty)()],TextualStartEndStateMachine.prototype,"datum",2),__decorateClass([(0,import_ag_charts_core57.StateMachineProperty)()],TextualStartEndStateMachine.prototype,"node",2);var CalloutStateMachine=class extends TextualStartEndStateMachine{createDatum(){return new CalloutProperties}},calloutConfig={type:"callout",datum:CalloutProperties,scene:CalloutScene,isDatum:CalloutProperties.is,translate:(e,t,i,o)=>{if(CalloutProperties.is(t)&&CalloutScene.is(e))return e.translate(t,i,o)},copy:(e,t,i,o)=>{if(CalloutProperties.is(t)&&CalloutProperties.is(i)&&CalloutScene.is(e))return e.copy(t,i,o)},update:(e,t,i)=>{CalloutProperties.is(t)&&CalloutScene.is(e)&&e.update(t,i)},createState:(e,{createDatum:t})=>new CalloutStateMachine({...e,create:t("callout")}),dragState:e=>new DragStateMachine(e)},import_ag_charts_community46=require("ag-charts-community"),import_ag_charts_core58=require("ag-charts-core"),import_ag_charts_community45=require("ag-charts-community"),TextualPointScene=class extends PointScene{constructor(){super(...arguments),this.label=new import_ag_charts_community45._ModuleSupport.Text({zIndex:1}),this.anchor={x:0,y:0,position:"above-left"}}setTextInputBBox(e){this.textInputBBox=e,this.markDirty("TextualPointScene")}update(e,t){const i=convertPoint(e,t),o=this.getTextBBox(e,i,t);this.updateLabel(e,o),this.updateHandle(e,i,o),this.updateShape(e,o),this.anchor=this.updateAnchor(e,o,t)}copy(e,t,i){const o=convertPoint(e,i),r=this.getTextBBox(e,o,i),s=e.getPadding(),a=s.left+s.right,n=s.top+s.bottom,l=(r.width+a)/2,c=r.height+n,h=invertCoords({x:o.x-l,y:o.y-c},i);return t.x=h.x,t.y=h.y,t}containsPoint(e,t){const{label:i}=this;return super.containsPoint(e,t)||i.visible&&i.containsPoint(e,t)}getNodeAtCoords(e,t){return this.label.visible&&this.label.containsPoint(e,t)?"text":super.getNodeAtCoords(e,t)}getTextBBox(e,t,i){const{text:o}=e.getText();return getBBox(e,o,{x:t.x,y:t.y},this.textInputBBox)}updateLabel(e,t){const{text:i,isPlaceholder:o}=e.getText();updateTextNode(this.label,i,o,e,this.getLabelCoords(e,t),this.getTextBaseline(e))}updateShape(e,t){}updateAnchor(e,t,i){return{x:t.x+i.seriesRect.x,y:t.y+i.seriesRect.y-t.height,position:this.anchor.position}}getLabelCoords(e,t){return t}getTextBaseline(e){return e.position=="center"?"middle":e.position}getHandleCoords(e,t,i){return i}getHandleStyles(e){const t=super.getHandleStyles(e);return t.stroke=e.handle.stroke??e.color,t}},{drawCorner:drawCorner2}=import_ag_charts_community46._ModuleSupport,CommentScene=class extends TextualPointScene{constructor(){super(),this.type="comment",this.shape=new import_ag_charts_community46._ModuleSupport.Path,this.append([this.shape,this.label,this.handle])}static is(e){return AnnotationScene.isCheck(e,"comment")}updateShape(e,t){const{shape:i}=this;i.fill=e.fill,i.fillOpacity=e.fillOpacity??1,i.stroke=e.stroke??"transparent",i.strokeWidth=e.strokeWidth??1,i.strokeOpacity=e.strokeOpacity??1,this.updatePath(e,t)}getLabelCoords(e,t){const i=e.getPadding();return{x:t.x+i.left,y:t.y-i.bottom}}getHandleStyles(e){return{fill:e.handle.fill,stroke:e.handle.stroke??e.stroke??e.fill,strokeOpacity:e.handle.strokeOpacity,strokeWidth:e.handle.strokeWidth}}updateAnchor(e,t,i){const o=super.updateAnchor(e,t,i),r=e.getPadding();return o.y-=r.bottom+r.top,o}updatePath(e,t){const i=e.getPadding(),{x:o,y:r}=t;let{width:s,height:a}=t;const{fontSize:n}=e,l=i.left+i.right,c=i.top+i.bottom;s=s+l,a=Math.max(a+c,n+c);const h=r-a,u=o+s,d=((0,import_ag_charts_core58.calcLineHeight)(n,ANNOTATION_TEXT_LINE_HEIGHT)+c)/2,{path:p}=this.shape;p.clear(),p.moveTo(o,r),p.lineTo(o,h+d),drawCorner2(p,{x0:o,x1:o+d,y0:h+d,y1:h,cx:o+d,cy:h+d},d,!1),p.lineTo(u-d,h),drawCorner2(p,{x0:u-d,x1:u,y0:h,y1:h+d,cx:u-d,cy:h+d},d,!1),p.lineTo(u,r-d),drawCorner2(p,{x0:u,x1:u-d,y0:r-d,y1:r,cx:u-d,cy:r-d},d,!1),p.closePath()}containsPoint(e,t){return super.containsPoint(e,t)||this.shape.containsPoint(e,t)}},import_ag_charts_community47=require("ag-charts-community"),import_ag_charts_core59=require("ag-charts-core"),TextualPointStateMachine=class extends import_ag_charts_core59.StateMachine{constructor(e){const t=({point:h})=>{const u=this.createDatum();u.set({x:h.x,y:h.y}),e.create(u)},i=()=>{this.node?.toggleActive(!0),e.showAnnotationOptions(),e.update()},o=()=>{e.showTextInput(),this.datum&&(this.datum.visible=!1)},r=()=>{e.hideTextInput(),this.datum&&(this.datum.visible=!0),e.deselect()},s=h=>{this.node?.setTextInputBBox(h),e.update()},a=({colorPickerType:h,colorOpacity:u,color:d,opacity:p,isMultiColor:g})=>{this.datum&&(h==="text-color"&&e.updateTextInputColor(d),setColor(this.datum,h,u,d,p,g),e.update())},n=h=>{const{datum:u,node:d}=this;!u||!d||!isTextType(u)||(u.fontSize=h,e.updateTextInputFontSize(h),e.update())},l=()=>{e.delete()},c=({textInputValue:h,bbox:u})=>{if(u!=null&&h!=null&&h.length>0){const{datum:d}=this;if(!isTextType(d))return;const p=maybeWrapText(d,h,u.width);d?.set({text:p}),e.update(),e.recordAction(`Create ${d?.type} annotation`)}else e.delete()};super("start",{start:{click:{target:"waiting-first-render",action:t},dragStart:{target:"waiting-first-render",action:t},cancel:import_ag_charts_core59.StateMachine.parent,reset:import_ag_charts_core59.StateMachine.parent},"waiting-first-render":{render:{target:"edit",action:i}},edit:{onEnter:o,updateTextInputBBox:s,color:a,fontSize:n,textInput:[{guard:guardCancelAndExit,target:import_ag_charts_core59.StateMachine.parent,action:l},{guard:guardSaveAndExit,target:import_ag_charts_core59.StateMachine.parent,action:c}],click:{target:import_ag_charts_core59.StateMachine.parent,action:c},dragStart:{target:import_ag_charts_core59.StateMachine.parent,action:c},resize:{target:import_ag_charts_core59.StateMachine.parent,action:c},onExit:r,cancel:{target:import_ag_charts_core59.StateMachine.parent,action:l}}}),this.debug=import_ag_charts_core59.Debug.create(!0,"annotations")}};__decorateClass([(0,import_ag_charts_core59.StateMachineProperty)()],TextualPointStateMachine.prototype,"datum",2),__decorateClass([(0,import_ag_charts_core59.StateMachineProperty)()],TextualPointStateMachine.prototype,"node",2);var CommentStateMachine=class extends TextualPointStateMachine{createDatum(){return new CommentProperties}},commentConfig={type:"comment",datum:CommentProperties,scene:CommentScene,isDatum:CommentProperties.is,translate:(e,t,i,o)=>{CommentProperties.is(t)&&CommentScene.is(e)&&e.translate(t,i,o)},copy:(e,t,i,o)=>{if(CommentProperties.is(t)&&CommentProperties.is(i)&&CommentScene.is(e))return e.copy(t,i,o)},update:(e,t,i)=>{CommentProperties.is(t)&&CommentScene.is(e)&&e.update(t,i)},createState:(e,{createDatum:t})=>new CommentStateMachine({...e,create:t("comment")}),dragState:e=>new DragStateMachine(e)},import_ag_charts_community51=require("ag-charts-community"),import_ag_charts_core62=require("ag-charts-core"),import_ag_charts_community48=require("ag-charts-community"),{calculateLabelTranslation}=import_ag_charts_community48._ModuleSupport,AxisLabelScene=class extends import_ag_charts_community48._ModuleSupport.Group{constructor(){super({name:"AnnotationAxisLabelGroup"}),this.label=new import_ag_charts_community48._ModuleSupport.Text({zIndex:1}),this.rect=new import_ag_charts_community48._ModuleSupport.Rect;const{label:e}=this;e.fontSize=12,e.fontFamily="Verdana, sans-serif",e.fill="black",e.textBaseline="middle",e.textAlign="center",this.append([this.rect,this.label])}update(e){this.updateLabel(e),this.updateRect(e),this.updatePosition(e)}updateLabel({value:e,styles:t,context:i}){const{fontWeight:o,fontSize:r,fontStyle:s,fontFamily:a,textAlign:n,color:l="white",formatter:c}=t,h=c?c({value:e}):i.formatScaleValue(e,"annotation-label");this.label.setProperties({fontWeight:o,fontSize:r,fontStyle:s,fontFamily:a,textAlign:n,fill:l,text:h})}updateRect({styles:e}){const{rect:t}=this,{cornerRadius:i,fill:o,fillOpacity:r,stroke:s,strokeOpacity:a}=e;t.fill=o,t.fillOpacity=r??1,t.stroke=s,t.strokeOpacity=a??1,t.cornerRadius=i??0}updatePosition({x:e,y:t,context:i,styles:{padding:o}}){const{label:r,rect:s}=this,a=r.getBBox()?.clone(),n=o??8,l=o??4,{xTranslation:c,yTranslation:h}=calculateLabelTranslation({yDirection:!0,padding:i.labelPadding,position:i.position??"left",bbox:a});a.grow(n,"horizontal"),a.grow(l,"vertical");const u=e+c,d=t+h;r.x=u,r.y=d,s.y=d-Math.round(a.height/2),s.x=u-Math.round(a.width/2),s.height=a.height,s.width=a.width}};AxisLabelScene.className="AxisLabel";var import_ag_charts_community49=require("ag-charts-community"),import_ag_charts_core60=require("ag-charts-core"),CollidableLine=class extends import_ag_charts_community49._ModuleSupport.Line{constructor(){super(...arguments),this.growCollisionBox=9,this.clipMask=new Map}setProperties(e){return super.setProperties(e),this.updateCollisionBBox(),this}updateCollisionBBox(){const{growCollisionBox:e,strokeWidth:t,x1:i,y1:o,x2:r,y2:s}=this;let a=t+e;a%2===0&&(a+=1);const n=import_ag_charts_core60.Vec2.from(i,o-Math.floor(a/2)),l=import_ag_charts_core60.Vec2.from(r,s),c=import_ag_charts_core60.Vec2.distance(n,l);this.collisionBBox=new import_ag_charts_community49._ModuleSupport.BBox(n.x,n.y,c,a)}isPointInPath(e,t){const{collisionBBox:i,x1:o,y1:r,x2:s,y2:a}=this;if(!i)return!1;const n=import_ag_charts_core60.Vec2.from(o,r),l=import_ag_charts_core60.Vec2.from(s,a),c=import_ag_charts_core60.Vec2.sub(import_ag_charts_core60.Vec2.from(e,t),n),h=import_ag_charts_core60.Vec2.sub(l,n),u=import_ag_charts_core60.Vec2.rotate(c,import_ag_charts_core60.Vec2.angle(c,h),n);return i.containsPoint(u.x,u.y)??!1}render(e){const{clipMask:t}=this,{ctx:i}=e;if(t.size===0){super.render(e);return}i.save();try{for(const o of this.clipMask.values()){const{x:r,y:s,radius:a}=o;i.beginPath(),i.rect(0,0,i.canvas.width,i.canvas.height),i.ellipse(r,s,a,a,0,Math.PI*2,0,!0),i.clip()}super.render(e)}finally{i.restore()}}setClipMask(e,t){const i=this.clipMask.get(e);(0,import_ag_charts_core60.jsonDiff)(i,t)!=null&&this.markDirty("CollidableLine"),t?this.clipMask.set(e,t):this.clipMask.delete(e)}},import_ag_charts_community50=require("ag-charts-community"),CollidableText=class extends import_ag_charts_community50._ModuleSupport.TransformableText{constructor(){super(...arguments),this.growCollisionBox={top:4,right:4,bottom:4,left:4}}isPointInPath(e,t){const i=this.fromParentPoint(e,t),o=this.computeBBoxWithoutTransforms();return o?o.grow(this.growCollisionBox).containsPoint(i.x,i.y):!1}},import_ag_charts_core61=require("ag-charts-core");function updateLineText(e,t,i,o,r,s,a){if(!s||!r||!o){t.setClipMask(e);return}const{alignment:n,position:l}=o,c=getNumbers(i,o.fontSize,a),{point:h,textBaseline:u}=positionAndAlignment(c,l,n);setProperties(r,s,o,h,c.angle,u);const{x:d,y:p,width:g,height:y}=r.getBBox(),x=import_ag_charts_core61.Vec2.length(import_ag_charts_core61.Vec2.from(g,y)),f={x:d+g/2,y:p+y/2,radius:x/2+import_ag_charts_core61.Vec2.length(c.offset)};return l==="center"?t.setClipMask(e,f):t.setClipMask(e),{clipMask:f,numbers:c}}function updateChannelText(e,t,i,o,r,s,a){if(!a||!s)return;const{alignment:n,position:l}=o,[c,h]=t.y1<=i.y1?[t,i]:[i,t];let u=c;l==="bottom"?u=h:l==="inside"&&(u={x1:(c.x1+h.x1)/2,y1:(c.y1+h.y1)/2,x2:(c.x2+h.x2)/2,y2:(c.y2+h.y2)/2});const d=getNumbers(u,o.fontSize,r),{point:p,textBaseline:g}=positionAndAlignment(d,l==="inside"?"center":l,n,e);setProperties(s,a,o,p,d.angle,g)}function getNumbers(e,t,i){let[o,r]=import_ag_charts_core61.Vec2.from(e);o.x>r.x&&([o,r]=[r,o]);const s=import_ag_charts_core61.Vec2.normalized(import_ag_charts_core61.Vec2.sub(r,o)),a=import_ag_charts_core61.Vec2.angle(s),n=import_ag_charts_core61.Vec2.multiply(s,DivariantHandle.HANDLE_SIZE/2+(t??14)/2),l=import_ag_charts_core61.Vec2.multiply(s,(i??2)/2+(t??14)/3);return{left:o,right:r,normal:s,angle:a,inset:n,offset:l}}function positionAndAlignment({left:e,right:t,normal:i,angle:o,inset:r,offset:s},a,n,l){let c;n==="right"?c=import_ag_charts_core61.Vec2.sub(t,r):n==="center"?c=import_ag_charts_core61.Vec2.add(e,import_ag_charts_core61.Vec2.multiply(i,import_ag_charts_core61.Vec2.distance(e,t)/2)):c=import_ag_charts_core61.Vec2.add(e,r);let h="bottom";return a==="bottom"?(c=import_ag_charts_core61.Vec2.rotate(s,o+Math.PI/2,c),h="top"):a==="center"&&!l?h="middle":c=import_ag_charts_core61.Vec2.rotate(s,o-Math.PI/2,c),{point:c,textBaseline:h}}function setProperties(e,t,i,o,r,s){e.setProperties({text:t,x:o.x,y:o.y,rotation:r,rotationCenterX:o.x,rotationCenterY:o.y,fill:i.color,fontFamily:i.fontFamily,fontSize:i.fontSize,fontStyle:i.fontStyle,fontWeight:i.fontWeight,textAlign:i.alignment,textBaseline:s})}var CrossLineScene=class extends AnnotationScene{constructor(){super(),this.type="cross-line",this.line=new CollidableLine,this.middle=new UnivariantHandle,this.isHorizontal=!1,this.append([this.line,this.middle])}static is(e){return AnnotationScene.isCheck(e,"cross-line")}update(e,t){const{seriesRect:i}=t;this.seriesRect=i,this.isHorizontal=HorizontalLineProperties.is(e);const o=this.isHorizontal?t.yAxis:t.xAxis,r=this.convertCrossLine(e,o);if(r==null){this.visible=!1;return}this.visible=e.visible??!0,this.visible&&(this.updateLine(e,r),this.updateHandle(e,r),this.updateText(e,r),this.updateAxisLabel(e,o,r))}updateLine(e,t){const{line:i}=this,{lineDashOffset:o,stroke:r,strokeWidth:s,strokeOpacity:a}=e,{x1:n,y1:l,x2:c,y2:h}=t;i.setProperties({x1:n,y1:l,x2:c,y2:h,lineCap:e.getLineCap(),lineDash:e.getLineDash(),lineDashOffset:o,stroke:r,strokeWidth:s,strokeOpacity:a,fillOpacity:0})}updateHandle(e,t){const{middle:i}=this,{locked:o,stroke:r,strokeWidth:s,strokeOpacity:a}=e,n={fill:e.handle.fill,stroke:e.handle.stroke??r,strokeOpacity:e.handle.strokeOpacity??a,strokeWidth:e.handle.strokeWidth??s},l=import_ag_charts_core62.Vec2.sub(import_ag_charts_core62.Vec4.center(t),import_ag_charts_core62.Vec2.from(i.handle.width/2,i.handle.height/2));i.gradient=this.isHorizontal?"horizontal":"vertical",i.update({...n,...l}),i.toggleLocked(o??!1)}updateText(e,t){this.text=this.updateNode(CollidableText,this.text,!!e.text.label),updateLineText(this.line.id,this.line,t,e.text,this.text,e.text.label,e.strokeWidth)}createAxisLabel(e){const t=new AxisLabelScene;return e.attachLabel(t),t}updateAxisLabel(e,t,i){this.axisLabel??(this.axisLabel=this.createAxisLabel(t));const{axisLabel:o,seriesRect:r}=this,{direction:s,position:a}=t;if(e.axisLabel.enabled){o.visible=this.visible;const n=a==="left"||a==="top"?import_ag_charts_core62.Vec4.start(i):import_ag_charts_core62.Vec4.end(i),l=s===import_ag_charts_core62.ChartAxisDirection.X?n.x:n.y;if(!t.inRange(l)){o.visible=!1;return}const c=getGroupingValue(e.value);o.update({...import_ag_charts_core62.Vec2.add(n,import_ag_charts_core62.Vec2.required(r)),value:c,styles:e.axisLabel,context:t})}else o.visible=!1}setAxisLabelOpacity(e){this.axisLabel&&(this.axisLabel.opacity=e)}setAxisLabelVisible(e){this.axisLabel&&(this.axisLabel.visible=e)}toggleHandles(e){this.middle.visible=e,this.middle.toggleHovered(this.activeHandle==="middle")}destroy(){super.destroy(),this.axisLabel?.destroy()}toggleActive(e){this.toggleHandles(e),this.middle.toggleActive(e)}dragStart(e,t,i){const o=HorizontalLineProperties.is(e)?{x:t.x,y:convert(e.value,i.yAxis)}:{x:convert(e.value,i.xAxis),y:t.y};this.dragState={offset:t,middle:o}}drag(e,t,i){const{activeHandle:o,dragState:r}=this;!e.isWriteable()||!r||(o&&this[o].toggleDragging(!0),this.translatePoint(e,r.middle,import_ag_charts_core62.Vec2.sub(t,r.offset),i))}translate(e,t,i){if(!e.isWriteable())return;const o=HorizontalLineProperties.is(e)?import_ag_charts_core62.Vec2.from(0,convert(e.value,i.yAxis)):import_ag_charts_core62.Vec2.from(convert(e.value,i.xAxis),0);this.translatePoint(e,o,t,i)}translatePoint(e,t,i,o){const r=HorizontalLineProperties.is(e);r?i.x=0:i.y=0;const{point:s}=translate({point:t},i,o);e.value=r?s.y:s.x}stopDragging(){this.middle.toggleDragging(!1)}copy(e,t,i){const o=HorizontalLineProperties.is(e),r=this.isHorizontal?i.yAxis:i.xAxis,s=this.convertCrossLine(e,r);if(!s)return;const a=o?-30:0,n=o?0:-30,l=invertCoords({x:s.x1+n,y:s.y1+a},i);return t.set({value:o?l.y:l.x}),t}getCursor(){return this.activeHandle==null?"pointer":this[this.activeHandle].getCursor()}containsPoint(e,t){const{middle:i,line:o,text:r}=this;return this.activeHandle=void 0,i.containsPoint(e,t)?(this.activeHandle="middle",!0):o.isPointInPath(e,t)||!!r?.containsPoint(e,t)}getNodeAtCoords(e,t){if(this.text?.containsPoint(e,t))return"text";if(this.line.isPointInPath(e,t))return"line";if(this.middle.containsPoint(e,t))return"handle"}getAnchor(){const e=this.computeBBoxWithoutHandles();return this.isHorizontal?{x:e.x+e.width/2,y:e.y}:{x:e.x+e.width,y:e.y+e.height/2,position:"right"}}convertCrossLine(e,t){if(e.value==null)return;let i=0,o=0,r,s;const{bounds:a}=t,n=convert(e.value,t);return HorizontalLineProperties.is(e)?(r=a.width,o=n,s=n):(i=n,r=n,s=a.height),{x1:i,y1:o,x2:r,y2:s}}},import_ag_charts_community52=require("ag-charts-community"),import_ag_charts_core63=require("ag-charts-core"),CrossLineStateMachine=class extends import_ag_charts_core63.StateMachine{constructor(e,t){const i=({point:r})=>{const s=e==="horizontal",a=s?new HorizontalLineProperties:new VerticalLineProperties;a.set({value:s?r.y:r.x}),t.create(a),t.recordAction(`Create ${s?"horizontal-line":"vertical-line"} annotation`)},o=()=>{this.node?.toggleActive(!0),t.showAnnotationOptions(),t.update()};super("start",{start:{click:{target:"waiting-first-render",action:i},drag:{target:"waiting-first-render",action:i},reset:import_ag_charts_core63.StateMachine.parent,cancel:import_ag_charts_core63.StateMachine.parent},"waiting-first-render":{render:{target:import_ag_charts_core63.StateMachine.parent,action:o}}}),this.debug=import_ag_charts_core63.Debug.create(!0,"annotations")}};__decorateClass([(0,import_ag_charts_core63.StateMachineProperty)()],CrossLineStateMachine.prototype,"node",2);var horizontalLineConfig={type:"horizontal-line",datum:HorizontalLineProperties,scene:CrossLineScene,isDatum:HorizontalLineProperties.is,translate:(e,t,i,o)=>{HorizontalLineProperties.is(t)&&CrossLineScene.is(e)&&e.translate(t,i,o)},copy:(e,t,i,o)=>{if(HorizontalLineProperties.is(t)&&HorizontalLineProperties.is(i)&&CrossLineScene.is(e))return e.copy(t,i,o)},update:(e,t,i)=>{HorizontalLineProperties.is(t)&&CrossLineScene.is(e)&&e.update(t,i)},createState:(e,{createDatum:t})=>new CrossLineStateMachine("horizontal",{...e,create:t("horizontal-line")}),dragState:e=>new DragStateMachine(e)},verticalLineConfig={type:"vertical-line",datum:VerticalLineProperties,scene:CrossLineScene,isDatum:VerticalLineProperties.is,translate:(e,t,i,o)=>{VerticalLineProperties.is(t)&&CrossLineScene.is(e)&&e.translate(t,i,o)},copy:(e,t,i,o)=>{if(VerticalLineProperties.is(t)&&VerticalLineProperties.is(i)&&CrossLineScene.is(e))return e.copy(t,i,o)},update:(e,t,i)=>{VerticalLineProperties.is(t)&&CrossLineScene.is(e)&&e.update(t,i)},createState:(e,{createDatum:t})=>new CrossLineStateMachine("vertical",{...e,create:t("vertical-line")}),dragState:e=>new DragStateMachine(e)},import_ag_charts_core65=require("ag-charts-core"),import_ag_charts_community53=require("ag-charts-community"),import_ag_charts_core64=require("ag-charts-core"),WithBackgroundScene=class{static updateBackground(e,t,i,o){const{background:r}=this,{seriesRect:s}=o;r.path.clear(!0);const a=import_ag_charts_core64.Vec4.from(0,0,s.width,s.height),n=this.getBackgroundPoints(e,t,i,a);for(let c=0;c<n.length;c++){const h=n[c];c===0?r.path.moveTo(h.x,h.y):r.path.lineTo(h.x,h.y)}r.path.closePath(),r.checkPathDirty();const l=this.getBackgroundStyles?.(e)??e.background;r.fill=l.fill,r.fillOpacity=l.fillOpacity??1}},ChannelScene=class extends LinearScene{constructor(){super(...arguments),this.handles={},this.overflowContinuous=2,this.topLine=new CollidableLine,this.bottomLine=new CollidableLine,this.background=new import_ag_charts_community53._ModuleSupport.Path({zIndex:-1}),this.anchor={x:0,y:0},this.updateBackground=WithBackgroundScene.updateBackground.bind(this)}update(e,t){const{locked:i,visible:o}=e,r=convertLine(e,t),s=convertLine(e.bottom,t);if(r==null||s==null){this.visible=!1;return}else this.visible=o??!0;const a=this.extendLine(r,e,t),n=this.extendLine(s,e,t);this.updateLines(e,a,n,t,r,s),this.updateHandles(e,r,s),this.updateText(e,r,s),this.updateBackground(e,a,n,t),this.updateAnchor(r,s);for(const l of Object.values(this.handles))l.toggleLocked(i??!1)}toggleHandles(e){const{handles:t}=this;if(typeof e=="boolean"){for(const[i,o]of Object.entries(t))o.visible=e,o.toggleHovered(this.activeHandle===i);return}for(const[i,o]of Object.entries(e)){const r=t[i];r.visible=o??!0,r.toggleHovered(this.activeHandle===i)}}toggleActive(e){this.toggleHandles(e);for(const t of Object.values(this.handles))t.toggleActive(e)}stopDragging(){const{activeHandle:e,handles:t}=this;e!=null&&t[e].toggleDragging(!1)}getAnchor(){return this.anchor}getCursor(){return this.activeHandle==null?"pointer":this.handles[this.activeHandle].getCursor()}containsPoint(e,t){const{handles:i,topLine:o,bottomLine:r,text:s}=this;this.activeHandle=void 0;for(const[a,n]of Object.entries(i))if(n.containsPoint(e,t))return this.activeHandle=a,!0;return o.containsPoint(e,t)||r.containsPoint(e,t)||!!s?.containsPoint(e,t)}getNodeAtCoords(e,t){if(this.text?.containsPoint(e,t))return"text";if(this.topLine.containsPoint(e,t)||this.bottomLine.containsPoint(e,t))return"line";for(const[,i]of Object.entries(this.handles))if(i.containsPoint(e,t))return"handle"}updateAnchor(e,t){const{x:i,y:o}=import_ag_charts_community53._ModuleSupport.Transformable.toCanvasPoint(this.topLine,(e.x1+e.x2)/2,Math.min(e.y1,e.y2,t.y1,t.y2));this.anchor.x=i,this.anchor.y=o}},DisjointChannelScene=class extends ChannelScene{constructor(){super(),this.type="disjoint-channel",this.handles={topLeft:new DivariantHandle,topRight:new DivariantHandle,bottomLeft:new DivariantHandle,bottomRight:new UnivariantHandle},this.append([this.background,this.topLine,this.bottomLine,...Object.values(this.handles)])}static is(e){return AnnotationScene.isCheck(e,"disjoint-channel")}dragHandle(e,t,i,o){const{activeHandle:r,handles:s}=this;if(r==null)return;const{offset:a}=s[r].drag(t);s[r].toggleDragging(!0),r==="bottomRight"&&(a.x=0);let n=[],l=[],c=o;switch(r){case"topLeft":n=["topLeft"],l=["bottomLeft"];break;case"bottomLeft":n=["bottomLeft"],l=["topLeft"];break;case"topRight":n=["topRight"],l=["bottomRight"];break;case"bottomRight":n=["bottomLeft","bottomRight"],c=!1;break}const h=convertLine(e,i),u=convertLine(e.bottom,i);if(!h||!u)return;const d={topLeft:import_ag_charts_core65.Vec4.start(h),topRight:import_ag_charts_core65.Vec4.end(h),bottomLeft:import_ag_charts_core65.Vec4.start(u),bottomRight:import_ag_charts_core65.Vec4.end(u)},p={vectors:{topLeft:d.topRight,bottomLeft:d.bottomRight,topRight:d.topLeft,bottomRight:d.bottomLeft},angle:e.snapToAngle},g=translate(d,a,i,{overflowContinuous:this.overflowContinuous,translateVectors:n,invertYVectors:l,snap:c?p:void 0});e.start.x=g.topLeft.x,e.start.y=g.topLeft.y,e.end.x=g.topRight.x,e.end.y=g.topRight.y,e.startHeight=g.topLeft.y-g.bottomLeft.y,e.endHeight=g.topRight.y-g.bottomRight.y}getTranslatePointsVectors(e,t){const{bottomLeft:i,bottomRight:o,topLeft:r,topRight:s}=this.handles,a=i.getBBox().y-r.getBBox().y,n=o.getBBox().y-s.getBBox().y,l=import_ag_charts_core65.Vec2.add(e,import_ag_charts_core65.Vec2.from(0,a)),c=import_ag_charts_core65.Vec2.add(t,import_ag_charts_core65.Vec2.from(0,n));return{start:e,end:t,bottomStart:l,bottomEnd:c}}updateLines(e,t,i){const{topLine:o,bottomLine:r}=this,{lineDashOffset:s,stroke:a,strokeOpacity:n,strokeWidth:l}=e,c={lineCap:e.getLineCap(),lineDash:e.getLineDash(),lineDashOffset:s,stroke:a,strokeOpacity:n,strokeWidth:l};o.setProperties({...t,...c}),r.setProperties({...i,...c})}updateHandles(e,t,i){const{handles:{topLeft:o,topRight:r,bottomLeft:s,bottomRight:a}}=this,n={fill:e.handle.fill,stroke:e.handle.stroke??e.stroke,strokeOpacity:e.handle.strokeOpacity??e.strokeOpacity,strokeWidth:e.handle.strokeWidth??e.strokeWidth};o.update({...n,...import_ag_charts_core65.Vec4.start(t)}),r.update({...n,...import_ag_charts_core65.Vec4.end(t)}),s.update({...n,...import_ag_charts_core65.Vec4.start(i)}),a.update({...n,...import_ag_charts_core65.Vec2.sub(import_ag_charts_core65.Vec4.end(i),import_ag_charts_core65.Vec2.from(a.handle.width/2,a.handle.height/2))})}updateText(e,t,i){this.text=this.updateNode(CollidableText,this.text,!!e.text.label),updateChannelText(!1,t,i,e.text,e.strokeWidth,this.text,e.text.label)}getBackgroundPoints(e,t,i,o){const r=t.x1>t.x2,s=t.y1>t.y2,a=s?o.y2:o.y1,n=s?o.y1:o.y2,l=import_ag_charts_core65.Vec2.from(t);return e.extendEnd&&t.y2===n&&l.push(import_ag_charts_core65.Vec2.from(r?o.x1:o.x2,s?o.y1:o.y2)),e.extendEnd&&i.y2===a&&l.push(import_ag_charts_core65.Vec2.from(r?o.x1:o.x2,s?o.y2:o.y1)),l.push(...import_ag_charts_core65.Vec2.from(i).reverse()),e.extendStart&&i.y1===n&&l.push(import_ag_charts_core65.Vec2.from(r?o.x2:o.x1,s?o.y1:o.y2)),e.extendStart&&t.y1===a&&l.push(import_ag_charts_core65.Vec2.from(r?o.x2:o.x1,s?o.y2:o.y1)),l}},import_ag_charts_core66=require("ag-charts-core"),DisjointChannelStateMachine=class extends import_ag_charts_core66.StateMachine{constructor(e){const t=({point:l})=>{const c=new DisjointChannelProperties;c.set({start:l,end:l,startHeight:0,endHeight:0}),e.create(c)},i=()=>{const{node:l}=this;l?.toggleActive(!0),l?.toggleHandles({topLeft:!0,topRight:!1,bottomLeft:!1,bottomRight:!1})},o=({offset:l,context:c})=>{const{datum:h,snapping:u}=this;h&&(h.set({end:snapPoint(l,c,u,h.start,h.snapToAngle)}),e.update())},r=()=>{this.node?.toggleHandles({topRight:!0}),e.update()},s=({point:l})=>{const{datum:c,node:h}=this,u=getGroupingValue(c?.end.y),d=getGroupingValue(c?.start.y),{y:p}=l;if(c==null||!(0,import_ag_charts_core66.isNumber)(d)||!(0,import_ag_charts_core66.isNumber)(u)||!(0,import_ag_charts_core66.isNumber)(p))return;const g=u-(p??0),y=(d-u)*2+g,x={x:c?.start.x,y:d-y},f={x:c?.end.x,y:l.y};h?.toggleHandles({bottomLeft:!0,bottomRight:!0}),!(!e.validatePoint(x,{overflowContinuous:!0})||!e.validatePoint(f,{overflowContinuous:!0}))&&(c.set({startHeight:y,endHeight:g}),e.update())},a=({point:l})=>{const{datum:c,node:h}=this,u=getGroupingValue(c?.end.y),d=getGroupingValue(c?.start.y),{y:p}=l;if(c==null||!(0,import_ag_charts_core66.isNumber)(d)||!(0,import_ag_charts_core66.isNumber)(u)||!(0,import_ag_charts_core66.isNumber)(p))return;const g=u-(p??0),y=(d-u)*2+g,x={x:c.start.x,y:d-g},f={x:c.end.x,y:l.y};h?.toggleHandles(!0),!(!e.validatePoint(x,{overflowContinuous:!0})||!e.validatePoint(f,{overflowContinuous:!0}))&&(c.set({startHeight:y,endHeight:g}),e.recordAction("Create disjoint-channel annotation"),e.showAnnotationOptions(),e.update())},n=()=>e.delete();super("start",{start:{click:{target:"waiting-first-render",action:t},drag:{target:"waiting-first-render",action:t},reset:import_ag_charts_core66.StateMachine.parent},"waiting-first-render":{render:{target:"end",action:i}},end:{hover:o,drag:o,click:{target:"height",action:r},dragEnd:{target:"height",action:r},reset:{target:import_ag_charts_core66.StateMachine.parent,action:n},cancel:{target:import_ag_charts_core66.StateMachine.parent,action:n}},height:{hover:s,click:{target:import_ag_charts_core66.StateMachine.parent,action:a},drag:{target:import_ag_charts_core66.StateMachine.parent,action:a},reset:{target:import_ag_charts_core66.StateMachine.parent,action:n},cancel:{target:import_ag_charts_core66.StateMachine.parent,action:n}}}),this.debug=import_ag_charts_core66.Debug.create(!0,"annotations"),this.snapping=!1}};__decorateClass([(0,import_ag_charts_core66.StateMachineProperty)()],DisjointChannelStateMachine.prototype,"datum",2),__decorateClass([(0,import_ag_charts_core66.StateMachineProperty)()],DisjointChannelStateMachine.prototype,"node",2),__decorateClass([(0,import_ag_charts_core66.StateMachineProperty)()],DisjointChannelStateMachine.prototype,"snapping",2);var disjointChannelConfig={type:"disjoint-channel",datum:DisjointChannelProperties,scene:DisjointChannelScene,isDatum:DisjointChannelProperties.is,translate:(e,t,i,o)=>{DisjointChannelProperties.is(t)&&DisjointChannelScene.is(e)&&e.translate(t,i,o)},copy:(e,t,i,o)=>{if(DisjointChannelProperties.is(t)&&DisjointChannelProperties.is(i)&&DisjointChannelScene.is(e))return e.copy(t,i,o)},update:(e,t,i)=>{DisjointChannelProperties.is(t)&&DisjointChannelScene.is(e)&&e.update(t,i)},createState:(e,{createDatum:t})=>new DisjointChannelStateMachine({...e,create:t("disjoint-channel")}),dragState:e=>new DragStateMachine(e)},import_ag_charts_core69=require("ag-charts-core"),import_ag_charts_community54=require("ag-charts-community"),import_ag_charts_core67=require("ag-charts-core"),FIBONACCI_RETRACEMENT_RATIOS=[0,23.6,38.2,50,61.8,78.6,100],FIBONACCI_EXTENSION_RATIOS=[161.8,261.8,361.8,423.6],FIBONACCI_RATIOS=[...FIBONACCI_RETRACEMENT_RATIOS,...FIBONACCI_EXTENSION_RATIOS],FIBONACCI_RATIOS_MAP={10:FIBONACCI_RATIOS,6:FIBONACCI_RETRACEMENT_RATIOS,4:FIBONACCI_RETRACEMENT_RATIOS.filter(e=>e!==78.6&&e!==23.6)},FIBONACCI_RANGE_LABEL_PADDING=10;function getFibonacciCoords(e,t){const{x2:i,y1:o,y2:r}=e,s=o-r;return t==null?{x1:i,x2:i,y1:r-s,y2:r}:{x1:t.x1,x2:t.x2,y1:t.y2-s,y2:t.y2}}function createFibonacciRangesData({x1:e,y1:t,x2:i,y2:o},r,s,a,n=10){const l=t-o,c=s?-1:1;let h=a;const u=[];for(const[d,p]of FIBONACCI_RATIOS_MAP[n].entries()){const g=a+l*(p/100)*c,y=r.yAxis.scaleInvert(g);u.push({id:d,x1:e,x2:i,y1:h,y2:g,tag:p==100?0:1,label:{x1:Math.min(e,i)-FIBONACCI_RANGE_LABEL_PADDING,x2:i,y1:g,y2:g,text:`${(p/100).toFixed(3)} (${y.toFixed(2)})`}}),h=g}return u}var FibonacciScene=class extends AnnotationScene{constructor(){super(),this.trendLine=new CollidableLine,this.rangeFillsGroup=new import_ag_charts_community54._ModuleSupport.Group({name:`${this.id}-range-fills`}),this.rangeFillsGroupSelection=import_ag_charts_community54._ModuleSupport.Selection.select(this.rangeFillsGroup,import_ag_charts_community54._ModuleSupport.Range),this.rangeStrokesGroup=new import_ag_charts_community54._ModuleSupport.Group({name:`${this.id}-range-strokes`}),this.rangeStrokesGroupSelection=import_ag_charts_community54._ModuleSupport.Selection.select(this.rangeStrokesGroup,CollidableLine),this.labelsGroup=new import_ag_charts_community54._ModuleSupport.Group({name:`${this.id}-ranges-labels`}),this.labelsGroupSelection=import_ag_charts_community54._ModuleSupport.Selection.select(this.labelsGroup,CollidableText),this.anchor={x:0,y:0,position:"above"},this.append([this.trendLine,this.rangeFillsGroup,this.rangeStrokesGroup,this.labelsGroup])}update(e,t){let i=convertLine(e,t);if(i==null){this.visible=!1;return}if(i=import_ag_charts_core67.Vec4.round(i),this.visible=e.visible??!0,!this.visible)return;this.updateLine(e,i,this.trendLine),this.updateHandles(e,i),this.updateAnchor(e,i,t);const{reverse:o}=e,r=this.extendLine(i,e,t),s=o?r.y1:r.y2,a=o?r.y2:r.y1,n=createFibonacciRangesData(r,t,e.reverse,s,e.bands);this.updateRanges(e,n,t);const l={...r,y1:a,y2:a};this.updateText(e,l)}extendLine({x1:e,y1:t,x2:i,y2:o},r,s){const a={x1:e,y1:t,x2:i,y2:o};if(!r.extendStart&&!r.extendEnd)return a;const{x:n,width:l}=s.xAxis.bounds;return r.extendEnd&&(a[e>i?"x1":"x2"]=n+l),r.extendStart&&(a[e>i?"x2":"x1"]=n),a}updateLine(e,t,i){if(!t||!i)return;const{lineDashOffset:o,strokeWidth:r,strokeOpacity:s,stroke:a}=e;i.setProperties({...t,lineCap:e.getLineCap(),lineDash:[3,4],lineDashOffset:o,strokeWidth:r,strokeOpacity:s,fillOpacity:0,stroke:a})}updateRangeStrokes(e){const{lineDashOffset:t,strokeWidth:i,strokeOpacity:o,strokes:r,rangeStroke:s,isMultiColor:a}=e;this.rangeStrokesGroupSelection.each((n,{x1:l,x2:c,y2:h,tag:u},d)=>{const p=h,g=a?r[d%r.length]:s;n.setProperties({x1:l,x2:c,y1:p,y2:p,stroke:g,strokeOpacity:o,strokeWidth:i,lineCap:e.getLineCap(),lineDash:e.getLineDash(),lineDashOffset:t,tag:u})})}updateRanges(e,t,i){const o=r=>r.id;this.rangeFillsGroupSelection.update(t,void 0,o),this.rangeStrokesGroupSelection.update(t,void 0,o),this.labelsGroupSelection.update(t,void 0,o),this.updateRangeFills(e),this.updateRangeStrokes(e),this.updateRangeLabels(e,i)}updateRangeFills(e){const{lineDashOffset:t,strokeWidth:i,strokeOpacity:o,strokes:r,rangeStroke:s,showFill:a,isMultiColor:n}=e;this.rangeFillsGroupSelection.each((l,{x1:c,x2:h,y1:u,y2:d},p)=>{const g=n?r[p%r.length]:s;if(!a){l.visible=!1;return}l.setProperties({x1:c,x2:h,y1:u,y2:d,startLine:!1,endLine:!1,stroke:g,strokeOpacity:o,fill:g,fillOpacity:(o??1)*.15,strokeWidth:i,lineCap:e.getLineCap(),lineDash:e.getLineDash(),lineDashOffset:t,visible:!0})})}updateRangeLabels(e,{xAxis:t}){const{rangeStrokesGroupSelection:i}=this,{strokes:o,strokeWidth:r,rangeStroke:s,isMultiColor:a,label:{fontFamily:n,fontSize:l,fontStyle:c,fontWeight:h,color:u}}=e,d={fontFamily:n,fontSize:l,fontStyle:c,fontWeight:h},p=this.checkWithinBounds(t,d,this.labelsGroupSelection.at(0));this.labelsGroupSelection.each((g,y,x)=>{const f=u??(a?o[x%o.length]:s),S=i.at(x);if(!S)return;const{text:m,...v}=y.label;if(p)g.setProperties({...d,text:m,x:v.x1,y:v.y1,textBaseline:"middle",textAlign:"end",fill:f}),updateLineText(g.id,S,v);else{const b={...d,label:m,position:"center",alignment:"left",color:f};updateLineText(g.id,S,v,b,g,m,r)}})}checkWithinBounds(e,t,i){if(!i)return!1;const{text:o,...r}=i.datum.label;i.setProperties({...t,text:o,x:r.x1,y:r.y1,textBaseline:"middle",textAlign:"end"});const{x:s}=i.getBBox();return s>=e.bounds.x&&s<=e.bounds.x+e.bounds.width}updateText(e,t){const i=this.rangeStrokesGroupSelection.selectByTag(0)[0];if(!i)return;const{text:o,strokeWidth:r}=e;this.text=this.updateNode(CollidableText,this.text,!!o.label),updateLineText(i.id,i,t,o,this.text,o.label,r)}updateAnchor(e,t,i,o){const r=import_ag_charts_core67.Vec4.topCenter(t);import_ag_charts_core67.Vec2.apply(this.anchor,import_ag_charts_community54._ModuleSupport.Transformable.toCanvasPoint(this.trendLine,r.x,r.y))}containsPoint(e,t){const{trendLine:i,rangeStrokesGroupSelection:o,text:r}=this;let s=!1;return o.each(a=>s||(s=a.isPointInPath(e,t))),s||i.isPointInPath(e,t)||!!r?.containsPoint(e,t)}getNodeAtCoords(e,t){if(this.text?.containsPoint(e,t))return"text";if(this.trendLine.isPointInPath(e,t))return"line"}getHandleStyles(e){return{fill:e.handle.fill,stroke:e.handle.stroke??e.stroke,strokeOpacity:e.handle.strokeOpacity??e.strokeOpacity,strokeWidth:e.handle.strokeWidth??e.strokeWidth}}drag(e,t,i,o){e.isWriteable()&&(this.activeHandle?this.dragHandle(e,t,i,o):this.dragAll(e,t,i))}getAnchor(){return this.anchor}getCursor(){return"pointer"}},import_ag_charts_community55=require("ag-charts-community"),import_ag_charts_core68=require("ag-charts-core"),{ContinuousScale:ContinuousScale3}=import_ag_charts_community55._ModuleSupport;function validateDatumPoint(e,t,i={overflowContinuous:!1},o){if(t.x==null||t.y==null)return o&&import_ag_charts_core68.Logger.warnOnce(`${o}requires both an [x] and [y] property, ignoring.`),!1;const{xAxis:r,yAxis:s}=e,a=i.overflowContinuous&&ContinuousScale3.is(r.scale),n=i.overflowContinuous&&ContinuousScale3.is(s.scale),l=a||validateDatumPointDirection(t.x,r),c=n||validateDatumPointDirection(t.y,s);if(l&&c)return!0;if(o){let h="x & y domains";l&&(h="y domain"),c&&(h="x domain");const u=getGroupingValue(t.x),d=getGroupingValue(t.y);import_ag_charts_core68.Logger.warnOnce(`${o}is outside the ${h}, ignoring. - x: [${u}], y: ${d}]`)}return!1}function validateDatumPointDirection(e,t){const{domain:i}=t.scale,o=getGroupingValue(e);return i&&o!=null&&t.continuous?o>=i[0]&&o<=i.at(-1):!0}var FibonacciRetracementTrendBasedScene=class extends FibonacciScene{constructor(){super(),this.type="fibonacci-retracement-trend-based",this.endRetracementLine=new CollidableLine,this.start=new DivariantHandle,this.end=new DivariantHandle,this.endRetracement=new DivariantHandle,this.append([this.endRetracementLine,this.start,this.end,this.endRetracement])}static is(e){return AnnotationScene.isCheck(e,"fibonacci-retracement-trend-based")}update(e,t){let{coords1:i,coords2:o}=this.getCoords(e,t);if(i==null||o==null){this.visible=!1;return}if(i=import_ag_charts_core69.Vec4.round(i),o=import_ag_charts_core69.Vec4.round(o),this.visible=e.visible??!0,!this.visible)return;(e.endRetracement.x==null||e.endRetracement.y==null)&&(o=void 0),this.updateLine(e,i,this.trendLine),this.updateLine(e,o,this.endRetracementLine),this.updateHandles(e,i,o),this.updateAnchor(e,o??i,t);const{reverse:r,bands:s}=e,a=getFibonacciCoords(i,o),n=this.extendLine(a,e,t),l=n.y2,c=n.y1,h=o?createFibonacciRangesData(n,t,r,l,s):[];this.updateRanges(e,h,t);const u={...n,y1:c,y2:c};this.updateText(e,u)}containsPoint(e,t){const{start:i,end:o,endRetracement:r,endRetracementLine:s}=this;return this.activeHandle=void 0,i.containsPoint(e,t)?(this.activeHandle="start",!0):o.containsPoint(e,t)?(this.activeHandle="end",!0):r.containsPoint(e,t)?(this.activeHandle="endRetracement",!0):s.isPointInPath(e,t)||super.containsPoint(e,t)}getNodeAtCoords(e,t){return this.start.containsPoint(e,t)||this.end.containsPoint(e,t)||this.endRetracement.containsPoint(e,t)?"handle":this.endRetracementLine.isPointInPath(e,t)?"line":super.getNodeAtCoords(e,t)}dragStart(e,t,i){this.dragState={offset:t,...getDragStartState({start:e.start,end:e.end,endRetracement:e.endRetracement},i)}}stopDragging(){this.start.toggleDragging(!1),this.end.toggleDragging(!1),this.endRetracement.toggleDragging(!1)}dragAll(e,t,i){const{dragState:o}=this;o&&this.translatePoints({datum:e,start:o.start,end:o.end,endRetracement:o.endRetracement,translation:import_ag_charts_core69.Vec2.sub(t,o.offset),context:i})}dragHandle(e,t,i,o){const{activeHandle:r,dragState:s}=this;if(!r||!s)return;this[r].toggleDragging(!0);const a=o?this.snapToAngle(e,t,i):invertCoords(this[r].drag(t).point,i);!a||!validateDatumPoint(i,a)||(e[r].x=a.x,e[r].y=a.y)}snapToAngle(e,t,i){const{activeHandle:o}=this,r=["start","end","endRetracement"];if(!o)return;const s=(r.indexOf(o)+1)%r.length,a=r[s];this[o].toggleDragging(!0);const n=convertPoint(e[a],i);return invertCoords(snapToAngle(t,n,e.snapToAngle),i)}translatePoints({datum:e,start:t,end:i,endRetracement:o,translation:r,context:s}){const a=translate({start:t,end:i,endRetracement:o},r,s,{overflowContinuous:2});e.start.x=a.start.x,e.end.x=a.end.x,e.endRetracement.x=a.endRetracement.x,e.start.y=a.start.y,e.end.y=a.end.y,e.endRetracement.y=a.endRetracement.y}translate(e,t,i){this.translatePoints({datum:e,start:convertPoint(e.start,i),end:convertPoint(e.end,i),endRetracement:convertPoint(e.endRetracement,i),translation:t,context:i})}copy(e,t,i){const{coords1:o,coords2:r}=this.getCoords(e,i);if(!o||!r)return;const s=this.computeBBoxWithoutHandles();return this.translatePoints({datum:t,start:import_ag_charts_core69.Vec4.start(o),end:import_ag_charts_core69.Vec4.end(o),endRetracement:import_ag_charts_core69.Vec4.end(r),translation:{x:-s.width/2,y:-s.height/2},context:i}),t}getCoords(e,t){return{coords1:convertLine(e,t),coords2:convertLine({start:e.end,end:e.endRetracement},t)}}toggleHandles(e){if(typeof e=="boolean")this.start.visible=e,this.end.visible=e,this.endRetracement.visible=e;else for(const[t,i]of(0,import_ag_charts_core69.entries)(e))this[t].visible=i;this.start.toggleHovered(this.activeHandle==="start"),this.end.toggleHovered(this.activeHandle==="end"),this.endRetracement.toggleHovered(this.activeHandle==="endRetracement")}toggleActive(e){this.toggleHandles(e),this.start.toggleActive(e),this.end.toggleActive(e),this.endRetracement.toggleActive(e)}updateHandles(e,t,i,o){this.start.update({...this.getHandleStyles(e),...this.getHandleCoords(e,t,"start")}),this.end.update({...this.getHandleStyles(e),...this.getHandleCoords(e,t,"end",o)}),i&&this.endRetracement.update({...this.getHandleStyles(e),...this.getHandleCoords(e,i,"endRetracement",o)}),this.start.toggleLocked(e.locked??!1),this.end.toggleLocked(e.locked??!1),this.endRetracement.toggleLocked(e.locked??!1)}getHandleCoords(e,t,i,o){return i==="start"?import_ag_charts_core69.Vec4.start(t):import_ag_charts_core69.Vec4.end(t)}},import_ag_charts_core70=require("ag-charts-core"),FibonacciRetracementTrendBasedStateMachine=class extends import_ag_charts_core70.StateMachine{constructor(e){const t=({point:c})=>{const h=this.createDatum();h.set({start:c,end:c}),e.create(h)},i=()=>{const{node:c}=this;c?.toggleActive(!0),c?.toggleHandles({start:!0,end:!1,endRetracement:!1})},o=({offset:c,context:h})=>{const{datum:u,snapping:d}=this;u&&(u.set({end:snapPoint(c,h,d,u.start,u.snapToAngle)}),e.update())},r=()=>{const{datum:c}=this;c&&(c.endRetracement.x=c.end.x,c.endRetracement.y=c.end.y,this.node?.toggleHandles({end:!0}),e.update())},s=({offset:c,context:h})=>{const{datum:u,snapping:d}=this;u&&(u.set({endRetracement:snapPoint(c,h,d,u.end,u.snapToAngle)}),e.update())},a=()=>{this.node?.toggleHandles({endRetracement:!0}),e.update()},n=()=>e.delete(),l=()=>{e.showAnnotationOptions(),e.recordAction(`Create ${this.datum?.type} annotation`)};super("start",{start:{click:{target:"waiting-first-render",action:t},drag:{target:"waiting-first-render",action:t},reset:import_ag_charts_core70.StateMachine.parent},"waiting-first-render":{render:{target:"end",action:i}},end:{hover:o,click:{target:"endRetracement",action:r},drag:o,dragEnd:{target:"endRetracement",action:r},reset:{target:import_ag_charts_core70.StateMachine.parent,action:n},cancel:{target:import_ag_charts_core70.StateMachine.parent,action:n},onExit:l},endRetracement:{hover:s,click:{target:import_ag_charts_core70.StateMachine.parent,action:a},drag:{target:import_ag_charts_core70.StateMachine.parent,action:a},reset:{target:import_ag_charts_core70.StateMachine.parent,action:n},cancel:{target:import_ag_charts_core70.StateMachine.parent,action:n}}}),this.debug=import_ag_charts_core70.Debug.create(!0,"annotations"),this.snapping=!1}createDatum(){return new FibonacciRetracementTrendBasedProperties}};__decorateClass([(0,import_ag_charts_core70.StateMachineProperty)()],FibonacciRetracementTrendBasedStateMachine.prototype,"datum",2),__decorateClass([(0,import_ag_charts_core70.StateMachineProperty)()],FibonacciRetracementTrendBasedStateMachine.prototype,"node",2),__decorateClass([(0,import_ag_charts_core70.StateMachineProperty)()],FibonacciRetracementTrendBasedStateMachine.prototype,"snapping",2);var fibonacciRetracementTrendBasedConfig={type:"fibonacci-retracement-trend-based",datum:FibonacciRetracementTrendBasedProperties,scene:FibonacciRetracementTrendBasedScene,isDatum:FibonacciRetracementTrendBasedProperties.is,translate:(e,t,i,o)=>{FibonacciRetracementTrendBasedProperties.is(t)&&FibonacciRetracementTrendBasedScene.is(e)&&e.translate(t,i,o)},copy:(e,t,i,o)=>{if(FibonacciRetracementTrendBasedProperties.is(t)&&FibonacciRetracementTrendBasedProperties.is(i)&&FibonacciRetracementTrendBasedScene.is(e))return e.copy(t,i,o)},update:(e,t,i)=>{FibonacciRetracementTrendBasedProperties.is(t)&&FibonacciRetracementTrendBasedScene.is(e)&&e.update(t,i)},createState:(e,{createDatum:t})=>new FibonacciRetracementTrendBasedStateMachine({...e,create:t("fibonacci-retracement-trend-based")}),dragState:e=>new DragStateMachine(e)},import_ag_charts_core71=require("ag-charts-core"),FibonacciRetracementScene=class extends FibonacciScene{constructor(){super(),this.type="fibonacci-retracement",this.start=new DivariantHandle,this.end=new DivariantHandle,this.append([this.start,this.end])}static is(e){return AnnotationScene.isCheck(e,"fibonacci-retracement")}containsPoint(e,t){const{start:i,end:o}=this;return this.activeHandle=void 0,i.containsPoint(e,t)?(this.activeHandle="start",!0):o.containsPoint(e,t)?(this.activeHandle="end",!0):super.containsPoint(e,t)}getNodeAtCoords(e,t){return this.start.containsPoint(e,t)||this.end.containsPoint(e,t)?"handle":super.getNodeAtCoords(e,t)}dragStart(e,t,i){this.dragState={offset:t,...getDragStartState({start:e.start,end:e.end},i)}}stopDragging(){this.start.toggleDragging(!1),this.end.toggleDragging(!1)}dragAll(e,t,i){const{dragState:o}=this;o&&this.translatePoints({datum:e,start:o.start,end:o.end,translation:import_ag_charts_core71.Vec2.sub(t,o.offset),context:i})}dragHandle(e,t,i,o){const{activeHandle:r,dragState:s}=this;if(!r||!s)return;this[r].toggleDragging(!0);const a=o?this.snapToAngle(e,t,i):invertCoords(this[r].drag(t).point,i);!a||!validateDatumPoint(i,a)||(e[r].x=a.x,e[r].y=a.y)}snapToAngle(e,t,i){const{activeHandle:o}=this,s=["start","end"].find(n=>n!==o);if(!o||!s)return;this[o].toggleDragging(!0);const a=convertPoint(e[s],i);return invertCoords(snapToAngle(t,a,e.snapToAngle),i)}translatePoints({datum:e,start:t,end:i,translation:o,context:r}){const s=translate({start:t,end:i},o,r,{overflowContinuous:1});e.start.x=s.start.x,e.end.x=s.end.x,e.start.y=s.start.y,e.end.y=s.end.y}translate(e,t,i){this.translatePoints({datum:e,start:convertPoint(e.start,i),end:convertPoint(e.end,i),translation:t,context:i})}copy(e,t,i){const o=convertLine(e,i);if(!o)return;const r=this.computeBBoxWithoutHandles();return this.translatePoints({datum:t,start:{x:o.x1,y:o.y1},end:{x:o.x2,y:o.y2},translation:{x:-r.width/2,y:-r.height/2},context:i}),t}toggleHandles(e){if(typeof e=="boolean")this.start.visible=e,this.end.visible=e;else for(const[t,i]of(0,import_ag_charts_core71.entries)(e))this[t].visible=i;this.start.toggleHovered(this.activeHandle==="start"),this.end.toggleHovered(this.activeHandle==="end")}toggleActive(e){this.toggleHandles(e),this.start.toggleActive(e),this.end.toggleActive(e)}updateHandles(e,t,i,o){this.start.update({...this.getHandleStyles(e),...this.getHandleCoords(e,t,"start")}),this.end.update({...this.getHandleStyles(e),...this.getHandleCoords(e,t,"end",o)}),this.start.toggleLocked(e.locked??!1),this.end.toggleLocked(e.locked??!1)}getHandleCoords(e,t,i,o){return i==="start"?import_ag_charts_core71.Vec4.start(t):import_ag_charts_core71.Vec4.end(t)}},import_ag_charts_core72=require("ag-charts-core"),LineTypeStateMachine=class extends import_ag_charts_core72.StateMachine{constructor(e){const t=({point:n})=>{const l=this.createDatum();l.set({start:n,end:n}),e.create(l)},i=()=>{const{node:n}=this;n?.toggleActive(!0),n?.toggleHandles({start:!0,end:!1})},o=({offset:n,context:l})=>{const{datum:c,snapping:h}=this;c&&(c.set({end:snapPoint(n,l,h,c.start,c.snapToAngle)}),e.update())},r=()=>{this.node?.toggleHandles({end:!0}),e.update()},s=()=>e.delete(),a=()=>{e.showAnnotationOptions(),e.recordAction(`Create ${this.datum?.type} annotation`)};super("start",{start:{click:{target:"waiting-first-render",action:t},drag:{target:"waiting-first-render",action:t},reset:import_ag_charts_core72.StateMachine.parent},"waiting-first-render":{render:{target:"end",action:i}},end:{hover:o,click:{target:import_ag_charts_core72.StateMachine.parent,action:r},drag:o,dragEnd:{target:import_ag_charts_core72.StateMachine.parent,action:r},reset:{target:import_ag_charts_core72.StateMachine.parent,action:s},cancel:{target:import_ag_charts_core72.StateMachine.parent,action:s},onExit:a}}),this.debug=import_ag_charts_core72.Debug.create(!0,"annotations"),this.snapping=!1}};__decorateClass([(0,import_ag_charts_core72.StateMachineProperty)()],LineTypeStateMachine.prototype,"datum",2),__decorateClass([(0,import_ag_charts_core72.StateMachineProperty)()],LineTypeStateMachine.prototype,"node",2),__decorateClass([(0,import_ag_charts_core72.StateMachineProperty)()],LineTypeStateMachine.prototype,"snapping",2);var ArrowStateMachine=class extends LineTypeStateMachine{createDatum(){return new ArrowProperties}},LineStateMachine=class extends LineTypeStateMachine{createDatum(){return new LineProperties}},FibonacciRetracementStateMachine=class extends LineTypeStateMachine{createDatum(){return new FibonacciRetracementProperties}},fibonacciRetracementConfig={type:"fibonacci-retracement",datum:FibonacciRetracementProperties,scene:FibonacciRetracementScene,isDatum:FibonacciRetracementProperties.is,translate:(e,t,i,o)=>{FibonacciRetracementProperties.is(t)&&FibonacciRetracementScene.is(e)&&e.translate(t,i,o)},copy:(e,t,i,o)=>{if(FibonacciRetracementProperties.is(t)&&FibonacciRetracementProperties.is(i)&&FibonacciRetracementScene.is(e))return e.copy(t,i,o)},update:(e,t,i)=>{FibonacciRetracementProperties.is(t)&&FibonacciRetracementScene.is(e)&&e.update(t,i)},createState:(e,{createDatum:t})=>new FibonacciRetracementStateMachine({...e,create:t("fibonacci-retracement")}),dragState:e=>new DragStateMachine(e)},import_ag_charts_community57=require("ag-charts-community"),import_ag_charts_core74=require("ag-charts-core"),import_ag_charts_community56=require("ag-charts-community"),import_ag_charts_core73=require("ag-charts-core"),CapScene=class extends import_ag_charts_community56._ModuleSupport.Group{},ArrowCapScene=class extends CapScene{constructor(){super(),this.type="arrow",this.path=new import_ag_charts_community56._ModuleSupport.Path,this.armLength=6,this.append([this.path])}update(e){const{path:t}=this,{x:i,y:o,angle:r,...s}=e,a=import_ag_charts_core73.Vec2.from(i,o),n=3*Math.PI/4,l=this.armLength+(e.strokeWidth??0)*2,c=import_ag_charts_core73.Vec2.rotate(import_ag_charts_core73.Vec2.from(0,l),r+n,a),h=import_ag_charts_core73.Vec2.rotate(import_ag_charts_core73.Vec2.from(l,0),r-n,a);t.setProperties(s),t.fillOpacity=0,t.path.clear(),t.path.moveTo(c.x,c.y),t.path.lineTo(a.x,a.y),t.path.lineTo(h.x,h.y)}},{Transformable:Transformable2}=import_ag_charts_community57._ModuleSupport,LineScene=class extends StartEndScene{constructor(){super(),this.type="line",this.line=new CollidableLine,this.append([this.line,this.start,this.end])}static is(e){return AnnotationScene.isCheck(e,"line")}update(e,t){let i=convertLine(e,t);if(i==null){this.visible=!1;return}i=import_ag_charts_core74.Vec4.round(i),this.visible=e.visible??!0,this.visible&&(this.updateLine(e,i,t),this.updateHandles(e,i),this.updateText(e,i),this.updateCaps(e,i),this.updateAnchor(e,i,t))}updateLine(e,t,i){const{line:o}=this,{lineDashOffset:r,stroke:s,strokeWidth:a,strokeOpacity:n}=e,l=this.extendLine(t,e,i);o.setProperties({...l,lineCap:e.getLineCap(),lineDash:e.getLineDash(),lineDashOffset:r,stroke:s,strokeWidth:a,strokeOpacity:n,fillOpacity:0})}updateText(e,t){this.text=this.updateNode(CollidableText,this.text,!!e.text.label),updateLineText(this.line.id,this.line,t,e.text,this.text,e.text.label,e.strokeWidth)}updateCaps(e,t){if(!e.startCap&&this.startCap&&(this.startCap.remove(),this.startCap=void 0),!e.endCap&&this.endCap&&(this.endCap.remove(),this.endCap=void 0),!e.startCap&&!e.endCap)return;const{stroke:i,strokeWidth:o,strokeOpacity:r}=e,[s,a]=import_ag_charts_core74.Vec2.from(t),n=import_ag_charts_core74.Vec2.angle(import_ag_charts_core74.Vec2.sub(a,s));e.startCap&&(this.startCap&&this.startCap.type!==e.startCap&&(this.startCap.remove(),this.startCap=void 0),this.startCap==null&&(this.startCap=new ArrowCapScene,this.append([this.startCap])),this.startCap.update({x:s.x,y:s.y,angle:n-Math.PI,stroke:i,strokeWidth:o,strokeOpacity:r})),e.endCap&&(this.endCap&&this.endCap.type!==e.endCap&&(this.endCap.remove(),this.endCap=void 0),this.endCap==null&&(this.endCap=new ArrowCapScene,this.append([this.endCap])),this.endCap.update({x:a.x,y:a.y,angle:n,stroke:i,strokeWidth:o,strokeOpacity:r}))}updateAnchor(e,t,i,o){const r=import_ag_charts_core74.Vec4.topCenter(t);import_ag_charts_core74.Vec2.apply(this.anchor,Transformable2.toCanvasPoint(this.line,r.x,r.y))}containsPoint(e,t){const{line:i,text:o}=this;return super.containsPoint(e,t)||i.isPointInPath(e,t)||!!o?.containsPoint(e,t)}getNodeAtCoords(e,t){return this.text?.containsPoint(e,t)?"text":this.line.isPointInPath(e,t)?"line":super.getNodeAtCoords(e,t)}getHandleCoords(e,t,i,o){const{startCap:r,endCap:s}=this;let[a,n]=import_ag_charts_core74.Vec2.from(t);const l=import_ag_charts_core74.Vec2.angle(import_ag_charts_core74.Vec2.sub(n,a));return r&&(a=import_ag_charts_core74.Vec2.rotate(import_ag_charts_core74.Vec2.from(0,-DivariantHandle.HANDLE_SIZE/2),l,a)),s&&(n=import_ag_charts_core74.Vec2.rotate(import_ag_charts_core74.Vec2.from(0,DivariantHandle.HANDLE_SIZE/2),l,n)),i==="start"?a:n}getHandleStyles(e){return{fill:e.handle.fill,stroke:e.handle.stroke??e.stroke,strokeOpacity:e.handle.strokeOpacity??e.strokeOpacity,strokeWidth:e.handle.strokeWidth??e.strokeWidth}}},lineConfig={type:"line",datum:LineProperties,scene:LineScene,isDatum:LineProperties.is,translate:(e,t,i,o)=>{LineProperties.is(t)&&LineScene.is(e)&&e.translate(t,i,o)},copy:(e,t,i,o)=>{if(LineProperties.is(t)&&LineProperties.is(i)&&LineScene.is(e))return e.copy(t,i,o)},update:(e,t,i)=>{LineProperties.is(t)&&LineScene.is(e)&&e.update(t,i)},createState:(e,{createDatum:t})=>new LineStateMachine({...e,create:t("line")}),dragState:e=>new DragStateMachine(e)},arrowConfig={type:"arrow",datum:ArrowProperties,scene:LineScene,isDatum:ArrowProperties.is,translate:(e,t,i,o)=>{ArrowProperties.is(t)&&LineScene.is(e)&&e.translate(t,i,o)},copy:(e,t,i,o)=>{if(ArrowProperties.is(t)&&ArrowProperties.is(i)&&LineScene.is(e))return e.copy(t,i,o)},update:(e,t,i)=>{ArrowProperties.is(t)&&LineScene.is(e)&&e.update(t,i)},createState:(e,{createDatum:t})=>new ArrowStateMachine({...e,create:t("arrow")}),dragState:e=>new DragStateMachine(e)},import_ag_charts_community60=require("ag-charts-community"),import_ag_charts_core76=require("ag-charts-core"),import_ag_charts_community59=require("ag-charts-community"),import_ag_charts_core75=require("ag-charts-core"),import_ag_charts_community58=require("ag-charts-community");function layoutScenesRow(e,t=0,i=0){let o=t;for(const r of e)if(Array.isArray(r)){for(const s of r)layoutSetX(s,o);o+=import_ag_charts_community58._ModuleSupport.Group.computeChildrenBBox(r).width+i}else layoutSetX(r,o),o+=r.getBBox().width+i}function layoutScenesColumn(e,t=0,i=0){let o=t;for(const r of e)if(Array.isArray(r)){for(const s of r)layoutSetY(s,o);o+=import_ag_charts_community58._ModuleSupport.Group.computeChildrenBBox(r).height+i}else layoutSetY(r,o),o+=r.getBBox().height+i}function layoutSetX(e,t){"x1"in e?(e.x2=t+(e.x2-e.x1),e.x1=t):e.x=t}function layoutSetY(e,t){"y1"in e?(e.y2=t+(e.y2-e.y1),e.y1=t):e.y=t}function layoutAddX(e,t){"x1"in e?(e.x1+=t,e.x2+=t):e.x+=t}function layoutAddY(e,t){"y1"in e?(e.y1+=t,e.y2+=t):e.y+=t}var MeasurerStatisticsScene=class extends import_ag_charts_community59._ModuleSupport.Group{constructor(){super(),this.name="MeasurerStatisticsScene",this.background=new import_ag_charts_community59._ModuleSupport.Rect,this.dateRangeBarsText=new import_ag_charts_community59._ModuleSupport.Text,this.dateRangeDivider=new import_ag_charts_community59._ModuleSupport.Line,this.dateRangeValueText=new import_ag_charts_community59._ModuleSupport.Text,this.priceRangeValueText=new import_ag_charts_community59._ModuleSupport.Text,this.priceRangeDivider=new import_ag_charts_community59._ModuleSupport.Line,this.priceRangePercentageText=new import_ag_charts_community59._ModuleSupport.Text,this.volumeText=new import_ag_charts_community59._ModuleSupport.Text,this.volumeFormatter=new Intl.NumberFormat("en-US",{notation:"compact",minimumFractionDigits:2,maximumFractionDigits:2}),this.append([this.background,this.dateRangeBarsText,this.dateRangeDivider,this.dateRangeValueText,this.priceRangeValueText,this.priceRangeDivider,this.priceRangePercentageText,this.volumeText])}update(e,t,i,o,r,s,a){this.verticalDirection=s;const n=this.updateStatistics(e,t,i,a),l=import_ag_charts_community59._ModuleSupport.Group.computeChildrenBBox(n.flat()),c=10;l.grow(c),this.updateBackground(e,l,c),this.reposition(n,c,r),this.checkVisibility(e,r,o)}checkVisibility(e,t,i){const o=import_ag_charts_core75.Vec4.from(t.seriesRect);this.visible=import_ag_charts_core75.Vec4.collides(i,o)&&(e.visible??!0)}updateStatistics(e,t,i,o){const{dateRangeBarsText:r,dateRangeDivider:s,dateRangeValueText:a,priceRangeValueText:n,priceRangeDivider:l,priceRangePercentageText:c,volumeText:h}=this,u=8,d=6,p=e.statistics.fontSize+3,g=-2,y=this.getTextStyles(e),x={...this.getDividerStyles(e),x1:0,y1:0,x2:0,y2:p},f=[r,s,a],S=[n,l,c],m=[];return t.priceRange&&(n.setProperties({...y,text:this.formatPriceRangeValue(t.priceRange.value,o)}),l.setProperties(x),c.setProperties({...y,text:this.formatPriceRangePercentage(t.priceRange.percentage,o)}),layoutScenesRow(S,i.x,u),m.push(S)),t.dateRange&&(r.setProperties({...y,text:this.formatDateRangeBars(t.dateRange.bars,o)}),s.setProperties(x),a.setProperties({...y,text:this.formatDateRangeValue(t.dateRange.value)}),layoutScenesRow(f,i.x,u),m.push(f)),t.volume==null?h.visible=!1:(h.setProperties({...y,x:i.x,text:this.formatVolume(t.volume,o),visible:!0}),m.push(h)),layoutScenesColumn(m,i.y,d),l.y1+=g,l.y2+=g,s.y1+=g,s.y2+=g,m}updateBackground(e,t,i){const o=this.getBackgroundStyles(e);this.background.setProperties({...o,...t,x:t.x-t.width/2+i,y:t.y})}reposition(e,t,i){const{width:o,height:r}=i.seriesRect,s=import_ag_charts_core75.Vec4.from(this.background.getBBox());let a=0;s.x1<0&&(a=-s.x1),s.x2>o&&(a=o-s.x2);const n=Math.min(t,r-s.y2);for(const l of e)if(Array.isArray(l)){const c=import_ag_charts_community59._ModuleSupport.Group.computeChildrenBBox(l).width;for(const h of l)layoutAddX(h,a-c/2),layoutAddY(h,n)}else layoutAddX(l,a-l.getBBox().width/2),layoutAddY(l,n);this.background.x+=a,this.background.y+=n}getTextStyles(e){return{fill:e.statistics.color,fontFamily:e.statistics.fontFamily,fontSize:e.statistics.fontSize,fontStyle:e.statistics.fontStyle,fontWeight:e.statistics.fontWeight,textBaseline:"top"}}getDividerStyles(e){return{stroke:e.statistics.divider.stroke,strokeOpacity:e.statistics.divider.strokeOpacity,strokeWidth:e.statistics.divider.strokeWidth}}getBackgroundStyles(e){return{fill:e.statistics.fill,stroke:e.statistics.stroke,strokeOpacity:e.statistics.strokeOpacity,strokeWidth:e.statistics.strokeWidth,cornerRadius:4}}formatDateRangeBars(e,t){return t?.t("measurerDateRangeBars",{value:e})??`${e}`}formatDateRangeValue(e){const t=[],i=e>=0?"":"-";e=Math.abs(e);const o=1e3*60,r=o*60,s=r*24,a=Math.floor(e/o),n=Math.floor(e/r),l=Math.floor(e/s),c=n%(s/r),h=a%(r/o);return l>=1&&t.push(`${l}d`),n>=1&&(e<s||c!==0)&&t.push(`${c}h`),(e<r||h!==0)&&t.push(`${h}m`),t[0]=`${i}${t[0]}`,t.join(" ")}formatPriceRangeValue(e,t){return t?.t("measurerPriceRangeValue",{value:Number(e.toFixed(2))})??`${e}`}formatPriceRangePercentage(e,t){return t?.t("measurerPriceRangePercent",{value:e})??`${e}`}formatVolume(e,t){const i=Number.isNaN(e)?"":this.volumeFormatter.format(e);return t?.t("measurerVolume",{value:i})??i}},QuickMeasurerStatisticsScene=class extends MeasurerStatisticsScene{getDirectionStyles(e){return this.verticalDirection==="down"?e.down.statistics:e.up.statistics}getTextStyles(e){const t=this.getDirectionStyles(e);return{...super.getTextStyles(e),fill:t.color,fontFamily:t.fontFamily,fontSize:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight}}getDividerStyles(e){const t=this.getDirectionStyles(e);return{stroke:t.divider.stroke,strokeOpacity:t.divider.strokeOpacity,strokeWidth:t.divider.strokeWidth}}getBackgroundStyles(e){const t=this.getDirectionStyles(e);return{...super.getBackgroundStyles(e),fill:t.fill,stroke:t.stroke,strokeOpacity:t.strokeOpacity,strokeWidth:t.strokeWidth}}},MeasurerScene=class extends StartEndScene{constructor(){super(),this.type="measurer",this.horizontalLine=new CollidableLine,this.verticalLine=new CollidableLine,this.horizontalStartLine=new CollidableLine,this.horizontalEndLine=new CollidableLine,this.verticalStartLine=new CollidableLine,this.verticalEndLine=new CollidableLine,this.horizontalEndCap=new ArrowCapScene,this.verticalEndCap=new ArrowCapScene,this.background=new import_ag_charts_community60._ModuleSupport.Path({zIndex:-1}),this.updateBackground=WithBackgroundScene.updateBackground.bind(this),this.statistics=this.createStatisticsScene(),this.statistics.zIndex=1,this.append([this.background,this.verticalStartLine,this.verticalEndLine,this.horizontalStartLine,this.horizontalEndLine,this.horizontalLine,this.verticalLine,this.horizontalEndCap,this.verticalEndCap,this.start,this.end,this.statistics])}static is(e){return AnnotationScene.isCheck(e,"measurer")}createStatisticsScene(){return new MeasurerStatisticsScene}update(e,t){const i=convertLine(e,t);if(i==null){this.visible=!1;return}if(this.visible=e.visible??!0,!this.visible)return;const o=this.extendPerpendicular(i,e,t),r={...o,y2:o.y1},s={...o,y1:o.y2};this.verticalDirection=i.y1<i.y2?"down":"up",this.updateVisibilities(e),this.updateLines(e,i),this.updateHandles(e,i),this.updateText(e,i),this.updateCaps(e,i),this.updateBoundingLines(e,o),this.updateBackground(e,r,s,t),this.updateStatistics(e,i,t),this.updateAnchor(e,i,t)}extendPerpendicular(e,t,i){const o={x1:Math.min(e.x1,e.x2),x2:Math.max(e.x1,e.x2),y1:Math.min(e.y1,e.y2),y2:Math.max(e.y1,e.y2)},[r,s]=import_ag_charts_core76.Vec2.from(i.yAxis.bounds);return DateRangeProperties.is(t)?(t.extendAbove&&(o.y1=r.y),t.extendBelow&&(o.y2=s.y)):PriceRangeProperties.is(t)&&(t.extendLeft&&(o.x1=r.x),t.extendRight&&(o.x2=s.x)),o}updateVisibilities(e){const{horizontalStartLine:t,horizontalEndLine:i,horizontalEndCap:o,verticalStartLine:r,verticalEndLine:s,verticalEndCap:a}=this,{direction:n}=e;r.visible=n!=="vertical",s.visible=n!=="vertical",o.visible=n!=="vertical",t.visible=n!=="horizontal",i.visible=n!=="horizontal",a.visible=n!=="horizontal"}updateLines(e,t){const{horizontalLine:i,verticalLine:o}=this,{direction:r}=e,{x1:s,y1:a,x2:n,y2:l}=t,c=import_ag_charts_core76.Vec2.round(import_ag_charts_core76.Vec4.center(t),0),h=this.getLineStyles(e);r!=="vertical"&&i.setProperties({...h,x1:s,x2:n,y1:c.y,y2:c.y}),r!=="horizontal"&&o.setProperties({...h,x1:c.x,x2:c.x,y1:a,y2:l})}updateText(e,t){const{direction:i}=e,o=import_ag_charts_core76.Vec2.round(import_ag_charts_core76.Vec4.center(t),0);let r;const s={...t};i==="vertical"?(r=this.verticalLine,s.x1=o.x,s.x2=o.x):(r=this.horizontalLine,s.y1=o.y,s.y2=o.y),this.text=this.updateNode(CollidableText,this.text,!!e.text.label);const{id:a}=r,n=updateLineText(a,r,s,e.text,this.text,e.text.label,e.strokeWidth);let l;if(i==="both"&&n&&this.text){const c=import_ag_charts_core76.Vec4.from(this.text.getBBox()),{offset:h}=n.numbers;c.x1<=o.x+h.x&&c.x2>=o.x-h.x&&(l={x:o.x,y:n.clipMask.y,radius:this.text.getBBox().height/2+import_ag_charts_core76.Vec2.length(h)})}this.verticalLine.setClipMask(a,l)}updateCaps(e,t){const{horizontalEndCap:i,verticalEndCap:o}=this,{direction:r}=e,{x1:s,y1:a,x2:n,y2:l}=t,c=import_ag_charts_core76.Vec2.round(import_ag_charts_core76.Vec4.center(t),0),{stroke:h,strokeWidth:u,strokeOpacity:d}=this.getLineStyles(e),p={stroke:h,strokeWidth:u,strokeOpacity:d};if(r!=="vertical"){const g=s<=n?0:Math.PI;let y=n;r==="horizontal"&&(y+=s<=n?-2:2),i.update({...p,x:y,y:c.y,angle:g})}if(r!=="horizontal"){const g=a<=l?Math.PI/2:Math.PI/-2;let y=l;r==="vertical"&&(y+=a<=l?-2:2),o.update({...p,x:c.x,y,angle:g})}}updateBoundingLines(e,t){const{verticalStartLine:i,verticalEndLine:o,horizontalStartLine:r,horizontalEndLine:s}=this,{direction:a}=e,{x1:n,y1:l,x2:c,y2:h}=t,u=this.getLineStyles(e);a==="horizontal"&&(i.setProperties({...u,x1:n,y1:l,x2:n,y2:h}),o.setProperties({...u,x1:c,y1:l,x2:c,y2:h})),a==="vertical"&&(r.setProperties({...u,x1:n,y1:l,x2:c,y2:l}),s.setProperties({...u,x1:n,y1:h,x2:c,y2:h}))}updateStatistics(e,t,i){const o=import_ag_charts_core76.Vec2.add(import_ag_charts_core76.Vec4.bottomCenter(t),import_ag_charts_core76.Vec2.from(0,10)),r={volume:this.getVolume(e)};e.hasPriceRange&&(r.priceRange={percentage:this.getPriceRangePercentage(e),value:this.getPriceRangeValue(e)}),e.hasDateRange&&(r.dateRange={bars:this.getDateRangeBars(t,i),value:this.getDateRangeValue(e)}),this.statistics.update(e,r,o,t,i,this.verticalDirection,e.localeManager)}updateAnchor(e,t,i,o){const r=import_ag_charts_core76.Vec4.topCenter(t);import_ag_charts_core76.Vec2.apply(this.anchor,import_ag_charts_community60._ModuleSupport.Transformable.toCanvasPoint(this.horizontalLine,r.x,r.y))}getBackgroundPoints(e,t,i,o){const[r,s]=import_ag_charts_core76.Vec2.from(t),[a,n]=import_ag_charts_core76.Vec2.from(i);return[r,s,n,a]}getLineStyles(e){const{lineDashOffset:t,stroke:i,strokeWidth:o,strokeOpacity:r}=e;return{lineCap:e.getLineCap(),lineDash:e.getLineDash(),lineDashOffset:t,stroke:i,strokeWidth:o,strokeOpacity:r,fillOpacity:0}}getBackgroundStyles(e){const{background:t}=e;return{fill:t.fill,fillOpacity:t.fillOpacity}}getHandleStyles(e){return{fill:e.handle.fill,stroke:e.handle.stroke??e.stroke,strokeOpacity:e.handle.strokeOpacity??e.strokeOpacity,strokeWidth:e.handle.strokeWidth??e.strokeWidth}}containsPoint(e,t){const{horizontalLine:i,text:o,verticalLine:r,horizontalStartLine:s,horizontalEndLine:a,verticalStartLine:n,verticalEndLine:l}=this;return super.containsPoint(e,t)||i.isPointInPath(e,t)||r.isPointInPath(e,t)||s.visible&&s.isPointInPath(e,t)||a.visible&&a.isPointInPath(e,t)||n.visible&&n.isPointInPath(e,t)||l.visible&&l.isPointInPath(e,t)||!!o?.containsPoint(e,t)}getNodeAtCoords(e,t){return this.text?.containsPoint(e,t)?"text":this.start.containsPoint(e,t)||this.end.containsPoint(e,t)?"handle":"line"}getDateRangeBars(e,t){const{step:i}=t.xAxis.scale,o=e.x1<=e.x2?1:-1;return i?Math.round(import_ag_charts_core76.Vec4.width(e)/i)*o:0}getDateRangeValue(e){const t=getGroupingValue(e.start.x),i=getGroupingValue(e.end.x);if(!(0,import_ag_charts_core76.isDate)(t)||!(0,import_ag_charts_core76.isDate)(i))throw new Error("Can not create a date range measurement of non-date x-axis.");return i.getTime()-t.getTime()}getPriceRangePercentage(e){if(e.start.y==null||e.end.y==null)throw new Error("Can not create a price range measurement of a non-numeric y-axis");const t=getGroupingValue(e.end.y),i=getGroupingValue(e.start.y);if(!(0,import_ag_charts_core76.isNumber)(t)||!(0,import_ag_charts_core76.isNumber)(i))throw new Error("Can not create a price range measurement of a non-numeric y-axis");return(t-i)/i}getPriceRangeValue(e){if(e.start.y==null||e.end.y==null)throw new Error("Can not create a price range measurement of a non-numeric y-axis");const t=getGroupingValue(e.end.y),i=getGroupingValue(e.start.y);if(!(0,import_ag_charts_core76.isNumber)(t)||!(0,import_ag_charts_core76.isNumber)(i))throw new Error("Can not create a price range measurement of a non-numeric y-axis");return t-i}getVolume(e){return e.getVolume(e.start.x,e.end.x)}},QuickMeasurerScene=class extends MeasurerScene{constructor(){super(...arguments),this.type="quick-measurer"}static is(e){return AnnotationScene.isCheck(e,"quick-measurer")}createStatisticsScene(){return new QuickMeasurerStatisticsScene}getDirectionStyles(e){return this.verticalDirection==="down"?e.down:e.up}getLineStyles(e){const t=this.getDirectionStyles(e);return{...super.getLineStyles(e),stroke:t.stroke,strokeWidth:t.strokeWidth,strokeOpacity:t.strokeOpacity}}getBackgroundStyles(e){const t=this.getDirectionStyles(e);return{fill:t.fill,fillOpacity:t.fillOpacity}}getHandleStyles(e){const t=this.getDirectionStyles(e);return{fill:t.handle.fill,stroke:t.handle.stroke??t.stroke,strokeOpacity:t.handle.strokeOpacity??t.strokeOpacity,strokeWidth:t.handle.strokeWidth??t.strokeWidth}}},import_ag_charts_core77=require("ag-charts-core"),MeasurerTypeStateMachine=class extends import_ag_charts_core77.StateMachine{constructor(e){const t=({point:a})=>{const n=this.createDatum();n.set({start:a,end:a}),e.create(n)},i=({point:a})=>{const{datum:n,node:l}=this;n?.set({end:a}),l?.toggleActive(!0),l?.toggleHandles({end:!1}),e.update()},o=()=>{this.node?.toggleHandles({end:!0})},r=()=>e.delete(),s=()=>{e.showAnnotationOptions(),e.recordAction(`Create ${this.node?.type} annotation`)};super("start",{start:{reset:import_ag_charts_core77.StateMachine.parent,click:{target:"end",action:t},drag:{target:"end",action:t}},end:{hover:i,drag:i,click:{target:import_ag_charts_core77.StateMachine.parent,action:o},dragEnd:{target:import_ag_charts_core77.StateMachine.parent,action:o},reset:{target:import_ag_charts_core77.StateMachine.parent,action:r},cancel:{target:import_ag_charts_core77.StateMachine.parent,action:r},onExit:s}}),this.debug=import_ag_charts_core77.Debug.create(!0,"annotations")}};__decorateClass([(0,import_ag_charts_core77.StateMachineProperty)()],MeasurerTypeStateMachine.prototype,"datum",2),__decorateClass([(0,import_ag_charts_core77.StateMachineProperty)()],MeasurerTypeStateMachine.prototype,"node",2);var DateRangeStateMachine=class extends MeasurerTypeStateMachine{createDatum(){return new DateRangeProperties}},PriceRangeStateMachine=class extends MeasurerTypeStateMachine{createDatum(){return new PriceRangeProperties}},DatePriceRangeStateMachine=class extends MeasurerTypeStateMachine{createDatum(){return new DatePriceRangeProperties}},QuickDatePriceRangeStateMachine=class extends MeasurerTypeStateMachine{createDatum(){return new QuickDatePriceRangeProperties}},dateRangeConfig={type:"date-range",datum:DateRangeProperties,scene:MeasurerScene,isDatum:DateRangeProperties.is,translate:(e,t,i,o)=>{DateRangeProperties.is(t)&&MeasurerScene.is(e)&&e.translate(t,i,o)},copy:(e,t,i,o)=>{if(DateRangeProperties.is(t)&&DateRangeProperties.is(i)&&MeasurerScene.is(e))return e.copy(t,i,o)},update:(e,t,i)=>{DateRangeProperties.is(t)&&MeasurerScene.is(e)&&e.update(t,i)},createState:(e,{createDatum:t})=>new DateRangeStateMachine({...e,create:t("date-range")}),dragState:e=>new DragStateMachine(e)},priceRangeConfig={type:"price-range",datum:PriceRangeProperties,scene:MeasurerScene,isDatum:PriceRangeProperties.is,translate:(e,t,i,o)=>{PriceRangeProperties.is(t)&&MeasurerScene.is(e)&&e.translate(t,i,o)},copy:(e,t,i,o)=>{if(PriceRangeProperties.is(t)&&PriceRangeProperties.is(i)&&MeasurerScene.is(e))return e.copy(t,i,o)},update:(e,t,i)=>{PriceRangeProperties.is(t)&&MeasurerScene.is(e)&&e.update(t,i)},createState:(e,{createDatum:t})=>new PriceRangeStateMachine({...e,create:t("date-range")}),dragState:e=>new DragStateMachine(e)},datePriceRangeConfig={type:"date-price-range",datum:DatePriceRangeProperties,scene:MeasurerScene,isDatum:DatePriceRangeProperties.is,translate:(e,t,i,o)=>{DatePriceRangeProperties.is(t)&&MeasurerScene.is(e)&&e.translate(t,i,o)},copy:(e,t,i,o)=>{if(DatePriceRangeProperties.is(t)&&DatePriceRangeProperties.is(i)&&MeasurerScene.is(e))return e.copy(t,i,o)},update:(e,t,i)=>{DatePriceRangeProperties.is(t)&&MeasurerScene.is(e)&&e.update(t,i)},createState:(e,{createDatum:t})=>new DatePriceRangeStateMachine({...e,create:t("date-range")}),dragState:e=>new DragStateMachine(e)},quickDatePriceRangeConfig={type:"quick-date-price-range",datum:QuickDatePriceRangeProperties,scene:QuickMeasurerScene,isDatum:QuickDatePriceRangeProperties.is,translate:(e,t,i,o)=>{QuickDatePriceRangeProperties.is(t)&&QuickMeasurerScene.is(e)&&e.translate(t,i,o)},copy:(e,t,i,o)=>{if(QuickDatePriceRangeProperties.is(t)&&QuickDatePriceRangeProperties.is(i)&&QuickMeasurerScene.is(e))return e.copy(t,i,o)},update:(e,t,i)=>{QuickDatePriceRangeProperties.is(t)&&QuickMeasurerScene.is(e)&&e.update(t,i)},createState:(e,{createDatum:t})=>new QuickDatePriceRangeStateMachine({...e,create:t("quick-date-price-range")}),dragState:e=>new DragStateMachine(e)},import_ag_charts_community61=require("ag-charts-community"),import_ag_charts_core78=require("ag-charts-core"),NoteScene=class extends TextualPointScene{constructor(){super(),this.type="note",this.shape=new import_ag_charts_community61._ModuleSupport.Rect,this.iconBackground=new import_ag_charts_community61._ModuleSupport.TranslatableSvgPath("M22 1.83333C22 0.820811 21.1792 0 20.1667 0H1.83333C0.820811 0 0 0.82081 0 1.83333V13.9868C0 14.9994 0.820811 15.8202 1.83333 15.8202L5.88971 15.8202C6.44575 15.8202 6.97175 16.0725 7.31971 16.5062L9.57006 19.3112C10.304 20.2259 11.6962 20.2259 12.4301 19.3112L14.6804 16.5062C15.0284 16.0725 15.5544 15.8202 16.1104 15.8202L20.1667 15.8202C21.1792 15.8202 22 14.9994 22 13.9868V1.83333Z"),this.iconLines=new import_ag_charts_community61._ModuleSupport.TranslatableSvgPath("M17.1114 5.75C17.1114 6.16421 16.7756 6.5 16.3614 6.5H5.63916C5.22495 6.5 4.88916 6.16421 4.88916 5.75V5.75C4.88916 5.33579 5.22495 5 5.63916 5H16.3614C16.7756 5 17.1114 5.33579 17.1114 5.75V5.75ZM17.1114 9.25C17.1114 9.66421 16.7756 10 16.3614 10H5.63916C5.22495 10 4.88916 9.66421 4.88916 9.25V9.25C4.88916 8.83579 5.22495 8.5 5.63916 8.5H16.3614C16.7756 8.5 17.1114 8.83579 17.1114 9.25V9.25Z"),this.active=!1,this.shape.visible=!1,this.label.visible=!1,this.iconBackground.fillShadow=new import_ag_charts_community61._ModuleSupport.DropShadow,this.append([this.shape,this.label,this.iconBackground,this.iconLines,this.handle])}static is(e){return AnnotationScene.isCheck(e,"note")}update(e,t){this.updateIcon(e,t),super.update(e,t)}getTextBBox(e,t,i){const o=super.getTextBBox(e,t,i);o.x-=e.width/2,o.x=(0,import_ag_charts_core78.clamp)(0,o.x,i.seriesRect.width-e.width);const r=e.getPadding().top,s=o.y-LABEL_OFFSET-r*2,a=o.y+DivariantHandle.HANDLE_SIZE+r*2;return s-o.height-TOOLBAR_OFFSET<0?(o.y=a,e.position="top"):(o.y=s+r,e.position="bottom"),o}updateLabel(e,t){const i=e.visible===!1?!1:this.label.visible;super.updateLabel(e,t),this.label.visible=i,this.label.text=(0,import_ag_charts_core78.wrapText)(e.text,{maxWidth:200,font:e,textWrap:"always",avoidOrphans:!1})}updateShape(e,t){const{shape:i}=this;i.fill=e.background.fill,i.fillOpacity=e.background.fillOpacity??1,i.stroke=e.background.stroke,i.strokeOpacity=e.background.strokeOpacity??1,i.strokeWidth=e.background.strokeWidth??1,i.cornerRadius=4;const o=e.getPadding().top,r=e.position==="top";i.x=t.x-o,i.width=e.width+o*2,i.height=t.height+o*2,i.y=t.y+(r?0:-t.height)-o}updateIcon(e,t){const{active:i,iconBackground:o,iconLines:r}=this,{x:s,y:a}=convertPoint(e,t);o.translationX=s-ICON_WIDTH/2,o.translationY=a-ICON_HEIGHT,r.translationX=o.translationX,r.translationY=o.translationY,o.fill=e.fill,o.fillOpacity=e.fillOpacity??1,o.stroke=e.stroke,o.strokeOpacity=e.strokeOpacity??1,o.strokeWidth=e.strokeWidth??1,r.fill=e.stroke,i?o.fillShadow.color=e.fill??"rgba(0, 0, 0, 0.22)":o.fillShadow.color="rgba(0, 0, 0, 0.22)"}updateAnchor(e,t,i){const o=e.getPadding().top,r=e.position==="top",s=r?1:-1;return{x:t.x+i.seriesRect.x+e.width/2,y:t.y+i.seriesRect.y+s*(t.height+o),position:r?"below":"above"}}getLabelCoords(e,t){const i=e.position==="top",o=e.getPadding().top+(0,import_ag_charts_core78.calcLineHeight)(e.fontSize,ANNOTATION_TEXT_LINE_HEIGHT)/2;return{x:t.x,y:t.y+(i?o/2:0)}}getTextBaseline(e){return e.position==="top"?"middle":e.position}getHandleCoords(e,t,i){return{x:t.x,y:t.y+DivariantHandle.HANDLE_SIZE/2+4}}getHandleStyles(e){return{fill:e.handle.fill,stroke:e.handle.stroke??e.fill,strokeOpacity:e.handle.strokeOpacity,strokeWidth:e.handle.strokeWidth}}toggleHovered(e,t,i){super.toggleHovered(e,t,i);const o=e||t&&!i;this.label.visible=o,this.shape.visible=o,this.zIndex=o?import_ag_charts_core78.ZIndexMap.CHART_ANNOTATION_FOCUSED:import_ag_charts_core78.ZIndexMap.CHART_ANNOTATION}toggleActive(e){super.toggleActive(e),this.label.visible=e,this.shape.visible=e,this.active=e}containsPoint(e,t){return this.shape.visible&&this.shape.containsPoint(e,t)||this.iconBackground.containsPoint(e,t)?!0:super.containsPoint(e,t)}},NoteStateMachine=class extends TextualPointStateMachine{createDatum(){return new NoteProperties}},noteConfig={type:"note",datum:NoteProperties,scene:NoteScene,isDatum:NoteProperties.is,translate:(e,t,i,o)=>{NoteProperties.is(t)&&NoteScene.is(e)&&e.translate(t,i,o)},copy:(e,t,i,o)=>{if(NoteProperties.is(t)&&NoteProperties.is(i)&&NoteScene.is(e))return e.copy(t,i,o)},update:(e,t,i)=>{NoteProperties.is(t)&&NoteScene.is(e)&&e.update(t,i)},createState:(e,{createDatum:t})=>new NoteStateMachine({...e,create:t("note")}),dragState:e=>new DragStateMachine(e)},import_ag_charts_core79=require("ag-charts-core"),ParallelChannelScene=class extends ChannelScene{constructor(){super(),this.type="parallel-channel",this.handles={topLeft:new DivariantHandle,topMiddle:new UnivariantHandle,topRight:new DivariantHandle,bottomLeft:new DivariantHandle,bottomMiddle:new UnivariantHandle,bottomRight:new DivariantHandle},this.middleLine=new CollidableLine,this.append([this.background,this.topLine,this.middleLine,this.bottomLine,...Object.values(this.handles)])}static is(e){return AnnotationScene.isCheck(e,"parallel-channel")}dragHandle(e,t,i,o){const{activeHandle:r,handles:s}=this;if(r==null)return;const{offset:a}=s[r].drag(t);s[r].toggleDragging(!0),(r==="topMiddle"||r==="bottomMiddle")&&(a.x=0);let n=[],l=o;switch(r){case"topLeft":case"bottomLeft":n=["topLeft","bottomLeft"];break;case"topMiddle":n=["topLeft","topRight"],a.y-=UnivariantHandle.HANDLE_SIZE/2,l=!1;break;case"topRight":case"bottomRight":n=["topRight","bottomRight"];break;case"bottomMiddle":n=["bottomLeft","bottomRight"],a.y-=UnivariantHandle.HANDLE_SIZE/2,l=!1;break}const c=convertLine(e,i),h=convertLine(e.bottom,i);if(!c||!h)return;const u={topLeft:import_ag_charts_core79.Vec4.start(c),topRight:import_ag_charts_core79.Vec4.end(c),bottomLeft:import_ag_charts_core79.Vec4.start(h),bottomRight:import_ag_charts_core79.Vec4.end(h)},d={vectors:{topLeft:u.topRight,bottomLeft:u.bottomRight,topRight:u.topLeft,bottomRight:u.bottomLeft},angle:e.snapToAngle},p=translate(u,a,i,{overflowContinuous:this.overflowContinuous,translateVectors:n,snap:l?d:void 0});e.start.x=p.topLeft.x,e.start.y=p.topLeft.y,e.end.x=p.topRight.x,e.end.y=p.topRight.y,e.height=p.topLeft.y-p.bottomLeft.y}getTranslatePointsVectors(e,t){const{bottomLeft:i,topLeft:o}=this.handles,r=i.getBBox().y-o.getBBox().y,s=import_ag_charts_core79.Vec2.add(e,import_ag_charts_core79.Vec2.from(0,r)),a=import_ag_charts_core79.Vec2.add(t,import_ag_charts_core79.Vec2.from(0,r));return{start:e,end:t,bottomStart:s,bottomEnd:a}}containsPoint(e,t){return super.containsPoint(e,t)||this.middleLine.visible&&this.middleLine.strokeWidth>0&&this.middleLine.containsPoint(e,t)}getNodeAtCoords(e,t){return this.middleLine.visible&&this.middleLine.strokeWidth>0&&this.middleLine.containsPoint(e,t)?"line":super.getNodeAtCoords(e,t)}updateLines(e,t,i,o,r,s){const{topLine:a,middleLine:n,bottomLine:l}=this,{lineDashOffset:c,stroke:h,strokeOpacity:u,strokeWidth:d}=e,p=e.getLineDash(),g={lineCap:e.getLineCap(),lineDash:p,lineDashOffset:c,stroke:h,strokeOpacity:u,strokeWidth:d};a.setProperties({...t,...g}),l.setProperties({...i,...g});const y=this.extendLine({x1:r.x1,y1:s.y1+(r.y1-s.y1)/2,x2:r.x2,y2:s.y2+(r.y2-s.y2)/2},e,o);n.setProperties({...y,lineDash:e.middle.lineDash??p,lineDashOffset:e.middle.lineDashOffset??c,stroke:e.middle.stroke??h,strokeOpacity:e.middle.strokeOpacity??u,strokeWidth:e.middle.strokeWidth??d,visible:e.middle.visible??!0})}updateHandles(e,t,i){const{handles:{topLeft:o,topMiddle:r,topRight:s,bottomLeft:a,bottomMiddle:n,bottomRight:l}}=this,c={fill:e.handle.fill,stroke:e.handle.stroke??e.stroke,strokeOpacity:e.handle.strokeOpacity??e.strokeOpacity,strokeWidth:e.handle.strokeWidth??e.strokeWidth};o.update({...c,...import_ag_charts_core79.Vec4.start(t)}),s.update({...c,...import_ag_charts_core79.Vec4.end(t)}),a.update({...c,...import_ag_charts_core79.Vec4.start(i)}),l.update({...c,...import_ag_charts_core79.Vec4.end(i)}),r.update({...c,...import_ag_charts_core79.Vec2.sub(import_ag_charts_core79.Vec4.center(t),import_ag_charts_core79.Vec2.from(r.handle.width/2,r.handle.height/2))}),n.update({...c,...import_ag_charts_core79.Vec2.sub(import_ag_charts_core79.Vec4.center(i),import_ag_charts_core79.Vec2.from(n.handle.width/2,n.handle.height/2))})}updateText(e,t,i){this.text=this.updateNode(CollidableText,this.text,!!e.text.label),updateChannelText(!0,t,i,e.text,e.strokeWidth,this.text,e.text.label)}getBackgroundPoints(e,t,i,o){const r=t.x1>t.x2,s=t.y1>t.y2,a=t.x1!==i.x1&&t.y1!==i.y1,n=t.x2!==i.x2&&t.y2!==i.y2,l=import_ag_charts_core79.Vec2.from(t);return e.extendEnd&&n&&l.push(import_ag_charts_core79.Vec2.from(r?o.x1:o.x2,s?o.y1:o.y2)),l.push(...import_ag_charts_core79.Vec2.from(i).reverse()),e.extendStart&&a&&l.push(import_ag_charts_core79.Vec2.from(r?o.x2:o.x1,s?o.y2:o.y1)),l}},import_ag_charts_core80=require("ag-charts-core"),ParallelChannelStateMachine=class extends import_ag_charts_core80.StateMachine{constructor(e){const t=({point:l})=>{const c=new ParallelChannelProperties;c.set({start:l,end:l,height:0}),e.create(c)},i=()=>{const{node:l}=this;l?.toggleActive(!0),l?.toggleHandles({topLeft:!0,topMiddle:!1,topRight:!1,bottomLeft:!1,bottomMiddle:!1,bottomRight:!1})},o=({offset:l,context:c})=>{const{datum:h,snapping:u}=this;h&&(h.set({end:snapPoint(l,c,u,h.start,h.snapToAngle)}),e.update())},r=()=>{this.node?.toggleHandles({topRight:!0}),e.update()},s=({point:l})=>{const{datum:c,node:h}=this,u=getGroupingValue(c?.end.y),d=getGroupingValue(c?.start.y),{y:p}=l;if(c==null||!(0,import_ag_charts_core80.isNumber)(d)||!(0,import_ag_charts_core80.isNumber)(u)||!(0,import_ag_charts_core80.isNumber)(p))return;const g=u-(p??0),y=d-g;h?.toggleHandles({bottomLeft:!0,bottomRight:!0}),!(!e.validatePoint({x:c.start.x,y},{overflowContinuous:!0})||!e.validatePoint({x:c.end.x,y:l.y},{overflowContinuous:!0}))&&(c.set({height:g}),e.update())},a=({point:l})=>{const{datum:c,node:h}=this,u=getGroupingValue(c?.end.y),d=getGroupingValue(c?.start.y),{y:p}=l;if(c==null||!(0,import_ag_charts_core80.isNumber)(d)||!(0,import_ag_charts_core80.isNumber)(u)||!(0,import_ag_charts_core80.isNumber)(p))return;const g=u-(p??0),y=d-g;h?.toggleHandles(!0),!(!e.validatePoint({x:c.start.x,y},{overflowContinuous:!0})||!e.validatePoint({x:c.end.x,y:l.y},{overflowContinuous:!0}))&&(c.set({height:g}),e.recordAction("Create parallel-channel annotation"),e.showAnnotationOptions(),e.update())},n=()=>e.delete();super("start",{start:{click:{target:"waiting-first-render",action:t},drag:{target:"waiting-first-render",action:t},reset:import_ag_charts_core80.StateMachine.parent},"waiting-first-render":{render:{target:"end",action:i}},end:{hover:o,drag:o,click:{target:"height",action:r},dragEnd:{target:"height",action:r},reset:{target:import_ag_charts_core80.StateMachine.parent,action:n},cancel:{target:import_ag_charts_core80.StateMachine.parent,action:n}},height:{hover:s,click:{target:import_ag_charts_core80.StateMachine.parent,action:a},drag:{target:import_ag_charts_core80.StateMachine.parent,action:a},reset:{target:import_ag_charts_core80.StateMachine.parent,action:n},cancel:{target:import_ag_charts_core80.StateMachine.parent,action:n}}}),this.debug=import_ag_charts_core80.Debug.create(!0,"annotations"),this.snapping=!1}};__decorateClass([(0,import_ag_charts_core80.StateMachineProperty)()],ParallelChannelStateMachine.prototype,"datum",2),__decorateClass([(0,import_ag_charts_core80.StateMachineProperty)()],ParallelChannelStateMachine.prototype,"node",2),__decorateClass([(0,import_ag_charts_core80.StateMachineProperty)()],ParallelChannelStateMachine.prototype,"snapping",2);var parallelChannelConfig={type:"parallel-channel",datum:ParallelChannelProperties,scene:ParallelChannelScene,isDatum:ParallelChannelProperties.is,translate:(e,t,i,o)=>{ParallelChannelProperties.is(t)&&ParallelChannelScene.is(e)&&e.translate(t,i,o)},copy:(e,t,i,o)=>{if(ParallelChannelProperties.is(t)&&ParallelChannelProperties.is(i)&&ParallelChannelScene.is(e))return e.copy(t,i,o)},update:(e,t,i)=>{ParallelChannelProperties.is(t)&&ParallelChannelScene.is(e)&&e.update(t,i)},createState:(e,{createDatum:t})=>new ParallelChannelStateMachine({...e,create:t("parallel-channel")}),dragState:e=>new DragStateMachine(e)},TextScene=class extends TextualPointScene{constructor(){super(),this.type="text",this.append([this.label,this.handle])}static is(e){return AnnotationScene.isCheck(e,"text")}getHandleCoords(e,t){const i=DivariantHandle.HANDLE_SIZE/2;return{x:t.x+i,y:t.y+2+i}}},TextStateMachine=class extends TextualPointStateMachine{createDatum(){return new TextProperties}},textConfig={type:"text",datum:TextProperties,scene:TextScene,isDatum:TextProperties.is,translate:(e,t,i,o)=>{TextProperties.is(t)&&TextScene.is(e)&&e.translate(t,i,o)},copy:(e,t,i,o)=>{if(TextProperties.is(t)&&TextProperties.is(i)&&TextScene.is(e))return e.copy(t,i,o)},update:(e,t,i)=>{TextProperties.is(t)&&TextScene.is(e)&&e.update(t,i)},createState:(e,{createDatum:t})=>new TextStateMachine({...e,create:t("text")}),dragState:e=>new DragStateMachine(e)},annotationConfigs={[lineConfig.type]:lineConfig,[horizontalLineConfig.type]:horizontalLineConfig,[verticalLineConfig.type]:verticalLineConfig,[parallelChannelConfig.type]:parallelChannelConfig,[disjointChannelConfig.type]:disjointChannelConfig,[fibonacciRetracementConfig.type]:fibonacciRetracementConfig,[fibonacciRetracementTrendBasedConfig.type]:fibonacciRetracementTrendBasedConfig,[calloutConfig.type]:calloutConfig,[commentConfig.type]:commentConfig,[noteConfig.type]:noteConfig,[textConfig.type]:textConfig,[arrowConfig.type]:arrowConfig,[arrowUpConfig.type]:arrowUpConfig,[arrowDownConfig.type]:arrowDownConfig,[dateRangeConfig.type]:dateRangeConfig,[priceRangeConfig.type]:priceRangeConfig,[datePriceRangeConfig.type]:datePriceRangeConfig,[quickDatePriceRangeConfig.type]:quickDatePriceRangeConfig};function getTypedDatum(e){for(const{isDatum:t}of Object.values(annotationConfigs))if(t(e))return e}var import_ag_charts_community62=require("ag-charts-community"),import_ag_charts_core81=require("ag-charts-core"),AnnotationsStateMachine=class extends import_ag_charts_core81.ParallelStateMachine{constructor(e){super(new SnappingStateMachine(t=>{this.snapping=t}),new UpdateMachine(()=>{this.node=this.active==null?void 0:e.node(this.active)}),new AnnotationsMainStateMachine(e,t=>{this.active=t,this.datum=this.active==null?void 0:e.datum(this.active),this.node=this.active==null?void 0:e.node(this.active)})),this.snapping=!1}getActive(){return this.active}isActive(e){return e===this.active}};__decorateClass([(0,import_ag_charts_core81.StateMachineProperty)()],AnnotationsStateMachine.prototype,"snapping",2),__decorateClass([(0,import_ag_charts_core81.StateMachineProperty)()],AnnotationsStateMachine.prototype,"datum",2),__decorateClass([(0,import_ag_charts_core81.StateMachineProperty)()],AnnotationsStateMachine.prototype,"node",2);var SnappingStateMachine=class extends import_ag_charts_core81.StateMachine{constructor(e){super("idle",{idle:{hover:({shiftKey:t})=>e(t),keyDown:({shiftKey:t})=>e(t),keyUp:({shiftKey:t})=>e(t),click:({shiftKey:t})=>e(t),drag:({shiftKey:t})=>e(t)},dragging:{},translating:{},"text-input":{}})}},UpdateMachine=class extends import_ag_charts_core81.StateMachine{constructor(e){super("idle",{idle:{onEnter:e,render:e},dragging:{onEnter:e,render:e},translating:{onEnter:e,render:e},"text-input":{render:e}})}},AnnotationsMainStateMachine=class extends import_ag_charts_core81.StateMachine{constructor(e,t){const i=m=>v=>{e.create(m,v),this.active=e.selectLast()},o=()=>{this.active!=null&&e.delete(this.active),this.active=void 0,e.select()},r={createDatum:i},s={...e,delete:o,showTextInput:()=>{this.active!=null&&e.showTextInput(this.active)},deselect:()=>{const m=this.active;this.active=void 0,this.hovered=void 0,e.select(this.active,m)},showAnnotationOptions:()=>{this.active!=null&&e.showAnnotationOptions(this.active)}},a=Object.fromEntries(Object.entries(annotationConfigs).map(([m,v])=>[m,v.createState(s,r)])),n=Object.fromEntries(Object.entries(annotationConfigs).map(([m,v])=>[m,v.dragState(e,r)])),l=({colorPickerType:m,colorOpacity:v,color:b,opacity:D,isMultiColor:k})=>{this.datum&&(m==="text-color"&&e.updateTextInputColor(b),setColor(this.datum,m,v,b,D,k),e.update())},c=m=>{const{datum:v,node:b}=this;!v||!b||(isTextType(v)?(v.fontSize=m,e.updateTextInputFontSize(m)):hasLineText(v)&&(v.text.fontSize=m),e.update())},h=m=>{const{datum:v,node:b}=this;!v||!b||!hasLineStyle(v)||(setLineStyle(v,m),e.update())},u=m=>{const{node:v}=this;!v||!("setTextInputBBox"in v)||(v.setTextInputBBox(m),e.update())},d=({textInputValue:m,bbox:v})=>{const{datum:b}=this;if(v!=null&&m!=null&&m.length>0){if(!isTextType(b))return;const D=maybeWrapText(b,m,v.width);b.set({text:D}),e.update(),e.recordAction(`Change ${b.type} annotation text`)}else e.delete(this.active),e.recordAction(`Delete ${b?.type} annotation`)},p=()=>{e.updateTextInputBBox(void 0)},g=()=>this.active!=null,y=()=>this.copied!=null,x=()=>{const{active:m,datum:v}=this;return m==null||!v?!1:hasLineText(v)&&v.isWriteable()},f=()=>this.active!=null&&!isEphemeralType(this.datum),S=()=>this.hovered!=null;super("idle",{idle:{onEnter:()=>{e.select(this.active,this.active),this.hoverCoords&&(this.hovered=e.hoverAtCoords(this.hoverCoords,this.active,this.hovered))},hover:({offset:m})=>{this.hovered=e.hoverAtCoords(m,this.active,this.hovered),this.hoverCoords=m},translate:{guard:g,target:"translating",action:({translation:m})=>{e.startInteracting(),e.translate(this.active,m),e.update()}},copy:{guard:f,action:()=>{this.copied=e.copy(this.active)}},cut:{guard:f,action:()=>{this.copied=e.copy(this.active),o()}},paste:{guard:y,action:()=>{e.paste(this.copied)}},selectLast:()=>{const m=this.active;this.active=e.selectLast(),e.select(this.active,m)},click:[{guard:()=>{const{active:m,hovered:v,datum:b}=this;return m==null||v!==m||!b?!1:isTextType(b)&&b.isWriteable()},target:"text-input"},{action:()=>{const m=this.active;this.active=this.hovered,e.select(this.active,m)}}],dblclick:{guard:x,action:({offset:m})=>{const v=e.getNodeAtCoords(m,this.active)==="text"?"text":"line";e.showAnnotationSettings(this.active,void 0,v)}},dragStart:[{guard:S,target:"dragging",action:()=>{const m=this.active;this.active=this.hovered,e.select(this.active,m),e.startInteracting()}},{action:()=>{const m=this.active;this.active=this.hovered,e.select(this.active,m)}}],color:{guard:g,action:l},fontSize:{guard:g,action:c},lineProps:{guard:g,action:m=>{const v=getTypedDatum(this.datum);v?.set(m),e.update(),e.recordAction(`Change ${v?.type} ${Object.entries(m).map(([b,D])=>`${b} to ${D}`).join(", ")}`)}},lineStyle:{guard:g,action:h},lineText:{guard:g,action:m=>{const v=getTypedDatum(this.datum);hasLineText(v)&&(isChannelType(v)&&m.position==="center"&&(m.position="inside"),v.text.set(m),e.update())}},updateTextInputBBox:{guard:g,action:u},toolbarPressSettings:{guard:x,action:m=>{e.showAnnotationSettings(this.active,m)}},reset:()=>{this.active!=null&&this.node?.toggleActive(!1),this.hovered=void 0,this.active=void 0,e.select(this.active,this.active),e.resetToIdle()},delete:()=>{this.active!=null&&(e.delete(this.active),!isEphemeralType(this.datum)&&e.recordAction(`Delete ${this.datum?.type} annotation`))},deleteAll:()=>{e.deleteAll()},...a},dragging:{onEnter:(m,v)=>{if(this.active==null)return;const b=e.getAnnotationType(this.active);b&&(this.transitionRoot(b),this.transitionRoot("dragStart",v))},...n},translating:{onEnter:()=>{},translate:{guard:g,target:"translating",action:({translation:m})=>{e.startInteracting(),e.translate(this.active,m),e.update()}},translateEnd:{guard:g,target:"idle"},onExit:()=>{e.stopInteracting(),e.update(),e.recordAction("Translate annotation")}},"text-input":{onEnter:()=>{if(this.active==null)return;const m=getTypedDatum(this.datum);!m||!("getTextInputCoords"in m)||(e.startInteracting(),e.showTextInput(this.active),m.visible=!1,e.update())},updateTextInputBBox:{guard:g,action:u},resize:{target:"idle",action:d},click:{target:"idle",action:d},drag:{target:"idle",action:d},textInput:[{guard:guardCancelAndExit,target:"idle",action:p},{guard:guardSaveAndExit,target:"idle",action:d}],color:{guard:g,action:l},fontSize:{guard:g,action:c},cancel:{target:"idle",action:p},onExit:()=>{e.stopInteracting(),e.hideTextInput();const m=this.active;if(this.active=this.hovered=void 0,e.select(this.active,m),m==null)return;const v=e.datum(m),b=e.node(m);!v||!b||(v.visible=!0)}}}),this.setActive=t,this.debug=import_ag_charts_core81.Debug.create(!0,"annotations"),this.snapping=!1}};__decorateClass([(0,import_ag_charts_core81.ActionOnSet)({changeValue(e){this.setActive(e)}}),(0,import_ag_charts_core81.StateMachineProperty)()],AnnotationsMainStateMachine.prototype,"active",2),__decorateClass([(0,import_ag_charts_core81.StateMachineProperty)()],AnnotationsMainStateMachine.prototype,"hovered",2),__decorateClass([(0,import_ag_charts_core81.StateMachineProperty)()],AnnotationsMainStateMachine.prototype,"hoverCoords",2),__decorateClass([(0,import_ag_charts_core81.StateMachineProperty)()],AnnotationsMainStateMachine.prototype,"copied",2),__decorateClass([(0,import_ag_charts_core81.StateMachineProperty)()],AnnotationsMainStateMachine.prototype,"snapping",2),__decorateClass([(0,import_ag_charts_core81.StateMachineProperty)()],AnnotationsMainStateMachine.prototype,"datum",2),__decorateClass([(0,import_ag_charts_core81.StateMachineProperty)()],AnnotationsMainStateMachine.prototype,"node",2);var import_ag_charts_community63=require("ag-charts-community"),import_ag_charts_core82=require("ag-charts-core"),{LayoutElement,Menu:Menu2}=import_ag_charts_community63._ModuleSupport,AnnotationsToolbarButtonProperties=class extends ToolbarButtonProperties{};__decorateClass([import_ag_charts_core82.Property],AnnotationsToolbarButtonProperties.prototype,"value",2);var AnnotationsToolbar=class extends import_ag_charts_core82.BaseProperties{constructor(e){super(),this.ctx=e,this.enabled=!0,this.padding=20,this.buttons=new import_ag_charts_core82.PropertiesArray(AnnotationsToolbarButtonProperties),this.events=new import_ag_charts_core82.EventEmitter,this.annotationMenu=new Menu2(this.ctx,"annotations"),this.cleanup=new import_ag_charts_core82.CleanupRegistry,this.toolbar=e.sharedToolbar.getSharedToolbar("annotations");const t=this.onKeyDown.bind(this);this.toolbar.addListener("keydown",t),this.cleanup.register(this.toolbar.addToolbarListener("button-pressed",this.onToolbarButtonPress.bind(this)),e.layoutManager.registerElement(LayoutElement.ToolbarLeft,this.onLayoutStart.bind(this)),()=>{this.toolbar.removeListener("keydown",t),this.toolbar.destroy()})}destroy(){this.cleanup.flush()}toggleClearButtonEnabled(e){const t=this.buttons.findIndex(i=>i.value==="clear");this.toolbar.toggleButtonEnabledByIndex(t,e)}resetButtonIcons(){for(const[e,t]of this.buttons.entries())switch(t.value){case"line-menu":this.updateButtonByIndex(e,{icon:"trend-line-drawing",value:"line-menu"});break;case"fibonacci-menu":this.updateButtonByIndex(e,{icon:"fibonacci-retracement-drawing",value:"fibonacci-menu"});break;case"text-menu":this.updateButtonByIndex(e,{icon:"text-annotation",value:"text-menu"});break;case"shape-menu":this.updateButtonByIndex(e,{icon:"arrow-drawing",value:"shape-menu"});break;case"measurer-menu":this.updateButtonByIndex(e,{icon:"measurer-drawing",value:"measurer-menu"});break}}hideOverlays(){this.annotationMenu.hide()}clearActiveButton(){this.toolbar.clearActiveButton()}onLayoutStart(e){this.enabled&&(this.toolbar.updateButtons(this.buttons),this.toolbar.layout(e.layoutBox,this.padding))}refreshButtonsEnabled(e){for(const[t,i]of this.buttons.entries())i&&this.toolbar.toggleButtonEnabledByIndex(t,e)}onToolbarButtonPress({event:e,button:t,buttonBounds:i,buttonWidget:o}){const r=this.ctx.axisManager.getAxisContext(import_ag_charts_core82.ChartAxisDirection.Y)[0].scale;switch(t.value){case"clear":this.events.emit("pressed-clear",null);break;case"line-menu":this.onToolbarButtonPressShowMenu(e,i,o,t.value,"toolbarAnnotationsLineAnnotations",LINE_ANNOTATION_ITEMS.filter(s=>s.visible?s.visible(r):!0));break;case"fibonacci-menu":this.onToolbarButtonPressShowMenu(e,i,o,t.value,"toolbarAnnotationsFibonacciAnnotations",FIBONACCI_ANNOTATION_ITEMS);break;case"text-menu":this.onToolbarButtonPressShowMenu(e,i,o,t.value,"toolbarAnnotationsTextAnnotations",TEXT_ANNOTATION_ITEMS);break;case"shape-menu":this.onToolbarButtonPressShowMenu(e,i,o,t.value,"toolbarAnnotationsShapeAnnotations",SHAPE_ANNOTATION_ITEMS);break;case"measurer-menu":this.onToolbarButtonPressShowMenu(e,i,o,t.value,"toolbarAnnotationsMeasurerAnnotations",MEASURER_ANNOTATION_ITEMS);break}}onToolbarButtonPressShowMenu(e,t,i,o,r,s){this.events.emit("pressed-show-menu",null);const a=this.buttons.findIndex(n=>n.value===o);this.toolbar.toggleActiveButtonByIndex(a),this.annotationMenu.setAnchor({x:t.x+t.width+6,y:t.y}),this.annotationMenu.show(i,{items:s,ariaLabel:this.ctx.localeManager.t(r),class:"ag-charts-annotations__toolbar-menu",sourceEvent:e.sourceEvent,onPress:this.onButtonPressMenuCreateAnnotation.bind(this,o)})}onButtonPressMenuCreateAnnotation(e,t){const i=this.buttons.findIndex(o=>o.value===e);this.updateButtonByIndex(i,{icon:t.icon}),this.events.emit("pressed-create-annotation",{annotation:t.value}),this.annotationMenu.hide()}onKeyDown({sourceEvent:e}){e.key==="Escape"&&this.events.emit("cancel-create-annotation",null)}updateButtonByIndex(e,t){const i=this.buttons.at(e);i&&(i.set({...i.toJson(),...t,value:t.value??i.value}),this.toolbar.updateButtonByIndex(e,{...i.toJson()}))}};__decorateClass([import_ag_charts_core82.Property,(0,import_ag_charts_core82.ActionOnSet)({changeValue(e){this.toolbar?.setHidden(!e)}})],AnnotationsToolbar.prototype,"enabled",2),__decorateClass([import_ag_charts_core82.Property],AnnotationsToolbar.prototype,"padding",2),__decorateClass([import_ag_charts_core82.Property],AnnotationsToolbar.prototype,"buttons",2);var import_ag_charts_community64=require("ag-charts-community"),import_ag_charts_core83=require("ag-charts-core"),{InteractionState}=import_ag_charts_community64._ModuleSupport,DEFAULT_ANNOTATION_AXIS_BUTTON_CLASS="ag-charts-annotations__axis-button",AxisButton=class extends import_ag_charts_core83.AbstractModuleInstance{constructor(e,t,i,o){super(),this.ctx=e,this.axisCtx=t,this.onButtonClick=i,this.seriesRect=o,this.enabled=!0,this.snap=!1,this.padding=0,this.button=this.setup(),this.toggleVisibility(!1),this.updateButtonElement(),this.snap=!!t.scale.bandwidth,e.domManager.addEventListener("focusin",({target:r})=>{const s=r instanceof HTMLElement?r:void 0;!(s&&e.domManager.contains(s,"series-area"))&&s!==this.button.getElement()&&this.hide()}),this.cleanup.register(e.widgets.seriesWidget.addListener("drag-move",r=>this.onMouseDrag(r)),e.widgets.seriesWidget.addListener("mousemove",r=>this.onMouseMove(r)),e.widgets.seriesWidget.addListener("mouseleave",()=>this.onMouseLeave()),e.widgets.seriesDragInterpreter?.events.on("click",r=>this.onClick(r)),e.eventsHub.on("series:focus-change",()=>this.onKeyPress()),e.eventsHub.on("zoom:pan-start",()=>this.hide()),e.eventsHub.on("zoom:change-complete",()=>this.hide()),()=>this.destroyElements(),()=>this.button.destroy())}update(e,t){this.seriesRect=e,this.padding=t}setup(){const e=new import_ag_charts_community64._Widget.ButtonWidget;return e.addClass(DEFAULT_ANNOTATION_AXIS_BUTTON_CLASS),e.setTabIndex(-1),e.setAriaLabel(this.ctx.localeManager.t("ariaLabelAddHorizontalLine")),this.ctx.widgets.seriesWidget.getElement().appendChild(e.getElement()),e}destroyElements(){this.ctx.domManager.removeChild("canvas-overlay",DEFAULT_ANNOTATION_AXIS_BUTTON_CLASS)}onMouseMove(e){this.ctx.interactionManager.isState(InteractionState.Clickable)&&this.show(e)}onMouseDrag(e){this.ctx.interactionManager.isState(InteractionState.AnnotationsMoveable)&&this.show(e)}onMouseLeave(){this.ctx.interactionManager.isState(InteractionState.Clickable)&&this.hide()}onClick(e){this.ctx.interactionManager.isState(InteractionState.Clickable)&&e.device==="touch"&&this.show(e)}show(e){const{sourceEvent:t,currentX:i,currentY:o}=e;if(!(this.enabled&&this.ctx.widgets.seriesWidget.getElement().contains(t.target))){this.hide();return}this.toggleVisibility(!0);const r=this.getButtonCoordinates({x:i,y:o});this.coords={x:r.x+this.button.clientWidth/2,y:r.y+this.button.clientHeight/2},this.updatePosition(r)}hide(){this.toggleVisibility(!1)}onKeyPress(){this.snap&&this.ctx.interactionManager.isState(InteractionState.Default)||this.hide()}getButtonCoordinates({x:e,y:t}){const{axisCtx:{direction:i,position:o},seriesRect:r,snap:s,axisCtx:a,padding:n}=this,{clientWidth:l,clientHeight:c}=this.button,[h,u]=[0,r.height],[d,p]=[0,r.width];if(s&&(e=convert(invert(e-r.x,a),a)+r.x,t=convert(invert(t-r.y,a),a)+r.y),i===import_ag_charts_core83.ChartAxisDirection.X){const y=c-Math.max(0,n-5);e=e-l/2,t=o==="top"?h-c+y:u-y}else{const y=l-Math.max(0,n-9);e=o==="left"?d-l+y:p-y,t=t-c/2}return{x:e,y:t}}toggleVisibility(e){const{button:t}=this;if(t==null)return;const i=this.enabled&&e;this.toggleClass("-hidden",!i)}toggleClass(e,t){this.button.toggleClass(`${DEFAULT_ANNOTATION_AXIS_BUTTON_CLASS}-${e}`,t)}updatePosition({x:e,y:t}){this.button.getElement().style.transform=`translate(${Math.round(e)}px, ${Math.round(t)}px)`}updateButtonElement(){const{button:e}=this;e.addListener("click",()=>this.onButtonClick(this.coords)),e.addListener("touchend",()=>this.onButtonClick(this.coords)),e.addListener("drag-start",()=>{}),e.setInnerHTML(`<span class="${(0,import_ag_charts_core83.getIconClassNames)("zoom-in")} ${DEFAULT_ANNOTATION_AXIS_BUTTON_CLASS}-icon"></span>`)}};__decorateClass([import_ag_charts_core83.Property],AxisButton.prototype,"enabled",2);var import_ag_charts_community66=require("ag-charts-community"),import_ag_charts_core85=require("ag-charts-core"),import_ag_charts_community65=require("ag-charts-community"),import_ag_charts_core84=require("ag-charts-core"),{DraggablePopover,NativeWidget}=import_ag_charts_community65._ModuleSupport,_Dialog=class xe extends DraggablePopover{constructor(t,i){super(t,i),this.dragHandleDraggingClass="ag-charts-dialog__drag-handle--dragging",this.colorPicker=new ColorPicker(this.ctx,{detached:!0}),this.cleanup.register(t.eventsHub.on("layout:complete",this.onLayoutComplete.bind(this)))}showWithChildren(t,i){const o=super.showWithChildren(t,i);return o.classList.add("ag-charts-dialog"),o.setAttribute("role","dialog"),o.addEventListener("mousedown",r=>{r.target.classList?.contains("ag-charts-dialog__color-picker-button")||this.colorPicker.hide()}),o.addEventListener("keydown",this.onKeyDown.bind(this)),(0,import_ag_charts_core84.getWindow)().requestAnimationFrame(()=>this.reposition()),this.colorPicker.attachTo(this),o}updatePosition(t){super.updatePosition(t);const{anchor:i,fallbackAnchor:o}=this.getColorPickerAnchors()??{};i&&this.colorPicker.setAnchor(i,o)}createTabs(t,i,o){const r=(0,import_ag_charts_core84.createElement)("div","ag-charts-dialog__tabs"),s=(0,import_ag_charts_core84.mapValues)(o,()=>(0,import_ag_charts_core84.createElementId)()),a=(0,import_ag_charts_core84.mapValues)(o,()=>(0,import_ag_charts_core84.createElementId)());for(const[p,g]of(0,import_ag_charts_core84.entries)(o))(0,import_ag_charts_core84.setAttributes)(g.panel,{id:a[p],role:"tabpanel","aria-labelledby":s[p]});const n=p=>{for(const[g,y]of(0,import_ag_charts_core84.entries)(o))y.panel.classList.toggle("ag-charts-dialog__tab-panel--active",g===p),h[g].classList.toggle("ag-charts-dialog__tab-button--active",g===p),(0,import_ag_charts_core84.setAttribute)(h[g],"aria-selected",g===p),g===p&&y.onShow?.()},l=new NativeWidget((0,import_ag_charts_core84.createElement)("div","ag-charts-dialog__header"));l.addListener("drag-start",p=>{const{sourceEvent:g}=p;g.target instanceof Element&&g.target.classList.contains("ag-charts-dialog__header")&&this.onDragStart(p)}),l.addListener("drag-move",p=>this.onDragMove(p)),l.addListener("drag-end",()=>this.onDragEnd());const c=new DragHandleWidget;this.setDragHandle(c);const h=(0,import_ag_charts_core84.mapValues)(o,(p,g)=>(0,import_ag_charts_core84.createButton)({label:this.ctx.localeManager.t(p.label),onPress:()=>n(g)},{id:s[g],class:"ag-charts-dialog__tab-button",role:"tab","aria-controls":a[g]})),u=(0,import_ag_charts_core84.createElement)("div","ag-charts-dialog__tab-list");(0,import_ag_charts_core84.setAttributes)(u,{role:"tablist","aria-label":this.ctx.localeManager.t(t)}),u.append(...Object.values(h));const d=this.createHeaderCloseButton();return l.getElement().append(c.getElement(),u,d),r.append(l.getElement(),...Object.values(o).map(p=>p.panel)),n(i),(0,import_ag_charts_core84.initRovingTabIndex)({orientation:"horizontal",buttons:Object.values(h)}),{tabs:r,initialFocus:h[i]}}createTabPanel(){return(0,import_ag_charts_core84.createElement)("div","ag-charts-dialog__tab-panel")}createInputGroupLine(){return(0,import_ag_charts_core84.createElement)("div","ag-charts-dialog__input-group-line")}createRadioGroup({label:t,options:i,value:o,onChange:r}){const s=this.createInputGroup(t);(0,import_ag_charts_core84.setAttributes)(s,{role:"radiogroup",tabindex:-1,"aria-label":this.ctx.localeManager.t(t)});const a="ag-charts-dialog__button--active",n=[];for(const l of i){const{icon:c,altText:h}=l,u=this.ctx.localeManager.t(h),d=(0,import_ag_charts_core84.createButton)({icon:c,altText:u,onPress:()=>{for(const p of Array.from(s.children))p.classList.remove(a),p.ariaChecked="false";d.classList.add(a),d.ariaChecked="true",r(l.value)}},{"aria-checked":l.value===o,class:"ag-charts-dialog__button",role:"radio",title:u});l.value===o&&d.classList.add(a),s.appendChild(d),n.push(d)}return(0,import_ag_charts_core84.initRovingTabIndex)({orientation:"horizontal",buttons:n}),s}createSelect({altText:t,label:i,options:o,value:r,onChange:s}){const a=this.createInputGroup(i),n=this.ctx.localeManager.t(t),l=(0,import_ag_charts_core84.createSelect)({value:r,options:o,onChange:s},{class:"ag-charts-dialog__select","aria-label":n,title:n});return a.append(l),a}createTextArea({placeholder:t,value:i,onChange:o}){const r=t?this.ctx.localeManager.t(t):void 0;return(0,import_ag_charts_core84.createTextArea)({value:i,onChange:o},{placeholder:r})}createCheckbox({label:t,checked:i,onChange:o}){const r=(0,import_ag_charts_core84.createElementId)(),s=this.createInputGroup(t,{for:r}),a=(0,import_ag_charts_core84.createCheckbox)({checked:i,onChange:o},{class:"ag-charts-dialog__checkbox",role:"switch",id:r});return s.append(a),s}createColorPicker({color:t,opacity:i,label:o,altText:r,onChange:s,onChangeHide:a,isMultiColor:n,hasMultiColorOption:l}){const c=this.createInputGroup(o),h=this.ctx.localeManager.t(r),u=(0,import_ag_charts_core84.createButton)({label:h,onPress:d=>{const{anchor:p,fallbackAnchor:g}=this.getColorPickerAnchors(u)??{};this.colorPicker.show({anchor:p,fallbackAnchor:g,color:t,opacity:i,isMultiColor:n,hasMultiColorOption:l,sourceEvent:d,onChange:(y,x,f,S)=>{u.style.setProperty("--color",y),u.classList.toggle("ag-charts-dialog__color-picker-button--multi-color",S),s(y,x,f,S)},onChangeHide:a})}},{"aria-label":h,tabindex:0,class:"ag-charts-dialog__color-picker-button",title:h});if(n)u.classList.toggle("ag-charts-dialog__color-picker-button--multi-color");else if(t){const d=import_ag_charts_core84.Color.fromString(t),p=new import_ag_charts_core84.Color(d.r,d.g,d.b,i);u.style.setProperty("--color",p.toHexString())}return c.append(u),this.hideFns.push(()=>{this.colorPicker.hide()}),c}createHeaderCloseButton(){return(0,import_ag_charts_core84.createButton)({icon:"close",altText:this.ctx.localeManager.t("iconAltTextClose"),onPress:()=>this.hide()},{class:"ag-charts-dialog__close-button"})}createInputGroup(t,i){const o=(0,import_ag_charts_core84.createElement)("div","ag-charts-dialog__input-group"),r=(0,import_ag_charts_core84.createElement)("label","ag-charts-dialog__input-group-label");return r.innerText=this.ctx.localeManager.t(t),(0,import_ag_charts_core84.setAttribute)(r,"for",i?.for),o.appendChild(r),o}onLayoutComplete(t){this.seriesRect=t.series.paddedRect,this.reposition()}onKeyDown(t){t.altKey||t.ctrlKey||t.metaKey||t.isComposing||t.key!=="Escape"||this.hide()}reposition(){const{seriesRect:t,ctx:i}=this,o=this.getPopoverElement();if(!t||!o)return;const r=i.domManager.getBoundingClientRect(),s=import_ag_charts_core84.Vec2.from(0,t.y),a=import_ag_charts_core84.Vec2.from(r.width,t.height),n=import_ag_charts_core84.Vec2.from(o),l=import_ag_charts_core84.Vec2.from(.5,1);let c;if(t.width>1e3){const h=import_ag_charts_core84.Vec2.sub(import_ag_charts_core84.Vec2.add(s,import_ag_charts_core84.Vec2.multiply(a,l)),import_ag_charts_core84.Vec2.multiply(n,l));c=import_ag_charts_core84.Vec2.sub(h,import_ag_charts_core84.Vec2.from(0,xe.offset))}else{const h=import_ag_charts_core84.Vec2.sub(import_ag_charts_core84.Vec2.add(s,a),n);c=import_ag_charts_core84.Vec2.sub(h,xe.offset)}this.updatePosition(c)}getColorPickerAnchors(t){if(t&&(this.colorPickerAnchorElement=t),!this.colorPickerAnchorElement)return;const i=this.colorPickerAnchorElement.getBoundingClientRect(),o=this.ctx.domManager.getBoundingClientRect(),r=import_ag_charts_core84.Vec2.sub(import_ag_charts_core84.Vec2.from(i.x,i.y),import_ag_charts_core84.Vec2.from(o.left,o.top)),s=import_ag_charts_core84.Vec2.add(r,import_ag_charts_core84.Vec2.from(0,i.height+5)),a=import_ag_charts_core84.Vec2.sub(r,import_ag_charts_core84.Vec2.from(0,5));return{anchor:s,fallbackAnchor:a}}};_Dialog.offset=60;var Dialog=_Dialog,DragHandleWidget=class extends NativeWidget{constructor(){super((0,import_ag_charts_core84.createElement)("div","ag-charts-dialog__drag-handle"));const e=new NativeWidget((0,import_ag_charts_core84.createElement)("span",(0,import_ag_charts_core84.getIconClassNames)("drag-handle")));e.setAriaHidden(!0),this.addChild(e)}},AnnotationSettingsDialog=class extends Dialog{constructor(e){super(e,"settings"),this.events=new import_ag_charts_core85.EventEmitter,this.hideFns.push(()=>this.events.emit("hidden",null))}show(e,t){const i=this.createLinearLineTab(e,t),o=this.createLinearTextTab(e,t);let r="dialogHeaderLine";isChannelType(e)?r="dialogHeaderChannel":isFibonacciType(e)?r="dialogHeaderFibonacciRange":e.type==="date-range"?r="dialogHeaderDateRange":e.type==="price-range"?r="dialogHeaderPriceRange":e.type==="date-price-range"&&(r="dialogHeaderDatePriceRange");const{tabs:s,initialFocus:a}=this.createTabs("ariaLabelSettingsTabBar",t.initialSelectedTab,{line:{label:r,panel:i},text:{label:"dialogHeaderText",panel:o.panel,onShow:o.onShow}});t.initialFocus=a,this.showWithChildren([s],t).classList.add("ag-charts-dialog--annotation-settings")}createLinearLineTab(e,t){const i=this.createTabPanel(),o=this.createInputGroupLine(),r=this.createInputGroupLine(),s="isMultiColor"in e,a=this.createColorPickerInput("line-color",e.getDefaultColor("line-color"),e.getDefaultOpacity("line-color"),s?e.isMultiColor:!1,s,t.onChangeLineColor,t.onChangeHideLineColor),n=this.createStrokeWidthSelect(e.strokeWidth??2,t.onChangeLineStyleWidth),l=this.createLineStyleRadioGroup(e.lineStyle??"solid",t.onChangeLineStyleType);if(o.append(a),"background"in e){const c=this.createColorPickerInput("fill-color",e.getDefaultColor("fill-color"),e.getDefaultOpacity("fill-color"),!1,!1,t.onChangeFillColor,t.onChangeHideFillColor);o.append(c),r.append(n)}else"showFill"in e?(o.append(this.createCheckbox({label:"dialogInputShowFill",checked:e.showFill??!0,onChange:c=>t.onChangeLine({showFill:c})})),r.append(n)):o.append(n);return r.append(l),i.append(o,r),"bands"in e&&i.append(this.createFibonacciRatioSelect(e.bands??10,c=>t.onChangeLine({bands:c}))),"extendStart"in e&&"extendEnd"in e&&i.append(this.createCheckbox({label:isChannelType(e)?"dialogInputExtendChannelStart":"dialogInputExtendLineStart",checked:e.extendStart??!1,onChange:c=>t.onChangeLine({extendStart:c})}),this.createCheckbox({label:isChannelType(e)?"dialogInputExtendChannelEnd":"dialogInputExtendLineEnd",checked:e.extendEnd??!1,onChange:c=>t.onChangeLine({extendEnd:c})})),"extendAbove"in e&&"extendBelow"in e&&i.append(this.createCheckbox({label:"dialogInputExtendAbove",checked:e.extendAbove??!1,onChange:c=>t.onChangeLine({extendAbove:c})}),this.createCheckbox({label:"dialogInputExtendBelow",checked:e.extendBelow??!1,onChange:c=>t.onChangeLine({extendBelow:c})})),"extendLeft"in e&&"extendRight"in e&&i.append(this.createCheckbox({label:"dialogInputExtendLeft",checked:e.extendLeft??!1,onChange:c=>t.onChangeLine({extendLeft:c})}),this.createCheckbox({label:"dialogInputExtendRight",checked:e.extendRight??!1,onChange:c=>t.onChangeLine({extendRight:c})})),"reverse"in e&&"showFill"in e&&i.append(this.createCheckbox({label:"dialogInputReverse",checked:e.reverse??!1,onChange:c=>t.onChangeLine({reverse:c})})),i}createLinearTextTab(e,t){const i=this.createTabPanel(),o=this.createTextArea({placeholder:"inputTextareaPlaceholder",value:e.text.label,onChange:h=>t.onChangeText({label:h})}),r=this.createFontSizeSelect(e.text.fontSize,t.onChangeTextFontSize),s=this.createColorPickerInput("text-color",e.text.color,1,!1,!1,t.onChangeTextColor,t.onChangeHideTextColor),a=e.text.position==="inside"?"center":e.text.position,n=this.createPositionRadioGroup(a??"top",h=>t.onChangeText({position:h})),l=this.createAlignmentRadioGroup(e.text.alignment??"center",h=>t.onChangeText({alignment:h})),c=this.createInputGroupLine();return c.append(r,s,n,l),i.append(o,c),{panel:i,onShow:()=>(0,import_ag_charts_core85.focusCursorAtEnd)(o)}}createColorPickerInput(e,t,i,o,r,s,a){const n=e==="fill-color"?"dialogInputFillColorPicker":"dialogInputColorPicker",l=e==="fill-color"?"dialogInputFillColorPickerAltText":"dialogInputColorPickerAltText";return this.createColorPicker({label:n,altText:l,color:t,opacity:i,isMultiColor:o,hasMultiColorOption:r,onChange:s,onChangeHide:a})}createStrokeWidthSelect(e,t){return this.createSelect({label:"dialogInputStrokeWidth",altText:"dialogInputStrokeWidthAltText",options:LINE_STROKE_WIDTH_ITEMS.map(({label:i,value:o})=>({label:i,value:`${o}`})),value:String(e),onChange:i=>t(Number(i))})}createFibonacciRatioSelect(e,t){return this.createSelect({label:"dialogInputFibonacciBands",altText:"dialogInputFibonacciBandsAltText",options:FIBONACCI_RATIO_ITEMS.map(({label:i,value:o})=>({label:i,value:`${o}`})),value:String(e),onChange:i=>t(Number(i))})}createLineStyleRadioGroup(e,t){return this.createRadioGroup({label:"dialogInputLineStyle",options:[{icon:"line-style-solid",altText:"iconAltTextLineStyleSolid",value:"solid"},{icon:"line-style-dashed",altText:"iconAltTextLineStyleDashed",value:"dashed"},{icon:"line-style-dotted",altText:"iconAltTextLineStyleDotted",value:"dotted"}],value:e,onChange:t})}createFontSizeSelect(e,t){return this.createSelect({label:"dialogInputFontSize",altText:"dialogInputFontSizeAltText",options:TEXT_SIZE_ITEMS.map(({label:i,value:o})=>({label:i,value:String(o)})),value:String(e),onChange:i=>t(Number(i))})}createPositionRadioGroup(e,t){return this.createRadioGroup({label:"dialogInputPosition",options:[{icon:"position-top",altText:"iconAltTextPositionTop",value:"top"},{icon:"position-center",altText:"iconAltTextPositionCenter",value:"center"},{icon:"position-bottom",altText:"iconAltTextPositionBottom",value:"bottom"}],value:e,onChange:t})}createAlignmentRadioGroup(e,t){return this.createRadioGroup({label:"dialogInputAlign",options:[{icon:"align-left",altText:"iconAltTextAlignLeft",value:"left"},{icon:"align-center",altText:"iconAltTextAlignCenter",value:"center"},{icon:"align-right",altText:"iconAltTextAlignRight",value:"right"}],value:e,onChange:t})}};function calculateAxisLabelPadding(e){return e.gridPadding+e.seriesAreaPadding+e.tickSize+e.label.spacing}function updateAnnotation(e,t,i){for(const{update:o}of Object.values(annotationConfigs))o(e,t,i)}var{InteractionState:InteractionState2,keyProperty,valueProperty,Selection:Selection3,BBox:BBox3}=import_ag_charts_community67._ModuleSupport,_Annotations=class Ae extends import_ag_charts_core86.AbstractModuleInstance{constructor(t){super(),this.ctx=t,this.toolbar=new AnnotationsToolbar(this.ctx),this.optionsToolbar=new AnnotationOptionsToolbar(this.ctx,()=>{const i=this.state.getActive();if(i!=null)return getTypedDatum(this.annotationData.at(i))}),this.axesButtons=new AxesButtons,this.enabled=!0,this.snap=!1,this.data=void 0,this.xKey=void 0,this.volumeKey=void 0,this.annotationData=new import_ag_charts_core86.PropertiesArray(Ae.createAnnotationDatum),this.defaults=new AnnotationDefaults,this.container=new import_ag_charts_community67._ModuleSupport.Group({name:"static-annotations"}),this.annotations=new Selection3(this.container,this.createAnnotationScene.bind(this)),this.settingsDialog=new AnnotationSettingsDialog(this.ctx),this.textInput=new TextInput(this.ctx),this.postUpdateFns=[],this.state=this.setupStateMachine(),this.setupListeners(),this.setupDOM(),this.ctx.historyManager.addMementoOriginator(t.annotationManager),this.ctx.historyManager.addMementoOriginator(this.defaults),this.textInput.setKeyDownHandler(this.onTextInput.bind(this)),this.cleanup.register(()=>{this.clear(),this.xAxis?.button?.destroy(),this.yAxis?.button?.destroy(),this.textInput.destroy()})}setupStateMachine(){const{ctx:t}=this;return new AnnotationsStateMachine({resetToIdle:()=>{t.domManager.updateCursor("annotations"),this.popAnnotationState(InteractionState2.Annotations),this.hideOverlays(),this.optionsToolbar.hide(),this.deleteEphemeralAnnotations(),this.update()},hoverAtCoords:(i,o,r)=>{let s;return this.annotations.each((a,n,l)=>{if(!n.isHoverable())return;const c=a.containsPoint(i.x,i.y);c&&(s??(s=l)),a.toggleHovered(c,o===l,n.readOnly)}),s!=null?t.tooltipManager.suppressTooltip("annotations"):this.isAnnotationState()||t.tooltipManager.unsuppressTooltip("annotations"),(s==null||!this.annotationData.at(s)?.readOnly)&&this.ctx.domManager.updateCursor("annotations",s==null?void 0:this.annotations.at(s)?.getCursor()),s!==r&&this.update(),s},getNodeAtCoords:(i,o)=>{const r=this.annotations.at(o);if(r)return r.getNodeAtCoords(i.x,i.y)},translate:(i,o)=>{const r=this.annotations.at(i),s=getTypedDatum(this.annotationData.at(i));if(!(!r||!s))return this.translateNode(r,s,o)},copy:i=>{const o=this.annotations.at(i),r=getTypedDatum(this.annotationData.at(i));if(!(!o||!r))return this.createAnnotationDatumCopy(o,r)},paste:i=>{this.createAnnotation(i.type,i,!1),this.postUpdateFns.push(()=>{this.state.transitionAsync("selectLast"),this.state.transitionAsync("copy")})},select:(i,o)=>{const{annotations:r,optionsToolbar:s,toolbar:a}=this;this.hideOverlays(),a.clearActiveButton(),a.resetButtonIcons();const n=i==null?null:r.at(i),l=o==null?null:r.at(o),c=i==null?null:this.annotationData.at(i);l===n&&n!=null||(l?.toggleActive(!1),s.hide(),n&&!c?.readOnly?(this.pushAnnotationState(InteractionState2.AnnotationsSelected),n.toggleActive(!0),isEphemeralType(c)||(s.updateButtons(this.annotationData.at(i)),this.postUpdateFns.push(()=>{s.show(),s.setAnchorScene(n)}))):(this.popAnnotationState(InteractionState2.AnnotationsSelected),this.popAnnotationState(InteractionState2.Annotations)),isEphemeralType(c)||this.deleteEphemeralAnnotations(),this.update())},selectLast:()=>(this.pushAnnotationState(InteractionState2.AnnotationsSelected),this.annotationData.length-1),startInteracting:()=>{this.pushAnnotationState(InteractionState2.Annotations)},stopInteracting:()=>{this.popAnnotationState(InteractionState2.Annotations)},create:(i,o)=>{this.createAnnotation(i,o)},delete:i=>{this.annotationData.splice(i,1)},deleteAll:()=>{const i=this.annotationData.filter(o=>{if(o.readOnly===!0)return o});this.annotationData.splice(0,this.annotationData.length);for(const o of i)this.annotationData.push(o)},validatePoint:(i,o)=>{const r=this.getAnnotationContext();return r?validateDatumPoint(r,i,o):!0},getAnnotationType:i=>stringToAnnotationType(this.annotationData[i].type),datum:i=>this.annotationData.at(i),node:i=>this.annotations.at(i),recordAction:i=>{this.recordActionAfterNextUpdate(i)},update:()=>{this.postUpdateFns.push(()=>{const i=this.state.getActive(),o=i==null?null:this.annotations.at(i);o!=null&&this.optionsToolbar.setAnchorScene(o)}),this.update()},showTextInput:i=>{const o=getTypedDatum(this.annotationData.at(i));if(!this.annotations.at(i)||!o||!("getTextInputCoords"in o)||!("getTextPosition"in o))return;const s={color:o.color,fontFamily:o.fontFamily,fontSize:o.fontSize,fontStyle:o.fontStyle,fontWeight:o.fontWeight,placeholderColor:o.getPlaceholderColor()},a=this.getAnnotationContext(),n=c=>import_ag_charts_core86.Vec2.add(o.getTextInputCoords(a,c),import_ag_charts_core86.Vec2.required(this.seriesRect)),l=()=>o.getTextPosition();this.textInput.show({styles:s,layout:{getTextInputCoords:n,getTextPosition:l,alignment:o.alignment,textAlign:o.textAlign,width:o.width},text:o.text,placeholderText:o.placeholderText,onChange:(c,h)=>{this.state.transition("updateTextInputBBox",h)}}),this.ctx.domManager.updateCursor("annotations")},hideTextInput:()=>{this.textInput.hide()},updateTextInputColor:i=>{this.textInput.updateColor(i)},updateTextInputFontSize:i=>{const o=this.textInput.updateFontSize(i);this.state.transition("updateTextInputBBox",o)},updateTextInputBBox:i=>{this.state.transition("updateTextInputBBox",i)},showAnnotationOptions:i=>{const o=this.annotations.at(i);!o||isEphemeralType(this.annotationData.at(i))||(this.optionsToolbar.updateButtons(this.annotationData.at(i)),this.optionsToolbar.show(),this.optionsToolbar.setAnchorScene(o))},showAnnotationSettings:(i,o,r="line")=>{const s=this.annotationData.at(i);if(!isLineType(s)&&!isChannelType(s)&&!isMeasurerType(s)||isEphemeralType(s))return;const a=c=>(h,u,d,p)=>{this.setColorAndDefault(s.type,c,h,u,d,p),this.optionsToolbar.updateColorPickerColor(c,u,d,p)},n=c=>()=>{this.recordActionAfterNextUpdate(`Change ${s.type} ${c} to ${s.getDefaultColor(c)}`,["annotations","defaults"]),this.update()},l={initialSelectedTab:r,ariaLabel:this.ctx.localeManager.t("ariaLabelAnnotationSettingsDialog"),sourceEvent:o,onChangeLine:c=>{this.state.transition("lineProps",c),c.bands!=null&&this.defaults.setDefaultFibonacciOptions(s.type,"bands",c.bands),c.reverse!=null&&this.defaults.setDefaultFibonacciOptions(s.type,"reverse",c.reverse),c.showFill!=null&&this.defaults.setDefaultFibonacciOptions(s.type,"showFill",c.showFill)},onChangeText:c=>{this.state.transition("lineText",c),c.alignment&&this.defaults.setDefaultLineTextAlignment(s.type,c.alignment),c.position&&this.defaults.setDefaultLineTextPosition(s.type,c.position),this.recordActionAfterNextUpdate(`Change ${s.type} text ${Object.keys(c).map(h=>`${h} to ${c[h]}`).join(", ")}`)},onChangeFillColor:a("fill-color"),onChangeHideFillColor:n("fill-color"),onChangeLineColor:a("line-color"),onChangeHideLineColor:n("line-color"),onChangeLineStyleType:c=>{this.setLineStyleTypeAndDefault(s.type,c),this.optionsToolbar.updateLineStyleType(LINE_STYLE_TYPE_ITEMS.find(h=>h.value===c)??LINE_STYLE_TYPE_ITEMS[0])},onChangeLineStyleWidth:c=>{this.setLineStyleWidthAndDefault(s.type,c),this.optionsToolbar.updateStrokeWidth({strokeWidth:c,value:c,label:String(c)})},onChangeTextColor:a("text-color"),onChangeHideTextColor:n("text-color"),onChangeTextFontSize:c=>{this.setFontSizeAndDefault(s.type,c)}};this.settingsDialog.show(s,l)}})}setupListeners(){const{ctx:t,optionsToolbar:i,settingsDialog:o,toolbar:r}=this,{seriesWidget:s,seriesDragInterpreter:a,chartWidget:n}=t.widgets;a&&this.cleanup.register(a.events.on("click",this.hoverTouchPreHandler.bind(this)),a.events.on("drag-start",this.hoverTouchPreHandler.bind(this)),a.events.on("drag-move",this.dragMoveTouchPreHandler.bind(this)),a.events.on("mousemove",this.onHover.bind(this)),a.events.on("click",this.onClick.bind(this)),a.events.on("dblclick",this.onDoubleClick.bind(this)),a.events.on("drag-start",this.onDragStart.bind(this)),a.events.on("drag-move",this.onDrag.bind(this)),a.events.on("drag-end",this.onDragEnd.bind(this))),this.cleanup.register(s.addListener("keydown",this.onKeyDown.bind(this)),s.addListener("keyup",this.onKeyUp.bind(this)),n.addListener("click",this.onCancel.bind(this)),t.eventsHub.on("annotations:restore",this.onRestoreAnnotations.bind(this)),t.eventsHub.on("layout:complete",this.onLayoutComplete.bind(this)),t.updateService.addListener("pre-scene-render",this.onPreRender.bind(this)),t.eventsHub.on("zoom:change-complete",()=>this.onResize()),t.eventsHub.on("dom:resize",()=>this.onResize()),r.events.on("cancel-create-annotation",()=>{this.cancel(),this.reset(),this.update()}),r.events.on("pressed-create-annotation",({annotation:l})=>{this.cancel(),this.pushAnnotationState(InteractionState2.Annotations),this.state.transition(l),this.update()}),r.events.on("pressed-clear",()=>{this.clear(),this.recordActionAfterNextUpdate("Clear all")}),r.events.on("pressed-show-menu",()=>{this.cancel(),this.reset()}),r.events.on("pressed-unrelated",()=>{this.reset()}),i.events.on("pressed-delete",()=>{this.cancel(),this.delete(),this.reset()}),i.events.on("pressed-settings",({sourceEvent:l})=>{this.state.transition("toolbarPressSettings",l)}),i.events.on("pressed-lock",({locked:l})=>{this.recordActionAfterNextUpdate(l?"Locked":"Unlocked"),this.update()}),i.events.on("hid-overlays",()=>{this.settingsDialog.hide()}),i.events.on("saved-color",({type:l,colorPickerType:c,color:h})=>{this.recordActionAfterNextUpdate(`Change ${l} ${c} to ${h}`,["annotations","defaults"])}),i.events.on("updated-color",({type:l,colorPickerType:c,colorOpacity:h,color:u,opacity:d,isMultiColor:p})=>{this.setColorAndDefault(l,c,h,u,d,p)}),i.events.on("updated-font-size",({type:l,fontSize:c})=>{this.setFontSizeAndDefault(l,c)}),i.events.on("updated-line-style",({type:l,lineStyleType:c})=>{this.setLineStyleTypeAndDefault(l,c)}),i.events.on("updated-line-width",({type:l,strokeWidth:c})=>{this.setLineStyleWidthAndDefault(l,c)}),o.events.on("hidden",()=>{this.optionsToolbar.clearActiveButton()}))}setupDOM(){const{ctx:t,toolbar:i,optionsToolbar:o}=this;this.cleanup.register(t.annotationManager.attachNode(this.container),()=>{t.domManager.removeStyles(DEFAULT_ANNOTATION_AXIS_BUTTON_CLASS),i.destroy(),o.destroy()})}async processData(t){if(!this.enabled||this.data==null||this.xKey==null||this.volumeKey==null)return;const i=[keyProperty(this.xKey,void 0,{id:"date"}),valueProperty(this.volumeKey,"number",{id:"volume"})],o=import_ag_charts_community67._ModuleSupport.DataSet.wrap(this.data)??import_ag_charts_community67._ModuleSupport.DataSet.empty(),{dataModel:r,processedData:s}=await t.request("annotations",o,{props:i});this.dataModel=r,this.processedData=s}createAnnotationScene(t){if(t.type in annotationConfigs)return new annotationConfigs[t.type].scene;throw new Error(`AG Charts - Cannot create annotation scene of type [${t.type}], expected one of [${Object.keys(annotationConfigs)}], ignoring.`)}static createAnnotationDatum(t){if(t.type in annotationConfigs)return new annotationConfigs[t.type].datum().set(t);throw new Error(`AG Charts - Cannot create annotation datum of unknown type [${t.type}], expected one of [${Object.keys(annotationConfigs)}], ignoring.`)}createAnnotation(t,i,o=!0){if(this.annotationData.push(i),o){const r=this.ctx.annotationManager.getAnnotationTypeStyles(t);r&&i.set(r),this.defaults.applyDefaults(i)}this.injectDatumDependencies(i),this.update()}injectDatumDependencies(t){"setLocaleManager"in t&&t.setLocaleManager(this.ctx.localeManager),"getVolume"in t&&(t.getVolume=this.getDatumRangeVolume.bind(this))}getDatumRangeVolume(t,i){const{dataModel:o,processedData:r}=this;let s=getGroupingValue(t),a=getGroupingValue(i);if(!(0,import_ag_charts_core86.isValidDate)(s)||!(0,import_ag_charts_core86.isValidDate)(a)||!o||!r||this.volumeKey==null)return;s>a&&([s,a]=[a,s]);const n=o.resolveKeysById({id:"annotations"},"date",r),l=o.resolveColumnById({id:"annotations"},"volume",r);let c=0;for(let h=0;h<r.input.count;h++){const u=n[h];(0,import_ag_charts_core86.isValidDate)(u)&&u>=s&&u<=a&&(c+=l[h])}return c}translateNode(t,i,o){const r=this.getAnnotationConfig(i),s=this.getAnnotationContext();s&&r.translate(t,i,o,s)}createAnnotationDatumCopy(t,i){const o=this.getAnnotationConfig(i),r=new o.datum;r.set(i.toJson());const s=this.getAnnotationContext();if(s)return o.copy(t,i,r,s)}getAnnotationConfig(t){if(t.type in annotationConfigs)return annotationConfigs[t.type];throw new Error(`AG Charts - Cannot get annotation config of unknown type [${t.type}], expected one of [${Object.keys(annotationConfigs)}], ignoring.`)}onRestoreAnnotations(t){this.enabled&&(this.clear(),this.annotationData.set(t.annotations),this.postUpdateFns.push(()=>{this.ctx.annotationManager.fireChangedEvent()}),this.update())}onLayoutComplete(t){if(!this.enabled)return;const i=t.series.paddedRect;this.seriesRect=i,this.container.setClipRect(i),this.xAxis=this.getAxis(t.axes[import_ag_charts_core86.ChartAxisDirection.X],i,this.xAxis?.button),this.yAxis=this.getAxis(t.axes[import_ag_charts_core86.ChartAxisDirection.Y],i,this.yAxis?.button),this.showAnnotations()?this.animateAnnotations({from:0,to:1,phase:"trailing"}):this.animateAnnotations({from:1,to:0,phase:"remove"})}showAnnotations(){if(!this.yAxis||!this.xAxis)return!1;const t=this.ctx.chartService.series.some(r=>r.hasData),o=this.yAxis.context.seriesIds().some(r=>this.ctx.chartService.series.find(a=>a.id===r)?.visible);return t&&o}animateAnnotations({from:t,to:i,phase:o}){const{annotations:r}=this;this.ctx.animationManager?.animate({from:t,to:i,id:"chart-annotations",phase:o,groupId:"opacity",onUpdate(s){r.each(a=>{a.opacity=s,"setAxisLabelOpacity"in a&&a.setAxisLabelOpacity(s)})},onStop(){r.each(s=>{s.opacity=i,"setAxisLabelOpacity"in s&&s.setAxisLabelOpacity(i)})}})}onPreRender(){this.enabled&&(this.updateAnnotations(),this.state.transition("render"))}getAxis(t,i,o){const r=this.ctx.axisManager.getAxisContext(t.direction)[0],{position:s="bottom",direction:a}=r,n=t.gridPadding+t.seriesAreaPadding,l=new BBox3(0,0,i.width,i.height).grow(n,s),c=a===import_ag_charts_core86.ChartAxisDirection.X?"vertical":"horizontal",{axesButtons:h,snap:u}=this;if(this.enabled&&h.enabled&&(h.axes==="xy"||h.axes===a)){o??(o=new AxisButton(this.ctx,{...r,snapToGroup:u},g=>this.onAxisButtonClick(g,c),i));const p=calculateAxisLabelPadding(t);o.update(i,p)}else o?.destroy(),o=void 0;return{layout:t,context:r,bounds:l,button:o}}recordActionAfterNextUpdate(t,i=["annotations"]){const{defaults:o,ctx:{annotationManager:r,historyManager:s}}=this,a=i.map(n=>n==="defaults"?o:r);this.postUpdateFns.push(()=>{s.record(t,...a),r.fireChangedEvent()})}setColorAndDefault(t,i,o,r,s,a){this.state.transition("color",{colorPickerType:i,colorOpacity:o,color:r,opacity:s,isMultiColor:a}),this.defaults.setDefaultColor(t,i,o,r,s,a)}setFontSizeAndDefault(t,i){this.state.transition("fontSize",i),this.defaults.setDefaultFontSize(t,i),this.recordActionAfterNextUpdate(`Change ${t} font size to ${i}`,["annotations","defaults"])}setLineStyleTypeAndDefault(t,i){this.state.transition("lineStyle",{type:i}),this.defaults.setDefaultLineStyleType(t,i),this.recordActionAfterNextUpdate(`Change ${t} line style to ${i}`,["annotations","defaults"])}setLineStyleWidthAndDefault(t,i){this.state.transition("lineStyle",{strokeWidth:i}),this.defaults.setDefaultLineStyleWidth(t,i),this.recordActionAfterNextUpdate(`Change ${t} stroke width to ${i}`,["annotations","defaults"])}updateAnnotations(){const{annotationData:t,annotations:i,seriesRect:o,ctx:{annotationManager:r}}=this,s=this.getAnnotationContext();if(!o||!s)return;r.updateData(t.toJson());const a=this.showAnnotations();this.toolbar.refreshButtonsEnabled(a),this.toolbar.toggleClearButtonEnabled(t.length>0&&a),i.update(t??[],void 0,n=>n.id).each((n,l)=>{if(!a){n.visible=!1,"setAxisLabelVisible"in n&&n.setAxisLabelVisible(!1);return}"setAxisLabelVisible"in n&&n.setAxisLabelVisible(!0),this.injectDatumDependencies(l),updateAnnotation(n,l,s)});for(const n of this.postUpdateFns)n();this.postUpdateFns=[]}getAnnotationContext(){const{seriesRect:t,xAxis:i,yAxis:o,snap:r}=this;if(t&&i&&o)return{seriesRect:t,xAxis:{...i.context,bounds:i.bounds,labelPadding:calculateAxisLabelPadding(i.layout),snapToGroup:r},yAxis:{...o.context,bounds:o.bounds,labelPadding:calculateAxisLabelPadding(i.layout),snapToGroup:r}}}onHover(t){const{state:i}=this,o=this.getAnnotationContext();if(!o)return;const r=t.sourceEvent.shiftKey,s=import_ag_charts_core86.Vec2.from(t),a=invertCoords(s,o);i.transition("hover",{offset:s,point:a,shiftKey:r,context:o})}onClick(t){const{state:i}=this,o=this.getAnnotationContext();if(!o)return;const r=t.sourceEvent.shiftKey,s=invertCoords(import_ag_charts_core86.Vec2.from(t),o),a=this.textInput.getValue(),n=this.textInput.getBBox();i.transition("click",{point:s,shiftKey:r,textInputValue:a,bbox:n})}onDoubleClick(t){const{state:i}=this;if(!this.getAnnotationContext())return;const r=import_ag_charts_core86.Vec2.from(t);i.transition("dblclick",{offset:r})}onAxisButtonClick(t,i){this.cancel(),this.reset();const o=this.getAnnotationContext();if(!this.annotationData||!o)return;const{state:r}=this;this.pushAnnotationState(InteractionState2.Annotations);const s=i==="horizontal";if(r.transition(s?"horizontal-line":"vertical-line"),this.optionsToolbar.hide(),!t)return;const a=invertCoords(t,o);validateDatumPoint(o,a)&&(r.transition("click",{point:a,shiftKey:!1}),this.update())}onResize(){const t=this.textInput.getValue(),i=this.textInput.getBBox();this.state.transition("resize",{textInputValue:t,bbox:i})}hoverTouchPreHandler(t){t.device==="touch"&&this.onHover(t)}dragMoveTouchPreHandler(t){t.device==="touch"&&this.ctx.interactionManager.isState(InteractionState2.AnnotationsSelected)&&t.sourceEvent.preventDefault()}onDragStart(t){if(!this.ctx.interactionManager.isState(InteractionState2.AnnotationsDraggable))return;const i=this.getAnnotationContext();if(!i)return;const o=import_ag_charts_core86.Vec2.from(t),r=invertCoords(o,i),s=this.textInput.getValue(),a=this.textInput.getBBox();this.state.transition("dragStart",{context:i,offset:o,point:r,textInputValue:s,bbox:a})}onDrag(t){if(!this.ctx.interactionManager.isState(InteractionState2.AnnotationsDraggable))return;const i=this.getAnnotationContext();if(!i)return;const o=import_ag_charts_core86.Vec2.from(t),r=invertCoords(o,i),s=t.sourceEvent.shiftKey,a=this.textInput.getValue(),n=this.textInput.getBBox();this.state.transition("drag",{context:i,offset:o,point:r,shiftKey:s,textInputValue:a,bbox:n})}onDragEnd(){this.state.transition("dragEnd")}onCancel(t){const{sourceEvent:i}=t??{};i?.currentTarget===i?.target&&(this.cancel(),this.reset())}onDelete(){this.textInput.isVisible()||(this.cancel(),this.delete(),this.reset(),this.update())}onTextInput(t){const{state:i}=this,o=this.getAnnotationContext();if(!o)return;const{key:r,shiftKey:s}=t,a=this.textInput.getValue(),n=this.textInput.getBBox();i.transition("textInput",{key:r,shiftKey:s,textInputValue:a,bbox:n,context:o})}onKeyDown(t){const{state:i}=this,o=this.getAnnotationContext();if(!o)return;const{sourceEvent:r}=t,{shiftKey:s,ctrlKey:a,metaKey:n}=r,l=a||n,c=a||s;i.transition("keyDown",{shiftKey:s,context:o});const h={x:0,y:0},u=Math.max(o?.xAxis.scale.bandwidth??0,c?10:1),d=Math.max(o?.yAxis.scale.bandwidth??0,c?10:1);switch(r.key){case"ArrowDown":h.y=d;break;case"ArrowUp":h.y=-d;break;case"ArrowLeft":h.x=-u;break;case"ArrowRight":h.x=u;break;case"Escape":this.onCancel();return;case"Backspace":case"Delete":this.onDelete();return}if((h.x||h.y)&&(i.transition("translate",{translation:h}),r.stopPropagation(),r.preventDefault()),!!l)switch(r.key){case"c":i.transition("copy");return;case"x":i.transition("cut"),this.recordActionAfterNextUpdate("Cut annotation");return;case"v":i.transition("paste"),this.recordActionAfterNextUpdate("Paste annotation");return}}onKeyUp(t){const{shiftKey:i}=t.sourceEvent,o=this.getAnnotationContext();o&&(this.state.transition("keyUp",{shiftKey:i,context:o}),this.state.transition("translateEnd"))}clear(){this.cancel(),this.deleteAll(),this.reset()}reset(){this.state.transition("reset")}cancel(){this.state.transition("cancel")}delete(){this.state.transition("delete")}deleteAll(){this.state.transition("deleteAll")}deleteEphemeralAnnotations(){let t=!1;for(const[i,o]of this.annotationData.entries())isEphemeralType(o)&&(this.annotationData.splice(i,1),t=!0);t&&this.recordActionAfterNextUpdate("Delete ephemeral annotations")}hideOverlays(){this.settingsDialog.hide(),this.toolbar.hideOverlays(),this.optionsToolbar.hideOverlays()}pushAnnotationState(t){this.ctx.interactionManager.pushState(t),this.ctx.tooltipManager.suppressTooltip("annotations")}popAnnotationState(t){this.ctx.interactionManager.popState(t),this.ctx.tooltipManager.unsuppressTooltip("annotations")}isAnnotationState(){return this.ctx.interactionManager.isState(InteractionState2.Annotations)||this.ctx.interactionManager.isState(InteractionState2.AnnotationsSelected)}update(t=import_ag_charts_core86.ChartUpdateType.PRE_SCENE_RENDER){this.ctx.updateService.update(t)}};__decorateClass([import_ag_charts_core86.Property],_Annotations.prototype,"toolbar",2),__decorateClass([import_ag_charts_core86.Property],_Annotations.prototype,"optionsToolbar",2),__decorateClass([import_ag_charts_core86.Property],_Annotations.prototype,"axesButtons",2),__decorateClass([import_ag_charts_core86.Property,(0,import_ag_charts_core86.ObserveChanges)((e,t)=>{const i=t??!0;e.toolbar.enabled=i,e.optionsToolbar.enabled=i,e.axesButtons.enabled=i})],_Annotations.prototype,"enabled",2),__decorateClass([import_ag_charts_core86.Property],_Annotations.prototype,"snap",2);var Annotations=_Annotations,import_ag_charts_community68=require("ag-charts-community"),ThemeSymbols=__toESM(require("ag-charts-core")),import_ag_charts_core87=require("ag-charts-core"),stroke={stroke:{$ref:"foregroundColor"},strokeOpacity:1,strokeWidth:2},handle={fill:ThemeSymbols.DEFAULT_ANNOTATION_HANDLE_FILL,strokeOpacity:1,strokeWidth:2},font={color:{$ref:"chartBackgroundColor"},fontSize:{$rem:import_ag_charts_core87.FONT_SIZE_RATIO.LARGE},fontFamily:{$ref:"fontFamily"}},axisLabel={...font,enabled:!0,fill:{$ref:"foregroundColor"},fontSize:{$ref:"fontSize"}},text={...font,textAlign:"left"},lineText={...font,position:"top",alignment:"center",color:{$ref:"textColor"}},channelText={...font,position:"top",alignment:"center",color:{$ref:"textColor"}},measurerStatistics={...font,fontSize:{$ref:"fontSize"},color:ThemeSymbols.DEFAULT_ANNOTATION_STATISTICS_COLOR,fill:ThemeSymbols.DEFAULT_ANNOTATION_STATISTICS_FILL,stroke:ThemeSymbols.DEFAULT_ANNOTATION_STATISTICS_STROKE,strokeWidth:1,divider:{stroke:ThemeSymbols.DEFAULT_ANNOTATION_STATISTICS_DIVIDER_STROKE,strokeWidth:1,strokeOpacity:.5}},measurer={...stroke,background:{fill:{$ref:"foregroundColor"},fillOpacity:.075},handle:{...handle},text:{...lineText},statistics:{...measurerStatistics}},toolbar={buttons:{$shallowSimple:[{icon:"text-annotation",tooltip:"toolbarAnnotationsTextAnnotations",value:"text-menu"},{icon:"trend-line-drawing",tooltip:"toolbarAnnotationsLineAnnotations",value:"line-menu"},{icon:"arrow-drawing",tooltip:"toolbarAnnotationsShapeAnnotations",value:"shape-menu"},{icon:"delete",tooltip:"toolbarAnnotationsClearAll",value:"clear"}]},padding:{$ref:"chartPadding"}},optionsToolbar={buttons:{$shallowSimple:[{icon:"text-annotation",tooltip:"toolbarAnnotationsTextColor",value:"text-color"},{icon:"line-color",tooltip:"toolbarAnnotationsLineColor",value:"line-color"},{icon:"fill-color",tooltip:"toolbarAnnotationsFillColor",value:"fill-color"},{tooltip:"toolbarAnnotationsTextSize",value:"text-size"},{tooltip:"toolbarAnnotationsLineStrokeWidth",value:"line-stroke-width"},{icon:"line-style-solid",tooltip:"toolbarAnnotationsLineStyle",value:"line-style-type"},{icon:"settings",tooltip:"toolbarAnnotationsSettings",value:"settings"},{icon:"unlocked",tooltip:"toolbarAnnotationsLock",ariaLabel:"toolbarAnnotationsLock",checkedOverrides:{icon:"locked",tooltip:"toolbarAnnotationsUnlock"},value:"lock"},{icon:"delete",tooltip:"toolbarAnnotationsDelete",value:"delete"}]}},annotationsTheme={enabled:!1,line:{...stroke,handle:{...handle},text:{...lineText}},"horizontal-line":{...stroke,handle:{...handle},axisLabel:{...axisLabel},text:{...lineText}},"vertical-line":{...stroke,handle:{...handle},axisLabel:{...axisLabel},text:{...lineText}},"disjoint-channel":{...stroke,background:{fill:{$ref:"foregroundColor"},fillOpacity:.075},handle:{...handle},text:{...channelText}},"parallel-channel":{...stroke,middle:{lineDash:[6,5],strokeWidth:1},background:{fill:{$ref:"foregroundColor"},fillOpacity:.075},handle:{...handle},text:{...channelText}},"fibonacci-retracement":{...stroke,strokes:ThemeSymbols.DEFAULT_FIBONACCI_STROKES,rangeStroke:{$ref:"foregroundColor"},handle:{...handle},text:{...lineText,position:"center"},label:{...font,color:void 0,fontSize:{$rem:import_ag_charts_core87.FONT_SIZE_RATIO.SMALLER}}},"fibonacci-retracement-trend-based":{...stroke,strokes:ThemeSymbols.DEFAULT_FIBONACCI_STROKES,rangeStroke:{$ref:"foregroundColor"},handle:{...handle},text:{...lineText,position:"center"},label:{...font,color:void 0,fontSize:{$rem:import_ag_charts_core87.FONT_SIZE_RATIO.SMALLER}}},callout:{...stroke,...text,color:{$ref:"textColor"},handle:{...handle},fill:{$ref:"foregroundColor"},fillOpacity:.075},comment:{...text,fontWeight:700,handle:{...handle},fill:{$ref:"foregroundColor"}},note:{...text,color:ThemeSymbols.DEFAULT_TEXTBOX_COLOR,fill:ThemeSymbols.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR,stroke:{$ref:"chartBackgroundColor"},strokeWidth:1,strokeOpacity:1,handle:{...handle},background:{fill:ThemeSymbols.DEFAULT_TEXTBOX_FILL,stroke:ThemeSymbols.DEFAULT_TEXTBOX_STROKE,strokeWidth:1}},text:{...text,color:{$ref:"textColor"},handle:{...handle}},arrow:{...stroke,handle:{...handle},text:{...lineText}},"arrow-up":{fill:{$palette:"up.fill"},handle:{...handle,stroke:{$ref:"foregroundColor"}}},"arrow-down":{fill:{$palette:"down.fill"},handle:{...handle,stroke:{$ref:"foregroundColor"}}},"date-range":{...measurer},"price-range":{...measurer},"date-price-range":{...measurer},"quick-date-price-range":{up:{...stroke,fill:ThemeSymbols.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL,fillOpacity:.2,handle:{...handle},statistics:{...measurerStatistics,color:"#fff",fill:ThemeSymbols.DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL,strokeWidth:0,divider:{stroke:"#fff",strokeWidth:1,strokeOpacity:.5}}},down:{...stroke,stroke:ThemeSymbols.DEFAULT_ANNOTATION_STATISTICS_DOWN_STROKE,fill:ThemeSymbols.DEFAULT_ANNOTATION_STATISTICS_DOWN_FILL,fillOpacity:.2,handle:{...handle,stroke:ThemeSymbols.DEFAULT_ANNOTATION_STATISTICS_DOWN_STROKE},statistics:{...measurerStatistics,color:"#fff",fill:ThemeSymbols.DEFAULT_ANNOTATION_STATISTICS_DOWN_FILL,strokeWidth:0,divider:{stroke:"#fff",strokeWidth:1,strokeOpacity:.5}}}},axesButtons:{},toolbar,optionsToolbar},AnnotationsModule={type:"plugin",name:"annotations",chartType:"cartesian",enterprise:!0,version:import_ag_charts_community69.VERSION,options:import_ag_charts_community69._ModuleSupport.annotationOptionsDef,themeTemplate:annotationsTheme,create:e=>new Annotations(e),patchContext:e=>{e.sharedToolbar||(e.sharedToolbar=new SharedToolbar(e),e.cleanup.register(()=>e.sharedToolbar.destroy()))}},import_ag_charts_community71=require("ag-charts-community"),import_ag_charts_community70=require("ag-charts-community"),import_ag_charts_core89=require("ag-charts-core"),{Range,TranslatableGroup,BBox:BBox4,FillGradientDefaults,FillImageDefaults,FillPatternDefaults,getShapeFill,InteractionState:InteractionState3}=import_ag_charts_community70._ModuleSupport,BandHighlight=class extends import_ag_charts_core89.AbstractModuleInstance{constructor(e){super(),this.ctx=e,this.id=(0,import_ag_charts_core89.createId)(this),this.enabled=!1,this.stroke="rgb(195, 195, 195)",this.lineDash=[6,3],this.lineDashOffset=0,this.strokeWidth=1,this.strokeOpacity=1,this.fill="#c16068",this.fillOpacity=1,this.fillGradientDefaults=new FillGradientDefaults,this.fillPatternDefaults=new FillPatternDefaults,this.fillImageDefaults=new FillImageDefaults,this.bounds=new BBox4(0,0,0,0),this.bandHighlightGroup=new TranslatableGroup({name:"bandHighlight",zIndex:import_ag_charts_core89.ZIndexMap.AXIS_BAND_HIGHLIGHT}),this.rangeNode=this.bandHighlightGroup.appendChild(new Range),this.activeAxisHighlight=void 0,this.axisCtx=e.parent,this.hideBand(),e.domManager.addEventListener("focusin",({target:s})=>{const a=s instanceof HTMLElement&&e.domManager.contains(s,"series-area");this.bandHighlightGroup.visible&&!a&&(this.hideBand(),this.ctx.updateService.update(import_ag_charts_core89.ChartUpdateType.SCENE_RENDER))});const{widgets:{seriesWidget:t,seriesDragInterpreter:i},animationManager:o,eventsHub:r}=e;this.cleanup.register(e.scene.attachNode(this.bandHighlightGroup),t.addListener("mousemove",s=>this.onHoverLikeEvent(s)),t.addListener("mouseleave",()=>this.clearAllHighlight()),o.addListener("animation-start",()=>this.clearAllHighlight()),r.on("layout:complete",s=>this.layout(s)),r.on("series:focus-change",()=>this.onKeyPress()),r.on("zoom:pan-start",()=>this.clearAllHighlight()),r.on("zoom:change-complete",()=>this.clearAllHighlight()),r.on("dom:resize",()=>this.clearAllHighlight()),r.on("axis:change",()=>this.axisChange())),i&&this.cleanup.register(i.events.on("drag-move",s=>this.onHoverLikeEvent(s)),i.events.on("click",s=>this.onClick(s)))}axisChange(){this.onHighlightChange()}isHover(e){return e.type==="mousemove"||e.type==="click"||e.device==="touch"&&this.ctx.chartService.touch.dragAction==="hover"}onClick(e){e.device==="touch"&&this.onHoverLikeEvent(e)}clearAllHighlight(){this.ctx.interactionManager.isState(InteractionState3.Clickable)&&this.onHighlightChange()}onKeyPress(){this.ctx.interactionManager.isState(InteractionState3.Default)&&this.onHighlightChange()}onHoverLikeEvent(e){const t=this.isHover(e)?InteractionState3.Clickable:InteractionState3.AnnotationsMoveable;this.ctx.interactionManager.isState(t)&&this.handleHoverHighlight(e)}handleHoverHighlight(e){if(!e)return;const{currentX:t,currentY:i}=e;this.onHighlightChange(this.axisCtx.pickBand({x:t,y:i}))}layout({series:{rect:e,visible:t},axes:i}){if(!t||!i||!this.enabled)return;const{position:o="left",axisId:r}=this.axisCtx,s=i[r];if(!s)return;this.axisLayout=s,this.bounds=e.clone().grow(s.gridPadding,o);const{bandHighlightGroup:a,bounds:n}=this;a.translationX=Math.round(n.x),a.translationY=Math.round(n.y),this.updateBand()}updateBand(){const{rangeNode:e,stroke:t,strokeWidth:i,strokeOpacity:o,lineDash:r,fill:s,fillOpacity:a,fillGradientDefaults:n,fillPatternDefaults:l,fillImageDefaults:c,lineDashOffset:h,axisLayout:u}=this;u&&(e.stroke=t,e.strokeWidth=i,e.strokeOpacity=o,e.lineDash=r,e.lineDashOffset=h,e.fill=getShapeFill(s,n,l,c),e.fillOpacity=a,e.startLine=!0,e.endLine=!0)}isVertical(){return this.axisCtx.direction===import_ag_charts_core89.ChartAxisDirection.X}onHighlightChange(e){this.enabled&&(this.activeAxisHighlight=e,this.activeAxisHighlight?this.showBand():this.hideBand(),this.ctx.updateService.update(import_ag_charts_core89.ChartUpdateType.SCENE_RENDER))}updateBandPosition(){const{rangeNode:e,bounds:t}=this,{band:i}=this.activeAxisHighlight??{};if(i==null){this.hideBand();return}let o=Math.min(...i),r=Math.max(...i);if(r-o<1){const s=(o+r)/2;o=s-.5,r=s+.5}this.isVertical()?(e.y1=0,e.y2=t.height,e.x1=o,e.x2=r,e.horizontal=!0):(e.y1=o,e.y2=r,e.x1=0,e.x2=t.width,e.horizontal=!1)}showBand(){this.updateBandPosition(),this.bandHighlightGroup.visible=!0}hideBand(){this.bandHighlightGroup.visible=!1}};BandHighlight.className="BandHighlight",__decorateClass([import_ag_charts_core89.Property],BandHighlight.prototype,"enabled",2),__decorateClass([import_ag_charts_core89.Property],BandHighlight.prototype,"stroke",2),__decorateClass([import_ag_charts_core89.Property],BandHighlight.prototype,"lineDash",2),__decorateClass([import_ag_charts_core89.Property],BandHighlight.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core89.Property],BandHighlight.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core89.Property],BandHighlight.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core89.Property],BandHighlight.prototype,"fill",2),__decorateClass([import_ag_charts_core89.Property],BandHighlight.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core89.Property],BandHighlight.prototype,"fillGradientDefaults",2),__decorateClass([import_ag_charts_core89.Property],BandHighlight.prototype,"fillPatternDefaults",2),__decorateClass([import_ag_charts_core89.Property],BandHighlight.prototype,"fillImageDefaults",2);var BandHighlightModule={type:"axis:plugin",name:"bandHighlight",chartType:"cartesian",axisTypes:["category","ordinal-time","unit-time","grouped-category"],enterprise:!0,version:import_ag_charts_community71.VERSION,themeTemplate:{enabled:!1,strokeWidth:0,lineDash:[],fill:{$foregroundBackgroundMix:.05}},create:e=>new BandHighlight(e)},import_ag_charts_community73=require("ag-charts-community"),import_ag_charts_core91=require("ag-charts-core"),import_ag_charts_community72=require("ag-charts-community"),import_ag_charts_core90=require("ag-charts-core"),{LayoutElement:LayoutElement2,Menu:Menu3}=import_ag_charts_community72._ModuleSupport,menuItems=[{label:"toolbarSeriesTypeOHLC",icon:"ohlc-series",value:"ohlc"},{label:"toolbarSeriesTypeCandles",icon:"candlestick-series",value:"candlestick"},{label:"toolbarSeriesTypeHollowCandles",icon:"hollow-candlestick-series",value:"hollow-candlestick"},{label:"toolbarSeriesTypeLine",icon:"line-series",value:"line"},{label:"toolbarSeriesTypeStepLine",icon:"step-line-series",value:"step-line"},{label:"toolbarSeriesTypeHLC",icon:"hlc-series",value:"hlc"},{label:"toolbarSeriesTypeHighLow",icon:"high-low-series",value:"high-low"}],ChartToolbar=class extends import_ag_charts_core90.AbstractModuleInstance{constructor(e){super(),this.ctx=e,this.enabled=!1,this.menu=new Menu3(this.ctx,"chart-toolbar"),this.toolbar=e.sharedToolbar.getSharedToolbar("chartToolbar"),this.cleanup.register(this.toolbar.addToolbarListener("button-pressed",this.onButtonPressed.bind(this)),e.layoutManager.registerElement(LayoutElement2.ToolbarLeft,this.onLayoutStart.bind(this)),()=>this.toolbar.destroy())}onLayoutStart(e){this.enabled&&(this.updateButton(),this.toolbar.layout(e.layoutBox))}onButtonPressed({event:e,buttonBounds:t,buttonWidget:i}){this.menu.setAnchor({x:t.x+t.width+6,y:t.y}),this.menu.show(i,{items:menuItems,menuItemRole:"menuitemradio",ariaLabel:this.ctx.localeManager.t("toolbarSeriesTypeDropdown"),class:"ag-charts-chart-toolbar__menu",value:this.getChartType(),sourceEvent:e.sourceEvent,onPress:o=>{this.setChartType(o.value),this.hidePopover()},onHide:()=>{this.toolbar.clearActiveButton()}}),this.toolbar.toggleActiveButtonByIndex(0)}updateButton(){const e=this.getChartType(),t=menuItems.find(i=>i.value===e)?.icon;t!=null&&this.toolbar.updateButtons([{icon:t,tooltip:"toolbarSeriesTypeDropdown",value:"menu"}])}hidePopover(){this.toolbar.clearActiveButton(),this.menu.hide()}setChartType(e){const t={chartType:e};this.ctx.chartService.publicApi?.updateDelta(t).catch(i=>import_ag_charts_core90.Logger.error(i))}getChartType(){const e=this.ctx.chartService.publicApi?.getOptions()?.chartType;return e==null||!menuItems.some(t=>t.value===e)?"candlestick":e}};__decorateClass([import_ag_charts_core90.Property,(0,import_ag_charts_core90.ActionOnSet)({changeValue(e){this.toolbar?.setHidden(!e)}})],ChartToolbar.prototype,"enabled",2);var ChartToolbarModule={type:"plugin",name:"chartToolbar",chartType:"cartesian",enterprise:!0,version:import_ag_charts_community73.VERSION,options:{enabled:import_ag_charts_core91.boolean},create:e=>new ChartToolbar(e),patchContext:e=>{e.sharedToolbar||(e.sharedToolbar=new SharedToolbar(e),e.cleanup.register(()=>e.sharedToolbar.destroy()))}},import_ag_charts_community75=require("ag-charts-community"),import_ag_charts_core94=require("ag-charts-core"),import_ag_charts_community74=require("ag-charts-community"),import_ag_charts_core93=require("ag-charts-core"),import_ag_charts_core92=require("ag-charts-core");function showsFor(e,t){return e==="always"?!0:e==="series-area"?t==="series-area"||t==="series-node":e===t}function appendItem(e,t,i){let o=!0;if(t.type==="separator"){const r=i.at(-1);o=r!==void 0&&r.type!=="separator"}if(o&&(o=showsFor(t.showOn??"always",e)),o){const r=new ContextMenuItem(t);return i.push(r),r}}function appendBuiltinItem(e,t,i,o){t.isVisible(i)&&appendItem(e,t.builtins.items[i],o)}function expandBuiltin(e,t,i,o){const{builtins:r}=t;if((0,import_ag_charts_core92.isKeyOf)(i,r.lists))for(const s of r.lists[i])appendBuiltinItem(e,t,s,o);else appendBuiltinItem(e,t,i,o)}function expandBuiltinLists(e,t,i){const o=[],{builtins:r}=i;for(const s of t)if(typeof s=="string"&&(0,import_ag_charts_core92.isKeyOf)(s,r.lists))for(const a of r.lists[s])o.push(a);else o.push(s);return o.filter(s=>{if(typeof s=="string"){const a=i.builtins.items[s].showOn??"always";return i.isVisible(s)&&showsFor(a,e)}else return showsFor(s.showOn??"always",e)})}function expandItems(e,t,i,o){for(const r of i)if(typeof r=="string")expandBuiltin(e,t,r,o);else{const s=appendItem(e,r,o);r.items&&s&&r.items.length>0&&expandItems(e,t,r.items,s.items)}o.at(-1)?.type==="separator"&&o.pop()}var ContextMenuItem=class{constructor(e){this.type="action",this.showOn="always",this.label="",this.iconUrl=void 0,this.enabled=!0,this.items=[],this.action=void 0,e&&this.setOptions(e),this.items=[]}setField(e,t,i){t[e]=i}setOptions(e){let t;for(t in e)e[t]!==void 0&&this.setField(t,this,e[t])}},DEFAULT_CONTEXT_MENU_CLASS="ag-charts-context-menu",{ContextMenuRegistry}=import_ag_charts_community74._ModuleSupport,moduleId2="context-menu",DATUM_KEYS=["angleKey","calloutLabelKey","colorKey","labelKey","radiusKey","sectorLabelKey","sizeKey","xKey","yKey"],ContextMenu=class extends import_ag_charts_core93.AbstractModuleInstance{constructor(e){if(super(),this.ctx=e,this.enabled=!0,this.darkTheme=!1,this.items=["defaults"],this.pickedNode=void 0,this.showEvent=void 0,this.x=0,this.y=0,this.collapsingSubMenus=0,this.menuWidget=new import_ag_charts_community74._Widget.MenuWidget,this.interactionManager=e.interactionManager,this.element=e.domManager.addChild("canvas-overlay",moduleId2),this.element.classList.add(DEFAULT_CONTEXT_MENU_CLASS),this.element.style.display="none",this.element.addEventListener("contextmenu",t=>t.preventDefault()),this.element.addEventListener("focusout",({relatedTarget:t})=>{this.collapsingSubMenus>0||(t==null||t instanceof Node&&!this.element.contains(t))&&this.hide()}),this.cleanup.register(()=>this.element.remove(),()=>this.menuWidget.destroy(),e.eventsHub.on("dom:hidden",()=>this.hide()),this.menuWidget.addListener("collapse-widget",()=>this.onCollapse())),this.menuWidget.addClass(`${DEFAULT_CONTEXT_MENU_CLASS}__menu`),typeof MutationObserver<"u"){const t=new MutationObserver(()=>{this.element.contains(this.menuWidget.getElement())&&this.reposition()});t.observe(this.element,{childList:!0}),this.mutationObserver=t,this.cleanup.register(()=>t.disconnect())}this.ctx.contextMenuRegistry.builtins.items.download.action=()=>{const t=e.chartService.title;let i="image";t?.enabled&&(i=t.node.getPlainText().replace(/\.+/,"")),this.ctx.chartService.publicApi?.download({fileName:i}).catch(o=>{import_ag_charts_core93.Logger.error("Unable to download chart",o)})},this.cleanup.register(this.ctx.eventsHub.on("context-menu:complete",t=>this.onContext(t)))}makeGetItemsParams(e){const{showOn:t}=e,{context:i}=this.ctx.chartService,o=expandBuiltinLists(t,this.items,this.ctx.contextMenuRegistry);switch(t){case"always":case"series-area":return{showOn:t,context:i,defaultItems:o};case"series-node":{if(this.pickedNode==null)throw new Error("this.pickedNode is null");const c={showOn:t,context:i,seriesId:this.pickedNode.series.id,datum:this.pickedNode.datum,defaultItems:o};for(const h of DATUM_KEYS)this.pickedNode[h]!==void 0&&(c[h]=this.pickedNode[h]);return c}case"legend-item":if(this.pickedLegendItem==null)throw new Error("this.pickedLegendItem is null");const{itemId:r,seriesId:s,label:a,enabled:n}=this.pickedLegendItem,l=(0,import_ag_charts_core93.toPlainText)(a.text);if(typeof r!="string")throw new Error(`unexpected itemId type: [${typeof r}] (expected [string])`);return{showOn:t,context:i,itemId:r,seriesId:s,text:l,visible:n,defaultItems:o};default:return t}}expandItemsOptions(e){const t=[];let i;if(this.getItems){const o=this.makeGetItemsParams(e);i=this.getItems(o)}return i??(i=this.items),expandItems(e.showOn,this.ctx.contextMenuRegistry,i,t),t}onContext(e){if(!this.enabled)return;e.widgetEvent.sourceEvent.preventDefault(),this.showEvent=e.widgetEvent.sourceEvent,this.x=e.x,this.y=e.y,this.pickedNode=void 0,this.pickedLegendItem=void 0,ContextMenuRegistry.check("series-node",e)?this.pickedNode=e.context.pickedNode:ContextMenuRegistry.check("legend-item",e)&&(this.pickedLegendItem=e.context.legendItem);const t=this.expandItemsOptions(e);t.length!==0&&this.show(e.widgetEvent,t)}show(e,t){const{sourceEvent:i}=e;this.interactionManager.pushState(import_ag_charts_community74._ModuleSupport.InteractionState.ContextMenu),this.element.style.display="block";const o=i.pointerType==="touch"?!1:void 0;o!==void 0&&this.ctx.chartService.overrideFocusVisible(o),this.createMenu(t),this.element.appendChild(this.menuWidget.getElement()),this.menuWidget.expand({sourceEvent:i,overrideFocusVisible:o})}hide(){this.menuWidget.collapse()}onCollapse(){this.interactionManager.popState(import_ag_charts_community74._ModuleSupport.InteractionState.ContextMenu),this.menuWidget.getElement().remove(),this.element.style.display="none"}onSubMenuExpand(e,t){const i=e.getBounds();e.setFocusOverride(!0),e.getElement().insertAdjacentElement("afterend",t.getElement()),t.getElement().style.position="absolute";const o=this.ctx.domManager.getBoundingClientRect(),r=e.getBoundingClientRect(),s=o.right-r.right,a=r.left-o.left,{offsetWidth:n,offsetHeight:l}=t.getElement();let c=i.y;if(o.height>l){const h=o.bottom-r.top;h<l&&(c-=l-h)}if(s>=n)t.setBounds({x:i.x+i.width,y:c});else{const h=i.x-n,u=a+h;u>=0?t.setBounds({x:h,y:c}):t.setBounds({x:h-u,y:c})}}onSubMenuCollapse(e,t){e.setFocusOverride(void 0),this.collapsingSubMenus++,t.remove(),this.collapsingSubMenus--}createMenu(e){const{menuWidget:t}=this;t.clear(),t.setTabIndex(-1),this.createMenuItems(t,e)}createMenuItems(e,t){for(const i of t)switch(i.type){case"separator":{e.addSeparator().classList.add(`${DEFAULT_CONTEXT_MENU_CLASS}__divider`);break}case"action":{if(i.items.length===0){const o=new import_ag_charts_community74._Widget.MenuItemWidget;this.initButtonElement(o,i),e.addChild(o)}else{const{subMenuButton:o,subMenu:r}=e.addSubMenu();r.addClass(`${DEFAULT_CONTEXT_MENU_CLASS}__menu`),r.addListener("expand-widget",()=>this.onSubMenuExpand(o,r)),r.addListener("collapse-widget",()=>this.onSubMenuCollapse(o,r)),this.initButtonElement(o,i),this.createMenuItems(r,i.items)}break}default:throw new Error("unhandled case")}}createButtonOnClick(e,t){return ContextMenuRegistry.checkCallback("legend-item",e,t)?i=>{const o=i.sourceEvent;if(this.pickedLegendItem){const{seriesId:r,itemId:s,label:a}=this.pickedLegendItem,{chartService:n}=this.ctx;if(typeof s!="string"){import_ag_charts_core93.Logger.error(`unexpected itemId type: [${typeof s}] (expected [string])`);return}const c=[n.series.find(u=>u.id===r)?.properties,n],h={type:"contextmenu",seriesId:r,itemId:s,text:(0,import_ag_charts_core93.toPlainText)(a.text),event:o};(0,import_ag_charts_core93.callWithContext)(c,t,h),this.hide()}else import_ag_charts_core93.Logger.error("legend item not found")}:ContextMenuRegistry.checkCallback("series-area",e,t)?()=>{const i=this.ctx.chartService,o={type:"seriesContextMenuAction",event:this.showEvent};(0,import_ag_charts_core93.callWithContext)(i,t,o),this.hide()}:ContextMenuRegistry.checkCallback("series-node",e,t)?()=>{const{showEvent:i}=this,{chartService:o}=this.ctx,r=this.pickedNode,s=[r?.series.properties,o],a=r?.series.createNodeContextMenuActionEvent(i,r);a?(0,import_ag_charts_core93.callWithContext)(s,t,a):import_ag_charts_core93.Logger.error("series node not found"),this.hide()}:()=>{const i=this.ctx.chartService,o={type:"contextMenuEvent",event:this.showEvent};(0,import_ag_charts_core93.callWithContext)(i,t,o),this.hide()}}initTableCells(e){const t=(0,import_ag_charts_core93.createElement)("div"),i=(0,import_ag_charts_core93.createElement)("div"),o=(0,import_ag_charts_core93.createElement)("div");return t.classList.toggle(`${DEFAULT_CONTEXT_MENU_CLASS}__icon`,!0),i.classList.toggle(`${DEFAULT_CONTEXT_MENU_CLASS}__cell`,!0),o.classList.toggle(`${DEFAULT_CONTEXT_MENU_CLASS}__cell`,!0),t.ariaHidden="true",i.role="presentation",o.ariaHidden="true",e.append(t,i,o),{cellIcon:t,cellLabel:i,cellArrow:o}}initButtonElement(e,t){e.addClass(`${DEFAULT_CONTEXT_MENU_CLASS}__item`),e.setEnabled(t.enabled);const i=this.ctx.localeManager.t(t.label),o=`${DEFAULT_CONTEXT_MENU_CLASS}__cellpadding`,{cellIcon:r,cellLabel:s,cellArrow:a}=this.initTableCells(e.getElement());if(s.textContent=i,s.classList.add(o),t.iconUrl!=null){const c=(0,import_ag_charts_core93.createElement)("img");c.src=t.iconUrl,r.append(c),r.classList.add(o)}if(t.items.length>0){const c=(0,import_ag_charts_core93.createElement)("span",(0,import_ag_charts_core93.getIconClassNames)("chevron-right"));a.append(c),a.classList.add(o)}const{showOn:n,action:l}=t;l!=null&&e.addListener("click",this.createButtonOnClick(n,l)),t.items.length===0&&(e.addListener("mouseleave",()=>e.setFocusOverride(!1)),e.addListener("mouseenter",()=>e.setFocusOverride(void 0)))}reposition(){let{x:e,y:t}=this;this.element.style.top="unset",this.element.style.bottom="unset";const i=this.ctx.domManager.getBoundingClientRect(),{offsetWidth:o,offsetHeight:r}=this.element;e=(0,import_ag_charts_core93.clamp)(0,e,i.width-o),t=(0,import_ag_charts_core93.clamp)(0,t,i.height-r),this.element.style.left=`${e}px`,this.element.style.top=`calc(${t}px - 0.5em)`}destroy(){super.destroy(),this.mutationObserver?.disconnect(),this.ctx.domManager.removeStyles(moduleId2),this.ctx.domManager.removeChild("canvas-overlay",moduleId2)}};__decorateClass([import_ag_charts_core93.Property],ContextMenu.prototype,"enabled",2),__decorateClass([import_ag_charts_core93.Property],ContextMenu.prototype,"darkTheme",2),__decorateClass([import_ag_charts_core93.Property],ContextMenu.prototype,"items",2),__decorateClass([import_ag_charts_core93.Property],ContextMenu.prototype,"getItems",2);var ContextMenuModule={type:"plugin",name:"contextMenu",enterprise:!0,version:import_ag_charts_community75.VERSION,options:{enabled:import_ag_charts_core94.boolean,items:import_ag_charts_core94.contextMenuItemsArray,getItems:(0,import_ag_charts_core94.callbackOf)(import_ag_charts_core94.contextMenuItemsArray,"a menu items array")},themeTemplate:{enabled:!0,darkTheme:import_ag_charts_core94.IS_DARK_THEME},create:e=>new ContextMenu(e)};ContextMenuModule.options.darkTheme=(0,import_ag_charts_core94.undocumented)(import_ag_charts_core94.boolean);var import_ag_charts_community78=require("ag-charts-community"),import_ag_charts_community77=require("ag-charts-community"),import_ag_charts_core96=require("ag-charts-core");function readDatum(e){return typeof e?.datum=="object"?e.datum:null}var import_ag_charts_community76=require("ag-charts-community"),import_ag_charts_core95=require("ag-charts-core"),{FormatManager}=import_ag_charts_community76._ModuleSupport,DEFAULT_LABEL_CLASS="ag-charts-crosshair-label",CrosshairLabelProperties=class extends import_ag_charts_core95.BaseProperties{constructor(){super(...arguments),this.enabled=!0,this.xOffset=0,this.yOffset=0,this.format=void 0,this.renderer=void 0,this._cachedFormatter=void 0}formatValue(e,t,i,o){const{formatter:r,format:s}=this,{domain:a,boundSeries:n}=o;let l;if(r!=null){const c=o.type==="number"?o.fractionDigits:void 0,h=o.type==="date"?o.unit:void 0,u=o.type==="date"?o.step:void 0;l=e(r,{value:i,domain:a,fractionDigits:c,unit:h,step:u,boundSeries:n})}if(s!=null){let c=this._cachedFormatter;(c?.type!==t||c?.format!==s)&&(c={type:t,format:s,formatter:FormatManager.getFormatter(t,s)},this._cachedFormatter=c),l??(l=c.formatter?.(i))}return l==null?void 0:String(l)}};__decorateClass([import_ag_charts_core95.Property],CrosshairLabelProperties.prototype,"enabled",2),__decorateClass([import_ag_charts_core95.Property],CrosshairLabelProperties.prototype,"xOffset",2),__decorateClass([import_ag_charts_core95.Property],CrosshairLabelProperties.prototype,"yOffset",2),__decorateClass([import_ag_charts_core95.Property],CrosshairLabelProperties.prototype,"formatter",2),__decorateClass([import_ag_charts_core95.Property],CrosshairLabelProperties.prototype,"format",2),__decorateClass([import_ag_charts_core95.Property],CrosshairLabelProperties.prototype,"renderer",2);var CrosshairLabel=class extends CrosshairLabelProperties{constructor(e,t,i){super(),this.domManager=e,this.id=(0,import_ag_charts_core95.createId)(this),this.element=e.addChild("canvas-overlay",`crosshair-label-${this.id}`),this.element.classList.add(DEFAULT_LABEL_CLASS),(0,import_ag_charts_core95.setAttribute)(this.element,"aria-hidden",!0),this.element.dataset.key=t,this.element.dataset.axisId=i}show(e){const{element:t}=this,i=e.x+this.xOffset,o=e.y+this.yOffset;t.style.top=`${Math.round(o)}px`,t.style.left=`${Math.round(i)}px`,this.toggle(!0)}setLabelHtml({html:e,styles:t}){if(e!==void 0&&(this.element.innerHTML=e),t!==void 0){const i=this.element.children[0]??this.element;Object.assign(i.style,t)}}getBBox(){const{element:e}=this;return new import_ag_charts_community76._ModuleSupport.BBox(e.clientLeft,e.clientTop,e.clientWidth,e.clientHeight)}toggle(e){this.element.classList.toggle("ag-charts-crosshair-label--hidden",!e)}destroy(){this.domManager.removeChild("canvas-overlay",`crosshair-label-${this.id}`)}toLabelHtml(e,t){if(typeof e=="string")return{html:e,styles:{}};t=t??{};const{text:i=t.text??"",color:o=t.color,backgroundColor:r=t.backgroundColor,opacity:s=t.opacity??1}=e,a={opacity:s,"background-color":r?.toLowerCase(),color:o};return{html:`<div class="ag-charts-crosshair-label-content">
<span>${i}</span>
</div>`,styles:a}}};CrosshairLabel.className="CrosshairLabel";var{Group:Group5,TranslatableGroup:TranslatableGroup2,Line:Line4,BBox:BBox5,InteractionState:InteractionState4}=import_ag_charts_community77._ModuleSupport,Crosshair=class extends import_ag_charts_core96.AbstractModuleInstance{constructor(e){super(),this.ctx=e,this.id=(0,import_ag_charts_core96.createId)(this),this.enabled=!1,this.stroke="rgb(195, 195, 195)",this.lineDash=[6,3],this.lineDashOffset=0,this.strokeWidth=1,this.strokeOpacity=1,this.snap=!0,this.label=new CrosshairLabelProperties,this.seriesRect=new BBox5(0,0,0,0),this.bounds=new BBox5(0,0,0,0),this.crosshairGroup=new TranslatableGroup2({name:"crosshairs",zIndex:import_ag_charts_core96.ZIndexMap.SERIES_CROSSHAIR}),this.lineGroup=this.crosshairGroup.appendChild(new Group5({name:`${this.id}-crosshair-lines`,zIndex:import_ag_charts_core96.ZIndexMap.SERIES_CROSSHAIR})),this.lineGroupSelection=import_ag_charts_community77._ModuleSupport.Selection.select(this.lineGroup,Line4,!1),this.activeHighlight=void 0,this.axisCtx=e.parent,this.labels={},this.hideCrosshairs(),e.domManager.addEventListener("focusin",({target:i})=>{if(this.checkInteractionState())return;const o=i instanceof HTMLElement&&e.domManager.contains(i,"series-area");this.crosshairGroup.visible&&!o&&(this.hideCrosshairs(),this.ctx.updateService.update(import_ag_charts_core96.ChartUpdateType.SCENE_RENDER))});const{seriesDragInterpreter:t}=e.widgets;this.cleanup.register(e.scene.attachNode(this.crosshairGroup),e.widgets.seriesWidget.addListener("mousemove",i=>this.onMouseHoverLike(i)),e.widgets.seriesWidget.addListener("mouseleave",()=>this.onMouseOut()),e.eventsHub.on("series:focus-change",()=>this.onKeyPress()),e.eventsHub.on("zoom:pan-start",()=>this.onMouseOut()),e.eventsHub.on("zoom:change-complete",()=>this.onMouseOut()),e.eventsHub.on("highlight:change",i=>this.onHighlightChange(i)),e.eventsHub.on("layout:complete",i=>this.layout(i)),()=>{for(const i of Object.values(this.labels))i.destroy()}),t&&this.cleanup.register(t.events.on("drag-move",i=>this.onMouseHoverLike(i)),t.events.on("click",i=>this.onClick(i)))}checkInteractionState(){return this.ctx.interactionManager.isState(InteractionState4.Frozen)}layout({series:{rect:e,visible:t},axes:i}){if(!t||!i||!this.enabled)return;this.seriesRect=e;const{position:o="left",axisId:r}=this.axisCtx,s=i[r];if(!s)return;this.axisLayout=s,this.bounds=e.clone().grow(s.gridPadding+s.seriesAreaPadding,o);const{crosshairGroup:a,bounds:n}=this;a.translationX=Math.round(n.x),a.translationY=Math.round(n.y);const l=["pointer",...this.axisCtx.seriesKeyProperties()];this.updateSelections(l),this.updateLines(),this.updateLabels(l),this.refreshPositions()}updateSelections(e){this.lineGroupSelection.update(e,void 0,t=>t)}updateLabels(e){const{labels:t,ctx:i}=this;for(const o of e)this.label.enabled&&(t[o]??(t[o]=new CrosshairLabel(i.domManager,o,this.axisCtx.axisId))),t[o]&&this.updateLabel(t[o])}updateLabel(e){const{enabled:t,xOffset:i,yOffset:o,format:r,renderer:s}=this.label;e.enabled=t,e.xOffset=i,e.yOffset=o,e.format=r,e.renderer=s}updateLines(){const{lineGroupSelection:e,bounds:t,stroke:i,strokeWidth:o,strokeOpacity:r,lineDash:s,lineDashOffset:a,axisLayout:n}=this;if(!n)return;const l=this.isVertical();e.each(c=>{c.stroke=i,c.strokeWidth=o,c.strokeOpacity=r,c.lineDash=s,c.lineDashOffset=a,c.y1=0,c.y2=l?t.height:0,c.x1=0,c.x2=l?0:t.width})}isVertical(){return this.axisCtx.direction===import_ag_charts_core96.ChartAxisDirection.X}isHover(e){return e.type==="mousemove"||e.type==="click"||e.device==="touch"&&this.ctx.chartService.touch.dragAction==="hover"}formatValue(e){return(0,import_ag_charts_core96.toPlainText)(this.axisCtx.formatScaleValue(e,"crosshair",this.label))}onClick(e){e.device==="touch"&&this.onMouseHoverLike(e)}onMouseHoverLike(e){if(!this.enabled||this.snap)return;const t=this.isHover(e)?InteractionState4.Clickable:InteractionState4.AnnotationsMoveable;this.ctx.interactionManager.isState(t)&&(this.updatePositions(this.getData(e)),this.crosshairGroup.visible=!0,this.ctx.updateService.update(import_ag_charts_core96.ChartUpdateType.SCENE_RENDER))}onMouseOut(){this.ctx.interactionManager.isState(InteractionState4.Clickable)&&(this.hideCrosshairs(),this.ctx.updateService.update(import_ag_charts_core96.ChartUpdateType.SCENE_RENDER))}onKeyPress(){this.enabled&&!this.snap&&this.ctx.interactionManager.isState(InteractionState4.Default)&&this.hideCrosshairs()}onHighlightChange(e){if(!this.enabled)return;const{crosshairGroup:t,axisCtx:i}=this,{datum:o,series:r}=e.currentHighlight??{},s=o&&(r?.axes.x?.id===i.axisId||r?.axes.y?.id===i.axisId);if(this.activeHighlight=s?e.currentHighlight:void 0,!this.activeHighlight)this.hideCrosshairs();else if(this.snap){const a=this.getActiveHighlightData(this.activeHighlight);this.updatePositions(a),t.visible=!0}}isInRange(e){return this.axisCtx.inRange(e)}refreshPositions(){this.activeHighlight&&this.updatePositions(this.getActiveHighlightData(this.activeHighlight))}updatePositions(e){const{seriesRect:t,lineGroupSelection:i}=this;i.each((o,r)=>{const s=e[r];if(!s){o.visible=!1,this.hideLabel(r);return}o.visible=!0;const{value:a,position:n}=s;let l=0,c=0;this.isVertical()?(l=n,o.x=Math.round(l)):(c=n,o.y=Math.round(c)),this.label.enabled?this.showLabel(l+t.x,c+t.y,a,r):this.hideLabel(r)})}getData(e){const{axisCtx:t}=this,i="pointer",{xKey:o="",yKey:r=""}=this.activeHighlight??{},{currentX:s,currentY:a}=e,n=readDatum(this.activeHighlight),l=this.isVertical(),c=l?s:a;let h=n?.[l?o:r]??"";return t.continuous&&(h=t.scaleInvert(c)),{[i]:{position:c,value:h}}}getActiveHighlightData(e){const{axisCtx:t}=this,{series:i,xKey:o="",aggregatedValue:r,cumulativeValue:s,midPoint:a}=e,n=readDatum(e),l=i.getKeyProperties(t.direction),c=(t.scale.bandwidth??0)/2,h=i.axes[t.direction]?.id===t.axisId,u=l.includes("yKey")&&h,d=l.includes("xKey")&&h,p=r??s;if(u&&p!==void 0){const y=t.scale.convert(p)+c;return this.isInRange(y)?{yKey:{value:p,position:y}}:{}}if(d){const y=(this.isVertical()?a?.x:a?.y)??0,x=t.continuous?t.scaleInvert(y):n?.[o];return this.isInRange(y)?{xKey:{value:x,position:y}}:{}}const g={};for(const y of l){const x=i.properties[y],f=n?.[x],S=t.scale.convert(f)+c;this.isInRange(S)&&(g[y]={value:f,position:S})}return g}getLabelHtml(e,t){const i=this.axisLayout?.label?.fractionDigits??0,o={text:this.formatValue(e)};return this.label.renderer?t.toLabelHtml(this.label.renderer({value:e,fractionDigits:i}),o):t.toLabelHtml(o)}showLabel(e,t,i,o){if(!this.axisLayout)return;const{bounds:r}=this,s=this.labels[o],a=this.getLabelHtml(i,s);s.setLabelHtml(a);const{width:n,height:l}=s.getBBox(),c=this.axisCtx.position;let h=this.axisLayout.label.spacing+this.axisLayout.tickSize;this.axisCtx.direction===import_ag_charts_core96.ChartAxisDirection.X?(h-=4,s.show({x:e-n/2,y:c==="bottom"?r.y+r.height+h:r.y-l-h})):(h-=8,s.show({x:c==="right"?r.x+r.width+h:r.x-n-h,y:t-l/2}))}hideCrosshairs(){this.crosshairGroup.visible=!1;for(const e of Object.keys(this.labels))this.hideLabel(e)}hideLabel(e){this.labels[e]?.toggle(!1)}};Crosshair.className="Crosshair",__decorateClass([import_ag_charts_core96.Property],Crosshair.prototype,"enabled",2),__decorateClass([import_ag_charts_core96.Property],Crosshair.prototype,"stroke",2),__decorateClass([import_ag_charts_core96.Property],Crosshair.prototype,"lineDash",2),__decorateClass([import_ag_charts_core96.Property],Crosshair.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core96.Property],Crosshair.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core96.Property],Crosshair.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core96.Property],Crosshair.prototype,"snap",2),__decorateClass([import_ag_charts_core96.Property],Crosshair.prototype,"label",2);var CrosshairModule={type:"axis:plugin",name:"crosshair",chartType:"cartesian",enterprise:!0,version:import_ag_charts_community78.VERSION,themeTemplate:{enabled:{$if:[{$or:[{$eq:[{$path:"../type"},"number"]},{$eq:[{$path:"../type"},"log"]},{$eq:[{$path:"../type"},"time"]},{$eq:[{$path:"../type"},"unit-time"]},{$eq:[{$path:"../type"},"ordinal-time"]}]},!0,!1]},snap:!0,stroke:{$ref:"subtleTextColor"},strokeWidth:1,strokeOpacity:1,lineDash:[5,6],lineDashOffset:0,label:{enabled:!0}},create:e=>new Crosshair(e)},import_ag_charts_community80=require("ag-charts-community"),import_ag_charts_core98=require("ag-charts-core"),import_ag_charts_community79=require("ag-charts-community"),import_ag_charts_core97=require("ag-charts-core"),DataSource=class extends import_ag_charts_core97.AbstractModuleInstance{constructor(e){super(),this.enabled=!0,this.getData=()=>Promise.resolve(),this.dataService=e.dataService;let t=!1;this.cleanup.register(e.eventsHub.on("data:load",()=>{t=!0}),e.eventsHub.on("layout:complete",()=>{t&&e.zoomManager.updateZoom({source:"data-update",sourceDetail:"dataSource"})}))}updateCallback(e,t){this.dataService&&(e&&t!=null?this.dataService.updateCallback(t):this.dataService.clearCallback())}};__decorateClass([(0,import_ag_charts_core97.ActionOnSet)({newValue(e){this.updateCallback(e,this.getData)}}),import_ag_charts_core97.Property],DataSource.prototype,"enabled",2),__decorateClass([(0,import_ag_charts_core97.ActionOnSet)({newValue(e){this.updateCallback(this.enabled,e)}}),import_ag_charts_core97.Property],DataSource.prototype,"getData",2),__decorateClass([(0,import_ag_charts_core97.ActionOnSet)({newValue(e){this.dataService.requestThrottle=e}})],DataSource.prototype,"requestThrottle",2),__decorateClass([(0,import_ag_charts_core97.ActionOnSet)({newValue(e){this.dataService.dispatchThrottle=e}})],DataSource.prototype,"updateThrottle",2),__decorateClass([(0,import_ag_charts_core97.ActionOnSet)({newValue(e){this.dataService.dispatchOnlyLatest=!e}})],DataSource.prototype,"updateDuringInteraction",2);var DataSourceModule={type:"plugin",name:"dataSource",enterprise:!0,version:import_ag_charts_community80.VERSION,options:{getData:import_ag_charts_core98.callback,requestThrottle:(0,import_ag_charts_core98.undocumented)(import_ag_charts_core98.positiveNumber),updateThrottle:(0,import_ag_charts_core98.undocumented)(import_ag_charts_core98.positiveNumber),updateDuringInteraction:(0,import_ag_charts_core98.undocumented)(import_ag_charts_core98.boolean)},create:e=>new DataSource(e)},import_ag_charts_community84=require("ag-charts-community"),import_ag_charts_core102=require("ag-charts-core"),import_ag_charts_community83=require("ag-charts-community"),import_ag_charts_core101=require("ag-charts-core"),import_ag_charts_community81=require("ag-charts-community"),import_ag_charts_core99=require("ag-charts-core"),{BBox:BBox6}=import_ag_charts_community81._ModuleSupport,HierarchicalBBox=class{constructor(e){this.components=e,this.union=BBox6.merge(e)}containsPoint(e,t){if(!this.union.containsPoint(e,t))return!1;for(const i of this.components)if(i.containsPoint(e,t))return!0;return!1}},ErrorBarNode=class extends import_ag_charts_community81._ModuleSupport.Group{constructor(){super(),this.capLength=Number.NaN,this._datum=void 0,this.whiskerPath=new import_ag_charts_community81._ModuleSupport.Path,this.capsPath=new import_ag_charts_community81._ModuleSupport.Path,this.bboxes=new HierarchicalBBox([]),this.append([this.whiskerPath,this.capsPath])}get datum(){return this._datum}set datum(e){this._datum=e}calculateCapLength(e,t){const{lengthRatio:i=1,length:o}=e,{lengthRatioMultiplier:r,lengthMax:s}=t,a=o??i*r;return Math.min(a,s)}getItemStylerParams(e,t,i,o){const{datum:r}=this;if(r==null||e.itemStyler==null)return;const{xLowerKey:s,xUpperKey:a,yLowerKey:n,yUpperKey:l}=e;return{...t,datum:r.datum,seriesId:r.series.id,xKey:r.xKey,yKey:r.yKey,xLowerKey:s,xUpperKey:a,yLowerKey:n,yUpperKey:l,highlighted:i,highlightState:o}}formatStyles(e,t,i,o,r){let{cap:s,...a}=e;const n=this.getItemStylerParams(t,e,o,r);if(n!=null&&t.itemStyler!=null){const l=i.callWithContext(t.itemStyler,n);a=(0,import_ag_charts_core99.mergeDefaults)(l,a),s=(0,import_ag_charts_core99.mergeDefaults)(l?.cap,l,s)}return{whiskerStyle:a,capsStyle:s}}applyStyling(e,t){(0,import_ag_charts_core99.partialAssign)(["visible","stroke","strokeWidth","strokeOpacity","lineDash","lineDashOffset"],e,t)}update(e,t,i,o,r){if(this.datum===void 0)return;const{whiskerStyle:s,capsStyle:a}=this.formatStyles(e,t,i,o,r),{xBar:n,yBar:l,capDefaults:c}=this.datum,h=this.whiskerPath;this.applyStyling(h,s),h.path.clear(!0),l!==void 0&&(h.path.moveTo(l.lowerPoint.x,l.lowerPoint.y),h.path.lineTo(l.upperPoint.x,l.upperPoint.y)),n!==void 0&&(h.path.moveTo(n.lowerPoint.x,n.lowerPoint.y),h.path.lineTo(n.upperPoint.x,n.upperPoint.y)),h.path.closePath(),this.capLength=this.calculateCapLength(a??{},c);const u=this.capLength/2,d=this.capsPath;this.applyStyling(d,a),d.path.clear(!0),l!==void 0&&(d.path.moveTo(l.lowerPoint.x-u,l.lowerPoint.y),d.path.lineTo(l.lowerPoint.x+u,l.lowerPoint.y),d.path.moveTo(l.upperPoint.x-u,l.upperPoint.y),d.path.lineTo(l.upperPoint.x+u,l.upperPoint.y)),n!==void 0&&(d.path.moveTo(n.lowerPoint.x,n.lowerPoint.y-u),d.path.lineTo(n.lowerPoint.x,n.lowerPoint.y+u),d.path.moveTo(n.upperPoint.x,n.upperPoint.y-u),d.path.lineTo(n.upperPoint.x,n.upperPoint.y+u)),d.path.closePath()}updateBBoxes(){const{capLength:e,whiskerPath:t,capsPath:i}=this,{yBar:o,xBar:r}=this.datum??{},s=e/2,a=[];if(o!==void 0){const n=o.lowerPoint.y-o.upperPoint.y;a.push(new BBox6(o.lowerPoint.x,o.upperPoint.y,t.strokeWidth,n),new BBox6(o.lowerPoint.x-s,o.lowerPoint.y,e,i.strokeWidth),new BBox6(o.upperPoint.x-s,o.upperPoint.y,e,i.strokeWidth))}if(r!==void 0){const n=r.upperPoint.x-r.lowerPoint.x;a.push(new BBox6(r.lowerPoint.x,r.upperPoint.y,n,t.strokeWidth),new BBox6(r.lowerPoint.x,r.lowerPoint.y-s,i.strokeWidth,e),new BBox6(r.upperPoint.x,r.upperPoint.y-s,i.strokeWidth,e))}this.bboxes.components=a,this.bboxes.union=BBox6.merge(a)}containsPoint(e,t){return this.bboxes.containsPoint(e,t)}pickNode(e,t){return this.containsPoint(e,t)?this:void 0}nearestSquared(e,t,i){const{bboxes:o}=this;if(o.union.distanceSquared(e,t)>i)return{nearest:void 0,distanceSquared:1/0};const{distanceSquared:r}=(0,import_ag_charts_core99.nearestSquared)(e,t,o.components);return{nearest:this,distanceSquared:r}}},ErrorBarGroup=class extends import_ag_charts_community81._ModuleSupport.Group{nearestSquared(e,t){const{nearest:i,distanceSquared:o}=(0,import_ag_charts_core99.nearestSquaredInContainer)(e,t,{children:this.children()});if(i!==void 0&&!Number.isNaN(o))return{datum:i.datum,distanceSquared:o}}},import_ag_charts_community82=require("ag-charts-community"),import_ag_charts_core100=require("ag-charts-core"),ErrorBarCap=class extends import_ag_charts_core100.BaseProperties{};__decorateClass([import_ag_charts_core100.Property],ErrorBarCap.prototype,"visible",2),__decorateClass([import_ag_charts_core100.Property],ErrorBarCap.prototype,"stroke",2),__decorateClass([import_ag_charts_core100.Property],ErrorBarCap.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core100.Property],ErrorBarCap.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core100.Property],ErrorBarCap.prototype,"lineDash",2),__decorateClass([import_ag_charts_core100.Property],ErrorBarCap.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core100.Property],ErrorBarCap.prototype,"length",2),__decorateClass([import_ag_charts_core100.Property],ErrorBarCap.prototype,"lengthRatio",2);var ErrorBarProperties=class extends import_ag_charts_core100.BaseProperties{constructor(){super(...arguments),this.visible=!0,this.stroke="black",this.strokeWidth=1,this.strokeOpacity=1,this.cap=new ErrorBarCap}};__decorateClass([import_ag_charts_core100.Property],ErrorBarProperties.prototype,"yLowerKey",2),__decorateClass([import_ag_charts_core100.Property],ErrorBarProperties.prototype,"yLowerName",2),__decorateClass([import_ag_charts_core100.Property],ErrorBarProperties.prototype,"yUpperKey",2),__decorateClass([import_ag_charts_core100.Property],ErrorBarProperties.prototype,"yUpperName",2),__decorateClass([import_ag_charts_core100.Property],ErrorBarProperties.prototype,"xLowerKey",2),__decorateClass([import_ag_charts_core100.Property],ErrorBarProperties.prototype,"xLowerName",2),__decorateClass([import_ag_charts_core100.Property],ErrorBarProperties.prototype,"xUpperKey",2),__decorateClass([import_ag_charts_core100.Property],ErrorBarProperties.prototype,"xUpperName",2),__decorateClass([import_ag_charts_core100.Property],ErrorBarProperties.prototype,"visible",2),__decorateClass([import_ag_charts_core100.Property],ErrorBarProperties.prototype,"stroke",2),__decorateClass([import_ag_charts_core100.Property],ErrorBarProperties.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core100.Property],ErrorBarProperties.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core100.Property],ErrorBarProperties.prototype,"lineDash",2),__decorateClass([import_ag_charts_core100.Property],ErrorBarProperties.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core100.Property],ErrorBarProperties.prototype,"itemStyler",2),__decorateClass([import_ag_charts_core100.Property],ErrorBarProperties.prototype,"cap",2);var{fixNumericExtent,groupAccumulativeValueProperty,valueProperty:valueProperty2}=import_ag_charts_community83._ModuleSupport,ErrorBars=class ye extends import_ag_charts_core101.AbstractModuleInstance{constructor(t){super(),this.properties=new ErrorBarProperties;const i=t.series,{annotationGroup:o,annotationSelections:r}=i;this.cartesianSeries=i,this.groupNode=new ErrorBarGroup({name:`${o.id}-errorBars`}),o.appendChild(this.groupNode),this.selection=import_ag_charts_community83._ModuleSupport.Selection.select(this.groupNode,()=>this.errorBarFactory()),r.add(this.selection),i.addEventListener("seriesVisibilityChange",s=>this.onToggleSeriesItem(s)),this.cleanup.register(i.events.on("data-processed",s=>this.onDataProcessed(s)),i.events.on("data-update",s=>this.onDataUpdate(s)),t.eventsHub.on("highlight:change",s=>this.onHighlightChange(s)),()=>this.groupNode.remove(),()=>r.delete(this.selection))}hasErrorBars(){const{xLowerKey:t,xUpperKey:i,yLowerKey:o,yUpperKey:r}=this.properties;return(0,import_ag_charts_core101.isDefined)(t)&&(0,import_ag_charts_core101.isDefined)(i)||(0,import_ag_charts_core101.isDefined)(o)&&(0,import_ag_charts_core101.isDefined)(r)}isStacked(){const t=this.cartesianSeries.seriesGrouping?.stackCount;return t==null?!1:t>0}getUnstackPropertyDefinition(t){const i=[],{xLowerKey:o,xUpperKey:r,yLowerKey:s,yUpperKey:a,xErrorsID:n,yErrorsID:l}=this.getMaybeFlippedKeys(),{xScaleType:c,yScaleType:h}=t;return s!=null&&a!=null&&i.push(valueProperty2(s,h,{id:`${l}-lower`}),valueProperty2(a,h,{id:`${l}-upper`})),o!=null&&r!=null&&i.push(valueProperty2(o,c,{id:`${n}-lower`}),valueProperty2(r,c,{id:`${n}-upper`})),i}getStackPropertyDefinition(t){const i=[],{cartesianSeries:o}=this,{xLowerKey:r,xUpperKey:s,yLowerKey:a,yUpperKey:n,xErrorsID:l,yErrorsID:c}=this.getMaybeFlippedKeys(),{xScaleType:h,yScaleType:u}=t,d=o.seriesGrouping?.groupIndex??o.id,p={invalidValue:null,missingValue:0,separateNegative:!0,...o.visible?{}:{forceValue:0}},g=(x,f,S,m)=>groupAccumulativeValueProperty(x,"normal",{id:`${f}-${S}`,groupId:`errorGroup-${d}-${S}`,...p},m),y=(x,f,S,m)=>{i.push(...g(x,S,"lower",m),...g(f,S,"upper",m))};return a!=null&&n!=null&&y(a,n,c,u),r!=null&&s!=null&&y(r,s,l,h),i}getPropertyDefinitions(t){return this.isStacked()?this.getStackPropertyDefinition(t):this.getUnstackPropertyDefinition(t)}onDataProcessed(t){this.dataModel=t.dataModel,this.processedData=t.processedData}getDomain(t){const{xLowerKey:i,xUpperKey:o,xErrorsID:r,yLowerKey:s,yUpperKey:a,yErrorsID:n}=this.getMaybeFlippedKeys();if(t===import_ag_charts_core101.ChartAxisDirection.X?(0,import_ag_charts_core101.isDefined)(i)&&(0,import_ag_charts_core101.isDefined)(o):(0,import_ag_charts_core101.isDefined)(s)&&(0,import_ag_charts_core101.isDefined)(a)){const{dataModel:c,processedData:h,cartesianSeries:u}=this;if(c!=null&&h!=null){const d={x:r,y:n}[t],p=c.getDomain(u,`${d}-lower`,"value",h).domain,g=c.getDomain(u,`${d}-upper`,"value",h).domain,y=[Math.min(...p,...g),Math.max(...p,...g)];return fixNumericExtent(y)}}return[]}onDataUpdate(t){this.dataModel=t.dataModel,this.processedData=t.processedData,(0,import_ag_charts_core101.isDefined)(t.dataModel)&&(0,import_ag_charts_core101.isDefined)(t.processedData)&&(this.createNodeData(),this.update())}getNodeData(){return this.hasErrorBars()?this.cartesianSeries.contextNodeData?.nodeData:void 0}createNodeData(){const t=this.getNodeData(),i=this.cartesianSeries.axes[import_ag_charts_core101.ChartAxisDirection.X]?.scale,o=this.cartesianSeries.axes[import_ag_charts_core101.ChartAxisDirection.Y]?.scale;if(!(!i||!o||!t))for(let r=0;r<t.length;r++){const{midPoint:s,xLower:a,xUpper:n,yLower:l,yUpper:c}=this.getDatum(t,r);if(s!=null){let h,u;(0,import_ag_charts_core101.isDefined)(a)&&(0,import_ag_charts_core101.isDefined)(n)&&(h={lowerPoint:{x:this.convert(i,a),y:s.y},upperPoint:{x:this.convert(i,n),y:s.y}}),(0,import_ag_charts_core101.isDefined)(l)&&(0,import_ag_charts_core101.isDefined)(c)&&(u={lowerPoint:{x:s.x,y:this.convert(o,l)},upperPoint:{x:s.x,y:this.convert(o,c)}}),t[r].xBar=h,t[r].yBar=u}}}getMaybeFlippedKeys(){let{xLowerKey:t,xUpperKey:i,yLowerKey:o,yUpperKey:r}=this.properties,[s,a]=["xValue-errors","yValue-errors"];return this.cartesianSeries.shouldFlipXY()&&([t,o]=[o,t],[i,r]=[r,i],[s,a]=[a,s]),{xLowerKey:t,xUpperKey:i,xErrorsID:s,yLowerKey:o,yUpperKey:r,yErrorsID:a}}static getDatumKey(t,i,o){if(i==null)return;const s=readDatum(t)?.[i];if(s!=null){if(typeof s!="number"){import_ag_charts_core101.Logger.warnOnce(`Found [${i}] error value of type ${typeof s}. Expected number type`);return}return s+o}}getDatum(t,i){const{xLowerKey:o,xUpperKey:r,yLowerKey:s,yUpperKey:a}=this.getMaybeFlippedKeys(),n=t[i],l=n.cumulativeValue==null||!this.isStacked()?0:n.cumulativeValue-n.yValue,[c,h]=this.cartesianSeries.shouldFlipXY()?[l,0]:[0,l];return{midPoint:n.midPoint,xLower:ye.getDatumKey(n,o,c),xUpper:ye.getDatumKey(n,r,c),yLower:ye.getDatumKey(n,s,h),yUpper:ye.getDatumKey(n,a,h)}}convert(t,i){const o=(t.bandwidth??0)/2;return t.convert(i)+o}update(){const t=this.getNodeData();t!=null&&(this.selection.update(t),this.selection.each((i,o,r)=>this.updateNode(i,o,r)))}updateNode(t,i,o){t.datum=i,t.update(this.getDefaultStyle(),this.properties,this.cartesianSeries,!1,"none"),t.updateBBoxes()}pickNodeExact(t){const{x:i,y:o}=t,r=this.groupNode.pickNode(i,o);if(r!=null)return{datum:r.datum,distanceSquared:0}}pickNodeNearest(t){return this.groupNode.nearestSquared(t.x,t.y)}pickNodeMainAxisFirst(t,i){let o,r=[1/0,1/0];const s=[t.x,t.y];i===import_ag_charts_core101.ChartAxisDirection.Y&&s.reverse();for(const a of this.groupNode.children()){const n=a.getBBox(),l=[n.x+n.width/2,n.y+n.height/2];i===import_ag_charts_core101.ChartAxisDirection.Y&&l.reverse();const c=[];for(let h=0;h<s.length;h++)c.push(Math.abs(s[h]-l[h]));(c[0]<r[0]||c[0]==r[0]&&c[1]<r[1])&&(o=a.datum,r=c)}if(o)return{datum:o,distanceSquared:Math.pow(r[0],2)+Math.pow(r[1],2)}}getTooltipParams(){const{xLowerKey:t,xUpperKey:i,yLowerKey:o,yUpperKey:r,xLowerName:s=t,xUpperName:a=i,yLowerName:n=o,yUpperName:l=r}=this.properties;return{xLowerKey:t,xLowerName:s,xUpperKey:i,xUpperName:a,yLowerKey:o,yLowerName:n,yUpperKey:r,yUpperName:l}}onToggleSeriesItem(t){this.groupNode.visible=t.visible}makeStyle(t){return{visible:t.visible,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,stroke:t.stroke,strokeWidth:t.strokeWidth,strokeOpacity:t.strokeOpacity,cap:(0,import_ag_charts_core101.mergeDefaults)(this.properties.cap,t)}}getDefaultStyle(){return this.makeStyle(this.getWhiskerProperties())}getHighlightStyle(){return this.makeStyle(this.getWhiskerProperties())}restyleHighlightChange(t,i,o){const r=this.getNodeData();if(r!=null){for(let s=0;s<r.length;s++)if(t===r[s]){this.selection.at(s)?.update(i,this.properties,this.cartesianSeries,o,o?"highlighted-item":"unhighlighted-item");break}}}onHighlightChange(t){const{previousHighlight:i,currentHighlight:o}=t;o?.series===this.cartesianSeries&&this.restyleHighlightChange(o,this.getHighlightStyle(),!0),i?.series===this.cartesianSeries&&this.restyleHighlightChange(i,this.getDefaultStyle(),!1),this.groupNode.opacity=this.cartesianSeries.getOpacity()}errorBarFactory(){return new ErrorBarNode}getWhiskerProperties(){const{stroke:t,strokeWidth:i,visible:o,strokeOpacity:r,lineDash:s,lineDashOffset:a}=this.properties;return{stroke:t,strokeWidth:i,visible:o,strokeOpacity:r,lineDash:s,lineDashOffset:a}}},ErrorBarsModule={type:"series:plugin",name:"errorBar",chartType:"cartesian",seriesTypes:["bar","line","scatter"],enterprise:!0,version:import_ag_charts_community84.VERSION,options:import_ag_charts_core102.errorBarOptionsDefs,themeTemplate:{visible:!0,stroke:{$ref:"foregroundColor"},strokeWidth:1,strokeOpacity:1,cap:{lengthRatio:{$if:[{$eq:[{$path:"../../type"},"bar"]},.3,1]}}},create:e=>new ErrorBars(e)},import_ag_charts_community86=require("ag-charts-community"),import_ag_charts_core104=require("ag-charts-core"),import_ag_charts_community85=require("ag-charts-community"),import_ag_charts_core103=require("ag-charts-core");function findPrimaryCategoryAxisContext(e){for(const t of[import_ag_charts_core103.ChartAxisDirection.X,import_ag_charts_core103.ChartAxisDirection.Y])for(const i of e.axisManager.getAxisContext(t))if(import_ag_charts_community85._ModuleSupport.BandScale.is(i.scale))return i}var FlashOnUpdate=class extends import_ag_charts_core103.BaseProperties{constructor(e){super(),this.ctx=e,this.enabled=!1,this.item="chart",this.color="#cfeeff",this.opacity=1,this.flashDuration=100,this.fadeDuration=900,this.cleanup=new import_ag_charts_core103.CleanupRegistry,this.element=this.ctx.domManager.addChild("canvas-background","flashOnUpdate"),this.element.role="presentation";let t=!0;const i=o=>{t?t=!1:this.onDataUpdate(o)};this.cleanup.register(this.ctx.eventsHub.on("data:update",i),this.ctx.eventsHub.on("datamodel:diff",o=>this.onDataModelDiff(o)))}destroy(){this.ctx.domManager.removeChild("canvas-background","flashOnUpdate"),this.cleanup.flush()}clearFlash(){this.element.innerHTML="",clearTimeout(this.animationTimeout),this.animationTimeout=void 0}flashElem(e){const{flashDuration:t,fadeDuration:i}=this,o=t+i;e.animate([{background:this.color,offset:0},{background:this.color,offset:t/o},{background:"transparent",offset:1}],{duration:o,easing:"ease-out"})}flashCategoryBands(e){const t=findPrimaryCategoryAxisContext(this.ctx);if(!t)return;this.clearFlash();const i=this.computeCategoryFlashBounds(t,e);for(const r of i){const s=(0,import_ag_charts_core103.createElement)("div");(0,import_ag_charts_core103.setAttribute)(s,"role","presentation"),(0,import_ag_charts_core103.setElementStyle)(s,"position","absolute"),(0,import_ag_charts_core103.setElementBBox)(s,r),this.element.appendChild(s),this.flashElem(s)}const o=this.flashDuration+this.fadeDuration;this.animationTimeout=setTimeout(()=>this.clearFlash(),o)}computeCategories(e){const t=new Set;for(const i of Object.keys(e))for(const o of["updated","added","moved"])for(const r of e[i][o])t.add(r);return t}computeCategoryFlashBounds(e,t){const i=this.ctx.widgets.seriesWidget.getBounds(),o=e.direction===import_ag_charts_core103.ChartAxisDirection.X?([a,n])=>({x:i.x+a,y:i.y,width:n-a,height:i.height}):([a,n])=>({x:i.x,y:i.y+a,width:i.width,height:n-a}),r=[],s=this.computeCategories(t);for(const a of s){const n=e.measureBand(a);n?.band&&r.push(o(n.band))}return r}onDataUpdate(e){!this.enabled||this.item!=="chart"||!e||this.flashElem(this.ctx.widgets.containerWidget.getElement())}onDataModelDiff(e){!this.enabled||this.item!=="category"||this.flashCategoryBands(e.diff)}};FlashOnUpdate.className="FlashOnUpdate",__decorateClass([import_ag_charts_core103.Property],FlashOnUpdate.prototype,"enabled",2),__decorateClass([import_ag_charts_core103.Property],FlashOnUpdate.prototype,"item",2),__decorateClass([import_ag_charts_core103.Property],FlashOnUpdate.prototype,"color",2),__decorateClass([import_ag_charts_core103.Property],FlashOnUpdate.prototype,"opacity",2),__decorateClass([import_ag_charts_core103.Property],FlashOnUpdate.prototype,"flashDuration",2),__decorateClass([import_ag_charts_core103.Property],FlashOnUpdate.prototype,"fadeDuration",2);var FlashOnUpdateModule={type:"plugin",name:"flashOnUpdate",enterprise:!0,version:import_ag_charts_community86.VERSION,options:{enabled:import_ag_charts_core104.boolean,item:(0,import_ag_charts_core104.strictUnion)()("chart","category"),color:import_ag_charts_core104.color,opacity:import_ag_charts_core104.ratio,flashDuration:import_ag_charts_core104.positiveNumber,fadeDuration:import_ag_charts_core104.positiveNumber},themeTemplate:{enabled:!1,item:"chart",color:"#cfeeff",opacity:1,flashDuration:100,fadeDuration:900},create:e=>new FlashOnUpdate(e)},import_ag_charts_community138=require("ag-charts-community"),import_ag_charts_community93=require("ag-charts-community"),import_ag_charts_core111=require("ag-charts-core"),import_ag_charts_community88=require("ag-charts-community"),import_ag_charts_core106=require("ag-charts-core"),import_ag_charts_community87=require("ag-charts-community"),import_ag_charts_core105=require("ag-charts-core"),{TranslatableGroup:TranslatableGroup3}=import_ag_charts_community87._ModuleSupport,MiniChartGroup=class extends TranslatableGroup3{constructor(){super(...arguments),this.inset=0,this.cornerRadius=0}applyClip(e,t){const{cornerRadius:i,inset:o}=this,{x:r,y:s,width:a,height:n}=t,l=(0,import_ag_charts_core105.getPath2D)(),c=new l;c.roundRect(r+o,s+o,a-2*o,n-2*o,i),e.clip(c)}};__decorateClass([(0,import_ag_charts_core105.SceneChangeDetection)()],MiniChartGroup.prototype,"inset",2),__decorateClass([(0,import_ag_charts_core105.SceneChangeDetection)()],MiniChartGroup.prototype,"cornerRadius",2);var{CategoryAxis,Group:Group6,BBox:BBox7,stackCartesianSeries}=import_ag_charts_community88._ModuleSupport,MiniChartPadding=class{constructor(){this.top=0,this.bottom=0}};__decorateClass([import_ag_charts_core106.Property],MiniChartPadding.prototype,"top",2),__decorateClass([import_ag_charts_core106.Property],MiniChartPadding.prototype,"bottom",2);var MiniChart=class extends import_ag_charts_core106.AbstractModuleInstance{constructor(e){super(),this.ctx=e,this.enabled=!1,this.padding=new MiniChartPadding,this.root=new Group6({name:"root"}),this.seriesRoot=this.root.appendChild(new MiniChartGroup({name:"Series-root",zIndex:import_ag_charts_core106.ZIndexMap.SERIES_LAYER,renderToOffscreenCanvas:!0})),this.axisGridGroup=this.root.appendChild(new Group6({name:"Axes-Grids",zIndex:import_ag_charts_core106.ZIndexMap.AXIS_GRID})),this.axisGroup=this.root.appendChild(new Group6({name:"Axes-Grids",zIndex:import_ag_charts_core106.ZIndexMap.AXIS_GRID})),this.axisLabelGroup=this.root.appendChild(new Group6({name:"Axes-Labels",zIndex:import_ag_charts_core106.ZIndexMap.SERIES_LABEL})),this.axisCrosslineRangeGroup=this.root.appendChild(new Group6({name:"Axes-Crosslines-Range",zIndex:import_ag_charts_core106.ZIndexMap.SERIES_CROSSLINE_RANGE})),this.axisCrosslineLineGroup=this.root.appendChild(new Group6({name:"Axes-Crosslines-Line",zIndex:import_ag_charts_core106.ZIndexMap.SERIES_CROSSLINE_LINE})),this.axisCrosslineLabelGroup=this.root.appendChild(new Group6({name:"Axes-Crosslines-Label",zIndex:import_ag_charts_core106.ZIndexMap.SERIES_LABEL})),this.data=[],this._destroyed=!1,this.miniChartAnimationPhase="initial",this.seriesRect=void 0,this.axes=new import_ag_charts_community88._ModuleSupport.ChartAxes,this.series=[],this.cleanup.register(this.ctx.eventsHub.on("data:update",t=>this.updateData(t)))}destroy(){this._destroyed||(super.destroy(),this.destroySeries(this.series),this.axes.destroy(),this._destroyed=!0)}onSeriesChange(e,t){const i=t?.filter(o=>!e.includes(o))??[];this.destroySeries(i);for(const o of e)t?.includes(o)||(o.attachSeries(this.seriesRoot,this.seriesRoot,void 0),o.chart={},Object.defineProperty(o.chart,"mode",{get:()=>"standalone"}),Object.defineProperty(o.chart,"isMiniChart",{get:()=>!0}),Object.defineProperty(o.chart,"flashOnUpdateEnabled",{get:()=>!1}),Object.defineProperty(o.chart,"seriesRect",{get:()=>this.seriesRect}),o.resetAnimation(this.miniChartAnimationPhase==="initial"?"initial":"disabled"));this.seriesRect=void 0}destroySeries(e){if(e)for(const t of e)t.destroy(),t.detachSeries(this.seriesRoot,this.seriesRoot,void 0),t.chart=void 0}assignSeriesToAxes(){for(const e of this.axes)e.boundSeries=this.series.filter(t=>t.axes[e.direction]===e)}assignAxesToSeries(){const e={};for(const t of this.axes){const i=t.direction;(e[i]??(e[i]=[])).push(t)}for(const t of this.series)for(const i of t.directions){const o=t.getKeyAxis(i)??i,r=this.axes.findById(o);if(!r){import_ag_charts_core106.Logger.warnOnce(`no matching axis for direction [${i}] and id [${o}]; check series and axes configuration.`);return}t.axes[i]=r}}updateData(e){for(const t of this.series)t.setChartData(e);this.miniChartAnimationPhase==="initial"&&this.ctx.animationManager.onBatchStop(()=>{this.miniChartAnimationPhase="ready";for(const t of this.series)t.resetAnimation("disabled")})}async processData(e){this.series.some(t=>t.canHaveAxes)&&(this.assignAxesToSeries(),this.assignSeriesToAxes()),await Promise.all(this.series.map(async t=>(t.resetDatumCallbackCache(),t.processData(e))));for(const t of this.axes)t.processData()}computeAxisPadding(){const e=new import_ag_charts_core106.Padding;if(!this.enabled)return e;for(const{position:t,thickness:i,line:o,label:r}of this.axes){if(t==null)continue;let s;i?s=i:s=(o.enabled?o.width:0)+(r.enabled?(0,import_ag_charts_core106.calcLineHeight)(r.fontSize??0)+r.spacing:0),e[t]=Math.ceil(s)}return e}async layout(e,t){var i;const{padding:o}=this,r=this.seriesRect!=null,s=new BBox7(0,0,e,t-(o.top+o.bottom)),a=this.seriesRect?.width!==e||this.seriesRect?.height!==t;this.seriesRect=s,this.seriesRoot.translationY=o.top,this.seriesRoot.setClipRectCanvasSpace(new BBox7(0,-o.top,e,t));for(const n of this.axes){const{position:l="left"}=n;switch(l){case"top":case"bottom":n.range=[0,s.width],n.gridLength=s.height;break;case"right":case"left":{const c=n instanceof CategoryAxis;n.range=c?[0,s.height]:[s.height,0],n.gridLength=s.width;break}}if(n.gridPadding=0,n.translation.x=0,n.translation.y=0,l==="right"?n.translation.x=e:l==="bottom"&&(n.translation.y=t),r||n.resetAnimation("initial"),n.crossLines)for(const c of n.crossLines)c instanceof import_ag_charts_community88._ModuleSupport.CartesianCrossLine&&(c.position=n.position??"top",(i=c.label).parallel??(i.parallel=n.label?.parallel));n.calculateLayout(),n.update()}a&&stackCartesianSeries(this.series),await Promise.all(this.series.map(async n=>n.update({seriesRect:s})))}};__decorateClass([import_ag_charts_core106.Property],MiniChart.prototype,"enabled",2),__decorateClass([(0,import_ag_charts_core106.ProxyProperty)(["seriesRoot","inset"])],MiniChart.prototype,"inset",2),__decorateClass([(0,import_ag_charts_core106.ProxyProperty)(["seriesRoot","cornerRadius"])],MiniChart.prototype,"cornerRadius",2),__decorateClass([(0,import_ag_charts_core106.ActionOnSet)({changeValue(e,t=new import_ag_charts_community88._ModuleSupport.ChartAxes){const i={axisNode:this.axisGroup,gridNode:this.axisGridGroup,labelNode:this.axisLabelGroup,crossLineLineNode:this.axisCrosslineLineGroup,crossLineRangeNode:this.axisCrosslineRangeGroup,crossLineLabelNode:this.axisCrosslineLabelGroup};for(const o of t)e.includes(o)||(o.detachAxis(),o.destroy());for(const o of e)t?.includes(o)||o.attachAxis(i)}})],MiniChart.prototype,"axes",2),__decorateClass([(0,import_ag_charts_core106.ActionOnSet)({changeValue(e,t){this.onSeriesChange(e,t)}})],MiniChart.prototype,"series",2);var import_ag_charts_community89=require("ag-charts-community"),import_ag_charts_core107=require("ag-charts-core"),{SliderWidget}=import_ag_charts_community89._ModuleSupport,NavigatorDOMProxy=class{constructor(e,t){this.ctx=e,this.sliderHandlers=t,this._min=0,this._max=1,this.minRange=.001,this.dragStartX=0,this.ctx=e,this.toolbar=e.proxyInteractionService.createProxyContainer({type:"toolbar",domManagerId:"navigator-toolbar",classList:["ag-charts-proxy-navigator-toolbar"],orientation:"vertical",ariaLabel:{id:"ariaLabelNavigator"}}),this.sliders=[e.proxyInteractionService.createProxyElement({type:"slider",domIndex:1,ariaLabel:{id:"ariaLabelNavigatorMinimum"},parent:this.toolbar,cursor:"ew-resize"}),e.proxyInteractionService.createProxyElement({type:"slider",domIndex:-1/0,ariaLabel:{id:"ariaLabelNavigatorRange"},parent:this.toolbar,cursor:"grab"}),e.proxyInteractionService.createProxyElement({type:"slider",domIndex:2,ariaLabel:{id:"ariaLabelNavigatorMaximum"},parent:this.toolbar,cursor:"ew-resize"})];for(const[i,o]of["min","pan","max"].entries()){const r=this.sliders[i];r.step=SliderWidget.STEP_HUNDRETH,r.keyboardStep=SliderWidget.STEP_ONE,r.orientation="horizontal",r.setPreventsDefault(!1),r.addListener("drag-start",s=>this.onDragStart(i,s,o)),r.addListener("drag-move",s=>this.onDrag(r,s,o)),r.addListener("drag-end",()=>this.updateSliderRatios()),r.addListener("contextmenu",s=>this.onContextMenu(r,s))}this.sliders[0].addListener("change",()=>this.onMinSliderChange()),this.sliders[1].addListener("change",()=>this.onPanSliderChange()),this.sliders[2].addListener("change",()=>this.onMaxSliderChange()),this.updateSliderRatios(),this.updateVisibility(!1)}destroy(){this.toolbar.destroy()}updateVisibility(e){this.toolbar.setHidden(!e)}updateZoom(){const{_min:e,_max:t}=this;e==null||t==null||this.ctx.zoomManager.updateZoom({source:"user-interaction",sourceDetail:"navigatorDOM"},{x:{min:e,max:t}})}updateBounds(e){this.toolbar.setBounds(e)}updateSliderBounds(e,t){this.sliders[e].setBounds(t)}updateMinMax(e,t){this._min=e,this._max=t,this.updateSliderRatios()}updateSliderRatios(){let{_min:e,_max:t}=this;e=Math.round(e*100)/100,t=Math.round(t*100)/100;const i=this.ctx.localeManager.t("ariaValuePanRange",{min:e,max:t});this.sliders[0].setValueRatio(e),this.sliders[1].setValueRatio(e,{ariaValueText:i}),this.sliders[2].setValueRatio(t)}toCanvasOffsets(e){return{offsetX:this.dragStartX+e.originDeltaX}}moveToFront(e){if(e===1)return;const t=this.sliders[e],i=this.sliders[2-e];this.toolbar.moveChild(i,t.domIndex-1)}onDragStart(e,t,i){const o=this.sliders[e],r=this.toolbar.cssLeft(),s=o.cssLeft();this.dragStartX=r+s+t.offsetX,this.moveToFront(e),t.sourceEvent.preventDefault(),this.sliderHandlers.onDragStart(i,this.toCanvasOffsets(t))}onDrag(e,t,i){t.sourceEvent.preventDefault(),this.sliderHandlers.onDrag(i,this.toCanvasOffsets(t))}onContextMenu(e,t){const{offsetX:i,offsetY:o}=t,{x:r,y:s}=this.toolbar.getBounds(),{x:a,y:n}=e.getBounds(),l=i+r+a,c=o+s+n;this.ctx.contextMenuRegistry.dispatchContext("always",{widgetEvent:t,canvasX:l,canvasY:c},void 0)}onPanSliderChange(){const e=this.sliders[1].getValueRatio(),t=this._max-this._min;this._min=(0,import_ag_charts_core107.clamp)(0,e,1-t),this._max=this._min+t,this.updateZoom()}onMinSliderChange(){this._min=this.sliders[0].clampValueRatio(0,this._max-this.minRange),this.updateZoom()}onMaxSliderChange(){this._max=this.sliders[2].clampValueRatio(this._min+this.minRange,1),this.updateZoom()}},import_ag_charts_community90=require("ag-charts-community"),import_ag_charts_core108=require("ag-charts-core"),{BBox:BBox8,ExtendedPath2D}=import_ag_charts_community90._ModuleSupport,RangeHandle=class extends import_ag_charts_community90._ModuleSupport.Path{constructor(){super(...arguments),this.zIndex=3,this.centerX=0,this.centerY=0,this.width=8,this.height=16,this.cornerRadius=4,this.grip=!0,this.gripPath=new ExtendedPath2D}setCenter(e,t){this.dirtyPath=!0,(this.centerX!==e||this.centerY!==t)&&(this.centerX=e,this.centerY=t,this.markDirty("center"))}static align(e,t,i,o,r,s,a,n,l){const c=e.align(i+r*a)+l,h=c+e.align(i+r*a,r*(n-a))-2*l,u=e.align(o+s/2);e.setCenter(c,u),t.setCenter(h,u)}computeBBox(){const{centerX:e,centerY:t,width:i,height:o}=this,r=e-i/2,s=t-o/2;return new BBox8(r,s,i,o)}isPointInPath(e,t){return this.getBBox().containsPoint(e,t)}updatePath(){const{centerX:e,centerY:t,path:i,gripPath:o,strokeWidth:r,cornerRadius:s,grip:a}=this,n=r/2,l=this.layerManager?.canvas?.pixelRatio??1;i.clear(),o.clear();const c=Math.floor(this.width/2*l)/l,h=Math.floor(this.height/2*l)/l;i.roundRect(e-c+n,t-h+n,2*(c-n),2*(h-n),s);const u=3;if(a)for(let d=-.5;d<=.5;d+=1)for(let p=-1;p<=1;p+=1)o.arc(e+d*u,t+p*u,1,0,2*Math.PI),o.closePath()}renderFill(e,t){const{stroke:i}=this;super.renderFill(e,t),e.fillStyle=typeof i=="string"?i:"black",e.fill(this.gripPath.getPath2D())}};RangeHandle.className="RangeHandle",__decorateClass([import_ag_charts_core108.Property,(0,import_ag_charts_core108.SceneChangeDetection)()],RangeHandle.prototype,"width",2),__decorateClass([import_ag_charts_core108.Property,(0,import_ag_charts_core108.SceneChangeDetection)()],RangeHandle.prototype,"height",2),__decorateClass([import_ag_charts_core108.Property,(0,import_ag_charts_core108.SceneChangeDetection)()],RangeHandle.prototype,"cornerRadius",2),__decorateClass([import_ag_charts_core108.Property,(0,import_ag_charts_core108.SceneChangeDetection)()],RangeHandle.prototype,"grip",2);var import_ag_charts_community91=require("ag-charts-community"),import_ag_charts_core109=require("ag-charts-core"),{Path:Path6,BBox:BBox9,ExtendedPath2D:ExtendedPath2D2,clippedRoundRect}=import_ag_charts_community91._ModuleSupport,RangeMask=class extends Path6{constructor(){super(...arguments),this.cornerRadius=4,this.zIndex=2,this.x=0,this.y=0,this.width=200,this.height=30,this.min=0,this.max=1,this.visiblePath=new ExtendedPath2D2}layout(e,t,i,o,r,s){r=Number.isNaN(r)?this.min:r,s=Number.isNaN(s)?this.max:s,(e!==this.x||t!==this.y||i!==this.width||this.height!==o||r!==this.min||s!==this.max)&&(this.x=e,this.y=t,this.width=i,this.height=o,this.min=r,this.max=s,this.dirtyPath=!0,this.markDirty("RangeMask.layout"))}computeBBox(){const{x:e,y:t,width:i,height:o}=this;return new BBox9(e,t,i,o)}computeVisibleRangeBBox(){const{x:e,y:t,width:i,height:o,min:r,max:s}=this,a=e+i*r,n=e+i*s;return new BBox9(a,t,n-a,o)}updatePath(){const{path:e,visiblePath:t,x:i,y:o,width:r,height:s,min:a,max:n,strokeWidth:l,cornerRadius:c}=this,h=l/2;e.clear(),t.clear();const u=this.align(i)+h,d=this.align(o)+h,p=this.align(i,r)-2*h,g=this.align(o,s)-2*h,y=this.align(i+r*a)+h,x=y+this.align(i+r*a,r*(n-a))-2*h,f={topLeft:c,topRight:c,bottomRight:c,bottomLeft:c},S=(m,v,b)=>{if(b-v<1)return;const D=new BBox9(v,d,b-v,g);clippedRoundRect(m,u,d,p,g,f,D)};S(e,u,y),S(e,x,p+u),S(t,y,x)}renderStroke(e,t){super.renderStroke(e,t),super.renderStroke(e,this.visiblePath.getPath2D())}};RangeMask.className="RangeMask",__decorateClass([import_ag_charts_core109.Property,(0,import_ag_charts_core109.SceneChangeDetection)()],RangeMask.prototype,"cornerRadius",2);var import_ag_charts_community92=require("ag-charts-community"),import_ag_charts_core110=require("ag-charts-core"),RangeSelector=class extends import_ag_charts_community92._ModuleSupport.Group{constructor(e){super({name:"rangeSelectorGroup",zIndex:import_ag_charts_core110.ZIndexMap.NAVIGATOR}),this.x=0,this.y=0,this.width=200,this.height=30,this.lOffset=0,this.rOffset=0,this.background=this.appendChild(new import_ag_charts_community92._ModuleSupport.TranslatableGroup({name:"navigator-background",zIndex:1})),this.append(e)}layout(e,t,i,o,r,s){this.x=e,this.y=t,this.width=i,this.height=o,this.lOffset=r,this.rOffset=s,this.background.translationX=e,this.background.translationY=t,this.markDirty("RangeSelector")}updateBackground(e,t){e?.remove(),t!=null&&this.background.appendChild(t),this.markDirty("RangeSelector")}computeBBox(){const{x:e,y:t,width:i,height:o,lOffset:r,rOffset:s}=this;return new import_ag_charts_community92._ModuleSupport.BBox(e-r,t,i+(r+s),o)}},Navigator=class extends import_ag_charts_core111.AbstractModuleInstance{constructor(e){super(),this.ctx=e,this.enabled=!1,this.mask=new RangeMask,this.minHandle=new RangeHandle,this.maxHandle=new RangeHandle,this.maskVisibleRange={id:"navigator-mask-visible-range",getBBox:()=>this.mask.computeVisibleRangeBBox(),toCanvasBBox:()=>this.mask.computeVisibleRangeBBox(),fromCanvasPoint:(t,i)=>({x:t,y:i})},this.height=30,this.cornerRadius=0,this.spacing=10,this.x=0,this.y=0,this.width=0,this.rangeSelector=new RangeSelector([this.mask,this.minHandle,this.maxHandle]),this.cleanup.register(e.scene.attachNode(this.rangeSelector),e.eventsHub.on("locale:change",()=>this.updateZoom()),e.layoutManager.registerElement(import_ag_charts_community93._ModuleSupport.LayoutElement.Navigator,t=>this.onLayoutStart(t)),e.eventsHub.on("layout:complete",t=>this.onLayoutComplete(t)),e.eventsHub.on("zoom:change-complete",t=>this.onZoomChange(t))),this.domProxy=new NavigatorDOMProxy(e,this),this.updateGroupVisibility(),this.miniChart=new MiniChart(e)}updateBackground(e,t){this.rangeSelector?.updateBackground(e,t)}updateGroupVisibility(){const{enabled:e}=this;this.rangeSelector==null||e===this.rangeSelector.visible||(this.rangeSelector.visible=e,this.domProxy.updateVisibility(e),e?this.updateZoom():this.ctx.zoomManager.updateZoom({source:"chart-update",sourceDetail:"navigator"},{x:{min:0,max:1}}))}onLayoutStart({layoutBox:e}){if(this.enabled){const t=this.height+this.spacing;e.shrink(t,"bottom"),this.y=e.y+e.height+this.spacing}else this.y=0;if(this.enabled&&this.miniChart){const{top:t,bottom:i}=this.miniChart.computeAxisPadding();e.shrink(t+i,"bottom"),this.y-=i,this.miniChart.inset=this.mask.strokeWidth/2,this.miniChart.cornerRadius=this.mask.cornerRadius}}onLayoutComplete(e){const{x:t,width:i}=e.series.rect,{y:o,height:r}=this;if(this.domProxy.updateVisibility(this.enabled),this.enabled){const{_min:s,_max:a}=this.domProxy;this.layoutNodes(t,o,i,r,s,a),this.domProxy.updateBounds({x:t,y:o,width:i,height:r})}this.x=t,this.width=i,this.miniChart?.layout(i,r).catch(s=>import_ag_charts_core111.Logger.error(s))}canDrag(){return this.enabled&&this.ctx.interactionManager.isState(import_ag_charts_community93._ModuleSupport.InteractionState.ZoomDraggable)}onDragStart(e,{offsetX:t}){this.canDrag()&&(e==="pan"&&(this.panStart=(t-this.x)/this.width-this.domProxy._min),this.ctx.zoomManager.fireZoomPanStartEvent("navigator"))}onDrag(e,{offsetX:t}){if(!this.canDrag())return;const{panStart:i,x:o,width:r}=this,{minRange:s}=this.domProxy;let{_min:a,_max:n}=this.domProxy;const l=(t-o)/r;if(e==="min")a=(0,import_ag_charts_core111.clamp)(0,l,n-s);else if(e==="max")n=(0,import_ag_charts_core111.clamp)(a+s,l,1);else if(e==="pan"&&i!=null){const c=n-a;a=(0,import_ag_charts_core111.clamp)(0,l-i,1-c),n=a+c}this.domProxy._min=a,this.domProxy._max=n,this.updateZoom()}onZoomChange(e){const{x:t}=e;if(!t)return;const{x:i,y:o,width:r,height:s}=this,{min:a,max:n}=t;this.domProxy.updateMinMax(a,n),this.layoutNodes(i,o,r,s,a,n)}layoutNodes(e,t,i,o,r,s){const{rangeSelector:a,mask:n,minHandle:l,maxHandle:c}=this;n.layout(e,t,i,o,r,s),a.layout(e,t,i,o,l.width/2,c.width/2),RangeHandle.align(l,c,e,t,i,o,r,s,n.strokeWidth/2),r+(s-r)/2<.5?(l.zIndex=3,c.zIndex=4):(l.zIndex=4,c.zIndex=3);for(const[h,u]of[l,this.maskVisibleRange,c].entries()){const d=u.getBBox(),p={x:d.x-e,y:d.y-t,height:d.height,width:d.width};this.domProxy.updateSliderBounds(h,p)}}updateZoom(){this.enabled&&this.domProxy.updateZoom()}async processData(e){return this.miniChart?.processData(e)}};__decorateClass([(0,import_ag_charts_core111.ObserveChanges)((e,t,i)=>{e.updateBackground(i?.root,t?.root)})],Navigator.prototype,"miniChart",2),__decorateClass([import_ag_charts_core111.Property,(0,import_ag_charts_core111.ObserveChanges)((e,t)=>{e.ctx.zoomManager.setNavigatorEnabled(!!t),e.updateGroupVisibility()})],Navigator.prototype,"enabled",2),__decorateClass([import_ag_charts_core111.Property],Navigator.prototype,"height",2),__decorateClass([import_ag_charts_core111.Property,(0,import_ag_charts_core111.ObserveChanges)((e,t)=>{e.mask.cornerRadius=t})],Navigator.prototype,"cornerRadius",2),__decorateClass([import_ag_charts_core111.Property],Navigator.prototype,"spacing",2);var import_ag_charts_community136=require("ag-charts-community"),import_ag_charts_core156=require("ag-charts-core"),import_ag_charts_community98=require("ag-charts-community"),import_ag_charts_core117=require("ag-charts-core"),import_ag_charts_community96=require("ag-charts-community"),import_ag_charts_core114=require("ag-charts-core");function prepareBoxPlotFromTo(e){return{from:e?{scalingX:1,scalingY:0}:{scalingX:0,scalingY:1},to:{scalingX:1,scalingY:1}}}function resetBoxPlotSelectionsScalingCenterFn(e){return(t,i)=>e?{scalingCenterY:i.scaledValues.medianValue}:{scalingCenterX:i.scaledValues.medianValue}}var import_ag_charts_community94=require("ag-charts-community"),import_ag_charts_core112=require("ag-charts-core"),{Path:Path7,Scalable,ExtendedPath2D:ExtendedPath2D3,BBox:BBox10,clippedRoundRect:baseClippedRoundRect}=import_ag_charts_community94._ModuleSupport,BoxPlotNode=class extends Scalable(Path7){constructor(){super(...arguments),this.wickPath=new ExtendedPath2D3,this.horizontal=!1,this.center=0,this.thickness=0,this.min=0,this.q1=0,this.median=0,this.q3=0,this.max=0,this.cornerRadius=0,this.crisp=!1,this.strokeAlignment=0,this.wickStroke=void 0,this.wickStrokeWidth=void 0,this.wickStrokeOpacity=void 0,this.capLengthRatio=1,this.wickStrokeAlignment=0}computeBBox(){const{horizontal:e,center:t,thickness:i,min:o,max:r}=this;return e?new BBox10(Math.min(o,r),t-i/2,Math.abs(r-o),i):new BBox10(t-i/2,Math.min(o,r),i,Math.abs(r-o))}computeDefaultGradientFillBBox(){const{horizontal:e,center:t,thickness:i,q1:o,q3:r}=this;return e?new BBox10(Math.min(o,r),t-i/2,Math.abs(r-o),i):new BBox10(t-i/2,Math.min(o,r),i,Math.abs(r-o))}isPointInPath(e,t){return this.getBBox().containsPoint(e,t)}distanceSquared(e,t){return this.getBBox().distanceSquared(e,t)}get midPoint(){return this.horizontal?{x:(this.min+this.max)/2,y:this.center}:{x:this.center,y:(this.min+this.max)/2}}alignedCoordinates(){const{thickness:e,crisp:t}=this;let{center:i,min:o,q1:r,median:s,q3:a,max:n}=this,l=i-e/2,c=i+e/2;if(t&&e>1){o=this.align(o),r=this.align(r),s=this.align(s),a=this.align(a),n=o+this.align(o,n-o);const h=this.align(e/2);i=this.align(i),l=i-h,c=i+h}return{center:i,x0:l,x1:c,min:o,max:n,q1:r,median:s,q3:a}}updatePath(){const{path:e,stroke:t,strokeWidth:i,strokeOpacity:o,lineDash:r,lineDashOffset:s,wickStroke:a,wickStrokeWidth:n,wickStrokeOpacity:l,wickLineDash:c,wickLineDashOffset:h,strokeAlignment:u,cornerRadius:d,capLengthRatio:p,horizontal:g}=this,{center:y,x0:x,x1:f,min:S,max:m,q1:v,median:b,q3:D}=this.alignedCoordinates(),k=this.layerManager?.canvas.pixelRatio??1,A=this.wickStrokeAlignment>0?k/this.wickStrokeAlignment/2%1:0;this.path.clear(),this.wickPath.clear();const I=a!=null&&a!==t||n!=null&&n!==i||l!=null&&l!==o||c!=null&&c!==r||h!=null&&h!==s?this.wickPath:e;if(Math.abs(f-x)<=3){moveTo(I,g,y,S),lineTo(I,g,y,m);return}const _=Math.min(S,m),P=Math.max(S,m),O=Math.min(v,D),C=Math.max(v,D),L=y-Math.abs((f-x)*p)/2,E=y+Math.abs((f-x)*p)/2;moveTo(I,g,L,_-A),lineTo(I,g,E,_-A),moveTo(I,g,y-A,_-A),lineTo(I,g,y-A,O+i/2),moveTo(I,g,y-A,P+A),lineTo(I,g,y-A,C-i/2),moveTo(I,g,L,P+A),lineTo(I,g,E,P+A);const V=i/2+u,w=i/2-u,T=C-O-2*w;if(T>0){const z=x+V,B=O+w,F=f-x-2*V,R={topLeft:d,topRight:d,bottomRight:d,bottomLeft:d};clippedRoundRect2(e,g,z,B,F,T,R,new BBox10(z,B,F,b-B)),clippedRoundRect2(e,g,z,B,F,T,R,new BBox10(z,b,F,B+T-b))}else{const z=(O+C)/2;moveTo(e,g,x,z),lineTo(e,g,f,z)}}drawPath(e){super.drawPath(e);const{wickPath:t}=this;if(t.isEmpty())return;const{stroke:i,strokeWidth:o,strokeOpacity:r,lineDash:s,lineDashOffset:a,wickStroke:n=i,wickStrokeWidth:l=o,wickStrokeOpacity:c=r,wickLineDash:h=s,wickLineDashOffset:u=a}=this;l!==0&&(e.globalAlpha*=c,typeof n=="string"&&(e.strokeStyle=n),e.lineWidth=l,h!=null&&e.setLineDash([...h]),e.lineDashOffset=u,e.stroke(t.getPath2D()))}};__decorateClass([(0,import_ag_charts_core112.SceneChangeDetection)()],BoxPlotNode.prototype,"horizontal",2),__decorateClass([(0,import_ag_charts_core112.SceneChangeDetection)()],BoxPlotNode.prototype,"center",2),__decorateClass([(0,import_ag_charts_core112.SceneChangeDetection)()],BoxPlotNode.prototype,"thickness",2),__decorateClass([(0,import_ag_charts_core112.SceneChangeDetection)()],BoxPlotNode.prototype,"min",2),__decorateClass([(0,import_ag_charts_core112.SceneChangeDetection)()],BoxPlotNode.prototype,"q1",2),__decorateClass([(0,import_ag_charts_core112.SceneChangeDetection)()],BoxPlotNode.prototype,"median",2),__decorateClass([(0,import_ag_charts_core112.SceneChangeDetection)()],BoxPlotNode.prototype,"q3",2),__decorateClass([(0,import_ag_charts_core112.SceneChangeDetection)()],BoxPlotNode.prototype,"max",2),__decorateClass([(0,import_ag_charts_core112.SceneChangeDetection)()],BoxPlotNode.prototype,"cornerRadius",2),__decorateClass([(0,import_ag_charts_core112.SceneChangeDetection)()],BoxPlotNode.prototype,"crisp",2),__decorateClass([(0,import_ag_charts_core112.SceneChangeDetection)()],BoxPlotNode.prototype,"strokeAlignment",2),__decorateClass([(0,import_ag_charts_core112.SceneChangeDetection)()],BoxPlotNode.prototype,"wickStroke",2),__decorateClass([(0,import_ag_charts_core112.SceneChangeDetection)()],BoxPlotNode.prototype,"wickStrokeWidth",2),__decorateClass([(0,import_ag_charts_core112.SceneChangeDetection)()],BoxPlotNode.prototype,"wickStrokeOpacity",2),__decorateClass([(0,import_ag_charts_core112.SceneArrayChangeDetection)()],BoxPlotNode.prototype,"wickLineDash",2),__decorateClass([(0,import_ag_charts_core112.SceneChangeDetection)()],BoxPlotNode.prototype,"wickLineDashOffset",2),__decorateClass([(0,import_ag_charts_core112.SceneChangeDetection)()],BoxPlotNode.prototype,"capLengthRatio",2),__decorateClass([(0,import_ag_charts_core112.SceneChangeDetection)()],BoxPlotNode.prototype,"wickStrokeAlignment",2);function moveTo(e,t,i,o){t?e.moveTo(o,i):e.moveTo(i,o)}function lineTo(e,t,i,o){t?e.lineTo(o,i):e.lineTo(i,o)}function clippedRoundRect2(e,t,i,o,r,s,a,n){t?baseClippedRoundRect(e,o,i,s,r,a,n==null?void 0:new BBox10(n.y,n.x,n.height,n.width)):baseClippedRoundRect(e,i,o,r,s,a,n)}var import_ag_charts_community95=require("ag-charts-community"),import_ag_charts_core113=require("ag-charts-core"),{AbstractBarSeriesProperties,makeSeriesTooltip}=import_ag_charts_community95._ModuleSupport,BoxPlotSeriesCap=class extends import_ag_charts_core113.BaseProperties{constructor(){super(...arguments),this.lengthRatio=.5}};__decorateClass([import_ag_charts_core113.Property],BoxPlotSeriesCap.prototype,"lengthRatio",2);var BoxPlotSeriesWhisker=class extends import_ag_charts_core113.BaseProperties{};__decorateClass([import_ag_charts_core113.Property],BoxPlotSeriesWhisker.prototype,"stroke",2),__decorateClass([import_ag_charts_core113.Property],BoxPlotSeriesWhisker.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core113.Property],BoxPlotSeriesWhisker.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core113.Property],BoxPlotSeriesWhisker.prototype,"lineDash",2),__decorateClass([import_ag_charts_core113.Property],BoxPlotSeriesWhisker.prototype,"lineDashOffset",2);var BoxPlotSeriesProperties=class extends AbstractBarSeriesProperties{constructor(){super(...arguments),this.fill="#c16068",this.fillOpacity=1,this.stroke="#333",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.cap=new BoxPlotSeriesCap,this.whisker=new BoxPlotSeriesWhisker,this.tooltip=makeSeriesTooltip()}toJson(){const{stroke:e,strokeWidth:t,strokeOpacity:i,lineDash:o,lineDashOffset:r}=this,s=super.toJson();return s.whisker=(0,import_ag_charts_core113.mergeDefaults)(s.whisker,{stroke:e,strokeWidth:t,strokeOpacity:i,lineDash:o,lineDashOffset:r}),s}};__decorateClass([import_ag_charts_core113.Property],BoxPlotSeriesProperties.prototype,"xKey",2),__decorateClass([import_ag_charts_core113.Property],BoxPlotSeriesProperties.prototype,"minKey",2),__decorateClass([import_ag_charts_core113.Property],BoxPlotSeriesProperties.prototype,"q1Key",2),__decorateClass([import_ag_charts_core113.Property],BoxPlotSeriesProperties.prototype,"medianKey",2),__decorateClass([import_ag_charts_core113.Property],BoxPlotSeriesProperties.prototype,"q3Key",2),__decorateClass([import_ag_charts_core113.Property],BoxPlotSeriesProperties.prototype,"maxKey",2),__decorateClass([import_ag_charts_core113.Property],BoxPlotSeriesProperties.prototype,"xName",2),__decorateClass([import_ag_charts_core113.Property],BoxPlotSeriesProperties.prototype,"yName",2),__decorateClass([import_ag_charts_core113.Property],BoxPlotSeriesProperties.prototype,"minName",2),__decorateClass([import_ag_charts_core113.Property],BoxPlotSeriesProperties.prototype,"q1Name",2),__decorateClass([import_ag_charts_core113.Property],BoxPlotSeriesProperties.prototype,"medianName",2),__decorateClass([import_ag_charts_core113.Property],BoxPlotSeriesProperties.prototype,"q3Name",2),__decorateClass([import_ag_charts_core113.Property],BoxPlotSeriesProperties.prototype,"maxName",2),__decorateClass([import_ag_charts_core113.Property],BoxPlotSeriesProperties.prototype,"fill",2),__decorateClass([import_ag_charts_core113.Property],BoxPlotSeriesProperties.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core113.Property],BoxPlotSeriesProperties.prototype,"stroke",2),__decorateClass([import_ag_charts_core113.Property],BoxPlotSeriesProperties.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core113.Property],BoxPlotSeriesProperties.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core113.Property],BoxPlotSeriesProperties.prototype,"lineDash",2),__decorateClass([import_ag_charts_core113.Property],BoxPlotSeriesProperties.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core113.Property],BoxPlotSeriesProperties.prototype,"cornerRadius",2),__decorateClass([import_ag_charts_core113.Property],BoxPlotSeriesProperties.prototype,"styler",2),__decorateClass([import_ag_charts_core113.Property],BoxPlotSeriesProperties.prototype,"itemStyler",2),__decorateClass([import_ag_charts_core113.Property],BoxPlotSeriesProperties.prototype,"cap",2),__decorateClass([import_ag_charts_core113.Property],BoxPlotSeriesProperties.prototype,"whisker",2),__decorateClass([import_ag_charts_core113.Property],BoxPlotSeriesProperties.prototype,"tooltip",2);var{fixNumericExtent:fixNumericExtent2,keyProperty:keyProperty2,SeriesNodePickMode,SMALLEST_KEY_INTERVAL,valueProperty:valueProperty3,diff,animationValidation,computeBarFocusBounds,createDatumId,HighlightState,motion,getItemStyles,calculateSegments,toHighlightString,processedDataIsAnimatable,upsertNodeDatum}=import_ag_charts_community96._ModuleSupport,BoxPlotSeriesNodeEvent=class extends import_ag_charts_community96._ModuleSupport.SeriesNodeEvent{constructor(e,t,i,o){super(e,t,i,o),this.xKey=o.properties.xKey,this.minKey=o.properties.minKey,this.q1Key=o.properties.q1Key,this.medianKey=o.properties.medianKey,this.q3Key=o.properties.q3Key,this.maxKey=o.properties.maxKey}},BoxPlotSeries=class extends import_ag_charts_community96._ModuleSupport.AbstractBarSeries{constructor(e){super({moduleCtx:e,pickModes:[SeriesNodePickMode.NEAREST_NODE,SeriesNodePickMode.EXACT_SHAPE_MATCH],propertyKeys:{x:["xKey"],y:["medianKey","q1Key","q3Key","minKey","maxKey"]},propertyNames:{x:["xName"],y:["medianName","q1Name","q3Name","minName","maxName"]},categoryKey:"xValue",pathsPerSeries:[]}),this.properties=new BoxPlotSeriesProperties,this.NodeEvent=BoxPlotSeriesNodeEvent}async processData(e){if(!this.visible)return;const{xKey:t,minKey:i,q1Key:o,medianKey:r,q3Key:s,maxKey:a}=this.properties,n=!this.ctx.animationManager.isSkipped(),l=this.getCategoryAxis()?.scale,c=this.getValueAxis()?.scale,{isContinuousX:h,xScaleType:u,yScaleType:d}=this.getScaleInformation({xScale:l,yScale:c}),p=[];this.needsDataModelDiff()&&this.processedData&&p.push(diff(this.id,this.processedData)),n&&p.push(animationValidation());const g=this.properties.allowNullKeys??!1,{processedData:y}=await this.requestDataModel(e,this.data,{props:[keyProperty2(t,u,{id:"xValue",allowNullKey:g}),valueProperty3(i,d,{id:"minValue"}),valueProperty3(o,d,{id:"q1Value"}),valueProperty3(r,d,{id:"medianValue"}),valueProperty3(s,d,{id:"q3Value"}),valueProperty3(a,d,{id:"maxValue"}),...h?[SMALLEST_KEY_INTERVAL]:[],...p]});this.smallestDataInterval=y.reduced?.smallestKeyInterval,this.animationState.transition("updateData")}getSeriesDomain(e){const{processedData:t,dataModel:i}=this;if(!(t&&i))return{domain:[]};if(e!==this.getBarDirection()){const{index:r,def:s}=i.resolveProcessedDataDefById(this,"xValue"),a=t.domain.keys[r];if(s.type==="key"&&s.valueType==="category"){const n=i.getKeySortMetadata(this,"xValue",t);return{domain:a,sortMetadata:n}}return{domain:this.padBandExtent(a)}}const o=this.domainForClippedRange(e,["minValue","maxValue"],"xValue");return{domain:fixNumericExtent2(o)}}getSeriesRange(e,t){return this.domainForVisibleRange(import_ag_charts_core114.ChartAxisDirection.Y,["maxValue","minValue"],"xValue",t)}createNodeDatumContext(e,t){const{dataModel:i,processedData:o,contextNodeData:r}=this;if(!i||!o)return;const s=r?.nodeData!=null&&o.changeDescription!=null,a=!this.ctx.animationManager.isSkipped(),{groupOffset:n,barOffset:l,barWidth:c}=this.getBarDimensions();return{xAxis:e,yAxis:t,rawData:o.dataSources.get(this.id)?.data??[],xValues:i.resolveKeysById(this,"xValue",o),minValues:i.resolveColumnById(this,"minValue",o),q1Values:i.resolveColumnById(this,"q1Value",o),medianValues:i.resolveColumnById(this,"medianValue",o),q3Values:i.resolveColumnById(this,"q3Value",o),maxValues:i.resolveColumnById(this,"maxValue",o),xScale:e.scale,yScale:t.scale,groupOffset:n,barOffset:l,barWidth:c,isVertical:this.isVertical(),xKey:this.properties.xKey,animationEnabled:a,canIncrementallyUpdate:s,nodes:s?r.nodeData:[],nodeIndex:0}}validateBoxPlotValues(e,t,i,o,r){return[e,t,i,o,r].every(s=>typeof s=="number")&&e<=t&&t<=i&&i<=o&&o<=r}computeScaledValues(e,t,i){const o=e.xScale.convert(e.xValues[i]);return Number.isFinite(o)?(t.xValue=o+e.groupOffset+e.barOffset+e.barWidth/2,t.minValue=e.yScale.convert(e.minValues[i]),t.q1Value=e.yScale.convert(e.q1Values[i]),t.medianValue=e.yScale.convert(e.medianValues[i]),t.q3Value=e.yScale.convert(e.q3Values[i]),t.maxValue=e.yScale.convert(e.maxValues[i]),!0):!1}createSkeletonNodeDatum(e,t){return{series:this,datum:t.datum,datumIndex:t.datumIndex,xKey:e.xKey,bandwidth:e.barWidth,scaledValues:{xValue:0,minValue:0,q1Value:0,medianValue:0,q3Value:0,maxValue:0},midPoint:{x:0,y:0},focusRect:{x:0,y:0,width:0,height:0}}}updateNodeDatum(e,t,i){const{isVertical:o,barWidth:r}=e,s=i.scaledValues,a=t;a.datum=i.datum,a.datumIndex=i.datumIndex,a.bandwidth=r;const n=a.scaledValues;n.xValue=s.xValue,n.minValue=s.minValue,n.q1Value=s.q1Value,n.medianValue=s.medianValue,n.q3Value=s.q3Value,n.maxValue=s.maxValue;const l=Math.abs(s.q3Value-s.q1Value),c=s.xValue,h=Math.min(s.q3Value,s.q1Value)+l/2,u=o?c:h,d=o?h:c;a.midPoint?(a.midPoint.x=u,a.midPoint.y=d):a.midPoint={x:u,y:d};const p=a.focusRect;o?(p.x=u-r/2,p.y=s.minValue,p.width=r,p.height=s.maxValue-s.minValue):(p.x=s.minValue,p.y=d-r/2,p.width=s.maxValue-s.minValue,p.height=r)}createNodeDatum(e,t){const i=this.createSkeletonNodeDatum(e,t);return this.updateNodeDatum(e,i,t),i}initializeResult(e){return{itemId:this.properties.xKey,nodeData:e.nodes,labelData:[],scales:this.calculateScaling(),visible:this.visible,groupScale:void 0,styles:void 0,segments:void 0}}populateNodeData(e){const t={xValue:0,minValue:0,q1Value:0,medianValue:0,q3Value:0,maxValue:0},i={datumIndex:0,datum:void 0,scaledValues:t};for(let o=0;o<e.rawData.length;o++){const r=e.rawData[o];if(e.xValues[o]===void 0&&!this.properties.allowNullKeys)continue;const a=e.minValues[o],n=e.q1Values[o],l=e.medianValues[o],c=e.q3Values[o],h=e.maxValues[o];this.validateBoxPlotValues(a,n,l,c,h)&&this.computeScaledValues(e,t,o)&&(i.datumIndex=o,i.datum=r,upsertNodeDatum(e,i,(u,d)=>this.createNodeDatum(u,d),(u,d,p)=>this.updateNodeDatum(u,d,p)))}}finalizeNodeData(e){e.canIncrementallyUpdate&&e.nodeIndex<e.nodes.length&&(e.nodes.length=e.nodeIndex)}assembleResult(e,t){const i=calculateSegments(this.properties.segmentation,e.xAxis,e.yAxis,this.chart.seriesRect,this.ctx.scene);return t.groupScale=this.getScaling(this.ctx.seriesStateManager.getGroupScale(this)),t.styles=getItemStyles(this.getItemStyle.bind(this)),t.segments=i,t}legendItemSymbol(){const{fill:e,stroke:t,strokeWidth:i,fillOpacity:o,strokeOpacity:r,lineDash:s,lineDashOffset:a}=this.getStyle(!1,HighlightState.None);return{marker:{fill:(0,import_ag_charts_core114.deepClone)(e),fillOpacity:o,stroke:t,strokeOpacity:r,strokeWidth:i,lineDash:s,lineDashOffset:a}}}getLegendData(e){const{id:t,ctx:{legendManager:i},visible:o}=this,{xKey:r,yName:s,showInLegend:a,legendItemName:n}=this.properties;return!r||e!=="category"?[]:[{legendType:"category",id:t,itemId:t,seriesId:t,enabled:o&&i.getItemEnabled({seriesId:t,itemId:t}),label:{text:n??s??t},symbol:this.legendItemSymbol(),legendItemName:n,hideInLegend:!a}]}getTooltipContent(e){const{id:t,dataModel:i,processedData:o,properties:r}=this,{xKey:s,xName:a,yName:n,medianKey:l,medianName:c,q1Key:h,q1Name:u,q3Key:d,q3Name:p,minKey:g,minName:y,maxKey:x,maxName:f,legendItemName:S,tooltip:m}=r,v=this.getCategoryAxis(),b=this.getValueAxis();if(!i||!o||!v||!b)return;const D=o.dataSources.get(this.id)?.data[e],k=i.resolveKeysById(this,"xValue",o)[e],A=i.resolveColumnById(this,"minValue",o)[e],M=i.resolveColumnById(this,"q1Value",o)[e],I=i.resolveColumnById(this,"medianValue",o)[e],_=i.resolveColumnById(this,"q3Value",o)[e],P=i.resolveColumnById(this,"maxValue",o)[e],O=this.properties.allowNullKeys??!1;if(k===void 0&&!O)return;const C=this.getItemStyle(e,!1),L=[{label:y,fallbackLabel:g,value:this.getAxisValueText(b,"tooltip",A,D,g,S),missing:import_ag_charts_community96._ModuleSupport.isTooltipValueMissing(A)},{label:u,fallbackLabel:h,value:this.getAxisValueText(b,"tooltip",M,D,h,S),missing:import_ag_charts_community96._ModuleSupport.isTooltipValueMissing(M)},{label:c,fallbackLabel:l,value:this.getAxisValueText(b,"tooltip",I,D,l,S),missing:import_ag_charts_community96._ModuleSupport.isTooltipValueMissing(I)},{label:p,fallbackLabel:d,value:this.getAxisValueText(b,"tooltip",_,D,d,S),missing:import_ag_charts_community96._ModuleSupport.isTooltipValueMissing(_)},{label:f,fallbackLabel:x,value:this.getAxisValueText(b,"tooltip",P,D,x,S),missing:import_ag_charts_community96._ModuleSupport.isTooltipValueMissing(P)}];return this.formatTooltipWithContext(m,{heading:this.getAxisValueText(v,"tooltip",k,D,s,S),title:S??n,symbol:this.legendItemSymbol(),data:L},{seriesId:t,datum:D,title:n,xKey:s,xName:a,yName:n,medianKey:l,medianName:c,q1Key:h,q1Name:u,q3Key:d,q3Name:p,minKey:g,minName:y,maxKey:x,maxName:f,...C})}animateEmptyUpdateReady({datumSelection:e}){const t=this.isVertical(),{from:i,to:o}=prepareBoxPlotFromTo(t);motion.resetMotion([e],resetBoxPlotSelectionsScalingCenterFn(t)),motion.staticFromToMotion(this.id,"datums",this.ctx.animationManager,[e],i,o,{phase:"initial"})}isLabelEnabled(){return!1}updateDatumSelection(e){const t=e.nodeData??[];return processedDataIsAnimatable(this.processedData)?e.datumSelection.update(t,void 0,i=>createDatumId(i.datumIndex)):e.datumSelection.update(t)}makeStylerParams(e){const{id:t}=this,{cornerRadius:i,cap:{lengthRatio:o},fill:r,fillOpacity:s,lineDash:a,lineDashOffset:n,stroke:l,strokeOpacity:c,strokeWidth:h,maxKey:u,maxName:d,medianKey:p,medianName:g,minKey:y,minName:x,q1Key:f,q1Name:S,q3Key:m,q3Name:v,whisker:{lineDash:b,lineDashOffset:D,stroke:k,strokeOpacity:A,strokeWidth:M},xKey:I,xName:_,yName:P}=this.properties,O=toHighlightString(e??HighlightState.None);return{cap:{lengthRatio:o},cornerRadius:i,fill:r,fillOpacity:s,highlightState:O,lineDash:a,lineDashOffset:n,maxKey:u,maxName:d??u,medianKey:p,medianName:g??p,minKey:y,minName:x??y,q1Key:f,q1Name:S??f,q3Key:m,q3Name:v??m,seriesId:t,stroke:l,strokeOpacity:c,strokeWidth:h,whisker:{lineDash:b??a,lineDashOffset:D??n,stroke:k??l,strokeOpacity:A??c,strokeWidth:M??h},xKey:I,xName:_??I,yName:P}}getStyle(e,t){const{cap:i,cornerRadius:o,fill:r,fillOpacity:s,lineDash:a,lineDashOffset:n,stroke:l,strokeOpacity:c,strokeWidth:h,styler:u,whisker:d}=this.properties;let p={};if(!e&&u){const g=this.makeStylerParams(t);p=this.ctx.optionsGraphService.resolvePartial(["series",`${this.declarationOrder}`],this.cachedCallWithContext(u,g)??{},{pick:!1})??{}}return{cornerRadius:p.cornerRadius??o,fill:p.fill??r,fillOpacity:p.fillOpacity??s,lineDash:p.lineDash??a,lineDashOffset:p.lineDashOffset??n,opacity:1,stroke:p.stroke??l,strokeOpacity:p.strokeOpacity??c,strokeWidth:p.strokeWidth??h,cap:{lengthRatio:p.cap?.lengthRatio??i.lengthRatio},whisker:{lineDash:p.whisker?.lineDash??d.lineDash,lineDashOffset:p.whisker?.lineDashOffset??d.lineDashOffset,stroke:p.whisker?.stroke??d.stroke,strokeOpacity:p.whisker?.strokeOpacity??d.strokeOpacity,strokeWidth:p.whisker?.strokeWidth??d.strokeWidth}}}getItemStyle(e,t,i){const{properties:o}=this,{itemStyler:r}=o,s=this.getHighlightStyle(t,e,i);let a=(0,import_ag_charts_core114.mergeDefaults)(s,this.getStyle(e===void 0,i));if(r!=null&&e!=null){const d=this.cachedDatumCallback(createDatumId(e,t?"highlight":"node"),()=>{const p=this.makeItemStylerParams(e,t,a);return this.ctx.optionsGraphService.resolvePartial(["series",`${this.declarationOrder}`],this.callWithContext(r,p))});d&&(a=(0,import_ag_charts_core114.mergeDefaults)(d,a))}const{stroke:n,strokeWidth:l,strokeOpacity:c,lineDash:h,lineDashOffset:u}=a;return a.whisker=(0,import_ag_charts_core114.mergeDefaults)(a.whisker,{stroke:n,strokeWidth:l,strokeOpacity:c,lineDash:h,lineDashOffset:u}),a}makeItemStylerParams(e,t,i){const{id:o}=this,{xKey:r,minKey:s,q1Key:a,medianKey:n,q3Key:l,maxKey:c}=this.properties,h=this.processedData?.dataSources.get(o)?.data[e],u=this.ctx.highlightManager?.getActiveHighlight(),d=this.getHighlightStateString(u,t,e),p=this.filterItemStylerFillParams(i.fill)??i.fill;return{seriesId:o,datum:h,xKey:r,minKey:s,q1Key:a,medianKey:n,q3Key:l,maxKey:c,highlightState:d,...i,fill:p}}updateDatumStyles({datumSelection:e,isHighlight:t}){const i=this.ctx.highlightManager.getActiveHighlight();e.each((o,r)=>{const s=this.getHighlightState(i,t,r.datumIndex);r.style=this.getItemStyle(r.datumIndex,t,s)})}updateDatumNodes({datumSelection:e,isHighlight:t}){const{contextNodeData:i,properties:o}=this;if(!i)return;const r=this.isVertical(),s=this.ctx.highlightManager.getActiveHighlight(),a=this.getShapeFillBBox(),n=this.getStyle(!1,HighlightState.None).strokeWidth/2,l=o.whisker.strokeWidth??o.strokeWidth;e.each((c,h)=>{const u=h.style??i.styles[this.getHighlightState(s,t,h.datumIndex)];c.setFillProperties(u.fill,a);const d=u.opacity??1,p=u.whisker?.strokeOpacity??u.strokeOpacity;c.fill=u.fill,c.fillOpacity=u.fillOpacity*d,c.stroke=u.stroke,c.strokeWidth=u.strokeWidth,c.strokeOpacity=u.strokeOpacity*d,c.lineDash=u.lineDash,c.lineDashOffset=u.lineDashOffset,c.wickStroke=u.whisker.stroke,c.wickStrokeWidth=u.whisker.strokeWidth,c.wickStrokeOpacity=p*d,c.wickLineDash=u.whisker.lineDash,c.wickLineDashOffset=u.whisker.lineDashOffset,c.cornerRadius=u.cornerRadius,c.crisp=!0,c.horizontal=!r,c.center=h.scaledValues.xValue,c.thickness=h.bandwidth,c.min=h.scaledValues.minValue,c.q1=h.scaledValues.q1Value,c.median=h.scaledValues.medianValue,c.q3=h.scaledValues.q3Value,c.max=h.scaledValues.maxValue,c.capLengthRatio=u.cap.lengthRatio,c.strokeAlignment=n,c.wickStrokeAlignment=l})}updateLabelNodes(){}updateLabelSelection(e){const{labelData:t,labelSelection:i}=e;return i.update(t)}nodeFactory(){return new BoxPlotNode}computeFocusBounds({datumIndex:e}){return computeBarFocusBounds(this,this.contextNodeData?.nodeData[e].focusRect)}hasItemStylers(){return this.properties.itemStyler!=null||this.properties.styler!=null}};BoxPlotSeries.className="BoxPlotSeries",BoxPlotSeries.type="box-plot";var import_ag_charts_community97=require("ag-charts-community"),import_ag_charts_core115=require("ag-charts-core"),{boxPlotSeriesThemeableOptionsDef}=import_ag_charts_community97._ModuleSupport,boxPlotSeriesOptionsDef={...import_ag_charts_core115.commonSeriesOptionsDefs,...boxPlotSeriesThemeableOptionsDef,type:(0,import_ag_charts_core115.required)((0,import_ag_charts_core115.constant)("box-plot")),xKey:(0,import_ag_charts_core115.required)(import_ag_charts_core115.string),minKey:(0,import_ag_charts_core115.required)(import_ag_charts_core115.string),q1Key:(0,import_ag_charts_core115.required)(import_ag_charts_core115.string),medianKey:(0,import_ag_charts_core115.required)(import_ag_charts_core115.string),q3Key:(0,import_ag_charts_core115.required)(import_ag_charts_core115.string),maxKey:(0,import_ag_charts_core115.required)(import_ag_charts_core115.string),xKeyAxis:import_ag_charts_core115.string,yKeyAxis:import_ag_charts_core115.string,xName:import_ag_charts_core115.string,yName:import_ag_charts_core115.string,minName:import_ag_charts_core115.string,q1Name:import_ag_charts_core115.string,medianName:import_ag_charts_core115.string,q3Name:import_ag_charts_core115.string,maxName:import_ag_charts_core115.string,grouped:import_ag_charts_core115.boolean,legendItemName:import_ag_charts_core115.string,segmentation:import_ag_charts_core115.shapeSegmentation,width:import_ag_charts_core115.positiveNumberNonZero,widthRatio:import_ag_charts_core115.ratio},import_ag_charts_core116=require("ag-charts-core"),BOX_PLOT_SERIES_THEME={series:{direction:"vertical",fill:{$applySwitch:[{$path:"type"},{$if:[{$or:[{$isGradient:{$palette:"fill"}},{$isPattern:{$palette:"fill"}},{$isImage:{$palette:"fill"}}]},{$palette:"fill"},{$mix:[import_ag_charts_core116.SAFE_FILL_OPERATION,{$ref:"chartBackgroundColor"},.7]}]},["gradient",import_ag_charts_core116.FILL_GRADIENT_LINEAR_DEFAULTS],["image",import_ag_charts_core116.FILL_IMAGE_DEFAULTS],["pattern",import_ag_charts_core116.FILL_PATTERN_DEFAULTS]]},stroke:{$palette:"stroke"},strokeWidth:2,fillOpacity:1,strokeOpacity:1,lineDash:void 0,lineDashOffset:0,highlight:{unhighlightedItem:{opacity:.5},unhighlightedSeries:{opacity:.1}},segmentation:import_ag_charts_core116.SEGMENTATION_DEFAULTS},axes:{[import_ag_charts_core116.CARTESIAN_AXIS_TYPE.NUMBER]:{crosshair:{snap:!1}},[import_ag_charts_core116.CARTESIAN_AXIS_TYPE.CATEGORY]:{groupPaddingInner:.2,crosshair:{enabled:!1,snap:!1}}}},{predictCartesianNonPrimitiveAxis}=import_ag_charts_community98._ModuleSupport,BoxPlotSeriesModule={type:"series",name:"box-plot",chartType:"cartesian",enterprise:!0,groupable:!0,version:import_ag_charts_community98.VERSION,dependencies:[import_ag_charts_community98.CartesianChartModule],options:boxPlotSeriesOptionsDef,matchingKeys:["xKey","lowKey","q1Key","medianKey","q3Key","highKey","outlierKey","normalizedTo"],predictAxis:predictCartesianNonPrimitiveAxis,defaultAxes:import_ag_charts_core117.DIRECTION_SWAP_AXES,axisKeys:{[import_ag_charts_core117.ChartAxisDirection.X]:"xKeyAxis",[import_ag_charts_core117.ChartAxisDirection.Y]:"yKeyAxis"},axisKeysFlipped:{[import_ag_charts_core117.ChartAxisDirection.X]:"yKeyAxis",[import_ag_charts_core117.ChartAxisDirection.Y]:"xKeyAxis"},themeTemplate:BOX_PLOT_SERIES_THEME,create:e=>new BoxPlotSeries(e)},import_ag_charts_community108=require("ag-charts-community"),import_ag_charts_core127=require("ag-charts-core"),import_ag_charts_community105=require("ag-charts-community"),import_ag_charts_core124=require("ag-charts-core"),import_ag_charts_community101=require("ag-charts-community"),import_ag_charts_core120=require("ag-charts-core"),import_ag_charts_community99=require("ag-charts-community"),import_ag_charts_core118=require("ag-charts-core");function aggregateOhlcData(e,t,i,o,r,s,a,n){const[l,c]=(0,import_ag_charts_core118.aggregationDomain)(e,r);return(0,import_ag_charts_core118.computeExtremesAggregation)([l,c],t,i,o,{smallestKeyInterval:s,xNeedsValueOf:a,yNeedsValueOf:n})}var memoizedAggregateOhlcData=(0,import_ag_charts_core118.simpleMemorize2)(aggregateOhlcData);function aggregateOhlcDataFromDataModel(e,t,i,o,r){const s=t.resolveKeysById(o,"xValue",i),a=t.resolveColumnById(o,"highValue",i),n=t.resolveColumnById(o,"lowValue",i),l=t.getDomain(o,"xValue","key",i),c=t.resolveColumnNeedsValueOf(o,"xValue",i),h=t.resolveColumnNeedsValueOf(o,"highValue",i)??t.resolveColumnNeedsValueOf(o,"lowValue",i);if(r){const[u,d]=(0,import_ag_charts_core118.aggregationDomain)(e,l);return(0,import_ag_charts_core118.computeExtremesAggregation)([u,d],s,a,n,{smallestKeyInterval:i.reduced?.smallestKeyInterval,xNeedsValueOf:c,yNeedsValueOf:h,existingFilters:r})}return memoizedAggregateOhlcData(e,s,a,n,l,i.reduced?.smallestKeyInterval,c,h)}function aggregateOhlcDataFromDataModelPartial(e,t,i,o,r,s){const a=t.resolveKeysById(o,"xValue",i),n=t.resolveColumnById(o,"highValue",i),l=t.resolveColumnById(o,"lowValue",i),c=t.getDomain(o,"xValue","key",i),h=t.resolveColumnNeedsValueOf(o,"xValue",i),u=t.resolveColumnNeedsValueOf(o,"highValue",i)??t.resolveColumnNeedsValueOf(o,"lowValue",i),[d,p]=(0,import_ag_charts_core118.aggregationDomain)(e,c);return(0,import_ag_charts_core118.computeExtremesAggregationPartial)([d,p],a,n,l,{smallestKeyInterval:i.reduced?.smallestKeyInterval,targetRange:r,xNeedsValueOf:h,yNeedsValueOf:u,existingFilters:s})}var import_ag_charts_community100=require("ag-charts-community"),import_ag_charts_core119=require("ag-charts-core"),{Path:Path8,BBox:BBox11}=import_ag_charts_community100._ModuleSupport,OhlcBaseNode=class extends Path8{constructor(){super(...arguments),this.centerX=0,this.y=0,this.width=0,this.height=0,this.yOpen=0,this.yClose=0,this.crisp=!1}setStaticProperties(e,t,i,o,r,s,a){this.__centerX=e,this.__width=t,this.__y=i,this.__height=o,this.__yOpen=r,this.__yClose=s,this.__crisp=a,this.dirtyPath=!0,this.markDirty()}computeBBox(){const{__centerX:e,__y:t,__width:i,__height:o}=this;return new BBox11(e-i/2,t,i,o)}isPointInPath(e,t){return this.getBBox().containsPoint(e,t)}distanceSquared(e,t){return this.getBBox().distanceSquared(e,t)}get midPoint(){return{x:this.__centerX,y:this.__y+this.__height/2}}alignedCoordinates(){const{__y:e,__width:t,__height:i,__crisp:o}=this;let{__centerX:r,__yOpen:s,__yClose:a}=this,n=r-t/2,l=r+t/2,c=e,h=e+i;if(o&&t>1){if(r=this.align(r),s<=a){const d=this.align(s,a-s);s=this.align(s),a=s+d}else{const d=this.align(a,s-a);a=this.align(a),s=a+d}const u=this.align(t/2);n=r-u,l=r+u,c=this.align(e),h=c+this.align(c,i)}return{centerX:r,x0:n,x1:l,y0:c,y1:h,yOpen:s,yClose:a}}executeStroke(e,t){const{__width:i,strokeWidth:o}=this;i<o&&(e.lineWidth=i),super.executeStroke(e,t)}};__decorateClass([(0,import_ag_charts_core119.DeclaredSceneChangeDetection)()],OhlcBaseNode.prototype,"centerX",2),__decorateClass([(0,import_ag_charts_core119.DeclaredSceneChangeDetection)()],OhlcBaseNode.prototype,"y",2),__decorateClass([(0,import_ag_charts_core119.DeclaredSceneChangeDetection)()],OhlcBaseNode.prototype,"width",2),__decorateClass([(0,import_ag_charts_core119.DeclaredSceneChangeDetection)()],OhlcBaseNode.prototype,"height",2),__decorateClass([(0,import_ag_charts_core119.DeclaredSceneChangeDetection)()],OhlcBaseNode.prototype,"yOpen",2),__decorateClass([(0,import_ag_charts_core119.DeclaredSceneChangeDetection)()],OhlcBaseNode.prototype,"yClose",2),__decorateClass([(0,import_ag_charts_core119.DeclaredSceneChangeDetection)()],OhlcBaseNode.prototype,"crisp",2);var OhlcNode=class extends OhlcBaseNode{constructor(){super(...arguments),this.strokeAlignment=0}updatePath(){const{path:e}=this,{centerX:t,x0:i,x1:o,y0:r,y1:s,yOpen:a,yClose:n}=this.alignedCoordinates(),l=this.layerManager?.canvas.pixelRatio??1,c=this.__strokeAlignment>0?l/this.__strokeAlignment/2%1:0;e.clear(),e.moveTo(t-c,r),e.lineTo(t-c,s),Math.abs(o-i)>1&&(e.moveTo(i,a-c),e.lineTo(t-c,a-c),e.moveTo(t-c,n-c),e.lineTo(o,n-c))}};__decorateClass([(0,import_ag_charts_core119.DeclaredSceneChangeDetection)()],OhlcNode.prototype,"strokeAlignment",2);var OPEN=import_ag_charts_core120.AGGREGATION_INDEX_X_MIN,HIGH=import_ag_charts_core120.AGGREGATION_INDEX_Y_MAX,LOW=import_ag_charts_core120.AGGREGATION_INDEX_Y_MIN,CLOSE=import_ag_charts_core120.AGGREGATION_INDEX_X_MAX,SPAN=import_ag_charts_core120.AGGREGATION_SPAN,{AggregationManager,fixNumericExtent:fixNumericExtent3,keyProperty:keyProperty3,createDatumId:createDatumId2,SeriesNodePickMode:SeriesNodePickMode2,SMALLEST_KEY_INTERVAL:SMALLEST_KEY_INTERVAL2,valueProperty:valueProperty4,diff:diff2,animationValidation:animationValidation2,computeBarFocusBounds:computeBarFocusBounds2,visibleRangeIndices,BandScale,processedDataIsAnimatable:processedDataIsAnimatable2,getItemStylesPerItemId}=import_ag_charts_community101._ModuleSupport,OhlcSeriesNodeEvent=class extends import_ag_charts_community101._ModuleSupport.SeriesNodeEvent{constructor(e,t,i,o){super(e,t,i,o),this.xKey=o.properties.xKey,this.openKey=o.properties.openKey,this.closeKey=o.properties.closeKey,this.highKey=o.properties.highKey,this.lowKey=o.properties.lowKey}};function resetOhlcSelectionsDirect(e){for(const t of e){const i=t.nodes();t.batchedUpdate(function(){for(const r of i){const s=r.datum;s!=null&&r.setStaticProperties(s.centerX,s.width,s.y,s.height,s.yOpen,s.yClose,s.crisp)}t.cleanup()})}}var OhlcSeriesBase=class extends import_ag_charts_community101._ModuleSupport.AbstractBarSeries{constructor(e){super({moduleCtx:e,pickModes:[SeriesNodePickMode2.AXIS_ALIGNED,SeriesNodePickMode2.EXACT_SHAPE_MATCH],propertyKeys:{x:["xKey"],y:["lowKey","highKey","openKey","closeKey"]},propertyNames:{x:["xName"],y:["lowName","highName","openName","closeName"]},categoryKey:"xValue",pathsPerSeries:[]}),this.NodeEvent=OhlcSeriesNodeEvent,this.aggregationManager=new AggregationManager}async processData(e){if(!this.visible)return;const{xKey:t,openKey:i,closeKey:o,highKey:r,lowKey:s}=this.properties,a=!this.ctx.animationManager.isSkipped(),n=this.getCategoryAxis()?.scale,l=this.getValueAxis()?.scale,{isContinuousX:c,xScaleType:h,yScaleType:u}=this.getScaleInformation({xScale:n,yScale:l}),d=[];this.needsDataModelDiff()&&this.processedData&&d.push(diff2(this.id,this.processedData)),a&&d.push(animationValidation2()),i&&d.push(valueProperty4(i,u,{id:"openValue",invalidValue:void 0,missingValue:void 0}));const p=this.properties.allowNullKeys??!1,{dataModel:g,processedData:y}=await this.requestDataModel(e,this.data,{props:[keyProperty3(t,h,{id:"xValue",allowNullKey:p}),valueProperty4(o,u,{id:"closeValue"}),valueProperty4(r,u,{id:"highValue"}),valueProperty4(s,u,{id:"lowValue"}),...c?[SMALLEST_KEY_INTERVAL2]:[],...d]});this.smallestDataInterval=y.reduced?.smallestKeyInterval,this.aggregateData(g,y),this.animationState.transition("updateData")}aggregateData(e,t){if(this.aggregationManager.markStale(t.input.count),t.type!=="ungrouped"||processedDataIsAnimatable2(t))return;const i=this.axes[import_ag_charts_core120.ChartAxisDirection.X];if(i==null)return;const o=this.estimateTargetRange();this.aggregationManager.aggregate({computePartial:s=>aggregateOhlcDataFromDataModelPartial(i.scale.type,e,t,this,o,s),computeFull:s=>aggregateOhlcDataFromDataModel(i.scale.type,e,t,this,s),targetRange:o});const r=this.aggregationManager.filters;r&&r.length>0&&import_ag_charts_core120.DebugMetrics.record(`${this.type}:aggregation`,r.map(s=>s.maxRange))}estimateTargetRange(){const e=this.axes[import_ag_charts_core120.ChartAxisDirection.X];if(!e)return-1;const[t,i]=e.scale.range;return Math.abs(i-t)}getSeriesDomain(e){const{processedData:t,dataModel:i}=this;if(!(t&&i))return{domain:[]};if(e!==this.getBarDirection()){const{def:r}=i.resolveProcessedDataDefById(this,"xValue"),s=i.getDomain(this,"xValue","key",t);return r.type==="key"&&r.valueType==="category"?s:{domain:this.padBandExtent(s.domain)}}const o=this.domainForClippedRange(e,["highValue","lowValue"],"xValue");return{domain:fixNumericExtent3(o)}}getSeriesRange(e,t){return this.domainForVisibleRange(import_ag_charts_core120.ChartAxisDirection.Y,["highValue","lowValue"],"xValue",t)}getZoomRangeFittingItems(e,t,i){return this.zoomFittingVisibleItems("xValue",["highValue","lowValue"],e,t,i)}getVisibleItems(e,t,i){return this.countVisibleItems("xValue",["highValue","lowValue"],e,t,i)}buildDatumContext(e,t){const{dataModel:i,processedData:o}=this;if(!i||!o)return;const r=o.dataSources.get(this.id)?.data??[];if(r.length===0)return;const s=e.scale,a=t.scale,n=BandScale.is(s),[l,c]=s.range,h=Math.abs(c-l);this.aggregationManager.ensureLevelForRange(h);const u=this.aggregationManager.getFilterForRange(h),d=u==null,p=this.contextNodeData?.nodeData!=null&&(o.changeDescription!=null||!processedDataIsAnimatable2(o)||u!=null),{groupOffset:g,barWidth:y}=this.getBarDimensions();return{rawData:r,xValues:i.resolveKeysById(this,"xValue",o),openValues:i.resolveColumnById(this,"openValue",o),closeValues:i.resolveColumnById(this,"closeValue",o),highValues:i.resolveColumnById(this,"highValue",o),lowValues:i.resolveColumnById(this,"lowValue",o),xScale:s,yScale:a,xAxis:e,yAxis:t,groupOffset:g,barWidth:y,applyWidthOffset:n,crisp:d,xKey:this.properties.xKey,openKey:this.properties.openKey,closeKey:this.properties.closeKey,highKey:this.properties.highKey,lowKey:this.properties.lowKey,dataAggregationFilter:u,range:h,nodeDatumStateScratch:{datum:void 0,xValue:void 0,openValue:0,closeValue:0,highValue:0,lowValue:0,isRising:!0,itemType:"up"},canIncrementallyUpdate:p,nodeIndex:0,nodeData:p?this.contextNodeData.nodeData:[]}}prepareOhlcNodeDatumState(e,t){const i=e.xValues[t];if(i===void 0&&!this.properties.allowNullKeys)return;const o=e.openValues[t],r=e.closeValues[t],s=e.highValues[t],a=e.lowValues[t],n=a!=null&&a<=o&&a<=r,l=s!=null&&s>=o&&s>=r;if(!n){import_ag_charts_core120.Logger.warnOnce(`invalid low value for key [${e.lowKey}] in data element, low value cannot be higher than datum open or close values`);return}if(!l){import_ag_charts_core120.Logger.warnOnce(`invalid high value for key [${e.highKey}] in data element, high value cannot be lower than datum open or close values.`);return}const c=e.rawData[t],h=r>o,u=h?"up":"down",d=e.nodeDatumStateScratch;return d.datum=c,d.xValue=i,d.openValue=o,d.closeValue=r,d.highValue=s,d.lowValue=a,d.isRising=h,d.itemType=u,d}createSkeletonNodeDatum(e,t,i,o,r,s){const a=e.applyWidthOffset?r/2:0,n=o+a,l=e.yScale.convert(t.openValue),c=e.yScale.convert(t.closeValue),h=e.yScale.convert(t.highValue),u=e.yScale.convert(t.lowValue),d=Math.min(h,u),p=Math.max(h,u)-d;return{series:this,itemType:t.itemType,datum:t.datum,datumIndex:i,xKey:e.xKey,xValue:t.xValue,openValue:t.openValue,closeValue:t.closeValue,highValue:t.highValue,lowValue:t.lowValue,midPoint:{x:n,y:d+p/2},aggregatedValue:t.closeValue,isRising:t.isRising,centerX:n,width:r,y:d,height:p,yOpen:l,yClose:c,crisp:s}}updateNodeDatum(e,t,i,o,r,s,a){const n=t,l=e.applyWidthOffset?s/2:0,c=r+l,h=e.yScale.convert(i.openValue),u=e.yScale.convert(i.closeValue),d=e.yScale.convert(i.highValue),p=e.yScale.convert(i.lowValue),g=Math.min(d,p),y=Math.max(d,p)-g;n.datum=i.datum,n.datumIndex=o,n.itemType=i.itemType,n.xValue=i.xValue,n.openValue=i.openValue,n.closeValue=i.closeValue,n.highValue=i.highValue,n.lowValue=i.lowValue,n.aggregatedValue=i.closeValue,n.isRising=i.isRising,n.centerX=c,n.width=s,n.y=g,n.height=y,n.yOpen=h,n.yClose=u,n.crisp=a;const x=n.midPoint;x.x=c,x.y=g+y/2}upsertNodeDatum(e,t,i,o,r){const s=this.prepareOhlcNodeDatumState(e,t);if(!s)return;if(e.canIncrementallyUpdate&&e.nodeIndex<e.nodeData.length)this.updateNodeDatum(e,e.nodeData[e.nodeIndex],s,t,i,o,r);else{const n=this.createSkeletonNodeDatum(e,s,t,i,o,r);e.nodeData.push(n)}e.nodeIndex++}createNodeData(){const{visible:e}=this,t=this.getCategoryAxis(),i=this.getValueAxis();if(!t||!i)return;const o=this.buildDatumContext(t,i),r={itemId:this.properties.xKey,nodeData:o?.nodeData??[],labelData:[],scales:this.calculateScaling(),groupScale:this.getScaling(this.ctx.seriesStateManager.getGroupScale(this)),visible:this.visible,styles:getItemStylesPerItemId(this.getItemStyle.bind(this),"up","down")};if(!e||!o)return r;const s=a=>{const n=o.xScale.convert(o.xValues[a]);return Number.isFinite(n)?n+o.groupOffset:Number.NaN};if(o.dataAggregationFilter==null){const a=this.processedData.invalidData?.get(this.id);let[n,l]=visibleRangeIndices(1,o.rawData.length,o.xAxis.range,c=>{const h=o.applyWidthOffset?0:-o.barWidth/2,u=s(c)+h;return[u,u+o.barWidth]});this.processedData.input.count<1e3&&(n=0,l=this.processedData.input.count);for(let c=n;c<l;c+=1){if(a?.[c]===!0)continue;const h=s(c);this.upsertNodeDatum(o,c,h,o.barWidth,o.crisp)}o.canIncrementallyUpdate&&o.nodeIndex<o.nodeData.length&&(o.nodeData.length=o.nodeIndex)}else{const{maxRange:a,indexData:n,midpointIndices:l}=o.dataAggregationFilter,[c,h]=visibleRangeIndices(1,a,o.xAxis.range,u=>{const d=u*SPAN,p=n[d+CLOSE],g=l[u];if(g===-1)return;const y=o.applyWidthOffset?0:-o.barWidth/2;return[s(g)+y,s(p)+y+o.barWidth]});for(let u=c;u<h;u+=1){const d=u*SPAN,p=n[d+OPEN],g=n[d+CLOSE],y=n[d+HIGH],x=n[d+LOW],f=l[u];if(f===-1)continue;const S=this.prepareOhlcNodeDatumState(o,f);if(!S)continue;S.openValue=o.openValues[p],S.closeValue=o.closeValues[g],S.highValue=o.highValues[y],S.lowValue=o.lowValues[x],S.isRising=S.closeValue>S.openValue,S.itemType=S.isRising?"up":"down";const m=s(f),v=Math.abs(s(g)-s(p))+o.barWidth;if(o.canIncrementallyUpdate&&o.nodeIndex<o.nodeData.length)this.updateNodeDatum(o,o.nodeData[o.nodeIndex],S,f,m,v,!1);else{const D=this.createSkeletonNodeDatum(o,S,f,m,v,!1);o.nodeData.push(D)}o.nodeIndex++}o.canIncrementallyUpdate&&o.nodeIndex<o.nodeData.length&&(o.nodeData.length=o.nodeIndex)}return r}isVertical(){return!0}isLabelEnabled(){return!1}resetDatumAnimation(e){resetOhlcSelectionsDirect([e.datumSelection])}updateDatumSelection(e){const t=e.nodeData??[];return processedDataIsAnimatable2(this.processedData)?e.datumSelection.update(t,void 0,i=>createDatumId2(i.xValue)):e.datumSelection.update(t)}updateLabelNodes(e){}updateLabelSelection(e){const{labelData:t,labelSelection:i}=e;return i.update(t)}getItemStyle(e,t,i,o="up"){const{properties:r,dataModel:s,processedData:a}=this,{itemStyler:n}=r,l=this.getHighlightStyle(t,e,i);let h=(0,import_ag_charts_core120.mergeDefaults)(l,r.getStyle(o));if(n&&s!=null&&a!=null&&e!=null){const u=s.resolveKeysById(this,"xValue",a)[e],d=this.cachedDatumCallback(createDatumId2(createDatumId2(u),t?"highlight":"node"),()=>{const p=this.makeItemStylerParams(o,e,t,h);return this.ctx.optionsGraphService.resolvePartial(["series",`${this.declarationOrder}`,"item",o],this.callWithContext(n,p))});d&&(h=(0,import_ag_charts_core120.mergeDefaults)(d,h))}return h}makeItemStylerParams(e,t,i,o){const{id:r,properties:s,processedData:a}=this,{xKey:n,openKey:l,closeKey:c,highKey:h,lowKey:u}=s,d=a.dataSources.get(r)?.data[t],p=this.ctx.highlightManager?.getActiveHighlight(),g=this.getHighlightStateString(p,i,t),y={seriesId:r,datum:d,itemType:e,xKey:n,openKey:l,closeKey:c,highKey:h,lowKey:u,highlightState:g,...o};return"fill"in y&&"fill"in o&&(y.fill=this.filterItemStylerFillParams(o.fill)??o.fill),y}getTooltipContent(e){const{id:t,dataModel:i,processedData:o,properties:r}=this,{xKey:s,xName:a,yName:n,openKey:l,openName:c,highKey:h,highName:u,lowKey:d,lowName:p,closeKey:g,closeName:y,legendItemName:x,tooltip:f}=r,S=this.getCategoryAxis(),m=this.getValueAxis();if(!i||!o||!S||!m)return;const v=o.dataSources.get(this.id)?.data[e],b=i.resolveKeysById(this,"xValue",o)[e],D=i.resolveColumnById(this,"openValue",o)[e],k=i.resolveColumnById(this,"highValue",o)[e],A=i.resolveColumnById(this,"lowValue",o)[e],M=i.resolveColumnById(this,"closeValue",o)[e],I=this.properties.allowNullKeys??!1;if(b===void 0&&!I)return;const _=M>=D?"up":"down",P=this.properties.item[_],O=this.getItemStyle(e,!1),C={fill:P.fill??P.stroke,fillOpacity:P.fillOpacity??P.strokeOpacity??1,stroke:P.stroke,strokeWidth:P.strokeWidth??1,strokeOpacity:P.strokeOpacity??1,lineDash:P.lineDash??[0],lineDashOffset:P.lineDashOffset??0};return this.formatTooltipWithContext(f,{heading:this.getAxisValueText(S,"tooltip",b,v,s,x),title:x,symbol:{marker:C},data:[{label:c,fallbackLabel:l,value:this.getAxisValueText(m,"tooltip",D,v,l,x),missing:import_ag_charts_community101._ModuleSupport.isTooltipValueMissing(D)},{label:u,fallbackLabel:h,value:this.getAxisValueText(m,"tooltip",k,v,h,x),missing:import_ag_charts_community101._ModuleSupport.isTooltipValueMissing(k)},{label:p,fallbackLabel:d,value:this.getAxisValueText(m,"tooltip",A,v,d,x),missing:import_ag_charts_community101._ModuleSupport.isTooltipValueMissing(A)},{label:y,fallbackLabel:g,value:this.getAxisValueText(m,"tooltip",M,v,g,x),missing:import_ag_charts_community101._ModuleSupport.isTooltipValueMissing(M)}]},{seriesId:t,datum:v,title:n,itemType:_,xKey:s,xName:a,yName:n,openKey:l,openName:c,highKey:h,highName:u,lowKey:d,lowName:p,closeKey:g,closeName:y,...O})}computeFocusBounds(e){const t=this.getNodeData()?.at(e.datumIndex);if(t==null)return;const{centerX:i,y:o,width:r,height:s}=t,a={x:i-r/2,y:o,width:r,height:s};return computeBarFocusBounds2(this,a)}},import_ag_charts_community102=require("ag-charts-community"),import_ag_charts_core121=require("ag-charts-core"),{ExtendedPath2D:ExtendedPath2D4,BBox:BBox12}=import_ag_charts_community102._ModuleSupport,CandlestickNode=class extends OhlcBaseNode{constructor(){super(...arguments),this.wickPath=new ExtendedPath2D4,this.wickStroke=void 0,this.wickStrokeWidth=void 0,this.wickStrokeOpacity=void 0,this.wickStrokeAlignment=0}setWickProperties(e,t,i,o,r){this.__wickStroke=e,this.__wickStrokeWidth=t,this.__wickStrokeOpacity=i,this.wickLineDash=o,this.__wickLineDashOffset=r,this.dirtyPath=!0,this.markDirty()}computeDefaultGradientFillBBox(){const{__width:e,__centerX:t,__yOpen:i,__yClose:o}=this,r=Math.min(i,o),a=Math.max(i,o)-r,n=t-e/2,l=t+e/2;return new BBox12(n,r,l-n,a)}updatePath(){const{path:e,stroke:t,strokeWidth:i,strokeOpacity:o,lineDash:r,lineDashOffset:s,__wickStroke:a,__wickStrokeWidth:n,__wickStrokeOpacity:l,wickLineDash:c,__wickLineDashOffset:h}=this,{centerX:u,x0:d,x1:p,y0:g,y1:y,yOpen:x,yClose:f}=this.alignedCoordinates(),S=this.layerManager?.canvas.pixelRatio??1,m=this.__wickStrokeAlignment>0?S/this.__wickStrokeAlignment/2%1:0;this.path.clear(),this.wickPath.clear();const b=a!=null&&a!==t||n!=null&&n!==i||l!=null&&l!==o||c!=null&&c!==r||h!=null&&h!==s?this.wickPath:e;if(Math.abs(p-d)<=3){b.moveTo(u-m,g),b.lineTo(u-m,y);return}const D=Math.min(x,f),k=Math.max(x,f),A=i/2;b.moveTo(u-m,g),b.lineTo(u-m,D+A),b.moveTo(u-m,y),b.lineTo(u-m,k-A);const M=k-D-2*A;if(M>0)e.rect(d+A,D+A,p-d-2*A,M);else{const I=(D+k)/2;e.moveTo(d,I),e.lineTo(p,I)}}drawPath(e){super.drawPath(e);const{wickPath:t}=this;if(t.isEmpty())return;const{stroke:i,strokeWidth:o,strokeOpacity:r,lineDash:s,lineDashOffset:a,__wickStroke:n=i,__wickStrokeWidth:l=o,__wickStrokeOpacity:c=r,wickLineDash:h=s,__wickLineDashOffset:u=a}=this;l!==0&&(e.globalAlpha*=c,typeof n=="string"&&(e.strokeStyle=n),e.lineWidth=l,h!=null&&e.setLineDash([...h]),e.lineDashOffset=u,e.stroke(t.getPath2D()))}};__decorateClass([(0,import_ag_charts_core121.DeclaredSceneChangeDetection)()],CandlestickNode.prototype,"wickStroke",2),__decorateClass([(0,import_ag_charts_core121.DeclaredSceneChangeDetection)()],CandlestickNode.prototype,"wickStrokeWidth",2),__decorateClass([(0,import_ag_charts_core121.DeclaredSceneChangeDetection)()],CandlestickNode.prototype,"wickStrokeOpacity",2),__decorateClass([(0,import_ag_charts_core121.SceneArrayChangeDetection)()],CandlestickNode.prototype,"wickLineDash",2),__decorateClass([(0,import_ag_charts_core121.DeclaredSceneChangeDetection)()],CandlestickNode.prototype,"wickLineDashOffset",2),__decorateClass([(0,import_ag_charts_core121.DeclaredSceneChangeDetection)()],CandlestickNode.prototype,"wickStrokeAlignment",2);var import_ag_charts_community104=require("ag-charts-community"),import_ag_charts_core123=require("ag-charts-core"),import_ag_charts_community103=require("ag-charts-community"),import_ag_charts_core122=require("ag-charts-core"),{AbstractBarSeriesProperties:AbstractBarSeriesProperties2,makeSeriesTooltip:makeSeriesTooltip2}=import_ag_charts_community103._ModuleSupport,OhlcSeriesItem=class extends import_ag_charts_core122.BaseProperties{constructor(){super(...arguments),this.stroke="#333",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0}};__decorateClass([import_ag_charts_core122.Property],OhlcSeriesItem.prototype,"stroke",2),__decorateClass([import_ag_charts_core122.Property],OhlcSeriesItem.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core122.Property],OhlcSeriesItem.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core122.Property],OhlcSeriesItem.prototype,"lineDash",2),__decorateClass([import_ag_charts_core122.Property],OhlcSeriesItem.prototype,"lineDashOffset",2);var OhlcSeriesItems=class extends import_ag_charts_core122.BaseProperties{constructor(){super(...arguments),this.up=new OhlcSeriesItem,this.down=new OhlcSeriesItem}};__decorateClass([import_ag_charts_core122.Property],OhlcSeriesItems.prototype,"up",2),__decorateClass([import_ag_charts_core122.Property],OhlcSeriesItems.prototype,"down",2);var OhlcSeriesBaseProperties=class extends AbstractBarSeriesProperties2{};__decorateClass([import_ag_charts_core122.Property],OhlcSeriesBaseProperties.prototype,"xKey",2),__decorateClass([import_ag_charts_core122.Property],OhlcSeriesBaseProperties.prototype,"openKey",2),__decorateClass([import_ag_charts_core122.Property],OhlcSeriesBaseProperties.prototype,"closeKey",2),__decorateClass([import_ag_charts_core122.Property],OhlcSeriesBaseProperties.prototype,"highKey",2),__decorateClass([import_ag_charts_core122.Property],OhlcSeriesBaseProperties.prototype,"lowKey",2),__decorateClass([import_ag_charts_core122.Property],OhlcSeriesBaseProperties.prototype,"xName",2),__decorateClass([import_ag_charts_core122.Property],OhlcSeriesBaseProperties.prototype,"yName",2),__decorateClass([import_ag_charts_core122.Property],OhlcSeriesBaseProperties.prototype,"openName",2),__decorateClass([import_ag_charts_core122.Property],OhlcSeriesBaseProperties.prototype,"closeName",2),__decorateClass([import_ag_charts_core122.Property],OhlcSeriesBaseProperties.prototype,"highName",2),__decorateClass([import_ag_charts_core122.Property],OhlcSeriesBaseProperties.prototype,"lowName",2);var OhlcSeriesProperties=class extends OhlcSeriesBaseProperties{constructor(){super(...arguments),this.tooltip=makeSeriesTooltip2(),this.item=new OhlcSeriesItems}getStyle(e){const{strokeWidth:t,strokeOpacity:i,stroke:o,lineDash:r,lineDashOffset:s}=this.item[e];return{stroke:o,strokeWidth:t,strokeOpacity:i,lineDash:r,lineDashOffset:s,opacity:1}}};__decorateClass([import_ag_charts_core122.Property],OhlcSeriesProperties.prototype,"tooltip",2),__decorateClass([import_ag_charts_core122.Property],OhlcSeriesProperties.prototype,"item",2),__decorateClass([import_ag_charts_core122.Property],OhlcSeriesProperties.prototype,"itemStyler",2);var{makeSeriesTooltip:makeSeriesTooltip3}=import_ag_charts_community104._ModuleSupport,CandlestickSeriesWick=class extends import_ag_charts_core123.BaseProperties{};__decorateClass([import_ag_charts_core123.Property],CandlestickSeriesWick.prototype,"stroke",2),__decorateClass([import_ag_charts_core123.Property],CandlestickSeriesWick.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core123.Property],CandlestickSeriesWick.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core123.Property],CandlestickSeriesWick.prototype,"lineDash",2),__decorateClass([import_ag_charts_core123.Property],CandlestickSeriesWick.prototype,"lineDashOffset",2);var CandlestickSeriesItem=class extends import_ag_charts_core123.BaseProperties{constructor(){super(...arguments),this.fill="#c16068",this.fillOpacity=1,this.stroke="#333",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.wick=new CandlestickSeriesWick}};__decorateClass([import_ag_charts_core123.Property],CandlestickSeriesItem.prototype,"fill",2),__decorateClass([import_ag_charts_core123.Property],CandlestickSeriesItem.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core123.Property],CandlestickSeriesItem.prototype,"stroke",2),__decorateClass([import_ag_charts_core123.Property],CandlestickSeriesItem.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core123.Property],CandlestickSeriesItem.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core123.Property],CandlestickSeriesItem.prototype,"lineDash",2),__decorateClass([import_ag_charts_core123.Property],CandlestickSeriesItem.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core123.Property],CandlestickSeriesItem.prototype,"cornerRadius",2),__decorateClass([import_ag_charts_core123.Property],CandlestickSeriesItem.prototype,"wick",2);var CandlestickSeriesItems=class extends import_ag_charts_core123.BaseProperties{constructor(){super(...arguments),this.up=new CandlestickSeriesItem,this.down=new CandlestickSeriesItem}};__decorateClass([import_ag_charts_core123.Property],CandlestickSeriesItems.prototype,"up",2),__decorateClass([import_ag_charts_core123.Property],CandlestickSeriesItems.prototype,"down",2);var CandlestickSeriesProperties=class extends OhlcSeriesBaseProperties{constructor(){super(...arguments),this.item=new CandlestickSeriesItems,this.tooltip=makeSeriesTooltip3()}getStyle(e){const{fill:t,fillOpacity:i,strokeWidth:o,strokeOpacity:r,stroke:s,lineDash:a,lineDashOffset:n,cornerRadius:l,wick:c}=this.item[e];return{fill:t,fillOpacity:i,stroke:s,strokeWidth:o,strokeOpacity:r,lineDash:a,lineDashOffset:n,cornerRadius:l,opacity:1,wick:c}}};__decorateClass([import_ag_charts_core123.Property],CandlestickSeriesProperties.prototype,"item",2),__decorateClass([import_ag_charts_core123.Property],CandlestickSeriesProperties.prototype,"tooltip",2),__decorateClass([import_ag_charts_core123.Property],CandlestickSeriesProperties.prototype,"itemStyler",2);var CandlestickSeries=class extends OhlcSeriesBase{constructor(){super(...arguments),this.properties=new CandlestickSeriesProperties}nodeFactory(){const e=new CandlestickNode;return e.lineCap="butt",e}updateDatumStyles({datumSelection:e,isHighlight:t}){e.each((i,o)=>{o.style=this.getItemStyle(o.datumIndex,t,void 0,o.itemType)})}updateDatumNodes({datumSelection:e,isHighlight:t}){const{contextNodeData:i,properties:o}=this;if(!i)return;const r=this.ctx.highlightManager.getActiveHighlight(),{up:s,down:a}=o.item,n=this.getShapeFillBBox(),l=this;e.each(function(h,u){const{centerX:d,width:p,y:g,height:y,yOpen:x,yClose:f,crisp:S}=u,m=u.isRising?s:a,v=l.getHighlightState(r,t,u.datumIndex),b=u.style??i.styles[u.itemType][v];h.setStaticProperties(d,p,g,y,x,f,S),h.setStyleProperties(b,n);const D=b?.wick;h.setWickProperties(D?.stroke,D?.strokeWidth,D?.strokeOpacity,D?.lineDash,D?.lineDashOffset),h.wickStrokeAlignment=m.wick.strokeWidth??m.strokeWidth})}legendItemSymbol(){const{up:e,down:t}=this.properties.item,i=(0,import_ag_charts_core124.isGradientFill)(e.fill)?e.fill.colorStops.map(a=>typeof a=="string"?a:{color:a.color,stop:a.stop==null?void 0:a.stop*.5}):[{color:(0,import_ag_charts_core124.isPatternFill)(e.fill)||(0,import_ag_charts_core124.isImageFill)(e.fill)?e.stroke:e.fill,stop:0},{color:(0,import_ag_charts_core124.isPatternFill)(e.fill)||(0,import_ag_charts_core124.isImageFill)(e.fill)?e.stroke:e.fill,stop:.5}],o=(0,import_ag_charts_core124.isGradientFill)(t.fill)?t.fill.colorStops.map(a=>typeof a=="string"?a:{color:a.color,stop:a.stop==null?void 0:a.stop*.5}):[{color:(0,import_ag_charts_core124.isPatternFill)(t.fill)||(0,import_ag_charts_core124.isImageFill)(t.fill)?t.stroke:t.fill,stop:.5}],r={type:"gradient",gradient:"linear",rotation:90,colorStops:[...i,...o],reverse:!1},s={type:"gradient",gradient:"linear",rotation:90,colorStops:[{color:e.stroke,stop:0},{color:e.stroke,stop:.5},{color:t.stroke,stop:.5}],reverse:!1};return{marker:{fill:r,fillOpacity:e.fillOpacity,stroke:s,strokeWidth:e.strokeWidth??1,strokeOpacity:e.strokeOpacity??1,lineDash:e.lineDash,lineDashOffset:e.lineDashOffset}}}getLegendData(e){const{id:t,data:i,visible:o,ctx:{legendManager:r}}=this,{xKey:s,yName:a,showInLegend:n,legendItemName:l}=this.properties;return!i?.data.length||!s||e!=="category"?[]:[{legendType:"category",id:t,itemId:t,seriesId:t,enabled:o&&r.getItemEnabled({seriesId:t,itemId:t}),label:{text:l??a??t},symbol:this.legendItemSymbol(),legendItemName:l,hideInLegend:!n}]}hasItemStylers(){return this.properties.itemStyler!=null}};CandlestickSeries.className="CandleStickSeries",CandlestickSeries.type="candlestick";var import_ag_charts_community106=require("ag-charts-community"),import_ag_charts_core125=require("ag-charts-core"),{candlestickSeriesThemeableOptionsDef}=import_ag_charts_community106._ModuleSupport,candlestickSeriesOptionsDef={...import_ag_charts_core125.commonSeriesOptionsDefs,...candlestickSeriesThemeableOptionsDef,type:(0,import_ag_charts_core125.required)((0,import_ag_charts_core125.constant)("candlestick")),xKey:(0,import_ag_charts_core125.required)(import_ag_charts_core125.string),openKey:(0,import_ag_charts_core125.required)(import_ag_charts_core125.string),highKey:(0,import_ag_charts_core125.required)(import_ag_charts_core125.string),lowKey:(0,import_ag_charts_core125.required)(import_ag_charts_core125.string),closeKey:(0,import_ag_charts_core125.required)(import_ag_charts_core125.string),xName:import_ag_charts_core125.string,yName:import_ag_charts_core125.string,openName:import_ag_charts_core125.string,highName:import_ag_charts_core125.string,lowName:import_ag_charts_core125.string,closeName:import_ag_charts_core125.string,xKeyAxis:import_ag_charts_core125.string,yKeyAxis:import_ag_charts_core125.string};candlestickSeriesOptionsDef.pickOutsideVisibleMinorAxis=(0,import_ag_charts_core125.undocumented)(import_ag_charts_core125.boolean),candlestickSeriesOptionsDef.focusPriority=(0,import_ag_charts_core125.undocumented)(import_ag_charts_core125.number);var import_ag_charts_community107=require("ag-charts-community"),import_ag_charts_core126=require("ag-charts-core");function itemTheme(e){return{fill:{$applySwitch:[{$path:"type"},{$if:[{$eq:[{$palette:"type"},"user-indexed"]},e==="up"?"transparent":{$palette:"fill"},{$palette:`${e}.fill`}]},["gradient",(0,import_ag_charts_core126.FILL_GRADIENT_LINEAR_KEYED_DEFAULTS)(e)],["image",import_ag_charts_core126.FILL_IMAGE_DEFAULTS],["pattern",(0,import_ag_charts_core126.FILL_PATTERN_KEYED_DEFAULTS)(e)]]},stroke:{$if:[{$eq:[{$palette:"type"},"user-indexed"]},{$palette:"stroke"},{$palette:`${e}.stroke`}]}}}var CANDLESTICK_SERIES_THEME={series:{item:{up:itemTheme("up"),down:itemTheme("down")},tooltip:{range:{$path:["/tooltip/range","nearest"]}},highlight:import_ag_charts_core126.MULTI_SERIES_HIGHLIGHT_STYLE},animation:{enabled:!1},axes:{[import_ag_charts_core126.CARTESIAN_AXIS_TYPE.NUMBER]:{crosshair:{snap:!1}},[import_ag_charts_core126.CARTESIAN_AXIS_TYPE.ORDINAL_TIME]:{groupPaddingInner:0,crosshair:{enabled:!0}}}},{predictCartesianFinancialAxis}=import_ag_charts_community108._ModuleSupport,CandlestickSeriesModule={type:"series",name:"candlestick",chartType:"cartesian",enterprise:!0,groupable:!1,version:import_ag_charts_community108.VERSION,dependencies:[import_ag_charts_community108.CartesianChartModule],options:candlestickSeriesOptionsDef,matchingKeys:["xKey","lowKey","highKey","openKey","closeKey","normalizedTo"],predictAxis:predictCartesianFinancialAxis,defaultAxes:{y:{type:import_ag_charts_core127.CARTESIAN_AXIS_TYPE.NUMBER,position:import_ag_charts_core127.CARTESIAN_POSITION.LEFT},x:{type:import_ag_charts_core127.CARTESIAN_AXIS_TYPE.ORDINAL_TIME,position:import_ag_charts_core127.CARTESIAN_POSITION.BOTTOM}},axisKeys:{[import_ag_charts_core127.ChartAxisDirection.X]:"xKeyAxis",[import_ag_charts_core127.ChartAxisDirection.Y]:"yKeyAxis"},themeTemplate:CANDLESTICK_SERIES_THEME,create:e=>new CandlestickSeries(e)},import_ag_charts_community113=require("ag-charts-community"),import_ag_charts_core134=require("ag-charts-core"),import_ag_charts_community111=require("ag-charts-community"),import_ag_charts_core131=require("ag-charts-core"),import_ag_charts_core128=require("ag-charts-core");function generateLabelSecondaryLabelFontSizeCandidates(e,t){const{fontSize:i,minimumFontSize:o=i}=e,{fontSize:r,minimumFontSize:s=r}=t,a=i-o,n=r-s;let l=e.fontSize,c=t.fontSize;const h=[{labelFontSize:i,secondaryLabelFontSize:r}];for(;l>o||c>s;){const u=a>0?(l-o)/a:-1,d=n>0?(c-s)/n:-1;u>d?l--:c--,h.push({labelFontSize:l,secondaryLabelFontSize:c})}return h.reverse(),h}function formatStackedLabels(e,t,i,o,{padding:r},s){const{spacing:a=0}=t,n=2*r,l=2*r+a,c=(t.minimumFontSize??t.fontSize)+(o.minimumFontSize??o.fontSize);if(c>s(c+l,!1).height-l)return;const h=generateLabelSecondaryLabelFontSizeCandidates(t,o),u={fontFamily:t.fontFamily,fontStyle:t.fontStyle,fontWeight:t.fontWeight},d={fontFamily:o.fontFamily,fontStyle:o.fontStyle,fontWeight:o.fontWeight};let p,g;return(0,import_ag_charts_core128.findMaxValue)(0,h.length-1,y=>{const{labelFontSize:x,secondaryLabelFontSize:f}=h[y],S=y===0,m={...u,fontSize:x},v={...d,fontSize:f},b=(0,import_ag_charts_core128.cachedTextMeasurer)(m).lineHeight(),D=(0,import_ag_charts_core128.cachedTextMeasurer)(v).lineHeight(),k=s(b+D+l,S),A=k.width-n,M=k.height-l;if(b+D>M||(p?.fontSize!==x&&(p=wrapLabel(t,e,A,M,m,t.wrapping,S?t.overflowStrategy:"hide")),p==null||p.width>A||p.height>M)||(g?.fontSize!==f&&(g=wrapLabel(o,i,A,M,v,o.wrapping,S?o.overflowStrategy:"hide")),g==null))return;const I=p.height+g.height;if(!(g.width>A||I>M))return{width:Math.max(p.width,g.width),height:I+a,meta:k.meta,label:p,secondaryLabel:g}})}function formatSingleLabel(e,t,{padding:i},o){const r=2*i,s=Math.min(t.minimumFontSize??t.fontSize,t.fontSize),a={fontFamily:t.fontFamily,fontStyle:t.fontStyle,fontWeight:t.fontWeight};return(0,import_ag_charts_core128.findMaxValue)(s,t.fontSize,n=>{const l={...a,fontSize:n},c=(0,import_ag_charts_core128.cachedTextMeasurer)(l),h=n===s,u=t.lineHeight??c.lineHeight(),d=o(u+r,h),p=d.width-r,g=d.height-r;if(u>g||p<0)return;const y=(0,import_ag_charts_core128.wrapLines)(e,{maxWidth:p,maxHeight:g,font:l,textWrap:t.wrapping,overflow:(h?t.overflowStrategy:null)??"hide"});if(!y.length)return;const{width:x,height:f}=c.measureLines(y),S=y.join(`
`);return[{width:x,height:f,text:S,fontSize:n,lineHeight:u},d.meta]})}function hasInvalidFontSize(e){return e?.minimumFontSize!=null&&e?.fontSize!=null&&e?.minimumFontSize>e?.fontSize}function formatLabels(e,t,i,o,r,s){const a=t.enabled?e:void 0,n=o.enabled?i:void 0;(hasInvalidFontSize(t)||hasInvalidFontSize(o))&&import_ag_charts_core128.Logger.warnOnce("minimumFontSize should be set to a value less than or equal to the font size");let l;a!=null&&n!=null&&(l=formatStackedLabels(a,t,n,o,r,s));let c;if(l==null&&a!=null&&(c=formatSingleLabel(a,t,r,s)),c!=null){const[u,d]=c;l={width:u.width,height:u.height,meta:d,label:u,secondaryLabel:void 0}}let h;if(l==null&&a==null&&n!=null&&(h=formatSingleLabel(n,o,r,s)),h!=null){const[u,d]=h;l={width:u.width,height:u.height,meta:d,label:void 0,secondaryLabel:u}}return l}function wrapLabel(e,t,i,o,r,s,a){const n=(0,import_ag_charts_core128.wrapLines)(t,{maxWidth:i,maxHeight:o,font:r,textWrap:s,overflow:a});if(!n.length)return;const l=(0,import_ag_charts_core128.cachedTextMeasurer)(r),c=e.lineHeight??l.lineHeight(),{width:h}=l.measureLines(n);return{width:h,lineHeight:c,text:n.join(`
`),height:n.length*c,fontSize:r.fontSize}}var import_ag_charts_community110=require("ag-charts-community"),import_ag_charts_core130=require("ag-charts-core"),import_ag_charts_community109=require("ag-charts-community"),import_ag_charts_core129=require("ag-charts-core"),BaseAutoSizedLabel=class extends import_ag_charts_community109._ModuleSupport.Label{constructor(){super(...arguments),this.wrapping="on-space",this.overflowStrategy="ellipsis"}};__decorateClass([import_ag_charts_core129.Property],BaseAutoSizedLabel.prototype,"wrapping",2),__decorateClass([import_ag_charts_core129.Property],BaseAutoSizedLabel.prototype,"overflowStrategy",2),__decorateClass([import_ag_charts_core129.Property],BaseAutoSizedLabel.prototype,"lineHeight",2),__decorateClass([import_ag_charts_core129.Property],BaseAutoSizedLabel.prototype,"minimumFontSize",2);var AutoSizedLabel=class extends BaseAutoSizedLabel{constructor(){super(...arguments),this.spacing=0}};__decorateClass([import_ag_charts_core129.Property],AutoSizedLabel.prototype,"spacing",2);var AutoSizedSecondaryLabel=class extends BaseAutoSizedLabel{},{CartesianSeriesProperties,makeSeriesTooltip:makeSeriesTooltip4}=import_ag_charts_community110._ModuleSupport,HeatmapSeriesProperties=class extends CartesianSeriesProperties{constructor(){super(...arguments),this.colorRange=["black","black"],this.stroke="black",this.strokeOpacity=1,this.strokeWidth=0,this.textAlign="center",this.verticalAlign="middle",this.itemPadding=0,this.label=new AutoSizedLabel,this.tooltip=makeSeriesTooltip4()}};__decorateClass([import_ag_charts_core130.Property],HeatmapSeriesProperties.prototype,"title",2),__decorateClass([import_ag_charts_core130.Property],HeatmapSeriesProperties.prototype,"xKey",2),__decorateClass([import_ag_charts_core130.Property],HeatmapSeriesProperties.prototype,"yKey",2),__decorateClass([import_ag_charts_core130.Property],HeatmapSeriesProperties.prototype,"colorKey",2),__decorateClass([import_ag_charts_core130.Property],HeatmapSeriesProperties.prototype,"xName",2),__decorateClass([import_ag_charts_core130.Property],HeatmapSeriesProperties.prototype,"yName",2),__decorateClass([import_ag_charts_core130.Property],HeatmapSeriesProperties.prototype,"colorName",2),__decorateClass([import_ag_charts_core130.Property],HeatmapSeriesProperties.prototype,"colorRange",2),__decorateClass([import_ag_charts_core130.Property],HeatmapSeriesProperties.prototype,"stroke",2),__decorateClass([import_ag_charts_core130.Property],HeatmapSeriesProperties.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core130.Property],HeatmapSeriesProperties.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core130.Property],HeatmapSeriesProperties.prototype,"textAlign",2),__decorateClass([import_ag_charts_core130.Property],HeatmapSeriesProperties.prototype,"verticalAlign",2),__decorateClass([import_ag_charts_core130.Property],HeatmapSeriesProperties.prototype,"itemPadding",2),__decorateClass([import_ag_charts_core130.Property],HeatmapSeriesProperties.prototype,"itemStyler",2),__decorateClass([import_ag_charts_core130.Property],HeatmapSeriesProperties.prototype,"label",2),__decorateClass([import_ag_charts_core130.Property],HeatmapSeriesProperties.prototype,"tooltip",2);var{SeriesNodePickMode:SeriesNodePickMode3,computeBarFocusBounds:computeBarFocusBounds3,getMissCount,valueProperty:valueProperty5,DEFAULT_CARTESIAN_DIRECTION_KEYS,DEFAULT_CARTESIAN_DIRECTION_NAMES,createDatumId:createDatumId3,ColorScale,Rect,PointerEvents,addHitTestersToQuadtree,findQuadtreeMatch,updateLabelNode,upsertNodeDatum:upsertNodeDatum2}=import_ag_charts_community111._ModuleSupport,HeatmapSeriesNodeEvent=class extends import_ag_charts_community111._ModuleSupport.CartesianSeriesNodeEvent{constructor(e,t,i,o){super(e,t,i,o),this.colorKey=o.properties.colorKey}},textAlignFactors={left:-.5,center:0,right:-.5},verticalAlignFactors={top:-.5,middle:0,bottom:-.5},HeatmapSeries=class extends import_ag_charts_community111._ModuleSupport.CartesianSeries{constructor(e){super({moduleCtx:e,propertyKeys:{...DEFAULT_CARTESIAN_DIRECTION_KEYS,color:["colorKey"]},propertyNames:{...DEFAULT_CARTESIAN_DIRECTION_NAMES,color:["colorName"]},categoryKey:void 0,pickModes:[SeriesNodePickMode3.NEAREST_NODE,SeriesNodePickMode3.EXACT_SHAPE_MATCH],pathsPerSeries:[]}),this.properties=new HeatmapSeriesProperties,this.NodeEvent=HeatmapSeriesNodeEvent,this.colorScale=new ColorScale}async processData(e){const t=this.axes[import_ag_charts_core131.ChartAxisDirection.X],i=this.axes[import_ag_charts_core131.ChartAxisDirection.Y];if(!t||!i)return;const{xKey:o,yKey:r,colorRange:s,colorKey:a}=this.properties,n=this.axes[import_ag_charts_core131.ChartAxisDirection.X]?.scale,l=this.axes[import_ag_charts_core131.ChartAxisDirection.Y]?.scale,{xScaleType:c,yScaleType:h}=this.getScaleInformation({xScale:n,yScale:l}),u=this.colorScale.type,d=this.properties.allowNullKeys??!1,{dataModel:p,processedData:g}=await this.requestDataModel(e,this.data,{props:[valueProperty5(o,c,{id:"xValue",allowNullKey:d}),valueProperty5(r,h,{id:"yValue",allowNullKey:d}),...a?[valueProperty5(a,u,{id:"colorValue",invalidValue:void 0})]:[]]});if(this.isColorScaleValid()){const y=p.resolveProcessedDataIndexById(this,"colorValue"),x=g.domain.values[y].filter(S=>S!=null),f=(0,import_ag_charts_core131.extent)(x);if(this.colorScale.domain=f??[],f?.length&&f[0]===f[1]){const S=Math.floor(s.length/2);this.colorScale.range=[s[S],s[S]]}else this.colorScale.range=s;this.colorScale.update()}}isColorScaleValid(){const{colorKey:e}=this.properties;if(!e)return!1;const{dataModel:t,processedData:i}=this;if(!t||!i)return!1;const o=t.resolveProcessedDataIndexById(this,"colorValue"),r=i.input.count,s=getMissCount(this,i.defs.values[o].missing),a=t.resolveProcessedDataIndexById(this,"colorValue"),n=i.domain.values[a].filter(c=>c!=null).length;return!(r===0||r===s||n===0)}xCoordinateRange(e,t){const i=this.axes[import_ag_charts_core131.ChartAxisDirection.X].scale,o=t*(i.bandwidth??0)/2,r=i.convert(e)+o,s=t*(i.bandwidth??10);return[r,r+s]}yCoordinateRange(e,t){const i=this.axes[import_ag_charts_core131.ChartAxisDirection.Y].scale,o=t*(i.bandwidth??0)/2,r=i.convert(e[0])+o,s=t*(i.bandwidth??10);return[r,r+s]}getSeriesDomain(e){const{dataModel:t,processedData:i}=this;return!t||!i?{domain:[]}:e===import_ag_charts_core131.ChartAxisDirection.X?{domain:t.getDomain(this,"xValue","value",i).domain}:{domain:t.getDomain(this,"yValue","value",i).domain}}getSeriesRange(){return[Number.NaN,Number.NaN]}validateCreateNodeDataPreconditions(){const e=super.validateCreateNodeDataPreconditions();if(!e)return;const{xAxis:t,yAxis:i}=e;if(t.type!=="category"||i.type!=="category"){import_ag_charts_core131.Logger.warnOnce(`Heatmap series expected axes to have "category" type, but received "${t.type}" and "${i.type}" instead.`);return}return e}populateNodeData(e){for(const[t,i]of e.rawData.entries()){const o=upsertNodeDatum2(e,{datumIndex:t,datum:i},(r,s)=>this.createNodeDatum(r,s.datumIndex,s.datum),(r,s,a)=>this.updateNodeDatum(r,s,a.datumIndex,a.datum));if(o){const r=this.createLabelDatum(e,t,i,o);r&&e.labels.push(r)}}}initializeResult(e){return{itemId:this.properties.yKey??this.id,nodeData:e.nodes,labelData:e.labels,scales:this.calculateScaling(),visible:this.visible}}createNodeDatumContext(e,t){const{dataModel:i,processedData:o,contextNodeData:r}=this;if(!i||!o)return;const{xKey:s,xName:a,yKey:n,yName:l,colorKey:c,colorName:h,textAlign:u,verticalAlign:d,itemPadding:p}=this.properties,g=e.scale,y=t.scale,x=i.resolveColumnById(this,"xValue",o),f=i.resolveColumnById(this,"yValue",o),S=c?i.resolveColumnById(this,"colorValue",o):void 0,m=c?i.getDomain(this,"colorValue","value",o).domain:[],v=g.bandwidth??10,b=y.bandwidth??10,D=o.dataSources.get(this.id)?.data??[],k=r?.nodeData!=null&&o.changeDescription!=null;return{xAxis:e,yAxis:t,xScale:g,yScale:y,rawData:D,xValues:x,xKey:s,yKey:n,xName:a,yName:l,animationEnabled:!this.ctx.animationManager.isSkipped(),canIncrementallyUpdate:k,nodes:k?r.nodeData:[],nodeIndex:0,xOffset:(g.bandwidth??0)/2,yOffset:(y.bandwidth??0)/2,width:v,height:b,textAlignFactor:(v-2*p)*textAlignFactors[u],verticalAlignFactor:(b-2*p)*verticalAlignFactors[d],yValues:f,colorKey:c,colorName:h,colorValues:S,colorDomain:m,itemPadding:p,labels:[],labelIndex:0}}createSkeletonNodeDatum(e,t,i){const{xKey:o,yKey:r,width:s,height:a,colorValues:n}=e,l=e.xValues[t],c=e.yValues[t],h=n?.[t];return{series:this,datumIndex:t,yKey:r,xKey:o,xValue:l,yValue:c,colorValue:h,datum:i,point:{x:0,y:0,size:0},width:s,height:a,midPoint:{x:0,y:0},missing:n!=null&&h==null,style:{}}}updateNodeDatum(e,t,i,o){const{xScale:r,yScale:s,xOffset:a,yOffset:n,width:l,height:c,xKey:h,yKey:u,colorValues:d}=e,p=t,g=e.xValues[i],y=e.yValues[i],x=r.convert(g)+a,f=s.convert(y)+n;if(!Number.isFinite(x)||!Number.isFinite(f))return;const S=d?.[i];p.datumIndex=i,p.datum=o,p.yKey=u,p.xKey=h,p.xValue=g,p.yValue=y,p.colorValue=S,p.width=l,p.height=c,p.missing=d!=null&&S==null;const m=p.point;m.x=x,m.y=f,m.size=0,p.midPoint.x=x,p.midPoint.y=f,p.style=this.getItemStyle({datumIndex:i,datum:o,colorValue:S},!1)}createNodeDatum(e,t,i){const{xScale:o,yScale:r,xOffset:s,yOffset:a}=e,n=e.xValues[t],l=e.yValues[t],c=o.convert(n)+s,h=r.convert(l)+a;if(!Number.isFinite(c)||!Number.isFinite(h))return;const u=this.createSkeletonNodeDatum(e,t,i);return this.updateNodeDatum(e,u,t,i),u}createLabelDatum(e,t,i,o){const{label:r}=this.properties,{width:s,height:a,textAlignFactor:n,verticalAlignFactor:l,itemPadding:c,colorKey:h,colorName:u,colorDomain:d,xKey:p,yKey:g,xName:y,yName:x}=e,f=e.colorValues?.[t],S=r.enabled&&f!=null?this.getLabelText(f,i,h,"color",d,r,{value:f,datum:i,colorKey:h,colorName:u,xKey:p,yKey:g,xName:y,yName:x}):void 0,m=()=>({width:s,height:a,meta:null}),v=formatLabels((0,import_ag_charts_core131.toPlainText)(S),this.properties.label,void 0,this.properties.label,{padding:c},m);if(v?.label==null)return;const{text:b,fontSize:D,lineHeight:k,height:A}=v.label,{fontStyle:M,fontFamily:I,fontWeight:_,color:P}=this.properties.label,{textAlign:O,verticalAlign:C}=this.properties,L=o.point.x+n*(s-2*c),E=o.point.y+l*(a-2*c)-(v.height-A)*.5;return{series:this,datum:i,datumIndex:t,text:b,fontSize:D,lineHeight:k,fontStyle:M,fontFamily:I,fontWeight:_,color:P,textAlign:O,textBaseline:C,x:L,y:E,style:o.style}}nodeFactory(){return new Rect}update(e){return this.ctx.animationManager.skipCurrentBatch(),super.update(e)}updateDatumSelection(e){const{nodeData:t,datumSelection:i}=e,o=t??[];return i.update(o)}getItemStyle({datumIndex:e,datum:t,colorValue:i},o,r){const{properties:s}=this,{itemStyler:a,stroke:n,strokeWidth:l,strokeOpacity:c}=s,h=this.getHighlightStyle(o,e,r),u=(0,import_ag_charts_core131.mergeDefaults)(h,{fill:this.isColorScaleValid()&&i!=null?this.colorScale.convert(i):"transparent",fillOpacity:1,stroke:n,strokeWidth:l,strokeOpacity:c,opacity:1});let d;return a!=null&&e!=null&&(d=this.cachedDatumCallback(createDatumId3(e,o?"highlight":"node"),()=>{const p=this.makeItemStylerParams(t,e,o,u);return this.callWithContext(a,p)})),d?(0,import_ag_charts_core131.mergeDefaults)(d,u):u}makeItemStylerParams(e,t,i,o){const{id:r,properties:s}=this,{xKey:a,yKey:n}=s,l=this.ctx.highlightManager?.getActiveHighlight(),c=this.getHighlightStateString(l,i,t),h=this.filterItemStylerFillParams(o.fill)??o.fill;return{seriesId:r,datum:e,xKey:a,yKey:n,highlightState:c,...o,fill:h}}updateDatumStyles({datumSelection:e,isHighlight:t}){const i=this.ctx.highlightManager?.getActiveHighlight();e.each((o,r)=>{const s=this.getHighlightState(i,t,r.datumIndex);r.style=this.getItemStyle(r,t,s)})}updateDatumNodes({datumSelection:e}){const t=this.axes[import_ag_charts_core131.ChartAxisDirection.X],[i,o]=t?.visibleRange??[],s=!(i!==0||o!==1);e.each((a,n)=>{const{point:l,width:c,height:h,style:u}=n;a.setStyleProperties(u),a.crisp=s,a.x=Math.floor(l.x-c/2),a.y=Math.floor(l.y-h/2),a.width=Math.ceil(c),a.height=Math.ceil(h)})}updateLabelSelection(e){const{labelData:t,labelSelection:i}=e,{enabled:o}=this.properties.label,r=o?t:[];return i.update(r)}updateLabelNodes(e){const{isHighlight:t=!1}=e,i=this.ctx.highlightManager?.getActiveHighlight();e.labelSelection.each((o,r)=>{o.pointerEvents=PointerEvents.None,o.text=r.text,o.fillOpacity=this.getHighlightStyle(t,r.datumIndex)?.opacity??1,updateLabelNode(this,o,this.properties,this.properties.label,r,t,i)})}getTooltipContent(e){const{id:t,dataModel:i,processedData:o,axes:r,properties:s,colorScale:a,ctx:n}=this,{formatManager:l}=n,{xKey:c,xName:h,yKey:u,yName:d,colorKey:p,colorName:g,colorRange:y,title:x,legendItemName:f,tooltip:S}=s,m=r[import_ag_charts_core131.ChartAxisDirection.X],v=r[import_ag_charts_core131.ChartAxisDirection.Y];if(!i||!o||!m||!v)return;const b=o.dataSources.get(this.id)?.data[e],D=i.resolveColumnById(this,"xValue",o)[e],k=i.resolveColumnById(this,"yValue",o)[e],A=p!=null&&this.isColorScaleValid()?i.resolveColumnById(this,"colorValue",o)[e]:void 0,M=this.properties.allowNullKeys??!1;if(D===void 0&&!M)return;const I=[];let _;if(A==null)_=y[0];else{_=a.convert(A);const C=i.getDomain(this,"colorValue","value",o).domain,L=l.format(this.callWithContext.bind(this),{type:"number",value:A,datum:b,seriesId:t,legendItemName:f,key:p,source:"tooltip",property:"color",domain:C,boundSeries:this.getFormatterContext("color"),fractionDigits:void 0,visibleDomain:void 0});I.push({label:g,fallbackLabel:p,value:L??(0,import_ag_charts_core131.formatValue)(A)})}I.push({label:h,fallbackLabel:c,value:this.getAxisValueText(m,"tooltip",D,b,c,f)},{label:d,fallbackLabel:u,value:this.getAxisValueText(v,"tooltip",k,b,u,f)});const P=this.getItemStyle({datumIndex:e,datum:b,colorValue:A},!1);P.fill!=null&&(_=P.fill);const O=_==null?void 0:{marker:{shape:"square",fill:_,fillOpacity:1,stroke:void 0,strokeWidth:0,strokeOpacity:1,lineDash:[0],lineDashOffset:0}};return this.formatTooltipWithContext(S,{title:x??f,symbol:O,data:I},{seriesId:t,datum:b,title:x,xKey:c,xName:h,yKey:u,yName:d,colorKey:p,colorName:g,...P})}getLegendData(e){return e!=="gradient"||!this.isColorScaleValid()||!this.dataModel?[]:[{legendType:"gradient",enabled:this.visible,seriesId:this.id,series:this.getFormatterContext("color"),colorDomain:this.colorScale.domain,colorRange:this.colorScale.range}]}isLabelEnabled(){return this.properties.label.enabled&&!!this.properties.colorKey}getBandScalePadding(){return{inner:0,outer:0}}computeFocusBounds({datumIndex:e}){const t=this.contextNodeData?.nodeData[e];if(t===void 0)return;const{width:i,height:o,midPoint:r}=t,s={x:r.x-i/2,y:r.y-o/2,width:i,height:o};return computeBarFocusBounds3(this,s)}initQuadTree(e){addHitTestersToQuadtree(e,this.datumNodesIter())}pickNodesExactShape(e){const t=findQuadtreeMatch(this,e);return t!=null&&t.distance<=0?[t.datum]:[]}pickNodeClosestDatum(e){return findQuadtreeMatch(this,e)}hasItemStylers(){return this.properties.itemStyler!=null||this.properties.label.itemStyler!=null||this.isColorScaleValid()}};HeatmapSeries.className="HeatmapSeries",HeatmapSeries.type="heatmap";var import_ag_charts_community112=require("ag-charts-community"),import_ag_charts_core132=require("ag-charts-core"),{heatmapSeriesThemeableOptionsDef}=import_ag_charts_community112._ModuleSupport,heatmapSeriesOptionsDef={...(0,import_ag_charts_core132.without)(heatmapSeriesThemeableOptionsDef,["showInLegend"]),...(0,import_ag_charts_core132.without)(import_ag_charts_core132.commonSeriesOptionsDefs,["showInLegend"]),type:(0,import_ag_charts_core132.required)((0,import_ag_charts_core132.constant)("heatmap")),xKey:(0,import_ag_charts_core132.required)(import_ag_charts_core132.string),yKey:(0,import_ag_charts_core132.required)(import_ag_charts_core132.string),xKeyAxis:import_ag_charts_core132.string,yKeyAxis:import_ag_charts_core132.string,colorKey:import_ag_charts_core132.string,xName:import_ag_charts_core132.string,yName:import_ag_charts_core132.string,colorName:import_ag_charts_core132.string,colorRange:(0,import_ag_charts_core132.arrayOf)(import_ag_charts_core132.color)},import_ag_charts_core133=require("ag-charts-core"),HEATMAP_SERIES_THEME={series:{stroke:{$if:[{$eq:[{$palette:"type"},"inbuilt"]},{$ref:"chartBackgroundColor"},{$path:["/0",{$palette:"stroke"},{$palette:"strokes"}]}]},strokeWidth:{$isUserOption:["./stroke",2,void 0]},label:{...import_ag_charts_core133.LABEL_BOXING_DEFAULTS,enabled:!1,color:{$ref:"textColor"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},wrapping:"on-space",overflowStrategy:"ellipsis"},itemPadding:3,highlight:{unhighlightedItem:{opacity:.6}}},gradientLegend:{enabled:!0}};HEATMAP_SERIES_THEME.series.colorRange={$if:[{$eq:[{$palette:"type"},"inbuilt"]},{$palette:"divergingColors"},import_ag_charts_core133.SAFE_RANGE2_OPERATION]};var HeatmapSeriesModule={type:"series",name:"heatmap",chartType:"cartesian",enterprise:!0,version:import_ag_charts_community113.VERSION,dependencies:[import_ag_charts_community113.CartesianChartModule],options:heatmapSeriesOptionsDef,defaultAxes:{y:{type:import_ag_charts_core134.CARTESIAN_AXIS_TYPE.CATEGORY,position:import_ag_charts_core134.CARTESIAN_POSITION.LEFT},x:{type:import_ag_charts_core134.CARTESIAN_AXIS_TYPE.CATEGORY,position:import_ag_charts_core134.CARTESIAN_POSITION.BOTTOM}},axisKeys:{[import_ag_charts_core134.ChartAxisDirection.X]:"xKeyAxis",[import_ag_charts_core134.ChartAxisDirection.Y]:"yKeyAxis"},themeTemplate:HEATMAP_SERIES_THEME,create:e=>new HeatmapSeries(e)},import_ag_charts_community116=require("ag-charts-community"),import_ag_charts_core136=require("ag-charts-core"),import_ag_charts_community114=require("ag-charts-community"),OhlcSeries=class extends OhlcSeriesBase{constructor(){super(...arguments),this.properties=new OhlcSeriesProperties}nodeFactory(){const e=new OhlcNode;return e.lineCap="square",e}updateDatumStyles({datumSelection:e,isHighlight:t}){e.each((i,o)=>{o.style=this.getItemStyle(o.datumIndex,t,void 0,o.itemType)})}updateDatumNodes({datumSelection:e,isHighlight:t}){const{contextNodeData:i,properties:o}=this;if(!i)return;const r=this.ctx.highlightManager.getActiveHighlight(),{up:s,down:a}=o.item,n=this;e.each(function(c,h){const{centerX:u,width:d,y:p,height:g,yOpen:y,yClose:x,crisp:f}=h,S=h.isRising?s:a;c.setStaticProperties(u,d,p,g,y,x,f);const m=h.style??i.styles[h.itemType][n.getHighlightState(r,t,h.datumIndex)];c.setStyleProperties(m),c.strokeAlignment=S.strokeWidth})}getLegendData(e){const{id:t,data:i,ctx:{legendManager:o},visible:r}=this,{xKey:s,yName:a,item:{up:n,down:l},showInLegend:c,legendItemName:h}=this.properties;if(!i?.data.length||!s||e!=="category")return[];const u={type:"gradient",gradient:"linear",colorSpace:"rgb",colorStops:[{color:n.stroke,stop:0},{color:n.stroke,stop:.5},{color:l.stroke,stop:.5}],rotation:90};return[{legendType:"category",id:t,itemId:t,seriesId:t,enabled:r&&o.getItemEnabled({seriesId:t,itemId:t}),label:{text:h??a??t},symbol:{marker:{fill:u,fillOpacity:n.strokeOpacity,stroke:void 0,strokeWidth:0,strokeOpacity:1,lineDash:[0],lineDashOffset:0}},legendItemName:h,hideInLegend:!c}]}hasItemStylers(){return this.properties.itemStyler!=null}};OhlcSeries.className="ohlc",OhlcSeries.type="ohlc";var import_ag_charts_community115=require("ag-charts-community"),import_ag_charts_core135=require("ag-charts-core"),{ohlcSeriesThemeableOptionsDef}=import_ag_charts_community115._ModuleSupport,ohlcSeriesOptionsDef={...import_ag_charts_core135.commonSeriesOptionsDefs,...ohlcSeriesThemeableOptionsDef,type:(0,import_ag_charts_core135.required)((0,import_ag_charts_core135.constant)("ohlc")),xKey:(0,import_ag_charts_core135.required)(import_ag_charts_core135.string),openKey:(0,import_ag_charts_core135.required)(import_ag_charts_core135.string),highKey:(0,import_ag_charts_core135.required)(import_ag_charts_core135.string),lowKey:(0,import_ag_charts_core135.required)(import_ag_charts_core135.string),closeKey:(0,import_ag_charts_core135.required)(import_ag_charts_core135.string),xKeyAxis:import_ag_charts_core135.string,yKeyAxis:import_ag_charts_core135.string,xName:import_ag_charts_core135.string,yName:import_ag_charts_core135.string,openName:import_ag_charts_core135.string,highName:import_ag_charts_core135.string,lowName:import_ag_charts_core135.string,closeName:import_ag_charts_core135.string};ohlcSeriesOptionsDef.pickOutsideVisibleMinorAxis=(0,import_ag_charts_core135.undocumented)(import_ag_charts_core135.boolean),ohlcSeriesOptionsDef.focusPriority=(0,import_ag_charts_core135.undocumented)(import_ag_charts_core135.number);var{predictCartesianFinancialAxis:predictCartesianFinancialAxis2}=import_ag_charts_community116._ModuleSupport,themeTemplate={animation:{enabled:!1},series:{item:{up:{stroke:{$if:[{$eq:[{$palette:"type"},"user-indexed"]},{$palette:"stroke"},{$palette:"up.stroke"}]}},down:{stroke:{$if:[{$eq:[{$palette:"type"},"user-indexed"]},{$palette:"stroke"},{$palette:"down.stroke"}]}}},tooltip:{range:{$path:["/tooltip/range","nearest"]}},highlight:import_ag_charts_core136.MULTI_SERIES_HIGHLIGHT_STYLE},axes:{[import_ag_charts_core136.CARTESIAN_AXIS_TYPE.NUMBER]:{crosshair:{snap:!1}},[import_ag_charts_core136.CARTESIAN_AXIS_TYPE.ORDINAL_TIME]:{groupPaddingInner:0,crosshair:{enabled:!0}}}},OhlcSeriesModule={type:"series",name:"ohlc",chartType:"cartesian",enterprise:!0,version:import_ag_charts_community116.VERSION,dependencies:[import_ag_charts_community116.CartesianChartModule],options:ohlcSeriesOptionsDef,matchingKeys:["xKey","lowKey","highKey","openKey","closeKey","normalizedTo"],predictAxis:predictCartesianFinancialAxis2,defaultAxes:{y:{type:import_ag_charts_core136.CARTESIAN_AXIS_TYPE.NUMBER,position:import_ag_charts_core136.CARTESIAN_POSITION.LEFT},x:{type:import_ag_charts_core136.CARTESIAN_AXIS_TYPE.ORDINAL_TIME,position:import_ag_charts_core136.CARTESIAN_POSITION.BOTTOM}},axisKeys:{[import_ag_charts_core136.ChartAxisDirection.X]:"xKeyAxis",[import_ag_charts_core136.ChartAxisDirection.Y]:"yKeyAxis"},themeTemplate,create:e=>new OhlcSeries(e)},import_ag_charts_community124=require("ag-charts-community"),import_ag_charts_core144=require("ag-charts-core"),import_ag_charts_community121=require("ag-charts-community"),import_ag_charts_core141=require("ag-charts-core"),import_ag_charts_community117=require("ag-charts-community"),import_ag_charts_core137=require("ag-charts-core");function aggregateRangeAreaData(e,t,i,o,r,s,a,n){const[l,c]=(0,import_ag_charts_core137.aggregationDomain)(e,r);return(0,import_ag_charts_core137.computeExtremesAggregation)([l,c],t,i,o,{smallestKeyInterval:s,xNeedsValueOf:a,yNeedsValueOf:n})}var memoizedAggregateRangeAreaData=(0,import_ag_charts_core137.simpleMemorize2)(aggregateRangeAreaData);function aggregateRangeAreaDataFromDataModel(e,t,i,o,r){const s=t.resolveKeysById(o,"xValue",i),a=t.resolveColumnById(o,"yHighValue",i),n=t.resolveColumnById(o,"yLowValue",i),l=t.getDomain(o,"xValue","key",i),c=t.resolveColumnNeedsValueOf(o,"xValue",i),h=t.resolveColumnNeedsValueOf(o,"yHighValue",i)??t.resolveColumnNeedsValueOf(o,"yLowValue",i);if(r){const[u,d]=(0,import_ag_charts_core137.aggregationDomain)(e,l);return(0,import_ag_charts_core137.computeExtremesAggregation)([u,d],s,a,n,{smallestKeyInterval:i.reduced?.smallestKeyInterval,xNeedsValueOf:c,yNeedsValueOf:h,existingFilters:r})}return memoizedAggregateRangeAreaData(e,s,a,n,l,i.reduced?.smallestKeyInterval,c,h)}function aggregateRangeAreaDataFromDataModelPartial(e,t,i,o,r,s){const a=t.resolveKeysById(o,"xValue",i),n=t.resolveColumnById(o,"yHighValue",i),l=t.resolveColumnById(o,"yLowValue",i),c=t.getDomain(o,"xValue","key",i),h=t.resolveColumnNeedsValueOf(o,"xValue",i),u=t.resolveColumnNeedsValueOf(o,"yHighValue",i)??t.resolveColumnNeedsValueOf(o,"yLowValue",i),[d,p]=(0,import_ag_charts_core137.aggregationDomain)(e,c);return(0,import_ag_charts_core137.computeExtremesAggregationPartial)([d,p],a,n,l,{smallestKeyInterval:i.reduced?.smallestKeyInterval,targetRange:r,xNeedsValueOf:h,yNeedsValueOf:u,existingFilters:s})}var import_ag_charts_community118=require("ag-charts-community"),import_ag_charts_core138=require("ag-charts-core");function getYValueAtX({span:e},t){switch(e.type){case"linear":case"step":case"multi-line":{const i=(t-e.x0)/(e.x1-e.x0);return e.y0+i*(e.y1-e.y0)}case"cubic":{const{cp0x:i,cp0y:o,cp1x:r,cp1y:s,cp2x:a,cp2y:n,cp3x:l,cp3y:c}=e;let h=.5;const u=1e-6;for(let p=0;p<10;p++){const g=1-h,x=g*g*g*i+3*g*g*h*r+3*g*h*h*a+h*h*h*l-t;if(Math.abs(x)<u)break;const f=3*g*g*(r-i)+6*g*h*(a-r)+3*h*h*(l-a);if(Math.abs(f)<1e-12)break;h=h-x/f,h=Math.max(0,Math.min(1,h))}const d=1-h;return d*d*d*o+3*d*d*h*s+3*d*h*h*n+h*h*h*c}}}function findSpanForX(e,t,i=0){for(let o=i;o<e.length;o++){const r=e[o],[s,a]=(0,import_ag_charts_core138.spanRange)(r.span);if(t>=s.x&&t<=a.x)return{span:r,index:o};if(t<s.x)break}return{span:null,index:i}}function checkForIntersection(e,t,i,o,r){const s=findSpanForX(e,i,r),a=findSpanForX(t,i,r);if(!s.span||!a.span)return{intersection:null,spanIndex:s.index,isInverted:o};const n=getYValueAtX(s.span,i),l=getYValueAtX(a.span,i),c=n>l;return{intersection:o===c?null:{x:i,y:n},spanIndex:s.index,isInverted:c}}function findRangeAreaIntersections(e,t,i,o,r=!1){if(e.length===0||t.length===0)return[];const s=[];let a=r,n=0;for(let l=i;l<=o;l+=.5){const c=checkForIntersection(e,t,l,a,n);c.intersection&&s.push(c.intersection.x),n=c.spanIndex,a=c.isInverted}return s}function calculateIntersectionSegments(e,t,i,o,r={}){const s=Math.max(t.x,i.width-(t.x+t.width)),a=Math.max(t.y,i.height-(t.y+t.height)),n=[],l=(h,u)=>({x0:h,y0:-a,x1:u,y1:t.height+a});o&&n.push({clipRect:l(-s,e[0]??t.width+s),...r});const c=o?1:0;for(let h=c;h<e.length;h+=2)n.push({clipRect:l(e[h],e[h+1]??t.width+s),...r});return n}var import_ag_charts_community119=require("ag-charts-community"),import_ag_charts_core139=require("ag-charts-core"),{CartesianSeriesProperties:CartesianSeriesProperties2,SeriesMarker,makeSeriesTooltip:makeSeriesTooltip5,DropShadow,Label:Label2}=import_ag_charts_community119._ModuleSupport,RangeAreaSeriesLabel=class extends Label2{constructor(){super(...arguments),this.placement="outside",this.spacing=0}};__decorateClass([import_ag_charts_core139.Property],RangeAreaSeriesLabel.prototype,"placement",2),__decorateClass([import_ag_charts_core139.Property],RangeAreaSeriesLabel.prototype,"spacing",2);var RangeAreaInvertedStyle=class{constructor(){this.enabled=!1,this.fillOpacity=1}};__decorateClass([import_ag_charts_core139.Property],RangeAreaInvertedStyle.prototype,"enabled",2),__decorateClass([import_ag_charts_core139.Property],RangeAreaInvertedStyle.prototype,"fill",2),__decorateClass([import_ag_charts_core139.Property],RangeAreaInvertedStyle.prototype,"fillOpacity",2);var RangeAreaLineStyle=class extends import_ag_charts_core139.BaseProperties{constructor(){super(...arguments),this.stroke="#99CCFF",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.marker=new SeriesMarker}};__decorateClass([import_ag_charts_core139.Property],RangeAreaLineStyle.prototype,"stroke",2),__decorateClass([import_ag_charts_core139.Property],RangeAreaLineStyle.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core139.Property],RangeAreaLineStyle.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core139.Property],RangeAreaLineStyle.prototype,"lineDash",2),__decorateClass([import_ag_charts_core139.Property],RangeAreaLineStyle.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core139.Property],RangeAreaLineStyle.prototype,"marker",2);var RangeAreaItemProperties=class extends import_ag_charts_core139.BaseProperties{constructor(){super(...arguments),this.low=new RangeAreaLineStyle,this.high=new RangeAreaLineStyle}};__decorateClass([import_ag_charts_core139.Property],RangeAreaItemProperties.prototype,"low",2),__decorateClass([import_ag_charts_core139.Property],RangeAreaItemProperties.prototype,"high",2);var SharedRangeAreaMarker=class extends import_ag_charts_core139.BaseProperties{};__decorateClass([import_ag_charts_core139.Property],SharedRangeAreaMarker.prototype,"enabled",2),__decorateClass([import_ag_charts_core139.Property],SharedRangeAreaMarker.prototype,"shape",2),__decorateClass([import_ag_charts_core139.Property],SharedRangeAreaMarker.prototype,"size",2),__decorateClass([import_ag_charts_core139.Property],SharedRangeAreaMarker.prototype,"fill",2),__decorateClass([import_ag_charts_core139.Property],SharedRangeAreaMarker.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core139.Property],SharedRangeAreaMarker.prototype,"stroke",2),__decorateClass([import_ag_charts_core139.Property],SharedRangeAreaMarker.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core139.Property],SharedRangeAreaMarker.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core139.Property],SharedRangeAreaMarker.prototype,"lineDash",2),__decorateClass([import_ag_charts_core139.Property],SharedRangeAreaMarker.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core139.Property],SharedRangeAreaMarker.prototype,"itemStyler",2);var RangeAreaProperties=class extends CartesianSeriesProperties2{constructor(){super(...arguments),this.fill="#99CCFF",this.fillOpacity=1,this.stroke="#99CCFF",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.interpolation=new import_ag_charts_core139.InterpolationProperties,this.item=new RangeAreaItemProperties,this.invertedStyle=new RangeAreaInvertedStyle,this.shadow=new DropShadow().set({enabled:!1}),this.marker=new SharedRangeAreaMarker,this.label=new RangeAreaSeriesLabel,this.tooltip=makeSeriesTooltip5(),this.connectMissingData=!1}};__decorateClass([import_ag_charts_core139.Property],RangeAreaProperties.prototype,"xKey",2),__decorateClass([import_ag_charts_core139.Property],RangeAreaProperties.prototype,"yLowKey",2),__decorateClass([import_ag_charts_core139.Property],RangeAreaProperties.prototype,"yHighKey",2),__decorateClass([import_ag_charts_core139.Property],RangeAreaProperties.prototype,"xName",2),__decorateClass([import_ag_charts_core139.Property],RangeAreaProperties.prototype,"yName",2),__decorateClass([import_ag_charts_core139.Property],RangeAreaProperties.prototype,"yLowName",2),__decorateClass([import_ag_charts_core139.Property],RangeAreaProperties.prototype,"yHighName",2),__decorateClass([import_ag_charts_core139.Property],RangeAreaProperties.prototype,"fill",2),__decorateClass([import_ag_charts_core139.Property],RangeAreaProperties.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core139.Property],RangeAreaProperties.prototype,"stroke",2),__decorateClass([import_ag_charts_core139.Property],RangeAreaProperties.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core139.Property],RangeAreaProperties.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core139.Property],RangeAreaProperties.prototype,"lineDash",2),__decorateClass([import_ag_charts_core139.Property],RangeAreaProperties.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core139.Property],RangeAreaProperties.prototype,"interpolation",2),__decorateClass([import_ag_charts_core139.Property],RangeAreaProperties.prototype,"styler",2),__decorateClass([import_ag_charts_core139.Property],RangeAreaProperties.prototype,"item",2),__decorateClass([import_ag_charts_core139.Property],RangeAreaProperties.prototype,"invertedStyle",2),__decorateClass([import_ag_charts_core139.Property],RangeAreaProperties.prototype,"shadow",2),__decorateClass([import_ag_charts_core139.Property],RangeAreaProperties.prototype,"marker",2),__decorateClass([import_ag_charts_core139.Property],RangeAreaProperties.prototype,"label",2),__decorateClass([import_ag_charts_core139.Property],RangeAreaProperties.prototype,"tooltip",2),__decorateClass([import_ag_charts_core139.Property],RangeAreaProperties.prototype,"connectMissingData",2);var import_ag_charts_community120=require("ag-charts-community"),import_ag_charts_core140=require("ag-charts-core"),{CollapseMode,pairUpSpans,prepareAreaFillAnimationFns,plotInterpolatedLinePathStroke,prepareLinePathPropertyAnimation}=import_ag_charts_community120._ModuleSupport;function prepareRangeAreaPathStrokeAnimationFns(e,t,i,o){const r=(l,c)=>{plotInterpolatedLinePathStroke(l,c,t.removed),plotInterpolatedLinePathStroke(l,c,i.removed)},s=(l,c)=>{plotInterpolatedLinePathStroke(l,c,t.moved),plotInterpolatedLinePathStroke(l,c,i.moved)},a=(l,c)=>{plotInterpolatedLinePathStroke(l,c,t.added),plotInterpolatedLinePathStroke(l,c,i.added)},n=prepareLinePathPropertyAnimation(e,o);return{status:e,path:{addPhaseFn:a,updatePhaseFn:s,removePhaseFn:r},pathProperties:n}}function prepareRangeAreaPathAnimation(e,t,i){const o=e.scales.x?.type==="category",r=t.scales.x?.type==="category";if(o!==r||!(0,import_ag_charts_core140.isScaleValid)(e.scales.x)||!(0,import_ag_charts_core140.isScaleValid)(t.scales.x))return;let s="updated";t.visible&&!e.visible?s="removed":!t.visible&&e.visible&&(s="added");const a=pairUpSpans({scales:e.scales,data:e.fillData.spans},{scales:t.scales,data:t.fillData.spans},CollapseMode.Split);if(a==null)return;const n=pairUpSpans({scales:e.scales,data:e.fillData.phantomSpans},{scales:t.scales,data:t.fillData.phantomSpans},CollapseMode.Split);if(n==null)return;const l=pairUpSpans({scales:e.scales,data:e.highStrokeData.spans},{scales:t.scales,data:t.highStrokeData.spans},CollapseMode.Split);if(l==null)return;const c=pairUpSpans({scales:e.scales,data:e.lowStrokeData.spans},{scales:t.scales,data:t.lowStrokeData.spans},CollapseMode.Split);if(c==null)return;const h="fade",u=prepareAreaFillAnimationFns(s,a,n,h),d=prepareRangeAreaPathStrokeAnimationFns(s,l,c,h),p=(i?.changed??!0)||!(0,import_ag_charts_core140.areScalingEqual)(e.scales.x,t.scales.x)||!(0,import_ag_charts_core140.areScalingEqual)(e.scales.y,t.scales.y)||s!=="updated";return{status:s,fill:u,stroke:d,hasMotion:p}}var HIGH2=import_ag_charts_core141.AGGREGATION_INDEX_Y_MAX,LOW2=import_ag_charts_core141.AGGREGATION_INDEX_Y_MIN,SPAN2=import_ag_charts_core141.AGGREGATION_SPAN,{valueProperty:valueProperty6,keyProperty:keyProperty4,updateLabelNode:updateLabelNode2,fixNumericExtent:fixNumericExtent4,buildResetPathFn,resetLabelFn,resetMarkerFn,resetMarkerPositionFn,pathSwipeInAnimation,resetMotion,markerSwipeScaleInAnimation,seriesLabelFadeInAnimation,animationValidation:animationValidation3,diff:diff3,updateClipPath,computeMarkerFocusBounds,plotAreaPathFill,plotLinePathStroke,interpolatePoints,pathFadeInAnimation,markerFadeInAnimation,fromToMotion,pathMotion,PointerEvents:PointerEvents2,Marker,BBox:BBox13,processedDataIsAnimatable:processedDataIsAnimatable3,markerEnabled,getMarkerStyles,calculateSegments:calculateSegments2,toHighlightString:toHighlightString2,HighlightState:HighlightState2,AggregationManager:AggregationManager2,resetMarkerSelectionsDirect,createDatumId:createDatumId4,visibleRangeIndices:visibleRangeIndices2}=import_ag_charts_community121._ModuleSupport,RangeAreaSeriesNodeEvent=class extends import_ag_charts_community121._ModuleSupport.SeriesNodeEvent{constructor(e,t,i,o){super(e,t,i,o),this.xKey=o.properties.xKey,this.yLowKey=o.properties.yLowKey,this.yHighKey=o.properties.yHighKey}},RangeAreaSeries=class extends import_ag_charts_community121._ModuleSupport.CartesianSeries{constructor(e){super({moduleCtx:e,pathsPerSeries:["fill","lowStroke","highStroke"],pickModes:[import_ag_charts_community121._ModuleSupport.SeriesNodePickMode.AXIS_ALIGNED],propertyKeys:{[import_ag_charts_core141.ChartAxisDirection.X]:["xKey"],[import_ag_charts_core141.ChartAxisDirection.Y]:["yLowKey","yHighKey"]},propertyNames:{[import_ag_charts_core141.ChartAxisDirection.X]:["xName"],[import_ag_charts_core141.ChartAxisDirection.Y]:["yLowName","yHighName","yName"]},categoryKey:"xValue",animationResetFns:{path:buildResetPathFn({getVisible:()=>this.visible,getOpacity:()=>this.getOpacity()}),label:resetLabelFn,datum:(t,i)=>({...resetMarkerFn(t),...resetMarkerPositionFn(t,i)})},clipFocusBox:!1}),this.properties=new RangeAreaProperties,this.NodeEvent=RangeAreaSeriesNodeEvent,this.aggregationManager=new AggregationManager2}renderToOffscreenCanvas(){return(this.contextNodeData?.nodeData?.length??0)>0&&this.getDrawingMode(!1)==="cutout"||super.renderToOffscreenCanvas()}async processData(e){const{xKey:t,yLowKey:i,yHighKey:o}=this.properties,r=this.axes[import_ag_charts_core141.ChartAxisDirection.X]?.scale,s=this.axes[import_ag_charts_core141.ChartAxisDirection.Y]?.scale,{xScaleType:a,yScaleType:n}=this.getScaleInformation({xScale:r,yScale:s}),l=[],c=!this.ctx.animationManager.isSkipped();this.needsDataModelDiff()&&this.processedData&&l.push(diff3(this.id,this.processedData)),c&&l.push(animationValidation3());const h=this.properties.allowNullKeys??!1,{dataModel:u,processedData:d}=await this.requestDataModel(e,this.data,{props:[keyProperty4(t,a,{id:"xValue",allowNullKey:h}),valueProperty6(i,n,{id:"yLowValue"}),valueProperty6(o,n,{id:"yHighValue"}),...l]});this.aggregateData(u,d),this.animationState.transition("updateData")}aggregateData(e,t){if(this.aggregationManager.markStale(t.input.count),t.type!=="ungrouped"||processedDataIsAnimatable3(t))return;const i=this.axes[import_ag_charts_core141.ChartAxisDirection.X];if(i==null)return;const o=this.estimateTargetRange();this.aggregationManager.aggregate({computePartial:s=>aggregateRangeAreaDataFromDataModelPartial(i.scale.type,e,t,this,o,s),computeFull:s=>aggregateRangeAreaDataFromDataModel(i.scale.type,e,t,this,s),targetRange:o});const r=this.aggregationManager.filters;r&&r.length>0&&import_ag_charts_core141.DebugMetrics.record(`${this.type}:aggregation`,r.map(s=>s.maxRange))}estimateTargetRange(){const e=this.axes[import_ag_charts_core141.ChartAxisDirection.X];if(e?.scale?.range){const[t,i]=e.scale.range;return Math.abs(i-t)}return this.ctx.scene?.canvas?.width??800}createNodeDatumContext(e,t){const{dataModel:i,processedData:o}=this;if(!i||!o)return;const r=o.dataSources.get(this.id)?.data??[],s=e.scale,a=t.scale,n=e.range,[l,c]=s.range,h=Math.abs(c-l);this.aggregationManager.ensureLevelForRange(h);const u=this.aggregationManager.getFilterForRange(h),d=this.contextNodeData?.nodeData,p=!this.ctx.animationManager.isSkipped(),g=d!=null&&(o.changeDescription!=null||!processedDataIsAnimatable3(o)||u!=null);return{xAxis:e,yAxis:t,rawData:r,xValues:i.resolveKeysById(this,"xValue",o),yHighValues:i.resolveColumnById(this,"yHighValue",o),yLowValues:i.resolveColumnById(this,"yLowValue",o),xScale:s,yScale:a,xAxisRange:n,xOffset:(s.bandwidth??0)/2,dataAggregationFilter:u,range:h,labelsEnabled:this.properties.label.enabled,animationEnabled:p,canIncrementallyUpdate:g,xKey:this.properties.xKey,yLowKey:this.properties.yLowKey,yHighKey:this.properties.yHighKey,item:this.properties.item,yDomain:this.getSeriesDomain(import_ag_charts_core141.ChartAxisDirection.Y).domain,connectMissingData:this.properties.connectMissingData,interpolation:this.properties.interpolation,nodes:g?d:[],labelData:[],spanPoints:[],nodeIndex:0}}xCoordinateRange(e){const t=this.axes[import_ag_charts_core141.ChartAxisDirection.X].scale.convert(e);return[t,t]}yCoordinateRange(e){const t=this.axes[import_ag_charts_core141.ChartAxisDirection.Y].scale.convert(e[0]);return[t,t]}getSeriesDomain(e){const{processedData:t,dataModel:i}=this;if(!(t&&i))return{domain:[]};const{domain:{keys:[o]}}=t;if(e===import_ag_charts_core141.ChartAxisDirection.X){const r=i.resolveProcessedDataDefById(this,"xValue");if(r?.def.type==="key"&&r.def.valueType==="category"){const s=i.getKeySortMetadata(this,"xValue",t);return{domain:o,sortMetadata:s}}return{domain:fixNumericExtent4((0,import_ag_charts_core141.extent)(o))}}else{const r=this.domainForClippedRange(import_ag_charts_core141.ChartAxisDirection.Y,["yHighValue","yLowValue"],"xValue"),s=(0,import_ag_charts_core141.findMinMax)(r);return{domain:fixNumericExtent4(s)}}}getSeriesRange(e,t){return this.domainForVisibleRange(import_ag_charts_core141.ChartAxisDirection.Y,["yHighValue","yLowValue"],"xValue",t)}handleDatumPoint(e,t,i,o,r){if(t.xValue=e.xValues[i],t.xValue===void 0&&!this.properties.allowNullKeys)return;t.datum=e.rawData[i],t.yHighValue=o??e.yHighValues[i],t.yLowValue=r??e.yLowValues[i];const s=e.spanPoints.at(-1);if(Number.isFinite(t.yHighValue)&&Number.isFinite(t.yLowValue)){if(t.inverted=t.yLowValue>t.yHighValue,t.x=e.xScale.convert(t.xValue)+e.xOffset,!Number.isFinite(t.x))return;t.yHighCoordinate=e.yScale.convert(t.yHighValue),t.yLowCoordinate=e.yScale.convert(t.yLowValue),this.upsertMarkerDatum(e,t,i,"high",t.yHighValue,t.yHighCoordinate),this.upsertMarkerDatum(e,t,i,"low",t.yLowValue,t.yLowCoordinate);const a={high:{point:{x:t.x,y:t.yHighCoordinate},xDatum:t.xValue,yDatum:t.yHighValue},low:{point:{x:t.x,y:t.yLowCoordinate},xDatum:t.xValue,yDatum:t.yLowValue}};Array.isArray(s)?s.push(a):s==null?e.spanPoints.push([a]):(s.skip+=1,e.spanPoints.push([a]))}else e.connectMissingData||(Array.isArray(s)||s==null?e.spanPoints.push({skip:0}):s.skip+=1)}upsertMarkerDatum(e,t,i,o,r,s){const{size:a}=e.item[o].marker;if(e.canIncrementallyUpdate&&e.nodeIndex<e.nodes.length){const l=e.nodes[e.nodeIndex];l.index=i,l.itemType=o,l.datum=t.datum,l.datumIndex=i,l.midPoint={x:t.x,y:s},l.yHighValue=t.yHighValue,l.yLowValue=t.yLowValue,l.xValue=t.xValue,l.point={x:t.x,y:s,size:a}}else e.nodes.push({index:i,series:this,itemType:o,datum:t.datum,datumIndex:i,midPoint:{x:t.x,y:s},yHighValue:t.yHighValue,yLowValue:t.yLowValue,xValue:t.xValue,xKey:e.xKey,yLowKey:e.yLowKey,yHighKey:e.yHighKey,point:{x:t.x,y:s,size:a},enabled:!0});if(e.nodeIndex++,e.labelsEnabled){const l=this.createLabelData({datumIndex:i,point:{x:t.x,y:s},value:r,yLowValue:t.yLowValue,yHighValue:t.yHighValue,itemType:o,inverted:t.inverted,datum:t.datum,series:this});e.labelData.push(l)}}populateNodeData(e){const{processedData:t}=this;if(!t)return;const i={datum:void 0,xValue:void 0,yHighValue:0,yLowValue:0,x:0,yHighCoordinate:0,yLowCoordinate:0,inverted:!1},o=r=>e.xScale.convert(e.xValues[r])+e.xOffset;if(t.input.count<1e3||e.dataAggregationFilter==null){let[r,s]=visibleRangeIndices2(1,e.xValues.length,e.xAxisRange,a=>{const n=o(a);return[n,n]});t.input.count<1e3&&(r=0,s=t.input.count),r=Math.max(r-1,0),s=Math.min(s+1,e.xValues.length);for(let a=r;a<s;a+=1)this.handleDatumPoint(e,i,a)}else{const{maxRange:r,indexData:s,midpointIndices:a}=e.dataAggregationFilter,[n,l]=visibleRangeIndices2(1,r,e.xAxisRange,c=>{const h=a[c];if(h!==import_ag_charts_core141.AGGREGATION_INDEX_UNSET)return[o(h),o(h)]});for(let c=n;c<l;c+=1){if(a[c]===import_ag_charts_core141.AGGREGATION_INDEX_UNSET)continue;const u=c*SPAN2,d=s[u+HIGH2],p=s[u+LOW2];this.handleDatumPoint(e,i,d,e.yHighValues[d],e.yLowValues[p])}}}finalizeNodeData(e){e.canIncrementallyUpdate&&e.nodeIndex<e.nodes.length&&(e.nodes.length=e.nodeIndex)}initializeResult(e){return{itemId:`${e.yLowKey}-${e.yHighKey}`,labelData:e.labelData,nodeData:e.nodes,fillData:{itemType:"high",spans:[],phantomSpans:[]},highStrokeData:{itemType:"high",spans:[]},lowStrokeData:{itemType:"low",spans:[]},scales:this.calculateScaling(),visible:this.visible,styles:{low:this.getLowOrHighMarkerStyles("low"),high:this.getLowOrHighMarkerStyles("high")},segments:void 0,intersectionSegments:void 0}}assembleResult(e,t){const i=this.axes[import_ag_charts_core141.ChartAxisDirection.X],o=this.axes[import_ag_charts_core141.ChartAxisDirection.Y];if(!i||!o||!this.chart?.seriesRect)return t;const r=e.spanPoints.flatMap(l=>{if(!Array.isArray(l))return[];const c=l.map(h=>h.high);return interpolatePoints(c,e.interpolation)}),s=e.spanPoints.flatMap(l=>{if(!Array.isArray(l))return[];const c=l.map(h=>h.low);return interpolatePoints(c,e.interpolation)}),a=calculateSegments2(this.properties.segmentation,i,o,this.chart.seriesRect,this.ctx.scene,!1);let n;if(this.properties.invertedStyle.enabled){const l=e.yHighValues[0]<e.yLowValues[0],c=findRangeAreaIntersections(r,s,e.xScale.range[0],e.xScale.range[1],l);n=calculateIntersectionSegments(c,this.chart.seriesRect,this.ctx.scene,l,this.properties.invertedStyle)}return t.fillData={itemType:"high",spans:r,phantomSpans:s},t.highStrokeData={itemType:"high",spans:r},t.lowStrokeData={itemType:"low",spans:s},t.segments=a,t.intersectionSegments=n,t}getLowOrHighMarkerStyles(e){const{fill:t,fillOpacity:i,item:o}=this.properties,r=o[e],{stroke:s,strokeWidth:a,strokeOpacity:n}=r,l={fill:t,fillOpacity:i,stroke:s,strokeWidth:a,strokeOpacity:n};return getMarkerStyles(this,r,r.marker,l)}createLabelData({datumIndex:e,point:t,value:i,itemType:o,inverted:r,datum:s,series:a}){const{xKey:n,yLowKey:l,yHighKey:c,xName:h,yName:u,yLowName:d,yHighName:p,legendItemName:g,label:y}=this.properties,{placement:x}=y,f=y.spacing+(typeof y.padding=="number"?y.padding:0);let S=o;r&&(S=o==="low"?"high":"low");const m=x==="outside"&&S==="high"||x==="inside"&&S==="low"?-1:1,v=this.getSeriesDomain(import_ag_charts_core141.ChartAxisDirection.Y).domain;return{x:t.x,y:t.y+f*m,series:a,itemType:o,datum:s,datumIndex:e,text:this.getLabelText(i,s,o==="high"?c:l,"y",v,y,{value:i,datum:s,itemType:o,xKey:n,yLowKey:l,yHighKey:c,xName:h,yLowName:d,yHighName:p,yName:u,legendItemName:g}),textAlign:"center",textBaseline:m===-1?"bottom":"top"}}isPathOrSelectionDirty(){const{low:e,high:t}=this.properties.item;return e.marker.isDirty()||t.marker.isDirty()}strokewidthChange(){const e=t=>{const i=this.properties.item[t].strokeWidth??0,o=this.properties.highlight.highlightedSeries.item?.[t]?.strokeWidth??i,r=this.properties.highlight.highlightedItem.item?.[t]?.strokeWidth??i;return i>r||o>r};return e("low")||e("high")}updatePathNodes(e){const{visible:t}=e,[i,o,r]=e.paths,s=this.contextNodeData?.segments,a=this.ctx.highlightManager?.getActiveHighlight(),n=this.getHighlightState(a,!1),l=this.getHighlightStyle(),{item:c,fill:h,fillOpacity:u,opacity:d}=(0,import_ag_charts_core141.mergeDefaults)(l,this.getStyle(n));o.setProperties({datum:s,segments:s,fill:void 0,lineCap:"round",lineJoin:"round",pointerEvents:PointerEvents2.None,stroke:c.low.stroke,strokeWidth:c.low.strokeWidth,strokeOpacity:c.low.strokeOpacity,lineDash:c.low.lineDash,lineDashOffset:c.low.lineDashOffset,opacity:d,visible:t}),r.setProperties({segments:s,fill:void 0,lineCap:"round",lineJoin:"round",pointerEvents:PointerEvents2.None,stroke:c.high.stroke,strokeWidth:c.high.strokeWidth,strokeOpacity:c.high.strokeOpacity,lineDash:c.high.lineDash,lineDashOffset:c.high.lineDashOffset,opacity:d,visible:t});const p=this.getShapeFillBBox();i.setFillProperties(h,p),i.setStyleProperties({stroke:void 0,fill:h,fillOpacity:u,opacity:d},p);const g=this.contextNodeData?.intersectionSegments??s;i.setProperties({segments:g,pointerEvents:PointerEvents2.None,lineJoin:"round",fillShadow:this.properties.shadow,opacity:d,visible:t}),i.datum=g,updateClipPath(this,i),updateClipPath(this,o),updateClipPath(this,r)}updatePaths(e){this.updateAreaPaths(e.paths,e.contextData)}updateAreaPaths(e,t){for(const i of e)i.visible=t.visible;if(t.visible)this.updateFillPath(e,t),this.updateStrokePath(e,t);else for(const i of e)i.path.clear(),i.markDirty("RangeArea")}updateFillPath(e,t){const[i]=e;i.path.clear(),plotAreaPathFill(i,t.fillData),i.markDirty("RangeArea")}updateStrokePath(e,t){const[,i,o]=e;i.path.clear(),o.path.clear(),plotLinePathStroke(i,t.lowStrokeData.spans),plotLinePathStroke(o,t.highStrokeData.spans),i.markDirty("RangeArea"),o.markDirty("RangeArea")}resetDatumAnimation(e){resetMarkerSelectionsDirect([e.datumSelection])}updateDatumSelection(e){const{nodeData:t,datumSelection:i}=e,{processedData:o,axes:r,properties:s}=this,a=s.styler?this.getStylerMarkerOptions().item:s.item,{low:n,high:l}=a,c=markerEnabled(o.input.count,r[import_ag_charts_core141.ChartAxisDirection.X].scale,{enabled:n.marker.enabled||l.marker.enabled});(s.item.low.marker.isDirty()||s.item.high.marker.isDirty())&&(i.clear(),i.cleanup());let h;if(c)if(n.marker.enabled&&l.marker.enabled)h=t;else{h=[];for(const u of t)a[u.itemType].marker.enabled&&h.push(u)}else h=[];return processedDataIsAnimatable3(this.processedData)?i.update(h,void 0,u=>createDatumId4(u.xValue,u.itemType)):i.update(h)}updateDatumStyles({datumSelection:e,isHighlight:t}){const i=this.ctx.highlightManager.getActiveHighlight();e.each((o,r)=>{const s=this.getHighlightState(i,t,r.datumIndex),a=this.getStyle(s),{fill:n,fillOpacity:l,item:c}=a,{stroke:h,strokeWidth:u,strokeOpacity:d}=c[r.itemType],{marker:p}=this.properties.item[r.itemType],g=this.makeItemStylerParams(r.itemType);r.style=this.getMarkerStyle(p,r,g,{isHighlight:t,highlightState:s,resolveMarkerSubPath:["item",r.itemType,"marker"]},a.item[r.itemType].marker,{fill:n,fillOpacity:l,stroke:h,strokeWidth:u,strokeOpacity:d})})}updateDatumNodes(e){const{contextNodeData:t}=this;if(!t)return;const{datumSelection:i,isHighlight:o}=e,r=this.getShapeFillBBox(),s=this.ctx.highlightManager.getActiveHighlight(),a=this.getDrawingMode(o,e.drawingMode);i.each((n,l)=>{const{itemType:c}=l,h=l.style??t.styles[c][this.getHighlightState(s,o,l.datumIndex)];this.applyMarkerStyle(h,n,l.point,r),n.drawingMode=a}),o||(this.properties.item.low.marker.markClean(),this.properties.item.high.marker.markClean())}updateLabelSelection(e){const{labelData:t,labelSelection:i}=e;return i.update(t,o=>{o.pointerEvents=PointerEvents2.None})}updateLabelNodes(e){const t={xKey:this.properties.xKey,xName:this.properties.xName??this.properties.xKey,yName:this.properties.yName,yLowKey:this.properties.yLowKey,yLowName:this.properties.yLowName??this.properties.yLowKey,yHighKey:this.properties.yHighKey,yHighName:this.properties.yHighName??this.properties.yHighKey,legendItemName:this.properties.legendItemName},i=this.ctx.highlightManager?.getActiveHighlight(),{isHighlight:o=!1,labelSelection:r}=e;r.each((s,a)=>{s.fillOpacity=this.getHighlightStyle(o,a.datumIndex).opacity??1,updateLabelNode2(this,s,t,this.properties.label,a,o,i)})}getHighlightLabelData(e,t){return e?.length?e.filter(i=>i.datum===t.datum):[]}getHighlightData(e,t){const i=e.filter(o=>o.datum===t.datum).map(o=>({...o}));return i.length>0?i:void 0}getStyle(e){return this.getStylerCouple(e)[0]}getStylerMarkerOptions(){return this.getStylerCouple()[1]}getStylerCouple(e){const{fill:t,fillOpacity:i,item:o,styler:r}=this.properties;let s={};if(r){const c=this.makeStylerParams(e);s=this.ctx.optionsGraphService.resolvePartial(["series",`${this.declarationOrder}`],this.cachedCallWithContext(r,c)??{},{pick:!1})??{}}const a={item:{low:{marker:{enabled:!1}},high:{marker:{enabled:!1}}}},n=c=>{const h=s.item?.[c],{lineDash:u,lineDashOffset:d,marker:p,stroke:g,strokeOpacity:y,strokeWidth:x}=o[c];return a.item[c].marker.enabled=h?.marker?.enabled??p.enabled,{marker:{fill:h?.marker?.fill??p.fill??t,fillOpacity:h?.marker?.fillOpacity??p.fillOpacity,shape:h?.marker?.shape??p.shape,size:h?.marker?.size??p.size,lineDash:h?.marker?.lineDash??p.lineDash,lineDashOffset:h?.marker?.lineDashOffset??p.lineDashOffset,stroke:h?.marker?.stroke??p.stroke??g,strokeOpacity:h?.marker?.strokeOpacity??p.strokeOpacity,strokeWidth:h?.marker?.strokeWidth??p.strokeWidth},lineDash:h?.lineDash??u,lineDashOffset:h?.lineDashOffset??d,stroke:h?.stroke??g,strokeOpacity:h?.strokeOpacity??y,strokeWidth:h?.strokeWidth??x}};return[{fill:s.fill??t,fillOpacity:s.fillOpacity??i,opacity:1,topLevel:{lineDash:this.properties.lineDash,lineDashOffset:this.properties.lineDashOffset,marker:this.properties.marker,stroke:this.properties.stroke,strokeOpacity:this.properties.strokeOpacity,strokeWidth:this.properties.strokeWidth},item:{low:n("low"),high:n("high")}},a]}makeStylerParams(e){const{id:t}=this,{fill:i,fillOpacity:o,item:r,xKey:s,yHighKey:a,yLowKey:n}=this.properties,l=toHighlightString2(e??HighlightState2.None),c=h=>{const{lineDash:u,lineDashOffset:d,marker:p,stroke:g,strokeOpacity:y,strokeWidth:x}=r[h];return{marker:{fill:p.fill??i,fillOpacity:p.fillOpacity,size:p.size,shape:p.shape,stroke:p.stroke??g,strokeOpacity:p.strokeOpacity,strokeWidth:p.strokeWidth,lineDash:p.lineDash,lineDashOffset:p.lineDashOffset},lineDash:u,lineDashOffset:d,stroke:g,strokeOpacity:y,strokeWidth:x}};return{item:{low:c("low"),high:c("high")},fill:i,fillOpacity:o,highlightState:l,seriesId:t,xKey:s,yLowKey:n,yHighKey:a}}makeItemStylerParams(e){const{xKey:t,yLowKey:i,yHighKey:o}=this.properties;return{xKey:t,yLowKey:i,yHighKey:o,itemType:e}}getTooltipContent(e,t){const i=t?.itemType??"high",{id:o,dataModel:r,processedData:s,axes:a,properties:n}=this,{xName:l,yName:c,yLowKey:h,yLowName:u,xKey:d,yHighKey:p,yHighName:g,tooltip:y,legendItemName:x}=n,f=a[import_ag_charts_core141.ChartAxisDirection.X],S=a[import_ag_charts_core141.ChartAxisDirection.Y];if(!r||!s||!f||!S)return;const m=s.dataSources.get(this.id)?.data[e],v=r.resolveKeysById(this,"xValue",s)[e],b=r.resolveColumnById(this,"yHighValue",s)[e],D=r.resolveColumnById(this,"yLowValue",s)[e],k=this.properties.allowNullKeys??!1;if(v===void 0&&!k)return;const A=this.getStyle(),M=this.makeItemStylerParams(i),I=this.getMarkerStyle(this.properties.item[i].marker,{datumIndex:e,datum:m},M,{isHighlight:!1,resolveMarkerSubPath:["item",i,"marker"]},A.item[i].marker),_=`${this.getAxisValueText(S,"tooltip",D,m,h,x)} - ${this.getAxisValueText(S,"tooltip",b,m,p,x)}`;return this.formatTooltipWithContext(y,{heading:this.getAxisValueText(f,"tooltip",v,m,d,x),symbol:this.legendItemSymbol(),data:[{label:c,fallbackLabel:`${u??h} - ${g??p}`,value:_,missing:import_ag_charts_community121._ModuleSupport.isTooltipValueMissing(b)&&import_ag_charts_community121._ModuleSupport.isTooltipValueMissing(D)}]},{seriesId:o,datum:m,title:c,itemType:i,xName:l,yName:c,yLowKey:h,yLowName:u,xKey:d,yHighKey:p,yHighName:g,legendItemName:x,...I})}legendItemSymbol(){const{fill:e,topLevel:t}=this.getStyle(),{stroke:i,strokeWidth:o,strokeOpacity:r,lineDash:s,marker:a}=t;return{marker:{shape:a.shape,fill:a.fill??e,stroke:a.stroke??i,fillOpacity:a.fillOpacity,strokeOpacity:a.strokeOpacity,strokeWidth:a.strokeWidth,lineDash:a.lineDash,lineDashOffset:a.lineDashOffset},line:{enabled:!0,stroke:i,strokeOpacity:r,strokeWidth:o,lineDash:s}}}getLegendData(e){if(e!=="category")return[];const{id:t,visible:i}=this,{yLowKey:o,yHighKey:r,yName:s,yLowName:a,yHighName:n,legendItemName:l,showInLegend:c}=this.properties,h=l??s??`${a??o} - ${n??r}`,u=`${o}-${r}`;return[{legendType:"category",id:t,itemId:u,seriesId:t,enabled:i,label:{text:`${h}`},symbol:this.legendItemSymbol(),legendItemName:l,hideInLegend:!c}]}isLabelEnabled(){return this.properties.label.enabled}nodeFactory(){return new Marker}animateEmptyUpdateReady(e){const{datumSelection:t,labelSelection:i,contextData:o,paths:r}=e,{animationManager:s}=this.ctx;this.updateAreaPaths(r,o),pathSwipeInAnimation(this,s,...r),resetMotion([t],resetMarkerPositionFn),markerSwipeScaleInAnimation(this,s,{...this.getAnimationDrawingModes(),phase:"initial"},t),seriesLabelFadeInAnimation(this,"labels",s,i,this.highlightLabelSelection)}animateReadyResize(e){const{contextData:t,paths:i}=e;this.updateAreaPaths(i,t),super.animateReadyResize(e)}animateWaitingUpdateReady(e){const{animationManager:t}=this.ctx,{datumSelection:i,labelSelection:o,contextData:r,paths:s,previousContextData:a}=e,[n,l,c]=s;if(n==null&&l==null&&c==null)return;this.resetDatumAnimation(e),this.resetLabelAnimation(e);const h=()=>{this.resetPathAnimation(e),this.updateAreaPaths(s,r)},u=()=>{t.skipCurrentBatch(),h()};if(r==null||a==null){h(),markerFadeInAnimation(this,t,"added",this.getAnimationDrawingModes(),i),pathFadeInAnimation(this,"fill_path_properties",t,"add",n),pathFadeInAnimation(this,"low_stroke_path_properties",t,"add",l),pathFadeInAnimation(this,"high_stroke_path_properties",t,"add",c),seriesLabelFadeInAnimation(this,"labels",t,o,this.highlightLabelSelection);return}const d=prepareRangeAreaPathAnimation(r,a,this.processedData?.reduced?.diff?.[this.id]);if(d===void 0){u();return}else if(d.status==="no-op")return;fromToMotion(this.id,"fill_path_properties",t,[n],d.fill.pathProperties),fromToMotion(this.id,"low_stroke_path_properties",t,[l],d.stroke.pathProperties),fromToMotion(this.id,"high_stroke_path_properties",t,[c],d.stroke.pathProperties),d.status==="added"?this.updateAreaPaths(s,r):d.status==="removed"?this.updateAreaPaths(s,a):(pathMotion(this.id,"fill_path_update",t,[n],d.fill.path),pathMotion(this.id,"low_stroke_path_update",t,[l],d.stroke.path),pathMotion(this.id,"high_stroke_path_update",t,[c],d.stroke.path)),d.hasMotion&&(markerFadeInAnimation(this,t,void 0,this.getAnimationDrawingModes(),i),seriesLabelFadeInAnimation(this,"labels",t,o,this.highlightLabelSelection)),this.ctx.animationManager.animate({id:this.id,groupId:"reset_after_animation",phase:"trailing",from:{},to:{},onComplete:()=>this.updateAreaPaths(s,r)})}getFormattedMarkerStyle(e){const t=this.getStyle(),i=this.makeItemStylerParams(e.itemType);return this.getMarkerStyle(this.properties.item[e.itemType].marker,e,i,{isHighlight:!0,resolveMarkerSubPath:["item",e.itemType,"marker"]},void 0,t)}getMarkerStyle(e,t,i,o,r,s){return e.itemStyler=this.properties.marker.itemStyler,super.getMarkerStyle(e,t,i,o,r,s)}computeFocusBounds(e){const t=computeMarkerFocusBounds(this,e),i=computeMarkerFocusBounds(this,{...e,datumIndex:e.datumIndex+1});if(t&&i)return BBox13.merge([t,i])}isDatumEnabled(e,t){return t%2===0&&super.isDatumEnabled(e,t)}hasItemStylers(){return this.properties.styler!=null||this.properties.marker.itemStyler!=null||this.properties.label.itemStyler!=null}};RangeAreaSeries.className="RangeAreaSeries",RangeAreaSeries.type="range-area";var import_ag_charts_community122=require("ag-charts-community"),import_ag_charts_core142=require("ag-charts-core"),{rangeAreaSeriesThemeableOptionsDef}=import_ag_charts_community122._ModuleSupport,rangeAreaSeriesOptionsDef={...import_ag_charts_core142.commonSeriesOptionsDefs,...rangeAreaSeriesThemeableOptionsDef,type:(0,import_ag_charts_core142.required)((0,import_ag_charts_core142.constant)("range-area")),xKey:(0,import_ag_charts_core142.required)(import_ag_charts_core142.string),yLowKey:(0,import_ag_charts_core142.required)(import_ag_charts_core142.string),yHighKey:(0,import_ag_charts_core142.required)(import_ag_charts_core142.string),xKeyAxis:import_ag_charts_core142.string,yKeyAxis:import_ag_charts_core142.string,xName:import_ag_charts_core142.string,yName:import_ag_charts_core142.string,yLowName:import_ag_charts_core142.string,yHighName:import_ag_charts_core142.string,legendItemName:import_ag_charts_core142.string,segmentation:import_ag_charts_core142.shapeSegmentation,invertedStyle:{enabled:import_ag_charts_core142.boolean,...import_ag_charts_core142.fillOptionsDef}};rangeAreaSeriesOptionsDef.pickOutsideVisibleMinorAxis=(0,import_ag_charts_core142.undocumented)(import_ag_charts_core142.boolean),rangeAreaSeriesOptionsDef.focusPriority=(0,import_ag_charts_core142.undocumented)(import_ag_charts_core142.number);var import_ag_charts_community123=require("ag-charts-community"),import_ag_charts_core143=require("ag-charts-core"),RANGE_AREA_ITEM={lineDash:{$path:"/series/$index/lineDash"},lineDashOffset:{$path:"/series/$index/lineDashOffset"},stroke:{$path:["/series/$index/stroke",{$palette:"stroke"}]},strokeOpacity:{$path:"/series/$index/strokeOpacity"},strokeWidth:{$path:["/series/$index/strokeWidth",1]},marker:{enabled:{$path:"/series/$index/marker/enabled"},fill:{$isUserOption:["/series/$index/marker/fill",{$if:[{$or:[{$isGradient:{$path:"/series/$index/marker/fill"}},{$isImage:{$path:"/series/$index/marker/fill"}},{$isPattern:{$path:"/series/$index/marker/fill"}}]},{$merge:[{$path:"/series/$index/marker/fill"},{$applySwitch:[{$path:"type"},void 0,["gradient",import_ag_charts_core143.FILL_GRADIENT_RADIAL_REVERSED_DEFAULTS],["image",import_ag_charts_core143.FILL_IMAGE_DEFAULTS],["pattern",import_ag_charts_core143.FILL_PATTERN_DEFAULTS]]}]},{$isUserOption:["/series/$index/marker/fill",{$path:"/series/$index/marker/fill"},{$palette:"fill"}]}]},{$applySwitch:[{$path:"type"},{$palette:"fill"},["gradient",import_ag_charts_core143.FILL_GRADIENT_RADIAL_REVERSED_DEFAULTS],["image",import_ag_charts_core143.FILL_IMAGE_DEFAULTS],["pattern",import_ag_charts_core143.FILL_PATTERN_DEFAULTS]]}]},fillOpacity:{$path:"/series/$index/marker/fillOpacity"},lineDash:{$path:"/series/$index/marker/lineDash"},lineDashOffset:{$path:"/series/$index/marker/lineDashOffset"},shape:{$path:"/series/$index/marker/shape"},size:{$path:["/series/$index/marker/size",6]},stroke:{$path:["/series/$index/marker/stroke",{$palette:"stroke"}]},strokeOpacity:{$path:"/series/$index/marker/strokeOpacity"},strokeWidth:{$path:["/series/$index/marker/strokeWidth",2]}}},RANGE_AREA_SERIES_THEME={series:{fill:{$applySwitch:[{$path:"type"},{$palette:"fill"},["gradient",import_ag_charts_core143.FILL_GRADIENT_LINEAR_DEFAULTS],["pattern",import_ag_charts_core143.FILL_PATTERN_DEFAULTS]]},fillOpacity:.7,stroke:{$palette:"stroke"},strokeWidth:1,marker:{enabled:!1,fill:{$applySwitch:[{$path:"type"},{$palette:"fill"},["gradient",import_ag_charts_core143.FILL_GRADIENT_RADIAL_REVERSED_DEFAULTS],["image",import_ag_charts_core143.FILL_IMAGE_DEFAULTS],["pattern",import_ag_charts_core143.FILL_PATTERN_DEFAULTS]]},shape:"circle",stroke:{$palette:"stroke"},size:6,strokeWidth:2},nodeClickRange:"nearest",item:{low:RANGE_AREA_ITEM,high:RANGE_AREA_ITEM},label:{...import_ag_charts_core143.LABEL_BOXING_DEFAULTS,enabled:!1,placement:"outside",padding:{$isUserOption:["./spacing",0,10]},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}},interpolation:{type:"linear"},tooltip:{range:{$path:["/tooltip/range","nearest"]}},highlight:import_ag_charts_core143.MARKER_SERIES_HIGHLIGHT_STYLE,segmentation:import_ag_charts_core143.SEGMENTATION_DEFAULTS,invertedStyle:{enabled:!1,fill:{$applySwitch:[{$path:"type"},{$palette:"fill"},["gradient",import_ag_charts_core143.FILL_GRADIENT_LINEAR_DEFAULTS],["image",import_ag_charts_core143.FILL_IMAGE_DEFAULTS],["pattern",import_ag_charts_core143.FILL_PATTERN_DEFAULTS]]},fillOpacity:{$path:"../fillOpacity"}}},axes:{[import_ag_charts_core143.CARTESIAN_AXIS_TYPE.NUMBER]:{crosshair:{enabled:!0}}}},{predictCartesianNonPrimitiveAxis:predictCartesianNonPrimitiveAxis2}=import_ag_charts_community124._ModuleSupport,RangeAreaSeriesModule={type:"series",name:"range-area",chartType:"cartesian",enterprise:!0,version:import_ag_charts_community124.VERSION,dependencies:[import_ag_charts_community124.CartesianChartModule],options:rangeAreaSeriesOptionsDef,matchingKeys:["xKey","yLowKey","yHighKey","normalizedTo"],predictAxis:predictCartesianNonPrimitiveAxis2,defaultAxes:{y:{type:import_ag_charts_core144.CARTESIAN_AXIS_TYPE.NUMBER,position:import_ag_charts_core144.CARTESIAN_POSITION.LEFT},x:{type:import_ag_charts_core144.CARTESIAN_AXIS_TYPE.CATEGORY,position:import_ag_charts_core144.CARTESIAN_POSITION.BOTTOM}},axisKeys:{[import_ag_charts_core144.ChartAxisDirection.X]:"xKeyAxis",[import_ag_charts_core144.ChartAxisDirection.Y]:"yKeyAxis"},themeTemplate:RANGE_AREA_SERIES_THEME,create:e=>new RangeAreaSeries(e)},import_ag_charts_community130=require("ag-charts-community"),import_ag_charts_core150=require("ag-charts-core"),import_ag_charts_community127=require("ag-charts-community"),import_ag_charts_core147=require("ag-charts-core"),import_ag_charts_community125=require("ag-charts-community"),import_ag_charts_core145=require("ag-charts-core");function aggregateRangeBarData(e,t,i,o,r,s,a,n){const[l,c]=(0,import_ag_charts_core145.aggregationDomain)(e,r);return(0,import_ag_charts_core145.computeExtremesAggregation)([l,c],t,i,o,{smallestKeyInterval:s,xNeedsValueOf:a,yNeedsValueOf:n})}var memoizedAggregateRangeBarData=(0,import_ag_charts_core145.simpleMemorize2)(aggregateRangeBarData);function aggregateRangeBarDataFromDataModel(e,t,i,o,r){const s=t.resolveKeysById(o,"xValue",i),a=t.resolveColumnById(o,"yHighValue",i),n=t.resolveColumnById(o,"yLowValue",i),l=t.getDomain(o,"xValue","key",i),c=t.resolveColumnNeedsValueOf(o,"xValue",i),h=t.resolveColumnNeedsValueOf(o,"yHighValue",i)??t.resolveColumnNeedsValueOf(o,"yLowValue",i);if(r){const[u,d]=(0,import_ag_charts_core145.aggregationDomain)(e,l);return(0,import_ag_charts_core145.computeExtremesAggregation)([u,d],s,a,n,{smallestKeyInterval:i.reduced?.smallestKeyInterval,xNeedsValueOf:c,yNeedsValueOf:h,existingFilters:r})}return memoizedAggregateRangeBarData(e,s,a,n,l,i.reduced?.smallestKeyInterval,c,h)}function aggregateRangeBarDataFromDataModelPartial(e,t,i,o,r,s){const a=t.resolveKeysById(o,"xValue",i),n=t.resolveColumnById(o,"yHighValue",i),l=t.resolveColumnById(o,"yLowValue",i),c=t.getDomain(o,"xValue","key",i),h=t.resolveColumnNeedsValueOf(o,"xValue",i),u=t.resolveColumnNeedsValueOf(o,"yHighValue",i)??t.resolveColumnNeedsValueOf(o,"yLowValue",i),[d,p]=(0,import_ag_charts_core145.aggregationDomain)(e,c);return(0,import_ag_charts_core145.computeExtremesAggregationPartial)([d,p],a,n,l,{smallestKeyInterval:i.reduced?.smallestKeyInterval,targetRange:r,xNeedsValueOf:h,yNeedsValueOf:u,existingFilters:s})}var import_ag_charts_community126=require("ag-charts-community"),import_ag_charts_core146=require("ag-charts-core"),{AbstractBarSeriesProperties:AbstractBarSeriesProperties3,makeSeriesTooltip:makeSeriesTooltip6,DropShadow:DropShadow2,Label:Label3}=import_ag_charts_community126._ModuleSupport,RangeBarSeriesLabel=class extends Label3{constructor(){super(...arguments),this.placement="inside",this.spacing=0}};__decorateClass([import_ag_charts_core146.Property],RangeBarSeriesLabel.prototype,"placement",2),__decorateClass([import_ag_charts_core146.Property],RangeBarSeriesLabel.prototype,"spacing",2);var RangeBarProperties=class extends AbstractBarSeriesProperties3{constructor(){super(...arguments),this.fill="#99CCFF",this.fillOpacity=1,this.stroke="#99CCFF",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.shadow=new DropShadow2().set({enabled:!1}),this.label=new RangeBarSeriesLabel,this.tooltip=makeSeriesTooltip6()}};__decorateClass([import_ag_charts_core146.Property],RangeBarProperties.prototype,"xKey",2),__decorateClass([import_ag_charts_core146.Property],RangeBarProperties.prototype,"yLowKey",2),__decorateClass([import_ag_charts_core146.Property],RangeBarProperties.prototype,"yHighKey",2),__decorateClass([import_ag_charts_core146.Property],RangeBarProperties.prototype,"xName",2),__decorateClass([import_ag_charts_core146.Property],RangeBarProperties.prototype,"yName",2),__decorateClass([import_ag_charts_core146.Property],RangeBarProperties.prototype,"yLowName",2),__decorateClass([import_ag_charts_core146.Property],RangeBarProperties.prototype,"yHighName",2),__decorateClass([import_ag_charts_core146.Property],RangeBarProperties.prototype,"fill",2),__decorateClass([import_ag_charts_core146.Property],RangeBarProperties.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core146.Property],RangeBarProperties.prototype,"stroke",2),__decorateClass([import_ag_charts_core146.Property],RangeBarProperties.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core146.Property],RangeBarProperties.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core146.Property],RangeBarProperties.prototype,"lineDash",2),__decorateClass([import_ag_charts_core146.Property],RangeBarProperties.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core146.Property],RangeBarProperties.prototype,"cornerRadius",2),__decorateClass([import_ag_charts_core146.Property],RangeBarProperties.prototype,"styler",2),__decorateClass([import_ag_charts_core146.Property],RangeBarProperties.prototype,"itemStyler",2),__decorateClass([import_ag_charts_core146.Property],RangeBarProperties.prototype,"shadow",2),__decorateClass([import_ag_charts_core146.Property],RangeBarProperties.prototype,"label",2),__decorateClass([import_ag_charts_core146.Property],RangeBarProperties.prototype,"tooltip",2);var{SeriesNodePickMode:SeriesNodePickMode4,valueProperty:valueProperty7,keyProperty:keyProperty5,checkCrisp,updateLabelNode:updateLabelNode3,SMALLEST_KEY_INTERVAL:SMALLEST_KEY_INTERVAL3,LARGEST_KEY_INTERVAL,diff:diff4,prepareBarAnimationFunctions,midpointStartingBarPosition,resetBarSelectionsFn,resetBarSelectionsDirect,fixNumericExtent:fixNumericExtent5,seriesLabelFadeInAnimation:seriesLabelFadeInAnimation2,resetLabelFn:resetLabelFn2,animationValidation:animationValidation4,computeBarFocusBounds:computeBarFocusBounds4,visibleRangeIndices:visibleRangeIndices3,createDatumId:createDatumId5,Rect:Rect2,PointerEvents:PointerEvents3,motion:motion2,processedDataIsAnimatable:processedDataIsAnimatable4,getItemStyles:getItemStyles2,calculateSegments:calculateSegments3,toHighlightString:toHighlightString3,HighlightState:HighlightState3,AggregationManager:AggregationManager3,upsertNodeDatum:upsertNodeDatum3}=import_ag_charts_community127._ModuleSupport,RangeBarSeriesNodeEvent=class extends import_ag_charts_community127._ModuleSupport.SeriesNodeEvent{constructor(e,t,i,o){super(e,t,i,o),this.xKey=o.properties.xKey,this.yLowKey=o.properties.yLowKey,this.yHighKey=o.properties.yHighKey}},RangeBarSeries=class extends import_ag_charts_community127._ModuleSupport.AbstractBarSeries{constructor(e){super({moduleCtx:e,pickModes:[SeriesNodePickMode4.AXIS_ALIGNED,SeriesNodePickMode4.EXACT_SHAPE_MATCH],propertyKeys:{x:["xKey"],y:["yLowKey","yHighKey"]},propertyNames:{x:["xName"],y:["yLowName","yHighName","yName"]},categoryKey:"xValue",datumSelectionGarbageCollection:!1,animationResetFns:{datum:resetBarSelectionsFn,label:resetLabelFn2}}),this.properties=new RangeBarProperties,this.aggregationManager=new AggregationManager3,this.NodeEvent=RangeBarSeriesNodeEvent}async processData(e){const{xKey:t,yLowKey:i,yHighKey:o}=this.properties,r=this.getCategoryAxis()?.scale,s=this.getValueAxis()?.scale,{isContinuousX:a,xScaleType:n,yScaleType:l}=this.getScaleInformation({xScale:r,yScale:s}),c=[];this.needsDataModelDiff()&&this.processedData&&c.push(diff4(this.id,this.processedData)),this.ctx.animationManager.isSkipped()||c.push(animationValidation4());const h=this.visible?{}:{forceValue:0},u=this.properties.allowNullKeys??!1,{dataModel:d,processedData:p}=await this.requestDataModel(e,this.data,{props:[keyProperty5(t,n,{id:"xValue",allowNullKey:u}),valueProperty7(i,l,{id:"yLowValue",invalidValue:null,...h}),valueProperty7(o,l,{id:"yHighValue",invalidValue:null,...h}),...a?[SMALLEST_KEY_INTERVAL3,LARGEST_KEY_INTERVAL]:[],...c],groupByKeys:!1});this.smallestDataInterval=p.reduced?.smallestKeyInterval,this.largestDataInterval=p.reduced?.largestKeyInterval,this.aggregateData(d,p),this.animationState.transition("updateData")}aggregateData(e,t){if(this.aggregationManager.markStale(t.input.count),t.type!=="ungrouped"||processedDataIsAnimatable4(t))return;const i=this.axes[import_ag_charts_core147.ChartAxisDirection.X];if(i==null)return;const o=this.estimateTargetRange();this.aggregationManager.aggregate({computePartial:s=>aggregateRangeBarDataFromDataModelPartial(i.scale.type,e,t,this,o,s),computeFull:s=>aggregateRangeBarDataFromDataModel(i.scale.type,e,t,this,s),targetRange:o});const r=this.aggregationManager.filters;r&&r.length>0&&import_ag_charts_core147.DebugMetrics.record(`${this.type}:aggregation`,r.map(s=>s.maxRange))}estimateTargetRange(){const e=this.axes[import_ag_charts_core147.ChartAxisDirection.X];if(e?.scale==null)return 0;const[t,i]=e.scale.range;return Math.abs(i-t)}getSeriesDomain(e){const{processedData:t,dataModel:i}=this;if(!t||!i)return{domain:[]};const{keys:[o]}=t.domain;if(e===this.getCategoryDirection()){const r=i.resolveProcessedDataDefById(this,"xValue");if(r?.def.type==="key"&&r?.def.valueType==="category"){const s=i.getKeySortMetadata(this,"xValue",t);return{domain:o,sortMetadata:s}}return{domain:this.padBandExtent(o)}}else{const r=this.domainForClippedRange(e,["yHighValue","yLowValue"],"xValue"),s=(0,import_ag_charts_core147.findMinMax)(r);return{domain:fixNumericExtent5(s)}}}getSeriesRange(e,t){return this.domainForVisibleRange(import_ag_charts_core147.ChartAxisDirection.Y,["yHighValue","yLowValue"],"xValue",t)}createNodeDatumContext(e,t){const{dataModel:i,processedData:o}=this;if(!i||!o)return;const r=o.dataSources?.get(this.id)?.data;if(r==null)return;const s=e.scale,a=t.scale,n=this.getBarDirection()===import_ag_charts_core147.ChartAxisDirection.X,l=checkCrisp(e?.scale,e?.visibleRange,this.smallestDataInterval,this.largestDataInterval),[c,h]=s.range,u=Math.abs(h-c);this.aggregationManager.ensureLevelForRange(u);const d=this.aggregationManager.getFilterForRange(u),p=!this.ctx.animationManager.isSkipped(),g=this.contextNodeData?.nodeData!=null&&(o.changeDescription!=null||!processedDataIsAnimatable4(o)||d!=null),{groupOffset:y,barOffset:x,barWidth:f}=this.getBarDimensions();return{xAxis:e,yAxis:t,rawData:r,xValues:i.resolveKeysById(this,"xValue",o),yLowValues:i.resolveColumnById(this,"yLowValue",o),yHighValues:i.resolveColumnById(this,"yHighValue",o),xScale:s,yScale:a,groupOffset:y,barOffset:x,barWidth:f,barAlongX:n,crisp:l,dataAggregationFilter:d,animationEnabled:p,xKey:this.properties.xKey,yLowKey:this.properties.yLowKey,yHighKey:this.properties.yHighKey,labelEnabled:this.properties.label.enabled,labelPlacement:this.properties.label.placement,labelPadding:(this.properties.label.spacing+(typeof this.properties.label.padding=="number"?this.properties.label.padding:0))*(this.properties.label.placement==="outside"?1:-1),canIncrementallyUpdate:g,nodes:g?this.contextNodeData.nodeData:[],nodeIndex:0}}prepareNodeDatumState(e,t,i){const o=e.rawData[i],r=e.xValues[i];if(r===void 0&&!this.properties.allowNullKeys)return;const s=e.yLowValues[i],a=e.yHighValues[i];if(!Number.isFinite(s?.valueOf())||!Number.isFinite(a?.valueOf()))return;const[n,l]=s<a?[s,a]:[a,s];return t.datum=o,t.xValue=r,t.yLowValue=n,t.yHighValue=l,t.rawLowValue=s,t.rawHighValue=a,t}createSkeletonNodeDatum(e,t){const i=t.nodeDatumScratch;return{index:t.groupedDataIndex,series:this,datum:i.datum,datumIndex:t.datumIndex,xValue:i.xValue,yLowValue:0,yHighValue:0,yLowKey:e.yLowKey,yHighKey:e.yHighKey,xKey:e.xKey,x:0,y:0,width:0,height:0,midPoint:{x:0,y:0},crisp:t.crisp,labels:[]}}createNodeDatum(e,t,i,o){const r=this.prepareNodeDatumState(e,t.nodeDatumScratch,t.datumIndex);if(!r)return;const s=this.createSkeletonNodeDatum(e,t);return this.updateNodeDatum(e,s,t,o,r),s}updateNodeDatum(e,t,i,o,r){if(r??(r=this.prepareNodeDatumState(e,i.nodeDatumScratch,i.datumIndex)),!r)return;const s=t;s.index=i.groupedDataIndex,s.datum=r.datum,s.datumIndex=i.datumIndex,s.xValue=r.xValue,s.yLowValue=r.rawLowValue,s.yHighValue=r.rawHighValue,s.crisp=i.crisp;const a=Math.round(e.yScale.convert(i.yHigh)),n=Math.round(e.yScale.convert(i.yLow)),l=Math.max(o,Math.abs(n-a)),c={x:e.barAlongX?Math.min(a,n):i.x,y:e.barAlongX?i.x:Math.min(a,n),width:e.barAlongX?l:i.width,height:e.barAlongX?i.width:l};s.x=c.x,s.y=c.y,s.width=c.width,s.height=c.height;const h=s.midPoint;h.x=c.x+c.width/2,h.y=c.y+c.height/2;const u=s.clipBBox;u&&(u.x=c.x,u.y=c.y,u.width=c.width,u.height=c.height);const d=i.labelParamsScratch;d.labels=s.labels,d.datumIndex=i.datumIndex,d.rectX=c.x,d.rectY=c.y,d.rectWidth=c.width,d.rectHeight=c.height,d.yLowValue=r.yLowValue,d.yHighValue=r.yHighValue,d.datum=r.datum,this.updateLabelData(e,d)}createNodeDataWithAggregation(e,t,i,o,r,s){const{maxRange:a,indexData:n,midpointIndices:l}=s,[c,h]=visibleRangeIndices3(1,a,e.xAxis.range,u=>{const d=u*import_ag_charts_core147.AGGREGATION_SPAN,p=n[d+import_ag_charts_core147.AGGREGATION_INDEX_X_MAX],g=l[u];if(g!==-1)return[t(g),t(p)+e.barWidth]});for(let u=c;u<h;u+=1){const d=u*import_ag_charts_core147.AGGREGATION_SPAN,p=n[d+import_ag_charts_core147.AGGREGATION_INDEX_X_MIN],g=n[d+import_ag_charts_core147.AGGREGATION_INDEX_X_MAX],y=n[d+import_ag_charts_core147.AGGREGATION_INDEX_Y_MIN],x=n[d+import_ag_charts_core147.AGGREGATION_INDEX_Y_MAX],f=l[u];f===-1||e.xValues[f]===void 0&&!this.properties.allowNullKeys||(i.datumIndex=f,i.groupedDataIndex=0,i.x=t(f),i.width=Math.abs(t(p)-t(g))+e.barWidth,i.yLow=e.yLowValues[y],i.yHigh=e.yHighValues[x],i.crisp=!1,upsertNodeDatum3(e,i,(m,v)=>this.createNodeDatum(m,v,o,r),(m,v,b)=>this.updateNodeDatum(m,v,b,r)))}}createNodeDataSimple(e,t,i,o,r,s){const a=s.invalidData?.get(this.id);let[n,l]=this.visibleRangeIndices("xValue",e.xAxis.range);s.input.count<1e3&&(n=0,l=s.input.count);for(let c=n;c<l;c+=1)a?.[c]!==!0&&(i.datumIndex=c,i.groupedDataIndex=0,i.x=t(c),i.width=e.barWidth,i.yLow=e.yLowValues[c],i.yHigh=e.yHighValues[c],i.crisp=e.crisp,upsertNodeDatum3(e,i,(h,u)=>this.createNodeDatum(h,u,o,r),(h,u,d)=>this.updateNodeDatum(h,u,d,r)))}createNodeDataGrouped(e,t,i,o,r){const s=this.processedData;for(const{datumIndex:a,groupIndex:n}of this.dataModel.forEachGroupDatum(this,s))i.datumIndex=a,i.groupedDataIndex=n,i.x=t(a),i.width=e.barWidth,i.yLow=e.yLowValues[a],i.yHigh=e.yHighValues[a],i.crisp=e.crisp,upsertNodeDatum3(e,i,(l,c)=>this.createNodeDatum(l,c,o,r),(l,c,h)=>this.updateNodeDatum(l,c,h,r))}populateNodeData(e){const{processedData:t}=this;if(!t)return;const{yLowKey:i,yHighKey:o,strokeWidth:r}=this.properties,s=`${i}-${o}`,a=l=>{const c=e.xScale.convert(e.xValues[l]);return Number.isFinite(c)?Math.round(c)+e.groupOffset+e.barOffset:Number.NaN},n={nodeDatumScratch:{datum:void 0,xValue:void 0,yLowValue:0,yHighValue:0,rawLowValue:void 0,rawHighValue:void 0},labelParamsScratch:{labels:[],datumIndex:0,rectX:0,rectY:0,rectWidth:0,rectHeight:0,yLowValue:0,yHighValue:0,datum:void 0},datumIndex:0,groupedDataIndex:0,x:0,width:0,yLow:0,yHigh:0,crisp:!1};e.dataAggregationFilter!=null?this.createNodeDataWithAggregation(e,a,n,s,r,e.dataAggregationFilter):t.type==="ungrouped"?this.createNodeDataSimple(e,a,n,s,r,t):this.createNodeDataGrouped(e,a,n,s,r)}finalizeNodeData(e){e.canIncrementallyUpdate&&e.nodeIndex<e.nodes.length&&(e.nodes.length=e.nodeIndex)}initializeResult(e){const{yLowKey:t,yHighKey:i}=this.properties,o=`${t}-${i}`,r=this.getCategoryAxis(),s=this.getValueAxis(),a=r&&s&&this.chart?.seriesRect?calculateSegments3(this.properties.segmentation,r,s,this.chart.seriesRect,this.ctx.scene):void 0;return{itemId:o,nodeData:e.nodes,labelData:[],scales:this.calculateScaling(),groupScale:this.getScaling(this.ctx.seriesStateManager.getGroupScale(this)),visible:this.visible,styles:getItemStyles2(this.getItemStyle.bind(this)),segments:a}}assembleResult(e,t){for(const i of e.nodes)t.labelData.push(...i.labels);return t}updateLabelData(e,t){const i=t.labels;if(!e.labelEnabled){i.length>0&&(i.length=0);return}const{xKey:o,yLowKey:r,yHighKey:s,xName:a,yLowName:n,yHighName:l,yName:c,legendItemName:h,label:u}=this.properties,d=e.barAlongX,p=e.labelPlacement,g=e.labelPadding,y=t.rectX,x=t.rectY,f=t.rectWidth,S=t.rectHeight,m=y+(d?-g:f/2),v=x+(d?S/2:S+g);let b;p==="outside"?b=d?"right":"center":b=d?"left":"center";let D;p==="outside"?D=d?"middle":"top":D=d?"middle":"bottom";const k=y+(d?f+g:f/2),A=x+(d?S/2:-g);let M;p==="outside"?M=d?"left":"center":M=d?"right":"center";let I;p==="outside"?I=d?"middle":"bottom":I=d?"middle":"top";const _=t.datum,P=t.yLowValue,O=t.yHighValue,C=t.datumIndex,L={datum:_,xKey:o,yLowKey:r,yHighKey:s,xName:a,yLowName:n,yHighName:l,yName:c,legendItemName:h},E=this.getSeriesDomain(import_ag_charts_core147.ChartAxisDirection.Y).domain,V=this.getLabelText(P,_,r,"y",E,u,{itemType:"low",value:P,...L}),w=this.getLabelText(O,_,s,"y",E,u,{itemType:"high",value:O,...L});if(i.length>0&&i[0].itemType==="low"){const T=i[0];T.datumIndex=C,T.x=m,T.y=v,T.textAlign=b,T.textBaseline=D,T.text=V,T.datum=_}else i[0]={datumIndex:C,x:m,y:v,textAlign:b,textBaseline:D,text:V,itemType:"low",datum:_,series:this};if(i.length>1&&i[1].itemType==="high"){const T=i[1];T.datumIndex=C,T.x=k,T.y=A,T.textAlign=M,T.textBaseline=I,T.text=w,T.datum=_}else i[1]={datumIndex:C,x:k,y:A,textAlign:M,textBaseline:I,text:w,itemType:"high",datum:_,series:this};i.length=2}nodeFactory(){return new Rect2}getStyle(e,t){const{cornerRadius:i,fill:o,fillOpacity:r,lineDash:s,lineDashOffset:a,stroke:n,strokeOpacity:l,strokeWidth:c,styler:h}=this.properties;let u={};if(!e&&h){const d=this.makeStylerParams(t);u=this.ctx.optionsGraphService.resolvePartial(["series",`${this.declarationOrder}`],this.cachedCallWithContext(h,d)??{},{pick:!1})??{}}return{cornerRadius:u.cornerRadius??i,fill:u.fill??o,fillOpacity:u.fillOpacity??r,lineDash:u.lineDash??s,lineDashOffset:u.lineDashOffset??a,opacity:1,stroke:u.stroke??n,strokeOpacity:u.strokeOpacity??l,strokeWidth:u.strokeWidth??c}}makeStylerParams(e){const{id:t}=this,{cornerRadius:i,fill:o,fillOpacity:r,lineDash:s,lineDashOffset:a,stroke:n,strokeOpacity:l,strokeWidth:c,xKey:h,yLowKey:u,yHighKey:d}=this.properties,p=toHighlightString3(e??HighlightState3.None);return{cornerRadius:i,fill:o,fillOpacity:r,highlightState:p,lineDash:s,lineDashOffset:a,seriesId:t,stroke:n,strokeOpacity:l,strokeWidth:c,xKey:h,yLowKey:u,yHighKey:d}}updateDatumSelection(e){const{nodeData:t,datumSelection:i}=e,o=t??[];return processedDataIsAnimatable4(this.processedData)?i.update(o,void 0,r=>this.getDatumId(r)):i.update(o)}getItemStyle(e,t,i){const{properties:o,dataModel:r,processedData:s}=this,{itemStyler:a}=o,n=this.getHighlightStyle(t,e,i);let l=(0,import_ag_charts_core147.mergeDefaults)(n,this.getStyle(e===void 0,i));if(a&&r!=null&&s!=null&&e!=null){const c=r.resolveKeysById(this,"xValue",s)[e],h=this.cachedDatumCallback(createDatumId5(this.getDatumId({xValue:c}),t?"highlight":"node"),()=>{const u=this.makeItemStylerParams(e,t,l);return this.callWithContext(a,u)});h&&(l=(0,import_ag_charts_core147.mergeDefaults)(h,l))}return l}makeItemStylerParams(e,t,i){const{id:o,properties:r,processedData:s}=this,{xKey:a,yHighKey:n,yLowKey:l}=r,c=s.dataSources.get(o)?.data[e],h=this.ctx.highlightManager?.getActiveHighlight(),u=this.getHighlightStateString(h,t,e),d=this.filterItemStylerFillParams(i.fill)??i.fill;return{seriesId:o,datum:c,xKey:a,yHighKey:n,yLowKey:l,highlightState:u,...i,fill:d}}updateDatumStyles(e){const t=this.ctx.highlightManager.getActiveHighlight();e.datumSelection.each((i,o)=>{if(!e.datumSelection.isGarbage(i)){const r=this.getHighlightState(t,e.isHighlight,o.datumIndex);o.style=this.getItemStyle(o.datumIndex,e.isHighlight,r)}})}updateDatumNodes({datumSelection:e,isHighlight:t}){const{contextNodeData:i}=this;if(!i)return;const o=this.ctx.highlightManager.getActiveHighlight(),r=this.getCategoryDirection()===import_ag_charts_core147.ChartAxisDirection.X,s=this.getShapeFillBBox(),a=this;e.each(function(l,c){const h=c.style??i.styles[a.getHighlightState(o,t,c.datumIndex)];l.setStyleProperties(h,s),l.setStaticProperties("overlay",h.cornerRadius??0,h.cornerRadius??0,h.cornerRadius??0,h.cornerRadius??0,r?c.width>0:c.height>0,c.crisp,void 0)})}updateLabelSelection(e){const t=this.properties.label.enabled?e.labelData:[];return e.labelSelection.update(t,i=>{i.pointerEvents=PointerEvents3.None})}updateLabelNodes(e){const{isHighlight:t=!1}=e,i={xKey:this.properties.xKey,xName:this.properties.xName??this.properties.xKey,yName:this.properties.yName,yLowKey:this.properties.yLowKey,yLowName:this.properties.yLowName??this.properties.yLowKey,yHighKey:this.properties.yHighKey,yHighName:this.properties.yHighName??this.properties.yHighKey,legendItemName:this.properties.legendItemName},o=this.ctx.highlightManager?.getActiveHighlight();e.labelSelection.each((r,s)=>{r.fillOpacity=this.getHighlightStyle(t,s?.datumIndex).opacity??1,updateLabelNode3(this,r,i,this.properties.label,s,t,o)})}getHighlightLabelData(e,t){return t.labels?.length?t.labels:super.getHighlightLabelData(e,t)}getTooltipContent(e){const{id:t,dataModel:i,processedData:o,properties:r}=this,{xKey:s,xName:a,yName:n,yLowKey:l,yHighKey:c,yLowName:h,yHighName:u,tooltip:d,legendItemName:p}=r,g=this.getCategoryAxis(),y=this.getValueAxis();if(!i||!o||!g||!y)return;const x=o.dataSources.get(this.id)?.data[e],f=i.resolveKeysById(this,"xValue",o)[e],S=i.resolveColumnById(this,"yHighValue",o)[e],m=i.resolveColumnById(this,"yLowValue",o)[e],v=this.properties.allowNullKeys??!1;if(f===void 0&&!v)return;const b=this.getItemStyle(e,!1),D=`${this.getAxisValueText(y,"tooltip",m,x,l,p)} - ${this.getAxisValueText(y,"tooltip",S,x,c,p)}`;return this.formatTooltipWithContext(d,{heading:this.getAxisValueText(g,"tooltip",f,x,s,p),symbol:this.legendItemSymbol(),data:[{label:n,fallbackLabel:`${h??l} - ${u??c}`,value:D,missing:import_ag_charts_community127._ModuleSupport.isTooltipValueMissing(S)&&import_ag_charts_community127._ModuleSupport.isTooltipValueMissing(m)}]},{seriesId:t,datum:x,title:n,xKey:s,xName:a,yName:n,yLowKey:l,yHighKey:c,yLowName:h,yHighName:u,legendItemName:p,...b})}legendItemSymbol(){const{fill:e,stroke:t,strokeWidth:i,fillOpacity:o,strokeOpacity:r,lineDash:s,lineDashOffset:a}=this.getStyle(!1,HighlightState3.None);return{marker:{fill:e,stroke:t,fillOpacity:o,strokeOpacity:r,strokeWidth:i,lineDash:s,lineDashOffset:a}}}getLegendData(e){if(e!=="category")return[];const{id:t,visible:i}=this,{yName:o,yLowName:r,yHighName:s,yLowKey:a,yHighKey:n,legendItemName:l,showInLegend:c}=this.properties,h=l??o??`${r??a} - ${s??n}`,u=`${a}-${n}`;return[{legendType:"category",id:t,itemId:u,seriesId:t,enabled:i,label:{text:`${h}`},symbol:this.legendItemSymbol(),legendItemName:l,hideInLegend:!c}]}resetDatumAnimation(e){resetBarSelectionsDirect([e.datumSelection])}animateEmptyUpdateReady({datumSelection:e,labelSelection:t}){const i=prepareBarAnimationFunctions(midpointStartingBarPosition(this.isVertical(),"normal"),"unknown");motion2.fromToMotion(this.id,"datums",this.ctx.animationManager,[e],i),seriesLabelFadeInAnimation2(this,"labels",this.ctx.animationManager,t,this.highlightLabelSelection)}animateWaitingUpdateReady(e){const{datumSelection:t,labelSelection:i,contextData:o,previousContextData:r}=e,s=import_ag_charts_community127._ModuleSupport.calculateDataDiff(this.id,t,this.getDatumId.bind(this),o,r,this.processedData,this.processedDataUpdated);this.ctx.animationManager.stopByAnimationGroupId(this.id);const a=r==null?"fade":"normal",n=prepareBarAnimationFunctions(midpointStartingBarPosition(this.isVertical(),a),"added");motion2.fromToMotion(this.id,"datums",this.ctx.animationManager,[t],n,(l,c)=>this.getDatumId(c),s),(s?.changed||!(0,import_ag_charts_core147.areScalingEqual)(o.groupScale,r?.groupScale))&&seriesLabelFadeInAnimation2(this,"labels",this.ctx.animationManager,i,this.highlightLabelSelection)}getDatumId(e){return`${e.xValue}`}isLabelEnabled(){return this.properties.label.enabled}computeFocusBounds({datumIndex:e}){return computeBarFocusBounds4(this,this.contextNodeData?.nodeData[e])}hasItemStylers(){return this.properties.styler!=null||this.properties.itemStyler!=null||this.properties.label.itemStyler!=null}};RangeBarSeries.className="RangeBarSeries",RangeBarSeries.type="range-bar";var import_ag_charts_community128=require("ag-charts-community"),import_ag_charts_core148=require("ag-charts-core"),{rangeBarSeriesThemeableOptionsDef}=import_ag_charts_community128._ModuleSupport,rangeBarSeriesOptionsDef={...import_ag_charts_core148.commonSeriesOptionsDefs,...rangeBarSeriesThemeableOptionsDef,type:(0,import_ag_charts_core148.required)((0,import_ag_charts_core148.constant)("range-bar")),xKey:(0,import_ag_charts_core148.required)(import_ag_charts_core148.string),yLowKey:(0,import_ag_charts_core148.required)(import_ag_charts_core148.string),yHighKey:(0,import_ag_charts_core148.required)(import_ag_charts_core148.string),xKeyAxis:import_ag_charts_core148.string,yKeyAxis:import_ag_charts_core148.string,xName:import_ag_charts_core148.string,yName:import_ag_charts_core148.string,yLowName:import_ag_charts_core148.string,yHighName:import_ag_charts_core148.string,legendItemName:import_ag_charts_core148.string,segmentation:import_ag_charts_core148.shapeSegmentation,width:import_ag_charts_core148.positiveNumberNonZero,widthRatio:import_ag_charts_core148.ratio};rangeBarSeriesOptionsDef.pickOutsideVisibleMinorAxis=(0,import_ag_charts_core148.undocumented)(import_ag_charts_core148.boolean),rangeBarSeriesOptionsDef.focusPriority=(0,import_ag_charts_core148.undocumented)(import_ag_charts_core148.number);var import_ag_charts_community129=require("ag-charts-community"),import_ag_charts_core149=require("ag-charts-core"),RANGE_BAR_SERIES_THEME={series:{direction:"vertical",fill:{$applySwitch:[{$path:"type"},{$palette:"fill"},["gradient",import_ag_charts_core149.FILL_GRADIENT_LINEAR_DEFAULTS],["image",import_ag_charts_core149.FILL_IMAGE_DEFAULTS],["pattern",import_ag_charts_core149.FILL_PATTERN_DEFAULTS]]},stroke:{$palette:"stroke"},strokeWidth:{$isUserOption:["./stroke",2,0]},label:{...import_ag_charts_core149.LABEL_BOXING_DEFAULTS,enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"chartBackgroundColor"},placement:"inside",padding:{$isUserOption:["./spacing",0,6]}},highlight:import_ag_charts_core149.MULTI_SERIES_HIGHLIGHT_STYLE,segmentation:import_ag_charts_core149.SEGMENTATION_DEFAULTS},axes:{[import_ag_charts_core149.CARTESIAN_AXIS_TYPE.NUMBER]:{crosshair:{enabled:!0}}}},{predictCartesianNonPrimitiveAxis:predictCartesianNonPrimitiveAxis3}=import_ag_charts_community130._ModuleSupport,RangeBarSeriesModule={type:"series",name:"range-bar",chartType:"cartesian",enterprise:!0,groupable:!0,version:import_ag_charts_community130.VERSION,dependencies:[import_ag_charts_community130.CartesianChartModule],options:rangeBarSeriesOptionsDef,matchingKeys:["xKey","yLowKey","yHighKey","normalizedTo"],predictAxis:predictCartesianNonPrimitiveAxis3,defaultAxes:import_ag_charts_core150.DIRECTION_SWAP_AXES,axisKeys:{[import_ag_charts_core150.ChartAxisDirection.X]:"xKeyAxis",[import_ag_charts_core150.ChartAxisDirection.Y]:"yKeyAxis"},axisKeysFlipped:{[import_ag_charts_core150.ChartAxisDirection.X]:"yKeyAxis",[import_ag_charts_core150.ChartAxisDirection.Y]:"xKeyAxis"},themeTemplate:RANGE_BAR_SERIES_THEME,create:e=>new RangeBarSeries(e)},import_ag_charts_community135=require("ag-charts-community"),import_ag_charts_core155=require("ag-charts-core"),import_ag_charts_community132=require("ag-charts-community"),import_ag_charts_core152=require("ag-charts-core"),import_ag_charts_community131=require("ag-charts-community"),import_ag_charts_core151=require("ag-charts-core"),{AbstractBarSeriesProperties:AbstractBarSeriesProperties4,makeSeriesTooltip:makeSeriesTooltip7,DropShadow:DropShadow3,Label:Label4}=import_ag_charts_community131._ModuleSupport,WaterfallSeriesTotal=class extends import_ag_charts_core151.BaseProperties{};__decorateClass([import_ag_charts_core151.Property],WaterfallSeriesTotal.prototype,"totalType",2),__decorateClass([import_ag_charts_core151.Property],WaterfallSeriesTotal.prototype,"index",2),__decorateClass([import_ag_charts_core151.Property],WaterfallSeriesTotal.prototype,"axisLabel",2);var WaterfallSeriesItemTooltip=class extends import_ag_charts_core151.BaseProperties{};__decorateClass([import_ag_charts_core151.Property],WaterfallSeriesItemTooltip.prototype,"renderer",2);var WaterfallSeriesLabel=class extends Label4{constructor(){super(...arguments),this.placement="outside-end",this.spacing=0}};__decorateClass([import_ag_charts_core151.Property],WaterfallSeriesLabel.prototype,"placement",2),__decorateClass([import_ag_charts_core151.Property],WaterfallSeriesLabel.prototype,"spacing",2);var WaterfallSeriesItem=class extends import_ag_charts_core151.BaseProperties{constructor(){super(...arguments),this.fill="#c16068",this.stroke="#c16068",this.fillOpacity=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.strokeWidth=1,this.cornerRadius=0,this.shadow=new DropShadow3().set({enabled:!1}),this.label=new WaterfallSeriesLabel,this.tooltip=new WaterfallSeriesItemTooltip}};__decorateClass([import_ag_charts_core151.Property],WaterfallSeriesItem.prototype,"name",2),__decorateClass([import_ag_charts_core151.Property],WaterfallSeriesItem.prototype,"fill",2),__decorateClass([import_ag_charts_core151.Property],WaterfallSeriesItem.prototype,"stroke",2),__decorateClass([import_ag_charts_core151.Property],WaterfallSeriesItem.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core151.Property],WaterfallSeriesItem.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core151.Property],WaterfallSeriesItem.prototype,"lineDash",2),__decorateClass([import_ag_charts_core151.Property],WaterfallSeriesItem.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core151.Property],WaterfallSeriesItem.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core151.Property],WaterfallSeriesItem.prototype,"cornerRadius",2),__decorateClass([import_ag_charts_core151.Property],WaterfallSeriesItem.prototype,"itemStyler",2),__decorateClass([import_ag_charts_core151.Property],WaterfallSeriesItem.prototype,"shadow",2),__decorateClass([import_ag_charts_core151.Property],WaterfallSeriesItem.prototype,"label",2),__decorateClass([import_ag_charts_core151.Property],WaterfallSeriesItem.prototype,"tooltip",2);var WaterfallSeriesConnectorLine=class extends import_ag_charts_core151.BaseProperties{constructor(){super(...arguments),this.enabled=!0,this.stroke="black",this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.strokeWidth=2}};__decorateClass([import_ag_charts_core151.Property],WaterfallSeriesConnectorLine.prototype,"enabled",2),__decorateClass([import_ag_charts_core151.Property],WaterfallSeriesConnectorLine.prototype,"stroke",2),__decorateClass([import_ag_charts_core151.Property],WaterfallSeriesConnectorLine.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core151.Property],WaterfallSeriesConnectorLine.prototype,"lineDash",2),__decorateClass([import_ag_charts_core151.Property],WaterfallSeriesConnectorLine.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core151.Property],WaterfallSeriesConnectorLine.prototype,"strokeWidth",2);var WaterfallSeriesItems=class extends import_ag_charts_core151.BaseProperties{constructor(){super(...arguments),this.positive=new WaterfallSeriesItem,this.negative=new WaterfallSeriesItem,this.total=new WaterfallSeriesItem}};__decorateClass([import_ag_charts_core151.Property],WaterfallSeriesItems.prototype,"positive",2),__decorateClass([import_ag_charts_core151.Property],WaterfallSeriesItems.prototype,"negative",2),__decorateClass([import_ag_charts_core151.Property],WaterfallSeriesItems.prototype,"total",2);var WaterfallSeriesProperties=class extends AbstractBarSeriesProperties4{constructor(){super(...arguments),this.item=new WaterfallSeriesItems,this.totals=new import_ag_charts_core151.PropertiesArray(WaterfallSeriesTotal),this.line=new WaterfallSeriesConnectorLine,this.tooltip=makeSeriesTooltip7()}getStyle(e){const{fillOpacity:t,strokeWidth:i,strokeOpacity:o,fill:r,stroke:s,lineDash:a,lineDashOffset:n,cornerRadius:l}=this.item[e==="subtotal"?"total":e];return{fill:r,fillOpacity:t,stroke:s,strokeWidth:i,strokeOpacity:o,lineDash:a,lineDashOffset:n,cornerRadius:l,opacity:1}}};__decorateClass([import_ag_charts_core151.Property],WaterfallSeriesProperties.prototype,"xKey",2),__decorateClass([import_ag_charts_core151.Property],WaterfallSeriesProperties.prototype,"yKey",2),__decorateClass([import_ag_charts_core151.Property],WaterfallSeriesProperties.prototype,"xName",2),__decorateClass([import_ag_charts_core151.Property],WaterfallSeriesProperties.prototype,"yName",2),__decorateClass([import_ag_charts_core151.Property],WaterfallSeriesProperties.prototype,"item",2),__decorateClass([import_ag_charts_core151.Property],WaterfallSeriesProperties.prototype,"totals",2),__decorateClass([import_ag_charts_core151.Property],WaterfallSeriesProperties.prototype,"line",2),__decorateClass([import_ag_charts_core151.Property],WaterfallSeriesProperties.prototype,"tooltip",2);var{adjustLabelPlacement,SeriesNodePickMode:SeriesNodePickMode5,fixNumericExtent:fixNumericExtent6,valueProperty:valueProperty8,keyProperty:keyProperty6,accumulativeValueProperty,trailingAccumulatedValueProperty,createDatumId:createDatumId6,checkCrisp:checkCrisp2,updateLabelNode:updateLabelNode4,prepareBarAnimationFunctions:prepareBarAnimationFunctions2,collapsedStartingBarPosition,resetBarSelectionsDirect:resetBarSelectionsDirect2,resetBarSelectionsFn:resetBarSelectionsFn2,seriesLabelFadeInAnimation:seriesLabelFadeInAnimation3,resetLabelFn:resetLabelFn3,animationValidation:animationValidation5,DEFAULT_CARTESIAN_DIRECTION_KEYS:DEFAULT_CARTESIAN_DIRECTION_KEYS2,DEFAULT_CARTESIAN_DIRECTION_NAMES:DEFAULT_CARTESIAN_DIRECTION_NAMES2,computeBarFocusBounds:computeBarFocusBounds5,Rect:Rect3,motion:motion3,getItemStylesPerItemId:getItemStylesPerItemId2,DataSet,processedDataIsAnimatable:processedDataIsAnimatable5,upsertNodeDatum:upsertNodeDatum4}=import_ag_charts_community132._ModuleSupport,WaterfallSeries=class extends import_ag_charts_community132._ModuleSupport.AbstractBarSeries{constructor(e){super({moduleCtx:e,propertyKeys:DEFAULT_CARTESIAN_DIRECTION_KEYS2,propertyNames:DEFAULT_CARTESIAN_DIRECTION_NAMES2,categoryKey:void 0,pickModes:[SeriesNodePickMode5.NEAREST_NODE,SeriesNodePickMode5.EXACT_SHAPE_MATCH],pathsPerSeries:["connector"],pathsZIndexSubOrderOffset:[-1,-1],animationResetFns:{datum:resetBarSelectionsFn2,label:resetLabelFn3}}),this.properties=new WaterfallSeriesProperties,this.seriesItemTypes=new Set(["positive","negative","total"])}async processData(e){const{xKey:t,yKey:i,totals:o}=this.properties,{data:r}=this;if(!this.visible)return;const s=m=>(0,import_ag_charts_core152.isContinuous)(m)&&Number(m)>=0,a=m=>(0,import_ag_charts_core152.isContinuous)(m)&&Number(m)>=0,n=m=>m==="total"||m==="subtotal",l={missingValue:void 0,invalidValue:void 0},c=[],h=o.reduce((m,v)=>{const b=m.get(v.index);return b?b.push(v):m.set(v.index,[v]),m},new Map);for(const[m,v]of r?.data.entries()??[]){c.push(v);const b=h.get(m);if(b)for(const D of b)c.push({...D.toJson(),[t]:D.axisLabel})}const u=[];this.ctx.animationManager.isSkipped()||u.push(animationValidation5());const d=this.getCategoryAxis()?.scale,p=this.getValueAxis()?.scale,{isContinuousX:g,xScaleType:y,yScaleType:x}=this.getScaleInformation({xScale:d,yScale:p}),f=this.properties.allowNullKeys??!1,{processedData:S}=await this.requestDataModel(e,DataSet.wrap(c),{props:[keyProperty6(t,y,{id:"xValue",allowNullKey:f}),accumulativeValueProperty(i,x,{...l,id:"yCurrent"}),accumulativeValueProperty(i,x,{...l,missingValue:0,id:"yCurrentTotal"}),accumulativeValueProperty(i,x,{...l,id:"yCurrentPositive",validation:s}),accumulativeValueProperty(i,x,{...l,id:"yCurrentNegative",validation:a}),trailingAccumulatedValueProperty(i,x,{...l,id:"yPrevious"}),valueProperty8(i,x,{id:"yRaw"}),valueProperty8("totalType","category",{id:"totalTypeValue",missingValue:void 0,validation:n}),...g?[import_ag_charts_community132._ModuleSupport.SMALLEST_KEY_INTERVAL,import_ag_charts_community132._ModuleSupport.LARGEST_KEY_INTERVAL]:[],...u]});this.smallestDataInterval=S.reduced?.smallestKeyInterval,this.largestDataInterval=S.reduced?.largestKeyInterval,this.updateSeriesItemTypes(),this.animationState.transition("updateData")}getSeriesDomain(e){const{processedData:t,dataModel:i}=this;if(!t||!i)return{domain:[]};const{keys:[o],values:r}=t.domain;if(e===this.getCategoryDirection()){const s=i.resolveProcessedDataDefById(this,"xValue");if(s?.def.type==="key"&&s?.def.valueType==="category"){const l=i.getKeySortMetadata(this,"xValue",t);return{domain:o,sortMetadata:l}}const a=e===import_ag_charts_core152.ChartAxisDirection.Y,n=this.getCategoryAxis().isReversed();return{domain:this.padBandExtent(o,n!==a)}}else{const s=i.resolveProcessedDataIndexById(this,"yCurrent"),a=r[s],n=[Math.min(0,a[0]),Math.max(0,a[1])];return{domain:fixNumericExtent6(n)}}}getSeriesRange(){return[Number.NaN,Number.NaN]}populateNodeData(e){let t=0;const i={datumIndex:0,datum:void 0,xDatum:void 0,value:void 0,cumulativeValue:void 0,trailingValue:void 0,datumType:void 0};for(const[o,r]of e.rawData.entries()){const s=e.totalTypeValues[o],a=this.isSubtotal(s),n=this.isTotal(s),l=n||a,c=e.xValues[o];if(c===void 0&&!this.properties.allowNullKeys)continue;const h=e.yRawValues[o],{cumulativeValue:u,trailingValue:d}=this.computeWaterfallValues(e,o,n,a,t);l&&(t=u??0);const p=this.computeDisplayValue(n,a,h,u,d);i.datumIndex=o,i.datum=r,i.xDatum=c,i.value=p,i.cumulativeValue=u,i.trailingValue=d,i.datumType=s;const g=upsertNodeDatum4(e,i,(y,x)=>this.createNodeDatum(y,x),(y,x,f)=>this.updateNodeDatum(y,x,f));if(g){const y=this.createPointDatum(e,g,u,d,l);e.pointData.push(y)}}}finalizeNodeData(e){e.nodeIndex<e.nodes.length&&(e.nodes.length=e.nodeIndex)}initializeResult(e){return{itemId:this.properties.yKey,nodeData:e.nodes,labelData:e.nodes,pointData:[],scales:this.calculateScaling(),groupScale:this.getScaling(this.ctx.seriesStateManager.getGroupScale(this)),visible:this.visible,styles:getItemStylesPerItemId2(this.getItemStyle.bind(this),"total","subtotal","positive","negative")}}assembleResult(e,t){const i=this.properties.line.enabled;return e.yCurrValues!=null&&i&&(t.pointData=e.pointData),t}createNodeDatumContext(e,t){const{dataModel:i,processedData:o}=this;if(!i||!o||o.type!=="ungrouped")return;const r=this.getCategoryAxis(),s=this.getValueAxis();if(!r||!s)return;const a=e.scale,n=t.scale,l=i.resolveKeysById(this,"xValue",o),c=i.resolveColumnById(this,"yRaw",o),h=i.resolveColumnById(this,"totalTypeValue",o),u=i.resolveColumnById(this,"yCurrent",o),d=i.resolveColumnById(this,"yPrevious",o),p=i.resolveColumnById(this,"yCurrentTotal",o),g=o.dataSources.get(this.id)?.data??[],{xKey:y,yKey:x,xName:f,yName:S,line:m}=this.properties,{contextNodeData:v}=this,b=!this.ctx.animationManager.isSkipped(),D=v?.nodeData!=null&&o.changeDescription!=null,{barWidth:k}=this.getBarDimensions();return{xAxis:e,yAxis:t,xScale:a,yScale:n,categoryAxis:r,valueAxis:s,barAlongX:this.getBarDirection()===import_ag_charts_core152.ChartAxisDirection.X,barWidth:k,categoryAxisReversed:r.isReversed(),valueAxisReversed:s.isReversed(),crisp:checkCrisp2(r.scale,r.visibleRange,this.smallestDataInterval,this.largestDataInterval),animationEnabled:b,xKey:y,yKey:x,xName:f,yName:S,lineStrokeWidth:m.strokeWidth,yDomain:this.getSeriesDomain(import_ag_charts_core152.ChartAxisDirection.Y).domain,xValues:l,rawData:g,yRawValues:c,totalTypeValues:h,yCurrValues:u,yPrevValues:d,yCurrTotalValues:p,canIncrementallyUpdate:D,nodes:D?v.nodeData:[],nodeIndex:0,pointData:[]}}computeWaterfallValues(e,t,i,o,r){return i||o?{cumulativeValue:e.yCurrTotalValues[t],trailingValue:o?r:0}:{cumulativeValue:e.yCurrValues[t],trailingValue:e.yPrevValues[t]}}computeDisplayValue(e,t,i,o,r){return e?o:t?(o??0)-(r??0):i}createSkeletonNodeDatum(e,t){const{xKey:i,yKey:o,crisp:r}=e,{datumIndex:s,datum:a,xDatum:n,value:l,cumulativeValue:c,datumType:h}=t,u=(l??0)>=0,d=this.getSeriesItemType(u,h);return{index:s,series:this,itemType:d,datum:a,datumIndex:s,cumulativeValue:c??0,xValue:n,yValue:l,yKey:o,xKey:i,x:0,y:0,width:0,height:0,midPoint:{x:0,y:0},crisp:r,label:{text:"",x:0,y:0,textAlign:"center",textBaseline:"middle"}}}updateNodeDatum(e,t,i){const{xScale:o,yScale:r,barAlongX:s,barWidth:a,valueAxisReversed:n,xKey:l,yKey:c,xName:h,yName:u,yDomain:d,crisp:p}=e,{datumIndex:g,datum:y,xDatum:x,value:f,cumulativeValue:S,trailingValue:m,datumType:v}=i,b=t,D=Math.round(o.convert(x));if(!Number.isFinite(D))return;const k=(f??0)>=0,A=this.getSeriesItemType(k,v),{strokeWidth:M,label:I}=this.getItemConfig(A),_=Math.round(r.convert(S)),P=Math.round(r.convert(m)),O=k?_:P,C=k?P:_,L=Math.max(M,Math.abs(C-O)),E=s?Math.min(O,C):D,V=s?D:Math.min(O,C),w=s?L:a,T=s?a:L;if(b.index=g,b.itemType=A,b.datum=y,b.datumIndex=g,b.cumulativeValue=S??0,b.xValue=x,b.yValue=f,b.x=E,b.y=V,b.width=w,b.height=T,b.crisp=p,b.midPoint?(b.midPoint.x=E+w/2,b.midPoint.y=V+T/2):b.midPoint={x:E+w/2,y:V+T/2},I.enabled){const z=A==="subtotal"?"total":A,B=this.getLabelText(f,y,c,"y",d,I,{itemType:z,value:f,datum:y,xKey:l,yKey:c,xName:h,yName:u}),F=I.spacing+(typeof I.padding=="number"?I.padding:0),R=adjustLabelPlacement({isUpward:(f??-1)>=0!==n,isVertical:!s,placement:I.placement,spacing:F,rect:{x:E,y:V,width:w,height:T}});b.label.text=B,b.label.x=R.x,b.label.y=R.y,b.label.textAlign=R.textAlign,b.label.textBaseline=R.textBaseline}else b.label.text=""}createNodeDatum(e,t){const i=this.createSkeletonNodeDatum(e,t);return this.updateNodeDatum(e,i,t),i}createPointDatum(e,t,i,o,r){const{yScale:s,barAlongX:a,categoryAxisReversed:n,lineStrokeWidth:l}=e,c=Math.round(s.convert(i)),h=Math.round(s.convert(o)),u=r?c:h,d=Math.floor(l)%2/2,p=n?c:u,g=n?u:c,y={x:t.x,y:t.y,width:t.width,height:t.height};let x,f;return a?(x={x:p+d,y:y.y},f={x:g+d,y:y.y+y.height}):(x={x:y.x,y:p+d},f={x:y.x+y.width,y:g+d}),{x:n?f.x:x.x,y:n?f.y:x.y,x2:n?x.x:f.x,y2:n?x.y:f.y,size:0}}updateSeriesItemTypes(){const{dataModel:e,seriesItemTypes:t,processedData:i}=this;if(!e||!i)return;t.clear();const o=e.resolveProcessedDataIndexById(this,"yCurrentPositive"),r=e.resolveProcessedDataIndexById(this,"yCurrentNegative"),s=e.resolveProcessedDataIndexById(this,"totalTypeValue"),a=i.domain.values[o]??[],n=i.domain.values[r]??[];a.length>0&&t.add("positive"),n.length>0&&t.add("negative");const l=i?.domain.values[s];if(l)for(const c of l)(c==="total"||c==="subtotal")&&t.add("total")}isSubtotal(e){return e==="subtotal"}isTotal(e){return e==="total"}nodeFactory(){return new Rect3}getSeriesItemType(e,t){return t??(e?"positive":"negative")}getItemConfig(e){switch(e){case"positive":return this.properties.item.positive;case"negative":return this.properties.item.negative;case"subtotal":case"total":return this.properties.item.total}}updateDatumSelection(e){const{nodeData:t,datumSelection:i}=e,o=t??[];return processedDataIsAnimatable5(this.processedData)?i.update(o,void 0,r=>createDatumId6(r.datumIndex)):i.update(o)}getItemStyle(e,t,i,o="total"){const{properties:r}=this,{datumIndex:s=0,datum:a}=e??{},n=o==="subtotal"?"total":o,l=r.item[n],c=this.getHighlightStyle(t,s,i),h=(0,import_ag_charts_core152.mergeDefaults)(c,r.getStyle(o)),{itemStyler:u}=l;let d=h;if(u!=null&&e!=null){const p=this.cachedDatumCallback(createDatumId6(s,t?"highlight":"node"),()=>{const g=this.makeItemStylerParams(o,s,a,t,d);return this.ctx.optionsGraphService.resolvePartial(["series",`${this.declarationOrder}`,"item",n],this.callWithContext(u,g))});p&&(d=(0,import_ag_charts_core152.mergeDefaults)(p,d))}return d}makeItemStylerParams(e,t,i,o,r){const{id:s,properties:a}=this,{xKey:n,yKey:l}=a,c=this.ctx.highlightManager?.getActiveHighlight(),h=this.getHighlightStateString(c,o,t),u=this.filterItemStylerFillParams(r.fill)??r.fill;return{seriesId:s,itemType:e,datum:i,xKey:n,yKey:l,highlightState:h,...r,fill:u}}updateDatumStyles({datumSelection:e,isHighlight:t}){e.each((i,o)=>{o.style=this.getItemStyle(o,t,void 0,o.itemType)})}updateDatumNodes({datumSelection:e,isHighlight:t}){const{contextNodeData:i}=this;if(!i)return;const o=this.ctx.highlightManager.getActiveHighlight(),r=this.getCategoryDirection()===import_ag_charts_core152.ChartAxisDirection.X,s=this.getShapeFillBBox();e.each((a,n)=>{const l=n.style??i.styles[n.itemType][this.getHighlightState(o,t,n.datumIndex)];a.setStyleProperties(l,s),a.cornerRadius=l.cornerRadius??0,a.visible=r?n.width>0:n.height>0,a.crisp=n.crisp})}updateLabelSelection(e){const{labelData:t,labelSelection:i}=e;if(t.length===0)return i.update([]);const o=t.filter(r=>{const{label:s}=this.getItemConfig(r.itemType);return s.enabled});return i.update(o)}updateLabelNodes({labelSelection:e,isHighlight:t}){const i={itemType:"positive",xKey:this.properties.xKey,xName:this.properties.xName??this.properties.xName,yKey:this.properties.yKey,yName:this.properties.yName??this.properties.yName},o=this.ctx.highlightManager?.getActiveHighlight();e.each((r,s)=>{i.itemType=s.itemType;const a=this.getHighlightStyle(t,s.datumIndex)?.opacity??1;r.visible=!0,r.fillOpacity=a;const n=this.getItemConfig(s.itemType).label;updateLabelNode4(this,r,i,n,s.label,t,o)})}getTooltipContent(e){const{id:t,dataModel:i,processedData:o,properties:r}=this,{xKey:s,xName:a,yKey:n,yName:l,tooltip:c,legendItemName:h}=r,u=this.getCategoryAxis(),d=this.getValueAxis();if(!i||!o||!u||!d)return;const p=o.dataSources.get(this.id)?.data[e],g=i.resolveKeysById(this,"xValue",o)[e],y=i.resolveColumnById(this,"yRaw",o)[e],x=i.resolveColumnById(this,"yCurrentTotal",o),f=i.resolveColumnById(this,"totalTypeValue",o),S=this.properties.allowNullKeys??!1;if(g===void 0&&!S)return;const m=f[e],v=(y??0)>=0,b=this.getSeriesItemType(v,m);let D;if(this.isTotal(m))D=x[e];else if(this.isSubtotal(m)){D=x[e];for(let M=e-1;M>=0;M-=1)if(this.isSubtotal(f[M])){D=D-x[M];break}}else D=y;const k=this.contextNodeData?.nodeData?.[e],A=this.getItemStyle(k,!1,void 0,k?.itemType);return this.formatTooltipWithContext(c,{heading:this.getAxisValueText(u,"tooltip",g,p,s,h),symbol:this.legendItemSymbol(b),data:[{label:l,fallbackLabel:n,value:this.getAxisValueText(d,"tooltip",D,p,n,h),missing:import_ag_charts_community132._ModuleSupport.isTooltipValueMissing(D)}]},{seriesId:t,datum:p,title:l,itemType:b,xKey:s,xName:a,yKey:n,yName:l,...A})}legendItemSymbol(e){const{fill:t,stroke:i,fillOpacity:o,strokeOpacity:r,strokeWidth:s,lineDash:a,lineDashOffset:n}=this.getItemConfig(e);return{marker:{fill:t,stroke:i,fillOpacity:o,strokeOpacity:r,strokeWidth:s,lineDash:a,lineDashOffset:n}}}getLegendData(e){if(e!=="category")return[];const{id:t,seriesItemTypes:i}=this,o=[],r=a=>a.charAt(0).toUpperCase()+a.substring(1),{showInLegend:s}=this.properties;for(const a of i){const{name:n}=this.getItemConfig(a);o.push({legendType:"category",id:t,itemId:createDatumId6(a),seriesId:t,enabled:!0,label:{text:n??r(a)},symbol:this.legendItemSymbol(a),hideInLegend:!s,isFixed:!0})}return o}toggleSeriesItem(){}resetDatumAnimation(e){resetBarSelectionsDirect2([e.datumSelection])}animateEmptyUpdateReady(e){const{datumSelection:t,labelSelection:i,contextData:o}=e,r=prepareBarAnimationFunctions2(collapsedStartingBarPosition(this.isVertical(),this.axes,"normal"),"unknown");motion3.fromToMotion(this.id,"datums",this.ctx.animationManager,[t],r),seriesLabelFadeInAnimation3(this,"labels",this.ctx.animationManager,i);const{pointData:s}=o;s&&(this.isVertical()?this.animateConnectorLinesVertical(e):this.animateConnectorLinesHorizontal(e))}animateConnectorLinesHorizontal(e){const{pointData:t=[]}=e.contextData,[i]=e.paths,{path:o}=i;this.updateLineNode(i);const r=this.getValueAxis(),s=r?.isReversed(),a=s?(h,u)=>h<u:(h,u)=>h>u,n=r?.scale.convert(0),l=t.reduce((h,u)=>(a(u.x,h)&&(h=u.x),h),s?1/0:0),c=(h,u,d,p,g)=>(h-u)/(d-u)*(g-p)+p;this.ctx.animationManager.animate({id:`${this.id}_connectors`,groupId:this.id,phase:"initial",from:n,to:l,ease:import_ag_charts_core152.easeOut,collapsable:!1,onUpdate(h){o.clear(!0);for(const[u,d]of t.entries()){const p=c(h,n,l,n,d.x),g=c(h,n,l,n,d.x2);u!==0&&o.lineTo(p,d.y),o.moveTo(g,d.y2)}i.checkPathDirty()},onStop:()=>this.resetConnectorLinesPath(e)})}animateConnectorLinesVertical(e){const{pointData:t=[]}=e.contextData,[i]=e.paths,{path:o}=i;this.updateLineNode(i);const r=this.getValueAxis(),s=r?.isReversed(),a=s?(h,u)=>h>u:(h,u)=>h<u,n=r?.scale.convert(0),l=t.reduce((h,u)=>(a(u.y,h)&&(h=u.y),h),s?0:1/0),c=(h,u,d,p,g)=>(h-u)/(d-u)*(g-p)+p;this.ctx.animationManager.animate({id:`${this.id}_connectors`,groupId:this.id,phase:"initial",from:n,to:l,ease:import_ag_charts_core152.easeOut,collapsable:!1,onUpdate(h){o.clear(!0);for(const[u,d]of t.entries()){const p=c(h,n,l,n,d.y),g=c(h,n,l,n,d.y2);u!==0&&o.lineTo(d.x,p),o.moveTo(d.x2,g)}i.checkPathDirty()},onStop:()=>this.resetConnectorLinesPath(e)})}animateReadyResize(e){super.animateReadyResize(e),this.resetConnectorLinesPath(e)}updatePaths(e){this.resetConnectorLinesPath({contextData:e.contextData,paths:e.paths})}resetConnectorLinesPath({contextData:e,paths:t}){if(t.length===0)return;const[i]=t;this.updateLineNode(i);const{path:o}=i;o.clear(!0);const{pointData:r}=e;if(r){for(const[s,a]of r.entries())s!==0&&o.lineTo(a.x,a.y),o.moveTo(a.x2,a.y2);i.checkPathDirty()}}updateLineNode(e){const{stroke:t,strokeWidth:i,strokeOpacity:o,lineDash:r,lineDashOffset:s}=this.properties.line;e.setProperties({fill:void 0,stroke:t,strokeWidth:i,strokeOpacity:o,lineDash:r,lineDashOffset:s,lineJoin:"round",pointerEvents:import_ag_charts_community132._ModuleSupport.PointerEvents.None})}isLabelEnabled(){const{positive:e,negative:t,total:i}=this.properties.item;return e.label.enabled||t.label.enabled||i.label.enabled}computeFocusBounds({datumIndex:e}){return computeBarFocusBounds5(this,this.contextNodeData?.nodeData[e])}hasItemStylers(){const{positive:e,negative:t,total:i}=this.properties.item;return e.itemStyler!=null||e.label.itemStyler!=null||t.itemStyler!=null||t.label.itemStyler!=null||i.itemStyler!=null||i.label.itemStyler!=null}};WaterfallSeries.className="WaterfallSeries",WaterfallSeries.type="waterfall";var import_ag_charts_community133=require("ag-charts-community"),import_ag_charts_core153=require("ag-charts-core"),{waterfallSeriesThemeableOptionsDef}=import_ag_charts_community133._ModuleSupport,waterfallSeriesOptionsDef={...waterfallSeriesThemeableOptionsDef,...import_ag_charts_core153.commonSeriesOptionsDefs,type:(0,import_ag_charts_core153.required)((0,import_ag_charts_core153.constant)("waterfall")),xKey:(0,import_ag_charts_core153.required)(import_ag_charts_core153.string),yKey:(0,import_ag_charts_core153.required)(import_ag_charts_core153.string),xKeyAxis:import_ag_charts_core153.string,yKeyAxis:import_ag_charts_core153.string,xName:import_ag_charts_core153.string,yName:import_ag_charts_core153.string,totals:(0,import_ag_charts_core153.arrayOfDefs)({totalType:(0,import_ag_charts_core153.required)((0,import_ag_charts_core153.union)("total","subtotal")),index:(0,import_ag_charts_core153.required)(import_ag_charts_core153.positiveNumber),axisLabel:(0,import_ag_charts_core153.required)(import_ag_charts_core153.string)},"a total definition options array"),width:import_ag_charts_core153.positiveNumberNonZero},import_ag_charts_community134=require("ag-charts-community"),import_ag_charts_core154=require("ag-charts-core");function itemTheme2(e,t){return{fill:{$applySwitch:[{$path:"type"},{$if:[{$eq:[{$palette:"type"},"user-indexed"]},{$path:[`/${t}`,{$palette:"fill"},{$palette:"fills"}]},{$palette:`${e}.fill`}]},["gradient",(0,import_ag_charts_core154.FILL_GRADIENT_LINEAR_KEYED_DEFAULTS)(e)],["image",import_ag_charts_core154.FILL_IMAGE_DEFAULTS],["pattern",(0,import_ag_charts_core154.FILL_PATTERN_KEYED_DEFAULTS)(e)]]},stroke:{$palette:`${e}.stroke`},strokeWidth:{$isUserOption:["./stroke",2,0]},label:{...import_ag_charts_core154.LABEL_BOXING_DEFAULTS,enabled:!1,fontStyle:void 0,fontWeight:{$ref:"fontWeight"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},color:{$ref:"textColor"},formatter:void 0,placement:"outside-end",padding:{$isUserOption:["./spacing",0,6]}}}}var WATERFALL_SERIES_THEME={series:{item:{positive:itemTheme2("altUp",0),negative:itemTheme2("altDown",1),total:itemTheme2("neutral",2)},line:{stroke:{$palette:"neutral.stroke"},strokeOpacity:1,lineDash:[0],lineDashOffset:0,strokeWidth:2},highlight:import_ag_charts_core154.SINGLE_SERIES_HIGHLIGHT_STYLE},legend:{enabled:!0,toggleSeries:!1}},WaterfallSeriesModule={type:"series",name:"waterfall",chartType:"cartesian",enterprise:!0,solo:!0,version:import_ag_charts_community135.VERSION,dependencies:[import_ag_charts_community135.CartesianChartModule],options:waterfallSeriesOptionsDef,defaultAxes:import_ag_charts_core155.DIRECTION_SWAP_AXES,axisKeys:{[import_ag_charts_core155.ChartAxisDirection.X]:"xKeyAxis",[import_ag_charts_core155.ChartAxisDirection.Y]:"yKeyAxis"},axisKeysFlipped:{[import_ag_charts_core155.ChartAxisDirection.X]:"yKeyAxis",[import_ag_charts_core155.ChartAxisDirection.Y]:"xKeyAxis"},themeTemplate:WATERFALL_SERIES_THEME,create:e=>new WaterfallSeries(e)},navigatorHandleOptionsDef={width:import_ag_charts_core156.positiveNumber,height:import_ag_charts_core156.positiveNumber,grip:import_ag_charts_core156.boolean,fill:import_ag_charts_core156.color,stroke:import_ag_charts_core156.color,strokeWidth:import_ag_charts_core156.positiveNumber,cornerRadius:import_ag_charts_core156.positiveNumber},commonIgnoredMiniChartProperties=["cursor","highlightStyle","listeners","nodeClickRange","showInLegend","showInMiniChart","tooltip","visible","xName","yName"],barIgnoredMiniChartProperties=[...commonIgnoredMiniChartProperties,"errorBar","label","legendItemName"],boxPlotIngnoredMiniChartProperties=[...commonIgnoredMiniChartProperties,"direction","legendItemName","minName","q1Name","medianName","q3Name","maxName"],bubbleIgnoredMiniChartProperties=[...commonIgnoredMiniChartProperties,"title","label","labelKey","labelName","sizeName"],heatmapIgnoredMiniChartProperties=[...commonIgnoredMiniChartProperties,"title","label","colorName","textAlign","verticalAlign","itemPadding","colorRange"],histogramIgnoredMiniChartProperties=[...commonIgnoredMiniChartProperties,"label"],lineIgnoredMiniChartProperties=[...commonIgnoredMiniChartProperties,"errorBar","title","label"],rangeAreaIgnoredMiniChartProperties=[...commonIgnoredMiniChartProperties,"label","yLowName","yHighName"],rangeBarIgnoredMiniChartProperties=[...commonIgnoredMiniChartProperties,"direction","label","yLowName","yHighName"],scatterIgnoredMiniChartProperties=[...commonIgnoredMiniChartProperties,"errorBar","title","label","labelKey","labelName"],waterfallIgnoredMiniChartProperties=[...commonIgnoredMiniChartProperties,"direction"],navigatorOptionsDef={enabled:import_ag_charts_core156.boolean,height:import_ag_charts_core156.positiveNumber,spacing:import_ag_charts_core156.positiveNumber,cornerRadius:import_ag_charts_core156.number,mask:{fill:import_ag_charts_core156.color,fillOpacity:import_ag_charts_core156.ratio,stroke:import_ag_charts_core156.color,strokeWidth:import_ag_charts_core156.positiveNumber},minHandle:navigatorHandleOptionsDef,maxHandle:navigatorHandleOptionsDef,miniChart:{enabled:import_ag_charts_core156.boolean,padding:{top:import_ag_charts_core156.positiveNumber,bottom:import_ag_charts_core156.positiveNumber},label:{enabled:import_ag_charts_core156.boolean,avoidCollisions:import_ag_charts_core156.boolean,spacing:import_ag_charts_core156.positiveNumber,format:import_ag_charts_core156.numberFormatValidator,formatter:(0,import_ag_charts_core156.callbackOf)(import_ag_charts_core156.textOrSegments),interval:{minSpacing:import_ag_charts_core156.positiveNumber,maxSpacing:import_ag_charts_core156.positiveNumber,values:import_ag_charts_core156.array,step:import_ag_charts_core156.number},...import_ag_charts_core156.fontOptionsDef},series:(0,import_ag_charts_core156.arrayOfDefs)((0,import_ag_charts_core156.typeUnion)({area:(0,import_ag_charts_core156.without)(import_ag_charts_community136.AreaSeriesModule.options,[...commonIgnoredMiniChartProperties,"type"]),bar:(0,import_ag_charts_core156.without)(import_ag_charts_community136.BarSeriesModule.options,[...barIgnoredMiniChartProperties,"type"]),"box-plot":(0,import_ag_charts_core156.without)(BoxPlotSeriesModule.options,[...boxPlotIngnoredMiniChartProperties,"type"]),bubble:(0,import_ag_charts_core156.without)(import_ag_charts_community136.BubbleSeriesModule.options,[...bubbleIgnoredMiniChartProperties,"type"]),candlestick:(0,import_ag_charts_core156.without)(CandlestickSeriesModule.options,[...commonIgnoredMiniChartProperties,"type"]),heatmap:(0,import_ag_charts_core156.without)(HeatmapSeriesModule.options,[...heatmapIgnoredMiniChartProperties,"type"]),histogram:(0,import_ag_charts_core156.without)(import_ag_charts_community136.HistogramSeriesModule.options,[...histogramIgnoredMiniChartProperties,"type"]),line:(0,import_ag_charts_core156.without)(import_ag_charts_community136.LineSeriesModule.options,[...lineIgnoredMiniChartProperties,"type"]),ohlc:(0,import_ag_charts_core156.without)(OhlcSeriesModule.options,[...commonIgnoredMiniChartProperties,"type"]),"range-area":(0,import_ag_charts_core156.without)(RangeAreaSeriesModule.options,[...rangeAreaIgnoredMiniChartProperties,"type"]),"range-bar":(0,import_ag_charts_core156.without)(RangeBarSeriesModule.options,[...rangeBarIgnoredMiniChartProperties,"type"]),scatter:(0,import_ag_charts_core156.without)(import_ag_charts_community136.ScatterSeriesModule.options,[...scatterIgnoredMiniChartProperties,"type"]),waterfall:(0,import_ag_charts_core156.without)(WaterfallSeriesModule.options,[...waterfallIgnoredMiniChartProperties,"type"])},"miniChart series options"))}},import_ag_charts_community137=require("ag-charts-community"),import_ag_charts_core157=require("ag-charts-core"),validMiniChartSeriesTypes=["area","bar","bubble","candlestick","heatmap","histogram","line","ohlc","range-area","range-bar","scatter","waterfall"],priceVolumePresetIgnoredMiniChartProperties=["itemStyler","simpleItemStyler","direction","fill","fillGradientDefaults","fillPatternDefaults","fillImageDefaults","fillOpacity","shadow","focusPriority","highlight","lineDash","lineDashOffset","strokeWidth"];function miniChartSeriesTheme(e,t){return{$merge:[{$switch:[t,{},[["area","line","range-area"],{marker:{enabled:{$isUserOption:["/series/$index/marker/enabled",{$path:["/series/$index/marker/enabled",!1]},!1]}}}]]},{$omit:[{$switch:[t,commonIgnoredMiniChartProperties,["bar",barIgnoredMiniChartProperties],["box-plot",boxPlotIngnoredMiniChartProperties],["bubble",bubbleIgnoredMiniChartProperties],["heatmap",heatmapIgnoredMiniChartProperties],["histogram",histogramIgnoredMiniChartProperties],["line",[...lineIgnoredMiniChartProperties,...priceVolumePresetIgnoredMiniChartProperties]],["range-area",rangeAreaIgnoredMiniChartProperties],["range-bar",rangeBarIgnoredMiniChartProperties],["scatter",scatterIgnoredMiniChartProperties],["waterfall",waterfallIgnoredMiniChartProperties]]},e]}]}}var NAVIGATOR_THEME={enabled:!1,height:{$if:[{$path:"./miniChart/enabled"},40,18]},cornerRadius:4,mask:{fill:{$ref:"foregroundColor"},fillOpacity:.1,stroke:{$ref:"borderColor"},strokeWidth:1},minHandle:{fill:{$ref:"chartBackgroundColor"},stroke:{$ref:"borderColor"},strokeWidth:1,width:12,height:24,cornerRadius:4},maxHandle:{fill:{$ref:"chartBackgroundColor"},stroke:{$ref:"borderColor"},strokeWidth:1,width:12,height:24,cornerRadius:4},miniChart:{enabled:!1,label:{color:{$ref:"textColor"},fontSize:{$rem:import_ag_charts_core157.FONT_SIZE_RATIO.SMALLER},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},spacing:5},padding:{top:0,bottom:0},series:{$apply:[miniChartSeriesTheme({$path:"/series/$index"},{$path:["/navigator/miniChart/series/$index/type",{$path:["type",{$path:"/series/$index/type"}]}]}),{$if:[{$or:validMiniChartSeriesTypes.map(e=>({$eq:[{$path:"/series/0/type"},e]}))},{$map:[miniChartSeriesTheme({$value:"$1"},{$path:"/series/$index/type"}),{$path:"/series"}]},void 0]}]}}},NavigatorModule={type:"plugin",name:"navigator",chartType:"cartesian",enterprise:!0,version:import_ag_charts_community138.VERSION,options:navigatorOptionsDef,themeTemplate:NAVIGATOR_THEME,create:e=>new Navigator(e)},import_ag_charts_community141=require("ag-charts-community"),import_ag_charts_community140=require("ag-charts-community"),import_ag_charts_core160=require("ag-charts-core"),import_ag_charts_community139=require("ag-charts-community"),import_ag_charts_core158=require("ag-charts-core"),{SliderWidget:SliderWidget2}=import_ag_charts_community139._ModuleSupport,STEP_REPEAT_DELAY_MS=400,STEP_REPEAT_INTERVAL_MS=50,StepRepeater=class{constructor(e){this.applyStep=e}start(e){this.setTarget(e),this.run(STEP_REPEAT_DELAY_MS)}updateTarget(e){this.setTarget(e),this.isActive()||this.run(STEP_REPEAT_DELAY_MS)}stop(e=!0){this.clearTimer(),e&&(this.target=void 0)}setTarget(e){this.target=(0,import_ag_charts_core158.clamp)(0,e,1)}run(e){if(this.target==null){this.stop();return}if(this.applyStep(this.target)){this.stop();return}this.schedule(e)}schedule(e){this.isActive()||(this.timer=setTimeout(()=>{this.timer=void 0,this.run(STEP_REPEAT_INTERVAL_MS)},e))}clearTimer(){this.timer!=null&&(clearTimeout(this.timer),this.timer=void 0)}isActive(){return this.timer!=null}},ScrollbarState=class{constructor(){this.min=0,this.span=1,this.thumbSpan=1}update(e,t,i=this.thumbSpan){const o=(0,import_ag_charts_core158.clamp)(0,t-e,1);this.span=o,this.thumbSpan=(0,import_ag_charts_core158.clamp)(0,i,1),this.min=this.clampMin(e,o)}clampMin(e,t=this.span){return(0,import_ag_charts_core158.clamp)(0,e,1-t)}getThumbBounds(e=this.min,t=this.thumbSpan){const i=this.clampMin(e,t);return{start:i,end:i+t}}isWithinThumb(e){const{start:t,end:i}=this.getThumbBounds();return e>=t&&e<=i}getJumpRange(e){if(!this.canScroll())return;let t=this.clampMin(e-this.thumbSpan/2,this.thumbSpan);return t=this.clampMin(t),{min:t,max:t+this.span}}getStepRange(e){if(!this.canScroll())return;const t=(0,import_ag_charts_core158.clamp)(0,e,1),{start:i,end:o}=this.getThumbBounds();if(t>=i&&t<=o)return;const r=t<i,s=r?i-t:t-o,a=Math.min(this.span,s),n=this.clampMin(this.min+(r?-a:a));return{min:n,max:n+this.span}}canScroll(){return this.span>0&&this.span<1}},ScrollbarDOMProxy=class{constructor(e,t,i,o){this.ctx=e,this.orientation=t,this.onChange=i,this.onHoverChange=o,this.dragStartRatio=0,this.interactionMode="none",this.state=new ScrollbarState,this.repeater=new StepRepeater(a=>this.applyStepToward(a)),this.container=e.proxyInteractionService.createProxyContainer({type:"group",domManagerId:`scrollbar-${t}`,classList:["ag-charts-proxy-scrollbar",`ag-charts-proxy-scrollbar-${t}`],ariaLabel:void 0,role:"presentation"});const r=t==="horizontal"?"ariaLabelScrollbarHorizontal":"ariaLabelScrollbarVertical";this.slider=e.proxyInteractionService.createProxyElement({type:"slider",domIndex:0,tabIndex:0,ariaLabel:{id:r},role:"slider",parent:this.container,classList:["ag-charts-proxy-scrollbar-slider"]});const s=this.slider.getElement();s.ariaValueMin="0",s.ariaValueMax="100",this.slider.step=SliderWidget2.STEP_HUNDRETH,this.slider.keyboardStep=SliderWidget2.STEP_ONE,this.slider.orientation=t,this.slider.setPreventsDefault(!1),this.slider.addListener("change",()=>this.onSliderChange()),this.slider.addListener("keydown",a=>this.onSliderKeyDown(a)),this.slider.addListener("drag-start",a=>this.onDragStart(a)),this.slider.addListener("drag-move",a=>this.onDragMove(a)),this.slider.addListener("drag-end",a=>this.onDragEnd(a)),this.slider.addListener("mouseenter",a=>this.handleHoverEvent(a)),this.slider.addListener("mousemove",a=>this.handleHoverEvent(a)),this.slider.addListener("mouseleave",()=>this.onMouseLeave()),this.thumbFocus=e.proxyInteractionService.createProxyElement({type:"region",parent:this.container,classList:["ag-charts-proxy-scrollbar-thumb-focus"],role:"presentation"}),this.thumbFocus.setAriaHidden(!0),this.thumbFocus.setPointerEvents("none")}destroy(){this.interactionBounds=void 0,this.repeater.stop(),this.container.destroy()}updateBounds(e){this.interactionBounds=void 0,this.container.setBounds(e),this.slider.setBounds({x:0,y:0,width:e.width,height:e.height})}updateVisibility(e){this.container.setHidden(!e)}updateMinMax(e,t,i=this.state.thumbSpan,o){this.state.update(e,t,i);const r=this.ctx.localeManager.t("ariaValuePanRange",{min:Math.round(e*100)/100,max:Math.round(t*100)/100}),s=this.slider.getElement();s.ariaValueText=r,(!o?.skipSliderUpdate||Math.abs(this.slider.getValueRatio()-e)>1e-9)&&this.slider.setValueRatio(e,{ariaValueText:r})}updateThumbBounds(e,t,i){const o=Math.max(0,i??0);this.thumbFocus.getElement().style.borderRadius=`${o}px`,this.thumbFocus.setBounds({x:e.x-t.x,y:e.y-t.y,width:e.width,height:e.height})}update(e,t,i){this.onChange(e,t),this.updateMinMax(e,t,void 0,i)}onSliderChange(){const e=this.state.clampMin(this.slider.getValueRatio()),t=e+this.state.span;this.update(e,t,{skipSliderUpdate:!0})}onSliderKeyDown(e){const{code:t}=e.sourceEvent,i=this.orientation==="vertical",o=i&&t==="ArrowUp"||!i&&t==="ArrowLeft",r=i&&t==="ArrowDown"||!i&&t==="ArrowRight";if(!o&&!r)return;e.sourceEvent.preventDefault();const s=this.slider.getElement();s.step=this.slider.keyboardStep?.attributeValue??"1",o?s.stepDown():r&&s.stepUp(),this.onSliderChange()}onDragMove(e){if(e.sourceEvent.preventDefault(),this.interactionMode==="drag"){const{isHorizontal:r,size:s,start:a}=this.getInteractionBounds()??{};if(a==null||s==null)return;const n=(r?e.originDeltaX:e.originDeltaY)/s,l=this.state.clampMin(this.dragStartRatio+n),c=l+this.state.span;this.update(l,c);return}if(this.interactionMode!=="step")return;const t=this.getPointerInfo(e);if(t==null||!Number.isFinite(t.ratio))return;const{ratio:i,inCrossBounds:o}=t;if(!o){this.repeater.stop();return}this.repeater.updateTarget(i)}onDragEnd(e){e.sourceEvent.preventDefault(),this.interactionBounds=void 0,this.setInteraction("none"),this.onHoverChange(!1)}onDragStart(e){e.sourceEvent.preventDefault(),this.interactionBounds=void 0;const t=this.getClickInfo(e);if(t?.inBounds){if(t.inThumb){this.dragStartRatio=this.slider.getValueRatio(),this.setInteraction("drag");return}if(e.sourceEvent.shiftKey){this.jumpTo(t.ratio),this.setInteraction("none");return}this.beginStepRepeat(t.ratio)}}onMouseLeave(){this.onHoverChange(!1)}getClickInfo(e){const t=this.getPointerRatio(e);return t==null?void 0:t>=0&&t<=1?{ratio:t,inBounds:!0,inThumb:this.isWithinThumb(t)}:{ratio:0,inBounds:!1,inThumb:!1}}getPointerRatio(e){return this.getPointerInfo(e)?.ratio}getPointerInfo(e){if(e.device==="keyboard")return;const{isHorizontal:t,size:i,start:o,crossStart:r,crossSize:s}=this.getInteractionBounds(),a=t?e.clientX:e.clientY,n=t?e.clientY:e.clientX,l=(a-o)/i,c=n>=r&&n<=r+s;return{ratio:l,inCrossBounds:c}}jumpTo(e){const t=this.state.getJumpRange(e);t&&this.update(t.min,t.max)}applyStepToward(e){const t=this.state.getStepRange(e);return t?(this.update(t.min,t.max),!1):!0}beginStepRepeat(e){this.setInteraction("step"),this.repeater.start(e)}setInteraction(e){this.interactionMode=e,e!=="step"&&this.repeater.stop()}getInteractionBounds(){if(this.interactionBounds)return this.interactionBounds;const{width:e,height:t,left:i,top:o}=this.container.getBoundingClientRect(),r=this.orientation==="horizontal",s=r?e:t,a=r?i:o,n=r?o:i,l=r?t:e;return this.interactionBounds={isHorizontal:r,size:s,start:a,crossStart:n,crossSize:l},this.interactionBounds}isWithinThumb(e){return this.state.isWithinThumb(e)}handleHoverEvent(e){if(this.interactionMode==="drag")return;const t=this.getPointerInfo(e);if(!t){this.onHoverChange(!1);return}const i=this.isWithinThumb(t.ratio);this.onHoverChange(i)}},import_ag_charts_core159=require("ag-charts-core"),ScrollbarTrack=class extends import_ag_charts_core159.ChangeDetectableProperties{constructor(){super(...arguments),this.enabled=!1,this.fillOpacity=1,this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.opacity=1}};__decorateClass([import_ag_charts_core159.Property,(0,import_ag_charts_core159.SceneChangeDetection)()],ScrollbarTrack.prototype,"enabled",2),__decorateClass([import_ag_charts_core159.Property,(0,import_ag_charts_core159.SceneChangeDetection)()],ScrollbarTrack.prototype,"fill",2),__decorateClass([import_ag_charts_core159.Property,(0,import_ag_charts_core159.SceneChangeDetection)()],ScrollbarTrack.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core159.Property,(0,import_ag_charts_core159.SceneChangeDetection)()],ScrollbarTrack.prototype,"stroke",2),__decorateClass([import_ag_charts_core159.Property,(0,import_ag_charts_core159.SceneChangeDetection)()],ScrollbarTrack.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core159.Property,(0,import_ag_charts_core159.SceneChangeDetection)()],ScrollbarTrack.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core159.Property],ScrollbarTrack.prototype,"lineDash",2),__decorateClass([import_ag_charts_core159.Property],ScrollbarTrack.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core159.Property],ScrollbarTrack.prototype,"cornerRadius",2),__decorateClass([import_ag_charts_core159.Property],ScrollbarTrack.prototype,"opacity",2);var ScrollbarThumbHoverStyle=class extends import_ag_charts_core159.ChangeDetectableProperties{};__decorateClass([import_ag_charts_core159.Property,(0,import_ag_charts_core159.SceneChangeDetection)()],ScrollbarThumbHoverStyle.prototype,"fill",2),__decorateClass([import_ag_charts_core159.Property,(0,import_ag_charts_core159.SceneChangeDetection)()],ScrollbarThumbHoverStyle.prototype,"stroke",2);var ScrollbarThumb=class extends ScrollbarTrack{constructor(){super(...arguments),this.minSize=20,this.hoverStyle=new ScrollbarThumbHoverStyle}};__decorateClass([import_ag_charts_core159.Property,(0,import_ag_charts_core159.SceneChangeDetection)()],ScrollbarThumb.prototype,"minSize",2),__decorateClass([import_ag_charts_core159.Property],ScrollbarThumb.prototype,"hoverStyle",2);var ScrollbarProperties=class extends import_ag_charts_core159.ChangeDetectableProperties{constructor(){super(...arguments),this.enabled=!1,this.thickness=12,this.spacing=4,this.tickSpacing=0,this.placement="outer",this.visible="auto",this.track=new ScrollbarTrack,this.thumb=new ScrollbarThumb}};__decorateClass([import_ag_charts_core159.Property,(0,import_ag_charts_core159.SceneChangeDetection)()],ScrollbarProperties.prototype,"enabled",2),__decorateClass([import_ag_charts_core159.Property,(0,import_ag_charts_core159.SceneChangeDetection)()],ScrollbarProperties.prototype,"thickness",2),__decorateClass([import_ag_charts_core159.Property,(0,import_ag_charts_core159.SceneChangeDetection)()],ScrollbarProperties.prototype,"spacing",2),__decorateClass([import_ag_charts_core159.Property,(0,import_ag_charts_core159.SceneChangeDetection)()],ScrollbarProperties.prototype,"tickSpacing",2),__decorateClass([import_ag_charts_core159.Property,(0,import_ag_charts_core159.SceneChangeDetection)()],ScrollbarProperties.prototype,"placement",2),__decorateClass([import_ag_charts_core159.Property,(0,import_ag_charts_core159.SceneChangeDetection)()],ScrollbarProperties.prototype,"visible",2),__decorateClass([import_ag_charts_core159.Property],ScrollbarProperties.prototype,"track",2),__decorateClass([import_ag_charts_core159.Property],ScrollbarProperties.prototype,"thumb",2);var HorizontalScrollbarProperties=class extends ScrollbarProperties{};__decorateClass([import_ag_charts_core159.Property,(0,import_ag_charts_core159.SceneChangeDetection)()],HorizontalScrollbarProperties.prototype,"position",2);var VerticalScrollbarProperties=class extends ScrollbarProperties{};__decorateClass([import_ag_charts_core159.Property,(0,import_ag_charts_core159.SceneChangeDetection)()],VerticalScrollbarProperties.prototype,"position",2);var{BBox:BBox14,Group:Group7,Rect:Rect4,LayoutElement:LayoutElement3,InteractionState:InteractionState5}=import_ag_charts_community140._ModuleSupport,Scrollbar=class extends import_ag_charts_core160.AbstractModuleInstance{constructor(e){super(),this.ctx=e,this.track=new ScrollbarTrack,this.thumb=new ScrollbarThumb,this.horizontal=new HorizontalScrollbarProperties,this.vertical=new VerticalScrollbarProperties,this.state={horizontal:this.createOrientationState("horizontal"),vertical:this.createOrientationState("vertical")},this.cleanup.register(e.scene.attachNode(this.state.horizontal.group),e.scene.attachNode(this.state.vertical.group),e.layoutManager.registerElement(LayoutElement3.Scrollbar,t=>this.onLayoutStart(t)),e.eventsHub.on("layout:complete",t=>this.onLayoutComplete(t)),e.eventsHub.on("zoom:change-complete",()=>this.updateThumbs()))}createOrientationState(e){const t=new Group7({name:`scrollbar-${e}`,zIndex:import_ag_charts_core160.ZIndexMap.NAVIGATOR}),i=new Rect4,o=new Rect4;t.append(i),t.append(o);const r=new ScrollbarDOMProxy(this.ctx,e,(a,n)=>this.handleUserChange(e,a,n),a=>this.handleHoverChange(e,a)),s=this.resolveProperties(e);return{orientation:e,group:t,track:i,thumb:o,dom:r,properties:s,position:this.getDefaultPosition(e),positionHasAxis:!1,hovered:!1}}resolveProperties(e){return e==="horizontal"?this.horizontal:this.vertical}getDefaultPosition(e){return e==="horizontal"?"bottom":"left"}resolveAxis(e,t){const i=e==="horizontal"?import_ag_charts_core160.ChartAxisDirection.X:import_ag_charts_core160.ChartAxisDirection.Y,o=this.ctx.axisManager.getAxisContext(i);if(o.length===0)return{position:this.getDefaultPosition(e),positionHasAxis:!1};if(t==null){const s=o[0];return{axis:s,position:s.position??this.getDefaultPosition(e),positionHasAxis:!0}}const r=o.find(s=>s.position===t);return r?{axis:r,position:t,positionHasAxis:!0}:{axis:o[0],position:t,positionHasAxis:!1}}onLayoutStart({scrollbars:e,layoutBox:t}){for(const i of["horizontal","vertical"]){const o=this.state[i],r=this.resolveProperties(i),{min:s,max:a}=this.getZoomRange(o.orientation),n=(0,import_ag_charts_core160.clamp)(0,a-s,1),{axis:{axisId:l}={},position:c,positionHasAxis:h}=this.resolveAxis(i,r.position);o.properties=r,o.axisId=l,o.position=c,o.positionHasAxis=h;const u=this.updateVisibility(o,n);if(!u||l==null)continue;const{thickness:d,spacing:p,placement:g,tickSpacing:y}=r;h?e[l]={enabled:u,thickness:d,spacing:p,tickSpacing:y,placement:g}:t.shrink(p+d,c),this.updateStyles(o)}}onLayoutComplete(e){this.seriesRect=e.series.rect;for(const t of["horizontal","vertical"]){const i=this.state[t],{properties:{enabled:o,visible:r}}=i;if(!o||r==="never")continue;const s=this.getLayoutRect(i,t,e);i.layoutRect=s,s&&(this.updateTrack(i,s),this.updateThumb(i,s))}}getLayoutRect(e,t,i){const{properties:{thickness:o,spacing:r},position:s,positionHasAxis:a}=e,n=e.axisId?i.axes[e.axisId]:void 0;if(!n)return;const{x:l,y:c,width:h,height:u}=i.series.rect,d=t==="horizontal";if(!a)if(d){const x=s==="bottom"?c+u+r:c-r-o;return new BBox14(l,x,h,o)}else{const x=s==="right"?l+h+r:l-r-o;return new BBox14(x,c,o,u)}const{scrollbar:p,translation:g}=n;if(!p?.enabled)return;const y=d?g.y+p.offset:g.x+p.offset;return d?new BBox14(l,y,h,o):new BBox14(y,c,o,u)}updateStyles({track:e,thumb:t,properties:i,hovered:o}){e.setStyleProperties(i.track),e.cornerRadius=i.track.cornerRadius??0,e.opacity=i.track.opacity??1,t.setStyleProperties(i.thumb),t.cornerRadius=i.thumb.cornerRadius??0,t.opacity=i.thumb.opacity??1;const r=i.thumb.hoverStyle;t.fill=o?r?.fill??i.thumb.fill:i.thumb.fill,t.stroke=o?r?.stroke??i.thumb.stroke:i.thumb.stroke}updateTrack(e,t){e.track.x=t.x,e.track.y=t.y,e.track.width=t.width,e.track.height=t.height,e.dom.updateBounds(t)}updateThumb(e,t){const{min:i,max:o}=this.getZoomRange(e.orientation),r=(0,import_ag_charts_core160.clamp)(0,o-i,1);if(!this.updateVisibility(e,r)||t.width<=0||t.height<=0)return;const a=e.properties.thumb.minSize??0;let n;if(e.orientation==="horizontal"){const l=Math.min(Math.max(a,t.width*r),t.width),c=(0,import_ag_charts_core160.clamp)(t.x,t.x+t.width*i,t.x+t.width-l);e.thumb.x=c,e.thumb.y=t.y,e.thumb.width=l,e.thumb.height=t.height,n=(0,import_ag_charts_core160.clamp)(0,l/t.width,1)}else{const l=Math.min(Math.max(a,t.height*r),t.height),c=(0,import_ag_charts_core160.clamp)(t.y,t.y+t.height*i,t.y+t.height-l);e.thumb.x=t.x,e.thumb.y=c,e.thumb.width=t.width,e.thumb.height=l,n=(0,import_ag_charts_core160.clamp)(0,l/t.height,1)}e.dom.updateThumbBounds(e.thumb,t,e.properties.thumb.cornerRadius),e.dom.updateMinMax(i,o,n)}updateThumbs(){if(this.seriesRect)for(const e of["horizontal","vertical"]){const t=this.state[e],i=t.layoutRect;if(!i||!t.properties.enabled||t.properties.visible==="never")continue;const o=e==="horizontal"?new BBox14(this.seriesRect.x,i.y,this.seriesRect.width,t.properties.thickness):new BBox14(i.x,this.seriesRect.y,t.properties.thickness,this.seriesRect.height);this.updateThumb(t,o)}}updateVisibility(e,t){const i=e.properties.enabled&&e.axisId!=null&&e.properties.visible!=="never"&&(e.properties.visible==="always"||t<1);return e.group.visible=i,e.track.visible=i,e.thumb.visible=i,e.dom.updateVisibility(i),i}getZoomRange(e){const t=this.ctx.zoomManager.getZoom(),i=e==="horizontal",o=i?t?.x:t?.y;return!i&&o!=null?{min:1-(o.max??1),max:1-(o.min??0)}:{min:o?.min??0,max:o?.max??1}}handleUserChange(e,t,i){if(!this.ctx.interactionManager.isState(InteractionState5.ZoomDraggable))return;const o=e==="horizontal";o||([t,i]=[1-i,1-t]);const r=o?{x:{min:t,max:i}}:{y:{min:t,max:i}};this.ctx.zoomManager.updateZoom({source:"user-interaction",sourceDetail:"scrollbar"},r)}handleHoverChange(e,t){const i=this.state[e],o=t&&i.group.visible;i.hovered!==o&&(i.hovered=o,this.updateStyles(i),this.ctx.updateService.update(import_ag_charts_core160.ChartUpdateType.SCENE_RENDER))}destroy(){super.destroy(),this.state.horizontal.dom.destroy(),this.state.vertical.dom.destroy()}};__decorateClass([import_ag_charts_core160.Property],Scrollbar.prototype,"enabled",2),__decorateClass([import_ag_charts_core160.Property],Scrollbar.prototype,"thickness",2),__decorateClass([import_ag_charts_core160.Property],Scrollbar.prototype,"spacing",2),__decorateClass([import_ag_charts_core160.Property],Scrollbar.prototype,"tickSpacing",2),__decorateClass([import_ag_charts_core160.Property],Scrollbar.prototype,"placement",2),__decorateClass([import_ag_charts_core160.Property],Scrollbar.prototype,"visible",2),__decorateClass([import_ag_charts_core160.Property],Scrollbar.prototype,"track",2),__decorateClass([import_ag_charts_core160.Property],Scrollbar.prototype,"thumb",2),__decorateClass([import_ag_charts_core160.Property],Scrollbar.prototype,"horizontal",2),__decorateClass([import_ag_charts_core160.Property],Scrollbar.prototype,"vertical",2);var import_ag_charts_core161=require("ag-charts-core"),scrollbarTrackOptionsDef={...import_ag_charts_core161.fillOptionsDef,...import_ag_charts_core161.strokeOptionsDef,...import_ag_charts_core161.lineDashOptionsDef,cornerRadius:import_ag_charts_core161.positiveNumber,opacity:import_ag_charts_core161.ratio},scrollbarThumbOptionsDef={...scrollbarTrackOptionsDef,minSize:import_ag_charts_core161.positiveNumber,hoverStyle:{fill:import_ag_charts_core161.fillOptionsDef.fill,stroke:import_ag_charts_core161.strokeOptionsDef.stroke}},scrollbarBaseOptionsDef={enabled:import_ag_charts_core161.boolean,thickness:import_ag_charts_core161.positiveNumber,spacing:import_ag_charts_core161.positiveNumber,tickSpacing:import_ag_charts_core161.positiveNumber,visible:(0,import_ag_charts_core161.union)("auto","always","never"),placement:(0,import_ag_charts_core161.union)("outer","inner"),track:scrollbarTrackOptionsDef,thumb:scrollbarThumbOptionsDef},scrollbarHorizontalOrientationOptionsDef={...scrollbarBaseOptionsDef,position:(0,import_ag_charts_core161.union)("top","bottom")},scrollbarVerticalOrientationOptionsDef={...scrollbarBaseOptionsDef,position:(0,import_ag_charts_core161.union)("left","right")},scrollbarOptionsDef={enabled:import_ag_charts_core161.boolean,thickness:import_ag_charts_core161.positiveNumber,spacing:import_ag_charts_core161.positiveNumber,tickSpacing:import_ag_charts_core161.positiveNumber,visible:(0,import_ag_charts_core161.union)("auto","always","never"),placement:(0,import_ag_charts_core161.union)("outer","inner"),track:scrollbarTrackOptionsDef,thumb:scrollbarThumbOptionsDef,horizontal:scrollbarHorizontalOrientationOptionsDef,vertical:scrollbarVerticalOrientationOptionsDef},SCROLLBAR_ORIENTATION_THEME={enabled:{$path:"../enabled"},thickness:{$path:"../thickness"},spacing:{$path:"../spacing"},tickSpacing:{$path:"../tickSpacing"},placement:{$path:"../placement"},visible:{$path:"../visible"},track:{fill:{$path:"../../track/fill"},stroke:{$path:"../../track/stroke"},fillOpacity:{$path:"../../track/fillOpacity"},strokeWidth:{$path:"../../track/strokeWidth"},lineDash:{$path:"../../track/lineDash"},lineDashOffset:{$path:"../../track/lineDashOffset"},opacity:{$path:"../../track/opacity"},cornerRadius:{$path:"../../track/cornerRadius"}},thumb:{fill:{$path:"../../thumb/fill"},stroke:{$path:"../../thumb/stroke"},fillOpacity:{$path:"../../thumb/fillOpacity"},strokeWidth:{$path:"../../thumb/strokeWidth"},lineDash:{$path:"../../thumb/lineDash"},lineDashOffset:{$path:"../../thumb/lineDashOffset"},opacity:{$path:"../../thumb/opacity"},cornerRadius:{$path:"../../thumb/cornerRadius"},minSize:{$path:"../../thumb/minSize"},hoverStyle:{fill:{$path:"../../../thumb/hoverStyle/fill"},stroke:{$path:"../../../thumb/hoverStyle/stroke"}}}},SCROLLBAR_THEME={enabled:!1,thickness:12,spacing:16,tickSpacing:0,placement:"outer",visible:"auto",track:{fill:{$foregroundBackgroundMix:.03},stroke:{$foregroundBackgroundMix:.177},strokeWidth:1,lineDash:[0],lineDashOffset:0,opacity:1,cornerRadius:6},thumb:{fill:{$foregroundBackgroundMix:.125},stroke:{$foregroundBackgroundMix:.364},strokeWidth:1,lineDash:[0],lineDashOffset:0,opacity:1,cornerRadius:6,minSize:20,hoverStyle:{fill:{$mix:[{$path:"../fill"},{$ref:"foregroundColor"},.075]},stroke:{$mix:[{$path:"../stroke"},{$ref:"foregroundColor"},.075]}}},vertical:SCROLLBAR_ORIENTATION_THEME,horizontal:SCROLLBAR_ORIENTATION_THEME},ScrollbarModule={type:"plugin",name:"scrollbar",chartType:"cartesian",enterprise:!0,version:import_ag_charts_community141.VERSION,options:scrollbarOptionsDef,themeTemplate:SCROLLBAR_THEME,create:e=>new Scrollbar(e)},import_ag_charts_community143=require("ag-charts-community"),import_ag_charts_core164=require("ag-charts-core"),import_ag_charts_community142=require("ag-charts-community"),import_ag_charts_core163=require("ag-charts-core"),import_ag_charts_core162=require("ag-charts-core"),RangesButtonProperties=class extends ToolbarButtonProperties{};__decorateClass([import_ag_charts_core162.Property],RangesButtonProperties.prototype,"value",2);var{userInteraction,LayoutElement:LayoutElement4,Toolbar}=import_ag_charts_community142._ModuleSupport,Ranges=class extends import_ag_charts_core163.AbstractModuleInstance{constructor(e){super(),this.ctx=e,this.enabled=!1,this.buttons=new import_ag_charts_core163.PropertiesArray(RangesButtonProperties),this.verticalSpacing=10,this.container=e.domManager.addChild("canvas-overlay","range-buttons"),this.container.role="presentation",this.toolbar=new Toolbar(this.ctx,"ariaLabelRangesToolbar","horizontal"),this.toolbar.addClass("ag-charts-range-buttons"),this.container.append(this.toolbar.getElement()),this.cleanup.register(this.toolbar.addToolbarListener("button-pressed",this.onButtonPress.bind(this)),e.layoutManager.registerElement(LayoutElement4.ToolbarBottom,this.onLayoutStart.bind(this)),e.eventsHub.on("zoom:change-complete",this.onZoomChanged.bind(this)),this.teardown.bind(this))}teardown(){this.toolbar.getElement().remove(),this.toolbar.destroy()}onLayoutStart({layoutBox:e}){const{buttons:t,ctx:i,enabled:o,toolbar:r,verticalSpacing:s}=this;if(!o||!i.zoomManager.isZoomEnabled()){r.setHidden(!0);return}r.setHidden(!1),r.updateButtons(t);const a=r.getBounds().height;r.setBounds({x:e.x,y:e.y+e.height-a,width:e.width,height:a}),e.shrink({bottom:a+s})}onZoomChanged(){this.toolbar.clearActiveButton()}onButtonPress({button:{index:e}}){const{zoomManager:t}=this.ctx,i=this.buttons.at(e);if(!i)return;const{value:o}=i,r=userInteraction(`zoom-range-button-${e}`);o==null?t.resetZoom(r):typeof o=="number"?t.extendToEnd(r,import_ag_charts_core163.ChartAxisDirection.X,o):Array.isArray(o)?t.updateWith(r,import_ag_charts_core163.ChartAxisDirection.X,()=>o):typeof o=="function"&&t.updateWith(r,import_ag_charts_core163.ChartAxisDirection.X,o),this.toolbar.toggleActiveButtonByIndex(e)}};__decorateClass([import_ag_charts_core163.Property],Ranges.prototype,"enabled",2),__decorateClass([import_ag_charts_core163.Property],Ranges.prototype,"buttons",2);var DAY=1e3*60*60*24,MONTH=DAY*30,YEAR=DAY*365,RangesModule={type:"plugin",name:"ranges",chartType:"cartesian",enterprise:!0,version:import_ag_charts_community143.VERSION,options:{enabled:import_ag_charts_core164.boolean,buttons:(0,import_ag_charts_core164.arrayOfDefs)({...import_ag_charts_core164.toolbarButtonOptionsDefs,value:(0,import_ag_charts_core164.or)(import_ag_charts_core164.number,(0,import_ag_charts_core164.and)((0,import_ag_charts_core164.arrayOf)((0,import_ag_charts_core164.or)(import_ag_charts_core164.number,import_ag_charts_core164.date)),(0,import_ag_charts_core164.arrayLength)(2,2)),import_ag_charts_core164.callback)},"range button options array")},themeTemplate:{enabled:!1,buttons:{$shallowSimple:[{label:"toolbarRange1Month",ariaLabel:"toolbarRange1MonthAria",value:MONTH},{label:"toolbarRange3Months",ariaLabel:"toolbarRange3MonthsAria",value:3*MONTH},{label:"toolbarRange6Months",ariaLabel:"toolbarRange6MonthsAria",value:6*MONTH},{label:"toolbarRangeYearToDate",ariaLabel:"toolbarRangeYearToDateAria",value:(e,t)=>[new Date(`${new Date(t).getFullYear()}-01-01`).getTime(),void 0]},{label:"toolbarRange1Year",ariaLabel:"toolbarRange1YearAria",value:YEAR},{label:"toolbarRangeAll",ariaLabel:"toolbarRangeAllAria",value:void 0}]}},create:e=>new Ranges(e)},import_ag_charts_community145=require("ag-charts-community"),import_ag_charts_core166=require("ag-charts-core"),import_ag_charts_community144=require("ag-charts-community"),import_ag_charts_core165=require("ag-charts-core"),{LayoutElement:LayoutElement5,Group:Group8,Label:Label5,Rect:Rect5,Text}=import_ag_charts_community144._ModuleSupport,chartConfigurations={ohlc:62,candlestick:62,"hollow-candlestick":62,line:96,"step-line":96,hlc:184,"high-low":800},itemIdMap={up:"positive",down:"negative"},neutralColorMap={hlc:"altNeutral"},StatusBarBackground=class extends import_ag_charts_core165.BaseProperties{constructor(){super(...arguments),this.fill="black",this.fillOpacity=1}};__decorateClass([import_ag_charts_core165.Property],StatusBarBackground.prototype,"fill",2),__decorateClass([import_ag_charts_core165.Property],StatusBarBackground.prototype,"fillOpacity",2);var StatusBar=class extends import_ag_charts_core165.AbstractModuleInstance{constructor(e){super(),this.ctx=e,this.enabled=!1,this.openKey=void 0,this.highKey=void 0,this.lowKey=void 0,this.closeKey=void 0,this.volumeKey=void 0,this.title=new Label5,this.positive=new Label5,this.negative=new Label5,this.neutral=new Label5,this.altNeutral=new Label5,this.background=new StatusBarBackground,this.layoutStyle="block",this.id="status-bar",this.layer=new Group8({name:"StatusBar",zIndex:import_ag_charts_core165.ZIndexMap.STATUS_BAR}),this.labelGroup=this.layer.appendChild(new import_ag_charts_community144._ModuleSupport.TranslatableGroup),this.backgroundNode=this.labelGroup.appendChild(new Rect5),this.labels=[{label:"O",configuration:2,title:this.labelGroup.appendChild(new Text),value:this.labelGroup.appendChild(new Text),id:"openValue",key:"openKey",domain:void 0,formatter:new Intl.NumberFormat("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},{label:"H",configuration:16,title:this.labelGroup.appendChild(new Text),value:this.labelGroup.appendChild(new Text),id:"highValue",key:"highKey",domain:void 0,formatter:new Intl.NumberFormat("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},{label:"H",configuration:256,title:this.labelGroup.appendChild(new Text),value:this.labelGroup.appendChild(new Text),style:"neutral",id:"highValue",key:"highKey",domain:void 0,formatter:new Intl.NumberFormat("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},{label:"L",configuration:8,title:this.labelGroup.appendChild(new Text),value:this.labelGroup.appendChild(new Text),id:"lowValue",key:"lowKey",domain:void 0,formatter:new Intl.NumberFormat("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},{label:"L",configuration:512,title:this.labelGroup.appendChild(new Text),value:this.labelGroup.appendChild(new Text),style:"neutral",id:"lowValue",key:"lowKey",domain:void 0,formatter:new Intl.NumberFormat("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},{label:"C",configuration:4,title:this.labelGroup.appendChild(new Text),value:this.labelGroup.appendChild(new Text),id:"closeValue",key:"closeKey",domain:void 0,formatter:new Intl.NumberFormat("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},{label:"C",configuration:128,title:this.labelGroup.appendChild(new Text),value:this.labelGroup.appendChild(new Text),id:"closeValue",key:"closeKey",style:"neutral",domain:void 0,formatter:new Intl.NumberFormat("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})},{label:"",configuration:64,title:this.labelGroup.appendChild(new Text),value:this.labelGroup.appendChild(new Text),style:"neutral",id:"closeValue",key:"closeKey",domain:void 0,formatter:new Intl.NumberFormat("en-US",{notation:"compact",minimumFractionDigits:2,maximumFractionDigits:2})},{label:"Vol",configuration:32,title:this.labelGroup.appendChild(new Text),value:this.labelGroup.appendChild(new Text),id:"volumeValue",key:"volumeKey",domain:void 0,formatter:new Intl.NumberFormat("en-US",{notation:"compact",minimumFractionDigits:2,maximumFractionDigits:2})}],this.highlightManager=e.highlightManager,this.labelGroup.visible=!1,this.cleanup.register(e.scene.attachNode(this.layer),e.layoutManager.registerElement(LayoutElement5.Overlay,t=>this.startPerformLayout(t)),e.eventsHub.on("layout:complete",t=>this.onLayoutComplete(t)),e.eventsHub.on("highlight:change",()=>this.updateHighlight()),e.eventsHub.on("data:update",t=>{this.chartData=t}))}updateDomainsFromSeries(){if(!this.enabled)return;const e=this.ctx.chartService.series;if(e.length===0)return;let t,i;for(const o of e){const s=o.getDomain(import_ag_charts_core165.ChartAxisDirection.Y)?.domain;!Array.isArray(s)||s.length<2||(o.type==="bar"?i=[s[0],s.at(-1)]:t=[s[0],s.at(-1)])}for(const o of this.labels){if(this[o.key]==null){o.domain=void 0;continue}o.domain=o.key==="volumeKey"?i:t}}startPerformLayout({layoutBox:e}){if(this.labelGroup.translationX=0,this.labelGroup.translationY=0,!this.enabled){this.labelGroup.visible=!1;return}this.updateDomainsFromSeries();const t=4,i=12,o=0,r=8;this.labelGroup.translationY=e.y+o;const s=Math.max(this.title.fontSize,this.positive.fontSize,this.negative.fontSize),a=(0,import_ag_charts_core165.calcLineHeight)(s),n=chartConfigurations[this.getChartType()]??0;let l=0,c,h="alphabetic";if(this.layoutStyle==="block")e.shrink(o+a+r,"top"),c=s+(a-s)/2;else{const{title:u}=this.ctx.chartService;if(h="top",c=o+u.padding,u.enabled){const d=u.node.getBBox();l=d.x+d.width+i}else l=u.padding}for(const{label:u,configuration:d,title:p,value:g,domain:y,formatter:x}of this.labels){if(y==null||!(n&d)){p.visible=!1,g.visible=!1;continue}const f=(0,import_ag_charts_core165.cachedTextMeasurer)(this.positive),S=(0,import_ag_charts_core165.cachedTextMeasurer)(this.negative),m=Math.max(f.textWidth(x.format(y[0])),f.textWidth(x.format(y[1])),S.textWidth(x.format(y[0])),S.textWidth(x.format(y[1])));p.visible=!0,g.visible=!0;const v=(0,import_ag_charts_core165.cachedTextMeasurer)(this.title).measureLines(u);p.setFont(this.title),p.fill=this.title.color,p.text=u,p.textBaseline=h,p.y=c,p.x=l,l+=v.width+t,g.textBaseline=h,g.y=c,g.x=l,l+=m+i}this.backgroundNode.x=0,this.backgroundNode.y=0,this.backgroundNode.width=l-i,this.backgroundNode.height=a+o+r,this.backgroundNode.fill=this.background.fill,this.backgroundNode.fillOpacity=this.background.fillOpacity}onLayoutComplete(e){this.labelGroup.translationX=e.series.rect.x,this.updateHighlight()}updateHighlight(){if(!this.enabled)return;const e=this.highlightManager.getActiveHighlight(),t=e?.datum??this.chartData?.data?.at(-1);if(t==null){this.labelGroup.visible=!1;return}this.labelGroup.visible=!0;const i=e?.itemId;let o=i==null?void 0:itemIdMap[i];o==null&&this.openKey!=null&&this.closeKey!=null&&(t[this.openKey]<t[this.closeKey]?o="positive":o="negative");for(const{domain:r,value:s,key:a,formatter:n,style:l}of this.labels){if(r==null)continue;let c=l??o??"neutral";c==="neutral"&&(c=neutralColorMap[this.getChartType()]??c);const h=this[a],u=h==null?void 0:t?.[h];s.setFont(this[c]),s.fill=this[c].color,s.text=typeof u=="number"?n.format(u):""}}getChartType(){let e=this.ctx.chartService.publicApi?.getOptions()?.chartType;return(e==null||chartConfigurations[e]==null)&&(e="candlestick"),e}};__decorateClass([import_ag_charts_core165.Property],StatusBar.prototype,"enabled",2),__decorateClass([import_ag_charts_core165.Property],StatusBar.prototype,"openKey",2),__decorateClass([import_ag_charts_core165.Property],StatusBar.prototype,"highKey",2),__decorateClass([import_ag_charts_core165.Property],StatusBar.prototype,"lowKey",2),__decorateClass([import_ag_charts_core165.Property],StatusBar.prototype,"closeKey",2),__decorateClass([import_ag_charts_core165.Property],StatusBar.prototype,"volumeKey",2),__decorateClass([import_ag_charts_core165.Property],StatusBar.prototype,"title",2),__decorateClass([import_ag_charts_core165.Property],StatusBar.prototype,"positive",2),__decorateClass([import_ag_charts_core165.Property],StatusBar.prototype,"negative",2),__decorateClass([import_ag_charts_core165.Property],StatusBar.prototype,"neutral",2),__decorateClass([import_ag_charts_core165.Property],StatusBar.prototype,"altNeutral",2),__decorateClass([import_ag_charts_core165.Property],StatusBar.prototype,"background",2),__decorateClass([import_ag_charts_core165.Property],StatusBar.prototype,"layoutStyle",2);var StatusBarModule={type:"plugin",name:"statusBar",chartType:"cartesian",enterprise:!0,version:import_ag_charts_community145.VERSION,themeTemplate:{enabled:!1,layoutStyle:import_ag_charts_core166.DEFAULT_CAPTION_LAYOUT_STYLE,title:{color:{$ref:"textColor"},fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:{$ref:"fontWeight"}},positive:{color:{$palette:"up.stroke"},fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:{$ref:"fontWeight"}},negative:{color:{$palette:"down.stroke"},fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:{$ref:"fontWeight"}},neutral:{color:{$palette:"neutral.stroke"},fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:{$ref:"fontWeight"}},background:{fill:{$ref:"chartBackgroundColor"},fillOpacity:.5},altNeutral:{color:"gray",fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:{$ref:"fontWeight"}}},create:e=>new StatusBar(e)},import_ag_charts_community147=require("ag-charts-community"),import_ag_charts_core168=require("ag-charts-core"),import_ag_charts_community146=require("ag-charts-community"),import_ag_charts_core167=require("ag-charts-core"),{CartesianAxis,ContinuousScale:ContinuousScale4,TimeScale,UnitTimeScale,TooltipManager}=import_ag_charts_community146._ModuleSupport,debug=import_ag_charts_core167.Debug.create("sync");function getDirectionKeys(e,t,i){const o=e.getKeys(t),r=e.getKeys(i);return e.shouldFlipXY?.()?[r,o]:[o,r]}function syncedDirections(e="x"){switch(e){case"x":return[import_ag_charts_core167.ChartAxisDirection.X];case"y":return[import_ag_charts_core167.ChartAxisDirection.Y];case"xy":return[import_ag_charts_core167.ChartAxisDirection.X,import_ag_charts_core167.ChartAxisDirection.Y]}}function domainChanged(e,t,i){return TimeScale.is(e)||UnitTimeScale.is(e)?!(0,import_ag_charts_core167.arraysEqual)(t.map(o=>o?.valueOf()),i.map(o=>o?.valueOf())):!(0,import_ag_charts_core167.arraysEqual)(t,i)}var ChartSync=class extends import_ag_charts_core167.BaseProperties{constructor(e){super(),this.moduleContext=e,this.enabled=!1,this.axes="x",this.nodeInteraction=!0,this.zoom=!0,this.domainMode="id",this.domainSync=new import_ag_charts_core167.AsyncAwaitQueue}updateSiblings(e){const{syncManager:t}=this.moduleContext;for(const i of t.getGroupSiblings(e??this.groupId))debug("ChartSync.updateSiblings()",i.id,i),this.updateChart(i)}updateChart(e,t=import_ag_charts_core167.ChartUpdateType.PROCESS_DOMAIN){debug("ChartSync.updateChart()",e.id,import_ag_charts_core167.ChartUpdateType[t],e),t===import_ag_charts_core167.ChartUpdateType.PROCESS_DOMAIN?e.ctx.updateService.update(t,{forceNodeDataRefresh:!0}):e.ctx.updateService.update(t)}enabledZoomSync(){const{eventsHub:e}=this.moduleContext;this.disableZoomSync?.(),this.disableZoomSync=e.on("zoom:change-complete",t=>this.onZoom(t))}onZoom(e){const{syncManager:t}=this.moduleContext;for(const i of t.getGroupSiblings(this.groupId)){if(!i.modulesManager.getModule("sync")?.zoom)continue;const r=i.modulesManager.getModule("zoom");if(!r)continue;const s=this.prepareZoomUpdate();e.source!=="sync"&&(debug("ChartsSyncManager.enabledZoomSync()",i.id,s),r.updateSyncZoom(s))}}enabledNodeInteractionSync(){this.disableNodeInteractionSync?.();const e=this.moduleContext.eventsHub.on("highlight:change",this.onHighlightChange.bind(this)),t=this.moduleContext.eventsHub.on("active:load-memento",this.onActiveLoadMemento.bind(this));this.disableNodeInteractionSync=()=>{e(),t()}}onHighlightChange(e){const{syncManager:t}=this.moduleContext;if(e.callerId.endsWith("-sync"))return;debug("ChartSync.onHighlightChange()",e);const i=e.currentHighlight?.series,[o]=syncedDirections(this.axes),r=o===import_ag_charts_core167.ChartAxisDirection.X?import_ag_charts_core167.ChartAxisDirection.Y:import_ag_charts_core167.ChartAxisDirection.X,[s,a]=i?getDirectionKeys(i,o,r):[],n=readDatum(e.currentHighlight);let l=s?.[0]?n?.[s[0]]:void 0,c=!1;if((0,import_ag_charts_core167.isDate)(l)&&(c=!0,l=l.getTime()),!e.currentHighlight?.datum){for(const u of t.getGroupSiblings(this.groupId))u.modulesManager.getModule("sync")?.nodeInteraction&&(u.ctx.highlightManager.updateHighlight(`${u.id}-sync`,void 0,!0),u.ctx.tooltipManager.removeTooltip(`${u.id}-sync`,void 0,!0));return}const h=t.getGroupSyncMode(this.groupId)==="multi-series";this.findMatchingHighlightNodes(o,r,h?a:[],c,l,e)}onActiveLoadMemento(e){const{activeItem:t,chartId:i}=e;if(t===void 0){this.moduleContext.highlightManager.updateHighlight(`${i}-sync`,void 0,!1),this.moduleContext.tooltipManager.removeTooltip(`${i}-sync`,void 0,!1);for(const o of this.moduleContext.syncManager.getGroupSiblings(this.groupId))o.onSyncActiveClear()}}findMatchingHighlightNodes(e,t,i,o,r,s){const{syncManager:a}=this.moduleContext;debug("ChartSync.findMatchingHighlightNodes()",{mainDirection:e,secondaryKeys:i});for(const n of a.getGroupSiblings(this.groupId)){if(!n.modulesManager.getModule("sync")?.nodeInteraction)continue;let c=!1;for(const h of n.axes){if(!CartesianAxis.is(h)||h.direction!==e)continue;const u=n.series.filter(d=>{if(!d.visible)return!1;if(i.length>0){const[,p]=getDirectionKeys(d,e,t);return i.every(g=>p.includes(g))}return!0}).map(this.findMatchingNodes(h,e,o,r)).filter(import_ag_charts_core167.isDefined);if(u.length===1&&u[0]?.nodeDatum!==n.ctx.highlightManager.getActiveHighlight()){this.dispatchHighlightUpdate(n,u[0].nodeDatum),c=!0;break}}c||(debug("ChartSync.findMatchingHighlightNodes() - no matching nodes",n.id,s),this.dispatchHighlightUpdate(n))}}findMatchingNodes(e,t,i,o){return r=>{if(r.getKeyAxis(e.direction)!==e.id)return;const a=r.contextNodeData?.nodeData??[];if(!a?.length)return;const n=a[0],l=`${t}Key`;if(!(0,import_ag_charts_core167.isObjectWithStringProperty)(n,l))return;const c=n[l],h=a.find(u=>{const d=u.datum[c];return i?d.getTime()===o:d===o});return h?{series:r,nodeDatum:h}:null}}dispatchHighlightUpdate(e,t){debug("ChartSync.dispatchHighlightUpdate()",e.id,t);const i=t==null;e.ctx.highlightManager.updateHighlight(`${e.id}-sync`,t,i);const o=t?.series.tooltipEnabled??e.tooltip.enabled;if(t&&o){const r=e.seriesAreaBoundingBox,s=r.x+(t.midPoint?.x??t.point?.x??0),a=r.y+(t.midPoint?.y??t.point?.y??0),n=TooltipManager.makeTooltipMeta({type:"pointermove",canvasX:s,canvasY:a},t.series,t,void 0);e.ctx.tooltipManager.updateTooltip(`${e.id}-sync`,n,e.getTooltipContent(t.series,t.datumIndex,t,"tooltip"))}else e.ctx.tooltipManager.removeTooltip(`${e.id}-sync`,void 0,!0);this.updateChart(e,import_ag_charts_core167.ChartUpdateType.SERIES_UPDATE)}async getSyncedDomain(e){if(!CartesianAxis.is(e)||this.axes!=="xy"&&this.axes!==e.direction)return;const{groupState:t,directionDomains:i,idDomains:o,positionDomains:r}=this.updateDomainState(e);return this.validateAxis(e,t),await this.waitForDomainsToBeReady(),this.domainMode==="position"?this.calculateDerivedDomain(e,r):this.domainMode==="direction"?this.calculateDerivedDomain(e,i):this.calculateDerivedDomain(e,o)}updateDomainState(e){var t,i,o,r,s;const{syncManager:a}=this.moduleContext,n=a.getChart().id,l=e.id,c=a.getGroupState(this.groupId);if(!c)throw new Error("AG Charts - no GroupState for groupId: "+this.groupId);const h=c.domains??(c.domains={}),u=h[t=e.direction]??(h[t]={derived:[],sources:{},dirty:!0}),d=(i=u.sources)[n]??(i[n]={});d[l]=e.dataDomain.domain,u.dirty=!0;const p=c.domainsById??(c.domainsById={}),g=p[l]??(p[l]={derived:[],sources:{},dirty:!0}),y=(o=g.sources)[n]??(o[n]={});y[l]=e.dataDomain.domain,g.dirty=!0;const x=c.domainsByPosition??(c.domainsByPosition={}),f=x[r=e.position]??(x[r]={derived:[],sources:{},dirty:!0}),S=(s=f.sources)[n]??(s[n]={});return S[l]=e.dataDomain.domain,f.dirty=!0,{groupState:c,directionDomains:u,idDomains:g,positionDomains:f}}validateAxis(e,t){const i=this.moduleContext.syncManager.getGroupSyncMode(this.groupId)==="multi-series";syncedDirections(this.axes).includes(e.direction)&&(i?this.validateMultiSeries(e,t):this.validateSingleSeries(e,t))}validateMultiSeries(e,t){const{min:i,max:o,nice:r,reverse:s}=e,a=new Set(e.boundSeries.flatMap(n=>n.getKeys(e.direction)));for(const n of t.members){const{axes:l,modulesManager:c}=n,h=c.getModule("sync"),u=syncedDirections(h?.axes),d=l.filter(g=>u.includes(g.direction)).filter(g=>g.boundSeries.some(y=>y.getKeys(g.direction).some(x=>a.has(x))));if(d.length===0)continue;const[p]=d;if(p.min!==i||p.max!==o||p.nice!==r||p.reverse!==s){import_ag_charts_core167.Logger.warnOnce("To allow synchronization, ensure that all synchronized axes with matching keys have matching min, max, nice, and reverse properties."),this.enabled=!1;return}}}validateSingleSeries(e,t){const i=t.members,[{axes:o}]=i,{direction:r,min:s,max:a,nice:n,reverse:l}=e;for(const c of o)if(r===c.direction&&(n!==c.nice||l!==c.reverse||s!==c.min&&((0,import_ag_charts_core167.isFiniteNumber)(s)||(0,import_ag_charts_core167.isFiniteNumber)(c.min))||a!==c.max&&((0,import_ag_charts_core167.isFiniteNumber)(a)||(0,import_ag_charts_core167.isFiniteNumber)(c.max)))){import_ag_charts_core167.Logger.warnOnce("To allow synchronization, ensure that all charts have matching min, max, nice, and reverse properties on the synchronized axes."),this.enabled=!1;return}}calculateDerivedDomain(e,t){if(!t.dirty)return t.derived;let i=t.derived;const o=Object.values(t.sources).map(s=>Object.values(s));let r;return ContinuousScale4.is(e.scale)?r=o.flat(2):r=o.flat().toSorted((s,a)=>s.length>a.length?-1:1).flat(),t.derived=(0,import_ag_charts_core167.unique)(r),ContinuousScale4.is(e.scale)&&(i=(0,import_ag_charts_core167.findMinMax)(i),t.derived=(0,import_ag_charts_core167.findMinMax)(t.derived)),t.dirty=!1,domainChanged(e.scale,i,t.derived)&&(debug(e.id,"updated",{before:i,after:t.derived}),this.updateSiblings()),t.derived}removeAxis(e){if(!CartesianAxis.is(e)||this.axes!=="xy"&&this.axes!==e.direction)return;const{syncManager:t}=this.moduleContext,i=t.getGroupState(this.groupId),o=t.getChart().id,r=e.id;delete i?.domains?.[e.direction]?.sources?.[o]?.[r],delete i?.domainsByPosition?.[e.position]?.sources?.[o]?.[r],delete i?.domainsById?.[r]?.sources?.[o]?.[r]}async waitForDomainsToBeReady(){const{syncManager:e}=this.moduleContext;let t=0;for(;e.getGroupMembers(this.groupId).some(i=>i.syncStatus==="init");)debug("ChartSync.waitForDomainsToBeReady() - waiting for all domains to be calculated",this.groupId),await this.domainSync.waitForCompletion(),t++;t>0&&debug("ChartSync.waitForDomainsToBeReady() - waited for",t,"iterations"),this.domainSync.notify()}prepareZoomUpdate(){const{zoomManager:e}=this.moduleContext,t=e.getZoom();return this.axes==="x"?delete t?.y:this.axes==="y"&&delete t?.x,(0,import_ag_charts_core167.definedZoomState)(t)}onEnabledChange(){const{syncManager:e,highlightManager:t}=this.moduleContext;this.enabled?(e.subscribe(this.groupId),t.unhighlightDelay=0):(e.unsubscribe(this.groupId),t.unhighlightDelay=100),this.updateSiblings(),this.onNodeInteractionChange(),this.onZoomChange()}onGroupIdChange(e,t){if(!this.enabled||e===t)return;const{syncManager:i}=this.moduleContext;i.unsubscribe(t),i.subscribe(e),this.updateSiblings(t),this.updateSiblings(e)}onAxesChange(){if(!this.enabled)return;const{syncManager:e}=this.moduleContext;this.updateChart(e.getChart())}onNodeInteractionChange(){this.enabled&&this.nodeInteraction?this.enabledNodeInteractionSync():this.disableNodeInteractionSync?.()}onZoomChange(){this.enabled&&this.zoom?this.enabledZoomSync():this.disableZoomSync?.()}destroy(){const{syncManager:e}=this.moduleContext;e.unsubscribe(this.groupId),this.updateSiblings(),this.disableZoomSync?.()}};ChartSync.className="Sync",__decorateClass([import_ag_charts_core167.Property,(0,import_ag_charts_core167.ObserveChanges)(e=>e.onEnabledChange())],ChartSync.prototype,"enabled",2),__decorateClass([import_ag_charts_core167.Property,(0,import_ag_charts_core167.ObserveChanges)((e,t,i)=>e.onGroupIdChange(t,i))],ChartSync.prototype,"groupId",2),__decorateClass([import_ag_charts_core167.Property,(0,import_ag_charts_core167.ObserveChanges)(e=>e.onAxesChange())],ChartSync.prototype,"axes",2),__decorateClass([import_ag_charts_core167.Property,(0,import_ag_charts_core167.ObserveChanges)(e=>e.onNodeInteractionChange())],ChartSync.prototype,"nodeInteraction",2),__decorateClass([import_ag_charts_core167.Property,(0,import_ag_charts_core167.ObserveChanges)(e=>e.onZoomChange())],ChartSync.prototype,"zoom",2),__decorateClass([import_ag_charts_core167.Property,(0,import_ag_charts_core167.ObserveChanges)(e=>e.onAxesChange())],ChartSync.prototype,"domainMode",2);var SyncModule={type:"plugin",name:"sync",chartType:"cartesian",enterprise:!0,version:import_ag_charts_community147.VERSION,options:{enabled:import_ag_charts_core168.boolean,groupId:import_ag_charts_core168.string,axes:(0,import_ag_charts_core168.union)("x","y","xy"),nodeInteraction:import_ag_charts_core168.boolean,zoom:import_ag_charts_core168.boolean},themeTemplate:{enabled:!1},create:e=>new ChartSync(e)},import_ag_charts_community159=require("ag-charts-community"),import_ag_charts_core183=require("ag-charts-core"),import_ag_charts_community158=require("ag-charts-community"),import_ag_charts_core182=require("ag-charts-core"),import_ag_charts_community148=require("ag-charts-community"),import_ag_charts_core169=require("ag-charts-core"),VALID_COLOR="#2196f3",INVALID_COLOR="#8a8a8a",ZoomRect=class extends import_ag_charts_community148._ModuleSupport.Rect{constructor(){super(),this.fill=VALID_COLOR,this.fillOpacity=.2,this.zIndex=import_ag_charts_core169.ZIndexMap.ZOOM_SELECTION}updateValid(){this.fill=VALID_COLOR}updateInvalid(){this.fill=INVALID_COLOR}};ZoomRect.className="ZoomRect";var import_ag_charts_community149=require("ag-charts-community"),import_ag_charts_core170=require("ag-charts-core"),ZoomAutoScalingProperties=class extends import_ag_charts_core170.BaseProperties{constructor(){super(),this.enabled=!1,this.padding=0}};__decorateClass([import_ag_charts_core170.Property],ZoomAutoScalingProperties.prototype,"enabled",2),__decorateClass([import_ag_charts_core170.Property],ZoomAutoScalingProperties.prototype,"padding",2);var ZoomAutoScaler=class{constructor(e,t,i,o,r){this.properties=e,this.zoomManager=t,this.deps=i,this.manuallyAdjusted=!1,r.register(o.on("zoom:save-memento",s=>this.onSaveMemento(s)),o.on("zoom:load-memento",s=>this.onLoadMemento(s)),o.on("zoom:change-request",s=>this.onChangeRequest(s)))}get enabled(){return this.deps.enabled&&this.properties.enabled&&!this.manuallyAdjusted}onManualAdjustment(e){e===import_ag_charts_core170.ChartAxisDirection.Y&&(this.manuallyAdjusted=!0)}onChangeRequest(e){const t=this.hasYAxisChange(e);if(e.sourceDetail==="scrollbar"&&t&&(this.manuallyAdjusted=!0),e.isReset&&t&&(this.manuallyAdjusted=!1),this.enabled){const i=this.autoScaleYZoom(e.state);i&&e.constrainChanges(i)}}hasYAxisChange(e){for(const t of e.changedAxes)if(e.state[t]?.direction===import_ag_charts_core170.ChartAxisDirection.Y)return!0;return!1}onSaveMemento(e){e.memento.autoScaledAxes=this.enabled?["y"]:void 0}onLoadMemento(e){const{zoom:t,memento:i,navigatorModule:o,zoomModule:r}=e;if(!o||r){let s=i?.autoScaledAxes?.includes("y");if(i?.rangeY)s??(s=!1),t.y=this.zoomManager.rangeToRatioDirection(import_ag_charts_core170.ChartAxisDirection.Y,i.rangeY)??{min:0,max:1};else if(i?.ratioY)s??(s=!1),t.y={min:i.ratioY.start??0,max:i.ratioY.end??1};else{s??(s=!0);const a=s?this.getAutoScaleYZoom(t.x):void 0;t.y=a??{min:0,max:1}}s!=null&&(this.manuallyAdjusted=!s)}}getAutoScaleYZoom(e){if(!this.enabled)return;const{padding:t}=this.properties;let i;return this.deps.enableIndependentAxes?i=this.primaryAxisZoom(import_ag_charts_core170.ChartAxisDirection.Y,e,{padding:t}):i=this.combinedAxisZoom(import_ag_charts_core170.ChartAxisDirection.Y,e,{padding:t}),e.min===0&&e.max===1?i==null?void 0:{min:0,max:1}:i}autoScaleYZoom(e){const t=this.zoomManager.getZoom();if(t&&e){const o=this.zoomManager.getAxisZooms();for(const r of[import_ag_charts_core170.ChartAxisDirection.X,import_ag_charts_core170.ChartAxisDirection.Y])for(const s of(0,import_ag_charts_core170.strictObjectKeys)(e))if(o[s]?.direction===r){t[r]=e[s];break}}if(t?.x==null)return;const i=this.getAutoScaleYZoom(t.x);if(!(i==null||(0,import_ag_charts_core170.objectsEqual)(t.y,i)))return this.zoomManager.toCoreZoomState({x:t.x,y:i})}zoomBounds(e,t,i,o){const r=e.scale,s=r.range;r.range=[0,1];const a=t.scale,n=a.range;a.range=[0,1];let l=1,c=!1,h=0,u=!1;for(const g of t.boundSeries){if(!g.visible)continue;const{connectsToYAxis:y}=g,x=g.getRange(import_ag_charts_core170.ChartAxisDirection.Y,[i.min,i.max]);for(const f of x){const S=a.convert(f);Number.isFinite(S)&&(S<l&&(l=S,c=!y||f<0),S>h&&(h=S,u=!y||f>0))}}if((0,import_ag_charts_core170.isFiniteNumber)(t.min)&&(l=0),(0,import_ag_charts_core170.isFiniteNumber)(t.max)&&(h=1),r.range=s,a.range=n,l>=h)return;const d=(c?o:0)+(u?o:0),p=Math.min((h-l)*(1+d),1);if(!(p<=0)){if(c&&u){const g=(h+l)/2;l=g-p/2,h=g+p/2}else!c&&u?h=l+p:c&&!u&&(l=h-p);return l<0?(h+=-l,l=0):h>1&&(l-=h-1,h=1),{min:l,max:h}}}primaryAxisZoom(e,t,{padding:i=0}={}){const o=e===import_ag_charts_core170.ChartAxisDirection.X?import_ag_charts_core170.ChartAxisDirection.Y:import_ag_charts_core170.ChartAxisDirection.X,r=this.zoomManager.getPrimaryAxis(o),s=this.zoomManager.getPrimaryAxis(e);if(!(r==null||s==null))return this.zoomBounds(r,s,t,i)}combinedAxisZoom(e,t,{padding:i=0}={}){const o=this.zoomManager.getAxes(),r=e===import_ag_charts_core170.ChartAxisDirection.X?import_ag_charts_core170.ChartAxisDirection.Y:import_ag_charts_core170.ChartAxisDirection.X,s=new Map;for(const c of o)if(c.direction===r)for(const h of c.boundSeries)s.set(h,c);let a=1,n=0;for(const c of o)if(c.direction===e)for(const h of c.boundSeries){const u=s.get(h);if(u==null)continue;const d=this.zoomBounds(u,c,t,i);if(d==null)return;a=Math.min(a,d.min),n=Math.max(n,d.max)}const l=1e-6;if(a<l&&(a=0),n>1-l&&(n=1),!(a>n))return{min:a,max:n}}},import_ag_charts_core172=require("ag-charts-core"),import_ag_charts_community150=require("ag-charts-community"),import_ag_charts_core171=require("ag-charts-core"),UNIT_SIZE=import_ag_charts_core171.UNIT_MAX-import_ag_charts_core171.UNIT_MIN,DEFAULT_ANCHOR_POINT_X="end",DEFAULT_ANCHOR_POINT_Y="middle",ZOOM_VALID_CHECK_DEBOUNCE=300,constrain=(e,t=import_ag_charts_core171.UNIT_MIN,i=import_ag_charts_core171.UNIT_MAX)=>(0,import_ag_charts_core171.clamp)(t,e,i);function dx(e){return e.x.max-e.x.min}function dy(e){return e.y.max-e.y.min}function isZoomRangeEqual(e,t){return(0,import_ag_charts_core171.isNumberEqual)(e.min,t.min)&&(0,import_ag_charts_core171.isNumberEqual)(e.max,t.max)}function isZoomEqual(e,t){return isZoomRangeEqual(e.x,t.x)&&isZoomRangeEqual(e.y,t.y)}function isMaxZoom(e){return isZoomEqual(e,(0,import_ag_charts_core171.definedZoomState)())}function pointToRatio(e,t,i){if(!e)return{x:0,y:0};const o=constrain(t-e.x,0,e.x+e.width),r=constrain(i-e.y,0,e.y+e.height),s=1/e.width*o,a=1-1/e.height*r;return{x:constrain(s),y:constrain(a)}}function translateZoom(e,t,i){return{x:{min:e.x.min+t,max:e.x.max+t},y:{min:e.y.min+i,max:e.y.max+i}}}function scaleZoom(e,t,i){return{x:{min:e.x.min,max:e.x.min+dx(e)*t},y:{min:e.y.min,max:e.y.min+dy(e)*i}}}function scaleZoomCenter(e,t,i){const o=dx(e),r=dy(e),s=e.x.min+o/2,a=e.y.min+r/2;return{x:{min:s-o*t/2,max:s+o*t/2},y:{min:a-r*i/2,max:a+r*i/2}}}function scaleZoomAxisWithAnchor(e,t,i,o){const{min:r,max:s}=t,a=r+(s-r)/2,n=e.max-e.min;switch(i){case"start":return{min:r,max:t.min+n};case"end":return{min:t.max-n,max:s};case"middle":return{min:a-n/2,max:a+n/2};case"pointer":return scaleZoomAxisWithPoint(e,t,o??a);default:return{min:r,max:s}}}function scaleZoomAxisWithPoint(e,t,i){const o=e.max-e.min,r=t.max-t.min,s=i*(1-(r-o)),a=i-s,n=e.min+a,l=e.max+a;return{min:n,max:l}}function multiplyZoom(e,t,i){return{x:{min:e.x.min*t,max:e.x.max*t},y:{min:e.y.min*i,max:e.y.max*i}}}function constrainZoom(e){return{x:constrainAxis(e.x),y:constrainAxis(e.y)}}function constrainAxis(e){const t=e.max-e.min;let i=e.max>import_ag_charts_core171.UNIT_MAX?import_ag_charts_core171.UNIT_MAX-t:e.min,o=e.min<import_ag_charts_core171.UNIT_MIN?t:e.max;return i=Math.max(import_ag_charts_core171.UNIT_MIN,i),o=Math.min(import_ag_charts_core171.UNIT_MAX,o),{min:i,max:o}}function canResetZoom(e){const t=e.getCoreZoom(),i=e.getRestoredZoom();return(0,import_ag_charts_core171.jsonDiff)(t,i)!=null}var ZoomAxisDragger=class{update(e,t,i,o,r,s){return this.oldZoom??(this.oldZoom=(0,import_ag_charts_core172.definedZoomState)(t===import_ag_charts_core172.ChartAxisDirection.X?{...r,x:s}:{...r,y:s})),this.updateCoords(e.offsetX,e.offsetY),this.updateZoom(t,i,o)}stop(){this.coords=void 0,this.oldZoom=void 0}updateCoords(e,t){this.coords?(this.coords.x2=e,this.coords.y2=t):this.coords={x1:e,y1:t,x2:e,y2:t}}updateZoom(e,t,i){const{coords:o,oldZoom:r}=this;let s=(0,import_ag_charts_core172.definedZoomState)(r);if(!o||!r)return e===import_ag_charts_core172.ChartAxisDirection.X?s.x:s.y;const a=pointToRatio(i,o.x1,o.y1),n=pointToRatio(i,o.x2,o.y2);if(e===import_ag_charts_core172.ChartAxisDirection.X){const c=(n.x-a.x)*dx(r);return s.x.max+=c,s.x=scaleZoomAxisWithAnchor(s.x,r.x,t,a.x),s=constrainZoom(s),s.x}const l=(n.y-a.y)*dy(r);return s.y.max-=l,s.y=scaleZoomAxisWithAnchor(s.y,r.y,t,a.y),s=constrainZoom(s),s.y}},import_ag_charts_community151=require("ag-charts-community"),import_ag_charts_core173=require("ag-charts-core"),{userInteraction:userInteraction2}=import_ag_charts_community151._ModuleSupport,ZoomContextMenu=class{constructor(e,t,i,o,r,s,a){this.eventsHub=e,this.contextMenuRegistry=t,this.zoomManager=i,this.getModuleProperties=o,this.getRect=r,this.updateZoom=s,this.isZoomValid=a}registerActions(e){const{contextMenuRegistry:t}=this,i=e?"show":"hide";if(t.toggle("zoom-to-cursor",i),t.toggle("pan-to-cursor",i),t.toggle("reset-zoom",i),!e)return;t.builtins.items["zoom-to-cursor"].action=this.onZoomToHere.bind(this),t.builtins.items["pan-to-cursor"].action=this.onPanToHere.bind(this),t.builtins.items["reset-zoom"].action=this.onResetZoom.bind(this);const o=a=>{const n=this.getRect();if(!n)return!0;const l=pointToRatio(n,a.x,a.y);return this.iterateFindNextZoomAtPoint(l)!=null},r=()=>!isMaxZoom((0,import_ag_charts_core173.definedZoomState)(this.zoomManager.getZoom())),s=this.eventsHub.on("context-menu:setup",a=>{t.builtins.items["zoom-to-cursor"].enabled=o(a),t.builtins.items["pan-to-cursor"].enabled=r(),t.builtins.items["reset-zoom"].enabled=canResetZoom(this.zoomManager)});return()=>{s(),t.toggle("zoom-to-cursor","hide"),t.toggle("pan-to-cursor","hide"),t.toggle("reset-zoom","hide")}}computeOrigin(e){const t=this.getRect(),{enabled:i}=this.getModuleProperties();if(!i||!t||!e?.target||!(e instanceof MouseEvent))return;const o={x:0,y:0,width:t.width,height:t.height};return pointToRatio(o,e.offsetX,e.offsetY)}onZoomToHere({event:e}){const t=this.computeOrigin(e);if(!t)return;const i=this.iterateFindNextZoomAtPoint(t);i!=null&&this.updateZoom(userInteraction2("contextmenu-zoom-to-cursor"),i)}onPanToHere({event:e}){const t=this.computeOrigin(e);if(!t)return;const i=(0,import_ag_charts_core173.definedZoomState)(this.zoomManager.getZoom()),o=dx(i),r=dy(i),s=t.x*o,a=t.y*r,n=UNIT_SIZE/2;let l={x:{min:t.x-n,max:t.x+n},y:{min:t.y-n,max:t.y+n}};l=scaleZoomCenter(l,o,r),l=translateZoom(l,i.x.min-t.x+s,i.y.min-t.y+a),this.updateZoom(userInteraction2("contextmenu-pan-to-cursor"),constrainZoom(l))}onResetZoom(e){this.zoomManager.resetZoom(userInteraction2("contextmenu-reset"))}iterateFindNextZoomAtPoint(e){const{scrollingStep:t}=this.getModuleProperties();for(let i=t;i<=1-t;i+=t){const o=this.getNextZoomAtPoint(e,i);if(this.isZoomValid(o))return o}}getNextZoomAtPoint(e,t){const{isScalingX:i,isScalingY:o}=this.getModuleProperties(),r=(0,import_ag_charts_core173.definedZoomState)(this.zoomManager.getZoom()),s=e.x*dx(r),a=e.y*dy(r),n=UNIT_SIZE/2;let l={x:{min:e.x-n,max:e.x+n},y:{min:e.y-n,max:e.y+n}};return l=scaleZoomCenter(l,i?dx(r)*t:UNIT_SIZE,o?dy(r)*t:UNIT_SIZE),l=translateZoom(l,r.x.min-e.x+s,r.y.min-e.y+a),constrainZoom(l)}},import_ag_charts_community152=require("ag-charts-community"),import_ag_charts_core174=require("ag-charts-core"),ZoomDOMProxy=class{constructor(e){this.axesHandlers=e,this.axes=[],this.overlappingAxisIds=new Set}destroy(){for(const e of this.axes)e.div.destroy()}update(e,t,i,o,r){this.seriesRect=r;const s=!e||!t&&!i;for(const u of this.axes)u.div.setHidden(s);if(s)return;const{X:a,Y:n}=import_ag_charts_core174.ChartAxisDirection,l=[...o.axisManager.getAxisContext(a),...o.axisManager.getAxisContext(n)],{removed:c,added:h}=this.diffAxisIds(l);c.length>0&&(this.axes=this.axes.filter(u=>c.includes(u.axisId)?(u.div.destroy(),this.overlappingAxisIds.delete(u.axisId),this.hoveredAxisId===u.axisId&&(this.hoveredAxisId=void 0),this.activeAxisId===u.axisId&&(this.activeAxisId=void 0),!1):!0));for(const u of h){const{axisId:d,direction:p}=u;this.axes.push(this.initAxis(o,d,this.axesHandlers,p))}for(const u of this.axes){const p=l.find(g=>g.axisId===u.axisId).getCanvasBounds();u.div.setHidden((0,import_ag_charts_core174.boxEmpty)(p)),p==null?u.bounds=void 0:(u.div.setBounds(p),u.bounds=new import_ag_charts_community152._ModuleSupport.BBox(p.x,p.y,p.width,p.height))}this.updateOverlappingAxisPointerEvents(t,i)}setAxisCursor(e){this.cursor=e;for(const t of this.axes)t.div.setCursor(this.getCursor(t.direction))}toggleAxisDraggingCursor(e,t){for(const i of this.axes)i.direction===e&&i.div.setCursor(t?this.getCursor(e):void 0)}updateOverlappingAxisPointerEvents(e,t){this.overlappingAxisIds.clear();const i=(e||t)&&this.seriesRect;for(const o of this.axes){if(!i){o.div.setPointerEvents(void 0);continue}!!o.bounds?.collidesBBox(this.seriesRect)?(this.overlappingAxisIds.add(o.axisId),o.div.setPointerEvents("none")):o.div.setPointerEvents(void 0)}this.cleanupAxisState()}cleanupAxisState(){this.hoveredAxisId&&!this.overlappingAxisIds.has(this.hoveredAxisId)&&(this.hoveredAxisId=void 0),this.activeAxisId&&!this.overlappingAxisIds.has(this.activeAxisId)&&(this.activeAxisId=void 0)}pickAxisAtPoint(e){for(const t of this.axes)if(this.overlappingAxisIds.has(t.axisId)&&t.bounds?.containsPoint(e.canvasX,e.canvasY))return{axisId:t.axisId,direction:t.direction}}setHoveredAxis(e){this.overlappingAxisIds.has(e)&&(this.hoveredAxisId=e)}clearHoveredAxis(){this.activeAxisId||(this.hoveredAxisId=void 0)}beginDelegatedAxisDrag(e){return this.overlappingAxisIds.has(e)?(this.activeAxisId=e,this.hoveredAxisId=void 0,!0):!1}endDelegatedAxisDrag(e){this.activeAxisId===e&&(this.activeAxisId=void 0),this.hoveredAxisId=void 0}hasOverlappingAxes(){return this.overlappingAxisIds.size>0}getHoveredAxis(){if(!this.hoveredAxisId)return;const e=this.axes.find(t=>t.axisId===this.hoveredAxisId);return e?{axisId:e.axisId,direction:e.direction}:void 0}getCursor(e){return this.cursor?this.cursor:e===import_ag_charts_core174.ChartAxisDirection.X?"ew-resize":"ns-resize"}initAxis(e,t,i,o){const r="afterend",s=e.proxyInteractionService.createProxyElement({type:"region",domManagerId:t,where:r});return s.setCursor(this.getCursor(o)),s.addListener("drag-start",a=>{a.device==="touch"&&a.sourceEvent.preventDefault(),this.activeAxisId=t,i.onAxisDragStart(o)}),s.addListener("drag-move",a=>i.onAxisDragMove(t,o,a)),s.addListener("drag-end",()=>{this.activeAxisId=void 0,this.hoveredAxisId=void 0,i.onAxisDragEnd()}),s.addListener("dblclick",()=>i.onAxisDoubleClick(t,o)),s.addListener("wheel",a=>i.onAxisWheel(o,a)),{axisId:t,div:s,direction:o}}diffAxisIds(e){const t=this.axes.map(s=>s.axisId),i=e.map(s=>s.axisId),o=t.filter(s=>!i.includes(s)),r=e.filter(s=>!t.includes(s.axisId));return{removed:o,added:r}}},import_ag_charts_community153=require("ag-charts-community"),import_ag_charts_core175=require("ag-charts-core"),{userInteraction:userInteraction3}=import_ag_charts_community153._ModuleSupport;function shouldIgnoreDataUpdate(e){return e.x.min===0&&e.x.max===1&&e.y.min===0&&e.y.max===1}function shouldStickToEnd(e,t){return e.stickToEnd&&t.x.max===1}function toVisibleMinMax(e,t,i){const{domainMin:o,domainMax:r}=t,s=r-o;return{axisId:e,visibleMin:o+s*i.min,visibleMax:o+s*i.max}}function fromVisibleMinMax(e,t){const{domainMin:i,domainMax:o}=e,{visibleMin:r,visibleMax:s}=t,a=o-i;return{direction:"x",min:(0,import_ag_charts_core175.clamp)(0,(r-i)/a,1),max:(0,import_ag_charts_core175.clamp)(0,(s-i)/a,1)}}var ZoomOnDataChangeProperties=class extends import_ag_charts_core175.BaseProperties{constructor(){super(...arguments),this.strategy="preserveDomain",this.stickToEnd=!1}};__decorateClass([import_ag_charts_core175.Property],ZoomOnDataChangeProperties.prototype,"strategy",2),__decorateClass([import_ag_charts_core175.Property],ZoomOnDataChangeProperties.prototype,"stickToEnd",2);var ZoomOnDataChange=class{constructor(e,t,i,o){this.onConstrainChangesCallback=e,this.properties=t,this.ctx=i;const r=()=>{i.eventsHub.off("layout:complete",r),o.register(i.eventsHub.on("data:load",s=>this.onDataLoad(s)),i.eventsHub.on("data:update",s=>this.onDataUpdate(s)))};o.register(i.eventsHub.on("layout:complete",r),i.eventsHub.on("zoom:change-request",s=>this.onZoomChangeRequest(s)))}destroy(){}onDataLoad(e){this.performUpdateStrategy()}onDataUpdate(e){this.performUpdateStrategy()}onZoomChangeRequest(e){e.sourceDetail==="internal-requiredWidth"&&(this.desiredChanges=void 0);const t=this.popDesiredChanges();t&&(e.constrainChanges(t),this.onConstrainChangesCallback(e))}computeDomainMinMax(e){const t=this.ctx.axisManager.getAxisIdContext(e);if(!t?.continuous||t.scale.domain.length===0)return;const[i,o]=t.scale.getDomainMinMax();if(typeof i=="number"&&typeof o=="number")return{domainMin:i,domainMax:o};if(i instanceof Date&&o instanceof Date)return{domainMin:i.getTime(),domainMax:o.getTime()};import_ag_charts_core175.Logger.error(`Unexpected range types: start (${typeof i}), end (${typeof o})`)}popDesiredChanges(){const{desiredChanges:e}=this;if(e)switch(this.desiredChanges=void 0,e.type){case"domain":{const i={};for(const o of e.domains){const r=this.computeDomainMinMax(o.axisId);r&&(i[o.axisId]=fromVisibleMinMax(r,o))}return i}case"stickToEnd":{const{axisId:i,difference:o}=e,r=this.computeDomainMinMax(i);if(r){const s={axisId:i,visibleMin:r.domainMax-o,visibleMax:r.domainMax};return{[i]:fromVisibleMinMax(r,s)}}break}default:return(i=>i)(e)}}performUpdateStrategy(){const e=(0,import_ag_charts_core175.definedZoomState)(this.ctx.zoomManager.getZoom());if(!shouldIgnoreDataUpdate(e)){if(shouldStickToEnd(this.properties,e))return this.performStickToEnd();switch(this.properties.strategy){case"reset":return this.ctx.zoomManager.resetZoom(userInteraction3("onDataChange-reset"));case"preserveRatios":return;case"preserveDomain":return this.performPreserveDomain();default:return(i=>i)(this.properties.strategy)}}}performPreserveDomain(){this.desiredChanges={type:"domain",domains:[]};const e=this.ctx.zoomManager.getAxes().filter(t=>t.direction===import_ag_charts_core175.ChartAxisDirection.X);for(const{id:t}of e){const i=this.computeDomainMinMax(t);if(i){const o=this.ctx.zoomManager.getAxisZoom(t),r=toVisibleMinMax(t,i,o);this.desiredChanges.domains.push(r)}}}performStickToEnd(){const e=this.ctx.zoomManager.getPrimaryAxisId(import_ag_charts_core175.ChartAxisDirection.X);if(!e)return;const t=this.computeDomainMinMax(e);if(!t)return;const i=this.ctx.zoomManager.getAxisZoom(e);if(!i)return;const{visibleMin:o,visibleMax:r}=toVisibleMinMax(e,t,i),s=r-o;this.desiredChanges={type:"stickToEnd",axisId:e,difference:s}}},import_ag_charts_community154=require("ag-charts-community"),import_ag_charts_core176=require("ag-charts-core"),maxZoomCoords=16,decelerationValues={off:1,short:.01,long:.002},ZoomPanner=class{constructor(){this.deceleration=1,this.zoomCoordsHistoryIndex=0,this.coordsHistory=[]}get decelerationValue(){const{deceleration:e}=this;return Math.max(typeof e=="number"?e:decelerationValues[e]??1,1e-4)}addListener(e,t){return this.onUpdate=t,()=>{this.onUpdate=void 0}}stopInteractions(){this.inertiaHandle!=null&&(cancelAnimationFrame(this.inertiaHandle),this.inertiaHandle=void 0)}update(e){this.updateCoords(e.currentX,e.currentY);const{x1:t=0,y1:i=0,x2:o=0,y2:r=0}=this.coords??{};this.onUpdate?.({type:"update",deltaX:this.isPanningX()?t-o:0,deltaY:this.isPanningY()?i-r:0})}start(e){this.direction=e,this.coordsMonitorTimeout=setInterval(this.recordCurrentZoomCoords.bind(this),16)}stop(){const{coordsHistory:e}=this;let t=0,i=0,o=0;if(e.length>0){const r=this.zoomCoordsHistoryIndex%maxZoomCoords;let s=r-1;s<0&&(s=e.length-1);let a=r;a>=e.length&&(a=0);const n=e[s],l=e[a];t=this.isPanningX()?n.x-l.x:0,i=this.isPanningY()?n.y-l.y:0,o=n.t-l.t}if(this.coords=void 0,this.direction=void 0,clearInterval(this.coordsMonitorTimeout),this.coordsMonitorTimeout=void 0,this.zoomCoordsHistoryIndex=0,this.coordsHistory.length=0,o>0&&this.decelerationValue<1){const r=t/o,s=i/o,a=Math.hypot(r,s),n=Math.atan2(s,r),l=performance.now();this.inertiaHandle=(0,import_ag_charts_core176.getWindow)().requestAnimationFrame(c=>{this.animateInertia(c,c,l,a,n)})}}recordCurrentZoomCoords(){const{coords:e,coordsHistory:t,zoomCoordsHistoryIndex:i}=this;if(!e)return;const{x2:o,y2:r}=e,s=Date.now();t[i%maxZoomCoords]={x:o,y:r,t:s},this.zoomCoordsHistoryIndex+=1}animateInertia(e,t,i,o,r){const s=1-this.decelerationValue,a=-o/Math.log(s),n=o*(s**(t-i)-1)/Math.log(s),l=o*(s**(e-i)-1)/Math.log(s);this.onUpdate?.({type:"update",deltaX:this.isPanningX()?-Math.cos(r)*(l-n):0,deltaY:this.isPanningY()?-Math.sin(r)*(l-n):0}),!(l>=a-1)&&(this.inertiaHandle=requestAnimationFrame(c=>{this.animateInertia(c,e,i,o,r)}))}updateCoords(e,t){this.coords?this.coords={x1:this.coords.x2,y1:this.coords.y2,x2:e,y2:t}:this.coords={x1:e,y1:t,x2:e,y2:t}}isPanningX(){return this.direction==null||this.direction===import_ag_charts_core176.ChartAxisDirection.X}isPanningY(){return this.direction==null||this.direction===import_ag_charts_core176.ChartAxisDirection.Y}translateZooms(e,t,i,o){const r=pointToRatio(e,e.x+Math.abs(i),e.y+e.height-Math.abs(o)),s=Math.sign(i)*r.x,a=-Math.sign(o)*r.y,n={};for(const[l,c]of(0,import_ag_charts_core176.entries)(t)){if(c==null||c.min===import_ag_charts_core176.UNIT_MIN&&c.max===import_ag_charts_core176.UNIT_MAX)continue;const{direction:h}=c;let u=(0,import_ag_charts_core176.definedZoomState)({[h]:c});u=constrainZoom(translateZoom(u,s*dx(u),a*dy(u)));const{min:d,max:p}=u[h];n[l]={direction:h,min:d,max:p}}return n}},import_ag_charts_community155=require("ag-charts-community"),import_ag_charts_core177=require("ag-charts-core"),DELTA_SCALE=200,ZoomScrollPanner=class{update(e,t,i,o){const r=e.deltaX*t*DELTA_SCALE;return this.translateZooms(i,o,r)}translateZooms(e,t,i){const o={},r=pointToRatio(e,e.x+Math.abs(i),0),s=i<0?-r.x:r.x;for(const[a,n]of(0,import_ag_charts_core177.entries)(t)){if(n?.direction!==import_ag_charts_core177.ChartAxisDirection.X)continue;const{direction:l,min:c,max:h}=n;let u=(0,import_ag_charts_core177.definedZoomState)({x:{min:c,max:h}});u=constrainZoom(translateZoom(u,s*dx(u),0)),o[a]={direction:l,min:u.x.min,max:u.x.max}}return o}},import_ag_charts_community156=require("ag-charts-community"),import_ag_charts_core178=require("ag-charts-core"),ZoomScroller=class{updateAxes(e,t,i,o){const r=e.sourceEvent,s={},{anchorPointX:a,anchorPointY:n,isScalingX:l,isScalingY:c,scrollingStep:h}=t,u=pointToRatio(i,r.offsetX??r.clientX,r.offsetY??r.clientY);for(const[d,p]of(0,import_ag_charts_core178.entries)(o)){if(p==null)continue;const{direction:g,min:y,max:x}=p;let f={min:y,max:x};const S=h*e.deltaY*(x-y);if(g===import_ag_charts_core178.ChartAxisDirection.X&&l)f.max+=S,f=scaleZoomAxisWithAnchor(f,p,a,u.x);else if(g===import_ag_charts_core178.ChartAxisDirection.Y&&c)f.max+=S,f=scaleZoomAxisWithAnchor(f,p,n,u.y);else continue;if(f.max<f.min)continue;const m=constrainAxis(f);s[d]={direction:g,min:m.min,max:m.max}}return s}update(e,t,i,o){const{anchorPointX:r,anchorPointY:s,isScalingX:a,isScalingY:n,scrollingStep:l}=t,c=e.offsetX+i.x,h=e.offsetY+i.y,u=pointToRatio(i,c,h),d=e.deltaY;let p=(0,import_ag_charts_core178.definedZoomState)(o);if(p.x.max+=a?l*d*dx(o):0,p.y.max+=n?l*d*dy(o):0,!(p.x.max<p.x.min||p.y.max<p.y.min))return a&&(p.x=scaleZoomAxisWithAnchor(p.x,o.x,r,u.x)),n&&(p.y=scaleZoomAxisWithAnchor(p.y,o.y,s,u.y)),p=constrainZoom(p),p}updateDelta(e,t,i){const{anchorPointX:o,anchorPointY:r,isScalingX:s,isScalingY:a,scrollingStep:n}=t;let l=(0,import_ag_charts_core178.definedZoomState)(i);return l.x.max+=s?n*-e*dx(i):0,l.y.max+=a?n*-e*dy(i):0,s&&(l.x=scaleZoomAxisWithAnchor(l.x,i.x,o)),a&&(l.y=scaleZoomAxisWithAnchor(l.y,i.y,r)),l=constrainZoom(l),l}},import_ag_charts_core179=require("ag-charts-core"),ZoomSelector=class{constructor(e,t,i){this.rect=e,this.getZoom=t,this.isZoomValid=i,this.rect.visible=!1}update(e,t,i){const o=e.currentX+(i?.x??0),r=e.currentY+(i?.y??0);this.rect.visible=!0,this.updateCoords(o,r,t,i),this.updateRect(i)}stop(e,t,i){let o=(0,import_ag_charts_core179.definedZoomState)();if(!e||!t)return o;this.coords&&(o=this.createZoomFromCoords(t,i));const r=t.width/e.width,s=t.height/e.height;if(o=constrainZoom(multiplyZoom(o,r,s)),this.reset(),this.isZoomValid(o))return o}reset(){this.coords=void 0,this.rect.visible=!1}didUpdate(){return this.rect.visible&&this.rect.width>0&&this.rect.height>0}updateCoords(e,t,i,o){if(!this.coords){this.coords={x1:e,y1:t,x2:e,y2:t};return}const{coords:r}=this;if(r.x2=e,r.y2=t,!o)return;const{isScalingX:s,isScalingY:a,keepAspectRatio:n}=i,l=this.getNormalisedDimensions();if(n&&s&&a){const c=o.width/o.height;r.y2<r.y1?r.y2=Math.min(r.y1-l.width/c,r.y1):r.y2=Math.max(r.y1+l.width/c,r.y1)}s||(r.x1=o.x,r.x2=o.x+o.width),a||(r.y1=o.y,r.y2=o.y+o.height)}updateRect(e){if(!e)return;const{rect:t}=this,i=this.getNormalisedDimensions(),{width:o,height:r}=i;let{x:s,y:a}=i;s=Math.max(s,e.x),s-=Math.max(0,s+o-(e.x+e.width)),a=Math.max(a,e.y),a-=Math.max(0,a+r-(e.y+e.height)),t.x=s,t.y=a,t.width=o,t.height=r;const n=this.createZoomFromCoords(e,this.getZoom());this.isZoomValid(n)?t.updateValid():t.updateInvalid()}createZoomFromCoords(e,t){const i=(0,import_ag_charts_core179.definedZoomState)(t),o=this.getNormalisedDimensions(),r=pointToRatio(e,o.x,o.y+o.height),s=o.width/e.width,a=o.height/e.height;let n=scaleZoom(i,s,a);const l=r.x*dx(i),c=r.y*dy(i);return n=translateZoom(n,l,c),n=constrainZoom(n),n}getNormalisedDimensions(){const{x1:e=0,y1:t=0,x2:i=0,y2:o=0}=this.coords??{},r=Math.min(e,i),s=Math.min(t,o),a=e<=i?i-e:e-i,n=t<=o?o-t:t-o;return{x:r,y:s,width:a,height:n}}},import_ag_charts_community157=require("ag-charts-community"),import_ag_charts_core180=require("ag-charts-core"),{userInteraction:userInteraction4,NativeWidget:NativeWidget2,Toolbar:Toolbar2}=import_ag_charts_community157._ModuleSupport,ZoomButtonProperties=class extends ToolbarButtonProperties{};__decorateClass([import_ag_charts_core180.Property],ZoomButtonProperties.prototype,"value",2),__decorateClass([import_ag_charts_core180.Property],ZoomButtonProperties.prototype,"section",2);var ZoomToolbar=class extends import_ag_charts_core180.BaseProperties{constructor(e,t,i,o,r,s){super(),this.ctx=e,this.getModuleProperties=t,this.updateZoom=i,this.updateAxisZoom=o,this.resetZoom=r,this.isZoomValid=s,this.enabled=!1,this.buttons=new import_ag_charts_core180.PropertiesArray(ZoomButtonProperties),this.visible="hover",this.verticalSpacing=10,this.detectionRange=38,this.cleanup=new import_ag_charts_core180.CleanupRegistry,this.toggleButtonsDebounced=(0,import_ag_charts_core180.debounce)(this.toggleButtons.bind(this),ZOOM_VALID_CHECK_DEBOUNCE,{leading:!0,trailing:!0}),this.container=new NativeWidget2((0,import_ag_charts_core180.createElement)("div")),this.container.addClass("ag-charts-zoom-buttons"),e.domManager.addChild("canvas-overlay","zoom-buttons",this.container.getElement()),this.toolbar=new Toolbar2(e,"ariaLabelZoomToolbar","horizontal"),this.container.addChild(this.toolbar),this.toolbar.getElement().style.transform="translateY(54px)",this.toolbar.setHidden(!this.enabled),this.toggleVisibility(this.visible==="always"),this.cleanup.register(this.toolbar.addToolbarListener("button-pressed",this.onButtonPress.bind(this)),this.toolbar.addToolbarListener("button-focused",this.onButtonFocus.bind(this)),e.widgets.containerWidget.addListener("mousemove",this.onHover.bind(this)),e.widgets.containerWidget.addListener("mouseleave",this.onLeave.bind(this)),e.eventsHub.on("layout:complete",this.onLayoutComplete.bind(this)),this.teardown.bind(this))}destroy(){this.cleanup.flush()}toggleVisibleZoomed(e){this.visible==="zoomed"&&this.toggleVisibility(!e)}teardown(){this.ctx.domManager.removeChild("canvas-overlay","zoom-buttons"),this.container.destroy()}onLayoutComplete(e){if(!this.enabled)return;const{buttons:t,container:i}=this,{rect:o}=e.series;for(const s of t)if(s.tooltip==null&&s.label==null){const a={"pan-end":"toolbarZoomPanEnd","pan-left":"toolbarZoomPanLeft","pan-right":"toolbarZoomPanRight","pan-start":"toolbarZoomPanStart","zoom-in":"toolbarZoomZoomIn","zoom-out":"toolbarZoomZoomOut",reset:"toolbarZoomReset"};s.tooltip=a[s.value]}this.toolbar.updateButtons(t),this.toggleButtonsDebounced();const r=i.getBounds().height;i.setBounds({y:o.y+o.height-r})}onHover(e){if(!this.enabled||this.visible!=="hover"||this.toolbar.isHidden())return;const{container:t,detectionRange:i,ctx:{scene:o}}=this,{currentY:r,sourceEvent:{target:s}}=e,a=t.getElement(),n=a.offsetTop-i,l=r>n&&r<o.canvas.element.offsetHeight||s===a;this.toggleVisibility(l)}onLeave(){this.visible==="hover"&&this.toggleVisibility(!1)}toggleVisibility(e,t=!1){const{container:i,toolbar:o,verticalSpacing:r}=this;o.toggleClass("ag-charts-zoom-buttons__toolbar--hidden",!e);const s=o.getElement();s.style.transitionDuration=t?"0s":"",s.style.transform=e?"translateY(0)":`translateY(${i.getBounds().height+r}px)`}toggleButtons(){const e=(0,import_ag_charts_core180.definedZoomState)(this.ctx.zoomManager.getZoom());if(!(this.previousZoom&&isZoomEqual(this.previousZoom,e))){this.previousZoom=e;for(const[t,i]of this.buttons.entries()){let o=!0;switch(i?.value){case"pan-start":o=e.x.min>import_ag_charts_core180.UNIT_MIN;break;case"pan-end":o=e.x.max<import_ag_charts_core180.UNIT_MAX;break;case"pan-left":o=e.x.min>import_ag_charts_core180.UNIT_MIN;break;case"pan-right":o=e.x.max<import_ag_charts_core180.UNIT_MAX;break;case"zoom-out":o=!isMaxZoom(e);break;case"zoom-in":o=this.isZoomValid(this.getNextZoomStateUnified("zoom-in",e,this.getModuleProperties()));break;case"reset":o=canResetZoom(this.ctx.zoomManager);break}this.toolbar.toggleButtonEnabledByIndex(t,o)}}}onButtonPress({button:e}){if(!this.enabled||this.toolbar.isHidden())return;const t=this.getModuleProperties();if(t.independentAxes&&e.value!=="reset"){const i=this.ctx.zoomManager.getAxisZooms();for(const[o,r]of(0,import_ag_charts_core180.entries)(i)){if(r==null)continue;const{direction:s,min:a,max:n}=r;this.onButtonPressAxis(e,t,o,s,{min:a,max:n})}}else this.onButtonPressUnified(e,t)}onButtonFocus(e){this.toggleVisibility(!0,!0)}onButtonPressAxis(e,t,i,o,r){const{isScalingX:s,isScalingY:a,scrollingStep:n}=t;let l={...r};const c=r.max-r.min;switch(e.value){case"pan-start":l.max=c,l.min=0;break;case"pan-end":l.min=l.max-c,l.max=import_ag_charts_core180.UNIT_MAX;break;case"pan-left":l.min-=c*n,l.max-=c*n;break;case"pan-right":l.min+=c*n,l.max+=c*n;break;case"zoom-in":case"zoom-out":{const h=o===import_ag_charts_core180.ChartAxisDirection.X,u=h&&s||!h&&a;let d=e.value==="zoom-in"?1-n:1+n;u||(d=1);const p=h?this.getAnchorPointX(t):this.getAnchorPointY(t);l.max=l.min+(l.max-l.min)*d,l=scaleZoomAxisWithAnchor(l,r,p);break}}this.updateAxisZoom(userInteraction4(`zoom-button-${e.value}`),i,o,constrainAxis(l))}onButtonPressUnified(e,t){const{scrollingStep:i}=t,o=(0,import_ag_charts_core180.definedZoomState)(this.ctx.zoomManager.getZoom());let r=(0,import_ag_charts_core180.definedZoomState)(o);switch(e.value){case"reset":this.resetZoom("zoom-button-reset");return;case"pan-start":r.x.max=dx(r),r.x.min=0;break;case"pan-end":r.x.min=import_ag_charts_core180.UNIT_MAX-dx(r),r.x.max=import_ag_charts_core180.UNIT_MAX;break;case"pan-left":r=translateZoom(r,-dx(r)*i,0);break;case"pan-right":r=translateZoom(r,dx(r)*i,0);break;case"zoom-in":case"zoom-out":{r=this.getNextZoomStateUnified(e.value,o,t);break}}this.updateZoom(userInteraction4(`zoom-button-${e.value}`),constrainZoom(r))}getNextZoomStateUnified(e,t,i){const{isScalingX:o,isScalingY:r,scrollingStep:s}=i,a=e==="zoom-in"?1-s:1+s,n=scaleZoom(t,o?a:1,r?a:1);return n.x=scaleZoomAxisWithAnchor(n.x,t.x,this.getAnchorPointX(i)),n.y=scaleZoomAxisWithAnchor(n.y,t.y,this.getAnchorPointY(i)),n}getAnchorPointX(e){const t=this.anchorPointX??e.anchorPointX;return t==="pointer"?DEFAULT_ANCHOR_POINT_X:t}getAnchorPointY(e){const t=this.anchorPointY??e.anchorPointY;return t==="pointer"?DEFAULT_ANCHOR_POINT_Y:t}};__decorateClass([import_ag_charts_core180.Property,(0,import_ag_charts_core180.ActionOnSet)({changeValue(e){this.toolbar?.setHidden(!e)}})],ZoomToolbar.prototype,"enabled",2),__decorateClass([import_ag_charts_core180.Property],ZoomToolbar.prototype,"buttons",2),__decorateClass([import_ag_charts_core180.Property,(0,import_ag_charts_core180.ActionOnSet)({changeValue(e,t){if(t==null)return;const i=e==="always",o=e==="zoomed"&&this.previousZoom!=null&&!isMaxZoom(this.previousZoom);this.toggleVisibility(i||o)}})],ZoomToolbar.prototype,"visible",2),__decorateClass([import_ag_charts_core180.Property],ZoomToolbar.prototype,"anchorPointX",2),__decorateClass([import_ag_charts_core180.Property],ZoomToolbar.prototype,"anchorPointY",2);var N=1e6;function clientToNormal({min:e,max:t},i,o,r){return r===0?0:N*((i-o)/r*(t-e)+e)}function solveTwoUnknowns(e,t,i,o,r,s){[e,t]=[Math.min(e,t),Math.max(e,t)],[i,o]=[Math.min(i,o),Math.max(i,o)];const a=N*(i-r)/s,n=N*(o-r)/s,l=(i-r)/(o-r),c=(e-l*t)/(N-a+l*(n-N)),h=(t+(n-N)*c)/n;return{min:c,max:h}}function isRangeOverlapping(e,t,i,o){t===0&&(t=30),o===0&&(o=30);const r=e-t,s=e+t,a=i-o,n=i+o;return!(s<a||n<r)}var ZoomTwoFingers=class{constructor(){this.touchStart={origins:[{identifier:0,normalX:Number.NaN,normalY:Number.NaN},{identifier:0,normalX:Number.NaN,normalY:Number.NaN}]},this.initialZoom={x:{min:0,max:1},y:{min:0,max:1}},this.previous={a1:Number.NaN,a2:Number.NaN,b1:Number.NaN,b2:Number.NaN}}start(e,t,i){if(e.sourceEvent.targetTouches.length!==2)return!1;e.sourceEvent.preventDefault();const o=Array.from(e.sourceEvent.targetTouches),{x:r,y:s,width:a,height:n}=t.getBoundingClientRect();this.initialZoom.x.min=i.x?.min??0,this.initialZoom.x.max=i.x?.max??1,this.initialZoom.y.min=i.y?.min??0,this.initialZoom.y.max=i.y?.max??1;for(const g of this.touchStart.origins)g.identifier=0;this.previous.a1=Number.NaN,this.previous.a2=Number.NaN,this.previous.b1=Number.NaN,this.previous.b2=Number.NaN;for(const g of[0,1]){const y=o[g].clientX,x=s+n-o[g].clientY;this.touchStart.origins[g].identifier=o[g].identifier,this.touchStart.origins[g].normalX=clientToNormal(this.initialZoom.x,y,r,a),this.touchStart.origins[g].normalY=clientToNormal(this.initialZoom.y,x,s,n)}const[l,c]=o,[h,u]=this.touchStart.origins,d=isRangeOverlapping(l.clientX,l.radiusX,c.clientX,c.radiusX);return isRangeOverlapping(l.clientY,l.radiusY,c.clientY,c.radiusY)&&(h.normalY=u.normalY=(h.normalY+u.normalY)/2),d&&(h.normalX=u.normalX=(h.normalX+u.normalX)/2),!0}update(e,t){e.sourceEvent.preventDefault();const i=Array.from(e.sourceEvent.targetTouches),{x:o,y:r,width:s,height:a}=t.getBoundingClientRect(),{origins:n}=this.touchStart,l=[0,1].map(f=>i.find(S=>S.identifier===n[f].identifier)),c=n[0].normalX,h=n[1].normalX,u=l[0].clientX,d=l[1].clientX,p=n[0].normalY,g=n[1].normalY,y=r+a-l[0].clientY,x=r+a-l[1].clientY;return this.twitchTolerantZoomPan4(c,h,u,d,p,g,y,x,o,r,s,a)}end(e){const t=Array.from(e.sourceEvent.targetTouches).map(i=>i.identifier);return!t.includes(this.touchStart.origins[0].identifier)||!t.includes(this.touchStart.origins[1].identifier)}twitchTolerantZoomPan4(e,t,i,o,r,s,a,n,l,c,h,u){const{initialZoom:d,previous:p}=this,g=twitchTolerantZoomPan2(e,t,i,o,p,"a1","a2",l,h,d.x),y=twitchTolerantZoomPan2(r,s,a,n,p,"b1","b2",c,u,d.y);return{x:g,y}}};function twitchTolerantZoomPan2(e,t,i,o,r,s,a,n,l,c){if(e==t){const h=clientToNormal(c,i,n,l),u=clientToNormal(c,o,n,l),d=(h+u)/2,p=(e-d)/N;return{min:c.min+p,max:c.max+p}}else{const h=r[s],u=r[a];return Math.abs(i-h)+Math.abs(o-u)<=1?(i=h,o=u):(r[s]=i,r[a]=o),solveTwoUnknowns(e,t,i,o,n,l)}}var import_ag_charts_core181=require("ag-charts-core"),ZoomWheelSequencer=class{constructor(){this.isFirstWheelEvent=!0,this.debouncedWheelReset=(0,import_ag_charts_core181.debounce)(()=>{this.isFirstWheelEvent=!0,this.wasFirstWheelEventZoomCapped=void 0},100)}onWheel(e,t){if(e.sourceEvent.cancelable===!1)return;const i=t();if(i==="abort")return;const o=i==="capped";this.firstWheelEventDirection!=null&&this.firstWheelEventDirection!==e.deltaY<0&&(this.isFirstWheelEvent=!0),this.isFirstWheelEvent?(this.wasFirstWheelEventZoomCapped=o,this.firstWheelEventDirection=e.deltaY<0,o||e.sourceEvent.preventDefault()):this.wasFirstWheelEventZoomCapped===!1&&e.sourceEvent.preventDefault(),this.isFirstWheelEvent=!1,this.debouncedWheelReset()}},{userInteraction:userInteraction5,InteractionState:InteractionState6}=import_ag_charts_community158._ModuleSupport,round=e=>(0,import_ag_charts_core182.roundTo)(e,10),CURSOR_ID="zoom-cursor",TOOLTIP_ID="zoom-tooltip",Zoom=class extends import_ag_charts_core182.AbstractModuleInstance{constructor(e){super(),this.ctx=e,this.enabled=!1,this.enableAxisDragging=!0,this.enableAxisScrolling=!0,this.enableDoubleClickToReset=!0,this.enablePanning=!0,this.enableScrolling=!0,this.enableSelecting=!1,this.enableTwoFingerZoom=!0,this.panKey="alt",this.axes="x",this.scrollingStep=UNIT_SIZE/10,this.keepAspectRatio=!1,this.minVisibleItems=2,this.anchorPointX=DEFAULT_ANCHOR_POINT_X,this.anchorPointY=DEFAULT_ANCHOR_POINT_Y,this.autoScaling=new ZoomAutoScalingProperties,this.axisDraggingMode="zoom",this.buttons=new ZoomToolbar(this.ctx,this.getModuleProperties.bind(this),this.updateZoom.bind(this),this.updateAxisZoom.bind(this),this.resetZoom.bind(this),this.isZoomValid.bind(this)),this.onDataChange=new ZoomOnDataChangeProperties,this.axisDragger=new ZoomAxisDragger,this.panner=new ZoomPanner,this.scroller=new ZoomScroller,this.scrollPanner=new ZoomScrollPanner,this.twoFingers=new ZoomTwoFingers,this.deceleration="short",this.dragState=0,this.isState=o=>this.ctx.interactionManager.isState(o),this.destroyContextMenuActions=void 0,this.wheelSequencer=new ZoomWheelSequencer,this.previousZoomValid=!0,this.previousAxisZoomValid={[import_ag_charts_core182.ChartAxisDirection.X]:!0,[import_ag_charts_core182.ChartAxisDirection.Y]:!0},this.toggleAxisDraggingCursorsDebounced=(0,import_ag_charts_core182.debounce)(this.toggleAxisDraggingCursors.bind(this),ZOOM_VALID_CHECK_DEBOUNCE,{leading:!0,trailing:!0});const t=new ZoomRect;this.selector=new ZoomSelector(t,this.getZoom.bind(this),this.isZoomValid.bind(this)),this.contextMenu=new ZoomContextMenu(e.eventsHub,e.contextMenuRegistry,e.zoomManager,this.getModuleProperties.bind(this),()=>this.paddedRect,this.updateZoom.bind(this),this.isZoomValid.bind(this));const i=o=>{if(this.minVisibleItems>0){const r=o.stateAsDefinedZoom();o.constrainZoom(this.constrainZoom(r))}};this.dataChangeHandler=new ZoomOnDataChange(i,this.onDataChange,this.ctx,this.cleanup),this.domProxy=new ZoomDOMProxy({onAxisDragStart:o=>this.onAxisDragStart(o),onAxisDragMove:(o,r,s)=>this.onAxisDragMove(o,r,s),onAxisDragEnd:()=>this.onAxisDragEnd(),onAxisDoubleClick:o=>this.onAxisDoubleClick(o),onAxisWheel:(o,r)=>this.onAxisWheel(o,r)}),e.widgets.seriesDragInterpreter&&this.cleanup.register(e.widgets.seriesDragInterpreter.events.on("dblclick",o=>this.onSeriesAreaDoubleClick(o)),e.widgets.seriesDragInterpreter.events.on("drag-move",o=>this.onSeriesAreaDragMove(o)),e.widgets.seriesDragInterpreter.events.on("drag-start",o=>this.onSeriesAreaDragStart(o)),e.widgets.seriesDragInterpreter.events.on("drag-end",()=>this.onSeriesAreaDragEnd())),this.cleanup.register(e.scene.attachNode(t),e.eventsHub.on("series-area:hover",o=>this.onSeriesAreaHoverEvent(o)),e.eventsHub.on("series-area:click",o=>this.onSeriesAreaClickEvent(o)),e.eventsHub.on("series:keynav-zoom",o=>this.onNavZoom(o)),e.widgets.seriesWidget.addListener("wheel",o=>this.onWheel(o)),e.widgets.seriesWidget.addListener("touchstart",(o,r)=>this.onTouchStart(o,r)),e.widgets.seriesWidget.addListener("touchmove",(o,r)=>this.onTouchMove(o,r)),e.widgets.seriesWidget.addListener("touchend",o=>this.onTouchEnd(o)),e.widgets.seriesWidget.addListener("touchcancel",o=>this.onTouchEnd(o)),e.updateService.addListener("process-data",o=>this.onProcessData(o)),e.eventsHub.on("layout:complete",o=>this.onLayoutComplete(o)),e.eventsHub.on("zoom:change-request",o=>this.onZoomChangeRequested(o)),e.eventsHub.on("zoom:pan-start",o=>this.onZoomPanStart(o)),this.panner.addListener("update",o=>this.onPanUpdate(o)),()=>this.teardown()),this.autoScaler=new ZoomAutoScaler(this.autoScaling,e.zoomManager,this,e.eventsHub,this.cleanup)}teardown(){this.ctx.zoomManager.setZoomModuleEnabled(!1),this.buttons.destroy(),this.destroyContextMenuActions?.(),this.domProxy.destroy(),this.dataChangeHandler.destroy()}onEnabledChange(e){this.ctx.zoomManager.setZoomModuleEnabled(e),this.contextMenu&&(this.destroyContextMenuActions?.(),this.destroyContextMenuActions=this.contextMenu.registerActions(e))}isIgnoredTouch(e){return e?.device!=="touch"?!1:this.ctx.chartService.touch.dragAction!=="drag"?!0:this.enableSelecting?!1:this.enablePanning?isMaxZoom(this.getZoom()):!0}onSeriesAreaDoubleClick(e){const{enabled:t,enableDoubleClickToReset:i}=this;!t||!i||e?.preventZoomDblClick||!this.isState(InteractionState6.ZoomClickable)||this.resetZoom("zoom-seriesarea-dblclick")}onSeriesAreaHoverEvent(e){if(!this.shouldHandleAxisHover(e)){this.clearHoveredAxis();return}const t=this.domProxy.pickAxisAtPoint(e);t?(this.domProxy.setHoveredAxis(t.axisId),this.ctx.domManager.updateCursor(CURSOR_ID,this.domProxy.getCursor(t.direction))):this.clearHoveredAxis()}onSeriesAreaClickEvent(e){if(!this.shouldHandleAxisClick(e))return;const t=this.domProxy.pickAxisAtPoint(e);t&&e.sourceEvent?.type==="dblclick"&&this.onAxisDoubleClick(t.axisId)}shouldHandleAxisHover(e){const{enabled:t,enableAxisDragging:i,enableAxisScrolling:o,dragState:r}=this;return t&&(i||o)&&!e.consumed&&!this.activeAxis&&r===0&&this.domProxy.hasOverlappingAxes()}shouldHandleAxisClick(e){const{enabled:t,enableAxisDragging:i,enableAxisScrolling:o,enableDoubleClickToReset:r}=this;return t&&!this.activeAxis&&!e.consumed&&(i||o||r)}clearHoveredAxis(){this.activeAxis||(this.domProxy.clearHoveredAxis(),this.dragState===0&&this.ctx.domManager.updateCursor(CURSOR_ID))}tryBeginAxisDelegation(e){const t=this.domProxy.getHoveredAxis();if(!this.enabled||!this.enableAxisDragging||!t||!this.domProxy.beginDelegatedAxisDrag(t.axisId))return!1;this.activeAxis=t,this.onAxisDragStart(t.direction);const i=this.dragState===2?"grabbing":this.domProxy.getCursor(t.direction);return this.ctx.domManager.updateCursor(CURSOR_ID,i),e.device==="touch"&&e.sourceEvent.preventDefault(),!0}onSeriesAreaDragStart(e){const{enabled:t,enablePanning:i,enableSelecting:o,ctx:{domManager:r,zoomManager:s}}=this;if(!t||!this.isState(InteractionState6.ZoomDraggable)||this.dragState!==0||this.isIgnoredTouch(e)||(this.panner.stopInteractions(),this.tryBeginAxisDelegation(e)))return;let a=0;const n=this.isPanningKeyPressed(e.sourceEvent);i&&(!o||n)?(r.updateCursor(CURSOR_ID,"grabbing"),a=2,this.panner.start()):o&&!n&&(a=3),(this.dragState=a)!==0&&s.fireZoomPanStartEvent("zoom")}onSeriesAreaDragMove(e){const{dragState:t,enabled:i,paddedRect:o,panner:r,selector:s,ctx:{interactionManager:a,tooltipManager:n,updateService:l}}=this;if(this.activeAxis){this.onAxisDragMove(this.activeAxis.axisId,this.activeAxis.direction,e);return}if(!(!i||!o||!this.isState(InteractionState6.ZoomDraggable)||this.isIgnoredTouch(e))){switch(a.pushState(import_ag_charts_community158._ModuleSupport.InteractionState.ZoomDrag),e.device==="touch"&&e.sourceEvent.preventDefault(),t){case 2:r.update(e);break;case 3:s.update(e,this.getModuleProperties(),o);break;case 0:return}n.updateTooltip(TOOLTIP_ID),l.update(import_ag_charts_core182.ChartUpdateType.PERFORM_LAYOUT,{skipAnimations:!0})}}onSeriesAreaDragEnd(){const{ctx:{interactionManager:e}}=this;if(this.activeAxis){this.handleAxisDragEnd();return}e.popState(import_ag_charts_community158._ModuleSupport.InteractionState.ZoomDrag),!(!this.enabled||this.dragState===0)&&(this.handleRegularDragEnd(),this.resetDragState())}handleAxisDragEnd(){this.onAxisDragEnd(),this.domProxy.endDelegatedAxisDrag(this.activeAxis.axisId),this.activeAxis=void 0,this.clearHoveredAxis()}handleRegularDragEnd(){const{panner:e,selector:t}=this;switch(this.dragState){case 2:e.stop();break;case 3:if(t.didUpdate()){const i=t.stop(this.seriesRect,this.paddedRect,this.getZoom());i?this.updateZoom(userInteraction5("zoom-seriesarea-selector"),i):this.ctx.updateService.update()}break}}resetDragState(){this.dragState=0,this.ctx.domManager.updateCursor(CURSOR_ID),this.ctx.tooltipManager.removeTooltip(TOOLTIP_ID)}onAxisDoubleClick(e){const{enabled:t,enableDoubleClickToReset:i,ctx:{zoomManager:o}}=this;!t||!i||!this.isState(InteractionState6.ZoomClickable)||(this.previousAxisZoomValid={[import_ag_charts_core182.ChartAxisDirection.X]:!0,[import_ag_charts_core182.ChartAxisDirection.Y]:!0},o.resetAxisZoom({source:"user-interaction",sourceDetail:"zoom-axis-dblclick"},e))}onAxisDragStart(e){const{axisDraggingMode:t,domProxy:i,enabled:o,enableAxisDragging:r,panner:s,ctx:{zoomManager:a}}=this;!o||!r||(s.stopInteractions(),t==="pan"?(i.setAxisCursor("grabbing"),this.dragState=2,this.panner.start(e),a.fireZoomPanStartEvent("zoom")):this.dragState=1)}onAxisDragMove(e,t,i){const{anchorPointX:o,anchorPointY:r,axisDragger:s,dragState:a,enabled:n,enableAxisDragging:l,seriesRect:c,shouldFlipXY:h,ctx:{interactionManager:u,tooltipManager:d,updateService:p,zoomManager:g}}=this;if(!n||!l||!c)return;u.pushState(import_ag_charts_community158._ModuleSupport.InteractionState.ZoomDrag),i.device==="touch"&&i.sourceEvent.preventDefault();const y=this.getZoom();if(a===2)this.panner.update({currentX:i.offsetX,currentY:i.offsetY});else{let x=t===import_ag_charts_core182.ChartAxisDirection.X?o:r;h&&(x=t===import_ag_charts_core182.ChartAxisDirection.X?r:o);const f=g.getAxisZoom(e),S=s.update(i,t,x,c,y,f);this.autoScaler.onManualAdjustment(t),this.updateAxisZoom(userInteraction5("zoom-axis-drag"),e,t,S,{directional:!0})}d.updateTooltip(TOOLTIP_ID),p.update(import_ag_charts_core182.ChartUpdateType.PERFORM_LAYOUT,{skipAnimations:!0})}onAxisDragEnd(){const{axisDraggingMode:e,axisDragger:t,dragState:i,domProxy:o,enabled:r,enableAxisDragging:s,ctx:{domManager:a,interactionManager:n,tooltipManager:l}}=this;n.popState(import_ag_charts_community158._ModuleSupport.InteractionState.ZoomDrag),!(!r||!s||i===0)&&(this.dragState=0,e==="pan"&&(o.setAxisCursor("grab"),this.panner.stop()),t.stop(),a.updateCursor(CURSOR_ID),l.removeTooltip(TOOLTIP_ID))}onNavZoom(e){const{enabled:t,enableScrolling:i,scroller:o}=this;!this.ctx.interactionManager.isState(import_ag_charts_community158._ModuleSupport.InteractionState.Default)||!t||!i||(e.widgetEvent.sourceEvent.preventDefault(),this.updateZoom(userInteraction5(`keyboard(${e.delta})`),o.updateDelta(e.delta,this.getModuleProperties(),this.getZoom())))}onWheel(e){const{enabled:t,enablePanning:i,enableScrolling:o,paddedRect:r}=this;if(!t||!o||!r||!this.isState(InteractionState6.ZoomWheelable))return;const{deltaX:s,deltaY:a}=e.sourceEvent,n=s!=null&&a!=null&&Math.abs(s)>Math.abs(a);i&&n?this.onWheelPanning(e):this.onWheelScrolling(e)}onWheelPanning(e){const{scrollingStep:t,scrollPanner:i,seriesRect:o,ctx:{zoomManager:r}}=this;if(!o)return;e.sourceEvent.preventDefault();const s=i.update(e,t,o,r.getAxisZooms());this.updateChanges(userInteraction5("zoom-seriesarea-wheel"),s)}onWheelScrolling(e){const t=this.getZoom(),i=e.deltaY>0&&isMaxZoom(t);this.wheelSequencer.onWheel(e,()=>this.handleWheelScrolling(e,i))}onAxisWheel(e,t){if(!this.enableAxisScrolling||e!==import_ag_charts_core182.ChartAxisDirection.X&&e!==import_ag_charts_core182.ChartAxisDirection.Y)return;const i=e===import_ag_charts_core182.ChartAxisDirection.X,o=!i,r=this.getModuleProperties({isScalingX:i,isScalingY:o}),s=this.getZoom(),a=t.deltaY>0&&s[e].min===import_ag_charts_core182.UNIT_MIN&&s[e].max===import_ag_charts_core182.UNIT_MAX;this.autoScaler.onManualAdjustment(e),this.wheelSequencer.onWheel(t,()=>this.handleWheelScrolling(t,a,r))}handleWheelScrolling(e,t,i=this.getModuleProperties()){const{enableIndependentAxes:o,scroller:r,seriesRect:s,ctx:{zoomManager:a}}=this;if(!s)return"abort";let n=!0;const l=userInteraction5("zoom-axis-wheel");if(o===!0){const c=r.updateAxes(e,i,s,a.getAxisZooms());for(const[h,{direction:u,min:d,max:p}]of(0,import_ag_charts_core182.entries)(c)){const g=u===import_ag_charts_core182.ChartAxisDirection.X?this.constrainZoom({x:{min:d,max:p},y:{min:import_ag_charts_core182.UNIT_MAX,max:import_ag_charts_core182.UNIT_MAX}}).x:{min:d,max:p};n&&(n=this.updateAxisZoom(l,h,u,g))}}else{const c=r.update(e,i,s,this.getZoom());if(c==null)return"abort";n=this.updateUnifiedZoom(l,c,{directional:!0})}return t||e.deltaY<0&&!n?"capped":"uncapped"}onTouchStart(e,t){!this.enableTwoFingerZoom||this.dragState!==0||this.twoFingers.start(e,t,this.getZoom())&&(this.dragState=4)}onTouchMove(e,t){if(!this.enableTwoFingerZoom||this.dragState!==4)return;const i=this.twoFingers.update(e,t);this.updateZoom(userInteraction5("zoom-seriesarea-twofingers"),constrainZoom(i))}onTouchEnd(e){!this.enableTwoFingerZoom||this.dragState!==4||(e.sourceEvent.preventDefault(),this.twoFingers.end(e)&&(this.dragState=0))}onProcessData(e){this.shouldFlipXY=e.series.shouldFlipXY}onLayoutComplete(e){this.domProxy.update(this.enabled,this.enableAxisDragging,this.enableAxisScrolling,this.ctx,e.series.rect),this.enabled&&(this.seriesRect=e.series.rect,this.paddedRect=e.series.paddedRect,this.enableAxisDragging&&this.toggleAxisDraggingCursorsDebounced())}onZoomChangeRequested(e){e.sourceDetail!=="zoom-seriesarea-panner"&&this.panner.stopInteractions();const t=this.getZoom();this.buttons.toggleVisibleZoomed(isMaxZoom(t))}onZoomPanStart(e){e.callerId==="zoom"&&this.panner.stopInteractions()}onPanUpdate(e){const{panner:t,seriesRect:i,ctx:{tooltipManager:o,zoomManager:r}}=this;if(!i)return;const s=t.translateZooms(i,r.getAxisZooms(),e.deltaX,e.deltaY);this.updateChanges(userInteraction5("zoom-seriesarea-panner"),s),o.updateTooltip(TOOLTIP_ID)}isPanningKeyPressed(e){switch(this.panKey){case"alt":return e.altKey;case"ctrl":return e.ctrlKey;case"shift":return e.shiftKey;case"meta":return e.metaKey}}isScalingX(){return this.axes==="xy"?!0:this.shouldFlipXY?this.axes==="y":this.axes==="x"}isScalingY(){return this.axes==="xy"?!0:this.shouldFlipXY?this.axes==="x":this.axes==="y"}getAnchorPointX(){return this.shouldFlipXY?this.anchorPointY:this.anchorPointX}getAnchorPointY(){return this.shouldFlipXY?this.anchorPointX:this.anchorPointY}constrainZoom(e){return this.ctx.zoomManager.constrainZoomToItemCount(e,this.minVisibleItems,this.autoScaler.enabled)}isZoomValid(e,t){const{minVisibleItems:i,ctx:{zoomManager:o}}=this;if(i===0)return this.previousZoomValid=!0,!0;const r=this.getZoom(),s=round(dx(e))<round(dx(r)),a=round(dy(e))<round(dy(r));if(!s&&!a)return this.previousZoomValid=!0,!0;if(!this.previousZoomValid&&t?.directional)return!1;const n=t?.includeYVisibleRange??!1,l=this.autoScaler.enabled,c=o.isVisibleItemsCountAtLeast(e,i,{includeYVisibleRange:n,autoScaleYAxis:l});return this.previousZoomValid=t?.directional?c:!0,c}isAxisZoomValid(e,t,i){const{minVisibleItems:o,ctx:{zoomManager:r}}=this,s=this.getZoom(),a=t.max-t.min,n=s[e].max-s[e].min,l={...s,[e]:t};if(a>=n)return this.previousAxisZoomValid[e]=!0,!0;if(!this.previousAxisZoomValid[e]&&i?.directional)return!1;const c={includeYVisibleRange:!1,autoScaleYAxis:this.autoScaler.enabled},h=r.isVisibleItemsCountAtLeast(l,o,c);return this.previousAxisZoomValid[e]=i?.directional?h:!0,h}resetZoom(e){this.previousZoomValid=!0,this.previousAxisZoomValid={[import_ag_charts_core182.ChartAxisDirection.X]:!0,[import_ag_charts_core182.ChartAxisDirection.Y]:!0},this.ctx.zoomManager.resetZoom({source:"user-interaction",sourceDetail:e})}updateSyncZoom(e){this.updateZoom({source:"sync",sourceDetail:"internal-updateSyncZoom"},e)}updateChanges(e,t){const i=this.ctx.zoomManager.toZoomState(t)??{},o=(0,import_ag_charts_core182.definedZoomState)(this.ctx.zoomManager.getZoom());this.updateZoom(e,{x:i.x??o.x,y:i.y??o.y})}updateZoom(e,t){this.enableIndependentAxes?this.updatePrimaryAxisZooms(e,t):this.updateUnifiedZoom(e,t)}updateUnifiedZoom(e,t,i){return t=this.constrainZoom(t),this.isZoomValid(t,i)?(this.ctx.zoomManager.updateZoom(e,t),!0):(this.ctx.updateService.update(import_ag_charts_core182.ChartUpdateType.SCENE_RENDER,{skipAnimations:!0}),!1)}updatePrimaryAxisZooms(e,t){this.updatePrimaryAxisZoom(e,t,import_ag_charts_core182.ChartAxisDirection.X),this.updatePrimaryAxisZoom(e,t,import_ag_charts_core182.ChartAxisDirection.Y)}updatePrimaryAxisZoom(e,t,i){const o=this.ctx.zoomManager.getPrimaryAxisId(i);o!=null&&this.updateAxisZoom(e,o,i,t[i])}updateAxisZoom(e,t,i,o,r){const{enableIndependentAxes:s,ctx:{zoomManager:a}}=this;if(!o)return!1;const n=this.getZoom();if(s!==!0)return n[i]=o,this.updateUnifiedZoom(e,n,r);if(!this.isAxisZoomValid(i,o,r))return!1;const{source:l,sourceDetail:c}=e;return a.updateChanges({source:l,sourceDetail:c,changes:{[t]:o},isReset:!1}),!0}updateAxisCursor(e){if(!this.domProxy)return;const{enableAxisDragging:t=this.enableAxisDragging,enableAxisScrolling:i=this.enableAxisScrolling,axisDraggingMode:o=this.axisDraggingMode}=e;t?this.domProxy.setAxisCursor(o==="pan"?"grab":void 0):i?this.domProxy.setAxisCursor("default"):this.domProxy.setAxisCursor(void 0)}toggleAxisDraggingCursors(){const{anchorPointX:e,anchorPointY:t,domProxy:i}=this,o=this.getZoom();let r=dx(o)!==UNIT_SIZE,s=dy(o)!==UNIT_SIZE;if(!r){const a=scaleZoom(o,.999,1);a.x=scaleZoomAxisWithAnchor(a.x,o.x,e),r=this.isZoomValid(a,{includeYVisibleRange:!0})}if(!s){const a=scaleZoom(o,1,.999);a.y=scaleZoomAxisWithAnchor(a.y,o.y,t),s=this.isZoomValid(a,{includeYVisibleRange:!0})}i.toggleAxisDraggingCursor(import_ag_charts_core182.ChartAxisDirection.X,r),i.toggleAxisDraggingCursor(import_ag_charts_core182.ChartAxisDirection.Y,s)}getZoom(){return(0,import_ag_charts_core182.definedZoomState)(this.ctx.zoomManager.getZoom())}getModuleProperties(e){return{anchorPointX:e?.anchorPointX??this.getAnchorPointX(),anchorPointY:e?.anchorPointY??this.getAnchorPointY(),enabled:e?.enabled??this.enabled,independentAxes:e?.independentAxes??this.enableIndependentAxes===!0,isScalingX:e?.isScalingX??this.isScalingX(),isScalingY:e?.isScalingY??this.isScalingY(),keepAspectRatio:e?.keepAspectRatio??this.keepAspectRatio,scrollingStep:e?.scrollingStep??this.scrollingStep}}};__decorateClass([(0,import_ag_charts_core182.ActionOnSet)({newValue(e){this.onEnabledChange(e)}}),import_ag_charts_core182.Property],Zoom.prototype,"enabled",2),__decorateClass([(0,import_ag_charts_core182.ActionOnSet)({changeValue(e){this.updateAxisCursor({enableAxisDragging:e})}}),import_ag_charts_core182.Property],Zoom.prototype,"enableAxisDragging",2),__decorateClass([(0,import_ag_charts_core182.ActionOnSet)({changeValue(e){this.updateAxisCursor({enableAxisScrolling:e})}}),import_ag_charts_core182.Property],Zoom.prototype,"enableAxisScrolling",2),__decorateClass([import_ag_charts_core182.Property],Zoom.prototype,"enableDoubleClickToReset",2),__decorateClass([(0,import_ag_charts_core182.ActionOnSet)({changeValue(e){this.ctx.zoomManager.setIndependentAxes(!!e)}}),import_ag_charts_core182.Property],Zoom.prototype,"enableIndependentAxes",2),__decorateClass([import_ag_charts_core182.Property],Zoom.prototype,"enablePanning",2),__decorateClass([import_ag_charts_core182.Property],Zoom.prototype,"enableScrolling",2),__decorateClass([import_ag_charts_core182.Property],Zoom.prototype,"enableSelecting",2),__decorateClass([import_ag_charts_core182.Property],Zoom.prototype,"enableTwoFingerZoom",2),__decorateClass([import_ag_charts_core182.Property],Zoom.prototype,"panKey",2),__decorateClass([import_ag_charts_core182.Property],Zoom.prototype,"axes",2),__decorateClass([import_ag_charts_core182.Property],Zoom.prototype,"scrollingStep",2),__decorateClass([import_ag_charts_core182.Property],Zoom.prototype,"keepAspectRatio",2),__decorateClass([import_ag_charts_core182.Property],Zoom.prototype,"minVisibleItems",2),__decorateClass([import_ag_charts_core182.Property],Zoom.prototype,"anchorPointX",2),__decorateClass([import_ag_charts_core182.Property],Zoom.prototype,"anchorPointY",2),__decorateClass([import_ag_charts_core182.Property],Zoom.prototype,"autoScaling",2),__decorateClass([(0,import_ag_charts_core182.ActionOnSet)({changeValue(e){this.updateAxisCursor({axisDraggingMode:e})}}),import_ag_charts_core182.Property],Zoom.prototype,"axisDraggingMode",2),__decorateClass([import_ag_charts_core182.Property],Zoom.prototype,"buttons",2),__decorateClass([import_ag_charts_core182.Property],Zoom.prototype,"onDataChange",2),__decorateClass([(0,import_ag_charts_core182.ProxyProperty)("panner.deceleration"),import_ag_charts_core182.Property],Zoom.prototype,"deceleration",2);var zoomAnchorPoint=(0,import_ag_charts_core183.union)("pointer","start","middle","end"),ZoomModule={type:"plugin",name:"zoom",enterprise:!0,version:import_ag_charts_community159.VERSION,options:{enabled:import_ag_charts_core183.boolean,enableAxisDragging:import_ag_charts_core183.boolean,enableAxisScrolling:import_ag_charts_core183.boolean,enableDoubleClickToReset:import_ag_charts_core183.boolean,enablePanning:import_ag_charts_core183.boolean,enableScrolling:import_ag_charts_core183.boolean,enableSelecting:import_ag_charts_core183.boolean,enableTwoFingerZoom:import_ag_charts_core183.boolean,keepAspectRatio:import_ag_charts_core183.boolean,anchorPointX:zoomAnchorPoint,anchorPointY:zoomAnchorPoint,axisDraggingMode:(0,import_ag_charts_core183.union)("pan","zoom"),axes:(0,import_ag_charts_core183.union)("x","y","xy"),deceleration:(0,import_ag_charts_core183.or)((0,import_ag_charts_core183.union)("off","short","long"),import_ag_charts_core183.ratio),minVisibleItems:import_ag_charts_core183.positiveNumber,panKey:(0,import_ag_charts_core183.union)("alt","ctrl","meta","shift"),scrollingStep:import_ag_charts_core183.ratio,autoScaling:{enabled:import_ag_charts_core183.boolean,padding:import_ag_charts_core183.ratio},onDataChange:{strategy:(0,import_ag_charts_core183.strictUnion)()("reset","preserveDomain","preserveRatios"),stickToEnd:import_ag_charts_core183.boolean},buttons:{enabled:import_ag_charts_core183.boolean,buttons:(0,import_ag_charts_core183.arrayOfDefs)({...import_ag_charts_core183.toolbarButtonOptionsDefs,value:(0,import_ag_charts_core183.union)("reset","zoom-in","zoom-out","pan-left","pan-right","pan-start","pan-end"),section:import_ag_charts_core183.string},"zoom button options array"),visible:(0,import_ag_charts_core183.union)("always","zoomed","hover")}},themeTemplate:{enabled:!1,enableAxisDragging:!0,enableAxisScrolling:!0,enableDoubleClickToReset:!0,enablePanning:!0,enableScrolling:!0,enableSelecting:!1,enableTwoFingerZoom:!0,deceleration:"short",minVisibleItems:2,panKey:"alt",scrollingStep:.1,autoScaling:{enabled:{$and:[{$eq:[{$path:"../axes"},"x"]},{$not:{$eq:[{$path:"/series/0/direction"},"horizontal"]}}]},padding:.05},onDataChange:{strategy:"preserveDomain",stickToEnd:!1},anchorPointX:"end",anchorPointY:"middle",axes:"x",buttons:{enabled:{$path:"../enabled"},visible:"hover",buttons:{$shallowSimple:[{icon:"zoom-out",value:"zoom-out",section:"scale"},{icon:"zoom-in",value:"zoom-in",section:"scale"},{icon:"pan-left",value:"pan-left",section:"pan"},{icon:"pan-right",value:"pan-right",section:"pan"},{icon:"reset",value:"reset",section:"reset"}]}}},create:e=>new Zoom(e)};ZoomModule.options.enableIndependentAxes=(0,import_ag_charts_core183.undocumented)(import_ag_charts_core183.boolean),ZoomModule.options.buttons.anchorPointX=(0,import_ag_charts_core183.undocumented)(zoomAnchorPoint),ZoomModule.options.buttons.anchorPointY=(0,import_ag_charts_core183.undocumented)(zoomAnchorPoint);var import_ag_charts_community162=require("ag-charts-community"),import_ag_charts_core187=require("ag-charts-core"),import_ag_charts_community161=require("ag-charts-community"),import_ag_charts_core186=require("ag-charts-core"),import_ag_charts_community160=require("ag-charts-community"),import_ag_charts_core185=require("ag-charts-core"),import_ag_charts_core184=require("ag-charts-core");function formatWithContext(e,t,i){return(0,import_ag_charts_core184.callWithContext)(e.chartService,t,i)}var{AxisInterval:AxisInterval2,AxisLabel:AxisLabel2,LinearScale:LinearScale3,BBox:BBox15,TranslatableGroup:TranslatableGroup4,Selection:Selection4,Text:Text2}=import_ag_charts_community160._ModuleSupport,_AxisTicks=class Se{constructor(t,i){this.ctx=t,this.dataProvider=i,this.id=(0,import_ag_charts_core185.createId)(this),this.axisGroup=new TranslatableGroup4({name:`${this.id}-AxisTicks`,zIndex:import_ag_charts_core185.ZIndexMap.AXIS}),this.labelSelection=Selection4.select(this.axisGroup,Text2),this.interval=new AxisInterval2,this.label=new AxisLabel2,this.scale=new LinearScale3,this.placement="bottom",this.translationX=0,this.translationY=0,this.padding=0}get horizontal(){return this.placement.startsWith("top")||this.placement.startsWith("bottom")}attachAxis(t){t.appendChild(this.axisGroup)}calculateLayout(){const{placement:t,translationX:i,translationY:o,horizontal:r,label:s}=this;function a(d){}let n,l;switch(t){case"top":case"top-right":case"top-left":n="bottom",l="center",s.mirrored=!1,s.parallel=!0;break;case"bottom":case"bottom-right":case"bottom-left":n="top",l="center",s.mirrored=!1,s.parallel=!0;break;case"right":case"right-top":case"right-bottom":case"left":case"left-top":case"left-bottom":n="middle",l="left",s.mirrored=!0,s.parallel=!1;break;default:}const c=[],h=this.generateTicks(),{ticks:u}=h;return this.labelSelection.update(u,void 0,d=>d.tickId),this.axisGroup.setProperties({translationX:i,translationY:o}),this.labelSelection.each((d,p)=>{d.fontFamily=s.fontFamily,d.fontSize=s.fontSize,d.fontStyle=s.fontStyle,d.fontWeight=s.fontWeight,d.fill=s.color,d.textBaseline=n,d.textAlign=l,d.text=p.tickLabel,d.x=r?p.translation:0,d.y=r?0:p.translation,c.push(d.getBBox())}),c.length>0?BBox15.merge(c).translate(i,o):void 0}tickFormatter(t,i,o,r){const{ctx:s}=this,{formatManager:a}=s,n=this.dataProvider.data.flatMap(l=>l.series);return(l,c)=>{const h={type:"number",value:l,datum:void 0,seriesId:void 0,legendItemName:void 0,key:void 0,source:"gradient-legend",property:"color",domain:t,boundSeries:n,fractionDigits:r,visibleDomain:void 0};return this.label.formatValue((u,d)=>formatWithContext(s,u,d),h,c)??a.format((u,d)=>formatWithContext(s,u,d),h)??a.defaultFormat(h)}}inRange(t,i=.001){const[o,r]=(0,import_ag_charts_core185.findMinMax)(this.scale.range);return t>=o-i&&t<=r+i}generateTicks(){const{minSpacing:t,maxSpacing:i}=this.interval,{maxTickCount:o,minTickCount:r,tickCount:s}=(0,import_ag_charts_core185.estimateTickCount)((0,import_ag_charts_core185.findRangeExtent)(this.scale.range),1,t,i,Se.DefaultTickCount,Se.DefaultMinSpacing),a=this.getTicksData({nice:[!0,!0],interval:this.interval.step,tickCount:s,minTickCount:r,maxTickCount:o});if(this.placement==="bottom"||this.placement==="top"){const n=(0,import_ag_charts_core185.cachedTextMeasurer)(this.label),{domain:l}=this.scale,h=l[0]>l[1]?-1:1;let u=-1/0*h;a.ticks=a.ticks.filter(d=>{if(Math.sign(d.translation-u)!==h)return!1;const{width:p}=(0,import_ag_charts_core185.isArray)(d.tickLabel)?(0,import_ag_charts_core185.measureTextSegments)(d.tickLabel,this.label):n.measureLines((0,import_ag_charts_core185.toTextString)(d.tickLabel));return u=d.translation+p*h,!0})}return a}getTicksData(t){const i=[],o=t.nice?this.scale.niceDomain(t):this.scale.domain,r=this.scale.ticks(t,o)?.ticks??[],s=r.reduce((l,c)=>Math.max(l,(0,import_ag_charts_core185.countFractionDigits)(c)),0),a=(0,import_ag_charts_core185.createIdsGenerator)(),n=this.tickFormatter(o,r,!1,s);for(let l=0;l<r.length;l++){const c=r[l],h=this.scale.convert(c);if(!this.inRange(h))continue;const u=n(c,l);if(u==null||u==="")continue;const d=a((0,import_ag_charts_core185.toPlainText)(u));i.push({tick:c,tickId:d,tickLabel:u,translation:h})}return{rawTicks:r,fractionDigits:s,ticks:i}}};_AxisTicks.className="AxisTicks",_AxisTicks.DefaultTickCount=5,_AxisTicks.DefaultMinSpacing=10;var AxisTicks=_AxisTicks,{LayoutElement:LayoutElement6,Group:Group9,Rect:Rect6,Marker:Marker2,TranslatableGroup:TranslatableGroup5,BBox:BBox16}=import_ag_charts_community161._ModuleSupport,GradientBar=class extends import_ag_charts_core186.BaseProperties{constructor(){super(...arguments),this.thickness=16,this.preferredLength=100}};__decorateClass([import_ag_charts_core186.Property],GradientBar.prototype,"thickness",2),__decorateClass([import_ag_charts_core186.Property],GradientBar.prototype,"preferredLength",2);var GradientLegendScale=class extends import_ag_charts_core186.BaseProperties{constructor(e){super(),this.axisTicks=e}};__decorateClass([(0,import_ag_charts_core186.ProxyProperty)("axisTicks.label")],GradientLegendScale.prototype,"label",2),__decorateClass([(0,import_ag_charts_core186.ProxyProperty)("axisTicks.interval")],GradientLegendScale.prototype,"interval",2),__decorateClass([(0,import_ag_charts_core186.ProxyProperty)("axisTicks.padding")],GradientLegendScale.prototype,"padding",2);var GradientLegend=class extends import_ag_charts_core186.BaseProperties{constructor(e){super(),this.ctx=e,this.id=(0,import_ag_charts_core186.createId)(this),this.legendGroup=new TranslatableGroup5({name:"legend",zIndex:import_ag_charts_core186.ZIndexMap.LEGEND}),this.containerNode=this.legendGroup.appendChild(new Rect6({name:"legend-container"})),this.gradientRect=new Rect6,this.arrow=new Marker2({shape:"triangle"}),this.ticksGroup=new Group9({name:"legend-axis-group"}),this.cleanup=new import_ag_charts_core186.CleanupRegistry,this.enabled=!1,this.position="bottom",this.reverseOrder=!1,this.gradient=new GradientBar,this.spacing=20,this.border=new import_ag_charts_core186.Border(this.containerNode),this.cornerRadius=0,this.fillOpacity=1,this.padding=4,this.data=[],this.highlightManager=e.highlightManager,this.axisTicks=new AxisTicks(e,this),this.axisTicks.attachAxis(this.ticksGroup),this.scale=new GradientLegendScale(this.axisTicks),this.legendGroup.append([this.gradientRect,this.arrow,this.ticksGroup]),this.cleanup.register(e.eventsHub.on("highlight:change",()=>this.onChartHoverChange()),e.layoutManager.registerElement(LayoutElement6.Legend,t=>this.onStartLayout(t)),()=>this.legendGroup.remove())}isVertical(){const{placement:e}=(0,import_ag_charts_core186.expandLegendPosition)(this.position);return e.startsWith("right")||e.startsWith("left")}destroy(){this.cleanup.flush()}attachLegend(e){e.appendChild(this.legendGroup)}onStartLayout({layoutBox:e}){const[t]=this.data;if(!this.enabled||!t?.enabled||t.legendType!=="gradient"){this.legendGroup.visible=!1;return}const{colorRange:i}=this.normalizeColorArrays(t),{strokeWidth:o,padding:r}=this.getContainerStyles(),s=this.updateGradientRect(e,i),a=this.updateAxis(t,s)??new BBox16(0,0,0,0),n=BBox16.merge([s,a]);n.grow(r).grow(o);const{left:l,top:c}=this.getMeasurements(e,n);this.updateContainer(n),this.updateArrow(),this.legendGroup.visible=!0,this.legendGroup.translationX=l,this.legendGroup.translationY=c}normalizeColorArrays(e){let t=e.colorDomain.slice();const i=e.colorRange.slice();if(t.length===i.length)return{colorDomain:t,colorRange:i};t.length>i.length&&i.splice(t.length);const[o,r]=t,s=i.length;return t=i.map((a,n)=>n===0?o:n===s-1?r:o+(r-o)*n/(s-1)),{colorDomain:t,colorRange:i}}updateGradientRect(e,t){const{gradientRect:i,gradient:o}=this,{preferredLength:r,thickness:s}=o,a=new BBox16(0,0,0,0),n=Math.max(t.length-1,1);let l;return this.isVertical()?(l=0,a.width=s,a.height=Math.min(e.height,r)):(l=90,a.width=Math.min(e.width,r),a.height=s),i.x=a.x,i.y=a.y,i.width=a.width,i.height=a.height,i.fill={type:"gradient",gradient:"linear",colorSpace:"oklch",colorStops:t.map((c,h)=>({stop:h/n,color:c})),rotation:l},a}updateAxis(e,t){const{axisTicks:i,gradient:o,scale:r}=this,{placement:s}=(0,import_ag_charts_core186.expandLegendPosition)(this.position),a=this.isVertical(),n=this.reverseOrder!==a;i.placement=s;const l=o.thickness+(r.padding??0);return i.translationX=a?l:t.x,i.translationY=a?t.y:l,i.scale.domain=n?e.colorDomain.slice().reverse():e.colorDomain,i.scale.range=a?[t.x,t.height]:[t.y,t.width],i.calculateLayout()}updateContainer(e){const t=this.getContainerStyles();this.containerNode.setStyleProperties(t),this.containerNode.cornerRadius=t.cornerRadius,this.containerNode.x=e.x,this.containerNode.y=e.y,this.containerNode.width=e.width,this.containerNode.height=e.height}updateArrow(){const e=this.highlightManager.getActiveHighlight(),{arrow:t}=this;if(e?.colorValue==null){t.visible=!1;return}const{scale:i,label:o}=this.axisTicks,r=o.fontSize??0,s=i.convert(e.colorValue);let{x:a,y:n}=this.gradientRect,l=Math.PI;this.isVertical()?(a-=r/2,n+=s,l/=2):(a+=s,n-=r/2),t.visible=!0,t.fill=o.color,t.rotation=l,t.size=r,t.translationX=a,t.translationY=n}getMeasurements(e,t){const i=d=>{};let{x:o,y:r}=e;const{width:s,height:a}=t,{placement:n,floating:l,xOffset:c,yOffset:h}=(0,import_ag_charts_core186.expandLegendPosition)(this.position),u=this.getContainerStyles();switch(o+=u.strokeWidth+u.padding.left,r+=u.strokeWidth+u.padding.top,n){case"left":r+=e.height/2-a/2;break;case"right":o+=e.width-s,r+=e.height/2-a/2;break;case"top":o+=e.width/2-s/2;break;case"bottom":o+=e.width/2-s/2,r+=e.height-a;break;case"right-top":case"top-right":o+=e.width-s;break;case"right-bottom":case"bottom-right":o+=e.width-s,r+=e.height-a;break;case"left-bottom":case"bottom-left":r+=e.height-a;break;case"left-top":case"top-left":break;default:i(n)}if(!l)switch(n){case"left":case"left-top":case"left-bottom":e.shrink(s+this.spacing,"left");break;case"right":case"right-top":case"right-bottom":e.shrink(s+this.spacing,"right");break;case"top":case"top-left":case"top-right":e.shrink(a+this.spacing,"top");break;case"bottom":case"bottom-left":case"bottom-right":e.shrink(a+this.spacing,"bottom");break;default:i(n)}return o+=c,r+=h,{top:r,left:o}}getContainerStyles(){const{stroke:e,strokeOpacity:t,strokeWidth:i}=this.border,{cornerRadius:o,fill:r,fillOpacity:s,padding:a}=this,n=typeof a=="number";return{cornerRadius:o,fill:r,fillOpacity:s,padding:{top:n?a:a.top??0,right:n?a:a.right??0,bottom:n?a:a.bottom??0,left:n?a:a.left??0},stroke:e,strokeOpacity:t,strokeWidth:this.border.enabled?i:0}}onChartHoverChange(){this.enabled&&this.updateArrow()}};GradientLegend.className="GradientLegend",__decorateClass([import_ag_charts_core186.Property],GradientLegend.prototype,"enabled",2),__decorateClass([import_ag_charts_core186.Property],GradientLegend.prototype,"position",2),__decorateClass([import_ag_charts_core186.Property],GradientLegend.prototype,"reverseOrder",2),__decorateClass([import_ag_charts_core186.Property],GradientLegend.prototype,"gradient",2),__decorateClass([import_ag_charts_core186.Property],GradientLegend.prototype,"spacing",2),__decorateClass([import_ag_charts_core186.Property],GradientLegend.prototype,"border",2),__decorateClass([import_ag_charts_core186.Property],GradientLegend.prototype,"cornerRadius",2),__decorateClass([import_ag_charts_core186.Property],GradientLegend.prototype,"fill",2),__decorateClass([import_ag_charts_core186.Property],GradientLegend.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core186.Property],GradientLegend.prototype,"padding",2),__decorateClass([import_ag_charts_core186.Property],GradientLegend.prototype,"scale",2);var GradientLegendModule={type:"plugin",name:"gradientLegend",enterprise:!0,version:import_ag_charts_community162.VERSION,options:{enabled:import_ag_charts_core187.boolean,position:import_ag_charts_core187.legendPositionValidator,spacing:import_ag_charts_core187.positiveNumber,reverseOrder:import_ag_charts_core187.boolean,border:import_ag_charts_core187.borderOptionsDef,cornerRadius:import_ag_charts_core187.number,padding:import_ag_charts_core187.padding,fill:import_ag_charts_core187.colorUnion,fillOpacity:import_ag_charts_core187.ratio,gradient:{preferredLength:import_ag_charts_core187.positiveNumber,thickness:import_ag_charts_core187.positiveNumber},scale:{label:{...import_ag_charts_core187.fontOptionsDef,minSpacing:import_ag_charts_core187.positiveNumber,format:import_ag_charts_core187.numberFormatValidator,formatter:import_ag_charts_core187.callback},padding:import_ag_charts_core187.positiveNumber,interval:{step:import_ag_charts_core187.number,values:import_ag_charts_core187.array,minSpacing:(0,import_ag_charts_core187.and)(import_ag_charts_core187.positiveNumber,(0,import_ag_charts_core187.lessThan)("maxSpacing")),maxSpacing:(0,import_ag_charts_core187.and)(import_ag_charts_core187.positiveNumber,(0,import_ag_charts_core187.greaterThan)("minSpacing"))}}},themeTemplate:{...import_ag_charts_core187.LEGEND_CONTAINER_THEME,enabled:!1,position:"bottom",spacing:20,scale:{padding:13,label:{color:{$ref:"textColor"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},minSpacing:5},interval:{minSpacing:15}},gradient:{preferredLength:100,thickness:16},reverseOrder:!1,fill:{$applySwitch:[{$path:"type"},{$ref:"chartBackgroundColour"},["gradient",import_ag_charts_core187.FILL_GRADIENT_BLANK_DEFAULTS],["pattern",import_ag_charts_core187.FILL_PATTERN_BLANK_DEFAULTS],["image",import_ag_charts_core187.FILL_IMAGE_BLANK_DEFAULTS]]}},create:e=>{const t=new GradientLegend(e);return t.attachLegend(e.scene),t}},import_ag_charts_community170=require("ag-charts-community"),import_ag_charts_core193=require("ag-charts-core"),import_ag_charts_community164=require("ag-charts-community"),import_ag_charts_community163=require("ag-charts-community"),{Chart}=import_ag_charts_community163._ModuleSupport,StandaloneChart=class extends Chart{getChartType(){return"standalone"}performLayout(e){const{seriesRoot:t,annotationRoot:i}=this,o=e.layoutBox.clone().shrink(this.seriesArea.getPadding());this.seriesRect=o,this.animationRect=o;for(const r of[t,i])r.translationX=Math.floor(o.x),r.translationY=Math.floor(o.y);t.visible=this.series[0].visible,this.ctx.layoutManager.emitLayoutComplete(e,{series:{visible:!0,rect:o,paddedRect:e.layoutBox}})}getAriaLabel(){const e=this.series[0]?.type;if(e==null)return"";const t=this.getCaptionText();switch(e){case"radial-gauge":case"linear-gauge":{const i=[];t.length!==0&&i.push(t);for(const o of this.series)i.push(o.getCaptionText());return this.ctx.localeManager.t("ariaAnnounceGaugeChart",{caption:i.join(". ")})}case"treemap":case"sunburst":return this.ctx.localeManager.t("ariaAnnounceHierarchyChart",{caption:t});default:return this.ctx.localeManager.t("ariaAnnounceStandaloneChart",{caption:t})}}};StandaloneChart.className="StandaloneChart",StandaloneChart.type="standalone";var{standaloneChartOptionsDefs}=import_ag_charts_community164._ModuleSupport,StandaloneChartModule={type:"chart",name:"standalone",enterprise:!0,version:import_ag_charts_community164.VERSION,options:standaloneChartOptionsDefs,create(e,t){return new StandaloneChart(e,t)}},import_ag_charts_community168=require("ag-charts-community"),import_ag_charts_core191=require("ag-charts-core"),import_ag_charts_community165=require("ag-charts-community"),import_ag_charts_core188=require("ag-charts-core");function computeNodeGraph(e,t,i){i||(t=removeCircularLinks(t));const o=new Map;for(const s of e){const a=s.datumIndex.type===0?`link-${s.datumIndex.index}`:`node-${s.datumIndex.index}`;o.set(s.id,{itemId:a,datum:s,linksBefore:[],linksAfter:[],maxPathLengthBefore:-1,maxPathLengthAfter:-1})}let r=0;for(const[s,a]of o.entries())r=Math.max(r,computePathLength(o,t,a,s,-1,[])+computePathLength(o,t,a,s,1,[])+1);return{links:t,nodeGraph:o,maxPathLength:r}}function findCircularLinks(e,t,i,o){const r=o.indexOf(t);if(r!==-1){for(let a=r;a<o.length;a+=1)i.add(o[a]);return}o.push(t);const{toNode:s}=t;for(const a of e)a.fromNode===s&&findCircularLinks(e,a,i,o);o.pop()}function removeCircularLinks(e){const t=new Set;for(const i of e)findCircularLinks(e,i,t,[]);return t.size!==0&&import_ag_charts_core188.Logger.warnOnce("Some links formed circular references. These will be removed from the output."),t.size===0?e:e.filter(i=>!t.has(i))}function computePathLength(e,t,i,o,r,s){if(s.includes(o))return 1/0;let a=r===-1?i.maxPathLengthBefore:i.maxPathLengthAfter;if(a===-1){a=0;const n=r===-1?i.linksBefore:i.linksAfter;for(const l of t){const{fromNode:c,toNode:h}=l,u=r===-1?h.id:c.id,d=r===-1?c.id:h.id,p=o===u?e.get(d):void 0;p!=null&&(n.push({node:p,link:l}),s?.push(o),a=Math.max(a,computePathLength(e,t,p,d,r,s)+1),s?.pop())}r===-1?i.maxPathLengthBefore=a:i.maxPathLengthAfter=a}return a}var{findNodeDatumInArray,keyProperty:keyProperty7,valueProperty:valueProperty9,DataController,Group:Group10,HighlightState:HighlightState4,Selection:Selection5,Series,TransformableText}=import_ag_charts_community165._ModuleSupport,FlowProportionSeriesNodeEvent=class extends import_ag_charts_community165._ModuleSupport.SeriesNodeEvent{constructor(e,t,i,o){super(e,t,i,o);const{datumIndex:r}=i,s=o.contextNodeData?.nodeData.find(a=>a.datumIndex.type===r.type&&a.datumIndex.index===r.index);this.size=s?.size,this.label=s?.type===1?s?.label:void 0}},FlowProportionSeries=class extends Series{constructor(){super(...arguments),this.NodeEvent=FlowProportionSeriesNodeEvent,this.nodeCount=0,this.linkCount=0,this.linksDataModel=void 0,this.linksProcessedData=void 0,this.nodesDataModel=void 0,this.nodesProcessedData=void 0,this.processedNodes=new Map,this.linkGroup=this.contentGroup.appendChild(new Group10({name:"linkGroup"})),this.nodeGroup=this.contentGroup.appendChild(new Group10({name:"nodeGroup"})),this.focusLinkGroup=this.highlightGroup.appendChild(new Group10({name:"linkGroup"})),this.focusNodeGroup=this.highlightGroup.appendChild(new Group10({name:"nodeGroup"})),this.highlightLinkGroup=this.highlightGroup.appendChild(new Group10({name:"linkGroup"})),this.labelSelection=Selection5.select(this.labelGroup,TransformableText),this.linkSelection=Selection5.select(this.linkGroup,()=>this.linkFactory()),this.nodeSelection=Selection5.select(this.nodeGroup,()=>this.nodeFactory()),this.focusLinkSelection=Selection5.select(this.focusLinkGroup,()=>this.linkFactory()),this.focusNodeSelection=Selection5.select(this.focusNodeGroup,()=>this.nodeFactory()),this.highlightLinkSelection=Selection5.select(this.highlightLinkGroup,()=>this.linkFactory()),this.highlightNodeSelection=Selection5.select(this.highlightNodeGroup,()=>this.nodeFactory())}get nodes(){return this.properties.nodes}async processData(e){const{data:t,nodes:i}=this;if(t==null)return;const{fromKey:o,toKey:r,sizeKey:s,idKey:a,labelKey:n}=this.properties,l=new DataController("standalone",e.suppressFieldDotNotation,this.ctx.eventsHub),c=i==null?null:l.request(this.id,import_ag_charts_community165._ModuleSupport.DataSet.wrap(i)??import_ag_charts_community165._ModuleSupport.DataSet.empty(),{props:[keyProperty7(a,void 0,{id:"idValue",includeProperty:!1}),...n==null?[]:[valueProperty9(n,void 0,{id:"labelValue",includeProperty:!1})]],groupByKeys:!0}),h=e.request(this.id,t,{props:[valueProperty9(o,void 0,{id:"fromValue",includeProperty:!1}),valueProperty9(r,void 0,{id:"toValue",includeProperty:!1}),...s==null?[]:[valueProperty9(s,void 0,{id:"sizeValue",includeProperty:!1,missingValue:0})]],groupByKeys:!1});i!=null&&l.execute();const[u,d]=await Promise.all([c??Promise.resolve(null),h]);this.nodesDataModel=u?.dataModel,this.nodesProcessedData=u?.processedData,this.linksDataModel=d?.dataModel,this.linksProcessedData=d?.processedData;const p=new Map;if(u==null){const g=d.dataModel.resolveColumnById(this,"fromValue",d.processedData),y=d.dataModel.resolveColumnById(this,"toValue",d.processedData),x=S=>{const m=p.size,v=S;return{series:this,itemId:`node-${m}`,datum:{},datumIndex:{type:1,index:m},type:1,index:m,linksBefore:[],linksAfter:[],id:S,size:0,label:v,style:this.getNodeStyle({datumIndex:{type:1,index:m},datum:{},size:0,label:v},m,!1)}},f=d.processedData.dataSources.get(this.id)?.data;if(f)for(const[S]of f.entries()){const m=g[S],v=y[S];m==null||v==null||(p.has(m)||p.set(m,x(m)),p.has(v)||p.set(v,x(v)))}}else{const g=u.dataModel.resolveColumnById(this,"idValue",u.processedData),y=n==null?void 0:u.dataModel.resolveColumnById(this,"labelValue",u.processedData),x=u.processedData.dataSources.get(this.id)?.data;if(x)for(const[f,S]of x.entries()){const m=g[f],v=y?.[f],b={type:1,index:f};p.set(m,{series:this,itemId:`node-${f}`,datum:S,datumIndex:b,type:1,index:f,linksBefore:[],linksAfter:[],id:m,size:0,label:v,style:this.getNodeStyle({datumIndex:b,datum:S,size:0,label:v},f,!1)})}}this.processedNodes=p}findNodeDatum(e){return findNodeDatumInArray(e,this.contextNodeData?.nodeData)}getNodeGraph(e,t,{includeCircularReferences:i}){const{linksDataModel:o,linksProcessedData:r}=this;if(o==null||r==null){const{links:y,nodeGraph:x,maxPathLength:f}=computeNodeGraph(new Map().values(),[],i);return this.nodeCount=0,this.linkCount=0,{nodeGraph:x,links:y,maxPathLength:f}}const{sizeKey:s}=this.properties,a=o.resolveColumnById(this,"fromValue",r),n=o.resolveColumnById(this,"toValue",r),l=s==null?void 0:o.resolveColumnById(this,"sizeValue",r),c=new Map;for(const y of this.processedNodes.values()){const x=e(y);c.set(y.id,x)}const h=[],u=r.dataSources.get(this.id)?.data;if(u)for(const[y,x]of u.entries()){const f=a[y],S=n[y],m=l==null?1:l[y],v=c.get(f),b=c.get(S);if(m<=0||v==null||b==null)continue;const D={type:0,index:y},k=t({series:this,itemId:`link-${y}`,datum:x,datumIndex:D,type:0,index:y,fromNode:v,toNode:b,size:m,style:this.getLinkStyle({datum:x,datumIndex:D},v.datumIndex,!1)});h.push(k)}const{links:d,nodeGraph:p,maxPathLength:g}=computeNodeGraph(c.values(),h,i);for(const y of p.values())y.datum.linksBefore=y.linksBefore.map(x=>x.link),y.datum.linksAfter=y.linksAfter.map(x=>x.link);return this.nodeCount=p.size,this.linkCount=d.length,{nodeGraph:p,links:d,maxPathLength:g}}updateSelections(){this.nodeDataRefresh&&(this.contextNodeData=this.createNodeData(),this.nodeDataRefresh=!1)}update(e){const{seriesRect:t}=e,i={seriesRectWidth:t?.width??0,seriesRectHeight:t?.height??0};(this._nodeDataDependencies==null||this._nodeDataDependencies.seriesRectWidth!==i.seriesRectWidth||this._nodeDataDependencies.seriesRectHeight!==i.seriesRectHeight)&&(this._nodeDataDependencies=i),this.updateSelections();const o=this.contextNodeData?.nodeData??[],r=this.contextNodeData?.labelData??[],s=this.getHighlightedDatum();this.contentGroup.visible=this.visible;const a=s==null?HighlightState4.None:HighlightState4.OtherItem;this.contentGroup.opacity=this.properties.highlight.getStyle(a).opacity??1,this.labelSelection=this.updateLabelSelection({labelData:r,labelSelection:this.labelSelection}),this.updateLabelNodes({labelSelection:this.labelSelection}),this.linkSelection=this.updateLinkSelection({nodeData:o.filter(u=>u.type===0),datumSelection:this.linkSelection}),this.updateLinkNodes({datumSelection:this.linkSelection,isHighlight:!1}),this.nodeSelection=this.updateNodeSelection({nodeData:o.filter(u=>u.type===1),datumSelection:this.nodeSelection}),this.updateNodeNodes({datumSelection:this.nodeSelection,isHighlight:!1});let n,l,c,h;s?.type===1?(n=o.filter(u=>u.type===0&&(u.toNode===s||u.fromNode===s)),l=n.map(u=>u.fromNode===s?u.toNode:u.fromNode),l.push(s),c=[],h=[s]):s?.type===0?(n=[s],l=[s.fromNode,s.toNode],c=[s],h=[]):(n=[],l=[],c=[],h=[]),this.focusLinkSelection=this.updateLinkSelection({nodeData:n,datumSelection:this.focusLinkSelection}),this.updateLinkNodes({datumSelection:this.focusLinkSelection,isHighlight:!1}),this.focusNodeSelection=this.updateNodeSelection({nodeData:l,datumSelection:this.focusNodeSelection}),this.updateNodeNodes({datumSelection:this.focusNodeSelection,isHighlight:!1}),this.highlightLinkSelection=this.updateLinkSelection({nodeData:c,datumSelection:this.highlightLinkSelection}),this.updateLinkNodes({datumSelection:this.highlightLinkSelection,isHighlight:!0}),this.highlightNodeSelection=this.updateNodeSelection({nodeData:h,datumSelection:this.highlightNodeSelection}),this.updateNodeNodes({datumSelection:this.highlightNodeSelection,isHighlight:!0})}getHighlightedDatum(){let e=this.ctx.highlightManager?.getActiveHighlight();if(e?.series===this&&e.type==null){const{itemId:t}=e,i=this.contextNodeData?.nodeData??[];e=t==null?void 0:i.find(o=>o.type===1&&o.id===t)}else e?.series!==this&&(e=void 0);return e}isLabelHighlighted(e,t){return t==null?!1:t.type===1?t===e:t.type===0?t.fromNode===e||t.toNode===e:!1}resetAnimation(e){}dataCount(){return Number.NaN}getSeriesDomain(e){return{domain:[]}}getSeriesRange(e,t){return[Number.NaN,Number.NaN]}legendItemSymbol(e,t,i={}){const{fills:o,strokes:r}=this.properties,{fill:s=o[t%o.length],fillOpacity:a=1,stroke:n=r[t%r.length],strokeWidth:l=0,strokeOpacity:c=1,lineDash:h=[0],lineDashOffset:u=0}=i;return{marker:{fill:s,fillOpacity:a,stroke:n,strokeWidth:l,strokeOpacity:c,lineDash:h,lineDashOffset:u}}}getLegendData(e){if(e!=="category")return[];const{showInLegend:t}=this.properties;return Array.from(this.processedNodes.values(),({id:i,label:o},r)=>({legendType:"category",id:this.id,itemId:i,seriesId:this.id,enabled:!0,label:{text:o??i},symbol:this.legendItemSymbol(1,r),hideInLegend:!t,isFixed:!0}))}pickNodeClosestDatum({x:e,y:t}){let i=1/0,o;return this.linkSelection.each((r,s)=>{const a=r.distanceSquared(e,t);a<i&&(i=a,o=s)}),this.nodeSelection.each((r,s)=>{const a=r.distanceSquared(e,t);a<i&&(i=a,o=s)}),o==null?void 0:{datum:o,distance:Math.sqrt(i)}}getDatumAriaText(e,t){if(e.type===0)return this.ctx.localeManager.t("ariaAnnounceFlowProportionLink",{index:e.index+1,count:this.linkCount,from:e.fromNode.id,to:e.toNode.id,size:e.size,sizeName:this.properties.sizeName??this.properties.sizeKey});if(e.type===1)return this.ctx.localeManager.t("ariaAnnounceFlowProportionNode",{index:e.index+1,count:this.nodeCount,description:t})}pickFocus(e){const{datumIndexDelta:t,otherIndexDelta:i}=e,o=this.contextNodeData?.nodeData[e.datumIndex-e.datumIndexDelta];let r=o;if(i!==0||t===0)return;if(o?.type===0){const n=Array.from(this.linkSelection,h=>h.datum),c=n.indexOf(o)+t;c>=0&&c<n.length?r=n[c]:c>0?r=n.at(-1):r=Array.from(this.nodeSelection,u=>u.datum).at(-1)}else if(o?.type===1){const n=Array.from(this.nodeSelection,h=>h.datum),c=n.indexOf(o)+t;c>=0&&c<n.length?r=n[c]:c<0?r=n[0]:r=Array.from(this.linkSelection,u=>u.datum)[0]}if(r==null)return;const s=r.type===1?Array.from(this.nodeSelection).find(n=>n.datum===r):Array.from(this.linkSelection).find(n=>n.datum===r);if(s==null)return;const a=this.computeFocusBounds(s.node);if(a!=null)return{datum:s.datum,datumIndex:this.contextNodeData?.nodeData.indexOf(s.datum)??0,otherIndex:0,bounds:a,clipFocusBox:!0}}getCategoryValue(e){}datumIndexForCategoryValue(e){}},import_ag_charts_community166=require("ag-charts-community"),import_ag_charts_core189=require("ag-charts-core"),{Path:Path9}=import_ag_charts_community166._ModuleSupport;function bezierControlPoints({radius:e,startAngle:t,endAngle:i,tension:o}){const r=e*Math.cos(t),s=e*Math.sin(t),a=e*Math.cos(i),n=e*Math.sin(i),l=r*o,c=s*o,h=a*o,u=n*o;return{x:[r,l,h,a],y:[s,c,u,n]}}var ChordLink=class extends Path9{constructor(){super(...arguments),this.centerX=0,this.centerY=0,this.radius=0,this.startAngle1=0,this.endAngle1=0,this.startAngle2=0,this.endAngle2=0,this.tension=1}tensionedCurveTo(e,t,i,o,r,s,a,n){const{path:l,tension:c}=this,h=1-c;l.cubicCurveTo((i-e)*h+e,(o-t)*h+t,(r-a)*h+a,(s-n)*h+n,a,n)}updatePath(){const{path:e,centerX:t,centerY:i,radius:o}=this;let{startAngle1:r,endAngle1:s,startAngle2:a,endAngle2:n}=this;r>a&&([r,a]=[a,r],[s,n]=[n,s]),e.clear();const l=t+o*Math.cos(r),c=i+o*Math.sin(r);e.moveTo(l,c),this.tensionedCurveTo(l,c,t,i,t,i,t+o*Math.cos(n),i+o*Math.sin(n)),e.arc(t,i,o,n,a,!0),this.tensionedCurveTo(t+o*Math.cos(a),i+o*Math.sin(a),t,i,t,i,t+o*Math.cos(s),i+o*Math.sin(s)),e.arc(t,i,o,s,r,!0),e.closePath()}};__decorateClass([(0,import_ag_charts_core189.SceneChangeDetection)()],ChordLink.prototype,"centerX",2),__decorateClass([(0,import_ag_charts_core189.SceneChangeDetection)()],ChordLink.prototype,"centerY",2),__decorateClass([(0,import_ag_charts_core189.SceneChangeDetection)()],ChordLink.prototype,"radius",2),__decorateClass([(0,import_ag_charts_core189.SceneChangeDetection)()],ChordLink.prototype,"startAngle1",2),__decorateClass([(0,import_ag_charts_core189.SceneChangeDetection)()],ChordLink.prototype,"endAngle1",2),__decorateClass([(0,import_ag_charts_core189.SceneChangeDetection)()],ChordLink.prototype,"startAngle2",2),__decorateClass([(0,import_ag_charts_core189.SceneChangeDetection)()],ChordLink.prototype,"endAngle2",2),__decorateClass([(0,import_ag_charts_core189.SceneChangeDetection)()],ChordLink.prototype,"tension",2);var import_ag_charts_community167=require("ag-charts-community"),import_ag_charts_core190=require("ag-charts-core"),{FillGradientDefaults:FillGradientDefaults2,FillPatternDefaults:FillPatternDefaults2,FillImageDefaults:FillImageDefaults2,makeSeriesTooltip:makeSeriesTooltip8,SeriesProperties,Label:Label6}=import_ag_charts_community167._ModuleSupport,ChordSeriesLabelProperties=class extends Label6{constructor(){super(...arguments),this.spacing=1,this.maxWidth=1}};__decorateClass([import_ag_charts_core190.Property],ChordSeriesLabelProperties.prototype,"spacing",2),__decorateClass([import_ag_charts_core190.Property],ChordSeriesLabelProperties.prototype,"maxWidth",2);var ChordSeriesLinkProperties=class extends import_ag_charts_core190.BaseProperties{constructor(){super(...arguments),this.fill=void 0,this.fillOpacity=1,this.stroke=void 0,this.strokeOpacity=1,this.strokeWidth=1,this.lineDash=[0],this.lineDashOffset=0,this.tension=0}getStyle(e,t,i){const{fillOpacity:o,strokeWidth:r,strokeOpacity:s,lineDash:a,lineDashOffset:n,tension:l}=this,c=this.fill??e[i%e.length],h=this.stroke??t[i%e.length];return{fill:c,fillOpacity:o,stroke:h,strokeWidth:r,strokeOpacity:s,lineDash:a,lineDashOffset:n,tension:l}}};__decorateClass([import_ag_charts_core190.Property],ChordSeriesLinkProperties.prototype,"fill",2),__decorateClass([import_ag_charts_core190.Property],ChordSeriesLinkProperties.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core190.Property],ChordSeriesLinkProperties.prototype,"stroke",2),__decorateClass([import_ag_charts_core190.Property],ChordSeriesLinkProperties.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core190.Property],ChordSeriesLinkProperties.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core190.Property],ChordSeriesLinkProperties.prototype,"lineDash",2),__decorateClass([import_ag_charts_core190.Property],ChordSeriesLinkProperties.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core190.Property],ChordSeriesLinkProperties.prototype,"tension",2),__decorateClass([import_ag_charts_core190.Property],ChordSeriesLinkProperties.prototype,"itemStyler",2);var ChordSeriesNodeProperties=class extends import_ag_charts_core190.BaseProperties{constructor(){super(...arguments),this.spacing=1,this.width=1,this.fill=void 0,this.fillOpacity=1,this.stroke=void 0,this.strokeOpacity=1,this.strokeWidth=1,this.lineDash=[0],this.lineDashOffset=0}getStyle(e,t,i){const{fillOpacity:o,strokeWidth:r,strokeOpacity:s,lineDash:a,lineDashOffset:n}=this,l=this.fill??e[i%e.length],c=this.stroke??t[i%e.length];return{fill:l,fillOpacity:o,stroke:c,strokeWidth:r,strokeOpacity:s,lineDash:a,lineDashOffset:n}}};__decorateClass([import_ag_charts_core190.Property],ChordSeriesNodeProperties.prototype,"spacing",2),__decorateClass([import_ag_charts_core190.Property],ChordSeriesNodeProperties.prototype,"width",2),__decorateClass([import_ag_charts_core190.Property],ChordSeriesNodeProperties.prototype,"fill",2),__decorateClass([import_ag_charts_core190.Property],ChordSeriesNodeProperties.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core190.Property],ChordSeriesNodeProperties.prototype,"stroke",2),__decorateClass([import_ag_charts_core190.Property],ChordSeriesNodeProperties.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core190.Property],ChordSeriesNodeProperties.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core190.Property],ChordSeriesNodeProperties.prototype,"lineDash",2),__decorateClass([import_ag_charts_core190.Property],ChordSeriesNodeProperties.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core190.Property],ChordSeriesNodeProperties.prototype,"itemStyler",2);var ChordSeriesProperties=class extends SeriesProperties{constructor(){super(...arguments),this.idKey="",this.idName=void 0,this.labelKey=void 0,this.labelName=void 0,this.sizeKey=void 0,this.sizeName=void 0,this.nodes=void 0,this.fillGradientDefaults=new FillGradientDefaults2,this.fillPatternDefaults=new FillPatternDefaults2,this.fillImageDefaults=new FillImageDefaults2,this.fills=[],this.strokes=[],this.label=new ChordSeriesLabelProperties,this.link=new ChordSeriesLinkProperties,this.node=new ChordSeriesNodeProperties,this.tooltip=makeSeriesTooltip8()}};__decorateClass([import_ag_charts_core190.Property],ChordSeriesProperties.prototype,"fromKey",2),__decorateClass([import_ag_charts_core190.Property],ChordSeriesProperties.prototype,"toKey",2),__decorateClass([import_ag_charts_core190.Property],ChordSeriesProperties.prototype,"idKey",2),__decorateClass([import_ag_charts_core190.Property],ChordSeriesProperties.prototype,"idName",2),__decorateClass([import_ag_charts_core190.Property],ChordSeriesProperties.prototype,"labelKey",2),__decorateClass([import_ag_charts_core190.Property],ChordSeriesProperties.prototype,"labelName",2),__decorateClass([import_ag_charts_core190.Property],ChordSeriesProperties.prototype,"sizeKey",2),__decorateClass([import_ag_charts_core190.Property],ChordSeriesProperties.prototype,"sizeName",2),__decorateClass([import_ag_charts_core190.Property],ChordSeriesProperties.prototype,"nodes",2),__decorateClass([import_ag_charts_core190.Property],ChordSeriesProperties.prototype,"fillGradientDefaults",2),__decorateClass([import_ag_charts_core190.Property],ChordSeriesProperties.prototype,"fillPatternDefaults",2),__decorateClass([import_ag_charts_core190.Property],ChordSeriesProperties.prototype,"fillImageDefaults",2),__decorateClass([import_ag_charts_core190.Property],ChordSeriesProperties.prototype,"fills",2),__decorateClass([import_ag_charts_core190.Property],ChordSeriesProperties.prototype,"strokes",2),__decorateClass([import_ag_charts_core190.Property],ChordSeriesProperties.prototype,"label",2),__decorateClass([import_ag_charts_core190.Property],ChordSeriesProperties.prototype,"link",2),__decorateClass([import_ag_charts_core190.Property],ChordSeriesProperties.prototype,"node",2),__decorateClass([import_ag_charts_core190.Property],ChordSeriesProperties.prototype,"tooltip",2);var{SeriesNodePickMode:SeriesNodePickMode6,createDatumId:createDatumId7,Sector:Sector3,getShapeStyle,getLabelStyles,BBox:BBox17}=import_ag_charts_community168._ModuleSupport,nodeMidAngle=e=>e.startAngle+(0,import_ag_charts_core191.angleBetween)(e.startAngle,e.endAngle)/2,ChordSeries=class extends FlowProportionSeries{constructor(e){super({moduleCtx:e,pickModes:[SeriesNodePickMode6.NEAREST_NODE,SeriesNodePickMode6.EXACT_SHAPE_MATCH]}),this.properties=new ChordSeriesProperties}isLabelEnabled(){return(this.properties.labelKey!=null||this.nodes==null)&&this.properties.label.enabled}linkFactory(){return new ChordLink}nodeFactory(){return new Sector3}createNodeData(){const{id:e,_nodeDataDependencies:{seriesRectWidth:t,seriesRectHeight:i}={seriesRectWidth:0,seriesRectHeight:0},properties:o}=this,{fromKey:r,toKey:s,sizeKey:a,labelKey:n,label:{spacing:l,maxWidth:c,fontSize:h},node:{width:u,spacing:d}}=o,p=t/2,g=i/2;let y=[];const{nodeGraph:x,links:f}=this.getNodeGraph(L=>({...L,centerX:p,centerY:g,innerRadius:Number.NaN,outerRadius:Number.NaN,startAngle:Number.NaN,endAngle:Number.NaN}),L=>({...L,centerX:p,centerY:g,radius:Number.NaN,startAngle1:Number.NaN,endAngle1:Number.NaN,startAngle2:Number.NaN,endAngle2:Number.NaN}),{includeCircularReferences:!0});let S=0;for(const[L,{datum:E,linksBefore:V,linksAfter:w}]of x.entries()){const T=V.reduce((z,{link:B})=>z+B.size,0)+w.reduce((z,{link:B})=>z+B.size,0);if(T===0)x.delete(L);else{const{label:z}=o;E.size=T,S+=E.size;const B=z.enabled?this.getLabelText(E.label,E.datum,n,"label",[],z,{datum:E.datum,value:E.label,fromKey:r,toKey:s,sizeKey:a,size:E.size}):void 0;E.label=(0,import_ag_charts_core191.toPlainText)(B)}}let m=0;if(this.isLabelEnabled()){const L=(0,import_ag_charts_core191.cachedTextMeasurer)(this.properties.label);let E=0;for(const{datum:V}of x.values()){const{id:w,label:T}=V;if(T==null)continue;const z=(0,import_ag_charts_core191.wrapText)(T,{maxWidth:c,font:this.properties.label,textWrap:"never"}),{width:B}=L.measureLines(z);E=Math.max(B,E),y.push({id:w,text:z,centerX:p,centerY:g,angle:Number.NaN,radius:Number.NaN,size:V.size,datumIndex:V.datumIndex,nodeDatum:V})}m=E+l}const v=x.size;let b=Math.min(t,i)/2-u-m,D=d/b;if(m!==0&&(v*D>=1.5*Math.PI||b<=0)&&(y=[],b=Math.min(t,i)/2-u,D=d/b),v*D>=2*Math.PI||b<=0){import_ag_charts_core191.Logger.warnOnce("There was insufficient space to display the Chord Series.");return}const k=b,A=b+u,M=Math.max((2*Math.PI-v*D)/S,0);let I=0;for(const{datum:L}of x.values()){L.innerRadius=k,L.outerRadius=A,L.startAngle=I,L.endAngle=I+L.size*M,I=L.endAngle+D;const E=(L.innerRadius+L.outerRadius)/2,V=nodeMidAngle(L);L.midPoint={x:L.centerX+E*Math.cos(V),y:L.centerY+E*Math.sin(V)}}const _=[];for(const{datum:L,linksBefore:E,linksAfter:V}of x.values()){const w=nodeMidAngle(L),T=[...E.map(B=>({link:B.link,distance:(0,import_ag_charts_core191.angleBetween)(nodeMidAngle(B.node.datum),w),after:!1})),...V.map(B=>({link:B.link,distance:(0,import_ag_charts_core191.angleBetween)(nodeMidAngle(B.node.datum),w),after:!0}))];let z=L.startAngle;for(const{link:B,after:F}of T.toSorted((R,H)=>R.distance-H.distance)){const R=B.size*M;F?(B.startAngle1=z,B.endAngle1=z+R):(B.startAngle2=z,B.endAngle2=z+R),z+=B.size*M}_.push(L)}const{tension:P}=this.properties.link;for(const L of f){L.radius=b;const E=bezierControlPoints({radius:b,startAngle:L.startAngle1,endAngle:L.endAngle2,tension:P}),V=bezierControlPoints({radius:b,startAngle:L.startAngle2,endAngle:L.endAngle1,tension:P}),w=(0,import_ag_charts_core191.evaluateBezier)(...E.x,.5),T=(0,import_ag_charts_core191.evaluateBezier)(...E.y,.5),z=(0,import_ag_charts_core191.evaluateBezier)(...V.x,.5),B=(0,import_ag_charts_core191.evaluateBezier)(...V.y,.5);L.midPoint={x:L.centerX+(w+z)/2,y:L.centerY+(T+B)/2},_.push(L)}for(const L of y){const E=x.get(L.id)?.datum;E!=null&&(L.radius=A+l,L.angle=(0,import_ag_charts_core191.normalizeAngle360)(E.startAngle+(0,import_ag_charts_core191.angleBetween)(E.startAngle,E.endAngle)/2),L.datumIndex=E.datumIndex,L.nodeDatum=E)}y.sort((L,E)=>L.angle-E.angle);let O=1/0,C=-1/0;return y=y.filter(L=>{const E=(0,import_ag_charts_core191.calcLineHeight)(h),V=Math.atan2(E/2,L.radius),w=L.angle-V,T=L.angle+V;return(0,import_ag_charts_core191.isBetweenAngles)(O,w,T)||(0,import_ag_charts_core191.isBetweenAngles)(C,w,T)?!1:(O=Math.min(w,O),C=Math.max(T,C),!0)}),{itemId:e,nodeData:_,labelData:y}}updateLabelSelection(e){const t=this.isLabelEnabled()?e.labelData:[];return e.labelSelection.update(t)}updateLabelNodes(e){const t={toKey:this.properties.toKey,fromKey:this.properties.fromKey,sizeKey:this.properties.sizeKey,size:Number.NaN},i=this.getHighlightedDatum();e.labelSelection.each((o,r)=>{const{size:s,text:a,centerX:n,centerY:l,radius:c,angle:h,datumIndex:u,nodeDatum:d}=r;t.size=s;const p=this.isLabelHighlighted(d,i),g=this.getHighlightStyle(p,u),y=getLabelStyles(this,void 0,t,this.properties.label,p,i),{fontStyle:x,fontWeight:f,fontSize:S,fontFamily:m,color:v}=y;o.visible=!0,o.translationX=n+c*Math.cos(h),o.translationY=l+c*Math.sin(h),o.text=a,o.fill=v,o.fontStyle=x,o.fontWeight=f,o.fontSize=S,o.fontFamily=m,o.textBaseline="middle",Math.cos(h)>=0?(o.textAlign="left",o.rotation=h):(o.textAlign="right",o.rotation=h-Math.PI);const b=g.opacity??1;o.opacity=b,o.fillOpacity=b,o.setBoxing(y)})}updateNodeSelection(e){return e.datumSelection.update(e.nodeData,void 0,t=>createDatumId7(t.type,t.id))}getNodeStyle(e,t,i){const{properties:o}=this,{fills:r,strokes:s,fillGradientDefaults:a,fillPatternDefaults:n,fillImageDefaults:l}=o,{itemStyler:c}=o.node,h=this.getHighlightStyle(i,e.datumIndex),u=(0,import_ag_charts_core191.mergeDefaults)(h,o.node.getStyle(r,s,t));let d=getShapeStyle(u,a,n,l);if(c!=null&&e.datumIndex!=null){const p=this.cachedDatumCallback(createDatumId7(e.datumIndex.index,"node",i?"highlight":"node"),()=>{const g=this.makeItemStylerParams(e,i,d);return this.callWithContext(c,g)});p&&(d=getShapeStyle((0,import_ag_charts_core191.mergeDefaults)(p,d),a,n,l))}return d.opacity=1,d}makeItemStylerParams({datum:e,datumIndex:t,size:i=0,label:o},r,s){const{id:a}=this,n=this.ctx.highlightManager?.getActiveHighlight(),l=this.getHighlightStateString(n,r,t),c=this.filterItemStylerFillParams(s.fill)??s.fill;return{seriesId:a,datum:e,highlightState:l,...s,size:i,label:o,fill:c}}updateNodeNodes(e){const{datumSelection:t,isHighlight:i}=e,o=this.getShapeFillBBox();t.each((r,s)=>{const{datumIndex:a}=s,n=this.getNodeStyle(s,a.index,i);r.setStyleProperties(n,o),r.centerX=s.centerX,r.centerY=s.centerY,r.innerRadius=s.innerRadius,r.outerRadius=s.outerRadius,r.startAngle=s.startAngle,r.endAngle=s.endAngle,r.inset=r.strokeWidth/2})}updateLinkSelection(e){return e.datumSelection.update(e.nodeData,void 0,t=>createDatumId7(t.type,t.index,t.fromNode.id,t.toNode.id))}getLinkStyle({datumIndex:e,datum:t},i,o){const{id:r,properties:s}=this,{fills:a,strokes:n,fillGradientDefaults:l,fillPatternDefaults:c,fillImageDefaults:h}=s,{itemStyler:u}=s.link,d=this.getHighlightStyle(o,e),p=(0,import_ag_charts_core191.mergeDefaults)(d,s.link.getStyle(a,n,i.index));let g=getShapeStyle(p,l,c,h);if(u!=null&&e!=null){const y=this.ctx.highlightManager?.getActiveHighlight(),x=this.cachedDatumCallback(createDatumId7(e.index,"link",o?"highlight":"node"),()=>{const f=this.getHighlightStateString(y,o,i);return this.callWithContext(u,{seriesId:r,datum:t,highlightState:f,...g})});x&&(g=getShapeStyle((0,import_ag_charts_core191.mergeDefaults)(x,g),l,c,h))}return g.opacity=1,g}updateLinkNodes(e){const{datumSelection:t,isHighlight:i}=e,o=this.getShapeFillBBox();t.each((r,s)=>{const a=s.fromNode.datumIndex,n=this.getLinkStyle(s,a,i);r.centerX=s.centerX,r.centerY=s.centerY,r.radius=s.radius,r.startAngle1=s.startAngle1,r.endAngle1=s.endAngle1,r.startAngle2=s.startAngle2,r.endAngle2=s.endAngle2,r.tension=n.tension,r.setStyleProperties(n,o)})}getShapeFillBBox(){const e=this._nodeDataDependencies?.seriesRectWidth??0,t=this._nodeDataDependencies?.seriesRectHeight??0,i=Math.min(e,t),o=(e-i)/2,r=(t-i)/2,s=new BBox17(o,r,e,t);return{series:s,axis:s}}getTooltipContent(e){const{id:t,linksProcessedData:i,nodesProcessedData:o,properties:r,ctx:{formatManager:s}}=this,{fromKey:a,toKey:n,sizeKey:l,sizeName:c,tooltip:h}=r,u=this.contextNodeData?.nodeData.find(S=>S.datumIndex.type===e.type&&S.datumIndex.index===e.index);if(u==null)return;const d=u.type===0?u.fromNode.index:u.index,p=u.type===0?`${u.fromNode.label} - ${u.toNode.label}`:u.label,g=e.type===0?i?.dataSources.get(this.id)?.data[e.index]:o?.dataSources.get(this.id)?.data[e.index],y=u.size;let x;if(u.type===0){const S=u.fromNode.datumIndex;x=this.getLinkStyle({datumIndex:e,datum:g},S,!1)}else{const S=u.label;x=this.getNodeStyle({datumIndex:e,datum:g,size:y,label:S},e.index,!1)}const f=[];if(l!=null){const S=s.format(this.callWithContext.bind(this),{type:"number",value:y,datum:g,seriesId:t,legendItemName:void 0,key:l,source:"tooltip",property:"size",domain:[],boundSeries:this.getFormatterContext("size"),fractionDigits:void 0,visibleDomain:void 0});f.push({label:c,fallbackLabel:l,value:S??String(y)})}return this.formatTooltipWithContext(h,{title:p,symbol:this.legendItemSymbol(u.type,d,x),data:f},{seriesId:t,datum:g,title:p,fromKey:a,toKey:n,sizeKey:l,sizeName:c,size:y,...x})}computeFocusBounds(e){return e}hasItemStylers(){return this.properties.node.itemStyler!=null||this.properties.link.itemStyler!=null||this.properties.label.itemStyler!=null}};ChordSeries.className="ChordSeries",ChordSeries.type="chord";var import_ag_charts_community169=require("ag-charts-community"),import_ag_charts_core192=require("ag-charts-core"),{chordSeriesThemeableOptionsDef}=import_ag_charts_community169._ModuleSupport,chordSeriesOptionsDef={...chordSeriesThemeableOptionsDef,...import_ag_charts_core192.commonSeriesOptionsDefs,type:(0,import_ag_charts_core192.required)((0,import_ag_charts_core192.constant)("chord")),fromKey:(0,import_ag_charts_core192.required)(import_ag_charts_core192.string),toKey:(0,import_ag_charts_core192.required)(import_ag_charts_core192.string),sizeKey:import_ag_charts_core192.string,sizeName:import_ag_charts_core192.string};chordSeriesOptionsDef.fillGradientDefaults=(0,import_ag_charts_core192.undocumented)(import_ag_charts_core192.fillGradientDefaults),chordSeriesOptionsDef.fillPatternDefaults=(0,import_ag_charts_core192.undocumented)(import_ag_charts_core192.fillPatternDefaults),chordSeriesOptionsDef.fillImageDefaults=(0,import_ag_charts_core192.undocumented)(import_ag_charts_core192.fillImageDefaults);var ChordSeriesModule={type:"series",name:"chord",chartType:"standalone",enterprise:!0,solo:!0,version:import_ag_charts_community170.VERSION,dependencies:[StandaloneChartModule],options:chordSeriesOptionsDef,themeTemplate:{series:{fills:{$palette:"fills"},strokes:{$palette:"strokes"},fillGradientDefaults:import_ag_charts_core193.FILL_GRADIENT_LINEAR_DEFAULTS,fillPatternDefaults:import_ag_charts_core193.FILL_PATTERN_DEFAULTS,fillImageDefaults:import_ag_charts_core193.FILL_IMAGE_DEFAULTS,highlight:import_ag_charts_core193.SINGLE_SERIES_HIGHLIGHT_STYLE,label:{...import_ag_charts_core193.LABEL_BOXING_DEFAULTS,enabled:!0,fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"},spacing:5,maxWidth:100},node:{spacing:8,width:10,strokeWidth:{$isUserOption:["./stroke",2,0]}},link:{fillOpacity:.5,strokeWidth:{$isUserOption:["./stroke",2,0]},tension:.4}},legend:{enabled:!1,toggleSeries:!1}},create:e=>new ChordSeries(e)},import_ag_charts_community177=require("ag-charts-community"),import_ag_charts_core194=require("ag-charts-core"),isHorizontal={$eq:[{$path:["/series/0/direction",void 0]},"horizontal"]},labelOptions={$clone:{$omit:[["placement","spacing"],{$path:"/series/0/stageLabel"}]}},FUNNEL_SERIES_AXES={y:{type:{$if:[isHorizontal,import_ag_charts_core194.CARTESIAN_AXIS_TYPE.NUMBER,import_ag_charts_core194.CARTESIAN_AXIS_TYPE.CATEGORY]},position:{$if:[isHorizontal,import_ag_charts_core194.CARTESIAN_POSITION.LEFT,{$if:[{$eq:[{$path:["/series/0/stageLabel/placement",void 0]},"after"]},import_ag_charts_core194.CARTESIAN_POSITION.RIGHT,import_ag_charts_core194.CARTESIAN_POSITION.LEFT]}]},label:{$if:[isHorizontal,void 0,labelOptions]}},x:{type:{$if:[isHorizontal,import_ag_charts_core194.CARTESIAN_AXIS_TYPE.CATEGORY,import_ag_charts_core194.CARTESIAN_AXIS_TYPE.NUMBER]},position:{$if:[isHorizontal,{$if:[{$eq:[{$path:["/series/0/stageLabel/placement",void 0]},"before"]},import_ag_charts_core194.CARTESIAN_POSITION.TOP,import_ag_charts_core194.CARTESIAN_POSITION.BOTTOM]},import_ag_charts_core194.CARTESIAN_POSITION.BOTTOM]},label:{$if:[isHorizontal,labelOptions,void 0]}}},FUNNEL_SERIES_THEME={series:{direction:"vertical",strokeWidth:{$isUserOption:["./strokes/0",2,0]},spacingRatio:.25,fills:{$applyCycle:[{$size:{$path:["./data",{$path:"/data"}]}},[{$path:["/0",void 0,{$palette:"fills"}]}],{$applySwitch:[{$path:["/type",void 0,{$value:"$1"}]},{$value:"$1"},["gradient",import_ag_charts_core194.FILL_GRADIENT_LINEAR_SINGLE_DEFAULTS],["pattern",import_ag_charts_core194.FILL_PATTERN_SINGLE_DEFAULTS],["image",import_ag_charts_core194.FILL_IMAGE_DEFAULTS]]}]},strokes:{$applyCycle:[{$size:{$path:["./data",{$path:"/data"}]}},[{$path:["/0",void 0,{$palette:"strokes"}]}]]},label:{...import_ag_charts_core194.LABEL_BOXING_DEFAULTS,enabled:!0,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"chartBackgroundColor"}},dropOff:{enabled:!0,fillOpacity:.2,strokeWidth:{$isUserOption:["./stroke",2,0]}},shadow:{enabled:!1,color:import_ag_charts_core194.DEFAULT_SHADOW_COLOUR,xOffset:3,yOffset:3,blur:5},highlight:{unhighlightedItem:{opacity:.6}}},axes:{[import_ag_charts_core194.CARTESIAN_AXIS_TYPE.NUMBER]:{nice:!1,gridLine:{enabled:!1},crosshair:{enabled:!1},label:{enabled:!1}},[import_ag_charts_core194.CARTESIAN_AXIS_TYPE.CATEGORY]:{line:{enabled:!1}}}},import_ag_charts_community175=require("ag-charts-community"),import_ag_charts_core198=require("ag-charts-core"),import_ag_charts_community173=require("ag-charts-community"),import_ag_charts_core196=require("ag-charts-core"),import_ag_charts_community171=require("ag-charts-community"),import_ag_charts_core195=require("ag-charts-core"),{BBox:BBox18,Path:Path10}=import_ag_charts_community171._ModuleSupport,delta=1e-6;function pointsEq([e,t],[i,o]){return Math.abs(e-i)<=delta&&Math.abs(t-o)<=delta}var FunnelConnector=class extends Path10{constructor(){super(...arguments),this.x0=0,this.y0=0,this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.x3=0,this.y3=0}get midPoint(){const{x0:e,y0:t,x1:i,y1:o,x2:r,y2:s,x3:a,y3:n}=this;return{x:(e+i+r+a)/4,y:(t+o+s+n)/4}}distanceSquared(e,t){if(this.containsPoint(e,t))return 0;const{x0:i,y0:o,x1:r,y1:s,x2:a,y2:n,x3:l,y3:c}=this;return Math.min((0,import_ag_charts_core195.lineDistanceSquared)(e,t,i,o,r,s,1/0),(0,import_ag_charts_core195.lineDistanceSquared)(e,t,r,s,a,n,1/0),(0,import_ag_charts_core195.lineDistanceSquared)(e,t,a,n,l,c,1/0),(0,import_ag_charts_core195.lineDistanceSquared)(e,t,l,c,i,o,1/0))}computeBBox(){const{x0:e,y0:t,x1:i,y1:o,x2:r,y2:s,x3:a,y3:n}=this,l=Math.min(e,i,r,a),c=Math.max(e,i,r,a)-l,h=Math.min(t,o,s,n),u=Math.max(t,o,s,n)-h;return new BBox18(l,h,c,u)}updatePath(){const{path:e,x0:t,y0:i,x1:o,y1:r,x2:s,y2:a,x3:n,y3:l}=this,c=[[t,i],[o,r],[s,a],[n,l]];e.clear();let h,u;for(const d of c){if(h!=null&&pointsEq(h,d)||u!=null&&pointsEq(u,d))continue;const[p,g]=d;h==null?e.moveTo(p,g):e.lineTo(p,g),h??(h=d),u=d}e.closePath()}};__decorateClass([(0,import_ag_charts_core195.SceneChangeDetection)()],FunnelConnector.prototype,"x0",2),__decorateClass([(0,import_ag_charts_core195.SceneChangeDetection)()],FunnelConnector.prototype,"y0",2),__decorateClass([(0,import_ag_charts_core195.SceneChangeDetection)()],FunnelConnector.prototype,"x1",2),__decorateClass([(0,import_ag_charts_core195.SceneChangeDetection)()],FunnelConnector.prototype,"y1",2),__decorateClass([(0,import_ag_charts_core195.SceneChangeDetection)()],FunnelConnector.prototype,"x2",2),__decorateClass([(0,import_ag_charts_core195.SceneChangeDetection)()],FunnelConnector.prototype,"y2",2),__decorateClass([(0,import_ag_charts_core195.SceneChangeDetection)()],FunnelConnector.prototype,"x3",2),__decorateClass([(0,import_ag_charts_core195.SceneChangeDetection)()],FunnelConnector.prototype,"y3",2);var import_ag_charts_community172=require("ag-charts-community"),{NODE_UPDATE_STATE_TO_PHASE_MAPPING}=import_ag_charts_community172._ModuleSupport;function connectorStartingPosition(e,t,i,o){const{x0:r,y0:s,x1:a,y1:n,x2:l,y2:c,x3:h,y3:u,opacity:d}=e;return i?{x0:(r+h)/2,y0:(s+u)/2,x1:(a+l)/2,y1:(n+c)/2,x2:(a+l)/2,y2:(n+c)/2,x3:(r+h)/2,y3:(s+u)/2,opacity:d}:{x0:(r+a)/2,y0:(s+n)/2,x1:(r+a)/2,y1:(s+n)/2,x2:(l+h)/2,y2:(c+u)/2,x3:(l+h)/2,y3:(c+u)/2,opacity:d}}function prepareConnectorAnimationFunctions(e,t){const i=s=>s==null;return{fromFn:(s,a,n)=>{n==="updated"&&i(a)?n="removed":n==="updated"&&i(s.previousDatum)&&(n="added");let l;n==="added"&&s.previousDatum==null&&t==="fade"?l={...resetConnectorSelectionsFn(s,a),opacity:0}:n==="unknown"||n==="added"?l=connectorStartingPosition(a,s.previousDatum,e,t):l={x0:s.x0,y0:s.y0,x1:s.x1,y1:s.y1,x2:s.x2,y2:s.y2,x3:s.x3,y3:s.y3,opacity:s.opacity};const c=NODE_UPDATE_STATE_TO_PHASE_MAPPING[n];return{...l,phase:c}},toFn:(s,a,n)=>{let l;return n==="removed"&&s.datum==null&&t==="fade"?l={...resetConnectorSelectionsFn(s,a),opacity:0}:n==="removed"||i(a)?l=connectorStartingPosition(a,s.previousDatum,e,t):l=resetConnectorSelectionsFn(s,a),l}}}function resetConnectorSelectionsFn(e,t){const{x0:i,y0:o,x1:r,y1:s,x2:a,y2:n,x3:l,y3:c,opacity:h}=t;return{x0:i,y0:o,x1:r,y1:s,x2:a,y2:n,x3:l,y3:c,opacity:h}}var{SeriesNodePickMode:SeriesNodePickMode7,valueProperty:valueProperty10,keyProperty:keyProperty8,updateLabelNode:updateLabelNode5,SMALLEST_KEY_INTERVAL:SMALLEST_KEY_INTERVAL4,LARGEST_KEY_INTERVAL:LARGEST_KEY_INTERVAL2,diff:diff5,fixNumericExtent:fixNumericExtent7,seriesLabelFadeInAnimation:seriesLabelFadeInAnimation4,resetMotion:resetMotion2,resetLabelFn:resetLabelFn4,animationValidation:animationValidation6,computeBarFocusBounds:computeBarFocusBounds6,Group:Group11,Selection:Selection6,PointerEvents:PointerEvents4,motion:motion4,checkCrisp:checkCrisp3,createDatumId:createDatumId8}=import_ag_charts_community173._ModuleSupport,FunnelSeriesNodeEvent=class extends import_ag_charts_community173._ModuleSupport.SeriesNodeEvent{constructor(e,t,i,o){super(e,t,i,o),this.xKey=o.properties.stageKey,this.yKey=o.properties.valueKey}},BaseFunnelSeries=class extends import_ag_charts_community173._ModuleSupport.AbstractBarSeries{constructor({moduleCtx:e,animationResetFns:t}){super({moduleCtx:e,pickModes:[SeriesNodePickMode7.AXIS_ALIGNED,SeriesNodePickMode7.EXACT_SHAPE_MATCH],propertyKeys:{x:["stageKey"],y:["valueKey"]},propertyNames:{x:[],y:[]},categoryKey:"xValue",datumSelectionGarbageCollection:!1,animationResetFns:{datum:t.datum,label:resetLabelFn4}}),this.NodeEvent=FunnelSeriesNodeEvent,this.connectorNodeGroup=this.contentGroup.appendChild(new Group11({name:`${this.id}-series-connectorNodes`,zIndex:import_ag_charts_core196.SeriesZIndexMap.BACKGROUND})),this.connectorSelection=Selection6.select(this.connectorNodeGroup,()=>this.connectionFactory()),this.connectorNodeGroup.pointerEvents=PointerEvents4.None}get pickModeAxis(){return"main-category"}setZIndex(e){return super.setZIndex(e),this.connectorNodeGroup.zIndex=[import_ag_charts_core196.SeriesZIndexMap.BACKGROUND,e],!0}isVertical(){return!super.isVertical()}connectionFactory(){return new FunnelConnector}getKeyAxis(e){if(e===import_ag_charts_core196.ChartAxisDirection.X)return this.properties.xKeyAxis;if(e===import_ag_charts_core196.ChartAxisDirection.Y)return this.properties.yKeyAxis}async processData(e){const{stageKey:t,valueKey:i}=this.properties,{visible:o,id:r}=this,s=(y,x,f)=>o&&this.ctx.legendManager.getItemEnabled({seriesId:r,itemId:f}),a=this.getCategoryAxis()?.scale,n=this.getValueAxis()?.scale,{isContinuousX:l,xScaleType:c,yScaleType:h}=this.getScaleInformation({xScale:a,yScale:n}),u=[];this.needsDataModelDiff()&&this.processedData&&u.push(diff5(this.id,this.processedData)),this.ctx.animationManager.isSkipped()||u.push(animationValidation6());const d=this.visible?{}:{forceValue:0},p=this.properties.allowNullKeys??!1,{processedData:g}=await this.requestDataModel(e,this.data,{props:[keyProperty8(t,c,{id:"xValue",allowNullKey:p}),valueProperty10(i,h,{id:"yValue",...d,validation:s,invalidValue:0}),...l?[SMALLEST_KEY_INTERVAL4,LARGEST_KEY_INTERVAL2]:[],...u],groupByKeys:!1});this.smallestDataInterval=g.reduced?.smallestKeyInterval,this.largestDataInterval=g.reduced?.largestKeyInterval,this.animationState.transition("updateData")}getSeriesDomain(e){const{processedData:t,dataModel:i,id:o,ctx:{legendManager:r}}=this;if(!t||!i)return{domain:[]};const{keys:[s]}=t.domain;if(e===this.getCategoryDirection()){const a=i.resolveProcessedDataDefById(this,"xValue");if(a?.def.type==="key"&&a?.def.valueType==="category"){if(!this.hasData)return{domain:[]};const n=s.filter((c,h)=>r.getItemEnabled({seriesId:o,itemId:h})),l=i.getKeySortMetadata(this,"xValue",t);return{domain:n,sortMetadata:l}}return{domain:this.padBandExtent(s)}}else{const a=this.domainForClippedRange(e,["yValue"],"xValue"),n=Math.max(...a),l=[-n,n];return{domain:fixNumericExtent7(l)}}}getSeriesRange(e,t){return[Number.NaN,Number.NaN]}createNodeData(){const{hasData:e,data:t,dataModel:i,processedData:o,id:r,ctx:{legendManager:s}}=this,a=this.getCategoryAxis(),n=this.getValueAxis();if(!(e&&t&&a&&n&&i&&o?.type==="ungrouped"))return;const l=a.scale,c=n.scale,h=this.getBarDirection()===import_ag_charts_core196.ChartAxisDirection.X,{stageKey:u,valueKey:d}=this.properties,p=`${d}`,g={itemId:p,nodeData:[],labelData:[],connectorData:[],scales:this.calculateScaling(),groupScale:this.getScaling(this.ctx.seriesStateManager.getGroupScale(this)),visible:this.visible},y=this.visible;if(!y)return g;const x=i.resolveKeysById(this,"xValue",o),f=i.resolveColumnById(this,"yValue",o),{groupOffset:S,barOffset:m,barWidth:v}=this.getBarDimensions(),b=checkCrisp3(a?.scale,a?.visibleRange,this.smallestDataInterval,this.largestDataInterval);let D;const k=o.dataSources.get(this.id)?.data??[];for(const[A,M]of k.entries()){const I=y&&s.getItemEnabled({seriesId:r,itemId:A}),_=x[A];if(_===void 0&&!this.properties.allowNullKeys)continue;const P=l.convert(_);if(!Number.isFinite(P))continue;const O=Math.round(P)+S+m,C=f[A],L=Math.round(c.convert(-C)),E=Math.round(c.convert(C)),V=this.getItemStyle({datum:M,datumIndex:A},!1),w=Math.max(V.strokeWidth??0,Math.abs(E-L)),T={x:h?Math.min(E,L):O,y:h?O:Math.min(E,L),width:h?w:v,height:h?v:w},z={x:T.x+T.width/2,y:T.y+T.height/2},B=this.createLabelData({datumIndex:A,rect:T,barAlongX:h,yDatum:C,datum:M,visible:I}),F={index:A,series:this,datum:M,datumIndex:A,xValue:_,yValue:C,xKey:u,yKey:d,x:T.x,y:T.y,width:T.width,height:T.height,midPoint:z,crisp:b,label:B,visible:I};if(g.nodeData.push(F),B!=null&&g.labelData.push(B),D!=null){const R=D.rect,H=D.nodeDatum,W=D.datumIndex;h?g.connectorData.push({datum:H,datumIndex:W,x0:R.x,y0:R.y+R.height,x1:R.x+R.width,y1:R.y+R.height,x2:T.x+T.width,y2:T.y,x3:T.x,y3:T.y,opacity:1}):g.connectorData.push({datum:H,datumIndex:W,x0:R.x+R.width,y0:R.y,x1:T.x,y1:T.y,x2:T.x,y2:T.y+T.height,x3:R.x+R.width,y3:R.y+R.height,opacity:1})}I&&(D={itemId:p,rect:T,nodeDatum:F,datumIndex:A})}return g}updateNodes(e,t){super.updateNodes(e,t);const{connectorSelection:i}=this,o=this.contextNodeData?.connectorData??[];this.connectorSelection=this.updateConnectorSelection({connectorSelection:i,connectorData:o}),this.updateConnectorNodes({connectorSelection:i})}updateDatumSelection(e){const{nodeData:t,datumSelection:i}=e,o=t??[];return i.update(o,void 0,r=>this.getDatumId(r))}updateConnectorSelection(e){const{connectorData:t,connectorSelection:i}=e;return i.update(this.connectorEnabled()?t:[],void 0,o=>this.getDatumId(o.datum))}updateConnectorNodes(e){const t=this.getShapeFillBBox();e.connectorSelection.each((i,o)=>{const{fill:r,fillOpacity:s,stroke:a,strokeOpacity:n,strokeWidth:l,lineDash:c,lineDashOffset:h}=this.connectorStyle(o.datumIndex);i.setProperties(resetConnectorSelectionsFn(i,o)),i.setStyleProperties({fill:r,stroke:a,fillOpacity:s,strokeOpacity:n,strokeWidth:l,lineDash:c,lineDashOffset:h},t)})}updateLabelSelection(e){const t=this.properties.label.enabled?e.labelData:[];return e.labelSelection.update(t,i=>{i.pointerEvents=PointerEvents4.None})}updateLabelNodes(e){const t={stageKey:this.properties.stageKey,valueKey:this.properties.valueKey},i=this.ctx.highlightManager?.getActiveHighlight(),{isHighlight:o=!1,labelSelection:r}=e;r.each((s,a)=>{const n=this.getHighlightStyle(o,a.datumIndex);s.visible=a.visible||o,s.fillOpacity=n.opacity??1,s.opacity=n.opacity??1,updateLabelNode5(this,s,t,this.properties.label,a,o,i)})}getHighlightLabelData(e,t){if(t.label)return[{...t.label}]}getTooltipContent(e){const{id:t,dataModel:i,processedData:o,properties:r}=this,{stageKey:s,valueKey:a,tooltip:n,legendItemName:l}=r,c=this.getCategoryAxis(),h=this.getValueAxis();if(!i||!o||!c||!h)return;const u=o.dataSources.get(this.id)?.data[e],d=i.resolveKeysById(this,"xValue",o)[e],p=i.resolveColumnById(this,"yValue",o)[e],g=this.properties.allowNullKeys??!1;if(!(d===void 0&&!g))return this.formatTooltipWithContext(n,{symbol:this.legendItemSymbol(e),data:[{label:this.getAxisValueText(c,"tooltip",d,u,s,l),value:this.getAxisValueText(h,"tooltip",p,u,a,l)}]},{seriesId:t,datum:u,title:s,stageKey:s,valueKey:a,...this.tooltipStyle(u,e)})}resetAllAnimation(e){super.resetAllAnimation(e),resetMotion2([this.connectorSelection],resetConnectorSelectionsFn)}animateEmptyUpdateReady({labelSelection:e}){const{connectorSelection:t}=this,i=this.isVertical(),r=prepareConnectorAnimationFunctions(i,"normal");motion4.fromToMotion(this.id,"connectors",this.ctx.animationManager,[t],r),seriesLabelFadeInAnimation4(this,"labels",this.ctx.animationManager,e)}animateWaitingUpdateReady(e){const{labelSelection:t}=e;this.ctx.animationManager.stopByAnimationGroupId(this.id),seriesLabelFadeInAnimation4(this,"labels",this.ctx.animationManager,t)}getDatumId(e){return createDatumId8(e.xValue)}isLabelEnabled(){return this.properties.label.enabled}computeFocusBounds({datumIndex:e}){return computeBarFocusBounds6(this,this.contextNodeData?.nodeData[e])}legendItemSymbol(e){const{strokeWidth:t,fillOpacity:i,strokeOpacity:o,lineDash:r,lineDashOffset:s,fill:a,stroke:n}=this.properties.getStyle(e);return{marker:{fill:a,fillOpacity:i,stroke:n,strokeWidth:t,strokeOpacity:o,lineDash:r,lineDashOffset:s}}}getLegendData(e){const{id:t,processedData:i,dataModel:o,ctx:{legendManager:r},visible:s}=this;if(!o||!i||e!=="category")return[];const{showInLegend:a}=this.properties,n=o.resolveKeysById(this,"xValue",i);return(i.dataSources.get(this.id)?.data??[]).map((l,c)=>{const h=n[c],u=this.properties.allowNullKeys??!1;if(!(h==null&&!u))return{legendType:"category",id:t,datum:l,itemId:c,seriesId:t,enabled:s&&r.getItemEnabled({seriesId:t,itemId:c}),label:{text:String(h)},symbol:this.legendItemSymbol(c),skipAnimations:!0,hideInLegend:!a}}).filter(l=>l!=null)}hasItemStylers(){return this.properties.itemStyler!=null||this.properties.label.itemStyler!=null}},import_ag_charts_community174=require("ag-charts-community"),import_ag_charts_core197=require("ag-charts-core"),{Label:Label7,AbstractBarSeriesProperties:AbstractBarSeriesProperties5,makeSeriesTooltip:makeSeriesTooltip9,AxisLabel:AxisLabel3}=import_ag_charts_community174._ModuleSupport,ConeFunnelSeriesLabel=class extends Label7{constructor(){super(...arguments),this.spacing=0}};__decorateClass([import_ag_charts_core197.Property],ConeFunnelSeriesLabel.prototype,"placement",2),__decorateClass([import_ag_charts_core197.Property],ConeFunnelSeriesLabel.prototype,"spacing",2);var ConeFunnelSeriesStageLabel=class extends AxisLabel3{};__decorateClass([import_ag_charts_core197.Property],ConeFunnelSeriesStageLabel.prototype,"placement",2);var ConeFunnelProperties=class extends AbstractBarSeriesProperties5{constructor(){super(...arguments),this.fills=[],this.fillOpacity=1,this.strokes=[],this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.label=new ConeFunnelSeriesLabel,this.stageLabel=new ConeFunnelSeriesStageLabel,this.tooltip=makeSeriesTooltip9()}getStyle(e){const{fills:t,strokes:i,fillOpacity:o,strokeWidth:r,strokeOpacity:s,lineDash:a,lineDashOffset:n}=this;return{fill:t[e],fillOpacity:o,stroke:i[e],strokeWidth:r,strokeOpacity:s,lineDash:a,lineDashOffset:n,opacity:1}}};__decorateClass([import_ag_charts_core197.Property],ConeFunnelProperties.prototype,"stageKey",2),__decorateClass([import_ag_charts_core197.Property],ConeFunnelProperties.prototype,"valueKey",2),__decorateClass([import_ag_charts_core197.Property],ConeFunnelProperties.prototype,"fills",2),__decorateClass([import_ag_charts_core197.Property],ConeFunnelProperties.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core197.Property],ConeFunnelProperties.prototype,"strokes",2),__decorateClass([import_ag_charts_core197.Property],ConeFunnelProperties.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core197.Property],ConeFunnelProperties.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core197.Property],ConeFunnelProperties.prototype,"lineDash",2),__decorateClass([import_ag_charts_core197.Property],ConeFunnelProperties.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core197.Property],ConeFunnelProperties.prototype,"label",2),__decorateClass([import_ag_charts_core197.Property],ConeFunnelProperties.prototype,"stageLabel",2),__decorateClass([import_ag_charts_core197.Property],ConeFunnelProperties.prototype,"tooltip",2);function resetLineSelectionsFn(e,{x:t,y:i,width:o,height:r,opacity:s}){return{x1:t,y1:i,x2:t+o,y2:i+r,opacity:s??1}}var{Line:Line5}=import_ag_charts_community175._ModuleSupport,ConeFunnelSeries=class extends BaseFunnelSeries{constructor(e){super({moduleCtx:e,animationResetFns:{datum:resetLineSelectionsFn}}),this.properties=new ConeFunnelProperties}get hasData(){const{id:e,ctx:{legendManager:t}}=this,i=this.data?.data.reduce((o,r,s)=>o+(t.getItemEnabled({seriesId:e,itemId:s})?1:0),0);return i!=null&&i>1}getBandScalePadding(){return{inner:1,outer:0}}connectorEnabled(){return!0}getItemStyle({datumIndex:e},t){return this.properties.getStyle(e)}connectorStyle(e){return this.properties.getStyle(e)}nodeFactory(){return new Line5}createLabelData({datumIndex:e,rect:t,barAlongX:i,yDatum:o,datum:r,visible:s}){const{stageKey:a,valueKey:n,label:l}=this.properties,{spacing:c,placement:h}=l;if(!l.enabled)return;let u,d,p,g;if(i)switch(u=t.x+t.width/2,p="center",h){case"before":d=t.y-c,g="bottom";break;case"after":d=t.y+t.height+c,g="top";break;default:d=t.y+t.height/2,g="middle"}else switch(d=t.y+t.height/2,g="middle",h){case"before":u=t.x-c,p="right";break;case"after":u=t.x+t.width+c,p="left";break;default:u=t.x+t.width/2,p="center"}const y=this.getSeriesDomain(import_ag_charts_core198.ChartAxisDirection.Y).domain,x=this.getLabelText(o,r,n,"y",y,l,{itemId:n,value:o,datum:r,stageKey:a,valueKey:n});return{x:u,y:d,textAlign:p,textBaseline:g,text:x,itemId:n,datum:r,datumIndex:e,series:this,visible:s}}updateDatumNodes(e){const t=this.getHighlightStyle(e.isHighlight);e.datumSelection.each((i,o)=>{i.setProperties(resetLineSelectionsFn(i,o)),i.stroke=t?.stroke,i.strokeWidth=t?.strokeWidth??0,i.strokeOpacity=t?.strokeOpacity??1,i.lineDash=t?.lineDash,i.lineDashOffset=t?.lineDashOffset??0,i.opacity=t?.opacity??1})}tooltipStyle(e,t){const{fill:i,stroke:o,fillOpacity:r,strokeOpacity:s,strokeWidth:a,lineDash:n,lineDashOffset:l}=this.properties.getStyle(t);return{fill:i,fillOpacity:r,stroke:o,strokeOpacity:s,strokeWidth:a,lineDash:n,lineDashOffset:l}}hasItemStylers(){return this.properties.label.itemStyler!=null}};ConeFunnelSeries.className="ConeFunnelSeries",ConeFunnelSeries.type="cone-funnel";var import_ag_charts_community176=require("ag-charts-community"),import_ag_charts_core199=require("ag-charts-core"),{coneFunnelSeriesThemeableOptionsDef}=import_ag_charts_community176._ModuleSupport,coneFunnelSeriesOptionsDef={...(0,import_ag_charts_core199.without)(import_ag_charts_core199.commonSeriesOptionsDefs,["showInLegend"]),...coneFunnelSeriesThemeableOptionsDef,type:(0,import_ag_charts_core199.required)((0,import_ag_charts_core199.constant)("cone-funnel")),stageKey:(0,import_ag_charts_core199.required)(import_ag_charts_core199.string),valueKey:(0,import_ag_charts_core199.required)(import_ag_charts_core199.string)},import_ag_charts_core200=require("ag-charts-core"),CONE_FUNNEL_SERIES_THEME={series:{direction:"vertical",fills:{$applyCycle:[{$size:{$path:["./data",{$path:"/data"}]}},{$if:[{$eq:[{$palette:"type"},"inbuilt"]},{$palette:"secondSequentialColors"},import_ag_charts_core200.SAFE_RANGE2_OPERATION]},{$applySwitch:[{$path:["/type",void 0,{$value:"$1"}]},{$value:"$1"},["gradient",import_ag_charts_core200.FILL_GRADIENT_LINEAR_SINGLE_DEFAULTS],["pattern",import_ag_charts_core200.FILL_PATTERN_SINGLE_DEFAULTS],["image",import_ag_charts_core200.FILL_IMAGE_DEFAULTS]]}]},strokes:{$applyCycle:[{$size:{$path:["./data",{$path:"/data"}]}},{$if:[{$eq:[{$palette:"type"},"inbuilt"]},{$palette:"secondSequentialColors"},import_ag_charts_core200.SAFE_RANGE2_OPERATION]}]},strokeWidth:{$isUserOption:["./strokes/0",2,0]},label:{...import_ag_charts_core200.LABEL_BOXING_DEFAULTS,enabled:!0,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"},placement:"before",spacing:4},tooltip:{range:{$path:["/tooltip/range","nearest"]}},highlight:{highlightedItem:{stroke:"rgba(0, 0, 0, 0.4)",strokeWidth:2}}},seriesArea:{padding:{top:20,bottom:20}},axes:{[import_ag_charts_core200.CARTESIAN_AXIS_TYPE.NUMBER]:{nice:!1,gridLine:{enabled:!1},crosshair:{enabled:!1},label:{enabled:!1}},[import_ag_charts_core200.CARTESIAN_AXIS_TYPE.CATEGORY]:{line:{enabled:!1}}}},ConeFunnelSeriesModule={type:"series",name:"cone-funnel",chartType:"cartesian",enterprise:!0,solo:!0,version:import_ag_charts_community177.VERSION,dependencies:[import_ag_charts_community177.CartesianChartModule],options:coneFunnelSeriesOptionsDef,defaultAxes:FUNNEL_SERIES_AXES,themeTemplate:CONE_FUNNEL_SERIES_THEME,create:e=>new ConeFunnelSeries(e)},import_ag_charts_community181=require("ag-charts-community"),import_ag_charts_community179=require("ag-charts-community"),import_ag_charts_core202=require("ag-charts-core"),import_ag_charts_community178=require("ag-charts-community"),import_ag_charts_core201=require("ag-charts-core"),{Label:Label8,DropShadow:DropShadow4,AbstractBarSeriesProperties:AbstractBarSeriesProperties6,makeSeriesTooltip:makeSeriesTooltip10,AxisLabel:AxisLabel4}=import_ag_charts_community178._ModuleSupport,FunnelSeriesLabel=class extends Label8{},FunnelSeriesStageLabel=class extends AxisLabel4{};__decorateClass([import_ag_charts_core201.Property],FunnelSeriesStageLabel.prototype,"placement",2);var FunnelDropOff=class extends import_ag_charts_core201.BaseProperties{constructor(){super(...arguments),this.enabled=!0,this.fill=void 0,this.fillOpacity=1,this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0}getStyle(){const{fill:e,stroke:t,fillOpacity:i,strokeWidth:o,strokeOpacity:r,lineDash:s,lineDashOffset:a}=this;return{fill:e,fillOpacity:i,stroke:t,strokeWidth:o,strokeOpacity:r,lineDash:s,lineDashOffset:a,opacity:1}}};__decorateClass([import_ag_charts_core201.Property],FunnelDropOff.prototype,"enabled",2),__decorateClass([import_ag_charts_core201.Property],FunnelDropOff.prototype,"fill",2),__decorateClass([import_ag_charts_core201.Property],FunnelDropOff.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core201.Property],FunnelDropOff.prototype,"stroke",2),__decorateClass([import_ag_charts_core201.Property],FunnelDropOff.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core201.Property],FunnelDropOff.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core201.Property],FunnelDropOff.prototype,"lineDash",2),__decorateClass([import_ag_charts_core201.Property],FunnelDropOff.prototype,"lineDashOffset",2);var FunnelProperties=class extends AbstractBarSeriesProperties6{constructor(){super(...arguments),this.fills=[],this.fillOpacity=1,this.strokes=[],this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.spacingRatio=0,this.dropOff=new FunnelDropOff,this.shadow=new DropShadow4().set({enabled:!1}),this.label=new FunnelSeriesLabel,this.stageLabel=new FunnelSeriesStageLabel,this.tooltip=makeSeriesTooltip10()}getStyle(e){const{fills:t,strokes:i,fillOpacity:o,strokeWidth:r,strokeOpacity:s,lineDash:a,lineDashOffset:n}=this;return{fill:t[e],fillOpacity:o,stroke:i[e],strokeWidth:r,strokeOpacity:s,lineDash:a,lineDashOffset:n,opacity:1}}};__decorateClass([import_ag_charts_core201.Property],FunnelProperties.prototype,"stageKey",2),__decorateClass([import_ag_charts_core201.Property],FunnelProperties.prototype,"valueKey",2),__decorateClass([import_ag_charts_core201.Property],FunnelProperties.prototype,"fills",2),__decorateClass([import_ag_charts_core201.Property],FunnelProperties.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core201.Property],FunnelProperties.prototype,"strokes",2),__decorateClass([import_ag_charts_core201.Property],FunnelProperties.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core201.Property],FunnelProperties.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core201.Property],FunnelProperties.prototype,"lineDash",2),__decorateClass([import_ag_charts_core201.Property],FunnelProperties.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core201.Property],FunnelProperties.prototype,"spacingRatio",2),__decorateClass([import_ag_charts_core201.Property],FunnelProperties.prototype,"itemStyler",2),__decorateClass([import_ag_charts_core201.Property],FunnelProperties.prototype,"dropOff",2),__decorateClass([import_ag_charts_core201.Property],FunnelProperties.prototype,"shadow",2),__decorateClass([import_ag_charts_core201.Property],FunnelProperties.prototype,"label",2),__decorateClass([import_ag_charts_core201.Property],FunnelProperties.prototype,"stageLabel",2),__decorateClass([import_ag_charts_core201.Property],FunnelProperties.prototype,"tooltip",2);var{resetBarSelectionsFn:resetBarSelectionsFn3,prepareBarAnimationFunctions:prepareBarAnimationFunctions3,midpointStartingBarPosition:midpointStartingBarPosition2,createDatumId:createDatumId9,Rect:Rect7,motion:motion5}=import_ag_charts_community179._ModuleSupport,FunnelSeries=class extends BaseFunnelSeries{constructor(e){super({moduleCtx:e,animationResetFns:{datum:resetBarSelectionsFn3}}),this.properties=new FunnelProperties}getBandScalePadding(){return{inner:this.properties.spacingRatio,outer:0}}connectorEnabled(){return this.properties.dropOff.enabled}connectorStyle(e){return(0,import_ag_charts_core202.mergeDefaults)(this.properties.dropOff.getStyle(),this.properties.getStyle(e))}nodeFactory(){return new Rect7}createLabelData({datumIndex:e,rect:t,yDatum:i,datum:o,visible:r}){const{valueKey:s,stageKey:a,label:n}=this.properties;if(!n.enabled)return;const l=this.getSeriesDomain(import_ag_charts_core202.ChartAxisDirection.Y).domain,c=this.getLabelText(i,o,s,"y",l,n,{itemId:s,value:i,datum:o,stageKey:a,valueKey:s});return{x:t.x+t.width/2,y:t.y+t.height/2,textAlign:"center",textBaseline:"middle",text:c,itemId:a,datum:o,datumIndex:e,series:this,visible:r}}getItemStyle({datum:e,datumIndex:t},i){const{id:o,properties:r}=this,{stageKey:s,valueKey:a,itemStyler:n}=r,l=this.getHighlightStyle(i,t);let h=(0,import_ag_charts_core202.mergeDefaults)(l,r.getStyle(t));if(n!=null){const u=this.ctx.highlightManager?.getActiveHighlight(),d=this.cachedDatumCallback(createDatumId9(t,i?"highlight":"node"),()=>{const p=this.getHighlightStateString(u,i,t);return this.callWithContext(n,{seriesId:o,datum:e,highlightState:p,stageKey:s,valueKey:a,...h})});d&&(h=(0,import_ag_charts_core202.mergeDefaults)(d,h))}return h}updateDatumNodes({datumSelection:e,isHighlight:t}){const{contextNodeData:i}=this;if(!i)return;const{shadow:o}=this.properties,r=this.getCategoryDirection()===import_ag_charts_core202.ChartAxisDirection.X,s=this.getShapeFillBBox();e.each((a,n)=>{const l=this.getItemStyle(n,t);a.setStyleProperties(l,s),a.visible=r?n.width>0:n.height>0,a.crisp=n.crisp,a.fillShadow=o})}tooltipStyle(e,t){return this.getItemStyle({datum:e,datumIndex:t},!1)}animateEmptyUpdateReady(e){super.animateEmptyUpdateReady(e);const{datumSelection:t}=e,i=this.isVertical(),r=prepareBarAnimationFunctions3(midpointStartingBarPosition2(i,"normal"),"unknown");motion5.fromToMotion(this.id,"datums",this.ctx.animationManager,[t],r)}animateWaitingUpdateReady(e){super.animateWaitingUpdateReady(e);const{datumSelection:t}=e,{processedData:i}=this,o=i?.reduced?.diff?.[this.id],r=prepareBarAnimationFunctions3(midpointStartingBarPosition2(this.isVertical(),"fade"),"added");motion5.fromToMotion(this.id,"datums",this.ctx.animationManager,[t],r,(s,a)=>a.xValue,o)}hasItemStylers(){return this.properties.itemStyler!=null||this.properties.label.itemStyler!=null}};FunnelSeries.className="FunnelSeries",FunnelSeries.type="funnel";var import_ag_charts_community180=require("ag-charts-community"),import_ag_charts_core203=require("ag-charts-core"),{funnelSeriesThemeableOptionsDef}=import_ag_charts_community180._ModuleSupport,funnelSeriesOptionsDef={...funnelSeriesThemeableOptionsDef,...(0,import_ag_charts_core203.without)(import_ag_charts_core203.commonSeriesOptionsDefs,["showInLegend"]),type:(0,import_ag_charts_core203.required)((0,import_ag_charts_core203.constant)("funnel")),stageKey:(0,import_ag_charts_core203.required)(import_ag_charts_core203.string),valueKey:(0,import_ag_charts_core203.required)(import_ag_charts_core203.string)},FunnelSeriesModule={type:"series",name:"funnel",chartType:"cartesian",enterprise:!0,solo:!0,version:import_ag_charts_community181.VERSION,dependencies:[import_ag_charts_community181.CartesianChartModule],options:funnelSeriesOptionsDef,defaultAxes:FUNNEL_SERIES_AXES,themeTemplate:FUNNEL_SERIES_THEME,create:e=>new FunnelSeries(e)},import_ag_charts_community187=require("ag-charts-community"),import_ag_charts_core212=require("ag-charts-core"),import_ag_charts_community182=require("ag-charts-community"),import_ag_charts_core205=require("ag-charts-core"),import_ag_charts_core204=require("ag-charts-core");function tooltipOptions(e){const{enabled:t,mode:i,showArrow:o,range:r,position:s,pagination:a,delay:n,wrapping:l,interaction:c,renderer:h,...u}=e,d={enabled:t,showArrow:o,range:r,position:s,interaction:c,renderer:h,...u};return{chartTooltipOptions:{mode:i,pagination:a,delay:n,wrapping:l,...u},seriesTooltipOptions:d}}function radialGaugeOptions(e){const{animation:t,background:i,container:o,contextMenu:r,context:s,footnote:a,foreground:n,height:l,listeners:c,locale:h,minHeight:u,minWidth:d,overrideDevicePixelRatio:p,padding:g,subtitle:y,theme:x,title:f,width:S,type:m,cursor:v,nodeClickRange:b,tooltip:D,value:k,scale:A={},startAngle:M,endAngle:I,highlight:_,segmentation:P,bar:O,needle:C,targets:L,outerRadius:E,innerRadius:V,outerRadiusRatio:w,innerRadiusRatio:T,cornerRadius:z,cornerMode:B,label:F,secondaryLabel:R,spacing:H,...W}=e,K=D!=null,G=D??{},{chartTooltipOptions:U,seriesTooltipOptions:X}=tooltipOptions(G),J={...W,type:m,cursor:v,context:s,nodeClickRange:b,value:k,scale:A,startAngle:M,endAngle:I,highlight:_,segmentation:P,bar:O,targets:L,outerRadius:E,innerRadius:V,outerRadiusRatio:w,innerRadiusRatio:T,cornerRadius:z,cornerMode:B,label:F,secondaryLabel:R,spacing:H};return K&&(J.tooltip=X),C!=null&&(J.needle={enabled:!0,...C}),{animation:t,background:i,container:o,contextMenu:r,context:s,footnote:a,foreground:n,height:l,listeners:c,locale:h,minHeight:u,minWidth:d,overrideDevicePixelRatio:p,padding:g,subtitle:y,theme:x,title:f,width:S,...K?{tooltip:U}:{},series:[J]}}function linearGaugeOptions(e){const{animation:t,background:i,container:o,contextMenu:r,context:s,footnote:a,foreground:n,height:l,listeners:c,locale:h,minHeight:u,minWidth:d,overrideDevicePixelRatio:p,padding:g,subtitle:y,theme:x,title:f,width:S,type:m,cursor:v,nodeClickRange:b,tooltip:D,value:k,scale:A={},direction:M="vertical",thickness:I,highlight:_,segmentation:P,bar:O,targets:C,cornerRadius:L,cornerMode:E,label:V,...w}=e,T=D!=null,z=D??{},{chartTooltipOptions:B,seriesTooltipOptions:F}=tooltipOptions(z),R={...w,type:m,cursor:v,nodeClickRange:b,value:k,scale:A,direction:M,thickness:I,highlight:_,segmentation:P,bar:O,targets:C,cornerRadius:L,cornerMode:E,label:V};return T&&(R.tooltip=F),{animation:t,background:i,container:o,contextMenu:r,context:s,footnote:a,foreground:n,height:l,listeners:c,locale:h,minHeight:u,minWidth:d,overrideDevicePixelRatio:p,padding:g,subtitle:y,theme:x,title:f,width:S,...T?{tooltip:B}:{},series:[R]}}function applyThemeDefaults(e,t){if(t==null)return e;const{targets:i,...o}=t;return e=(0,import_ag_charts_core204.mergeDefaults)(e,o),e.targets!=null&&i!=null&&(e.type,e.targets=(0,import_ag_charts_core204.mergeArrayDefaults)(e.targets,i)),e}function createGauge(e,t){switch(e.type){case"radial-gauge":return radialGaugeOptions(applyThemeDefaults(e,t));case"linear-gauge":return linearGaugeOptions(applyThemeDefaults(e,t));default:return{series:[]}}}var commonGaugeOptions={theme:import_ag_charts_core205.defined,container:import_ag_charts_core205.defined,animation:import_ag_charts_core205.defined,background:import_ag_charts_core205.defined,contextMenu:import_ag_charts_core205.defined,context:()=>!0,listeners:import_ag_charts_core205.defined,locale:import_ag_charts_core205.defined,width:import_ag_charts_core205.defined,height:import_ag_charts_core205.defined,minWidth:import_ag_charts_core205.defined,minHeight:import_ag_charts_core205.defined,title:import_ag_charts_core205.defined,subtitle:import_ag_charts_core205.defined,footnote:import_ag_charts_core205.defined,padding:import_ag_charts_core205.defined,tooltip:{...import_ag_charts_core205.tooltipOptionsDefs,...import_ag_charts_core205.commonChartOptionsDefs.tooltip}};commonGaugeOptions.overrideDevicePixelRatio=(0,import_ag_charts_core205.undocumented)(import_ag_charts_core205.positiveNumber),commonGaugeOptions.foreground=(0,import_ag_charts_core205.undocumented)(import_ag_charts_core205.defined);var GaugePresetModule={type:"preset",name:"gauge-preset",enterprise:!0,version:import_ag_charts_community182.VERSION,dependencies:[StandaloneChartModule],options:(0,import_ag_charts_core205.typeUnion)({"linear-gauge":{...(0,import_ag_charts_core205.without)(import_ag_charts_core205.linearGaugeSeriesOptionsDef,["type"]),...commonGaugeOptions},"radial-gauge":{...(0,import_ag_charts_core205.without)(import_ag_charts_core205.radialGaugeSeriesOptionsDef,["type"]),...commonGaugeOptions}},"gauge options"),create:createGauge},import_ag_charts_community186=require("ag-charts-community"),import_ag_charts_core211=require("ag-charts-core"),DatumUnion=class{*[Symbol.iterator](){const{node:e,datum:t}=this;e&&t&&(yield{node:e,datum:t})}nodes(){return this.node?[this.node]:[]}update(e,t,i,o){const r=e.nodes();if(r.length===0)this.node?.remove(),this.node=void 0;else{this.node===void 0&&(this.node=new i,this.node.fillOpacity=0,this.node.strokeOpacity=0,t.appendChild(this.node));const s=r[0],a=r.toReversed().find(n=>n.datum.datum.value>n.datum.datum.segmentStart)??r.at(-1);this.node.datum=this.datum=s.datum,o(this.node,s,a)}}},import_ag_charts_core206=require("ag-charts-core"),fadeInFns={fromFn:()=>({opacity:0,phase:"initial"}),toFn:()=>({opacity:1})};function formatLabel(e,t){if(e==null)return"";const{min:i,max:o}=t,r=i===0?0:Math.ceil(Math.log10(Math.abs(i))),s=o===0?0:Math.ceil(Math.log10(Math.abs(o))),a=Math.max(2-Math.max(r,s),0);return e.toFixed(a)}function getLabelText(e,t,i,o){if(i.text!=null)return i.text;const r=o??i.value;let s;return i?.formatter!=null&&(s=formatWithContext(t,i.formatter,{seriesId:e,datum:void 0,value:r})),s==null||(0,import_ag_charts_core206.isArray)(s)?s:String(s)}function lineMarker({path:e,x:t,y:i,size:o}){e.moveTo(t,i-o/2),e.lineTo(t,i+o/2)}var import_ag_charts_community183=require("ag-charts-community"),import_ag_charts_core207=require("ag-charts-core");function pickGaugeNearestDatum(e,t){const i=(0,import_ag_charts_core207.iterate)(e.datumUnion.nodes(),e.targetSelection.nodes());return e.pickNodeNearestDistantObject(t,i)}function pickGaugeFocus(e,t){const i=[{data:e.contextNodeData?.nodeData,selection:e.datumUnion},{data:e.contextNodeData?.targetData,selection:e.targetSelection}].filter(l=>l.data&&l.data.length>0),o=(0,import_ag_charts_core207.clamp)(0,t.otherIndex+t.otherIndexDelta,i.length-1);if(i.length===0)return;const{data:r,selection:s}=i[o];if(r==null||r.length===0)return;const a=(0,import_ag_charts_core207.clamp)(0,t.datumIndex,r.length-1),n=r[a];for(const l of s)if(l.datum===n)return{bounds:l.node,clipFocusBox:!0,datum:n,datumIndex:a,otherIndex:o}}function findGaugeNodeDatum(e,t){return import_ag_charts_community183._ModuleSupport.findNodeDatumInArray(t,e.contextNodeData?.nodeData)??import_ag_charts_community183._ModuleSupport.findNodeDatumInArray(t,e.contextNodeData?.targetData)}var import_ag_charts_community184=require("ag-charts-community"),import_ag_charts_core209=require("ag-charts-core"),import_ag_charts_core208=require("ag-charts-core"),GaugeSegmentationIntervalProperties=class extends import_ag_charts_core208.BaseProperties{getSegments(e,t){const{values:i,step:o,count:r}=this,s=Math.min(...e.domain),a=Math.max(...e.domain);let n;if(i!=null){const l=i.filter(c=>c>s&&c<a).sort((c,h)=>c-h);n=[s,...l,a]}else if(o!=null){const l=[];for(let c=s;c<a;c+=o)l.push(c);l.push(a),n=l}else if(r==null){const l=e.ticks({nice:[!0,!0],interval:void 0,tickCount:void 0,minTickCount:0,maxTickCount:1/0})?.ticks?.filter(c=>c>s&&c<a);n=l==null?void 0:[s,...l,a]}else{const l=r+1;n=Array.from({length:l+1},(c,h)=>h/l*(a-s)+s)}return n!=null&&n.length>t&&(import_ag_charts_core208.Logger.warnOnce("the configured segmentation results in more than 1 item per pixel, ignoring. Supply a segmentation configuration that results in larger segments or omit this configuration"),n=void 0),n??(n=[s,a]),n}};__decorateClass([import_ag_charts_core208.Property],GaugeSegmentationIntervalProperties.prototype,"values",2),__decorateClass([import_ag_charts_core208.Property],GaugeSegmentationIntervalProperties.prototype,"step",2),__decorateClass([import_ag_charts_core208.Property],GaugeSegmentationIntervalProperties.prototype,"count",2);var GaugeSegmentationProperties=class extends import_ag_charts_core208.BaseProperties{constructor(){super(...arguments),this.enabled=!1,this.interval=new GaugeSegmentationIntervalProperties,this.spacing=0}};__decorateClass([import_ag_charts_core208.Property],GaugeSegmentationProperties.prototype,"enabled",2),__decorateClass([import_ag_charts_core208.Property],GaugeSegmentationProperties.prototype,"interval",2),__decorateClass([import_ag_charts_core208.Property],GaugeSegmentationProperties.prototype,"spacing",2);var{makeSeriesTooltip:makeSeriesTooltip11,SeriesProperties:SeriesProperties2,Label:Label9,AxisLabel:AxisLabel5,getColorStops}=import_ag_charts_community184._ModuleSupport,LinearGaugeDefaultTargetLabelProperties=class extends Label9{};__decorateClass([import_ag_charts_core209.Property],LinearGaugeDefaultTargetLabelProperties.prototype,"spacing",2);var LinearGaugeTargetProperties=class extends import_ag_charts_core209.BaseProperties{constructor(){super(...arguments),this.value=0,this.label=new LinearGaugeDefaultTargetLabelProperties}getStyle(e){const{fill:t=e.fill??"black",fillOpacity:i=e.fillOpacity??1,stroke:o=e.stroke??"black",strokeWidth:r=e.strokeWidth??0,strokeOpacity:s=e.strokeOpacity??1,lineDash:a=e.lineDash??[0],lineDashOffset:n=e.lineDashOffset??0}=this;return{fill:t,fillOpacity:i,stroke:o,strokeWidth:r,strokeOpacity:s,lineDash:a,lineDashOffset:n}}};__decorateClass([import_ag_charts_core209.Property],LinearGaugeTargetProperties.prototype,"text",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeTargetProperties.prototype,"value",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeTargetProperties.prototype,"shape",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeTargetProperties.prototype,"placement",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeTargetProperties.prototype,"spacing",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeTargetProperties.prototype,"size",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeTargetProperties.prototype,"rotation",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeTargetProperties.prototype,"fill",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeTargetProperties.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeTargetProperties.prototype,"stroke",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeTargetProperties.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeTargetProperties.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeTargetProperties.prototype,"lineDash",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeTargetProperties.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeTargetProperties.prototype,"label",2);var LinearGaugeBarProperties=class extends import_ag_charts_core209.BaseProperties{constructor(){super(...arguments),this.enabled=!0,this.thicknessRatio=1,this.fills=new import_ag_charts_core209.PropertiesArray(import_ag_charts_community184._ModuleSupport.StopProperties),this.fillMode="continuous",this.fillOpacity=1,this.stroke="black",this.strokeWidth=0,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0}getStyle(e,t,i){const{fill:o,fills:r,fillMode:s,fillOpacity:a,stroke:n,strokeWidth:l,strokeOpacity:c,lineDash:h,lineDashOffset:u}=this;return{fill:o??createLinearGradient(r,s,e,i,t),fillOpacity:a,stroke:n,strokeWidth:l,strokeOpacity:c,lineDash:h,lineDashOffset:u}}};__decorateClass([import_ag_charts_core209.Property],LinearGaugeBarProperties.prototype,"enabled",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeBarProperties.prototype,"thickness",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeBarProperties.prototype,"thicknessRatio",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeBarProperties.prototype,"fills",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeBarProperties.prototype,"fillMode",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeBarProperties.prototype,"fill",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeBarProperties.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeBarProperties.prototype,"stroke",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeBarProperties.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeBarProperties.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeBarProperties.prototype,"lineDash",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeBarProperties.prototype,"lineDashOffset",2);var LinearGaugeScaleIntervalProperties=class extends import_ag_charts_core209.BaseProperties{constructor(){super(...arguments),this.values=void 0,this.step=void 0,this.minSpacing=0,this.maxSpacing=1e3}};__decorateClass([import_ag_charts_core209.Property],LinearGaugeScaleIntervalProperties.prototype,"values",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeScaleIntervalProperties.prototype,"step",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeScaleIntervalProperties.prototype,"minSpacing",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeScaleIntervalProperties.prototype,"maxSpacing",2);var LinearGaugeScaleLabelProperties=class extends AxisLabel5{constructor(){super(...arguments),this.placement=void 0}};__decorateClass([import_ag_charts_core209.Property],LinearGaugeScaleLabelProperties.prototype,"placement",2);var LinearGaugeScaleProperties=class extends import_ag_charts_core209.BaseProperties{constructor(){super(...arguments),this.min=0,this.max=1,this.fills=new import_ag_charts_core209.PropertiesArray(import_ag_charts_community184._ModuleSupport.StopProperties),this.fillMode="continuous",this.fillOpacity=1,this.stroke="black",this.strokeWidth=0,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.defaultFill="black",this.interval=new LinearGaugeScaleIntervalProperties,this.label=new LinearGaugeScaleLabelProperties}getStyle(e,t,i,o){const{fill:r,fills:s,defaultFill:a,fillMode:n,fillOpacity:l,stroke:c,strokeWidth:h,strokeOpacity:u,lineDash:d,lineDashOffset:p}=this;return{fill:r??(e&&s.length===0?a:void 0)??createLinearGradient(s,n,t,o,i),fillOpacity:l,stroke:c,strokeWidth:h,strokeOpacity:u,lineDash:d,lineDashOffset:p}}};__decorateClass([import_ag_charts_core209.Property],LinearGaugeScaleProperties.prototype,"min",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeScaleProperties.prototype,"max",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeScaleProperties.prototype,"fills",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeScaleProperties.prototype,"fillMode",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeScaleProperties.prototype,"fill",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeScaleProperties.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeScaleProperties.prototype,"stroke",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeScaleProperties.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeScaleProperties.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeScaleProperties.prototype,"lineDash",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeScaleProperties.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeScaleProperties.prototype,"defaultFill",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeScaleProperties.prototype,"interval",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeScaleProperties.prototype,"label",2);var LinearGaugeLabelProperties=class extends AutoSizedLabel{constructor(){super(...arguments),this.placement="inside-center",this.avoidCollisions=!0}};__decorateClass([import_ag_charts_core209.Property],LinearGaugeLabelProperties.prototype,"text",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeLabelProperties.prototype,"placement",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeLabelProperties.prototype,"avoidCollisions",2);var LinearGaugeSeriesProperties=class extends SeriesProperties2{constructor(){super(...arguments),this.value=0,this.segmentation=new GaugeSegmentationProperties,this.defaultColorRange=[],this.targets=new import_ag_charts_core209.PropertiesArray(LinearGaugeTargetProperties),this.defaultTarget=new LinearGaugeTargetProperties,this.defaultScale=new LinearGaugeScaleProperties,this.direction="vertical",this.thickness=1,this.cornerRadius=0,this.cornerMode="container",this.margin=0,this.scale=new LinearGaugeScaleProperties,this.bar=new LinearGaugeBarProperties,this.label=new LinearGaugeLabelProperties,this.tooltip=makeSeriesTooltip11()}};__decorateClass([import_ag_charts_core209.Property],LinearGaugeSeriesProperties.prototype,"value",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeSeriesProperties.prototype,"segmentation",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeSeriesProperties.prototype,"defaultColorRange",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeSeriesProperties.prototype,"targets",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeSeriesProperties.prototype,"defaultTarget",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeSeriesProperties.prototype,"defaultScale",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeSeriesProperties.prototype,"direction",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeSeriesProperties.prototype,"thickness",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeSeriesProperties.prototype,"cornerRadius",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeSeriesProperties.prototype,"cornerMode",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeSeriesProperties.prototype,"margin",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeSeriesProperties.prototype,"scale",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeSeriesProperties.prototype,"bar",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeSeriesProperties.prototype,"label",2),__decorateClass([import_ag_charts_core209.Property],LinearGaugeSeriesProperties.prototype,"tooltip",2);function createLinearGradient(e,t,i,o,r){return{type:"gradient",gradient:"linear",colorSpace:"oklch",colorStops:getColorStops(e,i,o.domain,t),rotation:r?90:0,bounds:"series"}}var import_ag_charts_community185=require("ag-charts-community"),import_ag_charts_core210=require("ag-charts-core"),{BBox:BBox19}=import_ag_charts_community185._ModuleSupport;function datumRect(e){const{x0:t,y0:i,x1:o,y1:r,horizontalInset:s,verticalInset:a}=e,n=Math.min(t,o)+s,l=Math.min(i,r)+a,c=Math.max(Math.abs(o-t)-2*s,0),h=Math.max(Math.abs(r-i)-2*a,0);return{x:n,y:l,width:c,height:h}}function clipBBoxVisibility(e,t){if(t==null)return!0;const i=datumRect(e),o=1e-6,r=i.x+o,s=i.y+o,a=i.x+i.width-o,n=i.y+i.height-o,l=t.x,c=t.x+t.width,h=t.y,u=t.y+t.height;return Math.max(r,l)<=Math.min(a,c)&&Math.max(s,h)<=Math.min(n,u)}function hasClipBBox(e){const{clipX0:t,clipX1:i,clipY0:o,clipY1:r}=e;return t!=null&&i!=null||o!=null&&r!=null}function computeClipBBox(e){if(!hasClipBBox(e))return;const{x0:t,y0:i,x1:o,y1:r}=e,{x:s,y:a,width:n,height:l}=datumRect(e);let{clipX0:c,clipX1:h,clipY0:u,clipY1:d}=e;(c==null||h==null)&&(c=t,h=o),(u==null||d==null)&&(u=i,d=r);const p=Math.min(c,h),g=Math.min(u,d),y=Math.abs(h-c),x=Math.abs(d-u);return c=Math.max(s,p),u=Math.max(a,g),h=Math.min(s+n,p+y),d=Math.min(a+l,g+x),new BBox19(Math.min(c,h),Math.min(u,d),Math.abs(h-c),Math.abs(d-u))}function prepareLinearGaugeSeriesAnimationFunctions(e,t){const i=e?"initial":"update";return{node:{fromFn(r,s){const a=r.previousDatum;let{x0:n,y0:l,x1:c,y1:h,clipX0:u,clipY0:d,clipX1:p,clipY1:g}=a??s;const{horizontalInset:y,verticalInset:x}=s,f=a!=null&&hasClipBBox(a),S=hasClipBBox(s);return f&&S||(!f&&S?({x0:n,y0:l,x1:c,y1:h,clipX0:u,clipY0:d,clipX1:p,clipY1:g}=s,e&&(t?p=s.clipX0:g=s.clipY0)):f&&!S?({x0:n,y0:l,x1:c,y1:h}=s,u=void 0,d=void 0,p=void 0,g=void 0):e&&(t?c=n:h=l)),{x0:n,y0:l,x1:c,y1:h,clipX0:u,clipY0:d,clipX1:p,clipY1:g,horizontalInset:y,verticalInset:x,phase:i}},toFn(r,s){const{x0:a,y0:n,x1:l,y1:c,clipX0:h,clipY0:u,clipX1:d,clipY1:p,horizontalInset:g,verticalInset:y}=s;return{x0:a,y0:n,x1:l,y1:c,clipX0:h,clipY0:u,clipX1:d,clipY1:p,horizontalInset:g,verticalInset:y}},applyFn(r,s){r.setProperties(resetLinearGaugeSeriesResetRectFunction(r,s))}}}}function resetLinearGaugeSeriesResetRectFunction(e,t){const{x:i,y:o,width:r,height:s}=datumRect(t),a=computeClipBBox(t),n=clipBBoxVisibility(t,a);return{x:i,y:o,width:r,height:s,clipBBox:a,visible:n}}var horizontalTextAligns={Before:"right",Center:"center",After:"left"},verticalTextBaselines={Before:"top",Center:"middle",After:"bottom"},horizontalAlignFactors={Before:-1,Center:-.5,After:0},verticalAlignFactors2={Before:0,Center:-.5,After:-1};function formatLinearGaugeLabels(e,t,i,o,r,s){const{seriesRect:a,gaugeRect:n,barRect:l}=r,{padding:c,horizontal:h}=o;i.each((u,d)=>{const p=getLabelText(e.id,t,d,s?.label);let g,y;d.placement==="outside-start"?h?(g=n.x,y=a.height):(g=a.width,y=a.height-(n.y+n.height)):d.placement==="outside-end"?h?(g=a.width-(n.x+n.width),y=a.height):(g=a.width,y=n.y):d.avoidCollisions&&(g=n.width,y=n.height);let x;if(p==null)return;if(g!=null&&y!=null){const L=()=>({width:g,height:y,meta:null});x=formatSingleLabel((0,import_ag_charts_core210.toPlainText)(p),d,{padding:c},L)?.[0]}else{const L=(0,import_ag_charts_core210.cachedTextMeasurer)(d),{width:E,height:V}=(0,import_ag_charts_core210.isArray)(p)?(0,import_ag_charts_core210.measureTextSegments)(p,d):L.measureLines((0,import_ag_charts_core210.toTextString)(p));x={text:p,fontSize:d.fontSize,lineHeight:d.lineHeight??L.lineHeight(),width:E,height:V}}if(x==null){u.visible=!1;return}const f=h?n.x:n.y+n.height,S=h?n.x+n.width:n.y,m=h?l.x:l.y+l.height,v=h?l.x+l.width:l.y,b=d.spacing*(h?1:-1);let D,k,A,M;switch(d.placement){case"outside-start":D=-1/0,k=1/0,A=f-b,M="Before";break;case"outside-end":D=-1/0,k=1/0,A=S+b,M="After";break;case"inside-start":D=f,k=v,A=f+b,M="After";break;case"inside-end":D=v,k=S,A=S-b,M="Before";break;case"inside-center":D=f,k=S,A=(f+S)/2,M="Center";break;case"bar-inside":D=m,k=v,A=(m+v)/2,M="Center";break;case"bar-inside-end":D=m,k=v,A=v-b,M="Before";break;case"bar-outside-end":D=v,k=S,A=v+b,M="After";break;case"bar-end":D=-1/0,k=1/0,A=v,M="Center";break}const I=h?A:n.x+n.width/2,_=h?n.y+n.height/2:A;let P,O;h?(P=I+horizontalAlignFactors[M]*x.width,O=P+x.width):(P=_+verticalAlignFactors2[M]*x.height,O=P+x.height);const C=Math.min(P,O)>=Math.min(D,k)&&Math.max(P,O)<=Math.max(D,k);if(d.avoidCollisions&&!C){u.visible=!1;return}u.visible=!0,u.text=x.text,u.fontSize=x.fontSize,u.lineHeight=x.lineHeight,u.textAlign=h?horizontalTextAligns[M]:"center",u.textBaseline=h?"middle":verticalTextBaselines[M],u.x=I,u.y=_})}var{fromToMotion:fromToMotion2,resetMotion:resetMotion3,SeriesNodePickMode:SeriesNodePickMode8,createDatumId:createDatumId10,BBox:BBox20,Group:Group12,PointerEvents:PointerEvents5,Selection:Selection7,Rect:Rect8,Text:Text3,TransformableText:TransformableText2,Marker:Marker3,LinearScale:LinearScale4,generateTicks:generateTicks2,NiceMode}=import_ag_charts_community186._ModuleSupport,horizontalTargetPlacementRotation={before:180,middle:0,after:0},verticalTargetPlacementRotation={before:90,middle:0,after:-90},LinearGaugeSeries=class extends import_ag_charts_community186._ModuleSupport.Series{constructor(e){super({moduleCtx:e,pickModes:[SeriesNodePickMode8.EXACT_SHAPE_MATCH,SeriesNodePickMode8.NEAREST_NODE]}),this.properties=new LinearGaugeSeriesProperties,this.seriesRect=BBox20.NaN,this.gaugeRect=BBox20.NaN,this.scale=new LinearScale4,this.originX=0,this.originY=0,this.scaleGroup=this.contentGroup.appendChild(new Group12({name:"scaleGroup"})),this.itemGroup=this.contentGroup.appendChild(new Group12({name:"itemGroup"})),this.itemTargetGroup=this.contentGroup.appendChild(new Group12({name:"itemTargetGroup"})),this.itemTargetLabelGroup=this.contentGroup.appendChild(new Group12({name:"itemTargetLabelGroup"})),this.itemLabelGroup=this.contentGroup.appendChild(new Group12({name:"itemLabelGroup"})),this.highlightTargetGroup=this.highlightGroup.appendChild(new Group12({name:"itemTargetLabelGroup"})),this.tickGroup=this.contentGroup.appendChild(new Group12({name:"tickGroup"})),this.scaleSelection=Selection7.select(this.scaleGroup,()=>this.nodeFactory()),this.datumSelection=Selection7.select(this.itemGroup,()=>this.nodeFactory()),this.targetSelection=Selection7.select(this.itemTargetGroup,()=>this.markerFactory()),this.targetLabelSelection=Selection7.select(this.itemTargetLabelGroup,Text3),this.labelSelection=Selection7.select(this.itemLabelGroup,Text3),this.highlightTargetSelection=Selection7.select(this.highlightTargetGroup,()=>this.markerFactory()),this.tickSelection=Selection7.select(this.tickGroup,TransformableText2),this.datumUnion=new DatumUnion,this.animationState=new import_ag_charts_core211.StateMachine("empty",{empty:{update:{target:"ready",action:()=>this.animateEmptyUpdateReady()},reset:"empty",skip:"ready"},ready:{updateData:"waiting",clear:"clearing",resize:()=>this.animateReadyResize(),reset:"empty",skip:"ready"},waiting:{update:{target:"ready",action:()=>this.animateWaitingUpdateReady()},reset:"empty",skip:"ready"},clearing:{update:{target:"empty"},reset:"empty",skip:"ready"}}),this.scaleGroup.pointerEvents=PointerEvents5.None,this.tickGroup.pointerEvents=PointerEvents5.None}get range(){return this.horizontal?[0,this.gaugeRect.width]:[0,this.gaugeRect.height]}get horizontal(){return this.properties.direction==="horizontal"}get hasData(){return!0}nodeFactory(){const e=new Rect8;return e.crisp=!0,e}markerFactory(){return new Marker3}processData(){this.nodeDataRefresh=!0,this.animationState.transition("updateData")}formatLabel(e){return formatLabel(e,this.properties.scale)}getShapeFillBBox(){const{properties:e,originX:t,originY:i,horizontal:o,scale:r}=this,{thickness:s}=e,a=(0,import_ag_charts_core211.findRangeExtent)(r.range),n=new BBox20(t,i,o?a:s,o?s:a);return{axis:n,series:n}}getTargets(){const{properties:e}=this,t=e.defaultTarget;return Array.from(e.targets).map(i=>{const{text:o=t.text,value:r=t.value??0,shape:s=t.shape??"triangle",rotation:a=t.rotation??0,placement:n=t.placement??"middle",spacing:l=t.spacing??0,size:c=t.size??0}=i,{enabled:h=t.label.enabled,color:u=t.label.color??"black",fontStyle:d=t.label.fontStyle??"normal",fontWeight:p=t.label.fontWeight??"normal",fontSize:g=t.label.fontSize,fontFamily:y=t.label.fontFamily,spacing:x=t.label.spacing??0}=i.label;return{text:o,value:r,shape:s,placement:n,spacing:l,size:c,rotation:a,label:{enabled:h,color:u,fontStyle:d,fontWeight:p,fontSize:g,fontFamily:y,spacing:x},style:i.getStyle(t)}})}getTargetPoint(e){const{properties:t,originX:i,originY:o,horizontal:r,scale:s,gaugeRect:a}=this,{thickness:n}=t,{value:l,placement:c,spacing:h,size:u}=e,d=s.convert(l);let p;switch(c){case"before":p=-(h+u/2);break;case"after":p=n+h+u/2;break;default:p=n/2;break}return{x:i+a.x+(r?d:p),y:o+a.y+(r?p:d)}}getTargetLabel(e){const{size:t,placement:i,label:o}=e,{spacing:r,color:s,fontStyle:a,fontWeight:n,fontSize:l,fontFamily:c}=o,h=void 0,u=t/2+r;let d,p,g=0,y=0;return this.horizontal?(d="center",i==="after"?(p="top",y=u):(p="bottom",y=-u)):(p="middle",i==="before"?(d="right",g=-u):(d="left",g=u)),{offsetX:g,offsetY:y,fill:s,textAlign:d,textBaseline:p,fontStyle:a,fontWeight:n,fontSize:l,fontFamily:c,lineHeight:h}}labelDatum(e,t){const{placement:i,avoidCollisions:o,spacing:r,text:s,color:a,fontSize:n,minimumFontSize:l,fontStyle:c,fontWeight:h,fontFamily:u,lineHeight:d,wrapping:p,overflowStrategy:g,formatter:y=x=>this.formatLabel(x.value)}=e;return{placement:i,avoidCollisions:o,spacing:r,text:s,value:t,fill:a,fontSize:n,minimumFontSize:l,fontStyle:c,fontWeight:h,fontFamily:u,lineHeight:d,wrapping:p,overflowStrategy:g,formatter:y}}verticalLabelInset(){const{label:e}=this.properties,t=(0,import_ag_charts_core211.cachedTextMeasurer)(e),i=e.text?.split(`
`),o=(e.lineHeight??t.lineHeight())*(i?.length??1);return e.spacing+o}horizontalLabelInset(){const{scale:e,properties:t}=this,{scale:i,label:o}=t,r=o.text?.split(`
`),s=(0,import_ag_charts_core211.cachedTextMeasurer)(o),a=i.interval.values??e.ticks({nice:[!1,!1],interval:i.interval.step,minTickCount:0,maxTickCount:6,tickCount:5})?.ticks??[],l=(r??a?.map(c=>getLabelText(this.id,this.ctx,this.labelDatum(o,c))??"")).reduce((c,h)=>{const{width:u}=(0,import_ag_charts_core211.isArray)(h)?(0,import_ag_charts_core211.measureTextSegments)(h,o):s.measureLines((0,import_ag_charts_core211.toTextString)(h));return Math.max(c,u)},0);return o.spacing+l}tickFormatter(e,t){const{format:i,formatter:o}=this.properties.scale.label;let r;return i!=null&&(r=(0,import_ag_charts_core211.tickFormat)(t,typeof i=="string"?i:void 0)),(s,a)=>{let n;return o&&(n??(n=formatWithContext(this.ctx,o,{value:s,index:a,domain:e,boundSeries:void 0}))),n??(n=r?.(s)),n??this.formatLabel(s)}}createNodeData(){const{id:e,properties:t,horizontal:i,scale:o,seriesRect:r}=this,{value:s,segmentation:a,thickness:n,cornerRadius:l,cornerMode:c,bar:h,scale:u,label:d,defaultColorRange:p,defaultScale:g}=t;o.domain=[u.min,u.max],o.range=i?[0,r.width]:[r.height,0];let y,x;i?(x=1,y=Math.PI/-2):u.label.placement==="before"?(x=1,y=0):(x=-1,y=0);let f,S,m,v;i?(f=0,S=r.width,m=(r.height-n)/2,v=m+n,d.placement==="outside-start"?f+=this.horizontalLabelInset():d.placement==="outside-end"&&(S-=this.horizontalLabelInset())):(f=(r.width-n)/2,S=f+n,v=0,m=r.height,d.placement==="outside-start"?m-=this.verticalLabelInset():d.placement==="outside-end"&&(v+=this.verticalLabelInset())),this.gaugeRect=new BBox20(Math.min(f,S),Math.min(m,v),Math.abs(S-f),Math.abs(v-m));const b=0,D=0;o.domain=[u.min,u.max],o.range=i?[f,S]:[m,v];const k=(0,import_ag_charts_core211.mergeDefaults)({parallel:i},u.label,g.label),{tickData:{ticks:A}}=generateTicks2({scale:o,label:k,interval:u.interval,tickFormatter:($,j)=>this.tickFormatter($,j),domain:o.domain,range:this.range,reverse:!1,primaryTickCount:void 0,defaultTickMinSpacing:0,visibleRange:[0,1],niceMode:[NiceMode.Off,NiceMode.Off],labelOffset:0,axisRotation:y,sideFlag:x}),M=!1,I=this.getTargets(),_=[],P=[],O=[],C=[],[L,E]=o.range,V=Math.abs(E-L),w=i?o.convert(s):S,T=i?v:o.convert(s),z=a.enabled?a.spacing/2:0,B=i?z:0,F=i?0:z,R=Math.min(h.thickness??Math.round(h.thicknessRatio*n),n),H=-(n-R)/2,W=i?0:H,K=i?H:0,G=c==="item",U=Math.ceil(V);let X=a.enabled?a.interval.getSegments(o,U):void 0;const J=h.getStyle(p,i,o),oe=u.getStyle(h.enabled,p,i,o);if(X==null&&G){const $=Math.min(...o.domain),j=Math.max(...o.domain),te={value:s,segmentStart:$,segmentEnd:j};if(h.enabled){const Y=Math.min(l,R/2,V/2)*(M?-1:1),se=i?Y:0,ae=i?0:Y;_.push({series:this,itemId:"value",datum:te,datumIndex:{type:0},type:0,x0:b+f-se-W,y0:D+m-ae-K,x1:b+w+se+W,y1:D+T+ae+K,clipX0:void 0,clipY0:void 0,clipX1:void 0,clipY1:void 0,topLeftCornerRadius:l,topRightCornerRadius:l,bottomRightCornerRadius:l,bottomLeftCornerRadius:l,horizontalInset:B,verticalInset:F,style:J})}const Z=Math.min(l,n/2,V/2)*(M?-1:1),Q=i?Z:0,q=i?0:Z;C.push({series:this,itemId:"scale",datum:te,datumIndex:{type:0},type:0,x0:b+f-Q,y0:D+m-q,x1:b+S+Q,y1:D+v+q,clipX0:void 0,clipY0:void 0,clipX1:void 0,clipY1:void 0,topLeftCornerRadius:l,topRightCornerRadius:l,bottomRightCornerRadius:l,bottomLeftCornerRadius:l,horizontalInset:B,verticalInset:F,style:oe})}else{X??(X=o.domain);const $=b+f-W,j=D+m-K,te=b+w+W,re=D+T+K;for(let Z=0;Z<X.length-1;Z+=1){const Q=X[Z+0],q=X[Z+1],ee={value:s,segmentStart:Q,segmentEnd:q},Y=Z===0,se=Z===X.length-2,ae=o.convert(Q),ue=o.convert(q),de=G||Y?l:0,ce=G||se?l:0,he=i?de:ce,me=ce,be=i?ce:de,ve=de;h.enabled&&_.push({series:this,itemId:`value-${Z}`,datum:ee,datumIndex:{type:0},type:0,x0:b+(i?ae:f),y0:D+(i?m:ae),x1:b+(i?ue:S),y1:D+(i?v:ue),clipX0:$,clipY0:j,clipX1:te,clipY1:re,topLeftCornerRadius:he,topRightCornerRadius:me,bottomRightCornerRadius:be,bottomLeftCornerRadius:ve,horizontalInset:B,verticalInset:F,style:J}),C.push({series:this,itemId:`scale-${Z}`,datum:ee,datumIndex:{type:0},type:0,x0:b+(i?ae:f),y0:D+(i?m:ae),x1:b+(i?ue:S),y1:D+(i?v:ue),clipX0:void 0,clipY0:void 0,clipX1:void 0,clipY1:void 0,topLeftCornerRadius:he,topRightCornerRadius:me,bottomRightCornerRadius:be,bottomLeftCornerRadius:ve,horizontalInset:B,verticalInset:F,style:oe})}}for(const $ of[C,_])for(const j of $){const te=j.clipX0??j.x0,re=j.clipX1??j.x1,Z=j.clipY0??j.y0,Q=j.clipY1??j.y1;j.midPoint={x:(te+re)/2,y:(Z+Q)/2}}d.enabled&&O.push(this.labelDatum(d,s));const le=i?horizontalTargetPlacementRotation:verticalTargetPlacementRotation;for(let $=0;$<I.length;$+=1){const j=I[$],{value:te,text:re,shape:Z,size:Q,style:q}=j,ee=this.getTargetPoint(j),Y=(0,import_ag_charts_core211.toRadians)(j.rotation+le[j.placement]);P.push({series:this,itemId:`target-${$}`,midPoint:ee,datum:{value:te},datumIndex:{type:1,index:$},type:1,value:te,text:re,x:ee.x,y:ee.y,shape:Z,size:Q,rotation:Y,label:this.getTargetLabel(j),style:q})}return{itemId:e,nodeData:_,tickData:A,targetData:P,labelData:O,scaleData:C}}findNodeDatum(e){return findGaugeNodeDatum(this,e)}updateSelections(e){(this.nodeDataRefresh||e)&&(this.contextNodeData=this.createNodeData(),this.nodeDataRefresh=!1)}highlightDatum(e){if(e?.series===this&&e.type===1)return e}update({seriesRect:e}){const{datumSelection:t,labelSelection:i,targetSelection:o,targetLabelSelection:r,scaleSelection:s,highlightTargetSelection:a,tickSelection:n}=this;this.seriesRect=e??BBox20.NaN;const l=this.checkResize(e);this.updateSelections(l),this.contentGroup.visible=this.visible,this.contentGroup.opacity=this.getOpacity();const c=this.contextNodeData?.nodeData??[],h=this.contextNodeData?.labelData??[],u=this.contextNodeData?.targetData??[],d=this.contextNodeData?.scaleData??[],p=this.contextNodeData?.tickData??[],g=this.highlightDatum(this.ctx.highlightManager.getActiveHighlight());this.scaleSelection=this.updateScaleSelection({scaleData:d,scaleSelection:s}),this.updateScaleNodes({scaleSelection:s}),this.targetSelection=this.updateTargetSelection({targetData:u,targetSelection:o}),this.updateTargetNodes({targetSelection:o,isHighlight:!1}),this.targetLabelSelection=this.updateTargetLabelSelection({targetData:u,targetLabelSelection:r}),this.updateTargetLabelNodes({targetLabelSelection:r}),this.datumSelection=this.updateDatumSelection({nodeData:c,datumSelection:t}),this.updateDatumNodes({datumSelection:t}),this.labelSelection=this.updateLabelSelection({labelData:h,labelSelection:i}),this.updateLabelNodes({labelSelection:i}),this.highlightTargetSelection=this.updateTargetSelection({targetData:g==null?[]:[g],targetSelection:a}),this.updateTargetNodes({targetSelection:a,isHighlight:!0}),this.tickSelection=this.updateTickSelection({tickData:p,tickSelection:n}),this.updateTickNodes({tickSelection:n}),l&&this.animationState.transition("resize"),this.animationState.transition("update")}updateDatumSelection(e){return e.datumSelection.update(e.nodeData,void 0,t=>createDatumId10(e.nodeData.length,t.itemId))}updateDatumNodes(e){const{datumSelection:t}=e,{ctx:i}=this,o=i.animationManager.isSkipped(),r=this.getShapeFillBBox();t.each((a,n)=>{const{topLeftCornerRadius:l,topRightCornerRadius:c,bottomRightCornerRadius:h,bottomLeftCornerRadius:u}=n;a.setStyleProperties(n.style,r),a.topLeftCornerRadius=l,a.topRightCornerRadius=c,a.bottomRightCornerRadius=h,a.bottomLeftCornerRadius=u,a.pointerEvents=this.properties.bar.enabled?import_ag_charts_community186._ModuleSupport.PointerEvents.All:import_ag_charts_community186._ModuleSupport.PointerEvents.None,(o||a.previousDatum==null)&&a.setProperties(resetLinearGaugeSeriesResetRectFunction(a,n))});const{horizontal:s}=this;this.datumUnion.update(t,this.itemGroup,import_ag_charts_community186._ModuleSupport.Rect,(a,n,l)=>{const c=Math.min(n.x,l.x),h=Math.max(n.x+n.width,l.x+l.width),u=Math.min(n.y,l.y),d=Math.max(n.y+n.height,l.y+l.height),p=h-c,g=d-u;a.pointerEvents=import_ag_charts_community186._ModuleSupport.PointerEvents.None,a.x=c,a.y=u,a.width=p,a.height=g,a.topLeftCornerRadius=s?n.topLeftCornerRadius:l.topLeftCornerRadius,a.topRightCornerRadius=l.topRightCornerRadius,a.bottomRightCornerRadius=s?l.bottomRightCornerRadius:n.bottomRightCornerRadius,a.bottomLeftCornerRadius=n.bottomLeftCornerRadius;const y=n.clipBBox,x=l.clipBBox??y;y&&x?a.clipBBox=BBox20.merge([y,x]).intersection(s?new BBox20(c,-1/0,p,1/0):new BBox20(-1/0,u,1/0,g)):a.clipBBox=void 0})}updateScaleSelection(e){return e.scaleSelection.update(e.scaleData,void 0,t=>createDatumId10(e.scaleData.length,t.itemId))}updateScaleNodes(e){const{scaleSelection:t}=e,i=this.getShapeFillBBox();t.each((o,r)=>{const{topLeftCornerRadius:s,topRightCornerRadius:a,bottomRightCornerRadius:n,bottomLeftCornerRadius:l}=r;o.setStyleProperties(r.style,i),o.setProperties(resetLinearGaugeSeriesResetRectFunction(o,r)),o.topLeftCornerRadius=s,o.topRightCornerRadius=a,o.bottomRightCornerRadius=n,o.bottomLeftCornerRadius=l,o.setProperties(resetLinearGaugeSeriesResetRectFunction(o,r))})}updateTargetSelection(e){return e.targetSelection.update(e.targetData,void 0,t=>t.itemId)}updateTargetNodes(e){const{targetSelection:t,isHighlight:i}=e;t.each((o,r)=>{const{x:s,y:a,shape:n,size:l,rotation:c}=r,h=this.getTargetStyle(i,r);o.setStyleProperties(h),o.size=l,o.shape=n==="line"?lineMarker:n,o.translationX=s,o.translationY=a,o.rotation=c})}getTargetStyle(e,{datumIndex:t,style:i}){const o=this.getHighlightStyle(e,t);return(0,import_ag_charts_core211.mergeDefaults)(o,{...i,opacity:1})}updateTargetLabelSelection(e){return e.targetLabelSelection.update(e.targetData)}updateTargetLabelNodes(e){const{targetLabelSelection:t}=e;t.each((i,o)=>{const{x:r,y:s,text:a}=o,{offsetX:n,offsetY:l,fill:c,fontStyle:h,fontWeight:u,fontSize:d,fontFamily:p,textAlign:g,textBaseline:y}=o.label;i.visible=!0,i.x=r+n,i.y=s+l,i.text=a,i.fill=c,i.fontStyle=h,i.fontWeight=u,i.fontSize=d,i.fontFamily=p,i.textAlign=g,i.textBaseline=y})}updateTickSelection(e){return e.tickSelection.update(e.tickData,void 0,t=>t.tickId)}updateTickNodes(e){const{gaugeRect:t,properties:i}=this,o=i.defaultScale,{enabled:r,color:s,fontFamily:a=o.label.fontFamily,fontSize:n=o.label.fontSize,fontStyle:l,fontWeight:c=o.label.fontWeight,spacing:h}=i.scale.label;let{placement:u}=i.scale.label;const d=(0,import_ag_charts_core211.toRadians)(i.scale.label.rotation??0);let p,g,y,x;this.horizontal?(u??(u="after"),p="center",g=u==="before"?"bottom":"top",x=this.originY+t.y+(u==="before"?-h:t.height+h)):(u??(u="before"),p=u==="before"?"end":"start",g="middle",y=this.originX+t.x+(u==="before"?-h:t.width+h)),e.tickSelection.each((f,S)=>{if(!r){f.visible=!1;return}const m=y??S.translation,v=x??S.translation;f.visible=!0,f.text=S.tickLabel,f.fill=s,f.fontFamily=a,f.fontSize=n,f.fontStyle=l,f.fontWeight=c,f.textBaseline=g,f.textAlign=p,f.x=m,f.y=v,f.rotationCenterX=m,f.rotationCenterY=v,f.rotation=d})}updateLabelSelection(e){return e.labelSelection.update(e.labelData,void 0,t=>"primary")}updateLabelNodes(e){const{labelSelection:t}=e,i=this.ctx.animationManager.isSkipped();t.each((o,r)=>{o.fill=r.fill,o.fontStyle=r.fontStyle,o.fontWeight=r.fontWeight,o.fontFamily=r.fontFamily}),(i||this.labelsHaveExplicitText())&&this.formatLabelText()}labelsHaveExplicitText(){for(const{datum:e}of this.labelSelection)if(e.text==null)return!1;return!0}formatLabelText(e){const{labelSelection:t,horizontal:i,scale:o,seriesRect:r,gaugeRect:s}=this,{x:a,y:n,width:l,height:c}=s,h=e?.label??this.properties.value;let u;if(i){const g=o.convert(h);u=new BBox20(a,n,g-a,c)}else{const g=o.convert(h);u=new BBox20(a,g,l,c-g)}const d={seriesRect:r,gaugeRect:s,barRect:u},{margin:p}=this.properties;formatLinearGaugeLabels(this,this.ctx,t,{padding:p,horizontal:i},d,e)}resetAllAnimation(){this.ctx.animationManager.stopByAnimationGroupId(this.id),resetMotion3([this.datumSelection],resetLinearGaugeSeriesResetRectFunction),this.formatLabelText()}resetAnimation(e){e==="initial"?this.animationState.transition("reset"):e==="ready"&&this.animationState.transition("skip")}animateLabelText(e={}){const{animationManager:t}=this.ctx;let i=0,o=0;if(this.labelSelection.each((r,s)=>{r.opacity=1,i=r.previousDatum?.value??e.from??s.value,o=s.value}),!this.labelsHaveExplicitText())if(i===o)this.formatLabelText({label:o});else{const r=`${this.id}_labels`;t.animate({id:r,groupId:"label",from:{label:i},to:{label:o},phase:e.phase??"update",ease:import_ag_charts_core211.easeOut,onUpdate:s=>this.formatLabelText(s),onStop:()=>this.formatLabelText({label:o})})}}animateEmptyUpdateReady(){const{animationManager:e}=this.ctx,{node:t}=prepareLinearGaugeSeriesAnimationFunctions(!0,this.horizontal);fromToMotion2(this.id,"node",e,[this.datumSelection],t,(i,o)=>o.itemId),fromToMotion2(this.id,"label",e,[this.labelSelection],fadeInFns,()=>"primary"),this.animateLabelText({from:0,phase:"initial"})}animateWaitingUpdateReady(){const{animationManager:e}=this.ctx,{node:t}=prepareLinearGaugeSeriesAnimationFunctions(!1,this.horizontal);fromToMotion2(this.id,"node",e,[this.datumSelection],t,(i,o)=>o.itemId),this.animateLabelText()}animateReadyResize(){this.resetAllAnimation()}getSeriesDomain(){return{domain:[0,1]}}dataCount(){return Number.NaN}getSeriesRange(){return[Number.NaN,Number.NaN]}getLegendData(){return[]}getTooltipContent(e){const{id:t,properties:i}=this,{tooltip:o}=i;if(e==null)return;let r,s,a;if(e.type===0?(r=i.value,s=i.label.text,a=this.ctx.localeManager.t("ariaLabelGaugeValue")):({value:r,text:s}=i.targets[e.index],a=this.ctx.localeManager.t("ariaLabelGaugeTarget")),r!=null)return this.formatTooltipWithContext(o,{data:[{label:s,fallbackLabel:a,value:this.formatLabel(r)}]},{seriesId:t,title:void 0,datum:void 0,value:r})}pickNodeClosestDatum(e){return pickGaugeNearestDatum(this,e)}pickFocus(e){return pickGaugeFocus(this,e)}getCaptionText(){return this.formatLabel(this.properties.value)}getCategoryValue(e){}datumIndexForCategoryValue(e){}hasItemStylers(){return this.properties.label.itemStyler!=null}};LinearGaugeSeries.className="LinearGaugeSeries",LinearGaugeSeries.type="linear-gauge";var themeTemplate2={minWidth:200,minHeight:200,tooltip:{enabled:!1},series:{thickness:50,defaultColorRange:{$if:[{$eq:[{$palette:"type"},"inbuilt"]},{$interpolate:[{$palette:"secondDivergingColors"},5]},import_ag_charts_core212.SAFE_RANGE2_OPERATION]},scale:{defaultFill:{$path:["/1",{$palette:"fill"},{$palette:"hierarchyColors"}]},stroke:{$path:["/2",import_ag_charts_core212.SAFE_STROKE_FILL_OPERATION,{$palette:"hierarchyColors"}]},strokeWidth:{$isUserOption:["./stroke",2,0]},label:{spacing:11}},bar:{strokeWidth:{$isUserOption:["./stroke",2,0]}},segmentation:{enabled:!1,interval:{},spacing:1},defaultTarget:{fill:{$ref:"foregroundColor"},stroke:{$ref:"foregroundColor"},size:10,shape:"triangle",placement:"after",spacing:5,label:{enabled:!0,fontWeight:{$ref:"fontWeight"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},color:{$ref:"textColor"},spacing:5}},defaultScale:{label:{fontWeight:{$ref:"fontWeight"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},color:{$ref:"textColor"}}},label:{...import_ag_charts_core212.LABEL_BOXING_DEFAULTS,enabled:!1,placement:"inside-start",fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},fontSize:{$rem:2},minimumFontSize:import_ag_charts_core212.FONT_SIZE.SMALL,spacing:18,color:{$ref:"chartBackgroundColor"}},margin:4,tooltip:{range:{$path:["/tooltip/range",10]}}}},LinearGaugeModule={type:"series",name:"linear-gauge",chartType:"standalone",enterprise:!0,dependencies:[GaugePresetModule],version:import_ag_charts_community187.VERSION,options:import_ag_charts_core212.linearGaugeSeriesOptionsDef,themeTemplate:themeTemplate2,create:e=>new LinearGaugeSeries(e)},import_ag_charts_community196=require("ag-charts-community"),import_ag_charts_core220=require("ag-charts-core"),import_ag_charts_community189=require("ag-charts-community"),import_ag_charts_community188=require("ag-charts-community"),import_ag_charts_core213=require("ag-charts-core"),{Chart:Chart2,MercatorScale}=import_ag_charts_community188._ModuleSupport;function isTopologySeries(e){return e.type==="map-shape"||e.type==="map-line"||e.type==="map-marker"||e.type==="map-shape-background"||e.type==="map-line-background"}var TopologyChart=class extends Chart2{constructor(e,t){super(e,t),this.xAxis={id:(0,import_ag_charts_core213.createId)(import_ag_charts_community188._ModuleSupport.Axis),direction:import_ag_charts_core213.ChartAxisDirection.X},this.yAxis={id:(0,import_ag_charts_core213.createId)(import_ag_charts_community188._ModuleSupport.Axis),direction:import_ag_charts_core213.ChartAxisDirection.Y},this.ctx.zoomManager.setAxes([this.xAxis,this.yAxis])}getChartType(){return"topology"}updateData(){super.updateData();const e=this.getOptions();this.topology!==e.topology&&(this.topology=e.topology);const{topology:t}=this;for(const i of this.series)isTopologySeries(i)&&i.setChartTopology(t)}performLayout(e){const{seriesRoot:t,annotationRoot:i}=this,o=e.layoutBox.clone().shrink(this.seriesArea.getPadding());this.seriesRect=o,this.animationRect=o;const r=this.series,s=r.reduce((l,c)=>{if(!c.visible)return l;const h=c.topologyBounds;return h==null?l:l==null?h:l.merge(h)},void 0);let a;if(s!=null){const{lon0:l,lat0:c,lon1:h,lat1:u}=s,d=[[l,c],[h,u]],p=MercatorScale.bounds(d),{width:g,height:y}=o,x=Math.min(g/p.width,y/p.height),f=p.width*x,S=p.height*x,m=(g-f)/2,v=(y-S)/2,b=m,D=v,k=m+f,A=v+S,M=this.ctx.zoomManager.getAxisZoom(this.xAxis.id),I=this.ctx.zoomManager.getAxisZoom(this.yAxis.id),_=(k-b)/(M.max-M.min),P=b-_*M.min,O=(A-D)/(1-I.min-(1-I.max)),C=D-O*(1-I.max);a=new MercatorScale(d,[[P,C],[P+_,C+O]])}for(const l of r)l.scale=a;const n=this.series.some(l=>l.visible);t.visible=n;for(const l of[t,i])l.translationX=Math.floor(o.x),l.translationY=Math.floor(o.y),l.setClipRect(o.clone());this.ctx.layoutManager.emitLayoutComplete(e,{series:{visible:n,rect:o,paddedRect:e.layoutBox}})}};TopologyChart.className="TopologyChart",TopologyChart.type="topology",__decorateClass([import_ag_charts_core213.Property],TopologyChart.prototype,"topology",2);var{topologyChartOptionsDefs}=import_ag_charts_community189._ModuleSupport,TopologyChartModule={type:"chart",name:"topology",enterprise:!0,version:import_ag_charts_community189.VERSION,options:topologyChartOptionsDefs,create(e,t){return new TopologyChart(e,t)}},import_ag_charts_core214=require("ag-charts-core"),MAP_THEME_DEFAULTS={zoom:{axes:"xy",anchorPointX:"pointer",anchorPointY:"pointer",buttons:{anchorPointX:"middle",anchorPointY:"middle"}},legend:{enabled:!1}};function applyMapPalette(e){const t=(0,import_ag_charts_core214.deepClone)(e);return(0,import_ag_charts_core214.jsonWalk)(t,i=>{typeof i=="object"&&"$palette"in i&&(i.$mapPalette=i.$palette,delete i.$palette)}),t}var import_ag_charts_community194=require("ag-charts-community"),import_ag_charts_core218=require("ag-charts-core"),import_ag_charts_community190=require("ag-charts-community"),import_ag_charts_core215=require("ag-charts-core"),delta2=1e-9;function lineSegmentDistanceToPointSquared(e,t,i,o){const[r,s]=e,[a,n]=t,l=a-r,c=n-s,h=l*l+c*c;let u,d;if(Math.abs(h)<delta2)u=r,d=s;else{let y=((i-r)*l+(o-s)*c)/h;y=Math.max(0,Math.min(1,y)),u=r+y*(a-r),d=s+y*(n-s)}const p=i-u,g=o-d;return p*p+g*g}function lineStringDistance(e,t,i){let o=1/0,r=e.at(-1);for(const s of e)o=Math.min(o,lineSegmentDistanceToPointSquared(r,s,t,i)),r=s;return Math.sqrt(o)}function lineStringLength(e){let[t,i]=e[0],o=0;for(let r=1;r<e.length;r+=1){const[s,a]=e[r],n=Math.hypot(s-t,a-i);o+=n,t=s,i=a}return o}function lineStringCenter(e){if(e.length===0)return;const t=lineStringLength(e)/2;let[i,o]=e[0],r=0;for(let s=1;s<e.length;s+=1){const[a,n]=e[s],l=Math.hypot(a-i,n-o),c=r+l;if(c>t){const h=(t-r)/l,u=[i+(a-i)*h,o+(n-o)*h],d=Math.atan2(n-o,a-i);return{point:u,angle:d}}r=c,i=a,o=n}}var LonLatBBox=class Ie{constructor(t,i,o,r){this.lon0=t,this.lat0=i,this.lon1=o,this.lat1=r}extend(t,i,o,r){return this.lon0=Math.min(this.lon0,t),this.lat0=Math.min(this.lat0,i),this.lon1=Math.max(this.lon1,o),this.lat1=Math.max(this.lat1,r),this}merge(t){return this.extend(t.lon0,t.lat0,t.lon1,t.lat1)}static extend(t,i,o,r,s){return t?t.extend(i,o,r,s):new Ie(i,o,r,s)}};function polygonBbox(e,t){for(const i of e){const[o,r]=i;t=LonLatBBox.extend(t,o,r,o,r)}return t}function polygonCentroid(e){if(e.length===0)return;let t=0,i=0,o=0,[r,s]=e.at(-1);for(const[a,n]of e){const l=r*n-a*s;o+=l,t+=(r+a)*l,i+=(s+n)*l,r=a,s=n}return o*=3,[t/o,i/o]}function polygonDistance(e,t,i){let o=!1,r=1/0;for(const s of e){let a=s.at(-1),[n,l]=a;for(const c of s){const[h,u]=c;u>i!=l>i&&t<(n-h)*(i-u)/(l-u)+h&&(o=!o),r=Math.min(r,lineSegmentDistanceToPointSquared(a,c,t,i)),a=c,n=h,l=u}}return(o?-1:1)*Math.sqrt(r)}var{Path:Path11,ExtendedPath2D:ExtendedPath2D5,BBox:BBox21}=import_ag_charts_community190._ModuleSupport,GeoGeometry=class extends Path11{constructor(){super(...arguments),this.projectedGeometry=void 0,this.renderMode=3,this.strokePath=new ExtendedPath2D5}computeBBox(){return(this.dirtyPath||this.isDirtyPath())&&(this.updatePath(),this.dirtyPath=!1),this.bbox?.clone()}updatePath(){const{projectedGeometry:e}=this;this.strokePath.clear(),this.path.clear(),this.bbox=e==null?void 0:this.drawGeometry(e,void 0)}drawPath(e){super.drawPath(e),this.renderStroke(e,this.strokePath.getPath2D())}containsPoint(e,t){const{projectedGeometry:i}=this;return i==null||!this.getBBox().containsPoint(e,t)?!1:this.geometryDistance(i,e,t)<=0}distanceSquared(e,t){const{projectedGeometry:i}=this;if(i==null)return 1/0;const o=this.geometryDistance(i,e,t);return o>0?o*o:0}geometryDistance(e,t,i){const{renderMode:o,strokeWidth:r}=this,s=(o&1)!==0,a=(o&2)!==0,n=Math.max(r/2,1)+1;switch(e.type){case"GeometryCollection":return e.geometries.reduce((l,c)=>Math.min(l,this.geometryDistance(c,t,i)),1/0);case"MultiPolygon":return s?e.coordinates.reduce((l,c)=>Math.min(l,Math.max(polygonDistance(c,t,i),0)),1/0):1/0;case"Polygon":return s?Math.max(polygonDistance(e.coordinates,t,i),0):1/0;case"MultiLineString":return a?e.coordinates.reduce((l,c)=>Math.min(l,Math.max(lineStringDistance(c,t,i)-n,0)),1/0):1/0;case"LineString":return a?Math.max(lineStringDistance(e.coordinates,t,i)-n,0):1/0;case"MultiPoint":case"Point":default:return 1/0}}shouldDrawPolygons(){return(this.renderMode&1)!==0}shouldDrawLines(){return(this.renderMode&2)!==0}drawGeometryCollection(e,t){for(const i of e)t=this.drawGeometry(i,t);return t}drawMultiPolygon(e,t){if(!this.shouldDrawPolygons())return t;for(const i of e)t=this.drawPolygon(this.path,i,t);return t}drawSinglePolygon(e,t){return this.shouldDrawPolygons()?this.drawPolygon(this.path,e,t):t}drawMultiLineString(e,t){if(!this.shouldDrawLines())return t;for(const i of e)t=this.drawLineString(this.strokePath,i,t,!1);return t}drawSingleLineString(e,t){return this.shouldDrawLines()?this.drawLineString(this.strokePath,e,t,!1):t}drawGeometry(e,t){switch(e.type){case"GeometryCollection":return this.drawGeometryCollection(e.geometries,t);case"MultiPolygon":return this.drawMultiPolygon(e.coordinates,t);case"Polygon":return this.drawSinglePolygon(e.coordinates,t);case"MultiLineString":return this.drawMultiLineString(e.coordinates,t);case"LineString":return this.drawSingleLineString(e.coordinates,t);case"Point":case"MultiPoint":return t}}drawPolygon(e,t,i){if(t.length<1)return i;i=this.drawLineString(e,t[0],i,!0);for(let o=1;o<t.length;o+=1){const r=t[o];this.drawLineString(e,r,void 0,!0)}return i}drawLineString(e,t,i,o){if(t.length<2)return i;const r=o?t.length-1:t.length;for(let s=0;s<r;s+=1){const[a,n]=t[s];if(s===0?e.moveTo(a,n):e.lineTo(a,n),i==null)i=new BBox21(a,n,0,0);else{const{x:l,y:c}=i,h=l+i.width,u=c+i.height;i.x=Math.min(l,a),i.y=Math.min(c,n),i.width=Math.max(h,a)-i.x,i.height=Math.max(u,n)-i.y}}return o&&e.closePath(),i}};__decorateClass([(0,import_ag_charts_core215.SceneObjectChangeDetection)({equals:import_ag_charts_core215.objectsEqual})],GeoGeometry.prototype,"projectedGeometry",2),__decorateClass([(0,import_ag_charts_core215.SceneChangeDetection)()],GeoGeometry.prototype,"renderMode",2);var import_ag_charts_community191=require("ag-charts-community"),import_ag_charts_core216=require("ag-charts-core");function calculatePolygonArea(e){const t=polygonBbox(e[0],void 0);return t==null?0:Math.abs(t.lat1-t.lat0)*Math.abs(t.lon1-t.lon0)}function findLargestByMetric(e,t){let i,o;for(const r of e){const s=t(r);s!=null&&(i==null||s>i)&&(i=s,o=r)}return o}function geometryBbox(e,t){if(e.bbox!=null){const[i,o,r,s]=e.bbox;return t=LonLatBBox.extend(t,i,o,r,s),t}switch(e.type){case"GeometryCollection":for(const i of e.geometries)t=geometryBbox(i,t);break;case"MultiPolygon":for(const i of e.coordinates)i.length>0&&(t=polygonBbox(i[0],t));break;case"Polygon":e.coordinates.length>0&&(t=polygonBbox(e.coordinates[0],t));break;case"MultiLineString":for(const i of e.coordinates)t=polygonBbox(i,t);break;case"LineString":t=polygonBbox(e.coordinates,t);break;case"MultiPoint":for(const i of e.coordinates){const[o,r]=i;t=LonLatBBox.extend(t,o,r,o,r)}break;case"Point":{const[i,o]=e.coordinates;t=LonLatBBox.extend(t,i,o,i,o);break}}return t}function largestPolygon(e){switch(e.type){case"Polygon":return e.coordinates;case"MultiPolygon":return findLargestByMetric(e.coordinates,calculatePolygonArea);case"GeometryCollection":{const t=e.geometries.map(largestPolygon).filter(i=>i!=null);return findLargestByMetric(t,calculatePolygonArea)}case"MultiLineString":case"LineString":case"MultiPoint":case"Point":return}}function largestLineString(e){switch(e.type){case"LineString":return e.coordinates;case"MultiLineString":return findLargestByMetric(e.coordinates,lineStringLength);case"GeometryCollection":{const t=e.geometries.map(largestLineString).filter(i=>i!=null);return findLargestByMetric(t,lineStringLength)}case"MultiPolygon":case"Polygon":case"MultiPoint":case"Point":return}}function containsType(e,t){if(e==null)return!1;switch(e.type){case"GeometryCollection":return e.geometries.some(i=>containsType(i,t));case"MultiPolygon":case"Polygon":return(t&1)!==0;case"MultiLineString":case"LineString":return(t&2)!==0;case"MultiPoint":case"Point":return(t&4)!==0}}function projectGeometry(e,t){switch(e.type){case"GeometryCollection":return{type:"GeometryCollection",geometries:e.geometries.map(i=>projectGeometry(i,t))};case"Polygon":return{type:"Polygon",coordinates:projectPolygon(e.coordinates,t)};case"MultiPolygon":return{type:"MultiPolygon",coordinates:projectMultiPolygon(e.coordinates,t)};case"MultiLineString":return{type:"MultiLineString",coordinates:projectPolygon(e.coordinates,t)};case"LineString":return{type:"LineString",coordinates:projectLineString(e.coordinates,t)};case"MultiPoint":return{type:"MultiPoint",coordinates:projectLineString(e.coordinates,t)};case"Point":return{type:"Point",coordinates:t.convert(e.coordinates)}}}function projectMultiPolygon(e,t){return e.map(i=>projectPolygon(i,t))}function projectPolygon(e,t){return e.map(i=>projectLineString(i,t))}function projectLineString(e,t){return e.map(i=>t.convert(i))}function prepareMapMarkerAnimationFunctions(){return{fromFn:(i,o,r)=>r==="removed"?{scalingX:1,scalingY:1}:i.previousDatum==null?{scalingX:0,scalingY:0}:{scalingX:i.scalingX,scalingY:i.scalingY},toFn:(i,o,r)=>r==="removed"?{scalingX:0,scalingY:0}:{scalingX:1,scalingY:1}}}function findFocusedGeoGeometry(e,t){const i=e.contextNodeData?.nodeData[t.datumIndex];if(i!==void 0){for(const o of e.datumSelection.nodes())if(o.datum===i)return o}}var import_ag_charts_community192=require("ag-charts-community"),TopologySeriesProperties=class extends import_ag_charts_community192._ModuleSupport.SeriesProperties{},TopologySeries=class extends import_ag_charts_community192._ModuleSupport.DataModelSeries{constructor(e){super(e),this.cleanup.register(this.ctx.eventsHub.on("data:update",()=>{}),this.ctx.eventsHub.on("legend:item-click",t=>{this.onLegendItemClick(t)}),this.ctx.eventsHub.on("legend:item-double-click",t=>{this.onLegendItemDoubleClick(t)}))}getSeriesDomain(){return{domain:[Number.NaN,Number.NaN]}}getSeriesRange(){return[Number.NaN,Number.NaN]}getHighlightedDatum(){let e=this.ctx.highlightManager?.getActiveHighlight();const{legendItemName:t}=this.properties,i=t!=null&&e?.datum==null&&t===e?.legendItemName;return e!=null&&(e.series!==this&&!i||e.datum==null)&&(e=void 0),e}},import_ag_charts_community193=require("ag-charts-community"),import_ag_charts_core217=require("ag-charts-core"),{SeriesProperties:SeriesProperties3,makeSeriesTooltip:makeSeriesTooltip12,Label:Label10}=import_ag_charts_community193._ModuleSupport,MapLineSeriesProperties=class extends SeriesProperties3{constructor(){super(...arguments),this.topology=void 0,this.idKey="",this.topologyIdKey="name",this.idName=void 0,this.labelKey=void 0,this.labelName=void 0,this.colorRange=void 0,this.maxStrokeWidth=void 0,this.stroke="black",this.strokeOpacity=1,this.strokeWidth=0,this.lineDash=[0],this.lineDashOffset=0,this.label=new Label10,this.tooltip=makeSeriesTooltip12()}getStyle(){const{stroke:e,strokeOpacity:t,strokeWidth:i,lineDash:o,lineDashOffset:r}=this;return{stroke:e,strokeOpacity:t,strokeWidth:i,lineDash:o,lineDashOffset:r,opacity:1}}};__decorateClass([import_ag_charts_core217.Property],MapLineSeriesProperties.prototype,"topology",2),__decorateClass([import_ag_charts_core217.Property],MapLineSeriesProperties.prototype,"title",2),__decorateClass([import_ag_charts_core217.Property],MapLineSeriesProperties.prototype,"legendItemName",2),__decorateClass([import_ag_charts_core217.Property],MapLineSeriesProperties.prototype,"idKey",2),__decorateClass([import_ag_charts_core217.Property],MapLineSeriesProperties.prototype,"topologyIdKey",2),__decorateClass([import_ag_charts_core217.Property],MapLineSeriesProperties.prototype,"idName",2),__decorateClass([import_ag_charts_core217.Property],MapLineSeriesProperties.prototype,"labelKey",2),__decorateClass([import_ag_charts_core217.Property],MapLineSeriesProperties.prototype,"labelName",2),__decorateClass([import_ag_charts_core217.Property],MapLineSeriesProperties.prototype,"sizeKey",2),__decorateClass([import_ag_charts_core217.Property],MapLineSeriesProperties.prototype,"sizeName",2),__decorateClass([import_ag_charts_core217.Property],MapLineSeriesProperties.prototype,"colorKey",2),__decorateClass([import_ag_charts_core217.Property],MapLineSeriesProperties.prototype,"colorName",2),__decorateClass([import_ag_charts_core217.Property],MapLineSeriesProperties.prototype,"sizeDomain",2),__decorateClass([import_ag_charts_core217.Property],MapLineSeriesProperties.prototype,"colorRange",2),__decorateClass([import_ag_charts_core217.Property],MapLineSeriesProperties.prototype,"maxStrokeWidth",2),__decorateClass([import_ag_charts_core217.Property],MapLineSeriesProperties.prototype,"stroke",2),__decorateClass([import_ag_charts_core217.Property],MapLineSeriesProperties.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core217.Property],MapLineSeriesProperties.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core217.Property],MapLineSeriesProperties.prototype,"lineDash",2),__decorateClass([import_ag_charts_core217.Property],MapLineSeriesProperties.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core217.Property],MapLineSeriesProperties.prototype,"itemStyler",2),__decorateClass([import_ag_charts_core217.Property],MapLineSeriesProperties.prototype,"label",2),__decorateClass([import_ag_charts_core217.Property],MapLineSeriesProperties.prototype,"tooltip",2);var{getMissCount:getMissCount2,getLabelStyles:getLabelStyles2,createDatumId:createDatumId11,SeriesNodePickMode:SeriesNodePickMode9,valueProperty:valueProperty11,ColorScale:ColorScale2,LinearScale:LinearScale5,Selection:Selection8,Text:Text4,Transformable:Transformable3}=import_ag_charts_community194._ModuleSupport,MapLineSeries=class extends TopologySeries{constructor(e){super({moduleCtx:e,categoryKey:void 0,propertyKeys:{size:["colorKey"],color:["colorKey"],label:["labelKey"]},propertyNames:{size:["sizeName"],color:["colorName"],label:["labelName"]},pickModes:[SeriesNodePickMode9.EXACT_SHAPE_MATCH,SeriesNodePickMode9.NEAREST_NODE],usesPlacedLabels:!0}),this.properties=new MapLineSeriesProperties,this._chartTopology=void 0,this.colorScale=new ColorScale2,this.sizeScale=new LinearScale5,this.datumSelection=Selection8.select(this.contentGroup,()=>this.nodeFactory()),this.labelSelection=Selection8.select(this.labelGroup,Text4),this.highlightDatumSelection=Selection8.select(this.highlightNodeGroup,()=>this.nodeFactory()),this.highlightLabelSelection=Selection8.select(this.highlightLabelGroup,Text4),this.placedLabelData=[],this._previousDatumMidPoint=void 0}getNodeData(){return this.contextNodeData?.nodeData}get topology(){return this.properties.topology??this._chartTopology}get hasData(){return super.hasData&&this.topology!=null}renderToOffscreenCanvas(){return!0}setZIndex(e){return super.setZIndex(e),this.contentGroup.zIndex=[1,e],this.highlightGroup.zIndex=[4,e],!0}setChartTopology(e){this._chartTopology=e,this.topology===e&&(this.nodeDataRefresh=!0)}isLabelEnabled(){return this.properties.labelKey!=null&&this.properties.label.enabled}nodeFactory(){const e=new GeoGeometry;return e.renderMode=2,e.lineJoin="round",e.lineCap="round",e}async processData(e){if(this.data==null)return;const{data:t,topology:i,sizeScale:o,colorScale:r}=this,{topologyIdKey:s,idKey:a,sizeKey:n,colorKey:l,labelKey:c,sizeDomain:h,colorRange:u}=this.properties,d=new Map;for(const m of i?.features.values()??[]){const v=m.properties?.[s];v==null||!containsType(m.geometry,2)||d.set(v,m)}const p=this.sizeScale.type,g=this.colorScale.type,y=this.scale?.type,{dataModel:x,processedData:f}=await this.requestDataModel(e,t,{props:[valueProperty11(a,y,{id:"idValue",includeProperty:!1}),valueProperty11(a,y,{id:"featureValue",includeProperty:!1,processor:()=>m=>d.get(m)}),...c==null?[]:[valueProperty11(c,"category",{id:"labelValue"})],...n==null?[]:[valueProperty11(n,p,{id:"sizeValue"})],...l==null?[]:[valueProperty11(l,g,{id:"colorValue"})]]}),S=x.resolveColumnById(this,"featureValue",f);if(this.topologyBounds=S.reduce((m,v)=>{const b=v?.geometry;return b==null?m:geometryBbox(b,m)},void 0),n!=null){const m=x.resolveProcessedDataIndexById(this,"sizeValue"),v=f.domain.values[m]??[];o.domain=h??v}if(u!=null&&this.isColorScaleValid()){const m=x.resolveProcessedDataIndexById(this,"colorValue");r.domain=f.domain.values[m],r.range=u,r.update()}i==null&&import_ag_charts_core218.Logger.warnOnce("no topology was provided for [MapLineSeries]; nothing will be rendered.")}isColorScaleValid(){const{colorKey:e}=this.properties;if(!e)return!1;const{dataModel:t,processedData:i}=this;if(!t||!i)return!1;const o=t.resolveProcessedDataIndexById(this,"colorValue"),r=i.input.count,s=getMissCount2(this,i.defs.values[o].missing);return!(r===0||r===s)}getLabelDatum(e,t,i,o,r,s){if(o==null||r==null||i==null)return;const a=largestLineString(r);if(a==null)return;const{idKey:n,idName:l,sizeKey:c,sizeName:h,colorKey:u,colorName:d,labelKey:p,labelName:g,label:y}=this.properties;if(p==null||!y.enabled)return;const x=this.getLabelText(o,e,p,"label",[],y,{value:o,datum:e,idKey:n,idName:l,sizeKey:c,sizeName:h,colorKey:u,colorName:d,labelKey:p,labelName:g});if(x==null)return;const f=s.measureLines(String(x)),S=lineStringCenter(a);if(S==null)return;const[m,v]=S.point,{width:b,height:D}=f;return{point:{x:m,y:v,size:0},label:{width:b,height:D,text:x},anchor:void 0,placement:void 0,datumIndex:t,idValue:i}}resolveColumn(e,t,i){if(!(e==null||this.dataModel==null))return this.dataModel.resolveColumnById(this,t,i)}resolveLineDataColumns(e){const{sizeKey:t,colorKey:i,labelKey:o}=this.properties;return{idValues:this.dataModel.resolveColumnById(this,"idValue",e),featureValues:this.dataModel.resolveColumnById(this,"featureValue",e),labelValues:this.resolveColumn(o,"labelValue",e),sizeValues:this.resolveColumn(t,"sizeValue",e),colorValues:this.resolveColumn(i,"colorValue",e)}}prepareProjectedLineGeometries(e,t,i){const o=new Map;for(const[r]of i.dataSources.get(this.id)?.data.entries()??[]){const s=e[r],a=t[r]?.geometry,n=a!=null&&this.scale!=null?projectGeometry(a,this.scale):void 0;s!=null&&n!=null&&o.set(s,n)}return o}warnMissingGeometries(e){if(e.length===0)return;const t=10;if(e.length>t){const i=e.length-t;e.length=t,e.push(`(+${i} more)`)}import_ag_charts_core218.Logger.warnOnce("some data items do not have matches in the provided topology",e)}createNodeData(){const{id:e,dataModel:t,processedData:i,sizeScale:o,properties:r}=this,{label:s,legendItemName:a,colorKey:n}=r;if(t==null||i==null)return;if(!this.visible)return{itemId:e,nodeData:[],labelData:[]};const l=this.resolveLineDataColumns(i),c=r.maxStrokeWidth??r.strokeWidth;o.range=[Math.min(r.strokeWidth,c),c];const h=(0,import_ag_charts_core218.cachedTextMeasurer)(s),u=this.prepareProjectedLineGeometries(l.idValues,l.featureValues,i),d=[],p=[],g=[],y=i.dataSources.get(this.id)?.data??[];for(const[x,f]of y.entries()){const S={idValue:l.idValues[x],colorValue:l.colorValues?.[x],sizeValue:l.sizeValues?.[x],labelValue:l.labelValues?.[x]},m=u.get(S.idValue);if(m==null&&g.push(S.idValue),n!=null&&S.colorValue==null)continue;const v=this.getLabelDatum(f,x,S.idValue,S.labelValue,m,h);v!=null&&p.push(v),d.push({series:this,datum:f,datumIndex:x,...S,projectedGeometry:m,legendItemName:a,style:this.getItemStyle({datumIndex:x,datum:f,colorValue:S.colorValue,sizeValue:S.sizeValue},!1)})}return this.warnMissingGeometries(g),{itemId:e,nodeData:d,labelData:p}}updateSelections(){this.nodeDataRefresh&&(this.contextNodeData=this.createNodeData(),this.nodeDataRefresh=!1)}update(){const{datumSelection:e,highlightDatumSelection:t}=this;this.updateSelections(),this.contentGroup.visible=this.visible,this.labelGroup.visible=this.visible;const i=this.ctx.chartService.highlight?.drawingMode??"overlay",o=this.getHighlightedDatum(),r=this.contextNodeData?.nodeData??[];this.datumSelection=this.updateDatumSelection({nodeData:r,datumSelection:e}),this.updateDatumStyles({datumSelection:e,isHighlight:!1}),this.updateDatumNodes({datumSelection:e,isHighlight:!1,drawingMode:"overlay"}),this.highlightDatumSelection=this.updateDatumSelection({nodeData:o==null?[]:[o],datumSelection:t}),this.updateDatumStyles({datumSelection:t,isHighlight:!0}),this.updateDatumNodes({datumSelection:t,isHighlight:!0,drawingMode:i}),this.updateLabelNodes({labelSelection:this.labelSelection,isHighlight:!1}),this.updateHighlightLabelSelection(o)}updateDatumSelection(e){return e.datumSelection.update(e.nodeData,void 0,t=>createDatumId11(t.idValue))}getItemStyle({datumIndex:e=0,datum:t,colorValue:i,sizeValue:o},r){const{properties:s,colorScale:a,sizeScale:n}=this,{colorRange:l,itemStyler:c}=s,h=s.getStyle();i!=null&&(h.stroke=this.isColorScaleValid()?a.convert(i):l?.[0]??s.stroke);const u=this.getHighlightStyle(r,e),d=(0,import_ag_charts_core218.mergeDefaults)(u,h);o!=null&&(d.strokeWidth=n.convert(o,{clamp:!0}));let p;return c!=null&&(p=this.cachedDatumCallback(createDatumId11(e,r?"highlight":"node"),()=>{const g=this.makeItemStylerParams(t,e,r,d);return this.callWithContext(c,g)})),p?(0,import_ag_charts_core218.mergeDefaults)(d,p):d}makeItemStylerParams(e,t,i,o){const{id:r}=this,s=this.ctx.highlightManager?.getActiveHighlight(),a=this.getHighlightStateString(s,i,t);return{seriesId:r,datum:e,highlightState:a,...o}}updateDatumStyles({datumSelection:e,isHighlight:t}){e.each((i,o)=>{o.style=this.getItemStyle(o,t)})}updateDatumNodes({datumSelection:e,drawingMode:t}){e.each((i,o)=>{const{projectedGeometry:r,style:s}=o;if(r==null){i.visible=!1,i.projectedGeometry=void 0;return}i.visible=!0,i.projectedGeometry=r,i.setProperties(s),i.drawingMode=t})}updatePlacedLabelData(e){this.placedLabelData=e,this.labelSelection=this.labelSelection.update(e,t=>{t.pointerEvents=import_ag_charts_community194._ModuleSupport.PointerEvents.None}),this.updateLabelNodes({labelSelection:this.labelSelection,isHighlight:!1}),this.updateHighlightLabelSelection()}updateLabelNodes({isHighlight:e,labelSelection:t}){const{properties:i}=this,o=this.getHighlightedDatum();t.each((r,s)=>{const{x:a,y:n,width:l,height:c,text:h,datum:u}=s,d=getLabelStyles2(this,void 0,i,i.label,e,o),{color:p,fontStyle:g,fontWeight:y,fontSize:x,fontFamily:f}=d;r.visible=!0,r.x=a+l/2,r.y=n+c/2,r.text=h,r.fill=p,r.fontStyle=g,r.fontWeight=y,r.fontSize=x,r.fontFamily=f,r.textAlign="center",r.textBaseline="middle";const S=u?.datumIndex;r.fillOpacity=this.getHighlightStyle(e,S).opacity??1,r.setBoxing(d)})}updateHighlightLabelSelection(e=this.getHighlightedDatum()){const t=e?.idValue,i=t==null||!this.isLabelEnabled()?[]:this.placedLabelData.filter(o=>o.datum.idValue===t);this.highlightLabelSelection=this.highlightLabelSelection.update(i),i.length===0&&this.highlightLabelSelection.cleanup(),this.updateLabelNodes({labelSelection:this.highlightLabelSelection,isHighlight:!0})}resetAnimation(){}getLabelData(){return this.isLabelEnabled()?this.contextNodeData?.labelData??[]:[]}pickNodeClosestDatum({x:e,y:t}){let i=1/0,o;return this.datumSelection.each((r,s)=>{const a=r.distanceSquared(e,t);a<i&&(i=a,o=s)}),o==null?void 0:{datum:o,distance:Math.sqrt(i)}}datumMidPoint(e){const{_previousDatumMidPoint:t}=this;if(t?.datum===e)return t.point;const i=e.projectedGeometry,o=i==null?void 0:largestLineString(i),r=o==null?void 0:lineStringCenter(o)?.point,s=r==null?void 0:{x:r[0],y:r[1]};return this._previousDatumMidPoint={datum:e,point:s},s}legendItemSymbol(e){const{dataModel:t,processedData:i,properties:o}=this,{strokeWidth:r,strokeOpacity:s,lineDash:a}=o;let{stroke:n}=o;if(e!=null&&this.isColorScaleValid()){const c=t.resolveColumnById(this,"colorValue",i)[e];c!=null&&(n=this.colorScale.convert(c))}return{marker:{fill:void 0,fillOpacity:0,stroke:void 0,strokeWidth:0,strokeOpacity:0,lineDash:[0],lineDashOffset:0,enabled:!1},line:{enabled:!0,stroke:n,strokeWidth:r,strokeOpacity:s,lineDash:a}}}getLegendData(e){const{processedData:t,dataModel:i}=this;if(t==null||i==null)return[];const{id:o,visible:r}=this,{title:s,legendItemName:a,idKey:n,idName:l,colorKey:c,colorRange:h,showInLegend:u}=this.properties;if(e==="gradient"&&c!=null&&h!=null){const d=t.domain.values[i.resolveProcessedDataIndexById(this,"colorValue")];return[{legendType:"gradient",enabled:r,seriesId:o,series:this.getFormatterContext("color"),colorRange:h,colorDomain:d}]}else return e==="category"?[{legendType:"category",id:o,itemId:o,seriesId:o,enabled:r,label:{text:a??s??l??n},symbol:this.legendItemSymbol(),legendItemName:a,hideInLegend:!u}]:[]}getTooltipContent(e){const{id:t,dataModel:i,processedData:o,properties:r,ctx:{formatManager:s}}=this,{idKey:a,idName:n,colorKey:l,colorName:c,sizeKey:h,sizeName:u,labelKey:d,labelName:p,title:g,legendItemName:y,tooltip:x}=r;if(!i||!o)return;const f=o.dataSources.get(this.id)?.data[e],S=i.resolveColumnById(this,"idValue",o),m=h==null?void 0:i.resolveColumnById(this,"sizeValue",o)[e],v=l==null?void 0:i.resolveColumnById(this,"colorValue",o)[e];if(l!=null&&v==null)return;const b=[];if(this.isLabelEnabled()&&d!=null&&d!==a){const k=i.resolveColumnById(this,"labelValue",o)[e],A=s.format(this.callWithContext.bind(this),{type:"category",value:k,datum:f,seriesId:t,legendItemName:y,key:d,source:"tooltip",property:"label",domain:[],boundSeries:this.getFormatterContext("label")});b.push({label:p,fallbackLabel:d,value:A??k})}if(m!=null&&h!=null){const k=i.getDomain(this,"sizeValue","value",o).domain,A=s.format(this.callWithContext.bind(this),{type:"number",value:m,datum:f,seriesId:t,legendItemName:y,key:h,source:"tooltip",property:"size",domain:k,boundSeries:this.getFormatterContext("size"),fractionDigits:void 0,visibleDomain:void 0});b.push({label:u,fallbackLabel:h,value:A??String(m)})}if(v!=null&&l!=null){const k=i.getDomain(this,"colorValue","value",o).domain,A=s.format(this.callWithContext.bind(this),{type:"number",value:v,datum:f,seriesId:t,legendItemName:y,key:l,source:"tooltip",property:"color",domain:k,boundSeries:this.getFormatterContext("color"),fractionDigits:void 0,visibleDomain:void 0});b.push({label:c,fallbackLabel:l,value:A??String(v)})}const D=this.getItemStyle({datumIndex:e,datum:f,colorValue:v,sizeValue:m},!1);return this.formatTooltipWithContext(x,{heading:S[e],title:g??y,symbol:this.legendItemSymbol(e),data:b},{seriesId:t,datum:f,title:g,idKey:a,idName:n,colorKey:l,colorName:c,sizeKey:h,sizeName:u,labelKey:d,labelName:p,...D})}computeFocusBounds(e){const t=findFocusedGeoGeometry(this,e);return t?Transformable3.toCanvas(this.contentGroup,t.getBBox()):void 0}hasItemStylers(){return this.properties.itemStyler!=null||this.properties.label.itemStyler!=null}};MapLineSeries.className="MapLineSeries",MapLineSeries.type="map-line";var import_ag_charts_community195=require("ag-charts-community"),import_ag_charts_core219=require("ag-charts-core"),{mapLineSeriesThemeableOptionsDef}=import_ag_charts_community195._ModuleSupport,mapLineSeriesOptionsDef={...(0,import_ag_charts_core219.without)(import_ag_charts_core219.commonSeriesOptionsDefs,["highlightStyle","highlight"]),...mapLineSeriesThemeableOptionsDef,type:(0,import_ag_charts_core219.required)((0,import_ag_charts_core219.constant)("map-line")),idKey:(0,import_ag_charts_core219.required)(import_ag_charts_core219.string),sizeKey:import_ag_charts_core219.string,colorKey:import_ag_charts_core219.string,labelKey:import_ag_charts_core219.string,idName:import_ag_charts_core219.string,sizeName:import_ag_charts_core219.string,colorName:import_ag_charts_core219.string,labelName:import_ag_charts_core219.string,topology:import_ag_charts_core219.geoJson,topologyIdKey:import_ag_charts_core219.string,legendItemName:import_ag_charts_core219.string,title:import_ag_charts_core219.string};mapLineSeriesOptionsDef.colorRange=(0,import_ag_charts_core219.undocumented)((0,import_ag_charts_core219.and)((0,import_ag_charts_core219.arrayOf)(import_ag_charts_core219.color),(0,import_ag_charts_core219.arrayLength)(1)));var MapLineSeriesModule={type:"series",name:"map-line",chartType:"topology",enterprise:!0,version:import_ag_charts_community196.VERSION,dependencies:[TopologyChartModule],options:mapLineSeriesOptionsDef,themeTemplate:{...MAP_THEME_DEFAULTS,series:{stroke:applyMapPalette(import_ag_charts_core220.SAFE_STROKE_FILL_OPERATION),colorRange:{$if:[{$eq:[{$mapPalette:"type"},"inbuilt"]},{$mapPalette:"divergingColors"},applyMapPalette(import_ag_charts_core220.SAFE_RANGE2_OPERATION)]},strokeWidth:1,maxStrokeWidth:3,lineDash:[0],lineDashOffset:0,label:{...import_ag_charts_core220.LABEL_BOXING_DEFAULTS,enabled:!0,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}},highlight:applyMapPalette(import_ag_charts_core220.MULTI_SERIES_HIGHLIGHT_STYLE)},tooltip:{range:"exact"}},create:e=>new MapLineSeries(e)},import_ag_charts_community200=require("ag-charts-community"),import_ag_charts_community198=require("ag-charts-community"),import_ag_charts_core222=require("ag-charts-core"),import_ag_charts_community197=require("ag-charts-community"),import_ag_charts_core221=require("ag-charts-core"),{SeriesProperties:SeriesProperties4,makeSeriesTooltip:makeSeriesTooltip13}=import_ag_charts_community197._ModuleSupport,MapLineBackgroundSeriesProperties=class extends SeriesProperties4{constructor(){super(...arguments),this.topology=void 0,this.stroke="black",this.strokeOpacity=1,this.strokeWidth=0,this.lineDash=[0],this.lineDashOffset=0,this.tooltip=makeSeriesTooltip13()}};__decorateClass([import_ag_charts_core221.Property],MapLineBackgroundSeriesProperties.prototype,"topology",2),__decorateClass([import_ag_charts_core221.Property],MapLineBackgroundSeriesProperties.prototype,"stroke",2),__decorateClass([import_ag_charts_core221.Property],MapLineBackgroundSeriesProperties.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core221.Property],MapLineBackgroundSeriesProperties.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core221.Property],MapLineBackgroundSeriesProperties.prototype,"lineDash",2),__decorateClass([import_ag_charts_core221.Property],MapLineBackgroundSeriesProperties.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core221.Property],MapLineBackgroundSeriesProperties.prototype,"tooltip",2);var{createDatumId:createDatumId12,Group:Group13,Selection:Selection9,PointerEvents:PointerEvents6}=import_ag_charts_community198._ModuleSupport,MapLineBackgroundSeries=class extends TopologySeries{constructor(e){super({moduleCtx:e,categoryKey:void 0,pickModes:[]}),this.properties=new MapLineBackgroundSeriesProperties,this._chartTopology=void 0,this.itemGroup=this.contentGroup.appendChild(new Group13({name:"itemGroup"})),this.datumSelection=Selection9.select(this.itemGroup,()=>this.nodeFactory()),this.itemGroup.pointerEvents=PointerEvents6.None}getNodeData(){return this.contextNodeData?.nodeData}get topology(){return this.properties.topology??this._chartTopology}get focusable(){return!1}setOptionsData(){}setChartData(){}get hasData(){return!1}renderToOffscreenCanvas(){return!0}setChartTopology(e){this._chartTopology=e,this.topology===e&&(this.nodeDataRefresh=!0)}setZIndex(e){return super.setZIndex(e),this.contentGroup.zIndex=[0,e,0],this.highlightGroup.zIndex=[0,e,1],!0}nodeFactory(){const e=new GeoGeometry;return e.renderMode=2,e.lineJoin="round",e.lineCap="round",e.pointerEvents=PointerEvents6.None,e}processData(){const{topology:e}=this;this.topologyBounds=e?.features.reduce((t,i)=>{const o=i.geometry;return o==null?t:geometryBbox(o,t)},void 0),e==null&&import_ag_charts_core222.Logger.warnOnce("no topology was provided for [MapShapeBackgroundSeries]; nothing will be rendered.")}createNodeData(){const{id:e,topology:t,scale:i,properties:o}=this;if(t==null)return;const{stroke:r,strokeOpacity:s,lineDash:a,lineDashOffset:n,strokeWidth:l}=o,c=[],h=[];for(const[u,d]of t.features.entries()){const{geometry:p}=d,g=p!=null&&i!=null?projectGeometry(p,i):void 0;g!=null&&c.push({series:this,datum:d,datumIndex:0,index:u,projectedGeometry:g,style:{stroke:r,strokeOpacity:s,lineDash:a,lineDashOffset:n,strokeWidth:l}})}return{itemId:e,nodeData:c,labelData:h}}updateSelections(){this.nodeDataRefresh&&(this.contextNodeData=this.createNodeData(),this.nodeDataRefresh=!1)}update(){const{datumSelection:e}=this;this.updateSelections(),this.contentGroup.visible=this.visible,this.labelGroup.visible=this.visible;const{nodeData:t=[]}=this.contextNodeData??{};this.datumSelection=this.updateDatumSelection({nodeData:t,datumSelection:e}),this.updateDatumNodes({datumSelection:e})}updateDatumSelection(e){return e.datumSelection.update(e.nodeData,void 0,t=>createDatumId12(t.index))}updateDatumNodes(e){const{datumSelection:t}=e;t.each((i,o)=>{const{projectedGeometry:r}=o;if(r==null){i.visible=!1,i.projectedGeometry=void 0;return}i.visible=!0,i.projectedGeometry=r,i.setProperties(o.style)})}resetAnimation(){}getLegendData(){return[]}getTooltipContent(e){}computeFocusBounds(e){}hasItemStylers(){return!1}};MapLineBackgroundSeries.className="MapLineBackgroundSeries",MapLineBackgroundSeries.type="map-line-background";var import_ag_charts_community199=require("ag-charts-community"),import_ag_charts_core223=require("ag-charts-core"),{mapLineBackgroundSeriesThemeableOptionsDef}=import_ag_charts_community199._ModuleSupport,mapLineBackgroundSeriesOptionsDef={...mapLineBackgroundSeriesThemeableOptionsDef,type:(0,import_ag_charts_core223.required)((0,import_ag_charts_core223.constant)("map-line-background")),topology:import_ag_charts_core223.geoJson},MapLineBackgroundSeriesModule={type:"series",name:"map-line-background",chartType:"topology",enterprise:!0,version:import_ag_charts_community200.VERSION,dependencies:[TopologyChartModule],options:mapLineBackgroundSeriesOptionsDef,themeTemplate:{...MAP_THEME_DEFAULTS,series:{stroke:{$path:["/1",{$mapPalette:"stroke"},{$mapPalette:"secondHierarchyColors"}]},strokeWidth:1,lineDash:[0],lineDashOffset:0}},create:e=>new MapLineBackgroundSeries(e)},import_ag_charts_community205=require("ag-charts-community"),import_ag_charts_core228=require("ag-charts-core"),import_ag_charts_community203=require("ag-charts-community"),import_ag_charts_core226=require("ag-charts-core"),import_ag_charts_core224=require("ag-charts-core");function polygonPointSearch(e,t,i){const o=polygonBbox(e[0],void 0);if(o==null)return;const r=(o.lon0+o.lon1)/2,s=(o.lat0+o.lat1)/2,a=Math.abs(o.lon1-o.lon0),n=Math.abs(o.lat1-o.lat0),l=polygonCentroid(e[0]),[c,h]=l,u=-polygonDistance(e,c,h);let d;const p=(b,D)=>{const A=Math.max(D-u,0);return b-.5*A},g=(b,D,k)=>{const{distance:A,maxDistance:M}=i(e,b,D,k),I=Math.hypot(c-b,h-D),_=Math.min(Math.max(c,b-k/2),b+k/2),P=Math.min(Math.max(h,D-k/2),D+k/2),O=Math.hypot(c-_,h-P),C=p(A,I),L=p(M,O);return{distance:A,maxDistance:M,value:C,maxValue:L,x:b,y:D,stride:k}},y=(b,D,k,A)=>{const M=g(D,k,A);M.maxDistance>=0&&b.push(M)},x=Math.min(a,n)/2;let f={value:g(r,s,x),next:null};for(;f!=null;){const b=f.value,{distance:D,value:k,maxValue:A,x:M,y:I,stride:_}=b;if(f=f.next,D>0&&(d==null||k>d.value)&&(d=b),d!=null&&A-d.value<=t)continue;const P=_/2,O=[];y(O,M-P,I-P,P),y(O,M+P,I-P,P),y(O,M-P,I+P,P),y(O,M+P,I+P,P),O.sort(labelPlacementCmp),f=(0,import_ag_charts_core224.insertListItemsSorted)(f,O,labelPlacementCmp)}if(d==null)return;const{distance:S,x:m,y:v}=d;return{x:m,y:v,distance:S}}var labelPlacementCmp=(e,t)=>t.maxValue-e.maxValue;function polygonMarkerCenter(e,t){const i=polygonPointSearch(e,t,(s,a,n,l)=>{const c=-polygonDistance(s,a,n),h=c+l*Math.SQRT2;return{distance:c,maxDistance:h}});if(i==null)return;const{x:o,y:r}=i;return[o,r]}function markerPositions(e,t){let i;switch(e.type){case"GeometryCollection":return e.geometries.flatMap(o=>markerPositions(o,t));case"MultiPoint":return e.coordinates;case"Point":return[e.coordinates];case"MultiPolygon":{const o=largestPolygon(e);i=o==null?void 0:polygonMarkerCenter(o,t);break}case"Polygon":{const o=e.coordinates;i=o==null?void 0:polygonMarkerCenter(o,t);break}case"MultiLineString":{const o=largestLineString(e);i=o==null?void 0:lineStringCenter(o)?.point;break}case"LineString":{const o=e.coordinates;i=lineStringCenter(o)?.point;break}}return i==null?[]:[i]}var import_ag_charts_community201=require("ag-charts-community"),{BBox:BBox22}=import_ag_charts_community201._ModuleSupport;function getTopologyShapeFillBBox(e){if(!e)return;const{range:t}=e,i=t[0][0],o=t[0][1],r=t[1][0]-i,s=t[1][1]-o,a=new BBox22(i,o,r,s);return{series:a,axis:a}}var import_ag_charts_community202=require("ag-charts-community"),import_ag_charts_core225=require("ag-charts-core"),{SeriesProperties:SeriesProperties5,makeSeriesTooltip:makeSeriesTooltip14,Label:Label11}=import_ag_charts_community202._ModuleSupport,MapMarkerSeriesLabel=class extends Label11{constructor(){super(...arguments),this.placement="bottom"}};__decorateClass([import_ag_charts_core225.Property],MapMarkerSeriesLabel.prototype,"placement",2);var MapMarkerSeriesProperties=class extends SeriesProperties5{constructor(){super(...arguments),this.topology=void 0,this.idKey=void 0,this.topologyIdKey="name",this.idName=void 0,this.latitudeKey=void 0,this.latitudeName=void 0,this.longitudeKey=void 0,this.longitudeName=void 0,this.labelKey=void 0,this.labelName=void 0,this.colorRange=void 0,this.shape="circle",this.size=6,this.fill="black",this.fillOpacity=1,this.stroke="black",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.label=new MapMarkerSeriesLabel,this.tooltip=makeSeriesTooltip14()}getStyle(){const{size:e,shape:t,fill:i,fillOpacity:o,stroke:r,strokeWidth:s,strokeOpacity:a,lineDash:n,lineDashOffset:l}=this;return{size:e,shape:t,fill:i,fillOpacity:o,opacity:1,stroke:r,strokeWidth:s,strokeOpacity:a,lineDash:n,lineDashOffset:l}}};__decorateClass([import_ag_charts_core225.Property],MapMarkerSeriesProperties.prototype,"topology",2),__decorateClass([import_ag_charts_core225.Property],MapMarkerSeriesProperties.prototype,"title",2),__decorateClass([import_ag_charts_core225.Property],MapMarkerSeriesProperties.prototype,"legendItemName",2),__decorateClass([import_ag_charts_core225.Property],MapMarkerSeriesProperties.prototype,"idKey",2),__decorateClass([import_ag_charts_core225.Property],MapMarkerSeriesProperties.prototype,"topologyIdKey",2),__decorateClass([import_ag_charts_core225.Property],MapMarkerSeriesProperties.prototype,"idName",2),__decorateClass([import_ag_charts_core225.Property],MapMarkerSeriesProperties.prototype,"latitudeKey",2),__decorateClass([import_ag_charts_core225.Property],MapMarkerSeriesProperties.prototype,"latitudeName",2),__decorateClass([import_ag_charts_core225.Property],MapMarkerSeriesProperties.prototype,"longitudeKey",2),__decorateClass([import_ag_charts_core225.Property],MapMarkerSeriesProperties.prototype,"longitudeName",2),__decorateClass([import_ag_charts_core225.Property],MapMarkerSeriesProperties.prototype,"labelKey",2),__decorateClass([import_ag_charts_core225.Property],MapMarkerSeriesProperties.prototype,"labelName",2),__decorateClass([import_ag_charts_core225.Property],MapMarkerSeriesProperties.prototype,"sizeKey",2),__decorateClass([import_ag_charts_core225.Property],MapMarkerSeriesProperties.prototype,"sizeName",2),__decorateClass([import_ag_charts_core225.Property],MapMarkerSeriesProperties.prototype,"colorKey",2),__decorateClass([import_ag_charts_core225.Property],MapMarkerSeriesProperties.prototype,"colorName",2),__decorateClass([import_ag_charts_core225.Property],MapMarkerSeriesProperties.prototype,"colorRange",2),__decorateClass([import_ag_charts_core225.Property],MapMarkerSeriesProperties.prototype,"shape",2),__decorateClass([import_ag_charts_core225.Property],MapMarkerSeriesProperties.prototype,"size",2),__decorateClass([import_ag_charts_core225.Property],MapMarkerSeriesProperties.prototype,"maxSize",2),__decorateClass([import_ag_charts_core225.Property],MapMarkerSeriesProperties.prototype,"sizeDomain",2),__decorateClass([import_ag_charts_core225.Property],MapMarkerSeriesProperties.prototype,"fill",2),__decorateClass([import_ag_charts_core225.Property],MapMarkerSeriesProperties.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core225.Property],MapMarkerSeriesProperties.prototype,"stroke",2),__decorateClass([import_ag_charts_core225.Property],MapMarkerSeriesProperties.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core225.Property],MapMarkerSeriesProperties.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core225.Property],MapMarkerSeriesProperties.prototype,"lineDash",2),__decorateClass([import_ag_charts_core225.Property],MapMarkerSeriesProperties.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core225.Property],MapMarkerSeriesProperties.prototype,"itemStyler",2),__decorateClass([import_ag_charts_core225.Property],MapMarkerSeriesProperties.prototype,"label",2),__decorateClass([import_ag_charts_core225.Property],MapMarkerSeriesProperties.prototype,"tooltip",2);var{fromToMotion:fromToMotion3,getMissCount:getMissCount3,createDatumId:createDatumId13,SeriesNodePickMode:SeriesNodePickMode10,valueProperty:valueProperty12,computeMarkerFocusBounds:computeMarkerFocusBounds2,ColorScale:ColorScale3,LinearScale:LinearScale6,Group:Group14,Selection:Selection10,Text:Text5,Marker:Marker4,getLabelStyles:getLabelStyles3}=import_ag_charts_community203._ModuleSupport,MapMarkerSeries=class extends TopologySeries{constructor(e){super({moduleCtx:e,categoryKey:void 0,propertyKeys:{size:["colorKey"],color:["colorKey"],label:["labelKey"]},propertyNames:{size:["sizeName"],color:["colorName"],label:["labelName"]},pickModes:[SeriesNodePickMode10.EXACT_SHAPE_MATCH,SeriesNodePickMode10.NEAREST_NODE],usesPlacedLabels:!0}),this.properties=new MapMarkerSeriesProperties,this._chartTopology=void 0,this.colorScale=new ColorScale3,this.sizeScale=new LinearScale6,this.markerGroup=this.contentGroup.appendChild(new Group14({name:"markerGroup"})),this.labelSelection=Selection10.select(this.labelGroup,Text5,!1),this.highlightLabelSelection=Selection10.select(this.highlightLabelGroup,Text5,!1),this.markerSelection=Selection10.select(this.markerGroup,Marker4,!1),this.highlightMarkerSelection=Selection10.select(this.highlightNodeGroup,Marker4),this.placedLabelData=[],this.animationState=new import_ag_charts_core226.StateMachine("empty",{empty:{update:{target:"ready",action:()=>this.animateMarkers()},reset:"empty",skip:"ready"},ready:{updateData:"waiting",clear:"clearing",resize:()=>this.resetAllAnimation(),reset:"empty",skip:"ready"},waiting:{update:{target:"ready",action:()=>this.animateMarkers()},resize:{target:"ready",action:()=>this.resetAllAnimation()},reset:"empty",skip:"ready"},clearing:{update:{target:"empty",action:()=>this.resetAllAnimation()},reset:"empty",skip:"ready"}},()=>this.checkProcessedDataAnimatable())}getNodeData(){return this.contextNodeData?.nodeData}get topology(){return this.properties.topology??this._chartTopology}get hasData(){const e=this.properties.latitudeKey!=null&&this.properties.longitudeKey!=null;return super.hasData&&(this.topology!=null||e)}renderToOffscreenCanvas(){return!0}setChartTopology(e){this._chartTopology=e,this.topology===e&&(this.nodeDataRefresh=!0)}setZIndex(e){return super.setZIndex(e),this.contentGroup.zIndex=[2,e],this.highlightGroup.zIndex=[3,e],!0}isLabelEnabled(){return this.properties.labelKey!=null&&this.properties.label.enabled}async processData(e){if(this.data==null)return;const{data:t,sizeScale:i,colorScale:o}=this,{topologyIdKey:r,idKey:s,latitudeKey:a,longitudeKey:n,sizeKey:l,colorKey:c,labelKey:h,sizeDomain:u,colorRange:d}=this.properties,p=this.buildFeatureMap(r),g=this.sizeScale.type,y=this.colorScale.type,x=this.scale?.type,f=a!=null&&n!=null,{dataModel:S,processedData:m}=await this.requestDataModel(e,t,{props:[...s==null?[]:[valueProperty12(s,x,{id:"idValue",includeProperty:!1}),valueProperty12(s,x,{id:"featureValue",includeProperty:!1,processor:()=>k=>p.get(k)})],...f?[valueProperty12(a,x,{id:"latValue"}),valueProperty12(n,x,{id:"lonValue"})]:[],...h?[valueProperty12(h,"category",{id:"labelValue"})]:[],...l?[valueProperty12(l,g,{id:"sizeValue"})]:[],...c?[valueProperty12(c,y,{id:"colorValue"})]:[]]}),v=s==null?void 0:S.resolveColumnById(this,"featureValue",m),b=f?S.resolveColumnById(this,"latValue",m):void 0,D=f?S.resolveColumnById(this,"lonValue",m):void 0;if(this.topologyBounds=m.dataSources.get(this.id)?.data.reduce((k,A,M)=>{const _=v?.[M]?.geometry;if(_!=null&&(k=geometryBbox(_,k)),b!=null&&D!=null){const P=D[M],O=b[M];k=LonLatBBox.extend(k,P,O,P,O)}return k},void 0),l!=null){const k=S.resolveProcessedDataIndexById(this,"sizeValue"),A=m.domain.values[k]??[];i.domain=u??A}if(d!=null&&this.isColorScaleValid()){const k=S.resolveProcessedDataIndexById(this,"colorValue");o.domain=m.domain.values[k],o.range=d,o.update()}this.animationState.transition("updateData")}isColorScaleValid(){const{colorKey:e}=this.properties;if(!e)return!1;const{dataModel:t,processedData:i}=this;if(!t||!i)return!1;const o=t.resolveProcessedDataIndexById(this,"colorValue"),r=i.input.count,s=getMissCount3(this,i.defs.values[o].missing);return!(r===0||r===s)}getLabelDatum(e,t,i){if(t==null)return;const{idKey:o,idName:r,latitudeKey:s,latitudeName:a,longitudeKey:n,longitudeName:l,sizeKey:c,sizeName:h,colorKey:u,colorName:d,labelKey:p,labelName:g,label:y,shape:x}=this.properties;if(p==null||!y.enabled)return;const{datum:f,datumIndex:S,index:m,idValue:v,lonValue:b,latValue:D,point:k}=e,{placement:A}=y,M=this.getLabelText(t,f,p,"label",[],y,{value:t,datum:f,idKey:o,idName:r,latitudeKey:s,latitudeName:a,longitudeKey:n,longitudeName:l,sizeKey:c,sizeName:h,colorKey:u,colorName:d,labelKey:p,labelName:g});if(M==null)return;const{width:I,height:_}=i.measureLines(String(M)),P=Marker4.anchor(x);return{point:{x:k.x,y:k.y,size:k.size},label:{width:I,height:_,text:M},anchor:P,placement:A,datumIndex:S,datumId:createDatumId13(m,v,b,D)}}resolveColumn(e,t,i){if(!(e==null||this.dataModel==null))return this.dataModel.resolveColumnById(this,t,i)}resolveDataColumns(e){const{idKey:t,latitudeKey:i,longitudeKey:o,sizeKey:r,colorKey:s,labelKey:a}=this.properties,n=i!=null&&o!=null;return{idValues:this.resolveColumn(t,"idValue",e),featureValues:this.resolveColumn(t,"featureValue",e),latValues:n?this.resolveColumn(i,"latValue",e):void 0,lonValues:n?this.resolveColumn(o,"lonValue",e):void 0,labelValues:this.resolveColumn(a,"labelValue",e),sizeValues:this.resolveColumn(r,"sizeValue",e),colorValues:this.resolveColumn(s,"colorValue",e)}}prepareProjectedGeometries(e,t,i){if(e==null||t==null||this.scale==null)return;const o=new Map;for(const[r]of i.dataSources.get(this.id)?.data.entries()??[]){const s=e[r],a=t[r]?.geometry,n=a==null?void 0:projectGeometry(a,this.scale);s!=null&&n!=null&&o.set(s,n)}return o}calculateMarkerSize(e){return e==null?this.properties.size:this.sizeScale.convert(e,{clamp:!0})}buildNodeDatum(e,t,i,o,r){return{series:this,datum:e,datumIndex:t,index:i,...r,point:o,midPoint:{x:o.x,y:o.y},legendItemName:this.properties.legendItemName,style:this.getMarkerItemStyle({datumIndex:t,datum:e,colorValue:r.colorValue,sizeValue:r.sizeValue},!1)}}createNodeFromLatLon(e,t,i,o,r,s,a){if(this.scale==null)throw new Error("Scale is required for createNodeFromLatLon");const[n,l]=this.scale.convert([i,o]),c={x:n,y:l,size:s},h=this.buildNodeDatum(e,t,-1,c,r),u=this.getLabelDatum(h,r.labelValue,a)??void 0;return{node:h,label:u}}createNodesFromGeometry(e,t,i,o,r,s){const a=[],n=[];for(const[l,[c,h]]of markerPositions(i,1).entries()){const u={x:c,y:h,size:r},d=this.buildNodeDatum(e,t,l,u,o);a.push(d);const p=this.getLabelDatum(d,o.labelValue,s);p&&n.push(p)}return{nodes:a,labels:n}}warnMissingGeometries(e){if(e.length===0)return;const t=10;if(e.length>t){const i=e.length-t;e.length=t,e.push(`(+${i} more)`)}import_ag_charts_core226.Logger.warnOnce("some data items do not have matches in the provided topology",e)}buildFeatureMap(e){const t=new Map;for(const i of this.topology?.features.values()??[]){const o=i.properties?.[e];o!=null&&t.set(o,i)}return t}createNodeData(){const{id:e,dataModel:t,processedData:i,sizeScale:o,properties:r,scale:s}=this,{label:a}=r;if(t==null||i==null||s==null)return;if(!this.visible)return{itemId:e,nodeData:[],labelData:[]};const n=this.resolveDataColumns(i),l=r.maxSize??r.size;o.range=[Math.min(r.size,l),l];const c=(0,import_ag_charts_core226.cachedTextMeasurer)(a),h=this.prepareProjectedGeometries(n.idValues,n.featureValues,i),u=[],d=[],p=[],g=i.dataSources.get(this.id)?.data??[];for(const[y,x]of g.entries()){const f={idValue:n.idValues?.[y],lonValue:n.lonValues?.[y],latValue:n.latValues?.[y],colorValue:n.colorValues?.[y],sizeValue:n.sizeValues?.[y],labelValue:n.labelValues?.[y]},S=this.calculateMarkerSize(f.sizeValue),m=f.idValue==null?void 0:h?.get(f.idValue);if(f.idValue!=null&&h!=null&&m==null&&p.push(f.idValue),f.lonValue!=null&&f.latValue!=null){const v=this.createNodeFromLatLon(x,y,f.lonValue,f.latValue,f,S,c);u.push(v.node),v.label&&d.push(v.label)}else if(m!=null){const v=this.createNodesFromGeometry(x,y,m,f,S,c);u.push(...v.nodes),d.push(...v.labels)}}return this.warnMissingGeometries(p),{itemId:e,nodeData:u,labelData:d}}updateSelections(){this.nodeDataRefresh&&(this.contextNodeData=this.createNodeData(),this.nodeDataRefresh=!1)}checkScaleChange(){return this.previousScale===this.scale?!1:(this.previousScale=this.scale,!0)}update({seriesRect:e}){const t=this.checkResize(e),i=this.checkScaleChange(),{markerSelection:o,highlightMarkerSelection:r}=this,s=this.ctx.chartService.highlight?.drawingMode??"overlay";this.updateSelections(),this.contentGroup.visible=this.visible,this.labelGroup.visible=this.visible;const a=this.getHighlightedDatum(),n=this.contextNodeData?.nodeData??[];this.markerSelection=this.updateMarkerSelection({markerData:n,markerSelection:o}),this.updateMarkerNodes({markerSelection:o,isHighlight:!1,highlightedDatum:a,drawingMode:"overlay"}),this.highlightMarkerSelection=this.updateMarkerSelection({markerData:a==null?[]:[a],markerSelection:r}),this.updateMarkerNodes({markerSelection:r,isHighlight:!0,highlightedDatum:a,drawingMode:s}),this.updateLabelNodes({labelSelection:this.labelSelection,isHighlight:!1}),this.updateHighlightLabelSelection(a),(i||t)&&this.animationState.transition("resize"),this.animationState.transition("update")}updatePlacedLabelData(e){this.placedLabelData=e,this.labelSelection=this.labelSelection.update(e,t=>{t.pointerEvents=import_ag_charts_community203._ModuleSupport.PointerEvents.None}),this.updateLabelNodes({labelSelection:this.labelSelection,isHighlight:!1}),this.updateHighlightLabelSelection()}updateLabelNodes({isHighlight:e,labelSelection:t}){const{properties:i}=this,o=this.ctx.highlightManager?.getActiveHighlight();t.each((r,s)=>{const{x:a,y:n,width:l,height:c,text:h,datum:u}=s,d=getLabelStyles3(this,void 0,i,i.label,e,o),{color:p,fontStyle:g,fontWeight:y,fontSize:x,fontFamily:f}=d;r.visible=!0,r.x=a+l/2,r.y=n+c/2,r.text=h,r.fill=p,r.fontStyle=g,r.fontWeight=y,r.fontSize=x,r.fontFamily=f,r.textAlign="center",r.textBaseline="middle";const S=u?.datumIndex;r.fillOpacity=this.getHighlightStyle(e,S).opacity??1,r.setBoxing(d)})}getHighlightedLabelId(e=this.getHighlightedDatum()){if(e!=null)return createDatumId13(e.index,e.idValue,e.lonValue,e.latValue)}updateHighlightLabelSelection(e=this.getHighlightedDatum()){const t=this.getHighlightedLabelId(e),i=t==null||!this.isLabelEnabled()?[]:this.placedLabelData.filter(o=>o.datum.datumId===t);if(this.highlightLabelSelection=this.highlightLabelSelection.update(i),i.length===0){this.highlightLabelSelection.cleanup(),this.highlightLabelGroup.visible=!1;return}this.highlightLabelGroup.visible=!0,this.updateLabelNodes({labelSelection:this.highlightLabelSelection,isHighlight:!0})}updateMarkerSelection(e){const{markerData:t,markerSelection:i}=e;return i.update(t,void 0,o=>createDatumId13(o.index,o.idValue,o.lonValue,o.latValue))}getMarkerItemStyle({datumIndex:e,datum:t,colorValue:i,sizeValue:o},r){const{properties:s,colorScale:a,sizeScale:n}=this,{colorRange:l,itemStyler:c}=s,h=this.getHighlightStyle(r,e),u=(0,import_ag_charts_core226.mergeDefaults)(h,s.getStyle());!r&&i!=null&&(u.fill=this.isColorScaleValid()?a.convert(i):l?.[0]??u.fill),o!=null&&(u.size=n.convert(o,{clamp:!0}));let d=u;if(c!=null&&e!=null){const p=this.cachedDatumCallback(createDatumId13(e,r?"highlight":"node"),()=>{const g=this.makeItemStylerParams(t,e,r,d);return this.callWithContext(c,g)});p&&(d=(0,import_ag_charts_core226.mergeDefaults)(p,u))}return d}makeItemStylerParams(e,t,i,o){const{id:r}=this,s=this.ctx.highlightManager?.getActiveHighlight(),a=this.getHighlightStateString(s,i,t),n=this.filterItemStylerFillParams(o.fill)??o.fill;return{seriesId:r,datum:e,highlightState:a,...o,fill:n}}updateMarkerNodes(e){const{markerSelection:t,isHighlight:i,highlightedDatum:o,drawingMode:r}=e,s=getTopologyShapeFillBBox(this.scale);t.each((a,n)=>{const{datum:l,point:c}=n,h=this.getMarkerItemStyle(n,i);a.shape=h.shape,a.size=h.size,a.setStyleProperties(h,s),a.x=c.x,a.y=c.y,a.scalingCenterX=c.x,a.scalingCenterY=c.y,a.zIndex=!i&&o!=null&&l===o.datum?1:0,a.drawingMode=r})}isProcessedDataAnimatable(){return!0}resetAnimation(e){e==="initial"?this.animationState.transition("reset"):e==="ready"&&this.animationState.transition("skip")}resetAllAnimation(){this.ctx.animationManager.stopByAnimationGroupId(this.id),this.ctx.animationManager.skipCurrentBatch(),this.labelSelection.cleanup(),this.markerSelection.cleanup(),this.highlightMarkerSelection.cleanup(),this.highlightLabelSelection.cleanup(),this.highlightLabelGroup.visible=!1,this.placedLabelData=[]}animateMarkers(){const{animationManager:e}=this.ctx,t=prepareMapMarkerAnimationFunctions();fromToMotion3(this.id,"markers",e,[this.markerSelection,this.highlightMarkerSelection],t)}getLabelData(){return this.isLabelEnabled()?this.contextNodeData?.labelData??[]:[]}pickNodeClosestDatum(e){const{x:t,y:i}=e;let o=1/0,r;for(const s of this.contextNodeData?.nodeData??[]){const{x:a,y:n,size:l}=s.point,c=Math.max(Math.abs(a-t)-l,0),h=Math.max(Math.abs(n-i)-l,0),u=c*c+h*h;u<o&&(o=u,r=s)}return r==null?void 0:{datum:r,distance:Math.sqrt(o)}}legendItemSymbol(e){const{dataModel:t,processedData:i,properties:o}=this,{shape:r,fillOpacity:s,stroke:a,strokeWidth:n,strokeOpacity:l,lineDash:c,lineDashOffset:h}=o;let{fill:u}=o;if(e!=null&&this.isColorScaleValid()){const p=t.resolveColumnById(this,"colorValue",i)[e];u=this.colorScale.convert(p)}return{marker:{shape:r,fill:u,fillOpacity:s,stroke:a,strokeWidth:n,strokeOpacity:l,lineDash:c,lineDashOffset:h}}}getLegendData(e){const{processedData:t,dataModel:i}=this;if(t==null||i==null)return[];const{id:o,visible:r}=this,{title:s,legendItemName:a,idName:n,idKey:l,colorKey:c,colorRange:h,showInLegend:u}=this.properties;if(e==="gradient"&&c!=null&&h!=null){const d=t.domain.values[i.resolveProcessedDataIndexById(this,"colorValue")];return[{legendType:"gradient",enabled:r,seriesId:o,series:this.getFormatterContext("color"),colorRange:h,colorDomain:d}]}else return e==="category"?[{legendType:"category",id:o,itemId:o,seriesId:o,enabled:r,label:{text:a??s??n??l??o},symbol:this.legendItemSymbol(),legendItemName:a,hideInLegend:!u}]:[]}getTooltipContent(e){const{id:t,dataModel:i,processedData:o,properties:r,ctx:{formatManager:s}}=this,{idKey:a,idName:n,latitudeKey:l,latitudeName:c,longitudeKey:h,longitudeName:u,colorKey:d,colorName:p,sizeKey:g,sizeName:y,labelKey:x,labelName:f,title:S,legendItemName:m,tooltip:v}=r;if(!i||!o)return;const b=o.dataSources.get(this.id)?.data[e],D=g==null?void 0:i.resolveColumnById(this,"sizeValue",o)[e],k=d==null?void 0:i.resolveColumnById(this,"colorValue",o)[e],A=[];if(this.isLabelEnabled()&&x!=null&&x!==a){const _=i.resolveColumnById(this,"labelValue",o)[e],P=s.format(this.callWithContext.bind(this),{type:"category",value:_,datum:b,seriesId:t,legendItemName:m,key:x,source:"tooltip",property:"label",domain:[],boundSeries:this.getFormatterContext("label")});A.push({label:f,fallbackLabel:x,value:P??_})}if(g!=null&&D!=null){const _=i.getDomain(this,"sizeValue","value",o).domain,P=s.format(this.callWithContext.bind(this),{type:"number",value:D,datum:b,seriesId:t,legendItemName:m,key:g,source:"tooltip",property:"size",domain:_,boundSeries:this.getFormatterContext("size"),fractionDigits:void 0,visibleDomain:void 0});A.push({label:y,fallbackLabel:g,value:P??String(D)})}if(d!=null&&k!=null){const _=i.getDomain(this,"colorValue","value",o).domain,P=s.format(this.callWithContext.bind(this),{type:"number",value:k,datum:b,seriesId:t,legendItemName:m,key:d,source:"tooltip",property:"color",domain:_,boundSeries:this.getFormatterContext("color"),fractionDigits:void 0,visibleDomain:void 0});A.push({label:p,fallbackLabel:d,value:P??String(k)})}let M;if(a!=null)M=i.resolveColumnById(this,"idValue",o)[e];else if(l!=null&&h!=null){const _=i.resolveColumnById(this,"latValue",o)[e],P=i.resolveColumnById(this,"lonValue",o)[e];M=`${Math.abs(_).toFixed(4)}\xB0 ${_>=0?"N":"S"}, ${Math.abs(P).toFixed(4)}\xB0 ${P>=0?"W":"E"}`}const I=this.getMarkerItemStyle({datumIndex:e,datum:b,colorValue:k,sizeValue:D},!1);return this.formatTooltipWithContext(v,{heading:M,title:S??m,symbol:this.legendItemSymbol(e),data:A},{seriesId:t,datum:b,title:S,idKey:a,idName:n,latitudeKey:l,latitudeName:c,longitudeKey:h,longitudeName:u,colorKey:d,colorName:p,sizeKey:g,sizeName:y,labelKey:x,labelName:f,...I})}getFormattedMarkerStyle(e){const t=this.getMarkerItemStyle(e,!1);return{size:t.size,shape:t.shape}}computeFocusBounds(e){return computeMarkerFocusBounds2(this,e)}hasItemStylers(){return this.properties.itemStyler!=null||this.properties.label.itemStyler!=null}};MapMarkerSeries.className="MapMarkerSeries",MapMarkerSeries.type="map-marker";var import_ag_charts_community204=require("ag-charts-community"),import_ag_charts_core227=require("ag-charts-core"),{mapMarkerSeriesThemeableOptionsDef}=import_ag_charts_community204._ModuleSupport,mapMarkerSeriesOptionsDef={...(0,import_ag_charts_core227.without)(import_ag_charts_core227.commonSeriesOptionsDefs,["highlightStyle","highlight"]),...mapMarkerSeriesThemeableOptionsDef,type:(0,import_ag_charts_core227.required)((0,import_ag_charts_core227.constant)("map-marker")),idKey:import_ag_charts_core227.string,latitudeKey:import_ag_charts_core227.string,longitudeKey:import_ag_charts_core227.string,sizeKey:import_ag_charts_core227.string,colorKey:import_ag_charts_core227.string,labelKey:import_ag_charts_core227.string,idName:import_ag_charts_core227.string,latitudeName:import_ag_charts_core227.string,longitudeName:import_ag_charts_core227.string,sizeName:import_ag_charts_core227.string,colorName:import_ag_charts_core227.string,labelName:import_ag_charts_core227.string,topology:import_ag_charts_core227.geoJson,topologyIdKey:import_ag_charts_core227.string,legendItemName:import_ag_charts_core227.string,title:import_ag_charts_core227.string},MapMarkerSeriesModule={type:"series",name:"map-marker",chartType:"topology",enterprise:!0,version:import_ag_charts_community205.VERSION,dependencies:[TopologyChartModule],options:mapMarkerSeriesOptionsDef,themeTemplate:{...MAP_THEME_DEFAULTS,series:{shape:"circle",maxSize:30,fill:applyMapPalette({$applySwitch:[{$path:"type"},{$mapPalette:"fill"},["gradient",import_ag_charts_core228.FILL_GRADIENT_RADIAL_REVERSED_DEFAULTS],["image",import_ag_charts_core228.FILL_IMAGE_DEFAULTS],["pattern",import_ag_charts_core228.FILL_PATTERN_DEFAULTS]]}),stroke:{$mapPalette:"stroke"},colorRange:{$if:[{$eq:[{$mapPalette:"type"},"inbuilt"]},{$mapPalette:"divergingColors"},applyMapPalette(import_ag_charts_core228.SAFE_RANGE2_OPERATION)]},fillOpacity:.5,label:{...import_ag_charts_core228.LABEL_BOXING_DEFAULTS,enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}},highlight:applyMapPalette(import_ag_charts_core228.MULTI_SERIES_HIGHLIGHT_STYLE)},tooltip:{range:"exact"}},create:e=>new MapMarkerSeries(e),validate(e,t,i){const o=(0,import_ag_charts_core228.validate)(e,t,i),{cleared:r,invalid:s}=o;if(r?.idKey==null&&(r?.latitudeKey==null||r?.longitudeKey==null)){const a=l=>i?`${i}.${l}`:l,n=`Either \`${a("idKey")}\` or both \`${a("latitudeKey")}\` and \`${a("longitudeKey")}\` are required.`;s.push(new import_ag_charts_core228.ValidationError("required",n,null,i))}return o}},import_ag_charts_community209=require("ag-charts-community"),import_ag_charts_core232=require("ag-charts-core"),import_ag_charts_community207=require("ag-charts-community"),import_ag_charts_core230=require("ag-charts-core");function preferredLabelCenter(e,{aspectRatio:t,precision:i}){const o=polygonPointSearch(e,i,(l,c,h,u)=>{const d=maxWidthOfRectConstrainedByCenterAndAspectRatioToPolygon(l,c,h,t),p=d+2*u*t,g=d*Math.SQRT2,y=p*Math.SQRT2;return{distance:g,maxDistance:y}});if(o==null)return;const{x:r,y:s,distance:a}=o,n=a/Math.SQRT2;return{x:r,y:s,maxWidth:n}}function maxWidthOfRectConstrainedByCenterAndAspectRatioToLineSegment(e,t,i,o,r){const[s,a]=e,[n,l]=t,c=1/r,h=n-s,u=l-a,[d,p]=a<=l?e:t,[g,y]=s<=n?e:t,[x,f]=a<=l?t:e,[S,m]=s<=n?t:e;let v=1/0;if(h===0)for(let I=0;I<=1;I+=1){const P=(I===0?c:-c)*(s-i)+o;if(P>=p&&P<=f){const C=Math.abs(o-P)*2*r;v=Math.min(v,C)}}else{const I=u/h;for(let _=0;_<=1;_+=1){const P=_===0?c:-c,O=(I*s-a-P*i+o)/(I-P);if(O>=g&&O<=S){const C=Math.abs(i-O)*2;v=Math.min(v,C)}}}const b=r,D=Math.abs((d-i)/(p-o)),k=Math.abs((x-i)/(f-o));if(f<o&&k<b){const _=Math.abs(o-f)*2*r;v=Math.min(v,_)}else if(p>o&&D<b){const _=Math.abs(o-p)*2*r;v=Math.min(v,_)}const A=Math.abs((y-o)/(g-i)),M=Math.abs((m-o)/(S-i));if(S<i&&M<c){const I=Math.abs(i-S)*2;v=Math.min(v,I)}else if(g>i&&A<c){const I=Math.abs(i-g)*2;v=Math.min(v,I)}return v}function maxWidthOfRectConstrainedByCenterAndAspectRatioToPolygon(e,t,i,o){let r=!1,s=1/0;for(const a of e){let n=a.at(-1),[l,c]=n;for(const h of a){const[u,d]=h;d>i!=c>i&&t<(l-u)*(i-d)/(c-d)+u&&(r=!r);const p=maxWidthOfRectConstrainedByCenterAndAspectRatioToLineSegment(n,h,t,i,o);s=Math.min(s,p),n=h,l=u,c=d}}return(r?1:-1)*s}function applyX(e,t,i){i>=t&&(e.maxX=Math.min(e.maxX,i-t)),i<=t&&(e.minX=Math.max(e.minX,i-t))}function xExtentsOfRectConstrainedByCenterAndHeightToLineSegment(e,t,i,o,r,s){const a=r-s/2,n=r+s/2,[l,c]=t,[h,u]=i,d=h-l,p=u-c,[g,y]=l<=h?t:i,[x,f]=l<=h?i:t;if(d!==0){const S=p/d;for(let m=0;m<=1;m+=1){const b=((m===0?a:n)-c)/S+l;b>=g&&b<=x&&applyX(e,o,b)}}else Math.max(a,Math.min(c,u))<=Math.min(n,Math.max(c,u))&&applyX(e,o,l);return x<o&&f>=a&&f<=n?applyX(e,o,x):g>o&&y>=a&&y<=n&&applyX(e,o,g),e}function maxWidthInPolygonForRectOfHeight(e,t,i,o){const r={minX:-1/0,maxX:1/0};for(const n of e){let l=n.at(-1);for(const c of n)xExtentsOfRectConstrainedByCenterAndHeightToLineSegment(r,l,c,t,i,o),l=c}const{minX:s,maxX:a}=r;return Number.isFinite(s)&&Number.isFinite(a)?{x:t+(s+a)/2,width:a-s}:{x:t,width:0}}var import_ag_charts_community206=require("ag-charts-community"),import_ag_charts_core229=require("ag-charts-core"),{SeriesProperties:SeriesProperties6,makeSeriesTooltip:makeSeriesTooltip15}=import_ag_charts_community206._ModuleSupport,MapShapeSeriesProperties=class extends SeriesProperties6{constructor(){super(...arguments),this.topology=void 0,this.idKey="",this.idName=void 0,this.topologyIdKey="name",this.labelKey=void 0,this.labelName=void 0,this.colorRange=void 0,this.fill="black",this.fillOpacity=1,this.stroke="black",this.strokeOpacity=1,this.strokeWidth=0,this.lineDash=[0],this.lineDashOffset=0,this.padding=0,this.label=new AutoSizedSecondaryLabel,this.tooltip=makeSeriesTooltip15()}getStyle(){const{fill:e,fillOpacity:t,stroke:i,strokeWidth:o,strokeOpacity:r,lineDash:s,lineDashOffset:a}=this;return{fill:e,fillOpacity:t,stroke:i,strokeWidth:o,strokeOpacity:r,lineDash:s,lineDashOffset:a,opacity:1}}};__decorateClass([import_ag_charts_core229.Property],MapShapeSeriesProperties.prototype,"topology",2),__decorateClass([import_ag_charts_core229.Property],MapShapeSeriesProperties.prototype,"title",2),__decorateClass([import_ag_charts_core229.Property],MapShapeSeriesProperties.prototype,"legendItemName",2),__decorateClass([import_ag_charts_core229.Property],MapShapeSeriesProperties.prototype,"idKey",2),__decorateClass([import_ag_charts_core229.Property],MapShapeSeriesProperties.prototype,"idName",2),__decorateClass([import_ag_charts_core229.Property],MapShapeSeriesProperties.prototype,"topologyIdKey",2),__decorateClass([import_ag_charts_core229.Property],MapShapeSeriesProperties.prototype,"labelKey",2),__decorateClass([import_ag_charts_core229.Property],MapShapeSeriesProperties.prototype,"labelName",2),__decorateClass([import_ag_charts_core229.Property],MapShapeSeriesProperties.prototype,"colorKey",2),__decorateClass([import_ag_charts_core229.Property],MapShapeSeriesProperties.prototype,"colorName",2),__decorateClass([import_ag_charts_core229.Property],MapShapeSeriesProperties.prototype,"colorRange",2),__decorateClass([import_ag_charts_core229.Property],MapShapeSeriesProperties.prototype,"fill",2),__decorateClass([import_ag_charts_core229.Property],MapShapeSeriesProperties.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core229.Property],MapShapeSeriesProperties.prototype,"stroke",2),__decorateClass([import_ag_charts_core229.Property],MapShapeSeriesProperties.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core229.Property],MapShapeSeriesProperties.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core229.Property],MapShapeSeriesProperties.prototype,"lineDash",2),__decorateClass([import_ag_charts_core229.Property],MapShapeSeriesProperties.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core229.Property],MapShapeSeriesProperties.prototype,"padding",2),__decorateClass([import_ag_charts_core229.Property],MapShapeSeriesProperties.prototype,"itemStyler",2),__decorateClass([import_ag_charts_core229.Property],MapShapeSeriesProperties.prototype,"label",2),__decorateClass([import_ag_charts_core229.Property],MapShapeSeriesProperties.prototype,"tooltip",2);var{getMissCount:getMissCount4,createDatumId:createDatumId14,SeriesNodePickMode:SeriesNodePickMode11,valueProperty:valueProperty13,ColorScale:ColorScale4,Group:Group15,Selection:Selection11,Text:Text6,PointerEvents:PointerEvents7,getLabelStyles:getLabelStyles4}=import_ag_charts_community207._ModuleSupport,fixedScale=import_ag_charts_community207._ModuleSupport.MercatorScale.fixedScale(),MapShapeSeries=class extends TopologySeries{constructor(e){super({moduleCtx:e,categoryKey:void 0,propertyKeys:{color:["colorKey"],label:["labelKey"]},propertyNames:{color:["colorName"],label:["labelName"]},pickModes:[SeriesNodePickMode11.EXACT_SHAPE_MATCH,SeriesNodePickMode11.NEAREST_NODE]}),this.properties=new MapShapeSeriesProperties,this._chartTopology=void 0,this.colorScale=new ColorScale4,this.itemGroup=this.contentGroup.appendChild(new Group15({name:"itemGroup"})),this.itemLabelGroup=this.contentGroup.appendChild(new Group15({name:"itemLabelGroup"})),this.datumSelection=Selection11.select(this.itemGroup,()=>this.nodeFactory()),this.labelSelection=Selection11.select(this.itemLabelGroup,Text6),this.highlightDatumSelection=Selection11.select(this.highlightNodeGroup,()=>this.nodeFactory()),this.highlightLabelSelection=Selection11.select(this.highlightLabelGroup,Text6),this.previousLabelLayouts=void 0,this._previousDatumMidPoint=void 0,this.itemLabelGroup.pointerEvents=PointerEvents7.None}getNodeData(){return this.contextNodeData?.nodeData}get topology(){return this.properties.topology??this._chartTopology}get hasData(){return super.hasData&&this.topology!=null}renderToOffscreenCanvas(){return!0}setChartTopology(e){this._chartTopology=e,this.topology===e&&(this.nodeDataRefresh=!0)}setZIndex(e){return super.setZIndex(e),this.contentGroup.zIndex=[1,e],this.highlightGroup.zIndex=[4,e],!0}isLabelEnabled(){return this.properties.labelKey!=null&&this.properties.label.enabled}nodeFactory(){const e=new GeoGeometry;return e.renderMode=1,e.lineJoin="round",e}async processData(e){if(this.data==null)return;const{data:t,topology:i,colorScale:o}=this,{topologyIdKey:r,idKey:s,colorKey:a,labelKey:n,colorRange:l}=this.properties,c=new Map;for(const y of i?.features.values()??[]){const x=y.properties?.[r];x==null||!containsType(y.geometry,1)||c.set(x,y)}const h=this.colorScale.type,u=this.scale?.type,{dataModel:d,processedData:p}=await this.requestDataModel(e,t,{props:[valueProperty13(s,u,{id:"idValue",includeProperty:!1}),valueProperty13(s,u,{id:"featureValue",includeProperty:!1,processor:()=>y=>c.get(y)}),...n?[valueProperty13(n,"category",{id:"labelValue"})]:[],...a?[valueProperty13(a,h,{id:"colorValue"})]:[]]}),g=d.resolveColumnById(this,"featureValue",p);if(this.topologyBounds=g.reduce((y,x)=>{const f=x?.geometry;return f==null?y:geometryBbox(f,y)},void 0),l!=null&&this.isColorScaleValid()){const y=d.resolveProcessedDataIndexById(this,"colorValue");o.domain=p.domain.values[y],o.range=l,o.update()}i==null&&import_ag_charts_core230.Logger.warnOnce("no topology was provided for [MapShapeSeries]; nothing will be rendered.")}isColorScaleValid(){const{colorKey:e}=this.properties;if(!e)return!1;const{dataModel:t,processedData:i}=this;if(!t||!i)return!1;const o=t.resolveProcessedDataIndexById(this,"colorValue"),r=i.input.count,s=getMissCount4(this,i.defs.values[o].missing);return!(r===0||r===s)}getLabelLayout(e,t,i,o,r){if(t==null||o==null)return;const{idKey:s,idName:a,colorKey:n,colorName:l,labelKey:c,labelName:h,padding:u,label:d}=this.properties;if(c==null||!d.enabled)return;const p=this.getLabelText(t,e,c,"label",[],d,{value:t,datum:e,idKey:s,idName:a,colorKey:n,colorName:l,labelKey:c,labelName:h});if(p==null)return;const g=(0,import_ag_charts_core230.isArray)(p)?(0,import_ag_charts_core230.measureTextSegments)(p,d):i.measureLines(String(p)),y=(g.width+2*u)/(g.height+2*u);if(r?.geometry===o&&r?.labelText===p&&r?.aspectRatio===y)return r;const x=projectGeometry(o,fixedScale),f=largestPolygon(x);if(f==null)return;const S=preferredLabelCenter(f,{aspectRatio:y,precision:.001});if(S==null)return;const{x:m,y:v,maxWidth:b}=S;return{geometry:o,labelText:p,aspectRatio:y,x:m,y:v,maxWidth:b,fixedPolygon:f}}getLabelDatum(e,t,i,o){const{scale:r}=this;if(r==null)return;const{padding:s,label:a}=this.properties,{labelText:n,aspectRatio:l,x:c,y:h,maxWidth:u,fixedPolygon:d}=e,p={width:Math.ceil(u*t),height:Math.ceil(u*t/l),meta:c},g=formatSingleLabel((0,import_ag_charts_core230.toPlainText)(n),a,{padding:s},(D,k)=>{if(!k)return p;const A=maxWidthInPolygonForRectOfHeight(d,c,h,D/t);return{width:A.width*t,height:D,meta:A.x}});if(g==null)return;const[{text:y,fontSize:x,lineHeight:f,width:S},m]=g,v=S<p.width?c:m,b=this.scale.convert(fixedScale.invert([v,h]));return{x:b[0],y:b[1],text:y,fontSize:x,lineHeight:f,datumIndex:i,idValue:o,datumId:createDatumId14(o)}}resolveColumn(e,t,i){if(!(e==null||this.dataModel==null))return this.dataModel.resolveColumnById(this,t,i)}resolveShapeDataColumns(e){const{colorKey:t,labelKey:i}=this.properties;return{idValues:this.dataModel.resolveColumnById(this,"idValue",e),featureValues:this.dataModel.resolveColumnById(this,"featureValue",e),labelValues:this.resolveColumn(i,"labelValue",e),colorValues:this.resolveColumn(t,"colorValue",e)}}warnMissingGeometries(e){if(e.length===0)return;const t=10;if(e.length>t){const i=e.length-t;e.length=t,e.push(`(+${i} more)`)}import_ag_charts_core230.Logger.warnOnce("some data items do not have matches in the provided topology",e)}createNodeData(){const{id:e,dataModel:t,processedData:i,properties:o,scale:r,previousLabelLayouts:s}=this,{label:a,legendItemName:n,colorKey:l}=o;if(t==null||i==null)return;if(!this.visible)return{itemId:e,nodeData:[],labelData:[]};const c=r==null?Number.NaN:(r.range[1][0]-r.range[0][0])/r.bounds.width,h=this.resolveShapeDataColumns(i),u=(0,import_ag_charts_core230.cachedTextMeasurer)(a),d=new Map;this.previousLabelLayouts=d;const p=[],g=[],y=[],x=i.dataSources.get(this.id)?.data??[];for(const[f,S]of x.entries()){const m={idValue:h.idValues[f],colorValue:h.colorValues?.[f],labelValue:h.labelValues?.[f]},v=h.featureValues[f]?.geometry??void 0;if(v==null&&y.push(m.idValue),l!=null&&m.colorValue==null)continue;const b=this.getLabelLayout(S,m.labelValue,u,v,s?.get(m.idValue));b!=null&&d.set(m.idValue,b);const D=b!=null&&r!=null?this.getLabelDatum(b,c,f,m.idValue):void 0;D!=null&&g.push(D);const k=v!=null&&r!=null?projectGeometry(v,r):void 0;p.push({series:this,datum:S,datumIndex:f,...m,projectedGeometry:k,legendItemName:n,style:this.getItemStyle({datum:S,datumIndex:f,colorValue:m.colorValue},!1)})}return this.warnMissingGeometries(y),{itemId:e,nodeData:p,labelData:g}}updateSelections(){this.nodeDataRefresh&&(this.contextNodeData=this.createNodeData(),this.nodeDataRefresh=!1)}update(){const{datumSelection:e,labelSelection:t,highlightDatumSelection:i}=this;this.updateSelections(),this.contentGroup.visible=this.visible,this.labelGroup.visible=this.visible;const o=this.ctx.chartService.highlight?.drawingMode??"overlay",r=this.getHighlightedDatum(),s=this.contextNodeData?.nodeData??[],a=this.contextNodeData?.labelData??[];this.datumSelection=this.updateDatumSelection({nodeData:s,datumSelection:e}),this.updateDatumStyles({datumSelection:e,isHighlight:!1}),this.updateDatumNodes({datumSelection:e,drawingMode:"overlay"}),this.labelSelection=this.updateLabelSelection({labelData:a,labelSelection:t});const n=this.getHighlightLabelData(a,r);this.highlightLabelSelection=this.updateLabelSelection({labelData:n,labelSelection:this.highlightLabelSelection}),this.updateLabelNodes({labelSelection:this.labelSelection,isHighlight:!1}),this.updateLabelNodes({labelSelection:this.highlightLabelSelection,isHighlight:!0}),this.highlightDatumSelection=this.updateDatumSelection({nodeData:r==null?[]:[r],datumSelection:i}),this.updateDatumStyles({datumSelection:i,isHighlight:!0}),this.updateDatumNodes({datumSelection:i,drawingMode:o})}getHighlightLabelData(e,t){if(e.length===0)return[];const i=createDatumId14(t?.idValue);return e.filter(o=>o.datumId===i&&o.datumIndex===t?.datumIndex)}updateDatumSelection(e){return e.datumSelection.update(e.nodeData,void 0,t=>createDatumId14(t.idValue))}getItemStyle({datumIndex:e,datum:t,colorValue:i},o){const{properties:r,colorScale:s}=this,{colorRange:a,itemStyler:n}=r,l=r.getStyle();if(i!=null){const u=this.isColorScaleValid()?s.convert(i):a?.[0];u!=null&&(l.fill=u)}const c=this.getHighlightStyle(o,e);let h=(0,import_ag_charts_core230.mergeDefaults)(c,l);if(n!=null&&e!=null){const u=this.cachedDatumCallback(createDatumId14(e,o?"highlight":"node"),()=>{const d=this.makeItemStylerParams(t,e,o,h);return this.ctx.optionsGraphService.resolvePartial(["series",`${this.declarationOrder}`],this.callWithContext(n,d))});u&&(h=(0,import_ag_charts_core230.mergeDefaults)(u,h))}return h}makeItemStylerParams(e,t,i,o){const{id:r}=this,s=this.ctx.highlightManager?.getActiveHighlight(),a=this.getHighlightStateString(s,i,t),n=this.filterItemStylerFillParams(o.fill)??o.fill;return{seriesId:r,datum:e,highlightState:a,...o,fill:n}}updateDatumStyles({datumSelection:e,isHighlight:t}){e.each((i,o)=>{o.style=this.getItemStyle(o,t)})}updateDatumNodes({datumSelection:e,drawingMode:t}){const i=getTopologyShapeFillBBox(this.scale);e.each((o,r)=>{const{projectedGeometry:s}=r;if(s==null){o.visible=!1,o.projectedGeometry=void 0;return}o.visible=!0,o.projectedGeometry=s,o.setStyleProperties(r.style,i),o.drawingMode=t})}updateLabelSelection(e){const t=this.isLabelEnabled()?e.labelData:[];return e.labelSelection.update(t)}updateLabelNodes({isHighlight:e,labelSelection:t}){const{properties:i}=this,o=this.ctx.highlightManager?.getActiveHighlight();t.each((r,s)=>{const{x:a,y:n,text:l,fontSize:c,lineHeight:h,datumIndex:u}=s,d=getLabelStyles4(this,void 0,i,i.label,e,o),{color:p,fontStyle:g,fontWeight:y,fontFamily:x}=d;r.visible=!0,r.x=a,r.y=n,r.text=l,r.fill=p,r.fontStyle=g,r.fontWeight=y,r.fontSize=c,r.lineHeight=h,r.fontFamily=x,r.textAlign="center",r.textBaseline="middle",r.fillOpacity=this.getHighlightStyle(e,u).opacity??1,r.setBoxing(d)})}resetAnimation(){}pickNodeClosestDatum({x:e,y:t}){let i=1/0,o;return this.datumSelection.each((r,s)=>{const a=r.distanceSquared(e,t);a<i&&(i=a,o=s)}),o==null?void 0:{datum:o,distance:Math.sqrt(i)}}datumMidPoint(e){const{_previousDatumMidPoint:t}=this;if(t?.datum===e)return t.point;const i=e.projectedGeometry,o=i==null?void 0:largestPolygon(i),r=o==null?void 0:polygonMarkerCenter(o,2),s=r==null?void 0:{x:r[0],y:r[1]};return this._previousDatumMidPoint={datum:e,point:s},s}legendItemSymbol(e){const{dataModel:t,processedData:i,properties:o}=this,{fillOpacity:r,stroke:s,strokeWidth:a,strokeOpacity:n,lineDash:l,lineDashOffset:c}=o;let{fill:h}=o;if(e!=null&&this.isColorScaleValid()){const d=t.resolveColumnById(this,"colorValue",i)[e];d!=null&&(h=this.colorScale.convert(d))}return{marker:{fill:h,fillOpacity:r,stroke:s,strokeWidth:a,strokeOpacity:n,lineDash:l,lineDashOffset:c}}}getLegendData(e){const{processedData:t,dataModel:i}=this;if(t==null||i==null)return[];const{id:o,visible:r}=this,{title:s,legendItemName:a,idKey:n,idName:l,colorKey:c,colorRange:h,showInLegend:u}=this.properties;if(e==="gradient"&&c!=null&&h!=null){const d=t.domain.values[i.resolveProcessedDataIndexById(this,"colorValue")];return[{legendType:"gradient",enabled:r,seriesId:o,series:this.getFormatterContext("color"),colorRange:h,colorDomain:d}]}else return e==="category"?[{legendType:"category",id:o,itemId:o,seriesId:o,enabled:r,label:{text:a??s??l??n},symbol:this.legendItemSymbol(),legendItemName:a,hideInLegend:!u}]:[]}getTooltipContent(e){const{id:t,dataModel:i,processedData:o,properties:r,ctx:{formatManager:s}}=this,{idKey:a,idName:n,colorKey:l,colorName:c,labelKey:h,labelName:u,legendItemName:d,title:p,tooltip:g}=r;if(!i||!o)return;const y=o.dataSources.get(this.id)?.data[e],x=i.resolveColumnById(this,"idValue",o)[e],f=l==null?void 0:i.resolveColumnById(this,"colorValue",o)[e];if(l!=null&&f==null)return;const S=[];if(this.isLabelEnabled()&&h!=null&&h!==a){const v=i.resolveColumnById(this,"labelValue",o)[e],b=s.format(this.callWithContext.bind(this),{type:"category",value:v,datum:y,seriesId:t,legendItemName:d,key:h,source:"tooltip",property:"label",domain:[],boundSeries:this.getFormatterContext("label")});S.push({label:u,fallbackLabel:h,value:b??v})}if(f!=null){const v=i.getDomain(this,"colorValue","value",o).domain,b=s.format(this.callWithContext.bind(this),{type:"number",value:f,datum:y,seriesId:t,legendItemName:d,key:l,source:"tooltip",property:"color",domain:v,boundSeries:this.getFormatterContext("color"),fractionDigits:void 0,visibleDomain:void 0});S.push({label:c,fallbackLabel:l,value:b??String(f)})}const m=this.getItemStyle({datum:y,datumIndex:e,colorValue:f},!1);return this.formatTooltipWithContext(g,{heading:x,title:p??d,symbol:this.legendItemSymbol(e),data:S},{seriesId:t,datum:y,title:p,idKey:a,idName:n,colorKey:l,colorName:c,labelKey:h,labelName:u,...m})}computeFocusBounds(e){return findFocusedGeoGeometry(this,e)}hasItemStylers(){return this.properties.itemStyler!=null||this.properties.label.itemStyler!=null}};MapShapeSeries.className="MapShapeSeries",MapShapeSeries.type="map-shape";var import_ag_charts_community208=require("ag-charts-community"),import_ag_charts_core231=require("ag-charts-core"),{mapShapeSeriesThemeableOptionsDef}=import_ag_charts_community208._ModuleSupport,mapShapeSeriesOptionsDef={...(0,import_ag_charts_core231.without)(import_ag_charts_core231.commonSeriesOptionsDefs,["highlightStyle","highlight"]),...mapShapeSeriesThemeableOptionsDef,type:(0,import_ag_charts_core231.required)((0,import_ag_charts_core231.constant)("map-shape")),idKey:(0,import_ag_charts_core231.required)(import_ag_charts_core231.string),colorKey:import_ag_charts_core231.string,labelKey:import_ag_charts_core231.string,idName:import_ag_charts_core231.string,colorName:import_ag_charts_core231.string,labelName:import_ag_charts_core231.string,topology:import_ag_charts_core231.geoJson,topologyIdKey:import_ag_charts_core231.string,legendItemName:import_ag_charts_core231.string,title:import_ag_charts_core231.string},MapShapeSeriesModule={type:"series",name:"map-shape",chartType:"topology",enterprise:!0,version:import_ag_charts_community209.VERSION,dependencies:[TopologyChartModule],options:mapShapeSeriesOptionsDef,themeTemplate:{...MAP_THEME_DEFAULTS,series:{fill:applyMapPalette({$applySwitch:[{$path:"type"},{$mapPalette:"fill"},["gradient",import_ag_charts_core232.FILL_GRADIENT_LINEAR_DEFAULTS],["image",import_ag_charts_core232.FILL_IMAGE_DEFAULTS],["pattern",import_ag_charts_core232.FILL_PATTERN_DEFAULTS]]}),stroke:{$ref:"chartBackgroundColor"},colorRange:{$if:[{$eq:[{$mapPalette:"type"},"inbuilt"]},{$mapPalette:"divergingColors"},applyMapPalette(import_ag_charts_core232.SAFE_RANGE2_OPERATION)]},fillOpacity:1,strokeWidth:1,lineDash:[0],lineDashOffset:0,padding:2,label:{...import_ag_charts_core232.LABEL_BOXING_DEFAULTS,enabled:!0,color:{$ref:"chartBackgroundColor"},fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:"bold",overflowStrategy:"hide"},highlight:applyMapPalette(import_ag_charts_core232.MULTI_SERIES_HIGHLIGHT_STYLE)},tooltip:{range:"exact"}},create:e=>new MapShapeSeries(e)},import_ag_charts_community213=require("ag-charts-community"),import_ag_charts_core236=require("ag-charts-core"),import_ag_charts_community211=require("ag-charts-community"),import_ag_charts_core234=require("ag-charts-core"),import_ag_charts_community210=require("ag-charts-community"),import_ag_charts_core233=require("ag-charts-core"),{SeriesProperties:SeriesProperties7,makeSeriesTooltip:makeSeriesTooltip16}=import_ag_charts_community210._ModuleSupport,MapShapeBackgroundSeriesProperties=class extends SeriesProperties7{constructor(){super(...arguments),this.topology=void 0,this.fill="black",this.fillOpacity=1,this.stroke="black",this.strokeOpacity=1,this.strokeWidth=0,this.lineDash=[0],this.lineDashOffset=0,this.tooltip=makeSeriesTooltip16()}};__decorateClass([import_ag_charts_core233.Property],MapShapeBackgroundSeriesProperties.prototype,"topology",2),__decorateClass([import_ag_charts_core233.Property],MapShapeBackgroundSeriesProperties.prototype,"fill",2),__decorateClass([import_ag_charts_core233.Property],MapShapeBackgroundSeriesProperties.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core233.Property],MapShapeBackgroundSeriesProperties.prototype,"stroke",2),__decorateClass([import_ag_charts_core233.Property],MapShapeBackgroundSeriesProperties.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core233.Property],MapShapeBackgroundSeriesProperties.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core233.Property],MapShapeBackgroundSeriesProperties.prototype,"lineDash",2),__decorateClass([import_ag_charts_core233.Property],MapShapeBackgroundSeriesProperties.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core233.Property],MapShapeBackgroundSeriesProperties.prototype,"tooltip",2);var{createDatumId:createDatumId15,Selection:Selection12,Group:Group16,PointerEvents:PointerEvents8}=import_ag_charts_community211._ModuleSupport,MapShapeBackgroundSeries=class extends TopologySeries{constructor(e){super({moduleCtx:e,categoryKey:void 0,pickModes:[]}),this.properties=new MapShapeBackgroundSeriesProperties,this._chartTopology=void 0,this.itemGroup=this.contentGroup.appendChild(new Group16({name:"itemGroup"})),this.datumSelection=Selection12.select(this.itemGroup,()=>this.nodeFactory()),this.itemGroup.pointerEvents=PointerEvents8.None}get topology(){return this.properties.topology??this._chartTopology}get focusable(){return!1}setOptionsData(){}setChartData(){}getNodeData(){}get hasData(){return!1}renderToOffscreenCanvas(){return!0}setChartTopology(e){this._chartTopology=e,this.topology===e&&(this.nodeDataRefresh=!0)}setZIndex(e){return super.setZIndex(e),this.contentGroup.zIndex=[0,e,0],this.highlightGroup.zIndex=[0,e,1],!0}nodeFactory(){const e=new GeoGeometry;return e.renderMode=1,e.lineJoin="round",e.pointerEvents=PointerEvents8.None,e}processData(){const{topology:e}=this;this.topologyBounds=e?.features.reduce((t,i)=>{const o=i.geometry;return o==null?t:geometryBbox(o,t)},void 0),e==null&&import_ag_charts_core234.Logger.warnOnce("no topology was provided for [MapShapeBackgroundSeries]; nothing will be rendered.")}createNodeData(){const{id:e,topology:t,scale:i,properties:o}=this;if(t==null)return;const{fill:r,fillOpacity:s,stroke:a,strokeWidth:n,strokeOpacity:l,lineDash:c,lineDashOffset:h}=o,u=[],d=[];for(const[p,g]of t.features.entries()){const{geometry:y}=g,x=y!=null&&i!=null?projectGeometry(y,i):void 0;x!=null&&u.push({series:this,datum:g,datumIndex:0,index:p,projectedGeometry:x,style:{fill:r,fillOpacity:s,stroke:a,strokeWidth:n,strokeOpacity:l,lineDash:c,lineDashOffset:h}})}return{itemId:e,nodeData:u,labelData:d}}updateSelections(){this.nodeDataRefresh&&(this.contextNodeData=this.createNodeData(),this.nodeDataRefresh=!1)}update(){const{datumSelection:e}=this;this.updateSelections(),this.contentGroup.visible=this.visible,this.labelGroup.visible=this.visible;const{nodeData:t=[]}=this.contextNodeData??{};this.datumSelection=this.updateDatumSelection({nodeData:t,datumSelection:e}),this.updateDatumNodes({datumSelection:e})}updateDatumSelection(e){return e.datumSelection.update(e.nodeData,void 0,t=>createDatumId15(t.index))}updateDatumNodes(e){const{datumSelection:t}=e;t.each((i,o)=>{const{projectedGeometry:r}=o;if(r==null){i.visible=!1,i.projectedGeometry=void 0;return}i.visible=!0,i.projectedGeometry=r,i.setProperties(o.style)})}resetAnimation(){}getLegendData(){return[]}getTooltipContent(e){}pickFocus(){}computeFocusBounds(e){}hasItemStylers(){return!1}};MapShapeBackgroundSeries.className="MapShapeBackgroundSeries",MapShapeBackgroundSeries.type="map-shape-background";var import_ag_charts_community212=require("ag-charts-community"),import_ag_charts_core235=require("ag-charts-core"),{mapShapeBackgroundSeriesThemeableOptionsDef}=import_ag_charts_community212._ModuleSupport,mapShapeBackgroundSeriesOptionsDef={...mapShapeBackgroundSeriesThemeableOptionsDef,...import_ag_charts_core235.commonSeriesOptionsDefs,type:(0,import_ag_charts_core235.required)((0,import_ag_charts_core235.constant)("map-shape-background")),topology:import_ag_charts_core235.geoJson},MapShapeBackgroundSeriesModule={type:"series",name:"map-shape-background",chartType:"topology",enterprise:!0,version:import_ag_charts_community213.VERSION,dependencies:[TopologyChartModule],options:mapShapeBackgroundSeriesOptionsDef,themeTemplate:{...MAP_THEME_DEFAULTS,series:{fill:applyMapPalette({$applySwitch:[{$path:"type"},{$path:["/1",{$mapPalette:"fill"},{$mapPalette:"hierarchyColors"}]},["gradient",import_ag_charts_core236.FILL_GRADIENT_LINEAR_HIERARCHY_DEFAULTS],["image",import_ag_charts_core236.FILL_IMAGE_DEFAULTS],["pattern",import_ag_charts_core236.FILL_PATTERN_HIERARCHY_DEFAULTS]]}),stroke:{$ref:"chartBackgroundColor"},strokeWidth:1}},create:e=>new MapShapeBackgroundSeries(e)},import_ag_charts_community221=require("ag-charts-community"),import_ag_charts_core243=require("ag-charts-core"),import_ag_charts_community219=require("ag-charts-community"),import_ag_charts_core240=require("ag-charts-core"),import_ag_charts_community215=require("ag-charts-community"),import_ag_charts_core238=require("ag-charts-core"),import_ag_charts_community214=require("ag-charts-community"),import_ag_charts_core237=require("ag-charts-core"),{createDatumId:createDatumId16,toHighlightString:toHighlightString4}=import_ag_charts_community214._ModuleSupport;function makeStylerParams(e,t){const{id:i}=e,{angleKey:o,cornerRadius:r,fill:s,fillOpacity:a,lineDash:n,lineDashOffset:l,radiusKey:c,stackGroup:h,stroke:u,strokeOpacity:d,strokeWidth:p}=e.properties,g=toHighlightString4(t??import_ag_charts_community214._ModuleSupport.HighlightState.None);return{angleKey:o,cornerRadius:r,fill:s,fillOpacity:a,highlightState:g,lineDash:n,lineDashOffset:l,radiusKey:c,seriesId:i,stackGroup:h,stroke:u,strokeOpacity:d,strokeWidth:p}}function getStyle(e,t,i){const{styler:o}=e.properties;let r={};if(!t&&o){const s=makeStylerParams(e,i);r=e.ctx.optionsGraphService.resolvePartial(["series",`${e.declarationOrder}`],e.cachedCallWithContext(o,s)??{},{pick:!1})??{}}return{cornerRadius:r.cornerRadius??e.properties.cornerRadius,fill:r.fill??e.properties.fill,fillOpacity:r.fillOpacity??e.properties.fillOpacity,lineDash:r.lineDash??e.properties.lineDash,lineDashOffset:r.lineDashOffset??e.properties.lineDashOffset,stroke:r.stroke??e.properties.stroke,strokeOpacity:r.strokeOpacity??e.properties.strokeOpacity,strokeWidth:r.strokeWidth??e.properties.strokeWidth,opacity:1}}function makeItemStylerParams(e,t,i,o){const{id:r,properties:s}=e,{angleKey:a,radiusKey:n}=s,l=e.ctx.highlightManager?.getActiveHighlight(),c=e.getHighlightStateString(l,i,t.datumIndex),h=e.filterItemStylerFillParams(o.fill)??o.fill;return{seriesId:r,datum:t.datum,highlightState:c,angleKey:a,radiusKey:n,...o,fill:h}}function getItemStyle(e,t,i,o){const{properties:r}=e,{itemStyler:s}=r,a=e.getHighlightStyle(i,t?.datumIndex,o);let l=(0,import_ag_charts_core237.mergeDefaults)(a,getStyle(e,t===void 0,o));if(s!=null&&t!=null){const c=e.cachedDatumCallback(createDatumId16(e.getDatumId(t),i?"highlight":"node"),()=>{const h=makeItemStylerParams(e,t,i,l);return e.callWithContext(s,h)});c&&(l=(0,import_ag_charts_core237.mergeDefaults)(c,l))}return l}var{DEFAULT_POLAR_DIRECTION_KEYS,DEFAULT_POLAR_DIRECTION_NAMES,PolarAxis,diff:diff6,fixNumericExtent:fixNumericExtent8,groupAccumulativeValueProperty:groupAccumulativeValueProperty2,keyProperty:keyProperty9,normaliseGroupTo,resetLabelFn:resetLabelFn5,seriesLabelFadeInAnimation:seriesLabelFadeInAnimation5,seriesLabelFadeOutAnimation,valueProperty:valueProperty14,animationValidation:animationValidation7,createDatumId:createDatumId17,SeriesNodePickMode:SeriesNodePickMode12,CategoryScale:CategoryScale3,motion:motion6,updateLabelNode:updateLabelNode6,getItemStyles:getItemStyles3}=import_ag_charts_community215._ModuleSupport,RadialColumnSeriesNodeEvent=class extends import_ag_charts_community215._ModuleSupport.SeriesNodeEvent{constructor(e,t,i,o){super(e,t,i,o),this.angleKey=o.properties.angleKey,this.radiusKey=o.properties.radiusKey}},RadialColumnSeriesBase=class extends import_ag_charts_community215._ModuleSupport.PolarSeries{constructor(e,{animationResetFns:t}){super({moduleCtx:e,categoryKey:"angleValue",propertyKeys:DEFAULT_POLAR_DIRECTION_KEYS,propertyNames:DEFAULT_POLAR_DIRECTION_NAMES,canHaveAxes:!0,pickModes:[SeriesNodePickMode12.NEAREST_NODE,SeriesNodePickMode12.EXACT_SHAPE_MATCH],animationResetFns:{...t,label:resetLabelFn5}}),this.NodeEvent=RadialColumnSeriesNodeEvent,this.groupScale=new CategoryScale3,this.circleCache={r:0,cx:0,cy:0}}getSeriesDomain(e){const{dataModel:t,processedData:i}=this;if(!i||!t)return{domain:[]};if(e===import_ag_charts_core238.ChartAxisDirection.Angle)return t.getDomain(this,"angleValue","key",i);{const o=t.getDomain(this,"radiusValue-end","value",i).domain,r=Number.isFinite(o[1]-o[0])?[Math.min(o[0],0),Math.max(o[1],0)]:[];return{domain:fixNumericExtent8(r)}}}async processData(e){const{angleKey:t,radiusKey:i,normalizedTo:o}=this.properties,r=!this.ctx.animationManager.isSkipped(),s=this.getStackId(),a=`${s}-trailing`,n=[];(0,import_ag_charts_core238.isDefined)(o)&&n.push(normaliseGroupTo([s,a],Math.abs(o))),this.needsDataModelDiff()&&this.processedData&&n.push(diff6(this.id,this.processedData)),r&&n.push(animationValidation7());const l=this.visible?{}:{forceValue:0},c=this.axes[import_ag_charts_core238.ChartAxisDirection.Radius]?.scale.type,h=this.axes[import_ag_charts_core238.ChartAxisDirection.Angle]?.scale.type,u=this.properties.allowNullKeys??!1;await this.requestDataModel(e,this.data,{props:[keyProperty9(t,h,{id:"angleValue",allowNullKey:u}),valueProperty14(i,c,{id:"radiusValue-raw",invalidValue:null,...l}),...groupAccumulativeValueProperty2(i,"normal",{id:"radiusValue-end",rangeId:"radiusValue-range",invalidValue:null,groupId:s,separateNegative:!0,...l},c),...groupAccumulativeValueProperty2(i,"trailing",{id:"radiusValue-start",invalidValue:null,groupId:a,separateNegative:!0,...l},c),...n],groupByKeys:!0,groupByData:!1}),this.animationState.transition("updateData")}didCircleChange(){const e=this.radius,t=this.centerX,i=this.centerY,o=this.circleCache;return e!==o.r||t!==o.cx||i!==o.cy?(this.circleCache={r:e,cx:t,cy:i},!0):!1}isRadiusAxisReversed(){return this.axes[import_ag_charts_core238.ChartAxisDirection.Radius]?.isReversed()}maybeRefreshNodeData(){!this.didCircleChange()&&!this.nodeDataRefresh||(this.contextNodeData=this.createNodeData(),this.nodeData=this.contextNodeData?.nodeData??[],this.nodeDataRefresh=!1)}getAxisInnerRadius(){const e=this.axes[import_ag_charts_core238.ChartAxisDirection.Radius];return e instanceof PolarAxis?this.radius*e.innerRadiusRatio:0}createNodeData(){const{processedData:e,dataModel:t,groupScale:i}=this;if(!t||e?.type!=="grouped")return;const o=this.axes[import_ag_charts_core238.ChartAxisDirection.Angle],r=this.axes[import_ag_charts_core238.ChartAxisDirection.Radius],s=o?.scale,a=r?.scale;if(!s||!a)return;const n=t.resolveKeysById(this,"angleValue",e),l=t.resolveColumnById(this,"radiusValue-start",e),c=t.resolveColumnById(this,"radiusValue-end",e),h=t.resolveColumnById(this,"radiusValue-raw",e);let u=0,d=0;o instanceof AngleCategoryAxis&&(u=o.groupPaddingInner,d=o.paddingInner);const g=(s.bandwidth??0)*(1-d),{index:y,visibleGroupCount:x}=this.ctx.seriesStateManager.getVisiblePeerGroupIndex(this);i.domain=Array.from({length:x}).map((w,T)=>String(T)),i.range=[-g/2,g/2],i.paddingInner=x>1?u:0;const f=this.isRadiusAxisReversed(),S=this.getAxisInnerRadius(),m=this.radius,v=m+S,{angleKey:b,radiusKey:D,angleName:k,radiusName:A,legendItemName:M,label:I}=this.properties,_=this.getSeriesDomain(import_ag_charts_core238.ChartAxisDirection.Radius).domain,P=(w,T,z,B)=>{const F=this.getLabelText(T,w,D,"radius",_,I,{value:T,datum:w,angleKey:b,radiusKey:D,angleName:k,radiusName:A,legendItemName:M});if(F)return{x:z,y:B,text:F,textAlign:"center",textBaseline:"middle"}},O=[],C=getItemStyles3((w,T,z)=>getItemStyle(this,w,T,z)),L={itemId:D,nodeData:O,labelData:O,styles:C};if(!this.visible)return L;const{dataSources:E}=e,V=E.get(this.id)?.data??[];for(const{datumIndex:w}of t.forEachGroupDatum(this,e)){const T=V[w],z=n[w];if(z===void 0&&!this.properties.allowNullKeys)return;const B=h[w],F=B>=0&&!Object.is(B,-0),R=l[w],H=c[w],W=F===f;if(R===void 0||H===void 0)return;let K,G,U;if(V.length===1)K=-.5*Math.PI,G=1.5*Math.PI,U=K;else{const re=s.convert(z);K=(0,import_ag_charts_core238.normalizeAngle360)(re+i.convert(String(y))),G=(0,import_ag_charts_core238.normalizeAngle360)(K+i.bandwidth),U=K+i.bandwidth/2}const X=v-a.convert(R),J=v-a.convert(H),oe=(X+J)/2,le=Math.cos(U)*oe,$=Math.sin(U)*oe,j=this.properties.label.enabled?P(T,B,le,$):void 0,te=this.getColumnWidth(K,G);O.push({series:this,datum:T,datumIndex:w,point:{x:le,y:$,size:0},midPoint:{x:le,y:$},label:j,angleValue:z,radiusValue:B,negative:W,innerRadius:X,outerRadius:J,stackInnerRadius:X,stackOuterRadius:J,startAngle:K,endAngle:G,midAngle:U,axisInnerRadius:S,axisOuterRadius:m,columnWidth:te,index:w})}return{itemId:D,nodeData:O,labelData:O,styles:C}}getColumnWidth(e,t){return Number.NaN}update({seriesRect:e}){const t=this.checkResize(e);this.maybeRefreshNodeData(),this.contentGroup.translationX=this.centerX,this.contentGroup.translationY=this.centerY,this.highlightGroup.translationX=this.centerX,this.highlightGroup.translationY=this.centerY,this.labelGroup&&(this.labelGroup.translationX=this.centerX,this.labelGroup.translationY=this.centerY),this.updateSectorSelection(this.itemSelection,!1),this.updateSectorSelection(this.highlightSelection,!0),this.updateLabels(),t&&this.animationState.transition("resize"),this.animationState.transition("update")}updateSectorSelection(e,t){const{contextNodeData:i}=this;if(!i)return;const o=this.ctx.highlightManager.getActiveHighlight();let r=[];const s=this.ctx.highlightManager?.getActiveHighlight();t?s?.datum&&s.series===this&&r.push(s):r=this.nodeData;const a=this.isRadiusAxisReversed(),n=a?this.radius:this.getAxisInnerRadius(),l=a?this.getAxisInnerRadius():this.radius,c=this.getShapeFillBBox(),h=this.hasItemStylers();e.update(r,void 0,u=>this.getDatumId(u)).each((u,d)=>{const{midPoint:p}=d;if(h){const S=this.getHighlightState(s,t,d.datumIndex);d.style=getItemStyle(this,d,t,S)}const g=d.style??i.styles[this.getHighlightState(o,t,d.datumIndex)],y=g.fill,f=(0,import_ag_charts_core238.isGradientFill)(y)&&y.bounds==="item"?{centerX:p?.x??0,centerY:p?.y??0}:{centerX:0,centerY:0,innerRadius:n,outerRadius:l};this.updateItemPath(u,d,t),u.setStyleProperties(g,c,f),u.cornerRadius=g.cornerRadius??0,u.lineJoin="round"})}updateLabels(){const e=this.ctx.highlightManager?.getActiveHighlight(),t=e?.series===this&&e?.datum?e:void 0,i=t?[t]:[];this.labelSelection.update(this.nodeData).each((o,r)=>{updateLabelNode6(this,o,this.properties,this.properties.label,r.label,!1,e),o.fillOpacity=this.getHighlightStyle(!1,r.datumIndex).opacity??1}),this.highlightLabelSelection.update(i,void 0,o=>this.getDatumId(o)).each((o,r)=>{updateLabelNode6(this,o,this.properties,this.properties.label,r.label,!0,e),o.fillOpacity=this.getHighlightStyle(!0,r.datumIndex).opacity??1})}animateEmptyUpdateReady(){const{labelSelection:e}=this,t=this.getColumnTransitionFunctions();motion6.fromToMotion(this.id,"datums",this.ctx.animationManager,[this.itemSelection],t),seriesLabelFadeInAnimation5(this,"labels",this.ctx.animationManager,e,this.highlightLabelSelection)}animateClearingUpdateEmpty(){const{itemSelection:e}=this,{animationManager:t}=this.ctx,i=this.getColumnTransitionFunctions();motion6.fromToMotion(this.id,"datums",t,[e],i),seriesLabelFadeOutAnimation(this,"labels",t,this.labelSelection,this.highlightLabelSelection)}getTooltipContent(e){const{id:t,dataModel:i,processedData:o,axes:r,properties:s}=this,{angleKey:a,angleName:n,radiusKey:l,radiusName:c,legendItemName:h,tooltip:u}=s,d=r[import_ag_charts_core238.ChartAxisDirection.Angle],p=r[import_ag_charts_core238.ChartAxisDirection.Radius],g=this.nodeData?.[e];if(!i||!o||!d||!p||!g)return;const y=o.dataSources.get(this.id)?.data[e],x=i.resolveKeysById(this,"angleValue",o)[e],f=i.resolveColumnById(this,"radiusValue-raw",o)[e];if(x===void 0&&!this.properties.allowNullKeys)return;const S=getItemStyle(this,g,!1);return this.formatTooltipWithContext(u,{heading:this.getAxisValueText(d,"tooltip",x,y,a,void 0),symbol:this.legendItemSymbol(),data:[{label:c,fallbackLabel:l,value:this.getAxisValueText(p,"tooltip",f,y,l,void 0),missing:import_ag_charts_community215._ModuleSupport.isTooltipValueMissing(f)}]},{seriesId:t,datum:y,title:n,angleKey:a,angleName:n,radiusKey:l,radiusName:c,legendItemName:h,...S})}pickNodeClosestDatum(e){return this.pickNodeNearestDistantObject(e,this.itemSelection.nodes())}legendItemSymbol(){const{fill:e,stroke:t,fillOpacity:i,strokeOpacity:o,strokeWidth:r,lineDash:s,lineDashOffset:a}=getStyle(this,!1,import_ag_charts_community215._ModuleSupport.HighlightState.None),n={fill:e??"rgba(0, 0, 0, 0)",stroke:t??"rgba(0, 0, 0, 0)",fillOpacity:i,strokeOpacity:o,strokeWidth:r,lineDash:s,lineDashOffset:a};return(0,import_ag_charts_core238.isGradientFill)(n.fill)&&(n.fill={...n.fill,gradient:"linear",rotation:0,reverse:!1}),{marker:n}}getLegendData(e){if(e!=="category")return[];const{id:t,visible:i}=this,{radiusKey:o,radiusName:r,legendItemName:s,showInLegend:a}=this.properties;return[{legendType:"category",id:t,itemId:o,seriesId:t,enabled:i,label:{text:s??r??o},symbol:this.legendItemSymbol(),legendItemName:s,hideInLegend:!a}]}getDatumId(e){return createDatumId17(e.angleValue)}computeLabelsBBox(){return null}},import_ag_charts_community216=require("ag-charts-community"),import_ag_charts_core239=require("ag-charts-core"),{SeriesProperties:SeriesProperties8,makeSeriesTooltip:makeSeriesTooltip17,Label:Label12}=import_ag_charts_community216._ModuleSupport,RadialColumnSeriesBaseProperties=class extends SeriesProperties8{constructor(){super(...arguments),this.angleKeyAxis="angle",this.radiusKeyAxis="radius",this.fill="black",this.fillOpacity=1,this.stroke="black",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.rotation=0,this.label=new Label12,this.tooltip=makeSeriesTooltip17()}getStyle(){const{fill:e,fillOpacity:t,stroke:i,strokeWidth:o,strokeOpacity:r,lineDash:s,lineDashOffset:a,cornerRadius:n}=this;return{fill:e,fillOpacity:t,stroke:i,strokeWidth:o,strokeOpacity:r,lineDash:s,lineDashOffset:a,cornerRadius:n,opacity:1}}};__decorateClass([import_ag_charts_core239.Property],RadialColumnSeriesBaseProperties.prototype,"angleKey",2),__decorateClass([import_ag_charts_core239.Property],RadialColumnSeriesBaseProperties.prototype,"angleName",2),__decorateClass([import_ag_charts_core239.Property],RadialColumnSeriesBaseProperties.prototype,"radiusKey",2),__decorateClass([import_ag_charts_core239.Property],RadialColumnSeriesBaseProperties.prototype,"radiusName",2),__decorateClass([import_ag_charts_core239.Property],RadialColumnSeriesBaseProperties.prototype,"angleKeyAxis",2),__decorateClass([import_ag_charts_core239.Property],RadialColumnSeriesBaseProperties.prototype,"radiusKeyAxis",2),__decorateClass([import_ag_charts_core239.Property],RadialColumnSeriesBaseProperties.prototype,"legendItemName",2),__decorateClass([import_ag_charts_core239.Property],RadialColumnSeriesBaseProperties.prototype,"fill",2),__decorateClass([import_ag_charts_core239.Property],RadialColumnSeriesBaseProperties.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core239.Property],RadialColumnSeriesBaseProperties.prototype,"stroke",2),__decorateClass([import_ag_charts_core239.Property],RadialColumnSeriesBaseProperties.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core239.Property],RadialColumnSeriesBaseProperties.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core239.Property],RadialColumnSeriesBaseProperties.prototype,"lineDash",2),__decorateClass([import_ag_charts_core239.Property],RadialColumnSeriesBaseProperties.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core239.Property],RadialColumnSeriesBaseProperties.prototype,"cornerRadius",2),__decorateClass([import_ag_charts_core239.Property],RadialColumnSeriesBaseProperties.prototype,"styler",2),__decorateClass([import_ag_charts_core239.Property],RadialColumnSeriesBaseProperties.prototype,"itemStyler",2),__decorateClass([import_ag_charts_core239.Property],RadialColumnSeriesBaseProperties.prototype,"rotation",2),__decorateClass([import_ag_charts_core239.Property],RadialColumnSeriesBaseProperties.prototype,"stackGroup",2),__decorateClass([import_ag_charts_core239.Property],RadialColumnSeriesBaseProperties.prototype,"normalizedTo",2),__decorateClass([import_ag_charts_core239.Property],RadialColumnSeriesBaseProperties.prototype,"label",2),__decorateClass([import_ag_charts_core239.Property],RadialColumnSeriesBaseProperties.prototype,"tooltip",2);var import_ag_charts_community218=require("ag-charts-community"),import_ag_charts_community217=require("ag-charts-community"),{motion:motion7}=import_ag_charts_community217._ModuleSupport;function createAngleMotionCalculator(){const e={startAngle:new Map,endAngle:new Map},t=["startAngle","endAngle"],i=(a,n,l)=>{for(const c of t){const h=e[c];let u=(l==="removed"||l==="updated"?a:n)[c],d=(l==="removed"?a:n)[c];Number.isNaN(d)&&(d=a.previousDatum?.[c]??Number.NaN);const p=u-d;Math.abs(p)>Math.PI&&(u-=Math.sign(p)*2*Math.PI),h.set(n,{from:u,to:d})}},o=(a,n)=>({startAngle:e.startAngle.get(a)[n],endAngle:e.endAngle.get(a)[n]});return{calculate:i,from:a=>o(a,"from"),to:a=>o(a,"to")}}function fixRadialColumnAnimationStatus(e,t,i){if(i==="updated"){if(e.previousDatum==null||Number.isNaN(e.previousDatum.startAngle)||Number.isNaN(e.previousDatum.endAngle))return"added";if(Number.isNaN(t.startAngle)||Number.isNaN(t.endAngle))return"removed"}return i==="added"&&e.previousDatum!=null?"updated":i}function prepareRadialColumnAnimationFunctions(e){const t=createAngleMotionCalculator();return{toFn:(r,s,a)=>{const{startAngle:n,endAngle:l}=t.to(s);let c,h,u,d,p;return a==="removed"?(c=r.innerRadius,h=r.innerRadius,u=r.columnWidth,d=r.axisInnerRadius,p=r.axisOuterRadius):(c=Number.isNaN(s.innerRadius)?e:s.innerRadius,h=Number.isNaN(s.outerRadius)?e:s.outerRadius,u=Number.isNaN(s.columnWidth)?r.columnWidth:s.columnWidth,d=s.axisInnerRadius,p=s.axisOuterRadius),{innerRadius:c,outerRadius:h,columnWidth:u,axisInnerRadius:d,axisOuterRadius:p,startAngle:n,endAngle:l}},fromFn:(r,s,a)=>{a=fixRadialColumnAnimationStatus(r,s,a),t.calculate(r,s,a);const{startAngle:n,endAngle:l}=t.from(s);let c,h,u,d,p;a==="removed"||a==="updated"?(c=r.innerRadius,h=r.outerRadius,u=r.columnWidth,d=r.axisInnerRadius,p=r.axisOuterRadius):(c=e,h=e,u=s.columnWidth,d=s.axisInnerRadius,p=s.axisOuterRadius);const g=motion7.NODE_UPDATE_STATE_TO_PHASE_MAPPING[a];return{innerRadius:c,outerRadius:h,columnWidth:u,axisInnerRadius:d,axisOuterRadius:p,startAngle:n,endAngle:l,phase:g}}}}function resetRadialColumnSelectionFn(e,{innerRadius:t,outerRadius:i,columnWidth:o,axisInnerRadius:r,axisOuterRadius:s,startAngle:a,endAngle:n}){return{innerRadius:t,outerRadius:i,columnWidth:o,axisInnerRadius:r,axisOuterRadius:s,startAngle:a,endAngle:n}}var{SectorBox,motion:motion8}=import_ag_charts_community218._ModuleSupport;function getRadii(e){const{negative:t,innerRadius:i,outerRadius:o,stackInnerRadius:r,stackOuterRadius:s}=e;return{innerRadius:t?s:r,outerRadius:t?r:s,clipInnerRadius:t?o:i,clipOuterRadius:t?i:o}}function prepareNightingaleAnimationFunctions(e){const t=createAngleMotionCalculator();return{toFn:(r,s,a)=>{const{startAngle:n,endAngle:l}=t.to(s);let c,h,u;if(a==="removed")c=e,h=e,u=new SectorBox(n,l,c,h);else{let d,p;({innerRadius:c,outerRadius:h,clipInnerRadius:d,clipOuterRadius:p}=getRadii(s)),Number.isNaN(c)&&(c=e),Number.isNaN(h)&&(h=e),Number.isNaN(d)&&(d=e),Number.isNaN(p)&&(p=e),u=new SectorBox(n,l,d,p)}return{innerRadius:c,outerRadius:h,startAngle:n,endAngle:l,clipSector:u}},fromFn:(r,s,a)=>{a=fixRadialColumnAnimationStatus(r,s,a),t.calculate(r,s,a);const{startAngle:n,endAngle:l}=t.from(s);let c,h,u;a==="removed"||a==="updated"?(c=r.innerRadius,h=r.outerRadius,u=r.clipSector):(c=e,h=e),u??(u=new SectorBox(n,l,c,h));const d=motion8.NODE_UPDATE_STATE_TO_PHASE_MAPPING[a];return{innerRadius:c,outerRadius:h,startAngle:n,endAngle:l,clipSector:u,phase:d}}}}function resetNightingaleSelectionFn(e,t){const{startAngle:i,endAngle:o}=t,{innerRadius:r,outerRadius:s,clipInnerRadius:a,clipOuterRadius:n}=getRadii(t),l=new SectorBox(i,o,a,n);return{innerRadius:r,outerRadius:s,startAngle:i,endAngle:o,clipSector:l}}var{Sector:Sector4,SectorBox:SectorBox2}=import_ag_charts_community219._ModuleSupport,NightingaleSeries=class extends RadialColumnSeriesBase{constructor(e){super(e,{animationResetFns:{item:resetNightingaleSelectionFn}}),this.properties=new RadialColumnSeriesBaseProperties}setZIndex(e){return super.setZIndex(e),this.contentGroup.zIndex=[0,import_ag_charts_core240.PolarZIndexMap.FOREGROUND,e],this.highlightGroup.zIndex=[0,import_ag_charts_core240.PolarZIndexMap.HIGHLIGHT,e],this.labelGroup.zIndex=[0,import_ag_charts_core240.PolarZIndexMap.LABEL,e],!0}getStackId(){return`nightingale-stack-${this.seriesGrouping?.groupIndex??this.id}-yValues`}nodeFactory(){return new Sector4}updateItemPath(e,t,i){const{negative:o}=t;if(e.centerX=0,e.centerY=0,e.startOuterCornerRadius=o?0:this.properties.cornerRadius,e.endOuterCornerRadius=o?0:this.properties.cornerRadius,e.startInnerCornerRadius=o?this.properties.cornerRadius:0,e.endInnerCornerRadius=o?this.properties.cornerRadius:0,i){const{startAngle:r,endAngle:s}=t,{innerRadius:a,outerRadius:n,clipInnerRadius:l,clipOuterRadius:c}=getRadii(t);e.innerRadius=a,e.outerRadius=n,e.startAngle=r,e.endAngle=s,e.clipSector=new SectorBox2(r,s,l,c)}}getColumnTransitionFunctions(){const e=this.isRadiusAxisReversed()?this.radius:this.getAxisInnerRadius();return prepareNightingaleAnimationFunctions(e)}hasItemStylers(){return this.properties.itemStyler!=null||this.properties.styler!=null||this.properties.label.itemStyler!=null}};NightingaleSeries.className="NightingaleSeries",NightingaleSeries.type="nightingale";var import_ag_charts_community220=require("ag-charts-community"),import_ag_charts_core241=require("ag-charts-core"),{nightingaleSeriesThemeableOptionsDef}=import_ag_charts_community220._ModuleSupport,nightingaleSeriesOptionsDef={...import_ag_charts_core241.commonSeriesOptionsDefs,...nightingaleSeriesThemeableOptionsDef,type:(0,import_ag_charts_core241.required)((0,import_ag_charts_core241.constant)("nightingale")),angleKey:(0,import_ag_charts_core241.required)(import_ag_charts_core241.string),radiusKey:(0,import_ag_charts_core241.required)(import_ag_charts_core241.string),angleName:import_ag_charts_core241.string,radiusName:import_ag_charts_core241.string,legendItemName:import_ag_charts_core241.string,grouped:import_ag_charts_core241.boolean,stacked:import_ag_charts_core241.boolean,stackGroup:import_ag_charts_core241.string,normalizedTo:import_ag_charts_core241.number};nightingaleSeriesOptionsDef.angleKeyAxis=(0,import_ag_charts_core241.undocumented)(import_ag_charts_core241.string),nightingaleSeriesOptionsDef.radiusKeyAxis=(0,import_ag_charts_core241.undocumented)(import_ag_charts_core241.string);var import_ag_charts_core242=require("ag-charts-core"),NIGHTINGALE_SERIES_THEME={series:{fill:{$applySwitch:[{$path:"type"},{$palette:"fill"},["gradient",import_ag_charts_core242.FILL_GRADIENT_RADIAL_SERIES_DEFAULTS],["image",import_ag_charts_core242.FILL_IMAGE_DEFAULTS],["pattern",import_ag_charts_core242.FILL_PATTERN_DEFAULTS]]},stroke:{$if:[{$eq:[{$palette:"type"},"inbuilt"]},{$ref:"chartBackgroundColor"},{$palette:"stroke"}]},strokeWidth:1,label:{...import_ag_charts_core242.LABEL_BOXING_DEFAULTS,enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}},highlight:{...import_ag_charts_core242.MULTI_SERIES_HIGHLIGHT_STYLE,bringToFront:!1}},axes:{[import_ag_charts_core242.POLAR_AXIS_TYPE.ANGLE_CATEGORY]:{shape:{$findFirstSiblingNotOperation:import_ag_charts_core242.POLAR_AXIS_SHAPE.CIRCLE},groupPaddingInner:0,paddingInner:0,label:{spacing:10}},[import_ag_charts_core242.POLAR_AXIS_TYPE.RADIUS_NUMBER]:{shape:{$findFirstSiblingNotOperation:import_ag_charts_core242.POLAR_AXIS_SHAPE.CIRCLE}}}},NightingaleSeriesModule={type:"series",name:"nightingale",chartType:"polar",enterprise:!0,stackable:!0,groupable:!0,stackedByDefault:!0,version:import_ag_charts_community221.VERSION,dependencies:[import_ag_charts_community221.PolarChartModule],options:nightingaleSeriesOptionsDef,defaultAxes:{angle:{type:import_ag_charts_core243.POLAR_AXIS_TYPE.ANGLE_CATEGORY},radius:{type:import_ag_charts_core243.POLAR_AXIS_TYPE.RADIUS_NUMBER}},axisKeys:{[import_ag_charts_core243.ChartAxisDirection.X]:"xKeyAxis",[import_ag_charts_core243.ChartAxisDirection.Y]:"yKeyAxis"},themeTemplate:NIGHTINGALE_SERIES_THEME,create:e=>new NightingaleSeries(e)},import_ag_charts_community225=require("ag-charts-community"),import_ag_charts_community223=require("ag-charts-community"),import_ag_charts_core245=require("ag-charts-core"),import_ag_charts_community222=require("ag-charts-community"),import_ag_charts_core244=require("ag-charts-core"),{SeriesProperties:SeriesProperties9,makeSeriesTooltip:makeSeriesTooltip18,Label:Label13,DropShadow:DropShadow5}=import_ag_charts_community222._ModuleSupport,PyramidSeriesLabel=class extends Label13{},PyramidSeriesStageLabel=class extends Label13{constructor(){super(...arguments),this.spacing=0}};__decorateClass([import_ag_charts_core244.Property],PyramidSeriesStageLabel.prototype,"spacing",2),__decorateClass([import_ag_charts_core244.Property],PyramidSeriesStageLabel.prototype,"placement",2);var PyramidProperties=class extends SeriesProperties9{constructor(){super(...arguments),this.fills=[],this.fillOpacity=1,this.strokes=[],this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.direction="vertical",this.reverse=void 0,this.spacing=0,this.aspectRatio=void 0,this.shadow=new DropShadow5().set({enabled:!1}),this.label=new PyramidSeriesLabel,this.stageLabel=new PyramidSeriesStageLabel,this.tooltip=makeSeriesTooltip18()}getStyle(e=0){const{fills:t,strokes:i,fillOpacity:o,strokeWidth:r,strokeOpacity:s,lineDash:a,lineDashOffset:n}=this;return{fill:t[e%t.length],fillOpacity:o,stroke:i[e%i.length],strokeWidth:r,strokeOpacity:s,lineDash:a,lineDashOffset:n,opacity:1}}};__decorateClass([import_ag_charts_core244.Property],PyramidProperties.prototype,"stageKey",2),__decorateClass([import_ag_charts_core244.Property],PyramidProperties.prototype,"valueKey",2),__decorateClass([import_ag_charts_core244.Property],PyramidProperties.prototype,"fills",2),__decorateClass([import_ag_charts_core244.Property],PyramidProperties.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core244.Property],PyramidProperties.prototype,"strokes",2),__decorateClass([import_ag_charts_core244.Property],PyramidProperties.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core244.Property],PyramidProperties.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core244.Property],PyramidProperties.prototype,"lineDash",2),__decorateClass([import_ag_charts_core244.Property],PyramidProperties.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core244.Property],PyramidProperties.prototype,"direction",2),__decorateClass([import_ag_charts_core244.Property],PyramidProperties.prototype,"reverse",2),__decorateClass([import_ag_charts_core244.Property],PyramidProperties.prototype,"spacing",2),__decorateClass([import_ag_charts_core244.Property],PyramidProperties.prototype,"aspectRatio",2),__decorateClass([import_ag_charts_core244.Property],PyramidProperties.prototype,"itemStyler",2),__decorateClass([import_ag_charts_core244.Property],PyramidProperties.prototype,"shadow",2),__decorateClass([import_ag_charts_core244.Property],PyramidProperties.prototype,"label",2),__decorateClass([import_ag_charts_core244.Property],PyramidProperties.prototype,"stageLabel",2),__decorateClass([import_ag_charts_core244.Property],PyramidProperties.prototype,"tooltip",2);function applyPyramidDatum(e,{x:t,y:i,top:o,right:r,bottom:s,left:a}){e.x0=t-o/2,e.x1=t+o/2,e.x2=t+s/2,e.x3=t-s/2,e.y0=i-a/2,e.y1=i-r/2,e.y2=i+r/2,e.y3=i+a/2}function preparePyramidAnimationFunctions(e){return{fromFn:(r,s)=>{const{x:a,y:n}=s;let{top:l,right:c,bottom:h,left:u}=s;return e==="vertical"?(l=0,h=0):(u=0,c=0),{x:a,y:n,top:l,right:c,bottom:h,left:u}},toFn:(r,s)=>{const{x:a,y:n,top:l,right:c,bottom:h,left:u}=s;return{x:a,y:n,top:l,right:c,bottom:h,left:u}},applyFn:applyPyramidDatum}}var{valueProperty:valueProperty15,SeriesNodePickMode:SeriesNodePickMode13,createDatumId:createDatumId18,BBox:BBox23,Group:Group17,Selection:Selection13,Text:Text7,PointerEvents:PointerEvents9,fromToMotion:fromToMotion4,seriesLabelFadeInAnimation:seriesLabelFadeInAnimation6,getLabelStyles:getLabelStyles5}=import_ag_charts_community223._ModuleSupport,PyramidSeries=class extends import_ag_charts_community223._ModuleSupport.DataModelSeries{constructor(e){super({moduleCtx:e,categoryKey:void 0,pickModes:[SeriesNodePickMode13.EXACT_SHAPE_MATCH,SeriesNodePickMode13.NEAREST_NODE]}),this.properties=new PyramidProperties,this.itemGroup=this.contentGroup.appendChild(new Group17({name:"itemGroup"})),this.itemLabelGroup=this.contentGroup.appendChild(new Group17({name:"itemLabelGroup"})),this.stageLabelGroup=this.contentGroup.appendChild(new Group17({name:"stageLabelGroup"})),this.datumSelection=Selection13.select(this.itemGroup,()=>this.nodeFactory()),this.labelSelection=Selection13.select(this.itemLabelGroup,Text7),this.stageLabelSelection=Selection13.select(this.stageLabelGroup,Text7),this.highlightLabelSelection=Selection13.select(this.highlightLabelGroup,Text7),this.highlightDatumSelection=Selection13.select(this.highlightNodeGroup,()=>this.nodeFactory()),this.animationState=new import_ag_charts_core245.StateMachine("empty",{empty:{update:{target:"ready",action:()=>this.animateEmptyUpdateReady()},reset:"empty",skip:"ready"},ready:{clear:"empty",reset:"empty",skip:"ready"}},()=>this.checkProcessedDataAnimatable()),this.itemLabelGroup.pointerEvents=PointerEvents9.None,this.stageLabelGroup.pointerEvents=PointerEvents9.None,this.cleanup.register(this.ctx.eventsHub.on("legend:item-click",t=>this.onLegendItemClick(t)))}nodeFactory(){return new FunnelConnector}getNodeData(){return this.contextNodeData?.nodeData}resetAnimation(e){e==="initial"?this.animationState.transition("reset"):e==="ready"&&this.animationState.transition("skip")}async processData(e){if(this.data==null)return;const{id:t,visible:i,ctx:{legendManager:o}}=this,{stageKey:r,valueKey:s}=this.properties,a="category",n="number",l=(u,d,p)=>i&&o.getItemEnabled({seriesId:t,itemId:p}),c=this.visible?{}:{forceValue:0},h=this.properties.allowNullKeys??!1;await this.requestDataModel(e,this.data,{props:[valueProperty15(r,a,{id:"xValue",allowNullKey:h}),valueProperty15(s,n,{id:"yValue",...c,validation:l,invalidValue:0})]})}createNodeData(){const{id:e,dataModel:t,processedData:i,properties:o,visible:r,ctx:{legendManager:s}}=this,{stageKey:a,valueKey:n,direction:l,reverse:c=l==="horizontal",spacing:h,aspectRatio:u,label:d,stageLabel:p}=o;if(t==null||i==null)return;const g=l==="horizontal",y=t.resolveColumnById(this,"xValue",i),x=t.resolveColumnById(this,"yValue",i),f=t.getDomain(this,"xValue","value",i).domain,S=t.getDomain(this,"yValue","value",i).domain,m=(0,import_ag_charts_core245.cachedTextMeasurer)(p);let v,b;g?(v="center",b=p.placement==="before"?"bottom":"top"):(v=p.placement==="after"?"left":"right",b="middle");const D=p.enabled?[]:void 0;let k=0,A=0,M=0;const I=i.dataSources.get(this.id)?.data??[];for(const[R,H]of I.entries()){const W=y[R];if(W===void 0&&!this.properties.allowNullKeys)continue;const K=x[R],G=r&&s.getItemEnabled({seriesId:e,itemId:R});if(M+=K,D==null)continue;const U=this.getLabelText(W,H,a,"x",f,this.properties.stageLabel,{datum:H,value:K,stageKey:a,valueKey:n},this.properties.allowNullKeys??!1),{width:X,height:J}=(0,import_ag_charts_core245.isArray)(U)?(0,import_ag_charts_core245.measureTextSegments)(U,d):m.measureLines((0,import_ag_charts_core245.toTextString)(U));k=Math.max(k,X),A=Math.max(A,J),D.push({x:Number.NaN,y:Number.NaN,text:U,textAlign:v,textBaseline:b,visible:G})}const _=this._nodeDataDependencies?.seriesRectWidth??0,P=this._nodeDataDependencies?.seriesRectHeight??0,O=h*(i.input.count-1);let C;if(g){const R=A+p.spacing;C=new BBox23(0,p.placement==="before"?R:0,_,P-R)}else{const R=k+p.spacing;C=new BBox23(p.placement==="after"?0:R,0,_-R,P)}if(u!=null&&u!==0){const R=l==="horizontal"?1/u:u,H=Math.min(C.width,C.height*R),W=H/R;C=new BBox23(C.x+(C.width-H)/2,C.y+(C.height-W)/2,H,W)}let L,E;g?E=p.placement==="before"?C.y-p.spacing:C.y+C.height+p.spacing:L=p.placement==="after"?C.x+C.width+p.spacing:C.x-p.spacing;const V=C.width-(g?O:0),w=C.height-(g?0:O);if(V<0||w<0)return;const T=[],z=[];let B=0,F=0;for(const[R,H]of I.entries()){const W=y[R];if(W===void 0&&!this.properties.allowNullKeys)continue;const K=x[R],G=r&&s.getItemEnabled({seriesId:e,itemId:R}),U=B+K,X=(B+U)/(2*M),J=(U-B)/M,oe=g?V*X+h*R:V*.5,le=g?w*.5:w*X+h*R,$=C.x+oe,j=C.y+le;if(D!=null){const Y=D[F++];Y.x=L??$,Y.y=E??j}let te,re,Z,Q;if(g){const Y=V*J;te=Y,Z=Y;const se=(oe+Y/2)*(w/C.width),ae=(oe-Y/2)*(w/C.width);re=c?C.height-se:se,Q=c?C.height-ae:ae}else{const Y=w*J;re=Y,Q=Y;const se=(le-Y/2)*(V/C.height),ae=(le+Y/2)*(V/C.height);te=c?C.width-se:se,Z=c?C.width-ae:ae}const q=this.getLabelText(K,H,n,"y",S,d,{datum:H,value:K,stageKey:a,valueKey:n}),ee={x:$,y:j,text:q,textAlign:"center",textBaseline:"middle",visible:G};z.push(ee),T.push({series:this,datum:H,datumIndex:R,index:R,xValue:W,yValue:K,x:$,y:j,top:te,right:re,bottom:Z,left:Q,label:ee,enabled:G,midPoint:{x:$,y:j},style:this.getItemStyle({datumIndex:R,datum:H},!1)}),B=U}return{itemId:e,nodeData:T,labelData:z,stageLabelData:D,bounds:C}}updateSelections(){this.nodeDataRefresh&&(this.contextNodeData=this.createNodeData(),this.nodeDataRefresh=!1)}update({seriesRect:e}){this.checkResize(e);const{datumSelection:t,labelSelection:i,stageLabelSelection:o,highlightDatumSelection:r,highlightLabelSelection:s}=this;this.updateSelections(),this.contentGroup.visible=this.visible,this.contentGroup.opacity=this.getOpacity();let a=this.ctx.highlightManager?.getActiveHighlight();a!=null&&(a.series!==this||a.datum==null)&&(a=void 0);const n=this.contextNodeData?.nodeData??[],l=this.contextNodeData?.labelData??[],c=this.contextNodeData?.stageLabelData??[];this.datumSelection=this.updateDatumSelection({nodeData:n,datumSelection:t}),this.updateDatumStyles({datumSelection:t,isHighlight:!1}),this.updateDatumNodes({datumSelection:t,isHighlight:!1}),this.labelSelection=this.updateLabelSelection({labelData:l,labelSelection:i}),this.updateLabelNodes({labelSelection:i,labelProperties:this.properties.label}),this.stageLabelSelection=this.updateStageLabelSelection({stageLabelData:c,stageLabelSelection:o}),this.updateLabelNodes({labelSelection:o,labelProperties:this.properties.stageLabel,checkActiveHighlight:!0});const h=this.getHighlightLabelData(l,a)??[];this.highlightLabelSelection=s.update(h),this.updateLabelNodes({labelSelection:this.highlightLabelSelection,labelProperties:this.properties.label,isHighlight:!0}),this.highlightDatumSelection=this.updateDatumSelection({nodeData:a==null?[]:[a],datumSelection:r}),this.updateDatumStyles({datumSelection:r,isHighlight:!0}),this.updateDatumNodes({datumSelection:r,isHighlight:!0}),this.animationState.transition("update")}updateDatumSelection(e){return e.datumSelection.update(e.nodeData)}getItemStyle({datumIndex:e,datum:t},i){const{properties:o}=this,{itemStyler:r}=o,s=this.getHighlightStyle(i,e);let n=(0,import_ag_charts_core245.mergeDefaults)(s,o.getStyle(e));if(r!=null&&e!=null){const l=this.cachedDatumCallback(createDatumId18(e,i?"highlight":"node"),()=>{const c=this.makeItemStylerParams(t,e,i,n);return this.callWithContext(r,c)});l&&(n=(0,import_ag_charts_core245.mergeDefaults)(l,n))}return n}makeItemStylerParams(e,t,i,o){const{id:r,properties:s}=this,{stageKey:a,valueKey:n}=s,l=this.ctx.highlightManager?.getActiveHighlight(),c=this.getHighlightStateString(l,i,t),h=this.filterItemStylerFillParams(o.fill)??o.fill;return{seriesId:r,datum:e,stageKey:a,valueKey:n,highlightState:c,...o,fill:h}}updateDatumStyles({datumSelection:e,isHighlight:t}){e.each((i,o)=>{o.style=this.getItemStyle(o,t)})}updateDatumNodes({datumSelection:e}){const{properties:t}=this,{shadow:i}=t,o=this.contextNodeData?.bounds,r=o?{series:o,axis:o}:void 0;e.each((s,a)=>{s.setStyleProperties(a.style,r),applyPyramidDatum(s,a),s.fillShadow=i})}updateLabelSelection(e){return e.labelSelection.update(this.properties.label.enabled?e.labelData:[])}updateStageLabelSelection(e){return e.stageLabelSelection.update(e.stageLabelData)}updateLabelNodes(e){const t=this.ctx.highlightManager?.getActiveHighlight(),{labelSelection:i,labelProperties:o,isHighlight:r=!1,checkActiveHighlight:s=!1}=e;i.each((a,n,l)=>{const{visible:c,x:h,y:u,text:d,textAlign:p,textBaseline:g}=n,y=r||s&&t?.datumIndex===l,x=this.getHighlightStyle(y,l),f=getLabelStyles5(this,void 0,this.properties,o,y,t),{color:S,fontSize:m,fontStyle:v,fontWeight:b,fontFamily:D}=f;a.visible=c,a.x=h,a.y=u,a.text=d,a.fill=S,a.opacity=(x.opacity??1)*(f.fillOpacity??1),a.fillOpacity=(x.opacity??1)*(f.fillOpacity??1),a.fontStyle=v,a.fontWeight=b,a.fontSize=m,a.fontFamily=D,a.textAlign=p,a.textBaseline=g,a.setBoxing(f)})}getHighlightLabelData(e,t){if(t?.label)return[{...t.label}]}computeFocusBounds(e){const t=this.getNodeData()?.[e.datumIndex];if(t!==void 0){for(const i of this.datumSelection)if(i.datum===t)return i.node}}getTooltipContent(e){const{id:t,dataModel:i,processedData:o,properties:r}=this,{stageKey:s,valueKey:a,tooltip:n}=r;if(!i||!o)return;const l=o.dataSources.get(this.id)?.data[e],c=i.resolveColumnById(this,"xValue",o)[e],h=i.resolveColumnById(this,"yValue",o)[e],u=this.properties.allowNullKeys??!1;if(c===void 0&&!u)return;const d=this.getLabelText(c,l,s,"x",i.getDomain(this,"xValue","value",o).domain,this.properties.stageLabel,{datum:l,value:c,stageKey:s,valueKey:a}),p=this.getItemStyle({datumIndex:e,datum:l},!1);return this.formatTooltipWithContext(n,{symbol:this.legendItemSymbol(e),data:[{label:(0,import_ag_charts_core245.toPlainText)(d),value:(0,import_ag_charts_core245.toPlainText)(h)}]},{seriesId:t,datum:l,title:void 0,stageKey:s,valueKey:a,...p})}getSeriesDomain(){return{domain:[Number.NaN,Number.NaN]}}getSeriesRange(){return[Number.NaN,Number.NaN]}pickNodeClosestDatum({x:e,y:t}){let i=1/0,o;return this.datumSelection.each((r,s)=>{const a=r.distanceSquared(e,t);a<i&&(i=a,o=s)}),o==null?void 0:{datum:o,distance:Math.sqrt(i)}}legendItemSymbol(e){const{fills:t,strokes:i,strokeWidth:o,fillOpacity:r,strokeOpacity:s,lineDash:a,lineDashOffset:n}=this.properties,l=t[e]??"black",c=i[e]??"black";return{marker:{fill:l,fillOpacity:r,stroke:c,strokeWidth:o,strokeOpacity:s,lineDash:a,lineDashOffset:n}}}getLegendData(e){const{processedData:t,dataModel:i,id:o,ctx:{legendManager:r},visible:s}=this;if(!i||!t||e!=="category")return[];const{showInLegend:a}=this.properties,n=i.resolveColumnById(this,"xValue",t);return(t.dataSources.get(this.id)?.data??[]).map((l,c)=>{const h=n[c],u=this.properties.allowNullKeys??!1;if(!(h==null&&!u))return{legendType:"category",id:o,datum:l,itemId:c,seriesId:o,enabled:s&&r.getItemEnabled({seriesId:o,itemId:c}),label:{text:String(h)},symbol:this.legendItemSymbol(c),hideInLegend:!a}}).filter(l=>l!=null)}animateReset(){this.ctx.animationManager.skipCurrentBatch(),this.ctx.animationManager.stopByAnimationGroupId(this.id)}animateEmptyUpdateReady(){const{datumSelection:e,labelSelection:t,properties:i}=this,o=preparePyramidAnimationFunctions(i.direction);fromToMotion4(this.id,"nodes",this.ctx.animationManager,[e],o),seriesLabelFadeInAnimation6(this,"labels",this.ctx.animationManager,t)}hasItemStylers(){return this.properties.itemStyler!=null||this.properties.label.itemStyler!=null}};PyramidSeries.className="PyramidSeries",PyramidSeries.type="pyramid";var import_ag_charts_community224=require("ag-charts-community"),import_ag_charts_core246=require("ag-charts-core"),{pyramidSeriesThemeableOptionsDef}=import_ag_charts_community224._ModuleSupport,pyramidSeriesOptionsDef={...pyramidSeriesThemeableOptionsDef,...import_ag_charts_core246.commonSeriesOptionsDefs,type:(0,import_ag_charts_core246.required)((0,import_ag_charts_core246.constant)("pyramid")),stageKey:(0,import_ag_charts_core246.required)(import_ag_charts_core246.string),valueKey:(0,import_ag_charts_core246.required)(import_ag_charts_core246.string)},import_ag_charts_core247=require("ag-charts-core"),PYRAMID_SERIES_THEME={series:{direction:"vertical",strokeWidth:{$isUserOption:["./strokes/0",2,0]},spacing:2,fills:{$applyCycle:[{$size:{$path:["./data",{$path:"/data"}]}},{$palette:"fills"},{$applySwitch:[{$path:["/type",void 0,{$value:"$1"}]},{$value:"$1"},["gradient",import_ag_charts_core247.FILL_GRADIENT_LINEAR_DEFAULTS],["pattern",import_ag_charts_core247.FILL_PATTERN_DEFAULTS],["image",import_ag_charts_core247.FILL_IMAGE_DEFAULTS]]}]},strokes:{$applyCycle:[{$size:{$path:["./data",{$path:"/data"}]}},{$palette:"strokes"}]},label:{...import_ag_charts_core247.LABEL_BOXING_DEFAULTS,enabled:!0,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"chartBackgroundColor"}},stageLabel:{...import_ag_charts_core247.LABEL_BOXING_DEFAULTS,enabled:!0,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"},spacing:12},shadow:{enabled:!1,color:import_ag_charts_core247.DEFAULT_SHADOW_COLOUR,xOffset:3,yOffset:3,blur:5},highlight:{unhighlightedItem:{opacity:.4}}}},PyramidSeriesModule={type:"series",name:"pyramid",chartType:"standalone",enterprise:!0,solo:!0,version:import_ag_charts_community225.VERSION,dependencies:[StandaloneChartModule],options:pyramidSeriesOptionsDef,themeTemplate:PYRAMID_SERIES_THEME,create:e=>new PyramidSeries(e)},import_ag_charts_community231=require("ag-charts-community"),import_ag_charts_core254=require("ag-charts-core"),import_ag_charts_core248=require("ag-charts-core"),BASE_RADAR_SERIES_THEME={series:{stroke:{$palette:"stroke"},label:{...import_ag_charts_core248.LABEL_BOXING_DEFAULTS,enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}},marker:{enabled:!0,fill:{$applySwitch:[{$path:"type"},{$palette:"fill"},["gradient",import_ag_charts_core248.FILL_GRADIENT_RADIAL_REVERSED_DEFAULTS],["image",import_ag_charts_core248.FILL_IMAGE_DEFAULTS],["pattern",import_ag_charts_core248.FILL_PATTERN_DEFAULTS]]},stroke:{$palette:"stroke"},fillOpacity:1,shape:"circle",size:6,strokeOpacity:1,strokeWidth:{$isUserOption:["./stroke",1,0]}},highlight:import_ag_charts_core248.MARKER_SERIES_HIGHLIGHT_STYLE,tooltip:{range:{$path:["/tooltip/range","nearest"]}}},axes:{[import_ag_charts_core248.POLAR_AXIS_TYPE.ANGLE_CATEGORY]:{label:{spacing:10}}}},RADAR_LINE_SERIES_THEME=(0,import_ag_charts_core248.mergeDefaults)({series:{stroke:import_ag_charts_core248.SAFE_STROKE_FILL_OPERATION,strokeWidth:2}},BASE_RADAR_SERIES_THEME),RADAR_AREA_SERIES_THEME=(0,import_ag_charts_core248.mergeDefaults)({series:{fill:{$applySwitch:[{$path:"type"},{$palette:"fill"},["gradient",import_ag_charts_core248.FILL_GRADIENT_LINEAR_DEFAULTS],["image",import_ag_charts_core248.FILL_IMAGE_DEFAULTS],["pattern",import_ag_charts_core248.FILL_PATTERN_DEFAULTS]]},fillOpacity:.8,strokeWidth:2,marker:{enabled:!1}}},BASE_RADAR_SERIES_THEME),import_ag_charts_community229=require("ag-charts-community"),import_ag_charts_core252=require("ag-charts-core"),import_ag_charts_community227=require("ag-charts-community"),import_ag_charts_core250=require("ag-charts-core"),import_ag_charts_community226=require("ag-charts-community"),import_ag_charts_core249=require("ag-charts-core"),{Label:Label14,SeriesMarker:SeriesMarker2,SeriesProperties:SeriesProperties10,makeSeriesTooltip:makeSeriesTooltip19}=import_ag_charts_community226._ModuleSupport,RadarSeriesProperties=class extends SeriesProperties10{constructor(){super(...arguments),this.angleKeyAxis="angle",this.radiusKeyAxis="radius",this.stroke="black",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.rotation=0,this.marker=new SeriesMarker2,this.label=new Label14,this.tooltip=makeSeriesTooltip19(),this.connectMissingData=!1}};__decorateClass([import_ag_charts_core249.Property],RadarSeriesProperties.prototype,"angleKey",2),__decorateClass([import_ag_charts_core249.Property],RadarSeriesProperties.prototype,"radiusKey",2),__decorateClass([import_ag_charts_core249.Property],RadarSeriesProperties.prototype,"angleName",2),__decorateClass([import_ag_charts_core249.Property],RadarSeriesProperties.prototype,"radiusName",2),__decorateClass([import_ag_charts_core249.Property],RadarSeriesProperties.prototype,"angleKeyAxis",2),__decorateClass([import_ag_charts_core249.Property],RadarSeriesProperties.prototype,"radiusKeyAxis",2),__decorateClass([import_ag_charts_core249.Property],RadarSeriesProperties.prototype,"legendItemName",2),__decorateClass([import_ag_charts_core249.Property],RadarSeriesProperties.prototype,"stroke",2),__decorateClass([import_ag_charts_core249.Property],RadarSeriesProperties.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core249.Property],RadarSeriesProperties.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core249.Property],RadarSeriesProperties.prototype,"lineDash",2),__decorateClass([import_ag_charts_core249.Property],RadarSeriesProperties.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core249.Property],RadarSeriesProperties.prototype,"rotation",2),__decorateClass([import_ag_charts_core249.Property],RadarSeriesProperties.prototype,"styler",2),__decorateClass([import_ag_charts_core249.Property],RadarSeriesProperties.prototype,"marker",2),__decorateClass([import_ag_charts_core249.Property],RadarSeriesProperties.prototype,"label",2),__decorateClass([import_ag_charts_core249.Property],RadarSeriesProperties.prototype,"tooltip",2),__decorateClass([import_ag_charts_core249.Property],RadarSeriesProperties.prototype,"connectMissingData",2);var{DEFAULT_POLAR_DIRECTION_KEYS:DEFAULT_POLAR_DIRECTION_KEYS2,DEFAULT_POLAR_DIRECTION_NAMES:DEFAULT_POLAR_DIRECTION_NAMES2,PolarAxis:PolarAxis2,SeriesNodePickMode:SeriesNodePickMode14,keyProperty:keyProperty10,valueProperty:valueProperty16,fixNumericExtent:fixNumericExtent9,seriesLabelFadeInAnimation:seriesLabelFadeInAnimation7,markerFadeInAnimation:markerFadeInAnimation2,resetMarkerFn:resetMarkerFn2,resetLabelFn:resetLabelFn6,animationValidation:animationValidation8,computeMarkerFocusBounds:computeMarkerFocusBounds3,BBox:BBox24,Group:Group18,Path:Path12,Selection:Selection14,Text:Text8,Marker:Marker5,updateLabelNode:updateLabelNode7,getMarkerStyles:getMarkerStyles2}=import_ag_charts_community227._ModuleSupport,RadarSeriesNodeEvent=class extends import_ag_charts_community227._ModuleSupport.SeriesNodeEvent{constructor(e,t,i,o){super(e,t,i,o),this.angleKey=o.properties.angleKey,this.radiusKey=o.properties.radiusKey}},RadarSeries=class extends import_ag_charts_community227._ModuleSupport.PolarSeries{constructor(e){super({moduleCtx:e,categoryKey:"angleValue",propertyKeys:DEFAULT_POLAR_DIRECTION_KEYS2,propertyNames:DEFAULT_POLAR_DIRECTION_NAMES2,pickModes:[SeriesNodePickMode14.NEAREST_NODE,SeriesNodePickMode14.EXACT_SHAPE_MATCH],canHaveAxes:!0,animationResetFns:{item:resetMarkerFn2,label:resetLabelFn6},clipFocusBox:!1}),this.NodeEvent=RadarSeriesNodeEvent,this.lineGroup=this.contentGroup.appendChild(new Group18({name:"radar-line"})),this.lineSelection=Selection14.select(this.lineGroup,Path12),this.resetInvalidToZero=!1,this.circleCache={r:0,cx:0,cy:0},this.lineGroup.zIndex=0,this.itemGroup.zIndex=1}renderToOffscreenCanvas(){return(this.nodeData?.length??0)>0&&this.getDrawingMode(!1)==="cutout"||super.renderToOffscreenCanvas()}nodeFactory(){return new Marker5}getSeriesDomain(e){const{dataModel:t,processedData:i}=this;if(!i||!t)return{domain:[]};if(e===import_ag_charts_core250.ChartAxisDirection.Angle){const o=t.getDomain(this,"angleValue","key",i).domain,r=t.getKeySortMetadata(this,"angleValue",i);return{domain:o,sortMetadata:r}}else{const o=t.getDomain(this,"radiusValue","value",i).domain,r=(0,import_ag_charts_core250.extent)(o.length===0?o:[0].concat(o));return{domain:fixNumericExtent9(r)}}}async processData(e){const{angleKey:t,radiusKey:i}=this.properties,o=[];this.ctx.animationManager.isSkipped()||o.push(animationValidation8());const r=this.axes[import_ag_charts_core250.ChartAxisDirection.Radius]?.scale.type,s=this.axes[import_ag_charts_core250.ChartAxisDirection.Angle]?.scale.type,a=this.properties.allowNullKeys??!1;await this.requestDataModel(e,this.data,{props:[keyProperty10(t,s,{id:"angleValue",allowNullKey:a}),valueProperty16(i,r,{id:"radiusValue",invalidValue:void 0}),...o]}),this.animationState.transition("updateData")}didCircleChange(){const e=this.radius,t=this.centerX,i=this.centerY,o=this.circleCache;return e===o.r&&t===o.cx&&i===o.cy?!1:(this.circleCache={r:e,cx:t,cy:i},!0)}getAxisInnerRadius(){const e=this.axes[import_ag_charts_core250.ChartAxisDirection.Radius];return e instanceof PolarAxis2?this.radius*e.innerRadiusRatio:0}maybeRefreshNodeData(){!this.didCircleChange()&&!this.nodeDataRefresh||(this.contextNodeData=this.createNodeData(),this.nodeData=this.contextNodeData?.nodeData??[],this.nodeDataRefresh=!1)}createNodeData(){const{processedData:e,dataModel:t}=this;if(!e||!t)return;const{angleKey:i,radiusKey:o,angleName:r,radiusName:s,legendItemName:a,marker:n,label:l}=this.properties,c=this.axes[import_ag_charts_core250.ChartAxisDirection.Angle]?.scale,h=this.axes[import_ag_charts_core250.ChartAxisDirection.Radius]?.scale;if(!c||!h)return;const u=t.resolveKeysById(this,"angleValue",e),d=t.resolveColumnById(this,"radiusValue",e),p=this.getAxisInnerRadius(),g=this.getSeriesDomain(import_ag_charts_core250.ChartAxisDirection.Radius).domain,y=e.dataSources.get(this.id)?.data??[],x=this.properties.allowNullKeys??!1,f=[];for(let S=0;S<y.length;S++){const m=y[S],v=u[S];if(v===void 0&&!x)continue;const b=d[S],D=c.convert(v),k=this.radius+p-h.convert(b),A=Math.cos(D),M=Math.sin(D),I=A*k,_=M*k;let P;if(l.enabled){const O=this.getLabelText(b,m,o,"radius",g,l,{value:b,datum:m,angleKey:i,radiusKey:o,angleName:r,radiusName:s,legendItemName:a});if(O){let C="right";(0,import_ag_charts_core250.isNumberEqual)(A,0)?C="center":A>0&&(C="left");let L="bottom";(0,import_ag_charts_core250.isNumberEqual)(M,0)?L="middle":M>0&&(L="top"),P={x:I+A*n.size,y:_+M*n.size,text:O,textAlign:C,textBaseline:L}}}f.push({series:this,datum:m,datumIndex:S,index:S,point:{x:I,y:_,size:n.size},midPoint:{x:I,y:_},label:P,angleValue:v,radiusValue:b,missing:!(0,import_ag_charts_core250.isFiniteNumber)(D)||!(0,import_ag_charts_core250.isFiniteNumber)(k)})}return{itemId:o,nodeData:f,labelData:f,styles:getMarkerStyles2(this,this.properties,n)}}update({seriesRect:e}){const t=this.checkResize(e),i=!this.ctx.animationManager.isSkipped(),{series:o}=this.ctx.highlightManager?.getActiveHighlight()??{};this.highlightGroup.visible=(i||this.visible)&&o===this,this.maybeRefreshNodeData(),this.contentGroup.translationX=this.centerX,this.contentGroup.translationY=this.centerY,this.highlightGroup.translationX=this.centerX,this.highlightGroup.translationY=this.centerY,this.labelGroup&&(this.labelGroup.translationX=this.centerX,this.labelGroup.translationY=this.centerY),this.updatePathSelections(),this.updateMarkerSelection(),this.updateHighlightSelection(),this.updatePathNodes(),this.hasItemStylers()&&(this.updateDatumStyles(this.itemSelection,!1),this.updateDatumStyles(this.highlightSelection,!0));const r=this.ctx.chartService.highlight?.drawingMode??"overlay";this.updateMarkers(this.itemSelection,!1,"overlay"),this.updateMarkers(this.highlightSelection,!0,r),this.updateLabels(),t&&this.animationState.transition("resize"),this.animationState.transition("update")}updatePathSelections(){const e=this.visible?[!0]:[];this.lineSelection.update(e)}updateMarkerSelection(){const{marker:e,styler:t}=this.properties;e.isDirty()&&(this.itemSelection.clear(),this.itemSelection.cleanup(),this.itemSelection=Selection14.select(this.itemGroup,()=>this.nodeFactory(),!1));const i=t==null?e.enabled:this.getStyle().marker.enabled,o=this.visible&&e.shape&&i?this.nodeData:[];this.itemSelection.update(o)}updateHighlightSelection(){const{marker:e,styler:t}=this.properties;e.isDirty()&&(this.highlightSelection.clear(),this.highlightSelection.cleanup(),this.highlightSelection=Selection14.select(this.highlightGroup,()=>this.nodeFactory(),!1));const i=t==null?e.enabled:this.getStyle().marker.enabled,o=this.ctx.highlightManager?.getActiveHighlight(),r=this.visible&&e.shape&&i&&o?.datum?[{...o}]:[];this.highlightSelection.update(r)}getMarkerFill(e){return e?.fill??this.getStyle().marker.fill}getDatumStylerProperties(e){const{id:t,properties:i}=this,{angleKey:o,radiusKey:r}=i;return{seriesId:t,datum:e,angleKey:o,radiusKey:r}}updateDatumStyles(e,t){const i=this.ctx.highlightManager.getActiveHighlight();e.each((o,r)=>{const s=this.getHighlightState(i,t,r.datumIndex),a=this.getStyle(s),{stroke:n,strokeWidth:l,strokeOpacity:c}=a;r.style=this.getMarkerStyle(this.properties.marker,r,this.getDatumStylerProperties(r.datum),{isHighlight:t,highlightState:s},a.marker,{stroke:n,strokeWidth:l,strokeOpacity:c})})}updateMarkers(e,t,i){const o=this.getShapeFillBBox(),{contextNodeData:r}=this;if(!r)return;const s=this.ctx.highlightManager.getActiveHighlight();i=this.getDrawingMode(t,i),e.each((a,n)=>{const l=n.style??r.styles[this.getHighlightState(s,t,n.datumIndex)];this.applyMarkerStyle(l,a,n.point,o),a.drawingMode=i})}updateLabels(){const{properties:e}=this,t=this.ctx.highlightManager?.getActiveHighlight(),i=t?.series===this&&t?.datum?[{...t}]:[];this.labelSelection.update(this.nodeData).each((o,r)=>{r.label&&(o.fillOpacity=this.getHighlightStyle(!1,r.datumIndex).opacity??1,updateLabelNode7(this,o,e,e.label,r.label,!1,t))}),this.highlightLabelSelection.update(i).each((o,r)=>{r.label&&(o.fillOpacity=this.getHighlightStyle(!0,r.datumIndex).opacity??1,updateLabelNode7(this,o,e,e.label,r.label,!0,t))})}getTooltipContent(e){const{id:t,dataModel:i,processedData:o,axes:r,properties:s}=this,{angleKey:a,angleName:n,radiusKey:l,radiusName:c,legendItemName:h,tooltip:u,marker:d}=s,p=r[import_ag_charts_core250.ChartAxisDirection.Angle],g=r[import_ag_charts_core250.ChartAxisDirection.Radius];if(!i||!o||!p||!g)return;const y=o.dataSources.get(this.id)?.data[e],x=i.resolveKeysById(this,"angleValue",o)[e],f=i.resolveColumnById(this,"radiusValue",o)[e],S=this.properties.allowNullKeys??!1;if(x===void 0&&!S)return;const m=this.getMarkerStyle(d,{datum:y,datumIndex:e},this.getDatumStylerProperties(y),{isHighlight:!1});return this.formatTooltipWithContext(u,{heading:this.getAxisValueText(p,"tooltip",x,y,a,void 0,S),symbol:this.legendItemSymbol(),data:[{label:c,fallbackLabel:l,value:this.getAxisValueText(g,"tooltip",f,y,l,void 0),missing:import_ag_charts_community227._ModuleSupport.isTooltipValueMissing(f)}]},{seriesId:t,datum:y,title:n,angleKey:a,radiusKey:l,angleName:n,radiusName:c,legendItemName:h,...m})}legendItemSymbol(){const{stroke:e,strokeWidth:t,strokeOpacity:i,lineDash:o,marker:r}=this.getStyle();return{marker:{shape:r.shape,enabled:r.enabled||t<=0,fill:this.getMarkerFill()??r.stroke??e??"rgba(0, 0, 0, 0)",stroke:r.stroke??e??"rgba(0, 0, 0, 0)",fillOpacity:r.fillOpacity,strokeOpacity:r.strokeOpacity,strokeWidth:r.strokeWidth,lineDash:r.lineDash,lineDashOffset:r.lineDashOffset},line:{enabled:!0,stroke:e,strokeOpacity:i,strokeWidth:t,lineDash:o}}}getLegendData(e){if(e!=="category")return[];const{id:t,ctx:{legendManager:i},visible:o}=this,{radiusKey:r,radiusName:s,legendItemName:a,showInLegend:n}=this.properties;return[{legendType:"category",id:t,itemId:r,seriesId:t,enabled:o&&i.getItemEnabled({seriesId:t,itemId:r}),label:{text:a??s??r},symbol:this.legendItemSymbol(),legendItemName:a,hideInLegend:!n}]}pickNodeClosestDatum(e){const{nodeData:t,centerX:i,centerY:o}=this,{x:r,y:s}=e,a=this.radius;if(Math.hypot(r-i,s-o)>a+this.maxChartMarkerSize)return;let l=1/0,c;for(const h of t){const{point:{x:u=Number.NaN,y:d=Number.NaN}={}}=h;if(Number.isNaN(u)||Number.isNaN(d))continue;const p=Math.hypot(e.x-u-i,e.y-d-o);p<l&&(l=p,c=h)}if(c){const h=Math.max(l-(c.point?.size??0)/2,0);return{datum:c,distance:h}}}computeLabelsBBox(){const{label:e}=this.properties;this.maybeRefreshNodeData();const t=[],i=new Text8;for(const o of this.nodeData){if(!e.enabled||!o.label)continue;i.text=o.label.text,i.x=o.label.x,i.y=o.label.y,i.setFont(e),i.setAlign(o.label);const r=i.getBBox();t.push(r)}return t.length===0?null:BBox24.merge(t)}getLineNode(){return this.lineSelection?.at(0)}beforePathAnimation(){this.updatePathNodes()}getPathNodesStyle(){const e=this.ctx.highlightManager?.getActiveHighlight(),t=this.getHighlightState(e),i=this.getHighlightStyle(void 0,void 0,t),o=this.getStyle(t);return(0,import_ag_charts_core250.mergeDefaults)(i,o)}getLinePoints(){const{nodeData:e,resetInvalidToZero:t}=this,{connectMissingData:i}=this.properties;if(e.length===0)return[];const o=this.axes[import_ag_charts_core250.ChartAxisDirection.Radius],s=this.axes[import_ag_charts_core250.ChartAxisDirection.Angle]?.isReversed(),n=o?.isReversed()&&!s?[...e].reverse():e,l=[];let c=!1,h;for(const[u,d]of n.entries()){let{x:p,y:g}=d.point;const y=Number.isNaN(p)||Number.isNaN(g);y||(h??(h=d)),y&&!i&&(p=0,g=0);const x=u===0||!t&&!i&&(y||c);l.push({x:p,y:g,moveTo:x}),c=y}return h!==void 0&&l.push({x:h.point.x,y:h.point.y,moveTo:!1}),l}animateSinglePath(e,t,i){const{path:o}=e;o.clear(!0);const r=this.getAxisInnerRadius(),s=this.axes[import_ag_charts_core250.ChartAxisDirection.Radius],n=s?.isReversed()?this.radius+r-s?.scale.convert(0):r;for(const l of t){const{x:c,y:h,arc:u,radius:d=0,startAngle:p=0,endAngle:g=0,moveTo:y}=l,x=Math.atan2(h,c),f=n*Math.cos(x),S=n*Math.sin(x),m=i,v=f*(1-m)+c*m,b=S*(1-m)+h*m;u?o.arc(c,h,d,p,g):y?o.moveTo(v,b):o.lineTo(v,b)}e.checkPathDirty()}animatePaths(e){const t=this.getLinePoints(),i=this.getLineNode();i&&this.animateSinglePath(i,t,e)}animateEmptyUpdateReady(){const{itemSelection:e,labelSelection:t}=this,{animationManager:i}=this.ctx;this.beforePathAnimation(),i.animate({id:`${this.id}_'path`,groupId:this.id,from:0,to:1,phase:"initial",collapsable:!1,onUpdate:o=>this.animatePaths(o),onStop:()=>this.animatePaths(1)}),markerFadeInAnimation2(this,i,"added",this.getAnimationDrawingModes(),e),seriesLabelFadeInAnimation7(this,"labels",i,t,this.highlightLabelSelection)}animateWaitingUpdateReady(e){super.animateWaitingUpdateReady(e),this.resetPaths()}animateReadyResize(e){super.animateReadyResize(e),this.resetPaths()}resetPaths(){const e=this.getLineNode();if(e){const{path:t}=e,i=this.getLinePoints(),o=this.getStyle();e.fill=void 0,e.stroke=o.stroke,e.strokeWidth=o.strokeWidth,e.strokeOpacity=o.strokeOpacity,e.lineDash=o.lineDash,e.lineDashOffset=o.lineDashOffset,t.clear(!0);for(const{x:r,y:s,moveTo:a}of i)a?t.moveTo(r,s):t.lineTo(r,s);return e.checkPathDirty(),o}}getStylerResult(e,t){const{styler:i}=this.properties;if(i){const o=this.makeStylerParams(t),r=this.cachedCallWithContext(i,o)??{},s=this.ctx.optionsGraphService.resolvePartial(["series",`${this.declarationOrder}`],r,{pick:!1});s&&(e=s)}return e}getFormattedMarkerStyle(e){const{angleKey:t,radiusKey:i}=this.properties;return this.getMarkerStyle(this.properties.marker,e,{angleKey:t,radiusKey:i},{isHighlight:!0})}computeFocusBounds(e){return computeMarkerFocusBounds3(this,e)}hasItemStylers(){return this.properties.styler!=null||this.properties.marker.itemStyler!=null||this.properties.label.itemStyler!=null}};RadarSeries.className="RadarSeries";var import_ag_charts_community228=require("ag-charts-community"),import_ag_charts_core251=require("ag-charts-core"),RadarAreaSeriesProperties=class extends RadarSeriesProperties{constructor(){super(...arguments),this.fill="black",this.fillOpacity=1}};__decorateClass([import_ag_charts_core251.Property],RadarAreaSeriesProperties.prototype,"fill",2),__decorateClass([import_ag_charts_core251.Property],RadarAreaSeriesProperties.prototype,"fillOpacity",2);var{Group:Group19,HighlightState:HighlightState5,Path:Path13,PointerEvents:PointerEvents10,Selection:Selection15,toHighlightString:toHighlightString5}=import_ag_charts_community229._ModuleSupport,RadarAreaSeries=class extends RadarSeries{constructor(e){super(e),this.properties=new RadarAreaSeriesProperties,this.areaGroup=this.contentGroup.appendChild(new Group19({name:"radar-area"})),this.areaSelection=Selection15.select(this.areaGroup,Path13),this.resetInvalidToZero=!0,this.areaGroup.zIndex=-1}updatePathSelections(){const e=this.visible?[!0]:[];this.areaSelection.update(e),super.updatePathSelections()}getAreaNode(){return this.areaSelection.at(0)}getMarkerFill(e){if(e?.fill!=null)return e.fill;const t=this.getStyle();return t.marker.fill??t.fill}updatePathNodes(){const e=this.getPathNodesStyle(),{fill:t,fillOpacity:i,strokeWidth:o,stroke:r,strokeOpacity:s,lineDash:a,lineDashOffset:n,opacity:l}=e,c=this.getLineNode();c&&c.setProperties({fill:void 0,lineJoin:"round",lineCap:"round",pointerEvents:PointerEvents10.None,opacity:l,stroke:r,strokeWidth:o,strokeOpacity:s,lineDash:a,lineDashOffset:n});const h=this.getAreaNode();h&&(h.setStyleProperties({fill:t,fillOpacity:i,stroke:void 0},this.getShapeFillBBox()),h.setProperties({lineJoin:"round",pointerEvents:PointerEvents10.None,opacity:l}))}animatePaths(e){super.animatePaths(e);const t=this.getAreaNode();t&&this.animateSinglePath(t,this.getAreaPoints(),e)}getAreaPoints(){const e=this.getLinePoints(),t=a=>{const n=this.axes[a];return n instanceof import_ag_charts_community229._ModuleSupport.PolarAxis?n:void 0},i=t(import_ag_charts_core252.ChartAxisDirection.Radius),o=t(import_ag_charts_core252.ChartAxisDirection.Angle);if(!i?.isReversed())return e;const s=o?.getAxisLinePoints()?.points??[];return e.concat(...s)}resetPaths(){const e=super.resetPaths(),t=this.getAreaNode();if(t){const{path:i}=t,o=this.getAreaPoints(),r=e??this.getStyle(),s=this.getShapeFillBBox();t.setStyleProperties({fill:r.fill,stroke:void 0,fillOpacity:r.fillOpacity,lineDash:r.lineDash,lineDashOffset:r.lineDashOffset},s),t.lineJoin=t.lineCap="round",i.clear(!0);for(const{x:a,y:n,moveTo:l,arc:c,radius:h=0,startAngle:u=0,endAngle:d=0}of o)c?i.arc(a,n,h,u,d):l?i.moveTo(a,n):i.lineTo(a,n);return i.closePath(),t.checkPathDirty(),r}}makeStylerParams(e){const{properties:t}=this,i=toHighlightString5(e??HighlightState5.None);return{marker:{fill:t.marker.fill,fillOpacity:t.marker.fillOpacity,size:t.marker.size,shape:t.marker.shape,stroke:t.marker.stroke,strokeOpacity:t.marker.strokeOpacity,strokeWidth:t.marker.strokeWidth,lineDash:t.marker.lineDash,lineDashOffset:t.marker.lineDashOffset},highlightState:i,fill:t.fill,fillOpacity:t.fillOpacity,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,seriesId:this.id,stroke:t.stroke,strokeOpacity:t.strokeOpacity,strokeWidth:t.strokeWidth,angleKey:t.angleKey,radiusKey:t.radiusKey}}getStyle(e){const{marker:t,fill:i,fillOpacity:o,lineDash:r,lineDashOffset:s,stroke:a,strokeOpacity:n,strokeWidth:l}=this.properties,{size:c,shape:h,fill:u="transparent",fillOpacity:d}=t,p=this.getStylerResult({},e);return p.marker??(p.marker={}),{fill:p.fill??i,fillOpacity:p.fillOpacity??o,lineDash:p.lineDash??r,lineDashOffset:p.lineDashOffset??s,stroke:p.stroke??a,strokeOpacity:p.strokeOpacity??n,strokeWidth:p.strokeWidth??l,marker:{enabled:p.marker.enabled??t.enabled,fill:p.marker.fill??u,fillOpacity:p.marker.fillOpacity??d,shape:p.marker.shape??h,size:p.marker.size??c,lineDash:p.marker.lineDash??t.lineDash??r,lineDashOffset:p.marker.lineDashOffset??t.lineDashOffset??s,stroke:p.marker.stroke??t.stroke??a,strokeOpacity:p.marker.strokeOpacity??t.strokeOpacity??n,strokeWidth:p.marker.strokeWidth??t.strokeWidth??l}}}};RadarAreaSeries.className="RadarAreaSeries",RadarAreaSeries.type="radar-area";var import_ag_charts_community230=require("ag-charts-community"),import_ag_charts_core253=require("ag-charts-core"),{radarAreaSeriesThemeableOptionsDef}=import_ag_charts_community230._ModuleSupport,radarAreaSeriesOptionsDef={...import_ag_charts_core253.commonSeriesOptionsDefs,...radarAreaSeriesThemeableOptionsDef,type:(0,import_ag_charts_core253.required)((0,import_ag_charts_core253.constant)("radar-area")),angleKey:(0,import_ag_charts_core253.required)(import_ag_charts_core253.string),radiusKey:(0,import_ag_charts_core253.required)(import_ag_charts_core253.string),angleName:import_ag_charts_core253.string,radiusName:import_ag_charts_core253.string,legendItemName:import_ag_charts_core253.string};radarAreaSeriesOptionsDef.angleKeyAxis=(0,import_ag_charts_core253.undocumented)(import_ag_charts_core253.string),radarAreaSeriesOptionsDef.radiusKeyAxis=(0,import_ag_charts_core253.undocumented)(import_ag_charts_core253.string);var RadarAreaSeriesModule={type:"series",name:"radar-area",chartType:"polar",enterprise:!0,version:import_ag_charts_community231.VERSION,dependencies:[import_ag_charts_community231.PolarChartModule],options:radarAreaSeriesOptionsDef,defaultAxes:{angle:{type:import_ag_charts_core254.POLAR_AXIS_TYPE.ANGLE_CATEGORY},radius:{type:import_ag_charts_core254.POLAR_AXIS_TYPE.RADIUS_NUMBER}},axisKeys:{[import_ag_charts_core254.ChartAxisDirection.Angle]:"angleKeyAxis",[import_ag_charts_core254.ChartAxisDirection.Radius]:"radiusKeyAxis"},themeTemplate:RADAR_AREA_SERIES_THEME,create:e=>new RadarAreaSeries(e)},import_ag_charts_community234=require("ag-charts-community"),import_ag_charts_core256=require("ag-charts-core"),import_ag_charts_community232=require("ag-charts-community"),{HighlightState:HighlightState6,PointerEvents:PointerEvents11,toHighlightString:toHighlightString6}=import_ag_charts_community232._ModuleSupport,RadarLineSeries=class extends RadarSeries{constructor(){super(...arguments),this.properties=new RadarSeriesProperties}updatePathSelections(){this.lineSelection.update(this.visible?[!0]:[])}updatePathNodes(){const e=this.getLineNode();if(!e)return;const t=this.getPathNodesStyle(),{strokeWidth:i,stroke:o,strokeOpacity:r,lineDash:s,lineDashOffset:a,opacity:n}=t;e.setProperties({fill:void 0,lineJoin:"round",lineCap:"round",pointerEvents:PointerEvents11.None,opacity:n,stroke:o,strokeWidth:i,strokeOpacity:r,lineDash:s,lineDashOffset:a})}makeStylerParams(e){const{properties:t}=this,i=toHighlightString6(e??HighlightState6.None);return{marker:{fill:t.marker.fill,fillOpacity:t.marker.fillOpacity,size:t.marker.size,shape:t.marker.shape,stroke:t.marker.stroke,strokeOpacity:t.marker.strokeOpacity,strokeWidth:t.marker.strokeWidth,lineDash:t.marker.lineDash,lineDashOffset:t.marker.lineDashOffset},highlightState:i,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,seriesId:this.id,stroke:t.stroke,strokeOpacity:t.strokeOpacity,strokeWidth:t.strokeWidth,angleKey:t.angleKey,radiusKey:t.radiusKey}}getStyle(e){const{marker:t,lineDash:i,lineDashOffset:o,stroke:r,strokeOpacity:s,strokeWidth:a}=this.properties,{size:n,shape:l,fill:c="transparent",fillOpacity:h}=t,u=this.getStylerResult({},e);return u.marker??(u.marker={}),{lineDash:u.lineDash??i,lineDashOffset:u.lineDashOffset??o,stroke:u.stroke??r,strokeOpacity:u.strokeOpacity??s,strokeWidth:u.strokeWidth??a,marker:{enabled:u.marker.enabled??t.enabled,fill:u.marker.fill??c,fillOpacity:u.marker.fillOpacity??h,shape:u.marker.shape??l,size:u.marker.size??n,lineDash:u.marker.lineDash??t.lineDash??i,lineDashOffset:u.marker.lineDashOffset??t.lineDashOffset??o,stroke:u.marker.stroke??t.stroke??r,strokeOpacity:u.marker.strokeOpacity??t.strokeOpacity??s,strokeWidth:u.marker.strokeWidth??t.strokeWidth??a}}}};RadarLineSeries.className="RadarLineSeries",RadarLineSeries.type="radar-line";var import_ag_charts_community233=require("ag-charts-community"),import_ag_charts_core255=require("ag-charts-core"),{radarLineSeriesThemeableOptionsDef}=import_ag_charts_community233._ModuleSupport,radarLineSeriesOptionsDef={...import_ag_charts_core255.commonSeriesOptionsDefs,...radarLineSeriesThemeableOptionsDef,type:(0,import_ag_charts_core255.required)((0,import_ag_charts_core255.constant)("radar-line")),angleKey:(0,import_ag_charts_core255.required)(import_ag_charts_core255.string),radiusKey:(0,import_ag_charts_core255.required)(import_ag_charts_core255.string),angleName:import_ag_charts_core255.string,radiusName:import_ag_charts_core255.string,legendItemName:import_ag_charts_core255.string};radarLineSeriesOptionsDef.angleKeyAxis=(0,import_ag_charts_core255.undocumented)(import_ag_charts_core255.string),radarLineSeriesOptionsDef.radiusKeyAxis=(0,import_ag_charts_core255.undocumented)(import_ag_charts_core255.string);var RadarLineSeriesModule={type:"series",name:"radar-line",chartType:"polar",enterprise:!0,version:import_ag_charts_community234.VERSION,dependencies:[import_ag_charts_community234.PolarChartModule],options:radarLineSeriesOptionsDef,defaultAxes:{angle:{type:import_ag_charts_core256.POLAR_AXIS_TYPE.ANGLE_CATEGORY},radius:{type:import_ag_charts_core256.POLAR_AXIS_TYPE.RADIUS_NUMBER}},axisKeys:{[import_ag_charts_core256.ChartAxisDirection.Angle]:"angleKeyAxis",[import_ag_charts_core256.ChartAxisDirection.Radius]:"radiusKeyAxis"},themeTemplate:RADAR_LINE_SERIES_THEME,create:e=>new RadarLineSeries(e)},import_ag_charts_community239=require("ag-charts-community"),import_ag_charts_core261=require("ag-charts-core"),import_ag_charts_community237=require("ag-charts-community"),import_ag_charts_core258=require("ag-charts-core"),import_ag_charts_community235=require("ag-charts-community"),import_ag_charts_core257=require("ag-charts-core"),{SeriesProperties:SeriesProperties11,makeSeriesTooltip:makeSeriesTooltip20,Label:Label15}=import_ag_charts_community235._ModuleSupport,RadialBarSeriesProperties=class extends SeriesProperties11{constructor(){super(...arguments),this.angleKeyAxis="angle",this.radiusKeyAxis="radius",this.fill="black",this.fillOpacity=1,this.stroke="black",this.strokeWidth=1,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.cornerRadius=0,this.rotation=0,this.label=new Label15,this.tooltip=makeSeriesTooltip20()}getStyle(){const{fill:e,fillOpacity:t,stroke:i,strokeWidth:o,strokeOpacity:r,lineDash:s,lineDashOffset:a,cornerRadius:n}=this;return{fill:e,fillOpacity:t,stroke:i,strokeWidth:o,strokeOpacity:r,lineDash:s,lineDashOffset:a,cornerRadius:n,opacity:1}}};__decorateClass([import_ag_charts_core257.Property],RadialBarSeriesProperties.prototype,"angleKey",2),__decorateClass([import_ag_charts_core257.Property],RadialBarSeriesProperties.prototype,"radiusKey",2),__decorateClass([import_ag_charts_core257.Property],RadialBarSeriesProperties.prototype,"angleName",2),__decorateClass([import_ag_charts_core257.Property],RadialBarSeriesProperties.prototype,"radiusName",2),__decorateClass([import_ag_charts_core257.Property],RadialBarSeriesProperties.prototype,"angleKeyAxis",2),__decorateClass([import_ag_charts_core257.Property],RadialBarSeriesProperties.prototype,"radiusKeyAxis",2),__decorateClass([import_ag_charts_core257.Property],RadialBarSeriesProperties.prototype,"legendItemName",2),__decorateClass([import_ag_charts_core257.Property],RadialBarSeriesProperties.prototype,"fill",2),__decorateClass([import_ag_charts_core257.Property],RadialBarSeriesProperties.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core257.Property],RadialBarSeriesProperties.prototype,"stroke",2),__decorateClass([import_ag_charts_core257.Property],RadialBarSeriesProperties.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core257.Property],RadialBarSeriesProperties.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core257.Property],RadialBarSeriesProperties.prototype,"lineDash",2),__decorateClass([import_ag_charts_core257.Property],RadialBarSeriesProperties.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core257.Property],RadialBarSeriesProperties.prototype,"cornerRadius",2),__decorateClass([import_ag_charts_core257.Property],RadialBarSeriesProperties.prototype,"styler",2),__decorateClass([import_ag_charts_core257.Property],RadialBarSeriesProperties.prototype,"itemStyler",2),__decorateClass([import_ag_charts_core257.Property],RadialBarSeriesProperties.prototype,"rotation",2),__decorateClass([import_ag_charts_core257.Property],RadialBarSeriesProperties.prototype,"stackGroup",2),__decorateClass([import_ag_charts_core257.Property],RadialBarSeriesProperties.prototype,"normalizedTo",2),__decorateClass([import_ag_charts_core257.Property],RadialBarSeriesProperties.prototype,"label",2),__decorateClass([import_ag_charts_core257.Property],RadialBarSeriesProperties.prototype,"tooltip",2);var import_ag_charts_community236=require("ag-charts-community"),{SectorBox:SectorBox3,motion:motion9}=import_ag_charts_community236._ModuleSupport;function fixRadialBarAnimationStatus(e,t,i){if(i==="updated"){if(e.previousDatum==null||Number.isNaN(e.previousDatum.innerRadius)||Number.isNaN(e.previousDatum.outerRadius))return"added";if(Number.isNaN(t.innerRadius)||Number.isNaN(t.outerRadius))return"removed"}return i==="added"&&e.previousDatum!=null?"updated":i}function prepareRadialBarSeriesAnimationFunctions(e){return{toFn:(o,r,s)=>{let a,n,l,c,h;return s==="removed"?(a=e,n=e,l=r.innerRadius,c=r.outerRadius,h=new SectorBox3(a,n,l,c)):(a=r.startAngle,n=r.endAngle,l=Number.isNaN(r.innerRadius)?o.innerRadius:r.innerRadius,c=Number.isNaN(r.outerRadius)?o.outerRadius:r.outerRadius,h=r.clipSector),{startAngle:a,endAngle:n,innerRadius:l,outerRadius:c,clipSector:h}},fromFn:(o,r,s)=>{s=fixRadialBarAnimationStatus(o,r,s);let a,n,l,c,h;s==="removed"||s==="updated"?(a=o.startAngle,n=o.endAngle,l=o.innerRadius,c=o.outerRadius,h=o.clipSector):(a=e,n=e,l=r.innerRadius,c=r.outerRadius),h??(h=new SectorBox3(a,n,l,c));const u=motion9.NODE_UPDATE_STATE_TO_PHASE_MAPPING[s];return{startAngle:a,endAngle:n,innerRadius:l,outerRadius:c,clipSector:h,phase:u}}}}function resetRadialBarSelectionsFn(e,t){return{centerX:0,centerY:0,innerRadius:t.innerRadius,outerRadius:t.outerRadius,startAngle:t.startAngle,endAngle:t.endAngle,clipSector:t.clipSector}}var{DEFAULT_POLAR_DIRECTION_KEYS:DEFAULT_POLAR_DIRECTION_KEYS3,DEFAULT_POLAR_DIRECTION_NAMES:DEFAULT_POLAR_DIRECTION_NAMES3,PolarAxis:PolarAxis3,diff:diff7,groupAccumulativeValueProperty:groupAccumulativeValueProperty3,keyProperty:keyProperty11,normaliseGroupTo:normaliseGroupTo2,valueProperty:valueProperty17,fixNumericExtent:fixNumericExtent10,resetLabelFn:resetLabelFn7,seriesLabelFadeInAnimation:seriesLabelFadeInAnimation8,seriesLabelFadeOutAnimation:seriesLabelFadeOutAnimation2,animationValidation:animationValidation9,createDatumId:createDatumId19,CategoryScale:CategoryScale4,Sector:Sector5,SectorBox:SectorBox4,motion:motion10,updateLabelNode:updateLabelNode8,getItemStyles:getItemStyles4}=import_ag_charts_community237._ModuleSupport,RadialBarSeriesNodeEvent=class extends import_ag_charts_community237._ModuleSupport.SeriesNodeEvent{constructor(e,t,i,o){super(e,t,i,o),this.angleKey=o.properties.angleKey,this.radiusKey=o.properties.radiusKey}},RadialBarSeries=class extends import_ag_charts_community237._ModuleSupport.PolarSeries{constructor(e){super({moduleCtx:e,categoryKey:"radiusValue",propertyKeys:DEFAULT_POLAR_DIRECTION_KEYS3,propertyNames:DEFAULT_POLAR_DIRECTION_NAMES3,canHaveAxes:!0,animationResetFns:{item:resetRadialBarSelectionsFn,label:resetLabelFn7}}),this.properties=new RadialBarSeriesProperties,this.NodeEvent=RadialBarSeriesNodeEvent,this.groupScale=new CategoryScale4,this.circleCache={r:0,cx:0,cy:0}}nodeFactory(){return new Sector5}getSeriesDomain(e){const{dataModel:t,processedData:i}=this;if(!i||!t)return{domain:[]};if(e===import_ag_charts_core258.ChartAxisDirection.Angle){const o=t.getDomain(this,"angleValue-end","value",i).domain,r=[Math.min(o[0],0),Math.max(o[1],0)];return{domain:fixNumericExtent10(r)}}else return t.getDomain(this,"radiusValue","key",i)}async processData(e){const{angleKey:t,radiusKey:i,normalizedTo:o}=this.properties,r=!this.ctx.animationManager.isSkipped(),s=this.getStackId(),a=`${s}-trailing`,n=[];(0,import_ag_charts_core258.isDefined)(o)&&n.push(normaliseGroupTo2([s,a],Math.abs(o))),this.needsDataModelDiff()&&this.processedData&&n.push(diff7(this.id,this.processedData)),r&&n.push(animationValidation9());const l=this.visible?{}:{forceValue:0},c=this.axes[import_ag_charts_core258.ChartAxisDirection.Radius]?.scale.type,h=this.axes[import_ag_charts_core258.ChartAxisDirection.Angle]?.scale.type,u=this.properties.allowNullKeys??!1;await this.requestDataModel(e,this.data,{props:[keyProperty11(i,c,{id:"radiusValue",allowNullKey:u}),valueProperty17(t,h,{id:"angleValue-raw",invalidValue:null,...l}),...groupAccumulativeValueProperty3(t,"normal",{id:"angleValue-end",rangeId:"angleValue-range",invalidValue:null,groupId:s,separateNegative:!0,...l},h),...groupAccumulativeValueProperty3(t,"trailing",{id:"angleValue-start",invalidValue:null,groupId:a,separateNegative:!0,...l},h),...n],groupByKeys:!0,groupByData:!1}),this.animationState.transition("updateData")}didCircleChange(){const e=this.radius,t=this.centerX,i=this.centerY,o=this.circleCache;return e===o.r&&t===o.cx&&i===o.cy?!1:(this.circleCache={r:e,cx:t,cy:i},!0)}maybeRefreshNodeData(){!this.didCircleChange()&&!this.nodeDataRefresh||(this.contextNodeData=this.createNodeData(),this.nodeData=this.contextNodeData?.nodeData??[],this.nodeDataRefresh=!1)}getAxisInnerRadius(){const e=this.axes[import_ag_charts_core258.ChartAxisDirection.Radius];return e instanceof PolarAxis3?this.radius*e.innerRadiusRatio:0}createNodeData(){const{processedData:e,dataModel:t}=this;if(!t||e?.type!=="grouped")return;const i=this.axes[import_ag_charts_core258.ChartAxisDirection.Angle],o=this.axes[import_ag_charts_core258.ChartAxisDirection.Radius],r=i?.scale,s=o?.scale;if(!r||!s)return;const a=t.resolveKeysById(this,"radiusValue",e),n=t.resolveColumnById(this,"angleValue-start",e),l=t.resolveColumnById(this,"angleValue-end",e),c=t.resolveColumnById(this,"angleValue-raw",e),h=t.resolveProcessedDataIndexById(this,"angleValue-range");let u=0;o instanceof RadiusCategoryAxis&&(u=o.groupPaddingInner);const{groupScale:d}=this,{index:p,visibleGroupCount:g}=this.ctx.seriesStateManager.getVisiblePeerGroupIndex(this);d.domain=Array.from({length:g}).map((w,T)=>String(T)),d.range=[0,Math.abs(s.bandwidth??0)],d.paddingInner=g>1?u:0;const y=d.bandwidth>=1?d.bandwidth:d.rawBandwidth,x=i.isReversed(),f=o.isReversed(),S=f?this.radius:this.getAxisInnerRadius(),v=(f?this.getAxisInnerRadius():this.radius)+S,b=this.getSeriesDomain(import_ag_charts_core258.ChartAxisDirection.Angle).domain,{angleKey:D,radiusKey:k,angleName:A,radiusName:M,legendItemName:I,label:_}=this.properties,P=(w,T,z,B)=>{const F=this.getLabelText(T,w,D,"angle",b,_,{value:T,datum:w,angleKey:D,radiusKey:k,angleName:A,radiusName:M,legendItemName:I});if(F)return{x:z,y:B,text:F,textAlign:"center",textBaseline:"middle"}},O=[],C=getItemStyles4((w,T,z)=>getItemStyle(this,w,T,z)),L={itemId:k,nodeData:O,labelData:O,styles:C};if(!this.visible)return L;const{dataSources:E}=e,V=E.get(this.id)?.data??[];for(const{datumIndex:w,group:T}of t.forEachGroupDatum(this,e)){const z=V[w],B=a[w];if(B===void 0&&!this.properties.allowNullKeys)return;const F=c[w],R=n[w],H=l[w],W=F>=0&&!Object.is(F,-0),K=T.aggregation[h][W?1:0],G=W===x;let U=r.convert(R,{clamp:!0}),X=r.convert(H,{clamp:!0}),J=r.convert(0,{clamp:!0}),oe=r.convert(K,{clamp:!0});G&&([J,oe]=[oe,J],[U,X]=[X,U]);const $=v-s.convert(B)+d.convert(String(p)),j=$+y,te=($+j)/2,re=U+(0,import_ag_charts_core258.angleBetween)(U,X)/2,Z=Math.cos(re)*te,Q=Math.sin(re)*te,q=this.properties.label.enabled?P(z,F,Z,Q):void 0,ee=new SectorBox4(U,X,$,j);O.push({series:this,datum:z,datumIndex:w,point:{x:Z,y:Q,size:0},midPoint:{x:Z,y:Q},label:q,angleValue:F,radiusValue:B,innerRadius:$,outerRadius:j,startAngle:J,endAngle:oe,clipSector:ee,reversed:G,index:w})}return L}update({seriesRect:e}){const t=this.checkResize(e);this.maybeRefreshNodeData(),this.contentGroup.translationX=this.centerX,this.contentGroup.translationY=this.centerY,this.highlightGroup.translationX=this.centerX,this.highlightGroup.translationY=this.centerY,this.labelGroup&&(this.labelGroup.translationX=this.centerX,this.labelGroup.translationY=this.centerY),this.updateSectorSelection(this.itemSelection,!1),this.updateSectorSelection(this.highlightSelection,!0),this.updateLabels(),t&&this.animationState.transition("resize"),this.animationState.transition("update")}updateSectorSelection(e,t){let i=[];const o=this.ctx.highlightManager?.getActiveHighlight();t?o?.datum&&o.series===this&&i.push(o):i=this.nodeData;const{contextNodeData:r}=this;if(!r)return;const s=this.ctx.highlightManager.getActiveHighlight(),a=this.getShapeFillBBox(),n=this.hasItemStylers();e.update(i,void 0,l=>this.getDatumId(l)).each((l,c)=>{const h=readDatum(c);if(h==null)return;if(n){const y=this.getHighlightState(o,t,c.datumIndex);c.style=getItemStyle(this,c,t,y)}const u=c.style??r.styles[this.getHighlightState(s,t,c.datumIndex)],d=u.cornerRadius,p=u.fill,g=(0,import_ag_charts_core258.isGradientFill)(p)&&p.bounds!=="item"?{centerX:0,centerY:0}:void 0;l.setStyleProperties(u,a,g),l.lineJoin="round",l.inset=l.stroke==null?0:l.strokeWidth/2,l.startInnerCornerRadius=h.reversed?d:0,l.startOuterCornerRadius=h.reversed?d:0,l.endInnerCornerRadius=h.reversed?0:d,l.endOuterCornerRadius=h.reversed?0:d,t&&(l.startAngle=c.startAngle,l.endAngle=c.endAngle,l.clipSector=c.clipSector,l.innerRadius=c.innerRadius,l.outerRadius=c.outerRadius)})}updateLabels(){const{properties:e}=this,t=this.ctx.highlightManager?.getActiveHighlight(),i=t?.series===this&&t?.datum?t:void 0,o=i?[i]:[];this.labelSelection.update(this.nodeData).each((r,s)=>{updateLabelNode8(this,r,e,e.label,s.label,!1,t),r.fillOpacity=this.getHighlightStyle(!1,s.datumIndex).opacity??1}),this.highlightLabelSelection.update(o,void 0,r=>this.getDatumId(r)).each((r,s)=>{updateLabelNode8(this,r,e,e.label,s.label,!0,t),r.fillOpacity=this.getHighlightStyle(!0,s.datumIndex).opacity??1})}getBarTransitionFunctions(){const e=this.axes[import_ag_charts_core258.ChartAxisDirection.Angle]?.scale;let t=0;if(!e)return prepareRadialBarSeriesAnimationFunctions(t);const i=Math.min(e.domain[0],e.domain[1]),o=Math.max(e.domain[0],e.domain[1]);return i<=0&&o>=0&&(t=e.convert(0)),prepareRadialBarSeriesAnimationFunctions(t)}animateEmptyUpdateReady(){const{labelSelection:e}=this,t=this.getBarTransitionFunctions();motion10.fromToMotion(this.id,"datums",this.ctx.animationManager,[this.itemSelection],t),seriesLabelFadeInAnimation8(this,"labels",this.ctx.animationManager,e,this.highlightLabelSelection)}animateClearingUpdateEmpty(){const{itemSelection:e}=this,{animationManager:t}=this.ctx,i=this.getBarTransitionFunctions();motion10.fromToMotion(this.id,"datums",t,[e],i),seriesLabelFadeOutAnimation2(this,"labels",t,this.labelSelection,this.highlightLabelSelection)}getTooltipContent(e){const{id:t,dataModel:i,processedData:o,axes:r,properties:s}=this,{angleKey:a,angleName:n,radiusKey:l,radiusName:c,legendItemName:h,tooltip:u}=s,d=r[import_ag_charts_core258.ChartAxisDirection.Angle],p=r[import_ag_charts_core258.ChartAxisDirection.Radius],g=this.nodeData?.[e];if(!i||!o||!d||!p||!g)return;const y=o.dataSources.get(this.id)?.data[e],x=i.resolveKeysById(this,"radiusValue",o)[e],f=i.resolveColumnById(this,"angleValue-raw",o)[e];if(x===void 0&&!this.properties.allowNullKeys)return;const S=getItemStyle(this,g,!1);return this.formatTooltipWithContext(u,{heading:this.getAxisValueText(p,"tooltip",x,y,l,void 0),symbol:this.legendItemSymbol(),data:[{label:n,fallbackLabel:a,value:this.getAxisValueText(d,"tooltip",f,y,a,void 0),missing:import_ag_charts_community237._ModuleSupport.isTooltipValueMissing(f)}]},{seriesId:t,datum:y,title:n,angleKey:a,angleName:n,radiusKey:l,radiusName:c,legendItemName:h,...S})}pickNodeClosestDatum(e){return this.pickNodeNearestDistantObject(e,this.itemSelection.nodes())}legendItemSymbol(){const{fill:e,stroke:t,fillOpacity:i,strokeOpacity:o,strokeWidth:r,lineDash:s,lineDashOffset:a}=getStyle(this,!1,import_ag_charts_community237._ModuleSupport.HighlightState.None),n={fill:e??"rgba(0, 0, 0, 0)",stroke:t??"rgba(0, 0, 0, 0)",fillOpacity:i,strokeOpacity:o,strokeWidth:r,lineDash:s,lineDashOffset:a};return(0,import_ag_charts_core258.isGradientFill)(n.fill)&&(n.fill={...n.fill,gradient:"linear",rotation:0,reverse:!1}),{marker:n}}getLegendData(e){if(e!=="category")return[];const{id:t,visible:i}=this,{angleKey:o,angleName:r,legendItemName:s,showInLegend:a}=this.properties;return[{legendType:"category",id:t,itemId:o,seriesId:t,enabled:i,label:{text:s??r??o},symbol:this.legendItemSymbol(),legendItemName:s,hideInLegend:!a}]}getDatumId(e){return createDatumId19(e.radiusValue)}computeLabelsBBox(){return null}getStackId(){return`radialBar-stack-${this.seriesGrouping?.groupIndex??this.id}-xValues`}hasItemStylers(){return this.properties.itemStyler!=null||this.properties.styler!=null||this.properties.label.itemStyler!=null}};RadialBarSeries.className="RadialBarSeries",RadialBarSeries.type="radial-bar";var import_ag_charts_community238=require("ag-charts-community"),import_ag_charts_core259=require("ag-charts-core"),{radialBarSeriesThemeableOptionsDef}=import_ag_charts_community238._ModuleSupport,radialBarSeriesOptionsDef={...import_ag_charts_core259.commonSeriesOptionsDefs,...radialBarSeriesThemeableOptionsDef,type:(0,import_ag_charts_core259.required)((0,import_ag_charts_core259.constant)("radial-bar")),angleKey:(0,import_ag_charts_core259.required)(import_ag_charts_core259.string),radiusKey:(0,import_ag_charts_core259.required)(import_ag_charts_core259.string),angleName:import_ag_charts_core259.string,radiusName:import_ag_charts_core259.string,legendItemName:import_ag_charts_core259.string,grouped:import_ag_charts_core259.boolean,stacked:import_ag_charts_core259.boolean,stackGroup:import_ag_charts_core259.string,normalizedTo:import_ag_charts_core259.number};radialBarSeriesOptionsDef.angleKeyAxis=(0,import_ag_charts_core259.undocumented)(import_ag_charts_core259.string),radialBarSeriesOptionsDef.radiusKeyAxis=(0,import_ag_charts_core259.undocumented)(import_ag_charts_core259.string);var import_ag_charts_core260=require("ag-charts-core"),RADIAL_BAR_SERIES_THEME={series:{fill:{$applySwitch:[{$path:"type"},{$palette:"fill"},["gradient",import_ag_charts_core260.FILL_GRADIENT_CONIC_SERIES_DEFAULTS],["image",import_ag_charts_core260.FILL_IMAGE_DEFAULTS],["pattern",import_ag_charts_core260.FILL_PATTERN_DEFAULTS]]},stroke:{$palette:"stroke"},strokeWidth:{$isUserOption:["./stroke",1,0]},label:{...import_ag_charts_core260.LABEL_BOXING_DEFAULTS,enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"chartBackgroundColor"}},highlight:import_ag_charts_core260.MULTI_SERIES_HIGHLIGHT_STYLE},axes:{[import_ag_charts_core260.POLAR_AXIS_TYPE.RADIUS_CATEGORY]:{innerRadiusRatio:.2,groupPaddingInner:.2,paddingInner:.2,paddingOuter:.1}}},RadialBarSeriesModule={type:"series",name:"radial-bar",chartType:"polar",enterprise:!0,stackable:!0,groupable:!0,version:import_ag_charts_community239.VERSION,dependencies:[import_ag_charts_community239.PolarChartModule],options:radialBarSeriesOptionsDef,defaultAxes:{angle:{type:import_ag_charts_core261.POLAR_AXIS_TYPE.ANGLE_NUMBER},radius:{type:import_ag_charts_core261.POLAR_AXIS_TYPE.RADIUS_CATEGORY}},axisKeys:{[import_ag_charts_core261.ChartAxisDirection.Angle]:"angleKeyAxis",[import_ag_charts_core261.ChartAxisDirection.Radius]:"radiusKeyAxis"},themeTemplate:RADIAL_BAR_SERIES_THEME,create:e=>new RadialBarSeries(e)},import_ag_charts_community242=require("ag-charts-community"),import_ag_charts_core266=require("ag-charts-core"),import_ag_charts_community240=require("ag-charts-community"),import_ag_charts_core263=require("ag-charts-core"),import_ag_charts_core262=require("ag-charts-core"),RadialColumnSeriesProperties=class extends RadialColumnSeriesBaseProperties{};__decorateClass([import_ag_charts_core262.Property],RadialColumnSeriesProperties.prototype,"columnWidthRatio",2),__decorateClass([import_ag_charts_core262.Property],RadialColumnSeriesProperties.prototype,"maxColumnWidthRatio",2);var{PolarAxis:PolarAxis4,RadialColumnShape,getRadialColumnWidth}=import_ag_charts_community240._ModuleSupport,RadialColumnSeries=class extends RadialColumnSeriesBase{constructor(e){super(e,{animationResetFns:{item:resetRadialColumnSelectionFn}}),this.properties=new RadialColumnSeriesProperties}getStackId(){return`radarColumn-stack-${this.seriesGrouping?.groupIndex??this.id}-yValues`}nodeFactory(){return new RadialColumnShape}getColumnTransitionFunctions(){const e=this.isRadiusAxisReversed()?this.radius:this.getAxisInnerRadius();return prepareRadialColumnAnimationFunctions(e)}isRadiusAxisCircle(){const e=this.axes[import_ag_charts_core263.ChartAxisDirection.Radius];return e instanceof PolarAxis4?e.shape==="circle":!1}updateItemPath(e,t,i){e.isBeveled=this.isRadiusAxisCircle(),i&&(e.innerRadius=t.innerRadius,e.outerRadius=t.outerRadius,e.startAngle=t.startAngle,e.endAngle=t.endAngle,e.columnWidth=t.columnWidth,e.axisInnerRadius=t.axisInnerRadius,e.axisOuterRadius=t.axisOuterRadius)}getColumnWidth(e,t){const{columnWidthRatio:i=.5,maxColumnWidthRatio:o=.5}=this.properties;return getRadialColumnWidth(e,t,this.radius,i,o)}hasItemStylers(){return this.properties.itemStyler!=null||this.properties.styler!=null||this.properties.label.itemStyler!=null}};RadialColumnSeries.className="RadialColumnSeries",RadialColumnSeries.type="radial-column";var import_ag_charts_community241=require("ag-charts-community"),import_ag_charts_core264=require("ag-charts-core"),{radialColumnSeriesThemeableOptionsDef}=import_ag_charts_community241._ModuleSupport,radialColumnSeriesOptionsDef={...import_ag_charts_core264.commonSeriesOptionsDefs,...radialColumnSeriesThemeableOptionsDef,type:(0,import_ag_charts_core264.required)((0,import_ag_charts_core264.constant)("radial-column")),angleKey:(0,import_ag_charts_core264.required)(import_ag_charts_core264.string),radiusKey:(0,import_ag_charts_core264.required)(import_ag_charts_core264.string),angleName:import_ag_charts_core264.string,radiusName:import_ag_charts_core264.string,legendItemName:import_ag_charts_core264.string,grouped:import_ag_charts_core264.boolean,stacked:import_ag_charts_core264.boolean,stackGroup:import_ag_charts_core264.string,normalizedTo:import_ag_charts_core264.number};radialColumnSeriesOptionsDef.angleKeyAxis=(0,import_ag_charts_core264.undocumented)(import_ag_charts_core264.string),radialColumnSeriesOptionsDef.radiusKeyAxis=(0,import_ag_charts_core264.undocumented)(import_ag_charts_core264.string);var import_ag_charts_core265=require("ag-charts-core"),RADIAL_COLUMN_SERIES_THEME={series:{fill:{$applySwitch:[{$path:"type"},{$palette:"fill"},["gradient",import_ag_charts_core265.FILL_GRADIENT_RADIAL_SERIES_DEFAULTS],["image",import_ag_charts_core265.FILL_IMAGE_DEFAULTS],["pattern",import_ag_charts_core265.FILL_PATTERN_DEFAULTS]]},stroke:{$palette:"stroke"},columnWidthRatio:.5,maxColumnWidthRatio:.5,strokeWidth:{$isUserOption:["./stroke",1,0]},label:{...import_ag_charts_core265.LABEL_BOXING_DEFAULTS,enabled:!1,fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"}},highlight:import_ag_charts_core265.MULTI_SERIES_HIGHLIGHT_STYLE},axes:{[import_ag_charts_core265.POLAR_AXIS_TYPE.ANGLE_CATEGORY]:{shape:{$findFirstSiblingNotOperation:import_ag_charts_core265.POLAR_AXIS_SHAPE.CIRCLE},groupPaddingInner:0,paddingInner:0,label:{spacing:10}},[import_ag_charts_core265.POLAR_AXIS_TYPE.RADIUS_NUMBER]:{shape:{$findFirstSiblingNotOperation:import_ag_charts_core265.POLAR_AXIS_SHAPE.CIRCLE},innerRadiusRatio:.5}}},RadialColumnSeriesModule={type:"series",name:"radial-column",chartType:"polar",enterprise:!0,stackable:!0,groupable:!0,version:import_ag_charts_community242.VERSION,dependencies:[import_ag_charts_community242.PolarChartModule],options:radialColumnSeriesOptionsDef,defaultAxes:{angle:{type:import_ag_charts_core266.POLAR_AXIS_TYPE.ANGLE_CATEGORY},radius:{type:import_ag_charts_core266.POLAR_AXIS_TYPE.RADIUS_NUMBER}},axisKeys:{[import_ag_charts_core266.ChartAxisDirection.Angle]:"angleKeyAxis",[import_ag_charts_core266.ChartAxisDirection.Radius]:"radiusKeyAxis"},themeTemplate:RADIAL_COLUMN_SERIES_THEME,create:e=>new RadialColumnSeries(e)},import_ag_charts_community247=require("ag-charts-community"),import_ag_charts_core270=require("ag-charts-core"),import_ag_charts_community246=require("ag-charts-community"),import_ag_charts_core269=require("ag-charts-core"),import_ag_charts_community243=require("ag-charts-community"),{SvgPath,Rotatable,Translatable,Scalable:Scalable2}=import_ag_charts_community243._ModuleSupport,RadialGaugeNeedle=class extends Rotatable(Scalable2(Translatable(SvgPath))){constructor(){super(...arguments),this.scalingCenterX=.5,this.scalingCenterY=.5,this.rotationCenterX=.5,this.rotationCenterY=.5}};RadialGaugeNeedle.defaultPathData="M0.50245 0.53745C0.481767 0.53745 0.465 0.520683 0.465 0.5C0.465 0.479317 0.481767 0.46255 0.50245 0.46255L1 0.500012L0.50245 0.53745Z";var import_ag_charts_community244=require("ag-charts-community"),import_ag_charts_core267=require("ag-charts-core"),{getColorStops:getColorStops2}=import_ag_charts_community244._ModuleSupport,{makeSeriesTooltip:makeSeriesTooltip21,SeriesProperties:SeriesProperties12,AxisLabel:AxisLabel6,Label:Label16}=import_ag_charts_community244._ModuleSupport,RadialGaugeDefaultTargetLabelProperties=class extends Label16{};__decorateClass([import_ag_charts_core267.Property],RadialGaugeDefaultTargetLabelProperties.prototype,"spacing",2);var RadialGaugeTargetProperties=class extends import_ag_charts_core267.BaseProperties{constructor(){super(...arguments),this.label=new RadialGaugeDefaultTargetLabelProperties}getStyle(){const{fill:e="black",fillOpacity:t=1,stroke:i="black",strokeWidth:o=0,strokeOpacity:r=1,lineDash:s=[0],lineDashOffset:a=0}=this;return{fill:e,fillOpacity:t,stroke:i,strokeWidth:o,strokeOpacity:r,lineDash:s,lineDashOffset:a}}};__decorateClass([import_ag_charts_core267.Property],RadialGaugeTargetProperties.prototype,"text",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeTargetProperties.prototype,"value",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeTargetProperties.prototype,"shape",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeTargetProperties.prototype,"placement",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeTargetProperties.prototype,"spacing",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeTargetProperties.prototype,"size",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeTargetProperties.prototype,"rotation",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeTargetProperties.prototype,"fill",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeTargetProperties.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeTargetProperties.prototype,"stroke",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeTargetProperties.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeTargetProperties.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeTargetProperties.prototype,"lineDash",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeTargetProperties.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeTargetProperties.prototype,"label",2);var RadialGaugeBarProperties=class extends import_ag_charts_core267.BaseProperties{constructor(){super(...arguments),this.enabled=!0,this.fills=new import_ag_charts_core267.PropertiesArray(import_ag_charts_community244._ModuleSupport.StopProperties),this.fillMode="continuous",this.fillOpacity=1,this.stroke="black",this.strokeWidth=0,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0}getStyle(e,t){const{enabled:i,fill:o,fills:r,fillMode:s,fillOpacity:a,stroke:n,strokeWidth:l,strokeOpacity:c,lineDash:h,lineDashOffset:u}=this;return{fill:i?o??createConicGradient(r,s,e,t):"none",fillOpacity:a,stroke:n,strokeWidth:l,strokeOpacity:c,lineDash:h,lineDashOffset:u}}};__decorateClass([import_ag_charts_core267.Property],RadialGaugeBarProperties.prototype,"enabled",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeBarProperties.prototype,"fills",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeBarProperties.prototype,"fillMode",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeBarProperties.prototype,"fill",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeBarProperties.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeBarProperties.prototype,"stroke",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeBarProperties.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeBarProperties.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeBarProperties.prototype,"lineDash",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeBarProperties.prototype,"lineDashOffset",2);var RadialGaugeScaleIntervalProperties=class extends import_ag_charts_core267.BaseProperties{constructor(){super(...arguments),this.values=void 0,this.step=void 0,this.minSpacing=0,this.maxSpacing=1e3}};__decorateClass([import_ag_charts_core267.Property],RadialGaugeScaleIntervalProperties.prototype,"values",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeScaleIntervalProperties.prototype,"step",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeScaleIntervalProperties.prototype,"minSpacing",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeScaleIntervalProperties.prototype,"maxSpacing",2);var RadialGaugeScaleLabelProperties=class extends AxisLabel6{},RadialGaugeScaleProperties=class extends import_ag_charts_core267.BaseProperties{constructor(){super(...arguments),this.min=0,this.max=1,this.fills=new import_ag_charts_core267.PropertiesArray(import_ag_charts_community244._ModuleSupport.StopProperties),this.fillMode="continuous",this.fillOpacity=1,this.stroke="black",this.strokeWidth=0,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0,this.defaultFill="black",this.interval=new RadialGaugeScaleIntervalProperties,this.label=new RadialGaugeScaleLabelProperties}getStyle(e,t,i){const{fill:o,fills:r,defaultFill:s,fillMode:a,fillOpacity:n,stroke:l,strokeWidth:c,strokeOpacity:h,lineDash:u,lineDashOffset:d}=this;return{fill:o??(e&&r.length===0?s:void 0)??createConicGradient(r,a,t,i),fillOpacity:n,stroke:l,strokeWidth:c,strokeOpacity:h,lineDash:u,lineDashOffset:d}}};__decorateClass([import_ag_charts_core267.Property],RadialGaugeScaleProperties.prototype,"min",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeScaleProperties.prototype,"max",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeScaleProperties.prototype,"fills",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeScaleProperties.prototype,"fillMode",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeScaleProperties.prototype,"fill",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeScaleProperties.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeScaleProperties.prototype,"stroke",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeScaleProperties.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeScaleProperties.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeScaleProperties.prototype,"lineDash",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeScaleProperties.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeScaleProperties.prototype,"defaultFill",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeScaleProperties.prototype,"interval",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeScaleProperties.prototype,"label",2);var RadialGaugeNeedleProperties=class extends import_ag_charts_core267.BaseProperties{constructor(){super(...arguments),this.enabled=!0,this.spacing=0,this.fill="black",this.fillOpacity=1,this.stroke="black",this.strokeWidth=0,this.strokeOpacity=1,this.lineDash=[0],this.lineDashOffset=0}};__decorateClass([import_ag_charts_core267.Property],RadialGaugeNeedleProperties.prototype,"enabled",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeNeedleProperties.prototype,"radiusRatio",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeNeedleProperties.prototype,"spacing",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeNeedleProperties.prototype,"fill",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeNeedleProperties.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeNeedleProperties.prototype,"stroke",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeNeedleProperties.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeNeedleProperties.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeNeedleProperties.prototype,"lineDash",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeNeedleProperties.prototype,"lineDashOffset",2);var RadialGaugeLabelProperties=class extends AutoSizedLabel{};__decorateClass([import_ag_charts_core267.Property],RadialGaugeLabelProperties.prototype,"text",2);var RadialGaugeSecondaryLabelProperties=class extends AutoSizedSecondaryLabel{};__decorateClass([import_ag_charts_core267.Property],RadialGaugeSecondaryLabelProperties.prototype,"text",2);var RadialGaugeSeriesProperties=class extends SeriesProperties12{constructor(){super(...arguments),this.startAngle=0,this.endAngle=0,this.segmentation=new GaugeSegmentationProperties,this.defaultColorRange=[],this.targets=new import_ag_charts_core267.PropertiesArray(RadialGaugeTargetProperties),this.defaultTarget=new RadialGaugeTargetProperties,this.outerRadiusRatio=1,this.innerRadiusRatio=1,this.cornerRadius=0,this.cornerMode="container",this.spacing=0,this.scale=new RadialGaugeScaleProperties,this.bar=new RadialGaugeBarProperties,this.needle=new RadialGaugeNeedleProperties,this.label=new RadialGaugeLabelProperties,this.secondaryLabel=new RadialGaugeSecondaryLabelProperties,this.tooltip=makeSeriesTooltip21()}};__decorateClass([import_ag_charts_core267.Property],RadialGaugeSeriesProperties.prototype,"value",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeSeriesProperties.prototype,"startAngle",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeSeriesProperties.prototype,"endAngle",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeSeriesProperties.prototype,"segmentation",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeSeriesProperties.prototype,"defaultColorRange",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeSeriesProperties.prototype,"targets",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeSeriesProperties.prototype,"defaultTarget",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeSeriesProperties.prototype,"outerRadiusRatio",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeSeriesProperties.prototype,"innerRadiusRatio",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeSeriesProperties.prototype,"outerRadius",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeSeriesProperties.prototype,"innerRadius",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeSeriesProperties.prototype,"cornerRadius",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeSeriesProperties.prototype,"cornerMode",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeSeriesProperties.prototype,"spacing",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeSeriesProperties.prototype,"scale",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeSeriesProperties.prototype,"bar",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeSeriesProperties.prototype,"needle",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeSeriesProperties.prototype,"label",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeSeriesProperties.prototype,"secondaryLabel",2),__decorateClass([import_ag_charts_core267.Property],RadialGaugeSeriesProperties.prototype,"tooltip",2);function createConicGradient(e,t,i,o){const{domain:r,range:s}=o,[a,n]=s,l=(0,import_ag_charts_core267.normalizeAngle360)((a+n)/2+Math.PI),c=(0,import_ag_charts_core267.normalizeAngle360Inclusive)(n-a);return{type:"gradient",gradient:"conic",colorSpace:"oklch",colorStops:getColorStops2(e,i,r,t).map(({color:u,stop:d})=>(d=Math.min(Math.max(d,0),1),d=(a+c*d-l)/(2*Math.PI),d=(d%1+1)%1,{stop:d,color:u})),bounds:"series",rotation:(0,import_ag_charts_core267.toDegrees)(l)+90}}var import_ag_charts_community245=require("ag-charts-community"),import_ag_charts_core268=require("ag-charts-core"),{SectorBox:SectorBox5}=import_ag_charts_community245._ModuleSupport;function computeClipSector(e){const{startAngle:t,endAngle:i,clipStartAngle:o,clipEndAngle:r,innerRadius:s,outerRadius:a}=e;if(!(o==null||r==null))return new SectorBox5(Math.max(o,t),Math.min(r,i),s,a)}function clipSectorVisibility(e,t,i){return Math.max(e,i.startAngle)<=Math.min(t,i.endAngle)}function hasClipSector(e){return e.clipStartAngle!=null&&e.clipEndAngle!=null}function datumClipSector(e,t){const{clipStartAngle:i,clipEndAngle:o,innerRadius:r,outerRadius:s}=e;return new SectorBox5(i,t?i:o,r,s)}function prepareRadialGaugeSeriesAnimationFunctions(e,t){const i=e?"initial":"update";return{node:{fromFn(s,a){const n=s.previousDatum;let{startAngle:l,endAngle:c}=n??a;const h=n!=null&&hasClipSector(n)?datumClipSector(n,e):void 0,u=hasClipSector(a)?datumClipSector(a,e):void 0;let d;return h!=null&&u!=null?d=h:h==null&&u!=null?(d=u,l=a.startAngle,c=a.endAngle):h!=null&&u==null?(d=void 0,l=a.startAngle,c=a.endAngle):e&&(c=l),{startAngle:l,endAngle:c,clipSector:d,phase:i}},toFn(s,a){const{startAngle:n,endAngle:l}=a;let c;return hasClipSector(a)&&(c=datumClipSector(a,!1)),{startAngle:n,endAngle:l,clipSector:c}},applyFn(s,a){const{startAngle:n,endAngle:l}=a;let{clipSector:c}=a;c!=null&&(c=new SectorBox5(Math.max(n,c.startAngle),Math.min(l,c.endAngle),c.innerRadius,c.outerRadius));const h=c==null||clipSectorVisibility(n,l,c);s.startAngle=n,s.endAngle=l,s.clipSector=c,s.visible=h}},needle:{fromFn(s){let{angle:a}=s.previousDatum??s.datum;return e&&(a=t),{rotation:a,phase:i}},toFn(s,a){const{angle:n}=a;return{rotation:n}}}}}function resetRadialGaugeSeriesResetSectorFunction(e,t){const{startAngle:i,endAngle:o}=t,r=computeClipSector(t),s=r==null||clipSectorVisibility(i,o,r);return{startAngle:i,endAngle:o,clipSector:r,visible:s}}function resetRadialGaugeSeriesResetNeedleFunction(e,t){const{angle:i}=t;return{rotation:i}}var verticalAlignFactors3={top:0,middle:.5,bottom:1};function formatRadialGaugeLabels(e,t,i,o,r,s){const{padding:a,textAlign:n,verticalAlign:l}=o;let c,h;if(i.each((b,D)=>{D.label==="primary"?c=D:D.label==="secondary"&&(h=D)}),c==null)return;const u=getLabelText(e.id,t,c,s?.label);if(u==null)return;const d=h==null?void 0:getLabelText(e.id,t,h,s?.secondaryLabel),p={padding:a},g=n==="center"?2:1,y=l==="middle"?2:1,x=b=>({width:Math.sqrt(Math.max(r**2-(b/y)**2,0))*g,height:Math.min(b,y*r),meta:null});let f,S,m;if(h!=null&&d!=null){const b=formatStackedLabels((0,import_ag_charts_core268.toPlainText)(u),c,(0,import_ag_charts_core268.toPlainText)(d),h,p,x);f=b?.label,S=b?.secondaryLabel,m=b?.height??0}else{const b=formatSingleLabel((0,import_ag_charts_core268.toPlainText)(u),c,p,x);f=b?.[0],S=void 0,m=b?.[0].height??0}const v=m*verticalAlignFactors3[l];i.each((b,D)=>{let k;if(D.label==="primary"?k=f:D.label==="secondary"&&(k=S),k==null){b.visible=!1;return}b.visible=!0,b.text=k.text,b.fontSize=k.fontSize,b.lineHeight=k.lineHeight,b.textAlign=n,b.textBaseline="middle";const A=D.label==="primary"?k.height/2:m-k.height/2;b.y=D.centerY+A-v,b.x=D.centerX})}var{fromToMotion:fromToMotion5,resetMotion:resetMotion4,SeriesNodePickMode:SeriesNodePickMode15,createDatumId:createDatumId20,sectorBox,BBox:BBox25,Group:Group20,PointerEvents:PointerEvents12,Selection:Selection16,Sector:Sector6,SectorBox:SectorBox6,Transformable:Transformable4,TransformableText:TransformableText3,Text:Text9,Marker:Marker6}=import_ag_charts_community246._ModuleSupport,targetPlacementRotation={inside:90,middle:0,outside:-90},outsideLabelPlacements=[{textAlign:"left",textBaseline:"top"},{textAlign:"right",textBaseline:"top"},{textAlign:"right",textBaseline:"bottom"},{textAlign:"left",textBaseline:"bottom"}],insideLabelPlacements=[{textAlign:"right",textBaseline:"bottom"},{textAlign:"left",textBaseline:"bottom"},{textAlign:"left",textBaseline:"top"},{textAlign:"right",textBaseline:"top"}],RadialGaugeSeries=class extends import_ag_charts_community246._ModuleSupport.Series{constructor(e){super({moduleCtx:e,pickModes:[SeriesNodePickMode15.EXACT_SHAPE_MATCH,SeriesNodePickMode15.NEAREST_NODE]}),this.centerX=0,this.centerY=0,this.radius=0,this.textAlign="center",this.verticalAlign="middle",this.properties=new RadialGaugeSeriesProperties,this.scale=new LinearAngleScale,this.scaleGroup=this.contentGroup.appendChild(new Group20({name:"scaleGroup"})),this.itemGroup=this.contentGroup.appendChild(new Group20({name:"itemGroup"})),this.itemNeedleGroup=this.contentGroup.appendChild(new Group20({name:"itemNeedleGroup"})),this.itemTargetGroup=this.contentGroup.appendChild(new Group20({name:"itemTargetGroup"})),this.itemTargetLabelGroup=this.contentGroup.appendChild(new Group20({name:"itemTargetLabelGroup"})),this.itemLabelGroup=this.contentGroup.appendChild(new Group20({name:"itemLabelGroup"})),this.highlightTargetGroup=this.highlightGroup.appendChild(new Group20({name:"itemTargetLabelGroup"})),this.tickGroup=this.contentGroup.appendChild(new Group20({name:"tickGroup"})),this.scaleSelection=Selection16.select(this.scaleGroup,()=>this.nodeFactory()),this.datumSelection=Selection16.select(this.itemGroup,()=>this.nodeFactory()),this.needleSelection=Selection16.select(this.itemNeedleGroup,RadialGaugeNeedle),this.targetSelection=Selection16.select(this.itemTargetGroup,()=>this.markerFactory()),this.targetLabelSelection=Selection16.select(this.itemTargetLabelGroup,Text9),this.labelSelection=Selection16.select(this.itemLabelGroup,Text9),this.highlightTargetSelection=Selection16.select(this.highlightTargetGroup,()=>this.markerFactory()),this.tickSelection=Selection16.select(this.tickGroup,import_ag_charts_community246._ModuleSupport.TransformableText),this.datumUnion=new DatumUnion,this.animationState=new import_ag_charts_core269.StateMachine("empty",{empty:{update:{target:"ready",action:()=>this.animateEmptyUpdateReady()},reset:"empty",skip:"ready"},ready:{updateData:"waiting",clear:"clearing",resize:()=>this.animateReadyResize(),reset:"empty",skip:"ready"},waiting:{update:{target:"ready",action:()=>this.animateWaitingUpdateReady()},reset:"empty",skip:"ready"},clearing:{update:{target:"empty"},reset:"empty",skip:"ready"}}),this.scaleGroup.pointerEvents=PointerEvents12.None,this.tickGroup.pointerEvents=PointerEvents12.None,this.itemNeedleGroup.pointerEvents=PointerEvents12.None,this.itemLabelGroup.pointerEvents=PointerEvents12.None}get hasData(){return this.properties.value!=null}nodeFactory(){return new Sector6}markerFactory(){const e=new Marker6;return e.size=1,e}processData(){this.nodeDataRefresh=!0,this.animationState.transition("updateData")}formatLabel(e){const{min:t,max:i}=this.properties.scale;return formatLabel(e,{min:t,max:i})}layoutScale(){const{scale:e,properties:t}=this,{seriesRectWidth:i,seriesRectHeight:o}=this.nodeDataDependencies,{scale:r,outerRadius:s}=this.properties,{min:a,max:n,label:l,interval:c}=r,h=(0,import_ag_charts_core269.toRadians)(t.startAngle-90),u=(0,import_ag_charts_core269.toRadians)(t.endAngle-90),p=(0,import_ag_charts_core269.normalizeAngle360Inclusive)(u-h)>Math.PI,g=p||(0,import_ag_charts_core269.isBetweenAngles)(1.5*Math.PI,h,u),y=p||(0,import_ag_charts_core269.isBetweenAngles)(0*Math.PI,h,u),x=p||(0,import_ag_charts_core269.isBetweenAngles)(.5*Math.PI,h,u),f=p||(0,import_ag_charts_core269.isBetweenAngles)(1*Math.PI,h,u);let S;f&&!y?S="right":!f&&y?S="left":S="center";let m;g&&!x?m="bottom":!g&&x?m="top":m="middle";const v=sectorBox({startAngle:h,endAngle:u,innerRadius:0,outerRadius:.5}),b=-(v.x+v.width/2)*2,D=-(v.y+v.height/2)*2,k=Math.min(i/v.width,o/v.height);e.domain=[a,n],e.range=[h,u],e.arcLength=k/2;const{maxSpacing:A,minSpacing:M}=c,{arcLength:I}=e,_=A?Math.floor(I/A):1,P=M?Math.floor(I/M):1/0,O=Math.floor(4/Math.PI*Math.abs(e.range[0]-e.range[1])),C=Math.max(_,Math.min(P,O)),L=c.values??e.ticks({nice:[!1,!1],interval:c.step,minTickCount:_,maxTickCount:P,tickCount:C})?.ticks??[],E=(0,import_ag_charts_core269.tickFormat)(L,typeof l.format=="string"?l.format:void 0),V=[];for(const[F,R]of L.entries()){let H;l.formatter&&(H=formatWithContext(this.ctx,l.formatter,{value:R,index:F,domain:e.domain,boundSeries:void 0})),H??(H=E?.(R)),H!=null&&V.push({index:F,value:R,text:H})}const w=.5*k,T=l.enabled&&s==null&&V.length>0?this.getTickLabelInset({tickData:V,radius:w,centerXOffset:b,centerYOffset:D,seriesRectWidth:i,seriesRectHeight:o,spacing:l.spacing,rotation:(0,import_ag_charts_core269.toRadians)(l.rotation??0)}):0,z=Math.max(w-T,0),B=s??z;return this.centerX=i/2+b*B,this.centerY=o/2+D*B,this.radius=B,this.textAlign=S,this.verticalAlign=m,V}getShapeFillBBox(){const{centerX:e,centerY:t,radius:i}=this,o=new BBox25(e-i,t-i,2*i,2*i);return{series:o,axis:o}}getTargets(){const{properties:e}=this,t=e.defaultTarget;return e.targets.map(i=>{const{text:o=t.text,value:r=t.value??0,shape:s=t.shape??"triangle",rotation:a=t.rotation??0,placement:n=t.placement??"middle",spacing:l=t.spacing??0,size:c=t.size??0}=i,{enabled:h=t.label.enabled,color:u=t.label.color??"black",fontStyle:d=t.label.fontStyle??"normal",fontWeight:p=t.label.fontWeight??"normal",fontSize:g=t.label.fontSize,fontFamily:y=t.label.fontFamily,spacing:x=t.label.spacing??0}=i.label;return{text:o,value:r,shape:s,placement:n,spacing:l,size:c,rotation:a,label:{enabled:h,color:u,fontStyle:d,fontWeight:p,fontSize:g,fontFamily:y,spacing:x},style:i.getStyle()}})}getTargetRadius(e){const{radius:t,properties:i}=this,{innerRadiusRatio:o,outerRadiusRatio:r}=i,{placement:s,spacing:a,size:n}=e,l=t*r,c=t*o;switch(s){case"inside":return Math.max(c-a-n/2,0);case"outside":return l+a+n/2;default:return(c+l)/2}}getTargetLabel(e){const{scale:t}=this,{value:i,size:o,placement:r,label:s}=e,{spacing:a,color:n,fontStyle:l,fontWeight:c,fontSize:h,fontFamily:u}=s,d=t.convert(i),p=Math.trunc((0,import_ag_charts_core269.normalizeAngle360)(d)/(Math.PI/2)),g=o/2+a;let y,x,f,S;switch(r){case"outside":({textAlign:y,textBaseline:x}=outsideLabelPlacements[p]),f=g*Math.cos(d),S=g*Math.sin(d);break;case"inside":({textAlign:y,textBaseline:x}=insideLabelPlacements[p]),f=-g*Math.cos(d),S=-g*Math.sin(d);break;default:y="center",x="bottom",f=0,S=-g;break}return{offsetX:f,offsetY:S,fill:n,textAlign:y,textBaseline:x,fontStyle:l,fontWeight:c,fontSize:h,fontFamily:u,lineHeight:void 0}}createNodeData(){const e=this.layoutScale(),{id:t,scale:i,properties:o,radius:r,centerX:s,centerY:a}=this,{value:n,innerRadiusRatio:l,outerRadiusRatio:c,segmentation:h,cornerRadius:u,cornerMode:d,needle:p,bar:g,scale:y,label:x,secondaryLabel:f}=o,{outerRadius:S=r*c,innerRadius:m=r*l,defaultColorRange:v}=o,b=this.getTargets(),D=[],k=[],A=[],M=[],I=[],_=d==="item",P=i.convert(i.domain[0]),O=i.convert(n),C=Math.ceil((0,import_ag_charts_core269.normalizeAngle360Inclusive)(O-P)*r);let L=h.enabled?h.interval.getSegments(i,C):void 0;const E=g.getStyle(v,i),V=y.getStyle(g.enabled,v,i);if(L==null&&_){const w=Math.min(...i.domain),T=Math.max(...i.domain),z={value:n,segmentStart:w,segmentEnd:T},F=Math.min(u,(S-m)/2)/((m+S)/2);D.push({series:this,itemId:"value",datum:z,datumIndex:{type:0},type:0,centerX:s,centerY:a,outerRadius:S,innerRadius:m,startAngle:P-F,endAngle:O+F,clipStartAngle:void 0,clipEndAngle:void 0,startCornerRadius:u,endCornerRadius:u,style:E}),I.push({series:this,itemId:"scale",datum:z,datumIndex:{type:0},type:0,centerX:s,centerY:a,outerRadius:S,innerRadius:m,startAngle:i.range[0]-F,endAngle:i.range[1]+F,clipStartAngle:void 0,clipEndAngle:void 0,startCornerRadius:u,endCornerRadius:u,style:V})}else{L??(L=i.domain);for(let w=0;w<L.length-1;w++){const T=L[w],z=L[w+1],B={value:n,segmentStart:T,segmentEnd:z},F=w===0,R=w===L.length-2,H=i.convert(T),W=i.convert(z);D.push({series:this,itemId:`value-${w}`,datum:B,datumIndex:{type:0},type:0,centerX:s,centerY:a,outerRadius:S,innerRadius:m,startAngle:H,endAngle:W,clipStartAngle:P,clipEndAngle:O,startCornerRadius:_||F?u:0,endCornerRadius:_||R?u:0,style:E}),I.push({series:this,itemId:`scale-${w}`,datum:B,datumIndex:{type:0},type:0,centerX:s,centerY:a,outerRadius:S,innerRadius:m,startAngle:H,endAngle:W,clipStartAngle:void 0,clipEndAngle:void 0,startCornerRadius:_||F?u:0,endCornerRadius:_||R?u:0,style:V})}}if(!p.enabled&&x.enabled){const{text:w,color:T,fontSize:z,minimumFontSize:B,fontStyle:F,fontWeight:R,fontFamily:H,lineHeight:W,formatter:K=G=>this.formatLabel(G.value)}=x;M.push({label:"primary",centerX:s,centerY:a,text:w,value:n,fill:T,fontSize:z,minimumFontSize:B,fontStyle:F,fontWeight:R,fontFamily:H,lineHeight:W,formatter:K})}if(!p.enabled&&f.enabled){const{text:w,color:T,fontSize:z,minimumFontSize:B,fontStyle:F,fontWeight:R,fontFamily:H,lineHeight:W,formatter:K}=f;M.push({label:"secondary",centerX:s,centerY:a,text:w,value:n,fill:T,fontSize:z,minimumFontSize:B,fontStyle:F,fontWeight:R,fontFamily:H,lineHeight:W,formatter:K})}if(p.enabled){let w=p.radiusRatio==null?m:r*p.radiusRatio;w=Math.max(w-p.spacing,0);const T=i.convert(n);A.push({centerX:s,centerY:a,radius:w,angle:T,series:this})}for(let w=0;w<b.length;w+=1){const T=b[w],{value:z,text:B,size:F,shape:R,style:H}=T;if(z<Math.min(...i.domain)||z>Math.max(...i.domain))continue;const W=this.getTargetRadius(T),K=i.convert(z),G=(0,import_ag_charts_core269.toRadians)(T.rotation+targetPlacementRotation[T.placement]);k.push({series:this,itemId:`target-${w}`,midPoint:{x:W*Math.cos(K)+s,y:W*Math.sin(K)+a},datum:{value:z},datumIndex:{type:1,index:w},type:1,value:z,text:B,centerX:s,centerY:a,shape:R,radius:W,angle:K,rotation:G,size:F,label:this.getTargetLabel(T),style:H})}return{itemId:t,nodeData:D,needleData:A,targetData:k,labelData:M,scaleData:I,tickData:e}}findNodeDatum(e){return findGaugeNodeDatum(this,e)}updateSelections(e){(this.nodeDataRefresh||e)&&(this.contextNodeData=this.createNodeData(),this.nodeDataRefresh=!1)}highlightDatum(e){if(e?.series===this&&e.type===1)return e}update({seriesRect:e}){const{datumSelection:t,labelSelection:i,needleSelection:o,targetSelection:r,targetLabelSelection:s,scaleSelection:a,highlightTargetSelection:n,tickSelection:l}=this,c=this.checkResize(e);this.updateSelections(c),this.contentGroup.visible=this.visible,this.contentGroup.opacity=this.getOpacity();const h=this.contextNodeData?.nodeData??[],u=this.contextNodeData?.labelData??[],d=this.contextNodeData?.needleData??[],p=this.contextNodeData?.targetData??[],g=this.contextNodeData?.scaleData??[],y=this.contextNodeData?.tickData??[],x=this.highlightDatum(this.ctx.highlightManager.getActiveHighlight());this.scaleSelection=this.updateScaleSelection({scaleData:g,scaleSelection:a}),this.updateScaleNodes({scaleSelection:a}),this.needleSelection=this.updateNeedleSelection({needleData:d,needleSelection:o}),this.updateNeedleNodes({needleSelection:o}),this.targetSelection=this.updateTargetSelection({targetData:p,targetSelection:r}),this.updateTargetStyles({targetSelection:r,isHighlight:!1}),this.updateTargetNodes({targetSelection:r}),this.targetLabelSelection=this.updateTargetLabelSelection({targetData:p,targetLabelSelection:s}),this.updateTargetLabelNodes({targetLabelSelection:s}),this.datumSelection=this.updateDatumSelection({nodeData:h,datumSelection:t}),this.updateDatumNodes({datumSelection:t}),this.labelSelection=this.updateLabelSelection({labelData:u,labelSelection:i}),this.updateLabelNodes({labelSelection:i}),this.highlightTargetSelection=this.updateTargetSelection({targetData:x==null?[]:[x],targetSelection:n}),this.updateTargetStyles({targetSelection:n,isHighlight:!0}),this.updateTargetNodes({targetSelection:n}),this.tickSelection=this.updateTickSelection({tickData:y,tickSelection:l}),this.updateTickNodes({tickSelection:l}),c&&this.animationState.transition("resize"),this.animationState.transition("update")}updateDatumSelection(e){return e.datumSelection.update(e.nodeData,void 0,t=>createDatumId20(e.nodeData.length,t.itemId))}updateDatumNodes(e){const{datumSelection:t}=e,{ctx:i,properties:o}=this,{segmentation:r}=o,s=r.spacing??0,a=i.animationManager.isSkipped(),n=this.getShapeFillBBox();t.each((l,c)=>{const{centerX:h,centerY:u,innerRadius:d,outerRadius:p,startCornerRadius:g,endCornerRadius:y}=c;l.centerX=h,l.centerY=u,l.innerRadius=d,l.outerRadius=p,l.pointerEvents=this.properties.bar.enabled?import_ag_charts_community246._ModuleSupport.PointerEvents.All:import_ag_charts_community246._ModuleSupport.PointerEvents.None,l.setStyleProperties(c.style,n),l.startOuterCornerRadius=g,l.startInnerCornerRadius=g,l.endOuterCornerRadius=y,l.endInnerCornerRadius=y,l.radialEdgeInset=(s+l.strokeWidth)/2,l.concentricEdgeInset=l.strokeWidth/2,c.midPoint=l.getBBox().computeCenter(),(a||l.previousDatum==null)&&l.setProperties(resetRadialGaugeSeriesResetSectorFunction(l,c))}),this.datumUnion.update(t,this.itemGroup,import_ag_charts_community246._ModuleSupport.Sector,(l,c,h)=>{l.clipSector??(l.clipSector=new SectorBox6(Number.NaN,Number.NaN,Number.NaN,Number.NaN)),l.centerX=c.centerX,l.centerY=c.centerY,l.outerRadius=l.clipSector.outerRadius=c.outerRadius,l.innerRadius=l.clipSector.innerRadius=c.innerRadius,l.startAngle=l.clipSector.startAngle=c.startAngle,l.startInnerCornerRadius=c.startInnerCornerRadius,l.startOuterCornerRadius=c.startOuterCornerRadius,l.endAngle=h.endAngle,l.clipSector.endAngle=h.clipSector?.endAngle??h.endAngle,l.endInnerCornerRadius=h.endInnerCornerRadius,l.endOuterCornerRadius=h.endOuterCornerRadius,l.pointerEvents=import_ag_charts_community246._ModuleSupport.PointerEvents.None})}updateScaleSelection(e){return e.scaleSelection.update(e.scaleData,void 0,t=>createDatumId20(e.scaleData.length,t.itemId))}updateScaleNodes(e){const{scaleSelection:t}=e,{segmentation:i}=this.properties,o=i.spacing??0,r=this.getShapeFillBBox();t.each((s,a)=>{const{centerX:n,centerY:l,innerRadius:c,outerRadius:h,startCornerRadius:u,endCornerRadius:d}=a;s.centerX=n,s.centerY=l,s.innerRadius=c,s.outerRadius=h,s.setStyleProperties(a.style,r),s.startOuterCornerRadius=u,s.startInnerCornerRadius=u,s.endOuterCornerRadius=d,s.endInnerCornerRadius=d,s.radialEdgeInset=(o+s.strokeWidth)/2,s.concentricEdgeInset=s.strokeWidth/2,s.setProperties(resetRadialGaugeSeriesResetSectorFunction(s,a))})}updateNeedleSelection(e){return e.needleSelection.update(e.needleData,void 0,()=>createDatumId20(0))}updateNeedleNodes(e){const{needleSelection:t}=e,{fill:i,fillOpacity:o,stroke:r,strokeOpacity:s,strokeWidth:a,lineDash:n,lineDashOffset:l}=this.properties.needle,c=this.ctx.animationManager.isSkipped();t.each((h,u)=>{const{centerX:d,centerY:p,radius:g}=u,y=g*2;h.d=RadialGaugeNeedle.defaultPathData,h.setStyleProperties({fill:i,fillOpacity:o,stroke:r,strokeOpacity:s,strokeWidth:a/y,lineDash:n.map(x=>x/y),lineDashOffset:l/y}),h.translationX=d,h.translationY=p,h.scalingX=y,h.scalingY=y,c&&h.setProperties(resetRadialGaugeSeriesResetNeedleFunction(h,u))})}updateTargetSelection(e){return e.targetSelection.update(e.targetData,void 0,t=>t.itemId)}updateTargetStyles({targetSelection:e,isHighlight:t}){e.each((i,o)=>{o.style=this.getTargetStyle(t,o)})}updateTargetNodes({targetSelection:e}){e.each((t,i)=>{const{centerX:o,centerY:r,angle:s,radius:a,shape:n,size:l,rotation:c}=i;t.setStyleProperties(i.style),t.size=l,t.shape=n==="line"?lineMarker:n,t.translationX=o+a*Math.cos(s),t.translationY=r+a*Math.sin(s),t.rotation=s+c})}getTargetStyle(e,{datumIndex:t,style:i}){const o=this.getHighlightStyle(e,t);return(0,import_ag_charts_core269.mergeDefaults)(o,{...i,opacity:1})}updateTargetLabelSelection(e){return e.targetLabelSelection.update(e.targetData,void 0,t=>t.itemId)}updateTargetLabelNodes(e){const{targetLabelSelection:t}=e;t.each((i,o)=>{const{centerX:r,centerY:s,radius:a,angle:n,text:l}=o,{offsetX:c,offsetY:h,fill:u,fontStyle:d,fontWeight:p,fontSize:g,fontFamily:y,textAlign:x,textBaseline:f}=o.label;if(l==null){i.visible=!1;return}i.visible=!0,i.x=r+a*Math.cos(n)+c,i.y=s+a*Math.sin(n)+h,i.text=l,i.fill=u,i.fontStyle=d,i.fontWeight=p,i.fontSize=g,i.fontFamily=y,i.textAlign=x,i.textBaseline=f})}updateLabelSelection(e){return e.labelSelection.update(e.labelData,void 0,t=>t.label)}updateLabelNodes(e){const{labelSelection:t}=e,i=this.ctx.animationManager.isSkipped();t.each((o,r)=>{o.fill=r.fill,o.fontStyle=r.fontStyle,o.fontWeight=r.fontWeight,o.fontFamily=r.fontFamily}),(i||this.labelsHaveExplicitText())&&this.formatLabelText()}updateTickSelection(e){return e.tickSelection.update(e.tickData,void 0,t=>t.index)}updateTickNodes(e){const{scale:t,radius:i,centerX:o,centerY:r,properties:s}=this,{enabled:a,color:n,fontFamily:l,fontSize:c,fontStyle:h,fontWeight:u,spacing:d}=s.scale.label,p=(0,import_ag_charts_core269.toRadians)(s.scale.label.rotation??0);e.tickSelection.each((g,y)=>{if(!a){g.visible=!1;return}g.visible=!0,g.text=y.text,g.fill=n,g.fontFamily=l,g.fontSize=c,g.fontStyle=h,g.fontWeight=u;const x=t.convert(y.value),{textAlign:f,textBaseline:S}=this.getTickLabelAlign(x),m=o+(i+d)*Math.cos(x),v=r+(i+d)*Math.sin(x);g.textAlign=f,g.textBaseline=S,g.x=m,g.y=v,g.rotationCenterX=m,g.rotationCenterY=v,g.rotation=p})}getTickLabelAlign(e){const t=Math.cos(e),i=Math.sin(e);let o,r;const s=(0,import_ag_charts_core269.isNumberEqual)(t,0),a=(0,import_ag_charts_core269.isNumberEqual)(i,0),n=t>0&&!s,l=i>0&&!a;return o="right",s?o="center":n&&(o="left"),r="bottom",a?r="middle":l&&(r="top"),{textAlign:o,textBaseline:r}}getTickLabelInset(e){const{tickData:t,radius:i,centerXOffset:o,centerYOffset:r,seriesRectWidth:s,seriesRectHeight:a,spacing:n,rotation:l}=e,{label:c}=this.properties.scale,h=s/2+o*i,u=a/2+r*i,d=new TransformableText3;d.fontFamily=c.fontFamily,d.fontSize=c.fontSize,d.fontStyle=c.fontStyle,d.fontWeight=c.fontWeight,d.rotation=l;const p=1e-6;let g=0;for(const y of t){const x=this.scale.convert(y.value),f=Math.cos(x),S=Math.sin(x),m=h+(i+n)*f,v=u+(i+n)*S,{textAlign:b,textBaseline:D}=this.getTickLabelAlign(x);d.text=y.text,d.x=m,d.y=v,d.textAlign=b,d.textBaseline=D,d.rotationCenterX=m,d.rotationCenterY=v;const k=l?Transformable4.toCanvas(d):d.getBBox();if(k==null)continue;const A=k.x,M=k.x+k.width,I=k.y,_=k.y+k.height,P=Math.max(0,-A),O=Math.max(0,M-s),C=Math.max(0,-I),L=Math.max(0,_-a),E=o+f;Math.abs(E)>p&&(O>0&&E>0?g=Math.max(g,O/E):P>0&&E<0&&(g=Math.max(g,P/-E)));const V=r+S;Math.abs(V)>p&&(L>0&&V>0?g=Math.max(g,L/V):C>0&&V<0&&(g=Math.max(g,C/-V)))}return g}labelsHaveExplicitText(){for(const{datum:e}of this.labelSelection)if(e.text==null)return!1;return!0}formatLabelText(e){const{labelSelection:t,radius:i,textAlign:o,verticalAlign:r}=this,{spacing:s,innerRadiusRatio:a}=this.properties;formatRadialGaugeLabels(this,this.ctx,t,{padding:s,textAlign:o,verticalAlign:r},i*a,e)}resetAllAnimation(){this.ctx.animationManager.stopByAnimationGroupId(this.id),resetMotion4([this.datumSelection],resetRadialGaugeSeriesResetSectorFunction),resetMotion4([this.needleSelection],resetRadialGaugeSeriesResetNeedleFunction),this.formatLabelText()}resetAnimation(e){e==="initial"?this.animationState.transition("reset"):e==="ready"&&this.animationState.transition("skip")}animateLabelText(e={}){const{animationManager:t}=this.ctx;let i,o,r,s;if(this.labelSelection.each((a,n)=>{a.opacity=1,n.label==="primary"?(i=a.previousDatum?.value??e.from??n.value,o=n.value):n.label==="secondary"&&(r=a.previousDatum?.value??e.from??n.value,s=n.value)}),!this.labelsHaveExplicitText())if(o==null||s==null)this.formatLabelText();else if(i===o&&r===s)this.formatLabelText({label:o,secondaryLabel:s});else{const a=`${this.id}_labels`;t.animate({id:a,groupId:"label",from:{label:i,secondaryLabel:r},to:{label:o,secondaryLabel:s},phase:e.phase??"update",onUpdate:n=>this.formatLabelText(n),onStop:()=>this.formatLabelText({label:o,secondaryLabel:s})})}}animateEmptyUpdateReady(){const{animationManager:e}=this.ctx,{node:t,needle:i}=prepareRadialGaugeSeriesAnimationFunctions(!0,this.scale.range[0]);fromToMotion5(this.id,"node",e,[this.datumSelection],t,(o,r)=>r.itemId),fromToMotion5(this.id,"needle",e,[this.needleSelection],i,()=>"needle"),fromToMotion5(this.id,"label",e,[this.labelSelection],fadeInFns,(o,r)=>r.label),this.animateLabelText({from:this.properties.scale.min,phase:"initial"})}animateWaitingUpdateReady(){const{animationManager:e}=this.ctx,{node:t,needle:i}=prepareRadialGaugeSeriesAnimationFunctions(!1,this.scale.range[0]);fromToMotion5(this.id,"node",e,[this.datumSelection],t,(o,r)=>r.itemId),fromToMotion5(this.id,"needle",e,[this.needleSelection],i,()=>"needle"),this.animateLabelText()}animateReadyResize(){this.resetAllAnimation()}dataCount(){return Number.NaN}getSeriesDomain(){return{domain:[Number.NaN,Number.NaN]}}getSeriesRange(){return[Number.NaN,Number.NaN]}getLegendData(){return[]}getTooltipContent(e){const{id:t,properties:i}=this,{tooltip:o}=i;let r,s,a;if(e.type===0?(r=i.value,s=i.label.text,a=this.ctx.localeManager.t("ariaLabelGaugeValue")):({value:r,text:s}=i.targets[e.index],a=this.ctx.localeManager.t("ariaLabelGaugeTarget")),r!=null)return this.formatTooltipWithContext(o,{data:[{label:s,fallbackLabel:a,value:this.formatLabel(r)}]},{seriesId:t,title:void 0,datum:void 0,value:r})}pickNodeClosestDatum(e){return pickGaugeNearestDatum(this,e)}pickFocus(e){return pickGaugeFocus(this,e)}getCaptionText(){const{value:e}=this.properties,t=[];return t.push(this.formatLabel(e)),this.labelSelection.each((i,o)=>{const r=getLabelText(this.id,this.ctx,o);r!=null&&t.push((0,import_ag_charts_core269.toPlainText)(r))}),t.join(". ")}getCategoryValue(e){}datumIndexForCategoryValue(e){}hasItemStylers(){return this.properties.label.itemStyler!=null}};RadialGaugeSeries.className="RadialGaugeSeries",RadialGaugeSeries.type="radial-gauge";var RadialGaugeModule={type:"series",name:"radial-gauge",chartType:"standalone",enterprise:!0,dependencies:[GaugePresetModule],version:import_ag_charts_community247.VERSION,options:import_ag_charts_core270.radialGaugeSeriesOptionsDef,themeTemplate:{minWidth:200,minHeight:200,tooltip:{enabled:!1},series:{outerRadiusRatio:1,innerRadiusRatio:.8,startAngle:270,endAngle:450,defaultColorRange:{$if:[{$eq:[{$palette:"type"},"inbuilt"]},{$interpolate:[{$palette:"secondDivergingColors"},5]},import_ag_charts_core270.SAFE_RANGE2_OPERATION]},scale:{defaultFill:{$path:["/1",{$palette:"fill"},{$palette:"hierarchyColors"}]},stroke:{$path:["/2",import_ag_charts_core270.SAFE_STROKE_FILL_OPERATION,{$palette:"hierarchyColors"}]},strokeWidth:{$isUserOption:["./stroke",2,0]},label:{fontWeight:{$ref:"fontWeight"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},color:{$ref:"textColor"},spacing:12}},bar:{strokeWidth:{$isUserOption:["./stroke",2,0]}},segmentation:{enabled:!1,interval:{},spacing:2},defaultTarget:{fill:{$ref:"foregroundColor"},stroke:{$ref:"foregroundColor"},size:10,shape:"triangle",placement:"outside",spacing:5,label:{enabled:!0,fontWeight:{$ref:"fontWeight"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},color:{$ref:"textColor"},spacing:5}},needle:{enabled:!1,fill:{$ref:"foregroundColor"},spacing:10},label:{...import_ag_charts_core270.LABEL_BOXING_DEFAULTS,enabled:!0,fontWeight:{$ref:"fontWeight"},fontSize:56,minimumFontSize:18/56,fontFamily:{$ref:"fontFamily"},color:{$ref:"textColor"}},secondaryLabel:{...import_ag_charts_core270.LABEL_BOXING_DEFAULTS,enabled:!0,fontWeight:{$ref:"fontWeight"},fontSize:{$rem:import_ag_charts_core270.FONT_SIZE_RATIO.LARGE},minimumFontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},color:{$ref:"subtleTextColor"}},tooltip:{range:{$path:["/tooltip/range",10]}}}},create:e=>new RadialGaugeSeries(e)},import_ag_charts_community252=require("ag-charts-community"),import_ag_charts_core275=require("ag-charts-core"),import_ag_charts_community250=require("ag-charts-community"),import_ag_charts_core273=require("ag-charts-core"),import_ag_charts_community248=require("ag-charts-community"),import_ag_charts_core271=require("ag-charts-core"),{BBox:BBox26,Path:Path14}=import_ag_charts_community248._ModuleSupport,SankeyLink=class extends Path14{constructor(){super(...arguments),this.x1=0,this.x2=0,this.y1=0,this.y2=0,this.height=0,this.inset=0,this.elbows=[]}computeBBox(){const e=Math.min(this.x1,this.x2),t=Math.max(this.x1,this.x2)-e,i=Math.min(this.y1,this.y2),o=Math.max(this.y1,this.y2)-i+this.height;return new BBox26(e,i,t,o)}updatePath(){const{path:e,inset:t}=this;e.clear();const i=this.height-2*this.inset,o=i/2;let r=this.x1+t,s=this.y1+t;e.moveTo(r,s);for(const l of this.elbows)this.updatePathSection(r,s,l.x,l.y,i,-o),r=l.x,s=l.y;const a=this.x2-t,n=this.y2+t;this.updatePathSection(r,s,a,n,i,-o),e.lineTo(a,n+i),r=a,s=n;for(const l of this.elbows.toReversed())this.updatePathSection(r,s,l.x,l.y,i,o),r=l.x,s=l.y;this.updatePathSection(r,s,this.x1+t,this.y1+t,i,o),e.closePath()}updatePathSection(e,t,i,o,r,s){const{path:a}=this,n=import_ag_charts_core271.Vec2.from(e,t+s+r/2),l=import_ag_charts_core271.Vec2.from(i,o+s+r/2);if(Math.abs(l.y-n.y)<2){a.lineTo(l.x,l.y);return}let c=import_ag_charts_core271.Vec2.angle(import_ag_charts_core271.Vec2.sub(l,n));c<0&&(c=2*Math.PI+c);const h=0,u=Math.PI/2,d=Math.PI,p=Math.PI*1.5,g=getArcValues(n,l,0),y=getArcValues(n,l,r);if(g.radius<r){a.cubicCurveTo((n.x+l.x)/2,n.y,(n.x+l.x)/2,l.y,l.x,l.y);return}c>=p?(a.arc(n.x,t-g.radius,g.radius,u,u+y.angle,!0),a.arc(l.x,o+y.radius,y.radius,p+y.angle,p),a.lineTo(l.x,l.y)):c>h&&c<=u?(a.arc(n.x,t+y.radius,y.radius,p,p+y.angle),a.arc(l.x,o-g.radius,g.radius,u+g.angle,u,!0),a.lineTo(l.x,l.y)):c>u&&c<=d?(a.arc(n.x,t+y.radius,y.radius-r,p,p+y.angle,!0),a.arc(l.x,o-g.radius,g.radius+r,u+g.angle,u),a.lineTo(l.x,l.y)):(a.arc(n.x,t-g.radius,g.radius+r,u,u+g.angle),a.arc(l.x,o+y.radius,y.radius-r,p+y.angle,p,!0),a.lineTo(l.x,l.y))}};__decorateClass([(0,import_ag_charts_core271.SceneChangeDetection)()],SankeyLink.prototype,"x1",2),__decorateClass([(0,import_ag_charts_core271.SceneChangeDetection)()],SankeyLink.prototype,"x2",2),__decorateClass([(0,import_ag_charts_core271.SceneChangeDetection)()],SankeyLink.prototype,"y1",2),__decorateClass([(0,import_ag_charts_core271.SceneChangeDetection)()],SankeyLink.prototype,"y2",2),__decorateClass([(0,import_ag_charts_core271.SceneChangeDetection)()],SankeyLink.prototype,"height",2),__decorateClass([(0,import_ag_charts_core271.SceneChangeDetection)()],SankeyLink.prototype,"inset",2);function getArcValues(e,t,i){const o=import_ag_charts_core271.Vec2.angle(import_ag_charts_core271.Vec2.sub(t,e)),r=import_ag_charts_core271.Vec2.distance(e,t),s=import_ag_charts_core271.Vec2.add(e,import_ag_charts_core271.Vec2.rotate(import_ag_charts_core271.Vec2.from(r/2,0),o)),a=-1/import_ag_charts_core271.Vec2.gradient(e,t),n=import_ag_charts_core271.Vec2.intercept(s,a),l=lerpClamp(.1,.5,Math.PI/2-Math.abs(import_ag_charts_core271.Vec2.gradient(e,t))),c=import_ag_charts_core271.Vec2.intersectAtX(a,n,e.x),h=Math.max(i,import_ag_charts_core271.Vec2.distance(e,c)*l);return{angle:import_ag_charts_core271.Vec2.angle(import_ag_charts_core271.Vec2.sub(c,e),import_ag_charts_core271.Vec2.sub(c,s))/-(1.1-l),radius:h}}function lerpClamp(e,t,i){return(0,import_ag_charts_core271.clamp)(e,(t-e)*i+e,t)}var import_ag_charts_community249=require("ag-charts-community"),import_ag_charts_core272=require("ag-charts-core"),{FillGradientDefaults:FillGradientDefaults3,FillPatternDefaults:FillPatternDefaults3,FillImageDefaults:FillImageDefaults3,makeSeriesTooltip:makeSeriesTooltip22,SeriesProperties:SeriesProperties13,Label:Label17}=import_ag_charts_community249._ModuleSupport,SankeySeriesLabelProperties=class extends Label17{constructor(){super(...arguments),this.spacing=1,this.placement=void 0,this.edgePlacement=void 0}};__decorateClass([import_ag_charts_core272.Property],SankeySeriesLabelProperties.prototype,"spacing",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesLabelProperties.prototype,"placement",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesLabelProperties.prototype,"edgePlacement",2);var SankeySeriesLinkProperties=class extends import_ag_charts_core272.BaseProperties{constructor(){super(...arguments),this.fill=void 0,this.fillOpacity=1,this.stroke=void 0,this.strokeOpacity=1,this.strokeWidth=1,this.lineDash=[0],this.lineDashOffset=0}};__decorateClass([import_ag_charts_core272.Property],SankeySeriesLinkProperties.prototype,"fill",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesLinkProperties.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesLinkProperties.prototype,"stroke",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesLinkProperties.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesLinkProperties.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesLinkProperties.prototype,"lineDash",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesLinkProperties.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesLinkProperties.prototype,"itemStyler",2);var SankeySeriesNodeProperties=class extends import_ag_charts_core272.BaseProperties{constructor(){super(...arguments),this.spacing=1,this.minSpacing=0,this.width=1,this.alignment="justify",this.verticalAlignment="center",this.sort="auto",this.fill=void 0,this.fillOpacity=1,this.stroke=void 0,this.strokeOpacity=1,this.strokeWidth=1,this.lineDash=[0],this.lineDashOffset=0}};__decorateClass([import_ag_charts_core272.Property],SankeySeriesNodeProperties.prototype,"spacing",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesNodeProperties.prototype,"minSpacing",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesNodeProperties.prototype,"width",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesNodeProperties.prototype,"alignment",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesNodeProperties.prototype,"verticalAlignment",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesNodeProperties.prototype,"sort",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesNodeProperties.prototype,"fill",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesNodeProperties.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesNodeProperties.prototype,"stroke",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesNodeProperties.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesNodeProperties.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesNodeProperties.prototype,"lineDash",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesNodeProperties.prototype,"lineDashOffset",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesNodeProperties.prototype,"itemStyler",2);var SankeySeriesProperties=class extends SeriesProperties13{constructor(){super(...arguments),this.nodes=void 0,this.idKey="",this.idName=void 0,this.labelKey=void 0,this.labelName=void 0,this.sizeKey=void 0,this.sizeName=void 0,this.fillGradientDefaults=new FillGradientDefaults3,this.fillPatternDefaults=new FillPatternDefaults3,this.fillImageDefaults=new FillImageDefaults3,this.defaultColorRange=[],this.defaultPatternFills=[],this.fills=[],this.strokes=[],this.label=new SankeySeriesLabelProperties,this.link=new SankeySeriesLinkProperties,this.node=new SankeySeriesNodeProperties,this.tooltip=makeSeriesTooltip22()}getStyle(e,t,i,o){const{fillOpacity:r,strokeWidth:s,strokeOpacity:a,lineDash:n,lineDashOffset:l,fill:c=t[o%t.length],stroke:h=i[o%t.length]}=e?this.link:this.node;return{fill:c,fillOpacity:r,stroke:h,strokeWidth:s,strokeOpacity:a,lineDash:n,lineDashOffset:l}}};__decorateClass([import_ag_charts_core272.Property],SankeySeriesProperties.prototype,"nodes",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesProperties.prototype,"fromKey",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesProperties.prototype,"toKey",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesProperties.prototype,"idKey",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesProperties.prototype,"idName",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesProperties.prototype,"labelKey",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesProperties.prototype,"labelName",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesProperties.prototype,"sizeKey",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesProperties.prototype,"sizeName",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesProperties.prototype,"fillGradientDefaults",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesProperties.prototype,"fillPatternDefaults",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesProperties.prototype,"fillImageDefaults",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesProperties.prototype,"defaultColorRange",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesProperties.prototype,"defaultPatternFills",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesProperties.prototype,"fills",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesProperties.prototype,"strokes",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesProperties.prototype,"label",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesProperties.prototype,"link",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesProperties.prototype,"node",2),__decorateClass([import_ag_charts_core272.Property],SankeySeriesProperties.prototype,"tooltip",2);var{Transformable:Transformable5,SeriesNodePickMode:SeriesNodePickMode16,createDatumId:createDatumId21,getShapeStyle:getShapeStyle2,getLabelStyles:getLabelStyles6,Rect:Rect9,BBox:BBox27}=import_ag_charts_community250._ModuleSupport,SankeySeries=class extends FlowProportionSeries{constructor(e){super({moduleCtx:e,pickModes:[SeriesNodePickMode16.NEAREST_NODE,SeriesNodePickMode16.EXACT_SHAPE_MATCH]}),this.properties=new SankeySeriesProperties}isLabelEnabled(){return(this.properties.labelKey!=null||this.nodes==null)&&this.properties.label.enabled}linkFactory(){return new SankeyLink}nodeFactory(){return new Rect9}createNodeData(){const e=this._nodeDataDependencies?.seriesRectWidth??0,t=this.properties.node.width,{nodeGraph:i,links:o,maxPathLength:r}=this.getNodeGraph(this.createNode.bind(this,t),this.createLink,{includeCircularReferences:!1}),s=i;if(s.size===0)return;const a=this.initialiseColumns(r);this.assignNodesToColumns(s,a,r);const n=(0,import_ag_charts_core273.cachedTextMeasurer)(this.properties.label),{columnLabelInsetBefore:l,columnLabelInsetAfter:c}=this.getColumnLabelInsets(a,n,r),h=(e-t-l-c)/(r-1);this.positionNodesInColumnsX(a,h,l),this.createGhostNodesAndColumnDiffs(s,a),this.weightNodes(a);const u=1,{sizeScale:d,nodeSpacing:p}=this.getScaleAndSpacing(a,u);if(d<0){import_ag_charts_core273.Logger.warnOnce("There was insufficient space to display the Sankey Series. Reduce [node.spacing], [node.minSpacing], or provide a larger container.");return}this.positionNodesInColumnsY(a,u,d,p),this.sortAndPositionLinks(s,d);const g=[],y=[];return this.createNodesNodeData(g,s,a,h,n,y),this.createLinksNodeData(g,o,u,d),{itemId:this.id,nodeData:g,labelData:y}}createNode(e,t){return{...t,x:Number.NaN,y:Number.NaN,width:e,height:Number.NaN}}createLink(e){return{...e,x1:Number.NaN,x2:Number.NaN,y1:Number.NaN,y2:Number.NaN,height:Number.NaN,elbows:[]}}initialiseColumns(e){const t=[];for(let i=0;i<e;i+=1)t.push({index:i,size:0,nodes:[],x:0});return t}assignNodesToColumns(e,t,i){const{fromKey:o,toKey:r,sizeKey:s,labelKey:a}=this.properties;for(const n of e.values()){const{datum:l,linksBefore:c,linksAfter:h}=n,u=Math.max(c.reduce((y,{link:x})=>y+x.size,0),h.reduce((y,{link:x})=>y+x.size,0));if(c.length===0&&h.length===0||u===0){n.columnIndex=-1;continue}const d=this.getNodeColumn(t,n,i);l.size=u;const{label:p}=this.properties,g=p.enabled?this.getLabelText(l.label,l.datum,a,"label",[],this.properties.label,{datum:l.datum,value:l.label,fromKey:o,toKey:r,sizeKey:s,size:u}):void 0;l.label=(0,import_ag_charts_core273.toPlainText)(g),d.nodes.push(n),d.size+=u,n.columnIndex=d.index}}getNodeColumn(e,t,i){const{node:{alignment:o}}=this.properties,{linksBefore:r,linksAfter:s,maxPathLengthBefore:a,maxPathLengthAfter:n}=t;let l;switch(o){case"left":l=e[a];break;case"right":l=e[i-1-n];break;case"center":{if(r.length!==0)l=e[a];else if(s.length===0)l=e[0];else{const c=s.reduce((h,u)=>Math.min(h,u.node.maxPathLengthBefore),i)-1;l=e[c]}break}case"justify":{l=s.length===0?e[i-1]:e[a];break}}return l}getColumnLabelInsets(e,t,i){const{label:{spacing:o,placement:r,edgePlacement:s},node:{width:a}}=this.properties,n=this._nodeDataDependencies?.seriesRectWidth??0;let l=0,c=0;if(this.isLabelEnabled()&&(s==="outside"||s==null)){const h=(u,d)=>{const p=d;if(p.datum.label==null||p.datum.label==="")return u;let g=(n-a)/(i-1)-o;r==="center"&&s==null&&(g/=2);const y=(0,import_ag_charts_core273.wrapText)(p.datum.label,{maxWidth:g,maxHeight:p.datum.height,font:this.properties.label,textWrap:"never"});let{width:x}=t.measureLines(y);return r==="center"&&s==null&&(x/=2),Math.max(u,x)};(r!=="right"||s==="outside")&&(l=a+e[0].nodes.reduce(h,0)),(r!=="left"||s==="outside")&&(c=a+e.at(-1).nodes.reduce(h,0))}return{columnLabelInsetBefore:l,columnLabelInsetAfter:c}}positionNodesInColumnsX(e,t,i){for(let o=0;o<e.length;o++){const r=e[o];r.x=i+o*t;for(const s of r.nodes)s.datum.x=r.x}}createGhostNodesAndColumnDiffs(e,t){for(const i of e.values()){i.weight=0;let o=1/0;for(const r of i.linksAfter){const s=r.node;o=Math.min(o,s.columnIndex-i.columnIndex)}if(o===1/0)for(const r of i.linksBefore){const s=r.node;o=Math.min(o,i.columnIndex-s.columnIndex)}i.closestColumnDiff=o,this.createNodeGhostNodes(i,t,o)}}createNodeGhostNodes(e,t,i){for(const o of e.linksAfter){const r=o.node;if(!(r.columnIndex<=e.columnIndex))for(let s=r.columnIndex-1;s>e.columnIndex;s--){const a=o.link.size,n={ghost:!0,datum:{...e.datum,size:a,y:0,height:0},weight:0,linksBefore:[{node:{columnIndex:s-1,datum:{size:a}}}],linksAfter:[{node:{columnIndex:s+1,datum:{size:a}}}],link:o.link,columnIndex:e.columnIndex,size:e.datum.size,closestColumnDiff:i,fromNode:{y:r.datum.y},toNode:{y:0}};t[s].size+=a,t[s].nodes.push(n)}}}weightNodes(e){const{properties:t}=this;if(t.node.sort==="data")return;if(t.node.sort!=="auto"){for(const r of e)r.nodes.sort((s,a)=>this.sortNodes(s,a));return}const i=e.toSorted((r,s)=>{const a=r.nodes.reduce((l,c)=>Math.max(l,c.datum.size),0);return s.nodes.reduce((l,c)=>Math.max(l,c.datum.size),0)-a}),o={};for(let r=0;r<i.length;r++)o[i[r].index]=Math.pow(10,i.length-r-1);for(const r of e){for(const s of r.nodes){if("ghost"in s&&s.ghost){s.weight=s.size/r.size*o[r.index];continue}s.weight=s.datum.size/r.size*o[r.index]}r.nodes.sort((s,a)=>s.weight-a.weight)}for(const r of e){for(const s of r.nodes)"ghost"in s&&s.ghost||(s.weight+=s.linksBefore.reduce((a,n)=>{if(n.node.columnIndex!==r.index-1)return a;const l=e[n.node.columnIndex].nodes.indexOf(n.node)*o[n.node.columnIndex];return Math.max(a,l)},0),s.weight+=s.linksAfter.reduce((a,n)=>{if(n.node.columnIndex!==r.index+1)return a;const l=e[n.node.columnIndex].nodes.indexOf(n.node)*o[n.node.columnIndex];return Math.max(a,l)},0));r.nodes.sort((s,a)=>this.sortNodes(s,a))}}getScaleAndSpacing(e,t){const i=this._nodeDataDependencies?.seriesRectHeight??0,o=a=>e.reduce((n,{size:l,nodes:c})=>{const h=i-c.length*t,d=(1-(c.length-1)*a/h)/l;return Math.min(n,d)},1/0);let r=this.properties.node.spacing,s=o(r);for(;s<0&&r>this.properties.node.minSpacing;)r-=1,s=o(r);return{nodeSpacing:r,sizeScale:s}}positionNodesInColumnsY(e,t,i,o){const r=this._nodeDataDependencies?.seriesRectHeight??0;for(const s of e){let a=0;for(const c of s.nodes){const h=r*c.datum.size*i;c.datum.height=Math.max(t,h),a+=h}const n=o*(s.nodes.length-1);let l=0;this.properties.node.verticalAlignment==="bottom"?l=r-a-n:this.properties.node.verticalAlignment==="center"&&(l=(r-a-n)/2);for(const c of s.nodes)c.datum.y=l,l+=r*c.datum.size*i+o,"ghost"in c&&c.ghost&&c.link.elbows.push({x:s.x,y:c.datum.y})}}sortAndPositionLinks(e,t){const i=this._nodeDataDependencies?.seriesRectHeight??0;for(const{datum:o,linksBefore:r,linksAfter:s}of e.values()){let a=o.y;r.sort((l,c)=>this.sortNodes(l.node,c.node));for(const{link:l}of r)l.y2=a,a+=l.size*i*t;let n=o.y;s.sort((l,c)=>this.sortNodes(l.node,c.node,{invertColumnSort:!0}));for(const{link:l}of s)l.y1=n,n+=l.size*i*t}}createNodesNodeData(e,t,i,o,r,s){for(const[a,n]of i.entries()){const l=a===0,c=a===i.length-1;let h=-1/0;n.nodes.sort((u,d)=>u.datum.y-d.datum.y);for(const u of n.nodes){if("ghost"in u&&u.ghost)continue;const{datum:d}=u;d.midPoint={x:d.x+d.width/2,y:d.y+d.height/2},e.push(d),h=this.createNodeLabelData(t,o,r,s,d,l,c,h)}}}createNodeLabelData(e,t,i,o,r,s,a,n){if(r.label==null)return n;const{label:{spacing:l,edgePlacement:c,fontSize:h}}=this.properties,u=this._nodeDataDependencies?.seriesRectWidth??0,d=r.y+r.height/2;let p;if(!s&&!a){const m=(0,import_ag_charts_core273.calcLineHeight)(h),v=d-m,b=d+m;let D=u;for(const{datum:A}of e.values())A.x>r.x&&Math.max(A.y,v)<=Math.min(A.y+A.height,b)&&(D=Math.min(D,A.x-l));const k=D-r.x-2*l;p=(0,import_ag_charts_core273.wrapText)(r.label,{maxWidth:k,maxHeight:r.height,font:this.properties.label,textWrap:"never",overflow:"hide"})}if(p==null||p===""){const m=c==null&&(s||a)?l:l*2;p=(0,import_ag_charts_core273.wrapText)(r.label,{maxWidth:t-m,maxHeight:r.height,font:this.properties.label,textWrap:"never"})}if(p==="")return n;const{height:g}=i.measureLines(p),y=d-g/2,x=d+g/2,{x:f,textAlign:S}=this.getNodeLabelPlacement(r,s,a);return y>=n&&(o.push({x:f,y:d,textAlign:S,text:p,size:r.size,nodeDatum:r,datumIndex:r.datumIndex}),n=x),n}getNodeLabelPlacement(e,t,i){const{label:{spacing:o,placement:r,edgePlacement:s}}=this.properties;let a=e.x+e.width+o,n="left",l=r;return t&&s==null&&r==null&&(l="left"),s==="outside"?(t&&(l="left"),i&&(l="right")):s==="inside"&&(t&&(l="right"),i&&(l="left")),l==="left"?(a=e.x-o,n="right"):l==="center"&&(a=e.x+e.width/2,n="center"),{x:a,textAlign:n}}createLinksNodeData(e,t,i,o){const r=this._nodeDataDependencies?.seriesRectHeight??0,s=this.properties.node.width;for(const a of t){const{fromNode:n,toNode:l,size:c}=a;a.height=Math.max(i,r*c*o),a.x1=n.x+s,a.x2=l.x,a.midPoint={x:(a.x1+a.x2)/2,y:(a.y1+a.y2)/2+a.height/2},e.push(a)}}sortNodes(e,t,i){const{properties:o}=this;return o.node.sort==="ascending"?(e.datum.label??"").localeCompare(t.datum.label??""):o.node.sort==="descending"?(t.datum.label??"").localeCompare(e.datum.label??""):o.node.sort==="data"?0:e.columnIndex<t.columnIndex?i?.invertColumnSort?1:-1:e.columnIndex>t.columnIndex?i?.invertColumnSort?-1:1:e.weight===t.weight?e.datum.size-t.datum.size:e.closestColumnDiff<t.closestColumnDiff?1:e.closestColumnDiff>t.closestColumnDiff?-1:e.weight-t.weight}updateLabelSelection(e){const t=this.isLabelEnabled()?e.labelData:[];return e.labelSelection.update(t)}updateLabelNodes(e){const t=this.getHighlightedDatum();e.labelSelection.each((i,o)=>{const{x:r,y:s,textAlign:a,text:n,datumIndex:l,nodeDatum:c}=o,h={fromKey:this.properties.fromKey,size:o.size,sizeKey:this.properties.sizeKey,toKey:this.properties.toKey},u=this.isLabelHighlighted(c,t),d=this.getHighlightStyle(u,l),p=getLabelStyles6(this,void 0,h,this.properties.label,u,t),{color:g,fontStyle:y,fontWeight:x,fontSize:f,fontFamily:S}=p;i.visible=!0,i.x=r,i.y=s,i.text=n,i.fill=g,i.fontStyle=y,i.fontWeight=x,i.fontSize=f,i.fontFamily=S,i.textAlign=a,i.textBaseline="middle";const m=d.opacity??1;i.opacity=m,i.fillOpacity=m,i.setBoxing(p)})}updateNodeSelection(e){return e.datumSelection.update(e.nodeData,void 0,t=>createDatumId21(t.type,t.id))}getNodeStyle(e,t,i){const{properties:o}=this,{fills:r,strokes:s,defaultColorRange:a,defaultPatternFills:n,fillGradientDefaults:l,fillPatternDefaults:c,fillImageDefaults:h}=o,{itemStyler:u}=o.node,d=a[t%a.length].map(S=>({color:S})),p=n[t%n.length],g=this.getHighlightStyle(i,e.datumIndex),y=(0,import_ag_charts_core273.mergeDefaults)(g,o.getStyle(!1,r,s,t)),x=o.node.fill!=null;let f=getShapeStyle2(y,x?l:{...l.toJson(),colorStops:d},x?c:{...c.toJson(),fill:p,stroke:p},h);if(u!=null&&e.datumIndex!=null){const S=this.cachedDatumCallback(createDatumId21(e.datumIndex.index,"node",i?"highlight":"node"),()=>{const m=this.makeItemStylerParams(e,i,f);return this.callWithContext(u,m)});S&&(f=(0,import_ag_charts_core273.mergeDefaults)(S,f,{...l.toJson(),colorStops:d},{...c.toJson(),fill:p,stroke:p},h))}return f.opacity=1,f}makeItemStylerParams({datum:e,datumIndex:t,size:i=0,label:o},r,s){const{id:a}=this,n=this.ctx.highlightManager?.getActiveHighlight(),l=this.getHighlightStateString(n,r,t),c=this.filterItemStylerFillParams(s.fill)??s.fill;return{seriesId:a,datum:e,highlightState:l,...s,size:i,label:o,fill:c}}updateNodeNodes(e){const{datumSelection:t,isHighlight:i}=e,o=this.getShapeFillBBox();t.each((r,s)=>{const{datumIndex:a}=s,n=this.getNodeStyle(s,a.index,i);r.x=s.x,r.y=s.y,r.width=Math.max(s.width,0),r.height=Math.max(s.height,0),r.setStyleProperties(n,o)})}getShapeFillBBox(){const e=this._nodeDataDependencies?.seriesRectWidth??0,t=this._nodeDataDependencies?.seriesRectHeight??0,i=new BBox27(0,0,e,t);return{series:i,axis:i}}updateLinkSelection(e){return e.datumSelection.update(e.nodeData,void 0,t=>createDatumId21(t.type,t.index,t.fromNode.id,t.toNode.id))}getLinkStyle({datumIndex:e,datum:t},i,o){const{id:r,properties:s}=this,{fills:a,strokes:n,defaultColorRange:l,defaultPatternFills:c,fillGradientDefaults:h,fillPatternDefaults:u,fillImageDefaults:d}=s,{itemStyler:p}=s.link,g=l[i.index%l.length].map(v=>({color:v})),y=c[i.index%c.length],x=this.getHighlightStyle(o,e),f=(0,import_ag_charts_core273.mergeDefaults)(x,s.getStyle(!0,a,n,i.index)),S=s.link.fill!=null;let m=getShapeStyle2(f,S?h:{...h.toJson(),colorStops:g},S?u:{...u.toJson(),fill:y,stroke:y},d);if(p!=null&&e!=null){const v=this.cachedDatumCallback(createDatumId21(e.index,"link",o?"highlight":"node"),()=>{const b=this.ctx.highlightManager?.getActiveHighlight(),D=this.getHighlightStateString(b,o,e);return this.callWithContext(p,{seriesId:r,datum:t,highlightState:D,...m})});v&&(m=(0,import_ag_charts_core273.mergeDefaults)(v,m,{...h.toJson(),colorStops:g},{...u.toJson(),fill:y,stroke:y},d))}return m.opacity=1,m}updateLinkNodes(e){const{datumSelection:t,isHighlight:i}=e,o=this.getShapeFillBBox();t.each((r,s)=>{const a=s.fromNode.datumIndex,n=this.getLinkStyle(s,a,i);r.x1=s.x1,r.y1=s.y1,r.x2=s.x2,r.y2=s.y2,r.height=s.height,r.elbows=s.elbows,r.setStyleProperties(n,o),r.inset=r.strokeWidth/2})}getTooltipContent(e){const{id:t,linksProcessedData:i,nodesProcessedData:o,properties:r,ctx:{formatManager:s}}=this,{fromKey:a,toKey:n,sizeKey:l,sizeName:c,tooltip:h}=r,u=this.contextNodeData?.nodeData.find(S=>S.datumIndex.type===e.type&&S.datumIndex.index===e.index);if(u==null)return;const d=u.type===0?u.fromNode.index:u.index,p=u.type===0?`${u.fromNode.label} - ${u.toNode.label}`:u.label,g=e.type===0?i?.dataSources.get(this.id)?.data[e.index]:o?.dataSources.get(this.id)?.data[e.index],y=u.size;let x;if(u.type===0){const S=u.fromNode.datumIndex;x=this.getLinkStyle({datumIndex:e,datum:g},S,!1)}else x=this.getNodeStyle({datumIndex:e,datum:g},e.index,!1);const f=[];if(l!=null){const S=s.format(this.callWithContext.bind(this),{type:"number",value:y,datum:g,seriesId:t,legendItemName:void 0,key:l,source:"tooltip",property:"size",domain:[],boundSeries:this.getFormatterContext("size"),fractionDigits:void 0,visibleDomain:void 0});f.push({label:c,fallbackLabel:l,value:S??String(y)})}return this.formatTooltipWithContext(h,{title:p,symbol:this.legendItemSymbol(u.type,d,x),data:f},{seriesId:t,datum:g,title:p,fromKey:a,toKey:n,sizeKey:l,sizeName:c,size:y,...x})}computeFocusBounds(e){if(e instanceof Rect9){const{x:t,y:i,width:o,height:r}=e,s=new BBox27(t,i,o,r);return Transformable5.toCanvas(this.contentGroup,s)}return e}hasItemStylers(){return this.properties.node.itemStyler!=null||this.properties.link.itemStyler!=null||this.properties.label.itemStyler!=null}};SankeySeries.className="SankeySeries",SankeySeries.type="sankey";var import_ag_charts_community251=require("ag-charts-community"),import_ag_charts_core274=require("ag-charts-core"),{sankeySeriesThemeableOptionsDef}=import_ag_charts_community251._ModuleSupport,sankeySeriesOptionsDef={...sankeySeriesThemeableOptionsDef,...import_ag_charts_core274.commonSeriesOptionsDefs,type:(0,import_ag_charts_core274.required)((0,import_ag_charts_core274.constant)("sankey")),fromKey:(0,import_ag_charts_core274.required)(import_ag_charts_core274.string),toKey:(0,import_ag_charts_core274.required)(import_ag_charts_core274.string),sizeKey:import_ag_charts_core274.string,sizeName:import_ag_charts_core274.string};sankeySeriesOptionsDef.fillGradientDefaults=(0,import_ag_charts_core274.undocumented)(import_ag_charts_core274.fillGradientDefaults),sankeySeriesOptionsDef.fillPatternDefaults=(0,import_ag_charts_core274.undocumented)(import_ag_charts_core274.fillPatternDefaults),sankeySeriesOptionsDef.fillImageDefaults=(0,import_ag_charts_core274.undocumented)(import_ag_charts_core274.fillImageDefaults),sankeySeriesOptionsDef.defaultColorRange=(0,import_ag_charts_core274.undocumented)((0,import_ag_charts_core274.arrayOf)((0,import_ag_charts_core274.arrayOf)(import_ag_charts_core274.color))),sankeySeriesOptionsDef.defaultPatternFills=(0,import_ag_charts_core274.undocumented)((0,import_ag_charts_core274.arrayOf)(import_ag_charts_core274.color));var SankeySeriesModule={type:"series",name:"sankey",chartType:"standalone",enterprise:!0,solo:!0,version:import_ag_charts_community252.VERSION,dependencies:[StandaloneChartModule],options:sankeySeriesOptionsDef,themeTemplate:{seriesArea:{padding:{top:10,bottom:10}},series:{fills:{$palette:"fills"},strokes:{$palette:"strokes"},fillGradientDefaults:import_ag_charts_core275.FILL_GRADIENT_LINEAR_DEFAULTS,fillPatternDefaults:import_ag_charts_core275.FILL_PATTERN_DEFAULTS,fillImageDefaults:import_ag_charts_core275.FILL_IMAGE_DEFAULTS,defaultColorRange:{$palette:"gradients"},defaultPatternFills:import_ag_charts_core275.SAFE_FILLS_OPERATION,highlight:{unhighlightedItem:{opacity:.5}},label:{...import_ag_charts_core275.LABEL_BOXING_DEFAULTS,enabled:!0,fontFamily:{$ref:"fontFamily"},fontSize:{$ref:"fontSize"},fontWeight:{$ref:"fontWeight"},color:{$ref:"textColor"},spacing:10},node:{spacing:{$if:[{$greaterThan:[{$path:"./minSpacing"},20]},{$path:"./minSpacing"},20]},minSpacing:0,width:10,strokeWidth:{$isUserOption:["./stroke",2,0]}},link:{fillOpacity:.5,strokeWidth:{$isUserOption:["./stroke",2,0]}}},legend:{enabled:!1,toggleSeries:!1}},create:e=>new SankeySeries(e)},import_ag_charts_community256=require("ag-charts-community"),import_ag_charts_core279=require("ag-charts-core"),import_ag_charts_community254=require("ag-charts-community"),import_ag_charts_core277=require("ag-charts-core"),import_ag_charts_community253=require("ag-charts-community"),import_ag_charts_core276=require("ag-charts-core"),{HierarchySeriesProperties,makeSeriesTooltip:makeSeriesTooltip23,HighlightProperties}=import_ag_charts_community253._ModuleSupport,SunburstSeriesHighlightStyle=class extends import_ag_charts_core276.BaseProperties{};__decorateClass([import_ag_charts_core276.Property],SunburstSeriesHighlightStyle.prototype,"fill",2),__decorateClass([import_ag_charts_core276.Property],SunburstSeriesHighlightStyle.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core276.Property],SunburstSeriesHighlightStyle.prototype,"stroke",2),__decorateClass([import_ag_charts_core276.Property],SunburstSeriesHighlightStyle.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core276.Property],SunburstSeriesHighlightStyle.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core276.Property],SunburstSeriesHighlightStyle.prototype,"opacity",2);var SunburstSeriesHighlight=class extends HighlightProperties{constructor(){super(...arguments),this.highlightedBranch=new SunburstSeriesHighlightStyle,this.unhighlightedBranch=new SunburstSeriesHighlightStyle}};__decorateClass([import_ag_charts_core276.Property],SunburstSeriesHighlight.prototype,"highlightedBranch",2),__decorateClass([import_ag_charts_core276.Property],SunburstSeriesHighlight.prototype,"unhighlightedBranch",2);var SunburstSeriesProperties=class extends HierarchySeriesProperties{constructor(){super(...arguments),this.fillOpacity=1,this.strokeWidth=0,this.strokeOpacity=1,this.cornerRadius=0,this.highlight=new SunburstSeriesHighlight,this.label=new AutoSizedLabel,this.secondaryLabel=new AutoSizedSecondaryLabel,this.tooltip=makeSeriesTooltip23()}getStyle(e){const{fills:t,strokes:i,fillOpacity:o,strokeWidth:r,strokeOpacity:s}=this;return{fill:t[e%t.length],fillOpacity:o,stroke:i[e%i.length],strokeWidth:r,strokeOpacity:s,opacity:1}}};__decorateClass([import_ag_charts_core276.Property],SunburstSeriesProperties.prototype,"sizeName",2),__decorateClass([import_ag_charts_core276.Property],SunburstSeriesProperties.prototype,"labelKey",2),__decorateClass([import_ag_charts_core276.Property],SunburstSeriesProperties.prototype,"secondaryLabelKey",2),__decorateClass([import_ag_charts_core276.Property],SunburstSeriesProperties.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core276.Property],SunburstSeriesProperties.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core276.Property],SunburstSeriesProperties.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core276.Property],SunburstSeriesProperties.prototype,"cornerRadius",2),__decorateClass([import_ag_charts_core276.Property],SunburstSeriesProperties.prototype,"sectorSpacing",2),__decorateClass([import_ag_charts_core276.Property],SunburstSeriesProperties.prototype,"padding",2),__decorateClass([import_ag_charts_core276.Property],SunburstSeriesProperties.prototype,"itemStyler",2),__decorateClass([import_ag_charts_core276.Property],SunburstSeriesProperties.prototype,"highlight",2),__decorateClass([import_ag_charts_core276.Property],SunburstSeriesProperties.prototype,"label",2),__decorateClass([import_ag_charts_core276.Property],SunburstSeriesProperties.prototype,"secondaryLabel",2),__decorateClass([import_ag_charts_core276.Property],SunburstSeriesProperties.prototype,"tooltip",2);var{fromToMotion:fromToMotion6,createDatumId:createDatumId22,PointerEvents:PointerEvents13,Sector:Sector7,Group:Group21,ScalableGroup,Selection:Selection17,TransformableText:TransformableText4,BBox:BBox28,getLabelStyles:getLabelStyles7,toHierarchyHighlightString}=import_ag_charts_community254._ModuleSupport,SunburstNode=class extends import_ag_charts_community254._ModuleSupport.HierarchyNode{constructor(){super(...arguments),this.label=void 0,this.secondaryLabel=void 0,this.contentHeight=0,this.bbox=void 0,this.startAngle=0,this.endAngle=0}};function setAngleData(e,t=0,i=2*Math.PI/e.sumSize){for(const o of e.children){const r=t+o.sumSize*i;o.startAngle=t,o.endAngle=r,setAngleData(o,t,i),t=r}}var SunburstSeries=class extends import_ag_charts_community254._ModuleSupport.HierarchySeries{constructor(e){super(e),this.NodeClass=SunburstNode,this.properties=new SunburstSeriesProperties,this.scalingGroup=this.contentGroup.appendChild(new ScalableGroup),this.sectorGroup=this.scalingGroup.appendChild(new Group21),this.highlightSectorGroup=this.scalingGroup.appendChild(new Group21),this.sectorLabelGroup=this.scalingGroup.appendChild(new Group21),this.datumSelection=Selection17.select(this.sectorGroup,Sector7),this.labelSelection=Selection17.select(this.sectorLabelGroup,Group21),this.highlightSelection=Selection17.select(this.highlightSectorGroup,Sector7),this.sectorLabelGroup.pointerEvents=PointerEvents13.None}processData(){super.processData(),setAngleData(this.rootNode)}updateSelections(){const e=this.getActiveHighlightNode();if(this.highlightSelection.update(e==null?[]:[e],void 0,s=>this.getDatumId(s)),!this.nodeDataRefresh)return;this.nodeDataRefresh=!1;const{chart:t}=this;if(t==null||t.seriesRect==null)return;const o=Array.from(this.rootNode),r=s=>{s.append([new TransformableText4({tag:0}),new TransformableText4({tag:1})])};this.datumSelection.update(o,void 0,s=>this.getDatumId(s)),this.labelSelection.update(o,r,s=>this.getDatumId(s))}getItemStyle(e,t){const{properties:i,colorScale:o}=this,{itemStyler:r}=i,s=e.datumIndex?.[0]??0,a=this.getActiveHighlightNode(),n=this.getHierarchyHighlightState(t,a,e),l=this.getHierarchyHighlightStyles(n,this.properties.highlight),c=(0,import_ag_charts_core277.mergeDefaults)(l,i.getStyle(s));e.colorValue!=null&&l?.fill==null&&(c.fill=o.convert(e.colorValue));let h=c;if(r!=null&&e!=null){const u=this.cachedDatumCallback(createDatumId22(this.getDatumId(e),t?"highlight":"node"),()=>{const d=this.makeItemStylerParams(e,h,toHierarchyHighlightString(n));return this.callWithContext(r,d)});u&&(h=(0,import_ag_charts_core277.mergeDefaults)(u,h))}return h}makeItemStylerParams(e,t,i){const{id:o}=this,r=this.filterItemStylerFillParams(t.fill)??t.fill;return{seriesId:o,datum:e.datum,depth:e.depth??0,highlightState:i,...t,fill:r}}updateNodes(){const{chart:e,data:t,maxDepth:i}=this;if(e==null||t==null)return;const{width:o,height:r}=e.seriesRect,{sectorSpacing:s=0,padding:a=0,cornerRadius:n,childrenKey:l,colorKey:c,colorName:h,labelKey:u,secondaryLabelKey:d,sizeKey:p,sizeName:g}=this.properties;this.contentGroup.translationX=o/2,this.contentGroup.translationY=r/2;const y=s*.5,x=Math.min(o,r)/2,f=x/(i+1),S=-Math.PI/2,m={series:new BBox28(-x,-x,2*x,2*x),axis:new BBox28(-x,-x,2*x,2*x)};this.rootNode?.walk(A=>{const{startAngle:M,endAngle:I}=A;if(A.depth!=null){const _=(M+I)/2+S,P=(A.depth+.5)*f;A.midPoint.x=Math.cos(_)*P,A.midPoint.y=Math.sin(_)*P}}),this.rootNode?.walk(A=>{const{datum:M,depth:I,startAngle:_,endAngle:P,parent:O,sumSize:C}=A;A.label=void 0,A.secondaryLabel=void 0,A.contentHeight=0;let L;if(M!=null&&I!=null&&u!=null){const q=M[u];L=this.getLabelText(q,M,u,"label",[],this.properties.label,{depth:I,datum:M,childrenKey:l,colorKey:c,colorName:h,labelKey:u,secondaryLabelKey:d,sizeKey:p,sizeName:g,value:q})}L===""&&(L=void 0);let E;if(M!=null&&I!=null&&d!=null){const q=M[d];E=this.getLabelText(q,M,d,"secondaryLabel",[],this.properties.secondaryLabel,{depth:I,datum:M,childrenKey:l,colorKey:c,colorName:h,labelKey:u,secondaryLabelKey:d,sizeKey:p,sizeName:g,value:q})}if(E===""&&(E=void 0),I==null)return;const V=I*f+y,w=(I+1)*f-y,T=V>y?y/V:y,z=w>y?y/w:y,B=_+T,R=P+T-B,H=_+z,K=P+z-H,G=q=>{if(I===0&&O?.sumSize===C)return{width:2*Math.sqrt(w**2-(q*.5)**2),height:q,meta:0};const Y=q,se=2*Math.sqrt(w**2-(V+Y)**2),ae=R<Math.PI?2*V*Math.tan(R*.5):1/0,ue=Math.min(se,ae),de=Math.PI/4;let ce,he;return I===0?(ce=q,he=Math.sqrt(w**2-(ce/2)**2)-q/(2*Math.tan(K*.5))):(0,import_ag_charts_core277.normalizeAngle360)(R)<de?(ce=2*V*Math.tan(R*.5),he=Math.sqrt(w**2-(ce/2)**2)-V):(he=0,ce=0),ue>=he?{width:ue,height:Y,meta:1}:{width:he,height:ce,meta:2}},U=formatLabels((0,import_ag_charts_core277.toPlainText)(L),this.properties.label,(0,import_ag_charts_core277.toPlainText)(E),this.properties.secondaryLabel,{padding:a},G);if(U==null)return;const{width:X,height:J,meta:oe,label:le,secondaryLabel:$}=U,j=S+(_+P)/2,te=Math.sin(j)>=0,re=Math.cos(j)>=0,Z=(te?3:12)&(re?6:9);let Q;switch(oe){case 0:Q=0;break;case 1:{const ee=w-(f-J)*.58,Y=Math.sqrt((w-a)**2-(X/2)**2);Q=Math.min(ee,Y);break}case 2:if(I===0){const q=J/(2*Math.tan(R*.5))+X*.5,ee=Math.sqrt(w**2-(J*.5)**2)-X*.5;Q=(q+ee)*.5}else Q=(V+w)*.5;break}if(le!=null){const{fontStyle:q="normal",fontFamily:ee,fontWeight:Y="normal",color:se="black"}=this.properties.label;A.label={...le,fontStyle:q,fontFamily:ee,fontWeight:Y,color:se,labelPlacement:oe,circleQuarter:Z,radius:Q,theta:j}}if($!=null){const{fontStyle:q="normal",fontFamily:ee,fontWeight:Y="normal",color:se="black"}=this.properties.secondaryLabel;A.secondaryLabel={...$,fontStyle:q,fontFamily:ee,fontWeight:Y,color:se,labelPlacement:oe,circleQuarter:Z,radius:Q,theta:j}}A.contentHeight=U.height});const v=(A,M,I)=>{const{depth:_,startAngle:P,endAngle:O}=A;if(_==null){M.visible=!1;return}M.visible=!0;const C=this.getItemStyle(A,I),L=C.fill,E=C.strokeWidth,V=(0,import_ag_charts_core277.isGradientFill)(L)&&L.bounds!=="item"?m:void 0;M.setStyleProperties(C,V),M.centerX=0,M.centerY=0,M.innerRadius=_*f,M.outerRadius=(_+1)*f,M.startAngle=P+S,M.endAngle=O+S,M.inset=y+E*.5,M.cornerRadius=n};this.datumSelection.each((A,M)=>{v(M,A,!1)}),this.highlightSelection.each((A,M)=>{v(M,A,!0)});const b=this.getActiveHighlightNode(),D=(A,M,I,_)=>{const{depth:P,contentHeight:O}=A,C=I===0,L=C?A.label:A.secondaryLabel;if(P==null||L==null){M.visible=!1;return}const{labelPlacement:E,circleQuarter:V,radius:w,theta:T}=L,z=this.getHierarchyHighlightState(_,b,A),{opacity:B}=this.getHierarchyHighlightStyles(z,this.properties.highlight)??{},F={childrenKey:this.properties.childrenKey,colorKey:this.properties.colorKey,colorName:this.properties.colorName??this.properties.colorKey,depth:A.depth??Number.NaN,labelKey:this.properties.labelKey,secondaryLabelKey:this.properties.secondaryLabelKey,sizeKey:this.properties.sizeKey,sizeName:this.properties.sizeName??this.properties.sizeKey},R=C?this.properties.label:this.properties.secondaryLabel,H=this.ctx.highlightManager?.getActiveHighlight(),W=getLabelStyles7(this,A,F,R,_,H);switch(M.text=L.text,M.fontSize=L.fontSize,M.lineHeight=L.lineHeight,M.fontStyle=L.fontStyle,M.fontFamily=L.fontFamily,M.fontWeight=L.fontWeight,M.fillOpacity=B??1,M.fill=W.color,M.setBoxing(W),E){case 0:M.textAlign="center",M.textBaseline="top",M.translationX=0,M.translationY=(C?0:O-L.height)-O*.5,M.rotation=0;break;case 1:{const K=(V&3)!==0,G=C===!K?w:w-(O-L.height);M.textAlign="center",M.textBaseline=K?"bottom":"top",M.translationX=Math.cos(T)*G,M.translationY=Math.sin(T)*G,M.rotation=K?T-Math.PI*.5:T+Math.PI*.5;break}case 2:{const K=(V&6)!==0,G=C===!K?(O-L.height)*.5:(L.height-O)*.5;M.textAlign="center",M.textBaseline="middle",M.translationX=Math.cos(T)*w+Math.cos(T+Math.PI/2)*G,M.translationY=Math.sin(T)*w+Math.sin(T+Math.PI/2)*G,M.rotation=K?T:T+Math.PI;break}}M.visible=!0},k=this.getActiveHighlightNode();for(const A of this.labelSelection.selectByClass(TransformableText4)){const M=A.closestDatum();D(M,A,A.tag,M===k)}}getTooltipContent(e){const{id:t,properties:i,ctx:o}=this,{labelKey:r,secondaryLabelKey:s,childrenKey:a,sizeKey:n,sizeName:l,colorKey:c,colorName:h,tooltip:u}=i,{formatManager:d}=o,p=e.reduce((D,k)=>D?.children[k],this.rootNode);if(p==null)return;const{datum:g,depth:y}=p;if(g==null||y==null)return;const x=[],f=n==null?void 0:g[n];if(f!=null){const D=[0,this.rootNode?.sumSize??0],k=d.format(this.callWithContext.bind(this),{type:"number",value:f,datum:g,seriesId:t,legendItemName:void 0,key:n,source:"tooltip",property:"size",boundSeries:this.getFormatterContext("size"),domain:D,fractionDigits:void 0,visibleDomain:void 0});x.push({label:l,fallbackLabel:n,value:k??(0,import_ag_charts_core277.formatValue)(f)})}const S=c==null?void 0:g[c];if(S!=null){const{colorDomain:D}=this,k=d.format(this.callWithContext.bind(this),{type:"number",value:S,datum:g,seriesId:t,legendItemName:void 0,key:c,source:"tooltip",property:"color",boundSeries:this.getFormatterContext("color"),domain:D,fractionDigits:void 0,visibleDomain:void 0});x.push({label:h,fallbackLabel:c,value:k??(0,import_ag_charts_core277.formatValue)(S)})}const m=this.getItemStyle({...p,colorValue:S??p.colorValue},!1),b={shape:"square",fill:m.fill,fillOpacity:1,stroke:void 0,strokeWidth:0,strokeOpacity:1,lineDash:[0],lineDashOffset:0};return(0,import_ag_charts_core277.isGradientFill)(b.fill)&&(b.fill={...b.fill,gradient:"linear",rotation:0,reverse:!1}),this.formatTooltipWithContext(u,{title:r==null?void 0:g[r],symbol:{marker:b},data:x},{seriesId:t,datum:g,title:void 0,depth:y,labelKey:r,secondaryLabelKey:s,childrenKey:a,sizeKey:n,sizeName:l,colorKey:c,colorName:h,...m})}createNodeData(){}pickNodeClosestDatum(e){return this.pickNodeNearestDistantObject(e,this.datumSelection.nodes())}animateEmptyUpdateReady(){fromToMotion6(this.id,"nodes",this.ctx.animationManager,[this.scalingGroup],{toFn(){return{scalingX:1,scalingY:1}},fromFn(){return{scalingX:0,scalingY:0}}})}computeFocusBounds(e){return e}hasItemStylers(){return this.properties.itemStyler!=null||this.properties.label.itemStyler!=null}};SunburstSeries.className="SunburstSeries",SunburstSeries.type="sunburst";var import_ag_charts_community255=require("ag-charts-community"),import_ag_charts_core278=require("ag-charts-core"),{sunburstSeriesThemeableOptionsDef}=import_ag_charts_community255._ModuleSupport,sunburstSeriesOptionsDef={...sunburstSeriesThemeableOptionsDef,...(0,import_ag_charts_core278.without)(import_ag_charts_core278.commonSeriesOptionsDefs,["highlightStyle","highlight","showInLegend"]),type:(0,import_ag_charts_core278.required)((0,import_ag_charts_core278.constant)("sunburst")),labelKey:import_ag_charts_core278.string,secondaryLabelKey:import_ag_charts_core278.string,childrenKey:import_ag_charts_core278.string,sizeKey:import_ag_charts_core278.string,colorKey:import_ag_charts_core278.string,sizeName:import_ag_charts_core278.string,colorName:import_ag_charts_core278.string},themeTemplate3={series:{fills:{$applyCycle:[{$size:{$path:["./data",{$path:"/data"}]}},{$palette:"fills"},{$applySwitch:[{$path:["/type",void 0,{$value:"$1"}]},{$value:"$1"},["gradient",import_ag_charts_core279.FILL_GRADIENT_RADIAL_REVERSED_SERIES_DEFAULTS],["pattern",import_ag_charts_core279.FILL_PATTERN_DEFAULTS],["image",import_ag_charts_core279.FILL_IMAGE_DEFAULTS]]}]},strokes:{$applyCycle:[{$size:{$path:["./data",{$path:"/data"}]}},{$palette:"strokes"}]},colorRange:{$palette:"divergingColors"},strokeWidth:{$isUserOption:["./strokes/0",2,0]},label:{...import_ag_charts_core279.LABEL_BOXING_DEFAULTS,enabled:!0,fontFamily:{$ref:"fontFamily"},fontSize:{$rem:import_ag_charts_core279.FONT_SIZE_RATIO.LARGE},minimumFontSize:{$rem:9/import_ag_charts_core279.BASE_FONT_SIZE},fontWeight:{$ref:"fontWeight"},color:{$ref:"chartBackgroundColor"},overflowStrategy:"ellipsis",wrapping:"never",spacing:2},secondaryLabel:{...import_ag_charts_core279.LABEL_BOXING_DEFAULTS,enabled:!0,fontFamily:{$ref:"fontFamily"},fontSize:{$rem:import_ag_charts_core279.FONT_SIZE_RATIO.SMALLEST},minimumFontSize:{$rem:7/import_ag_charts_core279.BASE_FONT_SIZE},fontWeight:{$ref:"fontWeight"},color:{$ref:"chartBackgroundColor"},overflowStrategy:"ellipsis",wrapping:"never"},sectorSpacing:2,padding:3,highlight:{unhighlightedItem:{fillOpacity:.6,strokeOpacity:.6},unhighlightedBranch:{fillOpacity:.2,strokeOpacity:.2}}},gradientLegend:{enabled:{$if:[{$path:"../series/0/colorKey"},!0,!1]}}},SunburstSeriesModule={type:"series",name:"sunburst",chartType:"standalone",enterprise:!0,solo:!0,version:import_ag_charts_community256.VERSION,dependencies:[StandaloneChartModule],options:sunburstSeriesOptionsDef,themeTemplate:themeTemplate3,create:e=>new SunburstSeries(e)},import_ag_charts_community260=require("ag-charts-community"),import_ag_charts_core283=require("ag-charts-core"),import_ag_charts_community258=require("ag-charts-community"),import_ag_charts_core281=require("ag-charts-core"),import_ag_charts_community257=require("ag-charts-community"),import_ag_charts_core280=require("ag-charts-core"),{HierarchySeriesProperties:HierarchySeriesProperties2,makeSeriesTooltip:makeSeriesTooltip24,Label:Label18}=import_ag_charts_community257._ModuleSupport,TreemapGroupLabel=class extends Label18{constructor(){super(...arguments),this.spacing=0}};__decorateClass([import_ag_charts_core280.Property],TreemapGroupLabel.prototype,"spacing",2);var TreemapSeriesGroupHighlightStyle=class extends import_ag_charts_core280.BaseProperties{};__decorateClass([import_ag_charts_core280.Property],TreemapSeriesGroupHighlightStyle.prototype,"fill",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesGroupHighlightStyle.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesGroupHighlightStyle.prototype,"stroke",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesGroupHighlightStyle.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesGroupHighlightStyle.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesGroupHighlightStyle.prototype,"opacity",2);var TreemapSeriesGroupHighlight=class extends import_ag_charts_core280.BaseProperties{constructor(){super(...arguments),this.highlightedItem=new TreemapSeriesGroupHighlightStyle,this.unhighlightedItem=new TreemapSeriesGroupHighlightStyle}};__decorateClass([import_ag_charts_core280.Property],TreemapSeriesGroupHighlight.prototype,"highlightedItem",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesGroupHighlight.prototype,"unhighlightedItem",2);var TreemapSeriesTileHighlightStyle=class extends import_ag_charts_core280.BaseProperties{};__decorateClass([import_ag_charts_core280.Property],TreemapSeriesTileHighlightStyle.prototype,"fill",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesTileHighlightStyle.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesTileHighlightStyle.prototype,"stroke",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesTileHighlightStyle.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesTileHighlightStyle.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesTileHighlightStyle.prototype,"opacity",2);var TreemapSeriesTileHighlight=class extends import_ag_charts_core280.BaseProperties{constructor(){super(...arguments),this.highlightedBranch=new TreemapSeriesTileHighlightStyle,this.highlightedItem=new TreemapSeriesTileHighlightStyle,this.unhighlightedItem=new TreemapSeriesTileHighlightStyle,this.unhighlightedBranch=new TreemapSeriesTileHighlightStyle}};__decorateClass([import_ag_charts_core280.Property],TreemapSeriesTileHighlight.prototype,"highlightedBranch",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesTileHighlight.prototype,"highlightedItem",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesTileHighlight.prototype,"unhighlightedItem",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesTileHighlight.prototype,"unhighlightedBranch",2);var TreemapSeriesGroup=class extends import_ag_charts_core280.BaseProperties{constructor(){super(...arguments),this.fill=void 0,this.fillOpacity=1,this.strokeWidth=1,this.strokeOpacity=1,this.cornerRadius=0,this.textAlign="center",this.gap=0,this.padding=0,this.interactive=!0,this.label=new TreemapGroupLabel,this.highlight=new TreemapSeriesGroupHighlight}};__decorateClass([import_ag_charts_core280.Property],TreemapSeriesGroup.prototype,"fill",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesGroup.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesGroup.prototype,"stroke",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesGroup.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesGroup.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesGroup.prototype,"cornerRadius",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesGroup.prototype,"textAlign",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesGroup.prototype,"gap",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesGroup.prototype,"padding",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesGroup.prototype,"interactive",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesGroup.prototype,"label",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesGroup.prototype,"highlight",2);var TreemapSeriesTile=class extends import_ag_charts_core280.BaseProperties{constructor(){super(...arguments),this.fill=void 0,this.fillOpacity=1,this.strokeWidth=1,this.strokeOpacity=1,this.cornerRadius=0,this.textAlign="center",this.verticalAlign="middle",this.gap=0,this.padding=0,this.label=new AutoSizedLabel,this.secondaryLabel=new AutoSizedSecondaryLabel,this.highlight=new TreemapSeriesTileHighlight}};__decorateClass([import_ag_charts_core280.Property],TreemapSeriesTile.prototype,"fill",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesTile.prototype,"fillOpacity",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesTile.prototype,"stroke",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesTile.prototype,"strokeWidth",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesTile.prototype,"strokeOpacity",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesTile.prototype,"cornerRadius",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesTile.prototype,"textAlign",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesTile.prototype,"verticalAlign",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesTile.prototype,"gap",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesTile.prototype,"padding",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesTile.prototype,"label",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesTile.prototype,"secondaryLabel",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesTile.prototype,"highlight",2);var TreemapSeriesProperties=class extends HierarchySeriesProperties2{constructor(){super(...arguments),this.tooltip=makeSeriesTooltip24(),this.group=new TreemapSeriesGroup,this.tile=new TreemapSeriesTile,this.undocumentedGroupFills=[],this.undocumentedGroupStrokes=[]}getStyle(e,t,i,o){const{fillOpacity:r,strokeWidth:s,strokeOpacity:a,fill:n=e?t[o%t.length]:t[Math.min(o,t.length)],stroke:l=e?i[o%t.length]:i[Math.min(o,i.length)]}=e?this.tile:this.group;return{fill:n,fillOpacity:r,stroke:l,strokeWidth:s,strokeOpacity:a,opacity:1}}};__decorateClass([import_ag_charts_core280.Property],TreemapSeriesProperties.prototype,"sizeName",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesProperties.prototype,"labelKey",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesProperties.prototype,"secondaryLabelKey",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesProperties.prototype,"itemStyler",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesProperties.prototype,"tooltip",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesProperties.prototype,"group",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesProperties.prototype,"tile",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesProperties.prototype,"undocumentedGroupFills",2),__decorateClass([import_ag_charts_core280.Property],TreemapSeriesProperties.prototype,"undocumentedGroupStrokes",2);var{createDatumId:createDatumId23,Rect:Rect10,Group:Group22,BBox:BBox29,Selection:Selection18,Text:Text10,Transformable:Transformable6,getLabelStyles:getLabelStyles8,HierarchyHighlightState,toHierarchyHighlightString:toHierarchyHighlightString2}=import_ag_charts_community258._ModuleSupport,TreemapNode=class extends import_ag_charts_community258._ModuleSupport.HierarchyNode{constructor(){super(...arguments),this.labelValue=void 0,this.secondaryLabelValue=void 0,this.label=void 0,this.secondaryLabel=void 0,this.bbox=void 0,this.padding=void 0}};function nodeSize(e){return e.children.length>0?e.sumSize-e.sizeValue:e.sizeValue}var textAlignFactors2={left:0,center:.5,right:1},verticalAlignFactors4={top:0,middle:.5,bottom:1},DistantGroup=class extends import_ag_charts_community258._ModuleSupport.Group{distanceSquared(e,t){return this.getBBox().distanceSquared(e,t)}},TreemapSeries=class extends import_ag_charts_community258._ModuleSupport.HierarchySeries{constructor(){super(...arguments),this.NodeClass=TreemapNode,this.properties=new TreemapSeriesProperties,this.rectGroup=this.contentGroup.appendChild(new Group22),this.datumSelection=Selection18.select(this.rectGroup,Rect10),this.labelSelection=Selection18.select(this.labelGroup,Group22),this.highlightSelection=Selection18.select(this.rectGroup,Rect10)}groupTitleHeight(e,t){const{label:o}=this.properties.group,{labelValue:r}=e,{fontSize:s}=o;if(o.enabled&&r!=null&&s<=t.width/3&&s<=t.height/3){const{height:a}=(0,import_ag_charts_core281.cachedTextMeasurer)(o).measureLines(r);return Math.max(a,s)}}getNodePadding(e,t){if(e.parent==null)return{top:0,right:0,bottom:0,left:0};if(e.children.length===0){const{padding:a}=this.properties.tile;return{top:a,right:a,bottom:a,left:a}}const{padding:i,label:{spacing:o}}=this.properties.group,r=this.groupTitleHeight(e,t),s=r==null?0:r+o;return{top:i+s,right:i,bottom:i,left:i}}sortChildren({children:e}){const t=Array.from(e,(o,r)=>r).filter(o=>nodeSize(e[o])>0).sort((o,r)=>nodeSize(e[r])-nodeSize(e[o]));return{sortedChildrenIndices:t,childAt:o=>{const r=t[o];return e[r]}}}squarify(e,t){const{datum:i,children:o}=e;if(t.width<=0||t.height<=0){e.bbox=void 0,e.padding=void 0,e.midPoint.x=Number.NaN,e.midPoint.y=Number.NaN;return}const r=i==null?{top:0,right:0,bottom:0,left:0}:this.getNodePadding(e,t);e.parent==null?(e.bbox=void 0,e.padding=void 0,e.midPoint.x=Number.NaN,e.midPoint.y=Number.NaN):(e.bbox=t,e.padding=r,e.midPoint.x=t.x+t.width/2,e.midPoint.y=t.y);const{sortedChildrenIndices:s,childAt:a}=this.sortChildren(e),n=s.every(b=>o[b].children.length===0),l=1,c=t.width-r.left-r.right,h=t.height-r.top-r.bottom;if(c<=0||h<=0)return;const u=s.length;let d=0,p=0,g=1/0,y=s.reduce((b,D)=>b+nodeSize(o[D]),0);const x=new BBox29(t.x+r.left,t.y+r.top,c,h),f=x.clone();let S=0;for(;S<u;){const b=nodeSize(a(S)),D=nodeSize(a(p)),k=f.width<f.height;d+=b;const A=k?f.height:f.width,M=k?f.width:f.height,I=M*D/d;let _=A*d/y;const P=Math.max(I,_)/Math.min(I,_),O=Math.abs(l-P);if(O<g){g=O,S++;continue}d-=b,_=A*d/y;let C=k?f.x:f.y;for(let L=p;L<S;L++){const E=a(L),V=nodeSize(E),w=k?C:f.x,T=k?f.y:C,z=M*V/d,B=k?z:_,F=k?_:z,R=new BBox29(w,T,B,F);this.applyGap(x,R,n),this.squarify(E,R),y-=V,C+=z}k?(f.y+=_,f.height-=_):(f.x+=_,f.width-=_),p=S,d=0,g=1/0}const m=f.width<f.height;let v=m?f.x:f.y;for(let b=p;b<u;b++){const D=a(b),k=m?v:f.x,A=m?f.y:v,M=nodeSize(D)/y,I=f.width*(m?M:1),_=f.height*(m?1:M),P=new BBox29(k,A,I,_);this.applyGap(x,P,n),this.squarify(D,P),v+=m?I:_}}applyGap(e,t,i){const o=i?this.properties.tile.gap*.5:this.properties.group.gap*.5,r=l=>({left:l.x,top:l.y,right:l.x+l.width,bottom:l.y+l.height}),s=r(e),a=r(t),n=["top","right","bottom","left"];for(const l of n)(0,import_ag_charts_core281.isNumberEqual)(s[l],a[l])||t.shrink(o,l)}createNodeData(){}getItemStyle(e,t,i){const{properties:o,colorScale:r}=this,{itemStyler:s}=o,a=e.datumIndex?.[0]??0,n=t?o.fills:o.undocumentedGroupFills,l=t?o.strokes:o.undocumentedGroupStrokes,c=t?a:e.depth??-1,h=this.getActiveHighlightNode(),u=this.getHierarchyHighlightState(i,h,e),d=this.getGroupHighlightState(i,h,e),p=t?u:d,g=t?this.getTileHighlightStyle(u,d,h):this.getGroupHighlightStyle(d),y=(0,import_ag_charts_core281.mergeDefaults)(g,o.getStyle(t,n,l,c));t&&e.colorValue!=null&&g?.fill==null&&(y.fill=r.convert(e.colorValue));let x=y;if(s!=null&&e!=null){const f=this.cachedDatumCallback(createDatumId23(this.getDatumId(e),i?"highlight":"node"),()=>{const S=this.makeItemStylerParams(e,x,toHierarchyHighlightString2(p));return this.callWithContext(s,S)});f&&(x=(0,import_ag_charts_core281.mergeDefaults)(f,x))}return x}makeItemStylerParams(e,t,i){const{id:o}=this,r=this.filterItemStylerFillParams(t.fill)??t.fill;return{seriesId:o,datum:e.datum,depth:e.depth??-1,highlightState:i,...t,fill:r}}updateSelections(){const e=this.getActiveHighlightNode();if(this.highlightSelection.update(e==null?[]:[e],void 0,r=>this.getDatumId(r)),!this.nodeDataRefresh)return;this.nodeDataRefresh=!1;const{seriesRect:t}=this.chart??{};if(!t)return;const i=Array.from(this.rootNode),o=r=>{r.append([new Text10({tag:0}),new Text10({tag:1})])};this.datumSelection.update(i,void 0,r=>this.getDatumId(r)),this.labelSelection.update(i,o,r=>this.getDatumId(r))}getActiveHighlightNode(){const e=super.getActiveHighlightNode();if(!(e?.children.length&&!this.properties.group.interactive))return e}updateNodes(){const{rootNode:e,data:t}=this,{childrenKey:i,colorKey:o,colorName:r,labelKey:s,secondaryLabelKey:a,sizeKey:n,sizeName:l,tile:c,group:h}=this.properties,{seriesRect:u}=this.chart??{};if(!u||!t)return;this.rootNode?.walk(S=>{const{datum:m,depth:v,children:b}=S,D=b.length===0,k=D?c.label:h.label;let A;if(k.enabled&&m!=null&&v!=null&&s!=null){const I=m[s];A=this.getLabelText(I,m,s,"label",[],k,{depth:v,datum:m,childrenKey:i,colorKey:o,colorName:r,labelKey:s,secondaryLabelKey:a,sizeKey:n,sizeName:l,value:I})}A===""&&(A=void 0);let M;if(c.secondaryLabel.enabled&&D&&m!=null&&v!=null&&a!=null){const I=m[a];M=this.getLabelText(I,m,a,"secondaryLabel",[],c.secondaryLabel,{depth:v,datum:m,childrenKey:i,colorKey:o,colorName:r,labelKey:s,secondaryLabelKey:a,sizeKey:n,sizeName:l,value:I})}M===""&&(M=void 0),S.labelValue=(0,import_ag_charts_core281.toPlainText)(A),S.secondaryLabelValue=(0,import_ag_charts_core281.toPlainText)(M)});const{width:d,height:p}=u;this.squarify(e,new BBox29(0,0,d,p)),this.rootNode?.walk(S=>{const{bbox:m,children:v,labelValue:b,secondaryLabelValue:D}=S;if(S.label=void 0,S.secondaryLabel=void 0,m!=null)if(v.length===0){const k={width:m.width,height:m.height,meta:null},A=formatLabels(b,this.properties.tile.label,D,this.properties.tile.secondaryLabel,{padding:c.padding},()=>k);if(A==null)return;const{height:M,label:I,secondaryLabel:_}=A,{textAlign:P,verticalAlign:O,padding:C}=c,L=textAlignFactors2[P]??.5,E=m.x+C+(m.width-2*C)*L,V=verticalAlignFactors4[O]??.5,w=m.y+C+M*.5+(m.height-2*C-M)*V;if(I!=null){const{fontStyle:T="normal",fontFamily:z,fontWeight:B="normal",color:F="black"}=this.properties.tile.label;S.label={text:I.text,fontSize:I.fontSize,lineHeight:I.lineHeight,fontStyle:T,fontFamily:z,fontWeight:B,color:F,textAlign:P,verticalAlign:"middle",x:E,y:w-(M-I.height)*.5}}if(_!=null){const{fontStyle:T="normal",fontFamily:z,fontWeight:B="normal",color:F="black"}=this.properties.tile.secondaryLabel;S.secondaryLabel={text:_.text,fontSize:_.fontSize,lineHeight:_.fontSize,fontStyle:T,fontFamily:z,fontWeight:B,color:F,textAlign:P,verticalAlign:"middle",x:E,y:w+(M-_.height)*.5}}}else{if(b==null)return;{const{padding:k,textAlign:A}=h,M=this.groupTitleHeight(S,m);if(M==null)return;const I=m.width-2*k,_=(0,import_ag_charts_core281.wrapText)(b,{maxWidth:m.width-2*k,font:h.label,textWrap:"never"}),P=textAlignFactors2[A]??.5,{fontStyle:O="normal",fontFamily:C,fontWeight:L="normal",color:E="black"}=this.properties.group.label;S.label={text:_,fontSize:h.label.fontSize,lineHeight:(0,import_ag_charts_core281.calcLineHeight)(h.label.fontSize),fontStyle:O,fontFamily:C,fontWeight:L,color:E,textAlign:A,verticalAlign:"middle",x:m.x+k+I*P,y:m.y+k+M*.5}}}});const g={series:new BBox29(0,0,d,p),axis:new BBox29(0,0,d,p)},y=(S,m,v)=>{const{bbox:b}=S;if(b==null){m.visible=!1;return}const{depth:D=-1}=S,k=S.children.length===0,A=this.getItemStyle(S,k,v);m.crisp=!0,m.setStyleProperties(A,g),m.cornerRadius=k?c.cornerRadius:h.cornerRadius,m.zIndex=[0,D,v?1:0];const M=S.parent?.children.every(P=>P.children.length===0),I=S.parent==null?void 0:S.parent.bbox,_=S.parent==null?void 0:S.parent.padding;M===!0&&I!=null&&_!=null?(m.clipBBox=b,m.x=I.x+_.left,m.y=I.y+_.top,m.width=I.width-(_.left+_.right),m.height=I.height-(_.top+_.bottom)):(m.clipBBox=void 0,m.x=b.x,m.y=b.y,m.width=b.width,m.height=b.height),m.visible=!0};this.datumSelection.each((S,m)=>y(m,S,!1)),this.highlightSelection.each((S,m)=>{y(m,S,!0)});const x=(S,m,v,b)=>{const D=S.children.length===0,k=v===0?S.label:S.secondaryLabel;if(k==null){m.visible=!1;return}let A,M;v===0?(A=D?c.label:h.label,M=["series",`${this.declarationOrder}`,D?"tile":"group","label"]):(A=c.secondaryLabel,M=["series",`${this.declarationOrder}`,"tile","secondaryLabel"]);const{opacity:I}=this.getItemStyle(S,D,b)??{},_={childrenKey:this.properties.childrenKey,colorKey:this.properties.colorKey,colorName:this.properties.colorName??this.properties.colorKey,depth:S.depth??Number.NaN,labelKey:this.properties.labelKey,secondaryLabelKey:this.properties.secondaryLabelKey,sizeKey:this.properties.sizeKey,sizeName:this.properties.sizeName??this.properties.sizeKey},P=this.ctx.highlightManager?.getActiveHighlight(),O=getLabelStyles8(this,S,_,A,b,P,M);m.text=k.text,m.fontSize=k.fontSize,m.lineHeight=k.lineHeight,m.fontStyle=k.fontStyle,m.fontFamily=k.fontFamily,m.fontWeight=k.fontWeight,m.fillOpacity=I??1,m.fill=O.color,m.setBoxing(O),m.textAlign=k.textAlign,m.textBaseline=k.verticalAlign,m.x=k.x,m.y=k.y,m.visible=!0,m.zIndex=1},f=this.getActiveHighlightNode();for(const S of this.labelSelection.selectByClass(Text10)){const m=S.closestDatum();x(m,S,S.tag,m===f)}}getGroupHighlightState(e,t,i){const o=i.datumIndex,r=t?.datumIndex,s=this.isDescendantDatumIndex(o,r);if(i.children?.length===0)return o==null||t==null||t.children?.length===0?HierarchyHighlightState.None:s?HierarchyHighlightState.Item:HierarchyHighlightState.OtherItem;if(t==null||t.children?.length===0)return HierarchyHighlightState.None;const a=i.depth!=null&&t.depth!=null&&i.depth===t.depth;return s&&!a?HierarchyHighlightState.None:e?HierarchyHighlightState.Item:HierarchyHighlightState.OtherItem}getTileHighlightStyle(e,t,i){if(i?.children&&i.children.length>0){const r=this.getGroupHighlightStyle(t);return r?.fillOpacity==null&&r?.strokeOpacity==null?void 0:{fillOpacity:r.fillOpacity,strokeOpacity:r.strokeOpacity}}return this.getHierarchyHighlightStyles(e,this.properties.tile.highlight)}getGroupHighlightStyle(e){const{highlight:t}=this.properties.group;switch(e){case HierarchyHighlightState.Item:return t.highlightedItem;case HierarchyHighlightState.OtherItem:return t.unhighlightedItem;default:return}}getHighlightStateString(e,t,i){if(i==null)return toHierarchyHighlightString2(HierarchyHighlightState.None);const o=i.reduce((n,l)=>n?.children[l],this.rootNode),r=this.getActiveHighlightNode();if(o==null)return toHierarchyHighlightString2(HierarchyHighlightState.None);if((o.children?.length??0)===0){const n=this.getHierarchyHighlightState(t??!1,r,o);return toHierarchyHighlightString2(n)}const a=this.getGroupHighlightState(t??!1,r,o);return toHierarchyHighlightString2(a)}isDescendantDatumIndex(e,t){if(t==null||t.length===0)return!0;if(e==null||e.length<t.length)return!1;for(let i=0;i<t.length;i+=1)if(e[i]!==t[i])return!1;return!0}pickNodesExactShape(e){const t=super.pickNodesExactShape(e);return t.sort((i,o)=>o.datumIndex.length-i.datumIndex.length),t}pickNodeClosestDatum(e){const t=this.pickNodesExactShape(e);return t.length!==0?{datum:t[0],distance:0}:this.pickNodeNearestDistantObject(e,this.datumSelection.nodes())}getTooltipContent(e){const{id:t,properties:i,ctx:o}=this,{formatManager:r}=o,{labelKey:s,secondaryLabelKey:a,childrenKey:n,sizeKey:l,sizeName:c,colorKey:h,colorName:u,tooltip:d}=i,p=e.reduce((M,I)=>M?.children[I],this.rootNode);if(p==null)return;const{datum:g,depth:y,children:x}=p;if(g==null||y==null)return;const f=x.length===0,S=[],m=l==null?void 0:g[l];if(m!=null){const M=[0,this.rootNode?.sumSize??0],I=r.format(this.callWithContext.bind(this),{type:"number",value:m,datum:g,seriesId:t,legendItemName:void 0,key:l,source:"tooltip",property:"size",boundSeries:this.getFormatterContext("size"),domain:M,fractionDigits:void 0,visibleDomain:void 0});S.push({label:c,fallbackLabel:l,value:I??(0,import_ag_charts_core281.formatValue)(m)})}const v=h==null?void 0:g[h];if(v!=null){const{colorDomain:M}=this,I=r.format(this.callWithContext.bind(this),{type:"number",value:v,datum:g,seriesId:t,legendItemName:void 0,key:h,source:"tooltip",property:"color",boundSeries:this.getFormatterContext("color"),domain:M,fractionDigits:void 0,visibleDomain:void 0});S.push({label:u,fallbackLabel:h,value:I??(0,import_ag_charts_core281.formatValue)(v)})}const b=this.getItemStyle({...p,colorValue:v??p.colorValue},f,!1),k={shape:"square",fill:b.fill,fillOpacity:1,stroke:void 0,strokeWidth:0,strokeOpacity:1,lineDash:[0],lineDashOffset:0};(0,import_ag_charts_core281.isGradientFill)(k.fill)&&(k.fill={...k.fill,gradient:"linear",rotation:0,reverse:!1});const A=f?{marker:k}:void 0;return this.formatTooltipWithContext(d,{title:s==null?void 0:g[s],symbol:A,data:S},{seriesId:t,datum:g,title:void 0,depth:y,labelKey:s,secondaryLabelKey:a,childrenKey:n,sizeKey:l,sizeName:c,colorKey:h,colorName:u,...b})}computeFocusBounds(e){return Transformable6.toCanvas(this.contentGroup,e.getBBox())}hasItemStylers(){return this.properties.itemStyler!=null||this.properties.tile.label.itemStyler!=null||this.properties.group.label.itemStyler!=null}};TreemapSeries.className="TreemapSeries",TreemapSeries.type="treemap";var import_ag_charts_community259=require("ag-charts-community"),import_ag_charts_core282=require("ag-charts-core"),{treemapSeriesThemeableOptionsDef}=import_ag_charts_community259._ModuleSupport,treemapSeriesOptionsDef={...treemapSeriesThemeableOptionsDef,...(0,import_ag_charts_core282.without)(import_ag_charts_core282.commonSeriesOptionsDefs,["highlightStyle","highlight","showInLegend"]),type:(0,import_ag_charts_core282.required)((0,import_ag_charts_core282.constant)("treemap")),labelKey:import_ag_charts_core282.string,secondaryLabelKey:import_ag_charts_core282.string,childrenKey:import_ag_charts_core282.string,sizeKey:import_ag_charts_core282.string,colorKey:import_ag_charts_core282.string,sizeName:import_ag_charts_core282.string,colorName:import_ag_charts_core282.string};treemapSeriesOptionsDef.undocumentedGroupFills=(0,import_ag_charts_core282.undocumented)((0,import_ag_charts_core282.arrayOf)(import_ag_charts_core282.color)),treemapSeriesOptionsDef.undocumentedGroupStrokes=(0,import_ag_charts_core282.undocumented)((0,import_ag_charts_core282.arrayOf)(import_ag_charts_core282.color));var TreemapSeriesModule={type:"series",name:"treemap",chartType:"standalone",enterprise:!0,solo:!0,version:import_ag_charts_community260.VERSION,dependencies:[StandaloneChartModule],options:treemapSeriesOptionsDef,themeTemplate:{series:{fills:{$applyCycle:[{$size:{$path:["./data",{$path:"/data"}]}},{$palette:"fills"},{$applySwitch:[{$path:["/type",void 0,{$value:"$1"}]},{$value:"$1"},["gradient",import_ag_charts_core283.FILL_GRADIENT_LINEAR_DEFAULTS],["pattern",import_ag_charts_core283.FILL_PATTERN_DEFAULTS],["image",import_ag_charts_core283.FILL_IMAGE_DEFAULTS]]}]},strokes:{$applyCycle:[{$size:{$path:["./data",{$path:"/data"}]}},{$palette:"strokes"}]},colorRange:{$palette:"divergingColors"},undocumentedGroupFills:{$palette:"hierarchyColors"},undocumentedGroupStrokes:{$palette:"secondHierarchyColors"},group:{label:{...import_ag_charts_core283.LABEL_BOXING_DEFAULTS,enabled:!0,color:{$ref:"textColor"},fontStyle:void 0,fontWeight:{$ref:"fontWeight"},fontSize:{$ref:"fontSize"},fontFamily:{$ref:"fontFamily"},spacing:4},fill:void 0,stroke:void 0,strokeWidth:1,padding:4,gap:2,textAlign:"left",highlight:{unhighlightedItem:{opacity:.2,fillOpacity:.2,strokeOpacity:.2}}},tile:{label:{...import_ag_charts_core283.LABEL_BOXING_DEFAULTS,enabled:!0,color:{$ref:"chartBackgroundColor"},fontStyle:void 0,fontWeight:{$ref:"fontWeight"},fontSize:{$rem:1.5},minimumFontSize:{$rem:import_ag_charts_core283.FONT_SIZE_RATIO.SMALLER},fontFamily:{$ref:"fontFamily"},wrapping:"on-space",overflowStrategy:"ellipsis",spacing:2},secondaryLabel:{...import_ag_charts_core283.LABEL_BOXING_DEFAULTS,enabled:!0,color:{$ref:"chartBackgroundColor"},fontStyle:void 0,fontWeight:void 0,fontSize:{$ref:"fontSize"},minimumFontSize:{$rem:import_ag_charts_core283.FONT_SIZE_RATIO.SMALLER},fontFamily:{$ref:"fontFamily"},wrapping:"never",overflowStrategy:"ellipsis"},fill:void 0,stroke:void 0,strokeWidth:{$isUserOption:["../strokes/0",2,{$isUserOption:["./stroke",2,0]}]},padding:3,gap:1,highlight:{unhighlightedItem:{fillOpacity:.6,strokeOpacity:.6},unhighlightedBranch:{fillOpacity:.2,strokeOpacity:.2}}}},gradientLegend:{enabled:{$if:[{$path:"../series/0/colorKey"},!0,!1]}}},create:e=>new TreemapSeries(e)},import_ag_charts_community267=require("ag-charts-community"),import_ag_charts_community261=require("ag-charts-community"),AllCartesianAxesModule=[import_ag_charts_community261.AllCartesianAxesModule,OrdinalTimeAxisModule].flat(),import_ag_charts_community262=require("ag-charts-community"),AllCartesianSeriesModule=[import_ag_charts_community262.AllCartesianSeriesModule,BoxPlotSeriesModule,CandlestickSeriesModule,ConeFunnelSeriesModule,FunnelSeriesModule,HeatmapSeriesModule,OhlcSeriesModule,RangeAreaSeriesModule,RangeBarSeriesModule,WaterfallSeriesModule].flat(),AllCartesianModule=[AllCartesianAxesModule,AllCartesianSeriesModule,AnimationModule,AnnotationsModule,BandHighlightModule,ChartToolbarModule,ContextMenuModule,CrosshairModule,DataSourceModule,ErrorBarsModule,FlashOnUpdateModule,GradientLegendModule,NavigatorModule,RangesModule,ScrollbarModule,StatusBarModule,SyncModule,ZoomModule].flat(),import_ag_charts_community265=require("ag-charts-community"),import_ag_charts_community264=require("ag-charts-community"),import_ag_charts_core286=require("ag-charts-core"),import_ag_charts_community263=require("ag-charts-community"),import_ag_charts_core285=require("ag-charts-core"),ThemeSymbols2=__toESM(require("ag-charts-core")),import_ag_charts_core284=require("ag-charts-core"),{DEFAULT_ANNOTATION_HANDLE_FILL:DEFAULT_ANNOTATION_HANDLE_FILL2,DEFAULT_ANNOTATION_STATISTICS_COLOR:DEFAULT_ANNOTATION_STATISTICS_COLOR2,DEFAULT_ANNOTATION_STATISTICS_DIVIDER_STROKE:DEFAULT_ANNOTATION_STATISTICS_DIVIDER_STROKE2,DEFAULT_ANNOTATION_STATISTICS_DOWN_FILL:DEFAULT_ANNOTATION_STATISTICS_DOWN_FILL2,DEFAULT_ANNOTATION_STATISTICS_DOWN_STROKE:DEFAULT_ANNOTATION_STATISTICS_DOWN_STROKE2,DEFAULT_ANNOTATION_STATISTICS_FILL:DEFAULT_ANNOTATION_STATISTICS_FILL2,DEFAULT_ANNOTATION_STATISTICS_STROKE:DEFAULT_ANNOTATION_STATISTICS_STROKE2,DEFAULT_FIBONACCI_STROKES:DEFAULT_FIBONACCI_STROKES2,DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL:DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL2,DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR:DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR2,DEFAULT_TEXTBOX_COLOR:DEFAULT_TEXTBOX_COLOR2,DEFAULT_TEXTBOX_FILL:DEFAULT_TEXTBOX_FILL2,DEFAULT_TEXTBOX_STROKE:DEFAULT_TEXTBOX_STROKE2,DEFAULT_TEXT_ANNOTATION_COLOR}=ThemeSymbols2,stroke2={stroke:DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR2},handle2={fill:DEFAULT_ANNOTATION_HANDLE_FILL2},axisLabel2={color:"white",fill:DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR2},lineText2={color:DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR2},font2={color:DEFAULT_TEXT_ANNOTATION_COLOR,fontSize:{$rem:import_ag_charts_core284.FONT_SIZE_RATIO.LARGE},fontFamily:{$ref:"fontFamily"}},measurerStatistics2={...font2,fontSize:{$ref:"fontSize"},color:DEFAULT_ANNOTATION_STATISTICS_COLOR2,fill:DEFAULT_ANNOTATION_STATISTICS_FILL2,stroke:DEFAULT_ANNOTATION_STATISTICS_STROKE2,strokeWidth:1,divider:{stroke:DEFAULT_ANNOTATION_STATISTICS_DIVIDER_STROKE2,strokeWidth:1,strokeOpacity:.5}},measurer2={...stroke2,background:{fill:DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL2,fillOpacity:.2},handle:{...handle2},text:{...lineText2},statistics:{...measurerStatistics2}},annotationsTheme2={line:{...stroke2,handle:{...handle2},text:{...lineText2}},"horizontal-line":{...stroke2,handle:{...handle2},axisLabel:{...axisLabel2},text:{...lineText2}},"vertical-line":{...stroke2,handle:{...handle2},axisLabel:{...axisLabel2},text:{...lineText2}},"disjoint-channel":{...stroke2,background:{fill:DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL2,fillOpacity:.2},handle:{...handle2},text:{...lineText2}},"parallel-channel":{...stroke2,background:{fill:DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL2,fillOpacity:.2},handle:{...handle2},text:{...lineText2}},"fibonacci-retracement":{...stroke2,strokes:DEFAULT_FIBONACCI_STROKES2,rangeStroke:DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR2,handle:{...handle2},text:{...lineText2,position:"center"},label:{...font2,color:void 0,fontSize:{$rem:import_ag_charts_core284.FONT_SIZE_RATIO.SMALLER}}},"fibonacci-retracement-trend-based":{...stroke2,strokes:DEFAULT_FIBONACCI_STROKES2,rangeStroke:DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR2,handle:{...handle2},text:{...lineText2,position:"center"},label:{...font2,color:void 0,fontSize:{$rem:import_ag_charts_core284.FONT_SIZE_RATIO.SMALLER}}},callout:{...stroke2,...font2,color:{$ref:"textColor"},handle:{...handle2},fill:DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL2,fillOpacity:.2},comment:{...font2,color:"white",fontWeight:700,handle:{...handle2},fill:DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR2},note:{...font2,color:DEFAULT_TEXTBOX_COLOR2,fill:DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR2,stroke:{$ref:"chartBackgroundColor"},strokeWidth:1,strokeOpacity:1,handle:{...handle2},background:{fill:DEFAULT_TEXTBOX_FILL2,stroke:DEFAULT_TEXTBOX_STROKE2,strokeWidth:1}},text:{...font2,handle:{...handle2}},arrow:{...stroke2,handle:{...handle2},text:{...lineText2}},"arrow-up":{fill:{$palette:"up.fill"},handle:{...handle2,stroke:DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR2}},"arrow-down":{fill:{$palette:"down.fill"},handle:{...handle2,stroke:DEFAULT_FINANCIAL_CHARTS_ANNOTATION_COLOR2}},"date-range":{...measurer2},"price-range":{...measurer2},"date-price-range":{...measurer2},"quick-date-price-range":{up:{...stroke2,fill:DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL2,fillOpacity:.2,handle:{...handle2},statistics:{...measurerStatistics2,color:"#fff",fill:DEFAULT_FINANCIAL_CHARTS_ANNOTATION_BACKGROUND_FILL2,strokeWidth:0,divider:{stroke:"#fff",strokeWidth:1,strokeOpacity:.5}}},down:{...stroke2,stroke:DEFAULT_ANNOTATION_STATISTICS_DOWN_STROKE2,fill:DEFAULT_ANNOTATION_STATISTICS_DOWN_FILL2,fillOpacity:.2,handle:{...handle2,stroke:DEFAULT_ANNOTATION_STATISTICS_DOWN_STROKE2},statistics:{...measurerStatistics2,color:"#fff",fill:DEFAULT_ANNOTATION_STATISTICS_DOWN_FILL2,strokeWidth:0,divider:{stroke:"#fff",strokeWidth:1,strokeOpacity:.5}}}},axesButtons:{enabled:!0}},chartTypes=["ohlc","line","step-line","hlc","high-low","candlestick","hollow-candlestick"],toolbarButtons=[{icon:"trend-line-drawing",tooltip:"toolbarAnnotationsLineAnnotations",value:"line-menu"},{icon:"fibonacci-retracement-drawing",tooltip:"toolbarAnnotationsFibonacciAnnotations",value:"fibonacci-menu"},{icon:"text-annotation",tooltip:"toolbarAnnotationsTextAnnotations",value:"text-menu"},{icon:"arrow-drawing",tooltip:"toolbarAnnotationsShapeAnnotations",value:"shape-menu"},{icon:"measurer-drawing",tooltip:"toolbarAnnotationsMeasurerAnnotations",value:"measurer-menu"},{icon:"delete",tooltip:"toolbarAnnotationsClearAll",value:"clear"}];function priceVolume(e,t,i){const{dateKey:o="date",highKey:r="high",openKey:s="open",lowKey:a="low",closeKey:n="close",volumeKey:l="volume",chartType:c="candlestick",navigator:h=!1,volume:u=!0,rangeButtons:d=!0,statusBar:p=!0,toolbar:g=!0,zoom:y=!0,sync:x=!1,theme:f,data:S,formatter:m,...v}=e,b=createPriceSeries(c,o,r,a,s,n),D=createVolumeSeries(i,o,s,n,u,l),k=u?{miniChart:{enabled:h,series:[{type:"line",xKey:o,yKey:l,stroke:import_ag_charts_core285.SAFE_STROKE_FILL_OPERATION,marker:{enabled:!1}}]},height:40,minHandle:{height:46},maxHandle:{height:46}}:null,A={navigator:{enabled:h,...k}},M={annotations:{enabled:g,optionsToolbar:{enabled:g},snap:!0,toolbar:{enabled:g,buttons:toolbarButtons,padding:0},data:S,xKey:o,volumeKey:u?l:void 0}},I=p?{statusBar:{enabled:!0,highKey:r,openKey:s,lowKey:a,closeKey:n,volumeKey:u?l:void 0}}:null,_={zoom:{enabled:y,autoScaling:{enabled:!0},onDataChange:{stickToEnd:!0},enableIndependentAxes:!0}},P={ranges:{enabled:d}},O=x?{sync:{enabled:x,nodeInteraction:!0,zoom:!0}}:null,C=u?{yVolume:{type:"number",position:"left",label:{enabled:!1},crosshair:{enabled:!1},gridLine:{enabled:!1},nice:!1,layoutConstraints:{stacked:!1,width:20,unit:"percent",align:"end"}}}:{};return{theme:{baseTheme:typeof f=="string"?f:"ag-financial",...(0,import_ag_charts_core285.mergeDefaults)(typeof f=="object"?f:null,{overrides:{common:{title:{padding:4},padding:{top:6,right:8,bottom:6},chartToolbar:{enabled:g},annotations:{...annotationsTheme2},axes:{number:{interval:{maxSpacing:45},label:{format:".2f"}},category:{gridLine:{enabled:!0}},time:{gridLine:{enabled:!0}},"unit-time":{gridLine:{enabled:!0}},"ordinal-time":{gridLine:{enabled:!0}}}},bar:{series:{fillOpacity:.5,highlight:{unhighlightedItem:{opacity:1},unhighlightedSeries:{opacity:1}}}},line:{series:{marker:{enabled:!1},highlight:{unhighlightedSeries:{opacity:1}},...inlineSwitch(c,{hlc:{stroke:{$palette:"altNeutral.stroke"},strokeWidth:2},line:{stroke:{$palette:"neutral.stroke"}},"step-line":{stroke:{$palette:"neutral.stroke"},interpolation:{type:"step"}}})}},candlestick:{series:{highlight:{unhighlightedItem:{opacity:1},unhighlightedSeries:{opacity:1}},...inlineSwitch(c,{"hollow-candlestick":{item:{up:{fill:"transparent"}}}})}},ohlc:{series:{highlight:{unhighlightedItem:{opacity:1},unhighlightedSeries:{opacity:1}}}},"range-area":{series:{fillOpacity:.3,strokeWidth:2,highlight:{bringToFront:!1,unhighlightedItem:{opacity:1},unhighlightedSeries:{opacity:1}},...inlineSwitch(c,{hlc:{fill:{$if:[{$eq:[{$value:"$index"},1]},{$palette:"up.fill"},{$palette:"down.fill"}]},stroke:{$if:[{$eq:[{$value:"$index"},1]},{$palette:"up.stroke"},{$palette:"down.stroke"}]}}})}},"range-bar":{series:{highlight:{unhighlightedItem:{opacity:1},unhighlightedSeries:{opacity:1}},...inlineSwitch(c,{"high-low":{fill:{$palette:"neutral.fill"},stroke:{$palette:"neutral.stroke"}}})}}}})},animation:{enabled:!1},legend:{enabled:!1},series:[...D,...b],axes:{y:{type:"number",position:"right",crosshair:{enabled:!0,snap:!1},layoutConstraints:{stacked:!1,width:100,unit:"percent",align:"start"}},...C,x:{type:"ordinal-time",position:"bottom",line:{enabled:!1},label:{enabled:!0},crosshair:{enabled:!0}}},tooltip:{enabled:!1},data:S,formatter:m,...M,...A,...I,..._,...P,...O,...v}}function createVolumeSeries(e,t,i,o,r,s){return r?[{type:"bar",xKey:t,yKey:s,yKeyAxis:"yVolume",tooltip:{enabled:!1},simpleItemStyler(a){const{up:n,down:l}=e().palette;return{fill:a[i]<a[o]?n?.fill:l?.fill}},focusPriority:1,highlight:{unhighlightedSeries:{opacity:1}}}]:[]}var RANGE_AREA_TYPE="range-area";function createPriceSeries(e,t,i,o,r,s){const a={xKey:t,openKey:r,closeKey:s,highKey:i,lowKey:o},n={xKey:t,yKey:s},l={pickOutsideVisibleMinorAxis:!0};switch(e??"candlestick"){case"ohlc":return createPriceSeriesOHLC(l,a);case"line":case"step-line":return createPriceSeriesLine(l,n);case"hlc":return createPriceSeriesHLC(l,n,a);case"high-low":return createPriceSeriesHighLow(l,a);case"candlestick":case"hollow-candlestick":return createPriceSeriesCandlestick(l,a);default:return import_ag_charts_core285.Logger.warnOnce(`unknown chart type: ${e}; expected one of: ${chartTypes.join(", ")}`),createPriceSeriesCandlestick(l,a)}}function createPriceSeriesOHLC(e,t){return[{type:"ohlc",focusPriority:0,...e,...t}]}function createPriceSeriesLine(e,t){return[{type:"line",focusPriority:0,...e,...t}]}function createPriceSeriesHLC(e,t,{xKey:i,highKey:o,closeKey:r,lowKey:s}){return[{type:RANGE_AREA_TYPE,focusPriority:0,...e,xKey:i,yHighKey:o,yLowKey:r},{type:RANGE_AREA_TYPE,focusPriority:0,...e,xKey:i,yHighKey:r,yLowKey:s},{type:"line",...e,...t}]}function createPriceSeriesHighLow(e,{xKey:t,highKey:i,lowKey:o}){return[{type:"range-bar",...e,xKey:t,yHighKey:i,yLowKey:o,tooltip:{range:"nearest"},focusPriority:0}]}function createPriceSeriesCandlestick(e,t){return[{type:"candlestick",focusPriority:0,...e,...t}]}function inlineSwitch(e,t){return t[e]??t.default}var priceVolumeOptionsDef={chartType:(0,import_ag_charts_core286.union)("candlestick","hollow-candlestick","ohlc","line","step-line","hlc","high-low"),dateKey:import_ag_charts_core286.string,openKey:import_ag_charts_core286.string,highKey:import_ag_charts_core286.string,lowKey:import_ag_charts_core286.string,closeKey:import_ag_charts_core286.string,volumeKey:import_ag_charts_core286.string,navigator:import_ag_charts_core286.boolean,volume:import_ag_charts_core286.boolean,rangeButtons:import_ag_charts_core286.boolean,statusBar:import_ag_charts_core286.boolean,toolbar:import_ag_charts_core286.boolean,zoom:import_ag_charts_core286.boolean,sync:import_ag_charts_core286.boolean,theme:import_ag_charts_core286.defined,container:import_ag_charts_core286.defined,width:import_ag_charts_core286.defined,height:import_ag_charts_core286.defined,minWidth:import_ag_charts_core286.defined,minHeight:import_ag_charts_core286.defined,listeners:import_ag_charts_core286.defined,initialState:import_ag_charts_core286.defined,title:import_ag_charts_core286.defined,data:import_ag_charts_core286.array,formatter:import_ag_charts_core286.defined},commonGaugeOptions2={theme:import_ag_charts_core286.defined,container:import_ag_charts_core286.defined,animation:import_ag_charts_core286.defined,background:import_ag_charts_core286.defined,contextMenu:import_ag_charts_core286.defined,context:()=>!0,listeners:import_ag_charts_core286.defined,locale:import_ag_charts_core286.defined,width:import_ag_charts_core286.defined,height:import_ag_charts_core286.defined,minWidth:import_ag_charts_core286.defined,minHeight:import_ag_charts_core286.defined,title:import_ag_charts_core286.defined,subtitle:import_ag_charts_core286.defined,footnote:import_ag_charts_core286.defined,padding:import_ag_charts_core286.defined,tooltip:{...import_ag_charts_core286.tooltipOptionsDefs,...import_ag_charts_core286.commonChartOptionsDefs.tooltip}};commonGaugeOptions2.overrideDevicePixelRatio=(0,import_ag_charts_core286.undocumented)(import_ag_charts_core286.positiveNumber);var PriceVolumePresetModule={type:"preset",name:"price-volume",enterprise:!0,dependencies:[ChartToolbarModule,StatusBarModule],version:import_ag_charts_community264.VERSION,options:priceVolumeOptionsDef,create:priceVolume},FinancialChartModule=[PriceVolumePresetModule,import_ag_charts_community265.BarSeriesModule,import_ag_charts_community265.LineSeriesModule,CandlestickSeriesModule,OhlcSeriesModule,RangeBarSeriesModule,RangeAreaSeriesModule,AnimationModule,AnnotationsModule,BandHighlightModule,ChartToolbarModule,ContextMenuModule,CrosshairModule,DataSourceModule,ErrorBarsModule,GradientLegendModule,NavigatorModule,RangesModule,SyncModule,ZoomModule,OrdinalTimeAxisModule,import_ag_charts_community265.TimeAxisModule,import_ag_charts_community265.NumberAxisModule],AllGaugeModule=[LinearGaugeModule,RadialGaugeModule],import_ag_charts_community266=require("ag-charts-community"),AllPolarModule=[import_ag_charts_community266.AllPolarModule,AngleNumberAxisModule,AngleCategoryAxisModule,RadiusNumberAxisModule,RadiusCategoryAxisModule,NightingaleSeriesModule,RadarAreaSeriesModule,RadarLineSeriesModule,RadialBarSeriesModule,RadialColumnSeriesModule,AnimationModule,ContextMenuModule,DataSourceModule,GradientLegendModule].flat(),AllMapSeriesModule=[MapLineSeriesModule,MapLineBackgroundSeriesModule,MapMarkerSeriesModule,MapShapeSeriesModule,MapShapeBackgroundSeriesModule],AllEnterpriseModule=[import_ag_charts_community267.AllCommunityModule,AllCartesianModule,AllPolarModule,AllMapSeriesModule,AllGaugeModule,FinancialChartModule,ChordSeriesModule,PyramidSeriesModule,SankeySeriesModule,SunburstSeriesModule,TreemapSeriesModule].flat(),import_ag_charts_community269=require("ag-charts-community"),import_ag_charts_community268=require("ag-charts-community"),import_ag_charts_core287=require("ag-charts-core");function setupEnterpriseModules(){import_ag_charts_core287.ModuleRegistry.registerModules(AllEnterpriseModule),import_ag_charts_core287.enterpriseRegistry.styles=styles_default,import_ag_charts_core287.enterpriseRegistry.licenseManager=e=>new LicenseManager(e.container?.ownerDocument??(typeof document>"u"?void 0:document)),import_ag_charts_core287.enterpriseRegistry.injectWatermark=injectWatermark,import_ag_charts_core287.enterpriseRegistry.createBackground=e=>new Background(e),import_ag_charts_core287.enterpriseRegistry.createForeground=e=>new Foreground(e)}var LicenseManager2={setLicenseKey(e){LicenseManager.setLicenseKey(e)}},AgChartsEnterpriseModule={VERSION:import_ag_charts_community269.VERSION,_Scene:import_ag_charts_community269._Scene,_Theme:import_ag_charts_community269._Theme,_Util:import_ag_charts_community269._Util,create:import_ag_charts_community269.AgCharts.create.bind(import_ag_charts_community269.AgCharts),createSparkline:import_ag_charts_community269.AgCharts.__createSparkline.bind(import_ag_charts_community269.AgCharts),setup:()=>{import_ag_charts_community269.ModuleRegistry.setRegistryMode(import_ag_charts_community269.ModuleRegistry.RegistryMode.Integrated),setupEnterpriseModules()},setGridContext:LicenseManager.setGridContext.bind(LicenseManager),setLicenseKey:LicenseManager.setLicenseKey.bind(LicenseManager),isEnterprise:!0};import_ag_charts_core288.ModuleRegistry.setRegistryMode(import_ag_charts_core288.ModuleRegistry.RegistryMode.Enterprise),import_ag_charts_core288.enterpriseRegistry.styles=styles_default,import_ag_charts_core288.enterpriseRegistry.licenseManager=e=>new LicenseManager(e.container?.ownerDocument??(typeof document>"u"?void 0:document)),import_ag_charts_core288.enterpriseRegistry.injectWatermark=injectWatermark,import_ag_charts_core288.enterpriseRegistry.createBackground=e=>new Background(e),import_ag_charts_core288.enterpriseRegistry.createForeground=e=>new Foreground(e);