@363045841yyt/klinechart 0.8.5 → 0.8.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/README.md +6 -1
  2. package/dist/components/BaseModal.vue.d.ts +54 -0
  3. package/dist/components/BaseModal.vue.d.ts.map +1 -0
  4. package/dist/components/BatchStockDialog.vue.d.ts.map +1 -1
  5. package/dist/components/ChartSettingsDialog.vue.d.ts.map +1 -1
  6. package/dist/components/ColorPresetPanel.vue.d.ts +4 -1
  7. package/dist/components/ColorPresetPanel.vue.d.ts.map +1 -1
  8. package/dist/components/DrawingStyleToolbar.vue.d.ts.map +1 -1
  9. package/dist/components/ExportProgressDialog.vue.d.ts.map +1 -1
  10. package/dist/components/IndicatorParams.vue.d.ts.map +1 -1
  11. package/dist/components/IndicatorSelector.vue.d.ts.map +1 -1
  12. package/dist/components/KLineChart.vue.d.ts.map +1 -1
  13. package/dist/components/RangeSelectionExport.vue.d.ts +23 -0
  14. package/dist/components/RangeSelectionExport.vue.d.ts.map +1 -0
  15. package/dist/components/common/CanvasToolbar.vue.d.ts +14 -0
  16. package/dist/components/common/CanvasToolbar.vue.d.ts.map +1 -0
  17. package/dist/components/common/CanvasToolbarStack.vue.d.ts +14 -0
  18. package/dist/components/common/CanvasToolbarStack.vue.d.ts.map +1 -0
  19. package/dist/composables/chart/useRangeSelection.d.ts +1 -0
  20. package/dist/composables/chart/useRangeSelection.d.ts.map +1 -1
  21. package/dist/composables/useTeleportedPopup.d.ts.map +1 -1
  22. package/dist/index.cjs +6 -6
  23. package/dist/index.css +1 -1
  24. package/dist/index.js +1293 -1215
  25. package/dist/web-component.d.ts.map +1 -1
  26. package/package.json +1 -1
  27. package/src/components/BaseModal.vue +292 -0
  28. package/src/components/BatchStockDialog.vue +15 -180
  29. package/src/components/ChartSettingsDialog.vue +248 -405
  30. package/src/components/ColorPresetPanel.vue +58 -106
  31. package/src/components/CompareSymbolSelector.vue +2 -2
  32. package/src/components/DrawingStyleToolbar.vue +33 -72
  33. package/src/components/ExportProgressDialog.vue +25 -133
  34. package/src/components/IndicatorParams.vue +194 -321
  35. package/src/components/IndicatorSelector.vue +188 -405
  36. package/src/components/KLineChart.vue +34 -138
  37. package/src/components/LeftToolbar.vue +1 -1
  38. package/src/components/RangeSelectionExport.vue +117 -0
  39. package/src/components/SymbolSelector.vue +2 -2
  40. package/src/components/common/CanvasToolbar.vue +70 -0
  41. package/src/components/common/CanvasToolbarStack.vue +32 -0
  42. package/src/composables/chart/useRangeSelection.ts +7 -0
  43. package/src/composables/useTeleportedPopup.ts +15 -2
package/dist/index.js CHANGED
@@ -1,95 +1,95 @@
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, isRef as m, markRaw as h, nextTick as g, normalizeClass as _, normalizeStyle as v, onBeforeUnmount as y, onMounted as b, onScopeDispose as x, onUnmounted as S, openBlock as C, provide as w, ref as T, renderList as E, resolveDynamicComponent as D, shallowRef as O, toDisplayString as k, unref as A, vModelCheckbox as j, vModelText as M, watch as N, withCtx as P, withDirectives as F, withKeys as I, withModifiers as L } from "vue";
2
- import { COLOR_PRESET_ITEMS as R, VERSION as z, createChartController as ee, createIndicatorSelectorController as te, darkTheme as B, formatTimestamp as V, lightTheme as ne, normalizeColorPresetSettings as H, resolveThemeColors as re, themeToCssVars as ie } from "@363045841yyt/klinechart-core";
3
- import { DrawingInteractionController as ae, allIndicators as oe, createChartController as se, createIndicatorSelectorController as ce, findIndicator as U, isBuiltinIndicatorsLoaded as le, kGapFromKWidth as ue, loadBuiltinIndicators 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 W, SETTINGS_STORAGE_KEY as he } from "@363045841yyt/klinechart-core/config";
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, isRef as m, markRaw as h, nextTick as g, normalizeClass as _, normalizeStyle as v, onBeforeUnmount as y, onMounted as b, onScopeDispose as x, onUnmounted as S, openBlock as C, provide as w, ref as T, renderList as E, renderSlot as D, resolveDynamicComponent as O, shallowRef as k, toDisplayString as A, unref as j, vModelCheckbox as M, vModelText as N, watch as P, withCtx as F, withDirectives as I, withKeys as L, withModifiers as R } from "vue";
2
+ import { COLOR_PRESET_ITEMS as z, VERSION as ee, createChartController as te, createIndicatorSelectorController as B, darkTheme as ne, formatTimestamp as V, lightTheme as re, normalizeColorPresetSettings as ie, resolveThemeColors as ae, themeToCssVars as oe } from "@363045841yyt/klinechart-core";
3
+ import { DrawingInteractionController as se, allIndicators as H, createChartController as ce, createIndicatorSelectorController as le, findIndicator as U, isBuiltinIndicatorsLoaded as ue, kGapFromKWidth as de, loadBuiltinIndicators 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 W, 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 ge = { class: "color-preset-tools" }, _e = {
8
+ var _e = { class: "color-preset-container" }, ve = {
9
9
  class: "theme-tabs",
10
10
  role: "tablist",
11
11
  "aria-label": "颜色主题"
12
- }, ve = ["onClick"], ye = { class: "color-group-label" }, be = { class: "color-grid" }, xe = ["value", "onInput"], Se = /*@__PURE__*/ u({
12
+ }, ye = ["onClick"], be = { class: "color-group-label" }, xe = { class: "color-grid" }, Se = { class: "color-item-text" }, G = ["value", "onInput"], K = /*@__PURE__*/ u({
13
13
  __name: "ColorPresetPanel",
14
14
  props: { colorPresetSettings: {} },
15
15
  emits: ["update:colorPresetSettings"],
16
- setup(t, { emit: n }) {
17
- let i = t, a = n, c = [{
16
+ setup(t, { expose: n, emit: i }) {
17
+ let a = t, c = i, l = [{
18
18
  value: "light",
19
19
  label: "浅色"
20
20
  }, {
21
21
  value: "dark",
22
22
  label: "深色"
23
- }], l = {
23
+ }], u = {
24
24
  canvas: "画布",
25
25
  candle: "K线 / 成交量",
26
26
  axis: "坐标轴",
27
27
  interaction: "交互 / 标记"
28
- }, u = r(() => Object.keys(l).map((e) => ({
28
+ }, d = r(() => Object.keys(u).map((e) => ({
29
29
  group: e,
30
- label: l[e],
31
- items: R.filter((t) => t.group === e)
32
- })).filter((e) => e.items.length > 0)), d = T("light");
33
- function f(e, t) {
34
- return (e === "dark" ? B : ne).colors[t];
30
+ label: u[e],
31
+ items: z.filter((t) => t.group === e)
32
+ })).filter((e) => e.items.length > 0)), f = T("light");
33
+ function p(e, t) {
34
+ return (e === "dark" ? ne : re).colors[t];
35
35
  }
36
- function p(e) {
37
- return H(i.colorPresetSettings)[d.value]?.[e] ?? f(d.value, e);
36
+ function m(e) {
37
+ return ie(a.colorPresetSettings)[f.value]?.[e] ?? p(f.value, e);
38
38
  }
39
- function m(e, t) {
40
- let n = H(i.colorPresetSettings);
41
- a("update:colorPresetSettings", {
39
+ function h(e, t) {
40
+ let n = ie(a.colorPresetSettings);
41
+ c("update:colorPresetSettings", {
42
42
  ...n,
43
- [d.value]: {
44
- ...n[d.value],
43
+ [f.value]: {
44
+ ...n[f.value],
45
45
  [e]: t
46
46
  }
47
47
  });
48
48
  }
49
- function h() {
50
- let e = { ...H(i.colorPresetSettings) };
51
- delete e[d.value], a("update:colorPresetSettings", e);
49
+ function g() {
50
+ let e = { ...ie(a.colorPresetSettings) };
51
+ delete e[f.value], c("update:colorPresetSettings", e);
52
52
  }
53
- return (t, n) => (C(), o("div", null, [s("div", ge, [s("div", _e, [(C(), o(e, null, E(c, (e) => s("button", {
53
+ return n({ resetCurrentThemeColors: g }), (t, n) => (C(), o("div", _e, [s("div", ve, [(C(), o(e, null, E(l, (e) => s("button", {
54
54
  key: e.value,
55
55
  type: "button",
56
- class: _(["theme-tab", { active: d.value === e.value }]),
57
- onClick: (t) => d.value = e.value
58
- }, k(e.label), 11, ve)), 64))]), s("button", {
59
- type: "button",
60
- class: "color-reset-btn",
61
- onClick: h
62
- }, " 重置颜色 ")]), (C(!0), o(e, null, E(u.value, (t) => (C(), o(e, { key: t.group }, [s("div", ye, k(t.label), 1), s("div", be, [(C(!0), o(e, null, E(t.items, (e) => (C(), o("label", {
56
+ class: _(["theme-tab", { active: f.value === e.value }]),
57
+ onClick: (t) => f.value = e.value
58
+ }, A(e.label), 11, ye)), 64))]), (C(!0), o(e, null, E(d.value, (t) => (C(), o(e, { key: t.group }, [s("div", be, A(t.label), 1), s("div", xe, [(C(!0), o(e, null, E(t.items, (e) => (C(), o("label", {
63
59
  key: e.key,
64
60
  class: "color-item"
65
- }, [s("span", null, k(e.label), 1), s("input", {
61
+ }, [s("span", Se, A(e.label), 1), s("input", {
66
62
  type: "color",
67
63
  class: "color-input",
68
- value: p(e.key),
69
- onInput: (t) => m(e.key, t.target.value)
70
- }, null, 40, xe)]))), 128))])], 64))), 128))]));
64
+ value: m(e.key),
65
+ onInput: (t) => h(e.key, t.target.value)
66
+ }, null, 40, G)]))), 128))])], 64))), 128))]));
71
67
  }
72
- }), G = (e, t) => {
68
+ }), q = (e, t) => {
73
69
  let n = e.__vccOpts || e;
74
70
  for (let [e, r] of t) n[e] = r;
75
71
  return n;
76
- }, K = /*#__PURE__*/ G(Se, [["__scopeId", "data-v-a52947a4"]]);
72
+ }, Ce = /*#__PURE__*/ q(K, [["__scopeId", "data-v-14ed826d"]]);
77
73
  //#endregion
78
74
  //#region src/composables/useTeleportedPopup.ts
79
- function q(e, t, n = 4) {
75
+ function we(e, t, n = 4) {
80
76
  let r = T({});
81
77
  function i() {
82
- let t = e.value;
83
- if (!t) return;
84
- let i = t.getBoundingClientRect();
78
+ let i = e.value;
79
+ if (!i) return;
80
+ let a = i.getBoundingClientRect(), o = t.value, s = a.left;
81
+ if (o) {
82
+ let e = o.offsetWidth, t = window.innerWidth;
83
+ s + e > t - 8 && (s = Math.max(8, t - e - 8));
84
+ }
85
85
  r.value = {
86
86
  position: "fixed",
87
- top: `${i.bottom + n}px`,
88
- left: `${i.left}px`
87
+ top: `${a.bottom + n}px`,
88
+ left: `${s}px`
89
89
  };
90
90
  }
91
91
  function a() {
92
- i(), document.addEventListener("scroll", i, {
92
+ i(), g(() => i()), document.addEventListener("scroll", i, {
93
93
  capture: !0,
94
94
  passive: !0
95
95
  }), window.addEventListener("resize", i, { passive: !0 });
@@ -106,24 +106,24 @@ function q(e, t, n = 4) {
106
106
  }
107
107
  //#endregion
108
108
  //#region src/composables/useFullscreenTeleportTarget.ts
109
- var Ce = Symbol("fullscreen-teleport-target");
110
- function we(e) {
111
- w(Ce, e);
109
+ var Te = Symbol("fullscreen-teleport-target");
110
+ function Ee(e) {
111
+ w(Te, e);
112
112
  }
113
- function J() {
114
- let e = p(Ce, null);
113
+ function De() {
114
+ let e = p(Te, null);
115
115
  return r(() => e?.value ?? "body");
116
116
  }
117
117
  //#endregion
118
118
  //#region src/components/Dropdown.vue?vue&type=script&setup=true&lang.ts
119
- var Te = [
119
+ var Oe = [
120
120
  "title",
121
121
  "aria-expanded",
122
122
  "onKeydown"
123
- ], Ee = {
123
+ ], ke = {
124
124
  key: 0,
125
125
  class: "dropdown__label"
126
- }, De = { class: "dropdown__value" }, Oe = ["aria-selected", "onClick"], ke = 0, Ae = null, je = 0, Y = /*#__PURE__*/ G(/* @__PURE__ */ u({
126
+ }, Ae = { class: "dropdown__value" }, je = ["aria-selected", "onClick"], Me = 0, Ne = null, Pe = 0, J = /*#__PURE__*/ q(/* @__PURE__ */ u({
127
127
  __name: "Dropdown",
128
128
  props: {
129
129
  modelValue: {},
@@ -135,7 +135,7 @@ var Te = [
135
135
  },
136
136
  emits: ["update:modelValue"],
137
137
  setup(n, { emit: c }) {
138
- let l = n, u = c, d = T(null), f = T(null), p = T(null), m = T(!1), h = T(0), g = ++je, b = J(), { popupStyle: x, startPositionSync: S, stopPositionSync: w } = q(f, p, 4), D = r(() => l.minWidth ? { minWidth: l.minWidth } : {}), O = r(() => {
138
+ let l = n, u = c, d = T(null), f = T(null), p = T(null), m = T(!1), h = T(0), g = ++Pe, b = De(), { popupStyle: x, startPositionSync: S, stopPositionSync: w } = we(f, p, 4), D = r(() => l.minWidth ? { minWidth: l.minWidth } : {}), O = r(() => {
139
139
  if (!m.value) return;
140
140
  let e = h.value || (l.minWidth ? parseInt(l.minWidth) : 0);
141
141
  return {
@@ -143,20 +143,20 @@ var Te = [
143
143
  zIndex: 1010,
144
144
  ...x.value
145
145
  };
146
- }), j = r(() => {
146
+ }), k = r(() => {
147
147
  let e = l.modelValue?.trim();
148
148
  return e && l.options.some((t) => t.value === e) ? e : l.options[0]?.value ?? "";
149
- }), M = r(() => l.options.find((e) => e.value === j.value) ?? l.options[0]);
149
+ }), M = r(() => l.options.find((e) => e.value === k.value) ?? l.options[0]);
150
150
  function N() {
151
- ke !== g && Ae && Ae(), !m.value && (ke = g, Ae = P, h.value = f.value?.offsetWidth ?? 0, m.value = !0, S(), document.addEventListener("pointerdown", z));
151
+ Me !== g && Ne && Ne(), !m.value && (Me = g, Ne = P, h.value = f.value?.offsetWidth ?? 0, m.value = !0, S(), document.addEventListener("pointerdown", z));
152
152
  }
153
153
  function P() {
154
- m.value && (m.value = !1, ke === g && (ke = 0, Ae = null), w(), document.removeEventListener("pointerdown", z));
154
+ m.value && (m.value = !1, Me === g && (Me = 0, Ne = null), w(), document.removeEventListener("pointerdown", z));
155
155
  }
156
156
  function F() {
157
157
  m.value ? P() : N();
158
158
  }
159
- function R(e) {
159
+ function I(e) {
160
160
  u("update:modelValue", e), P();
161
161
  }
162
162
  function z(e) {
@@ -178,19 +178,19 @@ var Te = [
178
178
  "aria-expanded": m.value,
179
179
  onClick: F,
180
180
  onKeydown: [
181
- I(L(P, ["stop"]), ["escape"]),
182
- I(L(N, ["prevent"]), ["down"]),
183
- I(L(F, ["prevent"]), ["enter"]),
184
- I(L(F, ["prevent"]), ["space"])
181
+ L(R(P, ["stop"]), ["escape"]),
182
+ L(R(N, ["prevent"]), ["down"]),
183
+ L(R(F, ["prevent"]), ["enter"]),
184
+ L(R(F, ["prevent"]), ["space"])
185
185
  ]
186
186
  }, [
187
- n.label ? (C(), o("span", Ee, k(n.label), 1)) : a("", !0),
188
- s("span", De, k(M.value.label), 1),
187
+ n.label ? (C(), o("span", ke, A(n.label), 1)) : a("", !0),
188
+ s("span", Ae, A(M.value.label), 1),
189
189
  c[0] ||= s("span", {
190
190
  class: "dropdown__chevron",
191
191
  "aria-hidden": "true"
192
192
  }, null, -1)
193
- ], 44, Te), (C(), i(t, { to: A(b) }, [m.value ? (C(), o("div", {
193
+ ], 44, Oe), (C(), i(t, { to: j(b) }, [m.value ? (C(), o("div", {
194
194
  key: 0,
195
195
  ref_key: "menuRef",
196
196
  ref: p,
@@ -201,16 +201,25 @@ var Te = [
201
201
  }, [(C(!0), o(e, null, E(n.options, (e) => (C(), o("button", {
202
202
  key: e.value,
203
203
  type: "button",
204
- class: _(["dropdown__option", { "is-selected": e.value === j.value }]),
204
+ class: _(["dropdown__option", { "is-selected": e.value === k.value }]),
205
205
  role: "option",
206
- "aria-selected": e.value === j.value,
207
- onClick: (t) => R(e.value)
208
- }, k(e.label), 11, Oe))), 128))], 4)) : a("", !0)], 8, ["to"]))], 2));
206
+ "aria-selected": e.value === k.value,
207
+ onClick: (t) => I(e.value)
208
+ }, A(e.label), 11, je))), 128))], 4)) : a("", !0)], 8, ["to"]))], 2));
209
209
  }
210
- }), [["__scopeId", "data-v-bab778b8"]]), Me = {
211
- class: "toolbar-item color-item",
210
+ }), [["__scopeId", "data-v-bab778b8"]]), Fe = {};
211
+ function Ie(e, t) {
212
+ return C(), o("div", {
213
+ class: "canvas-toolbar",
214
+ onPointerdown: t[0] ||= R(() => {}, ["stop"]),
215
+ onPointermove: t[1] ||= R(() => {}, ["stop"]),
216
+ onPointerup: t[2] ||= R(() => {}, ["stop"])
217
+ }, [D(e.$slots, "default", {}, void 0, !0)], 32);
218
+ }
219
+ var Le = /*#__PURE__*/ q(Fe, [["render", Ie], ["__scopeId", "data-v-4f016899"]]), Re = {
220
+ class: "color-item",
212
221
  title: "颜色"
213
- }, Ne = ["value"], Pe = /*#__PURE__*/ G(/* @__PURE__ */ u({
222
+ }, ze = ["value"], Be = /*#__PURE__*/ q(/* @__PURE__ */ u({
214
223
  __name: "DrawingStyleToolbar",
215
224
  props: { drawing: {} },
216
225
  emits: ["updateStyle", "delete"],
@@ -245,86 +254,166 @@ var Te = [
245
254
  label: "点线",
246
255
  value: "dotted"
247
256
  }
248
- ], i = t;
249
- function a(e) {
250
- e.key === "Delete" && (e.preventDefault(), i("delete"));
257
+ ], a = t;
258
+ function o(e) {
259
+ e.key === "Delete" && (e.preventDefault(), a("delete"));
251
260
  }
252
- b(() => document.addEventListener("keydown", a)), S(() => document.removeEventListener("keydown", a));
261
+ b(() => document.addEventListener("keydown", o)), S(() => document.removeEventListener("keydown", o));
253
262
  function c(e) {
254
- i("updateStyle", { stroke: e });
263
+ a("updateStyle", { stroke: e });
255
264
  }
256
265
  function u(e) {
257
- i("updateStyle", { strokeWidth: e });
266
+ a("updateStyle", { strokeWidth: e });
258
267
  }
259
268
  function d(e) {
260
- i("updateStyle", { strokeStyle: e });
261
- }
262
- return (t, i) => (C(), o("div", {
263
- class: "drawing-style-toolbar",
264
- onPointerdown: i[4] ||= L(() => {}, ["stop"]),
265
- onPointermove: i[5] ||= L(() => {}, ["stop"]),
266
- onPointerup: i[6] ||= L(() => {}, ["stop"])
267
- }, [
268
- s("div", Me, [s("span", {
269
- class: "color-swatch",
270
- style: v({ background: e.drawing.style.stroke ?? "#2962ff" })
271
- }, null, 4), s("input", {
272
- type: "color",
273
- class: "color-input",
274
- value: e.drawing.style.stroke ?? "#2962ff",
275
- onInput: i[0] ||= (e) => c(e.target.value)
276
- }, null, 40, Ne)]),
277
- l(Y, {
278
- "model-value": String(e.drawing.style.strokeWidth ?? 1),
279
- options: n,
280
- size: "sm",
281
- title: "线宽",
282
- "onUpdate:modelValue": i[1] ||= (e) => u(Number(e))
283
- }, null, 8, ["model-value"]),
284
- l(Y, {
285
- "model-value": e.drawing.style.strokeStyle ?? "solid",
286
- options: r,
287
- size: "sm",
288
- title: "线型",
289
- "onUpdate:modelValue": i[2] ||= (e) => d(e)
290
- }, null, 8, ["model-value"]),
291
- s("button", {
292
- type: "button",
293
- class: "toolbar-btn delete-btn",
294
- title: "删除",
295
- onClick: i[3] ||= (e) => t.$emit("delete")
296
- }, [...i[7] ||= [s("svg", {
297
- class: "delete-icon",
298
- viewBox: "0 0 24 24",
299
- fill: "none",
300
- stroke: "currentColor",
301
- "stroke-width": "2",
302
- "stroke-linecap": "round",
303
- "stroke-linejoin": "round",
304
- "aria-hidden": "true"
305
- }, [
306
- s("path", { d: "M3 6h18" }),
307
- s("path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" }),
308
- s("path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" })
309
- ], -1)]])
310
- ], 32));
269
+ a("updateStyle", { strokeStyle: e });
270
+ }
271
+ return (t, a) => (C(), i(Le, null, {
272
+ default: F(() => [
273
+ s("div", Re, [s("span", {
274
+ class: "color-swatch",
275
+ style: v({ background: e.drawing.style.stroke ?? "#2962ff" })
276
+ }, null, 4), s("input", {
277
+ type: "color",
278
+ class: "color-input",
279
+ value: e.drawing.style.stroke ?? "#2962ff",
280
+ onInput: a[0] ||= (e) => c(e.target.value)
281
+ }, null, 40, ze)]),
282
+ l(J, {
283
+ "model-value": String(e.drawing.style.strokeWidth ?? 1),
284
+ options: n,
285
+ size: "sm",
286
+ title: "线宽",
287
+ "onUpdate:modelValue": a[1] ||= (e) => u(Number(e))
288
+ }, null, 8, ["model-value"]),
289
+ l(J, {
290
+ "model-value": e.drawing.style.strokeStyle ?? "solid",
291
+ options: r,
292
+ size: "sm",
293
+ title: "线型",
294
+ "onUpdate:modelValue": a[2] ||= (e) => d(e)
295
+ }, null, 8, ["model-value"]),
296
+ s("button", {
297
+ type: "button",
298
+ class: "toolbar-btn toolbar-btn--delete",
299
+ title: "删除",
300
+ onClick: a[3] ||= (e) => t.$emit("delete")
301
+ }, [...a[4] ||= [s("svg", {
302
+ class: "delete-icon",
303
+ viewBox: "0 0 24 24",
304
+ fill: "none",
305
+ stroke: "currentColor",
306
+ "stroke-width": "2",
307
+ "stroke-linecap": "round",
308
+ "stroke-linejoin": "round",
309
+ "aria-hidden": "true"
310
+ }, [
311
+ s("path", { d: "M3 6h18" }),
312
+ s("path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" }),
313
+ s("path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" })
314
+ ], -1)]])
315
+ ]),
316
+ _: 1
317
+ }));
318
+ }
319
+ }), [["__scopeId", "data-v-619a545d"]]), Ve = {
320
+ key: 0,
321
+ class: "base-header"
322
+ }, He = { class: "base-header-left" }, Ue = { class: "base-title" }, We = {
323
+ key: 0,
324
+ class: "base-subtitle"
325
+ }, Ge = {
326
+ key: 0,
327
+ class: "base-header-right"
328
+ }, Ke = {
329
+ key: 1,
330
+ class: "base-subheader"
331
+ }, Y = /*#__PURE__*/ q(/* @__PURE__ */ u({
332
+ __name: "BaseModal",
333
+ props: {
334
+ show: { type: Boolean },
335
+ title: { default: "" },
336
+ subtitle: { default: "" },
337
+ zIndex: { default: 1e3 },
338
+ width: { default: "min(92vw, 400px)" },
339
+ maxWidth: { default: "" },
340
+ maxHeight: { default: "min(600px, calc(100vh - 48px))" },
341
+ overlayPadding: { default: "24px" },
342
+ bodyPadding: { default: "16px 20px" },
343
+ footerAlign: { default: "flex-end" },
344
+ closeOnOverlay: {
345
+ type: Boolean,
346
+ default: !0
347
+ },
348
+ showClose: {
349
+ type: Boolean,
350
+ default: !0
351
+ },
352
+ transitionVariant: { default: "default" }
353
+ },
354
+ emits: ["close"],
355
+ setup(e, { emit: c }) {
356
+ let u = e, d = c, f = De(), p = r(() => u.transitionVariant === "compact" ? "modal-compact" : "modal"), m = r(() => ({
357
+ width: u.width,
358
+ maxWidth: u.maxWidth || void 0,
359
+ maxHeight: u.maxHeight
360
+ }));
361
+ return (r, c) => (C(), i(t, { to: j(f) }, [l(n, { name: "overlay" }, {
362
+ default: F(() => [e.show ? (C(), o("div", {
363
+ key: 0,
364
+ class: "base-overlay",
365
+ style: v({
366
+ zIndex: e.zIndex,
367
+ padding: e.overlayPadding
368
+ }),
369
+ onClick: c[2] ||= (t) => e.closeOnOverlay ? d("close") : void 0
370
+ }, [l(n, { name: p.value }, {
371
+ default: F(() => [s("div", {
372
+ class: "base-modal",
373
+ style: v(m.value),
374
+ onClick: c[1] ||= R(() => {}, ["stop"])
375
+ }, [
376
+ r.$slots.header || e.title ? (C(), o("div", Ve, [D(r.$slots, "header", {}, () => [s("div", He, [s("span", Ue, A(e.title), 1), e.subtitle ? (C(), o("span", We, A(e.subtitle), 1)) : a("", !0)])], !0), e.showClose ? (C(), o("div", Ge, [D(r.$slots, "header-extra", {}, void 0, !0), s("button", {
377
+ class: "base-close-btn",
378
+ onClick: c[0] ||= (e) => d("close")
379
+ }, [...c[3] ||= [s("svg", {
380
+ viewBox: "0 0 24 24",
381
+ fill: "none",
382
+ stroke: "currentColor",
383
+ "stroke-width": "2"
384
+ }, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])])) : a("", !0)])) : a("", !0),
385
+ r.$slots.subheader ? (C(), o("div", Ke, [D(r.$slots, "subheader", {}, void 0, !0)])) : a("", !0),
386
+ s("div", {
387
+ class: "base-body",
388
+ style: v({ padding: e.bodyPadding })
389
+ }, [D(r.$slots, "default", {}, void 0, !0)], 4),
390
+ r.$slots.footer ? (C(), o("div", {
391
+ key: 2,
392
+ class: "base-footer",
393
+ style: v({ justifyContent: e.footerAlign })
394
+ }, [D(r.$slots, "footer", {}, void 0, !0)], 4)) : a("", !0)
395
+ ], 4)]),
396
+ _: 3
397
+ }, 8, ["name"])], 4)) : a("", !0)]),
398
+ _: 3
399
+ })], 8, ["to"]));
311
400
  }
312
- }), [["__scopeId", "data-v-e9b6a8a9"]]), Fe = { class: "params-header" }, Ie = { class: "header-left" }, Le = { class: "params-title" }, Re = { class: "header-right" }, ze = {
401
+ }), [["__scopeId", "data-v-38747c12"]]), qe = {
313
402
  key: 0,
314
403
  class: "indicator-description"
315
- }, Be = { class: "params-body" }, Ve = { class: "param-header" }, He = { class: "param-label" }, Ue = { class: "param-label-text" }, We = {
404
+ }, Je = { class: "params-body" }, Ye = { class: "param-header" }, Xe = { class: "param-label" }, Ze = { class: "param-label-text" }, Qe = {
316
405
  key: 0,
317
406
  class: "param-range"
318
- }, Ge = { class: "input-wrapper" }, Ke = ["disabled", "onClick"], qe = [
407
+ }, $e = { class: "input-wrapper" }, et = ["disabled", "onClick"], tt = [
319
408
  "value",
320
409
  "min",
321
410
  "max",
322
411
  "step",
323
412
  "onInput"
324
- ], Je = ["disabled", "onClick"], Ye = {
413
+ ], nt = ["disabled", "onClick"], rt = {
325
414
  key: 0,
326
415
  class: "param-description"
327
- }, Xe = { class: "params-footer" }, Ze = { class: "footer-right" }, Qe = /*#__PURE__*/ G(/* @__PURE__ */ u({
416
+ }, it = { class: "footer-right" }, at = /*#__PURE__*/ q(/* @__PURE__ */ u({
328
417
  __name: "IndicatorParams",
329
418
  props: {
330
419
  visible: { type: Boolean },
@@ -335,142 +424,128 @@ var Te = [
335
424
  values: {}
336
425
  },
337
426
  emits: ["close", "confirm"],
338
- setup(r, { emit: u }) {
339
- let d = r, f = u, p = T({ ...d.values }), m = T(!0), h = J();
340
- N(() => d.values, (e) => {
341
- p.value = { ...e };
427
+ setup(t, { emit: r }) {
428
+ let u = t, d = r, f = T({ ...u.values }), p = T(!0);
429
+ P(() => u.values, (e) => {
430
+ f.value = { ...e };
342
431
  }, {
343
432
  deep: !0,
344
433
  immediate: !0
345
- }), N(() => d.visible, (e) => {
346
- e && (p.value = { ...d.values });
434
+ }), P(() => u.visible, (e) => {
435
+ e && (f.value = { ...u.values });
347
436
  });
348
- function g(e, t) {
437
+ function m(e, t) {
349
438
  let n = t.target, r = parseFloat(n.value);
350
- isNaN(r) || (p.value[e] = r);
439
+ isNaN(r) || (f.value[e] = r);
351
440
  }
352
- function v(e, t) {
353
- let n = e.step || 1, r = (p.value[e.key] || 0) + t * n;
354
- e.min !== void 0 && (r = Math.max(e.min, r)), e.max !== void 0 && (r = Math.min(e.max, r)), p.value[e.key] = parseFloat(r.toFixed(10));
441
+ function h(e, t) {
442
+ let n = e.step || 1, r = (f.value[e.key] || 0) + t * n;
443
+ e.min !== void 0 && (r = Math.max(e.min, r)), e.max !== void 0 && (r = Math.min(e.max, r)), f.value[e.key] = parseFloat(r.toFixed(10));
355
444
  }
356
- function y() {
445
+ function g() {
357
446
  let e = {};
358
- d.params.forEach((t) => {
359
- e[t.key] = t.default ?? d.values[t.key] ?? 0;
360
- }), p.value = e;
361
- }
362
- function b() {
363
- f("confirm", { ...p.value });
364
- }
365
- return (u, d) => (C(), i(t, { to: A(h) }, [l(n, { name: "overlay" }, {
366
- default: P(() => [r.visible ? (C(), o("div", {
367
- key: 0,
368
- class: "params-overlay",
369
- onClick: d[4] ||= (e) => u.$emit("close")
370
- }, [l(n, { name: "modal" }, {
371
- default: P(() => [s("div", {
372
- class: "indicator-params",
373
- onClick: d[3] ||= L(() => {}, ["stop"])
374
- }, [
375
- s("div", Fe, [s("div", Ie, [s("span", Le, k(r.indicatorName), 1), d[5] ||= s("span", { class: "params-subtitle" }, "参数设置", -1)]), s("div", Re, [s("button", {
376
- class: _(["toggle-desc-btn", { active: m.value }]),
377
- onClick: d[0] ||= (e) => m.value = !m.value,
378
- title: "显示/隐藏说明"
379
- }, [...d[6] ||= [s("svg", { viewBox: "0 0 1024 1024" }, [s("path", {
380
- d: "M512 97.52381c228.912762 0 414.47619 185.563429 414.47619 414.47619s-185.563429 414.47619-414.47619 414.47619S97.52381 740.912762 97.52381 512 283.087238 97.52381 512 97.52381z m0 73.142857C323.486476 170.666667 170.666667 323.486476 170.666667 512s152.81981 341.333333 341.333333 341.333333 341.333333-152.81981 341.333333-341.333333S700.513524 170.666667 512 170.666667z m36.571429 268.190476v292.571428h-73.142858V438.857143h73.142858z m0-121.904762v73.142857h-73.142858v-73.142857h73.142858z",
381
- fill: "currentColor"
382
- })], -1)]], 2), s("button", {
383
- class: "params-close",
384
- onClick: d[1] ||= (e) => u.$emit("close")
385
- }, [...d[7] ||= [s("svg", {
386
- viewBox: "0 0 24 24",
387
- fill: "none",
388
- stroke: "currentColor",
389
- "stroke-width": "2"
390
- }, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])])]),
391
- l(n, { name: "slide" }, {
392
- default: P(() => [m.value && r.indicatorDescription ? (C(), o("div", ze, [s("p", null, k(r.indicatorDescription), 1)])) : a("", !0)]),
393
- _: 1
394
- }),
395
- s("div", Be, [(C(!0), o(e, null, E(r.params, (e) => (C(), o("div", {
396
- key: e.key,
397
- class: _(["param-item", { "has-desc": m.value && e.description }])
398
- }, [s("div", Ve, [s("label", He, [s("span", Ue, k(e.label), 1), e.min !== void 0 || e.max !== void 0 ? (C(), o("span", We, k(e.min ?? "-∞") + " ~ " + k(e.max ?? "+∞"), 1)) : a("", !0)]), s("div", Ge, [
399
- s("button", {
400
- class: "stepper-btn",
401
- disabled: e.min !== void 0 && (p.value[e.key] ?? 0) <= e.min,
402
- onClick: (t) => v(e, -1)
403
- }, " ", 8, Ke),
404
- e.type === "number" ? (C(), o("input", {
405
- key: 0,
406
- type: "number",
407
- class: "param-input",
408
- value: p.value[e.key],
409
- min: e.min,
410
- max: e.max,
411
- step: e.step || 1,
412
- onInput: (t) => g(e.key, t)
413
- }, null, 40, qe)) : a("", !0),
414
- s("button", {
415
- class: "stepper-btn",
416
- disabled: e.max !== void 0 && (p.value[e.key] ?? 0) >= e.max,
417
- onClick: (t) => v(e, 1)
418
- }, " + ", 8, Je)
419
- ])]), l(n, { name: "slide" }, {
420
- default: P(() => [m.value && e.description ? (C(), o("div", Ye, k(e.description), 1)) : a("", !0)]),
421
- _: 2
422
- }, 1024)], 2))), 128))]),
423
- s("div", Xe, [s("button", {
424
- class: "params-btn reset",
425
- onClick: y
426
- }, [...d[8] ||= [s("svg", {
427
- viewBox: "0 0 24 24",
428
- fill: "none",
429
- stroke: "currentColor",
430
- "stroke-width": "2"
431
- }, [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", Ze, [s("button", {
432
- class: "params-btn cancel",
433
- onClick: d[2] ||= (e) => u.$emit("close")
434
- }, "取消"), s("button", {
435
- class: "params-btn confirm",
436
- onClick: b
437
- }, [...d[9] ||= [s("svg", {
438
- viewBox: "0 0 24 24",
439
- fill: "none",
440
- stroke: "currentColor",
441
- "stroke-width": "2.5"
442
- }, [s("path", { d: "M20 6L9 17l-5-5" })], -1), c(" 确定 ", -1)]])])])
443
- ])]),
447
+ u.params.forEach((t) => {
448
+ e[t.key] = t.default ?? u.values[t.key] ?? 0;
449
+ }), f.value = e;
450
+ }
451
+ function v() {
452
+ d("confirm", { ...f.value });
453
+ }
454
+ return (r, u) => (C(), i(Y, {
455
+ show: t.visible,
456
+ title: t.indicatorName,
457
+ subtitle: "参数设置",
458
+ width: "90vw",
459
+ "max-width": "420px",
460
+ "transition-variant": "compact",
461
+ "overlay-padding": "0",
462
+ "footer-align": "space-between",
463
+ onClose: u[2] ||= (e) => r.$emit("close")
464
+ }, {
465
+ "header-extra": F(() => [s("button", {
466
+ class: _(["toggle-desc-btn", { active: p.value }]),
467
+ onClick: u[0] ||= (e) => p.value = !p.value,
468
+ title: "显示/隐藏说明"
469
+ }, [...u[3] ||= [s("svg", { viewBox: "0 0 1024 1024" }, [s("path", {
470
+ d: "M512 97.52381c228.912762 0 414.47619 185.563429 414.47619 414.47619s-185.563429 414.47619-414.47619 414.47619S97.52381 740.912762 97.52381 512 283.087238 97.52381 512 97.52381z m0 73.142857C323.486476 170.666667 170.666667 323.486476 170.666667 512s152.81981 341.333333 341.333333 341.333333 341.333333-152.81981 341.333333-341.333333S700.513524 170.666667 512 170.666667z m36.571429 268.190476v292.571428h-73.142858V438.857143h73.142858z m0-121.904762v73.142857h-73.142858v-73.142857h73.142858z",
471
+ fill: "currentColor"
472
+ })], -1)]], 2)]),
473
+ footer: F(() => [s("button", {
474
+ class: "params-btn reset",
475
+ onClick: g
476
+ }, [...u[4] ||= [s("svg", {
477
+ viewBox: "0 0 24 24",
478
+ fill: "none",
479
+ stroke: "currentColor",
480
+ "stroke-width": "2"
481
+ }, [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", it, [s("button", {
482
+ class: "params-btn cancel",
483
+ onClick: u[1] ||= (e) => r.$emit("close")
484
+ }, "取消"), s("button", {
485
+ class: "params-btn confirm",
486
+ onClick: v
487
+ }, [...u[5] ||= [s("svg", {
488
+ viewBox: "0 0 24 24",
489
+ fill: "none",
490
+ stroke: "currentColor",
491
+ "stroke-width": "2.5"
492
+ }, [s("path", { d: "M20 6L9 17l-5-5" })], -1), c(" 确定 ", -1)]])])]),
493
+ default: F(() => [l(n, { name: "slide" }, {
494
+ default: F(() => [p.value && t.indicatorDescription ? (C(), o("div", qe, [s("p", null, A(t.indicatorDescription), 1)])) : a("", !0)]),
444
495
  _: 1
445
- })])) : a("", !0)]),
496
+ }), s("div", Je, [(C(!0), o(e, null, E(t.params, (e) => (C(), o("div", {
497
+ key: e.key,
498
+ class: _(["param-item", { "has-desc": p.value && e.description }])
499
+ }, [s("div", Ye, [s("label", Xe, [s("span", Ze, A(e.label), 1), e.min !== void 0 || e.max !== void 0 ? (C(), o("span", Qe, A(e.min ?? "-∞") + " ~ " + A(e.max ?? "+∞"), 1)) : a("", !0)]), s("div", $e, [
500
+ s("button", {
501
+ class: "stepper-btn",
502
+ disabled: e.min !== void 0 && (f.value[e.key] ?? 0) <= e.min,
503
+ onClick: (t) => h(e, -1)
504
+ }, " − ", 8, et),
505
+ e.type === "number" ? (C(), o("input", {
506
+ key: 0,
507
+ type: "number",
508
+ class: "param-input",
509
+ value: f.value[e.key],
510
+ min: e.min,
511
+ max: e.max,
512
+ step: e.step || 1,
513
+ onInput: (t) => m(e.key, t)
514
+ }, null, 40, tt)) : a("", !0),
515
+ s("button", {
516
+ class: "stepper-btn",
517
+ disabled: e.max !== void 0 && (f.value[e.key] ?? 0) >= e.max,
518
+ onClick: (t) => h(e, 1)
519
+ }, " + ", 8, nt)
520
+ ])]), l(n, { name: "slide" }, {
521
+ default: F(() => [p.value && e.description ? (C(), o("div", rt, A(e.description), 1)) : a("", !0)]),
522
+ _: 2
523
+ }, 1024)], 2))), 128))])]),
446
524
  _: 1
447
- })], 8, ["to"]));
525
+ }, 8, ["show", "title"]));
448
526
  }
449
- }), [["__scopeId", "data-v-30f2f611"]]), $e = { class: "indicator-selector" }, et = { class: "modal-header" }, tt = { class: "header-title" }, nt = { class: "title-sub" }, rt = { class: "header-actions" }, it = {
527
+ }), [["__scopeId", "data-v-5689c2c8"]]), ot = { class: "indicator-selector" }, st = { class: "header-title" }, ct = { class: "title-sub" }, lt = {
450
528
  key: 0,
451
529
  viewBox: "0 0 24 24",
452
530
  width: "16",
453
531
  height: "16",
454
532
  fill: "currentColor"
455
- }, at = {
533
+ }, ut = {
456
534
  key: 1,
457
535
  viewBox: "0 0 24 24",
458
536
  width: "16",
459
537
  height: "16",
460
538
  fill: "currentColor"
461
- }, ot = { class: "modal-search-area" }, st = { class: "search-box" }, ct = ["value"], lt = { class: "modal-body" }, ut = {
539
+ }, dt = { class: "search-box" }, ft = ["value"], pt = {
462
540
  key: 0,
463
541
  class: "indicator-section"
464
- }, dt = { class: "section-header" }, ft = { class: "section-count" }, pt = ["onClick"], mt = { class: "card-label" }, ht = { class: "card-tooltip" }, gt = { class: "card-header" }, _t = { class: "card-label" }, vt = { class: "card-header-actions" }, yt = ["onClick"], bt = { class: "card-name" }, xt = {
542
+ }, mt = { class: "section-header" }, ht = { class: "section-count" }, gt = ["onClick"], _t = { class: "card-label" }, vt = { class: "card-tooltip" }, yt = { class: "card-header" }, bt = { class: "card-label" }, xt = { class: "card-header-actions" }, St = ["onClick"], Ct = { class: "card-name" }, wt = {
465
543
  key: 1,
466
- class: "section-divider"
467
- }, St = {
468
- key: 2,
469
544
  class: "no-results"
470
- }, Ct = {
471
- key: 3,
545
+ }, Tt = {
546
+ key: 2,
472
547
  class: "indicator-section"
473
- }, wt = { class: "section-header" }, Tt = { class: "section-count" }, Et = ["onClick"], Dt = { class: "card-label" }, Ot = { class: "card-tooltip" }, kt = { class: "card-header" }, At = { class: "card-label" }, jt = { class: "card-header-actions" }, X = ["onClick"], Mt = { class: "card-name" }, Nt = { class: "modal-footer" }, Pt = { class: "footer-info" }, Ft = { class: "info-text" }, It = /*#__PURE__*/ G(/* @__PURE__ */ u({
548
+ }, Et = { class: "section-header" }, Dt = { class: "section-count" }, Ot = ["onClick"], kt = { class: "card-label" }, At = { class: "card-tooltip" }, jt = { class: "card-header" }, X = { class: "card-label" }, Mt = { class: "card-header-actions" }, Nt = ["onClick"], Pt = { class: "card-name" }, Ft = { class: "footer-info" }, It = { class: "info-text" }, Lt = /*#__PURE__*/ q(/* @__PURE__ */ u({
474
549
  __name: "IndicatorSelector",
475
550
  props: {
476
551
  activeIndicators: {},
@@ -481,9 +556,9 @@ var Te = [
481
556
  "updateParams",
482
557
  "reorderSubIndicators"
483
558
  ],
484
- setup(c, { expose: u, emit: d }) {
485
- let f = c, p = d;
486
- function m(e) {
559
+ setup(t, { expose: n, emit: c }) {
560
+ let u = t, d = c;
561
+ function f(e) {
487
562
  return e.map((e) => ({
488
563
  id: e.id,
489
564
  label: e.label,
@@ -501,151 +576,139 @@ var Te = [
501
576
  }))
502
577
  }));
503
578
  }
504
- let h = ce(), g = $(h.menuOpen), v = $(h.searchQuery), y = $(h.filteredMain), x = $(h.filteredSub), w = r(() => y.value.length > 0 || x.value.length > 0), D = $(h.catalog), O = r(() => D.value.length);
579
+ let p = le(), m = $(p.menuOpen), h = $(p.searchQuery), g = $(p.filteredMain), v = $(p.filteredSub), y = r(() => g.value.length > 0 || v.value.length > 0), x = $(p.catalog), w = r(() => x.value.length);
505
580
  b(async () => {
506
- le() || await de(), h.catalog.set(m(oe()));
581
+ ue() || await fe(), p.catalog.set(f(H()));
507
582
  });
508
- let j = T(!1), M = T(null), N = T(!1), F = J(), I = r(() => M.value ? U(M.value) : null), R = r(() => f.activeIndicators?.length ?? 0);
509
- function z(e) {
510
- return f.activeIndicators?.includes(e) ?? !1;
583
+ let D = T(!1), O = T(null), k = T(!1), M = r(() => O.value ? U(O.value) : null), N = r(() => u.activeIndicators?.length ?? 0);
584
+ function P(e) {
585
+ return u.activeIndicators?.includes(e) ?? !1;
511
586
  }
512
- function ee(e) {
513
- z(e) || U(e) && p("toggle", e, !0);
587
+ function I(e) {
588
+ P(e) || U(e) && d("toggle", e, !0);
514
589
  }
515
- function te(e) {
516
- p("toggle", e, !1);
590
+ function L(e) {
591
+ d("toggle", e, !1);
517
592
  }
518
- function B(e) {
519
- M.value = e, j.value = !0;
593
+ function z(e) {
594
+ O.value = e, D.value = !0;
520
595
  }
521
- function V(e) {
596
+ function ee(e) {
522
597
  let t = U(e);
523
598
  if (!t?.params) return {};
524
599
  let n = {};
525
600
  for (let e of t.params) n[e.key] = e.default ?? e.min ?? 1;
526
- let r = f.indicatorParams?.[e] || {}, i = { ...n };
601
+ let r = u.indicatorParams?.[e] || {}, i = { ...n };
527
602
  for (let [e, t] of Object.entries(r)) typeof t == "number" && (i[e] = t);
528
603
  return i;
529
604
  }
530
- function ne(e) {
531
- M.value && p("updateParams", M.value, e), j.value = !1;
605
+ function te(e) {
606
+ O.value && d("updateParams", O.value, e), D.value = !1;
532
607
  }
533
- function H(e) {
534
- e.key === "Escape" && h.menuOpen.peek() && h.closeMenu();
608
+ function B(e) {
609
+ e.key === "Escape" && p.menuOpen.peek() && p.closeMenu();
535
610
  }
536
611
  return b(() => {
537
- document.addEventListener("keydown", H);
612
+ document.addEventListener("keydown", B);
538
613
  }), S(() => {
539
- document.removeEventListener("keydown", H);
540
- }), u({
541
- openMenu: () => h.openMenu(),
542
- closeMenu: () => h.closeMenu(),
543
- toggleMenu: () => h.toggleMenu()
544
- }), (r, c) => (C(), o("div", $e, [(C(), i(t, { to: A(F) }, [l(n, { name: "overlay" }, {
545
- default: P(() => [A(g) ? (C(), o("div", {
546
- key: 0,
547
- class: "selector-overlay",
548
- onClick: c[5] ||= (e) => A(h).closeMenu()
549
- }, [l(n, { name: "modal" }, {
550
- default: P(() => [A(g) ? (C(), o("div", {
614
+ document.removeEventListener("keydown", B);
615
+ }), n({
616
+ openMenu: () => p.openMenu(),
617
+ closeMenu: () => p.closeMenu(),
618
+ toggleMenu: () => p.toggleMenu()
619
+ }), (t, n) => (C(), o("div", ot, [l(Y, {
620
+ show: j(m),
621
+ title: "添加指标",
622
+ subtitle: "",
623
+ width: "90vw",
624
+ "max-width": "860px",
625
+ "max-height": "85vh",
626
+ "transition-variant": "compact",
627
+ "footer-align": "space-between",
628
+ onClose: n[3] ||= (e) => j(p).closeMenu()
629
+ }, {
630
+ header: F(() => [s("div", st, [n[5] ||= s("span", { class: "title-text" }, "添加指标", -1), s("span", ct, A(w.value) + " 个可用指标", 1)])]),
631
+ "header-extra": F(() => [s("button", {
632
+ class: _(["view-toggle-btn", { active: k.value }]),
633
+ onClick: n[0] ||= (e) => k.value = !k.value,
634
+ title: "简洁模式"
635
+ }, [k.value ? (C(), o("svg", ut, [...n[7] ||= [s("path", { d: "M3 3h18v18H3V3zm16 16V5H5v14h14zM7 7h4v4H7V7zm0 6h4v4H7v-4zm6-6h4v4h-4V7zm0 6h4v4h-4v-4z" }, null, -1)]])) : (C(), o("svg", lt, [...n[6] ||= [s("path", { d: "M4 6h16v2H4zm0 5h16v2H4zm0 5h16v2H4z" }, null, -1)]]))], 2)]),
636
+ subheader: F(() => [s("div", dt, [n[8] ||= s("svg", {
637
+ class: "search-icon",
638
+ viewBox: "0 0 24 24",
639
+ width: "16",
640
+ height: "16",
641
+ fill: "currentColor"
642
+ }, [s("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" })], -1), s("input", {
643
+ value: j(h),
644
+ onInput: n[1] ||= (e) => j(p).setSearchQuery(e.target.value),
645
+ type: "text",
646
+ class: "search-input",
647
+ placeholder: "搜索指标名称..."
648
+ }, null, 40, ft)])]),
649
+ footer: F(() => [s("div", Ft, [s("span", It, "已激活 " + A(N.value) + " 个指标", 1)]), s("button", {
650
+ class: "btn btn-confirm",
651
+ onClick: n[2] ||= (e) => j(p).closeMenu()
652
+ }, "确认")]),
653
+ default: F(() => [
654
+ j(g).length > 0 ? (C(), o("div", pt, [s("div", mt, [n[9] ||= s("span", { class: "section-title" }, "主图指标", -1), s("span", ht, A(j(g).length), 1)]), s("div", { class: _(["indicator-grid", { compact: k.value }]) }, [(C(!0), o(e, null, E(j(g), (t) => (C(), o("button", {
655
+ key: t.id,
656
+ class: _(["indicator-card", {
657
+ active: P(t.id),
658
+ compact: k.value
659
+ }]),
660
+ onClick: (e) => P(t.id) ? L(t.id) : I(t.id)
661
+ }, [k.value ? (C(), o(e, { key: 0 }, [s("span", _t, A(t.label), 1), s("span", vt, A(t.name), 1)], 64)) : (C(), o(e, { key: 1 }, [s("div", yt, [s("span", bt, A(t.label), 1), s("div", xt, [t.params?.length ? (C(), o("button", {
551
662
  key: 0,
552
- class: "selector-modal",
553
- onClick: c[4] ||= L(() => {}, ["stop"])
554
- }, [
555
- s("div", et, [s("div", tt, [c[7] ||= s("span", { class: "title-text" }, "添加指标", -1), s("span", nt, k(O.value) + " 个可用指标", 1)]), s("div", rt, [s("button", {
556
- class: _(["view-toggle-btn", { active: N.value }]),
557
- onClick: c[0] ||= (e) => N.value = !N.value,
558
- title: "简洁模式"
559
- }, [N.value ? (C(), o("svg", at, [...c[9] ||= [s("path", { d: "M3 3h18v18H3V3zm16 16V5H5v14h14zM7 7h4v4H7V7zm0 6h4v4H7v-4zm6-6h4v4h-4V7zm0 6h4v4h-4v-4z" }, null, -1)]])) : (C(), o("svg", it, [...c[8] ||= [s("path", { d: "M4 6h16v2H4zm0 5h16v2H4zm0 5h16v2H4z" }, null, -1)]]))], 2), s("button", {
560
- class: "modal-close",
561
- onClick: c[1] ||= (e) => A(h).closeMenu(),
562
- title: "关闭"
563
- }, [...c[10] ||= [s("svg", {
564
- viewBox: "0 0 24 24",
565
- width: "14",
566
- height: "14",
567
- fill: "currentColor"
568
- }, [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)]])])]),
569
- s("div", ot, [s("div", st, [c[11] ||= s("svg", {
570
- class: "search-icon",
663
+ class: "card-settings-btn",
664
+ onClick: R((e) => z(t.id), ["stop"]),
665
+ title: "编辑参数"
666
+ }, [...n[10] ||= [s("svg", {
667
+ viewBox: "0 0 24 24",
668
+ width: "14",
669
+ height: "14",
670
+ fill: "currentColor"
671
+ }, [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, St)) : a("", !0)])]), s("div", Ct, A(t.name), 1)], 64))], 10, gt))), 128))], 2)])) : a("", !0),
672
+ !y.value && j(h).trim() ? (C(), o("div", wt, [...n[11] ||= [
673
+ s("svg", {
571
674
  viewBox: "0 0 24 24",
572
- width: "16",
573
- height: "16",
675
+ width: "40",
676
+ height: "40",
574
677
  fill: "currentColor"
575
- }, [s("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" })], -1), s("input", {
576
- value: A(v),
577
- onInput: c[2] ||= (e) => A(h).setSearchQuery(e.target.value),
578
- type: "text",
579
- class: "search-input",
580
- placeholder: "搜索指标名称..."
581
- }, null, 40, ct)])]),
582
- s("div", lt, [
583
- A(y).length > 0 ? (C(), o("div", ut, [s("div", dt, [c[12] ||= s("span", { class: "section-title" }, "主图指标", -1), s("span", ft, k(A(y).length), 1)]), s("div", { class: _(["indicator-grid", { compact: N.value }]) }, [(C(!0), o(e, null, E(A(y), (t) => (C(), o("button", {
584
- key: t.id,
585
- class: _(["indicator-card", {
586
- active: z(t.id),
587
- compact: N.value
588
- }]),
589
- onClick: (e) => z(t.id) ? te(t.id) : ee(t.id)
590
- }, [N.value ? (C(), o(e, { key: 0 }, [s("span", mt, k(t.label), 1), s("span", ht, k(t.name), 1)], 64)) : (C(), o(e, { key: 1 }, [s("div", gt, [s("span", _t, k(t.label), 1), s("div", vt, [t.params?.length ? (C(), o("button", {
591
- key: 0,
592
- class: "card-settings-btn",
593
- onClick: L((e) => B(t.id), ["stop"]),
594
- title: "编辑参数"
595
- }, [...c[13] ||= [s("svg", {
596
- viewBox: "0 0 24 24",
597
- width: "14",
598
- height: "14",
599
- fill: "currentColor"
600
- }, [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, yt)) : a("", !0)])]), s("div", bt, k(t.name), 1)], 64))], 10, pt))), 128))], 2)])) : a("", !0),
601
- A(y).length > 0 && A(x).length > 0 ? (C(), o("div", xt)) : a("", !0),
602
- !w.value && A(v).trim() ? (C(), o("div", St, [...c[14] ||= [
603
- s("svg", {
604
- viewBox: "0 0 24 24",
605
- width: "48",
606
- height: "48",
607
- fill: "currentColor"
608
- }, [s("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" })], -1),
609
- s("p", null, "未找到匹配的指标", -1),
610
- s("span", { class: "no-results-hint" }, "请尝试其他关键词", -1)
611
- ]])) : a("", !0),
612
- A(x).length > 0 ? (C(), o("div", Ct, [s("div", wt, [c[15] ||= s("span", { class: "section-title" }, "副图指标", -1), s("span", Tt, k(A(x).length), 1)]), s("div", { class: _(["indicator-grid", { compact: N.value }]) }, [(C(!0), o(e, null, E(A(x), (t) => (C(), o("button", {
613
- key: t.id,
614
- class: _(["indicator-card", {
615
- active: z(t.id),
616
- compact: N.value
617
- }]),
618
- onClick: (e) => z(t.id) ? te(t.id) : ee(t.id)
619
- }, [N.value ? (C(), o(e, { key: 0 }, [s("span", Dt, k(t.label), 1), s("span", Ot, k(t.name), 1)], 64)) : (C(), o(e, { key: 1 }, [s("div", kt, [s("span", At, k(t.label), 1), s("div", jt, [t.params?.length ? (C(), o("button", {
620
- key: 0,
621
- class: "card-settings-btn",
622
- onClick: L((e) => B(t.id), ["stop"]),
623
- title: "编辑参数"
624
- }, [...c[16] ||= [s("svg", {
625
- viewBox: "0 0 24 24",
626
- width: "14",
627
- height: "14",
628
- fill: "currentColor"
629
- }, [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", Mt, k(t.name), 1)], 64))], 10, Et))), 128))], 2)])) : a("", !0)
630
- ]),
631
- s("div", Nt, [s("div", Pt, [s("span", Ft, "已激活 " + k(R.value) + " 个指标", 1)]), s("button", {
632
- class: "btn btn-confirm",
633
- onClick: c[3] ||= (e) => A(h).closeMenu()
634
- }, "确认")])
635
- ])) : a("", !0)]),
636
- _: 1
637
- })])) : a("", !0)]),
678
+ }, [s("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" })], -1),
679
+ s("p", null, "未找到匹配的指标", -1),
680
+ s("span", { class: "no-results-hint" }, "请尝试其他关键词", -1)
681
+ ]])) : a("", !0),
682
+ j(v).length > 0 ? (C(), o("div", Tt, [s("div", Et, [n[12] ||= s("span", { class: "section-title" }, "副图指标", -1), s("span", Dt, A(j(v).length), 1)]), s("div", { class: _(["indicator-grid", { compact: k.value }]) }, [(C(!0), o(e, null, E(j(v), (t) => (C(), o("button", {
683
+ key: t.id,
684
+ class: _(["indicator-card", {
685
+ active: P(t.id),
686
+ compact: k.value
687
+ }]),
688
+ onClick: (e) => P(t.id) ? L(t.id) : I(t.id)
689
+ }, [k.value ? (C(), o(e, { key: 0 }, [s("span", kt, A(t.label), 1), s("span", At, A(t.name), 1)], 64)) : (C(), o(e, { key: 1 }, [s("div", jt, [s("span", X, A(t.label), 1), s("div", Mt, [t.params?.length ? (C(), o("button", {
690
+ key: 0,
691
+ class: "card-settings-btn",
692
+ onClick: R((e) => z(t.id), ["stop"]),
693
+ title: "编辑参数"
694
+ }, [...n[13] ||= [s("svg", {
695
+ viewBox: "0 0 24 24",
696
+ width: "14",
697
+ height: "14",
698
+ fill: "currentColor"
699
+ }, [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, Nt)) : a("", !0)])]), s("div", Pt, A(t.name), 1)], 64))], 10, Ot))), 128))], 2)])) : a("", !0)
700
+ ]),
638
701
  _: 1
639
- })], 8, ["to"])), I.value ? (C(), i(Qe, {
702
+ }, 8, ["show"]), M.value ? (C(), i(at, {
640
703
  key: 0,
641
- visible: j.value,
642
- "indicator-id": I.value.id,
643
- "indicator-name": I.value.name,
644
- "indicator-description": I.value.description,
645
- params: I.value.params || [],
646
- values: V(I.value.id),
647
- onClose: c[6] ||= (e) => j.value = !1,
648
- onConfirm: ne
704
+ visible: D.value,
705
+ "indicator-id": M.value.id,
706
+ "indicator-name": M.value.name,
707
+ "indicator-description": M.value.description,
708
+ params: M.value.params || [],
709
+ values: ee(M.value.id),
710
+ onClose: n[4] ||= (e) => D.value = !1,
711
+ onConfirm: te
649
712
  }, null, 8, [
650
713
  "visible",
651
714
  "indicator-id",
@@ -655,25 +718,25 @@ var Te = [
655
718
  "values"
656
719
  ])) : a("", !0)]));
657
720
  }
658
- }), [["__scopeId", "data-v-fe4a5a7b"]]), Lt = { class: "kline-tooltip__title" }, Rt = { key: 0 }, zt = { class: "kline-tooltip__grid" }, Bt = { class: "row" }, Vt = { class: "row" }, Ht = { class: "row" }, Ut = { class: "row" }, Wt = {
721
+ }), [["__scopeId", "data-v-b418736f"]]), Rt = { class: "kline-tooltip__title" }, zt = { key: 0 }, Bt = { class: "kline-tooltip__grid" }, Vt = { class: "row" }, Ht = { class: "row" }, Ut = { class: "row" }, Wt = { class: "row" }, Gt = {
659
722
  key: 0,
660
723
  class: "row"
661
- }, Gt = {
724
+ }, Kt = {
662
725
  key: 1,
663
726
  class: "row"
664
- }, Kt = {
727
+ }, qt = {
665
728
  key: 2,
666
729
  class: "row"
667
- }, qt = {
730
+ }, Jt = {
668
731
  key: 3,
669
732
  class: "row"
670
- }, Jt = {
733
+ }, Yt = {
671
734
  key: 4,
672
735
  class: "row"
673
- }, Yt = {
736
+ }, Xt = {
674
737
  key: 5,
675
738
  class: "row"
676
- }, Z = "#6b7280", Xt = /*#__PURE__*/ G(/* @__PURE__ */ u({
739
+ }, Z = "#6b7280", Zt = /*#__PURE__*/ q(/* @__PURE__ */ u({
677
740
  __name: "KLineTooltip",
678
741
  props: {
679
742
  k: {},
@@ -734,23 +797,23 @@ var Te = [
734
797
  left: `${e.pos.x}px`,
735
798
  top: `${e.pos.y}px`
736
799
  })
737
- }, [s("div", Lt, [e.k.stockCode ? (C(), o("span", Rt, k(e.k.stockCode), 1)) : a("", !0), s("span", null, k(n.value), 1)]), s("div", zt, [
738
- s("div", Bt, [r[0] ||= s("span", null, "开", -1), s("span", { style: v({ color: p.value }) }, k(e.k.open.toFixed(2)), 5)]),
739
- s("div", Vt, [r[1] ||= s("span", null, "高", -1), s("span", null, k(e.k.high.toFixed(2)), 1)]),
740
- s("div", Ht, [r[2] ||= s("span", null, "低", -1), s("span", null, k(e.k.low.toFixed(2)), 1)]),
741
- s("div", Ut, [r[3] ||= s("span", null, "收", -1), s("span", { style: v({ color: m.value }) }, k(e.k.close.toFixed(2)), 5)]),
742
- typeof e.k.volume == "number" ? (C(), o("div", Wt, [r[4] ||= s("span", null, "成交量", -1), s("span", null, k(u(e.k.volume)), 1)])) : a("", !0),
743
- typeof e.k.turnover == "number" ? (C(), o("div", Gt, [r[5] ||= s("span", null, "成交额", -1), s("span", null, k(u(e.k.turnover)), 1)])) : a("", !0),
744
- typeof e.k.amplitude == "number" ? (C(), o("div", Kt, [r[6] ||= s("span", null, "振幅", -1), s("span", null, k(e.k.amplitude) + "%", 1)])) : a("", !0),
745
- typeof e.k.changePercent == "number" ? (C(), o("div", qt, [r[7] ||= s("span", null, "涨跌幅", -1), s("span", { style: v({ color: h.value }) }, k(d(e.k.changePercent, "%")), 5)])) : a("", !0),
746
- typeof e.k.changeAmount == "number" ? (C(), o("div", Jt, [r[8] ||= s("span", null, "涨跌额", -1), s("span", { style: v({ color: h.value }) }, k(d(e.k.changeAmount, "")), 5)])) : a("", !0),
747
- typeof e.k.turnoverRate == "number" ? (C(), o("div", Yt, [r[9] ||= s("span", null, "换手率", -1), s("span", null, k(e.k.turnoverRate.toFixed(2)) + "%", 1)])) : a("", !0)
800
+ }, [s("div", Rt, [e.k.stockCode ? (C(), o("span", zt, A(e.k.stockCode), 1)) : a("", !0), s("span", null, A(n.value), 1)]), s("div", Bt, [
801
+ s("div", Vt, [r[0] ||= s("span", null, "开", -1), s("span", { style: v({ color: p.value }) }, A(e.k.open.toFixed(2)), 5)]),
802
+ s("div", Ht, [r[1] ||= s("span", null, "高", -1), s("span", null, A(e.k.high.toFixed(2)), 1)]),
803
+ s("div", Ut, [r[2] ||= s("span", null, "低", -1), s("span", null, A(e.k.low.toFixed(2)), 1)]),
804
+ s("div", Wt, [r[3] ||= s("span", null, "收", -1), s("span", { style: v({ color: m.value }) }, A(e.k.close.toFixed(2)), 5)]),
805
+ typeof e.k.volume == "number" ? (C(), o("div", Gt, [r[4] ||= s("span", null, "成交量", -1), s("span", null, A(u(e.k.volume)), 1)])) : a("", !0),
806
+ typeof e.k.turnover == "number" ? (C(), o("div", Kt, [r[5] ||= s("span", null, "成交额", -1), s("span", null, A(u(e.k.turnover)), 1)])) : a("", !0),
807
+ typeof e.k.amplitude == "number" ? (C(), o("div", qt, [r[6] ||= s("span", null, "振幅", -1), s("span", null, A(e.k.amplitude) + "%", 1)])) : a("", !0),
808
+ typeof e.k.changePercent == "number" ? (C(), o("div", Jt, [r[7] ||= s("span", null, "涨跌幅", -1), s("span", { style: v({ color: h.value }) }, A(d(e.k.changePercent, "%")), 5)])) : a("", !0),
809
+ typeof e.k.changeAmount == "number" ? (C(), o("div", Yt, [r[8] ||= s("span", null, "涨跌额", -1), s("span", { style: v({ color: h.value }) }, A(d(e.k.changeAmount, "")), 5)])) : a("", !0),
810
+ typeof e.k.turnoverRate == "number" ? (C(), o("div", Xt, [r[9] ||= s("span", null, "换手率", -1), s("span", null, A(e.k.turnoverRate.toFixed(2)) + "%", 1)])) : a("", !0)
748
811
  ])], 6)) : a("", !0);
749
812
  }
750
- }), [["__scopeId", "data-v-80fa3a7d"]]), Zt = { class: "marker-tooltip__title" }, Qt = {
813
+ }), [["__scopeId", "data-v-80fa3a7d"]]), Qt = { class: "marker-tooltip__title" }, $t = {
751
814
  key: 0,
752
815
  class: "marker-tooltip__content"
753
- }, $t = /*#__PURE__*/ G(/* @__PURE__ */ u({
816
+ }, en = /*#__PURE__*/ q(/* @__PURE__ */ u({
754
817
  __name: "MarkerTooltip",
755
818
  props: {
756
819
  marker: {},
@@ -799,30 +862,107 @@ var Te = [
799
862
  left: `${t.pos.x + 12}px`,
800
863
  top: `${t.pos.y + 12}px`
801
864
  })
802
- }, [s("div", Zt, k(f.value), 1), m.value ? (C(), o("div", Qt, [(C(!0), o(e, null, E(p.value, (e, t) => (C(), o("div", {
865
+ }, [s("div", Qt, A(f.value), 1), m.value ? (C(), o("div", $t, [(C(!0), o(e, null, E(p.value, (e, t) => (C(), o("div", {
803
866
  key: t,
804
867
  class: "row"
805
- }, [s("span", null, k(t), 1), s("span", null, k(h(e)), 1)]))), 128))])) : a("", !0)], 6)) : a("", !0);
868
+ }, [s("span", null, A(t), 1), s("span", null, A(h(e)), 1)]))), 128))])) : a("", !0)], 6)) : a("", !0);
869
+ }
870
+ }), [["__scopeId", "data-v-f2a21012"]]), tn = ["value", "placeholder"], nn = ["value", "placeholder"], rn = { class: "range-count" }, an = /*#__PURE__*/ q(/* @__PURE__ */ u({
871
+ __name: "RangeSelectionExport",
872
+ props: {
873
+ startDate: {},
874
+ endDate: {},
875
+ startLabel: {},
876
+ endLabel: {},
877
+ count: {}
878
+ },
879
+ emits: [
880
+ "update:startDate",
881
+ "update:endDate",
882
+ "export",
883
+ "clear",
884
+ "batchSetting"
885
+ ],
886
+ setup(e) {
887
+ return (t, n) => (C(), i(Le, null, {
888
+ default: F(() => [
889
+ s("input", {
890
+ class: "range-input",
891
+ value: e.startDate,
892
+ onInput: n[0] ||= (e) => t.$emit("update:startDate", e.target.value),
893
+ placeholder: e.startLabel
894
+ }, null, 40, tn),
895
+ n[6] ||= s("span", { class: "range-sep" }, "~", -1),
896
+ s("input", {
897
+ class: "range-input",
898
+ value: e.endDate,
899
+ onInput: n[1] ||= (e) => t.$emit("update:endDate", e.target.value),
900
+ placeholder: e.endLabel
901
+ }, null, 40, nn),
902
+ s("span", rn, "共 " + A(e.count) + " 条", 1),
903
+ s("button", {
904
+ type: "button",
905
+ class: "toolbar-btn",
906
+ title: "批量设置",
907
+ onClick: n[2] ||= (e) => t.$emit("batchSetting")
908
+ }, " 批量设置 "),
909
+ s("button", {
910
+ type: "button",
911
+ class: "toolbar-btn",
912
+ title: "导出",
913
+ onClick: n[3] ||= (e) => t.$emit("export")
914
+ }, "导出"),
915
+ s("button", {
916
+ type: "button",
917
+ class: "toolbar-btn toolbar-btn--delete",
918
+ title: "取消选区",
919
+ onClick: n[4] ||= (e) => t.$emit("clear")
920
+ }, [...n[5] ||= [s("svg", {
921
+ class: "delete-icon",
922
+ viewBox: "0 0 24 24",
923
+ fill: "none",
924
+ stroke: "currentColor",
925
+ "stroke-width": "2",
926
+ "stroke-linecap": "round",
927
+ "stroke-linejoin": "round",
928
+ "aria-hidden": "true"
929
+ }, [
930
+ s("path", { d: "M3 6h18" }),
931
+ s("path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" }),
932
+ s("path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" })
933
+ ], -1)]])
934
+ ]),
935
+ _: 1
936
+ }));
806
937
  }
807
- }), [["__scopeId", "data-v-f2a21012"]]);
938
+ }), [["__scopeId", "data-v-6e5ee3f6"]]), on = {};
939
+ function sn(e, t) {
940
+ return C(), o("div", {
941
+ class: "canvas-toolbar-stack",
942
+ onPointerdown: t[0] ||= R(() => {}, ["stop"]),
943
+ onPointermove: t[1] ||= R(() => {}, ["stop"]),
944
+ onPointerup: t[2] ||= R(() => {}, ["stop"])
945
+ }, [D(e.$slots, "default", {}, void 0, !0)], 32);
946
+ }
947
+ var cn = /*#__PURE__*/ q(on, [["render", sn], ["__scopeId", "data-v-82232270"]]);
808
948
  //#endregion
809
949
  //#region src/composables/chart/useChartTheme.ts
810
- function en(e) {
950
+ function ln(e) {
811
951
  let t = T("light"), n = T({}), i = r(() => {
812
- let e = n.value.isAsiaMarket ?? !1, r = re(t.value, e);
952
+ let e = n.value.isAsiaMarket ?? !1, r = ae(t.value, e);
813
953
  return {
814
954
  upColor: r.candleUpBody,
815
955
  downColor: r.candleDownBody
816
956
  };
817
957
  }), a = r(() => {
818
- let e = t.value === "dark" ? B : ne, r = n.value.colorPresetSettings?.[t.value];
819
- return r && Object.keys(r).length > 0 ? ie({
958
+ let e = t.value === "dark" ? ne : re, r = n.value.colorPresetSettings?.[t.value];
959
+ return r && Object.keys(r).length > 0 ? oe({
820
960
  ...e,
821
961
  colors: {
822
962
  ...e.colors,
823
963
  ...r
824
964
  }
825
- }) : ie(e);
965
+ }) : oe(e);
826
966
  }), o = null;
827
967
  function s(t) {
828
968
  e.value?.setTheme(t.matches ? "dark" : "light");
@@ -850,7 +990,7 @@ function en(e) {
850
990
  }
851
991
  //#endregion
852
992
  //#region src/composables/chart/useIndicatorManager.ts
853
- function tn(e, t) {
993
+ function un(e, t) {
854
994
  let n = T([]), i = T([]), a = r(() => {
855
995
  let e = [], t = /* @__PURE__ */ new Set();
856
996
  for (let n of i.value) t.has(n.indicatorId) || (t.add(n.indicatorId), e.push(n.indicatorId));
@@ -877,12 +1017,12 @@ function tn(e, t) {
877
1017
  }
878
1018
  function l(e) {
879
1019
  if (e === "VOLUME") return {};
880
- let t = me(e);
1020
+ let t = he(e);
881
1021
  return t?.runtime?.defaultConfig ? { ...t.runtime.defaultConfig } : {};
882
1022
  }
883
1023
  function u(e) {
884
1024
  if (e === "VOLUME") return !0;
885
- let t = me(e);
1025
+ let t = he(e);
886
1026
  return !!t && t.category !== "main";
887
1027
  }
888
1028
  function d(t = "VOLUME", n) {
@@ -909,7 +1049,7 @@ function tn(e, t) {
909
1049
  function g(t, r) {
910
1050
  let a = e.value;
911
1051
  if (!a) return;
912
- let o = me(t);
1052
+ let o = he(t);
913
1053
  if (o && (o.category === "main" || o.allowMainPane)) {
914
1054
  let e = n.value.find((e) => e === t);
915
1055
  r && !e ? a.addIndicator(t, "main", s.value[t]) : !r && e && a.removeIndicator(t.toUpperCase());
@@ -1014,8 +1154,8 @@ function tn(e, t) {
1014
1154
  }
1015
1155
  //#endregion
1016
1156
  //#region src/composables/chart/useDrawingManager.ts
1017
- function nn(e) {
1018
- let t = O(null), n = T(null), i = T([]), a = r(() => {
1157
+ function dn(e) {
1158
+ let t = k(null), n = T(null), i = T([]), a = r(() => {
1019
1159
  let e = n.value;
1020
1160
  return e ? i.value.find((t) => t.id === e) ?? null : null;
1021
1161
  });
@@ -1031,7 +1171,7 @@ function nn(e) {
1031
1171
  !e || !t.value || (t.value.removeDrawing(e.id), i.value = t.value.getDrawings());
1032
1172
  }
1033
1173
  function l(e) {
1034
- t.value = new ae(e), t.value.setCallbacks({
1174
+ t.value = new se(e), t.value.setCallbacks({
1035
1175
  onDrawingCreated: (e) => {
1036
1176
  i.value = [...i.value, e], n.value = e.id;
1037
1177
  },
@@ -1054,7 +1194,7 @@ function nn(e) {
1054
1194
  }
1055
1195
  //#endregion
1056
1196
  //#region src/tools/calcRangeOverlayPixel.ts
1057
- function rn(e, t, n, r) {
1197
+ function fn(e, t, n, r) {
1058
1198
  let { kWidth: i, kGap: a } = t.getKWidthKGap(), o = t.getCurrentDpr(), s = Math.max(1, Math.round(i * o) + +(Math.round(i * o) % 2 == 0)), c = Math.round(a * o), l = s + c, u = c, d = n.scrollLeft - r.scrollLeft, f = d + (u + e.start * l) / o;
1059
1199
  return {
1060
1200
  left: f,
@@ -1064,7 +1204,7 @@ function rn(e, t, n, r) {
1064
1204
  }
1065
1205
  //#endregion
1066
1206
  //#region src/tools/getKLineIndexByTimestamp.ts
1067
- function an(e, t) {
1207
+ function pn(e, t) {
1068
1208
  let n = 0, r = e.length - 1;
1069
1209
  for (; n <= r;) {
1070
1210
  let i = n + r >>> 1, a = e[i].timestamp;
@@ -1079,36 +1219,36 @@ function an(e, t) {
1079
1219
  high: r
1080
1220
  };
1081
1221
  }
1082
- function on(e, t, n) {
1222
+ function mn(e, t, n) {
1083
1223
  if (e.length === 0) return null;
1084
- let { low: r, high: i } = an(e, t);
1224
+ let { low: r, high: i } = pn(e, t);
1085
1225
  return r === i ? r : n === "left" ? i >= 0 ? i : r < e.length ? r : null : r < e.length ? r : i;
1086
1226
  }
1087
1227
  //#endregion
1088
1228
  //#region src/composables/chart/useRangeSelection.ts
1089
- function sn(e) {
1229
+ function hn(e) {
1090
1230
  return e ? e.date ? e.date : new Date(e.timestamp).toISOString().slice(0, 10) : "?";
1091
1231
  }
1092
- function cn(e) {
1232
+ function gn(e) {
1093
1233
  let t = new Date(e);
1094
1234
  return `${t.getFullYear()}${String(t.getMonth() + 1).padStart(2, "0")}${String(t.getDate()).padStart(2, "0")}`;
1095
1235
  }
1096
- function ln(e) {
1236
+ function _n(e) {
1097
1237
  let t = e.trim().split(/[-/]/);
1098
1238
  return t.length === 3 ? `${t[0].padStart(4, "0")}-${t[1].padStart(2, "0")}-${t[2].padStart(2, "0")}` : null;
1099
1239
  }
1100
- function un(e) {
1240
+ function vn(e) {
1101
1241
  if (e == null) return "";
1102
1242
  let t = String(e);
1103
1243
  return /[",\r\n]/.test(t) ? `"${t.replace(/"/g, "\"\"")}"` : t;
1104
1244
  }
1105
- function dn(e) {
1106
- let t = ln(e);
1245
+ function yn(e) {
1246
+ let t = _n(e);
1107
1247
  if (!t) return null;
1108
1248
  let n = new Date(t);
1109
1249
  return isNaN(n.getTime()) ? null : n.getTime();
1110
1250
  }
1111
- function fn(e) {
1251
+ function bn(e) {
1112
1252
  let { controller: t, activeToolId: n, containerRef: i, dataVersion: a, viewportVersion: o, dataFetcher: s, batchStockCodes: c } = e, l = T(0), u = T(""), d = T(""), f = T(null), p = T(null), m = T({
1113
1253
  startTimestamp: null,
1114
1254
  endTimestamp: null,
@@ -1117,61 +1257,64 @@ function fn(e) {
1117
1257
  a.value;
1118
1258
  let e = t.value?.getData() ?? [], { startTimestamp: n, endTimestamp: r } = m.value;
1119
1259
  if (n === null || r === null || e.length === 0) return null;
1120
- let i = on(e, n, "left"), o = on(e, r, "right");
1260
+ let i = mn(e, n, "left"), o = mn(e, r, "right");
1121
1261
  return i === null || o === null ? null : {
1122
1262
  start: Math.min(i, o),
1123
1263
  end: Math.max(i, o)
1124
1264
  };
1125
1265
  }), v = r(() => {
1126
1266
  let e = _.value, n = t.value?.getData() ?? [];
1127
- return !e || n.length === 0 ? "" : sn(n[e.start]);
1267
+ return !e || n.length === 0 ? "" : hn(n[e.start]);
1128
1268
  }), y = r(() => {
1129
1269
  let e = _.value, n = t.value?.getData() ?? [];
1130
- return !e || n.length === 0 ? "" : sn(n[e.end]);
1270
+ return !e || n.length === 0 ? "" : hn(n[e.end]);
1131
1271
  }), b = r(() => {
1272
+ let e = _.value;
1273
+ return e ? e.end - e.start + 1 : 0;
1274
+ }), x = r(() => {
1132
1275
  let e = _.value;
1133
1276
  if (!e) return null;
1134
1277
  l.value, o.value;
1135
1278
  let n = t.value, r = n?.getViewport(), a = i.value;
1136
1279
  if (!n || !r || !a) return null;
1137
- let s = rn(e, n, a, r);
1280
+ let s = fn(e, n, a, r);
1138
1281
  return {
1139
1282
  left: `${s.left}px`,
1140
1283
  width: `${s.width}px`,
1141
1284
  height: `${s.height}px`
1142
1285
  };
1143
1286
  });
1144
- function x() {
1287
+ function S() {
1145
1288
  m.value = {
1146
1289
  startTimestamp: null,
1147
1290
  endTimestamp: null,
1148
1291
  isDragging: !1
1149
1292
  }, u.value = "", d.value = "";
1150
1293
  }
1151
- N(u, (e) => {
1152
- let n = t.value?.getData() ?? [], r = dn(e);
1294
+ P(u, (e) => {
1295
+ let n = t.value?.getData() ?? [], r = yn(e);
1153
1296
  r === null || n.length === 0 || (m.value = {
1154
1297
  ...m.value,
1155
1298
  startTimestamp: r,
1156
1299
  isDragging: !1
1157
1300
  }, r < n[0].timestamp && t.value?.ensureDataRange(r));
1158
- }), N(d, (e) => {
1159
- let n = t.value?.getData() ?? [], r = dn(e);
1301
+ }), P(d, (e) => {
1302
+ let n = t.value?.getData() ?? [], r = yn(e);
1160
1303
  r === null || n.length === 0 || (m.value = {
1161
1304
  ...m.value,
1162
1305
  endTimestamp: r,
1163
1306
  isDragging: !1
1164
1307
  }, r < n[0].timestamp && t.value?.ensureDataRange(r));
1165
1308
  });
1166
- function S(e, n) {
1309
+ function C(e, n) {
1167
1310
  let r = t.value?.getData() ?? [];
1168
1311
  if (r.length === 0) return null;
1169
1312
  let i = n.getBoundingClientRect(), a = t.value?.getLogicalIndexAtX(e.clientX - i.left);
1170
1313
  return a == null ? null : Math.max(0, Math.min(a, r.length - 1));
1171
1314
  }
1172
- function C(e, n) {
1315
+ function w(e, n) {
1173
1316
  if (!h.value || m.value.startTimestamp !== null && m.value.endTimestamp !== null && !m.value.isDragging) return !1;
1174
- let r = S(e, n);
1317
+ let r = C(e, n);
1175
1318
  if (r === null) return !0;
1176
1319
  let i = (t.value?.getData() ?? [])[r]?.timestamp;
1177
1320
  return i === void 0 ? !0 : (m.value = {
@@ -1180,9 +1323,9 @@ function fn(e) {
1180
1323
  isDragging: !0
1181
1324
  }, u.value = "", d.value = "", n.setPointerCapture?.(e.pointerId), e.preventDefault(), !0);
1182
1325
  }
1183
- function w(e, n) {
1326
+ function E(e, n) {
1184
1327
  if (!h.value || !m.value.isDragging) return !1;
1185
- let r = S(e, n);
1328
+ let r = C(e, n);
1186
1329
  if (r !== null) {
1187
1330
  let e = (t.value?.getData() ?? [])[r]?.timestamp;
1188
1331
  e !== void 0 && (m.value = {
@@ -1192,9 +1335,9 @@ function fn(e) {
1192
1335
  }
1193
1336
  return e.preventDefault(), !0;
1194
1337
  }
1195
- function E(e, n) {
1338
+ function D(e, n) {
1196
1339
  if (!h.value || !m.value.isDragging) return !1;
1197
- let r = S(e, n);
1340
+ let r = C(e, n);
1198
1341
  if (r !== null) {
1199
1342
  let e = (t.value?.getData() ?? [])[r]?.timestamp;
1200
1343
  e === void 0 ? m.value = {
@@ -1211,10 +1354,10 @@ function fn(e) {
1211
1354
  };
1212
1355
  return n.releasePointerCapture?.(e.pointerId), e.preventDefault(), !0;
1213
1356
  }
1214
- function D(e, t) {
1357
+ function O(e, t) {
1215
1358
  h.value && (f.value = e, t.currentTarget.setPointerCapture?.(t.pointerId), t.preventDefault());
1216
1359
  }
1217
- function O(e) {
1360
+ function k(e) {
1218
1361
  if (!f.value || m.value.startTimestamp === null || m.value.endTimestamp === null) return;
1219
1362
  let n = i.value?.getBoundingClientRect();
1220
1363
  if (!n) return;
@@ -1239,10 +1382,10 @@ function fn(e) {
1239
1382
  endTimestamp: o
1240
1383
  });
1241
1384
  }
1242
- function k(e) {
1385
+ function A(e) {
1243
1386
  f.value &&= (e.currentTarget.releasePointerCapture?.(e.pointerId), null);
1244
1387
  }
1245
- let A = [
1388
+ let j = [
1246
1389
  "timestamp",
1247
1390
  "open",
1248
1391
  "high",
@@ -1255,14 +1398,14 @@ function fn(e) {
1255
1398
  "changePercent",
1256
1399
  "changeAmount"
1257
1400
  ];
1258
- function j(e, t, n, r) {
1259
- let i = [`stockCode,time,${A.join(",")}`, ...e.map((e) => {
1260
- let n = un(V(e.timestamp, { showTime: !0 }));
1261
- return `${un(e.stockCode ?? t)},${n},${A.map((t) => un(e[t])).join(",")}`;
1401
+ function M(e, t, n, r) {
1402
+ let i = [`stockCode,time,${j.join(",")}`, ...e.map((e) => {
1403
+ let n = vn(V(e.timestamp, { showTime: !0 }));
1404
+ return `${vn(e.stockCode ?? t)},${n},${j.map((t) => vn(e[t])).join(",")}`;
1262
1405
  })], a = new Blob([`\uFEFF${i.join("\n")}`], { type: "text/csv;charset=utf-8" }), o = URL.createObjectURL(a), s = document.createElement("a");
1263
- s.href = o, s.download = `${t}-${cn(n)}-${cn(r)}.csv`, document.body.appendChild(s), s.click(), document.body.removeChild(s), URL.revokeObjectURL(o);
1406
+ s.href = o, s.download = `${t}-${gn(n)}-${gn(r)}.csv`, document.body.appendChild(s), s.click(), document.body.removeChild(s), URL.revokeObjectURL(o);
1264
1407
  }
1265
- async function M() {
1408
+ async function N() {
1266
1409
  let e = _.value, n = t.value?.getData() ?? [];
1267
1410
  if (!e || n.length === 0) return;
1268
1411
  let r = n[e.start].timestamp, i = n[e.end].timestamp, a = t.value?.symbols.peek()?.[0]?.symbol ?? "unknown", o = c.value, l = 1 + o.length, u = o.length > 0 ? `batch${l}` : a, d = [];
@@ -1306,17 +1449,17 @@ function fn(e) {
1306
1449
  current: l,
1307
1450
  total: l,
1308
1451
  label: "正在生成文件..."
1309
- }, j(d, u, r, i), p.value = {
1452
+ }, M(d, u, r, i), p.value = {
1310
1453
  current: l,
1311
1454
  total: l,
1312
1455
  label: "导出完成"
1313
1456
  };
1314
1457
  }
1315
- function P() {
1458
+ function F() {
1316
1459
  let e = i.value;
1317
1460
  e && (l.value = e.scrollLeft);
1318
1461
  }
1319
- function F() {
1462
+ function I() {
1320
1463
  let e = i.value;
1321
1464
  e && (l.value = e.scrollLeft);
1322
1465
  }
@@ -1328,31 +1471,32 @@ function fn(e) {
1328
1471
  isRangeSelectActive: h,
1329
1472
  rangeSelectionReady: g,
1330
1473
  rangeSelectionBounds: _,
1474
+ rangeSelectionCount: b,
1331
1475
  rangeSelectionStartLabel: v,
1332
1476
  rangeSelectionEndLabel: y,
1333
- rangeSelectionOverlayStyle: b,
1334
- clearRangeSelection: x,
1335
- handleRangePointerDown: C,
1336
- handleRangePointerMove: w,
1337
- handleRangePointerUp: E,
1338
- exportRangeToCsv: M,
1477
+ rangeSelectionOverlayStyle: x,
1478
+ clearRangeSelection: S,
1479
+ handleRangePointerDown: w,
1480
+ handleRangePointerMove: E,
1481
+ handleRangePointerUp: D,
1482
+ exportRangeToCsv: N,
1339
1483
  exportingProgress: p,
1340
- onEdgePointerDown: D,
1341
- onEdgePointerMove: O,
1342
- onEdgePointerUp: k,
1343
- onScroll: P,
1344
- syncScrollLeft: F
1484
+ onEdgePointerDown: O,
1485
+ onEdgePointerMove: k,
1486
+ onEdgePointerUp: A,
1487
+ onScroll: F,
1488
+ syncScrollLeft: I
1345
1489
  };
1346
1490
  }
1347
1491
  //#endregion
1348
1492
  //#region ~icons/tabler/pointer
1349
- var pn = {
1493
+ var xn = {
1350
1494
  viewBox: "0 0 24 24",
1351
1495
  width: "1.2em",
1352
1496
  height: "1.2em"
1353
1497
  };
1354
- function mn(e, t) {
1355
- return C(), o("svg", pn, [...t[0] ||= [s("path", {
1498
+ function Sn(e, t) {
1499
+ return C(), o("svg", xn, [...t[0] ||= [s("path", {
1356
1500
  fill: "none",
1357
1501
  stroke: "currentColor",
1358
1502
  "stroke-linecap": "round",
@@ -1361,16 +1505,16 @@ function mn(e, t) {
1361
1505
  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"
1362
1506
  }, null, -1)]]);
1363
1507
  }
1364
- var hn = h({
1508
+ var Cn = h({
1365
1509
  name: "tabler-pointer",
1366
- render: mn
1367
- }), gn = {
1510
+ render: Sn
1511
+ }), wn = {
1368
1512
  viewBox: "0 0 24 24",
1369
1513
  width: "1.2em",
1370
1514
  height: "1.2em"
1371
1515
  };
1372
- function _n(e, t) {
1373
- return C(), o("svg", gn, [...t[0] ||= [s("path", {
1516
+ function Tn(e, t) {
1517
+ return C(), o("svg", wn, [...t[0] ||= [s("path", {
1374
1518
  fill: "none",
1375
1519
  stroke: "currentColor",
1376
1520
  "stroke-linecap": "round",
@@ -1379,16 +1523,16 @@ function _n(e, t) {
1379
1523
  d: "M4 19h16M4 15l4-6l4 2l4-5l4 4"
1380
1524
  }, null, -1)]]);
1381
1525
  }
1382
- var vn = h({
1526
+ var En = h({
1383
1527
  name: "tabler-chart-line",
1384
- render: _n
1385
- }), yn = {
1528
+ render: Tn
1529
+ }), Dn = {
1386
1530
  viewBox: "0 0 24 24",
1387
1531
  width: "1.2em",
1388
1532
  height: "1.2em"
1389
1533
  };
1390
- function bn(e, t) {
1391
- return C(), o("svg", yn, [...t[0] ||= [s("path", {
1534
+ function On(e, t) {
1535
+ return C(), o("svg", Dn, [...t[0] ||= [s("path", {
1392
1536
  fill: "none",
1393
1537
  stroke: "currentColor",
1394
1538
  "stroke-linecap": "round",
@@ -1397,16 +1541,16 @@ function bn(e, t) {
1397
1541
  d: "M17 7L7 17M8 7h9v9"
1398
1542
  }, null, -1)]]);
1399
1543
  }
1400
- var xn = h({
1544
+ var kn = h({
1401
1545
  name: "tabler-arrow-up-right",
1402
- render: bn
1403
- }), Sn = {
1546
+ render: On
1547
+ }), An = {
1404
1548
  viewBox: "0 0 24 24",
1405
1549
  width: "1.2em",
1406
1550
  height: "1.2em"
1407
1551
  };
1408
- function Cn(e, t) {
1409
- return C(), o("svg", Sn, [...t[0] ||= [s("path", {
1552
+ function jn(e, t) {
1553
+ return C(), o("svg", An, [...t[0] ||= [s("path", {
1410
1554
  fill: "none",
1411
1555
  stroke: "currentColor",
1412
1556
  "stroke-linecap": "round",
@@ -1415,16 +1559,16 @@ function Cn(e, t) {
1415
1559
  d: "M5 12h14m-6 6l6-6m-6-6l6 6"
1416
1560
  }, null, -1)]]);
1417
1561
  }
1418
- var wn = h({
1562
+ var Mn = h({
1419
1563
  name: "tabler-arrow-right",
1420
- render: Cn
1421
- }), Tn = {
1564
+ render: jn
1565
+ }), Nn = {
1422
1566
  viewBox: "0 0 24 24",
1423
1567
  width: "1.2em",
1424
1568
  height: "1.2em"
1425
1569
  };
1426
- function En(e, t) {
1427
- return C(), o("svg", Tn, [...t[0] ||= [s("path", {
1570
+ function Pn(e, t) {
1571
+ return C(), o("svg", Nn, [...t[0] ||= [s("path", {
1428
1572
  fill: "none",
1429
1573
  stroke: "currentColor",
1430
1574
  "stroke-linecap": "round",
@@ -1433,16 +1577,16 @@ function En(e, t) {
1433
1577
  d: "M5 12h14"
1434
1578
  }, null, -1)]]);
1435
1579
  }
1436
- var Dn = h({
1580
+ var Fn = h({
1437
1581
  name: "tabler-minus",
1438
- render: En
1439
- }), On = {
1582
+ render: Pn
1583
+ }), In = {
1440
1584
  viewBox: "0 0 24 24",
1441
1585
  width: "1.2em",
1442
1586
  height: "1.2em"
1443
1587
  };
1444
- function kn(e, t) {
1445
- return C(), o("svg", On, [...t[0] ||= [s("path", {
1588
+ function Ln(e, t) {
1589
+ return C(), o("svg", In, [...t[0] ||= [s("path", {
1446
1590
  fill: "none",
1447
1591
  stroke: "currentColor",
1448
1592
  "stroke-linecap": "round",
@@ -1451,16 +1595,16 @@ function kn(e, t) {
1451
1595
  d: "M3 12v.01M7 12h10m4 0v.01"
1452
1596
  }, null, -1)]]);
1453
1597
  }
1454
- var An = h({
1598
+ var Rn = h({
1455
1599
  name: "tabler-separator",
1456
- render: kn
1457
- }), jn = {
1600
+ render: Ln
1601
+ }), zn = {
1458
1602
  viewBox: "0 0 24 24",
1459
1603
  width: "1.2em",
1460
1604
  height: "1.2em"
1461
1605
  };
1462
- function Mn(e, t) {
1463
- return C(), o("svg", jn, [...t[0] ||= [s("path", {
1606
+ function Bn(e, t) {
1607
+ return C(), o("svg", zn, [...t[0] ||= [s("path", {
1464
1608
  fill: "none",
1465
1609
  stroke: "currentColor",
1466
1610
  "stroke-linecap": "round",
@@ -1469,16 +1613,16 @@ function Mn(e, t) {
1469
1613
  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"
1470
1614
  }, null, -1)]]);
1471
1615
  }
1472
- var Nn = h({
1616
+ var Vn = h({
1473
1617
  name: "tabler-crosshair",
1474
- render: Mn
1475
- }), Pn = {
1618
+ render: Bn
1619
+ }), Hn = {
1476
1620
  viewBox: "0 0 24 24",
1477
1621
  width: "1.2em",
1478
1622
  height: "1.2em"
1479
1623
  };
1480
- function Fn(e, t) {
1481
- return C(), o("svg", Pn, [...t[0] ||= [s("g", {
1624
+ function Un(e, t) {
1625
+ return C(), o("svg", Hn, [...t[0] ||= [s("g", {
1482
1626
  fill: "none",
1483
1627
  stroke: "currentColor",
1484
1628
  "stroke-linecap": "round",
@@ -1486,16 +1630,16 @@ function Fn(e, t) {
1486
1630
  "stroke-width": "2"
1487
1631
  }, [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)]]);
1488
1632
  }
1489
- var In = h({
1633
+ var Wn = h({
1490
1634
  name: "tabler-info-circle",
1491
- render: Fn
1492
- }), Ln = {
1635
+ render: Un
1636
+ }), Gn = {
1493
1637
  viewBox: "0 0 24 24",
1494
1638
  width: "1.2em",
1495
1639
  height: "1.2em"
1496
1640
  };
1497
- function Rn(e, t) {
1498
- return C(), o("svg", Ln, [...t[0] ||= [s("path", {
1641
+ function Kn(e, t) {
1642
+ return C(), o("svg", Gn, [...t[0] ||= [s("path", {
1499
1643
  fill: "none",
1500
1644
  stroke: "currentColor",
1501
1645
  "stroke-linecap": "round",
@@ -1504,16 +1648,16 @@ function Rn(e, t) {
1504
1648
  d: "M3 10a7 7 0 1 0 14 0a7 7 0 1 0-14 0m4 0h6m-3-3v6m11 8l-6-6"
1505
1649
  }, null, -1)]]);
1506
1650
  }
1507
- var zn = h({
1651
+ var qn = h({
1508
1652
  name: "tabler-zoom-in",
1509
- render: Rn
1510
- }), Bn = {
1653
+ render: Kn
1654
+ }), Jn = {
1511
1655
  viewBox: "0 0 24 24",
1512
1656
  width: "1.2em",
1513
1657
  height: "1.2em"
1514
1658
  };
1515
- function Vn(e, t) {
1516
- return C(), o("svg", Bn, [...t[0] ||= [s("path", {
1659
+ function Yn(e, t) {
1660
+ return C(), o("svg", Jn, [...t[0] ||= [s("path", {
1517
1661
  fill: "none",
1518
1662
  stroke: "currentColor",
1519
1663
  "stroke-linecap": "round",
@@ -1522,16 +1666,16 @@ function Vn(e, t) {
1522
1666
  d: "M3 10a7 7 0 1 0 14 0a7 7 0 1 0-14 0m4 0h6m8 11l-6-6"
1523
1667
  }, null, -1)]]);
1524
1668
  }
1525
- var Hn = h({
1669
+ var Xn = h({
1526
1670
  name: "tabler-zoom-out",
1527
- render: Vn
1528
- }), Un = {
1671
+ render: Yn
1672
+ }), Zn = {
1529
1673
  viewBox: "0 0 24 24",
1530
1674
  width: "1.2em",
1531
1675
  height: "1.2em"
1532
1676
  };
1533
- function Wn(e, t) {
1534
- return C(), o("svg", Un, [...t[0] ||= [s("path", {
1677
+ function Qn(e, t) {
1678
+ return C(), o("svg", Zn, [...t[0] ||= [s("path", {
1535
1679
  fill: "none",
1536
1680
  stroke: "currentColor",
1537
1681
  "stroke-linecap": "round",
@@ -1540,16 +1684,16 @@ function Wn(e, t) {
1540
1684
  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"
1541
1685
  }, null, -1)]]);
1542
1686
  }
1543
- var Gn = h({
1687
+ var $n = h({
1544
1688
  name: "tabler-maximize",
1545
- render: Wn
1546
- }), Kn = {
1689
+ render: Qn
1690
+ }), er = {
1547
1691
  viewBox: "0 0 24 24",
1548
1692
  width: "1.2em",
1549
1693
  height: "1.2em"
1550
1694
  };
1551
- function qn(e, t) {
1552
- return C(), o("svg", Kn, [...t[0] ||= [s("path", {
1695
+ function tr(e, t) {
1696
+ return C(), o("svg", er, [...t[0] ||= [s("path", {
1553
1697
  fill: "none",
1554
1698
  stroke: "currentColor",
1555
1699
  "stroke-linecap": "round",
@@ -1558,16 +1702,16 @@ function qn(e, t) {
1558
1702
  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"
1559
1703
  }, null, -1)]]);
1560
1704
  }
1561
- var Jn = h({
1705
+ var nr = h({
1562
1706
  name: "tabler-minimize",
1563
- render: qn
1564
- }), Yn = {
1707
+ render: tr
1708
+ }), rr = {
1565
1709
  viewBox: "0 0 24 24",
1566
1710
  width: "1.2em",
1567
1711
  height: "1.2em"
1568
1712
  };
1569
- function Xn(e, t) {
1570
- return C(), o("svg", Yn, [...t[0] ||= [s("g", {
1713
+ function ir(e, t) {
1714
+ return C(), o("svg", rr, [...t[0] ||= [s("g", {
1571
1715
  fill: "none",
1572
1716
  stroke: "currentColor",
1573
1717
  "stroke-linecap": "round",
@@ -1575,16 +1719,16 @@ function Xn(e, t) {
1575
1719
  "stroke-width": "2"
1576
1720
  }, [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)]]);
1577
1721
  }
1578
- var Zn = h({
1722
+ var ar = h({
1579
1723
  name: "tabler-settings",
1580
- render: Xn
1581
- }), Qn = {
1724
+ render: ir
1725
+ }), or = {
1582
1726
  viewBox: "0 0 24 24",
1583
1727
  width: "1.2em",
1584
1728
  height: "1.2em"
1585
1729
  };
1586
- function $n(e, t) {
1587
- return C(), o("svg", Qn, [...t[0] ||= [s("path", {
1730
+ function sr(e, t) {
1731
+ return C(), o("svg", or, [...t[0] ||= [s("path", {
1588
1732
  fill: "none",
1589
1733
  stroke: "currentColor",
1590
1734
  "stroke-linecap": "round",
@@ -1593,16 +1737,16 @@ function $n(e, t) {
1593
1737
  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"
1594
1738
  }, null, -1)]]);
1595
1739
  }
1596
- var er = h({
1740
+ var cr = h({
1597
1741
  name: "tabler-shape",
1598
- render: $n
1599
- }), tr = {
1742
+ render: sr
1743
+ }), lr = {
1600
1744
  viewBox: "0 0 24 24",
1601
1745
  width: "1.2em",
1602
1746
  height: "1.2em"
1603
1747
  };
1604
- function nr(e, t) {
1605
- return C(), o("svg", tr, [...t[0] ||= [s("path", {
1748
+ function ur(e, t) {
1749
+ return C(), o("svg", lr, [...t[0] ||= [s("path", {
1606
1750
  fill: "none",
1607
1751
  stroke: "currentColor",
1608
1752
  "stroke-linecap": "round",
@@ -1611,16 +1755,16 @@ function nr(e, t) {
1611
1755
  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"
1612
1756
  }, null, -1)]]);
1613
1757
  }
1614
- var rr = h({
1758
+ var dr = h({
1615
1759
  name: "tabler-chart-dots-3",
1616
- render: nr
1617
- }), ir = {
1760
+ render: ur
1761
+ }), fr = {
1618
1762
  viewBox: "0 0 24 24",
1619
1763
  width: "1.2em",
1620
1764
  height: "1.2em"
1621
1765
  };
1622
- function ar(e, t) {
1623
- return C(), o("svg", ir, [...t[0] ||= [s("path", {
1766
+ function pr(e, t) {
1767
+ return C(), o("svg", fr, [...t[0] ||= [s("path", {
1624
1768
  fill: "none",
1625
1769
  stroke: "currentColor",
1626
1770
  "stroke-linecap": "round",
@@ -1629,16 +1773,16 @@ function ar(e, t) {
1629
1773
  d: "m18 10l-6-6l-6 6zm0 4l-6 6l-6-6z"
1630
1774
  }, null, -1)]]);
1631
1775
  }
1632
- var or = h({
1776
+ var mr = h({
1633
1777
  name: "tabler-caret-up-down",
1634
- render: ar
1635
- }), sr = {
1778
+ render: pr
1779
+ }), hr = {
1636
1780
  viewBox: "0 0 24 24",
1637
1781
  width: "1.2em",
1638
1782
  height: "1.2em"
1639
1783
  };
1640
- function cr(e, t) {
1641
- return C(), o("svg", sr, [...t[0] ||= [s("path", {
1784
+ function gr(e, t) {
1785
+ return C(), o("svg", hr, [...t[0] ||= [s("path", {
1642
1786
  fill: "none",
1643
1787
  stroke: "currentColor",
1644
1788
  "stroke-linecap": "round",
@@ -1647,16 +1791,16 @@ function cr(e, t) {
1647
1791
  d: "M8 4H5v16h3m8-16h3v16h-3"
1648
1792
  }, null, -1)]]);
1649
1793
  }
1650
- var lr = h({
1794
+ var _r = h({
1651
1795
  name: "tabler-brackets",
1652
- render: cr
1653
- }), ur = {
1796
+ render: gr
1797
+ }), vr = {
1654
1798
  viewBox: "0 0 24 24",
1655
1799
  width: "1.2em",
1656
1800
  height: "1.2em"
1657
1801
  };
1658
- function dr(e, t) {
1659
- return C(), o("svg", ur, [...t[0] ||= [s("path", {
1802
+ function yr(e, t) {
1803
+ return C(), o("svg", vr, [...t[0] ||= [s("path", {
1660
1804
  fill: "none",
1661
1805
  stroke: "currentColor",
1662
1806
  "stroke-linecap": "round",
@@ -1665,34 +1809,34 @@ function dr(e, t) {
1665
1809
  d: "m7 8l-4 4l4 4m10-8l4 4l-4 4M3 12h18"
1666
1810
  }, null, -1)]]);
1667
1811
  }
1668
- var fr = h({
1812
+ var br = h({
1669
1813
  name: "tabler-arrows-horizontal",
1670
- render: dr
1814
+ render: yr
1671
1815
  });
1672
1816
  //#endregion
1673
1817
  //#region src/debug/canvasProfiler.ts
1674
- function pr() {
1818
+ function xr() {
1675
1819
  return Object.create(null);
1676
1820
  }
1677
- function mr() {
1821
+ function Sr() {
1678
1822
  return {
1679
- ctxMethods: pr(),
1680
- ctxProps: pr(),
1681
- canvasProps: pr(),
1823
+ ctxMethods: xr(),
1824
+ ctxProps: xr(),
1825
+ canvasProps: xr(),
1682
1826
  ctxMethodSources: Object.create(null)
1683
1827
  };
1684
1828
  }
1685
- function hr(e, t, n) {
1829
+ function Cr(e, t, n) {
1686
1830
  let r = e[t] ??= {
1687
1831
  count: 0,
1688
1832
  totalTime: 0
1689
1833
  };
1690
1834
  r.count += 1, r.totalTime += n;
1691
1835
  }
1692
- function gr(e, t, n, r) {
1693
- hr(e.ctxMethodSources[t] ??= pr(), n, r);
1836
+ function wr(e, t, n, r) {
1837
+ Cr(e.ctxMethodSources[t] ??= xr(), n, r);
1694
1838
  }
1695
- function _r(e) {
1839
+ function Tr(e) {
1696
1840
  return Object.entries(e).filter(([, e]) => e.count > 0).map(([e, t]) => ({
1697
1841
  name: e,
1698
1842
  count: t.count,
@@ -1700,12 +1844,12 @@ function _r(e) {
1700
1844
  averageTime: (t.totalTime / t.count).toFixed(4)
1701
1845
  })).sort((e, t) => Number(t.totalTime) - Number(e.totalTime));
1702
1846
  }
1703
- var vr = !1, yr = /* @__PURE__ */ new Map(), br = /* @__PURE__ */ new Map();
1704
- function xr(e) {
1705
- vr = e, e ? typeof window < "u" && !window.__KMAP_CANVAS_PROFILER_INSTALLED__ && wr() : Tr();
1847
+ var Er = !1, Dr = /* @__PURE__ */ new Map(), Or = /* @__PURE__ */ new Map();
1848
+ function kr(e) {
1849
+ Er = e, e ? typeof window < "u" && !window.__KMAP_CANVAS_PROFILER_INSTALLED__ && Mr() : Nr();
1706
1850
  }
1707
- function Sr() {
1708
- if (!vr) return "disabled";
1851
+ function Ar() {
1852
+ if (!Er) return "disabled";
1709
1853
  let e = (/* @__PURE__ */ Error()).stack;
1710
1854
  if (!e) return "unknown";
1711
1855
  let t = e.split("\n").map((e) => e.trim()).filter(Boolean);
@@ -1720,82 +1864,91 @@ function Sr() {
1720
1864
  }
1721
1865
  function Q(e, t, n, r) {
1722
1866
  let i = `${e.constructor?.name ?? "proto"}:${t}`;
1723
- if (yr.has(i)) return;
1867
+ if (Dr.has(i)) return;
1724
1868
  let a = Reflect.get(e, t);
1725
- typeof a == "function" && (yr.set(i, a), Reflect.set(e, t, function(...e) {
1726
- if (!vr) return a.apply(this, e);
1727
- let i = r?.captureSource ? Sr() : null, o = performance.now(), s = a.apply(this, e), c = performance.now() - o;
1728
- return hr(n.ctxMethods, t, c), i && gr(n, t, i, c), s;
1869
+ typeof a == "function" && (Dr.set(i, a), Reflect.set(e, t, function(...e) {
1870
+ if (!Er) return a.apply(this, e);
1871
+ let i = r?.captureSource ? Ar() : null, o = performance.now(), s = a.apply(this, e), c = performance.now() - o;
1872
+ return Cr(n.ctxMethods, t, c), i && wr(n, t, i, c), s;
1729
1873
  }));
1730
1874
  }
1731
- function Cr(e, t, n) {
1875
+ function jr(e, t, n) {
1732
1876
  let r = Object.getOwnPropertyDescriptor(e, t);
1733
1877
  if (!r?.set || !r.configurable) return;
1734
1878
  let i = `${e.constructor?.name ?? "proto"}:${t}`;
1735
- br.has(i) || (br.set(i, r), Object.defineProperty(e, t, {
1879
+ Or.has(i) || (Or.set(i, r), Object.defineProperty(e, t, {
1736
1880
  configurable: !0,
1737
1881
  enumerable: r.enumerable ?? !1,
1738
1882
  get: r.get,
1739
1883
  set(e) {
1740
- if (!vr) {
1884
+ if (!Er) {
1741
1885
  r.set.call(this, e);
1742
1886
  return;
1743
1887
  }
1744
1888
  let i = performance.now();
1745
- r.set.call(this, e), hr(n, t, performance.now() - i);
1889
+ r.set.call(this, e), Cr(n, t, performance.now() - i);
1746
1890
  }
1747
1891
  }));
1748
1892
  }
1749
- function wr() {
1893
+ function Mr() {
1750
1894
  if (typeof window > "u" || window.__KMAP_CANVAS_PROFILER_INSTALLED__) return;
1751
1895
  let e = CanvasRenderingContext2D?.prototype, t = HTMLCanvasElement?.prototype;
1752
1896
  if (!e || !t) return;
1753
- let n = mr();
1754
- 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), Cr(e, "font", n.ctxProps), Cr(e, "filter", n.ctxProps), Cr(e, "shadowBlur", n.ctxProps), Cr(e, "lineWidth", n.ctxProps), Cr(t, "width", n.canvasProps), Cr(t, "height", n.canvasProps), window.__KMAP_CANVAS_PROFILER_METRICS__ = n, window.__KMAP_CANVAS_PROFILER_INSTALLED__ = !0, window.showCanvasReport = () => {
1897
+ let n = Sr();
1898
+ 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), jr(e, "font", n.ctxProps), jr(e, "filter", n.ctxProps), jr(e, "shadowBlur", n.ctxProps), jr(e, "lineWidth", n.ctxProps), jr(t, "width", n.canvasProps), jr(t, "height", n.canvasProps), window.__KMAP_CANVAS_PROFILER_METRICS__ = n, window.__KMAP_CANVAS_PROFILER_INSTALLED__ = !0, window.showCanvasReport = () => {
1755
1899
  let e = window.__KMAP_CANVAS_PROFILER_METRICS__;
1756
1900
  if (e) {
1757
- console.group("[kmap] Canvas profiler report"), console.log("ctx methods"), console.table(_r(e.ctxMethods)), console.log("ctx props"), console.table(_r(e.ctxProps)), console.log("canvas props"), console.table(_r(e.canvasProps));
1901
+ console.group("[kmap] Canvas profiler report"), console.log("ctx methods"), console.table(Tr(e.ctxMethods)), console.log("ctx props"), console.table(Tr(e.ctxProps)), console.log("canvas props"), console.table(Tr(e.canvasProps));
1758
1902
  for (let t of ["fillText", "measureText"]) {
1759
1903
  let n = e.ctxMethodSources[t];
1760
- n && (console.log(`${t} sources`), console.table(_r(n).slice(0, 20)));
1904
+ n && (console.log(`${t} sources`), console.table(Tr(n).slice(0, 20)));
1761
1905
  }
1762
1906
  console.groupEnd();
1763
1907
  }
1764
1908
  }, window.resetCanvasReport = () => {
1765
- window.__KMAP_CANVAS_PROFILER_METRICS__ = mr();
1909
+ window.__KMAP_CANVAS_PROFILER_METRICS__ = Sr();
1766
1910
  }, console.info("[kmap] Canvas profiler enabled. Use window.showCanvasReport() and window.resetCanvasReport().");
1767
1911
  }
1768
- function Tr() {
1912
+ function Nr() {
1769
1913
  if (typeof window > "u" || !window.__KMAP_CANVAS_PROFILER_INSTALLED__) return;
1770
1914
  let e = CanvasRenderingContext2D?.prototype, t = HTMLCanvasElement?.prototype;
1771
- yr.forEach((n, r) => {
1915
+ Dr.forEach((n, r) => {
1772
1916
  let i = r.match(/^(.+):(.+)$/);
1773
1917
  if (!i) return;
1774
1918
  let [, a, o] = i, s = null;
1775
1919
  a === "CanvasRenderingContext2D" ? s = e : a === "HTMLCanvasElement" && (s = t), s && Reflect.set(s, o, n);
1776
- }), yr.clear(), br.forEach((n, r) => {
1920
+ }), Dr.clear(), Or.forEach((n, r) => {
1777
1921
  let i = r.match(/^(.+):(.+)$/);
1778
1922
  if (!i) return;
1779
1923
  let [, a, o] = i, s = null;
1780
1924
  a === "CanvasRenderingContext2D" ? s = e : a === "HTMLCanvasElement" && (s = t), s && n.configurable && Object.defineProperty(s, o, n);
1781
- }), br.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.");
1925
+ }), Or.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.");
1782
1926
  }
1783
1927
  //#endregion
1784
1928
  //#region src/components/ChartSettingsDialog.vue?vue&type=script&setup=true&lang.ts
1785
- var Er = { class: "settings-body" }, Dr = { class: "settings-label" }, Or = ["onUpdate:modelValue"], kr = { class: "settings-label" }, Ar = ["onUpdate:modelValue"], jr = { class: "settings-label" }, Mr = ["onUpdate:modelValue"], Nr = { class: "settings-header" }, Pr = { class: "header-right" }, Fr = { class: "settings-body" }, Ir = /*#__PURE__*/ G(/* @__PURE__ */ u({
1929
+ var Pr = { class: "settings-body" }, Fr = {
1930
+ key: 0,
1931
+ class: "md-switch"
1932
+ }, Ir = ["onUpdate:modelValue"], Lr = {
1933
+ key: 0,
1934
+ class: "md-switch"
1935
+ }, Rr = ["onUpdate:modelValue"], zr = {
1936
+ key: 0,
1937
+ class: "md-switch"
1938
+ }, Br = ["onUpdate:modelValue"], Vr = /*#__PURE__*/ q(/* @__PURE__ */ u({
1786
1939
  __name: "ChartSettingsDialog",
1787
1940
  props: { show: { type: Boolean } },
1788
1941
  emits: ["close", "confirm"],
1789
- setup(u, { emit: d }) {
1790
- let f = u, p = d, m = J(), h = r(() => W.filter((e) => e.group === "main")), g = r(() => W.filter((e) => e.group === "experimental")), _ = r(() => W.filter((e) => e.group === "style")), v = T(!1);
1791
- function y() {
1942
+ setup(t, { emit: n }) {
1943
+ let u = t, d = n, f = r(() => W.filter((e) => e.group === "main")), p = r(() => W.filter((e) => e.group === "experimental")), m = r(() => W.filter((e) => e.group === "style")), h = T(!1), g = T(null);
1944
+ function _() {
1792
1945
  try {
1793
- let e = localStorage.getItem(he);
1946
+ let e = localStorage.getItem(ge);
1794
1947
  if (e) {
1795
1948
  let t = JSON.parse(e), n = {};
1796
1949
  return W.forEach((e) => {
1797
1950
  n[e.key] = t[e.key] ?? e.default;
1798
- }), n.colorPresetSettings = H(t.colorPresetSettings), n;
1951
+ }), n.colorPresetSettings = ie(t.colorPresetSettings), n;
1799
1952
  }
1800
1953
  } catch {}
1801
1954
  let e = {};
@@ -1803,181 +1956,163 @@ var Er = { class: "settings-body" }, Dr = { class: "settings-label" }, Or = ["on
1803
1956
  e[t.key] = t.default;
1804
1957
  }), e.colorPresetSettings = {}, e;
1805
1958
  }
1806
- let b = T(y());
1807
- N(() => f.show, (e) => {
1808
- e && (b.value = y());
1959
+ let v = T(_());
1960
+ P(() => u.show, (e) => {
1961
+ e && (v.value = _());
1809
1962
  });
1810
- function x() {
1811
- p("close");
1963
+ function y() {
1964
+ d("close");
1812
1965
  }
1813
- function S() {
1966
+ function b() {
1814
1967
  let e = {};
1815
1968
  W.forEach((t) => {
1816
1969
  e[t.key] = t.default;
1817
- }), e.colorPresetSettings = {}, b.value = e;
1818
- }
1819
- function w() {
1820
- p("confirm", { ...b.value });
1970
+ }), e.colorPresetSettings = {}, v.value = e;
1821
1971
  }
1822
- return (r, d) => (C(), i(t, { to: A(m) }, [l(n, { name: "overlay" }, {
1823
- default: P(() => [u.show ? (C(), o("div", {
1824
- key: 0,
1825
- class: "settings-overlay",
1972
+ function x() {
1973
+ d("confirm", { ...v.value });
1974
+ }
1975
+ return (n, r) => (C(), o(e, null, [l(Y, {
1976
+ show: t.show,
1977
+ width: "min(92vw, 460px)",
1978
+ "max-height": "min(720px, calc(100vh - 48px))",
1979
+ "footer-align": "space-between",
1980
+ onClose: y
1981
+ }, {
1982
+ header: F(() => [...r[5] ||= [s("div", { class: "header-left" }, [s("span", { class: "settings-title" }, "图表设置"), s("span", { class: "settings-subtitle" }, "个性化配置")], -1)]]),
1983
+ footer: F(() => [s("button", {
1984
+ class: "settings-btn reset",
1985
+ onClick: b
1986
+ }, [...r[13] ||= [s("svg", {
1987
+ viewBox: "0 0 24 24",
1988
+ fill: "none",
1989
+ stroke: "currentColor",
1990
+ "stroke-width": "2"
1991
+ }, [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", { class: "footer-right" }, [s("button", {
1992
+ class: "settings-btn cancel",
1993
+ onClick: y
1994
+ }, "取消"), s("button", {
1995
+ class: "settings-btn confirm",
1826
1996
  onClick: x
1827
- }, [l(n, { name: "modal" }, {
1828
- default: P(() => [s("div", {
1829
- class: "settings-modal",
1830
- onClick: d[1] ||= L(() => {}, ["stop"])
1831
- }, [
1832
- s("div", { class: "settings-header" }, [d[7] ||= s("div", { class: "header-left" }, [s("span", { class: "settings-title" }, "图表设置"), s("span", { class: "settings-subtitle" }, "个性化配置")], -1), s("div", { class: "header-right" }, [s("button", {
1833
- class: "settings-close",
1834
- onClick: x
1835
- }, [...d[6] ||= [s("svg", {
1836
- viewBox: "0 0 24 24",
1837
- fill: "none",
1838
- stroke: "currentColor",
1839
- "stroke-width": "2"
1840
- }, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])])]),
1841
- s("div", Er, [
1842
- h.value.length > 0 ? (C(), o(e, { key: 0 }, [d[8] ||= s("div", { class: "settings-section-divider" }, [s("span", { class: "settings-section-label" }, "主图设置")], -1), (C(!0), o(e, null, E(h.value, (e) => (C(), o("div", {
1843
- key: e.key,
1844
- class: "settings-item"
1845
- }, [s("label", Dr, [s("span", null, k(e.label), 1), e.type === "boolean" ? F((C(), o("input", {
1846
- key: 0,
1847
- type: "checkbox",
1848
- class: "settings-checkbox",
1849
- "onUpdate:modelValue": (t) => b.value[e.key] = t
1850
- }, null, 8, Or)), [[j, b.value[e.key]]]) : e.type === "select" && e.options ? (C(), i(Y, {
1851
- key: 1,
1852
- "model-value": String(b.value[e.key]),
1853
- options: e.options,
1854
- size: "sm",
1855
- "min-width": "100px",
1856
- "onUpdate:modelValue": (t) => b.value[e.key] = t
1857
- }, null, 8, [
1858
- "model-value",
1859
- "options",
1860
- "onUpdate:modelValue"
1861
- ])) : a("", !0)])]))), 128))], 64)) : a("", !0),
1862
- d[11] ||= s("div", { class: "settings-section-divider" }, [s("span", { class: "settings-section-label" }, "样式 / 颜色")], -1),
1863
- (C(!0), o(e, null, E(_.value, (e) => (C(), o("div", {
1864
- key: e.key,
1865
- class: "settings-item"
1866
- }, [s("label", kr, [s("span", null, k(e.label), 1), e.type === "boolean" ? F((C(), o("input", {
1867
- key: 0,
1868
- type: "checkbox",
1869
- class: "settings-checkbox",
1870
- "onUpdate:modelValue": (t) => b.value[e.key] = t
1871
- }, null, 8, Ar)), [[j, b.value[e.key]]]) : e.type === "select" && e.options ? (C(), i(Y, {
1872
- key: 1,
1873
- "model-value": String(b.value[e.key]),
1874
- options: e.options,
1875
- size: "sm",
1876
- "min-width": "100px",
1877
- "onUpdate:modelValue": (t) => b.value[e.key] = t
1878
- }, null, 8, [
1879
- "model-value",
1880
- "options",
1881
- "onUpdate:modelValue"
1882
- ])) : a("", !0)])]))), 128)),
1883
- s("div", {
1884
- class: "settings-item nav-item",
1885
- onClick: d[0] ||= (e) => v.value = !0
1886
- }, [...d[9] ||= [s("label", { class: "settings-label" }, [s("span", null, "颜色配置"), s("svg", {
1887
- viewBox: "0 0 24 24",
1888
- fill: "none",
1889
- stroke: "currentColor",
1890
- "stroke-width": "2",
1891
- width: "16",
1892
- height: "16",
1893
- class: "nav-arrow"
1894
- }, [s("path", { d: "M9 18l6-6-6-6" })])], -1)]]),
1895
- g.value.length > 0 ? (C(), o(e, { key: 1 }, [d[10] ||= s("div", { class: "settings-section-divider" }, [s("span", { class: "settings-section-label" }, "实验性 / 调试设置")], -1), (C(!0), o(e, null, E(g.value, (e) => (C(), o("div", {
1896
- key: e.key,
1897
- class: "settings-item experimental"
1898
- }, [s("label", jr, [s("span", null, k(e.label), 1), e.type === "boolean" ? F((C(), o("input", {
1899
- key: 0,
1900
- type: "checkbox",
1901
- class: "settings-checkbox",
1902
- "onUpdate:modelValue": (t) => b.value[e.key] = t
1903
- }, null, 8, Mr)), [[j, b.value[e.key]]]) : e.type === "select" && e.options ? (C(), i(Y, {
1904
- key: 1,
1905
- "model-value": String(b.value[e.key]),
1906
- options: e.options,
1907
- size: "sm",
1908
- "min-width": "100px",
1909
- "onUpdate:modelValue": (t) => b.value[e.key] = t
1910
- }, null, 8, [
1911
- "model-value",
1912
- "options",
1913
- "onUpdate:modelValue"
1914
- ])) : a("", !0)])]))), 128))], 64)) : a("", !0)
1915
- ]),
1916
- s("div", { class: "settings-footer" }, [s("button", {
1917
- class: "settings-btn reset",
1918
- onClick: S
1919
- }, [...d[12] ||= [s("svg", {
1920
- viewBox: "0 0 24 24",
1921
- fill: "none",
1922
- stroke: "currentColor",
1923
- "stroke-width": "2"
1924
- }, [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", { class: "footer-right" }, [s("button", {
1925
- class: "settings-btn cancel",
1926
- onClick: x
1927
- }, "取消"), s("button", {
1928
- class: "settings-btn confirm",
1929
- onClick: w
1930
- }, [...d[13] ||= [s("svg", {
1931
- viewBox: "0 0 24 24",
1932
- fill: "none",
1933
- stroke: "currentColor",
1934
- "stroke-width": "2.5"
1935
- }, [s("path", { d: "M20 6L9 17l-5-5" })], -1), c(" 确定 ", -1)]])])])
1936
- ])]),
1937
- _: 1
1938
- })])) : a("", !0)]),
1939
- _: 1
1940
- }), l(n, { name: "overlay" }, {
1941
- default: P(() => [v.value ? (C(), o("div", {
1942
- key: 0,
1943
- class: "settings-overlay nested-overlay",
1944
- onClick: d[5] ||= (e) => v.value = !1
1945
- }, [l(n, { name: "modal" }, {
1946
- default: P(() => [s("div", {
1947
- class: "settings-modal",
1948
- onClick: d[4] ||= L(() => {}, ["stop"])
1949
- }, [s("div", Nr, [d[15] ||= s("div", { class: "header-left" }, [s("span", { class: "settings-title" }, "颜色预设"), s("span", { class: "settings-subtitle" }, "自定义图表颜色")], -1), s("div", Pr, [s("button", {
1950
- class: "settings-close",
1951
- onClick: d[2] ||= (e) => v.value = !1
1952
- }, [...d[14] ||= [s("svg", {
1997
+ }, [...r[14] ||= [s("svg", {
1998
+ viewBox: "0 0 24 24",
1999
+ fill: "none",
2000
+ stroke: "currentColor",
2001
+ "stroke-width": "2.5"
2002
+ }, [s("path", { d: "M20 6L9 17l-5-5" })], -1), c(" 确定 ", -1)]])])]),
2003
+ default: F(() => [s("div", Pr, [
2004
+ f.value.length > 0 ? (C(), o(e, { key: 0 }, [r[7] ||= s("div", { class: "settings-section-divider" }, [s("span", { class: "settings-section-label" }, "主图设置")], -1), (C(!0), o(e, null, E(f.value, (e) => (C(), o("div", {
2005
+ key: e.key,
2006
+ class: "settings-item"
2007
+ }, [s("span", null, A(e.label), 1), e.type === "boolean" ? (C(), o("label", Fr, [I(s("input", {
2008
+ type: "checkbox",
2009
+ "onUpdate:modelValue": (t) => v.value[e.key] = t
2010
+ }, null, 8, Ir), [[M, v.value[e.key]]]), r[6] ||= s("span", { class: "md-switch-slider" }, null, -1)])) : e.type === "select" && e.options ? (C(), i(J, {
2011
+ key: 1,
2012
+ "model-value": String(v.value[e.key]),
2013
+ options: e.options,
2014
+ size: "sm",
2015
+ "min-width": "100px",
2016
+ "onUpdate:modelValue": (t) => v.value[e.key] = t
2017
+ }, null, 8, [
2018
+ "model-value",
2019
+ "options",
2020
+ "onUpdate:modelValue"
2021
+ ])) : a("", !0)]))), 128))], 64)) : a("", !0),
2022
+ r[12] ||= s("div", { class: "settings-section-divider" }, [s("span", { class: "settings-section-label" }, "样式 / 颜色")], -1),
2023
+ (C(!0), o(e, null, E(m.value, (e) => (C(), o("div", {
2024
+ key: e.key,
2025
+ class: "settings-item"
2026
+ }, [s("span", null, A(e.label), 1), e.type === "boolean" ? (C(), o("label", Lr, [I(s("input", {
2027
+ type: "checkbox",
2028
+ "onUpdate:modelValue": (t) => v.value[e.key] = t
2029
+ }, null, 8, Rr), [[M, v.value[e.key]]]), r[8] ||= s("span", { class: "md-switch-slider" }, null, -1)])) : e.type === "select" && e.options ? (C(), i(J, {
2030
+ key: 1,
2031
+ "model-value": String(v.value[e.key]),
2032
+ options: e.options,
2033
+ size: "sm",
2034
+ "min-width": "100px",
2035
+ "onUpdate:modelValue": (t) => v.value[e.key] = t
2036
+ }, null, 8, [
2037
+ "model-value",
2038
+ "options",
2039
+ "onUpdate:modelValue"
2040
+ ])) : a("", !0)]))), 128)),
2041
+ s("div", {
2042
+ class: "settings-item nav-item",
2043
+ onClick: r[0] ||= (e) => h.value = !0
2044
+ }, [...r[9] ||= [s("span", null, "颜色配置", -1), s("svg", {
1953
2045
  viewBox: "0 0 24 24",
1954
2046
  fill: "none",
1955
2047
  stroke: "currentColor",
1956
- "stroke-width": "2"
1957
- }, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])])]), s("div", Fr, [l(K, {
1958
- "color-preset-settings": b.value.colorPresetSettings,
1959
- "onUpdate:colorPresetSettings": d[3] ||= (e) => b.value = {
1960
- ...b.value,
1961
- colorPresetSettings: e
1962
- }
1963
- }, null, 8, ["color-preset-settings"])])])]),
1964
- _: 1
1965
- })])) : a("", !0)]),
2048
+ "stroke-width": "2",
2049
+ width: "16",
2050
+ height: "16",
2051
+ class: "nav-arrow"
2052
+ }, [s("path", { d: "M9 18l6-6-6-6" })], -1)]]),
2053
+ p.value.length > 0 ? (C(), o(e, { key: 1 }, [r[11] ||= s("div", { class: "settings-section-divider" }, [s("span", { class: "settings-section-label" }, "实验性 / 调试设置")], -1), (C(!0), o(e, null, E(p.value, (e) => (C(), o("div", {
2054
+ key: e.key,
2055
+ class: "settings-item experimental"
2056
+ }, [s("span", null, A(e.label), 1), e.type === "boolean" ? (C(), o("label", zr, [I(s("input", {
2057
+ type: "checkbox",
2058
+ "onUpdate:modelValue": (t) => v.value[e.key] = t
2059
+ }, null, 8, Br), [[M, v.value[e.key]]]), r[10] ||= s("span", { class: "md-switch-slider" }, null, -1)])) : e.type === "select" && e.options ? (C(), i(J, {
2060
+ key: 1,
2061
+ "model-value": String(v.value[e.key]),
2062
+ options: e.options,
2063
+ size: "sm",
2064
+ "min-width": "100px",
2065
+ "onUpdate:modelValue": (t) => v.value[e.key] = t
2066
+ }, null, 8, [
2067
+ "model-value",
2068
+ "options",
2069
+ "onUpdate:modelValue"
2070
+ ])) : a("", !0)]))), 128))], 64)) : a("", !0)
2071
+ ])]),
1966
2072
  _: 1
1967
- })], 8, ["to"]));
2073
+ }, 8, ["show"]), l(Y, {
2074
+ show: h.value,
2075
+ title: "颜色预设",
2076
+ subtitle: "自定义图表颜色",
2077
+ width: "min(92vw, 460px)",
2078
+ "max-height": "min(720px, calc(100vh - 48px))",
2079
+ "z-index": 1100,
2080
+ "footer-align": "space-between",
2081
+ onClose: r[4] ||= (e) => h.value = !1
2082
+ }, {
2083
+ footer: F(() => [s("button", {
2084
+ type: "button",
2085
+ class: "settings-btn reset",
2086
+ onClick: r[2] ||= (e) => g.value?.resetCurrentThemeColors()
2087
+ }, " 重置颜色 "), s("button", {
2088
+ type: "button",
2089
+ class: "settings-btn confirm",
2090
+ onClick: r[3] ||= (e) => h.value = !1
2091
+ }, " 确认 ")]),
2092
+ default: F(() => [l(Ce, {
2093
+ ref_key: "colorPresetPanelRef",
2094
+ ref: g,
2095
+ "color-preset-settings": v.value.colorPresetSettings,
2096
+ "onUpdate:colorPresetSettings": r[1] ||= (e) => v.value = {
2097
+ ...v.value,
2098
+ colorPresetSettings: e
2099
+ }
2100
+ }, null, 8, ["color-preset-settings"])]),
2101
+ _: 1
2102
+ }, 8, ["show"])], 64));
1968
2103
  }
1969
- }), [["__scopeId", "data-v-e04604ac"]]), Lr = {
2104
+ }), [["__scopeId", "data-v-54c84784"]]), Hr = {
1970
2105
  class: "left-toolbar",
1971
2106
  "aria-label": "图表工具栏"
1972
- }, Rr = { class: "left-toolbar__group" }, zr = [
2107
+ }, Ur = { class: "left-toolbar__group" }, Wr = [
1973
2108
  "title",
1974
2109
  "aria-label",
1975
2110
  "onClick"
1976
- ], Br = ["onClick"], Vr = [
2111
+ ], Gr = ["onClick"], Kr = [
1977
2112
  "title",
1978
2113
  "aria-label",
1979
2114
  "onClick"
1980
- ], Hr = { class: "left-toolbar__group" }, Ur = { class: "left-toolbar__group" }, Wr = ["title", "aria-label"], Gr = { class: "left-toolbar__group" }, Kr = /*#__PURE__*/ G(/* @__PURE__ */ u({
2115
+ ], qr = { class: "left-toolbar__group" }, Jr = { class: "left-toolbar__group" }, Yr = ["title", "aria-label"], Xr = { class: "left-toolbar__group" }, Zr = /*#__PURE__*/ q(/* @__PURE__ */ u({
1981
2116
  __name: "LeftToolbar",
1982
2117
  props: { isFullscreen: { type: Boolean } },
1983
2118
  emits: [
@@ -1992,86 +2127,86 @@ var Er = { class: "settings-body" }, Dr = { class: "settings-label" }, Or = ["on
1992
2127
  {
1993
2128
  id: "cursor",
1994
2129
  title: "光标",
1995
- icon: hn
2130
+ icon: Cn
1996
2131
  },
1997
2132
  {
1998
2133
  id: "lines",
1999
2134
  title: "线条",
2000
- icon: vn,
2135
+ icon: En,
2001
2136
  children: [
2002
2137
  {
2003
2138
  id: "trend-line",
2004
2139
  title: "线段",
2005
- icon: vn
2140
+ icon: En
2006
2141
  },
2007
2142
  {
2008
2143
  id: "ray",
2009
2144
  title: "射线",
2010
- icon: xn
2145
+ icon: kn
2011
2146
  },
2012
2147
  {
2013
2148
  id: "h-line",
2014
2149
  title: "水平线",
2015
- icon: Dn
2150
+ icon: Fn
2016
2151
  },
2017
2152
  {
2018
2153
  id: "h-ray",
2019
2154
  title: "水平射线",
2020
- icon: wn
2155
+ icon: Mn
2021
2156
  },
2022
2157
  {
2023
2158
  id: "v-line",
2024
2159
  title: "垂直线",
2025
- icon: An
2160
+ icon: Rn
2026
2161
  },
2027
2162
  {
2028
2163
  id: "crosshair-line",
2029
2164
  title: "十字线",
2030
- icon: Nn
2165
+ icon: Vn
2031
2166
  },
2032
2167
  {
2033
2168
  id: "info-line",
2034
2169
  title: "信息线",
2035
- icon: In
2170
+ icon: Wn
2036
2171
  }
2037
2172
  ]
2038
2173
  },
2039
2174
  {
2040
2175
  id: "channels",
2041
2176
  title: "通道",
2042
- icon: er,
2177
+ icon: cr,
2043
2178
  children: [
2044
2179
  {
2045
2180
  id: "parallel-channel",
2046
2181
  title: "平行通道",
2047
- icon: er
2182
+ icon: cr
2048
2183
  },
2049
2184
  {
2050
2185
  id: "regression-channel",
2051
2186
  title: "回归趋势",
2052
- icon: rr
2187
+ icon: dr
2053
2188
  },
2054
2189
  {
2055
2190
  id: "flat-line",
2056
2191
  title: "平滑顶底",
2057
- icon: or
2192
+ icon: mr
2058
2193
  },
2059
2194
  {
2060
2195
  id: "disjoint-channel",
2061
2196
  title: "不相交通道",
2062
- icon: lr
2197
+ icon: _r
2063
2198
  }
2064
2199
  ]
2065
2200
  },
2066
2201
  {
2067
2202
  id: "range-select",
2068
2203
  title: "导出区间数据",
2069
- icon: fr
2204
+ icon: br
2070
2205
  }
2071
2206
  ], d = c, f = T("cursor"), p = T(null), m = T(!1);
2072
2207
  function h() {
2073
2208
  try {
2074
- let e = localStorage.getItem(he);
2209
+ let e = localStorage.getItem(ge);
2075
2210
  if (e) {
2076
2211
  let t = JSON.parse(e), n = { ...t };
2077
2212
  return W.forEach((e) => {
@@ -2086,7 +2221,7 @@ var Er = { class: "settings-body" }, Dr = { class: "settings-label" }, Or = ["on
2086
2221
  }
2087
2222
  function g(e) {
2088
2223
  try {
2089
- localStorage.setItem(he, JSON.stringify(e));
2224
+ localStorage.setItem(ge, JSON.stringify(e));
2090
2225
  } catch {}
2091
2226
  }
2092
2227
  let v = T(h());
@@ -2099,7 +2234,7 @@ var Er = { class: "settings-body" }, Dr = { class: "settings-label" }, Or = ["on
2099
2234
  let t = e.children[0];
2100
2235
  f.value = t.id, d("selectTool", t.id);
2101
2236
  }
2102
- O(e.id);
2237
+ D(e.id);
2103
2238
  return;
2104
2239
  }
2105
2240
  f.value = e.id, d("selectTool", e.id), p.value = null;
@@ -2107,28 +2242,28 @@ var Er = { class: "settings-body" }, Dr = { class: "settings-label" }, Or = ["on
2107
2242
  function w(e) {
2108
2243
  f.value = e.id, d("selectTool", e.id), p.value = null;
2109
2244
  }
2110
- function O(e) {
2245
+ function D(e) {
2111
2246
  p.value = p.value === e ? null : e;
2112
2247
  }
2113
2248
  function k() {
2114
2249
  m.value = !0;
2115
2250
  }
2116
- function j() {
2251
+ function A() {
2117
2252
  return { ...v.value };
2118
2253
  }
2119
- r({ getSettings: j });
2254
+ r({ getSettings: A });
2120
2255
  function M(e) {
2121
- v.value = { ...e }, g(v.value), xr(!!v.value.enableCanvasProfiler), d("settingsChange", { ...v.value }), m.value = !1;
2256
+ v.value = { ...e }, g(v.value), kr(!!v.value.enableCanvasProfiler), d("settingsChange", { ...v.value }), m.value = !1;
2122
2257
  }
2123
2258
  function N(e) {
2124
2259
  e.target.closest(".tool-item") || (p.value = null);
2125
2260
  }
2126
2261
  return b(() => {
2127
- document.addEventListener("click", N, !0), d("settingsChange", { ...v.value }), xr(!!v.value.enableCanvasProfiler);
2262
+ document.addEventListener("click", N, !0), d("settingsChange", { ...v.value }), kr(!!v.value.enableCanvasProfiler);
2128
2263
  }), S(() => {
2129
2264
  document.removeEventListener("click", N, !0);
2130
- }), (r, c) => (C(), o(e, null, [s("nav", Lr, [
2131
- s("div", Rr, [(C(), o(e, null, E(u, (t) => s("div", {
2265
+ }), (r, c) => (C(), o(e, null, [s("nav", Hr, [
2266
+ s("div", Ur, [(C(), o(e, null, E(u, (t) => s("div", {
2132
2267
  key: t.id,
2133
2268
  class: "tool-item"
2134
2269
  }, [s("button", {
@@ -2137,24 +2272,24 @@ var Er = { class: "settings-body" }, Dr = { class: "settings-label" }, Or = ["on
2137
2272
  title: t.title,
2138
2273
  "aria-label": t.title,
2139
2274
  onClick: (e) => x(t),
2140
- onPointerdown: c[0] ||= L(() => {}, ["stop"]),
2141
- onPointermove: c[1] ||= L(() => {}, ["stop"]),
2142
- onPointerup: c[2] ||= L(() => {}, ["stop"])
2143
- }, [(C(), i(D(t.icon), {
2275
+ onPointerdown: c[0] ||= R(() => {}, ["stop"]),
2276
+ onPointermove: c[1] ||= R(() => {}, ["stop"]),
2277
+ onPointerup: c[2] ||= R(() => {}, ["stop"])
2278
+ }, [(C(), i(O(t.icon), {
2144
2279
  class: "tool-icon",
2145
2280
  "aria-hidden": "true"
2146
2281
  })), t.children && t.children.length ? (C(), o("span", {
2147
2282
  key: 0,
2148
2283
  class: _(["corner-indicator", { open: p.value === t.id }]),
2149
- onClick: L((e) => O(t.id), ["stop"]),
2284
+ onClick: R((e) => D(t.id), ["stop"]),
2150
2285
  "aria-label": "展开子菜单"
2151
- }, null, 10, Br)) : a("", !0)], 42, zr), l(n, { name: "dropdown" }, {
2152
- default: P(() => [p.value === t.id && t.children && t.children.length ? (C(), o("div", {
2286
+ }, null, 10, Gr)) : a("", !0)], 42, Wr), l(n, { name: "dropdown" }, {
2287
+ default: F(() => [p.value === t.id && t.children && t.children.length ? (C(), o("div", {
2153
2288
  key: 0,
2154
2289
  class: "tool-dropdown",
2155
- onPointerdown: c[3] ||= L(() => {}, ["stop"]),
2156
- onPointermove: c[4] ||= L(() => {}, ["stop"]),
2157
- onPointerup: c[5] ||= L(() => {}, ["stop"])
2290
+ onPointerdown: c[3] ||= R(() => {}, ["stop"]),
2291
+ onPointermove: c[4] ||= R(() => {}, ["stop"]),
2292
+ onPointerup: c[5] ||= R(() => {}, ["stop"])
2158
2293
  }, [(C(!0), o(e, null, E(t.children, (e) => (C(), o("button", {
2159
2294
  key: e.id,
2160
2295
  type: "button",
@@ -2162,23 +2297,23 @@ var Er = { class: "settings-body" }, Dr = { class: "settings-label" }, Or = ["on
2162
2297
  title: e.title,
2163
2298
  "aria-label": e.title,
2164
2299
  onClick: (t) => w(e)
2165
- }, [(C(), i(D(e.icon), {
2300
+ }, [(C(), i(O(e.icon), {
2166
2301
  class: "tool-icon",
2167
2302
  "aria-hidden": "true"
2168
- }))], 10, Vr))), 128))], 32)) : a("", !0)]),
2303
+ }))], 10, Kr))), 128))], 32)) : a("", !0)]),
2169
2304
  _: 2
2170
2305
  }, 1024)])), 64))]),
2171
2306
  c[22] ||= s("span", { class: "left-toolbar__divider" }, null, -1),
2172
- s("div", Hr, [s("button", {
2307
+ s("div", qr, [s("button", {
2173
2308
  type: "button",
2174
2309
  class: "left-toolbar__button",
2175
2310
  title: "放大",
2176
2311
  "aria-label": "放大",
2177
2312
  onClick: c[6] ||= (e) => r.$emit("zoomIn"),
2178
- onPointerdown: c[7] ||= L(() => {}, ["stop"]),
2179
- onPointermove: c[8] ||= L(() => {}, ["stop"]),
2180
- onPointerup: c[9] ||= L(() => {}, ["stop"])
2181
- }, [l(A(zn), {
2313
+ onPointerdown: c[7] ||= R(() => {}, ["stop"]),
2314
+ onPointermove: c[8] ||= R(() => {}, ["stop"]),
2315
+ onPointerup: c[9] ||= R(() => {}, ["stop"])
2316
+ }, [l(j(qn), {
2182
2317
  class: "tool-icon",
2183
2318
  "aria-hidden": "true"
2184
2319
  })], 32), s("button", {
@@ -2187,53 +2322,53 @@ var Er = { class: "settings-body" }, Dr = { class: "settings-label" }, Or = ["on
2187
2322
  title: "缩小",
2188
2323
  "aria-label": "缩小",
2189
2324
  onClick: c[10] ||= (e) => r.$emit("zoomOut"),
2190
- onPointerdown: c[11] ||= L(() => {}, ["stop"]),
2191
- onPointermove: c[12] ||= L(() => {}, ["stop"]),
2192
- onPointerup: c[13] ||= L(() => {}, ["stop"])
2193
- }, [l(A(Hn), {
2325
+ onPointerdown: c[11] ||= R(() => {}, ["stop"]),
2326
+ onPointermove: c[12] ||= R(() => {}, ["stop"]),
2327
+ onPointerup: c[13] ||= R(() => {}, ["stop"])
2328
+ }, [l(j(Xn), {
2194
2329
  class: "tool-icon",
2195
2330
  "aria-hidden": "true"
2196
2331
  })], 32)]),
2197
2332
  c[23] ||= s("span", { class: "left-toolbar__divider" }, null, -1),
2198
- s("div", Ur, [s("button", {
2333
+ s("div", Jr, [s("button", {
2199
2334
  type: "button",
2200
2335
  class: "left-toolbar__button",
2201
2336
  title: t.isFullscreen ? "退出全屏" : "全屏显示",
2202
2337
  "aria-label": t.isFullscreen ? "退出全屏" : "全屏显示",
2203
2338
  onClick: c[14] ||= (e) => r.$emit("toggleFullscreen"),
2204
- onPointerdown: c[15] ||= L(() => {}, ["stop"]),
2205
- onPointermove: c[16] ||= L(() => {}, ["stop"]),
2206
- onPointerup: c[17] ||= L(() => {}, ["stop"])
2207
- }, [t.isFullscreen ? (C(), i(A(Jn), {
2339
+ onPointerdown: c[15] ||= R(() => {}, ["stop"]),
2340
+ onPointermove: c[16] ||= R(() => {}, ["stop"]),
2341
+ onPointerup: c[17] ||= R(() => {}, ["stop"])
2342
+ }, [t.isFullscreen ? (C(), i(j(nr), {
2208
2343
  key: 0,
2209
2344
  class: "tool-icon",
2210
2345
  "aria-hidden": "true"
2211
- })) : (C(), i(A(Gn), {
2346
+ })) : (C(), i(j($n), {
2212
2347
  key: 1,
2213
2348
  class: "tool-icon",
2214
2349
  "aria-hidden": "true"
2215
- }))], 40, Wr)]),
2350
+ }))], 40, Yr)]),
2216
2351
  c[24] ||= s("span", { class: "left-toolbar__divider" }, null, -1),
2217
- s("div", Gr, [s("button", {
2352
+ s("div", Xr, [s("button", {
2218
2353
  type: "button",
2219
2354
  class: "left-toolbar__button",
2220
2355
  title: "设置",
2221
2356
  "aria-label": "设置",
2222
2357
  onClick: k,
2223
- onPointerdown: c[18] ||= L(() => {}, ["stop"]),
2224
- onPointermove: c[19] ||= L(() => {}, ["stop"]),
2225
- onPointerup: c[20] ||= L(() => {}, ["stop"])
2226
- }, [l(A(Zn), {
2358
+ onPointerdown: c[18] ||= R(() => {}, ["stop"]),
2359
+ onPointermove: c[19] ||= R(() => {}, ["stop"]),
2360
+ onPointerup: c[20] ||= R(() => {}, ["stop"])
2361
+ }, [l(j(ar), {
2227
2362
  class: "tool-icon",
2228
2363
  "aria-hidden": "true"
2229
2364
  })], 32)])
2230
- ]), l(Ir, {
2365
+ ]), l(Vr, {
2231
2366
  show: m.value,
2232
2367
  onClose: c[21] ||= (e) => m.value = !1,
2233
2368
  onConfirm: M
2234
2369
  }, null, 8, ["show"])], 64));
2235
2370
  }
2236
- }), [["__scopeId", "data-v-e4748a67"]]), qr = /* @__PURE__ */ u({
2371
+ }), [["__scopeId", "data-v-b7aa8ccf"]]), Qr = /* @__PURE__ */ u({
2237
2372
  __name: "KLineLevelDropdown",
2238
2373
  props: { modelValue: {} },
2239
2374
  emits: ["update:modelValue"],
@@ -2280,7 +2415,7 @@ var Er = { class: "settings-body" }, Dr = { class: "settings-label" }, Or = ["on
2280
2415
  value: "yearly"
2281
2416
  }
2282
2417
  ], r = t;
2283
- return (t, a) => (C(), i(Y, {
2418
+ return (t, a) => (C(), i(J, {
2284
2419
  "model-value": e.modelValue,
2285
2420
  options: n,
2286
2421
  label: "级别",
@@ -2289,7 +2424,7 @@ var Er = { class: "settings-body" }, Dr = { class: "settings-label" }, Or = ["on
2289
2424
  "onUpdate:modelValue": a[0] ||= (e) => r("update:modelValue", e)
2290
2425
  }, null, 8, ["model-value"]));
2291
2426
  }
2292
- }), Jr = /* @__PURE__ */ u({
2427
+ }), $r = /* @__PURE__ */ u({
2293
2428
  __name: "KLineAdjustmentDropdown",
2294
2429
  props: { modelValue: {} },
2295
2430
  emits: ["update:modelValue"],
@@ -2312,7 +2447,7 @@ var Er = { class: "settings-body" }, Dr = { class: "settings-label" }, Or = ["on
2312
2447
  value: "none"
2313
2448
  }
2314
2449
  ], r = t;
2315
- return (t, a) => (C(), i(Y, {
2450
+ return (t, a) => (C(), i(J, {
2316
2451
  "model-value": e.modelValue,
2317
2452
  options: n,
2318
2453
  label: "复权",
@@ -2321,13 +2456,13 @@ var Er = { class: "settings-body" }, Dr = { class: "settings-label" }, Or = ["on
2321
2456
  "onUpdate:modelValue": a[0] ||= (e) => r("update:modelValue", e)
2322
2457
  }, null, 8, ["model-value"]));
2323
2458
  }
2324
- }), Yr = {
2459
+ }), ei = {
2325
2460
  viewBox: "0 0 24 24",
2326
2461
  width: "1.2em",
2327
2462
  height: "1.2em"
2328
2463
  };
2329
- function Xr(e, t) {
2330
- return C(), o("svg", Yr, [...t[0] ||= [s("path", {
2464
+ function ti(e, t) {
2465
+ return C(), o("svg", ei, [...t[0] ||= [s("path", {
2331
2466
  fill: "none",
2332
2467
  stroke: "currentColor",
2333
2468
  "stroke-linecap": "round",
@@ -2336,21 +2471,21 @@ function Xr(e, t) {
2336
2471
  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"
2337
2472
  }, null, -1)]]);
2338
2473
  }
2339
- var Zr = h({
2474
+ var ni = h({
2340
2475
  name: "tabler-alert-triangle",
2341
- render: Xr
2342
- }), Qr = ["title", "aria-expanded"], $r = { class: "symbol-chip__code" }, ei = {
2476
+ render: ti
2477
+ }), ri = ["title", "aria-expanded"], ii = { class: "symbol-chip__code" }, ai = {
2343
2478
  key: 0,
2344
2479
  class: "symbol-chip__spinner",
2345
2480
  "aria-hidden": "true"
2346
- }, ti = { class: "symbol-search" }, ni = {
2481
+ }, oi = { class: "symbol-search" }, si = {
2347
2482
  class: "symbol-list",
2348
2483
  role: "listbox",
2349
2484
  "aria-label": "商品列表"
2350
- }, ri = {
2485
+ }, ci = {
2351
2486
  key: 0,
2352
2487
  class: "symbol-list__empty"
2353
- }, ii = {
2488
+ }, li = {
2354
2489
  width: "32",
2355
2490
  height: "32",
2356
2491
  viewBox: "0 0 32 32",
@@ -2359,7 +2494,7 @@ var Zr = h({
2359
2494
  "margin-bottom": "8px",
2360
2495
  opacity: "0.35"
2361
2496
  }
2362
- }, ai = ["aria-selected", "onClick"], oi = { class: "symbol-list__left" }, si = { class: "symbol-list__code" }, ci = { class: "symbol-list__desc" }, li = { class: "symbol-list__exchange" }, ui = /*#__PURE__*/ G(/* @__PURE__ */ u({
2497
+ }, ui = ["aria-selected", "onClick"], di = { class: "symbol-list__left" }, fi = { class: "symbol-list__code" }, pi = { class: "symbol-list__desc" }, mi = { class: "symbol-list__exchange" }, hi = /*#__PURE__*/ q(/* @__PURE__ */ u({
2363
2498
  __name: "SymbolSelector",
2364
2499
  props: {
2365
2500
  symbol: {},
@@ -2369,8 +2504,8 @@ var Zr = h({
2369
2504
  },
2370
2505
  emits: ["change"],
2371
2506
  setup(c, { emit: u }) {
2372
- let d = c, f = u, p = T(!1), m = T(""), h = T(null), x = T(null), S = T(null), w = J(), { popupStyle: D, startPositionSync: O, stopPositionSync: j } = q(x, S, 8), I = r(() => d.symbols.find((e) => e.code === d.symbol)), L = r(() => {
2373
- let e = I.value;
2507
+ let d = c, f = u, p = T(!1), m = T(""), h = T(null), x = T(null), S = T(null), w = De(), { popupStyle: D, startPositionSync: O, stopPositionSync: k } = we(x, S, 8), M = r(() => d.symbols.find((e) => e.code === d.symbol)), L = r(() => {
2508
+ let e = M.value;
2374
2509
  return e ? `${e.code} - ${e.description}` : d.symbol;
2375
2510
  }), R = r(() => {
2376
2511
  let e = m.value.trim().toLowerCase();
@@ -2379,8 +2514,8 @@ var Zr = h({
2379
2514
  function z() {
2380
2515
  p.value = !p.value, p.value && g(() => h.value?.focus());
2381
2516
  }
2382
- N(p, (e) => {
2383
- e ? O() : j();
2517
+ P(p, (e) => {
2518
+ e ? O() : k();
2384
2519
  });
2385
2520
  function ee() {
2386
2521
  m.value = "", h.value?.focus();
@@ -2389,11 +2524,11 @@ var Zr = h({
2389
2524
  function B(e) {
2390
2525
  f("change", e), p.value = !1, m.value = "";
2391
2526
  }
2392
- function V(e) {
2527
+ function ne(e) {
2393
2528
  let t = x.value, n = S.value;
2394
2529
  t && !t.contains(e.target) && !n?.contains(e.target) && (p.value = !1);
2395
2530
  }
2396
- return b(() => document.addEventListener("mousedown", V)), y(() => document.removeEventListener("mousedown", V)), N(() => d.symbol, () => {
2531
+ return b(() => document.addEventListener("mousedown", ne)), y(() => document.removeEventListener("mousedown", ne)), P(() => d.symbol, () => {
2397
2532
  p.value = !1, m.value = "";
2398
2533
  }), (r, u) => (C(), o("div", {
2399
2534
  ref_key: "chipWrapRef",
@@ -2406,20 +2541,20 @@ var Zr = h({
2406
2541
  "aria-expanded": p.value,
2407
2542
  "aria-haspopup": "dialog",
2408
2543
  onClick: z
2409
- }, [s("span", $r, k(L.value), 1), c.loading ? (C(), o("span", ei)) : c.error ? (C(), i(A(Zr), {
2544
+ }, [s("span", ii, A(L.value), 1), c.loading ? (C(), o("span", ai)) : c.error ? (C(), i(j(ni), {
2410
2545
  key: 1,
2411
2546
  class: "symbol-chip__warn",
2412
2547
  "aria-hidden": "true"
2413
- })) : a("", !0)], 10, Qr), (C(), i(t, { to: A(w) }, [l(n, { name: "symbol-popover" }, {
2414
- default: P(() => [p.value ? (C(), o("div", {
2548
+ })) : a("", !0)], 10, ri), (C(), i(t, { to: j(w) }, [l(n, { name: "symbol-popover" }, {
2549
+ default: F(() => [p.value ? (C(), o("div", {
2415
2550
  key: 0,
2416
2551
  ref_key: "popupRef",
2417
2552
  ref: S,
2418
2553
  class: "symbol-popover",
2419
- style: v(A(D)),
2554
+ style: v(j(D)),
2420
2555
  role: "dialog",
2421
2556
  "aria-label": "切换合约"
2422
- }, [s("div", ti, [
2557
+ }, [s("div", oi, [
2423
2558
  u[2] ||= s("span", {
2424
2559
  class: "symbol-search__icon",
2425
2560
  "aria-hidden": "true"
@@ -2443,7 +2578,7 @@ var Zr = h({
2443
2578
  "stroke-width": "1.6",
2444
2579
  "stroke-linecap": "round"
2445
2580
  })])], -1),
2446
- F(s("input", {
2581
+ I(s("input", {
2447
2582
  ref_key: "searchInputRef",
2448
2583
  ref: h,
2449
2584
  "onUpdate:modelValue": u[0] ||= (e) => m.value = e,
@@ -2454,7 +2589,7 @@ var Zr = h({
2454
2589
  spellcheck: "false",
2455
2590
  "aria-label": "搜索商品",
2456
2591
  onInput: te
2457
- }, null, 544), [[M, m.value]]),
2592
+ }, null, 544), [[N, m.value]]),
2458
2593
  m.value ? (C(), o("button", {
2459
2594
  key: 0,
2460
2595
  type: "button",
@@ -2475,7 +2610,7 @@ var Zr = h({
2475
2610
  s("path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" }),
2476
2611
  s("path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" })
2477
2612
  ], -1)]])) : a("", !0)
2478
- ]), s("div", ni, [R.value.length === 0 ? (C(), o("div", ri, [(C(), o("svg", ii, [...u[3] ||= [s("circle", {
2613
+ ]), s("div", si, [R.value.length === 0 ? (C(), o("div", ci, [(C(), o("svg", li, [...u[3] ||= [s("circle", {
2479
2614
  cx: "13",
2480
2615
  cy: "13",
2481
2616
  r: "10",
@@ -2496,27 +2631,27 @@ var Zr = h({
2496
2631
  role: "option",
2497
2632
  "aria-selected": e.code === c.symbol,
2498
2633
  onClick: (t) => B(e)
2499
- }, [s("span", oi, [s("span", si, k(e.code), 1), s("span", ci, k(e.description), 1)]), s("span", li, k(e.exchange), 1)], 10, ai))), 128))])], 4)) : a("", !0)]),
2634
+ }, [s("span", di, [s("span", fi, A(e.code), 1), s("span", pi, A(e.description), 1)]), s("span", mi, A(e.exchange), 1)], 10, ui))), 128))])], 4)) : a("", !0)]),
2500
2635
  _: 1
2501
2636
  })], 8, ["to"]))], 512));
2502
2637
  }
2503
- }), [["__scopeId", "data-v-637dd0f1"]]), di = ["aria-expanded"], fi = {
2638
+ }), [["__scopeId", "data-v-3d5a580d"]]), gi = ["aria-expanded"], _i = {
2504
2639
  key: 0,
2505
2640
  class: "compare-chip__spinner"
2506
- }, pi = {
2641
+ }, vi = {
2507
2642
  key: 1,
2508
2643
  class: "compare-chip__badge"
2509
- }, mi = { class: "compare-search" }, hi = {
2644
+ }, yi = { class: "compare-search" }, bi = {
2510
2645
  key: 0,
2511
2646
  class: "compare-selected"
2512
- }, gi = { class: "compare-selected__list" }, _i = { class: "compare-selected__code" }, vi = { class: "compare-selected__desc" }, yi = ["aria-label", "onClick"], bi = {
2647
+ }, xi = { class: "compare-selected__list" }, Si = { class: "compare-selected__code" }, Ci = { class: "compare-selected__desc" }, wi = ["aria-label", "onClick"], Ti = {
2513
2648
  class: "compare-list",
2514
2649
  role: "listbox",
2515
2650
  "aria-label": "商品列表"
2516
- }, xi = {
2651
+ }, Ei = {
2517
2652
  key: 0,
2518
2653
  class: "compare-list__empty"
2519
- }, Si = {
2654
+ }, Di = {
2520
2655
  width: "32",
2521
2656
  height: "32",
2522
2657
  viewBox: "0 0 32 32",
@@ -2525,11 +2660,11 @@ var Zr = h({
2525
2660
  "margin-bottom": "8px",
2526
2661
  opacity: "0.35"
2527
2662
  }
2528
- }, Ci = ["aria-selected", "onClick"], wi = { class: "compare-list__left" }, Ti = { class: "compare-list__code" }, Ei = { class: "compare-list__desc" }, Di = { class: "compare-list__right" }, Oi = { class: "compare-list__exchange" }, ki = {
2663
+ }, Oi = ["aria-selected", "onClick"], ki = { class: "compare-list__left" }, Ai = { class: "compare-list__code" }, ji = { class: "compare-list__desc" }, Mi = { class: "compare-list__right" }, Ni = { class: "compare-list__exchange" }, Pi = {
2529
2664
  key: 0,
2530
2665
  class: "compare-list__check",
2531
2666
  "aria-hidden": "true"
2532
- }, Ai = /*#__PURE__*/ G(/* @__PURE__ */ u({
2667
+ }, Fi = /*#__PURE__*/ q(/* @__PURE__ */ u({
2533
2668
  __name: "CompareSymbolSelector",
2534
2669
  props: {
2535
2670
  symbols: {},
@@ -2539,15 +2674,15 @@ var Zr = h({
2539
2674
  },
2540
2675
  emits: ["add", "remove"],
2541
2676
  setup(c, { emit: u }) {
2542
- let d = c, f = u, p = T(!1), m = T(""), h = T(null), x = T(null), S = T(null), w = J(), { popupStyle: D, startPositionSync: O, stopPositionSync: j } = q(x, S, 8), I = r(() => new Set(d.selected ?? [])), L = r(() => {
2543
- let e = I.value;
2677
+ let d = c, f = u, p = T(!1), m = T(""), h = T(null), x = T(null), S = T(null), w = De(), { popupStyle: D, startPositionSync: O, stopPositionSync: k } = we(x, S, 8), M = r(() => new Set(d.selected ?? [])), L = r(() => {
2678
+ let e = M.value;
2544
2679
  return d.symbols.filter((t) => e.has(t.code));
2545
2680
  }), R = r(() => {
2546
2681
  let e = m.value.trim().toLowerCase();
2547
2682
  return e ? d.symbols.filter((t) => t.code.toLowerCase().includes(e) || t.description.toLowerCase().includes(e) || t.exchange.toLowerCase().includes(e)) : d.symbols;
2548
2683
  });
2549
2684
  function z(e) {
2550
- return I.value.has(e);
2685
+ return M.value.has(e);
2551
2686
  }
2552
2687
  function ee(e) {
2553
2688
  z(e.code) ? f("remove", e.code) : f("add", e);
@@ -2558,17 +2693,17 @@ var Zr = h({
2558
2693
  function B() {
2559
2694
  p.value = !p.value, p.value && g(() => h.value?.focus());
2560
2695
  }
2561
- N(p, (e) => {
2562
- e ? O() : j();
2696
+ P(p, (e) => {
2697
+ e ? O() : k();
2563
2698
  });
2564
- function V() {
2699
+ function ne() {
2565
2700
  m.value = "", h.value?.focus();
2566
2701
  }
2567
- function ne(e) {
2702
+ function V(e) {
2568
2703
  let t = x.value, n = S.value;
2569
2704
  t && !t.contains(e.target) && !n?.contains(e.target) && (p.value = !1, m.value = "");
2570
2705
  }
2571
- return b(() => document.addEventListener("mousedown", ne)), y(() => document.removeEventListener("mousedown", ne)), (r, u) => (C(), o("div", {
2706
+ return b(() => document.addEventListener("mousedown", V)), y(() => document.removeEventListener("mousedown", V)), (r, u) => (C(), o("div", {
2572
2707
  ref_key: "rootRef",
2573
2708
  ref: x,
2574
2709
  class: "compare-chip-wrap"
@@ -2585,19 +2720,19 @@ var Zr = h({
2585
2720
  "aria-hidden": "true"
2586
2721
  }, "+", -1),
2587
2722
  u[2] ||= s("span", { class: "compare-chip__text" }, "比较商品", -1),
2588
- c.comparisonLoading ? (C(), o("span", fi)) : a("", !0),
2589
- c.selected.length > 0 ? (C(), o("span", pi, k(c.selected.length), 1)) : a("", !0)
2590
- ], 10, di), (C(), i(t, { to: A(w) }, [l(n, { name: "symbol-popover" }, {
2591
- default: P(() => [p.value ? (C(), o("div", {
2723
+ c.comparisonLoading ? (C(), o("span", _i)) : a("", !0),
2724
+ c.selected.length > 0 ? (C(), o("span", vi, A(c.selected.length), 1)) : a("", !0)
2725
+ ], 10, gi), (C(), i(t, { to: j(w) }, [l(n, { name: "symbol-popover" }, {
2726
+ default: F(() => [p.value ? (C(), o("div", {
2592
2727
  key: 0,
2593
2728
  ref_key: "popupRef",
2594
2729
  ref: S,
2595
2730
  class: "compare-popover",
2596
- style: v(A(D)),
2731
+ style: v(j(D)),
2597
2732
  role: "dialog",
2598
2733
  "aria-label": "比较商品"
2599
2734
  }, [
2600
- s("div", mi, [
2735
+ s("div", yi, [
2601
2736
  u[4] ||= s("span", {
2602
2737
  class: "compare-search__icon",
2603
2738
  "aria-hidden": "true"
@@ -2621,7 +2756,7 @@ var Zr = h({
2621
2756
  "stroke-width": "1.6",
2622
2757
  "stroke-linecap": "round"
2623
2758
  })])], -1),
2624
- F(s("input", {
2759
+ I(s("input", {
2625
2760
  ref_key: "searchInputRef",
2626
2761
  ref: h,
2627
2762
  "onUpdate:modelValue": u[0] ||= (e) => m.value = e,
@@ -2631,13 +2766,13 @@ var Zr = h({
2631
2766
  autocomplete: "off",
2632
2767
  spellcheck: "false",
2633
2768
  "aria-label": "搜索比较商品"
2634
- }, null, 512), [[M, m.value]]),
2769
+ }, null, 512), [[N, m.value]]),
2635
2770
  m.value ? (C(), o("button", {
2636
2771
  key: 0,
2637
2772
  type: "button",
2638
2773
  class: "compare-search__clear",
2639
2774
  "aria-label": "清空搜索",
2640
- onClick: V
2775
+ onClick: ne
2641
2776
  }, [...u[3] ||= [s("svg", {
2642
2777
  class: "delete-icon",
2643
2778
  viewBox: "0 0 24 24",
@@ -2653,7 +2788,7 @@ var Zr = h({
2653
2788
  s("path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" })
2654
2789
  ], -1)]])) : a("", !0)
2655
2790
  ]),
2656
- c.selected.length > 0 ? (C(), o("div", hi, [u[6] ||= s("div", { class: "compare-selected__header" }, [s("span", { class: "compare-selected__title" }, "已添加商品")], -1), s("div", gi, [(C(!0), o(e, null, E(L.value, (e) => (C(), o("div", {
2791
+ c.selected.length > 0 ? (C(), o("div", bi, [u[6] ||= s("div", { class: "compare-selected__header" }, [s("span", { class: "compare-selected__title" }, "已添加商品")], -1), s("div", xi, [(C(!0), o(e, null, E(L.value, (e) => (C(), o("div", {
2657
2792
  key: e.code,
2658
2793
  class: "compare-selected__item"
2659
2794
  }, [
@@ -2661,8 +2796,8 @@ var Zr = h({
2661
2796
  class: "compare-selected__color",
2662
2797
  style: v({ background: c.comparisonColors?.get(e.code) ?? "#888" })
2663
2798
  }, null, 4),
2664
- s("span", _i, k(e.code), 1),
2665
- s("span", vi, k(e.description), 1),
2799
+ s("span", Si, A(e.code), 1),
2800
+ s("span", Ci, A(e.description), 1),
2666
2801
  s("button", {
2667
2802
  type: "button",
2668
2803
  class: "compare-selected__remove",
@@ -2677,9 +2812,9 @@ var Zr = h({
2677
2812
  "stroke-width": "2",
2678
2813
  "stroke-linecap": "round",
2679
2814
  "stroke-linejoin": "round"
2680
- }, [s("path", { d: "M18 6L6 18" }), s("path", { d: "M6 6l12 12" })], -1)]], 8, yi)
2815
+ }, [s("path", { d: "M18 6L6 18" }), s("path", { d: "M6 6l12 12" })], -1)]], 8, wi)
2681
2816
  ]))), 128))])])) : a("", !0),
2682
- s("div", bi, [R.value.length === 0 ? (C(), o("div", xi, [(C(), o("svg", Si, [...u[7] ||= [s("circle", {
2817
+ s("div", Ti, [R.value.length === 0 ? (C(), o("div", Ei, [(C(), o("svg", Di, [...u[7] ||= [s("circle", {
2683
2818
  cx: "13",
2684
2819
  cy: "13",
2685
2820
  r: "10",
@@ -2700,7 +2835,7 @@ var Zr = h({
2700
2835
  role: "option",
2701
2836
  "aria-selected": z(e.code),
2702
2837
  onClick: (t) => ee(e)
2703
- }, [s("span", wi, [s("span", Ti, k(e.code), 1), s("span", Ei, k(e.description), 1)]), s("span", Di, [s("span", Oi, k(e.exchange), 1), z(e.code) ? (C(), o("span", ki, [...u[9] ||= [s("svg", {
2838
+ }, [s("span", ki, [s("span", Ai, A(e.code), 1), s("span", ji, A(e.description), 1)]), s("span", Mi, [s("span", Ni, A(e.exchange), 1), z(e.code) ? (C(), o("span", Pi, [...u[9] ||= [s("svg", {
2704
2839
  viewBox: "0 0 24 24",
2705
2840
  width: "16",
2706
2841
  height: "16",
@@ -2709,12 +2844,12 @@ var Zr = h({
2709
2844
  "stroke-width": "2.5",
2710
2845
  "stroke-linecap": "round",
2711
2846
  "stroke-linejoin": "round"
2712
- }, [s("polyline", { points: "20 6 9 17 4 12" })], -1)]])) : a("", !0)])], 10, Ci))), 128))])
2847
+ }, [s("polyline", { points: "20 6 9 17 4 12" })], -1)]])) : a("", !0)])], 10, Oi))), 128))])
2713
2848
  ], 4)) : a("", !0)]),
2714
2849
  _: 1
2715
2850
  })], 8, ["to"]))], 512));
2716
2851
  }
2717
- }), [["__scopeId", "data-v-b6189a87"]]), ji = /*#__PURE__*/ G(/* @__PURE__ */ u({
2852
+ }), [["__scopeId", "data-v-8a5646b4"]]), Ii = /*#__PURE__*/ q(/* @__PURE__ */ u({
2718
2853
  __name: "TopToolbar",
2719
2854
  props: {
2720
2855
  symbol: {},
@@ -2853,7 +2988,7 @@ var Zr = h({
2853
2988
  onMouseup: m,
2854
2989
  onMouseleave: m
2855
2990
  }, [
2856
- v.value ? (C(), i(ui, {
2991
+ v.value ? (C(), i(hi, {
2857
2992
  key: 0,
2858
2993
  symbol: v.value,
2859
2994
  symbols: y.value,
@@ -2866,7 +3001,7 @@ var Zr = h({
2866
3001
  "loading",
2867
3002
  "error"
2868
3003
  ])) : a("", !0),
2869
- l(Ai, {
3004
+ l(Fi, {
2870
3005
  symbols: y.value,
2871
3006
  selected: e.overlaySymbols,
2872
3007
  "comparison-colors": e.comparisonColors,
@@ -2879,11 +3014,11 @@ var Zr = h({
2879
3014
  "comparison-colors",
2880
3015
  "comparison-loading"
2881
3016
  ]),
2882
- l(qr, {
3017
+ l(Qr, {
2883
3018
  "model-value": e.kLineLevel,
2884
3019
  "onUpdate:modelValue": r[2] ||= (e) => g("kLineLevelChange", e)
2885
3020
  }, null, 8, ["model-value"]),
2886
- l(Jr, {
3021
+ l($r, {
2887
3022
  "model-value": e.kLineAdjust,
2888
3023
  "onUpdate:modelValue": r[3] ||= (e) => g("kLineAdjustChange", e)
2889
3024
  }, null, 8, ["model-value"]),
@@ -2899,100 +3034,73 @@ var Zr = h({
2899
3034
  }, "fx", -1), s("span", { class: "indicator-button__text" }, "指标", -1)]])
2900
3035
  ], 544));
2901
3036
  }
2902
- }), [["__scopeId", "data-v-8ecedbff"]]), Mi = { class: "batch-header" }, Ni = { class: "batch-body" }, Pi = { class: "batch-footer" }, Fi = /*#__PURE__*/ G(/* @__PURE__ */ u({
3037
+ }), [["__scopeId", "data-v-8ecedbff"]]), Li = /*#__PURE__*/ q(/* @__PURE__ */ u({
2903
3038
  __name: "BatchStockDialog",
2904
3039
  props: { show: { type: Boolean } },
2905
3040
  emits: ["close", "apply"],
2906
- setup(e, { emit: c }) {
2907
- let u = c, d = J(), f = T([]), p = r({
2908
- get: () => f.value.join("\n"),
3041
+ setup(e, { emit: t }) {
3042
+ let n = t, a = T([]), o = r({
3043
+ get: () => a.value.join("\n"),
2909
3044
  set: (e) => {
2910
- f.value = e.split("\n").map((e) => e.trim()).filter(Boolean);
3045
+ a.value = e.split("\n").map((e) => e.trim()).filter(Boolean);
2911
3046
  }
2912
3047
  });
2913
- function m() {
2914
- f.value.length !== 0 && (u("apply", f.value), u("close"));
3048
+ function c() {
3049
+ a.value.length !== 0 && (n("apply", a.value), n("close"));
2915
3050
  }
2916
- return (r, c) => (C(), i(t, { to: A(d) }, [l(n, { name: "overlay" }, {
2917
- default: P(() => [e.show ? (C(), o("div", {
2918
- key: 0,
2919
- class: "batch-overlay",
2920
- onClick: c[4] ||= (e) => u("close")
2921
- }, [l(n, { name: "modal" }, {
2922
- default: P(() => [s("div", {
2923
- class: "batch-modal",
2924
- onClick: c[3] ||= L(() => {}, ["stop"])
2925
- }, [
2926
- s("div", Mi, [c[6] ||= s("span", { class: "batch-title" }, "批量设置股票代码", -1), s("button", {
2927
- class: "batch-close-btn",
2928
- onClick: c[0] ||= (e) => u("close")
2929
- }, [...c[5] ||= [s("svg", {
2930
- viewBox: "0 0 24 24",
2931
- fill: "none",
2932
- stroke: "currentColor",
2933
- "stroke-width": "2"
2934
- }, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])]),
2935
- s("div", Ni, [F(s("textarea", {
2936
- "onUpdate:modelValue": c[1] ||= (e) => p.value = e,
2937
- class: "batch-textarea",
2938
- placeholder: "每行一个股票代码\n例如:\n000001\n600036\n002415",
2939
- rows: "8",
2940
- spellcheck: "false"
2941
- }, null, 512), [[M, p.value]])]),
2942
- s("div", Pi, [s("button", {
2943
- class: "batch-btn batch-btn--cancel",
2944
- onClick: c[2] ||= (e) => u("close")
2945
- }, "取消"), s("button", {
2946
- class: "batch-btn batch-btn--confirm",
2947
- onClick: m
2948
- }, "应用")])
2949
- ])]),
2950
- _: 1
2951
- })])) : a("", !0)]),
3051
+ return (t, r) => (C(), i(Y, {
3052
+ title: "批量设置股票代码",
3053
+ show: e.show,
3054
+ onClose: r[2] ||= (e) => n("close")
3055
+ }, {
3056
+ footer: F(() => [s("button", {
3057
+ class: "batch-btn batch-btn--cancel",
3058
+ onClick: r[1] ||= (e) => n("close")
3059
+ }, "取消"), s("button", {
3060
+ class: "batch-btn batch-btn--confirm",
3061
+ onClick: c
3062
+ }, "应用")]),
3063
+ default: F(() => [I(s("textarea", {
3064
+ "onUpdate:modelValue": r[0] ||= (e) => o.value = e,
3065
+ class: "batch-textarea",
3066
+ placeholder: "每行一个股票代码,导出时会将所选区间内这些品种的数据一并导出\n例如:\n000001\n600036\n002415",
3067
+ rows: "8",
3068
+ spellcheck: "false"
3069
+ }, null, 512), [[N, o.value]])]),
2952
3070
  _: 1
2953
- })], 8, ["to"]));
3071
+ }, 8, ["show"]));
2954
3072
  }
2955
- }), [["__scopeId", "data-v-b1448f44"]]), Ii = {
2956
- key: 0,
2957
- class: "export-overlay"
2958
- }, Li = { class: "export-header" }, Ri = { class: "export-body" }, zi = { class: "export-label" }, Bi = { class: "export-bar-track" }, Vi = { class: "export-counter" }, Hi = /*#__PURE__*/ G(/* @__PURE__ */ u({
3073
+ }), [["__scopeId", "data-v-2311afd3"]]), Ri = { class: "export-body" }, zi = { class: "export-label" }, Bi = { class: "export-bar-track" }, Vi = { class: "export-counter" }, Hi = /*#__PURE__*/ q(/* @__PURE__ */ u({
2959
3074
  __name: "ExportProgressDialog",
2960
3075
  props: { progress: {} },
2961
3076
  emits: ["close"],
2962
- setup(e, { emit: c }) {
2963
- let u = e, d = c, f = J(), p = r(() => !u.progress || u.progress.total <= 0 ? 0 : Math.min(100, Math.round(u.progress.current / u.progress.total * 100)));
2964
- return (r, c) => (C(), i(t, { to: A(f) }, [l(n, { name: "overlay" }, {
2965
- default: P(() => [e.progress ? (C(), o("div", Ii, [l(n, { name: "modal" }, {
2966
- default: P(() => [s("div", {
2967
- class: "export-modal",
2968
- onClick: c[2] ||= L(() => {}, ["stop"])
2969
- }, [s("div", Li, [c[4] ||= s("span", { class: "export-title" }, "导出数据", -1), s("button", {
2970
- class: "export-close-btn",
2971
- onClick: c[0] ||= (e) => d("close")
2972
- }, [...c[3] ||= [s("svg", {
2973
- viewBox: "0 0 24 24",
2974
- fill: "none",
2975
- stroke: "currentColor",
2976
- "stroke-width": "2"
2977
- }, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])]), s("div", Ri, [
2978
- s("div", zi, k(e.progress.label), 1),
2979
- s("div", Bi, [s("div", {
2980
- class: "export-bar-fill",
2981
- style: v({ width: p.value + "%" })
2982
- }, null, 4)]),
2983
- s("div", Vi, k(e.progress.current) + " / " + k(e.progress.total), 1),
2984
- e.progress.current === e.progress.total ? (C(), o("button", {
2985
- key: 0,
2986
- class: "export-done-btn",
2987
- onClick: c[1] ||= (e) => d("close")
2988
- }, "完成")) : a("", !0)
2989
- ])])]),
2990
- _: 1
2991
- })])) : a("", !0)]),
3077
+ setup(e, { emit: t }) {
3078
+ let n = e, c = t, l = r(() => !n.progress || n.progress.total <= 0 ? 0 : Math.min(100, Math.round(n.progress.current / n.progress.total * 100)));
3079
+ return (t, n) => (C(), i(Y, {
3080
+ title: "导出数据",
3081
+ show: !!e.progress,
3082
+ "z-index": 1100,
3083
+ "close-on-overlay": !1,
3084
+ "footer-align": "center",
3085
+ onClose: n[1] ||= (e) => c("close")
3086
+ }, {
3087
+ footer: F(() => [e.progress && e.progress.current === e.progress.total ? (C(), o("button", {
3088
+ key: 0,
3089
+ class: "export-done-btn",
3090
+ onClick: n[0] ||= (e) => c("close")
3091
+ }, " 完成 ")) : a("", !0)]),
3092
+ default: F(() => [s("div", Ri, [
3093
+ s("div", zi, A(e.progress?.label), 1),
3094
+ s("div", Bi, [s("div", {
3095
+ class: "export-bar-fill",
3096
+ style: v({ width: l.value + "%" })
3097
+ }, null, 4)]),
3098
+ s("div", Vi, A(e.progress?.current ?? 0) + " / " + A(e.progress?.total ?? 0), 1)
3099
+ ])]),
2992
3100
  _: 1
2993
- })], 8, ["to"]));
3101
+ }, 8, ["show"]));
2994
3102
  }
2995
- }), [["__scopeId", "data-v-f4bab748"]]), Ui = ["data-theme"], Wi = {
3103
+ }), [["__scopeId", "data-v-63b609dd"]]), Ui = ["data-theme"], Wi = {
2996
3104
  class: "pane-separator-layer",
2997
3105
  "aria-hidden": "true"
2998
3106
  }, Gi = {
@@ -3001,7 +3109,7 @@ var Zr = h({
3001
3109
  }, Ki = {
3002
3110
  class: "x-axis-canvas",
3003
3111
  ref: "xAxisCanvasRef"
3004
- }, qi = ["placeholder"], Ji = ["placeholder"], Yi = /*#__PURE__*/ G(/* @__PURE__ */ u({
3112
+ }, qi = /*#__PURE__*/ q(/* @__PURE__ */ u({
3005
3113
  __name: "KLineChart",
3006
3114
  props: {
3007
3115
  semanticConfig: {},
@@ -3029,23 +3137,23 @@ var Zr = h({
3029
3137
  "kLineAdjustChange"
3030
3138
  ],
3031
3139
  setup(n, { expose: c, emit: u }) {
3032
- let d = n, f = u, p = T(d.semanticConfig?.data?.period ?? "daily"), h = T(d.semanticConfig?.data?.adjust ?? "none"), y = r(() => p.value.includes("min")), x = T("选择商品"), w = T(null), D = T(!1), k = T(!1), j = T([]), P = T([]);
3140
+ let d = n, f = u, p = T(d.semanticConfig?.data?.period ?? "daily"), h = T(d.semanticConfig?.data?.adjust ?? "none"), y = r(() => p.value.includes("min")), x = T("选择商品"), w = T(null), D = T(!1), O = T(!1), A = T([]), M = T([]);
3141
+ function N(e) {
3142
+ p.value = e, f("kLineLevelChange", e), B();
3143
+ }
3033
3144
  function I(e) {
3034
- p.value = e, f("kLineLevelChange", e), V();
3145
+ h.value = e, f("kLineAdjustChange", e), B();
3035
3146
  }
3036
- function R(e) {
3037
- h.value = e, f("kLineAdjustChange", e), V();
3147
+ function L(e) {
3148
+ O.value = !1, x.value = e.code, w.value = e, B();
3038
3149
  }
3039
3150
  function z(e) {
3040
- k.value = !1, x.value = e.code, w.value = e, V();
3151
+ w.value?.code !== e.code && (A.value.includes(e.code) || (M.value = [...M.value, e], A.value = M.value.map((e) => e.code), ne(), H.value?.addComparisonSymbol(te(e))));
3041
3152
  }
3042
3153
  function ee(e) {
3043
- w.value?.code !== e.code && (j.value.includes(e.code) || (P.value = [...P.value, e], j.value = P.value.map((e) => e.code), ne(), U.value?.addComparisonSymbol(B(e))));
3154
+ M.value = M.value.filter((t) => t.code !== e), A.value = M.value.map((e) => e.code), H.value?.removeComparisonSymbol(e);
3044
3155
  }
3045
3156
  function te(e) {
3046
- P.value = P.value.filter((t) => t.code !== e), j.value = P.value.map((e) => e.code), U.value?.removeComparisonSymbol(e);
3047
- }
3048
- function B(e) {
3049
3157
  return {
3050
3158
  symbol: e.code,
3051
3159
  exchange: e.exchange,
@@ -3056,37 +3164,37 @@ var Zr = h({
3056
3164
  adjust: h.value
3057
3165
  };
3058
3166
  }
3059
- function V() {
3060
- w.value && U.value?.setSymbols([B(w.value), ...P.value.map(B)]);
3167
+ function B() {
3168
+ w.value && H.value?.setSymbols([te(w.value), ...M.value.map(te)]);
3061
3169
  }
3062
3170
  function ne() {
3063
- if (de.value.axisType === "percent") return;
3171
+ if (U.value.axisType === "percent") return;
3064
3172
  let e = {
3065
- ...de.value,
3173
+ ...U.value,
3066
3174
  axisType: "percent"
3067
3175
  };
3068
- de.value = e, U.value?.updateSettingsFacade(e);
3176
+ U.value = e, H.value?.updateSettingsFacade(e);
3069
3177
  try {
3070
- localStorage.setItem(he, JSON.stringify(e));
3178
+ localStorage.setItem(ge, JSON.stringify(e));
3071
3179
  } catch {}
3072
3180
  }
3073
- let H = T(null), re = T(null), ie = T(null), ae = T(null), oe = T(null), ce = T(null);
3074
- we(ie);
3075
- let U = O(null), { chartTheme: le, chartSettings: de, tooltipColors: me, themeCssVars: W, handleSettingsChange: ge, applyThemeFromSettings: _e } = en(U), ve = O(null), ye = T(0), be = T(0), xe = T(!1), Se = T([]), G = T(0), K = T(1), q = T(d.initialZoomLevel ?? 1), Ce = T(0), J = T(1), Te = T(0), Ee = T({}), De = T(/* @__PURE__ */ new Map()), Oe = T(!1), ke = T("cursor"), { mainActiveIndicators: Ae, subActiveIndicators: je, activeIndicators: Y, indicatorParams: Me, subPanes: Ne, buildPaneLayoutIntent: Fe, getDefaultParams: Ie, isSubPaneIndicator: Le, addSubPane: Re, removeSubPane: ze, clearAllSubPanes: Be, initIndicatorsFromConfig: Ve, switchSubIndicator: He, handleIndicatorToggle: Ue, handleUpdateParams: We, handleReorderSubIndicators: Ge, setupIndicatorSubscriptions: Ke } = tn(U, Ee), { drawingController: qe, selectedDrawingId: Je, selectedDrawing: Ye, drawings: Xe, handleSelectTool: Ze, onUpdateDrawingStyle: Qe, onDeleteDrawing: $e, setupDrawing: et } = nn(U), { rangeSelection: tt, customStartDate: nt, customEndDate: rt, containerScrollLeft: it, isRangeSelectActive: at, rangeSelectionReady: ot, rangeSelectionBounds: st, rangeSelectionStartLabel: ct, rangeSelectionEndLabel: lt, rangeSelectionOverlayStyle: ut, clearRangeSelection: dt, handleRangePointerDown: ft, handleRangePointerMove: pt, handleRangePointerUp: mt, exportRangeToCsv: ht, exportingProgress: gt, onEdgePointerDown: _t, onEdgePointerMove: vt, onEdgePointerUp: yt, onScroll: bt, syncScrollLeft: xt } = fn({
3076
- controller: U,
3181
+ let V = T(null), re = T(null), ie = T(null), ae = T(null), oe = T(null), se = T(null);
3182
+ Ee(ie);
3183
+ let H = k(null), { chartTheme: le, chartSettings: U, tooltipColors: ue, themeCssVars: fe, handleSettingsChange: he, applyThemeFromSettings: W } = ln(H), _e = k(null), ve = T(0), ye = T(0), be = T(!1), xe = T([]), Se = T(0), G = T(1), K = T(d.initialZoomLevel ?? 1), q = T(0), Ce = T(1), we = T(0), Te = T({}), De = T(/* @__PURE__ */ new Map()), Oe = T(!1), ke = T("cursor"), { mainActiveIndicators: Ae, subActiveIndicators: je, activeIndicators: Me, indicatorParams: Ne, subPanes: Pe, buildPaneLayoutIntent: J, getDefaultParams: Fe, isSubPaneIndicator: Ie, addSubPane: Le, removeSubPane: Re, clearAllSubPanes: ze, initIndicatorsFromConfig: Ve, switchSubIndicator: He, handleIndicatorToggle: Ue, handleUpdateParams: We, handleReorderSubIndicators: Ge, setupIndicatorSubscriptions: Ke } = un(H, Te), { drawingController: Y, selectedDrawingId: qe, selectedDrawing: Je, drawings: Ye, handleSelectTool: Xe, onUpdateDrawingStyle: Ze, onDeleteDrawing: Qe, setupDrawing: $e } = dn(H), { rangeSelection: et, customStartDate: tt, customEndDate: nt, containerScrollLeft: rt, isRangeSelectActive: it, rangeSelectionReady: at, rangeSelectionBounds: ot, rangeSelectionCount: st, rangeSelectionStartLabel: ct, rangeSelectionEndLabel: lt, rangeSelectionOverlayStyle: ut, clearRangeSelection: dt, handleRangePointerDown: ft, handleRangePointerMove: pt, handleRangePointerUp: mt, exportRangeToCsv: ht, exportingProgress: gt, onEdgePointerDown: _t, onEdgePointerMove: vt, onEdgePointerUp: yt, onScroll: bt, syncScrollLeft: xt } = bn({
3184
+ controller: H,
3077
3185
  activeToolId: ke,
3078
- containerRef: H,
3079
- dataVersion: be,
3080
- viewportVersion: G,
3186
+ containerRef: V,
3187
+ dataVersion: ye,
3188
+ viewportVersion: Se,
3081
3189
  dataFetcher: r(() => d.dataFetcher),
3082
- batchStockCodes: Se
3083
- }), St = q.value;
3084
- Ce.value = fe(St, {
3190
+ batchStockCodes: xe
3191
+ }), St = K.value;
3192
+ q.value = pe(St, {
3085
3193
  minKWidth: d.minKWidth,
3086
3194
  maxKWidth: d.maxKWidth,
3087
3195
  zoomLevelCount: d.zoomLevels,
3088
- dpr: K.value
3089
- }), J.value = ue(Ce.value, K.value);
3196
+ dpr: G.value
3197
+ }), Ce.value = de(q.value, G.value);
3090
3198
  function Ct() {}
3091
3199
  function wt(e, t, n) {
3092
3200
  let r = e.getBoundingClientRect();
@@ -3099,7 +3207,7 @@ var Zr = h({
3099
3207
  e && g(() => {
3100
3208
  if (!e.isConnected) return;
3101
3209
  let t = wt(e, 180, 80);
3102
- U.value?.setTooltipSize(t);
3210
+ H.value?.setTooltipSize(t);
3103
3211
  });
3104
3212
  }
3105
3213
  function Et(e) {
@@ -3117,7 +3225,7 @@ var Zr = h({
3117
3225
  function jt(e) {
3118
3226
  return kt ||= e.getBoundingClientRect(), kt;
3119
3227
  }
3120
- let X = O({
3228
+ let X = k({
3121
3229
  crosshairPos: null,
3122
3230
  crosshairIndex: null,
3123
3231
  crosshairPrice: null,
@@ -3139,7 +3247,7 @@ var Zr = h({
3139
3247
  width: 220,
3140
3248
  height: 120
3141
3249
  }), Pt = r(() => {
3142
- let e = H.value, t = re.value;
3250
+ let e = V.value, t = re.value;
3143
3251
  return !e || !t ? {
3144
3252
  x: 0,
3145
3253
  y: 0
@@ -3147,48 +3255,48 @@ var Zr = h({
3147
3255
  x: e.offsetLeft,
3148
3256
  y: e.offsetTop
3149
3257
  };
3150
- }), Ft = r(() => X.value.hoveredMarkerData), Lt = r(() => X.value.hoveredCustomMarker), Rt = r(() => X.value.isDragging), zt = r(() => X.value.isResizingPaneBoundary), Bt = r(() => X.value.isHoveringPaneBoundary), Vt = r(() => X.value.hoveredPaneBoundaryId), Ht = r(() => X.value.isHoveringRightAxis), Ut = r(() => X.value.hoveredIndex);
3258
+ }), Ft = r(() => X.value.hoveredMarkerData), It = r(() => X.value.hoveredCustomMarker), Rt = r(() => X.value.isDragging), zt = r(() => X.value.isResizingPaneBoundary), Bt = r(() => X.value.isHoveringPaneBoundary), Vt = r(() => X.value.hoveredPaneBoundaryId), Ht = r(() => X.value.isHoveringRightAxis), Ut = window.matchMedia("(pointer: coarse)").matches, Wt = r(() => X.value.hoveredIndex);
3151
3259
  r(() => X.value.crosshairIndex);
3152
- let Wt = r(() => Rt.value ? "grabbing" : zt.value || Bt.value ? "ns-resize" : Ut.value === null ? "crosshair" : "pointer"), Gt = r(() => {
3260
+ let Gt = r(() => Rt.value ? "grabbing" : zt.value || Bt.value ? "ns-resize" : Wt.value === null ? "crosshair" : "pointer"), Kt = r(() => {
3153
3261
  let e = X.value.hoveredIndex;
3154
3262
  if (typeof e != "number") return null;
3155
- be.value;
3156
- let t = U.value?.getData();
3263
+ ye.value;
3264
+ let t = H.value?.getData();
3157
3265
  return t && e >= 0 && e < t.length ? t[e] : null;
3158
- }), Kt = r(() => X.value.hoveredIndex), qt = r(() => X.value.tooltipPos), Jt = r(() => ({
3159
- x: qt.value.x + Pt.value.x,
3160
- y: qt.value.y + Pt.value.y
3161
- })), Yt = r(() => ({
3162
- left: `${Jt.value.x}px`,
3163
- top: `${Jt.value.y}px`
3266
+ }), qt = r(() => X.value.hoveredIndex), Jt = r(() => X.value.tooltipPos), Yt = r(() => ({
3267
+ x: Jt.value.x + Pt.value.x,
3268
+ y: Jt.value.y + Pt.value.y
3269
+ })), Xt = r(() => ({
3270
+ left: `${Yt.value.x}px`,
3271
+ top: `${Yt.value.y}px`
3164
3272
  })), Z = r(() => ({
3165
3273
  x: Dt.value.x + Pt.value.x,
3166
3274
  y: Dt.value.y + Pt.value.y
3167
- })), Zt = r(() => ({
3275
+ })), Qt = r(() => ({
3168
3276
  left: `${Z.value.x}px`,
3169
3277
  top: `${Z.value.y}px`
3170
- })), Qt = r(() => X.value.tooltipAnchorPlacement), rn = r(() => {
3171
- let e = U.value?.viewport.peek(), t = H.value, n = e?.plotWidth ?? (t ? t.clientWidth : 0);
3278
+ })), $t = r(() => X.value.tooltipAnchorPlacement), tn = r(() => {
3279
+ let e = H.value?.viewport.peek(), t = V.value, n = e?.plotWidth ?? (t ? t.clientWidth : 0);
3172
3280
  return Dt.value.x + 12 + Nt.value.width + 12 > n ? "left-bottom" : "right-bottom";
3173
- }), an = r(() => (be.value, U.value?.getData() ?? []));
3174
- function on() {
3175
- ce.value?.toggleMenu();
3281
+ }), nn = r(() => (ye.value, H.value?.getData() ?? []));
3282
+ function rn() {
3283
+ se.value?.toggleMenu();
3176
3284
  }
3177
- function sn(e) {
3178
- Se.value = e;
3285
+ function on(e) {
3286
+ xe.value = e;
3179
3287
  }
3180
- function cn(e) {
3288
+ function sn(e) {
3181
3289
  if (ke.value = e, e === "range-select") {
3182
- qe.value?.setTool("cursor"), Je.value = null;
3290
+ Y.value?.setTool("cursor"), qe.value = null;
3183
3291
  return;
3184
3292
  }
3185
- dt(), Ze(e);
3293
+ dt(), Xe(e);
3186
3294
  }
3187
- function ln(e) {
3188
- U.value?.handlePointerEvent(e, { onPointerDown: (e, t) => !!(ft(e, t) || qe.value?.onPointerDown(e, t)) });
3295
+ function fn(e) {
3296
+ H.value?.handlePointerEvent(e, { onPointerDown: (e, t) => !!(ft(e, t) || Y.value?.onPointerDown(e, t)) });
3189
3297
  }
3190
- function un(e) {
3191
- let t = H.value;
3298
+ function pn(e) {
3299
+ let t = V.value;
3192
3300
  if (t) {
3193
3301
  let n = jt(t);
3194
3302
  Dt.value = {
@@ -3196,53 +3304,53 @@ var Zr = h({
3196
3304
  y: e.clientY - n.top
3197
3305
  };
3198
3306
  }
3199
- U.value?.handlePointerEvent(e, { onPointerMove: (e, t) => pt(e, t) ? !0 : qe.value?.onPointerMove(e, t) ? (Xe.value = qe.value.getDrawings(), !0) : !1 });
3200
- }
3201
- function dn(e) {
3202
- U.value?.handlePointerEvent(e, { onPointerUp: (e, t) => !!(mt(e, t) || qe.value?.onPointerUp(e, t)) });
3203
- }
3204
- function pn(e) {
3205
- U.value?.handlePointerEvent(e);
3307
+ H.value?.handlePointerEvent(e, { onPointerMove: (e, t) => pt(e, t) ? !0 : Y.value?.onPointerMove(e, t) ? (Ye.value = Y.value.getDrawings(), !0) : !1 });
3206
3308
  }
3207
3309
  function mn(e) {
3208
- U.value?.handlePointerEvent(e);
3310
+ H.value?.handlePointerEvent(e, { onPointerUp: (e, t) => !!(mt(e, t) || Y.value?.onPointerUp(e, t)) });
3209
3311
  }
3210
3312
  function hn(e) {
3211
- U.value?.handlePointerEvent(e);
3313
+ H.value?.handlePointerEvent(e);
3212
3314
  }
3213
3315
  function gn(e) {
3214
- U.value?.handlePointerEvent(e);
3316
+ H.value?.handlePointerEvent(e);
3215
3317
  }
3216
3318
  function _n(e) {
3217
- U.value?.handlePointerEvent(e);
3319
+ H.value?.handlePointerEvent(e);
3218
3320
  }
3219
- function vn() {
3220
- bt(), U.value?.handleScrollEvent();
3321
+ function vn(e) {
3322
+ H.value?.handlePointerEvent(e);
3221
3323
  }
3222
- let yn = r(() => d.rightAxisWidth + d.priceLabelWidth), bn = r(() => (be.value, Te.value, Ce.value, J.value, K.value, U.value?.getContentWidth() ?? 0));
3223
- function xn(e, t) {
3224
- U.value?.zoomToLevel(e, t);
3324
+ function yn(e) {
3325
+ H.value?.handlePointerEvent(e);
3326
+ }
3327
+ function xn() {
3328
+ bt(), H.value?.handleScrollEvent();
3329
+ }
3330
+ let Sn = r(() => d.rightAxisWidth + d.priceLabelWidth), Cn = r(() => (ye.value, we.value, q.value, Ce.value, G.value, H.value?.getContentWidth() ?? 0));
3331
+ function wn(e, t) {
3332
+ H.value?.zoomToLevel(e, t);
3225
3333
  }
3226
3334
  c({
3227
3335
  scheduleRender: Ct,
3228
- addSubPane: Re,
3229
- removeSubPane: ze,
3336
+ addSubPane: Le,
3337
+ removeSubPane: Re,
3230
3338
  switchSubIndicator: He,
3231
- clearAllSubPanes: Be,
3232
- zoomToLevel: xn,
3233
- zoomIn: (e) => xn(q.value + 1, e),
3234
- zoomOut: (e) => xn(q.value - 1, e),
3235
- getZoomLevel: () => q.value,
3236
- getZoomLevelCount: () => U.value?.getZoomLevelCount() ?? 10,
3237
- getController: () => U.value
3339
+ clearAllSubPanes: ze,
3340
+ zoomToLevel: wn,
3341
+ zoomIn: (e) => wn(K.value + 1, e),
3342
+ zoomOut: (e) => wn(K.value - 1, e),
3343
+ getZoomLevel: () => K.value,
3344
+ getZoomLevelCount: () => H.value?.getZoomLevelCount() ?? 10,
3345
+ getController: () => H.value
3238
3346
  });
3239
- function Sn() {
3347
+ function Tn() {
3240
3348
  return (e) => {
3241
- e.preventDefault(), U.value?.handleWheelEvent(e);
3349
+ e.preventDefault(), H.value?.handleWheelEvent(e);
3242
3350
  };
3243
3351
  }
3244
- function Cn(e, t, n, r) {
3245
- return se({
3352
+ function En(e, t, n, r) {
3353
+ return ce({
3246
3354
  container: e,
3247
3355
  data: [],
3248
3356
  canvasLayer: t,
@@ -3259,10 +3367,10 @@ var Zr = h({
3259
3367
  mcp: d.mcp
3260
3368
  });
3261
3369
  }
3262
- function wn(e) {
3370
+ function Dn(e) {
3263
3371
  let t = e.paneLayout.subscribe(() => {
3264
3372
  At();
3265
- let t = H.value && parseInt(getComputedStyle(H.value).borderTopWidth) || 0;
3373
+ let t = V.value && parseInt(getComputedStyle(V.value).borderTopWidth) || 0;
3266
3374
  Mt.value = e.paneLayout.peek().slice(0, -1).map((n) => {
3267
3375
  let r = e.getPaneInfo(n.id), i = (r?.top ?? 0) + (r?.height ?? 0);
3268
3376
  return {
@@ -3271,17 +3379,17 @@ var Zr = h({
3271
3379
  };
3272
3380
  });
3273
3381
  }), n = e.paneRatios.subscribe(() => {
3274
- Ee.value = { ...e.paneRatios.peek() };
3382
+ Te.value = { ...e.paneRatios.peek() };
3275
3383
  }), r = e.viewport.subscribe(() => {
3276
3384
  let t = e.viewport.peek();
3277
- G.value++, K.value !== t.dpr && (K.value = t.dpr), Te.value !== t.plotWidth && (Te.value = t.plotWidth), (q.value !== t.zoomLevel || Ce.value !== t.kWidth || J.value !== t.kGap) && (q.value = t.zoomLevel, Ce.value = t.kWidth, J.value = t.kGap), g(() => {
3385
+ Se.value++, G.value !== t.dpr && (G.value = t.dpr), we.value !== t.plotWidth && (we.value = t.plotWidth), (K.value !== t.zoomLevel || q.value !== t.kWidth || Ce.value !== t.kGap) && (K.value = t.zoomLevel, q.value = t.kWidth, Ce.value = t.kGap), g(() => {
3278
3386
  requestAnimationFrame(() => {
3279
3387
  xt();
3280
3388
  });
3281
3389
  });
3282
3390
  }), i = e.data.subscribe(() => {
3283
3391
  let t = e.data.peek();
3284
- ye.value = t.length, be.value++, k.value = t.length === 0;
3392
+ ve.value = t.length, ye.value++, O.value = t.length === 0;
3285
3393
  }), a = e.dataLoading.subscribe(() => {
3286
3394
  D.value = e.dataLoading.peek();
3287
3395
  }), o = e.theme.subscribe(() => {
@@ -3296,62 +3404,62 @@ var Zr = h({
3296
3404
  r(), i(), a(), n(), t(), o(), s(), c(), l();
3297
3405
  });
3298
3406
  }
3299
- function Tn(e) {
3407
+ function On(e) {
3300
3408
  let t = oe.value?.getSettings() ?? { showVolumePriceMarkers: !0 };
3301
- de.value = t, _e(t.theme), e.updateSettingsFacade(t);
3409
+ U.value = t, W(t.theme), e.updateSettingsFacade(t);
3302
3410
  }
3303
- function En(e) {
3411
+ function kn(e) {
3304
3412
  e.setTooltipAnchorPositioning(Ot.value), e.interactionState.subscribe(() => {
3305
3413
  X.value = e.interactionState.peek();
3306
- }), X.value = e.interactionState.peek(), K.value = e.viewport.peek().dpr;
3414
+ }), X.value = e.interactionState.peek(), G.value = e.viewport.peek().dpr;
3307
3415
  }
3308
- function Dn(e) {
3309
- e.setDataFetcher(d.dataFetcher), ve.value = new pe(e), ve.value.on("config:error", (e) => {
3416
+ function An(e) {
3417
+ e.setDataFetcher(d.dataFetcher), _e.value = new me(e), _e.value.on("config:error", (e) => {
3310
3418
  console.error("Semantic config error:", e);
3311
- }), ve.value.on("config:ready", () => {
3312
- Ve(d.semanticConfig), g(() => U.value?.scrollToRight());
3419
+ }), _e.value.on("config:ready", () => {
3420
+ Ve(d.semanticConfig), g(() => H.value?.scrollToRight());
3313
3421
  });
3314
3422
  }
3315
3423
  return b(async () => {
3316
3424
  Ot.value = !1;
3317
- let e = H.value, t = re.value;
3425
+ let e = V.value, t = re.value;
3318
3426
  if (!e || !t) return;
3319
- let n = Sn();
3427
+ let n = Tn();
3320
3428
  e.addEventListener("wheel", n, { passive: !1 });
3321
- let r = e.querySelector(".canvas-layer"), i = e.querySelector(".x-axis-canvas"), a = await Cn(e, r, t.querySelector(".right-axis-host"), i);
3322
- !H.value || !re.value || (U.value = a, wn(a), Ve(d.semanticConfig), Tn(a), et(a), En(a), Dn(a));
3429
+ let r = e.querySelector(".canvas-layer"), i = e.querySelector(".x-axis-canvas"), a = await En(e, r, t.querySelector(".right-axis-host"), i);
3430
+ !V.value || !re.value || (H.value = a, Dn(a), Ve(d.semanticConfig), On(a), $e(a), kn(a), An(a));
3323
3431
  }), S(() => {
3324
- let e = U.value;
3325
- e && (U.value = null, e.dispose()), qe.value = null;
3326
- }), N(() => d.yPaddingPx, (e) => {
3327
- U.value?.updateOptionsFacade({ yPaddingPx: e });
3328
- }), N(() => d.semanticConfig, async (e, t) => {
3432
+ let e = H.value;
3433
+ e && (H.value = null, e.dispose()), Y.value = null;
3434
+ }), P(() => d.yPaddingPx, (e) => {
3435
+ H.value?.updateOptionsFacade({ yPaddingPx: e });
3436
+ }), P(() => d.semanticConfig, async (e, t) => {
3329
3437
  if (e && e !== t) {
3330
- let t = await ve.value?.applyConfig(e);
3438
+ let t = await _e.value?.applyConfig(e);
3331
3439
  t && !t.success && console.error("Semantic config apply failed:", t.errors);
3332
3440
  }
3333
3441
  }, { deep: !0 }), (r, c) => (C(), o("div", {
3334
3442
  ref_key: "chartWrapperRef",
3335
3443
  ref: ie,
3336
3444
  class: "chart-wrapper",
3337
- "data-theme": A(le),
3338
- style: v(A(W))
3445
+ "data-theme": j(le),
3446
+ style: v(j(fe))
3339
3447
  }, [
3340
- l(ji, {
3448
+ l(Ii, {
3341
3449
  symbol: x.value,
3342
3450
  "k-line-level": p.value,
3343
3451
  "k-line-adjust": h.value,
3344
3452
  "symbol-loading": D.value,
3345
- "symbol-error": k.value,
3346
- "overlay-symbols": j.value,
3453
+ "symbol-error": O.value,
3454
+ "overlay-symbols": A.value,
3347
3455
  "comparison-colors": De.value,
3348
3456
  "comparison-loading": Oe.value,
3349
- onAddOverlaySymbol: ee,
3350
- onRemoveOverlaySymbol: te,
3351
- onKLineLevelChange: I,
3352
- onKLineAdjustChange: R,
3353
- onToggleIndicator: on,
3354
- onSymbolChange: z
3457
+ onAddOverlaySymbol: z,
3458
+ onRemoveOverlaySymbol: ee,
3459
+ onKLineLevelChange: N,
3460
+ onKLineAdjustChange: I,
3461
+ onToggleIndicator: rn,
3462
+ onSymbolChange: L
3355
3463
  }, null, 8, [
3356
3464
  "symbol",
3357
3465
  "k-line-level",
@@ -3367,16 +3475,16 @@ var Zr = h({
3367
3475
  "is-resizing-pane": zt.value,
3368
3476
  "is-hovering-pane-separator": Bt.value,
3369
3477
  "is-hovering-right-axis": Ht.value,
3370
- "is-hovering-kline": Ut.value !== null
3371
- }]) }, [l(Kr, {
3478
+ "is-hovering-kline": Wt.value !== null
3479
+ }]) }, [l(Zr, {
3372
3480
  ref_key: "toolbarRef",
3373
3481
  ref: oe,
3374
3482
  "is-fullscreen": n.isFullscreen,
3375
- onSelectTool: cn,
3483
+ onSelectTool: sn,
3376
3484
  onToggleFullscreen: c[0] ||= (e) => r.$emit("toggleFullscreen"),
3377
- onZoomIn: c[1] ||= (e) => xn(q.value + 1),
3378
- onZoomOut: c[2] ||= (e) => xn(q.value - 1),
3379
- onSettingsChange: A(ge)
3485
+ onZoomIn: c[1] ||= (e) => wn(K.value + 1),
3486
+ onZoomOut: c[2] ||= (e) => wn(K.value - 1),
3487
+ onSettingsChange: j(he)
3380
3488
  }, null, 8, ["is-fullscreen", "onSettingsChange"]), s("div", {
3381
3489
  class: "chart-main",
3382
3490
  ref_key: "chartMainRef",
@@ -3394,122 +3502,92 @@ var Zr = h({
3394
3502
  }, null, 512),
3395
3503
  s("div", {
3396
3504
  class: "chart-container",
3397
- style: v({ cursor: Wt.value }),
3505
+ style: v({ cursor: Gt.value }),
3398
3506
  ref_key: "containerRef",
3399
- ref: H,
3400
- onScrollPassive: vn,
3401
- onPointerdown: ln,
3402
- onPointermove: un,
3403
- onPointerup: dn,
3404
- onPointerleave: pn
3507
+ ref: V,
3508
+ onScrollPassive: xn,
3509
+ onPointerdown: fn,
3510
+ onPointermove: pn,
3511
+ onPointerup: mn,
3512
+ onPointerleave: hn
3405
3513
  }, [s("div", {
3406
3514
  class: "scroll-content",
3407
- style: v({ width: bn.value + "px" })
3408
- }, [s("div", Gi, [
3409
- s("canvas", Ki, null, 512),
3410
- A(Ye) ? (C(), i(Pe, {
3515
+ style: v({ width: Cn.value + "px" })
3516
+ }, [s("div", Gi, [s("canvas", Ki, null, 512), l(cn, null, {
3517
+ default: F(() => [j(at) ? (C(), i(an, {
3411
3518
  key: 0,
3412
- drawing: A(Ye),
3413
- onUpdateStyle: A(Qe),
3414
- onDelete: A($e)
3519
+ "start-date": j(tt),
3520
+ "onUpdate:startDate": c[3] ||= (e) => m(tt) ? tt.value = e : null,
3521
+ "end-date": j(nt),
3522
+ "onUpdate:endDate": c[4] ||= (e) => m(nt) ? nt.value = e : null,
3523
+ "start-label": j(ct),
3524
+ "end-label": j(lt),
3525
+ count: j(st),
3526
+ onExport: j(ht),
3527
+ onClear: j(dt),
3528
+ onBatchSetting: c[5] ||= (e) => be.value = !0
3529
+ }, null, 8, [
3530
+ "start-date",
3531
+ "end-date",
3532
+ "start-label",
3533
+ "end-label",
3534
+ "count",
3535
+ "onExport",
3536
+ "onClear"
3537
+ ])) : a("", !0), j(Je) ? (C(), i(Be, {
3538
+ key: 1,
3539
+ drawing: j(Je),
3540
+ onUpdateStyle: j(Ze),
3541
+ onDelete: j(Qe)
3415
3542
  }, null, 8, [
3416
3543
  "drawing",
3417
3544
  "onUpdateStyle",
3418
3545
  "onDelete"
3419
- ])) : a("", !0),
3420
- A(ot) ? (C(), o("div", {
3421
- key: 1,
3422
- class: "range-selection-export",
3423
- onPointerdown: c[8] ||= L(() => {}, ["stop"]),
3424
- onPointermove: c[9] ||= L(() => {}, ["stop"]),
3425
- onPointerup: c[10] ||= L(() => {}, ["stop"])
3426
- }, [
3427
- F(s("input", {
3428
- class: "range-selection-export__label",
3429
- "onUpdate:modelValue": c[3] ||= (e) => m(nt) ? nt.value = e : null,
3430
- placeholder: A(ct)
3431
- }, null, 8, qi), [[M, A(nt)]]),
3432
- c[20] ||= s("span", { class: "range-selection-export__sep" }, "~", -1),
3433
- F(s("input", {
3434
- class: "range-selection-export__label",
3435
- "onUpdate:modelValue": c[4] ||= (e) => m(rt) ? rt.value = e : null,
3436
- placeholder: A(lt)
3437
- }, null, 8, Ji), [[M, A(rt)]]),
3438
- s("button", {
3439
- type: "button",
3440
- class: "toolbar-btn",
3441
- title: "批量设置",
3442
- onClick: c[5] ||= L((e) => xe.value = !0, ["stop"])
3443
- }, " 批量设置 "),
3444
- s("button", {
3445
- type: "button",
3446
- class: "toolbar-btn",
3447
- title: "导出",
3448
- onClick: c[6] ||= L((...e) => A(ht) && A(ht)(...e), ["stop"])
3449
- }, " 导出 "),
3450
- s("button", {
3451
- type: "button",
3452
- class: "toolbar-btn delete-btn",
3453
- title: "删除选区",
3454
- onClick: c[7] ||= L((...e) => A(dt) && A(dt)(...e), ["stop"])
3455
- }, [...c[19] ||= [s("svg", {
3456
- class: "delete-icon",
3457
- viewBox: "0 0 24 24",
3458
- fill: "none",
3459
- stroke: "currentColor",
3460
- "stroke-width": "2",
3461
- "stroke-linecap": "round",
3462
- "stroke-linejoin": "round",
3463
- "aria-hidden": "true"
3464
- }, [
3465
- s("path", { d: "M3 6h18" }),
3466
- s("path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6" }),
3467
- s("path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" })
3468
- ], -1)]])
3469
- ], 32)) : a("", !0)
3470
- ], 512), A(ut) ? (C(), o("div", {
3546
+ ])) : a("", !0)]),
3547
+ _: 1
3548
+ })], 512), j(ut) ? (C(), o("div", {
3471
3549
  key: 0,
3472
- class: _(["range-selection-overlay", { "is-dragging": A(tt).isDragging }]),
3473
- style: v(A(ut)),
3550
+ class: _(["range-selection-overlay", { "is-dragging": j(et).isDragging }]),
3551
+ style: v(j(ut)),
3474
3552
  "aria-label": "已选择的 K 线区间"
3475
- }, [A(ot) ? (C(), o("div", {
3553
+ }, [j(at) ? (C(), o("div", {
3476
3554
  key: 0,
3477
3555
  class: "range-selection-handle range-selection-handle--left",
3478
- onPointerdown: c[11] ||= L((e) => A(_t)("left", e), ["stop"]),
3479
- onPointermove: c[12] ||= L((e) => A(vt)(e), ["stop"]),
3480
- onPointerup: c[13] ||= L((e) => A(yt)(e), ["stop"])
3481
- }, null, 32)) : a("", !0), A(ot) ? (C(), o("div", {
3556
+ onPointerdown: c[6] ||= R((e) => j(_t)("left", e), ["stop"]),
3557
+ onPointermove: c[7] ||= R((e) => j(vt)(e), ["stop"]),
3558
+ onPointerup: c[8] ||= R((e) => j(yt)(e), ["stop"])
3559
+ }, null, 32)) : a("", !0), j(at) ? (C(), o("div", {
3482
3560
  key: 1,
3483
3561
  class: "range-selection-handle range-selection-handle--right",
3484
- onPointerdown: c[14] ||= L((e) => A(_t)("right", e), ["stop"]),
3485
- onPointermove: c[15] ||= L((e) => A(vt)(e), ["stop"]),
3486
- onPointerup: c[16] ||= L((e) => A(yt)(e), ["stop"])
3562
+ onPointerdown: c[9] ||= R((e) => j(_t)("right", e), ["stop"]),
3563
+ onPointermove: c[10] ||= R((e) => j(vt)(e), ["stop"]),
3564
+ onPointerup: c[11] ||= R((e) => j(yt)(e), ["stop"])
3487
3565
  }, null, 32)) : a("", !0)], 6)) : a("", !0)], 4)], 36),
3488
3566
  ae.value ? (C(), i(t, {
3489
3567
  key: 0,
3490
3568
  to: ae.value
3491
3569
  }, [
3492
- Gt.value ? (C(), o("div", {
3570
+ Kt.value && !j(Ut) ? (C(), o("div", {
3493
3571
  key: 0,
3494
3572
  class: _(["tooltip-anchor kline-tooltip-anchor", { "use-anchor": Ot.value }]),
3495
- style: v(Yt.value)
3573
+ style: v(Xt.value)
3496
3574
  }, null, 6)) : a("", !0),
3497
- Ft.value || Lt.value ? (C(), o("div", {
3575
+ Ft.value || It.value ? (C(), o("div", {
3498
3576
  key: 1,
3499
3577
  class: _(["tooltip-anchor marker-tooltip-anchor", { "use-anchor": Ot.value }]),
3500
- style: v(Zt.value)
3578
+ style: v(Qt.value)
3501
3579
  }, null, 6)) : a("", !0),
3502
- Gt.value ? (C(), i(Xt, {
3580
+ Kt.value && !j(Ut) ? (C(), i(Zt, {
3503
3581
  key: 2,
3504
- k: Gt.value,
3505
- index: Kt.value,
3506
- data: an.value,
3507
- pos: Jt.value,
3582
+ k: Kt.value,
3583
+ index: qt.value,
3584
+ data: nn.value,
3585
+ pos: Yt.value,
3508
3586
  "set-el": Tt,
3509
3587
  "use-anchor": Ot.value,
3510
- "anchor-placement": Qt.value,
3511
- "up-color": A(me).upColor,
3512
- "down-color": A(me).downColor,
3588
+ "anchor-placement": $t.value,
3589
+ "up-color": j(ue).upColor,
3590
+ "down-color": j(ue).downColor,
3513
3591
  timezone: d.timezone,
3514
3592
  "show-time": y.value
3515
3593
  }, null, 8, [
@@ -3524,12 +3602,12 @@ var Zr = h({
3524
3602
  "timezone",
3525
3603
  "show-time"
3526
3604
  ])) : a("", !0),
3527
- Ft.value || Lt.value ? (C(), i($t, {
3605
+ Ft.value || It.value ? (C(), i(en, {
3528
3606
  key: 3,
3529
- marker: Ft.value || Lt.value,
3607
+ marker: Ft.value || It.value,
3530
3608
  pos: Z.value,
3531
3609
  "use-anchor": Ot.value,
3532
- "anchor-placement": rn.value,
3610
+ "anchor-placement": tn.value,
3533
3611
  "set-el": Et
3534
3612
  }, null, 8, [
3535
3613
  "marker",
@@ -3541,30 +3619,30 @@ var Zr = h({
3541
3619
  s("div", {
3542
3620
  class: "right-axis-host",
3543
3621
  ref: "rightAxisLayerRef",
3544
- style: v({ width: yn.value + "px" }),
3545
- onPointerdown: mn,
3546
- onPointermove: hn,
3547
- onPointerup: gn,
3548
- onPointerleave: _n
3622
+ style: v({ width: Sn.value + "px" }),
3623
+ onPointerdown: gn,
3624
+ onPointermove: _n,
3625
+ onPointerup: vn,
3626
+ onPointerleave: yn
3549
3627
  }, null, 36)
3550
3628
  ], 512)], 2),
3551
3629
  l(Hi, {
3552
- progress: A(gt),
3553
- onClose: c[17] ||= (e) => gt.value = null
3630
+ progress: j(gt),
3631
+ onClose: c[12] ||= (e) => gt.value = null
3554
3632
  }, null, 8, ["progress"]),
3555
- l(Fi, {
3556
- show: xe.value,
3557
- onClose: c[18] ||= (e) => xe.value = !1,
3558
- onApply: sn
3633
+ l(Li, {
3634
+ show: be.value,
3635
+ onClose: c[13] ||= (e) => be.value = !1,
3636
+ onApply: on
3559
3637
  }, null, 8, ["show"]),
3560
- l(It, {
3638
+ l(Lt, {
3561
3639
  ref_key: "indicatorSelectorRef",
3562
- ref: ce,
3563
- "active-indicators": A(Y),
3564
- "indicator-params": A(Me),
3565
- onToggle: A(Ue),
3566
- onUpdateParams: A(We),
3567
- onReorderSubIndicators: A(Ge)
3640
+ ref: se,
3641
+ "active-indicators": j(Me),
3642
+ "indicator-params": j(Ne),
3643
+ onToggle: j(Ue),
3644
+ onUpdateParams: j(We),
3645
+ onReorderSubIndicators: j(Ge)
3568
3646
  }, null, 8, [
3569
3647
  "active-indicators",
3570
3648
  "indicator-params",
@@ -3574,9 +3652,9 @@ var Zr = h({
3574
3652
  ])
3575
3653
  ], 12, Ui));
3576
3654
  }
3577
- }), [["__scopeId", "data-v-74f0a50b"]]), Xi = {
3655
+ }), [["__scopeId", "data-v-44244ba7"]]), Ji = {
3578
3656
  name: "@363045841yyt/klinechart",
3579
- version: "0.8.5",
3657
+ version: "0.8.6",
3580
3658
  description: "Vue 3 bindings for @363045841yyt/klinechart-core. Idiomatic composables, SFC components.",
3581
3659
  license: "MIT",
3582
3660
  repository: {
@@ -3649,25 +3727,25 @@ var Zr = h({
3649
3727
  vitest: "^4.1.8",
3650
3728
  vue: "^3.5.35"
3651
3729
  }
3652
- }.version, Zi = null;
3653
- function Qi(e) {
3654
- Zi = e;
3730
+ }.version, Yi = null;
3731
+ function Xi(e) {
3732
+ Yi = e;
3655
3733
  }
3656
- function $i(e) {
3734
+ function Zi(e) {
3657
3735
  if (e.container == null) throw Error("[@363045841yyt/klinechart] createChart: `container` is required and must be a non-null HTMLElement");
3658
- if (Zi === null) throw Error("[@363045841yyt/klinechart] createChart: no ChartController factory registered. Call __setControllerFactory(...) before mounting (the core package wires this in production).");
3659
- return Zi(e);
3736
+ if (Yi === null) throw Error("[@363045841yyt/klinechart] createChart: no ChartController factory registered. Call __setControllerFactory(...) before mounting (the core package wires this in production).");
3737
+ return Yi(e);
3660
3738
  }
3661
3739
  function $(e) {
3662
- let t = O(e.peek());
3740
+ let t = k(e.peek());
3663
3741
  return x(e.subscribe(() => {
3664
3742
  t.value = e.peek();
3665
3743
  })), t;
3666
3744
  }
3667
- function ea(e, t) {
3668
- let n = O(null), r = !1, i = (e) => {
3745
+ function Qi(e, t) {
3746
+ let n = k(null), r = !1, i = (e) => {
3669
3747
  if (e == null || n.value != null) return;
3670
- let i = $i({
3748
+ let i = Zi({
3671
3749
  ...t,
3672
3750
  container: e
3673
3751
  }), a = (e) => {
@@ -3680,7 +3758,7 @@ function ea(e, t) {
3680
3758
  typeof i.then == "function" ? i.then(a) : a(i);
3681
3759
  };
3682
3760
  i(e.value);
3683
- let a = N(e, (e) => {
3761
+ let a = P(e, (e) => {
3684
3762
  i(e);
3685
3763
  }, {
3686
3764
  immediate: !0,
@@ -3692,8 +3770,8 @@ function ea(e, t) {
3692
3770
  };
3693
3771
  return x(o), y(o), { chart: n };
3694
3772
  }
3695
- function ta(e) {
3696
- let t = O(e.indicators.peek());
3773
+ function $i(e) {
3774
+ let t = k(e.indicators.peek());
3697
3775
  return x(e.indicators.subscribe(() => {
3698
3776
  t.value = e.indicators.peek();
3699
3777
  })), {
@@ -3703,26 +3781,26 @@ function ta(e) {
3703
3781
  updateParams: e.updateIndicatorParams.bind(e)
3704
3782
  };
3705
3783
  }
3706
- function na(e) {
3707
- let t = O(e.interactionState.peek());
3784
+ function ea(e) {
3785
+ let t = k(e.interactionState.peek());
3708
3786
  return x(e.interactionState.subscribe(() => {
3709
3787
  t.value = e.interactionState.peek();
3710
3788
  })), t;
3711
3789
  }
3712
- function ra(e) {
3713
- let t = O(e.paneRatios.peek());
3790
+ function ta(e) {
3791
+ let t = k(e.paneRatios.peek());
3714
3792
  return x(e.paneRatios.subscribe(() => {
3715
3793
  t.value = e.paneRatios.peek();
3716
3794
  })), t;
3717
3795
  }
3718
- function ia(e) {
3719
- let t = O(e.viewport.peek());
3796
+ function na(e) {
3797
+ let t = k(e.viewport.peek());
3720
3798
  return x(e.viewport.subscribe(() => {
3721
3799
  t.value = e.viewport.peek();
3722
3800
  })), t;
3723
3801
  }
3724
- function aa(e) {
3725
- let t = te({ catalog: e.catalog });
3802
+ function ra(e) {
3803
+ let t = B({ catalog: e.catalog });
3726
3804
  x(() => t.dispose());
3727
3805
  let n = $(t.filteredMain), r = $(t.filteredSub), i = $(t.menuOpen), a = $(t.searchQuery);
3728
3806
  function o(t) {
@@ -3750,7 +3828,7 @@ function aa(e) {
3750
3828
  isActive: c
3751
3829
  };
3752
3830
  }
3753
- var oa = u({
3831
+ var ia = u({
3754
3832
  name: "KLineChart",
3755
3833
  props: {
3756
3834
  data: {
@@ -3779,7 +3857,7 @@ var oa = u({
3779
3857
  zoomLevelChange: (e, t) => !0
3780
3858
  },
3781
3859
  setup(e, { emit: t, expose: n }) {
3782
- let r = O(null), i = d(), a = O(null), o = !0, s = (e) => {
3860
+ let r = k(null), i = d(), a = k(null), o = !0, s = (e) => {
3783
3861
  if (!o) {
3784
3862
  e.dispose();
3785
3863
  return;
@@ -3794,7 +3872,7 @@ var oa = u({
3794
3872
  b(() => {
3795
3873
  let t = r.value;
3796
3874
  t != null && (i.run(() => {
3797
- let n = $i({
3875
+ let n = Zi({
3798
3876
  container: t,
3799
3877
  data: e.data,
3800
3878
  initialZoomLevel: e.initialZoomLevel,
@@ -3802,9 +3880,9 @@ var oa = u({
3802
3880
  theme: e.theme
3803
3881
  });
3804
3882
  typeof n.then == "function" ? n.then(s) : s(n);
3805
- }), N(() => e.data, (e) => {
3883
+ }), P(() => e.data, (e) => {
3806
3884
  a.value?.setData(e);
3807
- }), N(() => e.theme, (e) => {
3885
+ }), P(() => e.theme, (e) => {
3808
3886
  a.value?.setTheme(e);
3809
3887
  }));
3810
3888
  }), S(() => {
@@ -3834,9 +3912,9 @@ var oa = u({
3834
3912
  }
3835
3913
  });
3836
3914
  }
3837
- }), sa = { install(e) {
3838
- e.component("KLineChart", oa);
3915
+ }), aa = { install(e) {
3916
+ e.component("KLineChart", ia);
3839
3917
  } };
3840
- Qi(ee);
3918
+ Xi(te);
3841
3919
  //#endregion
3842
- export { z as CORE_VERSION, Pe as DrawingStyleToolbar, Qe as IndicatorParams, It as IndicatorSelector, oa as KLineChart, Yi as KLineChartVue, Xt as KLineTooltip, sa as KMapPlugin, Kr as LeftToolbar, $t as MarkerTooltip, Xi as VERSION, Qi as __setControllerFactory, $ as coreSignalToVueRef, $i as createChart, ea as useChart, aa as useIndicatorSelector, ta as useIndicators, na as useInteractionState, ra as usePaneRatios, ia as useViewport };
3920
+ export { ee as CORE_VERSION, Be as DrawingStyleToolbar, at as IndicatorParams, Lt as IndicatorSelector, ia as KLineChart, qi as KLineChartVue, Zt as KLineTooltip, aa as KMapPlugin, Zr as LeftToolbar, en as MarkerTooltip, Ji as VERSION, Xi as __setControllerFactory, $ as coreSignalToVueRef, Zi as createChart, Qi as useChart, ra as useIndicatorSelector, $i as useIndicators, ea as useInteractionState, ta as usePaneRatios, na as useViewport };