@tradecanvas/chart 1.49.1 → 1.50.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.
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
- import { C as e, S as t, _ as n, a as r, b as i, c as a, d as o, f as s, g as c, h as l, i as u, l as ee, m as te, n as ne, o as re, p as ie, r as ae, s as oe, t as se, u as ce, v as le, w as d, x as ue, y as de } from "./LayoutSession-BlSkHp80.js";
2
- import { CHART_STYLE_KEYS as fe, DARK_TERMINAL as pe, DARK_THEME as me, DARK_THEME as he, DEFAULT_DRAWING_STYLE as ge, DEFAULT_RECONNECT as _e, DEFAULT_SIGNAL_STYLE as ve, DEFAULT_STREAM_CONFIG as ye, DEFAULT_TIMEFRAME_FAVORITES as be, DEFAULT_TRADE_ZONE_STYLE as xe, DEFAULT_TRADING_CONFIG as Se, HNX_SESSIONS as Ce, HOSE_SESSIONS as we, LIGHT_THEME as Te, LIGHT_THEME as Ee, MARKET_CRYPTO as f, MARKET_HNX as p, MARKET_HOSE as m, MARKET_HOSE_ETF as h, MARKET_NYSE as g, MARKET_UPCOM as _, MARKET_VN30F as v, MS_TIME_THRESHOLD as y, PRICE_SOURCES as b, TC_PALETTE as x, TC_SERIES_COLORS as S, TIMEFRAMES_CRYPTO as C, TIMEFRAMES_FOREX as w, TIMEFRAMES_STOCK as T, UPCOM_SESSIONS as E, VN30F_SESSIONS as D, VN_COLORS as De, VOLUME_ALPHA as Oe, barTimeUnit as ke, barsAreDaily as Ae, computePriceLimits as je, createVNTheme as Me, formatFraction as Ne, formatNumber as Pe, formatVND as Fe, formatVolumeLoc as Ie, fractionTick as Le, getCurrentSession as Re, getLocale as ze, indicatorSource as Be, isPriceSource as Ve, isTimeFrame as He, isValidTimeZone as Ue, marketStatus as We, normalizeBar as Ge, normalizeBarTime as Ke, offsetAt as qe, parseIndicatorSource as Je, parseTimeframe as Ye, pickBaseTimeframe as Xe, priceFormatterFor as Ze, priceStepAt as Qe, rankSymbols as $e, readNews as et, readQuote as tt, registerLocale as nt, resampleBars as rt, roundToPriceStep as it, scaleMarketPrices as at, setLocale as ot, sourcePrice as st, stepDecimals as ct, symbolTimeZone as lt, t as ut, tickBarCount as dt, timeframeBucketStart as ft, timeframeToMs as pt, vn30fContracts as mt, vn30fLastTradingDay as ht, volumeColor as gt, wallToUtc as _t, zoneOffsetMinutes as vt } from "@tradecanvas/commons";
3
- import { AlertManager as yt, Animator as bt, BarCountdown as xt, BaseFinanceChart as O, BinanceAdapter as St, BybitAdapter as Ct, CANDLE_PATTERNS as wt, ChartLegend as Tt, ChartStateManager as Et, CoinbaseAdapter as Dt, CompareRenderer as Ot, CrosshairTooltip as kt, CurrentPriceLine as At, DEFAULT_LEGEND_CONFIG as jt, DEFAULT_MAX_WEBGL_CHARTS as Mt, DEFAULT_SESSION_HOURS as Nt, DataExporter as Pt, DrawingBase as Ft, Easing as It, FinanceCrosshair as k, GROUP_HEADER as Lt, INDICATOR_CATEGORIES as Rt, IndicatorBase as zt, IndicatorValueMap as Bt, KeyboardHandler as Vt, KrakenAdapter as Ht, MAX_ALERT_BARS as Ut, MIN_ALERT_BARS as Wt, MockAdapter as Gt, PaperExecutionAdapter as Kt, PollingAdapter as qt, RANGE_PRESETS as Jt, ReplayManager as Yt, ResamplingAdapter as Xt, Screenshot as Zt, SessionBreaks as Qt, SessionShading as $t, SignalMarkerManager as en, StreamManager as tn, TickAggregator as nn, TickBarAdapter as rn, TickBarBuilder as an, TradeZoneManager as on, UndoRedoManager as A, VolumeRenderer as sn, Watermark as cn, WebSocketAdapter as ln, barIndexToTime as un, barIndexToX as dn, barIndexToX as j, canvasMeasure as fn, computeBarLayout as pn, computeCalendarLayout as mn, computeCounterClockLayout as hn, computeDonutLayout as gn, computeHistogramLayout as _n, computeMatrixLayout as vn, computeScatterLayout as yn, correlationMatrix as bn, counterClockPhase as xn, counterClockPhase as Sn, counterClockPoints as Cn, counterClockPoints as wn, detectCandlePatterns as Tn, formatTooltipTime as En, histogramBins as Dn, hitBar as M, hitDay as N, hitMatrixCell as P, hitSlice as F, indicatorCategory as On, isPriceLevelAlert as kn, layoutGroupedTreemap as An, layoutSquarifiedTreemap as jn, layoutUniformGrid as Mn, lttbDownsample as Nn, lttbVisibleIndices as Pn, nearestCounterClockPoint as I, nearestPoint as L, niceScale as Fn, priceToY as In, priceToYMapper as Ln, priceToYMapper as Rn, rangePresetStart as zn, renderBarChart as Bn, renderCalendar as Vn, renderCounterClock as Hn, renderDepthChart as Un, renderDonut as Wn, renderEquityCurve as Gn, renderGauge as Kn, renderHeatmap as qn, renderHistogram as Jn, renderMatrix as Yn, renderScatter as Xn, renderSparkline as Zn, renderWaterfall as Qn, servesTimeframe as $n, setMaxWebGLCharts as er, shownCount as tr, timeToX as nr, timestampToBarIndex as rr, timestampToBarIndex as ir, toHeikinAshi as ar, toKagi as or, toLineBreak as sr, toPointAndFigure as cr, toRangeBars as lr, toRenko as ur, withResampling as dr, withTickBars as fr, xToBarIndex as pr, xToBarIndex as R, xToTime as mr, yToPrice as hr, yToPrice as gr } from "@tradecanvas/core";
1
+ import { C as e, S as t, _ as n, a as r, b as i, c as a, d as o, f as s, g as c, h as l, i as u, l as ee, m as te, n as ne, o as re, p as ie, r as ae, s as oe, t as se, u as ce, v as le, w as d, x as ue, y as de } from "./LayoutSession-Dcvn5KMK.js";
2
+ import { CHART_STYLE_KEYS as fe, DARK_TERMINAL as pe, DARK_THEME as me, DARK_THEME as he, DEFAULT_DRAWING_STYLE as ge, DEFAULT_FONT_FAMILY as _e, DEFAULT_RECONNECT as ve, DEFAULT_SIGNAL_STYLE as ye, DEFAULT_STREAM_CONFIG as be, DEFAULT_TIMEFRAME_FAVORITES as xe, DEFAULT_TRADE_ZONE_STYLE as Se, DEFAULT_TRADING_CONFIG as Ce, HNX_SESSIONS as we, HOSE_SESSIONS as Te, LIGHT_THEME as Ee, LIGHT_THEME as f, MARKET_CRYPTO as p, MARKET_HNX as m, MARKET_HOSE as h, MARKET_HOSE_ETF as g, MARKET_NYSE as _, MARKET_UPCOM as v, MARKET_VN30F as y, MS_TIME_THRESHOLD as b, PRICE_SOURCES as x, SANS_FONT_FAMILY as S, TC_PALETTE as C, TC_SERIES_COLORS as w, TIMEFRAMES_CRYPTO as T, TIMEFRAMES_FOREX as E, TIMEFRAMES_STOCK as D, UPCOM_SESSIONS as De, VN30F_SESSIONS as Oe, VN_COLORS as ke, VOLUME_ALPHA as Ae, barTimeUnit as je, barsAreDaily as Me, computePriceLimits as Ne, createVNTheme as Pe, formatFraction as Fe, formatNumber as Ie, formatVND as Le, formatVolumeLoc as Re, fractionTick as ze, getCurrentSession as Be, getLocale as Ve, indicatorSource as He, isPriceSource as Ue, isTimeFrame as We, isValidTimeZone as Ge, marketStatus as Ke, normalizeBar as qe, normalizeBarTime as Je, offsetAt as Ye, parseIndicatorSource as Xe, parseTimeframe as Ze, pickBaseTimeframe as Qe, priceFormatterFor as $e, priceStepAt as et, rankSymbols as tt, readNews as nt, readQuote as rt, registerLocale as it, resampleBars as at, roundToPriceStep as ot, scaleMarketPrices as st, setLocale as ct, sourcePrice as lt, stepDecimals as ut, symbolTimeZone as dt, t as ft, tickBarCount as pt, timeframeBucketStart as mt, timeframeToMs as ht, vn30fContracts as gt, vn30fLastTradingDay as _t, volumeColor as vt, wallToUtc as yt, zoneOffsetMinutes as bt } from "@tradecanvas/commons";
3
+ import { AlertManager as xt, Animator as St, BarCountdown as Ct, BaseFinanceChart as O, BinanceAdapter as wt, BybitAdapter as Tt, CANDLE_PATTERNS as Et, ChartLegend as Dt, ChartStateManager as Ot, CoinbaseAdapter as kt, CompareRenderer as At, CrosshairTooltip as jt, CurrentPriceLine as Mt, DEFAULT_LEGEND_CONFIG as Nt, DEFAULT_MAX_WEBGL_CHARTS as Pt, DEFAULT_SESSION_HOURS as Ft, DataExporter as It, DrawingBase as Lt, Easing as Rt, FinanceCrosshair as k, GROUP_HEADER as zt, INDICATOR_CATEGORIES as Bt, IndicatorBase as Vt, IndicatorValueMap as Ht, KeyboardHandler as Ut, KrakenAdapter as Wt, MAX_ALERT_BARS as Gt, MIN_ALERT_BARS as Kt, MockAdapter as qt, PaperExecutionAdapter as Jt, PollingAdapter as Yt, RANGE_PRESETS as Xt, ReplayManager as Zt, ResamplingAdapter as Qt, Screenshot as $t, SessionBreaks as en, SessionShading as tn, SignalMarkerManager as nn, StreamManager as rn, TickAggregator as an, TickBarAdapter as on, TickBarBuilder as A, TradeZoneManager as sn, UndoRedoManager as cn, VolumeRenderer as ln, Watermark as un, WebSocketAdapter as dn, barIndexToTime as fn, barIndexToX as pn, barIndexToX as j, canvasMeasure as mn, computeBarLayout as hn, computeCalendarLayout as gn, computeCounterClockLayout as _n, computeDonutLayout as vn, computeHistogramLayout as yn, computeMatrixLayout as bn, computeScatterLayout as xn, correlationMatrix as Sn, counterClockPhase as Cn, counterClockPhase as wn, counterClockPoints as Tn, counterClockPoints as En, detectCandlePatterns as Dn, formatTooltipTime as On, histogramBins as kn, hitBar as M, hitDay as N, hitMatrixCell as P, hitSlice as F, indicatorCategory as An, isPriceLevelAlert as jn, layoutGroupedTreemap as Mn, layoutSquarifiedTreemap as Nn, layoutUniformGrid as Pn, lttbDownsample as Fn, lttbVisibleIndices as In, nearestCounterClockPoint as I, nearestPoint as L, niceScale as Ln, priceToY as Rn, priceToYMapper as zn, priceToYMapper as Bn, rangePresetStart as Vn, renderBarChart as Hn, renderCalendar as Un, renderCounterClock as Wn, renderDepthChart as Gn, renderDonut as Kn, renderEquityCurve as qn, renderGauge as Jn, renderHeatmap as Yn, renderHistogram as Xn, renderMatrix as Zn, renderScatter as Qn, renderSparkline as $n, renderWaterfall as er, servesTimeframe as tr, setMaxWebGLCharts as nr, shownCount as rr, timeToX as ir, timestampToBarIndex as ar, timestampToBarIndex as or, toHeikinAshi as sr, toKagi as cr, toLineBreak as lr, toPointAndFigure as ur, toRangeBars as dr, toRenko as fr, withResampling as pr, withTickBars as mr, xToBarIndex as hr, xToBarIndex as R, xToTime as gr, yToPrice as _r, yToPrice as vr } from "@tradecanvas/core";
4
4
  //#region src/frameworks/syncIndicators.ts
5
- function _r(e) {
5
+ function yr(e) {
6
6
  let { id: t, params: n = {}, position: r = null } = typeof e == "string" ? { id: e } : e;
7
7
  return JSON.stringify([
8
8
  t,
@@ -10,9 +10,9 @@ function _r(e) {
10
10
  r
11
11
  ]);
12
12
  }
13
- function vr(e, t, n) {
13
+ function br(e, t, n) {
14
14
  let r = /* @__PURE__ */ new Map(), i = t.map((e) => {
15
- let t = _r(e), n = r.get(t) ?? 0;
15
+ let t = yr(e), n = r.get(t) ?? 0;
16
16
  return r.set(t, n + 1), {
17
17
  spec: e,
18
18
  key: `${t}#${n}`
@@ -35,16 +35,16 @@ var z = (e, t) => e === t || e.time === t.time && e.open === t.open && e.high ==
35
35
  close: e.close,
36
36
  volume: e.volume
37
37
  }), V = (e) => e.length > 0 ? e[e.length - 1] : null;
38
- function yr(e, t, n) {
38
+ function xr(e, t, n) {
39
39
  for (let r = 0; r < n; r++) if (!z(e[r], t[r])) return !1;
40
40
  return !0;
41
41
  }
42
- function br(e, t) {
42
+ function Sr(e, t) {
43
43
  if (e.isReplayActive()) return !0;
44
44
  let n = V(e.getData());
45
45
  return t.inReplay ? n?.time === t.last?.time : n === t.shownBar ? n?.time === t.last?.time || !e.isExtendedHoursVisible() : !1;
46
46
  }
47
- function xr(e, t) {
47
+ function Cr(e, t) {
48
48
  let n = [];
49
49
  for (let r = t; r < e.length; r++) {
50
50
  if (!d(e[r]) || !(e[r].time > e[r - 1].time)) return null;
@@ -52,16 +52,16 @@ function xr(e, t) {
52
52
  }
53
53
  return n;
54
54
  }
55
- function Sr(e, t, n) {
55
+ function wr(e, t, n) {
56
56
  let r = n.length;
57
- if (r === 0 || !n.last || !d(n.last) || t.length < r || !br(e, n) || t !== n.source && (n.source.length !== r || !yr(n.source, t, r - 1))) return !1;
57
+ if (r === 0 || !n.last || !d(n.last) || t.length < r || !Sr(e, n) || t !== n.source && (n.source.length !== r || !xr(n.source, t, r - 1))) return !1;
58
58
  let i = t[r - 1];
59
59
  if (i.time !== n.last.time || !d(i)) return !1;
60
- let a = xr(t, r);
60
+ let a = Cr(t, r);
61
61
  return a ? (z(i, n.last) || e.updateLastBar(B(i)), a.length === 1 ? e.appendBar(a[0]) : a.length > 1 && e.appendBars(a), !0) : !1;
62
62
  }
63
- function Cr(e, t, n) {
64
- (!n || !Sr(e, t, n)) && e.setData(t.map(B));
63
+ function Tr(e, t, n) {
64
+ (!n || !wr(e, t, n)) && e.setData(t.map(B));
65
65
  let r = t.length > 0 ? B(t[t.length - 1]) : null, i = e.isReplayActive();
66
66
  return {
67
67
  source: t,
@@ -73,18 +73,18 @@ function Cr(e, t, n) {
73
73
  }
74
74
  //#endregion
75
75
  //#region src/plugins/overlayScale.ts
76
- function wr(e) {
77
- let { viewport: t, data: n } = e, r = Rn(t), i = n.length - 1, a = Math.max(0, Math.floor(t.visibleRange.from)), o = Math.min(i, Math.ceil(t.visibleRange.to)), s = (e) => n.length > 0 ? ir(e, n) : e;
76
+ function Er(e) {
77
+ let { viewport: t, data: n } = e, r = Bn(t), i = n.length - 1, a = Math.max(0, Math.floor(t.visibleRange.from)), o = Math.min(i, Math.ceil(t.visibleRange.to)), s = (e) => n.length > 0 ? or(e, n) : e;
78
78
  return {
79
79
  timeToX: (e) => j(s(e), t),
80
80
  xToTime: (e) => {
81
81
  let r = R(e, t);
82
- return n.length > 0 ? un(r, n) : r;
82
+ return n.length > 0 ? fn(r, n) : r;
83
83
  },
84
84
  indexToX: (e) => j(e, t),
85
85
  xToIndex: (e) => R(e, t),
86
86
  priceToY: r,
87
- yToPrice: (e) => gr(e, t),
87
+ yToPrice: (e) => vr(e, t),
88
88
  barWidth: t.barWidth,
89
89
  visible: o < a ? {
90
90
  from: 0,
@@ -130,7 +130,7 @@ var H = {
130
130
  cols: 2,
131
131
  rows: 3
132
132
  }
133
- }, Tr = class {
133
+ }, Dr = class {
134
134
  root;
135
135
  cells = [];
136
136
  layout;
@@ -237,13 +237,13 @@ var H = {
237
237
  this.cells = [], this.root.remove();
238
238
  }
239
239
  }
240
- }, Er = class extends O {
240
+ }, Or = class extends O {
241
241
  options;
242
242
  constructor(e, t) {
243
243
  super(e, t.theme), this.options = t, this.requestRender();
244
244
  }
245
245
  renderChart(e, t, n, r) {
246
- Zn(e, t, n, this.options, r);
246
+ $n(e, t, n, this.options, r);
247
247
  }
248
248
  update(e) {
249
249
  this.options = {
@@ -257,7 +257,7 @@ var H = {
257
257
  ...e
258
258
  }, this.requestRender();
259
259
  }
260
- }, Dr = class extends O {
260
+ }, kr = class extends O {
261
261
  options;
262
262
  crosshair = null;
263
263
  constructor(e, t) {
@@ -265,7 +265,7 @@ var H = {
265
265
  }
266
266
  renderChart(e, t, n, r) {
267
267
  let i = this.crosshair?.getPosition() ?? null;
268
- Un(e, t, n, this.options, r, i);
268
+ Gn(e, t, n, this.options, r, i);
269
269
  }
270
270
  update(e) {
271
271
  this.options = {
@@ -290,7 +290,7 @@ var H = {
290
290
  }
291
291
  renderChart(e, t, n, r) {
292
292
  let i = this.crosshair?.getPosition() ?? null;
293
- Gn(e, t, n, this.options, r, i);
293
+ qn(e, t, n, this.options, r, i);
294
294
  }
295
295
  update(e, t) {
296
296
  this.options = {
@@ -337,20 +337,20 @@ var H = {
337
337
  height: this.height
338
338
  }, t = this.options.cellPadding ?? 2;
339
339
  if (this.lastLayoutWidth = this.width, this.lastLayoutHeight = this.height, this.cachedGroups = [], this.options.grouped) {
340
- let { groups: n, cells: r } = An(this.currentData.map((e) => ({
340
+ let { groups: n, cells: r } = Mn(this.currentData.map((e) => ({
341
341
  id: e.id,
342
342
  weight: e.weight ?? (Math.abs(e.value) || 1),
343
343
  group: e.group,
344
344
  value: e.value
345
- })), e, t, Lt);
345
+ })), e, t, zt);
346
346
  this.cachedRects = r, this.cachedGroups = n;
347
347
  } else if (this.options.weighted) {
348
348
  let n = this.currentData.map((e) => ({
349
349
  id: e.id,
350
350
  weight: e.weight ?? (Math.abs(e.value) || 1)
351
351
  }));
352
- this.cachedRects = jn(n, e, t);
353
- } else this.cachedRects = Mn(this.currentData.map((e) => ({ id: e.id })), e, t);
352
+ this.cachedRects = Nn(n, e, t);
353
+ } else this.cachedRects = Pn(this.currentData.map((e) => ({ id: e.id })), e, t);
354
354
  }
355
355
  onCanvasClick(e, t) {
356
356
  if (this.options.onCellClick) for (let n of this.cachedRects) {
@@ -365,7 +365,7 @@ var H = {
365
365
  renderChart(e, t, n, r) {
366
366
  (t !== this.lastLayoutWidth || n !== this.lastLayoutHeight) && this.recomputeLayout();
367
367
  let i = this.crosshair?.getPosition() ?? null;
368
- qn(e, t, n, this.currentData, this.cachedRects, this.options, r, i, this.cachedGroups);
368
+ Yn(e, t, n, this.currentData, this.cachedRects, this.options, r, i, this.cachedGroups);
369
369
  }
370
370
  update(e) {
371
371
  this.currentData = e, this.options = {
@@ -382,7 +382,7 @@ var H = {
382
382
  destroy() {
383
383
  this.crosshair?.destroy(), this.handleClick && this.canvas.removeEventListener("click", this.handleClick), super.destroy();
384
384
  }
385
- }, Or = class extends O {
385
+ }, Ar = class extends O {
386
386
  options;
387
387
  crosshair = null;
388
388
  constructor(e, t) {
@@ -390,7 +390,7 @@ var H = {
390
390
  }
391
391
  renderChart(e, t, n, r) {
392
392
  let i = this.crosshair?.getPosition() ?? null;
393
- Qn(e, t, n, this.options, r, i);
393
+ er(e, t, n, this.options, r, i);
394
394
  }
395
395
  update(e) {
396
396
  this.options = {
@@ -407,12 +407,12 @@ var H = {
407
407
  destroy() {
408
408
  this.crosshair?.destroy(), super.destroy();
409
409
  }
410
- }, kr = 500;
411
- function Ar(e) {
410
+ }, jr = 500;
411
+ function Mr(e) {
412
412
  let t = 1 - e;
413
413
  return 1 - t * t * t;
414
414
  }
415
- var jr = class extends O {
415
+ var Nr = class extends O {
416
416
  options;
417
417
  currentValue;
418
418
  targetValue;
@@ -423,7 +423,7 @@ var jr = class extends O {
423
423
  super(e, t.theme), this.options = t, this.currentValue = t.value, this.targetValue = t.value, this.requestRender();
424
424
  }
425
425
  renderChart(e, t, n, r) {
426
- Kn(e, t, n, this.options, r, this.currentValue);
426
+ Jn(e, t, n, this.options, r, this.currentValue);
427
427
  }
428
428
  setValue(e) {
429
429
  if (this.options.animate === !1) {
@@ -453,7 +453,7 @@ var jr = class extends O {
453
453
  if (this.animationFrameId !== null) return;
454
454
  let e = () => {
455
455
  if (this.animationFrameId = null, this.animationStart === null) return;
456
- let t = this.options.animationDuration ?? kr, n = performance.now() - this.animationStart, r = Math.min(1, n / Math.max(1, t)), i = Ar(r);
456
+ let t = this.options.animationDuration ?? jr, n = performance.now() - this.animationStart, r = Math.min(1, n / Math.max(1, t)), i = Mr(r);
457
457
  this.currentValue = this.animationFrom + (this.targetValue - this.animationFrom) * i, this.requestRender(), r < 1 ? this.animationFrameId = requestAnimationFrame(e) : (this.currentValue = this.targetValue, this.animationStart = null);
458
458
  };
459
459
  this.animationFrameId = requestAnimationFrame(e);
@@ -483,7 +483,7 @@ var jr = class extends O {
483
483
  }
484
484
  renderChart(e, t, n, r) {
485
485
  let i = this.options.crosshair === !1 ? null : this.crosshair.getPosition(), a = this.layoutFor;
486
- (!this.layout || !a || a.options !== this.options || a.width !== t || a.height !== n || a.theme !== r) && (this.layout = this.compute(t, n, r, fn(e, r)), this.layoutFor = {
486
+ (!this.layout || !a || a.options !== this.options || a.width !== t || a.height !== n || a.theme !== r) && (this.layout = this.compute(t, n, r, mn(e, r)), this.layoutFor = {
487
487
  options: this.options,
488
488
  width: t,
489
489
  height: n,
@@ -502,12 +502,12 @@ var jr = class extends O {
502
502
  destroy() {
503
503
  this.crosshair.destroy(), this.canvas.removeEventListener("click", this.onClick), this.canvas.removeEventListener("pointermove", this.onMove), super.destroy();
504
504
  }
505
- }, Mr = class extends G {
505
+ }, Pr = class extends G {
506
506
  compute(e, t, n, r) {
507
- return pn(this.options, e, t, n, r);
507
+ return hn(this.options, e, t, n, r);
508
508
  }
509
509
  draw(e, t, n, r, i, a) {
510
- Bn(e, t, n, this.options, r, i, a);
510
+ Hn(e, t, n, this.options, r, i, a);
511
511
  }
512
512
  describe() {
513
513
  return `Bar chart of ${this.options.series.map((e) => e.name).join(", ")}, ${this.options.categories.length} categories`;
@@ -533,12 +533,12 @@ var jr = class extends O {
533
533
  series: t
534
534
  });
535
535
  }
536
- }, Nr = class extends G {
536
+ }, Fr = class extends G {
537
537
  compute(e, t, n, r) {
538
- return gn(this.options, e, t, n, r);
538
+ return vn(this.options, e, t, n, r);
539
539
  }
540
540
  draw(e, t, n, r, i, a) {
541
- Wn(e, t, n, this.options, r, i, a);
541
+ Kn(e, t, n, this.options, r, i, a);
542
542
  }
543
543
  describe() {
544
544
  let e = this.options.data.filter((e) => Number.isFinite(e.value) && e.value > 0).map((e) => e.label).join(", ");
@@ -557,12 +557,12 @@ var jr = class extends O {
557
557
  update(e) {
558
558
  this.setOptions({ data: e });
559
559
  }
560
- }, Pr = class extends G {
560
+ }, Ir = class extends G {
561
561
  compute(e, t, n, r) {
562
- return yn(this.options, e, t, n, r);
562
+ return xn(this.options, e, t, n, r);
563
563
  }
564
564
  draw(e, t, n, r, i, a) {
565
- Xn(e, t, n, this.options, r, i, a);
565
+ Qn(e, t, n, this.options, r, i, a);
566
566
  }
567
567
  describe() {
568
568
  let e = this.options.series.reduce((e, t) => e + t.points.length, 0);
@@ -581,12 +581,12 @@ var jr = class extends O {
581
581
  update(e) {
582
582
  this.setOptions({ series: e });
583
583
  }
584
- }, Fr = class extends G {
584
+ }, Lr = class extends G {
585
585
  compute(e, t, n, r) {
586
- return _n(this.options, e, t, n, r);
586
+ return yn(this.options, e, t, n, r);
587
587
  }
588
588
  draw(e, t, n, r, i, a) {
589
- Jn(e, t, n, this.options, r, i, a);
589
+ Xn(e, t, n, this.options, r, i, a);
590
590
  }
591
591
  describe() {
592
592
  return `Histogram of ${this.options.values.length} values`;
@@ -601,12 +601,12 @@ var jr = class extends O {
601
601
  update(e) {
602
602
  this.setOptions({ values: e });
603
603
  }
604
- }, Ir = class extends G {
604
+ }, Rr = class extends G {
605
605
  compute(e, t, n, r) {
606
- return mn(this.options, e, t, n, r);
606
+ return gn(this.options, e, t, n, r);
607
607
  }
608
608
  draw(e, t, n, r, i, a) {
609
- Vn(e, t, n, this.options, r, i, a);
609
+ Un(e, t, n, this.options, r, i, a);
610
610
  }
611
611
  describe() {
612
612
  let e = this.options.data.map((e) => e.date).filter((e) => /^\d{4}-\d{2}-\d{2}$/.test(e)).sort(), t = this.options.from ?? e[0], n = this.options.to ?? e[e.length - 1];
@@ -625,12 +625,12 @@ var jr = class extends O {
625
625
  update(e) {
626
626
  this.setOptions({ data: e });
627
627
  }
628
- }, K = 12, Lr = class extends G {
628
+ }, K = 12, zr = class extends G {
629
629
  compute(e, t, n, r) {
630
- return vn(this.options, e, t, n, r);
630
+ return bn(this.options, e, t, n, r);
631
631
  }
632
632
  draw(e, t, n, r, i, a) {
633
- Yn(e, t, n, this.options, r, i, a);
633
+ Zn(e, t, n, this.options, r, i, a);
634
634
  }
635
635
  describe() {
636
636
  let { rows: e, columns: t } = this.options;
@@ -649,12 +649,12 @@ var jr = class extends O {
649
649
  update(e) {
650
650
  this.setOptions({ values: e });
651
651
  }
652
- }, Rr = class extends G {
652
+ }, Br = class extends G {
653
653
  compute(e, t, n, r) {
654
- return hn(this.options, e, t, n, r);
654
+ return _n(this.options, e, t, n, r);
655
655
  }
656
656
  draw(e, t, n, r, i, a) {
657
- Hn(e, t, n, this.options, r, i, a);
657
+ Wn(e, t, n, this.options, r, i, a);
658
658
  }
659
659
  describe() {
660
660
  return `Counter-clock chart of price against volume, ${this.options.period ?? 25}-bar averages`;
@@ -670,12 +670,12 @@ var jr = class extends O {
670
670
  r && this.options.onPointClick?.(r.point);
671
671
  }
672
672
  getPhase() {
673
- return Sn(wn(this.options.data, this.options.period ?? 25, tr(this.options)));
673
+ return wn(En(this.options.data, this.options.period ?? 25, rr(this.options)));
674
674
  }
675
675
  update(e) {
676
676
  this.setOptions({ data: e });
677
677
  }
678
- }, zr = [
678
+ }, Vr = [
679
679
  "Jan",
680
680
  "Feb",
681
681
  "Mar",
@@ -710,7 +710,7 @@ function Y(e) {
710
710
  if (e.length === 0) return [];
711
711
  let t = [];
712
712
  for (let n of e) {
713
- let e = ft(n.time, "1M"), r = t[t.length - 1];
713
+ let e = mt(n.time, "1M"), r = t[t.length - 1];
714
714
  r && r.key === e ? r.close = n.equity : t.push({
715
715
  key: e,
716
716
  close: n.equity
@@ -723,7 +723,7 @@ function Y(e) {
723
723
  let a = new Date(e.key), o = a.getUTCFullYear(), s = a.getUTCMonth();
724
724
  r.push({
725
725
  id: `${o}-${String(s + 1).padStart(2, "0")}`,
726
- label: zr[s],
726
+ label: Vr[s],
727
727
  group: String(o),
728
728
  value: i
729
729
  });
@@ -783,9 +783,9 @@ function Q(e) {
783
783
  //#endregion
784
784
  //#region src/finance/PerformanceDashboard.ts
785
785
  function $(e) {
786
- return !e || e === "dark" ? he : e === "light" ? Ee : e;
786
+ return !e || e === "dark" ? he : e === "light" ? f : e;
787
787
  }
788
- var Br = class {
788
+ var Hr = class {
789
789
  options;
790
790
  theme;
791
791
  root;
@@ -934,6 +934,6 @@ var Br = class {
934
934
  }
935
935
  };
936
936
  //#endregion
937
- export { yt as AlertManager, bt as Animator, Mr as BarChart, xt as BarCountdown, St as BinanceAdapter, Ct as BybitAdapter, wt as CANDLE_PATTERNS, fe as CHART_STYLE_KEYS, Ir as CalendarChart, a as Chart, Tr as ChartGrid, Tt as ChartLegend, Et as ChartStateManager, Dt as CoinbaseAdapter, Ot as CompareRenderer, Rr as CounterClockChart, kt as CrosshairTooltip, At as CurrentPriceLine, pe as DARK_TERMINAL, me as DARK_THEME, ge as DEFAULT_DRAWING_STYLE, ue as DEFAULT_HISTORY_PAGE_SIZE, jt as DEFAULT_LEGEND_CONFIG, Mt as DEFAULT_MAX_WEBGL_CHARTS, _e as DEFAULT_RECONNECT, Nt as DEFAULT_SESSION_HOURS, ve as DEFAULT_SIGNAL_STYLE, ye as DEFAULT_STREAM_CONFIG, be as DEFAULT_TIMEFRAME_FAVORITES, xe as DEFAULT_TRADE_ZONE_STYLE, Se as DEFAULT_TRADING_CONFIG, Pt as DataExporter, e as DataManager, Dr as DepthChart, Nr as DonutChart, re as DragDropImporter, Ft as DrawingBase, ee as EXCHANGE_TIMEZONE, ce as EXCHANGE_TIME_ZONE, It as Easing, U as EquityCurveChart, jr as GaugeChart, t as HISTORY_RETRY_MS, Ce as HNX_SESSIONS, we as HOSE_SESSIONS, W as HeatmapChart, Fr as HistogramChart, Rt as INDICATOR_CATEGORIES, zt as IndicatorBase, Bt as IndicatorValueMap, Vt as KeyboardHandler, Ht as KrakenAdapter, Te as LIGHT_THEME, de as LayoutManager, se as LayoutSession, f as MARKET_CRYPTO, p as MARKET_HNX, m as MARKET_HOSE, h as MARKET_HOSE_ETF, g as MARKET_NYSE, _ as MARKET_UPCOM, v as MARKET_VN30F, Ut as MAX_ALERT_BARS, ne as MAX_LAYOUT_NAME, Wt as MIN_ALERT_BARS, y as MS_TIME_THRESHOLD, Lr as MatrixChart, Gt as MockAdapter, c as PLUGIN_API_VERSION, b as PRICE_SOURCES, Kt as PaperExecutionAdapter, Br as PerformanceDashboard, o as PluginManager, qt as PollingAdapter, Jt as RANGE_PRESETS, Yt as ReplayManager, Xt as ResamplingAdapter, Pr as ScatterChart, Zt as Screenshot, Qt as SessionBreaks, $t as SessionShading, en as SignalMarkerManager, Er as SparklineChart, tn as StreamManager, x as TC_PALETTE, S as TC_SERIES_COLORS, C as TIMEFRAMES_CRYPTO, w as TIMEFRAMES_FOREX, T as TIMEFRAMES_STOCK, i as ThemeManager, nn as TickAggregator, rn as TickBarAdapter, an as TickBarBuilder, on as TradeZoneManager, E as UPCOM_SESSIONS, A as UndoRedoManager, D as VN30F_SESSIONS, De as VN_COLORS, Oe as VOLUME_ALPHA, sn as VolumeRenderer, Or as WaterfallChart, cn as Watermark, ln as WebSocketAdapter, dn as barIndexToX, ke as barTimeUnit, Ae as barsAreDaily, ae as cleanLayoutName, s as clearGlobalPlugins, J as computeDrawdownCurve, Y as computeMonthlyReturns, je as computePriceLimits, bn as correlationMatrix, xn as counterClockPhase, Cn as counterClockPoints, Me as createVNTheme, Tn as detectCandlePatterns, Cr as feedBars, Ne as formatFraction, Pe as formatNumber, En as formatTooltipTime, Fe as formatVND, Ie as formatVolumeLoc, Le as fractionTick, Re as getCurrentSession, ie as getGlobalPlugins, ze as getLocale, Dn as histogramBins, On as indicatorCategory, Be as indicatorSource, kn as isPriceLevelAlert, Ve as isPriceSource, He as isTimeFrame, Ue as isValidTimeZone, u as localStorageLayouts, Nn as lttbDownsample, Pn as lttbVisibleIndices, We as marketStatus, r as memoryLayouts, Fn as niceScale, Ge as normalizeBar, Ke as normalizeBarTime, qe as offsetAt, wr as overlayScale, n as overlaysForLayer, Je as parseIndicatorSource, oe as parseOHLCV, Ye as parseTimeframe, Xe as pickBaseTimeframe, le as pluginKey, Ze as priceFormatterFor, Qe as priceStepAt, In as priceToY, Ln as priceToYMapper, zn as rangePresetStart, $e as rankSymbols, et as readNews, tt as readQuote, nt as registerLocale, te as registerPlugin, rt as resampleBars, it as roundToPriceStep, at as scaleMarketPrices, Q as selectKeyStats, $n as servesTimeframe, ot as setLocale, er as setMaxWebGLCharts, st as sourcePrice, ct as stepDecimals, lt as symbolTimeZone, vr as syncIndicators, ut as t, dt as tickBarCount, nr as timeToX, pt as timeframeToMs, rr as timestampToBarIndex, q as toEquityPoints, ar as toHeikinAshi, or as toKagi, sr as toLineBreak, cr as toPointAndFigure, lr as toRangeBars, ur as toRenko, l as unregisterPlugin, mt as vn30fContracts, ht as vn30fLastTradingDay, gt as volumeColor, _t as wallToUtc, dr as withResampling, fr as withTickBars, pr as xToBarIndex, mr as xToTime, hr as yToPrice, vt as zoneOffsetMinutes };
937
+ export { xt as AlertManager, St as Animator, Pr as BarChart, Ct as BarCountdown, wt as BinanceAdapter, Tt as BybitAdapter, Et as CANDLE_PATTERNS, fe as CHART_STYLE_KEYS, Rr as CalendarChart, a as Chart, Dr as ChartGrid, Dt as ChartLegend, Ot as ChartStateManager, kt as CoinbaseAdapter, At as CompareRenderer, Br as CounterClockChart, jt as CrosshairTooltip, Mt as CurrentPriceLine, pe as DARK_TERMINAL, me as DARK_THEME, ge as DEFAULT_DRAWING_STYLE, _e as DEFAULT_FONT_FAMILY, ue as DEFAULT_HISTORY_PAGE_SIZE, Nt as DEFAULT_LEGEND_CONFIG, Pt as DEFAULT_MAX_WEBGL_CHARTS, ve as DEFAULT_RECONNECT, Ft as DEFAULT_SESSION_HOURS, ye as DEFAULT_SIGNAL_STYLE, be as DEFAULT_STREAM_CONFIG, xe as DEFAULT_TIMEFRAME_FAVORITES, Se as DEFAULT_TRADE_ZONE_STYLE, Ce as DEFAULT_TRADING_CONFIG, It as DataExporter, e as DataManager, kr as DepthChart, Fr as DonutChart, re as DragDropImporter, Lt as DrawingBase, ee as EXCHANGE_TIMEZONE, ce as EXCHANGE_TIME_ZONE, Rt as Easing, U as EquityCurveChart, Nr as GaugeChart, t as HISTORY_RETRY_MS, we as HNX_SESSIONS, Te as HOSE_SESSIONS, W as HeatmapChart, Lr as HistogramChart, Bt as INDICATOR_CATEGORIES, Vt as IndicatorBase, Ht as IndicatorValueMap, Ut as KeyboardHandler, Wt as KrakenAdapter, Ee as LIGHT_THEME, de as LayoutManager, se as LayoutSession, p as MARKET_CRYPTO, m as MARKET_HNX, h as MARKET_HOSE, g as MARKET_HOSE_ETF, _ as MARKET_NYSE, v as MARKET_UPCOM, y as MARKET_VN30F, Gt as MAX_ALERT_BARS, ne as MAX_LAYOUT_NAME, Kt as MIN_ALERT_BARS, b as MS_TIME_THRESHOLD, zr as MatrixChart, qt as MockAdapter, c as PLUGIN_API_VERSION, x as PRICE_SOURCES, Jt as PaperExecutionAdapter, Hr as PerformanceDashboard, o as PluginManager, Yt as PollingAdapter, Xt as RANGE_PRESETS, Zt as ReplayManager, Qt as ResamplingAdapter, S as SANS_FONT_FAMILY, Ir as ScatterChart, $t as Screenshot, en as SessionBreaks, tn as SessionShading, nn as SignalMarkerManager, Or as SparklineChart, rn as StreamManager, C as TC_PALETTE, w as TC_SERIES_COLORS, T as TIMEFRAMES_CRYPTO, E as TIMEFRAMES_FOREX, D as TIMEFRAMES_STOCK, i as ThemeManager, an as TickAggregator, on as TickBarAdapter, A as TickBarBuilder, sn as TradeZoneManager, De as UPCOM_SESSIONS, cn as UndoRedoManager, Oe as VN30F_SESSIONS, ke as VN_COLORS, Ae as VOLUME_ALPHA, ln as VolumeRenderer, Ar as WaterfallChart, un as Watermark, dn as WebSocketAdapter, pn as barIndexToX, je as barTimeUnit, Me as barsAreDaily, ae as cleanLayoutName, s as clearGlobalPlugins, J as computeDrawdownCurve, Y as computeMonthlyReturns, Ne as computePriceLimits, Sn as correlationMatrix, Cn as counterClockPhase, Tn as counterClockPoints, Pe as createVNTheme, Dn as detectCandlePatterns, Tr as feedBars, Fe as formatFraction, Ie as formatNumber, On as formatTooltipTime, Le as formatVND, Re as formatVolumeLoc, ze as fractionTick, Be as getCurrentSession, ie as getGlobalPlugins, Ve as getLocale, kn as histogramBins, An as indicatorCategory, He as indicatorSource, jn as isPriceLevelAlert, Ue as isPriceSource, We as isTimeFrame, Ge as isValidTimeZone, u as localStorageLayouts, Fn as lttbDownsample, In as lttbVisibleIndices, Ke as marketStatus, r as memoryLayouts, Ln as niceScale, qe as normalizeBar, Je as normalizeBarTime, Ye as offsetAt, Er as overlayScale, n as overlaysForLayer, Xe as parseIndicatorSource, oe as parseOHLCV, Ze as parseTimeframe, Qe as pickBaseTimeframe, le as pluginKey, $e as priceFormatterFor, et as priceStepAt, Rn as priceToY, zn as priceToYMapper, Vn as rangePresetStart, tt as rankSymbols, nt as readNews, rt as readQuote, it as registerLocale, te as registerPlugin, at as resampleBars, ot as roundToPriceStep, st as scaleMarketPrices, Q as selectKeyStats, tr as servesTimeframe, ct as setLocale, nr as setMaxWebGLCharts, lt as sourcePrice, ut as stepDecimals, dt as symbolTimeZone, br as syncIndicators, ft as t, pt as tickBarCount, ir as timeToX, ht as timeframeToMs, ar as timestampToBarIndex, q as toEquityPoints, sr as toHeikinAshi, cr as toKagi, lr as toLineBreak, ur as toPointAndFigure, dr as toRangeBars, fr as toRenko, l as unregisterPlugin, gt as vn30fContracts, _t as vn30fLastTradingDay, vt as volumeColor, yt as wallToUtc, pr as withResampling, mr as withTickBars, hr as xToBarIndex, gr as xToTime, _r as yToPrice, bt as zoneOffsetMinutes };
938
938
 
939
939
  //# sourceMappingURL=index.js.map