@guihz/trading-vue-editor-tes 0.1.110 → 0.1.112
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 hS = Ay((Lu, tp) => {
|
|
|
360
360
|
np.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, g = 16, W = 32, R = 64, y = 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, g = 16, W = 32, R = 64, y = 128, w = 256, x = 512, N = 30, D = "...", B = 800, C = 16, X = 1, P = 2, k = 3, S = 1 / 0, H = 9007199254740991, t0 = 17976931348623157e292, Z = NaN, o0 = 4294967295, b0 = o0 - 1, G = o0 >>> 1, J = [
|
|
364
364
|
["ary", y],
|
|
365
365
|
["bind", h],
|
|
366
366
|
["bindKey", d],
|
|
@@ -1013,7 +1013,7 @@ var hS = Ay((Lu, tp) => {
|
|
|
1013
1013
|
h0 += _;
|
|
1014
1014
|
for (var v1 = -1, p1 = z[h0]; ++v1 < R0; ) {
|
|
1015
1015
|
var L1 = _0[v1], S1 = L1.iteratee, ar = L1.type, Dt = S1(p1);
|
|
1016
|
-
if (ar ==
|
|
1016
|
+
if (ar == P)
|
|
1017
1017
|
p1 = Dt;
|
|
1018
1018
|
else if (!Dt) {
|
|
1019
1019
|
if (ar == X)
|
|
@@ -1601,7 +1601,7 @@ var hS = Ay((Lu, tp) => {
|
|
|
1601
1601
|
}
|
|
1602
1602
|
function AM(z, _) {
|
|
1603
1603
|
var v = "";
|
|
1604
|
-
if (!z || _ < 1 || _ >
|
|
1604
|
+
if (!z || _ < 1 || _ > H)
|
|
1605
1605
|
return v;
|
|
1606
1606
|
do
|
|
1607
1607
|
_ % 2 && (v += z), _ = $c(_ / 2), _ && (z += z);
|
|
@@ -2450,7 +2450,7 @@ var hS = Ay((Lu, tp) => {
|
|
|
2450
2450
|
}
|
|
2451
2451
|
function Pi(z, _) {
|
|
2452
2452
|
var v = typeof z;
|
|
2453
|
-
return _ = _ == null ?
|
|
2453
|
+
return _ = _ == null ? H : _, !!_ && (v == "number" || v != "symbol" && $b.test(z)) && z > -1 && z % 1 == 0 && z < _;
|
|
2454
2454
|
}
|
|
2455
2455
|
function Lt(z, _, v) {
|
|
2456
2456
|
if (!Be(v))
|
|
@@ -3306,7 +3306,7 @@ var hS = Ay((Lu, tp) => {
|
|
|
3306
3306
|
return typeof z == "number" && z == m1(z);
|
|
3307
3307
|
}
|
|
3308
3308
|
function p2(z) {
|
|
3309
|
-
return typeof z == "number" && z > -1 && z % 1 == 0 && z <=
|
|
3309
|
+
return typeof z == "number" && z > -1 && z % 1 == 0 && z <= H;
|
|
3310
3310
|
}
|
|
3311
3311
|
function Be(z) {
|
|
3312
3312
|
var _ = typeof z;
|
|
@@ -3350,7 +3350,7 @@ var hS = Ay((Lu, tp) => {
|
|
|
3350
3350
|
}
|
|
3351
3351
|
var PM = nO ? sr(nO) : f5;
|
|
3352
3352
|
function hW(z) {
|
|
3353
|
-
return Hf(z) && z >= -
|
|
3353
|
+
return Hf(z) && z >= -H && z <= H;
|
|
3354
3354
|
}
|
|
3355
3355
|
var Yf = oO ? sr(oO) : d5;
|
|
3356
3356
|
function b2(z) {
|
|
@@ -3417,7 +3417,7 @@ var hS = Ay((Lu, tp) => {
|
|
|
3417
3417
|
return zi(z, Ht(z));
|
|
3418
3418
|
}
|
|
3419
3419
|
function WW(z) {
|
|
3420
|
-
return z ? fn(m1(z), -
|
|
3420
|
+
return z ? fn(m1(z), -H, H) : z === 0 ? z : 0;
|
|
3421
3421
|
}
|
|
3422
3422
|
function ae(z) {
|
|
3423
3423
|
return z == null ? "" : nr(z);
|
|
@@ -3888,7 +3888,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
3888
3888
|
return !0;
|
|
3889
3889
|
}
|
|
3890
3890
|
function Jv(z, _) {
|
|
3891
|
-
if (z = m1(z), z < 1 || z >
|
|
3891
|
+
if (z = m1(z), z < 1 || z > H)
|
|
3892
3892
|
return [];
|
|
3893
3893
|
var v = o0, L = ft(z, o0);
|
|
3894
3894
|
_ = o1(_), z -= o0;
|
|
@@ -4311,10 +4311,10 @@ 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: P = 0,
|
|
4315
4315
|
hold_long_k_count: k = 0,
|
|
4316
4316
|
hold_short_k_count: S = 0,
|
|
4317
|
-
hold_profit_long_k_count:
|
|
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,
|
|
4320
4320
|
hold_loss_short_k_count: o0 = 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: y0, in_time: g0 = 0, out_time: x0 = 0, total_profit: q0 = 0 } = e, F = n0 - c0 + 1;
|
|
4325
|
-
if (y0 === b1.long ? (i += J, o += 1, c += Y, R += m0, k += F, J > 0 ? (l += Y, g += 1, h += J,
|
|
4325
|
+
if (y0 === b1.long ? (i += J, o += 1, c += Y, R += m0, k += F, J > 0 ? (l += Y, g += 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, y += m0, S += 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), P = Math.min(P, Y))), !b0) {
|
|
4326
4326
|
const I0 = this._createBalanceByInterval(g0, Date.now());
|
|
4327
4327
|
b0 = I0.balanceByInterval, G = I0.shapeRatioType;
|
|
4328
4328
|
}
|
|
@@ -4362,10 +4362,10 @@ 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: P,
|
|
4366
4366
|
hold_long_k_count: k,
|
|
4367
4367
|
hold_short_k_count: S,
|
|
4368
|
-
hold_profit_long_k_count:
|
|
4368
|
+
hold_profit_long_k_count: H,
|
|
4369
4369
|
hold_profit_short_k_count: t0,
|
|
4370
4370
|
hold_loss_long_k_count: Z,
|
|
4371
4371
|
hold_loss_short_k_count: o0,
|
|
@@ -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 P(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(" "));
|
|
@@ -7484,7 +7484,7 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
|
7484
7484
|
o.hasOwnProperty(F) && (r[F] || r[i[F]]) && o[F] && e0.push(o[F]);
|
|
7485
7485
|
return e0.sort();
|
|
7486
7486
|
}
|
|
7487
|
-
function
|
|
7487
|
+
function H() {
|
|
7488
7488
|
return Object.keys(n);
|
|
7489
7489
|
}
|
|
7490
7490
|
function t0(F) {
|
|
@@ -7516,7 +7516,7 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
|
7516
7516
|
}) : a0;
|
|
7517
7517
|
}
|
|
7518
7518
|
function G(F) {
|
|
7519
|
-
|
|
7519
|
+
P(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 + "')")), !!k(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 = k(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 = P, n0.link = t0, n0.load = G, n0.zone = k, n0.zoneExists = J, n0.guess = C, n0.names = S, 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;
|
|
@@ -9985,7 +9985,8 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
|
9985
9985
|
OKX: "B",
|
|
9986
9986
|
xm: "X",
|
|
9987
9987
|
ex: "E",
|
|
9988
|
-
binance: "B"
|
|
9988
|
+
binance: "B",
|
|
9989
|
+
FX: "X"
|
|
9989
9990
|
};
|
|
9990
9991
|
Io.init();
|
|
9991
9992
|
const Jp = DD.create({
|
|
@@ -10115,27 +10116,27 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
|
10115
10116
|
searchParams: u,
|
|
10116
10117
|
prefixUrl: K_
|
|
10117
10118
|
}).then((d) => I1(Lu, null, function* () {
|
|
10118
|
-
var R;
|
|
10119
|
-
const A = yield d.json(), q = BD(b) ? 1e5 : 1, g = A.data.kline.map((
|
|
10120
|
-
const [
|
|
10119
|
+
var R, y;
|
|
10120
|
+
const A = yield d.json(), q = BD(b) ? 1e5 : 1, g = A.data.kline.filter((w) => !!w[0]).map((w) => {
|
|
10121
|
+
const [x, N, D, B, C, X, P] = w;
|
|
10121
10122
|
return {
|
|
10122
|
-
o:
|
|
10123
|
-
h:
|
|
10124
|
-
l:
|
|
10125
|
-
c:
|
|
10126
|
-
volume:
|
|
10127
|
-
time: k2(
|
|
10128
|
-
tradeDay:
|
|
10123
|
+
o: N,
|
|
10124
|
+
h: D,
|
|
10125
|
+
l: B,
|
|
10126
|
+
c: C,
|
|
10127
|
+
volume: X / q,
|
|
10128
|
+
time: k2(x + "", f == null ? void 0 : f.timezone) + O,
|
|
10129
|
+
tradeDay: P
|
|
10129
10130
|
};
|
|
10130
|
-
}), W = (R = A.data.lastbase) == null ? void 0 : R.map((
|
|
10131
|
-
const [
|
|
10131
|
+
}), W = (y = (R = A.data.lastbase) == null ? void 0 : R.filter((w) => !!w[0])) == null ? void 0 : y.map((w) => {
|
|
10132
|
+
const [x, N, D, B, C, X] = w;
|
|
10132
10133
|
return {
|
|
10133
|
-
o:
|
|
10134
|
-
h:
|
|
10135
|
-
l:
|
|
10136
|
-
c:
|
|
10137
|
-
volume:
|
|
10138
|
-
time: k2(
|
|
10134
|
+
o: N,
|
|
10135
|
+
h: D,
|
|
10136
|
+
l: B,
|
|
10137
|
+
c: C,
|
|
10138
|
+
volume: X / q,
|
|
10139
|
+
time: k2(x + "", f == null ? void 0 : f.timezone) + O
|
|
10139
10140
|
// tradeDay,
|
|
10140
10141
|
};
|
|
10141
10142
|
});
|
|
@@ -11428,7 +11429,7 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
|
11428
11429
|
const c = a.bits;
|
|
11429
11430
|
let p = 0, b = 0, M = 0, l = 0, u = 0, f = 0, O = 0, h = 0, d = 0, A = 0, q, g, W, R, y, w = null, x;
|
|
11430
11431
|
const N = new Uint16Array(mo + 1), D = new Uint16Array(mo + 1);
|
|
11431
|
-
let B = null, C, X,
|
|
11432
|
+
let B = null, C, X, P;
|
|
11432
11433
|
for (p = 0; p <= mo; p++)
|
|
11433
11434
|
N[p] = 0;
|
|
11434
11435
|
for (b = 0; b < r; b++)
|
|
@@ -11451,9 +11452,9 @@ Arguments: ` + Array.prototype.slice.call(r).join("") + `
|
|
|
11451
11452
|
if (s === Fd ? (w = B = o, x = 20) : s === hl ? (w = Gx, B = Qx, x = 257) : (w = Zx, B = Jx, x = 0), A = 0, b = 0, p = M, y = n, f = u, O = 0, W = -1, d = 1 << u, R = d - 1, s === hl && d > kd || s === Sd && d > $d)
|
|
11452
11453
|
return 1;
|
|
11453
11454
|
for (; ; ) {
|
|
11454
|
-
C = p - O, o[b] + 1 < x ? (X = 0,
|
|
11455
|
+
C = p - O, o[b] + 1 < x ? (X = 0, P = o[b]) : o[b] >= x ? (X = B[o[b] - x], P = w[o[b] - x]) : (X = 96, P = 0), q = 1 << p - O, g = 1 << f, M = g;
|
|
11455
11456
|
do
|
|
11456
|
-
g -= q, i[y + (A >> O) + g] = C << 24 | X << 16 |
|
|
11457
|
+
g -= q, i[y + (A >> O) + g] = C << 24 | X << 16 | P | 0;
|
|
11457
11458
|
while (g !== 0);
|
|
11458
11459
|
for (q = 1 << p - 1; A & q; )
|
|
11459
11460
|
q >>= 1;
|
|
@@ -13609,7 +13610,7 @@ Example:
|
|
|
13609
13610
|
N(U.types[M0]) || (i0 = Math.min(i0, U.types[M0].conversionIndex));
|
|
13610
13611
|
return i0;
|
|
13611
13612
|
}
|
|
13612
|
-
function
|
|
13613
|
+
function P(U, i0) {
|
|
13613
13614
|
if (U.hasAny) {
|
|
13614
13615
|
if (!i0.hasAny)
|
|
13615
13616
|
return 0.1;
|
|
@@ -13667,7 +13668,7 @@ Example:
|
|
|
13667
13668
|
const Ue = [];
|
|
13668
13669
|
let $t = 0;
|
|
13669
13670
|
for (let Ii = 0; Ii < M0.length; ++Ii) {
|
|
13670
|
-
const ro =
|
|
13671
|
+
const ro = P(M0[Ii], f0[Ii]);
|
|
13671
13672
|
Ue.push(ro), $t += ro;
|
|
13672
13673
|
}
|
|
13673
13674
|
if ($t !== 0)
|
|
@@ -13700,7 +13701,7 @@ Example:
|
|
|
13700
13701
|
}
|
|
13701
13702
|
return N0;
|
|
13702
13703
|
}
|
|
13703
|
-
function
|
|
13704
|
+
function H(U, i0) {
|
|
13704
13705
|
let M0 = i0, f0 = "";
|
|
13705
13706
|
if (U.some((O0) => O0.hasConversion)) {
|
|
13706
13707
|
const O0 = W(U), B0 = U.map(t0);
|
|
@@ -13889,7 +13890,7 @@ Example:
|
|
|
13889
13890
|
v0[U1].test = y(v0[U1].params);
|
|
13890
13891
|
const to = F1 ? R(v0[0].params[0]) : wr, Ii = Ne ? R(v0[1].params[0]) : wr, ro = it ? R(v0[2].params[0]) : wr, qb = Ue ? R(v0[3].params[0]) : wr, mb = $t ? R(v0[4].params[0]) : wr, gb = Ft ? R(v0[5].params[0]) : wr, gc = F1 ? R(v0[0].params[1]) : wr, Wb = Ne ? R(v0[1].params[1]) : wr, vb = it ? R(v0[2].params[1]) : wr, yb = Ue ? R(v0[3].params[1]) : wr, Ma = $t ? R(v0[4].params[1]) : wr, Rb = Ft ? R(v0[5].params[1]) : wr;
|
|
13891
13892
|
for (let U1 = 0; U1 < v0.length; ++U1)
|
|
13892
|
-
v0[U1].implementation =
|
|
13893
|
+
v0[U1].implementation = H(v0[U1].params, v0[U1].fn);
|
|
13893
13894
|
const la = F1 ? v0[0].implementation : go, Nb = Ne ? v0[1].implementation : go, wb = it ? v0[2].implementation : go, Lb = Ue ? v0[3].implementation : go, Db = $t ? v0[4].implementation : go, xb = Ft ? v0[5].implementation : go, Bb = F1 ? v0[0].params.length : -1, Cb = Ne ? v0[1].params.length : -1, Tb = it ? v0[2].params.length : -1, Wc = Ue ? v0[3].params.length : -1, Eb = $t ? v0[4].params.length : -1, Ib = Ft ? v0[5].params.length : -1, Xb = ys ? 6 : 0, kb = v0.length, $b = v0.map((U1) => U1.test), Fb = v0.map((U1) => U1.implementation), io = function() {
|
|
13894
13895
|
for (let Ot = Xb; Ot < kb; Ot++)
|
|
13895
13896
|
if ($b[Ot](arguments))
|
|
@@ -15189,28 +15190,28 @@ Example:
|
|
|
15189
15190
|
for (; !r[0] && r.length > 1; ) r.shift();
|
|
15190
15191
|
}
|
|
15191
15192
|
return function(r, i, n, o, a, c) {
|
|
15192
|
-
var p, b, M, l, u, f, O, h, d, A, q, g, W, R, y, w, x, N, D, B, C = r.constructor, X = r.s == i.s ? 1 : -1,
|
|
15193
|
-
if (!
|
|
15193
|
+
var p, b, M, l, u, f, O, h, d, A, q, g, W, R, y, w, x, N, D, B, C = r.constructor, X = r.s == i.s ? 1 : -1, P = r.d, k = i.d;
|
|
15194
|
+
if (!P || !P[0] || !k || !k[0])
|
|
15194
15195
|
return new C(
|
|
15195
15196
|
// Return NaN if either NaN, or both Infinity or 0.
|
|
15196
|
-
!r.s || !i.s || (
|
|
15197
|
+
!r.s || !i.s || (P ? k && P[0] == k[0] : !k) ? NaN : (
|
|
15197
15198
|
// Return ±0 if x is 0 or y is ±Infinity, or return ±Infinity as y is 0.
|
|
15198
|
-
|
|
15199
|
+
P && P[0] == 0 || !k ? X * 0 : X / 0
|
|
15199
15200
|
)
|
|
15200
15201
|
);
|
|
15201
|
-
for (c ? (u = 1, b = r.e - i.e) : (c = ci, u = a1, b = Nt(r.e / u) - Nt(i.e / u)), D = k.length, x =
|
|
15202
|
-
if (k[M] > (
|
|
15202
|
+
for (c ? (u = 1, b = r.e - i.e) : (c = ci, u = a1, b = Nt(r.e / u) - Nt(i.e / u)), D = k.length, x = P.length, d = new C(X), A = d.d = [], M = 0; k[M] == (P[M] || 0); M++) ;
|
|
15203
|
+
if (k[M] > (P[M] || 0) && b--, n == null ? (R = n = C.precision, o = C.rounding) : a ? R = n + (r.e - i.e) + 1 : R = n, R < 0)
|
|
15203
15204
|
A.push(1), f = !0;
|
|
15204
15205
|
else {
|
|
15205
15206
|
if (R = R / u + 2 | 0, M = 0, D == 1) {
|
|
15206
15207
|
for (l = 0, k = k[0], R++; (M < x || l) && R--; M++)
|
|
15207
|
-
y = l * c + (
|
|
15208
|
+
y = l * c + (P[M] || 0), A[M] = y / k | 0, l = y % k | 0;
|
|
15208
15209
|
f = l || M < x;
|
|
15209
15210
|
} else {
|
|
15210
|
-
for (l = c / (k[0] + 1) | 0, l > 1 && (k = s(k, l, c),
|
|
15211
|
+
for (l = c / (k[0] + 1) | 0, l > 1 && (k = s(k, l, c), P = s(P, l, c), D = k.length, x = P.length), w = D, q = P.slice(0, D), g = q.length; g < D; ) q[g++] = 0;
|
|
15211
15212
|
B = k.slice(), B.unshift(0), N = k[0], k[1] >= c / 2 && ++N;
|
|
15212
15213
|
do
|
|
15213
|
-
l = 0, p = e(k, q, D, g), p < 0 ? (W = q[0], D != g && (W = W * c + (q[1] || 0)), l = W / N | 0, l > 1 ? (l >= c && (l = c - 1), O = s(k, l, c), h = O.length, g = q.length, p = e(O, q, h, g), p == 1 && (l--, t(O, D < h ? B : k, h, c))) : (l == 0 && (p = l = 1), O = k.slice()), h = O.length, h < g && O.unshift(0), t(q, O, g, c), p == -1 && (g = q.length, p = e(k, q, D, g), p < 1 && (l++, t(q, D < g ? B : k, g, c))), g = q.length) : p === 0 && (l++, q = [0]), A[M++] = l, p && q[0] ? q[g++] =
|
|
15214
|
+
l = 0, p = e(k, q, D, g), p < 0 ? (W = q[0], D != g && (W = W * c + (q[1] || 0)), l = W / N | 0, l > 1 ? (l >= c && (l = c - 1), O = s(k, l, c), h = O.length, g = q.length, p = e(O, q, h, g), p == 1 && (l--, t(O, D < h ? B : k, h, c))) : (l == 0 && (p = l = 1), O = k.slice()), h = O.length, h < g && O.unshift(0), t(q, O, g, c), p == -1 && (g = q.length, p = e(k, q, D, g), p < 1 && (l++, t(q, D < g ? B : k, g, c))), g = q.length) : p === 0 && (l++, q = [0]), A[M++] = l, p && q[0] ? q[g++] = P[w] || 0 : (q = [P[w]], g = 1);
|
|
15214
15215
|
while ((w++ < x || q[0] !== void 0) && R--);
|
|
15215
15216
|
f = q[0] !== void 0;
|
|
15216
15217
|
}
|
|
@@ -16588,7 +16589,7 @@ Example:
|
|
|
16588
16589
|
return q !== d ? q > 1 && (A[q] = (A[q] || 0) + 1) : A[d] = (A[d] || 0) + 1, A;
|
|
16589
16590
|
}
|
|
16590
16591
|
var c = function(d, A) {
|
|
16591
|
-
var q = 0, g = 1, W = 1, R = 0, y = 0, w = 0, x = 1, N = 1, D = 0, B = 1, C = 1, X = 1,
|
|
16592
|
+
var q = 0, g = 1, W = 1, R = 0, y = 0, w = 0, x = 1, N = 1, D = 0, B = 1, C = 1, X = 1, P = 1e7, k;
|
|
16592
16593
|
if (d != null) if (A !== void 0) {
|
|
16593
16594
|
if (q = d, g = A, W = q * g, q % 1 !== 0 || g % 1 !== 0)
|
|
16594
16595
|
throw h();
|
|
@@ -16608,12 +16609,12 @@ Example:
|
|
|
16608
16609
|
if (d < 0 && (W = d, d = -d), d % 1 === 0)
|
|
16609
16610
|
q = d;
|
|
16610
16611
|
else if (d > 0) {
|
|
16611
|
-
for (d >= 1 && (N = Math.pow(10, Math.floor(1 + Math.log(d) / Math.LN10)), d /= N); B <=
|
|
16612
|
+
for (d >= 1 && (N = Math.pow(10, Math.floor(1 + Math.log(d) / Math.LN10)), d /= N); B <= P && X <= P; )
|
|
16612
16613
|
if (k = (D + C) / (B + X), d === k) {
|
|
16613
|
-
B + X <=
|
|
16614
|
+
B + X <= P ? (q = D + C, g = B + X) : X > B ? (q = C, g = X) : (q = D, g = B);
|
|
16614
16615
|
break;
|
|
16615
16616
|
} else
|
|
16616
|
-
d > k ? (D += C, B += X) : (C += D, X += B), B >
|
|
16617
|
+
d > k ? (D += C, B += X) : (C += D, X += B), B > P ? (q = C, g = X) : (q = D, g = B);
|
|
16617
16618
|
q *= N;
|
|
16618
16619
|
} else (isNaN(d) || isNaN(A)) && (g = q = NaN);
|
|
16619
16620
|
break;
|
|
@@ -17976,18 +17977,18 @@ Example:
|
|
|
17976
17977
|
var q, g, W, R, y = h.min(), w = h.max();
|
|
17977
17978
|
for (q = 0, g = O._size.length; q < g; q++)
|
|
17978
17979
|
Te(y[q], O._size[q]), Te(w[q], O._size[q]);
|
|
17979
|
-
var x = O._values, N = O._index, D = O._ptr, B = h.dimension(0), C = h.dimension(1), X = [],
|
|
17980
|
+
var x = O._values, N = O._index, D = O._ptr, B = h.dimension(0), C = h.dimension(1), X = [], P = [];
|
|
17980
17981
|
B.forEach(function(t0, Z) {
|
|
17981
|
-
|
|
17982
|
+
P[t0] = Z[0], X[t0] = !0;
|
|
17982
17983
|
});
|
|
17983
|
-
var k = x ? [] : void 0, S = [],
|
|
17984
|
+
var k = x ? [] : void 0, S = [], H = [];
|
|
17984
17985
|
return C.forEach(function(t0) {
|
|
17985
|
-
for (
|
|
17986
|
-
q = N[W], X[q] === !0 && (S.push(
|
|
17987
|
-
}),
|
|
17986
|
+
for (H.push(S.length), W = D[t0], R = D[t0 + 1]; W < R; W++)
|
|
17987
|
+
q = N[W], X[q] === !0 && (S.push(P[q]), k && k.push(x[W]));
|
|
17988
|
+
}), H.push(S.length), new i({
|
|
17988
17989
|
values: k,
|
|
17989
17990
|
index: S,
|
|
17990
|
-
ptr:
|
|
17991
|
+
ptr: H,
|
|
17991
17992
|
size: A,
|
|
17992
17993
|
datatype: O._datatype
|
|
17993
17994
|
});
|
|
@@ -18108,8 +18109,8 @@ Example:
|
|
|
18108
18109
|
var X = 0;
|
|
18109
18110
|
for (N = 0; N < w; N++) {
|
|
18110
18111
|
O._ptr[N] = O._ptr[N] - X;
|
|
18111
|
-
var
|
|
18112
|
-
for (D =
|
|
18112
|
+
var P = O._ptr[N], k = O._ptr[N + 1] - X;
|
|
18113
|
+
for (D = P; D < k; D++)
|
|
18113
18114
|
x = O._index[D], x > h - 1 && (O._values.splice(D, 1), O._index.splice(D, 1), X++);
|
|
18114
18115
|
}
|
|
18115
18116
|
O._ptr[N] = O._values.length;
|
|
@@ -18144,8 +18145,8 @@ Example:
|
|
|
18144
18145
|
for (var C = 0; C < q._ptr.length; C++)
|
|
18145
18146
|
q._ptr[C] = 0;
|
|
18146
18147
|
for (var X = 0; X < y.length; X++) {
|
|
18147
|
-
var
|
|
18148
|
-
M(
|
|
18148
|
+
var P = w[X], k = g[X], S = y[X], H = p(P, q._ptr[k], q._ptr[k + 1], q._index);
|
|
18149
|
+
M(H, P, k, S, q._values, q._index, q._ptr);
|
|
18149
18150
|
}
|
|
18150
18151
|
return q;
|
|
18151
18152
|
}, i.prototype.clone = function() {
|
|
@@ -18176,14 +18177,14 @@ Example:
|
|
|
18176
18177
|
w.push(R.length);
|
|
18177
18178
|
var C = O._ptr[B], X = O._ptr[B + 1];
|
|
18178
18179
|
if (W)
|
|
18179
|
-
for (var
|
|
18180
|
-
var k = O._index[
|
|
18181
|
-
k >= h && k <= d && D(O._values[
|
|
18180
|
+
for (var P = C; P < X; P++) {
|
|
18181
|
+
var k = O._index[P];
|
|
18182
|
+
k >= h && k <= d && D(O._values[P], k - h, B - A);
|
|
18182
18183
|
}
|
|
18183
18184
|
else {
|
|
18184
|
-
for (var S = {},
|
|
18185
|
-
var t0 = O._index[
|
|
18186
|
-
S[t0] = O._values[
|
|
18185
|
+
for (var S = {}, H = C; H < X; H++) {
|
|
18186
|
+
var t0 = O._index[H];
|
|
18187
|
+
S[t0] = O._values[H];
|
|
18187
18188
|
}
|
|
18188
18189
|
for (var Z = h; Z <= d; Z++) {
|
|
18189
18190
|
var o0 = Z in S ? S[Z] : 0;
|
|
@@ -18323,18 +18324,18 @@ Example:
|
|
|
18323
18324
|
D = function() {
|
|
18324
18325
|
return h;
|
|
18325
18326
|
};
|
|
18326
|
-
for (var C = [], X = [],
|
|
18327
|
-
|
|
18327
|
+
for (var C = [], X = [], P = [], k = 0; k < x; k++) {
|
|
18328
|
+
P.push(C.length);
|
|
18328
18329
|
var S = k - R;
|
|
18329
18330
|
if (S >= 0 && S < N) {
|
|
18330
|
-
var
|
|
18331
|
-
g(
|
|
18331
|
+
var H = D(S);
|
|
18332
|
+
g(H, W) || (X.push(S + y), C.push(H));
|
|
18332
18333
|
}
|
|
18333
18334
|
}
|
|
18334
|
-
return
|
|
18335
|
+
return P.push(C.length), new i({
|
|
18335
18336
|
values: C,
|
|
18336
18337
|
index: X,
|
|
18337
|
-
ptr:
|
|
18338
|
+
ptr: P,
|
|
18338
18339
|
size: [w, x]
|
|
18339
18340
|
});
|
|
18340
18341
|
}, i.prototype.swapRows = function(O, h) {
|
|
@@ -18774,20 +18775,20 @@ Example:
|
|
|
18774
18775
|
throw new RangeError("Dimension mismatch. Matrix A (" + b + ") must match Matrix B (" + O + ")");
|
|
18775
18776
|
var d = b[0], A = b[1], q, g = t, W = 0, R = o;
|
|
18776
18777
|
typeof M == "string" && M === h && M !== "mixed" && (q = M, g = e.find(t, [q, q]), W = e.convert(0, q), R = e.find(o, [q, q]));
|
|
18777
|
-
var y = a && l ? [] : void 0, w = [], x = [], N = y ? [] : void 0, D = y ? [] : void 0, B = [], C = [], X,
|
|
18778
|
-
for (
|
|
18779
|
-
x[
|
|
18780
|
-
var
|
|
18781
|
-
for (k = p[
|
|
18782
|
-
X = c[k], w.push(X), B[X] =
|
|
18783
|
-
for (k = f[
|
|
18784
|
-
X = u[k], B[X] !==
|
|
18778
|
+
var y = a && l ? [] : void 0, w = [], x = [], N = y ? [] : void 0, D = y ? [] : void 0, B = [], C = [], X, P, k, S;
|
|
18779
|
+
for (P = 0; P < A; P++) {
|
|
18780
|
+
x[P] = w.length;
|
|
18781
|
+
var H = P + 1;
|
|
18782
|
+
for (k = p[P], S = p[P + 1]; k < S; k++)
|
|
18783
|
+
X = c[k], w.push(X), B[X] = H, N && (N[X] = a[k]);
|
|
18784
|
+
for (k = f[P], S = f[P + 1]; k < S; k++)
|
|
18785
|
+
X = u[k], B[X] !== H && w.push(X), C[X] = H, D && (D[X] = l[k]);
|
|
18785
18786
|
if (y)
|
|
18786
|
-
for (k = x[
|
|
18787
|
+
for (k = x[P]; k < w.length; ) {
|
|
18787
18788
|
X = w[k];
|
|
18788
18789
|
var t0 = B[X], Z = C[X];
|
|
18789
|
-
if (t0 ===
|
|
18790
|
-
var o0 = t0 ===
|
|
18790
|
+
if (t0 === H || Z === H) {
|
|
18791
|
+
var o0 = t0 === H ? N[X] : W, b0 = Z === H ? D[X] : W, G = R(o0, b0);
|
|
18791
18792
|
g(G, W) ? w.splice(k, 1) : (y.push(G), k++);
|
|
18792
18793
|
}
|
|
18793
18794
|
}
|
|
@@ -18926,13 +18927,13 @@ Example:
|
|
|
18926
18927
|
throw new RangeError("Dimension mismatch. Matrix A (" + b + ") must match Matrix B (" + O + ")");
|
|
18927
18928
|
var d = b[0], A = b[1], q, g = t, W = 0, R = o;
|
|
18928
18929
|
typeof M == "string" && M === h && M !== "mixed" && (q = M, g = e.find(t, [q, q]), W = e.convert(0, q), R = e.find(o, [q, q]));
|
|
18929
|
-
var y = a && l ? [] : void 0, w = [], x = [], N = a && l ? [] : void 0, D = a && l ? [] : void 0, B = [], C = [], X,
|
|
18930
|
-
for (
|
|
18931
|
-
x[
|
|
18932
|
-
var t0 =
|
|
18933
|
-
for (S = p[
|
|
18930
|
+
var y = a && l ? [] : void 0, w = [], x = [], N = a && l ? [] : void 0, D = a && l ? [] : void 0, B = [], C = [], X, P, k, S, H;
|
|
18931
|
+
for (P = 0; P < A; P++) {
|
|
18932
|
+
x[P] = w.length;
|
|
18933
|
+
var t0 = P + 1;
|
|
18934
|
+
for (S = p[P], H = p[P + 1], k = S; k < H; k++)
|
|
18934
18935
|
X = c[k], w.push(X), B[X] = t0, N && (N[X] = a[k]);
|
|
18935
|
-
for (S = f[
|
|
18936
|
+
for (S = f[P], H = f[P + 1], k = S; k < H; k++)
|
|
18936
18937
|
if (X = u[k], B[X] === t0) {
|
|
18937
18938
|
if (N) {
|
|
18938
18939
|
var Z = R(N[X], l[k]);
|
|
@@ -18941,7 +18942,7 @@ Example:
|
|
|
18941
18942
|
} else
|
|
18942
18943
|
w.push(X), C[X] = t0, D && (D[X] = l[k]);
|
|
18943
18944
|
if (N && D)
|
|
18944
|
-
for (k = x[
|
|
18945
|
+
for (k = x[P]; k < w.length; )
|
|
18945
18946
|
X = w[k], B[X] === t0 ? (y[k] = N[X], k++) : C[X] === t0 ? (y[k] = D[X], k++) : w.splice(k, 1);
|
|
18946
18947
|
}
|
|
18947
18948
|
return x[A] = w.length, i.createSparseMatrix({
|
|
@@ -19054,17 +19055,17 @@ Example:
|
|
|
19054
19055
|
return l(W, R);
|
|
19055
19056
|
}
|
|
19056
19057
|
function l(W, R) {
|
|
19057
|
-
var y = 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],
|
|
19058
|
-
x && B && x === B && typeof x == "string" && x !== "mixed" && (
|
|
19059
|
-
for (var
|
|
19058
|
+
var y = 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], P, k = r, S = i;
|
|
19059
|
+
x && B && x === B && typeof x == "string" && x !== "mixed" && (P = x, k = e.find(r, [P, P]), S = e.find(i, [P, P]));
|
|
19060
|
+
for (var H = [], t0 = 0; t0 < X; t0++) {
|
|
19060
19061
|
for (var Z = S(y[0], N[0][t0]), o0 = 1; o0 < C; o0++)
|
|
19061
19062
|
Z = k(Z, S(y[o0], N[o0][t0]));
|
|
19062
|
-
|
|
19063
|
+
H[t0] = Z;
|
|
19063
19064
|
}
|
|
19064
19065
|
return W.createDenseMatrix({
|
|
19065
|
-
data:
|
|
19066
|
+
data: H,
|
|
19066
19067
|
size: [X],
|
|
19067
|
-
datatype: x === W._datatype && B === R._datatype ?
|
|
19068
|
+
datatype: x === W._datatype && B === R._datatype ? P : void 0
|
|
19068
19069
|
});
|
|
19069
19070
|
}
|
|
19070
19071
|
var u = e("_multiplyMatrixVector", {
|
|
@@ -19077,12 +19078,12 @@ Example:
|
|
|
19077
19078
|
"SparseMatrix, SparseMatrix": g
|
|
19078
19079
|
});
|
|
19079
19080
|
function O(W, R) {
|
|
19080
|
-
var y = 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,
|
|
19081
|
-
x && D && x === D && typeof x == "string" && x !== "mixed" && (X = x,
|
|
19082
|
-
for (var S = [],
|
|
19083
|
-
for (var t0 = y[
|
|
19084
|
-
Z =
|
|
19085
|
-
S[
|
|
19081
|
+
var y = 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, P = r, k = i;
|
|
19082
|
+
x && D && x === D && typeof x == "string" && x !== "mixed" && (X = x, P = e.find(r, [X, X]), k = e.find(i, [X, X]));
|
|
19083
|
+
for (var S = [], H = 0; H < B; H++) {
|
|
19084
|
+
for (var t0 = y[H], Z = k(t0[0], N[0]), o0 = 1; o0 < C; o0++)
|
|
19085
|
+
Z = P(Z, k(t0[o0], N[o0]));
|
|
19086
|
+
S[H] = Z;
|
|
19086
19087
|
}
|
|
19087
19088
|
return W.createDenseMatrix({
|
|
19088
19089
|
data: S,
|
|
@@ -19091,20 +19092,20 @@ Example:
|
|
|
19091
19092
|
});
|
|
19092
19093
|
}
|
|
19093
19094
|
function h(W, R) {
|
|
19094
|
-
var y = 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],
|
|
19095
|
-
x && B && x === B && typeof x == "string" && x !== "mixed" && x !== "mixed" && (k = x, S = e.find(r, [k, k]),
|
|
19095
|
+
var y = 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], P = D[1], k, S = r, H = i;
|
|
19096
|
+
x && B && x === B && typeof x == "string" && x !== "mixed" && x !== "mixed" && (k = x, S = e.find(r, [k, k]), H = e.find(i, [k, k]));
|
|
19096
19097
|
for (var t0 = [], Z = 0; Z < C; Z++) {
|
|
19097
19098
|
var o0 = y[Z];
|
|
19098
19099
|
t0[Z] = [];
|
|
19099
|
-
for (var b0 = 0; b0 <
|
|
19100
|
-
for (var G =
|
|
19101
|
-
G = S(G,
|
|
19100
|
+
for (var b0 = 0; b0 < P; b0++) {
|
|
19101
|
+
for (var G = H(o0[0], N[0][b0]), J = 1; J < X; J++)
|
|
19102
|
+
G = S(G, H(o0[J], N[J][b0]));
|
|
19102
19103
|
t0[Z][b0] = G;
|
|
19103
19104
|
}
|
|
19104
19105
|
}
|
|
19105
19106
|
return W.createDenseMatrix({
|
|
19106
19107
|
data: t0,
|
|
19107
|
-
size: [C,
|
|
19108
|
+
size: [C, P],
|
|
19108
19109
|
datatype: x === W._datatype && B === R._datatype ? k : void 0
|
|
19109
19110
|
});
|
|
19110
19111
|
}
|
|
@@ -19112,22 +19113,22 @@ Example:
|
|
|
19112
19113
|
var y = 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();
|
|
19113
19114
|
if (!N)
|
|
19114
19115
|
throw new Error("Cannot multiply Dense Matrix times Pattern only Matrix");
|
|
19115
|
-
var
|
|
19116
|
-
x && X && x === X && typeof x == "string" && x !== "mixed" && (S = x,
|
|
19116
|
+
var P = w[0], k = C[1], S, H = r, t0 = i, Z = n, o0 = 0;
|
|
19117
|
+
x && X && x === X && typeof x == "string" && x !== "mixed" && (S = x, H = e.find(r, [S, S]), t0 = e.find(i, [S, S]), Z = e.find(n, [S, S]), o0 = e.convert(0, S));
|
|
19117
19118
|
for (var b0 = [], G = [], J = [], Y = R.createSparseMatrix({
|
|
19118
19119
|
values: b0,
|
|
19119
19120
|
index: G,
|
|
19120
19121
|
ptr: J,
|
|
19121
|
-
size: [
|
|
19122
|
+
size: [P, k],
|
|
19122
19123
|
datatype: x === W._datatype && X === R._datatype ? S : void 0
|
|
19123
19124
|
}), c0 = 0; c0 < k; c0++) {
|
|
19124
19125
|
J[c0] = G.length;
|
|
19125
19126
|
var n0 = B[c0], m0 = B[c0 + 1];
|
|
19126
19127
|
if (m0 > n0)
|
|
19127
|
-
for (var y0 = 0, g0 = 0; g0 <
|
|
19128
|
+
for (var y0 = 0, g0 = 0; g0 < P; g0++) {
|
|
19128
19129
|
for (var x0 = g0 + 1, q0 = void 0, F = n0; F < m0; F++) {
|
|
19129
19130
|
var e0 = D[F];
|
|
19130
|
-
y0 !== x0 ? (q0 = t0(y[g0][e0], N[F]), y0 = x0) : q0 =
|
|
19131
|
+
y0 !== x0 ? (q0 = t0(y[g0][e0], N[F]), y0 = x0) : q0 = H(q0, t0(y[g0][e0], N[F]));
|
|
19131
19132
|
}
|
|
19132
19133
|
y0 === x0 && !Z(q0, o0) && (G.push(g0), b0.push(q0));
|
|
19133
19134
|
}
|
|
@@ -19138,8 +19139,8 @@ Example:
|
|
|
19138
19139
|
var y = W._values, w = W._index, x = W._ptr, N = W._datatype || W._data === void 0 ? W._datatype : W.getDataType();
|
|
19139
19140
|
if (!y)
|
|
19140
19141
|
throw new Error("Cannot multiply Pattern only Matrix times Dense Matrix");
|
|
19141
|
-
var D = R._data, B = R._datatype || R.getDataType(), C = W._size[0], X = R._size[0],
|
|
19142
|
-
N && B && N === B && typeof N == "string" && N !== "mixed" && (
|
|
19142
|
+
var D = R._data, B = R._datatype || R.getDataType(), C = W._size[0], X = R._size[0], P = [], k = [], S = [], H, t0 = r, Z = i, o0 = n, b0 = 0;
|
|
19143
|
+
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));
|
|
19143
19144
|
var G = [], J = [];
|
|
19144
19145
|
S[0] = 0;
|
|
19145
19146
|
for (var Y = 0; Y < X; Y++) {
|
|
@@ -19152,36 +19153,36 @@ Example:
|
|
|
19152
19153
|
}
|
|
19153
19154
|
for (var x0 = k.length, q0 = 0; q0 < x0; q0++) {
|
|
19154
19155
|
var F = k[q0];
|
|
19155
|
-
|
|
19156
|
+
P[q0] = G[F];
|
|
19156
19157
|
}
|
|
19157
19158
|
return S[1] = k.length, W.createSparseMatrix({
|
|
19158
|
-
values:
|
|
19159
|
+
values: P,
|
|
19159
19160
|
index: k,
|
|
19160
19161
|
ptr: S,
|
|
19161
19162
|
size: [C, 1],
|
|
19162
|
-
datatype: N === W._datatype && B === R._datatype ?
|
|
19163
|
+
datatype: N === W._datatype && B === R._datatype ? H : void 0
|
|
19163
19164
|
});
|
|
19164
19165
|
}
|
|
19165
19166
|
function q(W, R) {
|
|
19166
19167
|
var y = W._values, w = W._index, x = W._ptr, N = W._datatype || W._data === void 0 ? W._datatype : W.getDataType();
|
|
19167
19168
|
if (!y)
|
|
19168
19169
|
throw new Error("Cannot multiply Pattern only Matrix times Dense Matrix");
|
|
19169
|
-
var D = R._data, B = R._datatype || R.getDataType(), C = W._size[0], X = R._size[0],
|
|
19170
|
-
N && B && N === B && typeof N == "string" && N !== "mixed" && (k = N, S = e.find(r, [k, k]),
|
|
19170
|
+
var D = R._data, B = R._datatype || R.getDataType(), C = W._size[0], X = R._size[0], P = R._size[1], k, S = r, H = i, t0 = n, Z = 0;
|
|
19171
|
+
N && B && N === B && typeof N == "string" && N !== "mixed" && (k = N, S = e.find(r, [k, k]), H = e.find(i, [k, k]), t0 = e.find(n, [k, k]), Z = e.convert(0, k));
|
|
19171
19172
|
for (var o0 = [], b0 = [], G = [], J = W.createSparseMatrix({
|
|
19172
19173
|
values: o0,
|
|
19173
19174
|
index: b0,
|
|
19174
19175
|
ptr: G,
|
|
19175
|
-
size: [C,
|
|
19176
|
+
size: [C, P],
|
|
19176
19177
|
datatype: N === W._datatype && B === R._datatype ? k : void 0
|
|
19177
|
-
}), Y = [], c0 = [], n0 = 0; n0 <
|
|
19178
|
+
}), Y = [], c0 = [], n0 = 0; n0 < P; n0++) {
|
|
19178
19179
|
G[n0] = b0.length;
|
|
19179
19180
|
for (var m0 = n0 + 1, y0 = 0; y0 < X; y0++) {
|
|
19180
19181
|
var g0 = D[y0][n0];
|
|
19181
19182
|
if (!t0(g0, Z))
|
|
19182
19183
|
for (var x0 = x[y0], q0 = x[y0 + 1], F = x0; F < q0; F++) {
|
|
19183
19184
|
var e0 = w[F];
|
|
19184
|
-
c0[e0] !== m0 ? (c0[e0] = m0, b0.push(e0), Y[e0] =
|
|
19185
|
+
c0[e0] !== m0 ? (c0[e0] = m0, b0.push(e0), Y[e0] = H(g0, y[F])) : Y[e0] = S(Y[e0], H(g0, y[F]));
|
|
19185
19186
|
}
|
|
19186
19187
|
}
|
|
19187
19188
|
for (var a0 = G[n0], d0 = b0.length, D0 = a0; D0 < d0; D0++) {
|
|
@@ -19189,17 +19190,17 @@ Example:
|
|
|
19189
19190
|
o0[D0] = Y[I0];
|
|
19190
19191
|
}
|
|
19191
19192
|
}
|
|
19192
|
-
return G[
|
|
19193
|
+
return G[P] = b0.length, J;
|
|
19193
19194
|
}
|
|
19194
19195
|
function g(W, R) {
|
|
19195
|
-
var y = 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(),
|
|
19196
|
-
N && X && N === X && typeof N == "string" && N !== "mixed" && (
|
|
19196
|
+
var y = 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(), P = W._size[0], k = R._size[1], S = y && D, H, t0 = r, Z = i;
|
|
19197
|
+
N && X && N === X && typeof N == "string" && N !== "mixed" && (H = N, t0 = e.find(r, [H, H]), Z = e.find(i, [H, H]));
|
|
19197
19198
|
for (var o0 = S ? [] : void 0, b0 = [], G = [], J = W.createSparseMatrix({
|
|
19198
19199
|
values: o0,
|
|
19199
19200
|
index: b0,
|
|
19200
19201
|
ptr: G,
|
|
19201
|
-
size: [
|
|
19202
|
-
datatype: N === W._datatype && X === R._datatype ?
|
|
19202
|
+
size: [P, k],
|
|
19203
|
+
datatype: N === W._datatype && X === R._datatype ? H : void 0
|
|
19203
19204
|
}), Y = S ? [] : void 0, c0 = [], n0, m0, y0, g0, x0, q0, F, e0, a0 = 0; a0 < k; a0++) {
|
|
19204
19205
|
G[a0] = b0.length;
|
|
19205
19206
|
var d0 = a0 + 1;
|
|
@@ -20956,9 +20957,9 @@ Example:
|
|
|
20956
20957
|
for (w = 0; w < i; w++)
|
|
20957
20958
|
N[w] = N[x = M & x + g[w % R] + (W = N[w])], N[x] = W;
|
|
20958
20959
|
(y.g = function(D) {
|
|
20959
|
-
for (var B, C = 0, X = y.i,
|
|
20960
|
-
B = k[X = M & X + 1], C = C * i + k[M & (k[X] = k[
|
|
20961
|
-
return y.i = X, y.j =
|
|
20960
|
+
for (var B, C = 0, X = y.i, P = y.j, k = y.S; D--; )
|
|
20961
|
+
B = k[X = M & X + 1], C = C * i + k[M & (k[X] = k[P = M & P + B]) + (k[P] = B)];
|
|
20962
|
+
return y.i = X, y.j = P, C;
|
|
20962
20963
|
})(i);
|
|
20963
20964
|
}
|
|
20964
20965
|
function O(g, W) {
|
|
@@ -23331,10 +23332,10 @@ ${f}`), f;
|
|
|
23331
23332
|
if ((A == null ? void 0 : A.get(h)) || (q == null || q.set(h, g), A == null || A.set(h, g)), d != null && d.has(h)) {
|
|
23332
23333
|
const D = ne(O.tickerid), B = ne(i);
|
|
23333
23334
|
let C = V0(n, l, D) * 1e3;
|
|
23334
|
-
const X = V0(b, l, B) * 1e3, { index:
|
|
23335
|
+
const X = V0(b, l, B) * 1e3, { index: P = 0, periodStamp: k = X } = this._reqCacheData[r] || {}, { list: S } = (d == null ? void 0 : d.get(h)) || {};
|
|
23335
23336
|
if (!S.length)
|
|
23336
23337
|
return;
|
|
23337
|
-
const
|
|
23338
|
+
const H = S.slice(P);
|
|
23338
23339
|
let t0 = l, Z = D ? l : k + t0;
|
|
23339
23340
|
D ? t0 = u : f && Z > f && (Z = f);
|
|
23340
23341
|
const o0 = S.length - 1;
|
|
@@ -23348,24 +23349,24 @@ ${f}`), f;
|
|
|
23348
23349
|
if (C > k) {
|
|
23349
23350
|
let G;
|
|
23350
23351
|
if (c ? G = this._lookaheadOnHandle(
|
|
23351
|
-
|
|
23352
|
+
H,
|
|
23352
23353
|
n,
|
|
23353
23354
|
Z,
|
|
23354
23355
|
C,
|
|
23355
23356
|
b0,
|
|
23356
|
-
|
|
23357
|
+
P,
|
|
23357
23358
|
k,
|
|
23358
23359
|
r,
|
|
23359
23360
|
t0,
|
|
23360
23361
|
a,
|
|
23361
23362
|
B
|
|
23362
23363
|
) : G = this._lookaheadOffHandle(
|
|
23363
|
-
|
|
23364
|
+
H,
|
|
23364
23365
|
n,
|
|
23365
23366
|
Z,
|
|
23366
23367
|
C,
|
|
23367
23368
|
b0,
|
|
23368
|
-
|
|
23369
|
+
P,
|
|
23369
23370
|
k,
|
|
23370
23371
|
r,
|
|
23371
23372
|
t0,
|
|
@@ -23375,10 +23376,10 @@ ${f}`), f;
|
|
|
23375
23376
|
), G) return G;
|
|
23376
23377
|
if (G === null) return;
|
|
23377
23378
|
} else if (c)
|
|
23378
|
-
for (const [G, J] of
|
|
23379
|
+
for (const [G, J] of H.entries()) {
|
|
23379
23380
|
let { time: Y, barIndex: c0, openTime: n0, nextBarTime: m0 } = J;
|
|
23380
|
-
Y = Y * 1e3, m0 = m0 * 1e3 || (B ? Y : ((R =
|
|
23381
|
-
const y0 = c0 ||
|
|
23381
|
+
Y = Y * 1e3, m0 = m0 * 1e3 || (B ? Y : ((R = H[G + 1]) == null ? void 0 : R.time) * 1e3 || Y + C), B && (Y = n0);
|
|
23382
|
+
const y0 = c0 || P + G;
|
|
23382
23383
|
if (Y >= Z) {
|
|
23383
23384
|
this._reqCacheData[r] = {
|
|
23384
23385
|
index: y0,
|
|
@@ -23392,17 +23393,17 @@ ${f}`), f;
|
|
|
23392
23393
|
periodStamp: k
|
|
23393
23394
|
}, I(K(I({}, J), {
|
|
23394
23395
|
barIndex: y0,
|
|
23395
|
-
nextBarTime: (y =
|
|
23396
|
+
nextBarTime: (y = H[G + 1]) == null ? void 0 : y.time
|
|
23396
23397
|
}), b0);
|
|
23397
23398
|
}
|
|
23398
23399
|
else
|
|
23399
|
-
for (const [G, J] of
|
|
23400
|
+
for (const [G, J] of H.entries()) {
|
|
23400
23401
|
let { time: Y, barIndex: c0, openTime: n0 } = J;
|
|
23401
23402
|
Y = Y * 1e3;
|
|
23402
23403
|
const m0 = B ? Y : Y + C;
|
|
23403
23404
|
B && (Y = n0);
|
|
23404
|
-
const y0 = B ? m0 : ((w =
|
|
23405
|
-
let g0 = c0 ||
|
|
23405
|
+
const y0 = B ? m0 : ((w = H[G + 1]) == null ? void 0 : w.time) * 1e3 || m0;
|
|
23406
|
+
let g0 = c0 || P + G;
|
|
23406
23407
|
if (Y > Z) {
|
|
23407
23408
|
this._reqCacheData[r] = {
|
|
23408
23409
|
index: g0,
|
|
@@ -23416,7 +23417,7 @@ ${f}`), f;
|
|
|
23416
23417
|
periodStamp: k
|
|
23417
23418
|
}, I(K(I({}, J), {
|
|
23418
23419
|
barIndex: g0,
|
|
23419
|
-
nextBarTime: (x =
|
|
23420
|
+
nextBarTime: (x = H[G + 1]) == null ? void 0 : x.time
|
|
23420
23421
|
}), b0);
|
|
23421
23422
|
if (Y >= t0 && Y <= Z && g0 === b0.lastBarIndex)
|
|
23422
23423
|
return this._reqCacheData[r] = {
|
|
@@ -23424,7 +23425,7 @@ ${f}`), f;
|
|
|
23424
23425
|
periodStamp: k
|
|
23425
23426
|
}, I(K(I({}, J), {
|
|
23426
23427
|
barIndex: g0,
|
|
23427
|
-
nextBarTime: (N =
|
|
23428
|
+
nextBarTime: (N = H[G + 1]) == null ? void 0 : N.time
|
|
23428
23429
|
}), b0);
|
|
23429
23430
|
}
|
|
23430
23431
|
this._reqCacheData[r] = {
|
|
@@ -23906,7 +23907,7 @@ ${f}`), f;
|
|
|
23906
23907
|
};
|
|
23907
23908
|
}
|
|
23908
23909
|
fill(t, r) {
|
|
23909
|
-
var w, x, N, D, B, C, X,
|
|
23910
|
+
var w, x, N, D, B, C, X, P;
|
|
23910
23911
|
const i = ["color"];
|
|
23911
23912
|
C0(t, i);
|
|
23912
23913
|
const y = t, { color: n, transp: o = 90, seriesColors: a, hline1: c, hline2: p, plot1: b, plot2: M } = y, l = U0(y, ["color", "transp", "seriesColors", "hline1", "hline2", "plot1", "plot2"]);
|
|
@@ -23917,15 +23918,15 @@ ${f}`), f;
|
|
|
23917
23918
|
if (c && p)
|
|
23918
23919
|
g = (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";
|
|
23919
23920
|
else {
|
|
23920
|
-
const k = this._plots.get(b == null ? void 0 : b.key), S = this._plots.get(M == null ? void 0 : M.key),
|
|
23921
|
-
if (g = (D = (N =
|
|
23921
|
+
const k = this._plots.get(b == null ? void 0 : b.key), S = this._plots.get(M == null ? void 0 : M.key), H = (k == null ? void 0 : k.data) || [], t0 = (S == null ? void 0 : S.data) || [];
|
|
23922
|
+
if (g = (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) {
|
|
23922
23923
|
const Z = (k == null ? void 0 : k.force_overlay) && (S == null ? void 0 : S.force_overlay);
|
|
23923
23924
|
(k != null && k.force_overlay || S != null && S.force_overlay) && !Z ? this._errorListener.addError(er.plotFillForceOverlayErr, r, ke.Error) : l.force_overlay = Z;
|
|
23924
23925
|
}
|
|
23925
23926
|
}
|
|
23926
23927
|
if (A[f] = { time: O, color: u, barIndex: f, plot1: g, plot2: W }, this._seriesColorHandle(t, i, d), !d) {
|
|
23927
23928
|
this._count++;
|
|
23928
|
-
const k = ((X = this._options.indicator) == null ? void 0 : X.explicit_plot_zorder) || ((
|
|
23929
|
+
const k = ((X = this._options.indicator) == null ? void 0 : X.explicit_plot_zorder) || ((P = this._options.strategy) == null ? void 0 : P.explicit_plot_zorder), S = u ? [u] : void 0;
|
|
23929
23930
|
this._fills.set(h, K(I({
|
|
23930
23931
|
id: h,
|
|
23931
23932
|
colors: S,
|
|
@@ -24291,18 +24292,18 @@ ${f}`), f;
|
|
|
24291
24292
|
symbol: B = "",
|
|
24292
24293
|
timeframe: C,
|
|
24293
24294
|
id: X,
|
|
24294
|
-
calc_bars_count:
|
|
24295
|
+
calc_bars_count: P,
|
|
24295
24296
|
ignore_invalid_symbol: k,
|
|
24296
24297
|
originTimeframe: S
|
|
24297
24298
|
} = D;
|
|
24298
|
-
let
|
|
24299
|
+
let H = 0;
|
|
24299
24300
|
const { list: t0, endTime: Z } = (p == null ? void 0 : p.get(X)) || {};
|
|
24300
|
-
t0 && (
|
|
24301
|
-
const o0 = ne(B) || Ci(B), [b0, G] = B.split(":"), J = Number(S) <= 60 ? 1e4 : 5e3, Y =
|
|
24301
|
+
t0 && (H = Z);
|
|
24302
|
+
const o0 = ne(B) || Ci(B), [b0, G] = B.split(":"), J = Number(S) <= 60 ? 1e4 : 5e3, Y = P ? P <= 1e5 ? P : 1e5 : J, c0 = {
|
|
24302
24303
|
exchange: G ? b0 : "X",
|
|
24303
24304
|
symbol: G || b0,
|
|
24304
24305
|
limit: Y,
|
|
24305
|
-
start:
|
|
24306
|
+
start: H,
|
|
24306
24307
|
end: 0,
|
|
24307
24308
|
period: C
|
|
24308
24309
|
}, n0 = `${c0.exchange}:${c0.symbol}:${C}`;
|
|
@@ -24311,7 +24312,7 @@ ${f}`), f;
|
|
|
24311
24312
|
key: n0,
|
|
24312
24313
|
ignore_invalid_symbol: k,
|
|
24313
24314
|
currentDataList: t0,
|
|
24314
|
-
startTime:
|
|
24315
|
+
startTime: H,
|
|
24315
24316
|
isFutures: o0,
|
|
24316
24317
|
timeframe: C
|
|
24317
24318
|
}), o0 ? R.push(ea(c0)) : R.push(Jo({ params: [c0] }));
|
|
@@ -24319,10 +24320,10 @@ ${f}`), f;
|
|
|
24319
24320
|
const w = yield Promise.all(R), x = self.workerStorage.get(`request_${l}_pre_data`) || /* @__PURE__ */ new Map();
|
|
24320
24321
|
for (const [N, D] of w.entries()) {
|
|
24321
24322
|
const { code: B, data: C, msg: X } = D, {
|
|
24322
|
-
id:
|
|
24323
|
+
id: P,
|
|
24323
24324
|
key: k,
|
|
24324
24325
|
ignore_invalid_symbol: S,
|
|
24325
|
-
currentDataList:
|
|
24326
|
+
currentDataList: H = [],
|
|
24326
24327
|
startTime: t0,
|
|
24327
24328
|
isFutures: Z,
|
|
24328
24329
|
timeframe: o0
|
|
@@ -24354,18 +24355,18 @@ ${f}`), f;
|
|
|
24354
24355
|
G,
|
|
24355
24356
|
m0
|
|
24356
24357
|
);
|
|
24357
|
-
Di(Y, g0), x0 && x.set(
|
|
24358
|
+
Di(Y, g0), x0 && x.set(P, x0);
|
|
24358
24359
|
}
|
|
24359
|
-
const c0 = b == null ? void 0 : b.get(
|
|
24360
|
+
const c0 = b == null ? void 0 : b.get(P);
|
|
24360
24361
|
if (c0) {
|
|
24361
24362
|
const n0 = Number(J) || 1e-5;
|
|
24362
24363
|
c0.mintick = n0;
|
|
24363
24364
|
}
|
|
24364
|
-
Y.length && (Y[Y.length - 1].isrealtime = !0), Di(
|
|
24365
|
-
list:
|
|
24365
|
+
Y.length && (Y[Y.length - 1].isrealtime = !0), Di(H, Y), p == null || p.set(P, {
|
|
24366
|
+
list: H,
|
|
24366
24367
|
session: b0,
|
|
24367
24368
|
timezone: G,
|
|
24368
|
-
endTime: (g =
|
|
24369
|
+
endTime: (g = H[H.length - 2]) == null ? void 0 : g.time
|
|
24369
24370
|
});
|
|
24370
24371
|
}
|
|
24371
24372
|
self.workerStorage.set(`request_${l}_pre_data`, x), c == null || c.clear();
|
|
@@ -24373,11 +24374,11 @@ ${f}`), f;
|
|
|
24373
24374
|
let f = !1;
|
|
24374
24375
|
for (const [R, y] of o) {
|
|
24375
24376
|
if (!y || y.isRun) continue;
|
|
24376
|
-
const W = y, { 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:
|
|
24377
|
+
const W = y, { 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: P, timezone: k } = (p == null ? void 0 : p.get(N)) || {};
|
|
24377
24378
|
y.isRun = !0;
|
|
24378
24379
|
const {
|
|
24379
24380
|
logs: S = [],
|
|
24380
|
-
errors:
|
|
24381
|
+
errors: H = [],
|
|
24381
24382
|
cacheData: t0
|
|
24382
24383
|
} = (yield e.request.runScripts(
|
|
24383
24384
|
w,
|
|
@@ -24386,7 +24387,7 @@ ${f}`), f;
|
|
|
24386
24387
|
X,
|
|
24387
24388
|
Object.assign(B, {
|
|
24388
24389
|
mintick: (C == null ? void 0 : C.mintick) || 1e-5,
|
|
24389
|
-
session:
|
|
24390
|
+
session: P,
|
|
24390
24391
|
timezone: k,
|
|
24391
24392
|
inputs: u
|
|
24392
24393
|
}),
|
|
@@ -24396,7 +24397,7 @@ ${f}`), f;
|
|
|
24396
24397
|
f = !0, t0 && (M.requestCacheData[R] = t0, Object.assign(
|
|
24397
24398
|
M.requestCacheData,
|
|
24398
24399
|
t0.requestCacheData || {}
|
|
24399
|
-
), t0.requestCacheData = {}), e.log.mergeLogs(S), e.addErrors(
|
|
24400
|
+
), t0.requestCacheData = {}), e.log.mergeLogs(S), e.addErrors(H, R);
|
|
24400
24401
|
}
|
|
24401
24402
|
if (n && f) {
|
|
24402
24403
|
e.log.clearLogForIndex(n.barIndex), s.__isReqRepeated = !0, eo(
|
|
@@ -24443,11 +24444,11 @@ ${f}`), f;
|
|
|
24443
24444
|
} = (c == null ? void 0 : c.get(g)) || {};
|
|
24444
24445
|
if (N.length) {
|
|
24445
24446
|
let X = N.length - 1;
|
|
24446
|
-
const
|
|
24447
|
+
const P = N[X];
|
|
24447
24448
|
if (x) {
|
|
24448
24449
|
const J = l.get(g), { newLines: Y, preData: c0 } = Ws(
|
|
24449
24450
|
y,
|
|
24450
|
-
|
|
24451
|
+
P,
|
|
24451
24452
|
w,
|
|
24452
24453
|
!0,
|
|
24453
24454
|
((J == null ? void 0 : J.date) || 0) - 1,
|
|
@@ -24458,7 +24459,7 @@ ${f}`), f;
|
|
|
24458
24459
|
);
|
|
24459
24460
|
y = Y, l.set(g, c0);
|
|
24460
24461
|
}
|
|
24461
|
-
const k =
|
|
24462
|
+
const k = P.time;
|
|
24462
24463
|
if (y = y.filter((J) => J.time >= k), !y.length) continue;
|
|
24463
24464
|
const S = (f = y[0]) == null ? void 0 : f.time;
|
|
24464
24465
|
if (S === k) {
|
|
@@ -24468,13 +24469,13 @@ ${f}`), f;
|
|
|
24468
24469
|
for (const J of y)
|
|
24469
24470
|
X += 1, J.barindex = X;
|
|
24470
24471
|
y[y.length - 1].isrealtime = !0;
|
|
24471
|
-
const
|
|
24472
|
+
const H = ((O = b == null ? void 0 : b.get(g)) == null ? void 0 : O.mintick) || 1e-5;
|
|
24472
24473
|
if (c == null || c.set(g, {
|
|
24473
24474
|
list: N.concat(y),
|
|
24474
24475
|
session: D,
|
|
24475
24476
|
timezone: B,
|
|
24476
24477
|
endTime: C
|
|
24477
|
-
}), S > k && y.unshift(Object.assign(
|
|
24478
|
+
}), S > k && y.unshift(Object.assign(P, { isrealtime: !1 })), !n[h]) continue;
|
|
24478
24479
|
const { varCacheData: t0, funcCacheData: Z } = n[h] || {}, {
|
|
24479
24480
|
logs: o0 = [],
|
|
24480
24481
|
errors: b0 = [],
|
|
@@ -24489,7 +24490,7 @@ ${f}`), f;
|
|
|
24489
24490
|
timezone: B,
|
|
24490
24491
|
varCacheData: t0,
|
|
24491
24492
|
funcCacheData: Z,
|
|
24492
|
-
mintick:
|
|
24493
|
+
mintick: H,
|
|
24493
24494
|
inputs: a
|
|
24494
24495
|
}),
|
|
24495
24496
|
q,
|
|
@@ -24521,7 +24522,7 @@ ${f}`), f;
|
|
|
24521
24522
|
}
|
|
24522
24523
|
function JI(s, e, t) {
|
|
24523
24524
|
return I1(this, null, function* () {
|
|
24524
|
-
var D, B, C, X,
|
|
24525
|
+
var D, B, C, X, P, k;
|
|
24525
24526
|
const {
|
|
24526
24527
|
data: r,
|
|
24527
24528
|
isPreParser: i,
|
|
@@ -24553,10 +24554,10 @@ ${f}`), f;
|
|
|
24553
24554
|
if (!t && h) {
|
|
24554
24555
|
const {
|
|
24555
24556
|
funcCacheData: S,
|
|
24556
|
-
varCacheData:
|
|
24557
|
+
varCacheData: H,
|
|
24557
24558
|
requestCacheData: t0
|
|
24558
24559
|
} = h;
|
|
24559
|
-
y = t0, q.setVarCacheData(
|
|
24560
|
+
y = t0, q.setVarCacheData(H), W.setFuncCacheData(S);
|
|
24560
24561
|
} else
|
|
24561
24562
|
y.requestPreData = (B = (D = h == null ? void 0 : h.requestCacheData) == null ? void 0 : D.requestPreData) != null ? B : [], y.requestData = (X = (C = h == null ? void 0 : h.requestCacheData) == null ? void 0 : C.requestData) != null ? X : [], h = A;
|
|
24562
24563
|
A.requestCacheData = y, self.workerStorage.set(`request_${u}`, new Map(y.request)), self.workerStorage.set(
|
|
@@ -24583,7 +24584,7 @@ ${f}`), f;
|
|
|
24583
24584
|
else if (r && r.length) {
|
|
24584
24585
|
const S = r.length - 1;
|
|
24585
24586
|
q.__isFirstRun = t, q.updateOptions({ interval: o, mintick: d, chart: c, syminfo: n }), W.updateOptions({ inputs: a, strategy: p });
|
|
24586
|
-
const
|
|
24587
|
+
const H = self.workerStorage.get(`request_${u}_tmp`), t0 = self.workerStorage.get(`request_${u}_data`), Z = self.workerStorage.get(`request_${u}`), o0 = Date.now();
|
|
24587
24588
|
try {
|
|
24588
24589
|
let b0;
|
|
24589
24590
|
const G = self.workerStorage.get(`request_${u}_list`);
|
|
@@ -24615,7 +24616,7 @@ ${f}`), f;
|
|
|
24615
24616
|
b0,
|
|
24616
24617
|
Z,
|
|
24617
24618
|
{ newCacheData: A, cacheData: h, id: u, inputs: a },
|
|
24618
|
-
|
|
24619
|
+
H,
|
|
24619
24620
|
t0,
|
|
24620
24621
|
G
|
|
24621
24622
|
);
|
|
@@ -24625,7 +24626,7 @@ ${f}`), f;
|
|
|
24625
24626
|
barIndex: c0 || J,
|
|
24626
24627
|
lastBarIndex: r[S].barindex || S,
|
|
24627
24628
|
lastBarTime: r[S].time,
|
|
24628
|
-
preBarTime: (
|
|
24629
|
+
preBarTime: (P = r[J - 1]) == null ? void 0 : P.time,
|
|
24629
24630
|
nextBarTime: (k = r[J + 1]) == null ? void 0 : k.time
|
|
24630
24631
|
}), eo(
|
|
24631
24632
|
q,
|
|
@@ -24634,7 +24635,7 @@ ${f}`), f;
|
|
|
24634
24635
|
R,
|
|
24635
24636
|
b,
|
|
24636
24637
|
b0,
|
|
24637
|
-
|
|
24638
|
+
H
|
|
24638
24639
|
);
|
|
24639
24640
|
const m0 = W.errors;
|
|
24640
24641
|
if (m0.length && m0.some((y0) => y0.type === ke.Error))
|
|
@@ -24643,7 +24644,7 @@ ${f}`), f;
|
|
|
24643
24644
|
errors: G0.uniqBy(m0, "startLineNumber")
|
|
24644
24645
|
};
|
|
24645
24646
|
}
|
|
24646
|
-
if (
|
|
24647
|
+
if (H != null && H.size) {
|
|
24647
24648
|
const J = yield M3(
|
|
24648
24649
|
q,
|
|
24649
24650
|
W,
|
|
@@ -24653,7 +24654,7 @@ ${f}`), f;
|
|
|
24653
24654
|
b0,
|
|
24654
24655
|
Z,
|
|
24655
24656
|
{ newCacheData: A, cacheData: h, id: u, inputs: a },
|
|
24656
|
-
|
|
24657
|
+
H,
|
|
24657
24658
|
t0,
|
|
24658
24659
|
G
|
|
24659
24660
|
);
|
|
@@ -24739,12 +24740,12 @@ ${f}`), f;
|
|
|
24739
24740
|
symbol: B = "",
|
|
24740
24741
|
timeframe: C,
|
|
24741
24742
|
id: X,
|
|
24742
|
-
ignore_invalid_symbol:
|
|
24743
|
+
ignore_invalid_symbol: P,
|
|
24743
24744
|
originTimeframe: k
|
|
24744
24745
|
} = D;
|
|
24745
24746
|
let S = 0;
|
|
24746
|
-
const { list:
|
|
24747
|
-
|
|
24747
|
+
const { list: H, endTime: t0 } = (p == null ? void 0 : p.get(X)) || {};
|
|
24748
|
+
H && (S = t0);
|
|
24748
24749
|
const Z = ne(B) || Ci(B), [o0, b0] = B.split(":"), G = Number(k) <= 60 ? 1e4 : 5e3, J = {
|
|
24749
24750
|
exchange: b0 ? o0 : "X",
|
|
24750
24751
|
symbol: b0 || o0,
|
|
@@ -24756,8 +24757,8 @@ ${f}`), f;
|
|
|
24756
24757
|
y.push({
|
|
24757
24758
|
id: X,
|
|
24758
24759
|
key: Y,
|
|
24759
|
-
ignore_invalid_symbol:
|
|
24760
|
-
currentDataList:
|
|
24760
|
+
ignore_invalid_symbol: P,
|
|
24761
|
+
currentDataList: H,
|
|
24761
24762
|
startTime: S,
|
|
24762
24763
|
isFutures: Z,
|
|
24763
24764
|
timeframe: C
|
|
@@ -24766,10 +24767,10 @@ ${f}`), f;
|
|
|
24766
24767
|
const w = yield Promise.all(R), x = self.workerStorage.get(`request_${l}_pre_data`) || /* @__PURE__ */ new Map();
|
|
24767
24768
|
for (const [N, D] of w.entries()) {
|
|
24768
24769
|
const { code: B, data: C, msg: X } = D, {
|
|
24769
|
-
id:
|
|
24770
|
+
id: P,
|
|
24770
24771
|
key: k,
|
|
24771
24772
|
ignore_invalid_symbol: S,
|
|
24772
|
-
currentDataList:
|
|
24773
|
+
currentDataList: H = [],
|
|
24773
24774
|
startTime: t0,
|
|
24774
24775
|
isFutures: Z,
|
|
24775
24776
|
timeframe: o0
|
|
@@ -24801,18 +24802,18 @@ ${f}`), f;
|
|
|
24801
24802
|
G,
|
|
24802
24803
|
m0
|
|
24803
24804
|
);
|
|
24804
|
-
Di(Y, g0), x0 && x.set(
|
|
24805
|
+
Di(Y, g0), x0 && x.set(P, x0);
|
|
24805
24806
|
}
|
|
24806
|
-
const c0 = b == null ? void 0 : b.get(
|
|
24807
|
+
const c0 = b == null ? void 0 : b.get(P);
|
|
24807
24808
|
if (c0) {
|
|
24808
24809
|
const n0 = Number(J) || 1e-5;
|
|
24809
24810
|
c0.mintick = n0;
|
|
24810
24811
|
}
|
|
24811
|
-
Y.length && (Y[Y.length - 1].isrealtime = !0), Di(
|
|
24812
|
-
list:
|
|
24812
|
+
Y.length && (Y[Y.length - 1].isrealtime = !0), Di(H, Y), p == null || p.set(P, {
|
|
24813
|
+
list: H,
|
|
24813
24814
|
session: b0,
|
|
24814
24815
|
timezone: G,
|
|
24815
|
-
endTime: (g =
|
|
24816
|
+
endTime: (g = H[H.length - 2]) == null ? void 0 : g.time
|
|
24816
24817
|
});
|
|
24817
24818
|
}
|
|
24818
24819
|
self.workerStorage.set(`request_${l}_pre_data`, x), c == null || c.clear();
|
|
@@ -24820,16 +24821,16 @@ ${f}`), f;
|
|
|
24820
24821
|
let f = !1;
|
|
24821
24822
|
for (const [R, y] of o) {
|
|
24822
24823
|
if (!y || y.isRun) continue;
|
|
24823
|
-
const W = y, { 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:
|
|
24824
|
+
const W = y, { 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: P, timezone: k } = (p == null ? void 0 : p.get(N)) || {}, { errors: S = [], cacheData: H } = e.runScripts(
|
|
24824
24825
|
w,
|
|
24825
24826
|
R,
|
|
24826
24827
|
!0,
|
|
24827
24828
|
X,
|
|
24828
|
-
Object.assign(B, { mintick: (C == null ? void 0 : C.mintick) || 1e-5, session:
|
|
24829
|
+
Object.assign(B, { mintick: (C == null ? void 0 : C.mintick) || 1e-5, session: P, timezone: k, inputs: u }),
|
|
24829
24830
|
x,
|
|
24830
24831
|
D
|
|
24831
24832
|
) || {};
|
|
24832
|
-
y.isRun = !0, f = !0, M.requestCacheData[R] =
|
|
24833
|
+
y.isRun = !0, f = !0, M.requestCacheData[R] = H, e.addErrors(S, R);
|
|
24833
24834
|
}
|
|
24834
24835
|
if (n && f) {
|
|
24835
24836
|
s.__isReqRepeated = !0, eo(
|
|
@@ -24870,11 +24871,11 @@ ${f}`), f;
|
|
|
24870
24871
|
const { list: N, session: D, timezone: B, endTime: C } = (c == null ? void 0 : c.get(g)) || {};
|
|
24871
24872
|
if (N.length) {
|
|
24872
24873
|
let X = N.length - 1;
|
|
24873
|
-
const
|
|
24874
|
+
const P = N[X];
|
|
24874
24875
|
if (x) {
|
|
24875
24876
|
const G = l.get(g), { newLines: J, preData: Y } = Ws(
|
|
24876
24877
|
y,
|
|
24877
|
-
|
|
24878
|
+
P,
|
|
24878
24879
|
w,
|
|
24879
24880
|
!0,
|
|
24880
24881
|
((G == null ? void 0 : G.date) || 0) - 1,
|
|
@@ -24885,7 +24886,7 @@ ${f}`), f;
|
|
|
24885
24886
|
);
|
|
24886
24887
|
y = J, l.set(g, Y);
|
|
24887
24888
|
}
|
|
24888
|
-
const k =
|
|
24889
|
+
const k = P.time;
|
|
24889
24890
|
if (y = y.filter((G) => G.time >= k), !y.length) continue;
|
|
24890
24891
|
const S = (f = y[0]) == null ? void 0 : f.time;
|
|
24891
24892
|
if (S === k) {
|
|
@@ -24896,13 +24897,13 @@ ${f}`), f;
|
|
|
24896
24897
|
X += 1, G.barindex = X;
|
|
24897
24898
|
if (!y.length) continue;
|
|
24898
24899
|
y[y.length - 1].isrealtime = !0;
|
|
24899
|
-
const
|
|
24900
|
+
const H = ((O = b == null ? void 0 : b.get(g)) == null ? void 0 : O.mintick) || 1e-5;
|
|
24900
24901
|
if (c == null || c.set(g, {
|
|
24901
24902
|
list: N.concat(y),
|
|
24902
24903
|
session: D,
|
|
24903
24904
|
timezone: B,
|
|
24904
24905
|
endTime: C
|
|
24905
|
-
}), S > k && y.unshift(Object.assign(
|
|
24906
|
+
}), S > k && y.unshift(Object.assign(P, { isrealtime: !1 })), !n[h]) continue;
|
|
24906
24907
|
const { varCacheData: t0, funcCacheData: Z } = n[h] || {}, { errors: o0 = [], cacheData: b0 } = t.runScripts(
|
|
24907
24908
|
A,
|
|
24908
24909
|
h,
|
|
@@ -24913,7 +24914,7 @@ ${f}`), f;
|
|
|
24913
24914
|
timezone: B,
|
|
24914
24915
|
varCacheData: t0,
|
|
24915
24916
|
funcCacheData: Z,
|
|
24916
|
-
mintick:
|
|
24917
|
+
mintick: H,
|
|
24917
24918
|
inputs: a
|
|
24918
24919
|
}),
|
|
24919
24920
|
q,
|
|
@@ -25201,10 +25202,10 @@ ${f}`), f;
|
|
|
25201
25202
|
maxprofit_percent_long: B = 0,
|
|
25202
25203
|
maxprofit_percent_short: C = 0,
|
|
25203
25204
|
maxloss_percent_long: X = 0,
|
|
25204
|
-
maxloss_percent_short:
|
|
25205
|
+
maxloss_percent_short: P = 0,
|
|
25205
25206
|
hold_long_k_count: k = 0,
|
|
25206
25207
|
hold_short_k_count: S = 0,
|
|
25207
|
-
hold_profit_long_k_count:
|
|
25208
|
+
hold_profit_long_k_count: H = 0,
|
|
25208
25209
|
hold_profit_short_k_count: t0 = 0,
|
|
25209
25210
|
hold_loss_long_k_count: Z = 0,
|
|
25210
25211
|
hold_loss_short_k_count: o0 = 0,
|
|
@@ -25212,7 +25213,7 @@ ${f}`), f;
|
|
|
25212
25213
|
shapeRatioType: G = "NONE"
|
|
25213
25214
|
} = this._preHistoryOrderCalcResult;
|
|
25214
25215
|
const { profit: J = 0, profit_percent: Y = 0, in_index: c0 = 0, out_index: n0 = 0, commission: m0 = 0, direction: y0, in_time: g0 = 0, out_time: x0 = 0, total_profit: q0 = 0 } = e, F = n0 - c0 + 1;
|
|
25215
|
-
if (y0 === w1.long ? (i += J, o += 1, c += Y, R += m0, k += F, J > 0 ? (l += Y, g += 1, h += J,
|
|
25216
|
+
if (y0 === w1.long ? (i += J, o += 1, c += Y, R += m0, k += F, J > 0 ? (l += Y, g += 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, y += m0, S += 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), P = Math.min(P, Y))), !b0) {
|
|
25216
25217
|
const I0 = this._createBalanceByInterval(g0, Date.now());
|
|
25217
25218
|
b0 = I0.balanceByInterval, G = I0.shapeRatioType;
|
|
25218
25219
|
}
|
|
@@ -25252,10 +25253,10 @@ ${f}`), f;
|
|
|
25252
25253
|
maxprofit_percent_long: B,
|
|
25253
25254
|
maxprofit_percent_short: C,
|
|
25254
25255
|
maxloss_percent_long: X,
|
|
25255
|
-
maxloss_percent_short:
|
|
25256
|
+
maxloss_percent_short: P,
|
|
25256
25257
|
hold_long_k_count: k,
|
|
25257
25258
|
hold_short_k_count: S,
|
|
25258
|
-
hold_profit_long_k_count:
|
|
25259
|
+
hold_profit_long_k_count: H,
|
|
25259
25260
|
hold_profit_short_k_count: t0,
|
|
25260
25261
|
hold_loss_long_k_count: Z,
|
|
25261
25262
|
hold_loss_short_k_count: o0,
|
|
@@ -30097,17 +30098,17 @@ ${f}`), f;
|
|
|
30097
30098
|
if ((q == null ? void 0 : q.get(d)) || (g == null || g.set(d, W), q == null || q.set(d, W)), A != null && A.has(d)) {
|
|
30098
30099
|
const B = ne(O.tickerid), C = ne(i);
|
|
30099
30100
|
let X = V0(h, l, C) * 1e3;
|
|
30100
|
-
const
|
|
30101
|
-
if (!
|
|
30101
|
+
const P = V0(b, l, B) * 1e3, { index: k = 0, periodStamp: S = P } = this._reqCacheDataLoc[r] || {}, { list: H } = (A == null ? void 0 : A.get(d)) || {};
|
|
30102
|
+
if (!H.length)
|
|
30102
30103
|
return;
|
|
30103
|
-
const t0 =
|
|
30104
|
+
const t0 = H.slice(k);
|
|
30104
30105
|
let Z = l, o0 = B ? l : S + Z;
|
|
30105
30106
|
B ? Z = u : f && o0 > f && (o0 = f);
|
|
30106
|
-
const b0 =
|
|
30107
|
+
const b0 = H.length - 1;
|
|
30107
30108
|
if (b0 < 0) return;
|
|
30108
30109
|
const G = {
|
|
30109
|
-
lastBarIndex:
|
|
30110
|
-
lastBarTime:
|
|
30110
|
+
lastBarIndex: H[b0].barIndex || b0,
|
|
30111
|
+
lastBarTime: H[b0].time,
|
|
30111
30112
|
interval: h,
|
|
30112
30113
|
mintick: M
|
|
30113
30114
|
};
|
|
@@ -30194,7 +30195,7 @@ ${f}`), f;
|
|
|
30194
30195
|
}), G);
|
|
30195
30196
|
}
|
|
30196
30197
|
this._reqCacheDataLoc[r] = {
|
|
30197
|
-
index:
|
|
30198
|
+
index: H.length,
|
|
30198
30199
|
periodStamp: S
|
|
30199
30200
|
};
|
|
30200
30201
|
return;
|
|
@@ -30712,7 +30713,7 @@ ${f}`), f;
|
|
|
30712
30713
|
};
|
|
30713
30714
|
}
|
|
30714
30715
|
fill(t, r) {
|
|
30715
|
-
var w, x, N, D, B, C, X,
|
|
30716
|
+
var w, x, N, D, B, C, X, P;
|
|
30716
30717
|
const i = ["color"];
|
|
30717
30718
|
C0(t, i);
|
|
30718
30719
|
const y = t, { color: n, transp: o = 90, seriesColors: a, hline1: c, hline2: p, plot1: b, plot2: M } = y, l = U0(y, ["color", "transp", "seriesColors", "hline1", "hline2", "plot1", "plot2"]);
|
|
@@ -30723,15 +30724,15 @@ ${f}`), f;
|
|
|
30723
30724
|
if (c && p)
|
|
30724
30725
|
g = (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";
|
|
30725
30726
|
else {
|
|
30726
|
-
const k = this._plots.get(b == null ? void 0 : b.key), S = this._plots.get(M == null ? void 0 : M.key),
|
|
30727
|
-
if (g = (D = (N =
|
|
30727
|
+
const k = this._plots.get(b == null ? void 0 : b.key), S = this._plots.get(M == null ? void 0 : M.key), H = (k == null ? void 0 : k.data) || [], t0 = (S == null ? void 0 : S.data) || [];
|
|
30728
|
+
if (g = (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) {
|
|
30728
30729
|
const Z = (k == null ? void 0 : k.force_overlay) && (S == null ? void 0 : S.force_overlay);
|
|
30729
30730
|
(k != null && k.force_overlay || S != null && S.force_overlay) && !Z ? this._errorListener.addError(de.plotFillForceOverlayErr, r, H1.Error) : l.force_overlay = Z;
|
|
30730
30731
|
}
|
|
30731
30732
|
}
|
|
30732
30733
|
if (A[f] = { time: O, color: u, barIndex: f, plot1: g, plot2: W }, this._seriesColorHandle(t, i, d), !d) {
|
|
30733
30734
|
this._count++;
|
|
30734
|
-
const k = ((X = this._options.indicator) == null ? void 0 : X.explicit_plot_zorder) || ((
|
|
30735
|
+
const k = ((X = this._options.indicator) == null ? void 0 : X.explicit_plot_zorder) || ((P = this._options.strategy) == null ? void 0 : P.explicit_plot_zorder), S = u ? [u] : void 0;
|
|
30735
30736
|
this._fills.set(h, K(I({
|
|
30736
30737
|
id: h,
|
|
30737
30738
|
colors: S,
|
|
@@ -31001,7 +31002,7 @@ ${f}`), f;
|
|
|
31001
31002
|
};
|
|
31002
31003
|
function VX(s, e, t) {
|
|
31003
31004
|
return I1(this, null, function* () {
|
|
31004
|
-
var
|
|
31005
|
+
var H, t0, Z, o0, b0, G, J;
|
|
31005
31006
|
const {
|
|
31006
31007
|
data: r,
|
|
31007
31008
|
isPreParser: i,
|
|
@@ -31063,7 +31064,7 @@ ${f}`), f;
|
|
|
31063
31064
|
timeframeGaps: y0,
|
|
31064
31065
|
lastData: g0
|
|
31065
31066
|
} = y;
|
|
31066
|
-
if (X = n0, N.setVarCacheData(c0), B.setFuncCacheData(Y), h = m0, d = y0, ((
|
|
31067
|
+
if (X = n0, N.setVarCacheData(c0), B.setFuncCacheData(Y), h = m0, d = y0, ((H = r[0]) == null ? void 0 : H.time) > (g0 == null ? void 0 : g0.time) && r.unshift(g0), N.setCustomTimeframe = h, h && h !== g) {
|
|
31067
31068
|
const x0 = Pe(h), q0 = N._currentData;
|
|
31068
31069
|
if (q = M == null ? void 0 : M[`${n.tickerid}--${x0}`], q != null && q.length) {
|
|
31069
31070
|
q[q.length - 1].isrealtime = !0, q0 != null && q0.time && (q0.time < q[0].time ? q.unshift(K(I({}, q0), {
|
|
@@ -31224,11 +31225,11 @@ ${f}`), f;
|
|
|
31224
31225
|
};
|
|
31225
31226
|
}
|
|
31226
31227
|
}
|
|
31227
|
-
const
|
|
31228
|
-
if (
|
|
31228
|
+
const P = B.errors;
|
|
31229
|
+
if (P.length && P.some((Y) => Y.type === H1.Error))
|
|
31229
31230
|
return Q1(O), {
|
|
31230
31231
|
status: 1,
|
|
31231
|
-
errors:
|
|
31232
|
+
errors: P
|
|
31232
31233
|
};
|
|
31233
31234
|
const k = B.options(R, t);
|
|
31234
31235
|
Object.assign(x, {
|
|
@@ -31256,7 +31257,7 @@ ${f}`), f;
|
|
|
31256
31257
|
return e.id && self.workerStorage.set(`cache_${e.id}`, x), {
|
|
31257
31258
|
status: 0,
|
|
31258
31259
|
requestList: A,
|
|
31259
|
-
errors:
|
|
31260
|
+
errors: P,
|
|
31260
31261
|
// cacheData: newCacheData,
|
|
31261
31262
|
options: K(I({}, S), { id: e.id })
|
|
31262
31263
|
};
|
|
@@ -31273,12 +31274,12 @@ ${f}`), f;
|
|
|
31273
31274
|
symbol: B = "",
|
|
31274
31275
|
timeframe: C,
|
|
31275
31276
|
id: X,
|
|
31276
|
-
ignore_invalid_symbol:
|
|
31277
|
+
ignore_invalid_symbol: P,
|
|
31277
31278
|
originTimeframe: k
|
|
31278
31279
|
} = D;
|
|
31279
31280
|
let S = 0;
|
|
31280
|
-
const { list:
|
|
31281
|
-
|
|
31281
|
+
const { list: H, endTime: t0 } = (p == null ? void 0 : p.get(X)) || {};
|
|
31282
|
+
H && (S = t0);
|
|
31282
31283
|
const Z = ne(B) || Ci(B), [o0, b0] = B.split(":"), G = Number(k) <= 60 ? 1e4 : 5e3, J = {
|
|
31283
31284
|
exchange: b0 ? o0 : "X",
|
|
31284
31285
|
symbol: b0 || o0,
|
|
@@ -31290,8 +31291,8 @@ ${f}`), f;
|
|
|
31290
31291
|
y.push({
|
|
31291
31292
|
id: X,
|
|
31292
31293
|
key: Y,
|
|
31293
|
-
ignore_invalid_symbol:
|
|
31294
|
-
currentDataList:
|
|
31294
|
+
ignore_invalid_symbol: P,
|
|
31295
|
+
currentDataList: H,
|
|
31295
31296
|
startTime: S,
|
|
31296
31297
|
isFutures: Z,
|
|
31297
31298
|
timeframe: C
|
|
@@ -31300,10 +31301,10 @@ ${f}`), f;
|
|
|
31300
31301
|
const w = yield Promise.all(R), x = self.workerStorage.get(`request_${l}_pre_data`) || /* @__PURE__ */ new Map();
|
|
31301
31302
|
for (const [N, D] of w.entries()) {
|
|
31302
31303
|
const { code: B, data: C, msg: X } = D, {
|
|
31303
|
-
id:
|
|
31304
|
+
id: P,
|
|
31304
31305
|
key: k,
|
|
31305
31306
|
ignore_invalid_symbol: S,
|
|
31306
|
-
currentDataList:
|
|
31307
|
+
currentDataList: H = [],
|
|
31307
31308
|
startTime: t0,
|
|
31308
31309
|
isFutures: Z,
|
|
31309
31310
|
timeframe: o0
|
|
@@ -31335,18 +31336,18 @@ ${f}`), f;
|
|
|
31335
31336
|
G,
|
|
31336
31337
|
m0
|
|
31337
31338
|
);
|
|
31338
|
-
Di(Y, g0), x0 && x.set(
|
|
31339
|
+
Di(Y, g0), x0 && x.set(P, x0);
|
|
31339
31340
|
}
|
|
31340
|
-
const c0 = b == null ? void 0 : b.get(
|
|
31341
|
+
const c0 = b == null ? void 0 : b.get(P);
|
|
31341
31342
|
if (c0) {
|
|
31342
31343
|
const n0 = Number(J) || 1e-5;
|
|
31343
31344
|
c0.mintick = n0;
|
|
31344
31345
|
}
|
|
31345
|
-
Y.length && (Y[Y.length - 1].isrealtime = !0), Di(
|
|
31346
|
-
list:
|
|
31346
|
+
Y.length && (Y[Y.length - 1].isrealtime = !0), Di(H, Y), p == null || p.set(P, {
|
|
31347
|
+
list: H,
|
|
31347
31348
|
session: b0,
|
|
31348
31349
|
timezone: G,
|
|
31349
|
-
endTime: (g =
|
|
31350
|
+
endTime: (g = H[H.length - 2]) == null ? void 0 : g.time
|
|
31350
31351
|
});
|
|
31351
31352
|
}
|
|
31352
31353
|
self.workerStorage.set(`request_${l}_pre_data`, x), c == null || c.clear();
|
|
@@ -31354,16 +31355,16 @@ ${f}`), f;
|
|
|
31354
31355
|
let f = !1;
|
|
31355
31356
|
for (const [R, y] of o) {
|
|
31356
31357
|
if (!y || y.isRun) continue;
|
|
31357
|
-
const W = y, { 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:
|
|
31358
|
+
const W = y, { 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: P, timezone: k } = (p == null ? void 0 : p.get(N)) || {}, { errors: S = [], cacheData: H } = e.runScripts(
|
|
31358
31359
|
w,
|
|
31359
31360
|
R,
|
|
31360
31361
|
!0,
|
|
31361
31362
|
X,
|
|
31362
|
-
Object.assign(B, { mintick: (C == null ? void 0 : C.mintick) || 1e-5, session:
|
|
31363
|
+
Object.assign(B, { mintick: (C == null ? void 0 : C.mintick) || 1e-5, session: P, timezone: k, inputs: u }),
|
|
31363
31364
|
x,
|
|
31364
31365
|
D
|
|
31365
31366
|
) || {};
|
|
31366
|
-
y.isRun = !0, f = !0, M.requestCacheData[R] =
|
|
31367
|
+
y.isRun = !0, f = !0, M.requestCacheData[R] = H, e.addErrors(S, R);
|
|
31367
31368
|
}
|
|
31368
31369
|
if (n && f) {
|
|
31369
31370
|
s.__isReqRepeated = !0, eo(
|
|
@@ -31404,11 +31405,11 @@ ${f}`), f;
|
|
|
31404
31405
|
const { list: N, session: D, timezone: B, endTime: C } = (c == null ? void 0 : c.get(g)) || {};
|
|
31405
31406
|
if (N.length) {
|
|
31406
31407
|
let X = N.length - 1;
|
|
31407
|
-
const
|
|
31408
|
+
const P = N[X];
|
|
31408
31409
|
if (x) {
|
|
31409
31410
|
const G = l.get(g), { newLines: J, preData: Y } = Ws(
|
|
31410
31411
|
y,
|
|
31411
|
-
|
|
31412
|
+
P,
|
|
31412
31413
|
w,
|
|
31413
31414
|
!0,
|
|
31414
31415
|
((G == null ? void 0 : G.date) || 0) - 1,
|
|
@@ -31419,7 +31420,7 @@ ${f}`), f;
|
|
|
31419
31420
|
);
|
|
31420
31421
|
y = J, l.set(g, Y);
|
|
31421
31422
|
}
|
|
31422
|
-
const k =
|
|
31423
|
+
const k = P.time;
|
|
31423
31424
|
if (y = y.filter((G) => G.time >= k), !y.length) continue;
|
|
31424
31425
|
const S = (f = y[0]) == null ? void 0 : f.time;
|
|
31425
31426
|
if (S === k) {
|
|
@@ -31429,13 +31430,13 @@ ${f}`), f;
|
|
|
31429
31430
|
for (const G of y)
|
|
31430
31431
|
X += 1, G.barindex = X;
|
|
31431
31432
|
y[y.length - 1].isrealtime = !0;
|
|
31432
|
-
const
|
|
31433
|
+
const H = ((O = b == null ? void 0 : b.get(g)) == null ? void 0 : O.mintick) || 1e-5;
|
|
31433
31434
|
if (c == null || c.set(g, {
|
|
31434
31435
|
list: N.concat(y),
|
|
31435
31436
|
session: D,
|
|
31436
31437
|
timezone: B,
|
|
31437
31438
|
endTime: C
|
|
31438
|
-
}), S > k && y.unshift(Object.assign(
|
|
31439
|
+
}), S > k && y.unshift(Object.assign(P, { isrealtime: !1 })), !n[h]) continue;
|
|
31439
31440
|
const { varCacheData: t0, funcCacheData: Z } = n[h] || {}, { errors: o0 = [], cacheData: b0 } = t.runScripts(
|
|
31440
31441
|
A,
|
|
31441
31442
|
h,
|
|
@@ -31446,7 +31447,7 @@ ${f}`), f;
|
|
|
31446
31447
|
timezone: B,
|
|
31447
31448
|
varCacheData: t0,
|
|
31448
31449
|
funcCacheData: Z,
|
|
31449
|
-
mintick:
|
|
31450
|
+
mintick: H,
|
|
31450
31451
|
inputs: a
|
|
31451
31452
|
}),
|
|
31452
31453
|
q,
|
|
@@ -34260,7 +34261,7 @@ ${J4}`);
|
|
|
34260
34261
|
strassen3x3(e) {
|
|
34261
34262
|
e = T0.checkMatrix(e);
|
|
34262
34263
|
let t = new T0(3, 3);
|
|
34263
|
-
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), g = e.get(2, 2), W = (r + i + n - o - a - b - M) * h, R = (r - o) * (-u + h), y = a * (-l + u + O - h - d - A + g), 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,
|
|
34264
|
+
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), g = e.get(2, 2), W = (r + i + n - o - a - b - M) * h, R = (r - o) * (-u + h), y = a * (-l + u + O - h - d - A + g), 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, P = b * (-l + f + O - h - d - A + q), k = (-n + b + M) * (h + A - q), S = (n - M) * (h - q), H = n * A, t0 = (b + M) * (-A + q), Z = (-n + a + c) * (d + A - g), o0 = (n - c) * (d - g), b0 = (a + c) * (-A + g), G = i * O, J = c * q, Y = o * f, c0 = p * u, n0 = M * g, m0 = N + H + G, y0 = W + w + x + N + k + H + t0, g0 = N + D + C + X + H + Z + b0, x0 = R + y + w + N + H + Z + o0, q0 = R + w + x + N + J, F = H + Z + o0 + b0 + Y, e0 = N + D + B + P + k + S + H, a0 = k + S + H + t0 + c0, d0 = N + D + B + C + n0;
|
|
34264
34265
|
return t.set(0, 0, m0), t.set(0, 1, y0), 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;
|
|
34265
34266
|
}
|
|
34266
34267
|
mmulStrassen(e) {
|
|
@@ -34294,17 +34295,17 @@ ${J4}`);
|
|
|
34294
34295
|
A1.add(A, g),
|
|
34295
34296
|
O,
|
|
34296
34297
|
h
|
|
34297
|
-
),
|
|
34298
|
+
), P = b(
|
|
34298
34299
|
A1.sub(q, y),
|
|
34299
34300
|
A1.add(R, w),
|
|
34300
34301
|
O,
|
|
34301
34302
|
h
|
|
34302
34303
|
), k = A1.add(x, B);
|
|
34303
|
-
k.sub(C), k.add(
|
|
34304
|
-
let S = A1.add(D, C),
|
|
34304
|
+
k.sub(C), k.add(P);
|
|
34305
|
+
let S = A1.add(D, C), H = A1.add(N, B), t0 = A1.sub(x, N);
|
|
34305
34306
|
t0.add(D), t0.add(X);
|
|
34306
34307
|
let Z = A1.zeros(2 * k.rows, 2 * k.columns);
|
|
34307
|
-
return Z = Z.setSubMatrix(k, 0, 0), Z = Z.setSubMatrix(S, k.rows, 0), Z = Z.setSubMatrix(
|
|
34308
|
+
return Z = Z.setSubMatrix(k, 0, 0), Z = Z.setSubMatrix(S, k.rows, 0), Z = Z.setSubMatrix(H, 0, k.columns), Z = Z.setSubMatrix(t0, k.rows, k.columns), Z.subMatrix(0, u - 1, 0, f - 1);
|
|
34308
34309
|
}
|
|
34309
34310
|
return b(t, e, c, p);
|
|
34310
34311
|
}
|
|
@@ -35430,10 +35431,10 @@ ${J4}`);
|
|
|
35430
35431
|
let B = d[y - 2];
|
|
35431
35432
|
d[y - 2] = 0;
|
|
35432
35433
|
for (let C = y - 2; C >= N; C--) {
|
|
35433
|
-
let X = ts(f[C], B),
|
|
35434
|
-
if (f[C] = X, C !== N && (B = -k * d[C - 1], d[C - 1] =
|
|
35434
|
+
let X = ts(f[C], B), P = f[C] / X, k = B / X;
|
|
35435
|
+
if (f[C] = X, C !== N && (B = -k * d[C - 1], d[C - 1] = P * d[C - 1]), p)
|
|
35435
35436
|
for (let S = 0; S < i; S++)
|
|
35436
|
-
X =
|
|
35437
|
+
X = P * h.get(S, C) + k * h.get(S, y - 1), h.set(S, y - 1, -k * h.get(S, C) + P * h.get(S, y - 1)), h.set(S, C, X);
|
|
35437
35438
|
}
|
|
35438
35439
|
break;
|
|
35439
35440
|
}
|
|
@@ -35441,10 +35442,10 @@ ${J4}`);
|
|
|
35441
35442
|
let B = d[N - 1];
|
|
35442
35443
|
d[N - 1] = 0;
|
|
35443
35444
|
for (let C = N; C < y; C++) {
|
|
35444
|
-
let X = ts(f[C], B),
|
|
35445
|
-
if (f[C] = X, B = -k * d[C], d[C] =
|
|
35445
|
+
let X = ts(f[C], B), P = f[C] / X, k = B / X;
|
|
35446
|
+
if (f[C] = X, B = -k * d[C], d[C] = P * d[C], c)
|
|
35446
35447
|
for (let S = 0; S < r; S++)
|
|
35447
|
-
X =
|
|
35448
|
+
X = P * O.get(S, C) + k * O.get(S, N - 1), O.set(S, N - 1, -k * O.get(S, C) + P * O.get(S, N - 1)), O.set(S, C, X);
|
|
35448
35449
|
}
|
|
35449
35450
|
break;
|
|
35450
35451
|
}
|
|
@@ -35455,9 +35456,9 @@ ${J4}`);
|
|
|
35455
35456
|
Math.abs(d[y - 2]),
|
|
35456
35457
|
Math.abs(f[N]),
|
|
35457
35458
|
Math.abs(d[N])
|
|
35458
|
-
), C = f[y - 1] / B, X = f[y - 2] / B,
|
|
35459
|
+
), C = f[y - 1] / B, X = f[y - 2] / B, P = d[y - 2] / B, k = f[N] / B, S = d[N] / B, H = ((X + C) * (X - C) + P * P) / 2, t0 = C * P * (C * P);
|
|
35459
35460
|
let Z = 0;
|
|
35460
|
-
(
|
|
35461
|
+
(H !== 0 || t0 !== 0) && (H < 0 ? Z = 0 - Math.sqrt(H * H + t0) : Z = Math.sqrt(H * H + t0), Z = t0 / (H + Z));
|
|
35461
35462
|
let o0 = (k + C) * (k - C) + Z, b0 = k * S;
|
|
35462
35463
|
for (let G = N; G < y - 1; G++) {
|
|
35463
35464
|
let J = ts(o0, b0);
|
|
@@ -35804,7 +35805,7 @@ ${J4}`);
|
|
|
35804
35805
|
}
|
|
35805
35806
|
}
|
|
35806
35807
|
function Jk(s, e, t, r, i) {
|
|
35807
|
-
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, g, W, R, y, w, x, N, D, B, C, X,
|
|
35808
|
+
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, g, W, R, y, w, x, N, D, B, C, X, P;
|
|
35808
35809
|
for (d = 0; d < s; d++)
|
|
35809
35810
|
for ((d < o || d > a) && (t[d] = i.get(d, d), e[d] = 0), A = Math.max(d - 1, 0); A < s; A++)
|
|
35810
35811
|
b = b + Math.abs(i.get(d, A));
|
|
@@ -35867,17 +35868,17 @@ ${J4}`);
|
|
|
35867
35868
|
i.set(A, n, i.get(A, n) / R);
|
|
35868
35869
|
}
|
|
35869
35870
|
else if (l < 0)
|
|
35870
|
-
for (g = 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))) : (
|
|
35871
|
+
for (g = 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))) : (P = N2(0, -i.get(n - 1, n), i.get(n - 1, n - 1) - M, l), i.set(n - 1, n - 1, P[0]), i.set(n - 1, n, P[1])), i.set(n, n - 1, 0), i.set(n, n, 1), d = n - 2; d >= 0; d--) {
|
|
35871
35872
|
for (N = 0, D = 0, A = g; A <= n; A++)
|
|
35872
35873
|
N = N + i.get(d, A) * i.get(A, n - 1), D = D + i.get(d, A) * i.get(A, n);
|
|
35873
35874
|
if (y = i.get(d, d) - M, e[d] < 0)
|
|
35874
35875
|
O = y, u = N, f = D;
|
|
35875
|
-
else if (g = d, e[d] === 0 ? (
|
|
35876
|
+
else if (g = d, e[d] === 0 ? (P = N2(-N, -D, y, l), i.set(d, n - 1, P[0]), i.set(d, n, P[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(y) + Math.abs(l) + Math.abs(w) + Math.abs(x) + Math.abs(O))), P = N2(
|
|
35876
35877
|
w * u - O * N + l * D,
|
|
35877
35878
|
w * f - O * D - l * N,
|
|
35878
35879
|
B,
|
|
35879
35880
|
C
|
|
35880
|
-
), i.set(d, n - 1,
|
|
35881
|
+
), i.set(d, n - 1, P[0]), i.set(d, n, P[1]), Math.abs(w) > Math.abs(O) + Math.abs(l) ? (i.set(
|
|
35881
35882
|
d + 1,
|
|
35882
35883
|
n - 1,
|
|
35883
35884
|
(-N - y * i.get(d, n - 1) + l * i.get(d, n)) / w
|
|
@@ -35885,12 +35886,12 @@ ${J4}`);
|
|
|
35885
35886
|
d + 1,
|
|
35886
35887
|
n,
|
|
35887
35888
|
(-D - y * i.get(d, n) - l * i.get(d, n - 1)) / w
|
|
35888
|
-
)) : (
|
|
35889
|
+
)) : (P = N2(
|
|
35889
35890
|
-u - x * i.get(d, n - 1),
|
|
35890
35891
|
-f - x * i.get(d, n),
|
|
35891
35892
|
O,
|
|
35892
35893
|
l
|
|
35893
|
-
), i.set(d + 1, n - 1,
|
|
35894
|
+
), i.set(d + 1, n - 1, P[0]), i.set(d + 1, n, P[1]))), R = Math.max(Math.abs(i.get(d, n - 1)), Math.abs(i.get(d, n))), c * R * R > 1)
|
|
35894
35895
|
for (A = d; A <= n; A++)
|
|
35895
35896
|
i.set(A, n - 1, i.get(A, n - 1) / R), i.set(A, n, i.get(A, n) / R);
|
|
35896
35897
|
}
|
|
@@ -39881,7 +39882,7 @@ ${J4}`);
|
|
|
39881
39882
|
};
|
|
39882
39883
|
}
|
|
39883
39884
|
fill(e, t) {
|
|
39884
|
-
var x, N, D, B, C, X,
|
|
39885
|
+
var x, N, D, B, C, X, P, k;
|
|
39885
39886
|
const r = ["color", "top_color", "bottom_color"];
|
|
39886
39887
|
C0(e, r);
|
|
39887
39888
|
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) || [];
|
|
@@ -39891,18 +39892,18 @@ ${J4}`);
|
|
|
39891
39892
|
if (c && p)
|
|
39892
39893
|
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, y = "hline";
|
|
39893
39894
|
else {
|
|
39894
|
-
const S = this._plots.get(b == null ? void 0 : b.key),
|
|
39895
|
+
const S = this._plots.get(b == null ? void 0 : b.key), H = this._plots.get(M == null ? void 0 : M.key), t0 = (S == null ? void 0 : S.data) || [], Z = (H == null ? void 0 : H.data) || [];
|
|
39895
39896
|
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) {
|
|
39896
|
-
const o0 = (S == null ? void 0 : S.force_overlay) && (
|
|
39897
|
-
(S != null && S.force_overlay ||
|
|
39897
|
+
const o0 = (S == null ? void 0 : S.force_overlay) && (H == null ? void 0 : H.force_overlay);
|
|
39898
|
+
(S != null && S.force_overlay || H != null && H.force_overlay) && !o0 ? this._errorListener.addError(O1.plotFillForceOverlayErr, t, i1.Error) : f.force_overlay = o0;
|
|
39898
39899
|
}
|
|
39899
39900
|
}
|
|
39900
39901
|
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) {
|
|
39901
39902
|
this._count++;
|
|
39902
|
-
const S = ((
|
|
39903
|
+
const S = ((P = this._options.indicator) == null ? void 0 : P.explicit_plot_zorder) || ((k = this._options.strategy) == null ? void 0 : k.explicit_plot_zorder), H = i ? [i] : void 0, t0 = n ? [n] : void 0, Z = o ? [o] : void 0;
|
|
39903
39904
|
this._fills.set(d, K(I({
|
|
39904
39905
|
id: d,
|
|
39905
|
-
colors:
|
|
39906
|
+
colors: H,
|
|
39906
39907
|
top_colors: t0,
|
|
39907
39908
|
bottom_colors: Z,
|
|
39908
39909
|
display: g,
|
|
@@ -40393,11 +40394,11 @@ ${u}`), u;
|
|
|
40393
40394
|
if (!C.length)
|
|
40394
40395
|
return [];
|
|
40395
40396
|
if (C.length - 1 < 0) return [];
|
|
40396
|
-
const
|
|
40397
|
+
const P = C.slice(D);
|
|
40397
40398
|
let k = M, S = h ? M : B + k;
|
|
40398
40399
|
h ? k = l : O && S > O && (S = O);
|
|
40399
|
-
const
|
|
40400
|
-
for (const [t0, Z] of
|
|
40400
|
+
const H = [];
|
|
40401
|
+
for (const [t0, Z] of P.entries()) {
|
|
40401
40402
|
let { time: o0, barIndex: b0, openTime: G } = Z;
|
|
40402
40403
|
o0 = o0 * 1e3, d && (o0 = G);
|
|
40403
40404
|
let J = b0 || D + t0;
|
|
@@ -40405,19 +40406,19 @@ ${u}`), u;
|
|
|
40405
40406
|
return !u && (this._cacheData[r] = {
|
|
40406
40407
|
index: J,
|
|
40407
40408
|
periodStamp: B
|
|
40408
|
-
}),
|
|
40409
|
+
}), H;
|
|
40409
40410
|
if (k <= o0 && o0 < S) {
|
|
40410
40411
|
const Y = (N = Z == null ? void 0 : Z.result) == null ? void 0 : N[r];
|
|
40411
40412
|
if (Array.isArray(Y))
|
|
40412
40413
|
for (const [c0, n0] of Y.entries())
|
|
40413
|
-
|
|
40414
|
-
else i ||
|
|
40414
|
+
H[c0] || (H[c0] = []), H[c0].push(n0);
|
|
40415
|
+
else i || H.push(Y);
|
|
40415
40416
|
}
|
|
40416
40417
|
}
|
|
40417
40418
|
return !u && (this._cacheData[r] = {
|
|
40418
40419
|
index: C.length,
|
|
40419
40420
|
periodStamp: B
|
|
40420
|
-
}),
|
|
40421
|
+
}), H;
|
|
40421
40422
|
}
|
|
40422
40423
|
}
|
|
40423
40424
|
_getRequestData(e, t) {
|
|
@@ -40453,15 +40454,15 @@ ${u}`), u;
|
|
|
40453
40454
|
if (h != null && h.has(O)) {
|
|
40454
40455
|
const x = ne(f.tickerid), N = ne(r);
|
|
40455
40456
|
let D = V0(i, M, N) * 1e3;
|
|
40456
|
-
const B = V0(p, M, x) * 1e3, { index: C = 0, periodStamp: X = B } = this._cacheData[t] || {}, { list:
|
|
40457
|
-
if (!
|
|
40457
|
+
const B = V0(p, M, x) * 1e3, { index: C = 0, periodStamp: X = B } = this._cacheData[t] || {}, { list: P } = (h == null ? void 0 : h.get(O)) || {};
|
|
40458
|
+
if (!P.length)
|
|
40458
40459
|
return;
|
|
40459
|
-
const k =
|
|
40460
|
-
let S = M,
|
|
40461
|
-
x ? S = l : u &&
|
|
40462
|
-
const t0 =
|
|
40463
|
-
lastBarIndex:
|
|
40464
|
-
lastBarTime:
|
|
40460
|
+
const k = P.slice(C);
|
|
40461
|
+
let S = M, H = x ? M : X + S;
|
|
40462
|
+
x ? S = l : u && H > u && (H = u);
|
|
40463
|
+
const t0 = P.length - 1, Z = {
|
|
40464
|
+
lastBarIndex: P[t0].barIndex || t0,
|
|
40465
|
+
lastBarTime: P[t0].time,
|
|
40465
40466
|
interval: i,
|
|
40466
40467
|
mintick: b
|
|
40467
40468
|
};
|
|
@@ -40470,7 +40471,7 @@ ${u}`), u;
|
|
|
40470
40471
|
if (a === mi.lookaheadOn ? o0 = this._lookaheadOnHandle(
|
|
40471
40472
|
k,
|
|
40472
40473
|
i,
|
|
40473
|
-
|
|
40474
|
+
H,
|
|
40474
40475
|
D,
|
|
40475
40476
|
Z,
|
|
40476
40477
|
C,
|
|
@@ -40482,14 +40483,14 @@ ${u}`), u;
|
|
|
40482
40483
|
) : o0 = this._lookaheadOffHandle(
|
|
40483
40484
|
k,
|
|
40484
40485
|
i,
|
|
40485
|
-
|
|
40486
|
+
H,
|
|
40486
40487
|
D,
|
|
40487
40488
|
Z,
|
|
40488
40489
|
C,
|
|
40489
40490
|
X,
|
|
40490
40491
|
t,
|
|
40491
40492
|
S,
|
|
40492
|
-
(N ? M : u) ||
|
|
40493
|
+
(N ? M : u) || H,
|
|
40493
40494
|
o,
|
|
40494
40495
|
N
|
|
40495
40496
|
), o0) return o0;
|
|
@@ -40499,7 +40500,7 @@ ${u}`), u;
|
|
|
40499
40500
|
let { time: G, barIndex: J, openTime: Y, nextBarTime: c0 } = b0;
|
|
40500
40501
|
G = G * 1e3, c0 = c0 * 1e3 || (N ? G : ((g = k[o0 + 1]) == null ? void 0 : g.time) * 1e3 || G + D), N && (G = Y);
|
|
40501
40502
|
let n0 = J || C + o0;
|
|
40502
|
-
if (G >=
|
|
40503
|
+
if (G >= H) {
|
|
40503
40504
|
this._cacheData[t] = {
|
|
40504
40505
|
index: n0,
|
|
40505
40506
|
periodStamp: X
|
|
@@ -40523,14 +40524,14 @@ ${u}`), u;
|
|
|
40523
40524
|
N && (G = Y);
|
|
40524
40525
|
const n0 = N ? c0 : ((R = k[o0 + 1]) == null ? void 0 : R.time) * 1e3 || c0;
|
|
40525
40526
|
let m0 = J || C + o0;
|
|
40526
|
-
if (G >
|
|
40527
|
+
if (G > H) {
|
|
40527
40528
|
this._cacheData[t] = {
|
|
40528
40529
|
index: m0,
|
|
40529
40530
|
periodStamp: X
|
|
40530
40531
|
};
|
|
40531
40532
|
return;
|
|
40532
40533
|
}
|
|
40533
|
-
if (G <
|
|
40534
|
+
if (G < H && H <= n0)
|
|
40534
40535
|
return this._cacheData[t] = {
|
|
40535
40536
|
index: m0,
|
|
40536
40537
|
periodStamp: X
|
|
@@ -40538,7 +40539,7 @@ ${u}`), u;
|
|
|
40538
40539
|
barIndex: m0,
|
|
40539
40540
|
nextBarTime: (y = k[o0 + 1]) == null ? void 0 : y.time
|
|
40540
40541
|
}), Z);
|
|
40541
|
-
if ((G >= S && G <=
|
|
40542
|
+
if ((G >= S && G <= H || c0 < H && G < S) && m0 === Z.lastBarIndex)
|
|
40542
40543
|
return this._cacheData[t] = {
|
|
40543
40544
|
index: m0,
|
|
40544
40545
|
periodStamp: X
|
|
@@ -40548,7 +40549,7 @@ ${u}`), u;
|
|
|
40548
40549
|
}), Z);
|
|
40549
40550
|
}
|
|
40550
40551
|
this._cacheData[t] = {
|
|
40551
|
-
index:
|
|
40552
|
+
index: P.length,
|
|
40552
40553
|
periodStamp: X
|
|
40553
40554
|
};
|
|
40554
40555
|
return;
|
|
@@ -40775,8 +40776,8 @@ ${u}`), u;
|
|
|
40775
40776
|
});
|
|
40776
40777
|
let D;
|
|
40777
40778
|
const B = {};
|
|
40778
|
-
for (const [
|
|
40779
|
-
const { barindex: S } = k,
|
|
40779
|
+
for (const [P, k] of i.entries()) {
|
|
40780
|
+
const { barindex: S } = k, H = yield this.requestMapHandle(
|
|
40780
40781
|
b,
|
|
40781
40782
|
y,
|
|
40782
40783
|
B,
|
|
@@ -40785,7 +40786,7 @@ ${u}`), u;
|
|
|
40785
40786
|
w,
|
|
40786
40787
|
n == null ? void 0 : n.inputs
|
|
40787
40788
|
);
|
|
40788
|
-
if (D &&
|
|
40789
|
+
if (D && H && (b.log.clearLogForIndex(D.barIndex), c.__isReqRepeated = !0, c.updateData(D), b.update({ barIndex: (D == null ? void 0 : D.barIndex) || 0 }), D.result = Object.assign(D.result || {}, {
|
|
40789
40790
|
[t]: M(
|
|
40790
40791
|
c,
|
|
40791
40792
|
p,
|
|
@@ -40794,11 +40795,11 @@ ${u}`), u;
|
|
|
40794
40795
|
t
|
|
40795
40796
|
)
|
|
40796
40797
|
}), b.endExecution(), c.__isReqRepeated = !1), D = Object.assign(k, {
|
|
40797
|
-
barIndex: S ||
|
|
40798
|
+
barIndex: S || P,
|
|
40798
40799
|
lastBarIndex: i[f].barindex || f,
|
|
40799
40800
|
lastBarTime: i[f].time,
|
|
40800
|
-
nextBarTime: (l = i[
|
|
40801
|
-
preBarTime: (u = i[
|
|
40801
|
+
nextBarTime: (l = i[P + 1]) == null ? void 0 : l.time,
|
|
40802
|
+
preBarTime: (u = i[P - 1]) == null ? void 0 : u.time
|
|
40802
40803
|
}), c.updateData(D), b.update({ barIndex: (D == null ? void 0 : D.barIndex) || 0 }), k.result = Object.assign(k.result || {}, {
|
|
40803
40804
|
[t]: M(
|
|
40804
40805
|
c,
|
|
@@ -40846,7 +40847,7 @@ ${u}`), u;
|
|
|
40846
40847
|
let B = 0;
|
|
40847
40848
|
const { list: C, endTime: X } = (n == null ? void 0 : n.get(w)) || {};
|
|
40848
40849
|
C && (B = X || 0);
|
|
40849
|
-
const
|
|
40850
|
+
const P = ne(R) || Ci(R), [k, S] = R.split(":"), H = Number(D) <= 60 ? 1e4 : 5e3, t0 = x ? x <= 1e5 ? x : 1e5 : H, Z = {
|
|
40850
40851
|
exchange: S ? k : "X",
|
|
40851
40852
|
symbol: S || k,
|
|
40852
40853
|
limit: t0,
|
|
@@ -40860,9 +40861,9 @@ ${u}`), u;
|
|
|
40860
40861
|
ignore_invalid_symbol: N,
|
|
40861
40862
|
currentDataList: C,
|
|
40862
40863
|
startTime: B,
|
|
40863
|
-
isFutures:
|
|
40864
|
+
isFutures: P,
|
|
40864
40865
|
timeframe: y
|
|
40865
|
-
}),
|
|
40866
|
+
}), P ? h.push(ea(Z)) : h.push(Jo({ params: [Z] }));
|
|
40866
40867
|
}
|
|
40867
40868
|
const A = yield Promise.all(h), q = self.workerStorage.get(`request_${this._scriptId}_pre_data`) || /* @__PURE__ */ new Map();
|
|
40868
40869
|
for (const [g, W] of A.entries()) {
|
|
@@ -40873,7 +40874,7 @@ ${u}`), u;
|
|
|
40873
40874
|
currentDataList: B = [],
|
|
40874
40875
|
startTime: C,
|
|
40875
40876
|
isFutures: X,
|
|
40876
|
-
timeframe:
|
|
40877
|
+
timeframe: P
|
|
40877
40878
|
} = d[g];
|
|
40878
40879
|
if (R !== 200 && !D)
|
|
40879
40880
|
return {
|
|
@@ -40889,12 +40890,12 @@ ${u}`), u;
|
|
|
40889
40890
|
}
|
|
40890
40891
|
]
|
|
40891
40892
|
};
|
|
40892
|
-
const { session_display: k, timezone: S, tick_size:
|
|
40893
|
+
const { session_display: k, timezone: S, tick_size: H } = (y == null ? void 0 : y[N]) || {}, t0 = (X ? (p = y == null ? void 0 : y[N]) == null ? void 0 : p.list : (M = (b = y == null ? void 0 : y[N]) == null ? void 0 : b.list) == null ? void 0 : M.reverse()) || [];
|
|
40893
40894
|
if (X) {
|
|
40894
40895
|
const o0 = (l = y == null ? void 0 : y[N]) == null ? void 0 : l.klineBaseList, b0 = ne(N), G = t0[t0.length - 1], { newLines: J, preData: Y } = Ws(
|
|
40895
40896
|
o0,
|
|
40896
40897
|
G,
|
|
40897
|
-
|
|
40898
|
+
P,
|
|
40898
40899
|
!1,
|
|
40899
40900
|
b0 ? (u = t0[t0.length - 2]) == null ? void 0 : u.time : G == null ? void 0 : G.time,
|
|
40900
40901
|
void 0,
|
|
@@ -40906,7 +40907,7 @@ ${u}`), u;
|
|
|
40906
40907
|
}
|
|
40907
40908
|
const Z = o == null ? void 0 : o.get(x);
|
|
40908
40909
|
if (Z) {
|
|
40909
|
-
const o0 = Number(
|
|
40910
|
+
const o0 = Number(H) || 1e-5;
|
|
40910
40911
|
Z.mintick = o0;
|
|
40911
40912
|
}
|
|
40912
40913
|
Di(B, t0), n == null || n.set(x, {
|
|
@@ -41349,10 +41350,10 @@ ${u}`), u;
|
|
|
41349
41350
|
maxprofit_percent_long: B = 0,
|
|
41350
41351
|
maxprofit_percent_short: C = 0,
|
|
41351
41352
|
maxloss_percent_long: X = 0,
|
|
41352
|
-
maxloss_percent_short:
|
|
41353
|
+
maxloss_percent_short: P = 0,
|
|
41353
41354
|
hold_long_k_count: k = 0,
|
|
41354
41355
|
hold_short_k_count: S = 0,
|
|
41355
|
-
hold_profit_long_k_count:
|
|
41356
|
+
hold_profit_long_k_count: H = 0,
|
|
41356
41357
|
hold_profit_short_k_count: t0 = 0,
|
|
41357
41358
|
hold_loss_long_k_count: Z = 0,
|
|
41358
41359
|
hold_loss_short_k_count: o0 = 0,
|
|
@@ -41360,7 +41361,7 @@ ${u}`), u;
|
|
|
41360
41361
|
shapeRatioType: G = "NONE"
|
|
41361
41362
|
} = this._preHistoryOrderCalcResult;
|
|
41362
41363
|
const { profit: J = 0, profit_percent: Y = 0, in_index: c0 = 0, out_index: n0 = 0, commission: m0 = 0, direction: y0, in_time: g0 = 0, out_time: x0 = 0, total_profit: q0 = 0 } = e, F = n0 - c0 + 1;
|
|
41363
|
-
if (y0 === e1.long ? (i += J, o += 1, c += Y, R += m0, k += F, J > 0 ? (l += Y, g += 1, h += J,
|
|
41364
|
+
if (y0 === e1.long ? (i += J, o += 1, c += Y, R += m0, k += F, J > 0 ? (l += Y, g += 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, y += m0, S += 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), P = Math.min(P, Y))), !b0) {
|
|
41364
41365
|
const I0 = this._createBalanceByInterval(g0, Date.now());
|
|
41365
41366
|
b0 = I0.balanceByInterval, G = I0.shapeRatioType;
|
|
41366
41367
|
}
|
|
@@ -41400,10 +41401,10 @@ ${u}`), u;
|
|
|
41400
41401
|
maxprofit_percent_long: B,
|
|
41401
41402
|
maxprofit_percent_short: C,
|
|
41402
41403
|
maxloss_percent_long: X,
|
|
41403
|
-
maxloss_percent_short:
|
|
41404
|
+
maxloss_percent_short: P,
|
|
41404
41405
|
hold_long_k_count: k,
|
|
41405
41406
|
hold_short_k_count: S,
|
|
41406
|
-
hold_profit_long_k_count:
|
|
41407
|
+
hold_profit_long_k_count: H,
|
|
41407
41408
|
hold_profit_short_k_count: t0,
|
|
41408
41409
|
hold_loss_long_k_count: Z,
|
|
41409
41410
|
hold_loss_short_k_count: o0,
|
|
@@ -42669,7 +42670,7 @@ ${u}`), u;
|
|
|
42669
42670
|
};
|
|
42670
42671
|
function nF(s, e, t) {
|
|
42671
42672
|
return I1(this, null, function* () {
|
|
42672
|
-
var
|
|
42673
|
+
var H, t0, Z, o0, b0, G, J;
|
|
42673
42674
|
const {
|
|
42674
42675
|
data: r,
|
|
42675
42676
|
isPreParser: i,
|
|
@@ -42731,7 +42732,7 @@ ${u}`), u;
|
|
|
42731
42732
|
timeframeGaps: y0,
|
|
42732
42733
|
lastData: g0
|
|
42733
42734
|
} = y;
|
|
42734
|
-
if (X = n0, N.setVarCacheData(c0), B.setFuncCacheData(Y), h = m0, d = y0, ((
|
|
42735
|
+
if (X = n0, N.setVarCacheData(c0), B.setFuncCacheData(Y), h = m0, d = y0, ((H = r[0]) == null ? void 0 : H.time) > (g0 == null ? void 0 : g0.time) && r.unshift(g0), N.setCustomTimeframe = h, h && h !== g) {
|
|
42735
42736
|
const x0 = Pe(h), q0 = N.ta._currentData;
|
|
42736
42737
|
if (q = M == null ? void 0 : M[`${n.tickerid}--${x0}`], q != null && q.length) {
|
|
42737
42738
|
q[q.length - 1].isrealtime = !0, q0 != null && q0.time && (q0.time < q[0].time ? q.unshift(K(I({}, q0), {
|
|
@@ -42892,11 +42893,11 @@ ${u}`), u;
|
|
|
42892
42893
|
};
|
|
42893
42894
|
}
|
|
42894
42895
|
}
|
|
42895
|
-
const
|
|
42896
|
-
if (
|
|
42896
|
+
const P = B.errors;
|
|
42897
|
+
if (P.length && P.some((Y) => Y.type === i1.Error))
|
|
42897
42898
|
return Q1(O), {
|
|
42898
42899
|
status: 1,
|
|
42899
|
-
errors:
|
|
42900
|
+
errors: P
|
|
42900
42901
|
};
|
|
42901
42902
|
const k = B.options(R, t);
|
|
42902
42903
|
Object.assign(x, {
|
|
@@ -42924,7 +42925,7 @@ ${u}`), u;
|
|
|
42924
42925
|
return e.id && self.workerStorage.set(`cache_${e.id}`, x), {
|
|
42925
42926
|
status: 0,
|
|
42926
42927
|
requestList: A,
|
|
42927
|
-
errors:
|
|
42928
|
+
errors: P,
|
|
42928
42929
|
// cacheData: newCacheData,
|
|
42929
42930
|
options: K(I({}, S), { id: e.id })
|
|
42930
42931
|
};
|
|
@@ -48211,7 +48212,7 @@ ${u}`), u;
|
|
|
48211
48212
|
};
|
|
48212
48213
|
}
|
|
48213
48214
|
fill(e, t) {
|
|
48214
|
-
var x, N, D, B, C, X,
|
|
48215
|
+
var x, N, D, B, C, X, P, k;
|
|
48215
48216
|
const r = ["color", "top_color", "bottom_color"];
|
|
48216
48217
|
C0(e, r);
|
|
48217
48218
|
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) || [];
|
|
@@ -48221,18 +48222,18 @@ ${u}`), u;
|
|
|
48221
48222
|
if (c && p)
|
|
48222
48223
|
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, y = "hline";
|
|
48223
48224
|
else {
|
|
48224
|
-
const S = this._plots.get(b == null ? void 0 : b.key),
|
|
48225
|
+
const S = this._plots.get(b == null ? void 0 : b.key), H = this._plots.get(M == null ? void 0 : M.key), t0 = (S == null ? void 0 : S.data) || [], Z = (H == null ? void 0 : H.data) || [];
|
|
48225
48226
|
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) {
|
|
48226
|
-
const o0 = (S == null ? void 0 : S.force_overlay) && (
|
|
48227
|
-
(S != null && S.force_overlay ||
|
|
48227
|
+
const o0 = (S == null ? void 0 : S.force_overlay) && (H == null ? void 0 : H.force_overlay);
|
|
48228
|
+
(S != null && S.force_overlay || H != null && H.force_overlay) && !o0 ? this._errorListener.addError(z1.plotFillForceOverlayErr, t, s1.Error) : f.force_overlay = o0;
|
|
48228
48229
|
}
|
|
48229
48230
|
}
|
|
48230
48231
|
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) {
|
|
48231
48232
|
this._count++;
|
|
48232
|
-
const S = ((
|
|
48233
|
+
const S = ((P = this._options.indicator) == null ? void 0 : P.explicit_plot_zorder) || ((k = this._options.strategy) == null ? void 0 : k.explicit_plot_zorder), H = i ? [i] : void 0, t0 = n ? [n] : void 0, Z = o ? [o] : void 0;
|
|
48233
48234
|
this._fills.set(d, K(I({
|
|
48234
48235
|
id: d,
|
|
48235
|
-
colors:
|
|
48236
|
+
colors: H,
|
|
48236
48237
|
top_colors: t0,
|
|
48237
48238
|
bottom_colors: Z,
|
|
48238
48239
|
display: g,
|
|
@@ -48726,11 +48727,11 @@ ${u}`), u;
|
|
|
48726
48727
|
if (!C.length)
|
|
48727
48728
|
return [];
|
|
48728
48729
|
if (C.length - 1 < 0) return [];
|
|
48729
|
-
const
|
|
48730
|
+
const P = C.slice(D);
|
|
48730
48731
|
let k = M, S = h ? M : B + k;
|
|
48731
48732
|
h ? k = l : O && S > O && (S = O);
|
|
48732
|
-
const
|
|
48733
|
-
for (const [t0, Z] of
|
|
48733
|
+
const H = [];
|
|
48734
|
+
for (const [t0, Z] of P.entries()) {
|
|
48734
48735
|
let { time: o0, barIndex: b0, openTime: G } = Z;
|
|
48735
48736
|
o0 = o0 * 1e3, d && (o0 = G);
|
|
48736
48737
|
let J = b0 || D + t0;
|
|
@@ -48738,19 +48739,19 @@ ${u}`), u;
|
|
|
48738
48739
|
return !u && (this._cacheData[r] = {
|
|
48739
48740
|
index: J,
|
|
48740
48741
|
periodStamp: B
|
|
48741
|
-
}),
|
|
48742
|
+
}), H;
|
|
48742
48743
|
if (k <= o0 && o0 < S) {
|
|
48743
48744
|
const Y = (N = Z == null ? void 0 : Z.result) == null ? void 0 : N[r];
|
|
48744
48745
|
if (Array.isArray(Y))
|
|
48745
48746
|
for (const [c0, n0] of Y.entries())
|
|
48746
|
-
|
|
48747
|
-
else i ||
|
|
48747
|
+
H[c0] || (H[c0] = []), H[c0].push(n0);
|
|
48748
|
+
else i || H.push(Y);
|
|
48748
48749
|
}
|
|
48749
48750
|
}
|
|
48750
48751
|
return !u && (this._cacheData[r] = {
|
|
48751
48752
|
index: C.length,
|
|
48752
48753
|
periodStamp: B
|
|
48753
|
-
}),
|
|
48754
|
+
}), H;
|
|
48754
48755
|
}
|
|
48755
48756
|
}
|
|
48756
48757
|
_getRequestData(e, t) {
|
|
@@ -48781,12 +48782,12 @@ ${u}`), u;
|
|
|
48781
48782
|
};
|
|
48782
48783
|
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)) {
|
|
48783
48784
|
const C = ne(f.tickerid), X = ne(r);
|
|
48784
|
-
let
|
|
48785
|
-
const k = V0(p, M, C) * 1e3, { index: S = 0, periodStamp:
|
|
48785
|
+
let P = V0(i, M, X) * 1e3;
|
|
48786
|
+
const k = V0(p, M, C) * 1e3, { index: S = 0, periodStamp: H = k } = this._cacheData[t] || {}, { list: t0 } = (h == null ? void 0 : h.get(O)) || {};
|
|
48786
48787
|
if (!t0.length)
|
|
48787
48788
|
return;
|
|
48788
48789
|
const Z = t0.slice(S);
|
|
48789
|
-
let o0 = M, b0 = C ? M :
|
|
48790
|
+
let o0 = M, b0 = C ? M : H + o0;
|
|
48790
48791
|
C ? o0 = l : u && b0 > u && (b0 = u);
|
|
48791
48792
|
const G = t0.length - 1;
|
|
48792
48793
|
if (G < 0) return;
|
|
@@ -48796,16 +48797,16 @@ ${u}`), u;
|
|
|
48796
48797
|
interval: i,
|
|
48797
48798
|
mintick: b
|
|
48798
48799
|
};
|
|
48799
|
-
if (
|
|
48800
|
+
if (P > H) {
|
|
48800
48801
|
let Y;
|
|
48801
48802
|
if (a === Ai.lookaheadOn ? Y = this._lookaheadOnHandle(
|
|
48802
48803
|
Z,
|
|
48803
48804
|
i,
|
|
48804
48805
|
b0,
|
|
48805
|
-
|
|
48806
|
+
P,
|
|
48806
48807
|
J,
|
|
48807
48808
|
S,
|
|
48808
|
-
|
|
48809
|
+
H,
|
|
48809
48810
|
t,
|
|
48810
48811
|
o0,
|
|
48811
48812
|
o,
|
|
@@ -48814,10 +48815,10 @@ ${u}`), u;
|
|
|
48814
48815
|
Z,
|
|
48815
48816
|
i,
|
|
48816
48817
|
b0,
|
|
48817
|
-
|
|
48818
|
+
P,
|
|
48818
48819
|
J,
|
|
48819
48820
|
S,
|
|
48820
|
-
|
|
48821
|
+
H,
|
|
48821
48822
|
t,
|
|
48822
48823
|
o0,
|
|
48823
48824
|
(X ? M : u) || b0,
|
|
@@ -48828,19 +48829,19 @@ ${u}`), u;
|
|
|
48828
48829
|
} else if (a === Ai.lookaheadOn)
|
|
48829
48830
|
for (const [Y, c0] of Z.entries()) {
|
|
48830
48831
|
let { time: n0, barIndex: m0, openTime: y0, nextBarTime: g0 } = c0;
|
|
48831
|
-
n0 = n0 * 1e3, g0 = g0 * 1e3 || (X ? n0 : ((W = Z[Y + 1]) == null ? void 0 : W.time) * 1e3 || n0 +
|
|
48832
|
+
n0 = n0 * 1e3, g0 = g0 * 1e3 || (X ? n0 : ((W = Z[Y + 1]) == null ? void 0 : W.time) * 1e3 || n0 + P), X && (n0 = y0);
|
|
48832
48833
|
let x0 = m0 || S + Y;
|
|
48833
48834
|
if (n0 >= b0 || g0 > b0) {
|
|
48834
48835
|
this._cacheData[t] = {
|
|
48835
48836
|
index: x0,
|
|
48836
|
-
periodStamp:
|
|
48837
|
+
periodStamp: H
|
|
48837
48838
|
};
|
|
48838
48839
|
return;
|
|
48839
48840
|
}
|
|
48840
48841
|
if (n0 <= o0 && g0 > o0)
|
|
48841
48842
|
return this._cacheData[t] = {
|
|
48842
48843
|
index: x0,
|
|
48843
|
-
periodStamp:
|
|
48844
|
+
periodStamp: H
|
|
48844
48845
|
}, I(K(I({}, c0), {
|
|
48845
48846
|
barIndex: x0,
|
|
48846
48847
|
nextBarTime: (R = Z[Y + 1]) == null ? void 0 : R.time,
|
|
@@ -48851,21 +48852,21 @@ ${u}`), u;
|
|
|
48851
48852
|
for (const [Y, c0] of Z.entries()) {
|
|
48852
48853
|
let { time: n0, barIndex: m0, openTime: y0 } = c0;
|
|
48853
48854
|
n0 = n0 * 1e3;
|
|
48854
|
-
const g0 = X ? n0 : n0 +
|
|
48855
|
+
const g0 = X ? n0 : n0 + P;
|
|
48855
48856
|
X && (n0 = y0);
|
|
48856
48857
|
const x0 = X ? g0 : ((w = Z[Y + 1]) == null ? void 0 : w.time) * 1e3 || g0;
|
|
48857
48858
|
let q0 = m0 || S + Y;
|
|
48858
48859
|
if (n0 > b0) {
|
|
48859
48860
|
this._cacheData[t] = {
|
|
48860
48861
|
index: q0,
|
|
48861
|
-
periodStamp:
|
|
48862
|
+
periodStamp: H
|
|
48862
48863
|
};
|
|
48863
48864
|
return;
|
|
48864
48865
|
}
|
|
48865
48866
|
if (n0 < b0 && b0 <= x0)
|
|
48866
48867
|
return this._cacheData[t] = {
|
|
48867
48868
|
index: q0,
|
|
48868
|
-
periodStamp:
|
|
48869
|
+
periodStamp: H
|
|
48869
48870
|
}, I(K(I({}, c0), {
|
|
48870
48871
|
barIndex: q0,
|
|
48871
48872
|
nextBarTime: (x = Z[Y + 1]) == null ? void 0 : x.time,
|
|
@@ -48874,7 +48875,7 @@ ${u}`), u;
|
|
|
48874
48875
|
if ((n0 >= o0 && n0 <= b0 || x0 < b0 && n0 < o0) && q0 === J.lastBarIndex)
|
|
48875
48876
|
return this._cacheData[t] = {
|
|
48876
48877
|
index: q0,
|
|
48877
|
-
periodStamp:
|
|
48878
|
+
periodStamp: H
|
|
48878
48879
|
}, I(K(I({}, c0), {
|
|
48879
48880
|
barIndex: q0,
|
|
48880
48881
|
nextBarTime: (D = Z[Y + 1]) == null ? void 0 : D.time,
|
|
@@ -48883,7 +48884,7 @@ ${u}`), u;
|
|
|
48883
48884
|
}
|
|
48884
48885
|
this._cacheData[t] = {
|
|
48885
48886
|
index: t0.length,
|
|
48886
|
-
periodStamp:
|
|
48887
|
+
periodStamp: H
|
|
48887
48888
|
};
|
|
48888
48889
|
return;
|
|
48889
48890
|
}
|
|
@@ -49115,8 +49116,8 @@ ${u}`), u;
|
|
|
49115
49116
|
});
|
|
49116
49117
|
let C;
|
|
49117
49118
|
const X = {};
|
|
49118
|
-
for (const [S,
|
|
49119
|
-
const { barindex: t0 } =
|
|
49119
|
+
for (const [S, H] of i.entries()) {
|
|
49120
|
+
const { barindex: t0 } = H, Z = yield this.requestMapHandle(
|
|
49120
49121
|
M,
|
|
49121
49122
|
x,
|
|
49122
49123
|
X,
|
|
@@ -49133,13 +49134,13 @@ ${u}`), u;
|
|
|
49133
49134
|
o || [],
|
|
49134
49135
|
t
|
|
49135
49136
|
)
|
|
49136
|
-
}), M.endExecution(), p.__isReqRepeated = !1), C = Object.assign(
|
|
49137
|
+
}), M.endExecution(), p.__isReqRepeated = !1), C = Object.assign(H, {
|
|
49137
49138
|
barIndex: t0 || S,
|
|
49138
49139
|
lastBarIndex: i[O].barindex || O,
|
|
49139
49140
|
lastBarTime: i[O].time,
|
|
49140
49141
|
nextBarTime: (u = i[S + 1]) == null ? void 0 : u.time,
|
|
49141
49142
|
preBarTime: (f = i[S - 1]) == null ? void 0 : f.time
|
|
49142
|
-
}), p.updateData(C), M.update({ barIndex: (C == null ? void 0 : C.barIndex) || 0 }),
|
|
49143
|
+
}), p.updateData(C), M.update({ barIndex: (C == null ? void 0 : C.barIndex) || 0 }), H.result = Object.assign(H.result || {}, {
|
|
49143
49144
|
[t]: l(
|
|
49144
49145
|
p,
|
|
49145
49146
|
b,
|
|
@@ -49147,7 +49148,7 @@ ${u}`), u;
|
|
|
49147
49148
|
o || [],
|
|
49148
49149
|
t
|
|
49149
49150
|
)
|
|
49150
|
-
}),
|
|
49151
|
+
}), H.openTime = p.time_open, M.endExecution(), M.errors.length && M.errors.some(
|
|
49151
49152
|
(o0) => o0.type === s1.Error
|
|
49152
49153
|
))
|
|
49153
49154
|
return {
|
|
@@ -49155,9 +49156,9 @@ ${u}`), u;
|
|
|
49155
49156
|
errors: M.errors
|
|
49156
49157
|
};
|
|
49157
49158
|
}
|
|
49158
|
-
const
|
|
49159
|
+
const P = M.log.logs, k = M.errors;
|
|
49159
49160
|
return M.log.clearLogs(), M.clearErrors(), {
|
|
49160
|
-
logs:
|
|
49161
|
+
logs: P,
|
|
49161
49162
|
errors: k,
|
|
49162
49163
|
cacheData: {
|
|
49163
49164
|
varCacheData: p.getVarCacheData(),
|
|
@@ -49186,7 +49187,7 @@ ${u}`), u;
|
|
|
49186
49187
|
let B = 0;
|
|
49187
49188
|
const { list: C, endTime: X } = (n == null ? void 0 : n.get(w)) || {};
|
|
49188
49189
|
C && (B = X || 0);
|
|
49189
|
-
const
|
|
49190
|
+
const P = ne(R) || Ci(R), [k, S] = R.split(":"), H = Number(D) <= 60 ? 1e4 : 5e3, t0 = x ? x <= 1e5 ? x : 1e5 : H, Z = {
|
|
49190
49191
|
exchange: S ? k : "X",
|
|
49191
49192
|
symbol: S || k,
|
|
49192
49193
|
limit: t0,
|
|
@@ -49200,9 +49201,9 @@ ${u}`), u;
|
|
|
49200
49201
|
ignore_invalid_symbol: N,
|
|
49201
49202
|
currentDataList: C,
|
|
49202
49203
|
startTime: B,
|
|
49203
|
-
isFutures:
|
|
49204
|
+
isFutures: P,
|
|
49204
49205
|
timeframe: y
|
|
49205
|
-
}),
|
|
49206
|
+
}), P ? h.push(ea(Z)) : h.push(Jo({ params: [Z] }));
|
|
49206
49207
|
}
|
|
49207
49208
|
const A = yield Promise.all(h), q = self.workerStorage.get(`request_${this._scriptId}_pre_data`) || /* @__PURE__ */ new Map();
|
|
49208
49209
|
for (const [g, W] of A.entries()) {
|
|
@@ -49213,7 +49214,7 @@ ${u}`), u;
|
|
|
49213
49214
|
currentDataList: B = [],
|
|
49214
49215
|
startTime: C,
|
|
49215
49216
|
isFutures: X,
|
|
49216
|
-
timeframe:
|
|
49217
|
+
timeframe: P
|
|
49217
49218
|
} = d[g];
|
|
49218
49219
|
if (R !== 200 && !D)
|
|
49219
49220
|
return {
|
|
@@ -49229,12 +49230,12 @@ ${u}`), u;
|
|
|
49229
49230
|
}
|
|
49230
49231
|
]
|
|
49231
49232
|
};
|
|
49232
|
-
const { session_display: k, timezone: S, tick_size:
|
|
49233
|
+
const { session_display: k, timezone: S, tick_size: H } = (y == null ? void 0 : y[N]) || {}, t0 = (X ? (p = y == null ? void 0 : y[N]) == null ? void 0 : p.list : (M = (b = y == null ? void 0 : y[N]) == null ? void 0 : b.list) == null ? void 0 : M.reverse()) || [];
|
|
49233
49234
|
if (X) {
|
|
49234
49235
|
const o0 = (l = y == null ? void 0 : y[N]) == null ? void 0 : l.klineBaseList, b0 = ne(N), G = t0[t0.length - 1], { newLines: J, preData: Y } = Ws(
|
|
49235
49236
|
o0,
|
|
49236
49237
|
G,
|
|
49237
|
-
|
|
49238
|
+
P,
|
|
49238
49239
|
!1,
|
|
49239
49240
|
b0 ? (u = t0[t0.length - 2]) == null ? void 0 : u.time : G == null ? void 0 : G.time,
|
|
49240
49241
|
void 0,
|
|
@@ -49246,7 +49247,7 @@ ${u}`), u;
|
|
|
49246
49247
|
}
|
|
49247
49248
|
const Z = o == null ? void 0 : o.get(x);
|
|
49248
49249
|
if (Z) {
|
|
49249
|
-
const o0 = Number(
|
|
49250
|
+
const o0 = Number(H) || 1e-5;
|
|
49250
49251
|
Z.mintick = o0;
|
|
49251
49252
|
}
|
|
49252
49253
|
Di(B, t0), n == null || n.set(x, {
|
|
@@ -49697,10 +49698,10 @@ ${u}`), u;
|
|
|
49697
49698
|
maxprofit_percent_long: B = 0,
|
|
49698
49699
|
maxprofit_percent_short: C = 0,
|
|
49699
49700
|
maxloss_percent_long: X = 0,
|
|
49700
|
-
maxloss_percent_short:
|
|
49701
|
+
maxloss_percent_short: P = 0,
|
|
49701
49702
|
hold_long_k_count: k = 0,
|
|
49702
49703
|
hold_short_k_count: S = 0,
|
|
49703
|
-
hold_profit_long_k_count:
|
|
49704
|
+
hold_profit_long_k_count: H = 0,
|
|
49704
49705
|
hold_profit_short_k_count: t0 = 0,
|
|
49705
49706
|
hold_loss_long_k_count: Z = 0,
|
|
49706
49707
|
hold_loss_short_k_count: o0 = 0,
|
|
@@ -49708,7 +49709,7 @@ ${u}`), u;
|
|
|
49708
49709
|
shapeRatioType: G = "NONE"
|
|
49709
49710
|
} = this._preHistoryOrderCalcResult;
|
|
49710
49711
|
const { profit: J = 0, profit_percent: Y = 0, in_index: c0 = 0, out_index: n0 = 0, commission: m0 = 0, direction: y0, in_time: g0 = 0, out_time: x0 = 0, total_profit: q0 = 0 } = e, F = n0 - c0 + 1;
|
|
49711
|
-
if (y0 === J0.long ? (i += J, o += 1, c += Y, R += m0, k += F, J > 0 ? (l += Y, g += 1, h += J,
|
|
49712
|
+
if (y0 === J0.long ? (i += J, o += 1, c += Y, R += m0, k += F, J > 0 ? (l += Y, g += 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, y += m0, S += 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), P = Math.min(P, Y))), !b0) {
|
|
49712
49713
|
const I0 = this._createBalanceByInterval(g0, Date.now());
|
|
49713
49714
|
b0 = I0.balanceByInterval, G = I0.shapeRatioType;
|
|
49714
49715
|
}
|
|
@@ -49748,10 +49749,10 @@ ${u}`), u;
|
|
|
49748
49749
|
maxprofit_percent_long: B,
|
|
49749
49750
|
maxprofit_percent_short: C,
|
|
49750
49751
|
maxloss_percent_long: X,
|
|
49751
|
-
maxloss_percent_short:
|
|
49752
|
+
maxloss_percent_short: P,
|
|
49752
49753
|
hold_long_k_count: k,
|
|
49753
49754
|
hold_short_k_count: S,
|
|
49754
|
-
hold_profit_long_k_count:
|
|
49755
|
+
hold_profit_long_k_count: H,
|
|
49755
49756
|
hold_profit_short_k_count: t0,
|
|
49756
49757
|
hold_loss_long_k_count: Z,
|
|
49757
49758
|
hold_loss_short_k_count: o0,
|
|
@@ -51054,7 +51055,7 @@ ${u}`), u;
|
|
|
51054
51055
|
}
|
|
51055
51056
|
function OS(s, e, t) {
|
|
51056
51057
|
return I1(this, null, function* () {
|
|
51057
|
-
var
|
|
51058
|
+
var H, t0, Z, o0, b0, G, J;
|
|
51058
51059
|
const {
|
|
51059
51060
|
data: r,
|
|
51060
51061
|
isPreParser: i,
|
|
@@ -51117,7 +51118,7 @@ ${u}`), u;
|
|
|
51117
51118
|
timeframeGaps: y0,
|
|
51118
51119
|
lastData: g0
|
|
51119
51120
|
} = y;
|
|
51120
|
-
if (X = n0, N.setVarCacheData(c0), B.setFuncCacheData(Y), h = m0, d = y0, ((
|
|
51121
|
+
if (X = n0, N.setVarCacheData(c0), B.setFuncCacheData(Y), h = m0, d = y0, ((H = r[0]) == null ? void 0 : H.time) > (g0 == null ? void 0 : g0.time) && r.unshift(g0), N.setCustomTimeframe = h, h && h !== g) {
|
|
51121
51122
|
const x0 = Pe(h), q0 = N.ta._currentData;
|
|
51122
51123
|
if (q = M == null ? void 0 : M[`${n.tickerid}--${x0}`], q != null && q.length) {
|
|
51123
51124
|
q[q.length - 1].isrealtime = !0, q0 != null && q0.time && (q0.time < q[0].time ? q.unshift(K(I({}, q0), {
|
|
@@ -51278,11 +51279,11 @@ ${u}`), u;
|
|
|
51278
51279
|
};
|
|
51279
51280
|
}
|
|
51280
51281
|
}
|
|
51281
|
-
const
|
|
51282
|
-
if (
|
|
51282
|
+
const P = B.errors;
|
|
51283
|
+
if (P.length && P.some((Y) => Y.type === s1.Error))
|
|
51283
51284
|
return Q1(O), {
|
|
51284
51285
|
status: 1,
|
|
51285
|
-
errors:
|
|
51286
|
+
errors: P
|
|
51286
51287
|
};
|
|
51287
51288
|
const k = B.options(R, t);
|
|
51288
51289
|
Object.assign(x, {
|
|
@@ -51310,7 +51311,7 @@ ${u}`), u;
|
|
|
51310
51311
|
return e.id && self.workerStorage.set(`cache_${e.id}`, x), {
|
|
51311
51312
|
status: 0,
|
|
51312
51313
|
requestList: A,
|
|
51313
|
-
errors:
|
|
51314
|
+
errors: P,
|
|
51314
51315
|
// cacheData: newCacheData,
|
|
51315
51316
|
options: K(I({}, S), { id: e.id })
|
|
51316
51317
|
};
|