@363045841yyt/klinechart 0.7.12-alpha.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ChartSettingsDialog.vue.d.ts.map +1 -1
- package/dist/components/DrawingStyleToolbar.vue.d.ts.map +1 -1
- package/dist/components/Dropdown.vue.d.ts +29 -0
- package/dist/components/Dropdown.vue.d.ts.map +1 -0
- package/dist/components/IndicatorSelector.vue.d.ts +5 -1
- package/dist/components/IndicatorSelector.vue.d.ts.map +1 -1
- package/dist/components/KLineChart.vue.d.ts +4 -0
- package/dist/components/KLineChart.vue.d.ts.map +1 -1
- package/dist/components/KLineLevelDropdown.vue.d.ts +12 -0
- package/dist/components/KLineLevelDropdown.vue.d.ts.map +1 -0
- package/dist/components/TopToolbar.vue.d.ts +17 -0
- package/dist/components/TopToolbar.vue.d.ts.map +1 -0
- package/dist/index.cjs +2 -2
- package/dist/index.css +1 -1
- package/dist/index.js +1017 -888
- package/package.json +9 -9
- package/src/components/ChartSettingsDialog.vue +15 -39
- package/src/components/DrawingStyleToolbar.vue +27 -36
- package/src/components/Dropdown.vue +291 -0
- package/src/components/IndicatorSelector.vue +21 -357
- package/src/components/KLineChart.vue +59 -14
- package/src/components/KLineLevelDropdown.vue +45 -0
- package/src/components/LeftToolbar.vue +4 -4
- package/src/components/TopToolbar.vue +232 -0
package/dist/index.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { Fragment as e, Teleport as t, Transition as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, effectScope as d, h as f, inject as p, markRaw as m, nextTick as h, normalizeClass as g, normalizeStyle as _, onBeforeUnmount as v, onMounted as y, onScopeDispose as b, onUnmounted as x, openBlock as S, provide as C, ref as w, renderList as T, resolveDynamicComponent as E, shallowRef as D, toDisplayString as O, unref as k, vModelCheckbox as A,
|
|
2
|
-
import { COLOR_PRESET_ITEMS as I, VERSION as L, createChartController as R, createIndicatorSelectorController as
|
|
3
|
-
import { DrawingInteractionController as
|
|
4
|
-
import { SemanticChartController as
|
|
5
|
-
import {
|
|
1
|
+
import { Fragment as e, Teleport as t, Transition as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, effectScope as d, h as f, inject as p, markRaw as m, nextTick as h, normalizeClass as g, normalizeStyle as _, onBeforeUnmount as v, onMounted as y, onScopeDispose as b, onUnmounted as x, openBlock as S, provide as C, ref as w, renderList as T, resolveDynamicComponent as E, shallowRef as D, toDisplayString as O, unref as k, vModelCheckbox as A, watch as j, withCtx as M, withDirectives as N, withKeys as P, withModifiers as F } from "vue";
|
|
2
|
+
import { COLOR_PRESET_ITEMS as I, VERSION as L, createChartController as R, createIndicatorSelectorController as ee, darkTheme as te, lightTheme as ne, normalizeColorPresetSettings as z, resolveThemeColors as re, themeToCssVars as ie } from "@363045841yyt/klinechart-core";
|
|
3
|
+
import { DrawingInteractionController as ae, allIndicators as oe, createChartController as se, createIndicatorSelectorController as B, findIndicator as ce, getPhysicalKLineConfig as le, kGapFromKWidth as ue, zoomLevelToKWidth as de } from "@363045841yyt/klinechart-core/controllers";
|
|
4
|
+
import { SemanticChartController as fe, __setDataFetcher as pe } from "@363045841yyt/klinechart-core/semantic";
|
|
5
|
+
import { getRegisteredIndicatorDefinition as me } from "@363045841yyt/klinechart-core/indicators";
|
|
6
|
+
import { DEFAULT_SETTINGS as V, SETTINGS_STORAGE_KEY as H } from "@363045841yyt/klinechart-core/config";
|
|
6
7
|
//#region src/components/ColorPresetPanel.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var
|
|
8
|
+
var he = { class: "color-preset-tools" }, ge = {
|
|
8
9
|
class: "theme-tabs",
|
|
9
10
|
role: "tablist",
|
|
10
11
|
"aria-label": "颜色主题"
|
|
11
|
-
},
|
|
12
|
+
}, U = ["onClick"], _e = { class: "color-group-label" }, ve = { class: "color-grid" }, ye = ["value", "onInput"], be = /*@__PURE__*/ u({
|
|
12
13
|
__name: "ColorPresetPanel",
|
|
13
14
|
props: { colorPresetSettings: {} },
|
|
14
15
|
emits: ["update:colorPresetSettings"],
|
|
@@ -30,13 +31,13 @@ var pe = { class: "color-preset-tools" }, me = {
|
|
|
30
31
|
items: I.filter((t) => t.group === e)
|
|
31
32
|
})).filter((e) => e.items.length > 0)), d = w("light");
|
|
32
33
|
function f(e, t) {
|
|
33
|
-
return (e === "dark" ?
|
|
34
|
+
return (e === "dark" ? te : ne).colors[t];
|
|
34
35
|
}
|
|
35
36
|
function p(e) {
|
|
36
|
-
return
|
|
37
|
+
return z(i.colorPresetSettings)[d.value]?.[e] ?? f(d.value, e);
|
|
37
38
|
}
|
|
38
39
|
function m(e, t) {
|
|
39
|
-
let n =
|
|
40
|
+
let n = z(i.colorPresetSettings);
|
|
40
41
|
a("update:colorPresetSettings", {
|
|
41
42
|
...n,
|
|
42
43
|
[d.value]: {
|
|
@@ -46,19 +47,19 @@ var pe = { class: "color-preset-tools" }, me = {
|
|
|
46
47
|
});
|
|
47
48
|
}
|
|
48
49
|
function h() {
|
|
49
|
-
let e = { ...
|
|
50
|
+
let e = { ...z(i.colorPresetSettings) };
|
|
50
51
|
delete e[d.value], a("update:colorPresetSettings", e);
|
|
51
52
|
}
|
|
52
|
-
return (t, n) => (S(), o("div", null, [s("div",
|
|
53
|
+
return (t, n) => (S(), o("div", null, [s("div", he, [s("div", ge, [(S(), o(e, null, T(c, (e) => s("button", {
|
|
53
54
|
key: e.value,
|
|
54
55
|
type: "button",
|
|
55
56
|
class: g(["theme-tab", { active: d.value === e.value }]),
|
|
56
57
|
onClick: (t) => d.value = e.value
|
|
57
|
-
}, O(e.label), 11,
|
|
58
|
+
}, O(e.label), 11, U)), 64))]), s("button", {
|
|
58
59
|
type: "button",
|
|
59
60
|
class: "color-reset-btn",
|
|
60
61
|
onClick: h
|
|
61
|
-
}, " 重置颜色 ")]), (S(!0), o(e, null, T(u.value, (t) => (S(), o(e, { key: t.group }, [s("div",
|
|
62
|
+
}, " 重置颜色 ")]), (S(!0), o(e, null, T(u.value, (t) => (S(), o(e, { key: t.group }, [s("div", _e, O(t.label), 1), s("div", ve, [(S(!0), o(e, null, T(t.items, (e) => (S(), o("label", {
|
|
62
63
|
key: e.key,
|
|
63
64
|
class: "color-item"
|
|
64
65
|
}, [s("span", null, O(e.label), 1), s("input", {
|
|
@@ -66,76 +67,184 @@ var pe = { class: "color-preset-tools" }, me = {
|
|
|
66
67
|
class: "color-input",
|
|
67
68
|
value: p(e.key),
|
|
68
69
|
onInput: (t) => m(e.key, t.target.value)
|
|
69
|
-
}, null, 40,
|
|
70
|
+
}, null, 40, ye)]))), 128))])], 64))), 128))]));
|
|
70
71
|
}
|
|
71
|
-
}),
|
|
72
|
+
}), W = (e, t) => {
|
|
72
73
|
let n = e.__vccOpts || e;
|
|
73
74
|
for (let [e, r] of t) n[e] = r;
|
|
74
75
|
return n;
|
|
75
|
-
},
|
|
76
|
+
}, xe = /*#__PURE__*/ W(be, [["__scopeId", "data-v-a52947a4"]]), Se = [
|
|
77
|
+
"title",
|
|
78
|
+
"aria-expanded",
|
|
79
|
+
"onKeydown"
|
|
80
|
+
], Ce = {
|
|
81
|
+
key: 0,
|
|
82
|
+
class: "dropdown__label"
|
|
83
|
+
}, we = { class: "dropdown__value" }, G = ["aria-selected", "onClick"], K = 0, q = null, Te = 0, J = /*#__PURE__*/ W(/* @__PURE__ */ u({
|
|
84
|
+
__name: "Dropdown",
|
|
85
|
+
props: {
|
|
86
|
+
modelValue: {},
|
|
87
|
+
options: {},
|
|
88
|
+
size: { default: "md" },
|
|
89
|
+
minWidth: {},
|
|
90
|
+
label: {},
|
|
91
|
+
title: { default: "" }
|
|
92
|
+
},
|
|
93
|
+
emits: ["update:modelValue"],
|
|
94
|
+
setup(t, { emit: n }) {
|
|
95
|
+
let i = t, c = n, l = w(null), u = w(null), d = w(!1), f = w(0), p = ++Te, m = r(() => i.minWidth ? { minWidth: i.minWidth } : {}), h = r(() => {
|
|
96
|
+
if (!d.value) return;
|
|
97
|
+
let e = f.value || (i.minWidth ? parseInt(i.minWidth) : 0);
|
|
98
|
+
return { width: e ? `${e}px` : void 0 };
|
|
99
|
+
}), y = r(() => {
|
|
100
|
+
let e = i.modelValue?.trim();
|
|
101
|
+
return e && i.options.some((t) => t.value === e) ? e : i.options[0]?.value ?? "";
|
|
102
|
+
}), b = r(() => i.options.find((e) => e.value === y.value) ?? i.options[0]);
|
|
103
|
+
function x() {
|
|
104
|
+
K !== p && q && q(), !d.value && (K = p, q = C, f.value = u.value?.offsetWidth ?? 0, d.value = !0, document.addEventListener("pointerdown", k));
|
|
105
|
+
}
|
|
106
|
+
function C() {
|
|
107
|
+
d.value && (d.value = !1, K === p && (K = 0, q = null), document.removeEventListener("pointerdown", k));
|
|
108
|
+
}
|
|
109
|
+
function E() {
|
|
110
|
+
d.value ? C() : x();
|
|
111
|
+
}
|
|
112
|
+
function D(e) {
|
|
113
|
+
c("update:modelValue", e), C();
|
|
114
|
+
}
|
|
115
|
+
function k(e) {
|
|
116
|
+
let t = l.value;
|
|
117
|
+
t && !t.contains(e.target) && C();
|
|
118
|
+
}
|
|
119
|
+
return v(C), (n, r) => (S(), o("div", {
|
|
120
|
+
ref_key: "rootRef",
|
|
121
|
+
ref: l,
|
|
122
|
+
class: g(["dropdown", [`dropdown--${t.size}`, { "is-open": d.value }]])
|
|
123
|
+
}, [s("button", {
|
|
124
|
+
ref_key: "triggerRef",
|
|
125
|
+
ref: u,
|
|
126
|
+
type: "button",
|
|
127
|
+
class: "dropdown__trigger",
|
|
128
|
+
title: t.title,
|
|
129
|
+
style: _(m.value),
|
|
130
|
+
"aria-haspopup": "listbox",
|
|
131
|
+
"aria-expanded": d.value,
|
|
132
|
+
onClick: E,
|
|
133
|
+
onKeydown: [
|
|
134
|
+
P(F(C, ["stop"]), ["escape"]),
|
|
135
|
+
P(F(x, ["prevent"]), ["down"]),
|
|
136
|
+
P(F(E, ["prevent"]), ["enter"]),
|
|
137
|
+
P(F(E, ["prevent"]), ["space"])
|
|
138
|
+
]
|
|
139
|
+
}, [
|
|
140
|
+
t.label ? (S(), o("span", Ce, O(t.label), 1)) : a("", !0),
|
|
141
|
+
s("span", we, O(b.value.label), 1),
|
|
142
|
+
r[0] ||= s("span", {
|
|
143
|
+
class: "dropdown__chevron",
|
|
144
|
+
"aria-hidden": "true"
|
|
145
|
+
}, null, -1)
|
|
146
|
+
], 44, Se), d.value ? (S(), o("div", {
|
|
147
|
+
key: 0,
|
|
148
|
+
class: "dropdown__menu",
|
|
149
|
+
style: _(h.value),
|
|
150
|
+
role: "listbox",
|
|
151
|
+
tabindex: "-1"
|
|
152
|
+
}, [(S(!0), o(e, null, T(t.options, (e) => (S(), o("button", {
|
|
153
|
+
key: e.value,
|
|
154
|
+
type: "button",
|
|
155
|
+
class: g(["dropdown__option", { "is-selected": e.value === y.value }]),
|
|
156
|
+
role: "option",
|
|
157
|
+
"aria-selected": e.value === y.value,
|
|
158
|
+
onClick: (t) => D(e.value)
|
|
159
|
+
}, O(e.label), 11, G))), 128))], 4)) : a("", !0)], 2));
|
|
160
|
+
}
|
|
161
|
+
}), [["__scopeId", "data-v-126e11f2"]]), Y = {
|
|
76
162
|
class: "toolbar-item color-item",
|
|
77
163
|
title: "颜色"
|
|
78
|
-
},
|
|
164
|
+
}, Ee = ["value"], De = /*#__PURE__*/ W(/* @__PURE__ */ u({
|
|
79
165
|
__name: "DrawingStyleToolbar",
|
|
80
166
|
props: { drawing: {} },
|
|
81
167
|
emits: ["updateStyle", "delete"],
|
|
82
168
|
setup(e, { emit: t }) {
|
|
83
|
-
let n =
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
169
|
+
let n = [
|
|
170
|
+
{
|
|
171
|
+
label: "1px",
|
|
172
|
+
value: "1"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
label: "2px",
|
|
176
|
+
value: "2"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
label: "3px",
|
|
180
|
+
value: "3"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
label: "4px",
|
|
184
|
+
value: "4"
|
|
185
|
+
}
|
|
186
|
+
], r = [
|
|
187
|
+
{
|
|
188
|
+
label: "实线",
|
|
189
|
+
value: "solid"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
label: "虚线",
|
|
193
|
+
value: "dashed"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
label: "点线",
|
|
197
|
+
value: "dotted"
|
|
198
|
+
}
|
|
199
|
+
], i = t;
|
|
91
200
|
function a(e) {
|
|
92
|
-
|
|
201
|
+
e.key === "Delete" && (e.preventDefault(), i("delete"));
|
|
93
202
|
}
|
|
203
|
+
y(() => document.addEventListener("keydown", a)), x(() => document.removeEventListener("keydown", a));
|
|
94
204
|
function c(e) {
|
|
95
|
-
|
|
205
|
+
i("updateStyle", { stroke: e });
|
|
206
|
+
}
|
|
207
|
+
function u(e) {
|
|
208
|
+
i("updateStyle", { strokeWidth: e });
|
|
209
|
+
}
|
|
210
|
+
function d(e) {
|
|
211
|
+
i("updateStyle", { strokeStyle: e });
|
|
96
212
|
}
|
|
97
|
-
return (t,
|
|
213
|
+
return (t, i) => (S(), o("div", {
|
|
98
214
|
class: "drawing-style-toolbar",
|
|
99
|
-
onPointerdown:
|
|
100
|
-
onPointermove:
|
|
101
|
-
onPointerup:
|
|
215
|
+
onPointerdown: i[4] ||= F(() => {}, ["stop"]),
|
|
216
|
+
onPointermove: i[5] ||= F(() => {}, ["stop"]),
|
|
217
|
+
onPointerup: i[6] ||= F(() => {}, ["stop"])
|
|
102
218
|
}, [
|
|
103
|
-
s("div",
|
|
219
|
+
s("div", Y, [s("span", {
|
|
104
220
|
class: "color-swatch",
|
|
105
221
|
style: _({ background: e.drawing.style.stroke ?? "#2962ff" })
|
|
106
222
|
}, null, 4), s("input", {
|
|
107
223
|
type: "color",
|
|
108
224
|
class: "color-input",
|
|
109
225
|
value: e.drawing.style.stroke ?? "#2962ff",
|
|
110
|
-
onInput:
|
|
111
|
-
}, null, 40,
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
title: "线宽"
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
onChange: n[2] ||= (e) => c(e.target.value),
|
|
127
|
-
title: "线型"
|
|
128
|
-
}, [...n[8] ||= [
|
|
129
|
-
s("option", { value: "solid" }, "实线", -1),
|
|
130
|
-
s("option", { value: "dashed" }, "虚线", -1),
|
|
131
|
-
s("option", { value: "dotted" }, "点线", -1)
|
|
132
|
-
]], 40, J),
|
|
226
|
+
onInput: i[0] ||= (e) => c(e.target.value)
|
|
227
|
+
}, null, 40, Ee)]),
|
|
228
|
+
l(J, {
|
|
229
|
+
"model-value": String(e.drawing.style.strokeWidth ?? 1),
|
|
230
|
+
options: n,
|
|
231
|
+
size: "sm",
|
|
232
|
+
title: "线宽",
|
|
233
|
+
"onUpdate:modelValue": i[1] ||= (e) => u(Number(e))
|
|
234
|
+
}, null, 8, ["model-value"]),
|
|
235
|
+
l(J, {
|
|
236
|
+
"model-value": e.drawing.style.strokeStyle ?? "solid",
|
|
237
|
+
options: r,
|
|
238
|
+
size: "sm",
|
|
239
|
+
title: "线型",
|
|
240
|
+
"onUpdate:modelValue": i[2] ||= (e) => d(e)
|
|
241
|
+
}, null, 8, ["model-value"]),
|
|
133
242
|
s("button", {
|
|
134
243
|
type: "button",
|
|
135
244
|
class: "toolbar-btn delete-btn",
|
|
136
245
|
title: "删除",
|
|
137
|
-
onClick:
|
|
138
|
-
}, [...
|
|
246
|
+
onClick: i[3] ||= (e) => t.$emit("delete")
|
|
247
|
+
}, [...i[7] ||= [s("svg", {
|
|
139
248
|
class: "delete-icon",
|
|
140
249
|
viewBox: "0 0 24 24",
|
|
141
250
|
fill: "none",
|
|
@@ -151,32 +260,32 @@ var pe = { class: "color-preset-tools" }, me = {
|
|
|
151
260
|
], -1)]])
|
|
152
261
|
], 32));
|
|
153
262
|
}
|
|
154
|
-
}), [["__scopeId", "data-v-
|
|
155
|
-
function
|
|
156
|
-
C(
|
|
263
|
+
}), [["__scopeId", "data-v-e9b6a8a9"]]), Oe = Symbol("fullscreen-teleport-target");
|
|
264
|
+
function ke(e) {
|
|
265
|
+
C(Oe, e);
|
|
157
266
|
}
|
|
158
|
-
function
|
|
159
|
-
let e = p(
|
|
267
|
+
function Ae() {
|
|
268
|
+
let e = p(Oe, null);
|
|
160
269
|
return r(() => e?.value ?? "body");
|
|
161
270
|
}
|
|
162
271
|
//#endregion
|
|
163
272
|
//#region src/components/IndicatorParams.vue?vue&type=script&setup=true&lang.ts
|
|
164
|
-
var
|
|
273
|
+
var je = { class: "params-header" }, Me = { class: "header-left" }, Ne = { class: "params-title" }, Pe = { class: "header-right" }, Fe = {
|
|
165
274
|
key: 0,
|
|
166
275
|
class: "indicator-description"
|
|
167
|
-
},
|
|
276
|
+
}, Ie = { class: "params-body" }, Le = { class: "param-header" }, Re = { class: "param-label" }, ze = { class: "param-label-text" }, Be = {
|
|
168
277
|
key: 0,
|
|
169
278
|
class: "param-range"
|
|
170
|
-
},
|
|
279
|
+
}, Ve = { class: "input-wrapper" }, He = ["disabled", "onClick"], Ue = [
|
|
171
280
|
"value",
|
|
172
281
|
"min",
|
|
173
282
|
"max",
|
|
174
283
|
"step",
|
|
175
284
|
"onInput"
|
|
176
|
-
],
|
|
285
|
+
], We = ["disabled", "onClick"], Ge = {
|
|
177
286
|
key: 0,
|
|
178
287
|
class: "param-description"
|
|
179
|
-
},
|
|
288
|
+
}, Ke = { class: "params-footer" }, qe = { class: "footer-right" }, Je = /*#__PURE__*/ W(/* @__PURE__ */ u({
|
|
180
289
|
__name: "IndicatorParams",
|
|
181
290
|
props: {
|
|
182
291
|
visible: { type: Boolean },
|
|
@@ -188,13 +297,13 @@ var De = { class: "params-header" }, Oe = { class: "header-left" }, ke = { class
|
|
|
188
297
|
},
|
|
189
298
|
emits: ["close", "confirm"],
|
|
190
299
|
setup(r, { emit: u }) {
|
|
191
|
-
let d = r, f = u, p = w({ ...d.values }), m = w(!0), h =
|
|
192
|
-
|
|
300
|
+
let d = r, f = u, p = w({ ...d.values }), m = w(!0), h = Ae();
|
|
301
|
+
j(() => d.values, (e) => {
|
|
193
302
|
p.value = { ...e };
|
|
194
303
|
}, {
|
|
195
304
|
deep: !0,
|
|
196
305
|
immediate: !0
|
|
197
|
-
}),
|
|
306
|
+
}), j(() => d.visible, (e) => {
|
|
198
307
|
e && (p.value = { ...d.values });
|
|
199
308
|
});
|
|
200
309
|
function _(e, t) {
|
|
@@ -215,16 +324,16 @@ var De = { class: "params-header" }, Oe = { class: "header-left" }, ke = { class
|
|
|
215
324
|
f("confirm", { ...p.value });
|
|
216
325
|
}
|
|
217
326
|
return (u, d) => (S(), i(t, { to: k(h) }, [l(n, { name: "overlay" }, {
|
|
218
|
-
default:
|
|
327
|
+
default: M(() => [r.visible ? (S(), o("div", {
|
|
219
328
|
key: 0,
|
|
220
329
|
class: "params-overlay",
|
|
221
330
|
onClick: d[4] ||= (e) => u.$emit("close")
|
|
222
331
|
}, [l(n, { name: "modal" }, {
|
|
223
|
-
default:
|
|
332
|
+
default: M(() => [s("div", {
|
|
224
333
|
class: "indicator-params",
|
|
225
334
|
onClick: d[3] ||= F(() => {}, ["stop"])
|
|
226
335
|
}, [
|
|
227
|
-
s("div",
|
|
336
|
+
s("div", je, [s("div", Me, [s("span", Ne, O(r.indicatorName), 1), d[5] ||= s("span", { class: "params-subtitle" }, "参数设置", -1)]), s("div", Pe, [s("button", {
|
|
228
337
|
class: g(["toggle-desc-btn", { active: m.value }]),
|
|
229
338
|
onClick: d[0] ||= (e) => m.value = !m.value,
|
|
230
339
|
title: "显示/隐藏说明"
|
|
@@ -241,18 +350,18 @@ var De = { class: "params-header" }, Oe = { class: "header-left" }, ke = { class
|
|
|
241
350
|
"stroke-width": "2"
|
|
242
351
|
}, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])])]),
|
|
243
352
|
l(n, { name: "slide" }, {
|
|
244
|
-
default:
|
|
353
|
+
default: M(() => [m.value && r.indicatorDescription ? (S(), o("div", Fe, [s("p", null, O(r.indicatorDescription), 1)])) : a("", !0)]),
|
|
245
354
|
_: 1
|
|
246
355
|
}),
|
|
247
|
-
s("div",
|
|
356
|
+
s("div", Ie, [(S(!0), o(e, null, T(r.params, (e) => (S(), o("div", {
|
|
248
357
|
key: e.key,
|
|
249
358
|
class: g(["param-item", { "has-desc": m.value && e.description }])
|
|
250
|
-
}, [s("div",
|
|
359
|
+
}, [s("div", Le, [s("label", Re, [s("span", ze, O(e.label), 1), e.min !== void 0 || e.max !== void 0 ? (S(), o("span", Be, O(e.min ?? "-∞") + " ~ " + O(e.max ?? "+∞"), 1)) : a("", !0)]), s("div", Ve, [
|
|
251
360
|
s("button", {
|
|
252
361
|
class: "stepper-btn",
|
|
253
362
|
disabled: e.min !== void 0 && (p.value[e.key] ?? 0) <= e.min,
|
|
254
363
|
onClick: (t) => v(e, -1)
|
|
255
|
-
}, " − ", 8,
|
|
364
|
+
}, " − ", 8, He),
|
|
256
365
|
e.type === "number" ? (S(), o("input", {
|
|
257
366
|
key: 0,
|
|
258
367
|
type: "number",
|
|
@@ -262,17 +371,17 @@ var De = { class: "params-header" }, Oe = { class: "header-left" }, ke = { class
|
|
|
262
371
|
max: e.max,
|
|
263
372
|
step: e.step || 1,
|
|
264
373
|
onInput: (t) => _(e.key, t)
|
|
265
|
-
}, null, 40,
|
|
374
|
+
}, null, 40, Ue)) : a("", !0),
|
|
266
375
|
s("button", {
|
|
267
376
|
class: "stepper-btn",
|
|
268
377
|
disabled: e.max !== void 0 && (p.value[e.key] ?? 0) >= e.max,
|
|
269
378
|
onClick: (t) => v(e, 1)
|
|
270
|
-
}, " + ", 8,
|
|
379
|
+
}, " + ", 8, We)
|
|
271
380
|
])]), l(n, { name: "slide" }, {
|
|
272
|
-
default:
|
|
381
|
+
default: M(() => [m.value && e.description ? (S(), o("div", Ge, O(e.description), 1)) : a("", !0)]),
|
|
273
382
|
_: 2
|
|
274
383
|
}, 1024)], 2))), 128))]),
|
|
275
|
-
s("div",
|
|
384
|
+
s("div", Ke, [s("button", {
|
|
276
385
|
class: "params-btn reset",
|
|
277
386
|
onClick: y
|
|
278
387
|
}, [...d[8] ||= [s("svg", {
|
|
@@ -280,7 +389,7 @@ var De = { class: "params-header" }, Oe = { class: "header-left" }, ke = { class
|
|
|
280
389
|
fill: "none",
|
|
281
390
|
stroke: "currentColor",
|
|
282
391
|
"stroke-width": "2"
|
|
283
|
-
}, [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",
|
|
392
|
+
}, [s("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }), s("path", { d: "M3 3v5h5" })], -1), c(" 重置 ", -1)]]), s("div", qe, [s("button", {
|
|
284
393
|
class: "params-btn cancel",
|
|
285
394
|
onClick: d[2] ||= (e) => u.$emit("close")
|
|
286
395
|
}, "取消"), s("button", {
|
|
@@ -298,49 +407,31 @@ var De = { class: "params-header" }, Oe = { class: "header-left" }, ke = { class
|
|
|
298
407
|
_: 1
|
|
299
408
|
})], 8, ["to"]));
|
|
300
409
|
}
|
|
301
|
-
}), [["__scopeId", "data-v-30f2f611"]]),
|
|
302
|
-
key: 0,
|
|
303
|
-
class: "indicator-divider",
|
|
304
|
-
"aria-hidden": "true"
|
|
305
|
-
}, Ye = [
|
|
306
|
-
"draggable",
|
|
307
|
-
"onDragstart",
|
|
308
|
-
"onDragover",
|
|
309
|
-
"onDrop"
|
|
310
|
-
], Xe = ["onMouseenter"], Ze = { class: "btn-content" }, Qe = {
|
|
311
|
-
key: 0,
|
|
312
|
-
class: "param-hint"
|
|
313
|
-
}, $e = {
|
|
314
|
-
key: 0,
|
|
315
|
-
class: "hover-overlay"
|
|
316
|
-
}, et = ["onClick"], tt = {
|
|
317
|
-
key: 1,
|
|
318
|
-
class: "divider"
|
|
319
|
-
}, nt = ["onClick"], rt = { class: "indicator-item" }, it = { class: "modal-header" }, at = { class: "header-title" }, ot = { class: "title-sub" }, st = { class: "header-actions" }, ct = {
|
|
410
|
+
}), [["__scopeId", "data-v-30f2f611"]]), Ye = { class: "indicator-selector" }, Xe = { class: "modal-header" }, Ze = { class: "header-title" }, Qe = { class: "title-sub" }, $e = { class: "header-actions" }, et = {
|
|
320
411
|
key: 0,
|
|
321
412
|
viewBox: "0 0 24 24",
|
|
322
413
|
width: "16",
|
|
323
414
|
height: "16",
|
|
324
415
|
fill: "currentColor"
|
|
325
|
-
},
|
|
416
|
+
}, tt = {
|
|
326
417
|
key: 1,
|
|
327
418
|
viewBox: "0 0 24 24",
|
|
328
419
|
width: "16",
|
|
329
420
|
height: "16",
|
|
330
421
|
fill: "currentColor"
|
|
331
|
-
},
|
|
422
|
+
}, nt = { class: "modal-search-area" }, rt = { class: "search-box" }, it = ["value"], at = { class: "modal-body" }, ot = {
|
|
332
423
|
key: 0,
|
|
333
424
|
class: "indicator-section"
|
|
334
|
-
},
|
|
425
|
+
}, st = { class: "section-header" }, ct = { class: "section-count" }, lt = ["onClick"], ut = { class: "card-label" }, dt = { class: "card-tooltip" }, ft = { class: "card-header" }, X = { class: "card-label" }, Z = { class: "card-header-actions" }, pt = ["onClick"], mt = { class: "card-name" }, ht = {
|
|
335
426
|
key: 1,
|
|
336
427
|
class: "section-divider"
|
|
337
|
-
},
|
|
428
|
+
}, gt = {
|
|
338
429
|
key: 2,
|
|
339
430
|
class: "no-results"
|
|
340
|
-
},
|
|
431
|
+
}, _t = {
|
|
341
432
|
key: 3,
|
|
342
433
|
class: "indicator-section"
|
|
343
|
-
},
|
|
434
|
+
}, vt = { class: "section-header" }, yt = { class: "section-count" }, bt = ["onClick"], xt = { class: "card-label" }, St = { class: "card-tooltip" }, Ct = { class: "card-header" }, wt = { class: "card-label" }, Tt = { class: "card-header-actions" }, Et = ["onClick"], Dt = { class: "card-name" }, Ot = { class: "modal-footer" }, kt = { class: "footer-info" }, At = { class: "info-text" }, jt = /*#__PURE__*/ W(/* @__PURE__ */ u({
|
|
344
435
|
__name: "IndicatorSelector",
|
|
345
436
|
props: {
|
|
346
437
|
activeIndicators: {},
|
|
@@ -351,8 +442,8 @@ var De = { class: "params-header" }, Oe = { class: "header-left" }, ke = { class
|
|
|
351
442
|
"updateParams",
|
|
352
443
|
"reorderSubIndicators"
|
|
353
444
|
],
|
|
354
|
-
setup(
|
|
355
|
-
let f =
|
|
445
|
+
setup(c, { expose: u, emit: d }) {
|
|
446
|
+
let f = c, p = d;
|
|
356
447
|
function m(e) {
|
|
357
448
|
return e.map((e) => ({
|
|
358
449
|
id: e.id,
|
|
@@ -371,23 +462,21 @@ var De = { class: "params-header" }, Oe = { class: "header-left" }, ke = { class
|
|
|
371
462
|
}))
|
|
372
463
|
}));
|
|
373
464
|
}
|
|
374
|
-
let h =
|
|
375
|
-
function
|
|
465
|
+
let h = B({ catalog: m(oe) }), _ = $(h.menuOpen), v = $(h.searchQuery), b = $(h.filteredMain), C = $(h.filteredSub), E = r(() => b.value.length > 0 || C.value.length > 0), D = h.catalog.peek().length, A = w(!1), j = w(null), N = w(!1), P = Ae(), I = r(() => j.value ? ce(j.value) : null), L = r(() => f.activeIndicators?.length ?? 0);
|
|
466
|
+
function R(e) {
|
|
376
467
|
return f.activeIndicators?.includes(e) ?? !1;
|
|
377
468
|
}
|
|
378
|
-
function
|
|
379
|
-
|
|
380
|
-
let t = se(e);
|
|
381
|
-
t && (t.pane === "main" && U.filter((t) => t.id !== e && H(t.id) && t.pane === "main").forEach((e) => p("toggle", e.id, !1)), p("toggle", e, !0));
|
|
469
|
+
function ee(e) {
|
|
470
|
+
R(e) || ce(e) && p("toggle", e, !0);
|
|
382
471
|
}
|
|
383
|
-
function
|
|
472
|
+
function te(e) {
|
|
384
473
|
p("toggle", e, !1);
|
|
385
474
|
}
|
|
386
|
-
function
|
|
387
|
-
|
|
475
|
+
function ne(e) {
|
|
476
|
+
j.value = e, A.value = !0;
|
|
388
477
|
}
|
|
389
|
-
function
|
|
390
|
-
let t =
|
|
478
|
+
function z(e) {
|
|
479
|
+
let t = ce(e);
|
|
391
480
|
if (!t?.params) return {};
|
|
392
481
|
let n = {};
|
|
393
482
|
for (let e of t.params) n[e.key] = e.default ?? e.min ?? 1;
|
|
@@ -395,247 +484,153 @@ var De = { class: "params-header" }, Oe = { class: "header-left" }, ke = { class
|
|
|
395
484
|
for (let [e, t] of Object.entries(r)) typeof t == "number" && (i[e] = t);
|
|
396
485
|
return i;
|
|
397
486
|
}
|
|
398
|
-
function
|
|
399
|
-
|
|
400
|
-
return e.params ? e.params.map((e) => t[e.key] ?? "").join(",") : "";
|
|
401
|
-
}
|
|
402
|
-
function le(e) {
|
|
403
|
-
M.value && p("updateParams", M.value, e), j.value = !1;
|
|
404
|
-
}
|
|
405
|
-
function ue(e, t) {
|
|
406
|
-
if (!W(t)) {
|
|
407
|
-
e.preventDefault();
|
|
408
|
-
return;
|
|
409
|
-
}
|
|
410
|
-
L.value = t, I.value = null, e.dataTransfer?.setData("text/plain", t), e.dataTransfer && (e.dataTransfer.effectAllowed = "move");
|
|
411
|
-
}
|
|
412
|
-
function de(e, t) {
|
|
413
|
-
!L.value || !W(t) || L.value === t || (I.value = t, e.dataTransfer && (e.dataTransfer.dropEffect = "move"));
|
|
414
|
-
}
|
|
415
|
-
function fe(e, t) {
|
|
416
|
-
let n = L.value || e.dataTransfer?.getData("text/plain") || "";
|
|
417
|
-
if (!n || n === t) {
|
|
418
|
-
G();
|
|
419
|
-
return;
|
|
420
|
-
}
|
|
421
|
-
if (!W(n) || !W(t)) {
|
|
422
|
-
G();
|
|
423
|
-
return;
|
|
424
|
-
}
|
|
425
|
-
let r = B.value.findIndex((e) => e.id === n), i = B.value.findIndex((e) => e.id === t);
|
|
426
|
-
if (r < 0 || i < 0) {
|
|
427
|
-
G();
|
|
428
|
-
return;
|
|
429
|
-
}
|
|
430
|
-
let a = [...B.value.map((e) => e.id)], [o] = a.splice(r, 1);
|
|
431
|
-
if (!o) {
|
|
432
|
-
G();
|
|
433
|
-
return;
|
|
434
|
-
}
|
|
435
|
-
a.splice(i, 0, o), p("reorderSubIndicators", a.filter((e) => W(e))), G();
|
|
436
|
-
}
|
|
437
|
-
function G() {
|
|
438
|
-
I.value = null, L.value = null;
|
|
487
|
+
function re(e) {
|
|
488
|
+
j.value && p("updateParams", j.value, e), A.value = !1;
|
|
439
489
|
}
|
|
440
|
-
function
|
|
490
|
+
function ie(e) {
|
|
441
491
|
e.key === "Escape" && h.menuOpen.peek() && h.closeMenu();
|
|
442
492
|
}
|
|
443
493
|
return y(() => {
|
|
444
|
-
document.addEventListener("keydown",
|
|
494
|
+
document.addEventListener("keydown", ie);
|
|
445
495
|
}), x(() => {
|
|
446
|
-
document.removeEventListener("keydown",
|
|
447
|
-
}),
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
onClick: F((e) => ie(t.id), ["stop"]),
|
|
472
|
-
title: "编辑参数"
|
|
473
|
-
}, [...u[9] ||= [s("svg", {
|
|
496
|
+
document.removeEventListener("keydown", ie);
|
|
497
|
+
}), u({
|
|
498
|
+
openMenu: () => h.openMenu(),
|
|
499
|
+
closeMenu: () => h.closeMenu(),
|
|
500
|
+
toggleMenu: () => h.toggleMenu()
|
|
501
|
+
}), (r, c) => (S(), o("div", Ye, [(S(), i(t, { to: k(P) }, [l(n, { name: "overlay" }, {
|
|
502
|
+
default: M(() => [k(_) ? (S(), o("div", {
|
|
503
|
+
key: 0,
|
|
504
|
+
class: "selector-overlay",
|
|
505
|
+
onClick: c[5] ||= (e) => k(h).closeMenu()
|
|
506
|
+
}, [l(n, { name: "modal" }, {
|
|
507
|
+
default: M(() => [k(_) ? (S(), o("div", {
|
|
508
|
+
key: 0,
|
|
509
|
+
class: "selector-modal",
|
|
510
|
+
onClick: c[4] ||= F(() => {}, ["stop"])
|
|
511
|
+
}, [
|
|
512
|
+
s("div", Xe, [s("div", Ze, [c[7] ||= s("span", { class: "title-text" }, "添加指标", -1), s("span", Qe, O(k(D)) + " 个可用指标", 1)]), s("div", $e, [s("button", {
|
|
513
|
+
class: g(["view-toggle-btn", { active: N.value }]),
|
|
514
|
+
onClick: c[0] ||= (e) => N.value = !N.value,
|
|
515
|
+
title: "简洁模式"
|
|
516
|
+
}, [N.value ? (S(), o("svg", tt, [...c[9] ||= [s("path", { d: "M3 3h18v18H3V3zm16 16V5H5v14h14zM7 7h4v4H7V7zm0 6h4v4H7v-4zm6-6h4v4h-4V7zm0 6h4v4h-4v-4z" }, null, -1)]])) : (S(), o("svg", et, [...c[8] ||= [s("path", { d: "M4 6h16v2H4zm0 5h16v2H4zm0 5h16v2H4z" }, null, -1)]]))], 2), s("button", {
|
|
517
|
+
class: "modal-close",
|
|
518
|
+
onClick: c[1] ||= (e) => k(h).closeMenu(),
|
|
519
|
+
title: "关闭"
|
|
520
|
+
}, [...c[10] ||= [s("svg", {
|
|
474
521
|
viewBox: "0 0 24 24",
|
|
475
522
|
width: "14",
|
|
476
523
|
height: "14",
|
|
477
524
|
fill: "currentColor"
|
|
478
|
-
}, [s("path", { d: "M19
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
class: "action-btn remove-btn",
|
|
482
|
-
onClick: F((e) => re(t.id), ["stop"]),
|
|
483
|
-
title: "移除指标"
|
|
484
|
-
}, [...u[10] ||= [s("svg", {
|
|
525
|
+
}, [s("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" })], -1)]])])]),
|
|
526
|
+
s("div", nt, [s("div", rt, [c[11] ||= s("svg", {
|
|
527
|
+
class: "search-icon",
|
|
485
528
|
viewBox: "0 0 24 24",
|
|
486
|
-
width: "
|
|
487
|
-
height: "
|
|
529
|
+
width: "16",
|
|
530
|
+
height: "16",
|
|
488
531
|
fill: "currentColor"
|
|
489
|
-
}, [s("path", { d: "
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
default: N(() => [k(_) ? (S(), o("div", {
|
|
511
|
-
key: 0,
|
|
512
|
-
class: "selector-modal",
|
|
513
|
-
onClick: u[6] ||= F(() => {}, ["stop"])
|
|
514
|
-
}, [
|
|
515
|
-
s("div", it, [s("div", at, [u[12] ||= s("span", { class: "title-text" }, "添加指标", -1), s("span", ot, O(k(D)) + " 个可用指标", 1)]), s("div", st, [s("button", {
|
|
516
|
-
class: g(["view-toggle-btn", { active: R.value }]),
|
|
517
|
-
onClick: u[2] ||= (e) => R.value = !R.value,
|
|
518
|
-
title: "简洁模式"
|
|
519
|
-
}, [R.value ? (S(), o("svg", lt, [...u[14] ||= [s("path", { d: "M3 3h18v18H3V3zm16 16V5H5v14h14zM7 7h4v4H7V7zm0 6h4v4H7v-4zm6-6h4v4h-4V7zm0 6h4v4h-4v-4z" }, null, -1)]])) : (S(), o("svg", ct, [...u[13] ||= [s("path", { d: "M4 6h16v2H4zm0 5h16v2H4zm0 5h16v2H4z" }, null, -1)]]))], 2), s("button", {
|
|
520
|
-
class: "modal-close",
|
|
521
|
-
onClick: u[3] ||= (e) => k(h).closeMenu(),
|
|
522
|
-
title: "关闭"
|
|
523
|
-
}, [...u[15] ||= [s("svg", {
|
|
532
|
+
}, [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", {
|
|
533
|
+
value: k(v),
|
|
534
|
+
onInput: c[2] ||= (e) => k(h).setSearchQuery(e.target.value),
|
|
535
|
+
type: "text",
|
|
536
|
+
class: "search-input",
|
|
537
|
+
placeholder: "搜索指标名称..."
|
|
538
|
+
}, null, 40, it)])]),
|
|
539
|
+
s("div", at, [
|
|
540
|
+
k(b).length > 0 ? (S(), o("div", ot, [s("div", st, [c[12] ||= s("span", { class: "section-title" }, "主图指标", -1), s("span", ct, O(k(b).length), 1)]), s("div", { class: g(["indicator-grid", { compact: N.value }]) }, [(S(!0), o(e, null, T(k(b), (t) => (S(), o("button", {
|
|
541
|
+
key: t.id,
|
|
542
|
+
class: g(["indicator-card", {
|
|
543
|
+
active: R(t.id),
|
|
544
|
+
compact: N.value
|
|
545
|
+
}]),
|
|
546
|
+
onClick: (e) => R(t.id) ? te(t.id) : ee(t.id)
|
|
547
|
+
}, [N.value ? (S(), o(e, { key: 0 }, [s("span", ut, O(t.label), 1), s("span", dt, O(t.name), 1)], 64)) : (S(), o(e, { key: 1 }, [s("div", ft, [s("span", X, O(t.label), 1), s("div", Z, [t.params?.length ? (S(), o("button", {
|
|
548
|
+
key: 0,
|
|
549
|
+
class: "card-settings-btn",
|
|
550
|
+
onClick: F((e) => ne(t.id), ["stop"]),
|
|
551
|
+
title: "编辑参数"
|
|
552
|
+
}, [...c[13] ||= [s("svg", {
|
|
524
553
|
viewBox: "0 0 24 24",
|
|
525
554
|
width: "14",
|
|
526
555
|
height: "14",
|
|
527
556
|
fill: "currentColor"
|
|
528
|
-
}, [s("path", { d: "M19
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
viewBox: "0 0 24 24",
|
|
533
|
-
width: "16",
|
|
534
|
-
height: "16",
|
|
535
|
-
fill: "currentColor"
|
|
536
|
-
}, [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", {
|
|
537
|
-
value: k(v),
|
|
538
|
-
onInput: u[4] ||= (e) => k(h).setSearchQuery(e.target.value),
|
|
539
|
-
type: "text",
|
|
540
|
-
class: "search-input",
|
|
541
|
-
placeholder: "搜索指标名称..."
|
|
542
|
-
}, null, 40, ut)]),
|
|
543
|
-
k(b).length > 0 ? (S(), o("div", dt, [s("div", ft, [u[17] ||= s("span", { class: "section-title" }, "主图指标", -1), s("span", pt, O(k(b).length), 1)]), s("div", { class: g(["indicator-grid", { compact: R.value }]) }, [(S(!0), o(e, null, T(k(b), (t) => (S(), o("button", {
|
|
544
|
-
key: t.id,
|
|
545
|
-
class: g(["indicator-card", {
|
|
546
|
-
active: H(t.id),
|
|
547
|
-
compact: R.value
|
|
548
|
-
}]),
|
|
549
|
-
onClick: (e) => H(t.id) ? re(t.id) : ne(t.id)
|
|
550
|
-
}, [R.value ? (S(), o(e, { key: 0 }, [s("span", ht, O(t.label), 1), s("span", gt, O(t.name), 1)], 64)) : (S(), o(e, { key: 1 }, [s("div", _t, [s("span", vt, O(t.label), 1), s("div", yt, [t.params?.length ? (S(), o("button", {
|
|
551
|
-
key: 0,
|
|
552
|
-
class: "card-settings-btn",
|
|
553
|
-
onClick: F((e) => ie(t.id), ["stop"]),
|
|
554
|
-
title: "编辑参数"
|
|
555
|
-
}, [...u[18] ||= [s("svg", {
|
|
556
|
-
viewBox: "0 0 24 24",
|
|
557
|
-
width: "14",
|
|
558
|
-
height: "14",
|
|
559
|
-
fill: "currentColor"
|
|
560
|
-
}, [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, bt)) : a("", !0)])]), s("div", xt, O(t.name), 1)], 64))], 10, mt))), 128))], 2)])) : a("", !0),
|
|
561
|
-
k(b).length > 0 && k(C).length > 0 ? (S(), o("div", St)) : a("", !0),
|
|
562
|
-
!E.value && k(v).trim() ? (S(), o("div", Ct, [...u[19] ||= [
|
|
563
|
-
s("svg", {
|
|
564
|
-
viewBox: "0 0 24 24",
|
|
565
|
-
width: "48",
|
|
566
|
-
height: "48",
|
|
567
|
-
fill: "currentColor"
|
|
568
|
-
}, [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),
|
|
569
|
-
s("p", null, "未找到匹配的指标", -1),
|
|
570
|
-
s("span", { class: "no-results-hint" }, "请尝试其他关键词", -1)
|
|
571
|
-
]])) : a("", !0),
|
|
572
|
-
k(C).length > 0 ? (S(), o("div", wt, [s("div", Tt, [u[20] ||= s("span", { class: "section-title" }, "副图指标", -1), s("span", Et, O(k(C).length), 1)]), s("div", { class: g(["indicator-grid", { compact: R.value }]) }, [(S(!0), o(e, null, T(k(C), (t) => (S(), o("button", {
|
|
573
|
-
key: t.id,
|
|
574
|
-
class: g(["indicator-card", {
|
|
575
|
-
active: H(t.id),
|
|
576
|
-
compact: R.value
|
|
577
|
-
}]),
|
|
578
|
-
onClick: (e) => H(t.id) ? re(t.id) : ne(t.id)
|
|
579
|
-
}, [R.value ? (S(), o(e, { key: 0 }, [s("span", Ot, O(t.label), 1), s("span", kt, O(t.name), 1)], 64)) : (S(), o(e, { key: 1 }, [s("div", At, [s("span", jt, O(t.label), 1), s("div", Mt, [t.params?.length ? (S(), o("button", {
|
|
580
|
-
key: 0,
|
|
581
|
-
class: "card-settings-btn",
|
|
582
|
-
onClick: F((e) => ie(t.id), ["stop"]),
|
|
583
|
-
title: "编辑参数"
|
|
584
|
-
}, [...u[21] ||= [s("svg", {
|
|
557
|
+
}, [s("path", { d: "M19.14 12.94c.04-.31.06-.63.06-.94 0-.31-.02-.63-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.04.31-.06.63-.06.94s.02.63.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z" })], -1)]], 8, pt)) : a("", !0)])]), s("div", mt, O(t.name), 1)], 64))], 10, lt))), 128))], 2)])) : a("", !0),
|
|
558
|
+
k(b).length > 0 && k(C).length > 0 ? (S(), o("div", ht)) : a("", !0),
|
|
559
|
+
!E.value && k(v).trim() ? (S(), o("div", gt, [...c[14] ||= [
|
|
560
|
+
s("svg", {
|
|
585
561
|
viewBox: "0 0 24 24",
|
|
586
|
-
width: "
|
|
587
|
-
height: "
|
|
562
|
+
width: "48",
|
|
563
|
+
height: "48",
|
|
588
564
|
fill: "currentColor"
|
|
589
|
-
}, [s("path", { d: "
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
565
|
+
}, [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),
|
|
566
|
+
s("p", null, "未找到匹配的指标", -1),
|
|
567
|
+
s("span", { class: "no-results-hint" }, "请尝试其他关键词", -1)
|
|
568
|
+
]])) : a("", !0),
|
|
569
|
+
k(C).length > 0 ? (S(), o("div", _t, [s("div", vt, [c[15] ||= s("span", { class: "section-title" }, "副图指标", -1), s("span", yt, O(k(C).length), 1)]), s("div", { class: g(["indicator-grid", { compact: N.value }]) }, [(S(!0), o(e, null, T(k(C), (t) => (S(), o("button", {
|
|
570
|
+
key: t.id,
|
|
571
|
+
class: g(["indicator-card", {
|
|
572
|
+
active: R(t.id),
|
|
573
|
+
compact: N.value
|
|
574
|
+
}]),
|
|
575
|
+
onClick: (e) => R(t.id) ? te(t.id) : ee(t.id)
|
|
576
|
+
}, [N.value ? (S(), o(e, { key: 0 }, [s("span", xt, O(t.label), 1), s("span", St, O(t.name), 1)], 64)) : (S(), o(e, { key: 1 }, [s("div", Ct, [s("span", wt, O(t.label), 1), s("div", Tt, [t.params?.length ? (S(), o("button", {
|
|
577
|
+
key: 0,
|
|
578
|
+
class: "card-settings-btn",
|
|
579
|
+
onClick: F((e) => ne(t.id), ["stop"]),
|
|
580
|
+
title: "编辑参数"
|
|
581
|
+
}, [...c[16] ||= [s("svg", {
|
|
582
|
+
viewBox: "0 0 24 24",
|
|
583
|
+
width: "14",
|
|
584
|
+
height: "14",
|
|
585
|
+
fill: "currentColor"
|
|
586
|
+
}, [s("path", { d: "M19.14 12.94c.04-.31.06-.63.06-.94 0-.31-.02-.63-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.04.31-.06.63-.06.94s.02.63.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z" })], -1)]], 8, Et)) : a("", !0)])]), s("div", Dt, O(t.name), 1)], 64))], 10, bt))), 128))], 2)])) : a("", !0)
|
|
587
|
+
]),
|
|
588
|
+
s("div", Ot, [s("div", kt, [s("span", At, "已激活 " + O(L.value) + " 个指标", 1)]), s("button", {
|
|
589
|
+
class: "btn btn-confirm",
|
|
590
|
+
onClick: c[3] ||= (e) => k(h).closeMenu()
|
|
591
|
+
}, "确认")])
|
|
592
|
+
])) : a("", !0)]),
|
|
598
593
|
_: 1
|
|
599
|
-
})]
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
]));
|
|
594
|
+
})])) : a("", !0)]),
|
|
595
|
+
_: 1
|
|
596
|
+
})], 8, ["to"])), I.value ? (S(), i(Je, {
|
|
597
|
+
key: 0,
|
|
598
|
+
visible: A.value,
|
|
599
|
+
"indicator-id": I.value.id,
|
|
600
|
+
"indicator-name": I.value.name,
|
|
601
|
+
"indicator-description": I.value.description,
|
|
602
|
+
params: I.value.params || [],
|
|
603
|
+
values: z(I.value.id),
|
|
604
|
+
onClose: c[6] ||= (e) => A.value = !1,
|
|
605
|
+
onConfirm: re
|
|
606
|
+
}, null, 8, [
|
|
607
|
+
"visible",
|
|
608
|
+
"indicator-id",
|
|
609
|
+
"indicator-name",
|
|
610
|
+
"indicator-description",
|
|
611
|
+
"params",
|
|
612
|
+
"values"
|
|
613
|
+
])) : a("", !0)]));
|
|
619
614
|
}
|
|
620
|
-
}), [["__scopeId", "data-v-
|
|
615
|
+
}), [["__scopeId", "data-v-bbd88e50"]]), Mt = { class: "kline-tooltip__title" }, Nt = { key: 0 }, Pt = { class: "kline-tooltip__grid" }, Ft = { class: "row" }, It = { class: "row" }, Lt = { class: "row" }, Rt = { class: "row" }, zt = {
|
|
621
616
|
key: 0,
|
|
622
617
|
class: "row"
|
|
623
|
-
},
|
|
618
|
+
}, Bt = {
|
|
624
619
|
key: 1,
|
|
625
620
|
class: "row"
|
|
626
|
-
},
|
|
621
|
+
}, Vt = {
|
|
627
622
|
key: 2,
|
|
628
623
|
class: "row"
|
|
629
|
-
},
|
|
624
|
+
}, Ht = {
|
|
630
625
|
key: 3,
|
|
631
626
|
class: "row"
|
|
632
|
-
},
|
|
627
|
+
}, Ut = {
|
|
633
628
|
key: 4,
|
|
634
629
|
class: "row"
|
|
635
|
-
},
|
|
630
|
+
}, Wt = {
|
|
636
631
|
key: 5,
|
|
637
632
|
class: "row"
|
|
638
|
-
},
|
|
633
|
+
}, Gt = "#6b7280", Kt = /*#__PURE__*/ W(/* @__PURE__ */ u({
|
|
639
634
|
__name: "KLineTooltip",
|
|
640
635
|
props: {
|
|
641
636
|
k: {},
|
|
@@ -670,19 +665,19 @@ var De = { class: "params-header" }, Oe = { class: "header-left" }, ke = { class
|
|
|
670
665
|
}
|
|
671
666
|
let p = r(() => {
|
|
672
667
|
let e = t.k;
|
|
673
|
-
if (!e) return
|
|
668
|
+
if (!e) return Gt;
|
|
674
669
|
let n = f(e, t.data, t.index);
|
|
675
|
-
return n > 0 ? t.upColor : n < 0 ? t.downColor :
|
|
670
|
+
return n > 0 ? t.upColor : n < 0 ? t.downColor : Gt;
|
|
676
671
|
}), m = r(() => {
|
|
677
672
|
let e = t.k;
|
|
678
|
-
if (!e) return
|
|
673
|
+
if (!e) return Gt;
|
|
679
674
|
let n = e.close - e.open;
|
|
680
|
-
return n > 0 ? t.upColor : n < 0 ? t.downColor :
|
|
675
|
+
return n > 0 ? t.upColor : n < 0 ? t.downColor : Gt;
|
|
681
676
|
}), h = r(() => {
|
|
682
677
|
let e = t.k;
|
|
683
|
-
if (!e) return
|
|
678
|
+
if (!e) return Gt;
|
|
684
679
|
let n = e.changePercent ?? (e.close - e.open) / e.open * 100;
|
|
685
|
-
return n > 0 ? t.upColor : n < 0 ? t.downColor :
|
|
680
|
+
return n > 0 ? t.upColor : n < 0 ? t.downColor : Gt;
|
|
686
681
|
});
|
|
687
682
|
return (t, r) => e.k ? (S(), o("div", {
|
|
688
683
|
key: 0,
|
|
@@ -692,23 +687,23 @@ var De = { class: "params-header" }, Oe = { class: "header-left" }, ke = { class
|
|
|
692
687
|
left: `${e.pos.x}px`,
|
|
693
688
|
top: `${e.pos.y}px`
|
|
694
689
|
})
|
|
695
|
-
}, [s("div",
|
|
696
|
-
s("div",
|
|
697
|
-
s("div",
|
|
698
|
-
s("div",
|
|
699
|
-
s("div",
|
|
700
|
-
typeof e.k.volume == "number" ? (S(), o("div",
|
|
701
|
-
typeof e.k.turnover == "number" ? (S(), o("div",
|
|
702
|
-
typeof e.k.amplitude == "number" ? (S(), o("div",
|
|
703
|
-
typeof e.k.changePercent == "number" ? (S(), o("div",
|
|
704
|
-
typeof e.k.changeAmount == "number" ? (S(), o("div",
|
|
705
|
-
typeof e.k.turnoverRate == "number" ? (S(), o("div",
|
|
690
|
+
}, [s("div", Mt, [e.k.stockCode ? (S(), o("span", Nt, O(e.k.stockCode), 1)) : a("", !0), s("span", null, O(l(e.k.timestamp)), 1)]), s("div", Pt, [
|
|
691
|
+
s("div", Ft, [r[0] ||= s("span", null, "开", -1), s("span", { style: _({ color: p.value }) }, O(e.k.open.toFixed(2)), 5)]),
|
|
692
|
+
s("div", It, [r[1] ||= s("span", null, "高", -1), s("span", null, O(e.k.high.toFixed(2)), 1)]),
|
|
693
|
+
s("div", Lt, [r[2] ||= s("span", null, "低", -1), s("span", null, O(e.k.low.toFixed(2)), 1)]),
|
|
694
|
+
s("div", Rt, [r[3] ||= s("span", null, "收", -1), s("span", { style: _({ color: m.value }) }, O(e.k.close.toFixed(2)), 5)]),
|
|
695
|
+
typeof e.k.volume == "number" ? (S(), o("div", zt, [r[4] ||= s("span", null, "成交量", -1), s("span", null, O(u(e.k.volume)), 1)])) : a("", !0),
|
|
696
|
+
typeof e.k.turnover == "number" ? (S(), o("div", Bt, [r[5] ||= s("span", null, "成交额", -1), s("span", null, O(u(e.k.turnover)), 1)])) : a("", !0),
|
|
697
|
+
typeof e.k.amplitude == "number" ? (S(), o("div", Vt, [r[6] ||= s("span", null, "振幅", -1), s("span", null, O(e.k.amplitude) + "%", 1)])) : a("", !0),
|
|
698
|
+
typeof e.k.changePercent == "number" ? (S(), o("div", Ht, [r[7] ||= s("span", null, "涨跌幅", -1), s("span", { style: _({ color: h.value }) }, O(d(e.k.changePercent, "%")), 5)])) : a("", !0),
|
|
699
|
+
typeof e.k.changeAmount == "number" ? (S(), o("div", Ut, [r[8] ||= s("span", null, "涨跌额", -1), s("span", { style: _({ color: h.value }) }, O(d(e.k.changeAmount, "")), 5)])) : a("", !0),
|
|
700
|
+
typeof e.k.turnoverRate == "number" ? (S(), o("div", Wt, [r[9] ||= s("span", null, "换手率", -1), s("span", null, O(e.k.turnoverRate.toFixed(2)) + "%", 1)])) : a("", !0)
|
|
706
701
|
])], 6)) : a("", !0);
|
|
707
702
|
}
|
|
708
|
-
}), [["__scopeId", "data-v-a068b75e"]]),
|
|
703
|
+
}), [["__scopeId", "data-v-a068b75e"]]), qt = { class: "marker-tooltip__title" }, Jt = {
|
|
709
704
|
key: 0,
|
|
710
705
|
class: "marker-tooltip__content"
|
|
711
|
-
},
|
|
706
|
+
}, Yt = /*#__PURE__*/ W(/* @__PURE__ */ u({
|
|
712
707
|
__name: "MarkerTooltip",
|
|
713
708
|
props: {
|
|
714
709
|
marker: {},
|
|
@@ -757,18 +752,18 @@ var De = { class: "params-header" }, Oe = { class: "header-left" }, ke = { class
|
|
|
757
752
|
left: `${t.pos.x + 12}px`,
|
|
758
753
|
top: `${t.pos.y + 12}px`
|
|
759
754
|
})
|
|
760
|
-
}, [s("div",
|
|
755
|
+
}, [s("div", qt, O(f.value), 1), m.value ? (S(), o("div", Jt, [(S(!0), o(e, null, T(p.value, (e, t) => (S(), o("div", {
|
|
761
756
|
key: t,
|
|
762
757
|
class: "row"
|
|
763
758
|
}, [s("span", null, O(t), 1), s("span", null, O(h(e)), 1)]))), 128))])) : a("", !0)], 6)) : a("", !0);
|
|
764
759
|
}
|
|
765
|
-
}), [["__scopeId", "data-v-f2a21012"]]),
|
|
760
|
+
}), [["__scopeId", "data-v-f2a21012"]]), Xt = {
|
|
766
761
|
viewBox: "0 0 24 24",
|
|
767
762
|
width: "1.2em",
|
|
768
763
|
height: "1.2em"
|
|
769
764
|
};
|
|
770
|
-
function
|
|
771
|
-
return S(), o("svg",
|
|
765
|
+
function Zt(e, t) {
|
|
766
|
+
return S(), o("svg", Xt, [...t[0] ||= [s("path", {
|
|
772
767
|
fill: "none",
|
|
773
768
|
stroke: "currentColor",
|
|
774
769
|
"stroke-linecap": "round",
|
|
@@ -777,16 +772,16 @@ function an(e, t) {
|
|
|
777
772
|
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"
|
|
778
773
|
}, null, -1)]]);
|
|
779
774
|
}
|
|
780
|
-
var
|
|
775
|
+
var Qt = m({
|
|
781
776
|
name: "tabler-pointer",
|
|
782
|
-
render:
|
|
783
|
-
}),
|
|
777
|
+
render: Zt
|
|
778
|
+
}), $t = {
|
|
784
779
|
viewBox: "0 0 24 24",
|
|
785
780
|
width: "1.2em",
|
|
786
781
|
height: "1.2em"
|
|
787
782
|
};
|
|
788
|
-
function
|
|
789
|
-
return S(), o("svg",
|
|
783
|
+
function en(e, t) {
|
|
784
|
+
return S(), o("svg", $t, [...t[0] ||= [s("path", {
|
|
790
785
|
fill: "none",
|
|
791
786
|
stroke: "currentColor",
|
|
792
787
|
"stroke-linecap": "round",
|
|
@@ -795,16 +790,16 @@ function cn(e, t) {
|
|
|
795
790
|
d: "M4 19h16M4 15l4-6l4 2l4-5l4 4"
|
|
796
791
|
}, null, -1)]]);
|
|
797
792
|
}
|
|
798
|
-
var
|
|
793
|
+
var tn = m({
|
|
799
794
|
name: "tabler-chart-line",
|
|
800
|
-
render:
|
|
801
|
-
}),
|
|
795
|
+
render: en
|
|
796
|
+
}), nn = {
|
|
802
797
|
viewBox: "0 0 24 24",
|
|
803
798
|
width: "1.2em",
|
|
804
799
|
height: "1.2em"
|
|
805
800
|
};
|
|
806
|
-
function
|
|
807
|
-
return S(), o("svg",
|
|
801
|
+
function rn(e, t) {
|
|
802
|
+
return S(), o("svg", nn, [...t[0] ||= [s("path", {
|
|
808
803
|
fill: "none",
|
|
809
804
|
stroke: "currentColor",
|
|
810
805
|
"stroke-linecap": "round",
|
|
@@ -813,16 +808,16 @@ function dn(e, t) {
|
|
|
813
808
|
d: "M17 7L7 17M8 7h9v9"
|
|
814
809
|
}, null, -1)]]);
|
|
815
810
|
}
|
|
816
|
-
var
|
|
811
|
+
var an = m({
|
|
817
812
|
name: "tabler-arrow-up-right",
|
|
818
|
-
render:
|
|
819
|
-
}),
|
|
813
|
+
render: rn
|
|
814
|
+
}), on = {
|
|
820
815
|
viewBox: "0 0 24 24",
|
|
821
816
|
width: "1.2em",
|
|
822
817
|
height: "1.2em"
|
|
823
818
|
};
|
|
824
|
-
function
|
|
825
|
-
return S(), o("svg",
|
|
819
|
+
function sn(e, t) {
|
|
820
|
+
return S(), o("svg", on, [...t[0] ||= [s("path", {
|
|
826
821
|
fill: "none",
|
|
827
822
|
stroke: "currentColor",
|
|
828
823
|
"stroke-linecap": "round",
|
|
@@ -831,16 +826,16 @@ function mn(e, t) {
|
|
|
831
826
|
d: "M5 12h14m-6 6l6-6m-6-6l6 6"
|
|
832
827
|
}, null, -1)]]);
|
|
833
828
|
}
|
|
834
|
-
var
|
|
829
|
+
var cn = m({
|
|
835
830
|
name: "tabler-arrow-right",
|
|
836
|
-
render:
|
|
837
|
-
}),
|
|
831
|
+
render: sn
|
|
832
|
+
}), ln = {
|
|
838
833
|
viewBox: "0 0 24 24",
|
|
839
834
|
width: "1.2em",
|
|
840
835
|
height: "1.2em"
|
|
841
836
|
};
|
|
842
|
-
function
|
|
843
|
-
return S(), o("svg",
|
|
837
|
+
function un(e, t) {
|
|
838
|
+
return S(), o("svg", ln, [...t[0] ||= [s("path", {
|
|
844
839
|
fill: "none",
|
|
845
840
|
stroke: "currentColor",
|
|
846
841
|
"stroke-linecap": "round",
|
|
@@ -849,16 +844,16 @@ function _n(e, t) {
|
|
|
849
844
|
d: "M5 12h14"
|
|
850
845
|
}, null, -1)]]);
|
|
851
846
|
}
|
|
852
|
-
var
|
|
847
|
+
var dn = m({
|
|
853
848
|
name: "tabler-minus",
|
|
854
|
-
render:
|
|
855
|
-
}),
|
|
849
|
+
render: un
|
|
850
|
+
}), fn = {
|
|
856
851
|
viewBox: "0 0 24 24",
|
|
857
852
|
width: "1.2em",
|
|
858
853
|
height: "1.2em"
|
|
859
854
|
};
|
|
860
|
-
function
|
|
861
|
-
return S(), o("svg",
|
|
855
|
+
function pn(e, t) {
|
|
856
|
+
return S(), o("svg", fn, [...t[0] ||= [s("path", {
|
|
862
857
|
fill: "none",
|
|
863
858
|
stroke: "currentColor",
|
|
864
859
|
"stroke-linecap": "round",
|
|
@@ -867,16 +862,16 @@ function bn(e, t) {
|
|
|
867
862
|
d: "M3 12v.01M7 12h10m4 0v.01"
|
|
868
863
|
}, null, -1)]]);
|
|
869
864
|
}
|
|
870
|
-
var
|
|
865
|
+
var mn = m({
|
|
871
866
|
name: "tabler-separator",
|
|
872
|
-
render:
|
|
873
|
-
}),
|
|
867
|
+
render: pn
|
|
868
|
+
}), hn = {
|
|
874
869
|
viewBox: "0 0 24 24",
|
|
875
870
|
width: "1.2em",
|
|
876
871
|
height: "1.2em"
|
|
877
872
|
};
|
|
878
|
-
function
|
|
879
|
-
return S(), o("svg",
|
|
873
|
+
function gn(e, t) {
|
|
874
|
+
return S(), o("svg", hn, [...t[0] ||= [s("path", {
|
|
880
875
|
fill: "none",
|
|
881
876
|
stroke: "currentColor",
|
|
882
877
|
"stroke-linecap": "round",
|
|
@@ -885,16 +880,16 @@ function Cn(e, t) {
|
|
|
885
880
|
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"
|
|
886
881
|
}, null, -1)]]);
|
|
887
882
|
}
|
|
888
|
-
var
|
|
883
|
+
var _n = m({
|
|
889
884
|
name: "tabler-crosshair",
|
|
890
|
-
render:
|
|
891
|
-
}),
|
|
885
|
+
render: gn
|
|
886
|
+
}), vn = {
|
|
892
887
|
viewBox: "0 0 24 24",
|
|
893
888
|
width: "1.2em",
|
|
894
889
|
height: "1.2em"
|
|
895
890
|
};
|
|
896
|
-
function
|
|
897
|
-
return S(), o("svg",
|
|
891
|
+
function yn(e, t) {
|
|
892
|
+
return S(), o("svg", vn, [...t[0] ||= [s("g", {
|
|
898
893
|
fill: "none",
|
|
899
894
|
stroke: "currentColor",
|
|
900
895
|
"stroke-linecap": "round",
|
|
@@ -902,16 +897,16 @@ function En(e, t) {
|
|
|
902
897
|
"stroke-width": "2"
|
|
903
898
|
}, [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)]]);
|
|
904
899
|
}
|
|
905
|
-
var
|
|
900
|
+
var bn = m({
|
|
906
901
|
name: "tabler-info-circle",
|
|
907
|
-
render:
|
|
908
|
-
}),
|
|
902
|
+
render: yn
|
|
903
|
+
}), xn = {
|
|
909
904
|
viewBox: "0 0 24 24",
|
|
910
905
|
width: "1.2em",
|
|
911
906
|
height: "1.2em"
|
|
912
907
|
};
|
|
913
|
-
function
|
|
914
|
-
return S(), o("svg",
|
|
908
|
+
function Sn(e, t) {
|
|
909
|
+
return S(), o("svg", xn, [...t[0] ||= [s("path", {
|
|
915
910
|
fill: "none",
|
|
916
911
|
stroke: "currentColor",
|
|
917
912
|
"stroke-linecap": "round",
|
|
@@ -920,16 +915,16 @@ function kn(e, t) {
|
|
|
920
915
|
d: "M3 10a7 7 0 1 0 14 0a7 7 0 1 0-14 0m4 0h6m-3-3v6m11 8l-6-6"
|
|
921
916
|
}, null, -1)]]);
|
|
922
917
|
}
|
|
923
|
-
var
|
|
918
|
+
var Cn = m({
|
|
924
919
|
name: "tabler-zoom-in",
|
|
925
|
-
render:
|
|
926
|
-
}),
|
|
920
|
+
render: Sn
|
|
921
|
+
}), wn = {
|
|
927
922
|
viewBox: "0 0 24 24",
|
|
928
923
|
width: "1.2em",
|
|
929
924
|
height: "1.2em"
|
|
930
925
|
};
|
|
931
|
-
function
|
|
932
|
-
return S(), o("svg",
|
|
926
|
+
function Tn(e, t) {
|
|
927
|
+
return S(), o("svg", wn, [...t[0] ||= [s("path", {
|
|
933
928
|
fill: "none",
|
|
934
929
|
stroke: "currentColor",
|
|
935
930
|
"stroke-linecap": "round",
|
|
@@ -938,16 +933,16 @@ function Mn(e, t) {
|
|
|
938
933
|
d: "M3 10a7 7 0 1 0 14 0a7 7 0 1 0-14 0m4 0h6m8 11l-6-6"
|
|
939
934
|
}, null, -1)]]);
|
|
940
935
|
}
|
|
941
|
-
var
|
|
936
|
+
var En = m({
|
|
942
937
|
name: "tabler-zoom-out",
|
|
943
|
-
render:
|
|
944
|
-
}),
|
|
938
|
+
render: Tn
|
|
939
|
+
}), Dn = {
|
|
945
940
|
viewBox: "0 0 24 24",
|
|
946
941
|
width: "1.2em",
|
|
947
942
|
height: "1.2em"
|
|
948
943
|
};
|
|
949
|
-
function
|
|
950
|
-
return S(), o("svg",
|
|
944
|
+
function On(e, t) {
|
|
945
|
+
return S(), o("svg", Dn, [...t[0] ||= [s("path", {
|
|
951
946
|
fill: "none",
|
|
952
947
|
stroke: "currentColor",
|
|
953
948
|
"stroke-linecap": "round",
|
|
@@ -956,16 +951,16 @@ function Fn(e, t) {
|
|
|
956
951
|
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"
|
|
957
952
|
}, null, -1)]]);
|
|
958
953
|
}
|
|
959
|
-
var
|
|
954
|
+
var kn = m({
|
|
960
955
|
name: "tabler-maximize",
|
|
961
|
-
render:
|
|
962
|
-
}),
|
|
956
|
+
render: On
|
|
957
|
+
}), An = {
|
|
963
958
|
viewBox: "0 0 24 24",
|
|
964
959
|
width: "1.2em",
|
|
965
960
|
height: "1.2em"
|
|
966
961
|
};
|
|
967
|
-
function
|
|
968
|
-
return S(), o("svg",
|
|
962
|
+
function jn(e, t) {
|
|
963
|
+
return S(), o("svg", An, [...t[0] ||= [s("path", {
|
|
969
964
|
fill: "none",
|
|
970
965
|
stroke: "currentColor",
|
|
971
966
|
"stroke-linecap": "round",
|
|
@@ -974,16 +969,16 @@ function Rn(e, t) {
|
|
|
974
969
|
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"
|
|
975
970
|
}, null, -1)]]);
|
|
976
971
|
}
|
|
977
|
-
var
|
|
972
|
+
var Mn = m({
|
|
978
973
|
name: "tabler-minimize",
|
|
979
|
-
render:
|
|
980
|
-
}),
|
|
974
|
+
render: jn
|
|
975
|
+
}), Nn = {
|
|
981
976
|
viewBox: "0 0 24 24",
|
|
982
977
|
width: "1.2em",
|
|
983
978
|
height: "1.2em"
|
|
984
979
|
};
|
|
985
|
-
function
|
|
986
|
-
return S(), o("svg",
|
|
980
|
+
function Pn(e, t) {
|
|
981
|
+
return S(), o("svg", Nn, [...t[0] ||= [s("g", {
|
|
987
982
|
fill: "none",
|
|
988
983
|
stroke: "currentColor",
|
|
989
984
|
"stroke-linecap": "round",
|
|
@@ -991,16 +986,16 @@ function Vn(e, t) {
|
|
|
991
986
|
"stroke-width": "2"
|
|
992
987
|
}, [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)]]);
|
|
993
988
|
}
|
|
994
|
-
var
|
|
989
|
+
var Fn = m({
|
|
995
990
|
name: "tabler-settings",
|
|
996
|
-
render:
|
|
997
|
-
}),
|
|
991
|
+
render: Pn
|
|
992
|
+
}), In = {
|
|
998
993
|
viewBox: "0 0 24 24",
|
|
999
994
|
width: "1.2em",
|
|
1000
995
|
height: "1.2em"
|
|
1001
996
|
};
|
|
1002
|
-
function
|
|
1003
|
-
return S(), o("svg",
|
|
997
|
+
function Ln(e, t) {
|
|
998
|
+
return S(), o("svg", In, [...t[0] ||= [s("path", {
|
|
1004
999
|
fill: "none",
|
|
1005
1000
|
stroke: "currentColor",
|
|
1006
1001
|
"stroke-linecap": "round",
|
|
@@ -1009,16 +1004,16 @@ function Wn(e, t) {
|
|
|
1009
1004
|
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"
|
|
1010
1005
|
}, null, -1)]]);
|
|
1011
1006
|
}
|
|
1012
|
-
var
|
|
1007
|
+
var Rn = m({
|
|
1013
1008
|
name: "tabler-shape",
|
|
1014
|
-
render:
|
|
1015
|
-
}),
|
|
1009
|
+
render: Ln
|
|
1010
|
+
}), zn = {
|
|
1016
1011
|
viewBox: "0 0 24 24",
|
|
1017
1012
|
width: "1.2em",
|
|
1018
1013
|
height: "1.2em"
|
|
1019
1014
|
};
|
|
1020
|
-
function
|
|
1021
|
-
return S(), o("svg",
|
|
1015
|
+
function Bn(e, t) {
|
|
1016
|
+
return S(), o("svg", zn, [...t[0] ||= [s("path", {
|
|
1022
1017
|
fill: "none",
|
|
1023
1018
|
stroke: "currentColor",
|
|
1024
1019
|
"stroke-linecap": "round",
|
|
@@ -1027,16 +1022,16 @@ function qn(e, t) {
|
|
|
1027
1022
|
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"
|
|
1028
1023
|
}, null, -1)]]);
|
|
1029
1024
|
}
|
|
1030
|
-
var
|
|
1025
|
+
var Vn = m({
|
|
1031
1026
|
name: "tabler-chart-dots-3",
|
|
1032
|
-
render:
|
|
1033
|
-
}),
|
|
1027
|
+
render: Bn
|
|
1028
|
+
}), Hn = {
|
|
1034
1029
|
viewBox: "0 0 24 24",
|
|
1035
1030
|
width: "1.2em",
|
|
1036
1031
|
height: "1.2em"
|
|
1037
1032
|
};
|
|
1038
|
-
function
|
|
1039
|
-
return S(), o("svg",
|
|
1033
|
+
function Un(e, t) {
|
|
1034
|
+
return S(), o("svg", Hn, [...t[0] ||= [s("path", {
|
|
1040
1035
|
fill: "none",
|
|
1041
1036
|
stroke: "currentColor",
|
|
1042
1037
|
"stroke-linecap": "round",
|
|
@@ -1045,16 +1040,16 @@ function Xn(e, t) {
|
|
|
1045
1040
|
d: "m18 10l-6-6l-6 6zm0 4l-6 6l-6-6z"
|
|
1046
1041
|
}, null, -1)]]);
|
|
1047
1042
|
}
|
|
1048
|
-
var
|
|
1043
|
+
var Wn = m({
|
|
1049
1044
|
name: "tabler-caret-up-down",
|
|
1050
|
-
render:
|
|
1051
|
-
}),
|
|
1045
|
+
render: Un
|
|
1046
|
+
}), Gn = {
|
|
1052
1047
|
viewBox: "0 0 24 24",
|
|
1053
1048
|
width: "1.2em",
|
|
1054
1049
|
height: "1.2em"
|
|
1055
1050
|
};
|
|
1056
|
-
function
|
|
1057
|
-
return S(), o("svg",
|
|
1051
|
+
function Kn(e, t) {
|
|
1052
|
+
return S(), o("svg", Gn, [...t[0] ||= [s("path", {
|
|
1058
1053
|
fill: "none",
|
|
1059
1054
|
stroke: "currentColor",
|
|
1060
1055
|
"stroke-linecap": "round",
|
|
@@ -1063,34 +1058,34 @@ function $n(e, t) {
|
|
|
1063
1058
|
d: "M8 4H5v16h3m8-16h3v16h-3"
|
|
1064
1059
|
}, null, -1)]]);
|
|
1065
1060
|
}
|
|
1066
|
-
var
|
|
1061
|
+
var qn = m({
|
|
1067
1062
|
name: "tabler-brackets",
|
|
1068
|
-
render:
|
|
1063
|
+
render: Kn
|
|
1069
1064
|
});
|
|
1070
1065
|
//#endregion
|
|
1071
1066
|
//#region src/debug/canvasProfiler.ts
|
|
1072
|
-
function
|
|
1067
|
+
function Jn() {
|
|
1073
1068
|
return Object.create(null);
|
|
1074
1069
|
}
|
|
1075
|
-
function
|
|
1070
|
+
function Yn() {
|
|
1076
1071
|
return {
|
|
1077
|
-
ctxMethods:
|
|
1078
|
-
ctxProps:
|
|
1079
|
-
canvasProps:
|
|
1072
|
+
ctxMethods: Jn(),
|
|
1073
|
+
ctxProps: Jn(),
|
|
1074
|
+
canvasProps: Jn(),
|
|
1080
1075
|
ctxMethodSources: Object.create(null)
|
|
1081
1076
|
};
|
|
1082
1077
|
}
|
|
1083
|
-
function
|
|
1078
|
+
function Xn(e, t, n) {
|
|
1084
1079
|
let r = e[t] ??= {
|
|
1085
1080
|
count: 0,
|
|
1086
1081
|
totalTime: 0
|
|
1087
1082
|
};
|
|
1088
1083
|
r.count += 1, r.totalTime += n;
|
|
1089
1084
|
}
|
|
1090
|
-
function
|
|
1091
|
-
|
|
1085
|
+
function Zn(e, t, n, r) {
|
|
1086
|
+
Xn(e.ctxMethodSources[t] ??= Jn(), n, r);
|
|
1092
1087
|
}
|
|
1093
|
-
function
|
|
1088
|
+
function Qn(e) {
|
|
1094
1089
|
return Object.entries(e).filter(([, e]) => e.count > 0).map(([e, t]) => ({
|
|
1095
1090
|
name: e,
|
|
1096
1091
|
count: t.count,
|
|
@@ -1098,12 +1093,12 @@ function ar(e) {
|
|
|
1098
1093
|
averageTime: (t.totalTime / t.count).toFixed(4)
|
|
1099
1094
|
})).sort((e, t) => Number(t.totalTime) - Number(e.totalTime));
|
|
1100
1095
|
}
|
|
1101
|
-
var
|
|
1102
|
-
function
|
|
1103
|
-
|
|
1096
|
+
var $n = !1, er = /* @__PURE__ */ new Map(), tr = /* @__PURE__ */ new Map();
|
|
1097
|
+
function nr(e) {
|
|
1098
|
+
$n = e, e ? typeof window < "u" && !window.__KMAP_CANVAS_PROFILER_INSTALLED__ && ar() : or();
|
|
1104
1099
|
}
|
|
1105
|
-
function
|
|
1106
|
-
if (
|
|
1100
|
+
function rr() {
|
|
1101
|
+
if (!$n) return "disabled";
|
|
1107
1102
|
let e = (/* @__PURE__ */ Error()).stack;
|
|
1108
1103
|
if (!e) return "unknown";
|
|
1109
1104
|
let t = e.split("\n").map((e) => e.trim()).filter(Boolean);
|
|
@@ -1118,91 +1113,91 @@ function ur() {
|
|
|
1118
1113
|
}
|
|
1119
1114
|
function Q(e, t, n, r) {
|
|
1120
1115
|
let i = `${e.constructor?.name ?? "proto"}:${t}`;
|
|
1121
|
-
if (
|
|
1116
|
+
if (er.has(i)) return;
|
|
1122
1117
|
let a = Reflect.get(e, t);
|
|
1123
|
-
typeof a == "function" && (
|
|
1124
|
-
if (
|
|
1125
|
-
let i = r?.captureSource ?
|
|
1126
|
-
return
|
|
1118
|
+
typeof a == "function" && (er.set(i, a), Reflect.set(e, t, function(...e) {
|
|
1119
|
+
if (!$n) return a.apply(this, e);
|
|
1120
|
+
let i = r?.captureSource ? rr() : null, o = performance.now(), s = a.apply(this, e), c = performance.now() - o;
|
|
1121
|
+
return Xn(n.ctxMethods, t, c), i && Zn(n, t, i, c), s;
|
|
1127
1122
|
}));
|
|
1128
1123
|
}
|
|
1129
|
-
function
|
|
1124
|
+
function ir(e, t, n) {
|
|
1130
1125
|
let r = Object.getOwnPropertyDescriptor(e, t);
|
|
1131
1126
|
if (!r?.set || !r.configurable) return;
|
|
1132
1127
|
let i = `${e.constructor?.name ?? "proto"}:${t}`;
|
|
1133
|
-
|
|
1128
|
+
tr.has(i) || (tr.set(i, r), Object.defineProperty(e, t, {
|
|
1134
1129
|
configurable: !0,
|
|
1135
1130
|
enumerable: r.enumerable ?? !1,
|
|
1136
1131
|
get: r.get,
|
|
1137
1132
|
set(e) {
|
|
1138
|
-
if (
|
|
1133
|
+
if (!$n) {
|
|
1139
1134
|
r.set.call(this, e);
|
|
1140
1135
|
return;
|
|
1141
1136
|
}
|
|
1142
1137
|
let i = performance.now();
|
|
1143
|
-
r.set.call(this, e),
|
|
1138
|
+
r.set.call(this, e), Xn(n, t, performance.now() - i);
|
|
1144
1139
|
}
|
|
1145
1140
|
}));
|
|
1146
1141
|
}
|
|
1147
|
-
function
|
|
1142
|
+
function ar() {
|
|
1148
1143
|
if (typeof window > "u" || window.__KMAP_CANVAS_PROFILER_INSTALLED__) return;
|
|
1149
1144
|
let e = CanvasRenderingContext2D?.prototype, t = HTMLCanvasElement?.prototype;
|
|
1150
1145
|
if (!e || !t) return;
|
|
1151
|
-
let n =
|
|
1152
|
-
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),
|
|
1146
|
+
let n = Yn();
|
|
1147
|
+
Q(e, "fillText", n, { captureSource: !0 }), Q(e, "measureText", n, { captureSource: !0 }), Q(e, "drawImage", n), Q(e, "save", n), Q(e, "restore", n), Q(e, "clip", n), Q(e, "setTransform", n), Q(e, "scale", n), ir(e, "font", n.ctxProps), ir(e, "filter", n.ctxProps), ir(e, "shadowBlur", n.ctxProps), ir(e, "lineWidth", n.ctxProps), ir(t, "width", n.canvasProps), ir(t, "height", n.canvasProps), window.__KMAP_CANVAS_PROFILER_METRICS__ = n, window.__KMAP_CANVAS_PROFILER_INSTALLED__ = !0, window.showCanvasReport = () => {
|
|
1153
1148
|
let e = window.__KMAP_CANVAS_PROFILER_METRICS__;
|
|
1154
1149
|
if (e) {
|
|
1155
|
-
console.group("[kmap] Canvas profiler report"), console.log("ctx methods"), console.table(
|
|
1150
|
+
console.group("[kmap] Canvas profiler report"), console.log("ctx methods"), console.table(Qn(e.ctxMethods)), console.log("ctx props"), console.table(Qn(e.ctxProps)), console.log("canvas props"), console.table(Qn(e.canvasProps));
|
|
1156
1151
|
for (let t of ["fillText", "measureText"]) {
|
|
1157
1152
|
let n = e.ctxMethodSources[t];
|
|
1158
|
-
n && (console.log(`${t} sources`), console.table(
|
|
1153
|
+
n && (console.log(`${t} sources`), console.table(Qn(n).slice(0, 20)));
|
|
1159
1154
|
}
|
|
1160
1155
|
console.groupEnd();
|
|
1161
1156
|
}
|
|
1162
1157
|
}, window.resetCanvasReport = () => {
|
|
1163
|
-
window.__KMAP_CANVAS_PROFILER_METRICS__ =
|
|
1158
|
+
window.__KMAP_CANVAS_PROFILER_METRICS__ = Yn();
|
|
1164
1159
|
}, console.info("[kmap] Canvas profiler enabled. Use window.showCanvasReport() and window.resetCanvasReport().");
|
|
1165
1160
|
}
|
|
1166
|
-
function
|
|
1161
|
+
function or() {
|
|
1167
1162
|
if (typeof window > "u" || !window.__KMAP_CANVAS_PROFILER_INSTALLED__) return;
|
|
1168
1163
|
let e = CanvasRenderingContext2D?.prototype, t = HTMLCanvasElement?.prototype;
|
|
1169
|
-
|
|
1164
|
+
er.forEach((n, r) => {
|
|
1170
1165
|
let i = r.match(/^(.+):(.+)$/);
|
|
1171
1166
|
if (!i) return;
|
|
1172
1167
|
let [, a, o] = i, s = null;
|
|
1173
1168
|
a === "CanvasRenderingContext2D" ? s = e : a === "HTMLCanvasElement" && (s = t), s && Reflect.set(s, o, n);
|
|
1174
|
-
}),
|
|
1169
|
+
}), er.clear(), tr.forEach((n, r) => {
|
|
1175
1170
|
let i = r.match(/^(.+):(.+)$/);
|
|
1176
1171
|
if (!i) return;
|
|
1177
1172
|
let [, a, o] = i, s = null;
|
|
1178
1173
|
a === "CanvasRenderingContext2D" ? s = e : a === "HTMLCanvasElement" && (s = t), s && n.configurable && Object.defineProperty(s, o, n);
|
|
1179
|
-
}),
|
|
1174
|
+
}), tr.clear(), window.__KMAP_CANVAS_PROFILER_INSTALLED__ = !1, window.__KMAP_CANVAS_PROFILER_METRICS__ = void 0, window.showCanvasReport = void 0, window.resetCanvasReport = void 0, console.info("[kmap] Canvas profiler disabled.");
|
|
1180
1175
|
}
|
|
1181
1176
|
//#endregion
|
|
1182
1177
|
//#region src/components/ChartSettingsDialog.vue?vue&type=script&setup=true&lang.ts
|
|
1183
|
-
var
|
|
1178
|
+
var sr = { class: "settings-body" }, cr = { class: "settings-label" }, lr = ["onUpdate:modelValue"], ur = { class: "settings-label" }, dr = ["onUpdate:modelValue"], fr = { class: "settings-header" }, pr = { class: "header-right" }, mr = { class: "settings-body" }, hr = /*#__PURE__*/ W(/* @__PURE__ */ u({
|
|
1184
1179
|
__name: "ChartSettingsDialog",
|
|
1185
1180
|
props: { show: { type: Boolean } },
|
|
1186
1181
|
emits: ["close", "confirm"],
|
|
1187
1182
|
setup(u, { emit: d }) {
|
|
1188
|
-
let f = u, p = d, m =
|
|
1183
|
+
let f = u, p = d, m = Ae(), h = r(() => V.filter((e) => e.group === "main")), g = r(() => V.filter((e) => e.group === "experimental")), _ = w(!1);
|
|
1189
1184
|
function v() {
|
|
1190
1185
|
try {
|
|
1191
|
-
let e = localStorage.getItem(
|
|
1186
|
+
let e = localStorage.getItem(H);
|
|
1192
1187
|
if (e) {
|
|
1193
1188
|
let t = JSON.parse(e), n = {};
|
|
1194
|
-
return
|
|
1189
|
+
return V.forEach((e) => {
|
|
1195
1190
|
n[e.key] = t[e.key] ?? e.default;
|
|
1196
|
-
}), n.colorPresetSettings =
|
|
1191
|
+
}), n.colorPresetSettings = z(t.colorPresetSettings), n;
|
|
1197
1192
|
}
|
|
1198
1193
|
} catch {}
|
|
1199
1194
|
let e = {};
|
|
1200
|
-
return
|
|
1195
|
+
return V.forEach((t) => {
|
|
1201
1196
|
e[t.key] = t.default;
|
|
1202
1197
|
}), e.colorPresetSettings = {}, e;
|
|
1203
1198
|
}
|
|
1204
1199
|
let y = w(v());
|
|
1205
|
-
|
|
1200
|
+
j(() => f.show, (e) => {
|
|
1206
1201
|
e && (y.value = v());
|
|
1207
1202
|
});
|
|
1208
1203
|
function b() {
|
|
@@ -1210,7 +1205,7 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
|
|
|
1210
1205
|
}
|
|
1211
1206
|
function x() {
|
|
1212
1207
|
let e = {};
|
|
1213
|
-
|
|
1208
|
+
V.forEach((t) => {
|
|
1214
1209
|
e[t.key] = t.default;
|
|
1215
1210
|
}), e.colorPresetSettings = {}, y.value = e;
|
|
1216
1211
|
}
|
|
@@ -1218,12 +1213,12 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
|
|
|
1218
1213
|
p("confirm", { ...y.value });
|
|
1219
1214
|
}
|
|
1220
1215
|
return (r, d) => (S(), i(t, { to: k(m) }, [l(n, { name: "overlay" }, {
|
|
1221
|
-
default:
|
|
1216
|
+
default: M(() => [u.show ? (S(), o("div", {
|
|
1222
1217
|
key: 0,
|
|
1223
1218
|
class: "settings-overlay",
|
|
1224
1219
|
onClick: b
|
|
1225
1220
|
}, [l(n, { name: "modal" }, {
|
|
1226
|
-
default:
|
|
1221
|
+
default: M(() => [s("div", {
|
|
1227
1222
|
class: "settings-modal",
|
|
1228
1223
|
onClick: d[1] ||= F(() => {}, ["stop"])
|
|
1229
1224
|
}, [
|
|
@@ -1236,23 +1231,27 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
|
|
|
1236
1231
|
stroke: "currentColor",
|
|
1237
1232
|
"stroke-width": "2"
|
|
1238
1233
|
}, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])])]),
|
|
1239
|
-
s("div",
|
|
1240
|
-
h.value.length > 0 ? (S(), o(e, { key: 0 }, [d[8] ||= s("div", { class: "settings-section-divider" }, [s("span", { class: "settings-section-label" }, "主图设置")], -1), (S(!0), o(e, null, T(h.value, (
|
|
1241
|
-
key:
|
|
1234
|
+
s("div", sr, [
|
|
1235
|
+
h.value.length > 0 ? (S(), o(e, { key: 0 }, [d[8] ||= s("div", { class: "settings-section-divider" }, [s("span", { class: "settings-section-label" }, "主图设置")], -1), (S(!0), o(e, null, T(h.value, (e) => (S(), o("div", {
|
|
1236
|
+
key: e.key,
|
|
1242
1237
|
class: "settings-item"
|
|
1243
|
-
}, [s("label",
|
|
1238
|
+
}, [s("label", cr, [s("span", null, O(e.label), 1), e.type === "boolean" ? N((S(), o("input", {
|
|
1244
1239
|
key: 0,
|
|
1245
1240
|
type: "checkbox",
|
|
1246
1241
|
class: "settings-checkbox",
|
|
1247
|
-
"onUpdate:modelValue": (
|
|
1248
|
-
}, null, 8,
|
|
1242
|
+
"onUpdate:modelValue": (t) => y.value[e.key] = t
|
|
1243
|
+
}, null, 8, lr)), [[A, y.value[e.key]]]) : e.type === "select" && e.options ? (S(), i(J, {
|
|
1249
1244
|
key: 1,
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
},
|
|
1245
|
+
"model-value": String(y.value[e.key]),
|
|
1246
|
+
options: e.options,
|
|
1247
|
+
size: "sm",
|
|
1248
|
+
"min-width": "100px",
|
|
1249
|
+
"onUpdate:modelValue": (t) => y.value[e.key] = t
|
|
1250
|
+
}, null, 8, [
|
|
1251
|
+
"model-value",
|
|
1252
|
+
"options",
|
|
1253
|
+
"onUpdate:modelValue"
|
|
1254
|
+
])) : a("", !0)])]))), 128))], 64)) : a("", !0),
|
|
1256
1255
|
d[11] ||= s("div", { class: "settings-section-divider" }, [s("span", { class: "settings-section-label" }, "样式 / 颜色")], -1),
|
|
1257
1256
|
s("div", {
|
|
1258
1257
|
class: "settings-item nav-item",
|
|
@@ -1266,22 +1265,26 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
|
|
|
1266
1265
|
height: "16",
|
|
1267
1266
|
class: "nav-arrow"
|
|
1268
1267
|
}, [s("path", { d: "M9 18l6-6-6-6" })])], -1)]]),
|
|
1269
|
-
g.value.length > 0 ? (S(), o(e, { key: 1 }, [d[10] ||= s("div", { class: "settings-section-divider" }, [s("span", { class: "settings-section-label" }, "实验性 / 调试设置")], -1), (S(!0), o(e, null, T(g.value, (
|
|
1270
|
-
key:
|
|
1268
|
+
g.value.length > 0 ? (S(), o(e, { key: 1 }, [d[10] ||= s("div", { class: "settings-section-divider" }, [s("span", { class: "settings-section-label" }, "实验性 / 调试设置")], -1), (S(!0), o(e, null, T(g.value, (e) => (S(), o("div", {
|
|
1269
|
+
key: e.key,
|
|
1271
1270
|
class: "settings-item experimental"
|
|
1272
|
-
}, [s("label",
|
|
1271
|
+
}, [s("label", ur, [s("span", null, O(e.label), 1), e.type === "boolean" ? N((S(), o("input", {
|
|
1273
1272
|
key: 0,
|
|
1274
1273
|
type: "checkbox",
|
|
1275
1274
|
class: "settings-checkbox",
|
|
1276
|
-
"onUpdate:modelValue": (
|
|
1277
|
-
}, null, 8,
|
|
1275
|
+
"onUpdate:modelValue": (t) => y.value[e.key] = t
|
|
1276
|
+
}, null, 8, dr)), [[A, y.value[e.key]]]) : e.type === "select" && e.options ? (S(), i(J, {
|
|
1278
1277
|
key: 1,
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
},
|
|
1278
|
+
"model-value": String(y.value[e.key]),
|
|
1279
|
+
options: e.options,
|
|
1280
|
+
size: "sm",
|
|
1281
|
+
"min-width": "100px",
|
|
1282
|
+
"onUpdate:modelValue": (t) => y.value[e.key] = t
|
|
1283
|
+
}, null, 8, [
|
|
1284
|
+
"model-value",
|
|
1285
|
+
"options",
|
|
1286
|
+
"onUpdate:modelValue"
|
|
1287
|
+
])) : a("", !0)])]))), 128))], 64)) : a("", !0)
|
|
1285
1288
|
]),
|
|
1286
1289
|
s("div", { class: "settings-footer" }, [s("button", {
|
|
1287
1290
|
class: "settings-btn reset",
|
|
@@ -1308,15 +1311,15 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
|
|
|
1308
1311
|
})])) : a("", !0)]),
|
|
1309
1312
|
_: 1
|
|
1310
1313
|
}), l(n, { name: "overlay" }, {
|
|
1311
|
-
default:
|
|
1314
|
+
default: M(() => [_.value ? (S(), o("div", {
|
|
1312
1315
|
key: 0,
|
|
1313
1316
|
class: "settings-overlay nested-overlay",
|
|
1314
1317
|
onClick: d[5] ||= (e) => _.value = !1
|
|
1315
1318
|
}, [l(n, { name: "modal" }, {
|
|
1316
|
-
default:
|
|
1319
|
+
default: M(() => [s("div", {
|
|
1317
1320
|
class: "settings-modal",
|
|
1318
1321
|
onClick: d[4] ||= F(() => {}, ["stop"])
|
|
1319
|
-
}, [s("div",
|
|
1322
|
+
}, [s("div", fr, [d[15] ||= s("div", { class: "header-left" }, [s("span", { class: "settings-title" }, "颜色预设"), s("span", { class: "settings-subtitle" }, "自定义图表颜色")], -1), s("div", pr, [s("button", {
|
|
1320
1323
|
class: "settings-close",
|
|
1321
1324
|
onClick: d[2] ||= (e) => _.value = !1
|
|
1322
1325
|
}, [...d[14] ||= [s("svg", {
|
|
@@ -1324,7 +1327,7 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
|
|
|
1324
1327
|
fill: "none",
|
|
1325
1328
|
stroke: "currentColor",
|
|
1326
1329
|
"stroke-width": "2"
|
|
1327
|
-
}, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])])]), s("div",
|
|
1330
|
+
}, [s("path", { d: "M18 6L6 18M6 6l12 12" })], -1)]])])]), s("div", mr, [l(xe, {
|
|
1328
1331
|
"color-preset-settings": y.value.colorPresetSettings,
|
|
1329
1332
|
"onUpdate:colorPresetSettings": d[3] ||= (e) => y.value = {
|
|
1330
1333
|
...y.value,
|
|
@@ -1336,18 +1339,18 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
|
|
|
1336
1339
|
_: 1
|
|
1337
1340
|
})], 8, ["to"]));
|
|
1338
1341
|
}
|
|
1339
|
-
}), [["__scopeId", "data-v-
|
|
1342
|
+
}), [["__scopeId", "data-v-7a3fb961"]]), gr = {
|
|
1340
1343
|
class: "left-toolbar",
|
|
1341
1344
|
"aria-label": "图表工具栏"
|
|
1342
|
-
},
|
|
1345
|
+
}, _r = { class: "left-toolbar__group" }, vr = [
|
|
1343
1346
|
"title",
|
|
1344
1347
|
"aria-label",
|
|
1345
1348
|
"onClick"
|
|
1346
|
-
],
|
|
1349
|
+
], yr = ["onClick"], br = [
|
|
1347
1350
|
"title",
|
|
1348
1351
|
"aria-label",
|
|
1349
1352
|
"onClick"
|
|
1350
|
-
],
|
|
1353
|
+
], xr = { class: "left-toolbar__group" }, Sr = { class: "left-toolbar__group" }, Cr = ["title", "aria-label"], wr = { class: "left-toolbar__group" }, Tr = /*#__PURE__*/ W(/* @__PURE__ */ u({
|
|
1351
1354
|
__name: "LeftToolbar",
|
|
1352
1355
|
props: { isFullscreen: { type: Boolean } },
|
|
1353
1356
|
emits: [
|
|
@@ -1362,96 +1365,96 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
|
|
|
1362
1365
|
{
|
|
1363
1366
|
id: "cursor",
|
|
1364
1367
|
title: "光标",
|
|
1365
|
-
icon:
|
|
1368
|
+
icon: Qt
|
|
1366
1369
|
},
|
|
1367
1370
|
{
|
|
1368
1371
|
id: "lines",
|
|
1369
1372
|
title: "线条",
|
|
1370
|
-
icon:
|
|
1373
|
+
icon: tn,
|
|
1371
1374
|
children: [
|
|
1372
1375
|
{
|
|
1373
1376
|
id: "trend-line",
|
|
1374
1377
|
title: "线段",
|
|
1375
|
-
icon:
|
|
1378
|
+
icon: tn
|
|
1376
1379
|
},
|
|
1377
1380
|
{
|
|
1378
1381
|
id: "ray",
|
|
1379
1382
|
title: "射线",
|
|
1380
|
-
icon:
|
|
1383
|
+
icon: an
|
|
1381
1384
|
},
|
|
1382
1385
|
{
|
|
1383
1386
|
id: "h-line",
|
|
1384
1387
|
title: "水平线",
|
|
1385
|
-
icon:
|
|
1388
|
+
icon: dn
|
|
1386
1389
|
},
|
|
1387
1390
|
{
|
|
1388
1391
|
id: "h-ray",
|
|
1389
1392
|
title: "水平射线",
|
|
1390
|
-
icon:
|
|
1393
|
+
icon: cn
|
|
1391
1394
|
},
|
|
1392
1395
|
{
|
|
1393
1396
|
id: "v-line",
|
|
1394
1397
|
title: "垂直线",
|
|
1395
|
-
icon:
|
|
1398
|
+
icon: mn
|
|
1396
1399
|
},
|
|
1397
1400
|
{
|
|
1398
1401
|
id: "crosshair-line",
|
|
1399
1402
|
title: "十字线",
|
|
1400
|
-
icon:
|
|
1403
|
+
icon: _n
|
|
1401
1404
|
},
|
|
1402
1405
|
{
|
|
1403
1406
|
id: "info-line",
|
|
1404
1407
|
title: "信息线",
|
|
1405
|
-
icon:
|
|
1408
|
+
icon: bn
|
|
1406
1409
|
}
|
|
1407
1410
|
]
|
|
1408
1411
|
},
|
|
1409
1412
|
{
|
|
1410
1413
|
id: "channels",
|
|
1411
1414
|
title: "通道",
|
|
1412
|
-
icon:
|
|
1415
|
+
icon: Rn,
|
|
1413
1416
|
children: [
|
|
1414
1417
|
{
|
|
1415
1418
|
id: "parallel-channel",
|
|
1416
1419
|
title: "平行通道",
|
|
1417
|
-
icon:
|
|
1420
|
+
icon: Rn
|
|
1418
1421
|
},
|
|
1419
1422
|
{
|
|
1420
1423
|
id: "regression-channel",
|
|
1421
1424
|
title: "回归趋势",
|
|
1422
|
-
icon:
|
|
1425
|
+
icon: Vn
|
|
1423
1426
|
},
|
|
1424
1427
|
{
|
|
1425
1428
|
id: "flat-line",
|
|
1426
1429
|
title: "平滑顶底",
|
|
1427
|
-
icon:
|
|
1430
|
+
icon: Wn
|
|
1428
1431
|
},
|
|
1429
1432
|
{
|
|
1430
1433
|
id: "disjoint-channel",
|
|
1431
1434
|
title: "不相交通道",
|
|
1432
|
-
icon:
|
|
1435
|
+
icon: qn
|
|
1433
1436
|
}
|
|
1434
1437
|
]
|
|
1435
1438
|
}
|
|
1436
1439
|
], d = c, f = w("cursor"), p = w(null), m = w(!1);
|
|
1437
1440
|
function h() {
|
|
1438
1441
|
try {
|
|
1439
|
-
let e = localStorage.getItem(
|
|
1442
|
+
let e = localStorage.getItem(H);
|
|
1440
1443
|
if (e) {
|
|
1441
1444
|
let t = JSON.parse(e), n = { ...t };
|
|
1442
|
-
return
|
|
1445
|
+
return V.forEach((e) => {
|
|
1443
1446
|
n[e.key] = t[e.key] ?? e.default;
|
|
1444
1447
|
}), n;
|
|
1445
1448
|
}
|
|
1446
1449
|
} catch {}
|
|
1447
1450
|
let e = {};
|
|
1448
|
-
return
|
|
1451
|
+
return V.forEach((t) => {
|
|
1449
1452
|
e[t.key] = t.default;
|
|
1450
1453
|
}), e;
|
|
1451
1454
|
}
|
|
1452
1455
|
function _(e) {
|
|
1453
1456
|
try {
|
|
1454
|
-
localStorage.setItem(
|
|
1457
|
+
localStorage.setItem(H, JSON.stringify(e));
|
|
1455
1458
|
} catch {}
|
|
1456
1459
|
}
|
|
1457
1460
|
let v = w(h());
|
|
@@ -1482,18 +1485,18 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
|
|
|
1482
1485
|
return { ...v.value };
|
|
1483
1486
|
}
|
|
1484
1487
|
r({ getSettings: j });
|
|
1485
|
-
function
|
|
1486
|
-
v.value = { ...e }, _(v.value),
|
|
1488
|
+
function N(e) {
|
|
1489
|
+
v.value = { ...e }, _(v.value), nr(!!v.value.enableCanvasProfiler), d("settingsChange", { ...v.value }), m.value = !1;
|
|
1487
1490
|
}
|
|
1488
1491
|
function P(e) {
|
|
1489
1492
|
e.target.closest(".tool-item") || (p.value = null);
|
|
1490
1493
|
}
|
|
1491
1494
|
return y(() => {
|
|
1492
|
-
document.addEventListener("click", P, !0), d("settingsChange", { ...v.value }),
|
|
1495
|
+
document.addEventListener("click", P, !0), d("settingsChange", { ...v.value }), nr(!!v.value.enableCanvasProfiler);
|
|
1493
1496
|
}), x(() => {
|
|
1494
1497
|
document.removeEventListener("click", P, !0);
|
|
1495
|
-
}), (r, c) => (S(), o(e, null, [s("nav",
|
|
1496
|
-
s("div",
|
|
1498
|
+
}), (r, c) => (S(), o(e, null, [s("nav", gr, [
|
|
1499
|
+
s("div", _r, [(S(), o(e, null, T(u, (t) => s("div", {
|
|
1497
1500
|
key: t.id,
|
|
1498
1501
|
class: "tool-item"
|
|
1499
1502
|
}, [s("button", {
|
|
@@ -1513,8 +1516,8 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
|
|
|
1513
1516
|
class: g(["corner-indicator", { open: p.value === t.id }]),
|
|
1514
1517
|
onClick: F((e) => O(t.id), ["stop"]),
|
|
1515
1518
|
"aria-label": "展开子菜单"
|
|
1516
|
-
}, null, 10,
|
|
1517
|
-
default:
|
|
1519
|
+
}, null, 10, yr)) : a("", !0)], 42, vr), l(n, { name: "dropdown" }, {
|
|
1520
|
+
default: M(() => [p.value === t.id && t.children && t.children.length ? (S(), o("div", {
|
|
1518
1521
|
key: 0,
|
|
1519
1522
|
class: "tool-dropdown",
|
|
1520
1523
|
onPointerdown: c[3] ||= F(() => {}, ["stop"]),
|
|
@@ -1530,11 +1533,11 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
|
|
|
1530
1533
|
}, [(S(), i(E(e.icon), {
|
|
1531
1534
|
class: "tool-icon",
|
|
1532
1535
|
"aria-hidden": "true"
|
|
1533
|
-
}))], 10,
|
|
1536
|
+
}))], 10, br))), 128))], 32)) : a("", !0)]),
|
|
1534
1537
|
_: 2
|
|
1535
1538
|
}, 1024)])), 64))]),
|
|
1536
1539
|
c[22] ||= s("span", { class: "left-toolbar__divider" }, null, -1),
|
|
1537
|
-
s("div",
|
|
1540
|
+
s("div", xr, [s("button", {
|
|
1538
1541
|
type: "button",
|
|
1539
1542
|
class: "left-toolbar__button",
|
|
1540
1543
|
title: "放大",
|
|
@@ -1543,7 +1546,7 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
|
|
|
1543
1546
|
onPointerdown: c[7] ||= F(() => {}, ["stop"]),
|
|
1544
1547
|
onPointermove: c[8] ||= F(() => {}, ["stop"]),
|
|
1545
1548
|
onPointerup: c[9] ||= F(() => {}, ["stop"])
|
|
1546
|
-
}, [l(k(
|
|
1549
|
+
}, [l(k(Cn), {
|
|
1547
1550
|
class: "tool-icon",
|
|
1548
1551
|
"aria-hidden": "true"
|
|
1549
1552
|
})], 32), s("button", {
|
|
@@ -1555,12 +1558,12 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
|
|
|
1555
1558
|
onPointerdown: c[11] ||= F(() => {}, ["stop"]),
|
|
1556
1559
|
onPointermove: c[12] ||= F(() => {}, ["stop"]),
|
|
1557
1560
|
onPointerup: c[13] ||= F(() => {}, ["stop"])
|
|
1558
|
-
}, [l(k(
|
|
1561
|
+
}, [l(k(En), {
|
|
1559
1562
|
class: "tool-icon",
|
|
1560
1563
|
"aria-hidden": "true"
|
|
1561
1564
|
})], 32)]),
|
|
1562
1565
|
c[23] ||= s("span", { class: "left-toolbar__divider" }, null, -1),
|
|
1563
|
-
s("div",
|
|
1566
|
+
s("div", Sr, [s("button", {
|
|
1564
1567
|
type: "button",
|
|
1565
1568
|
class: "left-toolbar__button",
|
|
1566
1569
|
title: t.isFullscreen ? "退出全屏" : "全屏显示",
|
|
@@ -1569,17 +1572,17 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
|
|
|
1569
1572
|
onPointerdown: c[15] ||= F(() => {}, ["stop"]),
|
|
1570
1573
|
onPointermove: c[16] ||= F(() => {}, ["stop"]),
|
|
1571
1574
|
onPointerup: c[17] ||= F(() => {}, ["stop"])
|
|
1572
|
-
}, [t.isFullscreen ? (S(), i(k(
|
|
1575
|
+
}, [t.isFullscreen ? (S(), i(k(Mn), {
|
|
1573
1576
|
key: 0,
|
|
1574
1577
|
class: "tool-icon",
|
|
1575
1578
|
"aria-hidden": "true"
|
|
1576
|
-
})) : (S(), i(k(
|
|
1579
|
+
})) : (S(), i(k(kn), {
|
|
1577
1580
|
key: 1,
|
|
1578
1581
|
class: "tool-icon",
|
|
1579
1582
|
"aria-hidden": "true"
|
|
1580
|
-
}))], 40,
|
|
1583
|
+
}))], 40, Cr)]),
|
|
1581
1584
|
c[24] ||= s("span", { class: "left-toolbar__divider" }, null, -1),
|
|
1582
|
-
s("div",
|
|
1585
|
+
s("div", wr, [s("button", {
|
|
1583
1586
|
type: "button",
|
|
1584
1587
|
class: "left-toolbar__button",
|
|
1585
1588
|
title: "设置",
|
|
@@ -1588,26 +1591,124 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
|
|
|
1588
1591
|
onPointerdown: c[18] ||= F(() => {}, ["stop"]),
|
|
1589
1592
|
onPointermove: c[19] ||= F(() => {}, ["stop"]),
|
|
1590
1593
|
onPointerup: c[20] ||= F(() => {}, ["stop"])
|
|
1591
|
-
}, [l(k(
|
|
1594
|
+
}, [l(k(Fn), {
|
|
1592
1595
|
class: "tool-icon",
|
|
1593
1596
|
"aria-hidden": "true"
|
|
1594
1597
|
})], 32)])
|
|
1595
|
-
]), l(
|
|
1598
|
+
]), l(hr, {
|
|
1596
1599
|
show: m.value,
|
|
1597
1600
|
onClose: c[21] ||= (e) => m.value = !1,
|
|
1598
|
-
onConfirm:
|
|
1601
|
+
onConfirm: N
|
|
1599
1602
|
}, null, 8, ["show"])], 64));
|
|
1600
1603
|
}
|
|
1601
|
-
}), [["__scopeId", "data-v-
|
|
1604
|
+
}), [["__scopeId", "data-v-66411b58"]]), Er = /* @__PURE__ */ u({
|
|
1605
|
+
__name: "KLineLevelDropdown",
|
|
1606
|
+
props: { modelValue: {} },
|
|
1607
|
+
emits: ["update:modelValue"],
|
|
1608
|
+
setup(e, { emit: t }) {
|
|
1609
|
+
let n = [
|
|
1610
|
+
{
|
|
1611
|
+
label: "1min",
|
|
1612
|
+
value: "1min"
|
|
1613
|
+
},
|
|
1614
|
+
{
|
|
1615
|
+
label: "5min",
|
|
1616
|
+
value: "5min"
|
|
1617
|
+
},
|
|
1618
|
+
{
|
|
1619
|
+
label: "15min",
|
|
1620
|
+
value: "15min"
|
|
1621
|
+
},
|
|
1622
|
+
{
|
|
1623
|
+
label: "30min",
|
|
1624
|
+
value: "30min"
|
|
1625
|
+
},
|
|
1626
|
+
{
|
|
1627
|
+
label: "1小时",
|
|
1628
|
+
value: "60min"
|
|
1629
|
+
},
|
|
1630
|
+
{
|
|
1631
|
+
label: "1周",
|
|
1632
|
+
value: "weekly"
|
|
1633
|
+
},
|
|
1634
|
+
{
|
|
1635
|
+
label: "1月",
|
|
1636
|
+
value: "monthly"
|
|
1637
|
+
},
|
|
1638
|
+
{
|
|
1639
|
+
label: "3月",
|
|
1640
|
+
value: "quarterly"
|
|
1641
|
+
},
|
|
1642
|
+
{
|
|
1643
|
+
label: "12月",
|
|
1644
|
+
value: "yearly"
|
|
1645
|
+
}
|
|
1646
|
+
], r = t;
|
|
1647
|
+
return (t, a) => (S(), i(J, {
|
|
1648
|
+
"model-value": e.modelValue,
|
|
1649
|
+
options: n,
|
|
1650
|
+
label: "级别",
|
|
1651
|
+
title: "K线级别",
|
|
1652
|
+
size: "md",
|
|
1653
|
+
"onUpdate:modelValue": a[0] ||= (e) => r("update:modelValue", e)
|
|
1654
|
+
}, null, 8, ["model-value"]));
|
|
1655
|
+
}
|
|
1656
|
+
}), Dr = { class: "top-toolbar" }, Or = ["title"], kr = { class: "symbol-chip__code" }, Ar = /*#__PURE__*/ W(/* @__PURE__ */ u({
|
|
1657
|
+
__name: "TopToolbar",
|
|
1658
|
+
props: {
|
|
1659
|
+
symbol: {},
|
|
1660
|
+
kLineLevel: {}
|
|
1661
|
+
},
|
|
1662
|
+
emits: [
|
|
1663
|
+
"addOverlaySymbol",
|
|
1664
|
+
"kLineLevelChange",
|
|
1665
|
+
"toggleIndicator"
|
|
1666
|
+
],
|
|
1667
|
+
setup(e, { emit: t }) {
|
|
1668
|
+
let n = e, i = t, c = r(() => n.symbol?.trim() ?? "");
|
|
1669
|
+
return (t, n) => (S(), o("div", Dr, [
|
|
1670
|
+
c.value ? (S(), o("button", {
|
|
1671
|
+
key: 0,
|
|
1672
|
+
type: "button",
|
|
1673
|
+
class: "symbol-chip",
|
|
1674
|
+
title: c.value
|
|
1675
|
+
}, [s("span", kr, O(c.value), 1)], 8, Or)) : a("", !0),
|
|
1676
|
+
s("button", {
|
|
1677
|
+
type: "button",
|
|
1678
|
+
class: "overlay-symbol-button",
|
|
1679
|
+
title: "添加叠加商品",
|
|
1680
|
+
"aria-label": "添加叠加商品",
|
|
1681
|
+
onClick: n[0] ||= (e) => i("addOverlaySymbol")
|
|
1682
|
+
}, [...n[3] ||= [s("span", {
|
|
1683
|
+
class: "overlay-symbol-button__icon",
|
|
1684
|
+
"aria-hidden": "true"
|
|
1685
|
+
}, "+", -1), s("span", { class: "overlay-symbol-button__text" }, "添加叠加商品", -1)]]),
|
|
1686
|
+
l(Er, {
|
|
1687
|
+
"model-value": e.kLineLevel,
|
|
1688
|
+
"onUpdate:modelValue": n[1] ||= (e) => i("kLineLevelChange", e)
|
|
1689
|
+
}, null, 8, ["model-value"]),
|
|
1690
|
+
s("button", {
|
|
1691
|
+
type: "button",
|
|
1692
|
+
class: "indicator-button",
|
|
1693
|
+
title: "指标",
|
|
1694
|
+
"aria-label": "指标",
|
|
1695
|
+
onClick: n[2] ||= (e) => i("toggleIndicator")
|
|
1696
|
+
}, [...n[4] ||= [s("span", {
|
|
1697
|
+
class: "indicator-button__icon",
|
|
1698
|
+
"aria-hidden": "true"
|
|
1699
|
+
}, "fx", -1), s("span", { class: "indicator-button__text" }, "指标", -1)]])
|
|
1700
|
+
]));
|
|
1701
|
+
}
|
|
1702
|
+
}), [["__scopeId", "data-v-b7ad5d1c"]]), jr = ["data-theme"], Mr = {
|
|
1602
1703
|
class: "pane-separator-layer",
|
|
1603
1704
|
"aria-hidden": "true"
|
|
1604
|
-
},
|
|
1705
|
+
}, Nr = {
|
|
1605
1706
|
class: "canvas-layer",
|
|
1606
1707
|
ref: "canvasLayerRef"
|
|
1607
|
-
},
|
|
1708
|
+
}, Pr = {
|
|
1608
1709
|
class: "x-axis-canvas",
|
|
1609
1710
|
ref: "xAxisCanvasRef"
|
|
1610
|
-
},
|
|
1711
|
+
}, Fr = 4, Ir = /*#__PURE__*/ W(/* @__PURE__ */ u({
|
|
1611
1712
|
__name: "KLineChart",
|
|
1612
1713
|
props: {
|
|
1613
1714
|
semanticConfig: {},
|
|
@@ -1628,51 +1729,57 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
|
|
|
1628
1729
|
emits: [
|
|
1629
1730
|
"zoomLevelChange",
|
|
1630
1731
|
"toggleFullscreen",
|
|
1631
|
-
"themeChange"
|
|
1732
|
+
"themeChange",
|
|
1733
|
+
"addOverlaySymbol",
|
|
1734
|
+
"kLineLevelChange"
|
|
1632
1735
|
],
|
|
1633
1736
|
setup(n, { expose: c, emit: u }) {
|
|
1634
|
-
let d = n, f = u, p = w(
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1737
|
+
let d = n, f = u, p = w(d.semanticConfig.data.period);
|
|
1738
|
+
function m(e) {
|
|
1739
|
+
p.value = e, f("kLineLevelChange", e);
|
|
1740
|
+
}
|
|
1741
|
+
let v = w(null), b = w(null), C = w(null), E = w(null), O = w(null), k = w(null);
|
|
1742
|
+
ke(C);
|
|
1743
|
+
let A = D(null), M = D(null), N = w(0), P = w(0), F = w(1), I = w(d.initialZoomLevel ?? 1), L = w(0), R = w(1), ee = w(0), z = w({}), oe = w(null), B = w([]), ce = I.value;
|
|
1744
|
+
L.value = de(ce, {
|
|
1638
1745
|
minKWidth: d.minKWidth,
|
|
1639
1746
|
maxKWidth: d.maxKWidth,
|
|
1640
1747
|
zoomLevelCount: d.zoomLevels,
|
|
1641
|
-
dpr:
|
|
1642
|
-
}),
|
|
1643
|
-
let
|
|
1644
|
-
let e =
|
|
1748
|
+
dpr: F.value
|
|
1749
|
+
}), R.value = ue(L.value, F.value);
|
|
1750
|
+
let V = w("light"), H = w({}), he = r(() => {
|
|
1751
|
+
let e = H.value.isAsiaMarket ?? !1, t = re(V.value, e);
|
|
1645
1752
|
return {
|
|
1646
1753
|
upColor: t.candleUpBody,
|
|
1647
1754
|
downColor: t.candleDownBody
|
|
1648
1755
|
};
|
|
1649
|
-
}),
|
|
1650
|
-
let e =
|
|
1651
|
-
return t && Object.keys(t).length > 0 ?
|
|
1756
|
+
}), ge = r(() => {
|
|
1757
|
+
let e = V.value === "dark" ? te : ne, t = H.value.colorPresetSettings?.[V.value];
|
|
1758
|
+
return t && Object.keys(t).length > 0 ? ie({
|
|
1652
1759
|
...e,
|
|
1653
1760
|
colors: {
|
|
1654
1761
|
...e.colors,
|
|
1655
1762
|
...t
|
|
1656
1763
|
}
|
|
1657
|
-
}) :
|
|
1658
|
-
}),
|
|
1659
|
-
function
|
|
1660
|
-
|
|
1764
|
+
}) : ie(e);
|
|
1765
|
+
}), U = null;
|
|
1766
|
+
function _e(e) {
|
|
1767
|
+
A.value?.setTheme(e.matches ? "dark" : "light");
|
|
1661
1768
|
}
|
|
1662
|
-
function
|
|
1769
|
+
function ve(e, t) {
|
|
1663
1770
|
if (!(!e || !t)) if (t === "auto") {
|
|
1664
1771
|
let t = window.matchMedia("(prefers-color-scheme: dark)");
|
|
1665
|
-
e.setTheme(t.matches ? "dark" : "light"),
|
|
1666
|
-
} else
|
|
1772
|
+
e.setTheme(t.matches ? "dark" : "light"), U !== t && (U?.removeEventListener("change", _e), U = t, t.addEventListener("change", _e));
|
|
1773
|
+
} else U?.removeEventListener("change", _e), U = null, e.setTheme(t);
|
|
1667
1774
|
}
|
|
1668
|
-
function
|
|
1669
|
-
function
|
|
1670
|
-
if (
|
|
1671
|
-
let e =
|
|
1672
|
-
console.time("updateData-10k"),
|
|
1673
|
-
} else
|
|
1775
|
+
function ye() {}
|
|
1776
|
+
function be(e) {
|
|
1777
|
+
if (H.value = e, ve(A.value, e.theme), A.value?.updateSettingsFacade(e), e.performanceTest10kKlines) {
|
|
1778
|
+
let e = W();
|
|
1779
|
+
console.time("updateData-10k"), A.value?.updateData(e), console.timeEnd("updateData-10k"), N.value = e.length, P.value++;
|
|
1780
|
+
} else M.value && A.value?.getData()?.length === 1e4 && M.value.applyConfig(d.semanticConfig);
|
|
1674
1781
|
}
|
|
1675
|
-
function
|
|
1782
|
+
function W() {
|
|
1676
1783
|
let e = [], t = (/* @__PURE__ */ new Date("2020-01-01")).getTime(), n = 3e3;
|
|
1677
1784
|
for (let r = 0; r < 1e4; r++) {
|
|
1678
1785
|
let i = t + r * 864e5, a = (Math.random() - .5) * 2 * .02 + 1e-4, o = n, s = o * (1 + a), c = Math.max(o, s) * (1 + Math.random() * .01), l = Math.min(o, s) * (1 - Math.random() * .01), u = Math.floor(1e6 + Math.random() * 5e6);
|
|
@@ -1687,34 +1794,34 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
|
|
|
1687
1794
|
}
|
|
1688
1795
|
return e;
|
|
1689
1796
|
}
|
|
1690
|
-
function
|
|
1797
|
+
function xe(e, t, n) {
|
|
1691
1798
|
let r = e.getBoundingClientRect();
|
|
1692
1799
|
return {
|
|
1693
1800
|
width: Math.max(t, Math.round(r.width)),
|
|
1694
1801
|
height: Math.max(n, Math.round(r.height))
|
|
1695
1802
|
};
|
|
1696
1803
|
}
|
|
1697
|
-
function
|
|
1804
|
+
function Se(e) {
|
|
1698
1805
|
e && h(() => {
|
|
1699
1806
|
if (!e.isConnected) return;
|
|
1700
|
-
let t =
|
|
1701
|
-
|
|
1807
|
+
let t = xe(e, 180, 80);
|
|
1808
|
+
A.value?.setTooltipSize(t);
|
|
1702
1809
|
});
|
|
1703
1810
|
}
|
|
1704
|
-
function
|
|
1811
|
+
function Ce(e) {
|
|
1705
1812
|
e && h(() => {
|
|
1706
|
-
e.isConnected && (
|
|
1813
|
+
e.isConnected && (Ae.value = xe(e, 120, 60));
|
|
1707
1814
|
});
|
|
1708
1815
|
}
|
|
1709
|
-
let
|
|
1816
|
+
let we = w({
|
|
1710
1817
|
x: 0,
|
|
1711
1818
|
y: 0
|
|
1712
|
-
}),
|
|
1713
|
-
function
|
|
1714
|
-
|
|
1819
|
+
}), G = w(!1), K = null;
|
|
1820
|
+
function q() {
|
|
1821
|
+
K = null;
|
|
1715
1822
|
}
|
|
1716
|
-
function
|
|
1717
|
-
return
|
|
1823
|
+
function Te(e) {
|
|
1824
|
+
return K ||= e.getBoundingClientRect(), K;
|
|
1718
1825
|
}
|
|
1719
1826
|
let J = D({
|
|
1720
1827
|
crosshairPos: null,
|
|
@@ -1735,13 +1842,13 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
|
|
|
1735
1842
|
hoveredPaneBoundaryId: null,
|
|
1736
1843
|
isHoveringRightAxis: !1
|
|
1737
1844
|
}), Y = D(null), Ee = r(() => {
|
|
1738
|
-
let e =
|
|
1739
|
-
return e ?
|
|
1740
|
-
}),
|
|
1845
|
+
let e = oe.value;
|
|
1846
|
+
return e ? B.value.find((t) => t.id === e) ?? null : null;
|
|
1847
|
+
}), Oe = w([]), Ae = w({
|
|
1741
1848
|
width: 220,
|
|
1742
1849
|
height: 120
|
|
1743
|
-
}),
|
|
1744
|
-
let e =
|
|
1850
|
+
}), je = r(() => {
|
|
1851
|
+
let e = v.value, t = b.value;
|
|
1745
1852
|
return !e || !t ? {
|
|
1746
1853
|
x: 0,
|
|
1747
1854
|
y: 0
|
|
@@ -1749,83 +1856,86 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
|
|
|
1749
1856
|
x: e.offsetLeft,
|
|
1750
1857
|
y: e.offsetTop
|
|
1751
1858
|
};
|
|
1752
|
-
}),
|
|
1859
|
+
}), Me = r(() => J.value.hoveredMarkerData), Ne = r(() => J.value.hoveredCustomMarker), Pe = r(() => J.value.isDragging), Fe = r(() => J.value.isResizingPaneBoundary), Ie = r(() => J.value.isHoveringPaneBoundary), Le = r(() => J.value.hoveredPaneBoundaryId), Re = r(() => J.value.isHoveringRightAxis), ze = r(() => J.value.hoveredIndex);
|
|
1753
1860
|
r(() => J.value.crosshairIndex);
|
|
1754
|
-
let
|
|
1861
|
+
let Be = r(() => Pe.value ? "grabbing" : Fe.value || Ie.value ? "ns-resize" : ze.value === null ? "crosshair" : "pointer"), Ve = r(() => {
|
|
1755
1862
|
let e = J.value.hoveredIndex;
|
|
1756
1863
|
if (typeof e != "number") return null;
|
|
1757
|
-
|
|
1758
|
-
let t =
|
|
1864
|
+
P.value;
|
|
1865
|
+
let t = A.value?.getData();
|
|
1759
1866
|
return t && e >= 0 && e < t.length ? t[e] : null;
|
|
1760
|
-
}),
|
|
1761
|
-
x:
|
|
1762
|
-
y:
|
|
1763
|
-
})), Ue = r(() => ({
|
|
1764
|
-
left: `${He.value.x}px`,
|
|
1765
|
-
top: `${He.value.y}px`
|
|
1766
|
-
})), We = r(() => ({
|
|
1767
|
-
x: q.value.x + ke.value.x,
|
|
1768
|
-
y: q.value.y + ke.value.y
|
|
1867
|
+
}), He = r(() => J.value.hoveredIndex), Ue = r(() => J.value.tooltipPos), We = r(() => ({
|
|
1868
|
+
x: Ue.value.x + je.value.x,
|
|
1869
|
+
y: Ue.value.y + je.value.y
|
|
1769
1870
|
})), Ge = r(() => ({
|
|
1770
1871
|
left: `${We.value.x}px`,
|
|
1771
1872
|
top: `${We.value.y}px`
|
|
1772
|
-
})), Ke = r(() =>
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
}),
|
|
1776
|
-
|
|
1873
|
+
})), Ke = r(() => ({
|
|
1874
|
+
x: we.value.x + je.value.x,
|
|
1875
|
+
y: we.value.y + je.value.y
|
|
1876
|
+
})), qe = r(() => ({
|
|
1877
|
+
left: `${Ke.value.x}px`,
|
|
1878
|
+
top: `${Ke.value.y}px`
|
|
1879
|
+
})), Je = r(() => J.value.tooltipAnchorPlacement), Ye = r(() => {
|
|
1880
|
+
let e = A.value?.viewport.peek(), t = v.value, n = e?.plotWidth ?? (t ? t.clientWidth : 0);
|
|
1881
|
+
return we.value.x + 12 + Ae.value.width + 12 > n ? "left-bottom" : "right-bottom";
|
|
1882
|
+
}), Xe = r(() => (P.value, A.value?.getData() ?? []));
|
|
1883
|
+
function Ze(e) {
|
|
1777
1884
|
Y.value?.setTool(e);
|
|
1778
1885
|
}
|
|
1779
|
-
function
|
|
1886
|
+
function Qe() {
|
|
1887
|
+
k.value?.toggleMenu();
|
|
1888
|
+
}
|
|
1889
|
+
function $e(e) {
|
|
1780
1890
|
let t = Ee.value;
|
|
1781
|
-
!t || !Y.value || Y.value.updateDrawingStyle(t.id, e);
|
|
1891
|
+
!t || !Y.value || (Y.value.updateDrawingStyle(t.id, e), B.value = Y.value.getDrawings());
|
|
1782
1892
|
}
|
|
1783
|
-
function
|
|
1893
|
+
function et() {
|
|
1784
1894
|
let e = Ee.value;
|
|
1785
|
-
!e || !Y.value || (Y.value.removeDrawing(e.id),
|
|
1895
|
+
!e || !Y.value || (Y.value.removeDrawing(e.id), oe.value = null, B.value = Y.value.getDrawings());
|
|
1786
1896
|
}
|
|
1787
|
-
function
|
|
1788
|
-
|
|
1897
|
+
function tt(e) {
|
|
1898
|
+
A.value?.handlePointerEvent(e, { onPointerDown: (e, t) => Y.value?.onPointerDown(e, t) ? (B.value = Y.value.getDrawings(), !0) : !1 });
|
|
1789
1899
|
}
|
|
1790
|
-
function
|
|
1791
|
-
let t =
|
|
1900
|
+
function nt(e) {
|
|
1901
|
+
let t = v.value;
|
|
1792
1902
|
if (t) {
|
|
1793
|
-
let n =
|
|
1794
|
-
|
|
1903
|
+
let n = Te(t);
|
|
1904
|
+
we.value = {
|
|
1795
1905
|
x: e.clientX - n.left,
|
|
1796
1906
|
y: e.clientY - n.top
|
|
1797
1907
|
};
|
|
1798
1908
|
}
|
|
1799
|
-
|
|
1800
|
-
}
|
|
1801
|
-
function et(e) {
|
|
1802
|
-
E.value?.handlePointerEvent(e, { onPointerUp: (e, t) => Y.value?.onPointerUp(e, t) ? (z.value = Y.value.getDrawings(), !0) : !1 });
|
|
1803
|
-
}
|
|
1804
|
-
function tt(e) {
|
|
1805
|
-
E.value?.handlePointerEvent(e);
|
|
1806
|
-
}
|
|
1807
|
-
function nt(e) {
|
|
1808
|
-
E.value?.handlePointerEvent(e);
|
|
1909
|
+
A.value?.handlePointerEvent(e, { onPointerMove: (e, t) => Y.value?.onPointerMove(e, t) ? (B.value = Y.value.getDrawings(), !0) : !1 });
|
|
1809
1910
|
}
|
|
1810
1911
|
function rt(e) {
|
|
1811
|
-
|
|
1912
|
+
A.value?.handlePointerEvent(e, { onPointerUp: (e, t) => Y.value?.onPointerUp(e, t) ? (B.value = Y.value.getDrawings(), !0) : !1 });
|
|
1812
1913
|
}
|
|
1813
1914
|
function it(e) {
|
|
1814
|
-
|
|
1915
|
+
A.value?.handlePointerEvent(e);
|
|
1815
1916
|
}
|
|
1816
1917
|
function at(e) {
|
|
1817
|
-
|
|
1918
|
+
A.value?.handlePointerEvent(e);
|
|
1919
|
+
}
|
|
1920
|
+
function ot(e) {
|
|
1921
|
+
A.value?.handlePointerEvent(e);
|
|
1922
|
+
}
|
|
1923
|
+
function st(e) {
|
|
1924
|
+
A.value?.handlePointerEvent(e);
|
|
1818
1925
|
}
|
|
1819
|
-
function
|
|
1820
|
-
|
|
1926
|
+
function ct(e) {
|
|
1927
|
+
A.value?.handlePointerEvent(e);
|
|
1821
1928
|
}
|
|
1822
|
-
|
|
1929
|
+
function lt() {
|
|
1930
|
+
A.value?.handleScrollEvent();
|
|
1931
|
+
}
|
|
1932
|
+
let ut = w([]), dt = r(() => {
|
|
1823
1933
|
let e = [], t = /* @__PURE__ */ new Set();
|
|
1824
1934
|
for (let n of Z.value) t.has(n.indicatorId) || (t.add(n.indicatorId), e.push(n.indicatorId));
|
|
1825
1935
|
return e;
|
|
1826
|
-
}),
|
|
1827
|
-
function
|
|
1828
|
-
let e =
|
|
1936
|
+
}), ft = r(() => [...ut.value, ...dt.value]), X = w({}), Z = w([]);
|
|
1937
|
+
function pt() {
|
|
1938
|
+
let e = z.value.main ?? 3;
|
|
1829
1939
|
return Z.value.length === 0 ? [{
|
|
1830
1940
|
id: "main",
|
|
1831
1941
|
ratio: e,
|
|
@@ -1838,49 +1948,56 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
|
|
|
1838
1948
|
role: "price"
|
|
1839
1949
|
}, ...Z.value.map((e) => ({
|
|
1840
1950
|
id: e.id,
|
|
1841
|
-
ratio:
|
|
1951
|
+
ratio: z.value[e.id] ?? 1,
|
|
1842
1952
|
visible: !0,
|
|
1843
1953
|
role: "indicator"
|
|
1844
1954
|
}))];
|
|
1845
1955
|
}
|
|
1846
|
-
function dt(e) {
|
|
1847
|
-
return { ...ie[e].defaultParams };
|
|
1848
|
-
}
|
|
1849
|
-
let ft = /* @__PURE__ */ new Map();
|
|
1850
|
-
function pt(e = "VOLUME", t) {
|
|
1851
|
-
if (Z.value.length >= Vr) return !1;
|
|
1852
|
-
let n = t ?? dt(e);
|
|
1853
|
-
return !!E.value?.addIndicator(e, "sub", n);
|
|
1854
|
-
}
|
|
1855
1956
|
function mt(e) {
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1957
|
+
if (e === "VOLUME") return {};
|
|
1958
|
+
let t = me(e);
|
|
1959
|
+
return t?.runtime?.defaultConfig ? { ...t.runtime.defaultConfig } : {};
|
|
1960
|
+
}
|
|
1961
|
+
function ht(e) {
|
|
1962
|
+
if (e === "VOLUME") return !0;
|
|
1963
|
+
let t = me(e);
|
|
1964
|
+
return !!t && t.category !== "main";
|
|
1965
|
+
}
|
|
1966
|
+
let gt = /* @__PURE__ */ new Map();
|
|
1967
|
+
function _t(e = "VOLUME", t) {
|
|
1968
|
+
if (Z.value.length >= Fr) return !1;
|
|
1969
|
+
let n = t ?? mt(e);
|
|
1970
|
+
return !!A.value?.addIndicator(e, "sub", n);
|
|
1971
|
+
}
|
|
1972
|
+
function vt(e) {
|
|
1973
|
+
A.value?.removeIndicator(e);
|
|
1974
|
+
}
|
|
1975
|
+
function yt() {
|
|
1976
|
+
for (let e of Z.value) A.value?.removeIndicator(e.id);
|
|
1977
|
+
gt.clear();
|
|
1978
|
+
}
|
|
1979
|
+
function bt() {
|
|
1980
|
+
let e = d.semanticConfig, t = A.value;
|
|
1864
1981
|
if (!t) return;
|
|
1865
1982
|
let n = e.indicators?.main;
|
|
1866
1983
|
if (n) for (let e of n) e.enabled && t.addIndicator(e.type, "main", e.params);
|
|
1867
1984
|
}
|
|
1868
|
-
function
|
|
1869
|
-
let e =
|
|
1985
|
+
function xt() {
|
|
1986
|
+
let e = A.value?.subPanes.peek() ?? [];
|
|
1870
1987
|
for (let t of e) {
|
|
1871
1988
|
let { paneId: e, indicatorId: n, params: r } = t, i = e.match(/^(.+)_(\d+)$/);
|
|
1872
1989
|
if (i) {
|
|
1873
1990
|
let [, e, t] = i, n = parseInt(t, 10);
|
|
1874
|
-
n >= (
|
|
1991
|
+
n >= (gt.get(e) ?? 0) && gt.set(e, n + 1);
|
|
1875
1992
|
}
|
|
1876
1993
|
}
|
|
1877
1994
|
}
|
|
1878
|
-
function
|
|
1879
|
-
let n =
|
|
1880
|
-
|
|
1995
|
+
function St(e, t) {
|
|
1996
|
+
let n = mt(t);
|
|
1997
|
+
A.value?.replaceSubPaneIndicator(e, t, n);
|
|
1881
1998
|
}
|
|
1882
|
-
function
|
|
1883
|
-
let n =
|
|
1999
|
+
function Ct(e, t) {
|
|
2000
|
+
let n = A.value;
|
|
1884
2001
|
if (n) {
|
|
1885
2002
|
if ([
|
|
1886
2003
|
"MA",
|
|
@@ -1902,33 +2019,33 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
|
|
|
1902
2019
|
"STRUCTURE",
|
|
1903
2020
|
"ZONES"
|
|
1904
2021
|
].includes(e)) {
|
|
1905
|
-
let r =
|
|
2022
|
+
let r = ut.value.find((t) => t === e);
|
|
1906
2023
|
t && !r ? n.addIndicator(e, "main", X.value[e]) : !t && r && n.removeIndicator(e.toUpperCase());
|
|
1907
2024
|
return;
|
|
1908
2025
|
}
|
|
1909
|
-
if (
|
|
1910
|
-
if (Z.value.find((t) => t.indicatorId === e) || Z.value.length >=
|
|
2026
|
+
if (ht(e)) if (t) {
|
|
2027
|
+
if (Z.value.find((t) => t.indicatorId === e) || Z.value.length >= Fr) return;
|
|
1911
2028
|
if (!n.addIndicator(e, "sub", X.value[e]) && Z.value.length > 0) {
|
|
1912
2029
|
let t = Z.value[Z.value.length - 1];
|
|
1913
|
-
|
|
2030
|
+
St(t.id, e);
|
|
1914
2031
|
}
|
|
1915
2032
|
} else Z.value.filter((t) => t.indicatorId === e).forEach((e) => {
|
|
1916
2033
|
n.removeIndicator(e.id);
|
|
1917
2034
|
});
|
|
1918
2035
|
}
|
|
1919
2036
|
}
|
|
1920
|
-
function
|
|
2037
|
+
function wt(e, t) {
|
|
1921
2038
|
if (e === "MA" || e === "BOLL" || e === "EXPMA" || e === "ENE") {
|
|
1922
|
-
|
|
2039
|
+
A.value?.updateIndicatorParams(e, t);
|
|
1923
2040
|
return;
|
|
1924
2041
|
}
|
|
1925
|
-
|
|
1926
|
-
|
|
2042
|
+
ht(e) && Z.value.filter((t) => t.indicatorId === e).forEach((e) => {
|
|
2043
|
+
A.value?.updateIndicatorParams(e.id, t);
|
|
1927
2044
|
});
|
|
1928
2045
|
}
|
|
1929
|
-
function
|
|
2046
|
+
function Tt(e) {
|
|
1930
2047
|
if (!e.length || Z.value.length <= 1) return;
|
|
1931
|
-
let t = e.filter((e) =>
|
|
2048
|
+
let t = e.filter((e) => ht(e));
|
|
1932
2049
|
if (!t.length) return;
|
|
1933
2050
|
let n = new Map(Z.value.map((e) => [e.indicatorId, e])), r = [];
|
|
1934
2051
|
for (let e of t) {
|
|
@@ -1940,41 +2057,41 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
|
|
|
1940
2057
|
let i = Z.value.map((e) => e.id), a = r.map((e) => e.id);
|
|
1941
2058
|
if (i.join("|") === a.join("|")) return;
|
|
1942
2059
|
Z.value = r;
|
|
1943
|
-
let o =
|
|
1944
|
-
o && o.updatePaneLayout(
|
|
2060
|
+
let o = A.value;
|
|
2061
|
+
o && o.updatePaneLayout(pt());
|
|
1945
2062
|
}
|
|
1946
|
-
let
|
|
1947
|
-
function
|
|
1948
|
-
let e =
|
|
2063
|
+
let Et = r(() => d.rightAxisWidth + d.priceLabelWidth), Dt = r(() => (P.value, ee.value, L.value, R.value, F.value, A.value?.getContentWidth() ?? 0));
|
|
2064
|
+
function Ot() {
|
|
2065
|
+
let e = v.value, t = A.value;
|
|
1949
2066
|
if (!e || !t) return;
|
|
1950
2067
|
let n = t.getData()?.length ?? 0;
|
|
1951
2068
|
if (n === 0) return;
|
|
1952
|
-
let r = t.viewport.peek().dpr, { unitPx: i, startXPx: a } =
|
|
2069
|
+
let r = t.viewport.peek().dpr, { unitPx: i, startXPx: a } = le(L.value, R.value, r), o = (a + n * i) / r, s = Math.max(0, e.scrollWidth - e.clientWidth), c = Math.min(s, Math.max(0, o - e.clientWidth));
|
|
1953
2070
|
e.scrollLeft = Math.round(c * r) / r;
|
|
1954
2071
|
}
|
|
1955
|
-
function
|
|
1956
|
-
|
|
2072
|
+
function kt(e, t) {
|
|
2073
|
+
A.value?.zoomToLevel(e, t);
|
|
1957
2074
|
}
|
|
1958
2075
|
c({
|
|
1959
|
-
scheduleRender:
|
|
1960
|
-
scrollToRight:
|
|
1961
|
-
addSubPane:
|
|
1962
|
-
removeSubPane:
|
|
1963
|
-
switchSubIndicator:
|
|
1964
|
-
clearAllSubPanes:
|
|
1965
|
-
zoomToLevel:
|
|
1966
|
-
zoomIn: (e) =>
|
|
1967
|
-
zoomOut: (e) =>
|
|
1968
|
-
getZoomLevel: () =>
|
|
1969
|
-
getZoomLevelCount: () =>
|
|
2076
|
+
scheduleRender: ye,
|
|
2077
|
+
scrollToRight: Ot,
|
|
2078
|
+
addSubPane: _t,
|
|
2079
|
+
removeSubPane: vt,
|
|
2080
|
+
switchSubIndicator: St,
|
|
2081
|
+
clearAllSubPanes: yt,
|
|
2082
|
+
zoomToLevel: kt,
|
|
2083
|
+
zoomIn: (e) => kt(I.value + 1, e),
|
|
2084
|
+
zoomOut: (e) => kt(I.value - 1, e),
|
|
2085
|
+
getZoomLevel: () => I.value,
|
|
2086
|
+
getZoomLevelCount: () => A.value?.getZoomLevelCount() ?? 10
|
|
1970
2087
|
});
|
|
1971
|
-
function
|
|
2088
|
+
function At() {
|
|
1972
2089
|
return (e) => {
|
|
1973
|
-
e.preventDefault(),
|
|
2090
|
+
e.preventDefault(), A.value?.handleWheelEvent(e);
|
|
1974
2091
|
};
|
|
1975
2092
|
}
|
|
1976
|
-
function
|
|
1977
|
-
return
|
|
2093
|
+
function Mt(e, t, n, r) {
|
|
2094
|
+
return se({
|
|
1978
2095
|
container: e,
|
|
1979
2096
|
data: [],
|
|
1980
2097
|
canvasLayer: t,
|
|
@@ -1990,11 +2107,11 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
|
|
|
1990
2107
|
maxKWidth: d.maxKWidth
|
|
1991
2108
|
});
|
|
1992
2109
|
}
|
|
1993
|
-
function
|
|
2110
|
+
function Nt(e) {
|
|
1994
2111
|
let t = e.paneLayout.subscribe(() => {
|
|
1995
|
-
|
|
1996
|
-
let t =
|
|
1997
|
-
|
|
2112
|
+
q();
|
|
2113
|
+
let t = v.value && parseInt(getComputedStyle(v.value).borderTopWidth) || 0;
|
|
2114
|
+
Oe.value = e.paneLayout.peek().slice(0, -1).map((n) => {
|
|
1998
2115
|
let r = e.getPaneInfo(n.id), i = (r?.top ?? 0) + (r?.height ?? 0);
|
|
1999
2116
|
return {
|
|
2000
2117
|
id: n.id,
|
|
@@ -2002,25 +2119,25 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
|
|
|
2002
2119
|
};
|
|
2003
2120
|
});
|
|
2004
2121
|
}), n = e.paneRatios.subscribe(() => {
|
|
2005
|
-
|
|
2122
|
+
z.value = { ...e.paneRatios.peek() };
|
|
2006
2123
|
}), r = e.viewport.subscribe(() => {
|
|
2007
2124
|
let t = e.viewport.peek();
|
|
2008
|
-
|
|
2125
|
+
F.value !== t.dpr && (F.value = t.dpr), ee.value !== t.plotWidth && (ee.value = t.plotWidth), (I.value !== t.zoomLevel || L.value !== t.kWidth || R.value !== t.kGap) && (I.value = t.zoomLevel, L.value = t.kWidth, R.value = t.kGap);
|
|
2009
2126
|
let n = t.desiredScrollLeft;
|
|
2010
|
-
n !== void 0 && n !==
|
|
2011
|
-
let e =
|
|
2127
|
+
n !== void 0 && n !== v.value?.scrollLeft && (q(), h(() => {
|
|
2128
|
+
let e = v.value;
|
|
2012
2129
|
if (!e) return;
|
|
2013
2130
|
let r = Math.max(0, e.scrollWidth - e.clientWidth), i = Math.min(Math.max(0, n), r), a = t.dpr;
|
|
2014
2131
|
e.scrollLeft = Math.round(i * a) / a;
|
|
2015
2132
|
}));
|
|
2016
2133
|
}), i = e.data.subscribe(() => {
|
|
2017
|
-
|
|
2134
|
+
N.value = e.data.peek().length, P.value++;
|
|
2018
2135
|
}), a = e.theme.subscribe(() => {
|
|
2019
2136
|
let t = e.theme.peek();
|
|
2020
|
-
|
|
2137
|
+
V.value = t, f("themeChange", t);
|
|
2021
2138
|
}), o = e.indicators.subscribe(() => {
|
|
2022
2139
|
let t = e.indicators.peek(), n = t.filter((e) => e.role === "main").map((e) => e.definitionId);
|
|
2023
|
-
|
|
2140
|
+
ut.value = n;
|
|
2024
2141
|
let r = { ...X.value };
|
|
2025
2142
|
for (let e of t) e.role === "main" && e.params && Object.keys(e.params).length > 0 && (r[e.definitionId] = { ...e.params });
|
|
2026
2143
|
e.updateRendererConfig("mainIndicatorLegend", { indicators: {
|
|
@@ -2054,186 +2171,198 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
|
|
|
2054
2171
|
X.value = a;
|
|
2055
2172
|
});
|
|
2056
2173
|
x(() => {
|
|
2057
|
-
r(), i(), n(), t(), a(), o(), s(),
|
|
2174
|
+
r(), i(), n(), t(), a(), o(), s(), U?.removeEventListener("change", _e);
|
|
2058
2175
|
});
|
|
2059
2176
|
}
|
|
2060
|
-
function
|
|
2061
|
-
let t =
|
|
2062
|
-
if (
|
|
2063
|
-
let t =
|
|
2177
|
+
function Pt(e) {
|
|
2178
|
+
let t = O.value?.getSettings() ?? { showVolumePriceMarkers: !0 };
|
|
2179
|
+
if (H.value = t, ve(e, t.theme), e.updateSettingsFacade(t), t.performanceTest10kKlines) {
|
|
2180
|
+
let t = W();
|
|
2064
2181
|
console.time("updateData-10k"), e.updateData(t), console.timeEnd("updateData-10k");
|
|
2065
2182
|
}
|
|
2066
2183
|
}
|
|
2067
|
-
function
|
|
2068
|
-
Y.value = new
|
|
2184
|
+
function Ft(e) {
|
|
2185
|
+
Y.value = new ae(e), Y.value.setCallbacks({
|
|
2069
2186
|
onDrawingCreated: (e) => {
|
|
2070
|
-
|
|
2187
|
+
B.value = [...B.value, e], oe.value = e.id;
|
|
2071
2188
|
},
|
|
2072
2189
|
onToolChange: () => {},
|
|
2073
2190
|
onDrawingSelected: (e) => {
|
|
2074
|
-
|
|
2191
|
+
oe.value = e?.id ?? null;
|
|
2075
2192
|
}
|
|
2076
2193
|
});
|
|
2077
2194
|
}
|
|
2078
|
-
function
|
|
2079
|
-
e.setTooltipAnchorPositioning(
|
|
2195
|
+
function It(e) {
|
|
2196
|
+
e.setTooltipAnchorPositioning(G.value), e.interactionState.subscribe(() => {
|
|
2080
2197
|
J.value = e.interactionState.peek();
|
|
2081
|
-
}), J.value = e.interactionState.peek(),
|
|
2198
|
+
}), J.value = e.interactionState.peek(), F.value = e.viewport.peek().dpr;
|
|
2082
2199
|
}
|
|
2083
|
-
function
|
|
2084
|
-
if (
|
|
2200
|
+
function Lt(e) {
|
|
2201
|
+
if (pe(d.dataFetcher), M.value = new fe(e), M.value.on("config:error", (e) => {
|
|
2085
2202
|
console.error("Semantic config error:", e);
|
|
2086
|
-
}),
|
|
2087
|
-
|
|
2088
|
-
}),
|
|
2089
|
-
let e =
|
|
2203
|
+
}), M.value.on("config:ready", () => {
|
|
2204
|
+
bt(), xt(), h(() => Ot());
|
|
2205
|
+
}), H.value.performanceTest10kKlines) {
|
|
2206
|
+
let e = M.value.applyIndicatorsOnly(d.semanticConfig);
|
|
2090
2207
|
e && !e.success && console.error("Semantic config apply failed:", e.errors);
|
|
2091
|
-
} else
|
|
2208
|
+
} else M.value.applyConfig(d.semanticConfig).then((e) => {
|
|
2092
2209
|
e && !e.success && console.error("Semantic config apply failed:", e.errors);
|
|
2093
2210
|
});
|
|
2094
2211
|
}
|
|
2095
2212
|
return y(() => {
|
|
2096
|
-
|
|
2097
|
-
let e =
|
|
2213
|
+
G.value = !1;
|
|
2214
|
+
let e = v.value, t = b.value;
|
|
2098
2215
|
if (!e || !t) return;
|
|
2099
|
-
let n =
|
|
2216
|
+
let n = At();
|
|
2100
2217
|
e.addEventListener("wheel", n, { passive: !1 });
|
|
2101
|
-
let r = e.querySelector(".canvas-layer"), i = e.querySelector(".x-axis-canvas"), a =
|
|
2102
|
-
|
|
2218
|
+
let r = e.querySelector(".canvas-layer"), i = e.querySelector(".x-axis-canvas"), a = Mt(e, r, t.querySelector(".right-axis-host"), i);
|
|
2219
|
+
A.value = a, Nt(a), bt(), Pt(a), Ft(a), It(a), Lt(a);
|
|
2103
2220
|
}), x(() => {
|
|
2104
|
-
let e =
|
|
2105
|
-
e && (
|
|
2106
|
-
}),
|
|
2107
|
-
|
|
2108
|
-
}),
|
|
2221
|
+
let e = A.value;
|
|
2222
|
+
e && (A.value = null, e.dispose()), Y.value = null;
|
|
2223
|
+
}), j(() => d.yPaddingPx, (e) => {
|
|
2224
|
+
A.value?.updateOptionsFacade({ yPaddingPx: e });
|
|
2225
|
+
}), j(() => d.semanticConfig, async (e, t) => {
|
|
2109
2226
|
if (e && e !== t) {
|
|
2110
|
-
let t = await
|
|
2227
|
+
let t = await M.value?.applyConfig(e);
|
|
2111
2228
|
t && !t.success && console.error("Semantic config apply failed:", t.errors);
|
|
2112
2229
|
}
|
|
2113
2230
|
}, { deep: !0 }), (r, c) => (S(), o("div", {
|
|
2114
2231
|
ref_key: "chartWrapperRef",
|
|
2115
|
-
ref: v,
|
|
2116
|
-
class: "chart-wrapper",
|
|
2117
|
-
"data-theme": U.value,
|
|
2118
|
-
style: _(W.value)
|
|
2119
|
-
}, [s("div", { class: g(["chart-stage", {
|
|
2120
|
-
"is-dragging": Me.value,
|
|
2121
|
-
"is-resizing-pane": Ne.value,
|
|
2122
|
-
"is-hovering-pane-separator": Pe.value,
|
|
2123
|
-
"is-hovering-right-axis": Ie.value,
|
|
2124
|
-
"is-hovering-kline": Le.value !== null
|
|
2125
|
-
}]) }, [l(Ir, {
|
|
2126
|
-
ref_key: "toolbarRef",
|
|
2127
2232
|
ref: C,
|
|
2128
|
-
"
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
onZoomIn: c[1] ||= (e) => Tt(N.value + 1),
|
|
2132
|
-
onZoomOut: c[2] ||= (e) => Tt(N.value - 1),
|
|
2133
|
-
onSettingsChange: he
|
|
2134
|
-
}, null, 8, ["is-fullscreen"]), s("div", {
|
|
2135
|
-
class: "chart-main",
|
|
2136
|
-
ref_key: "chartMainRef",
|
|
2137
|
-
ref: m
|
|
2233
|
+
class: "chart-wrapper",
|
|
2234
|
+
"data-theme": V.value,
|
|
2235
|
+
style: _(ge.value)
|
|
2138
2236
|
}, [
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
onUpdateStyle: Xe,
|
|
2166
|
-
onDelete: Ze
|
|
2167
|
-
}, null, 8, ["drawing"])) : a("", !0)], 512)], 4)], 36),
|
|
2168
|
-
b.value ? (S(), i(t, {
|
|
2169
|
-
key: 0,
|
|
2170
|
-
to: b.value
|
|
2237
|
+
l(Ar, {
|
|
2238
|
+
symbol: n.semanticConfig.data.symbol,
|
|
2239
|
+
"k-line-level": p.value,
|
|
2240
|
+
onAddOverlaySymbol: c[0] ||= (e) => r.$emit("addOverlaySymbol"),
|
|
2241
|
+
onKLineLevelChange: m,
|
|
2242
|
+
onToggleIndicator: Qe
|
|
2243
|
+
}, null, 8, ["symbol", "k-line-level"]),
|
|
2244
|
+
s("div", { class: g(["chart-stage", {
|
|
2245
|
+
"is-dragging": Pe.value,
|
|
2246
|
+
"is-resizing-pane": Fe.value,
|
|
2247
|
+
"is-hovering-pane-separator": Ie.value,
|
|
2248
|
+
"is-hovering-right-axis": Re.value,
|
|
2249
|
+
"is-hovering-kline": ze.value !== null
|
|
2250
|
+
}]) }, [l(Tr, {
|
|
2251
|
+
ref_key: "toolbarRef",
|
|
2252
|
+
ref: O,
|
|
2253
|
+
"is-fullscreen": n.isFullscreen,
|
|
2254
|
+
onSelectTool: Ze,
|
|
2255
|
+
onToggleFullscreen: c[1] ||= (e) => r.$emit("toggleFullscreen"),
|
|
2256
|
+
onZoomIn: c[2] ||= (e) => kt(I.value + 1),
|
|
2257
|
+
onZoomOut: c[3] ||= (e) => kt(I.value - 1),
|
|
2258
|
+
onSettingsChange: be
|
|
2259
|
+
}, null, 8, ["is-fullscreen"]), s("div", {
|
|
2260
|
+
class: "chart-main",
|
|
2261
|
+
ref_key: "chartMainRef",
|
|
2262
|
+
ref: b
|
|
2171
2263
|
}, [
|
|
2172
|
-
|
|
2264
|
+
s("div", Mr, [(S(!0), o(e, null, T(Oe.value, (e) => (S(), o("div", {
|
|
2265
|
+
key: e.id,
|
|
2266
|
+
class: g(["pane-separator-line", { "is-active": Le.value === e.id }]),
|
|
2267
|
+
style: _({ top: `${e.top}px` })
|
|
2268
|
+
}, null, 6))), 128))]),
|
|
2269
|
+
s("div", {
|
|
2270
|
+
ref_key: "tooltipLayerRef",
|
|
2271
|
+
ref: E,
|
|
2272
|
+
class: "tooltip-layer"
|
|
2273
|
+
}, null, 512),
|
|
2274
|
+
s("div", {
|
|
2275
|
+
class: "chart-container",
|
|
2276
|
+
style: _({ cursor: Be.value }),
|
|
2277
|
+
ref_key: "containerRef",
|
|
2278
|
+
ref: v,
|
|
2279
|
+
onScrollPassive: lt,
|
|
2280
|
+
onPointerdown: tt,
|
|
2281
|
+
onPointermove: nt,
|
|
2282
|
+
onPointerup: rt,
|
|
2283
|
+
onPointerleave: it
|
|
2284
|
+
}, [s("div", {
|
|
2285
|
+
class: "scroll-content",
|
|
2286
|
+
style: _({ width: Dt.value + "px" })
|
|
2287
|
+
}, [s("div", Nr, [s("canvas", Pr, null, 512), Ee.value ? (S(), i(De, {
|
|
2173
2288
|
key: 0,
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
},
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
"
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
"
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2289
|
+
drawing: Ee.value,
|
|
2290
|
+
onUpdateStyle: $e,
|
|
2291
|
+
onDelete: et
|
|
2292
|
+
}, null, 8, ["drawing"])) : a("", !0)], 512)], 4)], 36),
|
|
2293
|
+
E.value ? (S(), i(t, {
|
|
2294
|
+
key: 0,
|
|
2295
|
+
to: E.value
|
|
2296
|
+
}, [
|
|
2297
|
+
Ve.value ? (S(), o("div", {
|
|
2298
|
+
key: 0,
|
|
2299
|
+
class: g(["tooltip-anchor kline-tooltip-anchor", { "use-anchor": G.value }]),
|
|
2300
|
+
style: _(Ge.value)
|
|
2301
|
+
}, null, 6)) : a("", !0),
|
|
2302
|
+
Me.value || Ne.value ? (S(), o("div", {
|
|
2303
|
+
key: 1,
|
|
2304
|
+
class: g(["tooltip-anchor marker-tooltip-anchor", { "use-anchor": G.value }]),
|
|
2305
|
+
style: _(qe.value)
|
|
2306
|
+
}, null, 6)) : a("", !0),
|
|
2307
|
+
Ve.value ? (S(), i(Kt, {
|
|
2308
|
+
key: 2,
|
|
2309
|
+
k: Ve.value,
|
|
2310
|
+
index: He.value,
|
|
2311
|
+
data: Xe.value,
|
|
2312
|
+
pos: We.value,
|
|
2313
|
+
"set-el": Se,
|
|
2314
|
+
"use-anchor": G.value,
|
|
2315
|
+
"anchor-placement": Je.value,
|
|
2316
|
+
"up-color": he.value.upColor,
|
|
2317
|
+
"down-color": he.value.downColor
|
|
2318
|
+
}, null, 8, [
|
|
2319
|
+
"k",
|
|
2320
|
+
"index",
|
|
2321
|
+
"data",
|
|
2322
|
+
"pos",
|
|
2323
|
+
"use-anchor",
|
|
2324
|
+
"anchor-placement",
|
|
2325
|
+
"up-color",
|
|
2326
|
+
"down-color"
|
|
2327
|
+
])) : a("", !0),
|
|
2328
|
+
Me.value || Ne.value ? (S(), i(Yt, {
|
|
2329
|
+
key: 3,
|
|
2330
|
+
marker: Me.value || Ne.value,
|
|
2331
|
+
pos: Ke.value,
|
|
2332
|
+
"use-anchor": G.value,
|
|
2333
|
+
"anchor-placement": Ye.value,
|
|
2334
|
+
"set-el": Ce
|
|
2335
|
+
}, null, 8, [
|
|
2336
|
+
"marker",
|
|
2337
|
+
"pos",
|
|
2338
|
+
"use-anchor",
|
|
2339
|
+
"anchor-placement"
|
|
2340
|
+
])) : a("", !0)
|
|
2341
|
+
], 8, ["to"])) : a("", !0),
|
|
2342
|
+
s("div", {
|
|
2343
|
+
class: "right-axis-host",
|
|
2344
|
+
ref: "rightAxisLayerRef",
|
|
2345
|
+
style: _({ width: Et.value + "px" }),
|
|
2346
|
+
onPointerdown: at,
|
|
2347
|
+
onPointermove: ot,
|
|
2348
|
+
onPointerup: st,
|
|
2349
|
+
onPointerleave: ct
|
|
2350
|
+
}, null, 36)
|
|
2351
|
+
], 512)], 2),
|
|
2352
|
+
l(jt, {
|
|
2353
|
+
ref_key: "indicatorSelectorRef",
|
|
2354
|
+
ref: k,
|
|
2355
|
+
"active-indicators": ft.value,
|
|
2356
|
+
"indicator-params": X.value,
|
|
2357
|
+
onToggle: Ct,
|
|
2358
|
+
onUpdateParams: wt,
|
|
2359
|
+
onReorderSubIndicators: Tt
|
|
2360
|
+
}, null, 8, ["active-indicators", "indicator-params"])
|
|
2361
|
+
], 12, jr));
|
|
2233
2362
|
}
|
|
2234
|
-
}), [["__scopeId", "data-v-
|
|
2363
|
+
}), [["__scopeId", "data-v-bfe6c39c"]]), Lr = {
|
|
2235
2364
|
name: "@363045841yyt/klinechart",
|
|
2236
|
-
version: "0.
|
|
2365
|
+
version: "0.8.0",
|
|
2237
2366
|
description: "Vue 3 bindings for @363045841yyt/klinechart-core. Idiomatic composables, SFC components.",
|
|
2238
2367
|
license: "MIT",
|
|
2239
2368
|
repository: {
|
|
@@ -2290,29 +2419,29 @@ var mr = { class: "settings-body" }, hr = { class: "settings-label" }, gr = ["on
|
|
|
2290
2419
|
devDependencies: {
|
|
2291
2420
|
"@arethetypeswrong/cli": "^0.18.3",
|
|
2292
2421
|
"@size-limit/preset-small-lib": "^12.1.0",
|
|
2293
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
2294
|
-
"@vue/test-utils": "^2.4.
|
|
2422
|
+
"@vitejs/plugin-vue": "^6.0.7",
|
|
2423
|
+
"@vue/test-utils": "^2.4.11",
|
|
2295
2424
|
"cross-env": "^7.0.3",
|
|
2296
2425
|
jsdom: "^29.1.1",
|
|
2297
|
-
publint: "^0.3.
|
|
2426
|
+
publint: "^0.3.21",
|
|
2298
2427
|
"size-limit": "^12.1.0",
|
|
2299
2428
|
typescript: "~6.0.3",
|
|
2300
2429
|
"unplugin-icons": "^23.0.1",
|
|
2301
|
-
vite: "^8.0.
|
|
2302
|
-
"vite-plugin-babel": "^1.3
|
|
2430
|
+
vite: "^8.0.16",
|
|
2431
|
+
"vite-plugin-babel": "^1.7.3",
|
|
2303
2432
|
"vite-plugin-css-injected-by-js": "^5.0.1",
|
|
2304
|
-
"vite-plugin-dts": "^5.0.
|
|
2305
|
-
vitest: "^4.1.
|
|
2306
|
-
vue: "^3.5.
|
|
2433
|
+
"vite-plugin-dts": "^5.0.2",
|
|
2434
|
+
vitest: "^4.1.8",
|
|
2435
|
+
vue: "^3.5.35"
|
|
2307
2436
|
}
|
|
2308
|
-
}.version,
|
|
2309
|
-
function
|
|
2310
|
-
|
|
2437
|
+
}.version, Rr = null;
|
|
2438
|
+
function zr(e) {
|
|
2439
|
+
Rr = e;
|
|
2311
2440
|
}
|
|
2312
|
-
function
|
|
2441
|
+
function Br(e) {
|
|
2313
2442
|
if (e.container == null) throw Error("[@363045841yyt/klinechart] createChart: `container` is required and must be a non-null HTMLElement");
|
|
2314
|
-
if (
|
|
2315
|
-
return
|
|
2443
|
+
if (Rr === null) throw Error("[@363045841yyt/klinechart] createChart: no ChartController factory registered. Call __setControllerFactory(...) before mounting (the core package wires this in production).");
|
|
2444
|
+
return Rr(e);
|
|
2316
2445
|
}
|
|
2317
2446
|
function $(e) {
|
|
2318
2447
|
let t = D(e.peek());
|
|
@@ -2320,15 +2449,15 @@ function $(e) {
|
|
|
2320
2449
|
t.value = e.peek();
|
|
2321
2450
|
})), t;
|
|
2322
2451
|
}
|
|
2323
|
-
function
|
|
2452
|
+
function Vr(e, t) {
|
|
2324
2453
|
let n = D(null), r = (e) => {
|
|
2325
|
-
e == null || n.value != null || (n.value =
|
|
2454
|
+
e == null || n.value != null || (n.value = Br({
|
|
2326
2455
|
...t,
|
|
2327
2456
|
container: e
|
|
2328
2457
|
}));
|
|
2329
2458
|
};
|
|
2330
2459
|
r(e.value);
|
|
2331
|
-
let i =
|
|
2460
|
+
let i = j(e, (e) => {
|
|
2332
2461
|
r(e);
|
|
2333
2462
|
}, {
|
|
2334
2463
|
immediate: !0,
|
|
@@ -2340,7 +2469,7 @@ function qr(e, t) {
|
|
|
2340
2469
|
};
|
|
2341
2470
|
return b(a), v(a), { chart: n };
|
|
2342
2471
|
}
|
|
2343
|
-
function
|
|
2472
|
+
function Hr(e) {
|
|
2344
2473
|
let t = D(e.indicators.peek());
|
|
2345
2474
|
return b(e.indicators.subscribe(() => {
|
|
2346
2475
|
t.value = e.indicators.peek();
|
|
@@ -2351,26 +2480,26 @@ function Jr(e) {
|
|
|
2351
2480
|
updateParams: e.updateIndicatorParams.bind(e)
|
|
2352
2481
|
};
|
|
2353
2482
|
}
|
|
2354
|
-
function
|
|
2483
|
+
function Ur(e) {
|
|
2355
2484
|
let t = D(e.interactionState.peek());
|
|
2356
2485
|
return b(e.interactionState.subscribe(() => {
|
|
2357
2486
|
t.value = e.interactionState.peek();
|
|
2358
2487
|
})), t;
|
|
2359
2488
|
}
|
|
2360
|
-
function
|
|
2489
|
+
function Wr(e) {
|
|
2361
2490
|
let t = D(e.paneRatios.peek());
|
|
2362
2491
|
return b(e.paneRatios.subscribe(() => {
|
|
2363
2492
|
t.value = e.paneRatios.peek();
|
|
2364
2493
|
})), t;
|
|
2365
2494
|
}
|
|
2366
|
-
function
|
|
2495
|
+
function Gr(e) {
|
|
2367
2496
|
let t = D(e.viewport.peek());
|
|
2368
2497
|
return b(e.viewport.subscribe(() => {
|
|
2369
2498
|
t.value = e.viewport.peek();
|
|
2370
2499
|
})), t;
|
|
2371
2500
|
}
|
|
2372
|
-
function
|
|
2373
|
-
let t =
|
|
2501
|
+
function Kr(e) {
|
|
2502
|
+
let t = ee({ catalog: e.catalog });
|
|
2374
2503
|
b(() => t.dispose());
|
|
2375
2504
|
let n = $(t.filteredMain), r = $(t.filteredSub), i = $(t.menuOpen), a = $(t.searchQuery);
|
|
2376
2505
|
function o(t) {
|
|
@@ -2398,7 +2527,7 @@ function Qr(e) {
|
|
|
2398
2527
|
isActive: c
|
|
2399
2528
|
};
|
|
2400
2529
|
}
|
|
2401
|
-
var
|
|
2530
|
+
var qr = u({
|
|
2402
2531
|
name: "KLineChart",
|
|
2403
2532
|
props: {
|
|
2404
2533
|
data: {
|
|
@@ -2431,7 +2560,7 @@ var $r = u({
|
|
|
2431
2560
|
y(() => {
|
|
2432
2561
|
let n = r.value;
|
|
2433
2562
|
n != null && (i.run(() => {
|
|
2434
|
-
if (a.value =
|
|
2563
|
+
if (a.value = Br({
|
|
2435
2564
|
container: n,
|
|
2436
2565
|
data: e.data,
|
|
2437
2566
|
initialZoomLevel: e.initialZoomLevel,
|
|
@@ -2445,9 +2574,9 @@ var $r = u({
|
|
|
2445
2574
|
};
|
|
2446
2575
|
n(), b(e.viewport.subscribe(n));
|
|
2447
2576
|
}
|
|
2448
|
-
}),
|
|
2577
|
+
}), j(() => e.data, (e) => {
|
|
2449
2578
|
a.value?.setData(e);
|
|
2450
|
-
}),
|
|
2579
|
+
}), j(() => e.theme, (e) => {
|
|
2451
2580
|
a.value?.setTheme(e);
|
|
2452
2581
|
}));
|
|
2453
2582
|
}), x(() => {
|
|
@@ -2477,9 +2606,9 @@ var $r = u({
|
|
|
2477
2606
|
}
|
|
2478
2607
|
});
|
|
2479
2608
|
}
|
|
2480
|
-
}),
|
|
2481
|
-
e.component("KLineChart",
|
|
2609
|
+
}), Jr = { install(e) {
|
|
2610
|
+
e.component("KLineChart", qr);
|
|
2482
2611
|
} };
|
|
2483
|
-
|
|
2612
|
+
zr(R);
|
|
2484
2613
|
//#endregion
|
|
2485
|
-
export { L as CORE_VERSION,
|
|
2614
|
+
export { L as CORE_VERSION, De as DrawingStyleToolbar, Je as IndicatorParams, jt as IndicatorSelector, qr as KLineChart, Ir as KLineChartVue, Kt as KLineTooltip, Jr as KMapPlugin, Tr as LeftToolbar, Yt as MarkerTooltip, Lr as VERSION, zr as __setControllerFactory, $ as coreSignalToVueRef, Br as createChart, Vr as useChart, Kr as useIndicatorSelector, Hr as useIndicators, Ur as useInteractionState, Wr as usePaneRatios, Gr as useViewport };
|