velo-plot 1.15.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/dist/{ChartCore-BimVvUEg.js → ChartCore-BhQ4j7f5.js} +2213 -1489
  2. package/dist/ChartCore-BhQ4j7f5.js.map +1 -0
  3. package/dist/SciPlot-GJvw7GJo.js +463 -0
  4. package/dist/SciPlot-GJvw7GJo.js.map +1 -0
  5. package/dist/assets/downsample.worker-C70QJ04y.js +2 -0
  6. package/dist/assets/downsample.worker-C70QJ04y.js.map +1 -0
  7. package/dist/assets/indicator.worker-bv0zC4EX.js +2 -0
  8. package/dist/assets/indicator.worker-bv0zC4EX.js.map +1 -0
  9. package/dist/axisFormat-SPX-CD5s.js +200 -0
  10. package/dist/axisFormat-SPX-CD5s.js.map +1 -0
  11. package/dist/core/InteractionManager.d.ts +1 -0
  12. package/dist/core/OverlayRenderer.d.ts +13 -0
  13. package/dist/core/chart/ChartAlerts.d.ts +42 -0
  14. package/dist/core/chart/ChartCore.d.ts +24 -1
  15. package/dist/core/chart/ChartRenderLoop.d.ts +9 -2
  16. package/dist/core/chart/ChartRenderer.d.ts +8 -2
  17. package/dist/core/chart/candlestickMarkers.d.ts +23 -0
  18. package/dist/core/chart/heikinAshi.d.ts +10 -0
  19. package/dist/core/chart/positionLines.d.ts +12 -0
  20. package/dist/core/chart/series/types.d.ts +2 -2
  21. package/dist/core/chart/types.d.ts +9 -0
  22. package/dist/core/format/axisFormat.d.ts +2 -1
  23. package/dist/core/indicator/addIndicator.d.ts +36 -0
  24. package/dist/core/indicator/index.d.ts +2 -0
  25. package/dist/core/indicator/indicatorPresets.d.ts +45 -0
  26. package/dist/core/series/Series.d.ts +3 -0
  27. package/dist/core/stacked/types.d.ts +8 -0
  28. package/dist/core/time/TimeScale.d.ts +31 -0
  29. package/dist/core/time/applyTimeScale.d.ts +10 -0
  30. package/dist/createStackedChart-DJSmqerD.js +706 -0
  31. package/dist/createStackedChart-DJSmqerD.js.map +1 -0
  32. package/dist/gpu/adapter/gpuRenderer.d.ts +21 -0
  33. package/dist/gpu/backends/webgpu/WebGPUBackend.d.ts +2 -1
  34. package/dist/gpuRenderer-BpaMYz-k.js +1848 -0
  35. package/dist/gpuRenderer-BpaMYz-k.js.map +1 -0
  36. package/dist/{index-DjeWClO9.js → index-CWipqOLP.js} +2 -2
  37. package/dist/{index-DjeWClO9.js.map → index-CWipqOLP.js.map} +1 -1
  38. package/dist/index-D7dTq6VB.js +503 -0
  39. package/dist/index-D7dTq6VB.js.map +1 -0
  40. package/dist/{index-Ce2JgkH_.js → index-DoYxf1cV.js} +86 -43
  41. package/dist/{index-Ce2JgkH_.js.map → index-DoYxf1cV.js.map} +1 -1
  42. package/dist/{index.core-C_-CFftD.js → index.core-fpZ1dYN0.js} +3 -3
  43. package/dist/{index.core-C_-CFftD.js.map → index.core-fpZ1dYN0.js.map} +1 -1
  44. package/dist/index.d.ts +17 -4
  45. package/dist/indicators--eJGmVox.js +302 -0
  46. package/dist/indicators--eJGmVox.js.map +1 -0
  47. package/dist/mockDatafeed-Cdg5hKEo.js +511 -0
  48. package/dist/mockDatafeed-Cdg5hKEo.js.map +1 -0
  49. package/dist/plugins/analysis.js +530 -807
  50. package/dist/plugins/analysis.js.map +1 -1
  51. package/dist/plugins/caching.js +26 -21
  52. package/dist/plugins/caching.js.map +1 -1
  53. package/dist/plugins/drawing-tools/index.d.ts +29 -0
  54. package/dist/plugins/drawing-tools/measure.d.ts +21 -0
  55. package/dist/plugins/drawing-tools/snapToCandle.d.ts +21 -0
  56. package/dist/plugins/gpu.js +202 -1895
  57. package/dist/plugins/gpu.js.map +1 -1
  58. package/dist/plugins/index.d.ts +2 -0
  59. package/dist/plugins/keyboard/index.d.ts +1 -7
  60. package/dist/plugins/keyboard.js +1 -1
  61. package/dist/plugins/lazy-load/types.d.ts +7 -0
  62. package/dist/plugins/lazy-load.js +131 -108
  63. package/dist/plugins/lazy-load.js.map +1 -1
  64. package/dist/plugins/replay/index.d.ts +19 -0
  65. package/dist/plugins/tools.js +1 -1
  66. package/dist/plugins/virtualization/types.d.ts +12 -0
  67. package/dist/plugins/virtualization.js +1 -1
  68. package/dist/pool-15HMCNv8.js +88 -0
  69. package/dist/pool-15HMCNv8.js.map +1 -0
  70. package/dist/react.js +5 -5
  71. package/dist/renderer/CandlestickRenderer.d.ts +1 -1
  72. package/dist/renderer/ChartSeriesRenderer.d.ts +6 -0
  73. package/dist/renderer/GpuChartRenderer.d.ts +23 -0
  74. package/dist/renderer/index.d.ts +3 -0
  75. package/dist/renderer/spike/WebGLGridSpike.d.ts +40 -0
  76. package/dist/testing/baselines/v1.15.0.json.d.ts +51 -0
  77. package/dist/testing/gridSpikeBenchmark.d.ts +49 -0
  78. package/dist/testing/index.d.ts +5 -0
  79. package/dist/testing/rendererBenchmark.d.ts +13 -0
  80. package/dist/testing/stage1BrowserBench.d.ts +42 -0
  81. package/dist/trading/datafeed.d.ts +48 -0
  82. package/dist/trading/index.d.ts +29 -0
  83. package/dist/trading/mockDatafeed.d.ts +9 -0
  84. package/dist/trading/ohlcvGenerator.d.ts +25 -0
  85. package/dist/trading.d.ts +1 -0
  86. package/dist/trading.js +95 -0
  87. package/dist/trading.js.map +1 -0
  88. package/dist/types.d.ts +22 -2
  89. package/dist/velo-plot.full.js +1088 -776
  90. package/dist/velo-plot.full.js.map +1 -1
  91. package/dist/velo-plot.js +15 -15
  92. package/dist/workers/downsample.d.ts +38 -0
  93. package/dist/workers/downsampleAsync.d.ts +6 -0
  94. package/dist/workers/indicator.worker.d.ts +32 -0
  95. package/dist/workers/indicatorsAsync.d.ts +26 -0
  96. package/dist/workers/pool.d.ts +36 -0
  97. package/package.json +23 -1
  98. package/dist/ChartCore-BimVvUEg.js.map +0 -1
  99. package/dist/axisFormat-B7o_uIEA.js +0 -127
  100. package/dist/axisFormat-B7o_uIEA.js.map +0 -1
  101. package/dist/createStackedChart-CjsKcOvX.js +0 -1088
  102. package/dist/createStackedChart-CjsKcOvX.js.map +0 -1
  103. package/dist/index-ChgIdk3N.js +0 -229
  104. package/dist/index-ChgIdk3N.js.map +0 -1
@@ -1,56 +1,61 @@
1
- var de = Object.defineProperty;
2
- var ue = (r, e, t) => e in r ? de(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
- var _ = (r, e, t) => ue(r, typeof e != "symbol" ? e + "" : e, t);
4
- import { b as fe } from "./ChartCore-BimVvUEg.js";
5
- import { A as je, C as Je, h as Qe, D as Ze, o as et, k as tt, E as nt, j as at, L as ot, d as rt, M as it, N as st, O as lt, P as ct, t as dt, S as ut, G as ft, x as gt, c as pt, H as ht, N as mt, J as yt, f as xt, l as vt, v as Pt, y as St, I as Tt, e as wt, u as bt, a as Ct, g as Mt, n as At, i as It, m as Dt, s as Et, p as Ft, q as Lt, r as Rt, z as Xt, B as Yt, F as kt, w as zt } from "./ChartCore-BimVvUEg.js";
6
- import { E as Ot } from "./axisFormat-B7o_uIEA.js";
7
- import { AnnotationManager as Bt, PluginAnnotations as Ht } from "./plugins/annotations.js";
8
- import { d as O } from "./index.core-C_-CFftD.js";
9
- import { e as Wt, h as Gt, f as Nt, c as Vt, a as Ut, g as Kt, b as jt, l as Jt, r as Qt, v as Zt } from "./index.core-C_-CFftD.js";
10
- import { P as tn, a as nn, T as an, g as on } from "./index-DjeWClO9.js";
11
- import { P as sn, c as ln, l as cn, m as dn } from "./index-ChgIdk3N.js";
12
- import { PluginAnalysis as fn, adx as gn, analyzeComplexSpectrum as pn, analyzeSpectrum as hn, aroon as mn, arraysToComplex as yn, atr as xn, autoCorrelation as vn, bandPassFilter as Pn, bandStopFilter as Sn, blackmanWindow as Tn, bollingerBands as wn, butterworth as bn, complexToArrays as Cn, crossCorrelation as Mn, cumsum as An, dema as In, detectAnomalies as Dn, dominantFrequency as En, ema as Fn, exponentialMovingAverage as Ln, fft as Rn, fftFromComplexInput as Xn, gaussianSmooth as Yn, getPositiveFrequencies as kn, hammingWindow as zn, hanningWindow as _n, highPassFilter as On, ifft as $n, ifftComplex as Bn, ifftFromArrays as Hn, lowPassFilter as qn, macd as Wn, medianFilter as Gn, momentum as Nn, nextPowerOf2 as Vn, normalize as Un, obv as Kn, percentChange as jn, powerSpectrum as Jn, roc as Qn, rsi as Zn, savitzkyGolay as ea, simpsonsIntegration as ta, singleFrequencyFilter as na, sma as aa, standardDeviation as oa, stochastic as ra, tTest as ia, tema as sa, trapezoidalIntegration as la, vwap as ca, wma as da } from "./plugins/analysis.js";
13
- import { B as fa, C as ga, P as pa, a as ha, e as ma, g as ya, b as xa, d as va, f as Pa, c as Sa } from "./index-BMiZoKmm.js";
14
- import { b as wa, a as ba, S as Ca, c as Ma, u as Aa } from "./createStackedChart-CjsKcOvX.js";
1
+ var xe = Object.defineProperty;
2
+ var ve = (n, e, t) => e in n ? xe(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
+ var Y = (n, e, t) => ve(n, typeof e != "symbol" ? e + "" : e, t);
4
+ import { D as ee, j as O, s as te, O as Pe } from "./ChartCore-BhQ4j7f5.js";
5
+ import { A as St, C as Tt, l as bt, G as At, f as Mt, E as Ct, L as Ft, u as Dt, z as Et, N as It, a5 as Lt, H as kt, S as Rt, U as Xt, a as Yt, Z as Bt, a0 as _t, b as Gt, g as Wt, a3 as zt, K as Ut, e as $t, d as Ot, a1 as Ht, c as qt, $ as Nt, N as Vt, a4 as Kt, v as jt, B as Jt, J as Qt, P as Zt, _ as en, a2 as tn, k as nn, X as an, I as on, p as rn, o as sn, F as ln, x as cn, Y as dn, n as un, m as fn, y as gn, q as pn, t as hn, V as mn, W as yn, Q as xn, R as vn, T as Pn, w as wn } from "./ChartCore-BhQ4j7f5.js";
6
+ import { E as Tn, c as bn, b as An, f as Mn, i as Cn, a as Fn, m as Dn } from "./axisFormat-SPX-CD5s.js";
7
+ import { AnnotationManager as In, PluginAnnotations as Ln } from "./plugins/annotations.js";
8
+ import { d as G } from "./index.core-fpZ1dYN0.js";
9
+ import { e as Rn, h as Xn, f as Yn, c as Bn, a as _n, g as Gn, b as Wn, l as zn, r as Un, v as $n } from "./index.core-fpZ1dYN0.js";
10
+ import { G as Hn, S as qn, a as Nn, W as Vn, c as Kn, p as jn } from "./gpuRenderer-BpaMYz-k.js";
11
+ import { P as Qn, a as Zn, T as ea, g as ta } from "./index-CWipqOLP.js";
12
+ import { P as aa, c as oa, e as ra, d as ia, g as sa, a as la, l as ca, m as da, b as ua, o as fa, s as ga, u as pa } from "./index-D7dTq6VB.js";
13
+ import { W as ma, n as ya } from "./pool-15HMCNv8.js";
14
+ import { PluginAnalysis as va, analyzeComplexSpectrum as Pa, analyzeSpectrum as wa, arraysToComplex as Sa, autoCorrelation as Ta, bandPassFilter as ba, bandStopFilter as Aa, blackmanWindow as Ma, butterworth as Ca, complexToArrays as Fa, crossCorrelation as Da, detectAnomalies as Ea, dominantFrequency as Ia, exponentialMovingAverage as La, fft as ka, fftFromComplexInput as Ra, gaussianSmooth as Xa, getPositiveFrequencies as Ya, hammingWindow as Ba, hanningWindow as _a, highPassFilter as Ga, ifft as Wa, ifftComplex as za, ifftFromArrays as Ua, lowPassFilter as $a, medianFilter as Oa, nextPowerOf2 as Ha, powerSpectrum as qa, savitzkyGolay as Na, simpsonsIntegration as Va, singleFrequencyFilter as Ka, tTest as ja, trapezoidalIntegration as Ja } from "./plugins/analysis.js";
15
+ import { B as Za, C as eo, P as to, a as no, e as ao, g as oo, b as ro, d as io, f as so, c as lo } from "./index-BMiZoKmm.js";
16
+ import { S as uo, u as fo } from "./SciPlot-GJvw7GJo.js";
15
17
  import "react";
16
- import { BaseBufferStore as Da, BaseTextureStore as Ea, GpuBenchmark as Fa, GpuCompute as La, GpuRenderer as Ra, PipelineCache as Xa, PluginGpu as Ya, SeriesAdapter as ka, WebGLBackend as za, WebGPUBackend as _a, createGpuRenderer as Oa, parseColorToRGBA as $a } from "./plugins/gpu.js";
17
- import { b as Ha, L as qa, a as Wa, c as Ga, f as Na, d as Va, e as Ua, i as Ka, g as ja, h as Ja, r as Qa, s as Za } from "./index-x4stH3jD.js";
18
- import { D as to, K as no, P as ao, c as oo, p as ro } from "./index-Ce2JgkH_.js";
19
- import { ClipboardManager as so, PluginClipboard as lo, copyToClipboard as co, formatData as uo, getClipboardManager as fo } from "./plugins/clipboard.js";
20
- import { DebugOverlay as po, PluginDebug as ho, createDebugOverlay as mo, enableDebugMode as yo } from "./plugins/debug.js";
21
- import { L as vo, P as Po, c as So, s as To, a as wo } from "./index-qhscKTDy.js";
22
- import { C as Co, c as Mo, a as Ao, l as Io } from "./index-CUGS98p4.js";
23
- import { P as Eo, b as Fo, T as Lo, c as Ro, a as Xo, g as Yo } from "./index-Dag88bW4.js";
24
- import { c as zo, a as _o, b as Oo, d as $o, h as Bo, e as Ho, f as qo, g as Wo, i as Go, m as No, s as Vo, v as Uo } from "./utils-BK5UUXxj.js";
25
- import { a as jo, c as Jo, d as Qo, i as Zo, s as er } from "./math-Ddm2EZjj.js";
26
- import { Plugin3D as nr } from "./plugins/3d.js";
27
- import { PluginI18n as or } from "./plugins/i18n.js";
28
- import { PluginSync as ir } from "./plugins/sync.js";
29
- import { PluginDataExport as lr } from "./plugins/data-export.js";
30
- import { PluginContextMenu as dr } from "./plugins/context-menu.js";
31
- import { PluginAnomalyDetection as fr } from "./plugins/anomaly-detection.js";
32
- import { PluginMLIntegration as pr } from "./plugins/ml-integration.js";
33
- import { PluginPatternRecognition as mr } from "./plugins/pattern-recognition.js";
34
- import { PluginRegression as xr } from "./plugins/regression.js";
35
- import { PluginRadar as Pr } from "./plugins/radar.js";
36
- import { PluginSnapshot as Tr } from "./plugins/snapshot.js";
37
- import { PluginDataTransform as br } from "./plugins/data-transform.js";
38
- import { PluginLaTeX as Mr } from "./plugins/latex.js";
39
- import { PluginCaching as Ir } from "./plugins/caching.js";
40
- import { PluginLazyLoad as Er } from "./plugins/lazy-load.js";
41
- import { PluginBrokenAxis as Lr } from "./plugins/broken-axis.js";
42
- import { PluginVideoRecorder as Xr } from "./plugins/video-recorder.js";
43
- import { PluginOffscreen as kr } from "./plugins/offscreen.js";
44
- import { PluginROI as _r } from "./plugins/roi.js";
45
- import { PluginForecasting as $r } from "./plugins/forecasting.js";
46
- class Q {
18
+ import { a as po, S as ho, c as mo } from "./createStackedChart-DJSmqerD.js";
19
+ import { BaseBufferStore as xo, BaseTextureStore as vo, GpuBenchmark as Po, GpuCompute as wo, PipelineCache as So, PluginGpu as To } from "./plugins/gpu.js";
20
+ import { b as Ao, L as Mo, a as Co, c as Fo, f as Do, d as Eo, e as Io, i as Lo, g as ko, h as Ro, r as Xo, s as Yo } from "./index-x4stH3jD.js";
21
+ import { D as _o, K as Go, P as Wo, c as zo, p as Uo } from "./index-DoYxf1cV.js";
22
+ import { ClipboardManager as Oo, PluginClipboard as Ho, copyToClipboard as qo, formatData as No, getClipboardManager as Vo } from "./plugins/clipboard.js";
23
+ import { DebugOverlay as jo, PluginDebug as Jo, createDebugOverlay as Qo, enableDebugMode as Zo } from "./plugins/debug.js";
24
+ import { L as tr, P as nr, c as ar, s as or, a as rr } from "./index-qhscKTDy.js";
25
+ import { C as sr, c as lr, a as cr, l as dr } from "./index-CUGS98p4.js";
26
+ import { P as fr, a as gr, b as pr, c as hr } from "./mockDatafeed-Cdg5hKEo.js";
27
+ import { P as yr, b as xr, T as vr, c as Pr, a as wr, g as Sr } from "./index-Dag88bW4.js";
28
+ import { c as br, a as Ar, b as Mr, d as Cr, h as Fr, e as Dr, f as Er, g as Ir, i as Lr, m as kr, s as Rr, v as Xr } from "./utils-BK5UUXxj.js";
29
+ import { a as Br, c as _r, d as Gr, i as Wr, s as zr } from "./math-Ddm2EZjj.js";
30
+ import { i as $r, j as Or, g as Hr, f as qr, k as Nr, d as Vr, e as Kr, m as jr, c as Jr, n as Qr, o as Zr, p as ei, b as ti, r as ni, s as ai, h as oi, a as ri, t as ii, v as si, w as li } from "./indicators--eJGmVox.js";
31
+ import { Plugin3D as di } from "./plugins/3d.js";
32
+ import { PluginI18n as fi } from "./plugins/i18n.js";
33
+ import { PluginSync as pi } from "./plugins/sync.js";
34
+ import { PluginDataExport as mi } from "./plugins/data-export.js";
35
+ import { PluginContextMenu as xi } from "./plugins/context-menu.js";
36
+ import { PluginAnomalyDetection as Pi } from "./plugins/anomaly-detection.js";
37
+ import { PluginMLIntegration as Si } from "./plugins/ml-integration.js";
38
+ import { PluginPatternRecognition as bi } from "./plugins/pattern-recognition.js";
39
+ import { PluginRegression as Mi } from "./plugins/regression.js";
40
+ import { PluginRadar as Fi } from "./plugins/radar.js";
41
+ import { PluginSnapshot as Ei } from "./plugins/snapshot.js";
42
+ import { PluginDataTransform as Li } from "./plugins/data-transform.js";
43
+ import { PluginLaTeX as Ri } from "./plugins/latex.js";
44
+ import { PluginCaching as Yi } from "./plugins/caching.js";
45
+ import { PluginLazyLoad as _i } from "./plugins/lazy-load.js";
46
+ import { PluginBrokenAxis as Wi } from "./plugins/broken-axis.js";
47
+ import { PluginVideoRecorder as Ui } from "./plugins/video-recorder.js";
48
+ import { PluginOffscreen as Oi } from "./plugins/offscreen.js";
49
+ import { PluginROI as qi } from "./plugins/roi.js";
50
+ import { PluginForecasting as Vi } from "./plugins/forecasting.js";
51
+ class ae {
47
52
  constructor(e, t = {}) {
48
- _(this, "available");
49
- _(this, "canvas");
50
- _(this, "adapter");
51
- _(this, "device");
52
- _(this, "context");
53
- this.canvas = e, this.available = Q.isSupported();
53
+ Y(this, "available");
54
+ Y(this, "canvas");
55
+ Y(this, "adapter");
56
+ Y(this, "device");
57
+ Y(this, "context");
58
+ this.canvas = e, this.available = ae.isSupported();
54
59
  }
55
60
  static isSupported() {
56
61
  return typeof globalThis.navigator < "u" && typeof globalThis.navigator.gpu < "u";
@@ -64,14 +69,14 @@ class Q {
64
69
  }), !this.adapter)
65
70
  throw new Error("[SciPlot] Failed to request WebGPU adapter");
66
71
  this.device = await this.adapter.requestDevice();
67
- const s = this.canvas.getContext("webgpu");
68
- if (!s)
72
+ const o = this.canvas.getContext("webgpu");
73
+ if (!o)
69
74
  throw new Error("[SciPlot] Failed to get WebGPU context");
70
- this.context = s;
71
- const o = e.preferredFormat ?? (t.getPreferredCanvasFormat ? t.getPreferredCanvasFormat() : "bgra8unorm");
75
+ this.context = o;
76
+ const r = e.preferredFormat ?? (t.getPreferredCanvasFormat ? t.getPreferredCanvasFormat() : "bgra8unorm");
72
77
  this.context.configure({
73
78
  device: this.device,
74
- format: o,
79
+ format: r,
75
80
  alphaMode: "premultiplied"
76
81
  });
77
82
  }
@@ -79,128 +84,128 @@ class Q {
79
84
  this.device = void 0, this.adapter = void 0, this.context = void 0;
80
85
  }
81
86
  }
82
- const ge = {
87
+ const we = {
83
88
  name: "crosshair",
84
89
  version: "1.0.0",
85
90
  description: "Interactive crosshair that follows mouse cursor",
86
91
  provides: ["interaction", "visualization"],
87
92
  tags: ["cursor", "crosshair", "tooltip"]
88
- }, pe = O(
89
- ge,
90
- (r = {}) => {
93
+ }, Se = G(
94
+ we,
95
+ (n = {}) => {
91
96
  const {
92
97
  showVertical: e = !0,
93
98
  showHorizontal: t = !0,
94
- color: s,
95
- lineStyle: o = "dashed",
96
- lineWidth: n = 1,
97
- snapToData: u = !1,
99
+ color: o,
100
+ lineStyle: r = "dashed",
101
+ lineWidth: a = 1,
102
+ snapToData: d = !1,
98
103
  valueFormat: c = { xPrecision: 4, yPrecision: 4 }
99
- } = r;
100
- let i = r.valueDisplayMode ?? "disabled";
101
- r.showAxisLabels !== void 0 && r.valueDisplayMode === void 0 && (i = r.showAxisLabels ? "floating" : "disabled");
102
- const l = r.cornerPosition ?? "top-left";
103
- let f = -1, y = -1, b, v = null, p = null;
104
+ } = n;
105
+ let i = n.valueDisplayMode ?? "disabled";
106
+ n.showAxisLabels !== void 0 && n.valueDisplayMode === void 0 && (i = n.showAxisLabels ? "floating" : "disabled");
107
+ const s = n.cornerPosition ?? "top-left";
108
+ let u = -1, h = -1, S, v = null, p = null;
104
109
  return {
105
- onInit(d) {
106
- b = "crosshair-overlay";
107
- const a = d.ui.createOverlay(b, {
110
+ onInit(f) {
111
+ S = "crosshair-overlay";
112
+ const l = f.ui.createOverlay(S, {
108
113
  zIndex: 500,
109
114
  position: { top: "0", left: "0", right: "0", bottom: "0" }
110
115
  });
111
- v = document.createElement("canvas"), v.style.cssText = "width: 100%; height: 100%;", a.appendChild(v), p = v.getContext("2d"), S(d);
116
+ v = document.createElement("canvas"), v.style.cssText = "width: 100%; height: 100%;", l.appendChild(v), p = v.getContext("2d"), w(f);
112
117
  },
113
- onDestroy(d) {
114
- d.ui.removeOverlay(b), v = null, p = null;
118
+ onDestroy(f) {
119
+ f.ui.removeOverlay(S), v = null, p = null;
115
120
  },
116
- onResize(d) {
117
- S(d);
121
+ onResize(f) {
122
+ w(f);
118
123
  },
119
- onInteraction(d, a) {
120
- if (a.type === "mousemove") {
121
- if (f = a.pixelX, y = a.pixelY, u && a.inPlotArea) {
122
- const P = d.coords.pickPoint(f, y);
123
- P && (f = P.pixelX, y = P.pixelY);
124
+ onInteraction(f, l) {
125
+ if (l.type === "mousemove") {
126
+ if (u = l.pixelX, h = l.pixelY, d && l.inPlotArea) {
127
+ const P = f.coords.pickPoint(u, h);
128
+ P && (u = P.pixelX, h = P.pixelY);
124
129
  }
125
- C(d);
130
+ b(f);
126
131
  }
127
132
  },
128
133
  onViewChange() {
129
134
  }
130
135
  };
131
- function S(d) {
136
+ function w(f) {
132
137
  if (!v || !p) return;
133
- const a = d.render.canvasSize, P = d.render.pixelRatio;
134
- v.width = a.width * P, v.height = a.height * P, p.setTransform(1, 0, 0, 1, 0, 0), p.scale(P, P);
138
+ const l = f.render.canvasSize, P = f.render.pixelRatio;
139
+ v.width = l.width * P, v.height = l.height * P, p.setTransform(1, 0, 0, 1, 0, 0), p.scale(P, P);
135
140
  }
136
- function C(d) {
137
- var A;
141
+ function b(f) {
142
+ var C;
138
143
  if (!p || !v) return;
139
- const { width: a, height: P } = d.render.canvasSize;
140
- if (p.clearRect(0, 0, a, P), f < 0 || y < 0) return;
141
- const x = d.render.plotArea;
142
- if (f < x.x || f > x.x + x.width || y < x.y || y > x.y + x.height)
144
+ const { width: l, height: P } = f.render.canvasSize;
145
+ if (p.clearRect(0, 0, l, P), u < 0 || h < 0) return;
146
+ const x = f.render.plotArea;
147
+ if (u < x.x || u > x.x + x.width || h < x.y || h > x.y + x.height)
143
148
  return;
144
- const D = s || ((A = d.ui.theme.cursor) == null ? void 0 : A.color) || "#888888";
145
- p.save(), p.strokeStyle = D, p.lineWidth = n, o === "dashed" ? p.setLineDash([6, 4]) : o === "dotted" && p.setLineDash([2, 2]), e && (p.beginPath(), p.moveTo(f, x.y), p.lineTo(f, x.y + x.height), p.stroke()), t && (p.beginPath(), p.moveTo(x.x, y), p.lineTo(x.x + x.width, y), p.stroke()), p.restore(), i === "floating" ? g(d, p, f, y, D) : i === "corner" && m(d, p, f, y, D);
149
+ const D = o || ((C = f.ui.theme.cursor) == null ? void 0 : C.color) || "#888888";
150
+ p.save(), p.strokeStyle = D, p.lineWidth = a, r === "dashed" ? p.setLineDash([6, 4]) : r === "dotted" && p.setLineDash([2, 2]), e && (p.beginPath(), p.moveTo(u, x.y), p.lineTo(u, x.y + x.height), p.stroke()), t && (p.beginPath(), p.moveTo(x.x, h), p.lineTo(x.x + x.width, h), p.stroke()), p.restore(), i === "floating" ? g(f, p, u, h, D) : i === "corner" && y(f, p, u, h, D);
146
151
  }
147
- function g(d, a, P, x, D) {
148
- const A = d.coords.pixelToDataX(P), k = d.coords.pixelToDataY(x), M = d.render.plotArea;
149
- a.save(), a.font = "11px system-ui, sans-serif", a.textAlign = "center", a.textBaseline = "top";
150
- const z = A.toPrecision(c.xPrecision), w = a.measureText(z).width + 8, T = 18, F = P - w / 2, I = M.y + M.height + 2;
151
- a.fillStyle = D, a.fillRect(F, I, w, T), a.fillStyle = "#ffffff", a.fillText(z, P, I + 3), a.textAlign = "right", a.textBaseline = "middle";
152
- const R = k.toPrecision(c.yPrecision), Y = a.measureText(R).width + 8, L = 18, X = M.x - Y - 2, H = x - L / 2;
153
- a.fillStyle = D, a.fillRect(X, H, Y, L), a.fillStyle = "#ffffff", a.fillText(R, M.x - 6, x), a.restore();
152
+ function g(f, l, P, x, D) {
153
+ const C = f.coords.pixelToDataX(P), B = f.coords.pixelToDataY(x), M = f.render.plotArea;
154
+ l.save(), l.font = "11px system-ui, sans-serif", l.textAlign = "center", l.textBaseline = "top";
155
+ const _ = C.toPrecision(c.xPrecision), A = l.measureText(_).width + 8, T = 18, I = P - A / 2, F = M.y + M.height + 2;
156
+ l.fillStyle = D, l.fillRect(I, F, A, T), l.fillStyle = "#ffffff", l.fillText(_, P, F + 3), l.textAlign = "right", l.textBaseline = "middle";
157
+ const k = B.toPrecision(c.yPrecision), X = l.measureText(k).width + 8, L = 18, R = M.x - X - 2, U = x - L / 2;
158
+ l.fillStyle = D, l.fillRect(R, U, X, L), l.fillStyle = "#ffffff", l.fillText(k, M.x - 6, x), l.restore();
154
159
  }
155
- function m(d, a, P, x, D) {
156
- const A = d.coords.pixelToDataX(P), k = d.coords.pixelToDataY(x), M = d.render.plotArea;
157
- a.save(), a.font = "11px system-ui, sans-serif";
158
- const z = `X: ${A.toPrecision(c.xPrecision)}`, h = `Y: ${k.toPrecision(c.yPrecision)}`, w = a.measureText(z), T = a.measureText(h), F = Math.max(w.width, T.width), I = 6, R = 16, E = F + I * 2, Y = R * 2 + I * 2;
159
- let L, X;
160
- switch (l) {
160
+ function y(f, l, P, x, D) {
161
+ const C = f.coords.pixelToDataX(P), B = f.coords.pixelToDataY(x), M = f.render.plotArea;
162
+ l.save(), l.font = "11px system-ui, sans-serif";
163
+ const _ = `X: ${C.toPrecision(c.xPrecision)}`, m = `Y: ${B.toPrecision(c.yPrecision)}`, A = l.measureText(_), T = l.measureText(m), I = Math.max(A.width, T.width), F = 6, k = 16, E = I + F * 2, X = k * 2 + F * 2;
164
+ let L, R;
165
+ switch (s) {
161
166
  case "top-left":
162
- L = M.x + 8, X = M.y + 8;
167
+ L = M.x + 8, R = M.y + 8;
163
168
  break;
164
169
  case "top-right":
165
- L = M.x + M.width - E - 8, X = M.y + 8;
170
+ L = M.x + M.width - E - 8, R = M.y + 8;
166
171
  break;
167
172
  case "bottom-left":
168
- L = M.x + 8, X = M.y + M.height - Y - 8;
173
+ L = M.x + 8, R = M.y + M.height - X - 8;
169
174
  break;
170
175
  case "bottom-right":
171
- L = M.x + M.width - E - 8, X = M.y + M.height - Y - 8;
176
+ L = M.x + M.width - E - 8, R = M.y + M.height - X - 8;
172
177
  break;
173
178
  default:
174
- L = M.x + 8, X = M.y + 8;
179
+ L = M.x + 8, R = M.y + 8;
175
180
  }
176
- a.fillStyle = D, a.globalAlpha = 0.85, a.fillRect(L, X, E, Y), a.globalAlpha = 1, a.strokeStyle = "rgba(255,255,255,0.3)", a.lineWidth = 1, a.strokeRect(L, X, E, Y), a.fillStyle = "#ffffff", a.textAlign = "left", a.textBaseline = "top", a.fillText(z, L + I, X + I), a.fillText(h, L + I, X + I + R), a.restore();
181
+ l.fillStyle = D, l.globalAlpha = 0.85, l.fillRect(L, R, E, X), l.globalAlpha = 1, l.strokeStyle = "rgba(255,255,255,0.3)", l.lineWidth = 1, l.strokeRect(L, R, E, X), l.fillStyle = "#ffffff", l.textAlign = "left", l.textBaseline = "top", l.fillText(_, L + F, R + F), l.fillText(m, L + F, R + F + k), l.restore();
177
182
  }
178
183
  }
179
- ), he = {
184
+ ), Te = {
180
185
  name: "statistics-overlay",
181
186
  version: "1.0.0",
182
187
  description: "Displays real-time statistics for chart data",
183
188
  provides: ["visualization", "analysis"],
184
189
  tags: ["statistics", "overlay", "analytics"]
185
- }, me = O(
186
- he,
187
- (r = {}) => {
190
+ }, be = G(
191
+ Te,
192
+ (n = {}) => {
188
193
  const {
189
194
  position: e = "top-right",
190
195
  show: t = ["count", "mean", "min", "max"],
191
- seriesId: s,
192
- autoUpdate: o = !0
193
- } = r;
194
- let n, u = null;
196
+ seriesId: o,
197
+ autoUpdate: r = !0
198
+ } = n;
199
+ let a, d = null;
195
200
  return {
196
- onInit(l) {
197
- n = "stats-overlay";
198
- const f = {};
199
- e.includes("top") && (f.top = "10px"), e.includes("bottom") && (f.bottom = "10px"), e.includes("left") && (f.left = "10px"), e.includes("right") && (f.right = "10px"), u = l.ui.createOverlay(n, {
201
+ onInit(s) {
202
+ a = "stats-overlay";
203
+ const u = {};
204
+ e.includes("top") && (u.top = "10px"), e.includes("bottom") && (u.bottom = "10px"), e.includes("left") && (u.left = "10px"), e.includes("right") && (u.right = "10px"), d = s.ui.createOverlay(a, {
200
205
  zIndex: 800,
201
- position: f,
206
+ position: u,
202
207
  pointerEvents: !1
203
- }), u.innerHTML = `
208
+ }), d.innerHTML = `
204
209
  <div style="
205
210
  background: rgba(0, 0, 0, 0.85);
206
211
  color: #fff;
@@ -214,176 +219,176 @@ const ge = {
214
219
  <div style="font-weight: bold; margin-bottom: 4px; color: #4ade80;">📊 Statistics</div>
215
220
  <div class="stats-content"></div>
216
221
  </div>
217
- `, c(l);
222
+ `, c(s);
218
223
  },
219
- onDestroy(l) {
220
- l.ui.removeOverlay(n), u = null;
224
+ onDestroy(s) {
225
+ s.ui.removeOverlay(a), d = null;
221
226
  },
222
- onDataUpdate(l) {
223
- o && c(l);
227
+ onDataUpdate(s) {
228
+ r && c(s);
224
229
  },
225
- onSeriesAdd(l) {
226
- c(l);
230
+ onSeriesAdd(s) {
231
+ c(s);
227
232
  },
228
- onSeriesRemove(l) {
229
- c(l);
233
+ onSeriesRemove(s) {
234
+ c(s);
230
235
  },
231
236
  api: {
232
- refresh(l) {
233
- c(l);
237
+ refresh(s) {
238
+ c(s);
234
239
  }
235
240
  }
236
241
  };
237
- function c(l) {
242
+ function c(s) {
243
+ if (!d) return;
244
+ const u = d.querySelector(".stats-content");
238
245
  if (!u) return;
239
- const f = u.querySelector(".stats-content");
240
- if (!f) return;
241
- const y = l.data.getAllSeries(), b = s ? y.filter((C) => C.getId() === s) : y;
242
- if (b.length === 0) {
243
- f.innerHTML = "<div style='color: #888'>No data</div>";
246
+ const h = s.data.getAllSeries(), S = o ? h.filter((b) => b.getId() === o) : h;
247
+ if (S.length === 0) {
248
+ u.innerHTML = "<div style='color: #888'>No data</div>";
244
249
  return;
245
250
  }
246
251
  let v = [];
247
- if (b.forEach((C) => {
248
- const g = C.getData();
252
+ if (S.forEach((b) => {
253
+ const g = b.getData();
249
254
  g != null && g.y && (v = v.concat(Array.from(g.y)));
250
255
  }), v.length === 0) {
251
- f.innerHTML = "<div style='color: #888'>No data</div>";
256
+ u.innerHTML = "<div style='color: #888'>No data</div>";
252
257
  return;
253
258
  }
254
- const p = i(v), S = [];
255
- t.includes("count") && S.push(`<div>N: <span style="color: #60a5fa">${p.count.toLocaleString()}</span></div>`), t.includes("mean") && S.push(`<div>μ: <span style="color: #60a5fa">${p.mean.toPrecision(4)}</span></div>`), t.includes("min") && S.push(`<div>Min: <span style="color: #60a5fa">${p.min.toPrecision(4)}</span></div>`), t.includes("max") && S.push(`<div>Max: <span style="color: #60a5fa">${p.max.toPrecision(4)}</span></div>`), t.includes("std") && S.push(`<div>σ: <span style="color: #60a5fa">${p.std.toPrecision(4)}</span></div>`), t.includes("range") && S.push(`<div>Range: <span style="color: #60a5fa">${p.range.toPrecision(4)}</span></div>`), f.innerHTML = S.join("");
259
+ const p = i(v), w = [];
260
+ t.includes("count") && w.push(`<div>N: <span style="color: #60a5fa">${p.count.toLocaleString()}</span></div>`), t.includes("mean") && w.push(`<div>μ: <span style="color: #60a5fa">${p.mean.toPrecision(4)}</span></div>`), t.includes("min") && w.push(`<div>Min: <span style="color: #60a5fa">${p.min.toPrecision(4)}</span></div>`), t.includes("max") && w.push(`<div>Max: <span style="color: #60a5fa">${p.max.toPrecision(4)}</span></div>`), t.includes("std") && w.push(`<div>σ: <span style="color: #60a5fa">${p.std.toPrecision(4)}</span></div>`), t.includes("range") && w.push(`<div>Range: <span style="color: #60a5fa">${p.range.toPrecision(4)}</span></div>`), u.innerHTML = w.join("");
256
261
  }
257
- function i(l) {
258
- const f = l.length;
259
- let y = 0, b = 1 / 0, v = -1 / 0;
260
- for (const g of l)
261
- y += g, g < b && (b = g), g > v && (v = g);
262
- const p = y / f;
263
- let S = 0;
264
- for (const g of l)
265
- S += (g - p) ** 2;
266
- const C = Math.sqrt(S / f);
262
+ function i(s) {
263
+ const u = s.length;
264
+ let h = 0, S = 1 / 0, v = -1 / 0;
265
+ for (const g of s)
266
+ h += g, g < S && (S = g), g > v && (v = g);
267
+ const p = h / u;
268
+ let w = 0;
269
+ for (const g of s)
270
+ w += (g - p) ** 2;
271
+ const b = Math.sqrt(w / u);
267
272
  return {
268
- count: f,
273
+ count: u,
269
274
  mean: p,
270
- min: b,
275
+ min: S,
271
276
  max: v,
272
- std: C,
273
- range: v - b
277
+ std: b,
278
+ range: v - S
274
279
  };
275
280
  }
276
281
  }
277
- ), ye = {
282
+ ), Ae = {
278
283
  name: "watermark",
279
284
  version: "1.0.0",
280
285
  description: "Adds a customizable watermark to the chart",
281
286
  provides: ["visualization"],
282
287
  tags: ["watermark", "branding", "overlay"]
283
- }, xe = O(
284
- ye,
285
- (r) => {
286
- if (!(r != null && r.text))
288
+ }, Me = G(
289
+ Ae,
290
+ (n) => {
291
+ if (!(n != null && n.text))
287
292
  throw new Error("WatermarkPlugin requires 'text' configuration");
288
293
  const {
289
294
  text: e,
290
295
  fontSize: t = 48,
291
- fontFamily: s = "system-ui, sans-serif",
292
- color: o = "rgba(128, 128, 128, 0.15)",
293
- position: n = "center",
294
- rotation: u = n === "center" ? -30 : 0
295
- } = r;
296
+ fontFamily: o = "system-ui, sans-serif",
297
+ color: r = "rgba(128, 128, 128, 0.15)",
298
+ position: a = "center",
299
+ rotation: d = a === "center" ? -30 : 0
300
+ } = n;
296
301
  return {
297
302
  onRenderOverlay(c) {
298
303
  const i = c.render.ctx2d;
299
304
  if (!i) return;
300
305
  c.render.canvasSize;
301
- const l = c.render.plotArea;
302
- i.save(), i.font = `${t}px ${s}`, i.fillStyle = o, i.textAlign = "center", i.textBaseline = "middle";
303
- let f, y;
304
- n === "center" ? (f = l.x + l.width / 2, y = l.y + l.height / 2) : n === "bottom-right" ? (f = l.x + l.width - t, y = l.y + l.height - t / 2) : (f = l.x + t, y = l.y + l.height - t / 2), i.translate(f, y), i.rotate(u * Math.PI / 180), i.fillText(e, 0, 0), i.restore();
306
+ const s = c.render.plotArea;
307
+ i.save(), i.font = `${t}px ${o}`, i.fillStyle = r, i.textAlign = "center", i.textBaseline = "middle";
308
+ let u, h;
309
+ a === "center" ? (u = s.x + s.width / 2, h = s.y + s.height / 2) : a === "bottom-right" ? (u = s.x + s.width - t, h = s.y + s.height - t / 2) : (u = s.x + t, h = s.y + s.height - t / 2), i.translate(u, h), i.rotate(d * Math.PI / 180), i.fillText(e, 0, 0), i.restore();
305
310
  }
306
311
  };
307
312
  }
308
- ), ve = {
313
+ ), Ce = {
309
314
  name: "grid-highlight",
310
315
  version: "1.0.0",
311
316
  description: "Highlights specific regions of the chart grid",
312
317
  provides: ["visualization"],
313
318
  tags: ["grid", "highlight", "regions"]
314
- }, Pe = O(
315
- ve,
316
- (r = {}) => {
317
- const { xIntervals: e = [], yIntervals: t = [], opacity: s = 0.1 } = r;
319
+ }, Fe = G(
320
+ Ce,
321
+ (n = {}) => {
322
+ const { xIntervals: e = [], yIntervals: t = [], opacity: o = 0.1 } = n;
318
323
  return {
319
- onRenderOverlay(o, n) {
320
- const u = o.render.ctx2d;
321
- if (!u) return;
322
- const c = o.render.plotArea;
323
- o.data.getViewBounds(), u.save(), u.beginPath(), u.rect(c.x, c.y, c.width, c.height), u.clip(), u.globalAlpha = s;
324
+ onRenderOverlay(r, a) {
325
+ const d = r.render.ctx2d;
326
+ if (!d) return;
327
+ const c = r.render.plotArea;
328
+ r.data.getViewBounds(), d.save(), d.beginPath(), d.rect(c.x, c.y, c.width, c.height), d.clip(), d.globalAlpha = o;
324
329
  for (const i of e) {
325
- const l = o.coords.dataToPixelX(i.start), f = o.coords.dataToPixelX(i.end);
326
- u.fillStyle = i.color, u.fillRect(
327
- Math.min(l, f),
330
+ const s = r.coords.dataToPixelX(i.start), u = r.coords.dataToPixelX(i.end);
331
+ d.fillStyle = i.color, d.fillRect(
332
+ Math.min(s, u),
328
333
  c.y,
329
- Math.abs(f - l),
334
+ Math.abs(u - s),
330
335
  c.height
331
336
  );
332
337
  }
333
338
  for (const i of t) {
334
- const l = o.coords.dataToPixelY(i.start), f = o.coords.dataToPixelY(i.end);
335
- u.fillStyle = i.color, u.fillRect(
339
+ const s = r.coords.dataToPixelY(i.start), u = r.coords.dataToPixelY(i.end);
340
+ d.fillStyle = i.color, d.fillRect(
336
341
  c.x,
337
- Math.min(l, f),
342
+ Math.min(s, u),
338
343
  c.width,
339
- Math.abs(f - l)
344
+ Math.abs(u - s)
340
345
  );
341
346
  }
342
- u.restore();
347
+ d.restore();
343
348
  }
344
349
  };
345
350
  }
346
- ), Se = {
351
+ ), De = {
347
352
  name: "data-logger",
348
353
  version: "1.0.0",
349
354
  description: "Logs chart events for debugging and analysis",
350
355
  provides: ["analysis"],
351
356
  tags: ["debug", "logging", "events"]
352
- }, Te = O(
353
- Se,
354
- (r = {}) => {
357
+ }, Ee = G(
358
+ De,
359
+ (n = {}) => {
355
360
  const {
356
361
  logDataUpdates: e = !0,
357
362
  logViewChanges: t = !0,
358
- logInteractions: s = !1,
359
- maxEntries: o = 100
360
- } = r, n = [];
361
- function u(c, i) {
362
- n.push({
363
+ logInteractions: o = !1,
364
+ maxEntries: r = 100
365
+ } = n, a = [];
366
+ function d(c, i) {
367
+ a.push({
363
368
  timestamp: Date.now(),
364
369
  type: c,
365
370
  data: i
366
- }), n.length > o && n.shift();
371
+ }), a.length > r && a.shift();
367
372
  }
368
373
  return {
369
374
  onInit(c) {
370
375
  c.log.info("Data logger initialized");
371
376
  },
372
377
  onDataUpdate(c, i) {
373
- e && (u("dataUpdate", {
378
+ e && (d("dataUpdate", {
374
379
  seriesId: i.seriesId,
375
380
  mode: i.mode,
376
381
  pointCount: i.pointCount
377
382
  }), c.log.debug(`Data update: ${i.seriesId} (${i.mode}, ${i.pointCount} points)`));
378
383
  },
379
384
  onViewChange(c, i) {
380
- t && (u("viewChange", {
385
+ t && (d("viewChange", {
381
386
  trigger: i.trigger,
382
387
  bounds: i.current
383
388
  }), c.log.debug(`View change: ${i.trigger}`));
384
389
  },
385
390
  onInteraction(c, i) {
386
- s && u("interaction", {
391
+ o && d("interaction", {
387
392
  type: i.type,
388
393
  pixelX: i.pixelX,
389
394
  pixelY: i.pixelY,
@@ -391,147 +396,147 @@ const ge = {
391
396
  });
392
397
  },
393
398
  onSerialize(c) {
394
- return { entries: n };
399
+ return { entries: a };
395
400
  },
396
401
  onDeserialize(c, i) {
397
- const l = i;
398
- l != null && l.entries && (n.length = 0, n.push(...l.entries));
402
+ const s = i;
403
+ s != null && s.entries && (a.length = 0, a.push(...s.entries));
399
404
  },
400
405
  api: {
401
406
  getEntries() {
402
- return [...n];
407
+ return [...a];
403
408
  },
404
409
  clear() {
405
- n.length = 0;
410
+ a.length = 0;
406
411
  },
407
412
  export() {
408
- return JSON.stringify(n, null, 2);
413
+ return JSON.stringify(a, null, 2);
409
414
  }
410
415
  }
411
416
  };
412
417
  }
413
- ), we = {
418
+ ), Ie = {
414
419
  name: "direction-indicator",
415
420
  version: "1.0.0",
416
421
  description: "Shows an arrow indicating the direction and trend of streaming data",
417
422
  provides: ["visualization", "analysis"],
418
423
  tags: ["streaming", "direction", "trend", "arrow"]
419
- }, be = O(
420
- we,
421
- (r = {}) => {
424
+ }, Le = G(
425
+ Ie,
426
+ (n = {}) => {
422
427
  const {
423
428
  seriesId: e,
424
429
  sampleSize: t = 20,
425
- color: s,
426
- size: o = 40,
427
- minVelocity: n = 0.01,
428
- historySize: u = 20,
430
+ color: o,
431
+ size: r = 40,
432
+ minVelocity: a = 0.01,
433
+ historySize: d = 20,
429
434
  idleTimeout: c
430
- } = r;
431
- let i, l = null, f = null, y = null, b = null;
432
- const v = [], p = [], S = [];
433
- let C = u, g = null, m = Date.now(), d = -1 / 0, a = -1 / 0, P = c;
435
+ } = n;
436
+ let i, s = null, u = null, h = null, S = null;
437
+ const v = [], p = [], w = [];
438
+ let b = d, g = null, y = Date.now(), f = -1 / 0, l = -1 / 0, P = c;
434
439
  return {
435
- onInit(h) {
440
+ onInit(m) {
436
441
  i = "direction-indicator-overlay";
437
- const w = h.ui.createOverlay(i, {
442
+ const A = m.ui.createOverlay(i, {
438
443
  zIndex: 600,
439
444
  position: { top: "0", left: "0", right: "0", bottom: "0" },
440
445
  pointerEvents: !1
441
446
  });
442
- if (l = document.createElement("canvas"), l.style.cssText = "width: 100%; height: 100%; pointer-events: none;", w.appendChild(l), f = l.getContext("2d"), x(h), e)
443
- b = e;
447
+ if (s = document.createElement("canvas"), s.style.cssText = "width: 100%; height: 100%; pointer-events: none;", A.appendChild(s), u = s.getContext("2d"), x(m), e)
448
+ S = e;
444
449
  else {
445
- const T = h.data.getAllSeries();
446
- T.length > 0 && (b = T[0].getId());
450
+ const T = m.data.getAllSeries();
451
+ T.length > 0 && (S = T[0].getId());
447
452
  }
448
453
  },
449
- onDestroy(h) {
450
- h.ui.removeOverlay(i), g && clearTimeout(g), l = null, f = null, y = null;
454
+ onDestroy(m) {
455
+ m.ui.removeOverlay(i), g && clearTimeout(g), s = null, u = null, h = null;
451
456
  },
452
- onResize(h) {
453
- x(h);
457
+ onResize(m) {
458
+ x(m);
454
459
  },
455
- onAfterRender(h) {
456
- if (D(h), M(h), P) {
460
+ onAfterRender(m) {
461
+ if (D(m), M(m), P) {
457
462
  g && clearTimeout(g);
458
- const w = Date.now() - m;
459
- w < P && (g = setTimeout(() => {
460
- h.requestRender();
461
- }, P - w + 10));
463
+ const A = Date.now() - y;
464
+ A < P && (g = setTimeout(() => {
465
+ m.requestRender();
466
+ }, P - A + 10));
462
467
  }
463
468
  },
464
- onConfigChange(h, w) {
465
- if (w.historySize !== void 0) {
466
- for (C = w.historySize; v.length > C; ) v.shift();
467
- for (; p.length > C; ) p.shift();
468
- for (; S.length > C; ) S.shift();
469
+ onConfigChange(m, A) {
470
+ if (A.historySize !== void 0) {
471
+ for (b = A.historySize; v.length > b; ) v.shift();
472
+ for (; p.length > b; ) p.shift();
473
+ for (; w.length > b; ) w.shift();
469
474
  }
470
- w.idleTimeout !== void 0 && (P = w.idleTimeout);
475
+ A.idleTimeout !== void 0 && (P = A.idleTimeout);
471
476
  }
472
477
  };
473
- function x(h) {
474
- if (!l || !f) return;
475
- const w = h.render.canvasSize, T = h.render.pixelRatio;
476
- l.width = w.width * T, l.height = w.height * T, f.setTransform(1, 0, 0, 1, 0, 0), f.scale(T, T);
478
+ function x(m) {
479
+ if (!s || !u) return;
480
+ const A = m.render.canvasSize, T = m.render.pixelRatio;
481
+ s.width = A.width * T, s.height = A.height * T, u.setTransform(1, 0, 0, 1, 0, 0), u.scale(T, T);
477
482
  }
478
- function D(h) {
479
- if (!b || !h.data.getSeries(b)) return;
480
- const T = h.data.getSeriesData(b);
483
+ function D(m) {
484
+ if (!S || !m.data.getSeries(S)) return;
485
+ const T = m.data.getSeriesData(S);
481
486
  if (!T || !T.x || !T.y) return;
482
- const F = T.x.length;
483
- if (F < 2) return;
484
- const I = T.x[F - 1], R = T.y[F - 1];
485
- (I !== d || R !== a) && (d = I, a = R, m = Date.now());
486
- const E = Math.min(t, F), Y = F - E;
487
- let L = 0, X = 0, H = 0, V = 0, U = 0, K = 0;
488
- for (let $ = Y; $ < F; $++) {
489
- const B = $ - Y, le = T.x[$], ce = T.y[$], j = h.coords.dataToPixelX(le), J = h.coords.dataToPixelY(ce);
490
- L += B, X += j, H += J, V += B * j, U += B * J, K += B * B;
487
+ const I = T.x.length;
488
+ if (I < 2) return;
489
+ const F = T.x[I - 1], k = T.y[I - 1];
490
+ (F !== f || k !== l) && (f = F, l = k, y = Date.now());
491
+ const E = Math.min(t, I), X = I - E;
492
+ let L = 0, R = 0, U = 0, K = 0, j = 0, J = 0;
493
+ for (let W = X; W < I; W++) {
494
+ const z = W - X, me = T.x[W], ye = T.y[W], Q = m.coords.dataToPixelX(me), Z = m.coords.dataToPixelY(ye);
495
+ L += z, R += Q, U += Z, K += z * Q, j += z * Z, J += z * z;
491
496
  }
492
- const q = L / E, Z = X / E, ee = H / E, W = K - E * q * q;
493
- if (Math.abs(W) < 1e-10) return;
494
- const G = (V - E * q * Z) / W, N = (U - E * q * ee) / W, te = Math.atan2(N, G), ne = h.coords.dataToPixelX(I), ae = h.coords.dataToPixelY(R);
495
- v.push(ne), p.push(ae), v.length > C && (v.shift(), p.shift()), S.push(te), S.length > C && S.shift();
496
- const oe = A(v), re = A(p), ie = k(S), se = Math.sqrt(G * G + N * N);
497
- y = { angle: ie, magnitude: se, lastX: I, lastY: R, smoothX: oe, smoothY: re };
497
+ const $ = L / E, se = R / E, le = U / E, H = J - E * $ * $;
498
+ if (Math.abs(H) < 1e-10) return;
499
+ const q = (K - E * $ * se) / H, N = (j - E * $ * le) / H, ce = Math.atan2(N, q), de = m.coords.dataToPixelX(F), ue = m.coords.dataToPixelY(k);
500
+ v.push(de), p.push(ue), v.length > b && (v.shift(), p.shift()), w.push(ce), w.length > b && w.shift();
501
+ const fe = C(v), ge = C(p), pe = B(w), he = Math.sqrt(q * q + N * N);
502
+ h = { angle: pe, magnitude: he, lastX: F, lastY: k, smoothX: fe, smoothY: ge };
498
503
  }
499
- function A(h) {
500
- return h.length === 0 ? 0 : h.reduce((w, T) => w + T, 0) / h.length;
504
+ function C(m) {
505
+ return m.length === 0 ? 0 : m.reduce((A, T) => A + T, 0) / m.length;
501
506
  }
502
- function k(h) {
503
- if (h.length === 0) return 0;
504
- let w = 0, T = 0;
505
- for (const F of h)
506
- w += Math.cos(F), T += Math.sin(F);
507
- return Math.atan2(T / h.length, w / h.length);
507
+ function B(m) {
508
+ if (m.length === 0) return 0;
509
+ let A = 0, T = 0;
510
+ for (const I of m)
511
+ A += Math.cos(I), T += Math.sin(I);
512
+ return Math.atan2(T / m.length, A / m.length);
508
513
  }
509
- function M(h) {
510
- if (!f || !l || !y) return;
511
- const { width: w, height: T } = h.render.canvasSize;
512
- if (f.clearRect(0, 0, w, T), P !== void 0 && Date.now() - m > P || y.magnitude < n) return;
513
- const F = y.smoothX, I = y.smoothY, R = s || "#FF9800";
514
- f.save(), z(f, F, I, y.angle, o, R), f.restore();
514
+ function M(m) {
515
+ if (!u || !s || !h) return;
516
+ const { width: A, height: T } = m.render.canvasSize;
517
+ if (u.clearRect(0, 0, A, T), P !== void 0 && Date.now() - y > P || h.magnitude < a) return;
518
+ const I = h.smoothX, F = h.smoothY, k = o || "#FF9800";
519
+ u.save(), _(u, I, F, h.angle, r, k), u.restore();
515
520
  }
516
- function z(h, w, T, F, I, R) {
517
- const E = I * 0.6, Y = I * 0.4;
518
- h.save(), h.translate(w, T), h.rotate(F), h.fillStyle = R, h.beginPath(), h.moveTo(E / 2, 0), h.lineTo(-E / 2, -Y / 2), h.lineTo(-E / 2, Y / 2), h.closePath(), h.fill(), h.restore();
521
+ function _(m, A, T, I, F, k) {
522
+ const E = F * 0.6, X = F * 0.4;
523
+ m.save(), m.translate(A, T), m.rotate(I), m.fillStyle = k, m.beginPath(), m.moveTo(E / 2, 0), m.lineTo(-E / 2, -X / 2), m.lineTo(-E / 2, X / 2), m.closePath(), m.fill(), m.restore();
519
524
  }
520
525
  }
521
- ), Le = {
522
- Crosshair: pe,
523
- Statistics: me,
524
- Watermark: xe,
525
- GridHighlight: Pe,
526
- DataLogger: Te,
527
- DirectionIndicator: be
528
- }, Ce = {
526
+ ), tt = {
527
+ Crosshair: Se,
528
+ Statistics: be,
529
+ Watermark: Me,
530
+ GridHighlight: Fe,
531
+ DataLogger: Ee,
532
+ DirectionIndicator: Le
533
+ }, ke = {
529
534
  name: "velo-plot-drag-edit",
530
535
  version: "1.0.0",
531
536
  description: "Interactive drag & drop editing of data points",
532
537
  provides: ["drag-edit", "point-editing"],
533
538
  tags: ["interaction", "editing", "ux"]
534
- }, Me = {
539
+ }, Re = {
535
540
  enabled: !0,
536
541
  constraint: "both",
537
542
  snapToGrid: !1,
@@ -556,89 +561,89 @@ const ge = {
556
561
  opacity: 0.5
557
562
  }
558
563
  };
559
- function Re(r = {}) {
560
- const e = { ...Me, ...r };
561
- let t = null, s = !1, o = null, n = 0, u = 0, c = !1;
562
- function i(g, m) {
564
+ function nt(n = {}) {
565
+ const e = { ...Re, ...n };
566
+ let t = null, o = !1, r = null, a = 0, d = 0, c = !1;
567
+ function i(g, y) {
563
568
  if (!t) return null;
564
- const d = t.coords.pickPoint(g, m, e.hitRadius);
565
- return !d || e.editableSeries.length > 0 && !e.editableSeries.includes(d.seriesId) ? null : {
566
- seriesId: d.seriesId,
567
- index: d.index,
568
- originalX: d.x,
569
- originalY: d.y,
570
- currentX: d.x,
571
- currentY: d.y
569
+ const f = t.coords.pickPoint(g, y, e.hitRadius);
570
+ return !f || e.editableSeries.length > 0 && !e.editableSeries.includes(f.seriesId) ? null : {
571
+ seriesId: f.seriesId,
572
+ index: f.index,
573
+ originalX: f.x,
574
+ originalY: f.y,
575
+ currentX: f.x,
576
+ currentY: f.y
572
577
  };
573
578
  }
574
- function l(g, m) {
579
+ function s(g, y) {
575
580
  return t ? {
576
581
  x: t.coords.pixelToDataX(g),
577
- y: t.coords.pixelToDataY(m)
582
+ y: t.coords.pixelToDataY(y)
578
583
  } : { x: 0, y: 0 };
579
584
  }
580
- function f(g, m) {
581
- return Math.round(g / m) * m;
585
+ function u(g, y) {
586
+ return Math.round(g / y) * y;
582
587
  }
583
- function y(g, m, d) {
584
- if (!o) return { x: g, y: m };
585
- switch (d) {
588
+ function h(g, y, f) {
589
+ if (!r) return { x: g, y };
590
+ switch (f) {
586
591
  case "x":
587
- return { x: g, y: o.originalY };
592
+ return { x: g, y: r.originalY };
588
593
  case "y":
589
- return { x: o.originalX, y: m };
594
+ return { x: r.originalX, y };
590
595
  case "none":
591
- return { x: o.originalX, y: o.originalY };
596
+ return { x: r.originalX, y: r.originalY };
592
597
  default:
593
- return { x: g, y: m };
598
+ return { x: g, y };
594
599
  }
595
600
  }
596
- function b(g, m) {
597
- let d = g, a = m;
598
- if (e.snapToGrid && (d = f(g, e.snapIntervalX), a = f(m, e.snapIntervalY)), o && e.validator) {
599
- const P = { ...o, currentX: d, currentY: a }, x = e.validator(P);
601
+ function S(g, y) {
602
+ let f = g, l = y;
603
+ if (e.snapToGrid && (f = u(g, e.snapIntervalX), l = u(y, e.snapIntervalY)), r && e.validator) {
604
+ const P = { ...r, currentX: f, currentY: l }, x = e.validator(P);
600
605
  if (typeof x == "boolean")
601
- return { x: d, y: a, valid: x };
606
+ return { x: f, y: l, valid: x };
602
607
  if (!x.valid)
603
- return { x: d, y: a, valid: !1 };
604
- x.snapX !== void 0 && (d = x.snapX), x.snapY !== void 0 && (a = x.snapY);
608
+ return { x: f, y: l, valid: !1 };
609
+ x.snapX !== void 0 && (f = x.snapX), x.snapY !== void 0 && (l = x.snapY);
605
610
  }
606
- return { x: d, y: a, valid: !0 };
611
+ return { x: f, y: l, valid: !0 };
607
612
  }
608
- function v(g, m, d, a) {
609
- var D, A, k;
613
+ function v(g, y, f, l) {
614
+ var D, C, B;
610
615
  if (!t) return;
611
- const P = (A = (D = t.chart).getSeries) == null ? void 0 : A.call(D, g);
616
+ const P = (C = (D = t.chart).getSeries) == null ? void 0 : C.call(D, g);
612
617
  if (!P) return;
613
618
  const x = P.getData();
614
- !x || !x.x || !x.y || (x.x[m] = d, x.y[m] = a, (k = P.invalidateBuffers) == null || k.call(P), t.requestRender());
619
+ !x || !x.x || !x.y || (x.x[y] = f, x.y[y] = l, (B = P.invalidateBuffers) == null || B.call(P), t.requestRender());
615
620
  }
616
621
  function p() {
617
- return o ? {
618
- seriesId: o.seriesId,
619
- index: o.index,
620
- oldX: o.originalX,
621
- oldY: o.originalY,
622
- newX: o.currentX,
623
- newY: o.currentY,
624
- deltaX: o.currentX - o.originalX,
625
- deltaY: o.currentY - o.originalY
622
+ return r ? {
623
+ seriesId: r.seriesId,
624
+ index: r.index,
625
+ oldX: r.originalX,
626
+ oldY: r.originalY,
627
+ newX: r.currentX,
628
+ newY: r.currentY,
629
+ deltaX: r.currentX - r.originalX,
630
+ deltaY: r.currentY - r.originalY
626
631
  } : null;
627
632
  }
628
- function S(g) {
629
- if (!s || !o || !e.showPreview) return;
630
- const { render: m, coords: d } = g, { ctx2d: a } = m;
631
- if (!a) return;
632
- a.save();
633
- const P = d.dataToPixelX(o.originalX), x = d.dataToPixelY(o.originalY), D = d.dataToPixelX(o.currentX), A = d.dataToPixelY(o.currentY);
634
- a.strokeStyle = e.previewStyle.color || "#ffffff", a.lineWidth = e.previewStyle.width || 2, a.globalAlpha = e.previewStyle.opacity || 0.5, a.setLineDash(e.previewStyle.dash || [5, 5]), a.beginPath(), a.moveTo(P, x), a.lineTo(D, A), a.stroke(), a.globalAlpha = 1, a.fillStyle = e.highlightColor, a.setLineDash([]), a.beginPath(), a.arc(D, A, 6, 0, Math.PI * 2), a.fill(), a.strokeStyle = "#000000", a.lineWidth = 1, a.stroke(), a.restore();
633
+ function w(g) {
634
+ if (!o || !r || !e.showPreview) return;
635
+ const { render: y, coords: f } = g, { ctx2d: l } = y;
636
+ if (!l) return;
637
+ l.save();
638
+ const P = f.dataToPixelX(r.originalX), x = f.dataToPixelY(r.originalY), D = f.dataToPixelX(r.currentX), C = f.dataToPixelY(r.currentY);
639
+ l.strokeStyle = e.previewStyle.color || "#ffffff", l.lineWidth = e.previewStyle.width || 2, l.globalAlpha = e.previewStyle.opacity || 0.5, l.setLineDash(e.previewStyle.dash || [5, 5]), l.beginPath(), l.moveTo(P, x), l.lineTo(D, C), l.stroke(), l.globalAlpha = 1, l.fillStyle = e.highlightColor, l.setLineDash([]), l.beginPath(), l.arc(D, C, 6, 0, Math.PI * 2), l.fill(), l.strokeStyle = "#000000", l.lineWidth = 1, l.stroke(), l.restore();
635
640
  }
636
- const C = {
641
+ const b = {
637
642
  enable() {
638
643
  e.enabled = !0;
639
644
  },
640
645
  disable() {
641
- e.enabled = !1, s && (o = null, s = !1, c = !1, t == null || t.requestRender());
646
+ e.enabled = !1, o && (r = null, o = !1, c = !1, t == null || t.requestRender());
642
647
  },
643
648
  isEnabled() {
644
649
  return e.enabled;
@@ -647,73 +652,363 @@ function Re(r = {}) {
647
652
  e.editableSeries = g;
648
653
  },
649
654
  getDraggedPoint() {
650
- return o;
655
+ return r;
651
656
  },
652
657
  cancelDrag() {
653
- s && o && (o = null, s = !1, c = !1, t == null || t.requestRender());
658
+ o && r && (r = null, o = !1, c = !1, t == null || t.requestRender());
654
659
  },
655
660
  updateConfig(g) {
656
661
  Object.assign(e, g);
657
662
  }
658
663
  };
659
664
  return {
660
- manifest: Ce,
665
+ manifest: ke,
661
666
  onInit(g) {
662
- t = g, t.chart.dragEdit = C;
667
+ t = g, t.chart.dragEdit = b;
663
668
  },
664
669
  onDestroy(g) {
665
670
  delete g.chart.dragEdit, t = null;
666
671
  },
667
- onInteraction(g, m) {
672
+ onInteraction(g, y) {
668
673
  if (e.enabled) {
669
- if (m.type === "mousedown") {
670
- const d = i(m.pixelX, m.pixelY);
671
- d && (o = d, n = m.pixelX, u = m.pixelY, c = !1, s = !1, m.preventDefault());
672
- } else if (m.type === "mousemove") {
673
- if (!o) return;
674
- if (!s) {
675
- const A = m.pixelX - n, k = m.pixelY - u;
676
- if (Math.sqrt(A * A + k * k) > e.dragThreshold) {
677
- s = !0, c = !0;
678
- const z = p();
679
- z && e.onDragStart(z);
674
+ if (y.type === "mousedown") {
675
+ const f = i(y.pixelX, y.pixelY);
676
+ f && (r = f, a = y.pixelX, d = y.pixelY, c = !1, o = !1, y.preventDefault());
677
+ } else if (y.type === "mousemove") {
678
+ if (!r) return;
679
+ if (!o) {
680
+ const C = y.pixelX - a, B = y.pixelY - d;
681
+ if (Math.sqrt(C * C + B * B) > e.dragThreshold) {
682
+ o = !0, c = !0;
683
+ const _ = p();
684
+ _ && e.onDragStart(_);
680
685
  } else
681
686
  return;
682
687
  }
683
- s && m.preventDefault();
684
- let { x: d, y: a } = l(m.pixelX, m.pixelY);
685
- ({ x: d, y: a } = y(d, a, e.constraint));
686
- const { x: P, y: x, valid: D } = b(d, a);
688
+ o && y.preventDefault();
689
+ let { x: f, y: l } = s(y.pixelX, y.pixelY);
690
+ ({ x: f, y: l } = h(f, l, e.constraint));
691
+ const { x: P, y: x, valid: D } = S(f, l);
687
692
  if (D) {
688
- o.currentX = P, o.currentY = x;
689
- const A = p();
690
- A && e.onDrag(A), t == null || t.requestRender();
693
+ r.currentX = P, r.currentY = x;
694
+ const C = p();
695
+ C && e.onDrag(C), t == null || t.requestRender();
691
696
  }
692
- } else if (m.type === "mouseup") {
693
- if (!o) return;
694
- if (s && c) {
697
+ } else if (y.type === "mouseup") {
698
+ if (!r) return;
699
+ if (o && c) {
695
700
  v(
696
- o.seriesId,
697
- o.index,
698
- o.currentX,
699
- o.currentY
701
+ r.seriesId,
702
+ r.index,
703
+ r.currentX,
704
+ r.currentY
700
705
  );
701
- const d = p();
702
- d && e.onDragEnd(d), m.preventDefault();
706
+ const f = p();
707
+ f && e.onDragEnd(f), y.preventDefault();
703
708
  }
704
- o = null, s = !1, c = !1, t == null || t.requestRender();
709
+ r = null, o = !1, c = !1, t == null || t.requestRender();
705
710
  }
706
711
  }
707
712
  },
708
713
  onRenderOverlay(g) {
709
- S(g);
714
+ w(g);
710
715
  },
711
- api: C
716
+ api: b
717
+ };
718
+ }
719
+ const Xe = `
720
+ attribute vec2 aPosition;
721
+ uniform vec2 uResolution;
722
+ void main() {
723
+ vec2 clip = (aPosition / uResolution) * 2.0 - 1.0;
724
+ gl_Position = vec4(clip.x, -clip.y, 0.0, 1.0);
725
+ }
726
+ `, Ye = `
727
+ precision mediump float;
728
+ uniform vec4 uColor;
729
+ void main() {
730
+ gl_FragColor = uColor;
731
+ }
732
+ `;
733
+ function ne(n, e, t) {
734
+ const o = n.createShader(e);
735
+ if (!o) throw new Error("createShader failed");
736
+ if (n.shaderSource(o, t), n.compileShader(o), !n.getShaderParameter(o, n.COMPILE_STATUS))
737
+ throw new Error(n.getShaderInfoLog(o) ?? "shader compile failed");
738
+ return o;
739
+ }
740
+ function Be(n) {
741
+ const e = ne(n, n.VERTEX_SHADER, Xe), t = ne(n, n.FRAGMENT_SHADER, Ye), o = n.createProgram();
742
+ if (!o) throw new Error("createProgram failed");
743
+ if (n.attachShader(o, e), n.attachShader(o, t), n.linkProgram(o), !n.getProgramParameter(o, n.LINK_STATUS))
744
+ throw new Error(n.getProgramInfoLog(o) ?? "program link failed");
745
+ return n.deleteShader(e), n.deleteShader(t), o;
746
+ }
747
+ function _e(n) {
748
+ const { plotArea: e, xLines: t, yLines: o } = n, r = e.y, a = e.y + e.height, d = e.x, c = e.x + e.width, i = (t.length + o.length) * 2, s = new Float32Array(i * 2);
749
+ let u = 0;
750
+ for (const h of t)
751
+ s[u++] = h, s[u++] = r, s[u++] = h, s[u++] = a;
752
+ for (const h of o)
753
+ s[u++] = d, s[u++] = h, s[u++] = c, s[u++] = h;
754
+ return s;
755
+ }
756
+ class Ge {
757
+ constructor(e) {
758
+ Y(this, "gl");
759
+ Y(this, "program");
760
+ Y(this, "buffer");
761
+ Y(this, "aPosition");
762
+ Y(this, "uResolution");
763
+ Y(this, "uColor");
764
+ const t = e.getContext("webgl", {
765
+ alpha: !0,
766
+ antialias: !1,
767
+ preserveDrawingBuffer: !0
768
+ });
769
+ if (!t) throw new Error("WebGL not available for grid spike");
770
+ this.gl = t, this.program = Be(t), this.aPosition = t.getAttribLocation(this.program, "aPosition"), this.uResolution = t.getUniformLocation(this.program, "uResolution"), this.uColor = t.getUniformLocation(this.program, "uColor");
771
+ const o = t.createBuffer();
772
+ if (!o) throw new Error("createBuffer failed");
773
+ this.buffer = o;
774
+ }
775
+ /** Upload vertices and draw grid lines */
776
+ draw(e) {
777
+ const t = this.gl, o = _e(e), r = o.length / 4;
778
+ t.viewport(0, 0, e.width, e.height), t.clearColor(0.04, 0.05, 0.08, 1), t.clear(t.COLOR_BUFFER_BIT), t.useProgram(this.program), t.bindBuffer(t.ARRAY_BUFFER, this.buffer), t.bufferData(t.ARRAY_BUFFER, o, t.DYNAMIC_DRAW), t.enableVertexAttribArray(this.aPosition), t.vertexAttribPointer(this.aPosition, 2, t.FLOAT, !1, 0, 0), t.uniform2f(this.uResolution, e.width, e.height);
779
+ const a = e.color ?? [0.2, 0.22, 0.3, 0.6];
780
+ return t.uniform4f(this.uColor, a[0], a[1], a[2], a[3]), t.lineWidth(e.lineWidth ?? 1), t.drawArrays(t.LINES, 0, o.length / 2), r;
781
+ }
782
+ destroy() {
783
+ const e = this.gl;
784
+ e.deleteBuffer(this.buffer), e.deleteProgram(this.program);
785
+ }
786
+ }
787
+ function We(n) {
788
+ const e = () => {
789
+ };
790
+ return {
791
+ canvas: n,
792
+ strokeStyle: "",
793
+ fillStyle: "",
794
+ lineWidth: 1,
795
+ font: "",
796
+ textAlign: "left",
797
+ textBaseline: "alphabetic",
798
+ beginPath: e,
799
+ moveTo: e,
800
+ lineTo: e,
801
+ stroke: e,
802
+ fill: e,
803
+ clearRect: e,
804
+ setTransform: e,
805
+ setLineDash: e,
806
+ save: e,
807
+ restore: e,
808
+ translate: e,
809
+ rotate: e,
810
+ fillText: e,
811
+ measureText: (t) => ({ width: t.length * 7 })
812
+ };
813
+ }
814
+ function ze(n, e) {
815
+ const t = document.createElement("canvas");
816
+ return t.width = n, t.height = e, t.getContext("2d") ?? We(t);
817
+ }
818
+ function oe(n, e) {
819
+ const t = { top: 40, right: 40, bottom: 50, left: 60 };
820
+ return {
821
+ x: t.left,
822
+ y: t.top,
823
+ width: n - t.left - t.right,
824
+ height: e - t.top - t.bottom
825
+ };
826
+ }
827
+ function re(n, e, t, o, r) {
828
+ const a = e.ticks(o).map((c) => te(e.transform(c))), d = t.ticks(r).map((c) => te(t.transform(c)));
829
+ return { xLines: a, yLines: d };
830
+ }
831
+ function ie(n, e) {
832
+ const t = [];
833
+ for (let a = 0; a < e; a++) {
834
+ const d = performance.now();
835
+ n(), t.push((performance.now() - d) * 1e3);
836
+ }
837
+ t.sort((a, d) => a - d);
838
+ const o = t.reduce((a, d) => a + d, 0) / t.length, r = t[Math.floor(t.length * 0.95)] ?? o;
839
+ return { avg: o, p95: r };
840
+ }
841
+ function Ue(n = {}) {
842
+ const e = Math.round((n.width ?? 1920) * (n.dpr ?? 1)), t = Math.round((n.height ?? 1080) * (n.dpr ?? 1)), o = n.xTickCount ?? 24, r = n.yTickCount ?? 16, a = n.frames ?? 120, d = ze(e, t), c = {
843
+ ...ee,
844
+ grid: {
845
+ ...ee.grid,
846
+ visible: !0,
847
+ showMinor: n.showMinor ?? !0
848
+ }
849
+ }, i = oe(e, t), s = new O(), u = new O();
850
+ s.setDomain(0, 1e6), u.setDomain(-1, 1), s.setRange(i.x, i.x + i.width), u.setRange(i.y + i.height, i.y);
851
+ const h = new Pe(d, c), { avg: S, p95: v } = ie(() => {
852
+ d.clearRect(0, 0, e, t), h.drawGrid(i, s, u, { tickCount: o }, { tickCount: r });
853
+ }, a), { xLines: p, yLines: w } = re(i, s, u, o, r);
854
+ return {
855
+ backend: "canvas2d",
856
+ dpr: n.dpr ?? 1,
857
+ width: e,
858
+ height: t,
859
+ xTicks: o,
860
+ yTicks: r,
861
+ lineSegments: p.length + w.length,
862
+ avgFrameUs: Math.round(S),
863
+ p95FrameUs: Math.round(v),
864
+ frames: a
865
+ };
866
+ }
867
+ function $e(n = {}) {
868
+ const e = Math.round((n.width ?? 1920) * (n.dpr ?? 1)), t = Math.round((n.height ?? 1080) * (n.dpr ?? 1)), o = n.xTickCount ?? 24, r = n.yTickCount ?? 16, a = n.frames ?? 120, d = document.createElement("canvas");
869
+ d.width = e, d.height = t;
870
+ let c;
871
+ try {
872
+ c = new Ge(d);
873
+ } catch {
874
+ return null;
875
+ }
876
+ const i = oe(e, t), s = new O(), u = new O();
877
+ s.setDomain(0, 1e6), u.setDomain(-1, 1), s.setRange(i.x, i.x + i.width), u.setRange(i.y + i.height, i.y);
878
+ const { xLines: h, yLines: S } = re(i, s, u, o, r), v = { plotArea: i, xLines: h, yLines: S, width: e, height: t };
879
+ let p = 0;
880
+ const { avg: w, p95: b } = ie(() => {
881
+ p = c.draw(v);
882
+ }, a);
883
+ return c.destroy(), {
884
+ backend: "webgl",
885
+ dpr: n.dpr ?? 1,
886
+ width: e,
887
+ height: t,
888
+ xTicks: o,
889
+ yTicks: r,
890
+ lineSegments: p,
891
+ avgFrameUs: Math.round(w),
892
+ p95FrameUs: Math.round(b),
893
+ frames: a
712
894
  };
713
895
  }
714
- class Ae {
896
+ function at(n) {
897
+ const e = (n == null ? void 0 : n.dpr) ?? 2, t = (n == null ? void 0 : n.frames) ?? 120, o = Ue({ dpr: e, frames: t, showMinor: !0 }), r = $e({ dpr: e, frames: t });
898
+ if (!r)
899
+ return {
900
+ canvas2d: o,
901
+ webgl: null,
902
+ gainPercent: 0,
903
+ recommendation: "defer"
904
+ };
905
+ const a = (o.avgFrameUs - r.avgFrameUs) / o.avgFrameUs * 100;
906
+ return {
907
+ canvas2d: o,
908
+ webgl: r,
909
+ gainPercent: Math.round(a * 10) / 10,
910
+ recommendation: a >= 20 ? "implement" : "defer"
911
+ };
912
+ }
913
+ const Oe = "1.17.0", He = "2026-07-05", qe = "Stage 1 baselines. Headless CI uses effective FPS (render throughput when rAF throttled) via scripts/benchmark-scenario-eval.mjs smoke floors.", Ne = 0.1, Ve = 0.95, Ke = {
914
+ "line-1m-pan": {
915
+ minAvgFps: 50,
916
+ maxAvgFrameTimeMs: 20,
917
+ points: 1e6,
918
+ description: "1M line points, continuous pan/zoom simulation"
919
+ },
920
+ "candlestick-500k": {
921
+ minAvgFps: 45,
922
+ maxAvgFrameTimeMs: 22,
923
+ points: 5e5,
924
+ description: "500k OHLC bars with PluginVirtualization"
925
+ },
926
+ "stack-5pane-resize": {
927
+ minAvgFps: 48,
928
+ maxAvgFrameTimeMs: 21,
929
+ description: "5-pane stack divider drag (batched overlay redraw)"
930
+ },
931
+ "line-200k-webgl": {
932
+ minAvgFps: 45,
933
+ description: "200k line WebGL baseline for renderer compare"
934
+ },
935
+ "line-200k-webgpu": {
936
+ minAvgFps: 42,
937
+ description: "200k line WebGPU — target ≥95% of WebGL FPS"
938
+ },
939
+ "boxplot-5k-webgpu": {
940
+ minAvgFps: 50,
941
+ description: "5k boxplot series on WebGPU chart path"
942
+ },
943
+ "grid-canvas2d-dpr2": {
944
+ maxAvgFrameUs: 1200,
945
+ dpr: 2,
946
+ description: "Canvas 2D grid+minor at 1920×1080 @2x"
947
+ },
948
+ "grid-webgl-dpr2": {
949
+ maxAvgFrameUs: 400,
950
+ dpr: 2,
951
+ description: "WebGL grid spike lines only @2x"
952
+ }
953
+ }, V = {
954
+ version: Oe,
955
+ recordedAt: He,
956
+ notes: qe,
957
+ regressionThreshold: Ne,
958
+ webgpuMinFpsRatio: Ve,
959
+ scenarios: Ke
960
+ };
961
+ function ot() {
962
+ return V;
963
+ }
964
+ function rt(n, e) {
965
+ const t = V.scenarios[n];
966
+ if (!t)
967
+ return { passed: !0, failures: [] };
968
+ const o = [], r = V.regressionThreshold ?? 0.1;
969
+ if ("avgFps" in e && t.minAvgFps !== void 0) {
970
+ const a = t.minAvgFps * (1 - r);
971
+ e.avgFps < a && o.push(
972
+ `FPS ${e.avgFps} < baseline min ${t.minAvgFps} (allowed ${a.toFixed(1)} with ${r * 100}% slack)`
973
+ );
974
+ }
975
+ if ("avgFrameTime" in e && t.maxAvgFrameTimeMs !== void 0) {
976
+ const a = t.maxAvgFrameTimeMs * (1 + r);
977
+ e.avgFrameTime > a && o.push(
978
+ `Frame time ${e.avgFrameTime}ms > baseline max ${t.maxAvgFrameTimeMs}ms`
979
+ );
980
+ }
981
+ if ("avgFrameUs" in e && t.maxAvgFrameUs !== void 0) {
982
+ const a = t.maxAvgFrameUs * (1 + r);
983
+ e.avgFrameUs > a && o.push(
984
+ `Grid frame ${e.avgFrameUs}µs > baseline max ${t.maxAvgFrameUs}µs`
985
+ );
986
+ }
987
+ return { passed: o.length === 0, failures: o };
988
+ }
989
+ function it(n, e, t, o = 0.95) {
990
+ if (!t || !e)
991
+ return {
992
+ webgl: n,
993
+ webgpu: e,
994
+ webgpuActive: !1,
995
+ fpsRatio: 0,
996
+ meetsTarget: !1,
997
+ recommendation: "webgpu-unavailable"
998
+ };
999
+ const r = n.avgFps > 0 ? e.avgFps / n.avgFps : 0, a = r >= o;
1000
+ return {
1001
+ webgl: n,
1002
+ webgpu: e,
1003
+ webgpuActive: !0,
1004
+ fpsRatio: r,
1005
+ meetsTarget: a,
1006
+ recommendation: a ? "webgpu-ready" : "webgl-faster"
1007
+ };
1008
+ }
1009
+ class je {
715
1010
  constructor(e) {
716
- _(this, "seed");
1011
+ Y(this, "seed");
717
1012
  this.seed = e;
718
1013
  }
719
1014
  next() {
@@ -724,7 +1019,7 @@ class Ae {
724
1019
  return e + this.next() * (t - e);
725
1020
  }
726
1021
  }
727
- function Xe(r) {
1022
+ function st(n) {
728
1023
  const e = {
729
1024
  pointCount: 1e3,
730
1025
  amplitude: 1,
@@ -734,16 +1029,16 @@ function Xe(r) {
734
1029
  xStart: 0,
735
1030
  xEnd: 10,
736
1031
  offset: 0,
737
- ...r
738
- }, t = new Float32Array(e.pointCount), s = new Float32Array(e.pointCount), o = (e.xEnd - e.xStart) / (e.pointCount - 1);
739
- for (let n = 0; n < e.pointCount; n++) {
740
- t[n] = e.xStart + n * o;
741
- const u = e.amplitude * Math.sin(2 * Math.PI * e.frequency * t[n] + e.phase), c = e.noise > 0 ? (Math.random() - 0.5) * 2 * e.noise : 0;
742
- s[n] = u + c + e.offset;
1032
+ ...n
1033
+ }, t = new Float32Array(e.pointCount), o = new Float32Array(e.pointCount), r = (e.xEnd - e.xStart) / (e.pointCount - 1);
1034
+ for (let a = 0; a < e.pointCount; a++) {
1035
+ t[a] = e.xStart + a * r;
1036
+ const d = e.amplitude * Math.sin(2 * Math.PI * e.frequency * t[a] + e.phase), c = e.noise > 0 ? (Math.random() - 0.5) * 2 * e.noise : 0;
1037
+ o[a] = d + c + e.offset;
743
1038
  }
744
- return { x: t, y: s };
1039
+ return { x: t, y: o };
745
1040
  }
746
- function Ye(r) {
1041
+ function lt(n) {
747
1042
  const e = {
748
1043
  pointCount: 1e3,
749
1044
  amplitude: 1,
@@ -753,16 +1048,16 @@ function Ye(r) {
753
1048
  xStart: 0,
754
1049
  xEnd: 10,
755
1050
  offset: 0,
756
- ...r
757
- }, t = new Float32Array(e.pointCount), s = new Float32Array(e.pointCount), o = (e.xEnd - e.xStart) / (e.pointCount - 1);
758
- for (let n = 0; n < e.pointCount; n++) {
759
- t[n] = e.xStart + n * o;
760
- const u = t[n] * e.frequency + e.phase / (2 * Math.PI), c = Math.sign(Math.sin(2 * Math.PI * u)) * e.amplitude, i = e.noise > 0 ? (Math.random() - 0.5) * 2 * e.noise : 0;
761
- s[n] = c + i + e.offset;
1051
+ ...n
1052
+ }, t = new Float32Array(e.pointCount), o = new Float32Array(e.pointCount), r = (e.xEnd - e.xStart) / (e.pointCount - 1);
1053
+ for (let a = 0; a < e.pointCount; a++) {
1054
+ t[a] = e.xStart + a * r;
1055
+ const d = t[a] * e.frequency + e.phase / (2 * Math.PI), c = Math.sign(Math.sin(2 * Math.PI * d)) * e.amplitude, i = e.noise > 0 ? (Math.random() - 0.5) * 2 * e.noise : 0;
1056
+ o[a] = c + i + e.offset;
762
1057
  }
763
- return { x: t, y: s };
1058
+ return { x: t, y: o };
764
1059
  }
765
- function ke(r) {
1060
+ function ct(n) {
766
1061
  const e = {
767
1062
  pointCount: 1e3,
768
1063
  amplitude: 1,
@@ -772,16 +1067,16 @@ function ke(r) {
772
1067
  xStart: 0,
773
1068
  xEnd: 10,
774
1069
  offset: 0,
775
- ...r
776
- }, t = new Float32Array(e.pointCount), s = new Float32Array(e.pointCount), o = (e.xEnd - e.xStart) / (e.pointCount - 1);
777
- for (let n = 0; n < e.pointCount; n++) {
778
- t[n] = e.xStart + n * o;
779
- const u = t[n] * e.frequency + e.phase / (2 * Math.PI), c = e.amplitude * 2 * (u - Math.floor(u + 0.5)), i = e.noise > 0 ? (Math.random() - 0.5) * 2 * e.noise : 0;
780
- s[n] = c + i + e.offset;
1070
+ ...n
1071
+ }, t = new Float32Array(e.pointCount), o = new Float32Array(e.pointCount), r = (e.xEnd - e.xStart) / (e.pointCount - 1);
1072
+ for (let a = 0; a < e.pointCount; a++) {
1073
+ t[a] = e.xStart + a * r;
1074
+ const d = t[a] * e.frequency + e.phase / (2 * Math.PI), c = e.amplitude * 2 * (d - Math.floor(d + 0.5)), i = e.noise > 0 ? (Math.random() - 0.5) * 2 * e.noise : 0;
1075
+ o[a] = c + i + e.offset;
781
1076
  }
782
- return { x: t, y: s };
1077
+ return { x: t, y: o };
783
1078
  }
784
- function ze(r) {
1079
+ function dt(n) {
785
1080
  const e = {
786
1081
  pointCount: 1e3,
787
1082
  amplitude: 1,
@@ -791,37 +1086,37 @@ function ze(r) {
791
1086
  xStart: 0,
792
1087
  xEnd: 10,
793
1088
  offset: 0,
794
- ...r
795
- }, t = new Float32Array(e.pointCount), s = new Float32Array(e.pointCount), o = (e.xEnd - e.xStart) / (e.pointCount - 1);
796
- for (let n = 0; n < e.pointCount; n++) {
797
- t[n] = e.xStart + n * o;
798
- const u = t[n] * e.frequency + e.phase / (2 * Math.PI), c = e.amplitude * 2 * Math.abs(2 * (u - Math.floor(u + 0.5))) - e.amplitude, i = e.noise > 0 ? (Math.random() - 0.5) * 2 * e.noise : 0;
799
- s[n] = c + i + e.offset;
1089
+ ...n
1090
+ }, t = new Float32Array(e.pointCount), o = new Float32Array(e.pointCount), r = (e.xEnd - e.xStart) / (e.pointCount - 1);
1091
+ for (let a = 0; a < e.pointCount; a++) {
1092
+ t[a] = e.xStart + a * r;
1093
+ const d = t[a] * e.frequency + e.phase / (2 * Math.PI), c = e.amplitude * 2 * Math.abs(2 * (d - Math.floor(d + 0.5))) - e.amplitude, i = e.noise > 0 ? (Math.random() - 0.5) * 2 * e.noise : 0;
1094
+ o[a] = c + i + e.offset;
800
1095
  }
801
- return { x: t, y: s };
1096
+ return { x: t, y: o };
802
1097
  }
803
- function _e(r) {
1098
+ function ut(n) {
804
1099
  const e = {
805
1100
  pointCount: 1e3,
806
1101
  xRange: [0, 100],
807
1102
  yRange: [-1, 1],
808
1103
  sorted: !0,
809
1104
  seed: Date.now(),
810
- ...r
811
- }, t = new Ae(e.seed), s = new Float32Array(e.pointCount), o = new Float32Array(e.pointCount);
812
- for (let n = 0; n < e.pointCount; n++)
813
- s[n] = t.nextRange(e.xRange[0], e.xRange[1]), o[n] = t.nextRange(e.yRange[0], e.yRange[1]);
1105
+ ...n
1106
+ }, t = new je(e.seed), o = new Float32Array(e.pointCount), r = new Float32Array(e.pointCount);
1107
+ for (let a = 0; a < e.pointCount; a++)
1108
+ o[a] = t.nextRange(e.xRange[0], e.xRange[1]), r[a] = t.nextRange(e.yRange[0], e.yRange[1]);
814
1109
  if (e.sorted) {
815
- const n = Array.from({ length: e.pointCount }, (i, l) => l);
816
- n.sort((i, l) => s[i] - s[l]);
817
- const u = new Float32Array(e.pointCount), c = new Float32Array(e.pointCount);
1110
+ const a = Array.from({ length: e.pointCount }, (i, s) => s);
1111
+ a.sort((i, s) => o[i] - o[s]);
1112
+ const d = new Float32Array(e.pointCount), c = new Float32Array(e.pointCount);
818
1113
  for (let i = 0; i < e.pointCount; i++)
819
- u[i] = s[n[i]], c[i] = o[n[i]];
820
- return { x: u, y: c };
1114
+ d[i] = o[a[i]], c[i] = r[a[i]];
1115
+ return { x: d, y: c };
821
1116
  }
822
- return { x: s, y: o };
1117
+ return { x: o, y: r };
823
1118
  }
824
- function Oe(r) {
1119
+ function ft(n) {
825
1120
  const e = {
826
1121
  pointCount: 2e3,
827
1122
  vMin: -0.5,
@@ -830,18 +1125,18 @@ function Oe(r) {
830
1125
  peakCurrent: 1e-5,
831
1126
  // 10 µA
832
1127
  noise: 0.02,
833
- ...r
834
- }, t = e.pointCount * e.cycles, s = new Float32Array(t), o = new Float32Array(t), n = e.pointCount, u = n / 2;
1128
+ ...n
1129
+ }, t = e.pointCount * e.cycles, o = new Float32Array(t), r = new Float32Array(t), a = e.pointCount, d = a / 2;
835
1130
  for (let c = 0; c < e.cycles; c++)
836
- for (let i = 0; i < n; i++) {
837
- const l = c * n + i;
838
- i < u ? s[l] = e.vMin + (e.vMax - e.vMin) * (i / u) : s[l] = e.vMax - (e.vMax - e.vMin) * ((i - u) / u);
839
- const f = s[l], y = 0, b = i < u ? 1 : -1, v = 0.1, p = -Math.pow(f - y, 2) / (2 * v * v), S = e.peakCurrent * Math.exp(p), C = b * e.peakCurrent * 0.1, g = (Math.random() - 0.5) * 2 * e.noise * e.peakCurrent;
840
- o[l] = b * S + C + g;
1131
+ for (let i = 0; i < a; i++) {
1132
+ const s = c * a + i;
1133
+ i < d ? o[s] = e.vMin + (e.vMax - e.vMin) * (i / d) : o[s] = e.vMax - (e.vMax - e.vMin) * ((i - d) / d);
1134
+ const u = o[s], h = 0, S = i < d ? 1 : -1, v = 0.1, p = -Math.pow(u - h, 2) / (2 * v * v), w = e.peakCurrent * Math.exp(p), b = S * e.peakCurrent * 0.1, g = (Math.random() - 0.5) * 2 * e.noise * e.peakCurrent;
1135
+ r[s] = S * w + b + g;
841
1136
  }
842
- return { x: s, y: o };
1137
+ return { x: o, y: r };
843
1138
  }
844
- function $e(r) {
1139
+ function gt(n) {
845
1140
  const e = {
846
1141
  pointCount: 50,
847
1142
  rSolution: 100,
@@ -849,380 +1144,397 @@ function $e(r) {
849
1144
  rCharge: 1e3,
850
1145
  // Ohms
851
1146
  frequency: [1e5, 0.01],
852
- ...r
853
- }, t = new Float32Array(e.pointCount), s = new Float32Array(e.pointCount), o = Math.log10(e.frequency[1]), n = Math.log10(e.frequency[0]);
854
- for (let u = 0; u < e.pointCount; u++) {
855
- const c = n - (n - o) * (u / (e.pointCount - 1)), i = 2 * Math.PI * Math.pow(10, c), l = e.rCharge * 1e-5, f = e.rSolution + e.rCharge / (1 + Math.pow(i * l, 2)), y = i * l * e.rCharge / (1 + Math.pow(i * l, 2));
856
- t[u] = f, s[u] = -y;
1147
+ ...n
1148
+ }, t = new Float32Array(e.pointCount), o = new Float32Array(e.pointCount), r = Math.log10(e.frequency[1]), a = Math.log10(e.frequency[0]);
1149
+ for (let d = 0; d < e.pointCount; d++) {
1150
+ const c = a - (a - r) * (d / (e.pointCount - 1)), i = 2 * Math.PI * Math.pow(10, c), s = e.rCharge * 1e-5, u = e.rSolution + e.rCharge / (1 + Math.pow(i * s, 2)), h = i * s * e.rCharge / (1 + Math.pow(i * s, 2));
1151
+ t[d] = u, o[d] = -h;
857
1152
  }
858
- return { x: t, y: s };
1153
+ return { x: t, y: o };
859
1154
  }
860
- async function Be(r, e) {
1155
+ async function pt(n, e) {
861
1156
  const t = {
862
1157
  duration: 5e3,
863
1158
  warmup: 1e3,
864
1159
  ...e
865
- }, s = [], o = [];
866
- let n = 0, u = performance.now();
867
- const c = r.getAllSeries().reduce((i, l) => i + l.getPointCount(), 0);
868
- return new Promise((i) => {
869
- const l = performance.now() + t.warmup + t.duration, f = performance.now() + t.warmup;
870
- let y = !1;
871
- function b() {
1160
+ }, o = [], r = [];
1161
+ let a = 0;
1162
+ const d = n.getAllSeries().reduce((c, i) => c + i.getPointCount(), 0);
1163
+ return new Promise((c) => {
1164
+ const i = performance.now() + t.warmup + t.duration, s = performance.now() + t.warmup;
1165
+ let u = !1, h = 0;
1166
+ function S() {
872
1167
  const v = performance.now();
873
- if (v >= l) {
874
- const p = s.reduce((d, a) => d + a, 0) / s.length, S = Math.min(...s), C = Math.max(...s), g = o.reduce((d, a) => d + a, 0) / o.length, m = {
875
- avgFps: Math.round(p * 100) / 100,
876
- minFps: S,
877
- maxFps: C,
878
- avgFrameTime: Math.round(g * 100) / 100,
879
- frameCount: n,
1168
+ if (v >= i) {
1169
+ const b = r.length > 0 ? r.reduce((P, x) => P + x, 0) / r.length : 0, g = h > 0 ? v - h : t.duration, y = a > 0 && g > 0 ? a / g * 1e3 : 0, f = o.length > 0 ? o.reduce((P, x) => P + x, 0) / o.length : b > 0 ? 1e3 / b : 0, l = {
1170
+ avgFps: Math.round(y * 100) / 100,
1171
+ minFps: Math.round((o.length > 0 ? Math.min(...o) : y) * 100) / 100,
1172
+ maxFps: Math.round((o.length > 0 ? Math.max(...o) : y) * 100) / 100,
1173
+ avgFrameTime: Math.round(b * 1e3) / 1e3,
1174
+ frameCount: a,
880
1175
  duration: t.duration,
881
- pointsRendered: c,
882
- throughput: Math.round(c * p / 1e3) * 1e3
1176
+ pointsRendered: d,
1177
+ throughput: Math.round(d * y / 1e3) * 1e3,
1178
+ /** @internal render-only FPS (not wall clock) */
1179
+ ...f > 0 ? { renderFps: Math.round(f * 100) / 100 } : {}
883
1180
  };
884
- i(m);
1181
+ c(l);
885
1182
  return;
886
1183
  }
887
- if (v >= f && !y && (y = !0, u = v, n = 0), r.render(), y) {
888
- const p = v - u;
889
- o.push(p), n++;
890
- const S = o.slice(-30);
891
- if (S.length > 0) {
892
- const C = S.reduce((g, m) => g + m, 0) / S.length;
893
- s.push(1e3 / C);
1184
+ v >= s && !u && (u = !0, h = v, a = 0, r.length = 0, o.length = 0);
1185
+ const p = performance.now();
1186
+ n.render();
1187
+ const w = performance.now();
1188
+ if (u) {
1189
+ const b = w - p;
1190
+ r.push(b), a++;
1191
+ const g = r.slice(-30);
1192
+ if (g.length > 0) {
1193
+ const y = g.reduce((f, l) => f + l, 0) / g.length;
1194
+ y > 0 && o.push(1e3 / y);
894
1195
  }
895
1196
  }
896
- u = v, requestAnimationFrame(b);
1197
+ requestAnimationFrame(S);
897
1198
  }
898
- requestAnimationFrame(b);
1199
+ requestAnimationFrame(S);
899
1200
  });
900
1201
  }
901
- function He(r, e) {
1202
+ function ht(n, e) {
902
1203
  const t = {
903
1204
  format: "json",
904
1205
  includeStyles: !0,
905
1206
  ...e
906
- }, s = r.getAllSeries().map((n) => ({
907
- id: n.getId(),
908
- type: n.getType(),
909
- pointCount: n.getPointCount(),
910
- ...t.includeStyles ? { style: n.getStyle() } : {}
911
- })), o = {
1207
+ }, o = n.getAllSeries().map((a) => ({
1208
+ id: a.getId(),
1209
+ type: a.getType(),
1210
+ pointCount: a.getPointCount(),
1211
+ ...t.includeStyles ? { style: a.getStyle() } : {}
1212
+ })), r = {
912
1213
  timestamp: Date.now(),
913
1214
  config: {},
914
- series: s,
915
- bounds: r.getViewBounds()
1215
+ series: o,
1216
+ bounds: n.getViewBounds()
916
1217
  };
917
- return t.format === "png" && r.exportImage && (o.image = r.exportImage()), o;
1218
+ return t.format === "png" && n.exportImage && (r.image = n.exportImage()), r;
918
1219
  }
919
- function qe(r, e, t = 1e-6) {
920
- const s = [];
921
- r.series.length !== e.series.length && s.push(`Series count: ${r.series.length} vs ${e.series.length}`);
922
- for (let n = 0; n < Math.min(r.series.length, e.series.length); n++) {
923
- const u = r.series[n], c = e.series[n];
924
- u.id !== c.id && s.push(`Series[${n}] id: "${u.id}" vs "${c.id}"`), u.type !== c.type && s.push(`Series[${n}] type: "${u.type}" vs "${c.type}"`), u.pointCount !== c.pointCount && s.push(`Series[${n}] pointCount: ${u.pointCount} vs ${c.pointCount}`);
1220
+ function mt(n, e, t = 1e-6) {
1221
+ const o = [];
1222
+ n.series.length !== e.series.length && o.push(`Series count: ${n.series.length} vs ${e.series.length}`);
1223
+ for (let a = 0; a < Math.min(n.series.length, e.series.length); a++) {
1224
+ const d = n.series[a], c = e.series[a];
1225
+ d.id !== c.id && o.push(`Series[${a}] id: "${d.id}" vs "${c.id}"`), d.type !== c.type && o.push(`Series[${a}] type: "${d.type}" vs "${c.type}"`), d.pointCount !== c.pointCount && o.push(`Series[${a}] pointCount: ${d.pointCount} vs ${c.pointCount}`);
925
1226
  }
926
- const o = ["xMin", "xMax", "yMin", "yMax"];
927
- for (const n of o)
928
- Math.abs(r.bounds[n] - e.bounds[n]) > t && s.push(`Bounds.${n}: ${r.bounds[n]} vs ${e.bounds[n]}`);
1227
+ const r = ["xMin", "xMax", "yMin", "yMax"];
1228
+ for (const a of r)
1229
+ Math.abs(n.bounds[a] - e.bounds[a]) > t && o.push(`Bounds.${a}: ${n.bounds[a]} vs ${e.bounds[a]}`);
929
1230
  return {
930
- equal: s.length === 0,
931
- differences: s
1231
+ equal: o.length === 0,
1232
+ differences: o
932
1233
  };
933
1234
  }
934
- function We(r, e) {
1235
+ function yt(n, e) {
935
1236
  const t = [];
936
- return e.minFps && r.avgFps < e.minFps && t.push(`FPS ${r.avgFps} < required ${e.minFps}`), e.maxFrameTime && r.avgFrameTime > e.maxFrameTime && t.push(`Frame time ${r.avgFrameTime}ms > required ${e.maxFrameTime}ms`), e.minThroughput && r.throughput < e.minThroughput && t.push(`Throughput ${r.throughput} < required ${e.minThroughput}`), {
1237
+ return e.minFps && n.avgFps < e.minFps && t.push(`FPS ${n.avgFps} < required ${e.minFps}`), e.maxFrameTime && n.avgFrameTime > e.maxFrameTime && t.push(`Frame time ${n.avgFrameTime}ms > required ${e.maxFrameTime}ms`), e.minThroughput && n.throughput < e.minThroughput && t.push(`Throughput ${n.throughput} < required ${e.minThroughput}`), {
937
1238
  passed: t.length === 0,
938
1239
  failures: t
939
1240
  };
940
1241
  }
941
- function Ge(r = 1) {
1242
+ function xt(n = 1) {
942
1243
  return new Promise((e) => {
943
- let t = r;
944
- function s() {
945
- t--, t <= 0 ? e() : requestAnimationFrame(s);
1244
+ let t = n;
1245
+ function o() {
1246
+ t--, t <= 0 ? e() : requestAnimationFrame(o);
946
1247
  }
947
- requestAnimationFrame(s);
1248
+ requestAnimationFrame(o);
948
1249
  });
949
1250
  }
950
- function Ne(r) {
951
- return new Promise((e) => setTimeout(e, r));
952
- }
953
- function Ve(r) {
954
- const t = {
955
- id: r.seriesId ?? `${r.id}-indicator`,
956
- data: r.data,
957
- style: r.style,
958
- name: r.label
959
- }, s = fe(t);
960
- return {
961
- id: r.id,
962
- height: r.height ?? 0.25,
963
- showXAxis: r.showXAxis,
964
- yRange: r.yRange,
965
- chart: {
966
- yAxis: {
967
- label: r.label ?? "Indicator",
968
- auto: r.yRange === void 0 || r.yRange === "auto",
969
- tickCount: r.tickCount ?? 5,
970
- scientific: !1
971
- },
972
- xAxis: { showLabels: !1, showTicks: !1, showLine: !1 },
973
- animations: !1,
974
- loading: !1,
975
- showLegend: !1
976
- },
977
- series: s
978
- };
1251
+ function vt(n) {
1252
+ return new Promise((e) => setTimeout(e, n));
979
1253
  }
980
1254
  export {
981
- je as AnimationEngine,
982
- Bt as AnnotationManager,
983
- fa as BackpressureManager,
984
- Da as BaseBufferStore,
985
- Ea as BaseTextureStore,
986
- Le as BuiltinPlugins,
987
- Co as ChartGroup,
988
- Je as ChartInitQueue,
989
- ga as CircularBuffer,
990
- so as ClipboardManager,
991
- pe as CrosshairPlugin,
992
- Qe as DARK_THEME,
993
- Ze as DEFAULT_ANIMATION_CONFIG,
994
- to as DEFAULT_KEY_BINDINGS,
995
- et as DEFAULT_LAYOUT,
996
- tt as DEFAULT_THEME,
997
- Te as DataLoggerPlugin,
998
- po as DebugOverlay,
999
- be as DirectionIndicatorPlugin,
1000
- nt as ELECTROCHEM_THEME,
1001
- Ot as EventEmitter,
1002
- Fa as GpuBenchmark,
1003
- La as GpuCompute,
1004
- Ra as GpuRenderer,
1005
- Pe as GridHighlightPlugin,
1006
- no as KeyBindingManager,
1007
- at as LIGHT_THEME,
1008
- Ha as LOCALE_DE_DE,
1009
- qa as LOCALE_EN_US,
1010
- Wa as LOCALE_ES_ES,
1011
- Ga as LOCALE_FR_FR,
1012
- Na as LOCALE_JA_JP,
1013
- Va as LOCALE_PT_BR,
1014
- Ua as LOCALE_ZH_CN,
1015
- ot as LinearScale,
1016
- vo as LoadingIndicator,
1017
- rt as LogScale,
1018
- it as MIDNIGHT_THEME,
1019
- st as NativeWebGLRenderer,
1020
- lt as OverlayRenderer,
1021
- Xa as PipelineCache,
1022
- nr as Plugin3D,
1023
- fn as PluginAnalysis,
1024
- Ht as PluginAnnotations,
1025
- fr as PluginAnomalyDetection,
1026
- Lr as PluginBrokenAxis,
1027
- Ir as PluginCaching,
1028
- lo as PluginClipboard,
1029
- dr as PluginContextMenu,
1030
- lr as PluginDataExport,
1031
- br as PluginDataTransform,
1032
- ho as PluginDebug,
1033
- Re as PluginDragEdit,
1034
- $r as PluginForecasting,
1035
- Ya as PluginGpu,
1036
- or as PluginI18n,
1037
- ao as PluginKeyboard,
1038
- Mr as PluginLaTeX,
1039
- Er as PluginLazyLoad,
1040
- Po as PluginLoading,
1041
- pr as PluginMLIntegration,
1042
- ct as PluginManagerImpl,
1043
- kr as PluginOffscreen,
1044
- mr as PluginPatternRecognition,
1045
- _r as PluginROI,
1046
- Pr as PluginRadar,
1047
- xr as PluginRegression,
1048
- Tr as PluginSnapshot,
1049
- pa as PluginStreaming,
1050
- ir as PluginSync,
1051
- Eo as PluginThemeEditor,
1052
- tn as PluginTools,
1053
- Xr as PluginVideoRecorder,
1054
- sn as PluginVirtualization,
1055
- dt as SERIALIZATION_VERSION,
1056
- wa as STACKED_DEFAULT_MIN_PANE_RATIO,
1057
- ba as STACKED_MAX_PANES,
1058
- Ca as SciPlot,
1059
- ut as Series,
1060
- ka as SeriesAdapter,
1061
- ft as StateHistory,
1062
- me as StatsPlugin,
1063
- Fo as THEME_PRESETS,
1064
- nn as TOOLTIP_THEMES,
1065
- Lo as ThemeEditor,
1066
- an as TooltipManager,
1067
- xe as WatermarkPlugin,
1068
- za as WebGLBackend,
1069
- _a as WebGPUBackend,
1070
- Q as WebGPURenderer,
1071
- gn as adx,
1072
- pn as analyzeComplexSpectrum,
1073
- hn as analyzeSpectrum,
1074
- mn as aroon,
1075
- yn as arraysToComplex,
1076
- We as assertPerformance,
1077
- xn as atr,
1078
- vn as autoCorrelation,
1079
- Pn as bandPassFilter,
1080
- Sn as bandStopFilter,
1081
- Be as benchmarkRender,
1082
- Tn as blackmanWindow,
1083
- wn as bollingerBands,
1084
- Ve as buildIndicatorPane,
1085
- fe as buildIndicatorSeries,
1086
- bn as butterworth,
1087
- jo as calculateR2,
1088
- zo as calculateStats,
1089
- ln as calculateTargetPoints,
1090
- Wt as checkPluginCompatibility,
1091
- qe as compareSnapshots,
1092
- Cn as complexToArrays,
1093
- gt as compressString,
1094
- ha as connectStreamToChart,
1095
- co as copyToClipboard,
1096
- ma as createBackpressureManager,
1097
- pt as createChart,
1098
- Mo as createChartGroup,
1099
- Gt as createConfigurablePlugin,
1100
- mo as createDebugOverlay,
1101
- Oa as createGpuRenderer,
1102
- ht as createIndicatorSeries,
1103
- oo as createKeyBinding,
1104
- So as createLoadingIndicator,
1105
- Ka as createLocaleFormatter,
1106
- ya as createLosslessBackpressure,
1107
- Ao as createMasterSlave,
1108
- xa as createMessageParser,
1109
- va as createMockStream,
1110
- mt as createNativeRenderer,
1111
- Nt as createPlugin,
1112
- yt as createPluginContext,
1113
- Pa as createRealtimeBackpressure,
1114
- Vt as createRenderer,
1115
- xt as createScale,
1116
- He as createSnapshot,
1117
- Ma as createStackedChart,
1118
- vt as createTheme,
1119
- Ro as createThemeEditor,
1120
- Sa as createWebSocketStream,
1121
- Mn as crossCorrelation,
1122
- An as cumsum,
1123
- Jo as cumulativeIntegral,
1124
- Pt as decodeFloat32Array,
1125
- St as decompressString,
1126
- Ut as defineAndRegister,
1127
- O as definePlugin,
1128
- In as dema,
1129
- Qo as derivative,
1130
- Dn as detectAnomalies,
1131
- _o as detectCycles,
1132
- Tt as detectIndicatorMarkers,
1133
- Oo as detectPeaks,
1134
- En as dominantFrequency,
1135
- $o as downsampleLTTB,
1136
- wt as easings,
1137
- Fn as ema,
1138
- yo as enableDebugMode,
1139
- bt as encodeFloat32Array,
1140
- Ln as exponentialMovingAverage,
1141
- Rn as fft,
1142
- Xn as fftFromComplexInput,
1143
- uo as formatData,
1144
- Bo as formatScientific,
1145
- Ho as formatValue,
1146
- qo as formatWithPrefix,
1147
- Yn as gaussianSmooth,
1148
- Oe as generateCVData,
1149
- Wo as generateCycleColors,
1150
- $e as generateNyquistData,
1151
- _e as generateRandomData,
1152
- ke as generateSawtoothWave,
1153
- Xe as generateSineWave,
1154
- Ye as generateSquareWave,
1155
- ze as generateTriangleWave,
1156
- Go as getBestPrefix,
1157
- Ct as getChartInitQueue,
1158
- fo as getClipboardManager,
1159
- ja as getGlobalLocale,
1160
- Ja as getLocale,
1161
- Kt as getPluginRegistry,
1162
- kn as getPositiveFrequencies,
1163
- Xo as getPresetNames,
1164
- Yo as getPresetTheme,
1165
- Mt as getSharedAnimationEngine,
1166
- At as getThemeByName,
1167
- on as getTooltipThemeForChartTheme,
1168
- zn as hammingWindow,
1169
- _n as hanningWindow,
1170
- On as highPassFilter,
1171
- $n as ifft,
1172
- Bn as ifftComplex,
1173
- Hn as ifftFromArrays,
1174
- Zo as integrate,
1175
- It as interleaveData,
1176
- Io as linkCharts,
1177
- jt as listPluginsByCategory,
1178
- Jt as loadPlugin,
1179
- qn as lowPassFilter,
1180
- cn as lttbDownsample,
1181
- Wn as macd,
1182
- Gn as medianFilter,
1183
- Dt as mergeAnimationConfig,
1184
- Et as mergeLayoutOptions,
1185
- dn as minMaxDownsample,
1186
- Nn as momentum,
1187
- No as movingAverage,
1188
- Vn as nextPowerOf2,
1189
- Un as normalize,
1190
- Kn as obv,
1191
- Ft as parseColor,
1192
- $a as parseColorToRGBA,
1193
- ro as parseShortcut,
1194
- jn as percentChange,
1195
- Jn as powerSpectrum,
1196
- Lt as queueChartInit,
1197
- Qa as registerLocale,
1198
- Qt as registerPlugin,
1199
- Rt as resetChartQueue,
1200
- Qn as roc,
1201
- Zn as rsi,
1202
- ea as savitzkyGolay,
1203
- Za as setGlobalLocale,
1204
- To as showLoading,
1205
- wo as showProgress,
1206
- ta as simpsonsIntegration,
1207
- na as singleFrequencyFilter,
1208
- aa as sma,
1209
- er as solveLinearSystem,
1210
- oa as standardDeviation,
1211
- Xt as stateToUrlHash,
1212
- ra as stochastic,
1213
- Vo as subtractBaseline,
1214
- ia as tTest,
1215
- sa as tema,
1216
- la as trapezoidalIntegration,
1217
- Yt as urlHashToState,
1218
- Aa as useSciPlot,
1219
- kt as validateChartState,
1220
- Uo as validateData,
1221
- Zt as validateManifest,
1222
- ca as vwap,
1223
- Ne as waitFor,
1224
- zt as waitForAnimations,
1225
- Ge as waitForFrames,
1226
- da as wma
1255
+ St as AnimationEngine,
1256
+ In as AnnotationManager,
1257
+ Za as BackpressureManager,
1258
+ xo as BaseBufferStore,
1259
+ vo as BaseTextureStore,
1260
+ tt as BuiltinPlugins,
1261
+ sr as ChartGroup,
1262
+ Tt as ChartInitQueue,
1263
+ eo as CircularBuffer,
1264
+ Oo as ClipboardManager,
1265
+ Se as CrosshairPlugin,
1266
+ ee as DARK_THEME,
1267
+ bt as DEFAULT_ANIMATION_CONFIG,
1268
+ _o as DEFAULT_KEY_BINDINGS,
1269
+ At as DEFAULT_LAYOUT,
1270
+ Mt as DEFAULT_THEME,
1271
+ Ee as DataLoggerPlugin,
1272
+ jo as DebugOverlay,
1273
+ Le as DirectionIndicatorPlugin,
1274
+ Ct as ELECTROCHEM_THEME,
1275
+ Tn as EventEmitter,
1276
+ Po as GpuBenchmark,
1277
+ wo as GpuCompute,
1278
+ Hn as GpuRenderer,
1279
+ Fe as GridHighlightPlugin,
1280
+ Go as KeyBindingManager,
1281
+ Ft as LIGHT_THEME,
1282
+ Ao as LOCALE_DE_DE,
1283
+ Mo as LOCALE_EN_US,
1284
+ Co as LOCALE_ES_ES,
1285
+ Fo as LOCALE_FR_FR,
1286
+ Do as LOCALE_JA_JP,
1287
+ Eo as LOCALE_PT_BR,
1288
+ Io as LOCALE_ZH_CN,
1289
+ O as LinearScale,
1290
+ tr as LoadingIndicator,
1291
+ Dt as LogScale,
1292
+ Et as MIDNIGHT_THEME,
1293
+ It as NativeWebGLRenderer,
1294
+ Pe as OverlayRenderer,
1295
+ So as PipelineCache,
1296
+ di as Plugin3D,
1297
+ va as PluginAnalysis,
1298
+ Ln as PluginAnnotations,
1299
+ Pi as PluginAnomalyDetection,
1300
+ Wi as PluginBrokenAxis,
1301
+ Yi as PluginCaching,
1302
+ Ho as PluginClipboard,
1303
+ xi as PluginContextMenu,
1304
+ mi as PluginDataExport,
1305
+ Li as PluginDataTransform,
1306
+ Jo as PluginDebug,
1307
+ nt as PluginDragEdit,
1308
+ fr as PluginDrawingTools,
1309
+ Vi as PluginForecasting,
1310
+ To as PluginGpu,
1311
+ fi as PluginI18n,
1312
+ Wo as PluginKeyboard,
1313
+ Ri as PluginLaTeX,
1314
+ _i as PluginLazyLoad,
1315
+ nr as PluginLoading,
1316
+ Si as PluginMLIntegration,
1317
+ Lt as PluginManagerImpl,
1318
+ Oi as PluginOffscreen,
1319
+ bi as PluginPatternRecognition,
1320
+ qi as PluginROI,
1321
+ Fi as PluginRadar,
1322
+ Mi as PluginRegression,
1323
+ gr as PluginReplay,
1324
+ Ei as PluginSnapshot,
1325
+ to as PluginStreaming,
1326
+ pi as PluginSync,
1327
+ yr as PluginThemeEditor,
1328
+ Qn as PluginTools,
1329
+ Ui as PluginVideoRecorder,
1330
+ aa as PluginVirtualization,
1331
+ kt as SERIALIZATION_VERSION,
1332
+ po as STACKED_DEFAULT_MIN_PANE_RATIO,
1333
+ ho as STACKED_MAX_PANES,
1334
+ uo as SciPlot,
1335
+ Rt as Series,
1336
+ qn as SeriesAdapter,
1337
+ Xt as StateHistory,
1338
+ be as StatsPlugin,
1339
+ xr as THEME_PRESETS,
1340
+ Zn as TOOLTIP_THEMES,
1341
+ vr as ThemeEditor,
1342
+ ea as TooltipManager,
1343
+ Me as WatermarkPlugin,
1344
+ Nn as WebGLBackend,
1345
+ Vn as WebGPUBackend,
1346
+ ae as WebGPURenderer,
1347
+ ma as WorkerPool,
1348
+ Yt as addIndicatorToChart,
1349
+ $r as adx,
1350
+ Pa as analyzeComplexSpectrum,
1351
+ wa as analyzeSpectrum,
1352
+ bn as applyBusinessDayX,
1353
+ Or as aroon,
1354
+ Sa as arraysToComplex,
1355
+ yt as assertPerformance,
1356
+ Hr as atr,
1357
+ Ta as autoCorrelation,
1358
+ ba as bandPassFilter,
1359
+ Aa as bandStopFilter,
1360
+ pr as barsToOhlc,
1361
+ Ue as benchmarkCanvasGrid,
1362
+ pt as benchmarkRender,
1363
+ $e as benchmarkWebGLGrid,
1364
+ Ma as blackmanWindow,
1365
+ qr as bollingerBands,
1366
+ Bt as bollingerBandsAsync,
1367
+ _t as buildIndicatorPane,
1368
+ Gt as buildIndicatorPaneFromPreset,
1369
+ Wt as buildIndicatorSeries,
1370
+ zt as buildPositionLineAnnotation,
1371
+ An as businessDaySpanMs,
1372
+ Ca as butterworth,
1373
+ Br as calculateR2,
1374
+ br as calculateStats,
1375
+ oa as calculateTargetPoints,
1376
+ Rn as checkPluginCompatibility,
1377
+ at as compareGridBackends,
1378
+ rt as compareScenarioToBaseline,
1379
+ mt as compareSnapshots,
1380
+ Fa as complexToArrays,
1381
+ Ut as compressString,
1382
+ $t as computeHeikinAshi,
1383
+ Ot as computeIndicatorFromSeries,
1384
+ Ht as computeIndicatorPreset,
1385
+ no as connectStreamToChart,
1386
+ qo as copyToClipboard,
1387
+ ao as createBackpressureManager,
1388
+ qt as createChart,
1389
+ lr as createChartGroup,
1390
+ Xn as createConfigurablePlugin,
1391
+ Qo as createDebugOverlay,
1392
+ Kn as createGpuRenderer,
1393
+ Nt as createIndicatorSeries,
1394
+ zo as createKeyBinding,
1395
+ ar as createLoadingIndicator,
1396
+ Lo as createLocaleFormatter,
1397
+ oo as createLosslessBackpressure,
1398
+ cr as createMasterSlave,
1399
+ ro as createMessageParser,
1400
+ hr as createMockDatafeed,
1401
+ io as createMockStream,
1402
+ Vt as createNativeRenderer,
1403
+ Yn as createPlugin,
1404
+ Kt as createPluginContext,
1405
+ so as createRealtimeBackpressure,
1406
+ Bn as createRenderer,
1407
+ jt as createScale,
1408
+ ht as createSnapshot,
1409
+ mo as createStackedChart,
1410
+ Jt as createTheme,
1411
+ Pr as createThemeEditor,
1412
+ lo as createWebSocketStream,
1413
+ Da as crossCorrelation,
1414
+ Nr as cumsum,
1415
+ _r as cumulativeIntegral,
1416
+ Qt as decodeFloat32Array,
1417
+ Zt as decompressString,
1418
+ _n as defineAndRegister,
1419
+ G as definePlugin,
1420
+ Vr as dema,
1421
+ Gr as derivative,
1422
+ ra as destroyDownsamplePool,
1423
+ en as destroyIndicatorPool,
1424
+ Ea as detectAnomalies,
1425
+ Ar as detectCycles,
1426
+ tn as detectIndicatorMarkers,
1427
+ Mr as detectPeaks,
1428
+ Ia as dominantFrequency,
1429
+ ia as downsampleAsync,
1430
+ Cr as downsampleLTTB,
1431
+ nn as easings,
1432
+ Kr as ema,
1433
+ an as emaAsync,
1434
+ Zo as enableDebugMode,
1435
+ on as encodeFloat32Array,
1436
+ it as evaluateRendererCompare,
1437
+ La as exponentialMovingAverage,
1438
+ ka as fft,
1439
+ Ra as fftFromComplexInput,
1440
+ Mn as formatBusinessDayTick,
1441
+ No as formatData,
1442
+ Fr as formatScientific,
1443
+ Dr as formatValue,
1444
+ Er as formatWithPrefix,
1445
+ Xa as gaussianSmooth,
1446
+ ft as generateCVData,
1447
+ Ir as generateCycleColors,
1448
+ gt as generateNyquistData,
1449
+ ut as generateRandomData,
1450
+ ct as generateSawtoothWave,
1451
+ st as generateSineWave,
1452
+ lt as generateSquareWave,
1453
+ dt as generateTriangleWave,
1454
+ ot as getBaseline,
1455
+ Lr as getBestPrefix,
1456
+ rn as getChartInitQueue,
1457
+ Vo as getClipboardManager,
1458
+ sa as getDownsamplePoolSize,
1459
+ ko as getGlobalLocale,
1460
+ Ro as getLocale,
1461
+ Gn as getPluginRegistry,
1462
+ Ya as getPositiveFrequencies,
1463
+ wr as getPresetNames,
1464
+ Sr as getPresetTheme,
1465
+ sn as getSharedAnimationEngine,
1466
+ ln as getThemeByName,
1467
+ ta as getTooltipThemeForChartTheme,
1468
+ Ba as hammingWindow,
1469
+ _a as hanningWindow,
1470
+ Ga as highPassFilter,
1471
+ Wa as ifft,
1472
+ za as ifftComplex,
1473
+ Ua as ifftFromArrays,
1474
+ Wr as integrate,
1475
+ cn as interleaveData,
1476
+ Cn as isBusinessDay,
1477
+ Fn as isBusinessDayScaleActive,
1478
+ dr as linkCharts,
1479
+ Wn as listPluginsByCategory,
1480
+ zn as loadPlugin,
1481
+ $a as lowPassFilter,
1482
+ la as lowerBoundX,
1483
+ ca as lttbDownsample,
1484
+ jr as macd,
1485
+ dn as macdAsync,
1486
+ Dn as mapToBusinessDayScale,
1487
+ Oa as medianFilter,
1488
+ un as mergeAnimationConfig,
1489
+ fn as mergeLayoutOptions,
1490
+ da as minMaxDownsample,
1491
+ Jr as momentum,
1492
+ kr as movingAverage,
1493
+ Ha as nextPowerOf2,
1494
+ ya as nextTaskId,
1495
+ Qr as normalize,
1496
+ Zr as obv,
1497
+ ua as ohlcDownsampleAsync,
1498
+ fa as ohlcMinMaxDownsample,
1499
+ gn as parseColor,
1500
+ jn as parseColorToRGBA,
1501
+ Uo as parseShortcut,
1502
+ ei as percentChange,
1503
+ qa as powerSpectrum,
1504
+ pn as queueChartInit,
1505
+ Xo as registerLocale,
1506
+ Un as registerPlugin,
1507
+ hn as resetChartQueue,
1508
+ ti as roc,
1509
+ ni as rsi,
1510
+ mn as rsiAsync,
1511
+ Na as savitzkyGolay,
1512
+ Yo as setGlobalLocale,
1513
+ or as showLoading,
1514
+ rr as showProgress,
1515
+ Va as simpsonsIntegration,
1516
+ Ka as singleFrequencyFilter,
1517
+ ga as sliceSeriesToViewport,
1518
+ ai as sma,
1519
+ yn as smaAsync,
1520
+ zr as solveLinearSystem,
1521
+ oi as standardDeviation,
1522
+ xn as stateToUrlHash,
1523
+ ri as stochastic,
1524
+ Rr as subtractBaseline,
1525
+ ja as tTest,
1526
+ ii as tema,
1527
+ Ja as trapezoidalIntegration,
1528
+ pa as upperBoundX,
1529
+ vn as urlHashToState,
1530
+ fo as useSciPlot,
1531
+ Pn as validateChartState,
1532
+ Xr as validateData,
1533
+ $n as validateManifest,
1534
+ si as vwap,
1535
+ vt as waitFor,
1536
+ wn as waitForAnimations,
1537
+ xt as waitForFrames,
1538
+ li as wma
1227
1539
  };
1228
1540
  //# sourceMappingURL=velo-plot.full.js.map