fleethub-core 0.7.3 → 0.9.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,4 +1,4 @@
1
- import * as wasm from './fh_core_bg.wasm';
1
+ import * as wasm from './fleethub_core_bg.wasm';
2
2
 
3
3
  const heap = new Array(32).fill(undefined);
4
4
 
@@ -182,12 +182,47 @@ export function set_panic_hook() {
182
182
  wasm.set_panic_hook();
183
183
  }
184
184
 
185
+ const u32CvtShim = new Uint32Array(2);
186
+
187
+ const uint64CvtShim = new BigUint64Array(u32CvtShim.buffer);
188
+
189
+ function isLikeNone(x) {
190
+ return x === undefined || x === null;
191
+ }
192
+
193
+ let cachegetUint16Memory0 = null;
194
+ function getUint16Memory0() {
195
+ if (cachegetUint16Memory0 === null || cachegetUint16Memory0.buffer !== wasm.memory.buffer) {
196
+ cachegetUint16Memory0 = new Uint16Array(wasm.memory.buffer);
197
+ }
198
+ return cachegetUint16Memory0;
199
+ }
200
+
201
+ function passArray16ToWasm0(arg, malloc) {
202
+ const ptr = malloc(arg.length * 2);
203
+ getUint16Memory0().set(arg, ptr / 2);
204
+ WASM_VECTOR_LEN = arg.length;
205
+ return ptr;
206
+ }
207
+
185
208
  function _assertClass(instance, klass) {
186
209
  if (!(instance instanceof klass)) {
187
210
  throw new Error(`expected instance of ${klass.name}`);
188
211
  }
189
212
  return instance.ptr;
190
213
  }
214
+
215
+ let cachegetFloat64Memory0 = null;
216
+ function getFloat64Memory0() {
217
+ if (cachegetFloat64Memory0 === null || cachegetFloat64Memory0.buffer !== wasm.memory.buffer) {
218
+ cachegetFloat64Memory0 = new Float64Array(wasm.memory.buffer);
219
+ }
220
+ return cachegetFloat64Memory0;
221
+ }
222
+
223
+ function getArrayU8FromWasm0(ptr, len) {
224
+ return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
225
+ }
191
226
  /**
192
227
  * @param {Gear} gear
193
228
  * @returns {boolean}
@@ -198,18 +233,6 @@ export function air_squadron_can_equip(gear) {
198
233
  return ret !== 0;
199
234
  }
200
235
 
201
- function isLikeNone(x) {
202
- return x === undefined || x === null;
203
- }
204
-
205
- let cachegetFloat64Memory0 = null;
206
- function getFloat64Memory0() {
207
- if (cachegetFloat64Memory0 === null || cachegetFloat64Memory0.buffer !== wasm.memory.buffer) {
208
- cachegetFloat64Memory0 = new Float64Array(wasm.memory.buffer);
209
- }
210
- return cachegetFloat64Memory0;
211
- }
212
-
213
236
  let cachegetUint32Memory0 = null;
214
237
  function getUint32Memory0() {
215
238
  if (cachegetUint32Memory0 === null || cachegetUint32Memory0.buffer !== wasm.memory.buffer) {
@@ -227,21 +250,6 @@ function getArrayJsValueFromWasm0(ptr, len) {
227
250
  }
228
251
  return result;
229
252
  }
230
-
231
- let cachegetUint16Memory0 = null;
232
- function getUint16Memory0() {
233
- if (cachegetUint16Memory0 === null || cachegetUint16Memory0.buffer !== wasm.memory.buffer) {
234
- cachegetUint16Memory0 = new Uint16Array(wasm.memory.buffer);
235
- }
236
- return cachegetUint16Memory0;
237
- }
238
-
239
- function passArray16ToWasm0(arg, malloc) {
240
- const ptr = malloc(arg.length * 2);
241
- getUint16Memory0().set(arg, ptr / 2);
242
- WASM_VECTOR_LEN = arg.length;
243
- return ptr;
244
- }
245
253
  /**
246
254
  * @param {bindings.OrgType} org_type
247
255
  * @returns {boolean}
@@ -282,10 +290,6 @@ function getArrayU16FromWasm0(ptr, len) {
282
290
  return getUint16Memory0().subarray(ptr / 2, ptr / 2 + len);
283
291
  }
284
292
 
285
- function getArrayU8FromWasm0(ptr, len) {
286
- return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
287
- }
288
-
289
293
  function handleError(f, args) {
290
294
  try {
291
295
  return f.apply(this, args);
@@ -341,6 +345,31 @@ export class AirSquadron {
341
345
  }
342
346
  /**
343
347
  */
348
+ get xxh3() {
349
+ try {
350
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
351
+ wasm.__wbg_get_airsquadron_xxh3(retptr, this.ptr);
352
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
353
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
354
+ u32CvtShim[0] = r0;
355
+ u32CvtShim[1] = r1;
356
+ const n0 = uint64CvtShim[0];
357
+ return n0;
358
+ } finally {
359
+ wasm.__wbindgen_add_to_stack_pointer(16);
360
+ }
361
+ }
362
+ /**
363
+ * @param {BigInt} arg0
364
+ */
365
+ set xxh3(arg0) {
366
+ uint64CvtShim[0] = arg0;
367
+ const low0 = u32CvtShim[0];
368
+ const high0 = u32CvtShim[1];
369
+ wasm.__wbg_set_airsquadron_xxh3(this.ptr, low0, high0);
370
+ }
371
+ /**
372
+ */
344
373
  get mode() {
345
374
  var ret = wasm.__wbg_get_airsquadron_mode(this.ptr);
346
375
  return takeObject(ret);
@@ -352,21 +381,6 @@ export class AirSquadron {
352
381
  wasm.__wbg_set_airsquadron_mode(this.ptr, addHeapObject(arg0));
353
382
  }
354
383
  /**
355
- * @returns {string}
356
- */
357
- get xxh3() {
358
- try {
359
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
360
- wasm.airsquadron_xxh3(retptr, this.ptr);
361
- var r0 = getInt32Memory0()[retptr / 4 + 0];
362
- var r1 = getInt32Memory0()[retptr / 4 + 1];
363
- return getStringFromWasm0(r0, r1);
364
- } finally {
365
- wasm.__wbindgen_add_to_stack_pointer(16);
366
- wasm.__wbindgen_free(r0, r1);
367
- }
368
- }
369
- /**
370
384
  * @param {string} key
371
385
  * @returns {Gear | undefined}
372
386
  */
@@ -390,16 +404,38 @@ export class AirSquadron {
390
404
  * @returns {number}
391
405
  */
392
406
  get_slot_size(index) {
393
- var ret = wasm.airsquadron_get_slot_size(this.ptr, index);
394
- return ret;
407
+ try {
408
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
409
+ wasm.airsquadron_get_slot_size(retptr, this.ptr, index);
410
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
411
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
412
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
413
+ if (r2) {
414
+ throw takeObject(r1);
415
+ }
416
+ return r0;
417
+ } finally {
418
+ wasm.__wbindgen_add_to_stack_pointer(16);
419
+ }
395
420
  }
396
421
  /**
397
422
  * @param {number} index
398
423
  * @returns {number}
399
424
  */
400
425
  get_max_slot_size(index) {
401
- var ret = wasm.airsquadron_get_max_slot_size(this.ptr, index);
402
- return ret;
426
+ try {
427
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
428
+ wasm.airsquadron_get_max_slot_size(retptr, this.ptr, index);
429
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
430
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
431
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
432
+ if (r2) {
433
+ throw takeObject(r1);
434
+ }
435
+ return r0;
436
+ } finally {
437
+ wasm.__wbindgen_add_to_stack_pointer(16);
438
+ }
403
439
  }
404
440
  /**
405
441
  * @returns {number}
@@ -451,14 +487,14 @@ export class Analyzer {
451
487
  /**
452
488
  * @param {Comp} comp
453
489
  * @param {bindings.Formation} formation
454
- * @param {number | undefined} adjusted_anti_air_resist
455
- * @param {number | undefined} fleet_anti_air_resist
490
+ * @param {number} adjusted_anti_air_resist
491
+ * @param {number} fleet_anti_air_resist
456
492
  * @param {number | undefined} aaci
457
493
  * @returns {bindings.CompAntiAirInfo}
458
494
  */
459
495
  analyze_anti_air(comp, formation, adjusted_anti_air_resist, fleet_anti_air_resist, aaci) {
460
496
  _assertClass(comp, Comp);
461
- var ret = wasm.analyzer_analyze_anti_air(this.ptr, comp.ptr, addHeapObject(formation), !isLikeNone(adjusted_anti_air_resist), isLikeNone(adjusted_anti_air_resist) ? 0 : adjusted_anti_air_resist, !isLikeNone(fleet_anti_air_resist), isLikeNone(fleet_anti_air_resist) ? 0 : fleet_anti_air_resist, isLikeNone(aaci) ? 0xFFFFFF : aaci);
497
+ var ret = wasm.analyzer_analyze_anti_air(this.ptr, comp.ptr, addHeapObject(formation), adjusted_anti_air_resist, fleet_anti_air_resist, isLikeNone(aaci) ? 0xFFFFFF : aaci);
462
498
  return takeObject(ret);
463
499
  }
464
500
  /**
@@ -740,14 +776,14 @@ export class Comp {
740
776
  }
741
777
  /**
742
778
  * 制空値
743
- * @param {boolean} anti_combined
744
- * @param {boolean} anti_lbas
779
+ * @param {boolean} escort_participates
780
+ * @param {boolean} recon_participates
745
781
  * @returns {number | undefined}
746
782
  */
747
- fighter_power(anti_combined, anti_lbas) {
783
+ fighter_power(escort_participates, recon_participates) {
748
784
  try {
749
785
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
750
- wasm.comp_fighter_power(retptr, this.ptr, anti_combined, anti_lbas);
786
+ wasm.comp_fighter_power(retptr, this.ptr, escort_participates, recon_participates);
751
787
  var r0 = getInt32Memory0()[retptr / 4 + 0];
752
788
  var r1 = getInt32Memory0()[retptr / 4 + 1];
753
789
  return r0 === 0 ? undefined : r1;
@@ -765,8 +801,8 @@ export class Comp {
765
801
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
766
802
  wasm.comp_elos(retptr, this.ptr, node_divaricated_factor);
767
803
  var r0 = getInt32Memory0()[retptr / 4 + 0];
768
- var r1 = getFloat64Memory0()[retptr / 8 + 1];
769
- return r0 === 0 ? undefined : r1;
804
+ var r2 = getFloat64Memory0()[retptr / 8 + 1];
805
+ return r0 === 0 ? undefined : r2;
770
806
  } finally {
771
807
  wasm.__wbindgen_add_to_stack_pointer(16);
772
808
  }
@@ -809,8 +845,19 @@ export class FhCore {
809
845
  * @param {Function} js_fn
810
846
  */
811
847
  constructor(js_master, js_fn) {
812
- var ret = wasm.fhcore_new(addHeapObject(js_master), addHeapObject(js_fn));
813
- return FhCore.__wrap(ret);
848
+ try {
849
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
850
+ wasm.fhcore_new(retptr, addHeapObject(js_master), addHeapObject(js_fn));
851
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
852
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
853
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
854
+ if (r2) {
855
+ throw takeObject(r1);
856
+ }
857
+ return FhCore.__wrap(r0);
858
+ } finally {
859
+ wasm.__wbindgen_add_to_stack_pointer(16);
860
+ }
814
861
  }
815
862
  /**
816
863
  * @param {bindings.GearState | undefined} input
@@ -895,10 +942,21 @@ export class FhCore {
895
942
  * @returns {bindings.SimulatorResult}
896
943
  */
897
944
  simulate_shelling_support(player, enemy, params, times) {
898
- _assertClass(player, Comp);
899
- _assertClass(enemy, Comp);
900
- var ret = wasm.fhcore_simulate_shelling_support(this.ptr, player.ptr, enemy.ptr, addHeapObject(params), times);
901
- return takeObject(ret);
945
+ try {
946
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
947
+ _assertClass(player, Comp);
948
+ _assertClass(enemy, Comp);
949
+ wasm.fhcore_simulate_shelling_support(retptr, this.ptr, player.ptr, enemy.ptr, addHeapObject(params), times);
950
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
951
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
952
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
953
+ if (r2) {
954
+ throw takeObject(r1);
955
+ }
956
+ return takeObject(r0);
957
+ } finally {
958
+ wasm.__wbindgen_add_to_stack_pointer(16);
959
+ }
902
960
  }
903
961
  }
904
962
 
@@ -949,6 +1007,31 @@ export class Fleet {
949
1007
  }
950
1008
  /**
951
1009
  */
1010
+ get xxh3() {
1011
+ try {
1012
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1013
+ wasm.__wbg_get_fleet_xxh3(retptr, this.ptr);
1014
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
1015
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
1016
+ u32CvtShim[0] = r0;
1017
+ u32CvtShim[1] = r1;
1018
+ const n0 = uint64CvtShim[0];
1019
+ return n0;
1020
+ } finally {
1021
+ wasm.__wbindgen_add_to_stack_pointer(16);
1022
+ }
1023
+ }
1024
+ /**
1025
+ * @param {BigInt} arg0
1026
+ */
1027
+ set xxh3(arg0) {
1028
+ uint64CvtShim[0] = arg0;
1029
+ const low0 = u32CvtShim[0];
1030
+ const high0 = u32CvtShim[1];
1031
+ wasm.__wbg_set_fleet_xxh3(this.ptr, low0, high0);
1032
+ }
1033
+ /**
1034
+ */
952
1035
  get len() {
953
1036
  var ret = wasm.__wbg_get_fleet_len(this.ptr);
954
1037
  return ret >>> 0;
@@ -960,21 +1043,6 @@ export class Fleet {
960
1043
  wasm.__wbg_set_fleet_len(this.ptr, arg0);
961
1044
  }
962
1045
  /**
963
- * @returns {string}
964
- */
965
- get xxh3() {
966
- try {
967
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
968
- wasm.fleet_xxh3(retptr, this.ptr);
969
- var r0 = getInt32Memory0()[retptr / 4 + 0];
970
- var r1 = getInt32Memory0()[retptr / 4 + 1];
971
- return getStringFromWasm0(r0, r1);
972
- } finally {
973
- wasm.__wbindgen_add_to_stack_pointer(16);
974
- wasm.__wbindgen_free(r0, r1);
975
- }
976
- }
977
- /**
978
1046
  * @returns {bindings.FleetMeta}
979
1047
  */
980
1048
  meta() {
@@ -1105,20 +1173,20 @@ export class Fleet {
1105
1173
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1106
1174
  wasm.fleet_fleet_los_mod(retptr, this.ptr);
1107
1175
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1108
- var r1 = getFloat64Memory0()[retptr / 8 + 1];
1109
- return r0 === 0 ? undefined : r1;
1176
+ var r2 = getFloat64Memory0()[retptr / 8 + 1];
1177
+ return r0 === 0 ? undefined : r2;
1110
1178
  } finally {
1111
1179
  wasm.__wbindgen_add_to_stack_pointer(16);
1112
1180
  }
1113
1181
  }
1114
1182
  /**
1115
- * @param {boolean} anti_lbas
1183
+ * @param {boolean} recon_participates
1116
1184
  * @returns {number | undefined}
1117
1185
  */
1118
- fighter_power(anti_lbas) {
1186
+ fighter_power(recon_participates) {
1119
1187
  try {
1120
1188
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1121
- wasm.fleet_fighter_power(retptr, this.ptr, anti_lbas);
1189
+ wasm.fleet_fighter_power(retptr, this.ptr, recon_participates);
1122
1190
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1123
1191
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1124
1192
  return r0 === 0 ? undefined : r1;
@@ -1137,8 +1205,8 @@ export class Fleet {
1137
1205
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1138
1206
  wasm.fleet_elos(retptr, this.ptr, hq_level, node_divaricated_factor);
1139
1207
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1140
- var r1 = getFloat64Memory0()[retptr / 8 + 1];
1141
- return r0 === 0 ? undefined : r1;
1208
+ var r2 = getFloat64Memory0()[retptr / 8 + 1];
1209
+ return r0 === 0 ? undefined : r2;
1142
1210
  } finally {
1143
1211
  wasm.__wbindgen_add_to_stack_pointer(16);
1144
1212
  }
@@ -1152,8 +1220,8 @@ export class Fleet {
1152
1220
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1153
1221
  wasm.fleet_aviation_detection_score(retptr, this.ptr);
1154
1222
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1155
- var r1 = getFloat64Memory0()[retptr / 8 + 1];
1156
- return r0 === 0 ? undefined : r1;
1223
+ var r2 = getFloat64Memory0()[retptr / 8 + 1];
1224
+ return r0 === 0 ? undefined : r2;
1157
1225
  } finally {
1158
1226
  wasm.__wbindgen_add_to_stack_pointer(16);
1159
1227
  }
@@ -1177,8 +1245,8 @@ export class Fleet {
1177
1245
  var len0 = WASM_VECTOR_LEN;
1178
1246
  wasm.fleet_sum_ship_stat_by(retptr, this.ptr, ptr0, len0);
1179
1247
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1180
- var r1 = getFloat64Memory0()[retptr / 8 + 1];
1181
- return r0 === 0 ? undefined : r1;
1248
+ var r2 = getFloat64Memory0()[retptr / 8 + 1];
1249
+ return r0 === 0 ? undefined : r2;
1182
1250
  } finally {
1183
1251
  wasm.__wbindgen_add_to_stack_pointer(16);
1184
1252
  }
@@ -1237,6 +1305,31 @@ export class Gear {
1237
1305
  }
1238
1306
  /**
1239
1307
  */
1308
+ get xxh3() {
1309
+ try {
1310
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1311
+ wasm.__wbg_get_gear_xxh3(retptr, this.ptr);
1312
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
1313
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
1314
+ u32CvtShim[0] = r0;
1315
+ u32CvtShim[1] = r1;
1316
+ const n0 = uint64CvtShim[0];
1317
+ return n0;
1318
+ } finally {
1319
+ wasm.__wbindgen_add_to_stack_pointer(16);
1320
+ }
1321
+ }
1322
+ /**
1323
+ * @param {BigInt} arg0
1324
+ */
1325
+ set xxh3(arg0) {
1326
+ uint64CvtShim[0] = arg0;
1327
+ const low0 = u32CvtShim[0];
1328
+ const high0 = u32CvtShim[1];
1329
+ wasm.__wbg_set_gear_xxh3(this.ptr, low0, high0);
1330
+ }
1331
+ /**
1332
+ */
1240
1333
  get gear_id() {
1241
1334
  var ret = wasm.__wbg_get_gear_gear_id(this.ptr);
1242
1335
  return ret;
@@ -1541,21 +1634,6 @@ export class Gear {
1541
1634
  return Gear.__wrap(ret);
1542
1635
  }
1543
1636
  /**
1544
- * @returns {string}
1545
- */
1546
- get xxh3() {
1547
- try {
1548
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1549
- wasm.gear_xxh3(retptr, this.ptr);
1550
- var r0 = getInt32Memory0()[retptr / 4 + 0];
1551
- var r1 = getInt32Memory0()[retptr / 4 + 1];
1552
- return getStringFromWasm0(r0, r1);
1553
- } finally {
1554
- wasm.__wbindgen_add_to_stack_pointer(16);
1555
- wasm.__wbindgen_free(r0, r1);
1556
- }
1557
- }
1558
- /**
1559
1637
  * @returns {any}
1560
1638
  */
1561
1639
  get types() {
@@ -1686,13 +1764,6 @@ export class Gear {
1686
1764
  return ret;
1687
1765
  }
1688
1766
  /**
1689
- * @returns {boolean}
1690
- */
1691
- is_contact_selection_plane() {
1692
- var ret = wasm.gear_is_contact_selection_plane(this.ptr);
1693
- return ret !== 0;
1694
- }
1695
- /**
1696
1767
  * @param {bindings.AirStateRank} rank
1697
1768
  * @returns {number}
1698
1769
  */
@@ -2018,6 +2089,31 @@ export class Org {
2018
2089
  }
2019
2090
  /**
2020
2091
  */
2092
+ get xxh3() {
2093
+ try {
2094
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2095
+ wasm.__wbg_get_org_xxh3(retptr, this.ptr);
2096
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
2097
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
2098
+ u32CvtShim[0] = r0;
2099
+ u32CvtShim[1] = r1;
2100
+ const n0 = uint64CvtShim[0];
2101
+ return n0;
2102
+ } finally {
2103
+ wasm.__wbindgen_add_to_stack_pointer(16);
2104
+ }
2105
+ }
2106
+ /**
2107
+ * @param {BigInt} arg0
2108
+ */
2109
+ set xxh3(arg0) {
2110
+ uint64CvtShim[0] = arg0;
2111
+ const low0 = u32CvtShim[0];
2112
+ const high0 = u32CvtShim[1];
2113
+ wasm.__wbg_set_org_xxh3(this.ptr, low0, high0);
2114
+ }
2115
+ /**
2116
+ */
2021
2117
  get hq_level() {
2022
2118
  var ret = wasm.__wbg_get_org_hq_level(this.ptr);
2023
2119
  return ret;
@@ -2115,21 +2211,6 @@ export class Org {
2115
2211
  wasm.__wbg_set_org_boss_sup(this.ptr, ptr0, len0);
2116
2212
  }
2117
2213
  /**
2118
- * @returns {string}
2119
- */
2120
- get xxh3() {
2121
- try {
2122
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2123
- wasm.org_xxh3(retptr, this.ptr);
2124
- var r0 = getInt32Memory0()[retptr / 4 + 0];
2125
- var r1 = getInt32Memory0()[retptr / 4 + 1];
2126
- return getStringFromWasm0(r0, r1);
2127
- } finally {
2128
- wasm.__wbindgen_add_to_stack_pointer(16);
2129
- wasm.__wbindgen_free(r0, r1);
2130
- }
2131
- }
2132
- /**
2133
2214
  * @param {bindings.Role} role
2134
2215
  * @returns {number}
2135
2216
  */
@@ -2185,8 +2266,8 @@ export class Org {
2185
2266
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2186
2267
  wasm.org_fleet_los_mod(retptr, this.ptr, addHeapObject(role));
2187
2268
  var r0 = getInt32Memory0()[retptr / 4 + 0];
2188
- var r1 = getFloat64Memory0()[retptr / 8 + 1];
2189
- return r0 === 0 ? undefined : r1;
2269
+ var r2 = getFloat64Memory0()[retptr / 8 + 1];
2270
+ return r0 === 0 ? undefined : r2;
2190
2271
  } finally {
2191
2272
  wasm.__wbindgen_add_to_stack_pointer(16);
2192
2273
  }
@@ -2292,10 +2373,21 @@ export class Org {
2292
2373
  * @returns {AirSquadron}
2293
2374
  */
2294
2375
  get_air_squadron(key) {
2295
- var ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2296
- var len0 = WASM_VECTOR_LEN;
2297
- var ret = wasm.org_get_air_squadron(this.ptr, ptr0, len0);
2298
- return AirSquadron.__wrap(ret);
2376
+ try {
2377
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2378
+ var ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2379
+ var len0 = WASM_VECTOR_LEN;
2380
+ wasm.org_get_air_squadron(retptr, this.ptr, ptr0, len0);
2381
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
2382
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
2383
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
2384
+ if (r2) {
2385
+ throw takeObject(r1);
2386
+ }
2387
+ return AirSquadron.__wrap(r0);
2388
+ } finally {
2389
+ wasm.__wbindgen_add_to_stack_pointer(16);
2390
+ }
2299
2391
  }
2300
2392
  /**
2301
2393
  * @returns {(string)[]}
@@ -2439,6 +2531,31 @@ export class Ship {
2439
2531
  }
2440
2532
  /**
2441
2533
  */
2534
+ get xxh3() {
2535
+ try {
2536
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2537
+ wasm.__wbg_get_ship_xxh3(retptr, this.ptr);
2538
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
2539
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
2540
+ u32CvtShim[0] = r0;
2541
+ u32CvtShim[1] = r1;
2542
+ const n0 = uint64CvtShim[0];
2543
+ return n0;
2544
+ } finally {
2545
+ wasm.__wbindgen_add_to_stack_pointer(16);
2546
+ }
2547
+ }
2548
+ /**
2549
+ * @param {BigInt} arg0
2550
+ */
2551
+ set xxh3(arg0) {
2552
+ uint64CvtShim[0] = arg0;
2553
+ const low0 = u32CvtShim[0];
2554
+ const high0 = u32CvtShim[1];
2555
+ wasm.__wbg_set_ship_xxh3(this.ptr, low0, high0);
2556
+ }
2557
+ /**
2558
+ */
2442
2559
  get ship_id() {
2443
2560
  var ret = wasm.__wbg_get_ship_ship_id(this.ptr);
2444
2561
  return ret;
@@ -2649,21 +2766,6 @@ export class Ship {
2649
2766
  return ret !== 0;
2650
2767
  }
2651
2768
  /**
2652
- * @returns {string}
2653
- */
2654
- get xxh3() {
2655
- try {
2656
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2657
- wasm.org_xxh3(retptr, this.ptr);
2658
- var r0 = getInt32Memory0()[retptr / 4 + 0];
2659
- var r1 = getInt32Memory0()[retptr / 4 + 1];
2660
- return getStringFromWasm0(r0, r1);
2661
- } finally {
2662
- wasm.__wbindgen_add_to_stack_pointer(16);
2663
- wasm.__wbindgen_free(r0, r1);
2664
- }
2665
- }
2666
- /**
2667
2769
  * @returns {bindings.ShipState}
2668
2770
  */
2669
2771
  state() {
@@ -3025,13 +3127,13 @@ export class Ship {
3025
3127
  return ret;
3026
3128
  }
3027
3129
  /**
3028
- * @param {boolean} anti_lbas
3130
+ * @param {boolean} recon_participates
3029
3131
  * @returns {number | undefined}
3030
3132
  */
3031
- fighter_power(anti_lbas) {
3133
+ fighter_power(recon_participates) {
3032
3134
  try {
3033
3135
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3034
- wasm.ship_fighter_power(retptr, this.ptr, anti_lbas);
3136
+ wasm.ship_fighter_power(retptr, this.ptr, recon_participates);
3035
3137
  var r0 = getInt32Memory0()[retptr / 4 + 0];
3036
3138
  var r1 = getInt32Memory0()[retptr / 4 + 1];
3037
3139
  return r0 === 0 ? undefined : r1;
@@ -3047,8 +3149,8 @@ export class Ship {
3047
3149
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3048
3150
  wasm.ship_fleet_los_factor(retptr, this.ptr);
3049
3151
  var r0 = getInt32Memory0()[retptr / 4 + 0];
3050
- var r1 = getFloat64Memory0()[retptr / 8 + 1];
3051
- return r0 === 0 ? undefined : r1;
3152
+ var r2 = getFloat64Memory0()[retptr / 8 + 1];
3153
+ return r0 === 0 ? undefined : r2;
3052
3154
  } finally {
3053
3155
  wasm.__wbindgen_add_to_stack_pointer(16);
3054
3156
  }
@@ -3068,6 +3170,14 @@ export class Ship {
3068
3170
  return ret;
3069
3171
  }
3070
3172
  /**
3173
+ * @param {boolean} is_night
3174
+ * @returns {number}
3175
+ */
3176
+ fit_gun_bonus(is_night) {
3177
+ var ret = wasm.ship_fit_gun_bonus(this.ptr, is_night);
3178
+ return ret;
3179
+ }
3180
+ /**
3071
3181
  * @returns {number | undefined}
3072
3182
  */
3073
3183
  basic_accuracy_term() {
@@ -3075,8 +3185,8 @@ export class Ship {
3075
3185
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3076
3186
  wasm.ship_basic_accuracy_term(retptr, this.ptr);
3077
3187
  var r0 = getInt32Memory0()[retptr / 4 + 0];
3078
- var r1 = getFloat64Memory0()[retptr / 8 + 1];
3079
- return r0 === 0 ? undefined : r1;
3188
+ var r2 = getFloat64Memory0()[retptr / 8 + 1];
3189
+ return r0 === 0 ? undefined : r2;
3080
3190
  } finally {
3081
3191
  wasm.__wbindgen_add_to_stack_pointer(16);
3082
3192
  }
@@ -3089,8 +3199,8 @@ export class Ship {
3089
3199
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3090
3200
  wasm.ship_basic_evasion_term(retptr, this.ptr);
3091
3201
  var r0 = getInt32Memory0()[retptr / 4 + 0];
3092
- var r1 = getFloat64Memory0()[retptr / 8 + 1];
3093
- return r0 === 0 ? undefined : r1;
3202
+ var r2 = getFloat64Memory0()[retptr / 8 + 1];
3203
+ return r0 === 0 ? undefined : r2;
3094
3204
  } finally {
3095
3205
  wasm.__wbindgen_add_to_stack_pointer(16);
3096
3206
  }
@@ -3106,8 +3216,8 @@ export class Ship {
3106
3216
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3107
3217
  wasm.ship_evasion_term(retptr, this.ptr, formation_mod, postcap_additive, postcap_multiplicative);
3108
3218
  var r0 = getInt32Memory0()[retptr / 4 + 0];
3109
- var r1 = getFloat64Memory0()[retptr / 8 + 1];
3110
- return r0 === 0 ? undefined : r1;
3219
+ var r2 = getFloat64Memory0()[retptr / 8 + 1];
3220
+ return r0 === 0 ? undefined : r2;
3111
3221
  } finally {
3112
3222
  wasm.__wbindgen_add_to_stack_pointer(16);
3113
3223
  }
@@ -3121,8 +3231,8 @@ export class Ship {
3121
3231
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3122
3232
  wasm.ship_basic_defense_power(retptr, this.ptr, armor_penetration);
3123
3233
  var r0 = getInt32Memory0()[retptr / 4 + 0];
3124
- var r1 = getFloat64Memory0()[retptr / 8 + 1];
3125
- return r0 === 0 ? undefined : r1;
3234
+ var r2 = getFloat64Memory0()[retptr / 8 + 1];
3235
+ return r0 === 0 ? undefined : r2;
3126
3236
  } finally {
3127
3237
  wasm.__wbindgen_add_to_stack_pointer(16);
3128
3238
  }
@@ -3159,8 +3269,8 @@ export class Ship {
3159
3269
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3160
3270
  wasm.ship_elos(retptr, this.ptr, node_divaricated_factor);
3161
3271
  var r0 = getInt32Memory0()[retptr / 4 + 0];
3162
- var r1 = getFloat64Memory0()[retptr / 8 + 1];
3163
- return r0 === 0 ? undefined : r1;
3272
+ var r2 = getFloat64Memory0()[retptr / 8 + 1];
3273
+ return r0 === 0 ? undefined : r2;
3164
3274
  } finally {
3165
3275
  wasm.__wbindgen_add_to_stack_pointer(16);
3166
3276
  }
@@ -3196,7 +3306,7 @@ export function __wbindgen_json_parse(arg0, arg1) {
3196
3306
  return addHeapObject(ret);
3197
3307
  };
3198
3308
 
3199
- export function __wbg_error_cc38ce2b4b661e1d(arg0) {
3309
+ export function __wbg_error_ca520cb687b085a1(arg0) {
3200
3310
  console.error(getObject(arg0));
3201
3311
  };
3202
3312
 
@@ -3221,15 +3331,15 @@ export function __wbg_error_09919627ac0992f5(arg0, arg1) {
3221
3331
  }
3222
3332
  };
3223
3333
 
3224
- export function __wbg_randomFillSync_59fcc2add91fe7b3() { return handleError(function (arg0, arg1, arg2) {
3334
+ export function __wbg_randomFillSync_378e02b85af41ab6() { return handleError(function (arg0, arg1, arg2) {
3225
3335
  getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
3226
3336
  }, arguments) };
3227
3337
 
3228
- export function __wbg_getRandomValues_3e46aa268da0fed1() { return handleError(function (arg0, arg1) {
3338
+ export function __wbg_getRandomValues_99bbe8a65f4aef87() { return handleError(function (arg0, arg1) {
3229
3339
  getObject(arg0).getRandomValues(getObject(arg1));
3230
3340
  }, arguments) };
3231
3341
 
3232
- export function __wbg_process_f2b73829dbd321da(arg0) {
3342
+ export function __wbg_process_5729605ce9d34ea8(arg0) {
3233
3343
  var ret = getObject(arg0).process;
3234
3344
  return addHeapObject(ret);
3235
3345
  };
@@ -3240,12 +3350,12 @@ export function __wbindgen_is_object(arg0) {
3240
3350
  return ret;
3241
3351
  };
3242
3352
 
3243
- export function __wbg_versions_cd82f79c98672a9f(arg0) {
3353
+ export function __wbg_versions_531e16e1a776ee97(arg0) {
3244
3354
  var ret = getObject(arg0).versions;
3245
3355
  return addHeapObject(ret);
3246
3356
  };
3247
3357
 
3248
- export function __wbg_node_ee3f6da4130bd35f(arg0) {
3358
+ export function __wbg_node_18b58a160b60d170(arg0) {
3249
3359
  var ret = getObject(arg0).node;
3250
3360
  return addHeapObject(ret);
3251
3361
  };
@@ -3255,27 +3365,32 @@ export function __wbindgen_is_string(arg0) {
3255
3365
  return ret;
3256
3366
  };
3257
3367
 
3258
- export function __wbg_modulerequire_0a83c0c31d12d2c7() { return handleError(function (arg0, arg1) {
3259
- var ret = module.require(getStringFromWasm0(arg0, arg1));
3368
+ export function __wbg_static_accessor_NODE_MODULE_bdc5ca9096c68aeb() {
3369
+ var ret = module;
3370
+ return addHeapObject(ret);
3371
+ };
3372
+
3373
+ export function __wbg_require_edfaedd93e302925() { return handleError(function (arg0, arg1, arg2) {
3374
+ var ret = getObject(arg0).require(getStringFromWasm0(arg1, arg2));
3260
3375
  return addHeapObject(ret);
3261
3376
  }, arguments) };
3262
3377
 
3263
- export function __wbg_crypto_9e3521ed42436d35(arg0) {
3378
+ export function __wbg_crypto_2bc4d5b05161de5b(arg0) {
3264
3379
  var ret = getObject(arg0).crypto;
3265
3380
  return addHeapObject(ret);
3266
3381
  };
3267
3382
 
3268
- export function __wbg_msCrypto_c429c3f8f7a70bb5(arg0) {
3383
+ export function __wbg_msCrypto_d003eebe62c636a9(arg0) {
3269
3384
  var ret = getObject(arg0).msCrypto;
3270
3385
  return addHeapObject(ret);
3271
3386
  };
3272
3387
 
3273
- export function __wbg_newnoargs_be86524d73f67598(arg0, arg1) {
3388
+ export function __wbg_newnoargs_f579424187aa1717(arg0, arg1) {
3274
3389
  var ret = new Function(getStringFromWasm0(arg0, arg1));
3275
3390
  return addHeapObject(ret);
3276
3391
  };
3277
3392
 
3278
- export function __wbg_call_888d259a5fefc347() { return handleError(function (arg0, arg1) {
3393
+ export function __wbg_call_89558c3e96703ca1() { return handleError(function (arg0, arg1) {
3279
3394
  var ret = getObject(arg0).call(getObject(arg1));
3280
3395
  return addHeapObject(ret);
3281
3396
  }, arguments) };
@@ -3285,27 +3400,27 @@ export function __wbindgen_object_clone_ref(arg0) {
3285
3400
  return addHeapObject(ret);
3286
3401
  };
3287
3402
 
3288
- export function __wbg_call_8a893cac80deeb51() { return handleError(function (arg0, arg1, arg2, arg3) {
3403
+ export function __wbg_call_471669b9b42539e5() { return handleError(function (arg0, arg1, arg2, arg3) {
3289
3404
  var ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
3290
3405
  return addHeapObject(ret);
3291
3406
  }, arguments) };
3292
3407
 
3293
- export function __wbg_self_c6fbdfc2918d5e58() { return handleError(function () {
3408
+ export function __wbg_self_e23d74ae45fb17d1() { return handleError(function () {
3294
3409
  var ret = self.self;
3295
3410
  return addHeapObject(ret);
3296
3411
  }, arguments) };
3297
3412
 
3298
- export function __wbg_window_baec038b5ab35c54() { return handleError(function () {
3413
+ export function __wbg_window_b4be7f48b24ac56e() { return handleError(function () {
3299
3414
  var ret = window.window;
3300
3415
  return addHeapObject(ret);
3301
3416
  }, arguments) };
3302
3417
 
3303
- export function __wbg_globalThis_3f735a5746d41fbd() { return handleError(function () {
3418
+ export function __wbg_globalThis_d61b1f48a57191ae() { return handleError(function () {
3304
3419
  var ret = globalThis.globalThis;
3305
3420
  return addHeapObject(ret);
3306
3421
  }, arguments) };
3307
3422
 
3308
- export function __wbg_global_1bc0b39582740e95() { return handleError(function () {
3423
+ export function __wbg_global_e7669da72fd7f239() { return handleError(function () {
3309
3424
  var ret = global.global;
3310
3425
  return addHeapObject(ret);
3311
3426
  }, arguments) };
@@ -3315,31 +3430,31 @@ export function __wbindgen_is_undefined(arg0) {
3315
3430
  return ret;
3316
3431
  };
3317
3432
 
3318
- export function __wbg_buffer_397eaa4d72ee94dd(arg0) {
3433
+ export function __wbg_buffer_5e74a88a1424a2e0(arg0) {
3319
3434
  var ret = getObject(arg0).buffer;
3320
3435
  return addHeapObject(ret);
3321
3436
  };
3322
3437
 
3323
- export function __wbg_new_a7ce447f15ff496f(arg0) {
3438
+ export function __wbg_new_e3b800e570795b3c(arg0) {
3324
3439
  var ret = new Uint8Array(getObject(arg0));
3325
3440
  return addHeapObject(ret);
3326
3441
  };
3327
3442
 
3328
- export function __wbg_set_969ad0a60e51d320(arg0, arg1, arg2) {
3443
+ export function __wbg_set_5b8081e9d002f0df(arg0, arg1, arg2) {
3329
3444
  getObject(arg0).set(getObject(arg1), arg2 >>> 0);
3330
3445
  };
3331
3446
 
3332
- export function __wbg_length_1eb8fc608a0d4cdb(arg0) {
3447
+ export function __wbg_length_30803400a8f15c59(arg0) {
3333
3448
  var ret = getObject(arg0).length;
3334
3449
  return ret;
3335
3450
  };
3336
3451
 
3337
- export function __wbg_newwithlength_929232475839a482(arg0) {
3452
+ export function __wbg_newwithlength_5f4ce114a24dfe1e(arg0) {
3338
3453
  var ret = new Uint8Array(arg0 >>> 0);
3339
3454
  return addHeapObject(ret);
3340
3455
  };
3341
3456
 
3342
- export function __wbg_subarray_8b658422a224f479(arg0, arg1, arg2) {
3457
+ export function __wbg_subarray_a68f835ca2af506f(arg0, arg1, arg2) {
3343
3458
  var ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
3344
3459
  return addHeapObject(ret);
3345
3460
  };
@@ -3356,10 +3471,6 @@ export function __wbindgen_throw(arg0, arg1) {
3356
3471
  throw new Error(getStringFromWasm0(arg0, arg1));
3357
3472
  };
3358
3473
 
3359
- export function __wbindgen_rethrow(arg0) {
3360
- throw takeObject(arg0);
3361
- };
3362
-
3363
3474
  export function __wbindgen_memory() {
3364
3475
  var ret = wasm.memory;
3365
3476
  return addHeapObject(ret);