@elite-dangerous-almanac/core 0.1.8 → 0.2.1

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.
Files changed (316) hide show
  1. package/PROVENANCE/i18n/SOURCES.md +2 -2
  2. package/PROVENANCE/ships/SOURCES.md +34 -9
  3. package/README.md +54 -40
  4. package/dist/astro/galaxy-grid.js +1 -1
  5. package/dist/astro/index.d.ts +1 -1
  6. package/dist/astro/index.js +1 -1
  7. package/dist/astro/naming-region-origins.d.ts +1 -1
  8. package/dist/astro/naming-region-origins.js +1 -1
  9. package/dist/astro/nebulae.d.ts +2 -2
  10. package/dist/astro/permit-locks.d.ts +2 -1
  11. package/dist/astro/permit-locks.js +1 -1
  12. package/dist/astro/procedural-system.d.ts +2 -1
  13. package/dist/astro/procedural-system.js +1 -1
  14. package/dist/astro/sector-name.d.ts +2 -1
  15. package/dist/astro/sector-name.js +1 -1
  16. package/dist/astro/system-address.d.ts +1 -1
  17. package/dist/astro/system-name.d.ts +14 -9
  18. package/dist/astro/system-name.js +1 -1
  19. package/dist/chunk-2W5MW376.js +1 -0
  20. package/dist/chunk-2W5MW376.js.map +1 -0
  21. package/dist/chunk-37JIMWLK.js +1 -0
  22. package/dist/chunk-37JIMWLK.js.map +1 -0
  23. package/dist/chunk-4CBMQULR.js +1 -0
  24. package/dist/{chunk-4ZGUSHTP.js.map → chunk-4CBMQULR.js.map} +1 -1
  25. package/dist/{chunk-6EUVIZAS.js → chunk-4QYTVSNR.js} +1 -1
  26. package/dist/chunk-5VWACBTN.js +1 -0
  27. package/dist/chunk-5VWACBTN.js.map +1 -0
  28. package/dist/{chunk-EKQCVCMK.js → chunk-5ZVYRX6Z.js} +1 -1
  29. package/dist/{chunk-EKQCVCMK.js.map → chunk-5ZVYRX6Z.js.map} +1 -1
  30. package/dist/chunk-65FZECUX.js +1 -0
  31. package/dist/chunk-65FZECUX.js.map +1 -0
  32. package/dist/chunk-6BFQIYGZ.js +1 -0
  33. package/dist/chunk-6BFQIYGZ.js.map +1 -0
  34. package/dist/chunk-6GJHUWMO.js +1 -0
  35. package/dist/chunk-6GJHUWMO.js.map +1 -0
  36. package/dist/chunk-6HA2YIKW.js +1 -0
  37. package/dist/chunk-6HA2YIKW.js.map +1 -0
  38. package/dist/{chunk-7EE5VIHR.js → chunk-6HMIF2RJ.js} +1 -1
  39. package/dist/chunk-6S36AVA4.js +1 -0
  40. package/dist/chunk-6S36AVA4.js.map +1 -0
  41. package/dist/{chunk-WNGQ3IAM.js → chunk-6UNAD74Z.js} +1 -1
  42. package/dist/{chunk-WNGQ3IAM.js.map → chunk-6UNAD74Z.js.map} +1 -1
  43. package/dist/chunk-6WTUY6ZX.js +1 -0
  44. package/dist/chunk-6WTUY6ZX.js.map +1 -0
  45. package/dist/{chunk-JPBMRJFC.js → chunk-77I24V6B.js} +1 -1
  46. package/dist/chunk-77I24V6B.js.map +1 -0
  47. package/dist/chunk-77TT4K53.js +1 -0
  48. package/dist/chunk-7ATBEOVC.js +1 -0
  49. package/dist/chunk-7ATBEOVC.js.map +1 -0
  50. package/dist/chunk-A4QKXXZD.js +1 -0
  51. package/dist/chunk-A4QKXXZD.js.map +1 -0
  52. package/dist/{chunk-6EPYVBAX.js → chunk-A6OINYNP.js} +1 -1
  53. package/dist/chunk-AAE4KZ2V.js +1 -0
  54. package/dist/chunk-AAE4KZ2V.js.map +1 -0
  55. package/dist/{chunk-Q5XOGATC.js → chunk-AIEC3LBT.js} +1 -1
  56. package/dist/{chunk-QY3L5BKN.js → chunk-APEG4ZER.js} +1 -1
  57. package/dist/{chunk-Q3QCLNVG.js → chunk-AYAKU4YA.js} +1 -1
  58. package/dist/chunk-AYAKU4YA.js.map +1 -0
  59. package/dist/chunk-B7EYTZRK.js +1 -0
  60. package/dist/chunk-B7EYTZRK.js.map +1 -0
  61. package/dist/{chunk-EBAHNZ36.js → chunk-CIULJH3G.js} +1 -1
  62. package/dist/{chunk-EBAHNZ36.js.map → chunk-CIULJH3G.js.map} +1 -1
  63. package/dist/{chunk-SNADUQSJ.js → chunk-CJK2IBI2.js} +1 -1
  64. package/dist/{chunk-SNADUQSJ.js.map → chunk-CJK2IBI2.js.map} +1 -1
  65. package/dist/{chunk-DYPOL3CI.js → chunk-CJQ37JII.js} +1 -1
  66. package/dist/chunk-CJQ37JII.js.map +1 -0
  67. package/dist/{chunk-Z6XMXMVI.js → chunk-DBDCOHI4.js} +1 -1
  68. package/dist/chunk-DBDCOHI4.js.map +1 -0
  69. package/dist/{chunk-AFVYCQWL.js → chunk-DCB4COCL.js} +1 -1
  70. package/dist/{chunk-AFVYCQWL.js.map → chunk-DCB4COCL.js.map} +1 -1
  71. package/dist/{chunk-CJWFY6OX.js → chunk-DSMLYA2M.js} +1 -1
  72. package/dist/{chunk-CJWFY6OX.js.map → chunk-DSMLYA2M.js.map} +1 -1
  73. package/dist/{chunk-UXBCLFGU.js → chunk-DWRNXUAX.js} +1 -1
  74. package/dist/{chunk-UXBCLFGU.js.map → chunk-DWRNXUAX.js.map} +1 -1
  75. package/dist/chunk-F44QX47A.js +1 -0
  76. package/dist/chunk-F44QX47A.js.map +1 -0
  77. package/dist/{chunk-EVJ32UF3.js → chunk-FA5JVXVG.js} +1 -1
  78. package/dist/{chunk-EVJ32UF3.js.map → chunk-FA5JVXVG.js.map} +1 -1
  79. package/dist/{chunk-4S6WB7QR.js → chunk-FF2X4K5P.js} +1 -1
  80. package/dist/chunk-FF2X4K5P.js.map +1 -0
  81. package/dist/chunk-GGQMIQPC.js +1 -0
  82. package/dist/chunk-GGQMIQPC.js.map +1 -0
  83. package/dist/{chunk-QTZPA2FR.js → chunk-GLWPSVFV.js} +1 -1
  84. package/dist/chunk-GLWPSVFV.js.map +1 -0
  85. package/dist/{chunk-EYGVDJ2I.js → chunk-GMTAFUAG.js} +1 -1
  86. package/dist/{chunk-Z43DN4PY.js → chunk-GTEHRZPN.js} +1 -1
  87. package/dist/{chunk-Z43DN4PY.js.map → chunk-GTEHRZPN.js.map} +1 -1
  88. package/dist/chunk-H47K3UWG.js +1 -0
  89. package/dist/chunk-H47K3UWG.js.map +1 -0
  90. package/dist/{chunk-PA5EITW5.js → chunk-HUYYGTRM.js} +1 -1
  91. package/dist/{chunk-PA5EITW5.js.map → chunk-HUYYGTRM.js.map} +1 -1
  92. package/dist/{chunk-HKXXFIRI.js → chunk-ITKZKREP.js} +1 -1
  93. package/dist/chunk-IWFQ4ZKF.js +1 -0
  94. package/dist/chunk-IWFQ4ZKF.js.map +1 -0
  95. package/dist/{chunk-Y6UZWNP4.js → chunk-J7BM5NGK.js} +1 -1
  96. package/dist/{chunk-Y6UZWNP4.js.map → chunk-J7BM5NGK.js.map} +1 -1
  97. package/dist/chunk-JET673E5.js +1 -0
  98. package/dist/chunk-JET673E5.js.map +1 -0
  99. package/dist/chunk-JMAXSXXQ.js +1 -0
  100. package/dist/chunk-JMAXSXXQ.js.map +1 -0
  101. package/dist/chunk-JO52LYO3.js +1 -0
  102. package/dist/chunk-M2TCZKRT.js +1 -0
  103. package/dist/chunk-M2TCZKRT.js.map +1 -0
  104. package/dist/chunk-M4FZRDAH.js +1 -0
  105. package/dist/chunk-M4FZRDAH.js.map +1 -0
  106. package/dist/{chunk-JWWYAMGD.js → chunk-MGRDB2BZ.js} +1 -1
  107. package/dist/{chunk-JWWYAMGD.js.map → chunk-MGRDB2BZ.js.map} +1 -1
  108. package/dist/{chunk-MKGJPVPS.js → chunk-MRTTQYT5.js} +1 -1
  109. package/dist/{chunk-MKGJPVPS.js.map → chunk-MRTTQYT5.js.map} +1 -1
  110. package/dist/chunk-MTJ4MS7W.js +1 -0
  111. package/dist/chunk-MTJ4MS7W.js.map +1 -0
  112. package/dist/chunk-NIURLW2F.js +1 -0
  113. package/dist/chunk-NIURLW2F.js.map +1 -0
  114. package/dist/chunk-OJC6AUL7.js +1 -0
  115. package/dist/chunk-OJC6AUL7.js.map +1 -0
  116. package/dist/chunk-OLKNYGGT.js +1 -0
  117. package/dist/chunk-OLKNYGGT.js.map +1 -0
  118. package/dist/chunk-PL75RTA2.js +1 -0
  119. package/dist/{chunk-2VPVZELZ.js.map → chunk-PL75RTA2.js.map} +1 -1
  120. package/dist/chunk-Q5ALV3DI.js +1 -0
  121. package/dist/chunk-Q5ALV3DI.js.map +1 -0
  122. package/dist/{chunk-SQS7672E.js → chunk-Q6YDPREF.js} +1 -1
  123. package/dist/chunk-SG6YLUQ4.js +1 -0
  124. package/dist/chunk-SG6YLUQ4.js.map +1 -0
  125. package/dist/{chunk-OVUHQEH5.js → chunk-T4MKUKYS.js} +1 -1
  126. package/dist/{chunk-OVUHQEH5.js.map → chunk-T4MKUKYS.js.map} +1 -1
  127. package/dist/{chunk-J42ZXLBL.js → chunk-T62GO4AA.js} +1 -1
  128. package/dist/chunk-T62GO4AA.js.map +1 -0
  129. package/dist/{chunk-E3BRVGJJ.js → chunk-TBZJIQ5P.js} +1 -1
  130. package/dist/{chunk-E3BRVGJJ.js.map → chunk-TBZJIQ5P.js.map} +1 -1
  131. package/dist/chunk-VEEBJFJ7.js +1 -0
  132. package/dist/chunk-VEEBJFJ7.js.map +1 -0
  133. package/dist/{chunk-L747RVPO.js → chunk-VQJXRPYI.js} +1 -1
  134. package/dist/{chunk-L747RVPO.js.map → chunk-VQJXRPYI.js.map} +1 -1
  135. package/dist/chunk-VTMCSCXV.js +1 -0
  136. package/dist/chunk-VTMCSCXV.js.map +1 -0
  137. package/dist/chunk-XQJERZUS.js +1 -0
  138. package/dist/chunk-XQJERZUS.js.map +1 -0
  139. package/dist/commodities/commodities-all.js +1 -1
  140. package/dist/commodities/commodities-rare.js +1 -1
  141. package/dist/commodities/commodities-standard.js +1 -1
  142. package/dist/commodities/commodities.d.ts +20 -10
  143. package/dist/commodities/commodities.js +1 -1
  144. package/dist/commodities/index.d.ts +15 -4
  145. package/dist/commodities/index.js +1 -1
  146. package/dist/equipment/index.js +1 -1
  147. package/dist/equipment/modification-costs.d.ts +2 -1
  148. package/dist/equipment/modification-costs.js.map +1 -1
  149. package/dist/equipment/modification-journal.js +1 -1
  150. package/dist/equipment/modifications.d.ts +2 -1
  151. package/dist/equipment/modifications.js +1 -1
  152. package/dist/equipment/suits.d.ts +6 -3
  153. package/dist/equipment/suits.js +1 -1
  154. package/dist/equipment/upgrade-costs.d.ts +8 -4
  155. package/dist/equipment/upgrade-costs.js +1 -1
  156. package/dist/equipment/upgrade-costs.js.map +1 -1
  157. package/dist/equipment/weapons.d.ts +13 -5
  158. package/dist/equipment/weapons.js +1 -1
  159. package/dist/i18n/blueprints.d.ts +6 -6
  160. package/dist/i18n/blueprints.js +1 -1
  161. package/dist/i18n/diagnostics.d.ts +1 -13
  162. package/dist/i18n/engineering-groups.d.ts +1 -0
  163. package/dist/i18n/engineering-groups.js +1 -1
  164. package/dist/i18n/experimental-effect-descriptions.d.ts +4 -3
  165. package/dist/i18n/experimental-effect-descriptions.js +1 -1
  166. package/dist/i18n/experimental-effects.d.ts +5 -4
  167. package/dist/i18n/experimental-effects.js +1 -1
  168. package/dist/i18n/index.d.ts +1 -13
  169. package/dist/i18n/index.js +1 -1
  170. package/dist/i18n/pre-engineered.d.ts +7 -6
  171. package/dist/i18n/pre-engineered.js +1 -1
  172. package/dist/materials/index.d.ts +16 -4
  173. package/dist/materials/index.js +1 -1
  174. package/dist/materials/materials-all.js +1 -1
  175. package/dist/materials/materials-encoded.js +1 -1
  176. package/dist/materials/materials-manufactured.js +1 -1
  177. package/dist/materials/materials-raw.js +1 -1
  178. package/dist/materials/materials.d.ts +36 -19
  179. package/dist/materials/materials.js +1 -1
  180. package/dist/materials/micro-resources.d.ts +18 -7
  181. package/dist/materials/micro-resources.js +1 -1
  182. package/dist/ships/armour.d.ts +20 -4
  183. package/dist/ships/armour.js +1 -1
  184. package/dist/ships/blueprint-costs.d.ts +20 -17
  185. package/dist/ships/blueprint-costs.js +1 -1
  186. package/dist/ships/blueprint-journal.d.ts +9 -8
  187. package/dist/ships/blueprint-journal.js +1 -1
  188. package/dist/ships/blueprints.d.ts +14 -12
  189. package/dist/ships/blueprints.js +1 -1
  190. package/dist/ships/build-metrics.d.ts +1061 -0
  191. package/dist/ships/build-metrics.js +1 -0
  192. package/dist/ships/build-metrics.js.map +1 -0
  193. package/dist/ships/distributor.d.ts +10 -3
  194. package/dist/ships/distributor.js +1 -1
  195. package/dist/ships/engineering-options.d.ts +8 -6
  196. package/dist/ships/engineering-options.js +1 -1
  197. package/dist/ships/engineering.d.ts +2 -16
  198. package/dist/ships/engineering.js +1 -1
  199. package/dist/ships/experimental-effect-costs.d.ts +5 -5
  200. package/dist/ships/experimental-effect-costs.js +1 -1
  201. package/dist/ships/experimental-effects.d.ts +9 -8
  202. package/dist/ships/experimental-effects.js +1 -1
  203. package/dist/ships/heat.d.ts +7 -2
  204. package/dist/ships/heat.js +1 -1
  205. package/dist/ships/index.d.ts +35 -23
  206. package/dist/ships/index.js +1 -1
  207. package/dist/ships/jump-range.d.ts +10 -3
  208. package/dist/ships/jump-range.js +1 -1
  209. package/dist/ships/loadout-calculations.d.ts +1 -1
  210. package/dist/ships/loadout-calculations.js +1 -1
  211. package/dist/ships/loadout-validation.d.ts +111 -5
  212. package/dist/ships/loadout-validation.js +1 -1
  213. package/dist/ships/mobility-capacitor.d.ts +90 -0
  214. package/dist/ships/mobility-capacitor.js +1 -0
  215. package/dist/ships/mobility-capacitor.js.map +1 -0
  216. package/dist/ships/mobility.d.ts +29 -17
  217. package/dist/ships/mobility.js +1 -1
  218. package/dist/ships/modules-all.js +1 -1
  219. package/dist/ships/modules-core.js +1 -1
  220. package/dist/ships/modules-internal.js +1 -1
  221. package/dist/ships/modules.d.ts +21 -1
  222. package/dist/ships/modules.js +1 -1
  223. package/dist/ships/power.d.ts +12 -5
  224. package/dist/ships/power.js +1 -1
  225. package/dist/ships/pre-engineered-stats.d.ts +20 -13
  226. package/dist/ships/pre-engineered-stats.js +1 -1
  227. package/dist/ships/pre-engineered.d.ts +6 -6
  228. package/dist/ships/pre-engineered.js +1 -1
  229. package/dist/ships/resistances.d.ts +2 -2
  230. package/dist/ships/resistances.js +1 -1
  231. package/dist/ships/shield-capacitor.d.ts +133 -0
  232. package/dist/ships/shield-capacitor.js +1 -0
  233. package/dist/ships/shield-capacitor.js.map +1 -0
  234. package/dist/ships/shield-recovery.d.ts +16 -2
  235. package/dist/ships/shield-recovery.js +1 -1
  236. package/dist/ships/shields.d.ts +86 -28
  237. package/dist/ships/shields.js +1 -1
  238. package/dist/ships/ship-loadout.d.ts +176 -815
  239. package/dist/ships/ship-loadout.js +1 -1
  240. package/dist/ships/ships.d.ts +7 -6
  241. package/dist/ships/ships.js +1 -1
  242. package/dist/ships/slef.d.ts +5 -2
  243. package/dist/ships/slef.js +1 -1
  244. package/dist/ships/source-purchase.d.ts +2 -1
  245. package/dist/ships/source-purchase.js +1 -1
  246. package/dist/ships/weapons-capacitor.d.ts +10 -3
  247. package/dist/ships/weapons-capacitor.js +1 -1
  248. package/dist/ships/weapons.d.ts +22 -6
  249. package/dist/ships/weapons.js +1 -1
  250. package/dist/{system-address-DYsN1qOT.d.ts → system-address-cyJaeZIS.d.ts} +2 -1
  251. package/package.json +17 -2
  252. package/dist/chunk-2FHHMYDC.js +0 -1
  253. package/dist/chunk-2FHHMYDC.js.map +0 -1
  254. package/dist/chunk-2TW4ZBI3.js +0 -1
  255. package/dist/chunk-2TW4ZBI3.js.map +0 -1
  256. package/dist/chunk-2VPVZELZ.js +0 -1
  257. package/dist/chunk-3BM5BHI3.js +0 -1
  258. package/dist/chunk-3BM5BHI3.js.map +0 -1
  259. package/dist/chunk-4S6WB7QR.js.map +0 -1
  260. package/dist/chunk-4ZGUSHTP.js +0 -1
  261. package/dist/chunk-6BO5JJNI.js +0 -1
  262. package/dist/chunk-6BO5JJNI.js.map +0 -1
  263. package/dist/chunk-B4ZSTOM4.js +0 -1
  264. package/dist/chunk-B4ZSTOM4.js.map +0 -1
  265. package/dist/chunk-CX7B67OI.js +0 -1
  266. package/dist/chunk-CX7B67OI.js.map +0 -1
  267. package/dist/chunk-DVL5RBKX.js +0 -1
  268. package/dist/chunk-DVL5RBKX.js.map +0 -1
  269. package/dist/chunk-DYPOL3CI.js.map +0 -1
  270. package/dist/chunk-FGXWVFN6.js +0 -1
  271. package/dist/chunk-FGXWVFN6.js.map +0 -1
  272. package/dist/chunk-FMPRCYKY.js +0 -1
  273. package/dist/chunk-FMPRCYKY.js.map +0 -1
  274. package/dist/chunk-G3265B27.js +0 -1
  275. package/dist/chunk-G3265B27.js.map +0 -1
  276. package/dist/chunk-GQ5GX5TB.js +0 -1
  277. package/dist/chunk-GQ5GX5TB.js.map +0 -1
  278. package/dist/chunk-IOJXLDJN.js +0 -1
  279. package/dist/chunk-IOJXLDJN.js.map +0 -1
  280. package/dist/chunk-IYU4WLFM.js +0 -1
  281. package/dist/chunk-IYU4WLFM.js.map +0 -1
  282. package/dist/chunk-J42ZXLBL.js.map +0 -1
  283. package/dist/chunk-JPBMRJFC.js.map +0 -1
  284. package/dist/chunk-JQG4C67D.js +0 -1
  285. package/dist/chunk-LJI7VXJD.js +0 -1
  286. package/dist/chunk-LJI7VXJD.js.map +0 -1
  287. package/dist/chunk-OCND33TO.js +0 -1
  288. package/dist/chunk-OCND33TO.js.map +0 -1
  289. package/dist/chunk-P2QOL63K.js +0 -1
  290. package/dist/chunk-P2QOL63K.js.map +0 -1
  291. package/dist/chunk-Q3QCLNVG.js.map +0 -1
  292. package/dist/chunk-QTZPA2FR.js.map +0 -1
  293. package/dist/chunk-RLUS76LZ.js +0 -1
  294. package/dist/chunk-RLUS76LZ.js.map +0 -1
  295. package/dist/chunk-TEOJCBSG.js +0 -1
  296. package/dist/chunk-TEOJCBSG.js.map +0 -1
  297. package/dist/chunk-TMMGS6TC.js +0 -1
  298. package/dist/chunk-TMMGS6TC.js.map +0 -1
  299. package/dist/chunk-V4C6FIE2.js +0 -1
  300. package/dist/chunk-VZZUNSDF.js +0 -1
  301. package/dist/chunk-VZZUNSDF.js.map +0 -1
  302. package/dist/chunk-W6EPHHTS.js +0 -1
  303. package/dist/chunk-W6EPHHTS.js.map +0 -1
  304. package/dist/chunk-Z6XMXMVI.js.map +0 -1
  305. package/dist/chunk-ZNCXENNB.js +0 -1
  306. package/dist/chunk-ZNCXENNB.js.map +0 -1
  307. /package/dist/{chunk-6EUVIZAS.js.map → chunk-4QYTVSNR.js.map} +0 -0
  308. /package/dist/{chunk-7EE5VIHR.js.map → chunk-6HMIF2RJ.js.map} +0 -0
  309. /package/dist/{chunk-JQG4C67D.js.map → chunk-77TT4K53.js.map} +0 -0
  310. /package/dist/{chunk-6EPYVBAX.js.map → chunk-A6OINYNP.js.map} +0 -0
  311. /package/dist/{chunk-Q5XOGATC.js.map → chunk-AIEC3LBT.js.map} +0 -0
  312. /package/dist/{chunk-QY3L5BKN.js.map → chunk-APEG4ZER.js.map} +0 -0
  313. /package/dist/{chunk-EYGVDJ2I.js.map → chunk-GMTAFUAG.js.map} +0 -0
  314. /package/dist/{chunk-HKXXFIRI.js.map → chunk-ITKZKREP.js.map} +0 -0
  315. /package/dist/{chunk-V4C6FIE2.js.map → chunk-JO52LYO3.js.map} +0 -0
  316. /package/dist/{chunk-SQS7672E.js.map → chunk-Q6YDPREF.js.map} +0 -0
@@ -1 +1 @@
1
- import{parseSystemName,boxelCodeToLetters,formatSystemName}from"./chunk-G3265B27.js";import{isPermitLockedRegionName}from"./chunk-NLBUKXNV.js";import{findHandAuthoredRegionAt}from"./chunk-AVZI6VKA.js";import{sizeClassToMassCode}from"./chunk-POZTXBSN.js";import{getHandAuthoredRegionOrigin,resolveNamingRegionOrigin}from"./chunk-UXBCLFGU.js";import{encodeSystemAddress,decodeSystemAddress,decodeModSystemAddress,encodeModSystemAddress,absoluteBoxelToBoxelCode}from"./chunk-DI5RXSJR.js";import{toSystemAddress}from"./chunk-NEEFT7WH.js";import{sectorGridPositionFromName,sectorNameFromGridPosition}from"./chunk-DVL5RBKX.js";import{requireString,truncate}from"./chunk-PKWVG2JY.js";function tryEncodeModAddress(parts){const origin=resolveNamingRegionOrigin(parts.regionName);if(!origin)return null;try{return encodeModSystemAddress(parts,origin)}catch(error){if(error instanceof RangeError)return null;throw error}}function applyHaOverride(parts,decoded,position){if(!position)return{parts:parts,handAuthored:false,requiresPermit:false};const region=findHandAuthoredRegionAt(position);if(!region)return{parts:parts,handAuthored:false,requiresPermit:false};const origin=resolveNamingRegionOrigin(region.name);if(!origin||origin.x0<0||origin.y0<0||origin.z0<0){return{parts:parts,handAuthored:false,requiresPermit:false}}const boxelCode=absoluteBoxelToBoxelCode(decoded.sizeClass,decoded.absoluteBoxel,origin);if(boxelCode===null)return{parts:parts,handAuthored:false,requiresPermit:false};const{l1:l1,l2:l2,l3:l3,n1:n1}=boxelCodeToLetters(boxelCode);return{parts:{...parts,regionName:region.name,l1:l1,l2:l2,l3:l3,n1:n1},handAuthored:true,requiresPermit:isPermitLockedRegionName(region.name)}}var ProceduralSystem=class _ProceduralSystem{#parts;#position;#id64;#modId64;usesHandAuthoredRegion;requiresRegionPermit;constructor(parts,opts){this.#parts={...parts};this.#position=opts.position?{...opts.position}:void 0;this.#id64=opts.id64;this.#modId64=opts.modId64;this.usesHandAuthoredRegion=opts.handAuthored;this.requiresRegionPermit=opts.requiresPermit}static fromName(name){const parts=parseSystemName(requireString(name,"ProceduralSystem.fromName: name"));if(!parts)return null;const sectorPosition=sectorGridPositionFromName(parts.regionName);const namedOrigin=sectorPosition?null:getHandAuthoredRegionOrigin(parts.regionName);const named=namedOrigin!==null;const regionName=sectorPosition?sectorNameFromGridPosition(sectorPosition):namedOrigin?.name??parts.regionName;const canonicalParts={...parts,regionName:regionName};const origin=resolveNamingRegionOrigin(regionName);if(!origin)throw new RangeError(`Unknown sector: ${truncate(regionName)}`);return new _ProceduralSystem(canonicalParts,{id64:encodeSystemAddress(canonicalParts,origin),modId64:tryEncodeModAddress(canonicalParts),handAuthored:named,requiresPermit:named&&isPermitLockedRegionName(regionName)})}static fromSystemAddress(id64,position){const address=toSystemAddress(id64);return _ProceduralSystem.#fromDecoded(decodeSystemAddress(address),address,position)}static fromModSystemAddress(id64,position){const address=toSystemAddress(id64);return _ProceduralSystem.#fromDecoded(decodeModSystemAddress(address),void 0,position,address)}static#fromDecoded(decoded,id64,position,modId64){const{l1:l1,l2:l2,l3:l3,n1:n1}=boxelCodeToLetters(decoded.boxelCode);const base={regionName:sectorNameFromGridPosition(decoded.sectorGridPosition),l1:l1,l2:l2,l3:l3,massCode:decoded.sizeClass,n1:n1,n2:decoded.sequence};const overridden=applyHaOverride(base,decoded,position);const origin=resolveNamingRegionOrigin(overridden.parts.regionName);if(!origin){throw new RangeError(`Unknown sector: ${truncate(overridden.parts.regionName)}`)}const normalAddress=id64??encodeSystemAddress(overridden.parts,origin);const opts={id64:normalAddress,modId64:modId64??tryEncodeModAddress(overridden.parts),handAuthored:overridden.handAuthored,requiresPermit:overridden.requiresPermit,...position?{position:position}:{}};return new _ProceduralSystem(overridden.parts,opts)}get name(){return formatSystemName(this.#parts)}get namingRegionName(){return this.#parts.regionName}get massCode(){return sizeClassToMassCode(this.#parts.massCode)}get sequence(){return this.#parts.n2}get position(){return this.#position?{...this.#position}:null}get parts(){return{...this.#parts}}get systemAddress(){return this.#id64}get modSystemAddress(){return this.#modId64}};export{ProceduralSystem};//# sourceMappingURL=chunk-E3BRVGJJ.js.map
1
+ import{parseSystemName,boxelCodeToLetters,formatSystemName}from"./chunk-7ATBEOVC.js";import{isPermitLockedRegionName}from"./chunk-NLBUKXNV.js";import{findHandAuthoredRegionAt}from"./chunk-AVZI6VKA.js";import{sizeClassToMassCode}from"./chunk-POZTXBSN.js";import{getHandAuthoredRegionOrigin,resolveNamingRegionOrigin}from"./chunk-DWRNXUAX.js";import{encodeSystemAddress,decodeSystemAddress,decodeModSystemAddress,encodeModSystemAddress,absoluteBoxelToBoxelCode}from"./chunk-DI5RXSJR.js";import{toSystemAddress}from"./chunk-NEEFT7WH.js";import{sectorGridPositionFromName,sectorNameFromGridPosition}from"./chunk-H47K3UWG.js";import{requireString,truncate}from"./chunk-PKWVG2JY.js";function tryEncodeModAddress(parts){const origin=resolveNamingRegionOrigin(parts.regionName);if(!origin)return null;try{return encodeModSystemAddress(parts,origin)}catch(error){if(error instanceof RangeError)return null;throw error}}function applyHaOverride(parts,decoded,position){if(!position)return{parts:parts,handAuthored:false,requiresPermit:false};const region=findHandAuthoredRegionAt(position);if(!region)return{parts:parts,handAuthored:false,requiresPermit:false};const origin=resolveNamingRegionOrigin(region.name);if(!origin||origin.x0<0||origin.y0<0||origin.z0<0){return{parts:parts,handAuthored:false,requiresPermit:false}}const boxelCode=absoluteBoxelToBoxelCode(decoded.sizeClass,decoded.absoluteBoxel,origin);if(boxelCode===null)return{parts:parts,handAuthored:false,requiresPermit:false};const{l1:l1,l2:l2,l3:l3,n1:n1}=boxelCodeToLetters(boxelCode);return{parts:{...parts,regionName:region.name,l1:l1,l2:l2,l3:l3,n1:n1},handAuthored:true,requiresPermit:isPermitLockedRegionName(region.name)}}var ProceduralSystem=class _ProceduralSystem{#parts;#position;#id64;#modId64;usesHandAuthoredRegion;requiresRegionPermit;constructor(parts,opts){this.#parts={...parts};this.#position=opts.position?{...opts.position}:void 0;this.#id64=opts.id64;this.#modId64=opts.modId64;this.usesHandAuthoredRegion=opts.handAuthored;this.requiresRegionPermit=opts.requiresPermit}static fromName(name){const parts=parseSystemName(requireString(name,"ProceduralSystem.fromName: name"));if(!parts)return null;const sectorPosition=sectorGridPositionFromName(parts.regionName);const namedOrigin=sectorPosition?null:getHandAuthoredRegionOrigin(parts.regionName);const named=namedOrigin!==null;const regionName=sectorPosition?sectorNameFromGridPosition(sectorPosition):namedOrigin?.name??parts.regionName;const canonicalParts={...parts,regionName:regionName};const origin=resolveNamingRegionOrigin(regionName);if(!origin)throw new RangeError(`Unknown sector: ${truncate(regionName)}`);return new _ProceduralSystem(canonicalParts,{id64:encodeSystemAddress(canonicalParts,origin),modId64:tryEncodeModAddress(canonicalParts),handAuthored:named,requiresPermit:named&&isPermitLockedRegionName(regionName)})}static fromSystemAddress(id64,position){const address=toSystemAddress(id64);return _ProceduralSystem.#fromDecoded(decodeSystemAddress(address),address,position)}static fromModSystemAddress(id64,position){const address=toSystemAddress(id64);return _ProceduralSystem.#fromDecoded(decodeModSystemAddress(address),void 0,position,address)}static#fromDecoded(decoded,id64,position,modId64){const{l1:l1,l2:l2,l3:l3,n1:n1}=boxelCodeToLetters(decoded.boxelCode);const base={regionName:sectorNameFromGridPosition(decoded.sectorGridPosition),l1:l1,l2:l2,l3:l3,massCode:decoded.sizeClass,n1:n1,n2:decoded.sequence};const overridden=applyHaOverride(base,decoded,position);const origin=resolveNamingRegionOrigin(overridden.parts.regionName);if(!origin){throw new RangeError(`Unknown sector: ${truncate(overridden.parts.regionName)}`)}const normalAddress=id64??encodeSystemAddress(overridden.parts,origin);const opts={id64:normalAddress,modId64:modId64??tryEncodeModAddress(overridden.parts),handAuthored:overridden.handAuthored,requiresPermit:overridden.requiresPermit,...position?{position:position}:{}};return new _ProceduralSystem(overridden.parts,opts)}get name(){return formatSystemName(this.#parts)}get namingRegionName(){return this.#parts.regionName}get massCode(){return sizeClassToMassCode(this.#parts.massCode)}get sequence(){return this.#parts.n2}get position(){return this.#position?{...this.#position}:null}get parts(){return{...this.#parts}}get systemAddress(){return this.#id64}get modSystemAddress(){return this.#modId64}};export{ProceduralSystem};//# sourceMappingURL=chunk-TBZJIQ5P.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/astro/procedural-system.ts"],"names":["parseSystemName","boxelCodeToLetters","formatSystemName","isPermitLockedRegionName","findHandAuthoredRegionAt","sizeClassToMassCode","getHandAuthoredRegionOrigin","resolveNamingRegionOrigin","encodeSystemAddress","decodeSystemAddress","decodeModSystemAddress","encodeModSystemAddress","absoluteBoxelToBoxelCode","toSystemAddress","sectorGridPositionFromName","sectorNameFromGridPosition","requireString","truncate","tryEncodeModAddress","parts","origin","regionName","error","RangeError","applyHaOverride","decoded","position","handAuthored","requiresPermit","region","name","x0","y0","z0","boxelCode","sizeClass","absoluteBoxel","l1","l2","l3","n1","ProceduralSystem","_ProceduralSystem","id64","modId64","usesHandAuthoredRegion","requiresRegionPermit","constructor","opts","this","fromName","sectorPosition","namedOrigin","named","canonicalParts","fromSystemAddress","address","fromDecoded","fromModSystemAddress","base","sectorGridPosition","massCode","n2","sequence","overridden","normalAddress","namingRegionName","systemAddress","modSystemAddress"],"mappings":"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"}
1
+ {"version":3,"sources":["../src/astro/procedural-system.ts"],"names":["parseSystemName","boxelCodeToLetters","formatSystemName","isPermitLockedRegionName","findHandAuthoredRegionAt","sizeClassToMassCode","getHandAuthoredRegionOrigin","resolveNamingRegionOrigin","encodeSystemAddress","decodeSystemAddress","decodeModSystemAddress","encodeModSystemAddress","absoluteBoxelToBoxelCode","toSystemAddress","sectorGridPositionFromName","sectorNameFromGridPosition","requireString","truncate","tryEncodeModAddress","parts","origin","regionName","error","RangeError","applyHaOverride","decoded","position","handAuthored","requiresPermit","region","name","x0","y0","z0","boxelCode","sizeClass","absoluteBoxel","l1","l2","l3","n1","ProceduralSystem","_ProceduralSystem","id64","modId64","usesHandAuthoredRegion","requiresRegionPermit","constructor","opts","this","fromName","sectorPosition","namedOrigin","named","canonicalParts","fromSystemAddress","address","fromDecoded","fromModSystemAddress","base","sectorGridPosition","massCode","n2","sequence","overridden","normalAddress","namingRegionName","systemAddress","modSystemAddress"],"mappings":"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"}
@@ -0,0 +1 @@
1
+ import{resolveMobilityCurves}from"./chunk-6WTUY6ZX.js";import{requirePips}from"./chunk-65FZECUX.js";function mobilityCapacitorMetrics(input){const scope="mobilityCapacitorMetrics";const enginesPips=input.enginesPips??4;requirePips(scope,"enginesPips",enginesPips);const curves=resolveMobilityCurves(scope,input);if(!curves)return null;const pipMultiplier=enginesPips/4;const atPips=(maximum,minimum)=>minimum+(maximum-minimum)*pipMultiplier;return Object.freeze({enginesPips:enginesPips,speed:atPips(input.maximumSpeed,input.minimumSpeed)*curves.massCurveMultiplier,pitch:atPips(input.pitch,input.minPitch)*curves.rotationMassCurveMultiplier,roll:atPips(input.roll,input.minRoll)*curves.rotationMassCurveMultiplier,yaw:atPips(input.yaw,input.minYaw)*curves.rotationMassCurveMultiplier})}export{mobilityCapacitorMetrics};//# sourceMappingURL=chunk-VEEBJFJ7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ships/mobility-capacitor.ts"],"names":["resolveMobilityCurves","requirePips","mobilityCapacitorMetrics","input","scope","enginesPips","curves","pipMultiplier","atPips","maximum","minimum","Object","freeze","speed","maximumSpeed","minimumSpeed","massCurveMultiplier","pitch","minPitch","rotationMassCurveMultiplier","roll","minRoll","yaw","minYaw"],"mappings":"O,6FA8FO,SAASE,yBACZC,OAEA,MAAMC,MAAQ,2BACd,MAAMC,YAAcF,MAAME,aAAe,EAGzCJ,YAAYG,MAAO,cAAeC,aAClC,MAAMC,OAASN,sBAAsBI,MAAOD,OAC5C,IAAKG,OAAQ,OAAO,KACpB,MAAMC,cAAgBF,YAAc,EACpC,MAAMG,OAAS,CAACC,QAAiBC,UAC7BA,SAAWD,QAAUC,SAAWH,cACpC,OAAOI,OAAOC,OAAO,CACjBP,wBACAQ,MAAOL,OAAOL,MAAMW,aAAcX,MAAMY,cAAgBT,OAAOU,oBAC/DC,MAAOT,OAAOL,MAAMc,MAAOd,MAAMe,UAAYZ,OAAOa,4BACpDC,KAAMZ,OAAOL,MAAMiB,KAAMjB,MAAMkB,SAAWf,OAAOa,4BACjDG,IAAKd,OAAOL,MAAMmB,IAAKnB,MAAMoB,QAAUjB,OAAOa,6BAEtD,QAAAjB"}
@@ -1 +1 @@
1
- function buildCommodityCatalogue(records,rare){return Object.freeze(records.map(record=>Object.freeze({symbol:record.symbol,name:record.name,category:record.category,rare:rare})))}export{buildCommodityCatalogue};//# sourceMappingURL=chunk-L747RVPO.js.map
1
+ function buildCommodityCatalogue(records,rare){return Object.freeze(records.map(record=>Object.freeze({symbol:record.symbol,name:record.name,category:record.category,rare:rare})))}export{buildCommodityCatalogue};//# sourceMappingURL=chunk-VQJXRPYI.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/commodities/internal/commodity-catalogue.ts"],"names":["buildCommodityCatalogue","records","rare","Object","freeze","map","record","symbol","name","category"],"mappings":"AAYO,SAASA,wBACZC,QACAC,MAEA,OAAOC,OAAOC,OACVH,QAAQI,IAAKC,QACTH,OAAOC,OAAO,CACVG,OAAQD,OAAOC,OACfC,KAAMF,OAAOE,KACbC,SAAUH,OAAOG,SACjBP,aAIhB,QAAAF"}
1
+ {"version":3,"sources":["../src/commodities/internal/commodity-catalogue.ts"],"names":["buildCommodityCatalogue","records","rare","Object","freeze","map","record","symbol","name","category"],"mappings":"AAQO,SAASA,wBACZC,QACAC,MAKA,OAAOC,OAAOC,OACVH,QAAQI,IAAKC,QACTH,OAAOC,OAAO,CACVG,OAAQD,OAAOC,OACfC,KAAMF,OAAOE,KACbC,SAAUH,OAAOG,SACjBP,aAIhB,QAAAF"}
@@ -0,0 +1 @@
1
+ import{requireFiniteNonNegative}from"./chunk-65FZECUX.js";var MAX_TOTAL_RANGE_JUMPS=1e5;function requirePositive(scope,name,value){if(!Number.isFinite(value)||value<=0){throw new RangeError(`${scope}: fsd.${name} must be a finite positive number`)}}function validateFsd(scope,fsd){requirePositive(scope,"optMass",fsd.optMass);requireFiniteNonNegative(scope,"fsd.maxFuel",fsd.maxFuel);requirePositive(scope,"fuelMul",fsd.fuelMul);requirePositive(scope,"fuelPower",fsd.fuelPower);if(fsd.jumpBoost!==void 0){requireFiniteNonNegative(scope,"fsd.jumpBoost",fsd.jumpBoost)}}function frameShiftDriveMassFactorUnchecked(mass,fuel,fsd){return fsd.optMass/(mass+fuel)}function singleJumpRangeUnchecked(mass,fuel,fsd,scope){const burn=Math.min(fuel,fsd.maxFuel);if(burn<=0||mass+fuel<=0)return 0;const base=Math.pow(burn/fsd.fuelMul,1/fsd.fuelPower)*frameShiftDriveMassFactorUnchecked(mass,fuel,fsd);const range=base+(fsd.jumpBoost??0);if(!Number.isFinite(range)){throw new RangeError(`${scope}: parameters produce a non-finite range`)}return range}function frameShiftDriveMassFactor(mass,fuel,fsd){const scope="frameShiftDriveMassFactor";requireFiniteNonNegative(scope,"mass",mass);requireFiniteNonNegative(scope,"fuel",fuel);requirePositive(scope,"optMass",fsd.optMass);if(mass+fuel<=0){throw new RangeError(`${scope}: mass plus fuel must be positive`)}return frameShiftDriveMassFactorUnchecked(mass,fuel,fsd)}function singleJumpRange(mass,fuel,fsd){const scope="singleJumpRange";requireFiniteNonNegative(scope,"mass",mass);requireFiniteNonNegative(scope,"fuel",fuel);validateFsd(scope,fsd);return singleJumpRangeUnchecked(mass,fuel,fsd,scope)}function fuelPerJump(distance,mass,fuel,fsd){const scope="fuelPerJump";requireFiniteNonNegative(scope,"distance",distance);requireFiniteNonNegative(scope,"mass",mass);requireFiniteNonNegative(scope,"fuel",fuel);validateFsd(scope,fsd);if(distance<=0)return 0;const burn=Math.min(fuel,fsd.maxFuel);const maxDistance=singleJumpRangeUnchecked(mass,fuel,fsd,scope);if(maxDistance<=0)return 0;const cost=Math.pow(distance/maxDistance,fsd.fuelPower)*burn;return Math.min(cost,burn)}function totalRange(mass,fuel,fsd){const scope="totalRange";requireFiniteNonNegative(scope,"mass",mass);requireFiniteNonNegative(scope,"fuel",fuel);validateFsd(scope,fsd);if(fsd.maxFuel<=0)return Object.freeze({range:0,jumps:0});const jumps=fuel>0?Math.max(1,Math.ceil(fuel/fsd.maxFuel)):0;if(!Number.isFinite(jumps)||jumps>MAX_TOTAL_RANGE_JUMPS){throw new RangeError(`${scope}: fuel and fsd.maxFuel require more than ${MAX_TOTAL_RANGE_JUMPS} jumps`)}let range=0;let remaining=fuel;for(let i=0;i<jumps;i++){range+=singleJumpRangeUnchecked(mass,remaining,fsd,scope);if(!Number.isFinite(range)){throw new RangeError(`${scope}: parameters produce a non-finite total range`)}remaining=Math.max(0,remaining-fsd.maxFuel)}return Object.freeze({range:range,jumps:jumps})}export{frameShiftDriveMassFactor,fuelPerJump,singleJumpRange,totalRange};//# sourceMappingURL=chunk-VTMCSCXV.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ships/jump-range.ts"],"names":["requireFiniteNonNegative","MAX_TOTAL_RANGE_JUMPS","requirePositive","scope","name","value","Number","isFinite","RangeError","validateFsd","fsd","optMass","maxFuel","fuelMul","fuelPower","jumpBoost","frameShiftDriveMassFactorUnchecked","mass","fuel","singleJumpRangeUnchecked","burn","Math","min","base","pow","range","frameShiftDriveMassFactor","singleJumpRange","fuelPerJump","distance","maxDistance","cost","totalRange","Object","freeze","jumps","max","ceil","remaining","i"],"mappings":"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"}
@@ -0,0 +1 @@
1
+ import{capacitorRechargeAtPips}from"./chunk-JOTAOI5T.js";import{systemsResistance,mapDamageTypes,effectiveHitPoints}from"./chunk-F44QX47A.js";import{requirePips,requireFiniteNonNegative}from"./chunk-65FZECUX.js";var DAMAGE_TYPES=["kinetic","thermal","explosive","caustic"];function shieldCapacitorMetrics(input){const scope="shieldCapacitorMetrics";const systemsPips=input.systemsPips??4;requirePips(scope,"systemsPips",systemsPips);for(const field of["strength","systemsCapacity","systemsRecharge"]){requireFiniteNonNegative(scope,field,input[field])}const resistances=input.resistances;if(typeof resistances!=="object"||resistances===null){throw new TypeError(`${scope}: resistances must carry the four damage types`)}for(const type of DAMAGE_TYPES){if(!Number.isFinite(input.resistances[type])){throw new RangeError(`${scope}: resistances.${type} must be a finite number`)}}const sysResistance=systemsResistance(systemsPips);const effectiveResistances=Object.freeze(mapDamageTypes(type=>1-(1-input.resistances[type])*(1-sysResistance)));return Object.freeze({systemsPips:systemsPips,capacity:input.systemsCapacity,rechargeRate:capacitorRechargeAtPips(input.systemsRecharge,systemsPips),systemsResistance:sysResistance,effectiveResistances:effectiveResistances,effectiveHitPoints:Object.freeze(effectiveHitPoints(input.strength,effectiveResistances))})}export{shieldCapacitorMetrics};//# sourceMappingURL=chunk-XQJERZUS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ships/shield-capacitor.ts"],"names":["capacitorRechargeAtPips","systemsResistance","mapDamageTypes","effectiveHitPoints","requirePips","requireFiniteNonNegative","DAMAGE_TYPES","shieldCapacitorMetrics","input","scope","systemsPips","field","resistances","TypeError","type","Number","isFinite","RangeError","sysResistance","effectiveResistances","Object","freeze","capacity","systemsCapacity","rechargeRate","systemsRecharge","strength"],"mappings":"O,6MAwGA,IAAMM,aAAsC,CAAC,UAAW,UAAW,YAAa,WAuCzE,SAASC,uBAAuBC,OACnC,MAAMC,MAAQ,yBACd,MAAMC,YAAcF,MAAME,aAAe,EAGzCN,YAAYK,MAAO,cAAeC,aAClC,IAAA,MAAWC,QAAS,CAAC,WAAY,kBAAmB,mBAA6B,CAC7EN,yBAAyBI,MAAOE,MAAOH,MAAMG,OACjD,CACA,MAAMC,YAAuBJ,MAAMI,YACnC,UAAWA,cAAgB,UAAYA,cAAgB,KAAM,CACzD,MAAM,IAAIC,UAAU,GAAGJ,sDAC3B,CACA,IAAA,MAAWK,QAAQR,aAAc,CAC7B,IAAKS,OAAOC,SAASR,MAAMI,YAAYE,OAAQ,CAC3C,MAAM,IAAIG,WAAW,GAAGR,sBAAsBK,+BAClD,CACJ,CAEA,MAAMI,cAAgBjB,kBAAkBS,aAExC,MAAMS,qBAA0CC,OAAOC,OACnDnB,eAAgBY,MAAS,GAAK,EAAIN,MAAMI,YAAYE,QAAU,EAAII,iBAEtE,OAAOE,OAAOC,OAAO,CACjBX,wBACAY,SAAUd,MAAMe,gBAChBC,aAAcxB,wBAAwBQ,MAAMiB,gBAAiBf,aAC7DT,kBAAmBiB,cACnBC,0CACAhB,mBAAoBiB,OAAOC,OAAOlB,mBAAmBK,MAAMkB,SAAUP,wBAE7E,QAAAZ"}
@@ -1 +1 @@
1
- export{ALL_COMMODITIES}from"../chunk-JQG4C67D.js"; //# sourceMappingURL=commodities-all.js.map
1
+ export{ALL_COMMODITIES}from"../chunk-77TT4K53.js"; //# sourceMappingURL=commodities-all.js.map
@@ -1 +1 @@
1
- export{RARE_COMMODITIES}from"../chunk-EYGVDJ2I.js"; //# sourceMappingURL=commodities-rare.js.map
1
+ export{RARE_COMMODITIES}from"../chunk-GMTAFUAG.js"; //# sourceMappingURL=commodities-rare.js.map
@@ -1 +1 @@
1
- export{COMMODITIES}from"../chunk-7EE5VIHR.js"; //# sourceMappingURL=commodities-standard.js.map
1
+ export{COMMODITIES}from"../chunk-6HMIF2RJ.js"; //# sourceMappingURL=commodities-standard.js.map
@@ -15,8 +15,8 @@
15
15
  * getCommodityByName('lavian brandy')?.rare; // -> true
16
16
  * ```
17
17
  *
18
- * Each lookup takes an optional second argument to **narrow** the search to a
19
- * subset — one registry's catalogue, or any array you have filtered yourself:
18
+ * The two **by-key** lookups take an optional second argument to **narrow** the search
19
+ * to a subset — one registry's catalogue, or any array you have filtered yourself:
20
20
  *
21
21
  * | Module | Export | Entries |
22
22
  * | --- | --- | --- |
@@ -25,9 +25,18 @@
25
25
  * | `./commodities-all` | `ALL_COMMODITIES` | 399 (the default) |
26
26
  *
27
27
  * It narrows *results*, not bundle size: importing a lookup pulls both catalogues,
28
- * since that is what it falls back to — 29.5 KiB minified for all 399. Every record
28
+ * since that is what it falls back to — 29.6 KiB minified for all 399. Every record
29
29
  * carries a {@link Commodity.rare} flag, so a subset is one `.filter()` away.
30
30
  *
31
+ * **Only `ALL_COMMODITIES` itself is indexed.** A by-key lookup answers from an O(1)
32
+ * index when the catalogue you pass *is* `ALL_COMMODITIES` — the same object, not a
33
+ * copy — and scans linearly otherwise, including for `[...ALL_COMMODITIES]`, which
34
+ * holds the same 399 records. Omitting the argument always takes the indexed path, so
35
+ * pass one only when you mean to exclude the other registry.
36
+ *
37
+ * {@link commoditiesInCategory} takes no catalogue: it returns an array, so narrowing
38
+ * it is `.filter()` on the result — `rare` tells the two registries apart.
39
+ *
31
40
  * @example
32
41
  * ```ts
33
42
  * import { getCommodityBySymbol } from '@elite-dangerous-almanac/core/commodities';
@@ -88,7 +97,10 @@ interface Commodity {
88
97
  * market/journal reports (`"platinum"`). Leading/trailing whitespace is ignored.
89
98
  * @param commodities - Optional subset to search instead of all 399 commodities —
90
99
  * `COMMODITIES` (standard only), `RARE_COMMODITIES`, or any array you have filtered
91
- * yourself. Omit it unless you specifically want to exclude the other registry.
100
+ * yourself. Omit it unless you specifically want to exclude the other registry: the
101
+ * indexed O(1) path is taken only when the argument is omitted or is `ALL_COMMODITIES`
102
+ * **by reference**, and every other array — a copy of that same catalogue included —
103
+ * is scanned.
92
104
  * @returns The matching {@link Commodity}, or `null` if no commodity has that symbol.
93
105
  * @throws {TypeError} If `symbol` is present and not a string. A nullish
94
106
  * `symbol` is a miss, answered the way an unrecognised one is.
@@ -124,19 +136,17 @@ declare function getCommodityByName(name: string, commodities?: readonly Commodi
124
136
  * whitespace and case are ignored, like every other lookup here, so a group name
125
137
  * that arrived from a market payload or a user's dropdown resolves without
126
138
  * re-casing it first.
127
- * @param commodities - Optional subset to search (see {@link getCommodityBySymbol}).
128
- * @returns A new array of matches (possibly empty). The input is not modified.
139
+ * @returns A new array of matches (possibly empty).
129
140
  * @throws {TypeError} If `category` is present and not a string. A nullish
130
141
  * `category` is a miss, answered the way an unrecognised one is.
131
142
  * @example
132
143
  * ```ts
133
144
  * import { commoditiesInCategory } from '@elite-dangerous-almanac/core/commodities/commodities';
134
- * import { COMMODITIES } from '@elite-dangerous-almanac/core/commodities/commodities-standard';
135
145
  *
136
- * commoditiesInCategory('Metals').length; // -> every metal, standard and rare
137
- * commoditiesInCategory('metals', COMMODITIES).length; // -> the standard ones only
146
+ * commoditiesInCategory('Metals').length; // -> every metal, standard and rare
147
+ * commoditiesInCategory('metals').filter((c) => !c.rare).length; // -> the standard ones only
138
148
  * ```
139
149
  */
140
- declare function commoditiesInCategory(category: string, commodities?: readonly Commodity[]): Commodity[];
150
+ declare function commoditiesInCategory(category: string): Commodity[];
141
151
 
142
152
  export { type Commodity, type CommodityCategory, commoditiesInCategory, getCommodityByName, getCommodityBySymbol };
@@ -1 +1 @@
1
- export{commoditiesInCategory,getCommodityByName,getCommodityBySymbol}from"../chunk-Y6UZWNP4.js"; //# sourceMappingURL=commodities.js.map
1
+ export{commoditiesInCategory,getCommodityByName,getCommodityBySymbol}from"../chunk-J7BM5NGK.js"; //# sourceMappingURL=commodities.js.map
@@ -12,14 +12,25 @@
12
12
  * commoditiesInCategory('Metals').length; // -> every metal, standard and rare
13
13
  * ```
14
14
  *
15
- * Every lookup also takes an optional trailing argument to **narrow** the search to
16
- * one registry, or to an array you have filtered yourself:
15
+ * The by-key lookups also take an optional trailing argument to **narrow** the search
16
+ * to one registry, or to an array you have filtered yourself. It must be one of the
17
+ * exported catalogues *by reference*; `ALL_COMMODITIES` (or omitting it) is the one
18
+ * that answers from an index rather than a scan:
17
19
  *
18
20
  * ```ts
19
- * import { commoditiesInCategory } from '@elite-dangerous-almanac/core/commodities';
21
+ * import { getCommodityByName } from '@elite-dangerous-almanac/core/commodities';
20
22
  * import { COMMODITIES } from '@elite-dangerous-almanac/core/commodities/commodities-standard';
21
23
  *
22
- * commoditiesInCategory('Metals', COMMODITIES).length; // -> the standard ones only
24
+ * getCommodityByName('lavian brandy', COMMODITIES); // -> null; it is a rare
25
+ * ```
26
+ *
27
+ * A lookup that returns an array takes no catalogue — narrow its result with
28
+ * `.filter()`:
29
+ *
30
+ * ```ts
31
+ * import { commoditiesInCategory } from '@elite-dangerous-almanac/core/commodities';
32
+ *
33
+ * commoditiesInCategory('Metals').filter((c) => !c.rare).length; // -> the standard ones only
23
34
  * ```
24
35
  *
25
36
  * @packageDocumentation
@@ -1 +1 @@
1
- export{commoditiesInCategory,getCommodityByName,getCommodityBySymbol}from"../chunk-Y6UZWNP4.js";export{ALL_COMMODITIES}from"../chunk-JQG4C67D.js";export{RARE_COMMODITIES}from"../chunk-EYGVDJ2I.js";export{COMMODITIES}from"../chunk-7EE5VIHR.js"; //# sourceMappingURL=index.js.map
1
+ export{commoditiesInCategory,getCommodityByName,getCommodityBySymbol}from"../chunk-J7BM5NGK.js";export{ALL_COMMODITIES}from"../chunk-77TT4K53.js";export{RARE_COMMODITIES}from"../chunk-GMTAFUAG.js";export{COMMODITIES}from"../chunk-6HMIF2RJ.js"; //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- export{resolvePersonalModificationForWeapon}from"../chunk-6EPYVBAX.js";export{PERSONAL_MODIFICATIONS,getPersonalModification}from"../chunk-JWWYAMGD.js";export{sumPersonalEngineeringIngredients}from"../chunk-C5HG4GJI.js";export{PERSONAL_WEAPONS,getPersonalWeaponByName,getPersonalWeaponBySymbol,getPersonalWeaponGrade}from"../chunk-OCND33TO.js";export{SUITS,getSuitByFamily,getSuitByName,getSuitBySymbol,getSuitGrade}from"../chunk-TMMGS6TC.js"; //# sourceMappingURL=index.js.map
1
+ export{resolvePersonalModificationForWeapon}from"../chunk-A6OINYNP.js";export{PERSONAL_MODIFICATIONS,getPersonalModification}from"../chunk-MGRDB2BZ.js";export{sumPersonalEngineeringIngredients}from"../chunk-C5HG4GJI.js";export{PERSONAL_WEAPONS,getPersonalWeaponByName,getPersonalWeaponBySymbol,getPersonalWeaponGrade}from"../chunk-6GJHUWMO.js";export{SUITS,getSuitByFamily,getSuitByName,getSuitBySymbol,getSuitGrade}from"../chunk-B7EYTZRK.js"; //# sourceMappingURL=index.js.map
@@ -29,7 +29,8 @@ declare const PERSONAL_MODIFICATION_COSTS: Readonly<Record<string, readonly Pers
29
29
  * Look up a personal modification's one-application material cost.
30
30
  *
31
31
  * @param symbol - Recipe symbol, such as `"suit_nightvision"` or
32
- * `"weapon_range_kinetic"`, matched case-insensitively.
32
+ * `"weapon_range_kinetic"`, matched case-insensitively after trimming surrounding
33
+ * whitespace.
33
34
  * @returns The frozen ingredient list, or `null` when unknown.
34
35
  * @throws {TypeError} If `symbol` is present and not a string. A nullish symbol is a
35
36
  * miss, answered like an unrecognised one.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/equipment/modification-costs.ts"],"names":["findByRawKey","deepFreeze","modification_costs_default","symbol","PERSONAL_MODIFICATION_COSTS","getPersonalModificationCost"],"mappings":"O,o2LA6BO,IAAMI,4BAETH,WAAWC,4BAgBR,SAASG,4BACZF,QAEA,OAAOH,aAAaI,4BAA6BD,OAAQ,sCAC7D,QAAAC,4BAAAC"}
1
+ {"version":3,"sources":["../../src/equipment/modification-costs.ts"],"names":["findByRawKey","deepFreeze","modification_costs_default","symbol","PERSONAL_MODIFICATION_COSTS","getPersonalModificationCost"],"mappings":"O,o2LA6BO,IAAMI,4BAETH,WAAWC,4BAiBR,SAASG,4BACZF,QAEA,OAAOH,aAAaI,4BAA6BD,OAAQ,sCAC7D,QAAAC,4BAAAC"}
@@ -1 +1 @@
1
- export{resolvePersonalModificationForWeapon}from"../chunk-6EPYVBAX.js"; //# sourceMappingURL=modification-journal.js.map
1
+ export{resolvePersonalModificationForWeapon}from"../chunk-A6OINYNP.js"; //# sourceMappingURL=modification-journal.js.map
@@ -44,7 +44,8 @@ declare const PERSONAL_MODIFICATIONS: Readonly<Record<string, PersonalModificati
44
44
  * Look up a personal-equipment modification by recipe symbol, case-insensitively.
45
45
  *
46
46
  * @param symbol - Recipe symbol such as `"suit_nightvision"` or
47
- * `"weapon_range_kinetic"`.
47
+ * `"weapon_range_kinetic"`, matched case-insensitively after trimming surrounding
48
+ * whitespace.
48
49
  * @returns The frozen modification record, or `null` when unknown.
49
50
  * @throws {TypeError} If `symbol` is present and not a string. A nullish symbol is a
50
51
  * miss, answered like an unrecognised one.
@@ -1 +1 @@
1
- export{PERSONAL_MODIFICATIONS,getPersonalModification}from"../chunk-JWWYAMGD.js"; //# sourceMappingURL=modifications.js.map
1
+ export{PERSONAL_MODIFICATIONS,getPersonalModification}from"../chunk-MGRDB2BZ.js"; //# sourceMappingURL=modifications.js.map
@@ -50,7 +50,8 @@ declare const SUITS: readonly Suit[];
50
50
  /**
51
51
  * Look up a suit model by its grade-independent family, case-insensitively.
52
52
  *
53
- * @param family - Family such as `"utilitysuit"`.
53
+ * @param family - Family such as `"utilitysuit"`, matched case-insensitively after
54
+ * trimming surrounding whitespace.
54
55
  * @returns The frozen suit record, or `null` when unknown.
55
56
  * @throws {TypeError} If `family` is present and not a string. A nullish family is a
56
57
  * miss, answered like an unrecognised one.
@@ -64,7 +65,8 @@ declare function getSuitByFamily(family: string): Suit | null;
64
65
  /**
65
66
  * Look up a suit by its display name, case-insensitively.
66
67
  *
67
- * @param name - Display name such as `"Maverick Suit"`.
68
+ * @param name - Display name such as `"Maverick Suit"`, matched case-insensitively
69
+ * after trimming surrounding whitespace.
68
70
  * @returns The frozen suit record, or `null` when unknown.
69
71
  * @throws {TypeError} If `name` is present and not a string. A nullish name is a miss,
70
72
  * answered like an unrecognised one.
@@ -78,7 +80,8 @@ declare function getSuitByName(name: string): Suit | null;
78
80
  /**
79
81
  * Resolve the grade-specific Frontier item symbol reported by journal suit events.
80
82
  *
81
- * @param symbol - Item symbol such as `"utilitysuit_class3"`.
83
+ * @param symbol - Item symbol such as `"utilitysuit_class3"`, matched
84
+ * case-insensitively after trimming surrounding whitespace.
82
85
  * @returns The owning suit and its numeric grade, or `null` when unknown.
83
86
  * @throws {TypeError} If `symbol` is present and not a string. A nullish symbol is a
84
87
  * miss, answered like an unrecognised one.
@@ -1 +1 @@
1
- export{SUITS,getSuitByFamily,getSuitByName,getSuitBySymbol,getSuitGrade}from"../chunk-TMMGS6TC.js"; //# sourceMappingURL=suits.js.map
1
+ export{SUITS,getSuitByFamily,getSuitByName,getSuitBySymbol,getSuitGrade}from"../chunk-B7EYTZRK.js"; //# sourceMappingURL=suits.js.map
@@ -67,7 +67,8 @@ declare const PERSONAL_UPGRADE_COSTS: PersonalUpgradeCosts;
67
67
  /**
68
68
  * Get the one-step cost of upgrading a suit to a target grade.
69
69
  *
70
- * @param family - Grade-independent suit family, e.g. `"utilitysuit"`.
70
+ * @param family - Grade-independent suit family, e.g. `"utilitysuit"`, matched
71
+ * case-insensitively after trimming surrounding whitespace.
71
72
  * @param targetGrade - Grade being reached, integer `2`–`5`.
72
73
  * @returns The frozen ingredient list, or `null` for an unknown/non-upgradeable suit.
73
74
  * @throws {TypeError} If `family` is present and not a string. A nullish family is a
@@ -83,7 +84,8 @@ declare function getSuitUpgradeStepCost(family: string, targetGrade: number): re
83
84
  /**
84
85
  * Total the suit upgrade steps above `currentGrade` through `targetGrade`.
85
86
  *
86
- * @param family - Grade-independent suit family.
87
+ * @param family - Grade-independent suit family, matched case-insensitively after
88
+ * trimming surrounding whitespace.
87
89
  * @param targetGrade - Desired grade, integer `1`–`5`.
88
90
  * @param currentGrade - Current grade, integer `1`–`5`; defaults to `1`.
89
91
  * @returns A summed shopping list, `[]` when no climb remains, or `null` for an
@@ -101,7 +103,8 @@ declare function getSuitUpgradeCost(family: string, targetGrade: number, current
101
103
  /**
102
104
  * Get the one-step cost of upgrading a handheld weapon to a target grade.
103
105
  *
104
- * @param symbol - Frontier handheld-weapon journal symbol.
106
+ * @param symbol - Frontier handheld-weapon journal symbol, matched
107
+ * case-insensitively after trimming surrounding whitespace.
105
108
  * @param targetGrade - Grade being reached, integer `2`–`5`.
106
109
  * @returns The frozen ingredient list, or `null` for an unknown weapon.
107
110
  * @throws {TypeError} If `symbol` is present and not a string. A nullish symbol is a
@@ -117,7 +120,8 @@ declare function getPersonalWeaponUpgradeStepCost(symbol: string, targetGrade: n
117
120
  /**
118
121
  * Total the weapon upgrade steps above `currentGrade` through `targetGrade`.
119
122
  *
120
- * @param symbol - Frontier handheld-weapon journal symbol.
123
+ * @param symbol - Frontier handheld-weapon journal symbol, matched
124
+ * case-insensitively after trimming surrounding whitespace.
121
125
  * @param targetGrade - Desired grade, integer `1`–`5`.
122
126
  * @param currentGrade - Current grade, integer `1`–`5`; defaults to `1`.
123
127
  * @returns A summed shopping list, `[]` when no climb remains, or `null` for an unknown
@@ -1 +1 @@
1
- import{sumPersonalEngineeringIngredients}from"../chunk-C5HG4GJI.js";import{getPersonalWeaponBySymbol}from"../chunk-OCND33TO.js";import{getSuitByFamily}from"../chunk-TMMGS6TC.js"; import{deepFreeze}from"../chunk-DURKO7JU.js";var upgrade_costs_default={suits:{utilitysuit:{2:[{symbol:"suitschematic",count:1},{symbol:"healthmonitor",count:1},{symbol:"manufacturinginstructions",count:1},{symbol:"carbonfibreplating",count:2},{symbol:"graphene",count:2}],3:[{symbol:"suitschematic",count:2},{symbol:"healthmonitor",count:2},{symbol:"manufacturinginstructions",count:2},{symbol:"carbonfibreplating",count:5},{symbol:"graphene",count:5}],4:[{symbol:"suitschematic",count:4},{symbol:"healthmonitor",count:4},{symbol:"manufacturinginstructions",count:4},{symbol:"carbonfibreplating",count:9},{symbol:"graphene",count:9}],5:[{symbol:"suitschematic",count:5},{symbol:"healthmonitor",count:5},{symbol:"manufacturinginstructions",count:5},{symbol:"carbonfibreplating",count:12},{symbol:"graphene",count:12}]},tacticalsuit:{2:[{symbol:"suitschematic",count:1},{symbol:"healthmonitor",count:1},{symbol:"manufacturinginstructions",count:1},{symbol:"titaniumplating",count:2},{symbol:"graphene",count:2}],3:[{symbol:"suitschematic",count:2},{symbol:"healthmonitor",count:2},{symbol:"manufacturinginstructions",count:2},{symbol:"titaniumplating",count:5},{symbol:"graphene",count:5}],4:[{symbol:"suitschematic",count:4},{symbol:"healthmonitor",count:4},{symbol:"manufacturinginstructions",count:4},{symbol:"titaniumplating",count:9},{symbol:"graphene",count:9}],5:[{symbol:"suitschematic",count:5},{symbol:"healthmonitor",count:5},{symbol:"manufacturinginstructions",count:5},{symbol:"titaniumplating",count:12},{symbol:"graphene",count:12}]},explorationsuit:{2:[{symbol:"suitschematic",count:1},{symbol:"healthmonitor",count:1},{symbol:"manufacturinginstructions",count:1},{symbol:"aerogel",count:2},{symbol:"graphene",count:2}],3:[{symbol:"suitschematic",count:2},{symbol:"healthmonitor",count:2},{symbol:"manufacturinginstructions",count:2},{symbol:"aerogel",count:5},{symbol:"graphene",count:5}],4:[{symbol:"suitschematic",count:4},{symbol:"healthmonitor",count:4},{symbol:"manufacturinginstructions",count:4},{symbol:"aerogel",count:9},{symbol:"graphene",count:9}],5:[{symbol:"suitschematic",count:5},{symbol:"healthmonitor",count:5},{symbol:"manufacturinginstructions",count:5},{symbol:"aerogel",count:12},{symbol:"graphene",count:12}]}},weaponGroups:{takada:{2:[{symbol:"weaponschematic",count:1},{symbol:"ionisedgas",count:1},{symbol:"manufacturinginstructions",count:1},{symbol:"microelectrode",count:2},{symbol:"opticalfibre",count:2}],3:[{symbol:"weaponschematic",count:2},{symbol:"ionisedgas",count:2},{symbol:"manufacturinginstructions",count:2},{symbol:"microelectrode",count:5},{symbol:"opticalfibre",count:5}],4:[{symbol:"weaponschematic",count:4},{symbol:"ionisedgas",count:4},{symbol:"manufacturinginstructions",count:4},{symbol:"microelectrode",count:9},{symbol:"opticalfibre",count:9}],5:[{symbol:"weaponschematic",count:5},{symbol:"ionisedgas",count:5},{symbol:"manufacturinginstructions",count:5},{symbol:"microelectrode",count:12},{symbol:"opticalfibre",count:12}]},manticore:{2:[{symbol:"weaponschematic",count:1},{symbol:"ionisedgas",count:1},{symbol:"manufacturinginstructions",count:1},{symbol:"microelectrode",count:2},{symbol:"chemicalsuperbase",count:2}],3:[{symbol:"weaponschematic",count:2},{symbol:"ionisedgas",count:2},{symbol:"manufacturinginstructions",count:2},{symbol:"microelectrode",count:5},{symbol:"chemicalsuperbase",count:5}],4:[{symbol:"weaponschematic",count:4},{symbol:"ionisedgas",count:4},{symbol:"manufacturinginstructions",count:4},{symbol:"microelectrode",count:9},{symbol:"chemicalsuperbase",count:9}],5:[{symbol:"weaponschematic",count:5},{symbol:"ionisedgas",count:5},{symbol:"manufacturinginstructions",count:5},{symbol:"microelectrode",count:12},{symbol:"chemicalsuperbase",count:12}]},karma:{2:[{symbol:"weaponschematic",count:1},{symbol:"compressionliquefiedgas",count:1},{symbol:"manufacturinginstructions",count:1},{symbol:"weaponcomponent",count:2},{symbol:"tungstencarbide",count:2}],3:[{symbol:"weaponschematic",count:2},{symbol:"compressionliquefiedgas",count:2},{symbol:"manufacturinginstructions",count:2},{symbol:"weaponcomponent",count:5},{symbol:"tungstencarbide",count:5}],4:[{symbol:"weaponschematic",count:4},{symbol:"compressionliquefiedgas",count:4},{symbol:"manufacturinginstructions",count:4},{symbol:"weaponcomponent",count:9},{symbol:"tungstencarbide",count:9}],5:[{symbol:"weaponschematic",count:5},{symbol:"compressionliquefiedgas",count:5},{symbol:"manufacturinginstructions",count:5},{symbol:"weaponcomponent",count:12},{symbol:"tungstencarbide",count:12}]}}};var PERSONAL_UPGRADE_COSTS=deepFreeze(upgrade_costs_default);function getSuitUpgradeStepCost(family,targetGrade){assertTargetGrade(targetGrade,"getSuitUpgradeStepCost");const costs=getSuitUpgradeCosts(family);return costs?.[String(targetGrade)]??null}function getSuitUpgradeCost(family,targetGrade,currentGrade=1){assertGrade(targetGrade,"getSuitUpgradeCost: targetGrade");assertGrade(currentGrade,"getSuitUpgradeCost: currentGrade");const costs=getSuitUpgradeCosts(family);if(!costs)return null;return totalCosts(costs,targetGrade,currentGrade)}function getPersonalWeaponUpgradeStepCost(symbol,targetGrade){assertTargetGrade(targetGrade,"getPersonalWeaponUpgradeStepCost");const weapon=getPersonalWeaponBySymbol(symbol);if(!weapon)return null;return PERSONAL_UPGRADE_COSTS.weaponGroups[weapon.upgradeGroup][String(targetGrade)]??null}function getPersonalWeaponUpgradeCost(symbol,targetGrade,currentGrade=1){assertGrade(targetGrade,"getPersonalWeaponUpgradeCost: targetGrade");assertGrade(currentGrade,"getPersonalWeaponUpgradeCost: currentGrade");const weapon=getPersonalWeaponBySymbol(symbol);if(!weapon)return null;return totalCosts(PERSONAL_UPGRADE_COSTS.weaponGroups[weapon.upgradeGroup],targetGrade,currentGrade)}function totalCosts(costs,targetGrade,currentGrade){const steps=[];for(let grade=currentGrade+1;grade<=targetGrade;grade++){steps.push(costs[String(grade)])}return sumPersonalEngineeringIngredients(...steps)}function getSuitUpgradeCosts(family){const suit=getSuitByFamily(family);if(!suit||!Object.hasOwn(PERSONAL_UPGRADE_COSTS.suits,suit.family))return null;return PERSONAL_UPGRADE_COSTS.suits[suit.family]}function assertTargetGrade(grade,functionName){if(!Number.isInteger(grade)||grade<2||grade>5){throw new RangeError(`${functionName}: targetGrade must be an integer in [2, 5]`)}}function assertGrade(grade,label){if(!Number.isInteger(grade)||grade<1||grade>5){throw new RangeError(`${label} must be an integer in [1, 5]`)}}export{PERSONAL_UPGRADE_COSTS,getPersonalWeaponUpgradeCost,getPersonalWeaponUpgradeStepCost,getSuitUpgradeCost,getSuitUpgradeStepCost};//# sourceMappingURL=upgrade-costs.js.map
1
+ import{sumPersonalEngineeringIngredients}from"../chunk-C5HG4GJI.js";import{getPersonalWeaponBySymbol}from"../chunk-6GJHUWMO.js";import{getSuitByFamily}from"../chunk-B7EYTZRK.js"; import{deepFreeze}from"../chunk-DURKO7JU.js";var upgrade_costs_default={suits:{utilitysuit:{2:[{symbol:"suitschematic",count:1},{symbol:"healthmonitor",count:1},{symbol:"manufacturinginstructions",count:1},{symbol:"carbonfibreplating",count:2},{symbol:"graphene",count:2}],3:[{symbol:"suitschematic",count:2},{symbol:"healthmonitor",count:2},{symbol:"manufacturinginstructions",count:2},{symbol:"carbonfibreplating",count:5},{symbol:"graphene",count:5}],4:[{symbol:"suitschematic",count:4},{symbol:"healthmonitor",count:4},{symbol:"manufacturinginstructions",count:4},{symbol:"carbonfibreplating",count:9},{symbol:"graphene",count:9}],5:[{symbol:"suitschematic",count:5},{symbol:"healthmonitor",count:5},{symbol:"manufacturinginstructions",count:5},{symbol:"carbonfibreplating",count:12},{symbol:"graphene",count:12}]},tacticalsuit:{2:[{symbol:"suitschematic",count:1},{symbol:"healthmonitor",count:1},{symbol:"manufacturinginstructions",count:1},{symbol:"titaniumplating",count:2},{symbol:"graphene",count:2}],3:[{symbol:"suitschematic",count:2},{symbol:"healthmonitor",count:2},{symbol:"manufacturinginstructions",count:2},{symbol:"titaniumplating",count:5},{symbol:"graphene",count:5}],4:[{symbol:"suitschematic",count:4},{symbol:"healthmonitor",count:4},{symbol:"manufacturinginstructions",count:4},{symbol:"titaniumplating",count:9},{symbol:"graphene",count:9}],5:[{symbol:"suitschematic",count:5},{symbol:"healthmonitor",count:5},{symbol:"manufacturinginstructions",count:5},{symbol:"titaniumplating",count:12},{symbol:"graphene",count:12}]},explorationsuit:{2:[{symbol:"suitschematic",count:1},{symbol:"healthmonitor",count:1},{symbol:"manufacturinginstructions",count:1},{symbol:"aerogel",count:2},{symbol:"graphene",count:2}],3:[{symbol:"suitschematic",count:2},{symbol:"healthmonitor",count:2},{symbol:"manufacturinginstructions",count:2},{symbol:"aerogel",count:5},{symbol:"graphene",count:5}],4:[{symbol:"suitschematic",count:4},{symbol:"healthmonitor",count:4},{symbol:"manufacturinginstructions",count:4},{symbol:"aerogel",count:9},{symbol:"graphene",count:9}],5:[{symbol:"suitschematic",count:5},{symbol:"healthmonitor",count:5},{symbol:"manufacturinginstructions",count:5},{symbol:"aerogel",count:12},{symbol:"graphene",count:12}]}},weaponGroups:{takada:{2:[{symbol:"weaponschematic",count:1},{symbol:"ionisedgas",count:1},{symbol:"manufacturinginstructions",count:1},{symbol:"microelectrode",count:2},{symbol:"opticalfibre",count:2}],3:[{symbol:"weaponschematic",count:2},{symbol:"ionisedgas",count:2},{symbol:"manufacturinginstructions",count:2},{symbol:"microelectrode",count:5},{symbol:"opticalfibre",count:5}],4:[{symbol:"weaponschematic",count:4},{symbol:"ionisedgas",count:4},{symbol:"manufacturinginstructions",count:4},{symbol:"microelectrode",count:9},{symbol:"opticalfibre",count:9}],5:[{symbol:"weaponschematic",count:5},{symbol:"ionisedgas",count:5},{symbol:"manufacturinginstructions",count:5},{symbol:"microelectrode",count:12},{symbol:"opticalfibre",count:12}]},manticore:{2:[{symbol:"weaponschematic",count:1},{symbol:"ionisedgas",count:1},{symbol:"manufacturinginstructions",count:1},{symbol:"microelectrode",count:2},{symbol:"chemicalsuperbase",count:2}],3:[{symbol:"weaponschematic",count:2},{symbol:"ionisedgas",count:2},{symbol:"manufacturinginstructions",count:2},{symbol:"microelectrode",count:5},{symbol:"chemicalsuperbase",count:5}],4:[{symbol:"weaponschematic",count:4},{symbol:"ionisedgas",count:4},{symbol:"manufacturinginstructions",count:4},{symbol:"microelectrode",count:9},{symbol:"chemicalsuperbase",count:9}],5:[{symbol:"weaponschematic",count:5},{symbol:"ionisedgas",count:5},{symbol:"manufacturinginstructions",count:5},{symbol:"microelectrode",count:12},{symbol:"chemicalsuperbase",count:12}]},karma:{2:[{symbol:"weaponschematic",count:1},{symbol:"compressionliquefiedgas",count:1},{symbol:"manufacturinginstructions",count:1},{symbol:"weaponcomponent",count:2},{symbol:"tungstencarbide",count:2}],3:[{symbol:"weaponschematic",count:2},{symbol:"compressionliquefiedgas",count:2},{symbol:"manufacturinginstructions",count:2},{symbol:"weaponcomponent",count:5},{symbol:"tungstencarbide",count:5}],4:[{symbol:"weaponschematic",count:4},{symbol:"compressionliquefiedgas",count:4},{symbol:"manufacturinginstructions",count:4},{symbol:"weaponcomponent",count:9},{symbol:"tungstencarbide",count:9}],5:[{symbol:"weaponschematic",count:5},{symbol:"compressionliquefiedgas",count:5},{symbol:"manufacturinginstructions",count:5},{symbol:"weaponcomponent",count:12},{symbol:"tungstencarbide",count:12}]}}};var PERSONAL_UPGRADE_COSTS=deepFreeze(upgrade_costs_default);function getSuitUpgradeStepCost(family,targetGrade){assertTargetGrade(targetGrade,"getSuitUpgradeStepCost");const costs=getSuitUpgradeCosts(family);return costs?.[String(targetGrade)]??null}function getSuitUpgradeCost(family,targetGrade,currentGrade=1){assertGrade(targetGrade,"getSuitUpgradeCost: targetGrade");assertGrade(currentGrade,"getSuitUpgradeCost: currentGrade");const costs=getSuitUpgradeCosts(family);if(!costs)return null;return totalCosts(costs,targetGrade,currentGrade)}function getPersonalWeaponUpgradeStepCost(symbol,targetGrade){assertTargetGrade(targetGrade,"getPersonalWeaponUpgradeStepCost");const weapon=getPersonalWeaponBySymbol(symbol);if(!weapon)return null;return PERSONAL_UPGRADE_COSTS.weaponGroups[weapon.upgradeGroup][String(targetGrade)]??null}function getPersonalWeaponUpgradeCost(symbol,targetGrade,currentGrade=1){assertGrade(targetGrade,"getPersonalWeaponUpgradeCost: targetGrade");assertGrade(currentGrade,"getPersonalWeaponUpgradeCost: currentGrade");const weapon=getPersonalWeaponBySymbol(symbol);if(!weapon)return null;return totalCosts(PERSONAL_UPGRADE_COSTS.weaponGroups[weapon.upgradeGroup],targetGrade,currentGrade)}function totalCosts(costs,targetGrade,currentGrade){const steps=[];for(let grade=currentGrade+1;grade<=targetGrade;grade++){steps.push(costs[String(grade)])}return sumPersonalEngineeringIngredients(...steps)}function getSuitUpgradeCosts(family){const suit=getSuitByFamily(family);if(!suit||!Object.hasOwn(PERSONAL_UPGRADE_COSTS.suits,suit.family))return null;return PERSONAL_UPGRADE_COSTS.suits[suit.family]}function assertTargetGrade(grade,functionName){if(!Number.isInteger(grade)||grade<2||grade>5){throw new RangeError(`${functionName}: targetGrade must be an integer in [2, 5]`)}}function assertGrade(grade,label){if(!Number.isInteger(grade)||grade<1||grade>5){throw new RangeError(`${label} must be an integer in [1, 5]`)}}export{PERSONAL_UPGRADE_COSTS,getPersonalWeaponUpgradeCost,getPersonalWeaponUpgradeStepCost,getSuitUpgradeCost,getSuitUpgradeStepCost};//# sourceMappingURL=upgrade-costs.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/equipment/upgrade-costs.ts"],"names":["sumPersonalEngineeringIngredients","getPersonalWeaponBySymbol","getSuitByFamily","deepFreeze","upgrade_costs_default","suits","symbol","weaponGroups","PERSONAL_UPGRADE_COSTS","getSuitUpgradeStepCost","family","targetGrade","assertTargetGrade","costs","getSuitUpgradeCosts","String","getSuitUpgradeCost","currentGrade","assertGrade","totalCosts","getPersonalWeaponUpgradeStepCost","weapon","upgradeGroup","getPersonalWeaponUpgradeCost","steps","grade","push","suit","Object","hasOwn","functionName","Number","isInteger","RangeError","label"],"mappings":"O,yqJA4EO,IAAMQ,uBAA+CL,WACxDC,uBAkBG,SAASK,uBACZC,OACAC,aAEAC,kBAAkBD,YAAa,0BAC/B,MAAME,MAAQC,oBAAoBJ,QAClC,OAAOG,QAAQE,OAAOJ,eAAoD,IAC9E,CAmBO,SAASK,mBACZN,OACAC,YACAM,aAAe,GAEfC,YAAYP,YAAa,mCACzBO,YAAYD,aAAc,oCAC1B,MAAMJ,MAAQC,oBAAoBJ,QAClC,IAAKG,MAAO,OAAO,KACnB,OAAOM,WAAWN,MAAOF,YAAaM,aAC1C,CAiBO,SAASG,iCACZd,OACAK,aAEAC,kBAAkBD,YAAa,oCAC/B,MAAMU,OAASpB,0BAA0BK,QACzC,IAAKe,OAAQ,OAAO,KACpB,OACIb,uBAAuBD,aAAac,OAAOC,cAAcP,OAAOJ,eAAwB,IAEhG,CAoBO,SAASY,6BACZjB,OACAK,YACAM,aAAe,GAEfC,YAAYP,YAAa,6CACzBO,YAAYD,aAAc,8CAC1B,MAAMI,OAASpB,0BAA0BK,QACzC,IAAKe,OAAQ,OAAO,KACpB,OAAOF,WACHX,uBAAuBD,aAAac,OAAOC,cAC3CX,YACAM,aAER,CAEA,SAASE,WACLN,MACAF,YACAM,cAEA,MAAMO,MAAsD,GAC5D,IAAA,IAASC,MAAQR,aAAe,EAAGQ,OAASd,YAAac,QAAS,CAC9DD,MAAME,KAAKb,MAAME,OAAOU,QAC5B,CACA,OAAOzB,qCAAqCwB,MAChD,CAEA,SAASV,oBAAoBJ,QACzB,MAAMiB,KAAOzB,gBAAgBQ,QAC7B,IAAKiB,OAASC,OAAOC,OAAOrB,uBAAuBH,MAAOsB,KAAKjB,QAAS,OAAO,KAC/E,OAAOF,uBAAuBH,MAAMsB,KAAKjB,OAC7C,CAEA,SAASE,kBAAkBa,MAAeK,cACtC,IAAKC,OAAOC,UAAUP,QAAUA,MAAQ,GAAKA,MAAQ,EAAG,CACpD,MAAM,IAAIQ,WAAW,GAAGH,yDAC5B,CACJ,CAEA,SAASZ,YAAYO,MAAeS,OAChC,IAAKH,OAAOC,UAAUP,QAAUA,MAAQ,GAAKA,MAAQ,EAAG,CACpD,MAAM,IAAIQ,WAAW,GAAGC,qCAC5B,CACJ,QAAA1B,uBAAAe,6BAAAH,iCAAAJ,mBAAAP"}
1
+ {"version":3,"sources":["../../src/equipment/upgrade-costs.ts"],"names":["sumPersonalEngineeringIngredients","getPersonalWeaponBySymbol","getSuitByFamily","deepFreeze","upgrade_costs_default","suits","symbol","weaponGroups","PERSONAL_UPGRADE_COSTS","getSuitUpgradeStepCost","family","targetGrade","assertTargetGrade","costs","getSuitUpgradeCosts","String","getSuitUpgradeCost","currentGrade","assertGrade","totalCosts","getPersonalWeaponUpgradeStepCost","weapon","upgradeGroup","getPersonalWeaponUpgradeCost","steps","grade","push","suit","Object","hasOwn","functionName","Number","isInteger","RangeError","label"],"mappings":"O,ssJA4EO,IAAMQ,uBAA+CL,WACxDC,uBAmBG,SAASK,uBACZC,OACAC,aAEAC,kBAAkBD,YAAa,0BAC/B,MAAME,MAAQC,oBAAoBJ,QAClC,OAAOG,QAAQE,OAAOJ,eAAoD,IAC9E,CAoBO,SAASK,mBACZN,OACAC,YACAM,aAAe,GAEfC,YAAYP,YAAa,mCACzBO,YAAYD,aAAc,oCAC1B,MAAMJ,MAAQC,oBAAoBJ,QAClC,IAAKG,MAAO,OAAO,KACnB,OAAOM,WAAWN,MAAOF,YAAaM,aAC1C,CAkBO,SAASG,iCACZd,OACAK,aAEAC,kBAAkBD,YAAa,oCAC/B,MAAMU,OAASpB,0BAA0BK,QACzC,IAAKe,OAAQ,OAAO,KACpB,OACIb,uBAAuBD,aAAac,OAAOC,cAAcP,OAAOJ,eAAwB,IAEhG,CAqBO,SAASY,6BACZjB,OACAK,YACAM,aAAe,GAEfC,YAAYP,YAAa,6CACzBO,YAAYD,aAAc,8CAC1B,MAAMI,OAASpB,0BAA0BK,QACzC,IAAKe,OAAQ,OAAO,KACpB,OAAOF,WACHX,uBAAuBD,aAAac,OAAOC,cAC3CX,YACAM,aAER,CAEA,SAASE,WACLN,MACAF,YACAM,cAEA,MAAMO,MAAsD,GAC5D,IAAA,IAASC,MAAQR,aAAe,EAAGQ,OAASd,YAAac,QAAS,CAC9DD,MAAME,KAAKb,MAAME,OAAOU,QAC5B,CACA,OAAOzB,qCAAqCwB,MAChD,CAEA,SAASV,oBAAoBJ,QACzB,MAAMiB,KAAOzB,gBAAgBQ,QAC7B,IAAKiB,OAASC,OAAOC,OAAOrB,uBAAuBH,MAAOsB,KAAKjB,QAAS,OAAO,KAC/E,OAAOF,uBAAuBH,MAAMsB,KAAKjB,OAC7C,CAEA,SAASE,kBAAkBa,MAAeK,cACtC,IAAKC,OAAOC,UAAUP,QAAUA,MAAQ,GAAKA,MAAQ,EAAG,CACpD,MAAM,IAAIQ,WAAW,GAAGH,yDAC5B,CACJ,CAEA,SAASZ,YAAYO,MAAeS,OAChC,IAAKH,OAAOC,UAAUP,QAAUA,MAAQ,GAAKA,MAAQ,EAAG,CACpD,MAAM,IAAIQ,WAAW,GAAGC,qCAC5B,CACJ,QAAA1B,uBAAAe,6BAAAH,iCAAAJ,mBAAAP"}
@@ -53,7 +53,11 @@ interface PersonalWeapon {
53
53
  readonly headshotMultiplier: number;
54
54
  /** Nominal effective range in metres. */
55
55
  readonly effectiveRange: number;
56
- /** Grade records keyed by `"1"` through `"5"`. */
56
+ /**
57
+ * Grade records keyed by `"1"` through `"5"` — every weapon carries all five,
58
+ * unlike {@link Suit.grades}, and `equipment.test.ts` pins that. Read one through
59
+ * {@link getPersonalWeaponGrade} to get the same nullable answer suits give.
60
+ */
57
61
  readonly grades: Readonly<Record<`${EquipmentGrade}`, PersonalWeaponGrade>>;
58
62
  }
59
63
  /**
@@ -69,7 +73,8 @@ declare const PERSONAL_WEAPONS: readonly PersonalWeapon[];
69
73
  /**
70
74
  * Look up a handheld weapon by its Frontier journal symbol, case-insensitively.
71
75
  *
72
- * @param symbol - Journal item id such as `"wpn_m_assaultrifle_kinetic_fauto"`.
76
+ * @param symbol - Journal item id such as `"wpn_m_assaultrifle_kinetic_fauto"`,
77
+ * matched case-insensitively after trimming surrounding whitespace.
73
78
  * @returns The frozen weapon record, or `null` when unknown.
74
79
  * @throws {TypeError} If `symbol` is present and not a string. A nullish symbol is a
75
80
  * miss, answered like an unrecognised one.
@@ -100,14 +105,17 @@ declare function getPersonalWeaponByName(name: string): PersonalWeapon | null;
100
105
  *
101
106
  * @param weapon - A catalogue weapon record.
102
107
  * @param grade - Integer grade `1`–`5`.
103
- * @returns The frozen grade record.
108
+ * @returns The frozen grade record, or `null` when the record carries no such grade.
109
+ * Every catalogued weapon carries all five, so the `null` is the same promise
110
+ * {@link getSuitGrade} makes rather than an outcome the shipped catalogue produces —
111
+ * write the two the same way and neither can surprise you.
104
112
  * @throws {RangeError} If `grade` is not an integer from 1 through 5.
105
113
  * @example
106
114
  * ```ts
107
115
  * import { PERSONAL_WEAPONS, getPersonalWeaponGrade } from '@elite-dangerous-almanac/core/equipment/weapons';
108
- * getPersonalWeaponGrade(PERSONAL_WEAPONS[0]!, 5).modificationSlots; // -> 4
116
+ * getPersonalWeaponGrade(PERSONAL_WEAPONS[0]!, 5)?.modificationSlots; // -> 4
109
117
  * ```
110
118
  */
111
- declare function getPersonalWeaponGrade(weapon: PersonalWeapon, grade: number): PersonalWeaponGrade;
119
+ declare function getPersonalWeaponGrade(weapon: PersonalWeapon, grade: number): PersonalWeaponGrade | null;
112
120
 
113
121
  export { PERSONAL_WEAPONS, type PersonalDamageType, type PersonalFireMode, type PersonalWeapon, type PersonalWeaponClass, type PersonalWeaponEngineeringType, type PersonalWeaponGrade, type PersonalWeaponSlot, type WeaponUpgradeGroup, getPersonalWeaponByName, getPersonalWeaponBySymbol, getPersonalWeaponGrade };
@@ -1 +1 @@
1
- export{PERSONAL_WEAPONS,getPersonalWeaponByName,getPersonalWeaponBySymbol,getPersonalWeaponGrade}from"../chunk-OCND33TO.js"; //# sourceMappingURL=weapons.js.map
1
+ export{PERSONAL_WEAPONS,getPersonalWeaponByName,getPersonalWeaponBySymbol,getPersonalWeaponGrade}from"../chunk-6GJHUWMO.js"; //# sourceMappingURL=weapons.js.map
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * Look up an engineering blueprint's source-backed display name for a locale.
4
4
  *
5
- * @param fdname - Frontier's blueprint id, such as `"FSD_LongRange"`. Matching ignores
5
+ * @param blueprintSymbol - Frontier's blueprint id, such as `"FSD_LongRange"`. Matching ignores
6
6
  * case and surrounding whitespace.
7
7
  * @param locale - A BCP 47 language or regional tag, such as `"de"`, `"de-DE"` or
8
8
  * `"en-GB"`. Matching is case-insensitive; underscores are accepted in place of
@@ -11,12 +11,12 @@
11
11
  * tag; or `null` when the id is unknown, the locale is
12
12
  * unsupported, or the pinned source carries no value for that blueprint and locale.
13
13
  * @remarks
14
- * Names stay keyed per `fdname`: the same English phrase can require different grammar
15
- * when translated for different module families. This function bundles names only, not
14
+ * Names stay keyed per blueprint symbol: the same English phrase can require different
15
+ * grammar when translated for different module families. This function bundles names only, not
16
16
  * blueprint modifiers or material costs. Missing translations never silently fall back
17
17
  * to English.
18
- * @throws {TypeError} If `fdname` is present and not a string, or `locale` is not a
19
- * string. A nullish `fdname` is a lookup miss and returns `null`.
18
+ * @throws {TypeError} If `blueprintSymbol` is present and not a string, or `locale` is not a
19
+ * string. A nullish `blueprintSymbol` is a lookup miss and returns `null`.
20
20
  * @example
21
21
  * ```ts
22
22
  * import { getBlueprintName } from '@elite-dangerous-almanac/core/i18n/blueprints';
@@ -26,6 +26,6 @@
26
26
  * getBlueprintName('MC_Overcharged', 'fr'); // -> 'Arme surchargée'
27
27
  * ```
28
28
  */
29
- declare function getBlueprintName(fdname: string, locale: string): string | null;
29
+ declare function getBlueprintName(blueprintSymbol: string, locale: string): string | null;
30
30
 
31
31
  export { getBlueprintName };
@@ -1 +1 @@
1
- export{getBlueprintName}from"../chunk-Z6XMXMVI.js"; //# sourceMappingURL=blueprints.js.map
1
+ export{getBlueprintName}from"../chunk-DBDCOHI4.js"; //# sourceMappingURL=blueprints.js.map
@@ -6,20 +6,8 @@ import '../ships/slots.js';
6
6
  import '../ships/modules.js';
7
7
  import '../ships/engineering-options.js';
8
8
  import '../ships/module-families.js';
9
- import '../ships/jump-range.js';
10
- import '../ships/engineering.js';
11
- import '../ships/power.js';
12
- import '../ships/heat.js';
13
- import '../ships/shields.js';
14
- import '../ships/resistances.js';
15
- import '../ships/armour.js';
16
- import '../ships/weapons.js';
17
- import '../ships/ammunition.js';
18
- import '../ships/weapons-capacitor.js';
19
- import '../ships/distributor.js';
20
- import '../ships/mobility.js';
21
- import '../ships/shield-recovery.js';
22
9
  import '../ships/pre-engineered.js';
10
+ import '../ships/ammunition.js';
23
11
  import '../ships/source-purchase.js';
24
12
 
25
13
  /** Locale-aware access to the English fallback carried by structured diagnostics. */
@@ -3,6 +3,7 @@
3
3
  * Look up an engineering option group's display name.
4
4
  *
5
5
  * @param groupId - The stable group id used by `EngineeringOptionGroup.groupId`.
6
+ * Matching ignores case and surrounding whitespace.
6
7
  * @param locale - A BCP 47 locale. English covers every group; the current source also
7
8
  * supplies partial Russian coverage.
8
9
  * @returns The localized group name, or `null` for an unknown group or unavailable locale.
@@ -1 +1 @@
1
- export{getEngineeringGroupName}from"../chunk-EKQCVCMK.js"; //# sourceMappingURL=engineering-groups.js.map
1
+ export{getEngineeringGroupName}from"../chunk-5ZVYRX6Z.js"; //# sourceMappingURL=engineering-groups.js.map
@@ -2,11 +2,12 @@
2
2
  /**
3
3
  * Look up an experimental effect's display description.
4
4
  *
5
- * @param fdname - Frontier's experimental-effect id.
5
+ * @param experimentalEffectSymbol - Frontier's experimental-effect id. Matching ignores case and
6
+ * surrounding whitespace.
6
7
  * @param locale - A BCP 47 locale. The current source supplies canonical English only.
7
8
  * @returns The localized description, or `null` when the effect is unknown, has no
8
9
  * source description, or the requested locale is unavailable.
9
- * @throws {TypeError} If a present `fdname` or `locale` is not a string.
10
+ * @throws {TypeError} If a present `experimentalEffectSymbol` or `locale` is not a string.
10
11
  * @example
11
12
  * ```ts
12
13
  * import { getExperimentalEffectDescription } from '@elite-dangerous-almanac/core/i18n/experimental-effect-descriptions';
@@ -15,6 +16,6 @@
15
16
  * getExperimentalEffectDescription('special_auto_loader', 'fr'); // -> null
16
17
  * ```
17
18
  */
18
- declare function getExperimentalEffectDescription(fdname: string, locale: string): string | null;
19
+ declare function getExperimentalEffectDescription(experimentalEffectSymbol: string, locale: string): string | null;
19
20
 
20
21
  export { getExperimentalEffectDescription };
@@ -1 +1 @@
1
- export{getExperimentalEffectDescription}from"../chunk-4S6WB7QR.js"; //# sourceMappingURL=experimental-effect-descriptions.js.map
1
+ export{getExperimentalEffectDescription}from"../chunk-FF2X4K5P.js"; //# sourceMappingURL=experimental-effect-descriptions.js.map
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * Look up an engineering experimental effect's source-backed display name for a locale.
4
4
  *
5
- * @param fdname - Frontier's experimental-effect id, such as
5
+ * @param experimentalEffectSymbol - Frontier's experimental-effect id, such as
6
6
  * `"special_concordant_sequence"`. Matching ignores case and surrounding whitespace.
7
7
  * @param locale - A BCP 47 language or regional tag, such as `"de"`, `"de-DE"` or
8
8
  * `"en-GB"`. Matching is case-insensitive; underscores are accepted in place of
@@ -14,8 +14,9 @@
14
14
  * @remarks
15
15
  * This function bundles names only, not modifier mechanics or material costs. Missing
16
16
  * translations never silently fall back to English.
17
- * @throws {TypeError} If `fdname` is present and not a string, or `locale` is not a
18
- * string. A nullish `fdname` is a lookup miss and returns `null`.
17
+ * @throws {TypeError} If `experimentalEffectSymbol` is present and not a string, or
18
+ * `locale` is not a string. A nullish `experimentalEffectSymbol` is a lookup miss and
19
+ * returns `null`.
19
20
  * @example
20
21
  * ```ts
21
22
  * import { getExperimentalEffectName } from '@elite-dangerous-almanac/core/i18n/experimental-effects';
@@ -25,6 +26,6 @@
25
26
  * getExperimentalEffectName('special_concordant_sequence', 'ja-JP'); // -> null
26
27
  * ```
27
28
  */
28
- declare function getExperimentalEffectName(fdname: string, locale: string): string | null;
29
+ declare function getExperimentalEffectName(experimentalEffectSymbol: string, locale: string): string | null;
29
30
 
30
31
  export { getExperimentalEffectName };
@@ -1 +1 @@
1
- export{getExperimentalEffectName}from"../chunk-CJWFY6OX.js"; //# sourceMappingURL=experimental-effects.js.map
1
+ export{getExperimentalEffectName}from"../chunk-DSMLYA2M.js"; //# sourceMappingURL=experimental-effects.js.map