@rpg-engine/long-bow 0.8.21 → 0.8.23
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/components/InformationCenter/InformationCenter.d.ts +16 -13
- package/dist/components/InformationCenter/sections/bestiary/InformationCenterBestiarySection.d.ts +1 -1
- package/dist/components/InformationCenter/sections/bestiary/InformationCenterNPCDetails.d.ts +2 -1
- package/dist/components/InformationCenter/sections/bestiary/InformationCenterNPCTooltip.d.ts +1 -1
- package/dist/components/InformationCenter/sections/faq/InformationCenterFaqSection.d.ts +1 -1
- package/dist/components/InformationCenter/sections/items/InformationCenterItemDetails.d.ts +1 -1
- package/dist/components/InformationCenter/sections/items/InformationCenterItemTooltip.d.ts +1 -1
- package/dist/components/InformationCenter/sections/items/InformationCenterItemsSection.d.ts +2 -1
- package/dist/components/InformationCenter/sections/tutorials/InformationCenterTutorialsSection.d.ts +1 -1
- package/dist/long-bow.cjs.development.js +795 -688
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +796 -689
- package/dist/long-bow.esm.js.map +1 -1
- package/dist/mocks/informationCenter.mocks.d.ts +1 -2
- package/package.json +2 -2
- package/src/components/CraftBook/CraftBook.tsx +1 -1
- package/src/components/Dropdown.tsx +25 -3
- package/src/components/InformationCenter/InformationCenter.tsx +125 -124
- package/src/components/InformationCenter/sections/bestiary/InformationCenterBestiarySection.tsx +52 -7
- package/src/components/InformationCenter/sections/bestiary/InformationCenterNPCDetails.tsx +201 -207
- package/src/components/InformationCenter/sections/bestiary/InformationCenterNPCTooltip.tsx +7 -6
- package/src/components/InformationCenter/sections/faq/InformationCenterFaqSection.tsx +1 -1
- package/src/components/InformationCenter/sections/items/InformationCenterItemDetails.tsx +8 -6
- package/src/components/InformationCenter/sections/items/InformationCenterItemTooltip.tsx +1 -1
- package/src/components/InformationCenter/sections/items/InformationCenterItemsSection.tsx +36 -10
- package/src/components/InformationCenter/sections/tutorials/InformationCenterTutorialsSection.tsx +146 -36
- package/src/components/InformationCenter/shared/BaseInformationDetails.tsx +2 -0
- package/src/mocks/informationCenter.mocks.ts +159 -48
- package/src/stories/UI/info/InformationCenter.stories.tsx +1 -1
- package/dist/components/InformationCenter/InformationCenterTypes.d.ts +0 -96
- package/src/components/InformationCenter/InformationCenterTypes.ts +0 -105
|
@@ -27405,6 +27405,9 @@ var Icon = /*#__PURE__*/styled__default.img.withConfig({
|
|
|
27405
27405
|
return width;
|
|
27406
27406
|
});
|
|
27407
27407
|
|
|
27408
|
+
var ITEM_HEIGHT = 35;
|
|
27409
|
+
var MAX_ITEMS_VISIBLE = 10;
|
|
27410
|
+
var MAX_HEIGHT = MAX_ITEMS_VISIBLE * ITEM_HEIGHT;
|
|
27408
27411
|
var Dropdown = function Dropdown(_ref) {
|
|
27409
27412
|
var options = _ref.options,
|
|
27410
27413
|
width = _ref.width,
|
|
@@ -27457,7 +27460,8 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
27457
27460
|
}, React__default.createElement("label", null, "\u25BC"), " ", selectedOption), React__default.createElement(DropdownOptions$1, {
|
|
27458
27461
|
className: "rpgui-dropdown-imp",
|
|
27459
27462
|
opened: opened,
|
|
27460
|
-
opensUp: opensUp
|
|
27463
|
+
opensUp: opensUp,
|
|
27464
|
+
optionsCount: options.length
|
|
27461
27465
|
}, options.map(function (option) {
|
|
27462
27466
|
return React__default.createElement("li", {
|
|
27463
27467
|
key: option.id,
|
|
@@ -27472,23 +27476,25 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
27472
27476
|
var Container$8 = /*#__PURE__*/styled__default.div.withConfig({
|
|
27473
27477
|
displayName: "Dropdown__Container",
|
|
27474
27478
|
componentId: "sc-8arn65-0"
|
|
27475
|
-
})(["position:relative;width:", ";"], function (props) {
|
|
27479
|
+
})(["position:relative;width:", ";max-height:", "px;"], function (props) {
|
|
27476
27480
|
return props.width || '100%';
|
|
27477
|
-
});
|
|
27481
|
+
}, MAX_HEIGHT);
|
|
27478
27482
|
var DropdownSelect$1 = /*#__PURE__*/styled__default.p.withConfig({
|
|
27479
27483
|
displayName: "Dropdown__DropdownSelect",
|
|
27480
27484
|
componentId: "sc-8arn65-1"
|
|
27481
|
-
})(["width:100%;box-sizing:border-box;label{display:inline-block;transform:translateY(-2px);}"]);
|
|
27485
|
+
})(["width:100%;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-height:", "px;label{display:inline-block;transform:translateY(-2px);}"], ITEM_HEIGHT);
|
|
27482
27486
|
var DropdownOptions$1 = /*#__PURE__*/styled__default.ul.withConfig({
|
|
27483
27487
|
displayName: "Dropdown__DropdownOptions",
|
|
27484
27488
|
componentId: "sc-8arn65-2"
|
|
27485
|
-
})(["position:absolute;width:100%;max-height:
|
|
27489
|
+
})(["position:absolute;width:100%;max-height:", ";overflow-y:auto;display:", ";box-sizing:border-box;bottom:", ";top:", ";margin:0;padding:0;li{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:8px 12px;min-height:", "px;max-height:", "px;box-sizing:border-box;line-height:1.2;}"], function (props) {
|
|
27490
|
+
return props.opened ? Math.min(props.optionsCount * ITEM_HEIGHT, MAX_HEIGHT) + "px" : '0';
|
|
27491
|
+
}, function (props) {
|
|
27486
27492
|
return props.opened ? 'block' : 'none';
|
|
27487
27493
|
}, function (props) {
|
|
27488
27494
|
return props.opensUp ? '100%' : 'auto';
|
|
27489
27495
|
}, function (props) {
|
|
27490
27496
|
return props.opensUp ? 'auto' : '100%';
|
|
27491
|
-
});
|
|
27497
|
+
}, ITEM_HEIGHT, ITEM_HEIGHT);
|
|
27492
27498
|
|
|
27493
27499
|
var modalRoot = /*#__PURE__*/document.getElementById('modal-root');
|
|
27494
27500
|
var ModalPortal = function ModalPortal(_ref) {
|
|
@@ -29138,7 +29144,7 @@ var SearchContainer$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
29138
29144
|
var ContentContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
29139
29145
|
displayName: "CraftBook__ContentContainer",
|
|
29140
29146
|
componentId: "sc-19q95ue-7"
|
|
29141
|
-
})(["flex:1;display:flex;flex-direction:column;padding:16px;padding-right:0;padding-bottom:0;width:100%;position:relative;min-height:
|
|
29147
|
+
})(["flex:1;display:flex;flex-direction:column;padding:16px;padding-right:0;padding-bottom:0;width:100%;position:relative;min-height:300px;overflow:hidden;"]);
|
|
29142
29148
|
var RadioInputScroller = /*#__PURE__*/styled__default.div.withConfig({
|
|
29143
29149
|
displayName: "CraftBook__RadioInputScroller",
|
|
29144
29150
|
componentId: "sc-19q95ue-8"
|
|
@@ -31155,7 +31161,7 @@ var BaseInformationDetails = function BaseInformationDetails(_ref) {
|
|
|
31155
31161
|
var Container$p = /*#__PURE__*/styled__default.div.withConfig({
|
|
31156
31162
|
displayName: "BaseInformationDetails__Container",
|
|
31157
31163
|
componentId: "sc-1vguuz8-0"
|
|
31158
|
-
})(["position:fixed;top:0;left:0;right:0;bottom:0;display:flex;justify-content:center;align-items:center;z-index:1000;"]);
|
|
31164
|
+
})(["position:fixed;top:0;left:0;right:0;bottom:0;display:flex;justify-content:center;align-items:center;z-index:1000;height:90%;width:90%;"]);
|
|
31159
31165
|
var Overlay = /*#__PURE__*/styled__default.div.withConfig({
|
|
31160
31166
|
displayName: "BaseInformationDetails__Overlay",
|
|
31161
31167
|
componentId: "sc-1vguuz8-1"
|
|
@@ -31185,226 +31191,157 @@ var SpriteContainer$2 = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
31185
31191
|
componentId: "sc-1vguuz8-7"
|
|
31186
31192
|
})(["width:64px;height:64px;background:rgba(0,0,0,0.3);border-radius:4px;display:flex;justify-content:center;align-items:center;position:relative;.sprite-from-atlas-img{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) scale(2);transform-origin:center;}"]);
|
|
31187
31193
|
|
|
31188
|
-
var
|
|
31189
|
-
var
|
|
31190
|
-
var _itemPath$split$pop;
|
|
31191
|
-
var cleanText = ((_itemPath$split$pop = itemPath.split('/').pop()) == null ? void 0 : _itemPath$split$pop.split('.').shift()) || '';
|
|
31192
|
-
return cleanText.split('-').map(function (word) {
|
|
31193
|
-
return word.charAt(0).toUpperCase() + word.slice(1);
|
|
31194
|
-
}).join(' ');
|
|
31195
|
-
};
|
|
31196
|
-
var InformationCenterNPCDetails = function InformationCenterNPCDetails(_ref) {
|
|
31197
|
-
var _npc$loots, _npc$skills$strength, _npc$skills$dexterity, _npc$skills$resistanc;
|
|
31198
|
-
var npc = _ref.npc,
|
|
31194
|
+
var InformationCenterItemDetails = function InformationCenterItemDetails(_ref) {
|
|
31195
|
+
var item = _ref.item,
|
|
31199
31196
|
itemsAtlasJSON = _ref.itemsAtlasJSON,
|
|
31200
31197
|
itemsAtlasIMG = _ref.itemsAtlasIMG,
|
|
31201
|
-
|
|
31202
|
-
entitiesAtlasIMG = _ref.entitiesAtlasIMG,
|
|
31203
|
-
iconAtlasIMG = _ref.iconAtlasIMG,
|
|
31204
|
-
iconAtlasJSON = _ref.iconAtlasJSON,
|
|
31198
|
+
droppedBy = _ref.droppedBy,
|
|
31205
31199
|
onBack = _ref.onBack;
|
|
31206
31200
|
var isMobile = shared.isMobileOrTablet();
|
|
31207
|
-
var
|
|
31208
|
-
|
|
31209
|
-
|
|
31210
|
-
|
|
31211
|
-
currentLootPage = _useState2[0],
|
|
31212
|
-
setCurrentLootPage = _useState2[1];
|
|
31213
|
-
var formatText = function formatText(text) {
|
|
31214
|
-
if (typeof text === 'number') {
|
|
31215
|
-
return text.toString();
|
|
31216
|
-
}
|
|
31217
|
-
return text.toString().replace(/([A-Z])/g, ' $1').trim().replace(/([A-Z]+)([A-Z][a-z])/g, '$1 $2').replace(/\s+/g, ' ');
|
|
31201
|
+
var renderAllowedSlots = function renderAllowedSlots() {
|
|
31202
|
+
var _item$allowedEquipSlo;
|
|
31203
|
+
if (!((_item$allowedEquipSlo = item.allowedEquipSlotType) != null && _item$allowedEquipSlo.length)) return null;
|
|
31204
|
+
return React__default.createElement(InfoItem, null, React__default.createElement(Label, null, "Equip Slots:"), React__default.createElement(Value, null, item.allowedEquipSlotType.join(', ')));
|
|
31218
31205
|
};
|
|
31219
|
-
var
|
|
31220
|
-
|
|
31221
|
-
|
|
31222
|
-
|
|
31223
|
-
|
|
31224
|
-
|
|
31225
|
-
case 10:
|
|
31226
|
-
return 'Uncommon';
|
|
31227
|
-
case 15:
|
|
31228
|
-
return 'Semi Common';
|
|
31229
|
-
case 20:
|
|
31230
|
-
return 'Common';
|
|
31231
|
-
case 35:
|
|
31232
|
-
return 'Very Common';
|
|
31233
|
-
default:
|
|
31234
|
-
return 'Unknown';
|
|
31235
|
-
}
|
|
31206
|
+
var renderRequirements = function renderRequirements() {
|
|
31207
|
+
if (!item.minRequirements) return null;
|
|
31208
|
+
return React__default.createElement(StyledCollapsible, {
|
|
31209
|
+
title: "Requirements",
|
|
31210
|
+
defaultOpen: !isMobile
|
|
31211
|
+
}, React__default.createElement(RequirementsGrid, null, item.minRequirements.level && React__default.createElement(RequirementItem, null, React__default.createElement(Label, null, "Level:"), React__default.createElement(Value, null, item.minRequirements.level)), item.minRequirements.skill && React__default.createElement(RequirementItem, null, React__default.createElement(Label, null, item.minRequirements.skill.name, ":"), React__default.createElement(Value, null, item.minRequirements.skill.level))));
|
|
31236
31212
|
};
|
|
31237
|
-
var filteredLoots = ((_npc$loots = npc.loots) == null ? void 0 : _npc$loots.filter(function (loot) {
|
|
31238
|
-
return formatItemName(loot.itemBlueprintKey).toLowerCase().includes(lootSearchQuery.toLowerCase());
|
|
31239
|
-
})) || [];
|
|
31240
|
-
var totalLootPages = Math.ceil(filteredLoots.length / ITEMS_PER_PAGE$1);
|
|
31241
|
-
var paginatedLoots = filteredLoots.slice((currentLootPage - 1) * ITEMS_PER_PAGE$1, currentLootPage * ITEMS_PER_PAGE$1);
|
|
31242
31213
|
return React__default.createElement(BaseInformationDetails, {
|
|
31243
|
-
name:
|
|
31244
|
-
spriteKey:
|
|
31245
|
-
atlasJSON:
|
|
31246
|
-
atlasIMG:
|
|
31214
|
+
name: item.name,
|
|
31215
|
+
spriteKey: item.texturePath,
|
|
31216
|
+
atlasJSON: itemsAtlasJSON,
|
|
31217
|
+
atlasIMG: itemsAtlasIMG,
|
|
31247
31218
|
onBack: onBack
|
|
31248
|
-
}, React__default.createElement(InfoSection, null, React__default.createElement(InfoItem, null, React__default.createElement(Label, null, "Type:"), React__default.createElement(Value, null,
|
|
31249
|
-
title: "
|
|
31219
|
+
}, React__default.createElement(InfoSection, null, React__default.createElement(InfoItem, null, React__default.createElement(Label, null, "Type:"), React__default.createElement(Value, null, item.type)), React__default.createElement(InfoItem, null, React__default.createElement(Label, null, "Subtype:"), React__default.createElement(Value, null, item.subType)), React__default.createElement(InfoItem, null, React__default.createElement(Label, null, "Tier:"), React__default.createElement(Value, null, item.tier)), React__default.createElement(InfoItem, null, React__default.createElement(Label, null, "Rarity:"), React__default.createElement(Value, null, item.rarity)), renderAllowedSlots()), React__default.createElement(StyledCollapsible, {
|
|
31220
|
+
title: "Description",
|
|
31250
31221
|
defaultOpen: !isMobile
|
|
31251
|
-
}, React__default.createElement(
|
|
31252
|
-
title: "
|
|
31222
|
+
}, React__default.createElement(Description$2, null, item.description || 'No description available.')), React__default.createElement(StyledCollapsible, {
|
|
31223
|
+
title: "Stats",
|
|
31253
31224
|
defaultOpen: !isMobile
|
|
31254
|
-
}, React__default.createElement(
|
|
31255
|
-
value: lootSearchQuery,
|
|
31256
|
-
onChange: setLootSearchQuery,
|
|
31257
|
-
placeholder: "Search loot..."
|
|
31258
|
-
})), React__default.createElement(LootGrid, null, paginatedLoots.map(function (loot, index) {
|
|
31259
|
-
return React__default.createElement(LootItem, {
|
|
31260
|
-
key: index
|
|
31261
|
-
}, React__default.createElement(SpriteFromAtlas, {
|
|
31262
|
-
atlasJSON: itemsAtlasJSON,
|
|
31263
|
-
atlasIMG: itemsAtlasIMG,
|
|
31264
|
-
spriteKey: loot.itemBlueprintKey,
|
|
31265
|
-
width: 24,
|
|
31266
|
-
height: 24,
|
|
31267
|
-
imgScale: 1
|
|
31268
|
-
}), React__default.createElement(LootDetails, null, React__default.createElement(LootName, null, formatItemName(loot.itemBlueprintKey)), React__default.createElement(LootInfo, null, React__default.createElement(LootChance, null, formatRarity(loot.chance)), loot.quantityRange && React__default.createElement(LootQuantity, null, "x", loot.quantityRange[0], "-", loot.quantityRange[1]))));
|
|
31269
|
-
})), filteredLoots.length > ITEMS_PER_PAGE$1 && React__default.createElement(PaginationContainer$2, null, React__default.createElement(StyledPagination, {
|
|
31270
|
-
currentPage: currentLootPage,
|
|
31271
|
-
totalPages: totalLootPages,
|
|
31272
|
-
onPageChange: setCurrentLootPage
|
|
31273
|
-
}))), npc.entityEffects && npc.entityEffects.length > 0 && React__default.createElement(StyledCollapsible, {
|
|
31225
|
+
}, React__default.createElement(StatGrid, null, React__default.createElement(StatItem, null, "Weight: ", item.weight), React__default.createElement(StatItem, null, "Stack Size: ", item.maxStackSize), item.rangeType && React__default.createElement(StatItem, null, "Range Type: ", item.rangeType), item.basePrice > 0 && React__default.createElement(StatItem, null, "Base Price: ", item.basePrice))), renderRequirements(), item.entityEffects && item.entityEffects.length > 0 && React__default.createElement(StyledCollapsible, {
|
|
31274
31226
|
title: "Effects",
|
|
31275
31227
|
defaultOpen: !isMobile
|
|
31276
|
-
}, React__default.createElement(EffectsList, null,
|
|
31228
|
+
}, React__default.createElement(EffectsList, null, item.entityEffects.map(function (effect, index) {
|
|
31277
31229
|
return React__default.createElement(EffectItem, {
|
|
31278
31230
|
key: index
|
|
31279
|
-
},
|
|
31280
|
-
}))),
|
|
31281
|
-
title: "
|
|
31231
|
+
}, effect, item.entityEffectChance && React__default.createElement(EffectChance, null, "(", item.entityEffectChance, "%)"));
|
|
31232
|
+
})), item.usableEffectDescription && React__default.createElement(EffectDescription, null, item.usableEffectDescription)), item.equippedBuff && item.equippedBuff.length > 0 && React__default.createElement(StyledCollapsible, {
|
|
31233
|
+
title: "Equipped Buffs",
|
|
31282
31234
|
defaultOpen: !isMobile
|
|
31283
|
-
}, React__default.createElement(
|
|
31284
|
-
return React__default.createElement(
|
|
31235
|
+
}, React__default.createElement(BuffsList, null, item.equippedBuff.map(function (buff, index) {
|
|
31236
|
+
return React__default.createElement(BuffItem, {
|
|
31285
31237
|
key: index
|
|
31286
|
-
}, React__default.createElement(
|
|
31287
|
-
|
|
31288
|
-
|
|
31289
|
-
|
|
31290
|
-
|
|
31291
|
-
|
|
31292
|
-
|
|
31293
|
-
|
|
31238
|
+
}, React__default.createElement(BuffName, null, buff.trait.replace(/^\w/, function (c) {
|
|
31239
|
+
return c.toUpperCase();
|
|
31240
|
+
})), React__default.createElement(BuffValue, null, "+", buff.buffPercentage, "%"));
|
|
31241
|
+
})), item.equippedBuffDescription && React__default.createElement(BuffDescription, null, item.equippedBuffDescription)), droppedBy.length > 0 && React__default.createElement(StyledCollapsible, {
|
|
31242
|
+
title: "Dropped By",
|
|
31243
|
+
defaultOpen: !isMobile
|
|
31244
|
+
}, React__default.createElement(DropList, null, droppedBy.map(function (npc) {
|
|
31245
|
+
var loot = npc.loots.find(function (l) {
|
|
31246
|
+
return l.itemBlueprintKey === item.key;
|
|
31247
|
+
});
|
|
31248
|
+
return React__default.createElement(DropItem, {
|
|
31249
|
+
key: npc.id
|
|
31250
|
+
}, React__default.createElement(NPCName, null, npc.name), React__default.createElement(DropRate, null, loot == null ? void 0 : loot.chance, "%"));
|
|
31294
31251
|
}))));
|
|
31295
31252
|
};
|
|
31296
31253
|
var InfoSection = /*#__PURE__*/styled__default.div.withConfig({
|
|
31297
|
-
displayName: "
|
|
31298
|
-
componentId: "sc-
|
|
31254
|
+
displayName: "InformationCenterItemDetails__InfoSection",
|
|
31255
|
+
componentId: "sc-zwf6pb-0"
|
|
31299
31256
|
})(["display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:8px;background:rgba(255,255,255,0.05);padding:12px;border-radius:4px;"]);
|
|
31300
31257
|
var InfoItem = /*#__PURE__*/styled__default.div.withConfig({
|
|
31301
|
-
displayName: "
|
|
31302
|
-
componentId: "sc-
|
|
31258
|
+
displayName: "InformationCenterItemDetails__InfoItem",
|
|
31259
|
+
componentId: "sc-zwf6pb-1"
|
|
31303
31260
|
})(["display:flex;align-items:center;gap:8px;"]);
|
|
31304
31261
|
var Label = /*#__PURE__*/styled__default.span.withConfig({
|
|
31305
|
-
displayName: "
|
|
31306
|
-
componentId: "sc-
|
|
31262
|
+
displayName: "InformationCenterItemDetails__Label",
|
|
31263
|
+
componentId: "sc-zwf6pb-2"
|
|
31307
31264
|
})(["color:", ";font-size:0.5rem;opacity:0.8;"], uiColors.yellow);
|
|
31308
31265
|
var Value = /*#__PURE__*/styled__default.span.withConfig({
|
|
31309
|
-
displayName: "
|
|
31310
|
-
componentId: "sc-
|
|
31266
|
+
displayName: "InformationCenterItemDetails__Value",
|
|
31267
|
+
componentId: "sc-zwf6pb-3"
|
|
31311
31268
|
})(["color:", ";font-size:0.5rem;"], uiColors.white);
|
|
31312
31269
|
var StyledCollapsible = /*#__PURE__*/styled__default(Collapsible).withConfig({
|
|
31313
|
-
displayName: "
|
|
31314
|
-
componentId: "sc-
|
|
31270
|
+
displayName: "InformationCenterItemDetails__StyledCollapsible",
|
|
31271
|
+
componentId: "sc-zwf6pb-4"
|
|
31315
31272
|
})(["background:rgba(255,255,255,0.05);border-radius:4px;overflow:hidden;"]);
|
|
31273
|
+
var Description$2 = /*#__PURE__*/styled__default.p.withConfig({
|
|
31274
|
+
displayName: "InformationCenterItemDetails__Description",
|
|
31275
|
+
componentId: "sc-zwf6pb-5"
|
|
31276
|
+
})(["color:", ";font-size:0.5rem;margin:0;padding:12px;line-height:1.5;"], uiColors.white);
|
|
31316
31277
|
var StatGrid = /*#__PURE__*/styled__default.div.withConfig({
|
|
31317
|
-
displayName: "
|
|
31318
|
-
componentId: "sc-
|
|
31278
|
+
displayName: "InformationCenterItemDetails__StatGrid",
|
|
31279
|
+
componentId: "sc-zwf6pb-6"
|
|
31319
31280
|
})(["display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px;padding:12px;"]);
|
|
31320
31281
|
var StatItem = /*#__PURE__*/styled__default.div.withConfig({
|
|
31321
|
-
displayName: "
|
|
31322
|
-
componentId: "sc-
|
|
31282
|
+
displayName: "InformationCenterItemDetails__StatItem",
|
|
31283
|
+
componentId: "sc-zwf6pb-7"
|
|
31323
31284
|
})(["color:", ";font-size:0.5rem;background:rgba(255,255,255,0.05);padding:8px;border-radius:4px;"], uiColors.white);
|
|
31324
31285
|
var EffectsList = /*#__PURE__*/styled__default.div.withConfig({
|
|
31325
|
-
displayName: "
|
|
31326
|
-
componentId: "sc-
|
|
31286
|
+
displayName: "InformationCenterItemDetails__EffectsList",
|
|
31287
|
+
componentId: "sc-zwf6pb-8"
|
|
31327
31288
|
})(["display:flex;flex-wrap:wrap;gap:8px;padding:12px;"]);
|
|
31328
31289
|
var EffectItem = /*#__PURE__*/styled__default.div.withConfig({
|
|
31329
|
-
displayName: "
|
|
31330
|
-
componentId: "sc-
|
|
31331
|
-
})(["color:", ";font-size:0.5rem;background:rgba(255,255,255,0.1);padding:4px 8px;border-radius:4px;"], uiColors.white);
|
|
31332
|
-
var
|
|
31333
|
-
displayName: "
|
|
31334
|
-
componentId: "sc-
|
|
31290
|
+
displayName: "InformationCenterItemDetails__EffectItem",
|
|
31291
|
+
componentId: "sc-zwf6pb-9"
|
|
31292
|
+
})(["display:flex;align-items:center;gap:4px;color:", ";font-size:0.5rem;background:rgba(255,255,255,0.1);padding:4px 8px;border-radius:4px;"], uiColors.white);
|
|
31293
|
+
var EffectChance = /*#__PURE__*/styled__default.span.withConfig({
|
|
31294
|
+
displayName: "InformationCenterItemDetails__EffectChance",
|
|
31295
|
+
componentId: "sc-zwf6pb-10"
|
|
31296
|
+
})(["color:", ";opacity:0.8;"], uiColors.yellow);
|
|
31297
|
+
var BuffsList = /*#__PURE__*/styled__default.div.withConfig({
|
|
31298
|
+
displayName: "InformationCenterItemDetails__BuffsList",
|
|
31299
|
+
componentId: "sc-zwf6pb-11"
|
|
31335
31300
|
})(["display:flex;flex-direction:column;gap:8px;padding:12px;"]);
|
|
31336
|
-
var
|
|
31337
|
-
displayName: "
|
|
31338
|
-
componentId: "sc-
|
|
31339
|
-
})(["display:flex;
|
|
31340
|
-
var
|
|
31341
|
-
displayName: "
|
|
31342
|
-
componentId: "sc-
|
|
31343
|
-
})(["
|
|
31344
|
-
var
|
|
31345
|
-
displayName: "
|
|
31346
|
-
componentId: "sc-
|
|
31347
|
-
})(["display:flex;gap:8px;background:rgba(255,255,255,0.05);padding:8px;padding-left:10px;border-radius:4px;align-items:center;"]);
|
|
31348
|
-
var SpellName = /*#__PURE__*/styled__default.div.withConfig({
|
|
31349
|
-
displayName: "InformationCenterNPCDetails__SpellName",
|
|
31350
|
-
componentId: "sc-fdu3xl-13"
|
|
31301
|
+
var BuffItem = /*#__PURE__*/styled__default.div.withConfig({
|
|
31302
|
+
displayName: "InformationCenterItemDetails__BuffItem",
|
|
31303
|
+
componentId: "sc-zwf6pb-12"
|
|
31304
|
+
})(["display:flex;justify-content:space-between;align-items:center;background:rgba(255,255,255,0.05);padding:8px;border-radius:4px;"]);
|
|
31305
|
+
var BuffName = /*#__PURE__*/styled__default.span.withConfig({
|
|
31306
|
+
displayName: "InformationCenterItemDetails__BuffName",
|
|
31307
|
+
componentId: "sc-zwf6pb-13"
|
|
31308
|
+
})(["color:", ";font-size:0.5rem;"], uiColors.white);
|
|
31309
|
+
var BuffValue = /*#__PURE__*/styled__default.span.withConfig({
|
|
31310
|
+
displayName: "InformationCenterItemDetails__BuffValue",
|
|
31311
|
+
componentId: "sc-zwf6pb-14"
|
|
31351
31312
|
})(["color:", ";font-size:0.5rem;"], uiColors.yellow);
|
|
31352
|
-
var
|
|
31353
|
-
displayName: "
|
|
31354
|
-
componentId: "sc-
|
|
31355
|
-
})(["
|
|
31356
|
-
var
|
|
31357
|
-
displayName: "
|
|
31358
|
-
componentId: "sc-
|
|
31359
|
-
})(["
|
|
31360
|
-
var
|
|
31361
|
-
displayName: "
|
|
31362
|
-
componentId: "sc-
|
|
31363
|
-
})(["
|
|
31364
|
-
var
|
|
31365
|
-
displayName: "
|
|
31366
|
-
componentId: "sc-
|
|
31367
|
-
})(["padding:12px 12px 0;"]);
|
|
31368
|
-
var StyledSearchBar$1 = /*#__PURE__*/styled__default(SearchBar).withConfig({
|
|
31369
|
-
displayName: "InformationCenterNPCDetails__StyledSearchBar",
|
|
31370
|
-
componentId: "sc-fdu3xl-18"
|
|
31371
|
-
})(["width:100%;"]);
|
|
31372
|
-
var LootGrid = /*#__PURE__*/styled__default.div.withConfig({
|
|
31373
|
-
displayName: "InformationCenterNPCDetails__LootGrid",
|
|
31374
|
-
componentId: "sc-fdu3xl-19"
|
|
31375
|
-
})(["display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:8px;padding:12px;"]);
|
|
31376
|
-
var LootItem = /*#__PURE__*/styled__default.div.withConfig({
|
|
31377
|
-
displayName: "InformationCenterNPCDetails__LootItem",
|
|
31378
|
-
componentId: "sc-fdu3xl-20"
|
|
31379
|
-
})(["display:flex;align-items:center;gap:8px;background:rgba(255,255,255,0.05);padding:8px;border-radius:4px;"]);
|
|
31380
|
-
var LootDetails = /*#__PURE__*/styled__default.div.withConfig({
|
|
31381
|
-
displayName: "InformationCenterNPCDetails__LootDetails",
|
|
31382
|
-
componentId: "sc-fdu3xl-21"
|
|
31383
|
-
})(["flex:1;display:flex;flex-direction:column;gap:4px;"]);
|
|
31384
|
-
var LootName = /*#__PURE__*/styled__default.div.withConfig({
|
|
31385
|
-
displayName: "InformationCenterNPCDetails__LootName",
|
|
31386
|
-
componentId: "sc-fdu3xl-22"
|
|
31313
|
+
var BuffDescription = /*#__PURE__*/styled__default.p.withConfig({
|
|
31314
|
+
displayName: "InformationCenterItemDetails__BuffDescription",
|
|
31315
|
+
componentId: "sc-zwf6pb-15"
|
|
31316
|
+
})(["color:", ";font-size:0.45rem;margin:0;padding:0 12px 12px;font-style:italic;"], uiColors.lightGray);
|
|
31317
|
+
var DropList = /*#__PURE__*/styled__default.div.withConfig({
|
|
31318
|
+
displayName: "InformationCenterItemDetails__DropList",
|
|
31319
|
+
componentId: "sc-zwf6pb-16"
|
|
31320
|
+
})(["display:flex;flex-direction:column;gap:0.5rem;padding:12px;"]);
|
|
31321
|
+
var DropItem = /*#__PURE__*/styled__default.div.withConfig({
|
|
31322
|
+
displayName: "InformationCenterItemDetails__DropItem",
|
|
31323
|
+
componentId: "sc-zwf6pb-17"
|
|
31324
|
+
})(["display:flex;justify-content:space-between;align-items:center;padding:0.5rem;background:rgba(255,255,255,0.05);border-radius:4px;"]);
|
|
31325
|
+
var NPCName = /*#__PURE__*/styled__default.span.withConfig({
|
|
31326
|
+
displayName: "InformationCenterItemDetails__NPCName",
|
|
31327
|
+
componentId: "sc-zwf6pb-18"
|
|
31387
31328
|
})(["color:", ";font-size:0.5rem;"], uiColors.white);
|
|
31388
|
-
var
|
|
31389
|
-
displayName: "
|
|
31390
|
-
componentId: "sc-
|
|
31391
|
-
})(["
|
|
31392
|
-
var
|
|
31393
|
-
displayName: "
|
|
31394
|
-
componentId: "sc-
|
|
31395
|
-
})(["
|
|
31396
|
-
var
|
|
31397
|
-
displayName: "
|
|
31398
|
-
componentId: "sc-
|
|
31399
|
-
})(["
|
|
31400
|
-
var
|
|
31401
|
-
displayName: "
|
|
31402
|
-
componentId: "sc-
|
|
31403
|
-
})(["
|
|
31404
|
-
var StyledPagination = /*#__PURE__*/styled__default(Pagination).withConfig({
|
|
31405
|
-
displayName: "InformationCenterNPCDetails__StyledPagination",
|
|
31406
|
-
componentId: "sc-fdu3xl-27"
|
|
31407
|
-
})(["font-size:0.6rem;"]);
|
|
31329
|
+
var DropRate = /*#__PURE__*/styled__default.span.withConfig({
|
|
31330
|
+
displayName: "InformationCenterItemDetails__DropRate",
|
|
31331
|
+
componentId: "sc-zwf6pb-19"
|
|
31332
|
+
})(["color:", ";font-size:0.5rem;"], uiColors.yellow);
|
|
31333
|
+
var RequirementsGrid = /*#__PURE__*/styled__default.div.withConfig({
|
|
31334
|
+
displayName: "InformationCenterItemDetails__RequirementsGrid",
|
|
31335
|
+
componentId: "sc-zwf6pb-20"
|
|
31336
|
+
})(["display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px;padding:12px;"]);
|
|
31337
|
+
var RequirementItem = /*#__PURE__*/styled__default.div.withConfig({
|
|
31338
|
+
displayName: "InformationCenterItemDetails__RequirementItem",
|
|
31339
|
+
componentId: "sc-zwf6pb-21"
|
|
31340
|
+
})(["display:flex;align-items:center;gap:8px;background:rgba(255,255,255,0.05);padding:8px;border-radius:4px;"]);
|
|
31341
|
+
var EffectDescription = /*#__PURE__*/styled__default.p.withConfig({
|
|
31342
|
+
displayName: "InformationCenterItemDetails__EffectDescription",
|
|
31343
|
+
componentId: "sc-zwf6pb-22"
|
|
31344
|
+
})(["color:", ";font-size:0.45rem;margin:8px 0 0;padding:0 12px;font-style:italic;"], uiColors.lightGray);
|
|
31408
31345
|
|
|
31409
31346
|
var TooltipContainer$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
31410
31347
|
displayName: "BaseTooltip__TooltipContainer",
|
|
@@ -31440,599 +31377,728 @@ var BaseTooltip = function BaseTooltip(_ref) {
|
|
|
31440
31377
|
}, children);
|
|
31441
31378
|
};
|
|
31442
31379
|
|
|
31443
|
-
var
|
|
31444
|
-
displayName: "
|
|
31445
|
-
componentId: "sc-
|
|
31446
|
-
})(["display:flex;gap:8px;
|
|
31447
|
-
var
|
|
31448
|
-
displayName: "
|
|
31449
|
-
componentId: "sc-
|
|
31450
|
-
})(["
|
|
31451
|
-
var
|
|
31452
|
-
displayName: "
|
|
31453
|
-
componentId: "sc-
|
|
31454
|
-
})(["
|
|
31455
|
-
|
|
31456
|
-
|
|
31457
|
-
|
|
31458
|
-
|
|
31459
|
-
|
|
31460
|
-
|
|
31461
|
-
|
|
31462
|
-
})(["color:", ";margin-left:8px;opacity:0.8;"], uiColors.yellow);
|
|
31463
|
-
var LootList = /*#__PURE__*/styled__default.div.withConfig({
|
|
31464
|
-
displayName: "InformationCenterNPCTooltip__LootList",
|
|
31465
|
-
componentId: "sc-j2o39s-5"
|
|
31466
|
-
})(["display:flex;flex-direction:column;gap:2px;"]);
|
|
31467
|
-
var LootItem$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
31468
|
-
displayName: "InformationCenterNPCTooltip__LootItem",
|
|
31469
|
-
componentId: "sc-j2o39s-6"
|
|
31470
|
-
})(["display:flex;align-items:center;gap:4px;font-size:0.5rem;background:rgba(255,255,255,0.05);padding:4px 6px;border-radius:4px;.sprite-from-atlas-img{top:0px;left:0px;}"]);
|
|
31471
|
-
var LootName$1 = /*#__PURE__*/styled__default.span.withConfig({
|
|
31472
|
-
displayName: "InformationCenterNPCTooltip__LootName",
|
|
31473
|
-
componentId: "sc-j2o39s-7"
|
|
31474
|
-
})(["color:", ";flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-left:4px;"], uiColors.white);
|
|
31475
|
-
var LootChance$1 = /*#__PURE__*/styled__default.span.withConfig({
|
|
31476
|
-
displayName: "InformationCenterNPCTooltip__LootChance",
|
|
31477
|
-
componentId: "sc-j2o39s-8"
|
|
31478
|
-
})(["color:", ";font-size:0.45rem;text-transform:lowercase;opacity:0.8;"], uiColors.yellow);
|
|
31479
|
-
var MoreIndicator = /*#__PURE__*/styled__default.div.withConfig({
|
|
31480
|
-
displayName: "InformationCenterNPCTooltip__MoreIndicator",
|
|
31481
|
-
componentId: "sc-j2o39s-9"
|
|
31482
|
-
})(["color:", ";font-size:0.45rem;text-align:center;margin-top:2px;opacity:0.7;"], uiColors.yellow);
|
|
31483
|
-
var formatText = function formatText(text) {
|
|
31484
|
-
if (typeof text === 'number') {
|
|
31485
|
-
return text.toString();
|
|
31486
|
-
}
|
|
31487
|
-
return text.toString().replace(/([A-Z])/g, ' $1').trim().replace(/([A-Z]+)([A-Z][a-z])/g, '$1 $2').replace(/\s+/g, ' ');
|
|
31488
|
-
};
|
|
31489
|
-
var formatRarity = function formatRarity(rarity) {
|
|
31490
|
-
switch (rarity) {
|
|
31491
|
-
case 0.5:
|
|
31492
|
-
return 'Very Rare';
|
|
31493
|
-
case 1:
|
|
31494
|
-
return 'Rare';
|
|
31495
|
-
case 10:
|
|
31496
|
-
return 'Uncommon';
|
|
31497
|
-
case 15:
|
|
31498
|
-
return 'Semi Common';
|
|
31499
|
-
case 20:
|
|
31500
|
-
return 'Common';
|
|
31501
|
-
case 35:
|
|
31502
|
-
return 'Very Common';
|
|
31380
|
+
var ItemHeader$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
31381
|
+
displayName: "InformationCenterItemTooltip__ItemHeader",
|
|
31382
|
+
componentId: "sc-1ecf9mj-0"
|
|
31383
|
+
})(["display:flex;align-items:center;gap:8px;"]);
|
|
31384
|
+
var Description$3 = /*#__PURE__*/styled__default.div.withConfig({
|
|
31385
|
+
displayName: "InformationCenterItemTooltip__Description",
|
|
31386
|
+
componentId: "sc-1ecf9mj-1"
|
|
31387
|
+
})(["color:", ";font-size:0.5rem;line-height:1.4;margin-top:8px;opacity:0.8;"], uiColors.white);
|
|
31388
|
+
var RarityText = /*#__PURE__*/styled__default.span.withConfig({
|
|
31389
|
+
displayName: "InformationCenterItemTooltip__RarityText",
|
|
31390
|
+
componentId: "sc-1ecf9mj-2"
|
|
31391
|
+
})(["color:", ";font-size:0.5rem;"], function (props) {
|
|
31392
|
+
switch (props.rarity.toLowerCase()) {
|
|
31393
|
+
case 'legendary':
|
|
31394
|
+
return '#ff8c00';
|
|
31395
|
+
case 'rare':
|
|
31396
|
+
return '#0070dd';
|
|
31397
|
+
case 'uncommon':
|
|
31398
|
+
return '#1eff00';
|
|
31503
31399
|
default:
|
|
31504
|
-
return '
|
|
31400
|
+
return '#ffffff';
|
|
31505
31401
|
}
|
|
31506
|
-
};
|
|
31507
|
-
var
|
|
31508
|
-
var
|
|
31509
|
-
|
|
31510
|
-
|
|
31511
|
-
|
|
31512
|
-
return React__default.createElement(BaseTooltip, null, React__default.createElement(TooltipTitle$1, null, npc.name), React__default.createElement(StatsContainer, null, React__default.createElement(StatItem$1, null, "HP: ", npc.baseHealth), React__default.createElement(StatItem$1, null, "LVL: ", npc.skills.level), React__default.createElement(StatItem$1, null, "STR: ", ((_npc$skills$strength = npc.skills.strength) == null ? void 0 : _npc$skills$strength.level) || '-'), React__default.createElement(StatItem$1, null, "DEX: ", ((_npc$skills$dexterity = npc.skills.dexterity) == null ? void 0 : _npc$skills$dexterity.level) || '-'), React__default.createElement(StatItem$1, null, "RES: ", ((_npc$skills$resistanc = npc.skills.resistance) == null ? void 0 : _npc$skills$resistanc.level) || '-'), React__default.createElement(StatItem$1, null, "SPD: ", formatText(npc.speed))), npc.entityEffects && npc.entityEffects.length > 0 && React__default.createElement(Section, null, React__default.createElement(SectionTitle, null, "Effects"), React__default.createElement(EffectsList$1, null, npc.entityEffects.map(function (effect) {
|
|
31513
|
-
return React__default.createElement(EffectItem$1, {
|
|
31514
|
-
key: effect
|
|
31515
|
-
}, formatText(effect));
|
|
31516
|
-
}))), npc.areaSpells && npc.areaSpells.length > 0 && React__default.createElement(Section, null, React__default.createElement(SectionTitle, null, "Spells"), React__default.createElement(SpellList, null, npc.areaSpells.map(function (spell) {
|
|
31517
|
-
return React__default.createElement(SpellItem$1, {
|
|
31518
|
-
key: spell.spellKey
|
|
31519
|
-
}, formatText(spell.spellKey), React__default.createElement(SpellInfo, null, formatText(spell.power), ", ", spell.probability, "%"));
|
|
31520
|
-
}))), npc.loots && npc.loots.length > 0 && React__default.createElement(Section, null, React__default.createElement(SectionTitle, null, "Possible Loot"), React__default.createElement(LootList, null, npc.loots.slice(0, 4).map(function (loot) {
|
|
31521
|
-
return React__default.createElement(LootItem$1, {
|
|
31522
|
-
key: loot.itemBlueprintKey
|
|
31523
|
-
}, React__default.createElement(SpriteFromAtlas, {
|
|
31524
|
-
atlasIMG: itemsAtlasIMG,
|
|
31525
|
-
atlasJSON: itemsAtlasJSON,
|
|
31526
|
-
spriteKey: loot.itemBlueprintKey,
|
|
31527
|
-
imgScale: 1
|
|
31528
|
-
}), React__default.createElement(LootName$1, null, formatText(loot.itemBlueprintKey)), React__default.createElement(LootChance$1, null, formatRarity(loot.chance)));
|
|
31529
|
-
}), npc.loots.length > 4 && React__default.createElement(MoreIndicator, null, "..."))));
|
|
31402
|
+
});
|
|
31403
|
+
var InformationCenterItemTooltip = function InformationCenterItemTooltip(_ref) {
|
|
31404
|
+
var item = _ref.item;
|
|
31405
|
+
return React__default.createElement(BaseTooltip, null, React__default.createElement(ItemHeader$1, null, React__default.createElement(TooltipTitle$1, null, item.name)), React__default.createElement(Description$3, null, item.description), React__default.createElement(Section, null, React__default.createElement(SectionTitle, null, "Details"), React__default.createElement(StatsContainer, null, React__default.createElement(StatItem$1, null, "Type: ", item.type), React__default.createElement(StatItem$1, null, "Weight: ", item.weight), item.attack !== undefined && React__default.createElement(StatItem$1, null, "Attack: ", item.attack), item.defense !== undefined && React__default.createElement(StatItem$1, null, "Defense: ", item.defense), item.tier !== undefined && React__default.createElement(StatItem$1, null, "Tier: ", item.tier), item.rangeType && React__default.createElement(StatItem$1, null, "Range: ", item.rangeType))), React__default.createElement(Section, null, React__default.createElement(SectionTitle, null, "Market"), React__default.createElement(StatsContainer, null, React__default.createElement(StatItem$1, null, "Price: ", item.basePrice), item.rarity && React__default.createElement(StatItem$1, null, "Rarity:", ' ', React__default.createElement(RarityText, {
|
|
31406
|
+
rarity: item.rarity
|
|
31407
|
+
}, item.rarity)))));
|
|
31530
31408
|
};
|
|
31531
31409
|
|
|
31532
|
-
var
|
|
31533
|
-
|
|
31410
|
+
var TOOLTIP_OFFSET = 200;
|
|
31411
|
+
var formatItemType = function formatItemType(type) {
|
|
31412
|
+
var words = type.split(/(?=[A-Z])/);
|
|
31413
|
+
if (words.length === 1) {
|
|
31414
|
+
return words[0];
|
|
31415
|
+
}
|
|
31416
|
+
return words.map(function (word, index) {
|
|
31417
|
+
if (index === 0) {
|
|
31418
|
+
return word.charAt(0) + '.';
|
|
31419
|
+
}
|
|
31420
|
+
return word;
|
|
31421
|
+
}).join(' ');
|
|
31422
|
+
};
|
|
31423
|
+
var InformationCenterItemsSection = function InformationCenterItemsSection(_ref) {
|
|
31424
|
+
var items = _ref.items,
|
|
31425
|
+
bestiaryItems = _ref.bestiaryItems,
|
|
31534
31426
|
itemsAtlasJSON = _ref.itemsAtlasJSON,
|
|
31535
31427
|
itemsAtlasIMG = _ref.itemsAtlasIMG,
|
|
31536
|
-
iconsAtlasIMG = _ref.iconsAtlasIMG,
|
|
31537
|
-
iconsAtlasJSON = _ref.iconsAtlasJSON,
|
|
31538
|
-
entitiesAtlasJSON = _ref.entitiesAtlasJSON,
|
|
31539
|
-
entitiesAtlasIMG = _ref.entitiesAtlasIMG,
|
|
31540
31428
|
initialSearchQuery = _ref.initialSearchQuery,
|
|
31541
31429
|
tabId = _ref.tabId;
|
|
31542
31430
|
var _useState = React.useState(initialSearchQuery),
|
|
31543
31431
|
searchQuery = _useState[0],
|
|
31544
31432
|
setSearchQuery = _useState[1];
|
|
31545
|
-
var _useState2 = React.useState(
|
|
31546
|
-
|
|
31547
|
-
|
|
31433
|
+
var _useState2 = React.useState('all'),
|
|
31434
|
+
selectedItemCategory = _useState2[0],
|
|
31435
|
+
setSelectedItemCategory = _useState2[1];
|
|
31548
31436
|
var _useState3 = React.useState(null),
|
|
31549
|
-
|
|
31550
|
-
|
|
31551
|
-
var _useState4 = React.useState(
|
|
31552
|
-
|
|
31553
|
-
|
|
31554
|
-
|
|
31555
|
-
|
|
31556
|
-
|
|
31557
|
-
|
|
31558
|
-
|
|
31559
|
-
|
|
31560
|
-
|
|
31437
|
+
hoveredItem = _useState3[0],
|
|
31438
|
+
setHoveredItem = _useState3[1];
|
|
31439
|
+
var _useState4 = React.useState({
|
|
31440
|
+
x: 0,
|
|
31441
|
+
y: 0
|
|
31442
|
+
}),
|
|
31443
|
+
tooltipPosition = _useState4[0],
|
|
31444
|
+
setTooltipPosition = _useState4[1];
|
|
31445
|
+
var _useState5 = React.useState(null),
|
|
31446
|
+
selectedItem = _useState5[0],
|
|
31447
|
+
setSelectedItem = _useState5[1];
|
|
31448
|
+
var itemCategoryOptions = [{
|
|
31449
|
+
id: 0,
|
|
31450
|
+
value: 'all',
|
|
31451
|
+
option: 'All Items'
|
|
31452
|
+
}].concat(Object.values(shared.ItemType).map(function (type, index) {
|
|
31453
|
+
return {
|
|
31454
|
+
id: index + 1,
|
|
31455
|
+
value: type,
|
|
31456
|
+
option: formatItemType(type)
|
|
31457
|
+
};
|
|
31458
|
+
}));
|
|
31459
|
+
var filteredItems = items.filter(function (item) {
|
|
31460
|
+
return (selectedItemCategory === 'all' || item.type === selectedItemCategory) && item.name.toLowerCase().includes(searchQuery.toLowerCase());
|
|
31461
|
+
});
|
|
31462
|
+
var getDroppedByNPCs = function getDroppedByNPCs(itemId, npcs) {
|
|
31463
|
+
return npcs.filter(function (npc) {
|
|
31464
|
+
var _npc$loots;
|
|
31465
|
+
return (_npc$loots = npc.loots) == null ? void 0 : _npc$loots.some(function (loot) {
|
|
31466
|
+
return loot.itemBlueprintKey === itemId;
|
|
31467
|
+
});
|
|
31468
|
+
}) || [];
|
|
31469
|
+
};
|
|
31470
|
+
var handleMouseEnter = function handleMouseEnter(e, item) {
|
|
31471
|
+
setTooltipPosition({
|
|
31472
|
+
x: e.clientX + TOOLTIP_OFFSET,
|
|
31473
|
+
y: e.clientY
|
|
31474
|
+
});
|
|
31475
|
+
setHoveredItem(item);
|
|
31476
|
+
};
|
|
31477
|
+
var handleMouseMove = function handleMouseMove(e) {
|
|
31478
|
+
if (hoveredItem) {
|
|
31479
|
+
setTooltipPosition({
|
|
31480
|
+
x: e.clientX + TOOLTIP_OFFSET,
|
|
31481
|
+
y: e.clientY
|
|
31561
31482
|
});
|
|
31562
31483
|
}
|
|
31563
31484
|
};
|
|
31564
31485
|
var handleMouseLeave = function handleMouseLeave() {
|
|
31565
|
-
|
|
31566
|
-
setTooltipData(null);
|
|
31567
|
-
}
|
|
31486
|
+
setHoveredItem(null);
|
|
31568
31487
|
};
|
|
31569
|
-
var
|
|
31570
|
-
|
|
31571
|
-
|
|
31572
|
-
|
|
31573
|
-
|
|
31574
|
-
|
|
31575
|
-
|
|
31576
|
-
}));
|
|
31577
|
-
}
|
|
31488
|
+
var handleTouchStart = function handleTouchStart(e, item) {
|
|
31489
|
+
var touch = e.touches[0];
|
|
31490
|
+
setTooltipPosition({
|
|
31491
|
+
x: touch.clientX + TOOLTIP_OFFSET,
|
|
31492
|
+
y: touch.clientY
|
|
31493
|
+
});
|
|
31494
|
+
setHoveredItem(item);
|
|
31578
31495
|
};
|
|
31579
|
-
var
|
|
31580
|
-
|
|
31581
|
-
|
|
31582
|
-
var touch = event.touches[0];
|
|
31583
|
-
if ((tooltipData == null ? void 0 : tooltipData.npc.id) === monster.id) {
|
|
31584
|
-
setTooltipData(null);
|
|
31585
|
-
} else {
|
|
31586
|
-
setTooltipData({
|
|
31587
|
-
npc: monster,
|
|
31588
|
-
position: {
|
|
31589
|
-
x: touch.clientX,
|
|
31590
|
-
y: touch.clientY
|
|
31591
|
-
}
|
|
31592
|
-
});
|
|
31593
|
-
}
|
|
31594
|
-
}
|
|
31496
|
+
var handleItemClick = function handleItemClick(item) {
|
|
31497
|
+
setSelectedItem(item);
|
|
31498
|
+
setHoveredItem(null);
|
|
31595
31499
|
};
|
|
31596
|
-
var
|
|
31597
|
-
|
|
31598
|
-
|
|
31500
|
+
var handleSearchChange = function handleSearchChange(newQuery) {
|
|
31501
|
+
setSearchQuery(newQuery);
|
|
31502
|
+
if (newQuery && selectedItemCategory !== 'all') {
|
|
31503
|
+
setSelectedItemCategory('all');
|
|
31504
|
+
}
|
|
31599
31505
|
};
|
|
31600
31506
|
var renderItem = function renderItem(item) {
|
|
31601
31507
|
return React__default.createElement(InformationCenterCell, {
|
|
31602
|
-
key: item.
|
|
31508
|
+
key: item.key,
|
|
31603
31509
|
name: item.name,
|
|
31604
|
-
spriteKey: item.
|
|
31605
|
-
atlasJSON:
|
|
31606
|
-
atlasIMG:
|
|
31607
|
-
onClick: function onClick() {
|
|
31608
|
-
return handleMonsterClick(item);
|
|
31609
|
-
},
|
|
31510
|
+
spriteKey: item.texturePath,
|
|
31511
|
+
atlasJSON: itemsAtlasJSON,
|
|
31512
|
+
atlasIMG: itemsAtlasIMG,
|
|
31610
31513
|
onMouseEnter: function onMouseEnter(e) {
|
|
31611
|
-
return handleMouseEnter(
|
|
31514
|
+
return handleMouseEnter(e, item);
|
|
31612
31515
|
},
|
|
31613
|
-
onMouseLeave: handleMouseLeave,
|
|
31614
31516
|
onMouseMove: handleMouseMove,
|
|
31517
|
+
onMouseLeave: handleMouseLeave,
|
|
31615
31518
|
onTouchStart: function onTouchStart(e) {
|
|
31616
|
-
return handleTouchStart(
|
|
31519
|
+
return handleTouchStart(e, item);
|
|
31520
|
+
},
|
|
31521
|
+
onClick: function onClick() {
|
|
31522
|
+
return handleItemClick(item);
|
|
31617
31523
|
}
|
|
31618
31524
|
});
|
|
31619
31525
|
};
|
|
31620
|
-
var filteredItems = bestiaryItems.filter(function (item) {
|
|
31621
|
-
return item.name.toLowerCase().includes(searchQuery.toLowerCase());
|
|
31622
|
-
});
|
|
31623
31526
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement(PaginatedContent, {
|
|
31624
31527
|
items: filteredItems,
|
|
31625
31528
|
renderItem: renderItem,
|
|
31626
|
-
emptyMessage: "No
|
|
31627
|
-
|
|
31628
|
-
|
|
31529
|
+
emptyMessage: "No items found",
|
|
31530
|
+
filterOptions: {
|
|
31531
|
+
options: itemCategoryOptions,
|
|
31532
|
+
selectedOption: selectedItemCategory,
|
|
31533
|
+
onOptionChange: setSelectedItemCategory
|
|
31534
|
+
},
|
|
31629
31535
|
searchOptions: {
|
|
31630
31536
|
value: searchQuery,
|
|
31631
|
-
onChange:
|
|
31632
|
-
placeholder: 'Search
|
|
31537
|
+
onChange: handleSearchChange,
|
|
31538
|
+
placeholder: 'Search items...'
|
|
31633
31539
|
},
|
|
31540
|
+
dependencies: [selectedItemCategory],
|
|
31541
|
+
tabId: tabId,
|
|
31542
|
+
layout: "grid",
|
|
31634
31543
|
itemHeight: "180px"
|
|
31635
|
-
}),
|
|
31544
|
+
}), hoveredItem && React__default.createElement(TooltipWrapper, {
|
|
31636
31545
|
style: {
|
|
31637
|
-
|
|
31638
|
-
left:
|
|
31639
|
-
top: tooltipData.position.y + 10
|
|
31546
|
+
top: tooltipPosition.y,
|
|
31547
|
+
left: tooltipPosition.x
|
|
31640
31548
|
}
|
|
31641
|
-
}, React__default.createElement(
|
|
31642
|
-
|
|
31643
|
-
|
|
31644
|
-
|
|
31645
|
-
}))), selectedMonster && React__default.createElement(InformationCenterNPCDetails, {
|
|
31646
|
-
npc: selectedMonster,
|
|
31549
|
+
}, React__default.createElement(InformationCenterItemTooltip, {
|
|
31550
|
+
item: hoveredItem
|
|
31551
|
+
})), selectedItem && React__default.createElement(InformationCenterItemDetails, {
|
|
31552
|
+
item: selectedItem,
|
|
31647
31553
|
itemsAtlasJSON: itemsAtlasJSON,
|
|
31648
31554
|
itemsAtlasIMG: itemsAtlasIMG,
|
|
31649
|
-
|
|
31650
|
-
iconAtlasJSON: iconsAtlasJSON,
|
|
31651
|
-
entitiesAtlasJSON: entitiesAtlasJSON,
|
|
31652
|
-
entitiesAtlasIMG: entitiesAtlasIMG,
|
|
31555
|
+
droppedBy: getDroppedByNPCs(selectedItem.key, bestiaryItems),
|
|
31653
31556
|
onBack: function onBack() {
|
|
31654
|
-
return
|
|
31557
|
+
return setSelectedItem(null);
|
|
31655
31558
|
}
|
|
31656
31559
|
}));
|
|
31657
31560
|
};
|
|
31658
31561
|
var TooltipWrapper = /*#__PURE__*/styled__default.div.withConfig({
|
|
31659
|
-
displayName: "
|
|
31660
|
-
componentId: "sc-
|
|
31661
|
-
})(["position:fixed;z-index:1000;pointer-events:none;
|
|
31562
|
+
displayName: "InformationCenterItemsSection__TooltipWrapper",
|
|
31563
|
+
componentId: "sc-1wmpapt-0"
|
|
31564
|
+
})(["position:fixed;z-index:1000;pointer-events:none;transition:transform 0.1s ease;"]);
|
|
31662
31565
|
|
|
31663
|
-
var
|
|
31664
|
-
|
|
31665
|
-
|
|
31666
|
-
|
|
31667
|
-
|
|
31668
|
-
|
|
31669
|
-
|
|
31670
|
-
React.useEffect(function () {
|
|
31671
|
-
setSearchQuery(initialSearchQuery);
|
|
31672
|
-
}, [initialSearchQuery]);
|
|
31673
|
-
var filteredFaqs = React.useMemo(function () {
|
|
31674
|
-
if (!searchQuery) return faqItems;
|
|
31675
|
-
return faqItems.filter(function (faq) {
|
|
31676
|
-
return faq.question.toLowerCase().includes(searchQuery.toLowerCase()) || faq.answer.toLowerCase().includes(searchQuery.toLowerCase());
|
|
31677
|
-
});
|
|
31678
|
-
}, [searchQuery, faqItems]);
|
|
31679
|
-
var renderItem = function renderItem(item) {
|
|
31680
|
-
return React__default.createElement(StyledCollapsible$1, {
|
|
31681
|
-
title: item.question
|
|
31682
|
-
}, React__default.createElement(Answer$1, null, item.answer));
|
|
31683
|
-
};
|
|
31684
|
-
return React__default.createElement(Container$q, null, React__default.createElement(SearchHeader, {
|
|
31685
|
-
searchOptions: {
|
|
31686
|
-
value: searchQuery,
|
|
31687
|
-
onChange: setSearchQuery,
|
|
31688
|
-
placeholder: 'Search FAQs...'
|
|
31689
|
-
}
|
|
31690
|
-
}), React__default.createElement(PaginatedContent, {
|
|
31691
|
-
items: filteredFaqs,
|
|
31692
|
-
renderItem: renderItem,
|
|
31693
|
-
emptyMessage: "No FAQ items found",
|
|
31694
|
-
tabId: tabId,
|
|
31695
|
-
layout: "list",
|
|
31696
|
-
itemsPerPage: 10
|
|
31697
|
-
}));
|
|
31566
|
+
var ITEMS_PER_PAGE$1 = 5;
|
|
31567
|
+
var formatItemName = function formatItemName(itemPath) {
|
|
31568
|
+
var _itemPath$split$pop;
|
|
31569
|
+
var cleanText = ((_itemPath$split$pop = itemPath.split('/').pop()) == null ? void 0 : _itemPath$split$pop.split('.').shift()) || '';
|
|
31570
|
+
return cleanText.split('-').map(function (word) {
|
|
31571
|
+
return word.charAt(0).toUpperCase() + word.slice(1);
|
|
31572
|
+
}).join(' ');
|
|
31698
31573
|
};
|
|
31699
|
-
var
|
|
31700
|
-
|
|
31701
|
-
|
|
31702
|
-
})(["display:flex;flex-direction:column;gap:1rem;width:100%;"]);
|
|
31703
|
-
var StyledCollapsible$1 = /*#__PURE__*/styled__default(Collapsible).withConfig({
|
|
31704
|
-
displayName: "InformationCenterFaqSection__StyledCollapsible",
|
|
31705
|
-
componentId: "sc-ofmaa9-1"
|
|
31706
|
-
})(["margin-bottom:0.5rem;&:last-child{margin-bottom:0;}"]);
|
|
31707
|
-
var Answer$1 = /*#__PURE__*/styled__default.p.withConfig({
|
|
31708
|
-
displayName: "InformationCenterFaqSection__Answer",
|
|
31709
|
-
componentId: "sc-ofmaa9-2"
|
|
31710
|
-
})(["font-size:0.9rem;color:#ffffff;margin:0;line-height:1.5;"]);
|
|
31711
|
-
|
|
31712
|
-
var InformationCenterItemDetails = function InformationCenterItemDetails(_ref) {
|
|
31713
|
-
var item = _ref.item,
|
|
31574
|
+
var InformationCenterNPCDetails = function InformationCenterNPCDetails(_ref) {
|
|
31575
|
+
var _npc$loots, _npc$skills$strength, _npc$skills$dexterity, _npc$skills$resistanc;
|
|
31576
|
+
var npc = _ref.npc,
|
|
31714
31577
|
itemsAtlasJSON = _ref.itemsAtlasJSON,
|
|
31715
31578
|
itemsAtlasIMG = _ref.itemsAtlasIMG,
|
|
31716
|
-
|
|
31579
|
+
entitiesAtlasJSON = _ref.entitiesAtlasJSON,
|
|
31580
|
+
entitiesAtlasIMG = _ref.entitiesAtlasIMG,
|
|
31581
|
+
iconAtlasIMG = _ref.iconAtlasIMG,
|
|
31582
|
+
iconAtlasJSON = _ref.iconAtlasJSON,
|
|
31717
31583
|
onBack = _ref.onBack;
|
|
31718
31584
|
var isMobile = shared.isMobileOrTablet();
|
|
31719
|
-
var
|
|
31720
|
-
|
|
31721
|
-
|
|
31722
|
-
|
|
31585
|
+
var _useState = React.useState(''),
|
|
31586
|
+
lootSearchQuery = _useState[0],
|
|
31587
|
+
setLootSearchQuery = _useState[1];
|
|
31588
|
+
var _useState2 = React.useState(1),
|
|
31589
|
+
currentLootPage = _useState2[0],
|
|
31590
|
+
setCurrentLootPage = _useState2[1];
|
|
31591
|
+
var formatText = function formatText(text) {
|
|
31592
|
+
if (typeof text === 'number') {
|
|
31593
|
+
return text.toString();
|
|
31594
|
+
}
|
|
31595
|
+
return text.toString().replace(/([A-Z])/g, ' $1').trim().replace(/([A-Z]+)([A-Z][a-z])/g, '$1 $2').replace(/\s+/g, ' ').replace(/^\w/, function (c) {
|
|
31596
|
+
return c.toUpperCase();
|
|
31597
|
+
});
|
|
31723
31598
|
};
|
|
31724
|
-
var
|
|
31725
|
-
|
|
31726
|
-
|
|
31727
|
-
|
|
31728
|
-
|
|
31729
|
-
|
|
31599
|
+
var formatRarity = function formatRarity(rarity) {
|
|
31600
|
+
switch (rarity) {
|
|
31601
|
+
case 0.5:
|
|
31602
|
+
return 'Very Rare';
|
|
31603
|
+
case 1:
|
|
31604
|
+
return 'Rare';
|
|
31605
|
+
case 10:
|
|
31606
|
+
return 'Uncommon';
|
|
31607
|
+
case 15:
|
|
31608
|
+
return 'Semi Common';
|
|
31609
|
+
case 20:
|
|
31610
|
+
return 'Common';
|
|
31611
|
+
case 35:
|
|
31612
|
+
return 'Very Common';
|
|
31613
|
+
default:
|
|
31614
|
+
return 'Unknown';
|
|
31615
|
+
}
|
|
31730
31616
|
};
|
|
31617
|
+
var filteredLoots = ((_npc$loots = npc.loots) == null ? void 0 : _npc$loots.filter(function (loot) {
|
|
31618
|
+
return formatItemName(loot.itemBlueprintKey).toLowerCase().includes(lootSearchQuery.toLowerCase());
|
|
31619
|
+
})) || [];
|
|
31620
|
+
var totalLootPages = Math.ceil(filteredLoots.length / ITEMS_PER_PAGE$1);
|
|
31621
|
+
var paginatedLoots = filteredLoots.slice((currentLootPage - 1) * ITEMS_PER_PAGE$1, currentLootPage * ITEMS_PER_PAGE$1);
|
|
31731
31622
|
return React__default.createElement(BaseInformationDetails, {
|
|
31732
|
-
name:
|
|
31733
|
-
spriteKey:
|
|
31734
|
-
atlasJSON:
|
|
31735
|
-
atlasIMG:
|
|
31623
|
+
name: npc.name,
|
|
31624
|
+
spriteKey: npc.key,
|
|
31625
|
+
atlasJSON: entitiesAtlasJSON,
|
|
31626
|
+
atlasIMG: entitiesAtlasIMG,
|
|
31736
31627
|
onBack: onBack
|
|
31737
|
-
}, React__default.createElement(InfoSection$1, null, React__default.createElement(InfoItem$1, null, React__default.createElement(Label$1, null, "Type:"), React__default.createElement(Value$1, null,
|
|
31738
|
-
title: "Description",
|
|
31739
|
-
defaultOpen: !isMobile
|
|
31740
|
-
}, React__default.createElement(Description$2, null, item.description || 'No description available.')), React__default.createElement(StyledCollapsible$2, {
|
|
31628
|
+
}, React__default.createElement(InfoSection$1, null, React__default.createElement(InfoItem$1, null, React__default.createElement(Label$1, null, "Type:"), React__default.createElement(Value$1, null, formatText(npc.subType))), React__default.createElement(InfoItem$1, null, React__default.createElement(Label$1, null, "Alignment:"), React__default.createElement(Value$1, null, formatText(npc.alignment))), React__default.createElement(InfoItem$1, null, React__default.createElement(Label$1, null, "Attack Type:"), React__default.createElement(Value$1, null, formatText(npc.attackType))), React__default.createElement(InfoItem$1, null, React__default.createElement(Label$1, null, "Range:"), React__default.createElement(Value$1, null, formatText(npc.maxRangeAttack))), React__default.createElement(InfoItem$1, null, React__default.createElement(Label$1, null, "Speed:"), React__default.createElement(Value$1, null, formatText(npc.speed)))), React__default.createElement(StyledCollapsible$1, {
|
|
31741
31629
|
title: "Stats",
|
|
31742
31630
|
defaultOpen: !isMobile
|
|
31743
|
-
}, React__default.createElement(StatGrid$1, null, React__default.createElement(StatItem$2, null, "
|
|
31744
|
-
title: "
|
|
31631
|
+
}, React__default.createElement(StatGrid$1, null, React__default.createElement(StatItem$2, null, "HP: ", npc.baseHealth), React__default.createElement(StatItem$2, null, "Level: ", npc.skills.level), ((_npc$skills$strength = npc.skills.strength) == null ? void 0 : _npc$skills$strength.level) && React__default.createElement(StatItem$2, null, "Strength: ", npc.skills.strength.level), ((_npc$skills$dexterity = npc.skills.dexterity) == null ? void 0 : _npc$skills$dexterity.level) && React__default.createElement(StatItem$2, null, "Dexterity: ", npc.skills.dexterity.level), ((_npc$skills$resistanc = npc.skills.resistance) == null ? void 0 : _npc$skills$resistanc.level) && React__default.createElement(StatItem$2, null, "Resistance: ", npc.skills.resistance.level))), npc.loots && npc.loots.length > 0 && React__default.createElement(StyledCollapsible$1, {
|
|
31632
|
+
title: "Loot",
|
|
31745
31633
|
defaultOpen: !isMobile
|
|
31746
|
-
}, React__default.createElement(
|
|
31747
|
-
|
|
31634
|
+
}, React__default.createElement(LootSearchContainer, null, React__default.createElement(StyledSearchBar$1, {
|
|
31635
|
+
value: lootSearchQuery,
|
|
31636
|
+
onChange: setLootSearchQuery,
|
|
31637
|
+
placeholder: "Search loot..."
|
|
31638
|
+
})), React__default.createElement(LootGrid, null, paginatedLoots.map(function (loot, index) {
|
|
31639
|
+
return React__default.createElement(LootItem, {
|
|
31748
31640
|
key: index
|
|
31749
|
-
},
|
|
31750
|
-
|
|
31751
|
-
|
|
31641
|
+
}, React__default.createElement(SpriteFromAtlas, {
|
|
31642
|
+
atlasJSON: itemsAtlasJSON,
|
|
31643
|
+
atlasIMG: itemsAtlasIMG,
|
|
31644
|
+
spriteKey: loot.itemBlueprintKey,
|
|
31645
|
+
width: 24,
|
|
31646
|
+
height: 24,
|
|
31647
|
+
imgScale: 1
|
|
31648
|
+
}), React__default.createElement(LootDetails, null, React__default.createElement(LootName, null, formatItemName(loot.itemBlueprintKey)), React__default.createElement(LootInfo, null, React__default.createElement(LootChance, null, formatRarity(loot.chance)), loot.quantityRange && React__default.createElement(LootQuantity, null, "x", loot.quantityRange[0], "-", loot.quantityRange[1]))));
|
|
31649
|
+
})), filteredLoots.length > ITEMS_PER_PAGE$1 && React__default.createElement(PaginationContainer$2, null, React__default.createElement(StyledPagination, {
|
|
31650
|
+
currentPage: currentLootPage,
|
|
31651
|
+
totalPages: totalLootPages,
|
|
31652
|
+
onPageChange: setCurrentLootPage
|
|
31653
|
+
}))), npc.entityEffects && npc.entityEffects.length > 0 && React__default.createElement(StyledCollapsible$1, {
|
|
31654
|
+
title: "Effects",
|
|
31752
31655
|
defaultOpen: !isMobile
|
|
31753
|
-
}, React__default.createElement(
|
|
31754
|
-
return React__default.createElement(
|
|
31656
|
+
}, React__default.createElement(EffectsList$1, null, npc.entityEffects.map(function (effect, index) {
|
|
31657
|
+
return React__default.createElement(EffectItem$1, {
|
|
31755
31658
|
key: index
|
|
31756
|
-
},
|
|
31757
|
-
})),
|
|
31758
|
-
title: "
|
|
31659
|
+
}, formatText(effect));
|
|
31660
|
+
}))), npc.areaSpells && npc.areaSpells.length > 0 && React__default.createElement(StyledCollapsible$1, {
|
|
31661
|
+
title: "Spells",
|
|
31759
31662
|
defaultOpen: !isMobile
|
|
31760
|
-
}, React__default.createElement(
|
|
31761
|
-
|
|
31762
|
-
|
|
31763
|
-
}
|
|
31764
|
-
|
|
31765
|
-
|
|
31766
|
-
|
|
31663
|
+
}, React__default.createElement(SpellsList, null, npc.areaSpells.map(function (spell, index) {
|
|
31664
|
+
return React__default.createElement(SpellItem, {
|
|
31665
|
+
key: index
|
|
31666
|
+
}, React__default.createElement(SpellIconContainer, null, React__default.createElement(SpriteFromAtlas, {
|
|
31667
|
+
atlasJSON: iconAtlasJSON,
|
|
31668
|
+
atlasIMG: iconAtlasIMG,
|
|
31669
|
+
spriteKey: spell.texturePath || spell.spellKey,
|
|
31670
|
+
width: 24,
|
|
31671
|
+
height: 24,
|
|
31672
|
+
imgScale: 1
|
|
31673
|
+
})), React__default.createElement(SpellContent, null, React__default.createElement(SpellName, null, formatText(spell.spellKey)), React__default.createElement(SpellDetails, null, "Power: ", React__default.createElement(SpellValue, null, formatText(spell.power)), React__default.createElement(Separator, null, "\u2022"), "Chance: ", React__default.createElement(SpellValue, null, spell.probability, "%"))));
|
|
31767
31674
|
}))));
|
|
31768
31675
|
};
|
|
31769
31676
|
var InfoSection$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
31770
|
-
displayName: "
|
|
31771
|
-
componentId: "sc-
|
|
31677
|
+
displayName: "InformationCenterNPCDetails__InfoSection",
|
|
31678
|
+
componentId: "sc-fdu3xl-0"
|
|
31772
31679
|
})(["display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:8px;background:rgba(255,255,255,0.05);padding:12px;border-radius:4px;"]);
|
|
31773
31680
|
var InfoItem$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
31774
|
-
displayName: "
|
|
31775
|
-
componentId: "sc-
|
|
31681
|
+
displayName: "InformationCenterNPCDetails__InfoItem",
|
|
31682
|
+
componentId: "sc-fdu3xl-1"
|
|
31776
31683
|
})(["display:flex;align-items:center;gap:8px;"]);
|
|
31777
31684
|
var Label$1 = /*#__PURE__*/styled__default.span.withConfig({
|
|
31778
|
-
displayName: "
|
|
31779
|
-
componentId: "sc-
|
|
31685
|
+
displayName: "InformationCenterNPCDetails__Label",
|
|
31686
|
+
componentId: "sc-fdu3xl-2"
|
|
31780
31687
|
})(["color:", ";font-size:0.5rem;opacity:0.8;"], uiColors.yellow);
|
|
31781
31688
|
var Value$1 = /*#__PURE__*/styled__default.span.withConfig({
|
|
31782
|
-
displayName: "
|
|
31783
|
-
componentId: "sc-
|
|
31689
|
+
displayName: "InformationCenterNPCDetails__Value",
|
|
31690
|
+
componentId: "sc-fdu3xl-3"
|
|
31784
31691
|
})(["color:", ";font-size:0.5rem;"], uiColors.white);
|
|
31785
|
-
var StyledCollapsible$
|
|
31786
|
-
displayName: "
|
|
31787
|
-
componentId: "sc-
|
|
31692
|
+
var StyledCollapsible$1 = /*#__PURE__*/styled__default(Collapsible).withConfig({
|
|
31693
|
+
displayName: "InformationCenterNPCDetails__StyledCollapsible",
|
|
31694
|
+
componentId: "sc-fdu3xl-4"
|
|
31788
31695
|
})(["background:rgba(255,255,255,0.05);border-radius:4px;overflow:hidden;"]);
|
|
31789
|
-
var Description$2 = /*#__PURE__*/styled__default.p.withConfig({
|
|
31790
|
-
displayName: "InformationCenterItemDetails__Description",
|
|
31791
|
-
componentId: "sc-zwf6pb-5"
|
|
31792
|
-
})(["color:", ";font-size:0.5rem;margin:0;padding:12px;line-height:1.5;"], uiColors.white);
|
|
31793
31696
|
var StatGrid$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
31794
|
-
displayName: "
|
|
31795
|
-
componentId: "sc-
|
|
31697
|
+
displayName: "InformationCenterNPCDetails__StatGrid",
|
|
31698
|
+
componentId: "sc-fdu3xl-5"
|
|
31796
31699
|
})(["display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px;padding:12px;"]);
|
|
31797
31700
|
var StatItem$2 = /*#__PURE__*/styled__default.div.withConfig({
|
|
31798
|
-
displayName: "
|
|
31799
|
-
componentId: "sc-
|
|
31701
|
+
displayName: "InformationCenterNPCDetails__StatItem",
|
|
31702
|
+
componentId: "sc-fdu3xl-6"
|
|
31800
31703
|
})(["color:", ";font-size:0.5rem;background:rgba(255,255,255,0.05);padding:8px;border-radius:4px;"], uiColors.white);
|
|
31801
|
-
var EffectsList$
|
|
31802
|
-
displayName: "
|
|
31803
|
-
componentId: "sc-
|
|
31704
|
+
var EffectsList$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
31705
|
+
displayName: "InformationCenterNPCDetails__EffectsList",
|
|
31706
|
+
componentId: "sc-fdu3xl-7"
|
|
31804
31707
|
})(["display:flex;flex-wrap:wrap;gap:8px;padding:12px;"]);
|
|
31805
|
-
var EffectItem$
|
|
31806
|
-
displayName: "
|
|
31807
|
-
componentId: "sc-
|
|
31808
|
-
})(["
|
|
31809
|
-
var
|
|
31810
|
-
displayName: "
|
|
31811
|
-
componentId: "sc-
|
|
31812
|
-
})(["color:", ";opacity:0.8;"], uiColors.yellow);
|
|
31813
|
-
var BuffsList = /*#__PURE__*/styled__default.div.withConfig({
|
|
31814
|
-
displayName: "InformationCenterItemDetails__BuffsList",
|
|
31815
|
-
componentId: "sc-zwf6pb-11"
|
|
31708
|
+
var EffectItem$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
31709
|
+
displayName: "InformationCenterNPCDetails__EffectItem",
|
|
31710
|
+
componentId: "sc-fdu3xl-8"
|
|
31711
|
+
})(["color:", ";font-size:0.5rem;background:rgba(255,255,255,0.1);padding:4px 8px;border-radius:4px;"], uiColors.white);
|
|
31712
|
+
var SpellsList = /*#__PURE__*/styled__default.div.withConfig({
|
|
31713
|
+
displayName: "InformationCenterNPCDetails__SpellsList",
|
|
31714
|
+
componentId: "sc-fdu3xl-9"
|
|
31816
31715
|
})(["display:flex;flex-direction:column;gap:8px;padding:12px;"]);
|
|
31817
|
-
var
|
|
31818
|
-
displayName: "
|
|
31819
|
-
componentId: "sc-
|
|
31820
|
-
})(["display:flex;
|
|
31821
|
-
var
|
|
31822
|
-
displayName: "
|
|
31823
|
-
componentId: "sc-
|
|
31824
|
-
})(["
|
|
31825
|
-
var
|
|
31826
|
-
displayName: "
|
|
31827
|
-
componentId: "sc-
|
|
31828
|
-
})(["
|
|
31829
|
-
var
|
|
31830
|
-
displayName: "
|
|
31831
|
-
componentId: "sc-
|
|
31832
|
-
})(["color:", ";font-size:0.45rem;margin:0;padding:0 12px 12px;font-style:italic;"], uiColors.lightGray);
|
|
31833
|
-
var DropList = /*#__PURE__*/styled__default.div.withConfig({
|
|
31834
|
-
displayName: "InformationCenterItemDetails__DropList",
|
|
31835
|
-
componentId: "sc-zwf6pb-16"
|
|
31836
|
-
})(["display:flex;flex-direction:column;gap:0.5rem;padding:12px;"]);
|
|
31837
|
-
var DropItem = /*#__PURE__*/styled__default.div.withConfig({
|
|
31838
|
-
displayName: "InformationCenterItemDetails__DropItem",
|
|
31839
|
-
componentId: "sc-zwf6pb-17"
|
|
31840
|
-
})(["display:flex;justify-content:space-between;align-items:center;padding:0.5rem;background:rgba(255,255,255,0.05);border-radius:4px;"]);
|
|
31841
|
-
var NPCName = /*#__PURE__*/styled__default.span.withConfig({
|
|
31842
|
-
displayName: "InformationCenterItemDetails__NPCName",
|
|
31843
|
-
componentId: "sc-zwf6pb-18"
|
|
31844
|
-
})(["color:", ";font-size:0.5rem;"], uiColors.white);
|
|
31845
|
-
var DropRate = /*#__PURE__*/styled__default.span.withConfig({
|
|
31846
|
-
displayName: "InformationCenterItemDetails__DropRate",
|
|
31847
|
-
componentId: "sc-zwf6pb-19"
|
|
31716
|
+
var SpellIconContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
31717
|
+
displayName: "InformationCenterNPCDetails__SpellIconContainer",
|
|
31718
|
+
componentId: "sc-fdu3xl-10"
|
|
31719
|
+
})(["display:flex;padding-right:30px;padding-bottom:30px;"]);
|
|
31720
|
+
var SpellContent = /*#__PURE__*/styled__default.div.withConfig({
|
|
31721
|
+
displayName: "InformationCenterNPCDetails__SpellContent",
|
|
31722
|
+
componentId: "sc-fdu3xl-11"
|
|
31723
|
+
})(["display:flex;flex-direction:column;gap:4px;flex:1;"]);
|
|
31724
|
+
var SpellItem = /*#__PURE__*/styled__default.div.withConfig({
|
|
31725
|
+
displayName: "InformationCenterNPCDetails__SpellItem",
|
|
31726
|
+
componentId: "sc-fdu3xl-12"
|
|
31727
|
+
})(["display:flex;gap:8px;background:rgba(255,255,255,0.05);padding:8px;padding-left:10px;border-radius:4px;align-items:center;"]);
|
|
31728
|
+
var SpellName = /*#__PURE__*/styled__default.div.withConfig({
|
|
31729
|
+
displayName: "InformationCenterNPCDetails__SpellName",
|
|
31730
|
+
componentId: "sc-fdu3xl-13"
|
|
31848
31731
|
})(["color:", ";font-size:0.5rem;"], uiColors.yellow);
|
|
31849
|
-
var
|
|
31850
|
-
displayName: "
|
|
31851
|
-
componentId: "sc-
|
|
31852
|
-
})(["display:
|
|
31853
|
-
var
|
|
31854
|
-
displayName: "
|
|
31855
|
-
componentId: "sc-
|
|
31732
|
+
var SpellDetails = /*#__PURE__*/styled__default.div.withConfig({
|
|
31733
|
+
displayName: "InformationCenterNPCDetails__SpellDetails",
|
|
31734
|
+
componentId: "sc-fdu3xl-14"
|
|
31735
|
+
})(["display:flex;align-items:center;gap:8px;color:", ";font-size:0.45rem;opacity:0.8;"], uiColors.white);
|
|
31736
|
+
var SpellValue = /*#__PURE__*/styled__default.span.withConfig({
|
|
31737
|
+
displayName: "InformationCenterNPCDetails__SpellValue",
|
|
31738
|
+
componentId: "sc-fdu3xl-15"
|
|
31739
|
+
})(["color:", ";"], uiColors.yellow);
|
|
31740
|
+
var Separator = /*#__PURE__*/styled__default.span.withConfig({
|
|
31741
|
+
displayName: "InformationCenterNPCDetails__Separator",
|
|
31742
|
+
componentId: "sc-fdu3xl-16"
|
|
31743
|
+
})(["color:", ";opacity:0.5;"], uiColors.yellow);
|
|
31744
|
+
var LootSearchContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
31745
|
+
displayName: "InformationCenterNPCDetails__LootSearchContainer",
|
|
31746
|
+
componentId: "sc-fdu3xl-17"
|
|
31747
|
+
})(["padding:12px 12px 0;"]);
|
|
31748
|
+
var StyledSearchBar$1 = /*#__PURE__*/styled__default(SearchBar).withConfig({
|
|
31749
|
+
displayName: "InformationCenterNPCDetails__StyledSearchBar",
|
|
31750
|
+
componentId: "sc-fdu3xl-18"
|
|
31751
|
+
})(["width:100%;"]);
|
|
31752
|
+
var LootGrid = /*#__PURE__*/styled__default.div.withConfig({
|
|
31753
|
+
displayName: "InformationCenterNPCDetails__LootGrid",
|
|
31754
|
+
componentId: "sc-fdu3xl-19"
|
|
31755
|
+
})(["display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:8px;padding:12px;"]);
|
|
31756
|
+
var LootItem = /*#__PURE__*/styled__default.div.withConfig({
|
|
31757
|
+
displayName: "InformationCenterNPCDetails__LootItem",
|
|
31758
|
+
componentId: "sc-fdu3xl-20"
|
|
31856
31759
|
})(["display:flex;align-items:center;gap:8px;background:rgba(255,255,255,0.05);padding:8px;border-radius:4px;"]);
|
|
31857
|
-
var
|
|
31858
|
-
displayName: "
|
|
31859
|
-
componentId: "sc-
|
|
31860
|
-
})(["
|
|
31861
|
-
|
|
31862
|
-
|
|
31863
|
-
|
|
31864
|
-
|
|
31760
|
+
var LootDetails = /*#__PURE__*/styled__default.div.withConfig({
|
|
31761
|
+
displayName: "InformationCenterNPCDetails__LootDetails",
|
|
31762
|
+
componentId: "sc-fdu3xl-21"
|
|
31763
|
+
})(["flex:1;display:flex;flex-direction:column;gap:4px;"]);
|
|
31764
|
+
var LootName = /*#__PURE__*/styled__default.div.withConfig({
|
|
31765
|
+
displayName: "InformationCenterNPCDetails__LootName",
|
|
31766
|
+
componentId: "sc-fdu3xl-22"
|
|
31767
|
+
})(["color:", ";font-size:0.5rem;"], uiColors.white);
|
|
31768
|
+
var LootInfo = /*#__PURE__*/styled__default.div.withConfig({
|
|
31769
|
+
displayName: "InformationCenterNPCDetails__LootInfo",
|
|
31770
|
+
componentId: "sc-fdu3xl-23"
|
|
31865
31771
|
})(["display:flex;align-items:center;gap:8px;"]);
|
|
31866
|
-
var
|
|
31867
|
-
displayName: "
|
|
31868
|
-
componentId: "sc-
|
|
31869
|
-
})(["color:", ";font-size:0.
|
|
31870
|
-
var
|
|
31871
|
-
displayName: "
|
|
31872
|
-
componentId: "sc-
|
|
31873
|
-
})(["color:", ";font-size:0.
|
|
31874
|
-
|
|
31875
|
-
|
|
31876
|
-
|
|
31877
|
-
|
|
31878
|
-
|
|
31879
|
-
|
|
31880
|
-
|
|
31772
|
+
var LootChance = /*#__PURE__*/styled__default.span.withConfig({
|
|
31773
|
+
displayName: "InformationCenterNPCDetails__LootChance",
|
|
31774
|
+
componentId: "sc-fdu3xl-24"
|
|
31775
|
+
})(["color:", ";font-size:0.45rem;"], uiColors.yellow);
|
|
31776
|
+
var LootQuantity = /*#__PURE__*/styled__default.span.withConfig({
|
|
31777
|
+
displayName: "InformationCenterNPCDetails__LootQuantity",
|
|
31778
|
+
componentId: "sc-fdu3xl-25"
|
|
31779
|
+
})(["color:", ";font-size:0.45rem;"], uiColors.lightGray);
|
|
31780
|
+
var PaginationContainer$2 = /*#__PURE__*/styled__default.div.withConfig({
|
|
31781
|
+
displayName: "InformationCenterNPCDetails__PaginationContainer",
|
|
31782
|
+
componentId: "sc-fdu3xl-26"
|
|
31783
|
+
})(["display:flex;justify-content:center;padding:12px;"]);
|
|
31784
|
+
var StyledPagination = /*#__PURE__*/styled__default(Pagination).withConfig({
|
|
31785
|
+
displayName: "InformationCenterNPCDetails__StyledPagination",
|
|
31786
|
+
componentId: "sc-fdu3xl-27"
|
|
31787
|
+
})(["font-size:0.6rem;"]);
|
|
31788
|
+
|
|
31789
|
+
var EffectsList$2 = /*#__PURE__*/styled__default.div.withConfig({
|
|
31790
|
+
displayName: "InformationCenterNPCTooltip__EffectsList",
|
|
31791
|
+
componentId: "sc-j2o39s-0"
|
|
31792
|
+
})(["display:flex;gap:8px;flex-wrap:wrap;"]);
|
|
31793
|
+
var EffectItem$2 = /*#__PURE__*/styled__default.span.withConfig({
|
|
31794
|
+
displayName: "InformationCenterNPCTooltip__EffectItem",
|
|
31795
|
+
componentId: "sc-j2o39s-1"
|
|
31796
|
+
})(["font-size:0.5rem;color:", ";background:rgba(255,255,255,0.1);padding:2px 6px;border-radius:4px;"], uiColors.white);
|
|
31797
|
+
var SpellList = /*#__PURE__*/styled__default.div.withConfig({
|
|
31798
|
+
displayName: "InformationCenterNPCTooltip__SpellList",
|
|
31799
|
+
componentId: "sc-j2o39s-2"
|
|
31800
|
+
})(["display:flex;flex-direction:column;gap:2px;"]);
|
|
31801
|
+
var SpellItem$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
31802
|
+
displayName: "InformationCenterNPCTooltip__SpellItem",
|
|
31803
|
+
componentId: "sc-j2o39s-3"
|
|
31804
|
+
})(["display:flex;align-items:center;justify-content:space-between;font-size:0.5rem;color:", ";background:rgba(255,255,255,0.05);padding:2px 6px;border-radius:4px;"], uiColors.white);
|
|
31805
|
+
var SpellInfo = /*#__PURE__*/styled__default.span.withConfig({
|
|
31806
|
+
displayName: "InformationCenterNPCTooltip__SpellInfo",
|
|
31807
|
+
componentId: "sc-j2o39s-4"
|
|
31808
|
+
})(["color:", ";margin-left:8px;opacity:0.8;"], uiColors.yellow);
|
|
31809
|
+
var LootList = /*#__PURE__*/styled__default.div.withConfig({
|
|
31810
|
+
displayName: "InformationCenterNPCTooltip__LootList",
|
|
31811
|
+
componentId: "sc-j2o39s-5"
|
|
31812
|
+
})(["display:flex;flex-direction:column;gap:2px;"]);
|
|
31813
|
+
var LootItem$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
31814
|
+
displayName: "InformationCenterNPCTooltip__LootItem",
|
|
31815
|
+
componentId: "sc-j2o39s-6"
|
|
31816
|
+
})(["display:flex;align-items:center;gap:4px;font-size:0.5rem;background:rgba(255,255,255,0.05);padding:4px 6px;border-radius:4px;.sprite-from-atlas-img{top:0px;left:0px;}"]);
|
|
31817
|
+
var LootName$1 = /*#__PURE__*/styled__default.span.withConfig({
|
|
31818
|
+
displayName: "InformationCenterNPCTooltip__LootName",
|
|
31819
|
+
componentId: "sc-j2o39s-7"
|
|
31820
|
+
})(["color:", ";flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-left:4px;"], uiColors.white);
|
|
31821
|
+
var LootChance$1 = /*#__PURE__*/styled__default.span.withConfig({
|
|
31822
|
+
displayName: "InformationCenterNPCTooltip__LootChance",
|
|
31823
|
+
componentId: "sc-j2o39s-8"
|
|
31824
|
+
})(["color:", ";font-size:0.45rem;text-transform:lowercase;opacity:0.8;"], uiColors.yellow);
|
|
31825
|
+
var MoreIndicator = /*#__PURE__*/styled__default.div.withConfig({
|
|
31826
|
+
displayName: "InformationCenterNPCTooltip__MoreIndicator",
|
|
31827
|
+
componentId: "sc-j2o39s-9"
|
|
31828
|
+
})(["color:", ";font-size:0.45rem;text-align:center;margin-top:2px;opacity:0.7;"], uiColors.yellow);
|
|
31829
|
+
var formatText = function formatText(text) {
|
|
31830
|
+
if (typeof text === 'number') {
|
|
31831
|
+
return text.toString();
|
|
31832
|
+
}
|
|
31833
|
+
return text.toString().replace(/([A-Z])/g, ' $1').trim().replace(/([A-Z]+)([A-Z][a-z])/g, '$1 $2').replace(/\s+/g, ' ');
|
|
31834
|
+
};
|
|
31835
|
+
var formatRarity = function formatRarity(rarity) {
|
|
31836
|
+
switch (rarity) {
|
|
31837
|
+
case 0.5:
|
|
31838
|
+
return 'Very Rare';
|
|
31839
|
+
case 1:
|
|
31840
|
+
return 'Rare';
|
|
31841
|
+
case 10:
|
|
31842
|
+
return 'Uncommon';
|
|
31843
|
+
case 15:
|
|
31844
|
+
return 'Semi Common';
|
|
31845
|
+
case 20:
|
|
31846
|
+
return 'Common';
|
|
31847
|
+
case 35:
|
|
31848
|
+
return 'Very Common';
|
|
31881
31849
|
default:
|
|
31882
|
-
return '
|
|
31850
|
+
return 'Unknown';
|
|
31883
31851
|
}
|
|
31884
|
-
}
|
|
31885
|
-
var
|
|
31886
|
-
var
|
|
31887
|
-
|
|
31888
|
-
|
|
31889
|
-
|
|
31852
|
+
};
|
|
31853
|
+
var InformationCenterNPCTooltip = function InformationCenterNPCTooltip(_ref) {
|
|
31854
|
+
var _npc$skills$strength, _npc$skills$dexterity, _npc$skills$resistanc;
|
|
31855
|
+
var npc = _ref.npc,
|
|
31856
|
+
itemsAtlasJSON = _ref.itemsAtlasJSON,
|
|
31857
|
+
itemsAtlasIMG = _ref.itemsAtlasIMG;
|
|
31858
|
+
return React__default.createElement(BaseTooltip, null, React__default.createElement(TooltipTitle$1, null, npc.name), React__default.createElement(StatsContainer, null, React__default.createElement(StatItem$1, null, "HP: ", npc.baseHealth), React__default.createElement(StatItem$1, null, "LVL: ", npc.skills.level), React__default.createElement(StatItem$1, null, "STR: ", ((_npc$skills$strength = npc.skills.strength) == null ? void 0 : _npc$skills$strength.level) || '-'), React__default.createElement(StatItem$1, null, "DEX: ", ((_npc$skills$dexterity = npc.skills.dexterity) == null ? void 0 : _npc$skills$dexterity.level) || '-'), React__default.createElement(StatItem$1, null, "RES: ", ((_npc$skills$resistanc = npc.skills.resistance) == null ? void 0 : _npc$skills$resistanc.level) || '-'), React__default.createElement(StatItem$1, null, "SPD: ", formatText(npc.speed))), npc.entityEffects && npc.entityEffects.length > 0 && React__default.createElement(Section, null, React__default.createElement(SectionTitle, null, "Effects"), React__default.createElement(EffectsList$2, null, npc.entityEffects.map(function (effect) {
|
|
31859
|
+
return React__default.createElement(EffectItem$2, {
|
|
31860
|
+
key: effect
|
|
31861
|
+
}, formatText(effect));
|
|
31862
|
+
}))), npc.areaSpells && npc.areaSpells.length > 0 && React__default.createElement(Section, null, React__default.createElement(SectionTitle, null, "Spells"), React__default.createElement(SpellList, null, npc.areaSpells.map(function (spell) {
|
|
31863
|
+
return React__default.createElement(SpellItem$1, {
|
|
31864
|
+
key: spell.spellKey
|
|
31865
|
+
}, formatText(spell.spellKey), React__default.createElement(SpellInfo, null, formatText(spell.power), ", ", spell.probability, "%"));
|
|
31866
|
+
}))), npc.loots && npc.loots.length > 0 && React__default.createElement(Section, null, React__default.createElement(SectionTitle, null, "Possible Loot"), React__default.createElement(LootList, null, npc.loots.slice(0, 4).map(function (loot) {
|
|
31867
|
+
return React__default.createElement(LootItem$1, {
|
|
31868
|
+
key: loot.itemBlueprintKey
|
|
31869
|
+
}, React__default.createElement(SpriteFromAtlas, {
|
|
31870
|
+
atlasIMG: itemsAtlasIMG,
|
|
31871
|
+
atlasJSON: itemsAtlasJSON,
|
|
31872
|
+
spriteKey: loot.itemBlueprintKey,
|
|
31873
|
+
imgScale: 1
|
|
31874
|
+
}), React__default.createElement(LootName$1, null, formatItemName(loot.itemBlueprintKey)), React__default.createElement(LootChance$1, null, formatRarity(loot.chance)));
|
|
31875
|
+
}), npc.loots.length > 4 && React__default.createElement(MoreIndicator, null, "..."))));
|
|
31890
31876
|
};
|
|
31891
31877
|
|
|
31892
|
-
var
|
|
31893
|
-
var
|
|
31894
|
-
var items = _ref.items,
|
|
31895
|
-
bestiaryItems = _ref.bestiaryItems,
|
|
31878
|
+
var InformationCenterBestiarySection = function InformationCenterBestiarySection(_ref) {
|
|
31879
|
+
var bestiaryItems = _ref.bestiaryItems,
|
|
31896
31880
|
itemsAtlasJSON = _ref.itemsAtlasJSON,
|
|
31897
31881
|
itemsAtlasIMG = _ref.itemsAtlasIMG,
|
|
31882
|
+
iconsAtlasIMG = _ref.iconsAtlasIMG,
|
|
31883
|
+
iconsAtlasJSON = _ref.iconsAtlasJSON,
|
|
31884
|
+
entitiesAtlasJSON = _ref.entitiesAtlasJSON,
|
|
31885
|
+
entitiesAtlasIMG = _ref.entitiesAtlasIMG,
|
|
31898
31886
|
initialSearchQuery = _ref.initialSearchQuery,
|
|
31899
31887
|
tabId = _ref.tabId;
|
|
31900
31888
|
var _useState = React.useState(initialSearchQuery),
|
|
31901
31889
|
searchQuery = _useState[0],
|
|
31902
31890
|
setSearchQuery = _useState[1];
|
|
31903
|
-
var _useState2 = React.useState(
|
|
31904
|
-
|
|
31905
|
-
|
|
31891
|
+
var _useState2 = React.useState(null),
|
|
31892
|
+
tooltipData = _useState2[0],
|
|
31893
|
+
setTooltipData = _useState2[1];
|
|
31906
31894
|
var _useState3 = React.useState(null),
|
|
31907
|
-
|
|
31908
|
-
|
|
31909
|
-
var _useState4 = React.useState(
|
|
31910
|
-
|
|
31911
|
-
|
|
31912
|
-
|
|
31913
|
-
|
|
31914
|
-
|
|
31915
|
-
|
|
31916
|
-
|
|
31917
|
-
|
|
31918
|
-
|
|
31919
|
-
id: 0,
|
|
31920
|
-
value: 'all',
|
|
31921
|
-
option: 'All Items'
|
|
31922
|
-
}, {
|
|
31923
|
-
id: 1,
|
|
31924
|
-
value: shared.ItemType.Consumable,
|
|
31925
|
-
option: 'Consumables'
|
|
31926
|
-
}, {
|
|
31927
|
-
id: 2,
|
|
31928
|
-
value: shared.ItemType.Weapon,
|
|
31929
|
-
option: 'Weapons'
|
|
31930
|
-
}, {
|
|
31931
|
-
id: 3,
|
|
31932
|
-
value: shared.ItemType.Armor,
|
|
31933
|
-
option: 'Armor'
|
|
31934
|
-
}];
|
|
31935
|
-
var filteredItems = items.filter(function (item) {
|
|
31936
|
-
return (selectedItemCategory === 'all' || item.type === selectedItemCategory) && item.name.toLowerCase().includes(searchQuery.toLowerCase());
|
|
31937
|
-
});
|
|
31938
|
-
var getDroppedByNPCs = function getDroppedByNPCs(itemId, npcs) {
|
|
31939
|
-
return npcs.filter(function (npc) {
|
|
31940
|
-
var _npc$loots;
|
|
31941
|
-
return (_npc$loots = npc.loots) == null ? void 0 : _npc$loots.some(function (loot) {
|
|
31942
|
-
return loot.itemBlueprintKey === itemId;
|
|
31943
|
-
});
|
|
31944
|
-
}) || [];
|
|
31945
|
-
};
|
|
31946
|
-
var handleMouseEnter = function handleMouseEnter(e, item) {
|
|
31947
|
-
setTooltipPosition({
|
|
31948
|
-
x: e.clientX + TOOLTIP_OFFSET,
|
|
31949
|
-
y: e.clientY
|
|
31950
|
-
});
|
|
31951
|
-
setHoveredItem(item);
|
|
31952
|
-
};
|
|
31953
|
-
var handleMouseMove = function handleMouseMove(e) {
|
|
31954
|
-
if (hoveredItem) {
|
|
31955
|
-
setTooltipPosition({
|
|
31956
|
-
x: e.clientX + TOOLTIP_OFFSET,
|
|
31957
|
-
y: e.clientY
|
|
31895
|
+
selectedMonster = _useState3[0],
|
|
31896
|
+
setSelectedMonster = _useState3[1];
|
|
31897
|
+
var _useState4 = React.useState('ontouchstart' in window),
|
|
31898
|
+
isTouchDevice = _useState4[0];
|
|
31899
|
+
var handleMouseEnter = function handleMouseEnter(monster, event) {
|
|
31900
|
+
if (!isTouchDevice && !selectedMonster) {
|
|
31901
|
+
setTooltipData({
|
|
31902
|
+
npc: monster,
|
|
31903
|
+
position: {
|
|
31904
|
+
x: event.clientX,
|
|
31905
|
+
y: event.clientY
|
|
31906
|
+
}
|
|
31958
31907
|
});
|
|
31959
31908
|
}
|
|
31960
31909
|
};
|
|
31961
31910
|
var handleMouseLeave = function handleMouseLeave() {
|
|
31962
|
-
|
|
31911
|
+
if (!isTouchDevice) {
|
|
31912
|
+
setTooltipData(null);
|
|
31913
|
+
}
|
|
31963
31914
|
};
|
|
31964
|
-
var
|
|
31965
|
-
|
|
31966
|
-
|
|
31967
|
-
|
|
31968
|
-
|
|
31969
|
-
|
|
31970
|
-
|
|
31915
|
+
var handleMouseMove = function handleMouseMove(event) {
|
|
31916
|
+
if (!isTouchDevice && tooltipData) {
|
|
31917
|
+
setTooltipData(_extends({}, tooltipData, {
|
|
31918
|
+
position: {
|
|
31919
|
+
x: event.clientX,
|
|
31920
|
+
y: event.clientY
|
|
31921
|
+
}
|
|
31922
|
+
}));
|
|
31923
|
+
}
|
|
31971
31924
|
};
|
|
31972
|
-
var
|
|
31973
|
-
|
|
31974
|
-
|
|
31925
|
+
var handleTouchStart = function handleTouchStart(monster, event) {
|
|
31926
|
+
if (isTouchDevice) {
|
|
31927
|
+
event.preventDefault();
|
|
31928
|
+
var touch = event.touches[0];
|
|
31929
|
+
if ((tooltipData == null ? void 0 : tooltipData.npc.id) === monster.id) {
|
|
31930
|
+
setTooltipData(null);
|
|
31931
|
+
} else {
|
|
31932
|
+
setTooltipData({
|
|
31933
|
+
npc: monster,
|
|
31934
|
+
position: {
|
|
31935
|
+
x: touch.clientX,
|
|
31936
|
+
y: touch.clientY
|
|
31937
|
+
}
|
|
31938
|
+
});
|
|
31939
|
+
}
|
|
31940
|
+
}
|
|
31941
|
+
};
|
|
31942
|
+
var handleMonsterClick = function handleMonsterClick(monster) {
|
|
31943
|
+
setSelectedMonster(monster);
|
|
31944
|
+
setTooltipData(null);
|
|
31975
31945
|
};
|
|
31946
|
+
var _useState5 = React.useState('all'),
|
|
31947
|
+
selectedBestiaryCategory = _useState5[0],
|
|
31948
|
+
setSelectedBestiaryCategory = _useState5[1];
|
|
31949
|
+
var bestiaryCategoryOptions = [{
|
|
31950
|
+
id: 0,
|
|
31951
|
+
value: 'all',
|
|
31952
|
+
option: 'All Monsters'
|
|
31953
|
+
}, {
|
|
31954
|
+
id: 1,
|
|
31955
|
+
value: 'bosses',
|
|
31956
|
+
option: 'Bosses'
|
|
31957
|
+
}].concat(Object.entries(shared.NPCAlignment).map(function (_ref2, index) {
|
|
31958
|
+
var value = _ref2[1];
|
|
31959
|
+
return {
|
|
31960
|
+
id: index + 1,
|
|
31961
|
+
value: value,
|
|
31962
|
+
option: formatItemType(value)
|
|
31963
|
+
};
|
|
31964
|
+
}));
|
|
31976
31965
|
var renderItem = function renderItem(item) {
|
|
31977
31966
|
return React__default.createElement(InformationCenterCell, {
|
|
31978
|
-
key: item.
|
|
31967
|
+
key: item.id,
|
|
31979
31968
|
name: item.name,
|
|
31980
|
-
spriteKey: item.
|
|
31981
|
-
atlasJSON:
|
|
31982
|
-
atlasIMG:
|
|
31969
|
+
spriteKey: item.key,
|
|
31970
|
+
atlasJSON: entitiesAtlasJSON,
|
|
31971
|
+
atlasIMG: entitiesAtlasIMG,
|
|
31972
|
+
onClick: function onClick() {
|
|
31973
|
+
return handleMonsterClick(item);
|
|
31974
|
+
},
|
|
31983
31975
|
onMouseEnter: function onMouseEnter(e) {
|
|
31984
|
-
return handleMouseEnter(
|
|
31976
|
+
return handleMouseEnter(item, e);
|
|
31985
31977
|
},
|
|
31986
|
-
onMouseMove: handleMouseMove,
|
|
31987
31978
|
onMouseLeave: handleMouseLeave,
|
|
31979
|
+
onMouseMove: handleMouseMove,
|
|
31988
31980
|
onTouchStart: function onTouchStart(e) {
|
|
31989
|
-
return handleTouchStart(
|
|
31990
|
-
}
|
|
31991
|
-
|
|
31992
|
-
|
|
31981
|
+
return handleTouchStart(item, e);
|
|
31982
|
+
}
|
|
31983
|
+
});
|
|
31984
|
+
};
|
|
31985
|
+
var filteredItems = React.useMemo(function () {
|
|
31986
|
+
return bestiaryItems.filter(function (item) {
|
|
31987
|
+
var matchesSearch = item.name.toLowerCase().includes(searchQuery.toLowerCase());
|
|
31988
|
+
var matchesCategory = true;
|
|
31989
|
+
if (selectedBestiaryCategory === 'bosses') {
|
|
31990
|
+
matchesCategory = item.isBoss === true;
|
|
31991
|
+
} else if (selectedBestiaryCategory === shared.NPCAlignment.Hostile) {
|
|
31992
|
+
matchesCategory = item.alignment === shared.NPCAlignment.Hostile && !item.isBoss;
|
|
31993
|
+
} else if (selectedBestiaryCategory !== 'all') {
|
|
31994
|
+
matchesCategory = item.alignment === selectedBestiaryCategory;
|
|
31993
31995
|
}
|
|
31996
|
+
return matchesSearch && matchesCategory;
|
|
31994
31997
|
});
|
|
31998
|
+
}, [bestiaryItems, searchQuery, selectedBestiaryCategory]);
|
|
31999
|
+
var handleSearchChange = function handleSearchChange(newQuery) {
|
|
32000
|
+
setSearchQuery(newQuery);
|
|
32001
|
+
if (newQuery && selectedBestiaryCategory !== 'all') {
|
|
32002
|
+
setSelectedBestiaryCategory('all');
|
|
32003
|
+
}
|
|
31995
32004
|
};
|
|
31996
32005
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement(PaginatedContent, {
|
|
31997
32006
|
items: filteredItems,
|
|
31998
32007
|
renderItem: renderItem,
|
|
31999
|
-
emptyMessage: "No
|
|
32008
|
+
emptyMessage: "No monsters found",
|
|
32009
|
+
tabId: tabId,
|
|
32010
|
+
layout: "grid",
|
|
32000
32011
|
filterOptions: {
|
|
32001
|
-
options:
|
|
32002
|
-
selectedOption:
|
|
32003
|
-
onOptionChange:
|
|
32012
|
+
options: bestiaryCategoryOptions,
|
|
32013
|
+
selectedOption: selectedBestiaryCategory,
|
|
32014
|
+
onOptionChange: setSelectedBestiaryCategory
|
|
32004
32015
|
},
|
|
32005
32016
|
searchOptions: {
|
|
32006
32017
|
value: searchQuery,
|
|
32007
|
-
onChange:
|
|
32008
|
-
placeholder: 'Search
|
|
32018
|
+
onChange: handleSearchChange,
|
|
32019
|
+
placeholder: 'Search monsters...'
|
|
32009
32020
|
},
|
|
32010
|
-
dependencies: [
|
|
32011
|
-
tabId: tabId,
|
|
32012
|
-
layout: "grid",
|
|
32021
|
+
dependencies: [selectedBestiaryCategory],
|
|
32013
32022
|
itemHeight: "180px"
|
|
32014
|
-
}),
|
|
32023
|
+
}), tooltipData && React__default.createElement(Portal, null, React__default.createElement(TooltipWrapper$1, {
|
|
32015
32024
|
style: {
|
|
32016
|
-
|
|
32017
|
-
left:
|
|
32025
|
+
position: 'fixed',
|
|
32026
|
+
left: tooltipData.position.x + 10,
|
|
32027
|
+
top: tooltipData.position.y + 10
|
|
32018
32028
|
}
|
|
32019
|
-
}, React__default.createElement(
|
|
32020
|
-
|
|
32021
|
-
|
|
32022
|
-
|
|
32029
|
+
}, React__default.createElement(InformationCenterNPCTooltip, {
|
|
32030
|
+
npc: tooltipData.npc,
|
|
32031
|
+
itemsAtlasJSON: itemsAtlasJSON,
|
|
32032
|
+
itemsAtlasIMG: itemsAtlasIMG
|
|
32033
|
+
}))), selectedMonster && React__default.createElement(InformationCenterNPCDetails, {
|
|
32034
|
+
npc: selectedMonster,
|
|
32023
32035
|
itemsAtlasJSON: itemsAtlasJSON,
|
|
32024
32036
|
itemsAtlasIMG: itemsAtlasIMG,
|
|
32025
|
-
|
|
32037
|
+
iconAtlasIMG: iconsAtlasIMG,
|
|
32038
|
+
iconAtlasJSON: iconsAtlasJSON,
|
|
32039
|
+
entitiesAtlasJSON: entitiesAtlasJSON,
|
|
32040
|
+
entitiesAtlasIMG: entitiesAtlasIMG,
|
|
32026
32041
|
onBack: function onBack() {
|
|
32027
|
-
return
|
|
32042
|
+
return setSelectedMonster(null);
|
|
32028
32043
|
}
|
|
32029
32044
|
}));
|
|
32030
32045
|
};
|
|
32031
32046
|
var TooltipWrapper$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
32032
|
-
displayName: "
|
|
32033
|
-
componentId: "sc-
|
|
32034
|
-
})(["position:fixed;z-index:1000;pointer-events:none;
|
|
32047
|
+
displayName: "InformationCenterBestiarySection__TooltipWrapper",
|
|
32048
|
+
componentId: "sc-e3h0p2-0"
|
|
32049
|
+
})(["position:fixed;z-index:1000;pointer-events:none;width:300px;"]);
|
|
32050
|
+
|
|
32051
|
+
var InformationCenterFAQSection = function InformationCenterFAQSection(_ref) {
|
|
32052
|
+
var faqItems = _ref.faqItems,
|
|
32053
|
+
initialSearchQuery = _ref.initialSearchQuery,
|
|
32054
|
+
tabId = _ref.tabId;
|
|
32055
|
+
var _useState = React.useState(initialSearchQuery),
|
|
32056
|
+
searchQuery = _useState[0],
|
|
32057
|
+
setSearchQuery = _useState[1];
|
|
32058
|
+
React.useEffect(function () {
|
|
32059
|
+
setSearchQuery(initialSearchQuery);
|
|
32060
|
+
}, [initialSearchQuery]);
|
|
32061
|
+
var filteredFaqs = React.useMemo(function () {
|
|
32062
|
+
if (!searchQuery) return faqItems;
|
|
32063
|
+
return faqItems.filter(function (faq) {
|
|
32064
|
+
return faq.question.toLowerCase().includes(searchQuery.toLowerCase()) || faq.answer.toLowerCase().includes(searchQuery.toLowerCase());
|
|
32065
|
+
});
|
|
32066
|
+
}, [searchQuery, faqItems]);
|
|
32067
|
+
var renderItem = function renderItem(item) {
|
|
32068
|
+
return React__default.createElement(StyledCollapsible$2, {
|
|
32069
|
+
title: item.question
|
|
32070
|
+
}, React__default.createElement(Answer$1, null, item.answer));
|
|
32071
|
+
};
|
|
32072
|
+
return React__default.createElement(Container$q, null, React__default.createElement(SearchHeader, {
|
|
32073
|
+
searchOptions: {
|
|
32074
|
+
value: searchQuery,
|
|
32075
|
+
onChange: setSearchQuery,
|
|
32076
|
+
placeholder: 'Search FAQs...'
|
|
32077
|
+
}
|
|
32078
|
+
}), React__default.createElement(PaginatedContent, {
|
|
32079
|
+
items: filteredFaqs,
|
|
32080
|
+
renderItem: renderItem,
|
|
32081
|
+
emptyMessage: "No FAQ items found",
|
|
32082
|
+
tabId: tabId,
|
|
32083
|
+
layout: "list",
|
|
32084
|
+
itemsPerPage: 10
|
|
32085
|
+
}));
|
|
32086
|
+
};
|
|
32087
|
+
var Container$q = /*#__PURE__*/styled__default.div.withConfig({
|
|
32088
|
+
displayName: "InformationCenterFaqSection__Container",
|
|
32089
|
+
componentId: "sc-ofmaa9-0"
|
|
32090
|
+
})(["display:flex;flex-direction:column;gap:1rem;width:100%;"]);
|
|
32091
|
+
var StyledCollapsible$2 = /*#__PURE__*/styled__default(Collapsible).withConfig({
|
|
32092
|
+
displayName: "InformationCenterFaqSection__StyledCollapsible",
|
|
32093
|
+
componentId: "sc-ofmaa9-1"
|
|
32094
|
+
})(["margin-bottom:0.5rem;&:last-child{margin-bottom:0;}"]);
|
|
32095
|
+
var Answer$1 = /*#__PURE__*/styled__default.p.withConfig({
|
|
32096
|
+
displayName: "InformationCenterFaqSection__Answer",
|
|
32097
|
+
componentId: "sc-ofmaa9-2"
|
|
32098
|
+
})(["font-size:0.9rem;color:#ffffff;margin:0;line-height:1.5;"]);
|
|
32035
32099
|
|
|
32100
|
+
var ITEMS_PER_PAGE$2 = 3;
|
|
32101
|
+
var GRID_COLUMNS = 3;
|
|
32036
32102
|
var InformationCenterTutorialsSection = function InformationCenterTutorialsSection(_ref) {
|
|
32037
32103
|
var videoGuides = _ref.videoGuides,
|
|
32038
32104
|
initialSearchQuery = _ref.initialSearchQuery,
|
|
@@ -32043,84 +32109,125 @@ var InformationCenterTutorialsSection = function InformationCenterTutorialsSecti
|
|
|
32043
32109
|
var _useState2 = React.useState('all'),
|
|
32044
32110
|
selectedCategory = _useState2[0],
|
|
32045
32111
|
setSelectedCategory = _useState2[1];
|
|
32112
|
+
var _useState3 = React.useState(1),
|
|
32113
|
+
setCurrentPage = _useState3[1];
|
|
32114
|
+
var getYouTubeThumbnail = function getYouTubeThumbnail(videoUrl) {
|
|
32115
|
+
var regExp = /^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/;
|
|
32116
|
+
var match = videoUrl.match(regExp);
|
|
32117
|
+
var videoId = match && match[2].length === 11 ? match[2] : null;
|
|
32118
|
+
return videoId ? "https://img.youtube.com/vi/" + videoId + "/hqdefault.jpg" : '/placeholder-thumbnail.png';
|
|
32119
|
+
};
|
|
32046
32120
|
var categoryOptions = [{
|
|
32047
32121
|
id: 0,
|
|
32048
32122
|
value: 'all',
|
|
32049
|
-
option: 'All'
|
|
32050
|
-
}, {
|
|
32051
|
-
|
|
32052
|
-
|
|
32053
|
-
|
|
32054
|
-
|
|
32055
|
-
|
|
32056
|
-
|
|
32057
|
-
|
|
32058
|
-
|
|
32059
|
-
|
|
32060
|
-
|
|
32061
|
-
|
|
32062
|
-
|
|
32063
|
-
|
|
32064
|
-
|
|
32065
|
-
|
|
32066
|
-
|
|
32123
|
+
option: 'All Categories'
|
|
32124
|
+
}].concat(shared.VideoGuideCategory ? Object.entries(shared.VideoGuideCategory).map(function (_ref2, index) {
|
|
32125
|
+
var value = _ref2[1];
|
|
32126
|
+
return {
|
|
32127
|
+
id: index + 1,
|
|
32128
|
+
value: value,
|
|
32129
|
+
option: formatItemType(value)
|
|
32130
|
+
};
|
|
32131
|
+
}) : [], shared.VideoGuideLanguage ? Object.entries(shared.VideoGuideLanguage).map(function (_ref3, index) {
|
|
32132
|
+
var value = _ref3[1];
|
|
32133
|
+
return {
|
|
32134
|
+
id: index + (shared.VideoGuideCategory ? Object.entries(shared.VideoGuideCategory).length : 0) + 1,
|
|
32135
|
+
value: value,
|
|
32136
|
+
option: formatItemType(value)
|
|
32137
|
+
};
|
|
32138
|
+
}) : []);
|
|
32139
|
+
var handleVideoClick = function handleVideoClick(videoUrl) {
|
|
32140
|
+
window.open(videoUrl, '_blank', 'noopener,noreferrer');
|
|
32141
|
+
};
|
|
32067
32142
|
var renderItem = function renderItem(guide) {
|
|
32068
32143
|
return React__default.createElement(GuideItem, {
|
|
32069
|
-
key: guide.id
|
|
32144
|
+
key: guide.id,
|
|
32145
|
+
onClick: function onClick() {
|
|
32146
|
+
return handleVideoClick(guide.videoUrl);
|
|
32147
|
+
}
|
|
32070
32148
|
}, React__default.createElement(GuideThumbnail, null, React__default.createElement("img", {
|
|
32071
|
-
src: guide.
|
|
32149
|
+
src: guide.localImage || getYouTubeThumbnail(guide.videoUrl),
|
|
32072
32150
|
alt: guide.title
|
|
32073
|
-
})), React__default.createElement(GuideContent, null, React__default.createElement(GuideTitle, null,
|
|
32151
|
+
})), React__default.createElement(GuideContent, null, React__default.createElement(GuideTitle, null, React__default.createElement(Ellipsis, {
|
|
32152
|
+
maxWidth: "100%",
|
|
32153
|
+
maxLines: 2
|
|
32154
|
+
}, guide.title)), React__default.createElement(GuideDescription, null, React__default.createElement(Ellipsis, {
|
|
32155
|
+
maxWidth: "100%",
|
|
32156
|
+
maxLines: 5
|
|
32157
|
+
}, guide.description)), React__default.createElement(GuideLabelsContainer, null, React__default.createElement(GuideCategory, null, guide.category), React__default.createElement(GuideLanguage, null, guide.language))));
|
|
32158
|
+
};
|
|
32159
|
+
var filteredGuides = React.useMemo(function () {
|
|
32160
|
+
return videoGuides.filter(function (guide) {
|
|
32161
|
+
var matchesSearch = guide.title.toLowerCase().includes(searchQuery.toLowerCase()) || guide.description.toLowerCase().includes(searchQuery.toLowerCase());
|
|
32162
|
+
var matchesCategory = selectedCategory === 'all' || Object.values(shared.VideoGuideCategory).includes(selectedCategory) && guide.category === selectedCategory || Object.values(shared.VideoGuideLanguage).includes(selectedCategory) && guide.language === selectedCategory;
|
|
32163
|
+
return matchesSearch && matchesCategory;
|
|
32164
|
+
});
|
|
32165
|
+
}, [videoGuides, searchQuery, selectedCategory]);
|
|
32166
|
+
var handleSearchChange = function handleSearchChange(newQuery) {
|
|
32167
|
+
setSearchQuery(newQuery);
|
|
32168
|
+
setCurrentPage(1);
|
|
32169
|
+
if (newQuery && selectedCategory !== 'all') {
|
|
32170
|
+
setSelectedCategory('all');
|
|
32171
|
+
}
|
|
32172
|
+
};
|
|
32173
|
+
var handleCategoryChange = function handleCategoryChange(category) {
|
|
32174
|
+
setSelectedCategory(category);
|
|
32175
|
+
setCurrentPage(1);
|
|
32074
32176
|
};
|
|
32075
|
-
var filteredGuides = videoGuides.filter(function (guide) {
|
|
32076
|
-
return (selectedCategory === 'all' || guide.category === selectedCategory) && (guide.title.toLowerCase().includes(searchQuery.toLowerCase()) || guide.description.toLowerCase().includes(searchQuery.toLowerCase()));
|
|
32077
|
-
});
|
|
32078
32177
|
return React__default.createElement(PaginatedContent, {
|
|
32079
32178
|
items: filteredGuides,
|
|
32080
32179
|
renderItem: renderItem,
|
|
32081
32180
|
emptyMessage: "No guides found",
|
|
32082
32181
|
searchOptions: {
|
|
32083
32182
|
value: searchQuery,
|
|
32084
|
-
onChange:
|
|
32183
|
+
onChange: handleSearchChange,
|
|
32085
32184
|
placeholder: 'Search guides...'
|
|
32086
32185
|
},
|
|
32087
32186
|
filterOptions: {
|
|
32088
32187
|
options: categoryOptions,
|
|
32089
32188
|
selectedOption: selectedCategory,
|
|
32090
|
-
onOptionChange:
|
|
32189
|
+
onOptionChange: handleCategoryChange
|
|
32091
32190
|
},
|
|
32092
32191
|
dependencies: [selectedCategory],
|
|
32093
32192
|
tabId: tabId,
|
|
32094
32193
|
layout: "grid",
|
|
32095
|
-
gridColumns:
|
|
32096
|
-
itemsPerPage:
|
|
32097
|
-
itemHeight: "
|
|
32194
|
+
gridColumns: GRID_COLUMNS,
|
|
32195
|
+
itemsPerPage: ITEMS_PER_PAGE$2,
|
|
32196
|
+
itemHeight: "320px"
|
|
32098
32197
|
});
|
|
32099
32198
|
};
|
|
32100
32199
|
var GuideItem = /*#__PURE__*/styled__default.div.withConfig({
|
|
32101
32200
|
displayName: "InformationCenterTutorialsSection__GuideItem",
|
|
32102
32201
|
componentId: "sc-1gk05vk-0"
|
|
32103
|
-
})(["background:rgba(0,0,0,0.3);border-radius:4px;overflow:hidden;border:1px solid ", ";cursor:pointer;transition:transform 0.2s ease;height:100
|
|
32202
|
+
})(["background:rgba(0,0,0,0.3);border-radius:4px;overflow:hidden;border:1px solid ", ";cursor:pointer;transition:transform 0.2s ease;display:flex;flex-direction:column;height:100%;padding:0;&:hover{transform:translateY(-2px);}"], uiColors.darkGray);
|
|
32104
32203
|
var GuideThumbnail = /*#__PURE__*/styled__default.div.withConfig({
|
|
32105
32204
|
displayName: "InformationCenterTutorialsSection__GuideThumbnail",
|
|
32106
32205
|
componentId: "sc-1gk05vk-1"
|
|
32107
|
-
})(["width:100%;height:168px;background:rgba(0,0,0,0.2);overflow:hidden;img{width:100%;height:100%;object-fit:cover;}
|
|
32206
|
+
})(["width:100%;height:168px;background:rgba(0,0,0,0.2);overflow:hidden;img{width:100%;height:100%;object-fit:cover;}"]);
|
|
32108
32207
|
var GuideContent = /*#__PURE__*/styled__default.div.withConfig({
|
|
32109
32208
|
displayName: "InformationCenterTutorialsSection__GuideContent",
|
|
32110
32209
|
componentId: "sc-1gk05vk-2"
|
|
32111
|
-
})(["padding:12px;"]);
|
|
32210
|
+
})(["padding:0 12px 12px;flex:1;display:flex;flex-direction:column;"]);
|
|
32112
32211
|
var GuideTitle = /*#__PURE__*/styled__default.h3.withConfig({
|
|
32113
32212
|
displayName: "InformationCenterTutorialsSection__GuideTitle",
|
|
32114
32213
|
componentId: "sc-1gk05vk-3"
|
|
32115
|
-
})(["margin:0;font-size:0.6rem;color:", ";font-family:'Press Start 2P',cursive;margin-bottom:
|
|
32214
|
+
})(["margin:0;font-size:0.6rem !important;color:", ";font-family:'Press Start 2P',cursive;margin-bottom:5px;text-overflow:ellipsis;"], uiColors.yellow);
|
|
32116
32215
|
var GuideDescription = /*#__PURE__*/styled__default.p.withConfig({
|
|
32117
32216
|
displayName: "InformationCenterTutorialsSection__GuideDescription",
|
|
32118
32217
|
componentId: "sc-1gk05vk-4"
|
|
32119
|
-
})(["margin:0;font-size:0.
|
|
32120
|
-
var GuideCategory = /*#__PURE__*/styled__default.
|
|
32218
|
+
})(["margin:0;font-size:0.5rem !important;color:", ";text-align:center;font-family:'Press Start 2P',cursive;margin-bottom:8px;line-height:1.4;"], uiColors.lightGray);
|
|
32219
|
+
var GuideCategory = /*#__PURE__*/styled__default.label.withConfig({
|
|
32121
32220
|
displayName: "InformationCenterTutorialsSection__GuideCategory",
|
|
32122
32221
|
componentId: "sc-1gk05vk-5"
|
|
32123
|
-
})(["font-size:0.5rem
|
|
32222
|
+
})(["font-size:0.5rem !important;font-family:'Press Start 2P',cursive;color:", " !important;line-height:1.4;&::before{content:'\uD83C\uDFF7\uFE0F';padding-right:6px;font-size:0.7rem;transform:translateY(-2px);display:inline-block;}"], uiColors.yellow);
|
|
32223
|
+
var GuideLanguage = /*#__PURE__*/styled__default.label.withConfig({
|
|
32224
|
+
displayName: "InformationCenterTutorialsSection__GuideLanguage",
|
|
32225
|
+
componentId: "sc-1gk05vk-6"
|
|
32226
|
+
})(["font-size:0.5rem !important;font-family:'Press Start 2P',cursive;color:", " !important;line-height:1.4;&::before{content:'\uD83C\uDF10';padding-right:6px;font-size:0.6rem;transform:translateY(-2px);display:inline-block;}"], uiColors.blue);
|
|
32227
|
+
var GuideLabelsContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
32228
|
+
displayName: "InformationCenterTutorialsSection__GuideLabelsContainer",
|
|
32229
|
+
componentId: "sc-1gk05vk-7"
|
|
32230
|
+
})(["display:flex;justify-content:space-between;padding:0 6px 6px;margin-top:auto;"]);
|
|
32124
32231
|
|
|
32125
32232
|
var InformationCenter = function InformationCenter(_ref) {
|
|
32126
32233
|
var itemsAtlasJSON = _ref.itemsAtlasJSON,
|