st-comp 0.0.207 → 0.0.209

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/es/KlinePlus.js CHANGED
@@ -48,13 +48,13 @@ const Ue = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPS
48
48
  // 每周1根(按5个交易日算)
49
49
  8: 0.033
50
50
  // 每月1根(按21个交易日算)
51
- }, me = ({ startTime: i, endTime: j, cycle: r, type: s = "end" }) => {
52
- const { maxValueSpan: u } = J, p = Math.ceil((u + 1e3) / Be[r]), D = Y(i);
51
+ }, me = ({ startTime: i, endTime: j, cycle: c, type: r = "end" }) => {
52
+ const { maxValueSpan: u } = J, p = Math.ceil((u + 1e3) / Be[c]), D = Y(i);
53
53
  if (Y(j).diff(D, "day") <= p)
54
54
  return [i, j];
55
- if (s === "end")
55
+ if (r === "end")
56
56
  return [Y(j).subtract(p, "day").format("YYYY-MM-DD HH:mm:ss"), j];
57
- if (s === "middle") {
57
+ if (r === "middle") {
58
58
  const h = Y((Y(i).valueOf() + Y(j).valueOf()) / 2).format("YYYY-MM-DD HH:mm:ss");
59
59
  return console.log("超过一屏数量上限, 进行中间时间计算", h, p / 2), [
60
60
  Y(h).subtract(p / 2, "day").format("YYYY-MM-DD HH:mm:ss"),
@@ -62,21 +62,21 @@ const Ue = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPS
62
62
  ];
63
63
  }
64
64
  }, Ze = (i, j) => {
65
- const r = i[j], s = j === 0 ? i[j] : i[j - 1];
66
- return r[0] === r[1] ? r[0] >= s[1] ? {
65
+ const c = i[j], r = j === 0 ? i[j] : i[j - 1];
66
+ return c[0] === c[1] ? c[0] >= r[1] ? {
67
67
  color: "transparent",
68
68
  borderColor: "#FF0000"
69
69
  } : {
70
70
  color: "#00FFFF"
71
- } : r[1] > r[0] ? {
71
+ } : c[1] > c[0] ? {
72
72
  color: "transparent",
73
73
  borderColor: "#FF0000"
74
74
  } : {
75
75
  color: "#00FFFF"
76
76
  };
77
- }, $e = (i, j, r) => {
77
+ }, $e = (i, j, c) => {
78
78
  var u, p, D, d;
79
- const s = i.subIndicator.map((e) => {
79
+ const r = i.subIndicator.map((e) => {
80
80
  if (e.series === "bar")
81
81
  return {
82
82
  name: "subMain",
@@ -129,7 +129,7 @@ const Ue = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPS
129
129
  {
130
130
  type: "inside",
131
131
  startValue: j,
132
- endValue: r,
132
+ endValue: c,
133
133
  maxValueSpan: J.maxValueSpan
134
134
  }
135
135
  ],
@@ -199,39 +199,39 @@ const Ue = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPS
199
199
  }
200
200
  }
201
201
  ],
202
- series: s
202
+ series: r
203
203
  };
204
- }, ze = (i, j, r = "strict") => {
205
- let s = 0, u = i.length - 1, p = -1;
206
- for (; s <= u; ) {
207
- let D = Math.floor((s + u) / 2);
208
- if (r === "strict") {
204
+ }, ze = (i, j, c = "strict") => {
205
+ let r = 0, u = i.length - 1, p = -1;
206
+ for (; r <= u; ) {
207
+ let D = Math.floor((r + u) / 2);
208
+ if (c === "strict") {
209
209
  if (i[D] === j)
210
210
  return D;
211
- i[D] < j ? s = D + 1 : u = D - 1;
211
+ i[D] < j ? r = D + 1 : u = D - 1;
212
212
  } else
213
- r === "gte" && (i[D] >= j ? (p = D, u = D - 1) : s = D + 1);
213
+ c === "gte" && (i[D] >= j ? (p = D, u = D - 1) : r = D + 1);
214
214
  }
215
- return r === "strict" ? -1 : p;
215
+ return c === "strict" ? -1 : p;
216
216
  }, Ge = (i) => {
217
217
  const j = [];
218
- return i.reduce((r, s) => {
219
- const u = `${s.coord[0]}+${s.label.position}`, p = s.label.position === "top" ? -16 : 16, D = r.get(u);
220
- return D ? (r.set(u, D + 1), s.symbolOffset[1] = p * (D + 1)) : (r.set(u, 1), s.symbolOffset[1] = s.label.position === "top" ? -7 : 7), j.push(s), r;
218
+ return i.reduce((c, r) => {
219
+ const u = `${r.coord[0]}+${r.label.position}`, p = r.label.position === "top" ? -16 : 16, D = c.get(u);
220
+ return D ? (c.set(u, D + 1), r.symbolOffset[1] = p * (D + 1)) : (c.set(u, 1), r.symbolOffset[1] = r.label.position === "top" ? -7 : 7), j.push(r), c;
221
221
  }, /* @__PURE__ */ new Map()), j;
222
222
  }, Ae = (i, j) => ({
223
223
  data: [...i.data, ...j.data.slice(1)],
224
- mainIndicator: i.mainIndicator.map((r, s) => ({
225
- ...r,
226
- data: [...r.data, ...j.mainIndicator[s].data.slice(1)]
224
+ mainIndicator: i.mainIndicator.map((c, r) => ({
225
+ ...c,
226
+ data: [...c.data, ...j.mainIndicator[r].data.slice(1)]
227
227
  })),
228
- subIndicator: i.subIndicator.map((r, s) => ({
229
- ...r,
230
- data: [...r.data, ...j.subIndicator[s].data.slice(1)]
228
+ subIndicator: i.subIndicator.map((c, r) => ({
229
+ ...c,
230
+ data: [...c.data, ...j.subIndicator[r].data.slice(1)]
231
231
  })),
232
232
  time: [...i.time, ...j.time.slice(1)]
233
- }), ye = (i, j, r) => {
234
- switch (r) {
233
+ }), ye = (i, j, c) => {
234
+ switch (c) {
235
235
  case "5": {
236
236
  let g = [
237
237
  ...new Set(
@@ -242,9 +242,9 @@ const Ue = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPS
242
242
  )
243
243
  ];
244
244
  g.includes("00:00:00") && (g.splice(g.indexOf("00:00:00"), 1), g.push("24:00:00")), g = g.sort((z, n) => (/* @__PURE__ */ new Date(`2000-01-30 ${z}`)).getTime() - (/* @__PURE__ */ new Date(`2000-01-30 ${n}`)).getTime());
245
- const f = new Date(j), l = f.getFullYear(), c = String(f.getMonth() + 1).padStart(2, "0"), a = String(f.getDate()).padStart(2, "0"), x = String(f.getHours()).padStart(2, "0"), L = String(f.getMinutes()).padStart(2, "0"), t = String(f.getSeconds()).padStart(2, "0");
245
+ const f = new Date(j), s = f.getFullYear(), N = String(f.getMonth() + 1).padStart(2, "0"), a = String(f.getDate()).padStart(2, "0"), x = String(f.getHours()).padStart(2, "0"), L = String(f.getMinutes()).padStart(2, "0"), t = String(f.getSeconds()).padStart(2, "0");
246
246
  if (`${x}:${L}:${t}` == "00:00:00")
247
- return `${l}-${c}-${a} 01:00:00`;
247
+ return `${s}-${N}-${a} 01:00:00`;
248
248
  {
249
249
  let z = null;
250
250
  for (let n = 0; n < g.length; n++) {
@@ -260,46 +260,46 @@ const Ue = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPS
260
260
  const T = n.getFullYear(), y = String(n.getMonth() + 1).padStart(2, "0"), O = String(n.getDate()).padStart(2, "0");
261
261
  return `${T}-${y}-${O} 00:00:00`;
262
262
  }
263
- return `${l}-${c}-${a} ${z}`;
263
+ return `${s}-${N}-${a} ${z}`;
264
264
  }
265
265
  }
266
266
  case "6": {
267
267
  const g = new Date(j), f = g.getHours();
268
268
  if (f >= 4 && f < 21) {
269
- const l = g.getFullYear(), c = String(g.getMonth() + 1).padStart(2, "0"), a = String(g.getDate()).padStart(2, "0");
270
- return `${l}-${c}-${a} 09:00:00`;
269
+ const s = g.getFullYear(), N = String(g.getMonth() + 1).padStart(2, "0"), a = String(g.getDate()).padStart(2, "0");
270
+ return `${s}-${N}-${a} 09:00:00`;
271
271
  } else {
272
- const l = new Date(j);
273
- l.getHours() >= 21 && l.setDate(l.getDate() + 1);
274
- const c = l.getFullYear(), a = String(l.getMonth() + 1).padStart(2, "0"), x = String(l.getDate()).padStart(2, "0"), L = `${c}-${a}-${x} 09:00:00`, t = ze(i, L, "gte");
272
+ const s = new Date(j);
273
+ s.getHours() >= 21 && s.setDate(s.getDate() + 1);
274
+ const N = s.getFullYear(), a = String(s.getMonth() + 1).padStart(2, "0"), x = String(s.getDate()).padStart(2, "0"), L = `${N}-${a}-${x} 09:00:00`, t = ze(i, L, "gte");
275
275
  return t === -1 ? L : i[t];
276
276
  }
277
277
  }
278
278
  case "7": {
279
279
  const g = new Date(j), f = new Date(g);
280
280
  f.setDate(g.getDate() - g.getDay()), f.setHours(0, 0, 0, 0);
281
- const l = new Date(f);
282
- l.setDate(f.getDate() + 5), l.setHours(23, 59, 59, 0);
283
- const c = new Date(f);
284
- c.setDate(f.getDate() + 12), c.setHours(9, 0, 0, 0);
285
- const a = g <= l ? l : c, x = a.getFullYear(), L = String(a.getMonth() + 1).padStart(2, "0"), t = String(a.getDate()).padStart(2, "0");
281
+ const s = new Date(f);
282
+ s.setDate(f.getDate() + 5), s.setHours(23, 59, 59, 0);
283
+ const N = new Date(f);
284
+ N.setDate(f.getDate() + 12), N.setHours(9, 0, 0, 0);
285
+ const a = g <= s ? s : N, x = a.getFullYear(), L = String(a.getMonth() + 1).padStart(2, "0"), t = String(a.getDate()).padStart(2, "0");
286
286
  return `${x}-${L}-${t} 09:00:00`;
287
287
  }
288
288
  case "8": {
289
- const g = new Date(j), f = new Date(g.getFullYear(), g.getMonth() + 1, 1), l = new Date(f);
290
- l.setDate(f.getDate() - 1), l.setHours(9, 0, 0, 0);
291
- const c = l.getFullYear(), a = String(l.getMonth() + 1).padStart(2, "0"), x = String(l.getDate()).padStart(2, "0");
292
- return `${c}-${a}-${x} 09:00:00`;
289
+ const g = new Date(j), f = new Date(g.getFullYear(), g.getMonth() + 1, 1), s = new Date(f);
290
+ s.setDate(f.getDate() - 1), s.setHours(9, 0, 0, 0);
291
+ const N = s.getFullYear(), a = String(s.getMonth() + 1).padStart(2, "0"), x = String(s.getDate()).padStart(2, "0");
292
+ return `${N}-${a}-${x} 09:00:00`;
293
293
  }
294
294
  }
295
- const s = new Date(j), u = s.getFullYear(), p = s.getMonth(), D = s.getDate(), d = s.getHours(), e = s.getMinutes(), h = s.getSeconds(), Q = (g) => {
295
+ const r = new Date(j), u = r.getFullYear(), p = r.getMonth(), D = r.getDate(), d = r.getHours(), e = r.getMinutes(), h = r.getSeconds(), Q = (g) => {
296
296
  let f = null;
297
- const l = Math.floor(e / g);
298
- e % g === 0 && h === 0 ? f = e : f = (l + 1) * g;
299
- const c = Math.floor(f / 60), a = d + c, x = f % 60, L = new Date(u, p, D, a, x, 0), t = (E) => String(E).padStart(2, "0"), z = L.getFullYear(), n = t(L.getMonth() + 1), T = t(L.getDate()), y = t(L.getHours()), O = t(L.getMinutes());
297
+ const s = Math.floor(e / g);
298
+ e % g === 0 && h === 0 ? f = e : f = (s + 1) * g;
299
+ const N = Math.floor(f / 60), a = d + N, x = f % 60, L = new Date(u, p, D, a, x, 0), t = (E) => String(E).padStart(2, "0"), z = L.getFullYear(), n = t(L.getMonth() + 1), T = t(L.getDate()), y = t(L.getHours()), O = t(L.getMinutes());
300
300
  return `${z}-${n}-${T} ${y}:${O}:00`;
301
301
  };
302
- switch (r) {
302
+ switch (c) {
303
303
  case "1":
304
304
  return Q(1);
305
305
  case "2":
@@ -309,33 +309,33 @@ const Ue = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPS
309
309
  case "4":
310
310
  return Q(30);
311
311
  default:
312
- throw new Error(`Unsupported cycle: ${j} ${r}`);
312
+ throw new Error(`Unsupported cycle: ${j} ${c}`);
313
313
  }
314
- }, ue = (i, j, r) => {
315
- let s = null, u = null;
314
+ }, ue = (i, j, c) => {
315
+ let r = null, u = null;
316
316
  const [p, D] = j;
317
- switch (r) {
317
+ switch (c) {
318
318
  case "6": {
319
- s = i.find((d) => new Date(Y(d).format("YYYY-MM-DD 23:59:59")).getTime() >= new Date(p).getTime()), u = i.findLast((d) => new Date(Y(d).format("YYYY-MM-DD 00:00:00")).getTime() <= new Date(D).getTime());
319
+ r = i.find((d) => new Date(Y(d).format("YYYY-MM-DD 23:59:59")).getTime() >= new Date(p).getTime()), u = i.findLast((d) => new Date(Y(d).format("YYYY-MM-DD 00:00:00")).getTime() <= new Date(D).getTime());
320
320
  break;
321
321
  }
322
322
  case "7": {
323
323
  const d = Y(D).endOf("week").add(1, "day").format("YYYY-MM-DD 23:59:59");
324
- s = i.find((e) => Y(e).endOf("week").add(1, "day").format("YYYY-MM-DD") === Y(p).endOf("week").add(1, "day").format("YYYY-MM-DD")), u = i.findLast((e) => new Date(e).getTime() <= new Date(d).getTime());
324
+ r = i.find((e) => Y(e).endOf("week").add(1, "day").format("YYYY-MM-DD") === Y(p).endOf("week").add(1, "day").format("YYYY-MM-DD")), u = i.findLast((e) => new Date(e).getTime() <= new Date(d).getTime());
325
325
  break;
326
326
  }
327
327
  case "8": {
328
- s = i.find((d) => Y(d).format("YYYY-MM") === Y(p).format("YYYY-MM")), u = i.findLast((d) => Y(d).format("YYYY-MM") === Y(D).format("YYYY-MM"));
328
+ r = i.find((d) => Y(d).format("YYYY-MM") === Y(p).format("YYYY-MM")), u = i.findLast((d) => Y(d).format("YYYY-MM") === Y(D).format("YYYY-MM"));
329
329
  break;
330
330
  }
331
331
  default:
332
- s = i.find((d) => new Date(d).getTime() >= new Date(p).getTime()), u = i.findLast((d) => new Date(d).getTime() <= new Date(D).getTime());
332
+ r = i.find((d) => new Date(d).getTime() >= new Date(p).getTime()), u = i.findLast((d) => new Date(d).getTime() <= new Date(D).getTime());
333
333
  }
334
- return [s, u];
335
- }, We = (i, j, r, s, u, p) => {
336
- const D = (l, c) => {
337
- const { direction: a = "", tradeAction: x = "", tradeType: L = "" } = l, t = L ?? a + x;
338
- switch (c) {
334
+ return [r, u];
335
+ }, We = (i, j, c, r, u, p) => {
336
+ const D = (s, N) => {
337
+ const { direction: a = "", tradeAction: x = "", tradeType: L = "" } = s, t = L ?? a + x;
338
+ switch (N) {
339
339
  case 0:
340
340
  return (/* @__PURE__ */ new Map([
341
341
  ["开多", "买"],
@@ -346,13 +346,13 @@ const Ue = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPS
346
346
  case 1:
347
347
  return L ?? a + x;
348
348
  }
349
- }, d = (l, c, a, x) => l.reduce((L, t) => {
349
+ }, d = (s, N, a, x) => s.reduce((L, t) => {
350
350
  var R;
351
- const z = D(t, 0), n = l.filter((H) => H.klineTime === t.klineTime), T = [...new Set(n.map((H) => D(H, 0)))];
351
+ const z = D(t, 0), n = s.filter((H) => H.klineTime === t.klineTime), T = [...new Set(n.map((H) => D(H, 0)))];
352
352
  let y = null;
353
353
  T.length > 1 ? y = "image://" + new URL("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjgzNzAzMjI4MjAyIiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjMwNzgiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTE5OC4wMTYgMTA5LjczODY2N0E3Ny44NjY2NjcgNzcuODY2NjY3IDAgMCAwIDE3MC42NjY2NjcgMTY3LjY4bDAuNTEyIDQxOC45NDRjMCAyMi44NjkzMzMgNi40IDQ4IDE5LjAyOTMzMyA3NS4zMDY2NjcgMTIuNjcyIDI3LjIyMTMzMyAyNy45ODkzMzMgNDguOTM4NjY3IDQ1Ljk1MiA2NC45Mzg2NjZsMjExLjE1NzMzMyAxODguMjAyNjY3YzE3LjA2NjY2NyAxNS40ODggNDAuNTc2IDIzLjk3ODY2NyA2NC45Mzg2NjcgMjMuNTk0NjY3IDI1LjY4NTMzMy0wLjA4NTMzMyA0Ny4zNi03LjkzNiA2NC45ODEzMzMtMjMuNTk0NjY3bDIxMS4yLTE4OC4yMDI2NjdjMTcuOTItMTYgMzMuMTk0NjY3LTM3LjYzMiA0NS44NjY2NjctNjQuOTM4NjY2IDEyLjY3Mi0yNy4zMDY2NjcgMTguNzczMzMzLTUyLjIyNCAxOC41MTczMzMtNzQuOTIyNjY3TDg1My4zMzMzMzMgMTY3LjI1MzMzM2MwLTIyLjI3Mi04Ljk2LTQxLjQ3Mi0yNi44MzczMzMtNTcuNDcyLTE3LjU3ODY2Ny0xNS42MTYtMzkuMzM4NjY3LTIzLjg5MzMzMy02NC45Mzg2NjctMjQuNDA1MzMzbC00OTkuMDI5MzMzIDAuNDY5MzMzYTkzLjMxMiA5My4zMTIgMCAwIDAtNjQuNTEyIDIzLjg5MzMzNHoiIGZpbGw9IiNDODgwRkYiIHAtaWQ9IjMwNzkiPjwvcGF0aD48cGF0aCBkPSJNMTcwLjY2NjY2NyAxNjcuNjhjMC4xMjgtMjEuNzYgOS45NDEzMzMtNDIuNjY2NjY3IDI3LjM0OTMzMy01Ny45NDEzMzNhOTMuMzEyIDkzLjMxMiAwIDAgMSA2NC41MTItMjMuODkzMzM0TDc2MS41NTczMzMgODUuMzMzMzMzYzI1LjYgMC41NTQ2NjcgNDcuMzYgOC43ODkzMzMgNjQuOTM4NjY3IDI0LjQwNTMzNCAxNy45MiAxNiAyNi44MzczMzMgMzUuMiAyNi44MzczMzMgNTcuNDcybC0wLjUxMiA0MTkuODRjMC4yOTg2NjcgMjIuNjU2LTUuODQ1MzMzIDQ3LjYxNi0xOC41MTczMzMgNzQuODgtMTIuNjcyIDI3LjMwNjY2Ny0yNy45NDY2NjcgNDguOTM4NjY3LTQ1Ljg2NjY2NyA2NC45Mzg2NjZsLTIxMS4yIDE4OC4yMDI2NjdjLTE3LjYyMTMzMyAxNS42NTg2NjctMzkuMjUzMzMzIDIzLjUwOTMzMy02NC45ODEzMzMgMjMuNTk0NjY3YTk0LjcyIDk0LjcyIDAgMCAxLTY0LjkzODY2Ny0yMy41OTQ2NjdsLTIxMS4yLTE4OC4yMDI2NjdjLTE3LjkyLTE2LTMzLjIzNzMzMy0zNy43MTczMzMtNDUuOTA5MzMzLTY0LjkzODY2Ni0xMi42MjkzMzMtMjcuMzA2NjY3LTE5LjAyOTMzMy01Mi40MzczMzMtMTkuMDI5MzMzLTc1LjMwNjY2N0wxNzAuNjY2NjY3IDE2Ny42OHogbTQyLjYyNCAwLjI1NmwwLjU1NDY2NiA0MTguNjg4YzAgMTYuMTcwNjY3IDQuODY0IDM1LjMyOCAxNS4wNjEzMzQgNTcuMzQ0IDEwLjM2OCAyMi4yNzIgMjIuMzE0NjY3IDM5LjE2OCAzNS42MjY2NjYgNTEuMDI5MzMzbDIxMS40MTMzMzQgMTg4LjQxNmM4Ljk2IDguMTA2NjY3IDIxLjg4OCAxMi44IDM2LjIyNCAxMi41ODY2NjcgMTUuNTMwNjY3LTAuMDQyNjY3IDI3LjA5MzMzMy00LjI2NjY2NyAzNi42OTMzMzMtMTIuOGwyMTEuMTE0NjY3LTE4OC4xNmMxMy4zNTQ2NjctMTEuOTQ2NjY3IDI1LjMwMTMzMy0yOC44NDI2NjcgMzUuNjI2NjY2LTUxLjA3MiAxMC4xMTItMjEuNzYgMTQuNzYyNjY3LTQwLjUzMzMzMyAxNC41MDY2NjctNTcuMDAyNjY3TDgxMC42NjY2NjcgMTY3LjIxMDY2N2MwLTkuODk4NjY3LTMuNTg0LTE3LjYyMTMzMy0xMi41MDEzMzQtMjUuNkE1NC42OTg2NjcgNTQuNjk4NjY3IDAgMCAwIDc2MS42IDEyOGwtNDk5LjYyNjY2NyAwLjQ2OTMzM2E1MS4zMjggNTEuMzI4IDAgMCAwLTM1Ljc1NDY2NiAxMy4yNjkzMzQgMzYuNTY1MzMzIDM2LjU2NTMzMyAwIDAgMC0xMi41MDEzMzQgMjEuNTA0bC0wLjQyNjY2NiA0LjY5MzMzM3oiIGZpbGw9IiNBRTQ0RkYiIHAtaWQ9IjMwODAiPjwvcGF0aD48cGF0aCBkPSJNNDc1LjMwNjY2NyA2NTguMjE4NjY3aDczLjQ3MlYzMDYuMzg5MzMzaDExNi40OFYyNDguNDQ4aC0zMDcuNjI2NjY3djU3Ljk0MTMzM2gxMTcuNjc0NjY3eiIgZmlsbD0iI0ZGRkZGRiIgcC1pZD0iMzA4MSI+PC9wYXRoPjwvc3ZnPg==", self.location).href : y = "image://" + new URL((/* @__PURE__ */ Object.assign({ "./images/buy.svg": Ue, "./images/sell.svg": Ve, "./images/t.svg": He }))[`./images/${z === "买" ? "buy" : "sell"}.svg`], self.location).href;
354
354
  const O = ze(a, t.klineTime), E = (R = x[O]) == null ? void 0 : R[3];
355
- return c.forEach((H) => {
355
+ return N.forEach((H) => {
356
356
  var K;
357
357
  const F = z === "买" ? 0 : 1;
358
358
  H.range[F] === t.klineTime && (H.rangeValue[F] = (K = x[O]) == null ? void 0 : K[z === "买" ? 2 : 3]);
@@ -382,8 +382,8 @@ const Ue = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPS
382
382
  // 收仓价
383
383
  }
384
384
  }), L;
385
- }, []), e = (l, c, a, x) => {
386
- const { sellBuyByPrice: L } = p, t = l.reduce((z, n, T) => {
385
+ }, []), e = (s, N, a, x) => {
386
+ const { sellBuyByPrice: L } = p, t = s.reduce((z, n, T) => {
387
387
  var R, H;
388
388
  const y = D(n, 1), O = ["开多", "开空"].includes(y) ? "top" : "bottom";
389
389
  let E = null;
@@ -393,7 +393,7 @@ const Ue = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPS
393
393
  const F = ze(a, n.klineTime);
394
394
  E = O === "top" ? (R = x[F]) == null ? void 0 : R[3] : (H = x[F]) == null ? void 0 : H[2];
395
395
  }
396
- return c.forEach((F) => {
396
+ return N.forEach((F) => {
397
397
  (O === "top" ? F.range[0] : F.range[1]) === n.klineTime && (F.rangeValue[O === "top" ? 0 : 1] = E);
398
398
  }), z.push({
399
399
  symbol: "triangle",
@@ -426,8 +426,8 @@ const Ue = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPS
426
426
  }), z;
427
427
  }, []);
428
428
  return L ? t : Ge(t);
429
- }, h = (l, c, a) => {
430
- const { basePointData: x, baseLineData: L } = l.reduce(
429
+ }, h = (s, N, a) => {
430
+ const { basePointData: x, baseLineData: L } = s.reduce(
431
431
  (T, y) => {
432
432
  const O = {
433
433
  pointTime: y.openTime,
@@ -447,7 +447,7 @@ const Ue = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPS
447
447
  // 开仓总价
448
448
  closePriceAll: y.closePrice * y.tradeVolume,
449
449
  // 平仓总价
450
- klineTime: ye(a, y.openTime, c)
450
+ klineTime: ye(a, y.openTime, N)
451
451
  // K线时间
452
452
  }, E = {
453
453
  pointTime: y.closeTime,
@@ -467,7 +467,7 @@ const Ue = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPS
467
467
  // 开仓总价
468
468
  closePriceAll: y.closePrice * y.tradeVolume,
469
469
  // 平仓总价
470
- klineTime: ye(a, y.closeTime, c)
470
+ klineTime: ye(a, y.closeTime, N)
471
471
  // K线时间
472
472
  }, R = {
473
473
  range: [O.klineTime, E.klineTime],
@@ -491,43 +491,43 @@ const Ue = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPS
491
491
  return T.set(E, O), T;
492
492
  }, /* @__PURE__ */ new Map([])).values()].sort((T, y) => new Date(T.klineTime) - new Date(y.klineTime)), n = L.filter(({ range: T }) => T[0] !== T[1]);
493
493
  return { pointData: z, lineData: n };
494
- }, { pointData: Q, lineData: g } = h(i, j, s);
494
+ }, { pointData: Q, lineData: g } = h(i, j, r);
495
495
  return {
496
- tradePointData: (r === 0 ? d : e)(Q, g, s, u),
497
- tradeLineData: g.map(({ range: l, rangeValue: c, color: a }) => [
496
+ tradePointData: (c === 0 ? d : e)(Q, g, r, u),
497
+ tradeLineData: g.map(({ range: s, rangeValue: N, color: a }) => [
498
498
  {
499
499
  symbol: "none",
500
- coord: [l[0], c[0]],
500
+ coord: [s[0], N[0]],
501
501
  lineStyle: { color: a, width: 2, type: "solid" },
502
502
  silent: !0,
503
503
  animation: !1
504
504
  },
505
505
  {
506
506
  symbol: "none",
507
- coord: [l[1], c[1]],
507
+ coord: [s[1], N[1]],
508
508
  silent: !0,
509
509
  animation: !1
510
510
  }
511
511
  ])
512
512
  };
513
513
  }, Je = (i, j) => {
514
- let r = [];
514
+ let c = [];
515
515
  if (Number(j) <= 5)
516
- r = i.map(({ tradeDate: s, netPositionValue: u }) => [Y(s).format("YYYY-MM-DD HH:mm:ss"), u]);
516
+ c = i.map(({ tradeDate: r, netPositionValue: u }) => [Y(r).format("YYYY-MM-DD HH:mm:ss"), u]);
517
517
  else if (Number(j) === 6) {
518
- const s = i.reduce((u, p) => {
518
+ const r = i.reduce((u, p) => {
519
519
  const { tradeDate: D, netPositionValue: d } = p;
520
520
  return u.set(Y(D).format("YYYY-MM-DD 09:00:00"), d), u;
521
521
  }, /* @__PURE__ */ new Map());
522
- r = Array.from(s, ([u, p]) => [u, p]);
522
+ c = Array.from(r, ([u, p]) => [u, p]);
523
523
  } else
524
- r = [];
525
- return { netPositionLineData: r };
526
- }, Ke = (i, j, r, s) => {
524
+ c = [];
525
+ return { netPositionLineData: c };
526
+ }, Ke = (i, j, c, r) => {
527
527
  let u = [];
528
528
  if (["6", "7", "8"].includes(j)) {
529
529
  const p = i.reduce((D, d) => {
530
- const e = ye(s, d.date, j), h = d[r === 0 ? "simple" : "compound"];
530
+ const e = ye(r, d.date, j), h = d[c === 0 ? "simple" : "compound"];
531
531
  return D.set(e, h), D;
532
532
  }, /* @__PURE__ */ new Map());
533
533
  u = Array.from(p, ([D, d]) => [D, d]);
@@ -544,12 +544,12 @@ const qe = { class: "tips" }, Xe = {
544
544
  }
545
545
  },
546
546
  setup(i) {
547
- return (j, r) => (_(), Z("div", qe, [
548
- (_(!0), Z(pe, null, we(i.data, (s, u) => (_(), Z("span", {
547
+ return (j, c) => (_(), Z("div", qe, [
548
+ (_(!0), Z(pe, null, we(i.data, (r, u) => (_(), Z("span", {
549
549
  key: u,
550
550
  class: "item",
551
- style: Se({ color: s.color })
552
- }, ie(s.label) + " " + ie(s.value), 5))), 128))
551
+ style: Se({ color: r.color })
552
+ }, ie(r.label) + " " + ie(r.value), 5))), 128))
553
553
  ]));
554
554
  }
555
555
  }, je = /* @__PURE__ */ de(Xe, [["__scopeId", "data-v-df1caefe"]]);
@@ -573,17 +573,17 @@ const et = {
573
573
  // 三方标记(不需要token授权)
574
574
  },
575
575
  emits: ["change"],
576
- setup(i, { expose: j, emit: r }) {
577
- const { request: s } = fe("stConfig");
576
+ setup(i, { expose: j, emit: c }) {
577
+ const { request: r } = fe("stConfig");
578
578
  let u = null;
579
- const p = V(null), D = r, d = i, e = V({
579
+ const p = V(null), D = c, d = i, e = V({
580
580
  data: [],
581
581
  // <[开 收 低 高 成交额 涨跌值 涨跌百分比]>
582
582
  mainIndicator: [],
583
583
  subIndicator: [],
584
584
  time: []
585
585
  }), h = async () => {
586
- const l = {
586
+ const s = {
587
587
  varietyCode: d.varietyCode,
588
588
  cycle: "6",
589
589
  right: d.varietyStock === 1 ? d.rightType : 0,
@@ -594,20 +594,20 @@ const et = {
594
594
  endTime: Y().format("YYYY-MM-DD 23:59:59"),
595
595
  deleteFirstNumber: d.deleteFirstNumber,
596
596
  withoutPermission: d.withoutPermission
597
- }, { body: c } = await s.post("/middleLayer/kline/getKline", l);
598
- c ? e.value = c : e.value = { data: [], mainIndicator: [], subIndicator: [], time: [] }, f("init");
599
- }, Q = ne((l) => {
600
- if (!l.dataZoomId)
597
+ }, { body: N } = await r.post("/middleLayer/kline/getKline", s);
598
+ N ? e.value = N : e.value = { data: [], mainIndicator: [], subIndicator: [], time: [] }, f("init");
599
+ }, Q = ne((s) => {
600
+ if (!s.dataZoomId)
601
601
  return;
602
- const c = u.getOption();
603
- if (c != null && c.dataZoom[0]) {
602
+ const N = u.getOption();
603
+ if (N != null && N.dataZoom[0]) {
604
604
  const { startValue: a, endValue: x } = u.getOption().dataZoom[0], { time: L } = e.value, t = `${L[a].split(" ")[0]} 00:00:00`, z = `${L[x].split(" ")[0]} 23:59:59`;
605
605
  console.log(`检测到拖拽轴被拖动, 时间区间: ${t} - ${z}`), D("change", { startTime: t, endTime: z });
606
606
  }
607
- }, 200), g = ne(({ startTime: l, endTime: c }) => {
608
- f("reset", { startTime: l, endTime: c });
609
- }, 100), f = (l, c) => {
610
- switch (l) {
607
+ }, 200), g = ne(({ startTime: s, endTime: N }) => {
608
+ f("reset", { startTime: s, endTime: N });
609
+ }, 100), f = (s, N) => {
610
+ switch (s) {
611
611
  case "init": {
612
612
  const { data: a, time: x } = e.value, { xAxisData: L, lineData: t } = a.reduce(
613
613
  (n, T, y) => (n.xAxisData.push(x[y].split(" ")[0]), n.lineData.push(T[1]), n),
@@ -655,7 +655,7 @@ const et = {
655
655
  break;
656
656
  }
657
657
  case "reset": {
658
- const { time: a } = e.value, x = Y(c.startTime).format("YYYY-MM-DD"), L = Y(c.endTime).format("YYYY-MM-DD");
658
+ const { time: a } = e.value, x = Y(N.startTime).format("YYYY-MM-DD"), L = Y(N.endTime).format("YYYY-MM-DD");
659
659
  let t = -1, z = -1;
660
660
  for (let n = 0; n < a.length; n++) {
661
661
  const T = Y(a[n]).format("YYYY-MM-DD");
@@ -678,16 +678,16 @@ const et = {
678
678
  });
679
679
  }), ae(
680
680
  () => d.screenTimeRange,
681
- (l) => {
682
- const [c, a] = l;
683
- g({ startTime: c, endTime: a });
681
+ (s) => {
682
+ const [N, a] = s;
683
+ g({ startTime: N, endTime: a });
684
684
  },
685
685
  { deep: !0 }
686
686
  ), Oe(() => {
687
687
  u.off("datazoom"), u.dispose();
688
688
  }), j({
689
689
  resize: ne(() => u.resize(), 100)
690
- }), (l, c) => (_(), Z("div", {
690
+ }), (s, N) => (_(), Z("div", {
691
691
  class: "chart",
692
692
  ref_key: "sliderChartRef",
693
693
  ref: p
@@ -742,8 +742,8 @@ const Mt = { class: "main-chart" }, at = { class: "indicator" }, it = {
742
742
  // 三方标记(不需要token授权)
743
743
  },
744
744
  setup(i, { expose: j }) {
745
- const { round: r, formatValue: s } = Ce, { request: u } = fe("stConfig"), p = V(), D = V(!1), d = V(!1), e = i;
746
- let h = !1, Q = !1, g = !1, f = !1, l = null, c = null, a = null;
745
+ const { round: c, formatValue: r } = Ce, { request: u } = fe("stConfig"), p = V(), D = V(!1), d = V(!1), e = i;
746
+ let h = !1, Q = !1, g = !1, f = !1, s = null, N = null, a = null;
747
747
  const x = V(null), L = V(null), t = V({
748
748
  data: [],
749
749
  mainIndicator: [],
@@ -761,20 +761,20 @@ const Mt = { class: "main-chart" }, at = { class: "indicator" }, it = {
761
761
  { label: "涨跌", value: "-" }
762
762
  ];
763
763
  const o = [
764
- { label: "开", value: r(M[0]) },
765
- { label: "高", value: r(M[3]) },
766
- { label: "低", value: r(M[2]) },
767
- { label: "收", value: r(M[1]) }
764
+ { label: "开", value: M[0] },
765
+ { label: "高", value: M[3] },
766
+ { label: "低", value: M[2] },
767
+ { label: "收", value: M[1] }
768
768
  ];
769
- M[4] !== null && o.push({ label: "额", value: s(M[4]) });
770
- let N;
771
- return M[6] > 0 ? N = "red" : M[6] < 0 && (N = "green"), o.push({ label: "涨跌", value: `${r(M[6])}%`, color: N }), o;
769
+ M[4] !== null && o.push({ label: "额", value: r(M[4]) });
770
+ let l;
771
+ return M[6] > 0 ? l = "red" : M[6] < 0 && (l = "green"), o.push({ label: "涨跌", value: `${c(M[6])}%`, color: l }), o;
772
772
  }), E = ce(() => {
773
773
  var M, o;
774
- return ((o = (M = t.value) == null ? void 0 : M.mainIndicator) == null ? void 0 : o.map((N) => ({ label: N.key, value: r(N.data[z.value]), color: N.color }))) || [];
774
+ return ((o = (M = t.value) == null ? void 0 : M.mainIndicator) == null ? void 0 : o.map((l) => ({ label: l.key, value: c(l.data[z.value]), color: l.color }))) || [];
775
775
  }), R = ce(() => {
776
776
  var M, o;
777
- return ((o = (M = t.value) == null ? void 0 : M.subIndicator) == null ? void 0 : o.map((N) => ({ label: N.key, color: N.color, value: N.data[z.value] || "-" }))) || [];
777
+ return ((o = (M = t.value) == null ? void 0 : M.subIndicator) == null ? void 0 : o.map((l) => ({ label: l.key, color: l.color, value: l.data[z.value] || "-" }))) || [];
778
778
  }), H = () => {
779
779
  a || (a = Ne.init(L.value), a.on(
780
780
  "highlight",
@@ -786,8 +786,8 @@ const Mt = { class: "main-chart" }, at = { class: "indicator" }, it = {
786
786
  "datazoom",
787
787
  ne(async () => {
788
788
  var C;
789
- const { loadCheckCount: M } = J, { startValue: o, endValue: N } = ((C = a.getOption()) == null ? void 0 : C.dataZoom[0]) ?? {};
790
- g === !1 && f === !1 && o < M && await K("history"), h === !1 && Q === !1 && N > t.value.time.length - M && await K("new"), De(), Te();
789
+ const { loadCheckCount: M } = J, { startValue: o, endValue: l } = ((C = a.getOption()) == null ? void 0 : C.dataZoom[0]) ?? {};
790
+ g === !1 && f === !1 && o < M && await K("history"), h === !1 && Q === !1 && l > t.value.time.length - M && await K("new"), De(), Te();
791
791
  })
792
792
  ), a.on("globalout", () => {
793
793
  const M = a.getOption();
@@ -795,17 +795,17 @@ const Mt = { class: "main-chart" }, at = { class: "indicator" }, it = {
795
795
  }), a.getZr().on("contextmenu", () => {
796
796
  var M;
797
797
  T.value = (M = t.value) == null ? void 0 : M.time[z.value];
798
- }), window.addEventListener("keydown", ge), e.userKlineConfig.enable_subChart && (c = Ne.init(x.value), Ne.connect([a, c])), l = Fe(L.value), l.listen(() => {
798
+ }), window.addEventListener("keydown", ge), e.userKlineConfig.enable_subChart && (N = Ne.init(x.value), Ne.connect([a, N])), s = Fe(L.value), s.listen(() => {
799
799
  requestAnimationFrame(() => {
800
800
  var M;
801
- a.resize(), c == null || c.resize(), (M = p.value) == null || M.resize();
801
+ a.resize(), N == null || N.resize(), (M = p.value) == null || M.resize();
802
802
  });
803
803
  }));
804
804
  }, F = async ({ startTime: M, endTime: o }) => {
805
805
  g = !1, f = !1, h = !1, Q = !1;
806
806
  try {
807
807
  D.value = !0;
808
- const N = {
808
+ const l = {
809
809
  varietyCode: e.varietyCode,
810
810
  cycle: e.cycle,
811
811
  // 周期
@@ -818,17 +818,17 @@ const Mt = { class: "main-chart" }, at = { class: "indicator" }, it = {
818
818
  deleteFirstNumber: e.deleteFirstNumber,
819
819
  withoutPermission: e.withoutPermission
820
820
  };
821
- ["1", "2", "3", "4", "5"].includes(e.cycle) ? Object.assign(N, {
821
+ ["1", "2", "3", "4", "5"].includes(e.cycle) ? Object.assign(l, {
822
822
  startTime: Y(M).subtract(1, "day").format("YYYY-MM-DD HH:mm:ss"),
823
823
  endTime: Y(o).add(1, "day").format("YYYY-MM-DD HH:mm:ss")
824
- }) : ["6", "7"].includes(e.cycle) ? Object.assign(N, {
824
+ }) : ["6", "7"].includes(e.cycle) ? Object.assign(l, {
825
825
  startTime: Y(M).subtract(50, "day").format("YYYY-MM-DD HH:mm:ss"),
826
826
  endTime: Y(o).add(50, "day").format("YYYY-MM-DD HH:mm:ss")
827
- }) : Object.assign(N, {
827
+ }) : Object.assign(l, {
828
828
  startTime: Y(M).subtract(10, "month").format("YYYY-MM-DD HH:mm:ss"),
829
829
  endTime: Y(o).add(10, "month").format("YYYY-MM-DD HH:mm:ss")
830
830
  });
831
- const { body: C } = await u.post("/middleLayer/kline/getKline", N);
831
+ const { body: C } = await u.post("/middleLayer/kline/getKline", l);
832
832
  t.value = C ?? { data: [], mainIndicator: [], subIndicator: [], time: [] };
833
833
  let A = -1, I = -1;
834
834
  for (let w = 0; w < t.value.time.length; w++) {
@@ -889,7 +889,7 @@ const Mt = { class: "main-chart" }, at = { class: "indicator" }, it = {
889
889
  break;
890
890
  }
891
891
  }
892
- const { startValue: N, endValue: C } = ((S = a.getOption()) == null ? void 0 : S.dataZoom[0]) ?? {}, A = (q = a.getOption()) == null ? void 0 : q.xAxis[0].data, I = t.value.time.findIndex((U) => new Date(U) >= new Date(A[N])), w = t.value.time.findIndex((U) => new Date(U) >= new Date(A[C]));
892
+ const { startValue: l, endValue: C } = ((S = a.getOption()) == null ? void 0 : S.dataZoom[0]) ?? {}, A = (q = a.getOption()) == null ? void 0 : q.xAxis[0].data, I = t.value.time.findIndex((U) => new Date(U) >= new Date(A[l])), w = t.value.time.findIndex((U) => new Date(U) >= new Date(A[C]));
893
893
  oe({
894
894
  startValue: I === -1 ? 0 : I,
895
895
  endValue: w === -1 ? t.value.time.length - 1 : w
@@ -898,11 +898,11 @@ const Mt = { class: "main-chart" }, at = { class: "indicator" }, it = {
898
898
  var I;
899
899
  if (!t.value.time.length)
900
900
  return n.value = [];
901
- const { time: M } = t.value, { startValue: o, endValue: N } = ((I = a.getOption()) == null ? void 0 : I.dataZoom[0]) ?? {}, C = M[o], A = M[N];
901
+ const { time: M } = t.value, { startValue: o, endValue: l } = ((I = a.getOption()) == null ? void 0 : I.dataZoom[0]) ?? {}, C = M[o], A = M[l];
902
902
  ["6", "7", "8"].includes(e.cycle) ? n.value = [Y(C).format("YYYY-MM-DD"), Y(A).format("YYYY-MM-DD")] : n.value = [C, A];
903
903
  }, oe = (M = { startValue: 0, endValue: 0 }) => {
904
904
  H();
905
- const { maxValueSpan: o } = J, { time: N, data: C, mainIndicator: A } = t.value, I = M.endValue - M.startValue > o ? M.endValue - o : M.startValue, w = M.endValue, S = A.map((m) => ({
905
+ const { maxValueSpan: o } = J, { time: l, data: C, mainIndicator: A } = t.value, I = M.endValue - M.startValue > o ? M.endValue - o : M.startValue, w = M.endValue, S = A.map((m) => ({
906
906
  name: m.key,
907
907
  type: "line",
908
908
  silent: !0,
@@ -914,7 +914,7 @@ const Mt = { class: "main-chart" }, at = { class: "indicator" }, it = {
914
914
  itemStyle: {
915
915
  color: m.color
916
916
  }
917
- })), { netPositionLineData: q } = Je(e.netPositionData, e.cycle), { tradeIncomeRateLineData: U } = Ke(e.tradeIncomeRateData, e.cycle, e.incomeType, N), { tradePointData: P, tradeLineData: re } = We(e.tradeLog, e.cycle, e.sellBuy, N, C, e.userKlineConfig);
917
+ })), { netPositionLineData: q } = Je(e.netPositionData, e.cycle), { tradeIncomeRateLineData: U } = Ke(e.tradeIncomeRateData, e.cycle, e.incomeType, l), { tradePointData: P, tradeLineData: re } = We(e.tradeLog, e.cycle, e.sellBuy, l, C, e.userKlineConfig);
918
918
  a.setOption(
919
919
  {
920
920
  animation: !1,
@@ -943,7 +943,7 @@ const Mt = { class: "main-chart" }, at = { class: "indicator" }, it = {
943
943
  rich: {},
944
944
  formatter: (m) => {
945
945
  const { axisDimension: b, value: k } = m;
946
- return b === "x" ? ["6", "7", "8"].includes(e.cycle) ? Y(k).format("YYYY-MM-DD") : k : String(r(k));
946
+ return b === "x" ? ["6", "7", "8"].includes(e.cycle) ? Y(k).format("YYYY-MM-DD") : k : String(c(k));
947
947
  }
948
948
  }
949
949
  },
@@ -986,7 +986,7 @@ const Mt = { class: "main-chart" }, at = { class: "indicator" }, it = {
986
986
  xAxis: {
987
987
  show: !0,
988
988
  type: "category",
989
- data: N,
989
+ data: l,
990
990
  splitLine: {
991
991
  show: !1
992
992
  },
@@ -1009,11 +1009,11 @@ const Mt = { class: "main-chart" }, at = { class: "indicator" }, it = {
1009
1009
  },
1010
1010
  min: (m) => {
1011
1011
  const { min: b, max: k } = m, v = Math.abs((k - b) / 10);
1012
- return r(b - v);
1012
+ return c(b - v);
1013
1013
  },
1014
1014
  max: (m) => {
1015
1015
  const { min: b, max: k } = m, v = Math.abs((k - b) / 10);
1016
- return r(k + v);
1016
+ return c(k + v);
1017
1017
  }
1018
1018
  },
1019
1019
  {
@@ -1094,11 +1094,11 @@ const Mt = { class: "main-chart" }, at = { class: "indicator" }, it = {
1094
1094
  }
1095
1095
  },
1096
1096
  !0
1097
- ), e.userKlineConfig.enable_subChart && c.setOption($e(t.value, I, w), !0), De(), Te(), z.value = w;
1097
+ ), e.userKlineConfig.enable_subChart && N.setOption($e(t.value, I, w), !0), De(), Te(), z.value = w;
1098
1098
  {
1099
1099
  const m = [];
1100
1100
  if (e.userKlineConfig.enable_tradeLogBrush && P.length) {
1101
- const [b, k] = [P[0].coord[0], P.at(-1).coord[0]], v = ue(N, [b, k], e.cycle);
1101
+ const [b, k] = [P[0].coord[0], P.at(-1).coord[0]], v = ue(l, [b, k], e.cycle);
1102
1102
  m.push({
1103
1103
  brushId: "开平仓范围",
1104
1104
  brushType: "lineX",
@@ -1107,7 +1107,7 @@ const Mt = { class: "main-chart" }, at = { class: "indicator" }, it = {
1107
1107
  });
1108
1108
  }
1109
1109
  if (e.syncBrushRange.cycleList.includes(e.cycle)) {
1110
- const { startTime: b, endTime: k } = e.syncBrushRange, v = ue(N, [b, k], e.cycle);
1110
+ const { startTime: b, endTime: k } = e.syncBrushRange, v = ue(l, [b, k], e.cycle);
1111
1111
  m.push({
1112
1112
  brushId: "同步刷选范围",
1113
1113
  brushType: "lineX",
@@ -1121,7 +1121,7 @@ const Mt = { class: "main-chart" }, at = { class: "indicator" }, it = {
1121
1121
  });
1122
1122
  }
1123
1123
  if (e.positionTime) {
1124
- const [b, k] = [Y(e.positionTime).format("YYYY-MM-DD 00:00:00"), Y(e.positionTime).format("YYYY-MM-DD 23:59:59")], v = ue(N, [b, k], e.cycle);
1124
+ const [b, k] = [Y(e.positionTime).format("YYYY-MM-DD 00:00:00"), Y(e.positionTime).format("YYYY-MM-DD 23:59:59")], v = ue(l, [b, k], e.cycle);
1125
1125
  m.push({
1126
1126
  brushId: "强制定位高亮",
1127
1127
  brushType: "lineX",
@@ -1143,13 +1143,13 @@ const Mt = { class: "main-chart" }, at = { class: "indicator" }, it = {
1143
1143
  var re;
1144
1144
  if (!e.userKlineConfig.enable_showScreenMaxPrice || !t.value.time.length)
1145
1145
  return;
1146
- const { data: M } = t.value, o = a.getOption(), { startValue: N, endValue: C } = (o == null ? void 0 : o.dataZoom[0]) ?? {};
1147
- let A = 0, I = N;
1148
- for (let m = N; m <= C; m++)
1146
+ const { data: M } = t.value, o = a.getOption(), { startValue: l, endValue: C } = (o == null ? void 0 : o.dataZoom[0]) ?? {};
1147
+ let A = 0, I = l;
1148
+ for (let m = l; m <= C; m++)
1149
1149
  Number(M[m][3]) >= A && (A = Number(M[m][3]), I = m);
1150
- const w = ((re = o.series) == null ? void 0 : re.filter((m) => m.name !== "maxPrice")) || [], S = C - N, q = (I - N) / S;
1150
+ const w = ((re = o.series) == null ? void 0 : re.filter((m) => m.name !== "maxPrice")) || [], S = C - l, q = (I - l) / S;
1151
1151
  let U = "right", P = `←${A}`;
1152
- q > 0.7 ? (U = "left", P = `${r(A)}→`) : (U = "right", P = `←${r(A)}`), a == null || a.setOption(
1152
+ q > 0.7 ? (U = "left", P = `${c(A)}→`) : (U = "right", P = `←${c(A)}`), a == null || a.setOption(
1153
1153
  {
1154
1154
  series: [
1155
1155
  ...w,
@@ -1193,16 +1193,16 @@ const Mt = { class: "main-chart" }, at = { class: "indicator" }, it = {
1193
1193
  }
1194
1194
  );
1195
1195
  }, be = (M) => {
1196
- const [o, N] = me({
1196
+ const [o, l] = me({
1197
1197
  startTime: M.startTime,
1198
1198
  endTime: M.endTime,
1199
1199
  cycle: e.cycle
1200
1200
  });
1201
- F({ startTime: o, endTime: N });
1201
+ F({ startTime: o, endTime: l });
1202
1202
  }, ge = ({ code: M, ctrlKey: o }) => {
1203
1203
  if (!(o || d.value))
1204
1204
  return;
1205
- const { xAxis: N, dataZoom: C } = a.getOption(), { data: A } = (N == null ? void 0 : N[0]) ?? { data: [] };
1205
+ const { xAxis: l, dataZoom: C } = a.getOption(), { data: A } = (l == null ? void 0 : l[0]) ?? { data: [] };
1206
1206
  let { startValue: I, endValue: w } = (C == null ? void 0 : C[0]) ?? {};
1207
1207
  if (A != null && A.length) {
1208
1208
  switch (M) {
@@ -1255,13 +1255,13 @@ const Mt = { class: "main-chart" }, at = { class: "indicator" }, it = {
1255
1255
  () => [e.cycle],
1256
1256
  () => {
1257
1257
  var A;
1258
- const { startValue: M, endValue: o } = ((A = a.getOption()) == null ? void 0 : A.dataZoom[0]) ?? {}, [N, C] = me({
1258
+ const { startValue: M, endValue: o } = ((A = a.getOption()) == null ? void 0 : A.dataZoom[0]) ?? {}, [l, C] = me({
1259
1259
  startTime: t.value.time[M],
1260
1260
  endTime: t.value.time[o],
1261
1261
  cycle: e.cycle,
1262
1262
  type: "middle"
1263
1263
  });
1264
- F({ startTime: N, endTime: C });
1264
+ F({ startTime: l, endTime: C });
1265
1265
  },
1266
1266
  { deep: !0 }
1267
1267
  ), ae(
@@ -1271,30 +1271,30 @@ const Mt = { class: "main-chart" }, at = { class: "indicator" }, it = {
1271
1271
  },
1272
1272
  () => {
1273
1273
  var A;
1274
- const { startValue: M, endValue: o } = ((A = a.getOption()) == null ? void 0 : A.dataZoom[0]) ?? {}, [N, C] = [t.value.time[M], t.value.time[o]];
1275
- F({ startTime: N, endTime: C });
1274
+ const { startValue: M, endValue: o } = ((A = a.getOption()) == null ? void 0 : A.dataZoom[0]) ?? {}, [l, C] = [t.value.time[M], t.value.time[o]];
1275
+ F({ startTime: l, endTime: C });
1276
1276
  },
1277
1277
  { deep: !0 }
1278
1278
  ), ae(
1279
1279
  () => [e.sellBuy, e.tradeLog, e.netPositionData, e.incomeType, e.tradeIncomeRateData],
1280
1280
  () => {
1281
- var N;
1282
- const { startValue: M, endValue: o } = ((N = a.getOption()) == null ? void 0 : N.dataZoom[0]) ?? {};
1281
+ var l;
1282
+ const { startValue: M, endValue: o } = ((l = a.getOption()) == null ? void 0 : l.dataZoom[0]) ?? {};
1283
1283
  oe({ startValue: M, endValue: o });
1284
1284
  },
1285
1285
  { deep: !0 }
1286
1286
  ), Oe(() => {
1287
- a.off("highlight"), a.off("globalout"), a.off("datazoom"), a.getZr().off("contextmenu"), window.removeEventListener("keydown", ge), a.dispose(), c == null || c.dispose(), l.dispose(), l = null;
1287
+ a.off("highlight"), a.off("globalout"), a.off("datazoom"), a.getZr().off("contextmenu"), window.removeEventListener("keydown", ge), a.dispose(), N == null || N.dispose(), s.dispose(), s = null;
1288
1288
  }), j({
1289
1289
  screenTimeRange: n,
1290
1290
  contextmenuKlineTime: T,
1291
1291
  reDraw: () => {
1292
- var N;
1293
- const { startValue: M, endValue: o } = ((N = a.getOption()) == null ? void 0 : N.dataZoom[0]) ?? {};
1292
+ var l;
1293
+ const { startValue: M, endValue: o } = ((l = a.getOption()) == null ? void 0 : l.dataZoom[0]) ?? {};
1294
1294
  oe({ startValue: M, endValue: o });
1295
1295
  }
1296
1296
  }), (M, o) => {
1297
- const N = ve, C = Ee, A = ke, I = he;
1297
+ const l = ve, C = Ee, A = ke, I = he;
1298
1298
  return Pe((_(), Z("div", {
1299
1299
  class: "kline-plus",
1300
1300
  onMousemove: o[1] || (o[1] = (w) => d.value = !0),
@@ -1325,7 +1325,7 @@ const Mt = { class: "main-chart" }, at = { class: "indicator" }, it = {
1325
1325
  "popper-class": "element-dark"
1326
1326
  }, {
1327
1327
  default: Re(() => [
1328
- (_(!0), Z(pe, null, we(i.indicatorStore.subIndicatorList, (w, S) => (_(), Le(N, {
1328
+ (_(!0), Z(pe, null, we(i.indicatorStore.subIndicatorList, (w, S) => (_(), Le(l, {
1329
1329
  key: S,
1330
1330
  label: w.label,
1331
1331
  value: w.value
@@ -1366,7 +1366,7 @@ const Mt = { class: "main-chart" }, at = { class: "indicator" }, it = {
1366
1366
  ]);
1367
1367
  };
1368
1368
  }
1369
- }, Nt = /* @__PURE__ */ de(lt, [["__scopeId", "data-v-5c46a7a5"]]), Et = {
1369
+ }, Nt = /* @__PURE__ */ de(lt, [["__scopeId", "data-v-c68664f6"]]), Et = {
1370
1370
  install(i) {
1371
1371
  i.component("st-klinePlus", Nt);
1372
1372
  }