@363045841yyt/klinechart 0.4.1 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +4 -4
- package/dist/index.js +881 -759
- package/dist/klinechart.css +1 -1
- package/dist/src/core/chart.d.ts +17 -8
- package/dist/src/core/layout/pane.d.ts +8 -1
- package/dist/src/core/paneRenderer.d.ts +0 -4
- package/dist/src/core/renderers/yAxis.d.ts +2 -1
- package/dist/src/plugin/rendererPluginManager.d.ts +2 -2
- package/dist/src/plugin/types.d.ts +13 -0
- package/dist/src/utils/kLineDraw/axis.d.ts +4 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -69,35 +69,35 @@ function ue(e) {
|
|
|
69
69
|
let t;
|
|
70
70
|
return t = typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(e) : e && e.buffer && le(e.buffer), t;
|
|
71
71
|
}
|
|
72
|
-
var de = oe("string"), B = oe("function"), fe = oe("number"),
|
|
72
|
+
var de = oe("string"), B = oe("function"), fe = oe("number"), V = (e) => typeof e == "object" && !!e, pe = (e) => e === !0 || e === !1, H = (e) => {
|
|
73
73
|
if (ae(e) !== "object") return !1;
|
|
74
74
|
let t = L(e);
|
|
75
75
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(ie in e) && !(re in e);
|
|
76
|
-
},
|
|
77
|
-
if (!
|
|
76
|
+
}, me = (e) => {
|
|
77
|
+
if (!V(e) || ce(e)) return !1;
|
|
78
78
|
try {
|
|
79
79
|
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
80
80
|
} catch {
|
|
81
81
|
return !1;
|
|
82
82
|
}
|
|
83
|
-
},
|
|
84
|
-
function
|
|
83
|
+
}, he = R("Date"), ge = R("File"), _e = (e) => !!(e && e.uri !== void 0), ve = (e) => e && e.getParts !== void 0, ye = R("Blob"), be = R("FileList"), xe = (e) => V(e) && B(e.pipe);
|
|
84
|
+
function Se() {
|
|
85
85
|
return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
|
|
86
86
|
}
|
|
87
|
-
var
|
|
87
|
+
var Ce = Se(), we = Ce.FormData === void 0 ? void 0 : Ce.FormData, Te = (e) => {
|
|
88
88
|
if (!e) return !1;
|
|
89
|
-
if (
|
|
89
|
+
if (we && e instanceof we) return !0;
|
|
90
90
|
let t = L(e);
|
|
91
91
|
if (!t || t === Object.prototype || !B(e.append)) return !1;
|
|
92
92
|
let n = ae(e);
|
|
93
93
|
return n === "formdata" || n === "object" && B(e.toString) && e.toString() === "[object FormData]";
|
|
94
|
-
},
|
|
94
|
+
}, Ee = R("URLSearchParams"), [De, Oe, ke, Ae] = [
|
|
95
95
|
"ReadableStream",
|
|
96
96
|
"Request",
|
|
97
97
|
"Response",
|
|
98
98
|
"Headers"
|
|
99
|
-
].map(R),
|
|
100
|
-
function
|
|
99
|
+
].map(R), je = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
100
|
+
function Me(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
101
101
|
if (e == null) return;
|
|
102
102
|
let r, i;
|
|
103
103
|
if (typeof e != "object" && (e = [e]), se(e)) for (r = 0, i = e.length; r < i; r++) t.call(null, e[r], r, e);
|
|
@@ -107,24 +107,24 @@ function je(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
107
107
|
for (r = 0; r < a; r++) o = i[r], t.call(null, e[o], o, e);
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function Ne(e, t) {
|
|
111
111
|
if (ce(e)) return null;
|
|
112
112
|
t = t.toLowerCase();
|
|
113
113
|
let n = Object.keys(e), r = n.length, i;
|
|
114
114
|
for (; r-- > 0;) if (i = n[r], t === i.toLowerCase()) return i;
|
|
115
115
|
return null;
|
|
116
116
|
}
|
|
117
|
-
var
|
|
118
|
-
function
|
|
119
|
-
let { caseless: e, skipUndefined: t } =
|
|
117
|
+
var Pe = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Fe = (e) => !z(e) && e !== Pe;
|
|
118
|
+
function Ie() {
|
|
119
|
+
let { caseless: e, skipUndefined: t } = Fe(this) && this || {}, n = {}, r = (r, i) => {
|
|
120
120
|
if (i === "__proto__" || i === "constructor" || i === "prototype") return;
|
|
121
|
-
let a = e &&
|
|
122
|
-
H(n[a]) && H(r) ? n[a] =
|
|
121
|
+
let a = e && Ne(n, i) || i;
|
|
122
|
+
H(n[a]) && H(r) ? n[a] = Ie(n[a], r) : H(r) ? n[a] = Ie({}, r) : se(r) ? n[a] = r.slice() : (!t || !z(r)) && (n[a] = r);
|
|
123
123
|
};
|
|
124
|
-
for (let e = 0, t = arguments.length; e < t; e++) arguments[e] &&
|
|
124
|
+
for (let e = 0, t = arguments.length; e < t; e++) arguments[e] && Me(arguments[e], r);
|
|
125
125
|
return n;
|
|
126
126
|
}
|
|
127
|
-
var
|
|
127
|
+
var Le = (e, t, n, { allOwnKeys: r } = {}) => (Me(t, (t, r) => {
|
|
128
128
|
n && B(t) ? Object.defineProperty(e, r, {
|
|
129
129
|
value: te(t, n),
|
|
130
130
|
writable: !0,
|
|
@@ -136,14 +136,14 @@ var Ie = (e, t, n, { allOwnKeys: r } = {}) => (je(t, (t, r) => {
|
|
|
136
136
|
enumerable: !0,
|
|
137
137
|
configurable: !0
|
|
138
138
|
});
|
|
139
|
-
}, { allOwnKeys: r }), e),
|
|
139
|
+
}, { allOwnKeys: r }), e), Re = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), ze = (e, t, n, r) => {
|
|
140
140
|
e.prototype = Object.create(t.prototype, r), Object.defineProperty(e.prototype, "constructor", {
|
|
141
141
|
value: e,
|
|
142
142
|
writable: !0,
|
|
143
143
|
enumerable: !1,
|
|
144
144
|
configurable: !0
|
|
145
145
|
}), Object.defineProperty(e, "super", { value: t.prototype }), n && Object.assign(e.prototype, n);
|
|
146
|
-
},
|
|
146
|
+
}, Be = (e, t, n, r) => {
|
|
147
147
|
let i, a, o, s = {};
|
|
148
148
|
if (t ||= {}, e == null) return t;
|
|
149
149
|
do {
|
|
@@ -151,11 +151,11 @@ var Ie = (e, t, n, { allOwnKeys: r } = {}) => (je(t, (t, r) => {
|
|
|
151
151
|
e = n !== !1 && L(e);
|
|
152
152
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
153
153
|
return t;
|
|
154
|
-
},
|
|
154
|
+
}, Ve = (e, t, n) => {
|
|
155
155
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
156
156
|
let r = e.indexOf(t, n);
|
|
157
157
|
return r !== -1 && r === n;
|
|
158
|
-
},
|
|
158
|
+
}, He = (e) => {
|
|
159
159
|
if (!e) return null;
|
|
160
160
|
if (se(e)) return e;
|
|
161
161
|
let t = e.length;
|
|
@@ -163,26 +163,26 @@ var Ie = (e, t, n, { allOwnKeys: r } = {}) => (je(t, (t, r) => {
|
|
|
163
163
|
let n = Array(t);
|
|
164
164
|
for (; t-- > 0;) n[t] = e[t];
|
|
165
165
|
return n;
|
|
166
|
-
},
|
|
166
|
+
}, Ue = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && L(Uint8Array)), We = (e, t) => {
|
|
167
167
|
let n = (e && e[re]).call(e), r;
|
|
168
168
|
for (; (r = n.next()) && !r.done;) {
|
|
169
169
|
let n = r.value;
|
|
170
170
|
t.call(e, n[0], n[1]);
|
|
171
171
|
}
|
|
172
|
-
},
|
|
172
|
+
}, Ge = (e, t) => {
|
|
173
173
|
let n, r = [];
|
|
174
174
|
for (; (n = e.exec(t)) !== null;) r.push(n);
|
|
175
175
|
return r;
|
|
176
|
-
},
|
|
176
|
+
}, Ke = R("HTMLFormElement"), qe = (e) => e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(e, t, n) {
|
|
177
177
|
return t.toUpperCase() + n;
|
|
178
|
-
}),
|
|
178
|
+
}), Je = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Ye = R("RegExp"), Xe = (e, t) => {
|
|
179
179
|
let n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
180
|
-
|
|
180
|
+
Me(n, (n, i) => {
|
|
181
181
|
let a;
|
|
182
182
|
(a = t(n, i, e)) !== !1 && (r[i] = a || n);
|
|
183
183
|
}), Object.defineProperties(e, r);
|
|
184
|
-
},
|
|
185
|
-
|
|
184
|
+
}, Ze = (e) => {
|
|
185
|
+
Xe(e, (t, n) => {
|
|
186
186
|
if (B(e) && [
|
|
187
187
|
"arguments",
|
|
188
188
|
"caller",
|
|
@@ -199,26 +199,26 @@ var Ie = (e, t, n, { allOwnKeys: r } = {}) => (je(t, (t, r) => {
|
|
|
199
199
|
};
|
|
200
200
|
}
|
|
201
201
|
});
|
|
202
|
-
},
|
|
202
|
+
}, Qe = (e, t) => {
|
|
203
203
|
let n = {}, r = (e) => {
|
|
204
204
|
e.forEach((e) => {
|
|
205
205
|
n[e] = !0;
|
|
206
206
|
});
|
|
207
207
|
};
|
|
208
208
|
return se(e) ? r(e) : r(String(e).split(t)), n;
|
|
209
|
-
},
|
|
210
|
-
function
|
|
209
|
+
}, $e = () => {}, et = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
210
|
+
function tt(e) {
|
|
211
211
|
return !!(e && B(e.append) && e[ie] === "FormData" && e[re]);
|
|
212
212
|
}
|
|
213
|
-
var
|
|
213
|
+
var nt = (e) => {
|
|
214
214
|
let t = Array(10), n = (e, r) => {
|
|
215
|
-
if (
|
|
215
|
+
if (V(e)) {
|
|
216
216
|
if (t.indexOf(e) >= 0) return;
|
|
217
217
|
if (ce(e)) return e;
|
|
218
218
|
if (!("toJSON" in e)) {
|
|
219
219
|
t[r] = e;
|
|
220
220
|
let i = se(e) ? [] : {};
|
|
221
|
-
return
|
|
221
|
+
return Me(e, (e, t) => {
|
|
222
222
|
let a = n(e, r + 1);
|
|
223
223
|
!z(a) && (i[t] = a);
|
|
224
224
|
}), t[r] = void 0, i;
|
|
@@ -227,71 +227,71 @@ var tt = (e) => {
|
|
|
227
227
|
return e;
|
|
228
228
|
};
|
|
229
229
|
return n(e, 0);
|
|
230
|
-
},
|
|
231
|
-
n ===
|
|
230
|
+
}, rt = R("AsyncFunction"), it = (e) => e && (V(e) || B(e)) && B(e.then) && B(e.catch), at = ((e, t) => e ? setImmediate : t ? ((e, t) => (Pe.addEventListener("message", ({ source: n, data: r }) => {
|
|
231
|
+
n === Pe && r === e && t.length && t.shift()();
|
|
232
232
|
}, !1), (n) => {
|
|
233
|
-
t.push(n),
|
|
234
|
-
}))(`axios@${Math.random()}`, []) : (e) => setTimeout(e))(typeof setImmediate == "function", B(
|
|
233
|
+
t.push(n), Pe.postMessage(e, "*");
|
|
234
|
+
}))(`axios@${Math.random()}`, []) : (e) => setTimeout(e))(typeof setImmediate == "function", B(Pe.postMessage)), U = {
|
|
235
235
|
isArray: se,
|
|
236
236
|
isArrayBuffer: le,
|
|
237
237
|
isBuffer: ce,
|
|
238
|
-
isFormData:
|
|
238
|
+
isFormData: Te,
|
|
239
239
|
isArrayBufferView: ue,
|
|
240
240
|
isString: de,
|
|
241
241
|
isNumber: fe,
|
|
242
|
-
isBoolean:
|
|
243
|
-
isObject:
|
|
242
|
+
isBoolean: pe,
|
|
243
|
+
isObject: V,
|
|
244
244
|
isPlainObject: H,
|
|
245
|
-
isEmptyObject:
|
|
246
|
-
isReadableStream:
|
|
247
|
-
isRequest:
|
|
248
|
-
isResponse:
|
|
249
|
-
isHeaders:
|
|
245
|
+
isEmptyObject: me,
|
|
246
|
+
isReadableStream: De,
|
|
247
|
+
isRequest: Oe,
|
|
248
|
+
isResponse: ke,
|
|
249
|
+
isHeaders: Ae,
|
|
250
250
|
isUndefined: z,
|
|
251
|
-
isDate:
|
|
252
|
-
isFile:
|
|
253
|
-
isReactNativeBlob:
|
|
254
|
-
isReactNative:
|
|
255
|
-
isBlob:
|
|
256
|
-
isRegExp:
|
|
251
|
+
isDate: he,
|
|
252
|
+
isFile: ge,
|
|
253
|
+
isReactNativeBlob: _e,
|
|
254
|
+
isReactNative: ve,
|
|
255
|
+
isBlob: ye,
|
|
256
|
+
isRegExp: Ye,
|
|
257
257
|
isFunction: B,
|
|
258
|
-
isStream:
|
|
259
|
-
isURLSearchParams:
|
|
260
|
-
isTypedArray:
|
|
261
|
-
isFileList:
|
|
262
|
-
forEach:
|
|
263
|
-
merge:
|
|
264
|
-
extend:
|
|
265
|
-
trim:
|
|
266
|
-
stripBOM:
|
|
267
|
-
inherits:
|
|
268
|
-
toFlatObject:
|
|
258
|
+
isStream: xe,
|
|
259
|
+
isURLSearchParams: Ee,
|
|
260
|
+
isTypedArray: Ue,
|
|
261
|
+
isFileList: be,
|
|
262
|
+
forEach: Me,
|
|
263
|
+
merge: Ie,
|
|
264
|
+
extend: Le,
|
|
265
|
+
trim: je,
|
|
266
|
+
stripBOM: Re,
|
|
267
|
+
inherits: ze,
|
|
268
|
+
toFlatObject: Be,
|
|
269
269
|
kindOf: ae,
|
|
270
270
|
kindOfTest: R,
|
|
271
|
-
endsWith:
|
|
272
|
-
toArray:
|
|
273
|
-
forEachEntry:
|
|
274
|
-
matchAll:
|
|
275
|
-
isHTMLForm:
|
|
276
|
-
hasOwnProperty:
|
|
277
|
-
hasOwnProp:
|
|
278
|
-
reduceDescriptors:
|
|
279
|
-
freezeMethods:
|
|
280
|
-
toObjectSet:
|
|
281
|
-
toCamelCase:
|
|
282
|
-
noop:
|
|
283
|
-
toFiniteNumber:
|
|
284
|
-
findKey:
|
|
285
|
-
global:
|
|
286
|
-
isContextDefined:
|
|
287
|
-
isSpecCompliantForm:
|
|
288
|
-
toJSONObject:
|
|
289
|
-
isAsyncFn:
|
|
290
|
-
isThenable:
|
|
291
|
-
setImmediate:
|
|
292
|
-
asap: typeof queueMicrotask < "u" ? queueMicrotask.bind(
|
|
271
|
+
endsWith: Ve,
|
|
272
|
+
toArray: He,
|
|
273
|
+
forEachEntry: We,
|
|
274
|
+
matchAll: Ge,
|
|
275
|
+
isHTMLForm: Ke,
|
|
276
|
+
hasOwnProperty: Je,
|
|
277
|
+
hasOwnProp: Je,
|
|
278
|
+
reduceDescriptors: Xe,
|
|
279
|
+
freezeMethods: Ze,
|
|
280
|
+
toObjectSet: Qe,
|
|
281
|
+
toCamelCase: qe,
|
|
282
|
+
noop: $e,
|
|
283
|
+
toFiniteNumber: et,
|
|
284
|
+
findKey: Ne,
|
|
285
|
+
global: Pe,
|
|
286
|
+
isContextDefined: Fe,
|
|
287
|
+
isSpecCompliantForm: tt,
|
|
288
|
+
toJSONObject: nt,
|
|
289
|
+
isAsyncFn: rt,
|
|
290
|
+
isThenable: it,
|
|
291
|
+
setImmediate: at,
|
|
292
|
+
asap: typeof queueMicrotask < "u" ? queueMicrotask.bind(Pe) : typeof process < "u" && process.nextTick || at,
|
|
293
293
|
isIterable: (e) => e != null && B(e[re])
|
|
294
|
-
},
|
|
294
|
+
}, W = class e extends Error {
|
|
295
295
|
static from(t, n, r, i, a, o) {
|
|
296
296
|
let s = new e(t.message, n || t.code, r, i, a);
|
|
297
297
|
return s.cause = t, s.name = t.name, t.status != null && s.status == null && (s.status = t.status), o && Object.assign(s, o), s;
|
|
@@ -314,81 +314,81 @@ var tt = (e) => {
|
|
|
314
314
|
lineNumber: this.lineNumber,
|
|
315
315
|
columnNumber: this.columnNumber,
|
|
316
316
|
stack: this.stack,
|
|
317
|
-
config:
|
|
317
|
+
config: U.toJSONObject(this.config),
|
|
318
318
|
code: this.code,
|
|
319
319
|
status: this.status
|
|
320
320
|
};
|
|
321
321
|
}
|
|
322
322
|
};
|
|
323
|
-
|
|
323
|
+
W.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE", W.ERR_BAD_OPTION = "ERR_BAD_OPTION", W.ECONNABORTED = "ECONNABORTED", W.ETIMEDOUT = "ETIMEDOUT", W.ERR_NETWORK = "ERR_NETWORK", W.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS", W.ERR_DEPRECATED = "ERR_DEPRECATED", W.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE", W.ERR_BAD_REQUEST = "ERR_BAD_REQUEST", W.ERR_CANCELED = "ERR_CANCELED", W.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT", W.ERR_INVALID_URL = "ERR_INVALID_URL", W.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
|
|
324
324
|
//#endregion
|
|
325
325
|
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/helpers/toFormData.js
|
|
326
|
-
function at(e) {
|
|
327
|
-
return W.isPlainObject(e) || W.isArray(e);
|
|
328
|
-
}
|
|
329
326
|
function ot(e) {
|
|
330
|
-
return
|
|
327
|
+
return U.isPlainObject(e) || U.isArray(e);
|
|
328
|
+
}
|
|
329
|
+
function st(e) {
|
|
330
|
+
return U.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
331
331
|
}
|
|
332
|
-
function
|
|
332
|
+
function ct(e, t, n) {
|
|
333
333
|
return e ? e.concat(t).map(function(e, t) {
|
|
334
|
-
return e =
|
|
334
|
+
return e = st(e), !n && t ? "[" + e + "]" : e;
|
|
335
335
|
}).join(n ? "." : "") : t;
|
|
336
336
|
}
|
|
337
|
-
function
|
|
338
|
-
return
|
|
337
|
+
function lt(e) {
|
|
338
|
+
return U.isArray(e) && !e.some(ot);
|
|
339
339
|
}
|
|
340
|
-
var
|
|
340
|
+
var ut = U.toFlatObject(U, {}, null, function(e) {
|
|
341
341
|
return /^is[A-Z]/.test(e);
|
|
342
342
|
});
|
|
343
|
-
function
|
|
344
|
-
if (!
|
|
345
|
-
t ||= new FormData(), n =
|
|
343
|
+
function dt(e, t, n) {
|
|
344
|
+
if (!U.isObject(e)) throw TypeError("target must be an object");
|
|
345
|
+
t ||= new FormData(), n = U.toFlatObject(n, {
|
|
346
346
|
metaTokens: !0,
|
|
347
347
|
dots: !1,
|
|
348
348
|
indexes: !1
|
|
349
349
|
}, !1, function(e, t) {
|
|
350
|
-
return !
|
|
350
|
+
return !U.isUndefined(t[e]);
|
|
351
351
|
});
|
|
352
|
-
let r = n.metaTokens, i = n.visitor || d, a = n.dots, o = n.indexes, s = n.Blob || typeof Blob < "u" && Blob, c = n.maxDepth === void 0 ? 100 : n.maxDepth, l = s &&
|
|
353
|
-
if (!
|
|
352
|
+
let r = n.metaTokens, i = n.visitor || d, a = n.dots, o = n.indexes, s = n.Blob || typeof Blob < "u" && Blob, c = n.maxDepth === void 0 ? 100 : n.maxDepth, l = s && U.isSpecCompliantForm(t);
|
|
353
|
+
if (!U.isFunction(i)) throw TypeError("visitor must be a function");
|
|
354
354
|
function u(e) {
|
|
355
355
|
if (e === null) return "";
|
|
356
|
-
if (
|
|
357
|
-
if (
|
|
358
|
-
if (!l &&
|
|
359
|
-
return
|
|
356
|
+
if (U.isDate(e)) return e.toISOString();
|
|
357
|
+
if (U.isBoolean(e)) return e.toString();
|
|
358
|
+
if (!l && U.isBlob(e)) throw new W("Blob is not supported. Use a Buffer instead.");
|
|
359
|
+
return U.isArrayBuffer(e) || U.isTypedArray(e) ? l && typeof Blob == "function" ? new Blob([e]) : Buffer.from(e) : e;
|
|
360
360
|
}
|
|
361
361
|
function d(e, n, i) {
|
|
362
362
|
let s = e;
|
|
363
|
-
if (
|
|
363
|
+
if (U.isReactNative(t) && U.isReactNativeBlob(e)) return t.append(ct(i, n, a), u(e)), !1;
|
|
364
364
|
if (e && !i && typeof e == "object") {
|
|
365
|
-
if (
|
|
366
|
-
else if (
|
|
367
|
-
!(
|
|
365
|
+
if (U.endsWith(n, "{}")) n = r ? n : n.slice(0, -2), e = JSON.stringify(e);
|
|
366
|
+
else if (U.isArray(e) && lt(e) || (U.isFileList(e) || U.endsWith(n, "[]")) && (s = U.toArray(e))) return n = st(n), s.forEach(function(e, r) {
|
|
367
|
+
!(U.isUndefined(e) || e === null) && t.append(o === !0 ? ct([n], r, a) : o === null ? n : n + "[]", u(e));
|
|
368
368
|
}), !1;
|
|
369
369
|
}
|
|
370
|
-
return
|
|
370
|
+
return ot(e) ? !0 : (t.append(ct(i, n, a), u(e)), !1);
|
|
371
371
|
}
|
|
372
|
-
let f = [], p = Object.assign(
|
|
372
|
+
let f = [], p = Object.assign(ut, {
|
|
373
373
|
defaultVisitor: d,
|
|
374
374
|
convertValue: u,
|
|
375
|
-
isVisitable:
|
|
375
|
+
isVisitable: ot
|
|
376
376
|
});
|
|
377
377
|
function m(e, n, r = 0) {
|
|
378
|
-
if (!
|
|
379
|
-
if (r > c) throw new
|
|
378
|
+
if (!U.isUndefined(e)) {
|
|
379
|
+
if (r > c) throw new W("Object is too deeply nested (" + r + " levels). Max depth: " + c, W.ERR_FORM_DATA_DEPTH_EXCEEDED);
|
|
380
380
|
if (f.indexOf(e) !== -1) throw Error("Circular reference detected in " + n.join("."));
|
|
381
|
-
f.push(e),
|
|
382
|
-
(!(
|
|
381
|
+
f.push(e), U.forEach(e, function(e, a) {
|
|
382
|
+
(!(U.isUndefined(e) || e === null) && i.call(t, e, U.isString(a) ? a.trim() : a, n, p)) === !0 && m(e, n ? n.concat(a) : [a], r + 1);
|
|
383
383
|
}), f.pop();
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
|
-
if (!
|
|
386
|
+
if (!U.isObject(e)) throw TypeError("data must be an object");
|
|
387
387
|
return m(e), t;
|
|
388
388
|
}
|
|
389
389
|
//#endregion
|
|
390
390
|
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/helpers/AxiosURLSearchParams.js
|
|
391
|
-
function
|
|
391
|
+
function ft(e) {
|
|
392
392
|
let t = {
|
|
393
393
|
"!": "%21",
|
|
394
394
|
"'": "%27",
|
|
@@ -401,29 +401,29 @@ function dt(e) {
|
|
|
401
401
|
return t[e];
|
|
402
402
|
});
|
|
403
403
|
}
|
|
404
|
-
function
|
|
405
|
-
this._pairs = [], e &&
|
|
404
|
+
function pt(e, t) {
|
|
405
|
+
this._pairs = [], e && dt(e, this, t);
|
|
406
406
|
}
|
|
407
|
-
var
|
|
408
|
-
|
|
407
|
+
var mt = pt.prototype;
|
|
408
|
+
mt.append = function(e, t) {
|
|
409
409
|
this._pairs.push([e, t]);
|
|
410
|
-
},
|
|
410
|
+
}, mt.toString = function(e) {
|
|
411
411
|
let t = e ? function(t) {
|
|
412
|
-
return e.call(this, t,
|
|
413
|
-
} :
|
|
412
|
+
return e.call(this, t, ft);
|
|
413
|
+
} : ft;
|
|
414
414
|
return this._pairs.map(function(e) {
|
|
415
415
|
return t(e[0]) + "=" + t(e[1]);
|
|
416
416
|
}, "").join("&");
|
|
417
417
|
};
|
|
418
418
|
//#endregion
|
|
419
419
|
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/helpers/buildURL.js
|
|
420
|
-
function
|
|
420
|
+
function ht(e) {
|
|
421
421
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
422
422
|
}
|
|
423
|
-
function
|
|
423
|
+
function gt(e, t, n) {
|
|
424
424
|
if (!t) return e;
|
|
425
|
-
let r = n && n.encode ||
|
|
426
|
-
if (o = a ? a(t, i) :
|
|
425
|
+
let r = n && n.encode || ht, i = U.isFunction(n) ? { serialize: n } : n, a = i && i.serialize, o;
|
|
426
|
+
if (o = a ? a(t, i) : U.isURLSearchParams(t) ? t.toString() : new pt(t, i).toString(r), o) {
|
|
427
427
|
let t = e.indexOf("#");
|
|
428
428
|
t !== -1 && (e = e.slice(0, t)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
429
429
|
}
|
|
@@ -431,7 +431,7 @@ function ht(e, t, n) {
|
|
|
431
431
|
}
|
|
432
432
|
//#endregion
|
|
433
433
|
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/core/InterceptorManager.js
|
|
434
|
-
var
|
|
434
|
+
var _t = class {
|
|
435
435
|
constructor() {
|
|
436
436
|
this.handlers = [];
|
|
437
437
|
}
|
|
@@ -450,19 +450,19 @@ var gt = class {
|
|
|
450
450
|
this.handlers &&= [];
|
|
451
451
|
}
|
|
452
452
|
forEach(e) {
|
|
453
|
-
|
|
453
|
+
U.forEach(this.handlers, function(t) {
|
|
454
454
|
t !== null && e(t);
|
|
455
455
|
});
|
|
456
456
|
}
|
|
457
|
-
},
|
|
457
|
+
}, vt = {
|
|
458
458
|
silentJSONParsing: !0,
|
|
459
459
|
forcedJSONParsing: !0,
|
|
460
460
|
clarifyTimeoutError: !1,
|
|
461
461
|
legacyInterceptorReqResOrdering: !0
|
|
462
|
-
},
|
|
462
|
+
}, yt = {
|
|
463
463
|
isBrowser: !0,
|
|
464
464
|
classes: {
|
|
465
|
-
URLSearchParams: typeof URLSearchParams < "u" ? URLSearchParams :
|
|
465
|
+
URLSearchParams: typeof URLSearchParams < "u" ? URLSearchParams : pt,
|
|
466
466
|
FormData: typeof FormData < "u" ? FormData : null,
|
|
467
467
|
Blob: typeof Blob < "u" ? Blob : null
|
|
468
468
|
},
|
|
@@ -474,99 +474,99 @@ var gt = class {
|
|
|
474
474
|
"url",
|
|
475
475
|
"data"
|
|
476
476
|
]
|
|
477
|
-
},
|
|
478
|
-
hasBrowserEnv: () =>
|
|
479
|
-
hasStandardBrowserEnv: () =>
|
|
480
|
-
hasStandardBrowserWebWorkerEnv: () =>
|
|
481
|
-
navigator: () =>
|
|
482
|
-
origin: () =>
|
|
483
|
-
}),
|
|
477
|
+
}, bt = /* @__PURE__ */ N({
|
|
478
|
+
hasBrowserEnv: () => xt,
|
|
479
|
+
hasStandardBrowserEnv: () => Ct,
|
|
480
|
+
hasStandardBrowserWebWorkerEnv: () => wt,
|
|
481
|
+
navigator: () => St,
|
|
482
|
+
origin: () => Tt
|
|
483
|
+
}), xt = typeof window < "u" && typeof document < "u", St = typeof navigator == "object" && navigator || void 0, Ct = xt && (!St || [
|
|
484
484
|
"ReactNative",
|
|
485
485
|
"NativeScript",
|
|
486
486
|
"NS"
|
|
487
|
-
].indexOf(
|
|
488
|
-
...
|
|
489
|
-
...
|
|
487
|
+
].indexOf(St.product) < 0), wt = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Tt = xt && window.location.href || "http://localhost", G = {
|
|
488
|
+
...bt,
|
|
489
|
+
...yt
|
|
490
490
|
};
|
|
491
491
|
//#endregion
|
|
492
492
|
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/helpers/toURLEncodedForm.js
|
|
493
|
-
function
|
|
494
|
-
return
|
|
493
|
+
function Et(e, t) {
|
|
494
|
+
return dt(e, new G.classes.URLSearchParams(), {
|
|
495
495
|
visitor: function(e, t, n, r) {
|
|
496
|
-
return
|
|
496
|
+
return G.isNode && U.isBuffer(e) ? (this.append(t, e.toString("base64")), !1) : r.defaultVisitor.apply(this, arguments);
|
|
497
497
|
},
|
|
498
498
|
...t
|
|
499
499
|
});
|
|
500
500
|
}
|
|
501
501
|
//#endregion
|
|
502
502
|
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/helpers/formDataToJSON.js
|
|
503
|
-
function Et(e) {
|
|
504
|
-
return W.matchAll(/\w+|\[(\w*)]/g, e).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
505
|
-
}
|
|
506
503
|
function Dt(e) {
|
|
504
|
+
return U.matchAll(/\w+|\[(\w*)]/g, e).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
505
|
+
}
|
|
506
|
+
function Ot(e) {
|
|
507
507
|
let t = {}, n = Object.keys(e), r, i = n.length, a;
|
|
508
508
|
for (r = 0; r < i; r++) a = n[r], t[a] = e[a];
|
|
509
509
|
return t;
|
|
510
510
|
}
|
|
511
|
-
function
|
|
511
|
+
function kt(e) {
|
|
512
512
|
function t(e, n, r, i) {
|
|
513
513
|
let a = e[i++];
|
|
514
514
|
if (a === "__proto__") return !0;
|
|
515
515
|
let o = Number.isFinite(+a), s = i >= e.length;
|
|
516
|
-
return a = !a &&
|
|
516
|
+
return a = !a && U.isArray(r) ? r.length : a, s ? (U.hasOwnProp(r, a) ? r[a] = U.isArray(r[a]) ? r[a].concat(n) : [r[a], n] : r[a] = n, !o) : ((!r[a] || !U.isObject(r[a])) && (r[a] = []), t(e, n, r[a], i) && U.isArray(r[a]) && (r[a] = Ot(r[a])), !o);
|
|
517
517
|
}
|
|
518
|
-
if (
|
|
518
|
+
if (U.isFormData(e) && U.isFunction(e.entries)) {
|
|
519
519
|
let n = {};
|
|
520
|
-
return
|
|
521
|
-
t(
|
|
520
|
+
return U.forEachEntry(e, (e, r) => {
|
|
521
|
+
t(Dt(e), r, n, 0);
|
|
522
522
|
}), n;
|
|
523
523
|
}
|
|
524
524
|
return null;
|
|
525
525
|
}
|
|
526
526
|
//#endregion
|
|
527
527
|
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/defaults/index.js
|
|
528
|
-
var
|
|
529
|
-
function
|
|
530
|
-
if (
|
|
531
|
-
return (t || JSON.parse)(e),
|
|
528
|
+
var At = (e, t) => e != null && U.hasOwnProp(e, t) ? e[t] : void 0;
|
|
529
|
+
function jt(e, t, n) {
|
|
530
|
+
if (U.isString(e)) try {
|
|
531
|
+
return (t || JSON.parse)(e), U.trim(e);
|
|
532
532
|
} catch (e) {
|
|
533
533
|
if (e.name !== "SyntaxError") throw e;
|
|
534
534
|
}
|
|
535
535
|
return (n || JSON.stringify)(e);
|
|
536
536
|
}
|
|
537
|
-
var
|
|
538
|
-
transitional:
|
|
537
|
+
var Mt = {
|
|
538
|
+
transitional: vt,
|
|
539
539
|
adapter: [
|
|
540
540
|
"xhr",
|
|
541
541
|
"http",
|
|
542
542
|
"fetch"
|
|
543
543
|
],
|
|
544
544
|
transformRequest: [function(e, t) {
|
|
545
|
-
let n = t.getContentType() || "", r = n.indexOf("application/json") > -1, i =
|
|
546
|
-
if (i &&
|
|
547
|
-
if (
|
|
548
|
-
if (
|
|
549
|
-
if (
|
|
545
|
+
let n = t.getContentType() || "", r = n.indexOf("application/json") > -1, i = U.isObject(e);
|
|
546
|
+
if (i && U.isHTMLForm(e) && (e = new FormData(e)), U.isFormData(e)) return r ? JSON.stringify(kt(e)) : e;
|
|
547
|
+
if (U.isArrayBuffer(e) || U.isBuffer(e) || U.isStream(e) || U.isFile(e) || U.isBlob(e) || U.isReadableStream(e)) return e;
|
|
548
|
+
if (U.isArrayBufferView(e)) return e.buffer;
|
|
549
|
+
if (U.isURLSearchParams(e)) return t.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
|
|
550
550
|
let a;
|
|
551
551
|
if (i) {
|
|
552
|
-
let t =
|
|
553
|
-
if (n.indexOf("application/x-www-form-urlencoded") > -1) return
|
|
554
|
-
if ((a =
|
|
555
|
-
let n =
|
|
556
|
-
return
|
|
552
|
+
let t = At(this, "formSerializer");
|
|
553
|
+
if (n.indexOf("application/x-www-form-urlencoded") > -1) return Et(e, t).toString();
|
|
554
|
+
if ((a = U.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
|
|
555
|
+
let n = At(this, "env"), r = n && n.FormData;
|
|
556
|
+
return dt(a ? { "files[]": e } : e, r && new r(), t);
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
|
-
return i || r ? (t.setContentType("application/json", !1),
|
|
559
|
+
return i || r ? (t.setContentType("application/json", !1), jt(e)) : e;
|
|
560
560
|
}],
|
|
561
561
|
transformResponse: [function(e) {
|
|
562
|
-
let t =
|
|
563
|
-
if (
|
|
564
|
-
if (e &&
|
|
562
|
+
let t = At(this, "transitional") || Mt.transitional, n = t && t.forcedJSONParsing, r = At(this, "responseType"), i = r === "json";
|
|
563
|
+
if (U.isResponse(e) || U.isReadableStream(e)) return e;
|
|
564
|
+
if (e && U.isString(e) && (n && !r || i)) {
|
|
565
565
|
let n = !(t && t.silentJSONParsing) && i;
|
|
566
566
|
try {
|
|
567
|
-
return JSON.parse(e,
|
|
567
|
+
return JSON.parse(e, At(this, "parseReviver"));
|
|
568
568
|
} catch (e) {
|
|
569
|
-
if (n) throw e.name === "SyntaxError" ?
|
|
569
|
+
if (n) throw e.name === "SyntaxError" ? W.from(e, W.ERR_BAD_RESPONSE, this, null, At(this, "response")) : e;
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
572
|
return e;
|
|
@@ -577,8 +577,8 @@ var jt = {
|
|
|
577
577
|
maxContentLength: -1,
|
|
578
578
|
maxBodyLength: -1,
|
|
579
579
|
env: {
|
|
580
|
-
FormData:
|
|
581
|
-
Blob:
|
|
580
|
+
FormData: G.classes.FormData,
|
|
581
|
+
Blob: G.classes.Blob
|
|
582
582
|
},
|
|
583
583
|
validateStatus: function(e) {
|
|
584
584
|
return e >= 200 && e < 300;
|
|
@@ -588,7 +588,7 @@ var jt = {
|
|
|
588
588
|
"Content-Type": void 0
|
|
589
589
|
} }
|
|
590
590
|
};
|
|
591
|
-
|
|
591
|
+
U.forEach([
|
|
592
592
|
"delete",
|
|
593
593
|
"get",
|
|
594
594
|
"head",
|
|
@@ -596,11 +596,11 @@ W.forEach([
|
|
|
596
596
|
"put",
|
|
597
597
|
"patch"
|
|
598
598
|
], (e) => {
|
|
599
|
-
|
|
599
|
+
Mt.headers[e] = {};
|
|
600
600
|
});
|
|
601
601
|
//#endregion
|
|
602
602
|
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/helpers/parseHeaders.js
|
|
603
|
-
var
|
|
603
|
+
var Nt = U.toObjectSet([
|
|
604
604
|
"age",
|
|
605
605
|
"authorization",
|
|
606
606
|
"content-length",
|
|
@@ -618,13 +618,13 @@ var Mt = W.toObjectSet([
|
|
|
618
618
|
"referer",
|
|
619
619
|
"retry-after",
|
|
620
620
|
"user-agent"
|
|
621
|
-
]),
|
|
621
|
+
]), Pt = (e) => {
|
|
622
622
|
let t = {}, n, r, i;
|
|
623
623
|
return e && e.split("\n").forEach(function(e) {
|
|
624
|
-
i = e.indexOf(":"), n = e.substring(0, i).trim().toLowerCase(), r = e.substring(i + 1).trim(), !(!n || t[n] &&
|
|
624
|
+
i = e.indexOf(":"), n = e.substring(0, i).trim().toLowerCase(), r = e.substring(i + 1).trim(), !(!n || t[n] && Nt[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
625
625
|
}), t;
|
|
626
|
-
},
|
|
627
|
-
function
|
|
626
|
+
}, Ft = Symbol("internals"), It = /[^\x09\x20-\x7E\x80-\xFF]/g;
|
|
627
|
+
function Lt(e) {
|
|
628
628
|
let t = 0, n = e.length;
|
|
629
629
|
for (; t < n;) {
|
|
630
630
|
let n = e.charCodeAt(t);
|
|
@@ -638,33 +638,33 @@ function It(e) {
|
|
|
638
638
|
}
|
|
639
639
|
return t === 0 && n === e.length ? e : e.slice(t, n);
|
|
640
640
|
}
|
|
641
|
-
function Lt(e) {
|
|
642
|
-
return e && String(e).trim().toLowerCase();
|
|
643
|
-
}
|
|
644
641
|
function Rt(e) {
|
|
645
|
-
return
|
|
642
|
+
return e && String(e).trim().toLowerCase();
|
|
646
643
|
}
|
|
647
644
|
function zt(e) {
|
|
648
|
-
return
|
|
645
|
+
return Lt(e.replace(It, ""));
|
|
649
646
|
}
|
|
650
647
|
function Bt(e) {
|
|
648
|
+
return e === !1 || e == null ? e : U.isArray(e) ? e.map(Bt) : zt(String(e));
|
|
649
|
+
}
|
|
650
|
+
function Vt(e) {
|
|
651
651
|
let t = Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g, r;
|
|
652
652
|
for (; r = n.exec(e);) t[r[1]] = r[2];
|
|
653
653
|
return t;
|
|
654
654
|
}
|
|
655
|
-
var
|
|
656
|
-
function
|
|
657
|
-
if (
|
|
658
|
-
if (i && (t = n),
|
|
659
|
-
if (
|
|
660
|
-
if (
|
|
655
|
+
var Ht = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
656
|
+
function Ut(e, t, n, r, i) {
|
|
657
|
+
if (U.isFunction(r)) return r.call(this, t, n);
|
|
658
|
+
if (i && (t = n), U.isString(t)) {
|
|
659
|
+
if (U.isString(r)) return t.indexOf(r) !== -1;
|
|
660
|
+
if (U.isRegExp(r)) return r.test(t);
|
|
661
661
|
}
|
|
662
662
|
}
|
|
663
|
-
function
|
|
663
|
+
function Wt(e) {
|
|
664
664
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, t, n) => t.toUpperCase() + n);
|
|
665
665
|
}
|
|
666
|
-
function
|
|
667
|
-
let n =
|
|
666
|
+
function Gt(e, t) {
|
|
667
|
+
let n = U.toCamelCase(" " + t);
|
|
668
668
|
[
|
|
669
669
|
"get",
|
|
670
670
|
"set",
|
|
@@ -678,79 +678,79 @@ function Wt(e, t) {
|
|
|
678
678
|
});
|
|
679
679
|
});
|
|
680
680
|
}
|
|
681
|
-
var
|
|
681
|
+
var K = class {
|
|
682
682
|
constructor(e) {
|
|
683
683
|
e && this.set(e);
|
|
684
684
|
}
|
|
685
685
|
set(e, t, n) {
|
|
686
686
|
let r = this;
|
|
687
687
|
function i(e, t, n) {
|
|
688
|
-
let i =
|
|
688
|
+
let i = Rt(t);
|
|
689
689
|
if (!i) throw Error("header name must be a non-empty string");
|
|
690
|
-
let a =
|
|
691
|
-
(!a || r[a] === void 0 || n === !0 || n === void 0 && r[a] !== !1) && (r[a || t] =
|
|
690
|
+
let a = U.findKey(r, i);
|
|
691
|
+
(!a || r[a] === void 0 || n === !0 || n === void 0 && r[a] !== !1) && (r[a || t] = Bt(e));
|
|
692
692
|
}
|
|
693
|
-
let a = (e, t) =>
|
|
694
|
-
if (
|
|
695
|
-
else if (
|
|
696
|
-
else if (
|
|
693
|
+
let a = (e, t) => U.forEach(e, (e, n) => i(e, n, t));
|
|
694
|
+
if (U.isPlainObject(e) || e instanceof this.constructor) a(e, t);
|
|
695
|
+
else if (U.isString(e) && (e = e.trim()) && !Ht(e)) a(Pt(e), t);
|
|
696
|
+
else if (U.isObject(e) && U.isIterable(e)) {
|
|
697
697
|
let n = {}, r, i;
|
|
698
698
|
for (let t of e) {
|
|
699
|
-
if (!
|
|
700
|
-
n[i = t[0]] = (r = n[i]) ?
|
|
699
|
+
if (!U.isArray(t)) throw TypeError("Object iterator must return a key-value pair");
|
|
700
|
+
n[i = t[0]] = (r = n[i]) ? U.isArray(r) ? [...r, t[1]] : [r, t[1]] : t[1];
|
|
701
701
|
}
|
|
702
702
|
a(n, t);
|
|
703
703
|
} else e != null && i(t, e, n);
|
|
704
704
|
return this;
|
|
705
705
|
}
|
|
706
706
|
get(e, t) {
|
|
707
|
-
if (e =
|
|
708
|
-
let n =
|
|
707
|
+
if (e = Rt(e), e) {
|
|
708
|
+
let n = U.findKey(this, e);
|
|
709
709
|
if (n) {
|
|
710
710
|
let e = this[n];
|
|
711
711
|
if (!t) return e;
|
|
712
|
-
if (t === !0) return
|
|
713
|
-
if (
|
|
714
|
-
if (
|
|
712
|
+
if (t === !0) return Vt(e);
|
|
713
|
+
if (U.isFunction(t)) return t.call(this, e, n);
|
|
714
|
+
if (U.isRegExp(t)) return t.exec(e);
|
|
715
715
|
throw TypeError("parser must be boolean|regexp|function");
|
|
716
716
|
}
|
|
717
717
|
}
|
|
718
718
|
}
|
|
719
719
|
has(e, t) {
|
|
720
|
-
if (e =
|
|
721
|
-
let n =
|
|
722
|
-
return !!(n && this[n] !== void 0 && (!t ||
|
|
720
|
+
if (e = Rt(e), e) {
|
|
721
|
+
let n = U.findKey(this, e);
|
|
722
|
+
return !!(n && this[n] !== void 0 && (!t || Ut(this, this[n], n, t)));
|
|
723
723
|
}
|
|
724
724
|
return !1;
|
|
725
725
|
}
|
|
726
726
|
delete(e, t) {
|
|
727
727
|
let n = this, r = !1;
|
|
728
728
|
function i(e) {
|
|
729
|
-
if (e =
|
|
730
|
-
let i =
|
|
731
|
-
i && (!t ||
|
|
729
|
+
if (e = Rt(e), e) {
|
|
730
|
+
let i = U.findKey(n, e);
|
|
731
|
+
i && (!t || Ut(n, n[i], i, t)) && (delete n[i], r = !0);
|
|
732
732
|
}
|
|
733
733
|
}
|
|
734
|
-
return
|
|
734
|
+
return U.isArray(e) ? e.forEach(i) : i(e), r;
|
|
735
735
|
}
|
|
736
736
|
clear(e) {
|
|
737
737
|
let t = Object.keys(this), n = t.length, r = !1;
|
|
738
738
|
for (; n--;) {
|
|
739
739
|
let i = t[n];
|
|
740
|
-
(!e ||
|
|
740
|
+
(!e || Ut(this, this[i], i, e, !0)) && (delete this[i], r = !0);
|
|
741
741
|
}
|
|
742
742
|
return r;
|
|
743
743
|
}
|
|
744
744
|
normalize(e) {
|
|
745
745
|
let t = this, n = {};
|
|
746
|
-
return
|
|
747
|
-
let a =
|
|
746
|
+
return U.forEach(this, (r, i) => {
|
|
747
|
+
let a = U.findKey(n, i);
|
|
748
748
|
if (a) {
|
|
749
|
-
t[a] =
|
|
749
|
+
t[a] = Bt(r), delete t[i];
|
|
750
750
|
return;
|
|
751
751
|
}
|
|
752
|
-
let o = e ?
|
|
753
|
-
o !== i && delete t[i], t[o] =
|
|
752
|
+
let o = e ? Wt(i) : String(i).trim();
|
|
753
|
+
o !== i && delete t[i], t[o] = Bt(r), n[o] = !0;
|
|
754
754
|
}), this;
|
|
755
755
|
}
|
|
756
756
|
concat(...e) {
|
|
@@ -758,8 +758,8 @@ var Gt = class {
|
|
|
758
758
|
}
|
|
759
759
|
toJSON(e) {
|
|
760
760
|
let t = Object.create(null);
|
|
761
|
-
return
|
|
762
|
-
n != null && n !== !1 && (t[r] = e &&
|
|
761
|
+
return U.forEach(this, (n, r) => {
|
|
762
|
+
n != null && n !== !1 && (t[r] = e && U.isArray(n) ? n.join(", ") : n);
|
|
763
763
|
}), t;
|
|
764
764
|
}
|
|
765
765
|
[Symbol.iterator]() {
|
|
@@ -782,22 +782,22 @@ var Gt = class {
|
|
|
782
782
|
return t.forEach((e) => n.set(e)), n;
|
|
783
783
|
}
|
|
784
784
|
static accessor(e) {
|
|
785
|
-
let t = (this[
|
|
785
|
+
let t = (this[Ft] = this[Ft] = { accessors: {} }).accessors, n = this.prototype;
|
|
786
786
|
function r(e) {
|
|
787
|
-
let r =
|
|
788
|
-
t[r] || (
|
|
787
|
+
let r = Rt(e);
|
|
788
|
+
t[r] || (Gt(n, e), t[r] = !0);
|
|
789
789
|
}
|
|
790
|
-
return
|
|
790
|
+
return U.isArray(e) ? e.forEach(r) : r(e), this;
|
|
791
791
|
}
|
|
792
792
|
};
|
|
793
|
-
|
|
793
|
+
K.accessor([
|
|
794
794
|
"Content-Type",
|
|
795
795
|
"Content-Length",
|
|
796
796
|
"Accept",
|
|
797
797
|
"Accept-Encoding",
|
|
798
798
|
"User-Agent",
|
|
799
799
|
"Authorization"
|
|
800
|
-
]),
|
|
800
|
+
]), U.reduceDescriptors(K.prototype, ({ value: e }, t) => {
|
|
801
801
|
let n = t[0].toUpperCase() + t.slice(1);
|
|
802
802
|
return {
|
|
803
803
|
get: () => e,
|
|
@@ -805,12 +805,12 @@ Gt.accessor([
|
|
|
805
805
|
this[n] = e;
|
|
806
806
|
}
|
|
807
807
|
};
|
|
808
|
-
}),
|
|
808
|
+
}), U.freezeMethods(K);
|
|
809
809
|
//#endregion
|
|
810
810
|
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/core/transformData.js
|
|
811
811
|
function Kt(e, t) {
|
|
812
|
-
let n = this ||
|
|
813
|
-
return
|
|
812
|
+
let n = this || Mt, r = t || n, i = K.from(r.headers), a = r.data;
|
|
813
|
+
return U.forEach(e, function(e) {
|
|
814
814
|
a = e.call(n, a, i.normalize(), t ? t.status : void 0);
|
|
815
815
|
}), i.normalize(), a;
|
|
816
816
|
}
|
|
@@ -821,16 +821,16 @@ function qt(e) {
|
|
|
821
821
|
}
|
|
822
822
|
//#endregion
|
|
823
823
|
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/cancel/CanceledError.js
|
|
824
|
-
var Jt = class extends
|
|
824
|
+
var Jt = class extends W {
|
|
825
825
|
constructor(e, t, n) {
|
|
826
|
-
super(e ?? "canceled",
|
|
826
|
+
super(e ?? "canceled", W.ERR_CANCELED, t, n), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
827
827
|
}
|
|
828
828
|
};
|
|
829
829
|
//#endregion
|
|
830
830
|
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/core/settle.js
|
|
831
831
|
function Yt(e, t, n) {
|
|
832
832
|
let r = n.config.validateStatus;
|
|
833
|
-
!n.status || !r || r(n.status) ? e(n) : t(new
|
|
833
|
+
!n.status || !r || r(n.status) ? e(n) : t(new W("Request failed with status code " + n.status, [W.ERR_BAD_REQUEST, W.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4], n.config, n.request, n));
|
|
834
834
|
}
|
|
835
835
|
//#endregion
|
|
836
836
|
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/helpers/parseProtocol.js
|
|
@@ -891,11 +891,11 @@ var $t = (e, t, n = 3) => {
|
|
|
891
891
|
total: e,
|
|
892
892
|
loaded: r
|
|
893
893
|
}), t[1]];
|
|
894
|
-
}, tn = (e) => (...t) =>
|
|
894
|
+
}, tn = (e) => (...t) => U.asap(() => e(...t)), nn = G.hasStandardBrowserEnv ? ((e, t) => (n) => (n = new URL(n, G.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(new URL(G.origin), G.navigator && /(msie|trident)/i.test(G.navigator.userAgent)) : () => !0, rn = G.hasStandardBrowserEnv ? {
|
|
895
895
|
write(e, t, n, r, i, a, o) {
|
|
896
896
|
if (typeof document > "u") return;
|
|
897
897
|
let s = [`${e}=${encodeURIComponent(t)}`];
|
|
898
|
-
|
|
898
|
+
U.isNumber(n) && s.push(`expires=${new Date(n).toUTCString()}`), U.isString(r) && s.push(`path=${r}`), U.isString(i) && s.push(`domain=${i}`), a === !0 && s.push("secure"), U.isString(o) && s.push(`SameSite=${o}`), document.cookie = s.join("; ");
|
|
899
899
|
},
|
|
900
900
|
read(e) {
|
|
901
901
|
if (typeof document > "u") return null;
|
|
@@ -930,7 +930,7 @@ function sn(e, t, n) {
|
|
|
930
930
|
}
|
|
931
931
|
//#endregion
|
|
932
932
|
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/core/mergeConfig.js
|
|
933
|
-
var cn = (e) => e instanceof
|
|
933
|
+
var cn = (e) => e instanceof K ? { ...e } : e;
|
|
934
934
|
function ln(e, t) {
|
|
935
935
|
t ||= {};
|
|
936
936
|
let n = Object.create(null);
|
|
@@ -941,22 +941,22 @@ function ln(e, t) {
|
|
|
941
941
|
configurable: !0
|
|
942
942
|
});
|
|
943
943
|
function r(e, t, n, r) {
|
|
944
|
-
return
|
|
944
|
+
return U.isPlainObject(e) && U.isPlainObject(t) ? U.merge.call({ caseless: r }, e, t) : U.isPlainObject(t) ? U.merge({}, t) : U.isArray(t) ? t.slice() : t;
|
|
945
945
|
}
|
|
946
946
|
function i(e, t, n, i) {
|
|
947
|
-
if (!
|
|
948
|
-
if (!
|
|
947
|
+
if (!U.isUndefined(t)) return r(e, t, n, i);
|
|
948
|
+
if (!U.isUndefined(e)) return r(void 0, e, n, i);
|
|
949
949
|
}
|
|
950
950
|
function a(e, t) {
|
|
951
|
-
if (!
|
|
951
|
+
if (!U.isUndefined(t)) return r(void 0, t);
|
|
952
952
|
}
|
|
953
953
|
function o(e, t) {
|
|
954
|
-
if (!
|
|
955
|
-
if (!
|
|
954
|
+
if (!U.isUndefined(t)) return r(void 0, t);
|
|
955
|
+
if (!U.isUndefined(e)) return r(void 0, e);
|
|
956
956
|
}
|
|
957
957
|
function s(n, i, a) {
|
|
958
|
-
if (
|
|
959
|
-
if (
|
|
958
|
+
if (U.hasOwnProp(t, a)) return r(n, i);
|
|
959
|
+
if (U.hasOwnProp(e, a)) return r(void 0, n);
|
|
960
960
|
}
|
|
961
961
|
let c = {
|
|
962
962
|
url: a,
|
|
@@ -990,36 +990,36 @@ function ln(e, t) {
|
|
|
990
990
|
validateStatus: s,
|
|
991
991
|
headers: (e, t, n) => i(cn(e), cn(t), n, !0)
|
|
992
992
|
};
|
|
993
|
-
return
|
|
993
|
+
return U.forEach(Object.keys({
|
|
994
994
|
...e,
|
|
995
995
|
...t
|
|
996
996
|
}), function(r) {
|
|
997
997
|
if (r === "__proto__" || r === "constructor" || r === "prototype") return;
|
|
998
|
-
let a =
|
|
999
|
-
|
|
998
|
+
let a = U.hasOwnProp(c, r) ? c[r] : i, o = a(U.hasOwnProp(e, r) ? e[r] : void 0, U.hasOwnProp(t, r) ? t[r] : void 0, r);
|
|
999
|
+
U.isUndefined(o) && a !== s || (n[r] = o);
|
|
1000
1000
|
}), n;
|
|
1001
1001
|
}
|
|
1002
1002
|
//#endregion
|
|
1003
1003
|
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/helpers/resolveConfig.js
|
|
1004
1004
|
var un = (e) => {
|
|
1005
|
-
let t = ln({}, e), n = (e) =>
|
|
1006
|
-
if (t.headers = s =
|
|
1007
|
-
if (
|
|
1008
|
-
else if (
|
|
1005
|
+
let t = ln({}, e), n = (e) => U.hasOwnProp(t, e) ? t[e] : void 0, r = n("data"), i = n("withXSRFToken"), a = n("xsrfHeaderName"), o = n("xsrfCookieName"), s = n("headers"), c = n("auth"), l = n("baseURL"), u = n("allowAbsoluteUrls"), d = n("url");
|
|
1006
|
+
if (t.headers = s = K.from(s), t.url = gt(sn(l, d, u), e.params, e.paramsSerializer), c && s.set("Authorization", "Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))), U.isFormData(r)) {
|
|
1007
|
+
if (G.hasStandardBrowserEnv || G.hasStandardBrowserWebWorkerEnv) s.setContentType(void 0);
|
|
1008
|
+
else if (U.isFunction(r.getHeaders)) {
|
|
1009
1009
|
let e = r.getHeaders(), t = ["content-type", "content-length"];
|
|
1010
1010
|
Object.entries(e).forEach(([e, n]) => {
|
|
1011
1011
|
t.includes(e.toLowerCase()) && s.set(e, n);
|
|
1012
1012
|
});
|
|
1013
1013
|
}
|
|
1014
1014
|
}
|
|
1015
|
-
if (
|
|
1015
|
+
if (G.hasStandardBrowserEnv && (U.isFunction(i) && (i = i(t)), i === !0 || i == null && nn(t.url))) {
|
|
1016
1016
|
let e = a && o && rn.read(o);
|
|
1017
1017
|
e && s.set(a, e);
|
|
1018
1018
|
}
|
|
1019
1019
|
return t;
|
|
1020
1020
|
}, dn = typeof XMLHttpRequest < "u" && function(e) {
|
|
1021
1021
|
return new Promise(function(t, n) {
|
|
1022
|
-
let r = un(e), i = r.data, a =
|
|
1022
|
+
let r = un(e), i = r.data, a = K.from(r.headers).normalize(), { responseType: o, onUploadProgress: s, onDownloadProgress: c } = r, l, u, d, f, p;
|
|
1023
1023
|
function m() {
|
|
1024
1024
|
f && f(), p && p(), r.cancelToken && r.cancelToken.unsubscribe(l), r.signal && r.signal.removeEventListener("abort", l);
|
|
1025
1025
|
}
|
|
@@ -1027,7 +1027,7 @@ var un = (e) => {
|
|
|
1027
1027
|
h.open(r.method.toUpperCase(), r.url, !0), h.timeout = r.timeout;
|
|
1028
1028
|
function g() {
|
|
1029
1029
|
if (!h) return;
|
|
1030
|
-
let r =
|
|
1030
|
+
let r = K.from("getAllResponseHeaders" in h && h.getAllResponseHeaders());
|
|
1031
1031
|
Yt(function(e) {
|
|
1032
1032
|
t(e), m();
|
|
1033
1033
|
}, function(e) {
|
|
@@ -1044,21 +1044,21 @@ var un = (e) => {
|
|
|
1044
1044
|
"onloadend" in h ? h.onloadend = g : h.onreadystatechange = function() {
|
|
1045
1045
|
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(g);
|
|
1046
1046
|
}, h.onabort = function() {
|
|
1047
|
-
h &&= (n(new
|
|
1047
|
+
h &&= (n(new W("Request aborted", W.ECONNABORTED, e, h)), null);
|
|
1048
1048
|
}, h.onerror = function(t) {
|
|
1049
|
-
let r = new
|
|
1049
|
+
let r = new W(t && t.message ? t.message : "Network Error", W.ERR_NETWORK, e, h);
|
|
1050
1050
|
r.event = t || null, n(r), h = null;
|
|
1051
1051
|
}, h.ontimeout = function() {
|
|
1052
|
-
let t = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded", i = r.transitional ||
|
|
1053
|
-
r.timeoutErrorMessage && (t = r.timeoutErrorMessage), n(new
|
|
1054
|
-
}, i === void 0 && a.setContentType(null), "setRequestHeader" in h &&
|
|
1052
|
+
let t = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded", i = r.transitional || vt;
|
|
1053
|
+
r.timeoutErrorMessage && (t = r.timeoutErrorMessage), n(new W(t, i.clarifyTimeoutError ? W.ETIMEDOUT : W.ECONNABORTED, e, h)), h = null;
|
|
1054
|
+
}, i === void 0 && a.setContentType(null), "setRequestHeader" in h && U.forEach(a.toJSON(), function(e, t) {
|
|
1055
1055
|
h.setRequestHeader(t, e);
|
|
1056
|
-
}),
|
|
1056
|
+
}), U.isUndefined(r.withCredentials) || (h.withCredentials = !!r.withCredentials), o && o !== "json" && (h.responseType = r.responseType), c && ([d, p] = $t(c, !0), h.addEventListener("progress", d)), s && h.upload && ([u, f] = $t(s), h.upload.addEventListener("progress", u), h.upload.addEventListener("loadend", f)), (r.cancelToken || r.signal) && (l = (t) => {
|
|
1057
1057
|
h &&= (n(!t || t.type ? new Jt(null, e, h) : t), h.abort(), null);
|
|
1058
1058
|
}, r.cancelToken && r.cancelToken.subscribe(l), r.signal && (r.signal.aborted ? l() : r.signal.addEventListener("abort", l)));
|
|
1059
1059
|
let _ = Xt(r.url);
|
|
1060
|
-
if (_ &&
|
|
1061
|
-
n(new
|
|
1060
|
+
if (_ && G.protocols.indexOf(_) === -1) {
|
|
1061
|
+
n(new W("Unsupported protocol " + _ + ":", W.ERR_BAD_REQUEST, e));
|
|
1062
1062
|
return;
|
|
1063
1063
|
}
|
|
1064
1064
|
h.send(i || null);
|
|
@@ -1070,10 +1070,10 @@ var un = (e) => {
|
|
|
1070
1070
|
if (!r) {
|
|
1071
1071
|
r = !0, o();
|
|
1072
1072
|
let t = e instanceof Error ? e : this.reason;
|
|
1073
|
-
n.abort(t instanceof
|
|
1073
|
+
n.abort(t instanceof W ? t : new Jt(t instanceof Error ? t.message : t));
|
|
1074
1074
|
}
|
|
1075
1075
|
}, a = t && setTimeout(() => {
|
|
1076
|
-
a = null, i(new
|
|
1076
|
+
a = null, i(new W(`timeout of ${t}ms exceeded`, W.ETIMEDOUT));
|
|
1077
1077
|
}, t), o = () => {
|
|
1078
1078
|
e &&= (a && clearTimeout(a), a = null, e.forEach((e) => {
|
|
1079
1079
|
e.unsubscribe ? e.unsubscribe(i) : e.removeEventListener("abort", i);
|
|
@@ -1081,7 +1081,7 @@ var un = (e) => {
|
|
|
1081
1081
|
};
|
|
1082
1082
|
e.forEach((e) => e.addEventListener("abort", i));
|
|
1083
1083
|
let { signal: s } = n;
|
|
1084
|
-
return s.unsubscribe = () =>
|
|
1084
|
+
return s.unsubscribe = () => U.asap(o), s;
|
|
1085
1085
|
}
|
|
1086
1086
|
}, pn = function* (e, t) {
|
|
1087
1087
|
let n = e.byteLength;
|
|
@@ -1130,21 +1130,21 @@ var un = (e) => {
|
|
|
1130
1130
|
return s(e), i.return();
|
|
1131
1131
|
}
|
|
1132
1132
|
}, { highWaterMark: 2 });
|
|
1133
|
-
}, _n = 64 * 1024, { isFunction: vn } =
|
|
1133
|
+
}, _n = 64 * 1024, { isFunction: vn } = U, yn = (({ Request: e, Response: t }) => ({
|
|
1134
1134
|
Request: e,
|
|
1135
1135
|
Response: t
|
|
1136
|
-
}))(
|
|
1136
|
+
}))(U.global), { ReadableStream: bn, TextEncoder: xn } = U.global, Sn = (e, ...t) => {
|
|
1137
1137
|
try {
|
|
1138
1138
|
return !!e(...t);
|
|
1139
1139
|
} catch {
|
|
1140
1140
|
return !1;
|
|
1141
1141
|
}
|
|
1142
1142
|
}, Cn = (e) => {
|
|
1143
|
-
e =
|
|
1143
|
+
e = U.merge.call({ skipUndefined: !0 }, yn, e);
|
|
1144
1144
|
let { fetch: t, Request: n, Response: r } = e, i = t ? vn(t) : typeof fetch == "function", a = vn(n), o = vn(r);
|
|
1145
1145
|
if (!i) return !1;
|
|
1146
1146
|
let s = i && vn(bn), c = i && (typeof xn == "function" ? ((e) => (t) => e.encode(t))(new xn()) : async (e) => new Uint8Array(await new n(e).arrayBuffer())), l = a && s && Sn(() => {
|
|
1147
|
-
let e = !1, t = new n(
|
|
1147
|
+
let e = !1, t = new n(G.origin, {
|
|
1148
1148
|
body: new bn(),
|
|
1149
1149
|
method: "POST",
|
|
1150
1150
|
get duplex() {
|
|
@@ -1152,7 +1152,7 @@ var un = (e) => {
|
|
|
1152
1152
|
}
|
|
1153
1153
|
}), r = t.headers.has("Content-Type");
|
|
1154
1154
|
return t.body != null && t.body.cancel(), e && !r;
|
|
1155
|
-
}), u = o && s && Sn(() =>
|
|
1155
|
+
}), u = o && s && Sn(() => U.isReadableStream(new r("").body)), d = { stream: u && ((e) => e.body) };
|
|
1156
1156
|
i && [
|
|
1157
1157
|
"text",
|
|
1158
1158
|
"arrayBuffer",
|
|
@@ -1163,19 +1163,19 @@ var un = (e) => {
|
|
|
1163
1163
|
!d[e] && (d[e] = (t, n) => {
|
|
1164
1164
|
let r = t && t[e];
|
|
1165
1165
|
if (r) return r.call(t);
|
|
1166
|
-
throw new
|
|
1166
|
+
throw new W(`Response type '${e}' is not supported`, W.ERR_NOT_SUPPORT, n);
|
|
1167
1167
|
});
|
|
1168
1168
|
});
|
|
1169
1169
|
let f = async (e) => {
|
|
1170
1170
|
if (e == null) return 0;
|
|
1171
|
-
if (
|
|
1172
|
-
if (
|
|
1171
|
+
if (U.isBlob(e)) return e.size;
|
|
1172
|
+
if (U.isSpecCompliantForm(e)) return (await new n(G.origin, {
|
|
1173
1173
|
method: "POST",
|
|
1174
1174
|
body: e
|
|
1175
1175
|
}).arrayBuffer()).byteLength;
|
|
1176
|
-
if (
|
|
1177
|
-
if (
|
|
1178
|
-
}, p = async (e, t) =>
|
|
1176
|
+
if (U.isArrayBufferView(e) || U.isArrayBuffer(e)) return e.byteLength;
|
|
1177
|
+
if (U.isURLSearchParams(e) && (e += ""), U.isString(e)) return (await c(e)).byteLength;
|
|
1178
|
+
}, p = async (e, t) => U.toFiniteNumber(e.getContentLength()) ?? f(t);
|
|
1179
1179
|
return async (e) => {
|
|
1180
1180
|
let { url: i, method: o, data: s, signal: c, cancelToken: f, timeout: m, onDownloadProgress: h, onUploadProgress: g, responseType: _, headers: v, withCredentials: y = "same-origin", fetchOptions: b } = un(e), x = t || fetch;
|
|
1181
1181
|
_ = _ ? (_ + "").toLowerCase() : "text";
|
|
@@ -1189,14 +1189,14 @@ var un = (e) => {
|
|
|
1189
1189
|
body: s,
|
|
1190
1190
|
duplex: "half"
|
|
1191
1191
|
}), t;
|
|
1192
|
-
if (
|
|
1192
|
+
if (U.isFormData(s) && (t = e.headers.get("content-type")) && v.setContentType(t), e.body) {
|
|
1193
1193
|
let [t, n] = en(T, $t(tn(g)));
|
|
1194
1194
|
s = gn(e.body, _n, t, n);
|
|
1195
1195
|
}
|
|
1196
1196
|
}
|
|
1197
|
-
|
|
1197
|
+
U.isString(y) || (y = y ? "include" : "omit");
|
|
1198
1198
|
let t = a && "credentials" in n.prototype;
|
|
1199
|
-
if (
|
|
1199
|
+
if (U.isFormData(s)) {
|
|
1200
1200
|
let e = v.getContentType();
|
|
1201
1201
|
e && /^multipart\/form-data/i.test(e) && !/boundary=/i.test(e) && v.delete("content-type");
|
|
1202
1202
|
}
|
|
@@ -1220,17 +1220,17 @@ var un = (e) => {
|
|
|
1220
1220
|
].forEach((t) => {
|
|
1221
1221
|
e[t] = f[t];
|
|
1222
1222
|
});
|
|
1223
|
-
let t =
|
|
1223
|
+
let t = U.toFiniteNumber(f.headers.get("content-length")), [n, i] = h && en(t, $t(tn(h), !0)) || [];
|
|
1224
1224
|
f = new r(gn(f.body, _n, n, () => {
|
|
1225
1225
|
i && i(), w && w();
|
|
1226
1226
|
}), e);
|
|
1227
1227
|
}
|
|
1228
1228
|
_ ||= "text";
|
|
1229
|
-
let E = await d[
|
|
1229
|
+
let E = await d[U.findKey(d, _) || "text"](f, e);
|
|
1230
1230
|
return !m && w && w(), await new Promise((t, n) => {
|
|
1231
1231
|
Yt(t, n, {
|
|
1232
1232
|
data: E,
|
|
1233
|
-
headers:
|
|
1233
|
+
headers: K.from(f.headers),
|
|
1234
1234
|
status: f.status,
|
|
1235
1235
|
statusText: f.statusText,
|
|
1236
1236
|
config: e,
|
|
@@ -1238,7 +1238,7 @@ var un = (e) => {
|
|
|
1238
1238
|
});
|
|
1239
1239
|
});
|
|
1240
1240
|
} catch (t) {
|
|
1241
|
-
throw w && w(), t && t.name === "TypeError" && /Load failed|fetch/i.test(t.message) ? Object.assign(new
|
|
1241
|
+
throw w && w(), t && t.name === "TypeError" && /Load failed|fetch/i.test(t.message) ? Object.assign(new W("Network Error", W.ERR_NETWORK, e, C, t && t.response), { cause: t.cause || t }) : W.from(t, t && t.code, e, C, t && t.response);
|
|
1242
1242
|
}
|
|
1243
1243
|
};
|
|
1244
1244
|
}, wn = /* @__PURE__ */ new Map(), Tn = (e) => {
|
|
@@ -1258,7 +1258,7 @@ var En = {
|
|
|
1258
1258
|
xhr: dn,
|
|
1259
1259
|
fetch: { get: Tn }
|
|
1260
1260
|
};
|
|
1261
|
-
|
|
1261
|
+
U.forEach(En, (e, t) => {
|
|
1262
1262
|
if (e) {
|
|
1263
1263
|
try {
|
|
1264
1264
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1266,20 +1266,20 @@ W.forEach(En, (e, t) => {
|
|
|
1266
1266
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1267
1267
|
}
|
|
1268
1268
|
});
|
|
1269
|
-
var Dn = (e) => `- ${e}`, On = (e) =>
|
|
1269
|
+
var Dn = (e) => `- ${e}`, On = (e) => U.isFunction(e) || e === null || e === !1;
|
|
1270
1270
|
function kn(e, t) {
|
|
1271
|
-
e =
|
|
1271
|
+
e = U.isArray(e) ? e : [e];
|
|
1272
1272
|
let { length: n } = e, r, i, a = {};
|
|
1273
1273
|
for (let o = 0; o < n; o++) {
|
|
1274
1274
|
r = e[o];
|
|
1275
1275
|
let n;
|
|
1276
|
-
if (i = r, !On(r) && (i = En[(n = String(r)).toLowerCase()], i === void 0)) throw new
|
|
1277
|
-
if (i && (
|
|
1276
|
+
if (i = r, !On(r) && (i = En[(n = String(r)).toLowerCase()], i === void 0)) throw new W(`Unknown adapter '${n}'`);
|
|
1277
|
+
if (i && (U.isFunction(i) || (i = i.get(t)))) break;
|
|
1278
1278
|
a[n || "#" + o] = i;
|
|
1279
1279
|
}
|
|
1280
1280
|
if (!i) {
|
|
1281
1281
|
let e = Object.entries(a).map(([e, t]) => `adapter ${e} ` + (t === !1 ? "is not supported by the environment" : "is not available in the build"));
|
|
1282
|
-
throw new
|
|
1282
|
+
throw new W("There is no suitable adapter to dispatch the request " + (n ? e.length > 1 ? "since :\n" + e.map(Dn).join("\n") : " " + Dn(e[0]) : "as no adapter specified"), "ERR_NOT_SUPPORT");
|
|
1283
1283
|
}
|
|
1284
1284
|
return i;
|
|
1285
1285
|
}
|
|
@@ -1293,14 +1293,14 @@ function jn(e) {
|
|
|
1293
1293
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new Jt(null, e);
|
|
1294
1294
|
}
|
|
1295
1295
|
function Mn(e) {
|
|
1296
|
-
return jn(e), e.headers =
|
|
1296
|
+
return jn(e), e.headers = K.from(e.headers), e.data = Kt.call(e, e.transformRequest), [
|
|
1297
1297
|
"post",
|
|
1298
1298
|
"put",
|
|
1299
1299
|
"patch"
|
|
1300
|
-
].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), An.getAdapter(e.adapter ||
|
|
1301
|
-
return jn(e), t.data = Kt.call(e, e.transformResponse, t), t.headers =
|
|
1300
|
+
].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), An.getAdapter(e.adapter || Mt.adapter, e)(e).then(function(t) {
|
|
1301
|
+
return jn(e), t.data = Kt.call(e, e.transformResponse, t), t.headers = K.from(t.headers), t;
|
|
1302
1302
|
}, function(t) {
|
|
1303
|
-
return qt(t) || (jn(e), t && t.response && (t.response.data = Kt.call(e, e.transformResponse, t.response), t.response.headers =
|
|
1303
|
+
return qt(t) || (jn(e), t && t.response && (t.response.data = Kt.call(e, e.transformResponse, t.response), t.response.headers = K.from(t.response.headers))), Promise.reject(t);
|
|
1304
1304
|
});
|
|
1305
1305
|
}
|
|
1306
1306
|
//#endregion
|
|
@@ -1324,23 +1324,23 @@ Pn.transitional = function(e, t, n) {
|
|
|
1324
1324
|
return "[Axios v" + Nn + "] Transitional option '" + e + "'" + t + (n ? ". " + n : "");
|
|
1325
1325
|
}
|
|
1326
1326
|
return (n, i, a) => {
|
|
1327
|
-
if (e === !1) throw new
|
|
1327
|
+
if (e === !1) throw new W(r(i, " has been removed" + (t ? " in " + t : "")), W.ERR_DEPRECATED);
|
|
1328
1328
|
return t && !Fn[i] && (Fn[i] = !0, console.warn(r(i, " has been deprecated since v" + t + " and will be removed in the near future"))), e ? e(n, i, a) : !0;
|
|
1329
1329
|
};
|
|
1330
1330
|
}, Pn.spelling = function(e) {
|
|
1331
1331
|
return (t, n) => (console.warn(`${n} is likely a misspelling of ${e}`), !0);
|
|
1332
1332
|
};
|
|
1333
1333
|
function In(e, t, n) {
|
|
1334
|
-
if (typeof e != "object") throw new
|
|
1334
|
+
if (typeof e != "object") throw new W("options must be an object", W.ERR_BAD_OPTION_VALUE);
|
|
1335
1335
|
let r = Object.keys(e), i = r.length;
|
|
1336
1336
|
for (; i-- > 0;) {
|
|
1337
1337
|
let a = r[i], o = Object.prototype.hasOwnProperty.call(t, a) ? t[a] : void 0;
|
|
1338
1338
|
if (o) {
|
|
1339
1339
|
let t = e[a], n = t === void 0 || o(t, a, e);
|
|
1340
|
-
if (n !== !0) throw new
|
|
1340
|
+
if (n !== !0) throw new W("option " + a + " must be " + n, W.ERR_BAD_OPTION_VALUE);
|
|
1341
1341
|
continue;
|
|
1342
1342
|
}
|
|
1343
|
-
if (n !== !0) throw new
|
|
1343
|
+
if (n !== !0) throw new W("Unknown option " + a, W.ERR_BAD_OPTION);
|
|
1344
1344
|
}
|
|
1345
1345
|
}
|
|
1346
1346
|
var Ln = {
|
|
@@ -1349,8 +1349,8 @@ var Ln = {
|
|
|
1349
1349
|
}, Rn = Ln.validators, zn = class {
|
|
1350
1350
|
constructor(e) {
|
|
1351
1351
|
this.defaults = e || {}, this.interceptors = {
|
|
1352
|
-
request: new
|
|
1353
|
-
response: new
|
|
1352
|
+
request: new _t(),
|
|
1353
|
+
response: new _t()
|
|
1354
1354
|
};
|
|
1355
1355
|
}
|
|
1356
1356
|
async request(e, t) {
|
|
@@ -1384,15 +1384,15 @@ var Ln = {
|
|
|
1384
1384
|
forcedJSONParsing: Rn.transitional(Rn.boolean),
|
|
1385
1385
|
clarifyTimeoutError: Rn.transitional(Rn.boolean),
|
|
1386
1386
|
legacyInterceptorReqResOrdering: Rn.transitional(Rn.boolean)
|
|
1387
|
-
}, !1), r != null && (
|
|
1387
|
+
}, !1), r != null && (U.isFunction(r) ? t.paramsSerializer = { serialize: r } : Ln.assertOptions(r, {
|
|
1388
1388
|
encode: Rn.function,
|
|
1389
1389
|
serialize: Rn.function
|
|
1390
1390
|
}, !0)), t.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls === void 0 ? t.allowAbsoluteUrls = !0 : t.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls), Ln.assertOptions(t, {
|
|
1391
1391
|
baseUrl: Rn.spelling("baseURL"),
|
|
1392
1392
|
withXsrfToken: Rn.spelling("withXSRFToken")
|
|
1393
1393
|
}, !0), t.method = (t.method || this.defaults.method || "get").toLowerCase();
|
|
1394
|
-
let a = i &&
|
|
1395
|
-
i &&
|
|
1394
|
+
let a = i && U.merge(i.common, i[t.method]);
|
|
1395
|
+
i && U.forEach([
|
|
1396
1396
|
"delete",
|
|
1397
1397
|
"get",
|
|
1398
1398
|
"head",
|
|
@@ -1402,12 +1402,12 @@ var Ln = {
|
|
|
1402
1402
|
"common"
|
|
1403
1403
|
], (e) => {
|
|
1404
1404
|
delete i[e];
|
|
1405
|
-
}), t.headers =
|
|
1405
|
+
}), t.headers = K.concat(a, i);
|
|
1406
1406
|
let o = [], s = !0;
|
|
1407
1407
|
this.interceptors.request.forEach(function(e) {
|
|
1408
1408
|
if (typeof e.runWhen == "function" && e.runWhen(t) === !1) return;
|
|
1409
1409
|
s &&= e.synchronous;
|
|
1410
|
-
let n = t.transitional ||
|
|
1410
|
+
let n = t.transitional || vt;
|
|
1411
1411
|
n && n.legacyInterceptorReqResOrdering ? o.unshift(e.fulfilled, e.rejected) : o.push(e.fulfilled, e.rejected);
|
|
1412
1412
|
});
|
|
1413
1413
|
let c = [];
|
|
@@ -1440,10 +1440,10 @@ var Ln = {
|
|
|
1440
1440
|
return l;
|
|
1441
1441
|
}
|
|
1442
1442
|
getUri(e) {
|
|
1443
|
-
return e = ln(this.defaults, e),
|
|
1443
|
+
return e = ln(this.defaults, e), gt(sn(e.baseURL, e.url, e.allowAbsoluteUrls), e.params, e.paramsSerializer);
|
|
1444
1444
|
}
|
|
1445
1445
|
};
|
|
1446
|
-
|
|
1446
|
+
U.forEach([
|
|
1447
1447
|
"delete",
|
|
1448
1448
|
"get",
|
|
1449
1449
|
"head",
|
|
@@ -1456,7 +1456,7 @@ W.forEach([
|
|
|
1456
1456
|
data: (n || {}).data
|
|
1457
1457
|
}));
|
|
1458
1458
|
};
|
|
1459
|
-
}),
|
|
1459
|
+
}), U.forEach([
|
|
1460
1460
|
"post",
|
|
1461
1461
|
"put",
|
|
1462
1462
|
"patch"
|
|
@@ -1540,7 +1540,7 @@ function Vn(e) {
|
|
|
1540
1540
|
//#endregion
|
|
1541
1541
|
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/helpers/isAxiosError.js
|
|
1542
1542
|
function Hn(e) {
|
|
1543
|
-
return
|
|
1543
|
+
return U.isObject(e) && e.isAxiosError === !0;
|
|
1544
1544
|
}
|
|
1545
1545
|
//#endregion
|
|
1546
1546
|
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/helpers/HttpStatusCode.js
|
|
@@ -1622,14 +1622,14 @@ Object.entries(Un).forEach(([e, t]) => {
|
|
|
1622
1622
|
//#region node_modules/.pnpm/axios@1.15.2/node_modules/axios/lib/axios.js
|
|
1623
1623
|
function Wn(e) {
|
|
1624
1624
|
let t = new zn(e), n = te(zn.prototype.request, t);
|
|
1625
|
-
return
|
|
1625
|
+
return U.extend(n, zn.prototype, t, { allOwnKeys: !0 }), U.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(t) {
|
|
1626
1626
|
return Wn(ln(e, t));
|
|
1627
1627
|
}, n;
|
|
1628
1628
|
}
|
|
1629
|
-
var q = Wn(
|
|
1630
|
-
q.Axios = zn, q.CanceledError = Jt, q.CancelToken = Bn, q.isCancel = qt, q.VERSION = Nn, q.toFormData =
|
|
1629
|
+
var q = Wn(Mt);
|
|
1630
|
+
q.Axios = zn, q.CanceledError = Jt, q.CancelToken = Bn, q.isCancel = qt, q.VERSION = Nn, q.toFormData = dt, q.AxiosError = W, q.Cancel = q.CanceledError, q.all = function(e) {
|
|
1631
1631
|
return Promise.all(e);
|
|
1632
|
-
}, q.spread = Vn, q.isAxiosError = Hn, q.mergeConfig = ln, q.AxiosHeaders =
|
|
1632
|
+
}, q.spread = Vn, q.isAxiosError = Hn, q.mergeConfig = ln, q.AxiosHeaders = K, q.formToJSON = (e) => kt(U.isHTMLForm(e) ? new FormData(e) : e), q.getAdapter = An.getAdapter, q.HttpStatusCode = Un, q.default = q;
|
|
1633
1633
|
//#endregion
|
|
1634
1634
|
//#region src/api/data/baostock.ts
|
|
1635
1635
|
function Gn(e) {
|
|
@@ -6832,6 +6832,8 @@ var ia = /* @__PURE__ */ function(e) {
|
|
|
6832
6832
|
function aa(e) {
|
|
6833
6833
|
return {
|
|
6834
6834
|
id: e.id,
|
|
6835
|
+
role: e.role,
|
|
6836
|
+
capabilities: { ...e.capabilities },
|
|
6835
6837
|
top: e.top,
|
|
6836
6838
|
height: e.height,
|
|
6837
6839
|
yAxis: {
|
|
@@ -7117,7 +7119,7 @@ var pa = Symbol("renderer:global-cache"), ma = class {
|
|
|
7117
7119
|
enabledState = /* @__PURE__ */ new Map();
|
|
7118
7120
|
groupCache = /* @__PURE__ */ new Map();
|
|
7119
7121
|
mergedCache = /* @__PURE__ */ new Map();
|
|
7120
|
-
knownPaneIds = new Set(
|
|
7122
|
+
knownPaneIds = /* @__PURE__ */ new Set();
|
|
7121
7123
|
cacheInvalid = !0;
|
|
7122
7124
|
onInvalidate = null;
|
|
7123
7125
|
setInvalidateCallback(e) {
|
|
@@ -7132,8 +7134,8 @@ var pa = Symbol("renderer:global-cache"), ma = class {
|
|
|
7132
7134
|
removeKnownPaneId(e) {
|
|
7133
7135
|
this.knownPaneIds.delete(e), this.cacheInvalid = !0;
|
|
7134
7136
|
}
|
|
7135
|
-
|
|
7136
|
-
|
|
7137
|
+
setKnownPaneIds(e) {
|
|
7138
|
+
this.knownPaneIds = new Set(e), this.cacheInvalid = !0;
|
|
7137
7139
|
}
|
|
7138
7140
|
register(e) {
|
|
7139
7141
|
if (this.plugins.has(e.name)) {
|
|
@@ -7200,7 +7202,11 @@ var pa = Symbol("renderer:global-cache"), ma = class {
|
|
|
7200
7202
|
getMergedRenderers(e) {
|
|
7201
7203
|
this.rebuildCache();
|
|
7202
7204
|
let t = this.mergedCache.get(e);
|
|
7203
|
-
|
|
7205
|
+
if (!t) {
|
|
7206
|
+
let n = this.groupCache.get(e) ?? [], r = this.groupCache.get(pa) ?? [];
|
|
7207
|
+
t = this.mergeSorted(n, r), this.mergedCache.set(e, t);
|
|
7208
|
+
}
|
|
7209
|
+
return t;
|
|
7204
7210
|
}
|
|
7205
7211
|
getRenderers(e) {
|
|
7206
7212
|
return this.getMergedRenderers(e).filter((e) => e.isSystem ? !1 : this.isRendererEnabled(e));
|
|
@@ -7285,7 +7291,7 @@ function ya() {
|
|
|
7285
7291
|
version: "1.0.0",
|
|
7286
7292
|
description: "自定义标记渲染器",
|
|
7287
7293
|
debugName: "自定义标记",
|
|
7288
|
-
paneId:
|
|
7294
|
+
paneId: oa,
|
|
7289
7295
|
priority: X.OVERLAY,
|
|
7290
7296
|
draw(e) {
|
|
7291
7297
|
let { ctx: t, pane: n, data: r, range: i, scrollLeft: a, kWidth: o, kLinePositions: s, markerManager: c } = e;
|
|
@@ -7293,7 +7299,7 @@ function ya() {
|
|
|
7293
7299
|
let l = c.getCustomMarkers();
|
|
7294
7300
|
if (!l || l.length === 0) return;
|
|
7295
7301
|
let u = r;
|
|
7296
|
-
if (u.length && n.
|
|
7302
|
+
if (u.length && n.role === "price") {
|
|
7297
7303
|
t.save(), t.translate(-a, 0);
|
|
7298
7304
|
for (let e of l) {
|
|
7299
7305
|
let r = xa(u, e.timestamp);
|
|
@@ -8154,7 +8160,7 @@ var no = { class: "kline-tooltip__title" }, ro = { key: 0 }, io = { class: "klin
|
|
|
8154
8160
|
], S = y.filter((e) => e.pane === "main"), T = y.filter((e) => e.pane === "sub"), E = u, D = d, O = _(null), k = _(null), A = _(!1), j = _(null), M = _(null), N = _(!1), ee = _({
|
|
8155
8161
|
left: "0",
|
|
8156
8162
|
bottom: "0"
|
|
8157
|
-
}), P = _(null), F = _(null), I = r(() => E.activeIndicators?.length ? E.activeIndicators.map((e) => y.find((t) => t.id === e)).filter((e) => e !== void 0) : []), te = r(() => I.value.find((e) => e.pane === "sub")?.id ?? null), ne = r(() => j.value && y.find((e) => e.id === j.value) || null);
|
|
8163
|
+
}), P = _(null), F = _(null), I = r(() => E.activeIndicators?.length ? E.activeIndicators.map((e) => y.find((t) => t.id === e)).filter((e) => e !== void 0).sort((e, t) => e.pane === t.pane ? 0 : e.pane === "main" ? -1 : 1) : []), te = r(() => I.value.find((e) => e.pane === "sub")?.id ?? null), ne = r(() => j.value && y.find((e) => e.id === j.value) || null);
|
|
8158
8164
|
function L(e) {
|
|
8159
8165
|
return E.activeIndicators?.includes(e) ?? !1;
|
|
8160
8166
|
}
|
|
@@ -8237,13 +8243,13 @@ var no = { class: "kline-tooltip__title" }, ro = { key: 0 }, io = { class: "klin
|
|
|
8237
8243
|
let t = k.value && !k.value.contains(e.target), n = O.value && !O.value.contains(e.target);
|
|
8238
8244
|
t && n && (N.value = !1);
|
|
8239
8245
|
}
|
|
8240
|
-
function
|
|
8246
|
+
function V() {
|
|
8241
8247
|
N.value &&= !1;
|
|
8242
8248
|
}
|
|
8243
8249
|
return m(() => {
|
|
8244
|
-
document.addEventListener("click", fe), window.addEventListener("resize",
|
|
8250
|
+
document.addEventListener("click", fe), window.addEventListener("resize", V);
|
|
8245
8251
|
}), h(() => {
|
|
8246
|
-
document.removeEventListener("click", fe), window.removeEventListener("resize",
|
|
8252
|
+
document.removeEventListener("click", fe), window.removeEventListener("resize", V);
|
|
8247
8253
|
}), (r, u) => (g(), o("div", Ho, [
|
|
8248
8254
|
s("div", Uo, [s("div", Wo, [(g(!0), o(e, null, v(I.value, (t) => (g(), o(e, { key: t.id }, [t.id === te.value ? (g(), o("div", Go)) : a("", !0), s("div", {
|
|
8249
8255
|
class: f(["indicator-item", {
|
|
@@ -8359,7 +8365,7 @@ var no = { class: "kline-tooltip__title" }, ro = { key: 0 }, io = { class: "klin
|
|
|
8359
8365
|
])) : a("", !0)
|
|
8360
8366
|
]));
|
|
8361
8367
|
}
|
|
8362
|
-
}), [["__scopeId", "data-v-
|
|
8368
|
+
}), [["__scopeId", "data-v-061fa6d4"]]);
|
|
8363
8369
|
//#endregion
|
|
8364
8370
|
//#region src/core/utils/klineConfig.ts
|
|
8365
8371
|
function fs(e, t) {
|
|
@@ -8451,8 +8457,31 @@ var gs = class {
|
|
|
8451
8457
|
deltaYToPriceOffset(e) {
|
|
8452
8458
|
return e * ((this.range.maxPrice - this.range.minPrice || 1) / Math.max(1, this.height - this.paddingTop - this.paddingBottom));
|
|
8453
8459
|
}
|
|
8454
|
-
}
|
|
8460
|
+
};
|
|
8461
|
+
//#endregion
|
|
8462
|
+
//#region src/core/layout/pane.ts
|
|
8463
|
+
function _s(e) {
|
|
8464
|
+
return e === "price" ? {
|
|
8465
|
+
showPriceAxisTicks: !0,
|
|
8466
|
+
showCrosshairPriceLabel: !0,
|
|
8467
|
+
candleHitTest: !0,
|
|
8468
|
+
supportsPriceTranslate: !0
|
|
8469
|
+
} : e === "indicator" ? {
|
|
8470
|
+
showPriceAxisTicks: !1,
|
|
8471
|
+
showCrosshairPriceLabel: !0,
|
|
8472
|
+
candleHitTest: !1,
|
|
8473
|
+
supportsPriceTranslate: !0
|
|
8474
|
+
} : {
|
|
8475
|
+
showPriceAxisTicks: !1,
|
|
8476
|
+
showCrosshairPriceLabel: !1,
|
|
8477
|
+
candleHitTest: !1,
|
|
8478
|
+
supportsPriceTranslate: !1
|
|
8479
|
+
};
|
|
8480
|
+
}
|
|
8481
|
+
var vs = class {
|
|
8455
8482
|
id;
|
|
8483
|
+
role;
|
|
8484
|
+
capabilities;
|
|
8456
8485
|
top = 0;
|
|
8457
8486
|
height = 0;
|
|
8458
8487
|
priceRange = {
|
|
@@ -8461,8 +8490,11 @@ var gs = class {
|
|
|
8461
8490
|
};
|
|
8462
8491
|
yAxis = new gs();
|
|
8463
8492
|
renderers = [];
|
|
8464
|
-
constructor(e) {
|
|
8465
|
-
this.id = e
|
|
8493
|
+
constructor(e, t = {}) {
|
|
8494
|
+
this.id = e, this.role = t.role ?? (e === "main" ? "price" : "indicator"), this.capabilities = {
|
|
8495
|
+
..._s(this.role),
|
|
8496
|
+
...t.capabilities ?? {}
|
|
8497
|
+
};
|
|
8466
8498
|
}
|
|
8467
8499
|
setLayout(e, t) {
|
|
8468
8500
|
this.top = e, this.height = Math.max(1, t), this.yAxis.setHeight(this.height);
|
|
@@ -8476,7 +8508,7 @@ var gs = class {
|
|
|
8476
8508
|
updateRange(e, t) {
|
|
8477
8509
|
this.priceRange = hs(e, t.start, t.end), this.yAxis.setRange(this.priceRange);
|
|
8478
8510
|
}
|
|
8479
|
-
},
|
|
8511
|
+
}, ys = class {
|
|
8480
8512
|
chart;
|
|
8481
8513
|
isDragging = !1;
|
|
8482
8514
|
dragMode = "none";
|
|
@@ -8707,7 +8739,7 @@ var gs = class {
|
|
|
8707
8739
|
} else this.crosshairPrice = null;
|
|
8708
8740
|
} else this.crosshairIndex = null, this.crosshairPos = null, this.crosshairPrice = null;
|
|
8709
8741
|
let T = typeof this.crosshairIndex == "number" ? C[this.crosshairIndex] : void 0;
|
|
8710
|
-
if (!T || !w || w.
|
|
8742
|
+
if (!T || !w || !w.capabilities.candleHitTest) {
|
|
8711
8743
|
this.hoveredIndex = null;
|
|
8712
8744
|
return;
|
|
8713
8745
|
}
|
|
@@ -8726,7 +8758,7 @@ var gs = class {
|
|
|
8726
8758
|
reset() {
|
|
8727
8759
|
this.isDragging = !1, this.dragMode = "none", this.dragStartX = 0, this.dragStartY = 0, this.scrollStartX = 0, this.activePaneIdOnDrag = null, this.clearSeparatorState(), this.isTouchSession = !1, this.crosshairPos = null, this.crosshairIndex = null, this.crosshairPrice = null, this.hoveredIndex = null, this.activePaneId = null, this.hoveredMarkerId = null, this.clickedMarkerId = null, this.hoveredMarkerData = null, this.clickedMarkerData = null, this.kLinePositions = null, this.visibleRange = null, this.kWidthPx = null;
|
|
8728
8760
|
}
|
|
8729
|
-
},
|
|
8761
|
+
}, bs = class {
|
|
8730
8762
|
dom;
|
|
8731
8763
|
pane;
|
|
8732
8764
|
opt;
|
|
@@ -8744,15 +8776,15 @@ var gs = class {
|
|
|
8744
8776
|
}
|
|
8745
8777
|
resize(e, t, n) {
|
|
8746
8778
|
let r = this.dom.plotCanvas, i = this.dom.yAxisCanvas;
|
|
8747
|
-
r.width = Math.round(e * n), r.height = Math.round(t * n), r.style.width = `${
|
|
8779
|
+
r.width = Math.round(e * n), r.height = Math.round(t * n), r.style.width = `${e}px`, r.style.height = `${t}px`;
|
|
8748
8780
|
let a = this.opt.rightAxisWidth + (this.opt.priceLabelWidth || 60);
|
|
8749
|
-
i.width = Math.round(a * n), i.height = Math.round(t * n), i.style.width = `${
|
|
8781
|
+
i.width = Math.round(a * n), i.height = Math.round(t * n), i.style.width = `${a}px`, i.style.height = `${t}px`;
|
|
8750
8782
|
}
|
|
8751
8783
|
destroy() {}
|
|
8752
8784
|
};
|
|
8753
8785
|
//#endregion
|
|
8754
8786
|
//#region src/core/renderers/subVolume.ts
|
|
8755
|
-
function
|
|
8787
|
+
function xs(e = {}) {
|
|
8756
8788
|
let { paneId: t = "sub" } = e;
|
|
8757
8789
|
return {
|
|
8758
8790
|
name: `volume_${t}`,
|
|
@@ -8771,21 +8803,21 @@ function bs(e = {}) {
|
|
|
8771
8803
|
if (!r) continue;
|
|
8772
8804
|
let i = r.volume;
|
|
8773
8805
|
if (!i) continue;
|
|
8774
|
-
let a =
|
|
8775
|
-
d &&
|
|
8806
|
+
let a = Cs(r), d = c[e - u];
|
|
8807
|
+
d && Ss(t, d, a, i, f, o, s, n.height);
|
|
8776
8808
|
}
|
|
8777
8809
|
t.restore();
|
|
8778
8810
|
}
|
|
8779
8811
|
};
|
|
8780
8812
|
}
|
|
8781
|
-
function
|
|
8782
|
-
let c =
|
|
8813
|
+
function Ss(e, t, n, r, i, a, o, s) {
|
|
8814
|
+
let c = ws(r, i, s), l = a;
|
|
8783
8815
|
e.fillStyle = n, e.fillRect(t, c, l, s - c);
|
|
8784
8816
|
}
|
|
8785
|
-
function
|
|
8817
|
+
function Cs(e) {
|
|
8786
8818
|
return e.close > e.open ? ka.UP : e.close < e.open ? ka.DOWN : ka.NEUTRAL;
|
|
8787
8819
|
}
|
|
8788
|
-
function
|
|
8820
|
+
function ws(e, t, n) {
|
|
8789
8821
|
return n - n / t * e;
|
|
8790
8822
|
}
|
|
8791
8823
|
//#endregion
|
|
@@ -8796,7 +8828,7 @@ function Z(e, t) {
|
|
|
8796
8828
|
function Q(e, t) {
|
|
8797
8829
|
return (Math.floor(e * t) + .5) / t;
|
|
8798
8830
|
}
|
|
8799
|
-
function
|
|
8831
|
+
function Ts(e, t, n, r) {
|
|
8800
8832
|
if (t === n) return null;
|
|
8801
8833
|
let i = Math.min(t, n), a = Math.max(t, n), o = Math.round(e * r), s = Math.round(i * r), c = Math.round(a * r);
|
|
8802
8834
|
return {
|
|
@@ -8806,7 +8838,7 @@ function ws(e, t, n, r) {
|
|
|
8806
8838
|
height: Math.max(1, c - s) / r
|
|
8807
8839
|
};
|
|
8808
8840
|
}
|
|
8809
|
-
function
|
|
8841
|
+
function Es(e, t, n, r) {
|
|
8810
8842
|
if (e === t) return null;
|
|
8811
8843
|
let i = Math.min(e, t), a = Math.max(e, t), o = Math.round(i * r), s = Math.round(a * r), c = Math.round(n * r);
|
|
8812
8844
|
return {
|
|
@@ -8816,7 +8848,7 @@ function Ts(e, t, n, r) {
|
|
|
8816
8848
|
height: 1 / r
|
|
8817
8849
|
};
|
|
8818
8850
|
}
|
|
8819
|
-
function
|
|
8851
|
+
function Ds(e, t, n, r, i) {
|
|
8820
8852
|
let a = e + n, o = n, s = Math.round(t * i), c = Math.round((t + r) * i), l = Math.max(1, c - s), u = e + (n - 1) / 2, d = u, f = o % 2 == 1;
|
|
8821
8853
|
return {
|
|
8822
8854
|
bodyRect: {
|
|
@@ -8839,7 +8871,7 @@ function Es(e, t, n, r, i) {
|
|
|
8839
8871
|
}
|
|
8840
8872
|
//#endregion
|
|
8841
8873
|
//#region src/core/renderers/Indicator/ma.ts
|
|
8842
|
-
function
|
|
8874
|
+
function Os(e, t) {
|
|
8843
8875
|
let n = Array(e.length);
|
|
8844
8876
|
if (e.length < t) return n;
|
|
8845
8877
|
let r = 0;
|
|
@@ -8855,7 +8887,7 @@ function Ds(e, t) {
|
|
|
8855
8887
|
}
|
|
8856
8888
|
return n;
|
|
8857
8889
|
}
|
|
8858
|
-
function
|
|
8890
|
+
function ks(e = {}) {
|
|
8859
8891
|
let t = {
|
|
8860
8892
|
ma5: !0,
|
|
8861
8893
|
ma10: !0,
|
|
@@ -8867,7 +8899,7 @@ function Os(e = {}) {
|
|
|
8867
8899
|
function i(e, t) {
|
|
8868
8900
|
let i = n.get(t);
|
|
8869
8901
|
if (i && r === e) return i.values;
|
|
8870
|
-
let a =
|
|
8902
|
+
let a = Os(e, t);
|
|
8871
8903
|
return n.set(t, {
|
|
8872
8904
|
period: t,
|
|
8873
8905
|
values: a
|
|
@@ -8909,7 +8941,7 @@ function Os(e = {}) {
|
|
|
8909
8941
|
}
|
|
8910
8942
|
//#endregion
|
|
8911
8943
|
//#region src/core/renderers/Indicator/boll.ts
|
|
8912
|
-
function
|
|
8944
|
+
function As(e, t, n) {
|
|
8913
8945
|
let r = Array(e.length);
|
|
8914
8946
|
if (e.length < t) return r;
|
|
8915
8947
|
let i = 0, a = [];
|
|
@@ -8942,7 +8974,7 @@ function ks(e, t, n) {
|
|
|
8942
8974
|
}
|
|
8943
8975
|
return r;
|
|
8944
8976
|
}
|
|
8945
|
-
function
|
|
8977
|
+
function js(e = {}) {
|
|
8946
8978
|
let t = {
|
|
8947
8979
|
period: 20,
|
|
8948
8980
|
multiplier: 2,
|
|
@@ -8953,7 +8985,7 @@ function As(e = {}) {
|
|
|
8953
8985
|
...e
|
|
8954
8986
|
}, n = null, r = 0, i = 0, a = [];
|
|
8955
8987
|
function o(e) {
|
|
8956
|
-
return (n !== e || r !== t.period || i !== t.multiplier) && (a =
|
|
8988
|
+
return (n !== e || r !== t.period || i !== t.multiplier) && (a = As(e, t.period, t.multiplier), n = e, r = t.period, i = t.multiplier), a;
|
|
8957
8989
|
}
|
|
8958
8990
|
return {
|
|
8959
8991
|
name: "boll",
|
|
@@ -9010,7 +9042,7 @@ function As(e = {}) {
|
|
|
9010
9042
|
}
|
|
9011
9043
|
};
|
|
9012
9044
|
}
|
|
9013
|
-
function
|
|
9045
|
+
function Ms(e, t, n = 20, r = 2) {
|
|
9014
9046
|
if (t < n - 1 || t >= e.length) return null;
|
|
9015
9047
|
let i = 0;
|
|
9016
9048
|
for (let r = 0; r < n; r++) {
|
|
@@ -9033,7 +9065,7 @@ function js(e, t, n = 20, r = 2) {
|
|
|
9033
9065
|
}
|
|
9034
9066
|
//#endregion
|
|
9035
9067
|
//#region src/core/renderers/Indicator/expma.ts
|
|
9036
|
-
function
|
|
9068
|
+
function Ns(e, t, n) {
|
|
9037
9069
|
let r = Array(e.length);
|
|
9038
9070
|
if (e.length === 0) return r;
|
|
9039
9071
|
let i = 2 / (t + 1), a = 2 / (n + 1), o = e[0].close, s = o, c = o;
|
|
@@ -9050,7 +9082,7 @@ function Ms(e, t, n) {
|
|
|
9050
9082
|
}
|
|
9051
9083
|
return r;
|
|
9052
9084
|
}
|
|
9053
|
-
function
|
|
9085
|
+
function Ps(e, t, n = 12, r = 50) {
|
|
9054
9086
|
if (t < 0 || t >= e.length) return null;
|
|
9055
9087
|
let i = 2 / (n + 1), a = 2 / (r + 1), o = e[0].close, s = o, c = o;
|
|
9056
9088
|
for (let n = 1; n <= t; n++) {
|
|
@@ -9062,14 +9094,14 @@ function Ns(e, t, n = 12, r = 50) {
|
|
|
9062
9094
|
slow: c
|
|
9063
9095
|
};
|
|
9064
9096
|
}
|
|
9065
|
-
function
|
|
9097
|
+
function Fs(e = {}) {
|
|
9066
9098
|
let t = {
|
|
9067
9099
|
fastPeriod: 12,
|
|
9068
9100
|
slowPeriod: 50,
|
|
9069
9101
|
...e
|
|
9070
9102
|
}, n = null, r = 0, i = 0, a = [];
|
|
9071
9103
|
function o(e) {
|
|
9072
|
-
return (n !== e || r !== t.fastPeriod || i !== t.slowPeriod) && (a =
|
|
9104
|
+
return (n !== e || r !== t.fastPeriod || i !== t.slowPeriod) && (a = Ns(e, t.fastPeriod, t.slowPeriod), n = e, r = t.fastPeriod, i = t.slowPeriod), a;
|
|
9073
9105
|
}
|
|
9074
9106
|
return {
|
|
9075
9107
|
name: "expma",
|
|
@@ -9109,7 +9141,7 @@ function Ps(e = {}) {
|
|
|
9109
9141
|
}
|
|
9110
9142
|
//#endregion
|
|
9111
9143
|
//#region src/core/renderers/Indicator/ene.ts
|
|
9112
|
-
function
|
|
9144
|
+
function Is(e, t, n) {
|
|
9113
9145
|
let r = Array(e.length);
|
|
9114
9146
|
if (e.length < t) return r;
|
|
9115
9147
|
let i = 0;
|
|
@@ -9137,7 +9169,7 @@ function Fs(e, t, n) {
|
|
|
9137
9169
|
}
|
|
9138
9170
|
return r;
|
|
9139
9171
|
}
|
|
9140
|
-
function
|
|
9172
|
+
function Ls(e, t, n = 10, r = 11) {
|
|
9141
9173
|
if (t < n - 1 || t >= e.length) return null;
|
|
9142
9174
|
let i = 0;
|
|
9143
9175
|
for (let r = 0; r < n; r++) {
|
|
@@ -9152,14 +9184,14 @@ function Is(e, t, n = 10, r = 11) {
|
|
|
9152
9184
|
lower: a * (1 - o)
|
|
9153
9185
|
};
|
|
9154
9186
|
}
|
|
9155
|
-
function
|
|
9187
|
+
function Rs(e = {}) {
|
|
9156
9188
|
let t = {
|
|
9157
9189
|
period: 10,
|
|
9158
9190
|
deviation: 11,
|
|
9159
9191
|
...e
|
|
9160
9192
|
}, n = null, r = 0, i = 0, a = [];
|
|
9161
9193
|
function o(e) {
|
|
9162
|
-
return (n !== e || r !== t.period || i !== t.deviation) && (a =
|
|
9194
|
+
return (n !== e || r !== t.period || i !== t.deviation) && (a = Is(e, t.period, t.deviation), n = e, r = t.period, i = t.deviation), a;
|
|
9163
9195
|
}
|
|
9164
9196
|
return {
|
|
9165
9197
|
name: "ene",
|
|
@@ -9215,7 +9247,7 @@ function Ls(e = {}) {
|
|
|
9215
9247
|
}
|
|
9216
9248
|
//#endregion
|
|
9217
9249
|
//#region src/utils/kline/ma.ts
|
|
9218
|
-
function
|
|
9250
|
+
function zs(e, t, n) {
|
|
9219
9251
|
if (t < n - 1) return;
|
|
9220
9252
|
let r = 0;
|
|
9221
9253
|
for (let i = 0; i < n; i++) {
|
|
@@ -9227,7 +9259,7 @@ function Rs(e, t, n) {
|
|
|
9227
9259
|
}
|
|
9228
9260
|
//#endregion
|
|
9229
9261
|
//#region src/core/renderers/Indicator/mainIndicatorLegend.ts
|
|
9230
|
-
function
|
|
9262
|
+
function Bs(e) {
|
|
9231
9263
|
let t = {
|
|
9232
9264
|
yPaddingPx: e.yPaddingPx,
|
|
9233
9265
|
indicators: {
|
|
@@ -9278,28 +9310,28 @@ function zs(e) {
|
|
|
9278
9310
|
r.push({
|
|
9279
9311
|
label: `MA${e}`,
|
|
9280
9312
|
color: Na[t] || Na.MA5,
|
|
9281
|
-
value:
|
|
9313
|
+
value: zs(a, o, e)
|
|
9282
9314
|
});
|
|
9283
9315
|
}) : r.push({
|
|
9284
9316
|
label: "MA5",
|
|
9285
9317
|
color: Na.MA5,
|
|
9286
|
-
value:
|
|
9318
|
+
value: zs(a, o, 5)
|
|
9287
9319
|
}, {
|
|
9288
9320
|
label: "MA10",
|
|
9289
9321
|
color: Na.MA10,
|
|
9290
|
-
value:
|
|
9322
|
+
value: zs(a, o, 10)
|
|
9291
9323
|
}, {
|
|
9292
9324
|
label: "MA20",
|
|
9293
9325
|
color: Na.MA20,
|
|
9294
|
-
value:
|
|
9326
|
+
value: zs(a, o, 20)
|
|
9295
9327
|
}, {
|
|
9296
9328
|
label: "MA30",
|
|
9297
9329
|
color: Na.MA30,
|
|
9298
|
-
value:
|
|
9330
|
+
value: zs(a, o, 30)
|
|
9299
9331
|
}, {
|
|
9300
9332
|
label: "MA60",
|
|
9301
9333
|
color: Na.MA60,
|
|
9302
|
-
value:
|
|
9334
|
+
value: zs(a, o, 60)
|
|
9303
9335
|
}), r.length > 0) {
|
|
9304
9336
|
let i = 12, a = t.yPaddingPx / 2 + 12 + e * 18;
|
|
9305
9337
|
n.fillStyle = ka.NEUTRAL, n.fillText("MA", i, a), i += n.measureText("MA").width + 10;
|
|
@@ -9311,17 +9343,17 @@ function zs(e) {
|
|
|
9311
9343
|
} });
|
|
9312
9344
|
let l = t.indicators.BOLL;
|
|
9313
9345
|
l?.enabled && s.push({ draw: (e) => {
|
|
9314
|
-
let r = l.params.period ?? 20, i = l.params.multiplier ?? 2, s =
|
|
9346
|
+
let r = l.params.period ?? 20, i = l.params.multiplier ?? 2, s = Ms(a, o, r, i), c = 12, u = t.yPaddingPx / 2 + 12 + e * 18;
|
|
9315
9347
|
n.fillStyle = ka.NEUTRAL, n.fillText(`BOLL(${r},${i})`, c, u), c += n.measureText(`BOLL(${r},${i})`).width + 10, s && (n.fillStyle = Pa.UPPER, n.fillText(`上轨:${s.upper.toFixed(2)}`, c, u), c += n.measureText(`上轨:${s.upper.toFixed(2)}`).width + 10, n.fillStyle = Pa.MIDDLE, n.fillText(`中轨:${s.middle.toFixed(2)}`, c, u), c += n.measureText(`中轨:${s.middle.toFixed(2)}`).width + 10, n.fillStyle = Pa.LOWER, n.fillText(`下轨:${s.lower.toFixed(2)}`, c, u));
|
|
9316
9348
|
} });
|
|
9317
9349
|
let u = t.indicators.EXPMA;
|
|
9318
9350
|
u?.enabled && s.push({ draw: (e) => {
|
|
9319
|
-
let r = u.params.fastPeriod ?? 12, i = u.params.slowPeriod ?? 50, s =
|
|
9351
|
+
let r = u.params.fastPeriod ?? 12, i = u.params.slowPeriod ?? 50, s = Ps(a, o, r, i), c = 12, l = t.yPaddingPx / 2 + 12 + e * 18;
|
|
9320
9352
|
n.fillStyle = ka.NEUTRAL, n.fillText(`EXPMA(${r},${i})`, c, l), c += n.measureText(`EXPMA(${r},${i})`).width + 10, s && (n.fillStyle = Ha.FAST, n.fillText(`快:${s.fast.toFixed(2)}`, c, l), c += n.measureText(`快:${s.fast.toFixed(2)}`).width + 10, n.fillStyle = Ha.SLOW, n.fillText(`慢:${s.slow.toFixed(2)}`, c, l));
|
|
9321
9353
|
} });
|
|
9322
9354
|
let d = t.indicators.ENE;
|
|
9323
9355
|
d?.enabled && s.push({ draw: (e) => {
|
|
9324
|
-
let r = d.params.period ?? 10, i = d.params.deviation ?? 11, s =
|
|
9356
|
+
let r = d.params.period ?? 10, i = d.params.deviation ?? 11, s = Ls(a, o, r, i), c = 12, l = t.yPaddingPx / 2 + 12 + e * 18;
|
|
9325
9357
|
n.fillStyle = ka.NEUTRAL, n.fillText(`ENE(${r},${i})`, c, l), c += n.measureText(`ENE(${r},${i})`).width + 10, s && (n.fillStyle = Ua.UPPER, n.fillText(`上轨:${s.upper.toFixed(2)}`, c, l), c += n.measureText(`上轨:${s.upper.toFixed(2)}`).width + 10, n.fillStyle = Ua.MIDDLE, n.fillText(`中轨:${s.middle.toFixed(2)}`, c, l), c += n.measureText(`中轨:${s.middle.toFixed(2)}`).width + 10, n.fillStyle = Ua.LOWER, n.fillText(`下轨:${s.lower.toFixed(2)}`, c, l));
|
|
9326
9358
|
} }), s.forEach((e, t) => e.draw(t)), n.restore();
|
|
9327
9359
|
},
|
|
@@ -9341,10 +9373,10 @@ function zs(e) {
|
|
|
9341
9373
|
}
|
|
9342
9374
|
//#endregion
|
|
9343
9375
|
//#region src/plugin/stateKeys.ts
|
|
9344
|
-
var
|
|
9376
|
+
var Vs = (e, t) => `indicator:${e}:${t}`;
|
|
9345
9377
|
//#endregion
|
|
9346
9378
|
//#region src/core/renderers/Indicator/macd.ts
|
|
9347
|
-
function
|
|
9379
|
+
function Hs(e, t) {
|
|
9348
9380
|
let n = Array(e.length), r = 2 / (t + 1);
|
|
9349
9381
|
if (e.length === 0) return n;
|
|
9350
9382
|
n[0] = e[0].close;
|
|
@@ -9354,7 +9386,7 @@ function Vs(e, t) {
|
|
|
9354
9386
|
}
|
|
9355
9387
|
return n;
|
|
9356
9388
|
}
|
|
9357
|
-
function
|
|
9389
|
+
function Us(e, t) {
|
|
9358
9390
|
let n = Array(e.length), r = 2 / (t + 1), i = e.findIndex((e) => e !== void 0);
|
|
9359
9391
|
if (i === -1) return n;
|
|
9360
9392
|
n[i] = e[i];
|
|
@@ -9364,15 +9396,15 @@ function Hs(e, t) {
|
|
|
9364
9396
|
}
|
|
9365
9397
|
return n;
|
|
9366
9398
|
}
|
|
9367
|
-
function
|
|
9399
|
+
function Ws(e, t, n, r) {
|
|
9368
9400
|
let i = Array(e.length);
|
|
9369
9401
|
if (e.length < n) return i;
|
|
9370
|
-
let a =
|
|
9402
|
+
let a = Hs(e, t), o = Hs(e, n), s = Array(e.length);
|
|
9371
9403
|
for (let t = 0; t < e.length; t++) {
|
|
9372
9404
|
let e = a[t], n = o[t];
|
|
9373
9405
|
e !== void 0 && n !== void 0 && (s[t] = e - n);
|
|
9374
9406
|
}
|
|
9375
|
-
let c =
|
|
9407
|
+
let c = Us(s, r);
|
|
9376
9408
|
for (let t = 0; t < e.length; t++) {
|
|
9377
9409
|
let e = s[t], n = c[t];
|
|
9378
9410
|
e !== void 0 && n !== void 0 && (i[t] = {
|
|
@@ -9383,8 +9415,8 @@ function Us(e, t, n, r) {
|
|
|
9383
9415
|
}
|
|
9384
9416
|
return i;
|
|
9385
9417
|
}
|
|
9386
|
-
function
|
|
9387
|
-
let { paneId: t = "sub", config: n = {} } = e, r =
|
|
9418
|
+
function Gs(e = {}) {
|
|
9419
|
+
let { paneId: t = "sub", config: n = {} } = e, r = Vs("macd", t), i = null, a = {
|
|
9388
9420
|
fastPeriod: 12,
|
|
9389
9421
|
slowPeriod: 26,
|
|
9390
9422
|
signalPeriod: 9,
|
|
@@ -9394,7 +9426,7 @@ function Ws(e = {}) {
|
|
|
9394
9426
|
...n
|
|
9395
9427
|
}, o = null, s = 0, c = 0, l = 0, u = [];
|
|
9396
9428
|
function d(e) {
|
|
9397
|
-
return (o !== e || s !== a.fastPeriod || c !== a.slowPeriod || l !== a.signalPeriod) && (u =
|
|
9429
|
+
return (o !== e || s !== a.fastPeriod || c !== a.slowPeriod || l !== a.signalPeriod) && (u = Ws(e, a.fastPeriod, a.slowPeriod, a.signalPeriod), o = e, s = a.fastPeriod, c = a.slowPeriod, l = a.signalPeriod), u;
|
|
9398
9430
|
}
|
|
9399
9431
|
return {
|
|
9400
9432
|
name: `macd_${t}`,
|
|
@@ -9492,11 +9524,11 @@ function Ws(e = {}) {
|
|
|
9492
9524
|
}
|
|
9493
9525
|
};
|
|
9494
9526
|
}
|
|
9495
|
-
function Gs(e, t, n = 12, r = 26, i = 9) {
|
|
9496
|
-
return t < r || t >= e.length ? null : Us(e, n, r, i)[t] ?? null;
|
|
9497
|
-
}
|
|
9498
9527
|
function Ks(e, t, n = 12, r = 26, i = 9) {
|
|
9499
|
-
|
|
9528
|
+
return t < r || t >= e.length ? null : Ws(e, n, r, i)[t] ?? null;
|
|
9529
|
+
}
|
|
9530
|
+
function qs(e, t, n = 12, r = 26, i = 9) {
|
|
9531
|
+
let a = Ks(e, t, n, r, i);
|
|
9500
9532
|
return a ? {
|
|
9501
9533
|
name: "MACD",
|
|
9502
9534
|
params: [
|
|
@@ -9525,7 +9557,7 @@ function Ks(e, t, n = 12, r = 26, i = 9) {
|
|
|
9525
9557
|
}
|
|
9526
9558
|
//#endregion
|
|
9527
9559
|
//#region src/core/renderers/Indicator/rsi.ts
|
|
9528
|
-
function
|
|
9560
|
+
function Js(e, t) {
|
|
9529
9561
|
let n = Array(e.length);
|
|
9530
9562
|
if (e.length < t + 1) return n;
|
|
9531
9563
|
let r = [];
|
|
@@ -9547,8 +9579,8 @@ function qs(e, t) {
|
|
|
9547
9579
|
}
|
|
9548
9580
|
return n;
|
|
9549
9581
|
}
|
|
9550
|
-
function
|
|
9551
|
-
let { paneId: t = "sub", config: n = {} } = e, r =
|
|
9582
|
+
function Ys(e = {}) {
|
|
9583
|
+
let { paneId: t = "sub", config: n = {} } = e, r = Vs("rsi", t), i = null, a = {
|
|
9552
9584
|
period1: 6,
|
|
9553
9585
|
period2: 12,
|
|
9554
9586
|
period3: 24,
|
|
@@ -9558,7 +9590,7 @@ function Js(e = {}) {
|
|
|
9558
9590
|
...n
|
|
9559
9591
|
}, o = null, s = 0, c = 0, l = 0, u = [], d = [], f = [];
|
|
9560
9592
|
function p(e) {
|
|
9561
|
-
return (o !== e || s !== a.period1 || c !== a.period2 || l !== a.period3) && (u =
|
|
9593
|
+
return (o !== e || s !== a.period1 || c !== a.period2 || l !== a.period3) && (u = Js(e, a.period1), d = Js(e, a.period2), f = Js(e, a.period3), o = e, s = a.period1, c = a.period2, l = a.period3), {
|
|
9562
9594
|
rsi1: u,
|
|
9563
9595
|
rsi2: d,
|
|
9564
9596
|
rsi3: f
|
|
@@ -9614,9 +9646,9 @@ function Js(e = {}) {
|
|
|
9614
9646
|
}
|
|
9615
9647
|
};
|
|
9616
9648
|
}
|
|
9617
|
-
function
|
|
9649
|
+
function Xs(e, t, n = 6, r = 12, i = 24) {
|
|
9618
9650
|
if (t < n + 1 || t >= e.length) return null;
|
|
9619
|
-
let a =
|
|
9651
|
+
let a = Js(e, n)[t], o = Js(e, r)[t], s = Js(e, i)[t], c = [];
|
|
9620
9652
|
return a !== void 0 && c.push({
|
|
9621
9653
|
label: `RSI${n}`,
|
|
9622
9654
|
value: a,
|
|
@@ -9641,7 +9673,7 @@ function Ys(e, t, n = 6, r = 12, i = 24) {
|
|
|
9641
9673
|
}
|
|
9642
9674
|
//#endregion
|
|
9643
9675
|
//#region src/core/renderers/Indicator/cci.ts
|
|
9644
|
-
function
|
|
9676
|
+
function Zs(e, t) {
|
|
9645
9677
|
let n = Array(e.length);
|
|
9646
9678
|
if (e.length < t) return n;
|
|
9647
9679
|
let r = e.map((e) => (e.high + e.low + e.close) / 3);
|
|
@@ -9655,14 +9687,14 @@ function Xs(e, t) {
|
|
|
9655
9687
|
}
|
|
9656
9688
|
return n;
|
|
9657
9689
|
}
|
|
9658
|
-
function
|
|
9659
|
-
let { paneId: t = "sub", config: n = {} } = e, r =
|
|
9690
|
+
function Qs(e = {}) {
|
|
9691
|
+
let { paneId: t = "sub", config: n = {} } = e, r = Vs("cci", t), i = null, a = {
|
|
9660
9692
|
period: 14,
|
|
9661
9693
|
showCCI: !0,
|
|
9662
9694
|
...n
|
|
9663
9695
|
}, o = null, s = 0, c = [];
|
|
9664
9696
|
function l(e) {
|
|
9665
|
-
return (o !== e || s !== a.period) && (c =
|
|
9697
|
+
return (o !== e || s !== a.period) && (c = Zs(e, a.period), o = e, s = a.period), c;
|
|
9666
9698
|
}
|
|
9667
9699
|
return {
|
|
9668
9700
|
name: `cci_${t}`,
|
|
@@ -9724,12 +9756,12 @@ function Zs(e = {}) {
|
|
|
9724
9756
|
}
|
|
9725
9757
|
};
|
|
9726
9758
|
}
|
|
9727
|
-
function
|
|
9728
|
-
return
|
|
9759
|
+
function $s(e, t, n) {
|
|
9760
|
+
return Zs(e, n)[t];
|
|
9729
9761
|
}
|
|
9730
|
-
function
|
|
9762
|
+
function ec(e, t, n = 14) {
|
|
9731
9763
|
if (t < n || t >= e.length) return null;
|
|
9732
|
-
let r =
|
|
9764
|
+
let r = $s(e, t, n);
|
|
9733
9765
|
return r === void 0 ? null : {
|
|
9734
9766
|
name: "CCI",
|
|
9735
9767
|
params: [n],
|
|
@@ -9742,7 +9774,7 @@ function $s(e, t, n = 14) {
|
|
|
9742
9774
|
}
|
|
9743
9775
|
//#endregion
|
|
9744
9776
|
//#region src/core/renderers/Indicator/stoch.ts
|
|
9745
|
-
function
|
|
9777
|
+
function tc(e, t, n) {
|
|
9746
9778
|
let r = Array(e.length);
|
|
9747
9779
|
if (e.length < t) return r;
|
|
9748
9780
|
let i = Array(e.length);
|
|
@@ -9770,8 +9802,8 @@ function ec(e, t, n) {
|
|
|
9770
9802
|
}
|
|
9771
9803
|
return r;
|
|
9772
9804
|
}
|
|
9773
|
-
function
|
|
9774
|
-
let { paneId: t = "sub", config: n = {} } = e, r =
|
|
9805
|
+
function nc(e = {}) {
|
|
9806
|
+
let { paneId: t = "sub", config: n = {} } = e, r = Vs("stoch", t), i = null, a = {
|
|
9775
9807
|
n: 9,
|
|
9776
9808
|
m: 3,
|
|
9777
9809
|
showK: !0,
|
|
@@ -9779,7 +9811,7 @@ function tc(e = {}) {
|
|
|
9779
9811
|
...n
|
|
9780
9812
|
}, o = null, s = 0, c = 0, l = [];
|
|
9781
9813
|
function u(e) {
|
|
9782
|
-
return (o !== e || s !== a.n || c !== a.m) && (l =
|
|
9814
|
+
return (o !== e || s !== a.n || c !== a.m) && (l = tc(e, a.n, a.m), o = e, s = a.n, c = a.m), l;
|
|
9783
9815
|
}
|
|
9784
9816
|
return {
|
|
9785
9817
|
name: `stoch_${t}`,
|
|
@@ -9845,12 +9877,12 @@ function tc(e = {}) {
|
|
|
9845
9877
|
}
|
|
9846
9878
|
};
|
|
9847
9879
|
}
|
|
9848
|
-
function
|
|
9849
|
-
return
|
|
9880
|
+
function rc(e, t, n, r) {
|
|
9881
|
+
return tc(e, n, r)[t];
|
|
9850
9882
|
}
|
|
9851
|
-
function
|
|
9883
|
+
function ic(e, t, n = 9, r = 3) {
|
|
9852
9884
|
if (t < n + r - 1 || t >= e.length) return null;
|
|
9853
|
-
let i =
|
|
9885
|
+
let i = rc(e, t, n, r);
|
|
9854
9886
|
return i ? {
|
|
9855
9887
|
name: "STOCH",
|
|
9856
9888
|
params: [n, r],
|
|
@@ -9867,7 +9899,7 @@ function rc(e, t, n = 9, r = 3) {
|
|
|
9867
9899
|
}
|
|
9868
9900
|
//#endregion
|
|
9869
9901
|
//#region src/core/renderers/Indicator/mom.ts
|
|
9870
|
-
function
|
|
9902
|
+
function ac(e, t) {
|
|
9871
9903
|
let n = Array(e.length);
|
|
9872
9904
|
if (e.length < t + 1) return n;
|
|
9873
9905
|
for (let r = t; r < e.length; r++) {
|
|
@@ -9876,14 +9908,14 @@ function ic(e, t) {
|
|
|
9876
9908
|
}
|
|
9877
9909
|
return n;
|
|
9878
9910
|
}
|
|
9879
|
-
function
|
|
9880
|
-
let { paneId: t = "sub", config: n = {} } = e, r =
|
|
9911
|
+
function oc(e = {}) {
|
|
9912
|
+
let { paneId: t = "sub", config: n = {} } = e, r = Vs("mom", t), i = null, a = {
|
|
9881
9913
|
period: 10,
|
|
9882
9914
|
showMOM: !0,
|
|
9883
9915
|
...n
|
|
9884
9916
|
}, o = null, s = 0, c = [];
|
|
9885
9917
|
function l(e) {
|
|
9886
|
-
return (o !== e || s !== a.period) && (c =
|
|
9918
|
+
return (o !== e || s !== a.period) && (c = ac(e, a.period), o = e, s = a.period), c;
|
|
9887
9919
|
}
|
|
9888
9920
|
return {
|
|
9889
9921
|
name: `mom_${t}`,
|
|
@@ -9946,12 +9978,12 @@ function ac(e = {}) {
|
|
|
9946
9978
|
}
|
|
9947
9979
|
};
|
|
9948
9980
|
}
|
|
9949
|
-
function
|
|
9950
|
-
return
|
|
9981
|
+
function sc(e, t, n) {
|
|
9982
|
+
return ac(e, n)[t];
|
|
9951
9983
|
}
|
|
9952
|
-
function
|
|
9984
|
+
function cc(e, t, n = 10) {
|
|
9953
9985
|
if (t < n || t >= e.length) return null;
|
|
9954
|
-
let r =
|
|
9986
|
+
let r = sc(e, t, n);
|
|
9955
9987
|
return r === void 0 ? null : {
|
|
9956
9988
|
name: "MOM",
|
|
9957
9989
|
params: [n],
|
|
@@ -9964,7 +9996,7 @@ function sc(e, t, n = 10) {
|
|
|
9964
9996
|
}
|
|
9965
9997
|
//#endregion
|
|
9966
9998
|
//#region src/core/renderers/Indicator/wmsr.ts
|
|
9967
|
-
function
|
|
9999
|
+
function lc(e, t) {
|
|
9968
10000
|
let n = Array(e.length);
|
|
9969
10001
|
if (e.length < t) return n;
|
|
9970
10002
|
for (let r = t - 1; r < e.length; r++) {
|
|
@@ -9978,14 +10010,14 @@ function cc(e, t) {
|
|
|
9978
10010
|
}
|
|
9979
10011
|
return n;
|
|
9980
10012
|
}
|
|
9981
|
-
function
|
|
9982
|
-
let { paneId: t = "sub", config: n = {} } = e, r =
|
|
10013
|
+
function uc(e = {}) {
|
|
10014
|
+
let { paneId: t = "sub", config: n = {} } = e, r = Vs("wmsr", t), i = null, a = {
|
|
9983
10015
|
period: 14,
|
|
9984
10016
|
showWMSR: !0,
|
|
9985
10017
|
...n
|
|
9986
10018
|
}, o = null, s = 0, c = [];
|
|
9987
10019
|
function l(e) {
|
|
9988
|
-
return (o !== e || s !== a.period) && (c =
|
|
10020
|
+
return (o !== e || s !== a.period) && (c = lc(e, a.period), o = e, s = a.period), c;
|
|
9989
10021
|
}
|
|
9990
10022
|
return {
|
|
9991
10023
|
name: `wmsr_${t}`,
|
|
@@ -10040,12 +10072,12 @@ function lc(e = {}) {
|
|
|
10040
10072
|
}
|
|
10041
10073
|
};
|
|
10042
10074
|
}
|
|
10043
|
-
function
|
|
10044
|
-
return
|
|
10075
|
+
function dc(e, t, n) {
|
|
10076
|
+
return lc(e, n)[t];
|
|
10045
10077
|
}
|
|
10046
|
-
function
|
|
10078
|
+
function fc(e, t, n = 14) {
|
|
10047
10079
|
if (t < n || t >= e.length) return null;
|
|
10048
|
-
let r =
|
|
10080
|
+
let r = dc(e, t, n);
|
|
10049
10081
|
return r === void 0 ? null : {
|
|
10050
10082
|
name: "WMSR",
|
|
10051
10083
|
params: [n],
|
|
@@ -10058,7 +10090,7 @@ function dc(e, t, n = 14) {
|
|
|
10058
10090
|
}
|
|
10059
10091
|
//#endregion
|
|
10060
10092
|
//#region src/core/renderers/Indicator/kst.ts
|
|
10061
|
-
function
|
|
10093
|
+
function pc(e, t) {
|
|
10062
10094
|
let n = Array(e.length);
|
|
10063
10095
|
if (e.length < t + 1) return n;
|
|
10064
10096
|
for (let r = t; r < e.length; r++) {
|
|
@@ -10067,7 +10099,7 @@ function fc(e, t) {
|
|
|
10067
10099
|
}
|
|
10068
10100
|
return n;
|
|
10069
10101
|
}
|
|
10070
|
-
function
|
|
10102
|
+
function mc(e, t) {
|
|
10071
10103
|
let n = Array(e.length), r = 0, i = 0;
|
|
10072
10104
|
for (let a = 0; a < e.length; a++) {
|
|
10073
10105
|
let o = e[a];
|
|
@@ -10081,13 +10113,13 @@ function pc(e, t) {
|
|
|
10081
10113
|
}
|
|
10082
10114
|
return n;
|
|
10083
10115
|
}
|
|
10084
|
-
function
|
|
10085
|
-
let o = Array(e.length), s =
|
|
10116
|
+
function hc(e, t, n, r, i, a) {
|
|
10117
|
+
let o = Array(e.length), s = pc(e, t), c = pc(e, n), l = pc(e, r), u = pc(e, i), d = mc(s, 10), f = mc(c, 10), p = mc(l, 10), m = mc(u, 15), h = Array(e.length);
|
|
10086
10118
|
for (let t = 0; t < e.length; t++) {
|
|
10087
10119
|
let e = d[t], n = f[t], r = p[t], i = m[t];
|
|
10088
10120
|
e !== void 0 && n !== void 0 && r !== void 0 && i !== void 0 && (h[t] = e * 1 + n * 2 + r * 3 + i * 4);
|
|
10089
10121
|
}
|
|
10090
|
-
let g =
|
|
10122
|
+
let g = mc(h, a);
|
|
10091
10123
|
for (let t = 0; t < e.length; t++) {
|
|
10092
10124
|
let e = h[t], n = g[t];
|
|
10093
10125
|
e !== void 0 && n !== void 0 && (o[t] = {
|
|
@@ -10097,8 +10129,8 @@ function mc(e, t, n, r, i, a) {
|
|
|
10097
10129
|
}
|
|
10098
10130
|
return o;
|
|
10099
10131
|
}
|
|
10100
|
-
function
|
|
10101
|
-
let { paneId: t = "sub", config: n = {} } = e, r =
|
|
10132
|
+
function gc(e = {}) {
|
|
10133
|
+
let { paneId: t = "sub", config: n = {} } = e, r = Vs("kst", t), i = null, a = {
|
|
10102
10134
|
roc1: 10,
|
|
10103
10135
|
roc2: 15,
|
|
10104
10136
|
roc3: 20,
|
|
@@ -10110,7 +10142,7 @@ function hc(e = {}) {
|
|
|
10110
10142
|
}, o = null, s = "", c = [];
|
|
10111
10143
|
function l(e) {
|
|
10112
10144
|
let t = `${a.roc1}-${a.roc2}-${a.roc3}-${a.roc4}-${a.signalPeriod}`;
|
|
10113
|
-
return (o !== e || s !== t) && (c =
|
|
10145
|
+
return (o !== e || s !== t) && (c = hc(e, a.roc1, a.roc2, a.roc3, a.roc4, a.signalPeriod), o = e, s = t), c;
|
|
10114
10146
|
}
|
|
10115
10147
|
return {
|
|
10116
10148
|
name: `kst_${t}`,
|
|
@@ -10186,12 +10218,12 @@ function hc(e = {}) {
|
|
|
10186
10218
|
}
|
|
10187
10219
|
};
|
|
10188
10220
|
}
|
|
10189
|
-
function
|
|
10190
|
-
return
|
|
10221
|
+
function _c(e, t, n, r, i, a, o) {
|
|
10222
|
+
return hc(e, n, r, i, a, o)[t];
|
|
10191
10223
|
}
|
|
10192
|
-
function
|
|
10224
|
+
function vc(e, t, n = 10, r = 15, i = 20, a = 30, o = 9) {
|
|
10193
10225
|
if (t < a + 15 + o || t >= e.length) return null;
|
|
10194
|
-
let s =
|
|
10226
|
+
let s = _c(e, t, n, r, i, a, o);
|
|
10195
10227
|
return s ? {
|
|
10196
10228
|
name: "KST",
|
|
10197
10229
|
params: [
|
|
@@ -10214,7 +10246,7 @@ function _c(e, t, n = 10, r = 15, i = 20, a = 30, o = 9) {
|
|
|
10214
10246
|
}
|
|
10215
10247
|
//#endregion
|
|
10216
10248
|
//#region src/core/renderers/Indicator/fastk.ts
|
|
10217
|
-
function
|
|
10249
|
+
function yc(e, t) {
|
|
10218
10250
|
let n = Array(e.length);
|
|
10219
10251
|
if (e.length < t) return n;
|
|
10220
10252
|
for (let r = t - 1; r < e.length; r++) {
|
|
@@ -10228,14 +10260,14 @@ function vc(e, t) {
|
|
|
10228
10260
|
}
|
|
10229
10261
|
return n;
|
|
10230
10262
|
}
|
|
10231
|
-
function
|
|
10232
|
-
let { paneId: t = "sub", config: n = {} } = e, r =
|
|
10263
|
+
function bc(e = {}) {
|
|
10264
|
+
let { paneId: t = "sub", config: n = {} } = e, r = Vs("fastk", t), i = null, a = {
|
|
10233
10265
|
period: 9,
|
|
10234
10266
|
showFASTK: !0,
|
|
10235
10267
|
...n
|
|
10236
10268
|
}, o = null, s = 0, c = [];
|
|
10237
10269
|
function l(e) {
|
|
10238
|
-
return (o !== e || s !== a.period) && (c =
|
|
10270
|
+
return (o !== e || s !== a.period) && (c = yc(e, a.period), o = e, s = a.period), c;
|
|
10239
10271
|
}
|
|
10240
10272
|
return {
|
|
10241
10273
|
name: `fastk_${t}`,
|
|
@@ -10288,12 +10320,12 @@ function yc(e = {}) {
|
|
|
10288
10320
|
}
|
|
10289
10321
|
};
|
|
10290
10322
|
}
|
|
10291
|
-
function
|
|
10292
|
-
return
|
|
10323
|
+
function xc(e, t, n) {
|
|
10324
|
+
return yc(e, n)[t];
|
|
10293
10325
|
}
|
|
10294
|
-
function
|
|
10326
|
+
function Sc(e, t, n = 9) {
|
|
10295
10327
|
if (t < n || t >= e.length) return null;
|
|
10296
|
-
let r =
|
|
10328
|
+
let r = xc(e, t, n);
|
|
10297
10329
|
return r === void 0 ? null : {
|
|
10298
10330
|
name: "FASTK",
|
|
10299
10331
|
params: [n],
|
|
@@ -10306,24 +10338,24 @@ function xc(e, t, n = 9) {
|
|
|
10306
10338
|
}
|
|
10307
10339
|
//#endregion
|
|
10308
10340
|
//#region src/core/renderers/Indicator/index.ts
|
|
10309
|
-
function
|
|
10341
|
+
function Cc(e) {
|
|
10310
10342
|
let { indicatorId: t, paneId: n } = e;
|
|
10311
10343
|
switch (t) {
|
|
10312
|
-
case "VOLUME": return
|
|
10313
|
-
case "MACD": return
|
|
10314
|
-
case "RSI": return
|
|
10315
|
-
case "CCI": return
|
|
10316
|
-
case "STOCH": return
|
|
10317
|
-
case "MOM": return
|
|
10318
|
-
case "WMSR": return
|
|
10319
|
-
case "KST": return
|
|
10320
|
-
case "FASTK": return
|
|
10344
|
+
case "VOLUME": return xs({ paneId: n });
|
|
10345
|
+
case "MACD": return Gs({ paneId: n });
|
|
10346
|
+
case "RSI": return Ys({ paneId: n });
|
|
10347
|
+
case "CCI": return Qs({ paneId: n });
|
|
10348
|
+
case "STOCH": return nc({ paneId: n });
|
|
10349
|
+
case "MOM": return oc({ paneId: n });
|
|
10350
|
+
case "WMSR": return uc({ paneId: n });
|
|
10351
|
+
case "KST": return gc({ paneId: n });
|
|
10352
|
+
case "FASTK": return bc({ paneId: n });
|
|
10321
10353
|
default: throw Error(`Unknown indicator: ${t}`);
|
|
10322
10354
|
}
|
|
10323
10355
|
}
|
|
10324
10356
|
//#endregion
|
|
10325
10357
|
//#region src/core/chart.ts
|
|
10326
|
-
var
|
|
10358
|
+
var wc = class e {
|
|
10327
10359
|
dom;
|
|
10328
10360
|
opt;
|
|
10329
10361
|
data = [];
|
|
@@ -10342,8 +10374,9 @@ var Cc = class e {
|
|
|
10342
10374
|
};
|
|
10343
10375
|
paneRatios = /* @__PURE__ */ new Map();
|
|
10344
10376
|
onViewportChange;
|
|
10377
|
+
onPaneLayoutChange;
|
|
10345
10378
|
constructor(e, t) {
|
|
10346
|
-
this.dom = e, this.opt = t, this.interaction = new
|
|
10379
|
+
this.dom = e, this.opt = t, this.interaction = new ys(this), this.markerManager = new bo(), this.pluginHost = fa(), this.rendererPluginManager = new ma(), this.rendererPluginManager.setPluginHost(this.pluginHost), this.rendererPluginManager.setInvalidateCallback(() => this.scheduleDraw()), this.syncPaneRatiosFromSpecs(this.opt.panes), this.initPanes(), this.initResizeObserver();
|
|
10347
10380
|
}
|
|
10348
10381
|
initResizeObserver() {
|
|
10349
10382
|
if (typeof ResizeObserver > "u") return;
|
|
@@ -10417,10 +10450,11 @@ var Cc = class e {
|
|
|
10417
10450
|
this.interaction.setKLinePositions(i, r, a);
|
|
10418
10451
|
for (let t of this.paneRenderers) {
|
|
10419
10452
|
let n = t.getPane(), a = t.getDom().plotCanvas.getContext("2d"), o = t.getDom().yAxisCanvas.getContext("2d");
|
|
10420
|
-
n.updateRange(this.data, r), a && (a.setTransform(1, 0, 0, 1, 0, 0), a.scale(e.dpr, e.dpr), a.clearRect(0, 0, e.plotWidth + 1, n.height + 2 / e.dpr))
|
|
10421
|
-
|
|
10422
|
-
|
|
10423
|
-
|
|
10453
|
+
if (n.updateRange(this.data, r), a && (a.setTransform(1, 0, 0, 1, 0, 0), a.scale(e.dpr, e.dpr), a.clearRect(0, 0, e.plotWidth + 1, n.height + 2 / e.dpr)), o) {
|
|
10454
|
+
let t = o.canvas.width / e.dpr;
|
|
10455
|
+
o.setTransform(1, 0, 0, 1, 0, 0), o.scale(e.dpr, e.dpr), o.clearRect(0, 0, t, n.height + 2 / e.dpr);
|
|
10456
|
+
}
|
|
10457
|
+
let s = {
|
|
10424
10458
|
ctx: a,
|
|
10425
10459
|
pane: aa(n),
|
|
10426
10460
|
data: this.data,
|
|
@@ -10436,7 +10470,7 @@ var Cc = class e {
|
|
|
10436
10470
|
};
|
|
10437
10471
|
if (a) {
|
|
10438
10472
|
a.save();
|
|
10439
|
-
let e = this.rendererPluginManager.render(n.id,
|
|
10473
|
+
let e = this.rendererPluginManager.render(n.id, s);
|
|
10440
10474
|
e.length > 0 && this.pluginHost.events.emit("renderer:error", {
|
|
10441
10475
|
paneId: n.id,
|
|
10442
10476
|
errors: e
|
|
@@ -10449,6 +10483,13 @@ var Cc = class e {
|
|
|
10449
10483
|
ctx: o,
|
|
10450
10484
|
pane: {
|
|
10451
10485
|
id: "xAxis",
|
|
10486
|
+
role: "auxiliary",
|
|
10487
|
+
capabilities: {
|
|
10488
|
+
showPriceAxisTicks: !1,
|
|
10489
|
+
showCrosshairPriceLabel: !1,
|
|
10490
|
+
candleHitTest: !1,
|
|
10491
|
+
supportsPriceTranslate: !1
|
|
10492
|
+
},
|
|
10452
10493
|
top: 0,
|
|
10453
10494
|
height: this.opt.bottomAxisHeight,
|
|
10454
10495
|
yAxis: {
|
|
@@ -10511,6 +10552,9 @@ var Cc = class e {
|
|
|
10511
10552
|
setOnViewportChange(e) {
|
|
10512
10553
|
this.onViewportChange = e;
|
|
10513
10554
|
}
|
|
10555
|
+
setOnPaneLayoutChange(e) {
|
|
10556
|
+
this.onPaneLayoutChange = e;
|
|
10557
|
+
}
|
|
10514
10558
|
getPaneRenderers() {
|
|
10515
10559
|
return this.paneRenderers;
|
|
10516
10560
|
}
|
|
@@ -10537,24 +10581,77 @@ var Cc = class e {
|
|
|
10537
10581
|
return s;
|
|
10538
10582
|
}
|
|
10539
10583
|
updateOptions(e) {
|
|
10584
|
+
if (e.panes) {
|
|
10585
|
+
let t = e.panes.map((e) => ({ ...e }));
|
|
10586
|
+
this.opt = {
|
|
10587
|
+
...this.opt,
|
|
10588
|
+
...e,
|
|
10589
|
+
panes: t
|
|
10590
|
+
}, this.applyPaneLayoutSpecs(t);
|
|
10591
|
+
return;
|
|
10592
|
+
}
|
|
10540
10593
|
this.opt = {
|
|
10541
10594
|
...this.opt,
|
|
10542
10595
|
...e
|
|
10543
|
-
},
|
|
10596
|
+
}, this.resize();
|
|
10544
10597
|
}
|
|
10545
10598
|
updatePaneLayout(e) {
|
|
10546
|
-
this.
|
|
10599
|
+
this.applyPaneLayoutSpecs(e);
|
|
10600
|
+
}
|
|
10601
|
+
setPaneDefinitions(e) {
|
|
10602
|
+
this.applyPaneLayoutSpecs(e);
|
|
10603
|
+
}
|
|
10604
|
+
upsertPane(e) {
|
|
10605
|
+
let t = this.opt.panes.findIndex((t) => t.id === e.id);
|
|
10606
|
+
if (t === -1) {
|
|
10607
|
+
this.applyPaneLayoutSpecs([...this.opt.panes, { ...e }]);
|
|
10608
|
+
return;
|
|
10609
|
+
}
|
|
10610
|
+
let n = [...this.opt.panes];
|
|
10611
|
+
n[t] = {
|
|
10612
|
+
...n[t],
|
|
10613
|
+
...e
|
|
10614
|
+
}, this.applyPaneLayoutSpecs(n);
|
|
10615
|
+
}
|
|
10616
|
+
removePaneDefinition(e) {
|
|
10617
|
+
this.opt.panes.some((t) => t.id === e) && (this.paneRatios.delete(e), this.applyPaneLayoutSpecs(this.opt.panes.filter((t) => t.id !== e)));
|
|
10618
|
+
}
|
|
10619
|
+
bindIndicatorToPane(e, t, n) {
|
|
10620
|
+
this.opt.panes.some((t) => t.id === e) || this.upsertPane({
|
|
10621
|
+
id: e,
|
|
10622
|
+
ratio: 1,
|
|
10623
|
+
visible: !0,
|
|
10624
|
+
role: "indicator"
|
|
10625
|
+
});
|
|
10626
|
+
let r = `${t.toLowerCase()}_${e}`;
|
|
10627
|
+
if (this.getRenderer(r)) {
|
|
10628
|
+
n && this.updateRendererConfig(r, n);
|
|
10629
|
+
return;
|
|
10630
|
+
}
|
|
10631
|
+
let i = Cc({
|
|
10632
|
+
indicatorId: t,
|
|
10633
|
+
paneId: e
|
|
10634
|
+
});
|
|
10635
|
+
this.useRenderer(i, n);
|
|
10547
10636
|
}
|
|
10548
10637
|
getPaneLayoutSpecs() {
|
|
10549
10638
|
let e = this.opt.panes.filter((e) => e.visible !== !1).reduce((e, t) => e + (this.paneRatios.get(t.id) ?? t.ratio ?? 0), 0), t = e > 0 ? e : 1;
|
|
10550
10639
|
return this.opt.panes.map((e) => {
|
|
10551
|
-
let n = this.paneRatios.get(e.id) ?? e.ratio ?? 0, r = e.visible === !1 ? n : n / t;
|
|
10640
|
+
let n = this.paneRatios.get(e.id) ?? e.ratio ?? 0, r = e.visible === !1 ? n : n / t, i = this.paneRenderers.find((t) => t.getPane().id === e.id)?.getPane();
|
|
10552
10641
|
return {
|
|
10553
10642
|
...e,
|
|
10554
|
-
ratio: r
|
|
10643
|
+
ratio: r,
|
|
10644
|
+
role: i?.role ?? e.role,
|
|
10645
|
+
capabilities: i ? { ...i.capabilities } : e.capabilities
|
|
10555
10646
|
};
|
|
10556
10647
|
});
|
|
10557
10648
|
}
|
|
10649
|
+
emitPaneLayoutChange() {
|
|
10650
|
+
this.onPaneLayoutChange?.(this.getPaneLayoutSpecs());
|
|
10651
|
+
}
|
|
10652
|
+
applyPaneLayoutSpecs(e) {
|
|
10653
|
+
this.opt.panes = e.map((e) => ({ ...e })), this.syncPaneRatiosFromSpecs(this.opt.panes), this.initPanes(), this.layoutPanes(), this.emitPaneLayoutChange(), this.scheduleDraw();
|
|
10654
|
+
}
|
|
10558
10655
|
resizePaneBoundary(e, t) {
|
|
10559
10656
|
if (!Number.isFinite(t) || t === 0) return !1;
|
|
10560
10657
|
let n = this.viewport;
|
|
@@ -10563,81 +10660,101 @@ var Cc = class e {
|
|
|
10563
10660
|
if (i < 0 || i >= r.length - 1) return !1;
|
|
10564
10661
|
let a = r[i], o = r[i + 1];
|
|
10565
10662
|
if (!a || !o) return !1;
|
|
10566
|
-
let s =
|
|
10567
|
-
|
|
10568
|
-
|
|
10569
|
-
|
|
10570
|
-
|
|
10571
|
-
|
|
10572
|
-
|
|
10573
|
-
|
|
10574
|
-
|
|
10575
|
-
|
|
10663
|
+
let s = /* @__PURE__ */ new Map();
|
|
10664
|
+
for (let e of r) {
|
|
10665
|
+
let t = this.paneRenderers.find((t) => t.getPane().id === e.id);
|
|
10666
|
+
t && s.set(e.id, t.getPane().height);
|
|
10667
|
+
}
|
|
10668
|
+
let c = t > 0 ? i : i + 1, l = t > 0 ? i + 1 : i, u = t > 0 ? 1 : -1, d = Math.abs(t), f = l;
|
|
10669
|
+
for (; d > 0 && f >= 0 && f < r.length;) {
|
|
10670
|
+
let e = r[f];
|
|
10671
|
+
if (!e) break;
|
|
10672
|
+
let t = s.get(e.id) ?? 0, i = this.getPaneMinHeight(e, n.plotHeight), a = Math.max(0, t - i);
|
|
10673
|
+
if (a > 0) {
|
|
10674
|
+
let n = Math.min(a, d);
|
|
10675
|
+
s.set(e.id, t - n), d -= n;
|
|
10676
|
+
}
|
|
10677
|
+
d > 0 && (f += u);
|
|
10678
|
+
}
|
|
10679
|
+
if (d > 0) return !1;
|
|
10680
|
+
let p = r[c];
|
|
10681
|
+
if (!p) return !1;
|
|
10682
|
+
let m = s.get(p.id) ?? 0;
|
|
10683
|
+
s.set(p.id, m + Math.abs(t));
|
|
10684
|
+
let h = Math.max(0, this.opt.paneGap ?? 0) * Math.max(0, r.length - 1), g = Math.max(1, n.plotHeight - h);
|
|
10685
|
+
for (let e of r) {
|
|
10686
|
+
let t = s.get(e.id) ?? 0;
|
|
10687
|
+
this.paneRatios.set(e.id, t / g);
|
|
10688
|
+
}
|
|
10689
|
+
return this.normalizeVisiblePaneRatios(r), this.syncPaneRatiosToSpecs(), this.layoutPanes(), this.emitPaneLayoutChange(), this.scheduleDraw(), !0;
|
|
10690
|
+
}
|
|
10691
|
+
resolvePaneRole(e, t) {
|
|
10692
|
+
return e.role ? e.role : t === 0 ? "price" : "indicator";
|
|
10576
10693
|
}
|
|
10577
10694
|
addPane(e) {
|
|
10578
|
-
if (this.
|
|
10695
|
+
if (this.opt.panes.some((t) => t.id === e)) {
|
|
10579
10696
|
console.warn(`Pane "${e}" already exists`);
|
|
10580
10697
|
return;
|
|
10581
10698
|
}
|
|
10582
|
-
let t =
|
|
10583
|
-
|
|
10584
|
-
|
|
10585
|
-
|
|
10586
|
-
|
|
10587
|
-
|
|
10588
|
-
|
|
10589
|
-
yPaddingPx: 0,
|
|
10590
|
-
priceLabelWidth: this.opt.priceLabelWidth
|
|
10591
|
-
});
|
|
10592
|
-
this.paneRenderers.push(a);
|
|
10593
|
-
let o = this.dom.canvasLayer;
|
|
10594
|
-
o && (o.appendChild(n), o.appendChild(r)), this.rendererPluginManager.addKnownPaneId(e);
|
|
10699
|
+
let t = this.opt.panes.some((e, t) => this.resolvePaneRole(e, t) === "price") ? "indicator" : "price";
|
|
10700
|
+
this.applyPaneLayoutSpecs([...this.opt.panes, {
|
|
10701
|
+
id: e,
|
|
10702
|
+
ratio: 1,
|
|
10703
|
+
visible: !0,
|
|
10704
|
+
role: t
|
|
10705
|
+
}]);
|
|
10595
10706
|
}
|
|
10596
10707
|
removePane(e) {
|
|
10597
|
-
|
|
10598
|
-
|
|
10599
|
-
|
|
10600
|
-
if (!n) return;
|
|
10601
|
-
let r = n.getDom();
|
|
10602
|
-
r.plotCanvas.remove(), r.yAxisCanvas.remove(), this.paneRenderers.splice(t, 1), this.rendererPluginManager.removeKnownPaneId(e);
|
|
10708
|
+
if (!this.opt.panes.some((t) => t.id === e)) return;
|
|
10709
|
+
let t = this.opt.panes.filter((t) => t.id !== e);
|
|
10710
|
+
this.paneRatios.delete(e), this.applyPaneLayoutSpecs(t);
|
|
10603
10711
|
}
|
|
10604
10712
|
hasPane(e) {
|
|
10605
|
-
return this.
|
|
10713
|
+
return this.opt.panes.some((t) => t.id === e);
|
|
10606
10714
|
}
|
|
10607
10715
|
static SUB_PANE_PREFIX = "sub_";
|
|
10608
10716
|
createSubPane(t, n) {
|
|
10609
|
-
let r = `${e.SUB_PANE_PREFIX}${t}`;
|
|
10610
|
-
if (this.
|
|
10611
|
-
|
|
10612
|
-
|
|
10613
|
-
|
|
10614
|
-
|
|
10615
|
-
|
|
10616
|
-
|
|
10617
|
-
|
|
10618
|
-
|
|
10619
|
-
|
|
10717
|
+
let r = `${e.SUB_PANE_PREFIX}${t}`, i = `${t.toLowerCase()}_${r}`;
|
|
10718
|
+
if (this.getRenderer(i)) return n && this.updateRendererConfig(i, n), !0;
|
|
10719
|
+
let a = this.opt.panes.filter((e) => e.visible !== !1), o = a.filter((e, t) => this.resolvePaneRole(e, t) === "price"), s = a.filter((e, t) => this.resolvePaneRole(e, t) === "indicator");
|
|
10720
|
+
if (o.length === 1) {
|
|
10721
|
+
let e = o[0];
|
|
10722
|
+
e && this.paneRatios.set(e.id, 3);
|
|
10723
|
+
for (let e of s) this.paneRatios.set(e.id, 1);
|
|
10724
|
+
this.paneRatios.set(r, 1);
|
|
10725
|
+
} else this.paneRatios.set(r, 1);
|
|
10726
|
+
return this.upsertPane({
|
|
10727
|
+
id: r,
|
|
10728
|
+
ratio: this.paneRatios.get(r) ?? 1,
|
|
10729
|
+
visible: !0,
|
|
10730
|
+
role: "indicator"
|
|
10731
|
+
}), this.bindIndicatorToPane(r, t, n), !0;
|
|
10620
10732
|
}
|
|
10621
10733
|
removeSubPane(t) {
|
|
10622
10734
|
let n = `${e.SUB_PANE_PREFIX}${t}`;
|
|
10623
10735
|
if (!this.hasPane(n)) return;
|
|
10624
10736
|
let r = `${t.toLowerCase()}_${n}`;
|
|
10625
|
-
this.removeRenderer(r), this.
|
|
10737
|
+
this.removeRenderer(r), this.paneRatios.delete(n), this.applyPaneLayoutSpecs(this.opt.panes.filter((e) => e.id !== n));
|
|
10626
10738
|
}
|
|
10627
10739
|
clearSubPanes() {
|
|
10628
|
-
let t = this.
|
|
10629
|
-
|
|
10630
|
-
let
|
|
10631
|
-
|
|
10740
|
+
let t = this.opt.panes.map((e) => e.id).filter((t) => t.startsWith(e.SUB_PANE_PREFIX));
|
|
10741
|
+
if (t.length !== 0) {
|
|
10742
|
+
for (let n of t) {
|
|
10743
|
+
let t = `${n.slice(e.SUB_PANE_PREFIX.length).toLowerCase()}_${n}`;
|
|
10744
|
+
this.removeRenderer(t), this.paneRatios.delete(n);
|
|
10745
|
+
}
|
|
10746
|
+
this.applyPaneLayoutSpecs(this.opt.panes.filter((t) => !t.id.startsWith(e.SUB_PANE_PREFIX)));
|
|
10632
10747
|
}
|
|
10633
10748
|
}
|
|
10634
10749
|
getSubPaneIndicators() {
|
|
10635
|
-
return this.
|
|
10750
|
+
return this.opt.panes.map((e) => e.id).filter((t) => t.startsWith(e.SUB_PANE_PREFIX)).map((t) => t.slice(e.SUB_PANE_PREFIX.length));
|
|
10636
10751
|
}
|
|
10637
10752
|
translatePrice(e, t) {
|
|
10638
10753
|
let n = this.paneRenderers.find((t) => t.getPane().id === e);
|
|
10639
10754
|
if (!n) return;
|
|
10640
|
-
let r = n.getPane()
|
|
10755
|
+
let r = n.getPane();
|
|
10756
|
+
if (!r.capabilities.supportsPriceTranslate) return;
|
|
10757
|
+
let i = r.yAxis.deltaYToPriceOffset(t), a = r.yAxis.getPriceOffset();
|
|
10641
10758
|
r.yAxis.setPriceOffset(a + i), this.scheduleDraw();
|
|
10642
10759
|
}
|
|
10643
10760
|
updateData(e) {
|
|
@@ -10658,7 +10775,7 @@ var Cc = class e {
|
|
|
10658
10775
|
}
|
|
10659
10776
|
resize() {
|
|
10660
10777
|
let e = this.computeViewport();
|
|
10661
|
-
!e || e.viewWidth < 10 || e.viewHeight < 10 || (this.layoutPanes(), this.scheduleDraw());
|
|
10778
|
+
!e || e.viewWidth < 10 || e.viewHeight < 10 || (this.layoutPanes(), this.emitPaneLayoutChange(), this.scheduleDraw());
|
|
10662
10779
|
}
|
|
10663
10780
|
scheduleDraw() {
|
|
10664
10781
|
this.raf != null && cancelAnimationFrame(this.raf), this.raf = requestAnimationFrame(() => {
|
|
@@ -10669,15 +10786,18 @@ var Cc = class e {
|
|
|
10669
10786
|
this.raf != null && cancelAnimationFrame(this.raf), this.raf = null, this.resizeObserver?.disconnect(), this.resizeObserver = void 0, this.preciseDpr = 0, this.observedSize = {
|
|
10670
10787
|
width: 0,
|
|
10671
10788
|
height: 0
|
|
10672
|
-
}, this.viewport = null, this.paneRenderers.forEach((e) => e.destroy()), this.paneRenderers = [], this.rendererPluginManager.clear(), this.onZoomChange = void 0, this.onViewportChange = void 0, await this.pluginHost.destroy();
|
|
10789
|
+
}, this.viewport = null, this.paneRenderers.forEach((e) => e.destroy()), this.paneRenderers = [], this.rendererPluginManager.clear(), this.onZoomChange = void 0, this.onViewportChange = void 0, this.onPaneLayoutChange = void 0, await this.pluginHost.destroy();
|
|
10673
10790
|
}
|
|
10674
10791
|
initPanes() {
|
|
10675
|
-
this.paneRenderers = this.opt.panes.map((e) => {
|
|
10676
|
-
let
|
|
10677
|
-
|
|
10678
|
-
|
|
10679
|
-
|
|
10680
|
-
},
|
|
10792
|
+
this.paneRenderers = this.opt.panes.map((e, t) => {
|
|
10793
|
+
let n = new vs(e.id, {
|
|
10794
|
+
role: this.resolvePaneRole(e, t),
|
|
10795
|
+
capabilities: e.capabilities
|
|
10796
|
+
}), r = document.createElement("canvas"), i = document.createElement("canvas"), a = n.role === "price";
|
|
10797
|
+
return r.id = `${e.id}-plot`, r.className = a ? "plot-canvas main" : "plot-canvas sub", r.style.position = "absolute", r.style.left = "0", r.style.top = "0", i.id = `${e.id}-yAxis`, i.className = "right-axis", i.style.position = "absolute", i.style.left = "0", new bs({
|
|
10798
|
+
plotCanvas: r,
|
|
10799
|
+
yAxisCanvas: i
|
|
10800
|
+
}, n, {
|
|
10681
10801
|
rightAxisWidth: this.opt.rightAxisWidth,
|
|
10682
10802
|
yPaddingPx: this.opt.yPaddingPx,
|
|
10683
10803
|
priceLabelWidth: this.opt.priceLabelWidth
|
|
@@ -10687,7 +10807,7 @@ var Cc = class e {
|
|
|
10687
10807
|
e && (e.querySelectorAll("canvas:not(.x-axis-canvas)").forEach((e) => e.remove()), this.paneRenderers.forEach((t) => {
|
|
10688
10808
|
let n = t.getDom();
|
|
10689
10809
|
e.appendChild(n.plotCanvas), e.appendChild(n.yAxisCanvas);
|
|
10690
|
-
}));
|
|
10810
|
+
})), this.rendererPluginManager.setKnownPaneIds(this.paneRenderers.map((e) => e.getPane().id));
|
|
10691
10811
|
}
|
|
10692
10812
|
syncPaneRatiosFromSpecs(e) {
|
|
10693
10813
|
let t = /* @__PURE__ */ new Map();
|
|
@@ -10729,7 +10849,7 @@ var Cc = class e {
|
|
|
10729
10849
|
}
|
|
10730
10850
|
}
|
|
10731
10851
|
getPaneMinHeight(e, t) {
|
|
10732
|
-
let n = this.opt.defaultPaneMinHeightPx ??
|
|
10852
|
+
let n = this.opt.defaultPaneMinHeightPx ?? 120, r = e.minHeightPx ?? n;
|
|
10733
10853
|
return Math.max(1, Math.min(Math.round(r), Math.max(1, t)));
|
|
10734
10854
|
}
|
|
10735
10855
|
computePaneHeightsByRatio(e, t) {
|
|
@@ -10764,9 +10884,9 @@ var Cc = class e {
|
|
|
10764
10884
|
let s = this.paneRenderers.find((e) => e.getPane().id === a.id);
|
|
10765
10885
|
if (!s) continue;
|
|
10766
10886
|
let c = s.getPane(), l = o[i] ?? 1;
|
|
10767
|
-
c.setLayout(r, l), c.
|
|
10887
|
+
c.setLayout(r, l), c.setPadding(this.opt.yPaddingPx, this.opt.yPaddingPx), s.resize(e.plotWidth, l, e.dpr), this.rendererPluginManager.notifyResize(c.id, aa(c));
|
|
10768
10888
|
let u = s.getDom();
|
|
10769
|
-
u.plotCanvas.style.top = `${r}px`, u.yAxisCanvas.style.top = `${r}px`, r += l + n;
|
|
10889
|
+
u.plotCanvas.style.top = `${r}px`, u.yAxisCanvas.style.top = `${r}px`, u.yAxisCanvas.style.left = `${e.plotWidth}px`, r += l + n;
|
|
10770
10890
|
}
|
|
10771
10891
|
let s = Math.max(1, a);
|
|
10772
10892
|
for (let e of t) {
|
|
@@ -10797,18 +10917,18 @@ var Cc = class e {
|
|
|
10797
10917
|
};
|
|
10798
10918
|
//#endregion
|
|
10799
10919
|
//#region src/types/kLine.ts
|
|
10800
|
-
function
|
|
10920
|
+
function Tc(e) {
|
|
10801
10921
|
return e.open > e.close ? "down" : e.open < e.close ? "up" : "flat";
|
|
10802
10922
|
}
|
|
10803
10923
|
//#endregion
|
|
10804
10924
|
//#region src/types/volumePrice.ts
|
|
10805
10925
|
var $ = /* @__PURE__ */ function(e) {
|
|
10806
10926
|
return e.RISE_WITH_VOLUME = "rise_with_volume", e.RISE_WITHOUT_VOLUME = "rise_without_volume", e.FALL_WITH_VOLUME = "fall_with_volume", e.FALL_WITHOUT_VOLUME = "fall_without_volume", e.OTHERS = "others", e;
|
|
10807
|
-
}({}),
|
|
10927
|
+
}({}), Ec = {
|
|
10808
10928
|
volumeAmplifyThreshold: 1.5,
|
|
10809
10929
|
volumeShrinkThreshold: .8,
|
|
10810
10930
|
avgPeriod: 20
|
|
10811
|
-
},
|
|
10931
|
+
}, Dc = class {
|
|
10812
10932
|
prefixSum = [];
|
|
10813
10933
|
dataLength = 0;
|
|
10814
10934
|
build(e) {
|
|
@@ -10833,8 +10953,8 @@ var $ = /* @__PURE__ */ function(e) {
|
|
|
10833
10953
|
return this.dataLength;
|
|
10834
10954
|
}
|
|
10835
10955
|
};
|
|
10836
|
-
function
|
|
10837
|
-
let i = new
|
|
10956
|
+
function Oc(e, t, n, r = Ec) {
|
|
10957
|
+
let i = new Dc();
|
|
10838
10958
|
i.build(e);
|
|
10839
10959
|
let a = [], { volumeAmplifyThreshold: o, volumeShrinkThreshold: s, avgPeriod: c } = r;
|
|
10840
10960
|
for (let r = t; r < n && r < e.length; r++) {
|
|
@@ -10855,7 +10975,7 @@ function Dc(e, t, n, r = Tc) {
|
|
|
10855
10975
|
}
|
|
10856
10976
|
//#endregion
|
|
10857
10977
|
//#region src/core/renderers/candle.ts
|
|
10858
|
-
function
|
|
10978
|
+
function kc() {
|
|
10859
10979
|
return {
|
|
10860
10980
|
name: "candle",
|
|
10861
10981
|
version: "1.0.0",
|
|
@@ -10868,34 +10988,34 @@ function Oc() {
|
|
|
10868
10988
|
if (!d.length) return;
|
|
10869
10989
|
let { kWidthPx: f } = ps(o, s, c);
|
|
10870
10990
|
t.save(), t.translate(-a, 0);
|
|
10871
|
-
let p = l || [], m =
|
|
10991
|
+
let p = l || [], m = Oc(d, i.start, i.end, Ec);
|
|
10872
10992
|
for (let e = i.start; e < i.end && e < d.length; e++) {
|
|
10873
10993
|
let r = d[e];
|
|
10874
10994
|
if (!r) continue;
|
|
10875
10995
|
let a = n.yAxis.priceToY(r.open), s = n.yAxis.priceToY(r.close), l = n.yAxis.priceToY(r.high), h = n.yAxis.priceToY(r.low), g = p[e - i.start];
|
|
10876
10996
|
if (!g) continue;
|
|
10877
|
-
let _ = (e) => Math.round(e * c) / c, v = _(a), y = _(s), b = _(l), x = _(h), S = Math.min(v, y), C = Math.max(Math.abs(v - y), 1), w =
|
|
10878
|
-
t.fillStyle =
|
|
10997
|
+
let _ = (e) => Math.round(e * c) / c, v = _(a), y = _(s), b = _(l), x = _(h), S = Math.min(v, y), C = Math.max(Math.abs(v - y), 1), w = Ds(Math.round(g * c), S, f, C, c);
|
|
10998
|
+
t.fillStyle = Tc(r) === "up" ? ka.UP : ka.DOWN, t.fillRect(w.bodyRect.x, w.bodyRect.y, w.bodyRect.width, w.bodyRect.height);
|
|
10879
10999
|
let T = w.wickRect.width, E = w.wickRect.x, D = w.bodyRect.y, O = w.bodyRect.y + w.bodyRect.height, k = Math.max(r.open, r.close), A = Math.min(r.open, r.close);
|
|
10880
11000
|
if (r.high > k) {
|
|
10881
|
-
let e =
|
|
11001
|
+
let e = Ts(E, b, D, c);
|
|
10882
11002
|
e && t.fillRect(e.x, e.y, T, e.height);
|
|
10883
11003
|
}
|
|
10884
11004
|
if (r.low < A) {
|
|
10885
|
-
let e =
|
|
11005
|
+
let e = Ts(E, O, x, c);
|
|
10886
11006
|
e && t.fillRect(e.x, e.y, T, e.height);
|
|
10887
11007
|
}
|
|
10888
11008
|
let j = m[e - i.start];
|
|
10889
11009
|
if (j !== $.OTHERS && u) {
|
|
10890
11010
|
let n = j === $.RISE_WITH_VOLUME || j === $.RISE_WITHOUT_VOLUME ? b - 15 : x + 15;
|
|
10891
|
-
|
|
11011
|
+
Ac(t, w.bodyRect.x + w.bodyRect.width / 2, n, j, e, o, 4, u, c);
|
|
10892
11012
|
}
|
|
10893
11013
|
}
|
|
10894
11014
|
t.restore();
|
|
10895
11015
|
}
|
|
10896
11016
|
};
|
|
10897
11017
|
}
|
|
10898
|
-
function
|
|
11018
|
+
function Ac(e, t, n, r, i, a, o = 4, s, c) {
|
|
10899
11019
|
let l = (e) => Math.round(e * c) / c;
|
|
10900
11020
|
t = l(t), n = l(n);
|
|
10901
11021
|
let u = Math.min(a, 20), d = u * Math.sqrt(3) / 2, f, p;
|
|
@@ -10961,12 +11081,12 @@ function kc(e, t, n, r, i, a, o = 4, s, c) {
|
|
|
10961
11081
|
}
|
|
10962
11082
|
//#endregion
|
|
10963
11083
|
//#region src/core/utils/tickCount.ts
|
|
10964
|
-
function
|
|
11084
|
+
function jc(e, t) {
|
|
10965
11085
|
return Math.max(3, Math.round(e / 60) + 1);
|
|
10966
11086
|
}
|
|
10967
11087
|
//#endregion
|
|
10968
11088
|
//#region src/core/renderers/gridLines.ts
|
|
10969
|
-
function
|
|
11089
|
+
function Mc() {
|
|
10970
11090
|
return {
|
|
10971
11091
|
name: "gridLines",
|
|
10972
11092
|
version: "1.0.0",
|
|
@@ -10977,11 +11097,11 @@ function jc() {
|
|
|
10977
11097
|
draw(e) {
|
|
10978
11098
|
let { ctx: t, pane: n, data: r, range: i, scrollLeft: a, kWidth: o, dpr: s, kLinePositions: c } = e, l = r;
|
|
10979
11099
|
if (!l.length) return;
|
|
10980
|
-
let u =
|
|
11100
|
+
let u = jc(n.height);
|
|
10981
11101
|
t.save(), t.fillStyle = Ma.HORIZONTAL, t.translate(-a, 0);
|
|
10982
11102
|
let d = t.canvas.width / s, f = a, p = a + d, m = n.yAxis.getPaddingTop(), h = n.yAxis.getPaddingBottom(), g = m, _ = Math.max(m, n.height - h), v = Math.max(0, _ - g);
|
|
10983
11103
|
for (let e = 0; e < u; e++) {
|
|
10984
|
-
let n = u <= 1 ? 0 : e / (u - 1), r =
|
|
11104
|
+
let n = u <= 1 ? 0 : e / (u - 1), r = Es(f, p, Math.round(g + n * v), s);
|
|
10985
11105
|
r && t.fillRect(r.x, r.y, r.width, r.height);
|
|
10986
11106
|
}
|
|
10987
11107
|
let y = Da(l);
|
|
@@ -10989,7 +11109,7 @@ function jc() {
|
|
|
10989
11109
|
if (e < i.start || e >= i.end || e >= l.length) continue;
|
|
10990
11110
|
let r = e - i.start;
|
|
10991
11111
|
if (r < 0 || r >= c.length) continue;
|
|
10992
|
-
let a =
|
|
11112
|
+
let a = Ts(c[r] + o / 2, 0, n.height, s);
|
|
10993
11113
|
a && t.fillRect(a.x, a.y, a.width, a.height);
|
|
10994
11114
|
}
|
|
10995
11115
|
t.restore();
|
|
@@ -10998,7 +11118,7 @@ function jc() {
|
|
|
10998
11118
|
}
|
|
10999
11119
|
//#endregion
|
|
11000
11120
|
//#region src/core/renderers/lastPrice.ts
|
|
11001
|
-
function
|
|
11121
|
+
function Nc() {
|
|
11002
11122
|
return {
|
|
11003
11123
|
name: "lastPriceLine",
|
|
11004
11124
|
version: "1.0.0",
|
|
@@ -11019,17 +11139,17 @@ function Mc() {
|
|
|
11019
11139
|
}
|
|
11020
11140
|
//#endregion
|
|
11021
11141
|
//#region src/core/renderers/extremaMarkers.ts
|
|
11022
|
-
function
|
|
11142
|
+
function Pc() {
|
|
11023
11143
|
return {
|
|
11024
11144
|
name: "extremaMarkers",
|
|
11025
11145
|
version: "1.0.0",
|
|
11026
11146
|
description: "可视区最高/最低价标注渲染器",
|
|
11027
11147
|
debugName: "极值标记",
|
|
11028
|
-
paneId:
|
|
11148
|
+
paneId: oa,
|
|
11029
11149
|
priority: X.OVERLAY,
|
|
11030
11150
|
draw(e) {
|
|
11031
11151
|
let { ctx: t, pane: n, data: r, range: i, scrollLeft: a, kWidth: o, dpr: s, paneWidth: c, kLinePositions: l } = e, u = r;
|
|
11032
|
-
if (!u.length || n.
|
|
11152
|
+
if (!u.length || n.role !== "price") return;
|
|
11033
11153
|
let d = Math.max(0, i.start), f = Math.min(u.length, i.end);
|
|
11034
11154
|
if (f - d <= 0) return;
|
|
11035
11155
|
let p = -Infinity, m = Infinity, h = d, g = d;
|
|
@@ -11042,45 +11162,45 @@ function Nc() {
|
|
|
11042
11162
|
let t = e - i.start;
|
|
11043
11163
|
return t < 0 || t >= l.length ? 0 : l[t] + o / 2;
|
|
11044
11164
|
};
|
|
11045
|
-
t.save(), t.translate(-a, 0),
|
|
11165
|
+
t.save(), t.translate(-a, 0), Fc(t, _(h), n.yAxis.priceToY(p), p, s, c, a), Fc(t, _(g), n.yAxis.priceToY(m), m, s, c, a), t.restore();
|
|
11046
11166
|
}
|
|
11047
11167
|
};
|
|
11048
11168
|
}
|
|
11049
|
-
function
|
|
11169
|
+
function Fc(e, t, n, r, i, a, o) {
|
|
11050
11170
|
let s = r.toFixed(2);
|
|
11051
11171
|
e.font = "12px Arial";
|
|
11052
11172
|
let c = e.measureText(s).width, l = t - o + 30 + 4 + c > a, u = t, d = l ? t - 30 : t + 30;
|
|
11053
11173
|
u > d && ([u, d] = [d, u]);
|
|
11054
|
-
let f =
|
|
11174
|
+
let f = Es(u, d, n, i);
|
|
11055
11175
|
f && (e.fillStyle = Oa.WEAK, e.fillRect(f.x, f.y, f.width, f.height));
|
|
11056
11176
|
let p = Z(d, i), m = Z(n, i);
|
|
11057
11177
|
e.fillStyle = Oa.WEAK, e.beginPath(), e.arc(p, m, 2, 0, Math.PI * 2), e.fill(), e.font = "12px Arial", e.textBaseline = "middle", e.fillStyle = ka.NEUTRAL, l ? (e.textAlign = "right", e.fillText(s, Z(t - 30 - 4, i), Z(n, i))) : (e.textAlign = "left", e.fillText(s, Z(t + 30 + 4, i), Z(n, i)));
|
|
11058
11178
|
}
|
|
11059
11179
|
//#endregion
|
|
11060
11180
|
//#region src/utils/priceToY.ts
|
|
11061
|
-
function
|
|
11181
|
+
function Ic(e, t, n, r, i, a) {
|
|
11062
11182
|
let o = t - n || 1, s = Math.max(1, r - i - a);
|
|
11063
11183
|
return n + (1 - (Math.min(Math.max(e, i), i + s) - i) / s) * o;
|
|
11064
11184
|
}
|
|
11065
11185
|
//#endregion
|
|
11066
11186
|
//#region src/utils/kLineDraw/axis.ts
|
|
11067
|
-
function
|
|
11187
|
+
function Lc(e, t) {
|
|
11068
11188
|
let { x: n, y: r, width: i, height: a, crosshairX: o, timestamp: s, dpr: c, fontSize: l = 16, paddingX: u = 8 } = t, d = Ea(s);
|
|
11069
11189
|
e.save(), e.font = `${l}px -apple-system,BlinkMacSystemFont,Trebuchet MS,Roboto,Ubuntu,sans-serif`, e.textBaseline = "middle", e.textAlign = "center";
|
|
11070
11190
|
let f = Math.round(e.measureText(d).width), p = Math.min(i, f + u * 2), m = a, h = Math.min(Math.max(o, n + p / 2), n + i - p / 2), g = r + a / 2, _ = h - p / 2, v = r;
|
|
11071
11191
|
e.fillStyle = "rgba(0, 0, 0, 0.8)", e.fillRect(Z(_, c), Z(v, c), Z(p, c), Z(m, c)), e.fillStyle = "#ffffff", e.fillText(d, Z(h, c), Z(g, c)), e.restore();
|
|
11072
11192
|
}
|
|
11073
|
-
function
|
|
11074
|
-
let { x: n, y: r, width: i, height: a, crosshairY: o, priceRange: s, yPaddingPx: c = 0, dpr: l, fontSize: u = 16 } = t,
|
|
11193
|
+
function Rc(e, t) {
|
|
11194
|
+
let { x: n, y: r, width: i, height: a, crosshairY: o, priceRange: s, yPaddingPx: c = 0, dpr: l, fontSize: u = 16, priceOffset: d = 0, price: f } = t, p = Math.max(0, Math.min(c, Math.floor(a / 2) - 1)), { maxPrice: m, minPrice: h } = s, g = (f ?? Ic(o - r, m, h, a, p, p) + d).toFixed(2);
|
|
11075
11195
|
e.save(), e.font = `${u}px -apple-system,BlinkMacSystemFont,Trebuchet MS,Roboto,Ubuntu,sans-serif`, e.textBaseline = "middle", e.textAlign = "center";
|
|
11076
|
-
let
|
|
11196
|
+
let _ = u + 4, v = Math.min(Math.max(o, r + _ / 2), r + a - _ / 2), y = v - _ / 2;
|
|
11077
11197
|
e.fillStyle = "rgba(0, 0, 0, 0.8)";
|
|
11078
|
-
let
|
|
11079
|
-
e.fillRect(
|
|
11080
|
-
let
|
|
11081
|
-
e.fillStyle = "#ffffff", e.fillText(
|
|
11198
|
+
let b = n, x = Z(y, l), S = i, C = Z(_, l);
|
|
11199
|
+
e.fillRect(b, x, S, C);
|
|
11200
|
+
let w = n + i / 2;
|
|
11201
|
+
e.fillStyle = "#ffffff", e.fillText(g, Z(w, l), Z(v, l)), e.restore();
|
|
11082
11202
|
}
|
|
11083
|
-
function
|
|
11203
|
+
function zc(e, t) {
|
|
11084
11204
|
let { x: n, y: r, width: i, height: a, data: o, scrollLeft: s, kWidth: c, kGap: l, startIndex: u, endIndex: d, dpr: f, bgColor: p = Aa.TRANSPARENT, textColor: m = Oa.SECONDARY, lineColor: h = ja.DARK, fontSize: g = 12, paddingX: _ = 8, drawTopBorder: v = !0, drawBottomBorder: y = !0 } = t, b = Math.round(c * f), x = b % 2 == 0 ? b + 1 : b, S = Math.round(l * f), C = x + S, w = S, T = C / f, E = w / f, D = x / f;
|
|
11085
11205
|
e.fillStyle = p, e.fillRect(n, r, i, a), v && (e.strokeStyle = h, e.lineWidth = 1, e.beginPath(), e.moveTo(n, Q(r, f)), e.lineTo(n + i, Q(r, f)), e.stroke()), y && (e.strokeStyle = h, e.lineWidth = 1, e.beginPath(), e.moveTo(n, Q(r + a, f)), e.lineTo(n + i, Q(r + a, f)), e.stroke()), e.textAlign = "center", e.textBaseline = "middle";
|
|
11086
11206
|
let O = r + a / 2 + 1, k = Da(o).filter((e) => e >= u && e < d);
|
|
@@ -11096,21 +11216,19 @@ function Rc(e, t) {
|
|
|
11096
11216
|
}
|
|
11097
11217
|
//#endregion
|
|
11098
11218
|
//#region src/core/renderers/Indicator/scale/indicator_scale.ts
|
|
11099
|
-
function
|
|
11219
|
+
function Bc(e) {
|
|
11100
11220
|
let { ctx: t, dpr: n, axisWidth: r, height: i, paddingTop: a, paddingBottom: o, valueMin: s, valueMax: c, isMain: l, decimals: u = 2, hideEdgeTicks: d = !0 } = e, f = c - s || 1;
|
|
11101
|
-
t.save(), t.
|
|
11102
|
-
let p = r / 2, m = a, h = Math.max(a, i - o), g = Math.max(0, h - m), _ =
|
|
11221
|
+
t.save(), t.clearRect(0, 0, r, i), t.font = "12px -apple-system,BlinkMacSystemFont,Trebuchet MS,Roboto,Ubuntu,sans-serif", t.textBaseline = "middle", t.textAlign = "center";
|
|
11222
|
+
let p = r / 2, m = a, h = Math.max(a, i - o), g = Math.max(0, h - m), _ = jc(i, l), v = f / Math.max(1, _ - 1);
|
|
11103
11223
|
for (let e = 0; e < _; e++) {
|
|
11104
11224
|
if (d && (e === 0 || e === _ - 1)) continue;
|
|
11105
|
-
let r =
|
|
11106
|
-
t.
|
|
11107
|
-
let a = Q(i, n);
|
|
11108
|
-
t.moveTo(0, a), t.lineTo(4, a), t.stroke(), t.fillStyle = Oa.SECONDARY, t.fillText(r.toFixed(u), Z(p, n), Z(i, n));
|
|
11225
|
+
let r = c - v * e, i = m + (_ <= 1 ? 0 : e / (_ - 1)) * g;
|
|
11226
|
+
t.fillStyle = Oa.SECONDARY, t.fillText(r.toFixed(u), Z(p, n), Z(i, n));
|
|
11109
11227
|
}
|
|
11110
11228
|
t.restore();
|
|
11111
11229
|
}
|
|
11112
|
-
function
|
|
11113
|
-
let { axisWidth: t, paneId: n, indicatorKey: r, label: i, decimals: a = 2 } = e, o =
|
|
11230
|
+
function Vc(e) {
|
|
11231
|
+
let { axisWidth: t, paneId: n, indicatorKey: r, label: i, decimals: a = 2 } = e, o = Vs(r, n), s = null;
|
|
11114
11232
|
return {
|
|
11115
11233
|
name: `${r}Scale_${n}`,
|
|
11116
11234
|
version: "1.0.0",
|
|
@@ -11125,25 +11243,27 @@ function Bc(e) {
|
|
|
11125
11243
|
let { yAxisCtx: n, pane: r, dpr: i } = e;
|
|
11126
11244
|
if (!n || !s) return;
|
|
11127
11245
|
let c = s.getSharedState(o);
|
|
11128
|
-
c
|
|
11246
|
+
if (!c) return;
|
|
11247
|
+
let l = r.yAxis.getPriceOffset();
|
|
11248
|
+
Bc({
|
|
11129
11249
|
ctx: n,
|
|
11130
11250
|
dpr: i,
|
|
11131
11251
|
axisWidth: t,
|
|
11132
11252
|
height: r.height,
|
|
11133
11253
|
paddingTop: r.yAxis.getPaddingTop(),
|
|
11134
11254
|
paddingBottom: r.yAxis.getPaddingBottom(),
|
|
11135
|
-
valueMin: c.valueMin,
|
|
11136
|
-
valueMax: c.valueMax,
|
|
11255
|
+
valueMin: c.valueMin + l,
|
|
11256
|
+
valueMax: c.valueMax + l,
|
|
11137
11257
|
isMain: !1,
|
|
11138
11258
|
decimals: a,
|
|
11139
|
-
hideEdgeTicks: !
|
|
11259
|
+
hideEdgeTicks: !1
|
|
11140
11260
|
});
|
|
11141
11261
|
}
|
|
11142
11262
|
};
|
|
11143
11263
|
}
|
|
11144
11264
|
//#endregion
|
|
11145
11265
|
//#region src/core/renderers/yAxis.ts
|
|
11146
|
-
function
|
|
11266
|
+
function Hc(e) {
|
|
11147
11267
|
return {
|
|
11148
11268
|
name: "yAxis",
|
|
11149
11269
|
version: "1.0.0",
|
|
@@ -11152,40 +11272,41 @@ function Vc(e) {
|
|
|
11152
11272
|
paneId: oa,
|
|
11153
11273
|
priority: X.SYSTEM_YAXIS,
|
|
11154
11274
|
draw(t) {
|
|
11155
|
-
let { ctx: n, pane: r, dpr: i, yAxisCtx: a } = t, o = a || n;
|
|
11156
|
-
|
|
11157
|
-
zc({
|
|
11275
|
+
let { ctx: n, pane: r, dpr: i, yAxisCtx: a } = t, o = a || n, s = a?.canvas ? a.canvas.width / i : e.axisWidth, c = r.yAxis.getPriceOffset();
|
|
11276
|
+
r.capabilities.showPriceAxisTicks && Bc({
|
|
11158
11277
|
ctx: o,
|
|
11159
11278
|
dpr: i,
|
|
11160
|
-
axisWidth:
|
|
11279
|
+
axisWidth: s,
|
|
11161
11280
|
height: r.height,
|
|
11162
11281
|
paddingTop: r.yAxis.getPaddingTop(),
|
|
11163
11282
|
paddingBottom: r.yAxis.getPaddingBottom(),
|
|
11164
|
-
valueMin: r.priceRange.minPrice,
|
|
11165
|
-
valueMax: r.priceRange.maxPrice,
|
|
11283
|
+
valueMin: r.priceRange.minPrice + c,
|
|
11284
|
+
valueMax: r.priceRange.maxPrice + c,
|
|
11166
11285
|
isMain: !0,
|
|
11167
11286
|
decimals: 2,
|
|
11168
|
-
hideEdgeTicks: !
|
|
11287
|
+
hideEdgeTicks: !1
|
|
11169
11288
|
});
|
|
11170
|
-
let
|
|
11171
|
-
|
|
11289
|
+
let l = e.getCrosshair?.();
|
|
11290
|
+
l && l.activePaneId === r.id && l.price !== null && Rc(o, {
|
|
11172
11291
|
x: 0,
|
|
11173
11292
|
y: r.top,
|
|
11174
|
-
width:
|
|
11293
|
+
width: s,
|
|
11175
11294
|
height: r.height,
|
|
11176
|
-
crosshairY:
|
|
11295
|
+
crosshairY: l.y,
|
|
11177
11296
|
priceRange: r.priceRange,
|
|
11178
11297
|
yPaddingPx: e.yPaddingPx,
|
|
11179
11298
|
dpr: i,
|
|
11180
|
-
fontSize: 12
|
|
11299
|
+
fontSize: 12,
|
|
11300
|
+
priceOffset: c,
|
|
11301
|
+
price: l.price
|
|
11181
11302
|
});
|
|
11182
11303
|
}
|
|
11183
11304
|
};
|
|
11184
11305
|
}
|
|
11185
11306
|
//#endregion
|
|
11186
11307
|
//#region src/core/renderers/Indicator/scale/macd_scale.ts
|
|
11187
|
-
function
|
|
11188
|
-
return
|
|
11308
|
+
function Uc(e) {
|
|
11309
|
+
return Vc({
|
|
11189
11310
|
axisWidth: e.axisWidth,
|
|
11190
11311
|
paneId: e.paneId,
|
|
11191
11312
|
indicatorKey: "macd",
|
|
@@ -11195,8 +11316,8 @@ function Hc(e) {
|
|
|
11195
11316
|
}
|
|
11196
11317
|
//#endregion
|
|
11197
11318
|
//#region src/core/renderers/Indicator/scale/rsi_scale.ts
|
|
11198
|
-
function
|
|
11199
|
-
return
|
|
11319
|
+
function Wc(e) {
|
|
11320
|
+
return Vc({
|
|
11200
11321
|
axisWidth: e.axisWidth,
|
|
11201
11322
|
paneId: e.paneId,
|
|
11202
11323
|
indicatorKey: "rsi",
|
|
@@ -11206,8 +11327,8 @@ function Uc(e) {
|
|
|
11206
11327
|
}
|
|
11207
11328
|
//#endregion
|
|
11208
11329
|
//#region src/core/renderers/Indicator/scale/cci_scale.ts
|
|
11209
|
-
function
|
|
11210
|
-
return
|
|
11330
|
+
function Gc(e) {
|
|
11331
|
+
return Vc({
|
|
11211
11332
|
axisWidth: e.axisWidth,
|
|
11212
11333
|
paneId: e.paneId,
|
|
11213
11334
|
indicatorKey: "cci",
|
|
@@ -11217,8 +11338,8 @@ function Wc(e) {
|
|
|
11217
11338
|
}
|
|
11218
11339
|
//#endregion
|
|
11219
11340
|
//#region src/core/renderers/Indicator/scale/stoch_scale.ts
|
|
11220
|
-
function
|
|
11221
|
-
return
|
|
11341
|
+
function Kc(e) {
|
|
11342
|
+
return Vc({
|
|
11222
11343
|
axisWidth: e.axisWidth,
|
|
11223
11344
|
paneId: e.paneId,
|
|
11224
11345
|
indicatorKey: "stoch",
|
|
@@ -11228,8 +11349,8 @@ function Gc(e) {
|
|
|
11228
11349
|
}
|
|
11229
11350
|
//#endregion
|
|
11230
11351
|
//#region src/core/renderers/Indicator/scale/mom_scale.ts
|
|
11231
|
-
function
|
|
11232
|
-
return
|
|
11352
|
+
function qc(e) {
|
|
11353
|
+
return Vc({
|
|
11233
11354
|
axisWidth: e.axisWidth,
|
|
11234
11355
|
paneId: e.paneId,
|
|
11235
11356
|
indicatorKey: "mom",
|
|
@@ -11239,8 +11360,8 @@ function Kc(e) {
|
|
|
11239
11360
|
}
|
|
11240
11361
|
//#endregion
|
|
11241
11362
|
//#region src/core/renderers/Indicator/scale/wmsr_scale.ts
|
|
11242
|
-
function
|
|
11243
|
-
return
|
|
11363
|
+
function Jc(e) {
|
|
11364
|
+
return Vc({
|
|
11244
11365
|
axisWidth: e.axisWidth,
|
|
11245
11366
|
paneId: e.paneId,
|
|
11246
11367
|
indicatorKey: "wmsr",
|
|
@@ -11250,8 +11371,8 @@ function qc(e) {
|
|
|
11250
11371
|
}
|
|
11251
11372
|
//#endregion
|
|
11252
11373
|
//#region src/core/renderers/Indicator/scale/kst_scale.ts
|
|
11253
|
-
function
|
|
11254
|
-
return
|
|
11374
|
+
function Yc(e) {
|
|
11375
|
+
return Vc({
|
|
11255
11376
|
axisWidth: e.axisWidth,
|
|
11256
11377
|
paneId: e.paneId,
|
|
11257
11378
|
indicatorKey: "kst",
|
|
@@ -11261,8 +11382,8 @@ function Jc(e) {
|
|
|
11261
11382
|
}
|
|
11262
11383
|
//#endregion
|
|
11263
11384
|
//#region src/core/renderers/Indicator/scale/fastk_scale.ts
|
|
11264
|
-
function
|
|
11265
|
-
return
|
|
11385
|
+
function Xc(e) {
|
|
11386
|
+
return Vc({
|
|
11266
11387
|
axisWidth: e.axisWidth,
|
|
11267
11388
|
paneId: e.paneId,
|
|
11268
11389
|
indicatorKey: "fastk",
|
|
@@ -11272,19 +11393,19 @@ function Yc(e) {
|
|
|
11272
11393
|
}
|
|
11273
11394
|
//#endregion
|
|
11274
11395
|
//#region src/core/renderers/timeAxis.ts
|
|
11275
|
-
var
|
|
11276
|
-
function
|
|
11396
|
+
var Zc = Symbol("time-axis");
|
|
11397
|
+
function Qc(e) {
|
|
11277
11398
|
return {
|
|
11278
11399
|
name: "timeAxis",
|
|
11279
11400
|
version: "1.0.0",
|
|
11280
11401
|
description: "时间轴渲染器",
|
|
11281
11402
|
debugName: "时间轴",
|
|
11282
|
-
paneId:
|
|
11403
|
+
paneId: Zc,
|
|
11283
11404
|
priority: X.SYSTEM_XAXIS,
|
|
11284
11405
|
isSystem: !0,
|
|
11285
11406
|
draw(t) {
|
|
11286
11407
|
let { ctx: n, data: r, range: i, scrollLeft: a, kWidth: o, kGap: s, dpr: c, paneWidth: l } = t, u = r, d = n, f = l, p = e.height;
|
|
11287
|
-
d.setTransform(1, 0, 0, 1, 0, 0), d.scale(c, c), d.clearRect(0, 0, f, p),
|
|
11408
|
+
d.setTransform(1, 0, 0, 1, 0, 0), d.scale(c, c), d.clearRect(0, 0, f, p), zc(d, {
|
|
11288
11409
|
x: 0,
|
|
11289
11410
|
y: 0,
|
|
11290
11411
|
width: f,
|
|
@@ -11302,7 +11423,7 @@ function Zc(e) {
|
|
|
11302
11423
|
let m = e.getCrosshair?.();
|
|
11303
11424
|
if (m && typeof m.index == "number") {
|
|
11304
11425
|
let e = u[m.index];
|
|
11305
|
-
e &&
|
|
11426
|
+
e && Lc(d, {
|
|
11306
11427
|
x: 0,
|
|
11307
11428
|
y: 0,
|
|
11308
11429
|
width: f,
|
|
@@ -11318,7 +11439,7 @@ function Zc(e) {
|
|
|
11318
11439
|
}
|
|
11319
11440
|
//#endregion
|
|
11320
11441
|
//#region src/core/renderers/crosshair.ts
|
|
11321
|
-
function
|
|
11442
|
+
function $c(e) {
|
|
11322
11443
|
return {
|
|
11323
11444
|
name: "crosshair",
|
|
11324
11445
|
version: "1.0.0",
|
|
@@ -11331,9 +11452,9 @@ function Qc(e) {
|
|
|
11331
11452
|
if (o.isDragging || !o.pos) return;
|
|
11332
11453
|
let { x: s } = o.pos, c = r.id === o.activePaneId, l = -1;
|
|
11333
11454
|
c && o.price !== null && (l = r.yAxis.priceToY(o.price)), n.save(), n.beginPath(), n.rect(0, 0, a, r.height), n.clip(), n.fillStyle = Wa.LINE;
|
|
11334
|
-
let u =
|
|
11455
|
+
let u = Ts(s, 0, r.height, i);
|
|
11335
11456
|
if (u && n.fillRect(u.x, u.y, u.width, u.height), c && l >= 0) {
|
|
11336
|
-
let e =
|
|
11457
|
+
let e = Es(0, a, Math.min(l, r.height - 1 / i), i);
|
|
11337
11458
|
e && n.fillRect(e.x, e.y, e.width, e.height);
|
|
11338
11459
|
}
|
|
11339
11460
|
n.restore();
|
|
@@ -11342,7 +11463,7 @@ function Qc(e) {
|
|
|
11342
11463
|
}
|
|
11343
11464
|
//#endregion
|
|
11344
11465
|
//#region src/core/renderers/paneTitle.ts
|
|
11345
|
-
function
|
|
11466
|
+
function el(e) {
|
|
11346
11467
|
let t = { ...e };
|
|
11347
11468
|
return {
|
|
11348
11469
|
name: `paneTitle_${e.paneId}`,
|
|
@@ -11383,7 +11504,7 @@ function $c(e) {
|
|
|
11383
11504
|
}
|
|
11384
11505
|
//#endregion
|
|
11385
11506
|
//#region src/components/KLineChart.vue?vue&type=script&setup=true&lang.ts
|
|
11386
|
-
var
|
|
11507
|
+
var tl = { class: "chart-wrapper" }, nl = 4, rl = /* @__PURE__ */ _o(/* @__PURE__ */ u({
|
|
11387
11508
|
__name: "KLineChart",
|
|
11388
11509
|
props: {
|
|
11389
11510
|
semanticConfig: {},
|
|
@@ -11412,7 +11533,7 @@ var el = { class: "chart-wrapper" }, tl = 4, nl = /* @__PURE__ */ _o(/* @__PURE_
|
|
|
11412
11533
|
let k = _(null), A = _(null), j = _({
|
|
11413
11534
|
x: 0,
|
|
11414
11535
|
y: 0
|
|
11415
|
-
}), M = _(!1), N = _(!1), ee = _(!1), P = _({ main:
|
|
11536
|
+
}), M = _(!1), N = _(!1), ee = _(!1), P = _({ main: 3 }), F = _(null), I = _(null), te = _({
|
|
11416
11537
|
x: 0,
|
|
11417
11538
|
y: 0
|
|
11418
11539
|
}), ne = _(0), L = r(() => {
|
|
@@ -11435,13 +11556,6 @@ var el = { class: "chart-wrapper" }, tl = 4, nl = /* @__PURE__ */ _o(/* @__PURE_
|
|
|
11435
11556
|
N.value = e.isResizingPaneBoundaryState(), ee.value = e.isHoveringPaneBoundaryState();
|
|
11436
11557
|
}
|
|
11437
11558
|
function z() {
|
|
11438
|
-
let e = C.value;
|
|
11439
|
-
if (!e) return;
|
|
11440
|
-
let t = e.getPaneLayoutSpecs(), n = {};
|
|
11441
|
-
for (let e of t) n[e.id] = e.ratio;
|
|
11442
|
-
P.value = n;
|
|
11443
|
-
}
|
|
11444
|
-
function ce() {
|
|
11445
11559
|
let e = C.value?.interaction;
|
|
11446
11560
|
if (!e) {
|
|
11447
11561
|
F.value = null, I.value = null, k.value = null, A.value = null, se();
|
|
@@ -11454,15 +11568,15 @@ var el = { class: "chart-wrapper" }, tl = 4, nl = /* @__PURE__ */ _o(/* @__PURE_
|
|
|
11454
11568
|
y: t.y
|
|
11455
11569
|
}), se();
|
|
11456
11570
|
}
|
|
11457
|
-
function
|
|
11571
|
+
function ce() {
|
|
11458
11572
|
oe ||= requestAnimationFrame(() => {
|
|
11459
|
-
|
|
11573
|
+
z(), oe = null;
|
|
11460
11574
|
});
|
|
11461
11575
|
}
|
|
11462
|
-
function
|
|
11463
|
-
C.value?.interaction.onPointerDown(e), M.value = C.value?.interaction.isDraggingState() ?? !1,
|
|
11576
|
+
function le(e) {
|
|
11577
|
+
C.value?.interaction.onPointerDown(e), M.value = C.value?.interaction.isDraggingState() ?? !1, z();
|
|
11464
11578
|
}
|
|
11465
|
-
function
|
|
11579
|
+
function ue(e) {
|
|
11466
11580
|
let t = v.value;
|
|
11467
11581
|
if (t) {
|
|
11468
11582
|
let n = t.getBoundingClientRect();
|
|
@@ -11471,18 +11585,18 @@ var el = { class: "chart-wrapper" }, tl = 4, nl = /* @__PURE__ */ _o(/* @__PURE_
|
|
|
11471
11585
|
y: e.clientY - n.top
|
|
11472
11586
|
};
|
|
11473
11587
|
}
|
|
11474
|
-
C.value?.interaction.onPointerMove(e),
|
|
11588
|
+
C.value?.interaction.onPointerMove(e), ce();
|
|
11475
11589
|
}
|
|
11476
|
-
function
|
|
11477
|
-
C.value?.interaction.onPointerUp(e), M.value = C.value?.interaction.isDraggingState() ?? !1,
|
|
11590
|
+
function de(e) {
|
|
11591
|
+
C.value?.interaction.onPointerUp(e), M.value = C.value?.interaction.isDraggingState() ?? !1, z();
|
|
11478
11592
|
}
|
|
11479
|
-
function
|
|
11593
|
+
function B(e) {
|
|
11480
11594
|
C.value?.interaction.onPointerLeave(e), M.value = C.value?.interaction.isDraggingState() ?? !1, F.value = null, se();
|
|
11481
11595
|
}
|
|
11482
|
-
function
|
|
11483
|
-
C.value?.interaction.onScroll(),
|
|
11596
|
+
function fe() {
|
|
11597
|
+
C.value?.interaction.onScroll(), z();
|
|
11484
11598
|
}
|
|
11485
|
-
let V = _([]),
|
|
11599
|
+
let V = _([]), pe = _({}), H = _([]), me = [
|
|
11486
11600
|
"VOLUME",
|
|
11487
11601
|
"MACD",
|
|
11488
11602
|
"RSI",
|
|
@@ -11493,25 +11607,26 @@ var el = { class: "chart-wrapper" }, tl = 4, nl = /* @__PURE__ */ _o(/* @__PURE_
|
|
|
11493
11607
|
"KST",
|
|
11494
11608
|
"FASTK"
|
|
11495
11609
|
];
|
|
11496
|
-
|
|
11497
|
-
let e = P.value.main ??
|
|
11498
|
-
return
|
|
11610
|
+
function he() {
|
|
11611
|
+
let e = P.value.main ?? 3;
|
|
11612
|
+
return H.value.length === 0 ? [{
|
|
11499
11613
|
id: "main",
|
|
11500
11614
|
ratio: e,
|
|
11501
|
-
visible: !0
|
|
11615
|
+
visible: !0,
|
|
11616
|
+
role: "price"
|
|
11502
11617
|
}] : [{
|
|
11503
11618
|
id: "main",
|
|
11504
11619
|
ratio: e,
|
|
11505
|
-
visible: !0
|
|
11506
|
-
|
|
11620
|
+
visible: !0,
|
|
11621
|
+
role: "price"
|
|
11622
|
+
}, ...H.value.map((e) => ({
|
|
11507
11623
|
id: e.id,
|
|
11508
11624
|
ratio: P.value[e.id] ?? 1,
|
|
11509
|
-
visible: !0
|
|
11625
|
+
visible: !0,
|
|
11626
|
+
role: "indicator"
|
|
11510
11627
|
}))];
|
|
11511
|
-
}
|
|
11512
|
-
|
|
11513
|
-
}, { flush: "post" });
|
|
11514
|
-
function he(e) {
|
|
11628
|
+
}
|
|
11629
|
+
function ge(e) {
|
|
11515
11630
|
switch (e) {
|
|
11516
11631
|
case "MACD": return {
|
|
11517
11632
|
fastPeriod: 12,
|
|
@@ -11541,99 +11656,99 @@ var el = { class: "chart-wrapper" }, tl = 4, nl = /* @__PURE__ */ _o(/* @__PURE_
|
|
|
11541
11656
|
default: return {};
|
|
11542
11657
|
}
|
|
11543
11658
|
}
|
|
11544
|
-
function
|
|
11545
|
-
if (
|
|
11659
|
+
function _e(e = "VOLUME", t) {
|
|
11660
|
+
if (H.value.length >= nl) return !1;
|
|
11546
11661
|
let n = `sub_${e}`;
|
|
11547
|
-
if (
|
|
11548
|
-
if (!C.value?.createSubPane(e, t ??
|
|
11549
|
-
let r =
|
|
11662
|
+
if (H.value.some((e) => e.id === n)) return !0;
|
|
11663
|
+
if (!C.value?.createSubPane(e, t ?? ge(e))) return !1;
|
|
11664
|
+
let r = el({
|
|
11550
11665
|
paneId: n,
|
|
11551
11666
|
title: e,
|
|
11552
|
-
getTitleInfo: () =>
|
|
11667
|
+
getTitleInfo: () => Ce(n)
|
|
11553
11668
|
});
|
|
11554
|
-
return C.value?.useRenderer(r),
|
|
11669
|
+
return C.value?.useRenderer(r), H.value.push({
|
|
11555
11670
|
id: n,
|
|
11556
11671
|
indicatorId: e,
|
|
11557
11672
|
rendererName: `${e.toLowerCase()}_${n}`,
|
|
11558
11673
|
paneTitleRendererName: r.name,
|
|
11559
|
-
params: t ??
|
|
11560
|
-
}),
|
|
11674
|
+
params: t ?? ge(e)
|
|
11675
|
+
}), V.value.includes(e) || V.value.push(e), !0;
|
|
11561
11676
|
}
|
|
11562
|
-
function
|
|
11563
|
-
let t =
|
|
11677
|
+
function ve(e) {
|
|
11678
|
+
let t = H.value.findIndex((t) => t.id === e);
|
|
11564
11679
|
if (t === -1) return;
|
|
11565
|
-
let n =
|
|
11566
|
-
n && (C.value?.removeRenderer(n.paneTitleRendererName), C.value?.removeSubPane(n.indicatorId),
|
|
11567
|
-
}
|
|
11568
|
-
function ve() {
|
|
11569
|
-
for (let e of U.value) C.value?.removeRenderer(e.paneTitleRendererName);
|
|
11570
|
-
C.value?.clearSubPanes(), U.value = [], z(), V.value = V.value.filter((e) => !me.includes(e));
|
|
11680
|
+
let n = H.value[t];
|
|
11681
|
+
n && (C.value?.removeRenderer(n.paneTitleRendererName), C.value?.removeSubPane(n.indicatorId), H.value.splice(t, 1), H.value.some((e) => e.indicatorId === n.indicatorId) || (V.value = V.value.filter((e) => e !== n.indicatorId)));
|
|
11571
11682
|
}
|
|
11572
11683
|
function ye() {
|
|
11684
|
+
for (let e of H.value) C.value?.removeRenderer(e.paneTitleRendererName);
|
|
11685
|
+
C.value?.clearSubPanes(), H.value = [], V.value = V.value.filter((e) => !me.includes(e));
|
|
11686
|
+
}
|
|
11687
|
+
function be() {
|
|
11573
11688
|
let e = n.semanticConfig.indicators?.main;
|
|
11574
|
-
if (e) for (let t of e) t.enabled && (V.value.includes(t.type) || V.value.push(t.type), t.params && (
|
|
11689
|
+
if (e) for (let t of e) t.enabled && (V.value.includes(t.type) || V.value.push(t.type), t.params && (pe.value[t.type] = t.params));
|
|
11575
11690
|
}
|
|
11576
|
-
S([V,
|
|
11691
|
+
S([V, pe], ([e]) => {
|
|
11577
11692
|
let t = C.value;
|
|
11578
11693
|
t && (t.updateRendererConfig("mainIndicatorLegend", { indicators: {
|
|
11579
11694
|
MA: {
|
|
11580
11695
|
enabled: e.includes("MA"),
|
|
11581
|
-
params:
|
|
11696
|
+
params: pe.value.MA || {}
|
|
11582
11697
|
},
|
|
11583
11698
|
BOLL: {
|
|
11584
11699
|
enabled: e.includes("BOLL"),
|
|
11585
|
-
params:
|
|
11700
|
+
params: pe.value.BOLL || {}
|
|
11586
11701
|
},
|
|
11587
11702
|
EXPMA: {
|
|
11588
11703
|
enabled: e.includes("EXPMA"),
|
|
11589
|
-
params:
|
|
11704
|
+
params: pe.value.EXPMA || {}
|
|
11590
11705
|
},
|
|
11591
11706
|
ENE: {
|
|
11592
11707
|
enabled: e.includes("ENE"),
|
|
11593
|
-
params:
|
|
11708
|
+
params: pe.value.ENE || {}
|
|
11594
11709
|
}
|
|
11595
11710
|
} }), t.setRendererEnabled("ma", e.includes("MA")), t.setRendererEnabled("boll", e.includes("BOLL")), t.setRendererEnabled("expma", e.includes("EXPMA")), t.setRendererEnabled("ene", e.includes("ENE")), D());
|
|
11596
11711
|
}, { deep: !0 });
|
|
11597
|
-
function
|
|
11712
|
+
function xe() {
|
|
11598
11713
|
let e = C.value?.getSubPaneIndicators() ?? [];
|
|
11599
|
-
|
|
11714
|
+
H.value = [];
|
|
11600
11715
|
for (let t of e) {
|
|
11601
|
-
let e = `sub_${t}`, n =
|
|
11716
|
+
let e = `sub_${t}`, n = el({
|
|
11602
11717
|
paneId: e,
|
|
11603
11718
|
title: t,
|
|
11604
|
-
getTitleInfo: () =>
|
|
11719
|
+
getTitleInfo: () => Ce(e)
|
|
11605
11720
|
});
|
|
11606
|
-
C.value?.useRenderer(n),
|
|
11721
|
+
C.value?.useRenderer(n), H.value.push({
|
|
11607
11722
|
id: e,
|
|
11608
11723
|
indicatorId: t,
|
|
11609
11724
|
rendererName: `${t.toLowerCase()}_${e}`,
|
|
11610
11725
|
paneTitleRendererName: n.name,
|
|
11611
|
-
params:
|
|
11726
|
+
params: ge(t)
|
|
11612
11727
|
}), V.value.includes(t) || V.value.push(t);
|
|
11613
11728
|
}
|
|
11614
11729
|
}
|
|
11615
|
-
function
|
|
11616
|
-
let n =
|
|
11730
|
+
function Se(e, t) {
|
|
11731
|
+
let n = H.value.find((t) => t.id === e);
|
|
11617
11732
|
if (!n) return;
|
|
11618
11733
|
let r = n.indicatorId;
|
|
11619
|
-
C.value?.removeRenderer(n.paneTitleRendererName), C.value?.removeSubPane(r), C.value?.createSubPane(t,
|
|
11620
|
-
let i = `sub_${t}`, a =
|
|
11734
|
+
C.value?.removeRenderer(n.paneTitleRendererName), C.value?.removeSubPane(r), C.value?.createSubPane(t, ge(t));
|
|
11735
|
+
let i = `sub_${t}`, a = el({
|
|
11621
11736
|
paneId: i,
|
|
11622
11737
|
title: t,
|
|
11623
|
-
getTitleInfo: () =>
|
|
11738
|
+
getTitleInfo: () => Ce(i)
|
|
11624
11739
|
});
|
|
11625
11740
|
C.value?.useRenderer(a);
|
|
11626
|
-
let o =
|
|
11627
|
-
o !== -1 && (
|
|
11741
|
+
let o = H.value.findIndex((t) => t.id === e);
|
|
11742
|
+
o !== -1 && (H.value[o] = {
|
|
11628
11743
|
id: i,
|
|
11629
11744
|
indicatorId: t,
|
|
11630
11745
|
rendererName: `${t.toLowerCase()}_${i}`,
|
|
11631
11746
|
paneTitleRendererName: a.name,
|
|
11632
|
-
params:
|
|
11747
|
+
params: ge(t)
|
|
11633
11748
|
}), V.value = V.value.filter((e) => e !== r), V.value.includes(t) || V.value.push(t);
|
|
11634
11749
|
}
|
|
11635
|
-
function
|
|
11636
|
-
let t =
|
|
11750
|
+
function Ce(e) {
|
|
11751
|
+
let t = H.value.find((t) => t.id === e);
|
|
11637
11752
|
if (!t) return null;
|
|
11638
11753
|
let n = C.value?.getData();
|
|
11639
11754
|
if (!n || n.length === 0) return null;
|
|
@@ -11646,94 +11761,96 @@ var el = { class: "chart-wrapper" }, tl = 4, nl = /* @__PURE__ */ _o(/* @__PURE_
|
|
|
11646
11761
|
let i = I.value;
|
|
11647
11762
|
if (i === null) return null;
|
|
11648
11763
|
switch (t.indicatorId) {
|
|
11649
|
-
case "MACD": return
|
|
11650
|
-
case "RSI": return
|
|
11651
|
-
case "CCI": return
|
|
11652
|
-
case "STOCH": return
|
|
11653
|
-
case "MOM": return
|
|
11654
|
-
case "WMSR": return
|
|
11655
|
-
case "KST": return
|
|
11656
|
-
case "FASTK": return
|
|
11764
|
+
case "MACD": return qs(n, i, r.fastPeriod ?? 12, r.slowPeriod ?? 26, r.signalPeriod ?? 9);
|
|
11765
|
+
case "RSI": return Xs(n, i, r.period1 ?? 6, r.period2 ?? 12, r.period3 ?? 24);
|
|
11766
|
+
case "CCI": return ec(n, i, r.period ?? 14);
|
|
11767
|
+
case "STOCH": return ic(n, i, r.n ?? 9, r.m ?? 3);
|
|
11768
|
+
case "MOM": return cc(n, i, r.period ?? 10);
|
|
11769
|
+
case "WMSR": return fc(n, i, r.period ?? 14);
|
|
11770
|
+
case "KST": return vc(n, i, r.roc1 ?? 10, r.roc2 ?? 15, r.roc3 ?? 20, r.roc4 ?? 30, r.signalPeriod ?? 9);
|
|
11771
|
+
case "FASTK": return Sc(n, i, r.period ?? 9);
|
|
11657
11772
|
default: return null;
|
|
11658
11773
|
}
|
|
11659
11774
|
}
|
|
11660
|
-
function
|
|
11775
|
+
function we(e, t) {
|
|
11661
11776
|
if (e === "MA" || e === "BOLL" || e === "EXPMA" || e === "ENE") {
|
|
11662
11777
|
t ? V.value.includes(e) || V.value.push(e) : V.value = V.value.filter((t) => t !== e);
|
|
11663
11778
|
return;
|
|
11664
11779
|
}
|
|
11665
11780
|
if (me.includes(e)) {
|
|
11666
11781
|
if (t) {
|
|
11667
|
-
if (V.value.includes(e) || V.value.push(e),
|
|
11668
|
-
if (!
|
|
11669
|
-
let t =
|
|
11670
|
-
t &&
|
|
11782
|
+
if (V.value.includes(e) || V.value.push(e), H.value.find((t) => t.indicatorId === e)) return;
|
|
11783
|
+
if (!_e(e)) {
|
|
11784
|
+
let t = H.value[H.value.length - 1];
|
|
11785
|
+
t && Se(t.id, e);
|
|
11671
11786
|
}
|
|
11672
|
-
} else V.value = V.value.filter((t) => t !== e),
|
|
11787
|
+
} else V.value = V.value.filter((t) => t !== e), H.value.filter((t) => t.indicatorId === e).forEach((e) => ve(e.id));
|
|
11673
11788
|
D();
|
|
11674
11789
|
}
|
|
11675
11790
|
}
|
|
11676
|
-
function
|
|
11791
|
+
function Te() {
|
|
11677
11792
|
C.value?.updateRendererConfig("mainIndicatorLegend", { indicators: {
|
|
11678
11793
|
MA: {
|
|
11679
11794
|
enabled: V.value.includes("MA"),
|
|
11680
|
-
params:
|
|
11795
|
+
params: pe.value.MA || {}
|
|
11681
11796
|
},
|
|
11682
11797
|
BOLL: {
|
|
11683
11798
|
enabled: V.value.includes("BOLL"),
|
|
11684
|
-
params:
|
|
11799
|
+
params: pe.value.BOLL || {}
|
|
11685
11800
|
},
|
|
11686
11801
|
EXPMA: {
|
|
11687
11802
|
enabled: V.value.includes("EXPMA"),
|
|
11688
|
-
params:
|
|
11803
|
+
params: pe.value.EXPMA || {}
|
|
11689
11804
|
},
|
|
11690
11805
|
ENE: {
|
|
11691
11806
|
enabled: V.value.includes("ENE"),
|
|
11692
|
-
params:
|
|
11807
|
+
params: pe.value.ENE || {}
|
|
11693
11808
|
}
|
|
11694
11809
|
} });
|
|
11695
11810
|
}
|
|
11696
|
-
function
|
|
11697
|
-
if (
|
|
11698
|
-
e === "BOLL" && C.value?.updateRendererConfig("boll", t), e === "EXPMA" && C.value?.updateRendererConfig("expma", t), e === "ENE" && C.value?.updateRendererConfig("ene", t),
|
|
11811
|
+
function Ee(e, t) {
|
|
11812
|
+
if (pe.value[e] = t, e === "MA" || e === "BOLL" || e === "EXPMA" || e === "ENE") {
|
|
11813
|
+
e === "BOLL" && C.value?.updateRendererConfig("boll", t), e === "EXPMA" && C.value?.updateRendererConfig("expma", t), e === "ENE" && C.value?.updateRendererConfig("ene", t), Te(), D();
|
|
11699
11814
|
return;
|
|
11700
11815
|
}
|
|
11701
|
-
me.includes(e) &&
|
|
11816
|
+
me.includes(e) && H.value.filter((t) => t.indicatorId === e).forEach((e) => {
|
|
11702
11817
|
e.params = { ...t }, C.value?.updateRendererConfig(e.rendererName, t);
|
|
11703
11818
|
}), D();
|
|
11704
11819
|
}
|
|
11705
|
-
function
|
|
11706
|
-
if (!e.length ||
|
|
11820
|
+
function De(e) {
|
|
11821
|
+
if (!e.length || H.value.length <= 1) return;
|
|
11707
11822
|
let t = e.filter((e) => me.includes(e));
|
|
11708
11823
|
if (!t.length) return;
|
|
11709
|
-
let n = new Map(
|
|
11824
|
+
let n = new Map(H.value.map((e) => [e.indicatorId, e])), r = [];
|
|
11710
11825
|
for (let e of t) {
|
|
11711
11826
|
let t = n.get(e);
|
|
11712
11827
|
t && (r.push(t), n.delete(e));
|
|
11713
11828
|
}
|
|
11714
11829
|
if (r.length === 0) return;
|
|
11715
|
-
for (let e of
|
|
11716
|
-
let i =
|
|
11830
|
+
for (let e of H.value) n.has(e.indicatorId) && (r.push(e), n.delete(e.indicatorId));
|
|
11831
|
+
let i = H.value.map((e) => e.id), a = r.map((e) => e.id);
|
|
11717
11832
|
if (i.join("|") === a.join("|")) return;
|
|
11718
|
-
|
|
11719
|
-
let o = V.value.filter((e) => !me.includes(e)), s =
|
|
11720
|
-
V.value = [...o, ...s]
|
|
11833
|
+
H.value = r;
|
|
11834
|
+
let o = V.value.filter((e) => !me.includes(e)), s = H.value.map((e) => e.indicatorId);
|
|
11835
|
+
V.value = [...o, ...s];
|
|
11836
|
+
let c = C.value;
|
|
11837
|
+
c && c.updatePaneLayout(he());
|
|
11721
11838
|
}
|
|
11722
|
-
let
|
|
11839
|
+
let Oe = r(() => {
|
|
11723
11840
|
let e = T.value, t = E.value, { startXPx: r, unitPx: i } = ps(b.value, x.value, t);
|
|
11724
11841
|
return (r + e * i) / t + (n.rightAxisWidth + n.priceLabelWidth);
|
|
11725
11842
|
});
|
|
11726
|
-
function
|
|
11843
|
+
function ke() {
|
|
11727
11844
|
let e = v.value;
|
|
11728
11845
|
e && (e.scrollLeft = e.scrollWidth, D());
|
|
11729
11846
|
}
|
|
11730
11847
|
return t({
|
|
11731
11848
|
scheduleRender: D,
|
|
11732
|
-
scrollToRight:
|
|
11733
|
-
addSubPane:
|
|
11734
|
-
removeSubPane:
|
|
11735
|
-
switchSubIndicator:
|
|
11736
|
-
clearAllSubPanes:
|
|
11849
|
+
scrollToRight: ke,
|
|
11850
|
+
addSubPane: _e,
|
|
11851
|
+
removeSubPane: ve,
|
|
11852
|
+
switchSubIndicator: Se,
|
|
11853
|
+
clearAllSubPanes: ye,
|
|
11737
11854
|
get plugin() {
|
|
11738
11855
|
return C.value?.plugin;
|
|
11739
11856
|
}
|
|
@@ -11741,10 +11858,10 @@ var el = { class: "chart-wrapper" }, tl = 4, nl = /* @__PURE__ */ _o(/* @__PURE_
|
|
|
11741
11858
|
let e = v.value, t = u.value, r = c.value;
|
|
11742
11859
|
if (!e || !t || !r) return;
|
|
11743
11860
|
let i = (e) => {
|
|
11744
|
-
C.value?.interaction.onWheel(e),
|
|
11861
|
+
C.value?.interaction.onWheel(e), z();
|
|
11745
11862
|
};
|
|
11746
11863
|
e.addEventListener("wheel", i, { passive: !1 });
|
|
11747
|
-
let a = new
|
|
11864
|
+
let a = new wc({
|
|
11748
11865
|
container: e,
|
|
11749
11866
|
canvasLayer: t,
|
|
11750
11867
|
xAxisCanvas: r
|
|
@@ -11769,52 +11886,53 @@ var el = { class: "chart-wrapper" }, tl = 4, nl = /* @__PURE__ */ _o(/* @__PURE_
|
|
|
11769
11886
|
if (!r) return;
|
|
11770
11887
|
let i = Math.max(0, r.scrollWidth - r.clientWidth);
|
|
11771
11888
|
r.scrollLeft = Math.min(Math.max(0, n), i), a.applyZoom(e, t);
|
|
11772
|
-
}), a.useRenderer(
|
|
11889
|
+
}), a.useRenderer(Mc()), a.useRenderer(Pc()), a.useRenderer(ks({
|
|
11773
11890
|
ma5: !0,
|
|
11774
11891
|
ma10: !0,
|
|
11775
11892
|
ma20: !0,
|
|
11776
11893
|
ma30: !0,
|
|
11777
11894
|
ma60: !0
|
|
11778
|
-
})), a.useRenderer(
|
|
11895
|
+
})), a.useRenderer(js()), a.setRendererEnabled("boll", !1), a.useRenderer(Fs()), a.setRendererEnabled("expma", !1), a.useRenderer(Rs()), a.setRendererEnabled("ene", !1), a.useRenderer(kc()), a.useRenderer(Nc()), a.useRenderer(ya()), a.useRenderer(Hc({
|
|
11779
11896
|
axisWidth: n.rightAxisWidth + n.priceLabelWidth,
|
|
11780
11897
|
yPaddingPx: n.yPaddingPx,
|
|
11781
11898
|
getCrosshair: () => {
|
|
11782
|
-
let e = a.interaction.crosshairPos, t = a.interaction.crosshairPrice;
|
|
11899
|
+
let e = a.interaction.crosshairPos, t = a.interaction.crosshairPrice, n = a.interaction.activePaneId;
|
|
11783
11900
|
return e && t !== null ? {
|
|
11784
11901
|
y: e.y,
|
|
11785
|
-
price: t
|
|
11902
|
+
price: t,
|
|
11903
|
+
activePaneId: n
|
|
11786
11904
|
} : null;
|
|
11787
11905
|
}
|
|
11788
|
-
})), a.useRenderer(
|
|
11906
|
+
})), a.useRenderer(Bs({ yPaddingPx: n.yPaddingPx })), a.useRenderer(Uc({
|
|
11789
11907
|
axisWidth: n.rightAxisWidth + n.priceLabelWidth,
|
|
11790
11908
|
paneId: "sub_MACD"
|
|
11791
|
-
})), a.useRenderer(
|
|
11909
|
+
})), a.useRenderer(Wc({
|
|
11792
11910
|
axisWidth: n.rightAxisWidth + n.priceLabelWidth,
|
|
11793
11911
|
paneId: "sub_RSI"
|
|
11794
|
-
})), a.useRenderer(
|
|
11912
|
+
})), a.useRenderer(Gc({
|
|
11795
11913
|
axisWidth: n.rightAxisWidth + n.priceLabelWidth,
|
|
11796
11914
|
paneId: "sub_CCI"
|
|
11797
|
-
})), a.useRenderer(
|
|
11915
|
+
})), a.useRenderer(Kc({
|
|
11798
11916
|
axisWidth: n.rightAxisWidth + n.priceLabelWidth,
|
|
11799
11917
|
paneId: "sub_STOCH"
|
|
11800
|
-
})), a.useRenderer(
|
|
11918
|
+
})), a.useRenderer(qc({
|
|
11801
11919
|
axisWidth: n.rightAxisWidth + n.priceLabelWidth,
|
|
11802
11920
|
paneId: "sub_MOM"
|
|
11803
|
-
})), a.useRenderer(
|
|
11921
|
+
})), a.useRenderer(Jc({
|
|
11804
11922
|
axisWidth: n.rightAxisWidth + n.priceLabelWidth,
|
|
11805
11923
|
paneId: "sub_WMSR"
|
|
11806
|
-
})), a.useRenderer(
|
|
11924
|
+
})), a.useRenderer(Yc({
|
|
11807
11925
|
axisWidth: n.rightAxisWidth + n.priceLabelWidth,
|
|
11808
11926
|
paneId: "sub_KST"
|
|
11809
|
-
})), a.useRenderer(
|
|
11927
|
+
})), a.useRenderer(Xc({
|
|
11810
11928
|
axisWidth: n.rightAxisWidth + n.priceLabelWidth,
|
|
11811
11929
|
paneId: "sub_FASTK"
|
|
11812
|
-
})), a.useRenderer(
|
|
11930
|
+
})), a.useRenderer($c({ getCrosshairState: () => ({
|
|
11813
11931
|
pos: a.interaction.crosshairPos,
|
|
11814
11932
|
activePaneId: a.interaction.activePaneId,
|
|
11815
11933
|
isDragging: a.interaction.isDraggingState(),
|
|
11816
11934
|
price: a.interaction.crosshairPrice
|
|
11817
|
-
}) })), a.useRenderer(
|
|
11935
|
+
}) })), a.useRenderer(Qc({
|
|
11818
11936
|
height: n.bottomAxisHeight,
|
|
11819
11937
|
getCrosshair: () => {
|
|
11820
11938
|
let e = a.interaction.crosshairPos, t = a.interaction.crosshairIndex;
|
|
@@ -11825,10 +11943,14 @@ var el = { class: "chart-wrapper" }, tl = 4, nl = /* @__PURE__ */ _o(/* @__PURE_
|
|
|
11825
11943
|
}
|
|
11826
11944
|
})), a.setOnViewportChange((e) => {
|
|
11827
11945
|
E.value = e.dpr;
|
|
11828
|
-
}),
|
|
11946
|
+
}), a.setOnPaneLayoutChange((e) => {
|
|
11947
|
+
let t = {};
|
|
11948
|
+
for (let n of e) t[n.id] = n.ratio;
|
|
11949
|
+
P.value = t;
|
|
11950
|
+
}), C.value = a, E.value = a.getCurrentDpr(), a.resize(), w.value = new Ui(a), w.value.on("config:error", (e) => {
|
|
11829
11951
|
console.error("Semantic config error:", e);
|
|
11830
11952
|
}), w.value.on("config:ready", () => {
|
|
11831
|
-
T.value = a.getData()?.length ?? 0, R(),
|
|
11953
|
+
T.value = a.getData()?.length ?? 0, R(), be(), xe(), d(() => ke());
|
|
11832
11954
|
}), w.value.applyConfig(n.semanticConfig).then((e) => {
|
|
11833
11955
|
e && !e.success && console.error("Semantic config apply failed:", e.errors);
|
|
11834
11956
|
}), a.interaction.setOnMarkerHover((e) => {
|
|
@@ -11855,7 +11977,7 @@ var el = { class: "chart-wrapper" }, tl = 4, nl = /* @__PURE__ */ _o(/* @__PURE_
|
|
|
11855
11977
|
let t = await w.value?.applyConfig(e);
|
|
11856
11978
|
t && !t.success && console.error("Semantic config apply failed:", t.errors);
|
|
11857
11979
|
}
|
|
11858
|
-
}, { deep: !0 }), (e, t) => (g(), o("div",
|
|
11980
|
+
}, { deep: !0 }), (e, t) => (g(), o("div", tl, [s("div", {
|
|
11859
11981
|
class: f(["chart-container", {
|
|
11860
11982
|
"is-dragging": M.value,
|
|
11861
11983
|
"is-resizing-pane": N.value,
|
|
@@ -11863,14 +11985,14 @@ var el = { class: "chart-wrapper" }, tl = 4, nl = /* @__PURE__ */ _o(/* @__PURE_
|
|
|
11863
11985
|
}]),
|
|
11864
11986
|
ref_key: "containerRef",
|
|
11865
11987
|
ref: v,
|
|
11866
|
-
onScrollPassive:
|
|
11867
|
-
onPointerdown:
|
|
11868
|
-
onPointermove:
|
|
11869
|
-
onPointerup:
|
|
11870
|
-
onPointerleave:
|
|
11988
|
+
onScrollPassive: fe,
|
|
11989
|
+
onPointerdown: le,
|
|
11990
|
+
onPointermove: ue,
|
|
11991
|
+
onPointerup: de,
|
|
11992
|
+
onPointerleave: B
|
|
11871
11993
|
}, [s("div", {
|
|
11872
11994
|
class: "scroll-content",
|
|
11873
|
-
style: p({ width:
|
|
11995
|
+
style: p({ width: Oe.value + "px" })
|
|
11874
11996
|
}, [s("div", {
|
|
11875
11997
|
class: "canvas-layer",
|
|
11876
11998
|
ref_key: "canvasLayerRef",
|
|
@@ -11901,14 +12023,14 @@ var el = { class: "chart-wrapper" }, tl = 4, nl = /* @__PURE__ */ _o(/* @__PURE_
|
|
|
11901
12023
|
}, null, 8, ["marker", "pos"])) : a("", !0)
|
|
11902
12024
|
], 512)], 4)], 34), l(ds, {
|
|
11903
12025
|
"active-indicators": V.value,
|
|
11904
|
-
"indicator-params":
|
|
11905
|
-
onToggle:
|
|
11906
|
-
onUpdateParams:
|
|
11907
|
-
onReorderSubIndicators:
|
|
12026
|
+
"indicator-params": pe.value,
|
|
12027
|
+
onToggle: we,
|
|
12028
|
+
onUpdateParams: Ee,
|
|
12029
|
+
onReorderSubIndicators: De
|
|
11908
12030
|
}, null, 8, ["active-indicators", "indicator-params"])]));
|
|
11909
12031
|
}
|
|
11910
|
-
}), [["__scopeId", "data-v-
|
|
11911
|
-
e.component("KLineChart",
|
|
12032
|
+
}), [["__scopeId", "data-v-15fe4683"]]), il = { install(e) {
|
|
12033
|
+
e.component("KLineChart", rl);
|
|
11912
12034
|
} };
|
|
11913
12035
|
//#endregion
|
|
11914
|
-
export { la as ConfigManager, I as EventBus, oa as GLOBAL_PANE_ID, ca as HookSystem,
|
|
12036
|
+
export { la as ConfigManager, I as EventBus, oa as GLOBAL_PANE_ID, ca as HookSystem, rl as KLineChart, il as KMapPlugin, da as PluginHostImpl, sa as PluginRegistry, ia as PluginState, X as RENDERER_PRIORITY, ma as RendererPluginManager, fa as createPluginHost, aa as wrapPaneInfo };
|