velo-plot 1.12.0 → 1.15.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 (101) hide show
  1. package/README.md +14 -0
  2. package/dist/{index.core-xiNcuFfJ.js → ChartCore-BimVvUEg.js} +922 -929
  3. package/dist/ChartCore-BimVvUEg.js.map +1 -0
  4. package/dist/core/chart/ChartCore.d.ts +1 -0
  5. package/dist/core/chart/exporter/SVGExporter.d.ts +7 -2
  6. package/dist/core/chart/types.d.ts +2 -0
  7. package/dist/core/render/pixelSnap.d.ts +8 -0
  8. package/dist/core/stacked/index.d.ts +3 -1
  9. package/dist/core/stacked/paneResize.d.ts +15 -18
  10. package/dist/core/stacked/stackExport.d.ts +18 -0
  11. package/dist/core/stacked/types.d.ts +34 -5
  12. package/dist/createStackedChart-CjsKcOvX.js +1088 -0
  13. package/dist/createStackedChart-CjsKcOvX.js.map +1 -0
  14. package/dist/index-CUGS98p4.js +277 -0
  15. package/dist/index-CUGS98p4.js.map +1 -0
  16. package/dist/index-ChgIdk3N.js +229 -0
  17. package/dist/index-ChgIdk3N.js.map +1 -0
  18. package/dist/index.core-C_-CFftD.js +167 -0
  19. package/dist/index.core-C_-CFftD.js.map +1 -0
  20. package/dist/math-Ddm2EZjj.js +85 -0
  21. package/dist/math-Ddm2EZjj.js.map +1 -0
  22. package/dist/plugins/analysis.js +132 -130
  23. package/dist/plugins/analysis.js.map +1 -1
  24. package/dist/plugins/anomaly-detection.d.ts +1 -0
  25. package/dist/plugins/anomaly-detection.js +221 -0
  26. package/dist/plugins/anomaly-detection.js.map +1 -0
  27. package/dist/plugins/broken-axis.d.ts +3 -0
  28. package/dist/plugins/broken-axis.js +262 -0
  29. package/dist/plugins/broken-axis.js.map +1 -0
  30. package/dist/plugins/caching.d.ts +3 -0
  31. package/dist/plugins/caching.js +182 -0
  32. package/dist/plugins/caching.js.map +1 -0
  33. package/dist/plugins/data-transform.d.ts +3 -0
  34. package/dist/plugins/data-transform.js +146 -0
  35. package/dist/plugins/data-transform.js.map +1 -0
  36. package/dist/plugins/debug.js +12 -11
  37. package/dist/plugins/debug.js.map +1 -1
  38. package/dist/plugins/forecasting.d.ts +1 -0
  39. package/dist/plugins/forecasting.js +236 -0
  40. package/dist/plugins/forecasting.js.map +1 -0
  41. package/dist/plugins/latex.d.ts +1 -0
  42. package/dist/plugins/latex.js +454 -0
  43. package/dist/plugins/latex.js.map +1 -0
  44. package/dist/plugins/lazy-load.d.ts +3 -0
  45. package/dist/plugins/lazy-load.js +189 -0
  46. package/dist/plugins/lazy-load.js.map +1 -0
  47. package/dist/plugins/ml-integration.d.ts +3 -0
  48. package/dist/plugins/ml-integration.js +355 -0
  49. package/dist/plugins/ml-integration.js.map +1 -0
  50. package/dist/plugins/offscreen.d.ts +3 -0
  51. package/dist/plugins/offscreen.js +169 -0
  52. package/dist/plugins/offscreen.js.map +1 -0
  53. package/dist/plugins/pattern-recognition.d.ts +3 -0
  54. package/dist/plugins/pattern-recognition.js +690 -0
  55. package/dist/plugins/pattern-recognition.js.map +1 -0
  56. package/dist/plugins/radar.d.ts +3 -0
  57. package/dist/plugins/radar.js +103 -0
  58. package/dist/plugins/radar.js.map +1 -0
  59. package/dist/plugins/regression.d.ts +3 -0
  60. package/dist/plugins/regression.js +634 -0
  61. package/dist/plugins/regression.js.map +1 -0
  62. package/dist/plugins/roi.d.ts +1 -0
  63. package/dist/plugins/roi.js +223 -0
  64. package/dist/plugins/roi.js.map +1 -0
  65. package/dist/plugins/snapshot/types.d.ts +1 -1
  66. package/dist/plugins/snapshot.d.ts +3 -0
  67. package/dist/plugins/snapshot.js +90 -0
  68. package/dist/plugins/snapshot.js.map +1 -0
  69. package/dist/plugins/sync/index.d.ts +2 -1
  70. package/dist/plugins/sync.js +13 -269
  71. package/dist/plugins/sync.js.map +1 -1
  72. package/dist/plugins/video-recorder.d.ts +3 -0
  73. package/dist/plugins/video-recorder.js +104 -0
  74. package/dist/plugins/video-recorder.js.map +1 -0
  75. package/dist/plugins/virtualization.d.ts +3 -0
  76. package/dist/plugins/virtualization.js +6 -0
  77. package/dist/plugins/virtualization.js.map +1 -0
  78. package/dist/react.d.ts +1 -0
  79. package/dist/react.js +31 -0
  80. package/dist/react.js.map +1 -0
  81. package/dist/utils-BK5UUXxj.js +172 -0
  82. package/dist/utils-BK5UUXxj.js.map +1 -0
  83. package/dist/velo-plot.full.js +920 -6003
  84. package/dist/velo-plot.full.js.map +1 -1
  85. package/dist/velo-plot.js +23 -22
  86. package/dist/velo-plot.js.map +1 -1
  87. package/package.json +9 -2
  88. package/dist/core/OverlayRenderer.test.d.ts +0 -1
  89. package/dist/core/chart/ChartScaling.test.d.ts +0 -1
  90. package/dist/core/chart/NavigationUtils.test.d.ts +0 -1
  91. package/dist/core/format/axisFormat.test.d.ts +0 -1
  92. package/dist/core/indicator/buildIndicatorSeries.test.d.ts +0 -1
  93. package/dist/core/series/SeriesBounds.test.d.ts +0 -1
  94. package/dist/core/stacked/createStackedChart.test.d.ts +0 -1
  95. package/dist/core/stacked/paneAxis.test.d.ts +0 -1
  96. package/dist/core/stacked/paneResize.test.d.ts +0 -1
  97. package/dist/core/sync/index.test.d.ts +0 -1
  98. package/dist/index.core-xiNcuFfJ.js.map +0 -1
  99. package/dist/plugins/tools/tooltip/format.test.d.ts +0 -1
  100. package/dist/utils-Dbro9-qM.js +0 -254
  101. package/dist/utils-Dbro9-qM.js.map +0 -1
@@ -1,5 +1,7 @@
1
- import { a as I, s as _, g as z, f as E, d as T, b as V, m as H, e as X, h as Y, v as G, c as O, j as Z, i as U } from "../utils-Dbro9-qM.js";
2
- import { o as Mn, l as bn, k as pn, n as In } from "../utils-Dbro9-qM.js";
1
+ import { a as I, s as _, d as z, i as E } from "../math-Ddm2EZjj.js";
2
+ import { c as pn } from "../math-Ddm2EZjj.js";
3
+ import { g as T, f as V, d as H, s as X, m as Y, a as G, b as O, v as Z, c as U } from "../utils-BK5UUXxj.js";
4
+ import { h as In, e as dn, i as qn } from "../utils-BK5UUXxj.js";
3
5
  function K(e, o, r, t = {}) {
4
6
  const n = e.series.get(o);
5
7
  if (!n) throw new Error(`Series ${o} not found`);
@@ -111,7 +113,7 @@ function C(e, o = 1) {
111
113
  imag: f
112
114
  };
113
115
  }
114
- function Pt(e, o = 1) {
116
+ function vt(e, o = 1) {
115
117
  const r = C(e, o), t = r.frequency.length, n = new Float32Array(t), s = new Float32Array(t);
116
118
  for (let c = 0; c < t; c++)
117
119
  n[c] = r.magnitude[c] * r.magnitude[c], s[c] = 10 * Math.log10(Math.max(n[c], 1e-20));
@@ -121,7 +123,7 @@ function Pt(e, o = 1) {
121
123
  powerDb: s
122
124
  };
123
125
  }
124
- function vt(e, o = 1, r = 0) {
126
+ function $t(e, o = 1, r = 0) {
125
127
  const t = C(e, o);
126
128
  let n = 0, s = 0;
127
129
  for (let c = 0; c < t.magnitude.length; c++)
@@ -131,7 +133,7 @@ function vt(e, o = 1, r = 0) {
131
133
  magnitude: n
132
134
  };
133
135
  }
134
- function $t(e) {
136
+ function Rt(e) {
135
137
  const o = e.length, r = new Float32Array(o);
136
138
  for (let t = 0; t < o; t++) {
137
139
  const n = 0.5 * (1 - Math.cos(2 * Math.PI * t / (o - 1)));
@@ -147,7 +149,7 @@ function jt(e) {
147
149
  }
148
150
  return r;
149
151
  }
150
- function Rt(e) {
152
+ function kt(e) {
151
153
  const o = e.length, r = new Float32Array(o), t = 0.42, n = 0.5, s = 0.08;
152
154
  for (let c = 0; c < o; c++) {
153
155
  const a = t - n * Math.cos(2 * Math.PI * c / (o - 1)) + s * Math.cos(4 * Math.PI * c / (o - 1));
@@ -155,7 +157,7 @@ function Rt(e) {
155
157
  }
156
158
  return r;
157
159
  }
158
- function kt(e, o = 1) {
160
+ function St(e, o = 1) {
159
161
  const r = v(e), t = r.length, n = t / 2, s = new Float32Array(t), c = new Float32Array(t), a = new Float32Array(t), l = new Float32Array(t), f = new Float32Array(t);
160
162
  for (let i = 0; i < t; i++)
161
163
  s[i] = r[i].re, c[i] = r[i].im, a[i] = i * o / t, l[i] = Math.sqrt(r[i].re * r[i].re + r[i].im * r[i].im), f[i] = Math.atan2(r[i].im, r[i].re);
@@ -169,7 +171,7 @@ function kt(e, o = 1) {
169
171
  nyquist: n
170
172
  };
171
173
  }
172
- function St(e, o) {
174
+ function Ct(e, o) {
173
175
  const r = e.length;
174
176
  if (o.length !== r)
175
177
  throw new Error("Real and imaginary arrays must have the same length");
@@ -184,8 +186,8 @@ function St(e, o) {
184
186
  const u = i / 2, h = -2 * Math.PI / i;
185
187
  for (let m = 0; m < t; m += i)
186
188
  for (let y = 0; y < u; y++) {
187
- const w = h * y, g = Math.cos(w), F = Math.sin(w), A = m + y, b = m + y + u, p = g * n[b].re - F * n[b].im, d = g * n[b].im + F * n[b].re;
188
- n[b].re = n[A].re - p, n[b].im = n[A].im - d, n[A].re = n[A].re + p, n[A].im = n[A].im + d;
189
+ const w = h * y, g = Math.cos(w), F = Math.sin(w), A = m + y, p = m + y + u, b = g * n[p].re - F * n[p].im, d = g * n[p].im + F * n[p].re;
190
+ n[p].re = n[A].re - b, n[p].im = n[A].im - d, n[A].re = n[A].re + b, n[A].im = n[A].im + d;
189
191
  }
190
192
  }
191
193
  const s = new Float32Array(t), c = new Float32Array(t), a = new Float32Array(t), l = new Float32Array(t), f = new Float32Array(t);
@@ -201,7 +203,7 @@ function St(e, o) {
201
203
  nyquist: t / 2
202
204
  };
203
205
  }
204
- function Ct(e) {
206
+ function Dt(e) {
205
207
  const o = e.length, r = new Float32Array(o), t = new Float32Array(o);
206
208
  for (let n = 0; n < o; n++)
207
209
  r[n] = e[n].re, t[n] = e[n].im;
@@ -216,11 +218,11 @@ function nt(e, o) {
216
218
  t[n] = { re: e[n], im: o[n] };
217
219
  return t;
218
220
  }
219
- function Dt(e, o) {
221
+ function Lt(e, o) {
220
222
  const r = nt(e, o);
221
223
  return Q(r);
222
224
  }
223
- function Lt(e) {
225
+ function Bt(e) {
224
226
  const o = e.length, t = e.map((c) => ({ re: c.re, im: -c.im })).map((c) => ({ ...c }));
225
227
  q(t);
226
228
  for (let c = 2; c <= o; c *= 2) {
@@ -236,7 +238,7 @@ function Lt(e) {
236
238
  n[c] = t[c].re / o, s[c] = -t[c].im / o;
237
239
  return { real: n, imag: s };
238
240
  }
239
- function Bt(e) {
241
+ function Wt(e) {
240
242
  const o = e.nyquist;
241
243
  return {
242
244
  real: e.real.slice(0, o),
@@ -380,7 +382,7 @@ function M(e, o) {
380
382
  t[c] = (r[c] - t[c - 1]) * n + t[c - 1];
381
383
  return t;
382
384
  }
383
- function Wt(e, o) {
385
+ function _t(e, o) {
384
386
  const r = e instanceof Float32Array || e instanceof Float64Array ? e : Float32Array.from(e), t = new Float32Array(r.length);
385
387
  if (o < 1 || o > r.length)
386
388
  return t.fill(NaN), t;
@@ -395,13 +397,13 @@ function Wt(e, o) {
395
397
  }
396
398
  return t;
397
399
  }
398
- function _t(e, o) {
400
+ function zt(e, o) {
399
401
  const r = M(e, o), t = M(r, o), n = new Float32Array(e.length);
400
402
  for (let s = 0; s < e.length; s++)
401
403
  n[s] = 2 * r[s] - t[s];
402
404
  return n;
403
405
  }
404
- function zt(e, o) {
406
+ function Et(e, o) {
405
407
  const r = M(e, o), t = M(r, o), n = M(t, o), s = new Float32Array(e.length);
406
408
  for (let c = 0; c < e.length; c++)
407
409
  s[c] = 3 * r[c] - 3 * t[c] + n[c];
@@ -436,7 +438,7 @@ function ct(e, o = 14) {
436
438
  }
437
439
  return t;
438
440
  }
439
- function Et(e, o = 12, r = 26, t = 9) {
441
+ function Tt(e, o = 12, r = 26, t = 9) {
440
442
  const n = e instanceof Float32Array || e instanceof Float64Array ? e : Float32Array.from(e), s = M(n, o), c = M(n, r), a = new Float32Array(n.length);
441
443
  for (let i = 0; i < n.length; i++)
442
444
  a[i] = s[i] - c[i];
@@ -449,7 +451,7 @@ function Et(e, o = 12, r = 26, t = 9) {
449
451
  histogram: f
450
452
  };
451
453
  }
452
- function Tt(e, o = 14, r = 3) {
454
+ function Vt(e, o = 14, r = 3) {
453
455
  const { high: t, low: n, close: s } = e, c = s.length, a = new Float32Array(c);
454
456
  for (let f = 0; f < c; f++) {
455
457
  if (f < o - 1) {
@@ -470,7 +472,7 @@ function Tt(e, o = 14, r = 3) {
470
472
  // %D
471
473
  };
472
474
  }
473
- function Vt(e, o = 10) {
475
+ function Ht(e, o = 10) {
474
476
  const r = e instanceof Float32Array || e instanceof Float64Array ? e : Float32Array.from(e), t = new Float32Array(r.length);
475
477
  for (let n = 0; n < o; n++)
476
478
  t[n] = NaN;
@@ -480,7 +482,7 @@ function Vt(e, o = 10) {
480
482
  }
481
483
  return t;
482
484
  }
483
- function Ht(e, o = 10) {
485
+ function Xt(e, o = 10) {
484
486
  const r = e instanceof Float32Array || e instanceof Float64Array ? e : Float32Array.from(e), t = new Float32Array(r.length);
485
487
  for (let n = 0; n < o; n++)
486
488
  t[n] = NaN;
@@ -488,7 +490,7 @@ function Ht(e, o = 10) {
488
490
  t[n] = r[n] - r[n - o];
489
491
  return t;
490
492
  }
491
- function Xt(e, o = 20, r = 2) {
493
+ function Yt(e, o = 20, r = 2) {
492
494
  const t = e instanceof Float32Array || e instanceof Float64Array ? e : Float32Array.from(e), n = N(t, o), s = new Float32Array(t.length), c = new Float32Array(t.length);
493
495
  for (let a = 0; a < t.length; a++) {
494
496
  if (a < o - 1) {
@@ -509,7 +511,7 @@ function Xt(e, o = 20, r = 2) {
509
511
  lower: c
510
512
  };
511
513
  }
512
- function Yt(e, o = 14) {
514
+ function Gt(e, o = 14) {
513
515
  const { high: r, low: t, close: n } = e, s = n.length, c = new Float32Array(s);
514
516
  c[0] = r[0] - t[0];
515
517
  for (let a = 1; a < s; a++) {
@@ -518,7 +520,7 @@ function Yt(e, o = 14) {
518
520
  }
519
521
  return M(c, o);
520
522
  }
521
- function Gt(e, o = 20) {
523
+ function Ot(e, o = 20) {
522
524
  const r = e instanceof Float32Array || e instanceof Float64Array ? e : Float32Array.from(e), t = new Float32Array(r.length), n = N(r, o);
523
525
  for (let s = 0; s < r.length; s++) {
524
526
  if (s < o - 1) {
@@ -534,7 +536,7 @@ function Gt(e, o = 20) {
534
536
  }
535
537
  return t;
536
538
  }
537
- function Ot(e) {
539
+ function Zt(e) {
538
540
  const { high: o, low: r, close: t, volume: n } = e;
539
541
  if (!n)
540
542
  throw new Error("VWAP requires volume data");
@@ -546,21 +548,21 @@ function Ot(e) {
546
548
  }
547
549
  return c;
548
550
  }
549
- function Zt(e, o) {
551
+ function Ut(e, o) {
550
552
  const r = e instanceof Float32Array || e instanceof Float64Array ? e : Float32Array.from(e), t = o instanceof Float32Array || o instanceof Float64Array ? o : Float32Array.from(o), n = new Float32Array(r.length);
551
553
  n[0] = t[0];
552
554
  for (let s = 1; s < r.length; s++)
553
555
  r[s] > r[s - 1] ? n[s] = n[s - 1] + t[s] : r[s] < r[s - 1] ? n[s] = n[s - 1] - t[s] : n[s] = n[s - 1];
554
556
  return n;
555
557
  }
556
- function Ut(e, o = 14) {
558
+ function Kt(e, o = 14) {
557
559
  const { high: r, low: t, close: n } = e, s = n.length, c = new Float32Array(s), a = new Float32Array(s), l = new Float32Array(s);
558
560
  l[0] = r[0] - t[0], c[0] = 0, a[0] = 0;
559
561
  for (let g = 1; g < s; g++) {
560
562
  const F = r[g] - r[g - 1], A = t[g - 1] - t[g];
561
563
  c[g] = F > A && F > 0 ? F : 0, a[g] = A > F && A > 0 ? A : 0;
562
- const b = r[g] - t[g], p = Math.abs(r[g] - n[g - 1]), d = Math.abs(t[g] - n[g - 1]);
563
- l[g] = Math.max(b, p, d);
564
+ const p = r[g] - t[g], b = Math.abs(r[g] - n[g - 1]), d = Math.abs(t[g] - n[g - 1]);
565
+ l[g] = Math.max(p, b, d);
564
566
  }
565
567
  const f = M(l, o), i = M(c, o), u = M(a, o), h = new Float32Array(s), m = new Float32Array(s), y = new Float32Array(s);
566
568
  for (let g = 0; g < s; g++)
@@ -579,7 +581,7 @@ function Ut(e, o = 14) {
579
581
  // -DI
580
582
  };
581
583
  }
582
- function Kt(e, o = 25) {
584
+ function Qt(e, o = 25) {
583
585
  const { high: r, low: t } = e, n = r.length, s = new Float32Array(n), c = new Float32Array(n);
584
586
  for (let l = 0; l < n; l++) {
585
587
  if (l < o) {
@@ -600,7 +602,7 @@ function Kt(e, o = 25) {
600
602
  lower: c
601
603
  };
602
604
  }
603
- function Qt(e, o = 1) {
605
+ function Jt(e, o = 1) {
604
606
  const r = e instanceof Float32Array || e instanceof Float64Array ? e : Float32Array.from(e), t = new Float32Array(r.length);
605
607
  for (let n = 0; n < o; n++)
606
608
  t[n] = NaN;
@@ -610,14 +612,14 @@ function Qt(e, o = 1) {
610
612
  }
611
613
  return t;
612
614
  }
613
- function Jt(e) {
615
+ function tn(e) {
614
616
  const o = e instanceof Float32Array || e instanceof Float64Array ? e : Float32Array.from(e), r = new Float32Array(o.length);
615
617
  r[0] = o[0];
616
618
  for (let t = 1; t < o.length; t++)
617
619
  r[t] = r[t - 1] + o[t];
618
620
  return r;
619
621
  }
620
- function tn(e) {
622
+ function nn(e) {
621
623
  const o = e instanceof Float32Array || e instanceof Float64Array ? e : Float32Array.from(e), r = new Float32Array(o.length);
622
624
  let t = 1 / 0, n = -1 / 0;
623
625
  for (let c = 0; c < o.length; c++)
@@ -630,15 +632,15 @@ function tn(e) {
630
632
  r[c] = (o[c] - t) / s * 100;
631
633
  return r;
632
634
  }
633
- function nn(e, o, r, t = 5) {
635
+ function en(e, o, r, t = 5) {
634
636
  const n = o / (r / 2), s = L(Math.min(n, 0.99), t);
635
637
  return P(e, s);
636
638
  }
637
- function en(e, o, r, t = 5) {
639
+ function on(e, o, r, t = 5) {
638
640
  const n = o / (r / 2), s = at(Math.min(n, 0.99), t);
639
641
  return P(e, s);
640
642
  }
641
- function on(e, o, r, t, n = 5) {
643
+ function rn(e, o, r, t, n = 5) {
642
644
  const s = o / (t / 2), c = r / (t / 2), a = B(
643
645
  Math.max(s, 0.01),
644
646
  Math.min(c, 0.99),
@@ -646,7 +648,7 @@ function on(e, o, r, t, n = 5) {
646
648
  );
647
649
  return P(e, a);
648
650
  }
649
- function rn(e, o, r, t, n = 5) {
651
+ function sn(e, o, r, t, n = 5) {
650
652
  const s = o / (t / 2), c = r / (t / 2), a = lt(
651
653
  Math.max(s, 0.01),
652
654
  Math.min(c, 0.99),
@@ -697,7 +699,7 @@ function P(e, o) {
697
699
  }
698
700
  return s;
699
701
  }
700
- function sn(e, o) {
702
+ function cn(e, o) {
701
703
  const { type: r, cutoff: t, cutoffHigh: n, sampleRate: s = 1, order: c = 2 } = o, a = 2 * t / s, l = n ? 2 * n / s : void 0, { b: f, a: i } = ut(r, a, l);
702
704
  return W(e, f, i);
703
705
  }
@@ -752,7 +754,7 @@ function gt(e, o, r) {
752
754
  a: [1, 2 * (t * t - 1) * c, (1 - t / s + t * t) * c]
753
755
  };
754
756
  }
755
- function j(e, o, r) {
757
+ function R(e, o, r) {
756
758
  const t = e.length, n = new Float32Array(t);
757
759
  for (let s = 0; s < t; s++) {
758
760
  n[s] = o[0] * e[s];
@@ -762,22 +764,22 @@ function j(e, o, r) {
762
764
  return n;
763
765
  }
764
766
  function W(e, o, r) {
765
- const t = j(e, o, r), n = new Float32Array(t.length);
767
+ const t = R(e, o, r), n = new Float32Array(t.length);
766
768
  for (let a = 0; a < t.length; a++)
767
769
  n[a] = t[t.length - 1 - a];
768
- const s = j(n, o, r), c = new Float32Array(s.length);
770
+ const s = R(n, o, r), c = new Float32Array(s.length);
769
771
  for (let a = 0; a < s.length; a++)
770
772
  c[a] = s[s.length - 1 - a];
771
773
  return c;
772
774
  }
773
- function cn(e, o = 0.3) {
775
+ function an(e, o = 0.3) {
774
776
  const r = e.length, t = new Float32Array(r);
775
777
  t[0] = e[0];
776
778
  for (let n = 1; n < r; n++)
777
779
  t[n] = o * e[n] + (1 - o) * t[n - 1];
778
780
  return t;
779
781
  }
780
- function an(e, o = 2) {
782
+ function ln(e, o = 2) {
781
783
  const r = e.length, t = new Float32Array(r), n = Math.ceil(o * 3) * 2 + 1, s = Math.floor(n / 2), c = new Float32Array(n);
782
784
  let a = 0;
783
785
  for (let l = 0; l < n; l++) {
@@ -796,7 +798,7 @@ function an(e, o = 2) {
796
798
  }
797
799
  return t;
798
800
  }
799
- function ln(e, o = 5, r = 2) {
801
+ function fn(e, o = 5, r = 2) {
800
802
  const t = e.length, n = new Float32Array(t), s = Math.floor(o / 2), c = yt(o);
801
803
  for (let a = 0; a < t; a++) {
802
804
  let l = 0;
@@ -819,7 +821,7 @@ function yt(e, o) {
819
821
  for (let c = 0; c < e; c++) t[c] /= s;
820
822
  return t;
821
823
  }
822
- function fn(e, o = 5) {
824
+ function un(e, o = 5) {
823
825
  const r = e.length, t = new Float32Array(r), n = Math.floor(o / 2);
824
826
  for (let s = 0; s < r; s++) {
825
827
  const c = [];
@@ -831,7 +833,7 @@ function fn(e, o = 5) {
831
833
  }
832
834
  return t;
833
835
  }
834
- function un(e, o, r, t = {}) {
836
+ function hn(e, o, r, t = {}) {
835
837
  const n = o.length, s = r.length, c = Math.min(...e), a = Math.max(...e), l = t.levels || wt(c, a, t.numLevels || 10), f = [];
836
838
  for (const i of l) {
837
839
  const u = [];
@@ -924,9 +926,9 @@ function At(e, o, r) {
924
926
  const F = g - s;
925
927
  l[g] = F;
926
928
  let A = 0;
927
- for (let b = 0; b < t; b++) {
928
- const p = b + F;
929
- p >= 0 && p < n && (A += (e[b] - f) * (o[p] - i));
929
+ for (let p = 0; p < t; p++) {
930
+ const b = p + F;
931
+ b >= 0 && b < n && (A += (e[p] - f) * (o[b] - i));
930
932
  }
931
933
  a[g] = m > 0 ? A / m : 0, a[g] > y && (y = a[g], w = g);
932
934
  }
@@ -937,25 +939,25 @@ function At(e, o, r) {
937
939
  lagAtMax: l[w]
938
940
  };
939
941
  }
940
- function hn(e, o) {
942
+ function mn(e, o) {
941
943
  return At(e, e, o);
942
944
  }
943
- function mn(e, o = {}) {
945
+ function gn(e, o = {}) {
944
946
  const { method: r = "zscore", windowSize: t } = o;
945
947
  switch (r) {
946
948
  case "zscore":
947
- return R(e, o.threshold ?? 3, t);
949
+ return j(e, o.threshold ?? 3, t);
948
950
  case "mad":
949
951
  return Mt(e, o.threshold ?? 2.5);
950
952
  case "iqr":
951
- return bt(e, o.threshold ?? 1.5);
953
+ return pt(e, o.threshold ?? 1.5);
952
954
  case "isolation":
953
- return pt(e, o.threshold ?? 0.5);
955
+ return bt(e, o.threshold ?? 0.5);
954
956
  default:
955
- return R(e, 3, t);
957
+ return j(e, 3, t);
956
958
  }
957
959
  }
958
- function R(e, o, r) {
960
+ function j(e, o, r) {
959
961
  const t = e.length, n = new Float32Array(t), s = [];
960
962
  if (r && r < t) {
961
963
  const c = Math.floor(r / 2);
@@ -986,13 +988,13 @@ function Mt(e, o, r) {
986
988
  n[u] = i > 0 ? Math.abs(e[u] - a) / i : 0, n[u] > o && s.push(u);
987
989
  return { indices: s, scores: n, threshold: o };
988
990
  }
989
- function bt(e, o) {
991
+ function pt(e, o) {
990
992
  const r = e.length, t = new Float32Array(r), n = [], s = Array.from(e).sort((u, h) => u - h), c = s[Math.floor(r * 0.25)], a = s[Math.floor(r * 0.75)], l = a - c, f = c - o * l, i = a + o * l;
991
993
  for (let u = 0; u < r; u++)
992
994
  e[u] < f ? (t[u] = (f - e[u]) / l, n.push(u)) : e[u] > i ? (t[u] = (e[u] - i) / l, n.push(u)) : t[u] = 0;
993
995
  return { indices: n, scores: t, threshold: o };
994
996
  }
995
- function pt(e, o, r) {
997
+ function bt(e, o, r) {
996
998
  const t = e.length, n = new Float32Array(t), s = [], c = It(e);
997
999
  for (let a = 0; a < t; a++) {
998
1000
  let l = 0;
@@ -1038,7 +1040,7 @@ function dt(e, o) {
1038
1040
  } else return o ? k(e, o) : dt(e, 1);
1039
1041
  return n;
1040
1042
  }
1041
- function gn(e, o) {
1043
+ function yn(e, o) {
1042
1044
  const r = e.length, t = new Float32Array(r);
1043
1045
  if (r < 2)
1044
1046
  return t[0] = 0, t;
@@ -1054,7 +1056,7 @@ function gn(e, o) {
1054
1056
  t[n] = t[n - 1] + (e[n - 1] + e[n]) / 2;
1055
1057
  return t;
1056
1058
  }
1057
- function yn(e, o) {
1059
+ function wn(e, o) {
1058
1060
  const r = e.length, t = o.length;
1059
1061
  let n = 0, s = 0;
1060
1062
  for (let y = 0; y < r; y++) n += e[y];
@@ -1085,7 +1087,7 @@ const xt = {
1085
1087
  provides: ["analysis"],
1086
1088
  tags: ["fft", "filters", "statistics", "math"]
1087
1089
  };
1088
- function wn(e = {}) {
1090
+ function Fn(e = {}) {
1089
1091
  let o;
1090
1092
  return {
1091
1093
  manifest: xt,
@@ -1099,17 +1101,17 @@ function wn(e = {}) {
1099
1101
  return K(o.chart, r, t, n);
1100
1102
  },
1101
1103
  // Math & Stats
1102
- integrate: U,
1103
- derivative: Z,
1104
- calculateStats: O,
1105
- validateData: G,
1104
+ integrate: E,
1105
+ derivative: z,
1106
+ calculateStats: U,
1107
+ validateData: Z,
1106
1108
  // Signal Processing
1107
1109
  fft: (r) => v(r),
1108
- detectPeaks: Y,
1109
- detectCycles: X,
1110
- movingAverage: H,
1111
- subtractBaseline: V,
1112
- downsampleLTTB: T,
1110
+ detectPeaks: O,
1111
+ detectCycles: G,
1112
+ movingAverage: Y,
1113
+ subtractBaseline: X,
1114
+ downsampleLTTB: H,
1113
1115
  singleFrequencyFilter: it,
1114
1116
  // Fitting
1115
1117
  fitData: D,
@@ -1118,85 +1120,85 @@ function wn(e = {}) {
1118
1120
  ema: M,
1119
1121
  rsi: ct,
1120
1122
  // Utils
1121
- formatWithPrefix: E,
1122
- generateCycleColors: z
1123
+ formatWithPrefix: V,
1124
+ generateCycleColors: T
1123
1125
  }
1124
1126
  };
1125
1127
  }
1126
1128
  export {
1127
- wn as PluginAnalysis,
1128
- Ut as adx,
1129
- kt as analyzeComplexSpectrum,
1129
+ Fn as PluginAnalysis,
1130
+ Kt as adx,
1131
+ St as analyzeComplexSpectrum,
1130
1132
  C as analyzeSpectrum,
1131
- Kt as aroon,
1133
+ Qt as aroon,
1132
1134
  nt as arraysToComplex,
1133
- Yt as atr,
1134
- hn as autoCorrelation,
1135
- on as bandPassFilter,
1136
- rn as bandStopFilter,
1137
- Rt as blackmanWindow,
1138
- Xt as bollingerBands,
1139
- sn as butterworth,
1135
+ Gt as atr,
1136
+ mn as autoCorrelation,
1137
+ rn as bandPassFilter,
1138
+ sn as bandStopFilter,
1139
+ kt as blackmanWindow,
1140
+ Yt as bollingerBands,
1141
+ cn as butterworth,
1140
1142
  I as calculateR2,
1141
- O as calculateStats,
1142
- Ct as complexToArrays,
1143
+ U as calculateStats,
1144
+ Dt as complexToArrays,
1143
1145
  At as crossCorrelation,
1144
- Jt as cumsum,
1145
- Mn as cumulativeIntegral,
1146
- gn as cumulativeIntegral2,
1147
- wn as default,
1148
- _t as dema,
1149
- Z as derivative,
1150
- mn as detectAnomalies,
1151
- X as detectCycles,
1152
- Y as detectPeaks,
1153
- vt as dominantFrequency,
1154
- T as downsampleLTTB,
1146
+ tn as cumsum,
1147
+ pn as cumulativeIntegral,
1148
+ yn as cumulativeIntegral2,
1149
+ Fn as default,
1150
+ zt as dema,
1151
+ z as derivative,
1152
+ gn as detectAnomalies,
1153
+ G as detectCycles,
1154
+ O as detectPeaks,
1155
+ $t as dominantFrequency,
1156
+ H as downsampleLTTB,
1155
1157
  M as ema,
1156
- cn as exponentialMovingAverage,
1158
+ an as exponentialMovingAverage,
1157
1159
  v as fft,
1158
- St as fftFromComplexInput,
1160
+ Ct as fftFromComplexInput,
1159
1161
  D as fitData,
1160
- bn as formatScientific,
1161
- pn as formatValue,
1162
- E as formatWithPrefix,
1163
- an as gaussianSmooth,
1164
- un as generateContours,
1165
- z as generateCycleColors,
1166
- In as getBestPrefix,
1167
- Bt as getPositiveFrequencies,
1162
+ In as formatScientific,
1163
+ dn as formatValue,
1164
+ V as formatWithPrefix,
1165
+ ln as gaussianSmooth,
1166
+ hn as generateContours,
1167
+ T as generateCycleColors,
1168
+ qn as getBestPrefix,
1169
+ Wt as getPositiveFrequencies,
1168
1170
  jt as hammingWindow,
1169
- $t as hanningWindow,
1170
- en as highPassFilter,
1171
+ Rt as hanningWindow,
1172
+ on as highPassFilter,
1171
1173
  Q as ifft,
1172
- Lt as ifftComplex,
1173
- Dt as ifftFromArrays,
1174
- U as integrate,
1175
- nn as lowPassFilter,
1176
- Et as macd,
1177
- fn as medianFilter,
1178
- Ht as momentum,
1179
- H as movingAverage,
1174
+ Bt as ifftComplex,
1175
+ Lt as ifftFromArrays,
1176
+ E as integrate,
1177
+ en as lowPassFilter,
1178
+ Tt as macd,
1179
+ un as medianFilter,
1180
+ Xt as momentum,
1181
+ Y as movingAverage,
1180
1182
  S as nextPowerOf2,
1181
- tn as normalize,
1182
- Zt as obv,
1183
- Qt as percentChange,
1184
- Pt as powerSpectrum,
1185
- Vt as roc,
1183
+ nn as normalize,
1184
+ Ut as obv,
1185
+ Jt as percentChange,
1186
+ vt as powerSpectrum,
1187
+ Ht as roc,
1186
1188
  ct as rsi,
1187
- ln as savitzkyGolay,
1189
+ fn as savitzkyGolay,
1188
1190
  dt as simpsonsIntegration,
1189
1191
  it as singleFrequencyFilter,
1190
1192
  N as sma,
1191
1193
  _ as solveLinearSystem,
1192
- Gt as standardDeviation,
1193
- Tt as stochastic,
1194
- V as subtractBaseline,
1195
- yn as tTest,
1196
- zt as tema,
1194
+ Ot as standardDeviation,
1195
+ Vt as stochastic,
1196
+ X as subtractBaseline,
1197
+ wn as tTest,
1198
+ Et as tema,
1197
1199
  k as trapezoidalIntegration,
1198
- G as validateData,
1199
- Ot as vwap,
1200
- Wt as wma
1200
+ Z as validateData,
1201
+ Zt as vwap,
1202
+ _t as wma
1201
1203
  };
1202
1204
  //# sourceMappingURL=analysis.js.map