@rpg-engine/long-bow 0.8.161 → 0.8.163

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.
@@ -27,6 +27,9 @@ import { Delete } from 'pixelarticons/react/Delete';
27
27
  import 'rpgui/rpgui.css';
28
28
  import 'rpgui/rpgui.min.js';
29
29
  import { Coins } from 'pixelarticons/react/Coins';
30
+ import { Box } from 'pixelarticons/react/Box';
31
+ import { Crown } from 'pixelarticons/react/Crown';
32
+ import { Gift } from 'pixelarticons/react/Gift';
30
33
  import capitalize from 'lodash-es/capitalize';
31
34
 
32
35
  function _arrayLikeToArray(r, a) {
@@ -45103,6 +45106,58 @@ var CancelButton$1 = /*#__PURE__*/styled.button.withConfig({
45103
45106
  componentId: "sc-6bghe9-17"
45104
45107
  })(["flex:1;background:rgba(255,255,255,0.05);border:1px solid rgba(255,255,255,0.1);color:#ccc;border-radius:4px;padding:8px 12px;font-size:0.5rem;font-family:'Press Start 2P',cursive;cursor:pointer;text-transform:uppercase;letter-spacing:0.5px;transition:background 0.1s,border-color 0.1s;pointer-events:auto;&:hover{background:rgba(255,255,255,0.08);border-color:rgba(255,255,255,0.15);}"]);
45105
45108
 
45109
+ var GroupedRowContainer = function GroupedRowContainer(_ref) {
45110
+ var mainRow = _ref.mainRow,
45111
+ subRows = _ref.subRows,
45112
+ _ref$badgeLabel = _ref.badgeLabel,
45113
+ badgeLabel = _ref$badgeLabel === void 0 ? 'offers' : _ref$badgeLabel;
45114
+ var _useState = useState(false),
45115
+ expanded = _useState[0],
45116
+ setExpanded = _useState[1];
45117
+ var hasMultiple = subRows.length > 0;
45118
+ var totalCount = subRows.length + 1;
45119
+ return React.createElement(GroupWrapper, null, React.createElement(GroupHeader, {
45120
+ "$clickable": hasMultiple,
45121
+ onClick: hasMultiple ? function () {
45122
+ return setExpanded(function (e) {
45123
+ return !e;
45124
+ });
45125
+ } : undefined
45126
+ }, mainRow, hasMultiple && React.createElement(GroupMeta, null, React.createElement(OfferBadge, null, totalCount, " ", badgeLabel), React.createElement(Chevron, {
45127
+ "$expanded": expanded
45128
+ }, "\u25B8"))), expanded && React.createElement(SubRows, null, subRows));
45129
+ };
45130
+ var GroupWrapper = /*#__PURE__*/styled.div.withConfig({
45131
+ displayName: "GroupedRowContainer__GroupWrapper",
45132
+ componentId: "sc-12q03tq-0"
45133
+ })(["margin-bottom:2px;"]);
45134
+ var GroupHeader = /*#__PURE__*/styled.div.withConfig({
45135
+ displayName: "GroupedRowContainer__GroupHeader",
45136
+ componentId: "sc-12q03tq-1"
45137
+ })(["position:relative;cursor:", ";"], function (_ref2) {
45138
+ var $clickable = _ref2.$clickable;
45139
+ return $clickable ? 'pointer' : 'default';
45140
+ });
45141
+ var GroupMeta = /*#__PURE__*/styled.div.withConfig({
45142
+ displayName: "GroupedRowContainer__GroupMeta",
45143
+ componentId: "sc-12q03tq-2"
45144
+ })(["position:absolute;right:180px;top:50%;transform:translateY(-50%);display:flex;align-items:center;gap:6px;pointer-events:none;"]);
45145
+ var OfferBadge = /*#__PURE__*/styled.span.withConfig({
45146
+ displayName: "GroupedRowContainer__OfferBadge",
45147
+ componentId: "sc-12q03tq-3"
45148
+ })(["font-family:'Press Start 2P',cursive;font-size:0.5rem;color:rgba(255,255,255,0.5);background:rgba(255,255,255,0.08);padding:2px 6px;border-radius:8px;white-space:nowrap;"]);
45149
+ var Chevron = /*#__PURE__*/styled.span.withConfig({
45150
+ displayName: "GroupedRowContainer__Chevron",
45151
+ componentId: "sc-12q03tq-4"
45152
+ })(["display:inline-block;font-size:0.7rem;color:rgba(255,255,255,0.4);transition:transform 0.2s ease;transform:rotate(", ");"], function (_ref3) {
45153
+ var $expanded = _ref3.$expanded;
45154
+ return $expanded ? '90deg' : '0deg';
45155
+ });
45156
+ var SubRows = /*#__PURE__*/styled.div.withConfig({
45157
+ displayName: "GroupedRowContainer__SubRows",
45158
+ componentId: "sc-12q03tq-5"
45159
+ })(["margin-left:12px;padding-left:8px;border-left:2px solid rgba(245,158,11,0.25);> div > div{background:rgba(0,0,0,0.4);}"]);
45160
+
45106
45161
  var LabelPill = function LabelPill(_ref) {
45107
45162
  var children = _ref.children,
45108
45163
  _ref$background = _ref.background,
@@ -45363,19 +45418,18 @@ var BuyOrderRow = function BuyOrderRow(_ref) {
45363
45418
  background: "rgba(34, 197, 94, 0.16)",
45364
45419
  borderColor: "rgba(34, 197, 94, 0.4)",
45365
45420
  color: "#bbf7d0"
45366
- }, requestTagLabel), buyOrder.itemRarity && React.createElement(LabelPill, {
45367
- background: rarityGlow != null ? rarityGlow : 'rgba(255,255,255,0.1)',
45368
- borderColor: "rgba(255,255,255,0.08)",
45369
- color: "#fff"
45370
- }, buyOrder.itemRarity), isOwn && React.createElement(LabelPill, {
45421
+ }, requestTagLabel), isOwn && React.createElement(LabelPill, {
45371
45422
  background: STATUS_COLORS[buyOrder.status],
45372
45423
  borderColor: "transparent",
45373
45424
  color: "#fff"
45374
- }, formatStatusLabel(buyOrder.status)), timeRemaining && React.createElement(LabelPill, {
45425
+ }, formatStatusLabel(buyOrder.status)), timeRemaining && React.createElement(SimpleTooltip, {
45426
+ content: "Expires in",
45427
+ direction: "top"
45428
+ }, React.createElement(LabelPill, {
45375
45429
  background: "rgba(255,255,255,0.08)",
45376
45430
  borderColor: "rgba(255,255,255,0.08)",
45377
45431
  color: "#fff"
45378
- }, timeRemaining)))), isOwn && buyOrder.status === MarketplaceBuyOrderStatus.Active && onCancel && React.createElement(ActionSection, null, React.createElement(CTAButton, {
45432
+ }, timeRemaining))))), isOwn && buyOrder.status === MarketplaceBuyOrderStatus.Active && onCancel && React.createElement(ActionSection, null, React.createElement(CTAButton, {
45379
45433
  icon: React.createElement(Delete, {
45380
45434
  width: 18,
45381
45435
  height: 18
@@ -45397,6 +45451,33 @@ var BuyOrderRow = function BuyOrderRow(_ref) {
45397
45451
  }
45398
45452
  })));
45399
45453
  };
45454
+ var GroupedBuyOrderRow = function GroupedBuyOrderRow(_ref2) {
45455
+ var bestOrder = _ref2.bestOrder,
45456
+ otherOrders = _ref2.otherOrders,
45457
+ atlasJSON = _ref2.atlasJSON,
45458
+ atlasIMG = _ref2.atlasIMG,
45459
+ isOwn = _ref2.isOwn,
45460
+ onCancel = _ref2.onCancel,
45461
+ onFulfill = _ref2.onFulfill,
45462
+ showRequestTag = _ref2.showRequestTag;
45463
+ var makeRow = function makeRow(order) {
45464
+ return React.createElement(BuyOrderRow, {
45465
+ key: order._id,
45466
+ buyOrder: order,
45467
+ atlasJSON: atlasJSON,
45468
+ atlasIMG: atlasIMG,
45469
+ isOwn: isOwn,
45470
+ onCancel: onCancel,
45471
+ onFulfill: onFulfill,
45472
+ showRequestTag: showRequestTag
45473
+ });
45474
+ };
45475
+ return React.createElement(GroupedRowContainer, {
45476
+ mainRow: makeRow(bestOrder),
45477
+ subRows: otherOrders.map(makeRow),
45478
+ badgeLabel: "requests"
45479
+ });
45480
+ };
45400
45481
  // ── Styled components matching MarketplaceRows layout ──
45401
45482
  var RowWrapper = /*#__PURE__*/styled.div.withConfig({
45402
45483
  displayName: "BuyOrderRows__RowWrapper",
@@ -45413,8 +45494,8 @@ var SpriteContainer$3 = /*#__PURE__*/styled.div.withConfig({
45413
45494
  var RarityGlow = /*#__PURE__*/styled.div.withConfig({
45414
45495
  displayName: "BuyOrderRows__RarityGlow",
45415
45496
  componentId: "sc-zz5s5j-3"
45416
- })(["width:32px;height:32px;", ""], function (_ref2) {
45417
- var $color = _ref2.$color;
45497
+ })(["width:32px;height:32px;", ""], function (_ref3) {
45498
+ var $color = _ref3.$color;
45418
45499
  return $color ? "\n border-color: " + $color + ";\n box-shadow: 0 0 5px 8px " + $color + " inset, 0 0 8px 6px " + $color + ";\n " : '';
45419
45500
  });
45420
45501
  var SpritePlaceholder = /*#__PURE__*/styled.div.withConfig({
@@ -45784,6 +45865,15 @@ var ConfirmRow = /*#__PURE__*/styled.div.withConfig({
45784
45865
  componentId: "sc-86ottl-13"
45785
45866
  })(["display:flex;justify-content:center;margin-top:4px;"]);
45786
45867
 
45868
+ var ItemRowWrapper = /*#__PURE__*/styled.div.withConfig({
45869
+ displayName: "ItemRowWrapper",
45870
+ componentId: "sc-5g2skk-0"
45871
+ })(["display:flex;align-items:center;justify-content:space-between;padding:0.6rem 1rem;margin-bottom:4px;background:", ";border:1px solid rgba(255,255,255,0.05);border-radius:6px;border-left:4px solid ", ";transition:all 0.2s ease-in-out;&:hover{background:rgba(245,158,11,0.08);border-color:rgba(245,158,11,0.2);border-left-color:#f59e0b;box-shadow:0 4px 12px rgba(0,0,0,0.2);transform:translateY(-1px);}"], function (p) {
45872
+ return p.$isHighlighted ? 'rgba(255, 215, 0, 0.08)' : 'rgba(0, 0, 0, 0.25)';
45873
+ }, function (p) {
45874
+ return p.$isHighlighted ? '#ffd700' : 'transparent';
45875
+ });
45876
+
45787
45877
  var MarketplaceRows = function MarketplaceRows(_ref) {
45788
45878
  var atlasJSON = _ref.atlasJSON,
45789
45879
  atlasIMG = _ref.atlasIMG,
@@ -45799,7 +45889,7 @@ var MarketplaceRows = function MarketplaceRows(_ref) {
45799
45889
  var renderGems = function renderGems(item) {
45800
45890
  return item.attachedGems && onRenderGems(item);
45801
45891
  };
45802
- return React.createElement(MarketplaceWrapper, null, React.createElement(ItemSection$1, null, React.createElement(SpriteContainer$4, null, React.createElement(ItemInfoWrapper, {
45892
+ return React.createElement(ItemRowWrapper, null, React.createElement(ItemSection$1, null, React.createElement(SpriteContainer$4, null, React.createElement(ItemInfoWrapper, {
45803
45893
  item: item,
45804
45894
  atlasIMG: atlasIMG,
45805
45895
  atlasJSON: atlasJSON,
@@ -45871,31 +45961,7 @@ var GroupedMarketplaceRow = function GroupedMarketplaceRow(_ref2) {
45871
45961
  characterId = _ref2.characterId,
45872
45962
  onBuy = _ref2.onBuy,
45873
45963
  onDCCoinClick = _ref2.onDCCoinClick;
45874
- var _useState = useState(false),
45875
- expanded = _useState[0],
45876
- setExpanded = _useState[1];
45877
- var totalOffers = otherListings.length + 1;
45878
- var hasMultiple = otherListings.length > 0;
45879
- return React.createElement(GroupWrapper, null, React.createElement(GroupHeader, {
45880
- onClick: hasMultiple ? function () {
45881
- return setExpanded(!expanded);
45882
- } : undefined,
45883
- clickable: hasMultiple
45884
- }, React.createElement(MarketplaceRows, {
45885
- atlasIMG: atlasIMG,
45886
- atlasJSON: atlasJSON,
45887
- item: bestListing.item,
45888
- itemPrice: bestListing.price,
45889
- dcEquivalentPrice: dcToGoldSwapRate > 0 ? getDCEquivalentPrice(bestListing.price) : undefined,
45890
- equipmentSet: equipmentSet,
45891
- onMarketPlaceItemBuy: function onMarketPlaceItemBuy() {
45892
- return onBuy(bestListing._id);
45893
- },
45894
- onDCCoinClick: onDCCoinClick,
45895
- disabled: bestListing.owner === characterId
45896
- }), hasMultiple && React.createElement(GroupMeta, null, React.createElement(OfferBadge, null, totalOffers, " offers"), React.createElement(Chevron, {
45897
- expanded: expanded
45898
- }, "\u25B8"))), expanded && React.createElement(SubRows, null, otherListings.map(function (listing) {
45964
+ var makeRow = function makeRow(listing) {
45899
45965
  return React.createElement(MarketplaceRows, {
45900
45966
  key: listing._id,
45901
45967
  atlasIMG: atlasIMG,
@@ -45910,115 +45976,86 @@ var GroupedMarketplaceRow = function GroupedMarketplaceRow(_ref2) {
45910
45976
  onDCCoinClick: onDCCoinClick,
45911
45977
  disabled: listing.owner === characterId
45912
45978
  });
45913
- })));
45979
+ };
45980
+ return React.createElement(GroupedRowContainer, {
45981
+ mainRow: makeRow(bestListing),
45982
+ subRows: otherListings.map(makeRow),
45983
+ badgeLabel: "offers"
45984
+ });
45914
45985
  };
45915
- var GroupWrapper = /*#__PURE__*/styled.div.withConfig({
45916
- displayName: "MarketplaceRows__GroupWrapper",
45917
- componentId: "sc-wmpr1o-0"
45918
- })(["margin-bottom:2px;"]);
45919
- var GroupHeader = /*#__PURE__*/styled.div.withConfig({
45920
- displayName: "MarketplaceRows__GroupHeader",
45921
- componentId: "sc-wmpr1o-1"
45922
- })(["position:relative;cursor:", ";"], function (_ref3) {
45923
- var clickable = _ref3.clickable;
45924
- return clickable ? 'pointer' : 'default';
45925
- });
45926
- var GroupMeta = /*#__PURE__*/styled.div.withConfig({
45927
- displayName: "MarketplaceRows__GroupMeta",
45928
- componentId: "sc-wmpr1o-2"
45929
- })(["position:absolute;right:180px;top:50%;transform:translateY(-50%);display:flex;align-items:center;gap:6px;pointer-events:none;"]);
45930
- var OfferBadge = /*#__PURE__*/styled.span.withConfig({
45931
- displayName: "MarketplaceRows__OfferBadge",
45932
- componentId: "sc-wmpr1o-3"
45933
- })(["font-family:'Press Start 2P',cursive;font-size:0.5rem;color:rgba(255,255,255,0.5);background:rgba(255,255,255,0.08);padding:2px 6px;border-radius:8px;white-space:nowrap;"]);
45934
- var Chevron = /*#__PURE__*/styled.span.withConfig({
45935
- displayName: "MarketplaceRows__Chevron",
45936
- componentId: "sc-wmpr1o-4"
45937
- })(["display:inline-block;font-size:0.7rem;color:rgba(255,255,255,0.4);transition:transform 0.2s ease;transform:rotate(", ");"], function (_ref4) {
45938
- var expanded = _ref4.expanded;
45939
- return expanded ? '90deg' : '0deg';
45940
- });
45941
- var SubRows = /*#__PURE__*/styled.div.withConfig({
45942
- displayName: "MarketplaceRows__SubRows",
45943
- componentId: "sc-wmpr1o-5"
45944
- })(["margin-left:12px;padding-left:8px;border-left:2px solid rgba(245,158,11,0.25);> div > div{background:rgba(0,0,0,0.4);}"]);
45945
- var MarketplaceWrapper = /*#__PURE__*/styled.div.withConfig({
45946
- displayName: "MarketplaceRows__MarketplaceWrapper",
45947
- componentId: "sc-wmpr1o-6"
45948
- })(["display:flex;align-items:center;justify-content:space-between;padding:0.6rem 1rem;margin-bottom:4px;background:rgba(0,0,0,0.25);border:1px solid rgba(255,255,255,0.05);border-radius:6px;border-left:4px solid transparent;transition:all 0.2s ease-in-out;&:hover{background:rgba(245,158,11,0.08);border-color:rgba(245,158,11,0.2);border-left-color:#f59e0b;box-shadow:0 4px 12px rgba(0,0,0,0.2);transform:translateY(-1px);}"]);
45949
45986
  var ItemSection$1 = /*#__PURE__*/styled.div.withConfig({
45950
45987
  displayName: "MarketplaceRows__ItemSection",
45951
- componentId: "sc-wmpr1o-7"
45988
+ componentId: "sc-wmpr1o-0"
45952
45989
  })(["display:flex;align-items:center;gap:0.75rem;flex:1;min-width:0;"]);
45953
45990
  var SpriteContainer$4 = /*#__PURE__*/styled.div.withConfig({
45954
45991
  displayName: "MarketplaceRows__SpriteContainer",
45955
- componentId: "sc-wmpr1o-8"
45992
+ componentId: "sc-wmpr1o-1"
45956
45993
  })(["position:relative;flex-shrink:0;min-width:44px;"]);
45957
45994
  var ItemDetails$1 = /*#__PURE__*/styled.div.withConfig({
45958
45995
  displayName: "MarketplaceRows__ItemDetails",
45959
- componentId: "sc-wmpr1o-9"
45996
+ componentId: "sc-wmpr1o-2"
45960
45997
  })(["display:flex;flex-direction:column;gap:0.2rem;min-width:0;margin-left:1rem;"]);
45961
45998
  var ItemName$2 = /*#__PURE__*/styled.div.withConfig({
45962
45999
  displayName: "MarketplaceRows__ItemName",
45963
- componentId: "sc-wmpr1o-10"
46000
+ componentId: "sc-wmpr1o-3"
45964
46001
  })(["font-family:'Press Start 2P',cursive;font-size:0.65rem;color:#ffffff;"]);
45965
46002
  var PriceRow = /*#__PURE__*/styled.div.withConfig({
45966
46003
  displayName: "MarketplaceRows__PriceRow",
45967
- componentId: "sc-wmpr1o-11"
46004
+ componentId: "sc-wmpr1o-4"
45968
46005
  })(["display:flex;flex-direction:row;align-items:center;gap:0.5rem;margin-top:0.2rem;"]);
45969
46006
  var GoldPriceRow$1 = /*#__PURE__*/styled.div.withConfig({
45970
46007
  displayName: "MarketplaceRows__GoldPriceRow",
45971
- componentId: "sc-wmpr1o-12"
46008
+ componentId: "sc-wmpr1o-5"
45972
46009
  })(["display:flex;align-items:center;gap:0.3rem;"]);
45973
46010
  var GoldIcon$1 = /*#__PURE__*/styled.span.withConfig({
45974
46011
  displayName: "MarketplaceRows__GoldIcon",
45975
- componentId: "sc-wmpr1o-13"
46012
+ componentId: "sc-wmpr1o-6"
45976
46013
  })(["display:flex;align-items:center;justify-content:center;position:relative;top:-0.6rem;left:-0.5rem;"]);
45977
46014
  var GoldPrice$1 = /*#__PURE__*/styled.span.withConfig({
45978
46015
  displayName: "MarketplaceRows__GoldPrice",
45979
- componentId: "sc-wmpr1o-14"
46016
+ componentId: "sc-wmpr1o-7"
45980
46017
  })(["font-family:'Press Start 2P',cursive;font-size:0.6rem !important;color:#fef08a;line-height:1;"]);
45981
46018
  var DCPriceRow = /*#__PURE__*/styled.div.withConfig({
45982
46019
  displayName: "MarketplaceRows__DCPriceRow",
45983
- componentId: "sc-wmpr1o-15"
45984
- })(["display:flex;align-items:center;gap:0.3rem;margin-left:0.5rem;cursor:", ";border-radius:4px;transition:opacity 0.15s;&:hover{opacity:", ";}"], function (_ref5) {
45985
- var $clickable = _ref5.$clickable;
46020
+ componentId: "sc-wmpr1o-8"
46021
+ })(["display:flex;align-items:center;gap:0.3rem;margin-left:0.5rem;cursor:", ";border-radius:4px;transition:opacity 0.15s;&:hover{opacity:", ";}"], function (_ref3) {
46022
+ var $clickable = _ref3.$clickable;
45986
46023
  return $clickable ? 'pointer' : 'default';
45987
- }, function (_ref6) {
45988
- var $clickable = _ref6.$clickable;
46024
+ }, function (_ref4) {
46025
+ var $clickable = _ref4.$clickable;
45989
46026
  return $clickable ? '0.75' : '1';
45990
46027
  });
45991
46028
  var DCCoinWrapper = /*#__PURE__*/styled.span.withConfig({
45992
46029
  displayName: "MarketplaceRows__DCCoinWrapper",
45993
- componentId: "sc-wmpr1o-16"
46030
+ componentId: "sc-wmpr1o-9"
45994
46031
  })(["display:flex;align-items:center;justify-content:center;position:relative;top:-0.6rem;left:-0.5rem;"]);
45995
46032
  var DCPrice = /*#__PURE__*/styled.span.withConfig({
45996
46033
  displayName: "MarketplaceRows__DCPrice",
45997
- componentId: "sc-wmpr1o-17"
46034
+ componentId: "sc-wmpr1o-10"
45998
46035
  })(["font-family:'Press Start 2P',cursive;font-size:0.6rem !important;color:rgba(254,240,138,0.65);white-space:nowrap;"]);
45999
46036
  var ActionSection$1 = /*#__PURE__*/styled.div.withConfig({
46000
46037
  displayName: "MarketplaceRows__ActionSection",
46001
- componentId: "sc-wmpr1o-18"
46038
+ componentId: "sc-wmpr1o-11"
46002
46039
  })(["flex-shrink:0;margin-left:0.75rem;"]);
46003
46040
  var QuantityContainer = /*#__PURE__*/styled.p.withConfig({
46004
46041
  displayName: "MarketplaceRows__QuantityContainer",
46005
- componentId: "sc-wmpr1o-19"
46042
+ componentId: "sc-wmpr1o-12"
46006
46043
  })(["position:absolute;display:block;top:15px;left:-8px;font-size:", " !important;"], uiFonts.size.xsmall);
46007
46044
  var GemContainer = /*#__PURE__*/styled.p.withConfig({
46008
46045
  displayName: "MarketplaceRows__GemContainer",
46009
- componentId: "sc-wmpr1o-20"
46046
+ componentId: "sc-wmpr1o-13"
46010
46047
  })(["position:absolute;display:block;top:-5px;left:-10px;font-size:", " !important;"], uiFonts.size.xsmall);
46011
46048
  var RarityContainer$1 = /*#__PURE__*/styled.div.withConfig({
46012
46049
  displayName: "MarketplaceRows__RarityContainer",
46013
- componentId: "sc-wmpr1o-21"
46014
- })(["border-color:", ";box-shadow:", " inset,", ";width:32px;height:32px;"], function (_ref7) {
46015
- var item = _ref7.item;
46050
+ componentId: "sc-wmpr1o-14"
46051
+ })(["border-color:", ";box-shadow:", " inset,", ";width:32px;height:32px;"], function (_ref5) {
46052
+ var item = _ref5.item;
46016
46053
  return rarityColor(item);
46017
- }, function (_ref8) {
46018
- var item = _ref8.item;
46054
+ }, function (_ref6) {
46055
+ var item = _ref6.item;
46019
46056
  return "0 0 5px 8px " + rarityColor(item);
46020
- }, function (_ref9) {
46021
- var item = _ref9.item;
46057
+ }, function (_ref7) {
46058
+ var item = _ref7.item;
46022
46059
  return "0 0 8px 6px " + rarityColor(item);
46023
46060
  });
46024
46061
 
@@ -46187,9 +46224,34 @@ var BuyPanel = function BuyPanel(_ref) {
46187
46224
  return true;
46188
46225
  });
46189
46226
  }, [name, openBuyOrders, price, selectedRarity]);
46227
+ var groupedBuyOrders = useMemo(function () {
46228
+ var groups = new Map();
46229
+ for (var _iterator2 = _createForOfIteratorHelperLoose(visibleBuyOrders), _step2; !(_step2 = _iterator2()).done;) {
46230
+ var order = _step2.value;
46231
+ var key = order.itemBlueprintKey;
46232
+ if (!groups.has(key)) groups.set(key, []);
46233
+ groups.get(key).push(order);
46234
+ }
46235
+ return Array.from(groups.values()).map(function (group) {
46236
+ var sorted = [].concat(group).sort(function (a, b) {
46237
+ return b.maxPrice - a.maxPrice;
46238
+ });
46239
+ return {
46240
+ bestOrder: sorted[0],
46241
+ otherOrders: sorted.slice(1)
46242
+ };
46243
+ }).sort(function (a, b) {
46244
+ var totalGold = function totalGold(g) {
46245
+ return [g.bestOrder].concat(g.otherOrders).reduce(function (sum, o) {
46246
+ return sum + o.maxPrice;
46247
+ }, 0);
46248
+ };
46249
+ return totalGold(b) - totalGold(a);
46250
+ });
46251
+ }, [visibleBuyOrders]);
46190
46252
  var showSellSection = browseMode === 'sell';
46191
46253
  var showBuySection = browseMode === 'buy';
46192
- var hasVisibleContent = showSellSection && groupedItems.length > 0 || showBuySection && visibleBuyOrders.length > 0;
46254
+ var hasVisibleContent = showSellSection && groupedItems.length > 0 || showBuySection && groupedBuyOrders.length > 0;
46193
46255
  return React.createElement(React.Fragment, null, buyingItemId && buyingItem && hasDCBalance && React.createElement(MarketplaceBuyModal, {
46194
46256
  goldPrice: buyingItem.price,
46195
46257
  dcEquivalentPrice: getDCEquivalentPrice(buyingItem.price),
@@ -46252,7 +46314,9 @@ var BuyPanel = function BuyPanel(_ref) {
46252
46314
  height: 18
46253
46315
  }))), showFilters && React.createElement(OptionsWrapper, {
46254
46316
  showFilters: showFilters
46255
- }, React.createElement(WrapperContainer$1, null, React.createElement(StyledDropdown$5, {
46317
+ }, React.createElement(WrapperContainer$1, {
46318
+ "$sell": showSellSection
46319
+ }, showSellSection && React.createElement(StyledDropdown$5, {
46256
46320
  options: itemTypeOptions,
46257
46321
  onChange: onChangeType,
46258
46322
  width: "100%"
@@ -46263,11 +46327,11 @@ var BuyPanel = function BuyPanel(_ref) {
46263
46327
  onChangeRarity(value);
46264
46328
  },
46265
46329
  width: "100%"
46266
- }), React.createElement(StyledDropdown$5, {
46330
+ }), showSellSection && React.createElement(StyledDropdown$5, {
46267
46331
  options: orderByOptions,
46268
46332
  onChange: onChangeOrder,
46269
46333
  width: "100%"
46270
- })), React.createElement(FilterInputsWrapper, null, React.createElement("div", null, React.createElement("p", null, "Main level"), React.createElement("div", {
46334
+ })), React.createElement(FilterInputsWrapper, null, showSellSection && React.createElement("div", null, React.createElement("p", null, "Main level"), React.createElement("div", {
46271
46335
  className: "input-group"
46272
46336
  }, React.createElement(Input, {
46273
46337
  onChange: function onChange(e) {
@@ -46291,7 +46355,7 @@ var BuyPanel = function BuyPanel(_ref) {
46291
46355
  min: 0,
46292
46356
  onBlur: enableHotkeys,
46293
46357
  onFocus: disableHotkeys
46294
- }))), React.createElement("div", null, React.createElement("p", null, "Secondary level"), React.createElement("div", {
46358
+ }))), showSellSection && React.createElement("div", null, React.createElement("p", null, "Secondary level"), React.createElement("div", {
46295
46359
  className: "input-group"
46296
46360
  }, React.createElement(Input, {
46297
46361
  onChange: function onChange(e) {
@@ -46358,14 +46422,16 @@ var BuyPanel = function BuyPanel(_ref) {
46358
46422
  onBuy: setBuyingItemId,
46359
46423
  onDCCoinClick: onDCCoinClick
46360
46424
  });
46361
- })), showBuySection && React.createElement(MarketSection, null, React.createElement(SectionHeader, null, React.createElement(SectionTitle$2, null, "Buy Requests"), React.createElement(SectionMeta, null, visibleBuyOrders.length, " visible")), visibleBuyOrders.length === 0 ? React.createElement(SectionEmpty, null, "No public buy requests found.") : visibleBuyOrders.map(function (order) {
46362
- return React.createElement(BuyOrderRow, {
46363
- key: order._id,
46364
- buyOrder: order,
46425
+ })), showBuySection && React.createElement(MarketSection, null, React.createElement(SectionHeader, null, React.createElement(SectionTitle$2, null, "Buy Requests"), React.createElement(SectionMeta, null, groupedBuyOrders.length, " groups")), groupedBuyOrders.length === 0 ? React.createElement(SectionEmpty, null, "No public buy requests found.") : groupedBuyOrders.map(function (_ref3) {
46426
+ var bestOrder = _ref3.bestOrder,
46427
+ otherOrders = _ref3.otherOrders;
46428
+ return React.createElement(GroupedBuyOrderRow, {
46429
+ key: bestOrder._id,
46430
+ bestOrder: bestOrder,
46431
+ otherOrders: otherOrders,
46365
46432
  atlasJSON: atlasJSON,
46366
46433
  atlasIMG: atlasIMG,
46367
- onFulfill: setFulfillingBuyOrderId,
46368
- showRequestTag: true
46434
+ onFulfill: setFulfillingBuyOrderId
46369
46435
  });
46370
46436
  })))), React.createElement(PagerFooter, null, showSellSection && totalItems > itemsPerPage && React.createElement(Pager, {
46371
46437
  totalItems: totalItems,
@@ -46390,14 +46456,14 @@ var SearchField = /*#__PURE__*/styled.div.withConfig({
46390
46456
  var FilterButton$2 = /*#__PURE__*/styled.button.withConfig({
46391
46457
  displayName: "BuyPanel__FilterButton",
46392
46458
  componentId: "sc-1si8t7i-2"
46393
- })(["width:36px;height:36px;border-radius:8px;border:1px solid ", ";background:", ";color:", ";cursor:pointer;display:flex;align-items:center;justify-content:center;transition:color 0.15s,border-color 0.15s,background 0.15s;&:hover{color:#f59e0b;border-color:rgba(245,158,11,0.45);}"], function (_ref3) {
46394
- var $active = _ref3.$active;
46395
- return $active ? 'rgba(245, 158, 11, 0.55)' : 'rgba(255, 255, 255, 0.08)';
46396
- }, function (_ref4) {
46459
+ })(["width:36px;height:36px;border-radius:8px;border:1px solid ", ";background:", ";color:", ";cursor:pointer;display:flex;align-items:center;justify-content:center;transition:color 0.15s,border-color 0.15s,background 0.15s;&:hover{color:#f59e0b;border-color:rgba(245,158,11,0.45);}"], function (_ref4) {
46397
46460
  var $active = _ref4.$active;
46398
- return $active ? 'rgba(245, 158, 11, 0.14)' : 'rgba(255, 255, 255, 0.03)';
46461
+ return $active ? 'rgba(245, 158, 11, 0.55)' : 'rgba(255, 255, 255, 0.08)';
46399
46462
  }, function (_ref5) {
46400
46463
  var $active = _ref5.$active;
46464
+ return $active ? 'rgba(245, 158, 11, 0.14)' : 'rgba(255, 255, 255, 0.03)';
46465
+ }, function (_ref6) {
46466
+ var $active = _ref6.$active;
46401
46467
  return $active ? '#f59e0b' : '#ccc';
46402
46468
  });
46403
46469
  var BrowseModeRow = /*#__PURE__*/styled.div.withConfig({
@@ -46407,18 +46473,21 @@ var BrowseModeRow = /*#__PURE__*/styled.div.withConfig({
46407
46473
  var OptionsWrapper = /*#__PURE__*/styled.div.withConfig({
46408
46474
  displayName: "BuyPanel__OptionsWrapper",
46409
46475
  componentId: "sc-1si8t7i-4"
46410
- })(["width:95%;margin:0 auto;background:rgba(0,0,0,0.15);border-radius:4px;border:1px solid rgba(255,255,255,0.05);padding:10px;display:flex;flex-direction:column;gap:", ";"], function (_ref6) {
46411
- var showFilters = _ref6.showFilters;
46476
+ })(["width:95%;margin:0 auto;background:rgba(0,0,0,0.15);border-radius:4px;border:1px solid rgba(255,255,255,0.05);padding:10px;display:flex;flex-direction:column;gap:", ";"], function (_ref7) {
46477
+ var showFilters = _ref7.showFilters;
46412
46478
  return showFilters ? '15px' : '0';
46413
46479
  });
46414
46480
  var FilterInputsWrapper = /*#__PURE__*/styled.div.withConfig({
46415
46481
  displayName: "BuyPanel__FilterInputsWrapper",
46416
46482
  componentId: "sc-1si8t7i-5"
46417
- })(["display:grid;grid-template-columns:repeat(3,1fr);gap:15px;color:white;> div{display:flex;flex-direction:column;gap:5px;}p{margin:0;font-size:0.65rem;color:#aaa;text-transform:uppercase;letter-spacing:1px;}.input-group{display:flex;align-items:center;gap:5px;input{width:100%;height:10px;}}.separator-icon{flex-shrink:0;color:rgba(255,255,255,0.3);}"]);
46483
+ })(["display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:15px;color:white;> div{display:flex;flex-direction:column;gap:5px;}p{margin:0;font-size:0.65rem;color:#aaa;text-transform:uppercase;letter-spacing:1px;}.input-group{display:flex;align-items:center;gap:5px;input{width:100%;height:10px;}}.separator-icon{flex-shrink:0;color:rgba(255,255,255,0.3);}"]);
46418
46484
  var WrapperContainer$1 = /*#__PURE__*/styled.div.withConfig({
46419
46485
  displayName: "BuyPanel__WrapperContainer",
46420
46486
  componentId: "sc-1si8t7i-6"
46421
- })(["display:grid;grid-template-columns:1fr 1fr 1fr;gap:15px;.rpgui-content .rpgui-dropdown-imp-header{padding:0px 10px 0 !important;}"]);
46487
+ })(["display:grid;grid-template-columns:", ";gap:15px;.rpgui-content .rpgui-dropdown-imp-header{padding:0px 10px 0 !important;}"], function (_ref8) {
46488
+ var $sell = _ref8.$sell;
46489
+ return $sell ? 'repeat(3, 1fr)' : 'minmax(0, 200px)';
46490
+ });
46422
46491
  var ItemComponentScrollWrapper$1 = /*#__PURE__*/styled.div.withConfig({
46423
46492
  displayName: "BuyPanel__ItemComponentScrollWrapper",
46424
46493
  componentId: "sc-1si8t7i-7"
@@ -70148,9 +70217,9 @@ var StoreItemRow = function StoreItemRow(_ref) {
70148
70217
  resetQuantity();
70149
70218
  }
70150
70219
  };
70151
- return React.createElement(ItemWrapper$1, {
70220
+ return React.createElement(ItemRowWrapper, {
70152
70221
  "$isHighlighted": ((_item$store = item.store) == null ? void 0 : _item$store.isHighlighted) || false
70153
- }, React.createElement(ItemIconContainer$2, null, React.createElement(SpriteFromAtlas, {
70222
+ }, React.createElement(LeftSection, null, React.createElement(ItemIconContainer$2, null, React.createElement(SpriteFromAtlas, {
70154
70223
  atlasJSON: atlasJSON,
70155
70224
  atlasIMG: atlasIMG,
70156
70225
  spriteKey: item.texturePath,
@@ -70158,7 +70227,7 @@ var StoreItemRow = function StoreItemRow(_ref) {
70158
70227
  height: 32,
70159
70228
  imgScale: 2,
70160
70229
  centered: true
70161
- })), React.createElement(ItemDetails$5, null, React.createElement(ItemName$6, null, item.name), React.createElement(ItemPrice$1, null, "$", item.price, item.dcPrice ? " \xB7 " + item.dcPrice.toLocaleString() + " DC" : ''), React.createElement(ItemDescription, null, item.description)), React.createElement(Controls$1, null, showTextInput ? React.createElement(TextInput, {
70230
+ })), React.createElement(ItemDetails$5, null, React.createElement(ItemName$6, null, item.name), React.createElement(ItemPrice$1, null, "$", item.price, item.dcPrice ? " \xB7 " + item.dcPrice.toLocaleString() + " DC" : ''), React.createElement(ItemDescription, null, item.description))), React.createElement(Controls$1, null, showTextInput ? React.createElement(TextInput, {
70162
70231
  type: "text",
70163
70232
  value: textInputValue,
70164
70233
  placeholder: textInputPlaceholder,
@@ -70189,14 +70258,10 @@ var StoreItemRow = function StoreItemRow(_ref) {
70189
70258
  disabled: !hasRequiredAccount
70190
70259
  })));
70191
70260
  };
70192
- var ItemWrapper$1 = /*#__PURE__*/styled.div.withConfig({
70193
- displayName: "StoreItemRow__ItemWrapper",
70261
+ var LeftSection = /*#__PURE__*/styled.div.withConfig({
70262
+ displayName: "StoreItemRow__LeftSection",
70194
70263
  componentId: "sc-ptotuo-0"
70195
- })(["display:flex;align-items:center;gap:0.75rem;padding:0.5rem 1rem;border-bottom:1px solid rgba(255,255,255,0.1);background:", ";border-left:", ";&:last-child{border-bottom:none;}"], function (props) {
70196
- return props.$isHighlighted ? 'rgba(255, 215, 0, 0.1)' : 'transparent';
70197
- }, function (props) {
70198
- return props.$isHighlighted ? '3px solid #ffd700' : '3px solid transparent';
70199
- });
70264
+ })(["display:flex;align-items:center;gap:0.75rem;flex:1;min-width:0;"]);
70200
70265
  var ItemIconContainer$2 = /*#__PURE__*/styled.div.withConfig({
70201
70266
  displayName: "StoreItemRow__ItemIconContainer",
70202
70267
  componentId: "sc-ptotuo-1"
@@ -70289,6 +70354,7 @@ var StoreItemsSection = function StoreItemsSection(_ref) {
70289
70354
  var _useStoreFiltering = useStoreFiltering(items),
70290
70355
  searchQuery = _useStoreFiltering.searchQuery,
70291
70356
  setSearchQuery = _useStoreFiltering.setSearchQuery,
70357
+ selectedCategory = _useStoreFiltering.selectedCategory,
70292
70358
  setSelectedCategory = _useStoreFiltering.setSelectedCategory,
70293
70359
  categoryOptions = _useStoreFiltering.categoryOptions,
70294
70360
  filteredItems = _useStoreFiltering.filteredItems;
@@ -70330,13 +70396,18 @@ var StoreItemsSection = function StoreItemsSection(_ref) {
70330
70396
  value: searchQuery,
70331
70397
  onChange: setSearchQuery,
70332
70398
  placeholder: "Search items..."
70333
- })), React.createElement(DropdownContainer$2, null, React.createElement(Dropdown, {
70334
- options: categoryOptions,
70335
- onChange: function onChange(value) {
70336
- return setSelectedCategory(value);
70337
- },
70338
- width: "100%"
70339
- }))), React.createElement(ScrollableContent, {
70399
+ })), React.createElement(SegmentedToggle, {
70400
+ options: categoryOptions.map(function (opt) {
70401
+ return {
70402
+ id: opt.value,
70403
+ label: opt.option
70404
+ };
70405
+ }),
70406
+ activeId: selectedCategory,
70407
+ onChange: function onChange(id) {
70408
+ return setSelectedCategory(id);
70409
+ }
70410
+ })), React.createElement(ScrollableContent, {
70340
70411
  items: filteredItems,
70341
70412
  renderItem: renderStoreItem,
70342
70413
  emptyMessage: "No items match your filters.",
@@ -70356,10 +70427,6 @@ var SearchBarContainer$1 = /*#__PURE__*/styled.div.withConfig({
70356
70427
  displayName: "StoreItemsSection__SearchBarContainer",
70357
70428
  componentId: "sc-l6f466-2"
70358
70429
  })(["flex:0.75;"]);
70359
- var DropdownContainer$2 = /*#__PURE__*/styled.div.withConfig({
70360
- displayName: "StoreItemsSection__DropdownContainer",
70361
- componentId: "sc-l6f466-3"
70362
- })(["flex:0.25;min-width:140px;"]);
70363
70430
 
70364
70431
  var usePackFiltering = function usePackFiltering(packs) {
70365
70432
  var _useState = useState(''),
@@ -70377,12 +70444,48 @@ var usePackFiltering = function usePackFiltering(packs) {
70377
70444
  };
70378
70445
  };
70379
70446
 
70380
- var StorePacksSection = function StorePacksSection(_ref) {
70381
- var packs = _ref.packs,
70447
+ var PackRowItem = function PackRowItem(_ref) {
70448
+ var pack = _ref.pack,
70382
70449
  onAddToCart = _ref.onAddToCart,
70383
- onSelectPack = _ref.onSelectPack,
70384
- atlasJSON = _ref.atlasJSON,
70385
- atlasIMG = _ref.atlasIMG;
70450
+ renderPackIcon = _ref.renderPackIcon;
70451
+ var _useQuantityControl = useQuantityControl(),
70452
+ quantity = _useQuantityControl.quantity,
70453
+ handleQuantityChange = _useQuantityControl.handleQuantityChange,
70454
+ handleBlur = _useQuantityControl.handleBlur,
70455
+ incrementQuantity = _useQuantityControl.incrementQuantity,
70456
+ decrementQuantity = _useQuantityControl.decrementQuantity,
70457
+ resetQuantity = _useQuantityControl.resetQuantity;
70458
+ var handleAdd = function handleAdd() {
70459
+ onAddToCart(pack, quantity);
70460
+ resetQuantity();
70461
+ };
70462
+ return React.createElement(PackRow, null, React.createElement(LeftSection$1, null, React.createElement(PackIconContainer, null, renderPackIcon(pack)), React.createElement(PackDetails, null, React.createElement(PackName, null, pack.title), React.createElement(PackPrice, null, "$", pack.priceUSD), pack.description && React.createElement(PackDescription, null, pack.description))), React.createElement(Controls$2, null, React.createElement(ArrowsContainer$1, null, React.createElement(SelectArrow, {
70463
+ direction: "left",
70464
+ onPointerDown: decrementQuantity,
70465
+ size: 24
70466
+ }), React.createElement(QuantityInput$1, {
70467
+ type: "number",
70468
+ value: quantity,
70469
+ onChange: handleQuantityChange,
70470
+ onBlur: handleBlur,
70471
+ min: 1,
70472
+ max: 99,
70473
+ className: "rpgui-input"
70474
+ }), React.createElement(SelectArrow, {
70475
+ direction: "right",
70476
+ onPointerDown: incrementQuantity,
70477
+ size: 24
70478
+ })), React.createElement(CTAButton, {
70479
+ icon: React.createElement(FaCartPlus, null),
70480
+ label: "Add",
70481
+ onClick: handleAdd
70482
+ })));
70483
+ };
70484
+ var StorePacksSection = function StorePacksSection(_ref2) {
70485
+ var packs = _ref2.packs,
70486
+ onAddToCart = _ref2.onAddToCart,
70487
+ atlasJSON = _ref2.atlasJSON,
70488
+ atlasIMG = _ref2.atlasIMG;
70386
70489
  var _usePackFiltering = usePackFiltering(packs),
70387
70490
  searchQuery = _usePackFiltering.searchQuery,
70388
70491
  setSearchQuery = _usePackFiltering.setSearchQuery,
@@ -70411,20 +70514,13 @@ var StorePacksSection = function StorePacksSection(_ref) {
70411
70514
  });
70412
70515
  }, [atlasJSON, atlasIMG]);
70413
70516
  var renderPack = useCallback(function (pack) {
70414
- return React.createElement(PackRow, {
70517
+ return React.createElement(PackRowItem, {
70415
70518
  key: pack.key,
70416
- onClick: function onClick() {
70417
- return onSelectPack == null ? void 0 : onSelectPack(pack);
70418
- }
70419
- }, React.createElement(PackIconContainer, null, renderPackIcon(pack)), React.createElement(PackDetails, null, React.createElement(PackName, null, pack.title), React.createElement(PackPrice, null, "$", pack.priceUSD), pack.description && React.createElement(PackDescription, null, pack.description)), React.createElement(Controls$2, null, React.createElement(CTAButton, {
70420
- icon: React.createElement(FaCartPlus, null),
70421
- label: "Add",
70422
- onClick: function onClick(e) {
70423
- e.stopPropagation();
70424
- onAddToCart(pack);
70425
- }
70426
- })));
70427
- }, [onSelectPack, onAddToCart]);
70519
+ pack: pack,
70520
+ onAddToCart: onAddToCart,
70521
+ renderPackIcon: renderPackIcon
70522
+ });
70523
+ }, [onAddToCart, renderPackIcon]);
70428
70524
  return React.createElement(ScrollableContent, {
70429
70525
  items: filteredPacks,
70430
70526
  renderItem: renderPack,
@@ -70438,34 +70534,46 @@ var StorePacksSection = function StorePacksSection(_ref) {
70438
70534
  maxHeight: "420px"
70439
70535
  });
70440
70536
  };
70441
- var PackRow = /*#__PURE__*/styled.div.withConfig({
70537
+ var PackRow = /*#__PURE__*/styled(ItemRowWrapper).withConfig({
70442
70538
  displayName: "StorePacksSection__PackRow",
70443
70539
  componentId: "sc-ulazq3-0"
70444
- })(["display:flex;align-items:center;gap:0.75rem;padding:0.5rem 1rem;border-bottom:1px solid rgba(255,255,255,0.1);cursor:pointer;&:last-child{border-bottom:none;}&:hover{background:rgba(255,255,255,0.04);}"]);
70540
+ })([""]);
70541
+ var LeftSection$1 = /*#__PURE__*/styled.div.withConfig({
70542
+ displayName: "StorePacksSection__LeftSection",
70543
+ componentId: "sc-ulazq3-1"
70544
+ })(["display:flex;align-items:center;gap:0.75rem;flex:1;min-width:0;"]);
70445
70545
  var PackIconContainer = /*#__PURE__*/styled.div.withConfig({
70446
70546
  displayName: "StorePacksSection__PackIconContainer",
70447
- componentId: "sc-ulazq3-1"
70547
+ componentId: "sc-ulazq3-2"
70448
70548
  })(["width:40px;height:40px;flex-shrink:0;display:flex;align-items:center;justify-content:center;img{width:100%;height:100%;object-fit:cover;}"]);
70449
70549
  var PackDetails = /*#__PURE__*/styled.div.withConfig({
70450
70550
  displayName: "StorePacksSection__PackDetails",
70451
- componentId: "sc-ulazq3-2"
70551
+ componentId: "sc-ulazq3-3"
70452
70552
  })(["flex:1;display:flex;flex-direction:column;gap:0.25rem;min-width:0;"]);
70453
70553
  var PackName = /*#__PURE__*/styled.div.withConfig({
70454
70554
  displayName: "StorePacksSection__PackName",
70455
- componentId: "sc-ulazq3-3"
70555
+ componentId: "sc-ulazq3-4"
70456
70556
  })(["font-family:'Press Start 2P',cursive;font-size:0.75rem;color:#ffffff;"]);
70457
70557
  var PackPrice = /*#__PURE__*/styled.div.withConfig({
70458
70558
  displayName: "StorePacksSection__PackPrice",
70459
- componentId: "sc-ulazq3-4"
70559
+ componentId: "sc-ulazq3-5"
70460
70560
  })(["font-family:'Press Start 2P',cursive;font-size:0.625rem;color:#fef08a;"]);
70461
70561
  var PackDescription = /*#__PURE__*/styled.div.withConfig({
70462
70562
  displayName: "StorePacksSection__PackDescription",
70463
- componentId: "sc-ulazq3-5"
70563
+ componentId: "sc-ulazq3-6"
70464
70564
  })(["font-family:'Press Start 2P',cursive;font-size:0.625rem;color:rgba(255,255,255,0.7);line-height:1.4;"]);
70465
70565
  var Controls$2 = /*#__PURE__*/styled.div.withConfig({
70466
70566
  displayName: "StorePacksSection__Controls",
70467
- componentId: "sc-ulazq3-6"
70468
- })(["display:flex;align-items:center;flex-shrink:0;"]);
70567
+ componentId: "sc-ulazq3-7"
70568
+ })(["display:flex;align-items:center;gap:0.5rem;flex-shrink:0;"]);
70569
+ var ArrowsContainer$1 = /*#__PURE__*/styled.div.withConfig({
70570
+ displayName: "StorePacksSection__ArrowsContainer",
70571
+ componentId: "sc-ulazq3-8"
70572
+ })(["position:relative;display:flex;align-items:center;width:120px;height:42px;justify-content:space-between;"]);
70573
+ var QuantityInput$1 = /*#__PURE__*/styled.input.withConfig({
70574
+ displayName: "StorePacksSection__QuantityInput",
70575
+ componentId: "sc-ulazq3-9"
70576
+ })(["width:40px;text-align:center;margin:0 auto;font-size:0.875rem;background:rgba(0,0,0,0.2);color:#ffffff;border:none;padding:0.25rem;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;margin:0;}"]);
70469
70577
 
70470
70578
  var StoreItemDetails = function StoreItemDetails(_ref) {
70471
70579
  var item = _ref.item,
@@ -70537,6 +70645,7 @@ var Actions = /*#__PURE__*/styled.div.withConfig({
70537
70645
  })(["margin-top:auto;padding-top:1rem;border-top:1px solid rgba(255,255,255,0.1);"]);
70538
70646
 
70539
70647
  var Store = function Store(_ref) {
70648
+ var _tabsMap$activeTab;
70540
70649
  var items = _ref.items,
70541
70650
  _ref$packs = _ref.packs,
70542
70651
  packs = _ref$packs === void 0 ? [] : _ref$packs,
@@ -70560,7 +70669,8 @@ var Store = function Store(_ref) {
70560
70669
  customPacksContent = _ref.customPacksContent,
70561
70670
  customWalletContent = _ref.customWalletContent,
70562
70671
  _ref$packsTabLabel = _ref.packsTabLabel,
70563
- packsTabLabel = _ref$packsTabLabel === void 0 ? 'Packs' : _ref$packsTabLabel;
70672
+ packsTabLabel = _ref$packsTabLabel === void 0 ? 'Packs' : _ref$packsTabLabel,
70673
+ packsBadge = _ref.packsBadge;
70564
70674
  var _useState = useState(null),
70565
70675
  selectedPack = _useState[0],
70566
70676
  setSelectedPack = _useState[1];
@@ -70591,7 +70701,10 @@ var Store = function Store(_ref) {
70591
70701
  var _useState4 = useState(null),
70592
70702
  currentMetadataItem = _useState4[0],
70593
70703
  setCurrentMetadataItem = _useState4[1];
70594
- var handleAddPackToCart = function handleAddPackToCart(pack) {
70704
+ var handleAddPackToCart = function handleAddPackToCart(pack, quantity) {
70705
+ if (quantity === void 0) {
70706
+ quantity = 1;
70707
+ }
70595
70708
  var packItem = {
70596
70709
  key: pack.key,
70597
70710
  name: pack.title,
@@ -70623,7 +70736,7 @@ var Store = function Store(_ref) {
70623
70736
  maxStackSize: 1,
70624
70737
  isUsable: false
70625
70738
  };
70626
- handleAddToCart(packItem, 1);
70739
+ handleAddToCart(packItem, quantity);
70627
70740
  };
70628
70741
  var filterItems = function filterItems(itemsToFilter, type) {
70629
70742
  return itemsToFilter.filter(function (item) {
@@ -70674,6 +70787,10 @@ var Store = function Store(_ref) {
70674
70787
  premium: {
70675
70788
  id: 'premium',
70676
70789
  title: 'Premium',
70790
+ icon: React.createElement(Crown, {
70791
+ width: 18,
70792
+ height: 18
70793
+ }),
70677
70794
  content: React.createElement(StorePacksSection, {
70678
70795
  packs: packs.filter(function (pack) {
70679
70796
  return pack.priceUSD >= 9.99;
@@ -70686,7 +70803,15 @@ var Store = function Store(_ref) {
70686
70803
  },
70687
70804
  packs: {
70688
70805
  id: 'packs',
70689
- title: packsTabLabel,
70806
+ title: packsBadge ? React.createElement(TabLabelWithBadge, null, packsTabLabel, React.createElement(LabelPill, {
70807
+ background: "#f59e0b",
70808
+ borderColor: "#f59e0b",
70809
+ color: "#000"
70810
+ }, packsBadge)) : packsTabLabel,
70811
+ icon: React.createElement(Gift, {
70812
+ width: 18,
70813
+ height: 18
70814
+ }),
70690
70815
  content: customPacksContent != null ? customPacksContent : React.createElement(StorePacksSection, {
70691
70816
  packs: hidePremiumTab ? packs : packs.filter(function (pack) {
70692
70817
  return pack.priceUSD < 9.99;
@@ -70700,6 +70825,10 @@ var Store = function Store(_ref) {
70700
70825
  items: {
70701
70826
  id: 'items',
70702
70827
  title: 'Items',
70828
+ icon: React.createElement(Box, {
70829
+ width: 18,
70830
+ height: 18
70831
+ }),
70703
70832
  content: React.createElement(StoreItemsSection, {
70704
70833
  items: filteredItems.items,
70705
70834
  onAddToCart: handleAddToCart,
@@ -70712,12 +70841,13 @@ var Store = function Store(_ref) {
70712
70841
  wallet: {
70713
70842
  id: 'wallet',
70714
70843
  title: 'Wallet',
70844
+ icon: React.createElement(Wallet, {
70845
+ width: 18,
70846
+ height: 18
70847
+ }),
70715
70848
  content: customWalletContent != null ? customWalletContent : null
70716
70849
  }
70717
70850
  };
70718
- var tabs = availableTabIds.map(function (id) {
70719
- return tabsMap[id];
70720
- });
70721
70851
  return React.createElement(DraggableContainer, {
70722
70852
  title: "Store",
70723
70853
  onCloseButton: onClose,
@@ -70780,18 +70910,19 @@ var Store = function Store(_ref) {
70780
70910
  icon: React.createElement(FaShoppingCart, null),
70781
70911
  label: getTotalItems() + " items ($" + getTotalPrice().toFixed(2) + ")",
70782
70912
  onClick: openCart
70783
- }))), React.createElement(MainContent$1, null, React.createElement(InternalTabs, {
70784
- tabs: tabs,
70785
- activeTextColor: "#000000",
70786
- activeColor: "#fef08a",
70787
- inactiveColor: "#6b7280",
70788
- borderColor: "#f59e0b",
70789
- hoverColor: "#fef3c7",
70790
- activeTab: activeTab,
70913
+ }))), React.createElement(MainContent$1, null, React.createElement(Tabs, {
70914
+ options: availableTabIds.map(function (id) {
70915
+ return {
70916
+ id: id,
70917
+ label: tabsMap[id].title,
70918
+ icon: tabsMap[id].icon
70919
+ };
70920
+ }),
70921
+ activeTabId: activeTab,
70791
70922
  onTabChange: function onTabChange(tabId) {
70792
70923
  return setActiveTab(tabId);
70793
70924
  }
70794
- })), cartItems.length > 0 && React.createElement(Footer$2, null, React.createElement(CartSummary, null, React.createElement(CartInfo, null, React.createElement("span", null, "Items in cart:"), React.createElement("span", null, getTotalItems())), React.createElement(CartInfo, null, React.createElement("span", null, "Total:"), React.createElement("span", null, "$", getTotalPrice().toFixed(2)))), React.createElement(CTAButton, {
70925
+ }), React.createElement(TabContent, null, (_tabsMap$activeTab = tabsMap[activeTab]) == null ? void 0 : _tabsMap$activeTab.content)), cartItems.length > 0 && React.createElement(Footer$2, null, React.createElement(CartSummary, null, React.createElement(CartInfo, null, React.createElement("span", null, "Items in cart:"), React.createElement("span", null, getTotalItems())), React.createElement(CartInfo, null, React.createElement("span", null, "Total:"), React.createElement("span", null, "$", getTotalPrice().toFixed(2)))), React.createElement(CTAButton, {
70795
70926
  icon: React.createElement(FaShoppingCart, null),
70796
70927
  label: "Proceed to Checkout ($" + getTotalPrice().toFixed(2) + ")",
70797
70928
  onClick: openCart,
@@ -70817,26 +70948,34 @@ var CartButton = /*#__PURE__*/styled.div.withConfig({
70817
70948
  var MainContent$1 = /*#__PURE__*/styled.div.withConfig({
70818
70949
  displayName: "Store__MainContent",
70819
70950
  componentId: "sc-64dj00-4"
70820
- })(["flex:1;display:flex;flex-direction:column;min-height:0;overflow:hidden;.rpgui-tabs-content{flex:1;overflow-y:auto;padding-right:0.5rem;}"]);
70951
+ })(["flex:1;display:flex;flex-direction:column;min-height:0;overflow:hidden;"]);
70952
+ var TabContent = /*#__PURE__*/styled.div.withConfig({
70953
+ displayName: "Store__TabContent",
70954
+ componentId: "sc-64dj00-5"
70955
+ })(["flex:1;overflow-y:auto;padding-right:0.5rem;"]);
70821
70956
  var Footer$2 = /*#__PURE__*/styled.div.withConfig({
70822
70957
  displayName: "Store__Footer",
70823
- componentId: "sc-64dj00-5"
70958
+ componentId: "sc-64dj00-6"
70824
70959
  })(["display:flex;flex-direction:column;gap:1rem;padding:1rem;border-top:2px solid #f59e0b;background:rgba(0,0,0,0.2);flex-shrink:0;"]);
70825
70960
  var CartSummary = /*#__PURE__*/styled.div.withConfig({
70826
70961
  displayName: "Store__CartSummary",
70827
- componentId: "sc-64dj00-6"
70962
+ componentId: "sc-64dj00-7"
70828
70963
  })(["display:flex;flex-direction:column;gap:0.5rem;"]);
70829
70964
  var CartInfo = /*#__PURE__*/styled.div.withConfig({
70830
70965
  displayName: "Store__CartInfo",
70831
- componentId: "sc-64dj00-7"
70966
+ componentId: "sc-64dj00-8"
70832
70967
  })(["display:flex;align-items:center;gap:0.75rem;font-family:'Press Start 2P',cursive;font-size:0.75rem;color:#ffffff;span:last-child{color:#fef08a;}"]);
70968
+ var TabLabelWithBadge = /*#__PURE__*/styled.span.withConfig({
70969
+ displayName: "Store__TabLabelWithBadge",
70970
+ componentId: "sc-64dj00-9"
70971
+ })(["display:inline-flex;align-items:center;gap:5px;"]);
70833
70972
  var LoadingMessage$1 = /*#__PURE__*/styled.div.withConfig({
70834
70973
  displayName: "Store__LoadingMessage",
70835
- componentId: "sc-64dj00-8"
70974
+ componentId: "sc-64dj00-10"
70836
70975
  })(["text-align:center;color:", ";padding:2rem;"], uiColors.white);
70837
70976
  var ErrorMessage$3 = /*#__PURE__*/styled.div.withConfig({
70838
70977
  displayName: "Store__ErrorMessage",
70839
- componentId: "sc-64dj00-9"
70978
+ componentId: "sc-64dj00-11"
70840
70979
  })(["text-align:center;color:", ";padding:2rem;"], uiColors.red);
70841
70980
 
70842
70981
  var PaymentMethodModal = function PaymentMethodModal(_ref) {
@@ -71128,7 +71267,7 @@ var TradingItemRow = function TradingItemRow(_ref) {
71128
71267
  }
71129
71268
  return null;
71130
71269
  };
71131
- return React.createElement(ItemWrapper$2, null, React.createElement(ItemIconContainer$3, null, React.createElement(SpriteContainer$6, null, React.createElement(ItemInfoWrapper, {
71270
+ return React.createElement(ItemWrapper$1, null, React.createElement(ItemIconContainer$3, null, React.createElement(SpriteContainer$6, null, React.createElement(ItemInfoWrapper, {
71132
71271
  atlasIMG: atlasIMG,
71133
71272
  atlasJSON: atlasJSON,
71134
71273
  equipmentSet: equipmentSet,
@@ -71162,7 +71301,7 @@ var TradingItemRow = function TradingItemRow(_ref) {
71162
71301
  onPointerDown: function onPointerDown() {
71163
71302
  return onLeftClick();
71164
71303
  }
71165
- }), React.createElement(QuantityInput$1, {
71304
+ }), React.createElement(QuantityInput$2, {
71166
71305
  type: "text",
71167
71306
  value: inputQty,
71168
71307
  onChange: handleQuantityChange,
@@ -71188,7 +71327,7 @@ var StyledArrow = /*#__PURE__*/styled(SelectArrow).withConfig({
71188
71327
  displayName: "TradingItemRow__StyledArrow",
71189
71328
  componentId: "sc-mja0b5-0"
71190
71329
  })(["margin:0 1.5rem;"]);
71191
- var ItemWrapper$2 = /*#__PURE__*/styled.div.withConfig({
71330
+ var ItemWrapper$1 = /*#__PURE__*/styled.div.withConfig({
71192
71331
  displayName: "TradingItemRow__ItemWrapper",
71193
71332
  componentId: "sc-mja0b5-1"
71194
71333
  })(["width:100%;display:flex;justify-content:space-between;margin-bottom:0.5rem;padding:0.25rem;&:hover{background-color:", ";}"], uiColors.darkGray);
@@ -71212,7 +71351,7 @@ var QuantityContainer$1 = /*#__PURE__*/styled.div.withConfig({
71212
71351
  displayName: "TradingItemRow__QuantityContainer",
71213
71352
  componentId: "sc-mja0b5-6"
71214
71353
  })(["display:flex;min-width:90px;width:40%;justify-content:flex-end;align-items:center;flex:30%;gap:2px;position:relative;"]);
71215
- var QuantityInput$1 = /*#__PURE__*/styled.input.withConfig({
71354
+ var QuantityInput$2 = /*#__PURE__*/styled.input.withConfig({
71216
71355
  displayName: "TradingItemRow__QuantityInput",
71217
71356
  componentId: "sc-mja0b5-7"
71218
71357
  })(["width:30px;text-align:center;background-color:", ";color:white;border:none;padding:1px;font-size:", ";position:relative;right:4px;"], uiColors.darkGray, uiFonts.size.small);
@@ -71510,5 +71649,5 @@ var LessonContainer = /*#__PURE__*/styled.div.withConfig({
71510
71649
  componentId: "sc-7tgzv2-6"
71511
71650
  })(["display:flex;flex-direction:column;justify-content:space-between;min-height:200px;p{font-size:0.7rem !important;}"]);
71512
71651
 
71513
- export { ActionButtons, AsyncDropdown, BLUEPRINTS_PER_PAGE, BUY_ORDERS_PER_PAGE, BlueprintSearchModal, Button, ButtonTypes, BuyOrderPanel, BuyOrderRow, CTAButton, CartView, CharacterSelection, CharacterSkinSelectionModal, Chat, ChatDeprecated, ChatRevamp, CheckButton, CheckItem, CircularController, CraftBook, DCWalletContent, DCWalletModal, DailyTasks, DraggableContainer, Dropdown, DropdownSelectorContainer, DynamicText, EquipmentSet, EquipmentSlotSpriteByType, ErrorBoundary, FriendList, GemSelector, GroupedMarketplaceRow, HISTORY_ITEMS_PER_PAGE, HistoryDialog, HistoryPanel, ImageCarousel, ImgSide, InformationCenter, Input, InputRadio, InternalTabs, ItemContainer$1 as ItemContainer, ItemPropertySimpleHandler, ItemQuantitySelectorModal, ItemSelector, ItemSlot, JoystickDPad, Leaderboard, ListMenu, LoginStreakPanel, Marketplace, MarketplaceBuyModal, MarketplaceRows, MarketplaceSettingsPanel, MetadataCollector, MultitabType, NPCDialog, NPCDialogType, NPCMultiDialog, PartyCreate, PartyDashboard, PartyInvite, PartyManager, PartyManagerRow, PartyRow, PaymentMethodModal, PlayersRow, ProgressBar$1 as ProgressBar, PropertySelect, QuantitySelectorModal, QuestInfo, QuestList, QuestionDialog, RPGUIContainer, RPGUIContainerTypes, RPGUIRoot, RangeSlider, RangeSliderType, SelectArrow, Shortcuts, SimpleImageCarousel, SkillProgressBar, SkillsContainer, SocialModal, Spellbook, SpriteFromAtlas, Stepper, Store, TRANSACTION_TYPE_FILTER_ALL, TabBody, Table, TableCell, TableHeader, TableRow, TabsContainer$1 as TabsContainer, TextArea, TimeWidget, Tooltip, TradingMenu, Truncate, TutorialStepper, UserActionLink, _RPGUI, formatQuestStatus, formatQuestText, getMockedPlayersRowsLeader, getMockedPlayersRowsNotLeader, getQuestStatusColor, mockedPartyManager, mockedPartyRows, mockedPlayersRows, mockedPlayersRows2, useEventListener, useStoreCart };
71652
+ export { ActionButtons, AsyncDropdown, BLUEPRINTS_PER_PAGE, BUY_ORDERS_PER_PAGE, BlueprintSearchModal, Button, ButtonTypes, BuyOrderPanel, BuyOrderRow, CTAButton, CartView, CharacterSelection, CharacterSkinSelectionModal, Chat, ChatDeprecated, ChatRevamp, CheckButton, CheckItem, CircularController, CraftBook, DCWalletContent, DCWalletModal, DailyTasks, DraggableContainer, Dropdown, DropdownSelectorContainer, DynamicText, EquipmentSet, EquipmentSlotSpriteByType, ErrorBoundary, FriendList, GemSelector, GroupedBuyOrderRow, GroupedMarketplaceRow, HISTORY_ITEMS_PER_PAGE, HistoryDialog, HistoryPanel, ImageCarousel, ImgSide, InformationCenter, Input, InputRadio, InternalTabs, ItemContainer$1 as ItemContainer, ItemPropertySimpleHandler, ItemQuantitySelectorModal, ItemSelector, ItemSlot, JoystickDPad, Leaderboard, ListMenu, LoginStreakPanel, Marketplace, MarketplaceBuyModal, MarketplaceRows, MarketplaceSettingsPanel, MetadataCollector, MultitabType, NPCDialog, NPCDialogType, NPCMultiDialog, PartyCreate, PartyDashboard, PartyInvite, PartyManager, PartyManagerRow, PartyRow, PaymentMethodModal, PlayersRow, ProgressBar$1 as ProgressBar, PropertySelect, QuantitySelectorModal, QuestInfo, QuestList, QuestionDialog, RPGUIContainer, RPGUIContainerTypes, RPGUIRoot, RangeSlider, RangeSliderType, SelectArrow, Shortcuts, SimpleImageCarousel, SkillProgressBar, SkillsContainer, SocialModal, Spellbook, SpriteFromAtlas, Stepper, Store, TRANSACTION_TYPE_FILTER_ALL, TabBody, Table, TableCell, TableHeader, TableRow, TabsContainer$1 as TabsContainer, TextArea, TimeWidget, Tooltip, TradingMenu, Truncate, TutorialStepper, UserActionLink, _RPGUI, formatQuestStatus, formatQuestText, getMockedPlayersRowsLeader, getMockedPlayersRowsNotLeader, getQuestStatusColor, mockedPartyManager, mockedPartyRows, mockedPlayersRows, mockedPlayersRows2, useEventListener, useStoreCart };
71514
71653
  //# sourceMappingURL=long-bow.esm.js.map