UNPKG

ag-charts-community

Version:

Advanced Charting / Charts supporting Javascript / Typescript / React / Angular / Vue

2 lines 1.32 MB
"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(t,e)=>{for(var i in e)__defProp(t,i,{get:e[i],enumerable:!0})},__copyProps=(t,e,i,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of __getOwnPropNames(e))!__hasOwnProp.call(t,n)&&n!==i&&__defProp(t,n,{get:()=>e[n],enumerable:!(s=__getOwnPropDesc(e,n))||s.enumerable});return t},__reExport=(t,e,i)=>(__copyProps(t,e,"default"),i&&__copyProps(i,e,"default")),__toCommonJS=t=>__copyProps(__defProp({},"__esModule",{value:!0}),t),__decorateClass=(t,e,i,s)=>{for(var n=s>1?void 0:s?__getOwnPropDesc(e,i):e,r=t.length-1,a;r>=0;r--)(a=t[r])&&(n=(s?a(e,i,n):a(n))||n);return s&&n&&__defProp(e,i,n),n},main_exports={};__export(main_exports,{AG_CHARTS_LOCALE_EN_US:()=>AG_CHARTS_LOCALE_EN_US,AgCharts:()=>AgCharts,AgChartsCommunityModule:()=>AgChartsCommunityModule,AgTooltipAnchorToType:()=>AgTooltipAnchorToType,AgTooltipPlacementType:()=>AgTooltipPlacementType,AllCartesianAxesModule:()=>AllCartesianAxesModule,AllCartesianModule:()=>AllCartesianModule,AllCartesianSeriesModule:()=>AllCartesianSeriesModule,AllCommunityModule:()=>AllCommunityModule,AllPolarModule:()=>AllPolarModule,AreaSeriesModule:()=>AreaSeriesModule,BarSeriesModule:()=>BarSeriesModule,BubbleSeriesModule:()=>BubbleSeriesModule,CartesianChartModule:()=>CartesianChartModule,CategoryAxisModule:()=>CategoryAxisModule,CrossLinesModule:()=>CrossLinesModule,DonutSeriesModule:()=>DonutSeriesModule,GroupedCategoryAxisModule:()=>GroupedCategoryAxisModule,HistogramSeriesModule:()=>HistogramSeriesModule,LegendModule:()=>LegendModule,LineSeriesModule:()=>LineSeriesModule,LocaleModule:()=>LocaleModule,LogAxisModule:()=>LogAxisModule,ModuleRegistry:()=>import_ag_charts_core283.ModuleRegistry,NumberAxisModule:()=>NumberAxisModule,PieSeriesModule:()=>PieSeriesModule,PolarChartModule:()=>PolarChartModule,ScatterSeriesModule:()=>ScatterSeriesModule,SparklinePresetModule:()=>SparklinePresetModule,TimeAxisModule:()=>TimeAxisModule,UnitTimeAxisModule:()=>UnitTimeAxisModule,VERSION:()=>VERSION,_ModuleSupport:()=>module_support_exports,_Scene:()=>integrated_charts_scene_exports,_Theme:()=>integrated_charts_theme_exports,_Util:()=>integrated_charts_util_exports,_Widget:()=>exports_exports,time:()=>time}),module.exports=__toCommonJS(main_exports);var AG_CHARTS_LOCALE_EN_US={ariaInitSeriesArea:"interactive chart",ariaAnnounceHoverDatum:"${datum}",ariaAnnounceChart:"chart, ${seriesCount}[number] series",ariaAnnounceStandaloneChart:"chart, ${caption}",ariaAnnounceHierarchyChart:"hierarchy chart, ${caption}",ariaAnnounceGaugeChart:"gauge chart, ${caption}",ariaAnnounceHierarchyDatum:"level ${level}[number], ${count}[number] children, ${description}",ariaAnnounceFlowProportionLink:"link ${index} of ${count}, from ${from} to ${to}, ${sizeName} ${size}",ariaAnnounceFlowProportionNode:"node ${index} of ${count}, ${description}",ariaAnnounceOrgChartLeaf:"${description}, level ${level}[number], ${posInSet}[number] of ${setSize}[number]",ariaAnnounceOrgChartParent:"${description}, level ${level}[number], ${posInSet}[number] of ${setSize}[number], ${collapsedState}, ${childCount}[number] children, press Enter or Space to toggle",ariaAnnounceOrgChartParentSingular:"${description}, level ${level}[number], ${posInSet}[number] of ${setSize}[number], ${collapsedState}, 1 child, press Enter or Space to toggle",ariaOrgChartCollapsed:"collapsed",ariaOrgChartExpanded:"expanded",ariaDescriptionLegendItem:"Press Space or Enter to toggle visibility",ariaLabelAddHorizontalLine:"Add Horizontal Line",ariaLabelAnnotationsToolbar:"Annotations",ariaLabelAnnotationOptionsToolbar:"Annotation Options",ariaLabelAnnotationSettingsDialog:"Annotation Settings",ariaLabelColor:"Color",ariaLabelColorPicker:"Color picker",ariaLabelColorPickerAlpha:"Transparency",ariaLabelColorPickerHue:"Hue",ariaLabelColorPickerMultiColor:"Multi Color",ariaLabelColorPickerPalette:"Palette",ariaLabelFinancialCharts:"Financial Charts",ariaLabelGaugeTarget:"Target",ariaLabelGaugeValue:"Value",ariaLabelLegend:"Legend",ariaLabelLegendPagination:"Legend Pagination",ariaLabelLegendPagePrevious:"Previous Legend Page",ariaLabelLegendPageNext:"Next Legend Page",ariaLabelLegendItem:"${label}, Legend item ${index}[number] of ${count}[number]",ariaLabelLegendItemUnknown:"Unknown legend item",ariaLabelNavigator:"Navigator",ariaLabelNavigatorRange:"Range",ariaLabelScrollbarHorizontal:"X-axis scrollbar",ariaLabelScrollbarVertical:"Y-axis scrollbar",ariaLabelNavigatorMinimum:"Minimum",ariaLabelNavigatorMaximum:"Maximum",ariaLabelRangesToolbar:"Ranges",ariaLabelSettingsTabBar:"Settings",ariaLabelZoomToolbar:"Zoom",ariaRoleDescription2DSlider:"2D slider",ariaValueColorPalette:"s ${s}[percent0to2dp], v ${v}[percent0to2dp]",ariaValueColorPaletteFirstV:"v ${v}[percent0to2dp], s ${s}[percent0to2dp]",ariaValuePanRange:"${min}[percent0to2dp] to ${max}[percent0to2dp]",iconAltTextLineStyleSolid:"Solid",iconAltTextLineStyleDashed:"Long-dashed",iconAltTextLineStyleDotted:"Short-dashed",iconAltTextPositionTop:"Top",iconAltTextPositionCenter:"Center",iconAltTextPositionBottom:"Bottom",iconAltTextAlignLeft:"Left",iconAltTextAlignCenter:"Center",iconAltTextAlignRight:"Right",iconAltTextClose:"Close",overlayLoadingData:"Loading data...",overlayNoData:"No data to display",overlayNoVisibleSeries:"No visible series",overlayUnsupportedBrowser:"Incompatible browser version. Please upgrade your browser.",seriesHistogramTooltipFrequency:"Frequency",seriesHistogramTooltipSum:"${yName} (sum)",seriesHistogramTooltipCount:"${yName} (count)",seriesHistogramTooltipMean:"${yName} (mean)",toolbarSeriesTypeDropdown:"Chart Type",toolbarSeriesTypeOHLC:"OHLC",toolbarSeriesTypeHLC:"HLC",toolbarSeriesTypeHighLow:"High Low",toolbarSeriesTypeCandles:"Candles",toolbarSeriesTypeHollowCandles:"Hollow Candles",toolbarSeriesTypeLine:"Line",toolbarSeriesTypeLineWithMarkers:"Line with Markers",toolbarSeriesTypeStepLine:"Step Line",toolbarAnnotationsTrendLine:"Trend Line",toolbarAnnotationsFibonacciRetracement:"Fib Retracement",toolbarAnnotationsFibonacciRetracementTrendBased:"Fib Trend Based",toolbarAnnotationsHorizontalLine:"Horizontal Line",toolbarAnnotationsVerticalLine:"Vertical Line",toolbarAnnotationsParallelChannel:"Parallel Channel",toolbarAnnotationsDisjointChannel:"Disjoint Channel",toolbarAnnotationsClearAll:"Clear All",toolbarAnnotationsFillColor:"Fill Color",toolbarAnnotationsLineColor:"Line Color",toolbarAnnotationsLineStyle:"Line Style",toolbarAnnotationsLineStrokeWidth:"Line Stroke Width",toolbarAnnotationsSettings:"Settings",toolbarAnnotationsTextColor:"Text Color",toolbarAnnotationsTextSize:"Text Size",toolbarAnnotationsLock:"Lock",toolbarAnnotationsUnlock:"Unlock",toolbarAnnotationsDelete:"Delete",toolbarAnnotationsDragHandle:"Drag Toolbar",toolbarAnnotationsLineAnnotations:"Trend Lines",toolbarAnnotationsFibonacciAnnotations:"Fibonacci",toolbarAnnotationsTextAnnotations:"Text Annotations",toolbarAnnotationsShapeAnnotations:"Arrows",toolbarAnnotationsMeasurerAnnotations:"Measurers",toolbarAnnotationsCallout:"Callout",toolbarAnnotationsComment:"Comment",toolbarAnnotationsNote:"Note",toolbarAnnotationsText:"Text",toolbarAnnotationsArrow:"Arrow",toolbarAnnotationsArrowUp:"Arrow Up",toolbarAnnotationsArrowDown:"Arrow Down",toolbarAnnotationsDateRange:"Date Range",toolbarAnnotationsPriceRange:"Price Range",toolbarAnnotationsDatePriceRange:"Date and Price",toolbarAnnotationsQuickDatePriceRange:"Measure",toolbarRange1Month:"1M",toolbarRange1MonthAria:"1 month",toolbarRange3Months:"3M",toolbarRange3MonthsAria:"3 months",toolbarRange6Months:"6M",toolbarRange6MonthsAria:"6 months",toolbarRangeYearToDate:"YTD",toolbarRangeYearToDateAria:"Year to date",toolbarRange1Year:"1Y",toolbarRange1YearAria:"1 year",toolbarRangeAll:"All",toolbarRangeAllAria:"All",toolbarRangeSelectRange:"Select range",toolbarRangeSelectRangeAria:"Select range",toolbarZoomZoomOut:"Zoom out",toolbarZoomZoomIn:"Zoom in",toolbarZoomPanLeft:"Pan left",toolbarZoomPanRight:"Pan right",toolbarZoomPanStart:"Pan to the start",toolbarZoomPanEnd:"Pan to the end",toolbarZoomReset:"Reset the zoom",contextMenuDownload:"Download",contextMenuToggleSeriesVisibility:"Toggle Visibility",contextMenuToggleOtherSeries:"Toggle Other Series",contextMenuZoomToCursor:"Zoom to here",contextMenuPanToCursor:"Pan to here",contextMenuResetZoom:"Reset zoom",dialogHeaderChannel:"Channel",dialogHeaderLine:"Line",dialogHeaderFibonacciRange:"Fib Retracement",dialogHeaderDateRange:"Date Range",dialogHeaderPriceRange:"Price Range",dialogHeaderDatePriceRange:"Date and Price",dialogHeaderText:"Text",dialogInputAlign:"Align",dialogInputColorPicker:"Color",dialogInputColorPickerAltText:"Text Color",dialogInputFillColorPicker:"Fill",dialogInputFillColorPickerAltText:"Fill Color",dialogInputExtendChannelStart:"Extend channel start",dialogInputExtendChannelEnd:"Extend channel end",dialogInputExtendLineStart:"Extend line start",dialogInputExtendLineEnd:"Extend line end",dialogInputExtendAbove:"Extend above",dialogInputExtendBelow:"Extend below",dialogInputExtendLeft:"Extend left",dialogInputExtendRight:"Extend right",dialogInputReverse:"Reverse",dialogInputShowFill:"Show Fill",dialogInputFontSize:"Size",dialogInputFontSizeAltText:"Font Size",dialogInputLineStyle:"Dash",dialogInputPosition:"Position",dialogInputStrokeWidth:"Weight",dialogInputStrokeWidthAltText:"Line Weight",dialogInputFibonacciBands:"Bands",dialogInputFibonacciBandsAltText:"Fibonacci Bands",inputTextareaPlaceholder:"Add Text",measurerDateRangeBars:"${value}[number] bars",measurerPriceRangeValue:"${value}[number]",measurerPriceRangePercent:"${value}[percent]",measurerVolume:"Vol ${value}",tooltipPaginationStatus:"${index}[number] of ${count}[number]"},__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=(t=>(t.POINTER="pointer",t.NODE="node",t.CHART="chart",t))(AgTooltipAnchorToType||{}),AgTooltipPlacementType=(t=>(t.TOP="top",t.RIGHT="right",t.BOTTOM="bottom",t.LEFT="left",t.TOP_RIGHT="top-right",t.BOTTOM_RIGHT="bottom-right",t.BOTTOM_LEFT="bottom-left",t.TOP_LEFT="top-left",t.CENTER="center",t))(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;var import_ag_charts_core=require("ag-charts-core");function createTimeInterval(t,e,i,s){return{unit:t,step:e,epoch:i,utc:s,every(n){return createTimeInterval(this.unit,(this.step??1)*n,this.epoch,this.utc)}}}var cachedInstances={};function getTimeInterval(t,e=1,i,s=!1){import_ag_charts_core.Logger.warnOnce("time import is deprecated, use object notation instead");const n=`${t}:${e}:${i?.getTime()??0}:${s}`;let r=cachedInstances[n];return r==null&&(r=createTimeInterval(t,e,i,s),cachedInstances[n]=r),r}var time={get millisecond(){return getTimeInterval("millisecond")},get second(){return getTimeInterval("second")},get minute(){return getTimeInterval("minute")},get hour(){return getTimeInterval("hour")},get day(){return getTimeInterval("day")},get monday(){return getTimeInterval("day",7,new Date(1970,0,5))},get tuesday(){return getTimeInterval("day",7,new Date(1970,0,6))},get wednesday(){return getTimeInterval("day",7,new Date(1970,0,7))},get thursday(){return getTimeInterval("day",7,new Date(1970,0,1))},get friday(){return getTimeInterval("day",7,new Date(1970,0,2))},get saturday(){return getTimeInterval("day",7,new Date(1970,0,3))},get sunday(){return getTimeInterval("day",7,new Date(1970,0,4))},get month(){return getTimeInterval("month")},get year(){return getTimeInterval("year")},get utcMillisecond(){return getTimeInterval("millisecond",1,void 0,!0)},get utcSecond(){return getTimeInterval("second",1,void 0,!0)},get utcMinute(){return getTimeInterval("minute",1,void 0,!0)},get utcHour(){return getTimeInterval("hour",1,void 0,!0)},get utcDay(){return getTimeInterval("day",1,void 0,!0)},get utcMonth(){return getTimeInterval("month",1,void 0,!0)},get utcYear(){return getTimeInterval("year",1,void 0,!0)}},import_ag_charts_core172=require("ag-charts-core"),import_ag_charts_core136=require("ag-charts-core"),import_ag_charts_core2=require("ag-charts-core"),interpolate=Symbol("interpolate"),isInterpolating=t=>t[interpolate]!=null,_BBox=class he{constructor(e,i,s,n){this.x=e,this.y=i,this.width=s,this.height=n}static fromObject({x:e,y:i,width:s,height:n}){return new he(e,i,s,n)}static merge(e){let i=1/0,s=1/0,n=-1/0,r=-1/0;for(const a of e)a.x<i&&(i=a.x),a.y<s&&(s=a.y),end(a.x,a.width)>n&&(n=end(a.x,a.width)),end(a.y,a.height)>r&&(r=end(a.y,a.height));return new he(i,s,n-i,r-s)}static nearestBox(e,i,s){return(0,import_ag_charts_core2.nearestSquared)(e,i,s)}toDOMRect(){return{x:this.x,y:this.y,width:this.width,height:this.height,top:this.y,left:this.x,right:end(this.x,this.width),bottom:end(this.y,this.height),toJSON(){return{}}}}clone(){const{x:e,y:i,width:s,height:n}=this;return new he(e,i,s,n)}equals(e){return(0,import_ag_charts_core2.boxesEqual)(this,e)}containsPoint(e,i){return(0,import_ag_charts_core2.boxContains)(this,e,i)}intersectsWith(e){return!(this.x+this.width<=e.x||e.x+e.width<=this.x||this.y+this.height<=e.y||e.y+e.height<=this.y)}intersection(e){const i=Math.max(this.x,e.x),s=Math.max(this.y,e.y),n=Math.min(end(this.x,this.width),end(e.x,e.width)),r=Math.min(end(this.y,this.height),end(e.y,e.height));if(!(i>n||s>r))return new he(i,s,n-i,r-s)}collidesBBox(e){return this.x<end(e.x,e.width)&&end(this.x,this.width)>e.x&&this.y<end(e.y,e.height)&&end(this.y,this.height)>e.y}computeCenter(){return{x:this.x+this.width/2,y:this.y+this.height/2}}isFinite(){return Number.isFinite(this.x)&&Number.isFinite(this.y)&&Number.isFinite(this.width)&&Number.isFinite(this.height)}distanceSquared(e,i){if(this.containsPoint(e,i))return 0;const s=e-(0,import_ag_charts_core2.clamp)(this.x,e,end(this.x,this.width)),n=i-(0,import_ag_charts_core2.clamp)(this.y,i,end(this.y,this.height));return s*s+n*n}shrink(e,i){if(typeof e=="number")this.applyMargin(e,i);else for(const s of Object.keys(e)){const n=e[s];typeof n=="number"&&this.applyMargin(n,s)}return this.width<0&&(this.width=0),this.height<0&&(this.height=0),this}grow(e,i){if(typeof e=="number")this.applyMargin(-e,i);else for(const s of Object.keys(e)){const n=e[s];typeof n=="number"&&this.applyMargin(-n,s)}return this}applyMargin(e,i){switch(i){case"top":this.y+=e;case"bottom":this.height-=e;break;case"left":this.x+=e;case"right":this.width-=e;break;case"vertical":this.y+=e,this.height-=e*2;break;case"horizontal":this.x+=e,this.width-=e*2;break;case void 0:this.x+=e,this.y+=e,this.width-=e*2,this.height-=e*2;break}}translate(e,i){return this.x+=e,this.y+=i,this}[interpolate](e,i){return new he(this.x*(1-i)+e.x*i,this.y*(1-i)+e.y*i,this.width*(1-i)+e.width*i,this.height*(1-i)+e.height*i)}};_BBox.zero=Object.freeze(new _BBox(0,0,0,0)),_BBox.NaN=Object.freeze(new _BBox(Number.NaN,Number.NaN,Number.NaN,Number.NaN));var BBox=_BBox;function end(t,e){return t===-1/0&&e===1/0?1/0:t+e}var import_ag_charts_core22=require("ag-charts-core"),import_ag_charts_core4=require("ag-charts-core"),import_ag_charts_core3=require("ag-charts-core");function clearContext({context:t,pixelRatio:e,width:i,height:s}){t.save();try{t.resetTransform(),t.clearRect(0,0,Math.ceil(i*e),Math.ceil(s*e))}finally{t.restore()}}function debugContext(t){if(import_ag_charts_core3.Debug.check("canvas")){const e=t.save.bind(t),i=t.restore.bind(t);let s=0;Object.assign(t,{save(){e(),s++},restore(){if(s===0)throw new Error("AG Charts - Unable to restore() past depth 0");i(),s--},verifyDepthZero(){if(s!==0)throw new Error(`AG Charts - Save/restore depth is non-zero: ${s}`)}})}}function canvasDimensions(t,e,i){return[Math.floor(t*i),Math.floor(e*i)]}var fallbackCanvas;function getFallbackCanvas(){const t=(0,import_ag_charts_core4.getOffscreenCanvas)();return fallbackCanvas??(fallbackCanvas=new t(1,1)),fallbackCanvas}var HdpiOffscreenCanvas=class{constructor(t){const{width:e,height:i,pixelRatio:s,willReadFrequently:n=!1}=t;this.width=e,this.height=i,this.pixelRatio=s;const[r,a]=canvasDimensions(e,i,s),o=(0,import_ag_charts_core4.getOffscreenCanvas)();this.canvas=new o(r,a),this.context=this.canvas.getContext("2d",{willReadFrequently:n}),this.context.setTransform(s,0,0,s,0,0),debugContext(this.context)}drawImage(t,e=0,i=0){return t.drawImage(this.canvas,e,i)}transferToImageBitmap(){return this.canvas.width<1||this.canvas.height<1?getFallbackCanvas().transferToImageBitmap():this.canvas.transferToImageBitmap()}resize(t,e,i){if(!(t>0&&e>0))return;const{canvas:s,context:n}=this;if(t!==this.width||e!==this.height||i!==this.pixelRatio){const[r,a]=canvasDimensions(t,e,i);s.width=r,s.height=a}n.setTransform(i,0,0,i,0,0),this.width=t,this.height=e,this.pixelRatio=i}clear(){clearContext(this)}destroy(){this.canvas.width=0,this.canvas.height=0,this.context.clearRect(0,0,0,0),this.canvas=null,this.context=null,Object.freeze(this)}},import_ag_charts_core5=require("ag-charts-core"),cmp=(t,e)=>Math.sign(t-e);function compareZIndex(t,e){if(typeof t=="number"&&typeof e=="number")return cmp(t,e);const i=typeof t=="number"?[t]:t,s=typeof e=="number"?[e]:e,n=Math.min(i.length,s.length);for(let r=0;r<n;r+=1){const a=cmp(i[r],s[r]);if(a!==0)return a}return cmp(i.length,s.length)}var import_ag_charts_core6=require("ag-charts-core"),PointerEvents=(t=>(t[t.All=0]="All",t[t.None=1]="None",t))(PointerEvents||{}),MAX_ERROR_COUNT=5,_Node=class Me{constructor(e){this.serialNumber=Me._nextSerialNumber++,this.childNodeCounts={groups:0,nonGroups:0,thisComplexity:0,complexity:0},this.id=(0,import_ag_charts_core5.createId)(this),this.name=void 0,this.transitionOut=void 0,this.pointerEvents=0,this._datum=void 0,this._previousDatum=void 0,this.scene=void 0,this._debugDirtyProperties=void 0,this.parentNode=void 0,this.cachedBBox=void 0,this.isContainerNode=!1,this.visible=!0,this.zIndex=0,this.batchLevel=0,this.batchDirty=!1,this.name=e?.name,this.tag=e?.tag??Number.NaN,this.zIndex=e?.zIndex??0,this.scene=e?.scene,(e?.debugDirty??Me._debugEnabled)&&(this._debugDirtyProperties=new Map([["__first__",[]]]))}static toSVG(e,i,s){const n=e?.toSVG();if(n==null||!n.elements.length&&!n.defs?.length)return;const r=(0,import_ag_charts_core5.createSvgElement)("svg");if(r.setAttribute("width",String(i)),r.setAttribute("height",String(s)),r.setAttribute("viewBox",`0 0 ${i} ${s}`),r.setAttribute("overflow","visible"),n.defs?.length){const a=(0,import_ag_charts_core5.createSvgElement)("defs");a.append(...n.defs),r.append(a)}return r.append(...n.elements),r.outerHTML}static*extractBBoxes(e,i){for(const s of e)if(!i||s.visible&&!s.transitionOut){const n=s.getBBox();n&&(yield n)}}get datum(){return this._datum}set datum(e){this._datum!==e&&(this._previousDatum=this._datum,this._datum=e)}get previousDatum(){return this._previousDatum}get unsafeNonNullDatum(){return this.datum}get unsafeDatum(){return this.datum}set unsafeDatum(e){this.datum=e}get unsafePreviousDatum(){return this.previousDatum}get layerManager(){return this.scene?.layersManager}get imageLoader(){return this.scene?.imageLoader}closestDatum(){for(const{datum:e}of this.traverseUp(!0))if(e!=null)return e}unsafeClosestDatum(){return this.closestDatum()}preRender(e,i=1){if(this.childNodeCounts.groups=0,this.childNodeCounts.nonGroups=1,this.childNodeCounts.complexity=i,this.childNodeCounts.thisComplexity=i,this.batchLevel>0||this.batchDirty)throw new Error("AG Charts - illegal rendering state; batched update in progress");return this.childNodeCounts}isolatedRender(e){e.ctx.save();try{this.render(e)}catch(i){const s=i.errorCount??1;if(s>=MAX_ERROR_COUNT)throw i.errorCount=s,i;import_ag_charts_core5.Logger.warnOnce("Error during rendering",i,i.stack)}finally{e.ctx.restore()}}render(e){const{stats:i}=e;if(this.debugDirtyProperties(),e.debugNodeSearch){const s=this.name??this.id;e.debugNodeSearch.some(n=>typeof n=="string"?n===s:n.test(s))&&(e.debugNodes[this.name??this.id]=this)}i&&(i.nodesRendered++,i.opsPerformed+=this.childNodeCounts.thisComplexity)}setScene(e){this.scene=e}*traverseUp(e){e&&(yield this);let i=this.parentNode;for(;i;)yield i,i=i.parentNode}isRoot(){return!this.parentNode}removeChild(e){throw new Error(`AG Charts - internal error, unknown child node ${e.name??e.id} in $${this.name??this.id}`)}remove(){this.parentNode?.removeChild(this)}destroy(){this.parentNode&&this.remove()}batchedUpdate(e){this.batchLevel++;try{e()}finally{this.batchLevel--,this.batchLevel===0&&this.batchDirty&&(this.markDirty(),this.batchDirty=!1)}}setProperties(e){this.batchLevel++;try{const i=this,s=e,n=Object.keys(s);for(let r=0,a=n.length;r<a;r++){const o=n[r];i[o]=s[o]}}finally{this.batchLevel--,this.batchLevel===0&&this.batchDirty&&(this.markDirty(),this.batchDirty=!1)}return this}setPropertiesWithKeys(e,i){this.batchLevel++;try{const s=this,n=e;for(let r=0,a=i.length;r<a;r++){const o=i[r];s[o]=n[o]}}finally{this.batchLevel--,this.batchLevel===0&&this.batchDirty&&(this.markDirty(),this.batchDirty=!1)}return this}containsPoint(e,i){return!1}pickNode(e,i){if(!(!this.visible||this.pointerEvents===1)&&this.containsPoint(e,i))return this}pickNodes(e,i,s=[]){return!this.visible||this.pointerEvents===1||this.containsPoint(e,i)&&s.push(this),s}getBBox(){return this.cachedBBox??(this.cachedBBox=Object.freeze(this.computeBBox())),this.cachedBBox}computeBBox(){}onChangeDetection(e){this.markDirty(e)}markDirtyChildrenOrder(){this.cachedBBox=void 0}markDirty(e){if(this.batchLevel>0){this.batchDirty=!0;return}e!=null&&this._debugDirtyProperties&&this.markDebugProperties(e),this.cachedBBox=void 0,this.parentNode?.markDirty()}markDebugProperties(e){const i=this._debugDirtyProperties?.get(e)??[],s=new Error("Stack trace for property change tracking").stack?.split(` `).filter(n=>n!=="Error"&&!n.includes(".markDebugProperties")&&!n.includes(".markDirty")&&!n.includes("Object.assign ")&&!n.includes(`${this.constructor.name}.`))??"unknown";i.push(s[0].replace(" at ","").trim()),this._debugDirtyProperties?.set(e,i)}debugDirtyProperties(){if(this._debugDirtyProperties!=null){if(!this._debugDirtyProperties.has("__first__"))for(const[e,i]of this._debugDirtyProperties.entries())i.length>1&&import_ag_charts_core5.Logger.logGroup(`Property changed multiple times before render: ${this.constructor.name}.${e} (${i.length}x)`,()=>{for(const s of i)import_ag_charts_core5.Logger.log(s)});this._debugDirtyProperties.clear()}}static handleNodeZIndexChange(e){e.onZIndexChange()}onZIndexChange(){this.parentNode?.markDirtyChildrenOrder()}resolveFont(){}toSVG(){}};_Node.className="AbstractNode",_Node._nextSerialNumber=0,_Node._debugEnabled=!1,__decorateClass([(0,import_ag_charts_core5.DeclaredSceneChangeDetection)()],_Node.prototype,"visible",2),__decorateClass([(0,import_ag_charts_core5.DeclaredSceneChangeDetection)({equals:import_ag_charts_core5.objectsEqual,changeCb:_Node.handleNodeZIndexChange})],_Node.prototype,"zIndex",2);var Node=_Node,import_ag_charts_core19=require("ag-charts-core"),import_ag_charts_core10=require("ag-charts-core"),import_ag_charts_core9=require("ag-charts-core"),import_ag_charts_core8=require("ag-charts-core"),AbstractScale=class{ticks(t,e,i){}niceDomain(t,e=this.domain){return e}get bandwidth(){}get step(){}get inset(){}},Invalidating=(t,e)=>{const i=Symbol(String(e));t[i]=void 0,Object.defineProperty(t,e,{get(){return this[i]},set(s){this[i]!==s&&(this[i]=s,this.invalid=!0)},enumerable:!0,configurable:!1})},import_ag_charts_core7=require("ag-charts-core");function visibleTickRange(t,e,i){if(i==null||i[0]===0&&i[1]===1)return;const s=(0,import_ag_charts_core7.clamp)(0,Math.floor(i[0]*t.length),t.length),n=(0,import_ag_charts_core7.clamp)(0,Math.ceil(i[1]*t.length),t.length),r=e?t.length-n:s,a=e?t.length-s:n;return[r,a]}function filterVisibleTicks(t,e,i){const s=visibleTickRange(t,e,i);if(s==null)return{ticks:t,count:t.length,firstTickIndex:0};const[n,r]=s;return{ticks:t.slice(n,r),count:t.length,firstTickIndex:n}}function unpackDomainMinMax(t){const e=(0,import_ag_charts_core7.readIntegratedWrappedValue)(t.at(0)),i=(0,import_ag_charts_core7.readIntegratedWrappedValue)(t.at(-1));return e!=null&&i!=null?[e,i]:[void 0,void 0]}var convertColorStringToOklcha=t=>{const e=import_ag_charts_core8.Color.fromString(t),[i,s,n]=import_ag_charts_core8.Color.RGBtoOKLCH(e.r,e.g,e.b);return{l:i,c:s,h:n,a:e.a}},delta=1e-6,isAchromatic=t=>t.c<delta||t.l<delta||t.l>1-delta,interpolateOklch=(t,e,i)=>{i=(0,import_ag_charts_core8.clamp)(0,i,1);let s;if(isAchromatic(t))s=e.h;else if(isAchromatic(e))s=t.h;else{const o=t.h;let l=e.h;const c=e.h-t.h;c>180?l-=360:c<-180&&(l+=360),s=o*(1-i)+l*i}const n=t.c*(1-i)+e.c*i,r=t.l*(1-i)+e.l*i,a=t.a*(1-i)+e.a*i;return import_ag_charts_core8.Color.fromOKLCH(r,n,s,a)},ColorScale=class extends AbstractScale{constructor(){super(...arguments),this.type="color",this.defaultTickCount=0,this.invalid=!0,this.domain=[0,1],this.range=["red","blue"],this.mode="continuous",this.parsedRange=this.range.map(convertColorStringToOklcha)}update(){const{domain:t,range:e}=this;t.length<2&&(import_ag_charts_core8.Logger.warnOnce("`colorDomain` should have at least 2 values."),t.length===0?t.push(0,1):t.length===1&&t.push(t[0]+1));for(let s=1;s<t.length;s++){const n=t[s-1],r=t[s];if(n>r){import_ag_charts_core8.Logger.warnOnce("`colorDomain` values should be supplied in ascending order."),t.sort((a,o)=>a-o);break}}const i=this.mode==="discrete"?t.length-1:t.length;if(e.length<i)for(let s=e.length;s<i;s++)e.push(e.length>0?e[0]:"black");this.parsedRange=this.range.map(convertColorStringToOklcha)}normalizeDomains(...t){return{domain:t.map(e=>e.domain).flat(),animatable:!0}}toDomain(){}convert(t){this.refresh();const{domain:e,range:i,parsedRange:s}=this,n=e[0],r=e.at(-1),a=i[0],o=i.at(-1);if(t<=n)return a;if(t>=r)return o;let l,c;if(e.length===2){const u=(t-n)/(r-n),p=1/(i.length-1);l=i.length<=2?0:Math.min(Math.floor(u*(i.length-1)),i.length-2),c=(u-l*p)/p}else{for(l=0;l<e.length-2&&!(t<e[l+1]);l++);const u=e[l],p=e[l+1];c=(t-u)/(p-u)}if(this.mode==="discrete")return i[l];const h=s[l],d=s[l+1];return interpolateOklch(h,d,c).toRgbaString()}invert(){}getDomainMinMax(){return unpackDomainMinMax(this.domain)}refresh(){this.invalid&&(this.invalid=!1,this.update(),this.invalid&&import_ag_charts_core8.Logger.warnOnce("Expected update to not invalidate scale"))}};__decorateClass([Invalidating],ColorScale.prototype,"domain",2),__decorateClass([Invalidating],ColorScale.prototype,"range",2),__decorateClass([Invalidating],ColorScale.prototype,"mode",2);var Gradient=class{constructor(t,e=[],i){this.colorSpace=t,this.stops=e,this.bbox=i,this._cache=void 0}createGradient(t,e,i){const s=this.bbox??e;if(!s.isFinite())return;if(this._cache?.ctx===t&&this._cache.bbox.equals(s))return this._cache.gradient;const{stops:n,colorSpace:r}=this;if(n.length===0)return;if(n.length===1)return n[0].color;let a=this.createCanvasGradient(t,s,i);if(a==null)return;const o=r==="oklch",l=.05;let c=n[0];a.addColorStop(c.stop,c.color);for(let h=1;h<n.length;h+=1){const d=n[h];if(o){const u=new ColorScale;u.domain=[c.stop,d.stop],u.range=[c.color,d.color];for(let p=c.stop+l;p<d.stop;p+=l)a.addColorStop(p,u.convert(p)??"transparent")}a.addColorStop(d.stop,d.color),c=d}return"createPattern"in a&&(a=a.createPattern()),this._cache={ctx:t,bbox:s,gradient:a},a}toSvg(t){const e=this.bbox??t,i=this.createSvgGradient(e);for(const{stop:s,color:n}of this.stops){const r=(0,import_ag_charts_core9.createSvgElement)("stop");r.setAttribute("offset",`${s}`),r.setAttribute("stop-color",`${n}`),i.appendChild(r)}return i}},ConicGradient=class extends Gradient{constructor(t,e,i=0,s){super(t,e,s),this.angle=i}createCanvasGradient(t,e,i){const{angle:n}=this,r=(0,import_ag_charts_core10.normalizeAngle360FromDegrees)(n+-90),a=i?.centerX??e.x+e.width*.5,o=i?.centerY??e.y+e.height*.5;return t.createConicGradient(r,a,o)}createSvgGradient(t){return(0,import_ag_charts_core10.createSvgElement)("linearGradient")}},import_ag_charts_core11=require("ag-charts-core"),LinearGradient=class extends Gradient{constructor(t,e,i=0,s){super(t,e,s),this.angle=i}getGradientPoints(t){const{angle:i}=this,s=(0,import_ag_charts_core11.normalizeAngle360FromDegrees)(i+90),n=Math.cos(s),r=Math.sin(s),a=t.width,o=t.height,l=t.x+a*.5,c=t.y+o*.5,h=Math.hypot(o,a)/2,d=Math.atan2(o,a);let u;s<Math.PI/2?u=s:s<Math.PI?u=Math.PI-s:s<1.5*Math.PI?u=s-Math.PI:u=2*Math.PI-s;const p=h*Math.abs(Math.cos(u-d));return{x0:l+n*p,y0:c+r*p,x1:l-n*p,y1:c-r*p}}createCanvasGradient(t,e){const{x0:i,y0:s,x1:n,y1:r}=this.getGradientPoints(e);if(!(Number.isNaN(i)||Number.isNaN(s)||Number.isNaN(n)||Number.isNaN(r)))return t.createLinearGradient(i,s,n,r)}createSvgGradient(t){const{x0:e,y0:i,x1:s,y1:n}=this.getGradientPoints(t),r=(0,import_ag_charts_core11.createSvgElement)("linearGradient");return r.setAttribute("x1",String(e)),r.setAttribute("y1",String(i)),r.setAttribute("x2",String(s)),r.setAttribute("y2",String(n)),r.setAttribute("gradientUnits","userSpaceOnUse"),r}},import_ag_charts_core12=require("ag-charts-core"),RadialGradient=class extends Gradient{constructor(t,e,i){super(t,e,i)}createCanvasGradient(t,e,i){const s=i?.centerX??e.x+e.width*.5,n=i?.centerY??e.y+e.height*.5,r=i?.innerRadius??0,a=i?.outerRadius??Math.hypot(e.width*.5,e.height*.5)/Math.SQRT2;return t.createRadialGradient(s,n,r,s,n,a)}createSvgGradient(t){const e=t.x+t.width*.5,i=t.y+t.height*.5,s=(0,import_ag_charts_core12.createSvgElement)("radialGradient");return s.setAttribute("cx",String(e)),s.setAttribute("cy",String(i)),s.setAttribute("r",String(Math.hypot(t.width*.5,t.height*.5)/Math.SQRT2)),s.setAttribute("gradientUnits","userSpaceOnUse"),s}},import_ag_charts_core13=require("ag-charts-core"),StopProperties=class extends import_ag_charts_core13.BaseProperties{constructor(){super(...arguments),this.color="black"}};__decorateClass([import_ag_charts_core13.Property],StopProperties.prototype,"stop",2),__decorateClass([import_ag_charts_core13.Property],StopProperties.prototype,"color",2),__decorateClass([import_ag_charts_core13.Property],StopProperties.prototype,"name",2);var ColorScaleProperties=class extends import_ag_charts_core13.BaseProperties{constructor(){super(...arguments),this.fills=new import_ag_charts_core13.PropertiesArray(StopProperties),this.mode="continuous"}};__decorateClass([import_ag_charts_core13.Property],ColorScaleProperties.prototype,"fills",2),__decorateClass([import_ag_charts_core13.Property],ColorScaleProperties.prototype,"domain",2),__decorateClass([import_ag_charts_core13.Property],ColorScaleProperties.prototype,"mode",2),__decorateClass([import_ag_charts_core13.Property],ColorScaleProperties.prototype,"missingDataFill",2);function getDefaultColorStops(t,e){const i=e==="discrete"?1:0,s=t.map((n,r,{length:a})=>({stop:(r+i)/(a-1+i),color:n}));return e==="discrete"?(0,import_ag_charts_core13.discreteColorStops)(s):s}function getColorStops(t,e,i,s="continuous"){const n=t.map(u=>typeof u=="string"?{color:u}:u);if(n.length===0)return getDefaultColorStops(e,s);const r=Math.min(...i),a=Math.max(...i),o=s==="discrete",l=(0,import_ag_charts_core13.resolveStopPositions)(n,r,a,o);let c=n.find(u=>u.color!=null)?.color,h;const d=n.map((u,p)=>{let g=u?.color;const f=Math.max(0,Math.min(1,(l[p]-r)/(a-r)));return g!=null?c=g:c==null?(h==null&&(h=new ColorScale,h.domain=[0,1],h.range=e),g=h.convert(f)):g=c,{stop:f,color:g}});return s==="discrete"?(0,import_ag_charts_core13.discreteColorStops)(d):d}var import_ag_charts_core14=require("ag-charts-core"),Image=class{constructor(t,e){this.imageLoader=t,this._cache=void 0,this.url=e.url,this.backgroundFill=e.backgroundFill??"black",this.backgroundFillOpacity=e.backgroundFillOpacity??1,this.repeat=e.repeat??"no-repeat",this.width=e.width,this.height=e.height,this.fit=e.fit??"stretch",this.rotation=e.rotation??0}createCanvasImage(t,e,i,s){if(!e)return null;const[n,r]=this.getSize(e.width,e.height,i,s);return n<1||r<1?(import_ag_charts_core14.Logger.warnOnce("Image fill is too small to render, ignoring."),null):t.createPattern(e,this.repeat)}getSize(t,e,i,s){const{fit:n}=this;let r=t,a=e,o=1;const l=i/s,c=t/e;return n==="stretch"||t===0||e===0?(r=i,a=s):n==="contain"?o=c>l?i/t:s/e:n==="cover"&&(o=c>l?s/e:i/t),[Math.max(1,r*o),Math.max(1,a*o)]}setImageTransform(t,e){if(typeof t=="string")return;const{url:i,rotation:s,width:n,height:r}=this,a=this.imageLoader?.loadImage(i);if(!a)return;const o=(0,import_ag_charts_core14.normalizeAngle360FromDegrees)(s),l=Math.cos(o),c=Math.sin(o),[h,d]=this.getSize(a.width,a.height,n??e.width,r??e.height),u=h/a.width,p=d/a.height,g=e.x+e.width/2,f=e.y+e.height/2,m=l*h-c*d,y=c*h+l*d,b=m/2,v=y/2,x=(0,import_ag_charts_core14.getDOMMatrix)();t?.setTransform(new x([l*u,c*p,-c*u,l*p,g-b,f-v]))}createPattern(t,e,i,s){const n=this.width??e,r=this.height??i,a=this._cache;if(a?.ctx===t&&a.width===n&&a.height===r)return a.pattern;const o=this.imageLoader?.loadImage(this.url,s),l=this.createCanvasImage(t,o,n,r);if(l!=null)return this._cache={ctx:t,pattern:l,width:n,height:r},l}toSvg(t,e){const{url:i,rotation:s,backgroundFill:n,backgroundFillOpacity:r}=this,{x:a,y:o,width:l,height:c}=t,h=(0,import_ag_charts_core14.createSvgElement)("pattern");h.setAttribute("viewBox",`0 0 ${l} ${c}`),h.setAttribute("x",String(a)),h.setAttribute("y",String(o)),h.setAttribute("width",String(l)),h.setAttribute("height",String(c)),h.setAttribute("patternUnits","userSpaceOnUse");const d=(0,import_ag_charts_core14.createSvgElement)("rect");d.setAttribute("x","0"),d.setAttribute("y","0"),d.setAttribute("width",String(l)),d.setAttribute("height",String(c)),d.setAttribute("fill",n),d.setAttribute("fill-opacity",String(r)),h.appendChild(d);const u=(0,import_ag_charts_core14.createSvgElement)("image");return u.setAttribute("href",i),u.setAttribute("x","0"),u.setAttribute("y","0"),u.setAttribute("width",String(l)),u.setAttribute("height",String(c)),u.setAttribute("preserveAspectRatio","none"),u.setAttribute("transform",`scale(${1/e}) rotate(${s}, ${l/2}, ${c/2})`),h.appendChild(u),h}},import_ag_charts_core18=require("ag-charts-core"),import_ag_charts_core16=require("ag-charts-core"),import_ag_charts_core15=require("ag-charts-core"),commandEx=/^[\t\n\f\r ]*([achlmqstvz])[\t\n\f\r ]*/i,coordinateEx=/^[+-]?((\d*\.\d+)|(\d+\.)|(\d+))(e[+-]?\d+)?/i,commaEx=/[\t\n\f\r ]*,?[\t\n\f\r ]*/,flagEx=/^[01]/,pathParams={z:[],h:[coordinateEx],v:[coordinateEx],m:[coordinateEx,coordinateEx],l:[coordinateEx,coordinateEx],t:[coordinateEx,coordinateEx],s:[coordinateEx,coordinateEx,coordinateEx,coordinateEx],q:[coordinateEx,coordinateEx,coordinateEx,coordinateEx],c:[coordinateEx,coordinateEx,coordinateEx,coordinateEx,coordinateEx,coordinateEx],a:[coordinateEx,coordinateEx,coordinateEx,flagEx,flagEx,coordinateEx,coordinateEx]};function parseSvg(t){if(!t)return;const e=[];let i=0,s;for(;i<t.length;){const n=commandEx.exec(t.slice(i));let r;if(n==null){if(!s){import_ag_charts_core15.Logger.warnOnce(`Invalid SVG path, error at index ${i}: Missing command.`);return}r=s}else r=n[1],i+=n[0].length;const a=parseSegment(r,t,i);if(!a)return;i=a[0],s=r,e.push(a[1])}return e}function parseSegment(t,e,i){const s=pathParams[t.toLocaleLowerCase()],n={command:t,params:[]};for(const r of s){const a=e.slice(i),o=r.exec(a);if(o!=null){n.params.push(Number.parseFloat(o[0])),i+=o[0].length;const l=commaEx.exec(a.slice(o[0].length));l!=null&&(i+=l[0].length)}else{if(n.params.length===1)return[i,n];import_ag_charts_core15.Logger.warnOnce(`Invalid SVG path, error at index ${i}: No path segment parameters for command [${t}]`);return}}return[i,n]}function linearRoot(t,e){const i=-e/t;return t!==0&&i>=0&&i<=1?[i]:[]}function quadraticRoots(t,e,i,s=1e-6){if(Math.abs(t)<s)return linearRoot(e,i);const n=e*e-4*t*i,r=[];if(Math.abs(n)<s){const a=-e/(2*t);a>=0&&a<=1&&r.push(a)}else if(n>0){const a=Math.sqrt(n),o=(-e-a)/(2*t),l=(-e+a)/(2*t);o>=0&&o<=1&&r.push(o),l>=0&&l<=1&&r.push(l)}return r}function cubicRoots(t,e,i,s,n=1e-6){if(Math.abs(t)<n)return quadraticRoots(e,i,s,n);const r=e/t,a=i/t,o=s/t,l=(3*a-r*r)/9,c=(9*r*a-27*o-2*r*r*r)/54,h=l*l*l+c*c,d=1/3,u=[];if(h>=0){const p=Math.sqrt(h),g=Math.sign(c+p)*Math.pow(Math.abs(c+p),d),f=Math.sign(c-p)*Math.pow(Math.abs(c-p),d),m=Math.abs(Math.sqrt(3)*(g-f)/2),y=-d*r+(g+f);if(y>=0&&y<=1&&u.push(y),Math.abs(m)<n){const b=-d*r-(g+f)/2;b>=0&&b<=1&&u.push(b)}}else{const p=Math.acos(c/Math.sqrt(-l*l*l)),g=d*r,f=2*Math.sqrt(-l),m=f*Math.cos(d*p)-g,y=f*Math.cos(d*(p+2*Math.PI))-g,b=f*Math.cos(d*(p+4*Math.PI))-g;m>=0&&m<=1&&u.push(m),y>=0&&y<=1&&u.push(y),b>=0&&b<=1&&u.push(b)}return u}function segmentIntersection(t,e,i,s,n,r,a,o){const l=(i-t)*(o-r)-(s-e)*(a-n);if(l===0)return 0;const c=((a-n)*(e-r)-(t-n)*(o-r))/l,h=((i-t)*(e-r)-(s-e)*(t-n))/l;return c>=0&&c<=1&&h>=0&&h<=1?1:0}function cubicSegmentIntersections(t,e,i,s,n,r,a,o,l,c,h,d){let u=0;const p=c-d,g=h-l,f=l*(d-c)-c*(h-l),m=bezierCoefficients(t,i,n,a),y=bezierCoefficients(e,s,r,o),b=p*m[0]+g*y[0],v=p*m[1]+g*y[1],x=p*m[2]+g*y[2],S=p*m[3]+g*y[3]+f,I=cubicRoots(b,v,x,S);for(const D of I){const A=D*D,T=D*A,N=m[0]*T+m[1]*A+m[2]*D+m[3],L=y[0]*T+y[1]*A+y[2]*D+y[3];let O;l===h?O=(L-c)/(d-c):O=(N-l)/(h-l),O>=0&&O<=1&&u++}return u}function bezierCoefficients(t,e,i,s){return[-t+3*e-3*i+s,3*t-6*e+3*i,-3*t+3*e,t]}var ExtendedPath2D=class{constructor(){this.previousCommands=[],this.previousParams=[],this.previousClosedPath=!1,this.commands=[],this.params=[],this.commandsLength=0,this.paramsLength=0,this.cx=Number.NaN,this.cy=Number.NaN,this.sx=Number.NaN,this.sy=Number.NaN,this.openedPath=!1,this.closedPath=!1;const t=(0,import_ag_charts_core16.getPath2D)();this.path2d=new t}isEmpty(){return this.commandsLength===0}isDirty(){return this.closedPath!==this.previousClosedPath||this.previousCommands.length!==this.commandsLength||this.previousParams.length!==this.paramsLength||this.previousCommands.toString()!==this.commands.slice(0,this.commandsLength).toString()||this.previousParams.toString()!==this.params.slice(0,this.paramsLength).toString()}getPath2D(){return this.path2d}moveTo(t,e){this.openedPath=!0,this.sx=t,this.sy=e,this.cx=t,this.cy=e,this.path2d.moveTo(t,e),this.commands[this.commandsLength++]=0,this.params[this.paramsLength++]=t,this.params[this.paramsLength++]=e}lineTo(t,e){this.openedPath?(this.cx=t,this.cy=e,this.path2d.lineTo(t,e),this.commands[this.commandsLength++]=1,this.params[this.paramsLength++]=t,this.params[this.paramsLength++]=e):this.moveTo(t,e)}cubicCurveTo(t,e,i,s,n,r){this.openedPath||this.moveTo(t,e),this.path2d.bezierCurveTo(t,e,i,s,n,r),this.commands[this.commandsLength++]=2,this.params[this.paramsLength++]=t,this.params[this.paramsLength++]=e,this.params[this.paramsLength++]=i,this.params[this.paramsLength++]=s,this.params[this.paramsLength++]=n,this.params[this.paramsLength++]=r}closePath(){this.openedPath&&(this.cx=this.sx,this.cy=this.sy,this.sx=Number.NaN,this.sy=Number.NaN,this.path2d.closePath(),this.commands[this.commandsLength++]=3,this.openedPath=!1,this.closedPath=!0)}rect(t,e,i,s){this.moveTo(t,e),this.lineTo(t+i,e),this.lineTo(t+i,e+s),this.lineTo(t,e+s),this.closePath()}roundRect(t,e,i,s,n){n=Math.min(n,i/2,s/2),this.moveTo(t,e+n),this.arc(t+n,e+n,n,Math.PI,1.5*Math.PI),this.lineTo(t+n,e),this.lineTo(t+i-n,e),this.arc(t+i-n,e+n,n,1.5*Math.PI,2*Math.PI),this.lineTo(t+i,e+n),this.lineTo(t+i,e+s-n),this.arc(t+i-n,e+s-n,n,0,Math.PI/2),this.lineTo(t+i-n,e+s),this.lineTo(t+n,e+s),this.arc(t+ +n,e+s-n,n,Math.PI/2,Math.PI),this.lineTo(t,e+s-n),this.closePath()}ellipse(t,e,i,s,n,r,a,o=!1){const l=i,c=s/i,h=Math.cos(n),d=Math.sin(n),u=-c*d,p=c*h,g=l*Math.cos(r),f=l*Math.sin(r),m=t+h*g+u*f,y=e+d*g+p*f,b=(m-this.cx)**2+(y-this.cy)**2;this.openedPath?b>1e-6&&this.lineTo(m,y):this.moveTo(m,y);let v=o?-(0,import_ag_charts_core16.normalizeAngle360)(r-a):(0,import_ag_charts_core16.normalizeAngle360)(a-r);Math.abs(Math.abs(a-r)-2*Math.PI)<1e-6&&v<2*Math.PI&&(v+=2*Math.PI*(o?-1:1));const x=Math.max(Math.ceil(Math.abs(v)/(Math.PI/2)),1),S=v/x,I=4/3*Math.tan(S/4);for(let D=0;D<x;D+=1){const A=r+S*(D+0),T=r+S*(D+1),N=l*Math.sin(A),L=l*Math.cos(A),O=l*Math.sin(T),P=l*Math.cos(T),k=L-I*N,w=N+I*L,R=P+I*O,_=O-I*P,E=P,F=O;this.cubicCurveTo(t+h*k+u*w,e+d*k+p*w,t+h*R+u*_,e+d*R+p*_,t+h*E+u*F,e+d*E+p*F)}}arc(t,e,i,s,n,r){this.ellipse(t,e,i,i,0,s,n,r)}appendSvg(t){const e=parseSvg(t);if(e==null)return!1;let i=0,s=0,n,r,a=0,o=0;for(const{command:l,params:c}of e){n??(n=c[0]),r??(r=c[1]);const h=l===l.toLowerCase(),d=h?n:0,u=h?r:0;switch(l.toLowerCase()){case"m":this.moveTo(d+c[0],u+c[1]),n=d+c[0],r=u+c[1],i=n,s=r;break;case"c":this.cubicCurveTo(d+c[0],u+c[1],d+c[2],u+c[3],d+c[4],u+c[5]),a=d+c[2],o=u+c[3],n=d+c[4],r=u+c[5];break;case"s":this.cubicCurveTo(n+n-a,r+r-o,d+c[0],u+c[1],d+c[2],u+c[3]),a=d+c[0],o=u+c[1],n=d+c[2],r=u+c[3];break;case"q":this.cubicCurveTo((d+2*c[0])/3,(u+2*c[1])/3,(2*c[0]+c[2])/3,(2*c[1]+c[3])/3,c[2],c[3]),a=c[0],o=c[1],n=c[2],r=c[3];break;case"t":this.cubicCurveTo((n+2*(n+n-a))/3,(r+2*(r+r-o))/3,(2*(n+n-a)+c[0])/3,(2*(r+r-o)+c[1])/3,c[0],c[1]),a=n+n-a,o=r+r-o,n=c[0],r=c[1];break;case"a":this.svgEllipse(n,r,c[0],c[1],c[2]*Math.PI/180,c[3],c[4],d+c[5],u+c[6]),n=d+c[5],r=u+c[6];break;case"h":this.lineTo(d+c[0],r),n=d+c[0];break;case"l":this.lineTo(d+c[0],u+c[1]),n=d+c[0],r=u+c[1];break;case"v":this.lineTo(n,u+c[0]),r=u+c[0];break;case"z":this.closePath(),n=i,r=s;break;default:throw new Error(`Could not translate command '${l}' with '${c.join(" ")}'`)}}return!0}svgEllipse(t,e,i,s,n,r,a,o,l){i=Math.abs(i),s=Math.abs(s);const c=(t-o)/2,h=(e-l)/2,d=Math.sin(n),u=Math.cos(n),p=u*c+d*h,g=-d*c+u*h,f=p/i,m=g/s;let y=f*f+m*m,b=(t+o)/2,v=(e+l)/2,x=0,S=0;y>=1?(y=Math.sqrt(y),i*=y,s*=y):(y=Math.sqrt(1/y-1),r===a&&(y=-y),x=y*i*m,S=-y*s*f,b+=u*x-d*S,v+=d*x+u*S);const I=Math.atan2((g-S)/s,(p-x)/i),D=Math.atan2((-g-S)/s,(-p-x)/i)-I,A=I+D,T=!!(1-a);this.ellipse(b,v,i,s,n,I,A,T)}clear(t){t?(this.previousCommands=this.commands.slice(0,this.commandsLength),this.previousParams=this.params.slice(0,this.paramsLength),this.previousClosedPath=this.closedPath,this.commands=[],this.params=[],this.commandsLength=0,this.paramsLength=0):(this.commandsLength=0,this.paramsLength=0);const e=(0,import_ag_charts_core16.getPath2D)();this.path2d=new e,this.openedPath=!1,this.closedPath=!1}isPointInPath(t,e){const i=this.commands,s=this.params,n=this.commandsLength,r=-1e4,a=-1e4;let o=Number.NaN,l=Number.NaN,c=0,h=0,d=0;for(let u=0,p=0;u<n;u++)switch(i[u]){case 0:d+=segmentIntersection(o,l,c,h,r,a,t,e),c=s[p++],o=c,h=s[p++],l=h;break;case 1:d+=segmentIntersection(c,h,s[p++],s[p++],r,a,t,e),c=s[p-2],h=s[p-1];break;case 2:d+=cubicSegmentIntersections(c,h,s[p++],s[p++],s[p++],s[p++],s[p++],s[p++],r,a,t,e),c=s[p-2],h=s[p-1];break;case 3:d+=segmentIntersection(o,l,c,h,r,a,t,e);break}return d%2===1}distanceSquared(t,e){let i=1/0;const s=this.commands,n=this.params,r=this.commandsLength;let a=Number.NaN,o=Number.NaN,l=0,c=0;for(let h=0,d=0;h<r;h++)switch(s[h]){case 0:l=a=n[d++],c=o=n[d++];break;case 1:{const u=l,p=c;l=n[d++],c=n[d++],i=(0,import_ag_charts_core16.lineDistanceSquared)(t,e,u,p,l,c,i);break}case 2:{const u=l,p=c,g=n[d++],f=n[d++],m=n[d++],y=n[d++];l=n[d++],c=n[d++],i=(0,import_ag_charts_core16.bezier2DDistance)(u,p,g,f,m,y,l,c,t,e)**2;break}case 3:i=(0,import_ag_charts_core16.lineDistanceSquared)(t,e,l,c,a,o,i);break}return i}toSVG(t=(e,i)=>({x:e,y:i})){const e=[],{commands:i,params:s}=this,n=(a,o)=>{e.push(a);for(let l=0;l<o;l+=2){const{x:c,y:h}=t(s[r++],s[r++]);e.push(c,h)}};let r=0;for(let a=0;a<this.commandsLength;a++)switch(i[a]){case 0:n("M",2);break;case 1:n("L",2);break;case 2:n("C",6);break;case 3:n("Z",0);break}return e.join(" ")}computeBBox(){const{commands:t,params:e}=this;let[i,s,n,r]=[1/0,1/0,-1/0,-1/0],[a,o]=[Number.NaN,Number.NaN],[l,c]=[Number.NaN,Number.NaN];const h=(u,p)=>{i=Math.min(p,i),s=Math.min(u,s),n=Math.max(u,n),r=Math.max(p,r),a=u,o=p};let d=0;for(let u=0;u<this.commandsLength;u++)switch(t[u]){case 0:h(e[d++],e[d++]),l=a,c=o;break;case 1:h(e[d++],e[d++]);break;case 2:{const g=a,f=o,m=e[d++],y=e[d++],b=e[d++],v=e[d++],x=e[d++],S=e[d++],I=(0,import_ag_charts_core16.bezier2DExtrema)(g,f,m,y,b,v,x,S);for(const D of I){const A=(0,import_ag_charts_core16.evaluateBezier)(g,m,b,x,D),T=(0,import_ag_charts_core16.evaluateBezier)(f,y,v,S,D);h(A,T)}h(x,S);break}case 3:h(l,c),l=Number.NaN,c=Number.NaN;break}return new BBox(s,i,n-s,r-i)}},import_ag_charts_core17=require("ag-charts-core"),HALF_PIXEL_EPSILON=1e-8;function roundToDevicePixel(t,e){const i=e*t,s=i-Math.floor(i),n=Math.abs(s-.5)<HALF_PIXEL_EPSILON?i+HALF_PIXEL_EPSILON:i;return Math.round(n)/t}function align(t,e,i){const s=roundToDevicePixel(t,e);return i==null?s:i===0?0:i<1?alignAfter(t,i):roundToDevicePixel(t,i+e)-s}function alignBefore(t,e){return Math.floor(e*t)/t}function alignAfter(t,e){return Math.ceil(e*t)/t}function drawPatternUnitPolygon(t,e,i){const{width:s,height:n,padding:r,strokeWidth:a}=e,o=s/2,l=n/2,c=Math.max(1,s-r-a/2),h=Math.max(1,n-r-a/2);let d=!1;for(const[u,p]of i){const g=o+(u-.5)*c,f=l+(p-.5)*h;d?t.lineTo(g,f):t.moveTo(g,f),d=!0}t.closePath()}var PATTERNS={circles(t,{width:e,strokeWidth:i,padding:s}){const n=e/2,r=Math.max(1,n-s-i/2);t.arc(n,n,r,0,Math.PI*2)},squares(t,{width:e,height:i,pixelRatio:s,padding:n,strokeWidth:r}){const a=n+r/2;t.moveTo(align(s,a),align(s,a)),t.lineTo(align(s,e-a),align(s,a)),t.lineTo(align(s,e-a),align(s,i-a)),t.lineTo(align(s,a),align(s,i-a)),t.closePath()},triangles(t,e){drawPatternUnitPolygon(t,e,[[.5,0],[1,1],[0,1]])},diamonds(t,e){drawPatternUnitPolygon(t,e,[[.5,0],[1,.5],[.5,1],[0,.5]])},stars(t,{width:e,height:i,padding:s}){const r=Math.max(1,(e-s)/2),a=r/2,o=Math.PI/2;for(let l=0;l<5*2;l++){const c=l%2===0?r:a,h=l*Math.PI/5-o,d=e/2+Math.cos(h)*c,u=i/2+Math.sin(h)*c;t.lineTo(d,u)}t.closePath()},hearts(t,{width:e,height:i,padding:s}){const n=Math.max(1,e/4-s/2),r=e/2,a=i/2+n/2;t.arc(r-n,a-n,n,(0,import_ag_charts_core17.toRadians)(130),(0,import_ag_charts_core17.toRadians)(330)),t.arc(r+n,a-n,n,(0,import_ag_charts_core17.toRadians)(220),(0,import_ag_charts_core17.toRadians)(50)),t.lineTo(r,a+n),t.closePath()},crosses(t,e){drawPatternUnitPolygon(t,e,[[.25,0],[.5,.25],[.75,0],[1,.25],[.75,.5],[1,.75],[.75,1],[.5,.75],[.25,1],[0,.75],[.25,.5],[0,.25]])},"vertical-lines"(t,{width:e,height:i,pixelRatio:s,strokeWidth:n}){const r=align(s,e/2)-n%2/2;t.moveTo(r,0),t.lineTo(r,i)},"horizontal-lines"(t,{width:e,height:i,pixelRatio:s,strokeWidth:n}){const r=align(s,i/2)-n%2/2;t.moveTo(0,r),t.lineTo(e,r)},"forward-slanted-lines"(t,{width:e,height:i,strokeWidth:s}){const n=Math.atan2(i,e),r=s*Math.cos(n),a=s*Math.sin(n);t.moveTo(-r,a),t.lineTo(r,-a),t.moveTo(-r,i+a),t.lineTo(e+r,-a),t.moveTo(e-r,i+a),t.lineTo(e+r,i-a)},"backward-slanted-lines"(t,{width:e,height:i,strokeWidth:s}){const n=Math.atan2(i,e),r=s*Math.cos(n),a=s*Math.sin(n);t.moveTo(e-r,-a),t.lineTo(e+r,a),t.moveTo(-r,-a),t.lineTo(e+r,i+a),t.moveTo(-r,i-a),t.lineTo(r,i+a)}},Pattern=class{constructor(t){this._cache=void 0,this.width=Math.max(t?.width??10,1),this.height=Math.max(t?.height??10,1),this.fill=t.fill??"none",this.fillOpacity=t.fillOpacity??1,this.backgroundFill=t.backgroundFill??"none",this.backgroundFillOpacity=t.backgroundFillOpacity??1,this.stroke=t.stroke??"black",this.strokeOpacity=t.strokeOpacity??1,this.strokeWidth=t.strokeWidth??1,this.padding=t.padding??1,this.pattern=t.pattern??"forward-slanted-lines",this.rotation=t.rotation??0,this.scale=t.scale??1,this.path=t.path}getPath(t){const{pattern:e,width:i,height:s,padding:n,strokeWidth:r,path:a}=this,o=new ExtendedPath2D;let l=PATTERNS[e]!=null;return a&&l&&(l=!o.appendSvg(a)),l&&PATTERNS[e](o,{width:i,height:s,pixelRatio:t,strokeWidth:r,padding:n}),o}renderStroke(t,e){const{stroke:i,strokeWidth:s,strokeOpacity:n}=this;s&&(e.strokeStyle=i,e.lineWidth=s,e.globalAlpha=n,e.stroke(t))}renderFill(t,e){const{fill:i,fillOpacity:s}=this;i!=="none"&&(e.fillStyle=i,e.globalAlpha=s,e.fill(t))}createCanvasPattern(t,e){const{width:i,height:s,scale:n,backgroundFill:r,backgroundFillOpacity:a}=this;if(i*n<1||s*n<1)return import_ag_charts_core18.Logger.warnOnce("Pattern fill is too small to render, ignoring."),null;const o=new HdpiOffscreenCanvas({width:i,height:s,pixelRatio:e*n}),l=o.context;r!=="none"&&(l.fillStyle=r,l.globalAlpha=a,l.fillRect(0,0,i,s));const c=this.getPath(e).getPath2D();this.renderFill(c,l),this.renderStroke(c,l);const h=t.createPattern(o.canvas,"repeat");return this.setPatternTransform(h,e),o.destroy(),h}setPatternTransform(t,e,i=0,s=0){if(t==null)return;const n=(0,import_ag_charts_core18.normalizeAngle360FromDegrees)(this.rotation),r=1/e,a=Math.cos(n)*r,o=Math.sin(n)*r,l=(0,import_ag_charts_core18.getDOMMatrix)();t.setTransform(new l([a,o,-o,a,i,s]))}createPattern(t,e){if(this._cache?.ctx===t&&this._cache.pixelRatio===e)return this._cache.pattern;const i=this.createCanvasPattern(t,e);if(i!=null)return this._cache={ctx:t,pattern:i,pixelRatio:e},i}toSvg(){const{width:t,height:e,fill:i,fillOpacity:s,backgroundFill:n,backgroundFillOpacity:r,stroke:a,strokeWidth:o,strokeOpacity:l,rotation:c,scale:h}=this,d=(0,import_ag_charts_core18.createSvgElement)("pattern");d.setAttribute("viewBox",`0 0 ${t} ${e}`),d.setAttribute("width",String(t)),d.setAttribute("height",String(e)),d.setAttribute("patternUnits","userSpaceOnUse");const u=(0,import_ag_charts_core18.createSvgElement)("rect");u.setAttribute("x","0"),u.setAttribute("y","0"),u.setAttribute("width",String(t)),u.setAttribute("height",String(e)),u.setAttribute("fill",n),u.setAttribute("fill-opacity",String(r)),d.appendChild(u);const p=(0,import_ag_charts_core18.createSvgElement)("path");return p.setAttribute("fill",i),p.setAttribute("fill-opacity",String(s)),p.setAttribute("stroke-opacity",String(l)),p