@guihz/trading-vue-editor-tes 0.0.248 → 0.0.249
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/assets/parserTccWorker-CIVOM4FO.js +301 -0
- package/lib/assets/scriptsRunWorker-Cic7ZtQ4.js +83 -0
- package/lib/components/editor/parseScript/buildInFuncNamespace/box.d.ts +36 -36
- package/lib/components/editor/parseScript/buildInFuncNamespace/label.d.ts +2 -2
- package/lib/components/editor/parseScript/buildInFuncNamespace/line.d.ts +2 -2
- package/lib/components/editor/parseScript/buildInFuncNamespace/strategy.d.ts +8 -7
- package/lib/components/editor/parseScript/buildInFuncNamespace/table.d.ts +37 -36
- package/lib/components/editor/parseScript/buildInVarNamespace/index.d.ts +1 -1
- package/lib/components/editor/parseScript/constants.d.ts +1 -0
- package/lib/components/editor/parseScript/strategyNamespace/closedtrades.d.ts +18 -18
- package/lib/components/editor/parseScript/strategyNamespace/opentrades.d.ts +13 -13
- package/lib/components/editor/parseScript/strategyNamespace/risk.d.ts +3 -3
- package/lib/components/editor/parseScript/utils.d.ts +4 -2
- package/lib/trading-vue-editor.js +2 -2
- package/lib/trading-vue-editor.umd.cjs +1 -1
- package/package.json +2 -2
- package/lib/assets/parserTccWorker-6ii6rq4W.js +0 -287
- package/lib/assets/scriptsRunWorker-BxVId-CM.js +0 -69
- /package/lib/components/editor/parseScript/buildInVarNamespace/{Dividends.d.ts → dividends.d.ts} +0 -0
@@ -43,30 +43,30 @@ export default class BuildInBox {
|
|
43
43
|
private _verfiyArgs;
|
44
44
|
private _paramVerfiy;
|
45
45
|
copy({ id }: VBoxArgs, posStr: string): Box;
|
46
|
-
delete({ id }: VBoxArgs): void;
|
47
|
-
get_top({ id }: VBoxArgs): number | undefined;
|
48
|
-
get_bottom({ id }: VBoxArgs): number | undefined;
|
49
|
-
get_left({ id }: VBoxArgs): number | undefined;
|
50
|
-
get_right({ id }: VBoxArgs): number | undefined;
|
51
|
-
set_top({ id, ...args }: VBoxArgs): void;
|
52
|
-
set_bottom({ id, ...args }: VBoxArgs): void;
|
53
|
-
set_text({ id, ...args }: VBoxArgs): void;
|
54
|
-
set_left({ id, ...args }: VBoxArgs): void;
|
55
|
-
set_right({ id, ...args }: VBoxArgs): void;
|
46
|
+
delete({ id }: VBoxArgs, posStr: string): void;
|
47
|
+
get_top({ id }: VBoxArgs, posStr: string): number | undefined;
|
48
|
+
get_bottom({ id }: VBoxArgs, posStr: string): number | undefined;
|
49
|
+
get_left({ id }: VBoxArgs, posStr: string): number | undefined;
|
50
|
+
get_right({ id }: VBoxArgs, posStr: string): number | undefined;
|
51
|
+
set_top({ id, ...args }: VBoxArgs, posStr: string): void;
|
52
|
+
set_bottom({ id, ...args }: VBoxArgs, posStr: string): void;
|
53
|
+
set_text({ id, ...args }: VBoxArgs, posStr: string): void;
|
54
|
+
set_left({ id, ...args }: VBoxArgs, posStr: string): void;
|
55
|
+
set_right({ id, ...args }: VBoxArgs, posStr: string): void;
|
56
56
|
set_extend({ id, ...args }: VBoxArgs, posStr: string): void;
|
57
|
-
set_bgcolor({ id, ...args }: VBoxArgs): void;
|
58
|
-
set_border_color({ id, ...args }: VBoxArgs): void;
|
59
|
-
set_border_width({ id, ...args }: VBoxArgs): void;
|
57
|
+
set_bgcolor({ id, ...args }: VBoxArgs, posStr: string): void;
|
58
|
+
set_border_color({ id, ...args }: VBoxArgs, posStr: string): void;
|
59
|
+
set_border_width({ id, ...args }: VBoxArgs, posStr: string): void;
|
60
60
|
set_border_style({ id, ...args }: VBoxArgs, posStr: string): void;
|
61
|
-
set_lefttop({ id, ...args }: VBoxArgs): void;
|
62
|
-
set_rightbottom({ id, ...args }: VBoxArgs): void;
|
61
|
+
set_lefttop({ id, ...args }: VBoxArgs, posStr: string): void;
|
62
|
+
set_rightbottom({ id, ...args }: VBoxArgs, posStr: string): void;
|
63
63
|
set_text_size({ id, ...args }: VBoxArgs, posStr: string): void;
|
64
64
|
set_text_wrap({ id, ...args }: VBoxArgs, posStr: string): void;
|
65
|
-
set_text_color({ id, ...args }: VBoxArgs): void;
|
65
|
+
set_text_color({ id, ...args }: VBoxArgs, posStr: string): void;
|
66
66
|
set_text_halign({ id, ...args }: VBoxArgs, posStr: string): void;
|
67
67
|
set_text_valign({ id, ...args }: VBoxArgs, posStr: string): void;
|
68
|
-
set_top_left_point({ id, ...args }: VBoxArgs): void;
|
69
|
-
set_bottom_right_point({ id, ...args }: VBoxArgs): void;
|
68
|
+
set_top_left_point({ id, ...args }: VBoxArgs, posStr: string): void;
|
69
|
+
set_bottom_right_point({ id, ...args }: VBoxArgs, posStr: string): void;
|
70
70
|
set_text_font_family({ id, ...args }: VBoxArgs, posStr: string): void;
|
71
71
|
}
|
72
72
|
export declare class Box {
|
@@ -80,30 +80,30 @@ export declare class Box {
|
|
80
80
|
updateId(): string;
|
81
81
|
get data(): IBoxArgs | undefined;
|
82
82
|
copy(posStr: string): Box;
|
83
|
-
delete(): void;
|
84
|
-
get_top(): number | undefined;
|
85
|
-
set_top({ top }: IBoxArgs): void;
|
86
|
-
get_left(): number | undefined;
|
87
|
-
set_left({ left }: IBoxArgs): void;
|
88
|
-
set_text({ text }: IBoxArgs): void;
|
89
|
-
get_right(): number | undefined;
|
90
|
-
set_right({ right }: IBoxArgs): void;
|
91
|
-
get_bottom(): number | undefined;
|
92
|
-
set_bottom({ bottom }: IBoxArgs): void;
|
83
|
+
delete(posStr: string): void;
|
84
|
+
get_top(posStr: string): number | undefined;
|
85
|
+
set_top({ top }: IBoxArgs, posStr: string): void;
|
86
|
+
get_left(posStr: string): number | undefined;
|
87
|
+
set_left({ left }: IBoxArgs, posStr: string): void;
|
88
|
+
set_text({ text }: IBoxArgs, posStr: string): void;
|
89
|
+
get_right(posStr: string): number | undefined;
|
90
|
+
set_right({ right }: IBoxArgs, posStr: string): void;
|
91
|
+
get_bottom(posStr: string): number | undefined;
|
92
|
+
set_bottom({ bottom }: IBoxArgs, posStr: string): void;
|
93
93
|
set_extend({ extend }: IBoxArgs, posStr: string): void;
|
94
|
-
set_bgcolor({ color }: IBoxArgs): void;
|
95
|
-
set_lefttop({ left, top }: IBoxArgs): void;
|
94
|
+
set_bgcolor({ color }: IBoxArgs, posStr: string): void;
|
95
|
+
set_lefttop({ left, top }: IBoxArgs, posStr: string): void;
|
96
96
|
set_text_size({ text_size }: IBoxArgs, posStr: string): void;
|
97
97
|
set_text_wrap({ text_wrap }: IBoxArgs, posStr: string): void;
|
98
|
-
set_text_color({ text_color }: IBoxArgs): void;
|
99
|
-
set_rightbottom({ right, bottom }: IBoxArgs): void;
|
98
|
+
set_text_color({ text_color }: IBoxArgs, posStr: string): void;
|
99
|
+
set_rightbottom({ right, bottom }: IBoxArgs, posStr: string): void;
|
100
100
|
set_text_halign({ text_halign }: IBoxArgs, posStr: string): void;
|
101
101
|
set_text_valign({ text_valign }: IBoxArgs, posStr: string): void;
|
102
|
-
set_top_left_point({ point }: IBoxArgs): void;
|
103
|
-
set_border_color({ color }: IBoxArgs): void;
|
102
|
+
set_top_left_point({ point }: IBoxArgs, posStr: string): void;
|
103
|
+
set_border_color({ color }: IBoxArgs, posStr: string): void;
|
104
104
|
set_border_style({ style }: IBoxArgs, posStr: string): void;
|
105
|
-
set_border_width({ width }: IBoxArgs): void;
|
106
|
-
set_bottom_right_point({ point }: IBoxArgs): void;
|
105
|
+
set_border_width({ width }: IBoxArgs, posStr: string): void;
|
106
|
+
set_bottom_right_point({ point }: IBoxArgs, posStr: string): void;
|
107
107
|
set_text_font_family({ text_font_family }: IBoxArgs, posStr: string): void;
|
108
108
|
private _paramVerfiy;
|
109
109
|
private _getBox;
|
@@ -37,7 +37,7 @@ export default class BuildInLabel {
|
|
37
37
|
get_y({ id }: TLabelArgs, posStr: string): number | undefined;
|
38
38
|
set_x({ id, ...args }: TLabelArgs, posStr: string): void;
|
39
39
|
set_y({ id, ...args }: TLabelArgs, posStr: string): void;
|
40
|
-
delete({ id }: TLabelArgs): void;
|
40
|
+
delete({ id }: TLabelArgs, posStr: string): void;
|
41
41
|
get_text({ id }: TLabelArgs, posStr: string): string | undefined;
|
42
42
|
set_xy({ id, ...args }: TLabelArgs, posStr: string): void;
|
43
43
|
set_size({ id, ...args }: TLabelArgs, posStr: string): void;
|
@@ -67,7 +67,7 @@ export declare class Label {
|
|
67
67
|
get_y(posStr: string): number | undefined;
|
68
68
|
set_x({ x }: PartialLabelArgs, posStr: string): void;
|
69
69
|
set_y({ y }: PartialLabelArgs, posStr: string): void;
|
70
|
-
delete(): void;
|
70
|
+
delete(posStr: string): void;
|
71
71
|
set_xy({ x, y }: PartialLabelArgs, posStr: string): void;
|
72
72
|
get_text(posStr: string): string | undefined;
|
73
73
|
set_size({ size }: PartialLabelArgs, posStr: string): void;
|
@@ -36,7 +36,7 @@ export default class BuildInLine {
|
|
36
36
|
x?: Line;
|
37
37
|
}): Line | undefined;
|
38
38
|
copy({ id }: LineArgs, posStr: string): Line;
|
39
|
-
delete({ id }: LineArgs): void;
|
39
|
+
delete({ id }: LineArgs, posStr: string): void;
|
40
40
|
get_x1({ id }: LineArgs, posStr: string): number | undefined;
|
41
41
|
get_x2({ id }: LineArgs, posStr: string): number | undefined;
|
42
42
|
get_y1({ id }: LineArgs, posStr: string): number | undefined;
|
@@ -67,7 +67,7 @@ export declare class Line {
|
|
67
67
|
get type(): VType;
|
68
68
|
get data(): ILineArgs | undefined;
|
69
69
|
copy(posStr: string): Line;
|
70
|
-
delete(): void;
|
70
|
+
delete(posStr: string): void;
|
71
71
|
get_price({ x }: ILineArgs, posStr: string): number | undefined;
|
72
72
|
get_x1(posStr: string): number | undefined;
|
73
73
|
get_x2(posStr: string): number | undefined;
|
@@ -171,16 +171,16 @@ export default class Strategy {
|
|
171
171
|
strategy(args: IKeyObjectValue, posStr: string): void;
|
172
172
|
order(args: IOrderArgs, posStr: string): void;
|
173
173
|
entry(args: IOrderArgs, posStr: string): void;
|
174
|
-
close(args: IOrder): void;
|
175
|
-
close_all(args: IOrder): void;
|
174
|
+
close(args: IOrder, posStr: string): void;
|
175
|
+
close_all(args: IOrder, posStr: string): void;
|
176
176
|
cancel({ id }: {
|
177
177
|
id: string;
|
178
|
-
}): void;
|
179
|
-
cancel_all(): void;
|
178
|
+
}, posStr: string): void;
|
179
|
+
cancel_all(posStr: string): void;
|
180
180
|
exit(args: IOrderArgs, posStr: string): void;
|
181
|
-
convert_to_account({ value }: IArgs): number | undefined;
|
182
|
-
convert_to_symbol({ value }: IArgs): number | undefined;
|
183
|
-
default_entry_qty({ fill_price }: IArgs): number;
|
181
|
+
convert_to_account({ value }: IArgs, posStr: string): number | undefined;
|
182
|
+
convert_to_symbol({ value }: IArgs, posStr: string): number | undefined;
|
183
|
+
default_entry_qty({ fill_price }: IArgs, posStr: string): number;
|
184
184
|
private _calcDefaultQty;
|
185
185
|
private _getCommQty;
|
186
186
|
private _getLen;
|
@@ -238,5 +238,6 @@ export default class Strategy {
|
|
238
238
|
private _calcOrderFillsHandle;
|
239
239
|
private _isNaN;
|
240
240
|
private _paramVerfiy;
|
241
|
+
_verfiyRequestFunc(posStr: string, name: string): void;
|
241
242
|
}
|
242
243
|
export {};
|
@@ -53,25 +53,25 @@ export default class BuildInTable {
|
|
53
53
|
}): Table | undefined;
|
54
54
|
new(args: ITableArgs, posStr: string): Table;
|
55
55
|
private _paramVerfiy;
|
56
|
-
cell({ table_id, ...args }: ITableCellArgs): void;
|
57
|
-
cell_set_bgcolor({ table_id, ...args }: ITableCellArgs): void;
|
58
|
-
cell_set_height({ table_id, ...args }: ITableCellArgs): void;
|
59
|
-
cell_set_text({ table_id, ...args }: ITableCellArgs): void;
|
60
|
-
cell_set_text_color({ table_id, ...args }: ITableCellArgs): void;
|
61
|
-
cell_set_text_font_family({ table_id, ...args }: ITableCellArgs): void;
|
62
|
-
cell_set_text_halign({ table_id, ...args }: ITableCellArgs): void;
|
63
|
-
cell_set_text_valign({ table_id, ...args }: ITableCellArgs): void;
|
64
|
-
cell_set_text_size({ table_id, ...args }: ITableCellArgs): void;
|
65
|
-
cell_set_tooltip({ table_id, ...args }: ITableCellArgs): void;
|
66
|
-
cell_set_width({ table_id, ...args }: ITableCellArgs): void;
|
67
|
-
clear({ table_id, ...args }: ITableArgs): void;
|
68
|
-
delete({ table_id }: ITableArgs): void;
|
56
|
+
cell({ table_id, ...args }: ITableCellArgs, posStr: string): void;
|
57
|
+
cell_set_bgcolor({ table_id, ...args }: ITableCellArgs, posStr: string): void;
|
58
|
+
cell_set_height({ table_id, ...args }: ITableCellArgs, posStr: string): void;
|
59
|
+
cell_set_text({ table_id, ...args }: ITableCellArgs, posStr: string): void;
|
60
|
+
cell_set_text_color({ table_id, ...args }: ITableCellArgs, posStr: string): void;
|
61
|
+
cell_set_text_font_family({ table_id, ...args }: ITableCellArgs, posStr: string): void;
|
62
|
+
cell_set_text_halign({ table_id, ...args }: ITableCellArgs, posStr: string): void;
|
63
|
+
cell_set_text_valign({ table_id, ...args }: ITableCellArgs, posStr: string): void;
|
64
|
+
cell_set_text_size({ table_id, ...args }: ITableCellArgs, posStr: string): void;
|
65
|
+
cell_set_tooltip({ table_id, ...args }: ITableCellArgs, posStr: string): void;
|
66
|
+
cell_set_width({ table_id, ...args }: ITableCellArgs, posStr: string): void;
|
67
|
+
clear({ table_id, ...args }: ITableArgs, posStr: string): void;
|
68
|
+
delete({ table_id }: ITableArgs, posStr: string): void;
|
69
69
|
merge_cells({ table_id, ...args }: ITableArgs, posStr: string): void;
|
70
|
-
set_bgcolor({ table_id, ...args }: ITableArgs): void;
|
71
|
-
set_border_color({ table_id, ...args }: ITableArgs): void;
|
72
|
-
set_border_width({ table_id, ...args }: ITableArgs): void;
|
73
|
-
set_frame_color({ table_id, ...args }: ITableArgs): void;
|
74
|
-
set_frame_width({ table_id, ...args }: ITableArgs): void;
|
70
|
+
set_bgcolor({ table_id, ...args }: ITableArgs, posStr: string): void;
|
71
|
+
set_border_color({ table_id, ...args }: ITableArgs, posStr: string): void;
|
72
|
+
set_border_width({ table_id, ...args }: ITableArgs, posStr: string): void;
|
73
|
+
set_frame_color({ table_id, ...args }: ITableArgs, posStr: string): void;
|
74
|
+
set_frame_width({ table_id, ...args }: ITableArgs, posStr: string): void;
|
75
75
|
set_position({ table_id, ...args }: ITableArgs, posStr: string): void;
|
76
76
|
}
|
77
77
|
export declare class Table {
|
@@ -85,27 +85,28 @@ export declare class Table {
|
|
85
85
|
get id(): string;
|
86
86
|
updateId(): string;
|
87
87
|
get data(): ITableArgs | undefined;
|
88
|
-
cell(args: ITableCellArgs): void;
|
89
|
-
cell_set_bgcolor({ column, row, bgcolor }: ITableCellArgs): void;
|
90
|
-
cell_set_height({ column, row, height }: ITableCellArgs): void;
|
91
|
-
cell_set_text({ column, row, text }: ITableCellArgs): void;
|
92
|
-
cell_set_text_color({ column, row, text_color }: ITableCellArgs): void;
|
93
|
-
cell_set_text_font_family({ column, row, text_font_family }: ITableCellArgs): void;
|
94
|
-
cell_set_text_halign({ column, row, text_halign }: ITableCellArgs): void;
|
95
|
-
cell_set_text_valign({ column, row, text_valign }: ITableCellArgs): void;
|
96
|
-
cell_set_text_size({ column, row, text_size }: ITableCellArgs): void;
|
97
|
-
cell_set_tooltip({ column, row, tooltip }: ITableCellArgs): void;
|
98
|
-
cell_set_width({ column, row, width }: ITableCellArgs): void;
|
99
|
-
clear({ start_column, start_row, end_column, end_row }: ITableArgs): void;
|
100
|
-
delete(): void;
|
88
|
+
cell(args: ITableCellArgs, posStr: string): void;
|
89
|
+
cell_set_bgcolor({ column, row, bgcolor }: ITableCellArgs, posStr: string): void;
|
90
|
+
cell_set_height({ column, row, height }: ITableCellArgs, posStr: string): void;
|
91
|
+
cell_set_text({ column, row, text }: ITableCellArgs, posStr: string): void;
|
92
|
+
cell_set_text_color({ column, row, text_color }: ITableCellArgs, posStr: string): void;
|
93
|
+
cell_set_text_font_family({ column, row, text_font_family }: ITableCellArgs, posStr: string): void;
|
94
|
+
cell_set_text_halign({ column, row, text_halign }: ITableCellArgs, posStr: string): void;
|
95
|
+
cell_set_text_valign({ column, row, text_valign }: ITableCellArgs, posStr: string): void;
|
96
|
+
cell_set_text_size({ column, row, text_size }: ITableCellArgs, posStr: string): void;
|
97
|
+
cell_set_tooltip({ column, row, tooltip }: ITableCellArgs, posStr: string): void;
|
98
|
+
cell_set_width({ column, row, width }: ITableCellArgs, posStr: string): void;
|
99
|
+
clear({ start_column, start_row, end_column, end_row }: ITableArgs, posStr: string): void;
|
100
|
+
delete(posStr: string): void;
|
101
101
|
merge_cells({ start_column, start_row, end_column, end_row }: ITableArgs, posStr: string): void;
|
102
|
-
set_bgcolor({ bgcolor }: ITableArgs): void;
|
103
|
-
set_border_color({ border_color }: ITableArgs): void;
|
104
|
-
set_border_width({ border_width }: ITableArgs): void;
|
105
|
-
set_frame_color({ frame_color }: ITableArgs): void;
|
106
|
-
set_frame_width({ frame_width }: ITableArgs): void;
|
102
|
+
set_bgcolor({ bgcolor }: ITableArgs, posStr: string): void;
|
103
|
+
set_border_color({ border_color }: ITableArgs, posStr: string): void;
|
104
|
+
set_border_width({ border_width }: ITableArgs, posStr: string): void;
|
105
|
+
set_frame_color({ frame_color }: ITableArgs, posStr: string): void;
|
106
|
+
set_frame_width({ frame_width }: ITableArgs, posStr: string): void;
|
107
107
|
set_position({ position }: ITableArgs, posStr: string): void;
|
108
108
|
private _paramVerfiy;
|
109
109
|
private _getTableItem;
|
110
|
+
private _verfiyRequestFunc;
|
110
111
|
}
|
111
112
|
export {};
|
@@ -5,24 +5,24 @@ interface IArgs {
|
|
5
5
|
declare class Closedtrdes {
|
6
6
|
private _strategy;
|
7
7
|
constructor(strategy: Strategy);
|
8
|
-
commission({ trade_num }: IArgs): number;
|
9
|
-
entry_bar_index({ trade_num }: IArgs): number | undefined;
|
10
|
-
entry_comment({ trade_num }: IArgs): string;
|
11
|
-
entry_id({ trade_num }: IArgs): string;
|
12
|
-
entry_price({ trade_num }: IArgs): number | undefined;
|
13
|
-
entry_time({ trade_num }: IArgs): number | undefined;
|
14
|
-
exit_bar_index({ trade_num }: IArgs): number | undefined;
|
15
|
-
exit_comment({ trade_num }: IArgs): string | undefined;
|
16
|
-
exit_id({ trade_num }: IArgs): string | undefined;
|
17
|
-
exit_price({ trade_num }: IArgs): number | undefined;
|
18
|
-
exit_time({ trade_num }: IArgs): number | undefined;
|
19
|
-
max_drawdown({ trade_num }: IArgs): number | undefined;
|
20
|
-
max_drawdown_percent({ trade_num }: IArgs): number | undefined;
|
21
|
-
max_runup({ trade_num }: IArgs): number | undefined;
|
22
|
-
max_runup_percent({ trade_num }: IArgs): number | undefined;
|
23
|
-
profit({ trade_num }: IArgs): number | undefined;
|
24
|
-
profit_percent({ trade_num }: IArgs): number | undefined;
|
25
|
-
size({ trade_num }: IArgs): number;
|
8
|
+
commission({ trade_num }: IArgs, posStr: string): number;
|
9
|
+
entry_bar_index({ trade_num }: IArgs, posStr: string): number | undefined;
|
10
|
+
entry_comment({ trade_num }: IArgs, posStr: string): string;
|
11
|
+
entry_id({ trade_num }: IArgs, posStr: string): string;
|
12
|
+
entry_price({ trade_num }: IArgs, posStr: string): number | undefined;
|
13
|
+
entry_time({ trade_num }: IArgs, posStr: string): number | undefined;
|
14
|
+
exit_bar_index({ trade_num }: IArgs, posStr: string): number | undefined;
|
15
|
+
exit_comment({ trade_num }: IArgs, posStr: string): string | undefined;
|
16
|
+
exit_id({ trade_num }: IArgs, posStr: string): string | undefined;
|
17
|
+
exit_price({ trade_num }: IArgs, posStr: string): number | undefined;
|
18
|
+
exit_time({ trade_num }: IArgs, posStr: string): number | undefined;
|
19
|
+
max_drawdown({ trade_num }: IArgs, posStr: string): number | undefined;
|
20
|
+
max_drawdown_percent({ trade_num }: IArgs, posStr: string): number | undefined;
|
21
|
+
max_runup({ trade_num }: IArgs, posStr: string): number | undefined;
|
22
|
+
max_runup_percent({ trade_num }: IArgs, posStr: string): number | undefined;
|
23
|
+
profit({ trade_num }: IArgs, posStr: string): number | undefined;
|
24
|
+
profit_percent({ trade_num }: IArgs, posStr: string): number | undefined;
|
25
|
+
size({ trade_num }: IArgs, posStr: string): number;
|
26
26
|
private _verifyTradeNum;
|
27
27
|
}
|
28
28
|
export default Closedtrdes;
|
@@ -5,19 +5,19 @@ interface IArgs {
|
|
5
5
|
declare class Opentrades {
|
6
6
|
private _strategy;
|
7
7
|
constructor(strategy: Strategy);
|
8
|
-
commission({ trade_num }: IArgs): number;
|
9
|
-
entry_bar_index({ trade_num }: IArgs): number | undefined;
|
10
|
-
entry_comment({ trade_num }: IArgs): string;
|
11
|
-
entry_id({ trade_num }: IArgs): string;
|
12
|
-
entry_price({ trade_num }: IArgs): number | undefined;
|
13
|
-
entry_time({ trade_num }: IArgs): number | undefined;
|
14
|
-
max_drawdown({ trade_num }: IArgs): number | undefined;
|
15
|
-
max_drawdown_percent({ trade_num }: IArgs): number | undefined;
|
16
|
-
max_runup({ trade_num }: IArgs): number | undefined;
|
17
|
-
max_runup_percent({ trade_num }: IArgs): number | undefined;
|
18
|
-
profit({ trade_num }: IArgs): number | undefined;
|
19
|
-
profit_percent({ trade_num }: IArgs): number | undefined;
|
20
|
-
size({ trade_num }: IArgs): number;
|
8
|
+
commission({ trade_num }: IArgs, posStr: string): number;
|
9
|
+
entry_bar_index({ trade_num }: IArgs, posStr: string): number | undefined;
|
10
|
+
entry_comment({ trade_num }: IArgs, posStr: string): string;
|
11
|
+
entry_id({ trade_num }: IArgs, posStr: string): string;
|
12
|
+
entry_price({ trade_num }: IArgs, posStr: string): number | undefined;
|
13
|
+
entry_time({ trade_num }: IArgs, posStr: string): number | undefined;
|
14
|
+
max_drawdown({ trade_num }: IArgs, posStr: string): number | undefined;
|
15
|
+
max_drawdown_percent({ trade_num }: IArgs, posStr: string): number | undefined;
|
16
|
+
max_runup({ trade_num }: IArgs, posStr: string): number | undefined;
|
17
|
+
max_runup_percent({ trade_num }: IArgs, posStr: string): number | undefined;
|
18
|
+
profit({ trade_num }: IArgs, posStr: string): number | undefined;
|
19
|
+
profit_percent({ trade_num }: IArgs, posStr: string): number | undefined;
|
20
|
+
size({ trade_num }: IArgs, posStr: string): number;
|
21
21
|
private _verifyTradeNum;
|
22
22
|
}
|
23
23
|
export default Opentrades;
|
@@ -12,11 +12,11 @@ declare class Risk {
|
|
12
12
|
private _errorListener;
|
13
13
|
constructor(strategy: Strategy, errorListener: TccErrorListener);
|
14
14
|
allow_entry_in({ value }: IRiskArgs, posStr: string): void;
|
15
|
-
max_cons_loss_days({ count }: IRiskArgs): void;
|
15
|
+
max_cons_loss_days({ count }: IRiskArgs, posStr: string): void;
|
16
16
|
max_drawdown({ value, type }: IRiskArgs, posStr: string): void;
|
17
|
-
max_intraday_filled_orders({ count }: IRiskArgs): void;
|
17
|
+
max_intraday_filled_orders({ count }: IRiskArgs, posStr: string): void;
|
18
18
|
max_intraday_loss({ value, type }: IRiskArgs, posStr: string): void;
|
19
|
-
max_position_size({ contracts }: IRiskArgs): void;
|
19
|
+
max_position_size({ contracts }: IRiskArgs, posStr: string): void;
|
20
20
|
private _paramVerfiy;
|
21
21
|
}
|
22
22
|
export default Risk;
|
@@ -1,10 +1,11 @@
|
|
1
1
|
import { IKeyValue } from "../type";
|
2
|
-
import
|
2
|
+
import { TccErrorListener } from "./buildInFuncNamespace";
|
3
|
+
import moment from 'moment-timezone';
|
3
4
|
export declare function replaceTemplate(template: string, replacements: IKeyValue): string;
|
4
5
|
export declare function parsePerid(period: string): (string | number)[];
|
5
6
|
export declare function generateRandomId(length?: number): string;
|
6
7
|
export declare function parseTimezoneOffset(timezone: string): number;
|
7
|
-
export declare function parserTimezone(time?:
|
8
|
+
export declare function parserTimezone(time?: any, timezone?: string): moment.Moment;
|
8
9
|
export declare function periodConvert(period: string, time: number): number;
|
9
10
|
export declare function isNotNum(num?: number): boolean;
|
10
11
|
export declare function argColorsHandle(args: any, colors: string[]): void;
|
@@ -14,3 +15,4 @@ export declare function decimalTrunc(num: number, len: number): number;
|
|
14
15
|
export declare function decimalCeil(num?: number, precision?: number): number | undefined;
|
15
16
|
export declare function decimalFloor(num?: number, precision?: number): number | undefined;
|
16
17
|
export declare function transformPeriod(period: string): string;
|
18
|
+
export declare function addRequestUseFuncError(errorListener: TccErrorListener, funcName: string, reqName: string, posStr: string): void;
|
@@ -69138,14 +69138,14 @@ function br(a, s, r) {
|
|
69138
69138
|
function Nw() {
|
69139
69139
|
return new Array(4).fill(0).map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16)).join("-");
|
69140
69140
|
}
|
69141
|
-
const Cd = new Worker(new URL("" + new URL("assets/scriptsRunWorker-
|
69141
|
+
const Cd = new Worker(new URL("" + new URL("assets/scriptsRunWorker-Cic7ZtQ4.js", import.meta.url).href, import.meta.url), { type: "module", name: "Run TccScript Server" });
|
69142
69142
|
Cd.onerror = (a) => {
|
69143
69143
|
console.error(a);
|
69144
69144
|
};
|
69145
69145
|
async function Sd(a) {
|
69146
69146
|
return await wn.setInlayHints(a);
|
69147
69147
|
}
|
69148
|
-
const Nd = xo(Cd), zd = xo(new Worker(new URL("" + new URL("assets/parserTccWorker-
|
69148
|
+
const Nd = xo(Cd), zd = xo(new Worker(new URL("" + new URL("assets/parserTccWorker-CIVOM4FO.js", import.meta.url).href, import.meta.url), { type: "module", name: "Parser TccScript Server" }));
|
69149
69149
|
async function zw(a, s = !1) {
|
69150
69150
|
const { functions: r, types: n, constants: o, variables: l, methods: c } = dt;
|
69151
69151
|
return await zd.parseTcc(a, s, ho(Sd), { functions: Object.fromEntries(r), methods: Object.fromEntries(c), types: Object.fromEntries(n), constants: Object.fromEntries(o), variables: Object.fromEntries(l) });
|
@@ -141,7 +141,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
141
141
|
* @license
|
142
142
|
* Copyright 2019 Google LLC
|
143
143
|
* SPDX-License-Identifier: Apache-2.0
|
144
|
-
*/const tl=Symbol("Comlink.proxy"),Dm=Symbol("Comlink.endpoint"),Im=Symbol("Comlink.releaseProxy"),Bn=Symbol("Comlink.finalizer"),ba=Symbol("Comlink.thrown"),sl=a=>typeof a=="object"&&a!==null||typeof a=="function",Am={canHandle:a=>sl(a)&&a[tl],serialize(a){const{port1:s,port2:r}=new MessageChannel;return al(a,s),[r,[r]]},deserialize(a){return a.start(),Un(a)}},qm={canHandle:a=>sl(a)&&ba in a,serialize({value:a}){let s;return a instanceof Error?s={isError:!0,value:{message:a.message,name:a.name,stack:a.stack}}:s={isError:!1,value:a},[s,[]]},deserialize(a){throw a.isError?Object.assign(new Error(a.value.message),a.value):a.value}},rl=new Map([["proxy",Am],["throw",qm]]);function Cm(a,s){for(const r of a)if(s===r||r==="*"||r instanceof RegExp&&r.test(s))return!0;return!1}function al(a,s=globalThis,r=["*"]){s.addEventListener("message",function n(o){if(!o||!o.data)return;if(!Cm(r,o.origin)){console.warn(`Invalid origin '${o.origin}' for comlink proxy`);return}const{id:l,type:c,path:u}=Object.assign({path:[]},o.data),m=(o.data.argumentList||[]).map(Is);let _;try{const g=u.slice(0,-1).reduce((h,D)=>h[D],a),x=u.reduce((h,D)=>h[D],a);switch(c){case"GET":_=x;break;case"SET":g[u.slice(-1)[0]]=Is(o.data.value),_=!0;break;case"APPLY":_=x.apply(g,m);break;case"CONSTRUCT":{const h=new x(...m);_=Kn(h)}break;case"ENDPOINT":{const{port1:h,port2:D}=new MessageChannel;al(a,D),_=Lm(h,[h])}break;case"RELEASE":_=void 0;break;default:return}}catch(g){_={value:g,[ba]:0}}Promise.resolve(_).catch(g=>({value:g,[ba]:0})).then(g=>{const[x,h]=va(g);s.postMessage(Object.assign(Object.assign({},x),{id:l}),h),c==="RELEASE"&&(s.removeEventListener("message",n),nl(s),Bn in a&&typeof a[Bn]=="function"&&a[Bn]())}).catch(g=>{const[x,h]=va({value:new TypeError("Unserializable return value"),[ba]:0});s.postMessage(Object.assign(Object.assign({},x),{id:l}),h)})}),s.start&&s.start()}function Sm(a){return a.constructor.name==="MessagePort"}function nl(a){Sm(a)&&a.close()}function Un(a,s){return $n(a,[],s)}function xa(a){if(a)throw new Error("Proxy has been released and is not useable")}function il(a){return Hs(a,{type:"RELEASE"}).then(()=>{nl(a)})}const ha=new WeakMap,wa="FinalizationRegistry"in globalThis&&new FinalizationRegistry(a=>{const s=(ha.get(a)||0)-1;ha.set(a,s),s===0&&il(a)});function zm(a,s){const r=(ha.get(s)||0)+1;ha.set(s,r),wa&&wa.register(a,s,a)}function Nm(a){wa&&wa.unregister(a)}function $n(a,s=[],r=function(){}){let n=!1;const o=new Proxy(r,{get(l,c){if(xa(n),c===Im)return()=>{Nm(o),il(a),n=!0};if(c==="then"){if(s.length===0)return{then:()=>o};const u=Hs(a,{type:"GET",path:s.map(m=>m.toString())}).then(Is);return u.then.bind(u)}return $n(a,[...s,c])},set(l,c,u){xa(n);const[m,_]=va(u);return Hs(a,{type:"SET",path:[...s,c].map(g=>g.toString()),value:m},_).then(Is)},apply(l,c,u){xa(n);const m=s[s.length-1];if(m===Dm)return Hs(a,{type:"ENDPOINT"}).then(Is);if(m==="bind")return $n(a,s.slice(0,-1));const[_,g]=ol(u);return Hs(a,{type:"APPLY",path:s.map(x=>x.toString()),argumentList:_},g).then(Is)},construct(l,c){xa(n);const[u,m]=ol(c);return Hs(a,{type:"CONSTRUCT",path:s.map(_=>_.toString()),argumentList:u},m).then(Is)}});return zm(o,a),o}function Em(a){return Array.prototype.concat.apply([],a)}function ol(a){const s=a.map(va);return[s.map(r=>r[0]),Em(s.map(r=>r[1]))]}const ll=new WeakMap;function Lm(a,s){return ll.set(a,s),a}function Kn(a){return Object.assign(a,{[tl]:!0})}function va(a){for(const[s,r]of rl)if(r.canHandle(a)){const[n,o]=r.serialize(a);return[{type:"HANDLER",name:s,value:n},o]}return[{type:"RAW",value:a},ll.get(a)||[]]}function Is(a){switch(a.type){case"HANDLER":return rl.get(a.name).deserialize(a.value);case"RAW":return a.value}}function Hs(a,s,r){return new Promise(n=>{const o=Mm();a.addEventListener("message",function l(c){!c.data||!c.data.id||c.data.id!==o||(a.removeEventListener("message",l),n(c.data))}),a.start&&a.start(),a.postMessage(Object.assign({id:o},s),r)})}function Mm(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}const cl=new Worker(new URL(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/scriptsRunWorker-BxVId-CM.js").href:new URL("assets/scriptsRunWorker-BxVId-CM.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||document.baseURI).href),typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:ra&&ra.src||new URL("trading-vue-editor.umd.cjs",document.baseURI).href),{type:"module",name:"Run TccScript Server"});cl.onerror=a=>{console.error(a)};async function pl(a){return await _a.setInlayHints(a)}const dl=Un(cl),ul=Un(new Worker(new URL(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/parserTccWorker-6ii6rq4W.js").href:new URL("assets/parserTccWorker-6ii6rq4W.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||document.baseURI).href),typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:ra&&ra.src||new URL("trading-vue-editor.umd.cjs",document.baseURI).href),{type:"module",name:"Parser TccScript Server"}));async function ml(a,s=!1){const{functions:r,types:n,constants:o,variables:l,methods:c}=nt;return await ul.parseTcc(a,s,Kn(pl),{functions:Object.fromEntries(r),methods:Object.fromEntries(c),types:Object.fromEntries(n),constants:Object.fromEntries(o),variables:Object.fromEntries(l)})}async function Om(a,s){const{functions:r,types:n,constants:o,variables:l,methods:c}=nt;return await ul.parseLibraryCode(a,s,Kn(pl),{functions:Object.fromEntries(r),methods:Object.fromEntries(c),types:Object.fromEntries(n),constants:Object.fromEntries(o),variables:Object.fromEntries(l)})}async function Pm(a,s,r=!0){return await dl.runScript(a,s,r)}async function Rm(a){return await dl.removeScript(a)}function Fm(a){return new Worker(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/editor.worker-CT5Cb1wO.js").href:new URL("assets/editor.worker-CT5Cb1wO.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||document.baseURI).href),{name:a==null?void 0:a.name})}const{slice:Bm,forEach:Um}=[];function $m(a){return Um.call(Bm.call(arguments,1),s=>{if(s)for(const r in s)a[r]===void 0&&(a[r]=s[r])}),a}const yl=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Km=(a,s,r)=>{const n=r||{};n.path=n.path||"/";const o=encodeURIComponent(s);let l=`${a}=${o}`;if(n.maxAge>0){const c=n.maxAge-0;if(Number.isNaN(c))throw new Error("maxAge should be a Number");l+=`; Max-Age=${Math.floor(c)}`}if(n.domain){if(!yl.test(n.domain))throw new TypeError("option domain is invalid");l+=`; Domain=${n.domain}`}if(n.path){if(!yl.test(n.path))throw new TypeError("option path is invalid");l+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");l+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(l+="; HttpOnly"),n.secure&&(l+="; Secure"),n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"strict":l+="; SameSite=Strict";break;case"none":l+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return l},_l={create(a,s,r,n){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+r*60*1e3)),n&&(o.domain=n),document.cookie=Km(a,encodeURIComponent(s),o)},read(a){const s=`${a}=`,r=document.cookie.split(";");for(let n=0;n<r.length;n++){let o=r[n];for(;o.charAt(0)===" ";)o=o.substring(1,o.length);if(o.indexOf(s)===0)return o.substring(s.length,o.length)}return null},remove(a){this.create(a,"",-1)}};var jm={name:"cookie",lookup(a){let{lookupCookie:s}=a;if(s&&typeof document<"u")return _l.read(s)||void 0},cacheUserLanguage(a,s){let{lookupCookie:r,cookieMinutes:n,cookieDomain:o,cookieOptions:l}=s;r&&typeof document<"u"&&_l.create(r,a,n,o,l)}},Hm={name:"querystring",lookup(a){var n;let{lookupQuerystring:s}=a,r;if(typeof window<"u"){let{search:o}=window.location;!window.location.search&&((n=window.location.hash)==null?void 0:n.indexOf("?"))>-1&&(o=window.location.hash.substring(window.location.hash.indexOf("?")));const c=o.substring(1).split("&");for(let u=0;u<c.length;u++){const m=c[u].indexOf("=");m>0&&c[u].substring(0,m)===s&&(r=c[u].substring(m+1))}}return r}};let Cr=null;const fl=()=>{if(Cr!==null)return Cr;try{Cr=window!=="undefined"&&window.localStorage!==null;const a="i18next.translate.boo";window.localStorage.setItem(a,"foo"),window.localStorage.removeItem(a)}catch{Cr=!1}return Cr};var Wm={name:"localStorage",lookup(a){let{lookupLocalStorage:s}=a;if(s&&fl())return window.localStorage.getItem(s)||void 0},cacheUserLanguage(a,s){let{lookupLocalStorage:r}=s;r&&fl()&&window.localStorage.setItem(r,a)}};let Sr=null;const gl=()=>{if(Sr!==null)return Sr;try{Sr=window!=="undefined"&&window.sessionStorage!==null;const a="i18next.translate.boo";window.sessionStorage.setItem(a,"foo"),window.sessionStorage.removeItem(a)}catch{Sr=!1}return Sr};var Vm={name:"sessionStorage",lookup(a){let{lookupSessionStorage:s}=a;if(s&&gl())return window.sessionStorage.getItem(s)||void 0},cacheUserLanguage(a,s){let{lookupSessionStorage:r}=s;r&&gl()&&window.sessionStorage.setItem(r,a)}},Gm={name:"navigator",lookup(a){const s=[];if(typeof navigator<"u"){const{languages:r,userLanguage:n,language:o}=navigator;if(r)for(let l=0;l<r.length;l++)s.push(r[l]);n&&s.push(n),o&&s.push(o)}return s.length>0?s:void 0}},Xm={name:"htmlTag",lookup(a){let{htmlTag:s}=a,r;const n=s||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(r=n.getAttribute("lang")),r}},Ym={name:"path",lookup(a){var o;let{lookupFromPathIndex:s}=a;if(typeof window>"u")return;const r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(r)?(o=r[typeof s=="number"?s:0])==null?void 0:o.replace("/",""):void 0}},Qm={name:"subdomain",lookup(a){var o,l;let{lookupFromSubdomainIndex:s}=a;const r=typeof s=="number"?s+1:1,n=typeof window<"u"&&((l=(o=window.location)==null?void 0:o.hostname)==null?void 0:l.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(n)return n[r]}};function Zm(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:a=>a}}class bl{constructor(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(s,r)}init(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=s||{languageUtils:{}},this.options=$m(r,this.options||{},Zm()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=o=>o.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(jm),this.addDetector(Hm),this.addDetector(Wm),this.addDetector(Vm),this.addDetector(Gm),this.addDetector(Xm),this.addDetector(Ym),this.addDetector(Qm)}addDetector(s){return this.detectors[s.name]=s,this}detect(s){s||(s=this.options.order);let r=[];return s.forEach(n=>{if(this.detectors[n]){let o=this.detectors[n].lookup(this.options);o&&typeof o=="string"&&(o=[o]),o&&(r=r.concat(o))}}),r=r.map(n=>this.options.convertDetectedLanguage(n)),this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}cacheUserLanguage(s,r){r||(r=this.options.caches),r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(s)>-1||r.forEach(n=>{this.detectors[n]&&this.detectors[n].cacheUserLanguage(s,this.options)}))}}bl.type="languageDetector";const Jm=(...a)=>{console!=null&&console.warn&&(As(a[0])&&(a[0]=`react-i18next:: ${a[0]}`),console.warn(...a))},xl={},jn=(...a)=>{As(a[0])&&xl[a[0]]||(As(a[0])&&(xl[a[0]]=new Date),Jm(...a))},hl=(a,s)=>()=>{if(a.isInitialized)s();else{const r=()=>{setTimeout(()=>{a.off("initialized",r)},0),s()};a.on("initialized",r)}},Hn=(a,s,r)=>{a.loadNamespaces(s,hl(a,r))},wl=(a,s,r,n)=>{if(As(r)&&(r=[r]),a.options.preload&&a.options.preload.indexOf(s)>-1)return Hn(a,r,n);r.forEach(o=>{a.options.ns.indexOf(o)<0&&a.options.ns.push(o)}),a.loadLanguages(s,hl(a,n))},ey=(a,s,r={})=>!s.languages||!s.languages.length?(jn("i18n.languages were undefined or empty",s.languages),!0):s.hasLoadedNamespace(a,{lng:r.lng,precheck:(n,o)=>{var l;if(((l=r.bindI18n)==null?void 0:l.indexOf("languageChanging"))>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!o(n.isLanguageChangingTo,a))return!1}}),As=a=>typeof a=="string",ty=a=>typeof a=="object"&&a!==null,sy=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,ry={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},ay=a=>ry[a];let Wn={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:a=>a.replace(sy,ay)};const ny=(a={})=>{Wn={...Wn,...a}},iy=()=>Wn;let vl;const oy=a=>{vl=a},ly=()=>vl,cy={type:"3rdParty",init(a){ny(a.options.react),oy(a)}},py=N.createContext();class dy{constructor(){this.usedNamespaces={}}addUsedNamespaces(s){s.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const uy=(a,s)=>{const r=N.useRef();return N.useEffect(()=>{r.current=s?r.current:a},[a,s]),r.current},Tl=(a,s,r,n)=>a.getFixedT(s,r,n),my=(a,s,r,n)=>N.useCallback(Tl(a,s,r,n),[a,s,r,n]),Ws=(a,s={})=>{var W,Q,C,z;const{i18n:r}=s,{i18n:n,defaultNS:o}=N.useContext(py)||{},l=r||n||ly();if(l&&!l.reportNamespaces&&(l.reportNamespaces=new dy),!l){jn("You will need to pass in an i18next instance by using initReactI18next");const V=(A,L)=>As(L)?L:ty(L)&&As(L.defaultValue)?L.defaultValue:Array.isArray(A)?A[A.length-1]:A,q=[V,{},!1];return q.t=V,q.i18n={},q.ready=!1,q}(W=l.options.react)!=null&&W.wait&&jn("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const c={...iy(),...l.options.react,...s},{useSuspense:u,keyPrefix:m}=c;let _=a||o||((Q=l.options)==null?void 0:Q.defaultNS);_=As(_)?[_]:_||["translation"],(z=(C=l.reportNamespaces).addUsedNamespaces)==null||z.call(C,_);const g=(l.isInitialized||l.initializedStoreOnce)&&_.every(V=>ey(V,l,c)),x=my(l,s.lng||null,c.nsMode==="fallback"?_:_[0],m),h=()=>x,D=()=>Tl(l,s.lng||null,c.nsMode==="fallback"?_:_[0],m),[S,R]=N.useState(h);let U=_.join();s.lng&&(U=`${s.lng}${U}`);const K=uy(U),H=N.useRef(!0);N.useEffect(()=>{const{bindI18n:V,bindI18nStore:q}=c;H.current=!0,!g&&!u&&(s.lng?wl(l,s.lng,_,()=>{H.current&&R(D)}):Hn(l,_,()=>{H.current&&R(D)})),g&&K&&K!==U&&H.current&&R(D);const A=()=>{H.current&&R(D)};return V&&(l==null||l.on(V,A)),q&&(l==null||l.store.on(q,A)),()=>{H.current=!1,l&&(V==null||V.split(" ").forEach(L=>l.off(L,A))),q&&l&&q.split(" ").forEach(L=>l.store.off(L,A))}},[l,U]),N.useEffect(()=>{H.current&&g&&R(h)},[l,m,g]);const re=[S,l,g];if(re.t=S,re.i18n=l,re.ready=g,g||!g&&!u)return re;throw new Promise(V=>{s.lng?wl(l,s.lng,_,()=>V()):Hn(l,_,()=>V())})},yy={type:"type",syntax:"syntax",overloads:"overloads",arguments:"arguments",fields:"fields",example:"example",returns:"returns",remarks:"remarks","see also":"see also","Copy code":"Copy code","Copy link":"Copy link",Copied:"Copied","Link copied":"Link copied",variables:"Variables",constants:"Constants",functions:"Functions",keywords:"Keywords",types:"Types",operators:"Operators",annotations:"Annotations",search:"Search","Mine Script® v1 Reference Manual":"Mine Script® v1 Reference Manual","This script is read-only. It cannot be edited.":"This script is read-only. It cannot be edited.","save script":"Save script","open script":"Open script","find/replace":"Find/Replace","toggle console":"Toggle console","open editor in new tab":"Open editor in new tab","open editor in new window":"Open editor in new window",keyword:"keyword","built-in function":"built-in function","built-in variable":"built-in variable","built-in method":"built-in method","built-in type":"built-in type",annotation:"annotation","built-in constant":"built-in constant",namespace:"namespace","user-defined variable":"user-defined variable","user-defined type":"user-defined type",field:"field",enum:"enum","user-defined method":"user-defined method","user-defined function":"user-defined function",parameter:"parameter","**Namespaces** are immutable terms that act as prefixes for groups of identifiers. A dot and another term always follow a namespace when naming Tcc functions, variables, and methods.":"**Namespaces** are immutable terms that act as prefixes for groups of identifiers. A dot and another term always follow a namespace when naming Mine functions, variables, and methods.","to trigger parameters hint":"to trigger parameters hint",library:"library","enum member":"enum member",Returns:"Returns",Syntax:"Syntax",Remarks:"Remarks",Fields:"Fields",Description:"Description",Example:"Example","Enum members":"Enum members",statement:"statement",loop:"loop","`click` on keyword for more help":"`click` on keyword for more help"},_y={type:"类型",syntax:"语法",overloads:"重载",arguments:"参数",fields:"字段",example:"例子",returns:"返回值",remarks:"备注","see also":"另见","Copy code":"复制代码","Copy link":"复制链接",Copied:"已复制","Link copied":"链接已复制",variables:"内置变量",constants:"常量",functions:"函数",keywords:"关键词",types:"类型",operators:"运算符",annotations:"注释",search:"搜索","Mine Script® v1 Reference Manual":"Mine Script™ v1参考手册","This script is read-only. It cannot be edited.":"该脚本是只读的。它无法被编辑。","save script":"保存脚本","open script":"打开脚本","find/replace":"寻找/替换","toggle console":"切换控制台","open editor in new tab":"在新标签页中打开","open editor in new window":"在新窗口中打开",keyword:"关键词","built-in function":"内置函数","built-in variable":"内置变量","built-in method":"内置方法","built-in type":"内置类型",annotation:"注释","built-in constant":"内置常量",namespace:"命名空间","user-defined variable":"用户自定义变量","user-defined type":"用户自定义类型",field:"字段",enum:"枚举","user-defined method":"用户自定义方法","user-defined function":"用户自定义函数",parameter:"参数","**Namespaces** are immutable terms that act as prefixes for groups of identifiers. A dot and another term always follow a namespace when naming Tcc functions, variables, and methods.":"命名空间是不可变的术语,充当标识符组的前缀。在命名Mine函数、变量和方法时,点和另一个术语始终遵循命名空间。","to trigger parameters hint":"触发参数提示",library:"脚本库","enum member":"枚举成员",Returns:"返回值",Syntax:"语法",Remarks:"备注",Fields:"字段",Description:"描述",Example:"例子","Enum members":"枚举成员",statement:"声明",loop:"循环","`click` on keyword for more help":"“点击”关键词以获得更多帮助"};Me.use(bl).use(cy).init({debug:!1,fallbackLng:"zh",interpolation:{escapeValue:!1},resources:{en:{translation:yy},zh:{translation:_y}}}),self.MonacoEnvironment={getWorker(){return new Fm({name:"Editor Worker"})}},In.config({paths:{vs:"https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.45.0/min/vs"},"vs/nls":{availableLanguages:{"*":"zh-cn"}}});const fy=(a,s)=>{const{height:r,width:n,theme:o,options:l,hasDiff:c,readOnly:u,defaultValue:m,language:_,onChange:g,onLinkOpen:x,onCursorPositionChange:h,onActionTrigger:D,onEditorDidMount:S}=a,{t:R,i18n:U}=Ws(),K=N.useRef(null),H=N.useRef(null),re=N.useRef(!1),W=N.useRef(!1);N.useImperativeHandle(s,()=>({setOriginalScript(A){var L;(L=K.current)==null||L.setOriginalScript(A)},setScript(A){var L;(L=K.current)==null||L.setValue(A)},gotoLine(){var A;(A=K.current)==null||A.gotoLine()},getEditorLayout(){var A;return(A=K.current)==null?void 0:A.getEditorLayout()},setPosition(A,L){var Z;(Z=K.current)==null||Z.setPosition({column:A,lineNumber:L})},setModelMarkers(A){var L;W.current=!0,(L=K.current)==null||L.setModelMarkers(A),setTimeout(()=>{W.current=!1},2e3)},focus(){var A;(A=K.current)==null||A.focus()}})),N.useEffect(()=>{var A,L;c?(L=K.current)==null||L.addDiffDecorations():(A=K.current)==null||A.removeDiffDecorations()},[c]),N.useEffect(()=>{o&&Ne.editor.setTheme(o)},[o]),N.useEffect(()=>{_&&U.changeLanguage(_)},[_]),N.useEffect(()=>{var A;(A=K.current)==null||A.updateActionTrigger(D)},[D]),N.useEffect(()=>{var A;x&&((A=K.current)==null||A.addLinkOpenFunc(x))},[x]);function Q(A,L){var ee,ne;Pt.initBuiltinsTrees(),_a.setEditor(A),K.current=new km(A,L,D),x&&((ee=K.current)==null||ee.addLinkOpenFunc(x)),c&&((ne=K.current)==null||ne.addDiffDecorations()),Gu(A),requestAnimationFrame(q);const Z=A.getValue();K.current.onChangeCursorPosition(h),g&&g(Z),!u&&C(Z),S&&S()}const C=N.useCallback(async A=>{var Rt;re.current=!1;const{errors:L,functions:Z,methods:ee,types:ne,variables:Y,overloadsFuncs:le,imports:xe,enums:pe}=await ml(A),_e=new Map(Object.entries(Z)),Ee=new Map(Object.entries(ee)),te=new Map(Object.entries(ne)),de=new Map(Object.entries(Y)),Oe=new Map(Object.entries(xe)),Ge=new Map(Object.entries(pe));Ds.setUserDefined({functions:_e,methods:Ee,types:te,variables:de,imports:Oe,enums:Ge},le),Pt.setUserDefind(_e,te,de,Ee,Ge);const Qe=L.map(us=>({...us,severity:us.type||Ne.MarkerSeverity.Error}));u||!re.current&&!W.current&&Qe.length&&((Rt=K.current)==null||Rt.setModelMarkers(Qe))},[u]),z=N.useMemo(()=>Qu.debounce(C,1500),[C]);function V(A){var L;if(u){C(A||"");return}re.current=!0,_a.clearInlayHints(),(L=K.current)==null||L.setModelMarkers([]),A!==void 0&&(g&&g(A),z(A))}const q=N.useCallback(()=>{var L,Z;const A=(L=H.current)==null?void 0:L.getBoundingClientRect();(Z=K.current)==null||Z.setEditorLayout((A==null?void 0:A.height)||0,A==null?void 0:A.width)},[]);return N.useEffect(()=>{const A=()=>{window.requestAnimationFrame(q)},L=new ResizeObserver(A);return H.current&&L.observe(H.current),()=>{var Z;H.current&&L.unobserve(H.current),L.disconnect(),(Z=K.current)==null||Z.dispose()}},[]),T.jsx("div",{ref:H,children:T.jsx(mu,{height:r,width:n||"100%",defaultLanguage:Ke,defaultValue:m||`indicator("我的脚本")
|
144
|
+
*/const tl=Symbol("Comlink.proxy"),Dm=Symbol("Comlink.endpoint"),Im=Symbol("Comlink.releaseProxy"),Bn=Symbol("Comlink.finalizer"),ba=Symbol("Comlink.thrown"),sl=a=>typeof a=="object"&&a!==null||typeof a=="function",Am={canHandle:a=>sl(a)&&a[tl],serialize(a){const{port1:s,port2:r}=new MessageChannel;return al(a,s),[r,[r]]},deserialize(a){return a.start(),Un(a)}},qm={canHandle:a=>sl(a)&&ba in a,serialize({value:a}){let s;return a instanceof Error?s={isError:!0,value:{message:a.message,name:a.name,stack:a.stack}}:s={isError:!1,value:a},[s,[]]},deserialize(a){throw a.isError?Object.assign(new Error(a.value.message),a.value):a.value}},rl=new Map([["proxy",Am],["throw",qm]]);function Cm(a,s){for(const r of a)if(s===r||r==="*"||r instanceof RegExp&&r.test(s))return!0;return!1}function al(a,s=globalThis,r=["*"]){s.addEventListener("message",function n(o){if(!o||!o.data)return;if(!Cm(r,o.origin)){console.warn(`Invalid origin '${o.origin}' for comlink proxy`);return}const{id:l,type:c,path:u}=Object.assign({path:[]},o.data),m=(o.data.argumentList||[]).map(Is);let _;try{const g=u.slice(0,-1).reduce((h,D)=>h[D],a),x=u.reduce((h,D)=>h[D],a);switch(c){case"GET":_=x;break;case"SET":g[u.slice(-1)[0]]=Is(o.data.value),_=!0;break;case"APPLY":_=x.apply(g,m);break;case"CONSTRUCT":{const h=new x(...m);_=Kn(h)}break;case"ENDPOINT":{const{port1:h,port2:D}=new MessageChannel;al(a,D),_=Lm(h,[h])}break;case"RELEASE":_=void 0;break;default:return}}catch(g){_={value:g,[ba]:0}}Promise.resolve(_).catch(g=>({value:g,[ba]:0})).then(g=>{const[x,h]=va(g);s.postMessage(Object.assign(Object.assign({},x),{id:l}),h),c==="RELEASE"&&(s.removeEventListener("message",n),nl(s),Bn in a&&typeof a[Bn]=="function"&&a[Bn]())}).catch(g=>{const[x,h]=va({value:new TypeError("Unserializable return value"),[ba]:0});s.postMessage(Object.assign(Object.assign({},x),{id:l}),h)})}),s.start&&s.start()}function Sm(a){return a.constructor.name==="MessagePort"}function nl(a){Sm(a)&&a.close()}function Un(a,s){return $n(a,[],s)}function xa(a){if(a)throw new Error("Proxy has been released and is not useable")}function il(a){return Hs(a,{type:"RELEASE"}).then(()=>{nl(a)})}const ha=new WeakMap,wa="FinalizationRegistry"in globalThis&&new FinalizationRegistry(a=>{const s=(ha.get(a)||0)-1;ha.set(a,s),s===0&&il(a)});function zm(a,s){const r=(ha.get(s)||0)+1;ha.set(s,r),wa&&wa.register(a,s,a)}function Nm(a){wa&&wa.unregister(a)}function $n(a,s=[],r=function(){}){let n=!1;const o=new Proxy(r,{get(l,c){if(xa(n),c===Im)return()=>{Nm(o),il(a),n=!0};if(c==="then"){if(s.length===0)return{then:()=>o};const u=Hs(a,{type:"GET",path:s.map(m=>m.toString())}).then(Is);return u.then.bind(u)}return $n(a,[...s,c])},set(l,c,u){xa(n);const[m,_]=va(u);return Hs(a,{type:"SET",path:[...s,c].map(g=>g.toString()),value:m},_).then(Is)},apply(l,c,u){xa(n);const m=s[s.length-1];if(m===Dm)return Hs(a,{type:"ENDPOINT"}).then(Is);if(m==="bind")return $n(a,s.slice(0,-1));const[_,g]=ol(u);return Hs(a,{type:"APPLY",path:s.map(x=>x.toString()),argumentList:_},g).then(Is)},construct(l,c){xa(n);const[u,m]=ol(c);return Hs(a,{type:"CONSTRUCT",path:s.map(_=>_.toString()),argumentList:u},m).then(Is)}});return zm(o,a),o}function Em(a){return Array.prototype.concat.apply([],a)}function ol(a){const s=a.map(va);return[s.map(r=>r[0]),Em(s.map(r=>r[1]))]}const ll=new WeakMap;function Lm(a,s){return ll.set(a,s),a}function Kn(a){return Object.assign(a,{[tl]:!0})}function va(a){for(const[s,r]of rl)if(r.canHandle(a)){const[n,o]=r.serialize(a);return[{type:"HANDLER",name:s,value:n},o]}return[{type:"RAW",value:a},ll.get(a)||[]]}function Is(a){switch(a.type){case"HANDLER":return rl.get(a.name).deserialize(a.value);case"RAW":return a.value}}function Hs(a,s,r){return new Promise(n=>{const o=Mm();a.addEventListener("message",function l(c){!c.data||!c.data.id||c.data.id!==o||(a.removeEventListener("message",l),n(c.data))}),a.start&&a.start(),a.postMessage(Object.assign({id:o},s),r)})}function Mm(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}const cl=new Worker(new URL(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/scriptsRunWorker-Cic7ZtQ4.js").href:new URL("assets/scriptsRunWorker-Cic7ZtQ4.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||document.baseURI).href),typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:ra&&ra.src||new URL("trading-vue-editor.umd.cjs",document.baseURI).href),{type:"module",name:"Run TccScript Server"});cl.onerror=a=>{console.error(a)};async function pl(a){return await _a.setInlayHints(a)}const dl=Un(cl),ul=Un(new Worker(new URL(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/parserTccWorker-CIVOM4FO.js").href:new URL("assets/parserTccWorker-CIVOM4FO.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||document.baseURI).href),typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:ra&&ra.src||new URL("trading-vue-editor.umd.cjs",document.baseURI).href),{type:"module",name:"Parser TccScript Server"}));async function ml(a,s=!1){const{functions:r,types:n,constants:o,variables:l,methods:c}=nt;return await ul.parseTcc(a,s,Kn(pl),{functions:Object.fromEntries(r),methods:Object.fromEntries(c),types:Object.fromEntries(n),constants:Object.fromEntries(o),variables:Object.fromEntries(l)})}async function Om(a,s){const{functions:r,types:n,constants:o,variables:l,methods:c}=nt;return await ul.parseLibraryCode(a,s,Kn(pl),{functions:Object.fromEntries(r),methods:Object.fromEntries(c),types:Object.fromEntries(n),constants:Object.fromEntries(o),variables:Object.fromEntries(l)})}async function Pm(a,s,r=!0){return await dl.runScript(a,s,r)}async function Rm(a){return await dl.removeScript(a)}function Fm(a){return new Worker(""+(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__dirname+"/assets/editor.worker-CT5Cb1wO.js").href:new URL("assets/editor.worker-CT5Cb1wO.js",typeof document>"u"?location.href:document.currentScript&&document.currentScript.src||document.baseURI).href),{name:a==null?void 0:a.name})}const{slice:Bm,forEach:Um}=[];function $m(a){return Um.call(Bm.call(arguments,1),s=>{if(s)for(const r in s)a[r]===void 0&&(a[r]=s[r])}),a}const yl=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Km=(a,s,r)=>{const n=r||{};n.path=n.path||"/";const o=encodeURIComponent(s);let l=`${a}=${o}`;if(n.maxAge>0){const c=n.maxAge-0;if(Number.isNaN(c))throw new Error("maxAge should be a Number");l+=`; Max-Age=${Math.floor(c)}`}if(n.domain){if(!yl.test(n.domain))throw new TypeError("option domain is invalid");l+=`; Domain=${n.domain}`}if(n.path){if(!yl.test(n.path))throw new TypeError("option path is invalid");l+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");l+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(l+="; HttpOnly"),n.secure&&(l+="; Secure"),n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"strict":l+="; SameSite=Strict";break;case"none":l+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return l},_l={create(a,s,r,n){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+r*60*1e3)),n&&(o.domain=n),document.cookie=Km(a,encodeURIComponent(s),o)},read(a){const s=`${a}=`,r=document.cookie.split(";");for(let n=0;n<r.length;n++){let o=r[n];for(;o.charAt(0)===" ";)o=o.substring(1,o.length);if(o.indexOf(s)===0)return o.substring(s.length,o.length)}return null},remove(a){this.create(a,"",-1)}};var jm={name:"cookie",lookup(a){let{lookupCookie:s}=a;if(s&&typeof document<"u")return _l.read(s)||void 0},cacheUserLanguage(a,s){let{lookupCookie:r,cookieMinutes:n,cookieDomain:o,cookieOptions:l}=s;r&&typeof document<"u"&&_l.create(r,a,n,o,l)}},Hm={name:"querystring",lookup(a){var n;let{lookupQuerystring:s}=a,r;if(typeof window<"u"){let{search:o}=window.location;!window.location.search&&((n=window.location.hash)==null?void 0:n.indexOf("?"))>-1&&(o=window.location.hash.substring(window.location.hash.indexOf("?")));const c=o.substring(1).split("&");for(let u=0;u<c.length;u++){const m=c[u].indexOf("=");m>0&&c[u].substring(0,m)===s&&(r=c[u].substring(m+1))}}return r}};let Cr=null;const fl=()=>{if(Cr!==null)return Cr;try{Cr=window!=="undefined"&&window.localStorage!==null;const a="i18next.translate.boo";window.localStorage.setItem(a,"foo"),window.localStorage.removeItem(a)}catch{Cr=!1}return Cr};var Wm={name:"localStorage",lookup(a){let{lookupLocalStorage:s}=a;if(s&&fl())return window.localStorage.getItem(s)||void 0},cacheUserLanguage(a,s){let{lookupLocalStorage:r}=s;r&&fl()&&window.localStorage.setItem(r,a)}};let Sr=null;const gl=()=>{if(Sr!==null)return Sr;try{Sr=window!=="undefined"&&window.sessionStorage!==null;const a="i18next.translate.boo";window.sessionStorage.setItem(a,"foo"),window.sessionStorage.removeItem(a)}catch{Sr=!1}return Sr};var Vm={name:"sessionStorage",lookup(a){let{lookupSessionStorage:s}=a;if(s&&gl())return window.sessionStorage.getItem(s)||void 0},cacheUserLanguage(a,s){let{lookupSessionStorage:r}=s;r&&gl()&&window.sessionStorage.setItem(r,a)}},Gm={name:"navigator",lookup(a){const s=[];if(typeof navigator<"u"){const{languages:r,userLanguage:n,language:o}=navigator;if(r)for(let l=0;l<r.length;l++)s.push(r[l]);n&&s.push(n),o&&s.push(o)}return s.length>0?s:void 0}},Xm={name:"htmlTag",lookup(a){let{htmlTag:s}=a,r;const n=s||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(r=n.getAttribute("lang")),r}},Ym={name:"path",lookup(a){var o;let{lookupFromPathIndex:s}=a;if(typeof window>"u")return;const r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(r)?(o=r[typeof s=="number"?s:0])==null?void 0:o.replace("/",""):void 0}},Qm={name:"subdomain",lookup(a){var o,l;let{lookupFromSubdomainIndex:s}=a;const r=typeof s=="number"?s+1:1,n=typeof window<"u"&&((l=(o=window.location)==null?void 0:o.hostname)==null?void 0:l.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(n)return n[r]}};function Zm(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:a=>a}}class bl{constructor(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(s,r)}init(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=s||{languageUtils:{}},this.options=$m(r,this.options||{},Zm()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=o=>o.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(jm),this.addDetector(Hm),this.addDetector(Wm),this.addDetector(Vm),this.addDetector(Gm),this.addDetector(Xm),this.addDetector(Ym),this.addDetector(Qm)}addDetector(s){return this.detectors[s.name]=s,this}detect(s){s||(s=this.options.order);let r=[];return s.forEach(n=>{if(this.detectors[n]){let o=this.detectors[n].lookup(this.options);o&&typeof o=="string"&&(o=[o]),o&&(r=r.concat(o))}}),r=r.map(n=>this.options.convertDetectedLanguage(n)),this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}cacheUserLanguage(s,r){r||(r=this.options.caches),r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(s)>-1||r.forEach(n=>{this.detectors[n]&&this.detectors[n].cacheUserLanguage(s,this.options)}))}}bl.type="languageDetector";const Jm=(...a)=>{console!=null&&console.warn&&(As(a[0])&&(a[0]=`react-i18next:: ${a[0]}`),console.warn(...a))},xl={},jn=(...a)=>{As(a[0])&&xl[a[0]]||(As(a[0])&&(xl[a[0]]=new Date),Jm(...a))},hl=(a,s)=>()=>{if(a.isInitialized)s();else{const r=()=>{setTimeout(()=>{a.off("initialized",r)},0),s()};a.on("initialized",r)}},Hn=(a,s,r)=>{a.loadNamespaces(s,hl(a,r))},wl=(a,s,r,n)=>{if(As(r)&&(r=[r]),a.options.preload&&a.options.preload.indexOf(s)>-1)return Hn(a,r,n);r.forEach(o=>{a.options.ns.indexOf(o)<0&&a.options.ns.push(o)}),a.loadLanguages(s,hl(a,n))},ey=(a,s,r={})=>!s.languages||!s.languages.length?(jn("i18n.languages were undefined or empty",s.languages),!0):s.hasLoadedNamespace(a,{lng:r.lng,precheck:(n,o)=>{var l;if(((l=r.bindI18n)==null?void 0:l.indexOf("languageChanging"))>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!o(n.isLanguageChangingTo,a))return!1}}),As=a=>typeof a=="string",ty=a=>typeof a=="object"&&a!==null,sy=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,ry={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},ay=a=>ry[a];let Wn={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:a=>a.replace(sy,ay)};const ny=(a={})=>{Wn={...Wn,...a}},iy=()=>Wn;let vl;const oy=a=>{vl=a},ly=()=>vl,cy={type:"3rdParty",init(a){ny(a.options.react),oy(a)}},py=N.createContext();class dy{constructor(){this.usedNamespaces={}}addUsedNamespaces(s){s.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const uy=(a,s)=>{const r=N.useRef();return N.useEffect(()=>{r.current=s?r.current:a},[a,s]),r.current},Tl=(a,s,r,n)=>a.getFixedT(s,r,n),my=(a,s,r,n)=>N.useCallback(Tl(a,s,r,n),[a,s,r,n]),Ws=(a,s={})=>{var W,Q,C,z;const{i18n:r}=s,{i18n:n,defaultNS:o}=N.useContext(py)||{},l=r||n||ly();if(l&&!l.reportNamespaces&&(l.reportNamespaces=new dy),!l){jn("You will need to pass in an i18next instance by using initReactI18next");const V=(A,L)=>As(L)?L:ty(L)&&As(L.defaultValue)?L.defaultValue:Array.isArray(A)?A[A.length-1]:A,q=[V,{},!1];return q.t=V,q.i18n={},q.ready=!1,q}(W=l.options.react)!=null&&W.wait&&jn("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const c={...iy(),...l.options.react,...s},{useSuspense:u,keyPrefix:m}=c;let _=a||o||((Q=l.options)==null?void 0:Q.defaultNS);_=As(_)?[_]:_||["translation"],(z=(C=l.reportNamespaces).addUsedNamespaces)==null||z.call(C,_);const g=(l.isInitialized||l.initializedStoreOnce)&&_.every(V=>ey(V,l,c)),x=my(l,s.lng||null,c.nsMode==="fallback"?_:_[0],m),h=()=>x,D=()=>Tl(l,s.lng||null,c.nsMode==="fallback"?_:_[0],m),[S,R]=N.useState(h);let U=_.join();s.lng&&(U=`${s.lng}${U}`);const K=uy(U),H=N.useRef(!0);N.useEffect(()=>{const{bindI18n:V,bindI18nStore:q}=c;H.current=!0,!g&&!u&&(s.lng?wl(l,s.lng,_,()=>{H.current&&R(D)}):Hn(l,_,()=>{H.current&&R(D)})),g&&K&&K!==U&&H.current&&R(D);const A=()=>{H.current&&R(D)};return V&&(l==null||l.on(V,A)),q&&(l==null||l.store.on(q,A)),()=>{H.current=!1,l&&(V==null||V.split(" ").forEach(L=>l.off(L,A))),q&&l&&q.split(" ").forEach(L=>l.store.off(L,A))}},[l,U]),N.useEffect(()=>{H.current&&g&&R(h)},[l,m,g]);const re=[S,l,g];if(re.t=S,re.i18n=l,re.ready=g,g||!g&&!u)return re;throw new Promise(V=>{s.lng?wl(l,s.lng,_,()=>V()):Hn(l,_,()=>V())})},yy={type:"type",syntax:"syntax",overloads:"overloads",arguments:"arguments",fields:"fields",example:"example",returns:"returns",remarks:"remarks","see also":"see also","Copy code":"Copy code","Copy link":"Copy link",Copied:"Copied","Link copied":"Link copied",variables:"Variables",constants:"Constants",functions:"Functions",keywords:"Keywords",types:"Types",operators:"Operators",annotations:"Annotations",search:"Search","Mine Script® v1 Reference Manual":"Mine Script® v1 Reference Manual","This script is read-only. It cannot be edited.":"This script is read-only. It cannot be edited.","save script":"Save script","open script":"Open script","find/replace":"Find/Replace","toggle console":"Toggle console","open editor in new tab":"Open editor in new tab","open editor in new window":"Open editor in new window",keyword:"keyword","built-in function":"built-in function","built-in variable":"built-in variable","built-in method":"built-in method","built-in type":"built-in type",annotation:"annotation","built-in constant":"built-in constant",namespace:"namespace","user-defined variable":"user-defined variable","user-defined type":"user-defined type",field:"field",enum:"enum","user-defined method":"user-defined method","user-defined function":"user-defined function",parameter:"parameter","**Namespaces** are immutable terms that act as prefixes for groups of identifiers. A dot and another term always follow a namespace when naming Tcc functions, variables, and methods.":"**Namespaces** are immutable terms that act as prefixes for groups of identifiers. A dot and another term always follow a namespace when naming Mine functions, variables, and methods.","to trigger parameters hint":"to trigger parameters hint",library:"library","enum member":"enum member",Returns:"Returns",Syntax:"Syntax",Remarks:"Remarks",Fields:"Fields",Description:"Description",Example:"Example","Enum members":"Enum members",statement:"statement",loop:"loop","`click` on keyword for more help":"`click` on keyword for more help"},_y={type:"类型",syntax:"语法",overloads:"重载",arguments:"参数",fields:"字段",example:"例子",returns:"返回值",remarks:"备注","see also":"另见","Copy code":"复制代码","Copy link":"复制链接",Copied:"已复制","Link copied":"链接已复制",variables:"内置变量",constants:"常量",functions:"函数",keywords:"关键词",types:"类型",operators:"运算符",annotations:"注释",search:"搜索","Mine Script® v1 Reference Manual":"Mine Script™ v1参考手册","This script is read-only. It cannot be edited.":"该脚本是只读的。它无法被编辑。","save script":"保存脚本","open script":"打开脚本","find/replace":"寻找/替换","toggle console":"切换控制台","open editor in new tab":"在新标签页中打开","open editor in new window":"在新窗口中打开",keyword:"关键词","built-in function":"内置函数","built-in variable":"内置变量","built-in method":"内置方法","built-in type":"内置类型",annotation:"注释","built-in constant":"内置常量",namespace:"命名空间","user-defined variable":"用户自定义变量","user-defined type":"用户自定义类型",field:"字段",enum:"枚举","user-defined method":"用户自定义方法","user-defined function":"用户自定义函数",parameter:"参数","**Namespaces** are immutable terms that act as prefixes for groups of identifiers. A dot and another term always follow a namespace when naming Tcc functions, variables, and methods.":"命名空间是不可变的术语,充当标识符组的前缀。在命名Mine函数、变量和方法时,点和另一个术语始终遵循命名空间。","to trigger parameters hint":"触发参数提示",library:"脚本库","enum member":"枚举成员",Returns:"返回值",Syntax:"语法",Remarks:"备注",Fields:"字段",Description:"描述",Example:"例子","Enum members":"枚举成员",statement:"声明",loop:"循环","`click` on keyword for more help":"“点击”关键词以获得更多帮助"};Me.use(bl).use(cy).init({debug:!1,fallbackLng:"zh",interpolation:{escapeValue:!1},resources:{en:{translation:yy},zh:{translation:_y}}}),self.MonacoEnvironment={getWorker(){return new Fm({name:"Editor Worker"})}},In.config({paths:{vs:"https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.45.0/min/vs"},"vs/nls":{availableLanguages:{"*":"zh-cn"}}});const fy=(a,s)=>{const{height:r,width:n,theme:o,options:l,hasDiff:c,readOnly:u,defaultValue:m,language:_,onChange:g,onLinkOpen:x,onCursorPositionChange:h,onActionTrigger:D,onEditorDidMount:S}=a,{t:R,i18n:U}=Ws(),K=N.useRef(null),H=N.useRef(null),re=N.useRef(!1),W=N.useRef(!1);N.useImperativeHandle(s,()=>({setOriginalScript(A){var L;(L=K.current)==null||L.setOriginalScript(A)},setScript(A){var L;(L=K.current)==null||L.setValue(A)},gotoLine(){var A;(A=K.current)==null||A.gotoLine()},getEditorLayout(){var A;return(A=K.current)==null?void 0:A.getEditorLayout()},setPosition(A,L){var Z;(Z=K.current)==null||Z.setPosition({column:A,lineNumber:L})},setModelMarkers(A){var L;W.current=!0,(L=K.current)==null||L.setModelMarkers(A),setTimeout(()=>{W.current=!1},2e3)},focus(){var A;(A=K.current)==null||A.focus()}})),N.useEffect(()=>{var A,L;c?(L=K.current)==null||L.addDiffDecorations():(A=K.current)==null||A.removeDiffDecorations()},[c]),N.useEffect(()=>{o&&Ne.editor.setTheme(o)},[o]),N.useEffect(()=>{_&&U.changeLanguage(_)},[_]),N.useEffect(()=>{var A;(A=K.current)==null||A.updateActionTrigger(D)},[D]),N.useEffect(()=>{var A;x&&((A=K.current)==null||A.addLinkOpenFunc(x))},[x]);function Q(A,L){var ee,ne;Pt.initBuiltinsTrees(),_a.setEditor(A),K.current=new km(A,L,D),x&&((ee=K.current)==null||ee.addLinkOpenFunc(x)),c&&((ne=K.current)==null||ne.addDiffDecorations()),Gu(A),requestAnimationFrame(q);const Z=A.getValue();K.current.onChangeCursorPosition(h),g&&g(Z),!u&&C(Z),S&&S()}const C=N.useCallback(async A=>{var Rt;re.current=!1;const{errors:L,functions:Z,methods:ee,types:ne,variables:Y,overloadsFuncs:le,imports:xe,enums:pe}=await ml(A),_e=new Map(Object.entries(Z)),Ee=new Map(Object.entries(ee)),te=new Map(Object.entries(ne)),de=new Map(Object.entries(Y)),Oe=new Map(Object.entries(xe)),Ge=new Map(Object.entries(pe));Ds.setUserDefined({functions:_e,methods:Ee,types:te,variables:de,imports:Oe,enums:Ge},le),Pt.setUserDefind(_e,te,de,Ee,Ge);const Qe=L.map(us=>({...us,severity:us.type||Ne.MarkerSeverity.Error}));u||!re.current&&!W.current&&Qe.length&&((Rt=K.current)==null||Rt.setModelMarkers(Qe))},[u]),z=N.useMemo(()=>Qu.debounce(C,1500),[C]);function V(A){var L;if(u){C(A||"");return}re.current=!0,_a.clearInlayHints(),(L=K.current)==null||L.setModelMarkers([]),A!==void 0&&(g&&g(A),z(A))}const q=N.useCallback(()=>{var L,Z;const A=(L=H.current)==null?void 0:L.getBoundingClientRect();(Z=K.current)==null||Z.setEditorLayout((A==null?void 0:A.height)||0,A==null?void 0:A.width)},[]);return N.useEffect(()=>{const A=()=>{window.requestAnimationFrame(q)},L=new ResizeObserver(A);return H.current&&L.observe(H.current),()=>{var Z;H.current&&L.unobserve(H.current),L.disconnect(),(Z=K.current)==null||Z.dispose()}},[]),T.jsx("div",{ref:H,children:T.jsx(mu,{height:r,width:n||"100%",defaultLanguage:Ke,defaultValue:m||`indicator("我的脚本")
|
145
145
|
plot(close)
|
146
146
|
`,theme:o||"vs-dark",className:`tvue-script ${o||"vs-dark"}`,options:{colorDecorators:!0,useShadowDOM:!1,matchOnWordStartOnly:!0,automaticLayout:!1,unicodeHighlight:{allowedCharacters:{" ":!0}},suggest:{filterGraceful:!0},fontSize:13,...u?am:{},readOnlyMessage:{value:R("This script is read-only. It cannot be edited.")},...l},onMount:Q,onChange:V})})},gy=N.forwardRef(fy),by=a=>{const{theme:s,modified:r,original:n,height:o,width:l,renderSideBySide:c=!0}=a,u=N.useCallback((m,_)=>{_.languages.register({id:Ke}),_.editor.defineTheme("vs-dark",Mn),_.editor.defineTheme("vs",Ln),_.languages.setMonarchTokensProvider(Ke,js),_.languages.setLanguageConfiguration(Ke,En)},[]);return T.jsx(lu,{height:o||"90vh",width:l||"100%",theme:s||"vs-dark",options:{readOnly:!0,renderSideBySide:c,scrollBeyondLastLine:!1},language:Ke,modified:r,original:n,onMount:u})};M.VMarkerSeverity=void 0,function(a){a[a.Hint=1]="Hint",a[a.Info=2]="Info",a[a.Warning=4]="Warning",a[a.Error=8]="Error"}(M.VMarkerSeverity||(M.VMarkerSeverity={}));var Ta={},xy=function(){var a=document.getSelection();if(!a.rangeCount)return function(){};for(var s=document.activeElement,r=[],n=0;n<a.rangeCount;n++)r.push(a.getRangeAt(n));switch(s.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":s.blur();break;default:s=null;break}return a.removeAllRanges(),function(){a.type==="Caret"&&a.removeAllRanges(),a.rangeCount||r.forEach(function(o){a.addRange(o)}),s&&s.focus()}},hy=xy,kl={"text/plain":"Text","text/html":"Url",default:"Text"},wy="Copy to clipboard: #{key}, Enter";function vy(a){var s=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return a.replace(/#{\s*key\s*}/g,s)}function Ty(a,s){var r,n,o,l,c,u,m=!1;s||(s={}),r=s.debug||!1;try{o=hy(),l=document.createRange(),c=document.getSelection(),u=document.createElement("span"),u.textContent=a,u.ariaHidden="true",u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",function(g){if(g.stopPropagation(),s.format)if(g.preventDefault(),typeof g.clipboardData>"u"){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var x=kl[s.format]||kl.default;window.clipboardData.setData(x,a)}else g.clipboardData.clearData(),g.clipboardData.setData(s.format,a);s.onCopy&&(g.preventDefault(),s.onCopy(g.clipboardData))}),document.body.appendChild(u),l.selectNodeContents(u),c.addRange(l);var _=document.execCommand("copy");if(!_)throw new Error("copy command was unsuccessful");m=!0}catch(g){r&&console.error("unable to copy using execCommand: ",g),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(s.format||"text",a),s.onCopy&&s.onCopy(window.clipboardData),m=!0}catch(x){r&&console.error("unable to copy using clipboardData: ",x),r&&console.error("falling back to prompt"),n=vy("message"in s?s.message:wy),window.prompt(n,a)}}finally{c&&(typeof c.removeRange=="function"?c.removeRange(l):c.removeAllRanges()),u&&document.body.removeChild(u),o()}return m}var ky=Ty;function Vn(a){"@babel/helpers - typeof";return Vn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},Vn(a)}Object.defineProperty(Ta,"__esModule",{value:!0}),Ta.CopyToClipboard=void 0;var ka=Dl(N),Dy=Dl(ky),Iy=["text","onCopy","options","children"];function Dl(a){return a&&a.__esModule?a:{default:a}}function Il(a,s){var r=Object.keys(a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(a);s&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(a,o).enumerable})),r.push.apply(r,n)}return r}function Al(a){for(var s=1;s<arguments.length;s++){var r=arguments[s]!=null?arguments[s]:{};s%2?Il(Object(r),!0).forEach(function(n){Xn(a,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(r)):Il(Object(r)).forEach(function(n){Object.defineProperty(a,n,Object.getOwnPropertyDescriptor(r,n))})}return a}function Ay(a,s){if(a==null)return{};var r=qy(a,s),n,o;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(a);for(o=0;o<l.length;o++)n=l[o],!(s.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(a,n)&&(r[n]=a[n])}return r}function qy(a,s){if(a==null)return{};var r={},n=Object.keys(a),o,l;for(l=0;l<n.length;l++)o=n[l],!(s.indexOf(o)>=0)&&(r[o]=a[o]);return r}function Cy(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function")}function ql(a,s){for(var r=0;r<s.length;r++){var n=s[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(a,n.key,n)}}function Sy(a,s,r){return s&&ql(a.prototype,s),r&&ql(a,r),Object.defineProperty(a,"prototype",{writable:!1}),a}function zy(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(s&&s.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),s&&Gn(a,s)}function Gn(a,s){return Gn=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Gn(a,s)}function Ny(a){var s=Ly();return function(){var n=Da(a),o;if(s){var l=Da(this).constructor;o=Reflect.construct(n,arguments,l)}else o=n.apply(this,arguments);return Ey(this,o)}}function Ey(a,s){if(s&&(Vn(s)==="object"||typeof s=="function"))return s;if(s!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Cl(a)}function Cl(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function Ly(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Da(a){return Da=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Da(a)}function Xn(a,s,r){return s in a?Object.defineProperty(a,s,{value:r,enumerable:!0,configurable:!0,writable:!0}):a[s]=r,a}var Sl=function(a){zy(r,a);var s=Ny(r);function r(){var n;Cy(this,r);for(var o=arguments.length,l=new Array(o),c=0;c<o;c++)l[c]=arguments[c];return n=s.call.apply(s,[this].concat(l)),Xn(Cl(n),"onClick",function(u){var m=n.props,_=m.text,g=m.onCopy,x=m.children,h=m.options,D=ka.default.Children.only(x),S=(0,Dy.default)(_,h);g&&g(_,S),D&&D.props&&typeof D.props.onClick=="function"&&D.props.onClick(u)}),n}return Sy(r,[{key:"render",value:function(){var o=this.props;o.text,o.onCopy,o.options;var l=o.children,c=Ay(o,Iy),u=ka.default.Children.only(l);return ka.default.cloneElement(u,Al(Al({},c),{},{onClick:this.onClick}))}}]),r}(ka.default.PureComponent);Ta.CopyToClipboard=Sl,Xn(Sl,"defaultProps",{onCopy:void 0,options:void 0});var My=Ta,Yn=My.CopyToClipboard;Yn.CopyToClipboard=Yn;var Oy=Yn;const Vs=nd(Oy);Ne.languages.register({id:Ke}),Ne.editor.defineTheme("vs-dark",Mn),Ne.editor.defineTheme("vs",Ln),Ne.languages.setMonarchTokensProvider(Ke,js),Ne.languages.setLanguageConfiguration(Ke,En);async function zl(a,s){return s&&Ne.editor.setTheme(s.includes("dark")?"vs-dark":"light"),await Ne.editor.colorize(a,Ke,{tabSize:4})}async function Qn(a,s=0){const r=a[s];if(!r)return;const{name:n,args:o,type:l,desc:c,examples:u,remarks:m,seeAlso:_,syntax:g,detailedDesc:x,fields:h,returns:D}=r,S={name:n,orirginalName:n};if(a.length>1&&(S.overloads=`${a.length} ${Me.t("overloads")}`),l&&(S.type=l),o&&(S.name=`${n}()`,S.args=o.map(R=>{const{name:U,desc:K,displayType:H}=R;return{label:`${U} (${H})`,desc:K&&qs(K)}})),c&&(S.desc=c.map(R=>qs(R))),u&&(S.originalExample=u.join(`
|
147
147
|
`),S.examples=await Ne.editor.colorize(S.originalExample,Ke,{tabSize:4})),x){S.detailedDesc=[];for(const R of x){const{desc:U,examples:K}=R;let H=U.map(Q=>qs(Q)),re,W;K&&(W=K.join(`
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@guihz/trading-vue-editor-tes",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.249",
|
4
4
|
"type": "module",
|
5
5
|
"files": [
|
6
6
|
"lib"
|
@@ -24,7 +24,6 @@
|
|
24
24
|
"axios": "^1.6.5",
|
25
25
|
"big.js": "^6.2.2",
|
26
26
|
"comlink": "^4.4.1",
|
27
|
-
"dayjs": "^1.11.10",
|
28
27
|
"diff": "^5.2.0",
|
29
28
|
"i18next": "^23.16.5",
|
30
29
|
"i18next-browser-languagedetector": "^8.0.0",
|
@@ -32,6 +31,7 @@
|
|
32
31
|
"lodash": "^4.17.21",
|
33
32
|
"mathjs": "^12.4.1",
|
34
33
|
"ml-matrix": "^6.11.0",
|
34
|
+
"moment-timezone": "^0.5.46",
|
35
35
|
"react-copy-to-clipboard": "^5.1.0",
|
36
36
|
"react-i18next": "^15.1.1",
|
37
37
|
"terser": "^5.31.0"
|