@363045841yyt/klinechart 0.2.8 → 0.2.10
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/README.md +4 -0
- package/dist/components/IndicatorSelector.vue.d.ts +2 -5
- package/dist/core/chart.d.ts +0 -2
- package/dist/core/controller/interaction.d.ts +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1111 -1062
- package/dist/klinechart.css +1 -1
- package/package.json +1 -1
- package/dist/core/renderers/globalBorders.d.ts +0 -13
package/dist/index.js
CHANGED
|
@@ -7,16 +7,16 @@ var T = Object.create, E = Object.defineProperty, D = Object.getOwnPropertyDescr
|
|
|
7
7
|
enumerable: !0
|
|
8
8
|
});
|
|
9
9
|
return t || E(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
10
|
-
},
|
|
10
|
+
}, ee = (e, t, n, r) => {
|
|
11
11
|
if (t && typeof t == "object" || typeof t == "function") for (var i = O(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !A.call(e, s) && s !== n && E(e, s, {
|
|
12
12
|
get: ((e) => t[e]).bind(null, s),
|
|
13
13
|
enumerable: !(r = D(t, s)) || r.enumerable
|
|
14
14
|
});
|
|
15
15
|
return e;
|
|
16
|
-
},
|
|
16
|
+
}, te = (e, t, n) => (n = e == null ? {} : T(k(e)), ee(t || !e || !e.__esModule ? E(n, "default", {
|
|
17
17
|
value: e,
|
|
18
18
|
enumerable: !0
|
|
19
|
-
}) : n, e)),
|
|
19
|
+
}) : n, e)), P = (e) => A.call(e, "module.exports") ? e["module.exports"] : ee(E({}, "__esModule", { value: !0 }), e), F = class {
|
|
20
20
|
listeners = /* @__PURE__ */ new Map();
|
|
21
21
|
on(e, t) {
|
|
22
22
|
this.listeners.has(e) || this.listeners.set(e, /* @__PURE__ */ new Set()), this.listeners.get(e).add(t);
|
|
@@ -50,79 +50,79 @@ var T = Object.create, E = Object.defineProperty, D = Object.getOwnPropertyDescr
|
|
|
50
50
|
};
|
|
51
51
|
//#endregion
|
|
52
52
|
//#region node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/bind.js
|
|
53
|
-
function
|
|
53
|
+
function ne(e, t) {
|
|
54
54
|
return function() {
|
|
55
55
|
return e.apply(t, arguments);
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
58
|
//#endregion
|
|
59
59
|
//#region node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/utils.js
|
|
60
|
-
var { toString:
|
|
61
|
-
let n =
|
|
60
|
+
var { toString: re } = Object.prototype, { getPrototypeOf: ie } = Object, { iterator: ae, toStringTag: I } = Symbol, oe = ((e) => (t) => {
|
|
61
|
+
let n = re.call(t);
|
|
62
62
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
63
|
-
})(Object.create(null)),
|
|
64
|
-
function
|
|
65
|
-
return e !== null && !
|
|
63
|
+
})(Object.create(null)), L = (e) => (e = e.toLowerCase(), (t) => oe(t) === e), se = (e) => (t) => typeof t === e, { isArray: ce } = Array, le = se("undefined");
|
|
64
|
+
function ue(e) {
|
|
65
|
+
return e !== null && !le(e) && e.constructor !== null && !le(e.constructor) && B(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
66
66
|
}
|
|
67
|
-
var
|
|
68
|
-
function
|
|
67
|
+
var R = L("ArrayBuffer");
|
|
68
|
+
function de(e) {
|
|
69
69
|
let t;
|
|
70
|
-
return t = typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(e) : e && e.buffer &&
|
|
70
|
+
return t = typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(e) : e && e.buffer && R(e.buffer), t;
|
|
71
71
|
}
|
|
72
|
-
var
|
|
73
|
-
if (
|
|
72
|
+
var z = se("string"), B = se("function"), fe = se("number"), pe = (e) => typeof e == "object" && !!e, me = (e) => e === !0 || e === !1, he = (e) => {
|
|
73
|
+
if (oe(e) !== "object") return !1;
|
|
74
74
|
let t = ie(e);
|
|
75
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
76
|
-
},
|
|
77
|
-
if (!
|
|
75
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(I in e) && !(ae in e);
|
|
76
|
+
}, ge = (e) => {
|
|
77
|
+
if (!pe(e) || ue(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
|
+
}, _e = L("Date"), ve = L("File"), ye = (e) => !!(e && e.uri !== void 0), be = (e) => e && e.getParts !== void 0, xe = L("Blob"), Se = L("FileList"), Ce = (e) => pe(e) && B(e.pipe);
|
|
84
|
+
function we() {
|
|
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 Te = we(), Ee = Te.FormData === void 0 ? void 0 : Te.FormData, De = (e) => {
|
|
88
88
|
let t;
|
|
89
|
-
return e && (
|
|
90
|
-
},
|
|
89
|
+
return e && (Ee && e instanceof Ee || B(e.append) && ((t = oe(e)) === "formdata" || t === "object" && B(e.toString) && e.toString() === "[object FormData]"));
|
|
90
|
+
}, Oe = L("URLSearchParams"), [ke, Ae, je, Me] = [
|
|
91
91
|
"ReadableStream",
|
|
92
92
|
"Request",
|
|
93
93
|
"Response",
|
|
94
94
|
"Headers"
|
|
95
|
-
].map(
|
|
96
|
-
function
|
|
95
|
+
].map(L), Ne = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
96
|
+
function Pe(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
97
97
|
if (e == null) return;
|
|
98
98
|
let r, i;
|
|
99
|
-
if (typeof e != "object" && (e = [e]),
|
|
99
|
+
if (typeof e != "object" && (e = [e]), ce(e)) for (r = 0, i = e.length; r < i; r++) t.call(null, e[r], r, e);
|
|
100
100
|
else {
|
|
101
|
-
if (
|
|
101
|
+
if (ue(e)) return;
|
|
102
102
|
let i = n ? Object.getOwnPropertyNames(e) : Object.keys(e), a = i.length, o;
|
|
103
103
|
for (r = 0; r < a; r++) o = i[r], t.call(null, e[o], o, e);
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
function
|
|
107
|
-
if (
|
|
106
|
+
function Fe(e, t) {
|
|
107
|
+
if (ue(e)) return null;
|
|
108
108
|
t = t.toLowerCase();
|
|
109
109
|
let n = Object.keys(e), r = n.length, i;
|
|
110
110
|
for (; r-- > 0;) if (i = n[r], t === i.toLowerCase()) return i;
|
|
111
111
|
return null;
|
|
112
112
|
}
|
|
113
|
-
var
|
|
114
|
-
function
|
|
115
|
-
let { caseless: e, skipUndefined: t } =
|
|
113
|
+
var Ie = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Le = (e) => !le(e) && e !== Ie;
|
|
114
|
+
function Re() {
|
|
115
|
+
let { caseless: e, skipUndefined: t } = Le(this) && this || {}, n = {}, r = (r, i) => {
|
|
116
116
|
if (i === "__proto__" || i === "constructor" || i === "prototype") return;
|
|
117
|
-
let a = e &&
|
|
118
|
-
|
|
117
|
+
let a = e && Fe(n, i) || i;
|
|
118
|
+
he(n[a]) && he(r) ? n[a] = Re(n[a], r) : he(r) ? n[a] = Re({}, r) : ce(r) ? n[a] = r.slice() : (!t || !le(r)) && (n[a] = r);
|
|
119
119
|
};
|
|
120
|
-
for (let e = 0, t = arguments.length; e < t; e++) arguments[e] &&
|
|
120
|
+
for (let e = 0, t = arguments.length; e < t; e++) arguments[e] && Pe(arguments[e], r);
|
|
121
121
|
return n;
|
|
122
122
|
}
|
|
123
|
-
var
|
|
124
|
-
n &&
|
|
125
|
-
value:
|
|
123
|
+
var ze = (e, t, n, { allOwnKeys: r } = {}) => (Pe(t, (t, r) => {
|
|
124
|
+
n && B(t) ? Object.defineProperty(e, r, {
|
|
125
|
+
value: ne(t, n),
|
|
126
126
|
writable: !0,
|
|
127
127
|
enumerable: !0,
|
|
128
128
|
configurable: !0
|
|
@@ -132,14 +132,14 @@ var Be = (e, t, n, { allOwnKeys: r } = {}) => (Fe(t, (t, r) => {
|
|
|
132
132
|
enumerable: !0,
|
|
133
133
|
configurable: !0
|
|
134
134
|
});
|
|
135
|
-
}, { allOwnKeys: r }), e),
|
|
135
|
+
}, { allOwnKeys: r }), e), Be = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Ve = (e, t, n, r) => {
|
|
136
136
|
e.prototype = Object.create(t.prototype, r), Object.defineProperty(e.prototype, "constructor", {
|
|
137
137
|
value: e,
|
|
138
138
|
writable: !0,
|
|
139
139
|
enumerable: !1,
|
|
140
140
|
configurable: !0
|
|
141
141
|
}), Object.defineProperty(e, "super", { value: t.prototype }), n && Object.assign(e.prototype, n);
|
|
142
|
-
},
|
|
142
|
+
}, He = (e, t, n, r) => {
|
|
143
143
|
let i, a, o, s = {};
|
|
144
144
|
if (t ||= {}, e == null) return t;
|
|
145
145
|
do {
|
|
@@ -147,45 +147,45 @@ var Be = (e, t, n, { allOwnKeys: r } = {}) => (Fe(t, (t, r) => {
|
|
|
147
147
|
e = n !== !1 && ie(e);
|
|
148
148
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
149
149
|
return t;
|
|
150
|
-
},
|
|
150
|
+
}, Ue = (e, t, n) => {
|
|
151
151
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
152
152
|
let r = e.indexOf(t, n);
|
|
153
153
|
return r !== -1 && r === n;
|
|
154
|
-
},
|
|
154
|
+
}, We = (e) => {
|
|
155
155
|
if (!e) return null;
|
|
156
|
-
if (
|
|
156
|
+
if (ce(e)) return e;
|
|
157
157
|
let t = e.length;
|
|
158
|
-
if (!
|
|
158
|
+
if (!fe(t)) return null;
|
|
159
159
|
let n = Array(t);
|
|
160
160
|
for (; t-- > 0;) n[t] = e[t];
|
|
161
161
|
return n;
|
|
162
|
-
},
|
|
162
|
+
}, Ge = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && ie(Uint8Array)), Ke = (e, t) => {
|
|
163
163
|
let n = (e && e[ae]).call(e), r;
|
|
164
164
|
for (; (r = n.next()) && !r.done;) {
|
|
165
165
|
let n = r.value;
|
|
166
166
|
t.call(e, n[0], n[1]);
|
|
167
167
|
}
|
|
168
|
-
},
|
|
168
|
+
}, qe = (e, t) => {
|
|
169
169
|
let n, r = [];
|
|
170
170
|
for (; (n = e.exec(t)) !== null;) r.push(n);
|
|
171
171
|
return r;
|
|
172
|
-
},
|
|
172
|
+
}, Je = L("HTMLFormElement"), Ye = (e) => e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(e, t, n) {
|
|
173
173
|
return t.toUpperCase() + n;
|
|
174
|
-
}),
|
|
174
|
+
}), Xe = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Ze = L("RegExp"), Qe = (e, t) => {
|
|
175
175
|
let n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
176
|
-
|
|
176
|
+
Pe(n, (n, i) => {
|
|
177
177
|
let a;
|
|
178
178
|
(a = t(n, i, e)) !== !1 && (r[i] = a || n);
|
|
179
179
|
}), Object.defineProperties(e, r);
|
|
180
|
-
},
|
|
181
|
-
|
|
182
|
-
if (
|
|
180
|
+
}, $e = (e) => {
|
|
181
|
+
Qe(e, (t, n) => {
|
|
182
|
+
if (B(e) && [
|
|
183
183
|
"arguments",
|
|
184
184
|
"caller",
|
|
185
185
|
"callee"
|
|
186
186
|
].indexOf(n) !== -1) return !1;
|
|
187
187
|
let r = e[n];
|
|
188
|
-
if (
|
|
188
|
+
if (B(r)) {
|
|
189
189
|
if (t.enumerable = !1, "writable" in t) {
|
|
190
190
|
t.writable = !1;
|
|
191
191
|
return;
|
|
@@ -195,99 +195,99 @@ var Be = (e, t, n, { allOwnKeys: r } = {}) => (Fe(t, (t, r) => {
|
|
|
195
195
|
};
|
|
196
196
|
}
|
|
197
197
|
});
|
|
198
|
-
},
|
|
198
|
+
}, et = (e, t) => {
|
|
199
199
|
let n = {}, r = (e) => {
|
|
200
200
|
e.forEach((e) => {
|
|
201
201
|
n[e] = !0;
|
|
202
202
|
});
|
|
203
203
|
};
|
|
204
|
-
return
|
|
205
|
-
},
|
|
206
|
-
function
|
|
207
|
-
return !!(e &&
|
|
204
|
+
return ce(e) ? r(e) : r(String(e).split(t)), n;
|
|
205
|
+
}, tt = () => {}, nt = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
206
|
+
function rt(e) {
|
|
207
|
+
return !!(e && B(e.append) && e[I] === "FormData" && e[ae]);
|
|
208
208
|
}
|
|
209
|
-
var
|
|
209
|
+
var it = (e) => {
|
|
210
210
|
let t = Array(10), n = (e, r) => {
|
|
211
|
-
if (
|
|
211
|
+
if (pe(e)) {
|
|
212
212
|
if (t.indexOf(e) >= 0) return;
|
|
213
|
-
if (
|
|
213
|
+
if (ue(e)) return e;
|
|
214
214
|
if (!("toJSON" in e)) {
|
|
215
215
|
t[r] = e;
|
|
216
|
-
let i =
|
|
217
|
-
return
|
|
216
|
+
let i = ce(e) ? [] : {};
|
|
217
|
+
return Pe(e, (e, t) => {
|
|
218
218
|
let a = n(e, r + 1);
|
|
219
|
-
!
|
|
219
|
+
!le(a) && (i[t] = a);
|
|
220
220
|
}), t[r] = void 0, i;
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
return e;
|
|
224
224
|
};
|
|
225
225
|
return n(e, 0);
|
|
226
|
-
},
|
|
227
|
-
n ===
|
|
226
|
+
}, at = L("AsyncFunction"), ot = (e) => e && (pe(e) || B(e)) && B(e.then) && B(e.catch), st = ((e, t) => e ? setImmediate : t ? ((e, t) => (Ie.addEventListener("message", ({ source: n, data: r }) => {
|
|
227
|
+
n === Ie && r === e && t.length && t.shift()();
|
|
228
228
|
}, !1), (n) => {
|
|
229
|
-
t.push(n),
|
|
230
|
-
}))(`axios@${Math.random()}`, []) : (e) => setTimeout(e))(typeof setImmediate == "function",
|
|
231
|
-
isArray:
|
|
232
|
-
isArrayBuffer:
|
|
233
|
-
isBuffer:
|
|
234
|
-
isFormData:
|
|
235
|
-
isArrayBufferView:
|
|
236
|
-
isString:
|
|
237
|
-
isNumber:
|
|
238
|
-
isBoolean:
|
|
239
|
-
isObject:
|
|
240
|
-
isPlainObject:
|
|
241
|
-
isEmptyObject:
|
|
242
|
-
isReadableStream:
|
|
243
|
-
isRequest:
|
|
244
|
-
isResponse:
|
|
245
|
-
isHeaders:
|
|
246
|
-
isUndefined:
|
|
247
|
-
isDate:
|
|
248
|
-
isFile:
|
|
249
|
-
isReactNativeBlob:
|
|
250
|
-
isReactNative:
|
|
251
|
-
isBlob:
|
|
252
|
-
isRegExp:
|
|
253
|
-
isFunction:
|
|
254
|
-
isStream:
|
|
255
|
-
isURLSearchParams:
|
|
256
|
-
isTypedArray:
|
|
257
|
-
isFileList:
|
|
258
|
-
forEach:
|
|
259
|
-
merge:
|
|
260
|
-
extend:
|
|
261
|
-
trim:
|
|
262
|
-
stripBOM:
|
|
263
|
-
inherits:
|
|
264
|
-
toFlatObject:
|
|
265
|
-
kindOf:
|
|
266
|
-
kindOfTest:
|
|
267
|
-
endsWith:
|
|
268
|
-
toArray:
|
|
269
|
-
forEachEntry:
|
|
270
|
-
matchAll:
|
|
271
|
-
isHTMLForm:
|
|
272
|
-
hasOwnProperty:
|
|
273
|
-
hasOwnProp:
|
|
274
|
-
reduceDescriptors:
|
|
275
|
-
freezeMethods:
|
|
276
|
-
toObjectSet:
|
|
277
|
-
toCamelCase:
|
|
278
|
-
noop:
|
|
279
|
-
toFiniteNumber:
|
|
280
|
-
findKey:
|
|
281
|
-
global:
|
|
282
|
-
isContextDefined:
|
|
283
|
-
isSpecCompliantForm:
|
|
284
|
-
toJSONObject:
|
|
285
|
-
isAsyncFn:
|
|
286
|
-
isThenable:
|
|
287
|
-
setImmediate:
|
|
288
|
-
asap: typeof queueMicrotask < "u" ? queueMicrotask.bind(
|
|
289
|
-
isIterable: (e) => e != null &&
|
|
290
|
-
},
|
|
229
|
+
t.push(n), Ie.postMessage(e, "*");
|
|
230
|
+
}))(`axios@${Math.random()}`, []) : (e) => setTimeout(e))(typeof setImmediate == "function", B(Ie.postMessage)), V = {
|
|
231
|
+
isArray: ce,
|
|
232
|
+
isArrayBuffer: R,
|
|
233
|
+
isBuffer: ue,
|
|
234
|
+
isFormData: De,
|
|
235
|
+
isArrayBufferView: de,
|
|
236
|
+
isString: z,
|
|
237
|
+
isNumber: fe,
|
|
238
|
+
isBoolean: me,
|
|
239
|
+
isObject: pe,
|
|
240
|
+
isPlainObject: he,
|
|
241
|
+
isEmptyObject: ge,
|
|
242
|
+
isReadableStream: ke,
|
|
243
|
+
isRequest: Ae,
|
|
244
|
+
isResponse: je,
|
|
245
|
+
isHeaders: Me,
|
|
246
|
+
isUndefined: le,
|
|
247
|
+
isDate: _e,
|
|
248
|
+
isFile: ve,
|
|
249
|
+
isReactNativeBlob: ye,
|
|
250
|
+
isReactNative: be,
|
|
251
|
+
isBlob: xe,
|
|
252
|
+
isRegExp: Ze,
|
|
253
|
+
isFunction: B,
|
|
254
|
+
isStream: Ce,
|
|
255
|
+
isURLSearchParams: Oe,
|
|
256
|
+
isTypedArray: Ge,
|
|
257
|
+
isFileList: Se,
|
|
258
|
+
forEach: Pe,
|
|
259
|
+
merge: Re,
|
|
260
|
+
extend: ze,
|
|
261
|
+
trim: Ne,
|
|
262
|
+
stripBOM: Be,
|
|
263
|
+
inherits: Ve,
|
|
264
|
+
toFlatObject: He,
|
|
265
|
+
kindOf: oe,
|
|
266
|
+
kindOfTest: L,
|
|
267
|
+
endsWith: Ue,
|
|
268
|
+
toArray: We,
|
|
269
|
+
forEachEntry: Ke,
|
|
270
|
+
matchAll: qe,
|
|
271
|
+
isHTMLForm: Je,
|
|
272
|
+
hasOwnProperty: Xe,
|
|
273
|
+
hasOwnProp: Xe,
|
|
274
|
+
reduceDescriptors: Qe,
|
|
275
|
+
freezeMethods: $e,
|
|
276
|
+
toObjectSet: et,
|
|
277
|
+
toCamelCase: Ye,
|
|
278
|
+
noop: tt,
|
|
279
|
+
toFiniteNumber: nt,
|
|
280
|
+
findKey: Fe,
|
|
281
|
+
global: Ie,
|
|
282
|
+
isContextDefined: Le,
|
|
283
|
+
isSpecCompliantForm: rt,
|
|
284
|
+
toJSONObject: it,
|
|
285
|
+
isAsyncFn: at,
|
|
286
|
+
isThenable: ot,
|
|
287
|
+
setImmediate: st,
|
|
288
|
+
asap: typeof queueMicrotask < "u" ? queueMicrotask.bind(Ie) : typeof process < "u" && process.nextTick || st,
|
|
289
|
+
isIterable: (e) => e != null && B(e[ae])
|
|
290
|
+
}, H = class e extends Error {
|
|
291
291
|
static from(t, n, r, i, a, o) {
|
|
292
292
|
let s = new e(t.message, n || t.code, r, i, a);
|
|
293
293
|
return s.cause = t, s.name = t.name, t.status != null && s.status == null && (s.status = t.status), o && Object.assign(s, o), s;
|
|
@@ -310,80 +310,80 @@ var at = (e) => {
|
|
|
310
310
|
lineNumber: this.lineNumber,
|
|
311
311
|
columnNumber: this.columnNumber,
|
|
312
312
|
stack: this.stack,
|
|
313
|
-
config:
|
|
313
|
+
config: V.toJSONObject(this.config),
|
|
314
314
|
code: this.code,
|
|
315
315
|
status: this.status
|
|
316
316
|
};
|
|
317
317
|
}
|
|
318
318
|
};
|
|
319
|
-
|
|
319
|
+
H.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE", H.ERR_BAD_OPTION = "ERR_BAD_OPTION", H.ECONNABORTED = "ECONNABORTED", H.ETIMEDOUT = "ETIMEDOUT", H.ERR_NETWORK = "ERR_NETWORK", H.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS", H.ERR_DEPRECATED = "ERR_DEPRECATED", H.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE", H.ERR_BAD_REQUEST = "ERR_BAD_REQUEST", H.ERR_CANCELED = "ERR_CANCELED", H.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT", H.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
320
320
|
//#endregion
|
|
321
321
|
//#region node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/toFormData.js
|
|
322
|
-
function
|
|
323
|
-
return
|
|
322
|
+
function ct(e) {
|
|
323
|
+
return V.isPlainObject(e) || V.isArray(e);
|
|
324
324
|
}
|
|
325
|
-
function
|
|
326
|
-
return
|
|
325
|
+
function lt(e) {
|
|
326
|
+
return V.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function ut(e, t, n) {
|
|
329
329
|
return e ? e.concat(t).map(function(e, t) {
|
|
330
|
-
return e =
|
|
330
|
+
return e = lt(e), !n && t ? "[" + e + "]" : e;
|
|
331
331
|
}).join(n ? "." : "") : t;
|
|
332
332
|
}
|
|
333
|
-
function
|
|
334
|
-
return
|
|
333
|
+
function dt(e) {
|
|
334
|
+
return V.isArray(e) && !e.some(ct);
|
|
335
335
|
}
|
|
336
|
-
var
|
|
336
|
+
var ft = V.toFlatObject(V, {}, null, function(e) {
|
|
337
337
|
return /^is[A-Z]/.test(e);
|
|
338
338
|
});
|
|
339
|
-
function
|
|
340
|
-
if (!
|
|
341
|
-
t ||= new FormData(), n =
|
|
339
|
+
function pt(e, t, n) {
|
|
340
|
+
if (!V.isObject(e)) throw TypeError("target must be an object");
|
|
341
|
+
t ||= new FormData(), n = V.toFlatObject(n, {
|
|
342
342
|
metaTokens: !0,
|
|
343
343
|
dots: !1,
|
|
344
344
|
indexes: !1
|
|
345
345
|
}, !1, function(e, t) {
|
|
346
|
-
return !
|
|
346
|
+
return !V.isUndefined(t[e]);
|
|
347
347
|
});
|
|
348
|
-
let r = n.metaTokens, i = n.visitor || l, a = n.dots, o = n.indexes, s = (n.Blob || typeof Blob < "u" && Blob) &&
|
|
349
|
-
if (!
|
|
348
|
+
let r = n.metaTokens, i = n.visitor || l, a = n.dots, o = n.indexes, s = (n.Blob || typeof Blob < "u" && Blob) && V.isSpecCompliantForm(t);
|
|
349
|
+
if (!V.isFunction(i)) throw TypeError("visitor must be a function");
|
|
350
350
|
function c(e) {
|
|
351
351
|
if (e === null) return "";
|
|
352
|
-
if (
|
|
353
|
-
if (
|
|
354
|
-
if (!s &&
|
|
355
|
-
return
|
|
352
|
+
if (V.isDate(e)) return e.toISOString();
|
|
353
|
+
if (V.isBoolean(e)) return e.toString();
|
|
354
|
+
if (!s && V.isBlob(e)) throw new H("Blob is not supported. Use a Buffer instead.");
|
|
355
|
+
return V.isArrayBuffer(e) || V.isTypedArray(e) ? s && typeof Blob == "function" ? new Blob([e]) : Buffer.from(e) : e;
|
|
356
356
|
}
|
|
357
357
|
function l(e, n, i) {
|
|
358
358
|
let s = e;
|
|
359
|
-
if (
|
|
359
|
+
if (V.isReactNative(t) && V.isReactNativeBlob(e)) return t.append(ut(i, n, a), c(e)), !1;
|
|
360
360
|
if (e && !i && typeof e == "object") {
|
|
361
|
-
if (
|
|
362
|
-
else if (
|
|
363
|
-
!(
|
|
361
|
+
if (V.endsWith(n, "{}")) n = r ? n : n.slice(0, -2), e = JSON.stringify(e);
|
|
362
|
+
else if (V.isArray(e) && dt(e) || (V.isFileList(e) || V.endsWith(n, "[]")) && (s = V.toArray(e))) return n = lt(n), s.forEach(function(e, r) {
|
|
363
|
+
!(V.isUndefined(e) || e === null) && t.append(o === !0 ? ut([n], r, a) : o === null ? n : n + "[]", c(e));
|
|
364
364
|
}), !1;
|
|
365
365
|
}
|
|
366
|
-
return
|
|
366
|
+
return ct(e) ? !0 : (t.append(ut(i, n, a), c(e)), !1);
|
|
367
367
|
}
|
|
368
|
-
let u = [], d = Object.assign(
|
|
368
|
+
let u = [], d = Object.assign(ft, {
|
|
369
369
|
defaultVisitor: l,
|
|
370
370
|
convertValue: c,
|
|
371
|
-
isVisitable:
|
|
371
|
+
isVisitable: ct
|
|
372
372
|
});
|
|
373
373
|
function f(e, n) {
|
|
374
|
-
if (!
|
|
374
|
+
if (!V.isUndefined(e)) {
|
|
375
375
|
if (u.indexOf(e) !== -1) throw Error("Circular reference detected in " + n.join("."));
|
|
376
|
-
u.push(e),
|
|
377
|
-
(!(
|
|
376
|
+
u.push(e), V.forEach(e, function(e, r) {
|
|
377
|
+
(!(V.isUndefined(e) || e === null) && i.call(t, e, V.isString(r) ? r.trim() : r, n, d)) === !0 && f(e, n ? n.concat(r) : [r]);
|
|
378
378
|
}), u.pop();
|
|
379
379
|
}
|
|
380
380
|
}
|
|
381
|
-
if (!
|
|
381
|
+
if (!V.isObject(e)) throw TypeError("data must be an object");
|
|
382
382
|
return f(e), t;
|
|
383
383
|
}
|
|
384
384
|
//#endregion
|
|
385
385
|
//#region node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/AxiosURLSearchParams.js
|
|
386
|
-
function
|
|
386
|
+
function mt(e) {
|
|
387
387
|
let t = {
|
|
388
388
|
"!": "%21",
|
|
389
389
|
"'": "%27",
|
|
@@ -397,29 +397,29 @@ function ht(e) {
|
|
|
397
397
|
return t[e];
|
|
398
398
|
});
|
|
399
399
|
}
|
|
400
|
-
function
|
|
401
|
-
this._pairs = [], e &&
|
|
400
|
+
function ht(e, t) {
|
|
401
|
+
this._pairs = [], e && pt(e, this, t);
|
|
402
402
|
}
|
|
403
|
-
var
|
|
404
|
-
|
|
403
|
+
var gt = ht.prototype;
|
|
404
|
+
gt.append = function(e, t) {
|
|
405
405
|
this._pairs.push([e, t]);
|
|
406
|
-
},
|
|
406
|
+
}, gt.toString = function(e) {
|
|
407
407
|
let t = e ? function(t) {
|
|
408
|
-
return e.call(this, t,
|
|
409
|
-
} :
|
|
408
|
+
return e.call(this, t, mt);
|
|
409
|
+
} : mt;
|
|
410
410
|
return this._pairs.map(function(e) {
|
|
411
411
|
return t(e[0]) + "=" + t(e[1]);
|
|
412
412
|
}, "").join("&");
|
|
413
413
|
};
|
|
414
414
|
//#endregion
|
|
415
415
|
//#region node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/buildURL.js
|
|
416
|
-
function
|
|
416
|
+
function _t(e) {
|
|
417
417
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
418
418
|
}
|
|
419
|
-
function
|
|
419
|
+
function vt(e, t, n) {
|
|
420
420
|
if (!t) return e;
|
|
421
|
-
let r = n && n.encode ||
|
|
422
|
-
if (o = a ? a(t, i) :
|
|
421
|
+
let r = n && n.encode || _t, i = V.isFunction(n) ? { serialize: n } : n, a = i && i.serialize, o;
|
|
422
|
+
if (o = a ? a(t, i) : V.isURLSearchParams(t) ? t.toString() : new ht(t, i).toString(r), o) {
|
|
423
423
|
let t = e.indexOf("#");
|
|
424
424
|
t !== -1 && (e = e.slice(0, t)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
425
425
|
}
|
|
@@ -427,7 +427,7 @@ function yt(e, t, n) {
|
|
|
427
427
|
}
|
|
428
428
|
//#endregion
|
|
429
429
|
//#region node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/core/InterceptorManager.js
|
|
430
|
-
var
|
|
430
|
+
var yt = class {
|
|
431
431
|
constructor() {
|
|
432
432
|
this.handlers = [];
|
|
433
433
|
}
|
|
@@ -446,19 +446,19 @@ var bt = class {
|
|
|
446
446
|
this.handlers &&= [];
|
|
447
447
|
}
|
|
448
448
|
forEach(e) {
|
|
449
|
-
|
|
449
|
+
V.forEach(this.handlers, function(t) {
|
|
450
450
|
t !== null && e(t);
|
|
451
451
|
});
|
|
452
452
|
}
|
|
453
|
-
},
|
|
453
|
+
}, bt = {
|
|
454
454
|
silentJSONParsing: !0,
|
|
455
455
|
forcedJSONParsing: !0,
|
|
456
456
|
clarifyTimeoutError: !1,
|
|
457
457
|
legacyInterceptorReqResOrdering: !0
|
|
458
|
-
},
|
|
458
|
+
}, xt = {
|
|
459
459
|
isBrowser: !0,
|
|
460
460
|
classes: {
|
|
461
|
-
URLSearchParams: typeof URLSearchParams < "u" ? URLSearchParams :
|
|
461
|
+
URLSearchParams: typeof URLSearchParams < "u" ? URLSearchParams : ht,
|
|
462
462
|
FormData: typeof FormData < "u" ? FormData : null,
|
|
463
463
|
Blob: typeof Blob < "u" ? Blob : null
|
|
464
464
|
},
|
|
@@ -470,97 +470,97 @@ var bt = class {
|
|
|
470
470
|
"url",
|
|
471
471
|
"data"
|
|
472
472
|
]
|
|
473
|
-
},
|
|
474
|
-
hasBrowserEnv: () =>
|
|
475
|
-
hasStandardBrowserEnv: () =>
|
|
476
|
-
hasStandardBrowserWebWorkerEnv: () =>
|
|
477
|
-
navigator: () =>
|
|
478
|
-
origin: () =>
|
|
479
|
-
}),
|
|
473
|
+
}, St = /* @__PURE__ */ N({
|
|
474
|
+
hasBrowserEnv: () => Ct,
|
|
475
|
+
hasStandardBrowserEnv: () => Tt,
|
|
476
|
+
hasStandardBrowserWebWorkerEnv: () => Et,
|
|
477
|
+
navigator: () => wt,
|
|
478
|
+
origin: () => Dt
|
|
479
|
+
}), Ct = typeof window < "u" && typeof document < "u", wt = typeof navigator == "object" && navigator || void 0, Tt = Ct && (!wt || [
|
|
480
480
|
"ReactNative",
|
|
481
481
|
"NativeScript",
|
|
482
482
|
"NS"
|
|
483
|
-
].indexOf(
|
|
484
|
-
...
|
|
485
|
-
...
|
|
483
|
+
].indexOf(wt.product) < 0), Et = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Dt = Ct && window.location.href || "http://localhost", U = {
|
|
484
|
+
...St,
|
|
485
|
+
...xt
|
|
486
486
|
};
|
|
487
487
|
//#endregion
|
|
488
488
|
//#region node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/toURLEncodedForm.js
|
|
489
|
-
function
|
|
490
|
-
return
|
|
489
|
+
function Ot(e, t) {
|
|
490
|
+
return pt(e, new U.classes.URLSearchParams(), {
|
|
491
491
|
visitor: function(e, t, n, r) {
|
|
492
|
-
return
|
|
492
|
+
return U.isNode && V.isBuffer(e) ? (this.append(t, e.toString("base64")), !1) : r.defaultVisitor.apply(this, arguments);
|
|
493
493
|
},
|
|
494
494
|
...t
|
|
495
495
|
});
|
|
496
496
|
}
|
|
497
497
|
//#endregion
|
|
498
498
|
//#region node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/formDataToJSON.js
|
|
499
|
-
function
|
|
500
|
-
return
|
|
499
|
+
function kt(e) {
|
|
500
|
+
return V.matchAll(/\w+|\[(\w*)]/g, e).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
501
501
|
}
|
|
502
|
-
function
|
|
502
|
+
function At(e) {
|
|
503
503
|
let t = {}, n = Object.keys(e), r, i = n.length, a;
|
|
504
504
|
for (r = 0; r < i; r++) a = n[r], t[a] = e[a];
|
|
505
505
|
return t;
|
|
506
506
|
}
|
|
507
|
-
function
|
|
507
|
+
function jt(e) {
|
|
508
508
|
function t(e, n, r, i) {
|
|
509
509
|
let a = e[i++];
|
|
510
510
|
if (a === "__proto__") return !0;
|
|
511
511
|
let o = Number.isFinite(+a), s = i >= e.length;
|
|
512
|
-
return a = !a &&
|
|
512
|
+
return a = !a && V.isArray(r) ? r.length : a, s ? (V.hasOwnProp(r, a) ? r[a] = [r[a], n] : r[a] = n, !o) : ((!r[a] || !V.isObject(r[a])) && (r[a] = []), t(e, n, r[a], i) && V.isArray(r[a]) && (r[a] = At(r[a])), !o);
|
|
513
513
|
}
|
|
514
|
-
if (
|
|
514
|
+
if (V.isFormData(e) && V.isFunction(e.entries)) {
|
|
515
515
|
let n = {};
|
|
516
|
-
return
|
|
517
|
-
t(
|
|
516
|
+
return V.forEachEntry(e, (e, r) => {
|
|
517
|
+
t(kt(e), r, n, 0);
|
|
518
518
|
}), n;
|
|
519
519
|
}
|
|
520
520
|
return null;
|
|
521
521
|
}
|
|
522
522
|
//#endregion
|
|
523
523
|
//#region node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/defaults/index.js
|
|
524
|
-
function
|
|
525
|
-
if (
|
|
526
|
-
return (t || JSON.parse)(e),
|
|
524
|
+
function Mt(e, t, n) {
|
|
525
|
+
if (V.isString(e)) try {
|
|
526
|
+
return (t || JSON.parse)(e), V.trim(e);
|
|
527
527
|
} catch (e) {
|
|
528
528
|
if (e.name !== "SyntaxError") throw e;
|
|
529
529
|
}
|
|
530
530
|
return (n || JSON.stringify)(e);
|
|
531
531
|
}
|
|
532
|
-
var
|
|
533
|
-
transitional:
|
|
532
|
+
var Nt = {
|
|
533
|
+
transitional: bt,
|
|
534
534
|
adapter: [
|
|
535
535
|
"xhr",
|
|
536
536
|
"http",
|
|
537
537
|
"fetch"
|
|
538
538
|
],
|
|
539
539
|
transformRequest: [function(e, t) {
|
|
540
|
-
let n = t.getContentType() || "", r = n.indexOf("application/json") > -1, i =
|
|
541
|
-
if (i &&
|
|
542
|
-
if (
|
|
543
|
-
if (
|
|
544
|
-
if (
|
|
540
|
+
let n = t.getContentType() || "", r = n.indexOf("application/json") > -1, i = V.isObject(e);
|
|
541
|
+
if (i && V.isHTMLForm(e) && (e = new FormData(e)), V.isFormData(e)) return r ? JSON.stringify(jt(e)) : e;
|
|
542
|
+
if (V.isArrayBuffer(e) || V.isBuffer(e) || V.isStream(e) || V.isFile(e) || V.isBlob(e) || V.isReadableStream(e)) return e;
|
|
543
|
+
if (V.isArrayBufferView(e)) return e.buffer;
|
|
544
|
+
if (V.isURLSearchParams(e)) return t.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
|
|
545
545
|
let a;
|
|
546
546
|
if (i) {
|
|
547
|
-
if (n.indexOf("application/x-www-form-urlencoded") > -1) return
|
|
548
|
-
if ((a =
|
|
547
|
+
if (n.indexOf("application/x-www-form-urlencoded") > -1) return Ot(e, this.formSerializer).toString();
|
|
548
|
+
if ((a = V.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
|
|
549
549
|
let t = this.env && this.env.FormData;
|
|
550
|
-
return
|
|
550
|
+
return pt(a ? { "files[]": e } : e, t && new t(), this.formSerializer);
|
|
551
551
|
}
|
|
552
552
|
}
|
|
553
|
-
return i || r ? (t.setContentType("application/json", !1),
|
|
553
|
+
return i || r ? (t.setContentType("application/json", !1), Mt(e)) : e;
|
|
554
554
|
}],
|
|
555
555
|
transformResponse: [function(e) {
|
|
556
|
-
let t = this.transitional ||
|
|
557
|
-
if (
|
|
558
|
-
if (e &&
|
|
556
|
+
let t = this.transitional || Nt.transitional, n = t && t.forcedJSONParsing, r = this.responseType === "json";
|
|
557
|
+
if (V.isResponse(e) || V.isReadableStream(e)) return e;
|
|
558
|
+
if (e && V.isString(e) && (n && !this.responseType || r)) {
|
|
559
559
|
let n = !(t && t.silentJSONParsing) && r;
|
|
560
560
|
try {
|
|
561
561
|
return JSON.parse(e, this.parseReviver);
|
|
562
562
|
} catch (e) {
|
|
563
|
-
if (n) throw e.name === "SyntaxError" ?
|
|
563
|
+
if (n) throw e.name === "SyntaxError" ? H.from(e, H.ERR_BAD_RESPONSE, this, null, this.response) : e;
|
|
564
564
|
}
|
|
565
565
|
}
|
|
566
566
|
return e;
|
|
@@ -571,8 +571,8 @@ var Pt = {
|
|
|
571
571
|
maxContentLength: -1,
|
|
572
572
|
maxBodyLength: -1,
|
|
573
573
|
env: {
|
|
574
|
-
FormData:
|
|
575
|
-
Blob:
|
|
574
|
+
FormData: U.classes.FormData,
|
|
575
|
+
Blob: U.classes.Blob
|
|
576
576
|
},
|
|
577
577
|
validateStatus: function(e) {
|
|
578
578
|
return e >= 200 && e < 300;
|
|
@@ -582,7 +582,7 @@ var Pt = {
|
|
|
582
582
|
"Content-Type": void 0
|
|
583
583
|
} }
|
|
584
584
|
};
|
|
585
|
-
|
|
585
|
+
V.forEach([
|
|
586
586
|
"delete",
|
|
587
587
|
"get",
|
|
588
588
|
"head",
|
|
@@ -590,11 +590,11 @@ B.forEach([
|
|
|
590
590
|
"put",
|
|
591
591
|
"patch"
|
|
592
592
|
], (e) => {
|
|
593
|
-
|
|
593
|
+
Nt.headers[e] = {};
|
|
594
594
|
});
|
|
595
595
|
//#endregion
|
|
596
596
|
//#region node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/parseHeaders.js
|
|
597
|
-
var
|
|
597
|
+
var Pt = V.toObjectSet([
|
|
598
598
|
"age",
|
|
599
599
|
"authorization",
|
|
600
600
|
"content-length",
|
|
@@ -612,25 +612,25 @@ var Ft = B.toObjectSet([
|
|
|
612
612
|
"referer",
|
|
613
613
|
"retry-after",
|
|
614
614
|
"user-agent"
|
|
615
|
-
]),
|
|
615
|
+
]), Ft = (e) => {
|
|
616
616
|
let t = {}, n, r, i;
|
|
617
617
|
return e && e.split("\n").forEach(function(e) {
|
|
618
|
-
i = e.indexOf(":"), n = e.substring(0, i).trim().toLowerCase(), r = e.substring(i + 1).trim(), !(!n || t[n] &&
|
|
618
|
+
i = e.indexOf(":"), n = e.substring(0, i).trim().toLowerCase(), r = e.substring(i + 1).trim(), !(!n || t[n] && Pt[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
619
619
|
}), t;
|
|
620
|
-
},
|
|
621
|
-
function
|
|
620
|
+
}, It = Symbol("internals"), Lt = (e) => !/[\r\n]/.test(e);
|
|
621
|
+
function Rt(e, t) {
|
|
622
622
|
if (!(e === !1 || e == null)) {
|
|
623
|
-
if (
|
|
624
|
-
e.forEach((e) =>
|
|
623
|
+
if (V.isArray(e)) {
|
|
624
|
+
e.forEach((e) => Rt(e, t));
|
|
625
625
|
return;
|
|
626
626
|
}
|
|
627
|
-
if (!
|
|
627
|
+
if (!Lt(String(e))) throw Error(`Invalid character in header content ["${t}"]`);
|
|
628
628
|
}
|
|
629
629
|
}
|
|
630
|
-
function
|
|
630
|
+
function zt(e) {
|
|
631
631
|
return e && String(e).trim().toLowerCase();
|
|
632
632
|
}
|
|
633
|
-
function
|
|
633
|
+
function Bt(e) {
|
|
634
634
|
let t = e.length;
|
|
635
635
|
for (; t > 0;) {
|
|
636
636
|
let n = e.charCodeAt(t - 1);
|
|
@@ -639,27 +639,27 @@ function Vt(e) {
|
|
|
639
639
|
}
|
|
640
640
|
return t === e.length ? e : e.slice(0, t);
|
|
641
641
|
}
|
|
642
|
-
function
|
|
643
|
-
return e === !1 || e == null ? e :
|
|
642
|
+
function Vt(e) {
|
|
643
|
+
return e === !1 || e == null ? e : V.isArray(e) ? e.map(Vt) : Bt(String(e));
|
|
644
644
|
}
|
|
645
|
-
function
|
|
645
|
+
function Ht(e) {
|
|
646
646
|
let t = Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g, r;
|
|
647
647
|
for (; r = n.exec(e);) t[r[1]] = r[2];
|
|
648
648
|
return t;
|
|
649
649
|
}
|
|
650
|
-
var
|
|
651
|
-
function
|
|
652
|
-
if (
|
|
653
|
-
if (i && (t = n),
|
|
654
|
-
if (
|
|
655
|
-
if (
|
|
650
|
+
var Ut = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
651
|
+
function Wt(e, t, n, r, i) {
|
|
652
|
+
if (V.isFunction(r)) return r.call(this, t, n);
|
|
653
|
+
if (i && (t = n), V.isString(t)) {
|
|
654
|
+
if (V.isString(r)) return t.indexOf(r) !== -1;
|
|
655
|
+
if (V.isRegExp(r)) return r.test(t);
|
|
656
656
|
}
|
|
657
657
|
}
|
|
658
|
-
function
|
|
658
|
+
function Gt(e) {
|
|
659
659
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, t, n) => t.toUpperCase() + n);
|
|
660
660
|
}
|
|
661
|
-
function
|
|
662
|
-
let n =
|
|
661
|
+
function Kt(e, t) {
|
|
662
|
+
let n = V.toCamelCase(" " + t);
|
|
663
663
|
[
|
|
664
664
|
"get",
|
|
665
665
|
"set",
|
|
@@ -673,79 +673,79 @@ function qt(e, t) {
|
|
|
673
673
|
});
|
|
674
674
|
});
|
|
675
675
|
}
|
|
676
|
-
var
|
|
676
|
+
var W = class {
|
|
677
677
|
constructor(e) {
|
|
678
678
|
e && this.set(e);
|
|
679
679
|
}
|
|
680
680
|
set(e, t, n) {
|
|
681
681
|
let r = this;
|
|
682
682
|
function i(e, t, n) {
|
|
683
|
-
let i =
|
|
683
|
+
let i = zt(t);
|
|
684
684
|
if (!i) throw Error("header name must be a non-empty string");
|
|
685
|
-
let a =
|
|
686
|
-
(!a || r[a] === void 0 || n === !0 || n === void 0 && r[a] !== !1) && (
|
|
685
|
+
let a = V.findKey(r, i);
|
|
686
|
+
(!a || r[a] === void 0 || n === !0 || n === void 0 && r[a] !== !1) && (Rt(e, t), r[a || t] = Vt(e));
|
|
687
687
|
}
|
|
688
|
-
let a = (e, t) =>
|
|
689
|
-
if (
|
|
690
|
-
else if (
|
|
691
|
-
else if (
|
|
688
|
+
let a = (e, t) => V.forEach(e, (e, n) => i(e, n, t));
|
|
689
|
+
if (V.isPlainObject(e) || e instanceof this.constructor) a(e, t);
|
|
690
|
+
else if (V.isString(e) && (e = e.trim()) && !Ut(e)) a(Ft(e), t);
|
|
691
|
+
else if (V.isObject(e) && V.isIterable(e)) {
|
|
692
692
|
let n = {}, r, i;
|
|
693
693
|
for (let t of e) {
|
|
694
|
-
if (!
|
|
695
|
-
n[i = t[0]] = (r = n[i]) ?
|
|
694
|
+
if (!V.isArray(t)) throw TypeError("Object iterator must return a key-value pair");
|
|
695
|
+
n[i = t[0]] = (r = n[i]) ? V.isArray(r) ? [...r, t[1]] : [r, t[1]] : t[1];
|
|
696
696
|
}
|
|
697
697
|
a(n, t);
|
|
698
698
|
} else e != null && i(t, e, n);
|
|
699
699
|
return this;
|
|
700
700
|
}
|
|
701
701
|
get(e, t) {
|
|
702
|
-
if (e =
|
|
703
|
-
let n =
|
|
702
|
+
if (e = zt(e), e) {
|
|
703
|
+
let n = V.findKey(this, e);
|
|
704
704
|
if (n) {
|
|
705
705
|
let e = this[n];
|
|
706
706
|
if (!t) return e;
|
|
707
|
-
if (t === !0) return
|
|
708
|
-
if (
|
|
709
|
-
if (
|
|
707
|
+
if (t === !0) return Ht(e);
|
|
708
|
+
if (V.isFunction(t)) return t.call(this, e, n);
|
|
709
|
+
if (V.isRegExp(t)) return t.exec(e);
|
|
710
710
|
throw TypeError("parser must be boolean|regexp|function");
|
|
711
711
|
}
|
|
712
712
|
}
|
|
713
713
|
}
|
|
714
714
|
has(e, t) {
|
|
715
|
-
if (e =
|
|
716
|
-
let n =
|
|
717
|
-
return !!(n && this[n] !== void 0 && (!t ||
|
|
715
|
+
if (e = zt(e), e) {
|
|
716
|
+
let n = V.findKey(this, e);
|
|
717
|
+
return !!(n && this[n] !== void 0 && (!t || Wt(this, this[n], n, t)));
|
|
718
718
|
}
|
|
719
719
|
return !1;
|
|
720
720
|
}
|
|
721
721
|
delete(e, t) {
|
|
722
722
|
let n = this, r = !1;
|
|
723
723
|
function i(e) {
|
|
724
|
-
if (e =
|
|
725
|
-
let i =
|
|
726
|
-
i && (!t ||
|
|
724
|
+
if (e = zt(e), e) {
|
|
725
|
+
let i = V.findKey(n, e);
|
|
726
|
+
i && (!t || Wt(n, n[i], i, t)) && (delete n[i], r = !0);
|
|
727
727
|
}
|
|
728
728
|
}
|
|
729
|
-
return
|
|
729
|
+
return V.isArray(e) ? e.forEach(i) : i(e), r;
|
|
730
730
|
}
|
|
731
731
|
clear(e) {
|
|
732
732
|
let t = Object.keys(this), n = t.length, r = !1;
|
|
733
733
|
for (; n--;) {
|
|
734
734
|
let i = t[n];
|
|
735
|
-
(!e ||
|
|
735
|
+
(!e || Wt(this, this[i], i, e, !0)) && (delete this[i], r = !0);
|
|
736
736
|
}
|
|
737
737
|
return r;
|
|
738
738
|
}
|
|
739
739
|
normalize(e) {
|
|
740
740
|
let t = this, n = {};
|
|
741
|
-
return
|
|
742
|
-
let a =
|
|
741
|
+
return V.forEach(this, (r, i) => {
|
|
742
|
+
let a = V.findKey(n, i);
|
|
743
743
|
if (a) {
|
|
744
|
-
t[a] =
|
|
744
|
+
t[a] = Vt(r), delete t[i];
|
|
745
745
|
return;
|
|
746
746
|
}
|
|
747
|
-
let o = e ?
|
|
748
|
-
o !== i && delete t[i], t[o] =
|
|
747
|
+
let o = e ? Gt(i) : String(i).trim();
|
|
748
|
+
o !== i && delete t[i], t[o] = Vt(r), n[o] = !0;
|
|
749
749
|
}), this;
|
|
750
750
|
}
|
|
751
751
|
concat(...e) {
|
|
@@ -753,8 +753,8 @@ var U = class {
|
|
|
753
753
|
}
|
|
754
754
|
toJSON(e) {
|
|
755
755
|
let t = Object.create(null);
|
|
756
|
-
return
|
|
757
|
-
n != null && n !== !1 && (t[r] = e &&
|
|
756
|
+
return V.forEach(this, (n, r) => {
|
|
757
|
+
n != null && n !== !1 && (t[r] = e && V.isArray(n) ? n.join(", ") : n);
|
|
758
758
|
}), t;
|
|
759
759
|
}
|
|
760
760
|
[Symbol.iterator]() {
|
|
@@ -777,22 +777,22 @@ var U = class {
|
|
|
777
777
|
return t.forEach((e) => n.set(e)), n;
|
|
778
778
|
}
|
|
779
779
|
static accessor(e) {
|
|
780
|
-
let t = (this[
|
|
780
|
+
let t = (this[It] = this[It] = { accessors: {} }).accessors, n = this.prototype;
|
|
781
781
|
function r(e) {
|
|
782
|
-
let r =
|
|
783
|
-
t[r] || (
|
|
782
|
+
let r = zt(e);
|
|
783
|
+
t[r] || (Kt(n, e), t[r] = !0);
|
|
784
784
|
}
|
|
785
|
-
return
|
|
785
|
+
return V.isArray(e) ? e.forEach(r) : r(e), this;
|
|
786
786
|
}
|
|
787
787
|
};
|
|
788
|
-
|
|
788
|
+
W.accessor([
|
|
789
789
|
"Content-Type",
|
|
790
790
|
"Content-Length",
|
|
791
791
|
"Accept",
|
|
792
792
|
"Accept-Encoding",
|
|
793
793
|
"User-Agent",
|
|
794
794
|
"Authorization"
|
|
795
|
-
]),
|
|
795
|
+
]), V.reduceDescriptors(W.prototype, ({ value: e }, t) => {
|
|
796
796
|
let n = t[0].toUpperCase() + t.slice(1);
|
|
797
797
|
return {
|
|
798
798
|
get: () => e,
|
|
@@ -800,42 +800,42 @@ U.accessor([
|
|
|
800
800
|
this[n] = e;
|
|
801
801
|
}
|
|
802
802
|
};
|
|
803
|
-
}),
|
|
803
|
+
}), V.freezeMethods(W);
|
|
804
804
|
//#endregion
|
|
805
805
|
//#region node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/core/transformData.js
|
|
806
|
-
function
|
|
807
|
-
let n = this ||
|
|
808
|
-
return
|
|
806
|
+
function qt(e, t) {
|
|
807
|
+
let n = this || Nt, r = t || n, i = W.from(r.headers), a = r.data;
|
|
808
|
+
return V.forEach(e, function(e) {
|
|
809
809
|
a = e.call(n, a, i.normalize(), t ? t.status : void 0);
|
|
810
810
|
}), i.normalize(), a;
|
|
811
811
|
}
|
|
812
812
|
//#endregion
|
|
813
813
|
//#region node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/cancel/isCancel.js
|
|
814
|
-
function
|
|
814
|
+
function Jt(e) {
|
|
815
815
|
return !!(e && e.__CANCEL__);
|
|
816
816
|
}
|
|
817
817
|
//#endregion
|
|
818
818
|
//#region node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/cancel/CanceledError.js
|
|
819
|
-
var
|
|
819
|
+
var Yt = class extends H {
|
|
820
820
|
constructor(e, t, n) {
|
|
821
|
-
super(e ?? "canceled",
|
|
821
|
+
super(e ?? "canceled", H.ERR_CANCELED, t, n), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
822
822
|
}
|
|
823
823
|
};
|
|
824
824
|
//#endregion
|
|
825
825
|
//#region node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/core/settle.js
|
|
826
|
-
function
|
|
826
|
+
function Xt(e, t, n) {
|
|
827
827
|
let r = n.config.validateStatus;
|
|
828
|
-
!n.status || !r || r(n.status) ? e(n) : t(new
|
|
828
|
+
!n.status || !r || r(n.status) ? e(n) : t(new H("Request failed with status code " + n.status, [H.ERR_BAD_REQUEST, H.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4], n.config, n.request, n));
|
|
829
829
|
}
|
|
830
830
|
//#endregion
|
|
831
831
|
//#region node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/parseProtocol.js
|
|
832
|
-
function
|
|
832
|
+
function Zt(e) {
|
|
833
833
|
let t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
834
834
|
return t && t[1] || "";
|
|
835
835
|
}
|
|
836
836
|
//#endregion
|
|
837
837
|
//#region node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/speedometer.js
|
|
838
|
-
function
|
|
838
|
+
function Qt(e, t) {
|
|
839
839
|
e ||= 10;
|
|
840
840
|
let n = Array(e), r = Array(e), i = 0, a = 0, o;
|
|
841
841
|
return t = t === void 0 ? 1e3 : t, function(s) {
|
|
@@ -850,7 +850,7 @@ function $t(e, t) {
|
|
|
850
850
|
}
|
|
851
851
|
//#endregion
|
|
852
852
|
//#region node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/throttle.js
|
|
853
|
-
function
|
|
853
|
+
function $t(e, t) {
|
|
854
854
|
let n = 0, r = 1e3 / t, i, a, o = (t, r = Date.now()) => {
|
|
855
855
|
n = r, i = null, a &&= (clearTimeout(a), null), e(...t);
|
|
856
856
|
};
|
|
@@ -863,9 +863,9 @@ function en(e, t) {
|
|
|
863
863
|
}
|
|
864
864
|
//#endregion
|
|
865
865
|
//#region node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/progressEventReducer.js
|
|
866
|
-
var
|
|
867
|
-
let r = 0, i =
|
|
868
|
-
return
|
|
866
|
+
var en = (e, t, n = 3) => {
|
|
867
|
+
let r = 0, i = Qt(50, 250);
|
|
868
|
+
return $t((n) => {
|
|
869
869
|
let a = n.loaded, o = n.lengthComputable ? n.total : void 0, s = a - r, c = i(s), l = a <= o;
|
|
870
870
|
r = a, e({
|
|
871
871
|
loaded: a,
|
|
@@ -879,18 +879,18 @@ var tn = (e, t, n = 3) => {
|
|
|
879
879
|
[t ? "download" : "upload"]: !0
|
|
880
880
|
});
|
|
881
881
|
}, n);
|
|
882
|
-
},
|
|
882
|
+
}, tn = (e, t) => {
|
|
883
883
|
let n = e != null;
|
|
884
884
|
return [(r) => t[0]({
|
|
885
885
|
lengthComputable: n,
|
|
886
886
|
total: e,
|
|
887
887
|
loaded: r
|
|
888
888
|
}), t[1]];
|
|
889
|
-
},
|
|
889
|
+
}, nn = (e) => (...t) => V.asap(() => e(...t)), rn = U.hasStandardBrowserEnv ? ((e, t) => (n) => (n = new URL(n, U.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(new URL(U.origin), U.navigator && /(msie|trident)/i.test(U.navigator.userAgent)) : () => !0, an = U.hasStandardBrowserEnv ? {
|
|
890
890
|
write(e, t, n, r, i, a, o) {
|
|
891
891
|
if (typeof document > "u") return;
|
|
892
892
|
let s = [`${e}=${encodeURIComponent(t)}`];
|
|
893
|
-
|
|
893
|
+
V.isNumber(n) && s.push(`expires=${new Date(n).toUTCString()}`), V.isString(r) && s.push(`path=${r}`), V.isString(i) && s.push(`domain=${i}`), a === !0 && s.push("secure"), V.isString(o) && s.push(`SameSite=${o}`), document.cookie = s.join("; ");
|
|
894
894
|
},
|
|
895
895
|
read(e) {
|
|
896
896
|
if (typeof document > "u") return null;
|
|
@@ -909,39 +909,39 @@ var tn = (e, t, n = 3) => {
|
|
|
909
909
|
};
|
|
910
910
|
//#endregion
|
|
911
911
|
//#region node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/isAbsoluteURL.js
|
|
912
|
-
function
|
|
912
|
+
function on(e) {
|
|
913
913
|
return typeof e == "string" ? /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e) : !1;
|
|
914
914
|
}
|
|
915
915
|
//#endregion
|
|
916
916
|
//#region node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/combineURLs.js
|
|
917
|
-
function
|
|
917
|
+
function sn(e, t) {
|
|
918
918
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
919
919
|
}
|
|
920
920
|
//#endregion
|
|
921
921
|
//#region node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/core/buildFullPath.js
|
|
922
|
-
function
|
|
923
|
-
let r = !
|
|
924
|
-
return e && (r || n == 0) ?
|
|
922
|
+
function cn(e, t, n) {
|
|
923
|
+
let r = !on(t);
|
|
924
|
+
return e && (r || n == 0) ? sn(e, t) : t;
|
|
925
925
|
}
|
|
926
926
|
//#endregion
|
|
927
927
|
//#region node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/core/mergeConfig.js
|
|
928
|
-
var
|
|
929
|
-
function
|
|
928
|
+
var ln = (e) => e instanceof W ? { ...e } : e;
|
|
929
|
+
function un(e, t) {
|
|
930
930
|
t ||= {};
|
|
931
931
|
let n = {};
|
|
932
932
|
function r(e, t, n, r) {
|
|
933
|
-
return
|
|
933
|
+
return V.isPlainObject(e) && V.isPlainObject(t) ? V.merge.call({ caseless: r }, e, t) : V.isPlainObject(t) ? V.merge({}, t) : V.isArray(t) ? t.slice() : t;
|
|
934
934
|
}
|
|
935
935
|
function i(e, t, n, i) {
|
|
936
|
-
if (!
|
|
937
|
-
if (!
|
|
936
|
+
if (!V.isUndefined(t)) return r(e, t, n, i);
|
|
937
|
+
if (!V.isUndefined(e)) return r(void 0, e, n, i);
|
|
938
938
|
}
|
|
939
939
|
function a(e, t) {
|
|
940
|
-
if (!
|
|
940
|
+
if (!V.isUndefined(t)) return r(void 0, t);
|
|
941
941
|
}
|
|
942
942
|
function o(e, t) {
|
|
943
|
-
if (!
|
|
944
|
-
if (!
|
|
943
|
+
if (!V.isUndefined(t)) return r(void 0, t);
|
|
944
|
+
if (!V.isUndefined(e)) return r(void 0, e);
|
|
945
945
|
}
|
|
946
946
|
function s(n, i, a) {
|
|
947
947
|
if (a in t) return r(n, i);
|
|
@@ -976,38 +976,38 @@ function dn(e, t) {
|
|
|
976
976
|
socketPath: o,
|
|
977
977
|
responseEncoding: o,
|
|
978
978
|
validateStatus: s,
|
|
979
|
-
headers: (e, t, n) => i(
|
|
979
|
+
headers: (e, t, n) => i(ln(e), ln(t), n, !0)
|
|
980
980
|
};
|
|
981
|
-
return
|
|
981
|
+
return V.forEach(Object.keys({
|
|
982
982
|
...e,
|
|
983
983
|
...t
|
|
984
984
|
}), function(r) {
|
|
985
985
|
if (r === "__proto__" || r === "constructor" || r === "prototype") return;
|
|
986
|
-
let a =
|
|
987
|
-
|
|
986
|
+
let a = V.hasOwnProp(c, r) ? c[r] : i, o = a(e[r], t[r], r);
|
|
987
|
+
V.isUndefined(o) && a !== s || (n[r] = o);
|
|
988
988
|
}), n;
|
|
989
989
|
}
|
|
990
990
|
//#endregion
|
|
991
991
|
//#region node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/resolveConfig.js
|
|
992
|
-
var
|
|
993
|
-
let t =
|
|
994
|
-
if (t.headers = o =
|
|
995
|
-
if (
|
|
996
|
-
else if (
|
|
992
|
+
var dn = (e) => {
|
|
993
|
+
let t = un({}, e), { data: n, withXSRFToken: r, xsrfHeaderName: i, xsrfCookieName: a, headers: o, auth: s } = t;
|
|
994
|
+
if (t.headers = o = W.from(o), t.url = vt(cn(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), s && o.set("Authorization", "Basic " + btoa((s.username || "") + ":" + (s.password ? unescape(encodeURIComponent(s.password)) : ""))), V.isFormData(n)) {
|
|
995
|
+
if (U.hasStandardBrowserEnv || U.hasStandardBrowserWebWorkerEnv) o.setContentType(void 0);
|
|
996
|
+
else if (V.isFunction(n.getHeaders)) {
|
|
997
997
|
let e = n.getHeaders(), t = ["content-type", "content-length"];
|
|
998
998
|
Object.entries(e).forEach(([e, n]) => {
|
|
999
999
|
t.includes(e.toLowerCase()) && o.set(e, n);
|
|
1000
1000
|
});
|
|
1001
1001
|
}
|
|
1002
1002
|
}
|
|
1003
|
-
if (
|
|
1004
|
-
let e = i && a &&
|
|
1003
|
+
if (U.hasStandardBrowserEnv && (r && V.isFunction(r) && (r = r(t)), r || r !== !1 && rn(t.url))) {
|
|
1004
|
+
let e = i && a && an.read(a);
|
|
1005
1005
|
e && o.set(i, e);
|
|
1006
1006
|
}
|
|
1007
1007
|
return t;
|
|
1008
|
-
},
|
|
1008
|
+
}, fn = typeof XMLHttpRequest < "u" && function(e) {
|
|
1009
1009
|
return new Promise(function(t, n) {
|
|
1010
|
-
let r =
|
|
1010
|
+
let r = dn(e), i = r.data, a = W.from(r.headers).normalize(), { responseType: o, onUploadProgress: s, onDownloadProgress: c } = r, l, u, d, f, p;
|
|
1011
1011
|
function m() {
|
|
1012
1012
|
f && f(), p && p(), r.cancelToken && r.cancelToken.unsubscribe(l), r.signal && r.signal.removeEventListener("abort", l);
|
|
1013
1013
|
}
|
|
@@ -1015,8 +1015,8 @@ var fn = (e) => {
|
|
|
1015
1015
|
h.open(r.method.toUpperCase(), r.url, !0), h.timeout = r.timeout;
|
|
1016
1016
|
function g() {
|
|
1017
1017
|
if (!h) return;
|
|
1018
|
-
let r =
|
|
1019
|
-
|
|
1018
|
+
let r = W.from("getAllResponseHeaders" in h && h.getAllResponseHeaders());
|
|
1019
|
+
Xt(function(e) {
|
|
1020
1020
|
t(e), m();
|
|
1021
1021
|
}, function(e) {
|
|
1022
1022
|
n(e), m();
|
|
@@ -1032,36 +1032,36 @@ var fn = (e) => {
|
|
|
1032
1032
|
"onloadend" in h ? h.onloadend = g : h.onreadystatechange = function() {
|
|
1033
1033
|
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(g);
|
|
1034
1034
|
}, h.onabort = function() {
|
|
1035
|
-
h &&= (n(new
|
|
1035
|
+
h &&= (n(new H("Request aborted", H.ECONNABORTED, e, h)), null);
|
|
1036
1036
|
}, h.onerror = function(t) {
|
|
1037
|
-
let r = new
|
|
1037
|
+
let r = new H(t && t.message ? t.message : "Network Error", H.ERR_NETWORK, e, h);
|
|
1038
1038
|
r.event = t || null, n(r), h = null;
|
|
1039
1039
|
}, h.ontimeout = function() {
|
|
1040
|
-
let t = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded", i = r.transitional ||
|
|
1041
|
-
r.timeoutErrorMessage && (t = r.timeoutErrorMessage), n(new
|
|
1042
|
-
}, i === void 0 && a.setContentType(null), "setRequestHeader" in h &&
|
|
1040
|
+
let t = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded", i = r.transitional || bt;
|
|
1041
|
+
r.timeoutErrorMessage && (t = r.timeoutErrorMessage), n(new H(t, i.clarifyTimeoutError ? H.ETIMEDOUT : H.ECONNABORTED, e, h)), h = null;
|
|
1042
|
+
}, i === void 0 && a.setContentType(null), "setRequestHeader" in h && V.forEach(a.toJSON(), function(e, t) {
|
|
1043
1043
|
h.setRequestHeader(t, e);
|
|
1044
|
-
}),
|
|
1045
|
-
h &&= (n(!t || t.type ? new
|
|
1044
|
+
}), V.isUndefined(r.withCredentials) || (h.withCredentials = !!r.withCredentials), o && o !== "json" && (h.responseType = r.responseType), c && ([d, p] = en(c, !0), h.addEventListener("progress", d)), s && h.upload && ([u, f] = en(s), h.upload.addEventListener("progress", u), h.upload.addEventListener("loadend", f)), (r.cancelToken || r.signal) && (l = (t) => {
|
|
1045
|
+
h &&= (n(!t || t.type ? new Yt(null, e, h) : t), h.abort(), null);
|
|
1046
1046
|
}, r.cancelToken && r.cancelToken.subscribe(l), r.signal && (r.signal.aborted ? l() : r.signal.addEventListener("abort", l)));
|
|
1047
|
-
let _ =
|
|
1048
|
-
if (_ &&
|
|
1049
|
-
n(new
|
|
1047
|
+
let _ = Zt(r.url);
|
|
1048
|
+
if (_ && U.protocols.indexOf(_) === -1) {
|
|
1049
|
+
n(new H("Unsupported protocol " + _ + ":", H.ERR_BAD_REQUEST, e));
|
|
1050
1050
|
return;
|
|
1051
1051
|
}
|
|
1052
1052
|
h.send(i || null);
|
|
1053
1053
|
});
|
|
1054
|
-
},
|
|
1054
|
+
}, pn = (e, t) => {
|
|
1055
1055
|
let { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1056
1056
|
if (t || n) {
|
|
1057
1057
|
let n = new AbortController(), r, i = function(e) {
|
|
1058
1058
|
if (!r) {
|
|
1059
1059
|
r = !0, o();
|
|
1060
1060
|
let t = e instanceof Error ? e : this.reason;
|
|
1061
|
-
n.abort(t instanceof
|
|
1061
|
+
n.abort(t instanceof H ? t : new Yt(t instanceof Error ? t.message : t));
|
|
1062
1062
|
}
|
|
1063
1063
|
}, a = t && setTimeout(() => {
|
|
1064
|
-
a = null, i(new
|
|
1064
|
+
a = null, i(new H(`timeout of ${t}ms exceeded`, H.ETIMEDOUT));
|
|
1065
1065
|
}, t), o = () => {
|
|
1066
1066
|
e &&= (a && clearTimeout(a), a = null, e.forEach((e) => {
|
|
1067
1067
|
e.unsubscribe ? e.unsubscribe(i) : e.removeEventListener("abort", i);
|
|
@@ -1069,9 +1069,9 @@ var fn = (e) => {
|
|
|
1069
1069
|
};
|
|
1070
1070
|
e.forEach((e) => e.addEventListener("abort", i));
|
|
1071
1071
|
let { signal: s } = n;
|
|
1072
|
-
return s.unsubscribe = () =>
|
|
1072
|
+
return s.unsubscribe = () => V.asap(o), s;
|
|
1073
1073
|
}
|
|
1074
|
-
},
|
|
1074
|
+
}, mn = function* (e, t) {
|
|
1075
1075
|
let n = e.byteLength;
|
|
1076
1076
|
if (!t || n < t) {
|
|
1077
1077
|
yield e;
|
|
@@ -1079,9 +1079,9 @@ var fn = (e) => {
|
|
|
1079
1079
|
}
|
|
1080
1080
|
let r = 0, i;
|
|
1081
1081
|
for (; r < n;) i = r + t, yield e.slice(r, i), r = i;
|
|
1082
|
-
},
|
|
1083
|
-
for await (let n of
|
|
1084
|
-
},
|
|
1082
|
+
}, hn = async function* (e, t) {
|
|
1083
|
+
for await (let n of gn(e)) yield* mn(n, t);
|
|
1084
|
+
}, gn = async function* (e) {
|
|
1085
1085
|
if (e[Symbol.asyncIterator]) {
|
|
1086
1086
|
yield* e;
|
|
1087
1087
|
return;
|
|
@@ -1096,8 +1096,8 @@ var fn = (e) => {
|
|
|
1096
1096
|
} finally {
|
|
1097
1097
|
await t.cancel();
|
|
1098
1098
|
}
|
|
1099
|
-
},
|
|
1100
|
-
let i =
|
|
1099
|
+
}, _n = (e, t, n, r) => {
|
|
1100
|
+
let i = hn(e, t), a = 0, o, s = (e) => {
|
|
1101
1101
|
o || (o = !0, r && r(e));
|
|
1102
1102
|
};
|
|
1103
1103
|
return new ReadableStream({
|
|
@@ -1118,21 +1118,21 @@ var fn = (e) => {
|
|
|
1118
1118
|
return s(e), i.return();
|
|
1119
1119
|
}
|
|
1120
1120
|
}, { highWaterMark: 2 });
|
|
1121
|
-
},
|
|
1121
|
+
}, vn = 64 * 1024, { isFunction: yn } = V, bn = (({ Request: e, Response: t }) => ({
|
|
1122
1122
|
Request: e,
|
|
1123
1123
|
Response: t
|
|
1124
|
-
}))(
|
|
1124
|
+
}))(V.global), { ReadableStream: xn, TextEncoder: Sn } = V.global, Cn = (e, ...t) => {
|
|
1125
1125
|
try {
|
|
1126
1126
|
return !!e(...t);
|
|
1127
1127
|
} catch {
|
|
1128
1128
|
return !1;
|
|
1129
1129
|
}
|
|
1130
|
-
},
|
|
1131
|
-
e =
|
|
1132
|
-
let { fetch: t, Request: n, Response: r } = e, i = t ?
|
|
1130
|
+
}, wn = (e) => {
|
|
1131
|
+
e = V.merge.call({ skipUndefined: !0 }, bn, e);
|
|
1132
|
+
let { fetch: t, Request: n, Response: r } = e, i = t ? yn(t) : typeof fetch == "function", a = yn(n), o = yn(r);
|
|
1133
1133
|
if (!i) return !1;
|
|
1134
|
-
let s = i &&
|
|
1135
|
-
let e = !1, t = new
|
|
1134
|
+
let s = i && yn(xn), c = i && (typeof Sn == "function" ? ((e) => (t) => e.encode(t))(new Sn()) : async (e) => new Uint8Array(await new n(e).arrayBuffer())), l = a && s && Cn(() => {
|
|
1135
|
+
let e = !1, t = new xn(), r = new n(U.origin, {
|
|
1136
1136
|
body: t,
|
|
1137
1137
|
method: "POST",
|
|
1138
1138
|
get duplex() {
|
|
@@ -1140,7 +1140,7 @@ var fn = (e) => {
|
|
|
1140
1140
|
}
|
|
1141
1141
|
}).headers.has("Content-Type");
|
|
1142
1142
|
return t.cancel(), e && !r;
|
|
1143
|
-
}), u = o && s &&
|
|
1143
|
+
}), u = o && s && Cn(() => V.isReadableStream(new r("").body)), d = { stream: u && ((e) => e.body) };
|
|
1144
1144
|
i && [
|
|
1145
1145
|
"text",
|
|
1146
1146
|
"arrayBuffer",
|
|
@@ -1151,23 +1151,23 @@ var fn = (e) => {
|
|
|
1151
1151
|
!d[e] && (d[e] = (t, n) => {
|
|
1152
1152
|
let r = t && t[e];
|
|
1153
1153
|
if (r) return r.call(t);
|
|
1154
|
-
throw new
|
|
1154
|
+
throw new H(`Response type '${e}' is not supported`, H.ERR_NOT_SUPPORT, n);
|
|
1155
1155
|
});
|
|
1156
1156
|
});
|
|
1157
1157
|
let f = async (e) => {
|
|
1158
1158
|
if (e == null) return 0;
|
|
1159
|
-
if (
|
|
1160
|
-
if (
|
|
1159
|
+
if (V.isBlob(e)) return e.size;
|
|
1160
|
+
if (V.isSpecCompliantForm(e)) return (await new n(U.origin, {
|
|
1161
1161
|
method: "POST",
|
|
1162
1162
|
body: e
|
|
1163
1163
|
}).arrayBuffer()).byteLength;
|
|
1164
|
-
if (
|
|
1165
|
-
if (
|
|
1166
|
-
}, p = async (e, t) =>
|
|
1164
|
+
if (V.isArrayBufferView(e) || V.isArrayBuffer(e)) return e.byteLength;
|
|
1165
|
+
if (V.isURLSearchParams(e) && (e += ""), V.isString(e)) return (await c(e)).byteLength;
|
|
1166
|
+
}, p = async (e, t) => V.toFiniteNumber(e.getContentLength()) ?? f(t);
|
|
1167
1167
|
return async (e) => {
|
|
1168
|
-
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 } =
|
|
1168
|
+
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 } = dn(e), x = t || fetch;
|
|
1169
1169
|
_ = _ ? (_ + "").toLowerCase() : "text";
|
|
1170
|
-
let S =
|
|
1170
|
+
let S = pn([c, f && f.toAbortSignal()], m), C = null, w = S && S.unsubscribe && (() => {
|
|
1171
1171
|
S.unsubscribe();
|
|
1172
1172
|
}), T;
|
|
1173
1173
|
try {
|
|
@@ -1177,12 +1177,12 @@ var fn = (e) => {
|
|
|
1177
1177
|
body: s,
|
|
1178
1178
|
duplex: "half"
|
|
1179
1179
|
}), t;
|
|
1180
|
-
if (
|
|
1181
|
-
let [t, n] =
|
|
1182
|
-
s =
|
|
1180
|
+
if (V.isFormData(s) && (t = e.headers.get("content-type")) && v.setContentType(t), e.body) {
|
|
1181
|
+
let [t, n] = tn(T, en(nn(g)));
|
|
1182
|
+
s = _n(e.body, vn, t, n);
|
|
1183
1183
|
}
|
|
1184
1184
|
}
|
|
1185
|
-
|
|
1185
|
+
V.isString(y) || (y = y ? "include" : "omit");
|
|
1186
1186
|
let t = a && "credentials" in n.prototype, c = {
|
|
1187
1187
|
...b,
|
|
1188
1188
|
signal: S,
|
|
@@ -1203,17 +1203,17 @@ var fn = (e) => {
|
|
|
1203
1203
|
].forEach((t) => {
|
|
1204
1204
|
e[t] = f[t];
|
|
1205
1205
|
});
|
|
1206
|
-
let t =
|
|
1207
|
-
f = new r(
|
|
1206
|
+
let t = V.toFiniteNumber(f.headers.get("content-length")), [n, i] = h && tn(t, en(nn(h), !0)) || [];
|
|
1207
|
+
f = new r(_n(f.body, vn, n, () => {
|
|
1208
1208
|
i && i(), w && w();
|
|
1209
1209
|
}), e);
|
|
1210
1210
|
}
|
|
1211
1211
|
_ ||= "text";
|
|
1212
|
-
let E = await d[
|
|
1212
|
+
let E = await d[V.findKey(d, _) || "text"](f, e);
|
|
1213
1213
|
return !m && w && w(), await new Promise((t, n) => {
|
|
1214
|
-
|
|
1214
|
+
Xt(t, n, {
|
|
1215
1215
|
data: E,
|
|
1216
|
-
headers:
|
|
1216
|
+
headers: W.from(f.headers),
|
|
1217
1217
|
status: f.status,
|
|
1218
1218
|
statusText: f.statusText,
|
|
1219
1219
|
config: e,
|
|
@@ -1221,27 +1221,27 @@ var fn = (e) => {
|
|
|
1221
1221
|
});
|
|
1222
1222
|
});
|
|
1223
1223
|
} catch (t) {
|
|
1224
|
-
throw w && w(), t && t.name === "TypeError" && /Load failed|fetch/i.test(t.message) ? Object.assign(new
|
|
1224
|
+
throw w && w(), t && t.name === "TypeError" && /Load failed|fetch/i.test(t.message) ? Object.assign(new H("Network Error", H.ERR_NETWORK, e, C, t && t.response), { cause: t.cause || t }) : H.from(t, t && t.code, e, C, t && t.response);
|
|
1225
1225
|
}
|
|
1226
1226
|
};
|
|
1227
|
-
},
|
|
1227
|
+
}, Tn = /* @__PURE__ */ new Map(), En = (e) => {
|
|
1228
1228
|
let t = e && e.env || {}, { fetch: n, Request: r, Response: i } = t, a = [
|
|
1229
1229
|
r,
|
|
1230
1230
|
i,
|
|
1231
1231
|
n
|
|
1232
|
-
], o = a.length, s, c, l =
|
|
1233
|
-
for (; o--;) s = a[o], c = l.get(s), c === void 0 && l.set(s, c = o ? /* @__PURE__ */ new Map() :
|
|
1232
|
+
], o = a.length, s, c, l = Tn;
|
|
1233
|
+
for (; o--;) s = a[o], c = l.get(s), c === void 0 && l.set(s, c = o ? /* @__PURE__ */ new Map() : wn(t)), l = c;
|
|
1234
1234
|
return c;
|
|
1235
1235
|
};
|
|
1236
|
-
|
|
1236
|
+
En();
|
|
1237
1237
|
//#endregion
|
|
1238
1238
|
//#region node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/adapters/adapters.js
|
|
1239
|
-
var
|
|
1239
|
+
var Dn = {
|
|
1240
1240
|
http: null,
|
|
1241
|
-
xhr:
|
|
1242
|
-
fetch: { get:
|
|
1241
|
+
xhr: fn,
|
|
1242
|
+
fetch: { get: En }
|
|
1243
1243
|
};
|
|
1244
|
-
|
|
1244
|
+
V.forEach(Dn, (e, t) => {
|
|
1245
1245
|
if (e) {
|
|
1246
1246
|
try {
|
|
1247
1247
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1249,46 +1249,46 @@ B.forEach(On, (e, t) => {
|
|
|
1249
1249
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1250
1250
|
}
|
|
1251
1251
|
});
|
|
1252
|
-
var
|
|
1253
|
-
function
|
|
1254
|
-
e =
|
|
1252
|
+
var On = (e) => `- ${e}`, kn = (e) => V.isFunction(e) || e === null || e === !1;
|
|
1253
|
+
function An(e, t) {
|
|
1254
|
+
e = V.isArray(e) ? e : [e];
|
|
1255
1255
|
let { length: n } = e, r, i, a = {};
|
|
1256
1256
|
for (let o = 0; o < n; o++) {
|
|
1257
1257
|
r = e[o];
|
|
1258
1258
|
let n;
|
|
1259
|
-
if (i = r, !
|
|
1260
|
-
if (i && (
|
|
1259
|
+
if (i = r, !kn(r) && (i = Dn[(n = String(r)).toLowerCase()], i === void 0)) throw new H(`Unknown adapter '${n}'`);
|
|
1260
|
+
if (i && (V.isFunction(i) || (i = i.get(t)))) break;
|
|
1261
1261
|
a[n || "#" + o] = i;
|
|
1262
1262
|
}
|
|
1263
1263
|
if (!i) {
|
|
1264
1264
|
let e = Object.entries(a).map(([e, t]) => `adapter ${e} ` + (t === !1 ? "is not supported by the environment" : "is not available in the build"));
|
|
1265
|
-
throw new
|
|
1265
|
+
throw new H("There is no suitable adapter to dispatch the request " + (n ? e.length > 1 ? "since :\n" + e.map(On).join("\n") : " " + On(e[0]) : "as no adapter specified"), "ERR_NOT_SUPPORT");
|
|
1266
1266
|
}
|
|
1267
1267
|
return i;
|
|
1268
1268
|
}
|
|
1269
|
-
var
|
|
1270
|
-
getAdapter:
|
|
1271
|
-
adapters:
|
|
1269
|
+
var jn = {
|
|
1270
|
+
getAdapter: An,
|
|
1271
|
+
adapters: Dn
|
|
1272
1272
|
};
|
|
1273
1273
|
//#endregion
|
|
1274
1274
|
//#region node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/core/dispatchRequest.js
|
|
1275
|
-
function
|
|
1276
|
-
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new
|
|
1275
|
+
function Mn(e) {
|
|
1276
|
+
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new Yt(null, e);
|
|
1277
1277
|
}
|
|
1278
|
-
function
|
|
1279
|
-
return
|
|
1278
|
+
function Nn(e) {
|
|
1279
|
+
return Mn(e), e.headers = W.from(e.headers), e.data = qt.call(e, e.transformRequest), [
|
|
1280
1280
|
"post",
|
|
1281
1281
|
"put",
|
|
1282
1282
|
"patch"
|
|
1283
|
-
].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1284
|
-
return
|
|
1283
|
+
].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), jn.getAdapter(e.adapter || Nt.adapter, e)(e).then(function(t) {
|
|
1284
|
+
return Mn(e), t.data = qt.call(e, e.transformResponse, t), t.headers = W.from(t.headers), t;
|
|
1285
1285
|
}, function(t) {
|
|
1286
|
-
return
|
|
1286
|
+
return Jt(t) || (Mn(e), t && t.response && (t.response.data = qt.call(e, e.transformResponse, t.response), t.response.headers = W.from(t.response.headers))), Promise.reject(t);
|
|
1287
1287
|
});
|
|
1288
1288
|
}
|
|
1289
1289
|
//#endregion
|
|
1290
1290
|
//#region node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/env/data.js
|
|
1291
|
-
var
|
|
1291
|
+
var Pn = "1.15.0", Fn = {};
|
|
1292
1292
|
[
|
|
1293
1293
|
"object",
|
|
1294
1294
|
"boolean",
|
|
@@ -1297,43 +1297,43 @@ var Fn = "1.15.0", In = {};
|
|
|
1297
1297
|
"string",
|
|
1298
1298
|
"symbol"
|
|
1299
1299
|
].forEach((e, t) => {
|
|
1300
|
-
|
|
1300
|
+
Fn[e] = function(n) {
|
|
1301
1301
|
return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1302
1302
|
};
|
|
1303
1303
|
});
|
|
1304
|
-
var
|
|
1305
|
-
|
|
1304
|
+
var In = {};
|
|
1305
|
+
Fn.transitional = function(e, t, n) {
|
|
1306
1306
|
function r(e, t) {
|
|
1307
|
-
return "[Axios v" +
|
|
1307
|
+
return "[Axios v" + Pn + "] Transitional option '" + e + "'" + t + (n ? ". " + n : "");
|
|
1308
1308
|
}
|
|
1309
1309
|
return (n, i, a) => {
|
|
1310
|
-
if (e === !1) throw new
|
|
1311
|
-
return t && !
|
|
1310
|
+
if (e === !1) throw new H(r(i, " has been removed" + (t ? " in " + t : "")), H.ERR_DEPRECATED);
|
|
1311
|
+
return t && !In[i] && (In[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;
|
|
1312
1312
|
};
|
|
1313
|
-
},
|
|
1313
|
+
}, Fn.spelling = function(e) {
|
|
1314
1314
|
return (t, n) => (console.warn(`${n} is likely a misspelling of ${e}`), !0);
|
|
1315
1315
|
};
|
|
1316
|
-
function
|
|
1317
|
-
if (typeof e != "object") throw new
|
|
1316
|
+
function Ln(e, t, n) {
|
|
1317
|
+
if (typeof e != "object") throw new H("options must be an object", H.ERR_BAD_OPTION_VALUE);
|
|
1318
1318
|
let r = Object.keys(e), i = r.length;
|
|
1319
1319
|
for (; i-- > 0;) {
|
|
1320
1320
|
let a = r[i], o = t[a];
|
|
1321
1321
|
if (o) {
|
|
1322
1322
|
let t = e[a], n = t === void 0 || o(t, a, e);
|
|
1323
|
-
if (n !== !0) throw new
|
|
1323
|
+
if (n !== !0) throw new H("option " + a + " must be " + n, H.ERR_BAD_OPTION_VALUE);
|
|
1324
1324
|
continue;
|
|
1325
1325
|
}
|
|
1326
|
-
if (n !== !0) throw new
|
|
1326
|
+
if (n !== !0) throw new H("Unknown option " + a, H.ERR_BAD_OPTION);
|
|
1327
1327
|
}
|
|
1328
1328
|
}
|
|
1329
|
-
var
|
|
1330
|
-
assertOptions:
|
|
1331
|
-
validators:
|
|
1332
|
-
},
|
|
1329
|
+
var Rn = {
|
|
1330
|
+
assertOptions: Ln,
|
|
1331
|
+
validators: Fn
|
|
1332
|
+
}, G = Rn.validators, zn = class {
|
|
1333
1333
|
constructor(e) {
|
|
1334
1334
|
this.defaults = e || {}, this.interceptors = {
|
|
1335
|
-
request: new
|
|
1336
|
-
response: new
|
|
1335
|
+
request: new yt(),
|
|
1336
|
+
response: new yt()
|
|
1337
1337
|
};
|
|
1338
1338
|
}
|
|
1339
1339
|
async request(e, t) {
|
|
@@ -1360,22 +1360,22 @@ var zn = {
|
|
|
1360
1360
|
}
|
|
1361
1361
|
}
|
|
1362
1362
|
_request(e, t) {
|
|
1363
|
-
typeof e == "string" ? (t ||= {}, t.url = e) : t = e || {}, t =
|
|
1363
|
+
typeof e == "string" ? (t ||= {}, t.url = e) : t = e || {}, t = un(this.defaults, t);
|
|
1364
1364
|
let { transitional: n, paramsSerializer: r, headers: i } = t;
|
|
1365
|
-
n !== void 0 &&
|
|
1366
|
-
silentJSONParsing:
|
|
1367
|
-
forcedJSONParsing:
|
|
1368
|
-
clarifyTimeoutError:
|
|
1369
|
-
legacyInterceptorReqResOrdering:
|
|
1370
|
-
}, !1), r != null && (
|
|
1371
|
-
encode:
|
|
1372
|
-
serialize:
|
|
1373
|
-
}, !0)), t.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls === void 0 ? t.allowAbsoluteUrls = !0 : t.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls),
|
|
1374
|
-
baseUrl:
|
|
1375
|
-
withXsrfToken:
|
|
1365
|
+
n !== void 0 && Rn.assertOptions(n, {
|
|
1366
|
+
silentJSONParsing: G.transitional(G.boolean),
|
|
1367
|
+
forcedJSONParsing: G.transitional(G.boolean),
|
|
1368
|
+
clarifyTimeoutError: G.transitional(G.boolean),
|
|
1369
|
+
legacyInterceptorReqResOrdering: G.transitional(G.boolean)
|
|
1370
|
+
}, !1), r != null && (V.isFunction(r) ? t.paramsSerializer = { serialize: r } : Rn.assertOptions(r, {
|
|
1371
|
+
encode: G.function,
|
|
1372
|
+
serialize: G.function
|
|
1373
|
+
}, !0)), t.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls === void 0 ? t.allowAbsoluteUrls = !0 : t.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls), Rn.assertOptions(t, {
|
|
1374
|
+
baseUrl: G.spelling("baseURL"),
|
|
1375
|
+
withXsrfToken: G.spelling("withXSRFToken")
|
|
1376
1376
|
}, !0), t.method = (t.method || this.defaults.method || "get").toLowerCase();
|
|
1377
|
-
let a = i &&
|
|
1378
|
-
i &&
|
|
1377
|
+
let a = i && V.merge(i.common, i[t.method]);
|
|
1378
|
+
i && V.forEach([
|
|
1379
1379
|
"delete",
|
|
1380
1380
|
"get",
|
|
1381
1381
|
"head",
|
|
@@ -1385,12 +1385,12 @@ var zn = {
|
|
|
1385
1385
|
"common"
|
|
1386
1386
|
], (e) => {
|
|
1387
1387
|
delete i[e];
|
|
1388
|
-
}), t.headers =
|
|
1388
|
+
}), t.headers = W.concat(a, i);
|
|
1389
1389
|
let o = [], s = !0;
|
|
1390
1390
|
this.interceptors.request.forEach(function(e) {
|
|
1391
1391
|
if (typeof e.runWhen == "function" && e.runWhen(t) === !1) return;
|
|
1392
1392
|
s &&= e.synchronous;
|
|
1393
|
-
let n = t.transitional ||
|
|
1393
|
+
let n = t.transitional || bt;
|
|
1394
1394
|
n && n.legacyInterceptorReqResOrdering ? o.unshift(e.fulfilled, e.rejected) : o.push(e.fulfilled, e.rejected);
|
|
1395
1395
|
});
|
|
1396
1396
|
let c = [];
|
|
@@ -1399,7 +1399,7 @@ var zn = {
|
|
|
1399
1399
|
});
|
|
1400
1400
|
let l, u = 0, d;
|
|
1401
1401
|
if (!s) {
|
|
1402
|
-
let e = [
|
|
1402
|
+
let e = [Nn.bind(this), void 0];
|
|
1403
1403
|
for (e.unshift(...o), e.push(...c), d = e.length, l = Promise.resolve(t); u < d;) l = l.then(e[u++], e[u++]);
|
|
1404
1404
|
return l;
|
|
1405
1405
|
}
|
|
@@ -1415,7 +1415,7 @@ var zn = {
|
|
|
1415
1415
|
}
|
|
1416
1416
|
}
|
|
1417
1417
|
try {
|
|
1418
|
-
l =
|
|
1418
|
+
l = Nn.call(this, f);
|
|
1419
1419
|
} catch (e) {
|
|
1420
1420
|
return Promise.reject(e);
|
|
1421
1421
|
}
|
|
@@ -1423,30 +1423,30 @@ var zn = {
|
|
|
1423
1423
|
return l;
|
|
1424
1424
|
}
|
|
1425
1425
|
getUri(e) {
|
|
1426
|
-
return e =
|
|
1426
|
+
return e = un(this.defaults, e), vt(cn(e.baseURL, e.url, e.allowAbsoluteUrls), e.params, e.paramsSerializer);
|
|
1427
1427
|
}
|
|
1428
1428
|
};
|
|
1429
|
-
|
|
1429
|
+
V.forEach([
|
|
1430
1430
|
"delete",
|
|
1431
1431
|
"get",
|
|
1432
1432
|
"head",
|
|
1433
1433
|
"options"
|
|
1434
1434
|
], function(e) {
|
|
1435
|
-
|
|
1436
|
-
return this.request(
|
|
1435
|
+
zn.prototype[e] = function(t, n) {
|
|
1436
|
+
return this.request(un(n || {}, {
|
|
1437
1437
|
method: e,
|
|
1438
1438
|
url: t,
|
|
1439
1439
|
data: (n || {}).data
|
|
1440
1440
|
}));
|
|
1441
1441
|
};
|
|
1442
|
-
}),
|
|
1442
|
+
}), V.forEach([
|
|
1443
1443
|
"post",
|
|
1444
1444
|
"put",
|
|
1445
1445
|
"patch"
|
|
1446
1446
|
], function(e) {
|
|
1447
1447
|
function t(t) {
|
|
1448
1448
|
return function(n, r, i) {
|
|
1449
|
-
return this.request(
|
|
1449
|
+
return this.request(un(i || {}, {
|
|
1450
1450
|
method: e,
|
|
1451
1451
|
headers: t ? { "Content-Type": "multipart/form-data" } : {},
|
|
1452
1452
|
url: n,
|
|
@@ -1454,11 +1454,11 @@ B.forEach([
|
|
|
1454
1454
|
}));
|
|
1455
1455
|
};
|
|
1456
1456
|
}
|
|
1457
|
-
|
|
1457
|
+
zn.prototype[e] = t(), zn.prototype[e + "Form"] = t(!0);
|
|
1458
1458
|
});
|
|
1459
1459
|
//#endregion
|
|
1460
1460
|
//#region node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/cancel/CancelToken.js
|
|
1461
|
-
var
|
|
1461
|
+
var Bn = class e {
|
|
1462
1462
|
constructor(e) {
|
|
1463
1463
|
if (typeof e != "function") throw TypeError("executor must be a function.");
|
|
1464
1464
|
let t;
|
|
@@ -1479,7 +1479,7 @@ var Vn = class e {
|
|
|
1479
1479
|
n.unsubscribe(t);
|
|
1480
1480
|
}, r;
|
|
1481
1481
|
}, e(function(e, r, i) {
|
|
1482
|
-
n.reason || (n.reason = new
|
|
1482
|
+
n.reason || (n.reason = new Yt(e, r, i), t(n.reason));
|
|
1483
1483
|
});
|
|
1484
1484
|
}
|
|
1485
1485
|
throwIfRequested() {
|
|
@@ -1515,19 +1515,19 @@ var Vn = class e {
|
|
|
1515
1515
|
};
|
|
1516
1516
|
//#endregion
|
|
1517
1517
|
//#region node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/spread.js
|
|
1518
|
-
function
|
|
1518
|
+
function Vn(e) {
|
|
1519
1519
|
return function(t) {
|
|
1520
1520
|
return e.apply(null, t);
|
|
1521
1521
|
};
|
|
1522
1522
|
}
|
|
1523
1523
|
//#endregion
|
|
1524
1524
|
//#region node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/isAxiosError.js
|
|
1525
|
-
function
|
|
1526
|
-
return
|
|
1525
|
+
function Hn(e) {
|
|
1526
|
+
return V.isObject(e) && e.isAxiosError === !0;
|
|
1527
1527
|
}
|
|
1528
1528
|
//#endregion
|
|
1529
1529
|
//#region node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/helpers/HttpStatusCode.js
|
|
1530
|
-
var
|
|
1530
|
+
var Un = {
|
|
1531
1531
|
Continue: 100,
|
|
1532
1532
|
SwitchingProtocols: 101,
|
|
1533
1533
|
Processing: 102,
|
|
@@ -1598,37 +1598,37 @@ var Wn = {
|
|
|
1598
1598
|
SslHandshakeFailed: 525,
|
|
1599
1599
|
InvalidSslCertificate: 526
|
|
1600
1600
|
};
|
|
1601
|
-
Object.entries(
|
|
1602
|
-
|
|
1601
|
+
Object.entries(Un).forEach(([e, t]) => {
|
|
1602
|
+
Un[t] = e;
|
|
1603
1603
|
});
|
|
1604
1604
|
//#endregion
|
|
1605
1605
|
//#region node_modules/.pnpm/axios@1.15.0/node_modules/axios/lib/axios.js
|
|
1606
|
-
function
|
|
1607
|
-
let t = new
|
|
1608
|
-
return
|
|
1609
|
-
return
|
|
1606
|
+
function Wn(e) {
|
|
1607
|
+
let t = new zn(e), n = ne(zn.prototype.request, t);
|
|
1608
|
+
return V.extend(n, zn.prototype, t, { allOwnKeys: !0 }), V.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(t) {
|
|
1609
|
+
return Wn(un(e, t));
|
|
1610
1610
|
}, n;
|
|
1611
1611
|
}
|
|
1612
|
-
var
|
|
1613
|
-
|
|
1612
|
+
var K = Wn(Nt);
|
|
1613
|
+
K.Axios = zn, K.CanceledError = Yt, K.CancelToken = Bn, K.isCancel = Jt, K.VERSION = Pn, K.toFormData = pt, K.AxiosError = H, K.Cancel = K.CanceledError, K.all = function(e) {
|
|
1614
1614
|
return Promise.all(e);
|
|
1615
|
-
},
|
|
1615
|
+
}, K.spread = Vn, K.isAxiosError = Hn, K.mergeConfig = un, K.AxiosHeaders = W, K.formToJSON = (e) => jt(V.isHTMLForm(e) ? new FormData(e) : e), K.getAdapter = jn.getAdapter, K.HttpStatusCode = Un, K.default = K;
|
|
1616
1616
|
//#endregion
|
|
1617
1617
|
//#region src/api/data/baostock.ts
|
|
1618
|
-
function
|
|
1618
|
+
function Gn(e) {
|
|
1619
1619
|
if (/^\d{8}$/.test(e)) return `${e.slice(0, 4)}-${e.slice(4, 6)}-${e.slice(6, 8)}`;
|
|
1620
1620
|
if (/^\d{4}-\d{2}-\d{2}T/.test(e)) return e.slice(0, 10);
|
|
1621
1621
|
if (/^\d{4}-\d{2}-\d{2}$/.test(e)) return e;
|
|
1622
1622
|
let t = new Date(e);
|
|
1623
1623
|
return Number.isNaN(t.getTime()) ? e : t.toISOString().slice(0, 10);
|
|
1624
1624
|
}
|
|
1625
|
-
function
|
|
1625
|
+
function Kn(e) {
|
|
1626
1626
|
let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e);
|
|
1627
1627
|
if (!t) throw Error(`无法解析日期: ${e}`);
|
|
1628
1628
|
let n = Number(t[1]), r = Number(t[2]), i = Number(t[3]);
|
|
1629
1629
|
return Date.UTC(n, r - 1, i, -8, 0, 0, 0);
|
|
1630
1630
|
}
|
|
1631
|
-
function
|
|
1631
|
+
function qn(e) {
|
|
1632
1632
|
return e && {
|
|
1633
1633
|
daily: "d",
|
|
1634
1634
|
weekly: "w",
|
|
@@ -1639,20 +1639,20 @@ function Jn(e) {
|
|
|
1639
1639
|
60: "60"
|
|
1640
1640
|
}[e] || "d";
|
|
1641
1641
|
}
|
|
1642
|
-
function
|
|
1642
|
+
function Jn(e) {
|
|
1643
1643
|
return e && {
|
|
1644
1644
|
qfq: "2",
|
|
1645
1645
|
hfq: "1",
|
|
1646
1646
|
none: "3"
|
|
1647
1647
|
}[e] || "3";
|
|
1648
1648
|
}
|
|
1649
|
-
function
|
|
1650
|
-
let t =
|
|
1649
|
+
function Yn(e) {
|
|
1650
|
+
let t = Gn(e.date), n = (e) => {
|
|
1651
1651
|
let t = parseFloat(e);
|
|
1652
1652
|
return Number.isNaN(t) ? 0 : t;
|
|
1653
1653
|
};
|
|
1654
1654
|
return {
|
|
1655
|
-
timestamp:
|
|
1655
|
+
timestamp: Kn(t),
|
|
1656
1656
|
stockCode: e.code,
|
|
1657
1657
|
open: n(e.open),
|
|
1658
1658
|
high: n(e.high),
|
|
@@ -1664,30 +1664,30 @@ function Xn(e) {
|
|
|
1664
1664
|
turnoverRate: n(e.turn)
|
|
1665
1665
|
};
|
|
1666
1666
|
}
|
|
1667
|
-
var
|
|
1668
|
-
async function
|
|
1669
|
-
let { timeout: t, ...n } = e, r = `${
|
|
1667
|
+
var Xn = "", Zn = "/api/stock/kdata";
|
|
1668
|
+
async function Qn(e) {
|
|
1669
|
+
let { timeout: t, ...n } = e, r = `${Xn}${Zn}`, i = {
|
|
1670
1670
|
stock_code: n.symbol,
|
|
1671
1671
|
start_date: n.start_date,
|
|
1672
1672
|
end_date: n.end_date,
|
|
1673
|
-
frequency:
|
|
1674
|
-
adjustflag:
|
|
1673
|
+
frequency: qn(n.period),
|
|
1674
|
+
adjustflag: Jn(n.adjust),
|
|
1675
1675
|
timeout: t
|
|
1676
1676
|
};
|
|
1677
1677
|
try {
|
|
1678
|
-
let e = (await
|
|
1678
|
+
let e = (await K.get(r, {
|
|
1679
1679
|
params: i,
|
|
1680
1680
|
timeout: t ? t * 1e3 : void 0
|
|
1681
1681
|
})).data;
|
|
1682
1682
|
if (!e.success) throw Error(`获取K线数据失败: ${e.error_msg || "未知错误"} (code: ${e.error_code})`);
|
|
1683
|
-
return !e.data || e.data.length === 0 ? [] : e.data.map(
|
|
1683
|
+
return !e.data || e.data.length === 0 ? [] : e.data.map(Yn).sort((e, t) => e.timestamp - t.timestamp);
|
|
1684
1684
|
} catch (e) {
|
|
1685
|
-
throw
|
|
1685
|
+
throw K.isAxiosError(e) ? Error(`获取K线数据失败: ${e.message}`) : e;
|
|
1686
1686
|
}
|
|
1687
1687
|
}
|
|
1688
1688
|
//#endregion
|
|
1689
1689
|
//#region src/types/price.ts
|
|
1690
|
-
function
|
|
1690
|
+
function $n(e) {
|
|
1691
1691
|
return e.map((e) => ({
|
|
1692
1692
|
timestamp: e.timestamp,
|
|
1693
1693
|
open: e.open,
|
|
@@ -1705,23 +1705,23 @@ function er(e) {
|
|
|
1705
1705
|
}
|
|
1706
1706
|
//#endregion
|
|
1707
1707
|
//#region src/api/data/kLine.ts
|
|
1708
|
-
var
|
|
1709
|
-
function
|
|
1708
|
+
var er = "/api/public/stock_zh_a_hist";
|
|
1709
|
+
function tr(e) {
|
|
1710
1710
|
if (/^\d{8}$/.test(e)) return `${e.slice(0, 4)}-${e.slice(4, 6)}-${e.slice(6, 8)}`;
|
|
1711
1711
|
if (/^\d{4}-\d{2}-\d{2}T/.test(e)) return e.slice(0, 10);
|
|
1712
1712
|
if (/^\d{4}-\d{2}-\d{2}$/.test(e)) return e;
|
|
1713
1713
|
let t = new Date(e);
|
|
1714
1714
|
return Number.isNaN(t.getTime()) ? e : t.toISOString().slice(0, 10);
|
|
1715
1715
|
}
|
|
1716
|
-
function
|
|
1716
|
+
function nr(e) {
|
|
1717
1717
|
let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e);
|
|
1718
1718
|
if (!t) throw Error(`无法解析日期: ${e}`);
|
|
1719
1719
|
let n = Number(t[1]), r = Number(t[2]), i = Number(t[3]);
|
|
1720
1720
|
return Date.UTC(n, r - 1, i, -8, 0, 0, 0);
|
|
1721
1721
|
}
|
|
1722
|
-
function
|
|
1722
|
+
function rr(e) {
|
|
1723
1723
|
return {
|
|
1724
|
-
timestamp:
|
|
1724
|
+
timestamp: nr(tr(e.日期)),
|
|
1725
1725
|
stockCode: e.股票代码,
|
|
1726
1726
|
open: e.开盘,
|
|
1727
1727
|
close: e.收盘,
|
|
@@ -1735,23 +1735,23 @@ function ir(e) {
|
|
|
1735
1735
|
turnoverRate: e.换手率
|
|
1736
1736
|
};
|
|
1737
1737
|
}
|
|
1738
|
-
async function
|
|
1738
|
+
async function ir(e) {
|
|
1739
1739
|
try {
|
|
1740
1740
|
let { timeout: t, ...n } = e;
|
|
1741
|
-
return (await
|
|
1741
|
+
return (await K.get(er, {
|
|
1742
1742
|
params: n,
|
|
1743
1743
|
timeout: t ? t * 1e3 : void 0
|
|
1744
|
-
})).data.map(
|
|
1744
|
+
})).data.map(rr);
|
|
1745
1745
|
} catch (e) {
|
|
1746
|
-
throw
|
|
1746
|
+
throw K.isAxiosError(e) ? Error(`获取K线数据失败: ${e.message}`) : e;
|
|
1747
1747
|
}
|
|
1748
1748
|
}
|
|
1749
1749
|
//#endregion
|
|
1750
1750
|
//#region src/api/data/unified.ts
|
|
1751
|
-
var
|
|
1751
|
+
var ar = class {
|
|
1752
1752
|
name = "baostock";
|
|
1753
1753
|
async fetchKLineData(e) {
|
|
1754
|
-
return
|
|
1754
|
+
return Qn({
|
|
1755
1755
|
symbol: this.addMarketPrefix(e.symbol),
|
|
1756
1756
|
start_date: e.startDate,
|
|
1757
1757
|
end_date: e.endDate,
|
|
@@ -1771,7 +1771,7 @@ var or = class {
|
|
|
1771
1771
|
addMarketPrefix(e) {
|
|
1772
1772
|
return /^(6|68)\d{5}$/.test(e) ? `sh.${e}` : /^(0|3)\d{5}$/.test(e) ? `sz.${e}` : e;
|
|
1773
1773
|
}
|
|
1774
|
-
},
|
|
1774
|
+
}, or = class {
|
|
1775
1775
|
name = "dongcai";
|
|
1776
1776
|
async fetchKLineData(e) {
|
|
1777
1777
|
let t = e.startDate.replace(/-/g, ""), n = e.endDate.replace(/-/g, ""), r = {
|
|
@@ -1780,7 +1780,7 @@ var or = class {
|
|
|
1780
1780
|
monthly: "monthly"
|
|
1781
1781
|
}[e.period];
|
|
1782
1782
|
if (!r) throw Error(`东财数据源不支持周期: ${e.period}`);
|
|
1783
|
-
return
|
|
1783
|
+
return $n(await ir({
|
|
1784
1784
|
symbol: e.symbol,
|
|
1785
1785
|
start_date: t,
|
|
1786
1786
|
end_date: n,
|
|
@@ -1789,27 +1789,27 @@ var or = class {
|
|
|
1789
1789
|
timeout: e.timeout
|
|
1790
1790
|
}));
|
|
1791
1791
|
}
|
|
1792
|
-
},
|
|
1792
|
+
}, sr = class {
|
|
1793
1793
|
static instances = /* @__PURE__ */ new Map();
|
|
1794
1794
|
static create(e) {
|
|
1795
1795
|
if (!this.instances.has(e)) switch (e) {
|
|
1796
1796
|
case "baostock":
|
|
1797
|
-
this.instances.set(e, new
|
|
1797
|
+
this.instances.set(e, new ar());
|
|
1798
1798
|
break;
|
|
1799
1799
|
case "dongcai":
|
|
1800
|
-
this.instances.set(e, new
|
|
1800
|
+
this.instances.set(e, new or());
|
|
1801
1801
|
break;
|
|
1802
1802
|
default: throw Error(`未知的数据源类型: ${e}`);
|
|
1803
1803
|
}
|
|
1804
1804
|
return this.instances.get(e);
|
|
1805
1805
|
}
|
|
1806
1806
|
};
|
|
1807
|
-
async function
|
|
1808
|
-
return
|
|
1807
|
+
async function cr(e, t) {
|
|
1808
|
+
return sr.create(e).fetchKLineData(t);
|
|
1809
1809
|
}
|
|
1810
1810
|
//#endregion
|
|
1811
1811
|
//#region node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/code.js
|
|
1812
|
-
var
|
|
1812
|
+
var lr = /* @__PURE__ */ M(((e) => {
|
|
1813
1813
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.regexpCode = e.getEsmExportName = e.getProperty = e.safeStringify = e.stringify = e.strConcat = e.addCodeArg = e.str = e._ = e.nil = e._Code = e.Name = e.IDENTIFIER = e._CodeOrName = void 0;
|
|
1814
1814
|
var t = class {};
|
|
1815
1815
|
e._CodeOrName = t, e.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
|
|
@@ -1914,9 +1914,9 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
1914
1914
|
return new r(e.toString());
|
|
1915
1915
|
}
|
|
1916
1916
|
e.regexpCode = g;
|
|
1917
|
-
})),
|
|
1917
|
+
})), ur = /* @__PURE__ */ M(((e) => {
|
|
1918
1918
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.ValueScope = e.ValueScopeName = e.Scope = e.varKinds = e.UsedValueState = void 0;
|
|
1919
|
-
var t =
|
|
1919
|
+
var t = lr(), n = class extends Error {
|
|
1920
1920
|
constructor(e) {
|
|
1921
1921
|
super(`CodeGen: "code" for ${e} not defined`), this.value = e.value;
|
|
1922
1922
|
}
|
|
@@ -2025,9 +2025,9 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
2025
2025
|
return c;
|
|
2026
2026
|
}
|
|
2027
2027
|
};
|
|
2028
|
-
})),
|
|
2028
|
+
})), q = /* @__PURE__ */ M(((e) => {
|
|
2029
2029
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.or = e.and = e.not = e.CodeGen = e.operators = e.varKinds = e.ValueScopeName = e.ValueScope = e.Scope = e.Name = e.regexpCode = e.stringify = e.getProperty = e.nil = e.strConcat = e.str = e._ = void 0;
|
|
2030
|
-
var t =
|
|
2030
|
+
var t = lr(), n = ur(), r = lr();
|
|
2031
2031
|
Object.defineProperty(e, "_", {
|
|
2032
2032
|
enumerable: !0,
|
|
2033
2033
|
get: function() {
|
|
@@ -2069,7 +2069,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
2069
2069
|
return r.Name;
|
|
2070
2070
|
}
|
|
2071
2071
|
});
|
|
2072
|
-
var i =
|
|
2072
|
+
var i = ur();
|
|
2073
2073
|
Object.defineProperty(e, "Scope", {
|
|
2074
2074
|
enumerable: !0,
|
|
2075
2075
|
get: function() {
|
|
@@ -2521,28 +2521,28 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
2521
2521
|
for (let n in t) e[n] = (e[n] || 0) - (t[n] || 0);
|
|
2522
2522
|
}
|
|
2523
2523
|
function j(e) {
|
|
2524
|
-
return typeof e == "boolean" || typeof e == "number" || e === null ? !e : (0, t._)`!${
|
|
2524
|
+
return typeof e == "boolean" || typeof e == "number" || e === null ? !e : (0, t._)`!${F(e)}`;
|
|
2525
2525
|
}
|
|
2526
2526
|
e.not = j;
|
|
2527
|
-
var M =
|
|
2527
|
+
var M = P(e.operators.AND);
|
|
2528
2528
|
function N(...e) {
|
|
2529
2529
|
return e.reduce(M);
|
|
2530
2530
|
}
|
|
2531
2531
|
e.and = N;
|
|
2532
|
-
var
|
|
2533
|
-
function
|
|
2534
|
-
return e.reduce(
|
|
2532
|
+
var ee = P(e.operators.OR);
|
|
2533
|
+
function te(...e) {
|
|
2534
|
+
return e.reduce(ee);
|
|
2535
2535
|
}
|
|
2536
|
-
e.or =
|
|
2537
|
-
function
|
|
2538
|
-
return (n, r) => n === t.nil ? r : r === t.nil ? n : (0, t._)`${
|
|
2536
|
+
e.or = te;
|
|
2537
|
+
function P(e) {
|
|
2538
|
+
return (n, r) => n === t.nil ? r : r === t.nil ? n : (0, t._)`${F(n)} ${e} ${F(r)}`;
|
|
2539
2539
|
}
|
|
2540
|
-
function
|
|
2540
|
+
function F(e) {
|
|
2541
2541
|
return e instanceof t.Name ? e : (0, t._)`(${e})`;
|
|
2542
2542
|
}
|
|
2543
|
-
})),
|
|
2543
|
+
})), J = /* @__PURE__ */ M(((e) => {
|
|
2544
2544
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.checkStrictMode = e.getErrorPath = e.Type = e.useFunc = e.setEvaluated = e.evaluatedPropsToName = e.mergeEvaluated = e.eachItem = e.unescapeJsonPointer = e.escapeJsonPointer = e.escapeFragment = e.unescapeFragment = e.schemaRefOrVal = e.schemaHasRulesButRef = e.schemaHasRules = e.checkUnknownRules = e.alwaysValidSchema = e.toHash = void 0;
|
|
2545
|
-
var t =
|
|
2545
|
+
var t = q(), n = lr();
|
|
2546
2546
|
function r(e) {
|
|
2547
2547
|
let t = {};
|
|
2548
2548
|
for (let n of e) t[n] = !0;
|
|
@@ -2665,9 +2665,9 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
2665
2665
|
}
|
|
2666
2666
|
}
|
|
2667
2667
|
e.checkStrictMode = x;
|
|
2668
|
-
})),
|
|
2668
|
+
})), dr = /* @__PURE__ */ M(((e) => {
|
|
2669
2669
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
2670
|
-
var t =
|
|
2670
|
+
var t = q();
|
|
2671
2671
|
e.default = {
|
|
2672
2672
|
data: new t.Name("data"),
|
|
2673
2673
|
valCxt: new t.Name("valCxt"),
|
|
@@ -2686,9 +2686,9 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
2686
2686
|
jsonLen: new t.Name("jsonLen"),
|
|
2687
2687
|
jsonPart: new t.Name("jsonPart")
|
|
2688
2688
|
};
|
|
2689
|
-
})),
|
|
2689
|
+
})), fr = /* @__PURE__ */ M(((e) => {
|
|
2690
2690
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.extendErrors = e.resetErrorsCount = e.reportExtraError = e.reportError = e.keyword$DataError = e.keywordError = void 0;
|
|
2691
|
-
var t =
|
|
2691
|
+
var t = q(), n = J(), r = dr();
|
|
2692
2692
|
e.keywordError = { message: ({ keyword: e }) => (0, t.str)`must pass "${e}" keyword validation` }, e.keyword$DataError = { message: ({ keyword: e, schemaType: n }) => n ? (0, t.str)`"${e}" keyword must be ${n} ($data)` : (0, t.str)`"${e}" keyword is invalid ($data)` };
|
|
2693
2693
|
function i(n, r = e.keywordError, i, a) {
|
|
2694
2694
|
let { it: o } = n, { gen: s, compositeRule: u, allErrors: f } = o, p = d(n, r, i);
|
|
@@ -2750,9 +2750,9 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
2750
2750
|
let { keyword: o, data: s, schemaValue: c, it: l } = e, { opts: d, propertyName: f, topSchemaRef: p, schemaPath: m } = l;
|
|
2751
2751
|
a.push([u.keyword, o], [u.params, typeof n == "function" ? n(e) : n || (0, t._)`{}`]), d.messages && a.push([u.message, typeof i == "function" ? i(e) : i]), d.verbose && a.push([u.schema, c], [u.parentSchema, (0, t._)`${p}${m}`], [r.default.data, s]), f && a.push([u.propertyName, f]);
|
|
2752
2752
|
}
|
|
2753
|
-
})),
|
|
2753
|
+
})), pr = /* @__PURE__ */ M(((e) => {
|
|
2754
2754
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.boolOrEmptySchema = e.topBoolOrEmptySchema = void 0;
|
|
2755
|
-
var t =
|
|
2755
|
+
var t = fr(), n = q(), r = dr(), i = { message: "boolean schema is false" };
|
|
2756
2756
|
function a(e) {
|
|
2757
2757
|
let { gen: t, schema: i, validateName: a } = e;
|
|
2758
2758
|
i === !1 ? s(e, !1) : typeof i == "object" && i.$async === !0 ? t.return(r.default.data) : (t.assign((0, n._)`${a}.errors`, null), t.return(!0));
|
|
@@ -2776,7 +2776,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
2776
2776
|
};
|
|
2777
2777
|
(0, t.reportError)(o, i, void 0, n);
|
|
2778
2778
|
}
|
|
2779
|
-
})),
|
|
2779
|
+
})), mr = /* @__PURE__ */ M(((e) => {
|
|
2780
2780
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.getRules = e.isJSONType = void 0;
|
|
2781
2781
|
var t = new Set([
|
|
2782
2782
|
"string",
|
|
@@ -2830,7 +2830,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
2830
2830
|
};
|
|
2831
2831
|
}
|
|
2832
2832
|
e.getRules = r;
|
|
2833
|
-
})),
|
|
2833
|
+
})), hr = /* @__PURE__ */ M(((e) => {
|
|
2834
2834
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.shouldUseRule = e.shouldUseGroup = e.schemaHasRulesForType = void 0;
|
|
2835
2835
|
function t({ schema: e, self: t }, r) {
|
|
2836
2836
|
let i = t.RULES.types[r];
|
|
@@ -2845,9 +2845,9 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
2845
2845
|
return e[t.keyword] !== void 0 || t.definition.implements?.some((t) => e[t] !== void 0);
|
|
2846
2846
|
}
|
|
2847
2847
|
e.shouldUseRule = r;
|
|
2848
|
-
})),
|
|
2848
|
+
})), gr = /* @__PURE__ */ M(((e) => {
|
|
2849
2849
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.reportTypeError = e.checkDataTypes = e.checkDataType = e.coerceAndCheckDataType = e.getJSONTypes = e.getSchemaTypes = e.DataType = void 0;
|
|
2850
|
-
var t =
|
|
2850
|
+
var t = mr(), n = hr(), r = fr(), i = q(), a = J(), o;
|
|
2851
2851
|
(function(e) {
|
|
2852
2852
|
e[e.Correct = 0] = "Correct", e[e.Wrong = 1] = "Wrong";
|
|
2853
2853
|
})(o || (e.DataType = o = {}));
|
|
@@ -2982,9 +2982,9 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
2982
2982
|
it: e
|
|
2983
2983
|
};
|
|
2984
2984
|
}
|
|
2985
|
-
})),
|
|
2985
|
+
})), _r = /* @__PURE__ */ M(((e) => {
|
|
2986
2986
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.assignDefaults = void 0;
|
|
2987
|
-
var t =
|
|
2987
|
+
var t = q(), n = J();
|
|
2988
2988
|
function r(e, t) {
|
|
2989
2989
|
let { properties: n, items: r } = e.schema;
|
|
2990
2990
|
if (t === "object" && n) for (let t in n) i(e, t, n[t].default);
|
|
@@ -3002,9 +3002,9 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
3002
3002
|
let u = (0, t._)`${l} === undefined`;
|
|
3003
3003
|
c.useDefaults === "empty" && (u = (0, t._)`${u} || ${l} === null || ${l} === ""`), a.if(u, (0, t._)`${l} = ${(0, t.stringify)(i)}`);
|
|
3004
3004
|
}
|
|
3005
|
-
})),
|
|
3005
|
+
})), vr = /* @__PURE__ */ M(((e) => {
|
|
3006
3006
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.validateUnion = e.validateArray = e.usePattern = e.callValidateCode = e.schemaProperties = e.allSchemaProperties = e.noPropertyInData = e.propertyInData = e.isOwnProperty = e.hasPropFunc = e.reportMissingProp = e.checkMissingProp = e.checkReportMissingProp = void 0;
|
|
3007
|
-
var t =
|
|
3007
|
+
var t = q(), n = J(), r = dr(), i = J();
|
|
3008
3008
|
function a(e, n) {
|
|
3009
3009
|
let { gen: r, data: i, it: a } = e;
|
|
3010
3010
|
r.if(d(r, i, n, a.opts.ownProperties), () => {
|
|
@@ -3108,7 +3108,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
3108
3108
|
e.validateUnion = v;
|
|
3109
3109
|
})), yr = /* @__PURE__ */ M(((e) => {
|
|
3110
3110
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.validateKeywordUsage = e.validSchemaType = e.funcKeywordCode = e.macroKeywordCode = void 0;
|
|
3111
|
-
var t =
|
|
3111
|
+
var t = q(), n = dr(), r = vr(), i = fr();
|
|
3112
3112
|
function a(e, n) {
|
|
3113
3113
|
let { gen: r, keyword: i, schema: a, parentSchema: o, it: s } = e, c = n.macro.call(s.self, a, o, s), l = u(r, i, c);
|
|
3114
3114
|
s.opts.validateSchema !== !1 && s.self.validateSchema(c, !0);
|
|
@@ -3189,7 +3189,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
3189
3189
|
e.validateKeywordUsage = f;
|
|
3190
3190
|
})), br = /* @__PURE__ */ M(((e) => {
|
|
3191
3191
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.extendSubschemaMode = e.extendSubschemaData = e.getSubschema = void 0;
|
|
3192
|
-
var t =
|
|
3192
|
+
var t = q(), n = J();
|
|
3193
3193
|
function r(e, { keyword: r, schemaProp: i, schema: a, schemaPath: o, errSchemaPath: s, topSchemaRef: c }) {
|
|
3194
3194
|
if (r !== void 0 && a !== void 0) throw Error("both \"keyword\" and \"schema\" passed, only one allowed");
|
|
3195
3195
|
if (r !== void 0) {
|
|
@@ -3322,7 +3322,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
3322
3322
|
}
|
|
3323
3323
|
})), Cr = /* @__PURE__ */ M(((e) => {
|
|
3324
3324
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.getSchemaRefs = e.resolveUrl = e.normalizeId = e._getFullPath = e.getFullPath = e.inlineRef = void 0;
|
|
3325
|
-
var t =
|
|
3325
|
+
var t = J(), n = xr(), r = Sr(), i = new Set([
|
|
3326
3326
|
"type",
|
|
3327
3327
|
"format",
|
|
3328
3328
|
"pattern",
|
|
@@ -3413,7 +3413,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
3413
3413
|
e.getSchemaRefs = h;
|
|
3414
3414
|
})), wr = /* @__PURE__ */ M(((e) => {
|
|
3415
3415
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.getData = e.KeywordCxt = e.validateFunctionCode = void 0;
|
|
3416
|
-
var t =
|
|
3416
|
+
var t = pr(), n = gr(), r = hr(), i = gr(), a = _r(), o = yr(), s = br(), c = q(), l = dr(), u = Cr(), d = J(), f = fr();
|
|
3417
3417
|
function p(e) {
|
|
3418
3418
|
if (S(e) && (w(e), x(e))) {
|
|
3419
3419
|
_(e);
|
|
@@ -3513,51 +3513,51 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
3513
3513
|
function N(e, t, n, a) {
|
|
3514
3514
|
let { gen: o, schema: s, data: u, allErrors: f, opts: p, self: m } = e, { RULES: h } = m;
|
|
3515
3515
|
if (s.$ref && (p.ignoreKeywordsWithRef || !(0, d.schemaHasRulesButRef)(s, h))) {
|
|
3516
|
-
o.block(() =>
|
|
3516
|
+
o.block(() => L(e, "$ref", h.all.$ref.definition));
|
|
3517
3517
|
return;
|
|
3518
3518
|
}
|
|
3519
|
-
p.jtd ||
|
|
3519
|
+
p.jtd || te(e, t), o.block(() => {
|
|
3520
3520
|
for (let e of h.rules) g(e);
|
|
3521
3521
|
g(h.post);
|
|
3522
3522
|
});
|
|
3523
3523
|
function g(d) {
|
|
3524
|
-
(0, r.shouldUseGroup)(s, d) && (d.type ? (o.if((0, i.checkDataType)(d.type, u, p.strictNumbers)),
|
|
3524
|
+
(0, r.shouldUseGroup)(s, d) && (d.type ? (o.if((0, i.checkDataType)(d.type, u, p.strictNumbers)), ee(e, d), t.length === 1 && t[0] === d.type && n && (o.else(), (0, i.reportTypeError)(e)), o.endIf()) : ee(e, d), f || o.if((0, c._)`${l.default.errors} === ${a || 0}`));
|
|
3525
3525
|
}
|
|
3526
3526
|
}
|
|
3527
|
-
function
|
|
3527
|
+
function ee(e, t) {
|
|
3528
3528
|
let { gen: n, schema: i, opts: { useDefaults: o } } = e;
|
|
3529
3529
|
o && (0, a.assignDefaults)(e, t.type), n.block(() => {
|
|
3530
|
-
for (let n of t.rules) (0, r.shouldUseRule)(i, n) &&
|
|
3530
|
+
for (let n of t.rules) (0, r.shouldUseRule)(i, n) && L(e, n.keyword, n.definition, t.type);
|
|
3531
3531
|
});
|
|
3532
3532
|
}
|
|
3533
|
-
function ee(e, t) {
|
|
3534
|
-
e.schemaEnv.meta || !e.opts.strictTypes || (te(e, t), e.opts.allowUnionTypes || ne(e, t), re(e, e.dataTypes));
|
|
3535
|
-
}
|
|
3536
3533
|
function te(e, t) {
|
|
3534
|
+
e.schemaEnv.meta || !e.opts.strictTypes || (P(e, t), e.opts.allowUnionTypes || F(e, t), ne(e, e.dataTypes));
|
|
3535
|
+
}
|
|
3536
|
+
function P(e, t) {
|
|
3537
3537
|
if (t.length) {
|
|
3538
3538
|
if (!e.dataTypes.length) {
|
|
3539
3539
|
e.dataTypes = t;
|
|
3540
3540
|
return;
|
|
3541
3541
|
}
|
|
3542
3542
|
t.forEach((t) => {
|
|
3543
|
-
ie(e.dataTypes, t) ||
|
|
3543
|
+
ie(e.dataTypes, t) || I(e, `type "${t}" not allowed by context "${e.dataTypes.join(",")}"`);
|
|
3544
3544
|
}), ae(e, t);
|
|
3545
3545
|
}
|
|
3546
3546
|
}
|
|
3547
|
-
function
|
|
3548
|
-
t.length > 1 && !(t.length === 2 && t.includes("null")) &&
|
|
3547
|
+
function F(e, t) {
|
|
3548
|
+
t.length > 1 && !(t.length === 2 && t.includes("null")) && I(e, "use allowUnionTypes to allow union type keyword");
|
|
3549
3549
|
}
|
|
3550
|
-
function
|
|
3550
|
+
function ne(e, t) {
|
|
3551
3551
|
let n = e.self.RULES.all;
|
|
3552
3552
|
for (let i in n) {
|
|
3553
3553
|
let a = n[i];
|
|
3554
3554
|
if (typeof a == "object" && (0, r.shouldUseRule)(e.schema, a)) {
|
|
3555
3555
|
let { type: n } = a.definition;
|
|
3556
|
-
n.length && !n.some((e) =>
|
|
3556
|
+
n.length && !n.some((e) => re(t, e)) && I(e, `missing type "${n.join(",")}" for keyword "${i}"`);
|
|
3557
3557
|
}
|
|
3558
3558
|
}
|
|
3559
3559
|
}
|
|
3560
|
-
function
|
|
3560
|
+
function re(e, t) {
|
|
3561
3561
|
return e.includes(t) || t === "number" && e.includes("integer");
|
|
3562
3562
|
}
|
|
3563
3563
|
function ie(e, t) {
|
|
@@ -3568,13 +3568,13 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
3568
3568
|
for (let r of e.dataTypes) ie(t, r) ? n.push(r) : t.includes("integer") && r === "number" && n.push("integer");
|
|
3569
3569
|
e.dataTypes = n;
|
|
3570
3570
|
}
|
|
3571
|
-
function
|
|
3571
|
+
function I(e, t) {
|
|
3572
3572
|
let n = e.schemaEnv.baseId + e.errSchemaPath;
|
|
3573
3573
|
t += ` at "${n}" (strictTypes)`, (0, d.checkStrictMode)(e, t, e.opts.strictTypes);
|
|
3574
3574
|
}
|
|
3575
|
-
var
|
|
3575
|
+
var oe = class {
|
|
3576
3576
|
constructor(e, t, n) {
|
|
3577
|
-
if ((0, o.validateKeywordUsage)(e, t, n), this.gen = e.gen, this.allErrors = e.allErrors, this.keyword = n, this.data = e.data, this.schema = e.schema[n], this.$data = t.$data && e.opts.$data && this.schema && this.schema.$data, this.schemaValue = (0, d.schemaRefOrVal)(e, this.schema, n, this.$data), this.schemaType = t.schemaType, this.parentSchema = e.schema, this.params = {}, this.it = e, this.def = t, this.$data) this.schemaCode = e.gen.const("vSchema",
|
|
3577
|
+
if ((0, o.validateKeywordUsage)(e, t, n), this.gen = e.gen, this.allErrors = e.allErrors, this.keyword = n, this.data = e.data, this.schema = e.schema[n], this.$data = t.$data && e.opts.$data && this.schema && this.schema.$data, this.schemaValue = (0, d.schemaRefOrVal)(e, this.schema, n, this.$data), this.schemaType = t.schemaType, this.parentSchema = e.schema, this.params = {}, this.it = e, this.def = t, this.$data) this.schemaCode = e.gen.const("vSchema", le(this.$data, e));
|
|
3578
3578
|
else if (this.schemaCode = this.schemaValue, !(0, o.validSchemaType)(this.schema, t.schemaType, t.allowUndefined)) throw Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);
|
|
3579
3579
|
("code" in t ? t.trackErrors : t.errors !== !1) && (this.errsCount = e.gen.const("_errs", l.default.errors));
|
|
3580
3580
|
}
|
|
@@ -3672,20 +3672,20 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
3672
3672
|
if (n.opts.unevaluated && (n.props !== !0 || n.items !== !0)) return r.if(t, () => this.mergeEvaluated(e, c.Name)), !0;
|
|
3673
3673
|
}
|
|
3674
3674
|
};
|
|
3675
|
-
e.KeywordCxt =
|
|
3676
|
-
function
|
|
3677
|
-
let i = new
|
|
3675
|
+
e.KeywordCxt = oe;
|
|
3676
|
+
function L(e, t, n, r) {
|
|
3677
|
+
let i = new oe(e, n, t);
|
|
3678
3678
|
"code" in n ? n.code(i, r) : i.$data && n.validate ? (0, o.funcKeywordCode)(i, n) : "macro" in n ? (0, o.macroKeywordCode)(i, n) : (n.compile || n.validate) && (0, o.funcKeywordCode)(i, n);
|
|
3679
3679
|
}
|
|
3680
|
-
var
|
|
3681
|
-
function
|
|
3680
|
+
var se = /^\/(?:[^~]|~0|~1)*$/, ce = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
|
|
3681
|
+
function le(e, { dataLevel: t, dataNames: n, dataPathArr: r }) {
|
|
3682
3682
|
let i, a;
|
|
3683
3683
|
if (e === "") return l.default.rootData;
|
|
3684
3684
|
if (e[0] === "/") {
|
|
3685
|
-
if (!
|
|
3685
|
+
if (!se.test(e)) throw Error(`Invalid JSON-pointer: ${e}`);
|
|
3686
3686
|
i = e, a = l.default.rootData;
|
|
3687
3687
|
} else {
|
|
3688
|
-
let o =
|
|
3688
|
+
let o = ce.exec(e);
|
|
3689
3689
|
if (!o) throw Error(`Invalid JSON-pointer: ${e}`);
|
|
3690
3690
|
let s = +o[1];
|
|
3691
3691
|
if (i = o[2], i === "#") {
|
|
@@ -3702,7 +3702,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
3702
3702
|
return `Cannot access ${e} ${n} levels up, current level is ${t}`;
|
|
3703
3703
|
}
|
|
3704
3704
|
}
|
|
3705
|
-
e.getData =
|
|
3705
|
+
e.getData = le;
|
|
3706
3706
|
})), Tr = /* @__PURE__ */ M(((e) => {
|
|
3707
3707
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = class extends Error {
|
|
3708
3708
|
constructor(e) {
|
|
@@ -3719,7 +3719,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
3719
3719
|
};
|
|
3720
3720
|
})), Dr = /* @__PURE__ */ M(((e) => {
|
|
3721
3721
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.resolveSchema = e.getCompilingSchema = e.resolveRef = e.compileSchema = e.SchemaEnv = void 0;
|
|
3722
|
-
var t =
|
|
3722
|
+
var t = q(), n = Tr(), r = dr(), i = Cr(), a = J(), o = wr(), s = class {
|
|
3723
3723
|
constructor(e) {
|
|
3724
3724
|
this.refs = {}, this.dynamicAnchors = {};
|
|
3725
3725
|
let t;
|
|
@@ -4266,7 +4266,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
4266
4266
|
return t.KeywordCxt;
|
|
4267
4267
|
}
|
|
4268
4268
|
});
|
|
4269
|
-
var n =
|
|
4269
|
+
var n = q();
|
|
4270
4270
|
Object.defineProperty(e, "_", {
|
|
4271
4271
|
enumerable: !0,
|
|
4272
4272
|
get: function() {
|
|
@@ -4298,7 +4298,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
4298
4298
|
return n.CodeGen;
|
|
4299
4299
|
}
|
|
4300
4300
|
});
|
|
4301
|
-
var r = Tr(), i = Er(), a =
|
|
4301
|
+
var r = Tr(), i = Er(), a = mr(), o = Dr(), s = q(), c = Cr(), l = gr(), u = J(), d = (Fr(), P(Or).default), f = zr(), p = (e, t) => new RegExp(e, t);
|
|
4302
4302
|
p.code = "new RegExp";
|
|
4303
4303
|
var m = [
|
|
4304
4304
|
"removeAdditional",
|
|
@@ -4551,7 +4551,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
4551
4551
|
let t = n[e];
|
|
4552
4552
|
if (typeof t != "object") continue;
|
|
4553
4553
|
let { $data: r } = t.definition, a = i[e];
|
|
4554
|
-
r && a && (i[e] =
|
|
4554
|
+
r && a && (i[e] = te(a));
|
|
4555
4555
|
}
|
|
4556
4556
|
}
|
|
4557
4557
|
return e;
|
|
@@ -4678,11 +4678,11 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
4678
4678
|
}
|
|
4679
4679
|
function N(e) {
|
|
4680
4680
|
let { metaSchema: t } = e;
|
|
4681
|
-
t !== void 0 && (e.$data && this.opts.$data && (t =
|
|
4681
|
+
t !== void 0 && (e.$data && this.opts.$data && (t = te(t)), e.validateSchema = this.compile(t, !0));
|
|
4682
4682
|
}
|
|
4683
|
-
var
|
|
4684
|
-
function
|
|
4685
|
-
return { anyOf: [e,
|
|
4683
|
+
var ee = { $ref: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#" };
|
|
4684
|
+
function te(e) {
|
|
4685
|
+
return { anyOf: [e, ee] };
|
|
4686
4686
|
}
|
|
4687
4687
|
})), Vr = /* @__PURE__ */ M(((e) => {
|
|
4688
4688
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = {
|
|
@@ -4693,7 +4693,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
4693
4693
|
};
|
|
4694
4694
|
})), Hr = /* @__PURE__ */ M(((e) => {
|
|
4695
4695
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.callRef = e.getValidate = void 0;
|
|
4696
|
-
var t = Er(), n =
|
|
4696
|
+
var t = Er(), n = vr(), r = q(), i = dr(), a = Dr(), o = J(), s = {
|
|
4697
4697
|
keyword: "$ref",
|
|
4698
4698
|
schemaType: "string",
|
|
4699
4699
|
code(e) {
|
|
@@ -4781,7 +4781,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
4781
4781
|
];
|
|
4782
4782
|
})), Wr = /* @__PURE__ */ M(((e) => {
|
|
4783
4783
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
4784
|
-
var t =
|
|
4784
|
+
var t = q(), n = t.operators, r = {
|
|
4785
4785
|
maximum: {
|
|
4786
4786
|
okStr: "<=",
|
|
4787
4787
|
ok: n.LTE,
|
|
@@ -4819,7 +4819,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
4819
4819
|
};
|
|
4820
4820
|
})), Gr = /* @__PURE__ */ M(((e) => {
|
|
4821
4821
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
4822
|
-
var t =
|
|
4822
|
+
var t = q();
|
|
4823
4823
|
e.default = {
|
|
4824
4824
|
keyword: "multipleOf",
|
|
4825
4825
|
type: "number",
|
|
@@ -4844,7 +4844,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
4844
4844
|
e.default = t, t.code = "require(\"ajv/dist/runtime/ucs2length\").default";
|
|
4845
4845
|
})), qr = /* @__PURE__ */ M(((e) => {
|
|
4846
4846
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
4847
|
-
var t =
|
|
4847
|
+
var t = q(), n = J(), r = Kr();
|
|
4848
4848
|
e.default = {
|
|
4849
4849
|
keyword: ["maxLength", "minLength"],
|
|
4850
4850
|
type: "string",
|
|
@@ -4864,7 +4864,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
4864
4864
|
};
|
|
4865
4865
|
})), Jr = /* @__PURE__ */ M(((e) => {
|
|
4866
4866
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
4867
|
-
var t =
|
|
4867
|
+
var t = vr(), n = J(), r = q();
|
|
4868
4868
|
e.default = {
|
|
4869
4869
|
keyword: "pattern",
|
|
4870
4870
|
type: "string",
|
|
@@ -4887,7 +4887,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
4887
4887
|
};
|
|
4888
4888
|
})), Yr = /* @__PURE__ */ M(((e) => {
|
|
4889
4889
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
4890
|
-
var t =
|
|
4890
|
+
var t = q();
|
|
4891
4891
|
e.default = {
|
|
4892
4892
|
keyword: ["maxProperties", "minProperties"],
|
|
4893
4893
|
type: "object",
|
|
@@ -4907,7 +4907,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
4907
4907
|
};
|
|
4908
4908
|
})), Xr = /* @__PURE__ */ M(((e) => {
|
|
4909
4909
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
4910
|
-
var t =
|
|
4910
|
+
var t = vr(), n = q(), r = J();
|
|
4911
4911
|
e.default = {
|
|
4912
4912
|
keyword: "required",
|
|
4913
4913
|
type: "object",
|
|
@@ -4955,7 +4955,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
4955
4955
|
};
|
|
4956
4956
|
})), Zr = /* @__PURE__ */ M(((e) => {
|
|
4957
4957
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
4958
|
-
var t =
|
|
4958
|
+
var t = q();
|
|
4959
4959
|
e.default = {
|
|
4960
4960
|
keyword: ["maxItems", "minItems"],
|
|
4961
4961
|
type: "array",
|
|
@@ -4979,7 +4979,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
4979
4979
|
t.code = "require(\"ajv/dist/runtime/equal\").default", e.default = t;
|
|
4980
4980
|
})), $r = /* @__PURE__ */ M(((e) => {
|
|
4981
4981
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
4982
|
-
var t =
|
|
4982
|
+
var t = gr(), n = q(), r = J(), i = Qr();
|
|
4983
4983
|
e.default = {
|
|
4984
4984
|
keyword: "uniqueItems",
|
|
4985
4985
|
type: "array",
|
|
@@ -5022,7 +5022,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
5022
5022
|
};
|
|
5023
5023
|
})), ei = /* @__PURE__ */ M(((e) => {
|
|
5024
5024
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
5025
|
-
var t =
|
|
5025
|
+
var t = q(), n = J(), r = Qr();
|
|
5026
5026
|
e.default = {
|
|
5027
5027
|
keyword: "const",
|
|
5028
5028
|
$data: !0,
|
|
@@ -5037,7 +5037,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
5037
5037
|
};
|
|
5038
5038
|
})), ti = /* @__PURE__ */ M(((e) => {
|
|
5039
5039
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
5040
|
-
var t =
|
|
5040
|
+
var t = q(), n = J(), r = Qr();
|
|
5041
5041
|
e.default = {
|
|
5042
5042
|
keyword: "enum",
|
|
5043
5043
|
schemaType: "array",
|
|
@@ -5092,7 +5092,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
5092
5092
|
];
|
|
5093
5093
|
})), ri = /* @__PURE__ */ M(((e) => {
|
|
5094
5094
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.validateAdditionalItems = void 0;
|
|
5095
|
-
var t =
|
|
5095
|
+
var t = q(), n = J(), r = {
|
|
5096
5096
|
keyword: "additionalItems",
|
|
5097
5097
|
type: "array",
|
|
5098
5098
|
schemaType: ["boolean", "object"],
|
|
@@ -5132,7 +5132,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
5132
5132
|
e.validateAdditionalItems = i, e.default = r;
|
|
5133
5133
|
})), ii = /* @__PURE__ */ M(((e) => {
|
|
5134
5134
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.validateTuple = void 0;
|
|
5135
|
-
var t =
|
|
5135
|
+
var t = q(), n = J(), r = vr(), i = {
|
|
5136
5136
|
keyword: "items",
|
|
5137
5137
|
type: "array",
|
|
5138
5138
|
schemaType: [
|
|
@@ -5179,7 +5179,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
5179
5179
|
};
|
|
5180
5180
|
})), oi = /* @__PURE__ */ M(((e) => {
|
|
5181
5181
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
5182
|
-
var t =
|
|
5182
|
+
var t = q(), n = J(), r = vr(), i = ri();
|
|
5183
5183
|
e.default = {
|
|
5184
5184
|
keyword: "items",
|
|
5185
5185
|
type: "array",
|
|
@@ -5196,7 +5196,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
5196
5196
|
};
|
|
5197
5197
|
})), si = /* @__PURE__ */ M(((e) => {
|
|
5198
5198
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
5199
|
-
var t =
|
|
5199
|
+
var t = q(), n = J();
|
|
5200
5200
|
e.default = {
|
|
5201
5201
|
keyword: "contains",
|
|
5202
5202
|
type: "array",
|
|
@@ -5251,7 +5251,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
5251
5251
|
};
|
|
5252
5252
|
})), ci = /* @__PURE__ */ M(((e) => {
|
|
5253
5253
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.validateSchemaDeps = e.validatePropertyDeps = e.error = void 0;
|
|
5254
|
-
var t =
|
|
5254
|
+
var t = q(), n = J(), r = vr();
|
|
5255
5255
|
e.error = {
|
|
5256
5256
|
message: ({ params: { property: e, depsCount: n, deps: r } }) => {
|
|
5257
5257
|
let i = n === 1 ? "property" : "properties";
|
|
@@ -5312,7 +5312,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
5312
5312
|
e.validateSchemaDeps = s, e.default = i;
|
|
5313
5313
|
})), li = /* @__PURE__ */ M(((e) => {
|
|
5314
5314
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
5315
|
-
var t =
|
|
5315
|
+
var t = q(), n = J();
|
|
5316
5316
|
e.default = {
|
|
5317
5317
|
keyword: "propertyNames",
|
|
5318
5318
|
type: "object",
|
|
@@ -5340,7 +5340,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
5340
5340
|
};
|
|
5341
5341
|
})), ui = /* @__PURE__ */ M(((e) => {
|
|
5342
5342
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
5343
|
-
var t =
|
|
5343
|
+
var t = vr(), n = q(), r = dr(), i = J();
|
|
5344
5344
|
e.default = {
|
|
5345
5345
|
keyword: "additionalProperties",
|
|
5346
5346
|
type: ["object"],
|
|
@@ -5407,7 +5407,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
5407
5407
|
};
|
|
5408
5408
|
})), di = /* @__PURE__ */ M(((e) => {
|
|
5409
5409
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
5410
|
-
var t = wr(), n =
|
|
5410
|
+
var t = wr(), n = vr(), r = J(), i = ui();
|
|
5411
5411
|
e.default = {
|
|
5412
5412
|
keyword: "properties",
|
|
5413
5413
|
type: "object",
|
|
@@ -5436,7 +5436,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
5436
5436
|
};
|
|
5437
5437
|
})), fi = /* @__PURE__ */ M(((e) => {
|
|
5438
5438
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
5439
|
-
var t =
|
|
5439
|
+
var t = vr(), n = q(), r = J(), i = J();
|
|
5440
5440
|
e.default = {
|
|
5441
5441
|
keyword: "patternProperties",
|
|
5442
5442
|
type: "object",
|
|
@@ -5471,7 +5471,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
5471
5471
|
};
|
|
5472
5472
|
})), pi = /* @__PURE__ */ M(((e) => {
|
|
5473
5473
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
5474
|
-
var t =
|
|
5474
|
+
var t = J();
|
|
5475
5475
|
e.default = {
|
|
5476
5476
|
keyword: "not",
|
|
5477
5477
|
schemaType: ["object", "boolean"],
|
|
@@ -5497,12 +5497,12 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
5497
5497
|
keyword: "anyOf",
|
|
5498
5498
|
schemaType: "array",
|
|
5499
5499
|
trackErrors: !0,
|
|
5500
|
-
code:
|
|
5500
|
+
code: vr().validateUnion,
|
|
5501
5501
|
error: { message: "must match a schema in anyOf" }
|
|
5502
5502
|
};
|
|
5503
5503
|
})), hi = /* @__PURE__ */ M(((e) => {
|
|
5504
5504
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
5505
|
-
var t =
|
|
5505
|
+
var t = q(), n = J();
|
|
5506
5506
|
e.default = {
|
|
5507
5507
|
keyword: "oneOf",
|
|
5508
5508
|
schemaType: "array",
|
|
@@ -5534,7 +5534,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
5534
5534
|
};
|
|
5535
5535
|
})), gi = /* @__PURE__ */ M(((e) => {
|
|
5536
5536
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
5537
|
-
var t =
|
|
5537
|
+
var t = J();
|
|
5538
5538
|
e.default = {
|
|
5539
5539
|
keyword: "allOf",
|
|
5540
5540
|
schemaType: "array",
|
|
@@ -5555,7 +5555,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
5555
5555
|
};
|
|
5556
5556
|
})), _i = /* @__PURE__ */ M(((e) => {
|
|
5557
5557
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
5558
|
-
var t =
|
|
5558
|
+
var t = q(), n = J(), r = {
|
|
5559
5559
|
keyword: "if",
|
|
5560
5560
|
schemaType: ["object", "boolean"],
|
|
5561
5561
|
trackErrors: !0,
|
|
@@ -5598,7 +5598,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
5598
5598
|
e.default = r;
|
|
5599
5599
|
})), vi = /* @__PURE__ */ M(((e) => {
|
|
5600
5600
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
5601
|
-
var t =
|
|
5601
|
+
var t = J();
|
|
5602
5602
|
e.default = {
|
|
5603
5603
|
keyword: ["then", "else"],
|
|
5604
5604
|
schemaType: ["object", "boolean"],
|
|
@@ -5628,7 +5628,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
5628
5628
|
e.default = _;
|
|
5629
5629
|
})), bi = /* @__PURE__ */ M(((e) => {
|
|
5630
5630
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
5631
|
-
var t =
|
|
5631
|
+
var t = q();
|
|
5632
5632
|
e.default = {
|
|
5633
5633
|
keyword: "format",
|
|
5634
5634
|
type: ["number", "string"],
|
|
@@ -5736,7 +5736,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
5736
5736
|
})(t || (e.DiscrError = t = {}));
|
|
5737
5737
|
})), Ti = /* @__PURE__ */ M(((e) => {
|
|
5738
5738
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
5739
|
-
var t =
|
|
5739
|
+
var t = q(), n = wi(), r = Dr(), i = Er(), a = J();
|
|
5740
5740
|
e.default = {
|
|
5741
5741
|
keyword: "discriminator",
|
|
5742
5742
|
type: "object",
|
|
@@ -5947,9 +5947,9 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
5947
5947
|
properties: Mi,
|
|
5948
5948
|
default: !0
|
|
5949
5949
|
};
|
|
5950
|
-
})), Fi = /* @__PURE__ */
|
|
5950
|
+
})), Fi = /* @__PURE__ */ te((/* @__PURE__ */ M(((e, t) => {
|
|
5951
5951
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.MissingRefError = e.ValidationError = e.CodeGen = e.Name = e.nil = e.stringify = e.str = e._ = e.KeywordCxt = e.Ajv = void 0;
|
|
5952
|
-
var n = Br(), r = Ci(), i = Ti(), a = (Pi(),
|
|
5952
|
+
var n = Br(), r = Ci(), i = Ti(), a = (Pi(), P(Ei).default), o = ["/properties"], s = "http://json-schema.org/draft-07/schema", c = class extends n.default {
|
|
5953
5953
|
_addVocabularies() {
|
|
5954
5954
|
super._addVocabularies(), r.default.forEach((e) => this.addVocabulary(e)), this.opts.discriminator && this.addKeyword(i.default);
|
|
5955
5955
|
}
|
|
@@ -5970,7 +5970,7 @@ var ur = /* @__PURE__ */ M(((e) => {
|
|
|
5970
5970
|
return l.KeywordCxt;
|
|
5971
5971
|
}
|
|
5972
5972
|
});
|
|
5973
|
-
var u =
|
|
5973
|
+
var u = q();
|
|
5974
5974
|
Object.defineProperty(e, "_", {
|
|
5975
5975
|
enumerable: !0,
|
|
5976
5976
|
get: function() {
|
|
@@ -6586,7 +6586,7 @@ var Vi = (typeof document < "u" ? document.createElement("canvas") : null)?.getC
|
|
|
6586
6586
|
validator;
|
|
6587
6587
|
events;
|
|
6588
6588
|
constructor(e) {
|
|
6589
|
-
this.chart = e, this.validator = new Hi(), this.events = new
|
|
6589
|
+
this.chart = e, this.validator = new Hi(), this.events = new F();
|
|
6590
6590
|
}
|
|
6591
6591
|
async applyConfig(e) {
|
|
6592
6592
|
let t = this.validator.validate(e);
|
|
@@ -6617,7 +6617,7 @@ var Vi = (typeof document < "u" ? document.createElement("canvas") : null)?.getC
|
|
|
6617
6617
|
}
|
|
6618
6618
|
async doApplyConfig(e) {
|
|
6619
6619
|
console.log("[Semantic] doApplyConfig start, data config:", e.data);
|
|
6620
|
-
let t = await
|
|
6620
|
+
let t = await cr(e.data.source, {
|
|
6621
6621
|
symbol: e.data.symbol,
|
|
6622
6622
|
startDate: e.data.startDate,
|
|
6623
6623
|
endDate: e.data.endDate,
|
|
@@ -6942,7 +6942,7 @@ var oa = Symbol("global-pane"), Y = {
|
|
|
6942
6942
|
configManager;
|
|
6943
6943
|
isDestroyed = !1;
|
|
6944
6944
|
constructor() {
|
|
6945
|
-
this.registry = new sa(), this.eventBus = new
|
|
6945
|
+
this.registry = new sa(), this.eventBus = new F(), this.hookSystem = new ca(), this.configManager = new la();
|
|
6946
6946
|
}
|
|
6947
6947
|
events = {
|
|
6948
6948
|
on: (e, t) => {
|
|
@@ -7707,18 +7707,36 @@ var Qa = { class: "kline-tooltip__title" }, $a = { key: 0 }, eo = { class: "klin
|
|
|
7707
7707
|
_: 1
|
|
7708
7708
|
})]));
|
|
7709
7709
|
}
|
|
7710
|
-
}), [["__scopeId", "data-v-730f2212"]]), Ro = { class: "indicator-selector" }, zo = { class: "indicator-
|
|
7710
|
+
}), [["__scopeId", "data-v-730f2212"]]), Ro = { class: "indicator-selector" }, zo = { class: "indicator-scroll-container" }, Bo = { class: "indicator-list" }, Vo = ["onMouseenter"], Ho = { class: "btn-content" }, Uo = {
|
|
7711
|
+
key: 0,
|
|
7712
|
+
class: "param-hint"
|
|
7713
|
+
}, Wo = {
|
|
7714
|
+
key: 0,
|
|
7715
|
+
class: "hover-overlay"
|
|
7716
|
+
}, Go = ["onClick"], Ko = {
|
|
7717
|
+
key: 1,
|
|
7718
|
+
class: "divider"
|
|
7719
|
+
}, qo = ["onClick"], Jo = { class: "indicator-item" }, Yo = { class: "menu-section" }, Xo = { class: "menu-items" }, Zo = ["disabled", "onClick"], Qo = {
|
|
7720
|
+
key: 0,
|
|
7721
|
+
class: "param-hint"
|
|
7722
|
+
}, $o = {
|
|
7723
|
+
key: 1,
|
|
7724
|
+
class: "active-tag"
|
|
7725
|
+
}, es = { class: "menu-section" }, ts = { class: "menu-items" }, ns = ["disabled", "onClick"], rs = {
|
|
7711
7726
|
key: 0,
|
|
7712
7727
|
class: "param-hint"
|
|
7713
|
-
},
|
|
7728
|
+
}, is = {
|
|
7729
|
+
key: 1,
|
|
7730
|
+
class: "active-tag"
|
|
7731
|
+
}, as = /* @__PURE__ */ po(/* @__PURE__ */ u({
|
|
7714
7732
|
__name: "IndicatorSelector",
|
|
7715
7733
|
props: {
|
|
7716
7734
|
activeIndicators: {},
|
|
7717
7735
|
indicatorParams: {}
|
|
7718
7736
|
},
|
|
7719
7737
|
emits: ["toggle", "updateParams"],
|
|
7720
|
-
setup(
|
|
7721
|
-
let
|
|
7738
|
+
setup(u, { emit: d }) {
|
|
7739
|
+
let y = [
|
|
7722
7740
|
{
|
|
7723
7741
|
id: "MA",
|
|
7724
7742
|
label: "MA",
|
|
@@ -7738,6 +7756,7 @@ var Qa = { class: "kline-tooltip__title" }, $a = { key: 0 }, eo = { class: "klin
|
|
|
7738
7756
|
min: 2,
|
|
7739
7757
|
max: 100,
|
|
7740
7758
|
step: 1,
|
|
7759
|
+
default: 20,
|
|
7741
7760
|
description: "计算移动平均线的周期数,周期越长轨道越平滑"
|
|
7742
7761
|
}, {
|
|
7743
7762
|
key: "multiplier",
|
|
@@ -7746,6 +7765,7 @@ var Qa = { class: "kline-tooltip__title" }, $a = { key: 0 }, eo = { class: "klin
|
|
|
7746
7765
|
min: .1,
|
|
7747
7766
|
max: 5,
|
|
7748
7767
|
step: .1,
|
|
7768
|
+
default: 2,
|
|
7749
7769
|
description: "标准差倍数,决定轨道宽度,通常为 2"
|
|
7750
7770
|
}]
|
|
7751
7771
|
},
|
|
@@ -7763,6 +7783,7 @@ var Qa = { class: "kline-tooltip__title" }, $a = { key: 0 }, eo = { class: "klin
|
|
|
7763
7783
|
min: 2,
|
|
7764
7784
|
max: 50,
|
|
7765
7785
|
step: 1,
|
|
7786
|
+
default: 12,
|
|
7766
7787
|
description: "快线 EMA 周期,对价格变化更敏感"
|
|
7767
7788
|
},
|
|
7768
7789
|
{
|
|
@@ -7772,6 +7793,7 @@ var Qa = { class: "kline-tooltip__title" }, $a = { key: 0 }, eo = { class: "klin
|
|
|
7772
7793
|
min: 2,
|
|
7773
7794
|
max: 100,
|
|
7774
7795
|
step: 1,
|
|
7796
|
+
default: 26,
|
|
7775
7797
|
description: "慢线 EMA 周期,用于计算 DIF"
|
|
7776
7798
|
},
|
|
7777
7799
|
{
|
|
@@ -7781,6 +7803,7 @@ var Qa = { class: "kline-tooltip__title" }, $a = { key: 0 }, eo = { class: "klin
|
|
|
7781
7803
|
min: 2,
|
|
7782
7804
|
max: 50,
|
|
7783
7805
|
step: 1,
|
|
7806
|
+
default: 9,
|
|
7784
7807
|
description: "DEA 的 EMA 周期,用于生成买卖信号"
|
|
7785
7808
|
}
|
|
7786
7809
|
]
|
|
@@ -7799,6 +7822,7 @@ var Qa = { class: "kline-tooltip__title" }, $a = { key: 0 }, eo = { class: "klin
|
|
|
7799
7822
|
min: 2,
|
|
7800
7823
|
max: 100,
|
|
7801
7824
|
step: 1,
|
|
7825
|
+
default: 6,
|
|
7802
7826
|
description: "第一条 RSI 周期,通常为 6(快线)"
|
|
7803
7827
|
},
|
|
7804
7828
|
{
|
|
@@ -7808,6 +7832,7 @@ var Qa = { class: "kline-tooltip__title" }, $a = { key: 0 }, eo = { class: "klin
|
|
|
7808
7832
|
min: 2,
|
|
7809
7833
|
max: 100,
|
|
7810
7834
|
step: 1,
|
|
7835
|
+
default: 12,
|
|
7811
7836
|
description: "第二条 RSI 周期,通常为 12(中线)"
|
|
7812
7837
|
},
|
|
7813
7838
|
{
|
|
@@ -7817,6 +7842,7 @@ var Qa = { class: "kline-tooltip__title" }, $a = { key: 0 }, eo = { class: "klin
|
|
|
7817
7842
|
min: 2,
|
|
7818
7843
|
max: 100,
|
|
7819
7844
|
step: 1,
|
|
7845
|
+
default: 24,
|
|
7820
7846
|
description: "第三条 RSI 周期,通常为 24(慢线)"
|
|
7821
7847
|
}
|
|
7822
7848
|
]
|
|
@@ -7834,6 +7860,7 @@ var Qa = { class: "kline-tooltip__title" }, $a = { key: 0 }, eo = { class: "klin
|
|
|
7834
7860
|
min: 2,
|
|
7835
7861
|
max: 100,
|
|
7836
7862
|
step: 1,
|
|
7863
|
+
default: 14,
|
|
7837
7864
|
description: "计算周期,周期越短信号越灵敏"
|
|
7838
7865
|
}]
|
|
7839
7866
|
},
|
|
@@ -7850,6 +7877,7 @@ var Qa = { class: "kline-tooltip__title" }, $a = { key: 0 }, eo = { class: "klin
|
|
|
7850
7877
|
min: 2,
|
|
7851
7878
|
max: 100,
|
|
7852
7879
|
step: 1,
|
|
7880
|
+
default: 9,
|
|
7853
7881
|
description: "计算 K 值的周期,统计 N 日内价格区间"
|
|
7854
7882
|
}, {
|
|
7855
7883
|
key: "m",
|
|
@@ -7858,6 +7886,7 @@ var Qa = { class: "kline-tooltip__title" }, $a = { key: 0 }, eo = { class: "klin
|
|
|
7858
7886
|
min: 1,
|
|
7859
7887
|
max: 50,
|
|
7860
7888
|
step: 1,
|
|
7889
|
+
default: 3,
|
|
7861
7890
|
description: "D 值是 K 的 M 日移动平均,使信号更平滑"
|
|
7862
7891
|
}]
|
|
7863
7892
|
},
|
|
@@ -7874,6 +7903,7 @@ var Qa = { class: "kline-tooltip__title" }, $a = { key: 0 }, eo = { class: "klin
|
|
|
7874
7903
|
min: 2,
|
|
7875
7904
|
max: 100,
|
|
7876
7905
|
step: 1,
|
|
7906
|
+
default: 10,
|
|
7877
7907
|
description: "与多少日前价格比较,周期越短越灵敏"
|
|
7878
7908
|
}]
|
|
7879
7909
|
},
|
|
@@ -7890,6 +7920,7 @@ var Qa = { class: "kline-tooltip__title" }, $a = { key: 0 }, eo = { class: "klin
|
|
|
7890
7920
|
min: 2,
|
|
7891
7921
|
max: 100,
|
|
7892
7922
|
step: 1,
|
|
7923
|
+
default: 14,
|
|
7893
7924
|
description: "回溯周期,统计周期内最高最低价"
|
|
7894
7925
|
}]
|
|
7895
7926
|
},
|
|
@@ -7907,6 +7938,7 @@ var Qa = { class: "kline-tooltip__title" }, $a = { key: 0 }, eo = { class: "klin
|
|
|
7907
7938
|
min: 2,
|
|
7908
7939
|
max: 100,
|
|
7909
7940
|
step: 1,
|
|
7941
|
+
default: 10,
|
|
7910
7942
|
description: "短期变化率周期"
|
|
7911
7943
|
},
|
|
7912
7944
|
{
|
|
@@ -7916,6 +7948,7 @@ var Qa = { class: "kline-tooltip__title" }, $a = { key: 0 }, eo = { class: "klin
|
|
|
7916
7948
|
min: 2,
|
|
7917
7949
|
max: 100,
|
|
7918
7950
|
step: 1,
|
|
7951
|
+
default: 15,
|
|
7919
7952
|
description: "中短期变化率周期"
|
|
7920
7953
|
},
|
|
7921
7954
|
{
|
|
@@ -7925,6 +7958,7 @@ var Qa = { class: "kline-tooltip__title" }, $a = { key: 0 }, eo = { class: "klin
|
|
|
7925
7958
|
min: 2,
|
|
7926
7959
|
max: 100,
|
|
7927
7960
|
step: 1,
|
|
7961
|
+
default: 20,
|
|
7928
7962
|
description: "中长期变化率周期"
|
|
7929
7963
|
},
|
|
7930
7964
|
{
|
|
@@ -7934,6 +7968,7 @@ var Qa = { class: "kline-tooltip__title" }, $a = { key: 0 }, eo = { class: "klin
|
|
|
7934
7968
|
min: 2,
|
|
7935
7969
|
max: 100,
|
|
7936
7970
|
step: 1,
|
|
7971
|
+
default: 30,
|
|
7937
7972
|
description: "长期变化率周期"
|
|
7938
7973
|
},
|
|
7939
7974
|
{
|
|
@@ -7943,6 +7978,7 @@ var Qa = { class: "kline-tooltip__title" }, $a = { key: 0 }, eo = { class: "klin
|
|
|
7943
7978
|
min: 2,
|
|
7944
7979
|
max: 50,
|
|
7945
7980
|
step: 1,
|
|
7981
|
+
default: 9,
|
|
7946
7982
|
description: "信号线的 SMA 周期"
|
|
7947
7983
|
}
|
|
7948
7984
|
]
|
|
@@ -7960,81 +7996,182 @@ var Qa = { class: "kline-tooltip__title" }, $a = { key: 0 }, eo = { class: "klin
|
|
|
7960
7996
|
min: 2,
|
|
7961
7997
|
max: 100,
|
|
7962
7998
|
step: 1,
|
|
7999
|
+
default: 9,
|
|
7963
8000
|
description: "计算周期,周期越短越敏感"
|
|
7964
8001
|
}]
|
|
7965
8002
|
}
|
|
7966
|
-
],
|
|
7967
|
-
|
|
7968
|
-
|
|
8003
|
+
], 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 = _({
|
|
8004
|
+
left: "0",
|
|
8005
|
+
bottom: "0"
|
|
8006
|
+
}), te = r(() => E.activeIndicators?.length ? E.activeIndicators.map((e) => y.find((t) => t.id === e)).filter((e) => e !== void 0) : []), P = r(() => j.value && y.find((e) => e.id === j.value) || null);
|
|
8007
|
+
function F(e) {
|
|
8008
|
+
return E.activeIndicators?.includes(e) ?? !1;
|
|
7969
8009
|
}
|
|
7970
|
-
function
|
|
7971
|
-
|
|
7972
|
-
|
|
8010
|
+
function ne(e) {
|
|
8011
|
+
if (F(e)) return;
|
|
8012
|
+
let t = y.find((t) => t.id === e);
|
|
8013
|
+
t && (t.pane === "main" && y.filter((t) => t.pane === "main" && t.id !== e && F(t.id)).forEach((e) => D("toggle", e.id, !1)), D("toggle", e, !0), N.value = !1);
|
|
7973
8014
|
}
|
|
7974
|
-
function
|
|
7975
|
-
|
|
8015
|
+
function re(e) {
|
|
8016
|
+
D("toggle", e, !1);
|
|
7976
8017
|
}
|
|
7977
|
-
function
|
|
7978
|
-
|
|
7979
|
-
|
|
8018
|
+
function ie(e) {
|
|
8019
|
+
j.value = e, A.value = !0;
|
|
8020
|
+
}
|
|
8021
|
+
function ae(e) {
|
|
8022
|
+
let t = y.find((t) => t.id === e);
|
|
8023
|
+
if (!t?.params) return {};
|
|
8024
|
+
let n = {};
|
|
8025
|
+
for (let e of t.params) n[e.key] = e.default ?? e.min ?? 1;
|
|
7980
8026
|
return {
|
|
7981
|
-
...
|
|
7982
|
-
...
|
|
8027
|
+
...n,
|
|
8028
|
+
...E.indicatorParams?.[e] || {}
|
|
7983
8029
|
};
|
|
7984
8030
|
}
|
|
7985
|
-
function
|
|
7986
|
-
let t =
|
|
7987
|
-
return e.params ? e.params.map((e) => t[e.key]).join(",") : "";
|
|
8031
|
+
function I(e) {
|
|
8032
|
+
let t = ae(e.id);
|
|
8033
|
+
return e.params ? e.params.map((e) => t[e.key] ?? "").join(",") : "";
|
|
7988
8034
|
}
|
|
7989
|
-
function
|
|
7990
|
-
|
|
7991
|
-
}
|
|
7992
|
-
|
|
7993
|
-
|
|
7994
|
-
|
|
7995
|
-
|
|
7996
|
-
|
|
7997
|
-
|
|
7998
|
-
|
|
7999
|
-
|
|
8000
|
-
|
|
8001
|
-
}
|
|
8002
|
-
|
|
8003
|
-
|
|
8004
|
-
|
|
8005
|
-
}
|
|
8006
|
-
|
|
8007
|
-
|
|
8008
|
-
|
|
8009
|
-
|
|
8010
|
-
|
|
8011
|
-
|
|
8012
|
-
|
|
8013
|
-
|
|
8014
|
-
"
|
|
8015
|
-
|
|
8016
|
-
|
|
8017
|
-
|
|
8018
|
-
|
|
8019
|
-
|
|
8020
|
-
|
|
8021
|
-
"
|
|
8022
|
-
|
|
8023
|
-
|
|
8024
|
-
"
|
|
8025
|
-
|
|
8026
|
-
|
|
8027
|
-
|
|
8028
|
-
|
|
8029
|
-
|
|
8035
|
+
function oe(e) {
|
|
8036
|
+
j.value && D("updateParams", j.value, e), A.value = !1;
|
|
8037
|
+
}
|
|
8038
|
+
function L() {
|
|
8039
|
+
if (!N.value && O.value) {
|
|
8040
|
+
let e = O.value.getBoundingClientRect(), t = window.innerWidth, n = e.left + e.width / 2;
|
|
8041
|
+
n + 160 > t - 8 && (n = t - 160 - 8), n - 160 < 8 && (n = 168), ee.value = {
|
|
8042
|
+
left: `${n}px`,
|
|
8043
|
+
bottom: `${window.innerHeight - e.top + 8}px`
|
|
8044
|
+
};
|
|
8045
|
+
}
|
|
8046
|
+
N.value = !N.value;
|
|
8047
|
+
}
|
|
8048
|
+
function se(e) {
|
|
8049
|
+
let t = k.value && !k.value.contains(e.target), n = O.value && !O.value.contains(e.target);
|
|
8050
|
+
t && n && (N.value = !1);
|
|
8051
|
+
}
|
|
8052
|
+
function ce() {
|
|
8053
|
+
N.value &&= !1;
|
|
8054
|
+
}
|
|
8055
|
+
return m(() => {
|
|
8056
|
+
document.addEventListener("click", se), window.addEventListener("resize", ce);
|
|
8057
|
+
}), h(() => {
|
|
8058
|
+
document.removeEventListener("click", se), window.removeEventListener("resize", ce);
|
|
8059
|
+
}), (r, u) => (g(), o("div", Ro, [
|
|
8060
|
+
s("div", zo, [s("div", Bo, [(g(!0), o(e, null, v(te.value, (e) => (g(), o("div", {
|
|
8061
|
+
key: e.id,
|
|
8062
|
+
class: "indicator-item"
|
|
8063
|
+
}, [s("div", {
|
|
8064
|
+
class: "indicator-btn-wrapper",
|
|
8065
|
+
onMouseenter: (t) => M.value = e.id,
|
|
8066
|
+
onMouseleave: u[0] ||= (e) => M.value = null
|
|
8067
|
+
}, [s("button", { class: f(["indicator-btn", {
|
|
8068
|
+
active: !0,
|
|
8069
|
+
hovering: M.value === e.id
|
|
8070
|
+
}]) }, [s("span", Ho, [c(b(e.label) + " ", 1), e.params ? (g(), o("span", Uo, " (" + b(I(e)) + ") ", 1)) : a("", !0)]), l(n, { name: "fade" }, {
|
|
8071
|
+
default: C(() => [M.value === e.id ? (g(), o("div", Wo, [
|
|
8072
|
+
e.params ? (g(), o("button", {
|
|
8073
|
+
key: 0,
|
|
8074
|
+
class: "action-btn settings-btn",
|
|
8075
|
+
onClick: w((t) => ie(e.id), ["stop"]),
|
|
8076
|
+
title: "编辑参数"
|
|
8077
|
+
}, [...u[2] ||= [s("svg", {
|
|
8078
|
+
viewBox: "0 0 24 24",
|
|
8079
|
+
width: "14",
|
|
8080
|
+
height: "14",
|
|
8081
|
+
fill: "currentColor"
|
|
8082
|
+
}, [s("path", { d: "M19.14 12.94c.04-.31.06-.63.06-.94 0-.31-.02-.63-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.04.31-.06.63-.06.94s.02.63.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z" })], -1)]], 8, Go)) : a("", !0),
|
|
8083
|
+
e.params ? (g(), o("span", Ko)) : a("", !0),
|
|
8084
|
+
s("button", {
|
|
8085
|
+
class: "action-btn remove-btn",
|
|
8086
|
+
onClick: w((t) => re(e.id), ["stop"]),
|
|
8087
|
+
title: "移除指标"
|
|
8088
|
+
}, [...u[3] ||= [s("svg", {
|
|
8089
|
+
viewBox: "0 0 24 24",
|
|
8090
|
+
width: "14",
|
|
8091
|
+
height: "14",
|
|
8092
|
+
fill: "currentColor"
|
|
8093
|
+
}, [s("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" })], -1)]], 8, qo)
|
|
8094
|
+
])) : a("", !0)]),
|
|
8095
|
+
_: 2
|
|
8096
|
+
}, 1024)], 2)], 40, Vo)]))), 128)), s("div", Jo, [s("button", {
|
|
8097
|
+
ref_key: "addBtnRef",
|
|
8098
|
+
ref: O,
|
|
8099
|
+
class: "add-btn",
|
|
8100
|
+
onClick: L,
|
|
8101
|
+
title: "添加指标"
|
|
8102
|
+
}, [...u[4] ||= [s("svg", {
|
|
8103
|
+
viewBox: "0 0 24 24",
|
|
8104
|
+
width: "16",
|
|
8105
|
+
height: "16",
|
|
8106
|
+
fill: "currentColor"
|
|
8107
|
+
}, [s("path", { d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" })], -1)]], 512)])])]),
|
|
8108
|
+
(g(), i(t, { to: "body" }, [l(n, { name: "slide" }, {
|
|
8109
|
+
default: C(() => [N.value ? (g(), o("div", {
|
|
8110
|
+
key: 0,
|
|
8111
|
+
class: "add-menu",
|
|
8112
|
+
ref_key: "addMenuRef",
|
|
8113
|
+
ref: k,
|
|
8114
|
+
style: p(ee.value)
|
|
8115
|
+
}, [s("div", Yo, [u[6] ||= s("div", { class: "menu-title" }, "主图指标", -1), s("div", Xo, [(g(!0), o(e, null, v(x(S), (e) => (g(), o("button", {
|
|
8116
|
+
key: e.id,
|
|
8117
|
+
class: f(["menu-item", { disabled: F(e.id) }]),
|
|
8118
|
+
disabled: F(e.id),
|
|
8119
|
+
onClick: (t) => ne(e.id)
|
|
8120
|
+
}, [
|
|
8121
|
+
c(b(e.label) + " ", 1),
|
|
8122
|
+
e.params ? (g(), o("span", Qo, " (" + b(e.name) + ") ", 1)) : a("", !0),
|
|
8123
|
+
F(e.id) ? (g(), o("span", $o, [...u[5] ||= [s("svg", {
|
|
8124
|
+
viewBox: "0 0 24 24",
|
|
8125
|
+
width: "14",
|
|
8126
|
+
height: "14",
|
|
8127
|
+
fill: "currentColor"
|
|
8128
|
+
}, [s("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" })], -1)]])) : a("", !0)
|
|
8129
|
+
], 10, Zo))), 128))])]), s("div", es, [u[8] ||= s("div", { class: "menu-title" }, "副图指标", -1), s("div", ts, [(g(!0), o(e, null, v(x(T), (e) => (g(), o("button", {
|
|
8130
|
+
key: e.id,
|
|
8131
|
+
class: f(["menu-item", { disabled: F(e.id) }]),
|
|
8132
|
+
disabled: F(e.id),
|
|
8133
|
+
onClick: (t) => ne(e.id)
|
|
8134
|
+
}, [
|
|
8135
|
+
c(b(e.label) + " ", 1),
|
|
8136
|
+
e.params ? (g(), o("span", rs, " (" + b(e.name) + ") ", 1)) : a("", !0),
|
|
8137
|
+
F(e.id) ? (g(), o("span", is, [...u[7] ||= [s("svg", {
|
|
8138
|
+
viewBox: "0 0 24 24",
|
|
8139
|
+
width: "14",
|
|
8140
|
+
height: "14",
|
|
8141
|
+
fill: "currentColor"
|
|
8142
|
+
}, [s("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" })], -1)]])) : a("", !0)
|
|
8143
|
+
], 10, ns))), 128))])])], 4)) : a("", !0)]),
|
|
8144
|
+
_: 1
|
|
8145
|
+
})])),
|
|
8146
|
+
P.value ? (g(), i(Lo, {
|
|
8147
|
+
key: 0,
|
|
8148
|
+
visible: A.value,
|
|
8149
|
+
"indicator-id": P.value.id,
|
|
8150
|
+
"indicator-name": P.value.name,
|
|
8151
|
+
"indicator-description": P.value.description,
|
|
8152
|
+
params: P.value.params || [],
|
|
8153
|
+
values: ae(P.value.id),
|
|
8154
|
+
onClose: u[1] ||= (e) => A.value = !1,
|
|
8155
|
+
onConfirm: oe
|
|
8156
|
+
}, null, 8, [
|
|
8157
|
+
"visible",
|
|
8158
|
+
"indicator-id",
|
|
8159
|
+
"indicator-name",
|
|
8160
|
+
"indicator-description",
|
|
8161
|
+
"params",
|
|
8162
|
+
"values"
|
|
8163
|
+
])) : a("", !0)
|
|
8164
|
+
]));
|
|
8165
|
+
}
|
|
8166
|
+
}), [["__scopeId", "data-v-ef3141f5"]]);
|
|
8030
8167
|
//#endregion
|
|
8031
8168
|
//#region src/core/utils/klineConfig.ts
|
|
8032
|
-
function
|
|
8169
|
+
function os(e, t) {
|
|
8033
8170
|
let n = Math.round(e * t);
|
|
8034
8171
|
return n % 2 == 0 && (n += 1), Math.max(1, n);
|
|
8035
8172
|
}
|
|
8036
|
-
function
|
|
8037
|
-
let r =
|
|
8173
|
+
function ss(e, t, n) {
|
|
8174
|
+
let r = os(e, n), i = Math.round(t * n), a = r + i, o = i;
|
|
8038
8175
|
return {
|
|
8039
8176
|
kWidthPx: r,
|
|
8040
8177
|
kGapPx: i,
|
|
@@ -8048,14 +8185,14 @@ function Go(e, t, n) {
|
|
|
8048
8185
|
}
|
|
8049
8186
|
//#endregion
|
|
8050
8187
|
//#region src/core/viewport/viewport.ts
|
|
8051
|
-
function
|
|
8052
|
-
let { unitPx: o, startXPx: s } =
|
|
8188
|
+
function cs(e, t, n, r, i, a = 1) {
|
|
8189
|
+
let { unitPx: o, startXPx: s } = ss(n, r, a), c = e * a, l = t * a;
|
|
8053
8190
|
return {
|
|
8054
8191
|
start: Math.max(0, Math.floor((c - s) / o) - 1),
|
|
8055
8192
|
end: Math.min(i, Math.ceil((c + l - s) / o) + 1)
|
|
8056
8193
|
};
|
|
8057
8194
|
}
|
|
8058
|
-
function
|
|
8195
|
+
function ls(e, t, n) {
|
|
8059
8196
|
let r = -Infinity, i = Infinity;
|
|
8060
8197
|
for (let a = t; a < n && a < e.length; a++) {
|
|
8061
8198
|
let t = e[a];
|
|
@@ -8071,7 +8208,7 @@ function qo(e, t, n) {
|
|
|
8071
8208
|
}
|
|
8072
8209
|
//#endregion
|
|
8073
8210
|
//#region src/core/scale/priceScale.ts
|
|
8074
|
-
var
|
|
8211
|
+
var us = class {
|
|
8075
8212
|
range = {
|
|
8076
8213
|
maxPrice: 100,
|
|
8077
8214
|
minPrice: 0
|
|
@@ -8105,7 +8242,7 @@ var Jo = class {
|
|
|
8105
8242
|
let { maxPrice: t, minPrice: n } = this.range, r = t - n || 1, i = Math.max(1, this.height - this.paddingTop - this.paddingBottom);
|
|
8106
8243
|
return n + (1 - (e - this.paddingTop) / i) * r;
|
|
8107
8244
|
}
|
|
8108
|
-
},
|
|
8245
|
+
}, ds = class {
|
|
8109
8246
|
id;
|
|
8110
8247
|
top = 0;
|
|
8111
8248
|
height = 0;
|
|
@@ -8113,7 +8250,7 @@ var Jo = class {
|
|
|
8113
8250
|
maxPrice: 100,
|
|
8114
8251
|
minPrice: 0
|
|
8115
8252
|
};
|
|
8116
|
-
yAxis = new
|
|
8253
|
+
yAxis = new us();
|
|
8117
8254
|
renderers = [];
|
|
8118
8255
|
constructor(e) {
|
|
8119
8256
|
this.id = e;
|
|
@@ -8128,9 +8265,9 @@ var Jo = class {
|
|
|
8128
8265
|
this.renderers.push(e);
|
|
8129
8266
|
}
|
|
8130
8267
|
updateRange(e, t) {
|
|
8131
|
-
this.priceRange =
|
|
8268
|
+
this.priceRange = ls(e, t.start, t.end), this.yAxis.setRange(this.priceRange);
|
|
8132
8269
|
}
|
|
8133
|
-
},
|
|
8270
|
+
}, fs = class {
|
|
8134
8271
|
chart;
|
|
8135
8272
|
isDragging = !1;
|
|
8136
8273
|
dragStartX = 0;
|
|
@@ -8215,7 +8352,8 @@ var Jo = class {
|
|
|
8215
8352
|
this.kLinePositions = null, this.visibleRange = null, this.clearHover(), this.chart.scheduleDraw();
|
|
8216
8353
|
}
|
|
8217
8354
|
onPointerMove(e) {
|
|
8218
|
-
if (!
|
|
8355
|
+
if (!e.isPrimary) return;
|
|
8356
|
+
e.pointerType === "touch" && (this.isTouchSession = !0);
|
|
8219
8357
|
let t = this.chart.getDom().container;
|
|
8220
8358
|
if (this.isDragging) {
|
|
8221
8359
|
let n = this.dragStartX - e.clientX;
|
|
@@ -8295,22 +8433,22 @@ var Jo = class {
|
|
|
8295
8433
|
this.hoveredIndex = null;
|
|
8296
8434
|
return;
|
|
8297
8435
|
}
|
|
8298
|
-
let T = a - C.top, E = C.yAxis.priceToY(w.open), D = C.yAxis.priceToY(w.close), O = C.yAxis.priceToY(w.high), k = C.yAxis.priceToY(w.low), A = Math.min(E, D), j = Math.max(E, D), M = m - this.kLinePositions[b], N = _ / 2,
|
|
8299
|
-
if (!
|
|
8436
|
+
let T = a - C.top, E = C.yAxis.priceToY(w.open), D = C.yAxis.priceToY(w.close), O = C.yAxis.priceToY(w.high), k = C.yAxis.priceToY(w.low), A = Math.min(E, D), j = Math.max(E, D), M = m - this.kLinePositions[b], N = _ / 2, ee = Math.abs(j - A), te = ee < 8 ? (A + j) / 2 - 8 / 2 : A, P = ee < 8 ? (A + j) / 2 + 8 / 2 : j, F = T >= te && T <= P && M >= 0 && M <= _, ne = Math.abs(M - N) <= 3 && T >= O && T <= k;
|
|
8437
|
+
if (!F && !ne) {
|
|
8300
8438
|
this.hoveredIndex = null;
|
|
8301
8439
|
return;
|
|
8302
8440
|
}
|
|
8303
8441
|
this.hoveredIndex = this.crosshairIndex;
|
|
8304
|
-
let
|
|
8442
|
+
let re = this.tooltipSize.width, ie = this.tooltipSize.height, ae = i + 14, I = i - 14 - re, oe = ae + re + 12 <= s ? ae : I, L = a + 14, se = Math.max(12, s - re - 12), ce = Math.max(12, c - ie - 12);
|
|
8305
8443
|
this.tooltipPos = {
|
|
8306
|
-
x: Math.min(Math.max(
|
|
8307
|
-
y: Math.min(Math.max(
|
|
8444
|
+
x: Math.min(Math.max(oe, 12), se),
|
|
8445
|
+
y: Math.min(Math.max(L, 12), ce)
|
|
8308
8446
|
};
|
|
8309
8447
|
}
|
|
8310
8448
|
reset() {
|
|
8311
8449
|
this.isDragging = !1, this.dragStartX = 0, this.scrollStartX = 0, this.isTouchSession = !1, this.crosshairPos = null, this.crosshairIndex = 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;
|
|
8312
8450
|
}
|
|
8313
|
-
},
|
|
8451
|
+
}, ps = class {
|
|
8314
8452
|
dom;
|
|
8315
8453
|
pane;
|
|
8316
8454
|
opt;
|
|
@@ -8336,7 +8474,7 @@ var Jo = class {
|
|
|
8336
8474
|
};
|
|
8337
8475
|
//#endregion
|
|
8338
8476
|
//#region src/core/renderers/subVolume.ts
|
|
8339
|
-
function
|
|
8477
|
+
function ms(e = {}) {
|
|
8340
8478
|
let { paneId: t = "sub" } = e;
|
|
8341
8479
|
return {
|
|
8342
8480
|
name: `volume_${t}`,
|
|
@@ -8355,26 +8493,26 @@ function Qo(e = {}) {
|
|
|
8355
8493
|
if (!r) continue;
|
|
8356
8494
|
let i = r.volume;
|
|
8357
8495
|
if (!i) continue;
|
|
8358
|
-
let a =
|
|
8359
|
-
d &&
|
|
8496
|
+
let a = gs(r), d = c[e - u];
|
|
8497
|
+
d && hs(t, d, a, i, f, o, s, n.height);
|
|
8360
8498
|
}
|
|
8361
8499
|
t.restore();
|
|
8362
8500
|
}
|
|
8363
8501
|
};
|
|
8364
8502
|
}
|
|
8365
|
-
function
|
|
8366
|
-
let c =
|
|
8503
|
+
function hs(e, t, n, r, i, a, o, s) {
|
|
8504
|
+
let c = _s(r, i, s), l = a;
|
|
8367
8505
|
e.fillStyle = n, e.fillRect(t, c, l, s - c);
|
|
8368
8506
|
}
|
|
8369
|
-
function
|
|
8507
|
+
function gs(e) {
|
|
8370
8508
|
return e.close > e.open ? X.UP : e.close < e.open ? X.DOWN : X.NEUTRAL;
|
|
8371
8509
|
}
|
|
8372
|
-
function
|
|
8510
|
+
function _s(e, t, n) {
|
|
8373
8511
|
return n - n / t * e;
|
|
8374
8512
|
}
|
|
8375
8513
|
//#endregion
|
|
8376
8514
|
//#region src/utils/priceToY.ts
|
|
8377
|
-
function
|
|
8515
|
+
function vs(e, t, n, r, i, a) {
|
|
8378
8516
|
let o = t - n || 1, s = (e - n) / o;
|
|
8379
8517
|
return i + Math.max(1, r - i - a) * (1 - s);
|
|
8380
8518
|
}
|
|
@@ -8386,7 +8524,7 @@ function Z(e, t) {
|
|
|
8386
8524
|
function Q(e, t) {
|
|
8387
8525
|
return (Math.floor(e * t) + .5) / t;
|
|
8388
8526
|
}
|
|
8389
|
-
function
|
|
8527
|
+
function ys(e, t, n, r) {
|
|
8390
8528
|
if (t === n) return null;
|
|
8391
8529
|
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);
|
|
8392
8530
|
return {
|
|
@@ -8396,7 +8534,7 @@ function rs(e, t, n, r) {
|
|
|
8396
8534
|
height: Math.max(1, c - s) / r
|
|
8397
8535
|
};
|
|
8398
8536
|
}
|
|
8399
|
-
function
|
|
8537
|
+
function bs(e, t, n, r) {
|
|
8400
8538
|
if (e === t) return null;
|
|
8401
8539
|
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);
|
|
8402
8540
|
return {
|
|
@@ -8406,7 +8544,7 @@ function is(e, t, n, r) {
|
|
|
8406
8544
|
height: 1 / r
|
|
8407
8545
|
};
|
|
8408
8546
|
}
|
|
8409
|
-
function
|
|
8547
|
+
function xs(e, t, n, r, i) {
|
|
8410
8548
|
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;
|
|
8411
8549
|
return {
|
|
8412
8550
|
bodyRect: {
|
|
@@ -8429,7 +8567,7 @@ function as(e, t, n, r, i) {
|
|
|
8429
8567
|
}
|
|
8430
8568
|
//#endregion
|
|
8431
8569
|
//#region src/core/renderers/Indicator/ma.ts
|
|
8432
|
-
function
|
|
8570
|
+
function Ss(e, t) {
|
|
8433
8571
|
let n = Array(e.length);
|
|
8434
8572
|
if (e.length < t) return n;
|
|
8435
8573
|
let r = 0;
|
|
@@ -8445,7 +8583,7 @@ function os(e, t) {
|
|
|
8445
8583
|
}
|
|
8446
8584
|
return n;
|
|
8447
8585
|
}
|
|
8448
|
-
function
|
|
8586
|
+
function Cs(e = {}) {
|
|
8449
8587
|
let t = {
|
|
8450
8588
|
ma5: !0,
|
|
8451
8589
|
ma10: !0,
|
|
@@ -8457,7 +8595,7 @@ function ss(e = {}) {
|
|
|
8457
8595
|
function i(e, t) {
|
|
8458
8596
|
let i = n.get(t);
|
|
8459
8597
|
if (i && r === e) return i.values;
|
|
8460
|
-
let a =
|
|
8598
|
+
let a = Ss(e, t);
|
|
8461
8599
|
return n.set(t, {
|
|
8462
8600
|
period: t,
|
|
8463
8601
|
values: a
|
|
@@ -8473,7 +8611,7 @@ function ss(e = {}) {
|
|
|
8473
8611
|
for (let n = a.start; n < a.end && n < t.length; n++) {
|
|
8474
8612
|
let r = t[n];
|
|
8475
8613
|
if (r === void 0) continue;
|
|
8476
|
-
let i = l[n - a.start] + o / 2, s =
|
|
8614
|
+
let i = l[n - a.start] + o / 2, s = vs(r, h, g, u, p, m), d = Q(i, c), f = Q(s, c);
|
|
8477
8615
|
_ ? (e.moveTo(d, f), _ = !1) : e.lineTo(d, f);
|
|
8478
8616
|
}
|
|
8479
8617
|
e.stroke();
|
|
@@ -8502,7 +8640,7 @@ function ss(e = {}) {
|
|
|
8502
8640
|
}
|
|
8503
8641
|
//#endregion
|
|
8504
8642
|
//#region src/utils/kline/ma.ts
|
|
8505
|
-
function
|
|
8643
|
+
function ws(e, t, n) {
|
|
8506
8644
|
if (t < n - 1) return;
|
|
8507
8645
|
let r = 0;
|
|
8508
8646
|
for (let i = 0; i < n; i++) {
|
|
@@ -8514,7 +8652,7 @@ function cs(e, t, n) {
|
|
|
8514
8652
|
}
|
|
8515
8653
|
//#endregion
|
|
8516
8654
|
//#region src/core/renderers/Indicator/maLegend.ts
|
|
8517
|
-
function
|
|
8655
|
+
function Ts(e) {
|
|
8518
8656
|
let t = {
|
|
8519
8657
|
ma5: !0,
|
|
8520
8658
|
ma10: !0,
|
|
@@ -8539,23 +8677,23 @@ function ls(e) {
|
|
|
8539
8677
|
if (t.ma5 && l.push({
|
|
8540
8678
|
label: "MA5",
|
|
8541
8679
|
color: ja.MA5,
|
|
8542
|
-
value:
|
|
8680
|
+
value: ws(o, c, 5)
|
|
8543
8681
|
}), t.ma10 && l.push({
|
|
8544
8682
|
label: "MA10",
|
|
8545
8683
|
color: ja.MA10,
|
|
8546
|
-
value:
|
|
8684
|
+
value: ws(o, c, 10)
|
|
8547
8685
|
}), t.ma20 && l.push({
|
|
8548
8686
|
label: "MA20",
|
|
8549
8687
|
color: ja.MA20,
|
|
8550
|
-
value:
|
|
8688
|
+
value: ws(o, c, 20)
|
|
8551
8689
|
}), t.ma30 && l.push({
|
|
8552
8690
|
label: "MA30",
|
|
8553
8691
|
color: ja.MA30,
|
|
8554
|
-
value:
|
|
8692
|
+
value: ws(o, c, 30)
|
|
8555
8693
|
}), t.ma60 && l.push({
|
|
8556
8694
|
label: "MA60",
|
|
8557
8695
|
color: ja.MA60,
|
|
8558
|
-
value:
|
|
8696
|
+
value: ws(o, c, 60)
|
|
8559
8697
|
}), l.length > 0) {
|
|
8560
8698
|
let e = 12, t = s;
|
|
8561
8699
|
r.fillStyle = X.NEUTRAL, r.fillText("均线", e, t), e += r.measureText("均线").width + 10;
|
|
@@ -8576,7 +8714,7 @@ function ls(e) {
|
|
|
8576
8714
|
}
|
|
8577
8715
|
//#endregion
|
|
8578
8716
|
//#region src/core/renderers/Indicator/boll.ts
|
|
8579
|
-
function
|
|
8717
|
+
function Es(e, t, n) {
|
|
8580
8718
|
let r = Array(e.length);
|
|
8581
8719
|
if (e.length < t) return r;
|
|
8582
8720
|
let i = 0, a = [];
|
|
@@ -8609,7 +8747,7 @@ function us(e, t, n) {
|
|
|
8609
8747
|
}
|
|
8610
8748
|
return r;
|
|
8611
8749
|
}
|
|
8612
|
-
function
|
|
8750
|
+
function Ds(e = {}) {
|
|
8613
8751
|
let t = {
|
|
8614
8752
|
period: 20,
|
|
8615
8753
|
multiplier: 2,
|
|
@@ -8620,7 +8758,7 @@ function ds(e = {}) {
|
|
|
8620
8758
|
...e
|
|
8621
8759
|
}, n = null, r = 0, i = 0, a = [];
|
|
8622
8760
|
function o(e) {
|
|
8623
|
-
return (n !== e || r !== t.period || i !== t.multiplier) && (a =
|
|
8761
|
+
return (n !== e || r !== t.period || i !== t.multiplier) && (a = Es(e, t.period, t.multiplier), n = e, r = t.period, i = t.multiplier), a;
|
|
8624
8762
|
}
|
|
8625
8763
|
return {
|
|
8626
8764
|
name: "boll",
|
|
@@ -8650,13 +8788,13 @@ function ds(e = {}) {
|
|
|
8650
8788
|
for (let t = C; t < w; t++) {
|
|
8651
8789
|
let r = p[t];
|
|
8652
8790
|
if (!r) continue;
|
|
8653
|
-
let i = d[t - a.start] + m.kWidth / 2, o =
|
|
8791
|
+
let i = d[t - a.start] + m.kWidth / 2, o = vs(r.upper, x, S, g, y, b), s = Q(i, u), c = Q(o, u);
|
|
8654
8792
|
e ? (n.moveTo(s, c), e = !1) : n.lineTo(s, c);
|
|
8655
8793
|
}
|
|
8656
8794
|
for (let e = w - 1; e >= C; e--) {
|
|
8657
8795
|
let t = p[e];
|
|
8658
8796
|
if (!t) continue;
|
|
8659
|
-
let r = d[e - a.start] + m.kWidth / 2, i =
|
|
8797
|
+
let r = d[e - a.start] + m.kWidth / 2, i = vs(t.lower, x, S, g, y, b), o = Q(r, u), s = Q(i, u);
|
|
8660
8798
|
n.lineTo(o, s);
|
|
8661
8799
|
}
|
|
8662
8800
|
n.closePath(), n.fill();
|
|
@@ -8668,7 +8806,7 @@ function ds(e = {}) {
|
|
|
8668
8806
|
for (let t = C; t < w; t++) {
|
|
8669
8807
|
let i = p[t];
|
|
8670
8808
|
if (!i) continue;
|
|
8671
|
-
let o = d[t - a.start] + m.kWidth / 2, s =
|
|
8809
|
+
let o = d[t - a.start] + m.kWidth / 2, s = vs(i[e], x, S, g, y, b), c = Q(o, u), l = Q(s, u);
|
|
8672
8810
|
r ? (n.moveTo(c, l), r = !1) : n.lineTo(c, l);
|
|
8673
8811
|
}
|
|
8674
8812
|
n.stroke();
|
|
@@ -8686,7 +8824,7 @@ function ds(e = {}) {
|
|
|
8686
8824
|
}
|
|
8687
8825
|
};
|
|
8688
8826
|
}
|
|
8689
|
-
function
|
|
8827
|
+
function Os(e, t, n = 20, r = 2) {
|
|
8690
8828
|
if (t < n - 1 || t >= e.length) return null;
|
|
8691
8829
|
let i = 0;
|
|
8692
8830
|
for (let r = 0; r < n; r++) {
|
|
@@ -8709,7 +8847,7 @@ function fs(e, t, n = 20, r = 2) {
|
|
|
8709
8847
|
}
|
|
8710
8848
|
//#endregion
|
|
8711
8849
|
//#region src/core/renderers/Indicator/bollLegend.ts
|
|
8712
|
-
function
|
|
8850
|
+
function ks(e) {
|
|
8713
8851
|
let t = {
|
|
8714
8852
|
period: 20,
|
|
8715
8853
|
multiplier: 2,
|
|
@@ -8729,7 +8867,7 @@ function ps(e) {
|
|
|
8729
8867
|
if (!o.length) return;
|
|
8730
8868
|
let s = (12 + e.yPaddingPx) / 2;
|
|
8731
8869
|
r.save(), r.font = "12px Arial", r.textAlign = "left";
|
|
8732
|
-
let c =
|
|
8870
|
+
let c = Os(o, Math.min(a.end - 1, o.length - 1), t.period, t.multiplier), l = 12;
|
|
8733
8871
|
r.fillStyle = X.NEUTRAL, r.fillText(`BOLL(${t.period},${t.multiplier})`, l, s), l += r.measureText(`BOLL(${t.period},${t.multiplier})`).width + 10, c && (r.fillStyle = Ma.UPPER, r.fillText(`上轨:${c.upper.toFixed(2)}`, l, s), l += r.measureText(`上轨:${c.upper.toFixed(2)}`).width + 10, r.fillStyle = Ma.MIDDLE, r.fillText(`中轨:${c.middle.toFixed(2)}`, l, s), l += r.measureText(`中轨:${c.middle.toFixed(2)}`).width + 10, r.fillStyle = Ma.LOWER, r.fillText(`下轨:${c.lower.toFixed(2)}`, l, s)), r.restore();
|
|
8734
8872
|
},
|
|
8735
8873
|
getConfig() {
|
|
@@ -8742,7 +8880,7 @@ function ps(e) {
|
|
|
8742
8880
|
}
|
|
8743
8881
|
//#endregion
|
|
8744
8882
|
//#region src/core/renderers/Indicator/macd.ts
|
|
8745
|
-
function
|
|
8883
|
+
function As(e, t) {
|
|
8746
8884
|
let n = Array(e.length), r = 2 / (t + 1);
|
|
8747
8885
|
if (e.length === 0) return n;
|
|
8748
8886
|
n[0] = e[0].close;
|
|
@@ -8752,7 +8890,7 @@ function ms(e, t) {
|
|
|
8752
8890
|
}
|
|
8753
8891
|
return n;
|
|
8754
8892
|
}
|
|
8755
|
-
function
|
|
8893
|
+
function js(e, t) {
|
|
8756
8894
|
let n = Array(e.length), r = 2 / (t + 1), i = e.findIndex((e) => e !== void 0);
|
|
8757
8895
|
if (i === -1) return n;
|
|
8758
8896
|
n[i] = e[i];
|
|
@@ -8762,15 +8900,15 @@ function hs(e, t) {
|
|
|
8762
8900
|
}
|
|
8763
8901
|
return n;
|
|
8764
8902
|
}
|
|
8765
|
-
function
|
|
8903
|
+
function Ms(e, t, n, r) {
|
|
8766
8904
|
let i = Array(e.length);
|
|
8767
8905
|
if (e.length < n) return i;
|
|
8768
|
-
let a =
|
|
8906
|
+
let a = As(e, t), o = As(e, n), s = Array(e.length);
|
|
8769
8907
|
for (let t = 0; t < e.length; t++) {
|
|
8770
8908
|
let e = a[t], n = o[t];
|
|
8771
8909
|
e !== void 0 && n !== void 0 && (s[t] = e - n);
|
|
8772
8910
|
}
|
|
8773
|
-
let c =
|
|
8911
|
+
let c = js(s, r);
|
|
8774
8912
|
for (let t = 0; t < e.length; t++) {
|
|
8775
8913
|
let e = s[t], n = c[t];
|
|
8776
8914
|
e !== void 0 && n !== void 0 && (i[t] = {
|
|
@@ -8781,7 +8919,7 @@ function gs(e, t, n, r) {
|
|
|
8781
8919
|
}
|
|
8782
8920
|
return i;
|
|
8783
8921
|
}
|
|
8784
|
-
function
|
|
8922
|
+
function Ns(e = {}) {
|
|
8785
8923
|
let { paneId: t = "sub", config: n = {} } = e, r = {
|
|
8786
8924
|
fastPeriod: 12,
|
|
8787
8925
|
slowPeriod: 26,
|
|
@@ -8792,7 +8930,7 @@ function _s(e = {}) {
|
|
|
8792
8930
|
...n
|
|
8793
8931
|
}, i = null, a = 0, o = 0, s = 0, c = [];
|
|
8794
8932
|
function l(e) {
|
|
8795
|
-
return (i !== e || a !== r.fastPeriod || o !== r.slowPeriod || s !== r.signalPeriod) && (c =
|
|
8933
|
+
return (i !== e || a !== r.fastPeriod || o !== r.slowPeriod || s !== r.signalPeriod) && (c = Ms(e, r.fastPeriod, r.slowPeriod, r.signalPeriod), i = e, a = r.fastPeriod, o = r.slowPeriod, s = r.signalPeriod), c;
|
|
8796
8934
|
}
|
|
8797
8935
|
return {
|
|
8798
8936
|
name: `macd_${t}`,
|
|
@@ -8865,11 +9003,11 @@ function _s(e = {}) {
|
|
|
8865
9003
|
}
|
|
8866
9004
|
};
|
|
8867
9005
|
}
|
|
8868
|
-
function
|
|
8869
|
-
return t < r || t >= e.length ? null :
|
|
9006
|
+
function Ps(e, t, n = 12, r = 26, i = 9) {
|
|
9007
|
+
return t < r || t >= e.length ? null : Ms(e, n, r, i)[t] ?? null;
|
|
8870
9008
|
}
|
|
8871
|
-
function
|
|
8872
|
-
let a =
|
|
9009
|
+
function Fs(e, t, n = 12, r = 26, i = 9) {
|
|
9010
|
+
let a = Ps(e, t, n, r, i);
|
|
8873
9011
|
return a ? {
|
|
8874
9012
|
name: "MACD",
|
|
8875
9013
|
params: [
|
|
@@ -8898,7 +9036,7 @@ function ys(e, t, n = 12, r = 26, i = 9) {
|
|
|
8898
9036
|
}
|
|
8899
9037
|
//#endregion
|
|
8900
9038
|
//#region src/core/renderers/Indicator/rsi.ts
|
|
8901
|
-
function
|
|
9039
|
+
function Is(e, t) {
|
|
8902
9040
|
let n = Array(e.length);
|
|
8903
9041
|
if (e.length < t + 1) return n;
|
|
8904
9042
|
let r = [];
|
|
@@ -8920,7 +9058,7 @@ function bs(e, t) {
|
|
|
8920
9058
|
}
|
|
8921
9059
|
return n;
|
|
8922
9060
|
}
|
|
8923
|
-
function
|
|
9061
|
+
function Ls(e = {}) {
|
|
8924
9062
|
let { paneId: t = "sub", config: n = {} } = e, r = {
|
|
8925
9063
|
period1: 6,
|
|
8926
9064
|
period2: 12,
|
|
@@ -8931,7 +9069,7 @@ function xs(e = {}) {
|
|
|
8931
9069
|
...n
|
|
8932
9070
|
}, i = null, a = 0, o = 0, s = 0, c = [], l = [], u = [];
|
|
8933
9071
|
function d(e) {
|
|
8934
|
-
return (i !== e || a !== r.period1 || o !== r.period2 || s !== r.period3) && (c =
|
|
9072
|
+
return (i !== e || a !== r.period1 || o !== r.period2 || s !== r.period3) && (c = Is(e, r.period1), l = Is(e, r.period2), u = Is(e, r.period3), i = e, a = r.period1, o = r.period2, s = r.period3), {
|
|
8935
9073
|
rsi1: c,
|
|
8936
9074
|
rsi2: l,
|
|
8937
9075
|
rsi3: u
|
|
@@ -8977,9 +9115,9 @@ function xs(e = {}) {
|
|
|
8977
9115
|
}
|
|
8978
9116
|
};
|
|
8979
9117
|
}
|
|
8980
|
-
function
|
|
9118
|
+
function Rs(e, t, n = 6, r = 12, i = 24) {
|
|
8981
9119
|
if (t < n + 1 || t >= e.length) return null;
|
|
8982
|
-
let a =
|
|
9120
|
+
let a = Is(e, n)[t], o = Is(e, r)[t], s = Is(e, i)[t], c = [];
|
|
8983
9121
|
return a !== void 0 && c.push({
|
|
8984
9122
|
label: `RSI${n}`,
|
|
8985
9123
|
value: a,
|
|
@@ -9004,7 +9142,7 @@ function Ss(e, t, n = 6, r = 12, i = 24) {
|
|
|
9004
9142
|
}
|
|
9005
9143
|
//#endregion
|
|
9006
9144
|
//#region src/core/renderers/Indicator/cci.ts
|
|
9007
|
-
function
|
|
9145
|
+
function zs(e, t) {
|
|
9008
9146
|
let n = Array(e.length);
|
|
9009
9147
|
if (e.length < t) return n;
|
|
9010
9148
|
let r = e.map((e) => (e.high + e.low + e.close) / 3);
|
|
@@ -9018,14 +9156,14 @@ function Cs(e, t) {
|
|
|
9018
9156
|
}
|
|
9019
9157
|
return n;
|
|
9020
9158
|
}
|
|
9021
|
-
function
|
|
9159
|
+
function Bs(e = {}) {
|
|
9022
9160
|
let { paneId: t = "sub", config: n = {} } = e, r = {
|
|
9023
9161
|
period: 14,
|
|
9024
9162
|
showCCI: !0,
|
|
9025
9163
|
...n
|
|
9026
9164
|
}, i = null, a = 0, o = [];
|
|
9027
9165
|
function s(e) {
|
|
9028
|
-
return (i !== e || a !== r.period) && (o =
|
|
9166
|
+
return (i !== e || a !== r.period) && (o = zs(e, r.period), i = e, a = r.period), o;
|
|
9029
9167
|
}
|
|
9030
9168
|
return {
|
|
9031
9169
|
name: `cci_${t}`,
|
|
@@ -9075,12 +9213,12 @@ function ws(e = {}) {
|
|
|
9075
9213
|
}
|
|
9076
9214
|
};
|
|
9077
9215
|
}
|
|
9078
|
-
function
|
|
9079
|
-
return
|
|
9216
|
+
function Vs(e, t, n) {
|
|
9217
|
+
return zs(e, n)[t];
|
|
9080
9218
|
}
|
|
9081
|
-
function
|
|
9219
|
+
function Hs(e, t, n = 14) {
|
|
9082
9220
|
if (t < n || t >= e.length) return null;
|
|
9083
|
-
let r =
|
|
9221
|
+
let r = Vs(e, t, n);
|
|
9084
9222
|
return r === void 0 ? null : {
|
|
9085
9223
|
name: "CCI",
|
|
9086
9224
|
params: [n],
|
|
@@ -9093,7 +9231,7 @@ function Es(e, t, n = 14) {
|
|
|
9093
9231
|
}
|
|
9094
9232
|
//#endregion
|
|
9095
9233
|
//#region src/core/renderers/Indicator/stoch.ts
|
|
9096
|
-
function
|
|
9234
|
+
function Us(e, t, n) {
|
|
9097
9235
|
let r = Array(e.length);
|
|
9098
9236
|
if (e.length < t) return r;
|
|
9099
9237
|
let i = Array(e.length);
|
|
@@ -9121,7 +9259,7 @@ function Ds(e, t, n) {
|
|
|
9121
9259
|
}
|
|
9122
9260
|
return r;
|
|
9123
9261
|
}
|
|
9124
|
-
function
|
|
9262
|
+
function Ws(e = {}) {
|
|
9125
9263
|
let { paneId: t = "sub", config: n = {} } = e, r = {
|
|
9126
9264
|
n: 9,
|
|
9127
9265
|
m: 3,
|
|
@@ -9130,7 +9268,7 @@ function Os(e = {}) {
|
|
|
9130
9268
|
...n
|
|
9131
9269
|
}, i = null, a = 0, o = 0, s = [];
|
|
9132
9270
|
function c(e) {
|
|
9133
|
-
return (i !== e || a !== r.n || o !== r.m) && (s =
|
|
9271
|
+
return (i !== e || a !== r.n || o !== r.m) && (s = Us(e, r.n, r.m), i = e, a = r.n, o = r.m), s;
|
|
9134
9272
|
}
|
|
9135
9273
|
return {
|
|
9136
9274
|
name: `stoch_${t}`,
|
|
@@ -9186,12 +9324,12 @@ function Os(e = {}) {
|
|
|
9186
9324
|
}
|
|
9187
9325
|
};
|
|
9188
9326
|
}
|
|
9189
|
-
function
|
|
9190
|
-
return
|
|
9327
|
+
function Gs(e, t, n, r) {
|
|
9328
|
+
return Us(e, n, r)[t];
|
|
9191
9329
|
}
|
|
9192
|
-
function
|
|
9330
|
+
function Ks(e, t, n = 9, r = 3) {
|
|
9193
9331
|
if (t < n + r - 1 || t >= e.length) return null;
|
|
9194
|
-
let i =
|
|
9332
|
+
let i = Gs(e, t, n, r);
|
|
9195
9333
|
return i ? {
|
|
9196
9334
|
name: "STOCH",
|
|
9197
9335
|
params: [n, r],
|
|
@@ -9208,7 +9346,7 @@ function As(e, t, n = 9, r = 3) {
|
|
|
9208
9346
|
}
|
|
9209
9347
|
//#endregion
|
|
9210
9348
|
//#region src/core/renderers/Indicator/mom.ts
|
|
9211
|
-
function
|
|
9349
|
+
function qs(e, t) {
|
|
9212
9350
|
let n = Array(e.length);
|
|
9213
9351
|
if (e.length < t + 1) return n;
|
|
9214
9352
|
for (let r = t; r < e.length; r++) {
|
|
@@ -9217,14 +9355,14 @@ function js(e, t) {
|
|
|
9217
9355
|
}
|
|
9218
9356
|
return n;
|
|
9219
9357
|
}
|
|
9220
|
-
function
|
|
9358
|
+
function Js(e = {}) {
|
|
9221
9359
|
let { paneId: t = "sub", config: n = {} } = e, r = {
|
|
9222
9360
|
period: 10,
|
|
9223
9361
|
showMOM: !0,
|
|
9224
9362
|
...n
|
|
9225
9363
|
}, i = null, a = 0, o = [];
|
|
9226
9364
|
function s(e) {
|
|
9227
|
-
return (i !== e || a !== r.period) && (o =
|
|
9365
|
+
return (i !== e || a !== r.period) && (o = qs(e, r.period), i = e, a = r.period), o;
|
|
9228
9366
|
}
|
|
9229
9367
|
return {
|
|
9230
9368
|
name: `mom_${t}`,
|
|
@@ -9275,12 +9413,12 @@ function Ms(e = {}) {
|
|
|
9275
9413
|
}
|
|
9276
9414
|
};
|
|
9277
9415
|
}
|
|
9278
|
-
function
|
|
9279
|
-
return
|
|
9416
|
+
function Ys(e, t, n) {
|
|
9417
|
+
return qs(e, n)[t];
|
|
9280
9418
|
}
|
|
9281
|
-
function
|
|
9419
|
+
function Xs(e, t, n = 10) {
|
|
9282
9420
|
if (t < n || t >= e.length) return null;
|
|
9283
|
-
let r =
|
|
9421
|
+
let r = Ys(e, t, n);
|
|
9284
9422
|
return r === void 0 ? null : {
|
|
9285
9423
|
name: "MOM",
|
|
9286
9424
|
params: [n],
|
|
@@ -9293,7 +9431,7 @@ function Ps(e, t, n = 10) {
|
|
|
9293
9431
|
}
|
|
9294
9432
|
//#endregion
|
|
9295
9433
|
//#region src/core/renderers/Indicator/wmsr.ts
|
|
9296
|
-
function
|
|
9434
|
+
function Zs(e, t) {
|
|
9297
9435
|
let n = Array(e.length);
|
|
9298
9436
|
if (e.length < t) return n;
|
|
9299
9437
|
for (let r = t - 1; r < e.length; r++) {
|
|
@@ -9307,14 +9445,14 @@ function Fs(e, t) {
|
|
|
9307
9445
|
}
|
|
9308
9446
|
return n;
|
|
9309
9447
|
}
|
|
9310
|
-
function
|
|
9448
|
+
function Qs(e = {}) {
|
|
9311
9449
|
let { paneId: t = "sub", config: n = {} } = e, r = {
|
|
9312
9450
|
period: 14,
|
|
9313
9451
|
showWMSR: !0,
|
|
9314
9452
|
...n
|
|
9315
9453
|
}, i = null, a = 0, o = [];
|
|
9316
9454
|
function s(e) {
|
|
9317
|
-
return (i !== e || a !== r.period) && (o =
|
|
9455
|
+
return (i !== e || a !== r.period) && (o = Zs(e, r.period), i = e, a = r.period), o;
|
|
9318
9456
|
}
|
|
9319
9457
|
return {
|
|
9320
9458
|
name: `wmsr_${t}`,
|
|
@@ -9357,12 +9495,12 @@ function Is(e = {}) {
|
|
|
9357
9495
|
}
|
|
9358
9496
|
};
|
|
9359
9497
|
}
|
|
9360
|
-
function
|
|
9361
|
-
return
|
|
9498
|
+
function $s(e, t, n) {
|
|
9499
|
+
return Zs(e, n)[t];
|
|
9362
9500
|
}
|
|
9363
|
-
function
|
|
9501
|
+
function ec(e, t, n = 14) {
|
|
9364
9502
|
if (t < n || t >= e.length) return null;
|
|
9365
|
-
let r =
|
|
9503
|
+
let r = $s(e, t, n);
|
|
9366
9504
|
return r === void 0 ? null : {
|
|
9367
9505
|
name: "WMSR",
|
|
9368
9506
|
params: [n],
|
|
@@ -9375,7 +9513,7 @@ function Rs(e, t, n = 14) {
|
|
|
9375
9513
|
}
|
|
9376
9514
|
//#endregion
|
|
9377
9515
|
//#region src/core/renderers/Indicator/kst.ts
|
|
9378
|
-
function
|
|
9516
|
+
function tc(e, t) {
|
|
9379
9517
|
let n = Array(e.length);
|
|
9380
9518
|
if (e.length < t + 1) return n;
|
|
9381
9519
|
for (let r = t; r < e.length; r++) {
|
|
@@ -9384,7 +9522,7 @@ function zs(e, t) {
|
|
|
9384
9522
|
}
|
|
9385
9523
|
return n;
|
|
9386
9524
|
}
|
|
9387
|
-
function
|
|
9525
|
+
function nc(e, t) {
|
|
9388
9526
|
let n = Array(e.length), r = 0, i = 0;
|
|
9389
9527
|
for (let a = 0; a < e.length; a++) {
|
|
9390
9528
|
let o = e[a];
|
|
@@ -9398,13 +9536,13 @@ function Bs(e, t) {
|
|
|
9398
9536
|
}
|
|
9399
9537
|
return n;
|
|
9400
9538
|
}
|
|
9401
|
-
function
|
|
9402
|
-
let o = Array(e.length), s =
|
|
9539
|
+
function rc(e, t, n, r, i, a) {
|
|
9540
|
+
let o = Array(e.length), s = tc(e, t), c = tc(e, n), l = tc(e, r), u = tc(e, i), d = nc(s, 10), f = nc(c, 10), p = nc(l, 10), m = nc(u, 15), h = Array(e.length);
|
|
9403
9541
|
for (let t = 0; t < e.length; t++) {
|
|
9404
9542
|
let e = d[t], n = f[t], r = p[t], i = m[t];
|
|
9405
9543
|
e !== void 0 && n !== void 0 && r !== void 0 && i !== void 0 && (h[t] = e * 1 + n * 2 + r * 3 + i * 4);
|
|
9406
9544
|
}
|
|
9407
|
-
let g =
|
|
9545
|
+
let g = nc(h, a);
|
|
9408
9546
|
for (let t = 0; t < e.length; t++) {
|
|
9409
9547
|
let e = h[t], n = g[t];
|
|
9410
9548
|
e !== void 0 && n !== void 0 && (o[t] = {
|
|
@@ -9414,7 +9552,7 @@ function Vs(e, t, n, r, i, a) {
|
|
|
9414
9552
|
}
|
|
9415
9553
|
return o;
|
|
9416
9554
|
}
|
|
9417
|
-
function
|
|
9555
|
+
function ic(e = {}) {
|
|
9418
9556
|
let { paneId: t = "sub", config: n = {} } = e, r = {
|
|
9419
9557
|
roc1: 10,
|
|
9420
9558
|
roc2: 15,
|
|
@@ -9427,7 +9565,7 @@ function Hs(e = {}) {
|
|
|
9427
9565
|
}, i = null, a = "", o = [];
|
|
9428
9566
|
function s(e) {
|
|
9429
9567
|
let t = `${r.roc1}-${r.roc2}-${r.roc3}-${r.roc4}-${r.signalPeriod}`;
|
|
9430
|
-
return (i !== e || a !== t) && (o =
|
|
9568
|
+
return (i !== e || a !== t) && (o = rc(e, r.roc1, r.roc2, r.roc3, r.roc4, r.signalPeriod), i = e, a = t), o;
|
|
9431
9569
|
}
|
|
9432
9570
|
return {
|
|
9433
9571
|
name: `kst_${t}`,
|
|
@@ -9491,12 +9629,12 @@ function Hs(e = {}) {
|
|
|
9491
9629
|
}
|
|
9492
9630
|
};
|
|
9493
9631
|
}
|
|
9494
|
-
function
|
|
9495
|
-
return
|
|
9632
|
+
function ac(e, t, n, r, i, a, o) {
|
|
9633
|
+
return rc(e, n, r, i, a, o)[t];
|
|
9496
9634
|
}
|
|
9497
|
-
function
|
|
9635
|
+
function oc(e, t, n = 10, r = 15, i = 20, a = 30, o = 9) {
|
|
9498
9636
|
if (t < a + 15 + o || t >= e.length) return null;
|
|
9499
|
-
let s =
|
|
9637
|
+
let s = ac(e, t, n, r, i, a, o);
|
|
9500
9638
|
return s ? {
|
|
9501
9639
|
name: "KST",
|
|
9502
9640
|
params: [
|
|
@@ -9519,7 +9657,7 @@ function Ws(e, t, n = 10, r = 15, i = 20, a = 30, o = 9) {
|
|
|
9519
9657
|
}
|
|
9520
9658
|
//#endregion
|
|
9521
9659
|
//#region src/core/renderers/Indicator/fastk.ts
|
|
9522
|
-
function
|
|
9660
|
+
function sc(e, t) {
|
|
9523
9661
|
let n = Array(e.length);
|
|
9524
9662
|
if (e.length < t) return n;
|
|
9525
9663
|
for (let r = t - 1; r < e.length; r++) {
|
|
@@ -9533,14 +9671,14 @@ function Gs(e, t) {
|
|
|
9533
9671
|
}
|
|
9534
9672
|
return n;
|
|
9535
9673
|
}
|
|
9536
|
-
function
|
|
9674
|
+
function cc(e = {}) {
|
|
9537
9675
|
let { paneId: t = "sub", config: n = {} } = e, r = {
|
|
9538
9676
|
period: 9,
|
|
9539
9677
|
showFASTK: !0,
|
|
9540
9678
|
...n
|
|
9541
9679
|
}, i = null, a = 0, o = [];
|
|
9542
9680
|
function s(e) {
|
|
9543
|
-
return (i !== e || a !== r.period) && (o =
|
|
9681
|
+
return (i !== e || a !== r.period) && (o = sc(e, r.period), i = e, a = r.period), o;
|
|
9544
9682
|
}
|
|
9545
9683
|
return {
|
|
9546
9684
|
name: `fastk_${t}`,
|
|
@@ -9583,12 +9721,12 @@ function Ks(e = {}) {
|
|
|
9583
9721
|
}
|
|
9584
9722
|
};
|
|
9585
9723
|
}
|
|
9586
|
-
function
|
|
9587
|
-
return
|
|
9724
|
+
function lc(e, t, n) {
|
|
9725
|
+
return sc(e, n)[t];
|
|
9588
9726
|
}
|
|
9589
|
-
function
|
|
9727
|
+
function uc(e, t, n = 9) {
|
|
9590
9728
|
if (t < n || t >= e.length) return null;
|
|
9591
|
-
let r =
|
|
9729
|
+
let r = lc(e, t, n);
|
|
9592
9730
|
return r === void 0 ? null : {
|
|
9593
9731
|
name: "FASTK",
|
|
9594
9732
|
params: [n],
|
|
@@ -9601,24 +9739,24 @@ function Js(e, t, n = 9) {
|
|
|
9601
9739
|
}
|
|
9602
9740
|
//#endregion
|
|
9603
9741
|
//#region src/core/renderers/Indicator/index.ts
|
|
9604
|
-
function
|
|
9742
|
+
function dc(e) {
|
|
9605
9743
|
let { indicatorId: t, paneId: n } = e;
|
|
9606
9744
|
switch (t) {
|
|
9607
|
-
case "VOLUME": return
|
|
9608
|
-
case "MACD": return
|
|
9609
|
-
case "RSI": return
|
|
9610
|
-
case "CCI": return
|
|
9611
|
-
case "STOCH": return
|
|
9612
|
-
case "MOM": return
|
|
9613
|
-
case "WMSR": return
|
|
9614
|
-
case "KST": return
|
|
9615
|
-
case "FASTK": return
|
|
9745
|
+
case "VOLUME": return ms({ paneId: n });
|
|
9746
|
+
case "MACD": return Ns({ paneId: n });
|
|
9747
|
+
case "RSI": return Ls({ paneId: n });
|
|
9748
|
+
case "CCI": return Bs({ paneId: n });
|
|
9749
|
+
case "STOCH": return Ws({ paneId: n });
|
|
9750
|
+
case "MOM": return Js({ paneId: n });
|
|
9751
|
+
case "WMSR": return Qs({ paneId: n });
|
|
9752
|
+
case "KST": return ic({ paneId: n });
|
|
9753
|
+
case "FASTK": return cc({ paneId: n });
|
|
9616
9754
|
default: throw Error(`Unknown indicator: ${t}`);
|
|
9617
9755
|
}
|
|
9618
9756
|
}
|
|
9619
9757
|
//#endregion
|
|
9620
9758
|
//#region src/core/chart.ts
|
|
9621
|
-
var
|
|
9759
|
+
var fc = class e {
|
|
9622
9760
|
dom;
|
|
9623
9761
|
opt;
|
|
9624
9762
|
data = [];
|
|
@@ -9630,7 +9768,7 @@ var Xs = class e {
|
|
|
9630
9768
|
pluginHost;
|
|
9631
9769
|
rendererPluginManager;
|
|
9632
9770
|
constructor(e, t) {
|
|
9633
|
-
this.dom = e, this.opt = t, this.interaction = new
|
|
9771
|
+
this.dom = e, this.opt = t, this.interaction = new fs(this), this.markerManager = new go(), this.pluginHost = da(), this.rendererPluginManager = new pa(), this.rendererPluginManager.setPluginHost(this.pluginHost), this.rendererPluginManager.setInvalidateCallback(() => this.scheduleDraw()), this.initPanes();
|
|
9634
9772
|
}
|
|
9635
9773
|
get plugin() {
|
|
9636
9774
|
return this.pluginHost;
|
|
@@ -9664,14 +9802,14 @@ var Xs = class e {
|
|
|
9664
9802
|
console.log("[Chart] draw aborted: no data");
|
|
9665
9803
|
return;
|
|
9666
9804
|
}
|
|
9667
|
-
let { start: t, end: n } =
|
|
9805
|
+
let { start: t, end: n } = cs(e.scrollLeft, e.plotWidth, this.opt.kWidth, this.opt.kGap, this.data.length, e.dpr), r = {
|
|
9668
9806
|
start: t,
|
|
9669
9807
|
end: n
|
|
9670
|
-
}, i = this.calcKLinePositions(r), { kWidthPx: a } =
|
|
9808
|
+
}, i = this.calcKLinePositions(r), { kWidthPx: a } = ss(this.opt.kWidth, this.opt.kGap, e.dpr);
|
|
9671
9809
|
this.interaction.setKLinePositions(i, r, a);
|
|
9672
9810
|
for (let t of this.paneRenderers) {
|
|
9673
9811
|
let n = t.getPane(), a = t.getDom().plotCanvas.getContext("2d"), o = t.getDom().yAxisCanvas.getContext("2d");
|
|
9674
|
-
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, n.height + 2 / e.dpr));
|
|
9812
|
+
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));
|
|
9675
9813
|
let s = this.opt.rightAxisWidth + (this.opt.priceLabelWidth || 60);
|
|
9676
9814
|
o && (o.setTransform(1, 0, 0, 1, 0, 0), o.scale(e.dpr, e.dpr), o.clearRect(0, 0, s, n.height + 2 / e.dpr));
|
|
9677
9815
|
let c = {
|
|
@@ -9731,44 +9869,6 @@ var Xs = class e {
|
|
|
9731
9869
|
errors: n
|
|
9732
9870
|
});
|
|
9733
9871
|
}
|
|
9734
|
-
let s = this.dom.borderCanvas;
|
|
9735
|
-
if (s) {
|
|
9736
|
-
let t = s.getContext("2d");
|
|
9737
|
-
if (t) {
|
|
9738
|
-
t.setTransform(1, 0, 0, 1, 0, 0), t.scale(e.dpr, e.dpr), t.clearRect(0, 0, e.plotWidth, e.plotHeight);
|
|
9739
|
-
let n = {
|
|
9740
|
-
ctx: t,
|
|
9741
|
-
pane: {
|
|
9742
|
-
id: "globalBorders",
|
|
9743
|
-
top: 0,
|
|
9744
|
-
height: e.plotHeight,
|
|
9745
|
-
yAxis: {
|
|
9746
|
-
priceToY: () => 0,
|
|
9747
|
-
yToPrice: () => 0,
|
|
9748
|
-
getPaddingTop: () => 0,
|
|
9749
|
-
getPaddingBottom: () => 0
|
|
9750
|
-
},
|
|
9751
|
-
priceRange: {
|
|
9752
|
-
maxPrice: 0,
|
|
9753
|
-
minPrice: 0
|
|
9754
|
-
}
|
|
9755
|
-
},
|
|
9756
|
-
data: this.data,
|
|
9757
|
-
range: r,
|
|
9758
|
-
scrollLeft: e.scrollLeft,
|
|
9759
|
-
kWidth: this.opt.kWidth,
|
|
9760
|
-
kGap: this.opt.kGap,
|
|
9761
|
-
dpr: e.dpr,
|
|
9762
|
-
paneWidth: e.plotWidth,
|
|
9763
|
-
kLinePositions: i,
|
|
9764
|
-
borderCtx: t
|
|
9765
|
-
}, a = this.rendererPluginManager.renderPlugin("globalBorders", n);
|
|
9766
|
-
a.length > 0 && this.pluginHost.events.emit("renderer:error", {
|
|
9767
|
-
paneId: "globalBorders",
|
|
9768
|
-
errors: a
|
|
9769
|
-
});
|
|
9770
|
-
}
|
|
9771
|
-
}
|
|
9772
9872
|
}
|
|
9773
9873
|
zoomAt(e, t, n) {
|
|
9774
9874
|
let r = this.opt.kWidth + this.opt.kGap, i = (t + e) / r, a = this.viewport?.dpr || window.devicePixelRatio || 1, o = Math.round(this.opt.kWidth * a), s = n > 0 ? -2 : 2, c = o + s;
|
|
@@ -9820,7 +9920,7 @@ var Xs = class e {
|
|
|
9820
9920
|
calcKLinePositions(e) {
|
|
9821
9921
|
let { start: t, end: n } = e, r = n - t;
|
|
9822
9922
|
if (r <= 0) return [];
|
|
9823
|
-
let i = this.viewport?.dpr || window.devicePixelRatio || 1, { unitPx: a, startXPx: o } =
|
|
9923
|
+
let i = this.viewport?.dpr || window.devicePixelRatio || 1, { unitPx: a, startXPx: o } = ss(this.opt.kWidth, this.opt.kGap, i), s = Array(r);
|
|
9824
9924
|
for (let e = 0; e < r; e++) s[e] = (o + (t + e) * a) / i;
|
|
9825
9925
|
return s;
|
|
9826
9926
|
}
|
|
@@ -9838,9 +9938,9 @@ var Xs = class e {
|
|
|
9838
9938
|
console.warn(`Pane "${e}" already exists`);
|
|
9839
9939
|
return;
|
|
9840
9940
|
}
|
|
9841
|
-
let t = new
|
|
9842
|
-
n.id = `${e}-plot`, n.className = "plot-canvas", n.style.position = "absolute", n.style.left = "0", n.style.top = "0", r.id = `${e}-yAxis`, r.className = "
|
|
9843
|
-
let
|
|
9941
|
+
let t = new ds(e), n = document.createElement("canvas"), r = document.createElement("canvas"), i = e === "main";
|
|
9942
|
+
n.id = `${e}-plot`, n.className = i ? "plot-canvas main" : "plot-canvas sub", n.style.position = "absolute", n.style.left = "0", n.style.top = "0", r.id = `${e}-yAxis`, r.className = "right-axis", r.style.position = "absolute", r.style.right = "0";
|
|
9943
|
+
let a = new ps({
|
|
9844
9944
|
plotCanvas: n,
|
|
9845
9945
|
yAxisCanvas: r
|
|
9846
9946
|
}, t, {
|
|
@@ -9848,9 +9948,9 @@ var Xs = class e {
|
|
|
9848
9948
|
yPaddingPx: 0,
|
|
9849
9949
|
priceLabelWidth: this.opt.priceLabelWidth
|
|
9850
9950
|
});
|
|
9851
|
-
this.paneRenderers.push(
|
|
9852
|
-
let
|
|
9853
|
-
|
|
9951
|
+
this.paneRenderers.push(a);
|
|
9952
|
+
let o = this.dom.canvasLayer;
|
|
9953
|
+
o && (o.appendChild(n), o.appendChild(r)), this.rendererPluginManager.addKnownPaneId(e);
|
|
9854
9954
|
}
|
|
9855
9955
|
removePane(e) {
|
|
9856
9956
|
let t = this.paneRenderers.findIndex((t) => t.getPane().id === e);
|
|
@@ -9871,7 +9971,7 @@ var Xs = class e {
|
|
|
9871
9971
|
return n && this.updateRendererConfig(e, n), !0;
|
|
9872
9972
|
}
|
|
9873
9973
|
this.addPane(r);
|
|
9874
|
-
let i =
|
|
9974
|
+
let i = dc({
|
|
9875
9975
|
indicatorId: t,
|
|
9876
9976
|
paneId: r
|
|
9877
9977
|
});
|
|
@@ -9909,7 +10009,7 @@ var Xs = class e {
|
|
|
9909
10009
|
return this.data;
|
|
9910
10010
|
}
|
|
9911
10011
|
getContentWidth() {
|
|
9912
|
-
let e = this.data?.length ?? 0, t = this.viewport?.dpr || window.devicePixelRatio || 1, { startXPx: n, unitPx: r } =
|
|
10012
|
+
let e = this.data?.length ?? 0, t = this.viewport?.dpr || window.devicePixelRatio || 1, { startXPx: n, unitPx: r } = ss(this.opt.kWidth, this.opt.kGap, t);
|
|
9913
10013
|
return (n + e * r) / t + (this.opt.rightAxisWidth + (this.opt.priceLabelWidth || 60));
|
|
9914
10014
|
}
|
|
9915
10015
|
resize() {
|
|
@@ -9926,8 +10026,8 @@ var Xs = class e {
|
|
|
9926
10026
|
}
|
|
9927
10027
|
initPanes() {
|
|
9928
10028
|
this.paneRenderers = this.opt.panes.map((e) => {
|
|
9929
|
-
let t = new
|
|
9930
|
-
return n.id = `${e.id}-plot`, n.className = "plot-canvas", n.style.position = "absolute", n.style.left = "0", n.style.top = "0", r.id = `${e.id}-yAxis`, r.className = "
|
|
10029
|
+
let t = new ds(e.id), n = document.createElement("canvas"), r = document.createElement("canvas"), i = e.id === "main";
|
|
10030
|
+
return n.id = `${e.id}-plot`, n.className = i ? "plot-canvas main" : "plot-canvas sub", n.style.position = "absolute", n.style.left = "0", n.style.top = "0", r.id = `${e.id}-yAxis`, r.className = "right-axis", r.style.position = "absolute", r.style.right = "0", new ps({
|
|
9931
10031
|
plotCanvas: n,
|
|
9932
10032
|
yAxisCanvas: r
|
|
9933
10033
|
}, t, {
|
|
@@ -9937,14 +10037,10 @@ var Xs = class e {
|
|
|
9937
10037
|
});
|
|
9938
10038
|
});
|
|
9939
10039
|
let e = this.dom.canvasLayer;
|
|
9940
|
-
|
|
9941
|
-
|
|
9942
|
-
|
|
9943
|
-
|
|
9944
|
-
});
|
|
9945
|
-
let t = document.createElement("canvas");
|
|
9946
|
-
t.id = "border", t.style.position = "absolute", t.style.left = "0", t.style.top = "0", t.style.pointerEvents = "none", this.dom.borderCanvas = t, e.appendChild(t);
|
|
9947
|
-
}
|
|
10040
|
+
e && (e.querySelectorAll("canvas:not(.x-axis-canvas)").forEach((e) => e.remove()), this.paneRenderers.forEach((t) => {
|
|
10041
|
+
let n = t.getDom();
|
|
10042
|
+
e.appendChild(n.plotCanvas), e.appendChild(n.yAxisCanvas);
|
|
10043
|
+
}));
|
|
9948
10044
|
}
|
|
9949
10045
|
layoutPanes() {
|
|
9950
10046
|
let e = this.viewport;
|
|
@@ -9966,7 +10062,7 @@ var Xs = class e {
|
|
|
9966
10062
|
let e = this.dom.container;
|
|
9967
10063
|
if (!e) return null;
|
|
9968
10064
|
let t = Math.max(1, Math.ceil(e.clientWidth)), n = Math.max(1, Math.ceil(e.clientHeight)), r = e.scrollLeft, i = this.opt.rightAxisWidth + (this.opt.priceLabelWidth || 60), a = Math.round(t - i), o = Math.round(n - this.opt.bottomAxisHeight), s = window.devicePixelRatio || 1, c = 16 * 1024 * 1024;
|
|
9969
|
-
t * s * (n * s) > c && (s = Math.sqrt(c / (t * n))), this.dom.canvasLayer.style.width = `${t}px`, this.dom.canvasLayer.style.height = `${n}px`, this.dom.xAxisCanvas.style.width = `${a}px`, this.dom.xAxisCanvas.style.height = `${this.opt.bottomAxisHeight}px`, this.dom.xAxisCanvas.width = Math.round(a * s), this.dom.xAxisCanvas.height = Math.round(this.opt.bottomAxisHeight * s)
|
|
10065
|
+
t * s * (n * s) > c && (s = Math.sqrt(c / (t * n))), this.dom.canvasLayer.style.width = `${t}px`, this.dom.canvasLayer.style.height = `${n}px`, this.dom.xAxisCanvas.style.width = `${a}px`, this.dom.xAxisCanvas.style.height = `${this.opt.bottomAxisHeight}px`, this.dom.xAxisCanvas.width = Math.round(a * s), this.dom.xAxisCanvas.height = Math.round(this.opt.bottomAxisHeight * s);
|
|
9970
10066
|
let l = {
|
|
9971
10067
|
viewWidth: t,
|
|
9972
10068
|
viewHeight: n,
|
|
@@ -9980,18 +10076,18 @@ var Xs = class e {
|
|
|
9980
10076
|
};
|
|
9981
10077
|
//#endregion
|
|
9982
10078
|
//#region src/types/kLine.ts
|
|
9983
|
-
function
|
|
10079
|
+
function pc(e) {
|
|
9984
10080
|
return e.open > e.close ? "down" : e.open < e.close ? "up" : "flat";
|
|
9985
10081
|
}
|
|
9986
10082
|
//#endregion
|
|
9987
10083
|
//#region src/types/volumePrice.ts
|
|
9988
10084
|
var $ = /* @__PURE__ */ function(e) {
|
|
9989
10085
|
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;
|
|
9990
|
-
}({}),
|
|
10086
|
+
}({}), mc = {
|
|
9991
10087
|
volumeAmplifyThreshold: 1.5,
|
|
9992
10088
|
volumeShrinkThreshold: .8,
|
|
9993
10089
|
avgPeriod: 20
|
|
9994
|
-
},
|
|
10090
|
+
}, hc = class {
|
|
9995
10091
|
prefixSum = [];
|
|
9996
10092
|
dataLength = 0;
|
|
9997
10093
|
build(e) {
|
|
@@ -10016,8 +10112,8 @@ var $ = /* @__PURE__ */ function(e) {
|
|
|
10016
10112
|
return this.dataLength;
|
|
10017
10113
|
}
|
|
10018
10114
|
};
|
|
10019
|
-
function
|
|
10020
|
-
let i = new
|
|
10115
|
+
function gc(e, t, n, r = mc) {
|
|
10116
|
+
let i = new hc();
|
|
10021
10117
|
i.build(e);
|
|
10022
10118
|
let a = [], { volumeAmplifyThreshold: o, volumeShrinkThreshold: s, avgPeriod: c } = r;
|
|
10023
10119
|
for (let r = t; r < n && r < e.length; r++) {
|
|
@@ -10038,7 +10134,7 @@ function ec(e, t, n, r = Qs) {
|
|
|
10038
10134
|
}
|
|
10039
10135
|
//#endregion
|
|
10040
10136
|
//#region src/core/renderers/candle.ts
|
|
10041
|
-
function
|
|
10137
|
+
function _c() {
|
|
10042
10138
|
return {
|
|
10043
10139
|
name: "candle",
|
|
10044
10140
|
version: "1.0.0",
|
|
@@ -10049,36 +10145,36 @@ function tc() {
|
|
|
10049
10145
|
draw(e) {
|
|
10050
10146
|
let { ctx: t, pane: n, data: r, range: i, scrollLeft: a, kWidth: o, kGap: s, dpr: c, kLinePositions: l, markerManager: u } = e, d = r;
|
|
10051
10147
|
if (!d.length) return;
|
|
10052
|
-
let { kWidthPx: f } =
|
|
10148
|
+
let { kWidthPx: f } = ss(o, s, c);
|
|
10053
10149
|
t.save(), t.translate(-a, 0);
|
|
10054
|
-
let p = l || [], m =
|
|
10150
|
+
let p = l || [], m = gc(d, i.start, i.end, mc);
|
|
10055
10151
|
for (let e = i.start; e < i.end && e < d.length; e++) {
|
|
10056
10152
|
let r = d[e];
|
|
10057
10153
|
if (!r) continue;
|
|
10058
10154
|
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 = Math.min(a, s), _ = Math.max(Math.abs(a - s), 1), v = p[e - i.start];
|
|
10059
10155
|
if (!v) continue;
|
|
10060
|
-
let y =
|
|
10061
|
-
t.fillStyle =
|
|
10156
|
+
let y = xs(Math.round(v * c), g, f, _, c);
|
|
10157
|
+
t.fillStyle = pc(r) === "up" ? X.UP : X.DOWN, t.fillRect(y.bodyRect.x, y.bodyRect.y, y.bodyRect.width, y.bodyRect.height);
|
|
10062
10158
|
let b = y.wickRect.width, x = y.wickRect.x, S = y.bodyRect.y, C = y.bodyRect.y + y.bodyRect.height, w = Math.max(r.open, r.close), T = Math.min(r.open, r.close);
|
|
10063
10159
|
if (r.high > w) {
|
|
10064
|
-
let e =
|
|
10160
|
+
let e = ys(x, l, S, c);
|
|
10065
10161
|
e && t.fillRect(e.x, e.y, b, e.height);
|
|
10066
10162
|
}
|
|
10067
10163
|
if (r.low < T) {
|
|
10068
|
-
let e =
|
|
10164
|
+
let e = ys(x, C, h, c);
|
|
10069
10165
|
e && t.fillRect(e.x, e.y, b, e.height);
|
|
10070
10166
|
}
|
|
10071
10167
|
let E = m[e - i.start];
|
|
10072
10168
|
if (E !== $.OTHERS && u) {
|
|
10073
10169
|
let n = E === $.RISE_WITH_VOLUME || E === $.RISE_WITHOUT_VOLUME ? l - 15 : h + 15;
|
|
10074
|
-
|
|
10170
|
+
vc(t, y.bodyRect.x + y.bodyRect.width / 2, n, E, e, o, 4, u);
|
|
10075
10171
|
}
|
|
10076
10172
|
}
|
|
10077
10173
|
t.restore();
|
|
10078
10174
|
}
|
|
10079
10175
|
};
|
|
10080
10176
|
}
|
|
10081
|
-
function
|
|
10177
|
+
function vc(e, t, n, r, i, a, o = 4, s) {
|
|
10082
10178
|
let c = Math.min(a, 20), l = c * Math.sqrt(3) / 2, u, d;
|
|
10083
10179
|
switch (r) {
|
|
10084
10180
|
case $.RISE_WITH_VOLUME:
|
|
@@ -10142,12 +10238,12 @@ function nc(e, t, n, r, i, a, o = 4, s) {
|
|
|
10142
10238
|
}
|
|
10143
10239
|
//#endregion
|
|
10144
10240
|
//#region src/core/utils/tickCount.ts
|
|
10145
|
-
function
|
|
10241
|
+
function yc(e, t) {
|
|
10146
10242
|
return t ? Math.max(4, Math.min(8, Math.round(e / 80))) : 2;
|
|
10147
10243
|
}
|
|
10148
10244
|
//#endregion
|
|
10149
10245
|
//#region src/core/renderers/gridLines.ts
|
|
10150
|
-
function
|
|
10246
|
+
function bc() {
|
|
10151
10247
|
return {
|
|
10152
10248
|
name: "gridLines",
|
|
10153
10249
|
version: "1.0.0",
|
|
@@ -10158,11 +10254,11 @@ function ic() {
|
|
|
10158
10254
|
draw(e) {
|
|
10159
10255
|
let { ctx: t, pane: n, data: r, range: i, scrollLeft: a, kWidth: o, dpr: s, kLinePositions: c } = e, l = r;
|
|
10160
10256
|
if (!l.length) return;
|
|
10161
|
-
let u =
|
|
10257
|
+
let u = yc(n.height, n.id === "main");
|
|
10162
10258
|
t.save(), t.fillStyle = Aa.HORIZONTAL, t.translate(-a, 0);
|
|
10163
10259
|
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);
|
|
10164
10260
|
for (let e = 0; e < u; e++) {
|
|
10165
|
-
let n = u <= 1 ? 0 : e / (u - 1), r =
|
|
10261
|
+
let n = u <= 1 ? 0 : e / (u - 1), r = bs(f, p, Math.round(g + n * v), s);
|
|
10166
10262
|
r && t.fillRect(r.x, r.y, r.width, r.height);
|
|
10167
10263
|
}
|
|
10168
10264
|
let y = Ea(l);
|
|
@@ -10170,7 +10266,7 @@ function ic() {
|
|
|
10170
10266
|
if (e < i.start || e >= i.end || e >= l.length) continue;
|
|
10171
10267
|
let r = e - i.start;
|
|
10172
10268
|
if (r < 0 || r >= c.length) continue;
|
|
10173
|
-
let a =
|
|
10269
|
+
let a = ys(c[r] + o / 2, 0, n.height, s);
|
|
10174
10270
|
a && t.fillRect(a.x, a.y, a.width, a.height);
|
|
10175
10271
|
}
|
|
10176
10272
|
t.restore();
|
|
@@ -10179,7 +10275,7 @@ function ic() {
|
|
|
10179
10275
|
}
|
|
10180
10276
|
//#endregion
|
|
10181
10277
|
//#region src/core/renderers/lastPrice.ts
|
|
10182
|
-
function
|
|
10278
|
+
function xc() {
|
|
10183
10279
|
return {
|
|
10184
10280
|
name: "lastPriceLine",
|
|
10185
10281
|
version: "1.0.0",
|
|
@@ -10200,7 +10296,7 @@ function ac() {
|
|
|
10200
10296
|
}
|
|
10201
10297
|
//#endregion
|
|
10202
10298
|
//#region src/core/renderers/extremaMarkers.ts
|
|
10203
|
-
function
|
|
10299
|
+
function Sc() {
|
|
10204
10300
|
return {
|
|
10205
10301
|
name: "extremaMarkers",
|
|
10206
10302
|
version: "1.0.0",
|
|
@@ -10223,28 +10319,28 @@ function oc() {
|
|
|
10223
10319
|
let t = e - i.start;
|
|
10224
10320
|
return t < 0 || t >= l.length ? 0 : l[t] + o / 2;
|
|
10225
10321
|
};
|
|
10226
|
-
t.save(), t.translate(-a, 0),
|
|
10322
|
+
t.save(), t.translate(-a, 0), Cc(t, _(h), n.yAxis.priceToY(p), p, s, c, a), Cc(t, _(g), n.yAxis.priceToY(m), m, s, c, a), t.restore();
|
|
10227
10323
|
}
|
|
10228
10324
|
};
|
|
10229
10325
|
}
|
|
10230
|
-
function
|
|
10326
|
+
function Cc(e, t, n, r, i, a, o) {
|
|
10231
10327
|
let s = r.toFixed(2);
|
|
10232
10328
|
e.font = "12px Arial";
|
|
10233
10329
|
let c = e.measureText(s).width, l = t - o + 30 + 4 + c > a, u = t, d = l ? t - 30 : t + 30;
|
|
10234
10330
|
u > d && ([u, d] = [d, u]);
|
|
10235
|
-
let f =
|
|
10331
|
+
let f = bs(u, d, n, i);
|
|
10236
10332
|
f && (e.fillStyle = Da.WEAK, e.fillRect(f.x, f.y, f.width, f.height));
|
|
10237
10333
|
let p = Z(d, i), m = Z(n, i);
|
|
10238
10334
|
e.fillStyle = Da.WEAK, e.beginPath(), e.arc(p, m, 2, 0, Math.PI * 2), e.fill(), e.font = "12px Arial", e.textBaseline = "middle", e.fillStyle = X.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)));
|
|
10239
10335
|
}
|
|
10240
10336
|
//#endregion
|
|
10241
10337
|
//#region src/utils/kLineDraw/axis.ts
|
|
10242
|
-
function
|
|
10338
|
+
function wc(e, t) {
|
|
10243
10339
|
let { x: n, y: r, width: i, height: a, priceRange: o, yPaddingPx: s = 0, dpr: c, ticks: l = 10, bgColor: u = Oa.TRANSPARENT, textColor: d = Da.SECONDARY, lineColor: f = ka.DARK, fontSize: p = 16, paddingX: m = 12, drawLeftBorder: h = !0, drawTickLines: g = !0 } = t, _ = Math.max(0, Math.min(s, Math.floor(a / 2) - 1)), { maxPrice: v, minPrice: y } = o, b = v - y, x = b === 0 ? 0 : b / (Math.max(2, l) - 1);
|
|
10244
10340
|
e.fillStyle = u, e.fillRect(n, r, i, a), h && (e.strokeStyle = f, e.lineWidth = 1, e.beginPath(), e.moveTo(Q(n, c), r), e.lineTo(Q(n, c), r + a), e.stroke()), e.font = `${p}px -apple-system,BlinkMacSystemFont,Trebuchet MS,Roboto,Ubuntu,sans-serif`, e.textBaseline = "middle", e.textAlign = "left";
|
|
10245
10341
|
let S = n + m;
|
|
10246
10342
|
for (let t = 0; t < Math.max(2, l); t++) {
|
|
10247
|
-
let i = b === 0 ? v : v - x * t, o = Math.round(
|
|
10343
|
+
let i = b === 0 ? v : v - x * t, o = Math.round(vs(i, v, y, a, _, _) + r);
|
|
10248
10344
|
if (g) {
|
|
10249
10345
|
e.strokeStyle = f, e.beginPath();
|
|
10250
10346
|
let t = Q(o, c);
|
|
@@ -10253,33 +10349,29 @@ function cc(e, t) {
|
|
|
10253
10349
|
e.fillStyle = d, e.fillText(i.toFixed(2), Z(S, c), Z(o, c));
|
|
10254
10350
|
}
|
|
10255
10351
|
}
|
|
10256
|
-
function
|
|
10352
|
+
function Tc(e, t) {
|
|
10257
10353
|
let { x: n, y: r, width: i, height: a, crosshairX: o, timestamp: s, dpr: c, bgColor: l = Oa.WHITE, textColor: u = Da.PRIMARY, fontSize: d = 16, paddingX: f = 8, paddingY: p = 4 } = t, m = Ta(s);
|
|
10258
10354
|
e.save(), e.font = `${d}px -apple-system,BlinkMacSystemFont,Trebuchet MS,Roboto,Ubuntu,sans-serif`, e.textBaseline = "middle", e.textAlign = "center";
|
|
10259
10355
|
let h = Math.round(e.measureText(m).width), g = Math.min(i, h + f * 2), _ = Math.min(a, d + p * 2), v = Math.min(Math.max(o, n + g / 2), n + i - g / 2), y = r + a / 2, b = v - g / 2;
|
|
10260
10356
|
y - _ / 2, e.fillStyle = l, e.fillRect(Z(b, c), 0, Z(g, c), Z(_, c)), e.fillStyle = u, e.fillText(m, Z(v, c), Z(y, c)), e.restore();
|
|
10261
10357
|
}
|
|
10262
|
-
function
|
|
10358
|
+
function Ec(e, t) {
|
|
10263
10359
|
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 = Oa.TRANSPARENT, textColor: m = Da.SECONDARY, lineColor: h = ka.DARK, fontSize: g = 16, 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;
|
|
10264
10360
|
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";
|
|
10265
10361
|
let O = r + a / 2, k = Ea(o).filter((e) => e >= u && e < d);
|
|
10266
10362
|
for (let t of k) {
|
|
10267
10363
|
let n = o[t];
|
|
10268
10364
|
if (!n) continue;
|
|
10269
|
-
let
|
|
10270
|
-
if (
|
|
10271
|
-
let t = Math.min(Math.max(a, c),
|
|
10272
|
-
e.
|
|
10273
|
-
let i = Q(t, f);
|
|
10274
|
-
e.moveTo(i, r), e.lineTo(i, r + 4), e.stroke();
|
|
10275
|
-
let { text: o, isYear: s } = Sa(n.timestamp);
|
|
10276
|
-
e.fillStyle = m, e.font = `${s ? "bold " : ""}${g}px -apple-system,BlinkMacSystemFont,Trebuchet MS,Roboto,Ubuntu,sans-serif`, e.fillText(o, Z(t, f), Z(O, f));
|
|
10365
|
+
let r = E + t * T + D / 2 - s, a = _, c = Math.max(_, i - _);
|
|
10366
|
+
if (r >= a && r <= c) {
|
|
10367
|
+
let t = Math.min(Math.max(r, a), c), { text: i, isYear: o } = Sa(n.timestamp);
|
|
10368
|
+
e.fillStyle = m, e.font = `${o ? "bold " : ""}${g}px -apple-system,BlinkMacSystemFont,Trebuchet MS,Roboto,Ubuntu,sans-serif`, e.fillText(i, Z(t, f), Z(O, f));
|
|
10277
10369
|
}
|
|
10278
10370
|
}
|
|
10279
10371
|
}
|
|
10280
10372
|
//#endregion
|
|
10281
10373
|
//#region src/core/renderers/yAxis.ts
|
|
10282
|
-
function
|
|
10374
|
+
function Dc(e) {
|
|
10283
10375
|
return {
|
|
10284
10376
|
name: "yAxis",
|
|
10285
10377
|
version: "1.0.0",
|
|
@@ -10288,8 +10380,8 @@ function dc(e) {
|
|
|
10288
10380
|
paneId: oa,
|
|
10289
10381
|
priority: Y.SYSTEM_YAXIS,
|
|
10290
10382
|
draw(t) {
|
|
10291
|
-
let { ctx: n, pane: r, dpr: i, yAxisCtx: a } = t, o = a || n, s =
|
|
10292
|
-
|
|
10383
|
+
let { ctx: n, pane: r, dpr: i, yAxisCtx: a } = t, o = a || n, s = yc(r.height, r.id === "main");
|
|
10384
|
+
wc(o, {
|
|
10293
10385
|
x: 0,
|
|
10294
10386
|
y: r.top,
|
|
10295
10387
|
width: e.axisWidth,
|
|
@@ -10306,19 +10398,19 @@ function dc(e) {
|
|
|
10306
10398
|
}
|
|
10307
10399
|
//#endregion
|
|
10308
10400
|
//#region src/core/renderers/timeAxis.ts
|
|
10309
|
-
var
|
|
10310
|
-
function
|
|
10401
|
+
var Oc = Symbol("time-axis");
|
|
10402
|
+
function kc(e) {
|
|
10311
10403
|
return {
|
|
10312
10404
|
name: "timeAxis",
|
|
10313
10405
|
version: "1.0.0",
|
|
10314
10406
|
description: "时间轴渲染器",
|
|
10315
10407
|
debugName: "时间轴",
|
|
10316
|
-
paneId:
|
|
10408
|
+
paneId: Oc,
|
|
10317
10409
|
priority: Y.SYSTEM_XAXIS,
|
|
10318
10410
|
isSystem: !0,
|
|
10319
10411
|
draw(t) {
|
|
10320
10412
|
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;
|
|
10321
|
-
d.setTransform(1, 0, 0, 1, 0, 0), d.scale(c, c), d.clearRect(0, 0, f, p),
|
|
10413
|
+
d.setTransform(1, 0, 0, 1, 0, 0), d.scale(c, c), d.clearRect(0, 0, f, p), Ec(d, {
|
|
10322
10414
|
x: 0,
|
|
10323
10415
|
y: 0,
|
|
10324
10416
|
width: f,
|
|
@@ -10336,7 +10428,7 @@ function pc(e) {
|
|
|
10336
10428
|
let m = e.getCrosshair?.();
|
|
10337
10429
|
if (m && typeof m.index == "number") {
|
|
10338
10430
|
let e = u[m.index];
|
|
10339
|
-
e &&
|
|
10431
|
+
e && Tc(d, {
|
|
10340
10432
|
x: 0,
|
|
10341
10433
|
y: 0,
|
|
10342
10434
|
width: f,
|
|
@@ -10351,7 +10443,7 @@ function pc(e) {
|
|
|
10351
10443
|
}
|
|
10352
10444
|
//#endregion
|
|
10353
10445
|
//#region src/core/renderers/crosshair.ts
|
|
10354
|
-
function
|
|
10446
|
+
function Ac(e) {
|
|
10355
10447
|
return {
|
|
10356
10448
|
name: "crosshair",
|
|
10357
10449
|
version: "1.0.0",
|
|
@@ -10364,9 +10456,9 @@ function mc(e) {
|
|
|
10364
10456
|
if (o.isDragging || !o.pos) return;
|
|
10365
10457
|
let { x: s, y: c } = o.pos, l = r.id === o.activePaneId, u = l ? c - r.top : -1;
|
|
10366
10458
|
n.save(), n.beginPath(), n.rect(0, 0, a, r.height), n.clip(), n.fillStyle = Ba.LINE;
|
|
10367
|
-
let d =
|
|
10459
|
+
let d = ys(s, 0, r.height, i);
|
|
10368
10460
|
if (d && n.fillRect(d.x, d.y, d.width, d.height), l && u >= 0) {
|
|
10369
|
-
let e =
|
|
10461
|
+
let e = bs(0, a, Math.min(u, r.height - 1 / i), i);
|
|
10370
10462
|
e && n.fillRect(e.x, e.y, e.width, e.height);
|
|
10371
10463
|
}
|
|
10372
10464
|
n.restore();
|
|
@@ -10374,42 +10466,8 @@ function mc(e) {
|
|
|
10374
10466
|
};
|
|
10375
10467
|
}
|
|
10376
10468
|
//#endregion
|
|
10377
|
-
//#region src/core/renderers/globalBorders.ts
|
|
10378
|
-
var hc = Symbol("global-borders");
|
|
10379
|
-
function gc(e) {
|
|
10380
|
-
return {
|
|
10381
|
-
name: "globalBorders",
|
|
10382
|
-
version: "1.0.0",
|
|
10383
|
-
description: "全局边框渲染器",
|
|
10384
|
-
debugName: "边框",
|
|
10385
|
-
paneId: hc,
|
|
10386
|
-
priority: Y.SYSTEM_BORDER,
|
|
10387
|
-
isSystem: !0,
|
|
10388
|
-
draw(t) {
|
|
10389
|
-
let { ctx: n, dpr: r, paneWidth: i, borderCtx: a } = t, o = e.getPaneInfos();
|
|
10390
|
-
if (o.length === 0) return;
|
|
10391
|
-
let s = a || n;
|
|
10392
|
-
s.save(), s.strokeStyle = ka.DARK, s.lineWidth = 3;
|
|
10393
|
-
let c = 1.5 / r, l = Q(c, r), u = Q(i - c, r), d = Infinity, f = -Infinity;
|
|
10394
|
-
for (let e of o) d = Math.min(d, e.top), f = Math.max(f, e.top + e.height);
|
|
10395
|
-
d = Number.isFinite(d) ? d : 0, f = Number.isFinite(f) ? f : 0, s.beginPath();
|
|
10396
|
-
let p = o[0], m = Q(p.top + c, r);
|
|
10397
|
-
s.moveTo(l, m), s.lineTo(u, m);
|
|
10398
|
-
let h = o[o.length - 1], g = Q(h.top + h.height - c, r);
|
|
10399
|
-
s.moveTo(l, g), s.lineTo(u, g);
|
|
10400
|
-
let _ = Q(d + c, r), v = Z(f - c, r);
|
|
10401
|
-
s.moveTo(l, _), s.lineTo(l, v), s.moveTo(u, _), s.lineTo(u, v);
|
|
10402
|
-
for (let e = 1; e < o.length; e++) {
|
|
10403
|
-
let t = o[e], n = Q(t.top, r);
|
|
10404
|
-
s.moveTo(l, n), s.lineTo(u, n);
|
|
10405
|
-
}
|
|
10406
|
-
s.stroke(), s.restore();
|
|
10407
|
-
}
|
|
10408
|
-
};
|
|
10409
|
-
}
|
|
10410
|
-
//#endregion
|
|
10411
10469
|
//#region src/core/renderers/paneTitle.ts
|
|
10412
|
-
function
|
|
10470
|
+
function jc(e) {
|
|
10413
10471
|
let t = { ...e };
|
|
10414
10472
|
return {
|
|
10415
10473
|
name: `paneTitle_${e.paneId}`,
|
|
@@ -10450,7 +10508,7 @@ function _c(e) {
|
|
|
10450
10508
|
}
|
|
10451
10509
|
//#endregion
|
|
10452
10510
|
//#region src/components/KLineChart.vue?vue&type=script&setup=true&lang.ts
|
|
10453
|
-
var
|
|
10511
|
+
var Mc = { class: "chart-wrapper" }, Nc = 4, Pc = /* @__PURE__ */ po(/* @__PURE__ */ u({
|
|
10454
10512
|
__name: "KLineChart",
|
|
10455
10513
|
props: {
|
|
10456
10514
|
semanticConfig: {},
|
|
@@ -10459,7 +10517,7 @@ var vc = { class: "chart-wrapper" }, yc = 4, bc = /* @__PURE__ */ po(/* @__PURE_
|
|
|
10459
10517
|
yPaddingPx: { default: 0 },
|
|
10460
10518
|
minKWidth: { default: 2 },
|
|
10461
10519
|
maxKWidth: { default: 50 },
|
|
10462
|
-
rightAxisWidth: { default:
|
|
10520
|
+
rightAxisWidth: { default: 0 },
|
|
10463
10521
|
bottomAxisHeight: { default: 24 },
|
|
10464
10522
|
priceLabelWidth: { default: 60 }
|
|
10465
10523
|
},
|
|
@@ -10479,16 +10537,21 @@ var vc = { class: "chart-wrapper" }, yc = 4, bc = /* @__PURE__ */ po(/* @__PURE_
|
|
|
10479
10537
|
let O = _(null), k = _(null), A = _({
|
|
10480
10538
|
x: 0,
|
|
10481
10539
|
y: 0
|
|
10482
|
-
}), j = _(!1), M = _(null), N = _(null),
|
|
10540
|
+
}), j = _(!1), M = _(null), N = _(null), ee = _({
|
|
10483
10541
|
x: 0,
|
|
10484
10542
|
y: 0
|
|
10485
|
-
}),
|
|
10543
|
+
}), te = _(0), P = r(() => {
|
|
10486
10544
|
let e = M.value;
|
|
10487
10545
|
if (typeof e != "number") return null;
|
|
10546
|
+
te.value;
|
|
10488
10547
|
let t = C.value?.getData();
|
|
10489
10548
|
return t && e >= 0 && e < t.length ? t[e] : null;
|
|
10490
|
-
}),
|
|
10491
|
-
function
|
|
10549
|
+
}), F = r(() => M.value), ne = r(() => ee.value), re = r(() => (te.value, C.value?.getData() ?? []));
|
|
10550
|
+
function ie() {
|
|
10551
|
+
te.value++;
|
|
10552
|
+
}
|
|
10553
|
+
let ae = null;
|
|
10554
|
+
function I() {
|
|
10492
10555
|
let e = C.value?.interaction;
|
|
10493
10556
|
if (!e) {
|
|
10494
10557
|
M.value = null, N.value = null, O.value = null, k.value = null;
|
|
@@ -10496,27 +10559,18 @@ var vc = { class: "chart-wrapper" }, yc = 4, bc = /* @__PURE__ */ po(/* @__PURE_
|
|
|
10496
10559
|
}
|
|
10497
10560
|
M.value = e.hoveredIndex ?? null, N.value = e.crosshairIndex ?? null, O.value = e.hoveredMarkerData ?? null, k.value = e.hoveredCustomMarker ?? null;
|
|
10498
10561
|
let t = e.tooltipPos;
|
|
10499
|
-
t && (
|
|
10562
|
+
t && (ee.value = {
|
|
10500
10563
|
x: t.x,
|
|
10501
10564
|
y: t.y
|
|
10502
10565
|
});
|
|
10503
10566
|
}
|
|
10504
|
-
function
|
|
10505
|
-
|
|
10567
|
+
function oe() {
|
|
10568
|
+
ae ||= requestAnimationFrame(() => {
|
|
10569
|
+
I(), ae = null;
|
|
10570
|
+
});
|
|
10506
10571
|
}
|
|
10507
|
-
function
|
|
10508
|
-
j.value = !0, C.value?.interaction.onPointerDown(e),
|
|
10509
|
-
}
|
|
10510
|
-
function oe(e) {
|
|
10511
|
-
let t = v.value;
|
|
10512
|
-
if (t) {
|
|
10513
|
-
let n = t.getBoundingClientRect();
|
|
10514
|
-
A.value = {
|
|
10515
|
-
x: e.clientX - n.left,
|
|
10516
|
-
y: e.clientY - n.top
|
|
10517
|
-
};
|
|
10518
|
-
}
|
|
10519
|
-
C.value?.interaction.onMouseMove(e), F();
|
|
10572
|
+
function L(e) {
|
|
10573
|
+
j.value = !0, C.value?.interaction.onPointerDown(e), I();
|
|
10520
10574
|
}
|
|
10521
10575
|
function se(e) {
|
|
10522
10576
|
let t = v.value;
|
|
@@ -10527,24 +10581,18 @@ var vc = { class: "chart-wrapper" }, yc = 4, bc = /* @__PURE__ */ po(/* @__PURE_
|
|
|
10527
10581
|
y: e.clientY - n.top
|
|
10528
10582
|
};
|
|
10529
10583
|
}
|
|
10530
|
-
C.value?.interaction.onPointerMove(e),
|
|
10531
|
-
}
|
|
10532
|
-
function I() {
|
|
10533
|
-
j.value = !1, C.value?.interaction.onMouseUp(), F();
|
|
10584
|
+
C.value?.interaction.onPointerMove(e), oe();
|
|
10534
10585
|
}
|
|
10535
10586
|
function ce(e) {
|
|
10536
|
-
j.value = !1, C.value?.interaction.onPointerUp(e),
|
|
10537
|
-
}
|
|
10538
|
-
function le() {
|
|
10539
|
-
j.value = !1, C.value?.interaction.onMouseLeave(), M.value = null;
|
|
10587
|
+
j.value = !1, C.value?.interaction.onPointerUp(e), I();
|
|
10540
10588
|
}
|
|
10541
|
-
function
|
|
10589
|
+
function le(e) {
|
|
10542
10590
|
j.value = !1, C.value?.interaction.onPointerLeave(e), M.value = null;
|
|
10543
10591
|
}
|
|
10544
|
-
function
|
|
10545
|
-
C.value?.interaction.onScroll(),
|
|
10592
|
+
function ue() {
|
|
10593
|
+
C.value?.interaction.onScroll(), I();
|
|
10546
10594
|
}
|
|
10547
|
-
let
|
|
10595
|
+
let R = _(["MA"]), de = _({}), z = _([]), B = [
|
|
10548
10596
|
"VOLUME",
|
|
10549
10597
|
"MACD",
|
|
10550
10598
|
"RSI",
|
|
@@ -10555,7 +10603,7 @@ var vc = { class: "chart-wrapper" }, yc = 4, bc = /* @__PURE__ */ po(/* @__PURE_
|
|
|
10555
10603
|
"KST",
|
|
10556
10604
|
"FASTK"
|
|
10557
10605
|
];
|
|
10558
|
-
S(r(() =>
|
|
10606
|
+
S(r(() => z.value.length === 0 ? [{
|
|
10559
10607
|
id: "main",
|
|
10560
10608
|
ratio: 1,
|
|
10561
10609
|
visible: !0
|
|
@@ -10563,14 +10611,14 @@ var vc = { class: "chart-wrapper" }, yc = 4, bc = /* @__PURE__ */ po(/* @__PURE_
|
|
|
10563
10611
|
id: "main",
|
|
10564
10612
|
ratio: 1,
|
|
10565
10613
|
visible: !0
|
|
10566
|
-
}, ...
|
|
10614
|
+
}, ...z.value.map((e) => ({
|
|
10567
10615
|
id: e.id,
|
|
10568
10616
|
ratio: 1,
|
|
10569
10617
|
visible: !0
|
|
10570
10618
|
}))]), (e) => {
|
|
10571
10619
|
C.value?.updatePaneLayout(e);
|
|
10572
10620
|
}, { flush: "post" });
|
|
10573
|
-
function
|
|
10621
|
+
function fe(e) {
|
|
10574
10622
|
switch (e) {
|
|
10575
10623
|
case "MACD": return {
|
|
10576
10624
|
fastPeriod: 12,
|
|
@@ -10600,74 +10648,74 @@ var vc = { class: "chart-wrapper" }, yc = 4, bc = /* @__PURE__ */ po(/* @__PURE_
|
|
|
10600
10648
|
default: return {};
|
|
10601
10649
|
}
|
|
10602
10650
|
}
|
|
10603
|
-
function
|
|
10604
|
-
if (
|
|
10651
|
+
function pe(e = "VOLUME", t) {
|
|
10652
|
+
if (z.value.length >= Nc) return !1;
|
|
10605
10653
|
let n = `sub_${e}`;
|
|
10606
|
-
if (
|
|
10607
|
-
if (!C.value?.createSubPane(e, t ??
|
|
10608
|
-
let r =
|
|
10654
|
+
if (z.value.some((e) => e.id === n)) return !0;
|
|
10655
|
+
if (!C.value?.createSubPane(e, t ?? fe(e))) return !1;
|
|
10656
|
+
let r = jc({
|
|
10609
10657
|
paneId: n,
|
|
10610
10658
|
title: e,
|
|
10611
|
-
getTitleInfo: () =>
|
|
10659
|
+
getTitleInfo: () => ve(n)
|
|
10612
10660
|
});
|
|
10613
|
-
return C.value?.useRenderer(r),
|
|
10661
|
+
return C.value?.useRenderer(r), z.value.push({
|
|
10614
10662
|
id: n,
|
|
10615
10663
|
indicatorId: e,
|
|
10616
10664
|
rendererName: `${e.toLowerCase()}_${n}`,
|
|
10617
10665
|
paneTitleRendererName: r.name,
|
|
10618
|
-
params: t ??
|
|
10619
|
-
}),
|
|
10666
|
+
params: t ?? fe(e)
|
|
10667
|
+
}), R.value.includes(e) || R.value.push(e), !0;
|
|
10620
10668
|
}
|
|
10621
|
-
function
|
|
10622
|
-
let t =
|
|
10669
|
+
function me(e) {
|
|
10670
|
+
let t = z.value.findIndex((t) => t.id === e);
|
|
10623
10671
|
if (t === -1) return;
|
|
10624
|
-
let n =
|
|
10625
|
-
n && (C.value?.removeRenderer(n.paneTitleRendererName), C.value?.removeSubPane(n.indicatorId),
|
|
10672
|
+
let n = z.value[t];
|
|
10673
|
+
n && (C.value?.removeRenderer(n.paneTitleRendererName), C.value?.removeSubPane(n.indicatorId), z.value.splice(t, 1), z.value.some((e) => e.indicatorId === n.indicatorId) || (R.value = R.value.filter((e) => e !== n.indicatorId)));
|
|
10626
10674
|
}
|
|
10627
|
-
function
|
|
10628
|
-
for (let e of
|
|
10629
|
-
C.value?.clearSubPanes(),
|
|
10675
|
+
function he() {
|
|
10676
|
+
for (let e of z.value) C.value?.removeRenderer(e.paneTitleRendererName);
|
|
10677
|
+
C.value?.clearSubPanes(), z.value = [], R.value = R.value.filter((e) => !B.includes(e));
|
|
10630
10678
|
}
|
|
10631
|
-
function
|
|
10679
|
+
function ge() {
|
|
10632
10680
|
let e = C.value?.getSubPaneIndicators() ?? [];
|
|
10633
|
-
|
|
10681
|
+
z.value = [];
|
|
10634
10682
|
for (let t of e) {
|
|
10635
|
-
let e = `sub_${t}`, n =
|
|
10683
|
+
let e = `sub_${t}`, n = jc({
|
|
10636
10684
|
paneId: e,
|
|
10637
10685
|
title: t,
|
|
10638
|
-
getTitleInfo: () =>
|
|
10686
|
+
getTitleInfo: () => ve(e)
|
|
10639
10687
|
});
|
|
10640
|
-
C.value?.useRenderer(n),
|
|
10688
|
+
C.value?.useRenderer(n), z.value.push({
|
|
10641
10689
|
id: e,
|
|
10642
10690
|
indicatorId: t,
|
|
10643
10691
|
rendererName: `${t.toLowerCase()}_${e}`,
|
|
10644
10692
|
paneTitleRendererName: n.name,
|
|
10645
|
-
params:
|
|
10646
|
-
}),
|
|
10693
|
+
params: fe(t)
|
|
10694
|
+
}), R.value.includes(t) || R.value.push(t);
|
|
10647
10695
|
}
|
|
10648
10696
|
}
|
|
10649
|
-
function
|
|
10650
|
-
let n =
|
|
10697
|
+
function _e(e, t) {
|
|
10698
|
+
let n = z.value.find((t) => t.id === e);
|
|
10651
10699
|
if (!n) return;
|
|
10652
10700
|
let r = n.indicatorId;
|
|
10653
|
-
C.value?.removeRenderer(n.paneTitleRendererName), C.value?.removeSubPane(r), C.value?.createSubPane(t,
|
|
10654
|
-
let i = `sub_${t}`, a =
|
|
10701
|
+
C.value?.removeRenderer(n.paneTitleRendererName), C.value?.removeSubPane(r), C.value?.createSubPane(t, fe(t));
|
|
10702
|
+
let i = `sub_${t}`, a = jc({
|
|
10655
10703
|
paneId: i,
|
|
10656
10704
|
title: t,
|
|
10657
|
-
getTitleInfo: () =>
|
|
10705
|
+
getTitleInfo: () => ve(i)
|
|
10658
10706
|
});
|
|
10659
10707
|
C.value?.useRenderer(a);
|
|
10660
|
-
let o =
|
|
10661
|
-
o !== -1 && (
|
|
10708
|
+
let o = z.value.findIndex((t) => t.id === e);
|
|
10709
|
+
o !== -1 && (z.value[o] = {
|
|
10662
10710
|
id: i,
|
|
10663
10711
|
indicatorId: t,
|
|
10664
10712
|
rendererName: `${t.toLowerCase()}_${i}`,
|
|
10665
10713
|
paneTitleRendererName: a.name,
|
|
10666
|
-
params:
|
|
10667
|
-
}),
|
|
10714
|
+
params: fe(t)
|
|
10715
|
+
}), R.value = R.value.filter((e) => e !== r), R.value.includes(t) || R.value.push(t);
|
|
10668
10716
|
}
|
|
10669
|
-
function
|
|
10670
|
-
let t =
|
|
10717
|
+
function ve(e) {
|
|
10718
|
+
let t = z.value.find((t) => t.id === e);
|
|
10671
10719
|
if (!t) return null;
|
|
10672
10720
|
let n = C.value?.getData();
|
|
10673
10721
|
if (!n || n.length === 0) return null;
|
|
@@ -10680,26 +10728,26 @@ var vc = { class: "chart-wrapper" }, yc = 4, bc = /* @__PURE__ */ po(/* @__PURE_
|
|
|
10680
10728
|
let i = N.value;
|
|
10681
10729
|
if (i === null) return null;
|
|
10682
10730
|
switch (t.indicatorId) {
|
|
10683
|
-
case "MACD": return
|
|
10684
|
-
case "RSI": return
|
|
10685
|
-
case "CCI": return
|
|
10686
|
-
case "STOCH": return
|
|
10687
|
-
case "MOM": return
|
|
10688
|
-
case "WMSR": return
|
|
10689
|
-
case "KST": return
|
|
10690
|
-
case "FASTK": return
|
|
10731
|
+
case "MACD": return Fs(n, i, r.fastPeriod ?? 12, r.slowPeriod ?? 26, r.signalPeriod ?? 9);
|
|
10732
|
+
case "RSI": return Rs(n, i, r.period1 ?? 6, r.period2 ?? 12, r.period3 ?? 24);
|
|
10733
|
+
case "CCI": return Hs(n, i, r.period ?? 14);
|
|
10734
|
+
case "STOCH": return Ks(n, i, r.n ?? 9, r.m ?? 3);
|
|
10735
|
+
case "MOM": return Xs(n, i, r.period ?? 10);
|
|
10736
|
+
case "WMSR": return ec(n, i, r.period ?? 14);
|
|
10737
|
+
case "KST": return oc(n, i, r.roc1 ?? 10, r.roc2 ?? 15, r.roc3 ?? 20, r.roc4 ?? 30, r.signalPeriod ?? 9);
|
|
10738
|
+
case "FASTK": return uc(n, i, r.period ?? 9);
|
|
10691
10739
|
default: return null;
|
|
10692
10740
|
}
|
|
10693
10741
|
}
|
|
10694
|
-
function
|
|
10742
|
+
function ye(e, t) {
|
|
10695
10743
|
if (e === "MA") {
|
|
10696
|
-
t ? (
|
|
10744
|
+
t ? (R.value.includes(e) || R.value.push(e), C.value?.updateRendererConfig("ma", {
|
|
10697
10745
|
ma5: !0,
|
|
10698
10746
|
ma10: !0,
|
|
10699
10747
|
ma20: !0,
|
|
10700
10748
|
ma30: !0,
|
|
10701
10749
|
ma60: !0
|
|
10702
|
-
}), C.value?.setRendererEnabled("maLegend", !0)) : (
|
|
10750
|
+
}), C.value?.setRendererEnabled("maLegend", !0)) : (R.value = R.value.filter((t) => t !== e), C.value?.updateRendererConfig("ma", {
|
|
10703
10751
|
ma5: !1,
|
|
10704
10752
|
ma10: !1,
|
|
10705
10753
|
ma20: !1,
|
|
@@ -10709,54 +10757,55 @@ var vc = { class: "chart-wrapper" }, yc = 4, bc = /* @__PURE__ */ po(/* @__PURE_
|
|
|
10709
10757
|
return;
|
|
10710
10758
|
}
|
|
10711
10759
|
if (e === "BOLL") {
|
|
10712
|
-
t ?
|
|
10760
|
+
t ? R.value.includes(e) || R.value.push(e) : R.value = R.value.filter((t) => t !== e), C.value?.setRendererEnabled("boll", t), C.value?.setRendererEnabled("bollLegend", t), E();
|
|
10713
10761
|
return;
|
|
10714
10762
|
}
|
|
10715
|
-
if (
|
|
10763
|
+
if (B.includes(e)) {
|
|
10716
10764
|
if (t) {
|
|
10717
|
-
if (
|
|
10718
|
-
if (!
|
|
10719
|
-
let t =
|
|
10720
|
-
t &&
|
|
10765
|
+
if (z.value.find((t) => t.indicatorId === e)) return;
|
|
10766
|
+
if (!pe(e)) {
|
|
10767
|
+
let t = z.value[z.value.length - 1];
|
|
10768
|
+
t && _e(t.id, e);
|
|
10721
10769
|
}
|
|
10722
|
-
} else
|
|
10770
|
+
} else z.value.filter((t) => t.indicatorId === e).forEach((e) => me(e.id));
|
|
10723
10771
|
E();
|
|
10724
10772
|
}
|
|
10725
10773
|
}
|
|
10726
|
-
function
|
|
10727
|
-
if (
|
|
10774
|
+
function be(e, t) {
|
|
10775
|
+
if (de.value[e] = t, e === "BOLL") {
|
|
10728
10776
|
C.value?.updateRendererConfig("boll", t), C.value?.updateRendererConfig("bollLegend", t), E();
|
|
10729
10777
|
return;
|
|
10730
10778
|
}
|
|
10731
|
-
|
|
10779
|
+
B.includes(e) && z.value.filter((t) => t.indicatorId === e).forEach((e) => {
|
|
10732
10780
|
e.params = { ...t }, C.value?.updateRendererConfig(e.rendererName, t);
|
|
10733
10781
|
}), E();
|
|
10734
10782
|
}
|
|
10735
|
-
let
|
|
10736
|
-
let e = T.value, t = window.devicePixelRatio || 1, { startXPx: r, unitPx: i } =
|
|
10783
|
+
let xe = r(() => {
|
|
10784
|
+
let e = T.value, t = window.devicePixelRatio || 1, { startXPx: r, unitPx: i } = ss(b.value, x.value, t);
|
|
10737
10785
|
return (r + e * i) / t + (n.rightAxisWidth + n.priceLabelWidth);
|
|
10738
10786
|
});
|
|
10739
|
-
function
|
|
10787
|
+
function Se() {
|
|
10740
10788
|
let e = v.value;
|
|
10741
10789
|
e && (e.scrollLeft = e.scrollWidth, E());
|
|
10742
10790
|
}
|
|
10743
10791
|
return t({
|
|
10744
10792
|
scheduleRender: E,
|
|
10745
|
-
scrollToRight:
|
|
10746
|
-
addSubPane:
|
|
10747
|
-
removeSubPane:
|
|
10748
|
-
switchSubIndicator:
|
|
10749
|
-
clearAllSubPanes:
|
|
10793
|
+
scrollToRight: Se,
|
|
10794
|
+
addSubPane: pe,
|
|
10795
|
+
removeSubPane: me,
|
|
10796
|
+
switchSubIndicator: _e,
|
|
10797
|
+
clearAllSubPanes: he,
|
|
10750
10798
|
get plugin() {
|
|
10751
10799
|
return C.value?.plugin;
|
|
10752
10800
|
}
|
|
10753
10801
|
}), m(() => {
|
|
10754
10802
|
let e = v.value, t = u.value, r = c.value;
|
|
10755
10803
|
if (!e || !t || !r) return;
|
|
10756
|
-
|
|
10757
|
-
C.value?.interaction.onWheel(e),
|
|
10758
|
-
}
|
|
10759
|
-
|
|
10804
|
+
let i = (e) => {
|
|
10805
|
+
C.value?.interaction.onWheel(e), I();
|
|
10806
|
+
};
|
|
10807
|
+
e.addEventListener("wheel", i, { passive: !1 });
|
|
10808
|
+
let a = new fc({
|
|
10760
10809
|
container: e,
|
|
10761
10810
|
canvasLayer: t,
|
|
10762
10811
|
xAxisCanvas: r
|
|
@@ -10775,22 +10824,22 @@ var vc = { class: "chart-wrapper" }, yc = 4, bc = /* @__PURE__ */ po(/* @__PURE_
|
|
|
10775
10824
|
}],
|
|
10776
10825
|
paneGap: 0
|
|
10777
10826
|
});
|
|
10778
|
-
|
|
10827
|
+
a.setOnZoomChange(async (e, t, n) => {
|
|
10779
10828
|
b.value = e, x.value = t, await d(), await new Promise((e) => requestAnimationFrame(() => e()));
|
|
10780
10829
|
let r = v.value;
|
|
10781
10830
|
if (!r) return;
|
|
10782
|
-
let
|
|
10783
|
-
r.scrollLeft = Math.min(Math.max(0, n),
|
|
10784
|
-
}),
|
|
10831
|
+
let i = Math.max(0, r.scrollWidth - r.clientWidth);
|
|
10832
|
+
r.scrollLeft = Math.min(Math.max(0, n), i), a.applyZoom(e, t);
|
|
10833
|
+
}), a.useRenderer(bc()), a.useRenderer(Sc()), a.useRenderer(Cs({
|
|
10785
10834
|
ma5: !0,
|
|
10786
10835
|
ma10: !0,
|
|
10787
10836
|
ma20: !0,
|
|
10788
10837
|
ma30: !0,
|
|
10789
10838
|
ma60: !0
|
|
10790
|
-
})),
|
|
10839
|
+
})), a.useRenderer(Ds()), a.setRendererEnabled("boll", !1), a.useRenderer(_c()), a.useRenderer(xc()), a.useRenderer(va()), a.useRenderer(Dc({
|
|
10791
10840
|
axisWidth: n.rightAxisWidth,
|
|
10792
10841
|
yPaddingPx: n.yPaddingPx
|
|
10793
|
-
})),
|
|
10842
|
+
})), a.useRenderer(Ts({
|
|
10794
10843
|
yPaddingPx: n.yPaddingPx,
|
|
10795
10844
|
showMA: {
|
|
10796
10845
|
ma5: !0,
|
|
@@ -10799,39 +10848,36 @@ var vc = { class: "chart-wrapper" }, yc = 4, bc = /* @__PURE__ */ po(/* @__PURE_
|
|
|
10799
10848
|
ma30: !0,
|
|
10800
10849
|
ma60: !0
|
|
10801
10850
|
}
|
|
10802
|
-
})),
|
|
10803
|
-
pos:
|
|
10804
|
-
activePaneId:
|
|
10805
|
-
isDragging:
|
|
10806
|
-
}) })),
|
|
10851
|
+
})), a.useRenderer(ks({ yPaddingPx: n.yPaddingPx })), a.setRendererEnabled("bollLegend", !1), a.useRenderer(Ac({ getCrosshairState: () => ({
|
|
10852
|
+
pos: a.interaction.crosshairPos,
|
|
10853
|
+
activePaneId: a.interaction.activePaneId,
|
|
10854
|
+
isDragging: a.interaction.isDraggingState()
|
|
10855
|
+
}) })), a.useRenderer(kc({
|
|
10807
10856
|
height: n.bottomAxisHeight,
|
|
10808
10857
|
getCrosshair: () => {
|
|
10809
|
-
let e =
|
|
10858
|
+
let e = a.interaction.crosshairPos, t = a.interaction.hoveredIndex;
|
|
10810
10859
|
return e && t !== null ? {
|
|
10811
10860
|
x: e.x,
|
|
10812
10861
|
index: t
|
|
10813
10862
|
} : null;
|
|
10814
10863
|
}
|
|
10815
|
-
})),
|
|
10816
|
-
top: e.getPane().top,
|
|
10817
|
-
height: e.getPane().height
|
|
10818
|
-
})) })), C.value = i, i.resize(), w.value = new Ui(i), w.value.on("config:error", (e) => {
|
|
10864
|
+
})), C.value = a, a.resize(), w.value = new Ui(a), w.value.on("config:error", (e) => {
|
|
10819
10865
|
console.error("Semantic config error:", e);
|
|
10820
10866
|
}), w.value.on("config:ready", () => {
|
|
10821
|
-
T.value =
|
|
10867
|
+
T.value = a.getData()?.length ?? 0, ie(), ge(), d(() => Se());
|
|
10822
10868
|
}), w.value.applyConfig(n.semanticConfig).then((e) => {
|
|
10823
10869
|
e && !e.success && console.error("Semantic config apply failed:", e.errors);
|
|
10824
|
-
}),
|
|
10870
|
+
}), a.interaction.setOnMarkerHover((e) => {
|
|
10825
10871
|
O.value = e, E();
|
|
10826
|
-
}),
|
|
10872
|
+
}), a.interaction.setOnCustomMarkerHover((e) => {
|
|
10827
10873
|
k.value = e, E();
|
|
10828
10874
|
});
|
|
10829
|
-
let
|
|
10830
|
-
|
|
10831
|
-
|
|
10875
|
+
let o = null, s = new ResizeObserver(() => {
|
|
10876
|
+
o && clearTimeout(o), o = setTimeout(() => {
|
|
10877
|
+
a.resize(), o = null;
|
|
10832
10878
|
}, 50);
|
|
10833
10879
|
});
|
|
10834
|
-
|
|
10880
|
+
s.observe(e), a.__resizeObserver = s, a.__resizeTimeout = o, a.__onWheel = i;
|
|
10835
10881
|
}), h(() => {
|
|
10836
10882
|
let e = C.value;
|
|
10837
10883
|
if (e) {
|
|
@@ -10853,36 +10899,39 @@ var vc = { class: "chart-wrapper" }, yc = 4, bc = /* @__PURE__ */ po(/* @__PURE_
|
|
|
10853
10899
|
let t = await w.value?.applyConfig(e);
|
|
10854
10900
|
t && !t.success && console.error("Semantic config apply failed:", t.errors);
|
|
10855
10901
|
}
|
|
10856
|
-
}, { deep: !0 }), (e, t) => (g(), o("div",
|
|
10902
|
+
}, { deep: !0 }), (e, t) => (g(), o("div", Mc, [s("div", {
|
|
10857
10903
|
class: f(["chart-container", { "is-dragging": j.value }]),
|
|
10858
10904
|
ref_key: "containerRef",
|
|
10859
10905
|
ref: v,
|
|
10860
|
-
onScrollPassive:
|
|
10861
|
-
|
|
10862
|
-
onMousemove: oe,
|
|
10863
|
-
onMouseup: I,
|
|
10864
|
-
onMouseleave: le,
|
|
10865
|
-
onPointerdown: ae,
|
|
10906
|
+
onScrollPassive: ue,
|
|
10907
|
+
onPointerdown: L,
|
|
10866
10908
|
onPointermove: se,
|
|
10867
10909
|
onPointerup: ce,
|
|
10868
|
-
onPointerleave:
|
|
10910
|
+
onPointerleave: le
|
|
10869
10911
|
}, [s("div", {
|
|
10870
10912
|
class: "scroll-content",
|
|
10871
|
-
style: p({ width:
|
|
10913
|
+
style: p({ width: xe.value + "px" })
|
|
10872
10914
|
}, [s("div", {
|
|
10873
10915
|
class: "canvas-layer",
|
|
10874
10916
|
ref_key: "canvasLayerRef",
|
|
10875
10917
|
ref: u
|
|
10876
10918
|
}, [
|
|
10877
10919
|
s("canvas", {
|
|
10878
|
-
class: "x-axis-canvas",
|
|
10920
|
+
class: "x-axis-canvas bottom-axis",
|
|
10879
10921
|
ref_key: "xAxisCanvasRef",
|
|
10880
10922
|
ref: c
|
|
10881
10923
|
}, null, 512),
|
|
10882
|
-
|
|
10924
|
+
s("div", {
|
|
10925
|
+
class: "x-axis-corner right-axis-corner",
|
|
10926
|
+
style: p({
|
|
10927
|
+
height: n.bottomAxisHeight + "px",
|
|
10928
|
+
width: n.rightAxisWidth + n.priceLabelWidth + "px"
|
|
10929
|
+
})
|
|
10930
|
+
}, null, 4),
|
|
10931
|
+
P.value ? (g(), i(mo, {
|
|
10883
10932
|
key: 0,
|
|
10884
|
-
k:
|
|
10885
|
-
index:
|
|
10933
|
+
k: P.value,
|
|
10934
|
+
index: F.value,
|
|
10886
10935
|
data: re.value,
|
|
10887
10936
|
pos: ne.value,
|
|
10888
10937
|
"set-el": D
|
|
@@ -10897,15 +10946,15 @@ var vc = { class: "chart-wrapper" }, yc = 4, bc = /* @__PURE__ */ po(/* @__PURE_
|
|
|
10897
10946
|
marker: O.value || k.value,
|
|
10898
10947
|
pos: A.value
|
|
10899
10948
|
}, null, 8, ["marker", "pos"])) : a("", !0)
|
|
10900
|
-
], 512)], 4)], 34), l(
|
|
10901
|
-
"active-indicators":
|
|
10902
|
-
"indicator-params":
|
|
10903
|
-
onToggle:
|
|
10904
|
-
onUpdateParams:
|
|
10949
|
+
], 512)], 4)], 34), l(as, {
|
|
10950
|
+
"active-indicators": R.value,
|
|
10951
|
+
"indicator-params": de.value,
|
|
10952
|
+
onToggle: ye,
|
|
10953
|
+
onUpdateParams: be
|
|
10905
10954
|
}, null, 8, ["active-indicators", "indicator-params"])]));
|
|
10906
10955
|
}
|
|
10907
|
-
}), [["__scopeId", "data-v-
|
|
10908
|
-
e.component("KLineChart",
|
|
10956
|
+
}), [["__scopeId", "data-v-cb99e513"]]), Fc = { install(e) {
|
|
10957
|
+
e.component("KLineChart", Pc);
|
|
10909
10958
|
} };
|
|
10910
10959
|
//#endregion
|
|
10911
|
-
export { la as ConfigManager,
|
|
10960
|
+
export { la as ConfigManager, F as EventBus, oa as GLOBAL_PANE_ID, ca as HookSystem, Pc as KLineChart, Fc as KMapPlugin, ua as PluginHostImpl, sa as PluginRegistry, ia as PluginState, Y as RENDERER_PRIORITY, pa as RendererPluginManager, da as createPluginHost, aa as wrapPaneInfo };
|