@363045841yyt/klinechart 0.4.5 → 0.4.7

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
@@ -69,18 +69,18 @@ function ue(e) {
69
69
  let t;
70
70
  return t = typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(e) : e && e.buffer && le(e.buffer), t;
71
71
  }
72
- var de = oe("string"), B = oe("function"), fe = oe("number"), pe = (e) => typeof e == "object" && !!e, me = (e) => e === !0 || e === !1, he = (e) => {
72
+ var de = oe("string"), B = oe("function"), fe = oe("number"), pe = (e) => typeof e == "object" && !!e, me = (e) => e === !0 || e === !1, V = (e) => {
73
73
  if (ae(e) !== "object") return !1;
74
74
  let t = I(e);
75
75
  return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(ie in e) && !(L in e);
76
- }, ge = (e) => {
76
+ }, he = (e) => {
77
77
  if (!pe(e) || z(e)) return !1;
78
78
  try {
79
79
  return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
80
80
  } catch {
81
81
  return !1;
82
82
  }
83
- }, _e = R("Date"), ve = R("File"), ye = (e) => !!(e && e.uri !== void 0), V = (e) => e && e.getParts !== void 0, be = R("Blob"), H = R("FileList"), xe = (e) => pe(e) && B(e.pipe);
83
+ }, H = R("Date"), ge = R("File"), _e = (e) => !!(e && e.uri !== void 0), ve = (e) => e && e.getParts !== void 0, ye = R("Blob"), be = R("FileList"), xe = (e) => pe(e) && B(e.pipe);
84
84
  function Se() {
85
85
  return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
86
86
  }
@@ -119,7 +119,7 @@ function Ie(...e) {
119
119
  let { caseless: t, skipUndefined: n } = Fe(this) && this || {}, r = {}, i = (e, i) => {
120
120
  if (i === "__proto__" || i === "constructor" || i === "prototype") return;
121
121
  let a = t && Ne(r, i) || i, o = Je(r, a) ? r[a] : void 0;
122
- he(o) && he(e) ? r[a] = Ie(o, e) : he(e) ? r[a] = Ie({}, e) : se(e) ? r[a] = e.slice() : (!n || !ce(e)) && (r[a] = e);
122
+ V(o) && V(e) ? r[a] = Ie(o, e) : V(e) ? r[a] = Ie({}, e) : se(e) ? r[a] = e.slice() : (!n || !ce(e)) && (r[a] = e);
123
123
  };
124
124
  for (let t = 0, n = e.length; t < n; t++) e[t] && Me(e[t], i);
125
125
  return r;
@@ -247,24 +247,24 @@ var nt = (e) => {
247
247
  isNumber: fe,
248
248
  isBoolean: me,
249
249
  isObject: pe,
250
- isPlainObject: he,
251
- isEmptyObject: ge,
250
+ isPlainObject: V,
251
+ isEmptyObject: he,
252
252
  isReadableStream: De,
253
253
  isRequest: Oe,
254
254
  isResponse: ke,
255
255
  isHeaders: Ae,
256
256
  isUndefined: ce,
257
- isDate: _e,
258
- isFile: ve,
259
- isReactNativeBlob: ye,
260
- isReactNative: V,
261
- isBlob: be,
257
+ isDate: H,
258
+ isFile: ge,
259
+ isReactNativeBlob: _e,
260
+ isReactNative: ve,
261
+ isBlob: ye,
262
262
  isRegExp: Ye,
263
263
  isFunction: B,
264
264
  isStream: xe,
265
265
  isURLSearchParams: Ee,
266
266
  isTypedArray: Ue,
267
- isFileList: H,
267
+ isFileList: be,
268
268
  forEach: Me,
269
269
  merge: Ie,
270
270
  extend: Le,
@@ -7512,7 +7512,7 @@ var Ma = {
7512
7512
  DOWN_LIGHT: "rgba(3, 123, 102, 0.92)",
7513
7513
  DOWN_TICK: "hsl(150, 30%, 60%)",
7514
7514
  NEUTRAL: "rgba(0, 0, 0, 0.78)",
7515
- LAST_PRICE: "rgb(183, 22, 22)"
7515
+ LAST_PRICE: "rgba(196, 74, 86, 0.95)"
7516
7516
  }, Pa = {
7517
7517
  WHITE: "rgb(255, 255, 255)",
7518
7518
  LIGHT_GRAY: "rgba(255, 255, 255, 0.92)",
@@ -7549,87 +7549,91 @@ var Ma = {
7549
7549
  BAR_DOWN: "#22ab94",
7550
7550
  BAR_DOWN_LIGHT: "#ace5dc"
7551
7551
  }, Ba = {
7552
+ UP: "#ff5252",
7553
+ DOWN: "#22ab94",
7554
+ NEUTRAL: "rgba(0, 0, 0, 0.78)"
7555
+ }, Va = {
7552
7556
  RSI1: "rgba(69, 112, 249, 1)",
7553
7557
  RSI2: "rgba(255, 152, 0, 1)",
7554
7558
  RSI3: "rgba(156, 39, 176, 1)"
7555
- }, Va = {
7559
+ }, Ha = {
7556
7560
  CCI: "rgba(69, 112, 249, 1)",
7557
7561
  OVERBOUGHT: "rgba(214, 10, 34, 0.5)",
7558
7562
  OVERSOLD: "rgba(3, 123, 102, 0.5)"
7559
- }, Ha = {
7563
+ }, Ua = {
7560
7564
  K: "rgba(69, 112, 249, 1)",
7561
7565
  D: "rgba(255, 152, 0, 1)",
7562
7566
  J: "rgba(156, 39, 176, 1)"
7563
- }, Ua = {
7567
+ }, Wa = {
7564
7568
  MOM: "rgba(69, 112, 249, 1)",
7565
7569
  ZERO: "rgba(0, 0, 0, 0.2)"
7566
- }, Wa = {
7570
+ }, Ga = {
7567
7571
  WMSR: "rgba(69, 112, 249, 1)",
7568
7572
  OVERBOUGHT: "rgba(214, 10, 34, 0.5)",
7569
7573
  OVERSOLD: "rgba(3, 123, 102, 0.5)"
7570
- }, Ga = {
7574
+ }, Ka = {
7571
7575
  KST: "rgba(69, 112, 249, 1)",
7572
7576
  SIGNAL: "rgba(255, 152, 0, 1)"
7573
- }, Ka = {
7577
+ }, qa = {
7574
7578
  FAST: "rgba(255, 152, 0, 1)",
7575
7579
  SLOW: "rgba(69, 112, 249, 1)"
7576
- }, qa = {
7580
+ }, Ja = {
7577
7581
  UPPER: "rgba(214, 10, 34, 1)",
7578
7582
  MIDDLE: "rgba(69, 112, 249, 1)",
7579
7583
  LOWER: "rgba(3, 123, 102, 1)",
7580
7584
  BAND_FILL: "rgba(69, 112, 249, 0.08)"
7581
- }, Ja = {
7585
+ }, Ya = {
7582
7586
  LINE: "rgba(0, 0, 0, 0.28)",
7583
7587
  LABEL_BG: "rgb(0, 0, 0)",
7584
7588
  LABEL_TEXT: "rgba(255, 255, 255, 0.92)"
7585
- }, Ya = Na.UP, Xa = Na.DOWN, Za = Na.NEUTRAL;
7586
- function Qa(e) {
7587
- return e > 0 ? Ya : e < 0 ? Xa : Za;
7589
+ }, Xa = Na.UP, Za = Na.DOWN, Qa = Na.NEUTRAL;
7590
+ function $a(e) {
7591
+ return e > 0 ? Xa : e < 0 ? Za : Qa;
7588
7592
  }
7589
- function $a(e, t = 2) {
7593
+ function eo(e, t = 2) {
7590
7594
  let n = Math.abs(e);
7591
7595
  return n >= 1e8 ? `${(e / 1e8).toFixed(t)}亿` : n >= 1e4 ? `${(e / 1e4).toFixed(t)}万` : `${Math.round(e)}`;
7592
7596
  }
7593
- function eo(e, t = 2) {
7597
+ function to(e, t = 2) {
7594
7598
  return `${e > 0 ? "+" : ""}${e.toFixed(t)}`;
7595
7599
  }
7596
- function to(e, t = 2) {
7600
+ function no(e, t = 2) {
7597
7601
  return `${e.toFixed(t)}%`;
7598
7602
  }
7599
- function no(e, t = 2) {
7603
+ function ro(e, t = 2) {
7600
7604
  return `${e > 0 ? "+" : ""}${e.toFixed(t)}%`;
7601
7605
  }
7602
- function ro(e, t) {
7606
+ function io(e, t) {
7603
7607
  let n = t?.close ?? e.open;
7604
- return Qa(e.open - n);
7605
- }
7606
- function io(e) {
7607
- return Qa(e.close - e.open);
7608
+ return $a(e.open - n);
7608
7609
  }
7609
7610
  function ao(e) {
7610
- return typeof e.changePercent == "number" ? Qa(e.changePercent) : typeof e.changeAmount == "number" ? Qa(e.changeAmount) : Za;
7611
+ return $a(e.close - e.open);
7612
+ }
7613
+ function oo(e) {
7614
+ return typeof e.changePercent == "number" ? $a(e.changePercent) : typeof e.changeAmount == "number" ? $a(e.changeAmount) : Qa;
7611
7615
  }
7612
7616
  //#endregion
7613
7617
  //#region src/components/KLineTooltip.vue?vue&type=script&setup=true&lang.ts
7614
- var oo = { class: "kline-tooltip__title" }, so = { key: 0 }, co = { class: "kline-tooltip__grid" }, lo = { class: "row" }, uo = { class: "row" }, fo = { class: "row" }, po = { class: "row" }, mo = {
7618
+ var so = { class: "kline-tooltip__title" }, co = { key: 0 }, lo = { class: "kline-tooltip__grid" }, uo = { class: "row" }, fo = { class: "row" }, po = { class: "row" }, mo = { class: "row" }, ho = {
7615
7619
  key: 0,
7616
7620
  class: "row"
7617
- }, ho = {
7621
+ }, go = {
7618
7622
  key: 1,
7619
7623
  class: "row"
7620
- }, go = {
7624
+ }, _o = {
7621
7625
  key: 2,
7622
7626
  class: "row"
7623
- }, _o = {
7627
+ }, vo = {
7624
7628
  key: 3,
7625
7629
  class: "row"
7626
- }, vo = {
7630
+ }, yo = {
7627
7631
  key: 4,
7628
7632
  class: "row"
7629
- }, yo = {
7633
+ }, bo = {
7630
7634
  key: 5,
7631
7635
  class: "row"
7632
- }, bo = /* @__PURE__ */ u({
7636
+ }, xo = /* @__PURE__ */ u({
7633
7637
  __name: "KLineTooltip",
7634
7638
  props: {
7635
7639
  k: {},
@@ -7647,15 +7651,15 @@ var oo = { class: "kline-tooltip__title" }, so = { key: 0 }, co = { class: "klin
7647
7651
  }
7648
7652
  let l = r(() => {
7649
7653
  let e = t.k;
7650
- if (!e) return Za;
7654
+ if (!e) return Qa;
7651
7655
  let n = t.index;
7652
- return ro(e, typeof n == "number" && n > 0 ? t.data[n - 1] : void 0);
7656
+ return io(e, typeof n == "number" && n > 0 ? t.data[n - 1] : void 0);
7653
7657
  }), u = r(() => {
7654
7658
  let e = t.k;
7655
- return e ? io(e) : Za;
7659
+ return e ? ao(e) : Qa;
7656
7660
  }), d = r(() => {
7657
7661
  let e = t.k;
7658
- return e ? ao(e) : Za;
7662
+ return e ? oo(e) : Qa;
7659
7663
  });
7660
7664
  return (t, r) => e.k ? (g(), o("div", {
7661
7665
  key: 0,
@@ -7665,29 +7669,29 @@ var oo = { class: "kline-tooltip__title" }, so = { key: 0 }, co = { class: "klin
7665
7669
  left: `${e.pos.x}px`,
7666
7670
  top: `${e.pos.y}px`
7667
7671
  })
7668
- }, [s("div", oo, [e.k.stockCode ? (g(), o("span", so, b(e.k.stockCode), 1)) : a("", !0), s("span", null, b(x(ka)(e.k.timestamp)), 1)]), s("div", co, [
7669
- s("div", lo, [r[0] ||= s("span", null, "开", -1), s("span", { style: p({ color: l.value }) }, b(e.k.open.toFixed(2)), 5)]),
7670
- s("div", uo, [r[1] ||= s("span", null, "高", -1), s("span", null, b(e.k.high.toFixed(2)), 1)]),
7671
- s("div", fo, [r[2] ||= s("span", null, "低", -1), s("span", null, b(e.k.low.toFixed(2)), 1)]),
7672
- s("div", po, [r[3] ||= s("span", null, "收", -1), s("span", { style: p({ color: u.value }) }, b(e.k.close.toFixed(2)), 5)]),
7673
- typeof e.k.volume == "number" ? (g(), o("div", mo, [r[4] ||= s("span", null, "成交量", -1), s("span", null, b(x($a)(e.k.volume)), 1)])) : a("", !0),
7674
- typeof e.k.turnover == "number" ? (g(), o("div", ho, [r[5] ||= s("span", null, "成交额", -1), s("span", null, b(x($a)(e.k.turnover)), 1)])) : a("", !0),
7675
- typeof e.k.amplitude == "number" ? (g(), o("div", go, [r[6] ||= s("span", null, "振幅", -1), s("span", null, b(e.k.amplitude) + "%", 1)])) : a("", !0),
7676
- typeof e.k.changePercent == "number" ? (g(), o("div", _o, [r[7] ||= s("span", null, "涨跌幅", -1), s("span", { style: p({ color: d.value }) }, b(x(no)(e.k.changePercent)), 5)])) : a("", !0),
7677
- typeof e.k.changeAmount == "number" ? (g(), o("div", vo, [r[8] ||= s("span", null, "涨跌额", -1), s("span", { style: p({ color: d.value }) }, b(x(eo)(e.k.changeAmount)), 5)])) : a("", !0),
7678
- typeof e.k.turnoverRate == "number" ? (g(), o("div", yo, [r[9] ||= s("span", null, "换手率", -1), s("span", null, b(x(to)(e.k.turnoverRate)), 1)])) : a("", !0)
7672
+ }, [s("div", so, [e.k.stockCode ? (g(), o("span", co, b(e.k.stockCode), 1)) : a("", !0), s("span", null, b(x(ka)(e.k.timestamp)), 1)]), s("div", lo, [
7673
+ s("div", uo, [r[0] ||= s("span", null, "开", -1), s("span", { style: p({ color: l.value }) }, b(e.k.open.toFixed(2)), 5)]),
7674
+ s("div", fo, [r[1] ||= s("span", null, "高", -1), s("span", null, b(e.k.high.toFixed(2)), 1)]),
7675
+ s("div", po, [r[2] ||= s("span", null, "低", -1), s("span", null, b(e.k.low.toFixed(2)), 1)]),
7676
+ s("div", mo, [r[3] ||= s("span", null, "收", -1), s("span", { style: p({ color: u.value }) }, b(e.k.close.toFixed(2)), 5)]),
7677
+ typeof e.k.volume == "number" ? (g(), o("div", ho, [r[4] ||= s("span", null, "成交量", -1), s("span", null, b(x(eo)(e.k.volume)), 1)])) : a("", !0),
7678
+ typeof e.k.turnover == "number" ? (g(), o("div", go, [r[5] ||= s("span", null, "成交额", -1), s("span", null, b(x(eo)(e.k.turnover)), 1)])) : a("", !0),
7679
+ typeof e.k.amplitude == "number" ? (g(), o("div", _o, [r[6] ||= s("span", null, "振幅", -1), s("span", null, b(e.k.amplitude) + "%", 1)])) : a("", !0),
7680
+ typeof e.k.changePercent == "number" ? (g(), o("div", vo, [r[7] ||= s("span", null, "涨跌幅", -1), s("span", { style: p({ color: d.value }) }, b(x(ro)(e.k.changePercent)), 5)])) : a("", !0),
7681
+ typeof e.k.changeAmount == "number" ? (g(), o("div", yo, [r[8] ||= s("span", null, "涨跌额", -1), s("span", { style: p({ color: d.value }) }, b(x(to)(e.k.changeAmount)), 5)])) : a("", !0),
7682
+ typeof e.k.turnoverRate == "number" ? (g(), o("div", bo, [r[9] ||= s("span", null, "换手率", -1), s("span", null, b(x(no)(e.k.turnoverRate)), 1)])) : a("", !0)
7679
7683
  ])], 6)) : a("", !0);
7680
7684
  }
7681
- }), xo = (e, t) => {
7685
+ }), So = (e, t) => {
7682
7686
  let n = e.__vccOpts || e;
7683
7687
  for (let [e, r] of t) n[e] = r;
7684
7688
  return n;
7685
- }, So = /* @__PURE__ */ xo(bo, [["__scopeId", "data-v-d0fe85e6"]]), Co = {
7689
+ }, Co = /* @__PURE__ */ So(xo, [["__scopeId", "data-v-d0fe85e6"]]), wo = {
7686
7690
  RISE_WITH_VOLUME: "量价齐升",
7687
7691
  RISE_WITHOUT_VOLUME: "量缩价升",
7688
7692
  FALL_WITH_VOLUME: "量价齐缩",
7689
7693
  FALL_WITHOUT_VOLUME: "量升价缩"
7690
- }, wo = class {
7694
+ }, To = class {
7691
7695
  markers = /* @__PURE__ */ new Map();
7692
7696
  hoveredMarkerId = null;
7693
7697
  lastHoveredId = null;
@@ -7749,10 +7753,10 @@ var oo = { class: "kline-tooltip__title" }, so = { key: 0 }, co = { class: "klin
7749
7753
  }
7750
7754
  return null;
7751
7755
  }
7752
- }, To = { class: "marker-tooltip__title" }, Eo = {
7756
+ }, Eo = { class: "marker-tooltip__title" }, Do = {
7753
7757
  key: 0,
7754
7758
  class: "marker-tooltip__content"
7755
- }, Do = /* @__PURE__ */ xo(/* @__PURE__ */ u({
7759
+ }, Oo = /* @__PURE__ */ So(/* @__PURE__ */ u({
7756
7760
  __name: "MarkerTooltip",
7757
7761
  props: {
7758
7762
  marker: {},
@@ -7773,7 +7777,7 @@ var oo = { class: "kline-tooltip__title" }, so = { key: 0 }, co = { class: "klin
7773
7777
  return e.label?.text || e.shape;
7774
7778
  }
7775
7779
  let e = n.marker;
7776
- return Co[e.markerType] || e.markerType;
7780
+ return wo[e.markerType] || e.markerType;
7777
7781
  }), m = r(() => {
7778
7782
  if (!n.marker) return {};
7779
7783
  if (u.value) {
@@ -7796,27 +7800,27 @@ var oo = { class: "kline-tooltip__title" }, so = { key: 0 }, co = { class: "klin
7796
7800
  left: `${t.pos.x + 12}px`,
7797
7801
  top: `${t.pos.y + 12}px`
7798
7802
  })
7799
- }, [s("div", To, b(d.value), 1), h.value ? (g(), o("div", Eo, [(g(!0), o(e, null, v(m.value, (e, t) => (g(), o("div", {
7803
+ }, [s("div", Eo, b(d.value), 1), h.value ? (g(), o("div", Do, [(g(!0), o(e, null, v(m.value, (e, t) => (g(), o("div", {
7800
7804
  key: t,
7801
7805
  class: "row"
7802
7806
  }, [s("span", null, b(t), 1), s("span", null, b(_(e)), 1)]))), 128))])) : a("", !0)], 6)) : a("", !0);
7803
7807
  }
7804
- }), [["__scopeId", "data-v-5574cc25"]]), Oo = { class: "params-header" }, ko = { class: "header-left" }, Ao = { class: "params-title" }, jo = { class: "header-right" }, Mo = {
7808
+ }), [["__scopeId", "data-v-5574cc25"]]), ko = { class: "params-header" }, Ao = { class: "header-left" }, jo = { class: "params-title" }, Mo = { class: "header-right" }, No = {
7805
7809
  key: 0,
7806
7810
  class: "indicator-description"
7807
- }, No = { class: "params-body" }, Po = { class: "param-header" }, Fo = { class: "param-label" }, Io = { class: "param-label-text" }, Lo = {
7811
+ }, Po = { class: "params-body" }, Fo = { class: "param-header" }, Io = { class: "param-label" }, Lo = { class: "param-label-text" }, Ro = {
7808
7812
  key: 0,
7809
7813
  class: "param-range"
7810
- }, Ro = { class: "input-wrapper" }, zo = ["disabled", "onClick"], Bo = [
7814
+ }, zo = { class: "input-wrapper" }, Bo = ["disabled", "onClick"], Vo = [
7811
7815
  "value",
7812
7816
  "min",
7813
7817
  "max",
7814
7818
  "step",
7815
7819
  "onInput"
7816
- ], Vo = ["disabled", "onClick"], Ho = {
7820
+ ], Ho = ["disabled", "onClick"], Uo = {
7817
7821
  key: 0,
7818
7822
  class: "param-description"
7819
- }, Uo = { class: "params-footer" }, Wo = { class: "footer-right" }, Go = /* @__PURE__ */ xo(/* @__PURE__ */ u({
7823
+ }, Wo = { class: "params-footer" }, Go = { class: "footer-right" }, Ko = /* @__PURE__ */ So(/* @__PURE__ */ u({
7820
7824
  __name: "IndicatorParams",
7821
7825
  props: {
7822
7826
  visible: { type: Boolean },
@@ -7864,7 +7868,7 @@ var oo = { class: "kline-tooltip__title" }, so = { key: 0 }, co = { class: "klin
7864
7868
  class: "indicator-params",
7865
7869
  onClick: d[3] ||= w(() => {}, ["stop"])
7866
7870
  }, [
7867
- s("div", Oo, [s("div", ko, [s("span", Ao, b(r.indicatorName), 1), d[5] ||= s("span", { class: "params-subtitle" }, "参数设置", -1)]), s("div", jo, [s("button", {
7871
+ s("div", ko, [s("div", Ao, [s("span", jo, b(r.indicatorName), 1), d[5] ||= s("span", { class: "params-subtitle" }, "参数设置", -1)]), s("div", Mo, [s("button", {
7868
7872
  class: f(["toggle-desc-btn", { active: h.value }]),
7869
7873
  onClick: d[0] ||= (e) => h.value = !h.value,
7870
7874
  title: "显示/隐藏说明"
@@ -7881,18 +7885,18 @@ var oo = { class: "kline-tooltip__title" }, so = { key: 0 }, co = { class: "klin
7881
7885
  "stroke-width": "2"
7882
7886
  }, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])])]),
7883
7887
  l(n, { name: "slide" }, {
7884
- default: C(() => [h.value && r.indicatorDescription ? (g(), o("div", Mo, [s("p", null, b(r.indicatorDescription), 1)])) : a("", !0)]),
7888
+ default: C(() => [h.value && r.indicatorDescription ? (g(), o("div", No, [s("p", null, b(r.indicatorDescription), 1)])) : a("", !0)]),
7885
7889
  _: 1
7886
7890
  }),
7887
- s("div", No, [(g(!0), o(e, null, v(r.params, (e) => (g(), o("div", {
7891
+ s("div", Po, [(g(!0), o(e, null, v(r.params, (e) => (g(), o("div", {
7888
7892
  key: e.key,
7889
7893
  class: f(["param-item", { "has-desc": h.value && e.description }])
7890
- }, [s("div", Po, [s("label", Fo, [s("span", Io, b(e.label), 1), e.min !== void 0 || e.max !== void 0 ? (g(), o("span", Lo, b(e.min ?? "-∞") + " ~ " + b(e.max ?? "+∞"), 1)) : a("", !0)]), s("div", Ro, [
7894
+ }, [s("div", Fo, [s("label", Io, [s("span", Lo, b(e.label), 1), e.min !== void 0 || e.max !== void 0 ? (g(), o("span", Ro, b(e.min ?? "-∞") + " ~ " + b(e.max ?? "+∞"), 1)) : a("", !0)]), s("div", zo, [
7891
7895
  s("button", {
7892
7896
  class: "stepper-btn",
7893
7897
  disabled: e.min !== void 0 && (m.value[e.key] ?? 0) <= e.min,
7894
7898
  onClick: (t) => x(e, -1)
7895
- }, " − ", 8, zo),
7899
+ }, " − ", 8, Bo),
7896
7900
  e.type === "number" ? (g(), o("input", {
7897
7901
  key: 0,
7898
7902
  type: "number",
@@ -7902,17 +7906,17 @@ var oo = { class: "kline-tooltip__title" }, so = { key: 0 }, co = { class: "klin
7902
7906
  max: e.max,
7903
7907
  step: e.step || 1,
7904
7908
  onInput: (t) => y(e.key, t)
7905
- }, null, 40, Bo)) : a("", !0),
7909
+ }, null, 40, Vo)) : a("", !0),
7906
7910
  s("button", {
7907
7911
  class: "stepper-btn",
7908
7912
  disabled: e.max !== void 0 && (m.value[e.key] ?? 0) >= e.max,
7909
7913
  onClick: (t) => x(e, 1)
7910
- }, " + ", 8, Vo)
7914
+ }, " + ", 8, Ho)
7911
7915
  ])]), l(n, { name: "slide" }, {
7912
- default: C(() => [h.value && e.description ? (g(), o("div", Ho, b(e.description), 1)) : a("", !0)]),
7916
+ default: C(() => [h.value && e.description ? (g(), o("div", Uo, b(e.description), 1)) : a("", !0)]),
7913
7917
  _: 2
7914
7918
  }, 1024)], 2))), 128))]),
7915
- s("div", Uo, [s("button", {
7919
+ s("div", Wo, [s("button", {
7916
7920
  class: "params-btn reset",
7917
7921
  onClick: T
7918
7922
  }, [...d[8] ||= [s("svg", {
@@ -7920,7 +7924,7 @@ var oo = { class: "kline-tooltip__title" }, so = { key: 0 }, co = { class: "klin
7920
7924
  fill: "none",
7921
7925
  stroke: "currentColor",
7922
7926
  "stroke-width": "2"
7923
- }, [s("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }), s("path", { d: "M3 3v5h5" })], -1), c(" 重置 ", -1)]]), s("div", Wo, [s("button", {
7927
+ }, [s("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }), s("path", { d: "M3 3v5h5" })], -1), c(" 重置 ", -1)]]), s("div", Go, [s("button", {
7924
7928
  class: "params-btn cancel",
7925
7929
  onClick: d[2] ||= (e) => u.$emit("close")
7926
7930
  }, "取消"), s("button", {
@@ -7938,37 +7942,31 @@ var oo = { class: "kline-tooltip__title" }, so = { key: 0 }, co = { class: "klin
7938
7942
  _: 1
7939
7943
  })]));
7940
7944
  }
7941
- }), [["__scopeId", "data-v-c14eedcc"]]), Ko = { class: "indicator-selector" }, qo = { class: "indicator-scroll-container" }, Jo = { class: "indicator-list" }, Yo = {
7945
+ }), [["__scopeId", "data-v-c14eedcc"]]), qo = { class: "indicator-selector" }, Jo = { class: "indicator-scroll-container" }, Yo = { class: "indicator-list" }, Xo = {
7942
7946
  key: 0,
7943
7947
  class: "indicator-divider",
7944
7948
  "aria-hidden": "true"
7945
- }, Xo = [
7949
+ }, Zo = [
7946
7950
  "draggable",
7947
7951
  "onDragstart",
7948
7952
  "onDragover",
7949
7953
  "onDrop"
7950
- ], Zo = ["onMouseenter"], Qo = { class: "btn-content" }, $o = {
7954
+ ], Qo = ["onMouseenter"], $o = { class: "btn-content" }, es = {
7951
7955
  key: 0,
7952
7956
  class: "param-hint"
7953
- }, es = {
7957
+ }, ts = {
7954
7958
  key: 0,
7955
7959
  class: "hover-overlay"
7956
- }, ts = ["onClick"], ns = {
7960
+ }, ns = ["onClick"], rs = {
7957
7961
  key: 1,
7958
7962
  class: "divider"
7959
- }, rs = ["onClick"], is = { class: "indicator-item" }, as = { class: "menu-section" }, os = { class: "menu-items" }, ss = ["disabled", "onClick"], cs = {
7963
+ }, is = ["onClick"], as = { class: "indicator-item" }, os = { class: "menu-section" }, ss = { class: "menu-items" }, cs = ["disabled", "onClick"], ls = { class: "param-hint" }, us = {
7960
7964
  key: 0,
7961
- class: "param-hint"
7962
- }, ls = {
7963
- key: 1,
7964
7965
  class: "active-tag"
7965
- }, us = { class: "menu-section" }, ds = { class: "menu-items" }, fs = ["disabled", "onClick"], ps = {
7966
+ }, ds = { class: "menu-section" }, fs = { class: "menu-items" }, ps = ["disabled", "onClick"], ms = { class: "param-hint" }, hs = {
7966
7967
  key: 0,
7967
- class: "param-hint"
7968
- }, ms = {
7969
- key: 1,
7970
7968
  class: "active-tag"
7971
- }, hs = /* @__PURE__ */ xo(/* @__PURE__ */ u({
7969
+ }, gs = /* @__PURE__ */ So(/* @__PURE__ */ u({
7972
7970
  __name: "IndicatorSelector",
7973
7971
  props: {
7974
7972
  activeIndicators: {},
@@ -7987,6 +7985,13 @@ var oo = { class: "kline-tooltip__title" }, so = { key: 0 }, co = { class: "klin
7987
7985
  name: "均线",
7988
7986
  pane: "main"
7989
7987
  },
7988
+ {
7989
+ id: "VOLUME",
7990
+ label: "VOL",
7991
+ name: "成交量",
7992
+ pane: "sub",
7993
+ description: "成交量反映市场活跃度,柱状图显示每根K线的交易量。上涨时柱子为红色,下跌时为绿色。"
7994
+ },
7990
7995
  {
7991
7996
  id: "BOLL",
7992
7997
  label: "BOLL",
@@ -8389,8 +8394,8 @@ var oo = { class: "kline-tooltip__title" }, so = { key: 0 }, co = { class: "klin
8389
8394
  P.value = typeof CSS < "u" && CSS.supports("anchor-name: --kmap-anchor") && CSS.supports("position-anchor: --kmap-anchor"), document.addEventListener("click", pe), window.addEventListener("resize", me);
8390
8395
  }), h(() => {
8391
8396
  document.removeEventListener("click", pe), window.removeEventListener("resize", me);
8392
- }), (r, u) => (g(), o("div", Ko, [
8393
- s("div", qo, [s("div", Jo, [(g(!0), o(e, null, v(ne.value, (t) => (g(), o(e, { key: t.id }, [t.id === re.value ? (g(), o("div", Yo)) : a("", !0), s("div", {
8397
+ }), (r, u) => (g(), o("div", qo, [
8398
+ s("div", Jo, [s("div", Yo, [(g(!0), o(e, null, v(ne.value, (t) => (g(), o(e, { key: t.id }, [t.id === re.value ? (g(), o("div", Xo)) : a("", !0), s("div", {
8394
8399
  class: f(["indicator-item", {
8395
8400
  draggable: z(t.id),
8396
8401
  "drag-over": te.value === t.id,
@@ -8408,8 +8413,8 @@ var oo = { class: "kline-tooltip__title" }, so = { key: 0 }, co = { class: "klin
8408
8413
  }, [s("button", { class: f(["indicator-btn", {
8409
8414
  active: !0,
8410
8415
  hovering: M.value === t.id
8411
- }]) }, [s("span", Qo, [c(b(t.label) + " ", 1), t.params ? (g(), o("span", $o, " (" + b(se(t)) + ") ", 1)) : a("", !0)]), l(n, { name: "fade" }, {
8412
- default: C(() => [M.value === t.id ? (g(), o("div", es, [
8416
+ }]) }, [s("span", $o, [c(b(t.label) + " ", 1), t.params ? (g(), o("span", es, " (" + b(se(t)) + ") ", 1)) : a("", !0)]), l(n, { name: "fade" }, {
8417
+ default: C(() => [M.value === t.id ? (g(), o("div", ts, [
8413
8418
  t.params ? (g(), o("button", {
8414
8419
  key: 0,
8415
8420
  class: "action-btn settings-btn",
@@ -8420,8 +8425,8 @@ var oo = { class: "kline-tooltip__title" }, so = { key: 0 }, co = { class: "klin
8420
8425
  width: "14",
8421
8426
  height: "14",
8422
8427
  fill: "currentColor"
8423
- }, [s("path", { d: "M19.14 12.94c.04-.31.06-.63.06-.94 0-.31-.02-.63-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.04.31-.06.63-.06.94s.02.63.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z" })], -1)]], 8, ts)) : a("", !0),
8424
- t.params ? (g(), o("span", ns)) : a("", !0),
8428
+ }, [s("path", { d: "M19.14 12.94c.04-.31.06-.63.06-.94 0-.31-.02-.63-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.04.31-.06.63-.06.94s.02.63.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z" })], -1)]], 8, ns)) : a("", !0),
8429
+ t.params ? (g(), o("span", rs)) : a("", !0),
8425
8430
  s("button", {
8426
8431
  class: "action-btn remove-btn",
8427
8432
  onClick: w((e) => ae(t.id), ["stop"]),
@@ -8431,10 +8436,10 @@ var oo = { class: "kline-tooltip__title" }, so = { key: 0 }, co = { class: "klin
8431
8436
  width: "14",
8432
8437
  height: "14",
8433
8438
  fill: "currentColor"
8434
- }, [s("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" })], -1)]], 8, rs)
8439
+ }, [s("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" })], -1)]], 8, is)
8435
8440
  ])) : a("", !0)]),
8436
8441
  _: 2
8437
- }, 1024)], 2)], 40, Zo)], 42, Xo)], 64))), 128)), s("div", is, [s("button", {
8442
+ }, 1024)], 2)], 40, Qo)], 42, Zo)], 64))), 128)), s("div", as, [s("button", {
8438
8443
  ref_key: "addBtnRef",
8439
8444
  ref: O,
8440
8445
  class: "add-btn",
@@ -8453,38 +8458,38 @@ var oo = { class: "kline-tooltip__title" }, so = { key: 0 }, co = { class: "klin
8453
8458
  ref_key: "addMenuRef",
8454
8459
  ref: k,
8455
8460
  style: p(P.value ? void 0 : ee.value)
8456
- }, [s("div", as, [u[6] ||= s("div", { class: "menu-title" }, "主图指标", -1), s("div", os, [(g(!0), o(e, null, v(x(S), (e) => (g(), o("button", {
8461
+ }, [s("div", os, [u[6] ||= s("div", { class: "menu-title" }, "主图指标", -1), s("div", ss, [(g(!0), o(e, null, v(x(S), (e) => (g(), o("button", {
8457
8462
  key: e.id,
8458
8463
  class: f(["menu-item", { disabled: L(e.id) }]),
8459
8464
  disabled: L(e.id),
8460
8465
  onClick: (t) => ie(e.id)
8461
8466
  }, [
8462
8467
  c(b(e.label) + " ", 1),
8463
- e.params ? (g(), o("span", cs, " (" + b(e.name) + ") ", 1)) : a("", !0),
8464
- L(e.id) ? (g(), o("span", ls, [...u[5] ||= [s("svg", {
8468
+ s("span", ls, " (" + b(e.name) + ") ", 1),
8469
+ L(e.id) ? (g(), o("span", us, [...u[5] ||= [s("svg", {
8465
8470
  viewBox: "0 0 24 24",
8466
8471
  width: "14",
8467
8472
  height: "14",
8468
8473
  fill: "currentColor"
8469
8474
  }, [s("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" })], -1)]])) : a("", !0)
8470
- ], 10, ss))), 128))])]), s("div", us, [u[8] ||= s("div", { class: "menu-title" }, "副图指标", -1), s("div", ds, [(g(!0), o(e, null, v(x(T), (e) => (g(), o("button", {
8475
+ ], 10, cs))), 128))])]), s("div", ds, [u[8] ||= s("div", { class: "menu-title" }, "副图指标", -1), s("div", fs, [(g(!0), o(e, null, v(x(T), (e) => (g(), o("button", {
8471
8476
  key: e.id,
8472
8477
  class: f(["menu-item", { disabled: L(e.id) }]),
8473
8478
  disabled: L(e.id),
8474
8479
  onClick: (t) => ie(e.id)
8475
8480
  }, [
8476
8481
  c(b(e.label) + " ", 1),
8477
- e.params ? (g(), o("span", ps, " (" + b(e.name) + ") ", 1)) : a("", !0),
8478
- L(e.id) ? (g(), o("span", ms, [...u[7] ||= [s("svg", {
8482
+ s("span", ms, " (" + b(e.name) + ") ", 1),
8483
+ L(e.id) ? (g(), o("span", hs, [...u[7] ||= [s("svg", {
8479
8484
  viewBox: "0 0 24 24",
8480
8485
  width: "14",
8481
8486
  height: "14",
8482
8487
  fill: "currentColor"
8483
8488
  }, [s("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" })], -1)]])) : a("", !0)
8484
- ], 10, fs))), 128))])])], 6)) : a("", !0)]),
8489
+ ], 10, ps))), 128))])])], 6)) : a("", !0)]),
8485
8490
  _: 1
8486
8491
  })])),
8487
- I.value ? (g(), i(Go, {
8492
+ I.value ? (g(), i(Ko, {
8488
8493
  key: 0,
8489
8494
  visible: A.value,
8490
8495
  "indicator-id": I.value.id,
@@ -8504,15 +8509,15 @@ var oo = { class: "kline-tooltip__title" }, so = { key: 0 }, co = { class: "klin
8504
8509
  ])) : a("", !0)
8505
8510
  ]));
8506
8511
  }
8507
- }), [["__scopeId", "data-v-0ddb3f15"]]);
8512
+ }), [["__scopeId", "data-v-4b90c954"]]);
8508
8513
  //#endregion
8509
8514
  //#region src/core/utils/klineConfig.ts
8510
- function gs(e, t) {
8515
+ function _s(e, t) {
8511
8516
  let n = Math.round(e * t);
8512
8517
  return n % 2 == 0 && (n += 1), Math.max(1, n);
8513
8518
  }
8514
- function _s(e, t, n) {
8515
- let r = gs(e, n), i = Math.round(t * n), a = r + i, o = i;
8519
+ function vs(e, t, n) {
8520
+ let r = _s(e, n), i = Math.round(t * n), a = r + i, o = i;
8516
8521
  return {
8517
8522
  kWidthPx: r,
8518
8523
  kGapPx: i,
@@ -8526,14 +8531,14 @@ function _s(e, t, n) {
8526
8531
  }
8527
8532
  //#endregion
8528
8533
  //#region src/core/viewport/viewport.ts
8529
- function vs(e, t, n, r, i, a = 1) {
8530
- let { unitPx: o, startXPx: s } = _s(n, r, a), c = e * a, l = t * a;
8534
+ function ys(e, t, n, r, i, a = 1) {
8535
+ let { unitPx: o, startXPx: s } = vs(n, r, a), c = e * a, l = t * a;
8531
8536
  return {
8532
8537
  start: Math.max(0, Math.floor((c - s) / o) - 1),
8533
8538
  end: Math.min(i, Math.ceil((c + l - s) / o) + 1)
8534
8539
  };
8535
8540
  }
8536
- function ys(e, t, n) {
8541
+ function bs(e, t, n) {
8537
8542
  let r = -Infinity, i = Infinity;
8538
8543
  for (let a = t; a < n && a < e.length; a++) {
8539
8544
  let t = e[a];
@@ -8549,7 +8554,7 @@ function ys(e, t, n) {
8549
8554
  }
8550
8555
  //#endregion
8551
8556
  //#region src/core/scale/priceScale.ts
8552
- var bs = class {
8557
+ var xs = class {
8553
8558
  range = {
8554
8559
  maxPrice: 100,
8555
8560
  minPrice: 0
@@ -8615,7 +8620,7 @@ var bs = class {
8615
8620
  };
8616
8621
  //#endregion
8617
8622
  //#region src/core/layout/pane.ts
8618
- function xs(e) {
8623
+ function Ss(e) {
8619
8624
  return e === "price" ? {
8620
8625
  showPriceAxisTicks: !0,
8621
8626
  showCrosshairPriceLabel: !0,
@@ -8633,7 +8638,7 @@ function xs(e) {
8633
8638
  supportsPriceTranslate: !1
8634
8639
  };
8635
8640
  }
8636
- var Ss = class {
8641
+ var Cs = class {
8637
8642
  id;
8638
8643
  role;
8639
8644
  capabilities;
@@ -8643,11 +8648,11 @@ var Ss = class {
8643
8648
  maxPrice: 100,
8644
8649
  minPrice: 0
8645
8650
  };
8646
- yAxis = new bs();
8651
+ yAxis = new xs();
8647
8652
  renderers = [];
8648
8653
  constructor(e, t = {}) {
8649
8654
  this.id = e, this.role = t.role ?? (e === "main" ? "price" : "indicator"), this.capabilities = {
8650
- ...xs(this.role),
8655
+ ...Ss(this.role),
8651
8656
  ...t.capabilities ?? {}
8652
8657
  };
8653
8658
  }
@@ -8661,9 +8666,9 @@ var Ss = class {
8661
8666
  this.renderers.push(e);
8662
8667
  }
8663
8668
  updateRange(e, t) {
8664
- this.priceRange = ys(e, t.start, t.end), this.yAxis.setRange(this.priceRange);
8669
+ this.priceRange = bs(e, t.start, t.end), this.yAxis.setRange(this.priceRange);
8665
8670
  }
8666
- }, Cs = class {
8671
+ }, ws = class {
8667
8672
  chart;
8668
8673
  isDragging = !1;
8669
8674
  dragMode = "none";
@@ -8673,6 +8678,7 @@ var Ss = class {
8673
8678
  activePaneIdOnDrag = null;
8674
8679
  activeSeparatorUpperPaneId = null;
8675
8680
  hoveredSeparatorUpperPaneId = null;
8681
+ hoveredRightAxisPaneId = null;
8676
8682
  isTouchSession = !1;
8677
8683
  crosshairPos = null;
8678
8684
  crosshairIndex = null;
@@ -8689,6 +8695,7 @@ var Ss = class {
8689
8695
  };
8690
8696
  tooltipAnchorPlacement = "right-bottom";
8691
8697
  useTooltipAnchorPositioning = !1;
8698
+ onInteractionChangeCallback;
8692
8699
  hoveredMarkerId = null;
8693
8700
  clickedMarkerId = null;
8694
8701
  hoveredMarkerData = null;
@@ -8704,9 +8711,32 @@ var Ss = class {
8704
8711
  constructor(e) {
8705
8712
  this.chart = e;
8706
8713
  }
8714
+ getInteractionSnapshot() {
8715
+ return {
8716
+ crosshairPos: this.crosshairPos ? { ...this.crosshairPos } : null,
8717
+ crosshairIndex: this.crosshairIndex,
8718
+ crosshairPrice: this.crosshairPrice,
8719
+ hoveredIndex: this.hoveredIndex,
8720
+ activePaneId: this.activePaneId,
8721
+ tooltipPos: { ...this.tooltipPos },
8722
+ tooltipAnchorPlacement: this.tooltipAnchorPlacement,
8723
+ hoveredMarkerData: this.hoveredMarkerData,
8724
+ hoveredCustomMarker: this.hoveredCustomMarker,
8725
+ isDragging: this.isDragging,
8726
+ isResizingPaneBoundary: this.dragMode === "resize-separator",
8727
+ isHoveringPaneBoundary: this.hoveredSeparatorUpperPaneId !== null,
8728
+ isHoveringRightAxis: this.hoveredRightAxisPaneId !== null
8729
+ };
8730
+ }
8731
+ setOnInteractionChange(e) {
8732
+ this.onInteractionChangeCallback = e;
8733
+ }
8734
+ notifyInteractionChange() {
8735
+ this.onInteractionChangeCallback?.(this.getInteractionSnapshot());
8736
+ }
8707
8737
  onWheel(e) {
8708
8738
  let t = this.chart.getDom().container, n = t.getBoundingClientRect(), r = e.clientX - n.left, i = t.scrollLeft;
8709
- this.clearHover(), this.chart.zoomAt(r, i, e.deltaY);
8739
+ this.clearHover(), this.chart.zoomAt(r, i, e.deltaY), this.notifyInteractionChange();
8710
8740
  }
8711
8741
  onPointerDown(e) {
8712
8742
  if (e.isPrimary === !1) return;
@@ -8738,10 +8768,10 @@ var Ss = class {
8738
8768
  this.useTooltipAnchorPositioning = e;
8739
8769
  }
8740
8770
  onPointerUp(e) {
8741
- e.isPrimary !== !1 && (this.isDragging = !1, this.dragMode = "none", this.activePaneIdOnDrag = null, this.activeSeparatorUpperPaneId = null);
8771
+ e.isPrimary !== !1 && (this.isDragging = !1, this.dragMode = "none", this.activePaneIdOnDrag = null, this.activeSeparatorUpperPaneId = null, this.notifyInteractionChange());
8742
8772
  }
8743
8773
  onPointerLeave(e) {
8744
- e.isPrimary !== !1 && (this.isDragging = !1, this.dragMode = "none", this.activePaneIdOnDrag = null, this.clearSeparatorState(), this.isTouchSession = !1, this.clearHover(), this.chart.scheduleDraw());
8774
+ e.isPrimary !== !1 && (this.isDragging = !1, this.dragMode = "none", this.activePaneIdOnDrag = null, this.clearSeparatorState(), this.isTouchSession = !1, this.clearHover(), this.chart.scheduleDraw(), this.notifyInteractionChange());
8745
8775
  }
8746
8776
  onMouseDown(e) {
8747
8777
  if (this.isTouchSession || e.button !== 0) return;
@@ -8788,16 +8818,16 @@ var Ss = class {
8788
8818
  return;
8789
8819
  }
8790
8820
  let n = t.getBoundingClientRect(), r = e.clientY - n.top;
8791
- this.hoveredSeparatorUpperPaneId = this.hitTestPaneSeparator(r), this.updateHoverFromPoint(e.clientX, e.clientY), this.chart.scheduleDraw();
8821
+ this.hoveredSeparatorUpperPaneId = this.hitTestPaneSeparator(r), this.updateHoverFromPoint(e.clientX, e.clientY), this.chart.scheduleDraw(), this.notifyInteractionChange();
8792
8822
  }
8793
8823
  onMouseUp() {
8794
- this.isTouchSession || (this.isDragging = !1, this.dragMode = "none", this.activePaneIdOnDrag = null, this.activeSeparatorUpperPaneId = null);
8824
+ this.isTouchSession || (this.isDragging = !1, this.dragMode = "none", this.activePaneIdOnDrag = null, this.activeSeparatorUpperPaneId = null, this.notifyInteractionChange());
8795
8825
  }
8796
8826
  onMouseLeave() {
8797
- this.isTouchSession || (this.isDragging = !1, this.dragMode = "none", this.activePaneIdOnDrag = null, this.clearSeparatorState(), this.clearHover(), this.chart.scheduleDraw());
8827
+ this.isTouchSession || (this.isDragging = !1, this.dragMode = "none", this.activePaneIdOnDrag = null, this.clearSeparatorState(), this.clearHover(), this.chart.scheduleDraw(), this.notifyInteractionChange());
8798
8828
  }
8799
8829
  onScroll() {
8800
- this.kLinePositions = null, this.visibleRange = null, this.clearHover(), this.chart.scheduleDraw();
8830
+ this.kLinePositions = null, this.visibleRange = null, this.clearHover(), this.chart.scheduleDraw(), this.notifyInteractionChange();
8801
8831
  }
8802
8832
  onPointerMove(e) {
8803
8833
  if (!e.isPrimary) return;
@@ -8823,7 +8853,7 @@ var Ss = class {
8823
8853
  return;
8824
8854
  }
8825
8855
  let n = t.getBoundingClientRect(), r = e.clientY - n.top;
8826
- this.hoveredSeparatorUpperPaneId = this.hitTestPaneSeparator(r), this.updateHoverFromPoint(e.clientX, e.clientY), this.chart.scheduleDraw();
8856
+ this.hoveredSeparatorUpperPaneId = this.hitTestPaneSeparator(r), this.updateHoverFromPoint(e.clientX, e.clientY), this.chart.scheduleDraw(), this.notifyInteractionChange();
8827
8857
  }
8828
8858
  setKLinePositions(e, t, n) {
8829
8859
  this.kLinePositions = e, this.visibleRange = t, n !== void 0 && (this.kWidthPx = n);
@@ -8837,6 +8867,9 @@ var Ss = class {
8837
8867
  isHoveringPaneBoundaryState() {
8838
8868
  return this.hoveredSeparatorUpperPaneId !== null;
8839
8869
  }
8870
+ isHoveringRightAxisState() {
8871
+ return this.hoveredRightAxisPaneId !== null;
8872
+ }
8840
8873
  setOnMarkerHover(e) {
8841
8874
  this.onMarkerHoverCallback = e;
8842
8875
  }
@@ -8861,17 +8894,25 @@ var Ss = class {
8861
8894
  return null;
8862
8895
  }
8863
8896
  clearHover() {
8864
- this.crosshairPos = null, this.crosshairIndex = null, this.crosshairPrice = null, this.hoveredIndex = null, this.activePaneId = null, this.hoveredMarkerId !== null && (this.hoveredMarkerId = null, this.onMarkerHoverCallback && this.onMarkerHoverCallback(null)), this.hoveredCustomMarker !== null && (this.hoveredCustomMarker = null, this.onCustomMarkerHoverCallback && this.onCustomMarkerHoverCallback(null));
8897
+ this.crosshairPos = null, this.crosshairIndex = null, this.crosshairPrice = null, this.hoveredIndex = null, this.activePaneId = null, this.hoveredMarkerId === null ? this.hoveredMarkerData = null : (this.hoveredMarkerId = null, this.hoveredMarkerData = null, this.chart.getMarkerManager().setHover(null), this.onMarkerHoverCallback && this.onMarkerHoverCallback(null)), this.hoveredCustomMarker !== null && (this.hoveredCustomMarker = null, this.onCustomMarkerHoverCallback && this.onCustomMarkerHoverCallback(null));
8865
8898
  }
8866
8899
  clearSeparatorState() {
8867
- this.activeSeparatorUpperPaneId = null, this.hoveredSeparatorUpperPaneId = null;
8900
+ this.activeSeparatorUpperPaneId = null, this.hoveredSeparatorUpperPaneId = null, this.hoveredRightAxisPaneId = null;
8868
8901
  }
8869
8902
  updateHoverFromPoint(e, t) {
8870
8903
  let n = this.chart.getDom().container, r = n.getBoundingClientRect(), i = e - r.left, a = t - r.top, o = this.chart.getViewport(), s = o?.viewWidth ?? Math.max(1, Math.round(n.clientWidth)), c = o?.viewHeight ?? Math.max(1, Math.round(n.clientHeight)), l = o?.plotWidth ?? s, u = o?.plotHeight ?? c;
8871
- if (i < 0 || a < 0 || i > l || a > u) {
8872
- this.clearHover();
8904
+ if (i < 0 || a < 0 || a > u) {
8905
+ this.clearHover(), this.hoveredRightAxisPaneId = null;
8873
8906
  return;
8874
8907
  }
8908
+ if (i >= l) {
8909
+ let e = this.chart.getPaneRenderers().find((e) => {
8910
+ let t = e.getPane();
8911
+ return a >= t.top && a <= t.top + t.height;
8912
+ })?.getPane() || null;
8913
+ this.hoveredRightAxisPaneId = e?.id || null, this.crosshairPos = null, this.crosshairIndex = null, this.hoveredIndex = null;
8914
+ return;
8915
+ } else this.hoveredRightAxisPaneId = null;
8875
8916
  let d = n.scrollLeft, f = this.chart.getCurrentDpr(), p = this.hitTestPaneSeparator(a);
8876
8917
  if (this.hoveredSeparatorUpperPaneId = p, p) {
8877
8918
  this.clearHover();
@@ -8879,12 +8920,12 @@ var Ss = class {
8879
8920
  }
8880
8921
  let m = this.chart.getMarkerManager(), h = d + i, g = m.hitTest(h, a, 3);
8881
8922
  if (g) {
8882
- this.hoveredMarkerId !== g.id && (this.hoveredMarkerId = g.id, this.hoveredMarkerData = g, m.setHover(g.id), this.onMarkerHoverCallback && this.onMarkerHoverCallback(g)), this.crosshairPos = null, this.crosshairIndex = null, this.hoveredIndex = null;
8923
+ this.hoveredMarkerId !== g.id && (this.hoveredMarkerId = g.id, this.hoveredMarkerData = g, m.setHover(g.id), this.onMarkerHoverCallback && this.onMarkerHoverCallback(g)), this.hoveredCustomMarker !== null && (this.hoveredCustomMarker = null, this.onCustomMarkerHoverCallback && this.onCustomMarkerHoverCallback(null)), this.crosshairPos = null, this.crosshairIndex = null, this.crosshairPrice = null, this.hoveredIndex = null;
8883
8924
  return;
8884
8925
  } else this.hoveredMarkerId !== null && (this.hoveredMarkerId = null, this.hoveredMarkerData = null, m.setHover(null), this.onMarkerHoverCallback && this.onMarkerHoverCallback(null));
8885
8926
  let _ = m.hitTestCustomMarker(i, a);
8886
8927
  if (_) {
8887
- this.hoveredCustomMarker?.id !== _.id && (this.hoveredCustomMarker = _, this.onCustomMarkerHoverCallback && this.onCustomMarkerHoverCallback(_)), this.crosshairPos = null, this.crosshairIndex = null, this.hoveredIndex = null;
8928
+ this.hoveredCustomMarker?.id !== _.id && (this.hoveredCustomMarker = _, this.onCustomMarkerHoverCallback && this.onCustomMarkerHoverCallback(_)), this.hoveredMarkerId !== null && (this.hoveredMarkerId = null, this.hoveredMarkerData = null, m.setHover(null), this.onMarkerHoverCallback && this.onMarkerHoverCallback(null)), this.crosshairPos = null, this.crosshairIndex = null, this.crosshairPrice = null, this.hoveredIndex = null;
8888
8929
  return;
8889
8930
  } else this.hoveredCustomMarker !== null && (this.hoveredCustomMarker = null, this.onCustomMarkerHoverCallback && this.onCustomMarkerHoverCallback(null));
8890
8931
  if (!this.kLinePositions || !this.visibleRange || !this.kWidthPx) {
@@ -8941,12 +8982,12 @@ var Ss = class {
8941
8982
  };
8942
8983
  }
8943
8984
  reset() {
8944
- this.isDragging = !1, this.dragMode = "none", this.dragStartX = 0, this.dragStartY = 0, this.scrollStartX = 0, this.activePaneIdOnDrag = null, this.clearSeparatorState(), this.isTouchSession = !1, this.crosshairPos = null, this.crosshairIndex = null, this.crosshairPrice = null, this.hoveredIndex = null, this.activePaneId = null, this.hoveredMarkerId = null, this.clickedMarkerId = null, this.hoveredMarkerData = null, this.clickedMarkerData = null, this.kLinePositions = null, this.visibleRange = null, this.kWidthPx = null;
8985
+ this.isDragging = !1, this.dragMode = "none", this.dragStartX = 0, this.dragStartY = 0, this.scrollStartX = 0, this.activePaneIdOnDrag = null, this.clearSeparatorState(), this.isTouchSession = !1, this.crosshairPos = null, this.crosshairIndex = null, this.crosshairPrice = null, this.hoveredIndex = null, this.activePaneId = null, this.hoveredMarkerId = null, this.clickedMarkerId = null, this.hoveredMarkerData = null, this.clickedMarkerData = null, this.hoveredCustomMarker = null, this.kLinePositions = null, this.visibleRange = null, this.kWidthPx = null;
8945
8986
  }
8946
8987
  getCrosshairIndex() {
8947
8988
  return this.crosshairIndex;
8948
8989
  }
8949
- }, ws = class {
8990
+ }, Ts = class {
8950
8991
  dom;
8951
8992
  pane;
8952
8993
  opt;
@@ -8969,11 +9010,11 @@ var Ss = class {
8969
9010
  i.width = Math.round(a * n), i.height = Math.round(t * n), i.style.width = `${i.width / n}px`, i.style.height = `${i.height / n}px`;
8970
9011
  }
8971
9012
  destroy() {}
8972
- };
9013
+ }, Es = (e, t) => `indicator:${e}:${t}`;
8973
9014
  //#endregion
8974
9015
  //#region src/core/renderers/subVolume.ts
8975
- function Ts(e = {}) {
8976
- let { paneId: t = "sub" } = e;
9016
+ function Ds(e = {}) {
9017
+ let { paneId: t = "sub" } = e, n = Es("volume", t), r = null;
8977
9018
  return {
8978
9019
  name: `volume_${t}`,
8979
9020
  version: "1.0.0",
@@ -8981,32 +9022,56 @@ function Ts(e = {}) {
8981
9022
  debugName: "成交量",
8982
9023
  paneId: t,
8983
9024
  priority: X.MAIN,
9025
+ onInstall(e) {
9026
+ r = e;
9027
+ },
9028
+ getDeclaredNamespaces() {
9029
+ return [n];
9030
+ },
8984
9031
  draw(e) {
8985
- let { ctx: t, pane: n, data: r, range: i, scrollLeft: a, kWidth: o, kGap: s, kLinePositions: c } = e, l = r;
8986
- if (!l.length) return;
8987
- t.save(), t.translate(-a, 0);
8988
- let { start: u, end: d } = i, f = l.slice(u, d).reduce((e, t) => t.volume ? Math.max(e, t.volume) : e, 0);
8989
- for (let e = u; e < d; e++) {
8990
- let r = l[e];
8991
- if (!r) continue;
8992
- let i = r.volume;
8993
- if (!i) continue;
8994
- let a = Ds(r), d = c[e - u];
8995
- d && Es(t, d, a, i, f, o, s, n.height);
9032
+ let { ctx: i, pane: a, data: o, range: s, scrollLeft: c, kWidth: l, kGap: u, dpr: d, kLinePositions: f } = e, p = o;
9033
+ if (!p.length) return;
9034
+ i.save(), i.translate(-c, 0);
9035
+ let { start: m, end: h } = s, g = 0, _ = Infinity;
9036
+ for (let e = m; e < h && e < p.length; e++) {
9037
+ let t = p[e];
9038
+ if (!t) continue;
9039
+ let n = t.volume;
9040
+ n != null && (g = Math.max(g, n), _ = Math.min(_, n));
8996
9041
  }
8997
- t.restore();
9042
+ if (g === 0 || !Number.isFinite(_)) {
9043
+ i.restore();
9044
+ return;
9045
+ }
9046
+ let v = Math.max(.05, (g - _) * .1), y = Math.max(0, _ - v), b = g + v, x = a.yAxis.getDisplayRange({
9047
+ minPrice: y,
9048
+ maxPrice: b
9049
+ }), S = x.minPrice, C = x.maxPrice - S || 1, w = a.height - (0 - S) / C * a.height;
9050
+ r?.setSharedState(n, {
9051
+ valueMin: y,
9052
+ valueMax: b,
9053
+ timestamp: Date.now()
9054
+ }, `volume_${t}`);
9055
+ for (let e = m; e < h; e++) {
9056
+ let t = p[e];
9057
+ if (!t) continue;
9058
+ let n = t.volume;
9059
+ if (!n) continue;
9060
+ let r = f[e - m];
9061
+ if (r === void 0) continue;
9062
+ let o = f[e - m + 1], s = f[e - m - 1], c = Math.max(1, Math.round((l + u) * d)), h = o === void 0 ? s === void 0 ? c : Math.max(1, Math.round((r - s) * d)) : Math.max(1, Math.round((o - r) * d)), g = Math.max(1, h - 1) / d;
9063
+ Os(i, Math.round((r + (l - g) / 2) * d) / d, ks(t), n, g, S, C, w, a.height, d);
9064
+ }
9065
+ i.restore();
8998
9066
  }
8999
9067
  };
9000
9068
  }
9001
- function Es(e, t, n, r, i, a, o, s) {
9002
- let c = Os(r, i, s), l = a;
9003
- e.fillStyle = n, e.fillRect(t, c, l, s - c);
9004
- }
9005
- function Ds(e) {
9006
- return e.close > e.open ? Na.UP : e.close < e.open ? Na.DOWN : Na.NEUTRAL;
9069
+ function Os(e, t, n, r, i, a, o, s, c, l) {
9070
+ let u = c - (r - a) / o * c, d = Math.round(u * l) / l, f = Math.round(s * l) / l, p = 1 / l, m = f - d, h = m <= 0 ? p : Math.max(m, p), g = m <= 0 ? f - p : f - h;
9071
+ e.fillStyle = n, e.fillRect(t, g, i, h);
9007
9072
  }
9008
- function Os(e, t, n) {
9009
- return n - n / t * e;
9073
+ function ks(e) {
9074
+ return e.close > e.open ? Ba.UP : e.close < e.open ? Ba.DOWN : Ba.NEUTRAL;
9010
9075
  }
9011
9076
  //#endregion
9012
9077
  //#region src/core/draw/pixelAlign.ts
@@ -9016,7 +9081,7 @@ function Z(e, t) {
9016
9081
  function Q(e, t) {
9017
9082
  return (Math.floor(e * t) + .5) / t;
9018
9083
  }
9019
- function ks(e, t, n, r) {
9084
+ function As(e, t, n, r) {
9020
9085
  if (t === n) return null;
9021
9086
  let i = Math.min(t, n), a = Math.max(t, n), o = Math.round(e * r), s = Math.round(i * r), c = Math.round(a * r);
9022
9087
  return {
@@ -9026,7 +9091,7 @@ function ks(e, t, n, r) {
9026
9091
  height: Math.max(1, c - s) / r
9027
9092
  };
9028
9093
  }
9029
- function As(e, t, n, r) {
9094
+ function js(e, t, n, r) {
9030
9095
  if (e === t) return null;
9031
9096
  let i = Math.min(e, t), a = Math.max(e, t), o = Math.round(i * r), s = Math.round(a * r), c = Math.round(n * r);
9032
9097
  return {
@@ -9036,7 +9101,7 @@ function As(e, t, n, r) {
9036
9101
  height: 1 / r
9037
9102
  };
9038
9103
  }
9039
- function js(e, t, n, r, i) {
9104
+ function Ms(e, t, n, r, i) {
9040
9105
  let a = e + n, o = n, s = Math.round(t * i), c = Math.round((t + r) * i), l = Math.max(1, c - s), u = e + (n - 1) / 2, d = u, f = o % 2 == 1;
9041
9106
  return {
9042
9107
  bodyRect: {
@@ -9059,7 +9124,7 @@ function js(e, t, n, r, i) {
9059
9124
  }
9060
9125
  //#endregion
9061
9126
  //#region src/core/renderers/Indicator/ma.ts
9062
- function Ms(e, t) {
9127
+ function Ns(e, t) {
9063
9128
  let n = Array(e.length);
9064
9129
  if (e.length < t) return n;
9065
9130
  let r = 0;
@@ -9075,7 +9140,7 @@ function Ms(e, t) {
9075
9140
  }
9076
9141
  return n;
9077
9142
  }
9078
- function Ns(e = {}) {
9143
+ function Ps(e = {}) {
9079
9144
  let t = {
9080
9145
  ma5: !0,
9081
9146
  ma10: !0,
@@ -9087,7 +9152,7 @@ function Ns(e = {}) {
9087
9152
  function i(e, t) {
9088
9153
  let i = n.get(t);
9089
9154
  if (i && r === e) return i.values;
9090
- let a = Ms(e, t);
9155
+ let a = Ns(e, t);
9091
9156
  return n.set(t, {
9092
9157
  period: t,
9093
9158
  values: a
@@ -9129,7 +9194,7 @@ function Ns(e = {}) {
9129
9194
  }
9130
9195
  //#endregion
9131
9196
  //#region src/core/renderers/Indicator/boll.ts
9132
- function Ps(e, t, n) {
9197
+ function Fs(e, t, n) {
9133
9198
  let r = Array(e.length);
9134
9199
  if (e.length < t) return r;
9135
9200
  let i = 0, a = [];
@@ -9162,7 +9227,7 @@ function Ps(e, t, n) {
9162
9227
  }
9163
9228
  return r;
9164
9229
  }
9165
- function Fs(e = {}) {
9230
+ function Is(e = {}) {
9166
9231
  let t = {
9167
9232
  period: 20,
9168
9233
  multiplier: 2,
@@ -9173,7 +9238,7 @@ function Fs(e = {}) {
9173
9238
  ...e
9174
9239
  }, n = null, r = 0, i = 0, a = [];
9175
9240
  function o(e) {
9176
- return (n !== e || r !== t.period || i !== t.multiplier) && (a = Ps(e, t.period, t.multiplier), n = e, r = t.period, i = t.multiplier), a;
9241
+ return (n !== e || r !== t.period || i !== t.multiplier) && (a = Fs(e, t.period, t.multiplier), n = e, r = t.period, i = t.multiplier), a;
9177
9242
  }
9178
9243
  return {
9179
9244
  name: "boll",
@@ -9230,7 +9295,7 @@ function Fs(e = {}) {
9230
9295
  }
9231
9296
  };
9232
9297
  }
9233
- function Is(e, t, n = 20, r = 2) {
9298
+ function Ls(e, t, n = 20, r = 2) {
9234
9299
  if (t < n - 1 || t >= e.length) return null;
9235
9300
  let i = 0;
9236
9301
  for (let r = 0; r < n; r++) {
@@ -9253,7 +9318,7 @@ function Is(e, t, n = 20, r = 2) {
9253
9318
  }
9254
9319
  //#endregion
9255
9320
  //#region src/core/renderers/Indicator/expma.ts
9256
- function Ls(e, t, n) {
9321
+ function Rs(e, t, n) {
9257
9322
  let r = Array(e.length);
9258
9323
  if (e.length === 0) return r;
9259
9324
  let i = 2 / (t + 1), a = 2 / (n + 1), o = e[0].close, s = o, c = o;
@@ -9270,7 +9335,7 @@ function Ls(e, t, n) {
9270
9335
  }
9271
9336
  return r;
9272
9337
  }
9273
- function Rs(e, t, n = 12, r = 50) {
9338
+ function zs(e, t, n = 12, r = 50) {
9274
9339
  if (t < 0 || t >= e.length) return null;
9275
9340
  let i = 2 / (n + 1), a = 2 / (r + 1), o = e[0].close, s = o, c = o;
9276
9341
  for (let n = 1; n <= t; n++) {
@@ -9282,14 +9347,14 @@ function Rs(e, t, n = 12, r = 50) {
9282
9347
  slow: c
9283
9348
  };
9284
9349
  }
9285
- function zs(e = {}) {
9350
+ function Bs(e = {}) {
9286
9351
  let t = {
9287
9352
  fastPeriod: 12,
9288
9353
  slowPeriod: 50,
9289
9354
  ...e
9290
9355
  }, n = null, r = 0, i = 0, a = [];
9291
9356
  function o(e) {
9292
- return (n !== e || r !== t.fastPeriod || i !== t.slowPeriod) && (a = Ls(e, t.fastPeriod, t.slowPeriod), n = e, r = t.fastPeriod, i = t.slowPeriod), a;
9357
+ return (n !== e || r !== t.fastPeriod || i !== t.slowPeriod) && (a = Rs(e, t.fastPeriod, t.slowPeriod), n = e, r = t.fastPeriod, i = t.slowPeriod), a;
9293
9358
  }
9294
9359
  return {
9295
9360
  name: "expma",
@@ -9303,7 +9368,7 @@ function zs(e = {}) {
9303
9368
  if (u.length < 2) return;
9304
9369
  let d = o(u);
9305
9370
  t.save(), t.translate(-a, 0);
9306
- let f = i.start, p = Math.min(i.end, u.length), m = Ka.FAST, h = Ka.SLOW, g = (e, r) => {
9371
+ let f = i.start, p = Math.min(i.end, u.length), m = qa.FAST, h = qa.SLOW, g = (e, r) => {
9307
9372
  t.strokeStyle = r, t.lineWidth = 1, t.lineJoin = "round", t.lineCap = "round", t.beginPath();
9308
9373
  let a = !0;
9309
9374
  for (let r = f; r < p; r++) {
@@ -9329,7 +9394,7 @@ function zs(e = {}) {
9329
9394
  }
9330
9395
  //#endregion
9331
9396
  //#region src/core/renderers/Indicator/ene.ts
9332
- function Bs(e, t, n) {
9397
+ function Vs(e, t, n) {
9333
9398
  let r = Array(e.length);
9334
9399
  if (e.length < t) return r;
9335
9400
  let i = 0;
@@ -9357,7 +9422,7 @@ function Bs(e, t, n) {
9357
9422
  }
9358
9423
  return r;
9359
9424
  }
9360
- function Vs(e, t, n = 10, r = 11) {
9425
+ function Hs(e, t, n = 10, r = 11) {
9361
9426
  if (t < n - 1 || t >= e.length) return null;
9362
9427
  let i = 0;
9363
9428
  for (let r = 0; r < n; r++) {
@@ -9372,14 +9437,14 @@ function Vs(e, t, n = 10, r = 11) {
9372
9437
  lower: a * (1 - o)
9373
9438
  };
9374
9439
  }
9375
- function Hs(e = {}) {
9440
+ function Us(e = {}) {
9376
9441
  let t = {
9377
9442
  period: 10,
9378
9443
  deviation: 11,
9379
9444
  ...e
9380
9445
  }, n = null, r = 0, i = 0, a = [];
9381
9446
  function o(e) {
9382
- return (n !== e || r !== t.period || i !== t.deviation) && (a = Bs(e, t.period, t.deviation), n = e, r = t.period, i = t.deviation), a;
9447
+ return (n !== e || r !== t.period || i !== t.deviation) && (a = Vs(e, t.period, t.deviation), n = e, r = t.period, i = t.deviation), a;
9383
9448
  }
9384
9449
  return {
9385
9450
  name: "ene",
@@ -9435,7 +9500,7 @@ function Hs(e = {}) {
9435
9500
  }
9436
9501
  //#endregion
9437
9502
  //#region src/utils/kline/ma.ts
9438
- function Us(e, t, n) {
9503
+ function Ws(e, t, n) {
9439
9504
  if (t < n - 1) return;
9440
9505
  let r = 0;
9441
9506
  for (let i = 0; i < n; i++) {
@@ -9447,7 +9512,7 @@ function Us(e, t, n) {
9447
9512
  }
9448
9513
  //#endregion
9449
9514
  //#region src/core/renderers/Indicator/mainIndicatorLegend.ts
9450
- function Ws(e) {
9515
+ function Gs(e) {
9451
9516
  let t = {
9452
9517
  yPaddingPx: e.yPaddingPx,
9453
9518
  indicators: {
@@ -9498,28 +9563,28 @@ function Ws(e) {
9498
9563
  r.push({
9499
9564
  label: `MA${e}`,
9500
9565
  color: La[t] || La.MA5,
9501
- value: Us(o, s, e)
9566
+ value: Ws(o, s, e)
9502
9567
  });
9503
9568
  }) : r.push({
9504
9569
  label: "MA5",
9505
9570
  color: La.MA5,
9506
- value: Us(o, s, 5)
9571
+ value: Ws(o, s, 5)
9507
9572
  }, {
9508
9573
  label: "MA10",
9509
9574
  color: La.MA10,
9510
- value: Us(o, s, 10)
9575
+ value: Ws(o, s, 10)
9511
9576
  }, {
9512
9577
  label: "MA20",
9513
9578
  color: La.MA20,
9514
- value: Us(o, s, 20)
9579
+ value: Ws(o, s, 20)
9515
9580
  }, {
9516
9581
  label: "MA30",
9517
9582
  color: La.MA30,
9518
- value: Us(o, s, 30)
9583
+ value: Ws(o, s, 30)
9519
9584
  }, {
9520
9585
  label: "MA60",
9521
9586
  color: La.MA60,
9522
- value: Us(o, s, 60)
9587
+ value: Ws(o, s, 60)
9523
9588
  }), r.length > 0) {
9524
9589
  let i = 12, a = t.yPaddingPx / 2 + 12 + e * 18;
9525
9590
  n.fillStyle = Na.NEUTRAL, n.fillText("MA", i, a), i += n.measureText("MA").width + 10;
@@ -9531,18 +9596,18 @@ function Ws(e) {
9531
9596
  } });
9532
9597
  let u = t.indicators.BOLL;
9533
9598
  u?.enabled && c.push({ draw: (e) => {
9534
- let r = u.params.period ?? 20, i = u.params.multiplier ?? 2, a = Is(o, s, r, i), c = 12, l = t.yPaddingPx / 2 + 12 + e * 18;
9599
+ let r = u.params.period ?? 20, i = u.params.multiplier ?? 2, a = Ls(o, s, r, i), c = 12, l = t.yPaddingPx / 2 + 12 + e * 18;
9535
9600
  n.fillStyle = Na.NEUTRAL, n.fillText(`BOLL(${r},${i})`, c, l), c += n.measureText(`BOLL(${r},${i})`).width + 10, a && (n.fillStyle = Ra.UPPER, n.fillText(`上轨:${a.upper.toFixed(2)}`, c, l), c += n.measureText(`上轨:${a.upper.toFixed(2)}`).width + 10, n.fillStyle = Ra.MIDDLE, n.fillText(`中轨:${a.middle.toFixed(2)}`, c, l), c += n.measureText(`中轨:${a.middle.toFixed(2)}`).width + 10, n.fillStyle = Ra.LOWER, n.fillText(`下轨:${a.lower.toFixed(2)}`, c, l));
9536
9601
  } });
9537
9602
  let d = t.indicators.EXPMA;
9538
9603
  d?.enabled && c.push({ draw: (e) => {
9539
- let r = d.params.fastPeriod ?? 12, i = d.params.slowPeriod ?? 50, a = Rs(o, s, r, i), c = 12, l = t.yPaddingPx / 2 + 12 + e * 18;
9540
- n.fillStyle = Na.NEUTRAL, n.fillText(`EXPMA(${r},${i})`, c, l), c += n.measureText(`EXPMA(${r},${i})`).width + 10, a && (n.fillStyle = Ka.FAST, n.fillText(`快:${a.fast.toFixed(2)}`, c, l), c += n.measureText(`快:${a.fast.toFixed(2)}`).width + 10, n.fillStyle = Ka.SLOW, n.fillText(`慢:${a.slow.toFixed(2)}`, c, l));
9604
+ let r = d.params.fastPeriod ?? 12, i = d.params.slowPeriod ?? 50, a = zs(o, s, r, i), c = 12, l = t.yPaddingPx / 2 + 12 + e * 18;
9605
+ n.fillStyle = Na.NEUTRAL, n.fillText(`EXPMA(${r},${i})`, c, l), c += n.measureText(`EXPMA(${r},${i})`).width + 10, a && (n.fillStyle = qa.FAST, n.fillText(`快:${a.fast.toFixed(2)}`, c, l), c += n.measureText(`快:${a.fast.toFixed(2)}`).width + 10, n.fillStyle = qa.SLOW, n.fillText(`慢:${a.slow.toFixed(2)}`, c, l));
9541
9606
  } });
9542
9607
  let f = t.indicators.ENE;
9543
9608
  f?.enabled && c.push({ draw: (e) => {
9544
- let r = f.params.period ?? 10, i = f.params.deviation ?? 11, a = Vs(o, s, r, i), c = 12, l = t.yPaddingPx / 2 + 12 + e * 18;
9545
- n.fillStyle = Na.NEUTRAL, n.fillText(`ENE(${r},${i})`, c, l), c += n.measureText(`ENE(${r},${i})`).width + 10, a && (n.fillStyle = qa.UPPER, n.fillText(`上轨:${a.upper.toFixed(2)}`, c, l), c += n.measureText(`上轨:${a.upper.toFixed(2)}`).width + 10, n.fillStyle = qa.MIDDLE, n.fillText(`中轨:${a.middle.toFixed(2)}`, c, l), c += n.measureText(`中轨:${a.middle.toFixed(2)}`).width + 10, n.fillStyle = qa.LOWER, n.fillText(`下轨:${a.lower.toFixed(2)}`, c, l));
9609
+ let r = f.params.period ?? 10, i = f.params.deviation ?? 11, a = Hs(o, s, r, i), c = 12, l = t.yPaddingPx / 2 + 12 + e * 18;
9610
+ n.fillStyle = Na.NEUTRAL, n.fillText(`ENE(${r},${i})`, c, l), c += n.measureText(`ENE(${r},${i})`).width + 10, a && (n.fillStyle = Ja.UPPER, n.fillText(`上轨:${a.upper.toFixed(2)}`, c, l), c += n.measureText(`上轨:${a.upper.toFixed(2)}`).width + 10, n.fillStyle = Ja.MIDDLE, n.fillText(`中轨:${a.middle.toFixed(2)}`, c, l), c += n.measureText(`中轨:${a.middle.toFixed(2)}`).width + 10, n.fillStyle = Ja.LOWER, n.fillText(`下轨:${a.lower.toFixed(2)}`, c, l));
9546
9611
  } }), c.forEach((e, t) => e.draw(t)), n.restore();
9547
9612
  },
9548
9613
  getConfig() {
@@ -9560,9 +9625,6 @@ function Ws(e) {
9560
9625
  };
9561
9626
  }
9562
9627
  //#endregion
9563
- //#region src/plugin/stateKeys.ts
9564
- var Gs = (e, t) => `indicator:${e}:${t}`;
9565
- //#endregion
9566
9628
  //#region src/core/renderers/Indicator/macd.ts
9567
9629
  function Ks(e, t) {
9568
9630
  let n = Array(e.length), r = 2 / (t + 1);
@@ -9604,7 +9666,7 @@ function Js(e, t, n, r) {
9604
9666
  return i;
9605
9667
  }
9606
9668
  function Ys(e = {}) {
9607
- let { paneId: t = "sub", config: n = {} } = e, r = Gs("macd", t), i = null, a = {
9669
+ let { paneId: t = "sub", config: n = {} } = e, r = Es("macd", t), i = null, a = {
9608
9670
  fastPeriod: 12,
9609
9671
  slowPeriod: 26,
9610
9672
  signalPeriod: 9,
@@ -9638,37 +9700,42 @@ function Ys(e = {}) {
9638
9700
  t && (_ = Math.max(_, t.dif, t.dea, t.macd), v = Math.min(v, t.dif, t.dea, t.macd));
9639
9701
  }
9640
9702
  if (!Number.isFinite(_) || !Number.isFinite(v)) return;
9641
- let y = Math.max(.05, (_ - v) * .1), b = v - y, x = _ + y, S = x - b || 1, C = c.end - 1, w = C >= 0 && C < g.length ? g[C] : null, T = {
9703
+ let y = Math.max(.05, (_ - v) * .1), b = v - y, x = _ + y;
9704
+ x - b;
9705
+ let S = c.end - 1, C = S >= 0 && S < g.length ? g[S] : null, w = {
9642
9706
  valueMin: b,
9643
9707
  valueMax: x,
9644
9708
  timestamp: Date.now(),
9645
- latestValues: w ? {
9646
- dif: w.dif,
9647
- dea: w.dea,
9648
- macd: w.macd
9709
+ latestValues: C ? {
9710
+ dif: C.dif,
9711
+ dea: C.dea,
9712
+ macd: C.macd
9649
9713
  } : void 0
9650
9714
  };
9651
- i?.setSharedState(r, T, `macd_${t}`);
9652
- let E = o.height - (0 - b) / S * o.height;
9715
+ i?.setSharedState(r, w, `macd_${t}`);
9716
+ let T = o.yAxis.getDisplayRange({
9717
+ minPrice: b,
9718
+ maxPrice: x
9719
+ }), E = T.minPrice, D = T.maxPrice - E || 1, O = o.height - (0 - E) / D * o.height;
9653
9720
  n.save(), n.translate(-l, 0);
9654
- let D = Math.max(c.start, a.slowPeriod - 1), O = Math.min(c.end, h.length);
9721
+ let k = Math.max(c.start, a.slowPeriod - 1), A = Math.min(c.end, h.length);
9655
9722
  if (a.showBAR) {
9656
- let e = Math.round(E * p) / p, t = Math.max(1, Math.round((u + f) * p));
9657
- for (let r = D; r < O; r++) {
9723
+ let e = Math.round(O * p) / p, t = Math.max(1, Math.round((u + f) * p));
9724
+ for (let r = k; r < A; r++) {
9658
9725
  let i = g[r];
9659
9726
  if (!i) continue;
9660
9727
  let a = m[r - c.start];
9661
9728
  if (a === void 0) continue;
9662
- let s = m[r - c.start + 1], l = m[r - c.start - 1], d = s === void 0 ? l === void 0 ? t : Math.max(1, Math.round((a - l) * p)) : Math.max(1, Math.round((s - a) * p)), f = Math.max(1, d - 1) / p, h = Math.round((a + (u - f) / 2) * p) / p, _ = o.height - (i.macd - b) / S * o.height, v = i.macd >= 0, y = r > 0 ? g[r - 1] : null, x;
9663
- x = y ? i.macd >= y.macd : !0;
9664
- let C;
9665
- C = v ? x ? za.BAR_UP : za.BAR_UP_LIGHT : x ? za.BAR_DOWN_LIGHT : za.BAR_DOWN, n.fillStyle = C;
9666
- let w = Math.round(_ * p) / p, T = 1 / p;
9729
+ let s = m[r - c.start + 1], l = m[r - c.start - 1], d = s === void 0 ? l === void 0 ? t : Math.max(1, Math.round((a - l) * p)) : Math.max(1, Math.round((s - a) * p)), f = Math.max(1, d - 1) / p, h = Math.round((a + (u - f) / 2) * p) / p, _ = o.height - (i.macd - E) / D * o.height, v = i.macd >= 0, y = r > 0 ? g[r - 1] : null, b;
9730
+ b = y ? i.macd >= y.macd : !0;
9731
+ let x;
9732
+ x = v ? b ? za.BAR_UP : za.BAR_UP_LIGHT : b ? za.BAR_DOWN_LIGHT : za.BAR_DOWN, n.fillStyle = x;
9733
+ let S = Math.round(_ * p) / p, C = 1 / p;
9667
9734
  if (v) {
9668
- let t = e - w, r = t <= 0 ? T : Math.max(t, T), i = t <= 0 ? e - T : e - r;
9735
+ let t = e - S, r = t <= 0 ? C : Math.max(t, C), i = t <= 0 ? e - C : e - r;
9669
9736
  n.fillRect(h, i, f, r);
9670
9737
  } else {
9671
- let t = w - e, r = t <= 0 ? T : Math.max(t, T);
9738
+ let t = S - e, r = t <= 0 ? C : Math.max(t, C);
9672
9739
  n.fillRect(h, e, f, r);
9673
9740
  }
9674
9741
  }
@@ -9676,12 +9743,12 @@ function Ys(e = {}) {
9676
9743
  if (a.showDIF) {
9677
9744
  n.strokeStyle = za.DIF, n.lineWidth = 1, n.lineJoin = "round", n.lineCap = "round", n.beginPath();
9678
9745
  let e = !0;
9679
- for (let t = D; t < O; t++) {
9746
+ for (let t = k; t < A; t++) {
9680
9747
  let r = g[t];
9681
9748
  if (!r) continue;
9682
9749
  let i = m[t - c.start];
9683
9750
  if (i === void 0) continue;
9684
- let a = i + u / 2, s = o.height - (r.dif - b) / S * o.height, l = Q(a, p), d = Q(s, p);
9751
+ let a = i + u / 2, s = o.height - (r.dif - E) / D * o.height, l = Q(a, p), d = Q(s, p);
9685
9752
  e ? (n.moveTo(l, d), e = !1) : n.lineTo(l, d);
9686
9753
  }
9687
9754
  n.stroke();
@@ -9689,12 +9756,12 @@ function Ys(e = {}) {
9689
9756
  if (a.showDEA) {
9690
9757
  n.strokeStyle = za.DEA, n.lineWidth = 1, n.lineJoin = "round", n.lineCap = "round", n.beginPath();
9691
9758
  let e = !0;
9692
- for (let t = D; t < O; t++) {
9759
+ for (let t = k; t < A; t++) {
9693
9760
  let r = g[t];
9694
9761
  if (!r) continue;
9695
9762
  let i = m[t - c.start];
9696
9763
  if (i === void 0) continue;
9697
- let a = i + u / 2, s = o.height - (r.dea - b) / S * o.height, l = Q(a, p), d = Q(s, p);
9764
+ let a = i + u / 2, s = o.height - (r.dea - E) / D * o.height, l = Q(a, p), d = Q(s, p);
9698
9765
  e ? (n.moveTo(l, d), e = !1) : n.lineTo(l, d);
9699
9766
  }
9700
9767
  n.stroke();
@@ -9768,7 +9835,7 @@ function Qs(e, t) {
9768
9835
  return n;
9769
9836
  }
9770
9837
  function $s(e = {}) {
9771
- let { paneId: t = "sub", config: n = {} } = e, r = Gs("rsi", t), i = null, a = {
9838
+ let { paneId: t = "sub", config: n = {} } = e, r = Es("rsi", t), i = null, a = {
9772
9839
  period1: 6,
9773
9840
  period2: 12,
9774
9841
  period3: 24,
@@ -9805,23 +9872,28 @@ function $s(e = {}) {
9805
9872
  valueMax: 100,
9806
9873
  timestamp: Date.now()
9807
9874
  };
9808
- i?.setSharedState(r, v, `rsi_${t}`), n.save(), n.translate(-l, 0);
9809
- let y = o.height - 80 / 100 * o.height, b = o.height - 50 / 100 * o.height, x = o.height - 20 / 100 * o.height, S = l, C = l + e.paneWidth;
9810
- n.strokeStyle = "rgba(0, 0, 0, 0.1)", n.lineWidth = 1, n.setLineDash([4, 4]), n.beginPath(), n.moveTo(S, y), n.lineTo(C, y), n.moveTo(S, b), n.lineTo(C, b), n.moveTo(S, x), n.lineTo(C, x), n.stroke(), n.setLineDash([]);
9811
- let w = Math.max(c.start, a.period1), T = Math.min(c.end, m.length), E = (e, t) => {
9875
+ i?.setSharedState(r, v, `rsi_${t}`);
9876
+ let y = o.yAxis.getDisplayRange({
9877
+ minPrice: 0,
9878
+ maxPrice: 100
9879
+ }), b = y.minPrice, x = y.maxPrice - b || 1;
9880
+ n.save(), n.translate(-l, 0);
9881
+ let S = o.height - (80 - b) / x * o.height, C = o.height - (50 - b) / x * o.height, w = o.height - (20 - b) / x * o.height, T = l, E = l + e.paneWidth;
9882
+ n.strokeStyle = "rgba(0, 0, 0, 0.1)", n.lineWidth = 1, n.setLineDash([4, 4]), n.beginPath(), n.moveTo(T, S), n.lineTo(E, S), n.moveTo(T, C), n.lineTo(E, C), n.moveTo(T, w), n.lineTo(E, w), n.stroke(), n.setLineDash([]);
9883
+ let D = Math.max(c.start, a.period1), O = Math.min(c.end, m.length), k = (e, t) => {
9812
9884
  n.strokeStyle = t, n.lineWidth = 1, n.lineJoin = "round", n.lineCap = "round", n.beginPath();
9813
9885
  let r = !0;
9814
- for (let t = w; t < T; t++) {
9886
+ for (let t = D; t < O; t++) {
9815
9887
  let i = e[t];
9816
9888
  if (i === void 0) continue;
9817
9889
  let a = f[t - c.start];
9818
9890
  if (a === void 0) continue;
9819
- let s = a + u / 2, l = o.height - (i - 0) / 100 * o.height, p = Q(s, d), m = Q(l, d);
9891
+ let s = a + u / 2, l = o.height - (i - b) / x * o.height, p = Q(s, d), m = Q(l, d);
9820
9892
  r ? (n.moveTo(p, m), r = !1) : n.lineTo(p, m);
9821
9893
  }
9822
9894
  n.stroke();
9823
9895
  };
9824
- a.showRSI1 && E(h, Ba.RSI1), a.showRSI2 && E(g, Ba.RSI2), a.showRSI3 && E(_, Ba.RSI3), n.restore();
9896
+ a.showRSI1 && k(h, Va.RSI1), a.showRSI2 && k(g, Va.RSI2), a.showRSI3 && k(_, Va.RSI3), n.restore();
9825
9897
  },
9826
9898
  onDataUpdate() {
9827
9899
  o = null;
@@ -9840,15 +9912,15 @@ function ec(e, t, n = 6, r = 12, i = 24) {
9840
9912
  return a !== void 0 && c.push({
9841
9913
  label: `RSI${n}`,
9842
9914
  value: a,
9843
- color: Ba.RSI1
9915
+ color: Va.RSI1
9844
9916
  }), o !== void 0 && c.push({
9845
9917
  label: `RSI${r}`,
9846
9918
  value: o,
9847
- color: Ba.RSI2
9919
+ color: Va.RSI2
9848
9920
  }), s !== void 0 && c.push({
9849
9921
  label: `RSI${i}`,
9850
9922
  value: s,
9851
- color: Ba.RSI3
9923
+ color: Va.RSI3
9852
9924
  }), c.length === 0 ? null : {
9853
9925
  name: "RSI",
9854
9926
  params: [
@@ -9876,7 +9948,7 @@ function tc(e, t) {
9876
9948
  return n;
9877
9949
  }
9878
9950
  function nc(e = {}) {
9879
- let { paneId: t = "sub", config: n = {} } = e, r = Gs("cci", t), i = null, a = {
9951
+ let { paneId: t = "sub", config: n = {} } = e, r = Es("cci", t), i = null, a = {
9880
9952
  period: 14,
9881
9953
  showCCI: !0,
9882
9954
  ...n
@@ -9906,27 +9978,30 @@ function nc(e = {}) {
9906
9978
  t !== void 0 && (g = Math.max(g, t), _ = Math.min(_, t));
9907
9979
  }
9908
9980
  if (!Number.isFinite(g) || !Number.isFinite(_)) return;
9909
- g = Math.max(g, 150), _ = Math.min(_, -150);
9910
- let v = g - _ || 1, y = {
9981
+ g = Math.max(g, 150), _ = Math.min(_, -150), g - _;
9982
+ let v = {
9911
9983
  valueMin: _,
9912
9984
  valueMax: g,
9913
9985
  timestamp: Date.now()
9914
9986
  };
9915
- i?.setSharedState(r, y, `cci_${t}`);
9916
- let b = o.height - (0 - _) / v * o.height;
9987
+ i?.setSharedState(r, v, `cci_${t}`);
9988
+ let y = o.yAxis.getDisplayRange({
9989
+ minPrice: _,
9990
+ maxPrice: g
9991
+ }), b = y.minPrice, x = y.maxPrice - b || 1, S = o.height - (0 - b) / x * o.height;
9917
9992
  n.save(), n.translate(-u, 0);
9918
- let x = o.height - (100 - _) / v * o.height, S = o.height - (-100 - _) / v * o.height, C = u, w = u + e.paneWidth;
9919
- n.strokeStyle = Va.OVERBOUGHT, n.lineWidth = 1, n.setLineDash([4, 4]), n.beginPath(), n.moveTo(C, x), n.lineTo(w, x), n.stroke(), n.strokeStyle = Va.OVERSOLD, n.beginPath(), n.moveTo(C, S), n.lineTo(w, S), n.stroke(), n.strokeStyle = "rgba(0, 0, 0, 0.1)", n.beginPath(), n.moveTo(C, b), n.lineTo(w, b), n.stroke(), n.setLineDash([]);
9920
- let T = Math.max(c.start, a.period - 1), E = Math.min(c.end, m.length);
9993
+ let C = o.height - (100 - b) / x * o.height, w = o.height - (-100 - b) / x * o.height, T = u, E = u + e.paneWidth;
9994
+ n.strokeStyle = Ha.OVERBOUGHT, n.lineWidth = 1, n.setLineDash([4, 4]), n.beginPath(), n.moveTo(T, C), n.lineTo(E, C), n.stroke(), n.strokeStyle = Ha.OVERSOLD, n.beginPath(), n.moveTo(T, w), n.lineTo(E, w), n.stroke(), n.strokeStyle = "rgba(0, 0, 0, 0.1)", n.beginPath(), n.moveTo(T, S), n.lineTo(E, S), n.stroke(), n.setLineDash([]);
9995
+ let D = Math.max(c.start, a.period - 1), O = Math.min(c.end, m.length);
9921
9996
  if (a.showCCI) {
9922
- n.strokeStyle = Va.CCI, n.lineWidth = 1, n.lineJoin = "round", n.lineCap = "round", n.beginPath();
9997
+ n.strokeStyle = Ha.CCI, n.lineWidth = 1, n.lineJoin = "round", n.lineCap = "round", n.beginPath();
9923
9998
  let e = !0;
9924
- for (let t = T; t < E; t++) {
9999
+ for (let t = D; t < O; t++) {
9925
10000
  let r = h[t];
9926
10001
  if (r === void 0) continue;
9927
10002
  let i = p[t - c.start];
9928
10003
  if (i === void 0) continue;
9929
- let a = i + d / 2, s = o.height - (r - _) / v * o.height, l = Q(a, f), u = Q(s, f);
10004
+ let a = i + d / 2, s = o.height - (r - b) / x * o.height, l = Q(a, f), u = Q(s, f);
9930
10005
  e ? (n.moveTo(l, u), e = !1) : n.lineTo(l, u);
9931
10006
  }
9932
10007
  n.stroke();
@@ -9956,7 +10031,7 @@ function ic(e, t, n = 14) {
9956
10031
  values: [{
9957
10032
  label: "CCI",
9958
10033
  value: r,
9959
- color: Va.CCI
10034
+ color: Ha.CCI
9960
10035
  }]
9961
10036
  };
9962
10037
  }
@@ -9991,7 +10066,7 @@ function ac(e, t, n) {
9991
10066
  return r;
9992
10067
  }
9993
10068
  function oc(e = {}) {
9994
- let { paneId: t = "sub", config: n = {} } = e, r = Gs("stoch", t), i = null, a = {
10069
+ let { paneId: t = "sub", config: n = {} } = e, r = Es("stoch", t), i = null, a = {
9995
10070
  n: 9,
9996
10071
  m: 3,
9997
10072
  showK: !0,
@@ -10022,32 +10097,37 @@ function oc(e = {}) {
10022
10097
  valueMax: 100,
10023
10098
  timestamp: Date.now()
10024
10099
  };
10025
- i?.setSharedState(r, g, `stoch_${t}`), n.save(), n.translate(-l, 0);
10026
- let _ = o.height - 80 / 100 * o.height, v = o.height - 20 / 100 * o.height, y = l, b = l + e.paneWidth;
10027
- n.strokeStyle = "rgba(0, 0, 0, 0.1)", n.lineWidth = 1, n.setLineDash([4, 4]), n.beginPath(), n.moveTo(y, _), n.lineTo(b, _), n.moveTo(y, v), n.lineTo(b, v), n.stroke(), n.setLineDash([]);
10028
- let x = Math.max(c.start, a.n + a.m - 2), S = Math.min(c.end, m.length);
10100
+ i?.setSharedState(r, g, `stoch_${t}`);
10101
+ let _ = o.yAxis.getDisplayRange({
10102
+ minPrice: 0,
10103
+ maxPrice: 100
10104
+ }), v = _.minPrice, y = _.maxPrice - v || 1;
10105
+ n.save(), n.translate(-l, 0);
10106
+ let b = o.height - (80 - v) / y * o.height, x = o.height - (20 - v) / y * o.height, S = l, C = l + e.paneWidth;
10107
+ n.strokeStyle = "rgba(0, 0, 0, 0.1)", n.lineWidth = 1, n.setLineDash([4, 4]), n.beginPath(), n.moveTo(S, b), n.lineTo(C, b), n.moveTo(S, x), n.lineTo(C, x), n.stroke(), n.setLineDash([]);
10108
+ let w = Math.max(c.start, a.n + a.m - 2), T = Math.min(c.end, m.length);
10029
10109
  if (a.showK) {
10030
- n.strokeStyle = Ha.K, n.lineWidth = 1, n.lineJoin = "round", n.lineCap = "round", n.beginPath();
10110
+ n.strokeStyle = Ua.K, n.lineWidth = 1, n.lineJoin = "round", n.lineCap = "round", n.beginPath();
10031
10111
  let e = !0;
10032
- for (let t = x; t < S; t++) {
10112
+ for (let t = w; t < T; t++) {
10033
10113
  let r = h[t];
10034
10114
  if (!r) continue;
10035
10115
  let i = p[t - c.start];
10036
10116
  if (i === void 0) continue;
10037
- let a = i + d / 2, s = o.height - (r.k - 0) / 100 * o.height, l = Q(a, f), u = Q(s, f);
10117
+ let a = i + d / 2, s = o.height - (r.k - v) / y * o.height, l = Q(a, f), u = Q(s, f);
10038
10118
  e ? (n.moveTo(l, u), e = !1) : n.lineTo(l, u);
10039
10119
  }
10040
10120
  n.stroke();
10041
10121
  }
10042
10122
  if (a.showD) {
10043
- n.strokeStyle = Ha.D, n.lineWidth = 1, n.lineJoin = "round", n.lineCap = "round", n.beginPath();
10123
+ n.strokeStyle = Ua.D, n.lineWidth = 1, n.lineJoin = "round", n.lineCap = "round", n.beginPath();
10044
10124
  let e = !0;
10045
- for (let t = x; t < S; t++) {
10125
+ for (let t = w; t < T; t++) {
10046
10126
  let r = h[t];
10047
10127
  if (!r) continue;
10048
10128
  let i = p[t - c.start];
10049
10129
  if (i === void 0) continue;
10050
- let a = i + d / 2, s = o.height - (r.d - 0) / 100 * o.height, l = Q(a, f), u = Q(s, f);
10130
+ let a = i + d / 2, s = o.height - (r.d - v) / y * o.height, l = Q(a, f), u = Q(s, f);
10051
10131
  e ? (n.moveTo(l, u), e = !1) : n.lineTo(l, u);
10052
10132
  }
10053
10133
  n.stroke();
@@ -10077,11 +10157,11 @@ function cc(e, t, n = 9, r = 3) {
10077
10157
  values: [{
10078
10158
  label: "K",
10079
10159
  value: i.k,
10080
- color: Ha.K
10160
+ color: Ua.K
10081
10161
  }, {
10082
10162
  label: "D",
10083
10163
  value: i.d,
10084
- color: Ha.D
10164
+ color: Ua.D
10085
10165
  }]
10086
10166
  } : null;
10087
10167
  }
@@ -10097,7 +10177,7 @@ function lc(e, t) {
10097
10177
  return n;
10098
10178
  }
10099
10179
  function uc(e = {}) {
10100
- let { paneId: t = "sub", config: n = {} } = e, r = Gs("mom", t), i = null, a = {
10180
+ let { paneId: t = "sub", config: n = {} } = e, r = Es("mom", t), i = null, a = {
10101
10181
  period: 10,
10102
10182
  showMOM: !0,
10103
10183
  ...n
@@ -10128,27 +10208,30 @@ function uc(e = {}) {
10128
10208
  }
10129
10209
  if (!Number.isFinite(g) || !Number.isFinite(_)) return;
10130
10210
  let v = Math.max(Math.abs(g), Math.abs(_)) * .1;
10131
- g += v, _ -= v;
10132
- let y = g - _ || 1, b = {
10211
+ g += v, _ -= v, g - _;
10212
+ let y = {
10133
10213
  valueMin: _,
10134
10214
  valueMax: g,
10135
10215
  timestamp: Date.now()
10136
10216
  };
10137
- i?.setSharedState(r, b, `mom_${t}`);
10138
- let x = o.height - (0 - _) / y * o.height;
10217
+ i?.setSharedState(r, y, `mom_${t}`);
10218
+ let b = o.yAxis.getDisplayRange({
10219
+ minPrice: _,
10220
+ maxPrice: g
10221
+ }), x = b.minPrice, S = b.maxPrice - x || 1, C = o.height - (0 - x) / S * o.height;
10139
10222
  n.save(), n.translate(-u, 0);
10140
- let S = u, C = u + e.paneWidth;
10141
- n.strokeStyle = Ua.ZERO, n.lineWidth = 1, n.beginPath(), n.moveTo(S, x), n.lineTo(C, x), n.stroke();
10142
- let w = Math.max(c.start, a.period), T = Math.min(c.end, m.length);
10223
+ let w = u, T = u + e.paneWidth;
10224
+ n.strokeStyle = Wa.ZERO, n.lineWidth = 1, n.beginPath(), n.moveTo(w, C), n.lineTo(T, C), n.stroke();
10225
+ let E = Math.max(c.start, a.period), D = Math.min(c.end, m.length);
10143
10226
  if (a.showMOM) {
10144
- n.strokeStyle = Ua.MOM, n.lineWidth = 1, n.lineJoin = "round", n.lineCap = "round", n.beginPath();
10227
+ n.strokeStyle = Wa.MOM, n.lineWidth = 1, n.lineJoin = "round", n.lineCap = "round", n.beginPath();
10145
10228
  let e = !0;
10146
- for (let t = w; t < T; t++) {
10229
+ for (let t = E; t < D; t++) {
10147
10230
  let r = h[t];
10148
10231
  if (r === void 0) continue;
10149
10232
  let i = p[t - c.start];
10150
10233
  if (i === void 0) continue;
10151
- let a = i + d / 2, s = o.height - (r - _) / y * o.height, l = Q(a, f), u = Q(s, f);
10234
+ let a = i + d / 2, s = o.height - (r - x) / S * o.height, l = Q(a, f), u = Q(s, f);
10152
10235
  e ? (n.moveTo(l, u), e = !1) : n.lineTo(l, u);
10153
10236
  }
10154
10237
  n.stroke();
@@ -10178,7 +10261,7 @@ function fc(e, t, n = 10) {
10178
10261
  values: [{
10179
10262
  label: "MOM",
10180
10263
  value: r,
10181
- color: Ua.MOM
10264
+ color: Wa.MOM
10182
10265
  }]
10183
10266
  };
10184
10267
  }
@@ -10199,7 +10282,7 @@ function pc(e, t) {
10199
10282
  return n;
10200
10283
  }
10201
10284
  function mc(e = {}) {
10202
- let { paneId: t = "sub", config: n = {} } = e, r = Gs("wmsr", t), i = null, a = {
10285
+ let { paneId: t = "sub", config: n = {} } = e, r = Es("wmsr", t), i = null, a = {
10203
10286
  period: 14,
10204
10287
  showWMSR: !0,
10205
10288
  ...n
@@ -10230,19 +10313,24 @@ function mc(e = {}) {
10230
10313
  valueMax: 0,
10231
10314
  timestamp: Date.now()
10232
10315
  };
10233
- i?.setSharedState(r, _, `wmsr_${t}`), n.save(), n.translate(-u, 0);
10234
- let v = o.height - (-20 - g) / 100 * o.height, y = o.height - (-80 - g) / 100 * o.height, b = o.height - (-50 - g) / 100 * o.height, x = u, S = u + e.paneWidth;
10235
- n.strokeStyle = Wa.OVERBOUGHT, n.lineWidth = 1, n.setLineDash([4, 4]), n.beginPath(), n.moveTo(x, v), n.lineTo(S, v), n.stroke(), n.strokeStyle = Wa.OVERSOLD, n.beginPath(), n.moveTo(x, y), n.lineTo(S, y), n.stroke(), n.strokeStyle = "rgba(0, 0, 0, 0.1)", n.beginPath(), n.moveTo(x, b), n.lineTo(S, b), n.stroke(), n.setLineDash([]);
10236
- let C = Math.max(c.start, a.period - 1), w = Math.min(c.end, m.length);
10316
+ i?.setSharedState(r, _, `wmsr_${t}`);
10317
+ let v = o.yAxis.getDisplayRange({
10318
+ minPrice: g,
10319
+ maxPrice: 0
10320
+ }), y = v.minPrice, b = v.maxPrice - y || 1;
10321
+ n.save(), n.translate(-u, 0);
10322
+ let x = o.height - (-20 - y) / b * o.height, S = o.height - (-80 - y) / b * o.height, C = o.height - (-50 - y) / b * o.height, w = u, T = u + e.paneWidth;
10323
+ n.strokeStyle = Ga.OVERBOUGHT, n.lineWidth = 1, n.setLineDash([4, 4]), n.beginPath(), n.moveTo(w, x), n.lineTo(T, x), n.stroke(), n.strokeStyle = Ga.OVERSOLD, n.beginPath(), n.moveTo(w, S), n.lineTo(T, S), n.stroke(), n.strokeStyle = "rgba(0, 0, 0, 0.1)", n.beginPath(), n.moveTo(w, C), n.lineTo(T, C), n.stroke(), n.setLineDash([]);
10324
+ let E = Math.max(c.start, a.period - 1), D = Math.min(c.end, m.length);
10237
10325
  if (a.showWMSR) {
10238
- n.strokeStyle = Wa.WMSR, n.lineWidth = 1, n.lineJoin = "round", n.lineCap = "round", n.beginPath();
10326
+ n.strokeStyle = Ga.WMSR, n.lineWidth = 1, n.lineJoin = "round", n.lineCap = "round", n.beginPath();
10239
10327
  let e = !0;
10240
- for (let t = C; t < w; t++) {
10328
+ for (let t = E; t < D; t++) {
10241
10329
  let r = h[t];
10242
10330
  if (r === void 0) continue;
10243
10331
  let i = p[t - c.start];
10244
10332
  if (i === void 0) continue;
10245
- let a = i + d / 2, s = o.height - (r - g) / 100 * o.height, l = Q(a, f), u = Q(s, f);
10333
+ let a = i + d / 2, s = o.height - (r - y) / b * o.height, l = Q(a, f), u = Q(s, f);
10246
10334
  e ? (n.moveTo(l, u), e = !1) : n.lineTo(l, u);
10247
10335
  }
10248
10336
  n.stroke();
@@ -10272,7 +10360,7 @@ function gc(e, t, n = 14) {
10272
10360
  values: [{
10273
10361
  label: "WMSR",
10274
10362
  value: r,
10275
- color: Wa.WMSR
10363
+ color: Ga.WMSR
10276
10364
  }]
10277
10365
  };
10278
10366
  }
@@ -10318,7 +10406,7 @@ function yc(e, t, n, r, i, a) {
10318
10406
  return o;
10319
10407
  }
10320
10408
  function bc(e = {}) {
10321
- let { paneId: t = "sub", config: n = {} } = e, r = Gs("kst", t), i = null, a = {
10409
+ let { paneId: t = "sub", config: n = {} } = e, r = Es("kst", t), i = null, a = {
10322
10410
  roc1: 10,
10323
10411
  roc2: 15,
10324
10412
  roc3: 20,
@@ -10355,40 +10443,43 @@ function bc(e = {}) {
10355
10443
  }
10356
10444
  if (!Number.isFinite(g) || !Number.isFinite(_)) return;
10357
10445
  let v = (g - _) * .1 || 1;
10358
- g += v, _ -= v;
10359
- let y = g - _ || 1, b = {
10446
+ g += v, _ -= v, g - _;
10447
+ let y = {
10360
10448
  valueMin: _,
10361
10449
  valueMax: g,
10362
10450
  timestamp: Date.now()
10363
10451
  };
10364
- i?.setSharedState(r, b, `kst_${t}`);
10365
- let x = o.height - (0 - _) / y * o.height;
10452
+ i?.setSharedState(r, y, `kst_${t}`);
10453
+ let b = o.yAxis.getDisplayRange({
10454
+ minPrice: _,
10455
+ maxPrice: g
10456
+ }), x = b.minPrice, S = b.maxPrice - x || 1, C = o.height - (0 - x) / S * o.height;
10366
10457
  n.save(), n.translate(-u, 0);
10367
- let S = u, C = u + e.paneWidth;
10368
- n.strokeStyle = "rgba(0, 0, 0, 0.1)", n.lineWidth = 1, n.beginPath(), n.moveTo(S, x), n.lineTo(C, x), n.stroke();
10369
- let w = Math.max(c.start, a.roc4 + 15 + a.signalPeriod - 1), T = Math.min(c.end, m.length);
10458
+ let w = u, T = u + e.paneWidth;
10459
+ n.strokeStyle = "rgba(0, 0, 0, 0.1)", n.lineWidth = 1, n.beginPath(), n.moveTo(w, C), n.lineTo(T, C), n.stroke();
10460
+ let E = Math.max(c.start, a.roc4 + 15 + a.signalPeriod - 1), D = Math.min(c.end, m.length);
10370
10461
  if (a.showKST) {
10371
- n.strokeStyle = Ga.KST, n.lineWidth = 1, n.lineJoin = "round", n.lineCap = "round", n.beginPath();
10462
+ n.strokeStyle = Ka.KST, n.lineWidth = 1, n.lineJoin = "round", n.lineCap = "round", n.beginPath();
10372
10463
  let e = !0;
10373
- for (let t = w; t < T; t++) {
10464
+ for (let t = E; t < D; t++) {
10374
10465
  let r = h[t];
10375
10466
  if (!r) continue;
10376
10467
  let i = p[t - c.start];
10377
10468
  if (i === void 0) continue;
10378
- let a = i + d / 2, s = o.height - (r.kst - _) / y * o.height, l = Q(a, f), u = Q(s, f);
10469
+ let a = i + d / 2, s = o.height - (r.kst - x) / S * o.height, l = Q(a, f), u = Q(s, f);
10379
10470
  e ? (n.moveTo(l, u), e = !1) : n.lineTo(l, u);
10380
10471
  }
10381
10472
  n.stroke();
10382
10473
  }
10383
10474
  if (a.showSignal) {
10384
- n.strokeStyle = Ga.SIGNAL, n.lineWidth = 1, n.lineJoin = "round", n.lineCap = "round", n.beginPath();
10475
+ n.strokeStyle = Ka.SIGNAL, n.lineWidth = 1, n.lineJoin = "round", n.lineCap = "round", n.beginPath();
10385
10476
  let e = !0;
10386
- for (let t = w; t < T; t++) {
10477
+ for (let t = E; t < D; t++) {
10387
10478
  let r = h[t];
10388
10479
  if (!r) continue;
10389
10480
  let i = p[t - c.start];
10390
10481
  if (i === void 0) continue;
10391
- let a = i + d / 2, s = o.height - (r.signal - _) / y * o.height, l = Q(a, f), u = Q(s, f);
10482
+ let a = i + d / 2, s = o.height - (r.signal - x) / S * o.height, l = Q(a, f), u = Q(s, f);
10392
10483
  e ? (n.moveTo(l, u), e = !1) : n.lineTo(l, u);
10393
10484
  }
10394
10485
  n.stroke();
@@ -10424,11 +10515,11 @@ function Sc(e, t, n = 10, r = 15, i = 20, a = 30, o = 9) {
10424
10515
  values: [{
10425
10516
  label: "KST",
10426
10517
  value: s.kst,
10427
- color: Ga.KST
10518
+ color: Ka.KST
10428
10519
  }, {
10429
10520
  label: "Signal",
10430
10521
  value: s.signal,
10431
- color: Ga.SIGNAL
10522
+ color: Ka.SIGNAL
10432
10523
  }]
10433
10524
  } : null;
10434
10525
  }
@@ -10449,7 +10540,7 @@ function Cc(e, t) {
10449
10540
  return n;
10450
10541
  }
10451
10542
  function wc(e = {}) {
10452
- let { paneId: t = "sub", config: n = {} } = e, r = Gs("fastk", t), i = null, a = {
10543
+ let { paneId: t = "sub", config: n = {} } = e, r = Es("fastk", t), i = null, a = {
10453
10544
  period: 9,
10454
10545
  showFASTK: !0,
10455
10546
  ...n
@@ -10478,19 +10569,24 @@ function wc(e = {}) {
10478
10569
  valueMax: 100,
10479
10570
  timestamp: Date.now()
10480
10571
  };
10481
- i?.setSharedState(r, g, `fastk_${t}`), n.save(), n.translate(-u, 0);
10482
- let _ = o.height - 80 / 100 * o.height, v = o.height - 20 / 100 * o.height, y = u, b = u + e.paneWidth;
10483
- n.strokeStyle = "rgba(0, 0, 0, 0.1)", n.lineWidth = 1, n.setLineDash([4, 4]), n.beginPath(), n.moveTo(y, _), n.lineTo(b, _), n.moveTo(y, v), n.lineTo(b, v), n.stroke(), n.setLineDash([]);
10484
- let x = Math.max(c.start, a.period - 1), S = Math.min(c.end, m.length);
10572
+ i?.setSharedState(r, g, `fastk_${t}`);
10573
+ let _ = o.yAxis.getDisplayRange({
10574
+ minPrice: 0,
10575
+ maxPrice: 100
10576
+ }), v = _.minPrice, y = _.maxPrice - v || 1;
10577
+ n.save(), n.translate(-u, 0);
10578
+ let b = o.height - (80 - v) / y * o.height, x = o.height - (20 - v) / y * o.height, S = u, C = u + e.paneWidth;
10579
+ n.strokeStyle = "rgba(0, 0, 0, 0.1)", n.lineWidth = 1, n.setLineDash([4, 4]), n.beginPath(), n.moveTo(S, b), n.lineTo(C, b), n.moveTo(S, x), n.lineTo(C, x), n.stroke(), n.setLineDash([]);
10580
+ let w = Math.max(c.start, a.period - 1), T = Math.min(c.end, m.length);
10485
10581
  if (a.showFASTK) {
10486
- n.strokeStyle = Ha.K, n.lineWidth = 1, n.lineJoin = "round", n.lineCap = "round", n.beginPath();
10582
+ n.strokeStyle = Ua.K, n.lineWidth = 1, n.lineJoin = "round", n.lineCap = "round", n.beginPath();
10487
10583
  let e = !0;
10488
- for (let t = x; t < S; t++) {
10584
+ for (let t = w; t < T; t++) {
10489
10585
  let r = h[t];
10490
10586
  if (r === void 0) continue;
10491
10587
  let i = p[t - c.start];
10492
10588
  if (i === void 0) continue;
10493
- let a = i + d / 2, s = o.height - (r - 0) / 100 * o.height, l = Q(a, f), u = Q(s, f);
10589
+ let a = i + d / 2, s = o.height - (r - v) / y * o.height, l = Q(a, f), u = Q(s, f);
10494
10590
  e ? (n.moveTo(l, u), e = !1) : n.lineTo(l, u);
10495
10591
  }
10496
10592
  n.stroke();
@@ -10520,7 +10616,7 @@ function Ec(e, t, n = 9) {
10520
10616
  values: [{
10521
10617
  label: "FASTK",
10522
10618
  value: r,
10523
- color: Ha.K
10619
+ color: Ua.K
10524
10620
  }]
10525
10621
  };
10526
10622
  }
@@ -10529,7 +10625,7 @@ function Ec(e, t, n = 9) {
10529
10625
  function Dc(e) {
10530
10626
  let { indicatorId: t, paneId: n } = e;
10531
10627
  switch (t) {
10532
- case "VOLUME": return Ts({ paneId: n });
10628
+ case "VOLUME": return Ds({ paneId: n });
10533
10629
  case "MACD": return Ys({ paneId: n });
10534
10630
  case "RSI": return $s({ paneId: n });
10535
10631
  case "CCI": return nc({ paneId: n });
@@ -10567,9 +10663,15 @@ var Oc = class e {
10567
10663
  currentZoomLevel = 1;
10568
10664
  zoomLevelCount;
10569
10665
  constructor(e, t) {
10570
- this.dom = e, this.opt = t, this.interaction = new Cs(this), this.markerManager = new wo(), this.pluginHost = ga(), this.rendererPluginManager = new va(), this.rendererPluginManager.setPluginHost(this.pluginHost), this.rendererPluginManager.setInvalidateCallback(() => this.scheduleDraw()), this.syncPaneRatiosFromSpecs(this.opt.panes), this.zoomLevelCount = Math.max(2, Math.round(this.opt.zoomLevels ?? 10)), this.currentZoomLevel = this.opt.initialZoomLevel ?? Math.round(this.zoomLevelCount / 2), this.currentZoomLevel = Math.max(1, Math.min(this.zoomLevelCount, this.currentZoomLevel));
10571
- let n = this.zoomLevelToKWidth(this.currentZoomLevel);
10572
- this.opt.kWidth = n, this.initPanes(), this.initResizeObserver();
10666
+ this.dom = e;
10667
+ let { kWidth: n, kGap: r, ...i } = t;
10668
+ this.opt = {
10669
+ ...i,
10670
+ kWidth: 0,
10671
+ kGap: 0
10672
+ }, this.interaction = new ws(this), this.markerManager = new To(), this.pluginHost = ga(), this.rendererPluginManager = new va(), this.rendererPluginManager.setPluginHost(this.pluginHost), this.rendererPluginManager.setInvalidateCallback(() => this.scheduleDraw()), this.syncPaneRatiosFromSpecs(this.opt.panes), this.zoomLevelCount = Math.max(2, Math.round(this.opt.zoomLevels ?? 20)), this.currentZoomLevel = this.opt.initialZoomLevel ?? 1, this.currentZoomLevel = Math.max(1, Math.min(this.zoomLevelCount, this.currentZoomLevel));
10673
+ let a = this.zoomLevelToKWidth(this.currentZoomLevel), o = 3 / this.getEffectiveDpr();
10674
+ this.opt.kWidth = a, this.opt.kGap = o, this.initPanes(), this.initResizeObserver();
10573
10675
  }
10574
10676
  initResizeObserver() {
10575
10677
  if (typeof ResizeObserver > "u") return;
@@ -10636,10 +10738,10 @@ var Oc = class e {
10636
10738
  this.markerManager.clear();
10637
10739
  let e = this.computeViewport();
10638
10740
  if (!e || this.data.length === 0) return;
10639
- let { start: t, end: n } = vs(e.scrollLeft, e.plotWidth, this.opt.kWidth, this.opt.kGap, this.data.length, e.dpr), r = {
10741
+ let { start: t, end: n } = ys(e.scrollLeft, e.plotWidth, this.opt.kWidth, this.opt.kGap, this.data.length, e.dpr), r = {
10640
10742
  start: t,
10641
10743
  end: n
10642
- }, i = this.calcKLinePositions(r), { kWidthPx: a } = _s(this.opt.kWidth, this.opt.kGap, e.dpr);
10744
+ }, i = this.calcKLinePositions(r), { kWidthPx: a } = vs(this.opt.kWidth, this.opt.kGap, e.dpr);
10643
10745
  this.interaction.setKLinePositions(i, r, a);
10644
10746
  for (let t of this.paneRenderers) {
10645
10747
  let n = t.getPane(), a = t.getDom().plotCanvas.getContext("2d"), o = t.getDom().yAxisCanvas.getContext("2d");
@@ -10721,31 +10823,28 @@ var Oc = class e {
10721
10823
  }
10722
10824
  }
10723
10825
  zoomAt(e, t, n) {
10724
- let r = this.opt.kWidth + this.opt.kGap, i = (t + e) / r, a = this.getEffectiveDpr(), o = Math.round(this.opt.kWidth * a), s = n > 0 ? -2 : 2, c = o + s;
10725
- c % 2 == 0 && (c += s > 0 ? 1 : -1);
10726
- let l = c / a, u = 3 / a;
10727
- if (l = Math.max(this.opt.minKWidth, Math.min(this.opt.maxKWidth, l)), Math.abs(l - this.opt.kWidth) < .01) return;
10728
- let d = i * (l + u) - e;
10729
- if (this.onZoomChange) {
10730
- this.onZoomChange(l, u, d);
10826
+ let r = n > 0 ? -1 : 1, i = Math.max(1, Math.min(this.zoomLevelCount, this.currentZoomLevel + r));
10827
+ if (i === this.currentZoomLevel) return;
10828
+ let a = this.zoomLevelToKWidth(i), o = 3 / this.getEffectiveDpr(), s = this.opt.kWidth + this.opt.kGap, c = (t + e) / s * (a + o) - e;
10829
+ if (this.currentZoomLevel = i, this.onZoomChange) {
10830
+ this.onZoomChange(i, a, o, c);
10731
10831
  return;
10732
10832
  }
10733
10833
  this.opt = {
10734
10834
  ...this.opt,
10735
- kWidth: l,
10736
- kGap: u
10835
+ kWidth: a,
10836
+ kGap: o
10737
10837
  };
10738
- let f = this.dom.container, p = Math.max(0, f.scrollWidth - f.clientWidth);
10739
- f.scrollLeft = Math.min(Math.max(0, d), p);
10740
- let m = this.kWidthToZoomLevel(l);
10741
- m !== this.currentZoomLevel && (this.currentZoomLevel = m, this.onZoomLevelChange?.(this.currentZoomLevel, l)), this.scheduleDraw();
10838
+ let l = this.dom.container, u = Math.max(0, l.scrollWidth - l.clientWidth);
10839
+ l.scrollLeft = Math.min(Math.max(0, c), u), this.onZoomLevelChange?.(this.currentZoomLevel, a), this.scheduleDraw();
10742
10840
  }
10743
- applyZoom(e, t) {
10744
- this.opt = {
10841
+ applyZoom(e) {
10842
+ let t = this.zoomLevelToKWidth(e), n = 3 / this.getEffectiveDpr();
10843
+ this.currentZoomLevel = e, this.opt = {
10745
10844
  ...this.opt,
10746
- kWidth: e,
10747
- kGap: t
10748
- }, this.currentZoomLevel = this.kWidthToZoomLevel(e), this.onZoomLevelChange?.(this.currentZoomLevel, e), this.scheduleDraw();
10845
+ kWidth: t,
10846
+ kGap: n
10847
+ }, this.onZoomLevelChange?.(this.currentZoomLevel, t), this.scheduleDraw();
10749
10848
  }
10750
10849
  onZoomChange;
10751
10850
  setOnZoomChange(e) {
@@ -10755,15 +10854,11 @@ var Oc = class e {
10755
10854
  let t = this.opt.minKWidth, n = this.opt.maxKWidth;
10756
10855
  return t + (e - 1) / (this.zoomLevelCount - 1) * (n - t);
10757
10856
  }
10758
- kWidthToZoomLevel(e) {
10759
- let t = this.opt.minKWidth, n = this.opt.maxKWidth, r = Math.max(0, Math.min(1, (e - t) / (n - t)));
10760
- return Math.round(1 + r * (this.zoomLevelCount - 1));
10761
- }
10762
10857
  zoomToLevel(e, t) {
10763
10858
  let n = Math.max(1, Math.min(this.zoomLevelCount, Math.round(e)));
10764
10859
  if (n === this.currentZoomLevel) return;
10765
10860
  let r = this.dom.container, i = this.zoomLevelToKWidth(n), a = 3 / this.getEffectiveDpr(), o = this.viewport?.plotWidth ?? r.clientWidth, s = t ?? o / 2, c = r.scrollLeft, l = this.opt.kWidth + this.opt.kGap, u = (c + s) / l * (i + a) - s;
10766
- if (this.currentZoomLevel = n, this.onZoomChange) this.onZoomChange(i, a, u);
10861
+ if (this.currentZoomLevel = n, this.onZoomChange) this.onZoomChange(n, i, a, u);
10767
10862
  else {
10768
10863
  this.opt = {
10769
10864
  ...this.opt,
@@ -10817,12 +10912,12 @@ var Oc = class e {
10817
10912
  calcKLinePositions(e) {
10818
10913
  let { start: t, end: n } = e, r = n - t;
10819
10914
  if (r <= 0) return [];
10820
- let i = this.getEffectiveDpr(), { unitPx: a, startXPx: o } = _s(this.opt.kWidth, this.opt.kGap, i), s = Array(r);
10915
+ let i = this.getEffectiveDpr(), { unitPx: a, startXPx: o } = vs(this.opt.kWidth, this.opt.kGap, i), s = Array(r);
10821
10916
  for (let e = 0; e < r; e++) s[e] = (o + (t + e) * a) / i;
10822
10917
  return s;
10823
10918
  }
10824
10919
  updateOptions(e) {
10825
- if (e.panes) {
10920
+ if (e.kWidth !== void 0 && (console.warn("[Chart] kWidth cannot be set directly. Use zoomToLevel() instead."), delete e.kWidth), e.kGap !== void 0 && delete e.kGap, e.panes) {
10826
10921
  let t = e.panes.map((e) => ({ ...e }));
10827
10922
  this.opt = {
10828
10923
  ...this.opt,
@@ -11017,7 +11112,7 @@ var Oc = class e {
11017
11112
  return this.data;
11018
11113
  }
11019
11114
  getContentWidth() {
11020
- let e = this.data?.length ?? 0, t = this.getEffectiveDpr(), { startXPx: n, unitPx: r } = _s(this.opt.kWidth, this.opt.kGap, t);
11115
+ let e = this.data?.length ?? 0, t = this.getEffectiveDpr(), { startXPx: n, unitPx: r } = vs(this.opt.kWidth, this.opt.kGap, t);
11021
11116
  return (n + e * r) / t;
11022
11117
  }
11023
11118
  resize() {
@@ -11037,11 +11132,11 @@ var Oc = class e {
11037
11132
  }
11038
11133
  initPanes() {
11039
11134
  this.paneRenderers = this.opt.panes.map((e, t) => {
11040
- let n = new Ss(e.id, {
11135
+ let n = new Cs(e.id, {
11041
11136
  role: this.resolvePaneRole(e, t),
11042
11137
  capabilities: e.capabilities
11043
11138
  }), r = document.createElement("canvas"), i = document.createElement("canvas"), a = n.role === "price";
11044
- return r.id = `${e.id}-plot`, r.className = a ? "plot-canvas main" : "plot-canvas sub", r.style.position = "absolute", r.style.left = "0", r.style.top = "0", i.id = `${e.id}-yAxis`, i.className = "right-axis", i.style.position = "absolute", i.style.left = "0", new ws({
11139
+ return r.id = `${e.id}-plot`, r.className = a ? "plot-canvas main" : "plot-canvas sub", r.style.position = "absolute", r.style.left = "0", r.style.top = "0", i.id = `${e.id}-yAxis`, i.className = "right-axis", i.style.position = "absolute", i.style.left = "0", new Ts({
11045
11140
  plotCanvas: r,
11046
11141
  yAxisCanvas: i
11047
11142
  }, n, {
@@ -11233,7 +11328,7 @@ function Nc() {
11233
11328
  draw(e) {
11234
11329
  let { ctx: t, pane: n, data: r, range: i, scrollLeft: a, kWidth: o, kGap: s, dpr: c, kLinePositions: l, markerManager: u } = e, d = r;
11235
11330
  if (!d.length) return;
11236
- let { kWidthPx: f } = _s(o, s, c);
11331
+ let { kWidthPx: f } = vs(o, s, c);
11237
11332
  t.save(), t.translate(-a, 0);
11238
11333
  let p = l || [], m = Mc(d, i.start, i.end, Ac);
11239
11334
  for (let r = i.start; r < i.end && r < d.length; r++) {
@@ -11241,15 +11336,15 @@ function Nc() {
11241
11336
  if (!a) continue;
11242
11337
  let s = n.yAxis.priceToY(a.open), l = n.yAxis.priceToY(a.close), h = n.yAxis.priceToY(a.high), g = n.yAxis.priceToY(a.low), _ = p[r - i.start];
11243
11338
  if (!_) continue;
11244
- let v = (e) => Math.round(e * c) / c, y = v(s), b = v(l), x = v(h), S = v(g), C = Math.min(y, b), w = Math.max(Math.abs(y - b), 1), T = js(Math.round(_ * c), C, f, w, c);
11339
+ let v = (e) => Math.round(e * c) / c, y = v(s), b = v(l), x = v(h), S = v(g), C = Math.min(y, b), w = Math.max(Math.abs(y - b), 1), T = Ms(Math.round(_ * c), C, f, w, c);
11245
11340
  t.fillStyle = kc(a) === "up" ? Na.UP : Na.DOWN, t.fillRect(T.bodyRect.x, T.bodyRect.y, T.bodyRect.width, T.bodyRect.height);
11246
11341
  let E = T.wickRect.width, D = T.wickRect.x, O = T.bodyRect.y, k = T.bodyRect.y + T.bodyRect.height, A = Math.max(a.open, a.close), j = Math.min(a.open, a.close);
11247
11342
  if (a.high > A) {
11248
- let e = ks(D, x, O, c);
11343
+ let e = As(D, x, O, c);
11249
11344
  e && t.fillRect(e.x, e.y, E, e.height);
11250
11345
  }
11251
11346
  if (a.low < j) {
11252
- let e = ks(D, k, S, c);
11347
+ let e = As(D, k, S, c);
11253
11348
  e && t.fillRect(e.x, e.y, E, e.height);
11254
11349
  }
11255
11350
  let M = m[r - i.start];
@@ -11348,7 +11443,7 @@ function Ic() {
11348
11443
  t.save(), t.fillStyle = Ia.HORIZONTAL, t.translate(-a, 0);
11349
11444
  let d = t.canvas.width / s, f = a, p = a + d, m = n.yAxis.getPaddingTop(), h = n.yAxis.getPaddingBottom(), g = m, _ = Math.max(m, n.height - h), v = Math.max(0, _ - g);
11350
11445
  for (let e = 0; e < u; e++) {
11351
- let n = u <= 1 ? 0 : e / (u - 1), r = As(f, p, Math.round(g + n * v), s);
11446
+ let n = u <= 1 ? 0 : e / (u - 1), r = js(f, p, Math.round(g + n * v), s);
11352
11447
  r && t.fillRect(r.x, r.y, r.width, r.height);
11353
11448
  }
11354
11449
  let y = ja(l);
@@ -11356,7 +11451,7 @@ function Ic() {
11356
11451
  if (e < i.start || e >= i.end || e >= l.length) continue;
11357
11452
  let r = e - i.start;
11358
11453
  if (r < 0 || r >= c.length) continue;
11359
- let a = ks(c[r] + o / 2, 0, n.height, s);
11454
+ let a = As(c[r] + o / 2, 0, n.height, s);
11360
11455
  a && t.fillRect(a.x, a.y, a.width, a.height);
11361
11456
  }
11362
11457
  t.restore();
@@ -11374,13 +11469,13 @@ function Lc() {
11374
11469
  paneId: "main",
11375
11470
  priority: X.FOREGROUND,
11376
11471
  draw(e) {
11377
- let { ctx: t, pane: n, data: r, scrollLeft: i, kWidth: a, dpr: o, kLinePositions: s } = e, c = r, l = c[c.length - 1];
11378
- if (!l) return;
11472
+ let { ctx: t, pane: n, data: r, scrollLeft: i, kWidth: a, dpr: o, kLinePositions: s, paneWidth: c } = e, l = r, u = l[l.length - 1];
11473
+ if (!u) return;
11379
11474
  t.save(), t.translate(-i, 0);
11380
- let u = Math.round(n.yAxis.priceToY(l.close)), d = s[0] ?? 0, f = (s[s.length - 1] ?? 0) + a;
11475
+ let d = Math.round(n.yAxis.priceToY(u.close)), f = s[0] ?? 0, p = c + i;
11381
11476
  t.strokeStyle = Na.LAST_PRICE, t.lineWidth = 1, t.setLineDash([4, 3]), t.beginPath();
11382
- let p = (Math.floor(u * o) + .5) / o;
11383
- t.moveTo(Math.round(d * o) / o, p), t.lineTo(Math.round(f * o) / o, p), t.stroke(), t.setLineDash([]), t.restore();
11477
+ let m = (Math.floor(d * o) + .5) / o;
11478
+ t.moveTo(Math.round(f * o) / o, m), t.lineTo(Math.round(p * o) / o, m), t.stroke(), t.setLineDash([]), t.restore();
11384
11479
  }
11385
11480
  };
11386
11481
  }
@@ -11418,7 +11513,7 @@ function zc(e, t, n, r, i, a, o) {
11418
11513
  e.font = "12px Arial";
11419
11514
  let c = e.measureText(s).width, l = t - o + 30 + 4 + c > a, u = t, d = l ? t - 30 : t + 30;
11420
11515
  u > d && ([u, d] = [d, u]);
11421
- let f = As(u, d, n, i);
11516
+ let f = js(u, d, n, i);
11422
11517
  f && (e.fillStyle = Ma.WEAK, e.fillRect(f.x, f.y, f.width, f.height));
11423
11518
  let p = Z(d, i), m = Z(n, i);
11424
11519
  e.fillStyle = Ma.WEAK, e.beginPath(), e.arc(p, m, 2, 0, Math.PI * 2), e.fill(), e.font = "12px Arial", e.textBaseline = "middle", e.fillStyle = Na.NEUTRAL, l ? (e.textAlign = "right", e.fillText(s, Z(t - 30 - 4, i), Z(n, i))) : (e.textAlign = "left", e.fillText(s, Z(t + 30 + 4, i), Z(n, i)));
@@ -11438,14 +11533,12 @@ function Vc(e, t) {
11438
11533
  e.fillStyle = "rgba(0, 0, 0, 0.8)", e.fillRect(Z(_, c), Z(v, c), Z(p, c), Z(m, c)), e.fillStyle = "#ffffff", e.fillText(d, Z(h, c), Z(g, c)), e.restore();
11439
11534
  }
11440
11535
  function Hc(e, t) {
11441
- let { x: n, y: r, width: i, height: a, crosshairY: o, priceRange: s, yPaddingPx: c = 0, dpr: l, fontSize: u = 16, priceOffset: d = 0, price: f } = t, p = Math.max(0, Math.min(c, Math.floor(a / 2) - 1)), { maxPrice: m, minPrice: h } = s, g = (f ?? Bc(o - r, m, h, a, p, p) + d).toFixed(2);
11442
- e.save(), e.font = `${u}px -apple-system,BlinkMacSystemFont,Trebuchet MS,Roboto,Ubuntu,sans-serif`, e.textBaseline = "middle", e.textAlign = "center";
11443
- let _ = u + 4, v = Math.min(Math.max(o, r + _ / 2), r + a - _ / 2), y = v - _ / 2;
11444
- e.fillStyle = "rgba(0, 0, 0, 0.8)";
11445
- let b = n, x = Z(y, l), S = i, C = Z(_, l);
11446
- e.fillRect(b, x, S, C);
11447
- let w = n + i / 2;
11448
- e.fillStyle = "#ffffff", e.fillText(g, Z(w, l), Z(v, l)), e.restore();
11536
+ let { x: n, y: r, width: i, height: a, crosshairY: o, priceRange: s, yPaddingPx: c = 0, dpr: l, bgColor: u = "rgba(0, 0, 0, 0.8)", borderColor: d, textColor: f = "#ffffff", fontSize: p = 16, priceOffset: m = 0, price: h, formatPrice: g } = t, _ = Math.max(0, Math.min(c, Math.floor(a / 2) - 1)), { maxPrice: v, minPrice: y } = s, b = h ?? Bc(o - r, v, y, a, _, _) + m, x = g ? g(b) : b.toFixed(2);
11537
+ e.save(), e.font = `${p}px -apple-system,BlinkMacSystemFont,Trebuchet MS,Roboto,Ubuntu,sans-serif`, e.textBaseline = "middle", e.textAlign = "center";
11538
+ let S = p + 4, C = Math.min(Math.max(o, r + S / 2), r + a - S / 2), w = C - S / 2, T = n, E = Z(w, l), D = i, O = Z(S, l);
11539
+ e.fillStyle = u, e.fillRect(T, E, D, O), d && (e.strokeStyle = d, e.lineWidth = 1, e.strokeRect(Q(T, l), Q(E, l), Math.max(0, D - 1 / l), Math.max(0, O - 1 / l)));
11540
+ let k = n + i / 2;
11541
+ e.fillStyle = f, e.fillText(x, Z(k, l), Z(C, l)), e.restore();
11449
11542
  }
11450
11543
  function Uc(e, t) {
11451
11544
  let { x: n, y: r, width: i, height: a, data: o, scrollLeft: s, kWidth: c, kGap: l, startIndex: u, endIndex: d, dpr: f, bgColor: p = Pa.TRANSPARENT, textColor: m = Ma.SECONDARY, lineColor: h = Fa.DARK, fontSize: g = 12, paddingX: _ = 8, drawTopBorder: v = !0, drawBottomBorder: y = !0 } = t, b = Math.round(c * f), x = b % 2 == 0 ? b + 1 : b, S = Math.round(l * f), C = x + S, w = S, T = C / f, E = w / f, D = x / f;
@@ -11464,18 +11557,18 @@ function Uc(e, t) {
11464
11557
  //#endregion
11465
11558
  //#region src/core/renderers/Indicator/scale/indicator_scale.ts
11466
11559
  function Wc(e) {
11467
- let { ctx: t, dpr: n, axisWidth: r, height: i, paddingTop: a, paddingBottom: o, valueMin: s, valueMax: c, isMain: l, decimals: u = 2, hideEdgeTicks: d = !0 } = e, f = c - s || 1;
11560
+ let { ctx: t, dpr: n, axisWidth: r, height: i, paddingTop: a, paddingBottom: o, valueMin: s, valueMax: c, isMain: l, decimals: u = 2, hideEdgeTicks: d = !0, formatLabel: f } = e, p = c - s || 1;
11468
11561
  t.save(), t.clearRect(0, 0, r, i), t.font = "12px -apple-system,BlinkMacSystemFont,Trebuchet MS,Roboto,Ubuntu,sans-serif", t.textBaseline = "middle", t.textAlign = "center";
11469
- let p = r / 2, m = a, h = Math.max(a, i - o), g = Math.max(0, h - m), _ = Fc(i, l), v = f / Math.max(1, _ - 1);
11470
- for (let e = 0; e < _; e++) {
11471
- if (d && (e === 0 || e === _ - 1)) continue;
11472
- let r = c - v * e, i = m + (_ <= 1 ? 0 : e / (_ - 1)) * g;
11473
- t.fillStyle = Ma.SECONDARY, t.fillText(r.toFixed(u), Z(p, n), Z(i, n));
11562
+ let m = r / 2, h = a, g = Math.max(a, i - o), _ = Math.max(0, g - h), v = Fc(i, l), y = p / Math.max(1, v - 1);
11563
+ for (let e = 0; e < v; e++) {
11564
+ if (d && (e === 0 || e === v - 1)) continue;
11565
+ let r = c - y * e, i = h + (v <= 1 ? 0 : e / (v - 1)) * _;
11566
+ t.fillStyle = Ma.SECONDARY, t.fillText(f ? f(r) : r.toFixed(u), Z(m, n), Z(i, n));
11474
11567
  }
11475
11568
  t.restore();
11476
11569
  }
11477
11570
  function Gc(e) {
11478
- let { axisWidth: t, paneId: n, indicatorKey: r, label: i, decimals: a = 2, yPaddingPx: o = 0, getCrosshair: s } = e, c = Gs(r, n), l = null;
11571
+ let { axisWidth: t, paneId: n, indicatorKey: r, label: i, decimals: a = 2, yPaddingPx: o = 0, getCrosshair: s, formatTickLabel: c, formatCrosshairLabel: l } = e, u = Es(r, n), d = null;
11479
11572
  return {
11480
11573
  name: `${r}Scale_${n}`,
11481
11574
  version: "1.0.0",
@@ -11484,16 +11577,16 @@ function Gc(e) {
11484
11577
  paneId: n,
11485
11578
  priority: X.INDICATOR_SCALE,
11486
11579
  onInstall(e) {
11487
- l = e;
11580
+ d = e;
11488
11581
  },
11489
11582
  draw(e) {
11490
11583
  let { yAxisCtx: n, pane: r, dpr: i } = e;
11491
- if (!n || !l) return;
11492
- let u = l.getSharedState(c);
11493
- if (!u) return;
11494
- let d = r.yAxis.getDisplayRange({
11495
- minPrice: u.valueMin,
11496
- maxPrice: u.valueMax
11584
+ if (!n || !d) return;
11585
+ let f = d.getSharedState(u);
11586
+ if (!f) return;
11587
+ let p = r.yAxis.getDisplayRange({
11588
+ minPrice: f.valueMin,
11589
+ maxPrice: f.valueMax
11497
11590
  });
11498
11591
  Wc({
11499
11592
  ctx: n,
@@ -11502,27 +11595,29 @@ function Gc(e) {
11502
11595
  height: r.height,
11503
11596
  paddingTop: r.yAxis.getPaddingTop(),
11504
11597
  paddingBottom: r.yAxis.getPaddingBottom(),
11505
- valueMin: d.minPrice,
11506
- valueMax: d.maxPrice,
11598
+ valueMin: p.minPrice,
11599
+ valueMax: p.maxPrice,
11507
11600
  isMain: !1,
11508
11601
  decimals: a,
11509
- hideEdgeTicks: !1
11602
+ hideEdgeTicks: !1,
11603
+ formatLabel: c
11510
11604
  });
11511
- let f = s?.();
11512
- if (!f || f.activePaneId !== r.id) return;
11513
- let p = f.y - r.top, m = r.yAxis.getPaddingTop(), h = r.yAxis.getPaddingBottom(), g = m, _ = Math.max(m, r.height - h), v = Math.max(1, _ - g), y = (Math.min(Math.max(p, g), _) - g) / v, b = d.maxPrice - y * (d.maxPrice - d.minPrice);
11605
+ let m = s?.();
11606
+ if (!m || m.activePaneId !== r.id) return;
11607
+ let h = m.y - r.top, g = r.yAxis.getPaddingTop(), _ = r.yAxis.getPaddingBottom(), v = g, y = Math.max(g, r.height - _), b = Math.max(1, y - v), x = (Math.min(Math.max(h, v), y) - v) / b, S = p.maxPrice - x * (p.maxPrice - p.minPrice);
11514
11608
  Hc(n, {
11515
11609
  x: 0,
11516
11610
  y: 0,
11517
11611
  width: t,
11518
11612
  height: r.height,
11519
- crosshairY: p,
11520
- priceRange: d,
11613
+ crosshairY: h,
11614
+ priceRange: p,
11521
11615
  yPaddingPx: o,
11522
11616
  dpr: i,
11523
11617
  fontSize: 12,
11524
11618
  priceOffset: 0,
11525
- price: b
11619
+ price: S,
11620
+ formatPrice: l
11526
11621
  });
11527
11622
  }
11528
11623
  };
@@ -11538,33 +11633,53 @@ function Kc(e) {
11538
11633
  paneId: ua,
11539
11634
  priority: X.SYSTEM_YAXIS,
11540
11635
  draw(t) {
11541
- let { ctx: n, pane: r, dpr: i, yAxisCtx: a } = t, o = a || n, s = a?.canvas ? a.canvas.width / i : e.axisWidth, c = r.yAxis.getDisplayRange(r.priceRange);
11636
+ let { ctx: n, pane: r, dpr: i, yAxisCtx: a, data: o } = t, s = a || n, c = a?.canvas ? a.canvas.width / i : e.axisWidth, l = r.yAxis.getDisplayRange(r.priceRange);
11542
11637
  r.capabilities.showPriceAxisTicks && Wc({
11543
- ctx: o,
11638
+ ctx: s,
11544
11639
  dpr: i,
11545
- axisWidth: s,
11640
+ axisWidth: c,
11546
11641
  height: r.height,
11547
11642
  paddingTop: r.yAxis.getPaddingTop(),
11548
11643
  paddingBottom: r.yAxis.getPaddingBottom(),
11549
- valueMin: c.minPrice,
11550
- valueMax: c.maxPrice,
11644
+ valueMin: l.minPrice,
11645
+ valueMax: l.maxPrice,
11551
11646
  isMain: !0,
11552
11647
  decimals: 2,
11553
11648
  hideEdgeTicks: !1
11554
11649
  });
11555
- let l = e.getCrosshair?.();
11556
- l && l.activePaneId === r.id && l.price !== null && Hc(o, {
11650
+ let u = o, d = r.id === "main" ? u[u.length - 1] : null;
11651
+ if (d) {
11652
+ let t = r.yAxis.priceToY(d.close);
11653
+ Hc(s, {
11654
+ x: 0,
11655
+ y: r.top,
11656
+ width: c,
11657
+ height: r.height,
11658
+ crosshairY: t + r.top,
11659
+ priceRange: l,
11660
+ yPaddingPx: e.yPaddingPx,
11661
+ dpr: i,
11662
+ bgColor: "rgba(255, 247, 248, 0.98)",
11663
+ borderColor: Na.LAST_PRICE,
11664
+ textColor: Na.LAST_PRICE,
11665
+ fontSize: 12,
11666
+ priceOffset: 0,
11667
+ price: d.close
11668
+ });
11669
+ }
11670
+ let f = e.getCrosshair?.();
11671
+ f && f.activePaneId === r.id && f.price !== null && Hc(s, {
11557
11672
  x: 0,
11558
11673
  y: r.top,
11559
- width: s,
11674
+ width: c,
11560
11675
  height: r.height,
11561
- crosshairY: l.y,
11562
- priceRange: c,
11676
+ crosshairY: f.y,
11677
+ priceRange: l,
11563
11678
  yPaddingPx: e.yPaddingPx,
11564
11679
  dpr: i,
11565
11680
  fontSize: 12,
11566
11681
  priceOffset: 0,
11567
- price: l.price
11682
+ price: f.price
11568
11683
  });
11569
11684
  }
11570
11685
  };
@@ -11583,8 +11698,24 @@ function qc(e) {
11583
11698
  });
11584
11699
  }
11585
11700
  //#endregion
11701
+ //#region src/core/renderers/Indicator/scale/volume_scale.ts
11702
+ var Jc = 1e8;
11703
+ function Yc(e) {
11704
+ return Gc({
11705
+ axisWidth: e.axisWidth,
11706
+ paneId: e.paneId,
11707
+ indicatorKey: "volume",
11708
+ label: "VOL",
11709
+ decimals: 2,
11710
+ yPaddingPx: e.yPaddingPx,
11711
+ getCrosshair: e.getCrosshair,
11712
+ formatTickLabel: (e) => (e / Jc).toFixed(2),
11713
+ formatCrosshairLabel: (e) => `${(e / Jc).toFixed(2)}亿`
11714
+ });
11715
+ }
11716
+ //#endregion
11586
11717
  //#region src/core/renderers/Indicator/scale/rsi_scale.ts
11587
- function Jc(e) {
11718
+ function Xc(e) {
11588
11719
  return Gc({
11589
11720
  axisWidth: e.axisWidth,
11590
11721
  paneId: e.paneId,
@@ -11597,7 +11728,7 @@ function Jc(e) {
11597
11728
  }
11598
11729
  //#endregion
11599
11730
  //#region src/core/renderers/Indicator/scale/cci_scale.ts
11600
- function Yc(e) {
11731
+ function Zc(e) {
11601
11732
  return Gc({
11602
11733
  axisWidth: e.axisWidth,
11603
11734
  paneId: e.paneId,
@@ -11610,7 +11741,7 @@ function Yc(e) {
11610
11741
  }
11611
11742
  //#endregion
11612
11743
  //#region src/core/renderers/Indicator/scale/stoch_scale.ts
11613
- function Xc(e) {
11744
+ function Qc(e) {
11614
11745
  return Gc({
11615
11746
  axisWidth: e.axisWidth,
11616
11747
  paneId: e.paneId,
@@ -11623,7 +11754,7 @@ function Xc(e) {
11623
11754
  }
11624
11755
  //#endregion
11625
11756
  //#region src/core/renderers/Indicator/scale/mom_scale.ts
11626
- function Zc(e) {
11757
+ function $c(e) {
11627
11758
  return Gc({
11628
11759
  axisWidth: e.axisWidth,
11629
11760
  paneId: e.paneId,
@@ -11636,7 +11767,7 @@ function Zc(e) {
11636
11767
  }
11637
11768
  //#endregion
11638
11769
  //#region src/core/renderers/Indicator/scale/wmsr_scale.ts
11639
- function Qc(e) {
11770
+ function el(e) {
11640
11771
  return Gc({
11641
11772
  axisWidth: e.axisWidth,
11642
11773
  paneId: e.paneId,
@@ -11649,7 +11780,7 @@ function Qc(e) {
11649
11780
  }
11650
11781
  //#endregion
11651
11782
  //#region src/core/renderers/Indicator/scale/kst_scale.ts
11652
- function $c(e) {
11783
+ function tl(e) {
11653
11784
  return Gc({
11654
11785
  axisWidth: e.axisWidth,
11655
11786
  paneId: e.paneId,
@@ -11662,7 +11793,7 @@ function $c(e) {
11662
11793
  }
11663
11794
  //#endregion
11664
11795
  //#region src/core/renderers/Indicator/scale/fastk_scale.ts
11665
- function el(e) {
11796
+ function nl(e) {
11666
11797
  return Gc({
11667
11798
  axisWidth: e.axisWidth,
11668
11799
  paneId: e.paneId,
@@ -11675,14 +11806,14 @@ function el(e) {
11675
11806
  }
11676
11807
  //#endregion
11677
11808
  //#region src/core/renderers/timeAxis.ts
11678
- var tl = Symbol("time-axis");
11679
- function nl(e) {
11809
+ var rl = Symbol("time-axis");
11810
+ function il(e) {
11680
11811
  return {
11681
11812
  name: "timeAxis",
11682
11813
  version: "1.0.0",
11683
11814
  description: "时间轴渲染器",
11684
11815
  debugName: "时间轴",
11685
- paneId: tl,
11816
+ paneId: rl,
11686
11817
  priority: X.SYSTEM_XAXIS,
11687
11818
  isSystem: !0,
11688
11819
  draw(t) {
@@ -11721,7 +11852,7 @@ function nl(e) {
11721
11852
  }
11722
11853
  //#endregion
11723
11854
  //#region src/core/renderers/crosshair.ts
11724
- function rl(e) {
11855
+ function al(e) {
11725
11856
  return {
11726
11857
  name: "crosshair",
11727
11858
  version: "1.0.0",
@@ -11733,10 +11864,10 @@ function rl(e) {
11733
11864
  let { ctx: n, pane: r, dpr: i, paneWidth: a } = t, o = e.getCrosshairState();
11734
11865
  if (o.isDragging || !o.pos) return;
11735
11866
  let { x: s } = o.pos, c = r.id === o.activePaneId, l = -1;
11736
- c && o.price !== null && (l = r.yAxis.priceToY(o.price)), n.save(), n.beginPath(), n.rect(0, 0, a, r.height), n.clip(), n.fillStyle = Ja.LINE;
11737
- let u = ks(s, 0, r.height, i);
11867
+ c && o.price !== null && (l = r.yAxis.priceToY(o.price)), n.save(), n.beginPath(), n.rect(0, 0, a, r.height), n.clip(), n.fillStyle = Ya.LINE;
11868
+ let u = As(s, 0, r.height, i);
11738
11869
  if (u && n.fillRect(u.x, u.y, u.width, u.height), c && l >= 0) {
11739
- let e = As(0, a, Math.min(l, r.height - 1 / i), i);
11870
+ let e = js(0, a, Math.min(l, r.height - 1 / i), i);
11740
11871
  e && n.fillRect(e.x, e.y, e.width, e.height);
11741
11872
  }
11742
11873
  n.restore();
@@ -11745,7 +11876,7 @@ function rl(e) {
11745
11876
  }
11746
11877
  //#endregion
11747
11878
  //#region src/core/renderers/paneTitle.ts
11748
- function il(e) {
11879
+ function ol(e) {
11749
11880
  let t = { ...e };
11750
11881
  return {
11751
11882
  name: `paneTitle_${e.paneId}`,
@@ -11786,130 +11917,161 @@ function il(e) {
11786
11917
  }
11787
11918
  //#endregion
11788
11919
  //#region src/components/KLineChart.vue?vue&type=script&setup=true&lang.ts
11789
- var al = { class: "chart-wrapper" }, ol = 4, sl = /* @__PURE__ */ xo(/* @__PURE__ */ u({
11920
+ var sl = { class: "chart-wrapper" }, cl = 4, ll = /* @__PURE__ */ So(/* @__PURE__ */ u({
11790
11921
  __name: "KLineChart",
11791
11922
  props: {
11792
11923
  semanticConfig: {},
11793
- kWidth: { default: 10 },
11794
- kGap: { default: 2 },
11795
11924
  yPaddingPx: { default: 0 },
11796
11925
  minKWidth: { default: 2 },
11797
11926
  maxKWidth: { default: 50 },
11798
11927
  rightAxisWidth: { default: 0 },
11799
11928
  bottomAxisHeight: { default: 24 },
11800
11929
  priceLabelWidth: { default: 60 },
11801
- zoomLevels: { default: 10 },
11802
- initialZoomLevel: { default: void 0 }
11930
+ zoomLevels: { default: 20 },
11931
+ initialZoomLevel: { default: 3 }
11803
11932
  },
11804
11933
  emits: ["zoomLevelChange"],
11805
11934
  setup(e, { expose: t, emit: n }) {
11806
- let c = e, u = _(null), v = _(null), b = _(null), x = _(c.kWidth), C = _(c.kGap), w = n, T = y(null), E = y(null), D = _(0), O = _(1);
11807
- function k() {
11808
- T.value?.scheduleDraw();
11935
+ let c = e, u = _(null), v = _(null), b = _(null), x = n, C = y(null), w = y(null), T = _(0), E = _(1);
11936
+ function D() {
11937
+ C.value?.scheduleDraw();
11809
11938
  }
11810
- function A(e) {
11939
+ function O(e) {
11811
11940
  if (!e) return;
11812
11941
  let t = e.getBoundingClientRect();
11813
- T.value?.interaction.setTooltipSize({
11942
+ C.value?.interaction.setTooltipSize({
11814
11943
  width: Math.max(180, Math.round(t.width)),
11815
11944
  height: Math.max(80, Math.round(t.height))
11816
11945
  });
11817
11946
  }
11818
- function j(e) {
11947
+ function k(e) {
11819
11948
  if (!e) return;
11820
11949
  let t = e.getBoundingClientRect();
11821
- R.value = {
11950
+ ee.value = {
11822
11951
  width: Math.max(120, Math.round(t.width)),
11823
11952
  height: Math.max(60, Math.round(t.height))
11824
11953
  };
11825
11954
  }
11826
- let M = _(null), N = _(null), ee = _({
11827
- x: 0,
11828
- y: 0
11829
- }), P = _(!1), te = _(!1), F = _(!1), ne = _(!1), re = _({ main: 3 }), I = _(null), L = _(null), ie = _({
11955
+ let A = _({
11830
11956
  x: 0,
11831
11957
  y: 0
11832
- }), ae = _("right-bottom"), R = _({
11958
+ }), j = _(!1), M = y({
11959
+ crosshairPos: null,
11960
+ crosshairIndex: null,
11961
+ crosshairPrice: null,
11962
+ hoveredIndex: null,
11963
+ activePaneId: null,
11964
+ tooltipPos: {
11965
+ x: 0,
11966
+ y: 0
11967
+ },
11968
+ tooltipAnchorPlacement: "right-bottom",
11969
+ hoveredMarkerData: null,
11970
+ hoveredCustomMarker: null,
11971
+ isDragging: !1,
11972
+ isResizingPaneBoundary: !1,
11973
+ isHoveringPaneBoundary: !1,
11974
+ isHoveringRightAxis: !1
11975
+ }), N = _({ main: 3 }), ee = _({
11833
11976
  width: 220,
11834
11977
  height: 120
11835
- }), oe = _(0), se = r(() => {
11836
- let e = I.value;
11978
+ }), P = _(0), te = r(() => M.value.hoveredMarkerData), F = r(() => M.value.hoveredCustomMarker), ne = r(() => M.value.isDragging), re = r(() => M.value.isResizingPaneBoundary), I = r(() => M.value.isHoveringPaneBoundary), L = r(() => M.value.isHoveringRightAxis), ie = r(() => M.value.hoveredIndex), ae = r(() => M.value.crosshairIndex), R = r(() => {
11979
+ let e = M.value.hoveredIndex;
11837
11980
  if (typeof e != "number") return null;
11838
- oe.value;
11839
- let t = T.value?.getData();
11981
+ P.value;
11982
+ let t = C.value?.getData();
11840
11983
  return t && e >= 0 && e < t.length ? t[e] : null;
11841
- }), ce = r(() => I.value), z = r(() => ie.value), le = r(() => {
11842
- let e = T.value?.getViewport(), t = b.value, n = e?.plotWidth ?? (t ? t.clientWidth : 0);
11843
- return ee.value.x + 12 + R.value.width + 12 > n ? "left-bottom" : "right-bottom";
11844
- }), ue = r(() => (oe.value, T.value?.getData() ?? []));
11845
- function de() {
11846
- oe.value++;
11847
- }
11848
- let B = null;
11849
- function fe() {
11850
- let e = T.value?.interaction;
11851
- if (!e) {
11852
- F.value = !1, ne.value = !1;
11853
- return;
11854
- }
11855
- F.value = e.isResizingPaneBoundaryState(), ne.value = e.isHoveringPaneBoundaryState();
11984
+ }), oe = r(() => M.value.hoveredIndex), se = r(() => M.value.tooltipPos), ce = r(() => M.value.tooltipAnchorPlacement), z = r(() => {
11985
+ let e = C.value?.getViewport(), t = b.value, n = e?.plotWidth ?? (t ? t.clientWidth : 0);
11986
+ return A.value.x + 12 + ee.value.width + 12 > n ? "left-bottom" : "right-bottom";
11987
+ }), le = r(() => (P.value, C.value?.getData() ?? []));
11988
+ function ue() {
11989
+ P.value++;
11856
11990
  }
11857
- function pe() {
11858
- let e = T.value?.interaction;
11859
- if (!e) {
11860
- I.value = null, L.value = null, M.value = null, N.value = null, fe();
11861
- return;
11862
- }
11863
- I.value = e.hoveredIndex ?? null, L.value = e.crosshairIndex ?? null, M.value = e.hoveredMarkerData ?? null, N.value = e.hoveredCustomMarker ?? null;
11864
- let t = e.tooltipAnchorPlacement;
11865
- t && (ae.value = t);
11866
- let n = e.tooltipPos;
11867
- n && (ie.value = {
11868
- x: n.x,
11869
- y: n.y
11870
- }), fe();
11871
- }
11872
- function me() {
11873
- B ||= requestAnimationFrame(() => {
11874
- pe(), B = null;
11875
- });
11876
- }
11877
- function he(e) {
11878
- T.value?.interaction.onPointerDown(e), te.value = T.value?.interaction.isDraggingState() ?? !1, pe();
11991
+ function de(e) {
11992
+ C.value?.interaction.onPointerDown(e);
11879
11993
  }
11880
- function ge(e) {
11994
+ function B(e) {
11881
11995
  let t = b.value;
11882
11996
  if (t) {
11883
11997
  let n = t.getBoundingClientRect();
11884
- ee.value = {
11998
+ A.value = {
11885
11999
  x: e.clientX - n.left,
11886
12000
  y: e.clientY - n.top
11887
12001
  };
11888
12002
  }
11889
- T.value?.interaction.onPointerMove(e), me();
11890
- }
11891
- function _e(e) {
11892
- T.value?.interaction.onPointerUp(e), te.value = T.value?.interaction.isDraggingState() ?? !1, pe();
12003
+ C.value?.interaction.onPointerMove(e);
11893
12004
  }
11894
- function ve(e) {
11895
- T.value?.interaction.onPointerLeave(e), te.value = T.value?.interaction.isDraggingState() ?? !1, I.value = null, fe();
12005
+ function fe(e) {
12006
+ C.value?.interaction.onPointerUp(e);
11896
12007
  }
11897
- function ye() {
11898
- T.value?.interaction.onScroll(), pe();
12008
+ function pe(e) {
12009
+ C.value?.interaction.onPointerLeave(e);
11899
12010
  }
11900
- let V = _([]), be = _({}), H = _([]), xe = [
11901
- "VOLUME",
11902
- "MACD",
11903
- "RSI",
11904
- "CCI",
11905
- "STOCH",
11906
- "MOM",
11907
- "WMSR",
11908
- "KST",
11909
- "FASTK"
11910
- ];
11911
- function Se() {
11912
- let e = re.value.main ?? 3;
12011
+ function me() {
12012
+ C.value?.interaction.onScroll();
12013
+ }
12014
+ let V = _([]), he = _({}), H = _([]), ge = {
12015
+ VOLUME: {
12016
+ defaultParams: {},
12017
+ getTitleInfo: () => ({
12018
+ name: "VOL",
12019
+ params: [],
12020
+ values: []
12021
+ })
12022
+ },
12023
+ MACD: {
12024
+ defaultParams: {
12025
+ fastPeriod: 12,
12026
+ slowPeriod: 26,
12027
+ signalPeriod: 9
12028
+ },
12029
+ getTitleInfo: (e, t, n) => t === null ? null : Zs(e, t, n.fastPeriod ?? 12, n.slowPeriod ?? 26, n.signalPeriod ?? 9)
12030
+ },
12031
+ RSI: {
12032
+ defaultParams: {
12033
+ period1: 6,
12034
+ period2: 12,
12035
+ period3: 24
12036
+ },
12037
+ getTitleInfo: (e, t, n) => t === null ? null : ec(e, t, n.period1 ?? 6, n.period2 ?? 12, n.period3 ?? 24)
12038
+ },
12039
+ CCI: {
12040
+ defaultParams: { period: 14 },
12041
+ getTitleInfo: (e, t, n) => t === null ? null : ic(e, t, n.period ?? 14)
12042
+ },
12043
+ STOCH: {
12044
+ defaultParams: {
12045
+ n: 9,
12046
+ m: 3
12047
+ },
12048
+ getTitleInfo: (e, t, n) => t === null ? null : cc(e, t, n.n ?? 9, n.m ?? 3)
12049
+ },
12050
+ MOM: {
12051
+ defaultParams: { period: 10 },
12052
+ getTitleInfo: (e, t, n) => t === null ? null : fc(e, t, n.period ?? 10)
12053
+ },
12054
+ WMSR: {
12055
+ defaultParams: { period: 14 },
12056
+ getTitleInfo: (e, t, n) => t === null ? null : gc(e, t, n.period ?? 14)
12057
+ },
12058
+ KST: {
12059
+ defaultParams: {
12060
+ roc1: 10,
12061
+ roc2: 15,
12062
+ roc3: 20,
12063
+ roc4: 30,
12064
+ signalPeriod: 9
12065
+ },
12066
+ getTitleInfo: (e, t, n) => t === null ? null : Sc(e, t, n.roc1 ?? 10, n.roc2 ?? 15, n.roc3 ?? 20, n.roc4 ?? 30, n.signalPeriod ?? 9)
12067
+ },
12068
+ FASTK: {
12069
+ defaultParams: { period: 9 },
12070
+ getTitleInfo: (e, t, n) => t === null ? null : Ec(e, t, n.period ?? 9)
12071
+ }
12072
+ }, _e = Object.keys(ge);
12073
+ function ve() {
12074
+ let e = N.value.main ?? 3;
11913
12075
  return H.value.length === 0 ? [{
11914
12076
  id: "main",
11915
12077
  ratio: e,
@@ -11922,205 +12084,161 @@ var al = { class: "chart-wrapper" }, ol = 4, sl = /* @__PURE__ */ xo(/* @__PURE_
11922
12084
  role: "price"
11923
12085
  }, ...H.value.map((e) => ({
11924
12086
  id: e.id,
11925
- ratio: re.value[e.id] ?? 1,
12087
+ ratio: N.value[e.id] ?? 1,
11926
12088
  visible: !0,
11927
12089
  role: "indicator"
11928
12090
  }))];
11929
12091
  }
11930
- function Ce(e) {
11931
- switch (e) {
11932
- case "MACD": return {
11933
- fastPeriod: 12,
11934
- slowPeriod: 26,
11935
- signalPeriod: 9
11936
- };
11937
- case "RSI": return {
11938
- period1: 6,
11939
- period2: 12,
11940
- period3: 24
11941
- };
11942
- case "CCI": return { period: 14 };
11943
- case "STOCH": return {
11944
- n: 9,
11945
- m: 3
11946
- };
11947
- case "MOM": return { period: 10 };
11948
- case "WMSR": return { period: 14 };
11949
- case "KST": return {
11950
- roc1: 10,
11951
- roc2: 15,
11952
- roc3: 20,
11953
- roc4: 30,
11954
- signalPeriod: 9
11955
- };
11956
- case "FASTK": return { period: 9 };
11957
- default: return {};
11958
- }
12092
+ function ye(e) {
12093
+ return { ...ge[e].defaultParams };
11959
12094
  }
11960
- function we(e = "VOLUME", t) {
11961
- if (H.value.length >= ol) return !1;
12095
+ function be(e = "VOLUME", t) {
12096
+ if (H.value.length >= cl) return !1;
11962
12097
  let n = `sub_${e}`;
11963
12098
  if (H.value.some((e) => e.id === n)) return !0;
11964
- if (!T.value?.createSubPane(e, t ?? Ce(e))) return !1;
11965
- let r = il({
12099
+ if (!C.value?.createSubPane(e, t ?? ye(e))) return !1;
12100
+ let r = ol({
11966
12101
  paneId: n,
11967
12102
  title: e,
11968
- getTitleInfo: () => Ae(n)
12103
+ getTitleInfo: () => Ee(n)
11969
12104
  });
11970
- return T.value?.useRenderer(r), H.value.push({
12105
+ return C.value?.useRenderer(r), H.value.push({
11971
12106
  id: n,
11972
12107
  indicatorId: e,
11973
12108
  rendererName: `${e.toLowerCase()}_${n}`,
11974
12109
  paneTitleRendererName: r.name,
11975
- params: t ?? Ce(e)
12110
+ params: t ?? ye(e)
11976
12111
  }), V.value.includes(e) || V.value.push(e), !0;
11977
12112
  }
11978
- function Te(e) {
12113
+ function xe(e) {
11979
12114
  let t = H.value.findIndex((t) => t.id === e);
11980
12115
  if (t === -1) return;
11981
12116
  let n = H.value[t];
11982
- n && (T.value?.removeRenderer(n.paneTitleRendererName), T.value?.removeSubPane(n.indicatorId), H.value.splice(t, 1), H.value.some((e) => e.indicatorId === n.indicatorId) || (V.value = V.value.filter((e) => e !== n.indicatorId)));
12117
+ n && (C.value?.removeRenderer(n.paneTitleRendererName), C.value?.removeSubPane(n.indicatorId), H.value.splice(t, 1), H.value.some((e) => e.indicatorId === n.indicatorId) || (V.value = V.value.filter((e) => e !== n.indicatorId)));
11983
12118
  }
11984
- function Ee() {
11985
- for (let e of H.value) T.value?.removeRenderer(e.paneTitleRendererName);
11986
- T.value?.clearSubPanes(), H.value = [], V.value = V.value.filter((e) => !xe.includes(e));
12119
+ function Se() {
12120
+ for (let e of H.value) C.value?.removeRenderer(e.paneTitleRendererName);
12121
+ C.value?.clearSubPanes(), H.value = [], V.value = V.value.filter((e) => !_e.includes(e));
11987
12122
  }
11988
- function De() {
12123
+ function Ce() {
11989
12124
  let e = c.semanticConfig.indicators?.main;
11990
- if (e) for (let t of e) t.enabled && (V.value.includes(t.type) || V.value.push(t.type), t.params && (be.value[t.type] = t.params));
12125
+ if (e) for (let t of e) t.enabled && (V.value.includes(t.type) || V.value.push(t.type), t.params && (he.value[t.type] = t.params));
11991
12126
  }
11992
- S([V, be], ([e]) => {
11993
- let t = T.value;
12127
+ S([V, he], ([e]) => {
12128
+ let t = C.value;
11994
12129
  t && (t.updateRendererConfig("mainIndicatorLegend", { indicators: {
11995
12130
  MA: {
11996
12131
  enabled: e.includes("MA"),
11997
- params: be.value.MA || {}
12132
+ params: he.value.MA || {}
11998
12133
  },
11999
12134
  BOLL: {
12000
12135
  enabled: e.includes("BOLL"),
12001
- params: be.value.BOLL || {}
12136
+ params: he.value.BOLL || {}
12002
12137
  },
12003
12138
  EXPMA: {
12004
12139
  enabled: e.includes("EXPMA"),
12005
- params: be.value.EXPMA || {}
12140
+ params: he.value.EXPMA || {}
12006
12141
  },
12007
12142
  ENE: {
12008
12143
  enabled: e.includes("ENE"),
12009
- params: be.value.ENE || {}
12144
+ params: he.value.ENE || {}
12010
12145
  }
12011
- } }), t.setRendererEnabled("ma", e.includes("MA")), t.setRendererEnabled("boll", e.includes("BOLL")), t.setRendererEnabled("expma", e.includes("EXPMA")), t.setRendererEnabled("ene", e.includes("ENE")), k());
12146
+ } }), t.setRendererEnabled("ma", e.includes("MA")), t.setRendererEnabled("boll", e.includes("BOLL")), t.setRendererEnabled("expma", e.includes("EXPMA")), t.setRendererEnabled("ene", e.includes("ENE")), D());
12012
12147
  }, { deep: !0 });
12013
- function Oe() {
12014
- let e = T.value?.getSubPaneIndicators() ?? [];
12148
+ function we() {
12149
+ let e = C.value?.getSubPaneIndicators() ?? [];
12015
12150
  H.value = [];
12016
12151
  for (let t of e) {
12017
- let e = `sub_${t}`, n = il({
12152
+ let e = `sub_${t}`, n = ol({
12018
12153
  paneId: e,
12019
12154
  title: t,
12020
- getTitleInfo: () => Ae(e)
12155
+ getTitleInfo: () => Ee(e)
12021
12156
  });
12022
- T.value?.useRenderer(n), H.value.push({
12157
+ C.value?.useRenderer(n), H.value.push({
12023
12158
  id: e,
12024
12159
  indicatorId: t,
12025
12160
  rendererName: `${t.toLowerCase()}_${e}`,
12026
12161
  paneTitleRendererName: n.name,
12027
- params: Ce(t)
12162
+ params: ye(t)
12028
12163
  }), V.value.includes(t) || V.value.push(t);
12029
12164
  }
12030
12165
  }
12031
- function ke(e, t) {
12166
+ function Te(e, t) {
12032
12167
  let n = H.value.find((t) => t.id === e);
12033
12168
  if (!n) return;
12034
12169
  let r = n.indicatorId;
12035
- T.value?.removeRenderer(n.paneTitleRendererName), T.value?.removeSubPane(r), T.value?.createSubPane(t, Ce(t));
12036
- let i = `sub_${t}`, a = il({
12170
+ C.value?.removeRenderer(n.paneTitleRendererName), C.value?.removeSubPane(r), C.value?.createSubPane(t, ye(t));
12171
+ let i = `sub_${t}`, a = ol({
12037
12172
  paneId: i,
12038
12173
  title: t,
12039
- getTitleInfo: () => Ae(i)
12174
+ getTitleInfo: () => Ee(i)
12040
12175
  });
12041
- T.value?.useRenderer(a);
12176
+ C.value?.useRenderer(a);
12042
12177
  let o = H.value.findIndex((t) => t.id === e);
12043
12178
  o !== -1 && (H.value[o] = {
12044
12179
  id: i,
12045
12180
  indicatorId: t,
12046
12181
  rendererName: `${t.toLowerCase()}_${i}`,
12047
12182
  paneTitleRendererName: a.name,
12048
- params: Ce(t)
12183
+ params: ye(t)
12049
12184
  }), V.value = V.value.filter((e) => e !== r), V.value.includes(t) || V.value.push(t);
12050
12185
  }
12051
- function Ae(e) {
12186
+ function Ee(e) {
12052
12187
  let t = H.value.find((t) => t.id === e);
12053
12188
  if (!t) return null;
12054
- let n = T.value?.getData();
12189
+ let n = C.value?.getData();
12055
12190
  if (!n || n.length === 0) return null;
12056
- let r = t.params;
12057
- if (t.indicatorId === "VOLUME") return {
12058
- name: "VOL",
12059
- params: [],
12060
- values: []
12061
- };
12062
- let i = L.value;
12063
- if (i === null) return null;
12064
- switch (t.indicatorId) {
12065
- case "MACD": return Zs(n, i, r.fastPeriod ?? 12, r.slowPeriod ?? 26, r.signalPeriod ?? 9);
12066
- case "RSI": return ec(n, i, r.period1 ?? 6, r.period2 ?? 12, r.period3 ?? 24);
12067
- case "CCI": return ic(n, i, r.period ?? 14);
12068
- case "STOCH": return cc(n, i, r.n ?? 9, r.m ?? 3);
12069
- case "MOM": return fc(n, i, r.period ?? 10);
12070
- case "WMSR": return gc(n, i, r.period ?? 14);
12071
- case "KST": return Sc(n, i, r.roc1 ?? 10, r.roc2 ?? 15, r.roc3 ?? 20, r.roc4 ?? 30, r.signalPeriod ?? 9);
12072
- case "FASTK": return Ec(n, i, r.period ?? 9);
12073
- default: return null;
12074
- }
12075
- }
12076
- function je(e, t) {
12191
+ let r = ge[t.indicatorId], i = t.params;
12192
+ return r.getTitleInfo(n, ae.value, i);
12193
+ }
12194
+ function De(e, t) {
12077
12195
  if (e === "MA" || e === "BOLL" || e === "EXPMA" || e === "ENE") {
12078
12196
  t ? V.value.includes(e) || V.value.push(e) : V.value = V.value.filter((t) => t !== e);
12079
12197
  return;
12080
12198
  }
12081
- if (xe.includes(e)) {
12199
+ if (_e.includes(e)) {
12082
12200
  if (t) {
12083
12201
  if (V.value.includes(e) || V.value.push(e), H.value.find((t) => t.indicatorId === e)) return;
12084
- if (!we(e)) {
12202
+ if (!be(e)) {
12085
12203
  let t = H.value[H.value.length - 1];
12086
- t && ke(t.id, e);
12204
+ t && Te(t.id, e);
12087
12205
  }
12088
- } else V.value = V.value.filter((t) => t !== e), H.value.filter((t) => t.indicatorId === e).forEach((e) => Te(e.id));
12089
- k();
12206
+ } else V.value = V.value.filter((t) => t !== e), H.value.filter((t) => t.indicatorId === e).forEach((e) => xe(e.id));
12207
+ D();
12090
12208
  }
12091
12209
  }
12092
- function Me() {
12093
- T.value?.updateRendererConfig("mainIndicatorLegend", { indicators: {
12210
+ function Oe() {
12211
+ C.value?.updateRendererConfig("mainIndicatorLegend", { indicators: {
12094
12212
  MA: {
12095
12213
  enabled: V.value.includes("MA"),
12096
- params: be.value.MA || {}
12214
+ params: he.value.MA || {}
12097
12215
  },
12098
12216
  BOLL: {
12099
12217
  enabled: V.value.includes("BOLL"),
12100
- params: be.value.BOLL || {}
12218
+ params: he.value.BOLL || {}
12101
12219
  },
12102
12220
  EXPMA: {
12103
12221
  enabled: V.value.includes("EXPMA"),
12104
- params: be.value.EXPMA || {}
12222
+ params: he.value.EXPMA || {}
12105
12223
  },
12106
12224
  ENE: {
12107
12225
  enabled: V.value.includes("ENE"),
12108
- params: be.value.ENE || {}
12226
+ params: he.value.ENE || {}
12109
12227
  }
12110
12228
  } });
12111
12229
  }
12112
- function Ne(e, t) {
12113
- if (be.value[e] = t, e === "MA" || e === "BOLL" || e === "EXPMA" || e === "ENE") {
12114
- e === "BOLL" && T.value?.updateRendererConfig("boll", t), e === "EXPMA" && T.value?.updateRendererConfig("expma", t), e === "ENE" && T.value?.updateRendererConfig("ene", t), Me(), k();
12230
+ function ke(e, t) {
12231
+ if (he.value[e] = t, e === "MA" || e === "BOLL" || e === "EXPMA" || e === "ENE") {
12232
+ e === "BOLL" && C.value?.updateRendererConfig("boll", t), e === "EXPMA" && C.value?.updateRendererConfig("expma", t), e === "ENE" && C.value?.updateRendererConfig("ene", t), Oe(), D();
12115
12233
  return;
12116
12234
  }
12117
- xe.includes(e) && H.value.filter((t) => t.indicatorId === e).forEach((e) => {
12118
- e.params = { ...t }, T.value?.updateRendererConfig(e.rendererName, t);
12119
- }), k();
12235
+ _e.includes(e) && H.value.filter((t) => t.indicatorId === e).forEach((e) => {
12236
+ e.params = { ...t }, C.value?.updateRendererConfig(e.rendererName, t);
12237
+ }), D();
12120
12238
  }
12121
- function Pe(e) {
12239
+ function Ae(e) {
12122
12240
  if (!e.length || H.value.length <= 1) return;
12123
- let t = e.filter((e) => xe.includes(e));
12241
+ let t = e.filter((e) => _e.includes(e));
12124
12242
  if (!t.length) return;
12125
12243
  let n = new Map(H.value.map((e) => [e.indicatorId, e])), r = [];
12126
12244
  for (let e of t) {
@@ -12132,40 +12250,42 @@ var al = { class: "chart-wrapper" }, ol = 4, sl = /* @__PURE__ */ xo(/* @__PURE_
12132
12250
  let i = H.value.map((e) => e.id), a = r.map((e) => e.id);
12133
12251
  if (i.join("|") === a.join("|")) return;
12134
12252
  H.value = r;
12135
- let o = V.value.filter((e) => !xe.includes(e)), s = H.value.map((e) => e.indicatorId);
12253
+ let o = V.value.filter((e) => !_e.includes(e)), s = H.value.map((e) => e.indicatorId);
12136
12254
  V.value = [...o, ...s];
12137
- let c = T.value;
12138
- c && c.updatePaneLayout(Se());
12139
- }
12140
- let Fe = r(() => {
12141
- let e = D.value, t = O.value, { startXPx: n, unitPx: r } = _s(x.value, C.value, t);
12142
- return (n + e * r) / t + (c.rightAxisWidth + c.priceLabelWidth);
12255
+ let c = C.value;
12256
+ c && c.updatePaneLayout(ve());
12257
+ }
12258
+ let je = r(() => {
12259
+ let e = C.value, t = T.value;
12260
+ if (!e || t === 0) return 0;
12261
+ let n = E.value, r = e.getOption(), { startXPx: i, unitPx: a } = vs(r.kWidth ?? c.minKWidth, r.kGap ?? 3 / n, n);
12262
+ return (i + t * a) / n + (c.rightAxisWidth + c.priceLabelWidth);
12143
12263
  });
12144
- function Ie() {
12264
+ function Me() {
12145
12265
  let e = b.value;
12146
- e && (e.scrollLeft = e.scrollWidth, k());
12266
+ e && (e.scrollLeft = e.scrollWidth, D());
12147
12267
  }
12148
12268
  return t({
12149
- scheduleRender: k,
12150
- scrollToRight: Ie,
12151
- addSubPane: we,
12152
- removeSubPane: Te,
12153
- switchSubIndicator: ke,
12154
- clearAllSubPanes: Ee,
12269
+ scheduleRender: D,
12270
+ scrollToRight: Me,
12271
+ addSubPane: be,
12272
+ removeSubPane: xe,
12273
+ switchSubIndicator: Te,
12274
+ clearAllSubPanes: Se,
12155
12275
  get plugin() {
12156
- return T.value?.plugin;
12276
+ return C.value?.plugin;
12157
12277
  },
12158
- zoomToLevel: (e, t) => T.value?.zoomToLevel(e, t),
12159
- zoomIn: (e) => T.value?.zoomIn(e),
12160
- zoomOut: (e) => T.value?.zoomOut(e),
12161
- getZoomLevel: () => T.value?.getZoomLevel() ?? 1,
12162
- getZoomLevelCount: () => T.value?.getZoomLevelCount() ?? 10
12278
+ zoomToLevel: (e, t) => C.value?.zoomToLevel(e, t),
12279
+ zoomIn: (e) => C.value?.zoomIn(e),
12280
+ zoomOut: (e) => C.value?.zoomOut(e),
12281
+ getZoomLevel: () => C.value?.getZoomLevel() ?? 1,
12282
+ getZoomLevelCount: () => C.value?.getZoomLevelCount() ?? 10
12163
12283
  }), m(() => {
12164
- P.value = typeof CSS < "u" && CSS.supports("anchor-name: --kmap-anchor") && CSS.supports("position-anchor: --kmap-anchor");
12284
+ j.value = typeof CSS < "u" && CSS.supports("anchor-name: --kmap-anchor") && CSS.supports("position-anchor: --kmap-anchor");
12165
12285
  let e = b.value, t = v.value, n = u.value;
12166
12286
  if (!e || !t || !n) return;
12167
12287
  let r = (e) => {
12168
- T.value?.interaction.onWheel(e), pe();
12288
+ C.value?.interaction.onWheel(e);
12169
12289
  };
12170
12290
  e.addEventListener("wheel", r, { passive: !1 });
12171
12291
  let i = new Oc({
@@ -12173,8 +12293,6 @@ var al = { class: "chart-wrapper" }, ol = 4, sl = /* @__PURE__ */ xo(/* @__PURE_
12173
12293
  canvasLayer: t,
12174
12294
  xAxisCanvas: n
12175
12295
  }, {
12176
- kWidth: x.value,
12177
- kGap: C.value,
12178
12296
  yPaddingPx: c.yPaddingPx,
12179
12297
  rightAxisWidth: c.rightAxisWidth,
12180
12298
  bottomAxisHeight: c.bottomAxisHeight,
@@ -12189,21 +12307,21 @@ var al = { class: "chart-wrapper" }, ol = 4, sl = /* @__PURE__ */ xo(/* @__PURE_
12189
12307
  zoomLevels: c.zoomLevels,
12190
12308
  initialZoomLevel: c.initialZoomLevel
12191
12309
  });
12192
- i.setOnZoomChange(async (e, t, n) => {
12193
- x.value = e, C.value = t, await d(), await new Promise((e) => requestAnimationFrame(() => e()));
12194
- let r = b.value;
12195
- if (!r) return;
12196
- let a = Math.max(0, r.scrollWidth - r.clientWidth);
12197
- r.scrollLeft = Math.min(Math.max(0, n), a), i.applyZoom(e, t);
12310
+ i.setOnZoomChange(async (e, t, n, r) => {
12311
+ await d(), await new Promise((e) => requestAnimationFrame(() => e()));
12312
+ let a = b.value;
12313
+ if (!a) return;
12314
+ let o = Math.max(0, a.scrollWidth - a.clientWidth);
12315
+ a.scrollLeft = Math.min(Math.max(0, r), o), i.applyZoom(e);
12198
12316
  }), i.setOnZoomLevelChange((e, t) => {
12199
- w("zoomLevelChange", e, t);
12200
- }), i.useRenderer(Ic()), i.useRenderer(Rc()), i.useRenderer(Ns({
12317
+ x("zoomLevelChange", e, t);
12318
+ }), i.useRenderer(Ic()), i.useRenderer(Rc()), i.useRenderer(Ps({
12201
12319
  ma5: !0,
12202
12320
  ma10: !0,
12203
12321
  ma20: !0,
12204
12322
  ma30: !0,
12205
12323
  ma60: !0
12206
- })), i.useRenderer(Fs()), i.setRendererEnabled("boll", !1), i.useRenderer(zs()), i.setRendererEnabled("expma", !1), i.useRenderer(Hs()), i.setRendererEnabled("ene", !1), i.useRenderer(Nc()), i.useRenderer(Lc()), i.useRenderer(Ca());
12324
+ })), i.useRenderer(Is()), i.setRendererEnabled("boll", !1), i.useRenderer(Bs()), i.setRendererEnabled("expma", !1), i.useRenderer(Us()), i.setRendererEnabled("ene", !1), i.useRenderer(Nc()), i.useRenderer(Lc()), i.useRenderer(Ca());
12207
12325
  let a = c.rightAxisWidth + c.priceLabelWidth, o = () => {
12208
12326
  let e = i.interaction.crosshairPos, t = i.interaction.crosshairPrice, n = i.interaction.activePaneId;
12209
12327
  return e && t !== null ? {
@@ -12216,38 +12334,42 @@ var al = { class: "chart-wrapper" }, ol = 4, sl = /* @__PURE__ */ xo(/* @__PURE_
12216
12334
  axisWidth: a,
12217
12335
  yPaddingPx: c.yPaddingPx,
12218
12336
  getCrosshair: o
12219
- })), i.useRenderer(Ws({ yPaddingPx: c.yPaddingPx }));
12337
+ })), i.useRenderer(Gs({ yPaddingPx: c.yPaddingPx }));
12220
12338
  let s = [
12339
+ {
12340
+ create: Yc,
12341
+ paneId: "sub_VOLUME"
12342
+ },
12221
12343
  {
12222
12344
  create: qc,
12223
12345
  paneId: "sub_MACD"
12224
12346
  },
12225
12347
  {
12226
- create: Jc,
12348
+ create: Xc,
12227
12349
  paneId: "sub_RSI"
12228
12350
  },
12229
12351
  {
12230
- create: Yc,
12352
+ create: Zc,
12231
12353
  paneId: "sub_CCI"
12232
12354
  },
12233
12355
  {
12234
- create: Xc,
12356
+ create: Qc,
12235
12357
  paneId: "sub_STOCH"
12236
12358
  },
12237
12359
  {
12238
- create: Zc,
12360
+ create: $c,
12239
12361
  paneId: "sub_MOM"
12240
12362
  },
12241
12363
  {
12242
- create: Qc,
12364
+ create: el,
12243
12365
  paneId: "sub_WMSR"
12244
12366
  },
12245
12367
  {
12246
- create: $c,
12368
+ create: tl,
12247
12369
  paneId: "sub_KST"
12248
12370
  },
12249
12371
  {
12250
- create: el,
12372
+ create: nl,
12251
12373
  paneId: "sub_FASTK"
12252
12374
  }
12253
12375
  ];
@@ -12257,12 +12379,12 @@ var al = { class: "chart-wrapper" }, ol = 4, sl = /* @__PURE__ */ xo(/* @__PURE_
12257
12379
  yPaddingPx: c.yPaddingPx,
12258
12380
  getCrosshair: o
12259
12381
  }));
12260
- i.useRenderer(rl({ getCrosshairState: () => ({
12382
+ i.useRenderer(al({ getCrosshairState: () => ({
12261
12383
  pos: i.interaction.crosshairPos,
12262
12384
  activePaneId: i.interaction.activePaneId,
12263
12385
  isDragging: i.interaction.isDraggingState(),
12264
12386
  price: i.interaction.crosshairPrice
12265
- }) })), i.useRenderer(nl({
12387
+ }) })), i.useRenderer(il({
12266
12388
  height: c.bottomAxisHeight,
12267
12389
  getCrosshair: () => {
12268
12390
  let e = i.interaction.crosshairPos, t = i.interaction.crosshairIndex;
@@ -12272,57 +12394,52 @@ var al = { class: "chart-wrapper" }, ol = 4, sl = /* @__PURE__ */ xo(/* @__PURE_
12272
12394
  } : null;
12273
12395
  }
12274
12396
  })), i.setOnViewportChange((e) => {
12275
- O.value = e.dpr;
12397
+ E.value = e.dpr;
12276
12398
  }), i.setOnPaneLayoutChange((e) => {
12277
12399
  let t = {};
12278
12400
  for (let n of e) t[n.id] = n.ratio;
12279
- re.value = t;
12280
- }), T.value = i, i.interaction.setTooltipAnchorPositioning(P.value), O.value = i.getCurrentDpr(), i.resize(), E.value = new qi(i), E.value.on("config:error", (e) => {
12401
+ N.value = t;
12402
+ }), C.value = i, i.interaction.setTooltipAnchorPositioning(j.value), i.interaction.setOnInteractionChange((e) => {
12403
+ M.value = e;
12404
+ }), M.value = i.interaction.getInteractionSnapshot(), E.value = i.getCurrentDpr(), i.resize(), w.value = new qi(i), w.value.on("config:error", (e) => {
12281
12405
  console.error("Semantic config error:", e);
12282
- }), E.value.on("config:ready", () => {
12283
- D.value = i.getData()?.length ?? 0, de(), De(), Oe(), d(() => Ie());
12284
- }), E.value.applyConfig(c.semanticConfig).then((e) => {
12406
+ }), w.value.on("config:ready", () => {
12407
+ T.value = i.getData()?.length ?? 0, ue(), Ce(), we(), d(() => Me());
12408
+ }), w.value.applyConfig(c.semanticConfig).then((e) => {
12285
12409
  e && !e.success && console.error("Semantic config apply failed:", e.errors);
12286
- }), i.interaction.setOnMarkerHover((e) => {
12287
- M.value = e, k();
12288
- }), i.interaction.setOnCustomMarkerHover((e) => {
12289
- N.value = e, k();
12290
12410
  }), i.__onWheel = r;
12291
12411
  }), h(() => {
12292
- let e = T.value;
12412
+ let e = C.value;
12293
12413
  if (e) {
12294
12414
  let t = e.__onWheel, n = b.value;
12295
12415
  t && n && n.removeEventListener("wheel", t), e.destroy();
12296
12416
  }
12297
- T.value = null;
12298
- }), S(() => [c.kWidth, c.kGap], ([e, t]) => {
12299
- typeof e == "number" && (x.value = e), typeof t == "number" && (C.value = t), T.value?.updateOptions({
12300
- kWidth: x.value,
12301
- kGap: C.value
12302
- });
12417
+ C.value = null;
12303
12418
  }), S(() => c.yPaddingPx, (e) => {
12304
- T.value?.updateOptions({ yPaddingPx: e }), k();
12419
+ C.value?.updateOptions({ yPaddingPx: e }), D();
12305
12420
  }), S(() => c.semanticConfig, async (e, t) => {
12306
12421
  if (e && e !== t) {
12307
- let t = await E.value?.applyConfig(e);
12422
+ let t = await w.value?.applyConfig(e);
12308
12423
  t && !t.success && console.error("Semantic config apply failed:", t.errors);
12309
12424
  }
12310
- }, { deep: !0 }), (e, t) => (g(), o("div", al, [s("div", {
12425
+ }, { deep: !0 }), (e, t) => (g(), o("div", sl, [s("div", {
12311
12426
  class: f(["chart-container", {
12312
- "is-dragging": te.value,
12313
- "is-resizing-pane": F.value,
12314
- "is-hovering-pane-separator": ne.value
12427
+ "is-dragging": ne.value,
12428
+ "is-resizing-pane": re.value,
12429
+ "is-hovering-pane-separator": I.value,
12430
+ "is-hovering-right-axis": L.value,
12431
+ "is-hovering-kline": ie.value !== null
12315
12432
  }]),
12316
12433
  ref_key: "containerRef",
12317
12434
  ref: b,
12318
- onScrollPassive: ye,
12319
- onPointerdown: he,
12320
- onPointermove: ge,
12321
- onPointerup: _e,
12322
- onPointerleave: ve
12435
+ onScrollPassive: me,
12436
+ onPointerdown: de,
12437
+ onPointermove: B,
12438
+ onPointerup: fe,
12439
+ onPointerleave: pe
12323
12440
  }, [s("div", {
12324
12441
  class: "scroll-content",
12325
- style: p({ width: Fe.value + "px" })
12442
+ style: p({ width: je.value + "px" })
12326
12443
  }, [s("div", {
12327
12444
  class: "canvas-layer",
12328
12445
  ref_key: "canvasLayerRef",
@@ -12333,31 +12450,31 @@ var al = { class: "chart-wrapper" }, ol = 4, sl = /* @__PURE__ */ xo(/* @__PURE_
12333
12450
  ref_key: "xAxisCanvasRef",
12334
12451
  ref: u
12335
12452
  }, null, 512),
12336
- se.value ? (g(), o("div", {
12453
+ R.value ? (g(), o("div", {
12337
12454
  key: 0,
12338
- class: f(["tooltip-anchor kline-tooltip-anchor", { "use-anchor": P.value }]),
12455
+ class: f(["tooltip-anchor kline-tooltip-anchor", { "use-anchor": j.value }]),
12339
12456
  style: p({
12340
- left: `${z.value.x}px`,
12341
- top: `${z.value.y}px`
12457
+ left: `${se.value.x}px`,
12458
+ top: `${se.value.y}px`
12342
12459
  })
12343
12460
  }, null, 6)) : a("", !0),
12344
- M.value || N.value ? (g(), o("div", {
12461
+ te.value || F.value ? (g(), o("div", {
12345
12462
  key: 1,
12346
- class: f(["tooltip-anchor marker-tooltip-anchor", { "use-anchor": P.value }]),
12463
+ class: f(["tooltip-anchor marker-tooltip-anchor", { "use-anchor": j.value }]),
12347
12464
  style: p({
12348
- left: `${ee.value.x}px`,
12349
- top: `${ee.value.y}px`
12465
+ left: `${A.value.x}px`,
12466
+ top: `${A.value.y}px`
12350
12467
  })
12351
12468
  }, null, 6)) : a("", !0),
12352
- se.value ? (g(), i(So, {
12469
+ R.value ? (g(), i(Co, {
12353
12470
  key: 2,
12354
- k: se.value,
12355
- index: ce.value,
12356
- data: ue.value,
12357
- pos: z.value,
12358
- "set-el": A,
12359
- "use-anchor": P.value,
12360
- "anchor-placement": ae.value
12471
+ k: R.value,
12472
+ index: oe.value,
12473
+ data: le.value,
12474
+ pos: se.value,
12475
+ "set-el": O,
12476
+ "use-anchor": j.value,
12477
+ "anchor-placement": ce.value
12361
12478
  }, null, 8, [
12362
12479
  "k",
12363
12480
  "index",
@@ -12366,29 +12483,29 @@ var al = { class: "chart-wrapper" }, ol = 4, sl = /* @__PURE__ */ xo(/* @__PURE_
12366
12483
  "use-anchor",
12367
12484
  "anchor-placement"
12368
12485
  ])) : a("", !0),
12369
- M.value || N.value ? (g(), i(Do, {
12486
+ te.value || F.value ? (g(), i(Oo, {
12370
12487
  key: 3,
12371
- marker: M.value || N.value,
12372
- pos: ee.value,
12373
- "use-anchor": P.value,
12374
- "anchor-placement": le.value,
12375
- "set-el": j
12488
+ marker: te.value || F.value,
12489
+ pos: A.value,
12490
+ "use-anchor": j.value,
12491
+ "anchor-placement": z.value,
12492
+ "set-el": k
12376
12493
  }, null, 8, [
12377
12494
  "marker",
12378
12495
  "pos",
12379
12496
  "use-anchor",
12380
12497
  "anchor-placement"
12381
12498
  ])) : a("", !0)
12382
- ], 512)], 4)], 34), l(hs, {
12499
+ ], 512)], 4)], 34), l(gs, {
12383
12500
  "active-indicators": V.value,
12384
- "indicator-params": be.value,
12385
- onToggle: je,
12386
- onUpdateParams: Ne,
12387
- onReorderSubIndicators: Pe
12501
+ "indicator-params": he.value,
12502
+ onToggle: De,
12503
+ onUpdateParams: ke,
12504
+ onReorderSubIndicators: Ae
12388
12505
  }, null, 8, ["active-indicators", "indicator-params"])]));
12389
12506
  }
12390
- }), [["__scopeId", "data-v-288af50a"]]), cl = { install(e) {
12391
- e.component("KLineChart", sl);
12507
+ }), [["__scopeId", "data-v-289d47a8"]]), ul = { install(e) {
12508
+ e.component("KLineChart", ll);
12392
12509
  } };
12393
12510
  //#endregion
12394
- export { pa as ConfigManager, F as EventBus, ua as GLOBAL_PANE_ID, fa as HookSystem, sl as KLineChart, cl as KMapPlugin, ha as PluginHostImpl, da as PluginRegistry, ca as PluginState, X as RENDERER_PRIORITY, va as RendererPluginManager, ga as createPluginHost, la as wrapPaneInfo };
12511
+ export { pa as ConfigManager, F as EventBus, ua as GLOBAL_PANE_ID, fa as HookSystem, ll as KLineChart, ul as KMapPlugin, ha as PluginHostImpl, da as PluginRegistry, ca as PluginState, X as RENDERER_PRIORITY, va as RendererPluginManager, ga as createPluginHost, la as wrapPaneInfo };