bc-minecraft-bedrock-command 1.0.17
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/LICENSE +29 -0
- package/README.md +13 -0
- package/lib/src/Lib/Data/CommandContainer.d.ts +6 -0
- package/lib/src/Lib/Data/CommandContainer.js +3 -0
- package/lib/src/Lib/Data/CommandContainer.js.map +1 -0
- package/lib/src/Lib/Data/CommandInfo.d.ts +36 -0
- package/lib/src/Lib/Data/CommandInfo.js +3 -0
- package/lib/src/Lib/Data/CommandInfo.js.map +1 -0
- package/lib/src/Lib/Data/Edu.d.ts +2 -0
- package/lib/src/Lib/Data/Edu.js +110 -0
- package/lib/src/Lib/Data/Edu.js.map +1 -0
- package/lib/src/Lib/Data/Vanilla.d.ts +2 -0
- package/lib/src/Lib/Data/Vanilla.js +2249 -0
- package/lib/src/Lib/Data/Vanilla.js.map +1 -0
- package/lib/src/Lib/Data/include.d.ts +3 -0
- package/lib/src/Lib/Data/include.js +16 -0
- package/lib/src/Lib/Data/include.js.map +1 -0
- package/lib/src/Lib/Types/Command/Command.d.ts +45 -0
- package/lib/src/Lib/Types/Command/Command.js +102 -0
- package/lib/src/Lib/Types/Command/Command.js.map +1 -0
- package/lib/src/Lib/Types/Command/Functions.d.ts +28 -0
- package/lib/src/Lib/Types/Command/Functions.js +213 -0
- package/lib/src/Lib/Types/Command/Functions.js.map +1 -0
- package/lib/src/Lib/Types/Command/Parameter.d.ts +18 -0
- package/lib/src/Lib/Types/Command/Parameter.js +27 -0
- package/lib/src/Lib/Types/Command/Parameter.js.map +1 -0
- package/lib/src/Lib/Types/Command/Parse.d.ts +19 -0
- package/lib/src/Lib/Types/Command/Parse.js +89 -0
- package/lib/src/Lib/Types/Command/Parse.js.map +1 -0
- package/lib/src/Lib/Types/ParameterType.d.ts +47 -0
- package/lib/src/Lib/Types/ParameterType.js +98 -0
- package/lib/src/Lib/Types/ParameterType.js.map +1 -0
- package/lib/src/Lib/Types/include.d.ts +4 -0
- package/lib/src/Lib/Types/include.js +17 -0
- package/lib/src/Lib/Types/include.js.map +1 -0
- package/lib/src/main.d.ts +2 -0
- package/lib/src/main.js +16 -0
- package/lib/src/main.js.map +1 -0
- package/package.json +57 -0
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IsCommand = exports.hasCommandData = exports.getCommandData = exports.isMatch = exports.getBestMatches = void 0;
|
|
4
|
+
const bc_minecraft_bedrock_types_1 = require("bc-minecraft-bedrock-types");
|
|
5
|
+
const Edu_1 = require("../../Data/Edu");
|
|
6
|
+
const Vanilla_1 = require("../../Data/Vanilla");
|
|
7
|
+
const include_1 = require("../include");
|
|
8
|
+
/**Gets the best matching commandinfo data, if multiple are returned, it unclear or somewhere not fully specified
|
|
9
|
+
* @param command The command to search through
|
|
10
|
+
* @param edu Wheter or not to include education data
|
|
11
|
+
* @returns An array with commands info*/
|
|
12
|
+
function getBestMatches(command, edu = false) {
|
|
13
|
+
const m = command.getCommandData(edu);
|
|
14
|
+
return m.filter((x) => isMatch(command, x, edu));
|
|
15
|
+
}
|
|
16
|
+
exports.getBestMatches = getBestMatches;
|
|
17
|
+
/**Checks if the command matches the commandinfo
|
|
18
|
+
* @param command The command to examine
|
|
19
|
+
* @param data The commandinfo serving as the basis
|
|
20
|
+
* @param edu If education content should be used or not
|
|
21
|
+
* @returns true or false is this commandinfo matches the command*/
|
|
22
|
+
function isMatch(command, data, edu = false) {
|
|
23
|
+
var _a, _b, _c, _d;
|
|
24
|
+
let Limit = data.parameters.length;
|
|
25
|
+
if (Limit > command.parameters.length) {
|
|
26
|
+
Limit = command.parameters.length;
|
|
27
|
+
}
|
|
28
|
+
for (let I = 0; I < Limit; I++) {
|
|
29
|
+
const commandPar = command.parameters[I];
|
|
30
|
+
const commandText = commandPar.text;
|
|
31
|
+
const patPar = data.parameters[I];
|
|
32
|
+
if ((_b = (_a = patPar.options) === null || _a === void 0 ? void 0 : _a.acceptedValues) === null || _b === void 0 ? void 0 : _b.includes(commandText)) {
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
switch (patPar.type) {
|
|
36
|
+
case include_1.ParameterType.block:
|
|
37
|
+
case include_1.ParameterType.entity:
|
|
38
|
+
case include_1.ParameterType.event:
|
|
39
|
+
case include_1.ParameterType.function:
|
|
40
|
+
case include_1.ParameterType.item:
|
|
41
|
+
case include_1.ParameterType.objective:
|
|
42
|
+
case include_1.ParameterType.particle:
|
|
43
|
+
case include_1.ParameterType.sound:
|
|
44
|
+
case include_1.ParameterType.string:
|
|
45
|
+
case include_1.ParameterType.tag:
|
|
46
|
+
case include_1.ParameterType.unknown:
|
|
47
|
+
case include_1.ParameterType.tickingarea:
|
|
48
|
+
//TODO program matches types for these
|
|
49
|
+
continue;
|
|
50
|
+
case include_1.ParameterType.boolean:
|
|
51
|
+
if (!bc_minecraft_bedrock_types_1.General.Boolean.is(commandText))
|
|
52
|
+
return false;
|
|
53
|
+
break;
|
|
54
|
+
case include_1.ParameterType.blockStates:
|
|
55
|
+
if (!bc_minecraft_bedrock_types_1.General.Json.isArray(commandText))
|
|
56
|
+
return false;
|
|
57
|
+
break;
|
|
58
|
+
case include_1.ParameterType.cameraShakeType:
|
|
59
|
+
if (!bc_minecraft_bedrock_types_1.Modes.CameraShake.isValue(commandText))
|
|
60
|
+
return false;
|
|
61
|
+
break;
|
|
62
|
+
case include_1.ParameterType.command:
|
|
63
|
+
if (!IsCommand(commandText, edu))
|
|
64
|
+
return false;
|
|
65
|
+
break;
|
|
66
|
+
case include_1.ParameterType.coordinate:
|
|
67
|
+
if (!bc_minecraft_bedrock_types_1.Minecraft.Coordinate.is(commandText))
|
|
68
|
+
return false;
|
|
69
|
+
break;
|
|
70
|
+
case include_1.ParameterType.cloneMode:
|
|
71
|
+
if (!bc_minecraft_bedrock_types_1.Modes.Clone.isValue(commandText))
|
|
72
|
+
return false;
|
|
73
|
+
break;
|
|
74
|
+
case include_1.ParameterType.difficulty:
|
|
75
|
+
if (!bc_minecraft_bedrock_types_1.Modes.Difficulty.isValue(commandText))
|
|
76
|
+
return false;
|
|
77
|
+
break;
|
|
78
|
+
case include_1.ParameterType.effect:
|
|
79
|
+
if (commandText === "clear")
|
|
80
|
+
return false;
|
|
81
|
+
break;
|
|
82
|
+
case include_1.ParameterType.fillMode:
|
|
83
|
+
if (!bc_minecraft_bedrock_types_1.Modes.Fill.isValue(commandText))
|
|
84
|
+
return false;
|
|
85
|
+
break;
|
|
86
|
+
case include_1.ParameterType.float:
|
|
87
|
+
if (!bc_minecraft_bedrock_types_1.General.Float.is(commandText))
|
|
88
|
+
return false;
|
|
89
|
+
break;
|
|
90
|
+
case include_1.ParameterType.gamemode:
|
|
91
|
+
if (!bc_minecraft_bedrock_types_1.Modes.Gamemode.isValue(commandText))
|
|
92
|
+
return false;
|
|
93
|
+
break;
|
|
94
|
+
case include_1.ParameterType.locateFeature:
|
|
95
|
+
if (!bc_minecraft_bedrock_types_1.Modes.LocateFeature.isValue(commandText))
|
|
96
|
+
return false;
|
|
97
|
+
break;
|
|
98
|
+
case include_1.ParameterType.integer:
|
|
99
|
+
case include_1.ParameterType.slotID:
|
|
100
|
+
if (!bc_minecraft_bedrock_types_1.General.Integer.is(commandText))
|
|
101
|
+
return false;
|
|
102
|
+
break;
|
|
103
|
+
case include_1.ParameterType.jsonItem:
|
|
104
|
+
case include_1.ParameterType.jsonRawText:
|
|
105
|
+
if (!bc_minecraft_bedrock_types_1.General.Json.isObject(commandText))
|
|
106
|
+
return false;
|
|
107
|
+
break;
|
|
108
|
+
case include_1.ParameterType.keyword:
|
|
109
|
+
if (commandText != patPar.text)
|
|
110
|
+
return false;
|
|
111
|
+
break;
|
|
112
|
+
case include_1.ParameterType.maskMode:
|
|
113
|
+
if (!bc_minecraft_bedrock_types_1.Modes.Mask.isValue(commandText))
|
|
114
|
+
return false;
|
|
115
|
+
break;
|
|
116
|
+
case include_1.ParameterType.mirror:
|
|
117
|
+
if (!bc_minecraft_bedrock_types_1.Modes.Mirror.isValue(commandText))
|
|
118
|
+
return false;
|
|
119
|
+
break;
|
|
120
|
+
case include_1.ParameterType.musicRepeatMode:
|
|
121
|
+
if (!bc_minecraft_bedrock_types_1.Modes.MusicRepeat.isValue(commandText))
|
|
122
|
+
return false;
|
|
123
|
+
break;
|
|
124
|
+
case include_1.ParameterType.oldBlockMode:
|
|
125
|
+
if (!bc_minecraft_bedrock_types_1.Modes.OldBlock.isValue(commandText))
|
|
126
|
+
return false;
|
|
127
|
+
break;
|
|
128
|
+
case include_1.ParameterType.operation:
|
|
129
|
+
if (!bc_minecraft_bedrock_types_1.Modes.Operation.isValue(commandText))
|
|
130
|
+
return false;
|
|
131
|
+
break;
|
|
132
|
+
case include_1.ParameterType.replaceMode:
|
|
133
|
+
if (!bc_minecraft_bedrock_types_1.Modes.Replace.isValue(commandText))
|
|
134
|
+
return false;
|
|
135
|
+
break;
|
|
136
|
+
case include_1.ParameterType.rideRules:
|
|
137
|
+
if (!bc_minecraft_bedrock_types_1.Modes.RideRules.isValue(commandText))
|
|
138
|
+
return false;
|
|
139
|
+
break;
|
|
140
|
+
case include_1.ParameterType.rotation:
|
|
141
|
+
if (!bc_minecraft_bedrock_types_1.Modes.Rotation.isValue(commandText))
|
|
142
|
+
return false;
|
|
143
|
+
break;
|
|
144
|
+
case include_1.ParameterType.saveMode:
|
|
145
|
+
if (!bc_minecraft_bedrock_types_1.Modes.Save.isValue(commandText))
|
|
146
|
+
return false;
|
|
147
|
+
break;
|
|
148
|
+
case include_1.ParameterType.selector:
|
|
149
|
+
if (!bc_minecraft_bedrock_types_1.Minecraft.Selector.isSelector(commandText, (_c = patPar.options) === null || _c === void 0 ? void 0 : _c.wildcard, (_d = patPar.options) === null || _d === void 0 ? void 0 : _d.allowFakePlayers))
|
|
150
|
+
return false;
|
|
151
|
+
break;
|
|
152
|
+
case include_1.ParameterType.slotType:
|
|
153
|
+
if (!bc_minecraft_bedrock_types_1.Modes.SlotType.isValue(commandText))
|
|
154
|
+
return false;
|
|
155
|
+
break;
|
|
156
|
+
case include_1.ParameterType.structureAnimationMode:
|
|
157
|
+
if (!bc_minecraft_bedrock_types_1.Modes.StructureAnimation.isValue(commandText))
|
|
158
|
+
return false;
|
|
159
|
+
break;
|
|
160
|
+
case include_1.ParameterType.teleportRules:
|
|
161
|
+
if (!bc_minecraft_bedrock_types_1.Modes.TeleportRules.isValue(commandText))
|
|
162
|
+
return false;
|
|
163
|
+
break;
|
|
164
|
+
case include_1.ParameterType.xp:
|
|
165
|
+
if (!bc_minecraft_bedrock_types_1.Minecraft.XP.is(commandText))
|
|
166
|
+
return false;
|
|
167
|
+
break;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
return true;
|
|
171
|
+
}
|
|
172
|
+
exports.isMatch = isMatch;
|
|
173
|
+
/**Retrieves the command data related to the given keyword
|
|
174
|
+
* @param name The command to retrieve
|
|
175
|
+
* @param edu Wheter or not to include education commands
|
|
176
|
+
* @returns An array with commands info*/
|
|
177
|
+
function getCommandData(name, edu = false) {
|
|
178
|
+
const out = [];
|
|
179
|
+
Add(out, Vanilla_1.Vanilla[name]);
|
|
180
|
+
if (edu)
|
|
181
|
+
Add(out, Edu_1.Edu[name]);
|
|
182
|
+
return out;
|
|
183
|
+
}
|
|
184
|
+
exports.getCommandData = getCommandData;
|
|
185
|
+
/**Checks if the given commanddata is present
|
|
186
|
+
* @param name The command to retrieve
|
|
187
|
+
* @param edu Wheter or not to include education commands
|
|
188
|
+
* @returns An array with commands info*/
|
|
189
|
+
function hasCommandData(name, edu = false) {
|
|
190
|
+
if (Vanilla_1.Vanilla[name])
|
|
191
|
+
return true;
|
|
192
|
+
if (edu && Edu_1.Edu[name])
|
|
193
|
+
return true;
|
|
194
|
+
return false;
|
|
195
|
+
}
|
|
196
|
+
exports.hasCommandData = hasCommandData;
|
|
197
|
+
/**Checks if the given commanddata is present
|
|
198
|
+
* @param command The command to retrieve
|
|
199
|
+
* @param edu Wheter or not to include education commands
|
|
200
|
+
* @returns True or false*/
|
|
201
|
+
function IsCommand(command, edu = false) {
|
|
202
|
+
if (Vanilla_1.Vanilla[command])
|
|
203
|
+
return true;
|
|
204
|
+
if (edu && Edu_1.Edu[command])
|
|
205
|
+
return true;
|
|
206
|
+
return false;
|
|
207
|
+
}
|
|
208
|
+
exports.IsCommand = IsCommand;
|
|
209
|
+
function Add(receiver, items) {
|
|
210
|
+
if (items)
|
|
211
|
+
receiver.push(...items);
|
|
212
|
+
}
|
|
213
|
+
//# sourceMappingURL=Functions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Functions.js","sourceRoot":"","sources":["../../../../../src/Lib/Types/Command/Functions.ts"],"names":[],"mappings":";;;AAAA,2EAAuE;AACvE,wCAAqC;AACrC,gDAA6C;AAE7C,wCAAoD;AAEpD;;;yCAGyC;AACzC,SAAgB,cAAc,CAAC,OAAgB,EAAE,MAAe,KAAK;IACnE,MAAM,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;IAEtC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;AACnD,CAAC;AAJD,wCAIC;AAED;;;;mEAImE;AACnE,SAAgB,OAAO,CAAC,OAAgB,EAAE,IAAiB,EAAE,MAAe,KAAK;;IAC/E,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;IAEnC,IAAI,KAAK,GAAG,OAAO,CAAC,UAAU,CAAC,MAAM,EAAE;QACrC,KAAK,GAAG,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC;KACnC;IAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE;QAC9B,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC,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AAED;;;yCAGyC;AACzC,SAAgB,cAAc,CAAC,IAAY,EAAE,MAAe,KAAK;IAC/D,MAAM,GAAG,GAAkB,EAAE,CAAC;IAE9B,GAAG,CAAC,GAAG,EAAE,iBAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IAExB,IAAI,GAAG;QAAE,GAAG,CAAC,GAAG,EAAE,SAAG,CAAC,IAAI,CAAC,CAAC,CAAC;IAE7B,OAAO,GAAG,CAAC;AACb,CAAC;AARD,wCAQC;AAED;;;yCAGyC;AACzC,SAAgB,cAAc,CAAC,IAAY,EAAE,MAAe,KAAK;IAC/D,IAAI,iBAAO,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IAC/B,IAAI,GAAG,IAAI,SAAG,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IAElC,OAAO,KAAK,CAAC;AACf,CAAC;AALD,wCAKC;AAED;;;2BAG2B;AAC3B,SAAgB,SAAS,CAAC,OAAe,EAAE,MAAe,KAAK;IAC7D,IAAI,iBAAO,CAAC,OAAO,CAAC;QAAE,OAAO,IAAI,CAAC;IAClC,IAAI,GAAG,IAAI,SAAG,CAAC,OAAO,CAAC;QAAE,OAAO,IAAI,CAAC;IAErC,OAAO,KAAK,CAAC;AACf,CAAC;AALD,8BAKC;AAED,SAAS,GAAG,CAAC,QAAuB,EAAE,KAAgC;IACpE,IAAI,KAAK;QAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC;AACrC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**A parameter in a command, represent a single 'word' */
|
|
2
|
+
export declare class Parameter {
|
|
3
|
+
/**The offset of the word in the document*/
|
|
4
|
+
offset: number;
|
|
5
|
+
/**The text of the parameter*/
|
|
6
|
+
text: string;
|
|
7
|
+
/**Creates a new instance of the parameter
|
|
8
|
+
* @param text The text to assign
|
|
9
|
+
* @param offset The offset to assign*/
|
|
10
|
+
constructor(text?: string, offset?: number);
|
|
11
|
+
}
|
|
12
|
+
/**The namespace surrounding the parameter object*/
|
|
13
|
+
export declare namespace Parameter {
|
|
14
|
+
/**Checks if the given instance implements the Parameter object
|
|
15
|
+
* @param value The value to evualate
|
|
16
|
+
* @returns true or false if the object implements the Parameter object or not*/
|
|
17
|
+
function is(value: any): value is Parameter;
|
|
18
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Parameter = void 0;
|
|
4
|
+
/**A parameter in a command, represent a single 'word' */
|
|
5
|
+
class Parameter {
|
|
6
|
+
/**Creates a new instance of the parameter
|
|
7
|
+
* @param text The text to assign
|
|
8
|
+
* @param offset The offset to assign*/
|
|
9
|
+
constructor(text = "", offset = 0) {
|
|
10
|
+
this.offset = offset;
|
|
11
|
+
this.text = text;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.Parameter = Parameter;
|
|
15
|
+
/**The namespace surrounding the parameter object*/
|
|
16
|
+
(function (Parameter) {
|
|
17
|
+
/**Checks if the given instance implements the Parameter object
|
|
18
|
+
* @param value The value to evualate
|
|
19
|
+
* @returns true or false if the object implements the Parameter object or not*/
|
|
20
|
+
function is(value) {
|
|
21
|
+
if (value && typeof value.offset === "number" && typeof value.text === "string")
|
|
22
|
+
return true;
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
Parameter.is = is;
|
|
26
|
+
})(Parameter = exports.Parameter || (exports.Parameter = {}));
|
|
27
|
+
//# sourceMappingURL=Parameter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Parameter.js","sourceRoot":"","sources":["../../../../../src/Lib/Types/Command/Parameter.ts"],"names":[],"mappings":";;;AAAA,yDAAyD;AACzD,MAAa,SAAS;IAMpB;;2CAEuC;IACvC,YAAY,OAAe,EAAE,EAAE,SAAiB,CAAC;QAC/C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AAbD,8BAaC;AAED,mDAAmD;AACnD,WAAiB,SAAS;IACxB;;oFAEgF;IAChF,SAAgB,EAAE,CAAC,KAAU;QAC3B,IAAI,KAAK,IAAI,OAAO,KAAK,CAAC,MAAM,KAAK,QAAQ,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ;YAAE,OAAO,IAAI,CAAC;QAE7F,OAAO,KAAK,CAAC;IACf,CAAC;IAJe,YAAE,KAIjB,CAAA;AACH,CAAC,EATgB,SAAS,GAAT,iBAAS,KAAT,iBAAS,QASzB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Parameter } from "./Parameter";
|
|
2
|
+
/**The interface of a basic word builder*/
|
|
3
|
+
export declare class ParameterBuilder {
|
|
4
|
+
/**The offset the given text will start at*/
|
|
5
|
+
private offset;
|
|
6
|
+
/**The parameters produced by the builder*/
|
|
7
|
+
items: Parameter[];
|
|
8
|
+
/**Creates a new instance of the ParameterBuilder
|
|
9
|
+
* @param offset The offset the text will start at*/
|
|
10
|
+
constructor(offset?: number);
|
|
11
|
+
/**Add the given text as a word to the internal list, starting at the given offset
|
|
12
|
+
* @param text The word text
|
|
13
|
+
* @param offset The offset where the word was found*/
|
|
14
|
+
Add(text: string, offset: number): void;
|
|
15
|
+
}
|
|
16
|
+
/**A function that shits through the text looking for parameters. Sends found parameters to the builder
|
|
17
|
+
* @param text The text to parse
|
|
18
|
+
* @param Builder The builder to report to*/
|
|
19
|
+
export declare function GetParameters(text: string, Builder: ParameterBuilder): void;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetParameters = exports.ParameterBuilder = void 0;
|
|
4
|
+
/**The interface of a basic word builder*/
|
|
5
|
+
class ParameterBuilder {
|
|
6
|
+
/**Creates a new instance of the ParameterBuilder
|
|
7
|
+
* @param offset The offset the text will start at*/
|
|
8
|
+
constructor(offset = 0) {
|
|
9
|
+
this.offset = offset;
|
|
10
|
+
this.items = [];
|
|
11
|
+
}
|
|
12
|
+
/**Add the given text as a word to the internal list, starting at the given offset
|
|
13
|
+
* @param text The word text
|
|
14
|
+
* @param offset The offset where the word was found*/
|
|
15
|
+
Add(text, offset) {
|
|
16
|
+
this.items.push({ offset: offset + this.offset, text: text });
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.ParameterBuilder = ParameterBuilder;
|
|
20
|
+
/**A function that shits through the text looking for parameters. Sends found parameters to the builder
|
|
21
|
+
* @param text The text to parse
|
|
22
|
+
* @param Builder The builder to report to*/
|
|
23
|
+
function GetParameters(text, Builder) {
|
|
24
|
+
let level = 0;
|
|
25
|
+
let startindex = 0;
|
|
26
|
+
let Instring = false;
|
|
27
|
+
for (let index = 0; index < text.length; index++) {
|
|
28
|
+
let c = text.charAt(index);
|
|
29
|
+
//If instring or not
|
|
30
|
+
if (Instring) {
|
|
31
|
+
//Is end of string and not escaped?
|
|
32
|
+
if (c == '"' && text.charAt(index - 1) !== "\\")
|
|
33
|
+
Instring = false;
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
//Switch on character
|
|
37
|
+
switch (c) {
|
|
38
|
+
//Its a string start
|
|
39
|
+
case '"':
|
|
40
|
+
Instring = true;
|
|
41
|
+
break;
|
|
42
|
+
//Bracket start
|
|
43
|
+
case "[":
|
|
44
|
+
case "(":
|
|
45
|
+
case "{":
|
|
46
|
+
level++;
|
|
47
|
+
break;
|
|
48
|
+
//Bracket end
|
|
49
|
+
case "]":
|
|
50
|
+
case ")":
|
|
51
|
+
case "}":
|
|
52
|
+
level--;
|
|
53
|
+
break;
|
|
54
|
+
//Empty spaces
|
|
55
|
+
case " ":
|
|
56
|
+
case "\t":
|
|
57
|
+
if (level == 0) {
|
|
58
|
+
if (startindex < index) {
|
|
59
|
+
const word = text.substring(startindex, index).trim();
|
|
60
|
+
Builder.Add(word, startindex);
|
|
61
|
+
}
|
|
62
|
+
startindex = index + 1;
|
|
63
|
+
}
|
|
64
|
+
break;
|
|
65
|
+
//Coordinates start
|
|
66
|
+
case "~":
|
|
67
|
+
case "^":
|
|
68
|
+
if (level == 0) {
|
|
69
|
+
if (startindex < index) {
|
|
70
|
+
const word = text.substring(startindex, index).trim();
|
|
71
|
+
Builder.Add(word, startindex);
|
|
72
|
+
}
|
|
73
|
+
startindex = index;
|
|
74
|
+
}
|
|
75
|
+
break;
|
|
76
|
+
default:
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
if (level < 0)
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
if (startindex < text.length) {
|
|
84
|
+
const word = text.substring(startindex, text.length).trim();
|
|
85
|
+
Builder.Add(word, startindex);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
exports.GetParameters = GetParameters;
|
|
89
|
+
//# sourceMappingURL=Parse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Parse.js","sourceRoot":"","sources":["../../../../../src/Lib/Types/Command/Parse.ts"],"names":[],"mappings":";;;AAEA,0CAA0C;AAC1C,MAAa,gBAAgB;IAM3B;wDACoD;IACpD,YAAY,SAAiB,CAAC;QAC5B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;IAClB,CAAC;IAED;;0DAEsD;IACtD,GAAG,CAAC,IAAY,EAAE,MAAc;QAC9B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IAChE,CAAC;CACF;AAnBD,4CAmBC;AAED;;4CAE4C;AAC5C,SAAgB,aAAa,CAAC,IAAY,EAAE,OAAyB;IACnE,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAI,UAAU,G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AAK,EAAE;4BACtB,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;4BACtD,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;yBAC/B;wBAED,UAAU,GAAG,KAAK,CAAC;qBACpB;oBAED,MAAM;gBACR;oBACE,MAAM;aACT;SACF;QAED,IAAI,KAAK,GAAG,CAAC;YAAE,MAAM;KACtB;IAED,IAAI,UAAU,GAAG,IAAI,CAAC,MAAM,EAAE;QAC5B,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;QAC5D,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;KAC/B;AACH,CAAC;AAxED,sCAwEC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export declare enum ParameterType {
|
|
2
|
+
animation = 0,
|
|
3
|
+
block = 1,
|
|
4
|
+
blockStates = 2,
|
|
5
|
+
boolean = 3,
|
|
6
|
+
cameraShakeType = 4,
|
|
7
|
+
cloneMode = 5,
|
|
8
|
+
command = 6,
|
|
9
|
+
coordinate = 7,
|
|
10
|
+
difficulty = 8,
|
|
11
|
+
effect = 9,
|
|
12
|
+
entity = 10,
|
|
13
|
+
event = 11,
|
|
14
|
+
fillMode = 12,
|
|
15
|
+
function = 13,
|
|
16
|
+
float = 14,
|
|
17
|
+
gamemode = 15,
|
|
18
|
+
integer = 16,
|
|
19
|
+
item = 17,
|
|
20
|
+
jsonItem = 18,
|
|
21
|
+
jsonRawText = 19,
|
|
22
|
+
keyword = 20,
|
|
23
|
+
locateFeature = 21,
|
|
24
|
+
maskMode = 22,
|
|
25
|
+
mirror = 23,
|
|
26
|
+
musicRepeatMode = 24,
|
|
27
|
+
objective = 25,
|
|
28
|
+
oldBlockMode = 26,
|
|
29
|
+
operation = 27,
|
|
30
|
+
particle = 28,
|
|
31
|
+
replaceMode = 29,
|
|
32
|
+
rideRules = 30,
|
|
33
|
+
ridefillMode = 31,
|
|
34
|
+
rotation = 32,
|
|
35
|
+
saveMode = 33,
|
|
36
|
+
selector = 34,
|
|
37
|
+
slotType = 35,
|
|
38
|
+
slotID = 36,
|
|
39
|
+
sound = 37,
|
|
40
|
+
string = 38,
|
|
41
|
+
structureAnimationMode = 39,
|
|
42
|
+
tag = 40,
|
|
43
|
+
teleportRules = 41,
|
|
44
|
+
tickingarea = 42,
|
|
45
|
+
unknown = 43,
|
|
46
|
+
xp = 44
|
|
47
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ParameterType = void 0;
|
|
4
|
+
//The type of command parameter
|
|
5
|
+
var ParameterType;
|
|
6
|
+
(function (ParameterType) {
|
|
7
|
+
//An animation key
|
|
8
|
+
ParameterType[ParameterType["animation"] = 0] = "animation";
|
|
9
|
+
//Block identifiers
|
|
10
|
+
ParameterType[ParameterType["block"] = 1] = "block";
|
|
11
|
+
//Block states
|
|
12
|
+
ParameterType[ParameterType["blockStates"] = 2] = "blockStates";
|
|
13
|
+
//Booleans
|
|
14
|
+
ParameterType[ParameterType["boolean"] = 3] = "boolean";
|
|
15
|
+
//Camera Shake mode
|
|
16
|
+
ParameterType[ParameterType["cameraShakeType"] = 4] = "cameraShakeType";
|
|
17
|
+
//Clone mode
|
|
18
|
+
ParameterType[ParameterType["cloneMode"] = 5] = "cloneMode";
|
|
19
|
+
//Command start
|
|
20
|
+
ParameterType[ParameterType["command"] = 6] = "command";
|
|
21
|
+
//Coordinate
|
|
22
|
+
ParameterType[ParameterType["coordinate"] = 7] = "coordinate";
|
|
23
|
+
//Difficulty mode
|
|
24
|
+
ParameterType[ParameterType["difficulty"] = 8] = "difficulty";
|
|
25
|
+
//Effect identifiers
|
|
26
|
+
ParameterType[ParameterType["effect"] = 9] = "effect";
|
|
27
|
+
//Entity identifiers
|
|
28
|
+
ParameterType[ParameterType["entity"] = 10] = "entity";
|
|
29
|
+
//Event in behaviors
|
|
30
|
+
ParameterType[ParameterType["event"] = 11] = "event";
|
|
31
|
+
//The fill mode
|
|
32
|
+
ParameterType[ParameterType["fillMode"] = 12] = "fillMode";
|
|
33
|
+
//Functions paths
|
|
34
|
+
ParameterType[ParameterType["function"] = 13] = "function";
|
|
35
|
+
//Float numbers
|
|
36
|
+
ParameterType[ParameterType["float"] = 14] = "float";
|
|
37
|
+
//Game mode
|
|
38
|
+
ParameterType[ParameterType["gamemode"] = 15] = "gamemode";
|
|
39
|
+
//Integer numbers
|
|
40
|
+
ParameterType[ParameterType["integer"] = 16] = "integer";
|
|
41
|
+
//Item identifiers
|
|
42
|
+
ParameterType[ParameterType["item"] = 17] = "item";
|
|
43
|
+
//Json item format
|
|
44
|
+
ParameterType[ParameterType["jsonItem"] = 18] = "jsonItem";
|
|
45
|
+
//Json raw text
|
|
46
|
+
ParameterType[ParameterType["jsonRawText"] = 19] = "jsonRawText";
|
|
47
|
+
//Keyword
|
|
48
|
+
ParameterType[ParameterType["keyword"] = 20] = "keyword";
|
|
49
|
+
//Locates feature mode
|
|
50
|
+
ParameterType[ParameterType["locateFeature"] = 21] = "locateFeature";
|
|
51
|
+
//Mask mode
|
|
52
|
+
ParameterType[ParameterType["maskMode"] = 22] = "maskMode";
|
|
53
|
+
//Mirror mode
|
|
54
|
+
ParameterType[ParameterType["mirror"] = 23] = "mirror";
|
|
55
|
+
//Music repeat mode
|
|
56
|
+
ParameterType[ParameterType["musicRepeatMode"] = 24] = "musicRepeatMode";
|
|
57
|
+
//Objective identifiers
|
|
58
|
+
ParameterType[ParameterType["objective"] = 25] = "objective";
|
|
59
|
+
//Old Block mode
|
|
60
|
+
ParameterType[ParameterType["oldBlockMode"] = 26] = "oldBlockMode";
|
|
61
|
+
//Operation mode
|
|
62
|
+
ParameterType[ParameterType["operation"] = 27] = "operation";
|
|
63
|
+
//Particle iodentifier
|
|
64
|
+
ParameterType[ParameterType["particle"] = 28] = "particle";
|
|
65
|
+
//Replace mode
|
|
66
|
+
ParameterType[ParameterType["replaceMode"] = 29] = "replaceMode";
|
|
67
|
+
//Ride Rules
|
|
68
|
+
ParameterType[ParameterType["rideRules"] = 30] = "rideRules";
|
|
69
|
+
//Ride Fill Mode
|
|
70
|
+
ParameterType[ParameterType["ridefillMode"] = 31] = "ridefillMode";
|
|
71
|
+
//Rotation Mode
|
|
72
|
+
ParameterType[ParameterType["rotation"] = 32] = "rotation";
|
|
73
|
+
//Save Mode
|
|
74
|
+
ParameterType[ParameterType["saveMode"] = 33] = "saveMode";
|
|
75
|
+
//Selectors
|
|
76
|
+
ParameterType[ParameterType["selector"] = 34] = "selector";
|
|
77
|
+
//Slot type
|
|
78
|
+
ParameterType[ParameterType["slotType"] = 35] = "slotType";
|
|
79
|
+
//Slot ID
|
|
80
|
+
ParameterType[ParameterType["slotID"] = 36] = "slotID";
|
|
81
|
+
//Sound identifier
|
|
82
|
+
ParameterType[ParameterType["sound"] = 37] = "sound";
|
|
83
|
+
//Strings
|
|
84
|
+
ParameterType[ParameterType["string"] = 38] = "string";
|
|
85
|
+
//Structre animation mode
|
|
86
|
+
ParameterType[ParameterType["structureAnimationMode"] = 39] = "structureAnimationMode";
|
|
87
|
+
//Tag identifiers
|
|
88
|
+
ParameterType[ParameterType["tag"] = 40] = "tag";
|
|
89
|
+
//Teleport rules
|
|
90
|
+
ParameterType[ParameterType["teleportRules"] = 41] = "teleportRules";
|
|
91
|
+
//Ticking area identifiers
|
|
92
|
+
ParameterType[ParameterType["tickingarea"] = 42] = "tickingarea";
|
|
93
|
+
//Unknown
|
|
94
|
+
ParameterType[ParameterType["unknown"] = 43] = "unknown";
|
|
95
|
+
//XP
|
|
96
|
+
ParameterType[ParameterType["xp"] = 44] = "xp";
|
|
97
|
+
})(ParameterType = exports.ParameterType || (exports.ParameterType = {}));
|
|
98
|
+
//# sourceMappingURL=ParameterType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ParameterType.js","sourceRoot":"","sources":["../../../../src/Lib/Types/ParameterType.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,IAAY,aA2FX;AA3FD,WAAY,aAAa;IACvB,kBAAkB;IAClB,2DAAS,CAAA;IACT,mBAAmB;IACnB,mDAAK,CAAA;IACL,cAAc;IACd,+DAAW,CAAA;IACX,UAAU;IACV,uDAAO,CAAA;IACP,mBAAmB;IACnB,uEAAe,CAAA;IACf,YAAY;IACZ,2DAAS,CAAA;IACT,eAAe;IACf,uDAAO,CAAA;IACP,YAAY;IACZ,6DAAU,CAAA;IACV,iBAAiB;IACjB,6DAAU,CAAA;IACV,oBAAoB;IACpB,qDAAM,CAAA;IACN,oBAAoB;IACpB,sDAAM,CAAA;IACN,oBAAoB;IACpB,oDAAK,CAAA;IACL,eAAe;IACf,0DAAQ,CAAA;IACR,iBAAiB;IACjB,0DAAQ,CAAA;IACR,eAAe;IACf,oDAAK,CAAA;IACL,WAAW;IACX,0DAAQ,CAAA;IACR,iBAAiB;IACjB,wDAAO,CAAA;IACP,kBAAkB;IAClB,kDAAI,CAAA;IACJ,kBAAkB;IAClB,0DAAQ,CAAA;IACR,eAAe;IACf,gEAAW,CAAA;IACX,SAAS;IACT,wDAAO,CAAA;IACP,sBAAsB;IACtB,oEAAa,CAAA;IACb,WAAW;IACX,0DAAQ,CAAA;IACR,aAAa;IACb,sDAAM,CAAA;IACN,mBAAmB;IACnB,wEAAe,CAAA;IACf,uBAAuB;IACvB,4DAAS,CAAA;IACT,gBAAgB;IAChB,kEAAY,CAAA;IACZ,gBAAgB;IAChB,4DAAS,CAAA;IACT,sBAAsB;IACtB,0DAAQ,CAAA;IACR,cAAc;IACd,gEAAW,CAAA;IACX,YAAY;IACZ,4DAAS,CAAA;IACT,gBAAgB;IAChB,kEAAY,CAAA;IACZ,eAAe;IACf,0DAAQ,CAAA;IACR,WAAW;IACX,0DAAQ,CAAA;IACR,WAAW;IACX,0DAAQ,CAAA;IACR,WAAW;IACX,0DAAQ,CAAA;IACR,SAAS;IACT,sDAAM,CAAA;IACN,kBAAkB;IAClB,oDAAK,CAAA;IACL,SAAS;IACT,sDAAM,CAAA;IACN,0BAA0B;IAC1B,sFAAsB,CAAA;IACtB,iBAAiB;IACjB,gDAAG,CAAA;IACH,gBAAgB;IAChB,oEAAa,CAAA;IACb,0BAA0B;IAC1B,gEAAW,CAAA;IACX,SAAS;IACT,wDAAO,CAAA;IACP,IAAI;IACJ,8CAAE,CAAA;AACJ,CAAC,EA3FW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QA2FxB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./Command/Command"), exports);
|
|
14
|
+
__exportStar(require("./Command/Functions"), exports);
|
|
15
|
+
__exportStar(require("./Command/Parameter"), exports);
|
|
16
|
+
__exportStar(require("./ParameterType"), exports);
|
|
17
|
+
//# sourceMappingURL=include.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"include.js","sourceRoot":"","sources":["../../../../src/Lib/Types/include.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAkC;AAClC,sDAAoC;AACpC,sDAAoC;AACpC,kDAAgC"}
|
package/lib/src/main.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.Data = void 0;
|
|
14
|
+
exports.Data = require("./Lib/Data/include");
|
|
15
|
+
__exportStar(require("./Lib/Types/include"), exports);
|
|
16
|
+
//# sourceMappingURL=main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,6CAA2C;AAC3C,sDAAoC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "bc-minecraft-bedrock-command",
|
|
3
|
+
"version": "1.0.17",
|
|
4
|
+
"description": "A typescript package library that handles commands for minecraft bedrock",
|
|
5
|
+
"main": "./lib/src/main.js",
|
|
6
|
+
"types": "./lib/src/main.d.ts",
|
|
7
|
+
"directories": {
|
|
8
|
+
"lib": "lib",
|
|
9
|
+
"test": "test"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"lib/src/**/*.js",
|
|
13
|
+
"lib/src/**/*.js.map",
|
|
14
|
+
"lib/src/**/*.d.ts"
|
|
15
|
+
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"compile": "tsc -b",
|
|
18
|
+
"build": "npm run clean && npm run compile",
|
|
19
|
+
"format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"",
|
|
20
|
+
"test": "mocha --debug-brk",
|
|
21
|
+
"clean": "rimraf lib",
|
|
22
|
+
"pretest": "npm run compile",
|
|
23
|
+
"prepublishOnly": "npm test && npm run compile",
|
|
24
|
+
"preversion": "",
|
|
25
|
+
"postversion": "git push && git push --tags",
|
|
26
|
+
"version": "git add -A src",
|
|
27
|
+
"watch": "tsc -w -p ./src"
|
|
28
|
+
},
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "git+https://github.com/Blockception/BC-Minecraft-Bedrock-Command.git"
|
|
32
|
+
},
|
|
33
|
+
"keywords": [
|
|
34
|
+
"minecraft",
|
|
35
|
+
"bedrock",
|
|
36
|
+
"command"
|
|
37
|
+
],
|
|
38
|
+
"author": "BlockceptionLtd",
|
|
39
|
+
"license": "BSD-3-Clause",
|
|
40
|
+
"bugs": {
|
|
41
|
+
"url": "https://github.com/Blockception/BC-Minecraft-Bedrock-Command/issues"
|
|
42
|
+
},
|
|
43
|
+
"homepage": "https://github.com/Blockception/BC-Minecraft-Bedrock-Command#readme",
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@types/chai": "^4.2.21",
|
|
46
|
+
"@types/mocha": "^9.0.0",
|
|
47
|
+
"@types/node": "^16.7.6",
|
|
48
|
+
"chai": "^4.3.4",
|
|
49
|
+
"mocha": "^9.1.1",
|
|
50
|
+
"rimraf": "^3.0.2",
|
|
51
|
+
"ts-node": "^10.2.1",
|
|
52
|
+
"typescript": "^4.4.2"
|
|
53
|
+
},
|
|
54
|
+
"dependencies": {
|
|
55
|
+
"bc-minecraft-bedrock-types": "^1.1.8"
|
|
56
|
+
}
|
|
57
|
+
}
|