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