@eveshipfit/ui-ingame 1.6.0 → 1.7.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.
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@ import './style.css';
2
2
  import { c } from "react/compiler-runtime";
3
3
  import { Activity, createContext, useContext, useDeferredValue, useEffect, useId, useRef, useState } from "react";
4
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
- import { formatClock, formatDuration, formatNumber, useAttribute, useAttributeTooltip, useBayContents, useBayUsage, useCanFit, useChargeSearch, useChargeTree, useChargedModules, useCharges, useDrag, useDroneRoom, useEngine, useFighterTubeUsage, useFighterTubes, useFit, useFitHistory, useFitPrice, useFitStore, useHardpoints, useHullTree, useImages, useLocalFits, useMissingSkills, useModes, useModuleSearch, useModuleTree, usePersonalFits, usePlacement, usePreview, useRackUsage, useSde, useShownSnapshot, useSlots, useSnapshot, useStats, useType } from "@eveshipfit/react-hooks";
5
+ import { formatClock, formatDuration, formatNumber, useAttribute, useAttributeTooltip, useBayContents, useBayUsage, useBoosters, useCanFit, useChargeSearch, useChargeTree, useChargedModules, useCharges, useDrag, useDroneRoom, useEngine, useFighterTubeUsage, useFighterTubes, useFit, useFitHistory, useFitPrice, useFitStore, useHardpoints, useHullTree, useImages, useImplantSearch, useImplantTree, useImplants, useLocalFits, useMissingSkills, useModes, useModuleSearch, useModuleTree, usePersonalFits, usePlacement, usePreview, useRackUsage, useSde, useShownSnapshot, useSlots, useSnapshot, useStats, useType } from "@eveshipfit/react-hooks";
6
6
  //#region src/primitives/Dialog/Dialog.module.css
7
7
  var Dialog_module_default = {
8
8
  "close": "kwi1cG_close",
@@ -995,6 +995,16 @@ function rackSize(rack) {
995
995
  function slotAngle(rack, index) {
996
996
  return racks$1[rack].first + index * racks$1[rack].step;
997
997
  }
998
+ /** Implants run down the left of the wheel, boosters mirror them on the right; in degrees. */
999
+ const augmentations = {
1000
+ first: 96,
1001
+ step: 6
1002
+ };
1003
+ /** The angle of the `position`th slot of a track, counted from its top; fractions place what goes between. */
1004
+ function augmentationAngle(kind, position) {
1005
+ const angle = augmentations.first + position * augmentations.step;
1006
+ return kind === "implant" ? -angle : angle;
1007
+ }
998
1008
  //#endregion
999
1009
  //#region src/primitives/Wheel/Wheel.module.css
1000
1010
  var Wheel_module_default = {
@@ -1072,19 +1082,19 @@ function Wheel(t0) {
1072
1082
  function polar(angle, radius) {
1073
1083
  const radians = angle * Math.PI / 180;
1074
1084
  return {
1075
- x: round(radius * Math.sin(radians)),
1076
- y: round(-radius * Math.cos(radians))
1085
+ x: round$1(radius * Math.sin(radians)),
1086
+ y: round$1(-radius * Math.cos(radians))
1077
1087
  };
1078
1088
  }
1079
1089
  /** Where an element's centre goes, in percentages of the wheel. */
1080
1090
  function placeAt(angle, radius) {
1081
1091
  const { x, y } = polar(angle, radius);
1082
1092
  return {
1083
- left: `${round(50 + x / 286 * 50)}%`,
1084
- top: `${round(50 + y / 286 * 50)}%`
1093
+ left: `${round$1(50 + x / 286 * 50)}%`,
1094
+ top: `${round$1(50 + y / 286 * 50)}%`
1085
1095
  };
1086
1096
  }
1087
- function round(value) {
1097
+ function round$1(value) {
1088
1098
  return Math.round(value * 1e3) / 1e3 + 0;
1089
1099
  }
1090
1100
  //#endregion
@@ -1212,7 +1222,7 @@ function SlotPress(t0) {
1212
1222
  className,
1213
1223
  "aria-label": label,
1214
1224
  onClick: onPress,
1215
- onKeyDown: _temp$18
1225
+ onKeyDown: _temp$19
1216
1226
  });
1217
1227
  $[0] = className;
1218
1228
  $[1] = label;
@@ -1221,7 +1231,7 @@ function SlotPress(t0) {
1221
1231
  } else t1 = $[3];
1222
1232
  return t1;
1223
1233
  }
1224
- function _temp$18(event) {
1234
+ function _temp$19(event) {
1225
1235
  if (event.key !== "Enter" && event.key !== " ") return;
1226
1236
  event.preventDefault();
1227
1237
  event.currentTarget.dispatchEvent(new MouseEvent("click", {
@@ -1421,7 +1431,7 @@ function WheelSlot(t0) {
1421
1431
  })
1422
1432
  });
1423
1433
  }
1424
- t8 = row.findLastIndex(_temp$17);
1434
+ t8 = row.findLastIndex(_temp$18);
1425
1435
  $[25] = chargeTypeId;
1426
1436
  $[26] = fitted;
1427
1437
  $[27] = onRemoveCharge;
@@ -1623,7 +1633,7 @@ function WheelSlot(t0) {
1623
1633
  } else t27 = $[94];
1624
1634
  return t27;
1625
1635
  }
1626
- function _temp$17(action) {
1636
+ function _temp$18(action) {
1627
1637
  return action !== void 0;
1628
1638
  }
1629
1639
  function frameTexture(fitted, preview, state, activatable) {
@@ -1804,7 +1814,7 @@ function useDecoded(src) {
1804
1814
  image.decode().then(() => {
1805
1815
  decoded.add(src);
1806
1816
  setReady(src);
1807
- }, _temp$16);
1817
+ }, _temp$17);
1808
1818
  };
1809
1819
  t1 = [src];
1810
1820
  $[0] = src;
@@ -1824,7 +1834,7 @@ function useDecoded(src) {
1824
1834
  } else t2 = $[5];
1825
1835
  return t2;
1826
1836
  }
1827
- function _temp$16() {}
1837
+ function _temp$17() {}
1828
1838
  function WheelGauge(t0) {
1829
1839
  const $ = c(15);
1830
1840
  const { resource, used, total, valueText } = t0;
@@ -2358,6 +2368,368 @@ function WheelModes(t0) {
2358
2368
  return t2;
2359
2369
  }
2360
2370
  //#endregion
2371
+ //#region src/primitives/Wheel/WheelAugmentation.module.css
2372
+ var WheelAugmentation_module_default = {
2373
+ "action": "BVBbxW_action",
2374
+ "actions": "BVBbxW_actions",
2375
+ "body": "BVBbxW_body",
2376
+ "bridge": "BVBbxW_bridge",
2377
+ "frame": "BVBbxW_frame",
2378
+ "icon": "BVBbxW_icon",
2379
+ "marker": "BVBbxW_marker",
2380
+ "number": "BVBbxW_number",
2381
+ "slot": "BVBbxW_slot",
2382
+ "track": "BVBbxW_track"
2383
+ };
2384
+ //#endregion
2385
+ //#region src/primitives/Wheel/WheelAugmentationTrack.tsx
2386
+ const BOOSTER_MARKET_GROUP_ID = 977;
2387
+ const markerRadius = {
2388
+ implant: 323,
2389
+ booster: 319
2390
+ };
2391
+ /** The band implant or booster slots sit on, outside the wheel, with an icon at its top. */
2392
+ function WheelAugmentationTrack(t0) {
2393
+ const $ = c(24);
2394
+ const { kind, length } = t0;
2395
+ const images = useImages();
2396
+ let t1;
2397
+ if ($[0] !== images || $[1] !== kind) {
2398
+ t1 = kind === "implant" ? images.uiTexture("windowicons/augmentations") : images.marketGroupIcon(BOOSTER_MARKET_GROUP_ID);
2399
+ $[0] = images;
2400
+ $[1] = kind;
2401
+ $[2] = t1;
2402
+ } else t1 = $[2];
2403
+ const icon = t1;
2404
+ let t2;
2405
+ if ($[3] !== kind) {
2406
+ t2 = polar(augmentationAngle(kind, -.35), 319);
2407
+ $[3] = kind;
2408
+ $[4] = t2;
2409
+ } else t2 = $[4];
2410
+ const start = t2;
2411
+ let t3;
2412
+ if ($[5] !== kind || $[6] !== length) {
2413
+ t3 = polar(augmentationAngle(kind, length - .65), 319);
2414
+ $[5] = kind;
2415
+ $[6] = length;
2416
+ $[7] = t3;
2417
+ } else t3 = $[7];
2418
+ const end = t3;
2419
+ const sweep = kind === "implant" ? 0 : 1;
2420
+ const t4 = `M ${start.x} ${start.y} A 319 319 0 0 ${sweep} ${end.x} ${end.y}`;
2421
+ let t5;
2422
+ if ($[8] !== t4) {
2423
+ t5 = /* @__PURE__ */ jsx("svg", {
2424
+ className: WheelAugmentation_module_default.track,
2425
+ viewBox: `-286 -286 572 572`,
2426
+ "aria-hidden": true,
2427
+ children: /* @__PURE__ */ jsx("path", { d: t4 })
2428
+ });
2429
+ $[8] = t4;
2430
+ $[9] = t5;
2431
+ } else t5 = $[9];
2432
+ let t6;
2433
+ if ($[10] !== kind) {
2434
+ t6 = placeAt(augmentationAngle(kind, -1.3), markerRadius[kind]);
2435
+ $[10] = kind;
2436
+ $[11] = t6;
2437
+ } else t6 = $[11];
2438
+ const t7 = kind === "implant" ? "Implants" : "Boosters";
2439
+ let t8;
2440
+ if ($[12] !== icon || $[13] !== kind) {
2441
+ t8 = /* @__PURE__ */ jsx("img", {
2442
+ src: icon,
2443
+ alt: "",
2444
+ "data-marker": kind,
2445
+ draggable: false
2446
+ });
2447
+ $[12] = icon;
2448
+ $[13] = kind;
2449
+ $[14] = t8;
2450
+ } else t8 = $[14];
2451
+ let t9;
2452
+ if ($[15] !== t7 || $[16] !== t8) {
2453
+ t9 = /* @__PURE__ */ jsx(Tooltip, {
2454
+ label: t7,
2455
+ children: t8
2456
+ });
2457
+ $[15] = t7;
2458
+ $[16] = t8;
2459
+ $[17] = t9;
2460
+ } else t9 = $[17];
2461
+ let t10;
2462
+ if ($[18] !== t6 || $[19] !== t9) {
2463
+ t10 = /* @__PURE__ */ jsx("span", {
2464
+ className: WheelAugmentation_module_default.marker,
2465
+ style: t6,
2466
+ children: t9
2467
+ });
2468
+ $[18] = t6;
2469
+ $[19] = t9;
2470
+ $[20] = t10;
2471
+ } else t10 = $[20];
2472
+ let t11;
2473
+ if ($[21] !== t10 || $[22] !== t5) {
2474
+ t11 = /* @__PURE__ */ jsxs(Fragment, { children: [t5, t10] });
2475
+ $[21] = t10;
2476
+ $[22] = t5;
2477
+ $[23] = t11;
2478
+ } else t11 = $[23];
2479
+ return t11;
2480
+ }
2481
+ const slotGap = 3;
2482
+ const unfitOffset = 28.99;
2483
+ const bridgeOffset = 19.25;
2484
+ /** A small slot for an implant or a booster, on its `WheelAugmentationTrack`. */
2485
+ function WheelAugmentationSlot(t0) {
2486
+ const $ = c(64);
2487
+ let className;
2488
+ let kind;
2489
+ let number;
2490
+ let onDragEnd;
2491
+ let onDragStart;
2492
+ let onUnfit;
2493
+ let position;
2494
+ let props;
2495
+ let style;
2496
+ let t1;
2497
+ let tooltip;
2498
+ let typeId;
2499
+ let typeName;
2500
+ if ($[0] !== t0) {
2501
+ ({kind, position, number, typeId, typeName, preview: t1, tooltip, onDragStart, onDragEnd, onUnfit, className, style, ...props} = t0);
2502
+ $[0] = t0;
2503
+ $[1] = className;
2504
+ $[2] = kind;
2505
+ $[3] = number;
2506
+ $[4] = onDragEnd;
2507
+ $[5] = onDragStart;
2508
+ $[6] = onUnfit;
2509
+ $[7] = position;
2510
+ $[8] = props;
2511
+ $[9] = style;
2512
+ $[10] = t1;
2513
+ $[11] = tooltip;
2514
+ $[12] = typeId;
2515
+ $[13] = typeName;
2516
+ } else {
2517
+ className = $[1];
2518
+ kind = $[2];
2519
+ number = $[3];
2520
+ onDragEnd = $[4];
2521
+ onDragStart = $[5];
2522
+ onUnfit = $[6];
2523
+ position = $[7];
2524
+ props = $[8];
2525
+ style = $[9];
2526
+ t1 = $[10];
2527
+ tooltip = $[11];
2528
+ typeId = $[12];
2529
+ typeName = $[13];
2530
+ }
2531
+ const preview = t1 === void 0 ? false : t1;
2532
+ let bridge;
2533
+ let t2;
2534
+ let t3;
2535
+ let t4;
2536
+ let unfit;
2537
+ if ($[14] !== className || $[15] !== kind || $[16] !== position || $[17] !== props) {
2538
+ const angle = augmentationAngle(kind, position);
2539
+ unfit = polar(angle, unfitOffset);
2540
+ bridge = polar(angle, bridgeOffset);
2541
+ t3 = props;
2542
+ let t5;
2543
+ if ($[23] !== className) {
2544
+ t5 = [WheelAugmentation_module_default.slot, className].filter(Boolean);
2545
+ $[23] = className;
2546
+ $[24] = t5;
2547
+ } else t5 = $[24];
2548
+ t4 = t5.join(" ");
2549
+ t2 = placeAt(angle, 319);
2550
+ $[14] = className;
2551
+ $[15] = kind;
2552
+ $[16] = position;
2553
+ $[17] = props;
2554
+ $[18] = bridge;
2555
+ $[19] = t2;
2556
+ $[20] = t3;
2557
+ $[21] = t4;
2558
+ $[22] = unfit;
2559
+ } else {
2560
+ bridge = $[18];
2561
+ t2 = $[19];
2562
+ t3 = $[20];
2563
+ t4 = $[21];
2564
+ unfit = $[22];
2565
+ }
2566
+ let t5;
2567
+ if ($[25] !== style || $[26] !== t2) {
2568
+ t5 = {
2569
+ ...t2,
2570
+ ...style
2571
+ };
2572
+ $[25] = style;
2573
+ $[26] = t2;
2574
+ $[27] = t5;
2575
+ } else t5 = $[27];
2576
+ const t6 = typeId !== void 0 || void 0;
2577
+ const t7 = preview || void 0;
2578
+ let t8;
2579
+ if ($[28] !== onUnfit) {
2580
+ t8 = onUnfit && ((event) => {
2581
+ event.preventDefault();
2582
+ onUnfit();
2583
+ });
2584
+ $[28] = onUnfit;
2585
+ $[29] = t8;
2586
+ } else t8 = $[29];
2587
+ const t9 = onDragStart !== void 0 || void 0;
2588
+ let t10;
2589
+ if ($[30] !== kind || $[31] !== position) {
2590
+ t10 = framePath(kind, position);
2591
+ $[30] = kind;
2592
+ $[31] = position;
2593
+ $[32] = t10;
2594
+ } else t10 = $[32];
2595
+ let t11;
2596
+ if ($[33] !== t10) {
2597
+ t11 = /* @__PURE__ */ jsx("svg", {
2598
+ className: WheelAugmentation_module_default.frame,
2599
+ viewBox: `-16 -16 32 32`,
2600
+ "aria-hidden": true,
2601
+ children: /* @__PURE__ */ jsx("path", { d: t10 })
2602
+ });
2603
+ $[33] = t10;
2604
+ $[34] = t11;
2605
+ } else t11 = $[34];
2606
+ let t12;
2607
+ if ($[35] !== number || $[36] !== typeId) {
2608
+ t12 = typeId !== void 0 ? /* @__PURE__ */ jsx("span", {
2609
+ className: WheelAugmentation_module_default.icon,
2610
+ children: /* @__PURE__ */ jsx(TypeIcon, {
2611
+ typeId,
2612
+ size: 64,
2613
+ marker: false
2614
+ })
2615
+ }) : number !== void 0 && /* @__PURE__ */ jsx("span", {
2616
+ className: WheelAugmentation_module_default.number,
2617
+ children: number
2618
+ });
2619
+ $[35] = number;
2620
+ $[36] = typeId;
2621
+ $[37] = t12;
2622
+ } else t12 = $[37];
2623
+ let t13;
2624
+ if ($[38] !== onDragEnd || $[39] !== onDragStart || $[40] !== t11 || $[41] !== t12 || $[42] !== t9) {
2625
+ t13 = /* @__PURE__ */ jsxs("div", {
2626
+ className: WheelAugmentation_module_default.body,
2627
+ draggable: t9,
2628
+ onDragStart,
2629
+ onDragEnd,
2630
+ children: [t11, t12]
2631
+ });
2632
+ $[38] = onDragEnd;
2633
+ $[39] = onDragStart;
2634
+ $[40] = t11;
2635
+ $[41] = t12;
2636
+ $[42] = t9;
2637
+ $[43] = t13;
2638
+ } else t13 = $[43];
2639
+ let t14;
2640
+ if ($[44] !== t13 || $[45] !== tooltip) {
2641
+ t14 = /* @__PURE__ */ jsx(Tooltip, {
2642
+ label: tooltip,
2643
+ children: t13
2644
+ });
2645
+ $[44] = t13;
2646
+ $[45] = tooltip;
2647
+ $[46] = t14;
2648
+ } else t14 = $[46];
2649
+ let t15;
2650
+ if ($[47] !== bridge || $[48] !== kind || $[49] !== onUnfit || $[50] !== typeId || $[51] !== typeName || $[52] !== unfit) {
2651
+ t15 = typeId !== void 0 && onUnfit && /* @__PURE__ */ jsxs("fieldset", {
2652
+ className: WheelAugmentation_module_default.actions,
2653
+ "aria-label": typeName,
2654
+ children: [/* @__PURE__ */ jsx("span", {
2655
+ className: WheelAugmentation_module_default.bridge,
2656
+ style: {
2657
+ "--x": bridge.x,
2658
+ "--y": bridge.y
2659
+ }
2660
+ }), /* @__PURE__ */ jsx("span", {
2661
+ className: WheelAugmentation_module_default.action,
2662
+ style: {
2663
+ "--x": unfit.x,
2664
+ "--y": unfit.y
2665
+ },
2666
+ children: /* @__PURE__ */ jsx(SlotAction, {
2667
+ icon: "module-unfit",
2668
+ label: kind === "implant" ? "Unfit Implant" : "Unfit Booster",
2669
+ onPress: onUnfit
2670
+ })
2671
+ })]
2672
+ });
2673
+ $[47] = bridge;
2674
+ $[48] = kind;
2675
+ $[49] = onUnfit;
2676
+ $[50] = typeId;
2677
+ $[51] = typeName;
2678
+ $[52] = unfit;
2679
+ $[53] = t15;
2680
+ } else t15 = $[53];
2681
+ let t16;
2682
+ if ($[54] !== kind || $[55] !== t14 || $[56] !== t15 || $[57] !== t3 || $[58] !== t4 || $[59] !== t5 || $[60] !== t6 || $[61] !== t7 || $[62] !== t8) {
2683
+ t16 = /* @__PURE__ */ jsxs("div", {
2684
+ ...t3,
2685
+ className: t4,
2686
+ style: t5,
2687
+ "data-kind": kind,
2688
+ "data-filled": t6,
2689
+ "data-preview": t7,
2690
+ onContextMenu: t8,
2691
+ children: [t14, t15]
2692
+ });
2693
+ $[54] = kind;
2694
+ $[55] = t14;
2695
+ $[56] = t15;
2696
+ $[57] = t3;
2697
+ $[58] = t4;
2698
+ $[59] = t5;
2699
+ $[60] = t6;
2700
+ $[61] = t7;
2701
+ $[62] = t8;
2702
+ $[63] = t16;
2703
+ } else t16 = $[63];
2704
+ return t16;
2705
+ }
2706
+ /** The slot as a piece of its track, around its centre; the gaps to its neighbours as wide inside as out. */
2707
+ function framePath(kind, position) {
2708
+ const centre = polar(augmentationAngle(kind, position), 319);
2709
+ const corner = (side, radius) => {
2710
+ const edge = augmentationAngle(kind, position + side) * Math.PI / 180;
2711
+ const along = Math.sqrt(radius * radius - (slotGap / 2) ** 2);
2712
+ const off = slotGap / 2 * Math.sign(augmentationAngle(kind, position) - augmentationAngle(kind, position + side));
2713
+ const x = along * Math.sin(edge) + off * Math.cos(edge);
2714
+ const y = -along * Math.cos(edge) + off * Math.sin(edge);
2715
+ return `${round(x - centre.x)} ${round(y - centre.y)}`;
2716
+ };
2717
+ const inner = 303;
2718
+ const outer = 335;
2719
+ const sweep = augmentationAngle(kind, position + .5) > augmentationAngle(kind, position) ? 1 : 0;
2720
+ return [
2721
+ `M ${corner(-.5, inner)}`,
2722
+ `L ${corner(-.5, outer)}`,
2723
+ `A ${outer} ${outer} 0 0 ${sweep} ${corner(.5, outer)}`,
2724
+ `L ${corner(.5, inner)}`,
2725
+ `A ${inner} ${inner} 0 0 ${1 - sweep} ${corner(-.5, inner)}`,
2726
+ "Z"
2727
+ ].join(" ");
2728
+ }
2729
+ function round(value) {
2730
+ return Math.round(value * 100) / 100;
2731
+ }
2732
+ //#endregion
2361
2733
  //#region src/components/ShipStatistics/units.ts
2362
2734
  /** For the `format` of `useAttribute`. */
2363
2735
  function unit(suffix, divisor = 1) {
@@ -3051,7 +3423,7 @@ function SensorStrengths(t0) {
3051
3423
  if ($[0] !== strengths) {
3052
3424
  t4 = Symbol.for("react.early_return_sentinel");
3053
3425
  bb0: {
3054
- const shown = strengths.filter(_temp$15);
3426
+ const shown = strengths.filter(_temp$16);
3055
3427
  if (shown.length === 0) {
3056
3428
  t4 = null;
3057
3429
  break bb0;
@@ -3106,7 +3478,7 @@ function _temp2$10(strength) {
3106
3478
  strength.displayName
3107
3479
  ] }, strength.name);
3108
3480
  }
3109
- function _temp$15(t0) {
3481
+ function _temp$16(t0) {
3110
3482
  const { value } = t0;
3111
3483
  return value;
3112
3484
  }
@@ -3154,14 +3526,14 @@ function Cloak(t0) {
3154
3526
  itemRef,
3155
3527
  name: "maxVelocityModifier",
3156
3528
  decimals: 0,
3157
- format: _temp$14
3529
+ format: _temp$15
3158
3530
  });
3159
3531
  $[0] = itemRef;
3160
3532
  $[1] = t1;
3161
3533
  } else t1 = $[1];
3162
3534
  return t1;
3163
3535
  }
3164
- function _temp$14(value, format) {
3536
+ function _temp$15(value, format) {
3165
3537
  return percent((value - 1) * 100, format);
3166
3538
  }
3167
3539
  //#endregion
@@ -3689,7 +4061,7 @@ function DamageTypes(t0) {
3689
4061
  t4,
3690
4062
  t5,
3691
4063
  t6
3692
- ].filter(_temp$13);
4064
+ ].filter(_temp$14);
3693
4065
  $[0] = t3;
3694
4066
  $[1] = t4;
3695
4067
  $[2] = t5;
@@ -3757,7 +4129,7 @@ function _temp2$9(t0) {
3757
4129
  text
3758
4130
  }, name_0);
3759
4131
  }
3760
- function _temp$13(damage) {
4132
+ function _temp$14(damage) {
3761
4133
  return damage.value;
3762
4134
  }
3763
4135
  function useDamage(name, itemRef, charge) {
@@ -4007,9 +4379,9 @@ function Resistance$1(t0) {
4007
4379
  /** The resistances a module gives, for every layer. */
4008
4380
  function _temp2$8(t0) {
4009
4381
  const { resistances } = t0;
4010
- return resistances.some(_temp$12);
4382
+ return resistances.some(_temp$13);
4011
4383
  }
4012
- function _temp$12(t0) {
4384
+ function _temp$13(t0) {
4013
4385
  const { value } = t0;
4014
4386
  return value !== 1;
4015
4387
  }
@@ -4217,7 +4589,7 @@ function ResistanceBonus(t0) {
4217
4589
  t3,
4218
4590
  t4,
4219
4591
  t5
4220
- ].filter(_temp$11);
4592
+ ].filter(_temp$12);
4221
4593
  const [first] = bonuses;
4222
4594
  if (first === void 0) {
4223
4595
  t6 = null;
@@ -4267,7 +4639,7 @@ function _temp2$7(t0) {
4267
4639
  text
4268
4640
  }, name);
4269
4641
  }
4270
- function _temp$11(bonus) {
4642
+ function _temp$12(bonus) {
4271
4643
  return bonus.value;
4272
4644
  }
4273
4645
  //#endregion
@@ -4370,14 +4742,14 @@ function SignatureSuppressor(t0) {
4370
4742
  itemRef,
4371
4743
  name: "signatureSuppressorSignatureRadiusBonusPassive",
4372
4744
  decimals: 0,
4373
- format: _temp$10
4745
+ format: _temp$11
4374
4746
  });
4375
4747
  $[0] = itemRef;
4376
4748
  $[1] = t1;
4377
4749
  } else t1 = $[1];
4378
4750
  return t1;
4379
4751
  }
4380
- function _temp$10(value, format) {
4752
+ function _temp$11(value, format) {
4381
4753
  return percent((1 - value) * 100, format);
4382
4754
  }
4383
4755
  //#endregion
@@ -4480,7 +4852,7 @@ function StasisWebifier(props) {
4480
4852
  t0 = {
4481
4853
  of: props.itemRef,
4482
4854
  decimals: 0,
4483
- format: _temp$9
4855
+ format: _temp$10
4484
4856
  };
4485
4857
  $[0] = props.itemRef;
4486
4858
  $[1] = t0;
@@ -4510,7 +4882,7 @@ function StasisWebifier(props) {
4510
4882
  } else t3 = $[8];
4511
4883
  return t3;
4512
4884
  }
4513
- function _temp$9(value, format) {
4885
+ function _temp$10(value, format) {
4514
4886
  return percent(-value, format);
4515
4887
  }
4516
4888
  //#endregion
@@ -5300,6 +5672,261 @@ function movesTo(fit, ref, rack, index) {
5300
5672
  return "index" in item.slot && item.slot.index !== index;
5301
5673
  }
5302
5674
  //#endregion
5675
+ //#region src/components/FittingWheel/FittingAugmentations.tsx
5676
+ /** The implants and boosters of the fit, on tracks outside the wheel. */
5677
+ function FittingAugmentations(t0) {
5678
+ const $ = c(16);
5679
+ const { readOnly } = t0;
5680
+ const implants = useImplants();
5681
+ const boosters = useBoosters();
5682
+ let t1;
5683
+ if ($[0] !== implants || $[1] !== readOnly) {
5684
+ t1 = !readOnly || implants.some(_temp$9);
5685
+ $[0] = implants;
5686
+ $[1] = readOnly;
5687
+ $[2] = t1;
5688
+ } else t1 = $[2];
5689
+ const showImplants = t1;
5690
+ let t2;
5691
+ if ($[3] !== boosters || $[4] !== readOnly) {
5692
+ t2 = readOnly ? [...boosters] : [...boosters, void 0];
5693
+ $[3] = boosters;
5694
+ $[4] = readOnly;
5695
+ $[5] = t2;
5696
+ } else t2 = $[5];
5697
+ const boosterSlots = t2;
5698
+ let t3;
5699
+ if ($[6] !== implants || $[7] !== readOnly || $[8] !== showImplants) {
5700
+ t3 = showImplants && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(WheelAugmentationTrack, {
5701
+ kind: "implant",
5702
+ length: implants.length
5703
+ }), implants.map((content, position) => /* @__PURE__ */ jsx(FittingAugmentation, {
5704
+ kind: "implant",
5705
+ position,
5706
+ number: content.index,
5707
+ content,
5708
+ readOnly
5709
+ }, content.index))] });
5710
+ $[6] = implants;
5711
+ $[7] = readOnly;
5712
+ $[8] = showImplants;
5713
+ $[9] = t3;
5714
+ } else t3 = $[9];
5715
+ let t4;
5716
+ if ($[10] !== boosterSlots || $[11] !== readOnly) {
5717
+ t4 = boosterSlots.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(WheelAugmentationTrack, {
5718
+ kind: "booster",
5719
+ length: boosterSlots.length
5720
+ }), boosterSlots.map((content_0, position_0) => /* @__PURE__ */ jsx(FittingAugmentation, {
5721
+ kind: "booster",
5722
+ position: position_0,
5723
+ content: content_0,
5724
+ readOnly
5725
+ }, content_0?.index ?? "empty"))] });
5726
+ $[10] = boosterSlots;
5727
+ $[11] = readOnly;
5728
+ $[12] = t4;
5729
+ } else t4 = $[12];
5730
+ let t5;
5731
+ if ($[13] !== t3 || $[14] !== t4) {
5732
+ t5 = /* @__PURE__ */ jsxs(Fragment, { children: [t3, t4] });
5733
+ $[13] = t3;
5734
+ $[14] = t4;
5735
+ $[15] = t5;
5736
+ } else t5 = $[15];
5737
+ return t5;
5738
+ }
5739
+ function _temp$9(slot) {
5740
+ return slot.item !== void 0;
5741
+ }
5742
+ function FittingAugmentation(t0) {
5743
+ const $ = c(60);
5744
+ const { kind, position, number, content, readOnly } = t0;
5745
+ const store = useFitStore();
5746
+ const sde = useSde();
5747
+ const placement = usePlacement();
5748
+ const { show, clear } = usePreview();
5749
+ const { dragging, start, end } = useDrag();
5750
+ const item = content?.item;
5751
+ const type = useType(item?.type_id);
5752
+ const ref = content?.ref;
5753
+ const target = `${kind}-${content?.index ?? "empty"}`;
5754
+ let t1;
5755
+ if ($[0] !== kind || $[1] !== number) {
5756
+ t1 = number === void 0 ? void 0 : {
5757
+ type: kind,
5758
+ index: number
5759
+ };
5760
+ $[0] = kind;
5761
+ $[1] = number;
5762
+ $[2] = t1;
5763
+ } else t1 = $[2];
5764
+ const slot = t1;
5765
+ let t2;
5766
+ if ($[3] !== kind || $[4] !== number || $[5] !== placement || $[6] !== sde) {
5767
+ t2 = (drop) => {
5768
+ if (drop?.type !== "type") return false;
5769
+ const dropped = sde.type(drop.typeId);
5770
+ const place = dropped && placement(dropped);
5771
+ return place?.type === kind && (number === void 0 || place.index === number);
5772
+ };
5773
+ $[3] = kind;
5774
+ $[4] = number;
5775
+ $[5] = placement;
5776
+ $[6] = sde;
5777
+ $[7] = t2;
5778
+ } else t2 = $[7];
5779
+ const takes = t2;
5780
+ let t3;
5781
+ if ($[8] !== content || $[9] !== item || $[10] !== kind || $[11] !== type) {
5782
+ t3 = item && type && !content.preview && /* @__PURE__ */ jsxs("span", {
5783
+ className: ModuleTooltip_module_default.tooltip,
5784
+ children: [/* @__PURE__ */ jsx(TypeRow, { typeId: item.type_id }), /* @__PURE__ */ jsx("span", {
5785
+ className: ModuleTooltip_module_default.status,
5786
+ children: `${kind === "implant" ? "Implant" : "Booster"} Slot ${content.index}`
5787
+ })]
5788
+ });
5789
+ $[8] = content;
5790
+ $[9] = item;
5791
+ $[10] = kind;
5792
+ $[11] = type;
5793
+ $[12] = t3;
5794
+ } else t3 = $[12];
5795
+ const tooltip = t3;
5796
+ const t4 = item?.type_id;
5797
+ const t5 = type?.name;
5798
+ const t6 = content?.preview;
5799
+ const t7 = slot === void 0 ? void 0 : `${kind}-${number}`;
5800
+ let t8;
5801
+ if ($[13] !== kind || $[14] !== number || $[15] !== position || $[16] !== t4 || $[17] !== t5 || $[18] !== t6 || $[19] !== t7 || $[20] !== tooltip) {
5802
+ t8 = {
5803
+ kind,
5804
+ position,
5805
+ number,
5806
+ typeId: t4,
5807
+ typeName: t5,
5808
+ preview: t6,
5809
+ tooltip,
5810
+ "data-slot": t7
5811
+ };
5812
+ $[13] = kind;
5813
+ $[14] = number;
5814
+ $[15] = position;
5815
+ $[16] = t4;
5816
+ $[17] = t5;
5817
+ $[18] = t6;
5818
+ $[19] = t7;
5819
+ $[20] = tooltip;
5820
+ $[21] = t8;
5821
+ } else t8 = $[21];
5822
+ const shown = t8;
5823
+ if (readOnly) {
5824
+ let t9;
5825
+ if ($[22] !== shown) {
5826
+ t9 = /* @__PURE__ */ jsx(WheelAugmentationSlot, { ...shown });
5827
+ $[22] = shown;
5828
+ $[23] = t9;
5829
+ } else t9 = $[23];
5830
+ return t9;
5831
+ }
5832
+ let t9;
5833
+ if ($[24] !== ref || $[25] !== start || $[26] !== type?.name) {
5834
+ t9 = ref === void 0 ? void 0 : (event) => {
5835
+ event.dataTransfer.effectAllowed = "move";
5836
+ event.dataTransfer.setData("text/plain", type?.name ?? "");
5837
+ start({
5838
+ type: "item",
5839
+ ref
5840
+ });
5841
+ };
5842
+ $[24] = ref;
5843
+ $[25] = start;
5844
+ $[26] = type?.name;
5845
+ $[27] = t9;
5846
+ } else t9 = $[27];
5847
+ let t10;
5848
+ if ($[28] !== dragging || $[29] !== show || $[30] !== slot || $[31] !== takes || $[32] !== target) {
5849
+ t10 = () => {
5850
+ if (!takes(dragging)) return;
5851
+ const { typeId } = dragging;
5852
+ show((draft) => void draft.fit(typeId, slot), target);
5853
+ };
5854
+ $[28] = dragging;
5855
+ $[29] = show;
5856
+ $[30] = slot;
5857
+ $[31] = takes;
5858
+ $[32] = target;
5859
+ $[33] = t10;
5860
+ } else t10 = $[33];
5861
+ let t11;
5862
+ if ($[34] !== clear || $[35] !== target) {
5863
+ t11 = (event_0) => {
5864
+ if (event_0.currentTarget.contains(event_0.relatedTarget)) return;
5865
+ clear(target);
5866
+ };
5867
+ $[34] = clear;
5868
+ $[35] = target;
5869
+ $[36] = t11;
5870
+ } else t11 = $[36];
5871
+ let t12;
5872
+ if ($[37] !== dragging || $[38] !== takes) {
5873
+ t12 = (event_1) => {
5874
+ if (takes(dragging)) allowDrop(event_1, dragging);
5875
+ };
5876
+ $[37] = dragging;
5877
+ $[38] = takes;
5878
+ $[39] = t12;
5879
+ } else t12 = $[39];
5880
+ let t13;
5881
+ if ($[40] !== clear || $[41] !== dragging || $[42] !== end || $[43] !== slot || $[44] !== store || $[45] !== takes || $[46] !== target) {
5882
+ t13 = (event_2) => {
5883
+ if (!takes(dragging)) return;
5884
+ event_2.preventDefault();
5885
+ clear(target);
5886
+ store.fit(dragging.typeId, slot);
5887
+ end();
5888
+ };
5889
+ $[40] = clear;
5890
+ $[41] = dragging;
5891
+ $[42] = end;
5892
+ $[43] = slot;
5893
+ $[44] = store;
5894
+ $[45] = takes;
5895
+ $[46] = target;
5896
+ $[47] = t13;
5897
+ } else t13 = $[47];
5898
+ let t14;
5899
+ if ($[48] !== ref || $[49] !== store) {
5900
+ t14 = ref === void 0 ? void 0 : () => store.remove(ref);
5901
+ $[48] = ref;
5902
+ $[49] = store;
5903
+ $[50] = t14;
5904
+ } else t14 = $[50];
5905
+ let t15;
5906
+ if ($[51] !== end || $[52] !== shown || $[53] !== t10 || $[54] !== t11 || $[55] !== t12 || $[56] !== t13 || $[57] !== t14 || $[58] !== t9) {
5907
+ t15 = /* @__PURE__ */ jsx(WheelAugmentationSlot, {
5908
+ ...shown,
5909
+ onDragStart: t9,
5910
+ onDragEnd: end,
5911
+ onDragEnter: t10,
5912
+ onDragLeave: t11,
5913
+ onDragOver: t12,
5914
+ onDrop: t13,
5915
+ onUnfit: t14
5916
+ });
5917
+ $[51] = end;
5918
+ $[52] = shown;
5919
+ $[53] = t10;
5920
+ $[54] = t11;
5921
+ $[55] = t12;
5922
+ $[56] = t13;
5923
+ $[57] = t14;
5924
+ $[58] = t9;
5925
+ $[59] = t15;
5926
+ } else t15 = $[59];
5927
+ return t15;
5928
+ }
5929
+ //#endregion
5303
5930
  //#region src/components/FittingWheel/FittingWheel.module.css
5304
5931
  var FittingWheel_module_default = { "centre": "GK_wGG_centre" };
5305
5932
  //#endregion
@@ -5318,7 +5945,7 @@ const racks = [
5318
5945
  ];
5319
5946
  /** The fitting wheel of the fit in the surrounding `EveShipFitProvider`. */
5320
5947
  function FittingWheel(t0) {
5321
- const $ = c(24);
5948
+ const $ = c(28);
5322
5949
  const { label: t1, readOnly: t2, hideStats: t3, credit: t4 } = t0;
5323
5950
  const label = t1 === void 0 ? "Fitting" : t1;
5324
5951
  const readOnly = t2 === void 0 ? false : t2;
@@ -5326,6 +5953,7 @@ function FittingWheel(t0) {
5326
5953
  const credit = t4 === void 0 ? false : t4;
5327
5954
  const ship = useFit().ship.type_id;
5328
5955
  const { turret, launcher } = useHardpoints();
5956
+ const { structure } = useStats();
5329
5957
  let t5;
5330
5958
  if ($[0] !== ship) {
5331
5959
  t5 = /* @__PURE__ */ jsx(WheelHull, { typeId: ship });
@@ -5359,8 +5987,15 @@ function FittingWheel(t0) {
5359
5987
  $[8] = t9;
5360
5988
  } else t9 = $[8];
5361
5989
  let t10;
5362
- if ($[9] !== hideStats || $[10] !== launcher || $[11] !== turret) {
5363
- t10 = !hideStats && /* @__PURE__ */ jsxs(Fragment, { children: [
5990
+ if ($[9] !== readOnly || $[10] !== structure) {
5991
+ t10 = !structure && /* @__PURE__ */ jsx(FittingAugmentations, { readOnly });
5992
+ $[9] = readOnly;
5993
+ $[10] = structure;
5994
+ $[11] = t10;
5995
+ } else t10 = $[11];
5996
+ let t11;
5997
+ if ($[12] !== hideStats || $[13] !== launcher || $[14] !== turret) {
5998
+ t11 = !hideStats && /* @__PURE__ */ jsxs(Fragment, { children: [
5364
5999
  /* @__PURE__ */ jsx(WheelHardpoints, {
5365
6000
  turrets: turret,
5366
6001
  launchers: launcher
@@ -5381,20 +6016,20 @@ function FittingWheel(t0) {
5381
6016
  output: "upgradeCapacity"
5382
6017
  })
5383
6018
  ] });
5384
- $[9] = hideStats;
5385
- $[10] = launcher;
5386
- $[11] = turret;
5387
- $[12] = t10;
5388
- } else t10 = $[12];
5389
- let t11;
5390
- if ($[13] !== credit) {
5391
- t11 = credit ? /* @__PURE__ */ jsx(EveShipFitLink, { text: "generated by eveship.fit" }) : !onEveShipFit() && /* @__PURE__ */ jsx(EveShipFitLink, {});
5392
- $[13] = credit;
5393
- $[14] = t11;
5394
- } else t11 = $[14];
6019
+ $[12] = hideStats;
6020
+ $[13] = launcher;
6021
+ $[14] = turret;
6022
+ $[15] = t11;
6023
+ } else t11 = $[15];
5395
6024
  let t12;
5396
- if ($[15] !== hideStats || $[16] !== label || $[17] !== t10 || $[18] !== t11 || $[19] !== t5 || $[20] !== t6 || $[21] !== t8 || $[22] !== t9) {
5397
- t12 = /* @__PURE__ */ jsxs(Wheel, {
6025
+ if ($[16] !== credit) {
6026
+ t12 = credit ? /* @__PURE__ */ jsx(EveShipFitLink, { text: "generated by eveship.fit" }) : !onEveShipFit() && /* @__PURE__ */ jsx(EveShipFitLink, {});
6027
+ $[16] = credit;
6028
+ $[17] = t12;
6029
+ } else t12 = $[17];
6030
+ let t13;
6031
+ if ($[18] !== hideStats || $[19] !== label || $[20] !== t10 || $[21] !== t11 || $[22] !== t12 || $[23] !== t5 || $[24] !== t6 || $[25] !== t8 || $[26] !== t9) {
6032
+ t13 = /* @__PURE__ */ jsxs(Wheel, {
5398
6033
  label,
5399
6034
  hideScales: hideStats,
5400
6035
  children: [
@@ -5404,20 +6039,22 @@ function FittingWheel(t0) {
5404
6039
  t8,
5405
6040
  t9,
5406
6041
  t10,
5407
- t11
6042
+ t11,
6043
+ t12
5408
6044
  ]
5409
6045
  });
5410
- $[15] = hideStats;
5411
- $[16] = label;
5412
- $[17] = t10;
5413
- $[18] = t11;
5414
- $[19] = t5;
5415
- $[20] = t6;
5416
- $[21] = t8;
5417
- $[22] = t9;
5418
- $[23] = t12;
5419
- } else t12 = $[23];
5420
- return t12;
6046
+ $[18] = hideStats;
6047
+ $[19] = label;
6048
+ $[20] = t10;
6049
+ $[21] = t11;
6050
+ $[22] = t12;
6051
+ $[23] = t5;
6052
+ $[24] = t6;
6053
+ $[25] = t8;
6054
+ $[26] = t9;
6055
+ $[27] = t13;
6056
+ } else t13 = $[27];
6057
+ return t13;
5421
6058
  }
5422
6059
  function _temp$8(rack) {
5423
6060
  return /* @__PURE__ */ jsx(WheelRackMarker, { rack }, rack);
@@ -8955,6 +9592,47 @@ function TypeGroup(t0) {
8955
9592
  } else t4 = $[9];
8956
9593
  return t4;
8957
9594
  }
9595
+ /** A market group of an already sorted tree: its groups, then its types. */
9596
+ function MarketGroup(t0) {
9597
+ const $ = c(11);
9598
+ const { node, actions } = t0;
9599
+ const marketGroupIcon = useMarketGroupIcon();
9600
+ const t1 = node.group.name;
9601
+ let t2;
9602
+ if ($[0] !== marketGroupIcon || $[1] !== node.group.id) {
9603
+ t2 = marketGroupIcon(node.group.id);
9604
+ $[0] = marketGroupIcon;
9605
+ $[1] = node.group.id;
9606
+ $[2] = t2;
9607
+ } else t2 = $[2];
9608
+ let t3;
9609
+ if ($[3] !== actions || $[4] !== node.children || $[5] !== node.types) {
9610
+ t3 = () => /* @__PURE__ */ jsxs(Fragment, { children: [node.children.map((child) => /* @__PURE__ */ jsx(MarketGroup, {
9611
+ node: child,
9612
+ actions
9613
+ }, child.group.id)), node.types.map((type) => /* @__PURE__ */ jsx(TypeLeaf, {
9614
+ type,
9615
+ actions
9616
+ }, type.id))] });
9617
+ $[3] = actions;
9618
+ $[4] = node.children;
9619
+ $[5] = node.types;
9620
+ $[6] = t3;
9621
+ } else t3 = $[6];
9622
+ let t4;
9623
+ if ($[7] !== node.group.name || $[8] !== t2 || $[9] !== t3) {
9624
+ t4 = /* @__PURE__ */ jsx(TreeGroup, {
9625
+ label: t1,
9626
+ icon: t2,
9627
+ children: t3
9628
+ });
9629
+ $[7] = node.group.name;
9630
+ $[8] = t2;
9631
+ $[9] = t3;
9632
+ $[10] = t4;
9633
+ } else t4 = $[10];
9634
+ return t4;
9635
+ }
8958
9636
  /** Search results by root market group; a lone root shows only its types. */
8959
9637
  function SearchResults(t0) {
8960
9638
  const $ = c(8);
@@ -9124,7 +9802,7 @@ function Charges() {
9124
9802
  }) : matches !== void 0 ? /* @__PURE__ */ jsx(SearchResults, {
9125
9803
  roots: found,
9126
9804
  actions
9127
- }) : groups.map((node) => /* @__PURE__ */ jsx(ChargeGroup, {
9805
+ }) : groups.map((node) => /* @__PURE__ */ jsx(MarketGroup, {
9128
9806
  node,
9129
9807
  actions
9130
9808
  }, node.group.id))
@@ -9156,46 +9834,6 @@ function Charges() {
9156
9834
  } else t11 = $[47];
9157
9835
  return t11;
9158
9836
  }
9159
- function ChargeGroup(t0) {
9160
- const $ = c(11);
9161
- const { node, actions } = t0;
9162
- const marketGroupIcon = useMarketGroupIcon();
9163
- const t1 = node.group.name;
9164
- let t2;
9165
- if ($[0] !== marketGroupIcon || $[1] !== node.group.id) {
9166
- t2 = marketGroupIcon(node.group.id);
9167
- $[0] = marketGroupIcon;
9168
- $[1] = node.group.id;
9169
- $[2] = t2;
9170
- } else t2 = $[2];
9171
- let t3;
9172
- if ($[3] !== actions || $[4] !== node.children || $[5] !== node.types) {
9173
- t3 = () => /* @__PURE__ */ jsxs(Fragment, { children: [node.children.map((child) => /* @__PURE__ */ jsx(ChargeGroup, {
9174
- node: child,
9175
- actions
9176
- }, child.group.id)), node.types.map((type) => /* @__PURE__ */ jsx(TypeLeaf, {
9177
- type,
9178
- actions
9179
- }, type.id))] });
9180
- $[3] = actions;
9181
- $[4] = node.children;
9182
- $[5] = node.types;
9183
- $[6] = t3;
9184
- } else t3 = $[6];
9185
- let t4;
9186
- if ($[7] !== node.group.name || $[8] !== t2 || $[9] !== t3) {
9187
- t4 = /* @__PURE__ */ jsx(TreeGroup, {
9188
- label: t1,
9189
- icon: t2,
9190
- children: t3
9191
- });
9192
- $[7] = node.group.name;
9193
- $[8] = t2;
9194
- $[9] = t3;
9195
- $[10] = t4;
9196
- } else t4 = $[10];
9197
- return t4;
9198
- }
9199
9837
  //#endregion
9200
9838
  //#region src/components/ItemBrowser/FitActions.tsx
9201
9839
  const FLASH_MS = 2e3;
@@ -10287,6 +10925,96 @@ function raceName(race) {
10287
10925
  return race === "other" ? "Non-Empire" : race.charAt(0).toUpperCase() + race.slice(1);
10288
10926
  }
10289
10927
  //#endregion
10928
+ //#region src/components/ItemBrowser/Implants.tsx
10929
+ /** The Implants tab of the `ItemBrowser`: implants and boosters by market group. */
10930
+ function Implants() {
10931
+ const $ = c(22);
10932
+ const { actions, clear, dragImage } = useTypeActions();
10933
+ const [search, setSearch] = useState("");
10934
+ const [collapses, setCollapses] = useState(0);
10935
+ let t0;
10936
+ if ($[0] !== search) {
10937
+ t0 = search.trim().toLowerCase();
10938
+ $[0] = search;
10939
+ $[1] = t0;
10940
+ } else t0 = $[1];
10941
+ const query = t0;
10942
+ let t1;
10943
+ if ($[2] !== query) {
10944
+ t1 = query === "" ? void 0 : (type) => type.name.toLowerCase().includes(query);
10945
+ $[2] = query;
10946
+ $[3] = t1;
10947
+ } else t1 = $[3];
10948
+ const matches = t1;
10949
+ const groups = useImplantTree();
10950
+ const found = useImplantSearch(matches);
10951
+ let t2;
10952
+ if ($[4] !== clear) {
10953
+ t2 = (value) => {
10954
+ clear();
10955
+ setSearch(value);
10956
+ };
10957
+ $[4] = clear;
10958
+ $[5] = t2;
10959
+ } else t2 = $[5];
10960
+ let t3;
10961
+ if ($[6] !== collapses) {
10962
+ t3 = () => setCollapses(collapses + 1);
10963
+ $[6] = collapses;
10964
+ $[7] = t3;
10965
+ } else t3 = $[7];
10966
+ let t4;
10967
+ if ($[8] !== search || $[9] !== t2 || $[10] !== t3) {
10968
+ t4 = /* @__PURE__ */ jsx(Search, {
10969
+ value: search,
10970
+ onChange: t2,
10971
+ onCollapse: t3
10972
+ });
10973
+ $[8] = search;
10974
+ $[9] = t2;
10975
+ $[10] = t3;
10976
+ $[11] = t4;
10977
+ } else t4 = $[11];
10978
+ let t5;
10979
+ if ($[12] !== actions || $[13] !== collapses || $[14] !== found || $[15] !== groups || $[16] !== matches) {
10980
+ t5 = /* @__PURE__ */ jsx("div", {
10981
+ className: ItemBrowser_module_default.tree,
10982
+ children: matches !== void 0 && found.length === 0 ? /* @__PURE__ */ jsx("p", {
10983
+ className: ItemBrowser_module_default.empty,
10984
+ children: "No implants found"
10985
+ }) : /* @__PURE__ */ jsx(TreeList, {
10986
+ label: "Implants",
10987
+ children: matches !== void 0 ? /* @__PURE__ */ jsx(SearchResults, {
10988
+ roots: found,
10989
+ actions
10990
+ }) : groups.map((node) => /* @__PURE__ */ jsx(MarketGroup, {
10991
+ node,
10992
+ actions
10993
+ }, node.group.id))
10994
+ }, collapses)
10995
+ });
10996
+ $[12] = actions;
10997
+ $[13] = collapses;
10998
+ $[14] = found;
10999
+ $[15] = groups;
11000
+ $[16] = matches;
11001
+ $[17] = t5;
11002
+ } else t5 = $[17];
11003
+ let t6;
11004
+ if ($[18] !== dragImage || $[19] !== t4 || $[20] !== t5) {
11005
+ t6 = /* @__PURE__ */ jsxs(Fragment, { children: [
11006
+ t4,
11007
+ t5,
11008
+ dragImage
11009
+ ] });
11010
+ $[18] = dragImage;
11011
+ $[19] = t4;
11012
+ $[20] = t5;
11013
+ $[21] = t6;
11014
+ } else t6 = $[21];
11015
+ return t6;
11016
+ }
11017
+ //#endregion
10290
11018
  //#region src/components/ItemBrowser/Modules.tsx
10291
11019
  const slotFilters = [
10292
11020
  {
@@ -10522,9 +11250,9 @@ function _temp$2() {
10522
11250
  }
10523
11251
  //#endregion
10524
11252
  //#region src/components/ItemBrowser/ItemBrowser.tsx
10525
- /** EVE's browser of hulls and fits, modules and charges, left of the fitting wheel. */
11253
+ /** EVE's browser of hulls and fits, modules, charges, and implants, left of the fitting wheel. */
10526
11254
  function ItemBrowser(t0) {
10527
- const $ = c(15);
11255
+ const $ = c(16);
10528
11256
  const { label: t1 } = t0;
10529
11257
  const label = t1 === void 0 ? "Item Browser" : t1;
10530
11258
  const [tab, setTab] = useState("hulls");
@@ -10550,21 +11278,31 @@ function ItemBrowser(t0) {
10550
11278
  } else t3 = $[1];
10551
11279
  let t4;
10552
11280
  if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
10553
- t4 = [
11281
+ t4 = {
11282
+ tab: "charges",
11283
+ label: "Charges",
11284
+ panel: /* @__PURE__ */ jsx(Charges, {})
11285
+ };
11286
+ $[2] = t4;
11287
+ } else t4 = $[2];
11288
+ let t5;
11289
+ if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
11290
+ t5 = [
10554
11291
  t2,
10555
11292
  t3,
11293
+ t4,
10556
11294
  {
10557
- tab: "charges",
10558
- label: "Charges",
10559
- panel: /* @__PURE__ */ jsx(Charges, {})
11295
+ tab: "implants",
11296
+ label: "Implants",
11297
+ panel: /* @__PURE__ */ jsx(Implants, {})
10560
11298
  }
10561
11299
  ];
10562
- $[2] = t4;
10563
- } else t4 = $[2];
10564
- const tabs = t4;
10565
- let t5;
10566
- if ($[3] !== id || $[4] !== tab) {
10567
- t5 = /* @__PURE__ */ jsx("div", {
11300
+ $[3] = t5;
11301
+ } else t5 = $[3];
11302
+ const tabs = t5;
11303
+ let t6;
11304
+ if ($[4] !== id || $[5] !== tab) {
11305
+ t6 = /* @__PURE__ */ jsx("div", {
10568
11306
  className: ItemBrowser_module_default.tabs,
10569
11307
  role: "tablist",
10570
11308
  children: tabs.map((each) => /* @__PURE__ */ jsx("button", {
@@ -10578,13 +11316,13 @@ function ItemBrowser(t0) {
10578
11316
  children: each.label
10579
11317
  }, each.tab))
10580
11318
  });
10581
- $[3] = id;
10582
- $[4] = tab;
10583
- $[5] = t5;
10584
- } else t5 = $[5];
10585
- let t6;
10586
- if ($[6] !== id || $[7] !== ready || $[8] !== tab) {
10587
- t6 = tabs.map((each_0) => /* @__PURE__ */ jsx("div", {
11319
+ $[4] = id;
11320
+ $[5] = tab;
11321
+ $[6] = t6;
11322
+ } else t6 = $[6];
11323
+ let t7;
11324
+ if ($[7] !== id || $[8] !== ready || $[9] !== tab) {
11325
+ t7 = tabs.map((each_0) => /* @__PURE__ */ jsx("div", {
10588
11326
  id: `${id}-${each_0.tab}-panel`,
10589
11327
  className: ItemBrowser_module_default.panel,
10590
11328
  role: "tabpanel",
@@ -10598,33 +11336,33 @@ function ItemBrowser(t0) {
10598
11336
  children: "Loading…"
10599
11337
  })
10600
11338
  }, each_0.tab));
10601
- $[6] = id;
10602
- $[7] = ready;
10603
- $[8] = tab;
10604
- $[9] = t6;
10605
- } else t6 = $[9];
10606
- let t7;
10607
- if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
10608
- t7 = /* @__PURE__ */ jsx(FitActions, {});
11339
+ $[7] = id;
11340
+ $[8] = ready;
11341
+ $[9] = tab;
10609
11342
  $[10] = t7;
10610
11343
  } else t7 = $[10];
10611
11344
  let t8;
10612
- if ($[11] !== label || $[12] !== t5 || $[13] !== t6) {
10613
- t8 = /* @__PURE__ */ jsxs("section", {
11345
+ if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
11346
+ t8 = /* @__PURE__ */ jsx(FitActions, {});
11347
+ $[11] = t8;
11348
+ } else t8 = $[11];
11349
+ let t9;
11350
+ if ($[12] !== label || $[13] !== t6 || $[14] !== t7) {
11351
+ t9 = /* @__PURE__ */ jsxs("section", {
10614
11352
  className: ItemBrowser_module_default.browser,
10615
11353
  "aria-label": label,
10616
11354
  children: [
10617
- t5,
10618
11355
  t6,
10619
- t7
11356
+ t7,
11357
+ t8
10620
11358
  ]
10621
11359
  });
10622
- $[11] = label;
10623
- $[12] = t5;
11360
+ $[12] = label;
10624
11361
  $[13] = t6;
10625
- $[14] = t8;
10626
- } else t8 = $[14];
10627
- return t8;
11362
+ $[14] = t7;
11363
+ $[15] = t9;
11364
+ } else t9 = $[15];
11365
+ return t9;
10628
11366
  }
10629
11367
  //#endregion
10630
11368
  //#region src/components/ShipStatistics/ShipStatistics.module.css