@guihz/trading-vue-editor-tes 0.1.115 → 0.1.116
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.
|
@@ -360,7 +360,7 @@ var _S = qv((Du, rp) => {
|
|
|
360
360
|
op.exports;
|
|
361
361
|
(function(s, e) {
|
|
362
362
|
(function() {
|
|
363
|
-
var t, r = "4.17.23", i = 200, n = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", o = "Expected a function", a = "Invalid `variable` option passed into `_.template`", c = "__lodash_hash_undefined__", p = 500, b = "__lodash_placeholder__", M = 1, l = 2, u = 4, f = 1, O = 2, h = 1, d = 2, A = 4, q = 8, m = 16, W = 32, R = 64, v = 128, w = 256, x = 512, N = 30, D = "...", B = 800, C = 16, X = 1,
|
|
363
|
+
var t, r = "4.17.23", i = 200, n = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", o = "Expected a function", a = "Invalid `variable` option passed into `_.template`", c = "__lodash_hash_undefined__", p = 500, b = "__lodash_placeholder__", M = 1, l = 2, u = 4, f = 1, O = 2, h = 1, d = 2, A = 4, q = 8, m = 16, W = 32, R = 64, v = 128, w = 256, x = 512, N = 30, D = "...", B = 800, C = 16, X = 1, S = 2, $ = 3, P = 1 / 0, H = 9007199254740991, t0 = 17976931348623157e292, Z = NaN, o0 = 4294967295, b0 = o0 - 1, G = o0 >>> 1, J = [
|
|
364
364
|
["ary", v],
|
|
365
365
|
["bind", h],
|
|
366
366
|
["bindKey", d],
|
|
@@ -1013,7 +1013,7 @@ var _S = qv((Du, rp) => {
|
|
|
1013
1013
|
h0 += _;
|
|
1014
1014
|
for (var y1 = -1, b1 = z[h0]; ++y1 < R0; ) {
|
|
1015
1015
|
var D1 = _0[y1], S1 = D1.iteratee, ar = D1.type, Dt = S1(b1);
|
|
1016
|
-
if (ar ==
|
|
1016
|
+
if (ar == S)
|
|
1017
1017
|
b1 = Dt;
|
|
1018
1018
|
else if (!Dt) {
|
|
1019
1019
|
if (ar == X)
|
|
@@ -1706,7 +1706,7 @@ var _S = qv((Du, rp) => {
|
|
|
1706
1706
|
if (or(z))
|
|
1707
1707
|
return Rf ? Rf.call(z) : "";
|
|
1708
1708
|
var _ = z + "";
|
|
1709
|
-
return _ == "0" && 1 / z == -
|
|
1709
|
+
return _ == "0" && 1 / z == -P ? "-0" : _;
|
|
1710
1710
|
}
|
|
1711
1711
|
function Cs(z, _, y) {
|
|
1712
1712
|
var L = -1, E = Nc, k = z.length, j = !0, Q = [], s0 = Q;
|
|
@@ -2139,7 +2139,7 @@ var _S = qv((Du, rp) => {
|
|
|
2139
2139
|
return _(y);
|
|
2140
2140
|
};
|
|
2141
2141
|
}
|
|
2142
|
-
var k5 = lo && 1 / Lc(new lo([, -0]))[1] ==
|
|
2142
|
+
var k5 = lo && 1 / Lc(new lo([, -0]))[1] == P ? function(z) {
|
|
2143
2143
|
return new lo(z);
|
|
2144
2144
|
} : QM;
|
|
2145
2145
|
function uO(z) {
|
|
@@ -2582,7 +2582,7 @@ var _S = qv((Du, rp) => {
|
|
|
2582
2582
|
if (typeof z == "string" || or(z))
|
|
2583
2583
|
return z;
|
|
2584
2584
|
var _ = z + "";
|
|
2585
|
-
return _ == "0" && 1 / z == -
|
|
2585
|
+
return _ == "0" && 1 / z == -P ? "-0" : _;
|
|
2586
2586
|
}
|
|
2587
2587
|
function An(z) {
|
|
2588
2588
|
if (z != null) {
|
|
@@ -2680,7 +2680,7 @@ var _S = qv((Du, rp) => {
|
|
|
2680
2680
|
}
|
|
2681
2681
|
function dg(z) {
|
|
2682
2682
|
var _ = z == null ? 0 : z.length;
|
|
2683
|
-
return _ ? ct(z,
|
|
2683
|
+
return _ ? ct(z, P) : [];
|
|
2684
2684
|
}
|
|
2685
2685
|
function hg(z, _) {
|
|
2686
2686
|
var y = z == null ? 0 : z.length;
|
|
@@ -2955,7 +2955,7 @@ var _S = qv((Du, rp) => {
|
|
|
2955
2955
|
return ct(o2(z, _), 1);
|
|
2956
2956
|
}
|
|
2957
2957
|
function m6(z, _) {
|
|
2958
|
-
return ct(o2(z, _),
|
|
2958
|
+
return ct(o2(z, _), P);
|
|
2959
2959
|
}
|
|
2960
2960
|
function g6(z, _, y) {
|
|
2961
2961
|
return y = y === t ? 1 : m1(y), ct(o2(z, _), y);
|
|
@@ -3385,7 +3385,7 @@ var _S = qv((Du, rp) => {
|
|
|
3385
3385
|
function ji(z) {
|
|
3386
3386
|
if (!z)
|
|
3387
3387
|
return z === 0 ? z : 0;
|
|
3388
|
-
if (z = Rr(z), z ===
|
|
3388
|
+
if (z = Rr(z), z === P || z === -P) {
|
|
3389
3389
|
var _ = z < 0 ? -1 : 1;
|
|
3390
3390
|
return _ * t0;
|
|
3391
3391
|
}
|
|
@@ -4311,9 +4311,9 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
4311
4311
|
maxprofit_percent_long: B = 0,
|
|
4312
4312
|
maxprofit_percent_short: C = 0,
|
|
4313
4313
|
maxloss_percent_long: X = 0,
|
|
4314
|
-
maxloss_percent_short:
|
|
4314
|
+
maxloss_percent_short: S = 0,
|
|
4315
4315
|
hold_long_k_count: $ = 0,
|
|
4316
|
-
hold_short_k_count:
|
|
4316
|
+
hold_short_k_count: P = 0,
|
|
4317
4317
|
hold_profit_long_k_count: H = 0,
|
|
4318
4318
|
hold_profit_short_k_count: t0 = 0,
|
|
4319
4319
|
hold_loss_long_k_count: Z = 0,
|
|
@@ -4322,7 +4322,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
4322
4322
|
shapeRatioType: G = "NONE"
|
|
4323
4323
|
} = this._preHistoryOrderCalcResult;
|
|
4324
4324
|
const { profit: J = 0, profit_percent: Y = 0, in_index: c0 = 0, out_index: n0 = 0, commission: m0 = 0, direction: v0, in_time: g0 = 0, out_time: x0 = 0, total_profit: q0 = 0 } = e, F = n0 - c0 + 1;
|
|
4325
|
-
if (v0 === M1.long ? (i += J, o += 1, c += Y, R += m0, $ += F, J > 0 ? (l += Y, m += 1, h += J, H += F, w = Math.max(w, J), B = Math.max(B, Y)) : J < 0 && (b += Y, A += 1, f += J, Z += F, N = Math.min(N, J), X = Math.min(X, Y))) : (n += J, a += 1, p += Y, v += m0,
|
|
4325
|
+
if (v0 === M1.long ? (i += J, o += 1, c += Y, R += m0, $ += F, J > 0 ? (l += Y, m += 1, h += J, H += F, w = Math.max(w, J), B = Math.max(B, Y)) : J < 0 && (b += Y, A += 1, f += J, Z += F, N = Math.min(N, J), X = Math.min(X, Y))) : (n += J, a += 1, p += Y, v += m0, P += F, J > 0 ? (u += Y, W += 1, d += J, t0 += F, x = Math.max(x, J), C = Math.max(C, Y)) : J < 0 && (M += Y, q += 1, O += J, o0 += F, D = Math.min(D, J), S = Math.min(S, Y))), !b0) {
|
|
4326
4326
|
const X0 = this._createBalanceByInterval(g0, Date.now());
|
|
4327
4327
|
b0 = X0.balanceByInterval, G = X0.shapeRatioType;
|
|
4328
4328
|
}
|
|
@@ -4362,9 +4362,9 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
4362
4362
|
maxprofit_percent_long: B,
|
|
4363
4363
|
maxprofit_percent_short: C,
|
|
4364
4364
|
maxloss_percent_long: X,
|
|
4365
|
-
maxloss_percent_short:
|
|
4365
|
+
maxloss_percent_short: S,
|
|
4366
4366
|
hold_long_k_count: $,
|
|
4367
|
-
hold_short_k_count:
|
|
4367
|
+
hold_short_k_count: P,
|
|
4368
4368
|
hold_profit_long_k_count: H,
|
|
4369
4369
|
hold_profit_short_k_count: t0,
|
|
4370
4370
|
hold_loss_long_k_count: Z,
|
|
@@ -7468,7 +7468,7 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
|
7468
7468
|
function X(F) {
|
|
7469
7469
|
return (F || "").toLowerCase().replace(/\//g, "_");
|
|
7470
7470
|
}
|
|
7471
|
-
function
|
|
7471
|
+
function S(F) {
|
|
7472
7472
|
var e0, a0, d0, D0;
|
|
7473
7473
|
for (typeof F == "string" && (F = [F]), e0 = 0; e0 < F.length; e0++)
|
|
7474
7474
|
d0 = F[e0].split("|"), a0 = d0[0], D0 = X(a0), r[D0] = F[e0], o[D0] = a0, N(D0, d0[2].split(" "));
|
|
@@ -7478,7 +7478,7 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
|
7478
7478
|
var a0 = r[F], d0;
|
|
7479
7479
|
return a0 instanceof A ? a0 : typeof a0 == "string" ? (a0 = new A(a0), r[F] = a0, a0) : i[F] && e0 !== $ && (d0 = $(i[F], $)) ? (a0 = r[F] = new A(), a0._set(d0), a0.name = o[F], a0) : null;
|
|
7480
7480
|
}
|
|
7481
|
-
function
|
|
7481
|
+
function P() {
|
|
7482
7482
|
var F, e0 = [];
|
|
7483
7483
|
for (F in o)
|
|
7484
7484
|
o.hasOwnProperty(F) && (r[F] || r[i[F]]) && o[F] && e0.push(o[F]);
|
|
@@ -7516,7 +7516,7 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
|
7516
7516
|
}) : a0;
|
|
7517
7517
|
}
|
|
7518
7518
|
function G(F) {
|
|
7519
|
-
|
|
7519
|
+
S(F.zones), t0(F.links), Z(F.countries), n0.dataVersion = F.version;
|
|
7520
7520
|
}
|
|
7521
7521
|
function J(F) {
|
|
7522
7522
|
return J.didShowError || (J.didShowError = !0, c0("moment.tz.zoneExists('" + F + "') has been deprecated in favor of !moment.tz.zone('" + F + "')")), !!$(F);
|
|
@@ -7532,7 +7532,7 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
|
7532
7532
|
var e0 = Array.prototype.slice.call(arguments, 0, -1), a0 = arguments[arguments.length - 1], d0 = e.utc.apply(null, e0), D0;
|
|
7533
7533
|
return !e.isMoment(F) && Y(d0) && (D0 = $(a0)) && d0.add(D0.parse(d0), "minutes"), d0.tz(a0), d0;
|
|
7534
7534
|
}
|
|
7535
|
-
n0.version = t, n0.dataVersion = "", n0._zones = r, n0._links = i, n0._names = o, n0._countries = n, n0.add =
|
|
7535
|
+
n0.version = t, n0.dataVersion = "", n0._zones = r, n0._links = i, n0._names = o, n0._countries = n, n0.add = S, n0.link = t0, n0.load = G, n0.zone = $, n0.zoneExists = J, n0.guess = C, n0.names = P, n0.Zone = A, n0.unpack = d, n0.unpackBase60 = u, n0.needsOffset = Y, n0.moveInvalidForward = !0, n0.moveAmbiguousForward = !1, n0.countries = H, n0.zonesForCountry = b0;
|
|
7536
7536
|
var m0 = e.fn;
|
|
7537
7537
|
e.tz = n0, e.defaultZone = null, e.updateOffset = function(F, e0) {
|
|
7538
7538
|
var a0 = e.defaultZone, d0;
|
|
@@ -9387,6 +9387,18 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
|
9387
9387
|
if (t) {
|
|
9388
9388
|
const { number: r, letter: i } = t;
|
|
9389
9389
|
switch (i) {
|
|
9390
|
+
case "S":
|
|
9391
|
+
return r ? {
|
|
9392
|
+
period: r,
|
|
9393
|
+
type: "sec",
|
|
9394
|
+
baseKlineCount: +r
|
|
9395
|
+
// baseKlineCountType: "mink",
|
|
9396
|
+
} : {
|
|
9397
|
+
period: 1,
|
|
9398
|
+
type: "sec",
|
|
9399
|
+
baseKlineCount: 1
|
|
9400
|
+
// baseKlineCountType: "mink",
|
|
9401
|
+
};
|
|
9390
9402
|
case "M":
|
|
9391
9403
|
return r ? {
|
|
9392
9404
|
period: r,
|
|
@@ -9475,40 +9487,42 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
|
9475
9487
|
return +r * ED(i);
|
|
9476
9488
|
}
|
|
9477
9489
|
function ys(s, e, t, r, i = 0, n, o = Y_, a, c = !1) {
|
|
9478
|
-
var
|
|
9490
|
+
var A;
|
|
9479
9491
|
const p = [];
|
|
9480
|
-
let b = e, M = n;
|
|
9492
|
+
let b = e || {}, M = n;
|
|
9481
9493
|
if (!s.length)
|
|
9482
9494
|
return {
|
|
9483
9495
|
newLines: p,
|
|
9484
9496
|
preData: M
|
|
9485
9497
|
};
|
|
9486
|
-
|
|
9487
|
-
|
|
9488
|
-
|
|
9489
|
-
|
|
9490
|
-
|
|
9491
|
-
|
|
9492
|
-
|
|
9493
|
-
|
|
9498
|
+
let l = (e == null ? void 0 : e.time) || 0;
|
|
9499
|
+
const u = TD(t), f = t.endsWith("S"), O = c ? 0 : u - 1;
|
|
9500
|
+
r && e && s[0].time <= l + O && p.push(e);
|
|
9501
|
+
const h = wi(oa(t)), d = f ? u : Math.floor(u / 60);
|
|
9502
|
+
!r && ((A = s[s.length - 1]) == null ? void 0 : A.time) <= l + O && (b.volume = 0), l = c ? l - O : l;
|
|
9503
|
+
for (const q of s)
|
|
9504
|
+
if (!(q.time < i || q.time < ((n == null ? void 0 : n.time) || l))) {
|
|
9505
|
+
if (q.time <= (b.time || 0) + O)
|
|
9506
|
+
b.h = b.h ? Math.max(b.h, q.h || 0) : q.h, b.l = q.l ? Math.min(b.l || 1 / 0, q.l) : b.l, b.c = q.c || b.c, b.volume += q.volume || 0, M && M.time === q.time && (b.volume -= M.volume || 0);
|
|
9494
9507
|
else {
|
|
9495
|
-
if (b = I({},
|
|
9496
|
-
b.time = ID(
|
|
9508
|
+
if (b = I({}, q), h)
|
|
9509
|
+
b.time = ID(q.time, t);
|
|
9497
9510
|
else {
|
|
9498
9511
|
typeof o == "string" && (o = JSON.parse(o));
|
|
9499
|
-
const
|
|
9500
|
-
b.time =
|
|
9512
|
+
const m = Math.ceil(q.klineSequence / d) * d;
|
|
9513
|
+
b.time = d === 1 ? q.time : k2(
|
|
9501
9514
|
FD(
|
|
9502
|
-
|
|
9515
|
+
m,
|
|
9503
9516
|
o,
|
|
9504
|
-
!c
|
|
9517
|
+
!c,
|
|
9518
|
+
!f
|
|
9505
9519
|
) + "",
|
|
9506
9520
|
a
|
|
9507
9521
|
);
|
|
9508
9522
|
}
|
|
9509
|
-
p.length
|
|
9523
|
+
!p.length && e && p.push(e), p.push(b);
|
|
9510
9524
|
}
|
|
9511
|
-
b.date =
|
|
9525
|
+
b.date = q.time, M = q;
|
|
9512
9526
|
}
|
|
9513
9527
|
return {
|
|
9514
9528
|
newLines: p,
|
|
@@ -9641,37 +9655,48 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
|
9641
9655
|
const e = Math.floor(s / 1e4), t = Math.floor(s % 1e4 / 100), r = s % 100, i = new Date(e, t - 1, r + 1), n = i.getFullYear(), o = i.getMonth() + 1, a = i.getDate();
|
|
9642
9656
|
return n * 1e4 + o * 100 + a;
|
|
9643
9657
|
}
|
|
9644
|
-
function FD(s, e = Y_, t = !1) {
|
|
9645
|
-
let
|
|
9646
|
-
for (let
|
|
9647
|
-
let
|
|
9648
|
-
const
|
|
9649
|
-
|
|
9650
|
-
const
|
|
9651
|
-
if (s <=
|
|
9652
|
-
const
|
|
9653
|
-
let
|
|
9654
|
-
if (
|
|
9655
|
-
const
|
|
9656
|
-
|
|
9657
|
-
|
|
9658
|
-
|
|
9659
|
-
|
|
9660
|
-
|
|
9661
|
-
|
|
9662
|
-
|
|
9663
|
-
|
|
9658
|
+
function FD(s, e = Y_, t = !1, r = !0) {
|
|
9659
|
+
let i = 0;
|
|
9660
|
+
for (let n = 0; n < e.length; n++) {
|
|
9661
|
+
let o = e[n][1], a = e[n][2];
|
|
9662
|
+
const c = e[n][3];
|
|
9663
|
+
a < o && (a += 2400);
|
|
9664
|
+
const p = Math.floor(a / 100) - Math.floor(o / 100), b = a % 100 - o % 100, M = (r ? p * 60 + b : p * 60 * 60 + b * 60) + (t ? 1 : 0);
|
|
9665
|
+
if (s <= i + M) {
|
|
9666
|
+
const l = Math.floor(o / 100), u = s - i;
|
|
9667
|
+
let f;
|
|
9668
|
+
if (r) {
|
|
9669
|
+
const O = o % 100 + u;
|
|
9670
|
+
if (O > 59) {
|
|
9671
|
+
const h = l + Math.floor(O / 60), d = O % 60;
|
|
9672
|
+
f = (h * 100 + d) * 100;
|
|
9673
|
+
} else
|
|
9674
|
+
f = (l * 100 + O) * 100;
|
|
9675
|
+
} else {
|
|
9676
|
+
const O = o % 100 + Math.floor(u / 60), h = u % 60;
|
|
9677
|
+
if (O > 59) {
|
|
9678
|
+
const d = l + Math.floor(O / 60), A = O % 60;
|
|
9679
|
+
f = (d * 100 + A) * 100;
|
|
9680
|
+
} else
|
|
9681
|
+
f = (l * 100 + O) * 100;
|
|
9682
|
+
f += h;
|
|
9683
|
+
}
|
|
9684
|
+
if (e[n][0] === "n")
|
|
9685
|
+
if (f >= 24e4) {
|
|
9686
|
+
f -= 24e4;
|
|
9687
|
+
const O = e[n + 1][3], h = kD(O);
|
|
9688
|
+
f += h * 1e6;
|
|
9664
9689
|
} else
|
|
9665
|
-
|
|
9690
|
+
f += c * 1e6;
|
|
9666
9691
|
else
|
|
9667
|
-
|
|
9668
|
-
return
|
|
9692
|
+
f += c * 1e6;
|
|
9693
|
+
return f;
|
|
9669
9694
|
} else
|
|
9670
|
-
|
|
9695
|
+
i += M;
|
|
9671
9696
|
}
|
|
9672
|
-
if (
|
|
9673
|
-
const
|
|
9674
|
-
return
|
|
9697
|
+
if (i < s) {
|
|
9698
|
+
const n = e[e.length - 1], o = n[2];
|
|
9699
|
+
return n[4] * 1e6 + o * 100;
|
|
9675
9700
|
}
|
|
9676
9701
|
return -1;
|
|
9677
9702
|
}
|
|
@@ -9972,7 +9997,8 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
|
9972
9997
|
m: "M",
|
|
9973
9998
|
M: "MTH",
|
|
9974
9999
|
D: "D",
|
|
9975
|
-
W: "W"
|
|
10000
|
+
W: "W",
|
|
10001
|
+
S: "S"
|
|
9976
10002
|
}, Jp = {
|
|
9977
10003
|
XAGUSD: "SILVER",
|
|
9978
10004
|
XAUUSD: "GOLD",
|
|
@@ -10006,7 +10032,7 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
|
10006
10032
|
prefixUrl: "https://data.tradingvue.com/",
|
|
10007
10033
|
retry: 0
|
|
10008
10034
|
// 请求出错时 不自动重试 默认会自动重试2次
|
|
10009
|
-
}), G_ = "https://mkt.tradingvue.com/";
|
|
10035
|
+
}), G_ = "https://mkt-test.tradingvue.com/";
|
|
10010
10036
|
function ea(s) {
|
|
10011
10037
|
return eb.post("symbol/data/v1/", { json: s }).then((e) => I1(this, null, function* () {
|
|
10012
10038
|
var c;
|
|
@@ -10130,7 +10156,7 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
|
10130
10156
|
}).then((d) => I1(Du, null, function* () {
|
|
10131
10157
|
var R, v;
|
|
10132
10158
|
const A = yield d.json(), q = CD(b) ? 1e5 : 1, m = A.data.kline.filter((w) => !!w[0]).map((w) => {
|
|
10133
|
-
const [x, N, D, B, C, X,
|
|
10159
|
+
const [x, N, D, B, C, X, S] = w;
|
|
10134
10160
|
return {
|
|
10135
10161
|
o: N,
|
|
10136
10162
|
h: D,
|
|
@@ -10138,7 +10164,7 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
|
10138
10164
|
c: C,
|
|
10139
10165
|
volume: X / q,
|
|
10140
10166
|
time: k2(x + "", f == null ? void 0 : f.timezone) + O,
|
|
10141
|
-
tradeDay:
|
|
10167
|
+
tradeDay: S
|
|
10142
10168
|
};
|
|
10143
10169
|
}), W = (v = (R = A.data.lastbase) == null ? void 0 : R.filter((w) => !!w[0])) == null ? void 0 : v.map((w) => {
|
|
10144
10170
|
const [x, N, D, B, C, X] = w;
|
|
@@ -11448,7 +11474,7 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
|
11448
11474
|
const c = a.bits;
|
|
11449
11475
|
let p = 0, b = 0, M = 0, l = 0, u = 0, f = 0, O = 0, h = 0, d = 0, A = 0, q, m, W, R, v, w = null, x;
|
|
11450
11476
|
const N = new Uint16Array(go + 1), D = new Uint16Array(go + 1);
|
|
11451
|
-
let B = null, C, X,
|
|
11477
|
+
let B = null, C, X, S;
|
|
11452
11478
|
for (p = 0; p <= go; p++)
|
|
11453
11479
|
N[p] = 0;
|
|
11454
11480
|
for (b = 0; b < r; b++)
|
|
@@ -11471,9 +11497,9 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
|
11471
11497
|
if (s === Sd ? (w = B = o, x = 20) : s === _l ? (w = Qx, B = Zx, x = 257) : (w = Jx, B = eB, x = 0), A = 0, b = 0, p = M, v = n, f = u, O = 0, W = -1, d = 1 << u, R = d - 1, s === _l && d > kd || s === Pd && d > Fd)
|
|
11472
11498
|
return 1;
|
|
11473
11499
|
for (; ; ) {
|
|
11474
|
-
C = p - O, o[b] + 1 < x ? (X = 0,
|
|
11500
|
+
C = p - O, o[b] + 1 < x ? (X = 0, S = o[b]) : o[b] >= x ? (X = B[o[b] - x], S = w[o[b] - x]) : (X = 96, S = 0), q = 1 << p - O, m = 1 << f, M = m;
|
|
11475
11501
|
do
|
|
11476
|
-
m -= q, i[v + (A >> O) + m] = C << 24 | X << 16 |
|
|
11502
|
+
m -= q, i[v + (A >> O) + m] = C << 24 | X << 16 | S | 0;
|
|
11477
11503
|
while (m !== 0);
|
|
11478
11504
|
for (q = 1 << p - 1; A & q; )
|
|
11479
11505
|
q >>= 1;
|
|
@@ -13451,7 +13477,7 @@ Example:
|
|
|
13451
13477
|
};
|
|
13452
13478
|
}
|
|
13453
13479
|
function A(U) {
|
|
13454
|
-
const i0 = U.types.map((B0) => B0.name), M0 =
|
|
13480
|
+
const i0 = U.types.map((B0) => B0.name), M0 = P(i0);
|
|
13455
13481
|
let O0 = U.hasAny, N0 = U.name;
|
|
13456
13482
|
const f0 = M0.map(function(B0) {
|
|
13457
13483
|
const w0 = a(B0.from);
|
|
@@ -13629,7 +13655,7 @@ Example:
|
|
|
13629
13655
|
N(U.types[M0]) || (i0 = Math.min(i0, U.types[M0].conversionIndex));
|
|
13630
13656
|
return i0;
|
|
13631
13657
|
}
|
|
13632
|
-
function
|
|
13658
|
+
function S(U, i0) {
|
|
13633
13659
|
if (U.hasAny) {
|
|
13634
13660
|
if (!i0.hasAny)
|
|
13635
13661
|
return 0.1;
|
|
@@ -13687,7 +13713,7 @@ Example:
|
|
|
13687
13713
|
const Ue = [];
|
|
13688
13714
|
let kt = 0;
|
|
13689
13715
|
for (let Xi = 0; Xi < M0.length; ++Xi) {
|
|
13690
|
-
const io =
|
|
13716
|
+
const io = S(M0[Xi], O0[Xi]);
|
|
13691
13717
|
Ue.push(io), kt += io;
|
|
13692
13718
|
}
|
|
13693
13719
|
if (kt !== 0)
|
|
@@ -13701,7 +13727,7 @@ Example:
|
|
|
13701
13727
|
}
|
|
13702
13728
|
return 0;
|
|
13703
13729
|
}
|
|
13704
|
-
function
|
|
13730
|
+
function P(U) {
|
|
13705
13731
|
if (U.length === 0)
|
|
13706
13732
|
return [];
|
|
13707
13733
|
const i0 = U.map(a);
|
|
@@ -15209,28 +15235,28 @@ Example:
|
|
|
15209
15235
|
for (; !r[0] && r.length > 1; ) r.shift();
|
|
15210
15236
|
}
|
|
15211
15237
|
return function(r, i, n, o, a, c) {
|
|
15212
|
-
var p, b, M, l, u, f, O, h, d, A, q, m, W, R, v, w, x, N, D, B, C = r.constructor, X = r.s == i.s ? 1 : -1,
|
|
15213
|
-
if (!
|
|
15238
|
+
var p, b, M, l, u, f, O, h, d, A, q, m, W, R, v, w, x, N, D, B, C = r.constructor, X = r.s == i.s ? 1 : -1, S = r.d, $ = i.d;
|
|
15239
|
+
if (!S || !S[0] || !$ || !$[0])
|
|
15214
15240
|
return new C(
|
|
15215
15241
|
// Return NaN if either NaN, or both Infinity or 0.
|
|
15216
|
-
!r.s || !i.s || (
|
|
15242
|
+
!r.s || !i.s || (S ? $ && S[0] == $[0] : !$) ? NaN : (
|
|
15217
15243
|
// Return ±0 if x is 0 or y is ±Infinity, or return ±Infinity as y is 0.
|
|
15218
|
-
|
|
15244
|
+
S && S[0] == 0 || !$ ? X * 0 : X / 0
|
|
15219
15245
|
)
|
|
15220
15246
|
);
|
|
15221
|
-
for (c ? (u = 1, b = r.e - i.e) : (c = pi, u = c1, b = Nt(r.e / u) - Nt(i.e / u)), D = $.length, x =
|
|
15222
|
-
if ($[M] > (
|
|
15247
|
+
for (c ? (u = 1, b = r.e - i.e) : (c = pi, u = c1, b = Nt(r.e / u) - Nt(i.e / u)), D = $.length, x = S.length, d = new C(X), A = d.d = [], M = 0; $[M] == (S[M] || 0); M++) ;
|
|
15248
|
+
if ($[M] > (S[M] || 0) && b--, n == null ? (R = n = C.precision, o = C.rounding) : a ? R = n + (r.e - i.e) + 1 : R = n, R < 0)
|
|
15223
15249
|
A.push(1), f = !0;
|
|
15224
15250
|
else {
|
|
15225
15251
|
if (R = R / u + 2 | 0, M = 0, D == 1) {
|
|
15226
15252
|
for (l = 0, $ = $[0], R++; (M < x || l) && R--; M++)
|
|
15227
|
-
v = l * c + (
|
|
15253
|
+
v = l * c + (S[M] || 0), A[M] = v / $ | 0, l = v % $ | 0;
|
|
15228
15254
|
f = l || M < x;
|
|
15229
15255
|
} else {
|
|
15230
|
-
for (l = c / ($[0] + 1) | 0, l > 1 && ($ = s($, l, c),
|
|
15256
|
+
for (l = c / ($[0] + 1) | 0, l > 1 && ($ = s($, l, c), S = s(S, l, c), D = $.length, x = S.length), w = D, q = S.slice(0, D), m = q.length; m < D; ) q[m++] = 0;
|
|
15231
15257
|
B = $.slice(), B.unshift(0), N = $[0], $[1] >= c / 2 && ++N;
|
|
15232
15258
|
do
|
|
15233
|
-
l = 0, p = e($, q, D, m), p < 0 ? (W = q[0], D != m && (W = W * c + (q[1] || 0)), l = W / N | 0, l > 1 ? (l >= c && (l = c - 1), O = s($, l, c), h = O.length, m = q.length, p = e(O, q, h, m), p == 1 && (l--, t(O, D < h ? B : $, h, c))) : (l == 0 && (p = l = 1), O = $.slice()), h = O.length, h < m && O.unshift(0), t(q, O, m, c), p == -1 && (m = q.length, p = e($, q, D, m), p < 1 && (l++, t(q, D < m ? B : $, m, c))), m = q.length) : p === 0 && (l++, q = [0]), A[M++] = l, p && q[0] ? q[m++] =
|
|
15259
|
+
l = 0, p = e($, q, D, m), p < 0 ? (W = q[0], D != m && (W = W * c + (q[1] || 0)), l = W / N | 0, l > 1 ? (l >= c && (l = c - 1), O = s($, l, c), h = O.length, m = q.length, p = e(O, q, h, m), p == 1 && (l--, t(O, D < h ? B : $, h, c))) : (l == 0 && (p = l = 1), O = $.slice()), h = O.length, h < m && O.unshift(0), t(q, O, m, c), p == -1 && (m = q.length, p = e($, q, D, m), p < 1 && (l++, t(q, D < m ? B : $, m, c))), m = q.length) : p === 0 && (l++, q = [0]), A[M++] = l, p && q[0] ? q[m++] = S[w] || 0 : (q = [S[w]], m = 1);
|
|
15234
15260
|
while ((w++ < x || q[0] !== void 0) && R--);
|
|
15235
15261
|
f = q[0] !== void 0;
|
|
15236
15262
|
}
|
|
@@ -16608,7 +16634,7 @@ Example:
|
|
|
16608
16634
|
return q !== d ? q > 1 && (A[q] = (A[q] || 0) + 1) : A[d] = (A[d] || 0) + 1, A;
|
|
16609
16635
|
}
|
|
16610
16636
|
var c = function(d, A) {
|
|
16611
|
-
var q = 0, m = 1, W = 1, R = 0, v = 0, w = 0, x = 1, N = 1, D = 0, B = 1, C = 1, X = 1,
|
|
16637
|
+
var q = 0, m = 1, W = 1, R = 0, v = 0, w = 0, x = 1, N = 1, D = 0, B = 1, C = 1, X = 1, S = 1e7, $;
|
|
16612
16638
|
if (d != null) if (A !== void 0) {
|
|
16613
16639
|
if (q = d, m = A, W = q * m, q % 1 !== 0 || m % 1 !== 0)
|
|
16614
16640
|
throw h();
|
|
@@ -16628,12 +16654,12 @@ Example:
|
|
|
16628
16654
|
if (d < 0 && (W = d, d = -d), d % 1 === 0)
|
|
16629
16655
|
q = d;
|
|
16630
16656
|
else if (d > 0) {
|
|
16631
|
-
for (d >= 1 && (N = Math.pow(10, Math.floor(1 + Math.log(d) / Math.LN10)), d /= N); B <=
|
|
16657
|
+
for (d >= 1 && (N = Math.pow(10, Math.floor(1 + Math.log(d) / Math.LN10)), d /= N); B <= S && X <= S; )
|
|
16632
16658
|
if ($ = (D + C) / (B + X), d === $) {
|
|
16633
|
-
B + X <=
|
|
16659
|
+
B + X <= S ? (q = D + C, m = B + X) : X > B ? (q = C, m = X) : (q = D, m = B);
|
|
16634
16660
|
break;
|
|
16635
16661
|
} else
|
|
16636
|
-
d > $ ? (D += C, B += X) : (C += D, X += B), B >
|
|
16662
|
+
d > $ ? (D += C, B += X) : (C += D, X += B), B > S ? (q = C, m = X) : (q = D, m = B);
|
|
16637
16663
|
q *= N;
|
|
16638
16664
|
} else (isNaN(d) || isNaN(A)) && (m = q = NaN);
|
|
16639
16665
|
break;
|
|
@@ -17996,17 +18022,17 @@ Example:
|
|
|
17996
18022
|
var q, m, W, R, v = h.min(), w = h.max();
|
|
17997
18023
|
for (q = 0, m = O._size.length; q < m; q++)
|
|
17998
18024
|
Ee(v[q], O._size[q]), Ee(w[q], O._size[q]);
|
|
17999
|
-
var x = O._values, N = O._index, D = O._ptr, B = h.dimension(0), C = h.dimension(1), X = [],
|
|
18025
|
+
var x = O._values, N = O._index, D = O._ptr, B = h.dimension(0), C = h.dimension(1), X = [], S = [];
|
|
18000
18026
|
B.forEach(function(t0, Z) {
|
|
18001
|
-
|
|
18027
|
+
S[t0] = Z[0], X[t0] = !0;
|
|
18002
18028
|
});
|
|
18003
|
-
var $ = x ? [] : void 0,
|
|
18029
|
+
var $ = x ? [] : void 0, P = [], H = [];
|
|
18004
18030
|
return C.forEach(function(t0) {
|
|
18005
|
-
for (H.push(
|
|
18006
|
-
q = N[W], X[q] === !0 && (
|
|
18007
|
-
}), H.push(
|
|
18031
|
+
for (H.push(P.length), W = D[t0], R = D[t0 + 1]; W < R; W++)
|
|
18032
|
+
q = N[W], X[q] === !0 && (P.push(S[q]), $ && $.push(x[W]));
|
|
18033
|
+
}), H.push(P.length), new i({
|
|
18008
18034
|
values: $,
|
|
18009
|
-
index:
|
|
18035
|
+
index: P,
|
|
18010
18036
|
ptr: H,
|
|
18011
18037
|
size: A,
|
|
18012
18038
|
datatype: O._datatype
|
|
@@ -18128,8 +18154,8 @@ Example:
|
|
|
18128
18154
|
var X = 0;
|
|
18129
18155
|
for (N = 0; N < w; N++) {
|
|
18130
18156
|
O._ptr[N] = O._ptr[N] - X;
|
|
18131
|
-
var
|
|
18132
|
-
for (D =
|
|
18157
|
+
var S = O._ptr[N], $ = O._ptr[N + 1] - X;
|
|
18158
|
+
for (D = S; D < $; D++)
|
|
18133
18159
|
x = O._index[D], x > h - 1 && (O._values.splice(D, 1), O._index.splice(D, 1), X++);
|
|
18134
18160
|
}
|
|
18135
18161
|
O._ptr[N] = O._values.length;
|
|
@@ -18164,8 +18190,8 @@ Example:
|
|
|
18164
18190
|
for (var C = 0; C < q._ptr.length; C++)
|
|
18165
18191
|
q._ptr[C] = 0;
|
|
18166
18192
|
for (var X = 0; X < v.length; X++) {
|
|
18167
|
-
var
|
|
18168
|
-
M(H,
|
|
18193
|
+
var S = w[X], $ = m[X], P = v[X], H = p(S, q._ptr[$], q._ptr[$ + 1], q._index);
|
|
18194
|
+
M(H, S, $, P, q._values, q._index, q._ptr);
|
|
18169
18195
|
}
|
|
18170
18196
|
return q;
|
|
18171
18197
|
}, i.prototype.clone = function() {
|
|
@@ -18196,17 +18222,17 @@ Example:
|
|
|
18196
18222
|
w.push(R.length);
|
|
18197
18223
|
var C = O._ptr[B], X = O._ptr[B + 1];
|
|
18198
18224
|
if (W)
|
|
18199
|
-
for (var
|
|
18200
|
-
var $ = O._index[
|
|
18201
|
-
$ >= h && $ <= d && D(O._values[
|
|
18225
|
+
for (var S = C; S < X; S++) {
|
|
18226
|
+
var $ = O._index[S];
|
|
18227
|
+
$ >= h && $ <= d && D(O._values[S], $ - h, B - A);
|
|
18202
18228
|
}
|
|
18203
18229
|
else {
|
|
18204
|
-
for (var
|
|
18230
|
+
for (var P = {}, H = C; H < X; H++) {
|
|
18205
18231
|
var t0 = O._index[H];
|
|
18206
|
-
|
|
18232
|
+
P[t0] = O._values[H];
|
|
18207
18233
|
}
|
|
18208
18234
|
for (var Z = h; Z <= d; Z++) {
|
|
18209
|
-
var o0 = Z in
|
|
18235
|
+
var o0 = Z in P ? P[Z] : 0;
|
|
18210
18236
|
D(o0, Z - h, B - A);
|
|
18211
18237
|
}
|
|
18212
18238
|
}
|
|
@@ -18343,18 +18369,18 @@ Example:
|
|
|
18343
18369
|
D = function() {
|
|
18344
18370
|
return h;
|
|
18345
18371
|
};
|
|
18346
|
-
for (var C = [], X = [],
|
|
18347
|
-
|
|
18348
|
-
var
|
|
18349
|
-
if (
|
|
18350
|
-
var H = D(
|
|
18351
|
-
m(H, W) || (X.push(
|
|
18372
|
+
for (var C = [], X = [], S = [], $ = 0; $ < x; $++) {
|
|
18373
|
+
S.push(C.length);
|
|
18374
|
+
var P = $ - R;
|
|
18375
|
+
if (P >= 0 && P < N) {
|
|
18376
|
+
var H = D(P);
|
|
18377
|
+
m(H, W) || (X.push(P + v), C.push(H));
|
|
18352
18378
|
}
|
|
18353
18379
|
}
|
|
18354
|
-
return
|
|
18380
|
+
return S.push(C.length), new i({
|
|
18355
18381
|
values: C,
|
|
18356
18382
|
index: X,
|
|
18357
|
-
ptr:
|
|
18383
|
+
ptr: S,
|
|
18358
18384
|
size: [w, x]
|
|
18359
18385
|
});
|
|
18360
18386
|
}, i.prototype.swapRows = function(O, h) {
|
|
@@ -18794,16 +18820,16 @@ Example:
|
|
|
18794
18820
|
throw new RangeError("Dimension mismatch. Matrix A (" + b + ") must match Matrix B (" + O + ")");
|
|
18795
18821
|
var d = b[0], A = b[1], q, m = t, W = 0, R = o;
|
|
18796
18822
|
typeof M == "string" && M === h && M !== "mixed" && (q = M, m = e.find(t, [q, q]), W = e.convert(0, q), R = e.find(o, [q, q]));
|
|
18797
|
-
var v = a && l ? [] : void 0, w = [], x = [], N = v ? [] : void 0, D = v ? [] : void 0, B = [], C = [], X,
|
|
18798
|
-
for (
|
|
18799
|
-
x[
|
|
18800
|
-
var H =
|
|
18801
|
-
for ($ = p[
|
|
18823
|
+
var v = a && l ? [] : void 0, w = [], x = [], N = v ? [] : void 0, D = v ? [] : void 0, B = [], C = [], X, S, $, P;
|
|
18824
|
+
for (S = 0; S < A; S++) {
|
|
18825
|
+
x[S] = w.length;
|
|
18826
|
+
var H = S + 1;
|
|
18827
|
+
for ($ = p[S], P = p[S + 1]; $ < P; $++)
|
|
18802
18828
|
X = c[$], w.push(X), B[X] = H, N && (N[X] = a[$]);
|
|
18803
|
-
for ($ = f[
|
|
18829
|
+
for ($ = f[S], P = f[S + 1]; $ < P; $++)
|
|
18804
18830
|
X = u[$], B[X] !== H && w.push(X), C[X] = H, D && (D[X] = l[$]);
|
|
18805
18831
|
if (v)
|
|
18806
|
-
for ($ = x[
|
|
18832
|
+
for ($ = x[S]; $ < w.length; ) {
|
|
18807
18833
|
X = w[$];
|
|
18808
18834
|
var t0 = B[X], Z = C[X];
|
|
18809
18835
|
if (t0 === H || Z === H) {
|
|
@@ -18946,13 +18972,13 @@ Example:
|
|
|
18946
18972
|
throw new RangeError("Dimension mismatch. Matrix A (" + b + ") must match Matrix B (" + O + ")");
|
|
18947
18973
|
var d = b[0], A = b[1], q, m = t, W = 0, R = o;
|
|
18948
18974
|
typeof M == "string" && M === h && M !== "mixed" && (q = M, m = e.find(t, [q, q]), W = e.convert(0, q), R = e.find(o, [q, q]));
|
|
18949
|
-
var v = a && l ? [] : void 0, w = [], x = [], N = a && l ? [] : void 0, D = a && l ? [] : void 0, B = [], C = [], X,
|
|
18950
|
-
for (
|
|
18951
|
-
x[
|
|
18952
|
-
var t0 =
|
|
18953
|
-
for (
|
|
18975
|
+
var v = a && l ? [] : void 0, w = [], x = [], N = a && l ? [] : void 0, D = a && l ? [] : void 0, B = [], C = [], X, S, $, P, H;
|
|
18976
|
+
for (S = 0; S < A; S++) {
|
|
18977
|
+
x[S] = w.length;
|
|
18978
|
+
var t0 = S + 1;
|
|
18979
|
+
for (P = p[S], H = p[S + 1], $ = P; $ < H; $++)
|
|
18954
18980
|
X = c[$], w.push(X), B[X] = t0, N && (N[X] = a[$]);
|
|
18955
|
-
for (
|
|
18981
|
+
for (P = f[S], H = f[S + 1], $ = P; $ < H; $++)
|
|
18956
18982
|
if (X = u[$], B[X] === t0) {
|
|
18957
18983
|
if (N) {
|
|
18958
18984
|
var Z = R(N[X], l[$]);
|
|
@@ -18961,7 +18987,7 @@ Example:
|
|
|
18961
18987
|
} else
|
|
18962
18988
|
w.push(X), C[X] = t0, D && (D[X] = l[$]);
|
|
18963
18989
|
if (N && D)
|
|
18964
|
-
for ($ = x[
|
|
18990
|
+
for ($ = x[S]; $ < w.length; )
|
|
18965
18991
|
X = w[$], B[X] === t0 ? (v[$] = N[X], $++) : C[X] === t0 ? (v[$] = D[X], $++) : w.splice($, 1);
|
|
18966
18992
|
}
|
|
18967
18993
|
return x[A] = w.length, i.createSparseMatrix({
|
|
@@ -19074,17 +19100,17 @@ Example:
|
|
|
19074
19100
|
return l(W, R);
|
|
19075
19101
|
}
|
|
19076
19102
|
function l(W, R) {
|
|
19077
|
-
var v = W._data, w = W._size, x = W._datatype || W.getDataType(), N = R._data, D = R._size, B = R._datatype || R.getDataType(), C = w[0], X = D[1],
|
|
19078
|
-
x && B && x === B && typeof x == "string" && x !== "mixed" && (
|
|
19103
|
+
var v = W._data, w = W._size, x = W._datatype || W.getDataType(), N = R._data, D = R._size, B = R._datatype || R.getDataType(), C = w[0], X = D[1], S, $ = r, P = i;
|
|
19104
|
+
x && B && x === B && typeof x == "string" && x !== "mixed" && (S = x, $ = e.find(r, [S, S]), P = e.find(i, [S, S]));
|
|
19079
19105
|
for (var H = [], t0 = 0; t0 < X; t0++) {
|
|
19080
|
-
for (var Z =
|
|
19081
|
-
Z = $(Z,
|
|
19106
|
+
for (var Z = P(v[0], N[0][t0]), o0 = 1; o0 < C; o0++)
|
|
19107
|
+
Z = $(Z, P(v[o0], N[o0][t0]));
|
|
19082
19108
|
H[t0] = Z;
|
|
19083
19109
|
}
|
|
19084
19110
|
return W.createDenseMatrix({
|
|
19085
19111
|
data: H,
|
|
19086
19112
|
size: [X],
|
|
19087
|
-
datatype: x === W._datatype && B === R._datatype ?
|
|
19113
|
+
datatype: x === W._datatype && B === R._datatype ? S : void 0
|
|
19088
19114
|
});
|
|
19089
19115
|
}
|
|
19090
19116
|
var u = e("_multiplyMatrixVector", {
|
|
@@ -19097,34 +19123,34 @@ Example:
|
|
|
19097
19123
|
"SparseMatrix, SparseMatrix": m
|
|
19098
19124
|
});
|
|
19099
19125
|
function O(W, R) {
|
|
19100
|
-
var v = W._data, w = W._size, x = W._datatype || W.getDataType(), N = R._data, D = R._datatype || R.getDataType(), B = w[0], C = w[1], X,
|
|
19101
|
-
x && D && x === D && typeof x == "string" && x !== "mixed" && (X = x,
|
|
19102
|
-
for (var
|
|
19126
|
+
var v = W._data, w = W._size, x = W._datatype || W.getDataType(), N = R._data, D = R._datatype || R.getDataType(), B = w[0], C = w[1], X, S = r, $ = i;
|
|
19127
|
+
x && D && x === D && typeof x == "string" && x !== "mixed" && (X = x, S = e.find(r, [X, X]), $ = e.find(i, [X, X]));
|
|
19128
|
+
for (var P = [], H = 0; H < B; H++) {
|
|
19103
19129
|
for (var t0 = v[H], Z = $(t0[0], N[0]), o0 = 1; o0 < C; o0++)
|
|
19104
|
-
Z =
|
|
19105
|
-
|
|
19130
|
+
Z = S(Z, $(t0[o0], N[o0]));
|
|
19131
|
+
P[H] = Z;
|
|
19106
19132
|
}
|
|
19107
19133
|
return W.createDenseMatrix({
|
|
19108
|
-
data:
|
|
19134
|
+
data: P,
|
|
19109
19135
|
size: [B],
|
|
19110
19136
|
datatype: x === W._datatype && D === R._datatype ? X : void 0
|
|
19111
19137
|
});
|
|
19112
19138
|
}
|
|
19113
19139
|
function h(W, R) {
|
|
19114
|
-
var v = W._data, w = W._size, x = W._datatype || W.getDataType(), N = R._data, D = R._size, B = R._datatype || R.getDataType(), C = w[0], X = w[1],
|
|
19115
|
-
x && B && x === B && typeof x == "string" && x !== "mixed" && x !== "mixed" && ($ = x,
|
|
19140
|
+
var v = W._data, w = W._size, x = W._datatype || W.getDataType(), N = R._data, D = R._size, B = R._datatype || R.getDataType(), C = w[0], X = w[1], S = D[1], $, P = r, H = i;
|
|
19141
|
+
x && B && x === B && typeof x == "string" && x !== "mixed" && x !== "mixed" && ($ = x, P = e.find(r, [$, $]), H = e.find(i, [$, $]));
|
|
19116
19142
|
for (var t0 = [], Z = 0; Z < C; Z++) {
|
|
19117
19143
|
var o0 = v[Z];
|
|
19118
19144
|
t0[Z] = [];
|
|
19119
|
-
for (var b0 = 0; b0 <
|
|
19145
|
+
for (var b0 = 0; b0 < S; b0++) {
|
|
19120
19146
|
for (var G = H(o0[0], N[0][b0]), J = 1; J < X; J++)
|
|
19121
|
-
G =
|
|
19147
|
+
G = P(G, H(o0[J], N[J][b0]));
|
|
19122
19148
|
t0[Z][b0] = G;
|
|
19123
19149
|
}
|
|
19124
19150
|
}
|
|
19125
19151
|
return W.createDenseMatrix({
|
|
19126
19152
|
data: t0,
|
|
19127
|
-
size: [C,
|
|
19153
|
+
size: [C, S],
|
|
19128
19154
|
datatype: x === W._datatype && B === R._datatype ? $ : void 0
|
|
19129
19155
|
});
|
|
19130
19156
|
}
|
|
@@ -19132,19 +19158,19 @@ Example:
|
|
|
19132
19158
|
var v = W._data, w = W._size, x = W._datatype || W.getDataType(), N = R._values, D = R._index, B = R._ptr, C = R._size, X = R._datatype || R._data === void 0 ? R._datatype : R.getDataType();
|
|
19133
19159
|
if (!N)
|
|
19134
19160
|
throw new Error("Cannot multiply Dense Matrix times Pattern only Matrix");
|
|
19135
|
-
var
|
|
19136
|
-
x && X && x === X && typeof x == "string" && x !== "mixed" && (
|
|
19161
|
+
var S = w[0], $ = C[1], P, H = r, t0 = i, Z = n, o0 = 0;
|
|
19162
|
+
x && X && x === X && typeof x == "string" && x !== "mixed" && (P = x, H = e.find(r, [P, P]), t0 = e.find(i, [P, P]), Z = e.find(n, [P, P]), o0 = e.convert(0, P));
|
|
19137
19163
|
for (var b0 = [], G = [], J = [], Y = R.createSparseMatrix({
|
|
19138
19164
|
values: b0,
|
|
19139
19165
|
index: G,
|
|
19140
19166
|
ptr: J,
|
|
19141
|
-
size: [
|
|
19142
|
-
datatype: x === W._datatype && X === R._datatype ?
|
|
19167
|
+
size: [S, $],
|
|
19168
|
+
datatype: x === W._datatype && X === R._datatype ? P : void 0
|
|
19143
19169
|
}), c0 = 0; c0 < $; c0++) {
|
|
19144
19170
|
J[c0] = G.length;
|
|
19145
19171
|
var n0 = B[c0], m0 = B[c0 + 1];
|
|
19146
19172
|
if (m0 > n0)
|
|
19147
|
-
for (var v0 = 0, g0 = 0; g0 <
|
|
19173
|
+
for (var v0 = 0, g0 = 0; g0 < S; g0++) {
|
|
19148
19174
|
for (var x0 = g0 + 1, q0 = void 0, F = n0; F < m0; F++) {
|
|
19149
19175
|
var e0 = D[F];
|
|
19150
19176
|
v0 !== x0 ? (q0 = t0(v[g0][e0], N[F]), v0 = x0) : q0 = H(q0, t0(v[g0][e0], N[F]));
|
|
@@ -19158,10 +19184,10 @@ Example:
|
|
|
19158
19184
|
var v = W._values, w = W._index, x = W._ptr, N = W._datatype || W._data === void 0 ? W._datatype : W.getDataType();
|
|
19159
19185
|
if (!v)
|
|
19160
19186
|
throw new Error("Cannot multiply Pattern only Matrix times Dense Matrix");
|
|
19161
|
-
var D = R._data, B = R._datatype || R.getDataType(), C = W._size[0], X = R._size[0],
|
|
19187
|
+
var D = R._data, B = R._datatype || R.getDataType(), C = W._size[0], X = R._size[0], S = [], $ = [], P = [], H, t0 = r, Z = i, o0 = n, b0 = 0;
|
|
19162
19188
|
N && B && N === B && typeof N == "string" && N !== "mixed" && (H = N, t0 = e.find(r, [H, H]), Z = e.find(i, [H, H]), o0 = e.find(n, [H, H]), b0 = e.convert(0, H));
|
|
19163
19189
|
var G = [], J = [];
|
|
19164
|
-
|
|
19190
|
+
P[0] = 0;
|
|
19165
19191
|
for (var Y = 0; Y < X; Y++) {
|
|
19166
19192
|
var c0 = D[Y];
|
|
19167
19193
|
if (!o0(c0, b0))
|
|
@@ -19172,12 +19198,12 @@ Example:
|
|
|
19172
19198
|
}
|
|
19173
19199
|
for (var x0 = $.length, q0 = 0; q0 < x0; q0++) {
|
|
19174
19200
|
var F = $[q0];
|
|
19175
|
-
|
|
19201
|
+
S[q0] = G[F];
|
|
19176
19202
|
}
|
|
19177
|
-
return
|
|
19178
|
-
values:
|
|
19203
|
+
return P[1] = $.length, W.createSparseMatrix({
|
|
19204
|
+
values: S,
|
|
19179
19205
|
index: $,
|
|
19180
|
-
ptr:
|
|
19206
|
+
ptr: P,
|
|
19181
19207
|
size: [C, 1],
|
|
19182
19208
|
datatype: N === W._datatype && B === R._datatype ? H : void 0
|
|
19183
19209
|
});
|
|
@@ -19186,22 +19212,22 @@ Example:
|
|
|
19186
19212
|
var v = W._values, w = W._index, x = W._ptr, N = W._datatype || W._data === void 0 ? W._datatype : W.getDataType();
|
|
19187
19213
|
if (!v)
|
|
19188
19214
|
throw new Error("Cannot multiply Pattern only Matrix times Dense Matrix");
|
|
19189
|
-
var D = R._data, B = R._datatype || R.getDataType(), C = W._size[0], X = R._size[0],
|
|
19190
|
-
N && B && N === B && typeof N == "string" && N !== "mixed" && ($ = N,
|
|
19215
|
+
var D = R._data, B = R._datatype || R.getDataType(), C = W._size[0], X = R._size[0], S = R._size[1], $, P = r, H = i, t0 = n, Z = 0;
|
|
19216
|
+
N && B && N === B && typeof N == "string" && N !== "mixed" && ($ = N, P = e.find(r, [$, $]), H = e.find(i, [$, $]), t0 = e.find(n, [$, $]), Z = e.convert(0, $));
|
|
19191
19217
|
for (var o0 = [], b0 = [], G = [], J = W.createSparseMatrix({
|
|
19192
19218
|
values: o0,
|
|
19193
19219
|
index: b0,
|
|
19194
19220
|
ptr: G,
|
|
19195
|
-
size: [C,
|
|
19221
|
+
size: [C, S],
|
|
19196
19222
|
datatype: N === W._datatype && B === R._datatype ? $ : void 0
|
|
19197
|
-
}), Y = [], c0 = [], n0 = 0; n0 <
|
|
19223
|
+
}), Y = [], c0 = [], n0 = 0; n0 < S; n0++) {
|
|
19198
19224
|
G[n0] = b0.length;
|
|
19199
19225
|
for (var m0 = n0 + 1, v0 = 0; v0 < X; v0++) {
|
|
19200
19226
|
var g0 = D[v0][n0];
|
|
19201
19227
|
if (!t0(g0, Z))
|
|
19202
19228
|
for (var x0 = x[v0], q0 = x[v0 + 1], F = x0; F < q0; F++) {
|
|
19203
19229
|
var e0 = w[F];
|
|
19204
|
-
c0[e0] !== m0 ? (c0[e0] = m0, b0.push(e0), Y[e0] = H(g0, v[F])) : Y[e0] =
|
|
19230
|
+
c0[e0] !== m0 ? (c0[e0] = m0, b0.push(e0), Y[e0] = H(g0, v[F])) : Y[e0] = P(Y[e0], H(g0, v[F]));
|
|
19205
19231
|
}
|
|
19206
19232
|
}
|
|
19207
19233
|
for (var a0 = G[n0], d0 = b0.length, D0 = a0; D0 < d0; D0++) {
|
|
@@ -19209,28 +19235,28 @@ Example:
|
|
|
19209
19235
|
o0[D0] = Y[X0];
|
|
19210
19236
|
}
|
|
19211
19237
|
}
|
|
19212
|
-
return G[
|
|
19238
|
+
return G[S] = b0.length, J;
|
|
19213
19239
|
}
|
|
19214
19240
|
function m(W, R) {
|
|
19215
|
-
var v = W._values, w = W._index, x = W._ptr, N = W._datatype || W._data === void 0 ? W._datatype : W.getDataType(), D = R._values, B = R._index, C = R._ptr, X = R._datatype || R._data === void 0 ? R._datatype : R.getDataType(),
|
|
19241
|
+
var v = W._values, w = W._index, x = W._ptr, N = W._datatype || W._data === void 0 ? W._datatype : W.getDataType(), D = R._values, B = R._index, C = R._ptr, X = R._datatype || R._data === void 0 ? R._datatype : R.getDataType(), S = W._size[0], $ = R._size[1], P = v && D, H, t0 = r, Z = i;
|
|
19216
19242
|
N && X && N === X && typeof N == "string" && N !== "mixed" && (H = N, t0 = e.find(r, [H, H]), Z = e.find(i, [H, H]));
|
|
19217
|
-
for (var o0 =
|
|
19243
|
+
for (var o0 = P ? [] : void 0, b0 = [], G = [], J = W.createSparseMatrix({
|
|
19218
19244
|
values: o0,
|
|
19219
19245
|
index: b0,
|
|
19220
19246
|
ptr: G,
|
|
19221
|
-
size: [
|
|
19247
|
+
size: [S, $],
|
|
19222
19248
|
datatype: N === W._datatype && X === R._datatype ? H : void 0
|
|
19223
|
-
}), Y =
|
|
19249
|
+
}), Y = P ? [] : void 0, c0 = [], n0, m0, v0, g0, x0, q0, F, e0, a0 = 0; a0 < $; a0++) {
|
|
19224
19250
|
G[a0] = b0.length;
|
|
19225
19251
|
var d0 = a0 + 1;
|
|
19226
19252
|
for (x0 = C[a0], q0 = C[a0 + 1], g0 = x0; g0 < q0; g0++)
|
|
19227
|
-
if (e0 = B[g0],
|
|
19253
|
+
if (e0 = B[g0], P)
|
|
19228
19254
|
for (m0 = x[e0], v0 = x[e0 + 1], n0 = m0; n0 < v0; n0++)
|
|
19229
19255
|
F = w[n0], c0[F] !== d0 ? (c0[F] = d0, b0.push(F), Y[F] = Z(D[g0], v[n0])) : Y[F] = t0(Y[F], Z(D[g0], v[n0]));
|
|
19230
19256
|
else
|
|
19231
19257
|
for (m0 = x[e0], v0 = x[e0 + 1], n0 = m0; n0 < v0; n0++)
|
|
19232
19258
|
F = w[n0], c0[F] !== d0 && (c0[F] = d0, b0.push(F));
|
|
19233
|
-
if (
|
|
19259
|
+
if (P)
|
|
19234
19260
|
for (var D0 = G[a0], X0 = b0.length, ce = D0; ce < X0; ce++) {
|
|
19235
19261
|
var R1 = b0[ce];
|
|
19236
19262
|
o0[ce] = Y[R1];
|
|
@@ -20976,9 +21002,9 @@ Example:
|
|
|
20976
21002
|
for (w = 0; w < i; w++)
|
|
20977
21003
|
N[w] = N[x = M & x + m[w % R] + (W = N[w])], N[x] = W;
|
|
20978
21004
|
(v.g = function(D) {
|
|
20979
|
-
for (var B, C = 0, X = v.i,
|
|
20980
|
-
B = $[X = M & X + 1], C = C * i + $[M & ($[X] = $[
|
|
20981
|
-
return v.i = X, v.j =
|
|
21005
|
+
for (var B, C = 0, X = v.i, S = v.j, $ = v.S; D--; )
|
|
21006
|
+
B = $[X = M & X + 1], C = C * i + $[M & ($[X] = $[S = M & S + B]) + ($[S] = B)];
|
|
21007
|
+
return v.i = X, v.j = S, C;
|
|
20982
21008
|
})(i);
|
|
20983
21009
|
}
|
|
20984
21010
|
function O(m, W) {
|
|
@@ -23351,17 +23377,17 @@ ${f}`), f;
|
|
|
23351
23377
|
if ((A == null ? void 0 : A.get(h)) || (q == null || q.set(h, m), A == null || A.set(h, m)), d != null && d.has(h)) {
|
|
23352
23378
|
const D = Z1(O.tickerid), B = Z1(i);
|
|
23353
23379
|
let C = K0(n, l, D) * 1e3;
|
|
23354
|
-
const X = K0(b, l, B) * 1e3, { index:
|
|
23355
|
-
if (!
|
|
23380
|
+
const X = K0(b, l, B) * 1e3, { index: S = 0, periodStamp: $ = X } = this._reqCacheData[r] || {}, { list: P } = (d == null ? void 0 : d.get(h)) || {};
|
|
23381
|
+
if (!P.length)
|
|
23356
23382
|
return;
|
|
23357
|
-
const H =
|
|
23383
|
+
const H = P.slice(S);
|
|
23358
23384
|
let t0 = l, Z = D ? l : $ + t0;
|
|
23359
23385
|
D ? t0 = u : f && Z > f && (Z = f);
|
|
23360
|
-
const o0 =
|
|
23386
|
+
const o0 = P.length - 1;
|
|
23361
23387
|
if (o0 < 0) return;
|
|
23362
23388
|
const b0 = {
|
|
23363
|
-
lastBarIndex:
|
|
23364
|
-
lastBarTime:
|
|
23389
|
+
lastBarIndex: P[o0].barIndex || o0,
|
|
23390
|
+
lastBarTime: P[o0].time,
|
|
23365
23391
|
interval: n,
|
|
23366
23392
|
mintick: M
|
|
23367
23393
|
};
|
|
@@ -23373,7 +23399,7 @@ ${f}`), f;
|
|
|
23373
23399
|
Z,
|
|
23374
23400
|
C,
|
|
23375
23401
|
b0,
|
|
23376
|
-
|
|
23402
|
+
S,
|
|
23377
23403
|
$,
|
|
23378
23404
|
r,
|
|
23379
23405
|
t0,
|
|
@@ -23385,7 +23411,7 @@ ${f}`), f;
|
|
|
23385
23411
|
Z,
|
|
23386
23412
|
C,
|
|
23387
23413
|
b0,
|
|
23388
|
-
|
|
23414
|
+
S,
|
|
23389
23415
|
$,
|
|
23390
23416
|
r,
|
|
23391
23417
|
t0,
|
|
@@ -23398,7 +23424,7 @@ ${f}`), f;
|
|
|
23398
23424
|
for (const [G, J] of H.entries()) {
|
|
23399
23425
|
let { time: Y, barIndex: c0, openTime: n0, nextBarTime: m0 } = J;
|
|
23400
23426
|
Y = Y * 1e3, m0 = m0 * 1e3 || (B ? Y : ((R = H[G + 1]) == null ? void 0 : R.time) * 1e3 || Y + C), B && (Y = n0);
|
|
23401
|
-
const v0 = c0 ||
|
|
23427
|
+
const v0 = c0 || S + G;
|
|
23402
23428
|
if (Y >= Z) {
|
|
23403
23429
|
this._reqCacheData[r] = {
|
|
23404
23430
|
index: v0,
|
|
@@ -23422,7 +23448,7 @@ ${f}`), f;
|
|
|
23422
23448
|
const m0 = B ? Y : Y + C;
|
|
23423
23449
|
B && (Y = n0);
|
|
23424
23450
|
const v0 = B ? m0 : ((w = H[G + 1]) == null ? void 0 : w.time) * 1e3 || m0;
|
|
23425
|
-
let g0 = c0 ||
|
|
23451
|
+
let g0 = c0 || S + G;
|
|
23426
23452
|
if (Y > Z) {
|
|
23427
23453
|
this._reqCacheData[r] = {
|
|
23428
23454
|
index: g0,
|
|
@@ -23448,7 +23474,7 @@ ${f}`), f;
|
|
|
23448
23474
|
}), b0);
|
|
23449
23475
|
}
|
|
23450
23476
|
this._reqCacheData[r] = {
|
|
23451
|
-
index:
|
|
23477
|
+
index: P.length,
|
|
23452
23478
|
periodStamp: $
|
|
23453
23479
|
};
|
|
23454
23480
|
return;
|
|
@@ -23926,7 +23952,7 @@ ${f}`), f;
|
|
|
23926
23952
|
};
|
|
23927
23953
|
}
|
|
23928
23954
|
fill(t, r) {
|
|
23929
|
-
var w, x, N, D, B, C, X,
|
|
23955
|
+
var w, x, N, D, B, C, X, S;
|
|
23930
23956
|
const i = ["color"];
|
|
23931
23957
|
E0(t, i);
|
|
23932
23958
|
const v = t, { color: n, transp: o = 90, seriesColors: a, hline1: c, hline2: p, plot1: b, plot2: M } = v, l = U0(v, ["color", "transp", "seriesColors", "hline1", "hline2", "plot1", "plot2"]);
|
|
@@ -23937,18 +23963,18 @@ ${f}`), f;
|
|
|
23937
23963
|
if (c && p)
|
|
23938
23964
|
m = (w = this._hlines.get(c == null ? void 0 : c.key)) == null ? void 0 : w.price, W = (x = this._hlines.get(p == null ? void 0 : p.key)) == null ? void 0 : x.price, R = "hline";
|
|
23939
23965
|
else {
|
|
23940
|
-
const $ = this._plots.get(b == null ? void 0 : b.key),
|
|
23966
|
+
const $ = this._plots.get(b == null ? void 0 : b.key), P = this._plots.get(M == null ? void 0 : M.key), H = ($ == null ? void 0 : $.data) || [], t0 = (P == null ? void 0 : P.data) || [];
|
|
23941
23967
|
if (m = (D = (N = H[f]) == null ? void 0 : N.value) == null ? void 0 : D[1], W = (C = (B = t0[f]) == null ? void 0 : B.value) == null ? void 0 : C[1], !f) {
|
|
23942
|
-
const Z = ($ == null ? void 0 : $.force_overlay) && (
|
|
23943
|
-
($ != null && $.force_overlay ||
|
|
23968
|
+
const Z = ($ == null ? void 0 : $.force_overlay) && (P == null ? void 0 : P.force_overlay);
|
|
23969
|
+
($ != null && $.force_overlay || P != null && P.force_overlay) && !Z ? this._errorListener.addError(er.plotFillForceOverlayErr, r, $e.Error) : l.force_overlay = Z;
|
|
23944
23970
|
}
|
|
23945
23971
|
}
|
|
23946
23972
|
if (A[f] = { time: O, color: u, barIndex: f, plot1: m, plot2: W }, this._seriesColorHandle(t, i, d), !d) {
|
|
23947
23973
|
this._count++;
|
|
23948
|
-
const $ = ((X = this._options.indicator) == null ? void 0 : X.explicit_plot_zorder) || ((
|
|
23974
|
+
const $ = ((X = this._options.indicator) == null ? void 0 : X.explicit_plot_zorder) || ((S = this._options.strategy) == null ? void 0 : S.explicit_plot_zorder), P = u ? [u] : void 0;
|
|
23949
23975
|
this._fills.set(h, K(I({
|
|
23950
23976
|
id: h,
|
|
23951
|
-
colors:
|
|
23977
|
+
colors: P,
|
|
23952
23978
|
display: q,
|
|
23953
23979
|
data: A,
|
|
23954
23980
|
type: R,
|
|
@@ -24311,14 +24337,14 @@ ${f}`), f;
|
|
|
24311
24337
|
symbol: B = "",
|
|
24312
24338
|
timeframe: C,
|
|
24313
24339
|
id: X,
|
|
24314
|
-
calc_bars_count:
|
|
24340
|
+
calc_bars_count: S,
|
|
24315
24341
|
ignore_invalid_symbol: $,
|
|
24316
|
-
originTimeframe:
|
|
24342
|
+
originTimeframe: P
|
|
24317
24343
|
} = D;
|
|
24318
24344
|
let H = 0;
|
|
24319
24345
|
const { list: t0, endTime: Z } = (p == null ? void 0 : p.get(X)) || {};
|
|
24320
24346
|
t0 && (H = Z);
|
|
24321
|
-
const o0 = Z1(B) || Ei(B), [b0, G] = B.split(":"), J = Number(
|
|
24347
|
+
const o0 = Z1(B) || Ei(B), [b0, G] = B.split(":"), J = Number(P) <= 60 ? 1e4 : 5e3, Y = S ? S <= 1e5 ? S : 1e5 : J, c0 = {
|
|
24322
24348
|
exchange: G ? b0 : "X",
|
|
24323
24349
|
symbol: G || b0,
|
|
24324
24350
|
limit: Y,
|
|
@@ -24339,15 +24365,15 @@ ${f}`), f;
|
|
|
24339
24365
|
const w = yield Promise.all(R), x = self.workerStorage.get(`request_${l}_pre_data`) || /* @__PURE__ */ new Map();
|
|
24340
24366
|
for (const [N, D] of w.entries()) {
|
|
24341
24367
|
const { code: B, data: C, msg: X } = D, {
|
|
24342
|
-
id:
|
|
24368
|
+
id: S,
|
|
24343
24369
|
key: $,
|
|
24344
|
-
ignore_invalid_symbol:
|
|
24370
|
+
ignore_invalid_symbol: P,
|
|
24345
24371
|
currentDataList: H = [],
|
|
24346
24372
|
startTime: t0,
|
|
24347
24373
|
isFutures: Z,
|
|
24348
24374
|
timeframe: o0
|
|
24349
24375
|
} = v[N];
|
|
24350
|
-
if (B !== 200 && !
|
|
24376
|
+
if (B !== 200 && !P)
|
|
24351
24377
|
return {
|
|
24352
24378
|
status: 1,
|
|
24353
24379
|
errors: [
|
|
@@ -24374,14 +24400,14 @@ ${f}`), f;
|
|
|
24374
24400
|
G,
|
|
24375
24401
|
m0
|
|
24376
24402
|
);
|
|
24377
|
-
xi(Y, g0), x0 && x.set(
|
|
24403
|
+
xi(Y, g0), x0 && x.set(S, x0);
|
|
24378
24404
|
}
|
|
24379
|
-
const c0 = b == null ? void 0 : b.get(
|
|
24405
|
+
const c0 = b == null ? void 0 : b.get(S);
|
|
24380
24406
|
if (c0) {
|
|
24381
24407
|
const n0 = Number(J) || 1e-5;
|
|
24382
24408
|
c0.mintick = n0;
|
|
24383
24409
|
}
|
|
24384
|
-
Y.length && (Y[Y.length - 1].isrealtime = !0), xi(H, Y), p == null || p.set(
|
|
24410
|
+
Y.length && (Y[Y.length - 1].isrealtime = !0), xi(H, Y), p == null || p.set(S, {
|
|
24385
24411
|
list: H,
|
|
24386
24412
|
session: b0,
|
|
24387
24413
|
timezone: G,
|
|
@@ -24393,10 +24419,10 @@ ${f}`), f;
|
|
|
24393
24419
|
let f = !1;
|
|
24394
24420
|
for (const [R, v] of o) {
|
|
24395
24421
|
if (!v || v.isRun) continue;
|
|
24396
|
-
const W = v, { strJs: w, paramsExpr: x, dataId: N, funcName: D } = W, B = U0(W, ["strJs", "paramsExpr", "dataId", "funcName"]), C = b == null ? void 0 : b.get(N), { list: X = [], session:
|
|
24422
|
+
const W = v, { strJs: w, paramsExpr: x, dataId: N, funcName: D } = W, B = U0(W, ["strJs", "paramsExpr", "dataId", "funcName"]), C = b == null ? void 0 : b.get(N), { list: X = [], session: S, timezone: $ } = (p == null ? void 0 : p.get(N)) || {};
|
|
24397
24423
|
v.isRun = !0;
|
|
24398
24424
|
const {
|
|
24399
|
-
logs:
|
|
24425
|
+
logs: P = [],
|
|
24400
24426
|
errors: H = [],
|
|
24401
24427
|
cacheData: t0
|
|
24402
24428
|
} = (yield e.request.runScripts(
|
|
@@ -24406,7 +24432,7 @@ ${f}`), f;
|
|
|
24406
24432
|
X,
|
|
24407
24433
|
Object.assign(B, {
|
|
24408
24434
|
mintick: (C == null ? void 0 : C.mintick) || 1e-5,
|
|
24409
|
-
session:
|
|
24435
|
+
session: S,
|
|
24410
24436
|
timezone: $,
|
|
24411
24437
|
inputs: u
|
|
24412
24438
|
}),
|
|
@@ -24416,7 +24442,7 @@ ${f}`), f;
|
|
|
24416
24442
|
f = !0, t0 && (M.requestCacheData[R] = t0, Object.assign(
|
|
24417
24443
|
M.requestCacheData,
|
|
24418
24444
|
t0.requestCacheData || {}
|
|
24419
|
-
), t0.requestCacheData = {}), e.log.mergeLogs(
|
|
24445
|
+
), t0.requestCacheData = {}), e.log.mergeLogs(P), e.addErrors(H, R);
|
|
24420
24446
|
}
|
|
24421
24447
|
if (n && f) {
|
|
24422
24448
|
e.log.clearLogForIndex(n.barIndex), s.__isReqRepeated = !0, to(
|
|
@@ -24456,73 +24482,65 @@ ${f}`), f;
|
|
|
24456
24482
|
const w = Hr[R.interval] || jr(R.interval), x = Z1(R.symbol) || Ei(R.symbol);
|
|
24457
24483
|
if (v.length && c != null && c.has(m)) {
|
|
24458
24484
|
const {
|
|
24459
|
-
list: N,
|
|
24485
|
+
list: N = [],
|
|
24460
24486
|
session: D,
|
|
24461
24487
|
timezone: B,
|
|
24462
24488
|
endTime: C
|
|
24463
24489
|
} = (c == null ? void 0 : c.get(m)) || {};
|
|
24464
|
-
|
|
24465
|
-
|
|
24466
|
-
|
|
24467
|
-
|
|
24468
|
-
const J = l.get(m), { newLines: Y, preData: c0 } = ys(
|
|
24469
|
-
v,
|
|
24470
|
-
P,
|
|
24471
|
-
w,
|
|
24472
|
-
!0,
|
|
24473
|
-
((J == null ? void 0 : J.date) || 0) - 1,
|
|
24474
|
-
J,
|
|
24475
|
-
(o == null ? void 0 : o[R.symbol]) || D,
|
|
24476
|
-
B,
|
|
24477
|
-
Z1(R.symbol)
|
|
24478
|
-
);
|
|
24479
|
-
v = Y, l.set(m, c0);
|
|
24480
|
-
}
|
|
24481
|
-
const $ = P.time;
|
|
24482
|
-
if (v = v.filter((J) => J.time >= $), !v.length) continue;
|
|
24483
|
-
const S = (f = v[0]) == null ? void 0 : f.time;
|
|
24484
|
-
if (S === $) {
|
|
24485
|
-
const J = N.pop();
|
|
24486
|
-
X -= 1, v[0] = Object.assign(J, K(I({}, v[0]), { isrealtime: !1 }));
|
|
24487
|
-
}
|
|
24488
|
-
for (const J of v)
|
|
24489
|
-
X += 1, J.barindex = X;
|
|
24490
|
-
v[v.length - 1].isrealtime = !0;
|
|
24491
|
-
const H = ((O = b == null ? void 0 : b.get(m)) == null ? void 0 : O.mintick) || 1e-5;
|
|
24492
|
-
if (c == null || c.set(m, {
|
|
24493
|
-
list: N.concat(v),
|
|
24494
|
-
session: D,
|
|
24495
|
-
timezone: B,
|
|
24496
|
-
endTime: C
|
|
24497
|
-
}), S > $ && v.unshift(Object.assign(P, { isrealtime: !1 })), !n[h]) continue;
|
|
24498
|
-
const { varCacheData: t0, funcCacheData: Z } = n[h] || {}, {
|
|
24499
|
-
logs: o0 = [],
|
|
24500
|
-
errors: b0 = [],
|
|
24501
|
-
cacheData: G
|
|
24502
|
-
} = (yield t.request.runScripts(
|
|
24503
|
-
A,
|
|
24504
|
-
h,
|
|
24505
|
-
!1,
|
|
24490
|
+
let X = N.length - 1;
|
|
24491
|
+
const S = N[X];
|
|
24492
|
+
if (x) {
|
|
24493
|
+
const J = l.get(m), { newLines: Y, preData: c0 } = ys(
|
|
24506
24494
|
v,
|
|
24507
|
-
|
|
24508
|
-
|
|
24509
|
-
|
|
24510
|
-
|
|
24511
|
-
|
|
24512
|
-
|
|
24513
|
-
|
|
24514
|
-
|
|
24515
|
-
|
|
24516
|
-
|
|
24517
|
-
|
|
24518
|
-
|
|
24519
|
-
|
|
24520
|
-
|
|
24521
|
-
|
|
24495
|
+
S,
|
|
24496
|
+
w,
|
|
24497
|
+
!0,
|
|
24498
|
+
((J == null ? void 0 : J.date) || 0) - 1,
|
|
24499
|
+
J,
|
|
24500
|
+
(o == null ? void 0 : o[R.symbol]) || D,
|
|
24501
|
+
B,
|
|
24502
|
+
Z1(R.symbol)
|
|
24503
|
+
);
|
|
24504
|
+
v = Y, l.set(m, c0);
|
|
24505
|
+
}
|
|
24506
|
+
const $ = (S == null ? void 0 : S.time) || 0;
|
|
24507
|
+
if (v = v.filter((J) => J.time >= $), !v.length) continue;
|
|
24508
|
+
const P = (f = v[0]) == null ? void 0 : f.time;
|
|
24509
|
+
if (P === $) {
|
|
24510
|
+
const J = N.pop();
|
|
24511
|
+
X -= 1, v[0] = Object.assign(J, K(I({}, v[0]), { isrealtime: !1 }));
|
|
24512
|
+
}
|
|
24513
|
+
for (const J of v)
|
|
24514
|
+
X += 1, J.barindex = X;
|
|
24515
|
+
v[v.length - 1].isrealtime = !0;
|
|
24516
|
+
const H = ((O = b == null ? void 0 : b.get(m)) == null ? void 0 : O.mintick) || 1e-5;
|
|
24517
|
+
if (c == null || c.set(m, {
|
|
24518
|
+
list: N.concat(v),
|
|
24519
|
+
session: D,
|
|
24520
|
+
timezone: B,
|
|
24521
|
+
endTime: C
|
|
24522
|
+
}), S && P > $ && v.unshift(Object.assign(S, { isrealtime: !1 })), !n[h] && S) continue;
|
|
24523
|
+
const { varCacheData: t0, funcCacheData: Z } = n[h] || {}, {
|
|
24524
|
+
logs: o0 = [],
|
|
24525
|
+
errors: b0 = [],
|
|
24526
|
+
cacheData: G
|
|
24527
|
+
} = (yield t.request.runScripts(
|
|
24528
|
+
A,
|
|
24529
|
+
h,
|
|
24530
|
+
!1,
|
|
24531
|
+
v,
|
|
24532
|
+
Object.assign(R, {
|
|
24522
24533
|
session: D,
|
|
24523
24534
|
timezone: B,
|
|
24524
|
-
|
|
24525
|
-
|
|
24535
|
+
varCacheData: t0,
|
|
24536
|
+
funcCacheData: Z,
|
|
24537
|
+
mintick: H,
|
|
24538
|
+
inputs: a
|
|
24539
|
+
}),
|
|
24540
|
+
q,
|
|
24541
|
+
W
|
|
24542
|
+
)) || {};
|
|
24543
|
+
i.requestCacheData[h] = G, t.log.mergeLogs(o0), t.addErrors(b0, h);
|
|
24526
24544
|
}
|
|
24527
24545
|
}
|
|
24528
24546
|
self.workerStorage.set(`request_${e}_pre_data`, l);
|
|
@@ -24541,7 +24559,7 @@ ${f}`), f;
|
|
|
24541
24559
|
}
|
|
24542
24560
|
function eX(s, e, t) {
|
|
24543
24561
|
return I1(this, null, function* () {
|
|
24544
|
-
var D, B, C, X,
|
|
24562
|
+
var D, B, C, X, S, $;
|
|
24545
24563
|
const {
|
|
24546
24564
|
data: r,
|
|
24547
24565
|
isPreParser: i,
|
|
@@ -24572,11 +24590,11 @@ ${f}`), f;
|
|
|
24572
24590
|
};
|
|
24573
24591
|
if (!t && h) {
|
|
24574
24592
|
const {
|
|
24575
|
-
funcCacheData:
|
|
24593
|
+
funcCacheData: P,
|
|
24576
24594
|
varCacheData: H,
|
|
24577
24595
|
requestCacheData: t0
|
|
24578
24596
|
} = h;
|
|
24579
|
-
v = t0, q.setVarCacheData(H), W.setFuncCacheData(
|
|
24597
|
+
v = t0, q.setVarCacheData(H), W.setFuncCacheData(P);
|
|
24580
24598
|
} else
|
|
24581
24599
|
v.requestPreData = (B = (D = h == null ? void 0 : h.requestCacheData) == null ? void 0 : D.requestPreData) != null ? B : [], v.requestData = (X = (C = h == null ? void 0 : h.requestCacheData) == null ? void 0 : C.requestData) != null ? X : [], h = A;
|
|
24582
24600
|
A.requestCacheData = v, self.workerStorage.set(`request_${u}`, new Map(v.request)), self.workerStorage.set(
|
|
@@ -24601,7 +24619,7 @@ ${f}`), f;
|
|
|
24601
24619
|
}), i)
|
|
24602
24620
|
R(q, m, W);
|
|
24603
24621
|
else if (r && r.length) {
|
|
24604
|
-
const
|
|
24622
|
+
const P = r.length - 1;
|
|
24605
24623
|
q.__isFirstRun = t, q.updateOptions({ interval: o, mintick: d, chart: c, syminfo: n }), W.updateOptions({ inputs: a, strategy: p });
|
|
24606
24624
|
const H = self.workerStorage.get(`request_${u}_tmp`), t0 = self.workerStorage.get(`request_${u}_data`), Z = self.workerStorage.get(`request_${u}`), o0 = Date.now();
|
|
24607
24625
|
try {
|
|
@@ -24643,9 +24661,9 @@ ${f}`), f;
|
|
|
24643
24661
|
return Q1(u), n0;
|
|
24644
24662
|
b0 = Object.assign(Y, {
|
|
24645
24663
|
barIndex: c0 || J,
|
|
24646
|
-
lastBarIndex: r[
|
|
24647
|
-
lastBarTime: r[
|
|
24648
|
-
preBarTime: (
|
|
24664
|
+
lastBarIndex: r[P].barindex || P,
|
|
24665
|
+
lastBarTime: r[P].time,
|
|
24666
|
+
preBarTime: (S = r[J - 1]) == null ? void 0 : S.time,
|
|
24649
24667
|
nextBarTime: ($ = r[J + 1]) == null ? void 0 : $.time
|
|
24650
24668
|
}), to(
|
|
24651
24669
|
q,
|
|
@@ -24728,7 +24746,7 @@ ${f}`), f;
|
|
|
24728
24746
|
}
|
|
24729
24747
|
}
|
|
24730
24748
|
const x = W.errors;
|
|
24731
|
-
if (x.length && x.some((
|
|
24749
|
+
if (x.length && x.some((P) => P.type === $e.Error))
|
|
24732
24750
|
return Q1(u), {
|
|
24733
24751
|
status: 1,
|
|
24734
24752
|
errors: x
|
|
@@ -24759,26 +24777,26 @@ ${f}`), f;
|
|
|
24759
24777
|
symbol: B = "",
|
|
24760
24778
|
timeframe: C,
|
|
24761
24779
|
id: X,
|
|
24762
|
-
ignore_invalid_symbol:
|
|
24780
|
+
ignore_invalid_symbol: S,
|
|
24763
24781
|
originTimeframe: $
|
|
24764
24782
|
} = D;
|
|
24765
|
-
let
|
|
24783
|
+
let P = 0;
|
|
24766
24784
|
const { list: H, endTime: t0 } = (p == null ? void 0 : p.get(X)) || {};
|
|
24767
|
-
H && (
|
|
24785
|
+
H && (P = t0);
|
|
24768
24786
|
const Z = Z1(B) || Ei(B), [o0, b0] = B.split(":"), G = Number($) <= 60 ? 1e4 : 5e3, J = {
|
|
24769
24787
|
exchange: b0 ? o0 : "X",
|
|
24770
24788
|
symbol: b0 || o0,
|
|
24771
24789
|
limit: G,
|
|
24772
|
-
start:
|
|
24790
|
+
start: P,
|
|
24773
24791
|
end: 0,
|
|
24774
24792
|
period: C
|
|
24775
24793
|
}, Y = `${J.exchange}:${J.symbol}:${C}`;
|
|
24776
24794
|
v.push({
|
|
24777
24795
|
id: X,
|
|
24778
24796
|
key: Y,
|
|
24779
|
-
ignore_invalid_symbol:
|
|
24797
|
+
ignore_invalid_symbol: S,
|
|
24780
24798
|
currentDataList: H,
|
|
24781
|
-
startTime:
|
|
24799
|
+
startTime: P,
|
|
24782
24800
|
isFutures: Z,
|
|
24783
24801
|
timeframe: C
|
|
24784
24802
|
}), Z ? R.push(ta(J)) : R.push(ea({ params: [J] }));
|
|
@@ -24786,15 +24804,15 @@ ${f}`), f;
|
|
|
24786
24804
|
const w = yield Promise.all(R), x = self.workerStorage.get(`request_${l}_pre_data`) || /* @__PURE__ */ new Map();
|
|
24787
24805
|
for (const [N, D] of w.entries()) {
|
|
24788
24806
|
const { code: B, data: C, msg: X } = D, {
|
|
24789
|
-
id:
|
|
24807
|
+
id: S,
|
|
24790
24808
|
key: $,
|
|
24791
|
-
ignore_invalid_symbol:
|
|
24809
|
+
ignore_invalid_symbol: P,
|
|
24792
24810
|
currentDataList: H = [],
|
|
24793
24811
|
startTime: t0,
|
|
24794
24812
|
isFutures: Z,
|
|
24795
24813
|
timeframe: o0
|
|
24796
24814
|
} = v[N];
|
|
24797
|
-
if (B !== 200 && !
|
|
24815
|
+
if (B !== 200 && !P)
|
|
24798
24816
|
return {
|
|
24799
24817
|
status: 1,
|
|
24800
24818
|
errors: [
|
|
@@ -24821,14 +24839,14 @@ ${f}`), f;
|
|
|
24821
24839
|
G,
|
|
24822
24840
|
m0
|
|
24823
24841
|
);
|
|
24824
|
-
xi(Y, g0), x0 && x.set(
|
|
24842
|
+
xi(Y, g0), x0 && x.set(S, x0);
|
|
24825
24843
|
}
|
|
24826
|
-
const c0 = b == null ? void 0 : b.get(
|
|
24844
|
+
const c0 = b == null ? void 0 : b.get(S);
|
|
24827
24845
|
if (c0) {
|
|
24828
24846
|
const n0 = Number(J) || 1e-5;
|
|
24829
24847
|
c0.mintick = n0;
|
|
24830
24848
|
}
|
|
24831
|
-
Y.length && (Y[Y.length - 1].isrealtime = !0), xi(H, Y), p == null || p.set(
|
|
24849
|
+
Y.length && (Y[Y.length - 1].isrealtime = !0), xi(H, Y), p == null || p.set(S, {
|
|
24832
24850
|
list: H,
|
|
24833
24851
|
session: b0,
|
|
24834
24852
|
timezone: G,
|
|
@@ -24840,16 +24858,16 @@ ${f}`), f;
|
|
|
24840
24858
|
let f = !1;
|
|
24841
24859
|
for (const [R, v] of o) {
|
|
24842
24860
|
if (!v || v.isRun) continue;
|
|
24843
|
-
const W = v, { strJs: w, paramsExpr: x, dataId: N, funcName: D } = W, B = U0(W, ["strJs", "paramsExpr", "dataId", "funcName"]), C = b == null ? void 0 : b.get(N), { list: X = [], session:
|
|
24861
|
+
const W = v, { strJs: w, paramsExpr: x, dataId: N, funcName: D } = W, B = U0(W, ["strJs", "paramsExpr", "dataId", "funcName"]), C = b == null ? void 0 : b.get(N), { list: X = [], session: S, timezone: $ } = (p == null ? void 0 : p.get(N)) || {}, { errors: P = [], cacheData: H } = e.runScripts(
|
|
24844
24862
|
w,
|
|
24845
24863
|
R,
|
|
24846
24864
|
!0,
|
|
24847
24865
|
X,
|
|
24848
|
-
Object.assign(B, { mintick: (C == null ? void 0 : C.mintick) || 1e-5, session:
|
|
24866
|
+
Object.assign(B, { mintick: (C == null ? void 0 : C.mintick) || 1e-5, session: S, timezone: $, inputs: u }),
|
|
24849
24867
|
x,
|
|
24850
24868
|
D
|
|
24851
24869
|
) || {};
|
|
24852
|
-
v.isRun = !0, f = !0, M.requestCacheData[R] = H, e.addErrors(
|
|
24870
|
+
v.isRun = !0, f = !0, M.requestCacheData[R] = H, e.addErrors(P, R);
|
|
24853
24871
|
}
|
|
24854
24872
|
if (n && f) {
|
|
24855
24873
|
s.__isReqRepeated = !0, to(
|
|
@@ -24890,11 +24908,11 @@ ${f}`), f;
|
|
|
24890
24908
|
const { list: N, session: D, timezone: B, endTime: C } = (c == null ? void 0 : c.get(m)) || {};
|
|
24891
24909
|
if (N.length) {
|
|
24892
24910
|
let X = N.length - 1;
|
|
24893
|
-
const
|
|
24911
|
+
const S = N[X];
|
|
24894
24912
|
if (x) {
|
|
24895
24913
|
const G = l.get(m), { newLines: J, preData: Y } = ys(
|
|
24896
24914
|
v,
|
|
24897
|
-
|
|
24915
|
+
S,
|
|
24898
24916
|
w,
|
|
24899
24917
|
!0,
|
|
24900
24918
|
((G == null ? void 0 : G.date) || 0) - 1,
|
|
@@ -24905,10 +24923,10 @@ ${f}`), f;
|
|
|
24905
24923
|
);
|
|
24906
24924
|
v = J, l.set(m, Y);
|
|
24907
24925
|
}
|
|
24908
|
-
const $ =
|
|
24926
|
+
const $ = S.time;
|
|
24909
24927
|
if (v = v.filter((G) => G.time >= $), !v.length) continue;
|
|
24910
|
-
const
|
|
24911
|
-
if (
|
|
24928
|
+
const P = (f = v[0]) == null ? void 0 : f.time;
|
|
24929
|
+
if (P === $) {
|
|
24912
24930
|
const G = N.pop();
|
|
24913
24931
|
X -= 1, Object.assign(v[0], { result: G == null ? void 0 : G.result });
|
|
24914
24932
|
}
|
|
@@ -24922,7 +24940,7 @@ ${f}`), f;
|
|
|
24922
24940
|
session: D,
|
|
24923
24941
|
timezone: B,
|
|
24924
24942
|
endTime: C
|
|
24925
|
-
}),
|
|
24943
|
+
}), P > $ && v.unshift(Object.assign(S, { isrealtime: !1 })), !n[h]) continue;
|
|
24926
24944
|
const { varCacheData: t0, funcCacheData: Z } = n[h] || {}, { errors: o0 = [], cacheData: b0 } = t.runScripts(
|
|
24927
24945
|
A,
|
|
24928
24946
|
h,
|
|
@@ -25221,9 +25239,9 @@ ${f}`), f;
|
|
|
25221
25239
|
maxprofit_percent_long: B = 0,
|
|
25222
25240
|
maxprofit_percent_short: C = 0,
|
|
25223
25241
|
maxloss_percent_long: X = 0,
|
|
25224
|
-
maxloss_percent_short:
|
|
25242
|
+
maxloss_percent_short: S = 0,
|
|
25225
25243
|
hold_long_k_count: $ = 0,
|
|
25226
|
-
hold_short_k_count:
|
|
25244
|
+
hold_short_k_count: P = 0,
|
|
25227
25245
|
hold_profit_long_k_count: H = 0,
|
|
25228
25246
|
hold_profit_short_k_count: t0 = 0,
|
|
25229
25247
|
hold_loss_long_k_count: Z = 0,
|
|
@@ -25232,7 +25250,7 @@ ${f}`), f;
|
|
|
25232
25250
|
shapeRatioType: G = "NONE"
|
|
25233
25251
|
} = this._preHistoryOrderCalcResult;
|
|
25234
25252
|
const { profit: J = 0, profit_percent: Y = 0, in_index: c0 = 0, out_index: n0 = 0, commission: m0 = 0, direction: v0, in_time: g0 = 0, out_time: x0 = 0, total_profit: q0 = 0 } = e, F = n0 - c0 + 1;
|
|
25235
|
-
if (v0 === w1.long ? (i += J, o += 1, c += Y, R += m0, $ += F, J > 0 ? (l += Y, m += 1, h += J, H += F, w = Math.max(w, J), B = Math.max(B, Y)) : J < 0 && (b += Y, A += 1, f += J, Z += F, N = Math.min(N, J), X = Math.min(X, Y))) : (n += J, a += 1, p += Y, v += m0,
|
|
25253
|
+
if (v0 === w1.long ? (i += J, o += 1, c += Y, R += m0, $ += F, J > 0 ? (l += Y, m += 1, h += J, H += F, w = Math.max(w, J), B = Math.max(B, Y)) : J < 0 && (b += Y, A += 1, f += J, Z += F, N = Math.min(N, J), X = Math.min(X, Y))) : (n += J, a += 1, p += Y, v += m0, P += F, J > 0 ? (u += Y, W += 1, d += J, t0 += F, x = Math.max(x, J), C = Math.max(C, Y)) : J < 0 && (M += Y, q += 1, O += J, o0 += F, D = Math.min(D, J), S = Math.min(S, Y))), !b0) {
|
|
25236
25254
|
const X0 = this._createBalanceByInterval(g0, Date.now());
|
|
25237
25255
|
b0 = X0.balanceByInterval, G = X0.shapeRatioType;
|
|
25238
25256
|
}
|
|
@@ -25272,9 +25290,9 @@ ${f}`), f;
|
|
|
25272
25290
|
maxprofit_percent_long: B,
|
|
25273
25291
|
maxprofit_percent_short: C,
|
|
25274
25292
|
maxloss_percent_long: X,
|
|
25275
|
-
maxloss_percent_short:
|
|
25293
|
+
maxloss_percent_short: S,
|
|
25276
25294
|
hold_long_k_count: $,
|
|
25277
|
-
hold_short_k_count:
|
|
25295
|
+
hold_short_k_count: P,
|
|
25278
25296
|
hold_profit_long_k_count: H,
|
|
25279
25297
|
hold_profit_short_k_count: t0,
|
|
25280
25298
|
hold_loss_long_k_count: Z,
|
|
@@ -30117,11 +30135,11 @@ ${f}`), f;
|
|
|
30117
30135
|
if ((q == null ? void 0 : q.get(d)) || (m == null || m.set(d, W), q == null || q.set(d, W)), A != null && A.has(d)) {
|
|
30118
30136
|
const B = Z1(O.tickerid), C = Z1(i);
|
|
30119
30137
|
let X = K0(h, l, C) * 1e3;
|
|
30120
|
-
const
|
|
30138
|
+
const S = K0(b, l, B) * 1e3, { index: $ = 0, periodStamp: P = S } = this._reqCacheDataLoc[r] || {}, { list: H } = (A == null ? void 0 : A.get(d)) || {};
|
|
30121
30139
|
if (!H.length)
|
|
30122
30140
|
return;
|
|
30123
30141
|
const t0 = H.slice($);
|
|
30124
|
-
let Z = l, o0 = B ? l :
|
|
30142
|
+
let Z = l, o0 = B ? l : P + Z;
|
|
30125
30143
|
B ? Z = u : f && o0 > f && (o0 = f);
|
|
30126
30144
|
const b0 = H.length - 1;
|
|
30127
30145
|
if (b0 < 0) return;
|
|
@@ -30131,7 +30149,7 @@ ${f}`), f;
|
|
|
30131
30149
|
interval: h,
|
|
30132
30150
|
mintick: M
|
|
30133
30151
|
};
|
|
30134
|
-
if (X >
|
|
30152
|
+
if (X > P) {
|
|
30135
30153
|
let J;
|
|
30136
30154
|
if (c ? J = this._lookaheadOnHandle(
|
|
30137
30155
|
t0,
|
|
@@ -30140,7 +30158,7 @@ ${f}`), f;
|
|
|
30140
30158
|
X,
|
|
30141
30159
|
G,
|
|
30142
30160
|
$,
|
|
30143
|
-
|
|
30161
|
+
P,
|
|
30144
30162
|
r,
|
|
30145
30163
|
Z,
|
|
30146
30164
|
a,
|
|
@@ -30152,7 +30170,7 @@ ${f}`), f;
|
|
|
30152
30170
|
X,
|
|
30153
30171
|
G,
|
|
30154
30172
|
$,
|
|
30155
|
-
|
|
30173
|
+
P,
|
|
30156
30174
|
r,
|
|
30157
30175
|
Z,
|
|
30158
30176
|
(C ? l : f) || o0,
|
|
@@ -30168,14 +30186,14 @@ ${f}`), f;
|
|
|
30168
30186
|
if (c0 >= o0) {
|
|
30169
30187
|
this._reqCacheDataLoc[r] = {
|
|
30170
30188
|
index: g0,
|
|
30171
|
-
periodStamp:
|
|
30189
|
+
periodStamp: P
|
|
30172
30190
|
};
|
|
30173
30191
|
return;
|
|
30174
30192
|
}
|
|
30175
30193
|
if (c0 <= Z && v0 > Z)
|
|
30176
30194
|
return this._reqCacheDataLoc[r] = {
|
|
30177
30195
|
index: g0,
|
|
30178
|
-
periodStamp:
|
|
30196
|
+
periodStamp: P
|
|
30179
30197
|
}, I(K(I({}, Y), {
|
|
30180
30198
|
barIndex: g0,
|
|
30181
30199
|
nextBarTime: (w = t0[J + 1]) == null ? void 0 : w.time
|
|
@@ -30192,14 +30210,14 @@ ${f}`), f;
|
|
|
30192
30210
|
if (c0 > o0) {
|
|
30193
30211
|
this._reqCacheDataLoc[r] = {
|
|
30194
30212
|
index: x0,
|
|
30195
|
-
periodStamp:
|
|
30213
|
+
periodStamp: P
|
|
30196
30214
|
};
|
|
30197
30215
|
return;
|
|
30198
30216
|
}
|
|
30199
30217
|
if (c0 < o0 && o0 <= g0)
|
|
30200
30218
|
return this._reqCacheDataLoc[r] = {
|
|
30201
30219
|
index: x0,
|
|
30202
|
-
periodStamp:
|
|
30220
|
+
periodStamp: P
|
|
30203
30221
|
}, I(K(I({}, Y), {
|
|
30204
30222
|
barIndex: x0,
|
|
30205
30223
|
nextBarTime: (N = t0[J + 1]) == null ? void 0 : N.time
|
|
@@ -30207,7 +30225,7 @@ ${f}`), f;
|
|
|
30207
30225
|
if (c0 >= Z && c0 <= o0 && x0 === G.lastBarIndex)
|
|
30208
30226
|
return this._reqCacheDataLoc[r] = {
|
|
30209
30227
|
index: x0,
|
|
30210
|
-
periodStamp:
|
|
30228
|
+
periodStamp: P
|
|
30211
30229
|
}, I(K(I({}, Y), {
|
|
30212
30230
|
barIndex: x0,
|
|
30213
30231
|
nextBarTime: (D = t0[J + 1]) == null ? void 0 : D.time
|
|
@@ -30215,7 +30233,7 @@ ${f}`), f;
|
|
|
30215
30233
|
}
|
|
30216
30234
|
this._reqCacheDataLoc[r] = {
|
|
30217
30235
|
index: H.length,
|
|
30218
|
-
periodStamp:
|
|
30236
|
+
periodStamp: P
|
|
30219
30237
|
};
|
|
30220
30238
|
return;
|
|
30221
30239
|
}
|
|
@@ -30732,7 +30750,7 @@ ${f}`), f;
|
|
|
30732
30750
|
};
|
|
30733
30751
|
}
|
|
30734
30752
|
fill(t, r) {
|
|
30735
|
-
var w, x, N, D, B, C, X,
|
|
30753
|
+
var w, x, N, D, B, C, X, S;
|
|
30736
30754
|
const i = ["color"];
|
|
30737
30755
|
E0(t, i);
|
|
30738
30756
|
const v = t, { color: n, transp: o = 90, seriesColors: a, hline1: c, hline2: p, plot1: b, plot2: M } = v, l = U0(v, ["color", "transp", "seriesColors", "hline1", "hline2", "plot1", "plot2"]);
|
|
@@ -30743,18 +30761,18 @@ ${f}`), f;
|
|
|
30743
30761
|
if (c && p)
|
|
30744
30762
|
m = (w = this._hlines.get(c == null ? void 0 : c.key)) == null ? void 0 : w.price, W = (x = this._hlines.get(p == null ? void 0 : p.key)) == null ? void 0 : x.price, R = "hline";
|
|
30745
30763
|
else {
|
|
30746
|
-
const $ = this._plots.get(b == null ? void 0 : b.key),
|
|
30764
|
+
const $ = this._plots.get(b == null ? void 0 : b.key), P = this._plots.get(M == null ? void 0 : M.key), H = ($ == null ? void 0 : $.data) || [], t0 = (P == null ? void 0 : P.data) || [];
|
|
30747
30765
|
if (m = (D = (N = H[f]) == null ? void 0 : N.value) == null ? void 0 : D[1], W = (C = (B = t0[f]) == null ? void 0 : B.value) == null ? void 0 : C[1], !f) {
|
|
30748
|
-
const Z = ($ == null ? void 0 : $.force_overlay) && (
|
|
30749
|
-
($ != null && $.force_overlay ||
|
|
30766
|
+
const Z = ($ == null ? void 0 : $.force_overlay) && (P == null ? void 0 : P.force_overlay);
|
|
30767
|
+
($ != null && $.force_overlay || P != null && P.force_overlay) && !Z ? this._errorListener.addError(de.plotFillForceOverlayErr, r, H1.Error) : l.force_overlay = Z;
|
|
30750
30768
|
}
|
|
30751
30769
|
}
|
|
30752
30770
|
if (A[f] = { time: O, color: u, barIndex: f, plot1: m, plot2: W }, this._seriesColorHandle(t, i, d), !d) {
|
|
30753
30771
|
this._count++;
|
|
30754
|
-
const $ = ((X = this._options.indicator) == null ? void 0 : X.explicit_plot_zorder) || ((
|
|
30772
|
+
const $ = ((X = this._options.indicator) == null ? void 0 : X.explicit_plot_zorder) || ((S = this._options.strategy) == null ? void 0 : S.explicit_plot_zorder), P = u ? [u] : void 0;
|
|
30755
30773
|
this._fills.set(h, K(I({
|
|
30756
30774
|
id: h,
|
|
30757
|
-
colors:
|
|
30775
|
+
colors: P,
|
|
30758
30776
|
display: q,
|
|
30759
30777
|
data: A,
|
|
30760
30778
|
type: R,
|
|
@@ -31244,11 +31262,11 @@ ${f}`), f;
|
|
|
31244
31262
|
};
|
|
31245
31263
|
}
|
|
31246
31264
|
}
|
|
31247
|
-
const
|
|
31248
|
-
if (
|
|
31265
|
+
const S = B.errors;
|
|
31266
|
+
if (S.length && S.some((Y) => Y.type === H1.Error))
|
|
31249
31267
|
return Q1(O), {
|
|
31250
31268
|
status: 1,
|
|
31251
|
-
errors:
|
|
31269
|
+
errors: S
|
|
31252
31270
|
};
|
|
31253
31271
|
const $ = B.options(R, t);
|
|
31254
31272
|
Object.assign(x, {
|
|
@@ -31262,7 +31280,7 @@ ${f}`), f;
|
|
|
31262
31280
|
timeframeGaps: d,
|
|
31263
31281
|
lastData: r[r.length - 1]
|
|
31264
31282
|
}), Q1(O);
|
|
31265
|
-
const
|
|
31283
|
+
const P = h && h !== m && (q != null && q.length || f) ? lz(
|
|
31266
31284
|
q,
|
|
31267
31285
|
r,
|
|
31268
31286
|
$,
|
|
@@ -31276,9 +31294,9 @@ ${f}`), f;
|
|
|
31276
31294
|
return e.id && self.workerStorage.set(`cache_${e.id}`, x), {
|
|
31277
31295
|
status: 0,
|
|
31278
31296
|
requestList: A,
|
|
31279
|
-
errors:
|
|
31297
|
+
errors: S,
|
|
31280
31298
|
// cacheData: newCacheData,
|
|
31281
|
-
options: K(I({},
|
|
31299
|
+
options: K(I({}, P), { id: e.id })
|
|
31282
31300
|
};
|
|
31283
31301
|
});
|
|
31284
31302
|
}
|
|
@@ -31293,26 +31311,26 @@ ${f}`), f;
|
|
|
31293
31311
|
symbol: B = "",
|
|
31294
31312
|
timeframe: C,
|
|
31295
31313
|
id: X,
|
|
31296
|
-
ignore_invalid_symbol:
|
|
31314
|
+
ignore_invalid_symbol: S,
|
|
31297
31315
|
originTimeframe: $
|
|
31298
31316
|
} = D;
|
|
31299
|
-
let
|
|
31317
|
+
let P = 0;
|
|
31300
31318
|
const { list: H, endTime: t0 } = (p == null ? void 0 : p.get(X)) || {};
|
|
31301
|
-
H && (
|
|
31319
|
+
H && (P = t0);
|
|
31302
31320
|
const Z = Z1(B) || Ei(B), [o0, b0] = B.split(":"), G = Number($) <= 60 ? 1e4 : 5e3, J = {
|
|
31303
31321
|
exchange: b0 ? o0 : "X",
|
|
31304
31322
|
symbol: b0 || o0,
|
|
31305
31323
|
limit: G,
|
|
31306
|
-
start:
|
|
31324
|
+
start: P,
|
|
31307
31325
|
end: 0,
|
|
31308
31326
|
period: C
|
|
31309
31327
|
}, Y = `${J.exchange}:${J.symbol}:${C}`;
|
|
31310
31328
|
v.push({
|
|
31311
31329
|
id: X,
|
|
31312
31330
|
key: Y,
|
|
31313
|
-
ignore_invalid_symbol:
|
|
31331
|
+
ignore_invalid_symbol: S,
|
|
31314
31332
|
currentDataList: H,
|
|
31315
|
-
startTime:
|
|
31333
|
+
startTime: P,
|
|
31316
31334
|
isFutures: Z,
|
|
31317
31335
|
timeframe: C
|
|
31318
31336
|
}), Z ? R.push(ta(J)) : R.push(ea({ params: [J] }));
|
|
@@ -31320,15 +31338,15 @@ ${f}`), f;
|
|
|
31320
31338
|
const w = yield Promise.all(R), x = self.workerStorage.get(`request_${l}_pre_data`) || /* @__PURE__ */ new Map();
|
|
31321
31339
|
for (const [N, D] of w.entries()) {
|
|
31322
31340
|
const { code: B, data: C, msg: X } = D, {
|
|
31323
|
-
id:
|
|
31341
|
+
id: S,
|
|
31324
31342
|
key: $,
|
|
31325
|
-
ignore_invalid_symbol:
|
|
31343
|
+
ignore_invalid_symbol: P,
|
|
31326
31344
|
currentDataList: H = [],
|
|
31327
31345
|
startTime: t0,
|
|
31328
31346
|
isFutures: Z,
|
|
31329
31347
|
timeframe: o0
|
|
31330
31348
|
} = v[N];
|
|
31331
|
-
if (B !== 200 && !
|
|
31349
|
+
if (B !== 200 && !P)
|
|
31332
31350
|
return {
|
|
31333
31351
|
status: 1,
|
|
31334
31352
|
errors: [
|
|
@@ -31355,14 +31373,14 @@ ${f}`), f;
|
|
|
31355
31373
|
G,
|
|
31356
31374
|
m0
|
|
31357
31375
|
);
|
|
31358
|
-
xi(Y, g0), x0 && x.set(
|
|
31376
|
+
xi(Y, g0), x0 && x.set(S, x0);
|
|
31359
31377
|
}
|
|
31360
|
-
const c0 = b == null ? void 0 : b.get(
|
|
31378
|
+
const c0 = b == null ? void 0 : b.get(S);
|
|
31361
31379
|
if (c0) {
|
|
31362
31380
|
const n0 = Number(J) || 1e-5;
|
|
31363
31381
|
c0.mintick = n0;
|
|
31364
31382
|
}
|
|
31365
|
-
Y.length && (Y[Y.length - 1].isrealtime = !0), xi(H, Y), p == null || p.set(
|
|
31383
|
+
Y.length && (Y[Y.length - 1].isrealtime = !0), xi(H, Y), p == null || p.set(S, {
|
|
31366
31384
|
list: H,
|
|
31367
31385
|
session: b0,
|
|
31368
31386
|
timezone: G,
|
|
@@ -31374,16 +31392,16 @@ ${f}`), f;
|
|
|
31374
31392
|
let f = !1;
|
|
31375
31393
|
for (const [R, v] of o) {
|
|
31376
31394
|
if (!v || v.isRun) continue;
|
|
31377
|
-
const W = v, { strJs: w, paramsExpr: x, dataId: N, funcName: D } = W, B = U0(W, ["strJs", "paramsExpr", "dataId", "funcName"]), C = b == null ? void 0 : b.get(N), { list: X = [], session:
|
|
31395
|
+
const W = v, { strJs: w, paramsExpr: x, dataId: N, funcName: D } = W, B = U0(W, ["strJs", "paramsExpr", "dataId", "funcName"]), C = b == null ? void 0 : b.get(N), { list: X = [], session: S, timezone: $ } = (p == null ? void 0 : p.get(N)) || {}, { errors: P = [], cacheData: H } = e.runScripts(
|
|
31378
31396
|
w,
|
|
31379
31397
|
R,
|
|
31380
31398
|
!0,
|
|
31381
31399
|
X,
|
|
31382
|
-
Object.assign(B, { mintick: (C == null ? void 0 : C.mintick) || 1e-5, session:
|
|
31400
|
+
Object.assign(B, { mintick: (C == null ? void 0 : C.mintick) || 1e-5, session: S, timezone: $, inputs: u }),
|
|
31383
31401
|
x,
|
|
31384
31402
|
D
|
|
31385
31403
|
) || {};
|
|
31386
|
-
v.isRun = !0, f = !0, M.requestCacheData[R] = H, e.addErrors(
|
|
31404
|
+
v.isRun = !0, f = !0, M.requestCacheData[R] = H, e.addErrors(P, R);
|
|
31387
31405
|
}
|
|
31388
31406
|
if (n && f) {
|
|
31389
31407
|
s.__isReqRepeated = !0, to(
|
|
@@ -31424,11 +31442,11 @@ ${f}`), f;
|
|
|
31424
31442
|
const { list: N, session: D, timezone: B, endTime: C } = (c == null ? void 0 : c.get(m)) || {};
|
|
31425
31443
|
if (N.length) {
|
|
31426
31444
|
let X = N.length - 1;
|
|
31427
|
-
const
|
|
31445
|
+
const S = N[X];
|
|
31428
31446
|
if (x) {
|
|
31429
31447
|
const G = l.get(m), { newLines: J, preData: Y } = ys(
|
|
31430
31448
|
v,
|
|
31431
|
-
|
|
31449
|
+
S,
|
|
31432
31450
|
w,
|
|
31433
31451
|
!0,
|
|
31434
31452
|
((G == null ? void 0 : G.date) || 0) - 1,
|
|
@@ -31439,10 +31457,10 @@ ${f}`), f;
|
|
|
31439
31457
|
);
|
|
31440
31458
|
v = J, l.set(m, Y);
|
|
31441
31459
|
}
|
|
31442
|
-
const $ =
|
|
31460
|
+
const $ = S.time;
|
|
31443
31461
|
if (v = v.filter((G) => G.time >= $), !v.length) continue;
|
|
31444
|
-
const
|
|
31445
|
-
if (
|
|
31462
|
+
const P = (f = v[0]) == null ? void 0 : f.time;
|
|
31463
|
+
if (P === $) {
|
|
31446
31464
|
const G = N.pop();
|
|
31447
31465
|
X -= 1, Object.assign(v[0], { result: G == null ? void 0 : G.result });
|
|
31448
31466
|
}
|
|
@@ -31455,7 +31473,7 @@ ${f}`), f;
|
|
|
31455
31473
|
session: D,
|
|
31456
31474
|
timezone: B,
|
|
31457
31475
|
endTime: C
|
|
31458
|
-
}),
|
|
31476
|
+
}), P > $ && v.unshift(Object.assign(S, { isrealtime: !1 })), !n[h]) continue;
|
|
31459
31477
|
const { varCacheData: t0, funcCacheData: Z } = n[h] || {}, { errors: o0 = [], cacheData: b0 } = t.runScripts(
|
|
31460
31478
|
A,
|
|
31461
31479
|
h,
|
|
@@ -34281,7 +34299,7 @@ ${eq}`);
|
|
|
34281
34299
|
strassen3x3(e) {
|
|
34282
34300
|
e = T0.checkMatrix(e);
|
|
34283
34301
|
let t = new T0(3, 3);
|
|
34284
|
-
const r = this.get(0, 0), i = this.get(0, 1), n = this.get(0, 2), o = this.get(1, 0), a = this.get(1, 1), c = this.get(1, 2), p = this.get(2, 0), b = this.get(2, 1), M = this.get(2, 2), l = e.get(0, 0), u = e.get(0, 1), f = e.get(0, 2), O = e.get(1, 0), h = e.get(1, 1), d = e.get(1, 2), A = e.get(2, 0), q = e.get(2, 1), m = e.get(2, 2), W = (r + i + n - o - a - b - M) * h, R = (r - o) * (-u + h), v = a * (-l + u + O - h - d - A + m), w = (-r + o + a) * (l - u + h), x = (o + a) * (-l + u), N = r * l, D = (-r + p + b) * (l - f + d), B = (-r + p) * (f - d), C = (p + b) * (-l + f), X = (r + i + n - a - c - p - b) * d,
|
|
34302
|
+
const r = this.get(0, 0), i = this.get(0, 1), n = this.get(0, 2), o = this.get(1, 0), a = this.get(1, 1), c = this.get(1, 2), p = this.get(2, 0), b = this.get(2, 1), M = this.get(2, 2), l = e.get(0, 0), u = e.get(0, 1), f = e.get(0, 2), O = e.get(1, 0), h = e.get(1, 1), d = e.get(1, 2), A = e.get(2, 0), q = e.get(2, 1), m = e.get(2, 2), W = (r + i + n - o - a - b - M) * h, R = (r - o) * (-u + h), v = a * (-l + u + O - h - d - A + m), w = (-r + o + a) * (l - u + h), x = (o + a) * (-l + u), N = r * l, D = (-r + p + b) * (l - f + d), B = (-r + p) * (f - d), C = (p + b) * (-l + f), X = (r + i + n - a - c - p - b) * d, S = b * (-l + f + O - h - d - A + q), $ = (-n + b + M) * (h + A - q), P = (n - M) * (h - q), H = n * A, t0 = (b + M) * (-A + q), Z = (-n + a + c) * (d + A - m), o0 = (n - c) * (d - m), b0 = (a + c) * (-A + m), G = i * O, J = c * q, Y = o * f, c0 = p * u, n0 = M * m, m0 = N + H + G, v0 = W + w + x + N + $ + H + t0, g0 = N + D + C + X + H + Z + b0, x0 = R + v + w + N + H + Z + o0, q0 = R + w + x + N + J, F = H + Z + o0 + b0 + Y, e0 = N + D + B + S + $ + P + H, a0 = $ + P + H + t0 + c0, d0 = N + D + B + C + n0;
|
|
34285
34303
|
return t.set(0, 0, m0), t.set(0, 1, v0), t.set(0, 2, g0), t.set(1, 0, x0), t.set(1, 1, q0), t.set(1, 2, F), t.set(2, 0, e0), t.set(2, 1, a0), t.set(2, 2, d0), t;
|
|
34286
34304
|
}
|
|
34287
34305
|
mmulStrassen(e) {
|
|
@@ -34315,17 +34333,17 @@ ${eq}`);
|
|
|
34315
34333
|
A1.add(A, m),
|
|
34316
34334
|
O,
|
|
34317
34335
|
h
|
|
34318
|
-
),
|
|
34336
|
+
), S = b(
|
|
34319
34337
|
A1.sub(q, v),
|
|
34320
34338
|
A1.add(R, w),
|
|
34321
34339
|
O,
|
|
34322
34340
|
h
|
|
34323
34341
|
), $ = A1.add(x, B);
|
|
34324
|
-
$.sub(C), $.add(
|
|
34325
|
-
let
|
|
34342
|
+
$.sub(C), $.add(S);
|
|
34343
|
+
let P = A1.add(D, C), H = A1.add(N, B), t0 = A1.sub(x, N);
|
|
34326
34344
|
t0.add(D), t0.add(X);
|
|
34327
34345
|
let Z = A1.zeros(2 * $.rows, 2 * $.columns);
|
|
34328
|
-
return Z = Z.setSubMatrix($, 0, 0), Z = Z.setSubMatrix(
|
|
34346
|
+
return Z = Z.setSubMatrix($, 0, 0), Z = Z.setSubMatrix(P, $.rows, 0), Z = Z.setSubMatrix(H, 0, $.columns), Z = Z.setSubMatrix(t0, $.rows, $.columns), Z.subMatrix(0, u - 1, 0, f - 1);
|
|
34329
34347
|
}
|
|
34330
34348
|
return b(t, e, c, p);
|
|
34331
34349
|
}
|
|
@@ -35451,10 +35469,10 @@ ${eq}`);
|
|
|
35451
35469
|
let B = d[v - 2];
|
|
35452
35470
|
d[v - 2] = 0;
|
|
35453
35471
|
for (let C = v - 2; C >= N; C--) {
|
|
35454
|
-
let X = rs(f[C], B),
|
|
35455
|
-
if (f[C] = X, C !== N && (B = -$ * d[C - 1], d[C - 1] =
|
|
35456
|
-
for (let
|
|
35457
|
-
X =
|
|
35472
|
+
let X = rs(f[C], B), S = f[C] / X, $ = B / X;
|
|
35473
|
+
if (f[C] = X, C !== N && (B = -$ * d[C - 1], d[C - 1] = S * d[C - 1]), p)
|
|
35474
|
+
for (let P = 0; P < i; P++)
|
|
35475
|
+
X = S * h.get(P, C) + $ * h.get(P, v - 1), h.set(P, v - 1, -$ * h.get(P, C) + S * h.get(P, v - 1)), h.set(P, C, X);
|
|
35458
35476
|
}
|
|
35459
35477
|
break;
|
|
35460
35478
|
}
|
|
@@ -35462,10 +35480,10 @@ ${eq}`);
|
|
|
35462
35480
|
let B = d[N - 1];
|
|
35463
35481
|
d[N - 1] = 0;
|
|
35464
35482
|
for (let C = N; C < v; C++) {
|
|
35465
|
-
let X = rs(f[C], B),
|
|
35466
|
-
if (f[C] = X, B = -$ * d[C], d[C] =
|
|
35467
|
-
for (let
|
|
35468
|
-
X =
|
|
35483
|
+
let X = rs(f[C], B), S = f[C] / X, $ = B / X;
|
|
35484
|
+
if (f[C] = X, B = -$ * d[C], d[C] = S * d[C], c)
|
|
35485
|
+
for (let P = 0; P < r; P++)
|
|
35486
|
+
X = S * O.get(P, C) + $ * O.get(P, N - 1), O.set(P, N - 1, -$ * O.get(P, C) + S * O.get(P, N - 1)), O.set(P, C, X);
|
|
35469
35487
|
}
|
|
35470
35488
|
break;
|
|
35471
35489
|
}
|
|
@@ -35476,10 +35494,10 @@ ${eq}`);
|
|
|
35476
35494
|
Math.abs(d[v - 2]),
|
|
35477
35495
|
Math.abs(f[N]),
|
|
35478
35496
|
Math.abs(d[N])
|
|
35479
|
-
), C = f[v - 1] / B, X = f[v - 2] / B,
|
|
35497
|
+
), C = f[v - 1] / B, X = f[v - 2] / B, S = d[v - 2] / B, $ = f[N] / B, P = d[N] / B, H = ((X + C) * (X - C) + S * S) / 2, t0 = C * S * (C * S);
|
|
35480
35498
|
let Z = 0;
|
|
35481
35499
|
(H !== 0 || t0 !== 0) && (H < 0 ? Z = 0 - Math.sqrt(H * H + t0) : Z = Math.sqrt(H * H + t0), Z = t0 / (H + Z));
|
|
35482
|
-
let o0 = ($ + C) * ($ - C) + Z, b0 = $ *
|
|
35500
|
+
let o0 = ($ + C) * ($ - C) + Z, b0 = $ * P;
|
|
35483
35501
|
for (let G = N; G < v - 1; G++) {
|
|
35484
35502
|
let J = rs(o0, b0);
|
|
35485
35503
|
J === 0 && (J = Number.MIN_VALUE);
|
|
@@ -35825,7 +35843,7 @@ ${eq}`);
|
|
|
35825
35843
|
}
|
|
35826
35844
|
}
|
|
35827
35845
|
function ek(s, e, t, r, i) {
|
|
35828
|
-
let n = s - 1, o = 0, a = s - 1, c = Number.EPSILON, p = 0, b = 0, M = 0, l = 0, u = 0, f = 0, O = 0, h = 0, d, A, q, m, W, R, v, w, x, N, D, B, C, X,
|
|
35846
|
+
let n = s - 1, o = 0, a = s - 1, c = Number.EPSILON, p = 0, b = 0, M = 0, l = 0, u = 0, f = 0, O = 0, h = 0, d, A, q, m, W, R, v, w, x, N, D, B, C, X, S;
|
|
35829
35847
|
for (d = 0; d < s; d++)
|
|
35830
35848
|
for ((d < o || d > a) && (t[d] = i.get(d, d), e[d] = 0), A = Math.max(d - 1, 0); A < s; A++)
|
|
35831
35849
|
b = b + Math.abs(i.get(d, A));
|
|
@@ -35888,17 +35906,17 @@ ${eq}`);
|
|
|
35888
35906
|
i.set(A, n, i.get(A, n) / R);
|
|
35889
35907
|
}
|
|
35890
35908
|
else if (l < 0)
|
|
35891
|
-
for (m = n - 1, Math.abs(i.get(n, n - 1)) > Math.abs(i.get(n - 1, n)) ? (i.set(n - 1, n - 1, l / i.get(n, n - 1)), i.set(n - 1, n, -(i.get(n, n) - M) / i.get(n, n - 1))) : (
|
|
35909
|
+
for (m = n - 1, Math.abs(i.get(n, n - 1)) > Math.abs(i.get(n - 1, n)) ? (i.set(n - 1, n - 1, l / i.get(n, n - 1)), i.set(n - 1, n, -(i.get(n, n) - M) / i.get(n, n - 1))) : (S = w2(0, -i.get(n - 1, n), i.get(n - 1, n - 1) - M, l), i.set(n - 1, n - 1, S[0]), i.set(n - 1, n, S[1])), i.set(n, n - 1, 0), i.set(n, n, 1), d = n - 2; d >= 0; d--) {
|
|
35892
35910
|
for (N = 0, D = 0, A = m; A <= n; A++)
|
|
35893
35911
|
N = N + i.get(d, A) * i.get(A, n - 1), D = D + i.get(d, A) * i.get(A, n);
|
|
35894
35912
|
if (v = i.get(d, d) - M, e[d] < 0)
|
|
35895
35913
|
O = v, u = N, f = D;
|
|
35896
|
-
else if (m = d, e[d] === 0 ? (
|
|
35914
|
+
else if (m = d, e[d] === 0 ? (S = w2(-N, -D, v, l), i.set(d, n - 1, S[0]), i.set(d, n, S[1])) : (w = i.get(d, d + 1), x = i.get(d + 1, d), B = (t[d] - M) * (t[d] - M) + e[d] * e[d] - l * l, C = (t[d] - M) * 2 * l, B === 0 && C === 0 && (B = c * b * (Math.abs(v) + Math.abs(l) + Math.abs(w) + Math.abs(x) + Math.abs(O))), S = w2(
|
|
35897
35915
|
w * u - O * N + l * D,
|
|
35898
35916
|
w * f - O * D - l * N,
|
|
35899
35917
|
B,
|
|
35900
35918
|
C
|
|
35901
|
-
), i.set(d, n - 1,
|
|
35919
|
+
), i.set(d, n - 1, S[0]), i.set(d, n, S[1]), Math.abs(w) > Math.abs(O) + Math.abs(l) ? (i.set(
|
|
35902
35920
|
d + 1,
|
|
35903
35921
|
n - 1,
|
|
35904
35922
|
(-N - v * i.get(d, n - 1) + l * i.get(d, n)) / w
|
|
@@ -35906,12 +35924,12 @@ ${eq}`);
|
|
|
35906
35924
|
d + 1,
|
|
35907
35925
|
n,
|
|
35908
35926
|
(-D - v * i.get(d, n) - l * i.get(d, n - 1)) / w
|
|
35909
|
-
)) : (
|
|
35927
|
+
)) : (S = w2(
|
|
35910
35928
|
-u - x * i.get(d, n - 1),
|
|
35911
35929
|
-f - x * i.get(d, n),
|
|
35912
35930
|
O,
|
|
35913
35931
|
l
|
|
35914
|
-
), i.set(d + 1, n - 1,
|
|
35932
|
+
), i.set(d + 1, n - 1, S[0]), i.set(d + 1, n, S[1]))), R = Math.max(Math.abs(i.get(d, n - 1)), Math.abs(i.get(d, n))), c * R * R > 1)
|
|
35915
35933
|
for (A = d; A <= n; A++)
|
|
35916
35934
|
i.set(A, n - 1, i.get(A, n - 1) / R), i.set(A, n, i.get(A, n) / R);
|
|
35917
35935
|
}
|
|
@@ -39903,7 +39921,7 @@ ${eq}`);
|
|
|
39903
39921
|
};
|
|
39904
39922
|
}
|
|
39905
39923
|
fill(e, t) {
|
|
39906
|
-
var x, N, D, B, C, X,
|
|
39924
|
+
var x, N, D, B, C, X, S, $;
|
|
39907
39925
|
const r = ["color", "top_color", "bottom_color"];
|
|
39908
39926
|
E0(e, r);
|
|
39909
39927
|
const w = e, { color: i, top_color: n, bottom_color: o, seriesColors: a, hline1: c, hline2: p, plot1: b, plot2: M, top_value: l, bottom_value: u } = w, f = U0(w, ["color", "top_color", "bottom_color", "seriesColors", "hline1", "hline2", "plot1", "plot2", "top_value", "bottom_value"]), { bar_index: O, time: h } = this._variables, d = `fill_${t}`, A = this._fills.get(d), q = (A == null ? void 0 : A.data) || [];
|
|
@@ -39913,15 +39931,15 @@ ${eq}`);
|
|
|
39913
39931
|
if (c && p)
|
|
39914
39932
|
W = (x = this._hlines.get(c == null ? void 0 : c.key)) == null ? void 0 : x.price, R = (N = this._hlines.get(p == null ? void 0 : p.key)) == null ? void 0 : N.price, v = "hline";
|
|
39915
39933
|
else {
|
|
39916
|
-
const
|
|
39934
|
+
const P = this._plots.get(b == null ? void 0 : b.key), H = this._plots.get(M == null ? void 0 : M.key), t0 = (P == null ? void 0 : P.data) || [], Z = (H == null ? void 0 : H.data) || [];
|
|
39917
39935
|
if (W = (B = (D = t0[O]) == null ? void 0 : D.value) == null ? void 0 : B[1], R = (X = (C = Z[O]) == null ? void 0 : C.value) == null ? void 0 : X[1], !O) {
|
|
39918
|
-
const o0 = (
|
|
39919
|
-
(
|
|
39936
|
+
const o0 = (P == null ? void 0 : P.force_overlay) && (H == null ? void 0 : H.force_overlay);
|
|
39937
|
+
(P != null && P.force_overlay || H != null && H.force_overlay) && !o0 ? this._errorListener.addError(f1.plotFillForceOverlayErr, t, i1.Error) : f.force_overlay = o0;
|
|
39920
39938
|
}
|
|
39921
39939
|
}
|
|
39922
39940
|
if (q[O] = { time: h, color: i, top_color: n, bottom_color: o, barIndex: O, plot1: W, plot2: R, top_value: l, bottom_value: u }, this._seriesColorHandle(e, r, A), !A) {
|
|
39923
39941
|
this._count++;
|
|
39924
|
-
const
|
|
39942
|
+
const P = ((S = this._options.indicator) == null ? void 0 : S.explicit_plot_zorder) || (($ = this._options.strategy) == null ? void 0 : $.explicit_plot_zorder), H = i ? [i] : void 0, t0 = n ? [n] : void 0, Z = o ? [o] : void 0;
|
|
39925
39943
|
this._fills.set(d, K(I({
|
|
39926
39944
|
id: d,
|
|
39927
39945
|
colors: H,
|
|
@@ -39937,7 +39955,7 @@ ${eq}`);
|
|
|
39937
39955
|
plot1: b,
|
|
39938
39956
|
plot2: M
|
|
39939
39957
|
}, f), {
|
|
39940
|
-
zIndex:
|
|
39958
|
+
zIndex: P ? this._count : void 0
|
|
39941
39959
|
}));
|
|
39942
39960
|
}
|
|
39943
39961
|
}
|
|
@@ -40433,20 +40451,20 @@ ${u}`), u;
|
|
|
40433
40451
|
if (!C.length)
|
|
40434
40452
|
return [];
|
|
40435
40453
|
if (C.length - 1 < 0) return [];
|
|
40436
|
-
const
|
|
40437
|
-
let $ = M,
|
|
40438
|
-
h ? $ = l : O &&
|
|
40454
|
+
const S = C.slice(D);
|
|
40455
|
+
let $ = M, P = h ? M : B + $;
|
|
40456
|
+
h ? $ = l : O && P > O && (P = O);
|
|
40439
40457
|
const H = [];
|
|
40440
|
-
for (const [t0, Z] of
|
|
40458
|
+
for (const [t0, Z] of S.entries()) {
|
|
40441
40459
|
let { time: o0, barIndex: b0, openTime: G } = Z;
|
|
40442
40460
|
o0 = o0 * 1e3, d && (o0 = G);
|
|
40443
40461
|
let J = b0 || D + t0;
|
|
40444
|
-
if (o0 >=
|
|
40462
|
+
if (o0 >= P)
|
|
40445
40463
|
return !u && (this._cacheData[r] = {
|
|
40446
40464
|
index: J,
|
|
40447
40465
|
periodStamp: B
|
|
40448
40466
|
}), H;
|
|
40449
|
-
if ($ <= o0 && o0 <
|
|
40467
|
+
if ($ <= o0 && o0 < P) {
|
|
40450
40468
|
const Y = (N = Z == null ? void 0 : Z.result) == null ? void 0 : N[r];
|
|
40451
40469
|
if (Array.isArray(Y))
|
|
40452
40470
|
for (const [c0, n0] of Y.entries())
|
|
@@ -40493,15 +40511,15 @@ ${u}`), u;
|
|
|
40493
40511
|
if (h != null && h.has(O)) {
|
|
40494
40512
|
const x = Z1(f.tickerid), N = Z1(r);
|
|
40495
40513
|
let D = K0(i, M, N) * 1e3;
|
|
40496
|
-
const B = K0(p, M, x) * 1e3, { index: C = 0, periodStamp: X = B } = this._cacheData[t] || {}, { list:
|
|
40497
|
-
if (!
|
|
40514
|
+
const B = K0(p, M, x) * 1e3, { index: C = 0, periodStamp: X = B } = this._cacheData[t] || {}, { list: S } = (h == null ? void 0 : h.get(O)) || {};
|
|
40515
|
+
if (!S.length)
|
|
40498
40516
|
return;
|
|
40499
|
-
const $ =
|
|
40500
|
-
let
|
|
40501
|
-
x ?
|
|
40502
|
-
const t0 =
|
|
40503
|
-
lastBarIndex:
|
|
40504
|
-
lastBarTime:
|
|
40517
|
+
const $ = S.slice(C);
|
|
40518
|
+
let P = M, H = x ? M : X + P;
|
|
40519
|
+
x ? P = l : u && H > u && (H = u);
|
|
40520
|
+
const t0 = S.length - 1, Z = {
|
|
40521
|
+
lastBarIndex: S[t0].barIndex || t0,
|
|
40522
|
+
lastBarTime: S[t0].time,
|
|
40505
40523
|
interval: i,
|
|
40506
40524
|
mintick: b
|
|
40507
40525
|
};
|
|
@@ -40516,7 +40534,7 @@ ${u}`), u;
|
|
|
40516
40534
|
C,
|
|
40517
40535
|
X,
|
|
40518
40536
|
t,
|
|
40519
|
-
|
|
40537
|
+
P,
|
|
40520
40538
|
o,
|
|
40521
40539
|
N
|
|
40522
40540
|
) : o0 = this._lookaheadOffHandle(
|
|
@@ -40528,7 +40546,7 @@ ${u}`), u;
|
|
|
40528
40546
|
C,
|
|
40529
40547
|
X,
|
|
40530
40548
|
t,
|
|
40531
|
-
|
|
40549
|
+
P,
|
|
40532
40550
|
(N ? M : u) || H,
|
|
40533
40551
|
o,
|
|
40534
40552
|
N
|
|
@@ -40546,7 +40564,7 @@ ${u}`), u;
|
|
|
40546
40564
|
};
|
|
40547
40565
|
return;
|
|
40548
40566
|
}
|
|
40549
|
-
if (G <=
|
|
40567
|
+
if (G <= P && c0 > P)
|
|
40550
40568
|
return this._cacheData[t] = {
|
|
40551
40569
|
index: n0,
|
|
40552
40570
|
periodStamp: X
|
|
@@ -40578,7 +40596,7 @@ ${u}`), u;
|
|
|
40578
40596
|
barIndex: m0,
|
|
40579
40597
|
nextBarTime: (v = $[o0 + 1]) == null ? void 0 : v.time
|
|
40580
40598
|
}), Z);
|
|
40581
|
-
if ((G >=
|
|
40599
|
+
if ((G >= P && G <= H || c0 < H && G < P) && m0 === Z.lastBarIndex)
|
|
40582
40600
|
return this._cacheData[t] = {
|
|
40583
40601
|
index: m0,
|
|
40584
40602
|
periodStamp: X
|
|
@@ -40588,7 +40606,7 @@ ${u}`), u;
|
|
|
40588
40606
|
}), Z);
|
|
40589
40607
|
}
|
|
40590
40608
|
this._cacheData[t] = {
|
|
40591
|
-
index:
|
|
40609
|
+
index: S.length,
|
|
40592
40610
|
periodStamp: X
|
|
40593
40611
|
};
|
|
40594
40612
|
return;
|
|
@@ -40815,8 +40833,8 @@ ${u}`), u;
|
|
|
40815
40833
|
});
|
|
40816
40834
|
let D;
|
|
40817
40835
|
const B = {};
|
|
40818
|
-
for (const [
|
|
40819
|
-
const { barindex:
|
|
40836
|
+
for (const [S, $] of i.entries()) {
|
|
40837
|
+
const { barindex: P } = $, H = yield this.requestMapHandle(
|
|
40820
40838
|
b,
|
|
40821
40839
|
v,
|
|
40822
40840
|
B,
|
|
@@ -40834,11 +40852,11 @@ ${u}`), u;
|
|
|
40834
40852
|
t
|
|
40835
40853
|
)
|
|
40836
40854
|
}), b.endExecution(), c.__isReqRepeated = !1), D = Object.assign($, {
|
|
40837
|
-
barIndex:
|
|
40855
|
+
barIndex: P || S,
|
|
40838
40856
|
lastBarIndex: i[f].barindex || f,
|
|
40839
40857
|
lastBarTime: i[f].time,
|
|
40840
|
-
nextBarTime: (l = i[
|
|
40841
|
-
preBarTime: (u = i[
|
|
40858
|
+
nextBarTime: (l = i[S + 1]) == null ? void 0 : l.time,
|
|
40859
|
+
preBarTime: (u = i[S - 1]) == null ? void 0 : u.time
|
|
40842
40860
|
}), c.updateData(D), b.update({ barIndex: (D == null ? void 0 : D.barIndex) || 0 }), $.result = Object.assign($.result || {}, {
|
|
40843
40861
|
[t]: M(
|
|
40844
40862
|
c,
|
|
@@ -40886,9 +40904,9 @@ ${u}`), u;
|
|
|
40886
40904
|
let B = 0;
|
|
40887
40905
|
const { list: C, endTime: X } = (n == null ? void 0 : n.get(w)) || {};
|
|
40888
40906
|
C && (B = X || 0);
|
|
40889
|
-
const
|
|
40890
|
-
exchange:
|
|
40891
|
-
symbol:
|
|
40907
|
+
const S = Z1(R) || Ei(R), [$, P] = R.split(":"), H = Number(D) <= 60 ? 1e4 : 5e3, t0 = x ? x <= 1e5 ? x : 1e5 : H, Z = {
|
|
40908
|
+
exchange: P ? $ : "X",
|
|
40909
|
+
symbol: P || $,
|
|
40892
40910
|
limit: t0,
|
|
40893
40911
|
start: B,
|
|
40894
40912
|
end: 0,
|
|
@@ -40900,9 +40918,9 @@ ${u}`), u;
|
|
|
40900
40918
|
ignore_invalid_symbol: N,
|
|
40901
40919
|
currentDataList: C,
|
|
40902
40920
|
startTime: B,
|
|
40903
|
-
isFutures:
|
|
40921
|
+
isFutures: S,
|
|
40904
40922
|
timeframe: v
|
|
40905
|
-
}),
|
|
40923
|
+
}), S ? h.push(ta(Z)) : h.push(ea({ params: [Z] }));
|
|
40906
40924
|
}
|
|
40907
40925
|
const A = yield Promise.all(h), q = self.workerStorage.get(`request_${this._scriptId}_pre_data`) || /* @__PURE__ */ new Map();
|
|
40908
40926
|
for (const [m, W] of A.entries()) {
|
|
@@ -40913,7 +40931,7 @@ ${u}`), u;
|
|
|
40913
40931
|
currentDataList: B = [],
|
|
40914
40932
|
startTime: C,
|
|
40915
40933
|
isFutures: X,
|
|
40916
|
-
timeframe:
|
|
40934
|
+
timeframe: S
|
|
40917
40935
|
} = d[m];
|
|
40918
40936
|
if (R !== 200 && !D)
|
|
40919
40937
|
return {
|
|
@@ -40929,17 +40947,17 @@ ${u}`), u;
|
|
|
40929
40947
|
}
|
|
40930
40948
|
]
|
|
40931
40949
|
};
|
|
40932
|
-
const { session_display: $, timezone:
|
|
40950
|
+
const { session_display: $, timezone: P, tick_size: H } = (v == null ? void 0 : v[N]) || {}, t0 = (X ? (p = v == null ? void 0 : v[N]) == null ? void 0 : p.list : (M = (b = v == null ? void 0 : v[N]) == null ? void 0 : b.list) == null ? void 0 : M.reverse()) || [];
|
|
40933
40951
|
if (X) {
|
|
40934
40952
|
const o0 = (l = v == null ? void 0 : v[N]) == null ? void 0 : l.klineBaseList, b0 = Z1(N), G = t0[t0.length - 1], { newLines: J, preData: Y } = ys(
|
|
40935
40953
|
o0,
|
|
40936
40954
|
G,
|
|
40937
|
-
|
|
40955
|
+
S,
|
|
40938
40956
|
!1,
|
|
40939
40957
|
b0 ? (u = t0[t0.length - 2]) == null ? void 0 : u.time : G == null ? void 0 : G.time,
|
|
40940
40958
|
void 0,
|
|
40941
40959
|
$,
|
|
40942
|
-
|
|
40960
|
+
P,
|
|
40943
40961
|
b0
|
|
40944
40962
|
);
|
|
40945
40963
|
xi(t0, J), Y && q.set(x, Y);
|
|
@@ -40952,7 +40970,7 @@ ${u}`), u;
|
|
|
40952
40970
|
xi(B, t0), n == null || n.set(x, {
|
|
40953
40971
|
list: B,
|
|
40954
40972
|
session: $,
|
|
40955
|
-
timezone:
|
|
40973
|
+
timezone: P,
|
|
40956
40974
|
endTime: (f = B[B.length - 2]) == null ? void 0 : f.time
|
|
40957
40975
|
});
|
|
40958
40976
|
}
|
|
@@ -41389,9 +41407,9 @@ ${u}`), u;
|
|
|
41389
41407
|
maxprofit_percent_long: B = 0,
|
|
41390
41408
|
maxprofit_percent_short: C = 0,
|
|
41391
41409
|
maxloss_percent_long: X = 0,
|
|
41392
|
-
maxloss_percent_short:
|
|
41410
|
+
maxloss_percent_short: S = 0,
|
|
41393
41411
|
hold_long_k_count: $ = 0,
|
|
41394
|
-
hold_short_k_count:
|
|
41412
|
+
hold_short_k_count: P = 0,
|
|
41395
41413
|
hold_profit_long_k_count: H = 0,
|
|
41396
41414
|
hold_profit_short_k_count: t0 = 0,
|
|
41397
41415
|
hold_loss_long_k_count: Z = 0,
|
|
@@ -41400,7 +41418,7 @@ ${u}`), u;
|
|
|
41400
41418
|
shapeRatioType: G = "NONE"
|
|
41401
41419
|
} = this._preHistoryOrderCalcResult;
|
|
41402
41420
|
const { profit: J = 0, profit_percent: Y = 0, in_index: c0 = 0, out_index: n0 = 0, commission: m0 = 0, direction: v0, in_time: g0 = 0, out_time: x0 = 0, total_profit: q0 = 0 } = e, F = n0 - c0 + 1;
|
|
41403
|
-
if (v0 === r1.long ? (i += J, o += 1, c += Y, R += m0, $ += F, J > 0 ? (l += Y, m += 1, h += J, H += F, w = Math.max(w, J), B = Math.max(B, Y)) : J < 0 && (b += Y, A += 1, f += J, Z += F, N = Math.min(N, J), X = Math.min(X, Y))) : (n += J, a += 1, p += Y, v += m0,
|
|
41421
|
+
if (v0 === r1.long ? (i += J, o += 1, c += Y, R += m0, $ += F, J > 0 ? (l += Y, m += 1, h += J, H += F, w = Math.max(w, J), B = Math.max(B, Y)) : J < 0 && (b += Y, A += 1, f += J, Z += F, N = Math.min(N, J), X = Math.min(X, Y))) : (n += J, a += 1, p += Y, v += m0, P += F, J > 0 ? (u += Y, W += 1, d += J, t0 += F, x = Math.max(x, J), C = Math.max(C, Y)) : J < 0 && (M += Y, q += 1, O += J, o0 += F, D = Math.min(D, J), S = Math.min(S, Y))), !b0) {
|
|
41404
41422
|
const X0 = this._createBalanceByInterval(g0, Date.now());
|
|
41405
41423
|
b0 = X0.balanceByInterval, G = X0.shapeRatioType;
|
|
41406
41424
|
}
|
|
@@ -41440,9 +41458,9 @@ ${u}`), u;
|
|
|
41440
41458
|
maxprofit_percent_long: B,
|
|
41441
41459
|
maxprofit_percent_short: C,
|
|
41442
41460
|
maxloss_percent_long: X,
|
|
41443
|
-
maxloss_percent_short:
|
|
41461
|
+
maxloss_percent_short: S,
|
|
41444
41462
|
hold_long_k_count: $,
|
|
41445
|
-
hold_short_k_count:
|
|
41463
|
+
hold_short_k_count: P,
|
|
41446
41464
|
hold_profit_long_k_count: H,
|
|
41447
41465
|
hold_profit_short_k_count: t0,
|
|
41448
41466
|
hold_loss_long_k_count: Z,
|
|
@@ -42932,11 +42950,11 @@ ${u}`), u;
|
|
|
42932
42950
|
};
|
|
42933
42951
|
}
|
|
42934
42952
|
}
|
|
42935
|
-
const
|
|
42936
|
-
if (
|
|
42953
|
+
const S = B.errors;
|
|
42954
|
+
if (S.length && S.some((Y) => Y.type === i1.Error))
|
|
42937
42955
|
return Q1(O), {
|
|
42938
42956
|
status: 1,
|
|
42939
|
-
errors:
|
|
42957
|
+
errors: S
|
|
42940
42958
|
};
|
|
42941
42959
|
const $ = B.options(R, t);
|
|
42942
42960
|
Object.assign(x, {
|
|
@@ -42950,7 +42968,7 @@ ${u}`), u;
|
|
|
42950
42968
|
timeframeGaps: d,
|
|
42951
42969
|
lastData: r[r.length - 1]
|
|
42952
42970
|
}), Q1(O);
|
|
42953
|
-
const
|
|
42971
|
+
const P = h && h !== m && (q != null && q.length || u) ? lz(
|
|
42954
42972
|
q,
|
|
42955
42973
|
r,
|
|
42956
42974
|
$,
|
|
@@ -42964,9 +42982,9 @@ ${u}`), u;
|
|
|
42964
42982
|
return e.id && self.workerStorage.set(`cache_${e.id}`, x), {
|
|
42965
42983
|
status: 0,
|
|
42966
42984
|
requestList: A,
|
|
42967
|
-
errors:
|
|
42985
|
+
errors: S,
|
|
42968
42986
|
// cacheData: newCacheData,
|
|
42969
|
-
options: K(I({},
|
|
42987
|
+
options: K(I({}, P), { id: e.id })
|
|
42970
42988
|
};
|
|
42971
42989
|
});
|
|
42972
42990
|
}
|
|
@@ -48492,7 +48510,7 @@ ${u}`), u;
|
|
|
48492
48510
|
};
|
|
48493
48511
|
}
|
|
48494
48512
|
fill(e, t) {
|
|
48495
|
-
var x, N, D, B, C, X,
|
|
48513
|
+
var x, N, D, B, C, X, S, $;
|
|
48496
48514
|
const r = ["color", "top_color", "bottom_color"];
|
|
48497
48515
|
E0(e, r);
|
|
48498
48516
|
const w = e, { color: i, top_color: n, bottom_color: o, seriesColors: a, hline1: c, hline2: p, plot1: b, plot2: M, top_value: l, bottom_value: u } = w, f = U0(w, ["color", "top_color", "bottom_color", "seriesColors", "hline1", "hline2", "plot1", "plot2", "top_value", "bottom_value"]), { bar_index: O, time: h } = this._variables, d = `fill_${t}`, A = this._fills.get(d), q = (A == null ? void 0 : A.data) || [];
|
|
@@ -48502,15 +48520,15 @@ ${u}`), u;
|
|
|
48502
48520
|
if (c && p)
|
|
48503
48521
|
W = (x = this._hlines.get(c == null ? void 0 : c.key)) == null ? void 0 : x.price, R = (N = this._hlines.get(p == null ? void 0 : p.key)) == null ? void 0 : N.price, v = "hline";
|
|
48504
48522
|
else {
|
|
48505
|
-
const
|
|
48523
|
+
const P = this._plots.get(b == null ? void 0 : b.key), H = this._plots.get(M == null ? void 0 : M.key), t0 = (P == null ? void 0 : P.data) || [], Z = (H == null ? void 0 : H.data) || [];
|
|
48506
48524
|
if (W = (B = (D = t0[O]) == null ? void 0 : D.value) == null ? void 0 : B[1], R = (X = (C = Z[O]) == null ? void 0 : C.value) == null ? void 0 : X[1], !O) {
|
|
48507
|
-
const o0 = (
|
|
48508
|
-
(
|
|
48525
|
+
const o0 = (P == null ? void 0 : P.force_overlay) && (H == null ? void 0 : H.force_overlay);
|
|
48526
|
+
(P != null && P.force_overlay || H != null && H.force_overlay) && !o0 ? this._errorListener.addError(Q0.plotFillForceOverlayErr, t, j0.Error) : f.force_overlay = o0;
|
|
48509
48527
|
}
|
|
48510
48528
|
}
|
|
48511
48529
|
if (q[O] = { time: h, color: i, top_color: n, bottom_color: o, barIndex: O, plot1: W, plot2: R, top_value: l, bottom_value: u }, this._seriesColorHandle(e, r, A), !A) {
|
|
48512
48530
|
this._count++;
|
|
48513
|
-
const
|
|
48531
|
+
const P = ((S = this._options.indicator) == null ? void 0 : S.explicit_plot_zorder) || (($ = this._options.strategy) == null ? void 0 : $.explicit_plot_zorder), H = i ? [i] : void 0, t0 = n ? [n] : void 0, Z = o ? [o] : void 0;
|
|
48514
48532
|
this._fills.set(d, K(I({
|
|
48515
48533
|
id: d,
|
|
48516
48534
|
colors: H,
|
|
@@ -48526,7 +48544,7 @@ ${u}`), u;
|
|
|
48526
48544
|
plot1: b,
|
|
48527
48545
|
plot2: M
|
|
48528
48546
|
}, f), {
|
|
48529
|
-
zIndex:
|
|
48547
|
+
zIndex: P ? this._count : void 0
|
|
48530
48548
|
}));
|
|
48531
48549
|
}
|
|
48532
48550
|
}
|
|
@@ -49026,20 +49044,20 @@ ${u}`), u;
|
|
|
49026
49044
|
if (!C.length)
|
|
49027
49045
|
return [];
|
|
49028
49046
|
if (C.length - 1 < 0) return [];
|
|
49029
|
-
const
|
|
49030
|
-
let $ = M,
|
|
49031
|
-
h ? $ = l : O &&
|
|
49047
|
+
const S = C.slice(D);
|
|
49048
|
+
let $ = M, P = h ? M : B + $;
|
|
49049
|
+
h ? $ = l : O && P > O && (P = O);
|
|
49032
49050
|
const H = [];
|
|
49033
|
-
for (const [t0, Z] of
|
|
49051
|
+
for (const [t0, Z] of S.entries()) {
|
|
49034
49052
|
let { time: o0, barIndex: b0, openTime: G } = Z;
|
|
49035
49053
|
o0 = o0 * 1e3, d && (o0 = G);
|
|
49036
49054
|
let J = b0 || D + t0;
|
|
49037
|
-
if (o0 >=
|
|
49055
|
+
if (o0 >= P)
|
|
49038
49056
|
return !u && (this._cacheData[r] = {
|
|
49039
49057
|
index: J,
|
|
49040
49058
|
periodStamp: B
|
|
49041
49059
|
}), H;
|
|
49042
|
-
if ($ <= o0 && o0 <
|
|
49060
|
+
if ($ <= o0 && o0 < P) {
|
|
49043
49061
|
const Y = (N = Z == null ? void 0 : Z.result) == null ? void 0 : N[r];
|
|
49044
49062
|
if (Array.isArray(Y))
|
|
49045
49063
|
for (const [c0, n0] of Y.entries())
|
|
@@ -49081,11 +49099,11 @@ ${u}`), u;
|
|
|
49081
49099
|
};
|
|
49082
49100
|
if ((d == null ? void 0 : d.get(O)) || (A == null || A.set(O, q), d == null || d.set(O, q)), h != null && h.has(O)) {
|
|
49083
49101
|
const C = Z1(f.tickerid), X = Z1(r);
|
|
49084
|
-
let
|
|
49085
|
-
const $ = K0(p, M, C) * 1e3, { index:
|
|
49102
|
+
let S = K0(i, M, X) * 1e3;
|
|
49103
|
+
const $ = K0(p, M, C) * 1e3, { index: P = 0, periodStamp: H = $ } = this._cacheData[t] || {}, { list: t0 } = (h == null ? void 0 : h.get(O)) || {};
|
|
49086
49104
|
if (!t0.length)
|
|
49087
49105
|
return;
|
|
49088
|
-
const Z = t0.slice(
|
|
49106
|
+
const Z = t0.slice(P);
|
|
49089
49107
|
let o0 = M, b0 = C ? M : H + o0;
|
|
49090
49108
|
C ? o0 = l : u && b0 > u && (b0 = u);
|
|
49091
49109
|
const G = t0.length - 1;
|
|
@@ -49096,15 +49114,15 @@ ${u}`), u;
|
|
|
49096
49114
|
interval: i,
|
|
49097
49115
|
mintick: b
|
|
49098
49116
|
};
|
|
49099
|
-
if (
|
|
49117
|
+
if (S > H) {
|
|
49100
49118
|
let Y;
|
|
49101
49119
|
if (a === qi.lookaheadOn ? Y = this._lookaheadOnHandle(
|
|
49102
49120
|
Z,
|
|
49103
49121
|
i,
|
|
49104
49122
|
b0,
|
|
49105
|
-
P,
|
|
49106
|
-
J,
|
|
49107
49123
|
S,
|
|
49124
|
+
J,
|
|
49125
|
+
P,
|
|
49108
49126
|
H,
|
|
49109
49127
|
t,
|
|
49110
49128
|
o0,
|
|
@@ -49114,9 +49132,9 @@ ${u}`), u;
|
|
|
49114
49132
|
Z,
|
|
49115
49133
|
i,
|
|
49116
49134
|
b0,
|
|
49117
|
-
P,
|
|
49118
|
-
J,
|
|
49119
49135
|
S,
|
|
49136
|
+
J,
|
|
49137
|
+
P,
|
|
49120
49138
|
H,
|
|
49121
49139
|
t,
|
|
49122
49140
|
o0,
|
|
@@ -49128,8 +49146,8 @@ ${u}`), u;
|
|
|
49128
49146
|
} else if (a === qi.lookaheadOn)
|
|
49129
49147
|
for (const [Y, c0] of Z.entries()) {
|
|
49130
49148
|
let { time: n0, barIndex: m0, openTime: v0, nextBarTime: g0 } = c0;
|
|
49131
|
-
n0 = n0 * 1e3, g0 = g0 * 1e3 || (X ? n0 : ((W = Z[Y + 1]) == null ? void 0 : W.time) * 1e3 || n0 +
|
|
49132
|
-
let x0 = m0 ||
|
|
49149
|
+
n0 = n0 * 1e3, g0 = g0 * 1e3 || (X ? n0 : ((W = Z[Y + 1]) == null ? void 0 : W.time) * 1e3 || n0 + S), X && (n0 = v0);
|
|
49150
|
+
let x0 = m0 || P + Y;
|
|
49133
49151
|
if (n0 >= b0 || g0 > b0) {
|
|
49134
49152
|
this._cacheData[t] = {
|
|
49135
49153
|
index: x0,
|
|
@@ -49151,10 +49169,10 @@ ${u}`), u;
|
|
|
49151
49169
|
for (const [Y, c0] of Z.entries()) {
|
|
49152
49170
|
let { time: n0, barIndex: m0, openTime: v0 } = c0;
|
|
49153
49171
|
n0 = n0 * 1e3;
|
|
49154
|
-
const g0 = X ? n0 : n0 +
|
|
49172
|
+
const g0 = X ? n0 : n0 + S;
|
|
49155
49173
|
X && (n0 = v0);
|
|
49156
49174
|
const x0 = X ? g0 : ((w = Z[Y + 1]) == null ? void 0 : w.time) * 1e3 || g0;
|
|
49157
|
-
let q0 = m0 ||
|
|
49175
|
+
let q0 = m0 || P + Y;
|
|
49158
49176
|
if (n0 > b0) {
|
|
49159
49177
|
this._cacheData[t] = {
|
|
49160
49178
|
index: q0,
|
|
@@ -49415,7 +49433,7 @@ ${u}`), u;
|
|
|
49415
49433
|
});
|
|
49416
49434
|
let C;
|
|
49417
49435
|
const X = {};
|
|
49418
|
-
for (const [
|
|
49436
|
+
for (const [P, H] of i.entries()) {
|
|
49419
49437
|
const { barindex: t0 } = H, Z = yield this.requestMapHandle(
|
|
49420
49438
|
M,
|
|
49421
49439
|
x,
|
|
@@ -49434,11 +49452,11 @@ ${u}`), u;
|
|
|
49434
49452
|
t
|
|
49435
49453
|
)
|
|
49436
49454
|
}), M.endExecution(), p.__isReqRepeated = !1), C = Object.assign(H, {
|
|
49437
|
-
barIndex: t0 ||
|
|
49455
|
+
barIndex: t0 || P,
|
|
49438
49456
|
lastBarIndex: i[O].barindex || O,
|
|
49439
49457
|
lastBarTime: i[O].time,
|
|
49440
|
-
nextBarTime: (u = i[
|
|
49441
|
-
preBarTime: (f = i[
|
|
49458
|
+
nextBarTime: (u = i[P + 1]) == null ? void 0 : u.time,
|
|
49459
|
+
preBarTime: (f = i[P - 1]) == null ? void 0 : f.time
|
|
49442
49460
|
}), p.updateData(C), M.update({ barIndex: (C == null ? void 0 : C.barIndex) || 0 }), H.result = Object.assign(H.result || {}, {
|
|
49443
49461
|
[t]: l(
|
|
49444
49462
|
p,
|
|
@@ -49455,9 +49473,9 @@ ${u}`), u;
|
|
|
49455
49473
|
errors: M.errors
|
|
49456
49474
|
};
|
|
49457
49475
|
}
|
|
49458
|
-
const
|
|
49476
|
+
const S = M.log.logs, $ = M.errors;
|
|
49459
49477
|
return M.log.clearLogs(), M.clearErrors(), {
|
|
49460
|
-
logs:
|
|
49478
|
+
logs: S,
|
|
49461
49479
|
errors: $,
|
|
49462
49480
|
cacheData: {
|
|
49463
49481
|
varCacheData: p.getVarCacheData(),
|
|
@@ -49486,9 +49504,9 @@ ${u}`), u;
|
|
|
49486
49504
|
let B = 0;
|
|
49487
49505
|
const { list: C, endTime: X } = (n == null ? void 0 : n.get(w)) || {};
|
|
49488
49506
|
C && (B = X || 0);
|
|
49489
|
-
const
|
|
49490
|
-
exchange:
|
|
49491
|
-
symbol:
|
|
49507
|
+
const S = Z1(R) || Ei(R), [$, P] = R.split(":"), H = Number(D) <= 60 ? 1e4 : 5e3, t0 = x ? x <= 1e5 ? x : 1e5 : H, Z = {
|
|
49508
|
+
exchange: P ? $ : "X",
|
|
49509
|
+
symbol: P || $,
|
|
49492
49510
|
limit: t0,
|
|
49493
49511
|
start: B,
|
|
49494
49512
|
end: 0,
|
|
@@ -49500,9 +49518,9 @@ ${u}`), u;
|
|
|
49500
49518
|
ignore_invalid_symbol: N,
|
|
49501
49519
|
currentDataList: C,
|
|
49502
49520
|
startTime: B,
|
|
49503
|
-
isFutures:
|
|
49521
|
+
isFutures: S,
|
|
49504
49522
|
timeframe: v
|
|
49505
|
-
}),
|
|
49523
|
+
}), S ? h.push(ta(Z)) : h.push(ea({ params: [Z] }));
|
|
49506
49524
|
}
|
|
49507
49525
|
const A = yield Promise.all(h), q = self.workerStorage.get(`request_${this._scriptId}_pre_data`) || /* @__PURE__ */ new Map();
|
|
49508
49526
|
for (const [m, W] of A.entries()) {
|
|
@@ -49513,7 +49531,7 @@ ${u}`), u;
|
|
|
49513
49531
|
currentDataList: B = [],
|
|
49514
49532
|
startTime: C,
|
|
49515
49533
|
isFutures: X,
|
|
49516
|
-
timeframe:
|
|
49534
|
+
timeframe: S
|
|
49517
49535
|
} = d[m];
|
|
49518
49536
|
if (R !== 200 && !D)
|
|
49519
49537
|
return {
|
|
@@ -49529,17 +49547,17 @@ ${u}`), u;
|
|
|
49529
49547
|
}
|
|
49530
49548
|
]
|
|
49531
49549
|
};
|
|
49532
|
-
const { session_display: $, timezone:
|
|
49550
|
+
const { session_display: $, timezone: P, tick_size: H } = (v == null ? void 0 : v[N]) || {}, t0 = (X ? (p = v == null ? void 0 : v[N]) == null ? void 0 : p.list : (M = (b = v == null ? void 0 : v[N]) == null ? void 0 : b.list) == null ? void 0 : M.reverse()) || [];
|
|
49533
49551
|
if (X) {
|
|
49534
49552
|
const o0 = (l = v == null ? void 0 : v[N]) == null ? void 0 : l.klineBaseList, b0 = Z1(N), G = t0[t0.length - 1], { newLines: J, preData: Y } = ys(
|
|
49535
49553
|
o0,
|
|
49536
49554
|
G,
|
|
49537
|
-
|
|
49555
|
+
S,
|
|
49538
49556
|
!1,
|
|
49539
49557
|
b0 ? (u = t0[t0.length - 2]) == null ? void 0 : u.time : G == null ? void 0 : G.time,
|
|
49540
49558
|
void 0,
|
|
49541
49559
|
$,
|
|
49542
|
-
|
|
49560
|
+
P,
|
|
49543
49561
|
b0
|
|
49544
49562
|
);
|
|
49545
49563
|
xi(t0, J), Y && q.set(x, Y);
|
|
@@ -49552,7 +49570,7 @@ ${u}`), u;
|
|
|
49552
49570
|
xi(B, t0), n == null || n.set(x, {
|
|
49553
49571
|
list: B,
|
|
49554
49572
|
session: $,
|
|
49555
|
-
timezone:
|
|
49573
|
+
timezone: P,
|
|
49556
49574
|
endTime: (f = B[B.length - 2]) == null ? void 0 : f.time
|
|
49557
49575
|
});
|
|
49558
49576
|
}
|
|
@@ -49997,9 +50015,9 @@ ${u}`), u;
|
|
|
49997
50015
|
maxprofit_percent_long: B = 0,
|
|
49998
50016
|
maxprofit_percent_short: C = 0,
|
|
49999
50017
|
maxloss_percent_long: X = 0,
|
|
50000
|
-
maxloss_percent_short:
|
|
50018
|
+
maxloss_percent_short: S = 0,
|
|
50001
50019
|
hold_long_k_count: $ = 0,
|
|
50002
|
-
hold_short_k_count:
|
|
50020
|
+
hold_short_k_count: P = 0,
|
|
50003
50021
|
hold_profit_long_k_count: H = 0,
|
|
50004
50022
|
hold_profit_short_k_count: t0 = 0,
|
|
50005
50023
|
hold_loss_long_k_count: Z = 0,
|
|
@@ -50008,7 +50026,7 @@ ${u}`), u;
|
|
|
50008
50026
|
shapeRatioType: G = "NONE"
|
|
50009
50027
|
} = this._preHistoryOrderCalcResult;
|
|
50010
50028
|
const { profit: J = 0, profit_percent: Y = 0, in_index: c0 = 0, out_index: n0 = 0, commission: m0 = 0, direction: v0, in_time: g0 = 0, out_time: x0 = 0, total_profit: q0 = 0 } = e, F = n0 - c0 + 1;
|
|
50011
|
-
if (v0 === t1.long ? (i += J, o += 1, c += Y, R += m0, $ += F, J > 0 ? (l += Y, m += 1, h += J, H += F, w = Math.max(w, J), B = Math.max(B, Y)) : J < 0 && (b += Y, A += 1, f += J, Z += F, N = Math.min(N, J), X = Math.min(X, Y))) : (n += J, a += 1, p += Y, v += m0,
|
|
50029
|
+
if (v0 === t1.long ? (i += J, o += 1, c += Y, R += m0, $ += F, J > 0 ? (l += Y, m += 1, h += J, H += F, w = Math.max(w, J), B = Math.max(B, Y)) : J < 0 && (b += Y, A += 1, f += J, Z += F, N = Math.min(N, J), X = Math.min(X, Y))) : (n += J, a += 1, p += Y, v += m0, P += F, J > 0 ? (u += Y, W += 1, d += J, t0 += F, x = Math.max(x, J), C = Math.max(C, Y)) : J < 0 && (M += Y, q += 1, O += J, o0 += F, D = Math.min(D, J), S = Math.min(S, Y))), !b0) {
|
|
50012
50030
|
const X0 = this._createBalanceByInterval(g0, Date.now());
|
|
50013
50031
|
b0 = X0.balanceByInterval, G = X0.shapeRatioType;
|
|
50014
50032
|
}
|
|
@@ -50048,9 +50066,9 @@ ${u}`), u;
|
|
|
50048
50066
|
maxprofit_percent_long: B,
|
|
50049
50067
|
maxprofit_percent_short: C,
|
|
50050
50068
|
maxloss_percent_long: X,
|
|
50051
|
-
maxloss_percent_short:
|
|
50069
|
+
maxloss_percent_short: S,
|
|
50052
50070
|
hold_long_k_count: $,
|
|
50053
|
-
hold_short_k_count:
|
|
50071
|
+
hold_short_k_count: P,
|
|
50054
50072
|
hold_profit_long_k_count: H,
|
|
50055
50073
|
hold_profit_short_k_count: t0,
|
|
50056
50074
|
hold_loss_long_k_count: Z,
|
|
@@ -51578,11 +51596,11 @@ ${u}`), u;
|
|
|
51578
51596
|
};
|
|
51579
51597
|
}
|
|
51580
51598
|
}
|
|
51581
|
-
const
|
|
51582
|
-
if (
|
|
51599
|
+
const S = B.errors;
|
|
51600
|
+
if (S.length && S.some((Y) => Y.type === j0.Error))
|
|
51583
51601
|
return Q1(O), {
|
|
51584
51602
|
status: 1,
|
|
51585
|
-
errors:
|
|
51603
|
+
errors: S
|
|
51586
51604
|
};
|
|
51587
51605
|
const $ = B.options(R, t);
|
|
51588
51606
|
Object.assign(x, {
|
|
@@ -51596,7 +51614,7 @@ ${u}`), u;
|
|
|
51596
51614
|
timeframeGaps: d,
|
|
51597
51615
|
lastData: r[r.length - 1]
|
|
51598
51616
|
}), Q1(O);
|
|
51599
|
-
const
|
|
51617
|
+
const P = h && h !== m && (q != null && q.length || f) ? lz(
|
|
51600
51618
|
q,
|
|
51601
51619
|
r,
|
|
51602
51620
|
$,
|
|
@@ -51610,9 +51628,9 @@ ${u}`), u;
|
|
|
51610
51628
|
return e.id && self.workerStorage.set(`cache_${e.id}`, x), {
|
|
51611
51629
|
status: 0,
|
|
51612
51630
|
requestList: A,
|
|
51613
|
-
errors:
|
|
51631
|
+
errors: S,
|
|
51614
51632
|
// cacheData: newCacheData,
|
|
51615
|
-
options: K(I({},
|
|
51633
|
+
options: K(I({}, P), { id: e.id })
|
|
51616
51634
|
};
|
|
51617
51635
|
});
|
|
51618
51636
|
}
|