@363045841yyt/klinechart 0.8.1-alpha.4 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import { Fragment as e, Teleport as t, Transition as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, effectScope as d, h as f, inject as p, markRaw as m, nextTick as h, normalizeClass as g, normalizeStyle as _, onBeforeUnmount as v, onMounted as y, onScopeDispose as b, onUnmounted as x, openBlock as S, provide as C, ref as w, renderList as T, resolveDynamicComponent as E, shallowRef as D, toDisplayString as O, unref as k, vModelCheckbox as A, vModelText as j, watch as M, withCtx as N, withDirectives as P, withKeys as F, withModifiers as I } from "vue";
2
- import { COLOR_PRESET_ITEMS as L, VERSION as R, createChartController as ee, createIndicatorSelectorController as te, darkTheme as ne, lightTheme as re, normalizeColorPresetSettings as ie, resolveThemeColors as ae, themeToCssVars as oe } from "@363045841yyt/klinechart-core";
3
- import { DrawingInteractionController as se, allIndicators as ce, createChartController as le, createIndicatorSelectorController as z, findIndicator as ue, kGapFromKWidth as de, zoomLevelToKWidth as fe } from "@363045841yyt/klinechart-core/controllers";
4
- import { SemanticChartController as pe } from "@363045841yyt/klinechart-core/semantic";
5
- import { getRegisteredIndicatorDefinition as me } from "@363045841yyt/klinechart-core/indicators";
6
- import { DEFAULT_SETTINGS as B, SETTINGS_STORAGE_KEY as V } from "@363045841yyt/klinechart-core/config";
2
+ import { COLOR_PRESET_ITEMS as ee, VERSION as L, createChartController as te, createIndicatorSelectorController as R, darkTheme as ne, formatTimestamp as re, lightTheme as ie, normalizeColorPresetSettings as z, resolveThemeColors as ae, themeToCssVars as oe } from "@363045841yyt/klinechart-core";
3
+ import { DrawingInteractionController as se, allIndicators as ce, createChartController as le, createIndicatorSelectorController as ue, findIndicator as de, kGapFromKWidth as fe, zoomLevelToKWidth as pe } from "@363045841yyt/klinechart-core/controllers";
4
+ import { SemanticChartController as me } from "@363045841yyt/klinechart-core/semantic";
5
+ import { getRegisteredIndicatorDefinition as he } from "@363045841yyt/klinechart-core/indicators";
6
+ import { DEFAULT_SETTINGS as B, SETTINGS_STORAGE_KEY as ge } from "@363045841yyt/klinechart-core/config";
7
7
  //#region src/components/ColorPresetPanel.vue?vue&type=script&setup=true&lang.ts
8
- var H = { class: "color-preset-tools" }, U = {
8
+ var _e = { class: "color-preset-tools" }, ve = {
9
9
  class: "theme-tabs",
10
10
  role: "tablist",
11
11
  "aria-label": "颜色主题"
12
- }, he = ["onClick"], ge = { class: "color-group-label" }, _e = { class: "color-grid" }, ve = ["value", "onInput"], ye = /*@__PURE__*/ u({
12
+ }, ye = ["onClick"], be = { class: "color-group-label" }, V = { class: "color-grid" }, xe = ["value", "onInput"], Se = /*@__PURE__*/ u({
13
13
  __name: "ColorPresetPanel",
14
14
  props: { colorPresetSettings: {} },
15
15
  emits: ["update:colorPresetSettings"],
@@ -28,16 +28,16 @@ var H = { class: "color-preset-tools" }, U = {
28
28
  }, u = r(() => Object.keys(l).map((e) => ({
29
29
  group: e,
30
30
  label: l[e],
31
- items: L.filter((t) => t.group === e)
31
+ items: ee.filter((t) => t.group === e)
32
32
  })).filter((e) => e.items.length > 0)), d = w("light");
33
33
  function f(e, t) {
34
- return (e === "dark" ? ne : re).colors[t];
34
+ return (e === "dark" ? ne : ie).colors[t];
35
35
  }
36
36
  function p(e) {
37
- return ie(i.colorPresetSettings)[d.value]?.[e] ?? f(d.value, e);
37
+ return z(i.colorPresetSettings)[d.value]?.[e] ?? f(d.value, e);
38
38
  }
39
39
  function m(e, t) {
40
- let n = ie(i.colorPresetSettings);
40
+ let n = z(i.colorPresetSettings);
41
41
  a("update:colorPresetSettings", {
42
42
  ...n,
43
43
  [d.value]: {
@@ -47,19 +47,19 @@ var H = { class: "color-preset-tools" }, U = {
47
47
  });
48
48
  }
49
49
  function h() {
50
- let e = { ...ie(i.colorPresetSettings) };
50
+ let e = { ...z(i.colorPresetSettings) };
51
51
  delete e[d.value], a("update:colorPresetSettings", e);
52
52
  }
53
- return (t, n) => (S(), o("div", null, [s("div", H, [s("div", U, [(S(), o(e, null, T(c, (e) => s("button", {
53
+ return (t, n) => (S(), o("div", null, [s("div", _e, [s("div", ve, [(S(), o(e, null, T(c, (e) => s("button", {
54
54
  key: e.value,
55
55
  type: "button",
56
56
  class: g(["theme-tab", { active: d.value === e.value }]),
57
57
  onClick: (t) => d.value = e.value
58
- }, O(e.label), 11, he)), 64))]), s("button", {
58
+ }, O(e.label), 11, ye)), 64))]), s("button", {
59
59
  type: "button",
60
60
  class: "color-reset-btn",
61
61
  onClick: h
62
- }, " 重置颜色 ")]), (S(!0), o(e, null, T(u.value, (t) => (S(), o(e, { key: t.group }, [s("div", ge, O(t.label), 1), s("div", _e, [(S(!0), o(e, null, T(t.items, (e) => (S(), o("label", {
62
+ }, " 重置颜色 ")]), (S(!0), o(e, null, T(u.value, (t) => (S(), o(e, { key: t.group }, [s("div", be, O(t.label), 1), s("div", V, [(S(!0), o(e, null, T(t.items, (e) => (S(), o("label", {
63
63
  key: e.key,
64
64
  class: "color-item"
65
65
  }, [s("span", null, O(e.label), 1), s("input", {
@@ -67,20 +67,20 @@ var H = { class: "color-preset-tools" }, U = {
67
67
  class: "color-input",
68
68
  value: p(e.key),
69
69
  onInput: (t) => m(e.key, t.target.value)
70
- }, null, 40, ve)]))), 128))])], 64))), 128))]));
70
+ }, null, 40, xe)]))), 128))])], 64))), 128))]));
71
71
  }
72
- }), W = (e, t) => {
72
+ }), H = (e, t) => {
73
73
  let n = e.__vccOpts || e;
74
74
  for (let [e, r] of t) n[e] = r;
75
75
  return n;
76
- }, be = /*#__PURE__*/ W(ye, [["__scopeId", "data-v-a52947a4"]]), xe = [
76
+ }, Ce = /*#__PURE__*/ H(Se, [["__scopeId", "data-v-a52947a4"]]), we = [
77
77
  "title",
78
78
  "aria-expanded",
79
79
  "onKeydown"
80
- ], G = {
80
+ ], Te = {
81
81
  key: 0,
82
82
  class: "dropdown__label"
83
- }, Se = { class: "dropdown__value" }, Ce = ["aria-selected", "onClick"], K = 0, q = null, we = 0, Te = /*#__PURE__*/ W(/* @__PURE__ */ u({
83
+ }, Ee = { class: "dropdown__value" }, De = ["aria-selected", "onClick"], Oe = 0, U = null, W = 0, G = /*#__PURE__*/ H(/* @__PURE__ */ u({
84
84
  __name: "Dropdown",
85
85
  props: {
86
86
  modelValue: {},
@@ -92,7 +92,7 @@ var H = { class: "color-preset-tools" }, U = {
92
92
  },
93
93
  emits: ["update:modelValue"],
94
94
  setup(t, { emit: n }) {
95
- let i = t, c = n, l = w(null), u = w(null), d = w(!1), f = w(0), p = ++we, m = r(() => i.minWidth ? { minWidth: i.minWidth } : {}), h = r(() => {
95
+ let i = t, c = n, l = w(null), u = w(null), d = w(!1), f = w(0), p = ++W, m = r(() => i.minWidth ? { minWidth: i.minWidth } : {}), h = r(() => {
96
96
  if (!d.value) return;
97
97
  let e = f.value || (i.minWidth ? parseInt(i.minWidth) : 0);
98
98
  return { width: e ? `${e}px` : void 0 };
@@ -101,10 +101,10 @@ var H = { class: "color-preset-tools" }, U = {
101
101
  return e && i.options.some((t) => t.value === e) ? e : i.options[0]?.value ?? "";
102
102
  }), b = r(() => i.options.find((e) => e.value === y.value) ?? i.options[0]);
103
103
  function x() {
104
- K !== p && q && q(), !d.value && (K = p, q = C, f.value = u.value?.offsetWidth ?? 0, d.value = !0, document.addEventListener("pointerdown", k));
104
+ Oe !== p && U && U(), !d.value && (Oe = p, U = C, f.value = u.value?.offsetWidth ?? 0, d.value = !0, document.addEventListener("pointerdown", k));
105
105
  }
106
106
  function C() {
107
- d.value && (d.value = !1, K === p && (K = 0, q = null), document.removeEventListener("pointerdown", k));
107
+ d.value && (d.value = !1, Oe === p && (Oe = 0, U = null), document.removeEventListener("pointerdown", k));
108
108
  }
109
109
  function E() {
110
110
  d.value ? C() : x();
@@ -137,13 +137,13 @@ var H = { class: "color-preset-tools" }, U = {
137
137
  F(I(E, ["prevent"]), ["space"])
138
138
  ]
139
139
  }, [
140
- t.label ? (S(), o("span", G, O(t.label), 1)) : a("", !0),
141
- s("span", Se, O(b.value.label), 1),
140
+ t.label ? (S(), o("span", Te, O(t.label), 1)) : a("", !0),
141
+ s("span", Ee, O(b.value.label), 1),
142
142
  r[0] ||= s("span", {
143
143
  class: "dropdown__chevron",
144
144
  "aria-hidden": "true"
145
145
  }, null, -1)
146
- ], 44, xe), d.value ? (S(), o("div", {
146
+ ], 44, we), d.value ? (S(), o("div", {
147
147
  key: 0,
148
148
  class: "dropdown__menu",
149
149
  style: _(h.value),
@@ -156,12 +156,12 @@ var H = { class: "color-preset-tools" }, U = {
156
156
  role: "option",
157
157
  "aria-selected": e.value === y.value,
158
158
  onClick: (t) => D(e.value)
159
- }, O(e.label), 11, Ce))), 128))], 4)) : a("", !0)], 2));
159
+ }, O(e.label), 11, De))), 128))], 4)) : a("", !0)], 2));
160
160
  }
161
- }), [["__scopeId", "data-v-126e11f2"]]), Ee = {
161
+ }), [["__scopeId", "data-v-126e11f2"]]), ke = {
162
162
  class: "toolbar-item color-item",
163
163
  title: "颜色"
164
- }, De = ["value"], Oe = /*#__PURE__*/ W(/* @__PURE__ */ u({
164
+ }, K = ["value"], Ae = /*#__PURE__*/ H(/* @__PURE__ */ u({
165
165
  __name: "DrawingStyleToolbar",
166
166
  props: { drawing: {} },
167
167
  emits: ["updateStyle", "delete"],
@@ -216,7 +216,7 @@ var H = { class: "color-preset-tools" }, U = {
216
216
  onPointermove: i[5] ||= I(() => {}, ["stop"]),
217
217
  onPointerup: i[6] ||= I(() => {}, ["stop"])
218
218
  }, [
219
- s("div", Ee, [s("span", {
219
+ s("div", ke, [s("span", {
220
220
  class: "color-swatch",
221
221
  style: _({ background: e.drawing.style.stroke ?? "#2962ff" })
222
222
  }, null, 4), s("input", {
@@ -224,15 +224,15 @@ var H = { class: "color-preset-tools" }, U = {
224
224
  class: "color-input",
225
225
  value: e.drawing.style.stroke ?? "#2962ff",
226
226
  onInput: i[0] ||= (e) => c(e.target.value)
227
- }, null, 40, De)]),
228
- l(Te, {
227
+ }, null, 40, K)]),
228
+ l(G, {
229
229
  "model-value": String(e.drawing.style.strokeWidth ?? 1),
230
230
  options: n,
231
231
  size: "sm",
232
232
  title: "线宽",
233
233
  "onUpdate:modelValue": i[1] ||= (e) => u(Number(e))
234
234
  }, null, 8, ["model-value"]),
235
- l(Te, {
235
+ l(G, {
236
236
  "model-value": e.drawing.style.strokeStyle ?? "solid",
237
237
  options: r,
238
238
  size: "sm",
@@ -260,32 +260,32 @@ var H = { class: "color-preset-tools" }, U = {
260
260
  ], -1)]])
261
261
  ], 32));
262
262
  }
263
- }), [["__scopeId", "data-v-e9b6a8a9"]]), ke = Symbol("fullscreen-teleport-target");
264
- function Ae(e) {
265
- C(ke, e);
263
+ }), [["__scopeId", "data-v-e9b6a8a9"]]), je = Symbol("fullscreen-teleport-target");
264
+ function Me(e) {
265
+ C(je, e);
266
266
  }
267
- function je() {
268
- let e = p(ke, null);
267
+ function Ne() {
268
+ let e = p(je, null);
269
269
  return r(() => e?.value ?? "body");
270
270
  }
271
271
  //#endregion
272
272
  //#region src/components/IndicatorParams.vue?vue&type=script&setup=true&lang.ts
273
- var Me = { class: "params-header" }, Ne = { class: "header-left" }, Pe = { class: "params-title" }, Fe = { class: "header-right" }, Ie = {
273
+ var Pe = { class: "params-header" }, Fe = { class: "header-left" }, Ie = { class: "params-title" }, Le = { class: "header-right" }, Re = {
274
274
  key: 0,
275
275
  class: "indicator-description"
276
- }, J = { class: "params-body" }, Y = { class: "param-header" }, Le = { class: "param-label" }, Re = { class: "param-label-text" }, ze = {
276
+ }, ze = { class: "params-body" }, q = { class: "param-header" }, Be = { class: "param-label" }, Ve = { class: "param-label-text" }, He = {
277
277
  key: 0,
278
278
  class: "param-range"
279
- }, Be = { class: "input-wrapper" }, Ve = ["disabled", "onClick"], He = [
279
+ }, J = { class: "input-wrapper" }, Y = ["disabled", "onClick"], Ue = [
280
280
  "value",
281
281
  "min",
282
282
  "max",
283
283
  "step",
284
284
  "onInput"
285
- ], Ue = ["disabled", "onClick"], We = {
285
+ ], We = ["disabled", "onClick"], Ge = {
286
286
  key: 0,
287
287
  class: "param-description"
288
- }, Ge = { class: "params-footer" }, Ke = { class: "footer-right" }, qe = /*#__PURE__*/ W(/* @__PURE__ */ u({
288
+ }, Ke = { class: "params-footer" }, qe = { class: "footer-right" }, Je = /*#__PURE__*/ H(/* @__PURE__ */ u({
289
289
  __name: "IndicatorParams",
290
290
  props: {
291
291
  visible: { type: Boolean },
@@ -297,7 +297,7 @@ var Me = { class: "params-header" }, Ne = { class: "header-left" }, Pe = { class
297
297
  },
298
298
  emits: ["close", "confirm"],
299
299
  setup(r, { emit: u }) {
300
- let d = r, f = u, p = w({ ...d.values }), m = w(!0), h = je();
300
+ let d = r, f = u, p = w({ ...d.values }), m = w(!0), h = Ne();
301
301
  M(() => d.values, (e) => {
302
302
  p.value = { ...e };
303
303
  }, {
@@ -333,7 +333,7 @@ var Me = { class: "params-header" }, Ne = { class: "header-left" }, Pe = { class
333
333
  class: "indicator-params",
334
334
  onClick: d[3] ||= I(() => {}, ["stop"])
335
335
  }, [
336
- s("div", Me, [s("div", Ne, [s("span", Pe, O(r.indicatorName), 1), d[5] ||= s("span", { class: "params-subtitle" }, "参数设置", -1)]), s("div", Fe, [s("button", {
336
+ s("div", Pe, [s("div", Fe, [s("span", Ie, O(r.indicatorName), 1), d[5] ||= s("span", { class: "params-subtitle" }, "参数设置", -1)]), s("div", Le, [s("button", {
337
337
  class: g(["toggle-desc-btn", { active: m.value }]),
338
338
  onClick: d[0] ||= (e) => m.value = !m.value,
339
339
  title: "显示/隐藏说明"
@@ -350,18 +350,18 @@ var Me = { class: "params-header" }, Ne = { class: "header-left" }, Pe = { class
350
350
  "stroke-width": "2"
351
351
  }, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])])]),
352
352
  l(n, { name: "slide" }, {
353
- default: N(() => [m.value && r.indicatorDescription ? (S(), o("div", Ie, [s("p", null, O(r.indicatorDescription), 1)])) : a("", !0)]),
353
+ default: N(() => [m.value && r.indicatorDescription ? (S(), o("div", Re, [s("p", null, O(r.indicatorDescription), 1)])) : a("", !0)]),
354
354
  _: 1
355
355
  }),
356
- s("div", J, [(S(!0), o(e, null, T(r.params, (e) => (S(), o("div", {
356
+ s("div", ze, [(S(!0), o(e, null, T(r.params, (e) => (S(), o("div", {
357
357
  key: e.key,
358
358
  class: g(["param-item", { "has-desc": m.value && e.description }])
359
- }, [s("div", Y, [s("label", Le, [s("span", Re, O(e.label), 1), e.min !== void 0 || e.max !== void 0 ? (S(), o("span", ze, O(e.min ?? "-∞") + " ~ " + O(e.max ?? "+∞"), 1)) : a("", !0)]), s("div", Be, [
359
+ }, [s("div", q, [s("label", Be, [s("span", Ve, O(e.label), 1), e.min !== void 0 || e.max !== void 0 ? (S(), o("span", He, O(e.min ?? "-∞") + " ~ " + O(e.max ?? "+∞"), 1)) : a("", !0)]), s("div", J, [
360
360
  s("button", {
361
361
  class: "stepper-btn",
362
362
  disabled: e.min !== void 0 && (p.value[e.key] ?? 0) <= e.min,
363
363
  onClick: (t) => v(e, -1)
364
- }, " − ", 8, Ve),
364
+ }, " − ", 8, Y),
365
365
  e.type === "number" ? (S(), o("input", {
366
366
  key: 0,
367
367
  type: "number",
@@ -371,17 +371,17 @@ var Me = { class: "params-header" }, Ne = { class: "header-left" }, Pe = { class
371
371
  max: e.max,
372
372
  step: e.step || 1,
373
373
  onInput: (t) => _(e.key, t)
374
- }, null, 40, He)) : a("", !0),
374
+ }, null, 40, Ue)) : a("", !0),
375
375
  s("button", {
376
376
  class: "stepper-btn",
377
377
  disabled: e.max !== void 0 && (p.value[e.key] ?? 0) >= e.max,
378
378
  onClick: (t) => v(e, 1)
379
- }, " + ", 8, Ue)
379
+ }, " + ", 8, We)
380
380
  ])]), l(n, { name: "slide" }, {
381
- default: N(() => [m.value && e.description ? (S(), o("div", We, O(e.description), 1)) : a("", !0)]),
381
+ default: N(() => [m.value && e.description ? (S(), o("div", Ge, O(e.description), 1)) : a("", !0)]),
382
382
  _: 2
383
383
  }, 1024)], 2))), 128))]),
384
- s("div", Ge, [s("button", {
384
+ s("div", Ke, [s("button", {
385
385
  class: "params-btn reset",
386
386
  onClick: y
387
387
  }, [...d[8] ||= [s("svg", {
@@ -389,7 +389,7 @@ var Me = { class: "params-header" }, Ne = { class: "header-left" }, Pe = { class
389
389
  fill: "none",
390
390
  stroke: "currentColor",
391
391
  "stroke-width": "2"
392
- }, [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", Ke, [s("button", {
392
+ }, [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", qe, [s("button", {
393
393
  class: "params-btn cancel",
394
394
  onClick: d[2] ||= (e) => u.$emit("close")
395
395
  }, "取消"), s("button", {
@@ -407,31 +407,31 @@ var Me = { class: "params-header" }, Ne = { class: "header-left" }, Pe = { class
407
407
  _: 1
408
408
  })], 8, ["to"]));
409
409
  }
410
- }), [["__scopeId", "data-v-30f2f611"]]), Je = { class: "indicator-selector" }, Ye = { class: "modal-header" }, Xe = { class: "header-title" }, Ze = { class: "title-sub" }, Qe = { class: "header-actions" }, $e = {
410
+ }), [["__scopeId", "data-v-30f2f611"]]), Ye = { class: "indicator-selector" }, Xe = { class: "modal-header" }, Ze = { class: "header-title" }, Qe = { class: "title-sub" }, $e = { class: "header-actions" }, et = {
411
411
  key: 0,
412
412
  viewBox: "0 0 24 24",
413
413
  width: "16",
414
414
  height: "16",
415
415
  fill: "currentColor"
416
- }, et = {
416
+ }, tt = {
417
417
  key: 1,
418
418
  viewBox: "0 0 24 24",
419
419
  width: "16",
420
420
  height: "16",
421
421
  fill: "currentColor"
422
- }, tt = { class: "modal-search-area" }, nt = { class: "search-box" }, rt = ["value"], it = { class: "modal-body" }, at = {
422
+ }, nt = { class: "modal-search-area" }, rt = { class: "search-box" }, it = ["value"], at = { class: "modal-body" }, ot = {
423
423
  key: 0,
424
424
  class: "indicator-section"
425
- }, ot = { class: "section-header" }, st = { class: "section-count" }, ct = ["onClick"], lt = { class: "card-label" }, ut = { class: "card-tooltip" }, dt = { class: "card-header" }, ft = { class: "card-label" }, pt = { class: "card-header-actions" }, mt = ["onClick"], ht = { class: "card-name" }, gt = {
425
+ }, st = { class: "section-header" }, ct = { class: "section-count" }, lt = ["onClick"], ut = { class: "card-label" }, dt = { class: "card-tooltip" }, ft = { class: "card-header" }, pt = { class: "card-label" }, mt = { class: "card-header-actions" }, ht = ["onClick"], gt = { class: "card-name" }, _t = {
426
426
  key: 1,
427
427
  class: "section-divider"
428
- }, _t = {
428
+ }, vt = {
429
429
  key: 2,
430
430
  class: "no-results"
431
- }, vt = {
431
+ }, yt = {
432
432
  key: 3,
433
433
  class: "indicator-section"
434
- }, yt = { class: "section-header" }, bt = { class: "section-count" }, xt = ["onClick"], X = { class: "card-label" }, Z = { class: "card-tooltip" }, St = { class: "card-header" }, Ct = { class: "card-label" }, wt = { class: "card-header-actions" }, Tt = ["onClick"], Et = { class: "card-name" }, Dt = { class: "modal-footer" }, Ot = { class: "footer-info" }, kt = { class: "info-text" }, At = /*#__PURE__*/ W(/* @__PURE__ */ u({
434
+ }, bt = { class: "section-header" }, xt = { class: "section-count" }, St = ["onClick"], Ct = { class: "card-label" }, wt = { class: "card-tooltip" }, Tt = { class: "card-header" }, Et = { class: "card-label" }, Dt = { class: "card-header-actions" }, X = ["onClick"], Z = { class: "card-name" }, Ot = { class: "modal-footer" }, kt = { class: "footer-info" }, At = { class: "info-text" }, jt = /*#__PURE__*/ H(/* @__PURE__ */ u({
435
435
  __name: "IndicatorSelector",
436
436
  props: {
437
437
  activeIndicators: {},
@@ -462,21 +462,21 @@ var Me = { class: "params-header" }, Ne = { class: "header-left" }, Pe = { class
462
462
  }))
463
463
  }));
464
464
  }
465
- let h = z({ catalog: m(ce) }), _ = $(h.menuOpen), v = $(h.searchQuery), b = $(h.filteredMain), C = $(h.filteredSub), E = r(() => b.value.length > 0 || C.value.length > 0), D = h.catalog.peek().length, A = w(!1), j = w(null), M = w(!1), P = je(), F = r(() => j.value ? ue(j.value) : null), L = r(() => f.activeIndicators?.length ?? 0);
466
- function R(e) {
465
+ let h = ue({ catalog: m(ce) }), _ = $(h.menuOpen), v = $(h.searchQuery), b = $(h.filteredMain), C = $(h.filteredSub), E = r(() => b.value.length > 0 || C.value.length > 0), D = h.catalog.peek().length, A = w(!1), j = w(null), M = w(!1), P = Ne(), F = r(() => j.value ? de(j.value) : null), ee = r(() => f.activeIndicators?.length ?? 0);
466
+ function L(e) {
467
467
  return f.activeIndicators?.includes(e) ?? !1;
468
468
  }
469
- function ee(e) {
470
- R(e) || ue(e) && p("toggle", e, !0);
471
- }
472
469
  function te(e) {
470
+ L(e) || de(e) && p("toggle", e, !0);
471
+ }
472
+ function R(e) {
473
473
  p("toggle", e, !1);
474
474
  }
475
475
  function ne(e) {
476
476
  j.value = e, A.value = !0;
477
477
  }
478
478
  function re(e) {
479
- let t = ue(e);
479
+ let t = de(e);
480
480
  if (!t?.params) return {};
481
481
  let n = {};
482
482
  for (let e of t.params) n[e.key] = e.default ?? e.min ?? 1;
@@ -487,18 +487,18 @@ var Me = { class: "params-header" }, Ne = { class: "header-left" }, Pe = { class
487
487
  function ie(e) {
488
488
  j.value && p("updateParams", j.value, e), A.value = !1;
489
489
  }
490
- function ae(e) {
490
+ function z(e) {
491
491
  e.key === "Escape" && h.menuOpen.peek() && h.closeMenu();
492
492
  }
493
493
  return y(() => {
494
- document.addEventListener("keydown", ae);
494
+ document.addEventListener("keydown", z);
495
495
  }), x(() => {
496
- document.removeEventListener("keydown", ae);
496
+ document.removeEventListener("keydown", z);
497
497
  }), u({
498
498
  openMenu: () => h.openMenu(),
499
499
  closeMenu: () => h.closeMenu(),
500
500
  toggleMenu: () => h.toggleMenu()
501
- }), (r, c) => (S(), o("div", Je, [(S(), i(t, { to: k(P) }, [l(n, { name: "overlay" }, {
501
+ }), (r, c) => (S(), o("div", Ye, [(S(), i(t, { to: k(P) }, [l(n, { name: "overlay" }, {
502
502
  default: N(() => [k(_) ? (S(), o("div", {
503
503
  key: 0,
504
504
  class: "selector-overlay",
@@ -509,11 +509,11 @@ var Me = { class: "params-header" }, Ne = { class: "header-left" }, Pe = { class
509
509
  class: "selector-modal",
510
510
  onClick: c[4] ||= I(() => {}, ["stop"])
511
511
  }, [
512
- s("div", Ye, [s("div", Xe, [c[7] ||= s("span", { class: "title-text" }, "添加指标", -1), s("span", Ze, O(k(D)) + " 个可用指标", 1)]), s("div", Qe, [s("button", {
512
+ s("div", Xe, [s("div", Ze, [c[7] ||= s("span", { class: "title-text" }, "添加指标", -1), s("span", Qe, O(k(D)) + " 个可用指标", 1)]), s("div", $e, [s("button", {
513
513
  class: g(["view-toggle-btn", { active: M.value }]),
514
514
  onClick: c[0] ||= (e) => M.value = !M.value,
515
515
  title: "简洁模式"
516
- }, [M.value ? (S(), o("svg", et, [...c[9] ||= [s("path", { d: "M3 3h18v18H3V3zm16 16V5H5v14h14zM7 7h4v4H7V7zm0 6h4v4H7v-4zm6-6h4v4h-4V7zm0 6h4v4h-4v-4z" }, null, -1)]])) : (S(), o("svg", $e, [...c[8] ||= [s("path", { d: "M4 6h16v2H4zm0 5h16v2H4zm0 5h16v2H4z" }, null, -1)]]))], 2), s("button", {
516
+ }, [M.value ? (S(), o("svg", tt, [...c[9] ||= [s("path", { d: "M3 3h18v18H3V3zm16 16V5H5v14h14zM7 7h4v4H7V7zm0 6h4v4H7v-4zm6-6h4v4h-4V7zm0 6h4v4h-4v-4z" }, null, -1)]])) : (S(), o("svg", et, [...c[8] ||= [s("path", { d: "M4 6h16v2H4zm0 5h16v2H4zm0 5h16v2H4z" }, null, -1)]]))], 2), s("button", {
517
517
  class: "modal-close",
518
518
  onClick: c[1] ||= (e) => k(h).closeMenu(),
519
519
  title: "关闭"
@@ -523,7 +523,7 @@ var Me = { class: "params-header" }, Ne = { class: "header-left" }, Pe = { class
523
523
  height: "14",
524
524
  fill: "currentColor"
525
525
  }, [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)]])])]),
526
- s("div", tt, [s("div", nt, [c[11] ||= s("svg", {
526
+ s("div", nt, [s("div", rt, [c[11] ||= s("svg", {
527
527
  class: "search-icon",
528
528
  viewBox: "0 0 24 24",
529
529
  width: "16",
@@ -535,16 +535,16 @@ var Me = { class: "params-header" }, Ne = { class: "header-left" }, Pe = { class
535
535
  type: "text",
536
536
  class: "search-input",
537
537
  placeholder: "搜索指标名称..."
538
- }, null, 40, rt)])]),
539
- s("div", it, [
540
- k(b).length > 0 ? (S(), o("div", at, [s("div", ot, [c[12] ||= s("span", { class: "section-title" }, "主图指标", -1), s("span", st, O(k(b).length), 1)]), s("div", { class: g(["indicator-grid", { compact: M.value }]) }, [(S(!0), o(e, null, T(k(b), (t) => (S(), o("button", {
538
+ }, null, 40, it)])]),
539
+ s("div", at, [
540
+ k(b).length > 0 ? (S(), o("div", ot, [s("div", st, [c[12] ||= s("span", { class: "section-title" }, "主图指标", -1), s("span", ct, O(k(b).length), 1)]), s("div", { class: g(["indicator-grid", { compact: M.value }]) }, [(S(!0), o(e, null, T(k(b), (t) => (S(), o("button", {
541
541
  key: t.id,
542
542
  class: g(["indicator-card", {
543
- active: R(t.id),
543
+ active: L(t.id),
544
544
  compact: M.value
545
545
  }]),
546
- onClick: (e) => R(t.id) ? te(t.id) : ee(t.id)
547
- }, [M.value ? (S(), o(e, { key: 0 }, [s("span", lt, O(t.label), 1), s("span", ut, O(t.name), 1)], 64)) : (S(), o(e, { key: 1 }, [s("div", dt, [s("span", ft, O(t.label), 1), s("div", pt, [t.params?.length ? (S(), o("button", {
546
+ onClick: (e) => L(t.id) ? R(t.id) : te(t.id)
547
+ }, [M.value ? (S(), o(e, { key: 0 }, [s("span", ut, O(t.label), 1), s("span", dt, O(t.name), 1)], 64)) : (S(), o(e, { key: 1 }, [s("div", ft, [s("span", pt, O(t.label), 1), s("div", mt, [t.params?.length ? (S(), o("button", {
548
548
  key: 0,
549
549
  class: "card-settings-btn",
550
550
  onClick: I((e) => ne(t.id), ["stop"]),
@@ -554,9 +554,9 @@ var Me = { class: "params-header" }, Ne = { class: "header-left" }, Pe = { class
554
554
  width: "14",
555
555
  height: "14",
556
556
  fill: "currentColor"
557
- }, [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, mt)) : a("", !0)])]), s("div", ht, O(t.name), 1)], 64))], 10, ct))), 128))], 2)])) : a("", !0),
558
- k(b).length > 0 && k(C).length > 0 ? (S(), o("div", gt)) : a("", !0),
559
- !E.value && k(v).trim() ? (S(), o("div", _t, [...c[14] ||= [
557
+ }, [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, ht)) : a("", !0)])]), s("div", gt, O(t.name), 1)], 64))], 10, lt))), 128))], 2)])) : a("", !0),
558
+ k(b).length > 0 && k(C).length > 0 ? (S(), o("div", _t)) : a("", !0),
559
+ !E.value && k(v).trim() ? (S(), o("div", vt, [...c[14] ||= [
560
560
  s("svg", {
561
561
  viewBox: "0 0 24 24",
562
562
  width: "48",
@@ -566,14 +566,14 @@ var Me = { class: "params-header" }, Ne = { class: "header-left" }, Pe = { class
566
566
  s("p", null, "未找到匹配的指标", -1),
567
567
  s("span", { class: "no-results-hint" }, "请尝试其他关键词", -1)
568
568
  ]])) : a("", !0),
569
- k(C).length > 0 ? (S(), o("div", vt, [s("div", yt, [c[15] ||= s("span", { class: "section-title" }, "副图指标", -1), s("span", bt, O(k(C).length), 1)]), s("div", { class: g(["indicator-grid", { compact: M.value }]) }, [(S(!0), o(e, null, T(k(C), (t) => (S(), o("button", {
569
+ k(C).length > 0 ? (S(), o("div", yt, [s("div", bt, [c[15] ||= s("span", { class: "section-title" }, "副图指标", -1), s("span", xt, O(k(C).length), 1)]), s("div", { class: g(["indicator-grid", { compact: M.value }]) }, [(S(!0), o(e, null, T(k(C), (t) => (S(), o("button", {
570
570
  key: t.id,
571
571
  class: g(["indicator-card", {
572
- active: R(t.id),
572
+ active: L(t.id),
573
573
  compact: M.value
574
574
  }]),
575
- onClick: (e) => R(t.id) ? te(t.id) : ee(t.id)
576
- }, [M.value ? (S(), o(e, { key: 0 }, [s("span", X, O(t.label), 1), s("span", Z, O(t.name), 1)], 64)) : (S(), o(e, { key: 1 }, [s("div", St, [s("span", Ct, O(t.label), 1), s("div", wt, [t.params?.length ? (S(), o("button", {
575
+ onClick: (e) => L(t.id) ? R(t.id) : te(t.id)
576
+ }, [M.value ? (S(), o(e, { key: 0 }, [s("span", Ct, O(t.label), 1), s("span", wt, O(t.name), 1)], 64)) : (S(), o(e, { key: 1 }, [s("div", Tt, [s("span", Et, O(t.label), 1), s("div", Dt, [t.params?.length ? (S(), o("button", {
577
577
  key: 0,
578
578
  class: "card-settings-btn",
579
579
  onClick: I((e) => ne(t.id), ["stop"]),
@@ -583,9 +583,9 @@ var Me = { class: "params-header" }, Ne = { class: "header-left" }, Pe = { class
583
583
  width: "14",
584
584
  height: "14",
585
585
  fill: "currentColor"
586
- }, [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, Tt)) : a("", !0)])]), s("div", Et, O(t.name), 1)], 64))], 10, xt))), 128))], 2)])) : a("", !0)
586
+ }, [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, X)) : a("", !0)])]), s("div", Z, O(t.name), 1)], 64))], 10, St))), 128))], 2)])) : a("", !0)
587
587
  ]),
588
- s("div", Dt, [s("div", Ot, [s("span", kt, "已激活 " + O(L.value) + " 个指标", 1)]), s("button", {
588
+ s("div", Ot, [s("div", kt, [s("span", At, "已激活 " + O(ee.value) + " 个指标", 1)]), s("button", {
589
589
  class: "btn btn-confirm",
590
590
  onClick: c[3] ||= (e) => k(h).closeMenu()
591
591
  }, "确认")])
@@ -593,7 +593,7 @@ var Me = { class: "params-header" }, Ne = { class: "header-left" }, Pe = { class
593
593
  _: 1
594
594
  })])) : a("", !0)]),
595
595
  _: 1
596
- })], 8, ["to"])), F.value ? (S(), i(qe, {
596
+ })], 8, ["to"])), F.value ? (S(), i(Je, {
597
597
  key: 0,
598
598
  visible: A.value,
599
599
  "indicator-id": F.value.id,
@@ -612,25 +612,25 @@ var Me = { class: "params-header" }, Ne = { class: "header-left" }, Pe = { class
612
612
  "values"
613
613
  ])) : a("", !0)]));
614
614
  }
615
- }), [["__scopeId", "data-v-bbd88e50"]]), jt = { class: "kline-tooltip__title" }, Mt = { key: 0 }, Nt = { class: "kline-tooltip__grid" }, Pt = { class: "row" }, Ft = { class: "row" }, It = { class: "row" }, Lt = { class: "row" }, Rt = {
615
+ }), [["__scopeId", "data-v-bbd88e50"]]), Mt = { class: "kline-tooltip__title" }, Nt = { key: 0 }, Pt = { class: "kline-tooltip__grid" }, Ft = { class: "row" }, It = { class: "row" }, Lt = { class: "row" }, Rt = { class: "row" }, zt = {
616
616
  key: 0,
617
617
  class: "row"
618
- }, zt = {
618
+ }, Bt = {
619
619
  key: 1,
620
620
  class: "row"
621
- }, Bt = {
621
+ }, Vt = {
622
622
  key: 2,
623
623
  class: "row"
624
- }, Vt = {
624
+ }, Ht = {
625
625
  key: 3,
626
626
  class: "row"
627
- }, Ht = {
627
+ }, Ut = {
628
628
  key: 4,
629
629
  class: "row"
630
- }, Ut = {
630
+ }, Wt = {
631
631
  key: 5,
632
632
  class: "row"
633
- }, Wt = "#6b7280", Gt = /*#__PURE__*/ W(/* @__PURE__ */ u({
633
+ }, Gt = "#6b7280", Kt = /*#__PURE__*/ H(/* @__PURE__ */ u({
634
634
  __name: "KLineTooltip",
635
635
  props: {
636
636
  k: {},
@@ -641,16 +641,20 @@ var Me = { class: "params-header" }, Ne = { class: "header-left" }, Pe = { class
641
641
  anchorPlacement: {},
642
642
  setEl: {},
643
643
  upColor: { default: "#ef4444" },
644
- downColor: { default: "#22c55e" }
644
+ downColor: { default: "#22c55e" },
645
+ timezone: { default: "Asia/Shanghai" },
646
+ showTime: {
647
+ type: Boolean,
648
+ default: !1
649
+ }
645
650
  },
646
651
  setup(e) {
647
- let t = e, n = r(() => t.useAnchor === !0), i = r(() => t.anchorPlacement === "left-bottom" ? "anchor-left-bottom" : "anchor-right-bottom");
648
- function c(e) {
649
- t.setEl?.(e);
650
- }
652
+ let t = e, n = r(() => t.k ? re(t.k.timestamp, {
653
+ timeZone: t.timezone,
654
+ showTime: t.showTime
655
+ }) : ""), i = r(() => t.useAnchor === !0), c = r(() => t.anchorPlacement === "left-bottom" ? "anchor-left-bottom" : "anchor-right-bottom");
651
656
  function l(e) {
652
- let t = new Date(e);
653
- return `${t.getFullYear()}-${String(t.getMonth() + 1).padStart(2, "0")}-${String(t.getDate()).padStart(2, "0")}`;
657
+ t.setEl?.(e);
654
658
  }
655
659
  function u(e) {
656
660
  return e >= 1e8 ? (e / 1e8).toFixed(2) + "亿" : e >= 1e4 ? (e / 1e4).toFixed(2) + "万" : e.toFixed(2);
@@ -665,45 +669,45 @@ var Me = { class: "params-header" }, Ne = { class: "header-left" }, Pe = { class
665
669
  }
666
670
  let p = r(() => {
667
671
  let e = t.k;
668
- if (!e) return Wt;
672
+ if (!e) return Gt;
669
673
  let n = f(e, t.data, t.index);
670
- return n > 0 ? t.upColor : n < 0 ? t.downColor : Wt;
674
+ return n > 0 ? t.upColor : n < 0 ? t.downColor : Gt;
671
675
  }), m = r(() => {
672
676
  let e = t.k;
673
- if (!e) return Wt;
677
+ if (!e) return Gt;
674
678
  let n = e.close - e.open;
675
- return n > 0 ? t.upColor : n < 0 ? t.downColor : Wt;
679
+ return n > 0 ? t.upColor : n < 0 ? t.downColor : Gt;
676
680
  }), h = r(() => {
677
681
  let e = t.k;
678
- if (!e) return Wt;
682
+ if (!e) return Gt;
679
683
  let n = e.changePercent ?? (e.close - e.open) / e.open * 100;
680
- return n > 0 ? t.upColor : n < 0 ? t.downColor : Wt;
684
+ return n > 0 ? t.upColor : n < 0 ? t.downColor : Gt;
681
685
  });
682
686
  return (t, r) => e.k ? (S(), o("div", {
683
687
  key: 0,
684
- ref: c,
685
- class: g(["kline-tooltip", [{ "use-anchor": n.value }, i.value]]),
686
- style: _(n.value ? void 0 : {
688
+ ref: l,
689
+ class: g(["kline-tooltip", [{ "use-anchor": i.value }, c.value]]),
690
+ style: _(i.value ? void 0 : {
687
691
  left: `${e.pos.x}px`,
688
692
  top: `${e.pos.y}px`
689
693
  })
690
- }, [s("div", jt, [e.k.stockCode ? (S(), o("span", Mt, O(e.k.stockCode), 1)) : a("", !0), s("span", null, O(l(e.k.timestamp)), 1)]), s("div", Nt, [
691
- s("div", Pt, [r[0] ||= s("span", null, "开", -1), s("span", { style: _({ color: p.value }) }, O(e.k.open.toFixed(2)), 5)]),
692
- s("div", Ft, [r[1] ||= s("span", null, "高", -1), s("span", null, O(e.k.high.toFixed(2)), 1)]),
693
- s("div", It, [r[2] ||= s("span", null, "低", -1), s("span", null, O(e.k.low.toFixed(2)), 1)]),
694
- s("div", Lt, [r[3] ||= s("span", null, "收", -1), s("span", { style: _({ color: m.value }) }, O(e.k.close.toFixed(2)), 5)]),
695
- typeof e.k.volume == "number" ? (S(), o("div", Rt, [r[4] ||= s("span", null, "成交量", -1), s("span", null, O(u(e.k.volume)), 1)])) : a("", !0),
696
- typeof e.k.turnover == "number" ? (S(), o("div", zt, [r[5] ||= s("span", null, "成交额", -1), s("span", null, O(u(e.k.turnover)), 1)])) : a("", !0),
697
- typeof e.k.amplitude == "number" ? (S(), o("div", Bt, [r[6] ||= s("span", null, "振幅", -1), s("span", null, O(e.k.amplitude) + "%", 1)])) : a("", !0),
698
- typeof e.k.changePercent == "number" ? (S(), o("div", Vt, [r[7] ||= s("span", null, "涨跌幅", -1), s("span", { style: _({ color: h.value }) }, O(d(e.k.changePercent, "%")), 5)])) : a("", !0),
699
- typeof e.k.changeAmount == "number" ? (S(), o("div", Ht, [r[8] ||= s("span", null, "涨跌额", -1), s("span", { style: _({ color: h.value }) }, O(d(e.k.changeAmount, "")), 5)])) : a("", !0),
700
- typeof e.k.turnoverRate == "number" ? (S(), o("div", Ut, [r[9] ||= s("span", null, "换手率", -1), s("span", null, O(e.k.turnoverRate.toFixed(2)) + "%", 1)])) : a("", !0)
694
+ }, [s("div", Mt, [e.k.stockCode ? (S(), o("span", Nt, O(e.k.stockCode), 1)) : a("", !0), s("span", null, O(n.value), 1)]), s("div", Pt, [
695
+ s("div", Ft, [r[0] ||= s("span", null, "开", -1), s("span", { style: _({ color: p.value }) }, O(e.k.open.toFixed(2)), 5)]),
696
+ s("div", It, [r[1] ||= s("span", null, "高", -1), s("span", null, O(e.k.high.toFixed(2)), 1)]),
697
+ s("div", Lt, [r[2] ||= s("span", null, "低", -1), s("span", null, O(e.k.low.toFixed(2)), 1)]),
698
+ s("div", Rt, [r[3] ||= s("span", null, "收", -1), s("span", { style: _({ color: m.value }) }, O(e.k.close.toFixed(2)), 5)]),
699
+ typeof e.k.volume == "number" ? (S(), o("div", zt, [r[4] ||= s("span", null, "成交量", -1), s("span", null, O(u(e.k.volume)), 1)])) : a("", !0),
700
+ typeof e.k.turnover == "number" ? (S(), o("div", Bt, [r[5] ||= s("span", null, "成交额", -1), s("span", null, O(u(e.k.turnover)), 1)])) : a("", !0),
701
+ typeof e.k.amplitude == "number" ? (S(), o("div", Vt, [r[6] ||= s("span", null, "振幅", -1), s("span", null, O(e.k.amplitude) + "%", 1)])) : a("", !0),
702
+ typeof e.k.changePercent == "number" ? (S(), o("div", Ht, [r[7] ||= s("span", null, "涨跌幅", -1), s("span", { style: _({ color: h.value }) }, O(d(e.k.changePercent, "%")), 5)])) : a("", !0),
703
+ typeof e.k.changeAmount == "number" ? (S(), o("div", Ut, [r[8] ||= s("span", null, "涨跌额", -1), s("span", { style: _({ color: h.value }) }, O(d(e.k.changeAmount, "")), 5)])) : a("", !0),
704
+ typeof e.k.turnoverRate == "number" ? (S(), o("div", Wt, [r[9] ||= s("span", null, "换手率", -1), s("span", null, O(e.k.turnoverRate.toFixed(2)) + "%", 1)])) : a("", !0)
701
705
  ])], 6)) : a("", !0);
702
706
  }
703
- }), [["__scopeId", "data-v-a068b75e"]]), Kt = { class: "marker-tooltip__title" }, qt = {
707
+ }), [["__scopeId", "data-v-80fa3a7d"]]), qt = { class: "marker-tooltip__title" }, Jt = {
704
708
  key: 0,
705
709
  class: "marker-tooltip__content"
706
- }, Jt = /*#__PURE__*/ W(/* @__PURE__ */ u({
710
+ }, Yt = /*#__PURE__*/ H(/* @__PURE__ */ u({
707
711
  __name: "MarkerTooltip",
708
712
  props: {
709
713
  marker: {},
@@ -752,18 +756,18 @@ var Me = { class: "params-header" }, Ne = { class: "header-left" }, Pe = { class
752
756
  left: `${t.pos.x + 12}px`,
753
757
  top: `${t.pos.y + 12}px`
754
758
  })
755
- }, [s("div", Kt, O(f.value), 1), m.value ? (S(), o("div", qt, [(S(!0), o(e, null, T(p.value, (e, t) => (S(), o("div", {
759
+ }, [s("div", qt, O(f.value), 1), m.value ? (S(), o("div", Jt, [(S(!0), o(e, null, T(p.value, (e, t) => (S(), o("div", {
756
760
  key: t,
757
761
  class: "row"
758
762
  }, [s("span", null, O(t), 1), s("span", null, O(h(e)), 1)]))), 128))])) : a("", !0)], 6)) : a("", !0);
759
763
  }
760
- }), [["__scopeId", "data-v-f2a21012"]]), Yt = {
764
+ }), [["__scopeId", "data-v-f2a21012"]]), Xt = {
761
765
  viewBox: "0 0 24 24",
762
766
  width: "1.2em",
763
767
  height: "1.2em"
764
768
  };
765
- function Xt(e, t) {
766
- return S(), o("svg", Yt, [...t[0] ||= [s("path", {
769
+ function Zt(e, t) {
770
+ return S(), o("svg", Xt, [...t[0] ||= [s("path", {
767
771
  fill: "none",
768
772
  stroke: "currentColor",
769
773
  "stroke-linecap": "round",
@@ -772,16 +776,16 @@ function Xt(e, t) {
772
776
  d: "M7.904 17.563a1.2 1.2 0 0 0 2.228.308l2.09-3.093l4.907 4.907a1.067 1.067 0 0 0 1.509 0l1.047-1.047a1.067 1.067 0 0 0 0-1.509l-4.907-4.907l3.113-2.09a1.2 1.2 0 0 0-.309-2.228L4 4z"
773
777
  }, null, -1)]]);
774
778
  }
775
- var Zt = m({
779
+ var Qt = m({
776
780
  name: "tabler-pointer",
777
- render: Xt
778
- }), Qt = {
781
+ render: Zt
782
+ }), $t = {
779
783
  viewBox: "0 0 24 24",
780
784
  width: "1.2em",
781
785
  height: "1.2em"
782
786
  };
783
- function $t(e, t) {
784
- return S(), o("svg", Qt, [...t[0] ||= [s("path", {
787
+ function en(e, t) {
788
+ return S(), o("svg", $t, [...t[0] ||= [s("path", {
785
789
  fill: "none",
786
790
  stroke: "currentColor",
787
791
  "stroke-linecap": "round",
@@ -790,16 +794,16 @@ function $t(e, t) {
790
794
  d: "M4 19h16M4 15l4-6l4 2l4-5l4 4"
791
795
  }, null, -1)]]);
792
796
  }
793
- var en = m({
797
+ var tn = m({
794
798
  name: "tabler-chart-line",
795
- render: $t
796
- }), tn = {
799
+ render: en
800
+ }), nn = {
797
801
  viewBox: "0 0 24 24",
798
802
  width: "1.2em",
799
803
  height: "1.2em"
800
804
  };
801
- function nn(e, t) {
802
- return S(), o("svg", tn, [...t[0] ||= [s("path", {
805
+ function rn(e, t) {
806
+ return S(), o("svg", nn, [...t[0] ||= [s("path", {
803
807
  fill: "none",
804
808
  stroke: "currentColor",
805
809
  "stroke-linecap": "round",
@@ -808,16 +812,16 @@ function nn(e, t) {
808
812
  d: "M17 7L7 17M8 7h9v9"
809
813
  }, null, -1)]]);
810
814
  }
811
- var rn = m({
815
+ var an = m({
812
816
  name: "tabler-arrow-up-right",
813
- render: nn
814
- }), an = {
817
+ render: rn
818
+ }), on = {
815
819
  viewBox: "0 0 24 24",
816
820
  width: "1.2em",
817
821
  height: "1.2em"
818
822
  };
819
- function on(e, t) {
820
- return S(), o("svg", an, [...t[0] ||= [s("path", {
823
+ function sn(e, t) {
824
+ return S(), o("svg", on, [...t[0] ||= [s("path", {
821
825
  fill: "none",
822
826
  stroke: "currentColor",
823
827
  "stroke-linecap": "round",
@@ -826,16 +830,16 @@ function on(e, t) {
826
830
  d: "M5 12h14m-6 6l6-6m-6-6l6 6"
827
831
  }, null, -1)]]);
828
832
  }
829
- var sn = m({
833
+ var cn = m({
830
834
  name: "tabler-arrow-right",
831
- render: on
832
- }), cn = {
835
+ render: sn
836
+ }), ln = {
833
837
  viewBox: "0 0 24 24",
834
838
  width: "1.2em",
835
839
  height: "1.2em"
836
840
  };
837
- function ln(e, t) {
838
- return S(), o("svg", cn, [...t[0] ||= [s("path", {
841
+ function un(e, t) {
842
+ return S(), o("svg", ln, [...t[0] ||= [s("path", {
839
843
  fill: "none",
840
844
  stroke: "currentColor",
841
845
  "stroke-linecap": "round",
@@ -844,16 +848,16 @@ function ln(e, t) {
844
848
  d: "M5 12h14"
845
849
  }, null, -1)]]);
846
850
  }
847
- var un = m({
851
+ var dn = m({
848
852
  name: "tabler-minus",
849
- render: ln
850
- }), dn = {
853
+ render: un
854
+ }), fn = {
851
855
  viewBox: "0 0 24 24",
852
856
  width: "1.2em",
853
857
  height: "1.2em"
854
858
  };
855
- function fn(e, t) {
856
- return S(), o("svg", dn, [...t[0] ||= [s("path", {
859
+ function pn(e, t) {
860
+ return S(), o("svg", fn, [...t[0] ||= [s("path", {
857
861
  fill: "none",
858
862
  stroke: "currentColor",
859
863
  "stroke-linecap": "round",
@@ -862,16 +866,16 @@ function fn(e, t) {
862
866
  d: "M3 12v.01M7 12h10m4 0v.01"
863
867
  }, null, -1)]]);
864
868
  }
865
- var pn = m({
869
+ var mn = m({
866
870
  name: "tabler-separator",
867
- render: fn
868
- }), mn = {
871
+ render: pn
872
+ }), hn = {
869
873
  viewBox: "0 0 24 24",
870
874
  width: "1.2em",
871
875
  height: "1.2em"
872
876
  };
873
- function hn(e, t) {
874
- return S(), o("svg", mn, [...t[0] ||= [s("path", {
877
+ function gn(e, t) {
878
+ return S(), o("svg", hn, [...t[0] ||= [s("path", {
875
879
  fill: "none",
876
880
  stroke: "currentColor",
877
881
  "stroke-linecap": "round",
@@ -880,16 +884,16 @@ function hn(e, t) {
880
884
  d: "M4 8V6a2 2 0 0 1 2-2h2M4 16v2a2 2 0 0 0 2 2h2m8-16h2a2 2 0 0 1 2 2v2m-4 12h2a2 2 0 0 0 2-2v-2M9 12h6m-3-3v6"
881
885
  }, null, -1)]]);
882
886
  }
883
- var gn = m({
887
+ var _n = m({
884
888
  name: "tabler-crosshair",
885
- render: hn
886
- }), _n = {
889
+ render: gn
890
+ }), vn = {
887
891
  viewBox: "0 0 24 24",
888
892
  width: "1.2em",
889
893
  height: "1.2em"
890
894
  };
891
- function vn(e, t) {
892
- return S(), o("svg", _n, [...t[0] ||= [s("g", {
895
+ function yn(e, t) {
896
+ return S(), o("svg", vn, [...t[0] ||= [s("g", {
893
897
  fill: "none",
894
898
  stroke: "currentColor",
895
899
  "stroke-linecap": "round",
@@ -897,16 +901,16 @@ function vn(e, t) {
897
901
  "stroke-width": "2"
898
902
  }, [s("path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 0 0-18 0m9-3h.01" }), s("path", { d: "M11 12h1v4h1" })], -1)]]);
899
903
  }
900
- var yn = m({
904
+ var bn = m({
901
905
  name: "tabler-info-circle",
902
- render: vn
903
- }), bn = {
906
+ render: yn
907
+ }), xn = {
904
908
  viewBox: "0 0 24 24",
905
909
  width: "1.2em",
906
910
  height: "1.2em"
907
911
  };
908
- function xn(e, t) {
909
- return S(), o("svg", bn, [...t[0] ||= [s("path", {
912
+ function Sn(e, t) {
913
+ return S(), o("svg", xn, [...t[0] ||= [s("path", {
910
914
  fill: "none",
911
915
  stroke: "currentColor",
912
916
  "stroke-linecap": "round",
@@ -915,16 +919,16 @@ function xn(e, t) {
915
919
  d: "M3 10a7 7 0 1 0 14 0a7 7 0 1 0-14 0m4 0h6m-3-3v6m11 8l-6-6"
916
920
  }, null, -1)]]);
917
921
  }
918
- var Sn = m({
922
+ var Cn = m({
919
923
  name: "tabler-zoom-in",
920
- render: xn
921
- }), Cn = {
924
+ render: Sn
925
+ }), wn = {
922
926
  viewBox: "0 0 24 24",
923
927
  width: "1.2em",
924
928
  height: "1.2em"
925
929
  };
926
- function wn(e, t) {
927
- return S(), o("svg", Cn, [...t[0] ||= [s("path", {
930
+ function Tn(e, t) {
931
+ return S(), o("svg", wn, [...t[0] ||= [s("path", {
928
932
  fill: "none",
929
933
  stroke: "currentColor",
930
934
  "stroke-linecap": "round",
@@ -933,16 +937,16 @@ function wn(e, t) {
933
937
  d: "M3 10a7 7 0 1 0 14 0a7 7 0 1 0-14 0m4 0h6m8 11l-6-6"
934
938
  }, null, -1)]]);
935
939
  }
936
- var Tn = m({
940
+ var En = m({
937
941
  name: "tabler-zoom-out",
938
- render: wn
939
- }), En = {
942
+ render: Tn
943
+ }), Dn = {
940
944
  viewBox: "0 0 24 24",
941
945
  width: "1.2em",
942
946
  height: "1.2em"
943
947
  };
944
- function Dn(e, t) {
945
- return S(), o("svg", En, [...t[0] ||= [s("path", {
948
+ function On(e, t) {
949
+ return S(), o("svg", Dn, [...t[0] ||= [s("path", {
946
950
  fill: "none",
947
951
  stroke: "currentColor",
948
952
  "stroke-linecap": "round",
@@ -951,16 +955,16 @@ function Dn(e, t) {
951
955
  d: "M4 8V6a2 2 0 0 1 2-2h2M4 16v2a2 2 0 0 0 2 2h2m8-16h2a2 2 0 0 1 2 2v2m-4 12h2a2 2 0 0 0 2-2v-2"
952
956
  }, null, -1)]]);
953
957
  }
954
- var On = m({
958
+ var kn = m({
955
959
  name: "tabler-maximize",
956
- render: Dn
957
- }), kn = {
960
+ render: On
961
+ }), An = {
958
962
  viewBox: "0 0 24 24",
959
963
  width: "1.2em",
960
964
  height: "1.2em"
961
965
  };
962
- function An(e, t) {
963
- return S(), o("svg", kn, [...t[0] ||= [s("path", {
966
+ function jn(e, t) {
967
+ return S(), o("svg", An, [...t[0] ||= [s("path", {
964
968
  fill: "none",
965
969
  stroke: "currentColor",
966
970
  "stroke-linecap": "round",
@@ -969,16 +973,16 @@ function An(e, t) {
969
973
  d: "M15 19v-2a2 2 0 0 1 2-2h2M15 5v2a2 2 0 0 0 2 2h2M5 15h2a2 2 0 0 1 2 2v2M5 9h2a2 2 0 0 0 2-2V5"
970
974
  }, null, -1)]]);
971
975
  }
972
- var jn = m({
976
+ var Mn = m({
973
977
  name: "tabler-minimize",
974
- render: An
975
- }), Mn = {
978
+ render: jn
979
+ }), Nn = {
976
980
  viewBox: "0 0 24 24",
977
981
  width: "1.2em",
978
982
  height: "1.2em"
979
983
  };
980
- function Nn(e, t) {
981
- return S(), o("svg", Mn, [...t[0] ||= [s("g", {
984
+ function Pn(e, t) {
985
+ return S(), o("svg", Nn, [...t[0] ||= [s("g", {
982
986
  fill: "none",
983
987
  stroke: "currentColor",
984
988
  "stroke-linecap": "round",
@@ -986,16 +990,16 @@ function Nn(e, t) {
986
990
  "stroke-width": "2"
987
991
  }, [s("path", { d: "M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 0 0-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 0 0-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 0 0-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 0 0-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 0 0 1.066-2.573c-.94-1.543.826-3.31 2.37-2.37c1 .608 2.296.07 2.572-1.065" }), s("path", { d: "M9 12a3 3 0 1 0 6 0a3 3 0 0 0-6 0" })], -1)]]);
988
992
  }
989
- var Pn = m({
993
+ var Fn = m({
990
994
  name: "tabler-settings",
991
- render: Nn
992
- }), Fn = {
995
+ render: Pn
996
+ }), In = {
993
997
  viewBox: "0 0 24 24",
994
998
  width: "1.2em",
995
999
  height: "1.2em"
996
1000
  };
997
- function In(e, t) {
998
- return S(), o("svg", Fn, [...t[0] ||= [s("path", {
1001
+ function Ln(e, t) {
1002
+ return S(), o("svg", In, [...t[0] ||= [s("path", {
999
1003
  fill: "none",
1000
1004
  stroke: "currentColor",
1001
1005
  "stroke-linecap": "round",
@@ -1004,16 +1008,16 @@ function In(e, t) {
1004
1008
  d: "M3 5a2 2 0 1 0 4 0a2 2 0 1 0-4 0m14 0a2 2 0 1 0 4 0a2 2 0 1 0-4 0M3 19a2 2 0 1 0 4 0a2 2 0 1 0-4 0m14 0a2 2 0 1 0 4 0a2 2 0 1 0-4 0M5 7v10M7 5h10M7 19h10m2-12v10"
1005
1009
  }, null, -1)]]);
1006
1010
  }
1007
- var Ln = m({
1011
+ var Rn = m({
1008
1012
  name: "tabler-shape",
1009
- render: In
1010
- }), Rn = {
1013
+ render: Ln
1014
+ }), zn = {
1011
1015
  viewBox: "0 0 24 24",
1012
1016
  width: "1.2em",
1013
1017
  height: "1.2em"
1014
1018
  };
1015
- function zn(e, t) {
1016
- return S(), o("svg", Rn, [...t[0] ||= [s("path", {
1019
+ function Bn(e, t) {
1020
+ return S(), o("svg", zn, [...t[0] ||= [s("path", {
1017
1021
  fill: "none",
1018
1022
  stroke: "currentColor",
1019
1023
  "stroke-linecap": "round",
@@ -1022,16 +1026,16 @@ function zn(e, t) {
1022
1026
  d: "M3 7a2 2 0 1 0 4 0a2 2 0 1 0-4 0m11 8a2 2 0 1 0 4 0a2 2 0 1 0-4 0m1-9a3 3 0 1 0 6 0a3 3 0 1 0-6 0M3 18a3 3 0 1 0 6 0a3 3 0 1 0-6 0m6-1l5-1.5m-7.5-7l7.81 5.37M7 7l8-1"
1023
1027
  }, null, -1)]]);
1024
1028
  }
1025
- var Bn = m({
1029
+ var Vn = m({
1026
1030
  name: "tabler-chart-dots-3",
1027
- render: zn
1028
- }), Vn = {
1031
+ render: Bn
1032
+ }), Hn = {
1029
1033
  viewBox: "0 0 24 24",
1030
1034
  width: "1.2em",
1031
1035
  height: "1.2em"
1032
1036
  };
1033
- function Hn(e, t) {
1034
- return S(), o("svg", Vn, [...t[0] ||= [s("path", {
1037
+ function Un(e, t) {
1038
+ return S(), o("svg", Hn, [...t[0] ||= [s("path", {
1035
1039
  fill: "none",
1036
1040
  stroke: "currentColor",
1037
1041
  "stroke-linecap": "round",
@@ -1040,16 +1044,16 @@ function Hn(e, t) {
1040
1044
  d: "m18 10l-6-6l-6 6zm0 4l-6 6l-6-6z"
1041
1045
  }, null, -1)]]);
1042
1046
  }
1043
- var Un = m({
1047
+ var Wn = m({
1044
1048
  name: "tabler-caret-up-down",
1045
- render: Hn
1046
- }), Wn = {
1049
+ render: Un
1050
+ }), Gn = {
1047
1051
  viewBox: "0 0 24 24",
1048
1052
  width: "1.2em",
1049
1053
  height: "1.2em"
1050
1054
  };
1051
- function Gn(e, t) {
1052
- return S(), o("svg", Wn, [...t[0] ||= [s("path", {
1055
+ function Kn(e, t) {
1056
+ return S(), o("svg", Gn, [...t[0] ||= [s("path", {
1053
1057
  fill: "none",
1054
1058
  stroke: "currentColor",
1055
1059
  "stroke-linecap": "round",
@@ -1058,34 +1062,34 @@ function Gn(e, t) {
1058
1062
  d: "M8 4H5v16h3m8-16h3v16h-3"
1059
1063
  }, null, -1)]]);
1060
1064
  }
1061
- var Kn = m({
1065
+ var qn = m({
1062
1066
  name: "tabler-brackets",
1063
- render: Gn
1067
+ render: Kn
1064
1068
  });
1065
1069
  //#endregion
1066
1070
  //#region src/debug/canvasProfiler.ts
1067
- function qn() {
1071
+ function Jn() {
1068
1072
  return Object.create(null);
1069
1073
  }
1070
- function Jn() {
1074
+ function Yn() {
1071
1075
  return {
1072
- ctxMethods: qn(),
1073
- ctxProps: qn(),
1074
- canvasProps: qn(),
1076
+ ctxMethods: Jn(),
1077
+ ctxProps: Jn(),
1078
+ canvasProps: Jn(),
1075
1079
  ctxMethodSources: Object.create(null)
1076
1080
  };
1077
1081
  }
1078
- function Yn(e, t, n) {
1082
+ function Xn(e, t, n) {
1079
1083
  let r = e[t] ??= {
1080
1084
  count: 0,
1081
1085
  totalTime: 0
1082
1086
  };
1083
1087
  r.count += 1, r.totalTime += n;
1084
1088
  }
1085
- function Xn(e, t, n, r) {
1086
- Yn(e.ctxMethodSources[t] ??= qn(), n, r);
1089
+ function Zn(e, t, n, r) {
1090
+ Xn(e.ctxMethodSources[t] ??= Jn(), n, r);
1087
1091
  }
1088
- function Zn(e) {
1092
+ function Qn(e) {
1089
1093
  return Object.entries(e).filter(([, e]) => e.count > 0).map(([e, t]) => ({
1090
1094
  name: e,
1091
1095
  count: t.count,
@@ -1093,12 +1097,12 @@ function Zn(e) {
1093
1097
  averageTime: (t.totalTime / t.count).toFixed(4)
1094
1098
  })).sort((e, t) => Number(t.totalTime) - Number(e.totalTime));
1095
1099
  }
1096
- var Qn = !1, $n = /* @__PURE__ */ new Map(), er = /* @__PURE__ */ new Map();
1097
- function tr(e) {
1098
- Qn = e, e ? typeof window < "u" && !window.__KMAP_CANVAS_PROFILER_INSTALLED__ && ir() : ar();
1100
+ var $n = !1, er = /* @__PURE__ */ new Map(), tr = /* @__PURE__ */ new Map();
1101
+ function nr(e) {
1102
+ $n = e, e ? typeof window < "u" && !window.__KMAP_CANVAS_PROFILER_INSTALLED__ && ar() : or();
1099
1103
  }
1100
- function nr() {
1101
- if (!Qn) return "disabled";
1104
+ function rr() {
1105
+ if (!$n) return "disabled";
1102
1106
  let e = (/* @__PURE__ */ Error()).stack;
1103
1107
  if (!e) return "unknown";
1104
1108
  let t = e.split("\n").map((e) => e.trim()).filter(Boolean);
@@ -1113,82 +1117,82 @@ function nr() {
1113
1117
  }
1114
1118
  function Q(e, t, n, r) {
1115
1119
  let i = `${e.constructor?.name ?? "proto"}:${t}`;
1116
- if ($n.has(i)) return;
1120
+ if (er.has(i)) return;
1117
1121
  let a = Reflect.get(e, t);
1118
- typeof a == "function" && ($n.set(i, a), Reflect.set(e, t, function(...e) {
1119
- if (!Qn) return a.apply(this, e);
1120
- let i = r?.captureSource ? nr() : null, o = performance.now(), s = a.apply(this, e), c = performance.now() - o;
1121
- return Yn(n.ctxMethods, t, c), i && Xn(n, t, i, c), s;
1122
+ typeof a == "function" && (er.set(i, a), Reflect.set(e, t, function(...e) {
1123
+ if (!$n) return a.apply(this, e);
1124
+ let i = r?.captureSource ? rr() : null, o = performance.now(), s = a.apply(this, e), c = performance.now() - o;
1125
+ return Xn(n.ctxMethods, t, c), i && Zn(n, t, i, c), s;
1122
1126
  }));
1123
1127
  }
1124
- function rr(e, t, n) {
1128
+ function ir(e, t, n) {
1125
1129
  let r = Object.getOwnPropertyDescriptor(e, t);
1126
1130
  if (!r?.set || !r.configurable) return;
1127
1131
  let i = `${e.constructor?.name ?? "proto"}:${t}`;
1128
- er.has(i) || (er.set(i, r), Object.defineProperty(e, t, {
1132
+ tr.has(i) || (tr.set(i, r), Object.defineProperty(e, t, {
1129
1133
  configurable: !0,
1130
1134
  enumerable: r.enumerable ?? !1,
1131
1135
  get: r.get,
1132
1136
  set(e) {
1133
- if (!Qn) {
1137
+ if (!$n) {
1134
1138
  r.set.call(this, e);
1135
1139
  return;
1136
1140
  }
1137
1141
  let i = performance.now();
1138
- r.set.call(this, e), Yn(n, t, performance.now() - i);
1142
+ r.set.call(this, e), Xn(n, t, performance.now() - i);
1139
1143
  }
1140
1144
  }));
1141
1145
  }
1142
- function ir() {
1146
+ function ar() {
1143
1147
  if (typeof window > "u" || window.__KMAP_CANVAS_PROFILER_INSTALLED__) return;
1144
1148
  let e = CanvasRenderingContext2D?.prototype, t = HTMLCanvasElement?.prototype;
1145
1149
  if (!e || !t) return;
1146
- let n = Jn();
1147
- Q(e, "fillText", n, { captureSource: !0 }), Q(e, "measureText", n, { captureSource: !0 }), Q(e, "drawImage", n), Q(e, "save", n), Q(e, "restore", n), Q(e, "clip", n), Q(e, "setTransform", n), Q(e, "scale", n), rr(e, "font", n.ctxProps), rr(e, "filter", n.ctxProps), rr(e, "shadowBlur", n.ctxProps), rr(e, "lineWidth", n.ctxProps), rr(t, "width", n.canvasProps), rr(t, "height", n.canvasProps), window.__KMAP_CANVAS_PROFILER_METRICS__ = n, window.__KMAP_CANVAS_PROFILER_INSTALLED__ = !0, window.showCanvasReport = () => {
1150
+ let n = Yn();
1151
+ Q(e, "fillText", n, { captureSource: !0 }), Q(e, "measureText", n, { captureSource: !0 }), Q(e, "drawImage", n), Q(e, "save", n), Q(e, "restore", n), Q(e, "clip", n), Q(e, "setTransform", n), Q(e, "scale", n), ir(e, "font", n.ctxProps), ir(e, "filter", n.ctxProps), ir(e, "shadowBlur", n.ctxProps), ir(e, "lineWidth", n.ctxProps), ir(t, "width", n.canvasProps), ir(t, "height", n.canvasProps), window.__KMAP_CANVAS_PROFILER_METRICS__ = n, window.__KMAP_CANVAS_PROFILER_INSTALLED__ = !0, window.showCanvasReport = () => {
1148
1152
  let e = window.__KMAP_CANVAS_PROFILER_METRICS__;
1149
1153
  if (e) {
1150
- console.group("[kmap] Canvas profiler report"), console.log("ctx methods"), console.table(Zn(e.ctxMethods)), console.log("ctx props"), console.table(Zn(e.ctxProps)), console.log("canvas props"), console.table(Zn(e.canvasProps));
1154
+ console.group("[kmap] Canvas profiler report"), console.log("ctx methods"), console.table(Qn(e.ctxMethods)), console.log("ctx props"), console.table(Qn(e.ctxProps)), console.log("canvas props"), console.table(Qn(e.canvasProps));
1151
1155
  for (let t of ["fillText", "measureText"]) {
1152
1156
  let n = e.ctxMethodSources[t];
1153
- n && (console.log(`${t} sources`), console.table(Zn(n).slice(0, 20)));
1157
+ n && (console.log(`${t} sources`), console.table(Qn(n).slice(0, 20)));
1154
1158
  }
1155
1159
  console.groupEnd();
1156
1160
  }
1157
1161
  }, window.resetCanvasReport = () => {
1158
- window.__KMAP_CANVAS_PROFILER_METRICS__ = Jn();
1162
+ window.__KMAP_CANVAS_PROFILER_METRICS__ = Yn();
1159
1163
  }, console.info("[kmap] Canvas profiler enabled. Use window.showCanvasReport() and window.resetCanvasReport().");
1160
1164
  }
1161
- function ar() {
1165
+ function or() {
1162
1166
  if (typeof window > "u" || !window.__KMAP_CANVAS_PROFILER_INSTALLED__) return;
1163
1167
  let e = CanvasRenderingContext2D?.prototype, t = HTMLCanvasElement?.prototype;
1164
- $n.forEach((n, r) => {
1168
+ er.forEach((n, r) => {
1165
1169
  let i = r.match(/^(.+):(.+)$/);
1166
1170
  if (!i) return;
1167
1171
  let [, a, o] = i, s = null;
1168
1172
  a === "CanvasRenderingContext2D" ? s = e : a === "HTMLCanvasElement" && (s = t), s && Reflect.set(s, o, n);
1169
- }), $n.clear(), er.forEach((n, r) => {
1173
+ }), er.clear(), tr.forEach((n, r) => {
1170
1174
  let i = r.match(/^(.+):(.+)$/);
1171
1175
  if (!i) return;
1172
1176
  let [, a, o] = i, s = null;
1173
1177
  a === "CanvasRenderingContext2D" ? s = e : a === "HTMLCanvasElement" && (s = t), s && n.configurable && Object.defineProperty(s, o, n);
1174
- }), er.clear(), window.__KMAP_CANVAS_PROFILER_INSTALLED__ = !1, window.__KMAP_CANVAS_PROFILER_METRICS__ = void 0, window.showCanvasReport = void 0, window.resetCanvasReport = void 0, console.info("[kmap] Canvas profiler disabled.");
1178
+ }), tr.clear(), window.__KMAP_CANVAS_PROFILER_INSTALLED__ = !1, window.__KMAP_CANVAS_PROFILER_METRICS__ = void 0, window.showCanvasReport = void 0, window.resetCanvasReport = void 0, console.info("[kmap] Canvas profiler disabled.");
1175
1179
  }
1176
1180
  //#endregion
1177
1181
  //#region src/components/ChartSettingsDialog.vue?vue&type=script&setup=true&lang.ts
1178
- var or = { class: "settings-body" }, sr = { class: "settings-label" }, cr = ["onUpdate:modelValue"], lr = { class: "settings-label" }, ur = ["onUpdate:modelValue"], dr = { class: "settings-label" }, fr = ["onUpdate:modelValue"], pr = { class: "settings-header" }, mr = { class: "header-right" }, hr = { class: "settings-body" }, gr = /*#__PURE__*/ W(/* @__PURE__ */ u({
1182
+ var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["onUpdate:modelValue"], ur = { class: "settings-label" }, dr = ["onUpdate:modelValue"], fr = { class: "settings-label" }, pr = ["onUpdate:modelValue"], mr = { class: "settings-header" }, hr = { class: "header-right" }, gr = { class: "settings-body" }, _r = /*#__PURE__*/ H(/* @__PURE__ */ u({
1179
1183
  __name: "ChartSettingsDialog",
1180
1184
  props: { show: { type: Boolean } },
1181
1185
  emits: ["close", "confirm"],
1182
1186
  setup(u, { emit: d }) {
1183
- let f = u, p = d, m = je(), h = r(() => B.filter((e) => e.group === "main")), g = r(() => B.filter((e) => e.group === "experimental")), _ = r(() => B.filter((e) => e.group === "style")), v = w(!1);
1187
+ let f = u, p = d, m = Ne(), h = r(() => B.filter((e) => e.group === "main")), g = r(() => B.filter((e) => e.group === "experimental")), _ = r(() => B.filter((e) => e.group === "style")), v = w(!1);
1184
1188
  function y() {
1185
1189
  try {
1186
- let e = localStorage.getItem(V);
1190
+ let e = localStorage.getItem(ge);
1187
1191
  if (e) {
1188
1192
  let t = JSON.parse(e), n = {};
1189
1193
  return B.forEach((e) => {
1190
1194
  n[e.key] = t[e.key] ?? e.default;
1191
- }), n.colorPresetSettings = ie(t.colorPresetSettings), n;
1195
+ }), n.colorPresetSettings = z(t.colorPresetSettings), n;
1192
1196
  }
1193
1197
  } catch {}
1194
1198
  let e = {};
@@ -1231,16 +1235,16 @@ var or = { class: "settings-body" }, sr = { class: "settings-label" }, cr = ["on
1231
1235
  stroke: "currentColor",
1232
1236
  "stroke-width": "2"
1233
1237
  }, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])])]),
1234
- s("div", or, [
1238
+ s("div", sr, [
1235
1239
  h.value.length > 0 ? (S(), o(e, { key: 0 }, [d[8] ||= s("div", { class: "settings-section-divider" }, [s("span", { class: "settings-section-label" }, "主图设置")], -1), (S(!0), o(e, null, T(h.value, (e) => (S(), o("div", {
1236
1240
  key: e.key,
1237
1241
  class: "settings-item"
1238
- }, [s("label", sr, [s("span", null, O(e.label), 1), e.type === "boolean" ? P((S(), o("input", {
1242
+ }, [s("label", cr, [s("span", null, O(e.label), 1), e.type === "boolean" ? P((S(), o("input", {
1239
1243
  key: 0,
1240
1244
  type: "checkbox",
1241
1245
  class: "settings-checkbox",
1242
1246
  "onUpdate:modelValue": (t) => b.value[e.key] = t
1243
- }, null, 8, cr)), [[A, b.value[e.key]]]) : e.type === "select" && e.options ? (S(), i(Te, {
1247
+ }, null, 8, lr)), [[A, b.value[e.key]]]) : e.type === "select" && e.options ? (S(), i(G, {
1244
1248
  key: 1,
1245
1249
  "model-value": String(b.value[e.key]),
1246
1250
  options: e.options,
@@ -1256,12 +1260,12 @@ var or = { class: "settings-body" }, sr = { class: "settings-label" }, cr = ["on
1256
1260
  (S(!0), o(e, null, T(_.value, (e) => (S(), o("div", {
1257
1261
  key: e.key,
1258
1262
  class: "settings-item"
1259
- }, [s("label", lr, [s("span", null, O(e.label), 1), e.type === "boolean" ? P((S(), o("input", {
1263
+ }, [s("label", ur, [s("span", null, O(e.label), 1), e.type === "boolean" ? P((S(), o("input", {
1260
1264
  key: 0,
1261
1265
  type: "checkbox",
1262
1266
  class: "settings-checkbox",
1263
1267
  "onUpdate:modelValue": (t) => b.value[e.key] = t
1264
- }, null, 8, ur)), [[A, b.value[e.key]]]) : e.type === "select" && e.options ? (S(), i(Te, {
1268
+ }, null, 8, dr)), [[A, b.value[e.key]]]) : e.type === "select" && e.options ? (S(), i(G, {
1265
1269
  key: 1,
1266
1270
  "model-value": String(b.value[e.key]),
1267
1271
  options: e.options,
@@ -1288,12 +1292,12 @@ var or = { class: "settings-body" }, sr = { class: "settings-label" }, cr = ["on
1288
1292
  g.value.length > 0 ? (S(), o(e, { key: 1 }, [d[10] ||= s("div", { class: "settings-section-divider" }, [s("span", { class: "settings-section-label" }, "实验性 / 调试设置")], -1), (S(!0), o(e, null, T(g.value, (e) => (S(), o("div", {
1289
1293
  key: e.key,
1290
1294
  class: "settings-item experimental"
1291
- }, [s("label", dr, [s("span", null, O(e.label), 1), e.type === "boolean" ? P((S(), o("input", {
1295
+ }, [s("label", fr, [s("span", null, O(e.label), 1), e.type === "boolean" ? P((S(), o("input", {
1292
1296
  key: 0,
1293
1297
  type: "checkbox",
1294
1298
  class: "settings-checkbox",
1295
1299
  "onUpdate:modelValue": (t) => b.value[e.key] = t
1296
- }, null, 8, fr)), [[A, b.value[e.key]]]) : e.type === "select" && e.options ? (S(), i(Te, {
1300
+ }, null, 8, pr)), [[A, b.value[e.key]]]) : e.type === "select" && e.options ? (S(), i(G, {
1297
1301
  key: 1,
1298
1302
  "model-value": String(b.value[e.key]),
1299
1303
  options: e.options,
@@ -1339,7 +1343,7 @@ var or = { class: "settings-body" }, sr = { class: "settings-label" }, cr = ["on
1339
1343
  default: N(() => [s("div", {
1340
1344
  class: "settings-modal",
1341
1345
  onClick: d[4] ||= I(() => {}, ["stop"])
1342
- }, [s("div", pr, [d[15] ||= s("div", { class: "header-left" }, [s("span", { class: "settings-title" }, "颜色预设"), s("span", { class: "settings-subtitle" }, "自定义图表颜色")], -1), s("div", mr, [s("button", {
1346
+ }, [s("div", mr, [d[15] ||= s("div", { class: "header-left" }, [s("span", { class: "settings-title" }, "颜色预设"), s("span", { class: "settings-subtitle" }, "自定义图表颜色")], -1), s("div", hr, [s("button", {
1343
1347
  class: "settings-close",
1344
1348
  onClick: d[2] ||= (e) => v.value = !1
1345
1349
  }, [...d[14] ||= [s("svg", {
@@ -1347,7 +1351,7 @@ var or = { class: "settings-body" }, sr = { class: "settings-label" }, cr = ["on
1347
1351
  fill: "none",
1348
1352
  stroke: "currentColor",
1349
1353
  "stroke-width": "2"
1350
- }, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])])]), s("div", hr, [l(be, {
1354
+ }, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])])]), s("div", gr, [l(Ce, {
1351
1355
  "color-preset-settings": b.value.colorPresetSettings,
1352
1356
  "onUpdate:colorPresetSettings": d[3] ||= (e) => b.value = {
1353
1357
  ...b.value,
@@ -1359,18 +1363,18 @@ var or = { class: "settings-body" }, sr = { class: "settings-label" }, cr = ["on
1359
1363
  _: 1
1360
1364
  })], 8, ["to"]));
1361
1365
  }
1362
- }), [["__scopeId", "data-v-e04604ac"]]), _r = {
1366
+ }), [["__scopeId", "data-v-e04604ac"]]), vr = {
1363
1367
  class: "left-toolbar",
1364
1368
  "aria-label": "图表工具栏"
1365
- }, vr = { class: "left-toolbar__group" }, yr = [
1369
+ }, yr = { class: "left-toolbar__group" }, br = [
1366
1370
  "title",
1367
1371
  "aria-label",
1368
1372
  "onClick"
1369
- ], br = ["onClick"], xr = [
1373
+ ], xr = ["onClick"], Sr = [
1370
1374
  "title",
1371
1375
  "aria-label",
1372
1376
  "onClick"
1373
- ], Sr = { class: "left-toolbar__group" }, Cr = { class: "left-toolbar__group" }, wr = ["title", "aria-label"], Tr = { class: "left-toolbar__group" }, Er = /*#__PURE__*/ W(/* @__PURE__ */ u({
1377
+ ], Cr = { class: "left-toolbar__group" }, wr = { class: "left-toolbar__group" }, Tr = ["title", "aria-label"], Er = { class: "left-toolbar__group" }, Dr = /*#__PURE__*/ H(/* @__PURE__ */ u({
1374
1378
  __name: "LeftToolbar",
1375
1379
  props: { isFullscreen: { type: Boolean } },
1376
1380
  emits: [
@@ -1385,81 +1389,81 @@ var or = { class: "settings-body" }, sr = { class: "settings-label" }, cr = ["on
1385
1389
  {
1386
1390
  id: "cursor",
1387
1391
  title: "光标",
1388
- icon: Zt
1392
+ icon: Qt
1389
1393
  },
1390
1394
  {
1391
1395
  id: "lines",
1392
1396
  title: "线条",
1393
- icon: en,
1397
+ icon: tn,
1394
1398
  children: [
1395
1399
  {
1396
1400
  id: "trend-line",
1397
1401
  title: "线段",
1398
- icon: en
1402
+ icon: tn
1399
1403
  },
1400
1404
  {
1401
1405
  id: "ray",
1402
1406
  title: "射线",
1403
- icon: rn
1407
+ icon: an
1404
1408
  },
1405
1409
  {
1406
1410
  id: "h-line",
1407
1411
  title: "水平线",
1408
- icon: un
1412
+ icon: dn
1409
1413
  },
1410
1414
  {
1411
1415
  id: "h-ray",
1412
1416
  title: "水平射线",
1413
- icon: sn
1417
+ icon: cn
1414
1418
  },
1415
1419
  {
1416
1420
  id: "v-line",
1417
1421
  title: "垂直线",
1418
- icon: pn
1422
+ icon: mn
1419
1423
  },
1420
1424
  {
1421
1425
  id: "crosshair-line",
1422
1426
  title: "十字线",
1423
- icon: gn
1427
+ icon: _n
1424
1428
  },
1425
1429
  {
1426
1430
  id: "info-line",
1427
1431
  title: "信息线",
1428
- icon: yn
1432
+ icon: bn
1429
1433
  }
1430
1434
  ]
1431
1435
  },
1432
1436
  {
1433
1437
  id: "channels",
1434
1438
  title: "通道",
1435
- icon: Ln,
1439
+ icon: Rn,
1436
1440
  children: [
1437
1441
  {
1438
1442
  id: "parallel-channel",
1439
1443
  title: "平行通道",
1440
- icon: Ln
1444
+ icon: Rn
1441
1445
  },
1442
1446
  {
1443
1447
  id: "regression-channel",
1444
1448
  title: "回归趋势",
1445
- icon: Bn
1449
+ icon: Vn
1446
1450
  },
1447
1451
  {
1448
1452
  id: "flat-line",
1449
1453
  title: "平滑顶底",
1450
- icon: Un
1454
+ icon: Wn
1451
1455
  },
1452
1456
  {
1453
1457
  id: "disjoint-channel",
1454
1458
  title: "不相交通道",
1455
- icon: Kn
1459
+ icon: qn
1456
1460
  }
1457
1461
  ]
1458
1462
  }
1459
1463
  ], d = c, f = w("cursor"), p = w(null), m = w(!1);
1460
1464
  function h() {
1461
1465
  try {
1462
- let e = localStorage.getItem(V);
1466
+ let e = localStorage.getItem(ge);
1463
1467
  if (e) {
1464
1468
  let t = JSON.parse(e), n = { ...t };
1465
1469
  return B.forEach((e) => {
@@ -1474,7 +1478,7 @@ var or = { class: "settings-body" }, sr = { class: "settings-label" }, cr = ["on
1474
1478
  }
1475
1479
  function _(e) {
1476
1480
  try {
1477
- localStorage.setItem(V, JSON.stringify(e));
1481
+ localStorage.setItem(ge, JSON.stringify(e));
1478
1482
  } catch {}
1479
1483
  }
1480
1484
  let v = w(h());
@@ -1506,17 +1510,17 @@ var or = { class: "settings-body" }, sr = { class: "settings-label" }, cr = ["on
1506
1510
  }
1507
1511
  r({ getSettings: j });
1508
1512
  function M(e) {
1509
- v.value = { ...e }, _(v.value), tr(!!v.value.enableCanvasProfiler), d("settingsChange", { ...v.value }), m.value = !1;
1513
+ v.value = { ...e }, _(v.value), nr(!!v.value.enableCanvasProfiler), d("settingsChange", { ...v.value }), m.value = !1;
1510
1514
  }
1511
1515
  function P(e) {
1512
1516
  e.target.closest(".tool-item") || (p.value = null);
1513
1517
  }
1514
1518
  return y(() => {
1515
- document.addEventListener("click", P, !0), d("settingsChange", { ...v.value }), tr(!!v.value.enableCanvasProfiler);
1519
+ document.addEventListener("click", P, !0), d("settingsChange", { ...v.value }), nr(!!v.value.enableCanvasProfiler);
1516
1520
  }), x(() => {
1517
1521
  document.removeEventListener("click", P, !0);
1518
- }), (r, c) => (S(), o(e, null, [s("nav", _r, [
1519
- s("div", vr, [(S(), o(e, null, T(u, (t) => s("div", {
1522
+ }), (r, c) => (S(), o(e, null, [s("nav", vr, [
1523
+ s("div", yr, [(S(), o(e, null, T(u, (t) => s("div", {
1520
1524
  key: t.id,
1521
1525
  class: "tool-item"
1522
1526
  }, [s("button", {
@@ -1536,7 +1540,7 @@ var or = { class: "settings-body" }, sr = { class: "settings-label" }, cr = ["on
1536
1540
  class: g(["corner-indicator", { open: p.value === t.id }]),
1537
1541
  onClick: I((e) => O(t.id), ["stop"]),
1538
1542
  "aria-label": "展开子菜单"
1539
- }, null, 10, br)) : a("", !0)], 42, yr), l(n, { name: "dropdown" }, {
1543
+ }, null, 10, xr)) : a("", !0)], 42, br), l(n, { name: "dropdown" }, {
1540
1544
  default: N(() => [p.value === t.id && t.children && t.children.length ? (S(), o("div", {
1541
1545
  key: 0,
1542
1546
  class: "tool-dropdown",
@@ -1553,11 +1557,11 @@ var or = { class: "settings-body" }, sr = { class: "settings-label" }, cr = ["on
1553
1557
  }, [(S(), i(E(e.icon), {
1554
1558
  class: "tool-icon",
1555
1559
  "aria-hidden": "true"
1556
- }))], 10, xr))), 128))], 32)) : a("", !0)]),
1560
+ }))], 10, Sr))), 128))], 32)) : a("", !0)]),
1557
1561
  _: 2
1558
1562
  }, 1024)])), 64))]),
1559
1563
  c[22] ||= s("span", { class: "left-toolbar__divider" }, null, -1),
1560
- s("div", Sr, [s("button", {
1564
+ s("div", Cr, [s("button", {
1561
1565
  type: "button",
1562
1566
  class: "left-toolbar__button",
1563
1567
  title: "放大",
@@ -1566,7 +1570,7 @@ var or = { class: "settings-body" }, sr = { class: "settings-label" }, cr = ["on
1566
1570
  onPointerdown: c[7] ||= I(() => {}, ["stop"]),
1567
1571
  onPointermove: c[8] ||= I(() => {}, ["stop"]),
1568
1572
  onPointerup: c[9] ||= I(() => {}, ["stop"])
1569
- }, [l(k(Sn), {
1573
+ }, [l(k(Cn), {
1570
1574
  class: "tool-icon",
1571
1575
  "aria-hidden": "true"
1572
1576
  })], 32), s("button", {
@@ -1578,12 +1582,12 @@ var or = { class: "settings-body" }, sr = { class: "settings-label" }, cr = ["on
1578
1582
  onPointerdown: c[11] ||= I(() => {}, ["stop"]),
1579
1583
  onPointermove: c[12] ||= I(() => {}, ["stop"]),
1580
1584
  onPointerup: c[13] ||= I(() => {}, ["stop"])
1581
- }, [l(k(Tn), {
1585
+ }, [l(k(En), {
1582
1586
  class: "tool-icon",
1583
1587
  "aria-hidden": "true"
1584
1588
  })], 32)]),
1585
1589
  c[23] ||= s("span", { class: "left-toolbar__divider" }, null, -1),
1586
- s("div", Cr, [s("button", {
1590
+ s("div", wr, [s("button", {
1587
1591
  type: "button",
1588
1592
  class: "left-toolbar__button",
1589
1593
  title: t.isFullscreen ? "退出全屏" : "全屏显示",
@@ -1592,17 +1596,17 @@ var or = { class: "settings-body" }, sr = { class: "settings-label" }, cr = ["on
1592
1596
  onPointerdown: c[15] ||= I(() => {}, ["stop"]),
1593
1597
  onPointermove: c[16] ||= I(() => {}, ["stop"]),
1594
1598
  onPointerup: c[17] ||= I(() => {}, ["stop"])
1595
- }, [t.isFullscreen ? (S(), i(k(jn), {
1599
+ }, [t.isFullscreen ? (S(), i(k(Mn), {
1596
1600
  key: 0,
1597
1601
  class: "tool-icon",
1598
1602
  "aria-hidden": "true"
1599
- })) : (S(), i(k(On), {
1603
+ })) : (S(), i(k(kn), {
1600
1604
  key: 1,
1601
1605
  class: "tool-icon",
1602
1606
  "aria-hidden": "true"
1603
- }))], 40, wr)]),
1607
+ }))], 40, Tr)]),
1604
1608
  c[24] ||= s("span", { class: "left-toolbar__divider" }, null, -1),
1605
- s("div", Tr, [s("button", {
1609
+ s("div", Er, [s("button", {
1606
1610
  type: "button",
1607
1611
  class: "left-toolbar__button",
1608
1612
  title: "设置",
@@ -1611,22 +1615,26 @@ var or = { class: "settings-body" }, sr = { class: "settings-label" }, cr = ["on
1611
1615
  onPointerdown: c[18] ||= I(() => {}, ["stop"]),
1612
1616
  onPointermove: c[19] ||= I(() => {}, ["stop"]),
1613
1617
  onPointerup: c[20] ||= I(() => {}, ["stop"])
1614
- }, [l(k(Pn), {
1618
+ }, [l(k(Fn), {
1615
1619
  class: "tool-icon",
1616
1620
  "aria-hidden": "true"
1617
1621
  })], 32)])
1618
- ]), l(gr, {
1622
+ ]), l(_r, {
1619
1623
  show: m.value,
1620
1624
  onClose: c[21] ||= (e) => m.value = !1,
1621
1625
  onConfirm: M
1622
1626
  }, null, 8, ["show"])], 64));
1623
1627
  }
1624
- }), [["__scopeId", "data-v-66411b58"]]), Dr = /* @__PURE__ */ u({
1628
+ }), [["__scopeId", "data-v-66411b58"]]), Or = /* @__PURE__ */ u({
1625
1629
  __name: "KLineLevelDropdown",
1626
1630
  props: { modelValue: {} },
1627
1631
  emits: ["update:modelValue"],
1628
1632
  setup(e, { emit: t }) {
1629
1633
  let n = [
1634
+ {
1635
+ label: "1day",
1636
+ value: "daily"
1637
+ },
1630
1638
  {
1631
1639
  label: "1min",
1632
1640
  value: "1min"
@@ -1664,7 +1672,7 @@ var or = { class: "settings-body" }, sr = { class: "settings-label" }, cr = ["on
1664
1672
  value: "yearly"
1665
1673
  }
1666
1674
  ], r = t;
1667
- return (t, a) => (S(), i(Te, {
1675
+ return (t, a) => (S(), i(G, {
1668
1676
  "model-value": e.modelValue,
1669
1677
  options: n,
1670
1678
  label: "级别",
@@ -1673,13 +1681,45 @@ var or = { class: "settings-body" }, sr = { class: "settings-label" }, cr = ["on
1673
1681
  "onUpdate:modelValue": a[0] ||= (e) => r("update:modelValue", e)
1674
1682
  }, null, 8, ["model-value"]));
1675
1683
  }
1676
- }), Or = {
1684
+ }), kr = /* @__PURE__ */ u({
1685
+ __name: "KLineAdjustmentDropdown",
1686
+ props: { modelValue: {} },
1687
+ emits: ["update:modelValue"],
1688
+ setup(e, { emit: t }) {
1689
+ let n = [
1690
+ {
1691
+ label: "前复权",
1692
+ value: "qfq"
1693
+ },
1694
+ {
1695
+ label: "后复权",
1696
+ value: "hfq"
1697
+ },
1698
+ {
1699
+ label: "仅拆股",
1700
+ value: "splits"
1701
+ },
1702
+ {
1703
+ label: "不复权",
1704
+ value: "none"
1705
+ }
1706
+ ], r = t;
1707
+ return (t, a) => (S(), i(G, {
1708
+ "model-value": e.modelValue,
1709
+ options: n,
1710
+ label: "复权",
1711
+ title: "复权方式",
1712
+ size: "md",
1713
+ "onUpdate:modelValue": a[0] ||= (e) => r("update:modelValue", e)
1714
+ }, null, 8, ["model-value"]));
1715
+ }
1716
+ }), Ar = {
1677
1717
  viewBox: "0 0 24 24",
1678
1718
  width: "1.2em",
1679
1719
  height: "1.2em"
1680
1720
  };
1681
- function kr(e, t) {
1682
- return S(), o("svg", Or, [...t[0] ||= [s("path", {
1721
+ function jr(e, t) {
1722
+ return S(), o("svg", Ar, [...t[0] ||= [s("path", {
1683
1723
  fill: "none",
1684
1724
  stroke: "currentColor",
1685
1725
  "stroke-linecap": "round",
@@ -1688,26 +1728,26 @@ function kr(e, t) {
1688
1728
  d: "M12 9v4m-1.637-9.409L2.257 17.125a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636-2.87L13.637 3.59a1.914 1.914 0 0 0-3.274 0M12 16h.01"
1689
1729
  }, null, -1)]]);
1690
1730
  }
1691
- var Ar = m({
1731
+ var Mr = m({
1692
1732
  name: "tabler-alert-triangle",
1693
- render: kr
1694
- }), jr = ["title", "aria-expanded"], Mr = { class: "symbol-chip__code" }, Nr = {
1733
+ render: jr
1734
+ }), Nr = ["title", "aria-expanded"], Pr = { class: "symbol-chip__code" }, Fr = {
1695
1735
  key: 0,
1696
1736
  class: "symbol-chip__spinner",
1697
1737
  "aria-hidden": "true"
1698
- }, Pr = {
1738
+ }, Ir = {
1699
1739
  key: 0,
1700
1740
  class: "symbol-popover",
1701
1741
  role: "dialog",
1702
1742
  "aria-label": "切换合约"
1703
- }, Fr = { class: "symbol-search" }, Ir = {
1743
+ }, Lr = { class: "symbol-search" }, Rr = {
1704
1744
  class: "symbol-list",
1705
1745
  role: "listbox",
1706
1746
  "aria-label": "商品列表"
1707
- }, Lr = {
1747
+ }, zr = {
1708
1748
  key: 0,
1709
1749
  class: "symbol-list__empty"
1710
- }, Rr = {
1750
+ }, Br = {
1711
1751
  width: "32",
1712
1752
  height: "32",
1713
1753
  viewBox: "0 0 32 32",
@@ -1716,7 +1756,7 @@ var Ar = m({
1716
1756
  "margin-bottom": "8px",
1717
1757
  opacity: "0.35"
1718
1758
  }
1719
- }, zr = ["aria-selected", "onClick"], Br = { class: "symbol-list__left" }, Vr = { class: "symbol-list__code" }, Hr = { class: "symbol-list__desc" }, Ur = { class: "symbol-list__exchange" }, Wr = /*#__PURE__*/ W(/* @__PURE__ */ u({
1759
+ }, Vr = ["aria-selected", "onClick"], Hr = { class: "symbol-list__left" }, Ur = { class: "symbol-list__code" }, Wr = { class: "symbol-list__desc" }, Gr = { class: "symbol-list__exchange" }, Kr = /*#__PURE__*/ H(/* @__PURE__ */ u({
1720
1760
  __name: "SymbolSelector",
1721
1761
  props: {
1722
1762
  symbol: {},
@@ -1726,24 +1766,27 @@ var Ar = m({
1726
1766
  },
1727
1767
  emits: ["change"],
1728
1768
  setup(t, { emit: c }) {
1729
- let u = t, d = c, f = w(!1), p = w(""), m = w(null), _ = w(null), b = r(() => {
1769
+ let u = t, d = c, f = w(!1), p = w(""), m = w(null), _ = w(null), b = r(() => u.symbols.find((e) => e.code === u.symbol)), x = r(() => {
1770
+ let e = b.value;
1771
+ return e ? `${e.code} - ${e.description}` : u.symbol;
1772
+ }), C = r(() => {
1730
1773
  let e = p.value.trim().toLowerCase();
1731
1774
  return e ? u.symbols.filter((t) => t.code.toLowerCase().includes(e) || t.description.toLowerCase().includes(e) || t.exchange.toLowerCase().includes(e)) : u.symbols;
1732
1775
  });
1733
- function x() {
1776
+ function E() {
1734
1777
  f.value = !f.value, f.value && h(() => m.value?.focus());
1735
1778
  }
1736
- function C() {
1779
+ function D() {
1737
1780
  p.value = "", m.value?.focus();
1738
1781
  }
1739
- function E() {}
1740
- function D(e) {
1782
+ function A() {}
1783
+ function F(e) {
1741
1784
  d("change", e), f.value = !1, p.value = "";
1742
1785
  }
1743
- function A(e) {
1786
+ function I(e) {
1744
1787
  _.value && !_.value.contains(e.target) && (f.value = !1);
1745
1788
  }
1746
- return y(() => document.addEventListener("mousedown", A)), v(() => document.removeEventListener("mousedown", A)), M(() => u.symbol, () => {
1789
+ return y(() => document.addEventListener("mousedown", I)), v(() => document.removeEventListener("mousedown", I)), M(() => u.symbol, () => {
1747
1790
  f.value = !1, p.value = "";
1748
1791
  }), (r, c) => (S(), o("div", {
1749
1792
  ref_key: "chipWrapRef",
@@ -1752,16 +1795,16 @@ var Ar = m({
1752
1795
  }, [s("button", {
1753
1796
  type: "button",
1754
1797
  class: g(["symbol-chip", { "is-open": f.value }]),
1755
- title: t.symbol,
1798
+ title: x.value,
1756
1799
  "aria-expanded": f.value,
1757
1800
  "aria-haspopup": "dialog",
1758
- onClick: x
1759
- }, [s("span", Mr, O(t.symbol), 1), t.loading ? (S(), o("span", Nr)) : t.error ? (S(), i(k(Ar), {
1801
+ onClick: E
1802
+ }, [s("span", Pr, O(x.value), 1), t.loading ? (S(), o("span", Fr)) : t.error ? (S(), i(k(Mr), {
1760
1803
  key: 1,
1761
1804
  class: "symbol-chip__warn",
1762
1805
  "aria-hidden": "true"
1763
- })) : a("", !0)], 10, jr), l(n, { name: "symbol-popover" }, {
1764
- default: N(() => [f.value ? (S(), o("div", Pr, [s("div", Fr, [
1806
+ })) : a("", !0)], 10, Nr), l(n, { name: "symbol-popover" }, {
1807
+ default: N(() => [f.value ? (S(), o("div", Ir, [s("div", Lr, [
1765
1808
  c[2] ||= s("span", {
1766
1809
  class: "symbol-search__icon",
1767
1810
  "aria-hidden": "true"
@@ -1795,14 +1838,14 @@ var Ar = m({
1795
1838
  autocomplete: "off",
1796
1839
  spellcheck: "false",
1797
1840
  "aria-label": "搜索商品",
1798
- onInput: E
1841
+ onInput: A
1799
1842
  }, null, 544), [[j, p.value]]),
1800
1843
  p.value ? (S(), o("button", {
1801
1844
  key: 0,
1802
1845
  type: "button",
1803
1846
  class: "symbol-search__clear",
1804
1847
  "aria-label": "清空搜索",
1805
- onClick: C
1848
+ onClick: D
1806
1849
  }, [...c[1] ||= [s("svg", {
1807
1850
  class: "delete-icon",
1808
1851
  viewBox: "0 0 24 24",
@@ -1817,7 +1860,7 @@ var Ar = m({
1817
1860
  s("path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" }),
1818
1861
  s("path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" })
1819
1862
  ], -1)]])) : a("", !0)
1820
- ]), s("div", Ir, [b.value.length === 0 ? (S(), o("div", Lr, [(S(), o("svg", Rr, [...c[3] ||= [s("circle", {
1863
+ ]), s("div", Rr, [C.value.length === 0 ? (S(), o("div", zr, [(S(), o("svg", Br, [...c[3] ||= [s("circle", {
1821
1864
  cx: "13",
1822
1865
  cy: "13",
1823
1866
  r: "10",
@@ -1831,36 +1874,39 @@ var Ar = m({
1831
1874
  stroke: "currentColor",
1832
1875
  "stroke-width": "2",
1833
1876
  "stroke-linecap": "round"
1834
- }, null, -1)]])), c[4] ||= s("span", null, "未找到相关商品", -1)])) : a("", !0), (S(!0), o(e, null, T(b.value, (e) => (S(), o("button", {
1877
+ }, null, -1)]])), c[4] ||= s("span", null, "未找到相关商品", -1)])) : a("", !0), (S(!0), o(e, null, T(C.value, (e) => (S(), o("button", {
1835
1878
  key: e.code,
1836
1879
  type: "button",
1837
1880
  class: g(["symbol-list__item", { "is-active": e.code === t.symbol }]),
1838
1881
  role: "option",
1839
1882
  "aria-selected": e.code === t.symbol,
1840
- onClick: (t) => D(e)
1841
- }, [s("span", Br, [s("span", Vr, O(e.code), 1), s("span", Hr, O(e.description), 1)]), s("span", Ur, O(e.exchange), 1)], 10, zr))), 128))])])) : a("", !0)]),
1883
+ onClick: (t) => F(e)
1884
+ }, [s("span", Hr, [s("span", Ur, O(e.code), 1), s("span", Wr, O(e.description), 1)]), s("span", Gr, O(e.exchange), 1)], 10, Vr))), 128))])])) : a("", !0)]),
1842
1885
  _: 1
1843
1886
  })], 512));
1844
1887
  }
1845
- }), [["__scopeId", "data-v-e22f59e1"]]), Gr = ["aria-expanded"], Kr = {
1888
+ }), [["__scopeId", "data-v-864e9451"]]), qr = ["aria-expanded"], Jr = {
1846
1889
  key: 0,
1890
+ class: "compare-chip__spinner"
1891
+ }, Yr = {
1892
+ key: 1,
1847
1893
  class: "compare-chip__badge"
1848
- }, qr = {
1894
+ }, Xr = {
1849
1895
  key: 0,
1850
1896
  class: "compare-popover",
1851
1897
  role: "dialog",
1852
1898
  "aria-label": "比较商品"
1853
- }, Jr = { class: "compare-search" }, Yr = {
1899
+ }, Zr = { class: "compare-search" }, Qr = {
1854
1900
  key: 0,
1855
1901
  class: "compare-selected"
1856
- }, Xr = { class: "compare-selected__list" }, Zr = { class: "compare-selected__code" }, Qr = { class: "compare-selected__desc" }, $r = ["aria-label", "onClick"], ei = {
1902
+ }, $r = { class: "compare-selected__list" }, ei = { class: "compare-selected__code" }, ti = { class: "compare-selected__desc" }, ni = ["aria-label", "onClick"], ri = {
1857
1903
  class: "compare-list",
1858
1904
  role: "listbox",
1859
1905
  "aria-label": "商品列表"
1860
- }, ti = {
1906
+ }, ii = {
1861
1907
  key: 0,
1862
1908
  class: "compare-list__empty"
1863
- }, ni = {
1909
+ }, ai = {
1864
1910
  width: "32",
1865
1911
  height: "32",
1866
1912
  viewBox: "0 0 32 32",
@@ -1869,44 +1915,46 @@ var Ar = m({
1869
1915
  "margin-bottom": "8px",
1870
1916
  opacity: "0.35"
1871
1917
  }
1872
- }, ri = ["aria-selected", "onClick"], ii = { class: "compare-list__left" }, ai = { class: "compare-list__code" }, oi = { class: "compare-list__desc" }, si = { class: "compare-list__right" }, ci = { class: "compare-list__exchange" }, li = {
1918
+ }, oi = ["aria-selected", "onClick"], si = { class: "compare-list__left" }, ci = { class: "compare-list__code" }, li = { class: "compare-list__desc" }, ui = { class: "compare-list__right" }, di = { class: "compare-list__exchange" }, fi = {
1873
1919
  key: 0,
1874
1920
  class: "compare-list__check",
1875
1921
  "aria-hidden": "true"
1876
- }, ui = /*#__PURE__*/ W(/* @__PURE__ */ u({
1922
+ }, pi = /*#__PURE__*/ H(/* @__PURE__ */ u({
1877
1923
  __name: "CompareSymbolSelector",
1878
1924
  props: {
1879
1925
  symbols: {},
1880
- selected: { default: () => [] }
1926
+ selected: { default: () => [] },
1927
+ comparisonColors: {},
1928
+ comparisonLoading: { type: Boolean }
1881
1929
  },
1882
1930
  emits: ["add", "remove"],
1883
1931
  setup(t, { emit: i }) {
1884
- let c = t, u = i, d = w(!1), f = w(""), p = w(null), m = w(null), _ = r(() => new Set(c.selected ?? [])), b = r(() => {
1885
- let e = _.value;
1932
+ let c = t, u = i, d = w(!1), f = w(""), p = w(null), m = w(null), b = r(() => new Set(c.selected ?? [])), x = r(() => {
1933
+ let e = b.value;
1886
1934
  return c.symbols.filter((t) => e.has(t.code));
1887
- }), x = r(() => {
1935
+ }), C = r(() => {
1888
1936
  let e = f.value.trim().toLowerCase();
1889
1937
  return e ? c.symbols.filter((t) => t.code.toLowerCase().includes(e) || t.description.toLowerCase().includes(e) || t.exchange.toLowerCase().includes(e)) : c.symbols;
1890
1938
  });
1891
- function C(e) {
1892
- return _.value.has(e);
1893
- }
1894
1939
  function E(e) {
1895
- C(e.code) ? u("remove", e.code) : u("add", e);
1940
+ return b.value.has(e);
1896
1941
  }
1897
1942
  function D(e) {
1943
+ E(e.code) ? u("remove", e.code) : u("add", e);
1944
+ }
1945
+ function k(e) {
1898
1946
  u("remove", e);
1899
1947
  }
1900
- function k() {
1948
+ function A() {
1901
1949
  d.value = !d.value, d.value && h(() => p.value?.focus());
1902
1950
  }
1903
- function A() {
1951
+ function M() {
1904
1952
  f.value = "", p.value?.focus();
1905
1953
  }
1906
- function M(e) {
1954
+ function F(e) {
1907
1955
  m.value && !m.value.contains(e.target) && (d.value = !1, f.value = "");
1908
1956
  }
1909
- return y(() => document.addEventListener("mousedown", M)), v(() => document.removeEventListener("mousedown", M)), (r, i) => (S(), o("div", {
1957
+ return y(() => document.addEventListener("mousedown", F)), v(() => document.removeEventListener("mousedown", F)), (r, i) => (S(), o("div", {
1910
1958
  ref_key: "rootRef",
1911
1959
  ref: m,
1912
1960
  class: "compare-chip-wrap"
@@ -1916,17 +1964,18 @@ var Ar = m({
1916
1964
  title: "比较商品",
1917
1965
  "aria-expanded": d.value,
1918
1966
  "aria-haspopup": "dialog",
1919
- onClick: k
1967
+ onClick: A
1920
1968
  }, [
1921
1969
  i[1] ||= s("span", {
1922
1970
  class: "compare-chip__icon",
1923
1971
  "aria-hidden": "true"
1924
1972
  }, "+", -1),
1925
1973
  i[2] ||= s("span", { class: "compare-chip__text" }, "比较商品", -1),
1926
- t.selected.length > 0 ? (S(), o("span", Kr, O(t.selected.length), 1)) : a("", !0)
1927
- ], 10, Gr), l(n, { name: "symbol-popover" }, {
1928
- default: N(() => [d.value ? (S(), o("div", qr, [
1929
- s("div", Jr, [
1974
+ t.comparisonLoading ? (S(), o("span", Jr)) : a("", !0),
1975
+ t.selected.length > 0 ? (S(), o("span", Yr, O(t.selected.length), 1)) : a("", !0)
1976
+ ], 10, qr), l(n, { name: "symbol-popover" }, {
1977
+ default: N(() => [d.value ? (S(), o("div", Xr, [
1978
+ s("div", Zr, [
1930
1979
  i[4] ||= s("span", {
1931
1980
  class: "compare-search__icon",
1932
1981
  "aria-hidden": "true"
@@ -1966,7 +2015,7 @@ var Ar = m({
1966
2015
  type: "button",
1967
2016
  class: "compare-search__clear",
1968
2017
  "aria-label": "清空搜索",
1969
- onClick: A
2018
+ onClick: M
1970
2019
  }, [...i[3] ||= [s("svg", {
1971
2020
  class: "delete-icon",
1972
2021
  viewBox: "0 0 24 24",
@@ -1982,17 +2031,21 @@ var Ar = m({
1982
2031
  s("path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" })
1983
2032
  ], -1)]])) : a("", !0)
1984
2033
  ]),
1985
- t.selected.length > 0 ? (S(), o("div", Yr, [i[6] ||= s("div", { class: "compare-selected__header" }, [s("span", { class: "compare-selected__title" }, "已添加商品")], -1), s("div", Xr, [(S(!0), o(e, null, T(b.value, (e) => (S(), o("div", {
2034
+ t.selected.length > 0 ? (S(), o("div", Qr, [i[6] ||= s("div", { class: "compare-selected__header" }, [s("span", { class: "compare-selected__title" }, "已添加商品")], -1), s("div", $r, [(S(!0), o(e, null, T(x.value, (e) => (S(), o("div", {
1986
2035
  key: e.code,
1987
2036
  class: "compare-selected__item"
1988
2037
  }, [
1989
- s("span", Zr, O(e.code), 1),
1990
- s("span", Qr, O(e.description), 1),
2038
+ s("span", {
2039
+ class: "compare-selected__color",
2040
+ style: _({ background: t.comparisonColors?.get(e.code) ?? "#888" })
2041
+ }, null, 4),
2042
+ s("span", ei, O(e.code), 1),
2043
+ s("span", ti, O(e.description), 1),
1991
2044
  s("button", {
1992
2045
  type: "button",
1993
2046
  class: "compare-selected__remove",
1994
2047
  "aria-label": "移除 " + e.code,
1995
- onClick: (t) => D(e.code)
2048
+ onClick: (t) => k(e.code)
1996
2049
  }, [...i[5] ||= [s("svg", {
1997
2050
  viewBox: "0 0 24 24",
1998
2051
  width: "12",
@@ -2002,9 +2055,9 @@ var Ar = m({
2002
2055
  "stroke-width": "2",
2003
2056
  "stroke-linecap": "round",
2004
2057
  "stroke-linejoin": "round"
2005
- }, [s("path", { d: "M18 6L6 18" }), s("path", { d: "M6 6l12 12" })], -1)]], 8, $r)
2058
+ }, [s("path", { d: "M18 6L6 18" }), s("path", { d: "M6 6l12 12" })], -1)]], 8, ni)
2006
2059
  ]))), 128))])])) : a("", !0),
2007
- s("div", ei, [x.value.length === 0 ? (S(), o("div", ti, [(S(), o("svg", ni, [...i[7] ||= [s("circle", {
2060
+ s("div", ri, [C.value.length === 0 ? (S(), o("div", ii, [(S(), o("svg", ai, [...i[7] ||= [s("circle", {
2008
2061
  cx: "13",
2009
2062
  cy: "13",
2010
2063
  r: "10",
@@ -2018,14 +2071,14 @@ var Ar = m({
2018
2071
  stroke: "currentColor",
2019
2072
  "stroke-width": "2",
2020
2073
  "stroke-linecap": "round"
2021
- }, null, -1)]])), i[8] ||= s("span", null, "未找到相关商品", -1)])) : a("", !0), (S(!0), o(e, null, T(x.value, (e) => (S(), o("button", {
2074
+ }, null, -1)]])), i[8] ||= s("span", null, "未找到相关商品", -1)])) : a("", !0), (S(!0), o(e, null, T(C.value, (e) => (S(), o("button", {
2022
2075
  key: e.code,
2023
2076
  type: "button",
2024
- class: g(["compare-list__item", { "is-selected": C(e.code) }]),
2077
+ class: g(["compare-list__item", { "is-selected": E(e.code) }]),
2025
2078
  role: "option",
2026
- "aria-selected": C(e.code),
2027
- onClick: (t) => E(e)
2028
- }, [s("span", ii, [s("span", ai, O(e.code), 1), s("span", oi, O(e.description), 1)]), s("span", si, [s("span", ci, O(e.exchange), 1), C(e.code) ? (S(), o("span", li, [...i[9] ||= [s("svg", {
2079
+ "aria-selected": E(e.code),
2080
+ onClick: (t) => D(e)
2081
+ }, [s("span", si, [s("span", ci, O(e.code), 1), s("span", li, O(e.description), 1)]), s("span", ui, [s("span", di, O(e.exchange), 1), E(e.code) ? (S(), o("span", fi, [...i[9] ||= [s("svg", {
2029
2082
  viewBox: "0 0 24 24",
2030
2083
  width: "16",
2031
2084
  height: "16",
@@ -2034,25 +2087,29 @@ var Ar = m({
2034
2087
  "stroke-width": "2.5",
2035
2088
  "stroke-linecap": "round",
2036
2089
  "stroke-linejoin": "round"
2037
- }, [s("polyline", { points: "20 6 9 17 4 12" })], -1)]])) : a("", !0)])], 10, ri))), 128))])
2090
+ }, [s("polyline", { points: "20 6 9 17 4 12" })], -1)]])) : a("", !0)])], 10, oi))), 128))])
2038
2091
  ])) : a("", !0)]),
2039
2092
  _: 1
2040
2093
  })], 512));
2041
2094
  }
2042
- }), [["__scopeId", "data-v-b8955787"]]), di = { class: "top-toolbar" }, fi = /*#__PURE__*/ W(/* @__PURE__ */ u({
2095
+ }), [["__scopeId", "data-v-9513ad09"]]), mi = { class: "top-toolbar" }, hi = /*#__PURE__*/ H(/* @__PURE__ */ u({
2043
2096
  __name: "TopToolbar",
2044
2097
  props: {
2045
2098
  symbol: {},
2046
2099
  kLineLevel: {},
2100
+ kLineAdjust: {},
2047
2101
  symbols: {},
2048
2102
  symbolLoading: { type: Boolean },
2049
2103
  symbolError: { type: Boolean },
2050
- overlaySymbols: {}
2104
+ overlaySymbols: {},
2105
+ comparisonColors: {},
2106
+ comparisonLoading: { type: Boolean }
2051
2107
  },
2052
2108
  emits: [
2053
2109
  "addOverlaySymbol",
2054
2110
  "removeOverlaySymbol",
2055
2111
  "kLineLevelChange",
2112
+ "kLineAdjustChange",
2056
2113
  "toggleIndicator",
2057
2114
  "symbolChange"
2058
2115
  ],
@@ -2100,18 +2157,6 @@ var Ar = m({
2100
2157
  exchange: "NASDAQ",
2101
2158
  source: "tradingview"
2102
2159
  },
2103
- {
2104
- code: "600519",
2105
- description: "贵州茅台",
2106
- exchange: "SSE",
2107
- source: "tradingview"
2108
- },
2109
- {
2110
- code: "000001",
2111
- description: "平安银行",
2112
- exchange: "SZSE",
2113
- source: "tradingview"
2114
- },
2115
2160
  {
2116
2161
  code: "1810",
2117
2162
  description: "小米集团",
@@ -2119,28 +2164,28 @@ var Ar = m({
2119
2164
  source: "tradingview"
2120
2165
  },
2121
2166
  {
2122
- code: "sh.600519",
2167
+ code: "600519",
2123
2168
  description: "贵州茅台",
2124
2169
  exchange: "SSE",
2125
- source: "baostock"
2170
+ source: "gotdx"
2126
2171
  },
2127
2172
  {
2128
- code: "sh.601360",
2173
+ code: "601360",
2129
2174
  description: "三六零",
2130
2175
  exchange: "SSE",
2131
- source: "baostock"
2176
+ source: "gotdx"
2132
2177
  },
2133
2178
  {
2134
2179
  code: "000858",
2135
2180
  description: "五 粮 液",
2136
2181
  exchange: "SZSE",
2137
- source: "baostock"
2182
+ source: "gotdx"
2138
2183
  },
2139
2184
  {
2140
2185
  code: "000001",
2141
2186
  description: "平安银行",
2142
2187
  exchange: "SZSE",
2143
- source: "baostock"
2188
+ source: "gotdx"
2144
2189
  },
2145
2190
  {
2146
2191
  code: "MOCK-100",
@@ -2158,8 +2203,8 @@ var Ar = m({
2158
2203
  function p(e) {
2159
2204
  c("symbolChange", e);
2160
2205
  }
2161
- return (t, n) => (S(), o("div", di, [
2162
- d.value ? (S(), i(Wr, {
2206
+ return (t, n) => (S(), o("div", mi, [
2207
+ d.value ? (S(), i(Kr, {
2163
2208
  key: 0,
2164
2209
  symbol: d.value,
2165
2210
  symbols: f.value,
@@ -2172,38 +2217,49 @@ var Ar = m({
2172
2217
  "loading",
2173
2218
  "error"
2174
2219
  ])) : a("", !0),
2175
- l(ui, {
2220
+ l(pi, {
2176
2221
  symbols: f.value,
2177
2222
  selected: e.overlaySymbols,
2223
+ "comparison-colors": e.comparisonColors,
2224
+ "comparison-loading": e.comparisonLoading,
2178
2225
  onAdd: n[0] ||= (e) => c("addOverlaySymbol", e),
2179
2226
  onRemove: n[1] ||= (e) => c("removeOverlaySymbol", e)
2180
- }, null, 8, ["symbols", "selected"]),
2181
- l(Dr, {
2227
+ }, null, 8, [
2228
+ "symbols",
2229
+ "selected",
2230
+ "comparison-colors",
2231
+ "comparison-loading"
2232
+ ]),
2233
+ l(Or, {
2182
2234
  "model-value": e.kLineLevel,
2183
2235
  "onUpdate:modelValue": n[2] ||= (e) => c("kLineLevelChange", e)
2184
2236
  }, null, 8, ["model-value"]),
2237
+ l(kr, {
2238
+ "model-value": e.kLineAdjust,
2239
+ "onUpdate:modelValue": n[3] ||= (e) => c("kLineAdjustChange", e)
2240
+ }, null, 8, ["model-value"]),
2185
2241
  s("button", {
2186
2242
  type: "button",
2187
2243
  class: "indicator-button",
2188
2244
  title: "指标",
2189
2245
  "aria-label": "指标",
2190
- onClick: n[3] ||= (e) => c("toggleIndicator")
2191
- }, [...n[4] ||= [s("span", {
2246
+ onClick: n[4] ||= (e) => c("toggleIndicator")
2247
+ }, [...n[5] ||= [s("span", {
2192
2248
  class: "indicator-button__icon",
2193
2249
  "aria-hidden": "true"
2194
2250
  }, "fx", -1), s("span", { class: "indicator-button__text" }, "指标", -1)]])
2195
2251
  ]));
2196
2252
  }
2197
- }), [["__scopeId", "data-v-53988aa5"]]), pi = ["data-theme"], mi = {
2253
+ }), [["__scopeId", "data-v-c612b21d"]]), gi = ["data-theme"], _i = {
2198
2254
  class: "pane-separator-layer",
2199
2255
  "aria-hidden": "true"
2200
- }, hi = {
2256
+ }, vi = {
2201
2257
  class: "canvas-layer",
2202
2258
  ref: "canvasLayerRef"
2203
- }, gi = {
2259
+ }, yi = {
2204
2260
  class: "x-axis-canvas",
2205
2261
  ref: "xAxisCanvasRef"
2206
- }, _i = 4, vi = /*#__PURE__*/ W(/* @__PURE__ */ u({
2262
+ }, bi = 4, xi = /*#__PURE__*/ H(/* @__PURE__ */ u({
2207
2263
  __name: "KLineChart",
2208
2264
  props: {
2209
2265
  semanticConfig: {},
@@ -2219,67 +2275,75 @@ var Ar = m({
2219
2275
  isFullscreen: {
2220
2276
  type: Boolean,
2221
2277
  default: !1
2222
- }
2278
+ },
2279
+ timezone: { default: "Asia/Shanghai" }
2223
2280
  },
2224
2281
  emits: [
2225
2282
  "zoomLevelChange",
2226
2283
  "toggleFullscreen",
2227
2284
  "themeChange",
2228
- "kLineLevelChange"
2285
+ "kLineLevelChange",
2286
+ "kLineAdjustChange"
2229
2287
  ],
2230
2288
  setup(n, { expose: c, emit: u }) {
2231
- let d = n, f = u, p = w(d.semanticConfig.data.period), m = w("选择商品"), v = w(null), b = w(!1), C = w(!1), E = w([]), O = w([]);
2232
- function k(e) {
2233
- p.value = e, f("kLineLevelChange", e), F();
2234
- }
2235
- function A(e) {
2236
- C.value = !1, m.value = e.code, v.value = e, F();
2237
- }
2289
+ let d = n, f = u, p = w(d.semanticConfig?.data?.period ?? "daily"), m = w(d.semanticConfig?.data?.adjust ?? "none"), v = r(() => p.value.includes("min")), b = w("选择商品"), C = w(null), E = w(!1), O = w(!1), k = w([]), A = w([]);
2238
2290
  function j(e) {
2239
- v.value?.code !== e.code && (E.value.includes(e.code) || (O.value = [...O.value, e], E.value = O.value.map((e) => e.code), I(), F()));
2291
+ p.value = e, f("kLineLevelChange", e), L();
2240
2292
  }
2241
2293
  function N(e) {
2242
- O.value = O.value.filter((t) => t.code !== e), E.value = O.value.map((e) => e.code), F();
2294
+ m.value = e, f("kLineAdjustChange", e), L();
2243
2295
  }
2244
2296
  function P(e) {
2297
+ O.value = !1, b.value = e.code, C.value = e, L();
2298
+ }
2299
+ function F(e) {
2300
+ C.value?.code !== e.code && (k.value.includes(e.code) || (A.value = [...A.value, e], k.value = A.value.map((e) => e.code), te(), B.value?.addComparisonSymbol(ee(e))));
2301
+ }
2302
+ function I(e) {
2303
+ A.value = A.value.filter((t) => t.code !== e), k.value = A.value.map((e) => e.code), B.value?.removeComparisonSymbol(e);
2304
+ }
2305
+ function ee(e) {
2245
2306
  return {
2246
2307
  symbol: e.code,
2247
2308
  exchange: e.exchange,
2248
2309
  period: p.value,
2249
2310
  source: e.source,
2250
- startDate: d.semanticConfig.data.startDate,
2251
- endDate: d.semanticConfig.data.endDate,
2252
- adjust: d.semanticConfig.data.adjust
2311
+ startDate: d.semanticConfig?.data?.startDate ?? "",
2312
+ endDate: d.semanticConfig?.data?.endDate ?? "",
2313
+ adjust: m.value
2253
2314
  };
2254
2315
  }
2255
- function F() {
2256
- v.value && z.value?.setSymbols([P(v.value), ...O.value.map(P)]);
2316
+ function L() {
2317
+ C.value && B.value?.setSymbols([ee(C.value), ...A.value.map(ee)]);
2257
2318
  }
2258
- function I() {
2259
- if (G.value.axisType === "percent") return;
2319
+ function te() {
2320
+ if (W.value.axisType === "percent") return;
2260
2321
  let e = {
2261
- ...G.value,
2322
+ ...W.value,
2262
2323
  axisType: "percent"
2263
2324
  };
2264
- G.value = e, z.value?.updateSettingsFacade(e);
2325
+ W.value = e, B.value?.updateSettingsFacade(e);
2326
+ try {
2327
+ localStorage.setItem(ge, JSON.stringify(e));
2328
+ } catch {}
2265
2329
  }
2266
- let L = w(null), R = w(null), ee = w(null), te = w(null), ie = w(null), ce = w(null);
2267
- Ae(ee);
2268
- let z = D(null), ue = D(null), B = w(0), V = w(0), H = w(1), U = w(d.initialZoomLevel ?? 1), he = w(0), ge = w(1), _e = w(0), ve = w({}), ye = w(null), W = w([]), be = U.value;
2269
- he.value = fe(be, {
2330
+ let R = w(null), re = w(null), z = w(null), ce = w(null), ue = w(null), de = w(null);
2331
+ Me(z);
2332
+ let B = D(null), _e = D(null), ve = w(0), ye = w(0), be = w(1), V = w(d.initialZoomLevel ?? 1), xe = w(0), Se = w(1), H = w(0), Ce = w({}), we = w(null), Te = w([]), Ee = w(/* @__PURE__ */ new Map()), De = w(!1), Oe = V.value;
2333
+ xe.value = pe(Oe, {
2270
2334
  minKWidth: d.minKWidth,
2271
2335
  maxKWidth: d.maxKWidth,
2272
2336
  zoomLevelCount: d.zoomLevels,
2273
- dpr: H.value
2274
- }), ge.value = de(he.value, H.value);
2275
- let xe = w("light"), G = w({}), Se = r(() => {
2276
- let e = G.value.isAsiaMarket ?? !1, t = ae(xe.value, e);
2337
+ dpr: be.value
2338
+ }), Se.value = fe(xe.value, be.value);
2339
+ let U = w("light"), W = w({}), G = r(() => {
2340
+ let e = W.value.isAsiaMarket ?? !1, t = ae(U.value, e);
2277
2341
  return {
2278
2342
  upColor: t.candleUpBody,
2279
2343
  downColor: t.candleDownBody
2280
2344
  };
2281
- }), Ce = r(() => {
2282
- let e = xe.value === "dark" ? ne : re, t = G.value.colorPresetSettings?.[xe.value];
2345
+ }), ke = r(() => {
2346
+ let e = U.value === "dark" ? ne : ie, t = W.value.colorPresetSettings?.[U.value];
2283
2347
  return t && Object.keys(t).length > 0 ? oe({
2284
2348
  ...e,
2285
2349
  colors: {
@@ -2288,47 +2352,47 @@ var Ar = m({
2288
2352
  }
2289
2353
  }) : oe(e);
2290
2354
  }), K = null;
2291
- function q(e) {
2292
- z.value?.setTheme(e.matches ? "dark" : "light");
2355
+ function je(e) {
2356
+ B.value?.setTheme(e.matches ? "dark" : "light");
2293
2357
  }
2294
- function we(e, t) {
2358
+ function Ne(e, t) {
2295
2359
  if (!(!e || !t)) if (t === "auto") {
2296
2360
  let t = window.matchMedia("(prefers-color-scheme: dark)");
2297
- e.setTheme(t.matches ? "dark" : "light"), K !== t && (K?.removeEventListener("change", q), K = t, t.addEventListener("change", q));
2298
- } else K?.removeEventListener("change", q), K = null, e.setTheme(t);
2361
+ e.setTheme(t.matches ? "dark" : "light"), K !== t && (K?.removeEventListener("change", je), K = t, t.addEventListener("change", je));
2362
+ } else K?.removeEventListener("change", je), K = null, e.setTheme(t);
2299
2363
  }
2300
- function Te() {}
2301
- function Ee(e) {
2302
- G.value = e, we(z.value, e.theme), z.value?.updateSettingsFacade(e);
2364
+ function Pe() {}
2365
+ function Fe(e) {
2366
+ W.value = e, Ne(B.value, e.theme), B.value?.updateSettingsFacade(e);
2303
2367
  }
2304
- function De(e, t, n) {
2368
+ function Ie(e, t, n) {
2305
2369
  let r = e.getBoundingClientRect();
2306
2370
  return {
2307
2371
  width: Math.max(t, Math.round(r.width)),
2308
2372
  height: Math.max(n, Math.round(r.height))
2309
2373
  };
2310
2374
  }
2311
- function ke(e) {
2375
+ function Le(e) {
2312
2376
  e && h(() => {
2313
2377
  if (!e.isConnected) return;
2314
- let t = De(e, 180, 80);
2315
- z.value?.setTooltipSize(t);
2378
+ let t = Ie(e, 180, 80);
2379
+ B.value?.setTooltipSize(t);
2316
2380
  });
2317
2381
  }
2318
- function je(e) {
2382
+ function Re(e) {
2319
2383
  e && h(() => {
2320
- e.isConnected && (ze.value = De(e, 120, 60));
2384
+ e.isConnected && (Ge.value = Ie(e, 120, 60));
2321
2385
  });
2322
2386
  }
2323
- let Me = w({
2387
+ let ze = w({
2324
2388
  x: 0,
2325
2389
  y: 0
2326
- }), Ne = w(!1), Pe = null;
2327
- function Fe() {
2328
- Pe = null;
2390
+ }), q = w(!1), Be = null;
2391
+ function Ve() {
2392
+ Be = null;
2329
2393
  }
2330
- function Ie(e) {
2331
- return Pe ||= e.getBoundingClientRect(), Pe;
2394
+ function He(e) {
2395
+ return Be ||= e.getBoundingClientRect(), Be;
2332
2396
  }
2333
2397
  let J = D({
2334
2398
  crosshairPos: null,
@@ -2348,14 +2412,14 @@ var Ar = m({
2348
2412
  isHoveringPaneBoundary: !1,
2349
2413
  hoveredPaneBoundaryId: null,
2350
2414
  isHoveringRightAxis: !1
2351
- }), Y = D(null), Le = r(() => {
2352
- let e = ye.value;
2353
- return e ? W.value.find((t) => t.id === e) ?? null : null;
2354
- }), Re = w([]), ze = w({
2415
+ }), Y = D(null), Ue = r(() => {
2416
+ let e = we.value;
2417
+ return e ? Te.value.find((t) => t.id === e) ?? null : null;
2418
+ }), We = w([]), Ge = w({
2355
2419
  width: 220,
2356
2420
  height: 120
2357
- }), Be = r(() => {
2358
- let e = L.value, t = R.value;
2421
+ }), Ke = r(() => {
2422
+ let e = R.value, t = re.value;
2359
2423
  return !e || !t ? {
2360
2424
  x: 0,
2361
2425
  y: 0
@@ -2363,86 +2427,86 @@ var Ar = m({
2363
2427
  x: e.offsetLeft,
2364
2428
  y: e.offsetTop
2365
2429
  };
2366
- }), Ve = r(() => J.value.hoveredMarkerData), He = r(() => J.value.hoveredCustomMarker), Ue = r(() => J.value.isDragging), We = r(() => J.value.isResizingPaneBoundary), Ge = r(() => J.value.isHoveringPaneBoundary), Ke = r(() => J.value.hoveredPaneBoundaryId), qe = r(() => J.value.isHoveringRightAxis), Je = r(() => J.value.hoveredIndex);
2430
+ }), qe = r(() => J.value.hoveredMarkerData), Je = r(() => J.value.hoveredCustomMarker), Ye = r(() => J.value.isDragging), Xe = r(() => J.value.isResizingPaneBoundary), Ze = r(() => J.value.isHoveringPaneBoundary), Qe = r(() => J.value.hoveredPaneBoundaryId), $e = r(() => J.value.isHoveringRightAxis), et = r(() => J.value.hoveredIndex);
2367
2431
  r(() => J.value.crosshairIndex);
2368
- let Ye = r(() => Ue.value ? "grabbing" : We.value || Ge.value ? "ns-resize" : Je.value === null ? "crosshair" : "pointer"), Xe = r(() => {
2432
+ let tt = r(() => Ye.value ? "grabbing" : Xe.value || Ze.value ? "ns-resize" : et.value === null ? "crosshair" : "pointer"), nt = r(() => {
2369
2433
  let e = J.value.hoveredIndex;
2370
2434
  if (typeof e != "number") return null;
2371
- V.value;
2372
- let t = z.value?.getData();
2435
+ ye.value;
2436
+ let t = B.value?.getData();
2373
2437
  return t && e >= 0 && e < t.length ? t[e] : null;
2374
- }), Ze = r(() => J.value.hoveredIndex), Qe = r(() => J.value.tooltipPos), $e = r(() => ({
2375
- x: Qe.value.x + Be.value.x,
2376
- y: Qe.value.y + Be.value.y
2377
- })), et = r(() => ({
2378
- left: `${$e.value.x}px`,
2379
- top: `${$e.value.y}px`
2380
- })), tt = r(() => ({
2381
- x: Me.value.x + Be.value.x,
2382
- y: Me.value.y + Be.value.y
2383
- })), nt = r(() => ({
2384
- left: `${tt.value.x}px`,
2385
- top: `${tt.value.y}px`
2386
- })), rt = r(() => J.value.tooltipAnchorPlacement), it = r(() => {
2387
- let e = z.value?.viewport.peek(), t = L.value, n = e?.plotWidth ?? (t ? t.clientWidth : 0);
2388
- return Me.value.x + 12 + ze.value.width + 12 > n ? "left-bottom" : "right-bottom";
2389
- }), at = r(() => (V.value, z.value?.getData() ?? []));
2390
- function ot(e) {
2438
+ }), rt = r(() => J.value.hoveredIndex), it = r(() => J.value.tooltipPos), at = r(() => ({
2439
+ x: it.value.x + Ke.value.x,
2440
+ y: it.value.y + Ke.value.y
2441
+ })), ot = r(() => ({
2442
+ left: `${at.value.x}px`,
2443
+ top: `${at.value.y}px`
2444
+ })), st = r(() => ({
2445
+ x: ze.value.x + Ke.value.x,
2446
+ y: ze.value.y + Ke.value.y
2447
+ })), ct = r(() => ({
2448
+ left: `${st.value.x}px`,
2449
+ top: `${st.value.y}px`
2450
+ })), lt = r(() => J.value.tooltipAnchorPlacement), ut = r(() => {
2451
+ let e = B.value?.viewport.peek(), t = R.value, n = e?.plotWidth ?? (t ? t.clientWidth : 0);
2452
+ return ze.value.x + 12 + Ge.value.width + 12 > n ? "left-bottom" : "right-bottom";
2453
+ }), dt = r(() => (ye.value, B.value?.getData() ?? []));
2454
+ function ft(e) {
2391
2455
  Y.value?.setTool(e);
2392
2456
  }
2393
- function st() {
2394
- ce.value?.toggleMenu();
2457
+ function pt() {
2458
+ de.value?.toggleMenu();
2395
2459
  }
2396
- function ct(e) {
2397
- let t = Le.value;
2398
- !t || !Y.value || (Y.value.updateDrawingStyle(t.id, e), W.value = Y.value.getDrawings());
2460
+ function mt(e) {
2461
+ let t = Ue.value;
2462
+ !t || !Y.value || (Y.value.updateDrawingStyle(t.id, e), Te.value = Y.value.getDrawings());
2399
2463
  }
2400
- function lt() {
2401
- let e = Le.value;
2402
- !e || !Y.value || (Y.value.removeDrawing(e.id), W.value = Y.value.getDrawings());
2464
+ function ht() {
2465
+ let e = Ue.value;
2466
+ !e || !Y.value || (Y.value.removeDrawing(e.id), Te.value = Y.value.getDrawings());
2403
2467
  }
2404
- function ut(e) {
2405
- z.value?.handlePointerEvent(e, { onPointerDown: (e, t) => !!Y.value?.onPointerDown(e, t) });
2468
+ function gt(e) {
2469
+ B.value?.handlePointerEvent(e, { onPointerDown: (e, t) => !!Y.value?.onPointerDown(e, t) });
2406
2470
  }
2407
- function dt(e) {
2408
- let t = L.value;
2471
+ function _t(e) {
2472
+ let t = R.value;
2409
2473
  if (t) {
2410
- let n = Ie(t);
2411
- Me.value = {
2474
+ let n = He(t);
2475
+ ze.value = {
2412
2476
  x: e.clientX - n.left,
2413
2477
  y: e.clientY - n.top
2414
2478
  };
2415
2479
  }
2416
- z.value?.handlePointerEvent(e, { onPointerMove: (e, t) => Y.value?.onPointerMove(e, t) ? (W.value = Y.value.getDrawings(), !0) : !1 });
2480
+ B.value?.handlePointerEvent(e, { onPointerMove: (e, t) => Y.value?.onPointerMove(e, t) ? (Te.value = Y.value.getDrawings(), !0) : !1 });
2417
2481
  }
2418
- function ft(e) {
2419
- z.value?.handlePointerEvent(e, { onPointerUp: (e, t) => !!Y.value?.onPointerUp(e, t) });
2482
+ function vt(e) {
2483
+ B.value?.handlePointerEvent(e, { onPointerUp: (e, t) => !!Y.value?.onPointerUp(e, t) });
2420
2484
  }
2421
- function pt(e) {
2422
- z.value?.handlePointerEvent(e);
2485
+ function yt(e) {
2486
+ B.value?.handlePointerEvent(e);
2423
2487
  }
2424
- function mt(e) {
2425
- z.value?.handlePointerEvent(e);
2488
+ function bt(e) {
2489
+ B.value?.handlePointerEvent(e);
2426
2490
  }
2427
- function ht(e) {
2428
- z.value?.handlePointerEvent(e);
2491
+ function xt(e) {
2492
+ B.value?.handlePointerEvent(e);
2429
2493
  }
2430
- function gt(e) {
2431
- z.value?.handlePointerEvent(e);
2494
+ function St(e) {
2495
+ B.value?.handlePointerEvent(e);
2432
2496
  }
2433
- function _t(e) {
2434
- z.value?.handlePointerEvent(e);
2497
+ function Ct(e) {
2498
+ B.value?.handlePointerEvent(e);
2435
2499
  }
2436
- function vt() {
2437
- z.value?.handleScrollEvent();
2500
+ function wt() {
2501
+ B.value?.handleScrollEvent();
2438
2502
  }
2439
- let yt = w([]), bt = r(() => {
2503
+ let Tt = w([]), Et = r(() => {
2440
2504
  let e = [], t = /* @__PURE__ */ new Set();
2441
2505
  for (let n of Z.value) t.has(n.indicatorId) || (t.add(n.indicatorId), e.push(n.indicatorId));
2442
2506
  return e;
2443
- }), xt = r(() => [...yt.value, ...bt.value]), X = w({}), Z = w([]);
2444
- function St() {
2445
- let e = ve.value.main ?? 3;
2507
+ }), Dt = r(() => [...Tt.value, ...Et.value]), X = w({}), Z = w([]);
2508
+ function Ot() {
2509
+ let e = Ce.value.main ?? 3;
2446
2510
  return Z.value.length === 0 ? [{
2447
2511
  id: "main",
2448
2512
  ratio: e,
@@ -2455,73 +2519,73 @@ var Ar = m({
2455
2519
  role: "price"
2456
2520
  }, ...Z.value.map((e) => ({
2457
2521
  id: e.id,
2458
- ratio: ve.value[e.id] ?? 1,
2522
+ ratio: Ce.value[e.id] ?? 1,
2459
2523
  visible: !0,
2460
2524
  role: "indicator"
2461
2525
  }))];
2462
2526
  }
2463
- function Ct(e) {
2527
+ function kt(e) {
2464
2528
  if (e === "VOLUME") return {};
2465
- let t = me(e);
2529
+ let t = he(e);
2466
2530
  return t?.runtime?.defaultConfig ? { ...t.runtime.defaultConfig } : {};
2467
2531
  }
2468
- function wt(e) {
2532
+ function At(e) {
2469
2533
  if (e === "VOLUME") return !0;
2470
- let t = me(e);
2534
+ let t = he(e);
2471
2535
  return !!t && t.category !== "main";
2472
2536
  }
2473
- function Tt(e = "VOLUME", t) {
2474
- if (Z.value.length >= _i) return !1;
2475
- let n = t ?? Ct(e);
2476
- return !!z.value?.addIndicator(e, "sub", n);
2537
+ function Mt(e = "VOLUME", t) {
2538
+ if (Z.value.length >= bi) return !1;
2539
+ let n = t ?? kt(e);
2540
+ return !!B.value?.addIndicator(e, "sub", n);
2477
2541
  }
2478
- function Et(e) {
2479
- z.value?.removeIndicator(e);
2542
+ function Nt(e) {
2543
+ B.value?.removeIndicator(e);
2480
2544
  }
2481
- function Dt() {
2482
- for (let e of Z.value) z.value?.removeIndicator(e.id);
2545
+ function Pt() {
2546
+ for (let e of Z.value) B.value?.removeIndicator(e.id);
2483
2547
  }
2484
- function Ot() {
2485
- let e = d.semanticConfig, t = z.value;
2486
- if (!t) return;
2548
+ function Ft() {
2549
+ let e = d.semanticConfig, t = B.value;
2550
+ if (!e || !t) return;
2487
2551
  let n = e.indicators?.main;
2488
2552
  if (n) for (let e of n) e.enabled && t.addIndicator(e.type, "main", e.params);
2489
2553
  }
2490
- function kt(e, t) {
2491
- let n = Ct(t);
2492
- z.value?.replaceSubPaneIndicator(e, t, n);
2554
+ function It(e, t) {
2555
+ let n = kt(t);
2556
+ B.value?.replaceSubPaneIndicator(e, t, n);
2493
2557
  }
2494
- function jt(e, t) {
2495
- let n = z.value;
2558
+ function Lt(e, t) {
2559
+ let n = B.value;
2496
2560
  if (!n) return;
2497
- let r = me(e);
2561
+ let r = he(e);
2498
2562
  if (r && (r.category === "main" || r.allowMainPane)) {
2499
- let r = yt.value.find((t) => t === e);
2563
+ let r = Tt.value.find((t) => t === e);
2500
2564
  t && !r ? n.addIndicator(e, "main", X.value[e]) : !t && r && n.removeIndicator(e.toUpperCase());
2501
2565
  return;
2502
2566
  }
2503
- if (wt(e)) if (t) {
2504
- if (Z.value.find((t) => t.indicatorId === e) || Z.value.length >= _i) return;
2567
+ if (At(e)) if (t) {
2568
+ if (Z.value.find((t) => t.indicatorId === e) || Z.value.length >= bi) return;
2505
2569
  if (!n.addIndicator(e, "sub", X.value[e]) && Z.value.length > 0) {
2506
2570
  let t = Z.value[Z.value.length - 1];
2507
- kt(t.id, e);
2571
+ It(t.id, e);
2508
2572
  }
2509
2573
  } else Z.value.filter((t) => t.indicatorId === e).forEach((e) => {
2510
2574
  n.removeIndicator(e.id);
2511
2575
  });
2512
2576
  }
2513
- function Mt(e, t) {
2577
+ function Rt(e, t) {
2514
2578
  if (e === "MA" || e === "BOLL" || e === "EXPMA" || e === "ENE") {
2515
- z.value?.updateIndicatorParams(e, t);
2579
+ B.value?.updateIndicatorParams(e, t);
2516
2580
  return;
2517
2581
  }
2518
- wt(e) && Z.value.filter((t) => t.indicatorId === e).forEach((e) => {
2519
- z.value?.updateIndicatorParams(e.id, t);
2582
+ At(e) && Z.value.filter((t) => t.indicatorId === e).forEach((e) => {
2583
+ B.value?.updateIndicatorParams(e.id, t);
2520
2584
  });
2521
2585
  }
2522
- function Nt(e) {
2586
+ function zt(e) {
2523
2587
  if (!e.length || Z.value.length <= 1) return;
2524
- let t = e.filter((e) => wt(e));
2588
+ let t = e.filter((e) => At(e));
2525
2589
  if (!t.length) return;
2526
2590
  let n = new Map(Z.value.map((e) => [e.indicatorId, e])), r = [];
2527
2591
  for (let e of t) {
@@ -2533,31 +2597,31 @@ var Ar = m({
2533
2597
  let i = Z.value.map((e) => e.id), a = r.map((e) => e.id);
2534
2598
  if (i.join("|") === a.join("|")) return;
2535
2599
  Z.value = r;
2536
- let o = z.value;
2537
- o && o.updatePaneLayout(St());
2600
+ let o = B.value;
2601
+ o && o.updatePaneLayout(Ot());
2538
2602
  }
2539
- let Pt = r(() => d.rightAxisWidth + d.priceLabelWidth), Ft = r(() => (V.value, _e.value, he.value, ge.value, H.value, z.value?.getContentWidth() ?? 0));
2540
- function It(e, t) {
2541
- z.value?.zoomToLevel(e, t);
2603
+ let Bt = r(() => d.rightAxisWidth + d.priceLabelWidth), Vt = r(() => (ye.value, H.value, xe.value, Se.value, be.value, B.value?.getContentWidth() ?? 0));
2604
+ function Ht(e, t) {
2605
+ B.value?.zoomToLevel(e, t);
2542
2606
  }
2543
2607
  c({
2544
- scheduleRender: Te,
2545
- addSubPane: Tt,
2546
- removeSubPane: Et,
2547
- switchSubIndicator: kt,
2548
- clearAllSubPanes: Dt,
2549
- zoomToLevel: It,
2550
- zoomIn: (e) => It(U.value + 1, e),
2551
- zoomOut: (e) => It(U.value - 1, e),
2552
- getZoomLevel: () => U.value,
2553
- getZoomLevelCount: () => z.value?.getZoomLevelCount() ?? 10
2608
+ scheduleRender: Pe,
2609
+ addSubPane: Mt,
2610
+ removeSubPane: Nt,
2611
+ switchSubIndicator: It,
2612
+ clearAllSubPanes: Pt,
2613
+ zoomToLevel: Ht,
2614
+ zoomIn: (e) => Ht(V.value + 1, e),
2615
+ zoomOut: (e) => Ht(V.value - 1, e),
2616
+ getZoomLevel: () => V.value,
2617
+ getZoomLevelCount: () => B.value?.getZoomLevelCount() ?? 10
2554
2618
  });
2555
- function Lt() {
2619
+ function Ut() {
2556
2620
  return (e) => {
2557
- e.preventDefault(), z.value?.handleWheelEvent(e);
2621
+ e.preventDefault(), B.value?.handleWheelEvent(e);
2558
2622
  };
2559
2623
  }
2560
- function Rt(e, t, n, r) {
2624
+ function Wt(e, t, n, r) {
2561
2625
  return le({
2562
2626
  container: e,
2563
2627
  data: [],
@@ -2574,11 +2638,11 @@ var Ar = m({
2574
2638
  maxKWidth: d.maxKWidth
2575
2639
  });
2576
2640
  }
2577
- function zt(e) {
2641
+ function Gt(e) {
2578
2642
  let t = e.paneLayout.subscribe(() => {
2579
- Fe();
2580
- let t = L.value && parseInt(getComputedStyle(L.value).borderTopWidth) || 0;
2581
- Re.value = e.paneLayout.peek().slice(0, -1).map((n) => {
2643
+ Ve();
2644
+ let t = R.value && parseInt(getComputedStyle(R.value).borderTopWidth) || 0;
2645
+ We.value = e.paneLayout.peek().slice(0, -1).map((n) => {
2582
2646
  let r = e.getPaneInfo(n.id), i = (r?.top ?? 0) + (r?.height ?? 0);
2583
2647
  return {
2584
2648
  id: n.id,
@@ -2586,21 +2650,21 @@ var Ar = m({
2586
2650
  };
2587
2651
  });
2588
2652
  }), n = e.paneRatios.subscribe(() => {
2589
- ve.value = { ...e.paneRatios.peek() };
2653
+ Ce.value = { ...e.paneRatios.peek() };
2590
2654
  }), r = e.viewport.subscribe(() => {
2591
2655
  let t = e.viewport.peek();
2592
- H.value !== t.dpr && (H.value = t.dpr), _e.value !== t.plotWidth && (_e.value = t.plotWidth), (U.value !== t.zoomLevel || he.value !== t.kWidth || ge.value !== t.kGap) && (U.value = t.zoomLevel, he.value = t.kWidth, ge.value = t.kGap);
2656
+ be.value !== t.dpr && (be.value = t.dpr), H.value !== t.plotWidth && (H.value = t.plotWidth), (V.value !== t.zoomLevel || xe.value !== t.kWidth || Se.value !== t.kGap) && (V.value = t.zoomLevel, xe.value = t.kWidth, Se.value = t.kGap);
2593
2657
  }), i = e.data.subscribe(() => {
2594
2658
  let t = e.data.peek();
2595
- B.value = t.length, V.value++, C.value = t.length === 0;
2659
+ ve.value = t.length, ye.value++, O.value = t.length === 0;
2596
2660
  }), a = e.dataLoading.subscribe(() => {
2597
- b.value = e.dataLoading.peek();
2661
+ E.value = e.dataLoading.peek();
2598
2662
  }), o = e.theme.subscribe(() => {
2599
2663
  let t = e.theme.peek();
2600
- xe.value = t, f("themeChange", t);
2664
+ U.value = t, f("themeChange", t);
2601
2665
  }), s = e.indicators.subscribe(() => {
2602
2666
  let t = e.indicators.peek(), n = t.filter((e) => e.role === "main").map((e) => e.definitionId);
2603
- yt.value = n;
2667
+ Tt.value = n;
2604
2668
  let r = { ...X.value };
2605
2669
  for (let e of t) e.role === "main" && e.params && Object.keys(e.params).length > 0 && (r[e.definitionId] = { ...e.params });
2606
2670
  e.updateRendererConfig("mainIndicatorLegend", { indicators: {
@@ -2632,155 +2696,168 @@ var Ar = m({
2632
2696
  let a = { ...X.value };
2633
2697
  for (let e of t) e.params && Object.keys(e.params).length > 0 && (a[e.indicatorId] = { ...e.params });
2634
2698
  X.value = a;
2699
+ }), l = e.comparisonColors.subscribe(() => {
2700
+ Ee.value = new Map(e.comparisonColors.peek());
2701
+ }), u = e.comparisonLoading.subscribe(() => {
2702
+ De.value = e.comparisonLoading.peek();
2635
2703
  });
2636
2704
  x(() => {
2637
- r(), i(), a(), n(), t(), o(), s(), c(), K?.removeEventListener("change", q);
2705
+ r(), i(), a(), n(), t(), o(), s(), c(), l(), u(), K?.removeEventListener("change", je);
2638
2706
  });
2639
2707
  }
2640
- function Bt(e) {
2641
- let t = ie.value?.getSettings() ?? { showVolumePriceMarkers: !0 };
2642
- G.value = t, we(e, t.theme), e.updateSettingsFacade(t);
2708
+ function qt(e) {
2709
+ let t = ue.value?.getSettings() ?? { showVolumePriceMarkers: !0 };
2710
+ W.value = t, Ne(e, t.theme), e.updateSettingsFacade(t);
2643
2711
  }
2644
- function Vt(e) {
2712
+ function Jt(e) {
2645
2713
  Y.value = new se(e), Y.value.setCallbacks({
2646
2714
  onDrawingCreated: (e) => {
2647
- W.value = [...W.value, e], ye.value = e.id;
2715
+ Te.value = [...Te.value, e], we.value = e.id;
2648
2716
  },
2649
2717
  onToolChange: () => {},
2650
2718
  onDrawingSelected: (e) => {
2651
- ye.value = e?.id ?? null;
2719
+ we.value = e?.id ?? null;
2652
2720
  }
2653
2721
  });
2654
2722
  }
2655
- function Ht(e) {
2656
- e.setTooltipAnchorPositioning(Ne.value), e.interactionState.subscribe(() => {
2723
+ function Xt(e) {
2724
+ e.setTooltipAnchorPositioning(q.value), e.interactionState.subscribe(() => {
2657
2725
  J.value = e.interactionState.peek();
2658
- }), J.value = e.interactionState.peek(), H.value = e.viewport.peek().dpr;
2726
+ }), J.value = e.interactionState.peek(), be.value = e.viewport.peek().dpr;
2659
2727
  }
2660
- function Ut(e) {
2661
- e.setDataFetcher(d.dataFetcher), ue.value = new pe(e), ue.value.on("config:error", (e) => {
2728
+ function Zt(e) {
2729
+ e.setDataFetcher(d.dataFetcher), _e.value = new me(e), _e.value.on("config:error", (e) => {
2662
2730
  console.error("Semantic config error:", e);
2663
- }), ue.value.on("config:ready", () => {
2664
- Ot(), h(() => z.value?.scrollToRight());
2731
+ }), _e.value.on("config:ready", () => {
2732
+ Ft(), h(() => B.value?.scrollToRight());
2665
2733
  });
2666
2734
  }
2667
2735
  return y(() => {
2668
- Ne.value = !1;
2669
- let e = L.value, t = R.value;
2736
+ q.value = !1;
2737
+ let e = R.value, t = re.value;
2670
2738
  if (!e || !t) return;
2671
- let n = Lt();
2739
+ let n = Ut();
2672
2740
  e.addEventListener("wheel", n, { passive: !1 });
2673
- let r = e.querySelector(".canvas-layer"), i = e.querySelector(".x-axis-canvas"), a = Rt(e, r, t.querySelector(".right-axis-host"), i);
2674
- z.value = a, zt(a), Ot(), Bt(a), Vt(a), Ht(a), Ut(a);
2741
+ let r = e.querySelector(".canvas-layer"), i = e.querySelector(".x-axis-canvas"), a = Wt(e, r, t.querySelector(".right-axis-host"), i);
2742
+ B.value = a, Gt(a), Ft(), qt(a), Jt(a), Xt(a), Zt(a);
2675
2743
  }), x(() => {
2676
- let e = z.value;
2677
- e && (z.value = null, e.dispose()), Y.value = null;
2744
+ let e = B.value;
2745
+ e && (B.value = null, e.dispose()), Y.value = null;
2678
2746
  }), M(() => d.yPaddingPx, (e) => {
2679
- z.value?.updateOptionsFacade({ yPaddingPx: e });
2747
+ B.value?.updateOptionsFacade({ yPaddingPx: e });
2680
2748
  }), M(() => d.semanticConfig, async (e, t) => {
2681
2749
  if (e && e !== t) {
2682
- let t = await ue.value?.applyConfig(e);
2750
+ let t = await _e.value?.applyConfig(e);
2683
2751
  t && !t.success && console.error("Semantic config apply failed:", t.errors);
2684
2752
  }
2685
2753
  }, { deep: !0 }), (r, c) => (S(), o("div", {
2686
2754
  ref_key: "chartWrapperRef",
2687
- ref: ee,
2755
+ ref: z,
2688
2756
  class: "chart-wrapper",
2689
- "data-theme": xe.value,
2690
- style: _(Ce.value)
2757
+ "data-theme": U.value,
2758
+ style: _(ke.value)
2691
2759
  }, [
2692
- l(fi, {
2693
- symbol: m.value,
2760
+ l(hi, {
2761
+ symbol: b.value,
2694
2762
  "k-line-level": p.value,
2695
- "symbol-loading": b.value,
2696
- "symbol-error": C.value,
2697
- "overlay-symbols": E.value,
2698
- onAddOverlaySymbol: j,
2699
- onRemoveOverlaySymbol: N,
2700
- onKLineLevelChange: k,
2701
- onToggleIndicator: st,
2702
- onSymbolChange: A
2763
+ "k-line-adjust": m.value,
2764
+ "symbol-loading": E.value,
2765
+ "symbol-error": O.value,
2766
+ "overlay-symbols": k.value,
2767
+ "comparison-colors": Ee.value,
2768
+ "comparison-loading": De.value,
2769
+ onAddOverlaySymbol: F,
2770
+ onRemoveOverlaySymbol: I,
2771
+ onKLineLevelChange: j,
2772
+ onKLineAdjustChange: N,
2773
+ onToggleIndicator: pt,
2774
+ onSymbolChange: P
2703
2775
  }, null, 8, [
2704
2776
  "symbol",
2705
2777
  "k-line-level",
2778
+ "k-line-adjust",
2706
2779
  "symbol-loading",
2707
2780
  "symbol-error",
2708
- "overlay-symbols"
2781
+ "overlay-symbols",
2782
+ "comparison-colors",
2783
+ "comparison-loading"
2709
2784
  ]),
2710
2785
  s("div", { class: g(["chart-stage", {
2711
- "is-dragging": Ue.value,
2712
- "is-resizing-pane": We.value,
2713
- "is-hovering-pane-separator": Ge.value,
2714
- "is-hovering-right-axis": qe.value,
2715
- "is-hovering-kline": Je.value !== null
2716
- }]) }, [l(Er, {
2786
+ "is-dragging": Ye.value,
2787
+ "is-resizing-pane": Xe.value,
2788
+ "is-hovering-pane-separator": Ze.value,
2789
+ "is-hovering-right-axis": $e.value,
2790
+ "is-hovering-kline": et.value !== null
2791
+ }]) }, [l(Dr, {
2717
2792
  ref_key: "toolbarRef",
2718
- ref: ie,
2793
+ ref: ue,
2719
2794
  "is-fullscreen": n.isFullscreen,
2720
- onSelectTool: ot,
2795
+ onSelectTool: ft,
2721
2796
  onToggleFullscreen: c[0] ||= (e) => r.$emit("toggleFullscreen"),
2722
- onZoomIn: c[1] ||= (e) => It(U.value + 1),
2723
- onZoomOut: c[2] ||= (e) => It(U.value - 1),
2724
- onSettingsChange: Ee
2797
+ onZoomIn: c[1] ||= (e) => Ht(V.value + 1),
2798
+ onZoomOut: c[2] ||= (e) => Ht(V.value - 1),
2799
+ onSettingsChange: Fe
2725
2800
  }, null, 8, ["is-fullscreen"]), s("div", {
2726
2801
  class: "chart-main",
2727
2802
  ref_key: "chartMainRef",
2728
- ref: R
2803
+ ref: re
2729
2804
  }, [
2730
- s("div", mi, [(S(!0), o(e, null, T(Re.value, (e) => (S(), o("div", {
2805
+ s("div", _i, [(S(!0), o(e, null, T(We.value, (e) => (S(), o("div", {
2731
2806
  key: e.id,
2732
- class: g(["pane-separator-line", { "is-active": Ke.value === e.id }]),
2807
+ class: g(["pane-separator-line", { "is-active": Qe.value === e.id }]),
2733
2808
  style: _({ top: `${e.top}px` })
2734
2809
  }, null, 6))), 128))]),
2735
2810
  s("div", {
2736
2811
  ref_key: "tooltipLayerRef",
2737
- ref: te,
2812
+ ref: ce,
2738
2813
  class: "tooltip-layer"
2739
2814
  }, null, 512),
2740
2815
  s("div", {
2741
2816
  class: "chart-container",
2742
- style: _({ cursor: Ye.value }),
2817
+ style: _({ cursor: tt.value }),
2743
2818
  ref_key: "containerRef",
2744
- ref: L,
2745
- onScrollPassive: vt,
2746
- onPointerdown: ut,
2747
- onPointermove: dt,
2748
- onPointerup: ft,
2749
- onPointerleave: pt
2819
+ ref: R,
2820
+ onScrollPassive: wt,
2821
+ onPointerdown: gt,
2822
+ onPointermove: _t,
2823
+ onPointerup: vt,
2824
+ onPointerleave: yt
2750
2825
  }, [s("div", {
2751
2826
  class: "scroll-content",
2752
- style: _({ width: Ft.value + "px" })
2753
- }, [s("div", hi, [s("canvas", gi, null, 512), Le.value ? (S(), i(Oe, {
2827
+ style: _({ width: Vt.value + "px" })
2828
+ }, [s("div", vi, [s("canvas", yi, null, 512), Ue.value ? (S(), i(Ae, {
2754
2829
  key: 0,
2755
- drawing: Le.value,
2756
- onUpdateStyle: ct,
2757
- onDelete: lt
2830
+ drawing: Ue.value,
2831
+ onUpdateStyle: mt,
2832
+ onDelete: ht
2758
2833
  }, null, 8, ["drawing"])) : a("", !0)], 512)], 4)], 36),
2759
- te.value ? (S(), i(t, {
2834
+ ce.value ? (S(), i(t, {
2760
2835
  key: 0,
2761
- to: te.value
2836
+ to: ce.value
2762
2837
  }, [
2763
- Xe.value ? (S(), o("div", {
2838
+ nt.value ? (S(), o("div", {
2764
2839
  key: 0,
2765
- class: g(["tooltip-anchor kline-tooltip-anchor", { "use-anchor": Ne.value }]),
2766
- style: _(et.value)
2840
+ class: g(["tooltip-anchor kline-tooltip-anchor", { "use-anchor": q.value }]),
2841
+ style: _(ot.value)
2767
2842
  }, null, 6)) : a("", !0),
2768
- Ve.value || He.value ? (S(), o("div", {
2843
+ qe.value || Je.value ? (S(), o("div", {
2769
2844
  key: 1,
2770
- class: g(["tooltip-anchor marker-tooltip-anchor", { "use-anchor": Ne.value }]),
2771
- style: _(nt.value)
2845
+ class: g(["tooltip-anchor marker-tooltip-anchor", { "use-anchor": q.value }]),
2846
+ style: _(ct.value)
2772
2847
  }, null, 6)) : a("", !0),
2773
- Xe.value ? (S(), i(Gt, {
2848
+ nt.value ? (S(), i(Kt, {
2774
2849
  key: 2,
2775
- k: Xe.value,
2776
- index: Ze.value,
2777
- data: at.value,
2778
- pos: $e.value,
2779
- "set-el": ke,
2780
- "use-anchor": Ne.value,
2781
- "anchor-placement": rt.value,
2782
- "up-color": Se.value.upColor,
2783
- "down-color": Se.value.downColor
2850
+ k: nt.value,
2851
+ index: rt.value,
2852
+ data: dt.value,
2853
+ pos: at.value,
2854
+ "set-el": Le,
2855
+ "use-anchor": q.value,
2856
+ "anchor-placement": lt.value,
2857
+ "up-color": G.value.upColor,
2858
+ "down-color": G.value.downColor,
2859
+ timezone: d.timezone,
2860
+ "show-time": v.value
2784
2861
  }, null, 8, [
2785
2862
  "k",
2786
2863
  "index",
@@ -2789,15 +2866,17 @@ var Ar = m({
2789
2866
  "use-anchor",
2790
2867
  "anchor-placement",
2791
2868
  "up-color",
2792
- "down-color"
2869
+ "down-color",
2870
+ "timezone",
2871
+ "show-time"
2793
2872
  ])) : a("", !0),
2794
- Ve.value || He.value ? (S(), i(Jt, {
2873
+ qe.value || Je.value ? (S(), i(Yt, {
2795
2874
  key: 3,
2796
- marker: Ve.value || He.value,
2797
- pos: tt.value,
2798
- "use-anchor": Ne.value,
2799
- "anchor-placement": it.value,
2800
- "set-el": je
2875
+ marker: qe.value || Je.value,
2876
+ pos: st.value,
2877
+ "use-anchor": q.value,
2878
+ "anchor-placement": ut.value,
2879
+ "set-el": Re
2801
2880
  }, null, 8, [
2802
2881
  "marker",
2803
2882
  "pos",
@@ -2808,27 +2887,27 @@ var Ar = m({
2808
2887
  s("div", {
2809
2888
  class: "right-axis-host",
2810
2889
  ref: "rightAxisLayerRef",
2811
- style: _({ width: Pt.value + "px" }),
2812
- onPointerdown: mt,
2813
- onPointermove: ht,
2814
- onPointerup: gt,
2815
- onPointerleave: _t
2890
+ style: _({ width: Bt.value + "px" }),
2891
+ onPointerdown: bt,
2892
+ onPointermove: xt,
2893
+ onPointerup: St,
2894
+ onPointerleave: Ct
2816
2895
  }, null, 36)
2817
2896
  ], 512)], 2),
2818
- l(At, {
2897
+ l(jt, {
2819
2898
  ref_key: "indicatorSelectorRef",
2820
- ref: ce,
2821
- "active-indicators": xt.value,
2899
+ ref: de,
2900
+ "active-indicators": Dt.value,
2822
2901
  "indicator-params": X.value,
2823
- onToggle: jt,
2824
- onUpdateParams: Mt,
2825
- onReorderSubIndicators: Nt
2902
+ onToggle: Lt,
2903
+ onUpdateParams: Rt,
2904
+ onReorderSubIndicators: zt
2826
2905
  }, null, 8, ["active-indicators", "indicator-params"])
2827
- ], 12, pi));
2906
+ ], 12, gi));
2828
2907
  }
2829
- }), [["__scopeId", "data-v-767b4523"]]), yi = {
2908
+ }), [["__scopeId", "data-v-6dcceacd"]]), Si = {
2830
2909
  name: "@363045841yyt/klinechart",
2831
- version: "0.8.1-alpha.4",
2910
+ version: "0.8.2",
2832
2911
  description: "Vue 3 bindings for @363045841yyt/klinechart-core. Idiomatic composables, SFC components.",
2833
2912
  license: "MIT",
2834
2913
  repository: {
@@ -2900,14 +2979,14 @@ var Ar = m({
2900
2979
  vitest: "^4.1.8",
2901
2980
  vue: "^3.5.35"
2902
2981
  }
2903
- }.version, bi = null;
2904
- function xi(e) {
2905
- bi = e;
2982
+ }.version, Ci = null;
2983
+ function wi(e) {
2984
+ Ci = e;
2906
2985
  }
2907
- function Si(e) {
2986
+ function Ti(e) {
2908
2987
  if (e.container == null) throw Error("[@363045841yyt/klinechart] createChart: `container` is required and must be a non-null HTMLElement");
2909
- if (bi === null) throw Error("[@363045841yyt/klinechart] createChart: no ChartController factory registered. Call __setControllerFactory(...) before mounting (the core package wires this in production).");
2910
- return bi(e);
2988
+ if (Ci === null) throw Error("[@363045841yyt/klinechart] createChart: no ChartController factory registered. Call __setControllerFactory(...) before mounting (the core package wires this in production).");
2989
+ return Ci(e);
2911
2990
  }
2912
2991
  function $(e) {
2913
2992
  let t = D(e.peek());
@@ -2915,9 +2994,9 @@ function $(e) {
2915
2994
  t.value = e.peek();
2916
2995
  })), t;
2917
2996
  }
2918
- function Ci(e, t) {
2997
+ function Ei(e, t) {
2919
2998
  let n = D(null), r = (e) => {
2920
- e == null || n.value != null || (n.value = Si({
2999
+ e == null || n.value != null || (n.value = Ti({
2921
3000
  ...t,
2922
3001
  container: e
2923
3002
  }));
@@ -2935,7 +3014,7 @@ function Ci(e, t) {
2935
3014
  };
2936
3015
  return b(a), v(a), { chart: n };
2937
3016
  }
2938
- function wi(e) {
3017
+ function Di(e) {
2939
3018
  let t = D(e.indicators.peek());
2940
3019
  return b(e.indicators.subscribe(() => {
2941
3020
  t.value = e.indicators.peek();
@@ -2946,26 +3025,26 @@ function wi(e) {
2946
3025
  updateParams: e.updateIndicatorParams.bind(e)
2947
3026
  };
2948
3027
  }
2949
- function Ti(e) {
3028
+ function Oi(e) {
2950
3029
  let t = D(e.interactionState.peek());
2951
3030
  return b(e.interactionState.subscribe(() => {
2952
3031
  t.value = e.interactionState.peek();
2953
3032
  })), t;
2954
3033
  }
2955
- function Ei(e) {
3034
+ function ki(e) {
2956
3035
  let t = D(e.paneRatios.peek());
2957
3036
  return b(e.paneRatios.subscribe(() => {
2958
3037
  t.value = e.paneRatios.peek();
2959
3038
  })), t;
2960
3039
  }
2961
- function Di(e) {
3040
+ function Ai(e) {
2962
3041
  let t = D(e.viewport.peek());
2963
3042
  return b(e.viewport.subscribe(() => {
2964
3043
  t.value = e.viewport.peek();
2965
3044
  })), t;
2966
3045
  }
2967
- function Oi(e) {
2968
- let t = te({ catalog: e.catalog });
3046
+ function ji(e) {
3047
+ let t = R({ catalog: e.catalog });
2969
3048
  b(() => t.dispose());
2970
3049
  let n = $(t.filteredMain), r = $(t.filteredSub), i = $(t.menuOpen), a = $(t.searchQuery);
2971
3050
  function o(t) {
@@ -2993,7 +3072,7 @@ function Oi(e) {
2993
3072
  isActive: c
2994
3073
  };
2995
3074
  }
2996
- var ki = u({
3075
+ var Mi = u({
2997
3076
  name: "KLineChart",
2998
3077
  props: {
2999
3078
  data: {
@@ -3026,7 +3105,7 @@ var ki = u({
3026
3105
  y(() => {
3027
3106
  let n = r.value;
3028
3107
  n != null && (i.run(() => {
3029
- if (a.value = Si({
3108
+ if (a.value = Ti({
3030
3109
  container: n,
3031
3110
  data: e.data,
3032
3111
  initialZoomLevel: e.initialZoomLevel,
@@ -3072,9 +3151,9 @@ var ki = u({
3072
3151
  }
3073
3152
  });
3074
3153
  }
3075
- }), Ai = { install(e) {
3076
- e.component("KLineChart", ki);
3154
+ }), Ni = { install(e) {
3155
+ e.component("KLineChart", Mi);
3077
3156
  } };
3078
- xi(ee);
3157
+ wi(te);
3079
3158
  //#endregion
3080
- export { R as CORE_VERSION, Oe as DrawingStyleToolbar, qe as IndicatorParams, At as IndicatorSelector, ki as KLineChart, vi as KLineChartVue, Gt as KLineTooltip, Ai as KMapPlugin, Er as LeftToolbar, Jt as MarkerTooltip, yi as VERSION, xi as __setControllerFactory, $ as coreSignalToVueRef, Si as createChart, Ci as useChart, Oi as useIndicatorSelector, wi as useIndicators, Ti as useInteractionState, Ei as usePaneRatios, Di as useViewport };
3159
+ export { L as CORE_VERSION, Ae as DrawingStyleToolbar, Je as IndicatorParams, jt as IndicatorSelector, Mi as KLineChart, xi as KLineChartVue, Kt as KLineTooltip, Ni as KMapPlugin, Dr as LeftToolbar, Yt as MarkerTooltip, Si as VERSION, wi as __setControllerFactory, $ as coreSignalToVueRef, Ti as createChart, Ei as useChart, ji as useIndicatorSelector, Di as useIndicators, Oi as useInteractionState, ki as usePaneRatios, Ai as useViewport };