warframe-worldstate-data 3.1.24 → 3.2.0

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.
@@ -1,2 +1,292 @@
1
- import { A as translateCalendarEvent, C as sortieModDesc, D as syndicate, E as steelPath, M as translatePolarity, N as translateSeason, O as toTitleCase, P as upgrade, S as sortieFaction, T as splitResourceName, _ as nodeMissionType, a as conclaveCategory, b as region, c as faction, d as languageDesc, f as languageString, g as nodeEnemy, h as node, i as archonShardUpgradeType, j as translateFocus, k as translateArchimedeaType, l as fissureModifier, m as missionType, n as archonShard, o as conclaveChallenge, p as lastResourceName, r as archonShardColor, s as conclaveMode, t as _default, u as fissureTier, v as operation, w as sortieModifier, x as sortieBoss, y as operationSymbol } from "../translation-CUKRZoNL.mjs";
1
+ import { ArchonShard, SteelPath } from "../types.mjs";
2
+ import { Locale } from "../exports.mjs";
3
+
4
+ //#region tools/translation.d.ts
5
+ /**
6
+ * Rough Titlecase!
7
+ * @param {string} str string to be titlecased
8
+ * @returns {string} titlecased string
9
+ */
10
+ declare const toTitleCase: (str: string) => string;
11
+ /**
12
+ * Utility function to split the resource name and return somewhat human-readable string
13
+ * @param {string} str localization resource key
14
+ * @returns {string} human-readable string
15
+ */
16
+ declare const splitResourceName: (str: string) => string;
17
+ declare const lastResourceName: (str: string | undefined) => string | undefined;
18
+ /**
19
+ *
20
+ * @param {string} color - The internal color name
21
+ * @param {string} dataOverride locale for use with translation
22
+ * @returns {Object | undefined}
23
+ */
24
+ declare const archonShard: (color: string, dataOverride?: Locale) => ArchonShard;
25
+ /**
26
+ *
27
+ * @param {string} color - The internal color name
28
+ * @param {string} dataOverride locale for use with translation
29
+ * @returns {string}
30
+ */
31
+ declare const archonShardColor: (color: string, dataOverride?: Locale) => string;
32
+ /**
33
+ *
34
+ * @param {string} color - The internal color name
35
+ * @param {string} upgradeType - The upgrade type
36
+ * @param {string} dataOverride locale for use with translation
37
+ * @returns {string}
38
+ */
39
+ declare const archonShardUpgradeType: (color: string, upgradeType: string, dataOverride?: Locale) => string;
40
+ /**
41
+ *
42
+ * @param {string} key - The data key
43
+ * @param {string} dataOverride locale for use with translation
44
+ * @returns {string} faction name
45
+ */
46
+ declare const faction: (key: string, dataOverride?: Locale) => string;
47
+ /**
48
+ *
49
+ * @param {string} key - The data key
50
+ * @param {string} dataOverride locale for use with translation
51
+ * @returns {string} node name
52
+ */
53
+ declare const node: (key: string, dataOverride?: Locale) => string;
54
+ /**
55
+ *
56
+ * @param {string} key - The data key
57
+ * @param {string} dataOverride locale for use with translation
58
+ * @returns {string} mission type of the node
59
+ */
60
+ declare const nodeMissionType: (key: string, dataOverride?: Locale) => string;
61
+ /**
62
+ *
63
+ * @param {string} key - The data key
64
+ * @param {string} dataOverride locale for use with translation
65
+ * @returns {string} faction that controls the node
66
+ */
67
+ declare const nodeEnemy: (key: string, dataOverride?: Locale) => string;
68
+ /**
69
+ *
70
+ * @param {string} key - The data key
71
+ * @param {string} dataOverride locale for use with translation
72
+ * @returns {string} localization for language string
73
+ */
74
+ declare const languageString: (key: string, dataOverride?: Locale) => string;
75
+ /**
76
+ *
77
+ * @param {string} key - The data key
78
+ * @param {string} dataOverride locale for use with translation
79
+ * @returns {string} localization for language description
80
+ */
81
+ declare const languageDesc: (key: string, dataOverride?: Locale) => string;
82
+ /**
83
+ *
84
+ * @param {string} key - The data key
85
+ * @param {string} dataOverride locale for use with translation
86
+ * @returns {string} translation for mission type
87
+ */
88
+ declare const missionType: (key: string, dataOverride?: Locale) => string;
89
+ /**
90
+ *
91
+ * @param {string} key - The data key
92
+ * @param {string} dataOverride locale for use with translation
93
+ * @returns {string} conclave mode
94
+ */
95
+ declare const conclaveMode: (key: string, dataOverride?: Locale) => string;
96
+ /**
97
+ *
98
+ * @param {string} key - The data key
99
+ * @param {string} dataOverride locale for use with translation
100
+ * @returns {{ value: string; description: string }} conclave category
101
+ */
102
+ declare const conclaveCategory: (key: string, dataOverride?: Locale) => string;
103
+ /**
104
+ *
105
+ * @param {string} key - The data key
106
+ * @param {string} dataOverride locale for use with translation
107
+ * @returns {string} fissure modifier data
108
+ */
109
+ declare const fissureModifier: (key: string, dataOverride?: Locale) => string;
110
+ /**
111
+ *
112
+ * @param {string} key - The data key
113
+ * @param {string} dataOverride locale for use with translation
114
+ * @returns {number | string} fissure tier
115
+ */
116
+ declare const fissureTier: (key: string, dataOverride?: Locale) => number | string;
117
+ /**
118
+ *
119
+ * @param {string} key - The data key
120
+ * @param {string} dataOverride locale for use with translation
121
+ * @returns {string} syndicate name
122
+ */
123
+ declare const syndicate: (key: string, dataOverride?: Locale) => string;
124
+ /**
125
+ *
126
+ * @param {string} key - The data key
127
+ * @param {string} dataOverride locale for use with translation
128
+ * @returns {string} upgrade type
129
+ */
130
+ declare const upgrade: (key: string, dataOverride?: Locale) => string;
131
+ /**
132
+ *
133
+ * @param {string} key - The data key
134
+ * @param {string} dataOverride locale for use with translation
135
+ * @returns {string} mathematical operation value
136
+ */
137
+ declare const operation: (key: string, dataOverride?: Locale) => string;
138
+ /**
139
+ *
140
+ * @param {string} key - The data key
141
+ * @param {string} dataOverride locale for use with translation
142
+ * @returns {string} symbol of mathematical operation
143
+ */
144
+ declare const operationSymbol: (key: string, dataOverride?: Locale) => string;
145
+ /**
146
+ * @param {string} key - The data key
147
+ * @param {string} dataOverride locale for use with translation
148
+ * @returns {string} sortie boss name
149
+ */
150
+ declare const sortieBoss: (key: string, dataOverride?: Locale) => string;
151
+ /**
152
+ * @param {string} key - The data key
153
+ * @param {string} dataOverride locale for use with translation
154
+ * @returns {string} faction for a sortie based on the boss
155
+ */
156
+ declare const sortieFaction: (key: string, dataOverride?: Locale) => string;
157
+ /**
158
+ *
159
+ * @param {string} key - The data key
160
+ * @param {string} dataOverride locale for use with translation
161
+ * @returns {string} sortie modifier data
162
+ */
163
+ declare const sortieModifier: (key: string, dataOverride?: Locale) => string;
164
+ /**
165
+ * @param {string} key - The data key
166
+ * @param {string} dataOverride locale for use with translation
167
+ * @returns {string} sortie modifier description
168
+ */
169
+ declare const sortieModDesc: (key: string, dataOverride?: Locale) => string;
170
+ /**
171
+ * Retrieve the localized region for a given key
172
+ * @param {string | number} key - The region key
173
+ * @param {string} dataOverride - The locale to use for translations
174
+ * @returns {string} localized region name
175
+ */
176
+ declare const region: (key: number, dataOverride?: Locale) => string | number;
177
+ /**
178
+ * Retrieve conclave challenge name for the given key and locale
179
+ * @param {string} key key to retrieve
180
+ * @param {string} dataOverride locale key override
181
+ * @returns {{
182
+ * title: string,
183
+ * description: string,
184
+ * standing: number,
185
+ * }} - The conclave challenge name for the given key
186
+ */
187
+ declare const conclaveChallenge: (key: string, dataOverride?: Locale) => {
188
+ title: string;
189
+ description: string;
190
+ standing: number;
191
+ };
192
+ /**
193
+ * Get the steel path data for given key
194
+ * @param {string} dataOverride - The locale to use for translations
195
+ * @returns {string} - The steel path data for the given key
196
+ */
197
+ declare const steelPath: (dataOverride?: Locale) => SteelPath;
198
+ /**
199
+ * Translate the given focus school
200
+ * @param {string} focus The focus school to translate
201
+ * @returns {string} The translated focus school
202
+ */
203
+ declare const translateFocus: (focus?: string) => string;
204
+ /**
205
+ * Translate the given polarity
206
+ * @param {string?} pol The polarity to translate
207
+ * @returns {string} The translated polarity
208
+ */
209
+ declare const translatePolarity: (pol?: string) => string;
210
+ /**
211
+ * Translate the given event key
212
+ * @param {string} key Unique event type
213
+ * @returns {string}
214
+ */
215
+ declare const translateCalendarEvent: (key: string) => string;
216
+ /**
217
+ * Translate the given season name to a non-unique string
218
+ * @param {string} season Unique season name
219
+ * @returns {string}
220
+ */
221
+ declare const translateSeason: (season: string) => string;
222
+ declare const translateArchimedeaType: (type: string) => string;
223
+ /**
224
+ * An object containing functions to convert in-game names to their localizations
225
+ * @typedef {Record<string, function>} Translator
226
+ * @property {function} faction - Converts faction names
227
+ * @property {function} node - Converts star map node names
228
+ * @property {function} nodeMissionType - Returns the mission type of given node
229
+ * @property {function} nodeEnemy - Returns the faction that controls a given node
230
+ * @property {function} languageString - Converts generic language strings
231
+ * @property {function} languageDesc - Converts generic language strings
232
+ * and retrieves the description
233
+ * @property {function} missionType - Converts mission types
234
+ * @property {function} conclaveMode - Converts conclave modes
235
+ * @property {function} conclaveCategory - Converts conclave challenge categories
236
+ * @property {function} fissureModifier - Converts fissure mission modifiers
237
+ * @property {function} syndicate - Converts syndicate names
238
+ * @property {function} upgrade - Converts upgrade types
239
+ * @property {function} operation - Converts operation types
240
+ * @property {function} sortieBoss - Converts sortie boss names
241
+ * @property {function} sortieModifier - Converts sortie modifier types
242
+ * @property {function} sortieModDesc - Converts sortie modifier type descriptions
243
+ * @property {function} region - Converts persistent enemy region indicies
244
+ * @property {function} conclaveChallenge - Convert conclave identifiers into standing data
245
+ * @property {function} steelPath - Retrieve Steel Path rotation data for locale
246
+ * @property {function} toTitleCase - Format provided string as titlecase
247
+ * @property {function} translateFocus - Translate focus schools
248
+ * @property {function} translatePolarity - Translate polarities
249
+ * @property {function} archonShard - Converts archon shard names
250
+ * @property {function} archonShardColor - Converts archon shard names to in-game color values
251
+ * @property {function} archonShardUpgradeType - Convert archon shard upgrade type
252
+ * @property {function} translateCalendarEvent - Translate the given event key
253
+ * @property {function} translateSeason - Translate the given season name to a non-unique string
254
+ */
255
+ declare const _default: {
256
+ faction: (key: string, dataOverride?: Locale) => string;
257
+ node: (key: string, dataOverride?: Locale) => string;
258
+ nodeMissionType: (key: string, dataOverride?: Locale) => string;
259
+ nodeEnemy: (key: string, dataOverride?: Locale) => string;
260
+ languageString: (key: string, dataOverride?: Locale) => string;
261
+ languageDesc: (key: string, dataOverride?: Locale) => string;
262
+ missionType: (key: string, dataOverride?: Locale) => string;
263
+ conclaveMode: (key: string, dataOverride?: Locale) => string;
264
+ conclaveCategory: (key: string, dataOverride?: Locale) => string;
265
+ fissureModifier: (key: string, dataOverride?: Locale) => string;
266
+ fissureTier: (key: string, dataOverride?: Locale) => number | string;
267
+ syndicate: (key: string, dataOverride?: Locale) => string;
268
+ upgrade: (key: string, dataOverride?: Locale) => string;
269
+ operation: (key: string, dataOverride?: Locale) => string;
270
+ operationSymbol: (key: string, dataOverride?: Locale) => string;
271
+ sortieBoss: (key: string, dataOverride?: Locale) => string;
272
+ sortieModifier: (key: string, dataOverride?: Locale) => string;
273
+ sortieModDesc: (key: string, dataOverride?: Locale) => string;
274
+ sortieFaction: (key: string, dataOverride?: Locale) => string;
275
+ region: (key: number, dataOverride?: Locale) => string | number;
276
+ conclaveChallenge: (key: string, dataOverride?: Locale) => {
277
+ title: string;
278
+ description: string;
279
+ standing: number;
280
+ };
281
+ steelPath: (dataOverride?: Locale) => SteelPath;
282
+ toTitleCase: (str: string) => string;
283
+ translateFocus: (focus?: string) => string;
284
+ translatePolarity: (pol?: string) => string;
285
+ archonShard: (color: string, dataOverride?: Locale) => ArchonShard;
286
+ archonShardColor: (color: string, dataOverride?: Locale) => string;
287
+ archonShardUpgradeType: (color: string, upgradeType: string, dataOverride?: Locale) => string;
288
+ translateCalendarEvent: (key: string) => string;
289
+ translateSeason: (season: string) => string;
290
+ };
291
+ //#endregion
2
292
  export { archonShard, archonShardColor, archonShardUpgradeType, conclaveCategory, conclaveChallenge, conclaveMode, _default as default, faction, fissureModifier, fissureTier, languageDesc, languageString, lastResourceName, missionType, node, nodeEnemy, nodeMissionType, operation, operationSymbol, region, sortieBoss, sortieFaction, sortieModDesc, sortieModifier, splitResourceName, steelPath, syndicate, toTitleCase, translateArchimedeaType, translateCalendarEvent, translateFocus, translatePolarity, translateSeason, upgrade };
@@ -1,4 +1,347 @@
1
- import "../exports-Dnvn5acu.mjs";
2
- import { A as translateFocus, C as sortieModifier, D as toTitleCase, E as syndicate, M as translateSeason, N as translation_default, O as translateArchimedeaType, P as upgrade, S as sortieModDesc, T as steelPath, _ as operation, a as conclaveChallenge, b as sortieBoss, c as fissureModifier, d as languageString, f as lastResourceName, g as nodeMissionType, h as nodeEnemy, i as conclaveCategory, j as translatePolarity, k as translateCalendarEvent, l as fissureTier, m as node, n as archonShardColor, o as conclaveMode, p as missionType, r as archonShardUpgradeType, s as faction, t as archonShard, u as languageDesc, v as operationSymbol, w as splitResourceName, x as sortieFaction, y as region } from "../translation-DQc7UbZg.mjs";
1
+ import exports_default from "../exports.mjs";
3
2
 
3
+ //#region tools/translation.ts
4
+ /**
5
+ * Rough Titlecase!
6
+ * @param {string} str string to be titlecased
7
+ * @returns {string} titlecased string
8
+ */
9
+ const toTitleCase = (str) => {
10
+ return str.replace(/\w\S*/g, (txt) => txt.charAt(0).toUpperCase() + txt.substring(1).toLowerCase());
11
+ };
12
+ /**
13
+ * Utility function to split the resource name and return somewhat human-readable string
14
+ * @param {string} str localization resource key
15
+ * @returns {string} human-readable string
16
+ */
17
+ const splitResourceName = (str) => str.split(/([A-Z]?[^A-Z]*)/g).filter(Boolean).join(" ");
18
+ const lastResourceName = (str) => str ? str.split?.("/").reverse()[0] : str;
19
+ const i18n = (locale = "en") => exports_default[locale] || exports_default;
20
+ const keyInData = (key, dataOverride) => key in i18n(dataOverride) ? i18n(dataOverride)[key] : key;
21
+ /**
22
+ *
23
+ * @param {string} color - The internal color name
24
+ * @param {string} dataOverride locale for use with translation
25
+ * @returns {Object | undefined}
26
+ */
27
+ const archonShard = (color, dataOverride = "en") => {
28
+ return keyInData("archonShards", dataOverride)[color];
29
+ };
30
+ /**
31
+ *
32
+ * @param {string} color - The internal color name
33
+ * @param {string} dataOverride locale for use with translation
34
+ * @returns {string}
35
+ */
36
+ const archonShardColor = (color, dataOverride = "en") => archonShard(color, dataOverride)?.value ?? color;
37
+ /**
38
+ *
39
+ * @param {string} color - The internal color name
40
+ * @param {string} upgradeType - The upgrade type
41
+ * @param {string} dataOverride locale for use with translation
42
+ * @returns {string}
43
+ */
44
+ const archonShardUpgradeType = (color, upgradeType, dataOverride = "en") => archonShard(color, dataOverride)?.upgradeTypes[upgradeType]?.value ?? lastResourceName(upgradeType);
45
+ /**
46
+ *
47
+ * @param {string} key - The data key
48
+ * @param {string} dataOverride locale for use with translation
49
+ * @returns {string} faction name
50
+ */
51
+ const faction = (key, dataOverride = "en") => keyInData("factions", dataOverride)[key]?.value ?? key;
52
+ const solNode = (key, thing, dataOverride = "en") => keyInData("solNodes", dataOverride)?.[key]?.[thing] ?? lastResourceName(key) ?? key;
53
+ /**
54
+ *
55
+ * @param {string} key - The data key
56
+ * @param {string} dataOverride locale for use with translation
57
+ * @returns {string} node name
58
+ */
59
+ const node = (key, dataOverride = "en") => solNode(key, "value", dataOverride);
60
+ /**
61
+ *
62
+ * @param {string} key - The data key
63
+ * @param {string} dataOverride locale for use with translation
64
+ * @returns {string} mission type of the node
65
+ */
66
+ const nodeMissionType = (key, dataOverride = "en") => solNode(key, "type", dataOverride);
67
+ /**
68
+ *
69
+ * @param {string} key - The data key
70
+ * @param {string} dataOverride locale for use with translation
71
+ * @returns {string} faction that controls the node
72
+ */
73
+ const nodeEnemy = (key, dataOverride = "en") => {
74
+ return key in i18n(dataOverride).solNodes ? i18n(dataOverride).solNodes[key].enemy : lastResourceName(key) ?? key;
75
+ };
76
+ /**
77
+ *
78
+ * @param {string} key - The data key
79
+ * @param {string} dataOverride locale for use with translation
80
+ * @returns {string} localization for language string
81
+ */
82
+ const languageString = (key, dataOverride = "en") => {
83
+ const lowerKey = String(key).toLowerCase();
84
+ return i18n(dataOverride).languages[lowerKey]?.value ?? i18n(dataOverride).languages[key]?.value ?? (key ? toTitleCase(splitResourceName(lastResourceName(String(key)) ?? "")) : key);
85
+ };
86
+ /**
87
+ *
88
+ * @param {string} key - The data key
89
+ * @param {string} dataOverride locale for use with translation
90
+ * @returns {string} localization for language description
91
+ */
92
+ const languageDesc = (key, dataOverride = "en") => {
93
+ const lowerKey = String(key).toLowerCase();
94
+ return i18n(dataOverride).languages[lowerKey]?.desc ?? i18n(dataOverride).languages[key]?.desc ?? (key ? `[PH] ${toTitleCase(splitResourceName(lastResourceName(String(key)) ?? ""))} Desc` : key);
95
+ };
96
+ /**
97
+ *
98
+ * @param {string} key - The data key
99
+ * @param {string} dataOverride locale for use with translation
100
+ * @returns {string} translation for mission type
101
+ */
102
+ const missionType = (key, dataOverride = "en") => {
103
+ const keyBased = key && typeof key === "string" && toTitleCase((key ?? "").replace(/^MT_/, ""));
104
+ return key in i18n(dataOverride).missionTypes ? i18n(dataOverride).missionTypes[key].value : keyBased;
105
+ };
106
+ const conclave = (key, thing, dataOverride = "en") => keyInData("conclave", dataOverride)?.[thing]?.[key];
107
+ /**
108
+ *
109
+ * @param {string} key - The data key
110
+ * @param {string} dataOverride locale for use with translation
111
+ * @returns {string} conclave mode
112
+ */
113
+ const conclaveMode = (key, dataOverride = "en") => conclave(key, "modes", dataOverride)?.value ?? key;
114
+ /**
115
+ *
116
+ * @param {string} key - The data key
117
+ * @param {string} dataOverride locale for use with translation
118
+ * @returns {{ value: string; description: string }} conclave category
119
+ */
120
+ const conclaveCategory = (key, dataOverride = "en") => conclave(key, "categories", dataOverride)?.value ?? key;
121
+ const fissure = (key, dataOverride = "en") => keyInData("fissureModifiers", dataOverride)?.[key] ?? key;
122
+ /**
123
+ *
124
+ * @param {string} key - The data key
125
+ * @param {string} dataOverride locale for use with translation
126
+ * @returns {string} fissure modifier data
127
+ */
128
+ const fissureModifier = (key, dataOverride = "en") => fissure(key, dataOverride)?.value ?? key;
129
+ /**
130
+ *
131
+ * @param {string} key - The data key
132
+ * @param {string} dataOverride locale for use with translation
133
+ * @returns {number | string} fissure tier
134
+ */
135
+ const fissureTier = (key, dataOverride = "en") => fissure(key, dataOverride).num ?? key;
136
+ /**
137
+ *
138
+ * @param {string} key - The data key
139
+ * @param {string} dataOverride locale for use with translation
140
+ * @returns {string} syndicate name
141
+ */
142
+ const syndicate = (key, dataOverride = "en") => i18n(dataOverride).syndicates[key]?.name ?? key;
143
+ /**
144
+ *
145
+ * @param {string} key - The data key
146
+ * @param {string} dataOverride locale for use with translation
147
+ * @returns {string} upgrade type
148
+ */
149
+ const upgrade = (key, dataOverride = "en") => i18n(dataOverride).upgradeTypes[key]?.value ?? key;
150
+ const oppo = (key, dataOverride = "en") => i18n(dataOverride).operationTypes[key];
151
+ /**
152
+ *
153
+ * @param {string} key - The data key
154
+ * @param {string} dataOverride locale for use with translation
155
+ * @returns {string} mathematical operation value
156
+ */
157
+ const operation = (key, dataOverride = "en") => oppo(key, dataOverride)?.value ?? key;
158
+ /**
159
+ *
160
+ * @param {string} key - The data key
161
+ * @param {string} dataOverride locale for use with translation
162
+ * @returns {string} symbol of mathematical operation
163
+ */
164
+ const operationSymbol = (key, dataOverride = "en") => oppo(key, dataOverride)?.symbol ?? key;
165
+ const sortie = (key, dataOverride = "en") => i18n(dataOverride).sortie.bosses[key];
166
+ /**
167
+ * @param {string} key - The data key
168
+ * @param {string} dataOverride locale for use with translation
169
+ * @returns {string} sortie boss name
170
+ */
171
+ const sortieBoss = (key, dataOverride = "en") => sortie(key, dataOverride)?.name ?? key;
172
+ /**
173
+ * @param {string} key - The data key
174
+ * @param {string} dataOverride locale for use with translation
175
+ * @returns {string} faction for a sortie based on the boss
176
+ */
177
+ const sortieFaction = (key, dataOverride = "en") => sortie(key, dataOverride)?.faction ?? key;
178
+ /**
179
+ *
180
+ * @param {string} key - The data key
181
+ * @param {string} dataOverride locale for use with translation
182
+ * @returns {string} sortie modifier data
183
+ */
184
+ const sortieModifier = (key, dataOverride = "en") => i18n(dataOverride).sortie.modifierTypes?.[key] ?? key;
185
+ /**
186
+ * @param {string} key - The data key
187
+ * @param {string} dataOverride locale for use with translation
188
+ * @returns {string} sortie modifier description
189
+ */
190
+ const sortieModDesc = (key, dataOverride = "en") => i18n(dataOverride).sortie.modifierDescriptions?.[key] ?? key;
191
+ /**
192
+ * Retrieve the localized region for a given key
193
+ * @param {string | number} key - The region key
194
+ * @param {string} dataOverride - The locale to use for translations
195
+ * @returns {string} localized region name
196
+ */
197
+ const region = (key, dataOverride = "en") => (key && i18n(dataOverride).persistentEnemy?.regions[key]) ?? key;
198
+ /**
199
+ * Retrieve conclave challenge name for the given key and locale
200
+ * @param {string} key key to retrieve
201
+ * @param {string} dataOverride locale key override
202
+ * @returns {{
203
+ * title: string,
204
+ * description: string,
205
+ * standing: number,
206
+ * }} - The conclave challenge name for the given key
207
+ */
208
+ const conclaveChallenge = (key, dataOverride = "en") => {
209
+ const splitKey = lastResourceName(String(key));
210
+ if (splitKey !== void 0 && i18n(dataOverride).conclave?.challenges?.[splitKey]) return i18n(dataOverride).conclave.challenges[splitKey];
211
+ return {
212
+ title: toTitleCase(splitResourceName(splitKey)),
213
+ description: toTitleCase(splitResourceName(splitKey)),
214
+ standing: 0
215
+ };
216
+ };
217
+ /**
218
+ * Get the steel path data for given key
219
+ * @param {string} dataOverride - The locale to use for translations
220
+ * @returns {string} - The steel path data for the given key
221
+ */
222
+ const steelPath = (dataOverride = "en") => (i18n(dataOverride) || exports_default).steelPath;
223
+ const valMapping = (key, map) => {
224
+ let val = "None";
225
+ Object.keys(map).forEach((k) => {
226
+ if (key.includes(k)) val = map[k];
227
+ });
228
+ return val;
229
+ };
230
+ const focusMap = {
231
+ "Focus/Attack": "Madurai",
232
+ "Focus/Defense": "Vazarin",
233
+ "Focus/Tactic": "Naramon",
234
+ "Focus/Power": "Zenurik",
235
+ "Focus/Ward": "Unairu"
236
+ };
237
+ /**
238
+ * Translate the given focus school
239
+ * @param {string} focus The focus school to translate
240
+ * @returns {string} The translated focus school
241
+ */
242
+ const translateFocus = (focus = "") => valMapping(focus, focusMap);
243
+ const polarityMap = {
244
+ AP_ATTACK: "Madurai",
245
+ AP_DEFENSE: "Vazarin",
246
+ AP_TACTIC: "Naramon",
247
+ AP_POWER: "Zenurik",
248
+ AP_WARD: "Unairu",
249
+ AP_UMBRA: "Umbra",
250
+ AP_ANY: "Aura"
251
+ };
252
+ /**
253
+ * Translate the given polarity
254
+ * @param {string?} pol The polarity to translate
255
+ * @returns {string} The translated polarity
256
+ */
257
+ const translatePolarity = (pol = "") => valMapping(pol, polarityMap);
258
+ const eventTypeMap = {
259
+ CET_CHALLENGE: "To Do",
260
+ CET_UPGRADE: "Override",
261
+ CET_REWARD: "Big Prize!",
262
+ CET_PLOT: "Birthday"
263
+ };
264
+ /**
265
+ * Translate the given event key
266
+ * @param {string} key Unique event type
267
+ * @returns {string}
268
+ */
269
+ const translateCalendarEvent = (key) => valMapping(key, eventTypeMap);
270
+ /**
271
+ * Translate the given season name to a non-unique string
272
+ * @param {string} season Unique season name
273
+ * @returns {string}
274
+ */
275
+ const translateSeason = (season) => toTitleCase(season.replace("CST_", ""));
276
+ const archimedeaTypes = {
277
+ CT_LAB: "Deep Archimedea",
278
+ CT_HEX: "Temporal Archimedea"
279
+ };
280
+ const translateArchimedeaType = (type) => valMapping(type, archimedeaTypes);
281
+ /**
282
+ * An object containing functions to convert in-game names to their localizations
283
+ * @typedef {Record<string, function>} Translator
284
+ * @property {function} faction - Converts faction names
285
+ * @property {function} node - Converts star map node names
286
+ * @property {function} nodeMissionType - Returns the mission type of given node
287
+ * @property {function} nodeEnemy - Returns the faction that controls a given node
288
+ * @property {function} languageString - Converts generic language strings
289
+ * @property {function} languageDesc - Converts generic language strings
290
+ * and retrieves the description
291
+ * @property {function} missionType - Converts mission types
292
+ * @property {function} conclaveMode - Converts conclave modes
293
+ * @property {function} conclaveCategory - Converts conclave challenge categories
294
+ * @property {function} fissureModifier - Converts fissure mission modifiers
295
+ * @property {function} syndicate - Converts syndicate names
296
+ * @property {function} upgrade - Converts upgrade types
297
+ * @property {function} operation - Converts operation types
298
+ * @property {function} sortieBoss - Converts sortie boss names
299
+ * @property {function} sortieModifier - Converts sortie modifier types
300
+ * @property {function} sortieModDesc - Converts sortie modifier type descriptions
301
+ * @property {function} region - Converts persistent enemy region indicies
302
+ * @property {function} conclaveChallenge - Convert conclave identifiers into standing data
303
+ * @property {function} steelPath - Retrieve Steel Path rotation data for locale
304
+ * @property {function} toTitleCase - Format provided string as titlecase
305
+ * @property {function} translateFocus - Translate focus schools
306
+ * @property {function} translatePolarity - Translate polarities
307
+ * @property {function} archonShard - Converts archon shard names
308
+ * @property {function} archonShardColor - Converts archon shard names to in-game color values
309
+ * @property {function} archonShardUpgradeType - Convert archon shard upgrade type
310
+ * @property {function} translateCalendarEvent - Translate the given event key
311
+ * @property {function} translateSeason - Translate the given season name to a non-unique string
312
+ */
313
+ var translation_default = {
314
+ faction,
315
+ node,
316
+ nodeMissionType,
317
+ nodeEnemy,
318
+ languageString,
319
+ languageDesc,
320
+ missionType,
321
+ conclaveMode,
322
+ conclaveCategory,
323
+ fissureModifier,
324
+ fissureTier,
325
+ syndicate,
326
+ upgrade,
327
+ operation,
328
+ operationSymbol,
329
+ sortieBoss,
330
+ sortieModifier,
331
+ sortieModDesc,
332
+ sortieFaction,
333
+ region,
334
+ conclaveChallenge,
335
+ steelPath,
336
+ toTitleCase,
337
+ translateFocus,
338
+ translatePolarity,
339
+ archonShard,
340
+ archonShardColor,
341
+ archonShardUpgradeType,
342
+ translateCalendarEvent,
343
+ translateSeason
344
+ };
345
+
346
+ //#endregion
4
347
  export { archonShard, archonShardColor, archonShardUpgradeType, conclaveCategory, conclaveChallenge, conclaveMode, translation_default as default, faction, fissureModifier, fissureTier, languageDesc, languageString, lastResourceName, missionType, node, nodeEnemy, nodeMissionType, operation, operationSymbol, region, sortieBoss, sortieFaction, sortieModDesc, sortieModifier, splitResourceName, steelPath, syndicate, toTitleCase, translateArchimedeaType, translateCalendarEvent, translateFocus, translatePolarity, translateSeason, upgrade };
@@ -1,5 +1,5 @@
1
- import { a as fromNow, c as timeDeltaToString, i as dailyReset, l as toNow, n as LegacyTimestamp, o as parseDate, s as pieceIsSmoller, t as ContentTimestamp, u as weeklyReset } from "../timeDate-CHdavm3I.mjs";
2
- import { A as translateCalendarEvent, C as sortieModDesc, D as syndicate, E as steelPath, M as translatePolarity, N as translateSeason, O as toTitleCase, P as upgrade, S as sortieFaction, T as splitResourceName, _ as nodeMissionType, a as conclaveCategory, b as region, c as faction, d as languageDesc, f as languageString, g as nodeEnemy, h as node, i as archonShardUpgradeType, j as translateFocus, k as translateArchimedeaType, l as fissureModifier, m as missionType, n as archonShard, o as conclaveChallenge, p as lastResourceName, r as archonShardColor, s as conclaveMode, u as fissureTier, v as operation, w as sortieModifier, x as sortieBoss, y as operationSymbol } from "../translation-CUKRZoNL.mjs";
1
+ import { ContentTimestamp, LegacyTimestamp, dailyReset, fromNow, parseDate, pieceIsSmoller, timeDeltaToString, toNow, weeklyReset } from "./timeDate.mjs";
2
+ import { archonShard, archonShardColor, archonShardUpgradeType, conclaveCategory, conclaveChallenge, conclaveMode, faction, fissureModifier, fissureTier, languageDesc, languageString, lastResourceName, missionType, node, nodeEnemy, nodeMissionType, operation, operationSymbol, region, sortieBoss, sortieFaction, sortieModDesc, sortieModifier, splitResourceName, steelPath, syndicate, toTitleCase, translateArchimedeaType, translateCalendarEvent, translateFocus, translatePolarity, translateSeason, upgrade } from "./translation.mjs";
3
3
 
4
4
  //#region tools/integrity.d.ts
5
5
  /**
@@ -1,6 +1,5 @@
1
- import "../exports-Dnvn5acu.mjs";
2
- import { c as weeklyReset, i as pieceIsSmoller, n as fromNow, o as timeDeltaToString, r as parseDate, s as toNow, t as dailyReset } from "../timeDate-CoQsggGD.mjs";
3
- import { A as translateFocus, C as sortieModifier, D as toTitleCase, E as syndicate, M as translateSeason, O as translateArchimedeaType, P as upgrade, S as sortieModDesc, T as steelPath, _ as operation, a as conclaveChallenge, b as sortieBoss, c as fissureModifier, d as languageString, f as lastResourceName, g as nodeMissionType, h as nodeEnemy, i as conclaveCategory, j as translatePolarity, k as translateCalendarEvent, l as fissureTier, m as node, n as archonShardColor, o as conclaveMode, p as missionType, r as archonShardUpgradeType, s as faction, t as archonShard, u as languageDesc, v as operationSymbol, w as splitResourceName, x as sortieFaction, y as region } from "../translation-DQc7UbZg.mjs";
1
+ import { dailyReset, fromNow, parseDate, pieceIsSmoller, timeDeltaToString, toNow, weeklyReset } from "./timeDate.mjs";
2
+ import { archonShard, archonShardColor, archonShardUpgradeType, conclaveCategory, conclaveChallenge, conclaveMode, faction, fissureModifier, fissureTier, languageDesc, languageString, lastResourceName, missionType, node, nodeEnemy, nodeMissionType, operation, operationSymbol, region, sortieBoss, sortieFaction, sortieModDesc, sortieModifier, splitResourceName, steelPath, syndicate, toTitleCase, translateArchimedeaType, translateCalendarEvent, translateFocus, translatePolarity, translateSeason, upgrade } from "./translation.mjs";
4
3
 
5
4
  //#region tools/integrity.ts
6
5
  /**